summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 09:25:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 09:25:10 +0000
commit5dced3d1b3deca80e01415a2e35dc7972dcbfae7 (patch)
tree6a403684e0978f0287d7f0ec0e5aab1fd31a59e1
parentInitial commit. (diff)
downloade2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.tar.xz
e2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.zip
Adding upstream version 1.47.0.upstream/1.47.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--.github/workflows/ci.yml116
-rw-r--r--.gitignore237
-rw-r--r--.missing-copyright4
-rw-r--r--.release-checklist19
-rw-r--r--ABOUT-NLS1379
-rw-r--r--Android.bp78
-rw-r--r--CleanSpec.mk52
-rw-r--r--INSTALL69
-rw-r--r--INSTALL.elfbin53
-rw-r--r--MCONFIG.in336
-rw-r--r--Makefile.in170
-rw-r--r--NOTICE849
-rw-r--r--README19
l---------RELEASE-NOTES1
-rw-r--r--SHLIBS35
-rw-r--r--SUBMITTING-PATCHES39
-rw-r--r--acinclude.m4178
-rw-r--r--aclocal.m44167
-rwxr-xr-xconfig/config.guess1774
-rwxr-xr-xconfig/config.rpath684
-rwxr-xr-xconfig/config.sub1907
-rwxr-xr-xconfig/install-sh541
-rw-r--r--config/ltmain.sh11249
-rwxr-xr-xconfig/mkinstalldirs40
-rwxr-xr-xconfig/parse-types.sh127
-rwxr-xr-xconfigure17099
-rw-r--r--configure.ac1932
-rw-r--r--contrib/Android.bp28
-rw-r--r--contrib/add_ext4_encrypt.c64
-rw-r--r--contrib/android/Android.bp78
-rw-r--r--contrib/android/base_fs.c211
-rw-r--r--contrib/android/base_fs.h17
-rw-r--r--contrib/android/basefs_allocator.c388
-rw-r--r--contrib/android/basefs_allocator.h16
-rw-r--r--contrib/android/block_list.c89
-rw-r--r--contrib/android/block_list.h8
-rw-r--r--contrib/android/block_range.c80
-rw-r--r--contrib/android/block_range.h29
-rw-r--r--contrib/android/e2fsdroid.c377
-rw-r--r--contrib/android/ext2simg.c224
-rw-r--r--contrib/android/fsmap.c169
-rw-r--r--contrib/android/fsmap.h29
-rw-r--r--contrib/android/perms.c376
-rw-r--r--contrib/android/perms.h65
-rw-r--r--contrib/build-rpm45
-rw-r--r--contrib/dconf118
-rwxr-xr-xcontrib/dir2fs66
-rwxr-xr-xcontrib/e2croncheck47
-rw-r--r--contrib/ext4-ioc.c98
-rw-r--r--contrib/fallocate.c190
-rw-r--r--contrib/fsstress.c2708
-rw-r--r--contrib/make-sparse.c91
-rwxr-xr-xcontrib/populate-extfs.sh105
-rwxr-xr-xcontrib/python-uuid/setup.py11
-rwxr-xr-xcontrib/python-uuid/test.py18
-rw-r--r--contrib/python-uuid/uuid.c23
-rwxr-xr-xcontrib/setup-schroot46
-rw-r--r--contrib/spd_readdir.c458
-rw-r--r--debugfs/Android.bp80
-rw-r--r--debugfs/Makefile.in426
-rw-r--r--debugfs/debug_cmds.ct233
-rw-r--r--debugfs/debugfs.8.in880
-rw-r--r--debugfs/debugfs.c2682
-rw-r--r--debugfs/debugfs.h210
-rw-r--r--debugfs/do_journal.c972
-rw-r--r--debugfs/dump.c385
-rw-r--r--debugfs/extent_cmds.ct77
-rw-r--r--debugfs/extent_inode.c568
-rw-r--r--debugfs/filefrag.c330
-rw-r--r--debugfs/htree.c488
-rw-r--r--debugfs/icheck.c176
-rw-r--r--debugfs/journal.c947
-rw-r--r--debugfs/journal.h25
-rw-r--r--debugfs/logdump.c933
-rw-r--r--debugfs/ls.c252
-rw-r--r--debugfs/lsdel.c219
-rw-r--r--debugfs/ncheck.c223
-rw-r--r--debugfs/quota.c172
-rw-r--r--debugfs/ro_debug_cmds.ct99
-rw-r--r--debugfs/set_fields.c1024
-rw-r--r--debugfs/unused.c60
-rw-r--r--debugfs/util.c600
-rw-r--r--debugfs/xattrs.c503
-rw-r--r--debugfs/zap.c246
-rw-r--r--depfix.sed35
-rw-r--r--doc/Makefile.in85
-rw-r--r--doc/RelNotes/v1.02.txt25
-rw-r--r--doc/RelNotes/v1.03.txt33
-rw-r--r--doc/RelNotes/v1.04.txt49
-rw-r--r--doc/RelNotes/v1.05.txt104
-rw-r--r--doc/RelNotes/v1.06.txt51
-rw-r--r--doc/RelNotes/v1.07.txt122
-rw-r--r--doc/RelNotes/v1.08.txt75
-rw-r--r--doc/RelNotes/v1.09.txt14
-rw-r--r--doc/RelNotes/v1.10.txt56
-rw-r--r--doc/RelNotes/v1.11.txt61
-rw-r--r--doc/RelNotes/v1.12.txt153
-rw-r--r--doc/RelNotes/v1.13.txt64
-rw-r--r--doc/RelNotes/v1.14.txt34
-rw-r--r--doc/RelNotes/v1.15.txt122
-rw-r--r--doc/RelNotes/v1.16.txt87
-rw-r--r--doc/RelNotes/v1.17.txt32
-rw-r--r--doc/RelNotes/v1.18.txt46
-rw-r--r--doc/RelNotes/v1.19.txt180
-rw-r--r--doc/RelNotes/v1.20.txt206
-rw-r--r--doc/RelNotes/v1.21.txt119
-rw-r--r--doc/RelNotes/v1.22.txt31
-rw-r--r--doc/RelNotes/v1.23.txt65
-rw-r--r--doc/RelNotes/v1.24.txt38
-rw-r--r--doc/RelNotes/v1.25.txt46
-rw-r--r--doc/RelNotes/v1.26.txt164
-rw-r--r--doc/RelNotes/v1.27.txt60
-rw-r--r--doc/RelNotes/v1.28.txt146
-rw-r--r--doc/RelNotes/v1.29.txt31
-rw-r--r--doc/RelNotes/v1.30.txt122
-rw-r--r--doc/RelNotes/v1.31.txt39
-rw-r--r--doc/RelNotes/v1.32.txt14
-rw-r--r--doc/RelNotes/v1.33.txt142
-rw-r--r--doc/RelNotes/v1.34.txt130
-rw-r--r--doc/RelNotes/v1.35.txt166
-rw-r--r--doc/RelNotes/v1.36.txt302
-rw-r--r--doc/RelNotes/v1.37.txt55
-rw-r--r--doc/RelNotes/v1.38.txt138
-rw-r--r--doc/RelNotes/v1.39.txt248
-rw-r--r--doc/RelNotes/v1.40.txt1043
-rw-r--r--doc/RelNotes/v1.41.txt1594
-rw-r--r--doc/RelNotes/v1.42.txt1690
-rw-r--r--doc/RelNotes/v1.43.0.txt234
-rw-r--r--doc/RelNotes/v1.43.1.txt80
-rw-r--r--doc/RelNotes/v1.43.2.txt72
-rw-r--r--doc/RelNotes/v1.43.3.txt27
-rw-r--r--doc/RelNotes/v1.43.4.txt71
-rw-r--r--doc/RelNotes/v1.43.5.txt133
-rw-r--r--doc/RelNotes/v1.43.6.txt70
-rw-r--r--doc/RelNotes/v1.43.7.txt29
-rw-r--r--doc/RelNotes/v1.43.8.txt48
-rw-r--r--doc/RelNotes/v1.43.9.txt15
-rw-r--r--doc/RelNotes/v1.44.0.txt82
-rw-r--r--doc/RelNotes/v1.44.1.txt48
-rw-r--r--doc/RelNotes/v1.44.2.txt53
-rw-r--r--doc/RelNotes/v1.44.3.txt106
-rw-r--r--doc/RelNotes/v1.44.4.txt60
-rw-r--r--doc/RelNotes/v1.44.5.txt77
-rw-r--r--doc/RelNotes/v1.44.6.txt48
-rw-r--r--doc/RelNotes/v1.45.0.txt40
-rw-r--r--doc/RelNotes/v1.45.1.txt81
-rw-r--r--doc/RelNotes/v1.45.2.txt30
-rw-r--r--doc/RelNotes/v1.45.3.txt65
-rw-r--r--doc/RelNotes/v1.45.4.txt50
-rw-r--r--doc/RelNotes/v1.45.5.txt88
-rw-r--r--doc/RelNotes/v1.45.6.txt62
-rw-r--r--doc/RelNotes/v1.45.7.txt96
-rw-r--r--doc/RelNotes/v1.46.0.txt108
-rw-r--r--doc/RelNotes/v1.46.1.txt41
-rw-r--r--doc/RelNotes/v1.46.2.txt64
-rw-r--r--doc/RelNotes/v1.46.3.txt77
-rw-r--r--doc/RelNotes/v1.46.4.txt69
-rw-r--r--doc/RelNotes/v1.46.5.txt82
-rw-r--r--doc/RelNotes/v1.46.6.txt164
-rw-r--r--doc/RelNotes/v1.47.0.txt53
-rw-r--r--doc/libblkid.txt78
-rw-r--r--doc/libext2fs.texinfo1374
-rw-r--r--doc/texinfo.tex7226
-rw-r--r--e2fsck/Android.bp86
-rw-r--r--e2fsck/CHANGES53
-rw-r--r--e2fsck/Makefile.in656
-rw-r--r--e2fsck/badblocks.c142
-rw-r--r--e2fsck/dirinfo.c489
-rw-r--r--e2fsck/dx_dirinfo.c154
-rw-r--r--e2fsck/e2fsck.8.in509
-rw-r--r--e2fsck/e2fsck.c271
-rw-r--r--e2fsck/e2fsck.conf.5.in501
-rw-r--r--e2fsck/e2fsck.h738
-rw-r--r--e2fsck/ea_refcount.c476
-rw-r--r--e2fsck/ehandler.c133
-rw-r--r--e2fsck/emptydir.c194
-rw-r--r--e2fsck/encrypted_files.c458
-rw-r--r--e2fsck/extend.c83
-rw-r--r--e2fsck/extents.c620
-rw-r--r--e2fsck/flushb.c67
-rw-r--r--e2fsck/iscan.c265
-rw-r--r--e2fsck/jfs_user.h321
-rw-r--r--e2fsck/journal.c1900
-rw-r--r--e2fsck/logfile.c411
-rw-r--r--e2fsck/message.c556
-rw-r--r--e2fsck/mtrace.awk37
-rw-r--r--e2fsck/mtrace.c160
-rw-r--r--e2fsck/mtrace.h231
-rw-r--r--e2fsck/pass1.c4466
-rw-r--r--e2fsck/pass1b.c1046
-rw-r--r--e2fsck/pass2.c2171
-rw-r--r--e2fsck/pass3.c921
-rw-r--r--e2fsck/pass4.c302
-rw-r--r--e2fsck/pass5.c958
-rw-r--r--e2fsck/problem.c2756
-rw-r--r--e2fsck/problem.h1359
-rw-r--r--e2fsck/problemP.h48
-rw-r--r--e2fsck/quota.c127
-rw-r--r--e2fsck/readahead.c254
-rw-r--r--e2fsck/recovery.c931
-rw-r--r--e2fsck/region.c236
-rw-r--r--e2fsck/rehash.c1189
-rw-r--r--e2fsck/revoke.c743
-rw-r--r--e2fsck/scantest.c141
-rw-r--r--e2fsck/sigcatcher.c446
-rw-r--r--e2fsck/super.c1461
-rw-r--r--e2fsck/unix.c2171
-rw-r--r--e2fsck/util.c900
-rw-r--r--e2fsprogs.lsm16
-rw-r--r--e2fsprogs.spec244
-rw-r--r--ext2ed/COPYRIGHT346
-rw-r--r--ext2ed/Makefile.in97
-rw-r--r--ext2ed/README160
-rw-r--r--ext2ed/blockbitmap_com.c266
-rw-r--r--ext2ed/dir_com.c678
-rw-r--r--ext2ed/disk.c239
-rw-r--r--ext2ed/doc/ext2ed-design.sgml3459
-rw-r--r--ext2ed/doc/ext2fs-overview.sgml1569
-rw-r--r--ext2ed/doc/user-guide.sgml2258
-rw-r--r--ext2ed/ext2.descriptors976
-rw-r--r--ext2ed/ext2_com.c98
-rw-r--r--ext2ed/ext2ed.8.in72
-rw-r--r--ext2ed/ext2ed.conf.in79
-rw-r--r--ext2ed/ext2ed.h435
-rw-r--r--ext2ed/file_com.c565
-rw-r--r--ext2ed/general_com.c907
-rw-r--r--ext2ed/group_com.c183
-rw-r--r--ext2ed/init.c633
-rw-r--r--ext2ed/inode_com.c437
-rw-r--r--ext2ed/inodebitmap_com.c215
-rw-r--r--ext2ed/main.c548
-rw-r--r--ext2ed/super_com.c156
-rw-r--r--ext2ed/win.c232
-rw-r--r--include/mingw/arpa/inet.h5
-rw-r--r--include/mingw/grp.h16
-rw-r--r--include/mingw/linux/types.h30
-rw-r--r--include/mingw/pwd.h20
-rw-r--r--include/mingw/sys/stat.h20
-rw-r--r--include/mingw/sys/sysmacros.h5
-rw-r--r--include/mingw/sys/types.h9
-rw-r--r--include/mingw/unistd.h54
-rw-r--r--include/nonunix/asm/types.h1
-rw-r--r--include/nonunix/config.h21
-rw-r--r--include/nonunix/dirent.h0
-rw-r--r--include/nonunix/getopt.h135
-rw-r--r--include/nonunix/grp.h17
-rw-r--r--include/nonunix/linux/types.h33
-rw-r--r--include/nonunix/pwd.h22
-rw-r--r--include/nonunix/sys/file.h0
-rw-r--r--include/nonunix/sys/ioctl.h0
-rw-r--r--include/nonunix/sys/param.h0
-rw-r--r--include/nonunix/sys/resource.h0
-rw-r--r--include/nonunix/sys/socket.h0
-rw-r--r--include/nonunix/sys/time.h1
-rw-r--r--include/nonunix/sys/wait.h0
-rw-r--r--include/nonunix/termios.h0
-rw-r--r--include/nonunix/unistd.h49
-rw-r--r--include/nonunix/utime.h1
-rw-r--r--install-utils/compile_manpages18
-rw-r--r--install-utils/convfstab78
-rw-r--r--install-utils/remove_preformat_manpages21
-rw-r--r--lib/Android.bp45
-rw-r--r--lib/Makefile.bsd-lib47
-rw-r--r--lib/Makefile.checker3
-rw-r--r--lib/Makefile.darwin-lib52
-rw-r--r--lib/Makefile.elf-lib75
-rw-r--r--lib/Makefile.library27
-rw-r--r--lib/Makefile.profile27
-rw-r--r--lib/Makefile.solaris-lib65
-rw-r--r--lib/blkid/Android.bp49
-rw-r--r--lib/blkid/Makefile.in224
-rw-r--r--lib/blkid/blkid.h.in110
-rw-r--r--lib/blkid/blkid.pc.in11
-rw-r--r--lib/blkid/blkidP.h204
-rw-r--r--lib/blkid/blkid_types.h.in167
-rw-r--r--lib/blkid/cache.c209
-rw-r--r--lib/blkid/dev.c254
-rw-r--r--lib/blkid/devname.c561
-rw-r--r--lib/blkid/devno.c242
-rw-r--r--lib/blkid/getsize.c217
-rw-r--r--lib/blkid/libblkid.3.in80
-rw-r--r--lib/blkid/list.h184
-rw-r--r--lib/blkid/llseek.c147
-rw-r--r--lib/blkid/probe.c1841
-rw-r--r--lib/blkid/probe.h852
-rw-r--r--lib/blkid/read.c494
-rw-r--r--lib/blkid/resolve.c140
-rw-r--r--lib/blkid/save.c213
-rw-r--r--lib/blkid/tag.c471
-rw-r--r--lib/blkid/test_probe.in62
-rw-r--r--lib/blkid/tests/cramfs.img.bz2bin0 -> 124 bytes
-rw-r--r--lib/blkid/tests/cramfs.results2
-rw-r--r--lib/blkid/tests/ext2.img.bz2bin0 -> 356 bytes
-rw-r--r--lib/blkid/tests/ext2.results3
-rw-r--r--lib/blkid/tests/ext3.img.bz2bin0 -> 1489 bytes
-rw-r--r--lib/blkid/tests/ext3.results3
-rw-r--r--lib/blkid/tests/fat.img.bz2bin0 -> 249 bytes
-rw-r--r--lib/blkid/tests/fat.results3
-rw-r--r--lib/blkid/tests/fat32_label_64MB.img.bz2bin0 -> 1151 bytes
-rw-r--r--lib/blkid/tests/fat32_label_64MB.results3
-rw-r--r--lib/blkid/tests/iso.img.bz2bin0 -> 336 bytes
-rw-r--r--lib/blkid/tests/iso.results2
-rw-r--r--lib/blkid/tests/jbd.img.bz2bin0 -> 205 bytes
-rw-r--r--lib/blkid/tests/jbd.results2
-rw-r--r--lib/blkid/tests/jfs.img.bz2bin0 -> 3434 bytes
-rw-r--r--lib/blkid/tests/jfs.results3
-rw-r--r--lib/blkid/tests/minix.img.bz2bin0 -> 138 bytes
-rw-r--r--lib/blkid/tests/minix.results1
-rw-r--r--lib/blkid/tests/ocfs2.img.bz2bin0 -> 1002 bytes
-rw-r--r--lib/blkid/tests/ocfs2.results3
-rw-r--r--lib/blkid/tests/reiser3.img.bz2bin0 -> 282 bytes
-rw-r--r--lib/blkid/tests/reiser3.results3
-rw-r--r--lib/blkid/tests/reiser4.img.bz2bin0 -> 366 bytes
-rw-r--r--lib/blkid/tests/reiser4.results3
-rw-r--r--lib/blkid/tests/romfs.img.bz2bin0 -> 105 bytes
-rw-r--r--lib/blkid/tests/romfs.results2
-rw-r--r--lib/blkid/tests/small-fat32.img.bz2bin0 -> 372 bytes
-rw-r--r--lib/blkid/tests/small-fat32.results3
-rw-r--r--lib/blkid/tests/swap0.img.bz2bin0 -> 72 bytes
-rw-r--r--lib/blkid/tests/swap0.results1
-rw-r--r--lib/blkid/tests/swap1.img.bz2bin0 -> 120 bytes
-rw-r--r--lib/blkid/tests/swap1.results3
-rw-r--r--lib/blkid/tests/udf.img.bz2bin0 -> 2031 bytes
-rw-r--r--lib/blkid/tests/udf.results2
-rw-r--r--lib/blkid/tests/xfs.img.bz2bin0 -> 443 bytes
-rw-r--r--lib/blkid/tests/xfs.results3
-rw-r--r--lib/blkid/tests/zfs.img.bz2bin0 -> 10869 bytes
-rw-r--r--lib/blkid/tests/zfs.results1
-rw-r--r--lib/blkid/tst_types.c64
-rw-r--r--lib/blkid/version.c50
-rw-r--r--lib/config.h.in665
-rw-r--r--lib/dirpaths.h.in10
-rw-r--r--lib/e2p/Android.bp58
-rw-r--r--lib/e2p/Makefile.in223
-rw-r--r--lib/e2p/crypto_mode.c74
-rw-r--r--lib/e2p/e2p.h92
-rw-r--r--lib/e2p/e2p.pc.in11
-rw-r--r--lib/e2p/encoding.c118
-rw-r--r--lib/e2p/errcode.c48
-rw-r--r--lib/e2p/feature.c449
-rw-r--r--lib/e2p/fgetflags.c117
-rw-r--r--lib/e2p/fgetproject.c63
-rw-r--r--lib/e2p/fgetversion.c74
-rw-r--r--lib/e2p/fsetflags.c118
-rw-r--r--lib/e2p/fsetproject.c69
-rw-r--r--lib/e2p/fsetversion.c71
-rw-r--r--lib/e2p/getflags.c71
-rw-r--r--lib/e2p/getversion.c41
-rw-r--r--lib/e2p/hashstr.c72
-rw-r--r--lib/e2p/iod.c76
-rw-r--r--lib/e2p/ljs.c134
-rw-r--r--lib/e2p/ls.c494
-rw-r--r--lib/e2p/mntopts.c150
-rw-r--r--lib/e2p/ostype.c79
-rw-r--r--lib/e2p/parse_num.c91
-rw-r--r--lib/e2p/pe.c40
-rw-r--r--lib/e2p/percent.c67
-rw-r--r--lib/e2p/pf.c79
-rw-r--r--lib/e2p/project.h27
-rw-r--r--lib/e2p/ps.c32
-rw-r--r--lib/e2p/setflags.c77
-rw-r--r--lib/e2p/setversion.c40
-rw-r--r--lib/e2p/uuid.c85
-rw-r--r--lib/et/Android.bp40
-rw-r--r--lib/et/Makefile.in185
-rw-r--r--lib/et/com_err.387
-rw-r--r--lib/et/com_err.c105
-rw-r--r--lib/et/com_err.h68
-rw-r--r--lib/et/com_err.pc.in12
-rw-r--r--lib/et/com_err.texinfo532
-rw-r--r--lib/et/com_right.c120
-rw-r--r--lib/et/compile_et.182
-rw-r--r--lib/et/compile_et.sh.in60
-rw-r--r--lib/et/error_message.c355
-rw-r--r--lib/et/error_table.h29
-rw-r--r--lib/et/et_c.awk269
-rw-r--r--lib/et/et_h.awk204
-rw-r--r--lib/et/et_name.c43
-rw-r--r--lib/et/init_et.c53
-rw-r--r--lib/et/internal.h19
-rw-r--r--lib/et/test_cases/continuation.c55
-rw-r--r--lib/et/test_cases/continuation.et8
-rw-r--r--lib/et/test_cases/continuation.h19
-rw-r--r--lib/et/test_cases/heimdal.c136
-rw-r--r--lib/et/test_cases/heimdal.et65
-rw-r--r--lib/et/test_cases/heimdal.h64
-rw-r--r--lib/et/test_cases/heimdal2.c122
-rw-r--r--lib/et/test_cases/heimdal2.et65
-rw-r--r--lib/et/test_cases/heimdal2.h58
-rw-r--r--lib/et/test_cases/heimdal3.c56
-rw-r--r--lib/et/test_cases/heimdal3.et5
-rw-r--r--lib/et/test_cases/heimdal3.h20
-rw-r--r--lib/et/test_cases/imap_err.c115
-rw-r--r--lib/et/test_cases/imap_err.et238
-rw-r--r--lib/et/test_cases/imap_err.h79
-rw-r--r--lib/et/test_cases/simple.c76
-rw-r--r--lib/et/test_cases/simple.et69
-rw-r--r--lib/et/test_cases/simple.h40
-rw-r--r--lib/et/texinfo.tex7226
-rw-r--r--lib/et/vfprintf.c50
-rw-r--r--lib/ext2fs/Android.bp129
-rw-r--r--lib/ext2fs/Makefile.in1459
-rw-r--r--lib/ext2fs/alloc.c554
-rw-r--r--lib/ext2fs/alloc_sb.c81
-rw-r--r--lib/ext2fs/alloc_stats.c165
-rw-r--r--lib/ext2fs/alloc_tables.c278
-rw-r--r--lib/ext2fs/atexit.c116
-rw-r--r--lib/ext2fs/badblocks.c328
-rw-r--r--lib/ext2fs/bb_compat.c64
-rw-r--r--lib/ext2fs/bb_inode.c270
-rw-r--r--lib/ext2fs/bitmaps.c320
-rw-r--r--lib/ext2fs/bitops.c148
-rw-r--r--lib/ext2fs/bitops.h606
-rw-r--r--lib/ext2fs/blkmap64_ba.c492
-rw-r--r--lib/ext2fs/blkmap64_rb.c998
-rw-r--r--lib/ext2fs/blknum.c606
-rw-r--r--lib/ext2fs/block.c659
-rw-r--r--lib/ext2fs/bmap.c499
-rw-r--r--lib/ext2fs/bmap64.h106
-rw-r--r--lib/ext2fs/bmove.c167
-rw-r--r--lib/ext2fs/brel.h86
-rw-r--r--lib/ext2fs/brel_ma.c199
-rw-r--r--lib/ext2fs/check_desc.c104
-rw-r--r--lib/ext2fs/closefs.c521
-rw-r--r--lib/ext2fs/compiler.h26
-rw-r--r--lib/ext2fs/crc16.c74
-rw-r--r--lib/ext2fs/crc16.h26
-rw-r--r--lib/ext2fs/crc32c.c938
-rw-r--r--lib/ext2fs/crc32c_defs.h59
-rw-r--r--lib/ext2fs/csum.c1011
-rw-r--r--lib/ext2fs/dblist.c403
-rw-r--r--lib/ext2fs/dblist_dir.c88
-rw-r--r--lib/ext2fs/digest_encode.c187
-rw-r--r--lib/ext2fs/dir_iterate.c315
-rw-r--r--lib/ext2fs/dirblock.c113
-rw-r--r--lib/ext2fs/dirhash.c307
-rw-r--r--lib/ext2fs/dosio.c459
-rw-r--r--lib/ext2fs/dosio.h157
-rw-r--r--lib/ext2fs/dupfs.c122
-rw-r--r--lib/ext2fs/e2image.h37
-rw-r--r--lib/ext2fs/expanddir.c143
-rw-r--r--lib/ext2fs/ext2_err.et.in560
-rw-r--r--lib/ext2fs/ext2_ext_attr.h84
-rw-r--r--lib/ext2fs/ext2_fs.h1201
-rw-r--r--lib/ext2fs/ext2_io.h179
-rw-r--r--lib/ext2fs/ext2_types.h.in196
-rw-r--r--lib/ext2fs/ext2fs.h2224
-rw-r--r--lib/ext2fs/ext2fs.pc.in11
-rw-r--r--lib/ext2fs/ext2fsP.h210
-rw-r--r--lib/ext2fs/ext3_extents.h127
-rw-r--r--lib/ext2fs/ext4_acl.h62
-rw-r--r--lib/ext2fs/ext_attr.c1784
-rw-r--r--lib/ext2fs/extent.c1877
-rw-r--r--lib/ext2fs/fallocate.c873
-rw-r--r--lib/ext2fs/fast_commit.h190
-rw-r--r--lib/ext2fs/fiemap.h93
-rw-r--r--lib/ext2fs/fileio.c666
-rw-r--r--lib/ext2fs/finddev.c218
-rw-r--r--lib/ext2fs/flushb.c88
-rw-r--r--lib/ext2fs/freefs.c108
-rw-r--r--lib/ext2fs/gen_bitmap.c650
-rw-r--r--lib/ext2fs/gen_bitmap64.c981
-rw-r--r--lib/ext2fs/gen_crc32ctable.c117
-rw-r--r--lib/ext2fs/get_num_dirs.c50
-rw-r--r--lib/ext2fs/get_pathname.c171
-rw-r--r--lib/ext2fs/getsectsize.c151
-rw-r--r--lib/ext2fs/getsize.c324
-rw-r--r--lib/ext2fs/hashmap.c109
-rw-r--r--lib/ext2fs/hashmap.h42
-rw-r--r--lib/ext2fs/i_block.c90
-rw-r--r--lib/ext2fs/icount.c921
-rw-r--r--lib/ext2fs/imager.c470
-rw-r--r--lib/ext2fs/ind_block.c67
-rw-r--r--lib/ext2fs/initialize.c671
-rw-r--r--lib/ext2fs/inline.c118
-rw-r--r--lib/ext2fs/inline_data.c842
-rw-r--r--lib/ext2fs/inode.c1122
-rw-r--r--lib/ext2fs/inode_io.c290
-rw-r--r--lib/ext2fs/io_manager.c152
-rw-r--r--lib/ext2fs/irel.h114
-rw-r--r--lib/ext2fs/irel_ma.c377
-rw-r--r--lib/ext2fs/ismounted.c478
-rw-r--r--lib/ext2fs/jfs_compat.h113
-rw-r--r--lib/ext2fs/kernel-jbd.h456
-rw-r--r--lib/ext2fs/kernel-list.h111
-rw-r--r--lib/ext2fs/link.c646
-rw-r--r--lib/ext2fs/llseek.c145
-rw-r--r--lib/ext2fs/lookup.c70
-rw-r--r--lib/ext2fs/mkdir.c200
-rw-r--r--lib/ext2fs/mkjournal.c654
-rw-r--r--lib/ext2fs/mmp.c488
-rw-r--r--lib/ext2fs/namei.c227
-rw-r--r--lib/ext2fs/native.c28
-rw-r--r--lib/ext2fs/newdir.c126
-rw-r--r--lib/ext2fs/nls_utf8.c1000
-rw-r--r--lib/ext2fs/nt_io.c1494
-rw-r--r--lib/ext2fs/openfs.c590
-rw-r--r--lib/ext2fs/orphan.c273
-rw-r--r--lib/ext2fs/progress.c103
-rw-r--r--lib/ext2fs/punch.c513
-rw-r--r--lib/ext2fs/qcow2.c272
-rw-r--r--lib/ext2fs/qcow2.h114
-rw-r--r--lib/ext2fs/rbtree.c383
-rw-r--r--lib/ext2fs/rbtree.h183
-rw-r--r--lib/ext2fs/read_bb.c102
-rw-r--r--lib/ext2fs/read_bb_file.c109
-rw-r--r--lib/ext2fs/res_gdt.c239
-rw-r--r--lib/ext2fs/rw_bitmaps.c682
-rw-r--r--lib/ext2fs/sha256.c254
-rw-r--r--lib/ext2fs/sha512.c302
-rw-r--r--lib/ext2fs/sparse_io.c554
-rw-r--r--lib/ext2fs/swapfs.c491
-rw-r--r--lib/ext2fs/symlink.c212
-rw-r--r--lib/ext2fs/tdb.c4174
-rw-r--r--lib/ext2fs/tdb.h215
-rwxr-xr-xlib/ext2fs/tdb/build-tdb34
-rw-r--r--lib/ext2fs/tdb/patches/copyright20
-rw-r--r--lib/ext2fs/tdb/patches/ext2tdb-rename65
-rw-r--r--lib/ext2fs/tdb/patches/replace-includes92
-rw-r--r--lib/ext2fs/tdb/patches/series6
-rw-r--r--lib/ext2fs/tdb/patches/static-functions13
-rw-r--r--lib/ext2fs/tdb/patches/static-prototypes72
-rw-r--r--lib/ext2fs/tdb/patches/tdbtool-includes30
-rw-r--r--lib/ext2fs/tdbtool.c621
-rw-r--r--lib/ext2fs/test_io.c557
-rw-r--r--lib/ext2fs/tst_badblocks.c369
-rw-r--r--lib/ext2fs/tst_bitmaps.c732
-rw-r--r--lib/ext2fs/tst_bitmaps_cmd.ct51
-rw-r--r--lib/ext2fs/tst_bitmaps_cmds150
-rw-r--r--lib/ext2fs/tst_bitmaps_exp313
-rw-r--r--lib/ext2fs/tst_bitops.c288
-rw-r--r--lib/ext2fs/tst_byteswap.c93
-rw-r--r--lib/ext2fs/tst_cmds.ct6
-rw-r--r--lib/ext2fs/tst_fs_struct.c81
-rw-r--r--lib/ext2fs/tst_getsectsize.c63
-rw-r--r--lib/ext2fs/tst_getsize.c47
-rw-r--r--lib/ext2fs/tst_inode_size.c89
-rw-r--r--lib/ext2fs/tst_iscan.c227
-rw-r--r--lib/ext2fs/tst_libext2fs.c72
-rw-r--r--lib/ext2fs/tst_super_size.c161
-rw-r--r--lib/ext2fs/tst_types.c64
-rw-r--r--lib/ext2fs/undo_io.c1108
-rw-r--r--lib/ext2fs/unix_io.c1510
-rw-r--r--lib/ext2fs/unlink.c100
-rw-r--r--lib/ext2fs/utf8data.h4109
-rw-r--r--lib/ext2fs/utf8n.h120
-rw-r--r--lib/ext2fs/valid_blk.c68
-rw-r--r--lib/ext2fs/version.c57
-rw-r--r--lib/ext2fs/windows_io.c1031
-rw-r--r--lib/ext2fs/write_bb_file.c35
-rw-r--r--lib/fpopen.c116
-rw-r--r--lib/ss/Android.bp39
-rw-r--r--lib/ss/Makefile.in234
-rw-r--r--lib/ss/ct_c.awk75
-rw-r--r--lib/ss/ct_c.sed160
-rw-r--r--lib/ss/data.c20
-rw-r--r--lib/ss/error.c77
-rw-r--r--lib/ss/execute_cmd.c229
-rw-r--r--lib/ss/get_readline.c100
-rw-r--r--lib/ss/help.c185
-rw-r--r--lib/ss/invocation.c132
-rw-r--r--lib/ss/list_rqs.c92
-rw-r--r--lib/ss/listen.c200
-rw-r--r--lib/ss/mit-sipb-copyright.h19
-rw-r--r--lib/ss/mk_cmds.159
-rw-r--r--lib/ss/mk_cmds.sh.in56
-rw-r--r--lib/ss/pager.c152
-rw-r--r--lib/ss/parse.c158
-rw-r--r--lib/ss/prompt.c31
-rw-r--r--lib/ss/request_tbl.c68
-rw-r--r--lib/ss/requests.c66
-rw-r--r--lib/ss/ss.h96
-rw-r--r--lib/ss/ss.pc.in12
-rw-r--r--lib/ss/ss_err.et39
-rw-r--r--lib/ss/ss_internal.h107
-rw-r--r--lib/ss/std_rqs.ct46
-rw-r--r--lib/ss/test_cmd.ct6
-rw-r--r--lib/ss/test_script8
-rw-r--r--lib/ss/test_script_expected22
-rw-r--r--lib/ss/test_ss.c151
-rw-r--r--lib/support/Android.bp78
-rw-r--r--lib/support/Makefile.in184
-rw-r--r--lib/support/argv_parse.c168
-rw-r--r--lib/support/argv_parse.h43
-rw-r--r--lib/support/common.h36
-rw-r--r--lib/support/cstring.c162
-rw-r--r--lib/support/cstring.h6
-rw-r--r--lib/support/devname.c65
-rw-r--r--lib/support/devname.h19
-rw-r--r--lib/support/dict.c1542
-rw-r--r--lib/support/dict.h147
-rw-r--r--lib/support/dqblk_v2.h31
-rw-r--r--lib/support/mkquota.c707
-rw-r--r--lib/support/nls-enable.h21
-rw-r--r--lib/support/parse_qtype.c90
-rw-r--r--lib/support/plausible.c287
-rw-r--r--lib/support/plausible.h29
-rw-r--r--lib/support/print_fs_flags.c75
-rw-r--r--lib/support/print_fs_flags.h5
-rw-r--r--lib/support/prof_err.et66
-rw-r--r--lib/support/profile.c1910
-rw-r--r--lib/support/profile.h107
-rw-r--r--lib/support/profile_helpers.c317
-rw-r--r--lib/support/profile_helpers.h28
-rw-r--r--lib/support/quotaio.c412
-rw-r--r--lib/support/quotaio.h268
-rw-r--r--lib/support/quotaio_tree.c687
-rw-r--r--lib/support/quotaio_tree.h64
-rw-r--r--lib/support/quotaio_v2.c389
-rw-r--r--lib/support/quotaio_v2.h69
-rw-r--r--lib/support/sort_r.h325
-rw-r--r--lib/uuid/Android.bp54
-rw-r--r--lib/uuid/COPYING25
-rw-r--r--lib/uuid/Makefile.in216
-rw-r--r--lib/uuid/clear.c44
-rw-r--r--lib/uuid/compare.c56
-rw-r--r--lib/uuid/configure.in10
-rw-r--r--lib/uuid/copy.c46
-rw-r--r--lib/uuid/gen_uuid.c682
-rw-r--r--lib/uuid/gen_uuid_nt.c93
-rw-r--r--lib/uuid/isnull.c49
-rw-r--r--lib/uuid/pack.c70
-rw-r--r--lib/uuid/parse.c80
-rw-r--r--lib/uuid/tst_uuid.c194
-rw-r--r--lib/uuid/unpack.c64
-rw-r--r--lib/uuid/unparse.c77
-rw-r--r--lib/uuid/uuid.3.in66
-rw-r--r--lib/uuid/uuid.h.in103
-rw-r--r--lib/uuid/uuid.pc.in11
-rw-r--r--lib/uuid/uuidP.h71
-rw-r--r--lib/uuid/uuid_clear.3.in60
-rw-r--r--lib/uuid/uuid_compare.3.in66
-rw-r--r--lib/uuid/uuid_copy.3.in62
-rw-r--r--lib/uuid/uuid_generate.3.in104
-rw-r--r--lib/uuid/uuid_is_null.3.in62
-rw-r--r--lib/uuid/uuid_parse.3.in71
-rw-r--r--lib/uuid/uuid_time.3.in74
-rw-r--r--lib/uuid/uuid_time.c167
-rw-r--r--lib/uuid/uuid_types.h.in50
-rw-r--r--lib/uuid/uuid_unparse.3.in79
-rw-r--r--lib/uuid/uuidd.h54
-rw-r--r--misc/Android.bp355
-rw-r--r--misc/Makefile.in922
-rw-r--r--misc/badblocks.8.in234
-rw-r--r--misc/badblocks.c1379
-rw-r--r--misc/base_device.c171
-rw-r--r--misc/base_device.tst16
-rw-r--r--misc/blkid.8.in164
-rw-r--r--misc/blkid.c433
-rw-r--r--misc/chattr.1.in299
-rw-r--r--misc/chattr.c359
-rw-r--r--misc/check_fuzzer.c61
-rw-r--r--misc/create_inode.c1092
-rw-r--r--misc/create_inode.h57
-rw-r--r--misc/dumpe2fs.8.in115
-rw-r--r--misc/dumpe2fs.c780
-rw-r--r--misc/e2freefrag.8.in96
-rw-r--r--misc/e2freefrag.c452
-rw-r--r--misc/e2freefrag.h20
-rw-r--r--misc/e2fuzz.c372
-rwxr-xr-xmisc/e2fuzz.sh327
-rw-r--r--misc/e2image.8.in335
-rw-r--r--misc/e2image.c1745
-rw-r--r--misc/e2initrd_helper.c398
-rw-r--r--misc/e2label.8.in58
-rw-r--r--misc/e2label.c121
-rw-r--r--misc/e2mmpstatus.8.in59
-rw-r--r--misc/e2undo.8.in84
-rw-r--r--misc/e2undo.c658
-rw-r--r--misc/e4crypt.8.in74
-rw-r--r--misc/e4crypt.c893
-rw-r--r--misc/e4defrag.8.in90
-rw-r--r--misc/e4defrag.c2035
-rw-r--r--misc/ext4.5.in815
-rw-r--r--misc/filefrag.8.in77
-rw-r--r--misc/filefrag.c695
-rw-r--r--misc/findfs.8.in33
-rw-r--r--misc/findsuper.c269
-rw-r--r--misc/fsck.8.in414
-rw-r--r--misc/fsck.c1353
-rw-r--r--misc/fsck.h73
-rw-r--r--misc/fsmap.h89
-rw-r--r--misc/fuse2fs.1.in79
-rw-r--r--misc/fuse2fs.c4009
-rw-r--r--misc/ismounted.c218
-rw-r--r--misc/logsave.8.in61
-rw-r--r--misc/logsave.c334
-rw-r--r--misc/lsattr.1.in52
-rw-r--r--misc/lsattr.c234
-rw-r--r--misc/mk_hugefiles.c491
-rw-r--r--misc/mke2fs-hurd.conf42
-rw-r--r--misc/mke2fs.8.in891
-rw-r--r--misc/mke2fs.c3592
-rw-r--r--misc/mke2fs.conf.5.in566
-rw-r--r--misc/mke2fs.conf.in45
-rw-r--r--misc/mke2fs.h30
-rw-r--r--misc/mklost+found.8.in43
-rw-r--r--misc/mklost+found.c87
-rw-r--r--misc/partinfo.c80
-rw-r--r--misc/profile-to-c.awk13
-rw-r--r--misc/tune2fs.8.in849
-rw-r--r--misc/tune2fs.c3769
-rw-r--r--misc/tune2fs.h26
-rw-r--r--misc/util.c330
-rw-r--r--misc/util.h29
-rw-r--r--misc/uuidd.8.in97
-rw-r--r--misc/uuidd.c600
-rw-r--r--misc/uuidd.rc55
-rw-r--r--misc/uuidgen.1.in63
-rw-r--r--misc/uuidgen.c80
-rw-r--r--po/LINGUAS1
-rw-r--r--po/Makefile.in.in493
-rw-r--r--po/Makevars71
-rw-r--r--po/POTFILES.in71
-rw-r--r--po/Rules-quot58
-rw-r--r--po/at-expand.pl158
-rw-r--r--po/boldquot.sed10
-rw-r--r--po/ca.gmobin0 -> 140005 bytes
-rw-r--r--po/ca.po8872
-rw-r--r--po/cs.gmobin0 -> 183759 bytes
-rw-r--r--po/cs.po9133
-rw-r--r--po/da.gmobin0 -> 141662 bytes
-rw-r--r--po/da.po8287
-rw-r--r--po/de.gmobin0 -> 176656 bytes
-rw-r--r--po/de.po9029
-rw-r--r--po/e2fsprogs.pot8378
-rw-r--r--po/en@boldquot.header25
-rw-r--r--po/en@quot.header22
-rw-r--r--po/eo.gmobin0 -> 88457 bytes
-rw-r--r--po/eo.po8254
-rw-r--r--po/es.gmobin0 -> 189231 bytes
-rw-r--r--po/es.po9009
-rw-r--r--po/fi.gmobin0 -> 21505 bytes
-rw-r--r--po/fi.po8034
-rw-r--r--po/fr.gmobin0 -> 184966 bytes
-rw-r--r--po/fr.po8633
-rw-r--r--po/fur.gmobin0 -> 38250 bytes
-rw-r--r--po/fur.po8003
-rw-r--r--po/hu.gmobin0 -> 175960 bytes
-rw-r--r--po/hu.po8663
-rw-r--r--po/id.gmobin0 -> 80548 bytes
-rw-r--r--po/id.po8687
-rw-r--r--po/insert-header.sin23
-rw-r--r--po/it.gmobin0 -> 56323 bytes
-rw-r--r--po/it.po8589
-rw-r--r--po/ms.gmobin0 -> 32218 bytes
-rw-r--r--po/ms.po8545
-rw-r--r--po/nl.gmobin0 -> 176854 bytes
-rw-r--r--po/nl.po8964
-rw-r--r--po/pl.gmobin0 -> 180438 bytes
-rw-r--r--po/pl.po8579
-rw-r--r--po/pt.gmobin0 -> 179065 bytes
-rw-r--r--po/pt.po8563
-rw-r--r--po/quot.sed6
-rw-r--r--po/remove-potcdate.sin19
-rw-r--r--po/sr.gmobin0 -> 245025 bytes
-rw-r--r--po/sr.po8771
-rw-r--r--po/sv.gmobin0 -> 175700 bytes
-rw-r--r--po/sv.po8585
-rw-r--r--po/tr.gmobin0 -> 69878 bytes
-rw-r--r--po/tr.po9057
-rw-r--r--po/uk.gmobin0 -> 243338 bytes
-rw-r--r--po/uk.po8796
-rw-r--r--po/vi.gmobin0 -> 189306 bytes
-rw-r--r--po/vi.po8594
-rw-r--r--po/zh_CN.gmobin0 -> 168153 bytes
-rw-r--r--po/zh_CN.po8784
-rw-r--r--resize/Android.bp58
-rw-r--r--resize/Makefile.in170
-rw-r--r--resize/extent.c244
-rw-r--r--resize/main.c706
-rw-r--r--resize/online.c293
-rw-r--r--resize/resize2fs.8.in181
-rw-r--r--resize/resize2fs.c3235
-rw-r--r--resize/resize2fs.h190
-rw-r--r--resize/resource_track.c135
-rw-r--r--resize/sim_progress.c118
-rwxr-xr-xresize/test-resize27
-rw-r--r--resize/test_extent.c129
-rw-r--r--resize/test_extent.in64
-rw-r--r--scrub/Makefile.in188
-rw-r--r--scrub/e2scrub.8.in69
-rw-r--r--scrub/e2scrub.conf.in25
-rw-r--r--scrub/e2scrub.in283
-rw-r--r--scrub/e2scrub.rules.in2
-rw-r--r--scrub/e2scrub@.service.in20
-rw-r--r--scrub/e2scrub_all.8.in47
-rw-r--r--scrub/e2scrub_all.cron.in2
-rw-r--r--scrub/e2scrub_all.in185
-rw-r--r--scrub/e2scrub_all.service.in12
-rw-r--r--scrub/e2scrub_all.timer.in11
-rw-r--r--scrub/e2scrub_all_cron.in69
-rw-r--r--scrub/e2scrub_fail.in38
-rw-r--r--scrub/e2scrub_fail@.service.in10
-rw-r--r--scrub/e2scrub_reap.service.in25
-rw-r--r--tests/Makefile.in107
-rw-r--r--tests/README68
-rw-r--r--tests/d_bad_ostype/expect1
-rw-r--r--tests/d_bad_ostype/name1
-rw-r--r--tests/d_bad_ostype/script21
-rw-r--r--tests/d_corrupt_journal_nr_users/expect101
-rw-r--r--tests/d_corrupt_journal_nr_users/image.gzbin0 -> 8788 bytes
-rw-r--r--tests/d_corrupt_journal_nr_users/name1
-rw-r--r--tests/d_corrupt_journal_nr_users/script25
-rw-r--r--tests/d_dumpe2fs_group_only/expect51
-rw-r--r--tests/d_dumpe2fs_group_only/name1
-rw-r--r--tests/d_dumpe2fs_group_only/script44
-rw-r--r--tests/d_fallocate/expect.gzbin0 -> 3770 bytes
-rw-r--r--tests/d_fallocate/name1
-rw-r--r--tests/d_fallocate/script166
-rw-r--r--tests/d_fallocate_bigalloc/expect.gzbin0 -> 2696 bytes
-rw-r--r--tests/d_fallocate_bigalloc/name1
-rw-r--r--tests/d_fallocate_bigalloc/script168
-rw-r--r--tests/d_fallocate_blkmap/expect58
-rw-r--r--tests/d_fallocate_blkmap/name1
-rw-r--r--tests/d_fallocate_blkmap/script75
-rw-r--r--tests/d_inline_dump/expect95
-rw-r--r--tests/d_inline_dump/image.gzbin0 -> 2988 bytes
-rw-r--r--tests/d_inline_dump/name1
-rw-r--r--tests/d_inline_dump/script43
-rw-r--r--tests/d_loaddump/expect18
-rw-r--r--tests/d_loaddump/name1
-rw-r--r--tests/d_loaddump/script67
-rw-r--r--tests/d_punch/expect176
-rw-r--r--tests/d_punch/name1
-rw-r--r--tests/d_punch/script120
-rw-r--r--tests/d_punch_bigalloc/expect171
-rw-r--r--tests/d_punch_bigalloc/name1
-rw-r--r--tests/d_punch_bigalloc/script121
-rw-r--r--tests/d_special_files/expect91
-rw-r--r--tests/d_special_files/name1
-rw-r--r--tests/d_special_files/script87
-rw-r--r--tests/d_xattr_edits/expect55
-rw-r--r--tests/d_xattr_edits/name1
-rw-r--r--tests/d_xattr_edits/script124
-rw-r--r--tests/d_xattr_sorting/expect34
-rw-r--r--tests/d_xattr_sorting/name1
-rw-r--r--tests/d_xattr_sorting/script87
-rw-r--r--tests/defaults/e_script47
-rw-r--r--tests/defaults/f_script1
-rw-r--r--tests/defaults/j_script1
-rw-r--r--tests/e_brel_bma/name1
-rw-r--r--tests/e_brel_bma/script1
-rw-r--r--tests/e_icount_normal/name1
-rw-r--r--tests/e_icount_opt/name1
-rw-r--r--tests/e_irel_ima/name1
-rw-r--r--tests/e_irel_ima/script1
-rw-r--r--tests/f_16384_block/expect.17
-rw-r--r--tests/f_16384_block/expect.27
-rw-r--r--tests/f_16384_block/image.gzbin0 -> 9992 bytes
-rw-r--r--tests/f_16384_block/name1
-rw-r--r--tests/f_8192_block/expect.17
-rw-r--r--tests/f_8192_block/expect.27
-rw-r--r--tests/f_8192_block/image.gzbin0 -> 9992 bytes
-rw-r--r--tests/f_8192_block/name1
-rw-r--r--tests/f_bad_bbitmap/expect.115
-rw-r--r--tests/f_bad_bbitmap/expect.27
-rw-r--r--tests/f_bad_bbitmap/image.gzbin0 -> 2546 bytes
-rw-r--r--tests/f_bad_bbitmap/name1
-rw-r--r--tests/f_bad_bmap_csum/expect.116
-rw-r--r--tests/f_bad_bmap_csum/expect.27
-rw-r--r--tests/f_bad_bmap_csum/image.gzbin0 -> 2546 bytes
-rw-r--r--tests/f_bad_bmap_csum/name1
-rw-r--r--tests/f_bad_disconnected_inode/expect.149
-rw-r--r--tests/f_bad_disconnected_inode/expect.27
-rw-r--r--tests/f_bad_disconnected_inode/image.gzbin0 -> 1490 bytes
-rw-r--r--tests/f_bad_disconnected_inode/name1
-rw-r--r--tests/f_bad_encryption/expect.1125
-rw-r--r--tests/f_bad_encryption/expect.27
-rw-r--r--tests/f_bad_encryption/image.gzbin0 -> 2265 bytes
-rwxr-xr-xtests/f_bad_encryption/mkimage.sh169
-rw-r--r--tests/f_bad_encryption/name1
-rw-r--r--tests/f_bad_fname/expect.122
-rw-r--r--tests/f_bad_fname/expect.27
-rw-r--r--tests/f_bad_fname/image.gzbin0 -> 802 bytes
-rw-r--r--tests/f_bad_fname/name1
-rw-r--r--tests/f_bad_gdt_csum/expect.110
-rw-r--r--tests/f_bad_gdt_csum/expect.27
-rw-r--r--tests/f_bad_gdt_csum/image.gzbin0 -> 2548 bytes
-rw-r--r--tests/f_bad_gdt_csum/name1
-rw-r--r--tests/f_bad_ibitmap/expect.115
-rw-r--r--tests/f_bad_ibitmap/expect.27
-rw-r--r--tests/f_bad_ibitmap/image.gzbin0 -> 2548 bytes
-rw-r--r--tests/f_bad_ibitmap/name1
-rw-r--r--tests/f_bad_inode_csum/expect.1126
-rw-r--r--tests/f_bad_inode_csum/expect.27
-rw-r--r--tests/f_bad_inode_csum/image.gzbin0 -> 4613 bytes
-rw-r--r--tests/f_bad_inode_csum/name1
-rw-r--r--tests/f_bad_local_jnl/expect.114
-rw-r--r--tests/f_bad_local_jnl/expect.27
-rw-r--r--tests/f_bad_local_jnl/imagebin0 -> 8388608 bytes
-rw-r--r--tests/f_bad_local_jnl/image.gzbin0 -> 10433 bytes
-rw-r--r--tests/f_bad_local_jnl/name1
-rw-r--r--tests/f_badbblocks/expect.128
-rw-r--r--tests/f_badbblocks/expect.27
-rw-r--r--tests/f_badbblocks/image.gzbin0 -> 376 bytes
-rw-r--r--tests/f_badbblocks/name1
-rw-r--r--tests/f_badcluster/expect194
-rw-r--r--tests/f_badcluster/image.gzbin0 -> 3149 bytes
-rw-r--r--tests/f_badcluster/name1
-rw-r--r--tests/f_badcluster/script29
-rw-r--r--tests/f_baddir/expect.154
-rw-r--r--tests/f_baddir/expect.27
-rw-r--r--tests/f_baddir/image.gzbin0 -> 14241 bytes
-rw-r--r--tests/f_baddir/name1
-rw-r--r--tests/f_baddir2/expect.112
-rw-r--r--tests/f_baddir2/expect.27
-rw-r--r--tests/f_baddir2/image.gzbin0 -> 587 bytes
-rw-r--r--tests/f_baddir2/name1
-rw-r--r--tests/f_baddotdir/expect.162
-rw-r--r--tests/f_baddotdir/expect.27
-rw-r--r--tests/f_baddotdir/image.gzbin0 -> 592 bytes
-rw-r--r--tests/f_baddotdir/name1
-rw-r--r--tests/f_badinode/expect.140
-rw-r--r--tests/f_badinode/expect.27
-rw-r--r--tests/f_badinode/image.gzbin0 -> 1155 bytes
-rw-r--r--tests/f_badinode/name1
-rw-r--r--tests/f_badjour_encrypted/expect.130
-rw-r--r--tests/f_badjour_encrypted/expect.27
-rw-r--r--tests/f_badjour_encrypted/name1
-rw-r--r--tests/f_badjour_encrypted/script11
-rw-r--r--tests/f_badjour_indblks/expect.132
-rw-r--r--tests/f_badjour_indblks/expect.27
-rw-r--r--tests/f_badjour_indblks/image.gzbin0 -> 10569 bytes
-rw-r--r--tests/f_badjour_indblks/name1
-rw-r--r--tests/f_badjourblks/expect.130
-rw-r--r--tests/f_badjourblks/expect.27
-rw-r--r--tests/f_badjourblks/image.gzbin0 -> 10481 bytes
-rw-r--r--tests/f_badjourblks/name1
-rw-r--r--tests/f_badorphan/expect.177
-rw-r--r--tests/f_badorphan/expect.27
-rw-r--r--tests/f_badorphan/image.gzbin0 -> 78820 bytes
-rw-r--r--tests/f_badorphan/name1
-rw-r--r--tests/f_badprimary/expect.127
-rw-r--r--tests/f_badprimary/expect.27
-rw-r--r--tests/f_badprimary/image.gzbin0 -> 374 bytes
-rw-r--r--tests/f_badprimary/name1
-rw-r--r--tests/f_badroot/expect.129
-rw-r--r--tests/f_badroot/expect.27
-rw-r--r--tests/f_badroot/image.gzbin0 -> 479 bytes
-rw-r--r--tests/f_badroot/name1
-rw-r--r--tests/f_badsymlinks/expect.161
-rw-r--r--tests/f_badsymlinks/expect.27
-rw-r--r--tests/f_badsymlinks/image.gzbin0 -> 1767 bytes
-rw-r--r--tests/f_badsymlinks/name1
-rw-r--r--tests/f_badsymlinks2/expect.1114
-rw-r--r--tests/f_badsymlinks2/expect.27
-rw-r--r--tests/f_badsymlinks2/image.gzbin0 -> 14302 bytes
-rwxr-xr-xtests/f_badsymlinks2/mkimage.sh127
-rw-r--r--tests/f_badsymlinks2/name1
-rw-r--r--tests/f_badtable/expect.145
-rw-r--r--tests/f_badtable/expect.27
-rw-r--r--tests/f_badtable/image.gzbin0 -> 987 bytes
-rw-r--r--tests/f_badtable/name1
-rw-r--r--tests/f_bb_in_bb/expect.119
-rw-r--r--tests/f_bb_in_bb/expect.27
-rw-r--r--tests/f_bb_in_bb/image.gzbin0 -> 2414 bytes
-rw-r--r--tests/f_bb_in_bb/name1
-rw-r--r--tests/f_bbfile/expect.148
-rw-r--r--tests/f_bbfile/expect.27
-rw-r--r--tests/f_bbfile/image.gzbin0 -> 5195 bytes
-rw-r--r--tests/f_bbfile/name1
-rw-r--r--tests/f_bbinode/expect.151
-rw-r--r--tests/f_bbinode/expect.27
-rw-r--r--tests/f_bbinode/image.gzbin0 -> 2637 bytes
-rw-r--r--tests/f_bbinode/name1
-rw-r--r--tests/f_big_sparse/expect.111
-rw-r--r--tests/f_big_sparse/expect.27
-rw-r--r--tests/f_big_sparse/image.gzbin0 -> 801 bytes
-rw-r--r--tests/f_big_sparse/name1
-rw-r--r--tests/f_bigalloc_badinode/expect.112
-rw-r--r--tests/f_bigalloc_badinode/expect.27
-rw-r--r--tests/f_bigalloc_badinode/name1
-rw-r--r--tests/f_bigalloc_badinode/script23
-rw-r--r--tests/f_bigalloc_orphan_list/expect.110
-rw-r--r--tests/f_bigalloc_orphan_list/expect.27
-rw-r--r--tests/f_bigalloc_orphan_list/name1
-rw-r--r--tests/f_bigalloc_orphan_list/script28
-rw-r--r--tests/f_bigalloc_symlink_with_xattr/expect.17
-rw-r--r--tests/f_bigalloc_symlink_with_xattr/image.gzbin0 -> 663 bytes
-rw-r--r--tests/f_bigalloc_symlink_with_xattr/name1
-rw-r--r--tests/f_bigalloc_symlink_with_xattr/script2
-rw-r--r--tests/f_bitmaps/expect.119
-rw-r--r--tests/f_bitmaps/expect.27
-rw-r--r--tests/f_bitmaps/image.gzbin0 -> 687 bytes
-rw-r--r--tests/f_bitmaps/name1
-rw-r--r--tests/f_boundscheck/expect.125
-rw-r--r--tests/f_boundscheck/expect.225
-rw-r--r--tests/f_boundscheck/image.bz2bin0 -> 986 bytes
-rw-r--r--tests/f_boundscheck/name1
-rwxr-xr-xtests/f_boundscheck/script31
-rw-r--r--tests/f_clear_xattr/expect.138
-rw-r--r--tests/f_clear_xattr/expect.27
-rw-r--r--tests/f_clear_xattr/image.gzbin0 -> 1082 bytes
-rw-r--r--tests/f_clear_xattr/name1
-rw-r--r--tests/f_cloneblock_alloc_error/expect.136
-rw-r--r--tests/f_cloneblock_alloc_error/expect.27
-rw-r--r--tests/f_cloneblock_alloc_error/image.gzbin0 -> 3441 bytes
-rw-r--r--tests/f_cloneblock_alloc_error/name1
-rw-r--r--tests/f_collapse_extent_tree/expect.116
-rw-r--r--tests/f_collapse_extent_tree/expect.210
-rw-r--r--tests/f_collapse_extent_tree/image.gzbin0 -> 2537 bytes
-rw-r--r--tests/f_collapse_extent_tree/name1
-rw-r--r--tests/f_collapse_extent_tree/script115
-rw-r--r--tests/f_compress_extent_tree_level/expect.123
-rw-r--r--tests/f_compress_extent_tree_level/expect.217
-rw-r--r--tests/f_compress_extent_tree_level/image.gzbin0 -> 2581 bytes
-rw-r--r--tests/f_compress_extent_tree_level/name1
-rw-r--r--tests/f_compress_extent_tree_level/script117
-rw-r--r--tests/f_convert_bmap/expect.126
-rw-r--r--tests/f_convert_bmap/expect.210
-rw-r--r--tests/f_convert_bmap/image.gzbin0 -> 3548 bytes
-rw-r--r--tests/f_convert_bmap/name1
-rw-r--r--tests/f_convert_bmap/script115
-rw-r--r--tests/f_convert_bmap_and_extent/expect.133
-rw-r--r--tests/f_convert_bmap_and_extent/expect.216
-rw-r--r--tests/f_convert_bmap_and_extent/image.gzbin0 -> 3657 bytes
-rw-r--r--tests/f_convert_bmap_and_extent/name1
-rw-r--r--tests/f_convert_bmap_and_extent/script117
-rw-r--r--tests/f_convert_bmap_sparse/expect.124
-rw-r--r--tests/f_convert_bmap_sparse/expect.212
-rw-r--r--tests/f_convert_bmap_sparse/image.gzbin0 -> 5585 bytes
-rw-r--r--tests/f_convert_bmap_sparse/name1
-rw-r--r--tests/f_convert_bmap_sparse/script115
-rw-r--r--tests/f_corrupt_dirent_tail/expect.116
-rw-r--r--tests/f_corrupt_dirent_tail/expect.27
-rw-r--r--tests/f_corrupt_dirent_tail/image.gzbin0 -> 2685 bytes
-rw-r--r--tests/f_corrupt_dirent_tail/name1
-rw-r--r--tests/f_crashdisk/expect.117
-rw-r--r--tests/f_crashdisk/image.gzbin0 -> 1044 bytes
-rw-r--r--tests/f_crashdisk/name1
-rw-r--r--tests/f_crashdisk/script2
-rw-r--r--tests/f_create_symlinks/expect81
-rw-r--r--tests/f_create_symlinks/name1
-rw-r--r--tests/f_create_symlinks/script54
-rw-r--r--tests/f_del_dup_quota/expect.139
-rw-r--r--tests/f_del_dup_quota/expect.27
-rw-r--r--tests/f_del_dup_quota/image.bz2bin0 -> 1472 bytes
-rw-r--r--tests/f_del_dup_quota/name1
-rw-r--r--tests/f_del_dup_quota/script34
-rw-r--r--tests/f_deleted_inode_bad_csum/expect.111
-rw-r--r--tests/f_deleted_inode_bad_csum/expect.27
-rw-r--r--tests/f_deleted_inode_bad_csum/image.gzbin0 -> 2676 bytes
-rw-r--r--tests/f_deleted_inode_bad_csum/name1
-rw-r--r--tests/f_desc_size_128/expect.17
-rw-r--r--tests/f_desc_size_128/expect.27
-rw-r--r--tests/f_desc_size_128/image.gzbin0 -> 11547 bytes
-rw-r--r--tests/f_desc_size_128/name1
-rw-r--r--tests/f_desc_size_bad/expect.113
-rw-r--r--tests/f_desc_size_bad/expect.27
-rw-r--r--tests/f_desc_size_bad/script17
-rw-r--r--tests/f_detect_junk/expect22
-rw-r--r--tests/f_detect_junk/expect.nodebugfs21
-rw-r--r--tests/f_detect_junk/image.bz2bin0 -> 2504 bytes
-rw-r--r--tests/f_detect_junk/name1
-rw-r--r--tests/f_detect_junk/script43
-rw-r--r--tests/f_detect_xfs/expect25
-rw-r--r--tests/f_detect_xfs/expect.nodebugfs24
-rw-r--r--tests/f_detect_xfs/image.bz2bin0 -> 450 bytes
-rw-r--r--tests/f_detect_xfs/name1
-rw-r--r--tests/f_detect_xfs/script37
-rw-r--r--tests/f_dir_bad_csum/expect.148
-rw-r--r--tests/f_dir_bad_csum/expect.27
-rw-r--r--tests/f_dir_bad_csum/image.gzbin0 -> 3499 bytes
-rw-r--r--tests/f_dir_bad_csum/name1
-rw-r--r--tests/f_dir_bad_mode/expect.112
-rw-r--r--tests/f_dir_bad_mode/expect.27
-rw-r--r--tests/f_dir_bad_mode/image.gzbin0 -> 592 bytes
-rw-r--r--tests/f_dir_bad_mode/name1
-rw-r--r--tests/f_dirlink/expect.114
-rw-r--r--tests/f_dirlink/expect.27
-rw-r--r--tests/f_dirlink/image.gzbin0 -> 490 bytes
-rw-r--r--tests/f_dirlink/name1
-rw-r--r--tests/f_dup/expect.140
-rw-r--r--tests/f_dup/expect.27
-rw-r--r--tests/f_dup/image.gzbin0 -> 3744 bytes
-rw-r--r--tests/f_dup/name1
-rw-r--r--tests/f_dup2/expect.147
-rw-r--r--tests/f_dup2/expect.27
-rw-r--r--tests/f_dup2/image.gzbin0 -> 14589 bytes
-rw-r--r--tests/f_dup2/name1
-rw-r--r--tests/f_dup3/expect.147
-rw-r--r--tests/f_dup3/expect.27
-rw-r--r--tests/f_dup3/image.gzbin0 -> 15358 bytes
-rw-r--r--tests/f_dup3/name1
-rw-r--r--tests/f_dup4/expect.1130
-rw-r--r--tests/f_dup4/expect.27
-rw-r--r--tests/f_dup4/name1
-rw-r--r--tests/f_dup4/script55
-rw-r--r--tests/f_dup_ba/expect.169
-rw-r--r--tests/f_dup_ba/expect.27
-rw-r--r--tests/f_dup_ba/image.gzbin0 -> 4668 bytes
-rw-r--r--tests/f_dup_ba/name1
-rw-r--r--tests/f_dup_de/expect-nohtree.131
-rw-r--r--tests/f_dup_de/expect-nohtree.27
-rw-r--r--tests/f_dup_de/expect.128
-rw-r--r--tests/f_dup_de/expect.27
-rw-r--r--tests/f_dup_de/image.gzbin0 -> 8970 bytes
-rw-r--r--tests/f_dup_de/name1
-rw-r--r--tests/f_dup_de/script15
-rw-r--r--tests/f_dup_de2/expect.116
-rw-r--r--tests/f_dup_de2/expect.27
-rw-r--r--tests/f_dup_de2/image.gzbin0 -> 4860 bytes
-rw-r--r--tests/f_dup_de2/name1
-rw-r--r--tests/f_dup_de_crypt/expect.118
-rw-r--r--tests/f_dup_de_crypt/expect.27
-rw-r--r--tests/f_dup_de_crypt/image.gzbin0 -> 3039 bytes
-rw-r--r--tests/f_dup_de_crypt/name1
-rw-r--r--tests/f_dup_resize/expect.135
-rw-r--r--tests/f_dup_resize/expect.27
-rw-r--r--tests/f_dup_resize/name1
-rw-r--r--tests/f_dup_resize/script29
-rw-r--r--tests/f_dupdot/expect.122
-rw-r--r--tests/f_dupdot/expect.27
-rw-r--r--tests/f_dupdot/image.gzbin0 -> 553 bytes
-rw-r--r--tests/f_dupdot/name1
-rw-r--r--tests/f_dupfsblks/expect.165
-rw-r--r--tests/f_dupfsblks/expect.27
-rw-r--r--tests/f_dupfsblks/image.gzbin0 -> 464 bytes
-rw-r--r--tests/f_dupfsblks/name1
-rw-r--r--tests/f_dupsuper/expect.127
-rw-r--r--tests/f_dupsuper/expect.27
-rw-r--r--tests/f_dupsuper/image.gzbin0 -> 5158 bytes
-rw-r--r--tests/f_dupsuper/name1
-rw-r--r--tests/f_ea_bad_csum/expect.129
-rw-r--r--tests/f_ea_bad_csum/expect.27
-rw-r--r--tests/f_ea_bad_csum/image.gzbin0 -> 3176 bytes
-rw-r--r--tests/f_ea_bad_csum/name1
-rw-r--r--tests/f_ea_checks/expect.157
-rw-r--r--tests/f_ea_checks/expect.27
-rw-r--r--tests/f_ea_checks/image.gzbin0 -> 2306 bytes
-rw-r--r--tests/f_ea_checks/name1
-rw-r--r--tests/f_ea_inode/expect.131
-rw-r--r--tests/f_ea_inode/expect.27
-rw-r--r--tests/f_ea_inode/image.gzbin0 -> 1389 bytes
-rw-r--r--tests/f_ea_inode_self_ref/expect.117
-rw-r--r--tests/f_ea_inode_self_ref/expect.27
-rw-r--r--tests/f_ea_inode_self_ref/image.gzbin0 -> 661 bytes
-rw-r--r--tests/f_ea_inode_self_ref/name1
-rw-r--r--tests/f_ea_signed_hash/expect.17
-rw-r--r--tests/f_ea_signed_hash/image.gzbin0 -> 1128 bytes
-rw-r--r--tests/f_ea_signed_hash/script2
-rw-r--r--tests/f_ea_unsigned_hash/expect.17
-rw-r--r--tests/f_ea_unsigned_hash/image.gzbin0 -> 1321 bytes
-rw-r--r--tests/f_ea_unsigned_hash/script2
-rw-r--r--tests/f_ea_value_crash/expect.115
-rw-r--r--tests/f_ea_value_crash/expect.27
-rw-r--r--tests/f_ea_value_crash/image.gzbin0 -> 2627 bytes
-rw-r--r--tests/f_ea_value_crash/name1
-rw-r--r--tests/f_emptydir/expect.119
-rw-r--r--tests/f_emptydir/expect.27
-rw-r--r--tests/f_emptydir/image.gzbin0 -> 2710 bytes
-rw-r--r--tests/f_emptydir/name1
-rw-r--r--tests/f_encrypted_lpf/expect.127
-rw-r--r--tests/f_encrypted_lpf/expect.27
-rw-r--r--tests/f_encrypted_lpf/image.gzbin0 -> 1123 bytes
-rw-r--r--tests/f_encrypted_lpf/name1
-rw-r--r--tests/f_end-bitmap/expect.118
-rw-r--r--tests/f_end-bitmap/expect.27
-rw-r--r--tests/f_end-bitmap/image.gzbin0 -> 3756 bytes
-rw-r--r--tests/f_end-bitmap/name1
-rw-r--r--tests/f_eofblocks/expect.113
-rw-r--r--tests/f_eofblocks/expect.27
-rw-r--r--tests/f_eofblocks/image.gzbin0 -> 1372 bytes
-rw-r--r--tests/f_eofblocks/name1
-rw-r--r--tests/f_expand/expect.1.gzbin0 -> 13461 bytes
-rw-r--r--tests/f_expand/expect.27
-rw-r--r--tests/f_expand/image.gzbin0 -> 63068 bytes
-rw-r--r--tests/f_expand/name1
-rw-r--r--tests/f_expandroot_create_lnf/expect.112
-rw-r--r--tests/f_expandroot_create_lnf/expect.27
-rw-r--r--tests/f_expandroot_create_lnf/image.gzbin0 -> 1622 bytes
-rw-r--r--tests/f_expandroot_create_lnf/name1
-rw-r--r--tests/f_ext_journal/expect.18
-rw-r--r--tests/f_ext_journal/expect.27
-rw-r--r--tests/f_ext_journal/image.gzbin0 -> 49415 bytes
-rw-r--r--tests/f_ext_journal/journal.gzbin0 -> 45113 bytes
-rw-r--r--tests/f_ext_journal/name1
-rw-r--r--tests/f_ext_journal/script8
-rw-r--r--tests/f_ext_zero_len/expect.113
-rw-r--r--tests/f_ext_zero_len/expect.27
-rw-r--r--tests/f_ext_zero_len/image.gzbin0 -> 576 bytes
-rw-r--r--tests/f_ext_zero_len/name1
-rw-r--r--tests/f_extent_bad_node/expect.126
-rw-r--r--tests/f_extent_bad_node/expect.27
-rw-r--r--tests/f_extent_bad_node/image.gzbin0 -> 1254 bytes
-rw-r--r--tests/f_extent_bad_node/name1
-rw-r--r--tests/f_extent_htree/expect.129
-rw-r--r--tests/f_extent_htree/expect.27
-rw-r--r--tests/f_extent_htree/expect.pre.129
-rw-r--r--tests/f_extent_htree/expect.pre.27
-rw-r--r--tests/f_extent_htree/name1
-rw-r--r--tests/f_extent_htree/script56
-rw-r--r--tests/f_extent_int_bad_csum/expect.111
-rw-r--r--tests/f_extent_int_bad_csum/expect.27
-rw-r--r--tests/f_extent_int_bad_csum/image.gzbin0 -> 7202 bytes
-rw-r--r--tests/f_extent_int_bad_csum/name1
-rw-r--r--tests/f_extent_int_bad_extent/expect.124
-rw-r--r--tests/f_extent_int_bad_extent/expect.27
-rw-r--r--tests/f_extent_int_bad_extent/image.gzbin0 -> 7205 bytes
-rw-r--r--tests/f_extent_int_bad_extent/name1
-rw-r--r--tests/f_extent_int_bad_magic/expect.126
-rw-r--r--tests/f_extent_int_bad_magic/expect.27
-rw-r--r--tests/f_extent_int_bad_magic/image.gzbin0 -> 7205 bytes
-rw-r--r--tests/f_extent_int_bad_magic/name1
-rw-r--r--tests/f_extent_interior_start_lblk/expect.112
-rw-r--r--tests/f_extent_interior_start_lblk/expect.27
-rw-r--r--tests/f_extent_interior_start_lblk/image.gzbin0 -> 603 bytes
-rw-r--r--tests/f_extent_interior_start_lblk/name1
-rw-r--r--tests/f_extent_leaf_bad_csum/expect.111
-rw-r--r--tests/f_extent_leaf_bad_csum/expect.27
-rw-r--r--tests/f_extent_leaf_bad_csum/image.gzbin0 -> 5005 bytes
-rw-r--r--tests/f_extent_leaf_bad_csum/name1
-rw-r--r--tests/f_extent_leaf_bad_extent/expect.124
-rw-r--r--tests/f_extent_leaf_bad_extent/expect.27
-rw-r--r--tests/f_extent_leaf_bad_extent/image.gzbin0 -> 5008 bytes
-rw-r--r--tests/f_extent_leaf_bad_extent/name1
-rw-r--r--tests/f_extent_leaf_bad_magic/expect.126
-rw-r--r--tests/f_extent_leaf_bad_magic/expect.27
-rw-r--r--tests/f_extent_leaf_bad_magic/image.gzbin0 -> 5008 bytes
-rw-r--r--tests/f_extent_leaf_bad_magic/name1
-rw-r--r--tests/f_extent_oobounds/expect.127
-rw-r--r--tests/f_extent_oobounds/expect.27
-rw-r--r--tests/f_extent_oobounds/script41
-rw-r--r--tests/f_extent_too_deep/expect.123
-rw-r--r--tests/f_extent_too_deep/expect.210
-rw-r--r--tests/f_extent_too_deep/image.gzbin0 -> 2592 bytes
-rw-r--r--tests/f_extent_too_deep/name1
-rw-r--r--tests/f_extent_too_deep/script113
-rw-r--r--tests/f_extents/expect.167
-rw-r--r--tests/f_extents/expect.27
-rw-r--r--tests/f_extents/image.gzbin0 -> 20935 bytes
-rw-r--r--tests/f_extents/name1
-rw-r--r--tests/f_extents2/expect.170
-rw-r--r--tests/f_extents2/expect.27
-rw-r--r--tests/f_extents2/image.gzbin0 -> 40632 bytes
-rw-r--r--tests/f_extents2/name1
-rw-r--r--tests/f_extra_journal/expect.123
-rw-r--r--tests/f_extra_journal/expect.27
-rw-r--r--tests/f_extra_journal/image.gzbin0 -> 4320 bytes
-rw-r--r--tests/f_extra_journal/name1
-rw-r--r--tests/f_fast_symlink_extents/expect.111
-rw-r--r--tests/f_fast_symlink_extents/expect.27
-rw-r--r--tests/f_fast_symlink_extents/image.gzbin0 -> 565 bytes
-rw-r--r--tests/f_fast_symlink_extents/name1
-rw-r--r--tests/f_file_acl_high/expect.112
-rw-r--r--tests/f_file_acl_high/expect.27
-rw-r--r--tests/f_file_acl_high/image.gzbin0 -> 891 bytes
-rw-r--r--tests/f_file_acl_high/name1
-rw-r--r--tests/f_filetype/expect.149
-rw-r--r--tests/f_filetype/expect.27
-rw-r--r--tests/f_filetype/image.gzbin0 -> 646 bytes
-rw-r--r--tests/f_filetype/name1
-rw-r--r--tests/f_first_meta_bg_too_big/expect.124
-rw-r--r--tests/f_first_meta_bg_too_big/expect.27
-rw-r--r--tests/f_first_meta_bg_too_big/image.gzbin0 -> 533 bytes
-rw-r--r--tests/f_first_meta_bg_too_big/name1
-rw-r--r--tests/f_full_bg/expect.17
-rw-r--r--tests/f_full_bg/expect.27
-rw-r--r--tests/f_full_bg/image.gzbin0 -> 1860 bytes
-rw-r--r--tests/f_full_bg/name1
-rw-r--r--tests/f_h_badnode/expect.118
-rw-r--r--tests/f_h_badnode/expect.27
-rw-r--r--tests/f_h_badnode/image.gzbin0 -> 467331 bytes
-rw-r--r--tests/f_h_badnode/name1
-rw-r--r--tests/f_h_badnode/script5
-rw-r--r--tests/f_h_badroot/expect.140
-rw-r--r--tests/f_h_badroot/expect.27
-rw-r--r--tests/f_h_badroot/image.gzbin0 -> 43165 bytes
-rw-r--r--tests/f_h_badroot/name1
-rw-r--r--tests/f_h_badroot/script5
-rw-r--r--tests/f_h_normal/expect.17
-rw-r--r--tests/f_h_normal/expect.27
-rw-r--r--tests/f_h_normal/image.gzbin0 -> 454847 bytes
-rw-r--r--tests/f_h_normal/name1
-rw-r--r--tests/f_h_normal/script5
-rwxr-xr-xtests/f_h_reindex/expect.1958
-rw-r--r--tests/f_h_reindex/expect.27
-rw-r--r--tests/f_h_reindex/image.gzbin0 -> 621257 bytes
-rw-r--r--tests/f_h_reindex/name1
-rw-r--r--tests/f_h_reindex/script5
-rw-r--r--tests/f_h_unsigned/expect.17
-rw-r--r--tests/f_h_unsigned/expect.27
-rw-r--r--tests/f_h_unsigned/image.gzbin0 -> 454913 bytes
-rw-r--r--tests/f_h_unsigned/name1
-rw-r--r--tests/f_h_unsigned/script5
-rw-r--r--tests/f_holedir/expect.133
-rw-r--r--tests/f_holedir/expect.27
-rw-r--r--tests/f_holedir/image.gzbin0 -> 345 bytes
-rw-r--r--tests/f_holedir/name1
-rw-r--r--tests/f_holedir2/expect.122
-rw-r--r--tests/f_holedir2/expect.27
-rw-r--r--tests/f_holedir2/image.gzbin0 -> 612 bytes
-rw-r--r--tests/f_holedir2/name1
-rw-r--r--tests/f_holedir3/expect.113
-rw-r--r--tests/f_holedir3/expect.27
-rw-r--r--tests/f_holedir3/image.gzbin0 -> 3700 bytes
-rw-r--r--tests/f_holedir3/name1
-rw-r--r--tests/f_holedir4/expect.168
-rw-r--r--tests/f_holedir4/expect.211
-rw-r--r--tests/f_holedir4/image.gzbin0 -> 2535 bytes
-rw-r--r--tests/f_holedir4/name1
-rw-r--r--tests/f_htree_bad_csum/expect.128
-rw-r--r--tests/f_htree_bad_csum/expect.27
-rw-r--r--tests/f_htree_bad_csum/image.gzbin0 -> 5462 bytes
-rw-r--r--tests/f_htree_bad_csum/name1
-rw-r--r--tests/f_htree_leaf_csum/expect.112
-rw-r--r--tests/f_htree_leaf_csum/expect.27
-rw-r--r--tests/f_htree_leaf_csum/image.gzbin0 -> 15906 bytes
-rw-r--r--tests/f_htree_leaf_csum/name1
-rw-r--r--tests/f_hugedir_blocks/expect.110
-rw-r--r--tests/f_hugedir_blocks/expect.27
-rw-r--r--tests/f_hugedir_blocks/image.gzbin0 -> 2497 bytes
-rw-r--r--tests/f_hugedir_blocks/name1
-rw-r--r--tests/f_hurd/expect.112
-rw-r--r--tests/f_hurd/expect.27
-rw-r--r--tests/f_hurd/image.gzbin0 -> 401 bytes
-rw-r--r--tests/f_hurd/name1
-rw-r--r--tests/f_idata_and_extents/expect.135
-rw-r--r--tests/f_idata_and_extents/expect.27
-rw-r--r--tests/f_idata_and_extents/image.gzbin0 -> 3112 bytes
-rw-r--r--tests/f_idata_and_extents/name1
-rw-r--r--tests/f_illbbitmap/expect.130
-rw-r--r--tests/f_illbbitmap/expect.27
-rw-r--r--tests/f_illbbitmap/image.gzbin0 -> 357 bytes
-rw-r--r--tests/f_illbbitmap/name1
-rw-r--r--tests/f_illibitmap/expect.127
-rw-r--r--tests/f_illibitmap/expect.27
-rw-r--r--tests/f_illibitmap/image.gzbin0 -> 360 bytes
-rw-r--r--tests/f_illibitmap/name1
-rw-r--r--tests/f_illitable/expect.149
-rw-r--r--tests/f_illitable/expect.27
-rw-r--r--tests/f_illitable/image.gzbin0 -> 396 bytes
-rw-r--r--tests/f_illitable/name1
-rw-r--r--tests/f_illitable_flexbg/expect.126
-rw-r--r--tests/f_illitable_flexbg/expect.27
-rwxr-xr-xtests/f_illitable_flexbg/image.gzbin0 -> 38080 bytes
-rw-r--r--tests/f_illitable_flexbg/name1
-rw-r--r--tests/f_imagic/expect.147
-rw-r--r--tests/f_imagic/expect.27
-rw-r--r--tests/f_imagic/image.gzbin0 -> 1143 bytes
-rw-r--r--tests/f_imagic/name1
-rw-r--r--tests/f_imagic_fs/expect.131
-rw-r--r--tests/f_imagic_fs/expect.27
-rw-r--r--tests/f_imagic_fs/name1
-rw-r--r--tests/f_imagic_fs/script8
-rw-r--r--tests/f_ind_inode_collision/expect.1146
-rw-r--r--tests/f_ind_inode_collision/expect.27
-rw-r--r--tests/f_ind_inode_collision/image.gzbin0 -> 2456 bytes
-rw-r--r--tests/f_ind_inode_collision/name1
-rw-r--r--tests/f_inlinedata_dirblocks/expect.125
-rw-r--r--tests/f_inlinedata_dirblocks/expect.27
-rw-r--r--tests/f_inlinedata_dirblocks/image.gzbin0 -> 2597 bytes
-rw-r--r--tests/f_inlinedata_dirblocks/name1
-rw-r--r--tests/f_inlinedata_flags/expect.126
-rw-r--r--tests/f_inlinedata_flags/expect.27
-rw-r--r--tests/f_inlinedata_flags/image.gzbin0 -> 11226 bytes
-rw-r--r--tests/f_inlinedata_flags/name1
-rw-r--r--tests/f_inlinedata_repair/expect.158
-rw-r--r--tests/f_inlinedata_repair/expect.27
-rw-r--r--tests/f_inlinedata_repair/image.gzbin0 -> 3201 bytes
-rw-r--r--tests/f_inlinedata_repair/name1
-rw-r--r--tests/f_inlinedir_detector/expect.120
-rw-r--r--tests/f_inlinedir_detector/expect.27
-rw-r--r--tests/f_inlinedir_detector/image.gzbin0 -> 2640 bytes
-rw-r--r--tests/f_inlinedir_detector/name1
-rw-r--r--tests/f_inode_ea_collision/expect.115
-rw-r--r--tests/f_inode_ea_collision/expect.27
-rw-r--r--tests/f_inode_ea_collision/image.gzbin0 -> 2602 bytes
-rw-r--r--tests/f_inode_ea_collision/name1
-rw-r--r--tests/f_invalid_bad_inode/expect.111
-rw-r--r--tests/f_invalid_bad_inode/expect.27
-rw-r--r--tests/f_invalid_bad_inode/image.gzbin0 -> 623 bytes
-rw-r--r--tests/f_invalid_bad_inode/name1
-rw-r--r--tests/f_invalid_extent_symlink/expect.112
-rw-r--r--tests/f_invalid_extent_symlink/expect.27
-rw-r--r--tests/f_invalid_extent_symlink/image.gzbin0 -> 1115 bytes
-rw-r--r--tests/f_invalid_extent_symlink/name1
-rw-r--r--tests/f_itable_collision/expect.193
-rw-r--r--tests/f_itable_collision/expect.27
-rw-r--r--tests/f_itable_collision/image.gzbin0 -> 2817 bytes
-rw-r--r--tests/f_itable_collision/name1
-rwxr-xr-xtests/f_itable_collision/script36
-rw-r--r--tests/f_jnl_32bit/expect.0567
-rw-r--r--tests/f_jnl_32bit/expect.116
-rw-r--r--tests/f_jnl_32bit/expect.27
-rw-r--r--tests/f_jnl_32bit/image.gzbin0 -> 44544 bytes
-rw-r--r--tests/f_jnl_32bit/name1
-rw-r--r--tests/f_jnl_32bit/script4
-rw-r--r--tests/f_jnl_64bit/expect.0757
-rw-r--r--tests/f_jnl_64bit/expect.116
-rw-r--r--tests/f_jnl_64bit/expect.27
-rw-r--r--tests/f_jnl_64bit/image.gzbin0 -> 118573 bytes
-rw-r--r--tests/f_jnl_64bit/name1
-rw-r--r--tests/f_jnl_64bit/script4
-rw-r--r--tests/f_jnl_errno/expect.050
-rw-r--r--tests/f_jnl_errno/expect.19
-rw-r--r--tests/f_jnl_errno/expect.27
-rw-r--r--tests/f_jnl_errno/image.gzbin0 -> 8822 bytes
-rw-r--r--tests/f_jnl_errno/name1
-rw-r--r--tests/f_jnl_errno/script4
-rw-r--r--tests/f_jnl_etb_alloc_fail/expect.131
-rw-r--r--tests/f_jnl_etb_alloc_fail/expect.220
-rw-r--r--tests/f_jnl_etb_alloc_fail/image.gzbin0 -> 3450 bytes
-rw-r--r--tests/f_jnl_etb_alloc_fail/name1
-rw-r--r--tests/f_journal/expect.162
-rw-r--r--tests/f_journal/expect.27
-rw-r--r--tests/f_journal/image.gzbin0 -> 36380 bytes
-rw-r--r--tests/f_journal/name1
-rw-r--r--tests/f_large_dir/expect34
-rw-r--r--tests/f_large_dir/is_slow_test0
-rw-r--r--tests/f_large_dir/name1
-rw-r--r--tests/f_large_dir/script90
-rw-r--r--tests/f_large_dir_csum/expect33
-rw-r--r--tests/f_large_dir_csum/is_slow_test0
-rw-r--r--tests/f_large_dir_csum/name1
-rw-r--r--tests/f_large_dir_csum/script84
-rw-r--r--tests/f_lotsbad/expect.161
-rw-r--r--tests/f_lotsbad/expect.27
-rw-r--r--tests/f_lotsbad/image.gzbin0 -> 3694 bytes
-rw-r--r--tests/f_lotsbad/name1
-rw-r--r--tests/f_lpf/expect.150
-rw-r--r--tests/f_lpf/expect.27
-rw-r--r--tests/f_lpf/image.gzbin0 -> 15340 bytes
-rw-r--r--tests/f_lpf/name1
-rw-r--r--tests/f_lpf2/expect.141
-rw-r--r--tests/f_lpf2/expect.27
-rw-r--r--tests/f_lpf2/image.gzbin0 -> 450 bytes
-rw-r--r--tests/f_lpf2/name1
-rw-r--r--tests/f_lpffile/expect.132
-rw-r--r--tests/f_lpffile/expect.27
-rw-r--r--tests/f_lpffile/image.gzbin0 -> 509 bytes
-rw-r--r--tests/f_lpffile/name1
-rw-r--r--tests/f_many_subdirs/expect.147
-rw-r--r--tests/f_many_subdirs/expect.27
-rw-r--r--tests/f_many_subdirs/image.gzbin0 -> 1816025 bytes
-rw-r--r--tests/f_many_subdirs/name1
-rw-r--r--tests/f_messy_inode/expect.138
-rw-r--r--tests/f_messy_inode/expect.27
-rw-r--r--tests/f_messy_inode/image.gzbin0 -> 3823 bytes
-rw-r--r--tests/f_messy_inode/name1
-rw-r--r--tests/f_miss_blk_bmap/expect.120
-rw-r--r--tests/f_miss_blk_bmap/expect.27
-rw-r--r--tests/f_miss_blk_bmap/image.gzbin0 -> 687 bytes
-rw-r--r--tests/f_miss_blk_bmap/name1
-rw-r--r--tests/f_miss_journal/expect.128
-rw-r--r--tests/f_miss_journal/expect.27
-rw-r--r--tests/f_miss_journal/image.gzbin0 -> 4276 bytes
-rw-r--r--tests/f_miss_journal/name1
-rw-r--r--tests/f_misstable/expect.149
-rw-r--r--tests/f_misstable/expect.27
-rw-r--r--tests/f_misstable/image.gzbin0 -> 17201 bytes
-rw-r--r--tests/f_misstable/name1
-rw-r--r--tests/f_mke2fs2b/expect.125
-rw-r--r--tests/f_mke2fs2b/expect.27
-rw-r--r--tests/f_mke2fs2b/image.gzbin0 -> 556 bytes
-rw-r--r--tests/f_mke2fs2b/name1
-rw-r--r--tests/f_mke2fs_baddisk/script24
-rw-r--r--tests/f_mmp/is_slow_test0
-rw-r--r--tests/f_mmp/name1
-rw-r--r--tests/f_mmp/script71
-rw-r--r--tests/f_mmp_garbage/expect.19
-rw-r--r--tests/f_mmp_garbage/expect.27
-rw-r--r--tests/f_mmp_garbage/is_slow_test0
-rw-r--r--tests/f_mmp_garbage/name1
-rw-r--r--tests/f_mmp_garbage/script17
-rw-r--r--tests/f_no/expect50
-rw-r--r--tests/f_no/script26
-rw-r--r--tests/f_no_cache_corrupt_inode/expect.111
-rw-r--r--tests/f_no_cache_corrupt_inode/expect.27
-rw-r--r--tests/f_no_cache_corrupt_inode/image.gzbin0 -> 2606 bytes
-rw-r--r--tests/f_no_cache_corrupt_inode/name1
-rw-r--r--tests/f_noroot/expect.139
-rw-r--r--tests/f_noroot/expect.27
-rw-r--r--tests/f_noroot/image.gzbin0 -> 550 bytes
-rw-r--r--tests/f_noroot/name1
-rw-r--r--tests/f_nospc_create_lnf/expect.129
-rw-r--r--tests/f_nospc_create_lnf/expect.226
-rw-r--r--tests/f_nospc_create_lnf/image.gzbin0 -> 4201 bytes
-rw-r--r--tests/f_nospc_create_lnf/name1
-rw-r--r--tests/f_okgroup/expect.19
-rw-r--r--tests/f_okgroup/expect.27
-rw-r--r--tests/f_okgroup/image.gzbin0 -> 8387 bytes
-rw-r--r--tests/f_okgroup/name1
-rw-r--r--tests/f_opt_extent/expect55
-rw-r--r--tests/f_opt_extent/name1
-rw-r--r--tests/f_opt_extent/script64
-rw-r--r--tests/f_opt_extent_ext3/expect44
-rw-r--r--tests/f_opt_extent_ext3/name1
-rw-r--r--tests/f_opt_extent_ext3/script65
-rw-r--r--tests/f_orphan/expect.114
-rw-r--r--tests/f_orphan/expect.27
-rw-r--r--tests/f_orphan/image.gzbin0 -> 12026 bytes
-rw-r--r--tests/f_orphan/name1
-rw-r--r--tests/f_orphan_dotdot_ft/expect.156
-rw-r--r--tests/f_orphan_dotdot_ft/expect.27
-rw-r--r--tests/f_orphan_dotdot_ft/image.gzbin0 -> 590 bytes
-rw-r--r--tests/f_orphan_dotdot_ft/name1
-rw-r--r--tests/f_orphan_extents_inode/expect.110
-rw-r--r--tests/f_orphan_extents_inode/expect.27
-rw-r--r--tests/f_orphan_extents_inode/image.gzbin0 -> 564 bytes
-rw-r--r--tests/f_orphan_extents_inode/name1
-rw-r--r--tests/f_orphan_indirect_inode/expect.13
-rw-r--r--tests/f_orphan_indirect_inode/expect.27
-rw-r--r--tests/f_orphan_indirect_inode/image.gzbin0 -> 592 bytes
-rw-r--r--tests/f_orphan_indirect_inode/name1
-rw-r--r--tests/f_orphan_indirect_inode/script2
-rw-r--r--tests/f_orphquot/expect16
-rw-r--r--tests/f_orphquot/image.bz2bin0 -> 2083 bytes
-rw-r--r--tests/f_orphquot/script28
-rw-r--r--tests/f_overfsblks/expect.121
-rw-r--r--tests/f_overfsblks/expect.27
-rw-r--r--tests/f_overfsblks/image.gzbin0 -> 351 bytes
-rw-r--r--tests/f_overfsblks/name1
-rw-r--r--tests/f_pre_1970_date_encoding/expect45
-rw-r--r--tests/f_pre_1970_date_encoding/name1
-rw-r--r--tests/f_pre_1970_date_encoding/script106
-rw-r--r--tests/f_preen/expect.112
-rw-r--r--tests/f_preen/expect.230
-rw-r--r--tests/f_preen/image.gzbin0 -> 155743 bytes
-rw-r--r--tests/f_preen/name1
-rw-r--r--tests/f_preen/script4
-rw-r--r--tests/f_quota/debugfs-cmds7
-rw-r--r--tests/f_quota/expect.021
-rw-r--r--tests/f_quota/expect.113
-rw-r--r--tests/f_quota/expect.27
-rw-r--r--tests/f_quota/image.gzbin0 -> 1046 bytes
-rw-r--r--tests/f_quota/name1
-rw-r--r--tests/f_quota/script11
-rw-r--r--tests/f_quota_extent_opt/expect.115
-rw-r--r--tests/f_quota_extent_opt/expect.27
-rw-r--r--tests/f_quota_extent_opt/image.gzbin0 -> 9018 bytes
-rw-r--r--tests/f_quota_extent_opt/name1
-rw-r--r--tests/f_quota_invalid_inum/expect.115
-rw-r--r--tests/f_quota_invalid_inum/expect.27
-rw-r--r--tests/f_quota_invalid_inum/image.gzbin0 -> 583 bytes
-rw-r--r--tests/f_quota_invalid_inum/name1
-rw-r--r--tests/f_readonly_fsck/expect11
-rw-r--r--tests/f_readonly_fsck/image.gzbin0 -> 2538 bytes
-rw-r--r--tests/f_readonly_fsck/name1
-rw-r--r--tests/f_readonly_fsck/script43
-rw-r--r--tests/f_rebuild_csum_rootdir/expect.1306
-rw-r--r--tests/f_rebuild_csum_rootdir/expect.27
-rw-r--r--tests/f_rebuild_csum_rootdir/image.gzbin0 -> 12476 bytes
-rw-r--r--tests/f_rebuild_csum_rootdir/name1
-rw-r--r--tests/f_recnect_bad/expect.137
-rw-r--r--tests/f_recnect_bad/expect.27
-rw-r--r--tests/f_recnect_bad/image.gzbin0 -> 543 bytes
-rw-r--r--tests/f_recnect_bad/name1
-rw-r--r--tests/f_reconnect/expect.124
-rw-r--r--tests/f_reconnect/expect.27
-rw-r--r--tests/f_reconnect/image.gzbin0 -> 538 bytes
-rw-r--r--tests/f_reconnect/name1
-rw-r--r--tests/f_rehash_dir/expect.110
-rw-r--r--tests/f_rehash_dir/expect.27
-rw-r--r--tests/f_rehash_dir/image.gzbin0 -> 3126 bytes
-rw-r--r--tests/f_rehash_dir/name1
-rw-r--r--tests/f_rehash_dir/script3
-rw-r--r--tests/f_resize_inode/expect159
-rw-r--r--tests/f_resize_inode/script115
-rw-r--r--tests/f_resize_inode_meta_bg/expect.170
-rw-r--r--tests/f_resize_inode_meta_bg/expect.27
-rw-r--r--tests/f_resize_inode_meta_bg/image.gzbin0 -> 21467 bytes
-rw-r--r--tests/f_resize_inode_meta_bg/name1
-rw-r--r--tests/f_salvage_dir/expect.119
-rw-r--r--tests/f_salvage_dir/expect.27
-rw-r--r--tests/f_salvage_dir/image.gzbin0 -> 616 bytes
-rw-r--r--tests/f_salvage_dir/name1
-rw-r--r--tests/f_sb_extra_isize/expect.113
-rw-r--r--tests/f_sb_extra_isize/expect.27
-rw-r--r--tests/f_sb_extra_isize/image.gzbin0 -> 719 bytes
-rw-r--r--tests/f_sb_extra_isize/name1
-rw-r--r--tests/f_selinux/expect.17
-rw-r--r--tests/f_selinux/expect.27
-rw-r--r--tests/f_selinux/image.gzbin0 -> 715 bytes
-rw-r--r--tests/f_selinux/name1
-rw-r--r--tests/f_shared_blocks_ok/expect.17
-rw-r--r--tests/f_shared_blocks_ok/expect.27
-rw-r--r--tests/f_shared_blocks_ok/image.gzbin0 -> 831 bytes
-rw-r--r--tests/f_shared_blocks_ok/name1
-rw-r--r--tests/f_short_encrypted_dirent/expect.117
-rw-r--r--tests/f_short_encrypted_dirent/expect.27
-rw-r--r--tests/f_short_encrypted_dirent/image.gzbin0 -> 1008 bytes
-rw-r--r--tests/f_short_encrypted_dirent/name1
-rw-r--r--tests/f_special_ea/expect.111
-rw-r--r--tests/f_special_ea/image.gzbin0 -> 30344 bytes
-rw-r--r--tests/f_special_ea/name1
-rw-r--r--tests/f_special_ea/script2
-rw-r--r--tests/f_summary_counts/expect.119
-rw-r--r--tests/f_summary_counts/expect.27
-rw-r--r--tests/f_summary_counts/image.gzbin0 -> 440 bytes
-rw-r--r--tests/f_summary_counts/name1
-rw-r--r--tests/f_summary_counts/script4
-rw-r--r--tests/f_super_bad_csum/expect.113
-rw-r--r--tests/f_super_bad_csum/expect.27
-rw-r--r--tests/f_super_bad_csum/image.bz2bin0 -> 1181 bytes
-rw-r--r--tests/f_super_bad_csum/name1
-rwxr-xr-xtests/f_super_bad_csum/script33
-rw-r--r--tests/f_toobig_extent_dir/expect.112
-rw-r--r--tests/f_toobig_extent_dir/expect.27
-rw-r--r--tests/f_toobig_extent_dir/image.gzbin0 -> 822 bytes
-rw-r--r--tests/f_toobig_extent_dir/name1
-rw-r--r--tests/f_trunc_dirent_header/expect.115
-rw-r--r--tests/f_trunc_dirent_header/expect.27
-rw-r--r--tests/f_trunc_dirent_header/image.gzbin0 -> 2873 bytes
-rw-r--r--tests/f_trunc_dirent_header/name1
-rw-r--r--tests/f_uninit_bad_free_inodes/expect.125
-rw-r--r--tests/f_uninit_bad_free_inodes/expect.27
-rw-r--r--tests/f_uninit_bad_free_inodes/image.gzbin0 -> 114234 bytes
-rw-r--r--tests/f_uninit_bad_free_inodes/name1
-rw-r--r--tests/f_uninit_blk_used_not_set/expect.134
-rw-r--r--tests/f_uninit_blk_used_not_set/expect.27
-rw-r--r--tests/f_uninit_blk_used_not_set/image.gzbin0 -> 56712 bytes
-rw-r--r--tests/f_uninit_blk_used_not_set/name1
-rw-r--r--tests/f_uninit_cat/expectbin0 -> 3623 bytes
-rw-r--r--tests/f_uninit_cat/image.gzbin0 -> 1553 bytes
-rw-r--r--tests/f_uninit_cat/name1
-rwxr-xr-xtests/f_uninit_cat/script36
-rw-r--r--tests/f_uninit_checksum_bad/expect.129
-rw-r--r--tests/f_uninit_checksum_bad/expect.27
-rw-r--r--tests/f_uninit_checksum_bad/image.gzbin0 -> 42374 bytes
-rw-r--r--tests/f_uninit_checksum_bad/name1
-rw-r--r--tests/f_uninit_dir/expect.125
-rw-r--r--tests/f_uninit_dir/expect.27
-rw-r--r--tests/f_uninit_dir/image.gzbin0 -> 2604 bytes
-rw-r--r--tests/f_uninit_dir/name1
-rw-r--r--tests/f_uninit_disable/expect.110
-rw-r--r--tests/f_uninit_disable/expect.27
-rw-r--r--tests/f_uninit_disable/image.gzbin0 -> 10792 bytes
-rw-r--r--tests/f_uninit_disable/name1
-rw-r--r--tests/f_uninit_enable/expect.110
-rw-r--r--tests/f_uninit_enable/expect.27
-rw-r--r--tests/f_uninit_enable/image.gzbin0 -> 10787 bytes
-rw-r--r--tests/f_uninit_enable/name1
-rw-r--r--tests/f_uninit_ext_past_eof/expect.17
-rw-r--r--tests/f_uninit_ext_past_eof/expect.27
-rw-r--r--tests/f_uninit_ext_past_eof/image.gzbin0 -> 5102 bytes
-rw-r--r--tests/f_uninit_ext_past_eof/name1
-rw-r--r--tests/f_uninit_ext_past_eof2/expect.17
-rw-r--r--tests/f_uninit_ext_past_eof2/expect.27
-rw-r--r--tests/f_uninit_ext_past_eof2/image.gzbin0 -> 989 bytes
-rw-r--r--tests/f_uninit_ext_past_eof2/name1
-rw-r--r--tests/f_uninit_inode_past_unused/expect.124
-rw-r--r--tests/f_uninit_inode_past_unused/expect.27
-rw-r--r--tests/f_uninit_inode_past_unused/image.gzbin0 -> 10929 bytes
-rw-r--r--tests/f_uninit_inode_past_unused/name1
-rw-r--r--tests/f_uninit_last_uninit/expect.19
-rw-r--r--tests/f_uninit_last_uninit/expect.27
-rw-r--r--tests/f_uninit_last_uninit/name1
-rw-r--r--tests/f_uninit_last_uninit/script25
-rw-r--r--tests/f_uninit_restart_fsck/expect.132
-rw-r--r--tests/f_uninit_restart_fsck/expect.27
-rw-r--r--tests/f_uninit_restart_fsck/image.gzbin0 -> 91233 bytes
-rw-r--r--tests/f_uninit_restart_fsck/name1
-rw-r--r--tests/f_uninit_set_inode_not_set/expect.125
-rw-r--r--tests/f_uninit_set_inode_not_set/expect.27
-rw-r--r--tests/f_uninit_set_inode_not_set/image.gzbin0 -> 115285 bytes
-rw-r--r--tests/f_uninit_set_inode_not_set/name1
-rw-r--r--tests/f_unshare_blocks_no_space/expect.1136
-rw-r--r--tests/f_unshare_blocks_no_space/expect.27
-rw-r--r--tests/f_unshare_blocks_no_space/image.gzbin0 -> 1490 bytes
-rw-r--r--tests/f_unshare_blocks_no_space/name1
-rw-r--r--tests/f_unshare_blocks_no_space/script2
-rw-r--r--tests/f_unshare_blocks_ok/expect.126
-rw-r--r--tests/f_unshare_blocks_ok/expect.27
-rw-r--r--tests/f_unshare_blocks_ok/image.gzbin0 -> 831 bytes
-rw-r--r--tests/f_unshare_blocks_ok/name1
-rw-r--r--tests/f_unshare_blocks_ok/script2
-rw-r--r--tests/f_unsorted_EAs/expect.111
-rw-r--r--tests/f_unsorted_EAs/expect.27
-rw-r--r--tests/f_unsorted_EAs/image.gzbin0 -> 15674 bytes
-rw-r--r--tests/f_unsorted_EAs/name1
-rw-r--r--tests/f_unused_itable/expect.124
-rw-r--r--tests/f_unused_itable/expect.27
-rw-r--r--tests/f_unused_itable/image.gzbin0 -> 2310 bytes
-rw-r--r--tests/f_unused_itable/name1
-rw-r--r--tests/f_valid_ea_in_inode/expect.17
-rw-r--r--tests/f_valid_ea_in_inode/image.gzbin0 -> 1356 bytes
-rw-r--r--tests/f_valid_ea_in_inode/name1
-rw-r--r--tests/f_valid_ea_in_inode/script2
-rw-r--r--tests/f_verity/expect.17
-rw-r--r--tests/f_verity/image.gzbin0 -> 2247 bytes
-rwxr-xr-xtests/f_verity/mkimage.sh28
-rw-r--r--tests/f_verity/name1
-rw-r--r--tests/f_verity/script2
-rw-r--r--tests/f_write_ea_no_extra_isize/expect.129
-rw-r--r--tests/f_write_ea_no_extra_isize/expect.27
-rw-r--r--tests/f_write_ea_no_extra_isize/image.gzbin0 -> 2516 bytes
-rw-r--r--tests/f_write_ea_no_extra_isize/name1
-rw-r--r--tests/f_write_ea_toobig_extra_isize/expect.132
-rw-r--r--tests/f_write_ea_toobig_extra_isize/expect.27
-rw-r--r--tests/f_write_ea_toobig_extra_isize/image.gzbin0 -> 2518 bytes
-rw-r--r--tests/f_write_ea_toobig_extra_isize/name1
-rw-r--r--tests/f_write_ea_toosmall_extra_isize/expect.132
-rw-r--r--tests/f_write_ea_toosmall_extra_isize/expect.27
-rw-r--r--tests/f_write_ea_toosmall_extra_isize/image.gzbin0 -> 2517 bytes
-rw-r--r--tests/f_write_ea_toosmall_extra_isize/name1
-rw-r--r--tests/f_yes/expect46
-rw-r--r--tests/f_yes/script26
-rw-r--r--tests/f_yesall/expect63
-rw-r--r--tests/f_yesall/image.gzbin0 -> 2597 bytes
-rw-r--r--tests/f_yesall/script26
-rw-r--r--tests/f_yesthenall/expect53
-rw-r--r--tests/f_yesthenall/script26
-rw-r--r--tests/f_yesthenno/expect51
-rw-r--r--tests/f_yesthenno/script26
-rw-r--r--tests/f_zero_group/expect.123
-rw-r--r--tests/f_zero_group/expect.27
-rw-r--r--tests/f_zero_group/image.gzbin0 -> 13319 bytes
-rw-r--r--tests/f_zero_group/name1
-rw-r--r--tests/f_zero_inode_size/expect.111
-rw-r--r--tests/f_zero_inode_size/expect.27
-rw-r--r--tests/f_zero_inode_size/image.gzbin0 -> 10741 bytes
-rw-r--r--tests/f_zero_inode_size/name1
-rw-r--r--tests/f_zero_super/expect.123
-rw-r--r--tests/f_zero_super/expect.27
-rw-r--r--tests/f_zero_super/image.gzbin0 -> 13262 bytes
-rw-r--r--tests/f_zero_super/name1
-rw-r--r--tests/f_zero_xattr/expect.17
-rw-r--r--tests/f_zero_xattr/image.gzbin0 -> 707 bytes
-rw-r--r--tests/f_zero_xattr/name1
-rw-r--r--tests/f_zero_xattr/script2
-rw-r--r--tests/f_zeroed_ext_header/expect.122
-rw-r--r--tests/f_zeroed_ext_header/expect.27
-rw-r--r--tests/f_zeroed_ext_header/image.gzbin0 -> 1447 bytes
-rw-r--r--tests/f_zeroed_ext_header/name1
-rw-r--r--tests/filter.sed42
-rw-r--r--tests/fuzz/.gitignore3
-rw-r--r--tests/fuzz/Makefile.in93
-rw-r--r--tests/fuzz/ext2fs_check_directory_fuzzer.cc43
-rw-r--r--tests/fuzz/ext2fs_image_read_write_fuzzer.cc135
-rw-r--r--tests/fuzz/ext2fs_read_bitmap_fuzzer.cc108
-rw-r--r--tests/i_bad_csum/expect11
-rw-r--r--tests/i_bad_csum/image.gzbin0 -> 2606 bytes
-rw-r--r--tests/i_bad_csum/name1
-rw-r--r--tests/i_bad_csum/script26
-rw-r--r--tests/i_bitmaps/expect8
-rw-r--r--tests/i_bitmaps/image.bz2bin0 -> 4026 bytes
-rw-r--r--tests/i_bitmaps/script28
-rw-r--r--tests/i_qcow/i_qcow.crc15
-rw-r--r--tests/i_qcow/image1024.orig.bz2bin0 -> 322312 bytes
-rw-r--r--tests/i_qcow/image2048.orig.bz2bin0 -> 321388 bytes
-rw-r--r--tests/i_qcow/image4096.orig.bz2bin0 -> 312342 bytes
-rw-r--r--tests/i_qcow/script64
-rw-r--r--tests/i_zero_super/expect.122
-rw-r--r--tests/i_zero_super/image.gzbin0 -> 13262 bytes
-rw-r--r--tests/i_zero_super/script11
-rw-r--r--tests/j_corrupt_commit_csum/expect18
-rw-r--r--tests/j_corrupt_commit_csum/image.gzbin0 -> 2949 bytes
-rw-r--r--tests/j_corrupt_commit_csum/name1
-rw-r--r--tests/j_corrupt_commit_csum/script44
-rw-r--r--tests/j_corrupt_commit_tid/expect17
-rw-r--r--tests/j_corrupt_commit_tid/image.gzbin0 -> 2953 bytes
-rw-r--r--tests/j_corrupt_commit_tid/name1
-rw-r--r--tests/j_corrupt_commit_tid/script44
-rw-r--r--tests/j_corrupt_descr_csum/expect18
-rw-r--r--tests/j_corrupt_descr_csum/image.gzbin0 -> 2989 bytes
-rw-r--r--tests/j_corrupt_descr_csum/name1
-rw-r--r--tests/j_corrupt_descr_csum/script44
-rw-r--r--tests/j_corrupt_descr_tid/expect17
-rw-r--r--tests/j_corrupt_descr_tid/image.gzbin0 -> 2999 bytes
-rw-r--r--tests/j_corrupt_descr_tid/name1
-rw-r--r--tests/j_corrupt_descr_tid/script44
-rw-r--r--tests/j_corrupt_ext_jnl_sb_block/expect5
-rw-r--r--tests/j_corrupt_ext_jnl_sb_block/image.tar.bz2bin0 -> 939 bytes
-rw-r--r--tests/j_corrupt_ext_jnl_sb_block/name1
-rw-r--r--tests/j_corrupt_ext_jnl_sb_block/script32
-rw-r--r--tests/j_corrupt_ext_jnl_sb_csum/expect27
-rw-r--r--tests/j_corrupt_ext_jnl_sb_csum/image.tar.bz2bin0 -> 929 bytes
-rw-r--r--tests/j_corrupt_ext_jnl_sb_csum/name1
-rw-r--r--tests/j_corrupt_ext_jnl_sb_csum/script36
-rw-r--r--tests/j_corrupt_journal_block/expect20
-rw-r--r--tests/j_corrupt_journal_block/image.gzbin0 -> 2984 bytes
-rw-r--r--tests/j_corrupt_journal_block/name1
-rw-r--r--tests/j_corrupt_journal_block/script45
-rw-r--r--tests/j_corrupt_revoke_block/expect17
-rw-r--r--tests/j_corrupt_revoke_block/image.gzbin0 -> 3038 bytes
-rw-r--r--tests/j_corrupt_revoke_block/name1
-rw-r--r--tests/j_corrupt_revoke_block/script44
-rw-r--r--tests/j_corrupt_revoke_csum/expect17
-rw-r--r--tests/j_corrupt_revoke_csum/image.gzbin0 -> 3034 bytes
-rw-r--r--tests/j_corrupt_revoke_csum/name1
-rw-r--r--tests/j_corrupt_revoke_csum/script44
-rw-r--r--tests/j_corrupt_revoke_rcount/expect.19
-rw-r--r--tests/j_corrupt_revoke_rcount/expect.27
-rw-r--r--tests/j_corrupt_revoke_rcount/image.gzbin0 -> 8648 bytes
-rw-r--r--tests/j_corrupt_revoke_rcount/name1
-rw-r--r--tests/j_corrupt_sb_csum/expect21
-rw-r--r--tests/j_corrupt_sb_csum/image.gzbin0 -> 3030 bytes
-rw-r--r--tests/j_corrupt_sb_csum/name1
-rw-r--r--tests/j_corrupt_sb_csum/script44
-rw-r--r--tests/j_corrupt_sb_magic/expect42
-rw-r--r--tests/j_corrupt_sb_magic/image.gzbin0 -> 3036 bytes
-rw-r--r--tests/j_corrupt_sb_magic/name1
-rw-r--r--tests/j_corrupt_sb_magic/script44
-rw-r--r--tests/j_ext_dumpe2fs/expect55
-rw-r--r--tests/j_ext_dumpe2fs/image.gzbin0 -> 2963 bytes
-rw-r--r--tests/j_ext_dumpe2fs/name1
-rw-r--r--tests/j_ext_dumpe2fs/script34
-rw-r--r--tests/j_ext_long_revoke_trans/expect91
-rw-r--r--tests/j_ext_long_revoke_trans/name1
-rw-r--r--tests/j_ext_long_revoke_trans/script65
-rw-r--r--tests/j_ext_long_trans/expect106
-rw-r--r--tests/j_ext_long_trans/name1
-rw-r--r--tests/j_ext_long_trans/script62
-rw-r--r--tests/j_long_revoke_trans/expect81
-rw-r--r--tests/j_long_revoke_trans/name1
-rw-r--r--tests/j_long_revoke_trans/script52
-rw-r--r--tests/j_long_revoke_trans_mcsum_32bit/expect117
-rw-r--r--tests/j_long_revoke_trans_mcsum_32bit/name1
-rw-r--r--tests/j_long_revoke_trans_mcsum_32bit/script56
-rw-r--r--tests/j_long_revoke_trans_mcsum_64bit/expect132
-rw-r--r--tests/j_long_revoke_trans_mcsum_64bit/name1
-rw-r--r--tests/j_long_revoke_trans_mcsum_64bit/script56
-rw-r--r--tests/j_long_trans/expect109
-rw-r--r--tests/j_long_trans/name1
-rw-r--r--tests/j_long_trans/script49
-rw-r--r--tests/j_long_trans_mcsum_32bit/expect148
-rw-r--r--tests/j_long_trans_mcsum_32bit/name1
-rw-r--r--tests/j_long_trans_mcsum_32bit/script53
-rw-r--r--tests/j_long_trans_mcsum_64bit/expect147
-rw-r--r--tests/j_long_trans_mcsum_64bit/name1
-rw-r--r--tests/j_long_trans_mcsum_64bit/script53
-rw-r--r--tests/j_recover_csum2_32bit/expect.118
-rw-r--r--tests/j_recover_csum2_32bit/expect.27
-rw-r--r--tests/j_recover_csum2_32bit/image.bz2bin0 -> 3371 bytes
-rw-r--r--tests/j_recover_csum2_32bit/name1
-rwxr-xr-xtests/j_recover_csum2_32bit/script30
-rw-r--r--tests/j_recover_csum2_64bit/expect.118
-rw-r--r--tests/j_recover_csum2_64bit/expect.27
-rw-r--r--tests/j_recover_csum2_64bit/image.bz2bin0 -> 3486 bytes
-rw-r--r--tests/j_recover_csum2_64bit/name1
-rwxr-xr-xtests/j_recover_csum2_64bit/script30
-rw-r--r--tests/j_recover_csum3_64bit/expect.116
-rw-r--r--tests/j_recover_csum3_64bit/expect.27
-rw-r--r--tests/j_recover_csum3_64bit/image.bz2bin0 -> 4150 bytes
-rw-r--r--tests/j_recover_csum3_64bit/name1
-rwxr-xr-xtests/j_recover_csum3_64bit/script30
-rw-r--r--tests/j_recover_fast_commit/commands4
-rw-r--r--tests/j_recover_fast_commit/expect22
-rw-r--r--tests/j_recover_fast_commit/image.gzbin0 -> 3595 bytes
-rwxr-xr-xtests/j_recover_fast_commit/script26
-rw-r--r--tests/j_short_revoke_trans/expect32
-rw-r--r--tests/j_short_revoke_trans/name1
-rw-r--r--tests/j_short_revoke_trans/script54
-rw-r--r--tests/j_short_revoke_trans_mcsum_64bit/expect34
-rw-r--r--tests/j_short_revoke_trans_mcsum_64bit/name1
-rw-r--r--tests/j_short_revoke_trans_mcsum_64bit/script58
-rw-r--r--tests/j_short_trans/expect40
-rw-r--r--tests/j_short_trans/name1
-rw-r--r--tests/j_short_trans/script51
-rw-r--r--tests/j_short_trans_64bit/expect42
-rw-r--r--tests/j_short_trans_64bit/name1
-rw-r--r--tests/j_short_trans_64bit/script55
-rw-r--r--tests/j_short_trans_mcsum_64bit/expect42
-rw-r--r--tests/j_short_trans_mcsum_64bit/name1
-rw-r--r--tests/j_short_trans_mcsum_64bit/script55
-rw-r--r--tests/j_short_trans_old_csum/expect42
-rw-r--r--tests/j_short_trans_old_csum/name1
-rw-r--r--tests/j_short_trans_old_csum/script55
-rw-r--r--tests/j_short_trans_open_recover/expect45
-rw-r--r--tests/j_short_trans_open_recover/name1
-rw-r--r--tests/j_short_trans_open_recover/script57
-rw-r--r--tests/j_short_trans_recover/expect42
-rw-r--r--tests/j_short_trans_recover/name1
-rw-r--r--tests/j_short_trans_recover/script58
-rw-r--r--tests/j_short_trans_recover_mcsum_64bit/expect44
-rw-r--r--tests/j_short_trans_recover_mcsum_64bit/name1
-rw-r--r--tests/j_short_trans_recover_mcsum_64bit/script62
-rw-r--r--tests/j_short_uncommitted_trans/expect26
-rw-r--r--tests/j_short_uncommitted_trans/name1
-rw-r--r--tests/j_short_uncommitted_trans/script51
-rw-r--r--tests/j_short_uncommitted_trans_mcsum_64bit/expect28
-rw-r--r--tests/j_short_uncommitted_trans_mcsum_64bit/name1
-rw-r--r--tests/j_short_uncommitted_trans_mcsum_64bit/script55
-rw-r--r--tests/m_64bit_flexbg/expect.159
-rw-r--r--tests/m_64bit_flexbg/script4
-rw-r--r--tests/m_assume_storage_prezeroed/expect2
-rw-r--r--tests/m_assume_storage_prezeroed/script63
-rw-r--r--tests/m_bigjournal/expect.1576
-rw-r--r--tests/m_bigjournal/script13
-rw-r--r--tests/m_dasd_bs/expect.168
-rw-r--r--tests/m_dasd_bs/script6
-rw-r--r--tests/m_desc_size_128/expect.1841
-rw-r--r--tests/m_desc_size_128/script7
-rw-r--r--tests/m_devdir/script32
-rw-r--r--tests/m_error_behavior/expect24
-rwxr-xr-xtests/m_error_behavior/script110
-rw-r--r--tests/m_extent_journal/expect.1118
-rw-r--r--tests/m_extent_journal/script7
-rw-r--r--tests/m_hugefile/expect19
-rw-r--r--tests/m_hugefile/name1
-rw-r--r--tests/m_hugefile/script114
-rw-r--r--tests/m_hugefile_slack/expect19
-rw-r--r--tests/m_hugefile_slack/name1
-rw-r--r--tests/m_hugefile_slack/script53
-rw-r--r--tests/m_image_mmp/expect.17
-rw-r--r--tests/m_image_mmp/name1
-rw-r--r--tests/m_image_mmp/script22
-rw-r--r--tests/m_large_file/expect.157
-rw-r--r--tests/m_large_file/script7
-rw-r--r--tests/m_mcsum_extjournal/expect5
-rw-r--r--tests/m_mcsum_extjournal/name1
-rw-r--r--tests/m_mcsum_extjournal/script27
-rw-r--r--tests/m_meta_bg/expect.1838
-rw-r--r--tests/m_meta_bg/script7
-rw-r--r--tests/m_minrootdir/expect217
-rw-r--r--tests/m_minrootdir/output.sed5
-rw-r--r--tests/m_minrootdir/script80
-rw-r--r--tests/m_mkfs_overhead/expect1
-rw-r--r--tests/m_mkfs_overhead/script29
-rw-r--r--tests/m_mmp/expect.179
-rw-r--r--tests/m_mmp/script8
-rw-r--r--tests/m_mmp_bad_csum/expect23
-rw-r--r--tests/m_mmp_bad_csum/image.gzbin0 -> 2594 bytes
-rw-r--r--tests/m_mmp_bad_csum/name1
-rw-r--r--tests/m_mmp_bad_csum/script27
-rw-r--r--tests/m_mmp_bad_magic/.log9
-rw-r--r--tests/m_mmp_bad_magic/expect22
-rw-r--r--tests/m_mmp_bad_magic/image.gzbin0 -> 2597 bytes
-rw-r--r--tests/m_mmp_bad_magic/name1
-rw-r--r--tests/m_mmp_bad_magic/script27
-rw-r--r--tests/m_no_opt/expect.1105
-rw-r--r--tests/m_no_opt/script7
-rwxr-xr-xtests/m_offset/script34
-rw-r--r--tests/m_quota/expect.1161
-rw-r--r--tests/m_quota/script11
-rw-r--r--tests/m_raid_opt/expect.1841
-rw-r--r--tests/m_raid_opt/script7
-rw-r--r--tests/m_resize_inode_meta_bg/expect.1172
-rw-r--r--tests/m_resize_inode_meta_bg/script7
-rw-r--r--tests/m_root_owner/expect.157
-rw-r--r--tests/m_root_owner/script4
-rw-r--r--tests/m_rootdir/expect120
-rw-r--r--tests/m_rootdir/output.sed5
-rw-r--r--tests/m_rootdir/script70
-rw-r--r--tests/m_rootdir_acl/expect119
-rw-r--r--tests/m_rootdir_acl/output.sed5
-rw-r--r--tests/m_rootdir_acl/script110
-rw-r--r--tests/m_std/expect.1108
-rw-r--r--tests/m_std/script6
-rw-r--r--tests/m_uninit/expect.1158
-rw-r--r--tests/m_uninit/script7
-rw-r--r--tests/mke2fs.conf.in43
-rw-r--r--tests/progs/Makefile.in83
-rw-r--r--tests/progs/crcsum.c67
-rw-r--r--tests/progs/hold_inode.c48
-rw-r--r--tests/progs/random_exercise.c171
-rw-r--r--tests/progs/test_data/bma.setup1
-rw-r--r--tests/progs/test_data/expect.brel41
-rw-r--r--tests/progs/test_data/expect.icount193
-rw-r--r--tests/progs/test_data/expect.irel62
-rw-r--r--tests/progs/test_data/ima.setup1
-rw-r--r--tests/progs/test_data/normal.setup1
-rw-r--r--tests/progs/test_data/opt.setup1
-rw-r--r--tests/progs/test_data/test.brel47
-rw-r--r--tests/progs/test_data/test.icount136
-rw-r--r--tests/progs/test_data/test.irel69
-rw-r--r--tests/progs/test_icount.c384
-rw-r--r--tests/progs/test_icount.h10
-rw-r--r--tests/progs/test_icount_cmds.ct37
-rw-r--r--tests/progs/test_rel.c764
-rw-r--r--tests/progs/test_rel.h35
-rw-r--r--tests/progs/test_rel_cmds.ct82
-rw-r--r--tests/r_1024_small_bg/script30
-rw-r--r--tests/r_32to64bit/expect100
-rw-r--r--tests/r_32to64bit/name1
-rw-r--r--tests/r_32to64bit/script72
-rw-r--r--tests/r_32to64bit_expand_full/expect139
-rw-r--r--tests/r_32to64bit_expand_full/name1
-rw-r--r--tests/r_32to64bit_expand_full/script81
-rw-r--r--tests/r_32to64bit_meta/expect81
-rw-r--r--tests/r_32to64bit_meta/name1
-rw-r--r--tests/r_32to64bit_meta/script72
-rw-r--r--tests/r_32to64bit_move_itable/expect108
-rw-r--r--tests/r_32to64bit_move_itable/name1
-rw-r--r--tests/r_32to64bit_move_itable/script72
-rw-r--r--tests/r_64bit_big_expand/is_slow_test0
-rw-r--r--tests/r_64bit_big_expand/script35
-rw-r--r--tests/r_64to32bit/expect99
-rw-r--r--tests/r_64to32bit/name1
-rw-r--r--tests/r_64to32bit/script74
-rw-r--r--tests/r_64to32bit_meta/expect81
-rw-r--r--tests/r_64to32bit_meta/name1
-rw-r--r--tests/r_64to32bit_meta/script74
-rw-r--r--tests/r_bigalloc_big_expand/script36
-rw-r--r--tests/r_corrupt_fs/expect4
-rw-r--r--tests/r_corrupt_fs/name1
-rw-r--r--tests/r_corrupt_fs/script45
-rw-r--r--tests/r_expand_full/expect375
-rw-r--r--tests/r_expand_full/name1
-rw-r--r--tests/r_expand_full/script83
-rw-r--r--tests/r_ext4_big_expand/is_slow_test0
-rw-r--r--tests/r_ext4_big_expand/script35
-rw-r--r--tests/r_ext4_small_bg/script29
-rw-r--r--tests/r_fixup_lastbg/expect39
-rwxr-xr-xtests/r_fixup_lastbg/script35
-rw-r--r--tests/r_fixup_lastbg_big/expect45
-rwxr-xr-xtests/r_fixup_lastbg_big/script40
-rw-r--r--tests/r_inline_xattr/expect14
-rw-r--r--tests/r_inline_xattr/image.gzbin0 -> 18907 bytes
-rw-r--r--tests/r_inline_xattr/name1
-rw-r--r--tests/r_inline_xattr/script51
-rw-r--r--tests/r_meta_bg_shrink/script32
-rw-r--r--tests/r_min_itable/expect15
-rw-r--r--tests/r_min_itable/image.gzbin0 -> 3597 bytes
-rw-r--r--tests/r_min_itable/name1
-rw-r--r--tests/r_min_itable/script42
-rw-r--r--tests/r_move_inode_int_extent/expect15
-rw-r--r--tests/r_move_inode_int_extent/image.gzbin0 -> 20687 bytes
-rw-r--r--tests/r_move_inode_int_extent/name1
-rw-r--r--tests/r_move_inode_int_extent/script42
-rw-r--r--tests/r_move_itable/expect2655
-rw-r--r--tests/r_move_itable/name1
-rw-r--r--tests/r_move_itable/script103
-rw-r--r--tests/r_move_itable_nostride/expect61
-rw-r--r--tests/r_move_itable_nostride/name1
-rw-r--r--tests/r_move_itable_nostride/script58
-rw-r--r--tests/r_move_itable_realloc/expect60
-rw-r--r--tests/r_move_itable_realloc/name1
-rw-r--r--tests/r_move_itable_realloc/script58
-rw-r--r--tests/r_resize_inode/expect2231
-rw-r--r--tests/r_resize_inode/name1
-rw-r--r--tests/r_resize_inode/script95
-rw-r--r--tests/run_e2fsck112
-rw-r--r--tests/run_mke2fs27
-rwxr-xr-xtests/scripts/gen-test-data23
-rwxr-xr-xtests/scripts/mkdup49
-rwxr-xr-xtests/scripts/repair-test9
-rwxr-xr-xtests/scripts/resize_test183
-rw-r--r--tests/t_change_uuid/expect7
-rwxr-xr-xtests/t_change_uuid/script34
-rw-r--r--tests/t_change_uuid_mcsum/expect7
-rwxr-xr-xtests/t_change_uuid_mcsum/script34
-rw-r--r--tests/t_change_uuid_mcsum_mounted/expect7
-rwxr-xr-xtests/t_change_uuid_mcsum_mounted/script34
-rw-r--r--tests/t_change_uuid_mcsum_seed_mounted/expect21
-rwxr-xr-xtests/t_change_uuid_mcsum_seed_mounted/script52
-rw-r--r--tests/t_change_uuid_mounted/expect7
-rwxr-xr-xtests/t_change_uuid_mounted/script34
-rw-r--r--tests/t_dangerous/expect120
-rw-r--r--tests/t_dangerous/name1
-rw-r--r--tests/t_dangerous/script155
-rw-r--r--tests/t_disable_changed_csum_seed/expect17
-rwxr-xr-xtests/t_disable_changed_csum_seed/script47
-rw-r--r--tests/t_disable_changed_csum_seed_mounted/expect19
-rwxr-xr-xtests/t_disable_changed_csum_seed_mounted/script47
-rw-r--r--tests/t_disable_csum_seed/expect14
-rwxr-xr-xtests/t_disable_csum_seed/script43
-rw-r--r--tests/t_disable_mcsum/expect45
-rw-r--r--tests/t_disable_mcsum/name1
-rw-r--r--tests/t_disable_mcsum/script67
-rw-r--r--tests/t_disable_mcsum_noinitbg/expect68
-rw-r--r--tests/t_disable_mcsum_noinitbg/name1
-rw-r--r--tests/t_disable_mcsum_noinitbg/script67
-rw-r--r--tests/t_disable_mcsum_yesinitbg/expect45
-rw-r--r--tests/t_disable_mcsum_yesinitbg/name1
-rw-r--r--tests/t_disable_mcsum_yesinitbg/script67
-rw-r--r--tests/t_disable_meta_csum_and_seed/expect14
-rwxr-xr-xtests/t_disable_meta_csum_and_seed/script44
-rw-r--r--tests/t_enable_csum_seed/expect12
-rwxr-xr-xtests/t_enable_csum_seed/script38
-rw-r--r--tests/t_enable_mcsum/expect80
-rw-r--r--tests/t_enable_mcsum/name1
-rw-r--r--tests/t_enable_mcsum/script70
-rw-r--r--tests/t_enable_mcsum_ext3/expect75
-rw-r--r--tests/t_enable_mcsum_ext3/name1
-rw-r--r--tests/t_enable_mcsum_ext3/script70
-rw-r--r--tests/t_enable_mcsum_initbg/expect100
-rw-r--r--tests/t_enable_mcsum_initbg/name1
-rw-r--r--tests/t_enable_mcsum_initbg/script70
-rw-r--r--tests/t_ext_jnl_fail/expect6
-rw-r--r--tests/t_ext_jnl_fail/name1
-rw-r--r--tests/t_ext_jnl_fail/script30
-rw-r--r--tests/t_ext_jnl_rm/script26
-rw-r--r--tests/t_format_csum_seed/expect10
-rwxr-xr-xtests/t_format_csum_seed/script34
-rw-r--r--tests/t_iexpand_full/expect39
-rw-r--r--tests/t_iexpand_full/name1
-rw-r--r--tests/t_iexpand_full/script83
-rw-r--r--tests/t_iexpand_mcsum/expect57
-rw-r--r--tests/t_iexpand_mcsum/name1
-rw-r--r--tests/t_iexpand_mcsum/script84
-rw-r--r--tests/t_mmp_1on/name1
-rw-r--r--tests/t_mmp_1on/script29
-rw-r--r--tests/t_mmp_2off/name1
-rw-r--r--tests/t_mmp_2off/script29
-rw-r--r--tests/t_mmp_fail/is_slow_test0
-rw-r--r--tests/t_mmp_fail/name1
-rw-r--r--tests/t_mmp_fail/script44
-rw-r--r--tests/t_project_1on/name1
-rw-r--r--tests/t_project_1on/script41
-rw-r--r--tests/t_project_2off/name1
-rw-r--r--tests/t_project_2off/script35
-rw-r--r--tests/t_project_3on/name1
-rw-r--r--tests/t_project_3on/script41
-rw-r--r--tests/t_project_4off/name1
-rw-r--r--tests/t_project_4off/script35
-rw-r--r--tests/t_quota_1on/name1
-rw-r--r--tests/t_quota_1on/script42
-rw-r--r--tests/t_quota_2off/name1
-rw-r--r--tests/t_quota_2off/script35
-rw-r--r--tests/t_quota_add/name1
-rw-r--r--tests/t_quota_add/script46
-rw-r--r--tests/t_replay_and_set/expect38
-rw-r--r--tests/t_replay_and_set/name1
-rw-r--r--tests/t_replay_and_set/script51
-rw-r--r--tests/t_uninit_bg_rm/expect21
-rw-r--r--tests/t_uninit_bg_rm/script55
-rw-r--r--tests/t_write_subdirectory/name1
-rw-r--r--tests/t_write_subdirectory/script29
-rw-r--r--tests/test_config48
-rw-r--r--tests/test_one.in92
-rwxr-xr-xtests/test_post17
-rw-r--r--tests/test_script.in52
-rw-r--r--tests/u_bounce_io/expect.1108
-rw-r--r--tests/u_bounce_io/script9
-rw-r--r--tests/u_compound_bad_rollback/script62
-rw-r--r--tests/u_compound_rollback/script62
-rw-r--r--tests/u_corrupt_blk_csum/script38
-rw-r--r--tests/u_corrupt_blk_csum_force/script38
-rw-r--r--tests/u_corrupt_hdr_csum/script37
-rw-r--r--tests/u_corrupt_key_csum/script37
-rw-r--r--tests/u_debugfs_opt/script34
-rw-r--r--tests/u_direct_io/expect63
-rw-r--r--tests/u_direct_io/script49
-rw-r--r--tests/u_dryrun/script32
-rw-r--r--tests/u_e2fsck_opt/script32
-rw-r--r--tests/u_errorout/script49
-rw-r--r--tests/u_force/script40
-rw-r--r--tests/u_force_dryrun/script38
-rw-r--r--tests/u_incomplete/script38
-rw-r--r--tests/u_mke2fs/script34
-rw-r--r--tests/u_mke2fs_opt/script32
-rw-r--r--tests/u_mke2fs_opt_oddsize/script31
-rw-r--r--tests/u_mke2fs_opt_offset/script104
-rw-r--r--tests/u_not_undo/script28
-rw-r--r--tests/u_offset/script138
-rw-r--r--tests/u_onefile_bad/script115
-rw-r--r--tests/u_resize2fs_opt/script32
-rw-r--r--tests/u_revert_64bitmcsum_onefile/script112
-rw-r--r--tests/u_revert_all_onefile/script100
-rw-r--r--tests/u_revert_upgrade_to_64bitmcsum/script136
-rw-r--r--tests/u_tune2fs/script34
-rw-r--r--tests/u_tune2fs_opt/script32
-rw-r--r--tests/u_undo_undo/script54
-rw-r--r--tests/u_wrong_fs/script36
-rw-r--r--util/Makefile.in74
-rw-r--r--util/all.exclude15
-rw-r--r--util/android-README.version.in3
-rw-r--r--util/android_config.h69
-rw-r--r--util/android_types.h45
-rw-r--r--util/copy_sparse.c228
-rwxr-xr-xutil/gen-android-files118
-rwxr-xr-xutil/gen-git-tarball17
-rwxr-xr-xutil/gen-sample-fs40
-rw-r--r--util/gen-tarball.in50
-rwxr-xr-xutil/get-ver4
-rw-r--r--util/install-symlink.in89
-rw-r--r--util/libecho.c78
-rw-r--r--util/mkutf8data.c3392
-rw-r--r--util/subst.c468
-rw-r--r--util/subst.conf.in26
-rw-r--r--util/symlinks.c391
-rw-r--r--util/ucd/README37
-rw-r--r--version.h13
-rw-r--r--wordwrap.pl29
2167 files changed, 511883 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..51b27c8
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,116 @@
+name: CI
+on: [push]
+env:
+ DEF_CFLAGS: -O2 -g -Wall
+
+jobs:
+ gcc-build-and-test:
+ name: Build and test with gcc
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS"
+ - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 install V=1 DESTDIR=$PWD/installdir
+ - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
+
+ clang-build-and-test:
+ name: Build and test with clang
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y clang
+ - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS"
+ - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 install V=1 DESTDIR=$PWD/installdir
+ - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
+
+ i386-build-and-test:
+ name: Build and test with gcc -m32
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y gcc-multilib
+ - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS -m32" LDFLAGS="-m32"
+ - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 install V=1 DESTDIR=$PWD/installdir
+ - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
+
+ asan-build-and-test:
+ name: Build and test with ASAN enabled
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y clang
+ - run: echo "ASAN_CFLAGS=$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address" >> $GITHUB_ENV
+ - run: ./configure CC=clang CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS"
+ - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
+
+ ubsan-build-and-test:
+ name: Build and test with UBSAN enabled
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y clang
+ - run: echo "UBSAN_CFLAGS=$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" >> $GITHUB_ENV
+ - run: ./configure CC=clang CFLAGS="$UBSAN_CFLAGS" LDFLAGS="$UBSAN_CFLAGS"
+ - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
+
+ macos-build-and-test:
+ name: Build and test on macOS
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v3
+ - run: ./configure CFLAGS="$DEF_CFLAGS"
+ # -Wno-error=deprecated-declarations is needed to suppress known warnings
+ # due to e2fsprogs' use of sbrk(0) and daemon().
+ - run: make -j8 check V=1 CFLAGS_WARN="-Werror -Wno-error=deprecated-declarations"
+ - run: make -j8 install DESTDIR=$PWD/installdir
+ - run: make -j8 uninstall DESTDIR=$PWD/installdir
+
+ windows-msys2-build:
+ name: Build mke2fs on Windows with ${{matrix.sys}}
+ runs-on: windows-latest
+ strategy:
+ matrix:
+ include:
+ - { sys: mingw32, env: i686 }
+ - { sys: mingw64, env: x86_64 }
+ defaults:
+ run:
+ shell: msys2 {0}
+ steps:
+ - uses: actions/checkout@v3
+ - uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{matrix.sys}}
+ update: true
+ install: >
+ make
+ mingw-w64-${{matrix.env}}-cc
+ # For now the only parts that actually build for Windows are mke2fs and its
+ # dependencies: all libraries except libss. The build system doesn't want
+ # to build just those parts, though, so do it one step at a time...
+ - run: ./configure CFLAGS="$DEF_CFLAGS"
+ - run: make -j8 subs V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 -C lib/et/ all V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 -C lib/uuid/ all V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 -C lib/blkid/ all V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 -C lib/ext2fs/ all V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 -C lib/support/ all V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 -C lib/e2p/ all V=1 CFLAGS_WARN="-Werror"
+ - run: make -j8 -C misc/ mke2fs V=1 CFLAGS_WARN="-Werror"
+ - run: touch image.ext4
+ - run: misc/mke2fs.exe -T ext4 image.ext4 128M
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5288836
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,237 @@
+autom4te.cache
+build
+build.profiled
+build.static
+FILES
+^core
+*~
+patches
+Makefile
+*.bak
+*.diff
+*.dSYM
+*.o
+*.a
+*.orig
+*.patch
+*.pc
+*.rej
+*.swp
+00[0-9][1-9]*.patch
+MCONFIG
+asm_types.h
+config.log
+config.status
+cscope.*
+debugfs/extent_cmds.c
+debugfs/debug_cmds.c
+debugfs/debugfs
+debugfs/debugfs.8
+debugfs/extent_cmds.c
+debugfs/tst_set_fields
+doc/libext2fs.aux
+doc/libext2fs.cp
+doc/libext2fs.dvi
+doc/libext2fs.fn
+doc/libext2fs.fns
+doc/libext2fs.info
+doc/libext2fs.ky
+doc/libext2fs.log
+doc/libext2fs.pg
+doc/libext2fs.toc
+doc/libext2fs.tp
+doc/libext2fs.vr
+e2fsck/crc32table.h
+e2fsck/e2fsck
+e2fsck/e2fsck.8
+e2fsck/e2fsck.conf.5
+e2fsck/e2fsck.shared
+e2fsck/e2fsck.static
+e2fsck/gen_crc32table
+e2fsck/prof_err.c
+e2fsck/prof_err.h
+e2fsck/tst_crc32
+e2fsck/tst_problem
+e2fsck/tst_refcount
+e2fsck/tst_region
+e2fsprogs.spec
+ext2ed/ext2ed.conf
+ext2ed/ext2ed.8
+intl/charset.alias
+intl/libgnuintl.h
+intl/libintl.a
+intl/libintl.h
+intl/ref-add.sed
+intl/ref-del.sed
+lib/blkid/blkid.h
+lib/blkid/blkid.pc
+lib/blkid/blkid_types.h
+lib/blkid/libblkid.3
+lib/blkid/subdirs
+lib/blkid/test_probe
+lib/blkid/tests/*.ok
+lib/blkid/tests/*.out
+lib/blkid/tests/tmp
+lib/blkid/tst_cache
+lib/blkid/tst_dev
+lib/blkid/tst_devname
+lib/blkid/tst_devno
+lib/blkid/tst_getsize
+lib/blkid/tst_probe
+lib/blkid/tst_read
+lib/blkid/tst_resolve
+lib/blkid/tst_save
+lib/blkid/tst_tag
+lib/blkid/tst_types
+lib/config.h
+lib/dirpaths.h
+lib/e2p/e2p.pc
+lib/e2p/subdirs
+lib/e2p/tst_feature
+lib/e2p/tst_ostype
+lib/et/com_err.pc
+lib/et/compile_et
+lib/et/subdirs
+lib/ext2fs/crc32c_table.h
+lib/ext2fs/debug_cmds.c
+lib/ext2fs/ext2_err.c
+lib/ext2fs/ext2_err.et
+lib/ext2fs/ext2_err.h
+lib/ext2fs/ext2_types.h
+lib/ext2fs/ext2fs.pc
+lib/ext2fs/extent_cmds.c
+lib/ext2fs/gen_crc32ctable
+lib/ext2fs/subdirs
+lib/ext2fs/tst_badblocks
+lib/ext2fs/tst_bitmaps
+lib/ext2fs/tst_bitmaps_cmd.c
+lib/ext2fs/tst_bitmaps_out
+lib/ext2fs/tst_bitops
+lib/ext2fs/tst_cmds.c
+lib/ext2fs/tst_csum
+lib/ext2fs/tst_crc32c
+lib/ext2fs/tst_digest_encode
+lib/ext2fs/tst_getsectsize
+lib/ext2fs/tst_getsize
+lib/ext2fs/tst_icount
+lib/ext2fs/tst_inline
+lib/ext2fs/tst_inline_data
+lib/ext2fs/tst_inode_size
+lib/ext2fs/tst_iscan
+lib/ext2fs/tst_libext2fs
+lib/ext2fs/tst_sha256
+lib/ext2fs/tst_sha512
+lib/ext2fs/tst_super_size
+lib/ext2fs/tst_types
+lib/quota/subdirs
+lib/ss/mk_cmds
+lib/ss/ss.pc
+lib/ss/ss_err.c
+lib/ss/ss_err.h
+lib/ss/std_rqs.c
+lib/ss/subdirs
+lib/ss/test.diff
+lib/ss/test_cmd.c
+lib/ss/test_out
+lib/ss/test_ss
+lib/support/prof_err.c
+lib/support/prof_err.h
+lib/support/subdirs
+lib/uuid/subdirs
+lib/uuid/tst_uuid
+lib/uuid/uuid.3
+lib/uuid/uuid.h
+lib/uuid/uuid.pc
+lib/uuid/uuid_clear.3
+lib/uuid/uuid_compare.3
+lib/uuid/uuid_copy.3
+lib/uuid/uuid_generate.3
+lib/uuid/uuid_is_null.3
+lib/uuid/uuid_parse.3
+lib/uuid/uuid_time
+lib/uuid/uuid_time.3
+lib/uuid/uuid_types.h
+lib/uuid/uuid_unparse.3
+misc/badblocks
+misc/badblocks.8
+misc/base_device
+misc/base_device.out
+misc/blkid
+misc/blkid.8
+misc/chattr
+misc/chattr.1
+misc/default_profile.c
+misc/dumpe2fs
+misc/dumpe2fs.8
+misc/e2freefrag
+misc/e2freefrag.8
+misc/e2fuzz
+misc/e2image
+misc/e2image.8
+misc/e2initrd_helper
+misc/e2label.8
+misc/e2mmpstatus
+misc/e2mmpstatus.8
+misc/e2undo
+misc/e2undo.8
+misc/e4crypt
+misc/e4crypt.8
+misc/e4defrag
+misc/e4defrag.8
+misc/ext4.5
+misc/filefrag
+misc/filefrag.8
+misc/findfs.8
+misc/findsuper
+misc/fsck
+misc/fsck.8
+misc/fuse2fs
+misc/fuse2fs.1
+misc/logsave
+misc/logsave.8
+misc/lsattr
+misc/lsattr.1
+misc/mke2fs
+misc/mke2fs.8
+misc/mke2fs.conf.5
+misc/mke2fs.conf
+misc/mklost+found
+misc/mklost+found.8
+misc/prof_err.c
+misc/prof_err.h
+misc/profile.h
+misc/tune2fs
+misc/tune2fs.8
+misc/uuidd
+misc/uuidd.8
+misc/uuidgen
+misc/uuidgen.1
+ncscope.*
+parse-types.log
+po/Makefile.in
+po/POTFILES
+public_config.h
+resize/resize2fs
+resize/resize2fs.8
+resize/test_extent
+resize/test_extent.out
+tags
+TAGS
+tests/progs/test_icount
+tests/progs/test_icount_cmds.c
+tests/progs/crcsum
+tests/*.ok
+tests/*.failed
+tests/*.log
+tests/*.tmp
+tests/*.slow
+tests/test_data.tmp
+tests/mke2fs.conf
+tests/test_script
+tests/test_one
+util/dirpaths.h
+util/gen-tarball
+util/install-symlink
+util/subst
+util/subst.conf
+Meta
diff --git a/.missing-copyright b/.missing-copyright
new file mode 100644
index 0000000..d99cb32
--- /dev/null
+++ b/.missing-copyright
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+find . -type f \! -name \*~ \! -exec grep -q Begin-Header \{\} \; -print \
+ | grep -v ^./build
diff --git a/.release-checklist b/.release-checklist
new file mode 100644
index 0000000..276dd8a
--- /dev/null
+++ b/.release-checklist
@@ -0,0 +1,19 @@
+1) Do "make depend" if necessary
+
+2) "make check"!!!
+
+3) Use "git log" to assemble release notes and update RELEASE-NOTES symlink.
+
+4) Update files which contain version information
+ version.h
+ README
+ e2fsprogs.lsm
+ e2fsprogs.spec
+ doc/libext2fs.texinfo (three places)
+
+5) Run "(cd po; make e2fsprogs.pot-update)" to update the translation template.
+
+6) Make source tarfile
+
+7) Adjust sizes in e2fsprogs-VER.lsm; rebuild source files; regenerate source tarfile
+
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..3cc8286
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1379 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international! The Free Translation Project is a
+way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages. A few packages already provide translations for their
+messages.
+
+ If you found this 'ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU 'gettext' internally,
+itself available at your nearest GNU archive site. But you do _not_
+need to install GNU 'gettext' prior to configuring, installing or using
+this package with messages translated.
+
+ Installers will find here some useful hints. These notes also
+explain how users should proceed for getting the programs to use the
+available translations. They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+1.1 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language. Most such
+packages use GNU 'gettext'. Other packages have their own ways to
+internationalization, predating GNU 'gettext'.
+
+ By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system already
+provides the GNU 'gettext' functions. Installers may use special
+options at configuration time for changing the default behaviour. The
+command:
+
+ ./configure --disable-nls
+
+will _totally_ disable translation of messages.
+
+ When you already have GNU 'gettext' installed on your system and run
+configure without an option for your new package, 'configure' will
+probably detect the previously built and installed 'libintl' library and
+will decide to use it. If not, you may have to to use the
+'--with-libintl-prefix' option to tell 'configure' where to look for it.
+
+ Internationalized packages usually have many 'po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language. Unless
+translations have been forbidden at 'configure' time by using the
+'--disable-nls' switch, all available translations are installed
+together with the package. However, the environment variable 'LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+'LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.2 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the 'LANG' environment variable to the appropriate
+'LL_CC' combination. If you happen to have the 'LC_ALL' or some other
+'LC_xxx' environment variables set, you should unset them before setting
+'LANG', otherwise the setting of 'LANG' will not have the desired
+effect. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is
+an ISO 3166 two-letter country code. For example, let's suppose that
+you speak German and live in Germany. At the shell prompt, merely
+execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in
+'sh') or 'export LANG=de_DE' (in 'bash'). This can be done from your
+'.login' or '.profile' file, once and for all.
+
+ You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries. For
+example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil. The
+country code serves to distinguish the dialects.
+
+ The locale naming convention of 'LL_CC', with 'LL' denoting the
+language and 'CC' denoting the country, is the one use on systems based
+on GNU libc. On other systems, some variations of this scheme are used,
+such as 'LL' or 'LL_CC.ENCODING'. You can get the list of locales
+supported by your system for your language by running the command
+'locale -a | grep '^LL''.
+
+ Not all programs have translations for all languages. By default, an
+English message is shown in place of a nonexistent translation. If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+'LANGUAGE'. GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG'
+for the purpose of message handling, but you still need to have 'LANG'
+set to the primary language; this is required by other parts of the
+system libraries. For example, some Swedish users who would rather read
+translations in German than English for when Swedish is not available,
+set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'.
+
+ Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from 'no' to 'nb' recently (in 2003). During the
+transition period, while some message catalogs for this language are
+installed under 'nb' and some older ones under 'no', it's recommended
+for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and
+older translations are used.
+
+ In the 'LANGUAGE' environment variable, but not in the 'LANG'
+environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to
+denote the language's main dialect. For example, 'de' is equivalent to
+'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese
+as spoken in Portugal) in this context.
+
+1.3 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list. The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+'http://translationproject.org/', in the "Teams" area.
+
+ If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+'-request' appended. For example, speakers of Swedish can send a
+message to 'sv-request@li.org', having this message body:
+
+ subscribe
+
+ Keep in mind that team members are expected to participate _actively_
+in translations, or at solving translational difficulties, rather than
+merely lurking around. If your team does not exist yet and you want to
+start one, or if you are unsure about what to do or how to get started,
+please write to 'coordinator@translationproject.org' to reach the
+coordinator for all translator teams.
+
+ The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skills are praised more than
+programming skills, here.
+
+1.4 Available Packages
+======================
+
+Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of Jun 2014.
+The matrix shows, in regard of each package, for which languages PO
+files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+ Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs
+ +---------------------------------------------------+
+ a2ps | [] [] [] |
+ aegis | |
+ anubis | |
+ aspell | [] [] [] |
+ bash | [] [] [] |
+ bfd | |
+ binutils | [] |
+ bison | |
+ bison-runtime | [] |
+ buzztrax | [] |
+ ccd2cue | |
+ ccide | |
+ cflow | |
+ clisp | |
+ coreutils | [] [] |
+ cpio | |
+ cppi | |
+ cpplib | [] |
+ cryptsetup | [] |
+ datamash | |
+ denemo | [] [] |
+ dfarc | [] |
+ dialog | [] [] [] |
+ dico | |
+ diffutils | [] |
+ dink | [] |
+ direvent | |
+ doodle | [] |
+ dos2unix | |
+ dos2unix-man | |
+ e2fsprogs | [] [] |
+ enscript | [] |
+ exif | [] |
+ fetchmail | [] [] |
+ findutils | [] |
+ flex | [] |
+ freedink | [] [] |
+ fusionforge | |
+ gas | |
+ gawk | [] |
+ gcal | [] |
+ gcc | |
+ gdbm | |
+ gettext-examples | [] [] [] [] [] |
+ gettext-runtime | [] [] [] |
+ gettext-tools | [] [] |
+ gjay | |
+ glunarclock | [] [] [] |
+ gnubiff | [] |
+ gnubik | [] |
+ gnucash | () () [] |
+ gnuchess | |
+ gnulib | [] |
+ gnunet | |
+ gnunet-gtk | |
+ gold | |
+ gphoto2 | [] |
+ gprof | [] |
+ gramadoir | |
+ grep | [] [] [] |
+ grub | [] |
+ gsasl | |
+ gss | |
+ gst-plugins-bad | [] [] |
+ gst-plugins-base | [] [] [] |
+ gst-plugins-good | [] [] [] |
+ gst-plugins-ugly | [] [] [] |
+ gstreamer | [] [] [] [] |
+ gtick | [] |
+ gtkam | [] [] |
+ gtkspell | [] [] [] [] [] |
+ guix | |
+ guix-packages | |
+ gutenprint | [] |
+ hello | [] |
+ help2man | |
+ help2man-texi | |
+ hylafax | |
+ idutils | |
+ iso_15924 | [] |
+ iso_3166 | [] [] [] [] [] [] [] [] [] [] |
+ iso_3166_2 | |
+ iso_4217 | [] |
+ iso_639 | [] [] [] [] [] [] [] [] [] |
+ iso_639_3 | [] [] |
+ iso_639_5 | |
+ jwhois | |
+ kbd | [] |
+ klavaro | [] [] [] [] [] |
+ ld | [] |
+ leafpad | [] [] [] [] |
+ libc | [] [] [] |
+ libexif | () |
+ libextractor | |
+ libgnutls | [] |
+ libgphoto2 | [] |
+ libgphoto2_port | [] |
+ libgsasl | |
+ libiconv | [] [] |
+ libidn | [] |
+ liferea | [] [] [] [] |
+ lilypond | [] [] |
+ lordsawar | [] |
+ lprng | |
+ lynx | [] [] |
+ m4 | [] |
+ mailfromd | |
+ mailutils | |
+ make | [] |
+ man-db | [] [] |
+ man-db-manpages | |
+ midi-instruments | [] [] [] |
+ minicom | [] |
+ mkisofs | [] |
+ myserver | [] |
+ nano | [] [] [] |
+ opcodes | |
+ parted | [] |
+ pies | |
+ pnmixer | |
+ popt | [] |
+ procps-ng | |
+ procps-ng-man | |
+ psmisc | [] |
+ pspp | [] |
+ pushover | [] |
+ pwdutils | |
+ pyspread | |
+ radius | [] |
+ recode | [] [] [] |
+ recutils | |
+ rpm | |
+ rush | |
+ sarg | |
+ sed | [] [] [] [] |
+ sharutils | [] |
+ shishi | |
+ skribilo | |
+ solfege | [] [] |
+ solfege-manual | |
+ spotmachine | |
+ sudo | [] [] |
+ sudoers | [] [] |
+ sysstat | [] |
+ tar | [] [] [] |
+ texinfo | [] [] |
+ texinfo_document | [] [] |
+ tigervnc | [] |
+ tin | |
+ tin-man | |
+ tracgoogleappsa... | |
+ trader | |
+ util-linux | [] |
+ ve | |
+ vice | |
+ vmm | |
+ vorbis-tools | [] |
+ wastesedge | |
+ wcd | |
+ wcd-man | |
+ wdiff | [] [] |
+ wget | [] |
+ wyslij-po | |
+ xboard | |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] |
+ +---------------------------------------------------+
+ af am an ar as ast az be bg bn bn_IN bs ca crh cs
+ 4 0 2 5 3 11 0 8 25 3 3 1 55 4 74
+
+ da de el en en_GB en_ZA eo es et eu fa fi fr
+ +--------------------------------------------------+
+ a2ps | [] [] [] [] [] [] [] [] [] |
+ aegis | [] [] [] [] |
+ anubis | [] [] [] [] [] |
+ aspell | [] [] [] [] [] [] [] |
+ bash | [] [] [] |
+ bfd | [] [] [] [] |
+ binutils | [] [] [] |
+ bison | [] [] [] [] [] [] [] [] |
+ bison-runtime | [] [] [] [] [] [] [] [] |
+ buzztrax | [] [] [] [] |
+ ccd2cue | [] [] [] [] |
+ ccide | [] [] [] [] [] [] |
+ cflow | [] [] [] [] [] |
+ clisp | [] [] [] [] [] |
+ coreutils | [] [] [] [] [] |
+ cpio | [] [] [] [] [] |
+ cppi | [] [] [] [] [] |
+ cpplib | [] [] [] [] [] [] |
+ cryptsetup | [] [] [] [] [] |
+ datamash | [] [] [] [] |
+ denemo | [] |
+ dfarc | [] [] [] [] [] [] |
+ dialog | [] [] [] [] [] [] [] [] [] |
+ dico | [] [] [] [] |
+ diffutils | [] [] [] [] [] [] |
+ dink | [] [] [] [] [] [] |
+ direvent | [] [] [] [] |
+ doodle | [] [] [] [] |
+ dos2unix | [] [] [] [] [] |
+ dos2unix-man | [] [] [] |
+ e2fsprogs | [] [] [] [] [] |
+ enscript | [] [] [] [] [] [] |
+ exif | [] [] [] [] [] [] |
+ fetchmail | [] () [] [] [] [] [] |
+ findutils | [] [] [] [] [] [] [] [] |
+ flex | [] [] [] [] [] [] |
+ freedink | [] [] [] [] [] [] [] [] |
+ fusionforge | [] [] [] |
+ gas | [] [] [] |
+ gawk | [] [] [] [] [] |
+ gcal | [] [] [] [] |
+ gcc | [] |
+ gdbm | [] [] [] [] [] |
+ gettext-examples | [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] [] |
+ gjay | [] [] [] [] |
+ glunarclock | [] [] [] [] [] |
+ gnubiff | () [] [] () |
+ gnubik | [] [] [] [] [] |
+ gnucash | [] () () () () () () |
+ gnuchess | [] [] [] [] |
+ gnulib | [] [] [] [] [] [] [] |
+ gnunet | [] |
+ gnunet-gtk | [] |
+ gold | [] [] [] |
+ gphoto2 | [] () [] [] |
+ gprof | [] [] [] [] [] [] |
+ gramadoir | [] [] [] [] [] |
+ grep | [] [] [] [] [] [] [] |
+ grub | [] [] [] [] [] |
+ gsasl | [] [] [] [] [] |
+ gss | [] [] [] [] [] |
+ gst-plugins-bad | [] [] [] |
+ gst-plugins-base | [] [] [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] [] [] |
+ gtick | [] () [] [] [] |
+ gtkam | [] () [] [] [] [] |
+ gtkspell | [] [] [] [] [] [] [] [] |
+ guix | [] [] |
+ guix-packages | |
+ gutenprint | [] [] [] [] |
+ hello | [] [] [] [] [] [] [] [] |
+ help2man | [] [] [] [] [] [] [] |
+ help2man-texi | [] [] [] |
+ hylafax | [] [] |
+ idutils | [] [] [] [] [] |
+ iso_15924 | [] () [] [] () [] () |
+ iso_3166 | [] () [] [] [] [] () [] () |
+ iso_3166_2 | [] () () () |
+ iso_4217 | [] () [] [] [] () [] () |
+ iso_639 | [] () [] [] () [] () |
+ iso_639_3 | () () () |
+ iso_639_5 | () () () |
+ jwhois | [] [] [] [] [] |
+ kbd | [] [] [] [] [] [] |
+ klavaro | [] [] [] [] [] [] [] |
+ ld | [] [] [] [] |
+ leafpad | [] [] [] [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] [] () [] [] |
+ libextractor | [] |
+ libgnutls | [] [] [] [] |
+ libgphoto2 | [] () [] |
+ libgphoto2_port | [] () [] [] [] [] |
+ libgsasl | [] [] [] [] [] |
+ libiconv | [] [] [] [] [] [] [] |
+ libidn | [] [] [] [] [] |
+ liferea | [] () [] [] [] [] [] |
+ lilypond | [] [] [] [] [] [] |
+ lordsawar | [] [] |
+ lprng | |
+ lynx | [] [] [] [] [] [] |
+ m4 | [] [] [] [] [] [] |
+ mailfromd | [] |
+ mailutils | [] [] [] [] |
+ make | [] [] [] [] [] |
+ man-db | [] [] [] [] |
+ man-db-manpages | [] [] |
+ midi-instruments | [] [] [] [] [] [] [] [] [] |
+ minicom | [] [] [] [] [] |
+ mkisofs | [] [] [] |
+ myserver | [] [] [] [] |
+ nano | [] [] [] [] [] [] [] |
+ opcodes | [] [] [] [] [] |
+ parted | [] [] [] |
+ pies | [] |
+ pnmixer | [] [] |
+ popt | [] [] [] [] [] [] |
+ procps-ng | [] [] |
+ procps-ng-man | [] [] |
+ psmisc | [] [] [] [] [] [] [] |
+ pspp | [] [] [] |
+ pushover | () [] [] [] |
+ pwdutils | [] [] [] |
+ pyspread | [] [] [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] |
+ recutils | [] [] [] [] |
+ rpm | [] [] [] [] [] |
+ rush | [] [] [] |
+ sarg | [] [] |
+ sed | [] [] [] [] [] [] [] [] |
+ sharutils | [] [] [] [] |
+ shishi | [] [] [] |
+ skribilo | [] [] [] |
+ solfege | [] [] [] [] [] [] [] [] |
+ solfege-manual | [] [] [] [] [] |
+ spotmachine | [] [] [] [] [] |
+ sudo | [] [] [] [] [] [] |
+ sudoers | [] [] [] [] [] [] |
+ sysstat | [] [] [] [] [] [] |
+ tar | [] [] [] [] [] [] [] |
+ texinfo | [] [] [] [] [] |
+ texinfo_document | [] [] [] [] |
+ tigervnc | [] [] [] [] [] [] |
+ tin | [] [] [] [] |
+ tin-man | [] |
+ tracgoogleappsa... | [] [] [] [] [] |
+ trader | [] [] [] [] [] [] |
+ util-linux | [] [] [] [] |
+ ve | [] [] [] [] [] |
+ vice | () () () |
+ vmm | [] [] |
+ vorbis-tools | [] [] [] [] |
+ wastesedge | [] |
+ wcd | [] [] [] [] |
+ wcd-man | [] |
+ wdiff | [] [] [] [] [] [] [] |
+ wget | [] [] [] [] [] [] |
+ wyslij-po | [] [] [] [] |
+ xboard | [] [] [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] [] [] [] |
+ +--------------------------------------------------+
+ da de el en en_GB en_ZA eo es et eu fa fi fr
+ 119 131 32 1 6 0 94 95 22 13 4 102 139
+
+ ga gd gl gu he hi hr hu hy ia id is it ja ka kk
+ +-------------------------------------------------+
+ a2ps | [] [] [] [] |
+ aegis | [] |
+ anubis | [] [] [] [] |
+ aspell | [] [] [] [] [] |
+ bash | [] [] [] [] |
+ bfd | [] [] |
+ binutils | [] [] [] |
+ bison | [] |
+ bison-runtime | [] [] [] [] [] [] [] [] |
+ buzztrax | |
+ ccd2cue | [] |
+ ccide | [] [] |
+ cflow | [] [] [] |
+ clisp | |
+ coreutils | [] [] |
+ cpio | [] [] [] [] [] [] |
+ cppi | [] [] [] [] [] |
+ cpplib | [] [] |
+ cryptsetup | [] |
+ datamash | |
+ denemo | [] |
+ dfarc | [] [] [] |
+ dialog | [] [] [] [] [] [] [] [] [] [] |
+ dico | |
+ diffutils | [] [] [] [] |
+ dink | [] |
+ direvent | [] |
+ doodle | [] [] |
+ dos2unix | [] [] |
+ dos2unix-man | |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] |
+ exif | [] [] [] [] [] [] |
+ fetchmail | [] [] [] |
+ findutils | [] [] [] [] [] [] [] |
+ flex | [] |
+ freedink | [] [] [] [] |
+ fusionforge | |
+ gas | [] |
+ gawk | [] () [] |
+ gcal | |
+ gcc | |
+ gdbm | |
+ gettext-examples | [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] [] |
+ gettext-tools | [] [] [] |
+ gjay | [] |
+ glunarclock | [] [] [] [] [] [] |
+ gnubiff | [] [] () |
+ gnubik | [] [] [] |
+ gnucash | () () () () () |
+ gnuchess | |
+ gnulib | [] [] [] [] [] |
+ gnunet | |
+ gnunet-gtk | |
+ gold | [] [] |
+ gphoto2 | [] [] [] [] |
+ gprof | [] [] [] [] |
+ gramadoir | [] [] [] |
+ grep | [] [] [] [] [] [] [] |
+ grub | [] [] [] |
+ gsasl | [] [] [] [] [] |
+ gss | [] [] [] [] [] |
+ gst-plugins-bad | [] [] [] |
+ gst-plugins-base | [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] |
+ gtick | [] [] [] [] [] |
+ gtkam | [] [] [] [] [] |
+ gtkspell | [] [] [] [] [] [] [] [] [] [] |
+ guix | |
+ guix-packages | |
+ gutenprint | [] [] [] |
+ hello | [] [] [] [] [] |
+ help2man | [] [] [] |
+ help2man-texi | |
+ hylafax | [] |
+ idutils | [] [] |
+ iso_15924 | [] [] [] [] [] [] |
+ iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ iso_3166_2 | [] [] |
+ iso_4217 | [] [] [] [] [] [] |
+ iso_639 | [] [] [] [] [] [] [] [] [] |
+ iso_639_3 | [] [] |
+ iso_639_5 | |
+ jwhois | [] [] [] [] |
+ kbd | [] [] [] |
+ klavaro | [] [] [] [] [] |
+ ld | [] [] [] [] |
+ leafpad | [] [] [] [] [] [] [] () |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | |
+ libgnutls | [] |
+ libgphoto2 | [] [] |
+ libgphoto2_port | [] [] |
+ libgsasl | [] [] [] [] |
+ libiconv | [] [] [] [] [] [] [] |
+ libidn | [] [] [] [] |
+ liferea | [] [] [] [] [] |
+ lilypond | [] |
+ lordsawar | |
+ lprng | [] |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] [] |
+ mailfromd | |
+ mailutils | |
+ make | [] [] [] [] |
+ man-db | [] [] |
+ man-db-manpages | [] [] |
+ midi-instruments | [] [] [] [] [] [] [] [] [] |
+ minicom | [] [] [] |
+ mkisofs | [] [] |
+ myserver | [] |
+ nano | [] [] [] [] [] [] |
+ opcodes | [] [] [] |
+ parted | [] [] [] [] [] |
+ pies | |
+ pnmixer | [] [] |
+ popt | [] [] [] [] [] [] [] [] [] [] |
+ procps-ng | |
+ procps-ng-man | |
+ psmisc | [] [] [] [] |
+ pspp | [] [] |
+ pushover | [] |
+ pwdutils | [] |
+ pyspread | |
+ radius | [] |
+ recode | [] [] [] [] [] [] [] |
+ recutils | |
+ rpm | [] |
+ rush | [] |
+ sarg | |
+ sed | [] [] [] [] [] [] [] |
+ sharutils | |
+ shishi | |
+ skribilo | [] |
+ solfege | [] [] |
+ solfege-manual | |
+ spotmachine | |
+ sudo | [] [] [] [] |
+ sudoers | [] [] [] |
+ sysstat | [] [] [] [] |
+ tar | [] [] [] [] [] [] |
+ texinfo | [] [] [] |
+ texinfo_document | [] [] [] |
+ tigervnc | |
+ tin | |
+ tin-man | |
+ tracgoogleappsa... | [] [] [] [] |
+ trader | [] [] |
+ util-linux | [] |
+ ve | [] |
+ vice | () () |
+ vmm | |
+ vorbis-tools | [] [] |
+ wastesedge | [] |
+ wcd | |
+ wcd-man | |
+ wdiff | [] [] [] |
+ wget | [] [] [] [] |
+ wyslij-po | [] [] [] |
+ xboard | |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] [] [] |
+ +-------------------------------------------------+
+ ga gd gl gu he hi hr hu hy ia id is it ja ka kk
+ 35 2 47 4 8 2 60 71 2 6 81 11 87 57 0 3
+
+ kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl
+ +--------------------------------------------------+
+ a2ps | [] [] |
+ aegis | [] |
+ anubis | [] [] [] |
+ aspell | [] [] |
+ bash | [] [] |
+ bfd | |
+ binutils | |
+ bison | [] |
+ bison-runtime | [] [] [] [] [] [] |
+ buzztrax | |
+ ccd2cue | |
+ ccide | [] [] |
+ cflow | [] |
+ clisp | [] |
+ coreutils | [] [] |
+ cpio | [] |
+ cppi | |
+ cpplib | [] |
+ cryptsetup | [] |
+ datamash | [] [] |
+ denemo | |
+ dfarc | [] [] |
+ dialog | [] [] [] [] [] [] |
+ dico | |
+ diffutils | [] [] [] |
+ dink | [] |
+ direvent | [] |
+ doodle | [] |
+ dos2unix | [] [] |
+ dos2unix-man | [] |
+ e2fsprogs | [] |
+ enscript | [] |
+ exif | [] [] [] |
+ fetchmail | [] |
+ findutils | [] [] |
+ flex | [] |
+ freedink | [] [] |
+ fusionforge | |
+ gas | |
+ gawk | [] |
+ gcal | |
+ gcc | |
+ gdbm | |
+ gettext-examples | [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] |
+ gettext-tools | [] |
+ gjay | |
+ glunarclock | [] [] |
+ gnubiff | [] |
+ gnubik | [] [] |
+ gnucash | () () () () () () () [] |
+ gnuchess | [] [] |
+ gnulib | [] |
+ gnunet | |
+ gnunet-gtk | |
+ gold | |
+ gphoto2 | [] |
+ gprof | [] [] |
+ gramadoir | [] |
+ grep | [] [] |
+ grub | [] [] [] |
+ gsasl | [] |
+ gss | |
+ gst-plugins-bad | [] [] [] |
+ gst-plugins-base | [] [] [] |
+ gst-plugins-good | [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] |
+ gstreamer | [] [] [] |
+ gtick | [] |
+ gtkam | [] [] |
+ gtkspell | [] [] [] [] [] [] [] |
+ guix | |
+ guix-packages | |
+ gutenprint | [] |
+ hello | [] [] [] |
+ help2man | [] |
+ help2man-texi | |
+ hylafax | [] |
+ idutils | [] |
+ iso_15924 | () [] [] |
+ iso_3166 | [] [] [] () [] [] [] [] [] [] |
+ iso_3166_2 | () [] |
+ iso_4217 | () [] [] [] |
+ iso_639 | [] [] () [] [] [] [] |
+ iso_639_3 | [] () [] |
+ iso_639_5 | () |
+ jwhois | [] [] |
+ kbd | [] |
+ klavaro | [] [] |
+ ld | |
+ leafpad | [] [] [] [] [] |
+ libc | [] [] |
+ libexif | [] |
+ libextractor | [] |
+ libgnutls | [] [] |
+ libgphoto2 | [] |
+ libgphoto2_port | [] |
+ libgsasl | [] |
+ libiconv | [] [] |
+ libidn | [] |
+ liferea | [] [] [] |
+ lilypond | [] |
+ lordsawar | |
+ lprng | |
+ lynx | [] |
+ m4 | [] |
+ mailfromd | |
+ mailutils | |
+ make | [] [] |
+ man-db | [] |
+ man-db-manpages | [] |
+ midi-instruments | [] [] [] [] [] [] [] |
+ minicom | [] |
+ mkisofs | [] |
+ myserver | |
+ nano | [] [] [] |
+ opcodes | [] |
+ parted | [] [] |
+ pies | |
+ pnmixer | [] |
+ popt | [] [] [] [] [] |
+ procps-ng | |
+ procps-ng-man | |
+ psmisc | [] |
+ pspp | [] [] |
+ pushover | |
+ pwdutils | [] |
+ pyspread | |
+ radius | [] |
+ recode | [] [] |
+ recutils | [] |
+ rpm | [] |
+ rush | [] |
+ sarg | |
+ sed | [] [] |
+ sharutils | [] |
+ shishi | |
+ skribilo | |
+ solfege | [] [] |
+ solfege-manual | [] |
+ spotmachine | [] |
+ sudo | [] [] [] |
+ sudoers | [] [] [] |
+ sysstat | [] [] |
+ tar | [] [] [] |
+ texinfo | [] |
+ texinfo_document | [] |
+ tigervnc | [] |
+ tin | |
+ tin-man | |
+ tracgoogleappsa... | [] [] [] |
+ trader | [] |
+ util-linux | [] |
+ ve | [] |
+ vice | [] |
+ vmm | [] |
+ vorbis-tools | [] |
+ wastesedge | [] |
+ wcd | [] |
+ wcd-man | [] |
+ wdiff | [] |
+ wget | [] [] |
+ wyslij-po | [] |
+ xboard | [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] |
+ +--------------------------------------------------+
+ kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl
+ 5 15 4 6 0 13 23 3 3 3 4 11 2 42 1 125
+
+ nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
+ +------------------------------------------------+
+ a2ps | [] [] [] [] [] [] [] |
+ aegis | [] [] |
+ anubis | [] [] [] |
+ aspell | [] [] [] [] [] [] [] |
+ bash | [] [] [] [] [] [] |
+ bfd | [] [] |
+ binutils | [] [] |
+ bison | [] [] [] |
+ bison-runtime | [] [] [] [] [] [] [] [] |
+ buzztrax | [] |
+ ccd2cue | [] [] |
+ ccide | [] [] [] |
+ cflow | [] [] [] |
+ clisp | [] |
+ coreutils | [] [] [] [] |
+ cpio | [] [] [] |
+ cppi | [] [] [] |
+ cpplib | [] [] [] |
+ cryptsetup | [] [] [] |
+ datamash | [] [] |
+ denemo | |
+ dfarc | [] [] [] |
+ dialog | [] [] [] [] [] [] [] |
+ dico | [] |
+ diffutils | [] [] [] |
+ dink | |
+ direvent | [] [] [] |
+ doodle | [] [] |
+ dos2unix | [] [] [] [] |
+ dos2unix-man | [] [] |
+ e2fsprogs | [] |
+ enscript | [] [] [] [] [] [] |
+ exif | [] [] [] [] [] [] |
+ fetchmail | [] [] [] |
+ findutils | [] [] [] [] [] [] |
+ flex | [] [] [] [] [] |
+ freedink | [] [] [] [] [] |
+ fusionforge | |
+ gas | |
+ gawk | [] |
+ gcal | |
+ gcc | |
+ gdbm | [] [] [] |
+ gettext-examples | [] [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] [] [] [] |
+ gjay | [] |
+ glunarclock | [] [] [] [] [] [] |
+ gnubiff | [] |
+ gnubik | [] [] [] [] |
+ gnucash | () () () () () [] |
+ gnuchess | [] [] |
+ gnulib | [] [] [] [] [] |
+ gnunet | |
+ gnunet-gtk | |
+ gold | |
+ gphoto2 | [] [] [] [] [] |
+ gprof | [] [] [] [] |
+ gramadoir | [] [] |
+ grep | [] [] [] [] [] [] |
+ grub | [] [] [] [] [] |
+ gsasl | [] [] [] |
+ gss | [] [] [] [] |
+ gst-plugins-bad | [] [] [] [] [] |
+ gst-plugins-base | [] [] [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] [] [] |
+ gtick | [] [] [] [] [] |
+ gtkam | [] [] [] [] [] [] |
+ gtkspell | [] [] [] [] [] [] [] [] [] |
+ guix | |
+ guix-packages | |
+ gutenprint | [] [] |
+ hello | [] [] [] [] [] [] |
+ help2man | [] [] [] [] |
+ help2man-texi | [] |
+ hylafax | |
+ idutils | [] [] [] |
+ iso_15924 | [] () [] [] [] [] |
+ iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] |
+ iso_3166_2 | [] () [] |
+ iso_4217 | [] [] () [] [] [] [] [] |
+ iso_639 | [] [] [] () [] [] [] [] [] [] |
+ iso_639_3 | [] () |
+ iso_639_5 | () [] |
+ jwhois | [] [] [] [] |
+ kbd | [] [] |
+ klavaro | [] [] [] [] [] |
+ ld | |
+ leafpad | [] [] [] [] [] [] [] [] |
+ libc | [] [] [] |
+ libexif | [] () [] |
+ libextractor | [] |
+ libgnutls | [] |
+ libgphoto2 | [] |
+ libgphoto2_port | [] [] [] [] [] |
+ libgsasl | [] [] [] [] |
+ libiconv | [] [] [] [] [] |
+ libidn | [] [] [] |
+ liferea | [] [] [] [] () [] [] |
+ lilypond | |
+ lordsawar | |
+ lprng | [] |
+ lynx | [] [] |
+ m4 | [] [] [] [] [] |
+ mailfromd | [] |
+ mailutils | [] |
+ make | [] [] [] |
+ man-db | [] [] [] |
+ man-db-manpages | [] [] [] |
+ midi-instruments | [] [] [] [] [] [] [] [] |
+ minicom | [] [] [] [] |
+ mkisofs | [] [] [] |
+ myserver | [] [] |
+ nano | [] [] [] [] [] [] |
+ opcodes | |
+ parted | [] [] [] [] [] [] |
+ pies | [] |
+ pnmixer | [] |
+ popt | [] [] [] [] [] [] |
+ procps-ng | [] |
+ procps-ng-man | [] |
+ psmisc | [] [] [] [] |
+ pspp | [] [] |
+ pushover | |
+ pwdutils | [] |
+ pyspread | [] [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] [] |
+ recutils | [] [] |
+ rpm | [] |
+ rush | [] [] [] |
+ sarg | [] [] |
+ sed | [] [] [] [] [] [] [] [] |
+ sharutils | [] [] [] |
+ shishi | [] [] |
+ skribilo | [] |
+ solfege | [] [] [] |
+ solfege-manual | [] [] |
+ spotmachine | [] [] |
+ sudo | [] [] [] [] [] [] |
+ sudoers | [] [] [] [] |
+ sysstat | [] [] [] [] [] |
+ tar | [] [] [] [] [] |
+ texinfo | [] [] [] |
+ texinfo_document | [] [] |
+ tigervnc | [] [] [] |
+ tin | [] |
+ tin-man | |
+ tracgoogleappsa... | [] [] [] [] |
+ trader | [] [] |
+ util-linux | [] [] |
+ ve | [] [] [] |
+ vice | |
+ vmm | |
+ vorbis-tools | [] [] [] |
+ wastesedge | |
+ wcd | |
+ wcd-man | |
+ wdiff | [] [] [] [] [] |
+ wget | [] [] [] [] [] |
+ wyslij-po | [] [] [] [] |
+ xboard | [] [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] |
+ +------------------------------------------------+
+ nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
+ 7 3 6 114 1 12 88 32 82 3 40 45 7 101
+
+ sv sw ta te tg th tr uk ur vi wa wo zh_CN
+ +----------------------------------------------+
+ a2ps | [] [] [] [] [] |
+ aegis | [] |
+ anubis | [] [] [] [] |
+ aspell | [] [] [] [] [] |
+ bash | [] [] [] [] |
+ bfd | [] [] [] |
+ binutils | [] [] [] |
+ bison | [] [] [] [] |
+ bison-runtime | [] [] [] [] [] [] |
+ buzztrax | [] [] [] |
+ ccd2cue | [] [] [] |
+ ccide | [] [] [] [] |
+ cflow | [] [] [] [] |
+ clisp | |
+ coreutils | [] [] [] |
+ cpio | [] [] [] [] [] |
+ cppi | [] [] [] [] |
+ cpplib | [] [] [] [] [] |
+ cryptsetup | [] [] [] |
+ datamash | [] [] [] |
+ denemo | [] |
+ dfarc | [] [] |
+ dialog | [] [] [] [] [] [] |
+ dico | [] |
+ diffutils | [] [] [] [] [] |
+ dink | [] |
+ direvent | [] [] |
+ doodle | [] [] |
+ dos2unix | [] [] [] [] |
+ dos2unix-man | [] [] [] |
+ e2fsprogs | [] [] [] [] |
+ enscript | [] [] [] [] |
+ exif | [] [] [] [] [] |
+ fetchmail | [] [] [] [] |
+ findutils | [] [] [] [] [] |
+ flex | [] [] [] [] |
+ freedink | [] [] [] |
+ fusionforge | |
+ gas | [] |
+ gawk | [] [] [] |
+ gcal | [] [] [] |
+ gcc | [] |
+ gdbm | [] [] |
+ gettext-examples | [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] |
+ gettext-tools | [] [] [] [] [] |
+ gjay | [] [] [] |
+ glunarclock | [] [] [] [] |
+ gnubiff | [] [] |
+ gnubik | [] [] [] [] |
+ gnucash | () () () () [] |
+ gnuchess | [] [] [] |
+ gnulib | [] [] [] [] |
+ gnunet | |
+ gnunet-gtk | |
+ gold | [] [] |
+ gphoto2 | [] [] [] [] |
+ gprof | [] [] [] [] |
+ gramadoir | [] [] [] |
+ grep | [] [] [] [] [] |
+ grub | [] [] [] [] |
+ gsasl | [] [] [] [] |
+ gss | [] [] [] |
+ gst-plugins-bad | [] [] [] [] [] |
+ gst-plugins-base | [] [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] |
+ gtick | [] [] [] |
+ gtkam | [] [] [] [] |
+ gtkspell | [] [] [] [] [] [] [] |
+ guix | |
+ guix-packages | |
+ gutenprint | [] [] [] [] |
+ hello | [] [] [] [] [] [] |
+ help2man | [] [] [] |
+ help2man-texi | [] |
+ hylafax | [] |
+ idutils | [] [] [] |
+ iso_15924 | [] () [] [] () [] |
+ iso_3166 | [] [] () [] [] () [] [] |
+ iso_3166_2 | () [] [] () [] |
+ iso_4217 | [] () [] [] () [] |
+ iso_639 | [] [] [] () [] [] () [] [] |
+ iso_639_3 | [] () [] [] () |
+ iso_639_5 | () [] () |
+ jwhois | [] [] [] [] |
+ kbd | [] [] [] [] |
+ klavaro | [] [] [] [] [] [] |
+ ld | [] [] [] [] [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] [] () |
+ libextractor | [] [] |
+ libgnutls | [] [] [] [] |
+ libgphoto2 | [] [] [] |
+ libgphoto2_port | [] [] [] [] |
+ libgsasl | [] [] [] [] |
+ libiconv | [] [] [] [] [] |
+ libidn | () [] [] [] |
+ liferea | [] [] [] [] [] |
+ lilypond | [] |
+ lordsawar | |
+ lprng | [] |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] |
+ mailfromd | [] [] |
+ mailutils | [] |
+ make | [] [] [] [] |
+ man-db | [] [] [] |
+ man-db-manpages | [] [] |
+ midi-instruments | [] [] [] [] [] [] |
+ minicom | [] [] |
+ mkisofs | [] [] [] |
+ myserver | [] |
+ nano | [] [] [] [] |
+ opcodes | [] [] [] |
+ parted | [] [] [] [] [] |
+ pies | [] [] |
+ pnmixer | [] [] [] |
+ popt | [] [] [] [] [] [] [] |
+ procps-ng | [] [] |
+ procps-ng-man | [] |
+ psmisc | [] [] [] [] |
+ pspp | [] [] [] |
+ pushover | [] |
+ pwdutils | [] [] |
+ pyspread | [] |
+ radius | [] [] |
+ recode | [] [] [] [] |
+ recutils | [] [] [] |
+ rpm | [] [] [] [] |
+ rush | [] [] |
+ sarg | |
+ sed | [] [] [] [] [] |
+ sharutils | [] [] [] [] |
+ shishi | [] [] |
+ skribilo | [] [] |
+ solfege | [] [] [] [] |
+ solfege-manual | [] |
+ spotmachine | [] [] [] |
+ sudo | [] [] [] [] [] |
+ sudoers | [] [] [] [] |
+ sysstat | [] [] [] [] [] |
+ tar | [] [] [] [] [] |
+ texinfo | [] [] [] |
+ texinfo_document | [] |
+ tigervnc | [] [] [] |
+ tin | [] |
+ tin-man | |
+ tracgoogleappsa... | [] [] [] [] [] |
+ trader | [] |
+ util-linux | [] [] [] [] |
+ ve | [] [] [] [] |
+ vice | () () |
+ vmm | |
+ vorbis-tools | [] [] |
+ wastesedge | |
+ wcd | [] [] [] |
+ wcd-man | [] |
+ wdiff | [] [] [] [] |
+ wget | [] [] [] |
+ wyslij-po | [] [] |
+ xboard | [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] |
+ +----------------------------------------------+
+ sv sw ta te tg th tr uk ur vi wa wo zh_CN
+ 106 1 4 3 0 13 51 115 1 125 7 1 100
+
+ zh_HK zh_TW
+ +-------------+
+ a2ps | | 30
+ aegis | | 9
+ anubis | | 19
+ aspell | | 29
+ bash | [] | 23
+ bfd | | 11
+ binutils | | 12
+ bison | [] | 18
+ bison-runtime | [] | 38
+ buzztrax | | 9
+ ccd2cue | | 10
+ ccide | | 17
+ cflow | | 16
+ clisp | | 10
+ coreutils | | 18
+ cpio | | 20
+ cppi | | 17
+ cpplib | [] | 19
+ cryptsetup | | 14
+ datamash | | 11
+ denemo | | 5
+ dfarc | | 17
+ dialog | [] | 42
+ dico | | 6
+ diffutils | | 22
+ dink | | 10
+ direvent | | 11
+ doodle | | 12
+ dos2unix | [] | 18
+ dos2unix-man | | 9
+ e2fsprogs | | 15
+ enscript | | 21
+ exif | | 27
+ fetchmail | | 19
+ findutils | | 29
+ flex | [] | 19
+ freedink | | 24
+ fusionforge | | 3
+ gas | | 5
+ gawk | | 13
+ gcal | | 8
+ gcc | | 2
+ gdbm | | 10
+ gettext-examples | [] [] | 40
+ gettext-runtime | [] [] | 35
+ gettext-tools | [] | 24
+ gjay | | 9
+ glunarclock | [] | 27
+ gnubiff | | 9
+ gnubik | | 19
+ gnucash | () | 6
+ gnuchess | | 11
+ gnulib | | 23
+ gnunet | | 1
+ gnunet-gtk | | 1
+ gold | | 7
+ gphoto2 | [] | 19
+ gprof | | 21
+ gramadoir | | 14
+ grep | [] | 31
+ grub | | 21
+ gsasl | [] | 19
+ gss | | 17
+ gst-plugins-bad | | 21
+ gst-plugins-base | | 27
+ gst-plugins-good | | 32
+ gst-plugins-ugly | | 34
+ gstreamer | [] | 32
+ gtick | | 19
+ gtkam | | 24
+ gtkspell | [] [] | 48
+ guix | | 2
+ guix-packages | | 0
+ gutenprint | | 15
+ hello | [] | 30
+ help2man | | 18
+ help2man-texi | | 5
+ hylafax | | 5
+ idutils | | 14
+ iso_15924 | [] | 23
+ iso_3166 | [] [] | 58
+ iso_3166_2 | | 9
+ iso_4217 | [] [] | 28
+ iso_639 | [] [] | 46
+ iso_639_3 | | 10
+ iso_639_5 | | 2
+ jwhois | [] | 20
+ kbd | | 17
+ klavaro | | 30
+ ld | [] | 15
+ leafpad | [] | 39
+ libc | [] | 24
+ libexif | | 10
+ libextractor | | 5
+ libgnutls | | 13
+ libgphoto2 | | 10
+ libgphoto2_port | [] | 19
+ libgsasl | | 18
+ libiconv | [] | 29
+ libidn | | 17
+ liferea | | 29
+ lilypond | | 11
+ lordsawar | | 3
+ lprng | | 3
+ lynx | | 19
+ m4 | [] | 22
+ mailfromd | | 4
+ mailutils | | 6
+ make | | 19
+ man-db | | 15
+ man-db-manpages | | 10
+ midi-instruments | [] | 43
+ minicom | [] | 17
+ mkisofs | | 13
+ myserver | | 9
+ nano | [] | 30
+ opcodes | | 12
+ parted | [] | 23
+ pies | | 4
+ pnmixer | | 9
+ popt | [] | 36
+ procps-ng | | 5
+ procps-ng-man | | 4
+ psmisc | [] | 22
+ pspp | | 13
+ pushover | | 6
+ pwdutils | | 8
+ pyspread | | 6
+ radius | | 9
+ recode | | 31
+ recutils | | 10
+ rpm | [] | 13
+ rush | | 10
+ sarg | | 4
+ sed | [] | 35
+ sharutils | | 13
+ shishi | | 7
+ skribilo | | 7
+ solfege | | 21
+ solfege-manual | | 9
+ spotmachine | | 11
+ sudo | | 26
+ sudoers | | 22
+ sysstat | | 23
+ tar | [] | 30
+ texinfo | | 17
+ texinfo_document | | 13
+ tigervnc | | 14
+ tin | [] | 7
+ tin-man | | 1
+ tracgoogleappsa... | [] | 22
+ trader | | 12
+ util-linux | | 13
+ ve | | 14
+ vice | | 1
+ vmm | | 3
+ vorbis-tools | | 13
+ wastesedge | | 3
+ wcd | | 8
+ wcd-man | | 3
+ wdiff | [] | 23
+ wget | | 21
+ wyslij-po | | 14
+ xboard | | 10
+ xdg-user-dirs | [] [] | 68
+ xkeyboard-config | [] | 28
+ +-------------+
+ 89 teams zh_HK zh_TW
+ 166 domains 7 42 2809
+
+ Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect. This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+ For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and distributed
+as such by its maintainer. There might be an observable lag between the
+mere existence a PO file and its wide availability in a distribution.
+
+ If Jun 2014 seems to be old, you may fetch a more recent copy of this
+'ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix
+with full percentage details can be found at
+'http://translationproject.org/extra/matrix.html'.
+
+1.5 Using 'gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU 'gettext' in your
+package. Of course you have to respect the GNU Lesser General Public
+License which covers the use of the GNU 'gettext' library. This means
+in particular that even non-free programs can use 'libintl' as a shared
+library, whereas only free software can use 'libintl' as a static
+library or use modified versions of 'libintl'.
+
+ Once the sources are changed appropriately and the setup can handle
+the use of 'gettext' the only thing missing are the translations. The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project. Therefore the information given above
+applies also for every other Free Software Project. Contact
+'coordinator@translationproject.org' to make the '.pot' files available
+to the translation teams.
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..1e6aa1a
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,78 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+// See: http://go/android-license-faq
+license {
+ name: "external_e2fsprogs_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-0BSD",
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-GPL",
+ "SPDX-license-identifier-GPL-2.0",
+ "SPDX-license-identifier-LGPL",
+ "SPDX-license-identifier-LGPL-2.0",
+ "SPDX-license-identifier-LGPL-2.1",
+ "SPDX-license-identifier-LGPL-3.0",
+ "SPDX-license-identifier-MIT",
+ "legacy_notice",
+ "legacy_unencumbered",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
+cc_defaults {
+ name: "e2fsprogs-defaults",
+ cflags: [
+ "-Wall",
+ "-Werror",
+ // Some warnings that Android's build system enables by default are not
+ // supported by upstream e2fsprogs. When such a warning shows up,
+ // disable it below. Please don't disable warnings that upstream
+ // e2fsprogs is supposed to support; for those, fix the code instead.
+ "-Wno-pointer-arith",
+ "-Wno-sign-compare",
+ "-Wno-type-limits",
+ "-Wno-typedef-redefinition",
+ "-Wno-unused-parameter",
+ ],
+ target: {
+ bionic: {
+ system_shared_libs: [
+ "libc",
+ "libdl",
+ ],
+ },
+ windows: {
+ include_dirs: ["external/e2fsprogs/include/mingw"],
+ },
+ },
+}
+
+subdirs = [
+ "contrib",
+ "debugfs",
+ "e2fsck",
+ "lib",
+ "misc",
+ "resize",
+]
diff --git a/CleanSpec.mk b/CleanSpec.mk
new file mode 100644
index 0000000..8331dae
--- /dev/null
+++ b/CleanSpec.mk
@@ -0,0 +1,52 @@
+# Copyright (C) 2007 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list. These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list. E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libext2_uuid_intermediates)
+$(call add-clean-step, rm -rf $(TARGET_RECOVERY_OUT)/root/sbin)
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..2dd08f5
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,69 @@
+ To install the second extended file system management programs,
+just follow the steps:
+
+1) Change directory into the top of the e2fsprogs source tree
+
+2) Create a build directory and cd into it:
+
+ mkdir build; cd build
+
+3) Run the configure script
+
+ ../configure
+
+ If you wish to turn on ELF shared libraries, add the option
+--enable-elf-shlibs. If you wish to build profiling libraries, add
+the option --enable-profile.
+
+ Note that if you are building on an older system (i.e., a 2.4
+kernel and/or glibc 2.2), the use of thread local storage will probably
+cause programs that use the uuid library to core dump. To disable
+thread local storage, use the configure option --disable-tls.
+
+4) Compile the programs
+
+ make
+
+5) Check to make sure the installation built correctly:
+
+ make check
+
+6) Install the programs
+
+ Run `make install'
+
+7) Install the include files and libraries
+
+ You can run `make install-libs' to install the include files and
+libraries. Please note that this installation is not needed for the
+programs to work. It is only needed if you expect to develop other
+programs using the libraries or if you want to compile other program
+using these libraries (like the 4.4BSD dump and restore port).
+
+8) Remove any pre-formatted man pages.
+
+ Some distributions will have pre-formatted manual pages which
+will always be displayed in preference to newer man pages in /usr/man.
+If this is the case, you may need to manually remove them in order to
+see the correct manual pages. The shell script in
+install-utils/remove_preformat_manpages may be helpful in doing so.
+
+9) Make sure your /etc/fstab file is correct.
+
+ Some distributions install an /etc/fstab which is missing the
+fifth and sixth field of filesystem entry, which are the dump
+frequency, and the fsck pass number, respectively. The problem with
+this is that the getmntent() library routine interprets those missing
+fields as "0", and a pass number of 0 is documented as meaning that
+fsck should not check that particular filesystem. If your entries in
+your /etc/fstab file look like this:
+
+/dev/hda4 / ext2 defaults
+
+you should add "1 1" at the end of each line, so that they look like this:
+
+/dev/hda4 / ext2 defaults 1 1
+
+ There is a script in install-utils/convfstab (donated by
+Michael Weller) that may help you correct your /etc/fstab file.
+
diff --git a/INSTALL.elfbin b/INSTALL.elfbin
new file mode 100644
index 0000000..9c2c600
--- /dev/null
+++ b/INSTALL.elfbin
@@ -0,0 +1,53 @@
+NOTE: This is the ELF version of the binary distribution. If you have
+a DLL system, please compile e2fsprogs from sources yourself. (In
+fact, in general you're better off compiling e2fsprogs from sources
+instead of using precompiled binaries.)
+
+Also please note that these binaries assume the use of the GNU Libc.
+If you're still using libc5, you'll need build e2fsprogs from source.
+
+ To install the binary distribution of the second extended file
+system management programs, just follow the steps:
+
+1) Install this tar file using the following command:
+
+ gunzip < e2fsprogs-1.13-elfbin.tar.gz | (cd /; tar Sxvpf - )
+
+2) Run ldconfig to update the shared library pointers.
+
+ As root, type /sbin/ldconfig. This will update the links to
+the shared libraries included in the distribution. You can then remove
+the old versions of the libraries from /lib.
+
+3) Remove any pre-formatted man pages.
+
+ Some distributions will have pre-formatted manual pages which
+will always be displayed in preference to newer man pages in /usr/man.
+If this is the case, you may need to manually remove them in order to
+see the correct manual pages. The shell script in
+install-utils/remove_preformat_manpages may be helpful in doing so.
+
+4) Make sure your /etc/fstab file is correct.
+
+ Some distributions install an /etc/fstab which is missing the
+fifth and sixth field of filesystem entry, which are the dump
+frequency, and the fsck pass number, respectively. The problem with
+this is that the getmntent() library routine interprets those missing
+fields as "0", and a pass number of 0 is documented as meaning that
+fsck should not check that particular filesystem. If your entries in
+your /etc/fstab file look like this:
+
+/dev/hda4 / ext2 defaults
+
+you should add "1 1" at the end of each line, so that they look like this:
+
+/dev/hda4 / ext2 defaults 1 1
+
+ There is a script in install-utils/convfstab (donated by
+Michael Weller) that may help you correct your /etc/fstab file.
+
+5) Cleanup files from the installation.
+
+ When you're done with the installation, you will probably want
+to remove /INSTALL (this file), /README, and /install-utils from your
+root directory
diff --git a/MCONFIG.in b/MCONFIG.in
new file mode 100644
index 0000000..82c75a2
--- /dev/null
+++ b/MCONFIG.in
@@ -0,0 +1,336 @@
+# Beginning of file MCONFIG
+
+all::
+
+all-static::
+
+check::
+
+fullcheck::
+
+SHELL = /bin/sh
+
+COMPRESS_EXT = gz bz2 bz Z
+
+prefix = @prefix@
+root_prefix = @root_prefix@
+exec_prefix = @exec_prefix@
+root_bindir = @root_bindir@
+root_sbindir = @root_sbindir@
+root_libdir = @root_libdir@
+datarootdir = @datarootdir@
+bindir = @bindir@
+sbindir = @sbindir@
+libdir = @libdir@
+datadir= @datadir@
+localedir = $(datadir)/locale
+root_sysconfdir= @root_sysconfdir@
+includedir = @includedir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+man3dir = $(mandir)/man3
+man5dir = $(mandir)/man5
+man8dir = $(mandir)/man8
+infodir = @infodir@
+datadir = @datadir@
+pkgconfigdir = $(libdir)/pkgconfig
+pkglibdir = $(libdir)/e2fsprogs
+
+HAVE_UDEV = @have_udev@
+UDEV_RULES_DIR = @pkg_udev_rules_dir@
+HAVE_CROND = @have_crond@
+CROND_DIR = @crond_dir@
+HAVE_SYSTEMD = @have_systemd@
+SYSTEMD_SYSTEM_UNIT_DIR = @systemd_system_unit_dir@
+
+@SET_MAKE@
+
+@ifGNUmake@ V =
+@ifGNUmake@ ifeq ($(strip $(V)),)
+@ifGNUmake@ # E = @echo
+@ifGNUmake@ # ES = echo
+@ifGNUmake@ # Q = @
+@ifGNUmake@ E = @E@
+@ifGNUmake@ ES = @ES@
+@ifGNUmake@ Q = @Q@
+@ifGNUmake@ else
+@ifGNUmake@ E = @\#
+@ifGNUmake@ ES = \#
+@ifGNUmake@ Q =
+@ifGNUmake@ endif
+
+@ifNotGNUmake@ E = @E@
+@ifNotGNUmake@ ES = @ES@
+@ifNotGNUmake@ Q = @Q@
+
+@ifGNUmake@ CHECK=sparse
+@ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
+@ifGNUmake@ CPPCHECK=cppcheck
+@ifGNUmake@ CPPCHECK_OPTS=--force --enable=all --quiet
+@ifGNUmake@ ifeq ("$(C)", "2")
+@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
+@ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS)
+@ifGNUmake@ else
+@ifGNUmake@ ifeq ("$(C)", "1")
+@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS)
+@ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS)
+@ifGNUmake@ else
+@ifGNUmake@ CHECK_CMD=@true
+@ifGNUmake@ CPPCHECK_CMD=@true
+@ifGNUmake@ endif
+@ifGNUmake@ endif
+
+@ifNotGNUmake@ CHECK_CMD=true
+@ifNotGNUmake@ CPPCHECK_CMD=true
+
+SANITIZER_CFLAGS = @lto_cflags@ @ubsan_cflags@ @addrsan_cflags@ @threadsan_cflags@
+SANITIZER_LDFLAGS = @lto_ldflags@ @ubsan_ldflags@ @addrsan_ldflags@ @threadsan_ldflags@
+
+CC = @PTHREAD_CC@
+CXX = @CXX@
+BUILD_CC = @BUILD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+CFLAGS = @CFLAGS@
+CFLAGS_SHLIB = @CFLAGS_SHLIB@
+CFLAGS_STLIB = @CFLAGS_STLIB@
+CPPFLAGS = @INCLUDES@
+ALL_CFLAGS = $(CPPFLAGS) $(SANITIZER_CFLAGS) $(CFLAGS) $(PTHREAD_CFLAGS) $(CFLAGS_WARN) @DEFS@ $(LOCAL_CFLAGS)
+ALL_CFLAGS_SHLIB = $(CPPFLAGS) $(SANITIZER_CFLAGS) $(CFLAGS_SHLIB) $(PTHREAD_CFLAGS) $(CFLAGS_WARN) @DEFS@ $(LOCAL_CFLAGS)
+ALL_CFLAGS_STLIB = $(CPPFLAGS) $(SANITIZER_CFLAGS) $(CFLAGS_STLIB) $(PTHREAD_CFLAGS) $(CFLAGS_WARN) @DEFS@ $(LOCAL_CFLAGS)
+LDFLAGS = $(SANITIZER_LDFLAGS) $(PTHREAD_CFLAGS) @LDFLAGS@
+LDFLAGS_SHLIB = $(SANITIZER_LDFLAGS) $(PTHREAD_CFLAGS) @LDFLAGS_SHLIB@
+ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@ $(LOCAL_LDFLAGS)
+LDFLAGS_STATIC = $(SANITIZER_LDFLAGS) $(PTHREAD_CFLAGS) @LDFLAGS_STATIC@
+BUILD_CFLAGS = $(SANITIZER_CFLAGS) @BUILD_CFLAGS@
+BUILD_LDFLAGS = $(SANITIZER_LDFLAGS) @BUILD_LDFLAGS@
+RDYNAMIC = @RDYNAMIC@
+LINK_BUILD_FLAGS = @LINK_BUILD_FLAGS@
+LINK_INSTALL_FLAGS = @LINK_INSTALL_FLAGS@
+RM = @RM@
+LN = @LN@
+LN_S = @LN_S@
+MV = @MV@
+CP = @CP@
+CHMOD = @CHMOD@
+AR = @AR@
+AWK = @AWK@
+SED = @SED@
+PERL = @PERL@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+LD = $(PURE) @CC@
+ARUPD = $(AR) r
+ARGEN = $(AR) rc
+LDCONFIG = @LDCONFIG@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+#
+# Library definitions
+#
+LIB = $(top_builddir)/lib
+LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@
+LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@
+LIBE2P = $(LIB)/libe2p@LIB_EXT@
+LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
+LIBUUID = @LIBUUID@ @SOCKET_LIB@
+LIBMAGIC = @MAGIC_LIB@
+LIBFUSE = @FUSE_LIB@
+LIBSUPPORT = $(LIBINTL) $(LIB)/libsupport@STATIC_LIB_EXT@
+LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
+LIBINTL = @LIBINTL@
+SYSLIBS = @LIBS@ @PTHREAD_LIBS@
+DEPLIBSS = $(LIB)/libss@LIB_EXT@
+DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
+DEPLIBUUID = @DEPLIBUUID@
+DEPLIBSUPPORT = $(LIB)/libsupport@STATIC_LIB_EXT@
+DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
+TESTENV = LD_LIBRARY_PATH="$(LIB):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(LIB):$${DYLD_LIBRARY_PATH}"
+
+STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
+STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
+STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
+STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
+STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@
+STATIC_LIBSUPPORT = $(LIBINTL) $(LIBSUPPORT)
+STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID)
+DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
+DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
+DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@
+DEPSTATIC_LIBSUPPORT = $(DEPLIBSUPPORT)
+DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID)
+
+PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@
+PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@
+PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
+PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
+PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@
+PROFILED_LIBSUPPORT = $(LIBINTL) $(LIB)/libsupport@PROFILED_LIB_EXT@
+PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID)
+DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
+DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
+DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
+DEPPROFILED_LIBSUPPORT = $(PROFILED_LIBSUPPORT)
+DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)
+
+#
+# A fast substitution command for fixing up man pages, shell scripts, etc.
+#
+SUBST_CONF=$(top_builddir)/util/subst.conf
+SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF)
+SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF)
+DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF)
+
+$(top_builddir)/util/subst:
+ cd $(top_builddir)/util ; $(MAKE) subst
+
+#
+# Script for generating utf8data.h
+#
+MKUTF8DATA=$(top_builddir)/util/mkutf8data
+
+$(top_builddir)/util/mkutf8data:
+ $(MAKE) -C $(top_builddir)/util mkutf8data
+
+#
+# Script for installing symlinks (for shared libraries)
+#
+$(top_builddir)/util/install-symlink: $(top_srcdir)/util/install-symlink.in \
+ $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=util/install-symlink ./config.status
+ chmod +x $(top_builddir)/util/install-symlink
+
+$(top_builddir)/util/symlinks:
+ cd $(top_builddir)/util ; $(MAKE) symlinks
+
+INSTALL_SYMLINK = /bin/sh $(top_builddir)/util/install-symlink \
+ @SYMLINK_RELATIVE@ \
+ --symlinks=$(top_builddir)/util/symlinks
+DEP_INSTALL_SYMLINK = $(top_builddir)/util/install-symlink \
+ $(top_builddir)/util/symlinks
+
+#
+# Warning flags
+#
+# Run make gcc-wall to do a build with warning messages.
+#
+#
+WFLAGS= -std=gnu99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE $(WFLAGS_EXTRA) \
+ -Wall -W -Wwrite-strings -Wpointer-arith \
+ -Wcast-qual -Wcast-align -Wno-variadic-macros \
+ -Wstrict-prototypes -Wmissing-prototypes \
+ -Wformat-security -Wformat-nonliteral \
+ -Wmissing-format-attribute -O2 -Wstrict-aliasing \
+ -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \
+ -UENABLE_NLS
+
+gcc-wall-new:
+ ($(MAKE) CFLAGS_WARN="$(WFLAGS)" > /dev/null) 2>&1
+
+gcc-wall:
+ $(MAKE) clean > /dev/null
+ $(MAKE) gcc-wall-new
+
+static-check:
+ ($(MAKE) C=1 V=1 CFLAGS="$(ALL_CFLAGS) $(WFLAGS)") 2>&1
+
+static-check-all:
+ $(MAKE) clean > /dev/null
+ $(MAKE) static-check
+
+#
+# Installation user and groups
+#
+BINGRP= bin
+BINOWN= bin
+BINMODE= 555
+INCGRP= bin
+INCOWN= bin
+INCMODE= 444
+LIBOWN= bin
+LIBGRP= bin
+LIBMODE= 444
+MANGRP= bin
+MANOWN= bin
+MANMODE= 444
+
+#
+# Autoconf magic...
+#
+
+DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.library \
+ $(top_srcdir)/lib/Makefile.elf-lib \
+ $(top_srcdir)/lib/Makefile.bsd-lib \
+ $(top_srcdir)/lib/Makefile.darwin-lib \
+ $(top_srcdir)/lib/Makefile.solaris-lib \
+ $(top_srcdir)/lib/Makefile.profile
+
+$(top_builddir)/config.status: $(top_srcdir)/configure
+ cd $(top_builddir); ./config.status --recheck
+
+$(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status
+
+$(top_builddir)/lib/config.h: $(top_srcdir)/lib/config.h.in \
+ $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=lib/config.h ./config.status
+
+$(top_builddir)/lib/dirpaths.h: $(DEP_SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in $@
+
+$(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
+ $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
+
+$(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \
+ $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
+ $(DEP_MAKEFILE) $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
+
+@MAINTAINER_CMT@$(top_srcdir)/configure: $(top_srcdir)/configure.ac
+@MAINTAINER_CMT@ cd $(top_srcdir) && autoheader && autoconf
+
+coverage.txt: Makefile $(SRCS)
+ if test -n "$(SRCS)"; then \
+ gcov -s $(top_srcdir) -o . $(SRCS) > coverage.txt 2>&1 ; \
+ fi
+
+clean::
+ $(RM) -f *.gcda *.gcov *.gcno coverage.txt
+
+#
+# Make depend magic...
+#
+
+.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
+ if test -n "$(SRCS)" ; then \
+ $(CC) -M $(ALL_CFLAGS) $(DEPEND_CFLAGS) $(SRCS) | \
+ $(SED) -f $(top_srcdir)/depfix.sed \
+ -e 's; $(srcdir)/; $$(srcdir)/;g' \
+ -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
+ -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
+ -e 's; \./; ;g' \
+ -e '/^#/d' \
+ -e '/^ *\\$$/d' | \
+ $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
+ else :; fi
+
+depend:: .depend
+ if test -n "$(SRCS)" ; then \
+ sed -e '/^# +++ Dependency line eater +++/,$$d' \
+ < $(srcdir)/Makefile.in | cat - .depend \
+ > $(srcdir)/Makefile.in.new; \
+ if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
+ $(RM) $(srcdir)/Makefile.in.new ; \
+ else \
+ $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
+ $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
+ fi ; else :; fi
+
+# End of file MCONFIG
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..79b7116
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,170 @@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = .
+my_dir = .
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+% : %.sh
+
+@RESIZER_CMT@RESIZE_DIR= resize
+@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
+@UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
+@BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
+@E2SCRUB_CMT@E2SCRUB_DIR= scrub
+@ALL_CMT@SUPPORT_LIB_SUBDIR= lib/support
+@ALL_CMT@E2P_LIB_SUBDIR= lib/e2p
+@ALL_CMT@EXT2FS_LIB_SUBDIR= lib/ext2fs
+
+LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \
+ $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR)
+
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs \
+ tests/fuzz po $(E2SCRUB_DIR)
+
+SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
+
+SUBS= util/subst.conf lib/config.h $(top_builddir)/lib/dirpaths.h \
+ lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
+
+TAR=tar
+
+all:: subs
+ $(MAKE) libs
+@ALL_CMT@ $(MAKE) progs
+@ALL_CMT@ $(MAKE) docs
+
+all-static::
+ $(MAKE) libs
+@ALL_CMT@ $(MAKE) static-progs
+
+subs: $(DEP_SUBSTITUTE)
+ @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
+ then $(MAKE) $$i || exit $$? ; fi ; done
+ @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
+ @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
+ @(if test -d lib/support ; then cd lib/support && $(MAKE) prof_err.h; fi)
+
+progs: all-progs-recursive
+static-progs: all-static-progs-recursive
+libs: all-libs-recursive
+all-progs-recursive all-libs-recursive:: subs
+
+rpm:
+ sh contrib/build-rpm
+
+docs:
+ -@test -d doc && cd doc && $(MAKE) libext2fs.info
+
+install-doc-libs:
+ -@test -d doc && cd doc && $(MAKE) install-doc-libs
+
+uninstall-doc-libs:
+ -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
+
+clean-doc:
+ -@test -d doc && cd doc && $(MAKE) clean
+
+distclean-doc:
+ -test -d doc && cd doc && $(MAKE) distclean
+
+install: subs all-libs-recursive install-progs-recursive \
+ install-shlibs-libs-recursive install-doc-libs
+@SUBSET_CMT@ $(MAKE) install-libs
+
+install-strip: subs all-libs-recursive install-strip-progs-recursive \
+ install-shlibs-strip-libs-recursive install-doc-libs
+
+uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
+
+install-libs: install-libs-recursive
+
+uninstall-libs: uninstall-libs-recursive
+
+coverage.txt: coverage.txt-recursive
+
+check-recursive: all
+
+TAGS clean-recursive distclean-recursive depend-recursive fullcheck-recursive \
+ check-recursive mostlyclean-recursive realclean-recursive \
+ coverage.txt-recursive:
+ @for subdir in $(SUBDIRS); do \
+ if test -d $$subdir ; then \
+ target=`echo $@|$(SED) 's/-recursive//'`; \
+ echo making $$target in $$subdir; \
+ (cd $$subdir && $(MAKE) $$target) || exit 1; \
+ fi ; \
+ done
+
+all-progs-recursive install-progs-recursive install-strip-progs-recursive \
+ uninstall-progs-recursive coverage.txt-progs-recursive:: all-libs-recursive
+
+
+@ALL_CMT@all-progs-recursive all-static-progs-recursive install-progs-recursive \
+@ALL_CMT@ install-strip-progs-recursive uninstall-progs-recursive \
+@ALL_CMT@ coverage.txt-progs-recursive:: all-libs-recursive
+@ALL_CMT@ @for subdir in $(PROG_SUBDIRS); do \
+@ALL_CMT@ if test -d $$subdir ; then \
+@ALL_CMT@ target=`echo $@|$(SED) 's/-progs-recursive//'`; \
+@ALL_CMT@ echo making $$target in $$subdir; \
+@ALL_CMT@ (cd $$subdir && $(MAKE) $$target) || exit 1; \
+@ALL_CMT@ fi ; \
+@ALL_CMT@ done
+
+all-libs-recursive install-libs-recursive install-strip-libs-recursive \
+ uninstall-libs-recursive install-shlibs-libs-recursive \
+ install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \
+ coverage.txt-libs-recursive::
+ @for subdir in $(LIB_SUBDIRS); do \
+ if test -d $$subdir ; then \
+ target=`echo $@|$(SED) 's/-libs-recursive//'`; \
+ echo making $$target in $$subdir; \
+ (cd $$subdir && $(MAKE) $$target) || exit 1; \
+ fi ; \
+ done
+
+mostlyclean: mostlyclean-recursive mostlyclean-local
+
+clean:: clean-recursive clean-local clean-doc
+ $(RM) -f $(SUBS)
+
+distclean: distclean-doc distclean-recursive
+ $(RM) -rf autom4te.cache ext2ed/Makefile po/stamp-po \
+ asm_types.h config.log public_config.h parse-types.log
+ $(MAKE) distclean-local
+
+realclean: realclean-recursive realclean-local
+
+depend:: depend-recursive
+
+lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
+ $(srcdir)/lib/ext2fs/ext2_types.h.in
+ cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
+
+lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
+ $(srcdir)/lib/blkid/blkid_types.h.in
+ cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
+
+lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
+ $(srcdir)/lib/uuid/uuid_types.h.in
+ cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
+
+mostlyclean-local:
+ $(RM) -f \#* *~ *.orig core MAKELOG
+
+clean-local: mostlyclean-local
+
+distclean-local: clean-local
+ $(RM) -f $(SUBS) $(SUBST_CONF) \
+ config.status config.log config.cache MCONFIG Makefile \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+realclean-local: distclean-local
+ $(RM) -f configure
+
+check:: all check-recursive
+
+fullcheck:: all fullcheck-recursive
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..da98a3e
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,849 @@
+This package, the EXT2 filesystem utilities, are made available under
+the GNU Public License version 2, with the exception of the lib/ext2fs
+and lib/e2p libraries, which are made available under the GNU Library
+General Public License Version 2, the lib/uuid library which is made
+available under a BSD-style license and the lib/et and lib/ss
+libraries which are made available under an MIT-style license. Please
+see lib/uuid/COPYING for more details for the license for the files
+comprising the libuuid library, and the source file headers of the
+libet and libss libraries for more information.
+
+The most recent officially distributed version can be found at
+http://e2fsprogs.sourceforge.net. If you need to make a distribution,
+that's the one you should use. If there is some reason why you'd like
+a more recent version that is still in ALPHA testing (i.e., either
+using the "WIP" test distributions or one from the hg or git
+repository from the development branch, please contact me
+(tytso@mit.edu) before you ship. The release schedules for this
+package are flexible, if you give me enough lead time.
+
+
+ Theodore Ts'o
+ 23-June-2007
+
+----------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
+----------------------------------------------------------------------
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/README b/README
new file mode 100644
index 0000000..0970deb
--- /dev/null
+++ b/README
@@ -0,0 +1,19 @@
+ This is the new version (1.47.0) of the second extended file
+system management programs.
+
+ From time to time, I release new versions of e2fsprogs, to fix
+bugs and to make the utilities more robust. You can always find
+information about the latest version at the the e2fsprogs web page,
+which is:
+
+ http://e2fsprogs.sourceforge.net
+
+ The INSTALL file has instructions on building and installing
+e2fsprogs. Provisions for building Red Hat RPMs and Debian dpkg files
+are supplied as well.
+
+ In case of bugs in these programs, please contact Ted Ts'o at
+tytso@mit.edu or tytso@alum.mit.edu. See the e2fsck man page for
+suggestions of what sort of information to include when submitting bug
+reports for these programs.
+
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
new file mode 120000
index 0000000..5fc5f47
--- /dev/null
+++ b/RELEASE-NOTES
@@ -0,0 +1 @@
+doc/RelNotes/v1.47.0.txt \ No newline at end of file
diff --git a/SHLIBS b/SHLIBS
new file mode 100644
index 0000000..2fcbbc3
--- /dev/null
+++ b/SHLIBS
@@ -0,0 +1,35 @@
+Library:libcom_err.o
+Description: Common error code library
+Maintainer: Theodore Ts'o
+Email: tytso@mit.edu
+Start: 0x66800000
+End: 0x6687ffff
+
+Library:libss.o
+Description: Generic Subsystem library (Simple tty UI)
+Maintainer: Theodore Ts'o
+Email: tytso@mit.edu
+Start: 0x66880000
+End: 0x668fffff
+
+Library:libext2fs.so
+Description: The ext2fs (raw interface) library
+Maintainer: Theodore Ts'o
+Email: tytso@mit.edu
+Start: 0x66900000
+End: 0x6697ffff
+
+Library:libe2p.so
+Description: The e2p (ext2fs's programmers) library
+Maintainer: Theodore Ts'o
+Email: tytso@mit.edu
+Start: 0x66980000
+End: 0x669fffff
+
+Library:libuuid.so
+Description: DCE Universally Unique ID (UUID) library
+Maintainer: Theodore Ts'o
+Email: tytso@mit.edu
+Start: 0x67900000
+End: 0x679fffff
+
diff --git a/SUBMITTING-PATCHES b/SUBMITTING-PATCHES
new file mode 100644
index 0000000..189deb3
--- /dev/null
+++ b/SUBMITTING-PATCHES
@@ -0,0 +1,39 @@
+
+Like the Linux kernel, submitted e2fsprogs patches now require the
+following "sign-off" procedure:
+
+The sign-off is a simple line at the end of the explanation for the
+patch, which certifies that you wrote it or otherwise have the right to
+pass it on as a open-source patch. The rules are pretty simple: if you
+can certify the below:
+
+ Developer's Certificate of Origin 1.1
+
+ By making a contribution to this project, I certify that:
+
+ (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+ (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+ (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+ (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+then you just add a line saying
+
+ Signed-off-by: Random J Developer <random@developer.example.org>
+
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..13b1e02
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,178 @@
+# from http://autoconf-archive.cryp.to/ax_tls.html
+#
+# This was licensed under the GPL with the following exception:
+#
+# As a special exception, the respective Autoconf Macro's copyright
+# owner gives unlimited permission to copy, distribute and modify the
+# configure scripts that are the output of Autoconf when processing
+# the Macro. You need not follow the terms of the GNU General Public
+# License when using or distributing such scripts, even though
+# portions of the text of the Macro appear in them. The GNU General
+# Public License (GPL) does govern all other use of the material that
+# constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the
+# Autoconf Macro released by the Autoconf Macro Archive. When you make
+# and distribute a modified version of the Autoconf Macro, you may
+# extend this special exception to the GPL to apply to your modified
+# version as well.
+#
+AC_DEFUN([AX_TLS], [
+ AC_MSG_CHECKING(for thread local storage (TLS) class)
+ AC_CACHE_VAL(ac_cv_tls, [
+ ax_tls_keywords="__thread __declspec(thread) none"
+ for ax_tls_keyword in $ax_tls_keywords; do
+ case $ax_tls_keyword in
+ none) ac_cv_tls=none ; break ;;
+ *)
+ AC_TRY_COMPILE(
+ [#include <stdlib.h>
+ static void
+ foo(void) {
+ static ] $ax_tls_keyword [ int bar;
+ exit(1);
+ }],
+ [],
+ [ac_cv_tls=$ax_tls_keyword ; break],
+ ac_cv_tls=none
+ )
+ esac
+ done
+])
+
+ if test "$ac_cv_tls" != "none"; then
+ dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
+ AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
+ fi
+ AC_MSG_RESULT($ac_cv_tls)
+])
+
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# CHECK_GNU_MAKE()
+#
+# DESCRIPTION
+#
+# This macro searches for a GNU version of make. If a match is found, the
+# makefile variable `ifGNUmake' is set to the empty string, otherwise it
+# is set to "#". This is useful for including a special features in a
+# Makefile, which cannot be handled by other versions of make. The
+# variable _cv_gnu_make_command is set to the command to invoke GNU make
+# if it exists, the empty string otherwise.
+#
+# Here is an example of its use:
+#
+# Makefile.in might contain:
+#
+# # A failsafe way of putting a dependency rule into a makefile
+# $(DEPEND):
+# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
+#
+# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
+# @ifGNUmake@ include $(DEPEND)
+# @ifGNUmake@ endif
+#
+# Then configure.in would normally contain:
+#
+# CHECK_GNU_MAKE()
+# AC_OUTPUT(Makefile)
+#
+# Then perhaps to cause gnu make to override any other make, we could do
+# something like this (note that GNU make always looks for GNUmakefile
+# first):
+#
+# if ! test x$_cv_gnu_make_command = x ; then
+# mv Makefile GNUmakefile
+# echo .DEFAULT: > Makefile ;
+# echo \ $_cv_gnu_make_command \$@ >> Makefile;
+# fi
+#
+# Then, if any (well almost any) other make is called, and GNU make also
+# exists, then the other make wraps the GNU make.
+#
+# LICENSE
+#
+# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+#
+# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
+
+AC_DEFUN(
+ [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
+ _cv_gnu_make_command='' ;
+dnl Search all the common names for GNU make
+ if test -n "$FORCE_NATIVE_MAKE" ; then
+ MAKES="make"
+ else
+ MAKES="make gmake gnumake"
+ fi
+ for a in "$MAKE" $MAKES ; do
+ if test -z "$a" ; then continue ; fi ;
+ if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
+ _cv_gnu_make_command=$a ;
+ break;
+ fi
+ done ;
+ ) ;
+dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
+ if test "x$_cv_gnu_make_command" != "x" ; then
+ ifGNUmake='' ;
+ ifNotGNUmake='#' ;
+ else
+ ifGNUmake='#' ;
+ ifNotGNUmake='' ;
+ AC_MSG_RESULT("Not found");
+ fi
+ AC_SUBST(ifGNUmake)
+ AC_SUBST(ifNotGNUmake)
+] )
+
+# AX_CHECK_MOUNT_OPT: an autoconf macro to check for generic filesystem-
+# agnostic 'mount' options. Written by Nicholas Clark. Looks for constants in
+# sys/mount.h to predict whether the 'mount' utility will support a specific
+# mounting option.
+#
+# This macro can be used to check for the presence of 'nodev' (or other mount
+# options), which isn't uniformly implemented in the BSD family at the time of
+# this writing. Tested on FreeBSD, NetBSD, OpenBSD, and Linux.
+#
+# Usage:
+#
+# AX_CHECK_MOUNT_OPT(option)
+#
+# Defines HAVE_MOUNT_$OPTION (in uppercase) if the option exists, and sets
+# ac_cv_mount_$option (in original case) otherwise.
+#
+# Copyright (c) 2018 Nicholas Clark <nicholas.clark@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty or attribution requirement.
+
+AC_DEFUN([AX_CHECK_MOUNT_OPT], [__AX_CHECK_MOUNT_OPT(m4_tolower([$1]),m4_toupper([$1]))])
+AC_DEFUN([__AX_CHECK_MOUNT_OPT],
+[
+ AS_ECHO_N("checking for mount '$1' option... ")
+ AC_TRY_COMPILE(
+ [#include <sys/mount.h>],
+ [void *temp = (void *)(MS_$2); (void) temp;],
+ [AC_DEFINE(HAVE_MOUNT_$2, 1, [Define to 1 if mount supports $1.])
+ AS_VAR_SET(ac_cv_mount_$1, yes)
+ AS_ECHO("yes")],
+ [AC_TRY_COMPILE(
+ [#include <sys/mount.h>],
+ [void *temp = (void *)(MNT_$2); (void) temp;],
+ [AC_DEFINE(HAVE_MOUNT_$2, 1, [Define to 1 if mount supports $1.])
+ AS_VAR_SET(ac_cv_mount_$1, yes)
+ AS_ECHO("yes")],
+ [AS_VAR_SET(ac_cv_mount_$1, no)
+ AS_ECHO("no")]
+ )]
+ )
+])
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..b5f5cec
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,4167 @@
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads. It
+# sets the PTHREAD_LIBS output variable to the threads library and linker
+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+# flags that are needed. (The user can also force certain compiler
+# flags/libs to be tested by setting these environment variables.)
+#
+# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
+# needed for multi-threaded programs (defaults to the value of CC
+# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
+# special cc_r/CC_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these flags,
+# but also to link with them as well. For example, you might link with
+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+# If you are only building threaded programs, you may wish to use these
+# variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+# CXX="$PTHREAD_CXX"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
+# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+# PTHREAD_CFLAGS.
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+# is not found. If ACTION-IF-FOUND is not specified, the default action
+# will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or if
+# you have any other suggestions or comments. This macro was based on work
+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
+# grateful for the helpful feedback of numerous users.
+#
+# Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 31
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_SED])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on Tru64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+ ax_pthread_save_CC="$CC"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
+ AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
+ AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
+ AC_MSG_RESULT([$ax_pthread_ok])
+ if test "x$ax_pthread_ok" = "xno"; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ CC="$ax_pthread_save_CC"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+# (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads and
+# -D_REENTRANT too), HP C (must be checked before -lpthread, which
+# is present but should not be used directly; and before -mthreads,
+# because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case $host_os in
+
+ freebsd*)
+
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+ ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+ ;;
+
+ hpux*)
+
+ # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+ # multi-threading and also sets -lpthread."
+
+ ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+ ;;
+
+ openedition*)
+
+ # IBM z/OS requires a feature-test macro to be defined in order to
+ # enable POSIX threads at all, so give the user a hint if this is
+ # not set. (We don't define these ourselves, as they can affect
+ # other portions of the system API in unpredictable ways.)
+
+ AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
+ [
+# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+ AX_PTHREAD_ZOS_MISSING
+# endif
+ ],
+ [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
+ ;;
+
+ solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (N.B.: The stubs are missing
+ # pthread_cleanup_push, or rather a function called by this macro,
+ # so we could check for that, but who knows whether they'll stub
+ # that too in a future libc.) So we'll check first for the
+ # standard Solaris way of linking pthreads (-mt -lpthread).
+
+ ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
+ ;;
+esac
+
+# Are we compiling with Clang?
+
+AC_CACHE_CHECK([whether $CC is Clang],
+ [ax_cv_PTHREAD_CLANG],
+ [ax_cv_PTHREAD_CLANG=no
+ # Note that Autoconf sets GCC=yes for Clang as well as GCC
+ if test "x$GCC" = "xyes"; then
+ AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
+ [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ AX_PTHREAD_CC_IS_CLANG
+# endif
+ ],
+ [ax_cv_PTHREAD_CLANG=yes])
+ fi
+ ])
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
+
+AS_IF([test "x$GCC" = "xyes"],
+ [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+AS_IF([test "x$ax_pthread_clang" = "xyes"],
+ [ax_pthread_flags="-pthread,-lpthread -pthread"])
+
+
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+ darwin* | hpux* | linux* | osf* | solaris*)
+ ax_pthread_check_macro="_REENTRANT"
+ ;;
+
+ aix*)
+ ax_pthread_check_macro="_THREAD_SAFE"
+ ;;
+
+ *)
+ ax_pthread_check_macro="--"
+ ;;
+esac
+AS_IF([test "x$ax_pthread_check_macro" = "x--"],
+ [ax_pthread_check_cond=0],
+ [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
+
+
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
+
+ case $ax_pthread_try_flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ *,*)
+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+ AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
+ PTHREAD_CFLAGS="$ax_pthread_try_flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
+ AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
+ PTHREAD_LIBS="-l$ax_pthread_try_flag"
+ ;;
+ esac
+
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+# if $ax_pthread_check_cond
+# error "$ax_pthread_check_macro must be defined"
+# endif
+ static void *some_global = NULL;
+ static void routine(void *a)
+ {
+ /* To avoid any unused-parameter or
+ unused-but-set-parameter warning. */
+ some_global = a;
+ }
+ static void *start_routine(void *a) { return a; }],
+ [pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */])],
+ [ax_pthread_ok=yes],
+ [])
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ AC_MSG_RESULT([$ax_pthread_ok])
+ AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+ # Clang takes -pthread; it has never supported any other flag
+
+ # (Note 1: This will need to be revisited if a system that Clang
+ # supports has POSIX threads in a separate library. This tends not
+ # to be the way of modern systems, but it's conceivable.)
+
+ # (Note 2: On some systems, notably Darwin, -pthread is not needed
+ # to get POSIX threads support; the API is always present and
+ # active. We could reasonably leave PTHREAD_CFLAGS empty. But
+ # -pthread does define _REENTRANT, and while the Darwin headers
+ # ignore this macro, third-party headers might not.)
+
+ # However, older versions of Clang make a point of warning the user
+ # that, in an invocation where only linking and no compilation is
+ # taking place, the -pthread option has no effect ("argument unused
+ # during compilation"). They expect -pthread to be passed in only
+ # when source code is being compiled.
+ #
+ # Problem is, this is at odds with the way Automake and most other
+ # C build frameworks function, which is that the same flags used in
+ # compilation (CFLAGS) are also used in linking. Many systems
+ # supported by AX_PTHREAD require exactly this for POSIX threads
+ # support, and in fact it is often not straightforward to specify a
+ # flag that is used only in the compilation phase and not in
+ # linking. Such a scenario is extremely rare in practice.
+ #
+ # Even though use of the -pthread flag in linking would only print
+ # a warning, this can be a nuisance for well-run software projects
+ # that build with -Werror. So if the active version of Clang has
+ # this misfeature, we search for an option to squash it.
+
+ AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
+ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
+ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+ # Create an alternate version of $ac_link that compiles and
+ # links in two steps (.c -> .o, .o -> exe) instead of one
+ # (.c -> exe), because the warning occurs only in the second
+ # step
+ ax_pthread_save_ac_link="$ac_link"
+ ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+ ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
+ ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+ AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
+ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+ ac_link="$ax_pthread_save_ac_link"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+ [ac_link="$ax_pthread_2step_ac_link"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+ [break])
+ ])
+ done
+ ac_link="$ax_pthread_save_ac_link"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+ ])
+
+ case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+ no | unknown) ;;
+ *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+ esac
+
+fi # $ax_pthread_clang = yes
+
+
+
+# Various other checks:
+if test "x$ax_pthread_ok" = "xyes"; then
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_CACHE_CHECK([for joinable pthread attribute],
+ [ax_cv_PTHREAD_JOINABLE_ATTR],
+ [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [int attr = $ax_pthread_attr; return attr /* ; */])],
+ [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
+ [])
+ done
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+ test "x$ax_pthread_joinable_attr_defined" != "xyes"],
+ [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
+ [$ax_cv_PTHREAD_JOINABLE_ATTR],
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ ax_pthread_joinable_attr_defined=yes
+ ])
+
+ AC_CACHE_CHECK([whether more special flags are required for pthreads],
+ [ax_cv_PTHREAD_SPECIAL_FLAGS],
+ [ax_cv_PTHREAD_SPECIAL_FLAGS=no
+ case $host_os in
+ solaris*)
+ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+ test "x$ax_pthread_special_flags_added" != "xyes"],
+ [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+ ax_pthread_special_flags_added=yes])
+
+ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+ [ax_cv_PTHREAD_PRIO_INHERIT],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
+ [[int i = PTHREAD_PRIO_INHERIT;
+ return i;]])],
+ [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+ [ax_cv_PTHREAD_PRIO_INHERIT=no])
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+ test "x$ax_pthread_prio_inherit_defined" != "xyes"],
+ [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
+ ax_pthread_prio_inherit_defined=yes
+ ])
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != "xyes"; then
+ case $host_os in
+ aix*)
+ AS_CASE(["x/$CC"],
+ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+ [#handle absolute path differently from PATH based program lookup
+ AS_CASE(["x$CC"],
+ [x/*],
+ [
+ AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
+ AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
+ ],
+ [
+ AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
+ AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
+ ]
+ )
+ ])
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
+AC_SUBST([PTHREAD_CC])
+AC_SUBST([PTHREAD_CXX])
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test "x$ax_pthread_ok" = "xyes"; then
+ ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
+ :
+else
+ ax_pthread_ok=no
+ $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
+
+# gettext.m4 serial 71 (gettext-0.20.2)
+dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL must be one of 'external', 'use-libtool'.
+dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and
+dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED).
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value '$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])
+ ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+ [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported.
+])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external], [no], [yes]))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH([included-gettext],
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+ ]])],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+ ]])],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+ ]])],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE([ENABLE_NLS], [1],
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE([HAVE_GETTEXT], [1],
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE([HAVE_DCGETTEXT], [1],
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes'
+ dnl because some of the testsuite requires it.
+ BUILD_INCLUDED_LIBINTL=yes
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST([INTLLIBS])
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+
+dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
+
+# host-cpu-c-abi.m4 serial 13
+dnl Copyright (C) 2002-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible and Sam Steingold.
+
+dnl Sets the HOST_CPU variable to the canonical name of the CPU.
+dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its
+dnl C language ABI (application binary interface).
+dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in
+dnl config.h.
+dnl
+dnl This canonical name can be used to select a particular assembly language
+dnl source file that will interoperate with C code on the given host.
+dnl
+dnl For example:
+dnl * 'i386' and 'sparc' are different canonical names, because code for i386
+dnl will not run on SPARC CPUs and vice versa. They have different
+dnl instruction sets.
+dnl * 'sparc' and 'sparc64' are different canonical names, because code for
+dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code
+dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit
+dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit
+dnl mode, but not both.
+dnl * 'mips' and 'mipsn32' are different canonical names, because they use
+dnl different argument passing and return conventions for C functions, and
+dnl although the instruction set of 'mips' is a large subset of the
+dnl instruction set of 'mipsn32'.
+dnl * 'mipsn32' and 'mips64' are different canonical names, because they use
+dnl different sizes for the C types like 'int' and 'void *', and although
+dnl the instruction sets of 'mipsn32' and 'mips64' are the same.
+dnl * The same canonical name is used for different endiannesses. You can
+dnl determine the endianness through preprocessor symbols:
+dnl - 'arm': test __ARMEL__.
+dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
+dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
+dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
+dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
+dnl - Instructions that do not exist on all of these CPUs (cmpxchg,
+dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your
+dnl assembly language source files use such instructions, you will
+dnl need to make the distinction.
+dnl - Speed of execution of the common instruction set is reasonable across
+dnl the entire family of CPUs. If you have assembly language source files
+dnl that are optimized for particular CPU types (like GNU gmp has), you
+dnl will need to make the distinction.
+dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>.
+AC_DEFUN([gl_HOST_CPU_C_ABI],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_C_ASM])
+ AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi],
+ [case "$host_cpu" in
+
+changequote(,)dnl
+ i[34567]86 )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi=i386
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=x86_64-x32],
+ [gl_cv_host_cpu_c_abi=x86_64])],
+ [gl_cv_host_cpu_c_abi=i386])
+ ;;
+
+changequote(,)dnl
+ alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi=alpha
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __aarch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=arm64-ilp32],
+ [gl_cv_host_cpu_c_abi=arm64])],
+ [# Don't distinguish little-endian and big-endian arm, since they
+ # don't require different machine code for simple operations and
+ # since the user can distinguish them through the preprocessor
+ # defines __ARMEL__ vs. __ARMEB__.
+ # But distinguish arm which passes floating-point arguments and
+ # return values in integer registers (r0, r1, ...) - this is
+ # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
+ # passes them in float registers (s0, s1, ...) and double registers
+ # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
+ # sets the preprocessor defines __ARM_PCS (for the first case) and
+ # __ARM_PCS_VFP (for the second case), but older GCC does not.
+ echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
+ # Look for a reference to the register d0 in the .s file.
+ AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+ if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
+ gl_cv_host_cpu_c_abi=armhf
+ else
+ gl_cv_host_cpu_c_abi=arm
+ fi
+ rm -f conftest*
+ ])
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=hppa64],
+ [gl_cv_host_cpu_c_abi=hppa])
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=ia64-ilp32],
+ [gl_cv_host_cpu_c_abi=ia64])
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=mips64],
+ [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
+ # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (_MIPS_SIM == _ABIN32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=mipsn32],
+ [gl_cv_host_cpu_c_abi=mips])])
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [# On powerpc64, there are two ABIs on Linux: The AIX compatible
+ # one and the ELFv2 one. The latter defines _CALL_ELF=2.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _CALL_ELF && _CALL_ELF == 2
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=powerpc64-elfv2],
+ [gl_cv_host_cpu_c_abi=powerpc64])
+ ],
+ [gl_cv_host_cpu_c_abi=powerpc])
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi=powerpc
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 2 architectures (with variants): rv32* and rv64*.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if __riscv_xlen == 64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [cpu=riscv64],
+ [cpu=riscv32])
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [main_abi=lp64],
+ [main_abi=ilp32])
+ # Float ABIs:
+ # __riscv_float_abi_double:
+ # 'float' and 'double' are passed in floating-point registers.
+ # __riscv_float_abi_single:
+ # 'float' are passed in floating-point registers.
+ # __riscv_float_abi_soft:
+ # No values are passed in floating-point registers.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __riscv_float_abi_double
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [float_abi=d],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __riscv_float_abi_single
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [float_abi=f],
+ [float_abi=''])
+ ])
+ gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=s390x],
+ [gl_cv_host_cpu_c_abi=s390])
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=sparc64],
+ [gl_cv_host_cpu_c_abi=sparc])
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi="$host_cpu"
+ ;;
+ esac
+ ])
+
+ dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same.
+ HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
+ HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
+ AC_SUBST([HOST_CPU])
+ AC_SUBST([HOST_CPU_C_ABI])
+
+ # This was
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
+ # earlier, but KAI C++ 3.2d doesn't like this.
+ sed -e 's/-/_/g' >> confdefs.h <<EOF
+#ifndef __${HOST_CPU}__
+#define __${HOST_CPU}__ 1
+#endif
+#ifndef __${HOST_CPU_C_ABI}__
+#define __${HOST_CPU_C_ABI}__ 1
+#endif
+EOF
+ AH_TOP([/* CPU and C ABI indicator */
+#ifndef __i386__
+#undef __i386__
+#endif
+#ifndef __x86_64_x32__
+#undef __x86_64_x32__
+#endif
+#ifndef __x86_64__
+#undef __x86_64__
+#endif
+#ifndef __alpha__
+#undef __alpha__
+#endif
+#ifndef __arm__
+#undef __arm__
+#endif
+#ifndef __armhf__
+#undef __armhf__
+#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
+#ifndef __arm64__
+#undef __arm64__
+#endif
+#ifndef __hppa__
+#undef __hppa__
+#endif
+#ifndef __hppa64__
+#undef __hppa64__
+#endif
+#ifndef __ia64_ilp32__
+#undef __ia64_ilp32__
+#endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
+#ifndef __m68k__
+#undef __m68k__
+#endif
+#ifndef __mips__
+#undef __mips__
+#endif
+#ifndef __mipsn32__
+#undef __mipsn32__
+#endif
+#ifndef __mips64__
+#undef __mips64__
+#endif
+#ifndef __powerpc__
+#undef __powerpc__
+#endif
+#ifndef __powerpc64__
+#undef __powerpc64__
+#endif
+#ifndef __powerpc64_elfv2__
+#undef __powerpc64_elfv2__
+#endif
+#ifndef __riscv32__
+#undef __riscv32__
+#endif
+#ifndef __riscv64__
+#undef __riscv64__
+#endif
+#ifndef __riscv32_ilp32__
+#undef __riscv32_ilp32__
+#endif
+#ifndef __riscv32_ilp32f__
+#undef __riscv32_ilp32f__
+#endif
+#ifndef __riscv32_ilp32d__
+#undef __riscv32_ilp32d__
+#endif
+#ifndef __riscv64_ilp32__
+#undef __riscv64_ilp32__
+#endif
+#ifndef __riscv64_ilp32f__
+#undef __riscv64_ilp32f__
+#endif
+#ifndef __riscv64_ilp32d__
+#undef __riscv64_ilp32d__
+#endif
+#ifndef __riscv64_lp64__
+#undef __riscv64_lp64__
+#endif
+#ifndef __riscv64_lp64f__
+#undef __riscv64_lp64f__
+#endif
+#ifndef __riscv64_lp64d__
+#undef __riscv64_lp64d__
+#endif
+#ifndef __s390__
+#undef __s390__
+#endif
+#ifndef __s390x__
+#undef __s390x__
+#endif
+#ifndef __sh__
+#undef __sh__
+#endif
+#ifndef __sparc__
+#undef __sparc__
+#endif
+#ifndef __sparc64__
+#undef __sparc64__
+#endif
+])
+
+])
+
+
+dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
+dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
+dnl one, or to 'unknown' if unknown.
+dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
+AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
+ [if test -n "$gl_cv_host_cpu_c_abi"; then
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
+ esac
+ else
+ case "$host_cpu" in
+
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh[1234] | sh[1234]e[lb] \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ # CPUs that only support a 64-bit ABI.
+changequote(,)dnl
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+
+changequote(,)dnl
+ i[34567]86 )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64) \
+ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=yes],
+ [gl_cv_host_cpu_c_abi_32bit=no])
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown
+ ;;
+ esac
+ fi
+ ])
+
+ HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+])
+
+# iconv.m4 serial 21
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);]])],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);]])],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
+ dnl Solaris 10.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ am_cv_func_iconv_works=no
+ for ac_iconv_const in '' 'const'; do
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+ ]],
+ [[int result = 0;
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 1;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\263";
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_ascii_to_88591);
+ }
+ }
+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304";
+ static char buf[2] = { (char)0xDE, (char)0xAD };
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = 1;
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+ result |= 4;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ result |= 8;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ {
+ /* Try standardized names. */
+ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+ /* Try IRIX, OSF/1 names. */
+ iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+ /* Try AIX names. */
+ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+ /* Try HP-UX names. */
+ iconv_t cd4 = iconv_open ("utf8", "eucJP");
+ if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+ && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+ result |= 16;
+ if (cd1 != (iconv_t)(-1))
+ iconv_close (cd1);
+ if (cd2 != (iconv_t)(-1))
+ iconv_close (cd2);
+ if (cd3 != (iconv_t)(-1))
+ iconv_close (cd3);
+ if (cd4 != (iconv_t)(-1))
+ iconv_close (cd4);
+ }
+ return result;
+]])],
+ [am_cv_func_iconv_works=yes], ,
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ test "$am_cv_func_iconv_works" = no || break
+ done
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+m4_define([gl_iconv_AC_DEFUN],
+ m4_version_prereq([2.64],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [m4_ifdef([gl_00GNULIB],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [[AC_DEFUN(
+ [$1], [$2])]])]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+ ]],
+ [[]])],
+ [am_cv_proto_iconv_arg1=""],
+ [am_cv_proto_iconv_arg1="const"])
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([
+ $am_cv_proto_iconv])
+ else
+ dnl When compiling GNU libiconv on a system that does not have iconv yet,
+ dnl pick the POSIX compliant declaration without 'const'.
+ am_cv_proto_iconv_arg1=""
+ fi
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+ m4_ifdef([gl_ICONV_H_DEFAULTS],
+ [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test -n "$am_cv_proto_iconv_arg1"; then
+ ICONV_CONST="const"
+ fi
+ ])
+])
+
+# intlmacosx.m4 serial 8 (gettext-0.20.2)
+dnl Copyright (C) 2004-2014, 2016, 2019-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on Mac OS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in Mac OS X 10.4.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFPreferences.h>]],
+ [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent,
+ dnl because in macOS 10.13.4 it has the following behaviour:
+ dnl When two or more languages are specified in the
+ dnl "System Preferences > Language & Region > Preferred Languages" panel,
+ dnl it returns en_CC where CC is the territory (even when English is not among
+ dnl the preferred languages!). What we want instead is what
+ dnl CFLocaleCopyCurrent returned in earlier macOS releases and what
+ dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the
+ dnl first among the preferred languages and CC is the territory.
+ AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFLocale.h>]],
+ [[CFLocaleCopyPreferredLanguages();]])],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+# lib-ld.m4 serial 9
+dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
+
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes
+ ;;
+*)
+ acl_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-2.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld [default=no]])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+if test -n "$LD"; then
+ AC_MSG_CHECKING([for ld])
+elif test "$GCC" = yes; then
+ AC_MSG_CHECKING([for ld used by $CC])
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+if test -n "$LD"; then
+ # Let the user override the test with a path.
+ :
+else
+ AC_CACHE_VAL([acl_cv_path_LD],
+ [
+ acl_cv_path_LD= # Final result of this test
+ ac_prog=ld # Program to search in $PATH
+ if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $acl_output in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
+ while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
+ acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
+ done
+ # Got the pathname. No search in PATH is needed.
+ acl_cv_path_LD="$acl_output"
+ ac_prog=
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+ fi
+ if test -n "$ac_prog"; then
+ # Search for $ac_prog in $PATH.
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+ fi
+ case $host in
+ *-*-aix*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [# The compiler produces 64-bit code. Add option '-b64' so that the
+ # linker groks 64-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -b64 "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+ esac
+ ], [])
+ ;;
+ sparc64-*-netbsd*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [],
+ [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
+ # so that the linker groks 32-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -m elf32_sparc "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+ esac
+ ])
+ ;;
+ esac
+ ])
+ LD="$acl_cv_path_LD"
+fi
+if test -n "$LD"; then
+ AC_MSG_RESULT([$LD])
+else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([no acceptable ld found in \$PATH])
+fi
+AC_LIB_PROG_LD_GNU
+])
+
+# lib-link.m4 serial 31
+dnl Copyright (C) 2001-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.61])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+ dnl because these -l options might require -L options that are present in
+ dnl LIBS. -l options benefit only from the -L options listed before it.
+ dnl Otherwise, add it to the front of LIBS, because it may be a static
+ dnl library that depends on another static library that is present in LIBS.
+ dnl Static libraries benefit only from the static libraries listed after
+ dnl it.
+ case " $LIB[]NAME" in
+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+ *) LIBS="$LIB[]NAME $LIBS" ;;
+ esac
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[$3]], [[$4]])],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_libname_spec,
+dnl acl_library_names_spec,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Complain if config.rpath is missing.
+ AC_REQUIRE_AUX_FILE([config.rpath])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE([rpath],
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+ ])
+ AC_ARG_WITH(PACK[-prefix],
+[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
+ fi
+ fi
+])
+ if test "X$additional_libdir2" = "X$additional_libdir"; then
+ additional_libdir2=
+ fi
+ if test "X$additional_libdir3" = "X$additional_libdir"; then
+ additional_libdir3=
+ fi
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+ dnl computed. So it has to be reset here.
+ HAVE_LIB[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+ if test "X$found_dir" = "X"; then
+ eval dir=\$$additional_libdir_variable
+ if test -n "$dir"; then
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ fi
+ done
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem3 | */$acl_libdirstem3/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
+ haveit=
+ if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dir" != "X/usr/$acl_libdirstem3"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dir" != "X/usr/$acl_libdirstem3"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
+
+# lib-prefix.m4 serial 17
+dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib-prefix],
+[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a function acl_is_expected_elfclass, that tests whether standard input
+dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI,
+dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing
+dnl the basename of the libdir to try in turn, either "lib" or "lib64" or
+dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar.
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib, lib32, and lib64.
+ dnl On most glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on
+ dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go
+ dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib.
+ dnl We determine the compiler's default mode by looking at the compiler's
+ dnl library search path. If at least one of its elements ends in /lib64 or
+ dnl points to a directory whose absolute pathname ends in /lib64, we use that
+ dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default,
+ dnl namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
+
+ AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
+ [AC_EGREP_CPP([Extensible Linking Format],
+ [#ifdef __ELF__
+ Extensible Linking Format
+ #endif
+ ],
+ [gl_cv_elf=yes],
+ [gl_cv_elf=no])
+ ])
+ if test $gl_cv_elf; then
+ # Extract the ELF class of a file (5th byte) in decimal.
+ # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
+ if od -A x < /dev/null >/dev/null 2>/dev/null; then
+ # Use POSIX od.
+ func_elfclass ()
+ {
+ od -A n -t d1 -j 4 -N 1
+ }
+ else
+ # Use BSD hexdump.
+ func_elfclass ()
+ {
+ dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
+ echo
+ }
+ fi
+changequote(,)dnl
+ case $HOST_CPU_C_ABI_32BIT in
+ yes)
+ # 32-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 1
+ }
+ ;;
+ no)
+ # 64-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 2
+ }
+ ;;
+ *)
+ # Unknown.
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ ;;
+ esac
+changequote([,])dnl
+ else
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ fi
+
+ dnl Allow the user to override the result by setting acl_cv_libdirstems.
+ AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
+ [acl_cv_libdirstems],
+ [dnl Try 'lib' first, because that's the default for libdir in GNU, see
+ dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ acl_libdirstem3=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ acl_libdirstem2=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem3=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ dnl If $CC generates code for a 32-bit ABI, the libraries are
+ dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
+ dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries
+ dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32.
+ dnl Find the compiler's search path. However, non-system compilers
+ dnl sometimes have odd library search paths. But we can't simply invoke
+ dnl '/usr/bin/gcc -print-search-dirs' because that would not take into
+ dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS.
+ searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test $HOST_CPU_C_ABI_32BIT != no; then
+ # 32-bit or unknown ABI.
+ if test -d /usr/lib32; then
+ acl_libdirstem2=lib32
+ fi
+ fi
+ if test $HOST_CPU_C_ABI_32BIT != yes; then
+ # 64-bit or unknown ABI.
+ if test -d /usr/lib64; then
+ acl_libdirstem3=lib64
+ fi
+ fi
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64 ) acl_libdirstem3=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ if test $HOST_CPU_C_ABI_32BIT = yes; then
+ # 32-bit ABI.
+ acl_libdirstem3=
+ fi
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ # 64-bit ABI.
+ acl_libdirstem2=
+ fi
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+ test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
+ ])
+ dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and
+ dnl acl_libdirstem3.
+changequote(,)dnl
+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
+ acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
+changequote([,])dnl
+])
+
+# nls.m4 serial 6 (gettext-0.20.2)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free
+dnl Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE([nls],
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
+])
+
+# pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurrence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $2])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+
+dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
+dnl [DESCRIPTION], [DEFAULT])
+dnl ------------------------------------------
+dnl
+dnl Prepare a "--with-" configure option using the lowercase
+dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
+dnl PKG_CHECK_MODULES in a single macro.
+AC_DEFUN([PKG_WITH_MODULES],
+[
+m4_pushdef([with_arg], m4_tolower([$1]))
+
+m4_pushdef([description],
+ [m4_default([$5], [build with ]with_arg[ support])])
+
+m4_pushdef([def_arg], [m4_default([$6], [auto])])
+m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
+m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
+
+m4_case(def_arg,
+ [yes],[m4_pushdef([with_without], [--without-]with_arg)],
+ [m4_pushdef([with_without],[--with-]with_arg)])
+
+AC_ARG_WITH(with_arg,
+ AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
+ [AS_TR_SH([with_]with_arg)=def_arg])
+
+AS_CASE([$AS_TR_SH([with_]with_arg)],
+ [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
+ [auto],[PKG_CHECK_MODULES([$1],[$2],
+ [m4_n([def_action_if_found]) $3],
+ [m4_n([def_action_if_not_found]) $4])])
+
+m4_popdef([with_arg])
+m4_popdef([description])
+m4_popdef([def_arg])
+
+])dnl PKG_WITH_MODULES
+
+dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl [DESCRIPTION], [DEFAULT])
+dnl -----------------------------------------------
+dnl
+dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
+dnl check._[VARIABLE-PREFIX] is exported as make variable.
+AC_DEFUN([PKG_HAVE_WITH_MODULES],
+[
+PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
+
+AM_CONDITIONAL([HAVE_][$1],
+ [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
+])dnl PKG_HAVE_WITH_MODULES
+
+dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl [DESCRIPTION], [DEFAULT])
+dnl ------------------------------------------------------
+dnl
+dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
+dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
+dnl and preprocessor variable.
+AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
+[
+PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
+
+AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
+ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
+])dnl PKG_HAVE_DEFINE_WITH_MODULES
+
+# po.m4 serial 31 (gettext-0.20.2)
+dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.60])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+ AC_REQUIRE([AC_PROG_SED])dnl
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.20])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Test whether it is GNU msgmerge >= 0.20.
+ if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
+ else
+ dnl Test whether it is GNU msgmerge >= 0.12.
+ if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
+ else
+ dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is
+ dnl slow. But this is not a big problem, as such old gettext versions are
+ dnl hardly in use any more.
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
+ fi
+ fi
+ AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ gt_tab=`printf '\t'`
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
+ OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ tab=`printf '\t'`
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
+ # Seen the first line of the variable definition.
+ s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ tab=`printf '\t'`
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
+
+# progtest.m4 serial 8 (gettext-0.20.2)
+dnl Copyright (C) 1996-2003, 2005, 2008-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$][$1])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
+
+m4_include([acinclude.m4])
diff --git a/config/config.guess b/config/config.guess
new file mode 100755
index 0000000..69188da
--- /dev/null
+++ b/config/config.guess
@@ -0,0 +1,1774 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2023 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2023-01-01'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2023 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ # prevent multiple calls if $tmp is already set
+ test "$tmp" && return 0
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039,SC3028
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD=$driver
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+ LIBC=unknown
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #elif defined(__GLIBC__)
+ LIBC=gnu
+ #else
+ #include <stdarg.h>
+ /* First heuristic to detect musl libc. */
+ #ifdef __DEFINED_va_list
+ LIBC=musl
+ #endif
+ #endif
+ EOF
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "$cc_set_libc"
+
+ # Second heuristic to detect musl libc.
+ if [ "$LIBC" = unknown ] &&
+ command -v ldd >/dev/null &&
+ ldd --version 2>&1 | grep -q ^musl; then
+ LIBC=musl
+ fi
+
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ if [ "$LIBC" = unknown ]; then
+ LIBC=gnu
+ fi
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ echo unknown)`
+ case $UNAME_MACHINE_ARCH in
+ aarch64eb) machine=aarch64_be-unknown ;;
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case $UNAME_VERSION in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ GUESS=$machine-${os}${release}${abi-}
+ ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+ ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+ ;;
+ *:SecBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+ ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+ ;;
+ *:MidnightBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+ ;;
+ *:ekkoBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+ ;;
+ *:SolidBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+ ;;
+ *:OS108:*:*)
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+ ;;
+ macppc:MirBSD:*:*)
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:MirBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:Sortix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-sortix
+ ;;
+ *:Twizzler:*:*)
+ GUESS=$UNAME_MACHINE-unknown-twizzler
+ ;;
+ *:Redox:*:*)
+ GUESS=$UNAME_MACHINE-unknown-redox
+ ;;
+ mips:OSF1:*.*)
+ GUESS=mips-dec-osf1
+ ;;
+ alpha:OSF1:*:*)
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ trap '' 0
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case $ALPHA_CPU_TYPE in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+ ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ GUESS=m68k-unknown-sysv4
+ ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-amigaos
+ ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-morphos
+ ;;
+ *:OS/390:*:*)
+ GUESS=i370-ibm-openedition
+ ;;
+ *:z/VM:*:*)
+ GUESS=s390-ibm-zvmoe
+ ;;
+ *:OS400:*:*)
+ GUESS=powerpc-ibm-os400
+ ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ GUESS=arm-acorn-riscix$UNAME_RELEASE
+ ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ GUESS=arm-unknown-riscos
+ ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ GUESS=hppa1.1-hitachi-hiuxmpp
+ ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ case `(/bin/universe) 2>/dev/null` in
+ att) GUESS=pyramid-pyramid-sysv3 ;;
+ *) GUESS=pyramid-pyramid-bsd ;;
+ esac
+ ;;
+ NILE*:*:*:dcosx)
+ GUESS=pyramid-pyramid-svr4
+ ;;
+ DRS?6000:unix:4.0:6*)
+ GUESS=sparc-icl-nx6
+ ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) GUESS=sparc-icl-nx7 ;;
+ esac
+ ;;
+ s390x:SunOS:*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+ ;;
+ sun4H:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-hal-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris2$SUN_REL
+ ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ GUESS=i386-pc-auroraux$UNAME_RELEASE
+ ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris3$SUN_REL
+ ;;
+ sun4*:SunOS:*:*)
+ case `/usr/bin/arch -k` in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+ GUESS=sparc-sun-sunos$SUN_REL
+ ;;
+ sun3*:SunOS:*:*)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case `/bin/arch` in
+ sun3)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun4)
+ GUESS=sparc-sun-sunos$UNAME_RELEASE
+ ;;
+ esac
+ ;;
+ aushp:SunOS:*:*)
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
+ ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ GUESS=m68k-milan-mint$UNAME_RELEASE
+ ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ GUESS=m68k-hades-mint$UNAME_RELEASE
+ ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ GUESS=m68k-unknown-mint$UNAME_RELEASE
+ ;;
+ m68k:machten:*:*)
+ GUESS=m68k-apple-machten$UNAME_RELEASE
+ ;;
+ powerpc:machten:*:*)
+ GUESS=powerpc-apple-machten$UNAME_RELEASE
+ ;;
+ RISC*:Mach:*:*)
+ GUESS=mips-dec-mach_bsd4.3
+ ;;
+ RISC*:ULTRIX:*:*)
+ GUESS=mips-dec-ultrix$UNAME_RELEASE
+ ;;
+ VAX*:ULTRIX*:*:*)
+ GUESS=vax-dec-ultrix$UNAME_RELEASE
+ ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
+ ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=mips-mips-riscos$UNAME_RELEASE
+ ;;
+ Motorola:PowerMAX_OS:*:*)
+ GUESS=powerpc-motorola-powermax
+ ;;
+ Motorola:*:4.3:PL8-*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:Power_UNIX:*:*)
+ GUESS=powerpc-harris-powerunix
+ ;;
+ m88k:CX/UX:7*:*)
+ GUESS=m88k-harris-cxux7
+ ;;
+ m88k:*:4*:R4*)
+ GUESS=m88k-motorola-sysv4
+ ;;
+ m88k:*:3*:R3*)
+ GUESS=m88k-motorola-sysv3
+ ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+ then
+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+ test "$TARGET_BINARY_INTERFACE"x = x
+ then
+ GUESS=m88k-dg-dgux$UNAME_RELEASE
+ else
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+ fi
+ else
+ GUESS=i586-dg-dgux$UNAME_RELEASE
+ fi
+ ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ GUESS=m88k-dolphin-sysv3
+ ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ GUESS=m88k-motorola-sysv3
+ ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ GUESS=m88k-tektronix-sysv3
+ ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ GUESS=m68k-tektronix-bsd
+ ;;
+ *:IRIX*:*:*)
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+ GUESS=mips-sgi-irix$IRIX_REL
+ ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ GUESS=i386-ibm-aix
+ ;;
+ ia64:AIX:*:*)
+ if test -x /usr/bin/oslevel ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+ ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ GUESS=$SYSTEM_NAME
+ else
+ GUESS=rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ GUESS=rs6000-ibm-aix3.2.4
+ else
+ GUESS=rs6000-ibm-aix3.2
+ fi
+ ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if test -x /usr/bin/lslpp ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+ ;;
+ *:AIX:*:*)
+ GUESS=rs6000-ibm-aix
+ ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ GUESS=romp-ibm-bsd4.4
+ ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
+ ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ GUESS=rs6000-bull-bosx
+ ;;
+ DPX/2?00:B.O.S.:*:*)
+ GUESS=m68k-bull-sysv3
+ ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ GUESS=m68k-hp-bsd
+ ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ GUESS=m68k-hp-bsd4.4
+ ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ case $UNAME_MACHINE in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if test -x /usr/bin/getconf; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case $sc_cpu_version in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case $sc_kernel_bits in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if test "$HP_ARCH" = ""; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if test "$HP_ARCH" = hppa2.0w
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+ ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ GUESS=ia64-hp-hpux$HPUX_REV
+ ;;
+ 3050*:HI-UX:*:*)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=unknown-hitachi-hiuxwe2
+ ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ GUESS=hppa1.1-hp-bsd
+ ;;
+ 9000/8??:4.3bsd:*:*)
+ GUESS=hppa1.0-hp-bsd
+ ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ GUESS=hppa1.0-hp-mpeix
+ ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ GUESS=hppa1.1-hp-osf
+ ;;
+ hp8??:OSF1:*:*)
+ GUESS=hppa1.0-hp-osf
+ ;;
+ i*86:OSF1:*:*)
+ if test -x /usr/sbin/sysversion ; then
+ GUESS=$UNAME_MACHINE-unknown-osf1mk
+ else
+ GUESS=$UNAME_MACHINE-unknown-osf1
+ fi
+ ;;
+ parisc*:Lites*:*:*)
+ GUESS=hppa1.1-hp-lites
+ ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ GUESS=c1-convex-bsd
+ ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ GUESS=c34-convex-bsd
+ ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ GUESS=c38-convex-bsd
+ ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ GUESS=c4-convex-bsd
+ ;;
+ CRAY*Y-MP:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=ymp-cray-unicos$CRAY_REL
+ ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=t90-cray-unicos$CRAY_REL
+ ;;
+ CRAY*T3E:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
+ ;;
+ CRAY*SV1:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=sv1-cray-unicos$CRAY_REL
+ ;;
+ *:UNICOS/mp:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=craynv-cray-unicosmp$CRAY_REL
+ ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+ ;;
+ sparc*:BSD/OS:*:*)
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+ ;;
+ *:BSD/OS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+ ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+ else
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+ fi
+ ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case $UNAME_PROCESSOR in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+ ;;
+ i*:CYGWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-cygwin
+ ;;
+ *:MINGW64*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw64
+ ;;
+ *:MINGW*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw32
+ ;;
+ *:MSYS*:*)
+ GUESS=$UNAME_MACHINE-pc-msys
+ ;;
+ i*:PW*:*)
+ GUESS=$UNAME_MACHINE-pc-pw32
+ ;;
+ *:SerenityOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-serenity
+ ;;
+ *:Interix*:*)
+ case $UNAME_MACHINE in
+ x86)
+ GUESS=i586-pc-interix$UNAME_RELEASE
+ ;;
+ authenticamd | genuineintel | EM64T)
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
+ ;;
+ IA64)
+ GUESS=ia64-unknown-interix$UNAME_RELEASE
+ ;;
+ esac ;;
+ i*:UWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-uwin
+ ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ GUESS=x86_64-pc-cygwin
+ ;;
+ prep*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
+ ;;
+ *:GNU:*:*)
+ # the GNU system
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+ ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+ ;;
+ x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
+ ;;
+ *:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
+ ;;
+ *:Minix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-minix
+ ;;
+ aarch64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+ else
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ ;;
+ avr32*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ cris:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ crisv32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ e2k:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ frv:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ hexagon:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:Linux:*:*)
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+ ;;
+ ia64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ k1om:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m32r*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m68*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ MIPS_ENDIAN=el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ MIPS_ENDIAN=
+ #else
+ MIPS_ENDIAN=
+ #endif
+ #endif
+EOF
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+ eval "$cc_set_vars"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ openrisc*:Linux:*:*)
+ GUESS=or1k-unknown-linux-$LIBC
+ ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ padre:Linux:*:*)
+ GUESS=sparc-unknown-linux-$LIBC
+ ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ GUESS=hppa64-unknown-linux-$LIBC
+ ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+ *) GUESS=hppa-unknown-linux-$LIBC ;;
+ esac
+ ;;
+ ppc64:Linux:*:*)
+ GUESS=powerpc64-unknown-linux-$LIBC
+ ;;
+ ppc:Linux:*:*)
+ GUESS=powerpc-unknown-linux-$LIBC
+ ;;
+ ppc64le:Linux:*:*)
+ GUESS=powerpc64le-unknown-linux-$LIBC
+ ;;
+ ppcle:Linux:*:*)
+ GUESS=powerpcle-unknown-linux-$LIBC
+ ;;
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+ ;;
+ sh64*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sh*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ tile*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ vax:Linux:*:*)
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+ ;;
+ x86_64:Linux:*:*)
+ set_cc_for_build
+ CPU=$UNAME_MACHINE
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ ABI=64
+ sed 's/^ //' << EOF > "$dummy.c"
+ #ifdef __i386__
+ ABI=x86
+ #else
+ #ifdef __ILP32__
+ ABI=x32
+ #endif
+ #endif
+EOF
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+ eval "$cc_set_abi"
+ case $ABI in
+ x86) CPU=i686 ;;
+ x32) LIBCABI=${LIBC}x32 ;;
+ esac
+ fi
+ GUESS=$CPU-pc-linux-$LIBCABI
+ ;;
+ xtensa*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ GUESS=i386-sequent-sysv4
+ ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+ ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ GUESS=$UNAME_MACHINE-pc-os2-emx
+ ;;
+ i*86:XTS-300:*:STOP)
+ GUESS=$UNAME_MACHINE-unknown-stop
+ ;;
+ i*86:atheos:*:*)
+ GUESS=$UNAME_MACHINE-unknown-atheos
+ ;;
+ i*86:syllable:*:*)
+ GUESS=$UNAME_MACHINE-pc-syllable
+ ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
+ ;;
+ i*86:*DOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+ ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+ fi
+ ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv32
+ fi
+ ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ GUESS=i586-pc-msdosdjgpp
+ ;;
+ Intel:Mach:3*:*)
+ GUESS=i386-pc-mach3
+ ;;
+ paragon:*:*:*)
+ GUESS=i860-intel-osf1
+ ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
+ fi
+ ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ GUESS=m68010-convergent-sysv
+ ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ GUESS=m68k-convergent-sysv
+ ;;
+ M680?0:D-NIX:5.3:*)
+ GUESS=m68k-diab-dnix
+ ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+ ;;
+ mc68030:UNIX_System_V:4.*:*)
+ GUESS=m68k-atari-sysv4
+ ;;
+ TSUNAMI:LynxOS:2.*:*)
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ rs6000:LynxOS:2.*:*)
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+ ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ SM[BE]S:UNIX_SV:*:*)
+ GUESS=mips-dde-sysv$UNAME_RELEASE
+ ;;
+ RM*:ReliantUNIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ RM*:SINIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ GUESS=$UNAME_MACHINE-sni-sysv4
+ else
+ GUESS=ns32k-sni-sysv
+ fi
+ ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ GUESS=i586-unisys-sysv4
+ ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ GUESS=hppa1.1-stratus-sysv4
+ ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ GUESS=i860-stratus-sysv4
+ ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=$UNAME_MACHINE-stratus-vos
+ ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=hppa1.1-stratus-vos
+ ;;
+ mc68*:A/UX:*:*)
+ GUESS=m68k-apple-aux$UNAME_RELEASE
+ ;;
+ news*:NEWS-OS:6*:*)
+ GUESS=mips-sony-newsos6
+ ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if test -d /usr/nec; then
+ GUESS=mips-nec-sysv$UNAME_RELEASE
+ else
+ GUESS=mips-unknown-sysv$UNAME_RELEASE
+ fi
+ ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ GUESS=powerpc-be-beos
+ ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ GUESS=powerpc-apple-beos
+ ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ GUESS=i586-pc-beos
+ ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ GUESS=i586-pc-haiku
+ ;;
+ ppc:Haiku:*:*) # Haiku running on Apple PowerPC
+ GUESS=powerpc-apple-haiku
+ ;;
+ *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
+ GUESS=$UNAME_MACHINE-unknown-haiku
+ ;;
+ SX-4:SUPER-UX:*:*)
+ GUESS=sx4-nec-superux$UNAME_RELEASE
+ ;;
+ SX-5:SUPER-UX:*:*)
+ GUESS=sx5-nec-superux$UNAME_RELEASE
+ ;;
+ SX-6:SUPER-UX:*:*)
+ GUESS=sx6-nec-superux$UNAME_RELEASE
+ ;;
+ SX-7:SUPER-UX:*:*)
+ GUESS=sx7-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8:SUPER-UX:*:*)
+ GUESS=sx8-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8R:SUPER-UX:*:*)
+ GUESS=sx8r-nec-superux$UNAME_RELEASE
+ ;;
+ SX-ACE:SUPER-UX:*:*)
+ GUESS=sxace-nec-superux$UNAME_RELEASE
+ ;;
+ Power*:Rhapsody:*:*)
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+ ;;
+ *:Rhapsody:*:*)
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+ ;;
+ arm64:Darwin:*:*)
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
+ ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
+ fi
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
+ fi
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+ ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+ ;;
+ *:QNX:*:4*)
+ GUESS=i386-pc-qnx
+ ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ GUESS=neo-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ GUESS=nse-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
+ ;;
+ *:NonStop-UX:*:*)
+ GUESS=mips-compaq-nonstopux
+ ;;
+ BS2000:POSIX*:*:*)
+ GUESS=bs2000-siemens-sysv
+ ;;
+ DS/*:UNIX_System_V:*:*)
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+ ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "${cputype-}" = 386; then
+ UNAME_MACHINE=i386
+ elif test "x${cputype-}" != x; then
+ UNAME_MACHINE=$cputype
+ fi
+ GUESS=$UNAME_MACHINE-unknown-plan9
+ ;;
+ *:TOPS-10:*:*)
+ GUESS=pdp10-unknown-tops10
+ ;;
+ *:TENEX:*:*)
+ GUESS=pdp10-unknown-tenex
+ ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ GUESS=pdp10-dec-tops20
+ ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ GUESS=pdp10-xkl-tops20
+ ;;
+ *:TOPS-20:*:*)
+ GUESS=pdp10-unknown-tops20
+ ;;
+ *:ITS:*:*)
+ GUESS=pdp10-unknown-its
+ ;;
+ SEI:*:*:SEIUX)
+ GUESS=mips-sei-seiux$UNAME_RELEASE
+ ;;
+ *:DragonFly:*:*)
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+ ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case $UNAME_MACHINE in
+ A*) GUESS=alpha-dec-vms ;;
+ I*) GUESS=ia64-dec-vms ;;
+ V*) GUESS=vax-dec-vms ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ GUESS=i386-pc-xenix
+ ;;
+ i*86:skyos:*:*)
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+ ;;
+ i*86:rdos:*:*)
+ GUESS=$UNAME_MACHINE-pc-rdos
+ ;;
+ i*86:Fiwix:*:*)
+ GUESS=$UNAME_MACHINE-pc-fiwix
+ ;;
+ *:AROS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-aros
+ ;;
+ x86_64:VMkernel:*:*)
+ GUESS=$UNAME_MACHINE-unknown-esx
+ ;;
+ amd64:Isilon\ OneFS:*:*)
+ GUESS=x86_64-unknown-onefs
+ ;;
+ *:Unleashed:*:*)
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+ ;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+ echo "$GUESS"
+ exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+ cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/config.rpath b/config/config.rpath
new file mode 100755
index 0000000..98183ff
--- /dev/null
+++ b/config/config.rpath
@@ -0,0 +1,684 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2016 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ nagfor*)
+ wl='-Wl,-Wl,,'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ wl=
+ ;;
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ newsos6)
+ ;;
+ *nto* | *qnx*)
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ wl='-Qoption ld '
+ ;;
+ *)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ haiku*)
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd2.[01]*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ *nto* | *qnx*)
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc*)
+ library_names_spec='$libname$shrext' ;;
+ m68k)
+ library_names_spec='$libname.a' ;;
+ esac
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ freebsd* | dragonfly*)
+ library_names_spec='$libname$shrext'
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ haiku*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ *nto* | *qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ tpf*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/config/config.sub b/config/config.sub
new file mode 100755
index 0000000..de4259e
--- /dev/null
+++ b/config/config.sub
@@ -0,0 +1,1907 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2023 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2023-01-21'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2023 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo "$1"
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
+ ;;
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ basic_os=$field3-$field4
+ ;;
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*)
+ basic_machine=$field1
+ basic_os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ basic_os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ basic_os=$field3
+ ;;
+ esac
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ zephyr*)
+ basic_machine=$field1-unknown
+ basic_os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ basic_os=
+ ;;
+ *)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ basic_os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ basic_os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ basic_os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ basic_os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ basic_os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ basic_os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ basic_os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ basic_os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ basic_os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ basic_os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ basic_os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ basic_os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ basic_os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ basic_os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ basic_os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ basic_os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ basic_os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ basic_os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ basic_os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ basic_os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ basic_os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ basic_os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ basic_os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ basic_os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ basic_os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ basic_os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ basic_os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ basic_os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ basic_os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ basic_os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ basic_os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ basic_os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ basic_os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ basic_os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ basic_os=sysv3
+ ;;
+ hp300 | hp300hpux)
+ basic_machine=m68k-hp
+ basic_os=hpux
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ basic_os=bsd
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ basic_os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ basic_os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ basic_os=mach
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ basic_os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ basic_os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ basic_os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ basic_os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ basic_os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ basic_os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ basic_os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ basic_os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ basic_os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ basic_os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ basic_os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ basic_os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ basic_os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ basic_os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ basic_os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ basic_os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ basic_os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ basic_os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ basic_os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ basic_os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ basic_os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ basic_os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ basic_os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ basic_os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ basic_os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ basic_os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ basic_os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ basic_os=linux
+ ;;
+ psp)
+ basic_machine=mipsallegrexel-sony
+ basic_os=psp
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ basic_os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ basic_os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ basic_os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ basic_os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ basic_os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ basic_os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ basic_os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ basic_os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ basic_os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ basic_os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ basic_os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ basic_os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ basic_os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ basic_os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ basic_os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ basic_os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ basic_os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ basic_os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ basic_os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ basic_os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ basic_os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ basic_os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ basic_os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ basic_os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ basic_os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ basic_os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ basic_os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ basic_os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ basic_os=vms
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ basic_os=vsta
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ basic_os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ basic_os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ basic_os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ basic_os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ basic_os=
+ ;;
+ esac
+ ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
+ ;;
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ ibm*)
+ cpu=i370
+ vendor=ibm
+ ;;
+ orion105)
+ cpu=clipper
+ vendor=highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
+ ;;
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
+ ;;
+
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ cpu=m68000
+ vendor=att
+ ;;
+ 3b*)
+ cpu=we32k
+ vendor=att
+ ;;
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ basic_os=cnk
+ ;;
+ decsystem10* | dec10*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops10
+ ;;
+ decsystem20* | dec20*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ basic_os=sysv3
+ ;;
+ encore | umax | mmax)
+ cpu=ns32k
+ vendor=encore
+ ;;
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ basic_os=${basic_os:-bsd}
+ ;;
+ fx2800)
+ cpu=i860
+ vendor=alliant
+ ;;
+ genix)
+ cpu=ns32k
+ vendor=ns
+ ;;
+ h3050r* | hiux*)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ cpu=m68000
+ vendor=hp
+ ;;
+ hp9k3[2-9][0-9])
+ cpu=m68k
+ vendor=hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ i*86v32)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv32
+ ;;
+ i*86v4*)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv4
+ ;;
+ i*86v)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv
+ ;;
+ i*86sol2)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=solaris2
+ ;;
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ basic_os=${basic_os:-unicos}
+ ;;
+ iris | iris4d)
+ cpu=mips
+ vendor=sgi
+ case $basic_os in
+ irix*)
+ ;;
+ *)
+ basic_os=irix4
+ ;;
+ esac
+ ;;
+ miniframe)
+ cpu=m68000
+ vendor=convergent
+ ;;
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ basic_os=mint
+ ;;
+ news-3600 | risc-news)
+ cpu=mips
+ vendor=sony
+ basic_os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $basic_os in
+ openstep*)
+ ;;
+ nextstep*)
+ ;;
+ ns2*)
+ basic_os=nextstep2
+ ;;
+ *)
+ basic_os=nextstep3
+ ;;
+ esac
+ ;;
+ np1)
+ cpu=np1
+ vendor=gould
+ ;;
+ op50n-* | op60c-*)
+ cpu=hppa1.1
+ vendor=oki
+ basic_os=proelf
+ ;;
+ pa-hitachi)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ pbd)
+ cpu=sparc
+ vendor=tti
+ ;;
+ pbb)
+ cpu=m68k
+ vendor=tti
+ ;;
+ pc532)
+ cpu=ns32k
+ vendor=pc532
+ ;;
+ pn)
+ cpu=pn
+ vendor=gould
+ ;;
+ power)
+ cpu=power
+ vendor=ibm
+ ;;
+ ps2)
+ cpu=i386
+ vendor=ibm
+ ;;
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
+ ;;
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
+ ;;
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ basic_os=${basic_os:-elf}
+ ;;
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ basic_os=vxworks
+ ;;
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
+ ;;
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
+ ;;
+ w65)
+ cpu=w65
+ vendor=wdc
+ ;;
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ basic_os=proelf
+ ;;
+ none)
+ cpu=none
+ vendor=none
+ ;;
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
+ ;;
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ IFS=$saved_IFS
+ ;;
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
+ ;;
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
+ ;;
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
+ ;;
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
+ ;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ basic_os=${basic_os:-unicosmp}
+ ;;
+ c90-unknown | c90-cray)
+ vendor=cray
+ basic_os=${Basic_os:-unicos}
+ ;;
+ fx80-unknown)
+ vendor=alliant
+ ;;
+ romp-unknown)
+ vendor=ibm
+ ;;
+ mmix-unknown)
+ vendor=knuth
+ ;;
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
+ ;;
+ rs6000-unknown)
+ vendor=ibm
+ ;;
+ vax-unknown)
+ vendor=dec
+ ;;
+ pdp11-unknown)
+ vendor=dec
+ ;;
+ we32k-unknown)
+ vendor=att
+ ;;
+ cydra-unknown)
+ vendor=cydrome
+ ;;
+ i370-ibm*)
+ vendor=ibm
+ ;;
+ orion-unknown)
+ vendor=highlevel
+ ;;
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
+ ;;
+
+ # Here we normalize CPU types with a missing or matching vendor
+ armh-unknown | armh-alt)
+ cpu=armv7l
+ vendor=alt
+ basic_os=${basic_os:-linux-gnueabihf}
+ ;;
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ basic_os=${basic_os:-bosx}
+ ;;
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
+ ;;
+ blackfin-*)
+ cpu=bfin
+ basic_os=linux
+ ;;
+ c54x-*)
+ cpu=tic54x
+ ;;
+ c55x-*)
+ cpu=tic55x
+ ;;
+ c6x-*)
+ cpu=tic6x
+ ;;
+ e500v[12]-*)
+ cpu=powerpc
+ basic_os=${basic_os}"spe"
+ ;;
+ mips3*-*)
+ cpu=mips64
+ ;;
+ ms1-*)
+ cpu=mt
+ ;;
+ m68knommu-*)
+ cpu=m68k
+ basic_os=linux
+ ;;
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
+ ;;
+ openrisc-*)
+ cpu=or32
+ ;;
+ parisc-*)
+ cpu=hppa
+ basic_os=linux
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
+ cpu=i686
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
+ ;;
+ pentium4-*)
+ cpu=i786
+ ;;
+ pc98-*)
+ cpu=i386
+ ;;
+ ppc-* | ppcbe-*)
+ cpu=powerpc
+ ;;
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
+ ;;
+ ppc64-*)
+ cpu=powerpc64
+ ;;
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
+ ;;
+ sb1-*)
+ cpu=mipsisa64sb1
+ ;;
+ sb1el-*)
+ cpu=mipsisa64sb1el
+ ;;
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+ ;;
+ spur-*)
+ cpu=spur
+ ;;
+ strongarm-* | thumb-*)
+ cpu=arm
+ ;;
+ tx39-*)
+ cpu=mipstx39
+ ;;
+ tx39el-*)
+ cpu=mipstx39el
+ ;;
+ x64-*)
+ cpu=x86_64
+ ;;
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+ ;;
+ arm64-* | aarch64le-*)
+ cpu=aarch64
+ ;;
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
+ ;;
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
+ ;;
+ crx-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
+ ;;
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
+ ;;
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
+ ;;
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
+ ;;
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
+ ;;
+ mipsallegrexel-sony)
+ cpu=mipsallegrexel
+ vendor=sony
+ ;;
+ tile*-*)
+ basic_os=${basic_os:-linux-gnu}
+ ;;
+
+ *)
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb | arc32 | arc64 \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bpf | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | loongarch32 | loongarch64 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r3 | mipsisa32r3el \
+ | mipsisa32r5 | mipsisa32r5el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r3 | mipsisa64r3el \
+ | mipsisa64r5 | mipsisa64r5el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+ | rl78 | romp | rs6000 | rx \
+ | s390 | s390x \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | thumbv7* \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 \
+ | wasm32 | wasm64 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+ digital*)
+ vendor=dec
+ ;;
+ commodore*)
+ vendor=cbm
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+ gnu/linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+ ;;
+ os2-emx)
+ kernel=os2
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+ ;;
+ nto-qnx*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+ ;;
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+ IFS=$saved_IFS
+ ;;
+ # Default OS when just kernel was specified
+ nto*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+ ;;
+ linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+ ;;
+ managarm*)
+ kernel=managarm
+ os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
+ ;;
+ *)
+ kernel=
+ os=$basic_os
+ ;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+ ;;
+ solaris)
+ os=solaris2
+ ;;
+ unixware*)
+ os=sysv4.2uw
+ ;;
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco*v* | scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ qnx*)
+ os=qnx
+ ;;
+ hiux*)
+ os=hiuxwe2
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynxos*)
+ # don't get caught up in next wildcard
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac[0-9]*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
+ ;;
+ opened*)
+ os=openedition
+ ;;
+ os400*)
+ os=os400
+ ;;
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ ;;
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ ;;
+ wince*)
+ os=wince
+ ;;
+ utek*)
+ os=bsd
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo "$os" | sed -e 's|sinix|sysv|'`
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ tpf*)
+ os=tpf
+ ;;
+ triton*)
+ os=sysv3
+ ;;
+ oss*)
+ os=sysv3
+ ;;
+ svr4*)
+ os=sysv4
+ ;;
+ svr3)
+ os=sysv3
+ ;;
+ sysvr4)
+ os=sysv4
+ ;;
+ ose*)
+ os=ose
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
+ ;;
+ dicos*)
+ os=dicos
+ ;;
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
+ ;;
+ *)
+ # No normalization, but not necessarily accepted, that comes below.
+ ;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ kernel=linux
+ os=gnu
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=tops20
+ ;;
+ pdp11-*)
+ os=none
+ ;;
+ *-dec | vax-*)
+ os=ultrix4.2
+ ;;
+ m68*-apollo)
+ os=domain
+ ;;
+ i386-sun)
+ os=sunos4.0.2
+ ;;
+ m68000-sun)
+ os=sunos3
+ ;;
+ m68*-cisco)
+ os=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=sysv
+ ;;
+ *-cbm)
+ os=amigaos
+ ;;
+ *-dg)
+ os=dgux
+ ;;
+ *-dolphin)
+ os=sysv3
+ ;;
+ m68k-ccur)
+ os=rtu
+ ;;
+ m88k-omron*)
+ os=luna
+ ;;
+ *-next)
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
+ ;;
+ *-gould)
+ os=sysv
+ ;;
+ *-highlevel)
+ os=bsd
+ ;;
+ *-encore)
+ os=bsd
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+ # Sometimes we do "kernel-libc", so those need to count as OSes.
+ musl* | newlib* | relibc* | uclibc*)
+ ;;
+ # Likewise for "kernel-abi"
+ eabi* | gnueabi*)
+ ;;
+ # VxWorks passes extra cpu info in the 4th filed.
+ simlinux | simwindows | spe)
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+ | hiux* | abug | nacl* | netware* | windows* \
+ | os9* | macos* | osx* | ios* \
+ | mpw* | magic* | mmixware* | mon960* | lnews* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* | serenity* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | mint* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+ | fiwix* | mlibc* )
+ ;;
+ # This one is extra strict with allowed versions
+ sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ none)
+ ;;
+ kernel* )
+ # Restricted further below
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+ | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
+ ;;
+ uclinux-uclibc* )
+ ;;
+ managarm-mlibc* | managarm-kernel* )
+ ;;
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
+ # These are just libc implementations, not actual OSes, and thus
+ # require a kernel.
+ echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ -kernel* )
+ echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ *-kernel* )
+ echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2
+ exit 1
+ ;;
+ kfreebsd*-gnu* | kopensolaris*-gnu*)
+ ;;
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ ;;
+ nto-qnx*)
+ ;;
+ os2-emx)
+ ;;
+ *-eabi* | *-gnueabi*)
+ ;;
+ -*)
+ # Blank kernel with real OS is always fine.
+ ;;
+ *-*)
+ echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+case $vendor in
+ unknown)
+ case $cpu-$os in
+ *-riscix*)
+ vendor=acorn
+ ;;
+ *-sunos*)
+ vendor=sun
+ ;;
+ *-cnk* | *-aix*)
+ vendor=ibm
+ ;;
+ *-beos*)
+ vendor=be
+ ;;
+ *-hpux*)
+ vendor=hp
+ ;;
+ *-mpeix*)
+ vendor=hp
+ ;;
+ *-hiux*)
+ vendor=hitachi
+ ;;
+ *-unos*)
+ vendor=crds
+ ;;
+ *-dgux*)
+ vendor=dg
+ ;;
+ *-luna*)
+ vendor=omron
+ ;;
+ *-genix*)
+ vendor=ns
+ ;;
+ *-clix*)
+ vendor=intergraph
+ ;;
+ *-mvs* | *-opened*)
+ vendor=ibm
+ ;;
+ *-os400*)
+ vendor=ibm
+ ;;
+ s390-* | s390x-*)
+ vendor=ibm
+ ;;
+ *-ptx*)
+ vendor=sequent
+ ;;
+ *-tpf*)
+ vendor=ibm
+ ;;
+ *-vxsim* | *-vxworks* | *-windiss*)
+ vendor=wrs
+ ;;
+ *-aux*)
+ vendor=apple
+ ;;
+ *-hms*)
+ vendor=hitachi
+ ;;
+ *-mpw* | *-macos*)
+ vendor=apple
+ ;;
+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+ vendor=atari
+ ;;
+ *-vos*)
+ vendor=stratus
+ ;;
+ esac
+ ;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/install-sh b/config/install-sh
new file mode 100755
index 0000000..ec298b5
--- /dev/null
+++ b/config/install-sh
@@ -0,0 +1,541 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2020-11-14.01; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
+ -s $stripprog installed files.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -p) cpprog="$cpprog -p";;
+
+ -s) stripcmd=$stripprog;;
+
+ -S) backupsuffix="$2"
+ shift;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ # The $RANDOM variable is not portable (e.g., dash). Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap '
+ ret=$?
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+ exit $ret
+ ' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p'.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask &&
+ { test -z "$stripcmd" || {
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
+ # which would cause strip to fail.
+ if test -z "$doit"; then
+ : >"$dsttmp" # No need to fork-exec 'touch'.
+ else
+ $doit touch "$dsttmp"
+ fi
+ }
+ } &&
+ $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config/ltmain.sh b/config/ltmain.sh
new file mode 100644
index 0000000..c12c197
--- /dev/null
+++ b/config/ltmain.sh
@@ -0,0 +1,11249 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2014-01-03.01
+
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION="2.4.6 Debian-2.4.6-9"
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+fi
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+ fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath=$progdir/$progname
+ ;;
+ *)
+ _G_IFS=$IFS
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS=$_G_IFS
+ test -x "$progdir/$progname" && break
+ done
+ IFS=$_G_IFS
+ test -n "$progdir" || progdir=`pwd`
+ progpath=$progdir/$progname
+ ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+ $debug_cmd
+
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ $debug_cmd
+
+ func_error "$*"
+ exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $debug_cmd
+
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
+
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$_G_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ _G_dir_list=$_G_directory_path:$_G_dir_list
+
+ # If the last portion added has no slash in it, the list is done
+ case $_G_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ done
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$_G_dir" 2>/dev/null || :
+ done
+ IFS=$func_mkdir_p_IFS
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
+ fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+ $debug_cmd
+
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
+ # Return a directory name, but don't create it in dry-run mode
+ _G_tmpdir=$_G_template-$$
+ else
+
+ # If mktemp works, use that first and foremost
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$_G_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+ func_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ fi
+
+ $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+ $debug_cmd
+
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
+{
+ $debug_cmd
+
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
+ *[\\\`\"\$]*)
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
+
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
+ ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
+ esac
+
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ $debug_cmd
+
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
+ esac
+
+ case $_G_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
+ ;;
+ esac
+
+ func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ $opt_quiet || {
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $debug_cmd
+
+ $opt_verbose && func_echo "$*"
+
+ :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2015-10-07.11; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+ $debug_cmd
+
+ _G_rc_run_hooks=false
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ if eval $_G_hook '"$@"'; then
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ _G_rc_run_hooks=:
+ fi
+ done
+
+ $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, you may remove/edit
+# any options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
+# hook's caller know that it should pay attention to
+# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
+# arguments are left untouched by the hook and therefore caller will ignore the
+# result variable.
+#
+# Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+# # No change in '$@' (ignored completely by this hook). There is
+# # no need to do the equivalent (but slower) action:
+# # func_quote_for_eval ${1+"$@"}
+# # my_options_prep_result=$func_quote_for_eval_result
+# false
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# args_changed=false
+#
+# # Note that for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=:
+# args_changed=:
+# ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# args_changed=:
+# ;;
+# *) # Make sure the first unrecognised option "$_G_opt"
+# # is added back to "$@", we could need that later
+# # if $args_changed is true.
+# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+# esac
+# done
+#
+# if $args_changed; then
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# fi
+#
+# $args_changed
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+#
+# false
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll also need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+ $debug_cmd
+
+ _G_func_options_finish_exit=false
+ if func_run_hooks func_options ${1+"$@"}; then
+ func_options_finish_result=$func_run_hooks_result
+ _G_func_options_finish_exit=:
+ fi
+
+ $_G_func_options_finish_exit
+}
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ _G_rc_options=false
+
+ for my_func in options_prep parse_options validate_options options_finish
+ do
+ if eval func_$my_func '${1+"$@"}'; then
+ eval _G_res_var='$'"func_${my_func}_result"
+ eval set dummy "$_G_res_var" ; shift
+ _G_rc_options=:
+ fi
+ done
+
+ # Save modified positional parameters for caller. As a top-level
+ # options-parser function we always need to set the 'func_options_result'
+ # variable (regardless the $_G_rc_options value).
+ if $_G_rc_options; then
+ func_options_result=$_G_res_var
+ else
+ func_quote_for_eval ${1+"$@"}
+ func_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_options
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propagate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ _G_rc_options_prep=false
+ if func_run_hooks func_options_prep ${1+"$@"}; then
+ _G_rc_options_prep=:
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+ fi
+
+ $_G_rc_options_prep
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ func_parse_options_result=
+
+ _G_rc_parse_options=false
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ if func_run_hooks func_parse_options ${1+"$@"}; then
+ eval set dummy "$func_run_hooks_result"; shift
+ _G_rc_parse_options=:
+ fi
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ _G_match_parse_options=:
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode"
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ if test $# = 0 && func_missing_arg $_G_opt; then
+ _G_rc_parse_options=:
+ break
+ fi
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) _G_rc_parse_options=: ; break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift
+ _G_match_parse_options=false
+ break
+ ;;
+ esac
+
+ $_G_match_parse_options && _G_rc_parse_options=:
+ done
+
+
+ if $_G_rc_parse_options; then
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_parse_options
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ _G_rc_validate_options=false
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ if func_run_hooks func_validate_options ${1+"$@"}; then
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+ _G_rc_validate_options=:
+ fi
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+
+ $_G_rc_validate_options
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message"
+ exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $debug_cmd
+
+ func_error "Missing argument for '$1'."
+ exit_cmd=exit
+}
+
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
+}
+
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
+ }
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
+ }
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
+
+ exit $?
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ $debug_cmd
+
+ $warning_func ${1+"$@"}
+}
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --mode=MODE use operation mode MODE
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+ host-triplet: $host
+ shell: $SHELL
+ compiler: $LTCC
+ compiler flags: $LTCFLAGS
+ linker: $LD (gnu? $with_gnu_ld)
+ version: $progname $scriptversion Debian-2.4.6-9
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+ exit 0
+}
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_lo2o ()
+ {
+ case $1 in
+ *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+ * ) func_lo2o_result=$1 ;;
+ esac
+ }'
+
+ # func_xform LIBOBJ-OR-SOURCE
+ # ---------------------------
+ # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+ # suffix to a '.lo' libtool-object suffix.
+ eval 'func_xform ()
+ {
+ func_xform_result=${1%.*}.lo
+ }'
+else
+ # ...otherwise fall back to using sed.
+ func_lo2o ()
+ {
+ func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+ }
+
+ func_xform ()
+ {
+ func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+ }
+fi
+
+
+# func_fatal_configuration ARG...
+# -------------------------------
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func__fatal_error ${1+"$@"} \
+ "See the $PACKAGE documentation for more information." \
+ "Fatal configuration error."
+}
+
+
+# func_config
+# -----------
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+
+# func_features
+# -------------
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test yes = "$build_libtool_libs"; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test yes = "$build_old_libs"; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+
+# func_enable_tag TAGNAME
+# -----------------------
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname=$1
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf=/$re_begincf/,/$re_endcf/p
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+ $debug_mode
+
+ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+ opt_help=false
+ opt_mode=
+ opt_preserve_dup_deps=false
+ opt_quiet=false
+
+ nonopt=
+ preserve_args=
+
+ _G_rc_lt_options_prep=:
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ *)
+ _G_rc_lt_options_prep=false
+ ;;
+ esac
+
+ if $_G_rc_lt_options_prep; then
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_lt_options_prep
+}
+func_add_hook func_options_prep libtool_options_prep
+
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+ $debug_cmd
+
+ _G_rc_lt_parse_options=false
+
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_match_lt_parse_options=:
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+
+ --config) func_config ;;
+
+ --dlopen|-dlopen)
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=: ;;
+
+ --features) func_features ;;
+
+ --finish) set dummy --mode finish ${1+"$@"}; shift ;;
+
+ --help) opt_help=: ;;
+
+ --help-all) opt_help=': help-all' ;;
+
+ --mode) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_mode=$1
+ case $1 in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $_G_opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+ shift
+ ;;
+
+ --no-silent|--no-quiet)
+ opt_quiet=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ opt_warning=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-verbose)
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --silent|--quiet)
+ opt_quiet=:
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --tag) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_tag=$1
+ func_append preserve_args " $_G_opt $1"
+ func_enable_tag "$1"
+ shift
+ ;;
+
+ --verbose|-v) opt_quiet=false
+ opt_verbose=:
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"} ; shift
+ _G_match_lt_parse_options=false
+ break
+ ;;
+ esac
+ $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
+ done
+
+ if $_G_rc_lt_parse_options; then
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_lt_parse_options
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+ # save first non-option argument
+ if test 0 -lt $#; then
+ nonopt=$1
+ shift
+ fi
+
+ # preserve --debug
+ test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ test yes != "$build_libtool_libs" \
+ && test yes != "$build_old_libs" \
+ && func_fatal_configuration "not configured to build any kind of library"
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+ func_error "unrecognized option '-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
+
+ # Pass back the unparsed argument list
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+ $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if 'file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case $lalib_p_line in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test yes = "$lalib_p"
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ test -f "$1" &&
+ $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $debug_cmd
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# 'FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $debug_cmd
+
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case $lt_sysroot:$1 in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result='='$func_stripname_result
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $debug_cmd
+
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with '--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=$1
+ if test yes = "$build_libtool_libs"; then
+ write_lobj=\'$2\'
+ else
+ write_lobj=none
+ fi
+
+ if test yes = "$build_old_libs"; then
+ write_oldobj=\'$3\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "$write_libobj"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $debug_cmd
+
+ func_convert_core_file_wine_to_w32_result=$1
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $debug_cmd
+
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result"; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $debug_cmd
+
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $debug_cmd
+
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $debug_cmd
+
+ if test -z "$2" && test -n "$1"; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result=$1
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $debug_cmd
+
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " '$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result=$3
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $debug_cmd
+
+ case $4 in
+ $1 ) func_to_host_path_result=$3$func_to_host_path_result
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $debug_cmd
+
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $debug_cmd
+
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_msys_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $debug_cmd
+
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd=func_convert_path_$func_stripname_result
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $debug_cmd
+
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_msys_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+ $debug_cmd
+
+ func_dll_def_p_tmp=`$SED -n \
+ -e 's/^[ ]*//' \
+ -e '/^\(;.*\)*$/d' \
+ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
+ -e q \
+ "$1"`
+ test DEF = "$func_dll_def_p_tmp"
+}
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $debug_cmd
+
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile=$nonopt # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg=$arg
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj=$arg
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify '-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs=$IFS; IFS=,
+ for arg in $args; do
+ IFS=$save_ifs
+ func_append_quoted lastarg "$arg"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg=$srcfile
+ srcfile=$arg
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with '-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj=$func_basename_result
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from '$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test yes = "$build_libtool_libs" \
+ || func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name '$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname=$func_basename_result
+ xdir=$func_dirname_result
+ lobj=$xdir$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test yes = "$build_old_libs"; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test no = "$compiler_c_o"; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+ lockfile=$output_obj.lock
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test yes = "$need_locks"; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test warn = "$need_locks"; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test yes = "$build_libtool_libs"; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test no != "$pic_mode"; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test yes = "$suppress_opt"; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test yes = "$build_old_libs"; then
+ if test yes != "$pic_mode"; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test yes = "$compiler_c_o"; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test no != "$need_locks"; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a '.o' file suitable for static linking
+ -static only build a '.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to '-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the '--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the 'install' or 'cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE use a list of object files found in FILE to specify objects
+ -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with '-') are ignored.
+
+Every other argument is treated as a filename. Files ending in '.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
+
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode '$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try '$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test : = "$opt_help"; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ $SED '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $debug_cmd
+
+ # The first argument is the command name.
+ cmd=$nonopt
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "'$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "'$file' was not linked with '-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ ;;
+
+ *)
+ func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir=$absdir
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic=$magic
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if $opt_dry_run; then
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ else
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd=\$cmd$args
+ fi
+}
+
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $debug_cmd
+
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "'$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument '$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_quiet && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the '$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the '$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the '$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $debug_cmd
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac
+ then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=false
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=: ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test X-m = "X$prev" && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=:
+ if $isdir; then
+ destdir=$dest
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir=$func_dirname_result
+ destname=$func_basename_result
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "'$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "'$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir=$func_dirname_result
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking '$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname=$1
+ shift
+
+ srcname=$realname
+ test -n "$relink_command" && srcname=${realname}T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ os2*)
+ case $realname in
+ *_dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try 'ln -sf' first, because the 'ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib=$destdir/$realname
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name=$func_basename_result
+ instname=$dir/${name}i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest=$destfile
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to '$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test yes = "$build_old_libs"; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=.exe
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script '$wrapper'"
+
+ finalize=:
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "'$lib' has not been installed in '$libdir'"
+ finalize=false
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test no = "$fast_install" && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if $finalize; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file=$func_basename_result
+ outputname=$tmpdir/$file
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_quiet || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink '$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file=$outputname
+ else
+ func_warning "cannot relink '$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name=$func_basename_result
+
+ # Set up the ranlib parameters.
+ oldlib=$destdir/$name
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run '$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $debug_cmd
+
+ my_outputname=$1
+ my_originator=$2
+ my_pic_p=${3-false}
+ my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms=${my_outputname}S.c
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist=$output_objdir/$my_outputname.nm
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test yes = "$dlself"; then
+ func_verbose "generating symbol list for '$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols=$output_objdir/$outputname.exp
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from '$dlprefile'"
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname"; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename=$func_basename_result
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename"; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ func_show_eval '$RM "${nlist}I"'
+ if test -n "$global_symbol_to_import"; then
+ eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+ LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+ for (; symbol->name; ++symbol)
+ {"
+ $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+ echo >> "$output_objdir/$my_dlsyms" "\
+ }
+}"
+ fi
+ echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{ {\"$my_originator\", (void *) 0},"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {\"@INIT@\", (void *) &lt_syminit},"
+ fi
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for '$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $debug_cmd
+
+ win32_libid_type=unknown
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+ func_cygming_gnu_implib_p "$1"
+ then
+ win32_nmres=import
+ else
+ win32_nmres=
+ fi
+ ;;
+ *)
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s|.*|import|
+ p
+ q
+ }
+ }'`
+ ;;
+ esac
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $debug_cmd
+
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $debug_cmd
+
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive that possess that section. Heuristic: eliminate
+ # all those that have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $debug_cmd
+
+ if func_cygming_gnu_implib_p "$1"; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1"; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $debug_cmd
+
+ f_ex_an_ar_dir=$1; shift
+ f_ex_an_ar_oldlib=$1
+ if test yes = "$lock_old_archive_extraction"; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test yes = "$lock_old_archive_extraction"; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $debug_cmd
+
+ my_gentop=$1; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=
+ my_xlib=
+ my_xabs=
+ my_xdir=
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib=$func_basename_result
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir=$my_gentop/$my_xlib_u
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches; do
+ func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+ $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+ cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+ func_extract_an_archive "`pwd`" "$darwin_base_archive"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result=$my_oldobjs
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test yes = "$fast_install"; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ \$ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
+# define LT_PATHMAX PATH_MAX
+#elif defined MAXPATHLEN
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free (stale); stale = 0; } \
+} while (0)
+
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test yes = "$fast_install"; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ int rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, (size_t) argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (STREQ (argv[i], dumpscript_opt))
+ {
+EOF
+ case $host in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (STREQ (argv[i], debug_opt))
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (STREQ (argv[i], ltwrapper_option_prefix))
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ size_t tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = (size_t) (q - p);
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (STREQ (str, pat))
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ size_t len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ size_t orig_value_len = strlen (orig_value);
+ size_t add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ size_t len = strlen (new_value);
+ while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[--len] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $debug_cmd
+
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+ $debug_cmd
+
+ case " $compile_command " in
+ *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+ suncc_use_cstd_abi=no
+ ;;
+ *)
+ suncc_use_cstd_abi=yes
+ ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $debug_cmd
+
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll that has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ os2dllname=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=false
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module=$wl-single_module
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test yes != "$build_libtool_libs" \
+ && func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg=$1
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir=$arg
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ $preload || {
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=:
+ }
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test no = "$dlself"; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test dlprefiles = "$prev"; then
+ dlself=yes
+ elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test dlfiles = "$prev"; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols=$arg
+ test -f "$arg" \
+ || func_fatal_error "symbol file '$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex=$arg
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir=$arg
+ prev=
+ continue
+ ;;
+ mllvm)
+ # Clang does not use LLVM to link, so we can simply discard any
+ # '-mllvm $arg' options when doing the link step.
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ if test none != "$pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ fi
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file '$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ os2dllname)
+ os2dllname=$arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex=$arg
+ prev=
+ continue
+ ;;
+ release)
+ release=-$arg
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test rpath = "$prev"; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds=$arg
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg=$arg
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "'-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test X-export-symbols = "X$arg"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between '-L' and '$1'"
+ else
+ func_fatal_error "need path for '-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of '$dir'"
+ dir=$absdir
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc due to us having libc/libc_r.
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test X-lc = "X$arg" && continue
+ ;;
+ esac
+ elif test X-lc_r = "X$arg"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -mllvm)
+ prev=mllvm
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module=$wl-multi_module
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+ func_warning "assuming '-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -os2dllname)
+ prev=os2dllname
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
+ # -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fuse-ld=* Linker select flags for GCC
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*|-fsanitize=*|-fuse-ld=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case $arg in
+ -Zlinker | -Zstack)
+ prev=xcompiler
+ ;;
+ esac
+ continue
+ else
+ # Otherwise treat like 'Some other compiler flag' below
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ fi
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ test none = "$pic_object" || {
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ }
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test dlfiles = "$prev"; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test dlprefiles = "$prev"; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prevarg' option requires an argument"
+
+ if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname=$func_basename_result
+ libobjs_save=$libobjs
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
+ func_dirname "$output" "/" ""
+ output_objdir=$func_dirname_result$objdir
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test lib = "$linkmode"; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=false
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test lib,link = "$linkmode,$pass"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs=$tmp_deplibs
+ fi
+
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass"; then
+ libs=$deplibs
+ deplibs=
+ fi
+ if test prog = "$linkmode"; then
+ case $pass in
+ dlopen) libs=$dlfiles ;;
+ dlpreopen) libs=$dlprefiles ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test lib,dlpreopen = "$linkmode,$pass"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs=$dlprefiles
+ fi
+ if test dlopen = "$pass"; then
+ # Collect dlpreopened libraries
+ save_deplibs=$deplibs
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=false
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test lib != "$linkmode" && test prog != "$linkmode"; then
+ func_warning "'-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test lib = "$linkmode"; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib=$searchdir/lib$name$search_ext
+ if test -f "$lib"; then
+ if test .la = "$search_ext"; then
+ found=:
+ else
+ found=false
+ fi
+ break 2
+ fi
+ done
+ done
+ if $found; then
+ # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll=$l
+ done
+ if test "X$ll" = "X$old_library"; then # only static version available
+ found=false
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+ lib=$ladir/$old_library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ else
+ # deplib doesn't seem to be a libtool library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ *.ltframework)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test conv = "$pass" && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test scan = "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "'-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test link = "$pass"; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=false
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=:
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=:
+ ;;
+ esac
+ if $valid_a_lib; then
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ else
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test link != "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ elif test prog = "$linkmode"; then
+ if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=:
+ continue
+ ;;
+ esac # case $deplib
+
+ $found || test -f "$lib" \
+ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "'$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass" ||
+ { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test conv = "$pass"; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ elif test prog != "$linkmode" && test lib != "$linkmode"; then
+ func_fatal_error "'$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test yes = "$prefer_static_libs" ||
+ test built,no = "$prefer_static_libs,$installed"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib=$l
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test dlopen = "$pass"; then
+ test -z "$libdir" \
+ && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+ if test -z "$dlname" ||
+ test yes != "$dlopen_support" ||
+ test no = "$build_libtool_libs"
+ then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of '$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir=$ladir
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname=$func_basename_result
+
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+ else
+ dir=$lt_sysroot$libdir
+ absdir=$lt_sysroot$libdir
+ fi
+ test yes = "$hardcode_automatic" && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir=$ladir
+ absdir=$abs_ladir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir=$ladir/$objdir
+ absdir=$abs_ladir/$objdir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test dlpreopen = "$pass"; then
+ if test -z "$libdir" && test prog = "$linkmode"; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test lib = "$linkmode"; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test prog = "$linkmode" && test link != "$pass"; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=false
+ if test no != "$link_all_deplibs" || test -z "$library_names" ||
+ test no = "$build_libtool_libs"; then
+ linkalldeplibs=:
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if $linkalldeplibs; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test prog,link = "$linkmode,$pass"; then
+ if test -n "$library_names" &&
+ { { test no = "$prefer_static_libs" ||
+ test built,yes = "$prefer_static_libs,$installed"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+ # Make sure the rpath contains only unique directories.
+ case $temp_rpath: in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if $alldeplibs &&
+ { test pass_all = "$deplibs_check_method" ||
+ { test yes = "$build_libtool_libs" &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test built = "$use_static_libs" && test yes = "$installed"; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test no = "$installed"; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule=$dlpremoduletest
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+ echo
+ if test prog = "$linkmode"; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test lib = "$linkmode" &&
+ test yes = "$hardcode_into_libs"; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname=$dlname
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot=$soname
+ func_basename "$soroot"
+ soname=$func_basename_result
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from '$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for '$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test prog = "$linkmode" || test relink != "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test no = "$hardcode_direct"; then
+ add=$dir/$linklib
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+ *-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir=-L$dir ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we cannot
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library"; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add=$dir/$old_library
+ fi
+ elif test -n "$old_library"; then
+ add=$dir/$old_library
+ fi
+ fi
+ esac
+ elif test no = "$hardcode_minus_L"; then
+ case $host in
+ *-*-sunos*) add_shlibpath=$dir ;;
+ esac
+ add_dir=-L$dir
+ add=-l$name
+ elif test no = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$dir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$absdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test yes != "$lib_linked"; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test yes != "$hardcode_direct" &&
+ test yes != "$hardcode_minus_L" &&
+ test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test prog = "$linkmode" || test relink = "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add=-l$name
+ elif test yes = "$hardcode_automatic"; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add=$inst_prefix_dir$libdir/$linklib
+ else
+ add=$libdir/$linklib
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir=-L$libdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ fi
+
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test prog = "$linkmode"; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test yes = "$build_libtool_libs"; then
+ # Not a shared library
+ if test pass_all != "$deplibs_check_method"; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test yes = "$module"; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test lib = "$linkmode"; then
+ if test -n "$dependency_libs" &&
+ { test yes != "$hardcode_into_libs" ||
+ test yes = "$build_old_libs" ||
+ test yes = "$link_static"; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs=$temp_deplibs
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test no != "$link_all_deplibs"; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path=$deplib ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of '$dir'"
+ absdir=$dir
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names"; then
+ for tmp in $deplibrary_names; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl"; then
+ depdepl=$absdir/$objdir/$depdepl
+ darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+ func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path=-L$absdir/$objdir
+ ;;
+ esac
+ else
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test link = "$pass"; then
+ if test prog = "$linkmode"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs=$newdependency_libs
+ if test dlpreopen = "$pass"; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test dlopen != "$pass"; then
+ test conv = "$pass" || {
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ }
+
+ if test prog,link = "$linkmode,$pass"; then
+ vars="compile_deplibs finalize_deplibs"
+ else
+ vars=deplibs
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+
+ # Add Sun CC postdeps if required:
+ test CXX = "$tagname" && {
+ case $host_os in
+ linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C++ 5.9
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ func_cc_basename "$CC"
+ case $func_cc_basename_result in
+ CC* | sunCC*)
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ }
+
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=
+ ;;
+ esac
+ if test -n "$i"; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test prog = "$linkmode"; then
+ dlfiles=$newdlfiles
+ fi
+ if test prog = "$linkmode" || test lib = "$linkmode"; then
+ dlprefiles=$newdlprefiles
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "'-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs=$output
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form 'libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test no = "$module" \
+ && func_fatal_help "libtool library '$output' must begin with 'lib'"
+
+ if test no != "$need_lib_prefix"; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test pass_all != "$deplibs_check_method"; then
+ func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test no = "$dlself" \
+ || func_warning "'-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test 1 -lt "$#" \
+ && func_warning "ignoring multiple '-rpath's for a libtool library"
+
+ install_libdir=$1
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test yes = "$build_libtool_libs"; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a '.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs=$IFS; IFS=:
+ set dummy $vinfo 0 0 0
+ shift
+ IFS=$save_ifs
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to '-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major=$1
+ number_minor=$2
+ number_revision=$3
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # that has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|freebsd-elf|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_revision
+ ;;
+ freebsd-aout|qnx|sunos)
+ current=$number_major
+ revision=$number_minor
+ age=0
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_minor
+ lt_irix_increment=no
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
+ ;;
+ esac
+ ;;
+ no)
+ current=$1
+ revision=$2
+ age=$3
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT '$current' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION '$revision' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE '$age' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE '$age' is greater than the current interface number '$current'"
+ func_fatal_error "'$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+ case $CC in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+ *)
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ esac
+ ;;
+
+ freebsd-aout)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ freebsd-elf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ irix | nonstopux)
+ if test no = "$lt_irix_increment"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring=$verstring_prefix$major.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test 0 -ne "$loop"; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring_prefix$major.$iface:$verstring
+ done
+
+ # Before this point, $major must not contain '.'.
+ major=.$major
+ versuffix=$major.$revision
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=.$current.$age.$revision
+ verstring=$current.$age.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test 0 -ne "$loop"; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring:$iface.0
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":$current.0"
+ ;;
+
+ qnx)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sco)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sunos)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 file systems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type '$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring=0.0
+ ;;
+ esac
+ if test no = "$need_version"; then
+ versuffix=
+ else
+ versuffix=.0.0
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test yes,no = "$avoid_version,$need_version"; then
+ major=
+ versuffix=
+ verstring=
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test yes = "$allow_undefined"; then
+ if test unsupported = "$allow_undefined_flag"; then
+ if test yes = "$build_old_libs"; then
+ func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+ build_libtool_libs=no
+ else
+ func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+ fi
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag=$no_undefined_flag
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" :
+ func_append libobjs " $symfileobj"
+ test " " = "$libobjs" && libobjs=
+
+ if test relink != "$opt_mode"; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+ if test -n "$precious_files_regex"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles=$dlfiles
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles=$dlprefiles
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test yes = "$build_libtool_need_lc"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=
+ versuffix=
+ major=
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test yes = "$want_nocaseglob"; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib=$potent_lib
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib=$potent_lib # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ for i in $predeps $postdeps; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test none = "$deplibs_check_method"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test yes = "$droppeddeps"; then
+ if test yes = "$module"; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test no = "$allow_undefined"; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs=$new_libs
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test yes = "$build_libtool_libs"; then
+ # Remove $wl instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test yes = "$hardcode_into_libs"; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath=$finalize_rpath
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath=$finalize_shlibpath
+ test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib=$output_objdir/$realname
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols=$output_objdir/$libname.uexp
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols=$export_symbols
+ export_symbols=
+ always_export_symbols=yes
+ }
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs=$IFS; IFS='~'
+ for cmd1 in $cmds; do
+ IFS=$save_ifs
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test yes = "$try_normal_branch" \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=$output_objdir/$output_la.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS=$save_ifs
+ if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs=$tmp_deplibs
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test yes = "$compiler_needs_object" &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test : != "$skipped_export" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test yes = "$compiler_needs_object"; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-$k.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test -z "$objlist" ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test 1 -eq "$k"; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-$k.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-$k.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ ${skipped_export-false} && {
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ }
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs=$IFS; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ ${skipped_export-false} && {
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ }
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $cmds; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test yes = "$module" || test yes = "$export_dynamic"; then
+ # On all known operating systems, these are identical.
+ dlname=$soname
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object '$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj=$output
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # if reload_cmds runs $LD directly, get rid of -Wl from
+ # whole_archive_flag_spec and hope we can get by with turning comma
+ # into space.
+ case $reload_cmds in
+ *\$LD[\ \$]*) wl= ;;
+ esac
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+ else
+ gentop=$output_objdir/${obj}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
+ # Create the old-style object.
+ reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+
+ output=$obj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ test yes = "$build_libtool_libs" || {
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ }
+
+ if test -n "$pic_flag" || test default != "$pic_mode"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output=$libobj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for programs"
+
+ $preload \
+ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test CXX = "$tagname"; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " $wl-bind_at_load"
+ func_append finalize_command " $wl-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs=$new_libs
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath=$rpath
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath=$rpath
+
+ if test -n "$libobjs" && test yes = "$build_old_libs"; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" false
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=:
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+ *cygwin* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+ if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+ wrappers_required=false
+ fi
+ ;;
+ esac
+ $wrappers_required || {
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command=$compile_command$compile_rpath
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.$objext"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+ fi
+
+ exit $exit_status
+ }
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test yes = "$no_install"; then
+ # We don't need to create a wrapper script.
+ link_command=$compile_var$compile_command$compile_rpath
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ case $hardcode_action,$fast_install in
+ relink,*)
+ # Fast installation is not supported
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "'$output' will be relinked during installation"
+ ;;
+ *,yes)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource=$output_path/$objdir/lt-$output_name.c
+ cwrapper=$output_path/$output_name.exe
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host"; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ case $build_libtool_libs in
+ convenience)
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs=$convenience
+ build_libtool_libs=no
+ ;;
+ module)
+ oldobjs=$libobjs_save
+ addlibs=$old_convenience
+ build_libtool_libs=no
+ ;;
+ *)
+ oldobjs="$old_deplibs $non_pic_objects"
+ $preload && test -f "$symfileobj" \
+ && func_append oldobjs " $symfileobj"
+ addlibs=$old_convenience
+ ;;
+ esac
+
+ if test -n "$addlibs"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase=$func_basename_result
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj"; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test -z "$oldobjs"; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test yes = "$build_old_libs" && old_library=$libname.$libext
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test yes = "$hardcode_automatic"; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test yes = "$installed"; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output=$output_objdir/${outputname}i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name=$func_basename_result
+ func_resolve_sysroot "$deplib"
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs=$newdependency_libs
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles=$newdlprefiles
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles=$newdlprefiles
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result/$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test no,yes = "$installed,$need_relink"; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+ func_mode_link ${1+"$@"}
+fi
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $debug_cmd
+
+ RM=$nonopt
+ files=
+ rmforce=false
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=: ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ if test . = "$dir"; then
+ odir=$objdir
+ else
+ odir=$dir/$objdir
+ fi
+ func_basename "$file"
+ name=$func_basename_result
+ test uninstall = "$opt_mode" && odir=$dir
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test clean = "$opt_mode"; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif $rmforce; then
+ continue
+ fi
+
+ rmfiles=$file
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case $opt_mode in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" && test none != "$pic_object"; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test clean = "$opt_mode"; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+ if test yes = "$fast_install" && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name"; then
+ func_append rmfiles " $odir/lt-$noexename.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the $objdir's in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+ func_mode_uninstall ${1+"$@"}
+fi
+
+test -z "$opt_mode" && {
+ help=$generic_help
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode '$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# where we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/config/mkinstalldirs b/config/mkinstalldirs
new file mode 100755
index 0000000..4f58503
--- /dev/null
+++ b/config/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
+
+errstatus=0
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/config/parse-types.sh b/config/parse-types.sh
new file mode 100755
index 0000000..24d2a99
--- /dev/null
+++ b/config/parse-types.sh
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+cat > sed.script << "EOF"
+/^#/d
+/^$/d
+s/__extension__ //
+s/typedef \(.*\) __u\([1-9]*\);/#define __U\2_TYPEDEF \1/
+s/typedef \(.*\) __s\([1-9]*\);/#define __S\2_TYPEDEF \1/
+EOF
+
+if test -z "$CC"; then
+ CC=gcc
+fi
+
+if test -z "$CPP"; then
+ CPP="$CC -E"
+fi
+
+/bin/echo -n "checking for __uNN types... "
+# can't check [ -f /usr/include/asm/types.h ] directly, since
+# the include path might be different if cross-compiling
+if echo '#include <asm/types.h>' | $CPP - 2> parse-types.log | \
+ sed -f sed.script | grep '^#' > asm_types.h; then
+ echo "using <asm/types.h>"
+else
+ echo "using generic types"
+fi
+
+rm sed.script
+
+cp asm_types.h asm_types.c
+
+cat >> asm_types.c <<EOF
+#include <stdio.h>
+#include <stdlib.h>
+int main(int argc, char **argv)
+{
+#ifdef __U8_TYPEDEF
+ if (sizeof(__U8_TYPEDEF) != 1) {
+ printf("Sizeof(__U8__TYPEDEF) is %d should be 1\n",
+ (int) sizeof(__U8_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __U8_TYPEDEF not defined
+#endif
+#ifdef __S8_TYPEDEF
+ if (sizeof(__S8_TYPEDEF) != 1) {
+ printf("Sizeof(_S8__TYPEDEF) is %d should be 1\n",
+ (int) sizeof(__S8_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __S8_TYPEDEF not defined
+#endif
+#ifdef __U16_TYPEDEF
+ if (sizeof(__U16_TYPEDEF) != 2) {
+ printf("Sizeof(__U16__TYPEDEF) is %d should be 2\n",
+ (int) sizeof(__U16_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __U16_TYPEDEF not defined
+#endif
+#ifdef __S16_TYPEDEF
+ if (sizeof(__S16_TYPEDEF) != 2) {
+ printf("Sizeof(__S16__TYPEDEF) is %d should be 2\n",
+ (int) sizeof(__S16_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __S16_TYPEDEF not defined
+#endif
+
+#ifdef __U32_TYPEDEF
+ if (sizeof(__U32_TYPEDEF) != 4) {
+ printf("Sizeof(__U32__TYPEDEF) is %d should be 4\n",
+ (int) sizeof(__U32_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __U32_TYPEDEF not defined
+#endif
+#ifdef __S32_TYPEDEF
+ if (sizeof(__S32_TYPEDEF) != 4) {
+ printf("Sizeof(__S32__TYPEDEF) is %d should be 4\n",
+ (int) sizeof(__S32_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __S32_TYPEDEF not defined
+#endif
+
+#ifdef __U64_TYPEDEF
+ if (sizeof(__U64_TYPEDEF) != 8) {
+ printf("Sizeof(__U64__TYPEDEF) is %d should be 8\n",
+ (int) sizeof(__U64_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __U64_TYPEDEF not defined
+#endif
+#ifdef __S64_TYPEDEF
+ if (sizeof(__S64_TYPEDEF) != 8) {
+ printf("Sizeof(__S64__TYPEDEF) is %d should be 8\n",
+ (int) sizeof(__S64_TYPEDEF));
+ exit(1);
+ }
+#elif defined(__linux__)
+#warning __S64_TYPEDEF not defined
+#endif
+ return 0;
+}
+EOF
+
+${BUILD_CC-${CC-gcc}} -o asm_types asm_types.c
+if ./asm_types
+then
+ true
+else
+ if [ "${CROSS_COMPILE}" != "1" ]; then
+ echo "Problem detected with asm_types.h"
+ echo "" > asm_types.h
+ fi
+fi
+rm asm_types.c asm_types
+
diff --git a/configure b/configure
new file mode 100755
index 0000000..b0e8d1b
--- /dev/null
+++ b/configure
@@ -0,0 +1,17099 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.71.
+#
+#
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else \$as_nop
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
+
+else \$as_nop
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null
+then :
+ as_have_required=yes
+else $as_nop
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
+
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
+
+
+ if test "x$CONFIG_SHELL" != x
+then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=''
+PACKAGE_TARNAME=''
+PACKAGE_VERSION=''
+PACKAGE_STRING=''
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="version.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_c_list=
+gt_needs=
+ac_func_c_list=
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+OS_IO_FILE
+systemd_system_unit_dir
+have_systemd
+systemd_LIBS
+systemd_CFLAGS
+crond_dir
+have_crond
+pkg_udev_rules_dir
+have_udev
+udev_LIBS
+udev_CFLAGS
+LDFLAGS_SHLIB
+CFLAGS_STLIB
+CFLAGS_SHLIB
+BUILD_LDFLAGS
+BUILD_CFLAGS
+INCLUDES
+DO_TEST_SUITE
+LDFLAGS_STATIC
+root_sysconfdir
+root_libdir
+root_sbindir
+root_bindir
+root_prefix
+E2SCRUB_CMT
+UNIX_CMT
+CYGWIN_CMT
+LINUX_CMT
+FUZZING_CMT
+fuzzer_ldflags
+fuzzer_cflags
+have_fuzzer
+ac_ct_CXX
+CXXFLAGS
+CXX
+threadsan_ldflags
+threadsan_cflags
+have_threadsan
+addrsan_ldflags
+addrsan_cflags
+have_addrsan
+ubsan_ldflags
+ubsan_cflags
+have_ubsan
+lto_ldflags
+lto_cflags
+have_lto
+gcc_ranlib
+gcc_ar
+UNI_DIFF_OPTS
+SEM_INIT_LIB
+FUSE_CMT
+FUSE_LIB
+CLOCK_GETTIME_LIB
+MAGIC_LIB
+SOCKET_LIB
+SIZEOF_TIME_T
+SIZEOF_OFF_T
+SIZEOF_LONG_LONG
+SIZEOF_LONG
+SIZEOF_INT
+SIZEOF_SHORT
+DD
+BUILD_CC
+MAKEINFO
+STRIP
+RANLIB
+AR
+LDCONFIG
+PERL
+AWK
+CHMOD
+RM
+CP
+MV
+LN_S
+mkdir_p
+LN
+ifNotGNUmake
+ifGNUmake
+BINARY_TYPE
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+LTLIBICONV
+LIBICONV
+INTL_MACOSX_LIBS
+XGETTEXT_EXTRA_OPTIONS
+MSGMERGE_FOR_MSGFMT_OPTION
+MSGMERGE
+XGETTEXT_015
+XGETTEXT
+GMSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
+USE_NLS
+MKDIR_P
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+SET_MAKE
+VERSION
+PACKAGE
+GETTEXT_PACKAGE
+TDB_MAN_COMMENT
+TDB_CMT
+UUIDD_CMT
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CXX
+PTHREAD_CC
+ax_pthread_config
+EGREP
+GREP
+SED
+E2INITRD_MAN
+E2INITRD_PROG
+FSCK_MAN
+FSCK_PROG
+DEFRAG_CMT
+RESIZER_CMT
+IMAGER_CMT
+DEBUGFS_CMT
+SUBSET_CMT
+ALL_CMT
+BLKID_CMT
+DEPPROFILED_LIBBLKID
+PROFILED_LIBBLKID
+DEPSTATIC_LIBBLKID
+STATIC_LIBBLKID
+DEPLIBBLKID
+LIBBLKID
+UUID_CMT
+DEPPROFILED_LIBUUID
+PROFILED_LIBUUID
+DEPSTATIC_LIBUUID
+STATIC_LIBUUID
+DEPLIBUUID
+LIBUUID
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+DEV_FEATURES_CMT
+TEST_IO_CMT
+PRIVATE_LIBS_CMT
+LDFLAG_DYNAMIC
+PROFILED_LIB_EXT
+STATIC_LIB_EXT
+LIB_EXT
+PROFILE_CMT
+BSDLIB_CMT
+ELF_CMT
+Q
+ES
+E
+LINK_BUILD_FLAGS
+SYMLINK_RELATIVE
+LINK_INSTALL_FLAGS
+MAINTAINER_CMT
+CPP
+RDYNAMIC
+DLOPEN_LIB
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+E2FSPROGS_DATE
+E2FSPROGS_PKGVER
+E2FSPROGS_VERSION
+E2FSPROGS_DAY
+E2FSPROGS_MONTH
+E2FSPROGS_YEAR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files='MCONFIG
+MAKEFILE_ELF
+MAKEFILE_BSDLIB
+MAKEFILE_PROFILE
+MAKEFILE_LIBRARY
+ASM_TYPES_HEADER
+PUBLIC_CONFIG_HEADER'
+ac_user_opts='
+enable_option_checking
+with_diet_libc
+with_cc
+with_ccopts
+with_ldopts
+with_root_prefix
+enable_maintainer_mode
+enable_symlink_install
+enable_relative_symlinks
+enable_symlink_relative_symlinks
+enable_symlink_build
+enable_verbose_makecmds
+enable_elf_shlibs
+enable_bsd_shlibs
+enable_profile
+enable_gcov
+enable_hardening
+enable_jbd_debug
+enable_blkid_debug
+enable_testio_debug
+enable_developer_features
+enable_libuuid
+enable_libblkid
+enable_subset
+enable_backtrace
+enable_debugfs
+enable_imager
+enable_resizer
+enable_defrag
+enable_fsck
+enable_e2initrd_helper
+enable_tls
+with_pthread
+enable_uuidd
+enable_mmp
+enable_tdb
+enable_bmap_stats
+enable_bmap_stats_ops
+enable_nls
+with_gnu_ld
+enable_rpath
+with_libiconv_prefix
+with_libintl_prefix
+enable_fuse2fs
+enable_lto
+enable_ubsan
+enable_addrsan
+enable_threadsan
+enable_fuzzing
+with_multiarch
+with_udev_rules_dir
+with_crond_dir
+with_systemd_unit_dir
+enable_largefile
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+CXX
+CXXFLAGS
+CCC
+udev_CFLAGS
+udev_LIBS
+systemd_CFLAGS
+systemd_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode
+ enable makefile rules useful for maintainers
+ --enable-symlink-install
+ use symlinks when installing instead of hard links
+ --enable-relative-symlinks
+ use relative symlinks when installing
+
+ --enable-symlink-build use symlinks while building instead of hard links
+ --enable-verbose-makecmds
+ enable verbose make command output
+ --enable-elf-shlibs select ELF shared libraries
+ --enable-bsd-shlibs select BSD shared libraries
+ --enable-profile build profiling libraries
+ --enable-gcov build for coverage testing using gcov
+ --enable-hardening build for coverage testing using gcov
+ --enable-jbd-debug enable journal debugging
+ --enable-blkid-debug enable blkid debugging
+ --disable-testio-debug disable the use of the test I/O manager for
+ debugging
+ --enable-developer-features
+ enable features for use by ext4 developers
+ --enable-libuuid build and use private uuid library
+ --enable-libblkid build and use private blkid library
+ --enable-subset enable subset-only build
+ --disable-backtrace disable use backtrace
+ --disable-debugfs disable support of debugfs program
+ --disable-imager disable support of e2image program
+ --disable-resizer disable support of e2resize program
+ --disable-defrag disable support of e4defrag program
+ --enable-fsck build fsck wrapper program
+ --enable-e2initrd-helper
+ build e2initrd-helper program
+ --disable-tls disable use of thread local support
+ --disable-uuidd disable building the uuid daemon
+ --disable-mmp disable support mmp, Multi Mount Protection
+ --disable-tdb disable tdb support
+ --disable-bmap-stats disable collection of bitmap stats
+ --enable-bmap-stats-ops enable collection of additional bitmap stats
+ --disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
+ --disable-fuse2fs do not build fuse2fs
+ --enable-lto enable link time optimization
+ --enable-ubsan enable undefined behavior sanitizer
+ --enable-addrsan enable address sanitizer
+ --enable-threadsan enable thread sanitizer
+ --enable-fuzzing enable fuzzing sanitizer
+ --disable-largefile omit support for large files
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-diet-libc use diet libc
+ --with-cc no longer supported, use CC= instead
+ --with-ccopts no longer supported, use CFLAGS= instead
+ --with-ldopts no longer supported, use LDFLAGS= instead
+ --with-root-prefix=PREFIX
+ override prefix variable for files to be placed in
+ the root
+ --without-pthread disable use of pthread support
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
+ --with-multiarch=ARCH specify the multiarch triplet
+ --with-udev-rules-dir[=DIR]
+ Install udev rules into DIR.
+ --with-crond-dir[=DIR] Install system crontabs into DIR.
+ --with-systemd-unit-dir[=DIR]
+ Install systemd system units into DIR.
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ udev_CFLAGS C compiler flags for udev, overriding pkg-config
+ udev_LIBS linker flags for udev, overriding pkg-config
+ systemd_CFLAGS
+ C compiler flags for systemd, overriding pkg-config
+ systemd_LIBS
+ linker flags for systemd, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.71
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below. */
+
+#include <limits.h>
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main (void)
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main (void)
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$4=yes"
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main (void)
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$4=yes"
+else $as_nop
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_check_decl
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid; break
+else $as_nop
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=$ac_mid; break
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main (void)
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else $as_nop
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ $ $0$ac_configure_args_raw
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ printf "%s\n" "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ printf "%s\n" "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ printf "%s\n" "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ printf "%s\n" "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+printf "%s\n" "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ ac_site_files="$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
+else
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+fi
+
+for ac_site_file in $ac_site_files
+do
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+gt_needs="$gt_needs "
+as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
+# Test code for whether the C++ compiler supports C++98 (global declarations)
+ac_cxx_conftest_cxx98_globals='
+// Does the compiler advertise C++98 conformance?
+#if !defined __cplusplus || __cplusplus < 199711L
+# error "Compiler does not advertise C++98 conformance"
+#endif
+
+// These inclusions are to reject old compilers that
+// lack the unsuffixed header files.
+#include <cstdlib>
+#include <exception>
+
+// <cassert> and <cstring> are *not* freestanding headers in C++98.
+extern void assert (int);
+namespace std {
+ extern int strcmp (const char *, const char *);
+}
+
+// Namespaces, exceptions, and templates were all added after "C++ 2.0".
+using std::exception;
+using std::strcmp;
+
+namespace {
+
+void test_exception_syntax()
+{
+ try {
+ throw "test";
+ } catch (const char *s) {
+ // Extra parentheses suppress a warning when building autoconf itself,
+ // due to lint rules shared with more typical C programs.
+ assert (!(strcmp) (s, "test"));
+ }
+}
+
+template <typename T> struct test_template
+{
+ T const val;
+ explicit test_template(T t) : val(t) {}
+ template <typename U> T add(U u) { return static_cast<T>(u) + val; }
+};
+
+} // anonymous namespace
+'
+
+# Test code for whether the C++ compiler supports C++98 (body of main)
+ac_cxx_conftest_cxx98_main='
+ assert (argc);
+ assert (! argv[0]);
+{
+ test_exception_syntax ();
+ test_template<double> tt (2.0);
+ assert (tt.add (4) == 6.0);
+ assert (true && !false);
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (global declarations)
+ac_cxx_conftest_cxx11_globals='
+// Does the compiler advertise C++ 2011 conformance?
+#if !defined __cplusplus || __cplusplus < 201103L
+# error "Compiler does not advertise C++11 conformance"
+#endif
+
+namespace cxx11test
+{
+ constexpr int get_val() { return 20; }
+
+ struct testinit
+ {
+ int i;
+ double d;
+ };
+
+ class delegate
+ {
+ public:
+ delegate(int n) : n(n) {}
+ delegate(): delegate(2354) {}
+
+ virtual int getval() { return this->n; };
+ protected:
+ int n;
+ };
+
+ class overridden : public delegate
+ {
+ public:
+ overridden(int n): delegate(n) {}
+ virtual int getval() override final { return this->n * 2; }
+ };
+
+ class nocopy
+ {
+ public:
+ nocopy(int i): i(i) {}
+ nocopy() = default;
+ nocopy(const nocopy&) = delete;
+ nocopy & operator=(const nocopy&) = delete;
+ private:
+ int i;
+ };
+
+ // for testing lambda expressions
+ template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
+ {
+ return f(v);
+ }
+
+ // for testing variadic templates and trailing return types
+ template <typename V> auto sum(V first) -> V
+ {
+ return first;
+ }
+ template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
+ {
+ return first + sum(rest...);
+ }
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (body of main)
+ac_cxx_conftest_cxx11_main='
+{
+ // Test auto and decltype
+ auto a1 = 6538;
+ auto a2 = 48573953.4;
+ auto a3 = "String literal";
+
+ int total = 0;
+ for (auto i = a3; *i; ++i) { total += *i; }
+
+ decltype(a2) a4 = 34895.034;
+}
+{
+ // Test constexpr
+ short sa[cxx11test::get_val()] = { 0 };
+}
+{
+ // Test initializer lists
+ cxx11test::testinit il = { 4323, 435234.23544 };
+}
+{
+ // Test range-based for
+ int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
+ 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
+ for (auto &x : array) { x += 23; }
+}
+{
+ // Test lambda expressions
+ using cxx11test::eval;
+ assert (eval ([](int x) { return x*2; }, 21) == 42);
+ double d = 2.0;
+ assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
+ assert (d == 5.0);
+ assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
+ assert (d == 5.0);
+}
+{
+ // Test use of variadic templates
+ using cxx11test::sum;
+ auto a = sum(1);
+ auto b = sum(1, 2);
+ auto c = sum(1.0, 2.0, 3.0);
+}
+{
+ // Test constructor delegation
+ cxx11test::delegate d1;
+ cxx11test::delegate d2();
+ cxx11test::delegate d3(45);
+}
+{
+ // Test override and final
+ cxx11test::overridden o1(55464);
+}
+{
+ // Test nullptr
+ char *c = nullptr;
+}
+{
+ // Test template brackets
+ test_template<::test_template<int>> v(test_template<int>(12));
+}
+{
+ // Unicode literals
+ char const *utf8 = u8"UTF-8 string \u2500";
+ char16_t const *utf16 = u"UTF-8 string \u2500";
+ char32_t const *utf32 = U"UTF-32 string \u2500";
+}
+'
+
+# Test code for whether the C compiler supports C++11 (complete).
+ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
+${ac_cxx_conftest_cxx11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ ${ac_cxx_conftest_cxx11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C++98 (complete).
+ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ return ok;
+}
+"
+
+
+# Auxiliary files required by this configure script.
+ac_aux_files="config.rpath install-sh config.guess config.sub"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/config"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+ac_config_headers="$ac_config_headers lib/config.h"
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else $as_nop
+ ac_file=''
+fi
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_should_define__xopen_source=no
+ if test $ac_cv_header_wchar_h = yes
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
+
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+ if test $ac_cv_header_minix_config_h = yes
+then :
+ MINIX=yes
+ printf "%s\n" "#define _MINIX 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else $as_nop
+ MINIX=
+fi
+ if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+ if test $ac_cv_should_define__xopen_source = yes
+then :
+ printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+fi
+
+MCONFIG=./MCONFIG
+
+BINARY_TYPE=bin
+E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
+ | awk '{print $3}' | tr \" " " | awk '{print $1}'`
+E2FSPROGS_DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
+ | tr \" " " | awk '{print $1}'`
+E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{print $1}' | sed -e '/^[1-9]$/s/^/0/')
+MONTH=`echo $E2FSPROGS_DATE | awk -F- '{print $2}'`
+YEAR=`echo $E2FSPROGS_DATE | awk -F- '{print $3}'`
+
+if expr $YEAR ">" 1900 > /dev/null ; then
+ E2FSPROGS_YEAR=$YEAR
+elif expr $YEAR ">" 90 >/dev/null ; then
+ E2FSPROGS_YEAR=19$YEAR
+else
+ E2FSPROGS_YEAR=20$YEAR
+fi
+
+case $MONTH in
+Jan) MONTH_NUM=01; E2FSPROGS_MONTH="January" ;;
+Feb) MONTH_NUM=02; E2FSPROGS_MONTH="February" ;;
+Mar) MONTH_NUM=03; E2FSPROGS_MONTH="March" ;;
+Apr) MONTH_NUM=04; E2FSPROGS_MONTH="April" ;;
+May) MONTH_NUM=05; E2FSPROGS_MONTH="May" ;;
+Jun) MONTH_NUM=06; E2FSPROGS_MONTH="June" ;;
+Jul) MONTH_NUM=07; E2FSPROGS_MONTH="July" ;;
+Aug) MONTH_NUM=08; E2FSPROGS_MONTH="August" ;;
+Sep) MONTH_NUM=09; E2FSPROGS_MONTH="September" ;;
+Oct) MONTH_NUM=10; E2FSPROGS_MONTH="October" ;;
+Nov) MONTH_NUM=11; E2FSPROGS_MONTH="November" ;;
+Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;;
+*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Unknown month $MONTH??" >&5
+printf "%s\n" "$as_me: WARNING: Unknown month $MONTH??" >&2;} ;;
+esac
+
+base_ver=`echo $E2FSPROGS_VERSION | \
+ sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+
+date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY}
+
+case $E2FSPROGS_VERSION in
+*-WIP|pre-*)
+ E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec"
+ ;;
+*)
+ E2FSPROGS_PKGVER="$base_ver"
+ ;;
+esac
+
+unset DATE MONTH YEAR base_ver pre_vers date_spec
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION" >&5
+printf "%s\n" "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}" >&5
+printf "%s\n" "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}" >&6; }
+
+
+
+
+
+
+WITH_DIET_LIBC=
+
+# Check whether --with-diet-libc was given.
+if test ${with_diet_libc+y}
+then :
+ withval=$with_diet_libc; CC="diet cc -nostdinc"
+WITH_DIET_LIBC=yes
+if test -z "$LIBS"
+then
+ LIBS="-lcompat"
+else
+ LIBS="$LIBS -lcompat"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: CC=$CC" >&5
+printf "%s\n" "CC=$CC" >&6; }
+fi
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+DLOPEN_LIB=''
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dl_dlopen=yes
+else $as_nop
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+ DLOPEN_LIB=-ldl
+fi
+
+
+
+# Check whether --with-cc was given.
+if test ${with_cc+y}
+then :
+ withval=$with_cc; as_fn_error $? "--with-cc no longer supported; use CC= instead" "$LINENO" 5
+fi
+
+
+# Check whether --with-ccopts was given.
+if test ${with_ccopts+y}
+then :
+ withval=$with_ccopts; as_fn_error $? "--with-ccopts no longer supported; use CFLAGS= instead" "$LINENO" 5
+fi
+
+
+# Check whether --with-ldopts was given.
+if test ${with_ldopts+y}
+then :
+ withval=$with_ldopts; as_fn_error $? "--with-ldopts no longer supported; use LDFLAGS= instead" "$LINENO" 5
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test "$GCC" = yes; then
+ RDYNAMIC="-rdynamic"
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for additional special compiler flags" >&5
+printf %s "checking for additional special compiler flags... " >&6; }
+if test "$GCC" = yes
+then
+ case "$host_cpu" in
+ alpha) addcflags="-mieee" ;;
+ esac
+fi
+if test "x$addcflags" != x
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $addcflags" >&5
+printf "%s\n" "$addcflags" >&6; }
+ CFLAGS="$addcflags $CFLAGS"
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (none)" >&5
+printf "%s\n" "(none)" >&6; }
+fi
+LIB_EXT=.a
+STATIC_LIB_EXT=.a
+PROFILED_LIB_EXT=.a
+
+# Check whether --with-root-prefix was given.
+if test ${with_root_prefix+y}
+then :
+ withval=$with_root_prefix; root_prefix=$withval
+else $as_nop
+ root_prefix=NONE
+fi
+# Check whether --enable-maintainer-mode was given.
+if test ${enable_maintainer_mode+y}
+then :
+ enableval=$enable_maintainer_mode; if test "$enableval" = "no"
+then
+ MAINTAINER_CMT=#
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling maintainer mode" >&5
+printf "%s\n" "Disabling maintainer mode" >&6; }
+else
+ MAINTAINER_CMT=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling maintainer mode" >&5
+printf "%s\n" "Enabling maintainer mode" >&6; }
+fi
+
+else $as_nop
+ MAINTAINER_CMT=#
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling maintainer mode by default" >&5
+printf "%s\n" "Disabling maintainer mode by default" >&6; }
+
+fi
+
+
+# Check whether --enable-symlink-install was given.
+if test ${enable_symlink_install+y}
+then :
+ enableval=$enable_symlink_install; if test "$enableval" = "no"
+then
+ LINK_INSTALL_FLAGS=-f
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for install" >&5
+printf "%s\n" "Disabling symlinks for install" >&6; }
+else
+ LINK_INSTALL_FLAGS=-sf
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling symlinks for install" >&5
+printf "%s\n" "Enabling symlinks for install" >&6; }
+fi
+
+else $as_nop
+ LINK_INSTALL_FLAGS=-f
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for install by default" >&5
+printf "%s\n" "Disabling symlinks for install by default" >&6; }
+
+fi
+
+
+relative_symlink_defined=
+# Check whether --enable-relative-symlinks was given.
+if test ${enable_relative_symlinks+y}
+then :
+ enableval=$enable_relative_symlinks; if test "$enableval" = "no"
+then
+ SYMLINK_RELATIVE=
+ relative_symlink_defined=yes
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling relative symlinks for install" >&5
+printf "%s\n" "Disabling relative symlinks for install" >&6; }
+else
+ SYMLINK_RELATIVE=--relative
+ relative_symlink_defined=yes
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling relative symlinks for install" >&5
+printf "%s\n" "Enabling relative symlinks for install" >&6; }
+fi
+fi
+
+# Check whether --enable-symlink-relative-symlinks was given.
+if test ${enable_symlink_relative_symlinks+y}
+then :
+ enableval=$enable_symlink_relative_symlinks; if test "$enableval" = "no"
+then
+ SYMLINK_RELATIVE=yes
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling relative symlinks for install" >&5
+printf "%s\n" "Disabling relative symlinks for install" >&6; }
+else
+ SYMLINK_RELATIVE=--relative
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling relative symlinks for install" >&5
+printf "%s\n" "Enabling relative symlinks for install" >&6; }
+fi
+
+else $as_nop
+ if test -z "$relative_symlink_defined"
+then
+ SYMLINK_RELATIVE=
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling relative symlinks for install by default" >&5
+printf "%s\n" "Disabling relative symlinks for install by default" >&6; }
+fi
+
+fi
+
+
+# Check whether --enable-symlink-build was given.
+if test ${enable_symlink_build+y}
+then :
+ enableval=$enable_symlink_build; if test "$enableval" = "no"
+then
+ LINK_BUILD_FLAGS=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for build" >&5
+printf "%s\n" "Disabling symlinks for build" >&6; }
+else
+ LINK_BUILD_FLAGS=-s
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling symlinks for build" >&5
+printf "%s\n" "Enabling symlinks for build" >&6; }
+fi
+
+else $as_nop
+ LINK_BUILD_FLAGS=
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for build by default" >&5
+printf "%s\n" "Disabling symlinks for build by default" >&6; }
+
+fi
+
+
+# Check whether --enable-verbose-makecmds was given.
+if test ${enable_verbose_makecmds+y}
+then :
+ enableval=$enable_verbose_makecmds; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling verbose make commands" >&5
+printf "%s\n" "Disabling verbose make commands" >&6; }
+ E=@echo
+ ES=echo
+ Q=@
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling verbose make commands" >&5
+printf "%s\n" "Enabling verbose make commands" >&6; }
+ E=@\\#
+ ES=\\#
+ Q=
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling verbose make commands" >&5
+printf "%s\n" "Disabling verbose make commands" >&6; }
+E=@echo
+ES=echo
+Q=@
+
+fi
+
+
+
+
+E2_PKG_CONFIG_STATIC=--static
+LDFLAG_DYNAMIC=
+PRIVATE_LIBS_CMT=
+# Check whether --enable-elf-shlibs was given.
+if test ${enable_elf_shlibs+y}
+then :
+ enableval=$enable_elf_shlibs; if test "$enableval" = "no"
+then
+ ELF_CMT=#
+ MAKEFILE_ELF=/dev/null
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling ELF shared libraries" >&5
+printf "%s\n" "Disabling ELF shared libraries" >&6; }
+else
+ E2_PKG_CONFIG_STATIC=
+ ELF_CMT=
+ MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
+ case "$host_os" in
+ solaris2.*)
+ MAKEFILE_ELF=$srcdir/lib/Makefile.solaris-lib
+ ;;
+ esac
+ BINARY_TYPE=elfbin
+ LIB_EXT=.so
+ PRIVATE_LIBS_CMT=#
+ LDFLAG_DYNAMIC='-Wl,-rpath-link,$(top_builddir)/lib'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling ELF shared libraries" >&5
+printf "%s\n" "Enabling ELF shared libraries" >&6; }
+fi
+
+else $as_nop
+ MAKEFILE_ELF=/dev/null
+ELF_CMT=#
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling ELF shared libraries by default" >&5
+printf "%s\n" "Disabling ELF shared libraries by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-bsd-shlibs was given.
+if test ${enable_bsd_shlibs+y}
+then :
+ enableval=$enable_bsd_shlibs; if test "$enableval" = "no"
+then
+ BSDLIB_CMT=#
+ MAKEFILE_BSDLIB=/dev/null
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling BSD shared libraries" >&5
+printf "%s\n" "Disabling BSD shared libraries" >&6; }
+else
+ E2_PKG_CONFIG_STATIC=
+ BSDLIB_CMT=
+ MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
+ LIB_EXT=.so
+ case "$host_os" in
+ darwin*)
+ MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
+ LIB_EXT=.dylib
+ ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling BSD shared libraries" >&5
+printf "%s\n" "Enabling BSD shared libraries" >&6; }
+fi
+
+else $as_nop
+ MAKEFILE_BSDLIB=/dev/null
+BSDLIB_CMT=#
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling BSD shared libraries by default" >&5
+printf "%s\n" "Disabling BSD shared libraries by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-profile was given.
+if test ${enable_profile+y}
+then :
+ enableval=$enable_profile; if test "$enableval" = "no"
+then
+ PROFILE_CMT=#
+ MAKEFILE_PROFILE=/dev/null
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling profiling libraries" >&5
+printf "%s\n" "Disabling profiling libraries" >&6; }
+else
+ PROFILE_CMT=
+ MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
+ PROFILED_LIB_EXT=_p.a
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building profiling libraries" >&5
+printf "%s\n" "Building profiling libraries" >&6; }
+fi
+
+else $as_nop
+ PROFILE_CMT=#
+MAKEFILE_PROFILE=/dev/null
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling profiling libraries by default" >&5
+printf "%s\n" "Disabling profiling libraries by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-gcov was given.
+if test ${enable_gcov+y}
+then :
+ enableval=$enable_gcov; if test "$enableval" = "yes"
+then
+ CFLAGS="-g -fprofile-arcs -ftest-coverage"
+ LDFLAGS="-fprofile-arcs -ftest-coverage"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling gcov support" >&5
+printf "%s\n" "Enabling gcov support" >&6; }
+fi
+
+fi
+
+CFLAGS_SHLIB="${CFLAGS_SHLIB:-$CFLAGS}"
+CFLAGS_STLIB="${CFLAGS_STLIB:-$CFLAGS}"
+LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS}
+LDFLAGS_STATIC=${LDFLAGS_STATIC:-$LDFLAGS}
+# Check whether --enable-hardening was given.
+if test ${enable_hardening+y}
+then :
+ enableval=$enable_hardening; if test "$enableval" = "yes"
+then
+ HARDEN_CFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong"
+ HARDEN_LDFLAGS="-Wl,-z,relro -Wl,-z,now"
+ CFLAGS="$CFLAGS $HARDEN_CFLAGS -fPIE"
+ CFLAGS_SHLIB="$CFLAGS_SHLIB $HARDEN_CFLAGS"
+ CFLAGS_STLIB="$CFLAGS_STLIB $HARDEN_CFLAGS -fPIE"
+ LDFLAGS="$LDFLAGS $HARDEN_LDFLAGS -fPIE -pie"
+ LDFLAGS_STATIC="$LDFLAGS_STATIC $HARDEN_LDFLAGS"
+ LDFLAGS_SHLIB="$LDFLAGS_SHLIB $HARDEN_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling hardening support" >&5
+printf "%s\n" "Enabling hardening support" >&6; }
+fi
+
+fi
+
+
+
+
+
+
+# Check whether --enable-jbd-debug was given.
+if test ${enable_jbd_debug+y}
+then :
+ enableval=$enable_jbd_debug; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling journal debugging" >&5
+printf "%s\n" "Disabling journal debugging" >&6; }
+else
+
+printf "%s\n" "#define CONFIG_JBD_DEBUG 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling journal debugging" >&5
+printf "%s\n" "Enabling journal debugging" >&6; }
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling journal debugging by default" >&5
+printf "%s\n" "Disabling journal debugging by default" >&6; }
+
+fi
+
+# Check whether --enable-blkid-debug was given.
+if test ${enable_blkid_debug+y}
+then :
+ enableval=$enable_blkid_debug; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling blkid debugging" >&5
+printf "%s\n" "Disabling blkid debugging" >&6; }
+else
+
+printf "%s\n" "#define CONFIG_BLKID_DEBUG 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling blkid debugging" >&5
+printf "%s\n" "Enabling blkid debugging" >&6; }
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling blkid debugging by default" >&5
+printf "%s\n" "Disabling blkid debugging by default" >&6; }
+
+fi
+
+# Check whether --enable-testio-debug was given.
+if test ${enable_testio_debug+y}
+then :
+ enableval=$enable_testio_debug;
+if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling testio debugging" >&5
+printf "%s\n" "Disabling testio debugging" >&6; }
+ TEST_IO_CMT="#"
+else
+ TEST_IO_CMT=
+ printf "%s\n" "#define CONFIG_TESTIO_DEBUG 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling testio debugging" >&5
+printf "%s\n" "Enabling testio debugging" >&6; }
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling testio debugging by default" >&5
+printf "%s\n" "Enabling testio debugging by default" >&6; }
+printf "%s\n" "#define CONFIG_TESTIO_DEBUG 1" >>confdefs.h
+
+TEST_IO_CMT=
+
+fi
+
+
+# Check whether --enable-developer-features was given.
+if test ${enable_developer_features+y}
+then :
+ enableval=$enable_developer_features;
+if test "$enableval" = "yes"
+then
+ DEV_FEATURES_CMT=
+ printf "%s\n" "#define CONFIG_DEVELOPER_FEATURES 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling ext4 developer features" >&5
+printf "%s\n" "Enabling ext4 developer features" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling ext4 developer features" >&5
+printf "%s\n" "Disabling ext4 developer features" >&6; }
+ DEV_FEATURES_CMT="#"
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling ext4 developer features by default" >&5
+printf "%s\n" "Disabling ext4 developer features by default" >&6; }
+DEV_FEATURES_CMT=
+
+fi
+
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+LIBUUID=
+DEPLIBUUID=
+STATIC_LIBUUID=
+DEPSTATIC_LIBUUID=
+PROFILED_LIBUUID=
+DEPPROFILED_LIBUUID=
+UUID_CMT=
+# Check whether --enable-libuuid was given.
+if test ${enable_libuuid+y}
+then :
+ enableval=$enable_libuuid; if test "$enableval" = "no"
+then
+ if test -z "$PKG_CONFIG"; then
+ as_fn_error $? "pkg-config not installed; please install it." "$LINENO" 5
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
+printf %s "checking for uuid_generate in -luuid... " >&6; }
+if test ${ac_cv_lib_uuid_uuid_generate+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char uuid_generate ();
+int
+main (void)
+{
+return uuid_generate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_uuid_uuid_generate=yes
+else $as_nop
+ ac_cv_lib_uuid_uuid_generate=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
+printf "%s\n" "$ac_cv_lib_uuid_uuid_generate" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate" = xyes
+then :
+ LIBUUID=`$PKG_CONFIG --libs uuid`;
+ STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`
+else $as_nop
+ as_fn_error $? "external uuid library not found" "$LINENO" 5
+fi
+
+ PROFILED_LIBUUID=$LIBUUID
+ UUID_CMT=#
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling private uuid library" >&5
+printf "%s\n" "Disabling private uuid library" >&6; }
+else
+ LIBUUID='$(LIB)/libuuid'$LIB_EXT
+ DEPLIBUUID=$LIBUUID
+ STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBUUID=$STATIC_LIBUUID
+ PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling private uuid library" >&5
+printf "%s\n" "Enabling private uuid library" >&6; }
+fi
+
+else $as_nop
+ if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
+printf %s "checking for uuid_generate in -luuid... " >&6; }
+if test ${ac_cv_lib_uuid_uuid_generate+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char uuid_generate ();
+int
+main (void)
+{
+return uuid_generate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_uuid_uuid_generate=yes
+else $as_nop
+ ac_cv_lib_uuid_uuid_generate=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
+printf "%s\n" "$ac_cv_lib_uuid_uuid_generate" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate" = xyes
+then :
+ LIBUUID=`$PKG_CONFIG --libs uuid`;
+ STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`
+fi
+
+fi
+if test -n "$LIBUUID"; then
+ PROFILED_LIBUUID=$LIBUUID
+ UUID_CMT=#
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using system uuid by default" >&5
+printf "%s\n" "Using system uuid by default" >&6; }
+else
+ LIBUUID='$(LIB)/libuuid'$LIB_EXT
+ DEPLIBUUID=$LIBUUID
+ STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBUUID=$STATIC_LIBUUID
+ PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling private uuid library by default" >&5
+printf "%s\n" "Enabling private uuid library by default" >&6; }
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+LIBBLKID=
+DEPLIBBLKID=
+STATIC_LIBBLKID=
+DEPSTATIC_LIBBLKID=
+PROFILED_LIBBLKID=
+DEPPROFILED_LIBBLKID=
+BLKID_CMT=
+
+# Check whether --enable-libblkid was given.
+if test ${enable_libblkid+y}
+then :
+ enableval=$enable_libblkid; if test "$enableval" = "no"
+then
+ if test -z "$PKG_CONFIG"; then
+ as_fn_error $? "pkg-config not installed; please install it." "$LINENO" 5
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkid_get_cache in -lblkid" >&5
+printf %s "checking for blkid_get_cache in -lblkid... " >&6; }
+if test ${ac_cv_lib_blkid_blkid_get_cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid -luuid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char blkid_get_cache ();
+int
+main (void)
+{
+return blkid_get_cache ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_blkid_blkid_get_cache=yes
+else $as_nop
+ ac_cv_lib_blkid_blkid_get_cache=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
+printf "%s\n" "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
+if test "x$ac_cv_lib_blkid_blkid_get_cache" = xyes
+then :
+ LIBBLKID=`$PKG_CONFIG --libs blkid`;
+ STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`
+else $as_nop
+ as_fn_error $? "external blkid library not found" "$LINENO" 5
+fi
+
+ BLKID_CMT=#
+ PROFILED_LIBBLKID=$LIBBLKID
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling private blkid library" >&5
+printf "%s\n" "Disabling private blkid library" >&6; }
+else
+ LIBBLKID='$(LIB)/libblkid'$LIB_EXT
+ DEPLIBBLKID=$LIBBLKID
+ STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
+ PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
+ printf "%s\n" "#define CONFIG_BUILD_FINDFS 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling private blkid library" >&5
+printf "%s\n" "Enabling private blkid library" >&6; }
+fi
+
+else $as_nop
+ if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkid_get_cache in -lblkid" >&5
+printf %s "checking for blkid_get_cache in -lblkid... " >&6; }
+if test ${ac_cv_lib_blkid_blkid_get_cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char blkid_get_cache ();
+int
+main (void)
+{
+return blkid_get_cache ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_blkid_blkid_get_cache=yes
+else $as_nop
+ ac_cv_lib_blkid_blkid_get_cache=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
+printf "%s\n" "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
+if test "x$ac_cv_lib_blkid_blkid_get_cache" = xyes
+then :
+ LIBBLKID=`$PKG_CONFIG --libs blkid`;
+ STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`
+fi
+
+fi
+if test -n "$LIBBLKID"; then
+ BLKID_CMT=#
+ PROFILED_LIBBLKID=$LIBBLKID
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using system blkid library by default" >&5
+printf "%s\n" "Using system blkid library by default" >&6; }
+else
+ LIBBLKID='$(LIB)/libblkid'$LIB_EXT
+ DEPLIBBLKID=$LIBBLKID
+ STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
+ PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
+ printf "%s\n" "#define CONFIG_BUILD_FINDFS 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling private blkid library by default" >&5
+printf "%s\n" "Enabling private blkid library by default" >&6; }
+fi
+
+fi
+
+
+
+
+
+
+
+
+ALL_CMT=
+SUBSET_CMT=
+# Check whether --enable-subset was given.
+if test ${enable_subset+y}
+then :
+ enableval=$enable_subset; if test "$enableval" = "no"
+then
+ SUBSET_CMT=#
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling subset-only build" >&5
+printf "%s\n" "Disabling subset-only build" >&6; }
+else
+ ALL_CMT=#
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling subset-only-build" >&5
+printf "%s\n" "Enabling subset-only-build" >&6; }
+fi
+
+fi
+
+
+
+
+# Check whether --enable-backtrace was given.
+if test ${enable_backtrace+y}
+then :
+ enableval=$enable_backtrace; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling use of backtrace" >&5
+printf "%s\n" "Disabling use of backtrace" >&6; }
+ printf "%s\n" "#define DISABLE_BACKTRACE 1" >>confdefs.h
+
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling use of backtrace" >&5
+printf "%s\n" "Enabling use of backtrace" >&6; }
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling use of backtrace by default" >&5
+printf "%s\n" "Enabling use of backtrace by default" >&6; }
+
+fi
+
+# Check whether --enable-debugfs was given.
+if test ${enable_debugfs+y}
+then :
+ enableval=$enable_debugfs; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling debugfs support" >&5
+printf "%s\n" "Disabling debugfs support" >&6; }
+ DEBUGFS_CMT="#"
+else
+ DEBUGFS_CMT=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling debugfs support" >&5
+printf "%s\n" "Enabling debugfs support" >&6; }
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling debugfs support by default" >&5
+printf "%s\n" "Enabling debugfs support by default" >&6; }
+DEBUGFS_CMT=
+
+fi
+
+
+# Check whether --enable-imager was given.
+if test ${enable_imager+y}
+then :
+ enableval=$enable_imager; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling e2image support" >&5
+printf "%s\n" "Disabling e2image support" >&6; }
+ IMAGER_CMT="#"
+else
+ IMAGER_CMT=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling e2image support" >&5
+printf "%s\n" "Enabling e2image support" >&6; }
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling e2image support by default" >&5
+printf "%s\n" "Enabling e2image support by default" >&6; }
+IMAGER_CMT=
+
+fi
+
+
+# Check whether --enable-resizer was given.
+if test ${enable_resizer+y}
+then :
+ enableval=$enable_resizer; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling e2resize support" >&5
+printf "%s\n" "Disabling e2resize support" >&6; }
+ RESIZER_CMT="#"
+else
+ RESIZER_CMT=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling e2resize support" >&5
+printf "%s\n" "Enabling e2resize support" >&6; }
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling e2resize support by default" >&5
+printf "%s\n" "Enabling e2resize support by default" >&6; }
+RESIZER_CMT=
+
+fi
+
+
+# Check whether --enable-defrag was given.
+if test ${enable_defrag+y}
+then :
+ enableval=$enable_defrag; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling e4defrag support" >&5
+printf "%s\n" "Disabling e4defrag support" >&6; }
+ DEFRAG_CMT="#"
+else
+ DEFRAG_CMT=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support" >&5
+printf "%s\n" "Enabling e4defrag support" >&6; }
+fi
+
+else $as_nop
+ if test -z "$WITH_DIET_LIBC"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support by default" >&5
+printf "%s\n" "Enabling e4defrag support by default" >&6; }
+ DEFRAG_CMT=
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling e4defrag support by default" >&5
+printf "%s\n" "Disabling e4defrag support by default" >&6; }
+ DEFRAG_CMT="#"
+fi
+
+fi
+
+
+# Check whether --enable-fsck was given.
+if test ${enable_fsck+y}
+then :
+ enableval=$enable_fsck; if test "$enableval" = "no"
+then
+ FSCK_PROG='' FSCK_MAN=''
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not building fsck wrapper" >&5
+printf "%s\n" "Not building fsck wrapper" >&6; }
+else
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building fsck wrapper" >&5
+printf "%s\n" "Building fsck wrapper" >&6; }
+fi
+
+else $as_nop
+ case "$host_os" in
+ gnu*)
+ FSCK_PROG='' FSCK_MAN=''
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not building fsck wrapper by default" >&5
+printf "%s\n" "Not building fsck wrapper by default" >&6; }
+ ;;
+ *)
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building fsck wrapper by default" >&5
+printf "%s\n" "Building fsck wrapper by default" >&6; }
+esac
+
+fi
+
+
+
+# Check whether --enable-e2initrd-helper was given.
+if test ${enable_e2initrd_helper+y}
+then :
+ enableval=$enable_e2initrd_helper; if test "$enableval" = "no"
+then
+ E2INITRD_PROG='' E2INITRD_MAN=''
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not building e2initrd helper" >&5
+printf "%s\n" "Not building e2initrd helper" >&6; }
+else
+ E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building e2initrd helper" >&5
+printf "%s\n" "Building e2initrd helper" >&6; }
+fi
+
+else $as_nop
+ E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building e2initrd helper by default" >&5
+printf "%s\n" "Building e2initrd helper by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-tls was given.
+if test ${enable_tls+y}
+then :
+ enableval=$enable_tls; if test "$enableval" = "no"
+then
+ try_tls=""
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling thread local support" >&5
+printf "%s\n" "Disabling thread local support" >&6; }
+else
+ try_tls="yes"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling thread local support" >&5
+printf "%s\n" "Enabling thread local support" >&6; }
+fi
+
+else $as_nop
+ if test -n "$WITH_DIET_LIBC"
+then
+ try_tls=""
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Diet libc does not support thread local support" >&5
+printf "%s\n" "Diet libc does not support thread local support" >&6; }
+else
+ try_tls="yes"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Try using thread local support by default" >&5
+printf "%s\n" "Try using thread local support by default" >&6; }
+fi
+
+fi
+
+if test "$try_tls" = "yes"
+then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5
+printf %s "checking for thread local storage (TLS) class... " >&6; }
+ if test ${ac_cv_tls+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ ax_tls_keywords="__thread __declspec(thread) none"
+ for ax_tls_keyword in $ax_tls_keywords; do
+ case $ax_tls_keyword in
+ none) ac_cv_tls=none ; break ;;
+ *)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ static void
+ foo(void) {
+ static $ax_tls_keyword int bar;
+ exit(1);
+ }
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_tls=$ax_tls_keyword ; break
+else $as_nop
+ ac_cv_tls=none
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ esac
+ done
+
+fi
+
+
+ if test "$ac_cv_tls" != "none"; then
+
+printf "%s\n" "#define TLS $ac_cv_tls" >>confdefs.h
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
+printf "%s\n" "$ac_cv_tls" >&6; }
+
+fi
+
+# Check whether --with-pthread was given.
+if test ${with_pthread+y}
+then :
+ withval=$with_pthread; if test "$withval" = "no"
+then
+ try_pthread=""
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling pthread support" >&5
+printf "%s\n" "Disabling pthread support" >&6; }
+else
+ try_pthread="yes"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Testing for pthread support" >&5
+printf "%s\n" "Testing for pthread support" >&6; }
+fi
+
+else $as_nop
+ try_pthread="yes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Try testing for pthread support by default" >&5
+printf "%s\n" "Try testing for pthread support by default" >&6; }
+
+fi
+
+if test "$try_pthread" = "yes"
+then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on Tru64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+ ax_pthread_save_CC="$CC"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ if test "x$PTHREAD_CC" != "x"
+then :
+ CC="$PTHREAD_CC"
+fi
+ if test "x$PTHREAD_CXX" != "x"
+then :
+ CXX="$PTHREAD_CXX"
+fi
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
+printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char pthread_join ();
+int
+main (void)
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = "xno"; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ CC="$ax_pthread_save_CC"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+# (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads and
+# -D_REENTRANT too), HP C (must be checked before -lpthread, which
+# is present but should not be used directly; and before -mthreads,
+# because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case $host_os in
+
+ freebsd*)
+
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+ ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+ ;;
+
+ hpux*)
+
+ # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+ # multi-threading and also sets -lpthread."
+
+ ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+ ;;
+
+ openedition*)
+
+ # IBM z/OS requires a feature-test macro to be defined in order to
+ # enable POSIX threads at all, so give the user a hint if this is
+ # not set. (We don't define these ourselves, as they can affect
+ # other portions of the system API in unpredictable ways.)
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+ AX_PTHREAD_ZOS_MISSING
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
+printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
+fi
+rm -rf conftest*
+
+ ;;
+
+ solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (N.B.: The stubs are missing
+ # pthread_cleanup_push, or rather a function called by this macro,
+ # so we could check for that, but who knows whether they'll stub
+ # that too in a future libc.) So we'll check first for the
+ # standard Solaris way of linking pthreads (-mt -lpthread).
+
+ ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
+ ;;
+esac
+
+# Are we compiling with Clang?
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
+printf %s "checking whether $CC is Clang... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_CLANG=no
+ # Note that Autoconf sets GCC=yes for Clang as well as GCC
+ if test "x$GCC" = "xyes"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ AX_PTHREAD_CC_IS_CLANG
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
+then :
+ ax_cv_PTHREAD_CLANG=yes
+fi
+rm -rf conftest*
+
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
+
+if test "x$GCC" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
+fi
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+if test "x$ax_pthread_clang" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread"
+fi
+
+
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+ darwin* | hpux* | linux* | osf* | solaris*)
+ ax_pthread_check_macro="_REENTRANT"
+ ;;
+
+ aix*)
+ ax_pthread_check_macro="_THREAD_SAFE"
+ ;;
+
+ *)
+ ax_pthread_check_macro="--"
+ ;;
+esac
+if test "x$ax_pthread_check_macro" = "x--"
+then :
+ ax_pthread_check_cond=0
+else $as_nop
+ ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
+fi
+
+
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
+
+ case $ax_pthread_try_flag in
+ none)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+printf %s "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ *,*)
+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
+printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
+ ;;
+
+ -*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
+printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
+ PTHREAD_CFLAGS="$ax_pthread_try_flag"
+ ;;
+
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ax_pthread_config+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ax_pthread_config"; then
+ ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ax_pthread_config="yes"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
+fi
+fi
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+printf "%s\n" "$ax_pthread_config" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ if test "x$ax_pthread_config" = "xno"
+then :
+ continue
+fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
+printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
+ PTHREAD_LIBS="-l$ax_pthread_try_flag"
+ ;;
+ esac
+
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+# if $ax_pthread_check_cond
+# error "$ax_pthread_check_macro must be defined"
+# endif
+ static void *some_global = NULL;
+ static void routine(void *a)
+ {
+ /* To avoid any unused-parameter or
+ unused-but-set-parameter warning. */
+ some_global = a;
+ }
+ static void *start_routine(void *a) { return a; }
+int
+main (void)
+{
+pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = "xyes"
+then :
+ break
+fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+ # Clang takes -pthread; it has never supported any other flag
+
+ # (Note 1: This will need to be revisited if a system that Clang
+ # supports has POSIX threads in a separate library. This tends not
+ # to be the way of modern systems, but it's conceivable.)
+
+ # (Note 2: On some systems, notably Darwin, -pthread is not needed
+ # to get POSIX threads support; the API is always present and
+ # active. We could reasonably leave PTHREAD_CFLAGS empty. But
+ # -pthread does define _REENTRANT, and while the Darwin headers
+ # ignore this macro, third-party headers might not.)
+
+ # However, older versions of Clang make a point of warning the user
+ # that, in an invocation where only linking and no compilation is
+ # taking place, the -pthread option has no effect ("argument unused
+ # during compilation"). They expect -pthread to be passed in only
+ # when source code is being compiled.
+ #
+ # Problem is, this is at odds with the way Automake and most other
+ # C build frameworks function, which is that the same flags used in
+ # compilation (CFLAGS) are also used in linking. Many systems
+ # supported by AX_PTHREAD require exactly this for POSIX threads
+ # support, and in fact it is often not straightforward to specify a
+ # flag that is used only in the compilation phase and not in
+ # linking. Such a scenario is extremely rare in practice.
+ #
+ # Even though use of the -pthread flag in linking would only print
+ # a warning, this can be a nuisance for well-run software projects
+ # that build with -Werror. So if the active version of Clang has
+ # this misfeature, we search for an option to squash it.
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
+printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+ # Create an alternate version of $ac_link that compiles and
+ # links in two steps (.c -> .o, .o -> exe) instead of one
+ # (.c -> exe), because the warning occurs only in the second
+ # step
+ ax_pthread_save_ac_link="$ac_link"
+ ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+ ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
+ ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+ if test "x$ax_pthread_try" = "xunknown"
+then :
+ break
+fi
+ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+ ac_link="$ax_pthread_save_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_link="$ax_pthread_2step_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ ac_link="$ax_pthread_save_ac_link"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ if test "x$ax_pthread_try" = "x"
+then :
+ ax_pthread_try=no
+fi
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
+
+ case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+ no | unknown) ;;
+ *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+ esac
+
+fi # $ax_pthread_clang = yes
+
+
+
+# Various other checks:
+if test "x$ax_pthread_ok" = "xyes"; then
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+printf %s "checking for joinable pthread attribute... " >&6; }
+if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main (void)
+{
+int attr = $ax_pthread_attr; return attr /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
+printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
+ if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+ test "x$ax_pthread_joinable_attr_defined" != "xyes"
+then :
+
+printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
+
+ ax_pthread_joinable_attr_defined=yes
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
+printf %s "checking whether more special flags are required for pthreads... " >&6; }
+if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_SPECIAL_FLAGS=no
+ case $host_os in
+ solaris*)
+ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
+printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
+ if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+ test "x$ax_pthread_special_flags_added" != "xyes"
+then :
+ PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+ ax_pthread_special_flags_added=yes
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main (void)
+{
+int i = PTHREAD_PRIO_INHERIT;
+ return i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_PTHREAD_PRIO_INHERIT=yes
+else $as_nop
+ ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+ test "x$ax_pthread_prio_inherit_defined" != "xyes"
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+ ax_pthread_prio_inherit_defined=yes
+
+fi
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != "xyes"; then
+ case $host_os in
+ aix*)
+ case "x/$CC" in #(
+ x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
+ #handle absolute path differently from PATH based program lookup
+ case "x$CC" in #(
+ x/*) :
+
+ if as_fn_executable_p ${CC}_r
+then :
+ PTHREAD_CC="${CC}_r"
+fi
+ if test "x${CXX}" != "x"
+then :
+ if as_fn_executable_p ${CXX}_r
+then :
+ PTHREAD_CXX="${CXX}_r"
+fi
+fi
+ ;; #(
+ *) :
+
+ for ac_prog in ${CC}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+printf "%s\n" "$PTHREAD_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+ if test "x${CXX}" != "x"
+then :
+ for ac_prog in ${CXX}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PTHREAD_CXX"; then
+ ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
+if test -n "$PTHREAD_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
+printf "%s\n" "$PTHREAD_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CXX" && break
+done
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+fi
+
+ ;;
+esac
+ ;; #(
+ *) :
+ ;;
+esac
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test "x$ax_pthread_ok" = "xyes"; then
+
+printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
+
+ :
+else
+ ax_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+else
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+fi
+
+# Check whether --enable-uuidd was given.
+if test ${enable_uuidd+y}
+then :
+ enableval=$enable_uuidd; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not building uuidd" >&5
+printf "%s\n" "Not building uuidd" >&6; }
+ UUIDD_CMT="#"
+else
+ printf "%s\n" "#define USE_UUIDD 1" >>confdefs.h
+
+ UUIDD_CMT=""
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building uuidd" >&5
+printf "%s\n" "Building uuidd" >&6; }
+fi
+
+else $as_nop
+ printf "%s\n" "#define USE_UUIDD 1" >>confdefs.h
+
+if test -z "$UUID_CMT"
+then
+ UUIDD_CMT=""
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building uuidd by default" >&5
+printf "%s\n" "Building uuidd by default" >&6; }
+else
+ UUIDD_CMT="#"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling uuidd by default" >&5
+printf "%s\n" "Disabling uuidd by default" >&6; }
+fi
+
+fi
+
+
+
+# Check whether --enable-mmp was given.
+if test ${enable_mmp+y}
+then :
+ enableval=$enable_mmp; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling mmp support" >&5
+printf "%s\n" "Disabling mmp support" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling mmp support" >&5
+printf "%s\n" "Enabling mmp support" >&6; }
+ printf "%s\n" "#define CONFIG_MMP 1" >>confdefs.h
+
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling mmp support by default" >&5
+printf "%s\n" "Enabling mmp support by default" >&6; }
+printf "%s\n" "#define CONFIG_MMP 1" >>confdefs.h
+
+
+fi
+
+
+# Check whether --enable-tdb was given.
+if test ${enable_tdb+y}
+then :
+ enableval=$enable_tdb;
+if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling tdb support" >&5
+printf "%s\n" "Disabling tdb support" >&6; }
+ CONFIG_TDB=0
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling tdb support" >&5
+printf "%s\n" "Enabling tdb support" >&6; }
+ CONFIG_TDB=1
+fi
+
+
+else $as_nop
+
+case "$host_os" in
+mingw*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling tdb support by default" >&5
+printf "%s\n" "Disabling tdb support by default" >&6; }
+ CONFIG_TDB=0
+ ;;
+*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling tdb support by default" >&5
+printf "%s\n" "Enabling tdb support by default" >&6; }
+ CONFIG_TDB=1
+ ;;
+esac
+
+
+fi
+
+if test "$CONFIG_TDB" = "1"
+then
+ printf "%s\n" "#define CONFIG_TDB 1" >>confdefs.h
+
+ TDB_CMT=""
+ TDB_MAN_COMMENT=""
+else
+ TDB_CMT="#"
+ TDB_MAN_COMMENT='.\"'
+fi
+
+
+
+# Check whether --enable-bmap-stats was given.
+if test ${enable_bmap_stats+y}
+then :
+ enableval=$enable_bmap_stats; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling bitmap statistics support" >&5
+printf "%s\n" "Disabling bitmap statistics support" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling bitmap statistics support" >&5
+printf "%s\n" "Enabling bitmap statistics support" >&6; }
+ printf "%s\n" "#define ENABLE_BMAP_STATS 1" >>confdefs.h
+
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling bitmap statistics support by default" >&5
+printf "%s\n" "Enabling bitmap statistics support by default" >&6; }
+printf "%s\n" "#define ENABLE_BMAP_STATS 1" >>confdefs.h
+
+
+fi
+
+
+# Check whether --enable-bmap-stats-ops was given.
+if test ${enable_bmap_stats_ops+y}
+then :
+ enableval=$enable_bmap_stats_ops; if test "$enableval" = "no"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling additional bitmap statistics" >&5
+printf "%s\n" "Disabling additional bitmap statistics" >&6; }
+else
+ if test "x${enable_bmap_stats}" = "xno"
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Error --enable-bmap-stats-ops requires bmap-stats
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling additional bitmap statistics" >&5
+printf "%s\n" "Enabling additional bitmap statistics" >&6; }
+ printf "%s\n" "#define ENABLE_BMAP_STATS_OPS 1" >>confdefs.h
+
+fi
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling additional bitmap statistics by default" >&5
+printf "%s\n" "Disabling additional bitmap statistics by default" >&6; }
+
+fi
+
+MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
+
+GETTEXT_PACKAGE=e2fsprogs
+PACKAGE=e2fsprogs
+VERSION="$E2FSPROGS_VERSION"
+VERSION=0.14.1
+
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
+
+
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SET_MAKE=
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+ # Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test ${ac_cv_path_install+y}; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test ${ac_cv_path_mkdir+y}; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+printf %s "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test ${enable_nls+y}
+then :
+ enableval=$enable_nls; USE_NLS=$enableval
+else $as_nop
+ USE_NLS=yes
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+printf "%s\n" "$USE_NLS" >&6; }
+
+
+
+
+ GETTEXT_MACRO_VERSION=0.20
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_MSGFMT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+printf "%s\n" "$MSGFMT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_GMSGFMT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+printf "%s\n" "$GMSGFMT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_XGETTEXT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+printf "%s\n" "$XGETTEXT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ rm -f messages.po
+
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_MSGMERGE+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+printf "%s\n" "$MSGMERGE" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
+ else
+ if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
+ else
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
+ fi
+ fi
+
+
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+ ac_config_commands="$ac_config_commands po-directories"
+
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else $as_nop
+ with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
+printf %s "checking for ld... " >&6; }
+elif test "$GCC" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
+elif test "$with_gnu_ld" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
+fi
+if test -n "$LD"; then
+ # Let the user override the test with a path.
+ :
+else
+ if test ${acl_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ acl_cv_path_LD= # Final result of this test
+ ac_prog=ld # Program to search in $PATH
+ if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $acl_output in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
+ while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
+ acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
+ done
+ # Got the pathname. No search in PATH is needed.
+ acl_cv_path_LD="$acl_output"
+ ac_prog=
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+ fi
+ if test -n "$ac_prog"; then
+ # Search for $ac_prog in $PATH.
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+ fi
+ case $host in
+ *-*-aix*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # The compiler produces 64-bit code. Add option '-b64' so that the
+ # linker groks 64-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -b64 "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+ esac
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ sparc64-*-netbsd*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # The compiler produces 32-bit code. Add option '-m elf32_sparc'
+ # so that the linker groks 32-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -m elf32_sparc "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+ esac
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ esac
+
+fi
+
+ LD="$acl_cv_path_LD"
+fi
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${acl_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes
+ ;;
+*)
+ acl_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+printf %s "checking for shared library run path origin... " >&6; }
+if test ${acl_cv_rpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+printf "%s\n" "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath was given.
+if test ${enable_rpath+y}
+then :
+ enableval=$enable_rpath; :
+else $as_nop
+ enable_rpath=yes
+fi
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
+printf %s "checking 32-bit host C ABI... " >&6; }
+if test ${gl_cv_host_cpu_c_abi_32bit+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$gl_cv_host_cpu_c_abi"; then
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
+ esac
+ else
+ case "$host_cpu" in
+
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh1234 | sh1234elb \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ # CPUs that only support a 64-bit ABI.
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+
+ i[34567]86 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64) \
+ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=yes
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown
+ ;;
+ esac
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
+printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
+
+ HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
+printf %s "checking for ELF binary format... " >&6; }
+if test ${gl_cv_elf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __ELF__
+ Extensible Linking Format
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Extensible Linking Format" >/dev/null 2>&1
+then :
+ gl_cv_elf=yes
+else $as_nop
+ gl_cv_elf=no
+fi
+rm -rf conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
+printf "%s\n" "$gl_cv_elf" >&6; }
+ if test $gl_cv_elf; then
+ # Extract the ELF class of a file (5th byte) in decimal.
+ # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
+ if od -A x < /dev/null >/dev/null 2>/dev/null; then
+ # Use POSIX od.
+ func_elfclass ()
+ {
+ od -A n -t d1 -j 4 -N 1
+ }
+ else
+ # Use BSD hexdump.
+ func_elfclass ()
+ {
+ dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
+ echo
+ }
+ fi
+ case $HOST_CPU_C_ABI_32BIT in
+ yes)
+ # 32-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 1
+ }
+ ;;
+ no)
+ # 64-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 2
+ }
+ ;;
+ *)
+ # Unknown.
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ ;;
+ esac
+ else
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
+printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
+if test ${acl_cv_libdirstems+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ acl_libdirstem3=
+ case "$host_os" in
+ solaris*)
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ acl_libdirstem2=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem3=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test $HOST_CPU_C_ABI_32BIT != no; then
+ # 32-bit or unknown ABI.
+ if test -d /usr/lib32; then
+ acl_libdirstem2=lib32
+ fi
+ fi
+ if test $HOST_CPU_C_ABI_32BIT != yes; then
+ # 64-bit or unknown ABI.
+ if test -d /usr/lib64; then
+ acl_libdirstem3=lib64
+ fi
+ fi
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64 ) acl_libdirstem3=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ if test $HOST_CPU_C_ABI_32BIT = yes; then
+ # 32-bit ABI.
+ acl_libdirstem3=
+ fi
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ # 64-bit ABI.
+ acl_libdirstem2=
+ fi
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+ test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
+printf "%s\n" "$acl_cv_libdirstems" >&6; }
+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
+ acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test ${with_libiconv_prefix+y}
+then :
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
+ fi
+ fi
+
+fi
+
+ if test "X$additional_libdir2" = "X$additional_libdir"; then
+ additional_libdir2=
+ fi
+ if test "X$additional_libdir3" = "X$additional_libdir"; then
+ additional_libdir3=
+ fi
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ LIBICONV_PREFIX=
+ HAVE_LIBICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+ if test "X$found_dir" = "X"; then
+ eval dir=\$$additional_libdir_variable
+ if test -n "$dir"; then
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ fi
+ done
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem3 | */$acl_libdirstem3/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
+ haveit=
+ if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
+if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main (void)
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else $as_nop
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
+printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
+if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main (void)
+{
+CFLocaleCopyPreferredLanguages();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFLocaleCopyPreferredLanguages=yes
+else $as_nop
+ gt_cv_func_CFLocaleCopyPreferredLanguages=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
+printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
+ if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+
+printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+printf %s "checking for GNU gettext in libc... " >&6; }
+if eval test \${$gt_func_gnugettext_libc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+
+int
+main (void)
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$gt_func_gnugettext_libc=yes"
+else $as_nop
+ eval "$gt_func_gnugettext_libc=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$gt_func_gnugettext_libc
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+printf %s "checking for iconv... " >&6; }
+if test ${am_cv_func_iconv+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main (void)
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main (void)
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+printf "%s\n" "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+printf %s "checking for working iconv... " >&6; }
+if test ${am_cv_func_iconv_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ am_cv_func_iconv_works=no
+ for ac_iconv_const in '' 'const'; do
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+
+int
+main (void)
+{
+int result = 0;
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 1;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\263";
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_ascii_to_88591);
+ }
+ }
+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304";
+ static char buf[2] = { (char)0xDE, (char)0xAD };
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = 1;
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+ result |= 4;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ result |= 8;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ {
+ /* Try standardized names. */
+ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+ /* Try IRIX, OSF/1 names. */
+ iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+ /* Try AIX names. */
+ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+ /* Try HP-UX names. */
+ iconv_t cd4 = iconv_open ("utf8", "eucJP");
+ if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+ && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+ result |= 16;
+ if (cd1 != (iconv_t)(-1))
+ iconv_close (cd1);
+ if (cd2 != (iconv_t)(-1))
+ iconv_close (cd2);
+ if (cd3 != (iconv_t)(-1))
+ iconv_close (cd3);
+ if (cd4 != (iconv_t)(-1))
+ iconv_close (cd4);
+ }
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ am_cv_func_iconv_works=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ test "$am_cv_func_iconv_works" = no || break
+ done
+ LIBS="$am_save_LIBS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+printf "%s\n" "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+printf %s "checking how to link with libiconv... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+printf "%s\n" "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test ${with_libintl_prefix+y}
+then :
+ withval=$with_libintl_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
+ fi
+ fi
+
+fi
+
+ if test "X$additional_libdir2" = "X$additional_libdir"; then
+ additional_libdir2=
+ fi
+ if test "X$additional_libdir3" = "X$additional_libdir"; then
+ additional_libdir3=
+ fi
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ LIBINTL_PREFIX=
+ HAVE_LIBINTL=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+ if test "X$found_dir" = "X"; then
+ eval dir=\$$additional_libdir_variable
+ if test -n "$dir"; then
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ fi
+ done
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem3 | */$acl_libdirstem3/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
+ haveit=
+ if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+printf %s "checking for GNU gettext in libintl... " >&6; }
+if eval test \${$gt_func_gnugettext_libintl+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+
+int
+main (void)
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$gt_func_gnugettext_libintl=yes"
+else $as_nop
+ eval "$gt_func_gnugettext_libintl=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+
+int
+main (void)
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+eval ac_res=\$$gt_func_gnugettext_libintl
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ fi
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+printf %s "checking whether to use NLS... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+printf "%s\n" "$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+printf %s "checking where the gettext function comes from... " >&6; }
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+printf "%s\n" "$gt_source" >&6; }
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+printf %s "checking how to link with libintl... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+printf "%s\n" "$LIBINTL" >&6; }
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+
+printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
+
+ fi
+
+ POSUB=po
+ fi
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SET_MAKE=
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
+printf %s "checking for GNU make... " >&6; }
+if test ${_cv_gnu_make_command+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ _cv_gnu_make_command='' ;
+ if test -n "$FORCE_NATIVE_MAKE" ; then
+ MAKES="make"
+ else
+ MAKES="make gmake gnumake"
+ fi
+ for a in "$MAKE" $MAKES ; do
+ if test -z "$a" ; then continue ; fi ;
+ if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
+ _cv_gnu_make_command=$a ;
+ break;
+ fi
+ done ;
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
+printf "%s\n" "$_cv_gnu_make_command" >&6; } ;
+ if test "x$_cv_gnu_make_command" != "x" ; then
+ ifGNUmake='' ;
+ ifNotGNUmake='#' ;
+ else
+ ifGNUmake='#' ;
+ ifNotGNUmake='' ;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5
+printf "%s\n" "\"Not found\"" >&6; };
+ fi
+
+
+
+# Extract the first word of "ln", so it can be a program name with args.
+set dummy ln; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_LN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $LN in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LN="$LN" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_LN="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_LN" && ac_cv_path_LN="ln"
+ ;;
+esac
+fi
+LN=$ac_cv_path_LN
+if test -n "$LN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
+printf "%s\n" "$LN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+mkdir_p=$MKDIR_P
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
+fi
+
+# Extract the first word of "mv", so it can be a program name with args.
+set dummy mv; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_MV+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $MV in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MV="$MV" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_MV="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
+ ;;
+esac
+fi
+MV=$ac_cv_path_MV
+if test -n "$MV"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
+printf "%s\n" "$MV" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+# Extract the first word of "cp", so it can be a program name with args.
+set dummy cp; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_CP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $CP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CP="$CP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_CP="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
+ ;;
+esac
+fi
+CP=$ac_cv_path_CP
+if test -n "$CP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
+printf "%s\n" "$CP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+# Extract the first word of "rm", so it can be a program name with args.
+set dummy rm; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_RM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $RM in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_RM="$RM" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_RM="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
+ ;;
+esac
+fi
+RM=$ac_cv_path_RM
+if test -n "$RM"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
+printf "%s\n" "$RM" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+# Extract the first word of "chmod", so it can be a program name with args.
+set dummy chmod; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_CHMOD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $CHMOD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_CHMOD="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD=":"
+ ;;
+esac
+fi
+CHMOD=$ac_cv_path_CHMOD
+if test -n "$CHMOD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
+printf "%s\n" "$CHMOD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+# Extract the first word of "sed", so it can be a program name with args.
+set dummy sed; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $SED in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SED="$SED" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_SED="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed"
+ ;;
+esac
+fi
+SED=$ac_cv_path_SED
+if test -n "$SED"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
+printf "%s\n" "$SED" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PERL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="perl"
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+printf "%s\n" "$PERL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+# Extract the first word of "ldconfig", so it can be a program name with args.
+set dummy ldconfig; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_LDCONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $LDCONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_LDCONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_LDCONFIG" && ac_cv_path_LDCONFIG=":"
+ ;;
+esac
+fi
+LDCONFIG=$ac_cv_path_LDCONFIG
+if test -n "$LDCONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDCONFIG" >&5
+printf "%s\n" "$LDCONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="ar"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+# Extract the first word of "makeinfo", so it can be a program name with args.
+set dummy makeinfo; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MAKEINFO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$MAKEINFO"; then
+ ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEINFO="makeinfo"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MAKEINFO=$ac_cv_prog_MAKEINFO
+if test -n "$MAKEINFO"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
+printf "%s\n" "$MAKEINFO" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+if test "_$MAKEINFO" = "_"; then
+ MAKEINFO="echo Makeinfo is missing. Info documentation will not be built."
+else
+ case "$MAKEINFO" in
+ */missing.*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
+*** Makeinfo is missing. Info documentation will not be built." >&5
+printf "%s\n" "$as_me: WARNING:
+*** Makeinfo is missing. Info documentation will not be built." >&2;}
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+
+# See if we need a separate native compiler.
+if test $cross_compiling = no; then
+ BUILD_CC="$CC"
+
+else
+ for ac_prog in gcc cc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_BUILD_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$BUILD_CC"; then
+ ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_BUILD_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+BUILD_CC=$ac_cv_prog_BUILD_CC
+if test -n "$BUILD_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
+printf "%s\n" "$BUILD_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$BUILD_CC" && break
+done
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default"
+if test "x$ac_cv_header_dirent_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DIRENT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
+if test "x$ac_cv_header_execinfo_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_EXECINFO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
+if test "x$ac_cv_header_malloc_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default"
+if test "x$ac_cv_header_mntent_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MNTENT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
+if test "x$ac_cv_header_paths_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
+if test "x$ac_cv_header_semaphore_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_setjmp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
+if test "x$ac_cv_header_signal_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdarg_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
+if test "x$ac_cv_header_termios_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
+if test "x$ac_cv_header_termio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
+if test "x$ac_cv_header_utime_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
+if test "x$ac_cv_header_attr_xattr_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "linux/falloc.h" "ac_cv_header_linux_falloc_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_falloc_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_FALLOC_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "linux/fd.h" "ac_cv_header_linux_fd_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_fd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_FD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "linux/fsmap.h" "ac_cv_header_linux_fsmap_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_fsmap_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_FSMAP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "linux/major.h" "ac_cv_header_linux_major_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_major_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_MAJOR_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "linux/loop.h" "ac_cv_header_linux_loop_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_loop_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_LOOP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "linux/types.h" "ac_cv_header_linux_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_types_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_TYPES_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_if_dl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_acl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/disklabel.h" "ac_cv_header_sys_disklabel_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_disklabel_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_DISKLABEL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/disk.h" "ac_cv_header_sys_disk_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_disk_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_DISK_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_file_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ioctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/key.h" "ac_cv_header_sys_key_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_key_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_KEY_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mkdev_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mman_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mount_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_prctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_random_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_resource_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_select_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sockio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_syscall_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSCALL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sysmacros_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_types_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_un_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_xattr_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
+
+fi
+
+case "$host_os" in
+mingw*)
+ # The above checks only detect system headers, not the headers in
+ # ./include/mingw/, so explicitly define them to be available.
+ printf "%s\n" "#define HAVE_LINUX_TYPES_H 1" >>confdefs.h
+
+ printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
+
+ printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h
+
+ printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
+
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
+
+ ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a dd(1) program that supports iflag=fullblock" >&5
+printf %s "checking for a dd(1) program that supports iflag=fullblock... " >&6; }
+DD=
+for i in dd gdd ; do
+ if "$i" if=/dev/null of=/dev/null count=1 bs=10k 2>/dev/null iflag=fullblock oflag=append ; then
+ DD=$i
+ break
+ fi
+done
+if test -n "$DD" ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DD" >&5
+printf "%s\n" "$DD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found, using dd" >&5
+printf "%s\n" "not found, using dd" >&6; }
+ DD=dd
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No GNU-compatible dd(1) program found, expect some self-test failures." >&5
+printf "%s\n" "$as_me: WARNING: No GNU-compatible dd(1) program found, expect some self-test failures." >&2;}
+fi
+
+
+ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+
+"
+if test "x$ac_cv_header_net_if_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
+
+fi
+
+ac_func=
+for ac_item in $ac_func_c_list
+do
+ if test $ac_func; then
+ ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
+ if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
+ echo "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_func=
+ else
+ ac_func=$ac_item
+ fi
+done
+
+if test "x$ac_cv_func_vprintf" = xno
+then :
+ ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = xyes
+then :
+
+printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
+
+fi
+
+fi
+ac_fn_c_check_member "$LINENO" "struct dirent" "d_reclen" "ac_cv_member_struct_dirent_d_reclen" "#include <dirent.h>
+"
+if test "x$ac_cv_member_struct_dirent_d_reclen" = xyes
+then :
+
+printf "%s\n" "#define HAVE_RECLEN_DIRENT 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct stat" "st_atim" "ac_cv_member_struct_stat_st_atim" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_atim" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM 1" >>confdefs.h
+
+
+fi
+
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "#include <sys/types.h>
+"
+if test "x$ac_cv_type_ssize_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_TYPE_SSIZE_T 1" >>confdefs.h
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+ac_fn_check_decl "$LINENO" "llseek" "ac_cv_have_decl_llseek" "#include <unistd.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_llseek" = xyes
+then :
+
+printf "%s\n" "#define HAVE_LLSEEK_PROTOTYPE 1" >>confdefs.h
+
+fi
+ac_fn_check_decl "$LINENO" "lseek64" "ac_cv_have_decl_lseek64" "#define _LARGEFILE_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #include <unistd.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_lseek64" = xyes
+then :
+
+printf "%s\n" "#define HAVE_LSEEK64_PROTOTYPE 1" >>confdefs.h
+
+fi
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+printf %s "checking size of short... " >&6; }
+if test ${ac_cv_sizeof_short+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_short" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+printf "%s\n" "$ac_cv_sizeof_short" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+printf %s "checking size of int... " >&6; }
+if test ${ac_cv_sizeof_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_int" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+printf "%s\n" "$ac_cv_sizeof_int" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+printf %s "checking size of long... " >&6; }
+if test ${ac_cv_sizeof_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_long" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+printf %s "checking size of long long... " >&6; }
+if test ${ac_cv_sizeof_long_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_long_long" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long_long=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
+printf %s "checking size of off_t... " >&6; }
+if test ${ac_cv_sizeof_off_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_off_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (off_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_off_t=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
+printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+printf %s "checking size of time_t... " >&6; }
+if test ${ac_cv_sizeof_time_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_time_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (time_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
+
+
+SIZEOF_SHORT=$ac_cv_sizeof_short
+SIZEOF_INT=$ac_cv_sizeof_int
+SIZEOF_LONG=$ac_cv_sizeof_long
+SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
+SIZEOF_OFF_T=$ac_cv_sizeof_off_t
+SIZEOF_TIME_T=$ac_cv_sizeof_time_t
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+printf %s "checking whether byte ordering is bigendian... " >&6; }
+if test ${ac_cv_c_bigendian+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main (void)
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main (void)
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_bigendian=yes
+else $as_nop
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main (void)
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main (void)
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_bigendian=yes
+else $as_nop
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes
+then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+unsigned short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ unsigned short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ unsigned short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ unsigned short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main (void)
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ac_cv_c_bigendian=no
+else $as_nop
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+printf "%s\n" "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+if test $cross_compiling = no; then
+ BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+else
+ CROSS_COMPILE="1" BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+fi
+ASM_TYPES_HEADER=./asm_types.h
+
+echo "/* These defines are needed for the public ext2fs.h header file */" \
+ > public_config.h
+if grep HAVE_SYS_TYPES_H confdefs.h > tmp_config.$$; then
+ uniq tmp_config.$$ >> public_config.h
+else
+ echo "#undef HAVE_SYS_TYPES_H" >> public_config.h
+fi
+if grep WORDS_BIGENDIAN confdefs.h > tmp_config.$$; then
+ uniq tmp_config.$$ >> public_config.h
+else
+ echo "#undef WORDS_BIGENDIAN" >> public_config.h
+fi
+rm -f tmp_config.$$
+PUBLIC_CONFIG_HEADER=./public_config.h
+
+ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
+
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat has a st_flags field" >&5
+printf %s "checking whether struct stat has a st_flags field... " >&6; }
+if test ${e2fsprogs_cv_struct_st_flags+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main (void)
+{
+struct stat stat; stat.st_flags = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ e2fsprogs_cv_struct_st_flags=yes
+else $as_nop
+ e2fsprogs_cv_struct_st_flags=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $e2fsprogs_cv_struct_st_flags" >&5
+printf "%s\n" "$e2fsprogs_cv_struct_st_flags" >&6; }
+if test "$e2fsprogs_cv_struct_st_flags" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether st_flags field is useful" >&5
+printf %s "checking whether st_flags field is useful... " >&6; }
+ if test ${e2fsprogs_cv_struct_st_flags_immut+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main (void)
+{
+struct stat stat; stat.st_flags |= UF_IMMUTABLE;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ e2fsprogs_cv_struct_st_flags_immut=yes
+else $as_nop
+ e2fsprogs_cv_struct_st_flags_immut=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $e2fsprogs_cv_struct_st_flags_immut" >&5
+printf "%s\n" "$e2fsprogs_cv_struct_st_flags_immut" >&6; }
+ if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
+
+printf "%s\n" "#define HAVE_STAT_FLAGS 1" >>confdefs.h
+
+ fi
+fi
+ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
+ #include <sys/socket.h>
+"
+if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes
+then :
+
+printf "%s\n" "#define HAVE_SA_LEN 1" >>confdefs.h
+
+fi
+
+if test -n "$BLKID_CMT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkid_probe_get_topology in -lblkid" >&5
+printf %s "checking for blkid_probe_get_topology in -lblkid... " >&6; }
+if test ${ac_cv_lib_blkid_blkid_probe_get_topology+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char blkid_probe_get_topology ();
+int
+main (void)
+{
+return blkid_probe_get_topology ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_blkid_blkid_probe_get_topology=yes
+else $as_nop
+ ac_cv_lib_blkid_blkid_probe_get_topology=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_probe_get_topology" >&5
+printf "%s\n" "$ac_cv_lib_blkid_blkid_probe_get_topology" >&6; }
+if test "x$ac_cv_lib_blkid_blkid_probe_get_topology" = xyes
+then :
+
+printf "%s\n" "#define HAVE_BLKID_PROBE_GET_TOPOLOGY 1" >>confdefs.h
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkid_topology_get_dax in -lblkid" >&5
+printf %s "checking for blkid_topology_get_dax in -lblkid... " >&6; }
+if test ${ac_cv_lib_blkid_blkid_topology_get_dax+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char blkid_topology_get_dax ();
+int
+main (void)
+{
+return blkid_topology_get_dax ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_blkid_blkid_topology_get_dax=yes
+else $as_nop
+ ac_cv_lib_blkid_blkid_topology_get_dax=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_topology_get_dax" >&5
+printf "%s\n" "$ac_cv_lib_blkid_blkid_topology_get_dax" >&6; }
+if test "x$ac_cv_lib_blkid_blkid_topology_get_dax" = xyes
+then :
+
+printf "%s\n" "#define HAVE_BLKID_TOPOLOGY_GET_DAX 1" >>confdefs.h
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkid_probe_enable_partitions in -lblkid" >&5
+printf %s "checking for blkid_probe_enable_partitions in -lblkid... " >&6; }
+if test ${ac_cv_lib_blkid_blkid_probe_enable_partitions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char blkid_probe_enable_partitions ();
+int
+main (void)
+{
+return blkid_probe_enable_partitions ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_blkid_blkid_probe_enable_partitions=yes
+else $as_nop
+ ac_cv_lib_blkid_blkid_probe_enable_partitions=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_probe_enable_partitions" >&5
+printf "%s\n" "$ac_cv_lib_blkid_blkid_probe_enable_partitions" >&6; }
+if test "x$ac_cv_lib_blkid_blkid_probe_enable_partitions" = xyes
+then :
+
+printf "%s\n" "#define HAVE_BLKID_PROBE_ENABLE_PARTITIONS 1" >>confdefs.h
+
+fi
+
+fi
+if test -n "$DLOPEN_LIB" ; then
+ ac_cv_func_dlopen=yes
+fi
+ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
+if test "x$ac_cv_func___secure_getenv" = xyes
+then :
+ printf "%s\n" "#define HAVE___SECURE_GETENV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "add_key" "ac_cv_func_add_key"
+if test "x$ac_cv_func_add_key" = xyes
+then :
+ printf "%s\n" "#define HAVE_ADD_KEY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "backtrace" "ac_cv_func_backtrace"
+if test "x$ac_cv_func_backtrace" = xyes
+then :
+ printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
+if test "x$ac_cv_func_chflags" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHFLAGS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fadvise64" "ac_cv_func_fadvise64"
+if test "x$ac_cv_func_fadvise64" = xyes
+then :
+ printf "%s\n" "#define HAVE_FADVISE64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fallocate" "ac_cv_func_fallocate"
+if test "x$ac_cv_func_fallocate" = xyes
+then :
+ printf "%s\n" "#define HAVE_FALLOCATE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fallocate64" "ac_cv_func_fallocate64"
+if test "x$ac_cv_func_fallocate64" = xyes
+then :
+ printf "%s\n" "#define HAVE_FALLOCATE64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
+if test "x$ac_cv_func_fchown" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
+if test "x$ac_cv_func_fcntl" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
+if test "x$ac_cv_func_fdatasync" = xyes
+then :
+ printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fstat64" "ac_cv_func_fstat64"
+if test "x$ac_cv_func_fstat64" = xyes
+then :
+ printf "%s\n" "#define HAVE_FSTAT64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
+if test "x$ac_cv_func_fsync" = xyes
+then :
+ printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ftruncate64" "ac_cv_func_ftruncate64"
+if test "x$ac_cv_func_ftruncate64" = xyes
+then :
+ printf "%s\n" "#define HAVE_FTRUNCATE64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes"
+if test "x$ac_cv_func_futimes" = xyes
+then :
+ printf "%s\n" "#define HAVE_FUTIMES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
+if test "x$ac_cv_func_getcwd" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
+if test "x$ac_cv_func_getdtablesize" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
+if test "x$ac_cv_func_getentropy" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
+if test "x$ac_cv_func_gethostname" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getmntinfo" "ac_cv_func_getmntinfo"
+if test "x$ac_cv_func_getmntinfo" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETMNTINFO 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r"
+if test "x$ac_cv_func_getpwuid_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
+if test "x$ac_cv_func_getrandom" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
+if test "x$ac_cv_func_getrlimit" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
+if test "x$ac_cv_func_getrusage" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "jrand48" "ac_cv_func_jrand48"
+if test "x$ac_cv_func_jrand48" = xyes
+then :
+ printf "%s\n" "#define HAVE_JRAND48 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "keyctl" "ac_cv_func_keyctl"
+if test "x$ac_cv_func_keyctl" = xyes
+then :
+ printf "%s\n" "#define HAVE_KEYCTL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "llistxattr" "ac_cv_func_llistxattr"
+if test "x$ac_cv_func_llistxattr" = xyes
+then :
+ printf "%s\n" "#define HAVE_LLISTXATTR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "llseek" "ac_cv_func_llseek"
+if test "x$ac_cv_func_llseek" = xyes
+then :
+ printf "%s\n" "#define HAVE_LLSEEK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "lseek64" "ac_cv_func_lseek64"
+if test "x$ac_cv_func_lseek64" = xyes
+then :
+ printf "%s\n" "#define HAVE_LSEEK64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mallinfo" "ac_cv_func_mallinfo"
+if test "x$ac_cv_func_mallinfo" = xyes
+then :
+ printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mallinfo2" "ac_cv_func_mallinfo2"
+if test "x$ac_cv_func_mallinfo2" = xyes
+then :
+ printf "%s\n" "#define HAVE_MALLINFO2 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mbstowcs" "ac_cv_func_mbstowcs"
+if test "x$ac_cv_func_mbstowcs" = xyes
+then :
+ printf "%s\n" "#define HAVE_MBSTOWCS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "memalign" "ac_cv_func_memalign"
+if test "x$ac_cv_func_memalign" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMALIGN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
+if test "x$ac_cv_func_mempcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+ printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "msync" "ac_cv_func_msync"
+if test "x$ac_cv_func_msync" = xyes
+then :
+ printf "%s\n" "#define HAVE_MSYNC 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "open64" "ac_cv_func_open64"
+if test "x$ac_cv_func_open64" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPEN64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
+if test "x$ac_cv_func_pathconf" = xyes
+then :
+ printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
+if test "x$ac_cv_func_posix_fadvise" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_fadvise64" "ac_cv_func_posix_fadvise64"
+if test "x$ac_cv_func_posix_fadvise64" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_FADVISE64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign"
+if test "x$ac_cv_func_posix_memalign" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_MEMALIGN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
+if test "x$ac_cv_func_prctl" = xyes
+then :
+ printf "%s\n" "#define HAVE_PRCTL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
+if test "x$ac_cv_func_pread" = xyes
+then :
+ printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
+if test "x$ac_cv_func_pwrite" = xyes
+then :
+ printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pread64" "ac_cv_func_pread64"
+if test "x$ac_cv_func_pread64" = xyes
+then :
+ printf "%s\n" "#define HAVE_PREAD64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pwrite64" "ac_cv_func_pwrite64"
+if test "x$ac_cv_func_pwrite64" = xyes
+then :
+ printf "%s\n" "#define HAVE_PWRITE64 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "qsort_r" "ac_cv_func_qsort_r"
+if test "x$ac_cv_func_qsort_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_QSORT_R 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "secure_getenv" "ac_cv_func_secure_getenv"
+if test "x$ac_cv_func_secure_getenv" = xyes
+then :
+ printf "%s\n" "#define HAVE_SECURE_GETENV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setmntent" "ac_cv_func_setmntent"
+if test "x$ac_cv_func_setmntent" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETMNTENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
+if test "x$ac_cv_func_setresgid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
+if test "x$ac_cv_func_setresuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
+if test "x$ac_cv_func_srandom" = xyes
+then :
+ printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
+if test "x$ac_cv_func_stpcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
+if test "x$ac_cv_func_strnlen" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
+if test "x$ac_cv_func_strptime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
+if test "x$ac_cv_func_strtoull" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sync_file_range" "ac_cv_func_sync_file_range"
+if test "x$ac_cv_func_sync_file_range" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYNC_FILE_RANGE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
+if test "x$ac_cv_func_sysconf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
+if test "x$ac_cv_func_usleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
+if test "x$ac_cv_func_utime" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
+if test "x$ac_cv_func_utimes" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "valloc" "ac_cv_func_valloc"
+if test "x$ac_cv_func_valloc" = xyes
+then :
+ printf "%s\n" "#define HAVE_VALLOC 1" >>confdefs.h
+
+fi
+
+SOCKET_LIB=''
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+printf %s "checking for socket in -lsocket... " >&6; }
+if test ${ac_cv_lib_socket_socket+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char socket ();
+int
+main (void)
+{
+return socket ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_socket_socket=yes
+else $as_nop
+ ac_cv_lib_socket_socket=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = xyes
+then :
+ SOCKET_LIB=-lsocket
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for magic_file in -lmagic" >&5
+printf %s "checking for magic_file in -lmagic... " >&6; }
+if test ${ac_cv_lib_magic_magic_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmagic $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char magic_file ();
+int
+main (void)
+{
+return magic_file ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_magic_magic_file=yes
+else $as_nop
+ ac_cv_lib_magic_magic_file=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_file" >&5
+printf "%s\n" "$ac_cv_lib_magic_magic_file" >&6; }
+if test "x$ac_cv_lib_magic_magic_file" = xyes
+then :
+ MAGIC_LIB=-lmagic
+ac_fn_c_check_header_compile "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default"
+if test "x$ac_cv_header_magic_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MAGIC_H 1" >>confdefs.h
+
+fi
+
+fi
+
+if test "$ac_cv_func_dlopen" = yes ; then
+ MAGIC_LIB=$DLOPEN_LIB
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
+printf %s "checking for clock_gettime in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char clock_gettime ();
+int
+main (void)
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_rt_clock_gettime=yes
+else $as_nop
+ ac_cv_lib_rt_clock_gettime=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
+printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime" = xyes
+then :
+ CLOCK_GETTIME_LIB=-lrt
+fi
+
+
+FUSE_CMT=
+FUSE_LIB=
+# Check whether --enable-fuse2fs was given.
+if test ${enable_fuse2fs+y}
+then :
+ enableval=$enable_fuse2fs; if test "$enableval" = "no"
+then
+ FUSE_CMT="#"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling fuse2fs" >&5
+printf "%s\n" "Disabling fuse2fs" >&6; }
+else
+ for ac_header in pthread.h fuse.h
+do :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#define _FILE_OFFSET_BITS 64
+#define FUSE_USE_VERSION 29
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Cannot find fuse2fs headers.
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+done
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define FUSE_USE_VERSION 29
+#ifdef __linux__
+#include <linux/fs.h>
+#include <linux/falloc.h>
+#include <linux/xattr.h>
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Cannot find fuse2fs Linux headers.
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_main in -losxfuse" >&5
+printf %s "checking for fuse_main in -losxfuse... " >&6; }
+if test ${ac_cv_lib_osxfuse_fuse_main+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-losxfuse $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char fuse_main ();
+int
+main (void)
+{
+return fuse_main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_osxfuse_fuse_main=yes
+else $as_nop
+ ac_cv_lib_osxfuse_fuse_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osxfuse_fuse_main" >&5
+printf "%s\n" "$ac_cv_lib_osxfuse_fuse_main" >&6; }
+if test "x$ac_cv_lib_osxfuse_fuse_main" = xyes
+then :
+ FUSE_LIB=-losxfuse
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_main in -lfuse" >&5
+printf %s "checking for fuse_main in -lfuse... " >&6; }
+if test ${ac_cv_lib_fuse_fuse_main+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfuse $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char fuse_main ();
+int
+main (void)
+{
+return fuse_main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_fuse_fuse_main=yes
+else $as_nop
+ ac_cv_lib_fuse_fuse_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fuse_fuse_main" >&5
+printf "%s\n" "$ac_cv_lib_fuse_fuse_main" >&6; }
+if test "x$ac_cv_lib_fuse_fuse_main" = xyes
+then :
+ FUSE_LIB=-lfuse
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Cannot find fuse library.
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling fuse2fs" >&5
+printf "%s\n" "Enabling fuse2fs" >&6; }
+fi
+
+else $as_nop
+ for ac_header in pthread.h fuse.h
+do :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#define _FILE_OFFSET_BITS 64
+#define FUSE_USE_VERSION 29
+#ifdef __linux__
+# include <linux/fs.h>
+# include <linux/falloc.h>
+# include <linux/xattr.h>
+#endif
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else $as_nop
+ FUSE_CMT="#"
+fi
+
+done
+if test -z "$FUSE_CMT"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_main in -losxfuse" >&5
+printf %s "checking for fuse_main in -losxfuse... " >&6; }
+if test ${ac_cv_lib_osxfuse_fuse_main+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-losxfuse $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char fuse_main ();
+int
+main (void)
+{
+return fuse_main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_osxfuse_fuse_main=yes
+else $as_nop
+ ac_cv_lib_osxfuse_fuse_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osxfuse_fuse_main" >&5
+printf "%s\n" "$ac_cv_lib_osxfuse_fuse_main" >&6; }
+if test "x$ac_cv_lib_osxfuse_fuse_main" = xyes
+then :
+ FUSE_LIB=-losxfuse
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse_main in -lfuse" >&5
+printf %s "checking for fuse_main in -lfuse... " >&6; }
+if test ${ac_cv_lib_fuse_fuse_main+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfuse $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char fuse_main ();
+int
+main (void)
+{
+return fuse_main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_fuse_fuse_main=yes
+else $as_nop
+ ac_cv_lib_fuse_fuse_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fuse_fuse_main" >&5
+printf "%s\n" "$ac_cv_lib_fuse_fuse_main" >&6; }
+if test "x$ac_cv_lib_fuse_fuse_main" = xyes
+then :
+ FUSE_LIB=-lfuse
+else $as_nop
+ FUSE_CMT="#"
+fi
+
+fi
+
+fi
+if test -z "$FUSE_CMT"
+then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling fuse2fs by default." >&5
+printf "%s\n" "Enabling fuse2fs by default." >&6; }
+fi
+
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
+printf %s "checking for optreset... " >&6; }
+if test ${ac_cv_have_optreset+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "optreset" >/dev/null 2>&1
+then :
+ ac_cv_have_optreset=yes
+else $as_nop
+ ac_cv_have_optreset=no
+fi
+rm -rf conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_optreset" >&5
+printf "%s\n" "$ac_cv_have_optreset" >&6; }
+if test $ac_cv_have_optreset = yes; then
+
+printf "%s\n" "#define HAVE_OPTRESET 1" >>confdefs.h
+
+fi
+
+SEM_INIT_LIB=''
+echo GL_THREADS_API: ${gl_threads_api}
+if test "${gl_threads_api}" != none
+then
+ ac_fn_c_check_func "$LINENO" "sem_init" "ac_cv_func_sem_init"
+if test "x$ac_cv_func_sem_init" = xyes
+then :
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lpthread" >&5
+printf %s "checking for sem_init in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_sem_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char sem_init ();
+int
+main (void)
+{
+return sem_init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_pthread_sem_init=yes
+else $as_nop
+ ac_cv_lib_pthread_sem_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sem_init" >&5
+printf "%s\n" "$ac_cv_lib_pthread_sem_init" >&6; }
+if test "x$ac_cv_lib_pthread_sem_init" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEM_INIT 1" >>confdefs.h
+
+ SEM_INIT_LIB=-lpthread
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5
+printf %s "checking for sem_init in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_sem_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char sem_init ();
+int
+main (void)
+{
+return sem_init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_rt_sem_init=yes
+else $as_nop
+ ac_cv_lib_rt_sem_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5
+printf "%s\n" "$ac_cv_lib_rt_sem_init" >&6; }
+if test "x$ac_cv_lib_rt_sem_init" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEM_INIT 1" >>confdefs.h
+
+ SEM_INIT_LIB=-lrt
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lposix4" >&5
+printf %s "checking for sem_init in -lposix4... " >&6; }
+if test ${ac_cv_lib_posix4_sem_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char sem_init ();
+int
+main (void)
+{
+return sem_init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_posix4_sem_init=yes
+else $as_nop
+ ac_cv_lib_posix4_sem_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sem_init" >&5
+printf "%s\n" "$ac_cv_lib_posix4_sem_init" >&6; }
+if test "x$ac_cv_lib_posix4_sem_init" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEM_INIT 1" >>confdefs.h
+
+ SEM_INIT_LIB=-lposix4
+fi
+
+fi
+
+fi
+
+fi
+fi
+
+if test "$ac_cv_func_qsort_r" != no
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether qsort_r is GNU version" >&5
+printf %s "checking whether qsort_r is GNU version... " >&6; }
+if test ${e2_cv_gnu_qsort_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+void (qsort_r)(void *base, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *, void *),
+ void *arg);
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ e2_cv_gnu_qsort_r=yes
+else $as_nop
+ e2_cv_gnu_qsort_r=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $e2_cv_gnu_qsort_r" >&5
+printf "%s\n" "$e2_cv_gnu_qsort_r" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether qsort_r is BSD version" >&5
+printf %s "checking whether qsort_r is BSD version... " >&6; }
+if test ${e2_cv_bsd_qsort_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+void (qsort_r)(void *base, size_t nmemb, size_t size,
+ void *arg, int (*compar)(void *, const void *, const void *));
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ e2_cv_bsd_qsort_r=yes
+else $as_nop
+ e2_cv_bsd_qsort_r=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $e2_cv_bsd_qsort_r" >&5
+printf "%s\n" "$e2_cv_bsd_qsort_r" >&6; }
+ case "$e2_cv_gnu_qsort_r:$e2_cv_bsd_qsort_r" in #(
+ yes:no) :
+
+
+printf "%s\n" "#define HAVE_GNU_QSORT_R 1" >>confdefs.h
+
+ ;; #(
+ no:yes) :
+
+
+printf "%s\n" "#define HAVE_BSD_QSORT_R 1" >>confdefs.h
+
+ ;; #(
+ *) :
+ ;;
+esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unified diff option" >&5
+printf %s "checking for unified diff option... " >&6; }
+if diff -u $0 $0 > /dev/null 2>&1 ; then
+ UNI_DIFF_OPTS=-u
+else
+ UNI_DIFF_OPTS=-c
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UNI_DIFF_OPTS" >&5
+printf "%s\n" "$UNI_DIFF_OPTS" >&6; }
+
+case "$host_os" in
+linux*)
+
+printf "%s\n" "#define HAVE_EXT2_IOCTLS 1" >>confdefs.h
+
+ ;;
+esac
+
+ printf %s "checking for mount 'nosuid' option... "
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/mount.h>
+int
+main (void)
+{
+void *temp = (void *)(MS_NOSUID); (void) temp;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+printf "%s\n" "#define HAVE_MOUNT_NOSUID 1" >>confdefs.h
+
+ ac_cv_mount_nosuid=yes
+ printf "%s\n" "yes"
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/mount.h>
+int
+main (void)
+{
+void *temp = (void *)(MNT_NOSUID); (void) temp;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+printf "%s\n" "#define HAVE_MOUNT_NOSUID 1" >>confdefs.h
+
+ ac_cv_mount_nosuid=yes
+ printf "%s\n" "yes"
+else $as_nop
+ ac_cv_mount_nosuid=no
+ printf "%s\n" "no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+
+ printf %s "checking for mount 'nodev' option... "
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/mount.h>
+int
+main (void)
+{
+void *temp = (void *)(MS_NODEV); (void) temp;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+printf "%s\n" "#define HAVE_MOUNT_NODEV 1" >>confdefs.h
+
+ ac_cv_mount_nodev=yes
+ printf "%s\n" "yes"
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/mount.h>
+int
+main (void)
+{
+void *temp = (void *)(MNT_NODEV); (void) temp;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+printf "%s\n" "#define HAVE_MOUNT_NODEV 1" >>confdefs.h
+
+ ac_cv_mount_nodev=yes
+ printf "%s\n" "yes"
+else $as_nop
+ ac_cv_mount_nodev=no
+ printf "%s\n" "no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+# Check whether --enable-lto was given.
+if test ${enable_lto+y}
+then :
+ enableval=$enable_lto;
+else $as_nop
+ enable_lto=no
+fi
+
+if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports LTO" >&5
+printf %s "checking if C compiler supports LTO... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ LTO_FLAGS="-g -flto -ffat-lto-objects"
+ CFLAGS="$CFLAGS $LTO_FLAGS"
+ LDFLAGS="$LDFLAGS $LTO_FLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ lto_cflags=$LTO_FLAGS
+ lto_ldflags=$LTO_FLAGS
+ # Extract the first word of "gcc-ar", so it can be a program name with args.
+set dummy gcc-ar; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_gcc_ar+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $gcc_ar in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_gcc_ar="$gcc_ar" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_gcc_ar="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+gcc_ar=$ac_cv_path_gcc_ar
+if test -n "$gcc_ar"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_ar" >&5
+printf "%s\n" "$gcc_ar" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ # Extract the first word of "gcc-ranlib", so it can be a program name with args.
+set dummy gcc-ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_gcc_ranlib+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $gcc_ranlib in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_gcc_ranlib="$gcc_ranlib" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_gcc_ranlib="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+gcc_ranlib=$ac_cv_path_gcc_ranlib
+if test -n "$gcc_ranlib"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_ranlib" >&5
+printf "%s\n" "$gcc_ranlib" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -x "$gcc_ar" && test -x "$gcc_ranlib"; then
+ have_lto=yes
+ AR="${gcc_ar}"
+ RANLIB="${gcc_ranlib}"
+ fi
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+
+
+
+fi
+if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then
+ as_fn_error $? "LTO not supported by compiler." "$LINENO" 5
+fi
+# Check whether --enable-ubsan was given.
+if test ${enable_ubsan+y}
+then :
+ enableval=$enable_ubsan;
+else $as_nop
+ enable_ubsan=no
+fi
+
+if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports UBSAN" >&5
+printf %s "checking if C compiler supports UBSAN... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ UBSAN_FLAGS="-fsanitize=undefined"
+ CFLAGS="$CFLAGS $UBSAN_FLAGS"
+ LDFLAGS="$LDFLAGS $UBSAN_FLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ ubsan_cflags=$UBSAN_FLAGS
+ ubsan_ldflags=$UBSAN_FLAGS
+ have_ubsan=yes
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+
+
+
+fi
+if test "$enable_ubsan" = "yes" && test "$have_ubsan" != "yes"; then
+ as_fn_error $? "UBSAN not supported by compiler." "$LINENO" 5
+fi
+# Check whether --enable-addrsan was given.
+if test ${enable_addrsan+y}
+then :
+ enableval=$enable_addrsan;
+else $as_nop
+ enable_addrsan=no
+fi
+
+if test "$enable_addrsan" = "yes" || test "$enable_addrsan" = "probe"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports ADDRSAN" >&5
+printf %s "checking if C compiler supports ADDRSAN... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ ADDRSAN_FLAGS="-fsanitize=address"
+ CFLAGS="$CFLAGS $ADDRSAN_FLAGS"
+ LDFLAGS="$LDFLAGS $ADDRSAN_FLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ addrsan_cflags=$ADDRSAN_FLAGS
+ addrsan_ldflags=$ADDRSAN_FLAGS
+ have_addrsan=yes
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+
+
+
+fi
+if test "$enable_addrsan" = "yes" && test "$have_addrsan" != "yes"; then
+ as_fn_error $? "ADDRSAN not supported by compiler." "$LINENO" 5
+fi
+# Check whether --enable-threadsan was given.
+if test ${enable_threadsan+y}
+then :
+ enableval=$enable_threadsan;
+else $as_nop
+ enable_threadsan=no
+fi
+
+if test "$enable_threadsan" = "yes" || test "$enable_threadsan" = "probe"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports THREADSAN" >&5
+printf %s "checking if C compiler supports THREADSAN... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ THREADSAN_FLAGS="-fsanitize=thread"
+ CFLAGS="$CFLAGS $THREADSAN_FLAGS"
+ LDFLAGS="$LDFLAGS $THREADSAN_FLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ threadsan_cflags=$THREADSAN_FLAGS
+ threadsan_ldflags=$THREADSAN_FLAGS
+ have_threadsan=yes
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+
+
+
+fi
+if test "$enable_threadsan" = "yes" && test "$have_threadsan" != "yes"; then
+ as_fn_error $? "THREADSAN not supported by compiler." "$LINENO" 5
+fi
+if test "$have_threadsan" = "yes" && test "$have_addrsan" = "yes"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ADDRSAN and THREADSAN are not known to work together." >&5
+printf "%s\n" "$as_me: WARNING: ADDRSAN and THREADSAN are not known to work together." >&2;}
+fi
+FUZZING_CMT="#"
+# Check whether --enable-fuzzing was given.
+if test ${enable_fuzzing+y}
+then :
+ enableval=$enable_fuzzing;
+else $as_nop
+ enable_fuzzing=no
+fi
+
+if test "$enable_fuzzing" = "yes" || test "$enable_fuzzing" = "probe"; then
+
+
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+printf "%s\n" "$CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+printf "%s\n" "$ac_ct_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
+printf %s "checking whether the compiler supports GNU C++... " >&6; }
+if test ${ac_cv_cxx_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+y}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+printf %s "checking whether $CXX accepts -g... " >&6; }
+if test ${ac_cv_prog_cxx_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+else $as_nop
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
+if test $ac_test_CXXFLAGS; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_prog_cxx_stdcxx=no
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
+printf %s "checking for $CXX option to enable C++11 features... " >&6; }
+if test ${ac_cv_prog_cxx_cxx11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_cxx11=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx11_program
+_ACEOF
+for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx11"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
+ ac_prog_cxx_stdcxx=cxx11
+fi
+fi
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
+printf %s "checking for $CXX option to enable C++98 features... " >&6; }
+if test ${ac_cv_prog_cxx_cxx98+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_cxx98=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx98_program
+_ACEOF
+for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx98=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx98" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx98" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx98"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+ ac_prog_cxx_stdcxx=cxx98
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C compiler supports fuzzing sanitizer" >&5
+printf %s "checking if C compiler supports fuzzing sanitizer... " >&6; }
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ OLD_CXXFLAGS="$CXXFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ FUZZER_FLAGS="-fsanitize=fuzzer"
+ CXXFLAGS="$CXXFLAGS $FUZZER_FLAGS"
+ LDFLAGS="$LDFLAGS $FUZZER_FLAGS"
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stddef.h>
+ #include <stdint.h>
+
+int
+main (void)
+{
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fuzzer_cflags=$FUZZER_FLAGS
+ fuzzer_ldflags=$FUZZER_FLAGS
+ FUZZING_CMT=
+ have_fuzzer=yes
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "fuzzing requested but not available" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CXXFLAGS="${OLD_CXXFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+fi
+if test "$enable_fuzzer" = "yes" && test "$have_fuzzer" != "yes"; then
+ as_fn_error $? "Fuzzing not supported by compiler." "$LINENO" 5
+fi
+
+LINUX_CMT="#"
+CYGWIN_CMT="#"
+UNIX_CMT=
+case "$host_os" in
+linux*)
+ LINUX_CMT=
+ ;;
+cygwin)
+ CYGWIN_CMT=
+ UNIX_CMT="#"
+ ;;
+esac
+
+
+
+E2SCRUB_CMT="$LINUX_CMT"
+
+case "$host_os" in
+linux* | gnu* | k*bsd*-gnu)
+ if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
+ root_prefix="";
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: On $host_os systems, root_prefix defaults to ''" >&5
+printf "%s\n" "On $host_os systems, root_prefix defaults to ''" >&6; }
+ fi
+ ;;
+esac
+case "$host_os" in
+linux* | gnu* | k*bsd*-gnu)
+ if test "$prefix" = NONE ; then
+ prefix="/usr";
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: On $host_os systems, prefix defaults to /usr" >&5
+printf "%s\n" "On $host_os systems, prefix defaults to /usr" >&6; }
+ if test "$mandir" = '${prefix}/man' ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ...and mandir defaults to /usr/share/man" >&5
+printf "%s\n" "...and mandir defaults to /usr/share/man" >&6; }
+ mandir=/usr/share/man
+ fi
+ fi
+;;
+esac
+if test "$root_prefix" = NONE ; then
+ if test "$prefix" = NONE ; then
+ root_prefix="$ac_default_prefix"
+ else
+ root_prefix="$prefix"
+ fi
+ root_bindir=$bindir
+ root_sbindir=$sbindir
+ root_libdir=$libdir
+ root_sysconfdir=$sysconfdir
+else
+ root_bindir='${root_prefix}/bin'
+ root_sbindir='${root_prefix}/sbin'
+ root_libdir='${root_prefix}/lib'
+ root_sysconfdir='${root_prefix}/etc'
+fi
+if test "$bindir" != '${exec_prefix}/bin'; then
+ root_bindir=$bindir
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Setting root_bindir to $root_bindir" >&5
+printf "%s\n" "Setting root_bindir to $root_bindir" >&6; }
+fi
+if test "$sbindir" != '${exec_prefix}/sbin'; then
+ root_sbindir=$sbindir
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Setting root_sbindir to $root_sbindir" >&5
+printf "%s\n" "Setting root_sbindir to $root_sbindir" >&6; }
+fi
+if test "$libdir" != '${exec_prefix}/lib'; then
+ root_libdir=$libdir
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Setting root_libdir to $root_libdir" >&5
+printf "%s\n" "Setting root_libdir to $root_libdir" >&6; }
+fi
+if test "$sysconfdir" != '${prefix}/etc'; then
+ root_sysconfdir=$sysconfdir
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Setting root_sysconfdir to $root_sysconfdir" >&5
+printf "%s\n" "Setting root_sysconfdir to $root_sysconfdir" >&6; }
+fi
+
+
+
+
+
+
+# Check whether --with-multiarch was given.
+if test ${with_multiarch+y}
+then :
+ withval=$with_multiarch; if test "$withval" = "lib64"; then
+ libdir=/usr/lib64
+ root_libdir=/lib64
+else
+ libdir=$libdir/$withval
+ root_libdir=$root_libdir/$withval
+fi
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can link with -static" >&5
+printf %s "checking whether we can link with -static... " >&6; }
+if test ${ac_cv_e2fsprogs_use_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS_STATIC -static"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+fflush(stdout);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_e2fsprogs_use_static=yes
+else $as_nop
+ ac_cv_e2fsprogs_use_static=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LDFLAGS=$SAVE_LDFLAGS
+fi
+
+case "$host_os" in
+solaris2.*)
+ ac_cv_e2fsprogs_use_static=no
+;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_e2fsprogs_use_static" >&5
+printf "%s\n" "$ac_cv_e2fsprogs_use_static" >&6; }
+if test $ac_cv_e2fsprogs_use_static = yes; then
+ LDFLAGS_STATIC="$LDFLAGS_STATIC -static"
+fi
+
+case "$host_os" in
+darwin*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using Apple Darwin / GNU libintl workaround" >&5
+printf "%s\n" "Using Apple Darwin / GNU libintl workaround" >&6; }
+
+printf "%s\n" "#define _INTL_REDIRECT_MACROS 1" >>confdefs.h
+
+ ;;
+esac
+if test "$cross_compiling" = yes ; then
+ DO_TEST_SUITE=
+else
+ DO_TEST_SUITE=check
+fi
+
+INCLUDES='-I. -I$(top_builddir)/lib -I$(top_srcdir)/lib'
+if test -n "$CPPFLAGS" ; then
+ INCLUDES="$INCLUDES $CPPFLAGS"
+fi
+if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
+ INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl'
+fi
+if test -n "$WITH_DIET_LIBC" ; then
+ INCLUDES="$INCLUDES -D_REENTRANT"
+fi
+case "$host_os" in
+mingw*)
+ INCLUDES=$INCLUDES' -I$(top_srcdir)/include/mingw'
+ ;;
+esac
+
+if test $cross_compiling = no; then
+ BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
+ BUILD_LDFLAGS="$LDFLAGS"
+fi
+
+
+CFLAGS_SHLIB=${CFLAGS_SHLIB:-$CFLAGS}
+CFLAGS_STLIB=${CFLAGS_STLIB:-$CFLAGS}
+LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS}
+
+
+
+
+
+# Check whether --with-udev_rules_dir was given.
+if test ${with_udev_rules_dir+y}
+then :
+ withval=$with_udev_rules_dir;
+else $as_nop
+ with_udev_rules_dir=yes
+fi
+
+if test "x${with_udev_rules_dir}" != "xno"
+then :
+
+ if test "x${with_udev_rules_dir}" = "xyes"
+then :
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for udev" >&5
+printf %s "checking for udev... " >&6; }
+
+if test -n "$udev_CFLAGS"; then
+ pkg_cv_udev_CFLAGS="$udev_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"udev\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "udev") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_udev_CFLAGS=`$PKG_CONFIG --cflags "udev" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$udev_LIBS"; then
+ pkg_cv_udev_LIBS="$udev_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"udev\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "udev") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_udev_LIBS=`$PKG_CONFIG --libs "udev" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ udev_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "udev" 2>&1`
+ else
+ udev_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "udev" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$udev_PKG_ERRORS" >&5
+
+
+ with_udev_rules_dir=""
+
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+ with_udev_rules_dir=""
+
+else
+ udev_CFLAGS=$pkg_cv_udev_CFLAGS
+ udev_LIBS=$pkg_cv_udev_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+ with_udev_rules_dir="$($PKG_CONFIG --variable=udevdir udev)/rules.d"
+
+fi
+
+fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for udev rules dir" >&5
+printf %s "checking for udev rules dir... " >&6; }
+ pkg_udev_rules_dir="${with_udev_rules_dir}"
+ if test -n "${pkg_udev_rules_dir}"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${pkg_udev_rules_dir}" >&5
+printf "%s\n" "${pkg_udev_rules_dir}" >&6; }
+ have_udev="yes"
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ have_udev="no"
+
+fi
+
+else $as_nop
+
+ have_udev="disabled"
+
+fi
+
+
+
+
+# Check whether --with-crond_dir was given.
+if test ${with_crond_dir+y}
+then :
+ withval=$with_crond_dir;
+else $as_nop
+ with_crond_dir=yes
+fi
+
+if test "x${with_crond_dir}" != "xno"
+then :
+
+ if test "x${with_crond_dir}" = "xyes"
+then :
+
+ if test -d "/etc/cron.d"
+then :
+ with_crond_dir="/etc/cron.d"
+else $as_nop
+ have_crond="no"; with_crond_dir=""
+fi
+
+fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for system crontab dir" >&5
+printf %s "checking for system crontab dir... " >&6; }
+ crond_dir="${with_crond_dir}"
+ if test -n "${crond_dir}"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${crond_dir}" >&5
+printf "%s\n" "${crond_dir}" >&6; }
+ have_crond="yes"
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ have_crond="no"
+
+fi
+
+else $as_nop
+
+ have_crond="disabled"
+
+fi
+
+
+
+
+# Check whether --with-systemd_unit_dir was given.
+if test ${with_systemd_unit_dir+y}
+then :
+ withval=$with_systemd_unit_dir;
+else $as_nop
+ with_systemd_unit_dir=yes
+fi
+
+if test "x${with_systemd_unit_dir}" != "xno"
+then :
+
+ if test "x${with_systemd_unit_dir}" = "xyes"
+then :
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd" >&5
+printf %s "checking for systemd... " >&6; }
+
+if test -n "$systemd_CFLAGS"; then
+ pkg_cv_systemd_CFLAGS="$systemd_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "systemd") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_systemd_CFLAGS=`$PKG_CONFIG --cflags "systemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$systemd_LIBS"; then
+ pkg_cv_systemd_LIBS="$systemd_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "systemd") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_systemd_LIBS=`$PKG_CONFIG --libs "systemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ systemd_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "systemd" 2>&1`
+ else
+ systemd_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "systemd" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$systemd_PKG_ERRORS" >&5
+
+
+ with_systemd_unit_dir=""
+
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+ with_systemd_unit_dir=""
+
+else
+ systemd_CFLAGS=$pkg_cv_systemd_CFLAGS
+ systemd_LIBS=$pkg_cv_systemd_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+ with_systemd_unit_dir="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"
+
+fi
+
+
+fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd system unit dir" >&5
+printf %s "checking for systemd system unit dir... " >&6; }
+ systemd_system_unit_dir="${with_systemd_unit_dir}"
+ if test -n "${systemd_system_unit_dir}"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${systemd_system_unit_dir}" >&5
+printf "%s\n" "${systemd_system_unit_dir}" >&6; }
+ have_systemd="yes"
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ have_systemd="no"
+
+fi
+
+else $as_nop
+
+ have_systemd="disabled"
+
+fi
+
+
+OS_IO_FILE=""
+case "$host_os" in
+ mingw*)
+ OS_IO_FILE=windows_io
+ ;;
+ *)
+ OS_IO_FILE=unix_io
+ ;;
+esac
+
+
+# Check whether --enable-largefile was given.
+if test ${enable_largefile+y}
+then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+printf %s "checking for special C compiler options needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test ${ac_cv_sys_file_offset_bits+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test ${ac_cv_sys_large_files+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+printf "%s\n" "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+
+test -d lib || mkdir lib
+test -d include || mkdir include
+test -d include/linux || mkdir include/linux
+test -d include/asm || mkdir include/asm
+if test -z "$UUID_CMT" ; then
+ uuid_out_list="lib/uuid/Makefile lib/uuid/uuid.pc \
+ lib/uuid/uuid_types.h"
+fi
+if test -z "$BLKID_CMT" ; then
+ blkid_out_list="lib/blkid/Makefile lib/blkid/blkid.pc \
+ lib/blkid/blkid_types.h"
+fi
+for i in MCONFIG Makefile \
+ util/Makefile util/subst.conf util/gen-tarball util/install-symlink \
+ lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \
+ lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \
+ $uuid_out_list $blkid_out_list lib/support/Makefile \
+ lib/ss/ss.pc lib/et/com_err.pc lib/e2p/e2p.pc lib/ext2fs/ext2fs.pc \
+ misc/Makefile ext2ed/Makefile e2fsck/Makefile \
+ debugfs/Makefile tests/Makefile tests/progs/Makefile \
+ tests/fuzz/Makefile resize/Makefile doc/Makefile \
+ po/Makefile.in scrub/Makefile; do
+ if test -d `dirname ${srcdir}/$i` ; then
+ outlist="$outlist $i"
+ fi
+done
+ac_config_files="$ac_config_files $outlist"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config='$ac_cs_config_escaped'
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.71,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ printf "%s\n" "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ printf "%s\n" "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ printf "%s\n" "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ printf "%s\n" "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
+ OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h" ;;
+ "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+ "$outlist") CONFIG_FILES="$CONFIG_FILES $outlist" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
+ ac_cs_awk_getline=:
+ ac_cs_awk_pipe_init=
+ ac_cs_awk_read_file='
+ while ((getline aline < (F[key])) > 0)
+ print(aline)
+ close(F[key])'
+ ac_cs_awk_pipe_fini=
+else
+ ac_cs_awk_getline=false
+ ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
+ ac_cs_awk_read_file='
+ print "|#_!!_#|"
+ print "cat " F[key] " &&"
+ '$ac_cs_awk_pipe_init
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+fi
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+# Create commands to substitute file output variables.
+{
+ echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
+ echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
+ echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
+ echo "_ACAWK" &&
+ echo "_ACEOF"
+} >conf$$files.sh &&
+. ./conf$$files.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+rm -f conf$$files.sh
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+ \$ac_cs_awk_pipe_init
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+ if (nfields == 3 && !substed) {
+ key = field[2]
+ if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
+ \$ac_cs_awk_read_file
+ next
+ }
+ }
+ print line
+}
+\$ac_cs_awk_pipe_fini
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
+if $ac_cs_awk_getline; then
+ $AWK -f "$ac_tmp/subs.awk"
+else
+ $AWK -f "$ac_tmp/subs.awk" | $SHELL
+fi \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+ ;;
+
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "po-directories":C)
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ gt_tab=`printf '\t'`
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..017a96f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,1932 @@
+AC_INIT
+AC_CONFIG_SRCDIR([version.h])
+AC_PREREQ([2.71])
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_HEADERS([lib/config.h])
+AH_BOTTOM([#include <dirpaths.h>])
+AC_USE_SYSTEM_EXTENSIONS
+MCONFIG=./MCONFIG
+AC_SUBST_FILE(MCONFIG)
+BINARY_TYPE=bin
+dnl
+dnl This is to figure out the version number and the date....
+dnl
+E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
+ | awk '{print $3}' | tr \" " " | awk '{print $1}'`
+E2FSPROGS_DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
+ | tr \" " " | awk '{print $1}'`
+E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{print $1}' | sed -e '/^[[1-9]]$/s/^/0/')
+MONTH=`echo $E2FSPROGS_DATE | awk -F- '{print $2}'`
+YEAR=`echo $E2FSPROGS_DATE | awk -F- '{print $3}'`
+
+if expr $YEAR ">" 1900 > /dev/null ; then
+ E2FSPROGS_YEAR=$YEAR
+elif expr $YEAR ">" 90 >/dev/null ; then
+ E2FSPROGS_YEAR=19$YEAR
+else
+ E2FSPROGS_YEAR=20$YEAR
+fi
+
+case $MONTH in
+Jan) MONTH_NUM=01; E2FSPROGS_MONTH="January" ;;
+Feb) MONTH_NUM=02; E2FSPROGS_MONTH="February" ;;
+Mar) MONTH_NUM=03; E2FSPROGS_MONTH="March" ;;
+Apr) MONTH_NUM=04; E2FSPROGS_MONTH="April" ;;
+May) MONTH_NUM=05; E2FSPROGS_MONTH="May" ;;
+Jun) MONTH_NUM=06; E2FSPROGS_MONTH="June" ;;
+Jul) MONTH_NUM=07; E2FSPROGS_MONTH="July" ;;
+Aug) MONTH_NUM=08; E2FSPROGS_MONTH="August" ;;
+Sep) MONTH_NUM=09; E2FSPROGS_MONTH="September" ;;
+Oct) MONTH_NUM=10; E2FSPROGS_MONTH="October" ;;
+Nov) MONTH_NUM=11; E2FSPROGS_MONTH="November" ;;
+Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;;
+*) AC_MSG_WARN([Unknown month $MONTH??]) ;;
+esac
+
+base_ver=`echo $E2FSPROGS_VERSION | \
+ sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+
+date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY}
+
+case $E2FSPROGS_VERSION in
+*-WIP|pre-*)
+ E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec"
+ ;;
+*)
+ E2FSPROGS_PKGVER="$base_ver"
+ ;;
+esac
+
+unset DATE MONTH YEAR base_ver pre_vers date_spec
+AC_MSG_RESULT([Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION])
+AC_MSG_RESULT([Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}])
+AC_SUBST(E2FSPROGS_YEAR)
+AC_SUBST(E2FSPROGS_MONTH)
+AC_SUBST(E2FSPROGS_DAY)
+AC_SUBST(E2FSPROGS_VERSION)
+AC_SUBST(E2FSPROGS_PKGVER)
+AC_SUBST(E2FSPROGS_DATE)
+dnl
+dnl Use diet libc
+dnl
+WITH_DIET_LIBC=
+AC_ARG_WITH([diet-libc],
+AS_HELP_STRING([--with-diet-libc],[use diet libc]),
+CC="diet cc -nostdinc"
+WITH_DIET_LIBC=yes
+if test -z "$LIBS"
+then
+ LIBS="-lcompat"
+else
+ LIBS="$LIBS -lcompat"
+fi
+AC_MSG_RESULT(CC=$CC))dnl
+dnl
+AC_CANONICAL_HOST
+dnl
+dnl Check to see if libdl exists for the sake of dlopen
+dnl
+DLOPEN_LIB=''
+AC_CHECK_LIB(dl, dlopen,DLOPEN_LIB=-ldl)
+AC_SUBST(DLOPEN_LIB)
+dnl
+AC_ARG_WITH([cc],
+AS_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
+AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
+dnl
+AC_ARG_WITH([ccopts],
+AS_HELP_STRING([--with-ccopts],[no longer supported, use CFLAGS= instead]),
+AC_MSG_ERROR([--with-ccopts no longer supported; use CFLAGS= instead]))
+dnl
+AC_ARG_WITH([ldopts],
+AS_HELP_STRING([--with-ldopts],[no longer supported, use LDFLAGS= instead]),
+AC_MSG_ERROR([--with-ldopts no longer supported; use LDFLAGS= instead]))
+dnl
+AC_PROG_CC
+if test "$GCC" = yes; then
+ RDYNAMIC="-rdynamic"
+ AC_SUBST(RDYNAMIC)
+fi
+AC_PROG_CPP
+dnl
+dnl Alpha computers use fast and imprecise floating point code that may
+dnl miss exceptions by default. Force sane options if we're using GCC.
+AC_MSG_CHECKING(for additional special compiler flags)
+if test "$GCC" = yes
+then
+ case "$host_cpu" in
+ alpha) addcflags="-mieee" ;;
+ esac
+fi
+if test "x$addcflags" != x
+then
+ AC_MSG_RESULT($addcflags)
+ CFLAGS="$addcflags $CFLAGS"
+else
+ AC_MSG_RESULT([[(none)]])
+fi
+dnl
+dnl Set default values for library extensions. Will be dealt with after
+dnl parsing configuration options, which may modify these
+dnl
+LIB_EXT=.a
+STATIC_LIB_EXT=.a
+PROFILED_LIB_EXT=.a
+dnl
+dnl Allow separate `root_prefix' to be specified
+dnl
+AC_ARG_WITH([root-prefix],
+AS_HELP_STRING([--with-root-prefix=PREFIX],[override prefix variable for files to be placed in the root]),
+root_prefix=$withval,
+root_prefix=NONE)dnl
+dnl
+dnl handle --enable-maintainer-mode
+dnl
+AC_ARG_ENABLE([maintainer-mode],
+AS_HELP_STRING([--enable-maintainer-mode],[enable makefile rules useful for maintainers]),
+if test "$enableval" = "no"
+then
+ MAINTAINER_CMT=#
+ AC_MSG_RESULT([Disabling maintainer mode])
+else
+ MAINTAINER_CMT=
+ AC_MSG_RESULT([Enabling maintainer mode])
+fi
+,
+MAINTAINER_CMT=#
+AC_MSG_RESULT([Disabling maintainer mode by default])
+)
+AC_SUBST(MAINTAINER_CMT)
+dnl
+dnl handle --enable-symlink-install
+dnl
+AC_ARG_ENABLE([symlink-install],
+AS_HELP_STRING([--enable-symlink-install],[use symlinks when installing instead of hard links]),
+if test "$enableval" = "no"
+then
+ LINK_INSTALL_FLAGS=-f
+ AC_MSG_RESULT([Disabling symlinks for install])
+else
+ LINK_INSTALL_FLAGS=-sf
+ AC_MSG_RESULT([Enabling symlinks for install])
+fi
+,
+LINK_INSTALL_FLAGS=-f
+AC_MSG_RESULT([Disabling symlinks for install by default])
+)
+AC_SUBST(LINK_INSTALL_FLAGS)
+dnl
+dnl handle --enable-relative-symlinks
+dnl
+relative_symlink_defined=
+AC_ARG_ENABLE([relative-symlinks],
+AS_HELP_STRING([--enable-relative-symlinks],[use relative symlinks when installing]),
+if test "$enableval" = "no"
+then
+ SYMLINK_RELATIVE=
+ relative_symlink_defined=yes
+ AC_MSG_RESULT([Disabling relative symlinks for install])
+else
+ SYMLINK_RELATIVE=--relative
+ relative_symlink_defined=yes
+ AC_MSG_RESULT([Enabling relative symlinks for install])
+fi)
+AC_ARG_ENABLE([symlink-relative-symlinks],,
+if test "$enableval" = "no"
+then
+ SYMLINK_RELATIVE=yes
+ AC_MSG_RESULT([Disabling relative symlinks for install])
+else
+ SYMLINK_RELATIVE=--relative
+ AC_MSG_RESULT([Enabling relative symlinks for install])
+fi
+,
+if test -z "$relative_symlink_defined"
+then
+ SYMLINK_RELATIVE=
+AC_MSG_RESULT([Disabling relative symlinks for install by default])
+fi
+)
+AC_SUBST(SYMLINK_RELATIVE)
+dnl
+dnl handle --enable-symlink-build
+dnl
+AC_ARG_ENABLE([symlink-build],
+AS_HELP_STRING([--enable-symlink-build],[use symlinks while building instead of hard links]),
+if test "$enableval" = "no"
+then
+ LINK_BUILD_FLAGS=
+ AC_MSG_RESULT([Disabling symlinks for build])
+else
+ LINK_BUILD_FLAGS=-s
+ AC_MSG_RESULT([Enabling symlinks for build])
+fi
+,
+LINK_BUILD_FLAGS=
+AC_MSG_RESULT([Disabling symlinks for build by default])
+)
+AC_SUBST(LINK_BUILD_FLAGS)
+dnl
+dnl handle --enable-verbose-makecmds
+dnl
+AC_ARG_ENABLE([verbose-makecmds],
+AS_HELP_STRING([--enable-verbose-makecmds],[enable verbose make command output]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling verbose make commands])
+ E=@echo
+ ES=echo
+ Q=@
+else
+ AC_MSG_RESULT([Enabling verbose make commands])
+ E=@\\#
+ ES=\\#
+ Q=
+fi
+,
+AC_MSG_RESULT([Disabling verbose make commands])
+E=@echo
+ES=echo
+Q=@
+)
+AC_SUBST(E)
+AC_SUBST(ES)
+AC_SUBST(Q)
+dnl
+dnl This needs to be before all of the --enable-*-shlibs options
+dnl
+E2_PKG_CONFIG_STATIC=--static
+LDFLAG_DYNAMIC=
+PRIVATE_LIBS_CMT=
+dnl
+dnl handle --enable-elf-shlibs
+dnl
+AC_ARG_ENABLE([elf-shlibs],
+AS_HELP_STRING([--enable-elf-shlibs],[select ELF shared libraries]),
+if test "$enableval" = "no"
+then
+ ELF_CMT=#
+ MAKEFILE_ELF=/dev/null
+ AC_MSG_RESULT([Disabling ELF shared libraries])
+else
+ E2_PKG_CONFIG_STATIC=
+ ELF_CMT=
+ MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
+ [case "$host_os" in
+ solaris2.*)
+ MAKEFILE_ELF=$srcdir/lib/Makefile.solaris-lib
+ ;;
+ esac]
+ BINARY_TYPE=elfbin
+ LIB_EXT=.so
+ PRIVATE_LIBS_CMT=#
+ LDFLAG_DYNAMIC=['-Wl,-rpath-link,$(top_builddir)/lib']
+ AC_MSG_RESULT([Enabling ELF shared libraries])
+fi
+,
+MAKEFILE_ELF=/dev/null
+ELF_CMT=#
+AC_MSG_RESULT([Disabling ELF shared libraries by default])
+)
+AC_SUBST(ELF_CMT)
+AC_SUBST_FILE(MAKEFILE_ELF)
+dnl
+dnl handle --enable-bsd-shlibs
+dnl
+AC_ARG_ENABLE([bsd-shlibs],
+AS_HELP_STRING([--enable-bsd-shlibs],[select BSD shared libraries]),
+if test "$enableval" = "no"
+then
+ BSDLIB_CMT=#
+ MAKEFILE_BSDLIB=/dev/null
+ AC_MSG_RESULT([Disabling BSD shared libraries])
+else
+ E2_PKG_CONFIG_STATIC=
+ BSDLIB_CMT=
+ MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
+ LIB_EXT=.so
+ [case "$host_os" in
+ darwin*)
+ MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
+ LIB_EXT=.dylib
+ ;;
+ esac]
+ AC_MSG_RESULT([Enabling BSD shared libraries])
+fi
+,
+MAKEFILE_BSDLIB=/dev/null
+BSDLIB_CMT=#
+AC_MSG_RESULT([Disabling BSD shared libraries by default])
+)
+AC_SUBST(BSDLIB_CMT)
+AC_SUBST_FILE(MAKEFILE_BSDLIB)
+dnl
+dnl handle --enable-profile
+dnl
+AC_ARG_ENABLE([profile],
+AS_HELP_STRING([--enable-profile],[build profiling libraries]),
+if test "$enableval" = "no"
+then
+ PROFILE_CMT=#
+ MAKEFILE_PROFILE=/dev/null
+ AC_MSG_RESULT([Disabling profiling libraries])
+else
+ PROFILE_CMT=
+ MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
+ PROFILED_LIB_EXT=_p.a
+ AC_MSG_RESULT([Building profiling libraries])
+fi
+,
+PROFILE_CMT=#
+MAKEFILE_PROFILE=/dev/null
+AC_MSG_RESULT([Disabling profiling libraries by default])
+)
+AC_SUBST(PROFILE_CMT)
+AC_SUBST_FILE(MAKEFILE_PROFILE)
+dnl
+dnl handle --enable-gcov
+dnl
+AC_ARG_ENABLE([gcov],
+AS_HELP_STRING([--enable-gcov],[build for coverage testing using gcov]),
+if test "$enableval" = "yes"
+then
+ CFLAGS="-g -fprofile-arcs -ftest-coverage"
+ LDFLAGS="-fprofile-arcs -ftest-coverage"
+ AC_MSG_RESULT([Enabling gcov support])
+fi
+)
+dnl
+dnl handle --enable-hardening
+dnl
+CFLAGS_SHLIB="${CFLAGS_SHLIB:-$CFLAGS}"
+CFLAGS_STLIB="${CFLAGS_STLIB:-$CFLAGS}"
+LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS}
+LDFLAGS_STATIC=${LDFLAGS_STATIC:-$LDFLAGS}
+AC_ARG_ENABLE([hardening],
+AS_HELP_STRING([--enable-hardening],[build for coverage testing using gcov]),
+if test "$enableval" = "yes"
+then
+ HARDEN_CFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong"
+ HARDEN_LDFLAGS=["-Wl,-z,relro -Wl,-z,now"]
+ CFLAGS="$CFLAGS $HARDEN_CFLAGS -fPIE"
+ CFLAGS_SHLIB="$CFLAGS_SHLIB $HARDEN_CFLAGS"
+ CFLAGS_STLIB="$CFLAGS_STLIB $HARDEN_CFLAGS -fPIE"
+ LDFLAGS="$LDFLAGS $HARDEN_LDFLAGS -fPIE -pie"
+ LDFLAGS_STATIC="$LDFLAGS_STATIC $HARDEN_LDFLAGS"
+ LDFLAGS_SHLIB="$LDFLAGS_SHLIB $HARDEN_LDFLAGS"
+ AC_MSG_RESULT([Enabling hardening support])
+fi
+)
+dnl
+dnl Substitute library extensions
+dnl
+AC_SUBST(LIB_EXT)
+AC_SUBST(STATIC_LIB_EXT)
+AC_SUBST(PROFILED_LIB_EXT)
+AC_SUBST(LDFLAG_DYNAMIC)
+AC_SUBST(PRIVATE_LIBS_CMT)
+dnl
+dnl handle --enable-jbd-debug
+dnl
+AC_ARG_ENABLE([jbd-debug],
+AS_HELP_STRING([--enable-jbd-debug],[enable journal debugging]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling journal debugging])
+else
+ AC_DEFINE(CONFIG_JBD_DEBUG, 1,
+ [Define to 1 if debugging ext3/4 journal code])
+ AC_MSG_RESULT([Enabling journal debugging])
+fi
+,
+AC_MSG_RESULT([Disabling journal debugging by default])
+)
+dnl
+dnl handle --enable-blkid-debug
+dnl
+AC_ARG_ENABLE([blkid-debug],
+AS_HELP_STRING([--enable-blkid-debug],[enable blkid debugging]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling blkid debugging])
+else
+ AC_DEFINE(CONFIG_BLKID_DEBUG, 1,
+ [Define to 1 if debugging the blkid library])
+ AC_MSG_RESULT([Enabling blkid debugging])
+fi
+,
+AC_MSG_RESULT([Disabling blkid debugging by default])
+)
+dnl
+dnl handle --enable-testio-debug
+dnl
+AC_ARG_ENABLE([testio-debug],
+AS_HELP_STRING([--disable-testio-debug],[disable the use of the test I/O manager for debugging]),
+AH_TEMPLATE([CONFIG_TESTIO_DEBUG],
+ [Define to 1 if the testio I/O manager should be enabled])
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling testio debugging])
+ TEST_IO_CMT="#"
+else
+ TEST_IO_CMT=
+ AC_DEFINE(CONFIG_TESTIO_DEBUG, 1)
+ AC_MSG_RESULT([Enabling testio debugging])
+fi
+,
+AC_MSG_RESULT([Enabling testio debugging by default])
+AC_DEFINE(CONFIG_TESTIO_DEBUG, 1)
+TEST_IO_CMT=
+)
+AC_SUBST(TEST_IO_CMT)
+dnl
+dnl handle --enable-developer-features
+dnl
+AC_ARG_ENABLE([developer-features],
+AS_HELP_STRING([--enable-developer-features],[enable features for use by ext4 developers]),
+AH_TEMPLATE([CONFIG_DEVELOPER_FEATURES],
+ [Define to 1 for features for use by ext4 developers])
+if test "$enableval" = "yes"
+then
+ DEV_FEATURES_CMT=
+ AC_DEFINE(CONFIG_DEVELOPER_FEATURES, 1)
+ AC_MSG_RESULT([Enabling ext4 developer features])
+else
+ AC_MSG_RESULT([Disabling ext4 developer features])
+ DEV_FEATURES_CMT="#"
+fi
+,
+AC_MSG_RESULT([Disabling ext4 developer features by default])
+DEV_FEATURES_CMT=
+)
+AC_SUBST(DEV_FEATURES_CMT)
+dnl
+dnl handle --disable-libuuid
+dnl
+PKG_PROG_PKG_CONFIG
+LIBUUID=
+DEPLIBUUID=
+STATIC_LIBUUID=
+DEPSTATIC_LIBUUID=
+PROFILED_LIBUUID=
+DEPPROFILED_LIBUUID=
+UUID_CMT=
+AC_ARG_ENABLE([libuuid],
+AS_HELP_STRING([--enable-libuuid],[build and use private uuid library]),
+if test "$enableval" = "no"
+then
+ if test -z "$PKG_CONFIG"; then
+ AC_MSG_ERROR([pkg-config not installed; please install it.])
+ fi
+
+ AC_CHECK_LIB(uuid, uuid_generate,
+ [LIBUUID=`$PKG_CONFIG --libs uuid`;
+ STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`],
+ [AC_MSG_ERROR([external uuid library not found])])
+ PROFILED_LIBUUID=$LIBUUID
+ UUID_CMT=#
+ AC_MSG_RESULT([Disabling private uuid library])
+else
+ LIBUUID='$(LIB)/libuuid'$LIB_EXT
+ DEPLIBUUID=$LIBUUID
+ STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBUUID=$STATIC_LIBUUID
+ PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
+ AC_MSG_RESULT([Enabling private uuid library])
+fi
+,
+if test -n "$PKG_CONFIG"; then
+ AC_CHECK_LIB(uuid, uuid_generate,
+ [LIBUUID=`$PKG_CONFIG --libs uuid`;
+ STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`])
+fi
+if test -n "$LIBUUID"; then
+ PROFILED_LIBUUID=$LIBUUID
+ UUID_CMT=#
+ AC_MSG_RESULT([Using system uuid by default])
+else
+ LIBUUID='$(LIB)/libuuid'$LIB_EXT
+ DEPLIBUUID=$LIBUUID
+ STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBUUID=$STATIC_LIBUUID
+ PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
+ AC_MSG_RESULT([Enabling private uuid library by default])
+fi
+)
+AC_SUBST(LIBUUID)
+AC_SUBST(DEPLIBUUID)
+AC_SUBST(STATIC_LIBUUID)
+AC_SUBST(DEPSTATIC_LIBUUID)
+AC_SUBST(PROFILED_LIBUUID)
+AC_SUBST(DEPPROFILED_LIBUUID)
+AC_SUBST(UUID_CMT)
+dnl
+dnl handle --disable-libblkid
+dnl
+PKG_PROG_PKG_CONFIG
+LIBBLKID=
+DEPLIBBLKID=
+STATIC_LIBBLKID=
+DEPSTATIC_LIBBLKID=
+PROFILED_LIBBLKID=
+DEPPROFILED_LIBBLKID=
+BLKID_CMT=
+AH_TEMPLATE([CONFIG_BUILD_FINDFS], [Define to 1 to compile findfs])
+AC_ARG_ENABLE([libblkid],
+AS_HELP_STRING([--enable-libblkid],[build and use private blkid library]),
+if test "$enableval" = "no"
+then
+ if test -z "$PKG_CONFIG"; then
+ AC_MSG_ERROR([pkg-config not installed; please install it.])
+ fi
+
+ AC_CHECK_LIB(blkid, blkid_get_cache,
+ [LIBBLKID=`$PKG_CONFIG --libs blkid`;
+ STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
+ [AC_MSG_ERROR([external blkid library not found])], -luuid)
+ BLKID_CMT=#
+ PROFILED_LIBBLKID=$LIBBLKID
+ AC_MSG_RESULT([Disabling private blkid library])
+else
+ LIBBLKID='$(LIB)/libblkid'$LIB_EXT
+ DEPLIBBLKID=$LIBBLKID
+ STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
+ PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
+ AC_DEFINE(CONFIG_BUILD_FINDFS, 1)
+ AC_MSG_RESULT([Enabling private blkid library])
+fi
+,
+if test -n "$PKG_CONFIG"; then
+ AC_CHECK_LIB(blkid, blkid_get_cache,
+ [LIBBLKID=`$PKG_CONFIG --libs blkid`;
+ STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`])
+fi
+if test -n "$LIBBLKID"; then
+ BLKID_CMT=#
+ PROFILED_LIBBLKID=$LIBBLKID
+ AC_MSG_RESULT([Using system blkid library by default])
+else
+ LIBBLKID='$(LIB)/libblkid'$LIB_EXT
+ DEPLIBBLKID=$LIBBLKID
+ STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
+ PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
+ AC_DEFINE(CONFIG_BUILD_FINDFS, 1)
+ AC_MSG_RESULT([Enabling private blkid library by default])
+fi
+)
+AC_SUBST(LIBBLKID)
+AC_SUBST(DEPLIBBLKID)
+AC_SUBST(STATIC_LIBBLKID)
+AC_SUBST(DEPSTATIC_LIBBLKID)
+AC_SUBST(PROFILED_LIBBLKID)
+AC_SUBST(DEPPROFILED_LIBBLKID)
+AC_SUBST(BLKID_CMT)
+dnl
+dnl handle --enable-subset
+dnl
+ALL_CMT=
+SUBSET_CMT=
+AC_ARG_ENABLE([subset],
+AS_HELP_STRING([--enable-subset],[enable subset-only build]),
+if test "$enableval" = "no"
+then
+ SUBSET_CMT=#
+ AC_MSG_RESULT([Disabling subset-only build])
+else
+ ALL_CMT=#
+ AC_MSG_RESULT([Enabling subset-only-build])
+fi
+,)
+AC_SUBST(ALL_CMT)
+AC_SUBST(SUBSET_CMT)
+dnl
+dnl handle --disable-backtrace
+dnl
+AH_TEMPLATE([DISABLE_BACKTRACE], [Define to 1 to disable use of backtrace])
+AC_ARG_ENABLE([backtrace],
+AS_HELP_STRING([--disable-backtrace],[disable use backtrace]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling use of backtrace])
+ AC_DEFINE(DISABLE_BACKTRACE, 1)
+else
+ AC_MSG_RESULT([Enabling use of backtrace])
+fi
+,
+AC_MSG_RESULT([Enabling use of backtrace by default])
+)
+dnl
+dnl handle --enable-debugfs
+dnl
+AC_ARG_ENABLE([debugfs],
+AS_HELP_STRING([--disable-debugfs],[disable support of debugfs program]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling debugfs support])
+ DEBUGFS_CMT="#"
+else
+ DEBUGFS_CMT=
+ AC_MSG_RESULT([Enabling debugfs support])
+fi
+,
+AC_MSG_RESULT([Enabling debugfs support by default])
+DEBUGFS_CMT=
+)
+AC_SUBST(DEBUGFS_CMT)
+dnl
+dnl handle --enable-imager
+dnl
+AC_ARG_ENABLE([imager],
+AS_HELP_STRING([--disable-imager],[disable support of e2image program]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling e2image support])
+ IMAGER_CMT="#"
+else
+ IMAGER_CMT=
+ AC_MSG_RESULT([Enabling e2image support])
+fi
+,
+AC_MSG_RESULT([Enabling e2image support by default])
+IMAGER_CMT=
+)
+AC_SUBST(IMAGER_CMT)
+dnl
+dnl handle --enable-resizer
+dnl
+AC_ARG_ENABLE([resizer],
+AS_HELP_STRING([--disable-resizer],[disable support of e2resize program]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling e2resize support])
+ RESIZER_CMT="#"
+else
+ RESIZER_CMT=
+ AC_MSG_RESULT([Enabling e2resize support])
+fi
+,
+AC_MSG_RESULT([Enabling e2resize support by default])
+RESIZER_CMT=
+)
+AC_SUBST(RESIZER_CMT)
+dnl
+dnl handle --enable-defrag
+dnl
+AC_ARG_ENABLE([defrag],
+AS_HELP_STRING([--disable-defrag],[disable support of e4defrag program]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling e4defrag support])
+ DEFRAG_CMT="#"
+else
+ DEFRAG_CMT=
+ AC_MSG_RESULT([Enabling e4defrag support])
+fi
+,
+if test -z "$WITH_DIET_LIBC"
+then
+ AC_MSG_RESULT([Enabling e4defrag support by default])
+ DEFRAG_CMT=
+else
+ AC_MSG_RESULT([Disabling e4defrag support by default])
+ DEFRAG_CMT="#"
+fi
+)
+AC_SUBST(DEFRAG_CMT)
+dnl
+dnl See whether to install the `fsck' wrapper program (that calls e2fsck)
+dnl
+AC_ARG_ENABLE([fsck],
+AS_HELP_STRING([--enable-fsck],[build fsck wrapper program]),
+[if test "$enableval" = "no"
+then
+ FSCK_PROG='' FSCK_MAN=''
+ AC_MSG_RESULT([Not building fsck wrapper])
+else
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ AC_MSG_RESULT([Building fsck wrapper])
+fi]
+,
+[case "$host_os" in
+ gnu*)
+ FSCK_PROG='' FSCK_MAN=''
+ AC_MSG_RESULT([Not building fsck wrapper by default])
+ ;;
+ *)
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ AC_MSG_RESULT([Building fsck wrapper by default])
+esac]
+)
+AC_SUBST(FSCK_PROG)
+AC_SUBST(FSCK_MAN)
+dnl
+dnl See whether to install the `e2initrd-helper' program
+dnl
+AC_ARG_ENABLE([e2initrd-helper],
+AS_HELP_STRING([--enable-e2initrd-helper],[build e2initrd-helper program]),
+[if test "$enableval" = "no"
+then
+ E2INITRD_PROG='' E2INITRD_MAN=''
+ AC_MSG_RESULT([Not building e2initrd helper])
+else
+ E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
+ AC_MSG_RESULT([Building e2initrd helper])
+fi]
+,
+E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
+AC_MSG_RESULT([Building e2initrd helper by default])
+)
+AC_SUBST(E2INITRD_PROG)
+AC_SUBST(E2INITRD_MAN)
+dnl
+dnl
+dnl
+AC_ARG_ENABLE([tls],
+AS_HELP_STRING([--disable-tls],[disable use of thread local support]),
+[if test "$enableval" = "no"
+then
+ try_tls=""
+ AC_MSG_RESULT([Disabling thread local support])
+else
+ try_tls="yes"
+ AC_MSG_RESULT([Enabling thread local support])
+fi]
+,
+if test -n "$WITH_DIET_LIBC"
+then
+ try_tls=""
+ AC_MSG_RESULT([Diet libc does not support thread local support])
+else
+ try_tls="yes"
+ AC_MSG_RESULT([Try using thread local support by default])
+fi
+)
+if test "$try_tls" = "yes"
+then
+AX_TLS
+fi
+dnl
+dnl
+dnl
+AC_ARG_WITH([pthread],
+AS_HELP_STRING([--without-pthread],[disable use of pthread support]),
+[if test "$withval" = "no"
+then
+ try_pthread=""
+ AC_MSG_RESULT([Disabling pthread support])
+else
+ try_pthread="yes"
+ AC_MSG_RESULT([Testing for pthread support])
+fi]
+,
+try_pthread="yes"
+AC_MSG_RESULT([Try testing for pthread support by default])
+)
+if test "$try_pthread" = "yes"
+then
+AX_PTHREAD
+else
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+AC_SUBST([PTHREAD_CC])
+fi
+dnl
+dnl
+dnl
+AH_TEMPLATE([USE_UUIDD], [Define to 1 to build uuidd])
+AC_ARG_ENABLE([uuidd],
+AS_HELP_STRING([--disable-uuidd],[disable building the uuid daemon]),
+[if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Not building uuidd])
+ UUIDD_CMT="#"
+else
+ AC_DEFINE(USE_UUIDD, 1)
+ UUIDD_CMT=""
+ AC_MSG_RESULT([Building uuidd])
+fi]
+,
+AC_DEFINE(USE_UUIDD, 1)
+if test -z "$UUID_CMT"
+then
+ UUIDD_CMT=""
+ AC_MSG_RESULT([Building uuidd by default])
+else
+ UUIDD_CMT="#"
+ AC_MSG_RESULT([Disabling uuidd by default])
+fi
+)
+AC_SUBST(UUIDD_CMT)
+dnl
+dnl handle --disable-mmp
+dnl
+AH_TEMPLATE([CONFIG_MMP], [Define to 1 to enable mmp support])
+AC_ARG_ENABLE([mmp],
+AS_HELP_STRING([--disable-mmp],[disable support mmp, Multi Mount Protection]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling mmp support])
+else
+ AC_MSG_RESULT([Enabling mmp support])
+ AC_DEFINE(CONFIG_MMP, 1)
+fi
+,
+AC_MSG_RESULT([Enabling mmp support by default])
+AC_DEFINE(CONFIG_MMP, 1)
+)
+dnl
+dnl handle --disable-tdb
+dnl
+AH_TEMPLATE([CONFIG_TDB], [Define to 1 to enable tdb support])
+AC_ARG_ENABLE([tdb],
+AS_HELP_STRING([--disable-tdb],[disable tdb support]),
+[
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling tdb support])
+ CONFIG_TDB=0
+else
+ AC_MSG_RESULT([Enabling tdb support])
+ CONFIG_TDB=1
+fi
+]
+,
+[
+case "$host_os" in
+mingw*)
+ AC_MSG_RESULT([Disabling tdb support by default])
+ CONFIG_TDB=0
+ ;;
+*)
+ AC_MSG_RESULT([Enabling tdb support by default])
+ CONFIG_TDB=1
+ ;;
+esac
+]
+)
+if test "$CONFIG_TDB" = "1"
+then
+ AC_DEFINE(CONFIG_TDB, 1)
+ TDB_CMT=""
+ TDB_MAN_COMMENT=""
+else
+ TDB_CMT="#"
+ TDB_MAN_COMMENT='.\"'
+fi
+AC_SUBST(TDB_CMT)
+AC_SUBST(TDB_MAN_COMMENT)
+dnl
+dnl handle --disable-bmap-stats
+dnl
+AH_TEMPLATE([ENABLE_BMAP_STATS], [Define to 1 to enable bitmap stats.])
+AC_ARG_ENABLE([bmap-stats],
+AS_HELP_STRING([--disable-bmap-stats],[disable collection of bitmap stats]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling bitmap statistics support])
+else
+ AC_MSG_RESULT([Enabling bitmap statistics support])
+ AC_DEFINE(ENABLE_BMAP_STATS, 1)
+fi
+,
+AC_MSG_RESULT([Enabling bitmap statistics support by default])
+AC_DEFINE(ENABLE_BMAP_STATS, 1)
+)
+dnl
+dnl handle --enable-bmap-stats-ops
+dnl
+AH_TEMPLATE([ENABLE_BMAP_STATS_OPS], [Define to 1 to enable bitmap stats.])
+AC_ARG_ENABLE([bmap-stats-ops],
+AS_HELP_STRING([--enable-bmap-stats-ops],[enable collection of additional bitmap stats]),
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling additional bitmap statistics])
+else
+ dnl There has to be a better way!
+ AS_IF([test "x${enable_bmap_stats}" = "xno"],
+ AC_MSG_FAILURE([Error --enable-bmap-stats-ops requires bmap-stats]))
+
+ AC_MSG_RESULT([Enabling additional bitmap statistics])
+ AC_DEFINE(ENABLE_BMAP_STATS_OPS, 1)
+fi
+,
+AC_MSG_RESULT([Disabling additional bitmap statistics by default])
+)
+dnl
+dnl
+dnl
+MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
+AC_SUBST_FILE(MAKEFILE_LIBRARY)
+dnl
+dnl Add internationalization support, using gettext.
+dnl
+GETTEXT_PACKAGE=e2fsprogs
+PACKAGE=e2fsprogs
+VERSION="$E2FSPROGS_VERSION"
+VERSION=0.14.1
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [package name for gettext])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [version for gettext])
+AC_SUBST(GETTEXT_PACKAGE)
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+
+AM_GNU_GETTEXT([external])
+dnl
+dnl End of configuration options
+dnl
+AC_SUBST(BINARY_TYPE)
+AC_PROG_MAKE_SET
+CHECK_GNU_MAKE
+AC_PATH_PROG(LN, ln, ln)
+AC_PROG_MKDIR_P
+dnl
+dnl @mkdir_p@ is used by po's Makefile.in
+dnl
+mkdir_p=$MKDIR_P
+AC_SUBST(mkdir_p)
+AC_PROG_LN_S
+AC_PATH_PROG(MV, mv, mv)
+AC_PATH_PROG(CP, cp, cp)
+AC_PATH_PROG(RM, rm, rm)
+AC_PATH_PROG(CHMOD, chmod, :)
+AC_PROG_AWK
+AC_PROG_EGREP
+AC_PATH_PROG(SED, sed, sed)
+AC_PATH_PROG(PERL, perl, perl)
+AC_PATH_PROG(LDCONFIG, ldconfig, :)
+AC_CHECK_TOOL(AR, ar, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, )
+if test "_$MAKEINFO" = "_"; then
+ MAKEINFO="echo Makeinfo is missing. Info documentation will not be built."
+else
+ case "$MAKEINFO" in
+ */missing.*)
+ AC_MSG_WARN([
+*** Makeinfo is missing. Info documentation will not be built.])
+ ;;
+ *)
+ ;;
+ esac
+fi
+AC_SUBST(MAKEINFO)
+AC_PROG_INSTALL
+# See if we need a separate native compiler.
+if test $cross_compiling = no; then
+ BUILD_CC="$CC"
+ AC_SUBST(BUILD_CC)
+else
+ AC_CHECK_PROGS(BUILD_CC, gcc cc)
+fi
+AC_CHECK_HEADERS(m4_flatten([
+ dirent.h
+ errno.h
+ execinfo.h
+ getopt.h
+ malloc.h
+ mntent.h
+ paths.h
+ pthread.h
+ semaphore.h
+ setjmp.h
+ signal.h
+ stdarg.h
+ stdint.h
+ stdlib.h
+ termios.h
+ termio.h
+ unistd.h
+ utime.h
+ attr/xattr.h
+ linux/falloc.h
+ linux/fd.h
+ linux/fsmap.h
+ linux/major.h
+ linux/loop.h
+ linux/types.h
+ net/if_dl.h
+ netinet/in.h
+ sys/acl.h
+ sys/disklabel.h
+ sys/disk.h
+ sys/file.h
+ sys/ioctl.h
+ sys/key.h
+ sys/mkdev.h
+ sys/mman.h
+ sys/mount.h
+ sys/prctl.h
+ sys/random.h
+ sys/resource.h
+ sys/select.h
+ sys/socket.h
+ sys/sockio.h
+ sys/stat.h
+ sys/syscall.h
+ sys/sysmacros.h
+ sys/time.h
+ sys/types.h
+ sys/un.h
+ sys/wait.h
+ sys/xattr.h
+]))
+case "$host_os" in
+mingw*)
+ # The above checks only detect system headers, not the headers in
+ # ./include/mingw/, so explicitly define them to be available.
+ AC_DEFINE(HAVE_LINUX_TYPES_H, 1)
+ AC_DEFINE(HAVE_SYS_STAT_H, 1)
+ AC_DEFINE(HAVE_SYS_SYSMACROS_H, 1)
+ AC_DEFINE(HAVE_SYS_TYPES_H, 1)
+ AC_DEFINE(HAVE_UNISTD_H, 1)
+ ;;
+esac
+dnl Check where to find a dd(1) that supports iflag=fullblock
+dnl and oflag=append
+AC_MSG_CHECKING([for a dd(1) program that supports iflag=fullblock])
+DD=
+for i in dd gdd ; do
+ if "$i" if=/dev/null of=/dev/null count=1 bs=10k 2>/dev/null iflag=fullblock oflag=append ; then
+ DD=$i
+ break
+ fi
+done
+if test -n "$DD" ; then
+ AC_MSG_RESULT([$DD])
+else
+ AC_MSG_RESULT([not found, using dd])
+ DD=dd
+ AC_MSG_WARN([No GNU-compatible dd(1) program found, expect some self-test failures.])
+fi
+AC_SUBST([DD])
+
+AC_CHECK_HEADERS(net/if.h,,,
+[[
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+]])
+AC_FUNC_VPRINTF
+dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen
+dnl is not declared.
+AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT, 1,
+ [Define to 1 if dirent has d_reclen])],,
+ [#include <dirent.h>])
+AC_CHECK_MEMBERS([struct stat.st_atim])
+dnl Check to see if ssize_t was declared
+AC_CHECK_TYPE(ssize_t,[AC_DEFINE(HAVE_TYPE_SSIZE_T, 1,
+ [Define to 1 if ssize_t declared])],,
+ [#include <sys/types.h>])
+dnl
+dnl Check to see if llseek() is declared in unistd.h. On some libc's
+dnl it is, and on others it isn't..... Thank you glibc developers....
+dnl
+AC_CHECK_DECL(llseek,[AC_DEFINE(HAVE_LLSEEK_PROTOTYPE, 1,
+ [Define to 1 if llseek declared in unistd.h])],,
+ [#include <unistd.h>])
+dnl
+dnl Check to see if lseek64() is declared in unistd.h. Glibc's header files
+dnl are so convoluted that I can't tell whether it will always be defined,
+dnl and if it isn't defined while lseek64 is defined in the library,
+dnl disaster will strike.
+dnl
+dnl Warning! Use of --enable-gcc-wall may throw off this test.
+dnl
+dnl
+AC_CHECK_DECL(lseek64,[AC_DEFINE(HAVE_LSEEK64_PROTOTYPE, 1,
+ [Define to 1 if lseek64 declared in unistd.h])],,
+ [#define _LARGEFILE_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #include <unistd.h>])
+dnl
+dnl Word sizes...
+dnl
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(time_t)
+SIZEOF_SHORT=$ac_cv_sizeof_short
+SIZEOF_INT=$ac_cv_sizeof_int
+SIZEOF_LONG=$ac_cv_sizeof_long
+SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
+SIZEOF_OFF_T=$ac_cv_sizeof_off_t
+SIZEOF_TIME_T=$ac_cv_sizeof_time_t
+AC_SUBST(SIZEOF_SHORT)
+AC_SUBST(SIZEOF_INT)
+AC_SUBST(SIZEOF_LONG)
+AC_SUBST(SIZEOF_LONG_LONG)
+AC_SUBST(SIZEOF_OFF_T)
+AC_SUBST(SIZEOF_TIME_T)
+AC_C_BIGENDIAN
+if test $cross_compiling = no; then
+ BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+else
+ CROSS_COMPILE="1" BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+fi
+ASM_TYPES_HEADER=./asm_types.h
+AC_SUBST_FILE(ASM_TYPES_HEADER)
+dnl
+dnl Save the configuration #defines needed for the public ext2fs.h
+dnl header file
+dnl
+echo "/* These defines are needed for the public ext2fs.h header file */" \
+ > public_config.h
+if grep HAVE_SYS_TYPES_H confdefs.h > tmp_config.$$; then
+ uniq tmp_config.$$ >> public_config.h
+else
+ echo "#undef HAVE_SYS_TYPES_H" >> public_config.h
+fi
+if grep WORDS_BIGENDIAN confdefs.h > tmp_config.$$; then
+ uniq tmp_config.$$ >> public_config.h
+else
+ echo "#undef WORDS_BIGENDIAN" >> public_config.h
+fi
+rm -f tmp_config.$$
+PUBLIC_CONFIG_HEADER=./public_config.h
+AC_SUBST_FILE(PUBLIC_CONFIG_HEADER)
+dnl
+dnl See if we have inttypes.h and if intptr_t is defined
+dnl
+AC_CHECK_HEADERS([inttypes.h])
+AC_CHECK_TYPES(intptr_t)
+dnl
+dnl See if struct stat has a st_flags field, in which case we can get file
+dnl flags somewhat portably. Also check for the analogous setter, chflags().
+dnl
+AC_MSG_CHECKING(whether struct stat has a st_flags field)
+AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[struct stat stat; stat.st_flags = 0;]])],[e2fsprogs_cv_struct_st_flags=yes],[e2fsprogs_cv_struct_st_flags=no]))
+AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags)
+if test "$e2fsprogs_cv_struct_st_flags" = yes; then
+ AC_MSG_CHECKING(whether st_flags field is useful)
+ AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[struct stat stat; stat.st_flags |= UF_IMMUTABLE;]])],[e2fsprogs_cv_struct_st_flags_immut=yes],[e2fsprogs_cv_struct_st_flags_immut=no]))
+ AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut)
+ if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
+ AC_DEFINE(HAVE_STAT_FLAGS, 1,
+ [Define to 1 if struct stat has st_flags])
+ fi
+fi
+dnl
+dnl Check for the presence of SA_LEN
+dnl
+AC_CHECK_MEMBER(struct sockaddr.sa_len,
+ AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,
+ [Define to 1 if if struct sockaddr contains sa_len]),,
+ [#include <sys/types.h>
+ #include <sys/socket.h>])
+dnl
+dnl If we are using the system-provided blkid library, check for
+dnl the functions added after migrating that library to util-linux
+dnl
+if test -n "$BLKID_CMT"; then
+ AC_CHECK_LIB(blkid, blkid_probe_get_topology,
+ AC_DEFINE(HAVE_BLKID_PROBE_GET_TOPOLOGY, 1,
+ [Define to 1 if blkid has blkid_probe_get_topology]))
+ AC_CHECK_LIB(blkid, blkid_topology_get_dax,
+ AC_DEFINE(HAVE_BLKID_TOPOLOGY_GET_DAX, 1,
+ [Define to 1 if blkid has blkid_topology_get_dax]))
+ AC_CHECK_LIB(blkid, blkid_probe_enable_partitions,
+ AC_DEFINE(HAVE_BLKID_PROBE_ENABLE_PARTITIONS, 1,
+ [Define to 1 if blkid has blkid_probe_enable_partitions]))
+fi
+dnl
+if test -n "$DLOPEN_LIB" ; then
+ ac_cv_func_dlopen=yes
+fi
+AC_CHECK_FUNCS(m4_flatten([
+ __secure_getenv
+ add_key
+ backtrace
+ chflags
+ dlopen
+ fadvise64
+ fallocate
+ fallocate64
+ fchown
+ fcntl
+ fdatasync
+ fstat64
+ fsync
+ ftruncate64
+ futimes
+ getcwd
+ getdtablesize
+ getentropy
+ gethostname
+ getmntinfo
+ getpwuid_r
+ getrandom
+ getrlimit
+ getrusage
+ jrand48
+ keyctl
+ llistxattr
+ llseek
+ lseek64
+ mallinfo
+ mallinfo2
+ mbstowcs
+ memalign
+ mempcpy
+ mmap
+ msync
+ nanosleep
+ open64
+ pathconf
+ posix_fadvise
+ posix_fadvise64
+ posix_memalign
+ prctl
+ pread
+ pwrite
+ pread64
+ pwrite64
+ qsort_r
+ secure_getenv
+ setmntent
+ setresgid
+ setresuid
+ snprintf
+ srandom
+ stpcpy
+ strcasecmp
+ strdup
+ strnlen
+ strptime
+ strtoull
+ sync_file_range
+ sysconf
+ usleep
+ utime
+ utimes
+ valloc
+]))
+dnl
+dnl Check to see if -lsocket is required (solaris) to make something
+dnl that uses socket() to compile; this is needed for the UUID library
+dnl
+SOCKET_LIB=''
+AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
+AC_SUBST(SOCKET_LIB)
+dnl
+dnl See if libmagic exists
+dnl
+AC_CHECK_LIB(magic, magic_file, [MAGIC_LIB=-lmagic
+AC_CHECK_HEADERS([magic.h])])
+if test "$ac_cv_func_dlopen" = yes ; then
+ MAGIC_LIB=$DLOPEN_LIB
+fi
+AC_SUBST(MAGIC_LIB)
+dnl
+dnl Check to see if librt is required for clock_gettime() (glibc < 2.17)
+dnl
+AC_CHECK_LIB(rt, clock_gettime, [CLOCK_GETTIME_LIB=-lrt])
+AC_SUBST(CLOCK_GETTIME_LIB)
+dnl
+dnl Check to see if the FUSE library is -lfuse or -losxfuse
+dnl
+FUSE_CMT=
+FUSE_LIB=
+dnl osxfuse.dylib supersedes fuselib.dylib
+AC_ARG_ENABLE([fuse2fs],
+AS_HELP_STRING([--disable-fuse2fs],[do not build fuse2fs]),
+if test "$enableval" = "no"
+then
+ FUSE_CMT="#"
+ AC_MSG_RESULT([Disabling fuse2fs])
+else
+ AC_CHECK_HEADERS([pthread.h fuse.h], [],
+[AC_MSG_FAILURE([Cannot find fuse2fs headers.])],
+[#define _FILE_OFFSET_BITS 64
+#define FUSE_USE_VERSION 29])
+
+ AC_PREPROC_IFELSE(
+[AC_LANG_PROGRAM([[#define FUSE_USE_VERSION 29
+#ifdef __linux__
+#include <linux/fs.h>
+#include <linux/falloc.h>
+#include <linux/xattr.h>
+#endif
+]], [])], [], [AC_MSG_FAILURE([Cannot find fuse2fs Linux headers.])])
+
+ AC_CHECK_LIB(osxfuse, fuse_main, [FUSE_LIB=-losxfuse],
+ [AC_CHECK_LIB(fuse, fuse_main, [FUSE_LIB=-lfuse],
+ [AC_MSG_FAILURE([Cannot find fuse library.])])])
+ AC_MSG_RESULT([Enabling fuse2fs])
+fi
+,
+AC_CHECK_HEADERS([pthread.h fuse.h], [], [FUSE_CMT="#"],
+[#define _FILE_OFFSET_BITS 64
+#define FUSE_USE_VERSION 29
+#ifdef __linux__
+# include <linux/fs.h>
+# include <linux/falloc.h>
+# include <linux/xattr.h>
+#endif])
+if test -z "$FUSE_CMT"
+then
+ AC_CHECK_LIB(osxfuse, fuse_main, [FUSE_LIB=-losxfuse],
+[AC_CHECK_LIB(fuse, fuse_main, [FUSE_LIB=-lfuse], [FUSE_CMT="#"])])
+fi
+if test -z "$FUSE_CMT"
+then
+ AC_MSG_RESULT([Enabling fuse2fs by default.])
+fi
+)
+AC_SUBST(FUSE_LIB)
+AC_SUBST(FUSE_CMT)
+dnl
+dnl See if optreset exists
+dnl
+AC_MSG_CHECKING(for optreset)
+AC_CACHE_VAL(ac_cv_have_optreset,
+[AC_EGREP_HEADER(optreset, unistd.h,
+ ac_cv_have_optreset=yes, ac_cv_have_optreset=no)])dnl
+AC_MSG_RESULT($ac_cv_have_optreset)
+if test $ac_cv_have_optreset = yes; then
+ AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if optreset for getopt is present])
+fi
+dnl
+dnl Test for sem_init, and which library it might require:
+dnl
+AH_TEMPLATE([HAVE_SEM_INIT], [Define to 1 if sem_init() exists])
+SEM_INIT_LIB=''
+echo GL_THREADS_API: ${gl_threads_api}
+if test "${gl_threads_api}" != none
+then
+ AC_CHECK_FUNC(sem_init, ,
+ AC_CHECK_LIB(pthread, sem_init,
+ AC_DEFINE(HAVE_SEM_INIT, 1)
+ SEM_INIT_LIB=-lpthread,
+ AC_CHECK_LIB(rt, sem_init,
+ AC_DEFINE(HAVE_SEM_INIT, 1)
+ SEM_INIT_LIB=-lrt,
+ AC_CHECK_LIB(posix4, sem_init,
+ AC_DEFINE(HAVE_SEM_INIT, 1)
+ SEM_INIT_LIB=-lposix4))))dnl
+fi
+AC_SUBST(SEM_INIT_LIB)
+dnl
+dnl qsort_r detection
+dnl
+AS_IF([test "$ac_cv_func_qsort_r" != no], [
+ AC_CACHE_CHECK(whether qsort_r is GNU version, e2_cv_gnu_qsort_r,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+@%:@include <stdlib.h>
+void (qsort_r)(void *base, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *, void *),
+ void *arg);
+]], [[ ]])],[e2_cv_gnu_qsort_r=yes],[e2_cv_gnu_qsort_r=no])
+ ])
+ AC_CACHE_CHECK(whether qsort_r is BSD version, e2_cv_bsd_qsort_r,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+@%:@include <stdlib.h>
+void (qsort_r)(void *base, size_t nmemb, size_t size,
+ void *arg, int (*compar)(void *, const void *, const void *));
+]], [[ ]])],[e2_cv_bsd_qsort_r=yes],[e2_cv_bsd_qsort_r=no])
+ ])
+ AS_CASE("$e2_cv_gnu_qsort_r:$e2_cv_bsd_qsort_r",
+ [yes:no], [
+ AC_DEFINE(HAVE_GNU_QSORT_R, 1, [ Define to 1 if you have the GNU-style 'qsort_r' function.])
+ ],
+ [no:yes], [
+ AC_DEFINE(HAVE_BSD_QSORT_R, 1, [ Define to 1 if you have the BSD-style 'qsort_r' function.])
+ ])
+])
+dnl
+dnl Check for unified diff
+dnl
+AC_MSG_CHECKING(for unified diff option)
+if diff -u $0 $0 > /dev/null 2>&1 ; then
+ UNI_DIFF_OPTS=-u
+else
+ UNI_DIFF_OPTS=-c
+fi
+AC_MSG_RESULT($UNI_DIFF_OPTS)
+AC_SUBST(UNI_DIFF_OPTS)
+dnl
+dnl We use the EXT2 ioctls only under Linux
+dnl
+case "$host_os" in
+linux*)
+ AC_DEFINE(HAVE_EXT2_IOCTLS, 1, [Define to 1 if Ext2 ioctls present])
+ ;;
+esac
+dnl
+dnl Check the available mount options
+dnl
+AX_CHECK_MOUNT_OPT(nosuid)
+AX_CHECK_MOUNT_OPT(nodev)
+dnl Enable LTO for all packages
+dnl
+AC_ARG_ENABLE([lto],
+AS_HELP_STRING([--enable-lto],[enable link time optimization]),,
+enable_lto=no)
+if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then
+ AC_MSG_CHECKING([if C compiler supports LTO])
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ LTO_FLAGS="-g -flto -ffat-lto-objects"
+ CFLAGS="$CFLAGS $LTO_FLAGS"
+ LDFLAGS="$LDFLAGS $LTO_FLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])]
+ [lto_cflags=$LTO_FLAGS]
+ [lto_ldflags=$LTO_FLAGS]
+ [AC_PATH_PROG(gcc_ar, gcc-ar,,)]
+ [AC_PATH_PROG(gcc_ranlib, gcc-ranlib,,)],
+ [AC_MSG_RESULT([no])])
+ if test -x "$gcc_ar" && test -x "$gcc_ranlib"; then
+ have_lto=yes
+ AR="${gcc_ar}"
+ RANLIB="${gcc_ranlib}"
+ fi
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+ AC_SUBST(have_lto)
+ AC_SUBST(lto_cflags)
+ AC_SUBST(lto_ldflags)
+fi
+if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then
+ AC_MSG_ERROR([LTO not supported by compiler.])
+fi
+dnl
+dnl Enable UBSAN for all packages
+dnl
+AC_ARG_ENABLE([ubsan],
+AS_HELP_STRING([--enable-ubsan],[enable undefined behavior sanitizer]),,
+enable_ubsan=no)
+if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then
+ AC_MSG_CHECKING([if C compiler supports UBSAN])
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ UBSAN_FLAGS="-fsanitize=undefined"
+ CFLAGS="$CFLAGS $UBSAN_FLAGS"
+ LDFLAGS="$LDFLAGS $UBSAN_FLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])]
+ [ubsan_cflags=$UBSAN_FLAGS]
+ [ubsan_ldflags=$UBSAN_FLAGS]
+ [have_ubsan=yes],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+ AC_SUBST(have_ubsan)
+ AC_SUBST(ubsan_cflags)
+ AC_SUBST(ubsan_ldflags)
+fi
+if test "$enable_ubsan" = "yes" && test "$have_ubsan" != "yes"; then
+ AC_MSG_ERROR([UBSAN not supported by compiler.])
+fi
+dnl
+dnl Enable ADDRSAN for all packages
+dnl
+AC_ARG_ENABLE([addrsan],
+AS_HELP_STRING([--enable-addrsan],[enable address sanitizer]),,
+enable_addrsan=no)
+if test "$enable_addrsan" = "yes" || test "$enable_addrsan" = "probe"; then
+ AC_MSG_CHECKING([if C compiler supports ADDRSAN])
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ ADDRSAN_FLAGS="-fsanitize=address"
+ CFLAGS="$CFLAGS $ADDRSAN_FLAGS"
+ LDFLAGS="$LDFLAGS $ADDRSAN_FLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])]
+ [addrsan_cflags=$ADDRSAN_FLAGS]
+ [addrsan_ldflags=$ADDRSAN_FLAGS]
+ [have_addrsan=yes],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+ AC_SUBST(have_addrsan)
+ AC_SUBST(addrsan_cflags)
+ AC_SUBST(addrsan_ldflags)
+fi
+if test "$enable_addrsan" = "yes" && test "$have_addrsan" != "yes"; then
+ AC_MSG_ERROR([ADDRSAN not supported by compiler.])
+fi
+dnl
+dnl Enable THREADSAN for all packages
+dnl
+AC_ARG_ENABLE([threadsan],
+AS_HELP_STRING([--enable-threadsan],[enable thread sanitizer]),,
+enable_threadsan=no)
+if test "$enable_threadsan" = "yes" || test "$enable_threadsan" = "probe"; then
+ AC_MSG_CHECKING([if C compiler supports THREADSAN])
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ THREADSAN_FLAGS="-fsanitize=thread"
+ CFLAGS="$CFLAGS $THREADSAN_FLAGS"
+ LDFLAGS="$LDFLAGS $THREADSAN_FLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])]
+ [threadsan_cflags=$THREADSAN_FLAGS]
+ [threadsan_ldflags=$THREADSAN_FLAGS]
+ [have_threadsan=yes],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="${OLD_CFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+ AC_SUBST(have_threadsan)
+ AC_SUBST(threadsan_cflags)
+ AC_SUBST(threadsan_ldflags)
+fi
+if test "$enable_threadsan" = "yes" && test "$have_threadsan" != "yes"; then
+ AC_MSG_ERROR([THREADSAN not supported by compiler.])
+fi
+if test "$have_threadsan" = "yes" && test "$have_addrsan" = "yes"; then
+ AC_MSG_WARN([ADDRSAN and THREADSAN are not known to work together.])
+fi
+dnl
+dnl Enable the fuzzer sanitizer for all packages
+dnl
+FUZZING_CMT="#"
+AC_ARG_ENABLE([fuzzing],
+AS_HELP_STRING([--enable-fuzzing],[enable fuzzing sanitizer]),,
+enable_fuzzing=no)
+if test "$enable_fuzzing" = "yes" || test "$enable_fuzzing" = "probe"; then
+ AC_PROG_CXX
+ AC_MSG_CHECKING([if C compiler supports fuzzing sanitizer])
+ AC_LANG_PUSH([C++])
+ OLD_CXXFLAGS="$CXXFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ FUZZER_FLAGS="-fsanitize=fuzzer"
+ CXXFLAGS="$CXXFLAGS $FUZZER_FLAGS"
+ LDFLAGS="$LDFLAGS $FUZZER_FLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stddef.h>
+ #include <stdint.h>
+ ]],
+ [ return 0; ])],
+ [AC_MSG_RESULT([yes])]
+ [fuzzer_cflags=$FUZZER_FLAGS]
+ [fuzzer_ldflags=$FUZZER_FLAGS]
+ [FUZZING_CMT=]
+ [have_fuzzer=yes],
+ [AC_MSG_RESULT([no])]
+ [AC_MSG_ERROR([fuzzing requested but not available])])
+ CXXFLAGS="${OLD_CXXFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+ AC_LANG_POP([C++])
+ AC_SUBST(have_fuzzer)
+ AC_SUBST(fuzzer_cflags)
+ AC_SUBST(fuzzer_ldflags)
+fi
+if test "$enable_fuzzer" = "yes" && test "$have_fuzzer" != "yes"; then
+ AC_MSG_ERROR([Fuzzing not supported by compiler.])
+fi
+AC_SUBST(FUZZING_CMT)
+dnl
+dnl OS-specific uncomment control
+dnl
+LINUX_CMT="#"
+CYGWIN_CMT="#"
+UNIX_CMT=
+case "$host_os" in
+linux*)
+ LINUX_CMT=
+ ;;
+cygwin)
+ CYGWIN_CMT=
+ UNIX_CMT="#"
+ ;;
+esac
+AC_SUBST(LINUX_CMT)
+AC_SUBST(CYGWIN_CMT)
+AC_SUBST(UNIX_CMT)
+dnl
+dnl e2scrub only builds on linux
+dnl
+E2SCRUB_CMT="$LINUX_CMT"
+AC_SUBST(E2SCRUB_CMT)
+dnl
+dnl Linux and Hurd places root files in the / by default
+dnl
+case "$host_os" in
+linux* | gnu* | k*bsd*-gnu)
+ if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
+ root_prefix="";
+ AC_MSG_RESULT([On $host_os systems, root_prefix defaults to ''])
+ fi
+ ;;
+esac
+dnl
+dnl On Linux/hurd, force the prefix to be /usr
+dnl
+case "$host_os" in
+linux* | gnu* | k*bsd*-gnu)
+ if test "$prefix" = NONE ; then
+ prefix="/usr";
+ AC_MSG_RESULT([On $host_os systems, prefix defaults to /usr])
+ if test "$mandir" = '${prefix}/man' ; then
+ AC_MSG_RESULT([...and mandir defaults to /usr/share/man])
+ mandir=/usr/share/man
+ fi
+ fi
+;;
+esac
+if test "$root_prefix" = NONE ; then
+ if test "$prefix" = NONE ; then
+ root_prefix="$ac_default_prefix"
+ else
+ root_prefix="$prefix"
+ fi
+ root_bindir=$bindir
+ root_sbindir=$sbindir
+ root_libdir=$libdir
+ root_sysconfdir=$sysconfdir
+else
+ root_bindir='${root_prefix}/bin'
+ root_sbindir='${root_prefix}/sbin'
+ root_libdir='${root_prefix}/lib'
+ root_sysconfdir='${root_prefix}/etc'
+fi
+if test "$bindir" != '${exec_prefix}/bin'; then
+ root_bindir=$bindir
+ AC_MSG_RESULT([Setting root_bindir to $root_bindir])
+fi
+if test "$sbindir" != '${exec_prefix}/sbin'; then
+ root_sbindir=$sbindir
+ AC_MSG_RESULT([Setting root_sbindir to $root_sbindir])
+fi
+if test "$libdir" != '${exec_prefix}/lib'; then
+ root_libdir=$libdir
+ AC_MSG_RESULT([Setting root_libdir to $root_libdir])
+fi
+if test "$sysconfdir" != '${prefix}/etc'; then
+ root_sysconfdir=$sysconfdir
+ AC_MSG_RESULT([Setting root_sysconfdir to $root_sysconfdir])
+fi
+AC_SUBST(root_prefix)
+AC_SUBST(root_bindir)
+AC_SUBST(root_sbindir)
+AC_SUBST(root_libdir)
+AC_SUBST(root_sysconfdir)
+dnl
+dnl Allow specification of the multiarch arch
+dnl
+AC_ARG_WITH([multiarch],
+AS_HELP_STRING([--with-multiarch=ARCH],[specify the multiarch triplet]),
+if test "$withval" = "lib64"; then
+ libdir=/usr/lib64
+ root_libdir=/lib64
+else
+ libdir=$libdir/$withval
+ root_libdir=$root_libdir/$withval
+fi
+)
+dnl
+dnl
+dnl See if -static works. This could fail if the linker does not
+dnl support -static, or if required external libraries are not available
+dnl in static form.
+dnl
+AC_MSG_CHECKING([whether we can link with -static])
+AC_CACHE_VAL(ac_cv_e2fsprogs_use_static,
+[SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS_STATIC -static"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(stdout);]])],[ac_cv_e2fsprogs_use_static=yes],[ac_cv_e2fsprogs_use_static=no])
+LDFLAGS=$SAVE_LDFLAGS])
+dnl
+dnl Regardless of how the test turns out, Solaris doesn't handle -static
+dnl This is caused by the socket library requiring the nsl library, which
+dnl requires the -dl library, which only works for dynamically linked
+dnl programs. It basically means you can't have statically linked programs
+dnl which use the network under Solaris.
+dnl
+case "$host_os" in
+solaris2.*)
+ ac_cv_e2fsprogs_use_static=no
+;;
+esac
+AC_MSG_RESULT($ac_cv_e2fsprogs_use_static)
+if test $ac_cv_e2fsprogs_use_static = yes; then
+ LDFLAGS_STATIC="$LDFLAGS_STATIC -static"
+fi
+AC_SUBST(LDFLAGS_STATIC)
+dnl
+dnl Work around mysterious Darwin / GNU libintl problem
+dnl (__asm__ redirection doesn't work for some mysterious reason. Looks like
+dnl Apple hacked gcc somehow?)
+dnl
+case "$host_os" in
+darwin*)
+ AC_MSG_RESULT([Using Apple Darwin / GNU libintl workaround])
+ AC_DEFINE(_INTL_REDIRECT_MACROS, 1,
+ [Define to 1 if Apple Darwin libintl workaround is needed])
+ ;;
+esac
+dnl
+dnl Only try to run the test suite if we're not cross compiling.
+dnl
+if test "$cross_compiling" = yes ; then
+ DO_TEST_SUITE=
+else
+ DO_TEST_SUITE=check
+fi
+AC_SUBST(DO_TEST_SUITE)
+dnl
+dnl Only include the intl include files if we're building with them
+dnl
+INCLUDES='-I. -I$(top_builddir)/lib -I$(top_srcdir)/lib'
+if test -n "$CPPFLAGS" ; then
+ INCLUDES="$INCLUDES $CPPFLAGS"
+fi
+if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
+ INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl'
+fi
+if test -n "$WITH_DIET_LIBC" ; then
+ INCLUDES="$INCLUDES -D_REENTRANT"
+fi
+case "$host_os" in
+mingw*)
+ INCLUDES=$INCLUDES' -I$(top_srcdir)/include/mingw'
+ ;;
+esac
+AC_SUBST(INCLUDES)
+dnl
+dnl Build CFLAGS
+dnl
+if test $cross_compiling = no; then
+ BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
+ BUILD_LDFLAGS="$LDFLAGS"
+fi
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+dnl
+dnl Define CFLAGS and LDFLAGS for shared libraries
+dnl
+CFLAGS_SHLIB=${CFLAGS_SHLIB:-$CFLAGS}
+CFLAGS_STLIB=${CFLAGS_STLIB:-$CFLAGS}
+LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS}
+AC_SUBST(CFLAGS_SHLIB)
+AC_SUBST(CFLAGS_STLIB)
+AC_SUBST(LDFLAGS_SHLIB)
+
+dnl
+dnl Where do udev rules go?
+dnl
+AC_ARG_WITH([udev_rules_dir],
+ [AS_HELP_STRING([--with-udev-rules-dir@<:@=DIR@:>@],
+ [Install udev rules into DIR.])],
+ [],
+ [with_udev_rules_dir=yes])
+AS_IF([test "x${with_udev_rules_dir}" != "xno"],
+ [
+ AS_IF([test "x${with_udev_rules_dir}" = "xyes"],
+ [
+ PKG_CHECK_MODULES([udev], [udev],
+ [
+ with_udev_rules_dir="$($PKG_CONFIG --variable=udevdir udev)/rules.d"
+ ], [
+ with_udev_rules_dir=""
+ ])
+ ])
+ AC_MSG_CHECKING([for udev rules dir])
+ pkg_udev_rules_dir="${with_udev_rules_dir}"
+ AS_IF([test -n "${pkg_udev_rules_dir}"],
+ [
+ AC_MSG_RESULT(${pkg_udev_rules_dir})
+ have_udev="yes"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ have_udev="no"
+ ])
+ ],
+ [
+ have_udev="disabled"
+ ])
+AC_SUBST(have_udev)
+AC_SUBST(pkg_udev_rules_dir)
+
+dnl
+dnl Where do cron jobs go?
+dnl
+AC_ARG_WITH([crond_dir],
+ [AS_HELP_STRING([--with-crond-dir@<:@=DIR@:>@],
+ [Install system crontabs into DIR.])],
+ [],
+ [with_crond_dir=yes])
+AS_IF([test "x${with_crond_dir}" != "xno"],
+ [
+ AS_IF([test "x${with_crond_dir}" = "xyes"],
+ [
+ AS_IF([test -d "/etc/cron.d"],
+ [with_crond_dir="/etc/cron.d"],
+ [have_crond="no"; with_crond_dir=""])
+ ])
+ AC_MSG_CHECKING([for system crontab dir])
+ crond_dir="${with_crond_dir}"
+ AS_IF([test -n "${crond_dir}"],
+ [
+ AC_MSG_RESULT(${crond_dir})
+ have_crond="yes"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ have_crond="no"
+ ])
+ ],
+ [
+ have_crond="disabled"
+ ])
+AC_SUBST(have_crond)
+AC_SUBST(crond_dir)
+
+dnl
+dnl Where do systemd services go?
+dnl
+AC_ARG_WITH([systemd_unit_dir],
+ [AS_HELP_STRING([--with-systemd-unit-dir@<:@=DIR@:>@],
+ [Install systemd system units into DIR.])],
+ [],
+ [with_systemd_unit_dir=yes])
+AS_IF([test "x${with_systemd_unit_dir}" != "xno"],
+ [
+ AS_IF([test "x${with_systemd_unit_dir}" = "xyes"],
+ [
+ PKG_CHECK_MODULES([systemd], [systemd],
+ [
+ with_systemd_unit_dir="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"
+ ], [
+ with_systemd_unit_dir=""
+ ])
+ m4_pattern_allow([^PKG_(MAJOR|MINOR|BUILD|REVISION)$])
+ ])
+ AC_MSG_CHECKING([for systemd system unit dir])
+ systemd_system_unit_dir="${with_systemd_unit_dir}"
+ AS_IF([test -n "${systemd_system_unit_dir}"],
+ [
+ AC_MSG_RESULT(${systemd_system_unit_dir})
+ have_systemd="yes"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ have_systemd="no"
+ ])
+ ],
+ [
+ have_systemd="disabled"
+ ])
+AC_SUBST(have_systemd)
+AC_SUBST(systemd_system_unit_dir)
+dnl Adjust the compiled files if we are on windows vs everywhere else
+dnl
+OS_IO_FILE=""
+[case "$host_os" in
+ mingw*)
+ OS_IO_FILE=windows_io
+ ;;
+ *)
+ OS_IO_FILE=unix_io
+ ;;
+esac]
+AC_SUBST(OS_IO_FILE)
+
+AC_SYS_LARGEFILE
+
+dnl
+dnl Make our output files, being sure that we create the some miscellaneous
+dnl directories
+dnl
+test -d lib || mkdir lib
+test -d include || mkdir include
+test -d include/linux || mkdir include/linux
+test -d include/asm || mkdir include/asm
+if test -z "$UUID_CMT" ; then
+ uuid_out_list="lib/uuid/Makefile lib/uuid/uuid.pc \
+ lib/uuid/uuid_types.h"
+fi
+if test -z "$BLKID_CMT" ; then
+ blkid_out_list="lib/blkid/Makefile lib/blkid/blkid.pc \
+ lib/blkid/blkid_types.h"
+fi
+for i in MCONFIG Makefile \
+ util/Makefile util/subst.conf util/gen-tarball util/install-symlink \
+ lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \
+ lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \
+ $uuid_out_list $blkid_out_list lib/support/Makefile \
+ lib/ss/ss.pc lib/et/com_err.pc lib/e2p/e2p.pc lib/ext2fs/ext2fs.pc \
+ misc/Makefile ext2ed/Makefile e2fsck/Makefile \
+ debugfs/Makefile tests/Makefile tests/progs/Makefile \
+ tests/fuzz/Makefile resize/Makefile doc/Makefile \
+ po/Makefile.in scrub/Makefile; do
+ if test -d `dirname ${srcdir}/$i` ; then
+ outlist="$outlist $i"
+ fi
+done
+AC_CONFIG_FILES([$outlist])
+AC_OUTPUT
+if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi
diff --git a/contrib/Android.bp b/contrib/Android.bp
new file mode 100644
index 0000000..7f9cfe9
--- /dev/null
+++ b/contrib/Android.bp
@@ -0,0 +1,28 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ // SPDX-license-identifier-GPL
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+subdirs = ["android"]
+
+//########################################################################
+// Build add_ext4_encrypt
+
+cc_binary {
+ name: "add_ext4_encrypt",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["add_ext4_encrypt.c"],
+ shared_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ ],
+}
diff --git a/contrib/add_ext4_encrypt.c b/contrib/add_ext4_encrypt.c
new file mode 100644
index 0000000..133fe25
--- /dev/null
+++ b/contrib/add_ext4_encrypt.c
@@ -0,0 +1,64 @@
+/*
+ * Basic program to add ext4 encryption to a file system
+ *
+ * Copyright 2015, Google, Inc.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include <ext2fs/ext2_fs.h>
+#include <ext2fs/ext2fs.h>
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0;
+ ext2_filsys fs;
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ initialize_ext2_error_table();
+
+ if (argc != 2) {
+ fprintf(stderr, "%s: Usage <device|filesystem>\n", argv[0]);
+ exit(1);
+ }
+
+ retval = ext2fs_open(argv[1], EXT2_FLAG_RW, 0, 0,
+ unix_io_manager, &fs);
+
+ if (retval) {
+ com_err(argv[0], retval, "while trying to open '%s'",
+ argv[1]);
+ exit(1);
+ }
+ if (!ext2fs_has_feature_encrypt(fs->super)) {
+ ext2fs_set_feature_encrypt(fs->super);
+ fs->super->s_encrypt_algos[0] =
+ EXT4_ENCRYPTION_MODE_AES_256_XTS;
+ fs->super->s_encrypt_algos[1] =
+ EXT4_ENCRYPTION_MODE_AES_256_CTS;
+ ext2fs_mark_super_dirty(fs);
+ printf("Ext4 encryption enabled on %s\n", argv[1]);
+ } else
+ printf("Ext4 encryption already enabled on %s\n", argv[1]);
+
+ retval = ext2fs_close(fs);
+ if (retval) {
+ com_err(argv[0], retval, "while trying to close '%s'",
+ argv[1]);
+ exit(1);
+ }
+ return (0);
+}
+
diff --git a/contrib/android/Android.bp b/contrib/android/Android.bp
new file mode 100644
index 0000000..6c9dd5c
--- /dev/null
+++ b/contrib/android/Android.bp
@@ -0,0 +1,78 @@
+// Copyright 2017 The Android Open Source Project
+
+//##########################################################################
+// Build e2fsdroid
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_binary {
+ name: "e2fsdroid",
+ host_supported: true,
+ recovery_available: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: [
+ "e2fsdroid.c",
+ "block_range.c",
+ "fsmap.c",
+ "block_list.c",
+ "base_fs.c",
+ "perms.c",
+ "basefs_allocator.c",
+ ],
+ target: {
+ host: {
+ static_libs: [
+ "libext2_com_err",
+ "libext2_misc",
+ "libext2fs",
+ "libsparse",
+ "libz",
+ "libcutils",
+ "libbase",
+ "libselinux",
+ "libcrypto",
+ "liblog",
+ ],
+ },
+ android: {
+ static_libs: [
+ "libbase",
+ ],
+ shared_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ "libext2_misc",
+ "libcutils",
+ "liblog",
+ "libselinux",
+ "libcrypto",
+ ],
+ },
+ },
+ stl: "libc++_static",
+}
+
+//##########################################################################
+// Build ext2simg
+
+cc_binary {
+ name: "ext2simg",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["ext2simg.c"],
+ shared_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ "libsparse",
+ "libz",
+ ],
+}
diff --git a/contrib/android/base_fs.c b/contrib/android/base_fs.c
new file mode 100644
index 0000000..d3e00d1
--- /dev/null
+++ b/contrib/android/base_fs.c
@@ -0,0 +1,211 @@
+#include "base_fs.h"
+#include <stdio.h>
+
+#define BASE_FS_VERSION "Base EXT4 version 1.0"
+
+struct base_fs {
+ FILE *file;
+ const char *mountpoint;
+ struct basefs_entry entry;
+};
+
+static FILE *basefs_open(const char *file)
+{
+ char *line = NULL;
+ size_t len;
+ FILE *f = fopen(file, "r");
+ if (!f)
+ return NULL;
+
+ if (getline(&line, &len, f) == -1 || !line)
+ goto err_getline;
+
+ if (strncmp(line, BASE_FS_VERSION, strlen(BASE_FS_VERSION)))
+ goto err_header;
+
+ free(line);
+ return f;
+
+err_header:
+ free(line);
+err_getline:
+ fclose(f);
+ return NULL;
+}
+
+static struct basefs_entry *basefs_readline(FILE *f, const char *mountpoint,
+ int *err)
+{
+ char *line = NULL, *saveptr1, *saveptr2, *block_range, *block;
+ int offset;
+ size_t len;
+ struct basefs_entry *entry = NULL;
+ blk64_t range_start, range_end;
+
+ if (getline(&line, &len, f) == -1) {
+ if (feof(f))
+ goto end;
+ goto err_getline;
+ }
+
+ entry = calloc(1, sizeof(*entry));
+ if (!entry)
+ goto err_alloc;
+
+ /*
+ * With BASEFS version 1.0, a typical line looks like this:
+ * /bin/mke2fs 5000-5004,8000,9000-9990
+ */
+ if (sscanf(line, "%ms%n", &entry->path, &offset) != 1)
+ goto err_sscanf;
+ len = strlen(mountpoint);
+ memmove(entry->path, entry->path + len, strlen(entry->path) - len + 1);
+
+ while (line[offset] == ' ')
+ ++offset;
+
+ block_range = strtok_r(line + offset, ",\n", &saveptr1);
+ while (block_range) {
+ block = strtok_r(block_range, "-", &saveptr2);
+ if (!block)
+ break;
+ range_start = atoll(block);
+ block = strtok_r(NULL, "-", &saveptr2);
+ range_end = block ? atoll(block) : range_start;
+ add_blocks_to_range(&entry->blocks, range_start, range_end);
+ block_range = strtok_r(NULL, ",\n", &saveptr1);
+ }
+end:
+ *err = 0;
+ free(line);
+ return entry;
+
+err_sscanf:
+ free(entry);
+err_alloc:
+ free(line);
+err_getline:
+ *err = 1;
+ return NULL;
+}
+
+static void free_base_fs_entry(void *e)
+{
+ struct basefs_entry *entry = e;
+ if (entry) {
+ free(entry->path);
+ free(entry);
+ }
+}
+
+struct ext2fs_hashmap *basefs_parse(const char *file, const char *mountpoint)
+{
+ int err;
+ struct ext2fs_hashmap *entries = NULL;
+ struct basefs_entry *entry;
+ FILE *f = basefs_open(file);
+ if (!f)
+ return NULL;
+ entries = ext2fs_hashmap_create(ext2fs_djb2_hash, free_base_fs_entry, 1024);
+ if (!entries)
+ goto end;
+
+ while ((entry = basefs_readline(f, mountpoint, &err))) {
+ err = ext2fs_hashmap_add(entries, entry, entry->path,
+ strlen(entry->path));
+ if (err) {
+ free_base_fs_entry(entry);
+ fclose(f);
+ ext2fs_hashmap_free(entries);
+ return NULL;
+ }
+ }
+ if (err) {
+ fclose(f);
+ ext2fs_hashmap_free(entries);
+ return NULL;
+ }
+end:
+ fclose(f);
+ return entries;
+}
+
+static void *init(const char *file, const char *mountpoint)
+{
+ struct base_fs *params = malloc(sizeof(*params));
+
+ if (!params)
+ return NULL;
+ params->mountpoint = mountpoint;
+ params->file = fopen(file, "w+");
+ if (!params->file) {
+ free(params);
+ return NULL;
+ }
+ if (fwrite(BASE_FS_VERSION"\n", 1, strlen(BASE_FS_VERSION"\n"),
+ params->file) != strlen(BASE_FS_VERSION"\n")) {
+ fclose(params->file);
+ free(params);
+ return NULL;
+ }
+ return params;
+}
+
+static int start_new_file(char *path, ext2_ino_t ino EXT2FS_ATTR((unused)),
+ struct ext2_inode *inode, void *data)
+{
+ struct base_fs *params = data;
+
+ params->entry.path = LINUX_S_ISREG(inode->i_mode) ? path : NULL;
+ return 0;
+}
+
+static int add_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk64_t blocknr,
+ int metadata, void *data)
+{
+ struct base_fs *params = data;
+
+ if (params->entry.path && !metadata)
+ add_blocks_to_range(&params->entry.blocks, blocknr, blocknr);
+ return 0;
+}
+
+static int inline_data(void *inline_data EXT2FS_ATTR((unused)),
+ void *data EXT2FS_ATTR((unused)))
+{
+ return 0;
+}
+
+static int end_new_file(void *data)
+{
+ struct base_fs *params = data;
+
+ if (!params->entry.path)
+ return 0;
+ if (fprintf(params->file, "%s%s ", params->mountpoint,
+ params->entry.path) < 0
+ || write_block_ranges(params->file, params->entry.blocks.head, ",")
+ || fwrite("\n", 1, 1, params->file) != 1)
+ return -1;
+
+ delete_block_ranges(&params->entry.blocks);
+ return 0;
+}
+
+static int cleanup(void *data)
+{
+ struct base_fs *params = data;
+
+ fclose(params->file);
+ free(params);
+ return 0;
+}
+
+struct fsmap_format base_fs_format = {
+ .init = init,
+ .start_new_file = start_new_file,
+ .add_block = add_block,
+ .inline_data = inline_data,
+ .end_new_file = end_new_file,
+ .cleanup = cleanup,
+};
diff --git a/contrib/android/base_fs.h b/contrib/android/base_fs.h
new file mode 100644
index 0000000..f53f1ed
--- /dev/null
+++ b/contrib/android/base_fs.h
@@ -0,0 +1,17 @@
+#ifndef BASE_FS_H
+# define BASE_FS_H
+
+# include "fsmap.h"
+# include "hashmap.h"
+# include "block_range.h"
+
+struct basefs_entry {
+ char *path;
+ struct block_range_list blocks;
+};
+
+extern struct fsmap_format base_fs_format;
+
+struct ext2fs_hashmap *basefs_parse(const char *file, const char *mountpoint);
+
+#endif /* !BASE_FS_H */
diff --git a/contrib/android/basefs_allocator.c b/contrib/android/basefs_allocator.c
new file mode 100644
index 0000000..4f9f5c1
--- /dev/null
+++ b/contrib/android/basefs_allocator.c
@@ -0,0 +1,388 @@
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "basefs_allocator.h"
+#include "block_range.h"
+#include "hashmap.h"
+#include "base_fs.h"
+
+struct base_fs_allocator {
+ struct ext2fs_hashmap *entries;
+ struct basefs_entry *cur_entry;
+ /* The next expected logical block to allocate for cur_entry. */
+ blk64_t next_lblk;
+ /* Blocks which are definitely owned by a single inode in BaseFS. */
+ ext2fs_block_bitmap exclusive_block_map;
+ /* Blocks which are available to the first inode that requests it. */
+ ext2fs_block_bitmap dedup_block_map;
+};
+
+static errcode_t basefs_block_allocator(ext2_filsys, blk64_t, blk64_t *,
+ struct blk_alloc_ctx *ctx);
+
+/*
+ * Free any reserved, but unconsumed block ranges in the allocator. This both
+ * frees the block_range_list data structure and unreserves exclusive blocks
+ * from the block map.
+ */
+static void fs_free_blocks_range(ext2_filsys fs,
+ struct base_fs_allocator *allocator,
+ struct block_range_list *list)
+{
+ ext2fs_block_bitmap exclusive_map = allocator->exclusive_block_map;
+
+ blk64_t block;
+ while (list->head) {
+ block = consume_next_block(list);
+ if (ext2fs_test_block_bitmap2(exclusive_map, block)) {
+ ext2fs_unmark_block_bitmap2(fs->block_map, block);
+ ext2fs_unmark_block_bitmap2(exclusive_map, block);
+ }
+ }
+}
+
+/*
+ * Free any blocks in the bitmap that were reserved but never used. This is
+ * needed to free dedup_block_map and ensure the free block bitmap is
+ * internally consistent.
+ */
+static void fs_free_blocks_bitmap(ext2_filsys fs, ext2fs_block_bitmap bitmap)
+{
+ blk64_t block = 0;
+ blk64_t start = fs->super->s_first_data_block;
+ blk64_t end = ext2fs_blocks_count(fs->super) - 1;
+ errcode_t retval;
+
+ for (;;) {
+ retval = ext2fs_find_first_set_block_bitmap2(bitmap, start, end,
+ &block);
+ if (retval)
+ break;
+ ext2fs_unmark_block_bitmap2(fs->block_map, block);
+ start = block + 1;
+ }
+}
+
+static void basefs_allocator_free(ext2_filsys fs,
+ struct base_fs_allocator *allocator)
+{
+ struct basefs_entry *e;
+ struct ext2fs_hashmap_entry *it = NULL;
+ struct ext2fs_hashmap *entries = allocator->entries;
+
+ if (entries) {
+ while ((e = ext2fs_hashmap_iter_in_order(entries, &it))) {
+ fs_free_blocks_range(fs, allocator, &e->blocks);
+ delete_block_ranges(&e->blocks);
+ }
+ ext2fs_hashmap_free(entries);
+ }
+ fs_free_blocks_bitmap(fs, allocator->dedup_block_map);
+ ext2fs_free_block_bitmap(allocator->exclusive_block_map);
+ ext2fs_free_block_bitmap(allocator->dedup_block_map);
+ free(allocator);
+}
+
+/*
+ * Build a bitmap of which blocks are definitely owned by exactly one file in
+ * Base FS. Blocks which are not valid or are de-duplicated are skipped. This
+ * is called during allocator initialization, to ensure that libext2fs does
+ * not allocate which we want to re-use.
+ *
+ * If a block was allocated in the initial filesystem, it can never be re-used,
+ * so it will appear in neither the exclusive or dedup set. If a block is used
+ * by multiple files, it will be removed from the owned set and instead added
+ * to the dedup set.
+ *
+ * The dedup set is not removed from fs->block_map. This allows us to re-use
+ * dedup blocks separately and not have them be allocated outside of file data.
+ *
+ * This function returns non-zero if the block was owned, and 0 otherwise.
+ */
+static int fs_reserve_block(ext2_filsys fs,
+ struct base_fs_allocator *allocator,
+ blk64_t block)
+{
+ ext2fs_block_bitmap exclusive_map = allocator->exclusive_block_map;
+ ext2fs_block_bitmap dedup_map = allocator->dedup_block_map;
+
+ if (block >= ext2fs_blocks_count(fs->super))
+ return 0;
+
+ if (ext2fs_test_block_bitmap2(fs->block_map, block)) {
+ if (!ext2fs_test_block_bitmap2(exclusive_map, block))
+ return 0;
+ ext2fs_unmark_block_bitmap2(exclusive_map, block);
+ ext2fs_mark_block_bitmap2(dedup_map, block);
+ return 0;
+ } else {
+ ext2fs_mark_block_bitmap2(fs->block_map, block);
+ ext2fs_mark_block_bitmap2(exclusive_map, block);
+ return 1;
+ }
+}
+
+/*
+ * Walk the requested block list and reserve blocks, either into the owned
+ * pool or the dedup pool as appropriate. We stop once the file has enough
+ * owned blocks to satisfy |file_size|. This allows any extra blocks to be
+ * re-used, since otherwise a large block movement between files could
+ * trigger block allocation errors.
+ */
+static void fs_reserve_blocks_range(ext2_filsys fs,
+ struct base_fs_allocator *allocator,
+ struct block_range_list *list,
+ off_t file_size)
+{
+ blk64_t block;
+ off_t blocks_needed;
+ off_t blocks_acquired = 0;
+ struct block_range *blocks = list->head;
+
+ blocks_needed = file_size + (fs->blocksize - 1);
+ blocks_needed /= fs->blocksize;
+
+ while (blocks) {
+ for (block = blocks->start; block <= blocks->end; block++) {
+ if (fs_reserve_block(fs, allocator, block))
+ blocks_acquired++;
+ if (blocks_acquired >= blocks_needed)
+ return;
+ }
+ blocks = blocks->next;
+ }
+}
+
+/*
+ * For each file in the base FS map, ensure that its blocks are reserved in
+ * the actual block map. This prevents libext2fs from allocating them for
+ * general purpose use, and ensures that if the file needs data blocks, they
+ * can be re-acquired exclusively for that file.
+ *
+ * If a file in the base map is missing, or not a regular file in the new
+ * filesystem, then it's skipped to ensure that its blocks are reusable.
+ */
+static errcode_t fs_reserve_blocks(ext2_filsys fs,
+ struct base_fs_allocator *allocator,
+ const char *src_dir)
+{
+ int nbytes;
+ char full_path[PATH_MAX];
+ const char *sep = "/";
+ struct stat st;
+ struct basefs_entry *e;
+ struct ext2fs_hashmap_entry *it = NULL;
+ struct ext2fs_hashmap *entries = allocator->entries;
+
+ if (strlen(src_dir) && src_dir[strlen(src_dir) - 1] == '/')
+ sep = "";
+
+ while ((e = ext2fs_hashmap_iter_in_order(entries, &it))) {
+ nbytes = snprintf(full_path, sizeof(full_path), "%s%s%s",
+ src_dir, sep, e->path);
+ if (nbytes >= sizeof(full_path))
+ return ENAMETOOLONG;
+ if (lstat(full_path, &st) || !S_ISREG(st.st_mode))
+ continue;
+ fs_reserve_blocks_range(fs, allocator, &e->blocks, st.st_size);
+ }
+ return 0;
+}
+
+errcode_t base_fs_alloc_load(ext2_filsys fs, const char *file,
+ const char *mountpoint, const char *src_dir)
+{
+ errcode_t retval = 0;
+ struct base_fs_allocator *allocator;
+
+ allocator = calloc(1, sizeof(*allocator));
+ if (!allocator) {
+ retval = ENOMEM;
+ goto out;
+ }
+
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval)
+ goto err_load;
+
+ allocator->cur_entry = NULL;
+ allocator->entries = basefs_parse(file, mountpoint);
+ if (!allocator->entries) {
+ retval = EIO;
+ goto err_load;
+ }
+ retval = ext2fs_allocate_block_bitmap(fs, "exclusive map",
+ &allocator->exclusive_block_map);
+ if (retval)
+ goto err_load;
+ retval = ext2fs_allocate_block_bitmap(fs, "dedup map",
+ &allocator->dedup_block_map);
+ if (retval)
+ goto err_load;
+
+ retval = fs_reserve_blocks(fs, allocator, src_dir);
+ if (retval)
+ goto err_load;
+
+ /* Override the default allocator */
+ fs->get_alloc_block2 = basefs_block_allocator;
+ fs->priv_data = allocator;
+
+ goto out;
+
+err_load:
+ basefs_allocator_free(fs, allocator);
+out:
+ return retval;
+}
+
+/* Try and acquire the next usable block from the Base FS map. */
+static errcode_t get_next_block(ext2_filsys fs, struct base_fs_allocator *allocator,
+ struct block_range_list* list, blk64_t *ret)
+{
+ blk64_t block;
+ ext2fs_block_bitmap exclusive_map = allocator->exclusive_block_map;
+ ext2fs_block_bitmap dedup_map = allocator->dedup_block_map;
+
+ if (!list->head)
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+
+ block = consume_next_block(list);
+ if (block >= ext2fs_blocks_count(fs->super))
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+ if (ext2fs_test_block_bitmap2(exclusive_map, block)) {
+ ext2fs_unmark_block_bitmap2(exclusive_map, block);
+ *ret = block;
+ return 0;
+ }
+ if (ext2fs_test_block_bitmap2(dedup_map, block)) {
+ ext2fs_unmark_block_bitmap2(dedup_map, block);
+ *ret = block;
+ return 0;
+ }
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+}
+
+/*
+ * BaseFS lists blocks in logical block order. However, the allocator hook is
+ * only called if a block needs to be allocated. In the case of a deduplicated
+ * block, or a hole, the hook is not invoked. This means the next block
+ * allocation request will be out of sequence. For example, consider if BaseFS
+ * specifies the following (0 being a hole):
+ * 1 2 3 0 4 5
+ *
+ * If the new file has a hole at logical block 0, we could accidentally
+ * shift the entire expected block list as follows:
+ * 0 1 2 0 3 4
+ *
+ * To account for this, we track the next expected logical block in the
+ * allocator. If the current request is for a later logical block, we skip and
+ * free the intermediate physical blocks that would have been allocated. This
+ * ensures the original block assignment is respected.
+ */
+static void skip_blocks(ext2_filsys fs, struct base_fs_allocator *allocator,
+ struct blk_alloc_ctx *ctx)
+{
+ blk64_t block;
+ struct block_range_list *list = &allocator->cur_entry->blocks;
+ ext2fs_block_bitmap exclusive_map = allocator->exclusive_block_map;
+
+ while (list->head && allocator->next_lblk < ctx->lblk) {
+ block = consume_next_block(list);
+ if (block >= ext2fs_blocks_count(fs->super))
+ continue;
+ if (ext2fs_test_block_bitmap2(exclusive_map, block)) {
+ ext2fs_unmark_block_bitmap2(exclusive_map, block);
+ ext2fs_unmark_block_bitmap2(fs->block_map, block);
+ }
+ allocator->next_lblk++;
+ }
+}
+
+static errcode_t basefs_block_allocator(ext2_filsys fs, blk64_t goal,
+ blk64_t *ret, struct blk_alloc_ctx *ctx)
+{
+ errcode_t retval;
+ struct base_fs_allocator *allocator = fs->priv_data;
+ struct basefs_entry *e = allocator->cur_entry;
+ ext2fs_block_bitmap dedup_map = allocator->dedup_block_map;
+
+ if (e && ctx && (ctx->flags & BLOCK_ALLOC_DATA)) {
+ if (allocator->next_lblk < ctx->lblk)
+ skip_blocks(fs, allocator, ctx);
+ allocator->next_lblk = ctx->lblk + 1;
+
+ if (!get_next_block(fs, allocator, &e->blocks, ret))
+ return 0;
+ }
+
+ retval = ext2fs_new_block2(fs, goal, fs->block_map, ret);
+ if (!retval) {
+ ext2fs_mark_block_bitmap2(fs->block_map, *ret);
+ return 0;
+ }
+ if (retval != EXT2_ET_BLOCK_ALLOC_FAIL)
+ return retval;
+
+ /* Try to steal a block from the dedup pool. */
+ retval = ext2fs_find_first_set_block_bitmap2(dedup_map,
+ fs->super->s_first_data_block,
+ ext2fs_blocks_count(fs->super) - 1, ret);
+ if (!retval) {
+ ext2fs_unmark_block_bitmap2(dedup_map, *ret);
+ return 0;
+ }
+
+ /*
+ * As a last resort, take any block from our file's list. This
+ * risks bloating the diff, but means we are more likely to
+ * successfully build an image.
+ */
+ while (e->blocks.head) {
+ if (!get_next_block(fs, allocator, &e->blocks, ret))
+ return 0;
+ }
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+}
+
+void base_fs_alloc_cleanup(ext2_filsys fs)
+{
+ basefs_allocator_free(fs, fs->priv_data);
+ fs->priv_data = NULL;
+ fs->get_alloc_block2 = NULL;
+}
+
+errcode_t base_fs_alloc_set_target(ext2_filsys fs, const char *target_path,
+ const char *name EXT2FS_ATTR((unused)),
+ ext2_ino_t parent_ino EXT2FS_ATTR((unused)),
+ ext2_ino_t root EXT2FS_ATTR((unused)), mode_t mode)
+{
+ struct base_fs_allocator *allocator = fs->priv_data;
+
+ if (mode != S_IFREG)
+ return 0;
+
+ if (allocator) {
+ allocator->cur_entry = ext2fs_hashmap_lookup(allocator->entries,
+ target_path,
+ strlen(target_path));
+ allocator->next_lblk = 0;
+ }
+ return 0;
+}
+
+errcode_t base_fs_alloc_unset_target(ext2_filsys fs,
+ const char *target_path EXT2FS_ATTR((unused)),
+ const char *name EXT2FS_ATTR((unused)),
+ ext2_ino_t parent_ino EXT2FS_ATTR((unused)),
+ ext2_ino_t root EXT2FS_ATTR((unused)), mode_t mode)
+{
+ struct base_fs_allocator *allocator = fs->priv_data;
+
+ if (!allocator || !allocator->cur_entry || mode != S_IFREG)
+ return 0;
+
+ fs_free_blocks_range(fs, allocator, &allocator->cur_entry->blocks);
+ delete_block_ranges(&allocator->cur_entry->blocks);
+ return 0;
+}
diff --git a/contrib/android/basefs_allocator.h b/contrib/android/basefs_allocator.h
new file mode 100644
index 0000000..6d1c65e
--- /dev/null
+++ b/contrib/android/basefs_allocator.h
@@ -0,0 +1,16 @@
+#ifndef BASE_FS_ALLOCATOR_H
+# define BASE_FS_ALLOCATOR_H
+
+# include <time.h>
+# include <ext2fs/ext2fs.h>
+
+errcode_t base_fs_alloc_load(ext2_filsys fs, const char *file,
+ const char *mountpoint, const char *src_dir);
+void base_fs_alloc_cleanup(ext2_filsys fs);
+
+errcode_t base_fs_alloc_set_target(ext2_filsys fs, const char *target_path,
+ const char *name, ext2_ino_t parent_ino, ext2_ino_t root, mode_t mode);
+errcode_t base_fs_alloc_unset_target(ext2_filsys fs, const char *target_path,
+ const char *name, ext2_ino_t parent_ino, ext2_ino_t root, mode_t mode);
+
+#endif /* !BASE_FS_ALLOCATOR_H */
diff --git a/contrib/android/block_list.c b/contrib/android/block_list.c
new file mode 100644
index 0000000..63cc1a2
--- /dev/null
+++ b/contrib/android/block_list.c
@@ -0,0 +1,89 @@
+#include "block_list.h"
+#include "block_range.h"
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+struct block_list {
+ FILE *f;
+ const char *mountpoint;
+
+ const char *filename;
+ struct block_range_list blocks;
+};
+
+static void *init(const char *file, const char *mountpoint)
+{
+ struct block_list *params = calloc(1, sizeof(*params));
+
+ if (!params)
+ return NULL;
+ params->mountpoint = mountpoint;
+ params->f = fopen(file, "w+");
+ if (!params->f) {
+ free(params);
+ return NULL;
+ }
+ return params;
+}
+
+static int start_new_file(char *path, ext2_ino_t ino EXT2FS_ATTR((unused)),
+ struct ext2_inode *inode EXT2FS_ATTR((unused)),
+ void *data)
+{
+ struct block_list *params = data;
+
+ params->filename = LINUX_S_ISREG(inode->i_mode) ? path : NULL;
+ return 0;
+}
+
+static int add_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk64_t blocknr,
+ int metadata, void *data)
+{
+ struct block_list *params = data;
+
+ if (params->filename && !metadata)
+ add_blocks_to_range(&params->blocks, blocknr, blocknr);
+ return 0;
+}
+
+static int inline_data(void *inline_data EXT2FS_ATTR((unused)),
+ void *data EXT2FS_ATTR((unused)))
+{
+ return 0;
+}
+
+static int end_new_file(void *data)
+{
+ struct block_list *params = data;
+
+ if (!params->filename || !params->blocks.head)
+ return 0;
+ if (fprintf(params->f, "%s%s ", params->mountpoint,
+ params->filename) < 0
+ || write_block_ranges(params->f, params->blocks.head, " ")
+ || fwrite("\n", 1, 1, params->f) != 1)
+ return -1;
+
+ delete_block_ranges(&params->blocks);
+ return 0;
+}
+
+static int cleanup(void *data)
+{
+ struct block_list *params = data;
+
+ fclose(params->f);
+ free(params);
+ return 0;
+}
+
+struct fsmap_format block_list_format = {
+ .init = init,
+ .start_new_file = start_new_file,
+ .add_block = add_block,
+ .inline_data = inline_data,
+ .end_new_file = end_new_file,
+ .cleanup = cleanup,
+};
diff --git a/contrib/android/block_list.h b/contrib/android/block_list.h
new file mode 100644
index 0000000..47041e4
--- /dev/null
+++ b/contrib/android/block_list.h
@@ -0,0 +1,8 @@
+#ifndef BLOCK_LIST_H
+# define BLOCK_LIST_H
+
+# include "fsmap.h"
+
+extern struct fsmap_format block_list_format;
+
+#endif /* !BLOCK_LIST_H */
diff --git a/contrib/android/block_range.c b/contrib/android/block_range.c
new file mode 100644
index 0000000..0a06882
--- /dev/null
+++ b/contrib/android/block_range.c
@@ -0,0 +1,80 @@
+#define _GNU_SOURCE
+
+#include "block_range.h"
+#include <stdio.h>
+
+struct block_range *new_block_range(blk64_t start, blk64_t end)
+{
+ struct block_range *range = malloc(sizeof(*range));
+ range->start = start;
+ range->end = end;
+ range->next = NULL;
+ return range;
+}
+
+void add_blocks_to_range(struct block_range_list *list, blk64_t blk_start,
+ blk64_t blk_end)
+{
+ if (list->head == NULL)
+ list->head = list->tail = new_block_range(blk_start, blk_end);
+ else if (list->tail->end + 1 == blk_start)
+ list->tail->end += (blk_end - blk_start + 1);
+ else {
+ struct block_range *range = new_block_range(blk_start, blk_end);
+ list->tail->next = range;
+ list->tail = range;
+ }
+}
+
+static void remove_head(struct block_range_list *list)
+{
+ struct block_range *next_range = list->head->next;
+
+ free(list->head);
+ if (next_range == NULL)
+ list->head = list->tail = NULL;
+ else
+ list->head = next_range;
+}
+
+void delete_block_ranges(struct block_range_list *list)
+{
+ while (list->head)
+ remove_head(list);
+}
+
+int write_block_ranges(FILE *f, struct block_range *range,
+ char *sep)
+{
+ int len;
+ char *buf;
+
+ while (range) {
+ if (range->start == range->end)
+ len = asprintf(&buf, "%llu%s", range->start, sep);
+ else
+ len = asprintf(&buf, "%llu-%llu%s", range->start,
+ range->end, sep);
+ if (fwrite(buf, 1, len, f) != (size_t)len) {
+ free(buf);
+ return -1;
+ }
+ free(buf);
+ range = range->next;
+ }
+
+ len = strlen(sep);
+ if (fseek(f, -len, SEEK_CUR) == -len)
+ return -1;
+ return 0;
+}
+
+blk64_t consume_next_block(struct block_range_list *list)
+{
+ blk64_t ret = list->head->start;
+
+ list->head->start += 1;
+ if (list->head->start > list->head->end)
+ remove_head(list);
+ return ret;
+}
diff --git a/contrib/android/block_range.h b/contrib/android/block_range.h
new file mode 100644
index 0000000..cf7971e
--- /dev/null
+++ b/contrib/android/block_range.h
@@ -0,0 +1,29 @@
+#ifndef BLOCK_RANGE_H
+# define BLOCK_RANGE_H
+
+# include <sys/types.h>
+# include <ext2fs/ext2fs.h>
+
+struct block_range {
+ blk64_t start;
+ blk64_t end;
+ struct block_range *next;
+};
+
+struct block_range_list {
+ struct block_range *head;
+ struct block_range *tail;
+};
+
+void add_blocks_to_range(struct block_range_list *list, blk64_t blk_start,
+ blk64_t blk_end);
+void delete_block_ranges(struct block_range_list *list);
+int write_block_ranges(FILE *f, struct block_range *range, char *sep);
+
+/*
+ * Given a non-empty range list, return the next block and remove it from the
+ * list.
+ */
+blk64_t consume_next_block(struct block_range_list *list);
+
+#endif /* !BLOCK_RANGE_H */
diff --git a/contrib/android/e2fsdroid.c b/contrib/android/e2fsdroid.c
new file mode 100644
index 0000000..6e51414
--- /dev/null
+++ b/contrib/android/e2fsdroid.c
@@ -0,0 +1,377 @@
+#define _GNU_SOURCE
+
+#include "config.h"
+#include <stdio.h>
+#include <getopt.h>
+#include <string.h>
+#include <unistd.h>
+#include <limits.h>
+
+#include "perms.h"
+#include "base_fs.h"
+#include "block_list.h"
+#include "basefs_allocator.h"
+#include "create_inode.h"
+
+#ifndef UID_GID_MAP_MAX_EXTENTS
+/*
+ * The value is defined in linux/user_namspace.h.
+ * The value is (arbitrarily) 5 in 4.14 and earlier, or 340 in 4.15 and later.
+ * Here, the bigger value is taken. See also man user_namespace(7).
+ */
+#define UID_GID_MAP_MAX_EXTENTS 340
+#endif
+
+static char *prog_name = "e2fsdroid";
+static char *in_file;
+static char *block_list;
+static char *basefs_out;
+static char *basefs_in;
+static char *mountpoint = "";
+static time_t fixed_time = -1;
+static char *fs_config_file;
+static struct selinux_opt seopt_file[8];
+static int max_nr_opt = (int)sizeof(seopt_file) / sizeof(seopt_file[0]);
+static char *product_out;
+static char *src_dir;
+static int android_configure;
+static int android_sparse_file = 1;
+
+static void usage(int ret)
+{
+ fprintf(stderr, "%s [-B block_list] [-D basefs_out] [-T timestamp]\n"
+ "\t[-C fs_config] [-S file_contexts] [-p product_out]\n"
+ "\t[-a mountpoint] [-d basefs_in] [-f src_dir] [-e] [-s]\n"
+ "\t[-u uid-mapping] [-g gid-mapping] image\n",
+ prog_name);
+ exit(ret);
+}
+
+static char *absolute_path(const char *file)
+{
+ char *ret;
+ char cwd[PATH_MAX];
+
+ if (file[0] != '/') {
+ if (getcwd(cwd, PATH_MAX) == NULL) {
+ fprintf(stderr, "Failed to getcwd\n");
+ exit(EXIT_FAILURE);
+ }
+ ret = malloc(strlen(cwd) + 1 + strlen(file) + 1);
+ if (ret)
+ sprintf(ret, "%s/%s", cwd, file);
+ } else
+ ret = strdup(file);
+ return ret;
+}
+
+static int parse_ugid_map_entry(char* line, struct ugid_map_entry* result)
+{
+ char *token, *token_saveptr;
+ size_t num_tokens;
+ unsigned int *parsed[] = {&result->child_id,
+ &result->parent_id,
+ &result->length};
+ for (token = strtok_r(line, " ", &token_saveptr), num_tokens = 0;
+ token && num_tokens < 3;
+ token = strtok_r(NULL, " ", &token_saveptr), ++num_tokens) {
+ char* endptr = NULL;
+ unsigned long t = strtoul(token, &endptr, 10);
+ if ((t == ULONG_MAX && errno) || (t > UINT_MAX) || *endptr) {
+ fprintf(stderr, "Malformed u/gid mapping line\n");
+ return 0;
+ }
+ *parsed[num_tokens] = (unsigned int) t;
+ }
+ if (num_tokens < 3 || strtok_r(NULL, " ", &token_saveptr) != NULL) {
+ fprintf(stderr, "Malformed u/gid mapping line\n");
+ return 0;
+ }
+ if (result->child_id + result->length < result->child_id ||
+ result->parent_id + result->length < result->parent_id) {
+ fprintf(stderr, "u/gid mapping overflow\n");
+ return 0;
+ }
+ return 1;
+}
+
+/*
+ * Returns 1 if [begin1, begin1+length1) and [begin2, begin2+length2) have
+ * overlapping range. Otherwise 0.
+ */
+static int is_overlapping(unsigned int begin1, unsigned int length1,
+ unsigned int begin2, unsigned int length2)
+{
+ unsigned int end1 = begin1 + length1;
+ unsigned int end2 = begin2 + length2;
+ return !(end1 <= begin2 || end2 <= begin1);
+}
+
+/*
+ * Verifies if the given mapping works.
+ * - Checks if the number of entries is less than or equals to
+ * UID_GID_MAP_MAX_EXTENTS.
+ * - Checks if there is no overlapped ranges.
+ * Returns 1 if valid, otherwise 0.
+ */
+static int is_valid_ugid_map(const struct ugid_map* mapping)
+{
+ size_t i, j;
+
+ if (mapping->size > UID_GID_MAP_MAX_EXTENTS) {
+ fprintf(stderr, "too many u/gid mapping entries\n");
+ return 0;
+ }
+
+ for (i = 0; i < mapping->size; ++i) {
+ const struct ugid_map_entry *entry1 = &mapping->entries[i];
+ for (j = i + 1; j < mapping->size; ++j) {
+ const struct ugid_map_entry *entry2 =
+ &mapping->entries[j];
+ if (is_overlapping(entry1->child_id, entry1->length,
+ entry2->child_id, entry2->length)) {
+ fprintf(stderr,
+ "Overlapping child u/gid: [%d %d %d],"
+ " [%d %d %d]\n",
+ entry1->child_id, entry1->parent_id,
+ entry1->length, entry2->child_id,
+ entry2->parent_id, entry2->length);
+ return 0;
+ }
+ if (is_overlapping(entry1->parent_id, entry1->length,
+ entry2->parent_id, entry2->length)) {
+ fprintf(stderr,
+ "Overlapping parent u/gid: [%d %d %d],"
+ " [%d %d %d]\n",
+ entry1->child_id, entry1->parent_id,
+ entry1->length, entry2->child_id,
+ entry2->parent_id, entry2->length);
+ return 0;
+ }
+ }
+ }
+ return 1;
+}
+
+/*
+ * Parses the UID/GID mapping argument. The argument could be a multi-line
+ * string (separated by '\n', no trailing '\n' is allowed). Each line must
+ * contain exact three integer tokens; the first token is |child_id|,
+ * the second is |parent_id|, and the last is |length| of the mapping range.
+ * See also user_namespace(7) man page.
+ * On success, the parsed entries are stored in |result|, and it returns 1.
+ * Otherwise, returns 0.
+ */
+static int parse_ugid_map(char* arg, struct ugid_map* result)
+{
+ int i;
+ char *line, *line_saveptr;
+ size_t current_index;
+
+ /* Count the number of lines. */
+ result->size = 1;
+ for (i = 0; arg[i]; ++i) {
+ if (arg[i] == '\n')
+ ++result->size;
+ }
+
+ /* Allocate memory for entries. */
+ result->entries = malloc(sizeof(struct ugid_map_entry) * result->size);
+ if (!result->entries) {
+ result->size = 0;
+ return 0;
+ }
+
+ /* Parse each line */
+ for (line = strtok_r(arg, "\n", &line_saveptr), current_index = 0;
+ line;
+ line = strtok_r(NULL, "\n", &line_saveptr), ++current_index) {
+ if (!parse_ugid_map_entry(
+ line, &result->entries[current_index])) {
+ return 0;
+ }
+ }
+
+ return is_valid_ugid_map(result);
+}
+
+int main(int argc, char *argv[])
+{
+ int c;
+ char *p;
+ int flags = EXT2_FLAG_RW;
+ errcode_t retval;
+ io_manager io_mgr;
+ ext2_filsys fs = NULL;
+ struct fs_ops_callbacks fs_callbacks = { NULL, NULL };
+ char *token;
+ int nr_opt = 0;
+ ext2_ino_t inodes_count;
+ ext2_ino_t free_inodes_count;
+ blk64_t blocks_count;
+ blk64_t free_blocks_count;
+ struct ugid_map uid_map = { 0, NULL }, gid_map = { 0, NULL };
+
+ add_error_table(&et_ext2_error_table);
+
+ while ((c = getopt (argc, argv, "T:C:S:p:a:D:d:B:f:esu:g:")) != EOF) {
+ switch (c) {
+ case 'T':
+ fixed_time = strtoul(optarg, &p, 0);
+ android_configure = 1;
+ break;
+ case 'C':
+ fs_config_file = absolute_path(optarg);
+ android_configure = 1;
+ break;
+ case 'S':
+ token = strtok(optarg, ",");
+ while (token) {
+ if (nr_opt == max_nr_opt) {
+ fprintf(stderr, "Expected at most %d selinux opts\n",
+ max_nr_opt);
+ exit(EXIT_FAILURE);
+ }
+ seopt_file[nr_opt].type = SELABEL_OPT_PATH;
+ seopt_file[nr_opt].value = absolute_path(token);
+ nr_opt++;
+ token = strtok(NULL, ",");
+ }
+ android_configure = 1;
+ break;
+ case 'p':
+ product_out = absolute_path(optarg);
+ android_configure = 1;
+ break;
+ case 'a':
+ mountpoint = strdup(optarg);
+ break;
+ case 'D':
+ basefs_out = absolute_path(optarg);
+ break;
+ case 'd':
+ basefs_in = absolute_path(optarg);
+ break;
+ case 'B':
+ block_list = absolute_path(optarg);
+ break;
+ case 'f':
+ src_dir = absolute_path(optarg);
+ break;
+ case 'e':
+ android_sparse_file = 0;
+ break;
+ case 's':
+ flags |= EXT2_FLAG_SHARE_DUP;
+ break;
+ case 'u':
+ if (!parse_ugid_map(optarg, &uid_map))
+ exit(EXIT_FAILURE);
+ android_configure = 1;
+ break;
+ case 'g':
+ if (!parse_ugid_map(optarg, &gid_map))
+ exit(EXIT_FAILURE);
+ android_configure = 1;
+ break;
+ default:
+ usage(EXIT_FAILURE);
+ }
+ }
+ if (optind >= argc) {
+ fprintf(stderr, "Expected filename after options\n");
+ exit(EXIT_FAILURE);
+ }
+
+ if (android_sparse_file) {
+ io_mgr = sparse_io_manager;
+ if (asprintf(&in_file, "(%s)", argv[optind]) == -1) {
+ fprintf(stderr, "Failed to allocate file name\n");
+ exit(EXIT_FAILURE);
+ }
+ } else {
+ io_mgr = unix_io_manager;
+ in_file = strdup(argv[optind]);
+ }
+ retval = ext2fs_open(in_file, flags, 0, 0, io_mgr, &fs);
+ if (retval) {
+ com_err(prog_name, retval, "while opening file %s\n", in_file);
+ return retval;
+ }
+
+ if (src_dir) {
+ ext2fs_read_bitmaps(fs);
+ if (basefs_in) {
+ retval = base_fs_alloc_load(fs, basefs_in, mountpoint,
+ src_dir);
+ if (retval) {
+ com_err(prog_name, retval, "%s",
+ "while reading base_fs file");
+ exit(1);
+ }
+ fs_callbacks.create_new_inode =
+ base_fs_alloc_set_target;
+ fs_callbacks.end_create_new_inode =
+ base_fs_alloc_unset_target;
+ }
+ retval = populate_fs2(fs, EXT2_ROOT_INO, src_dir,
+ EXT2_ROOT_INO, &fs_callbacks);
+ if (retval) {
+ com_err(prog_name, retval, "%s",
+ "while populating file system");
+ exit(1);
+ }
+ if (basefs_in)
+ base_fs_alloc_cleanup(fs);
+ }
+
+ if (android_configure) {
+ retval = android_configure_fs(
+ fs, src_dir, product_out, mountpoint, seopt_file,
+ nr_opt, fs_config_file, fixed_time, &uid_map, &gid_map);
+ if (retval) {
+ com_err(prog_name, retval, "%s",
+ "while configuring the file system");
+ exit(1);
+ }
+ }
+
+ if (block_list) {
+ retval = fsmap_iter_filsys(fs, &block_list_format, block_list,
+ mountpoint);
+ if (retval) {
+ com_err(prog_name, retval, "%s",
+ "while creating the block_list");
+ exit(1);
+ }
+ }
+
+ if (basefs_out) {
+ retval = fsmap_iter_filsys(fs, &base_fs_format,
+ basefs_out, mountpoint);
+ if (retval) {
+ com_err(prog_name, retval, "%s",
+ "while creating the basefs file");
+ exit(1);
+ }
+ }
+
+ inodes_count = fs->super->s_inodes_count;
+ free_inodes_count = fs->super->s_free_inodes_count;
+ blocks_count = ext2fs_blocks_count(fs->super);
+ free_blocks_count = ext2fs_free_blocks_count(fs->super);
+
+ retval = ext2fs_close_free(&fs);
+ if (retval) {
+ com_err(prog_name, retval, "%s",
+ "while writing superblocks");
+ exit(1);
+ }
+
+ printf("Created filesystem with %u/%u inodes and %llu/%llu blocks\n",
+ inodes_count - free_inodes_count, inodes_count,
+ blocks_count - free_blocks_count, blocks_count);
+
+ remove_error_table(&et_ext2_error_table);
+ return 0;
+}
diff --git a/contrib/android/ext2simg.c b/contrib/android/ext2simg.c
new file mode 100644
index 0000000..017e16f
--- /dev/null
+++ b/contrib/android/ext2simg.c
@@ -0,0 +1,224 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <libgen.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ext2fs/ext2fs.h>
+#include <et/com_err.h>
+#include <sparse/sparse.h>
+
+struct {
+ int crc;
+ int sparse;
+ int gzip;
+ char *in_file;
+ char *out_file;
+ bool overwrite_input;
+} params = {
+ .crc = 0,
+ .sparse = 1,
+ .gzip = 0,
+};
+
+#define ext2fs_fatal(Retval, Format, ...) \
+ do { \
+ com_err("error", Retval, Format, __VA_ARGS__); \
+ exit(EXIT_FAILURE); \
+ } while(0)
+
+#define sparse_fatal(Format) \
+ do { \
+ fprintf(stderr, "sparse: "Format); \
+ exit(EXIT_FAILURE); \
+ } while(0)
+
+static void usage(char *path)
+{
+ char *progname = basename(path);
+
+ fprintf(stderr, "%s [ options ] <image or block device> <output image>\n"
+ " -c include CRC block\n"
+ " -z gzip output\n"
+ " -S don't use sparse output format\n", progname);
+}
+
+static struct buf_item {
+ struct buf_item *next;
+ void *buf[0];
+} *buf_list;
+
+static void add_chunk(ext2_filsys fs, struct sparse_file *s, blk_t chunk_start, blk_t chunk_end)
+{
+ int retval;
+ unsigned int nb_blk = chunk_end - chunk_start;
+ size_t len = nb_blk * fs->blocksize;
+ int64_t offset = (int64_t)chunk_start * (int64_t)fs->blocksize;
+
+ if (params.overwrite_input == false) {
+ if (sparse_file_add_file(s, params.in_file, offset, len, chunk_start) < 0)
+ sparse_fatal("adding data to the sparse file");
+ } else {
+ /*
+ * The input file will be overwritten, make a copy of
+ * the blocks
+ */
+ struct buf_item *bi = calloc(1, sizeof(struct buf_item) + len);
+ if (buf_list == NULL)
+ buf_list = bi;
+ else {
+ bi->next = buf_list;
+ buf_list = bi;
+ }
+
+ retval = io_channel_read_blk64(fs->io, chunk_start, nb_blk, bi->buf);
+ if (retval < 0)
+ ext2fs_fatal(retval, "reading block %u - %u", chunk_start, chunk_end);
+
+ if (sparse_file_add_data(s, bi->buf, len, chunk_start) < 0)
+ sparse_fatal("adding data to the sparse file");
+ }
+}
+
+static void free_chunks(void)
+{
+ struct buf_item *bi;
+
+ while (buf_list) {
+ bi = buf_list->next;
+ free(buf_list);
+ buf_list = bi;
+ }
+}
+
+static struct sparse_file *ext_to_sparse(const char *in_file)
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ struct sparse_file *s;
+ int64_t chunk_start = -1;
+ blk_t first_blk, last_blk, nb_blk, cur_blk;
+
+ retval = ext2fs_open(in_file, 0, 0, 0, unix_io_manager, &fs);
+ if (retval)
+ ext2fs_fatal(retval, "while reading %s", in_file);
+
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ ext2fs_fatal(retval, "while reading block bitmap of %s", in_file);
+
+ first_blk = ext2fs_get_block_bitmap_start2(fs->block_map);
+ last_blk = ext2fs_get_block_bitmap_end2(fs->block_map);
+ nb_blk = last_blk - first_blk + 1;
+
+ s = sparse_file_new(fs->blocksize, (uint64_t)fs->blocksize * (uint64_t)nb_blk);
+ if (!s)
+ sparse_fatal("creating sparse file");
+
+ /*
+ * The sparse format encodes the size of a chunk (and its header) in a
+ * 32-bit unsigned integer (UINT32_MAX)
+ * When writing the chunk, the library uses a single call to write().
+ * Linux's implementation of the 'write' syscall does not allow transfers
+ * larger than INT32_MAX (32-bit _and_ 64-bit systems).
+ * Make sure we do not create chunks larger than this limit.
+ */
+ int64_t max_blk_per_chunk = (INT32_MAX - 12) / fs->blocksize;
+
+ /* Iter on the blocks to merge contiguous chunk */
+ for (cur_blk = first_blk; cur_blk <= last_blk; ++cur_blk) {
+ if (ext2fs_test_block_bitmap2(fs->block_map, cur_blk)) {
+ if (chunk_start == -1) {
+ chunk_start = cur_blk;
+ } else if (cur_blk - chunk_start + 1 == max_blk_per_chunk) {
+ add_chunk(fs, s, chunk_start, cur_blk);
+ chunk_start = -1;
+ }
+ } else if (chunk_start != -1) {
+ add_chunk(fs, s, chunk_start, cur_blk);
+ chunk_start = -1;
+ }
+ }
+ if (chunk_start != -1)
+ add_chunk(fs, s, chunk_start, cur_blk - 1);
+
+ ext2fs_free(fs);
+ return s;
+}
+
+static bool same_file(const char *in, const char *out)
+{
+ struct stat st1, st2;
+
+ if (access(out, F_OK) == -1)
+ return false;
+
+ if (lstat(in, &st1) == -1)
+ ext2fs_fatal(errno, "stat %s\n", in);
+ if (lstat(out, &st2) == -1)
+ ext2fs_fatal(errno, "stat %s\n", out);
+ return st1.st_ino == st2.st_ino;
+}
+
+int main(int argc, char *argv[])
+{
+ int opt;
+ int out_fd;
+ struct sparse_file *s;
+
+ while ((opt = getopt(argc, argv, "czS")) != -1) {
+ switch(opt) {
+ case 'c':
+ params.crc = 1;
+ break;
+ case 'z':
+ params.gzip = 1;
+ break;
+ case 'S':
+ params.sparse = 0;
+ break;
+ default:
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ }
+ if (optind + 1 >= argc) {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ params.in_file = strdup(argv[optind++]);
+ params.out_file = strdup(argv[optind]);
+ params.overwrite_input = same_file(params.in_file, params.out_file);
+
+ s = ext_to_sparse(params.in_file);
+
+ out_fd = open(params.out_file, O_WRONLY | O_CREAT | O_TRUNC, 0664);
+ if (out_fd == -1)
+ ext2fs_fatal(errno, "opening %s\n", params.out_file);
+ if (sparse_file_write(s, out_fd, params.gzip, params.sparse, params.crc) < 0)
+ sparse_fatal("writing sparse file");
+
+ sparse_file_destroy(s);
+
+ free(params.in_file);
+ free(params.out_file);
+ free_chunks();
+ close(out_fd);
+
+ return 0;
+}
diff --git a/contrib/android/fsmap.c b/contrib/android/fsmap.c
new file mode 100644
index 0000000..9ee8472
--- /dev/null
+++ b/contrib/android/fsmap.c
@@ -0,0 +1,169 @@
+#include "fsmap.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include "support/nls-enable.h"
+
+struct walk_ext_priv_data {
+ char *path;
+ ext2_filsys fs;
+ struct fsmap_format *format;
+};
+
+static int walk_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref64_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv)
+{
+ struct walk_ext_priv_data *pdata = priv;
+ struct fsmap_format *format = pdata->format;
+
+ return format->add_block(fs, *blocknr, blockcnt < 0, format->private);
+}
+
+static errcode_t ino_iter_extents(ext2_filsys fs, ext2_ino_t ino,
+ ext2_extent_handle_t extents,
+ struct walk_ext_priv_data *pdata)
+{
+ blk64_t block;
+ errcode_t retval;
+ blk64_t next_lblk = 0;
+ int op = EXT2_EXTENT_ROOT;
+ struct ext2fs_extent extent;
+ struct fsmap_format *format = pdata->format;
+
+ for (;;) {
+ retval = ext2fs_extent_get(extents, op, &extent);
+ if (retval)
+ break;
+
+ op = EXT2_EXTENT_NEXT;
+
+ if ((extent.e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT) ||
+ !(extent.e_flags & EXT2_EXTENT_FLAGS_LEAF))
+ continue;
+
+ for (; next_lblk < extent.e_lblk; next_lblk++)
+ format->add_block(fs, 0, 0, format->private);
+
+ block = extent.e_pblk;
+ for (; next_lblk < extent.e_lblk + extent.e_len; next_lblk++)
+ format->add_block(fs, block++, 0, format->private);
+ }
+
+ if (retval == EXT2_ET_EXTENT_NO_NEXT)
+ retval = 0;
+ if (retval) {
+ com_err(__func__, retval, ("getting extents of ino \"%u\""),
+ ino);
+ }
+ return retval;
+}
+
+static errcode_t ino_iter_blocks(ext2_filsys fs, ext2_ino_t ino,
+ struct walk_ext_priv_data *pdata)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+ ext2_extent_handle_t extents;
+ struct fsmap_format *format = pdata->format;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+
+ if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
+ return format->inline_data(&(inode.i_block[0]),
+ format->private);
+
+ retval = ext2fs_extent_open(fs, ino, &extents);
+ if (retval == EXT2_ET_INODE_NOT_EXTENT) {
+ retval = ext2fs_block_iterate3(fs, ino, BLOCK_FLAG_READ_ONLY,
+ NULL, walk_block, pdata);
+ if (retval) {
+ com_err(__func__, retval, _("listing blocks of ino \"%u\""),
+ ino);
+ }
+ return retval;
+ }
+
+ retval = ino_iter_extents(fs, ino, extents, pdata);
+
+ ext2fs_extent_free(extents);
+ return retval;
+}
+
+static int is_dir(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inode inode;
+
+ if (ext2fs_read_inode(fs, ino, &inode))
+ return 0;
+ return S_ISDIR(inode.i_mode);
+}
+
+static int walk_ext_dir(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int flags EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *de,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)), void *priv_data)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+ char *filename, *cur_path, *name = de->name;
+ int name_len = de->name_len & 0xff;
+ struct walk_ext_priv_data *pdata = priv_data;
+ struct fsmap_format *format = pdata->format;
+
+ if (!strncmp(name, ".", name_len)
+ || !strncmp(name, "..", name_len)
+ || !strncmp(name, "lost+found", 10))
+ return 0;
+
+ if (asprintf(&filename, "%s/%.*s", pdata->path, name_len, name) < 0)
+ return -ENOMEM;
+
+ retval = ext2fs_read_inode(pdata->fs, de->inode, &inode);
+ if (retval) {
+ com_err(__func__, retval, _("reading ino \"%u\""), de->inode);
+ goto end;
+ }
+ format->start_new_file(filename, de->inode, &inode, format->private);
+ retval = ino_iter_blocks(pdata->fs, de->inode, pdata);
+ if (retval)
+ return retval;
+ format->end_new_file(format->private);
+
+ retval = 0;
+ if (is_dir(pdata->fs, de->inode)) {
+ cur_path = pdata->path;
+ pdata->path = filename;
+ retval = ext2fs_dir_iterate2(pdata->fs, de->inode, 0, NULL,
+ walk_ext_dir, pdata);
+ pdata->path = cur_path;
+ }
+
+end:
+ free(filename);
+ return retval;
+}
+
+errcode_t fsmap_iter_filsys(ext2_filsys fs, struct fsmap_format *format,
+ const char *file, const char *mountpoint)
+{
+ struct walk_ext_priv_data pdata;
+ errcode_t retval;
+
+ format->private = format->init(file, mountpoint);
+ pdata.fs = fs;
+ pdata.path = "";
+ pdata.format = format;
+
+ retval = ext2fs_dir_iterate2(fs, EXT2_ROOT_INO, 0, NULL, walk_ext_dir, &pdata);
+
+ format->cleanup(format->private);
+ return retval;
+}
diff --git a/contrib/android/fsmap.h b/contrib/android/fsmap.h
new file mode 100644
index 0000000..9f84a71
--- /dev/null
+++ b/contrib/android/fsmap.h
@@ -0,0 +1,29 @@
+#ifndef FSMAP_H
+# define FSMAP_H
+
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE // asprintf
+# endif
+# include <stdio.h>
+# include <stdint.h>
+# include <stdbool.h>
+# include <sys/types.h>
+# include <ext2fs/ext2fs.h>
+
+struct fsmap_format {
+ void* (* init)(const char *file, const char *mountpoint);
+ int (* start_new_file)(char *path, ext2_ino_t ino,
+ struct ext2_inode *inode, void *data);
+ int (* add_block)(ext2_filsys fs, blk64_t blocknr, int metadata,
+ void *data);
+ int (* inline_data)(void *inline_data, void *data);
+ int (* end_new_file)(void *data);
+ int (* cleanup)(void *data);
+
+ void *private;
+};
+
+errcode_t fsmap_iter_filsys(ext2_filsys fs, struct fsmap_format *format,
+ const char *file, const char *mountpoint);
+
+#endif /* !FSMAP_H */
diff --git a/contrib/android/perms.c b/contrib/android/perms.c
new file mode 100644
index 0000000..dd05644
--- /dev/null
+++ b/contrib/android/perms.c
@@ -0,0 +1,376 @@
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE //asprintf
+#endif
+#include "config.h"
+#include "perms.h"
+#include "support/nls-enable.h"
+#include <time.h>
+#include <sys/stat.h>
+
+#ifndef XATTR_SELINUX_SUFFIX
+# define XATTR_SELINUX_SUFFIX "selinux"
+#endif
+#ifndef XATTR_CAPS_SUFFIX
+# define XATTR_CAPS_SUFFIX "capability"
+#endif
+
+struct inode_params {
+ ext2_filsys fs;
+ char *path;
+ char *filename;
+ char *src_dir;
+ char *target_out;
+ char *mountpoint;
+ fs_config_f fs_config_func;
+ struct selabel_handle *sehnd;
+ time_t fixed_time;
+ const struct ugid_map* uid_map;
+ const struct ugid_map* gid_map;
+ errcode_t error;
+};
+
+static errcode_t ino_add_xattr(ext2_filsys fs, ext2_ino_t ino, const char *name,
+ const void *value, int value_len)
+{
+ errcode_t retval, close_retval;
+ struct ext2_xattr_handle *xhandle;
+
+ retval = ext2fs_xattrs_open(fs, ino, &xhandle);
+ if (retval) {
+ com_err(__func__, retval, _("while opening inode %u"), ino);
+ return retval;
+ }
+ retval = ext2fs_xattrs_read(xhandle);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while reading xattrs of inode %u"), ino);
+ goto xattrs_close;
+ }
+ retval = ext2fs_xattr_set(xhandle, name, value, value_len);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while setting xattrs of inode %u"), ino);
+ goto xattrs_close;
+ }
+xattrs_close:
+ close_retval = ext2fs_xattrs_close(&xhandle);
+ if (close_retval) {
+ com_err(__func__, close_retval,
+ _("while closing xattrs of inode %u"), ino);
+ return retval ? retval : close_retval;
+ }
+ return retval;
+}
+
+static errcode_t set_selinux_xattr(ext2_filsys fs, ext2_ino_t ino,
+ struct inode_params *params)
+{
+ errcode_t retval;
+ char *secontext = NULL;
+ struct ext2_inode inode;
+
+ if (params->sehnd == NULL)
+ return 0;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while reading inode %u"), ino);
+ return retval;
+ }
+
+ retval = selabel_lookup(params->sehnd, &secontext, params->filename,
+ inode.i_mode);
+ if (retval < 0) {
+ int saved_errno = errno;
+ com_err(__func__, errno,
+ _("searching for label \"%s\""), params->filename);
+ return saved_errno;
+ }
+
+ retval = ino_add_xattr(fs, ino, "security." XATTR_SELINUX_SUFFIX,
+ secontext, strlen(secontext) + 1);
+
+ freecon(secontext);
+ return retval;
+}
+
+/*
+ * Returns mapped UID/GID if there is a corresponding entry in |mapping|.
+ * Otherwise |id| as is.
+ */
+static unsigned int resolve_ugid(const struct ugid_map* mapping,
+ unsigned int id)
+{
+ size_t i;
+ for (i = 0; i < mapping->size; ++i) {
+ const struct ugid_map_entry* entry = &mapping->entries[i];
+ if (entry->parent_id <= id &&
+ id < entry->parent_id + entry->length) {
+ return id + entry->child_id - entry->parent_id;
+ }
+ }
+
+ /* No entry is found. */
+ return id;
+}
+
+static errcode_t set_perms_and_caps(ext2_filsys fs, ext2_ino_t ino,
+ struct inode_params *params)
+{
+ errcode_t retval;
+ uint64_t capabilities = 0;
+ struct ext2_inode inode;
+ struct vfs_cap_data cap_data;
+ unsigned int uid = 0, gid = 0, imode = 0;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(__func__, retval, _("while reading inode %u"), ino);
+ return retval;
+ }
+
+ /* Permissions */
+ if (params->fs_config_func != NULL) {
+ const char *filename = params->filename;
+ if (strcmp(filename, params->mountpoint) == 0) {
+ /* The root of the filesystem needs to be an empty string. */
+ filename = "";
+ }
+ params->fs_config_func(filename, S_ISDIR(inode.i_mode),
+ params->target_out, &uid, &gid, &imode,
+ &capabilities);
+ uid = resolve_ugid(params->uid_map, uid);
+ gid = resolve_ugid(params->gid_map, gid);
+ inode.i_uid = (__u16) uid;
+ inode.i_gid = (__u16) gid;
+ ext2fs_set_i_uid_high(inode, (__u16) (uid >> 16));
+ ext2fs_set_i_gid_high(inode, (__u16) (gid >> 16));
+ inode.i_mode = (inode.i_mode & S_IFMT) | (imode & 0xffff);
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while writing inode %u"), ino);
+ return retval;
+ }
+ }
+
+ /* Capabilities */
+ if (!capabilities)
+ return 0;
+ memset(&cap_data, 0, sizeof(cap_data));
+ cap_data.magic_etc = VFS_CAP_REVISION_2 | VFS_CAP_FLAGS_EFFECTIVE;
+ cap_data.data[0].permitted = (uint32_t) (capabilities & 0xffffffff);
+ cap_data.data[1].permitted = (uint32_t) (capabilities >> 32);
+ return ino_add_xattr(fs, ino, "security." XATTR_CAPS_SUFFIX,
+ &cap_data, sizeof(cap_data));
+}
+
+static errcode_t set_timestamp(ext2_filsys fs, ext2_ino_t ino,
+ struct inode_params *params)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+ struct stat stat;
+ char *src_filename = NULL;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while reading inode %u"), ino);
+ return retval;
+ }
+
+ if (params->fixed_time == -1 && params->src_dir) {
+ /* replace mountpoint from filename with src_dir */
+ if (asprintf(&src_filename, "%s/%s", params->src_dir,
+ params->filename + strlen(params->mountpoint)) < 0) {
+ return -ENOMEM;
+ }
+ retval = lstat(src_filename, &stat);
+ if (retval < 0) {
+ com_err(__func__, errno,
+ _("while lstat file %s"), src_filename);
+ goto end;
+ }
+ inode.i_atime = inode.i_ctime = inode.i_mtime = stat.st_mtime;
+ } else {
+ inode.i_atime = inode.i_ctime = inode.i_mtime = params->fixed_time;
+ }
+
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while writing inode %u"), ino);
+ goto end;
+ }
+
+end:
+ free(src_filename);
+ return retval;
+}
+
+static int is_dir(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inode inode;
+
+ if (ext2fs_read_inode(fs, ino, &inode))
+ return 0;
+ return S_ISDIR(inode.i_mode);
+}
+
+static errcode_t androidify_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct inode_params *params)
+{
+ errcode_t retval;
+
+ retval = set_timestamp(fs, ino, params);
+ if (retval)
+ return retval;
+
+ retval = set_selinux_xattr(fs, ino, params);
+ if (retval)
+ return retval;
+
+ return set_perms_and_caps(fs, ino, params);
+}
+
+static int walk_dir(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int flags EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *de,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)), void *priv_data)
+{
+ __u16 name_len;
+ errcode_t retval;
+ struct inode_params *params = (struct inode_params *)priv_data;
+
+ name_len = de->name_len & 0xff;
+ if (!strncmp(de->name, ".", name_len)
+ || (!strncmp(de->name, "..", name_len)))
+ return 0;
+
+ if (asprintf(&params->filename, "%s/%.*s", params->path, name_len,
+ de->name) < 0) {
+ params->error = ENOMEM;
+ return -ENOMEM;
+ }
+
+ if (!strncmp(de->name, "lost+found", 10)) {
+ retval = set_selinux_xattr(params->fs, de->inode, params);
+ if (retval)
+ goto end;
+ } else {
+ retval = androidify_inode(params->fs, de->inode, params);
+ if (retval)
+ goto end;
+ if (is_dir(params->fs, de->inode)) {
+ char *cur_path = params->path;
+ char *cur_filename = params->filename;
+ params->path = params->filename;
+ retval = ext2fs_dir_iterate2(params->fs, de->inode, 0, NULL,
+ walk_dir, params);
+ if (retval)
+ goto end;
+ params->path = cur_path;
+ params->filename = cur_filename;
+ }
+ }
+
+end:
+ free(params->filename);
+ params->error |= retval;
+ return retval;
+}
+
+errcode_t __android_configure_fs(ext2_filsys fs, char *src_dir,
+ char *target_out,
+ char *mountpoint,
+ fs_config_f fs_config_func,
+ struct selabel_handle *sehnd,
+ time_t fixed_time,
+ const struct ugid_map* uid_map,
+ const struct ugid_map* gid_map)
+{
+ errcode_t retval;
+ struct inode_params params = {
+ .fs = fs,
+ .src_dir = src_dir,
+ .target_out = target_out,
+ .fs_config_func = fs_config_func,
+ .sehnd = sehnd,
+ .fixed_time = fixed_time,
+ .path = mountpoint,
+ .filename = mountpoint,
+ .mountpoint = mountpoint,
+ .uid_map = uid_map,
+ .gid_map = gid_map,
+ .error = 0
+ };
+
+ /* walk_dir will add the "/". Don't add it twice. */
+ if (strlen(mountpoint) == 1 && mountpoint[0] == '/')
+ params.path = "";
+
+ retval = androidify_inode(fs, EXT2_ROOT_INO, &params);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_dir_iterate2(fs, EXT2_ROOT_INO, 0, NULL, walk_dir,
+ &params);
+ if (retval)
+ return retval;
+ return params.error;
+}
+
+errcode_t android_configure_fs(ext2_filsys fs, char *src_dir, char *target_out,
+ char *mountpoint,
+ struct selinux_opt *seopts EXT2FS_ATTR((unused)),
+ unsigned int nopt EXT2FS_ATTR((unused)),
+ char *fs_config_file, time_t fixed_time,
+ const struct ugid_map* uid_map,
+ const struct ugid_map* gid_map)
+{
+ errcode_t retval;
+ fs_config_f fs_config_func = NULL;
+ struct selabel_handle *sehnd = NULL;
+
+ /* Retrieve file contexts */
+#if !defined(__ANDROID__)
+ if (nopt > 0) {
+ sehnd = selabel_open(SELABEL_CTX_FILE, seopts, nopt);
+ if (!sehnd) {
+ int saved_errno = errno;
+ com_err(__func__, errno,
+ _("while opening file contexts \"%s\""),
+ seopts[0].value);
+ return saved_errno;
+ }
+ }
+#else
+ sehnd = selinux_android_file_context_handle();
+ if (!sehnd) {
+ com_err(__func__, EINVAL,
+ _("while opening android file_contexts"));
+ return EINVAL;
+ }
+#endif
+
+ /* Load the FS config */
+ if (fs_config_file) {
+ retval = load_canned_fs_config(fs_config_file);
+ if (retval < 0) {
+ com_err(__func__, retval,
+ _("while loading fs_config \"%s\""),
+ fs_config_file);
+ return retval;
+ }
+ fs_config_func = canned_fs_config;
+ } else if (mountpoint)
+ fs_config_func = fs_config;
+
+ return __android_configure_fs(fs, src_dir, target_out, mountpoint,
+ fs_config_func, sehnd, fixed_time,
+ uid_map, gid_map);
+}
diff --git a/contrib/android/perms.h b/contrib/android/perms.h
new file mode 100644
index 0000000..9ea3f95
--- /dev/null
+++ b/contrib/android/perms.h
@@ -0,0 +1,65 @@
+#ifndef ANDROID_PERMS_H
+# define ANDROID_PERMS_H
+
+# include <ext2fs/ext2fs.h>
+
+typedef void (*fs_config_f)(const char *path, int dir,
+ const char *target_out_path,
+ unsigned *uid, unsigned *gid,
+ unsigned *mode, uint64_t *capabilities);
+
+/*
+ * Represents a range of UID/GID mapping.
+ * This maps the id in [|parent_id|, |parent_id| + |length|) into
+ * [|child_id|, |child_id| + |length|)
+ */
+struct ugid_map_entry {
+ unsigned int child_id;
+ unsigned int parent_id;
+ unsigned int length;
+};
+
+struct ugid_map {
+ /* The number of elements in |entries|. */
+ size_t size;
+
+ /* An array of entries. If |size| is 0, this is a null pointer. */
+ struct ugid_map_entry* entries;
+};
+
+# ifdef _WIN32
+struct selabel_handle;
+static inline errcode_t android_configure_fs(ext2_filsys fs,
+ char *src_dir,
+ char *target_out,
+ char *mountpoint,
+ void *seopts,
+ unsigned int nopt,
+ char *fs_config_file,
+ time_t fixed_time,
+ const struct ugid_map* uid_map,
+ const struct ugdi_map* gid_map)
+{
+ return 0;
+}
+# else
+# include <selinux/selinux.h>
+# include <selinux/label.h>
+# if defined(__ANDROID__)
+# include <selinux/android.h>
+# endif
+# include <private/android_filesystem_config.h>
+# include <private/canned_fs_config.h>
+# include <private/fs_config.h>
+
+errcode_t android_configure_fs(ext2_filsys fs, char *src_dir,
+ char *target_out,
+ char *mountpoint,
+ struct selinux_opt *seopts,
+ unsigned int nopt,
+ char *fs_config_file, time_t fixed_time,
+ const struct ugid_map* uid_map,
+ const struct ugid_map* gid_map);
+
+# endif
+#endif /* !ANDROID_PERMS_H */
diff --git a/contrib/build-rpm b/contrib/build-rpm
new file mode 100644
index 0000000..0b06071
--- /dev/null
+++ b/contrib/build-rpm
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# enable xtrace output if requested
+if [ -n ${ENABLE_XTRACE:-''} ]; then
+ set -x
+fi
+
+# Build an e2fsprogs RPM from cvs
+
+pwd=`pwd`
+currdir=`basename $pwd`
+pkgname=`grep Name: e2fsprogs.spec | awk '{print $2;}'`
+pkgvers=`grep Version: e2fsprogs.spec | awk '{print $2;}'`
+builddir=${pkgname}-${pkgvers}
+
+# ensure that $TMP is set to something
+TMP=${TMP:-'/tmp'}
+
+cd ..
+tmpdir=`mktemp -d ${RPM_TMPDIR:-$TMP}/rpmtmp.XXXXXX`
+
+# We need to build a tarball for the SRPM using $builddir as the
+# directory name (since that's what RPM will expect it to unpack
+# into). That may require a symlink.
+
+# Make a recursive-symlink copy of the source dir
+cp -sR `pwd`/$currdir $tmpdir/$builddir || exit 1
+
+# Remove any build files from the temporary tarball directory
+[ -f $tmpdir/$builddir/Makefile ] && make -C $tmpdir/$builddir distclean
+
+EXCLUDE="--exclude .hg* --exclude .pc*"
+(cd $tmpdir && tar czfh ${builddir}.tar.gz $EXCLUDE $builddir)
+
+[ "`rpmbuild --version 2> /dev/null`" ] && RPM=rpmbuild || RPM=rpm
+
+$RPM --define "_sourcedir $tmpdir" \
+ --define "_topdir ${RPM_TOPDIR:-$(rpm -E %_topdir)}" \
+ --define "_tmpdir ${RPM_TMPDIR:-$TMP}" \
+ --define "extra_config_flags ${EXTRA_CONFIG_FLAGS:-''}" \
+ -ba $currdir/e2fsprogs.spec
+
+rpm_exit=$?
+rm -rf $tmpdir
+exit $rpm_exit
diff --git a/contrib/dconf b/contrib/dconf
new file mode 100644
index 0000000..cef4cc6
--- /dev/null
+++ b/contrib/dconf
@@ -0,0 +1,118 @@
+#!/bin/sh
+#$Id$
+# Create Adobe-PostScript file that graphically displays the output of
+# dumpe2fs(8). Use "dumpe2fs | dconf" to create a PostScript file on stdout.
+# Developed and tested for Linux 1.0.
+# Copyright (c) 1994
+# Ulrich Windl
+# ALte Regensburger Strasse 11a
+# D-93149 Nittenau, Germany
+# <Ulrich.Windl@rz.uni-regensburg.de>
+SELF=`basename $0`
+AWKFILE=/tmp/${SELF}.awk
+TEMPFILE=/tmp/${SELF}.tmp
+echo '
+BEGIN {
+ print "B"
+}
+/^Inode count:/ {
+ ic=$3; next
+}
+/^Block count:/ {
+ bc=$3; next
+}
+/^First block:/ {
+ fb=$3; next
+}
+/^Block size:/ {
+ bs=$3; next
+}
+/^Blocks per group:/ {
+ bpg=$4
+ printf("BC %d\n", bpg)
+ printf("GC %d\n", (bc + bpg - 1) / bpg)
+ next
+}
+/^Inodes per group:/ {
+ ipg=$4; next
+}
+/^Last write time:/ {
+ lwtime=$0; gsub("Last write time:[ ]+", "", lwtime)
+ printf("T %s\n", lwtime)
+ next
+}
+/^Group [0-9]+:/ {
+ group=$2; gsub(":", "", group)
+ block=""
+ group_start=group*bpg+fb
+ group_end=group_start+bpg
+ printf("G %d : %d - %d\n", group, group_start, group_end)
+ next
+}
+/^[ ]+Free blocks: / {
+ for ( i=3; i < NF; ++i ) {
+ block=$i; gsub(",", "", block)
+ if ( index(block, "-") == 0 ) block=block "-" block
+ pos=index(block, "-")
+ printf("FB %d-%d\n",
+ substr(block, 0, pos) - group_start,
+ substr(block, pos + 1) - group_start)
+ }
+ if ( block == "" ) printf("Group %d is full\n", group)
+ print "----"
+ next
+}
+END {
+ printf("E %s\n", lwtime)
+}' >$AWKFILE
+awk -f $AWKFILE $* >$TEMPFILE
+echo '
+BEGIN {
+ printf("%%!PS-Adobe\n")
+ printf("%%%%BoundingBox: 0 0 1 1\n")
+ printf("/rect {/y2 exch def /x2 exch def /y1 exch def /x1 exch def\n")
+ printf(" newpath x1 y1 moveto x2 y1 lineto x2 y2 lineto\n")
+ printf(" x1 y2 lineto closepath} def\n")
+ printf("/fb {rect gsave 1.0 setgray fill grestore} def\n")
+ printf("/dg {rect gsave gsave 0.0 setgray fill grestore\n")
+ printf(" 0.5 setgray stroke grestore} def\n")
+ printf("/textxy {moveto show} bind def\n")
+ printf("0.0001 setlinewidth\n")
+}
+$1 == "GC" && NF == 2 {
+ number_of_groups=$2
+ printf("/Times-Roman findfont %g scalefont setfont\n",
+ 1.0 / number_of_groups)
+ next
+}
+$1 == "BC" && NF == 2 {
+ blocks_per_group=$2; next
+}
+$1 == "T" && NF > 1 {
+ printf("(%s) %g %g textxy\n",
+ substr($0, 2), 0, 1.02)
+ next
+}
+$1 == "G" && NF == 6 && $3 == ":" && $5 == "-" {
+ group_index=$2
+ gs=$4
+ ge=$6
+ height=1.0 / number_of_groups
+ vstart=group_index * height
+ printf("%% group %d of %d:\n0 %g 1 %g dg\n",
+ group_index, number_of_groups, vstart, vstart + height)
+ printf("(Group %s) 1.02 %g textxy\n", group_index, vstart)
+ next
+}
+$1 == "FB" && NF == 2 {
+ pos = index($2, "-")
+ printf("%% hole %s\n%g %g %g %g fb\n",
+ $2, substr($2, 0, pos) / blocks_per_group, vstart,
+ (substr($2, pos + 1) + 1) / blocks_per_group, vstart + height)
+ next
+}
+END {
+ printf("%%%%EOF\n")
+}
+' >$AWKFILE
+awk -f $AWKFILE $TEMPFILE
diff --git a/contrib/dir2fs b/contrib/dir2fs
new file mode 100755
index 0000000..abcecb3
--- /dev/null
+++ b/contrib/dir2fs
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+dir="$1"
+dev="$2"
+
+if [ "$1" = "--help" ] || [ ! -d "${dir}" ]; then
+ echo "Usage: $0 dir [mke2fs args] dev"
+ exit 1
+fi
+
+shift
+
+# Goal: Put all the files at the beginning (which mke2fs does) and minimize
+# the number of free inodes given the minimum number of blocks required.
+# Hence all this math to get the inode ratio just right.
+
+bytes="$(du -ks "${dir}" | awk '{print $1}')"
+bytes="$((bytes * 1024))"
+inodes="$(find "${dir}" -print0 | xargs -0 stat -c '%i' | sort -g | uniq | wc -l)"
+block_sz=4096
+inode_sz=256
+sb_overhead=4096
+blocks_per_group="$((block_sz * 8))"
+bytes_per_group="$((blocks_per_group * block_sz))"
+inode_bytes="$((inodes * inode_sz))"
+
+# Estimate overhead with the minimum number of groups...
+nr_groups="$(( (bytes + inode_bytes + bytes_per_group - 1) / bytes_per_group))"
+inode_bytes_per_group="$((inode_bytes / nr_groups))"
+inode_blocks_per_group="$(( (inode_bytes_per_group + (block_sz - 1)) / block_sz ))"
+per_grp_overhead="$(( ((3 + inode_blocks_per_group) * block_sz) + 64 ))"
+overhead="$(( sb_overhead + (per_grp_overhead * nr_groups) ))"
+used_bytes="$((bytes + overhead))"
+
+# Then do it again with the real number of groups.
+nr_groups="$(( (used_bytes + (bytes_per_group - 1)) / bytes_per_group))"
+tot_blocks="$((nr_groups * blocks_per_group))"
+tot_bytes="$((tot_blocks * block_sz))"
+
+ratio="$((bytes / inodes))"
+mkfs_blocks="$((tot_blocks * 4 / 3))"
+
+mke2fs -i "${ratio}" -T ext4 -d "${dir}" -O ^resize_inode,sparse_super2,metadata_csum,64bit,^has_journal -E packed_meta_blocks=1,num_backup_sb=0 -b "${block_sz}" -I "${inodesz}" -F "${dev}" "${mkfs_blocks}" || exit
+
+e2fsck -fyD "${dev}"
+
+blocks="$(dumpe2fs -h "${dev}" 2>&1 | grep 'Block count:' | awk '{print $3}')"
+while resize2fs -f -M "${dev}"; do
+ new_blocks="$(dumpe2fs -h "${dev}" 2>&1 | grep 'Block count:' | awk '{print $3}')"
+ if [ "${new_blocks}" -eq "${blocks}" ]; then
+ break;
+ fi
+ blocks="${new_blocks}"
+done
+
+if [ ! -b "${dev}" ]; then
+ truncate -s "$((blocks * block_sz))" "${dev}" || (e2image -ar "${dev}" "${dev}.min"; mv "${dev}.min" "${dev}")
+fi
+
+e2fsck -fy "${dev}"
+
+dir_blocks="$((bytes / block_sz))"
+overhead="$((blocks - dir_blocks))"
+echo "Minimized image overhead: $((100 * overhead / dir_blocks))%"
+
+exit 0
diff --git a/contrib/e2croncheck b/contrib/e2croncheck
new file mode 100755
index 0000000..de0b41f
--- /dev/null
+++ b/contrib/e2croncheck
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# e2croncheck -- run e2fsck automatically out of /etc/cron.weekly
+#
+# This script is intended to be run by the system administrator
+# periodically from the command line, or to be run once a week
+# or so by the cron daemon to check a mounted filesystem (normally
+# the root filesystem, but it could be used to check other filesystems
+# that are always mounted when the system is booted).
+#
+# Make sure you customize "VG" so it is your LVM volume group name,
+# "VOLUME" so it is the name of the filesystem's logical volume,
+# and "EMAIL" to be your e-mail address
+#
+# Written by Theodore Ts'o, Copyright 2007, 2008, 2009.
+#
+# This file may be redistributed under the terms of the
+# GNU Public License, version 2.
+#
+
+VG=ssd
+VOLUME=root
+SNAPSIZE=100m
+EMAIL=sysadmin@example.com
+
+TMPFILE=`mktemp ${TMPDIR:-/tmp}/e2fsck.log.XXXXXXXXXX`
+
+OPTS="-Fttv -C0"
+#OPTS="-Fttv -E fragcheck"
+
+set -e
+START="$(date +'%Y%m%d%H%M%S')"
+lvcreate -s -L ${SNAPSIZE} -n "${VOLUME}-snap" "${VG}/${VOLUME}"
+if nice logsave -as $TMPFILE e2fsck -p $OPTS "/dev/${VG}/${VOLUME}-snap" && \
+ nice logsave -as $TMPFILE e2fsck -fy $OPTS "/dev/${VG}/${VOLUME}-snap" ; then
+ echo 'Background scrubbing succeeded!'
+ tune2fs -C 0 -T "${START}" "/dev/${VG}/${VOLUME}"
+else
+ echo 'Background scrubbing failed! Reboot to fsck soon!'
+ tune2fs -C 16000 -T "19000101" "/dev/${VG}/${VOLUME}"
+ if test -n "$RPT-EMAIL"; then
+ mail -s "E2fsck of /dev/${VG}/${VOLUME} failed!" $EMAIL < $TMPFILE
+ fi
+fi
+lvremove -f "${VG}/${VOLUME}-snap"
+rm $TMPFILE
+
diff --git a/contrib/ext4-ioc.c b/contrib/ext4-ioc.c
new file mode 100644
index 0000000..42f022d
--- /dev/null
+++ b/contrib/ext4-ioc.c
@@ -0,0 +1,98 @@
+/*
+ * Test program to trigger various ext4 ioctl's
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#if (!defined(EXT4_IOC_ALLOC_DA_BLKS) && defined(__linux__))
+#define EXT4_IOC_ALLOC_DA_BLKS _IO('f', 12)
+#endif
+
+#if (!defined(EXT4_IOC_SWAP_BOOT) && defined(__linux__))
+#define EXT4_IOC_SWAP_BOOT _IO('f', 17)
+#endif
+
+#if (!defined(EXT4_IOC_PRECACHE_EXTENTS) && defined(__linux__))
+#define EXT4_IOC_PRECACHE_EXTENTS _IO('f', 18)
+#endif
+
+#if (!defined(EXT4_IOC_CLEAR_ES_CACHE) && defined(__linux__))
+#define EXT4_IOC_CLEAR_ES_CACHE _IO('f', 40)
+#endif
+
+
+#define EXT4_F_RW 0x0001
+
+struct cmd {
+ const char *cmd;
+ unsigned long ioc;
+ int flags;
+};
+
+struct cmd cmds[] = {
+ { "alloc_da_blks", EXT4_IOC_ALLOC_DA_BLKS, EXT4_F_RW },
+ { "precache", EXT4_IOC_PRECACHE_EXTENTS, 0 },
+ { "swap_boot", EXT4_IOC_SWAP_BOOT, EXT4_F_RW },
+ { "clear_es_cache", EXT4_IOC_CLEAR_ES_CACHE, EXT4_F_RW },
+ { NULL, 0 }
+};
+
+const char *progname;
+
+void usage()
+{
+ struct cmd *p;
+
+ fprintf(stderr, "Usage: %s <cmd> <file>\n\n", progname);
+ fprintf(stderr, "Available commands:\n");
+ for (p = cmds; p->cmd; p++) {
+ fprintf(stderr, "\t%s\n", p->cmd);
+ }
+ exit(1);
+}
+
+int do_single_cmd(const char *fn, struct cmd *p)
+{
+ int fd;
+ int oflags = O_RDONLY;
+
+ if (p->flags & EXT4_F_RW)
+ oflags = O_RDWR;
+ fd = open(fn, oflags, 0);
+ if (fd < 0) {
+ perror("open");
+ return 1;
+ }
+ if (ioctl(fd, p->ioc) < 0) {
+ perror("ioctl");
+ return 1;
+ }
+ close(fd);
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ int i, fails = 0;
+ struct cmd *p;
+
+ progname = argv[0];
+ if (argc < 3 || strcmp(argv[1], "help") == 0)
+ usage();
+ for (p = cmds; p->cmd; p++) {
+ if (strcmp(argv[1], p->cmd) == 0)
+ break;
+ }
+ if (p->cmd == NULL) {
+ fprintf(stderr, "Invalid command: %s\n", argv[1]);
+ usage();
+ }
+ for (i = 2; i < argc; i++)
+ fails += do_single_cmd(argv[i], p);
+ return fails;
+}
diff --git a/contrib/fallocate.c b/contrib/fallocate.c
new file mode 100644
index 0000000..16c08ab
--- /dev/null
+++ b/contrib/fallocate.c
@@ -0,0 +1,190 @@
+/*
+ * fallocate - utility to use the fallocate system call
+ *
+ * Copyright (C) 2008 Red Hat, Inc. All rights reserved.
+ * Written by Eric Sandeen <sandeen@redhat.com>
+ *
+ * cvtnum routine taken from xfsprogs,
+ * Copyright (c) 2003-2005 Silicon Graphics, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include <sys/stat.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <ctype.h>
+
+// #include <linux/falloc.h>
+#define FALLOC_FL_KEEP_SIZE 0x01
+#define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
+#define FALLOC_FL_COLLAPSE_RANGE 0x08
+#define FALLOC_FL_ZERO_RANGE 0x10
+
+void usage(void)
+{
+ printf("Usage: fallocate [-npt] [-o offset] -l length filename\n");
+ exit(EXIT_FAILURE);
+}
+
+#define EXABYTES(x) ((long long)(x) << 60)
+#define PETABYTES(x) ((long long)(x) << 50)
+#define TERABYTES(x) ((long long)(x) << 40)
+#define GIGABYTES(x) ((long long)(x) << 30)
+#define MEGABYTES(x) ((long long)(x) << 20)
+#define KILOBYTES(x) ((long long)(x) << 10)
+
+long long
+cvtnum(char *s)
+{
+ long long i;
+ char *sp;
+ int c;
+
+ i = strtoll(s, &sp, 0);
+ if (i == 0 && sp == s)
+ return -1LL;
+ if (*sp == '\0')
+ return i;
+ if (sp[1] != '\0')
+ return -1LL;
+
+ c = tolower(*sp);
+ switch (c) {
+ case 'k':
+ return KILOBYTES(i);
+ case 'm':
+ return MEGABYTES(i);
+ case 'g':
+ return GIGABYTES(i);
+ case 't':
+ return TERABYTES(i);
+ case 'p':
+ return PETABYTES(i);
+ case 'e':
+ return EXABYTES(i);
+ }
+
+ return -1LL;
+}
+
+int main(int argc, char **argv)
+{
+ int fd;
+ char *fname;
+ int opt;
+ ext2_loff_t length = -2LL;
+ ext2_loff_t offset = 0;
+ int falloc_mode = 0;
+ int error;
+ int tflag = 0;
+
+ while ((opt = getopt(argc, argv, "npl:o:tzc")) != -1) {
+ switch(opt) {
+ case 'n':
+ /* do not change filesize */
+ falloc_mode = FALLOC_FL_KEEP_SIZE;
+ break;
+ case 'p':
+ /* punch mode */
+ falloc_mode = (FALLOC_FL_PUNCH_HOLE |
+ FALLOC_FL_KEEP_SIZE);
+ break;
+ case 'c':
+ /* collapse range mode */
+ falloc_mode = (FALLOC_FL_COLLAPSE_RANGE |
+ FALLOC_FL_KEEP_SIZE);
+ break;
+ case 'z':
+ /* zero range mode */
+ falloc_mode = (FALLOC_FL_ZERO_RANGE |
+ FALLOC_FL_KEEP_SIZE);
+ break;
+ case 'l':
+ length = cvtnum(optarg);
+ break;
+ case 'o':
+ offset = cvtnum(optarg);
+ break;
+ case 't':
+ tflag++;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ if (length == -2LL) {
+ printf("Error: no length argument specified\n");
+ usage();
+ }
+
+ if (length <= 0) {
+ printf("Error: invalid length value specified\n");
+ usage();
+ }
+
+ if (offset < 0) {
+ printf("Error: invalid offset value specified\n");
+ usage();
+ }
+
+ if (tflag && (falloc_mode & FALLOC_FL_KEEP_SIZE)) {
+ printf("-n and -t options incompatible\n");
+ usage();
+ }
+
+ if (tflag && offset) {
+ printf("-n and -o options incompatible\n");
+ usage();
+ }
+
+ if (optind == argc) {
+ printf("Error: no filename specified\n");
+ usage();
+ }
+
+ fname = argv[optind++];
+
+ /* Should we create the file if it doesn't already exist? */
+ fd = open(fname, O_WRONLY|O_LARGEFILE);
+ if (fd < 0) {
+ perror("Error opening file");
+ exit(EXIT_FAILURE);
+ }
+
+ if (tflag)
+ error = ftruncate(fd, length);
+ else
+ error = syscall(SYS_fallocate, fd, falloc_mode, offset, length);
+
+ if (error < 0) {
+ perror("fallocate failed");
+ exit(EXIT_FAILURE);
+ }
+
+ close(fd);
+ return 0;
+}
diff --git a/contrib/fsstress.c b/contrib/fsstress.c
new file mode 100644
index 0000000..2136a90
--- /dev/null
+++ b/contrib/fsstress.c
@@ -0,0 +1,2708 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like. Any license provided herein, whether implied or
+ * otherwise, applies only to this software file. Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA 94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ */
+
+#define NO_XFS
+#define HAVE_SYS_PRCTL_H
+#define _LARGEFILE64_SOURCE
+
+#define MAXNAMELEN 1024
+struct dioattr {
+ int d_miniosz, d_maxiosz, d_mem;
+};
+
+#define MIN(a,b) ((a)<(b) ? (a):(b))
+#define MAX(a,b) ((a)>(b) ? (a):(b))
+
+#include <sys/stat.h>
+#include <sys/statvfs.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <dirent.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#ifndef O_DIRECT
+#define O_DIRECT 040000
+#endif
+
+#ifdef HAVE_SYS_PRCTL_H
+# include <sys/prctl.h>
+#endif
+
+#define XFS_ERRTAG_MAX 17
+
+typedef enum {
+#ifndef NO_XFS
+ OP_ALLOCSP,
+ OP_ATTR_REMOVE,
+ OP_ATTR_SET,
+ OP_BULKSTAT,
+ OP_BULKSTAT1,
+#endif
+ OP_CHOWN,
+ OP_CREAT,
+ OP_DREAD,
+ OP_DWRITE,
+ OP_FDATASYNC,
+#ifndef NO_XFS
+ OP_FREESP,
+#endif
+ OP_FSYNC,
+ OP_GETDENTS,
+ OP_LINK,
+ OP_MKDIR,
+ OP_MKNOD,
+ OP_READ,
+ OP_READLINK,
+ OP_RENAME,
+#ifndef NO_XFS
+ OP_RESVSP,
+#endif
+ OP_RMDIR,
+ OP_STAT,
+ OP_SYMLINK,
+ OP_SYNC,
+ OP_TRUNCATE,
+ OP_UNLINK,
+#ifndef NO_XFS
+ OP_UNRESVSP,
+#endif
+ OP_WRITE,
+ OP_LAST
+} opty_t;
+
+typedef void (*opfnc_t) (int, long);
+
+typedef struct opdesc {
+ opty_t op;
+ char *name;
+ opfnc_t func;
+ int freq;
+ int iswrite;
+ int isxfs;
+} opdesc_t;
+
+typedef struct fent {
+ int id;
+ int parent;
+} fent_t;
+
+typedef struct flist {
+ int nfiles;
+ int nslots;
+ int tag;
+ fent_t *fents;
+} flist_t;
+
+typedef struct pathname {
+ int len;
+ char *path;
+} pathname_t;
+
+#define FT_DIR 0
+#define FT_DIRm (1 << FT_DIR)
+#define FT_REG 1
+#define FT_REGm (1 << FT_REG)
+#define FT_SYM 2
+#define FT_SYMm (1 << FT_SYM)
+#define FT_DEV 3
+#define FT_DEVm (1 << FT_DEV)
+#define FT_RTF 4
+#define FT_RTFm (1 << FT_RTF)
+#define FT_nft 5
+#define FT_ANYm ((1 << FT_nft) - 1)
+#define FT_REGFILE (FT_REGm | FT_RTFm)
+#define FT_NOTDIR (FT_ANYm & ~FT_DIRm)
+
+#define FLIST_SLOT_INCR 16
+#define NDCACHE 64
+
+#define MAXFSIZE ((1ULL << 63) - 1ULL)
+#define MAXFSIZE32 ((1ULL << 40) - 1ULL)
+
+void allocsp_f(int, long);
+void attr_remove_f(int, long);
+void attr_set_f(int, long);
+void bulkstat_f(int, long);
+void bulkstat1_f(int, long);
+void chown_f(int, long);
+void creat_f(int, long);
+void dread_f(int, long);
+void dwrite_f(int, long);
+void fdatasync_f(int, long);
+void freesp_f(int, long);
+void fsync_f(int, long);
+void getdents_f(int, long);
+void link_f(int, long);
+void mkdir_f(int, long);
+void mknod_f(int, long);
+void read_f(int, long);
+void readlink_f(int, long);
+void rename_f(int, long);
+void resvsp_f(int, long);
+void rmdir_f(int, long);
+void stat_f(int, long);
+void symlink_f(int, long);
+void sync_f(int, long);
+void truncate_f(int, long);
+void unlink_f(int, long);
+void unresvsp_f(int, long);
+void write_f(int, long);
+
+opdesc_t ops[] = {
+#ifndef NO_XFS
+ {OP_ALLOCSP, "allocsp", allocsp_f, 1, 1, 1},
+ {OP_ATTR_REMOVE, "attr_remove", attr_remove_f, /* 1 */ 0, 1, 1},
+ {OP_ATTR_SET, "attr_set", attr_set_f, /* 2 */ 0, 1, 1},
+ {OP_BULKSTAT, "bulkstat", bulkstat_f, 1, 0, 1},
+ {OP_BULKSTAT1, "bulkstat1", bulkstat1_f, 1, 0, 1},
+#endif
+ {OP_CHOWN, "chown", chown_f, 3, 1, 0},
+ {OP_CREAT, "creat", creat_f, 4, 1, 0},
+ {OP_DREAD, "dread", dread_f, 4, 0, 0},
+ {OP_DWRITE, "dwrite", dwrite_f, 4, 1, 0},
+ {OP_FDATASYNC, "fdatasync", fdatasync_f, 1, 1, 0},
+#ifndef NO_XFS
+ {OP_FREESP, "freesp", freesp_f, 1, 1, 1},
+#endif
+ {OP_FSYNC, "fsync", fsync_f, 1, 1, 0},
+ {OP_GETDENTS, "getdents", getdents_f, 1, 0, 0},
+ {OP_LINK, "link", link_f, 1, 1, 0},
+ {OP_MKDIR, "mkdir", mkdir_f, 2, 1, 0},
+ {OP_MKNOD, "mknod", mknod_f, 2, 1, 0},
+ {OP_READ, "read", read_f, 1, 0, 0},
+ {OP_READLINK, "readlink", readlink_f, 1, 0, 0},
+ {OP_RENAME, "rename", rename_f, 2, 1, 0},
+#ifndef NO_XFS
+ {OP_RESVSP, "resvsp", resvsp_f, 1, 1, 1},
+#endif
+ {OP_RMDIR, "rmdir", rmdir_f, 1, 1, 0},
+ {OP_STAT, "stat", stat_f, 1, 0, 0},
+ {OP_SYMLINK, "symlink", symlink_f, 2, 1, 0},
+ {OP_SYNC, "sync", sync_f, 1, 0, 0},
+ {OP_TRUNCATE, "truncate", truncate_f, 2, 1, 0},
+ {OP_UNLINK, "unlink", unlink_f, 1, 1, 0},
+#ifndef NO_XFS
+ {OP_UNRESVSP, "unresvsp", unresvsp_f, 1, 1, 1},
+#endif
+ {OP_WRITE, "write", write_f, 4, 1, 0},
+}, *ops_end;
+
+flist_t flist[FT_nft] = {
+ {0, 0, 'd', NULL},
+ {0, 0, 'f', NULL},
+ {0, 0, 'l', NULL},
+ {0, 0, 'c', NULL},
+ {0, 0, 'r', NULL},
+};
+
+int dcache[NDCACHE];
+int errrange;
+int errtag;
+opty_t *freq_table;
+int freq_table_size;
+#ifndef NO_XFS
+xfs_fsop_geom_t geom;
+#endif
+char *homedir;
+int *ilist;
+int ilistlen;
+off64_t maxfsize;
+char *myprog;
+int namerand;
+int nameseq;
+int nops;
+int nproc = 1;
+int operations = 1;
+int procid;
+int rtpct;
+unsigned long seed = 0;
+ino_t top_ino;
+int verbose = 0;
+#ifndef NO_XFS
+int no_xfs = 0;
+#else
+int no_xfs = 1;
+#endif
+sig_atomic_t should_stop = 0;
+
+void add_to_flist(int, int, int);
+void append_pathname(pathname_t *, char *);
+#ifndef NO_XFS
+int attr_list_path(pathname_t *, char *, const int, int, attrlist_cursor_t *);
+int attr_remove_path(pathname_t *, const char *, int);
+int attr_set_path(pathname_t *, const char *, const char *, const int, int);
+#endif
+void check_cwd(void);
+int creat_path(pathname_t *, mode_t);
+void dcache_enter(int, int);
+void dcache_init(void);
+fent_t *dcache_lookup(int);
+void dcache_purge(int);
+void del_from_flist(int, int);
+int dirid_to_name(char *, int);
+void doproc(void);
+void fent_to_name(pathname_t *, flist_t *, fent_t *);
+void fix_parent(int, int);
+void free_pathname(pathname_t *);
+int generate_fname(fent_t *, int, pathname_t *, int *, int *);
+int get_fname(int, long, pathname_t *, flist_t **, fent_t **, int *);
+void init_pathname(pathname_t *);
+int lchown_path(pathname_t *, uid_t, gid_t);
+int link_path(pathname_t *, pathname_t *);
+int lstat64_path(pathname_t *, struct stat64 *);
+void make_freq_table(void);
+int mkdir_path(pathname_t *, mode_t);
+int mknod_path(pathname_t *, mode_t, dev_t);
+void namerandpad(int, char *, int);
+int open_path(pathname_t *, int);
+DIR *opendir_path(pathname_t *);
+void process_freq(char *);
+int readlink_path(pathname_t *, char *, size_t);
+int rename_path(pathname_t *, pathname_t *);
+int rmdir_path(pathname_t *);
+void separate_pathname(pathname_t *, char *, pathname_t *);
+void show_ops(int, char *);
+int stat64_path(pathname_t *, struct stat64 *);
+int symlink_path(const char *, pathname_t *);
+int truncate64_path(pathname_t *, off64_t);
+int unlink_path(pathname_t *);
+void usage(void);
+void write_freq(void);
+void zero_freq(void);
+
+void sg_handler(int signum)
+{
+ should_stop = 1;
+}
+
+int main(int argc, char **argv)
+{
+ char buf[10];
+ int c;
+ char *dirname = NULL;
+ int fd;
+ int i;
+ int cleanup = 0;
+ int loops = 1;
+ int loopcntr = 1;
+ char cmd[256];
+#ifndef NO_XFS
+ int j;
+#endif
+ char *p;
+ int stat;
+ struct timeval t;
+#ifndef NO_XFS
+ ptrdiff_t srval;
+#endif
+ int nousage = 0;
+#ifndef NO_XFS
+ xfs_error_injection_t err_inj;
+#endif
+ struct sigaction action;
+
+ errrange = errtag = 0;
+ umask(0);
+ nops = sizeof(ops) / sizeof(ops[0]);
+ ops_end = &ops[nops];
+ myprog = argv[0];
+ while ((c = getopt(argc, argv, "cd:e:f:i:l:n:p:rs:vwzHSX")) != -1) {
+ switch (c) {
+ case 'c':
+ /*Don't cleanup */
+ cleanup = 1;
+ break;
+ case 'd':
+ dirname = optarg;
+ break;
+ case 'e':
+ sscanf(optarg, "%d", &errtag);
+ if (errtag < 0) {
+ errtag = -errtag;
+ errrange = 1;
+ } else if (errtag == 0)
+ errtag = -1;
+ if (errtag >= XFS_ERRTAG_MAX) {
+ fprintf(stderr,
+ "error tag %d too large (max %d)\n",
+ errtag, XFS_ERRTAG_MAX - 1);
+ exit(1);
+ }
+ break;
+ case 'f':
+ process_freq(optarg);
+ break;
+ case 'i':
+ ilist = realloc(ilist, ++ilistlen * sizeof(*ilist));
+ ilist[ilistlen - 1] = strtol(optarg, &p, 16);
+ break;
+ case 'l':
+ loops = atoi(optarg);
+ break;
+ case 'n':
+ operations = atoi(optarg);
+ break;
+ case 'p':
+ nproc = atoi(optarg);
+ break;
+ case 'r':
+ namerand = 1;
+ break;
+ case 's':
+ seed = strtoul(optarg, NULL, 0);
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'w':
+ write_freq();
+ break;
+ case 'z':
+ zero_freq();
+ break;
+ case 'S':
+ show_ops(0, NULL);
+ printf("\n");
+ nousage = 1;
+ break;
+ case '?':
+ fprintf(stderr, "%s - invalid parameters\n", myprog);
+ /* fall through */
+ case 'H':
+ usage();
+ exit(1);
+ case 'X':
+ no_xfs = 1;
+ break;
+ }
+ }
+
+ if (no_xfs && errtag) {
+ fprintf(stderr, "error injection only works on XFS\n");
+ exit(1);
+ }
+
+ if (no_xfs) {
+ int i;
+ for (i = 0; ops + i < ops_end; ++i) {
+ if (ops[i].isxfs)
+ ops[i].freq = 0;
+ }
+ }
+
+ make_freq_table();
+
+ while (((loopcntr <= loops) || (loops == 0)) && !should_stop) {
+ if (!dirname) {
+ /* no directory specified */
+ if (!nousage)
+ usage();
+ exit(1);
+ }
+
+ (void)mkdir(dirname, 0777);
+ if (chdir(dirname) < 0) {
+ perror(dirname);
+ exit(1);
+ }
+ sprintf(buf, "fss%x", getpid());
+ fd = creat(buf, 0666);
+ if (lseek64(fd, (off64_t) (MAXFSIZE32 + 1ULL), SEEK_SET) < 0)
+ maxfsize = (off64_t) MAXFSIZE32;
+ else
+ maxfsize = (off64_t) MAXFSIZE;
+ dcache_init();
+ setlinebuf(stdout);
+ if (!seed) {
+ gettimeofday(&t, NULL);
+ seed = (int)t.tv_sec ^ (int)t.tv_usec;
+ printf("seed = %ld\n", seed);
+ }
+#ifndef NO_XFS
+ if (!no_xfs) {
+ memset(&geom, 0, sizeof(geom));
+ i = ioctl(fd, XFS_IOC_FSGEOMETRY, &geom);
+ if (i >= 0 && geom.rtblocks)
+ rtpct = MIN(MAX(geom.rtblocks * 100 /
+ (geom.rtblocks +
+ geom.datablocks), 1), 99);
+ else
+ rtpct = 0;
+ }
+ if (errtag != 0) {
+ if (errrange == 0) {
+ if (errtag <= 0) {
+ srandom(seed);
+ j = random() % 100;
+
+ for (i = 0; i < j; i++)
+ (void)random();
+
+ errtag =
+ (random() % (XFS_ERRTAG_MAX - 1)) +
+ 1;
+ }
+ } else {
+ srandom(seed);
+ j = random() % 100;
+
+ for (i = 0; i < j; i++)
+ (void)random();
+
+ errtag +=
+ (random() % (XFS_ERRTAG_MAX - errtag));
+ }
+ printf("Injecting failure on tag #%d\n", errtag);
+ memset(&err_inj, 0, sizeof(err_inj));
+ err_inj.errtag = errtag;
+ err_inj.fd = fd;
+ srval = ioctl(fd, XFS_IOC_ERROR_INJECTION, &err_inj);
+ if (srval < -1) {
+ perror
+ ("fsstress - XFS_SYSSGI error injection call");
+ close(fd);
+ unlink(buf);
+ exit(1);
+ }
+ } else
+#endif
+ close(fd);
+ unlink(buf);
+
+
+ if (nproc == 1) {
+ procid = 0;
+ doproc();
+ } else {
+ setpgid(0, 0);
+ action.sa_handler = sg_handler;
+ sigemptyset(&action.sa_mask);
+ action.sa_flags = 0;
+ if (sigaction(SIGTERM, &action, 0)) {
+ perror("sigaction failed");
+ exit(1);
+ }
+
+ for (i = 0; i < nproc; i++) {
+ if (fork() == 0) {
+
+ action.sa_handler = SIG_DFL;
+ sigemptyset(&action.sa_mask);
+ if (sigaction(SIGTERM, &action, 0))
+ return 1;
+#ifdef HAVE_SYS_PRCTL_H
+ prctl(PR_SET_PDEATHSIG, SIGKILL);
+ if (getppid() == 1) /* parent died already? */
+ return 0;
+#endif
+ procid = i;
+ doproc();
+ return 0;
+ }
+ }
+ while (wait(&stat) > 0 && !should_stop) {
+ continue;
+ }
+ if (should_stop) {
+ action.sa_flags = SA_RESTART;
+ sigaction(SIGTERM, &action, 0);
+ kill(-getpid(), SIGTERM);
+ while (wait(&stat) > 0)
+ continue;
+ }
+ }
+#ifndef NO_XFS
+ if (errtag != 0) {
+ memset(&err_inj, 0, sizeof(err_inj));
+ err_inj.errtag = 0;
+ err_inj.fd = fd;
+ if ((srval =
+ ioctl(fd, XFS_IOC_ERROR_CLEARALL,
+ &err_inj)) != 0) {
+ fprintf(stderr, "Bad ej clear on %d (%d).\n",
+ fd, errno);
+ perror
+ ("fsstress - XFS_SYSSGI clear error injection call");
+ close(fd);
+ exit(1);
+ }
+ close(fd);
+ }
+#endif
+ if (cleanup == 0) {
+ sprintf(cmd, "rm -rf %s/*", dirname);
+ system(cmd);
+ for (i = 0; i < FT_nft; i++) {
+ flist[i].nslots = 0;
+ flist[i].nfiles = 0;
+ free(flist[i].fents);
+ flist[i].fents = NULL;
+ }
+ }
+ loopcntr++;
+ }
+ return 0;
+}
+
+void add_to_flist(int ft, int id, int parent)
+{
+ fent_t *fep;
+ flist_t *ftp;
+
+ ftp = &flist[ft];
+ if (ftp->nfiles == ftp->nslots) {
+ ftp->nslots += FLIST_SLOT_INCR;
+ ftp->fents = realloc(ftp->fents, ftp->nslots * sizeof(fent_t));
+ }
+ fep = &ftp->fents[ftp->nfiles++];
+ fep->id = id;
+ fep->parent = parent;
+}
+
+void append_pathname(pathname_t * name, char *str)
+{
+ int len;
+ char *path;
+
+ len = strlen(str);
+#ifdef DEBUG
+ if (len && *str == '/' && name->len == 0) {
+ fprintf(stderr, "fsstress: append_pathname failure\n");
+ chdir(homedir);
+ abort();
+
+ }
+#endif
+ path = realloc(name->path, name->len + 1 + len);
+ if (path == NULL) {
+ fprintf(stderr, "fsstress: append_pathname realloc failed\n");
+ chdir(homedir);
+ abort();
+ }
+ name->path = path;
+ strcpy(&name->path[name->len], str);
+ name->len += len;
+}
+
+#ifndef NO_XFS
+int
+attr_list_path(pathname_t * name, char *buffer, const int buffersize, int flags,
+ attrlist_cursor_t * cursor)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = attr_list(name->path, buffer, buffersize, flags, cursor);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = attr_list_path(&newname, buffer, buffersize, flags,
+ cursor);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int attr_remove_path(pathname_t * name, const char *attrname, int flags)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = attr_remove(name->path, attrname, flags);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = attr_remove_path(&newname, attrname, flags);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int
+attr_set_path(pathname_t * name, const char *attrname, const char *attrvalue,
+ const int valuelength, int flags)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = attr_set(name->path, attrname, attrvalue, valuelength, flags);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = attr_set_path(&newname, attrname, attrvalue, valuelength,
+ flags);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+#endif
+
+void check_cwd(void)
+{
+#ifdef DEBUG
+ struct stat64 statbuf;
+
+ if (stat64(".", &statbuf) == 0 && statbuf.st_ino == top_ino)
+ return;
+ chdir(homedir);
+ fprintf(stderr, "fsstress: check_cwd failure\n");
+ abort();
+
+#endif
+}
+
+int creat_path(pathname_t * name, mode_t mode)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = creat(name->path, mode);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = creat_path(&newname, mode);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+void dcache_enter(int dirid, int slot)
+{
+ dcache[dirid % NDCACHE] = slot;
+}
+
+void dcache_init(void)
+{
+ int i;
+
+ for (i = 0; i < NDCACHE; i++)
+ dcache[i] = -1;
+}
+
+fent_t *dcache_lookup(int dirid)
+{
+ fent_t *fep;
+ int i;
+
+ i = dcache[dirid % NDCACHE];
+ if (i >= 0 && (fep = &flist[FT_DIR].fents[i])->id == dirid)
+ return fep;
+ return NULL;
+}
+
+void dcache_purge(int dirid)
+{
+ int *dcp;
+
+ dcp = &dcache[dirid % NDCACHE];
+ if (*dcp >= 0 && flist[FT_DIR].fents[*dcp].id == dirid)
+ *dcp = -1;
+}
+
+void del_from_flist(int ft, int slot)
+{
+ flist_t *ftp;
+
+ ftp = &flist[ft];
+ if (ft == FT_DIR)
+ dcache_purge(ftp->fents[slot].id);
+ if (slot != ftp->nfiles - 1) {
+ if (ft == FT_DIR)
+ dcache_purge(ftp->fents[ftp->nfiles - 1].id);
+ ftp->fents[slot] = ftp->fents[--ftp->nfiles];
+ } else
+ ftp->nfiles--;
+}
+
+fent_t *dirid_to_fent(int dirid)
+{
+ fent_t *efep;
+ fent_t *fep;
+ flist_t *flp;
+
+ if ((fep = dcache_lookup(dirid)))
+ return fep;
+ flp = &flist[FT_DIR];
+ for (fep = flp->fents, efep = &fep[flp->nfiles]; fep < efep; fep++) {
+ if (fep->id == dirid) {
+ dcache_enter(dirid, fep - flp->fents);
+ return fep;
+ }
+ }
+ return NULL;
+}
+
+void doproc(void)
+{
+ struct stat64 statbuf;
+ char buf[10];
+ int opno;
+ int rval;
+ opdesc_t *p;
+
+ sprintf(buf, "p%x", procid);
+ (void)mkdir(buf, 0777);
+ if (chdir(buf) < 0 || stat64(".", &statbuf) < 0) {
+ perror(buf);
+ _exit(1);
+ }
+ top_ino = statbuf.st_ino;
+ homedir = getcwd(NULL, -1);
+ seed += procid;
+ srandom(seed);
+ if (namerand)
+ namerand = random();
+ for (opno = 0; opno < operations; opno++) {
+ p = &ops[freq_table[random() % freq_table_size]];
+ if ((unsigned long)p->func < 4096)
+ abort();
+
+ p->func(opno, random());
+ /*
+ * test for forced shutdown by stat'ing the test
+ * directory. If this stat returns EIO, assume
+ * the forced shutdown happened.
+ */
+ if (errtag != 0 && opno % 100 == 0) {
+ rval = stat64(".", &statbuf);
+ if (rval == EIO) {
+ fprintf(stderr, "Detected EIO\n");
+ return;
+ }
+ }
+ }
+}
+
+void fent_to_name(pathname_t * name, flist_t * flp, fent_t * fep)
+{
+ char buf[MAXNAMELEN];
+ int i;
+ fent_t *pfep;
+
+ if (fep == NULL)
+ return;
+ if (fep->parent != -1) {
+ pfep = dirid_to_fent(fep->parent);
+ fent_to_name(name, &flist[FT_DIR], pfep);
+ append_pathname(name, "/");
+ }
+ i = sprintf(buf, "%c%x", flp->tag, fep->id);
+ namerandpad(fep->id, buf, i);
+ append_pathname(name, buf);
+}
+
+void fix_parent(int oldid, int newid)
+{
+ fent_t *fep;
+ flist_t *flp;
+ int i;
+ int j;
+
+ for (i = 0, flp = flist; i < FT_nft; i++, flp++) {
+ for (j = 0, fep = flp->fents; j < flp->nfiles; j++, fep++) {
+ if (fep->parent == oldid)
+ fep->parent = newid;
+ }
+ }
+}
+
+void free_pathname(pathname_t * name)
+{
+ if (name->path) {
+ free(name->path);
+ name->path = NULL;
+ name->len = 0;
+ }
+}
+
+int generate_fname(fent_t * fep, int ft, pathname_t * name, int *idp, int *v)
+{
+ char buf[MAXNAMELEN];
+ flist_t *flp;
+ int id;
+ int j;
+ int len;
+
+ flp = &flist[ft];
+ len = sprintf(buf, "%c%x", flp->tag, id = nameseq++);
+ namerandpad(id, buf, len);
+ if (fep) {
+ fent_to_name(name, &flist[FT_DIR], fep);
+ append_pathname(name, "/");
+ }
+ append_pathname(name, buf);
+ *idp = id;
+ *v = verbose;
+ for (j = 0; !*v && j < ilistlen; j++) {
+ if (ilist[j] == id) {
+ *v = 1;
+ break;
+ }
+ }
+ return 1;
+}
+
+int
+get_fname(int which, long r, pathname_t * name, flist_t ** flpp, fent_t ** fepp,
+ int *v)
+{
+ int c;
+ fent_t *fep;
+ flist_t *flp;
+ int i;
+ int j;
+ int x;
+
+ for (i = 0, c = 0, flp = flist; i < FT_nft; i++, flp++) {
+ if (which & (1 << i))
+ c += flp->nfiles;
+ }
+ if (c == 0) {
+ if (flpp)
+ *flpp = NULL;
+ if (fepp)
+ *fepp = NULL;
+ *v = verbose;
+ return 0;
+ }
+ x = (int)(r % c);
+ for (i = 0, c = 0, flp = flist; i < FT_nft; i++, flp++) {
+ if (which & (1 << i)) {
+ if (x < c + flp->nfiles) {
+ fep = &flp->fents[x - c];
+ if (name)
+ fent_to_name(name, flp, fep);
+ if (flpp)
+ *flpp = flp;
+ if (fepp)
+ *fepp = fep;
+ *v = verbose;
+ for (j = 0; !*v && j < ilistlen; j++) {
+ if (ilist[j] == fep->id) {
+ *v = 1;
+ break;
+ }
+ }
+ return 1;
+ }
+ c += flp->nfiles;
+ }
+ }
+#ifdef DEBUG
+ fprintf(stderr, "fsstress: get_fname failure\n");
+ abort();
+#endif
+ return -1;
+
+}
+
+void init_pathname(pathname_t * name)
+{
+ name->len = 0;
+ name->path = NULL;
+}
+
+int lchown_path(pathname_t * name, uid_t owner, gid_t group)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = lchown(name->path, owner, group);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = lchown_path(&newname, owner, group);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int link_path(pathname_t * name1, pathname_t * name2)
+{
+ char buf1[MAXNAMELEN];
+ char buf2[MAXNAMELEN];
+ int down1;
+ pathname_t newname1;
+ pathname_t newname2;
+ int rval;
+
+ rval = link(name1->path, name2->path);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name1, buf1, &newname1);
+ separate_pathname(name2, buf2, &newname2);
+ if (strcmp(buf1, buf2) == 0) {
+ if (chdir(buf1) == 0) {
+ rval = link_path(&newname1, &newname2);
+ chdir("..");
+ }
+ } else {
+ if (strcmp(buf1, "..") == 0)
+ down1 = 0;
+ else if (strcmp(buf2, "..") == 0)
+ down1 = 1;
+ else if (strlen(buf1) == 0)
+ down1 = 0;
+ else if (strlen(buf2) == 0)
+ down1 = 1;
+ else
+ down1 = MAX(newname1.len, 3 + name2->len) <=
+ MAX(3 + name1->len, newname2.len);
+ if (down1) {
+ free_pathname(&newname2);
+ append_pathname(&newname2, "../");
+ append_pathname(&newname2, name2->path);
+ if (chdir(buf1) == 0) {
+ rval = link_path(&newname1, &newname2);
+ chdir("..");
+ }
+ } else {
+ free_pathname(&newname1);
+ append_pathname(&newname1, "../");
+ append_pathname(&newname1, name1->path);
+ if (chdir(buf2) == 0) {
+ rval = link_path(&newname1, &newname2);
+ chdir("..");
+ }
+ }
+ }
+ free_pathname(&newname1);
+ free_pathname(&newname2);
+ return rval;
+}
+
+int lstat64_path(pathname_t * name, struct stat64 *sbuf)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = lstat64(name->path, sbuf);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = lstat64_path(&newname, sbuf);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+void make_freq_table(void)
+{
+ int f;
+ int i;
+ opdesc_t *p;
+
+ for (p = ops, f = 0; p < ops_end; p++)
+ f += p->freq;
+ freq_table = malloc(f * sizeof(*freq_table));
+ freq_table_size = f;
+ for (p = ops, i = 0; p < ops_end; p++) {
+ for (f = 0; f < p->freq; f++, i++)
+ freq_table[i] = p->op;
+ }
+}
+
+int mkdir_path(pathname_t * name, mode_t mode)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = mkdir(name->path, mode);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = mkdir_path(&newname, mode);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int mknod_path(pathname_t * name, mode_t mode, dev_t dev)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = mknod(name->path, mode, dev);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = mknod_path(&newname, mode, dev);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+void namerandpad(int id, char *buf, int i)
+{
+ int bucket;
+ static int buckets[] = { 2, 4, 8, 16, 32, 64, 128, MAXNAMELEN - 1 };
+ int padlen;
+ int padmod;
+
+ if (namerand == 0)
+ return;
+ bucket = (id ^ namerand) % (sizeof(buckets) / sizeof(buckets[0]));
+ padmod = buckets[bucket] + 1 - i;
+ if (padmod <= 0)
+ return;
+ padlen = (id ^ namerand) % padmod;
+ if (padlen) {
+ memset(&buf[i], 'X', padlen);
+ buf[i + padlen] = '\0';
+ }
+}
+
+int open_path(pathname_t * name, int oflag)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = open(name->path, oflag);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = open_path(&newname, oflag);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+DIR *opendir_path(pathname_t * name)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ DIR *rval;
+
+ rval = opendir(name->path);
+ if (rval || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = opendir_path(&newname);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+void process_freq(char *arg)
+{
+ opdesc_t *p;
+ char *s;
+
+ s = strchr(arg, '=');
+ if (s == NULL) {
+ fprintf(stderr, "bad argument '%s'\n", arg);
+ exit(1);
+ }
+ *s++ = '\0';
+ for (p = ops; p < ops_end; p++) {
+ if (strcmp(arg, p->name) == 0) {
+ p->freq = atoi(s);
+ return;
+ }
+ }
+ fprintf(stderr, "can't find op type %s for -f\n", arg);
+ exit(1);
+}
+
+int readlink_path(pathname_t * name, char *lbuf, size_t lbufsiz)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = readlink(name->path, lbuf, lbufsiz);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = readlink_path(&newname, lbuf, lbufsiz);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int rename_path(pathname_t * name1, pathname_t * name2)
+{
+ char buf1[MAXNAMELEN];
+ char buf2[MAXNAMELEN];
+ int down1;
+ pathname_t newname1;
+ pathname_t newname2;
+ int rval;
+
+ rval = rename(name1->path, name2->path);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name1, buf1, &newname1);
+ separate_pathname(name2, buf2, &newname2);
+ if (strcmp(buf1, buf2) == 0) {
+ if (chdir(buf1) == 0) {
+ rval = rename_path(&newname1, &newname2);
+ chdir("..");
+ }
+ } else {
+ if (strcmp(buf1, "..") == 0)
+ down1 = 0;
+ else if (strcmp(buf2, "..") == 0)
+ down1 = 1;
+ else if (strlen(buf1) == 0)
+ down1 = 0;
+ else if (strlen(buf2) == 0)
+ down1 = 1;
+ else
+ down1 = MAX(newname1.len, 3 + name2->len) <=
+ MAX(3 + name1->len, newname2.len);
+ if (down1) {
+ free_pathname(&newname2);
+ append_pathname(&newname2, "../");
+ append_pathname(&newname2, name2->path);
+ if (chdir(buf1) == 0) {
+ rval = rename_path(&newname1, &newname2);
+ chdir("..");
+ }
+ } else {
+ free_pathname(&newname1);
+ append_pathname(&newname1, "../");
+ append_pathname(&newname1, name1->path);
+ if (chdir(buf2) == 0) {
+ rval = rename_path(&newname1, &newname2);
+ chdir("..");
+ }
+ }
+ }
+ free_pathname(&newname1);
+ free_pathname(&newname2);
+ return rval;
+}
+
+int rmdir_path(pathname_t * name)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = rmdir(name->path);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = rmdir_path(&newname);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+void separate_pathname(pathname_t * name, char *buf, pathname_t * newname)
+{
+ char *slash;
+
+ init_pathname(newname);
+ slash = strchr(name->path, '/');
+ if (slash == NULL) {
+ buf[0] = '\0';
+ return;
+ }
+ *slash = '\0';
+ strcpy(buf, name->path);
+ *slash = '/';
+ append_pathname(newname, slash + 1);
+}
+
+#define WIDTH 80
+
+void show_ops(int flag, char *lead_str)
+{
+ opdesc_t *p;
+
+ if (flag < 0) {
+ /* print in list form */
+ int x = WIDTH;
+
+ for (p = ops; p < ops_end; p++) {
+ if (lead_str != NULL
+ && x + strlen(p->name) >= WIDTH - 5)
+ x = printf("%s%s", (p == ops) ? "" : "\n",
+ lead_str);
+ x += printf("%s ", p->name);
+ }
+ printf("\n");
+ } else {
+ int f;
+ for (f = 0, p = ops; p < ops_end; p++)
+ f += p->freq;
+
+ if (f == 0)
+ flag = 1;
+
+ for (p = ops; p < ops_end; p++) {
+ if (flag != 0 || p->freq > 0) {
+ if (lead_str != NULL)
+ printf("%s", lead_str);
+ printf("%20s %d/%d %s\n",
+ p->name, p->freq, f,
+ (p->iswrite == 0) ? " " : "write op");
+ }
+ }
+ }
+}
+
+int stat64_path(pathname_t * name, struct stat64 *sbuf)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = stat64(name->path, sbuf);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = stat64_path(&newname, sbuf);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int symlink_path(const char *name1, pathname_t * name)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ if (!strcmp(name1, name->path)) {
+ printf("yikes! %s %s\n", name1, name->path);
+ return 0;
+ }
+
+ rval = symlink(name1, name->path);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = symlink_path(name1, &newname);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int truncate64_path(pathname_t * name, off64_t length)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = truncate64(name->path, length);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = truncate64_path(&newname, length);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+int unlink_path(pathname_t * name)
+{
+ char buf[MAXNAMELEN];
+ pathname_t newname;
+ int rval;
+
+ rval = unlink(name->path);
+ if (rval >= 0 || errno != ENAMETOOLONG)
+ return rval;
+ separate_pathname(name, buf, &newname);
+ if (chdir(buf) == 0) {
+ rval = unlink_path(&newname);
+ chdir("..");
+ }
+ free_pathname(&newname);
+ return rval;
+}
+
+void usage(void)
+{
+ printf("Usage: %s -H or\n", myprog);
+ printf
+ (" %s [-c][-d dir][-e errtg][-f op_name=freq][-l loops][-n nops]\n",
+ myprog);
+ printf(" [-p nproc][-r len][-s seed][-v][-w][-z][-S]\n");
+ printf("where\n");
+ printf
+ (" -c specifies not to remove files(cleanup) after execution\n");
+ printf
+ (" -d dir specifies the base directory for operations\n");
+ printf(" -e errtg specifies error injection stuff\n");
+ printf
+ (" -f op_name=freq changes the frequency of option name to freq\n");
+ printf(" the valid operation names are:\n");
+ show_ops(-1, " ");
+ printf
+ (" -l loops specifies the no. of times the testrun should loop.\n");
+ printf(" *use 0 for infinite (default 1)\n");
+ printf
+ (" -n nops specifies the no. of operations per process (default 1)\n");
+ printf
+ (" -p nproc specifies the no. of processes (default 1)\n");
+ printf(" -r specifies random name padding\n");
+ printf
+ (" -s seed specifies the seed for the random generator (default random)\n");
+ printf(" -v specifies verbose mode\n");
+ printf
+ (" -w zeros frequencies of non-write operations\n");
+ printf(" -z zeros frequencies of all operations\n");
+ printf
+ (" -S prints the table of operations (omitting zero frequency)\n");
+ printf(" -H prints usage and exits\n");
+ printf
+ (" -X don't do anything XFS specific (default with -DNO_XFS)\n");
+}
+
+void write_freq(void)
+{
+ opdesc_t *p;
+
+ for (p = ops; p < ops_end; p++) {
+ if (!p->iswrite)
+ p->freq = 0;
+ }
+}
+
+void zero_freq(void)
+{
+ opdesc_t *p;
+
+ for (p = ops; p < ops_end; p++)
+ p->freq = 0;
+}
+
+#ifndef NO_XFS
+
+void allocsp_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int fd;
+ struct xfs_flock64 fl;
+ __s64 lr;
+ __s64 off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: allocsp - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_RDWR);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: allocsp - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: allocsp - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ lr = ((__s64) random() << 32) + random();
+ off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
+ off %= maxfsize;
+ memset(&fl, 0, sizeof(fl));
+ fl.l_whence = SEEK_SET;
+ fl.l_start = off;
+ fl.l_len = 0;
+ e = ioctl(fd, XFS_IOC_ALLOCSP64, &fl) < 0 ? errno : 0;
+ if (v)
+ printf("%d/%d: ioctl(XFS_IOC_ALLOCSP64) %s %lld 0 %d\n",
+ procid, opno, f.path, (long long)off, e);
+ free_pathname(&f);
+ close(fd);
+}
+
+void attr_remove_f(int opno, long r)
+{
+ attrlist_ent_t *aep;
+ attrlist_t *alist;
+ char *aname;
+ char buf[4096];
+ attrlist_cursor_t cursor;
+ int e;
+ int ent;
+ pathname_t f;
+ int total;
+ int v;
+ int which;
+
+ init_pathname(&f);
+ if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
+ append_pathname(&f, ".");
+ total = 0;
+ memset(&cursor, 0x00, sizeof(cursor));
+ do {
+ e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW,
+ &cursor);
+ check_cwd();
+ if (e)
+ break;
+ alist = (attrlist_t *) buf;
+ total += alist->al_count;
+ } while (alist->al_more);
+ if (total == 0) {
+ if (v)
+ printf("%d/%d: attr_remove - no attrs for %s\n",
+ procid, opno, f.path);
+ free_pathname(&f);
+ return;
+ }
+ which = (int)(random() % total);
+ memset(&cursor, 0x00, sizeof(cursor));
+ ent = 0;
+ aname = NULL;
+ do {
+ e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW,
+ &cursor);
+ check_cwd();
+ if (e)
+ break;
+ alist = (attrlist_t *) buf;
+ if (which < ent + alist->al_count) {
+ aep = (attrlist_ent_t *)
+ & buf[alist->al_offset[which - ent]];
+ aname = aep->a_name;
+ break;
+ }
+ ent += alist->al_count;
+ } while (alist->al_more);
+ if (aname == NULL) {
+ if (v)
+ printf("%d/%d: attr_remove - name %d not found at %s\n",
+ procid, opno, which, f.path);
+ free_pathname(&f);
+ return;
+ }
+ e = attr_remove_path(&f, aname, ATTR_DONTFOLLOW) < 0 ? errno : 0;
+ check_cwd();
+ if (v)
+ printf("%d/%d: attr_remove %s %s %d\n",
+ procid, opno, f.path, aname, e);
+ free_pathname(&f);
+}
+
+void attr_set_f(int opno, long r)
+{
+ char aname[10];
+ char *aval;
+ int e;
+ pathname_t f;
+ int len;
+ static int lengths[] = { 10, 100, 1000, 10000 };
+ int li;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
+ append_pathname(&f, ".");
+ sprintf(aname, "a%x", nameseq++);
+ li = (int)(random() % (sizeof(lengths) / sizeof(lengths[0])));
+ len = (int)(random() % lengths[li]);
+ if (len == 0)
+ len = 1;
+ aval = malloc(len);
+ memset(aval, nameseq & 0xff, len);
+ e = attr_set_path(&f, aname, aval, len, ATTR_DONTFOLLOW) < 0 ?
+ errno : 0;
+ check_cwd();
+ free(aval);
+ if (v)
+ printf("%d/%d: attr_set %s %s %d\n", procid, opno, f.path,
+ aname, e);
+ free_pathname(&f);
+}
+
+void bulkstat_f(int opno, long r)
+{
+ __s32 count;
+ int fd;
+ __u64 last;
+ __s32 nent;
+ xfs_bstat_t *t;
+ __int64_t total;
+ xfs_fsop_bulkreq_t bsr;
+
+ last = 0;
+ nent = (r % 999) + 2;
+ t = malloc(nent * sizeof(*t));
+ fd = open(".", O_RDONLY);
+ total = 0;
+
+ memset(&bsr, 0, sizeof(bsr));
+ bsr.lastip = &last;
+ bsr.icount = nent;
+ bsr.ubuffer = t;
+ bsr.ocount = &count;
+
+ while (ioctl(fd, XFS_IOC_FSBULKSTAT, &bsr) == 0 && count > 0)
+ total += count;
+ free(t);
+ if (verbose)
+ printf("%d/%d: bulkstat nent %d total %lld\n",
+ procid, opno, (int)nent, (long long)total);
+ close(fd);
+}
+
+void bulkstat1_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int fd;
+ int good;
+ __u64 ino;
+ struct stat64 s;
+ xfs_bstat_t t;
+ int v;
+ xfs_fsop_bulkreq_t bsr;
+
+ good = random() & 1;
+ if (good) {
+ /* use an inode we know exists */
+ init_pathname(&f);
+ if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
+ append_pathname(&f, ".");
+ ino = stat64_path(&f, &s) < 0 ? (ino64_t) r : s.st_ino;
+ check_cwd();
+ free_pathname(&f);
+ } else {
+ /*
+ * pick a random inode
+ *
+ * note this can generate kernel warning messages
+ * since bulkstat_one will read the disk block that
+ * would contain a given inode even if that disk
+ * block doesn't contain inodes.
+ *
+ * this is detected later, but not until after the
+ * warning is displayed.
+ *
+ * "XFS: device 0x825- bad inode magic/vsn daddr 0x0 #0"
+ *
+ */
+ ino = (ino64_t) r;
+ v = verbose;
+ }
+ fd = open(".", O_RDONLY);
+
+ memset(&bsr, 0, sizeof(bsr));
+ bsr.lastip = &ino;
+ bsr.icount = 1;
+ bsr.ubuffer = &t;
+ bsr.ocount = NULL;
+
+ e = ioctl(fd, XFS_IOC_FSBULKSTAT_SINGLE, &bsr) < 0 ? errno : 0;
+ if (v)
+ printf("%d/%d: bulkstat1 %s ino %lld %d\n",
+ procid, opno, good ? "real" : "random",
+ (long long)ino, e);
+ close(fd);
+}
+
+#endif
+
+void chown_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int nbits;
+ uid_t u;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
+ append_pathname(&f, ".");
+ u = (uid_t) random();
+ nbits = (int)(random() % 32);
+ u &= (1 << nbits) - 1;
+ e = lchown_path(&f, u, -1) < 0 ? errno : 0;
+ check_cwd();
+ if (v)
+ printf("%d/%d: chown %s %d %d\n", procid, opno, f.path, u, e);
+ free_pathname(&f);
+}
+
+void creat_f(int opno, long r)
+{
+ int e;
+ int e1;
+ int extsize;
+ pathname_t f;
+ int fd;
+ fent_t *fep;
+ int id;
+ int parid;
+ int type;
+ int v;
+ int v1;
+ int esz = 0;
+
+ if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v1))
+ parid = -1;
+ else
+ parid = fep->id;
+ init_pathname(&f);
+ type = rtpct ? ((random() % 100) > rtpct ? FT_REG : FT_RTF) : FT_REG;
+ if (type == FT_RTF)
+ extsize = (random() % 10) + 1;
+ else
+ extsize = 0;
+ e = generate_fname(fep, type, &f, &id, &v);
+ v |= v1;
+ if (!e) {
+ if (v) {
+ fent_to_name(&f, &flist[FT_DIR], fep);
+ printf("%d/%d: creat - no filename from %s\n",
+ procid, opno, f.path);
+ }
+ free_pathname(&f);
+ return;
+ }
+ fd = creat_path(&f, 0666);
+ e = fd < 0 ? errno : 0;
+ e1 = 0;
+ check_cwd();
+ esz = 0;
+ if (fd >= 0) {
+#ifndef NO_XFS
+ struct fsxattr a;
+ memset(&a, 0, sizeof(a));
+ if (extsize && ioctl(fd, XFS_IOC_FSGETXATTR, &a) >= 0) {
+ a.fsx_xflags |= XFS_XFLAG_REALTIME;
+ a.fsx_extsize =
+ geom.rtextsize * geom.blocksize * extsize;
+ if (ioctl(fd, XFS_IOC_FSSETXATTR, &a) < 0)
+ e1 = errno;
+ esz = a.fsx_extsize;
+
+ }
+#endif
+ add_to_flist(type, id, parid);
+ close(fd);
+ }
+ if (v)
+ printf("%d/%d: creat %s x:%d %d %d\n", procid, opno, f.path,
+ esz, e, e1);
+ free_pathname(&f);
+}
+
+int setdirect(int fd)
+{
+ static int no_direct;
+ int flags;
+
+ if (no_direct)
+ return 0;
+
+ flags = fcntl(fd, F_GETFL, 0);
+ if (flags < 0)
+ return 0;
+
+ if (fcntl(fd, F_SETFL, flags | O_DIRECT) < 0) {
+ if (no_xfs) {
+ no_direct = 1;
+ return 0;
+ }
+ printf("cannot set O_DIRECT: %s\n", strerror(errno));
+ return 0;
+ }
+
+ return 1;
+}
+
+void dread_f(int opno, long r)
+{
+ __int64_t align;
+ char *buf = NULL;
+ struct dioattr diob;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+ __int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: dread - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_RDONLY);
+
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: dread - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+
+ if (!setdirect(fd)) {
+ close(fd);
+ free_pathname(&f);
+ return;
+ }
+
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: dread - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ if (stb.st_size == 0) {
+ if (v)
+ printf("%d/%d: dread - %s zero size\n", procid, opno,
+ f.path);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+
+ memset(&diob, 0, sizeof(diob));
+ if (no_xfs) {
+ diob.d_miniosz = stb.st_blksize;
+ diob.d_maxiosz = stb.st_blksize * 256; /* good number ? */
+ diob.d_mem = stb.st_blksize;
+ }
+#ifndef NO_XFS
+ else if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
+ if (v)
+ printf
+ ("%d/%d: dread - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+#endif
+ align = (__int64_t) diob.d_miniosz;
+ lr = ((__int64_t) random() << 32) + random();
+ off = (off64_t) (lr % stb.st_size);
+ off -= (off % align);
+ lseek64(fd, off, SEEK_SET);
+ len = (random() % (getpagesize() * 32)) + 1;
+ len -= (len % align);
+ if (len <= 0)
+ len = align;
+ else if (len > diob.d_maxiosz)
+ len = diob.d_maxiosz;
+ if ((e = posix_memalign((void **)&buf, diob.d_mem, len)) != 0) {
+ fprintf(stderr, "posix_memalign: %s\n", strerror(e));
+ exit(1);
+ }
+ if (buf == NULL) {
+ fprintf(stderr, "posix_memalign: buf is NULL\n");
+ exit(1);
+ }
+ e = read(fd, buf, len) < 0 ? errno : 0;
+ free(buf);
+ if (v)
+ printf("%d/%d: dread %s [%lld,%ld] %d\n",
+ procid, opno, f.path, (long long int)off, (long)len, e);
+ free_pathname(&f);
+ close(fd);
+}
+
+void dwrite_f(int opno, long r)
+{
+ __int64_t align;
+ char *buf = NULL;
+ struct dioattr diob;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+ __int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: dwrite - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_WRONLY);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: dwrite - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+
+ if (!setdirect(fd)) {
+ close(fd);
+ free_pathname(&f);
+ return;
+ }
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: dwrite - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ memset(&diob, 0, sizeof(diob));
+ if (no_xfs) {
+ diob.d_miniosz = stb.st_blksize;
+ diob.d_maxiosz = stb.st_blksize * 256; /* good number ? */
+ diob.d_mem = stb.st_blksize;
+ }
+#ifndef NO_XFS
+ else if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
+ if (v)
+ printf
+ ("%d/%d: dwrite - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+#endif
+ align = (__int64_t) diob.d_miniosz;
+ lr = ((__int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off -= (off % align);
+ lseek64(fd, off, SEEK_SET);
+ len = (random() % (getpagesize() * 32)) + 1;
+ len -= (len % align);
+ if (len <= 0)
+ len = align;
+ else if (len > diob.d_maxiosz)
+ len = diob.d_maxiosz;
+ if ((e = posix_memalign((void **)&buf, diob.d_mem, len)) != 0) {
+ fprintf(stderr, "posix_memalign: %s\n", strerror(e));
+ exit(1);
+ }
+ if (buf == NULL) {
+ fprintf(stderr, "posix_memalign: buf is NULL\n");
+ exit(1);
+ }
+ off %= maxfsize;
+ lseek64(fd, off, SEEK_SET);
+ memset(buf, nameseq & 0xff, len);
+ e = write(fd, buf, len) < 0 ? errno : 0;
+ free(buf);
+ if (v)
+ printf("%d/%d: dwrite %s [%lld,%ld] %d\n",
+ procid, opno, f.path, (long long)off, (long int)len, e);
+ free_pathname(&f);
+ close(fd);
+}
+
+void fdatasync_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int fd;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: fdatasync - no filename\n",
+ procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_WRONLY);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: fdatasync - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ e = fdatasync(fd) < 0 ? errno : 0;
+ if (v)
+ printf("%d/%d: fdatasync %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+ close(fd);
+}
+
+#ifndef NO_XFS
+void freesp_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int fd;
+ struct xfs_flock64 fl;
+ __s64 lr;
+ __s64 off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: freesp - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_RDWR);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: freesp - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: freesp - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ lr = ((__s64) random() << 32) + random();
+ off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
+ off %= maxfsize;
+ memset(&fl, 0, sizeof(fl));
+ fl.l_whence = SEEK_SET;
+ fl.l_start = off;
+ fl.l_len = 0;
+ e = ioctl(fd, XFS_IOC_FREESP64, &fl) < 0 ? errno : 0;
+ if (v)
+ printf("%d/%d: ioctl(XFS_IOC_FREESP64) %s %lld 0 %d\n",
+ procid, opno, f.path, (long long)off, e);
+ free_pathname(&f);
+ close(fd);
+}
+
+#endif
+
+void fsync_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int fd;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: fsync - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_WRONLY);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: fsync - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ e = fsync(fd) < 0 ? errno : 0;
+ if (v)
+ printf("%d/%d: fsync %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+ close(fd);
+}
+
+void getdents_f(int opno, long r)
+{
+ DIR *dir;
+ pathname_t f;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_DIRm, r, &f, NULL, NULL, &v))
+ append_pathname(&f, ".");
+ dir = opendir_path(&f);
+ check_cwd();
+ if (dir == NULL) {
+ if (v)
+ printf("%d/%d: getdents - can't open %s\n",
+ procid, opno, f.path);
+ free_pathname(&f);
+ return;
+ }
+ while (readdir64(dir) != NULL)
+ continue;
+ if (v)
+ printf("%d/%d: getdents %s 0\n", procid, opno, f.path);
+ free_pathname(&f);
+ closedir(dir);
+}
+
+void link_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ fent_t *fep;
+ flist_t *flp;
+ int id;
+ pathname_t l;
+ int parid;
+ int v;
+ int v1;
+
+ init_pathname(&f);
+ if (!get_fname(FT_NOTDIR, r, &f, &flp, NULL, &v1)) {
+ if (v1)
+ printf("%d/%d: link - no file\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ if (!get_fname(FT_DIRm, random(), NULL, NULL, &fep, &v))
+ parid = -1;
+ else
+ parid = fep->id;
+ v |= v1;
+ init_pathname(&l);
+ e = generate_fname(fep, flp - flist, &l, &id, &v1);
+ v |= v1;
+ if (!e) {
+ if (v) {
+ fent_to_name(&l, &flist[FT_DIR], fep);
+ printf("%d/%d: link - no filename from %s\n",
+ procid, opno, l.path);
+ }
+ free_pathname(&l);
+ free_pathname(&f);
+ return;
+ }
+ e = link_path(&f, &l) < 0 ? errno : 0;
+ check_cwd();
+ if (e == 0)
+ add_to_flist(flp - flist, id, parid);
+ if (v)
+ printf("%d/%d: link %s %s %d\n", procid, opno, f.path, l.path,
+ e);
+ free_pathname(&l);
+ free_pathname(&f);
+}
+
+void mkdir_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ fent_t *fep;
+ int id;
+ int parid;
+ int v;
+ int v1;
+
+ if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
+ parid = -1;
+ else
+ parid = fep->id;
+ init_pathname(&f);
+ e = generate_fname(fep, FT_DIR, &f, &id, &v1);
+ v |= v1;
+ if (!e) {
+ if (v) {
+ fent_to_name(&f, &flist[FT_DIR], fep);
+ printf("%d/%d: mkdir - no filename from %s\n",
+ procid, opno, f.path);
+ }
+ free_pathname(&f);
+ return;
+ }
+ e = mkdir_path(&f, 0777) < 0 ? errno : 0;
+ check_cwd();
+ if (e == 0)
+ add_to_flist(FT_DIR, id, parid);
+ if (v)
+ printf("%d/%d: mkdir %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+}
+
+void mknod_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ fent_t *fep;
+ int id;
+ int parid;
+ int v;
+ int v1;
+
+ if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
+ parid = -1;
+ else
+ parid = fep->id;
+ init_pathname(&f);
+ e = generate_fname(fep, FT_DEV, &f, &id, &v1);
+ v |= v1;
+ if (!e) {
+ if (v) {
+ fent_to_name(&f, &flist[FT_DIR], fep);
+ printf("%d/%d: mknod - no filename from %s\n",
+ procid, opno, f.path);
+ }
+ free_pathname(&f);
+ return;
+ }
+ e = mknod_path(&f, S_IFCHR | 0444, 0) < 0 ? errno : 0;
+ check_cwd();
+ if (e == 0)
+ add_to_flist(FT_DEV, id, parid);
+ if (v)
+ printf("%d/%d: mknod %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+}
+
+void read_f(int opno, long r)
+{
+ char *buf;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+ __int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: read - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_RDONLY);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: read - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: read - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ if (stb.st_size == 0) {
+ if (v)
+ printf("%d/%d: read - %s zero size\n", procid, opno,
+ f.path);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ lr = ((__int64_t) random() << 32) + random();
+ off = (off64_t) (lr % stb.st_size);
+ lseek64(fd, off, SEEK_SET);
+ len = (random() % (getpagesize() * 32)) + 1;
+ buf = malloc(len);
+ e = read(fd, buf, len) < 0 ? errno : 0;
+ free(buf);
+ if (v)
+ printf("%d/%d: read %s [%lld,%ld] %d\n",
+ procid, opno, f.path, (long long)off, (long int)len, e);
+ free_pathname(&f);
+ close(fd);
+}
+
+void readlink_f(int opno, long r)
+{
+ char buf[PATH_MAX];
+ int e;
+ pathname_t f;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_SYMm, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: readlink - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ e = readlink_path(&f, buf, PATH_MAX) < 0 ? errno : 0;
+ check_cwd();
+ if (v)
+ printf("%d/%d: readlink %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+}
+
+void rename_f(int opno, long r)
+{
+ fent_t *dfep;
+ int e;
+ pathname_t f;
+ fent_t *fep;
+ flist_t *flp;
+ int id;
+ pathname_t newf;
+ int oldid;
+ int parid;
+ int v;
+ int v1;
+
+ init_pathname(&f);
+ if (!get_fname(FT_ANYm, r, &f, &flp, &fep, &v1)) {
+ if (v1)
+ printf("%d/%d: rename - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ if (!get_fname(FT_DIRm, random(), NULL, NULL, &dfep, &v))
+ parid = -1;
+ else
+ parid = dfep->id;
+ v |= v1;
+ init_pathname(&newf);
+ e = generate_fname(dfep, flp - flist, &newf, &id, &v1);
+ v |= v1;
+ if (!e) {
+ if (v) {
+ fent_to_name(&f, &flist[FT_DIR], dfep);
+ printf("%d/%d: rename - no filename from %s\n",
+ procid, opno, f.path);
+ }
+ free_pathname(&newf);
+ free_pathname(&f);
+ return;
+ }
+ e = rename_path(&f, &newf) < 0 ? errno : 0;
+ check_cwd();
+ if (e == 0) {
+ if (flp - flist == FT_DIR) {
+ oldid = fep->id;
+ fix_parent(oldid, id);
+ }
+ del_from_flist(flp - flist, fep - flp->fents);
+ add_to_flist(flp - flist, id, parid);
+ }
+ if (v)
+ printf("%d/%d: rename %s to %s %d\n", procid, opno, f.path,
+ newf.path, e);
+ free_pathname(&newf);
+ free_pathname(&f);
+}
+
+#ifndef NO_XFS
+void resvsp_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int fd;
+ struct xfs_flock64 fl;
+ __s64 lr;
+ __s64 off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: resvsp - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_RDWR);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: resvsp - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: resvsp - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ lr = ((__s64) random() << 32) + random();
+ off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
+ off %= maxfsize;
+ memset(&fl, 0, sizeof(fl));
+ fl.l_whence = SEEK_SET;
+ fl.l_start = off;
+ fl.l_len = (__s64) (random() % (1024 * 1024));
+ e = ioctl(fd, XFS_IOC_RESVSP64, &fl) < 0 ? errno : 0;
+ if (v)
+ printf("%d/%d: ioctl(XFS_IOC_RESVSP64) %s %lld %lld %d\n",
+ procid, opno, f.path, (long long)off,
+ (long long)fl.l_len, e);
+ free_pathname(&f);
+ close(fd);
+}
+#endif
+
+void rmdir_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ fent_t *fep;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_DIRm, r, &f, NULL, &fep, &v)) {
+ if (v)
+ printf("%d/%d: rmdir - no directory\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ e = rmdir_path(&f) < 0 ? errno : 0;
+ check_cwd();
+ if (e == 0)
+ del_from_flist(FT_DIR, fep - flist[FT_DIR].fents);
+ if (v)
+ printf("%d/%d: rmdir %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+}
+
+void stat_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: stat - no entries\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ e = lstat64_path(&f, &stb) < 0 ? errno : 0;
+ check_cwd();
+ if (v)
+ printf("%d/%d: stat %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+}
+
+void symlink_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ fent_t *fep;
+ int i;
+ int id;
+ int len;
+ int parid;
+ int v;
+ int v1;
+ char *val;
+
+ if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
+ parid = -1;
+ else
+ parid = fep->id;
+ init_pathname(&f);
+ e = generate_fname(fep, FT_SYM, &f, &id, &v1);
+ v |= v1;
+ if (!e) {
+ if (v) {
+ fent_to_name(&f, &flist[FT_DIR], fep);
+ printf("%d/%d: symlink - no filename from %s\n",
+ procid, opno, f.path);
+ }
+ free_pathname(&f);
+ return;
+ }
+ len = (int)(random() % PATH_MAX);
+ val = malloc(len + 1);
+ if (len)
+ memset(val, 'x', len);
+ val[len] = '\0';
+ for (i = 10; i < len - 1; i += 10)
+ val[i] = '/';
+ e = symlink_path(val, &f) < 0 ? errno : 0;
+ check_cwd();
+ if (e == 0)
+ add_to_flist(FT_SYM, id, parid);
+ free(val);
+ if (v)
+ printf("%d/%d: symlink %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+}
+
+/* ARGSUSED */
+void sync_f(int opno, long r)
+{
+ sync();
+ if (verbose)
+ printf("%d/%d: sync\n", procid, opno);
+}
+
+void truncate_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ __int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: truncate - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ e = stat64_path(&f, &stb) < 0 ? errno : 0;
+ check_cwd();
+ if (e > 0) {
+ if (v)
+ printf("%d/%d: truncate - stat64 %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ lr = ((__int64_t) random() << 32) + random();
+ off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
+ off %= maxfsize;
+ e = truncate64_path(&f, off) < 0 ? errno : 0;
+ check_cwd();
+ if (v)
+ printf("%d/%d: truncate %s %lld %d\n", procid, opno, f.path,
+ (long long)off, e);
+ free_pathname(&f);
+}
+
+void unlink_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ fent_t *fep;
+ flist_t *flp;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_NOTDIR, r, &f, &flp, &fep, &v)) {
+ if (v)
+ printf("%d/%d: unlink - no file\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ e = unlink_path(&f) < 0 ? errno : 0;
+ check_cwd();
+ if (e == 0)
+ del_from_flist(flp - flist, fep - flp->fents);
+ if (v)
+ printf("%d/%d: unlink %s %d\n", procid, opno, f.path, e);
+ free_pathname(&f);
+}
+
+#ifndef NO_XFS
+void unresvsp_f(int opno, long r)
+{
+ int e;
+ pathname_t f;
+ int fd;
+ struct xfs_flock64 fl;
+ __s64 lr;
+ __s64 off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: unresvsp - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_RDWR);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: unresvsp - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: unresvsp - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ lr = ((__s64) random() << 32) + random();
+ off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
+ off %= maxfsize;
+ memset(&fl, 0, sizeof(fl));
+ fl.l_whence = SEEK_SET;
+ fl.l_start = off;
+ fl.l_len = (__s64) (random() % (1 << 20));
+ e = ioctl(fd, XFS_IOC_UNRESVSP64, &fl) < 0 ? errno : 0;
+ if (v)
+ printf("%d/%d: ioctl(XFS_IOC_UNRESVSP64) %s %lld %lld %d\n",
+ procid, opno, f.path, (long long)off,
+ (long long)fl.l_len, e);
+ free_pathname(&f);
+ close(fd);
+}
+#endif
+
+void write_f(int opno, long r)
+{
+ char *buf;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+ __int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+
+ init_pathname(&f);
+ if (!get_fname(FT_REGm, r, &f, NULL, NULL, &v)) {
+ if (v)
+ printf("%d/%d: write - no filename\n", procid, opno);
+ free_pathname(&f);
+ return;
+ }
+ fd = open_path(&f, O_WRONLY);
+ e = fd < 0 ? errno : 0;
+ check_cwd();
+ if (fd < 0) {
+ if (v)
+ printf("%d/%d: write - open %s failed %d\n",
+ procid, opno, f.path, e);
+ free_pathname(&f);
+ return;
+ }
+ if (fstat64(fd, &stb) < 0) {
+ if (v)
+ printf("%d/%d: write - fstat64 %s failed %d\n",
+ procid, opno, f.path, errno);
+ free_pathname(&f);
+ close(fd);
+ return;
+ }
+ lr = ((__int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ lseek64(fd, off, SEEK_SET);
+ len = (random() % (getpagesize() * 32)) + 1;
+ buf = malloc(len);
+ memset(buf, nameseq & 0xff, len);
+ e = write(fd, buf, len) < 0 ? errno : 0;
+ free(buf);
+ if (v)
+ printf("%d/%d: write %s [%lld,%ld] %d\n",
+ procid, opno, f.path, (long long)off, (long int)len, e);
+ free_pathname(&f);
+ close(fd);
+}
diff --git a/contrib/make-sparse.c b/contrib/make-sparse.c
new file mode 100644
index 0000000..98b86b0
--- /dev/null
+++ b/contrib/make-sparse.c
@@ -0,0 +1,91 @@
+/*
+ * make-sparse.c --- make a sparse file from stdin
+ *
+ * Copyright 2004 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+
+int full_read(int fd, char *buf, size_t count)
+{
+ int got, total = 0;
+ int pass = 0;
+
+ while (count > 0) {
+ got = read(fd, buf, count);
+ if (got == -1) {
+ if ((errno == EINTR) || (errno == EAGAIN))
+ continue;
+ return total ? total : -1;
+ }
+ if (got == 0) {
+ if (pass++ >= 3)
+ return total;
+ continue;
+ }
+ pass = 0;
+ buf += got;
+ total += got;
+ count -= got;
+ }
+ return total;
+}
+
+int main(int argc, char **argv)
+{
+ int fd, got, i;
+ int zflag = 0;
+ char buf[1024];
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: make-sparse out-file\n");
+ exit(1);
+ }
+ fd = open(argv[1], O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0777);
+ if (fd < 0) {
+ perror(argv[1]);
+ exit(1);
+ }
+ while (1) {
+ got = full_read(0, buf, sizeof(buf));
+ if (got == 0)
+ break;
+ if (got == sizeof(buf)) {
+ for (i=0; i < sizeof(buf); i++)
+ if (buf[i])
+ break;
+ if (i == sizeof(buf)) {
+ lseek(fd, sizeof(buf), SEEK_CUR);
+ zflag = 1;
+ continue;
+ }
+ }
+ zflag = 0;
+ write(fd, buf, got);
+ }
+ if (zflag) {
+ lseek(fd, -1, SEEK_CUR);
+ buf[0] = 0;
+ write(fd, buf, 1);
+ }
+ return 0;
+}
+
diff --git a/contrib/populate-extfs.sh b/contrib/populate-extfs.sh
new file mode 100755
index 0000000..b1d3d1f
--- /dev/null
+++ b/contrib/populate-extfs.sh
@@ -0,0 +1,105 @@
+#!/bin/sh
+#
+# This script uses debugfs command to populate the ext2/3/4 filesystem
+# from a given directory.
+#
+
+do_usage () {
+ cat << _EOF
+Usage: populate-extfs.sh <source> <device>
+Create an ext2/ext3/ext4 filesystem from a directory or file
+
+ source: The source directory or file
+ device: The target device
+
+_EOF
+ exit 1
+}
+
+[ $# -ne 2 ] && do_usage
+
+SRCDIR=${1%%/}
+DEVICE=$2
+
+# Find where is the debugfs command if not found in the env.
+if [ -z "$DEBUGFS" ]; then
+ CONTRIB_DIR=$(dirname $(readlink -f $0))
+ DEBUGFS="$CONTRIB_DIR/../debugfs/debugfs"
+fi
+
+{
+ CWD="/"
+ find $SRCDIR | while read FILE; do
+ TGT="${FILE##*/}"
+ DIR="${FILE#$SRCDIR}"
+ DIR="${DIR%$TGT}"
+
+ # Skip the root dir
+ [ ! -z "$DIR" ] || continue
+ [ ! -z "$TGT" ] || continue
+
+ if [ "$DIR" != "$CWD" ]; then
+ echo "cd $DIR"
+ CWD="$DIR"
+ fi
+
+ # Only stat once since stat is a time consuming command
+ STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" $FILE)
+ eval $STAT
+
+ case $TYPE in
+ "directory")
+ echo "mkdir $TGT"
+ ;;
+ "regular file" | "regular empty file")
+ echo "write $FILE $TGT"
+ ;;
+ "symbolic link")
+ LINK_TGT=$(readlink $FILE)
+ echo "symlink $TGT $LINK_TGT"
+ ;;
+ "block special file")
+ echo "mknod $TGT b $DEVNO"
+ ;;
+ "character special file")
+ echo "mknod $TGT c $DEVNO"
+ ;;
+ "fifo")
+ echo "mknod $TGT p"
+ ;;
+ *)
+ echo "Unknown/unhandled file type '$TYPE' file: $FILE" 1>&2
+ ;;
+ esac
+
+ # Set the file mode
+ echo "sif $TGT mode 0x$MODE"
+
+ # Set uid and gid
+ echo "sif $TGT uid $U"
+ echo "sif $TGT gid $G"
+ done
+
+ # Handle the hard links.
+ # Save the hard links to a file, use the inode number as the filename, for example:
+ # If a and b's inode number is 6775928, save a and b to /tmp/tmp.VrCwHh5gdt/6775928.
+ INODE_DIR=`mktemp -d` || exit 1
+ for i in `find $SRCDIR -type f -links +1 -printf 'INODE=%i###FN=%p\n'`; do
+ eval `echo $i | sed 's$###$ $'`
+ echo ${FN#$SRCDIR} >>$INODE_DIR/$INODE
+ done
+ # Use the debugfs' ln and "sif links_count" to handle them.
+ for i in `ls $INODE_DIR`; do
+ # The link source
+ SRC=`head -1 $INODE_DIR/$i`
+ # Remove the files and link them again except the first one
+ for TGT in `sed -n -e '1!p' $INODE_DIR/$i`; do
+ echo "rm $TGT"
+ echo "ln $SRC $TGT"
+ done
+ LN_CNT=`cat $INODE_DIR/$i | wc -l`
+ # Set the links count
+ echo "sif $SRC links_count $LN_CNT"
+ done
+ rm -fr $INODE_DIR
+} | $DEBUGFS -w -f - $DEVICE
diff --git a/contrib/python-uuid/setup.py b/contrib/python-uuid/setup.py
new file mode 100755
index 0000000..3934d17
--- /dev/null
+++ b/contrib/python-uuid/setup.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+from distutils.core import setup, Extension
+
+uuid = Extension('e2fsprogs_uuid',
+ sources = ['uuid.c'],
+ libraries = ['uuid'])
+
+setup (name = 'e2fsprogs_uuid',
+ version = '1.0',
+ description = 'This is python uuid interface',
+ ext_modules = [uuid])
diff --git a/contrib/python-uuid/test.py b/contrib/python-uuid/test.py
new file mode 100755
index 0000000..2264f62
--- /dev/null
+++ b/contrib/python-uuid/test.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import e2fsprogs_uuid
+import time
+
+print "Generating uuid...",
+try:
+ time = time.time()
+ u = e2fsprogs_uuid.generate()
+except:
+ u = "FAIL"
+print u, "...", time
+
+print "Calling generate with param...",
+try:
+ e2fsprogs_uuid.generate("param")
+ print "FAIL."
+except:
+ print "OK"
diff --git a/contrib/python-uuid/uuid.c b/contrib/python-uuid/uuid.c
new file mode 100644
index 0000000..34dd56a
--- /dev/null
+++ b/contrib/python-uuid/uuid.c
@@ -0,0 +1,23 @@
+#include <Python.h>
+#include <time.h>
+#include <uuid/uuid.h>
+
+static PyObject * _uuid_generate(PyObject *self, PyObject *args)
+{
+ uuid_t u;
+ char uuid[37];
+ if (!PyArg_ParseTuple(args, "")) return NULL;
+ uuid_generate(u);
+ uuid_unparse(u, uuid);
+ return Py_BuildValue("s", uuid);
+}
+
+static PyMethodDef _uuid_methods[] = {
+ {"generate", _uuid_generate, METH_VARARGS, "Generate UUID"},
+ {NULL, NULL, 0, NULL}
+};
+
+void inite2fsprogs_uuid(void)
+{
+ (void) Py_InitModule("e2fsprogs_uuid", _uuid_methods);
+}
diff --git a/contrib/setup-schroot b/contrib/setup-schroot
new file mode 100755
index 0000000..f3f45c6
--- /dev/null
+++ b/contrib/setup-schroot
@@ -0,0 +1,46 @@
+#!/bin/bash
+#
+# This script sets up a schroot suitable for building e2fsprogs
+# on a Debian portable box
+
+while [ "$1" != "" ];
+do
+ case "$1" in
+ --base) shift
+ BASE_CHROOT="$1"
+ ;;
+ --chroot) shift
+ CHROOT="$1"
+ ;;
+ --help|help)
+ echo "Usage: setup-schroot [--base <base_chroot>] [--chroot <chroot>]"
+ exit 0
+ ;;
+ *)
+ echo "unknown option: $1"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+if test -z "$BASE_CHROOT" ; then
+ BASE_CHROOT=sid
+fi
+
+if test -z "$CHROOT" ; then
+ CHROOT="$USER-$BASE_CHROOT"
+fi
+
+echo "Setting up $CHROOT using $BASE_CHROOT..."
+schroot -b -n "$CHROOT" -c "$BASE_CHROOT"
+dd-schroot-cmd -c "$CHROOT" apt-get update
+dd-schroot-cmd -c "$CHROOT" -y apt-get upgrade
+dd-schroot-cmd -c "$CHROOT" -y apt-get build-dep e2fsprogs
+dd-schroot-cmd -c "$CHROOT" -y apt-get install git gdb emacs-nox lintian \
+ acl libreadline-dev dh-exec cron
+dd-schroot-cmd -c "$CHROOT" -y apt-get install udev systemd
+echo " "
+echo "Start chroot by running: "
+echo "schroot -r -c $CHROOT"
+echo " "
diff --git a/contrib/spd_readdir.c b/contrib/spd_readdir.c
new file mode 100644
index 0000000..8345fa1
--- /dev/null
+++ b/contrib/spd_readdir.c
@@ -0,0 +1,458 @@
+/*
+ * readdir accelerator
+ *
+ * (C) Copyright 2003, 2004, 2008 by Theodore Ts'o.
+ *
+ * 2008-06-08 Modified by Ross Boylan <RossBoylan stanfordalumni org>
+ * Added support for readdir_r and readdir64_r calls. Note
+ * this has not been tested on anything other than GNU/Linux i386,
+ * and that the regular readdir wrapper will take slightly more
+ * space than Ted's original since it now includes a lock.
+ *
+ * Compile using the command:
+ *
+ * gcc -o spd_readdir.so -shared -fpic spd_readdir.c -ldl
+ *
+ * Use it by setting the LD_PRELOAD environment variable:
+ *
+ * export LD_PRELOAD=/usr/local/sbin/spd_readdir.so
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ */
+
+#define ALLOC_STEPSIZE 100
+#define MAX_DIRSIZE 0
+
+#define DEBUG
+/* Util we autoconfiscate spd_readdir... */
+#define HAVE___SECURE_GETENV 1
+#define HAVE_PRCTL 1
+#define HAVE_SYS_PRCTL_H 1
+
+#ifdef DEBUG
+#define DEBUG_DIR(x) {if (do_debug) { x; }}
+#else
+#define DEBUG_DIR(x)
+#endif
+
+#define _GNU_SOURCE
+#define __USE_LARGEFILE64
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <string.h>
+#include <dirent.h>
+#include <errno.h>
+#include <dlfcn.h>
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#else
+#define PR_GET_DUMPABLE 3
+#endif
+#include <pthread.h>
+
+struct dirent_s {
+ unsigned long long d_ino;
+ long long d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char *d_name;
+};
+
+struct dir_s {
+ DIR *dir;
+ pthread_mutex_t lock; /* Mutex lock for this structure. */
+ int num;
+ int max;
+ struct dirent_s *dp;
+ int pos;
+ int direct;
+ struct dirent ret_dir;
+ struct dirent64 ret_dir64;
+};
+
+static int (*real_closedir)(DIR *dir) = 0;
+static DIR *(*real_opendir)(const char *name) = 0;
+static DIR *(*real_fdopendir)(int fd) = 0;
+static void *(*real_rewinddir)(DIR *dirp) = 0;
+static struct dirent *(*real_readdir)(DIR *dir) = 0;
+static int (*real_readdir_r)(DIR *dir, struct dirent *entry,
+ struct dirent **result) = 0;
+static struct dirent64 *(*real_readdir64)(DIR *dir) = 0;
+static int (*real_readdir64_r)(DIR *dir, struct dirent64 *entry,
+ struct dirent64 **result) = 0;
+static off_t (*real_telldir)(DIR *dir) = 0;
+static void (*real_seekdir)(DIR *dir, off_t offset) = 0;
+static int (*real_dirfd)(DIR *dir) = 0;
+static unsigned long max_dirsize = MAX_DIRSIZE;
+static int num_open = 0;
+#ifdef DEBUG
+static int do_debug = 0;
+#endif
+
+static char *safe_getenv(const char *arg)
+{
+ if ((getuid() != geteuid()) || (getgid() != getegid()))
+ return NULL;
+#if HAVE_PRCTL
+ if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#else
+#if (defined(linux) && defined(SYS_prctl))
+ if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#endif
+#endif
+
+#if HAVE___SECURE_GETENV
+ return __secure_getenv(arg);
+#else
+ return getenv(arg);
+#endif
+}
+
+static void setup_ptr()
+{
+ char *cp;
+
+ real_opendir = dlsym(RTLD_NEXT, "opendir");
+ real_fdopendir = dlsym(RTLD_NEXT, "fdopendir");
+ real_closedir = dlsym(RTLD_NEXT, "closedir");
+ real_rewinddir = dlsym(RTLD_NEXT, "rewinddir");
+ real_readdir = dlsym(RTLD_NEXT, "readdir");
+ real_readdir_r = dlsym(RTLD_NEXT, "readdir_r");
+ real_readdir64 = dlsym(RTLD_NEXT, "readdir64");
+ real_readdir64_r = dlsym(RTLD_NEXT, "readdir64_r");
+ real_telldir = dlsym(RTLD_NEXT, "telldir");
+ real_seekdir = dlsym(RTLD_NEXT, "seekdir");
+ real_dirfd = dlsym(RTLD_NEXT, "dirfd");
+ if ((cp = safe_getenv("SPD_READDIR_MAX_SIZE")) != NULL) {
+ max_dirsize = atol(cp);
+ }
+#ifdef DEBUG
+ if (safe_getenv("SPD_READDIR_DEBUG")) {
+ printf("initialized!\n");
+ do_debug++;
+ }
+#endif
+}
+
+static void free_cached_dir(struct dir_s *dirstruct)
+{
+ int i;
+
+ pthread_mutex_destroy(&(dirstruct->lock));
+
+ if (!dirstruct->dp)
+ return;
+
+ for (i=0; i < dirstruct->num; i++) {
+ free(dirstruct->dp[i].d_name);
+ }
+ free(dirstruct->dp);
+ dirstruct->dp = 0;
+ dirstruct->max = dirstruct->num = 0;
+}
+
+static int ino_cmp(const void *a, const void *b)
+{
+ const struct dirent_s *ds_a = (const struct dirent_s *) a;
+ const struct dirent_s *ds_b = (const struct dirent_s *) b;
+ ino_t i_a, i_b;
+
+ i_a = ds_a->d_ino;
+ i_b = ds_b->d_ino;
+
+ if (ds_a->d_name[0] == '.') {
+ if (ds_a->d_name[1] == 0)
+ i_a = 0;
+ else if ((ds_a->d_name[1] == '.') && (ds_a->d_name[2] == 0))
+ i_a = 1;
+ }
+ if (ds_b->d_name[0] == '.') {
+ if (ds_b->d_name[1] == 0)
+ i_b = 0;
+ else if ((ds_b->d_name[1] == '.') && (ds_b->d_name[2] == 0))
+ i_b = 1;
+ }
+
+ return (i_a - i_b);
+}
+
+static struct dir_s *alloc_dirstruct(DIR *dir)
+{
+ struct dir_s *dirstruct;
+ static pthread_mutexattr_t mutexattr;
+ mutexattr.__align = PTHREAD_MUTEX_RECURSIVE;
+
+ dirstruct = malloc(sizeof(struct dir_s));
+ if (dirstruct)
+ memset(dirstruct, 0, sizeof(struct dir_s));
+ dirstruct->dir = dir;
+ pthread_mutex_init(&(dirstruct->lock), &mutexattr);
+ return dirstruct;
+}
+
+static void cache_dirstruct(struct dir_s *dirstruct)
+{
+ struct dirent_s *ds, *dnew;
+ struct dirent64 *d;
+
+ while ((d = (*real_readdir64)(dirstruct->dir)) != NULL) {
+ if (dirstruct->num >= dirstruct->max) {
+ dirstruct->max += ALLOC_STEPSIZE;
+ DEBUG_DIR(printf("Reallocating to size %d\n",
+ dirstruct->max));
+ dnew = realloc(dirstruct->dp,
+ dirstruct->max * sizeof(struct dir_s));
+ if (!dnew)
+ goto nomem;
+ dirstruct->dp = dnew;
+ }
+ ds = &dirstruct->dp[dirstruct->num++];
+ ds->d_ino = d->d_ino;
+ ds->d_off = d->d_off;
+ ds->d_reclen = d->d_reclen;
+ ds->d_type = d->d_type;
+ if ((ds->d_name = malloc(strlen(d->d_name)+1)) == NULL) {
+ dirstruct->num--;
+ goto nomem;
+ }
+ strcpy(ds->d_name, d->d_name);
+ DEBUG_DIR(printf("readdir: %lu %s\n",
+ (unsigned long) d->d_ino, d->d_name));
+ }
+ qsort(dirstruct->dp, dirstruct->num, sizeof(struct dirent_s), ino_cmp);
+ return;
+nomem:
+ DEBUG_DIR(printf("No memory, backing off to direct readdir\n"));
+ free_cached_dir(dirstruct);
+ dirstruct->direct = 1;
+}
+
+DIR *opendir(const char *name)
+{
+ DIR *dir;
+ struct dir_s *dirstruct;
+ struct stat st;
+
+ if (!real_opendir)
+ setup_ptr();
+
+ DEBUG_DIR(printf("Opendir(%s) (%d open)\n", name, num_open++));
+ dir = (*real_opendir)(name);
+ if (!dir)
+ return NULL;
+
+ dirstruct = alloc_dirstruct(dir);
+ if (!dirstruct) {
+ (*real_closedir)(dir);
+ errno = -ENOMEM;
+ return NULL;
+ }
+
+ if (max_dirsize && (stat(name, &st) == 0) &&
+ (st.st_size > max_dirsize)) {
+ DEBUG_DIR(printf("Directory size %ld, using direct readdir\n",
+ st.st_size));
+ dirstruct->direct = 1;
+ return (DIR *) dirstruct;
+ }
+
+ cache_dirstruct(dirstruct);
+ return ((DIR *) dirstruct);
+}
+
+DIR *fdopendir(int fd)
+{
+ DIR *dir;
+ struct dir_s *dirstruct;
+ struct stat st;
+
+ if (!real_fdopendir)
+ setup_ptr();
+
+ DEBUG_DIR(printf("fdopendir(%d) (%d open)\n", fd, num_open++));
+ dir = (*real_fdopendir)(fd);
+ if (!dir)
+ return NULL;
+
+ dirstruct = alloc_dirstruct(dir);
+ if (!dirstruct) {
+ (*real_closedir)(dir);
+ errno = -ENOMEM;
+ return NULL;
+ }
+
+ if (max_dirsize && (fstat(fd, &st) == 0) &&
+ (st.st_size > max_dirsize)) {
+ DEBUG_DIR(printf("Directory size %ld, using direct readdir\n",
+ st.st_size));
+ dirstruct->dir = dir;
+ dirstruct->direct = 1;
+ return (DIR *) dirstruct;
+ }
+
+ cache_dirstruct(dirstruct);
+ return ((DIR *) dirstruct);
+}
+
+int closedir(DIR *dir)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+
+ DEBUG_DIR(printf("Closedir (%d open)\n", --num_open));
+ if (dirstruct->dir)
+ (*real_closedir)(dirstruct->dir);
+
+ free_cached_dir(dirstruct);
+ free(dirstruct);
+ return 0;
+}
+
+struct dirent *readdir(DIR *dir)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+ struct dirent_s *ds;
+
+ if (dirstruct->direct)
+ return (*real_readdir)(dirstruct->dir);
+
+ if (dirstruct->pos >= dirstruct->num)
+ return NULL;
+
+ ds = &dirstruct->dp[dirstruct->pos++];
+ dirstruct->ret_dir.d_ino = ds->d_ino;
+ dirstruct->ret_dir.d_off = ds->d_off;
+ dirstruct->ret_dir.d_reclen = ds->d_reclen;
+ dirstruct->ret_dir.d_type = ds->d_type;
+ strncpy(dirstruct->ret_dir.d_name, ds->d_name,
+ sizeof(dirstruct->ret_dir.d_name));
+
+ return (&dirstruct->ret_dir);
+}
+
+int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+ struct dirent_s *ds;
+
+ if (dirstruct->direct)
+ return (*real_readdir_r)(dirstruct->dir, entry, result);
+
+ pthread_mutex_lock(&(dirstruct->lock));
+ if (dirstruct->pos >= dirstruct->num) {
+ *result = NULL;
+ } else {
+ ds = &dirstruct->dp[dirstruct->pos++];
+ entry->d_ino = ds->d_ino;
+ entry->d_off = ds->d_off;
+ entry->d_reclen = ds->d_reclen;
+ entry->d_type = ds->d_type;
+ strncpy(entry->d_name, ds->d_name, sizeof(entry->d_name));
+ *result = entry;
+ }
+ pthread_mutex_unlock(&(dirstruct->lock));
+ return 0;
+}
+
+struct dirent64 *readdir64(DIR *dir)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+ struct dirent_s *ds;
+
+ if (dirstruct->direct)
+ return (*real_readdir64)(dirstruct->dir);
+
+ if (dirstruct->pos >= dirstruct->num)
+ return NULL;
+
+ ds = &dirstruct->dp[dirstruct->pos++];
+ dirstruct->ret_dir64.d_ino = ds->d_ino;
+ dirstruct->ret_dir64.d_off = ds->d_off;
+ dirstruct->ret_dir64.d_reclen = ds->d_reclen;
+ dirstruct->ret_dir64.d_type = ds->d_type;
+ strncpy(dirstruct->ret_dir64.d_name, ds->d_name,
+ sizeof(dirstruct->ret_dir64.d_name));
+
+ return (&dirstruct->ret_dir64);
+}
+
+int readdir64_r (DIR *__restrict dir,
+ struct dirent64 *__restrict entry,
+ struct dirent64 **__restrict result)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+ struct dirent_s *ds;
+
+ if (dirstruct->direct)
+ return (*real_readdir64_r)(dir, entry, result);
+ pthread_mutex_lock(&(dirstruct->lock));
+ if (dirstruct->pos >= dirstruct->num) {
+ *result = NULL;
+ } else {
+ ds = &dirstruct->dp[dirstruct->pos++];
+ entry->d_ino = ds->d_ino;
+ entry->d_off = ds->d_off;
+ entry->d_reclen = ds->d_reclen;
+ entry->d_type = ds->d_type;
+ strncpy(entry->d_name, ds->d_name,
+ sizeof(entry->d_name));
+ *result = entry;
+ }
+ pthread_mutex_unlock(&(dirstruct->lock));
+ return 0;
+}
+
+off_t telldir(DIR *dir)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+
+ if (dirstruct->direct)
+ return (*real_telldir)(dirstruct->dir);
+
+ return ((off_t) dirstruct->pos);
+}
+
+void seekdir(DIR *dir, off_t offset)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+
+ if (dirstruct->direct) {
+ (*real_seekdir)(dirstruct->dir, offset);
+ return;
+ }
+
+ dirstruct->pos = offset;
+}
+
+void rewinddir(DIR *dir)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+
+ (*real_rewinddir)(dirstruct->dir);
+ if (dirstruct->direct)
+ return;
+
+ pthread_mutex_lock(&(dirstruct->lock));
+ dirstruct->pos = 0;
+ free_cached_dir(dirstruct);
+ cache_dirstruct(dirstruct);
+ pthread_mutex_unlock(&(dirstruct->lock));
+}
+
+int dirfd(DIR *dir)
+{
+ struct dir_s *dirstruct = (struct dir_s *) dir;
+ int fd = (*real_dirfd)(dirstruct->dir);
+
+ DEBUG_DIR(printf("dirfd %d, %p\n", fd, real_dirfd));
+ return fd;
+}
diff --git a/debugfs/Android.bp b/debugfs/Android.bp
new file mode 100644
index 0000000..4d087b3
--- /dev/null
+++ b/debugfs/Android.bp
@@ -0,0 +1,80 @@
+// Copyright 2017 The Android Open Source Project
+
+//########################
+// Build the debugfs binary
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-GPL-2.0
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_defaults {
+ name: "debugfs-defaults",
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "debug_cmds.c",
+ "debugfs.c",
+ "util.c",
+ "ncheck.c",
+ "icheck.c",
+ "ls.c",
+ "lsdel.c",
+ "dump.c",
+ "set_fields.c",
+ "logdump.c",
+ "htree.c",
+ "unused.c",
+ "e2freefrag.c",
+ "filefrag.c",
+ "extent_cmds.c",
+ "extent_inode.c",
+ "zap.c",
+ "quota.c",
+ "xattrs.c",
+ "journal.c",
+ "revoke.c",
+ "recovery.c",
+ "do_journal.c",
+ ],
+ cflags: [
+ "-DDEBUGFS",
+ ],
+ include_dirs: [
+ "external/e2fsprogs/misc",
+ "external/e2fsprogs/e2fsck",
+ ],
+}
+
+debugfs_libs = [
+ "libext2_misc",
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_uuid",
+ "libext2_ss",
+ "libext2_quota",
+ "libext2_com_err",
+ "libext2_e2p",
+ "libext2_support",
+]
+
+cc_binary {
+ name: "debugfs",
+ host_supported: true,
+ defaults: ["debugfs-defaults"],
+
+ shared_libs: debugfs_libs,
+}
+
+cc_binary {
+ name: "debugfs_static",
+ static_executable: true,
+ host_supported: true,
+ defaults: ["debugfs-defaults"],
+
+ static_libs: debugfs_libs,
+}
diff --git a/debugfs/Makefile.in b/debugfs/Makefile.in
new file mode 100644
index 0000000..67f8d0b
--- /dev/null
+++ b/debugfs/Makefile.in
@@ -0,0 +1,426 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = debugfs
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+PROGS= debugfs
+MANPAGES= debugfs.8
+
+MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir)/../lib/ss ../lib/ss/mk_cmds
+
+DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
+ lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o \
+ filefrag.o extent_cmds.o extent_inode.o zap.o create_inode.o \
+ quota.o xattrs.o journal.o revoke.o recovery.o do_journal.o
+
+RO_DEBUG_OBJS= ro_debug_cmds.o ro_debugfs.o util.o ncheck.o icheck.o ls.o \
+ lsdel.o logdump.o htree.o e2freefrag.o filefrag.o extent_cmds.o \
+ extent_inode.o quota.o xattrs.o
+
+SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \
+ $(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
+ $(srcdir)/dump.c $(srcdir)/set_fields.c ${srcdir}/logdump.c \
+ $(srcdir)/htree.c $(srcdir)/unused.c ${srcdir}/../misc/e2freefrag.c \
+ $(srcdir)/filefrag.c $(srcdir)/extent_inode.c $(srcdir)/zap.c \
+ $(srcdir)/../misc/create_inode.c $(srcdir)/xattrs.c $(srcdir)/quota.c \
+ $(srcdir)/journal.c $(srcdir)/../e2fsck/revoke.c \
+ $(srcdir)/../e2fsck/recovery.c $(srcdir)/do_journal.c
+
+LIBS= $(LIBSUPPORT) $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
+ $(LIBUUID) $(LIBMAGIC) $(SYSLIBS)
+DEPLIBS= $(DEPLIBSUPPORT) $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \
+ $(DEPLIBBLKID) $(DEPLIBUUID)
+
+STATIC_LIBS= $(STATIC_LIBSUPPORT) $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) \
+ $(STATIC_LIBCOM_ERR) $(STATIC_LIBBLKID) $(STATIC_LIBUUID) \
+ $(STATIC_LIBE2P) $(LIBMAGIC) $(SYSLIBS)
+STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBSS) \
+ $(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBUUID) \
+ $(DEPSTATIC_LIBE2P)
+
+# This nastiness is needed because of jfs_user.h hackery; when we finally
+# clean up this mess, we should be able to drop it
+LOCAL_CFLAGS = -I$(srcdir)/../e2fsck -DDEBUGFS
+DEPEND_CFLAGS = -I$(srcdir)
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+
+all:: $(PROGS) $(MANPAGES)
+
+debugfs: $(DEBUG_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
+
+debugfs.static: $(DEBUG_OBJS) $(STATIC_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(LDFLAGS_STATIC) -o debugfs.static $(DEBUG_OBJS) \
+ $(STATIC_LIBS) $(READLINE_LIB)
+
+debugfs.static-libs: $(DEBUG_OBJS) $(STATIC_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) -o debugfs.static-libs $(DEBUG_OBJS) \
+ $(STATIC_LIBS) $(READLINE_LIB)
+
+rdebugfs: $(RO_DEBUG_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o rdebugfs $(RO_DEBUG_OBJS) $(LIBS)
+
+debug_cmds.c debug_cmds.h: debug_cmds.ct
+ $(E) " MK_CMDS $@"
+ $(Q) $(MK_CMDS) $(srcdir)/debug_cmds.ct
+
+extent_cmds.c extent_cmds.h: extent_cmds.ct
+ $(E) " MK_CMDS $@"
+ $(Q) $(MK_CMDS) $(srcdir)/extent_cmds.ct
+
+ro_debug_cmds.c ro_debug_cmds.h: ro_debug_cmds.ct
+ $(E) " MK_CMDS $@"
+ $(Q) $(MK_CMDS) $(srcdir)/ro_debug_cmds.ct
+
+ro_debugfs.o: debugfs.c
+ $(E) " CC $@"
+ $(Q) $(CC) -c $(ALL_CFLAGS) $< -DREAD_ONLY -o $@
+
+e2freefrag.o: $(srcdir)/../misc/e2freefrag.c
+ $(E) " CC $@"
+ $(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) $< -o $@
+
+recovery.o: $(srcdir)/../e2fsck/recovery.c
+ $(E) " CC $@"
+ $(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) \
+ $(srcdir)/../e2fsck/recovery.c -o $@
+
+revoke.o: $(srcdir)/../e2fsck/revoke.c
+ $(E) " CC $@"
+ $(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) \
+ $(srcdir)/../e2fsck/revoke.c -o $@
+
+create_inode.o: $(srcdir)/../misc/create_inode.c
+ $(E) " CC $@"
+ $(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) \
+ $(srcdir)/../misc/create_inode.c -o $@
+
+debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8
+
+installdirs:
+ $(E) " MKDIR_P $(root_sbindir) $(man8dir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(root_sbindir) \
+ $(DESTDIR)$(man8dir)
+
+install: $(PROGS) $(MANPAGES) installdirs
+ $(Q) for i in $(PROGS); do \
+ echo " INSTALL $(root_sbindir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(Q) for i in $(MANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
+ done; \
+ echo " INSTALL_DATA $(man8dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+ done
+
+install-strip: install
+ $(Q) for i in $(PROGS); do \
+ echo " STRIP $(root_sbindir)/$$i"; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+
+uninstall:
+ for i in $(PROGS); do \
+ $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
+ done
+
+clean::
+ $(RM) -f $(PROGS) debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c \
+ extent_cmds.c ro_debug_cmds.c core rdebugfs debugfs.static \
+ debugfs.static-libs tst_set_fields
+
+mostlyclean: clean
+distclean: clean
+ $(RM) -f debug_cmds.c .depend Makefile $(srcdir)/TAGS \
+ $(srcdir)/Makefile.in.old $(srcdir)/recovery.c \
+ $(srcdir)/revoke.c
+
+tst_set_fields: set_fields.c util.c
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(SYSLIBS) -DUNITTEST \
+ -o tst_set_fields $(srcdir)/set_fields.c $(srcdir)/util.c $(LIBS)
+
+fullcheck check:: tst_set_fields
+ $(TESTENV) ./tst_set_fields
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+debugfs.o: $(srcdir)/debugfs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(top_srcdir)/version.h \
+ $(srcdir)/../e2fsck/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
+ $(top_srcdir)/lib/ext2fs/compiler.h $(top_srcdir)/lib/support/plausible.h
+util.o: $(srcdir)/util.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+ls.o: $(srcdir)/ls.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+ncheck.o: $(srcdir)/ncheck.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+icheck.o: $(srcdir)/icheck.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+lsdel.o: $(srcdir)/lsdel.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+dump.o: $(srcdir)/dump.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+set_fields.o: $(srcdir)/set_fields.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+logdump.o: $(srcdir)/logdump.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(srcdir)/../e2fsck/jfs_user.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h
+htree.o: $(srcdir)/htree.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+unused.o: $(srcdir)/unused.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+e2freefrag.o: $(srcdir)/../misc/e2freefrag.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/e2freefrag.h \
+ $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+filefrag.o: $(srcdir)/filefrag.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+extent_inode.o: $(srcdir)/extent_inode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+zap.o: $(srcdir)/zap.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+create_inode.o: $(srcdir)/../misc/create_inode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/fiemap.h \
+ $(srcdir)/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/nls-enable.h
+xattrs.o: $(srcdir)/xattrs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/support/cstring.h \
+ $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+quota.o: $(srcdir)/quota.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+journal.o: $(srcdir)/journal.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/journal.h \
+ $(srcdir)/../e2fsck/jfs_user.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
+ $(top_srcdir)/lib/ext2fs/compiler.h
+revoke.o: $(srcdir)/../e2fsck/revoke.c $(srcdir)/../e2fsck/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
+ $(top_srcdir)/lib/ext2fs/compiler.h
+recovery.o: $(srcdir)/../e2fsck/recovery.c $(srcdir)/../e2fsck/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
+ $(top_srcdir)/lib/ext2fs/compiler.h
+do_journal.o: $(srcdir)/do_journal.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/journal.h $(srcdir)/../e2fsck/jfs_user.h
diff --git a/debugfs/debug_cmds.ct b/debugfs/debug_cmds.ct
new file mode 100644
index 0000000..1ff6c9d
--- /dev/null
+++ b/debugfs/debug_cmds.ct
@@ -0,0 +1,233 @@
+#
+# Copyright (C) 1993 Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+command_table debug_cmds;
+
+request do_show_debugfs_params, "Show debugfs parameters",
+ show_debugfs_params, params;
+
+request do_open_filesys, "Open a filesystem",
+ open_filesys, open;
+
+request do_close_filesys, "Close the filesystem",
+ close_filesys, close;
+
+request do_freefrag, "Report free space fragmentation",
+ freefrag, e2freefrag;
+
+request do_features, "Set/print superblock features",
+ feature, features;
+
+request do_dirty_filesys, "Mark the filesystem as dirty",
+ dirty_filesys, dirty;
+
+request do_init_filesys, "Initialize a filesystem (DESTROYS DATA)",
+ init_filesys;
+
+request do_show_super_stats, "Show superblock statistics",
+ show_super_stats, stats;
+
+request do_ncheck, "Do inode->name translation",
+ ncheck;
+
+request do_icheck, "Do block->inode translation",
+ icheck;
+
+request do_chroot, "Change root directory",
+ change_root_directory, chroot;
+
+request do_change_working_dir, "Change working directory",
+ change_working_directory, cd;
+
+request do_list_dir, "List directory",
+ list_directory, ls;
+
+request do_stat, "Show inode information ",
+ show_inode_info, stat;
+
+request do_dump_extents, "Dump extents information ",
+ dump_extents, extents, ex;
+
+request do_blocks, "Dump blocks used by an inode ",
+ blocks;
+
+request do_filefrag, "Report fragmentation information for an inode",
+ filefrag;
+
+request do_link, "Create directory link",
+ link, ln;
+
+request do_unlink, "Delete a directory link",
+ unlink;
+
+request do_mkdir, "Create a directory",
+ mkdir;
+
+request do_rmdir, "Remove a directory",
+ rmdir;
+
+request do_rm, "Remove a file (unlink and kill_file, if appropriate)",
+ rm;
+
+request do_kill_file, "Deallocate an inode and its blocks",
+ kill_file;
+
+request do_copy_inode, "Copy the inode structure",
+ copy_inode;
+
+request do_clri, "Clear an inode's contents",
+ clri;
+
+request do_freei, "Clear an inode's in-use flag",
+ freei;
+
+request do_seti, "Set an inode's in-use flag",
+ seti;
+
+request do_testi, "Test an inode's in-use flag",
+ testi;
+
+request do_freeb, "Clear a block's in-use flag",
+ freeb;
+
+request do_setb, "Set a block's in-use flag",
+ setb;
+
+request do_testb, "Test a block's in-use flag",
+ testb;
+
+request do_modify_inode, "Modify an inode by structure",
+ modify_inode, mi;
+
+request do_find_free_block, "Find free block(s)",
+ find_free_block, ffb;
+
+request do_find_free_inode, "Find free inode(s)",
+ find_free_inode, ffi;
+
+request do_print_working_directory, "Print current working directory",
+ print_working_directory, pwd;
+
+request do_expand_dir, "Expand directory",
+ expand_dir, expand;
+
+request do_mknod, "Create a special file",
+ mknod;
+
+request do_lsdel, "List deleted inodes",
+ list_deleted_inodes, lsdel;
+
+request do_undel, "Undelete file",
+ undelete, undel;
+
+request do_write, "Copy a file from your native filesystem",
+ write;
+
+request do_dump, "Dump an inode out to a file",
+ dump_inode, dump;
+
+request do_cat, "Dump an inode out to stdout",
+ cat;
+
+request do_lcd, "Change the current directory on your native filesystem",
+ lcd;
+
+request do_rdump, "Recursively dump a directory to the native filesystem",
+ rdump;
+
+request do_set_super, "Set superblock value",
+ set_super_value, ssv;
+
+request do_set_inode, "Set inode field",
+ set_inode_field, sif;
+
+request do_set_block_group_descriptor, "Set block group descriptor field",
+ set_block_group, set_bg;
+
+request do_logdump, "Dump the contents of the journal",
+ logdump;
+
+request do_htree_dump, "Dump a hash-indexed directory",
+ htree_dump, htree;
+
+request do_dx_hash, "Calculate the directory hash of a filename",
+ dx_hash, hash;
+
+request do_dirsearch, "Search a directory for a particular filename",
+ dirsearch;
+
+request do_bmap, "Calculate the logical->physical block mapping for an inode",
+ bmap;
+
+request do_fallocate, "Allocate uninitialized blocks to an inode",
+ fallocate;
+
+request do_punch, "Punch (or truncate) blocks from an inode by deallocating them",
+ punch, truncate;
+
+request do_symlink, "Create a symbolic link",
+ symlink;
+
+request do_imap, "Calculate the location of an inode",
+ imap;
+
+request do_dump_unused, "Dump unused blocks",
+ dump_unused;
+
+request do_set_current_time, "Set current time to use when setting filesystem fields",
+ set_current_time;
+
+request do_supported_features, "Print features supported by this version of e2fsprogs",
+ supported_features;
+
+request do_dump_mmp, "Dump MMP information",
+ dump_mmp;
+
+request do_set_mmp_value, "Set MMP value",
+ set_mmp_value, smmp;
+
+request do_extent_open, "Open inode for extent manipulation",
+ extent_open, eo;
+
+request do_zap_block, "Zap block: fill with 0, pattern, flip bits etc.",
+ zap_block, zap;
+
+request do_block_dump, "Dump contents of a block",
+ block_dump, bdump, bd;
+
+request do_list_xattr, "List extended attributes of an inode",
+ ea_list;
+
+request do_get_xattr, "Get an extended attribute of an inode",
+ ea_get;
+
+request do_set_xattr, "Set an extended attribute of an inode",
+ ea_set;
+
+request do_rm_xattr, "Remove an extended attribute of an inode",
+ ea_rm;
+
+request do_list_quota, "List quota",
+ list_quota, lq;
+
+request do_get_quota, "Get quota",
+ get_quota, gq;
+
+request do_idump, "Dump the inode structure in hex",
+ inode_dump, idump, id;
+
+request do_journal_open, "Open the journal",
+ journal_open, jo;
+
+request do_journal_close, "Close the journal",
+ journal_close, jc;
+
+request do_journal_write, "Write a transaction to the journal",
+ journal_write, jw;
+
+request do_journal_run, "Recover the journal",
+ journal_run, jr;
+
+end;
+
diff --git a/debugfs/debugfs.8.in b/debugfs/debugfs.8.in
new file mode 100644
index 0000000..5b5329c
--- /dev/null
+++ b/debugfs/debugfs.8.in
@@ -0,0 +1,880 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH DEBUGFS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+debugfs \- ext2/ext3/ext4 file system debugger
+.SH SYNOPSIS
+.B debugfs
+[
+.B \-DVwcin
+]
+[
+.B \-b
+blocksize
+]
+[
+.B \-s
+superblock
+]
+[
+.B \-f
+cmd_file
+]
+[
+.B \-R
+request
+]
+[
+.B \-d
+data_source_device
+]
+[
+.B \-z
+.I undo_file
+]
+[
+device
+]
+.SH DESCRIPTION
+The
+.B debugfs
+program is an interactive file system debugger. It can be used to
+examine and change the state of an ext2, ext3, or ext4 file system.
+.PP
+.I device
+is a block device (e.g., /dev/sdXX) or a file containing the file system.
+.SH OPTIONS
+.TP
+.I \-w
+Specifies that the file system should be opened in read-write mode.
+Without this option, the file system is opened in read-only mode.
+.TP
+.I \-n
+Disables metadata checksum verification. This should only be used if
+you believe the metadata to be correct despite the complaints of
+e2fsprogs.
+.TP
+.I \-c
+Specifies that the file system should be opened in catastrophic mode, in
+which the inode and group bitmaps are not read initially. This can be
+useful for file systems with significant corruption, but because of this,
+catastrophic mode forces the file system to be opened read-only.
+.TP
+.I \-i
+Specifies that
+.I device
+represents an ext2 image file created by the
+.B e2image
+program. Since the ext2 image file only contains the superblock, block
+group descriptor, block and inode allocation bitmaps, and
+the inode table, many
+.B debugfs
+commands will not function properly.
+.B Warning:
+no safety checks are in place, and
+.B debugfs
+may fail in interesting ways if commands such as
+.IR ls ", " dump ", "
+etc. are tried without specifying the
+.I data_source_device
+using the
+.I \-d
+option.
+.B debugfs
+is a debugging tool. It has rough edges!
+.TP
+.I -d data_source_device
+Used with the
+.I \-i
+option, specifies that
+.I data_source_device
+should be used when reading blocks not found in the ext2 image file.
+This includes data, directory, and indirect blocks.
+.TP
+.I -b blocksize
+Forces the use of the given block size (in bytes) for the file system,
+rather than detecting the correct block size automatically. (This
+option is rarely needed; it is used primarily when the file system is
+extremely badly damaged/corrupted.)
+.TP
+.I -s superblock
+Causes the file system superblock to be read from the given block
+number, instead of using the primary superblock (located at an offset of
+1024 bytes from the beginning of the file system). If you specify the
+.I -s
+option, you must also provide the blocksize of the file system via the
+.I -b
+option. (This
+option is rarely needed; it is used primarily when the file system is
+extremely badly damaged/corrupted.)
+.TP
+.I -f cmd_file
+Causes
+.B debugfs
+to read in commands from
+.IR cmd_file ,
+and execute them. When
+.B debugfs
+is finished executing those commands, it will exit.
+.TP
+.I -D
+Causes
+.B debugfs
+to open the device using Direct I/O, bypassing the buffer cache. Note
+that some Linux devices, notably device mapper as of this writing, do
+not support Direct I/O.
+.TP
+.I -R request
+Causes
+.B debugfs
+to execute the single command
+.IR request ,
+and then exit.
+.TP
+.I -V
+print the version number of
+.B debugfs
+and exit.
+.TP
+.BI \-z " undo_file"
+Before overwriting a file system block, write the old contents of the block to
+an undo file. This undo file can be used with e2undo(8) to restore the old
+contents of the file system should something go wrong. If the empty string is
+passed as the undo_file argument, the undo file will be written to a file named
+debugfs-\fIdevice\fR.e2undo in the directory specified via the
+\fIE2FSPROGS_UNDO_DIR\fR environment variable.
+
+WARNING: The undo file cannot be used to recover from a power or system crash.
+.SH SPECIFYING FILES
+Many
+.B debugfs
+commands take a
+.I filespec
+as an argument to specify an inode (as opposed to a pathname)
+in the file system which is currently opened by
+.BR debugfs .
+The
+.I filespec
+argument may be specified in two forms. The first form is an inode
+number surrounded by angle brackets, e.g.,
+.IR <2> .
+The second form is a pathname; if the pathname is prefixed by a forward slash
+('/'), then it is interpreted relative to the root of the file system
+which is currently opened by
+.BR debugfs .
+If not, the pathname is
+interpreted relative to the current working directory as maintained by
+.BR debugfs .
+This may be modified by using the
+.B debugfs
+command
+.IR cd .
+.\"
+.\"
+.\"
+.SH COMMANDS
+This is a list of the commands which
+.B debugfs
+supports.
+.TP
+.BI blocks " filespec"
+Print the blocks used by the inode
+.I filespec
+to stdout.
+.TP
+.BI bmap " [ -a ] filespec logical_block [physical_block]"
+Print or set the physical block number corresponding to the logical block number
+.I logical_block
+in the inode
+.IR filespec .
+If the
+.I \-a
+flag is specified, try to allocate a block if necessary.
+.TP
+.BI block_dump " '[ -x ] [-f filespec] block_num"
+Dump the file system block given by
+.I block_num
+in hex and ASCII format to the console. If the
+.I \-f
+option is specified, the block number is relative to the start of the given
+.BR filespec .
+If the
+.I \-x
+option is specified, the block is interpreted as an extended attribute
+block and printed to show the structure of extended attribute data
+structures.
+.TP
+.BI cat " filespec"
+Dump the contents of the inode
+.I filespec
+to stdout.
+.TP
+.BI cd " filespec"
+Change the current working directory to
+.IR filespec .
+.TP
+.BI chroot " filespec"
+Change the root directory to be the directory
+.IR filespec .
+.TP
+.BI close " [-a]"
+Close the currently open file system. If the
+.I -a
+option is specified, write out any changes to the superblock and block
+group descriptors to all of the backup superblocks, not just to the
+master superblock.
+.TP
+.BI clri " filespec"
+Clear the contents of the inode
+.IR filespec .
+.TP
+.BI copy_inode " source_inode destination_inode"
+Copy the contents of the inode structure in
+.I source_inode
+and use it to overwrite the inode structure at
+.IR destination_inode .
+.TP
+.BI dirsearch " filespec filename"
+Search the directory
+.I filespec
+for
+.IR filename .
+.TP
+.BI dirty " [-clean]"
+Mark the file system as dirty, so that the superblocks will be written on exit.
+Additionally, clear the superblock's valid flag, or set it if
+.I -clean
+is specified.
+.TP
+.BI dump " [-p] filespec out_file"
+Dump the contents of the inode
+.I filespec
+to the output file
+.IR out_file .
+If the
+.I -p
+option is given set the owner, group and permissions information on
+.I out_file
+to match
+.IR filespec .
+.TP
+.BI dump_mmp " [mmp_block]"
+Display the multiple-mount protection (mmp) field values. If
+.I mmp_block
+is specified then verify and dump the MMP values from the given block
+number, otherwise use the
+.B s_mmp_block
+field in the superblock to locate and use the existing MMP block.
+.TP
+.BI dx_hash " [-h hash_alg] [-s hash_seed] filename"
+Calculate the directory hash of
+.IR filename .
+The hash algorithm specified with
+.I -h
+may be
+.BR legacy , " half_md4" ", or " tea .
+The hash seed specified with
+.I -s
+must be in UUID format.
+.TP
+.BI dump_extents " [-n] [-l] filespec"
+Dump the extent tree of the inode
+.IR filespec .
+The
+.I -n
+flag will cause
+.B dump_extents
+to only display the interior nodes in the extent tree. The
+.I -l
+flag will cause
+.B dump_extents
+to only display the leaf nodes in the extent tree.
+.IP
+(Please note that the length and range of blocks for the last extent in
+an interior node is an estimate by the extents library functions, and is
+not stored in file system data structures. Hence, the values displayed
+may not necessarily by accurate and does not indicate a problem or
+corruption in the file system.)
+.TP
+.B dump_unused
+Dump unused blocks which contain non-null bytes.
+.TP
+.BI ea_get " [-f outfile]|[-xVC] [-r] filespec attr_name"
+Retrieve the value of the extended attribute
+.I attr_name
+in the file
+.I filespec
+and write it either to stdout or to \fIoutfile\fR.
+.TP
+.BI ea_list " filespec
+List the extended attributes associated with the file
+.I filespec
+to standard output.
+.TP
+.BI ea_set " [-f infile] [-r] filespec attr_name attr_value
+Set the value of the extended attribute
+.I attr_name
+in the file
+.I filespec
+to the string value
+.I attr_value
+or read it from \fIinfile\fR.
+.TP
+.BI ea_rm " filespec attr_names...
+Remove the extended attribute
+.I attr_name
+from the file \fIfilespec\fR.
+.TP
+.BI expand_dir " filespec"
+Expand the directory
+.IR filespec .
+.TP
+.BI fallocate " filespec start_block [end_block]
+Allocate and map uninitialized blocks into \fIfilespec\fR between
+logical block \fIstart_block\fR and \fIend_block\fR, inclusive. If
+\fIend_block\fR is not supplied, this function maps until it runs out
+of free disk blocks or the maximum file size is reached. Existing
+mappings are left alone.
+.TP
+.BI feature " [fs_feature] [-fs_feature] ..."
+Set or clear various file system features in the superblock. After setting
+or clearing any file system features that were requested, print the current
+state of the file system feature set.
+.TP
+.BI filefrag " [-dvr] filespec"
+Print the number of contiguous extents in
+.IR filespec .
+If
+.I filespec
+is a directory and the
+.I -d
+option is not specified,
+.I filefrag
+will print the number of contiguous extents for each file in
+the directory. The
+.I -v
+option will cause
+.I filefrag
+print a tabular listing of the contiguous extents in the
+file. The
+.I -r
+option will cause
+.I filefrag
+to do a recursive listing of the directory.
+.TP
+.BI find_free_block " [count [goal]]"
+Find the first
+.I count
+free blocks, starting from
+.I goal
+and allocate it. Also available as
+.BR ffb .
+.TP
+.BI find_free_inode " [dir [mode]]"
+Find a free inode and allocate it. If present,
+.I dir
+specifies the inode number of the directory
+which the inode is to be located. The second
+optional argument
+.I mode
+specifies the permissions of the new inode. (If the directory bit is set
+on the mode, the allocation routine will function differently.) Also
+available as
+.BR ffi .
+.TP
+.BI freeb " block [count]"
+Mark the block number
+.I block
+as not allocated.
+If the optional argument
+.I count
+is present, then
+.I count
+blocks starting at block number
+.I block
+will be marked as not allocated.
+.TP
+.BI freefrag " [-c chunk_kb]"
+Report free space fragmentation on the currently open file system.
+If the
+.I \-c
+option is specified then the filefrag command will print how many free
+chunks of size
+.I chunk_kb
+can be found in the file system. The chunk size must be a power of two
+and be larger than the file system block size.
+.TP
+.BI freei " filespec [num]"
+Free the inode specified by
+.IR filespec .
+If
+.I num
+is specified, also clear num-1 inodes after the specified inode.
+.TP
+.BI get_quota " quota_type id"
+Display quota information for given quota type (user, group, or project) and ID.
+.TP
+.B help
+Print a list of commands understood by
+.BR debugfs .
+.TP
+.BI htree_dump " filespec"
+Dump the hash-indexed directory
+.IR filespec ,
+showing its tree structure.
+.TP
+.BI icheck " block ..."
+Print a listing of the inodes which use the one or more blocks specified
+on the command line.
+.TP
+.BI inode_dump " [-b]|[-e]|[-x] filespec"
+Print the contents of the inode data structure in hex and ASCII format.
+The
+.I \-b
+option causes the command to only dump the contents of the
+.B i_blocks
+array. The
+.I \-e
+option causes the command to only dump the contents of the extra inode
+space, which is used to store in-line extended attributes. The
+.I \-x
+option causes the command to dump the extra inode space interpreted and
+extended attributes. This is useful to debug corrupted inodes
+containing extended attributes.
+.TP
+.BI imap " filespec"
+Print the location of the inode data structure (in the inode table)
+of the inode
+.IR filespec .
+.TP
+.BI init_filesys " device blocksize"
+Create an ext2 file system on
+.I device
+with device size
+.IR blocksize .
+Note that this does not fully initialize all of the data structures;
+to do this, use the
+.BR mke2fs (8)
+program. This is just a call to the low-level library, which sets up
+the superblock and block descriptors.
+.TP
+.BI journal_close
+Close the open journal.
+.TP
+.BI journal_open " [-c] [-v ver] [-f ext_jnl]
+Opens the journal for reading and writing. Journal checksumming can
+be enabled by supplying \fI-c\fR; checksum formats 2 and 3 can be
+selected with the \fI-v\fR option. An external journal can be loaded
+from \fIext_jnl\fR.
+.TP
+.BI journal_run
+Replay all transactions in the open journal.
+.TP
+.BI journal_write " [-b blocks] [-r revoke] [-c] file
+Write a transaction to the open journal. The list of blocks to write
+should be supplied as a comma-separated list in \fIblocks\fR; the
+blocks themselves should be readable from \fIfile\fR. A list of
+blocks to revoke can be supplied as a comma-separated list in
+\fIrevoke\fR. By default, a commit record is written at the end; the
+\fI-c\fR switch writes an uncommitted transaction.
+.TP
+.BI kill_file " filespec"
+Deallocate the inode
+.I filespec
+and its blocks. Note that this does not remove any directory
+entries (if any) to this inode. See the
+.BR rm (1)
+command if you wish to unlink a file.
+.TP
+.BI lcd " directory"
+Change the current working directory of the
+.B debugfs
+process to
+.I directory
+on the native file system.
+.TP
+.BI list_quota " quota_type"
+Display quota information for given quota type (user, group, or project).
+.TP
+.BI ln " filespec dest_file"
+Create a link named
+.I dest_file
+which is a hard link to
+.IR filespec .
+Note this does not adjust the inode reference counts.
+.TP
+.BI logdump " [-acsOS] [-b block] [-n num_trans ] [-i filespec] [-f journal_file] [output_file]"
+Dump the contents of the ext3 journal. By default, dump the journal inode as
+specified in the superblock. However, this can be overridden with the
+.I \-i
+option, which dumps the journal from the internal inode given by
+.IR filespec .
+A regular file containing journal data can be specified using the
+.I \-f
+option. Finally, the
+.I \-s
+option utilizes the backup information in the superblock to locate the
+journal.
+.IP
+The
+.I \-S
+option causes
+.B logdump
+to print the contents of the journal superblock.
+.IP
+The
+.I \-a
+option causes the
+.B logdump
+to print the contents of all of the descriptor blocks.
+The
+.I \-b
+option causes
+.B logdump
+to print all journal records that refer to the specified block.
+The
+.I \-c
+option will print out the contents of all of the data blocks selected by
+the
+.I \-a
+and
+.I \-b
+options.
+.IP
+The
+.I \-O
+option causes logdump to display old (checkpointed) journal entries.
+This can be used to try to track down journal problems even after the
+journal has been replayed.
+.IP
+The
+.I \-n
+option causes
+.B logdump
+to continue past a journal block which is missing a magic number.
+Instead, it will stop only when the entire log is printed or after
+.I num_trans
+transactions.
+.TP
+.BI ls " [-l] [-c] [-d] [-p] [-r] filespec"
+Print a listing of the files in the directory
+.IR filespec .
+The
+.I \-c
+flag causes directory block checksums (if present) to be displayed.
+The
+.I \-d
+flag will list deleted entries in the directory.
+The
+.I \-l
+flag will list files using a more verbose format.
+The
+.I \-p
+flag will list the files in a format which is more easily parsable by
+scripts, as well as making it more clear when there are spaces or other
+non-printing characters at the end of filenames.
+The
+.I \-r
+flag will force the printing of the filename, even if it is encrypted.
+.TP
+.BI list_deleted_inodes " [limit]"
+List deleted inodes, optionally limited to those deleted within
+.I limit
+seconds ago. Also available as
+.BR lsdel .
+.IP
+This command was useful for recovering from accidental file deletions
+for ext2 file systems. Unfortunately, it is not useful for this purpose
+if the files were deleted using ext3 or ext4, since the inode's
+data blocks are no longer available after the inode is released.
+.TP
+.BI modify_inode " filespec"
+Modify the contents of the inode structure in the inode
+.IR filespec .
+Also available as
+.BR mi .
+.TP
+.BI mkdir " filespec"
+Make a directory.
+.TP
+.BI mknod " filespec [p|[[c|b] major minor]]"
+Create a special device file (a named pipe, character or block device).
+If a character or block device is to be made, the
+.I major
+and
+.I minor
+device numbers must be specified.
+.TP
+.BI ncheck " [-c] inode_num ..."
+Take the requested list of inode numbers, and print a listing of pathnames
+to those inodes. The
+.I -c
+flag will enable checking the file type information in the directory
+entry to make sure it matches the inode's type.
+.TP
+.BI open " [-weficD] [-b blocksize] [-d image_filename] [-s superblock] [-z undo_file] device"
+Open a file system for editing. The
+.I -f
+flag forces the file system to be opened even if there are some unknown
+or incompatible file system features which would normally
+prevent the file system from being opened. The
+.I -e
+flag causes the file system to be opened in exclusive mode. The
+.IR -b ", " -c ", " -d ", " -i ", " -s ", " -w ", and " -D
+options behave the same as the command-line options to
+.BR debugfs .
+.TP
+.BI punch " filespec start_blk [end_blk]"
+Delete the blocks in the inode ranging from
+.I start_blk
+to
+.IR end_blk .
+If
+.I end_blk
+is omitted then this command will function as a truncate command; that
+is, all of the blocks starting at
+.I start_blk
+through to the end of the file will be deallocated.
+.TP
+.BI symlink " filespec target"
+Make a symbolic link.
+.TP
+.B pwd
+Print the current working directory.
+.TP
+.B quit
+Quit
+.B debugfs
+.TP
+.BI rdump " directory[...] destination"
+Recursively dump
+.IR directory ,
+or multiple
+.IR directories ,
+and all its contents (including regular files, symbolic links, and other
+directories) into the named
+.IR destination ,
+which should be an existing directory on the native file system.
+.TP
+.BI rm " pathname"
+Unlink
+.IR pathname .
+If this causes the inode pointed to by
+.I pathname
+to have no other references, deallocate the file. This command functions
+as the unlink() system call.
+.I
+.TP
+.BI rmdir " filespec"
+Remove the directory
+.IR filespec .
+.TP
+.BI setb " block [count]"
+Mark the block number
+.I block
+as allocated.
+If the optional argument
+.I count
+is present, then
+.I count
+blocks starting at block number
+.I block
+will be marked as allocated.
+.TP
+.BI set_block_group " bgnum field value"
+Modify the block group descriptor specified by
+.I bgnum
+so that the block group descriptor field
+.I field
+has value
+.IR value .
+Also available as
+.BR set_bg .
+.TP
+.BI set_current_time " time"
+Set current time in seconds since Unix epoch to use when setting file system
+fields.
+.TP
+.BI seti " filespec [num]"
+Mark inode
+.I filespec
+as in use in the inode bitmap. If
+.I num
+is specified, also set num-1 inodes after the specified inode.
+.TP
+.BI set_inode_field " filespec field value"
+Modify the inode specified by
+.I filespec
+so that the inode field
+.I field
+has value
+.I value.
+The list of valid inode fields which can be set via this command
+can be displayed by using the command:
+.B set_inode_field -l
+Also available as
+.BR sif .
+.TP
+.BI set_mmp_value " field value"
+Modify the multiple-mount protection (MMP) data so that the MMP field
+.I field
+has value
+.I value.
+The list of valid MMP fields which can be set via this command
+can be displayed by using the command:
+.B set_mmp_value -l
+Also available as
+.BR smmp .
+.TP
+.BI set_super_value " field value"
+Set the superblock field
+.I field
+to
+.I value.
+The list of valid superblock fields which can be set via this command
+can be displayed by using the command:
+.B set_super_value -l
+Also available as
+.BR ssv .
+.TP
+.B show_debugfs_params
+Display
+.B debugfs
+parameters such as information about currently opened file system.
+.TP
+.BI show_super_stats " [-h]"
+List the contents of the super block and the block group descriptors. If the
+.I -h
+flag is given, only print out the superblock contents. Also available as
+.BR stats .
+.TP
+.BI stat " filespec"
+Display the contents of the inode structure of the inode
+.IR filespec .
+.TP
+.B supported_features
+Display file system features supported by this version of
+.BR debugfs .
+.TP
+.BI testb " block [count]"
+Test if the block number
+.I block
+is marked as allocated in the block bitmap.
+If the optional argument
+.I count
+is present, then
+.I count
+blocks starting at block number
+.I block
+will be tested.
+.TP
+.BI testi " filespec"
+Test if the inode
+.I filespec
+is marked as allocated in the inode bitmap.
+.TP
+.BI undel " <inode_number> [pathname]"
+Undelete the specified inode number (which must be surrounded by angle
+brackets) so that it and its blocks are marked in use, and optionally
+link the recovered inode to the specified pathname. The
+.B e2fsck
+command should always be run after using the
+.B undel
+command to recover deleted files.
+.IP
+Note that if you are recovering a large number of deleted files, linking
+the inode to a directory may require the directory to be expanded, which
+could allocate a block that had been used by one of the
+yet-to-be-undeleted files. So it is safer to undelete all of the
+inodes without specifying a destination pathname, and then in a separate
+pass, use the debugfs
+.B link
+command to link the inode to the destination pathname, or use
+.B e2fsck
+to check the file system and link all of the recovered inodes to the
+lost+found directory.
+.TP
+.BI unlink " pathname"
+Remove the link specified by
+.I pathname
+to an inode. Note this does not adjust the inode reference counts.
+.TP
+.BI write " source_file out_file"
+Copy the contents of
+.I source_file
+into a newly-created file in the file system named
+.IR out_file .
+.TP
+.BI zap_block " [-f filespec] [-o offset] [-l length] [-p pattern] block_num"
+Overwrite the block specified by
+.I block_num
+with zero (NUL) bytes, or if
+.I -p
+is given use the byte specified by
+.IR pattern .
+If
+.I -f
+is given then
+.I block_num
+is relative to the start of the file given by
+.IR filespec .
+The
+.I -o
+and
+.I -l
+options limit the range of bytes to zap to the specified
+.I offset
+and
+.I length
+relative to the start of the block.
+.TP
+.BI zap_block " [-f filespec] [-b bit] block_num"
+Bit-flip portions of the physical
+.IR block_num .
+If
+.I -f
+is given, then
+.I block_num
+is a logical block relative to the start of
+.IR filespec .
+.SH ENVIRONMENT VARIABLES
+.TP
+.B DEBUGFS_PAGER, PAGER
+The
+.B debugfs
+program always pipes the output of the some commands through a
+pager program. These commands include:
+.IR show_super_stats " (" stats ),
+.IR list_directory " (" ls ),
+.IR show_inode_info " (" stat ),
+.IR list_deleted_inodes " (" lsdel ),
+and
+.IR htree_dump .
+The specific pager can explicitly specified by the
+.B DEBUGFS_PAGER
+environment variable, and if it is not set, by the
+.B PAGER
+environment variable.
+.IP
+Note that since a pager is always used, the
+.BR less (1)
+pager is not particularly appropriate, since it clears the screen before
+displaying the output of the command and clears the output the screen
+when the pager is exited. Many users prefer to use the
+.BR less (1)
+pager for most purposes, which is why the
+.B DEBUGFS_PAGER
+environment variable is available to override the more general
+.B PAGER
+environment variable.
+.SH AUTHOR
+.B debugfs
+was written by Theodore Ts'o <tytso@mit.edu>.
+.SH SEE ALSO
+.BR dumpe2fs (8),
+.BR tune2fs (8),
+.BR e2fsck (8),
+.BR mke2fs (8),
+.BR ext4 (5)
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
new file mode 100644
index 0000000..9b6321d
--- /dev/null
+++ b/debugfs/debugfs.c
@@ -0,0 +1,2682 @@
+/*
+ * debugfs.c --- a program which allows you to attach an ext2fs
+ * filesystem and play with it.
+ *
+ * Copyright (C) 1993 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ *
+ * Modifications by Robert Sanders <gt8134b@prism.gatech.edu>
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#include <libgen.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+
+#include "debugfs.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+
+#include <ext2fs/ext2_ext_attr.h>
+
+#include "../version.h"
+#include "jfs_user.h"
+#include "support/plausible.h"
+
+#ifndef BUFSIZ
+#define BUFSIZ 8192
+#endif
+
+#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jbd-debug */
+int journal_enable_debug = -1;
+#endif
+
+/*
+ * There must be only one definition if we're hooking in extra commands or
+ * changing default prompt. Use -DSKIP_GLOBDEF for that.
+ */
+#ifndef SKIP_GLOBDEFS
+ss_request_table *extra_cmds;
+const char *debug_prog_name;
+#endif
+int ss_sci_idx;
+
+ext2_filsys current_fs;
+quota_ctx_t current_qctx;
+ext2_ino_t root, cwd;
+int no_copy_xattrs;
+
+static int debugfs_setup_tdb(const char *device_name, char *undo_file,
+ io_manager *io_ptr)
+{
+ errcode_t retval = ENOMEM;
+ const char *tdb_dir = NULL;
+ char *tdb_file = NULL;
+ char *dev_name, *tmp_name;
+
+ /* (re)open a specific undo file */
+ if (undo_file && undo_file[0] != 0) {
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto err;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(undo_file);
+ if (retval)
+ goto err;
+ printf("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n",
+ undo_file, device_name);
+ return retval;
+ }
+
+ /*
+ * Configuration via a conf file would be
+ * nice
+ */
+ tdb_dir = ss_safe_getenv("E2FSPROGS_UNDO_DIR");
+ if (!tdb_dir)
+ tdb_dir = "/var/lib/e2fsprogs";
+
+ if (!strcmp(tdb_dir, "none") || (tdb_dir[0] == 0) ||
+ access(tdb_dir, W_OK))
+ return 0;
+
+ tmp_name = strdup(device_name);
+ if (!tmp_name)
+ goto errout;
+ dev_name = basename(tmp_name);
+ tdb_file = malloc(strlen(tdb_dir) + 9 + strlen(dev_name) + 7 + 1);
+ if (!tdb_file) {
+ free(tmp_name);
+ goto errout;
+ }
+ sprintf(tdb_file, "%s/debugfs-%s.e2undo", tdb_dir, dev_name);
+ free(tmp_name);
+
+ if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
+ retval = errno;
+ com_err("debugfs", retval,
+ "while trying to delete %s", tdb_file);
+ goto errout;
+ }
+
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto errout;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(tdb_file);
+ if (retval)
+ goto errout;
+ printf("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n", tdb_file, device_name);
+
+ free(tdb_file);
+ return 0;
+errout:
+ free(tdb_file);
+err:
+ com_err("debugfs", retval, "while trying to setup undo file\n");
+ return retval;
+}
+
+static void open_filesystem(char *device, int open_flags, blk64_t superblock,
+ blk64_t blocksize, int catastrophic,
+ char *data_filename, char *undo_file)
+{
+ int retval;
+ io_channel data_io = 0;
+ io_manager io_ptr = unix_io_manager;
+
+ if (superblock != 0 && blocksize == 0) {
+ com_err(device, 0, "if you specify the superblock, you must also specify the block size");
+ current_fs = NULL;
+ return;
+ }
+
+ if (data_filename) {
+ if ((open_flags & EXT2_FLAG_IMAGE_FILE) == 0) {
+ com_err(device, 0,
+ "The -d option is only valid when reading an e2image file");
+ current_fs = NULL;
+ return;
+ }
+ retval = unix_io_manager->open(data_filename, 0, &data_io);
+ if (retval) {
+ com_err(data_filename, 0, "while opening data source");
+ current_fs = NULL;
+ return;
+ }
+ }
+
+ if (catastrophic)
+ open_flags |= EXT2_FLAG_SKIP_MMP | EXT2_FLAG_IGNORE_SB_ERRORS;
+
+ if (undo_file) {
+ retval = debugfs_setup_tdb(device, undo_file, &io_ptr);
+ if (retval)
+ exit(1);
+ }
+
+try_open_again:
+ retval = ext2fs_open(device, open_flags, superblock, blocksize,
+ io_ptr, &current_fs);
+ if (retval && (retval == EXT2_ET_SB_CSUM_INVALID) &&
+ !(open_flags & EXT2_FLAG_IGNORE_CSUM_ERRORS)) {
+ open_flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ printf("Checksum errors in superblock! Retrying...\n");
+ goto try_open_again;
+ }
+ if (retval) {
+ com_err(debug_prog_name, retval,
+ "while trying to open %s", device);
+ if (retval == EXT2_ET_BAD_MAGIC)
+ check_plausibility(device, CHECK_FS_EXIST, NULL);
+ current_fs = NULL;
+ return;
+ }
+ current_fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+
+ if (!catastrophic) {
+ retval = ext2fs_read_bitmaps(current_fs);
+ if (retval) {
+ com_err(device, retval,
+ "while reading allocation bitmaps");
+ goto errout;
+ }
+ }
+
+ if (data_io) {
+ retval = ext2fs_set_data_io(current_fs, data_io);
+ if (retval) {
+ com_err(device, retval,
+ "while setting data source");
+ goto errout;
+ }
+ }
+
+ root = cwd = EXT2_ROOT_INO;
+ return;
+
+errout:
+ retval = ext2fs_close_free(&current_fs);
+ if (retval)
+ com_err(device, retval, "while trying to close filesystem");
+}
+
+void do_open_filesys(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int c, err;
+ int catastrophic = 0;
+ blk64_t superblock = 0;
+ blk64_t blocksize = 0;
+ int open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS |
+ EXT2_FLAG_THREADS;
+ char *data_filename = 0;
+ char *undo_file = NULL;
+
+ reset_getopt();
+ while ((c = getopt(argc, argv, "iwfecb:s:d:Dz:")) != EOF) {
+ switch (c) {
+ case 'i':
+ open_flags |= EXT2_FLAG_IMAGE_FILE;
+ break;
+ case 'w':
+#ifdef READ_ONLY
+ goto print_usage;
+#else
+ open_flags |= EXT2_FLAG_RW;
+#endif /* READ_ONLY */
+ break;
+ case 'f':
+ open_flags |= EXT2_FLAG_FORCE;
+ break;
+ case 'e':
+ open_flags |= EXT2_FLAG_EXCLUSIVE;
+ break;
+ case 'c':
+ catastrophic = 1;
+ break;
+ case 'd':
+ data_filename = optarg;
+ break;
+ case 'D':
+ open_flags |= EXT2_FLAG_DIRECT_IO;
+ break;
+ case 'b':
+ blocksize = parse_ulong(optarg, argv[0],
+ "block size", &err);
+ if (err)
+ return;
+ break;
+ case 's':
+ err = strtoblk(argv[0], optarg,
+ "superblock block number", &superblock);
+ if (err)
+ return;
+ break;
+ case 'z':
+#ifdef READ_ONLY
+ goto print_usage;
+#else
+ undo_file = optarg;
+#endif
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+ if (optind != argc-1) {
+ goto print_usage;
+ }
+ if (check_fs_not_open(argv[0]))
+ return;
+ open_filesystem(argv[optind], open_flags,
+ superblock, blocksize, catastrophic,
+ data_filename, undo_file);
+ return;
+
+print_usage:
+ fprintf(stderr, "%s: Usage: open [-s superblock] [-b blocksize] "
+#ifdef READ_ONLY
+ "[-d image_filename] [-z undo_file] [-c] [-i] [-f] [-e] [-D] "
+#else
+ "[-d image_filename] [-c] [-i] [-f] [-e] [-D] [-w] "
+#endif
+ "<device>\n", argv[0]);
+}
+
+void do_lcd(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (argc != 2) {
+ com_err(argv[0], 0, "Usage: %s %s", argv[0], "<native dir>");
+ return;
+ }
+
+ if (chdir(argv[1]) == -1) {
+ com_err(argv[0], errno,
+ "while trying to change native directory to %s",
+ argv[1]);
+ return;
+ }
+}
+
+static void close_filesystem(NOARGS)
+{
+ int retval;
+
+ if (current_fs->flags & EXT2_FLAG_IB_DIRTY) {
+ retval = ext2fs_write_inode_bitmap(current_fs);
+ if (retval)
+ com_err("ext2fs_write_inode_bitmap", retval, 0);
+ }
+ if (current_fs->flags & EXT2_FLAG_BB_DIRTY) {
+ retval = ext2fs_write_block_bitmap(current_fs);
+ if (retval)
+ com_err("ext2fs_write_block_bitmap", retval, 0);
+ }
+ if (current_qctx)
+ quota_release_context(&current_qctx);
+ retval = ext2fs_close_free(&current_fs);
+ if (retval)
+ com_err("ext2fs_close", retval, 0);
+ return;
+}
+
+void do_close_filesys(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int c;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "a")) != EOF) {
+ switch (c) {
+ case 'a':
+ current_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (argc > optind) {
+ print_usage:
+ com_err(0, 0, "Usage: close_filesys [-a]");
+ return;
+ }
+
+ close_filesystem();
+}
+
+#ifndef READ_ONLY
+void do_init_filesys(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct ext2_super_block param;
+ errcode_t retval;
+ int err;
+ blk64_t blocks;
+
+ if (common_args_process(argc, argv, 3, 3, "initialize",
+ "<device> <blocks>", CHECK_FS_NOTOPEN))
+ return;
+
+ memset(&param, 0, sizeof(struct ext2_super_block));
+ err = strtoblk(argv[0], argv[2], "blocks count", &blocks);
+ if (err)
+ return;
+ ext2fs_blocks_count_set(&param, blocks);
+ retval = ext2fs_initialize(argv[1], 0, &param,
+ unix_io_manager, &current_fs);
+ if (retval) {
+ com_err(argv[1], retval, "while initializing filesystem");
+ current_fs = NULL;
+ return;
+ }
+ root = cwd = EXT2_ROOT_INO;
+ return;
+}
+
+static void print_features(struct ext2_super_block * s, FILE *f)
+{
+ int i, j, printed=0;
+ __u32 *mask = &s->s_feature_compat, m;
+
+ fputs("Filesystem features:", f);
+ for (i=0; i <3; i++,mask++) {
+ for (j=0,m=1; j < 32; j++, m<<=1) {
+ if (*mask & m) {
+ fprintf(f, " %s", e2p_feature2string(i, m));
+ printed++;
+ }
+ }
+ }
+ if (printed == 0)
+ fputs("(none)", f);
+ fputs("\n", f);
+}
+#endif /* READ_ONLY */
+
+static void print_bg_opts(ext2_filsys fs, dgrp_t group, int mask,
+ const char *str, int *first, FILE *f)
+{
+ if (ext2fs_bg_flags_test(fs, group, mask)) {
+ if (*first) {
+ fputs(" [", f);
+ *first = 0;
+ } else
+ fputs(", ", f);
+ fputs(str, f);
+ }
+}
+
+void do_show_super_stats(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *units ="block";
+ dgrp_t i;
+ FILE *out;
+ int c, header_only = 0;
+ int numdirs = 0, first, gdt_csum;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "h")) != EOF) {
+ switch (c) {
+ case 'h':
+ header_only++;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+ if (optind != argc) {
+ goto print_usage;
+ }
+ if (check_fs_open(argv[0]))
+ return;
+ out = open_pager();
+
+ if (ext2fs_has_feature_bigalloc(current_fs->super))
+ units = "cluster";
+
+ list_super2(current_fs->super, out);
+ if (ext2fs_has_feature_metadata_csum(current_fs->super) &&
+ !ext2fs_superblock_csum_verify(current_fs,
+ current_fs->super)) {
+ __u32 orig_csum = current_fs->super->s_checksum;
+
+ ext2fs_superblock_csum_set(current_fs,
+ current_fs->super);
+ fprintf(out, "Expected Checksum: 0x%08x\n",
+ current_fs->super->s_checksum);
+ current_fs->super->s_checksum = orig_csum;
+ }
+ for (i=0; i < current_fs->group_desc_count; i++)
+ numdirs += ext2fs_bg_used_dirs_count(current_fs, i);
+ fprintf(out, "Directories: %u\n", numdirs);
+
+ if (header_only) {
+ close_pager(out);
+ return;
+ }
+
+ gdt_csum = ext2fs_has_group_desc_csum(current_fs);
+ for (i = 0; i < current_fs->group_desc_count; i++) {
+ fprintf(out, " Group %2d: block bitmap at %llu, "
+ "inode bitmap at %llu, "
+ "inode table at %llu\n"
+ " %u free %s%s, "
+ "%u free %s, "
+ "%u used %s%s", i,
+ (unsigned long long) ext2fs_block_bitmap_loc(current_fs, i),
+ (unsigned long long) ext2fs_inode_bitmap_loc(current_fs, i),
+ (unsigned long long) ext2fs_inode_table_loc(current_fs, i),
+ ext2fs_bg_free_blocks_count(current_fs, i),
+ units,
+ ext2fs_bg_free_blocks_count(current_fs, i) != 1 ?
+ "s" : "",
+ ext2fs_bg_free_inodes_count(current_fs, i),
+ ext2fs_bg_free_inodes_count(current_fs, i) != 1 ?
+ "inodes" : "inode",
+ ext2fs_bg_used_dirs_count(current_fs, i),
+ ext2fs_bg_used_dirs_count(current_fs, i) != 1 ? "directories"
+ : "directory", gdt_csum ? ", " : "\n");
+ if (gdt_csum)
+ fprintf(out, "%u unused %s\n",
+ ext2fs_bg_itable_unused(current_fs, i),
+ ext2fs_bg_itable_unused(current_fs, i) != 1 ?
+ "inodes" : "inode");
+ first = 1;
+ print_bg_opts(current_fs, i, EXT2_BG_INODE_UNINIT, "Inode not init",
+ &first, out);
+ print_bg_opts(current_fs, i, EXT2_BG_BLOCK_UNINIT, "Block not init",
+ &first, out);
+ if (gdt_csum) {
+ fprintf(out, "%sChecksum 0x%04x",
+ first ? " [":", ", ext2fs_bg_checksum(current_fs, i));
+ first = 0;
+ }
+ if (!first)
+ fputs("]\n", out);
+ }
+ close_pager(out);
+ return;
+print_usage:
+ fprintf(stderr, "%s: Usage: show_super_stats [-h]\n", argv[0]);
+}
+
+#ifndef READ_ONLY
+void do_dirty_filesys(int argc EXT2FS_ATTR((unused)),
+ char **argv EXT2FS_ATTR((unused)),
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (check_fs_open(argv[0]))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+
+ if (argv[1] && !strcmp(argv[1], "-clean"))
+ current_fs->super->s_state |= EXT2_VALID_FS;
+ else
+ current_fs->super->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(current_fs);
+}
+#endif /* READ_ONLY */
+
+struct list_blocks_struct {
+ FILE *f;
+ e2_blkcnt_t total;
+ blk64_t first_block, last_block;
+ e2_blkcnt_t first_bcnt, last_bcnt;
+ e2_blkcnt_t first;
+};
+
+static void finish_range(struct list_blocks_struct *lb)
+{
+ if (lb->first_block == 0)
+ return;
+ if (lb->first)
+ lb->first = 0;
+ else
+ fprintf(lb->f, ", ");
+ if (lb->first_block == lb->last_block)
+ fprintf(lb->f, "(%lld):%llu",
+ (long long)lb->first_bcnt,
+ (unsigned long long) lb->first_block);
+ else
+ fprintf(lb->f, "(%lld-%lld):%llu-%llu",
+ (long long)lb->first_bcnt, (long long)lb->last_bcnt,
+ (unsigned long long) lb->first_block,
+ (unsigned long long) lb->last_block);
+ lb->first_block = 0;
+}
+
+static int list_blocks_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *blocknr, e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct list_blocks_struct *lb = (struct list_blocks_struct *) private;
+
+ lb->total++;
+ if (blockcnt >= 0) {
+ /*
+ * See if we can add on to the existing range (if it exists)
+ */
+ if (lb->first_block &&
+ (lb->last_block+1 == *blocknr) &&
+ (lb->last_bcnt+1 == blockcnt)) {
+ lb->last_block = *blocknr;
+ lb->last_bcnt = blockcnt;
+ return 0;
+ }
+ /*
+ * Start a new range.
+ */
+ finish_range(lb);
+ lb->first_block = lb->last_block = *blocknr;
+ lb->first_bcnt = lb->last_bcnt = blockcnt;
+ return 0;
+ }
+ /*
+ * Not a normal block. Always force a new range.
+ */
+ finish_range(lb);
+ if (lb->first)
+ lb->first = 0;
+ else
+ fprintf(lb->f, ", ");
+ if (blockcnt == -1)
+ fprintf(lb->f, "(IND):%llu", (unsigned long long) *blocknr);
+ else if (blockcnt == -2)
+ fprintf(lb->f, "(DIND):%llu", (unsigned long long) *blocknr);
+ else if (blockcnt == -3)
+ fprintf(lb->f, "(TIND):%llu", (unsigned long long) *blocknr);
+ return 0;
+}
+
+static void internal_dump_inode_extra(FILE *out,
+ const char *prefix EXT2FS_ATTR((unused)),
+ ext2_ino_t inode_num EXT2FS_ATTR((unused)),
+ struct ext2_inode_large *inode)
+{
+ fprintf(out, "Size of extra inode fields: %u\n", inode->i_extra_isize);
+ if (inode->i_extra_isize > EXT2_INODE_SIZE(current_fs->super) -
+ EXT2_GOOD_OLD_INODE_SIZE) {
+ fprintf(stderr, "invalid inode->i_extra_isize (%u)\n",
+ inode->i_extra_isize);
+ return;
+ }
+}
+
+static void dump_blocks(FILE *f, const char *prefix, ext2_ino_t inode)
+{
+ struct list_blocks_struct lb;
+
+ fprintf(f, "%sBLOCKS:\n%s", prefix, prefix);
+ lb.total = 0;
+ lb.first_block = 0;
+ lb.f = f;
+ lb.first = 1;
+ ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL,
+ list_blocks_proc, (void *)&lb);
+ finish_range(&lb);
+ if (lb.total)
+ fprintf(f, "\n%sTOTAL: %lld\n", prefix, (long long)lb.total);
+ fprintf(f,"\n");
+}
+
+static int int_log10(unsigned long long arg)
+{
+ int l = 0;
+
+ arg = arg / 10;
+ while (arg) {
+ l++;
+ arg = arg / 10;
+ }
+ return l;
+}
+
+#define DUMP_LEAF_EXTENTS 0x01
+#define DUMP_NODE_EXTENTS 0x02
+#define DUMP_EXTENT_TABLE 0x04
+
+static void dump_extents(FILE *f, const char *prefix, ext2_ino_t ino,
+ int flags, int logical_width, int physical_width)
+{
+ ext2_extent_handle_t handle;
+ struct ext2fs_extent extent;
+ struct ext2_extent_info info;
+ int op = EXT2_EXTENT_ROOT;
+ unsigned int printed = 0;
+ errcode_t errcode;
+
+ errcode = ext2fs_extent_open(current_fs, ino, &handle);
+ if (errcode)
+ return;
+
+ if (flags & DUMP_EXTENT_TABLE)
+ fprintf(f, "Level Entries %*s %*s Length Flags\n",
+ (logical_width*2)+3, "Logical",
+ (physical_width*2)+3, "Physical");
+ else
+ fprintf(f, "%sEXTENTS:\n%s", prefix, prefix);
+
+ while (1) {
+ errcode = ext2fs_extent_get(handle, op, &extent);
+
+ if (errcode)
+ break;
+
+ op = EXT2_EXTENT_NEXT;
+
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT)
+ continue;
+
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_LEAF) {
+ if ((flags & DUMP_LEAF_EXTENTS) == 0)
+ continue;
+ } else {
+ if ((flags & DUMP_NODE_EXTENTS) == 0)
+ continue;
+ }
+
+ errcode = ext2fs_extent_get_info(handle, &info);
+ if (errcode)
+ continue;
+
+ if (!(extent.e_flags & EXT2_EXTENT_FLAGS_LEAF)) {
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT)
+ continue;
+
+ if (flags & DUMP_EXTENT_TABLE) {
+ fprintf(f, "%2d/%2d %3d/%3d %*llu - %*llu "
+ "%*llu%*s %6u\n",
+ info.curr_level, info.max_depth,
+ info.curr_entry, info.num_entries,
+ logical_width,
+ (unsigned long long) extent.e_lblk,
+ logical_width,
+ (unsigned long long) extent.e_lblk + (extent.e_len - 1),
+ physical_width,
+ (unsigned long long) extent.e_pblk,
+ physical_width+3, "", extent.e_len);
+ continue;
+ }
+
+ fprintf(f, "%s(ETB%d):%llu",
+ printed ? ", " : "", info.curr_level,
+ (unsigned long long) extent.e_pblk);
+ printed = 1;
+ continue;
+ }
+
+ if (flags & DUMP_EXTENT_TABLE) {
+ fprintf(f, "%2d/%2d %3d/%3d %*llu - %*llu "
+ "%*llu - %*llu %6u %s\n",
+ info.curr_level, info.max_depth,
+ info.curr_entry, info.num_entries,
+ logical_width,
+ (unsigned long long) extent.e_lblk,
+ logical_width,
+ (unsigned long long) extent.e_lblk + (extent.e_len - 1),
+ physical_width,
+ (unsigned long long) extent.e_pblk,
+ physical_width,
+ (unsigned long long) extent.e_pblk + (extent.e_len - 1),
+ extent.e_len,
+ extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT ?
+ "Uninit" : "");
+ continue;
+ }
+
+ if (extent.e_len == 0)
+ continue;
+ else if (extent.e_len == 1)
+ fprintf(f,
+ "%s(%lld%s):%lld",
+ printed ? ", " : "",
+ (unsigned long long) extent.e_lblk,
+ extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT ?
+ "[u]" : "",
+ (unsigned long long) extent.e_pblk);
+ else
+ fprintf(f,
+ "%s(%lld-%lld%s):%lld-%lld",
+ printed ? ", " : "",
+ (unsigned long long) extent.e_lblk,
+ (unsigned long long) extent.e_lblk + (extent.e_len - 1),
+ extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT ?
+ "[u]" : "",
+ (unsigned long long) extent.e_pblk,
+ (unsigned long long) extent.e_pblk + (extent.e_len - 1));
+ printed = 1;
+ }
+ if (printed)
+ fprintf(f, "\n");
+ ext2fs_extent_free(handle);
+}
+
+static void dump_inline_data(FILE *out, const char *prefix, ext2_ino_t inode_num)
+{
+ errcode_t retval;
+ size_t size;
+
+ retval = ext2fs_inline_data_size(current_fs, inode_num, &size);
+ if (!retval)
+ fprintf(out, "%sSize of inline data: %zu\n", prefix, size);
+}
+
+static void dump_inline_symlink(FILE *out, ext2_ino_t inode_num,
+ struct ext2_inode *inode, const char *prefix)
+{
+ errcode_t retval;
+ char *buf = NULL;
+ size_t size;
+
+ retval = ext2fs_inline_data_size(current_fs, inode_num, &size);
+ if (retval)
+ goto out;
+
+ retval = ext2fs_get_memzero(size + 1, &buf);
+ if (retval)
+ goto out;
+
+ retval = ext2fs_inline_data_get(current_fs, inode_num,
+ inode, buf, &size);
+ if (retval)
+ goto out;
+
+ fprintf(out, "%sFast link dest: \"%.*s\"\n", prefix,
+ (int)size, buf);
+out:
+ if (buf)
+ ext2fs_free_mem(&buf);
+ if (retval)
+ com_err(__func__, retval, "while dumping link destination");
+}
+
+void internal_dump_inode(FILE *out, const char *prefix,
+ ext2_ino_t inode_num, struct ext2_inode *inode,
+ int do_dump_blocks)
+{
+ const char *i_type;
+ char frag, fsize;
+ int os = current_fs->super->s_creator_os;
+ struct ext2_inode_large *large_inode;
+ int is_large_inode = 0;
+
+ if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE)
+ is_large_inode = 1;
+ large_inode = (struct ext2_inode_large *) inode;
+
+ if (LINUX_S_ISDIR(inode->i_mode)) i_type = "directory";
+ else if (LINUX_S_ISREG(inode->i_mode)) i_type = "regular";
+ else if (LINUX_S_ISLNK(inode->i_mode)) i_type = "symlink";
+ else if (LINUX_S_ISBLK(inode->i_mode)) i_type = "block special";
+ else if (LINUX_S_ISCHR(inode->i_mode)) i_type = "character special";
+ else if (LINUX_S_ISFIFO(inode->i_mode)) i_type = "FIFO";
+ else if (LINUX_S_ISSOCK(inode->i_mode)) i_type = "socket";
+ else i_type = "bad type";
+ fprintf(out, "%sInode: %u Type: %s ", prefix, inode_num, i_type);
+ fprintf(out, "%sMode: 0%03o Flags: 0x%x\n",
+ prefix, inode->i_mode & 07777, inode->i_flags);
+ if (is_large_inode && large_inode->i_extra_isize >= 24) {
+ fprintf(out, "%sGeneration: %u Version: 0x%08x:%08x\n",
+ prefix, inode->i_generation, large_inode->i_version_hi,
+ inode->osd1.linux1.l_i_version);
+ } else {
+ fprintf(out, "%sGeneration: %u Version: 0x%08x\n", prefix,
+ inode->i_generation, inode->osd1.linux1.l_i_version);
+ }
+ fprintf(out, "%sUser: %5d Group: %5d",
+ prefix, inode_uid(*inode), inode_gid(*inode));
+ if (is_large_inode && large_inode->i_extra_isize >= 32)
+ fprintf(out, " Project: %5d", large_inode->i_projid);
+ fputs(" Size: ", out);
+ if (LINUX_S_ISREG(inode->i_mode) || LINUX_S_ISDIR(inode->i_mode))
+ fprintf(out, "%llu\n", (unsigned long long) EXT2_I_SIZE(inode));
+ else
+ fprintf(out, "%u\n", inode->i_size);
+ if (os == EXT2_OS_HURD)
+ fprintf(out,
+ "%sFile ACL: %u Translator: %u\n",
+ prefix,
+ inode->i_file_acl,
+ inode->osd1.hurd1.h_i_translator);
+ else
+ fprintf(out, "%sFile ACL: %llu\n",
+ prefix,
+ inode->i_file_acl | ((long long)
+ (inode->osd2.linux2.l_i_file_acl_high) << 32));
+ if (os != EXT2_OS_HURD)
+ fprintf(out, "%sLinks: %u Blockcount: %llu\n",
+ prefix, inode->i_links_count,
+ (((unsigned long long)
+ inode->osd2.linux2.l_i_blocks_hi << 32)) +
+ inode->i_blocks);
+ else
+ fprintf(out, "%sLinks: %u Blockcount: %u\n",
+ prefix, inode->i_links_count, inode->i_blocks);
+ switch (os) {
+ case EXT2_OS_HURD:
+ frag = inode->osd2.hurd2.h_i_frag;
+ fsize = inode->osd2.hurd2.h_i_fsize;
+ break;
+ default:
+ frag = fsize = 0;
+ }
+ fprintf(out, "%sFragment: Address: %u Number: %u Size: %u\n",
+ prefix, inode->i_faddr, frag, fsize);
+ if (is_large_inode && large_inode->i_extra_isize >= 24) {
+ fprintf(out, "%s ctime: 0x%08x:%08x -- %s", prefix,
+ inode->i_ctime, large_inode->i_ctime_extra,
+ inode_time_to_string(inode->i_ctime,
+ large_inode->i_ctime_extra));
+ fprintf(out, "%s atime: 0x%08x:%08x -- %s", prefix,
+ inode->i_atime, large_inode->i_atime_extra,
+ inode_time_to_string(inode->i_atime,
+ large_inode->i_atime_extra));
+ fprintf(out, "%s mtime: 0x%08x:%08x -- %s", prefix,
+ inode->i_mtime, large_inode->i_mtime_extra,
+ inode_time_to_string(inode->i_mtime,
+ large_inode->i_mtime_extra));
+ fprintf(out, "%scrtime: 0x%08x:%08x -- %s", prefix,
+ large_inode->i_crtime, large_inode->i_crtime_extra,
+ inode_time_to_string(large_inode->i_crtime,
+ large_inode->i_crtime_extra));
+ if (inode->i_dtime)
+ fprintf(out, "%s dtime: 0x%08x:(%08x) -- %s", prefix,
+ large_inode->i_dtime, large_inode->i_ctime_extra,
+ inode_time_to_string(inode->i_dtime,
+ large_inode->i_ctime_extra));
+ } else {
+ fprintf(out, "%sctime: 0x%08x -- %s", prefix, inode->i_ctime,
+ time_to_string((__s32) inode->i_ctime));
+ fprintf(out, "%satime: 0x%08x -- %s", prefix, inode->i_atime,
+ time_to_string((__s32) inode->i_atime));
+ fprintf(out, "%smtime: 0x%08x -- %s", prefix, inode->i_mtime,
+ time_to_string((__s32) inode->i_mtime));
+ if (inode->i_dtime)
+ fprintf(out, "%sdtime: 0x%08x -- %s", prefix,
+ inode->i_dtime,
+ time_to_string((__s32) inode->i_dtime));
+ }
+ if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE)
+ internal_dump_inode_extra(out, prefix, inode_num,
+ (struct ext2_inode_large *) inode);
+ dump_inode_attributes(out, inode_num);
+ if (ext2fs_has_feature_metadata_csum(current_fs->super)) {
+ __u32 crc = inode->i_checksum_lo;
+ if (is_large_inode &&
+ large_inode->i_extra_isize >=
+ (offsetof(struct ext2_inode_large,
+ i_checksum_hi) -
+ EXT2_GOOD_OLD_INODE_SIZE))
+ crc |= ((__u32)large_inode->i_checksum_hi) << 16;
+ fprintf(out, "Inode checksum: 0x%08x\n", crc);
+ }
+
+ if (LINUX_S_ISLNK(inode->i_mode) && ext2fs_is_fast_symlink(inode))
+ fprintf(out, "%sFast link dest: \"%.*s\"\n", prefix,
+ (int)EXT2_I_SIZE(inode), (char *)inode->i_block);
+ else if (LINUX_S_ISLNK(inode->i_mode) &&
+ (inode->i_flags & EXT4_INLINE_DATA_FL))
+ dump_inline_symlink(out, inode_num, inode, prefix);
+ else if (LINUX_S_ISBLK(inode->i_mode) || LINUX_S_ISCHR(inode->i_mode)) {
+ int major, minor;
+ const char *devnote;
+
+ if (inode->i_block[0]) {
+ major = (inode->i_block[0] >> 8) & 255;
+ minor = inode->i_block[0] & 255;
+ devnote = "";
+ } else {
+ major = (inode->i_block[1] & 0xfff00) >> 8;
+ minor = ((inode->i_block[1] & 0xff) |
+ ((inode->i_block[1] >> 12) & 0xfff00));
+ devnote = "(New-style) ";
+ }
+ fprintf(out, "%sDevice major/minor number: %02d:%02d (hex %02x:%02x)\n",
+ devnote, major, minor, major, minor);
+ } else if (do_dump_blocks) {
+ if (inode->i_flags & EXT4_EXTENTS_FL)
+ dump_extents(out, prefix, inode_num,
+ DUMP_LEAF_EXTENTS|DUMP_NODE_EXTENTS, 0, 0);
+ else if (inode->i_flags & EXT4_INLINE_DATA_FL)
+ dump_inline_data(out, prefix, inode_num);
+ else
+ dump_blocks(out, prefix, inode_num);
+ }
+}
+
+static void dump_inode(ext2_ino_t inode_num, struct ext2_inode *inode)
+{
+ FILE *out;
+
+ out = open_pager();
+ internal_dump_inode(out, "", inode_num, inode, 1);
+ close_pager(out);
+}
+
+void do_stat(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ struct ext2_inode * inode_buf;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ inode_buf = (struct ext2_inode *)
+ malloc(EXT2_INODE_SIZE(current_fs->super));
+ if (!inode_buf) {
+ fprintf(stderr, "do_stat: can't allocate buffer\n");
+ return;
+ }
+
+ if (common_inode_args_process(argc, argv, &inode, 0)) {
+ free(inode_buf);
+ return;
+ }
+
+ if (debugfs_read_inode2(inode, inode_buf, argv[0],
+ EXT2_INODE_SIZE(current_fs->super), 0)) {
+ free(inode_buf);
+ return;
+ }
+
+ dump_inode(inode, inode_buf);
+ free(inode_buf);
+ return;
+}
+
+void do_dump_extents(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+ FILE *out;
+ int c, flags = 0;
+ int logical_width;
+ int physical_width;
+
+ reset_getopt();
+ while ((c = getopt(argc, argv, "nl")) != EOF) {
+ switch (c) {
+ case 'n':
+ flags |= DUMP_NODE_EXTENTS;
+ break;
+ case 'l':
+ flags |= DUMP_LEAF_EXTENTS;
+ break;
+ }
+ }
+
+ if (argc != optind + 1) {
+ com_err(0, 0, "Usage: dump_extents [-n] [-l] file");
+ return;
+ }
+
+ if (flags == 0)
+ flags = DUMP_NODE_EXTENTS | DUMP_LEAF_EXTENTS;
+ flags |= DUMP_EXTENT_TABLE;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[optind]);
+ if (ino == 0)
+ return;
+
+ if (debugfs_read_inode(ino, &inode, argv[0]))
+ return;
+
+ if ((inode.i_flags & EXT4_EXTENTS_FL) == 0) {
+ fprintf(stderr, "%s: does not uses extent block maps\n",
+ argv[optind]);
+ return;
+ }
+
+ logical_width = int_log10((EXT2_I_SIZE(&inode)+current_fs->blocksize-1)/
+ current_fs->blocksize) + 1;
+ if (logical_width < 5)
+ logical_width = 5;
+ physical_width = int_log10(ext2fs_blocks_count(current_fs->super)) + 1;
+ if (physical_width < 5)
+ physical_width = 5;
+
+ out = open_pager();
+ dump_extents(out, "", ino, flags, logical_width, physical_width);
+ close_pager(out);
+ return;
+}
+
+static int print_blocks_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private EXT2FS_ATTR((unused)))
+{
+ printf("%llu ", (unsigned long long) *blocknr);
+ return 0;
+}
+
+void do_blocks(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (common_inode_args_process(argc, argv, &inode, 0)) {
+ return;
+ }
+
+ ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL,
+ print_blocks_proc, NULL);
+ fputc('\n', stdout);
+ return;
+}
+
+void do_chroot(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ int retval;
+
+ if (common_inode_args_process(argc, argv, &inode, 0))
+ return;
+
+ retval = ext2fs_check_directory(current_fs, inode);
+ if (retval) {
+ com_err(argv[1], retval, 0);
+ return;
+ }
+ root = inode;
+}
+
+#ifndef READ_ONLY
+void do_clri(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ struct ext2_inode inode_buf;
+
+ if (common_inode_args_process(argc, argv, &inode, CHECK_FS_RW))
+ return;
+
+ if (debugfs_read_inode(inode, &inode_buf, argv[0]))
+ return;
+ memset(&inode_buf, 0, sizeof(inode_buf));
+ if (debugfs_write_inode(inode, &inode_buf, argv[0]))
+ return;
+}
+
+void do_freei(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int len = 1;
+ int err = 0;
+ ext2_ino_t inode;
+
+ if (common_args_process(argc, argv, 2, 3, argv[0], "<file> [num]",
+ CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+
+ inode = string_to_inode(argv[1]);
+ if (!inode)
+ return;
+
+ if (argc == 3) {
+ len = parse_ulong(argv[2], argv[0], "length", &err);
+ if (err)
+ return;
+ }
+
+ if (len == 1 &&
+ !ext2fs_test_inode_bitmap2(current_fs->inode_map,inode))
+ com_err(argv[0], 0, "Warning: inode already clear");
+ while (len-- > 0)
+ ext2fs_unmark_inode_bitmap2(current_fs->inode_map, inode++);
+ ext2fs_mark_ib_dirty(current_fs);
+}
+
+void do_seti(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int len = 1;
+ int err = 0;
+ ext2_ino_t inode;
+
+ if (common_args_process(argc, argv, 2, 3, argv[0], "<file> [num]",
+ CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+
+ inode = string_to_inode(argv[1]);
+ if (!inode)
+ return;
+
+ if (argc == 3) {
+ len = parse_ulong(argv[2], argv[0], "length", &err);
+ if (err)
+ return;
+ }
+
+ if ((len == 1) &&
+ ext2fs_test_inode_bitmap2(current_fs->inode_map,inode))
+ com_err(argv[0], 0, "Warning: inode already set");
+ while (len-- > 0)
+ ext2fs_mark_inode_bitmap2(current_fs->inode_map, inode++);
+ ext2fs_mark_ib_dirty(current_fs);
+}
+#endif /* READ_ONLY */
+
+void do_testi(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+
+ if (common_inode_args_process(argc, argv, &inode, CHECK_FS_BITMAPS))
+ return;
+
+ if (ext2fs_test_inode_bitmap2(current_fs->inode_map,inode))
+ printf("Inode %u is marked in use\n", inode);
+ else
+ printf("Inode %u is not in use\n", inode);
+}
+
+#ifndef READ_ONLY
+void do_freeb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ blk64_t block;
+ blk64_t count = 1;
+
+ if (common_block_args_process(argc, argv, &block, &count))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+ while (count-- > 0) {
+ if (!ext2fs_test_block_bitmap2(current_fs->block_map,block))
+ com_err(argv[0], 0, "Warning: block %llu already clear",
+ (unsigned long long) block);
+ ext2fs_unmark_block_bitmap2(current_fs->block_map,block);
+ block++;
+ }
+ ext2fs_mark_bb_dirty(current_fs);
+}
+
+void do_setb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ blk64_t block;
+ blk64_t count = 1;
+
+ if (common_block_args_process(argc, argv, &block, &count))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+ while (count-- > 0) {
+ if (ext2fs_test_block_bitmap2(current_fs->block_map,block))
+ com_err(argv[0], 0, "Warning: block %llu already set",
+ (unsigned long long) block);
+ ext2fs_mark_block_bitmap2(current_fs->block_map,block);
+ block++;
+ }
+ ext2fs_mark_bb_dirty(current_fs);
+}
+#endif /* READ_ONLY */
+
+void do_testb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ blk64_t block;
+ blk64_t count = 1;
+
+ if (common_block_args_process(argc, argv, &block, &count))
+ return;
+ while (count-- > 0) {
+ if (ext2fs_test_block_bitmap2(current_fs->block_map,block))
+ printf("Block %llu marked in use\n",
+ (unsigned long long) block);
+ else
+ printf("Block %llu not in use\n",
+ (unsigned long long) block);
+ block++;
+ }
+}
+
+#ifndef READ_ONLY
+static void modify_u8(char *com, const char *prompt,
+ const char *format, __u8 *val)
+{
+ char buf[200];
+ unsigned long v;
+ char *tmp;
+
+ sprintf(buf, format, *val);
+ printf("%30s [%s] ", prompt, buf);
+ if (!fgets(buf, sizeof(buf), stdin))
+ return;
+ if (buf[strlen (buf) - 1] == '\n')
+ buf[strlen (buf) - 1] = '\0';
+ if (!buf[0])
+ return;
+ v = strtoul(buf, &tmp, 0);
+ if (*tmp)
+ com_err(com, 0, "Bad value - %s", buf);
+ else
+ *val = v;
+}
+
+static void modify_u16(char *com, const char *prompt,
+ const char *format, __u16 *val)
+{
+ char buf[200];
+ unsigned long v;
+ char *tmp;
+
+ sprintf(buf, format, *val);
+ printf("%30s [%s] ", prompt, buf);
+ if (!fgets(buf, sizeof(buf), stdin))
+ return;
+ if (buf[strlen (buf) - 1] == '\n')
+ buf[strlen (buf) - 1] = '\0';
+ if (!buf[0])
+ return;
+ v = strtoul(buf, &tmp, 0);
+ if (*tmp)
+ com_err(com, 0, "Bad value - %s", buf);
+ else
+ *val = v;
+}
+
+static void modify_u32(char *com, const char *prompt,
+ const char *format, __u32 *val)
+{
+ char buf[200];
+ unsigned long v;
+ char *tmp;
+
+ sprintf(buf, format, *val);
+ printf("%30s [%s] ", prompt, buf);
+ if (!fgets(buf, sizeof(buf), stdin))
+ return;
+ if (buf[strlen (buf) - 1] == '\n')
+ buf[strlen (buf) - 1] = '\0';
+ if (!buf[0])
+ return;
+ v = strtoul(buf, &tmp, 0);
+ if (*tmp)
+ com_err(com, 0, "Bad value - %s", buf);
+ else
+ *val = v;
+}
+
+
+void do_modify_inode(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct ext2_inode inode;
+ ext2_ino_t inode_num;
+ int i;
+ unsigned char *frag, *fsize;
+ char buf[80];
+ int os;
+ const char *hex_format = "0x%x";
+ const char *octal_format = "0%o";
+ const char *decimal_format = "%d";
+ const char *unsignedlong_format = "%lu";
+
+ if (common_inode_args_process(argc, argv, &inode_num, CHECK_FS_RW))
+ return;
+
+ os = current_fs->super->s_creator_os;
+
+ if (debugfs_read_inode(inode_num, &inode, argv[1]))
+ return;
+
+ modify_u16(argv[0], "Mode", octal_format, &inode.i_mode);
+ modify_u16(argv[0], "User ID", decimal_format, &inode.i_uid);
+ modify_u16(argv[0], "Group ID", decimal_format, &inode.i_gid);
+ modify_u32(argv[0], "Size", unsignedlong_format, &inode.i_size);
+ modify_u32(argv[0], "Creation time", decimal_format, &inode.i_ctime);
+ modify_u32(argv[0], "Modification time", decimal_format, &inode.i_mtime);
+ modify_u32(argv[0], "Access time", decimal_format, &inode.i_atime);
+ modify_u32(argv[0], "Deletion time", decimal_format, &inode.i_dtime);
+ modify_u16(argv[0], "Link count", decimal_format, &inode.i_links_count);
+ if (os == EXT2_OS_LINUX)
+ modify_u16(argv[0], "Block count high", unsignedlong_format,
+ &inode.osd2.linux2.l_i_blocks_hi);
+ modify_u32(argv[0], "Block count", unsignedlong_format, &inode.i_blocks);
+ modify_u32(argv[0], "File flags", hex_format, &inode.i_flags);
+ modify_u32(argv[0], "Generation", hex_format, &inode.i_generation);
+#if 0
+ modify_u32(argv[0], "Reserved1", decimal_format, &inode.i_reserved1);
+#endif
+ modify_u32(argv[0], "File acl", decimal_format, &inode.i_file_acl);
+
+ modify_u32(argv[0], "High 32bits of size", decimal_format,
+ &inode.i_size_high);
+
+ if (os == EXT2_OS_HURD)
+ modify_u32(argv[0], "Translator Block",
+ decimal_format, &inode.osd1.hurd1.h_i_translator);
+
+ modify_u32(argv[0], "Fragment address", decimal_format, &inode.i_faddr);
+ switch (os) {
+ case EXT2_OS_HURD:
+ frag = &inode.osd2.hurd2.h_i_frag;
+ fsize = &inode.osd2.hurd2.h_i_fsize;
+ break;
+ default:
+ frag = fsize = 0;
+ }
+ if (frag)
+ modify_u8(argv[0], "Fragment number", decimal_format, frag);
+ if (fsize)
+ modify_u8(argv[0], "Fragment size", decimal_format, fsize);
+
+ for (i=0; i < EXT2_NDIR_BLOCKS; i++) {
+ sprintf(buf, "Direct Block #%u", i);
+ modify_u32(argv[0], buf, decimal_format, &inode.i_block[i]);
+ }
+ modify_u32(argv[0], "Indirect Block", decimal_format,
+ &inode.i_block[EXT2_IND_BLOCK]);
+ modify_u32(argv[0], "Double Indirect Block", decimal_format,
+ &inode.i_block[EXT2_DIND_BLOCK]);
+ modify_u32(argv[0], "Triple Indirect Block", decimal_format,
+ &inode.i_block[EXT2_TIND_BLOCK]);
+ if (debugfs_write_inode(inode_num, &inode, argv[1]))
+ return;
+}
+#endif /* READ_ONLY */
+
+void do_change_working_dir(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ int retval;
+
+ if (common_inode_args_process(argc, argv, &inode, 0))
+ return;
+
+ retval = ext2fs_check_directory(current_fs, inode);
+ if (retval) {
+ com_err(argv[1], retval, 0);
+ return;
+ }
+ cwd = inode;
+ return;
+}
+
+void do_print_working_directory(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int retval;
+ char *pathname = NULL;
+
+ if (common_args_process(argc, argv, 1, 1,
+ "print_working_directory", "", 0))
+ return;
+
+ retval = ext2fs_get_pathname(current_fs, cwd, 0, &pathname);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while trying to get pathname of cwd");
+ }
+ printf("[pwd] INODE: %6u PATH: %s\n",
+ cwd, pathname ? pathname : "NULL");
+ if (pathname) {
+ free(pathname);
+ pathname = NULL;
+ }
+ retval = ext2fs_get_pathname(current_fs, root, 0, &pathname);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while trying to get pathname of root");
+ }
+ printf("[root] INODE: %6u PATH: %s\n",
+ root, pathname ? pathname : "NULL");
+ if (pathname) {
+ free(pathname);
+ pathname = NULL;
+ }
+ return;
+}
+
+#ifndef READ_ONLY
+static void make_link(char *sourcename, char *destname)
+{
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ int retval;
+ ext2_ino_t dir;
+ char *dest, *cp, *base_name;
+
+ /*
+ * Get the source inode
+ */
+ ino = string_to_inode(sourcename);
+ if (!ino)
+ return;
+ base_name = strrchr(sourcename, '/');
+ if (base_name)
+ base_name++;
+ else
+ base_name = sourcename;
+ /*
+ * Figure out the destination. First see if it exists and is
+ * a directory.
+ */
+ if (! (retval=ext2fs_namei(current_fs, root, cwd, destname, &dir)))
+ dest = base_name;
+ else {
+ /*
+ * OK, it doesn't exist. See if it is
+ * '<dir>/basename' or 'basename'
+ */
+ cp = strrchr(destname, '/');
+ if (cp) {
+ *cp = 0;
+ dir = string_to_inode(destname);
+ if (!dir)
+ return;
+ dest = cp+1;
+ } else {
+ dir = cwd;
+ dest = destname;
+ }
+ }
+
+ if (debugfs_read_inode(ino, &inode, sourcename))
+ return;
+
+ retval = ext2fs_link(current_fs, dir, dest, ino,
+ ext2_file_type(inode.i_mode));
+ if (retval)
+ com_err("make_link", retval, 0);
+ return;
+}
+
+
+void do_link(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (common_args_process(argc, argv, 3, 3, "link",
+ "<source file> <dest_name>", CHECK_FS_RW))
+ return;
+
+ make_link(argv[1], argv[2]);
+}
+
+static int mark_blocks_proc(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private EXT2FS_ATTR((unused)))
+{
+ blk64_t block;
+
+ block = *blocknr;
+ ext2fs_block_alloc_stats2(fs, block, +1);
+ return 0;
+}
+
+void do_undel(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+
+ if (common_args_process(argc, argv, 2, 3, "undelete",
+ "<inode_num> [dest_name]",
+ CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+
+ if (debugfs_read_inode(ino, &inode, argv[1]))
+ return;
+
+ if (ext2fs_test_inode_bitmap2(current_fs->inode_map, ino)) {
+ com_err(argv[1], 0, "Inode is not marked as deleted");
+ return;
+ }
+
+ /*
+ * XXX this function doesn't handle changing the links count on the
+ * parent directory when undeleting a directory.
+ */
+ inode.i_links_count = LINUX_S_ISDIR(inode.i_mode) ? 2 : 1;
+ inode.i_dtime = 0;
+
+ if (debugfs_write_inode(ino, &inode, argv[0]))
+ return;
+
+ ext2fs_block_iterate3(current_fs, ino, BLOCK_FLAG_READ_ONLY, NULL,
+ mark_blocks_proc, NULL);
+
+ ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0);
+
+ if (argc > 2)
+ make_link(argv[1], argv[2]);
+}
+
+static void unlink_file_by_name(char *filename)
+{
+ int retval;
+ ext2_ino_t dir;
+ char *base_name;
+
+ base_name = strrchr(filename, '/');
+ if (base_name) {
+ *base_name++ = '\0';
+ dir = string_to_inode(filename);
+ if (!dir)
+ return;
+ } else {
+ dir = cwd;
+ base_name = filename;
+ }
+ retval = ext2fs_unlink(current_fs, dir, base_name, 0, 0);
+ if (retval)
+ com_err("unlink_file_by_name", retval, 0);
+ return;
+}
+
+void do_unlink(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (common_args_process(argc, argv, 2, 2, "link",
+ "<pathname>", CHECK_FS_RW))
+ return;
+
+ unlink_file_by_name(argv[1]);
+}
+
+void do_copy_inode(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t src_ino, dest_ino;
+ unsigned char buf[4096];
+
+ if (common_args_process(argc, argv, 3, 3, "copy_inode",
+ "<source file> <dest_name>", CHECK_FS_RW))
+ return;
+
+ src_ino = string_to_inode(argv[1]);
+ if (!src_ino)
+ return;
+
+ dest_ino = string_to_inode(argv[2]);
+ if (!dest_ino)
+ return;
+
+ if (debugfs_read_inode2(src_ino, (struct ext2_inode *) buf,
+ argv[0], sizeof(buf), 0))
+ return;
+
+ if (debugfs_write_inode2(dest_ino, (struct ext2_inode *) buf,
+ argv[0], sizeof(buf), 0))
+ return;
+}
+
+#endif /* READ_ONLY */
+
+void do_find_free_block(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ blk64_t free_blk, goal, first_free = 0;
+ int count;
+ errcode_t retval;
+ char *tmp;
+
+ if ((argc > 3) || (argc==2 && *argv[1] == '?')) {
+ com_err(argv[0], 0, "Usage: find_free_block [count [goal]]");
+ return;
+ }
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc > 1) {
+ count = strtol(argv[1],&tmp,0);
+ if (*tmp) {
+ com_err(argv[0], 0, "Bad count - %s", argv[1]);
+ return;
+ }
+ } else
+ count = 1;
+
+ if (argc > 2) {
+ goal = strtol(argv[2], &tmp, 0);
+ if (*tmp) {
+ com_err(argv[0], 0, "Bad goal - %s", argv[1]);
+ return;
+ }
+ }
+ else
+ goal = current_fs->super->s_first_data_block;
+
+ printf("Free blocks found: ");
+ free_blk = goal - 1;
+ while (count-- > 0) {
+ retval = ext2fs_new_block2(current_fs, free_blk + 1, 0,
+ &free_blk);
+ if (first_free) {
+ if (first_free == free_blk)
+ break;
+ } else
+ first_free = free_blk;
+ if (retval) {
+ com_err("ext2fs_new_block", retval, 0);
+ return;
+ } else
+ printf("%llu ", (unsigned long long) free_blk);
+ }
+ printf("\n");
+}
+
+void do_find_free_inode(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t free_inode, dir;
+ int mode;
+ int retval;
+ char *tmp;
+
+ if (argc > 3 || (argc>1 && *argv[1] == '?')) {
+ com_err(argv[0], 0, "Usage: find_free_inode [dir [mode]]");
+ return;
+ }
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc > 1) {
+ dir = strtol(argv[1], &tmp, 0);
+ if (*tmp) {
+ com_err(argv[0], 0, "Bad dir - %s", argv[1]);
+ return;
+ }
+ }
+ else
+ dir = root;
+ if (argc > 2) {
+ mode = strtol(argv[2], &tmp, 0);
+ if (*tmp) {
+ com_err(argv[0], 0, "Bad mode - %s", argv[2]);
+ return;
+ }
+ } else
+ mode = 010755;
+
+ retval = ext2fs_new_inode(current_fs, dir, mode, 0, &free_inode);
+ if (retval)
+ com_err("ext2fs_new_inode", retval, 0);
+ else
+ printf("Free inode found: %u\n", free_inode);
+}
+
+#ifndef READ_ONLY
+void do_write(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ if (common_args_process(argc, argv, 3, 3, "write",
+ "<native file> <new file>", CHECK_FS_RW))
+ return;
+
+ retval = do_write_internal(current_fs, cwd, argv[1], argv[2], root);
+ if (retval)
+ com_err(argv[0], retval, 0);
+}
+
+void do_mknod(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned long major, minor;
+ errcode_t retval;
+ int nr;
+ struct stat st;
+
+ if (check_fs_open(argv[0]))
+ return;
+ if (argc < 3 || argv[2][1]) {
+ usage:
+ com_err(argv[0], 0, "Usage: mknod <name> [p| [c|b] <major> <minor>]");
+ return;
+ }
+
+ minor = major = 0;
+ switch (argv[2][0]) {
+ case 'p':
+ st.st_mode = S_IFIFO;
+ nr = 3;
+ break;
+ case 'c':
+ st.st_mode = S_IFCHR;
+ nr = 5;
+ break;
+ case 'b':
+ st.st_mode = S_IFBLK;
+ nr = 5;
+ break;
+ default:
+ nr = 0;
+ }
+
+ if (nr == 5) {
+ major = strtoul(argv[3], argv+3, 0);
+ minor = strtoul(argv[4], argv+4, 0);
+ if (major > 65535 || minor > 65535 || argv[3][0] || argv[4][0])
+ nr = 0;
+ }
+
+ if (argc != nr)
+ goto usage;
+
+ st.st_rdev = makedev(major, minor);
+ retval = do_mknod_internal(current_fs, cwd, argv[1],
+ st.st_mode, st.st_rdev);
+ if (retval)
+ com_err(argv[0], retval, 0);
+}
+
+void do_mkdir(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ if (common_args_process(argc, argv, 2, 2, "mkdir",
+ "<filename>", CHECK_FS_RW))
+ return;
+
+ retval = do_mkdir_internal(current_fs, cwd, argv[1], root);
+ if (retval)
+ com_err(argv[0], retval, 0);
+
+}
+
+static int release_blocks_proc(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private)
+{
+ blk64_t block = *blocknr;
+ blk64_t *last_cluster = (blk64_t *)private;
+ blk64_t cluster = EXT2FS_B2C(fs, block);
+
+ if (cluster == *last_cluster)
+ return 0;
+
+ *last_cluster = cluster;
+
+ ext2fs_block_alloc_stats2(fs, block, -1);
+ return 0;
+}
+
+static void kill_file_by_inode(ext2_ino_t inode)
+{
+ struct ext2_inode inode_buf;
+
+ if (debugfs_read_inode(inode, &inode_buf, 0))
+ return;
+ inode_buf.i_dtime = current_fs->now ? current_fs->now : time(0);
+ if (debugfs_write_inode(inode, &inode_buf, 0))
+ return;
+ if (ext2fs_inode_has_valid_blocks2(current_fs, &inode_buf)) {
+ blk64_t last_cluster = 0;
+ ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY,
+ NULL, release_blocks_proc, &last_cluster);
+ }
+ printf("\n");
+ ext2fs_inode_alloc_stats2(current_fs, inode, -1,
+ LINUX_S_ISDIR(inode_buf.i_mode));
+}
+
+
+void do_kill_file(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode_num;
+
+ if (common_inode_args_process(argc, argv, &inode_num, CHECK_FS_RW))
+ return;
+
+ kill_file_by_inode(inode_num);
+}
+
+void do_rm(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int retval;
+ ext2_ino_t inode_num;
+ struct ext2_inode inode;
+
+ if (common_args_process(argc, argv, 2, 2, "rm",
+ "<filename>", CHECK_FS_RW))
+ return;
+
+ retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num);
+ if (retval) {
+ com_err(argv[0], retval, "while trying to resolve filename");
+ return;
+ }
+
+ if (debugfs_read_inode(inode_num, &inode, argv[0]))
+ return;
+
+ if (LINUX_S_ISDIR(inode.i_mode)) {
+ com_err(argv[0], 0, "file is a directory");
+ return;
+ }
+
+ --inode.i_links_count;
+ if (debugfs_write_inode(inode_num, &inode, argv[0]))
+ return;
+
+ unlink_file_by_name(argv[1]);
+ if (inode.i_links_count == 0)
+ kill_file_by_inode(inode_num);
+}
+
+struct rd_struct {
+ ext2_ino_t parent;
+ int empty;
+};
+
+static int rmdir_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entry EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct rd_struct *rds = (struct rd_struct *) private;
+
+ if (dirent->inode == 0)
+ return 0;
+ if ((ext2fs_dirent_name_len(dirent) == 1) && (dirent->name[0] == '.'))
+ return 0;
+ if ((ext2fs_dirent_name_len(dirent) == 2) && (dirent->name[0] == '.') &&
+ (dirent->name[1] == '.')) {
+ rds->parent = dirent->inode;
+ return 0;
+ }
+ rds->empty = 0;
+ return 0;
+}
+
+void do_rmdir(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int retval;
+ ext2_ino_t inode_num;
+ struct ext2_inode inode;
+ struct rd_struct rds;
+
+ if (common_args_process(argc, argv, 2, 2, "rmdir",
+ "<filename>", CHECK_FS_RW))
+ return;
+
+ retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num);
+ if (retval) {
+ com_err(argv[0], retval, "while trying to resolve filename");
+ return;
+ }
+
+ if (debugfs_read_inode(inode_num, &inode, argv[0]))
+ return;
+
+ if (!LINUX_S_ISDIR(inode.i_mode)) {
+ com_err(argv[0], 0, "file is not a directory");
+ return;
+ }
+
+ rds.parent = 0;
+ rds.empty = 1;
+
+ retval = ext2fs_dir_iterate2(current_fs, inode_num, 0,
+ 0, rmdir_proc, &rds);
+ if (retval) {
+ com_err(argv[0], retval, "while iterating over directory");
+ return;
+ }
+ if (rds.empty == 0) {
+ com_err(argv[0], 0, "directory not empty");
+ return;
+ }
+
+ inode.i_links_count = 0;
+ if (debugfs_write_inode(inode_num, &inode, argv[0]))
+ return;
+
+ unlink_file_by_name(argv[1]);
+ kill_file_by_inode(inode_num);
+
+ if (rds.parent) {
+ if (debugfs_read_inode(rds.parent, &inode, argv[0]))
+ return;
+ if (inode.i_links_count > 1)
+ inode.i_links_count--;
+ if (debugfs_write_inode(rds.parent, &inode, argv[0]))
+ return;
+ }
+}
+#endif /* READ_ONLY */
+
+void do_show_debugfs_params(int argc EXT2FS_ATTR((unused)),
+ char *argv[] EXT2FS_ATTR((unused)),
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (current_fs)
+ printf("Open mode: read-%s\n",
+ current_fs->flags & EXT2_FLAG_RW ? "write" : "only");
+ printf("Filesystem in use: %s\n",
+ current_fs ? current_fs->device_name : "--none--");
+}
+
+#ifndef READ_ONLY
+void do_expand_dir(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ int retval;
+
+ if (common_inode_args_process(argc, argv, &inode, CHECK_FS_RW))
+ return;
+
+ retval = ext2fs_expand_dir(current_fs, inode);
+ if (retval)
+ com_err("ext2fs_expand_dir", retval, 0);
+ return;
+}
+
+void do_features(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int i;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if ((argc != 1) && check_fs_read_write(argv[0]))
+ return;
+ for (i=1; i < argc; i++) {
+ if (e2p_edit_feature(argv[i],
+ &current_fs->super->s_feature_compat, 0))
+ com_err(argv[0], 0, "Unknown feature: %s\n",
+ argv[i]);
+ else
+ ext2fs_mark_super_dirty(current_fs);
+ }
+ print_features(current_fs->super, stdout);
+}
+#endif /* READ_ONLY */
+
+void do_bmap(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ blk64_t blk, pblk = 0;
+ int c, err, flags = 0, ret_flags = 0;
+ errcode_t errcode;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "a")) != EOF) {
+ switch (c) {
+ case 'a':
+ flags |= BMAP_ALLOC;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (argc <= optind+1) {
+ print_usage:
+ com_err(0, 0,
+ "Usage: bmap [-a] <file> logical_blk [physical_blk]");
+ return;
+ }
+
+ ino = string_to_inode(argv[optind++]);
+ if (!ino)
+ return;
+ err = strtoblk(argv[0], argv[optind++], "logical block", &blk);
+ if (err)
+ return;
+
+ if (argc > optind+1)
+ goto print_usage;
+
+ if (argc == optind+1) {
+ err = strtoblk(argv[0], argv[optind++],
+ "physical block", &pblk);
+ if (err)
+ return;
+ if (flags & BMAP_ALLOC) {
+ com_err(0, 0, "Can't set and allocate a block");
+ return;
+ }
+ flags |= BMAP_SET;
+ }
+
+ errcode = ext2fs_bmap2(current_fs, ino, 0, 0, flags, blk,
+ &ret_flags, &pblk);
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while mapping logical block %llu\n",
+ (unsigned long long) blk);
+ return;
+ }
+ printf("%llu", (unsigned long long) pblk);
+ if (ret_flags & BMAP_RET_UNINIT)
+ fputs(" (uninit)", stdout);
+ fputc('\n', stdout);
+}
+
+void do_imap(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ unsigned long group, block, block_nr, offset;
+
+ if (common_args_process(argc, argv, 2, 2, argv[0],
+ "<file>", 0))
+ return;
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+
+ group = (ino - 1) / EXT2_INODES_PER_GROUP(current_fs->super);
+ offset = ((ino - 1) % EXT2_INODES_PER_GROUP(current_fs->super)) *
+ EXT2_INODE_SIZE(current_fs->super);
+ block = offset >> EXT2_BLOCK_SIZE_BITS(current_fs->super);
+ if (!ext2fs_inode_table_loc(current_fs, (unsigned)group)) {
+ com_err(argv[0], 0, "Inode table for group %lu is missing\n",
+ group);
+ return;
+ }
+ block_nr = ext2fs_inode_table_loc(current_fs, (unsigned)group) +
+ block;
+ offset &= (EXT2_BLOCK_SIZE(current_fs->super) - 1);
+
+ printf("Inode %u is part of block group %lu\n"
+ "\tlocated at block %lu, offset 0x%04lx\n", ino, group,
+ block_nr, offset);
+
+}
+
+void do_idump(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct ext2_inode_large *inode;
+ ext2_ino_t ino;
+ unsigned char *buf;
+ errcode_t err;
+ unsigned int isize, size, offset = 0;
+ int c, mode = 0;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "bex")) != EOF) {
+ if (mode || c == '?') {
+ com_err(argv[0], 0,
+ "Usage: inode_dump [-b]|[-e] <file>");
+ return;
+ }
+ mode = c;
+ }
+ if (optind != argc-1)
+ return;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[optind]);
+ if (!ino)
+ return;
+
+ isize = EXT2_INODE_SIZE(current_fs->super);
+ err = ext2fs_get_mem(isize, &buf);
+ if (err) {
+ com_err(argv[0], err, "while allocating memory");
+ return;
+ }
+
+ err = ext2fs_read_inode_full(current_fs, ino,
+ (struct ext2_inode *)buf, isize);
+ if (err) {
+ com_err(argv[0], err, "while reading inode %u", ino);
+ goto err;
+ }
+
+ inode = (struct ext2_inode_large *) buf;
+ size = isize;
+ switch (mode) {
+ case 'b':
+ offset = ((char *) (&inode->i_block)) - ((char *) buf);
+ size = sizeof(inode->i_block);
+ break;
+ case 'x':
+ case 'e':
+ if (size <= EXT2_GOOD_OLD_INODE_SIZE) {
+ com_err(argv[0], 0, "No extra space in inode");
+ goto err;
+ }
+ offset = EXT2_GOOD_OLD_INODE_SIZE + inode->i_extra_isize;
+ if (offset > size)
+ goto err;
+ size -= offset;
+ break;
+ }
+ if (mode == 'x')
+ raw_inode_xattr_dump(stdout, buf + offset, size);
+ else
+ do_byte_hexdump(stdout, buf + offset, size);
+err:
+ ext2fs_free_mem(&buf);
+}
+
+#ifndef READ_ONLY
+void do_set_current_time(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ __s64 now;
+
+ if (common_args_process(argc, argv, 2, 2, argv[0],
+ "<time>", 0))
+ return;
+
+ now = string_to_time(argv[1]);
+ if (now == -1) {
+ com_err(argv[0], 0, "Couldn't parse argument as a time: %s\n",
+ argv[1]);
+ return;
+
+ } else {
+ printf("Setting current time to %s\n", time_to_string(now));
+ current_fs->now = now;
+ }
+}
+#endif /* READ_ONLY */
+
+static int find_supp_feature(__u32 *supp, int feature_type, char *name)
+{
+ int compat, bit, ret;
+ unsigned int feature_mask;
+
+ if (name) {
+ if (feature_type == E2P_FS_FEATURE)
+ ret = e2p_string2feature(name, &compat, &feature_mask);
+ else
+ ret = e2p_jrnl_string2feature(name, &compat,
+ &feature_mask);
+ if (ret)
+ return ret;
+
+ if (!(supp[compat] & feature_mask))
+ return 1;
+ } else {
+ for (compat = 0; compat < 3; compat++) {
+ for (bit = 0, feature_mask = 1; bit < 32;
+ bit++, feature_mask <<= 1) {
+ if (supp[compat] & feature_mask) {
+ if (feature_type == E2P_FS_FEATURE)
+ fprintf(stdout, " %s",
+ e2p_feature2string(compat,
+ feature_mask));
+ else
+ fprintf(stdout, " %s",
+ e2p_jrnl_feature2string(compat,
+ feature_mask));
+ }
+ }
+ }
+ fprintf(stdout, "\n");
+ }
+
+ return 0;
+}
+
+void do_supported_features(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int ret;
+ __u32 supp[3] = { EXT2_LIB_FEATURE_COMPAT_SUPP,
+ EXT2_LIB_FEATURE_INCOMPAT_SUPP,
+ EXT2_LIB_FEATURE_RO_COMPAT_SUPP };
+ __u32 jrnl_supp[3] = { JBD2_KNOWN_COMPAT_FEATURES,
+ JBD2_KNOWN_INCOMPAT_FEATURES,
+ JBD2_KNOWN_ROCOMPAT_FEATURES };
+
+ if (argc > 1) {
+ ret = find_supp_feature(supp, E2P_FS_FEATURE, argv[1]);
+ if (ret) {
+ ret = find_supp_feature(jrnl_supp, E2P_JOURNAL_FEATURE,
+ argv[1]);
+ }
+ if (ret)
+ com_err(argv[0], 0, "Unknown feature: %s\n", argv[1]);
+ else
+ fprintf(stdout, "Supported feature: %s\n", argv[1]);
+ } else {
+ fprintf(stdout, "Supported features:");
+ ret = find_supp_feature(supp, E2P_FS_FEATURE, NULL);
+ ret = find_supp_feature(jrnl_supp, E2P_JOURNAL_FEATURE, NULL);
+ }
+}
+
+#ifndef READ_ONLY
+void do_punch(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ blk64_t start, end;
+ int err;
+ errcode_t errcode;
+
+ if (common_args_process(argc, argv, 3, 4, argv[0],
+ "<file> start_blk [end_blk]",
+ CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+ err = strtoblk(argv[0], argv[2], "logical block", &start);
+ if (err)
+ return;
+ if (argc == 4) {
+ err = strtoblk(argv[0], argv[3], "logical block", &end);
+ if (err)
+ return;
+ } else
+ end = ~0;
+
+ errcode = ext2fs_punch(current_fs, ino, 0, 0, start, end);
+
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while truncating inode %u from %llu to %llu\n", ino,
+ (unsigned long long) start, (unsigned long long) end);
+ return;
+ }
+}
+
+void do_fallocate(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ blk64_t start, end;
+ int err;
+ errcode_t errcode;
+
+ if (common_args_process(argc, argv, 3, 4, argv[0],
+ "<file> start_blk [end_blk]",
+ CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+ err = strtoblk(argv[0], argv[2], "logical block", &start);
+ if (err)
+ return;
+ if (argc == 4) {
+ err = strtoblk(argv[0], argv[3], "logical block", &end);
+ if (err)
+ return;
+ } else
+ end = ~0;
+
+ errcode = ext2fs_fallocate(current_fs, EXT2_FALLOCATE_INIT_BEYOND_EOF,
+ ino, NULL, ~0ULL, start, end - start + 1);
+
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while fallocating inode %u from %llu to %llu\n", ino,
+ (unsigned long long) start, (unsigned long long) end);
+ return;
+ }
+}
+
+void do_symlink(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ if (common_args_process(argc, argv, 3, 3, "symlink",
+ "<filename> <target>", CHECK_FS_RW))
+ return;
+
+ retval = do_symlink_internal(current_fs, cwd, argv[1], argv[2], root);
+ if (retval)
+ com_err(argv[0], retval, 0);
+
+}
+#endif /* READ_ONLY */
+
+#if CONFIG_MMP
+void do_dump_mmp(int argc EXT2FS_ATTR((unused)), char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct mmp_struct *mmp_s;
+ unsigned long long mmp_block;
+ time_t t;
+ errcode_t retval = 0;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc > 1) {
+ char *end = NULL;
+ mmp_block = strtoull(argv[1], &end, 0);
+ if (end == argv[0] || mmp_block == 0) {
+ fprintf(stderr, "%s: invalid MMP block '%s' given\n",
+ argv[0], argv[1]);
+ return;
+ }
+ } else {
+ mmp_block = current_fs->super->s_mmp_block;
+ }
+
+ if (mmp_block == 0) {
+ fprintf(stderr, "%s: MMP: not active on this filesystem.\n",
+ argv[0]);
+ return;
+ }
+
+ if (current_fs->mmp_buf == NULL) {
+ retval = ext2fs_get_mem(current_fs->blocksize,
+ &current_fs->mmp_buf);
+ if (retval) {
+ com_err(argv[0], retval, "allocating MMP buffer.\n");
+ return;
+ }
+ }
+
+ mmp_s = current_fs->mmp_buf;
+
+ retval = ext2fs_mmp_read(current_fs, mmp_block, current_fs->mmp_buf);
+ if (retval) {
+ com_err(argv[0], retval, "reading MMP block %llu.\n",
+ (unsigned long long) mmp_block);
+ return;
+ }
+
+ t = mmp_s->mmp_time;
+ fprintf(stdout, "block_number: %llu\n",
+ (unsigned long long) current_fs->super->s_mmp_block);
+ fprintf(stdout, "update_interval: %d\n",
+ current_fs->super->s_mmp_update_interval);
+ fprintf(stdout, "check_interval: %d\n", mmp_s->mmp_check_interval);
+ fprintf(stdout, "sequence: %08x\n", mmp_s->mmp_seq);
+ fprintf(stdout, "time: %llu -- %s",
+ (unsigned long long) mmp_s->mmp_time, ctime(&t));
+ fprintf(stdout, "node_name: %.*s\n",
+ EXT2_LEN_STR(mmp_s->mmp_nodename));
+ fprintf(stdout, "device_name: %.*s\n",
+ EXT2_LEN_STR(mmp_s->mmp_bdevname));
+ fprintf(stdout, "magic: 0x%x\n", mmp_s->mmp_magic);
+ fprintf(stdout, "checksum: 0x%08x\n", mmp_s->mmp_checksum);
+}
+#else
+void do_dump_mmp(int argc EXT2FS_ATTR((unused)),
+ char *argv[] EXT2FS_ATTR((unused)),
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ fprintf(stdout, "MMP is unsupported, please recompile with "
+ "--enable-mmp\n");
+}
+#endif
+
+static int source_file(const char *cmd_file, int ss_idx)
+{
+ FILE *f;
+ char buf[BUFSIZ];
+ char *cp;
+ int exit_status = 0;
+ int retval;
+
+ if (strcmp(cmd_file, "-") == 0)
+ f = stdin;
+ else {
+ f = fopen(cmd_file, "r");
+ if (!f) {
+ perror(cmd_file);
+ exit(1);
+ }
+ }
+ fflush(stdout);
+ fflush(stderr);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ while (!feof(f)) {
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ break;
+ if (buf[0] == '#') {
+ printf("%s", buf);
+ continue;
+ }
+ cp = strchr(buf, '\n');
+ if (cp)
+ *cp = 0;
+ cp = strchr(buf, '\r');
+ if (cp)
+ *cp = 0;
+ printf("debugfs: %s\n", buf);
+ retval = ss_execute_line(ss_idx, buf);
+ if (retval) {
+ ss_perror(ss_idx, retval, buf);
+ exit_status++;
+ }
+ }
+ if (f != stdin)
+ fclose(f);
+ return exit_status;
+}
+
+int main(int argc, char **argv)
+{
+ int retval;
+ const char *usage =
+ "Usage: %s [-b blocksize] [-s superblock] [-f cmd_file] "
+ "[-R request] [-d data_source_device] [-i] [-n] [-D] [-V] ["
+#ifndef READ_ONLY
+ "[-w] [-z undo_file] "
+#endif
+ "[-c]] [device]";
+ int c;
+ int open_flags = EXT2_FLAG_SOFTSUPP_FEATURES |
+ EXT2_FLAG_64BITS | EXT2_FLAG_THREADS;
+ char *request = 0;
+ int exit_status = 0;
+ char *cmd_file = 0;
+ blk64_t superblock = 0;
+ blk64_t blocksize = 0;
+ int catastrophic = 0;
+ char *data_filename = 0;
+#ifdef READ_ONLY
+ const char *opt_string = "nicR:f:b:s:Vd:D";
+#else
+ const char *opt_string = "niwcR:f:b:s:Vd:Dz:";
+#endif
+ char *undo_file = NULL;
+#ifdef CONFIG_JBD_DEBUG
+ char *jbd_debug;
+#endif
+
+ if (debug_prog_name == 0)
+#ifdef READ_ONLY
+ debug_prog_name = "rdebugfs";
+#else
+ debug_prog_name = "debugfs";
+#endif
+ add_error_table(&et_ext2_error_table);
+ fprintf (stderr, "%s %s (%s)\n", debug_prog_name,
+ E2FSPROGS_VERSION, E2FSPROGS_DATE);
+
+#ifdef CONFIG_JBD_DEBUG
+ jbd_debug = ss_safe_getenv("DEBUGFS_JBD_DEBUG");
+ if (jbd_debug) {
+ int res = sscanf(jbd_debug, "%d", &journal_enable_debug);
+
+ if (res != 1) {
+ fprintf(stderr,
+ "DEBUGFS_JBD_DEBUG \"%s\" not an integer\n\n",
+ jbd_debug);
+ exit(1);
+ }
+ }
+#endif
+ while ((c = getopt (argc, argv, opt_string)) != EOF) {
+ switch (c) {
+ case 'R':
+ request = optarg;
+ break;
+ case 'f':
+ cmd_file = optarg;
+ break;
+ case 'd':
+ data_filename = optarg;
+ break;
+ case 'i':
+ open_flags |= EXT2_FLAG_IMAGE_FILE;
+ break;
+ case 'n':
+ open_flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ break;
+#ifndef READ_ONLY
+ case 'w':
+ open_flags |= EXT2_FLAG_RW;
+ break;
+#endif
+ case 'D':
+ open_flags |= EXT2_FLAG_DIRECT_IO;
+ break;
+ case 'b':
+ blocksize = parse_ulong(optarg, argv[0],
+ "block size", 0);
+ break;
+ case 's':
+ retval = strtoblk(argv[0], optarg,
+ "superblock block number",
+ &superblock);
+ if (retval)
+ return 1;
+ break;
+ case 'c':
+ catastrophic = 1;
+ break;
+ case 'V':
+ /* Print version number and exit */
+ fprintf(stderr, "\tUsing %s\n",
+ error_message(EXT2_ET_BASE));
+ exit(0);
+#ifndef READ_ONLY
+ case 'z':
+ undo_file = optarg;
+ break;
+#endif
+ default:
+ com_err(argv[0], 0, usage, debug_prog_name);
+ return 1;
+ }
+ }
+ if (optind < argc)
+ open_filesystem(argv[optind], open_flags,
+ superblock, blocksize, catastrophic,
+ data_filename, undo_file);
+
+ ss_sci_idx = ss_create_invocation(debug_prog_name, "0.0", (char *) NULL,
+ &debug_cmds, &retval);
+ if (retval) {
+ ss_perror(ss_sci_idx, retval, "creating invocation");
+ exit(1);
+ }
+ ss_get_readline(ss_sci_idx);
+
+ (void) ss_add_request_table(ss_sci_idx, &ss_std_requests, 1, &retval);
+ if (retval) {
+ ss_perror(ss_sci_idx, retval, "adding standard requests");
+ exit (1);
+ }
+ if (extra_cmds)
+ ss_add_request_table(ss_sci_idx, extra_cmds, 1, &retval);
+ if (retval) {
+ ss_perror(ss_sci_idx, retval, "adding extra requests");
+ exit (1);
+ }
+ if (request) {
+ retval = 0;
+ retval = ss_execute_line(ss_sci_idx, request);
+ if (retval) {
+ ss_perror(ss_sci_idx, retval, request);
+ exit_status++;
+ }
+ } else if (cmd_file) {
+ exit_status = source_file(cmd_file, ss_sci_idx);
+ } else {
+ ss_listen(ss_sci_idx);
+ }
+
+ ss_delete_invocation(ss_sci_idx);
+
+ if (current_fs)
+ close_filesystem();
+
+ remove_error_table(&et_ext2_error_table);
+ return exit_status;
+}
diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h
new file mode 100644
index 0000000..39bc024
--- /dev/null
+++ b/debugfs/debugfs.h
@@ -0,0 +1,210 @@
+/*
+ * debugfs.h --- header file for the debugfs program
+ */
+
+#include "ss/ss.h"
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "../misc/create_inode.h"
+#include "support/quotaio.h"
+
+#ifdef __STDC__
+#define NOARGS void
+#else
+#define NOARGS
+#define const
+#endif
+
+/*
+ * Flags used by the common argument processing functions
+ */
+#define CHECK_FS_RW 0x0001
+#define CHECK_FS_BITMAPS 0x0002
+#define CHECK_FS_NOTOPEN 0x0004
+
+extern ext2_filsys current_fs;
+extern quota_ctx_t current_qctx;
+extern ext2_ino_t root, cwd;
+extern int ss_sci_idx;
+extern ss_request_table debug_cmds, extent_cmds;
+
+extern void reset_getopt(void);
+extern FILE *open_pager(void);
+extern void close_pager(FILE *stream);
+extern int check_fs_open(char *name);
+extern int check_fs_not_open(char *name);
+extern int check_fs_read_write(char *name);
+extern int check_fs_bitmaps(char *name);
+extern ext2_ino_t string_to_inode(char *str);
+extern char *inode_time_to_string(__u32 xtime, __u32 xtime_extra);
+extern char *time_to_string(__s64);
+extern __s64 string_to_time(const char *);
+extern unsigned long parse_ulong(const char *str, const char *cmd,
+ const char *descr, int *err);
+extern unsigned long long parse_ulonglong(const char *str, const char *cmd,
+ const char *descr, int *err);
+extern int strtoblk(const char *cmd, const char *str, const char *errmsg,
+ blk64_t *ret);
+extern int common_args_process(int argc, char *argv[], int min_argc,
+ int max_argc, const char *cmd,
+ const char *usage, int flags);
+extern int common_inode_args_process(int argc, char *argv[],
+ ext2_ino_t *inode, int flags);
+extern int common_block_args_process(int argc, char *argv[],
+ blk64_t *block, blk64_t *count);
+extern int debugfs_read_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd);
+extern int debugfs_read_inode2(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd, int bufsize, int flags);
+extern int debugfs_write_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd);
+extern int debugfs_write_inode2(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd, int bufsize, int flags);
+extern int debugfs_write_new_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd);
+extern int ext2_file_type(unsigned int mode);
+
+/* ss command functions */
+
+/* dump.c */
+extern void do_dump(int argc, char **argv, int sci_idx, void *infop);
+extern void do_cat(int argc, char **argv, int sci_idx, void *infop);
+extern void do_rdump(int argc, char **argv, int sci_idx, void *infop);
+
+/* extent_inode.c */
+extern void do_extent_open(int argc, char **argv, int sci_idx, void *infop);
+extern void do_extent_close(int argc, char **argv, int sci_idx, void *infop);
+extern void do_current_node(int argc, char **argv, int sci_idx, void *infop);
+extern void do_root_node(int argc, char **argv, int sci_idx, void *infop);
+extern void do_last_leaf(int argc, char **argv, int sci_idx, void *infop);
+extern void do_first_sib(int argc, char **argv, int sci_idx, void *infop);
+extern void do_last_sib(int argc, char **argv, int sci_idx, void *infop);
+extern void do_next_sib(int argc, char **argv, int sci_idx, void *infop);
+extern void do_prev_sib(int argc, char **argv, int sci_idx, void *infop);
+extern void do_next_leaf(int argc, char **argv, int sci_idx, void *infop);
+extern void do_prev_leaf(int argc, char **argv, int sci_idx, void *infop);
+extern void do_next(int argc, char **argv, int sci_idx, void *infop);
+extern void do_prev(int argc, char **argv, int sci_idx, void *infop);
+extern void do_up(int argc, char **argv, int sci_idx, void *infop);
+extern void do_down(int argc, char **argv, int sci_idx, void *infop);
+extern void do_delete_node(int argc, char **argv, int sci_idx, void *infop);
+extern void do_replace_node(int argc, char **argv, int sci_idx, void *infop);
+extern void do_split_node(int argc, char **argv, int sci_idx, void *infop);
+extern void do_insert_node(int argc, char **argv, int sci_idx, void *infop);
+extern void do_set_bmap(int argc, char **argv, int sci_idx, void *infop);
+extern void do_print_all(int argc, char **argv, int sci_idx, void *infop);
+extern void do_fix_parents(int argc, char **argv, int sci_idx, void *infop);
+extern void do_info(int argc, char **argv, int sci_idx, void *infop);
+extern void do_goto_block(int argc, char **argv, int sci_idx, void *infop);
+
+/* htree.c */
+extern void do_htree_dump(int argc, char **argv, int sci_idx, void *infop);
+extern void do_dx_hash(int argc, char **argv, int sci_idx, void *infop);
+extern void do_dirsearch(int argc, char **argv, int sci_idx, void *infop);
+
+/* logdump.c */
+extern void do_logdump(int argc, char **argv, int sci_idx, void *infop);
+
+/* lsdel.c */
+extern void do_lsdel(int argc, char **argv, int sci_idx, void *infop);
+
+/* icheck.c */
+extern void do_icheck(int argc, char **argv, int sci_idx, void *infop);
+
+/* ncheck.c */
+extern void do_ncheck(int argc, char **argv, int sci_idx, void *infop);
+
+/* set_fields.c */
+extern void do_set_super(int argc, char **, int sci_idx, void *infop);
+extern void do_set_inode(int argc, char **, int sci_idx, void *infop);
+extern void do_set_block_group_descriptor(int argc, char **, int sci_idx, void *infop);
+
+/* unused.c */
+extern void do_dump_unused(int argc, char **argv, int sci_idx, void *infop);
+
+/* debugfs.c */
+extern ss_request_table *extra_cmds;
+extern const char *debug_prog_name;
+extern void internal_dump_inode(FILE *, const char *, ext2_ino_t,
+ struct ext2_inode *, int);
+
+extern void do_dirty_filesys(int argc, char **argv, int sci_idx, void *infop);
+extern void do_open_filesys(int argc, char **argv, int sci_idx, void *infop);
+extern void do_close_filesys(int argc, char **argv, int sci_idx, void *infop);
+extern void do_lcd(int argc, char **argv, int sci_idx, void *infop);
+extern void do_init_filesys(int argc, char **argv, int sci_idx, void *infop);
+extern void do_show_super_stats(int argc, char **argv, int sci_idx, void *infop);
+extern void do_kill_file(int argc, char **argv, int sci_idx, void *infop);
+extern void do_rm(int argc, char **argv, int sci_idx, void *infop);
+extern void do_link(int argc, char **argv, int sci_idx, void *infop);
+extern void do_undel(int argc, char **argv, int sci_idx, void *infop);
+extern void do_unlink(int argc, char **argv, int sci_idx, void *infop);
+extern void do_copy_inode(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_find_free_block(int argc, char **argv, int sci_idx, void *infop);
+extern void do_find_free_inode(int argc, char **argv, int sci_idx, void *infop);
+extern void do_stat(int argc, char **argv, int sci_idx, void *infop);
+extern void do_dump_extents(int argc, char **argv, int sci_idx, void *infop);
+extern void do_blocks(int argc, char *argv[], int sci_idx, void *infop);
+
+extern void do_chroot(int argc, char **argv, int sci_idx, void *infop);
+extern void do_clri(int argc, char **argv, int sci_idx, void *infop);
+extern void do_freei(int argc, char **argv, int sci_idx, void *infop);
+extern void do_seti(int argc, char **argv, int sci_idx, void *infop);
+extern void do_testi(int argc, char **argv, int sci_idx, void *infop);
+extern void do_freeb(int argc, char **argv, int sci_idx, void *infop);
+extern void do_setb(int argc, char **argv, int sci_idx, void *infop);
+extern void do_testb(int argc, char **argv, int sci_idx, void *infop);
+extern void do_modify_inode(int argc, char **argv, int sci_idx, void *infop);
+extern void do_list_dir(int argc, char **argv, int sci_idx, void *infop);
+extern void do_change_working_dir(int argc, char **argv, int sci_idx, void *infop);
+extern void do_print_working_directory(int argc, char **argv, int sci_idx, void *infop);
+extern void do_write(int argc, char **argv, int sci_idx, void *infop);
+extern void do_mknod(int argc, char **argv, int sci_idx, void *infop);
+extern void do_mkdir(int argc, char **argv, int sci_idx, void *infop);
+extern void do_rmdir(int argc, char **argv, int sci_idx, void *infop);
+extern void do_show_debugfs_params(int argc, char **argv, int sci_idx, void *infop);
+extern void do_expand_dir(int argc, char **argv, int sci_idx, void *infop);
+extern void do_features(int argc, char **argv, int sci_idx, void *infop);
+extern void do_bmap(int argc, char **argv, int sci_idx, void *infop);
+extern void do_imap(int argc, char **argv, int sci_idx, void *infop);
+extern void do_idump(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_set_current_time(int argc, char **argv, int sci_idx, void *infop);
+extern void do_supported_features(int argc, char **argv, int sci_idx, void *infop);
+extern void do_punch(int argc, char **argv, int sci_idx, void *infop);
+extern void do_fallocate(int argc, char **argv, int sci_idx, void *infop);
+extern void do_symlink(int argc, char **argv, int sci_idx, void *infop);
+
+extern void do_dump_mmp(int argc, char **argv, int sci_idx, void *infop);
+extern void do_set_mmp_value(int argc, char **argv, int sci_idx, void *infop);
+
+extern void do_freefrag(int argc, char **argv, int sci_idx, void *infop);
+extern void do_filefrag(int argc, char *argv[], int sci_idx, void *infop);
+
+/* do_journal.c */
+
+extern void do_journal_write(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_journal_open(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_journal_close(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_journal_run(int argc, char *argv[], int sci_idx, void *infop);
+
+/* quota.c */
+extern void do_list_quota(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_get_quota(int argc, char *argv[], int sci_idx, void *infop);
+
+/* util.c */
+extern __s64 string_to_time(const char *arg);
+extern errcode_t read_list(char *str, blk64_t **list, size_t *len);
+extern void do_byte_hexdump(FILE *fp, unsigned char *buf, size_t bufsize);
+
+/* xattrs.c */
+void dump_inode_attributes(FILE *out, ext2_ino_t ino);
+void do_get_xattr(int argc, char **argv, int sci_idx, void *infop);
+void do_set_xattr(int argc, char **argv, int sci_idx, void *infop);
+void do_rm_xattr(int argc, char **argv, int sci_idx, void *infop);
+void do_list_xattr(int argc, char **argv, int sci_idx, void *infop);
+void raw_inode_xattr_dump(FILE *f, unsigned char *buf, unsigned int len);
+void block_xattr_dump(FILE *f, unsigned char *buf, unsigned int len);
+
+/* zap.c */
+extern void do_zap_block(int argc, char **argv, int sci_idx, void *infop);
+extern void do_block_dump(int argc, char **argv, int sci_idx, void *infop);
diff --git a/debugfs/do_journal.c b/debugfs/do_journal.c
new file mode 100644
index 0000000..38439c6
--- /dev/null
+++ b/debugfs/do_journal.c
@@ -0,0 +1,972 @@
+/*
+ * do_journal.c --- Scribble onto the journal!
+ *
+ * Copyright (C) 2014 Oracle. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+#include <ctype.h>
+#include <unistd.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include "debugfs.h"
+#include "ext2fs/kernel-jbd.h"
+#include "journal.h"
+
+#undef DEBUG
+
+#ifdef DEBUG
+# define dbg_printf(f, a...) do {printf("JFS DEBUG: " f, ## a); \
+ fflush(stdout); \
+} while (0)
+#else
+# define dbg_printf(f, a...)
+#endif
+
+#define JOURNAL_CHECK_TRANS_MAGIC(x) \
+ do { \
+ if ((x)->magic != J_TRANS_MAGIC) \
+ return EXT2_ET_INVALID_ARGUMENT; \
+ } while (0)
+
+#define J_TRANS_MAGIC 0xD15EA5ED
+#define J_TRANS_OPEN 1
+#define J_TRANS_COMMITTED 2
+struct journal_transaction_s {
+ unsigned int magic;
+ ext2_filsys fs;
+ journal_t *journal;
+ blk64_t block;
+ blk64_t start, end;
+ tid_t tid;
+ int flags;
+};
+
+typedef struct journal_transaction_s journal_transaction_t;
+
+static journal_t *current_journal = NULL;
+
+static void journal_dump_trans(journal_transaction_t *trans EXT2FS_ATTR((unused)),
+ const char *tag EXT2FS_ATTR((unused)))
+{
+ dbg_printf("TRANS %p(%s): tid=%u start=%llu block=%llu end=%llu "
+ "flags=0x%x\n", trans, tag, trans->tid, trans->start,
+ trans->block, trans->end, trans->flags);
+}
+
+static errcode_t journal_commit_trans(journal_transaction_t *trans)
+{
+ struct buffer_head *bh, *cbh = NULL;
+ struct commit_header *commit;
+#ifdef HAVE_SYS_TIME_H
+ struct timeval tv;
+#endif
+ errcode_t err;
+
+ JOURNAL_CHECK_TRANS_MAGIC(trans);
+
+ if ((trans->flags & J_TRANS_COMMITTED) ||
+ !(trans->flags & J_TRANS_OPEN))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ bh = getblk(trans->journal->j_dev, 0, trans->journal->j_blocksize);
+ if (bh == NULL)
+ return ENOMEM;
+
+ /* write the descriptor block header */
+ commit = (struct commit_header *)bh->b_data;
+ commit->h_magic = ext2fs_cpu_to_be32(JBD2_MAGIC_NUMBER);
+ commit->h_blocktype = ext2fs_cpu_to_be32(JBD2_COMMIT_BLOCK);
+ commit->h_sequence = ext2fs_cpu_to_be32(trans->tid);
+ if (jbd2_has_feature_checksum(trans->journal)) {
+ __u32 csum_v1 = ~0;
+ blk64_t cblk;
+
+ cbh = getblk(trans->journal->j_dev, 0,
+ trans->journal->j_blocksize);
+ if (cbh == NULL) {
+ err = ENOMEM;
+ goto error;
+ }
+
+ for (cblk = trans->start; cblk < trans->block; cblk++) {
+ err = jbd2_journal_bmap(trans->journal, cblk,
+ &cbh->b_blocknr);
+ if (err)
+ goto error;
+ mark_buffer_uptodate(cbh, 0);
+ ll_rw_block(REQ_OP_READ, 0, 1, &cbh);
+ err = cbh->b_err;
+ if (err)
+ goto error;
+ csum_v1 = ext2fs_crc32_be(csum_v1,
+ (unsigned char const *)cbh->b_data,
+ cbh->b_size);
+ }
+
+ commit->h_chksum_type = JBD2_CRC32_CHKSUM;
+ commit->h_chksum_size = JBD2_CRC32_CHKSUM_SIZE;
+ commit->h_chksum[0] = ext2fs_cpu_to_be32(csum_v1);
+ } else {
+ commit->h_chksum_type = 0;
+ commit->h_chksum_size = 0;
+ commit->h_chksum[0] = 0;
+ }
+#ifdef HAVE_SYS_TIME_H
+ gettimeofday(&tv, NULL);
+ commit->h_commit_sec = ext2fs_cpu_to_be32(tv.tv_sec);
+ commit->h_commit_nsec = ext2fs_cpu_to_be32(tv.tv_usec * 1000);
+#else
+ commit->h_commit_sec = 0;
+ commit->h_commit_nsec = 0;
+#endif
+
+ /* Write block */
+ jbd2_commit_block_csum_set(trans->journal, bh);
+ err = jbd2_journal_bmap(trans->journal, trans->block, &bh->b_blocknr);
+ if (err)
+ goto error;
+
+ dbg_printf("Writing commit block at %llu:%llu\n", trans->block,
+ bh->b_blocknr);
+ mark_buffer_dirty(bh);
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &bh);
+ err = bh->b_err;
+ if (err)
+ goto error;
+ trans->flags |= J_TRANS_COMMITTED;
+ trans->flags &= ~J_TRANS_OPEN;
+ trans->block++;
+
+ ext2fs_set_feature_journal_needs_recovery(trans->fs->super);
+ ext2fs_mark_super_dirty(trans->fs);
+error:
+ if (cbh)
+ brelse(cbh);
+ brelse(bh);
+ return err;
+}
+
+static errcode_t journal_add_revoke_to_trans(journal_transaction_t *trans,
+ blk64_t *revoke_list,
+ size_t revoke_len)
+{
+ jbd2_journal_revoke_header_t *jrb;
+ void *buf;
+ size_t i, offset;
+ blk64_t curr_blk;
+ unsigned int sz;
+ unsigned csum_size = 0;
+ struct buffer_head *bh;
+ errcode_t err;
+
+ JOURNAL_CHECK_TRANS_MAGIC(trans);
+
+ if ((trans->flags & J_TRANS_COMMITTED) ||
+ !(trans->flags & J_TRANS_OPEN))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (revoke_len == 0)
+ return 0;
+
+ /* Do we need to leave space at the end for a checksum? */
+ if (jbd2_journal_has_csum_v2or3(trans->journal))
+ csum_size = sizeof(struct jbd2_journal_block_tail);
+
+ curr_blk = trans->block;
+
+ bh = getblk(trans->journal->j_dev, curr_blk,
+ trans->journal->j_blocksize);
+ if (bh == NULL)
+ return ENOMEM;
+ jrb = buf = bh->b_data;
+ jrb->r_header.h_magic = ext2fs_cpu_to_be32(JBD2_MAGIC_NUMBER);
+ jrb->r_header.h_blocktype = ext2fs_cpu_to_be32(JBD2_REVOKE_BLOCK);
+ jrb->r_header.h_sequence = ext2fs_cpu_to_be32(trans->tid);
+ offset = sizeof(*jrb);
+
+ if (jbd2_has_feature_64bit(trans->journal))
+ sz = 8;
+ else
+ sz = 4;
+
+ for (i = 0; i < revoke_len; i++) {
+ /* Block full, write to journal */
+ if (offset + sz > trans->journal->j_blocksize - csum_size) {
+ jrb->r_count = ext2fs_cpu_to_be32(offset);
+ jbd2_revoke_csum_set(trans->journal, bh);
+
+ err = jbd2_journal_bmap(trans->journal, curr_blk,
+ &bh->b_blocknr);
+ if (err)
+ goto error;
+ dbg_printf("Writing revoke block at %llu:%llu\n",
+ curr_blk, bh->b_blocknr);
+ mark_buffer_dirty(bh);
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &bh);
+ err = bh->b_err;
+ if (err)
+ goto error;
+
+ offset = sizeof(*jrb);
+ curr_blk++;
+ }
+
+ if (revoke_list[i] >=
+ ext2fs_blocks_count(trans->journal->j_fs_dev->k_fs->super)) {
+ err = EXT2_ET_BAD_BLOCK_NUM;
+ goto error;
+ }
+
+ if (jbd2_has_feature_64bit(trans->journal))
+ *((__u64 *)(&((char *)buf)[offset])) =
+ ext2fs_cpu_to_be64(revoke_list[i]);
+ else
+ *((__u32 *)(&((char *)buf)[offset])) =
+ ext2fs_cpu_to_be32(revoke_list[i]);
+ offset += sz;
+ }
+
+ if (offset > 0) {
+ jrb->r_count = ext2fs_cpu_to_be32(offset);
+ jbd2_revoke_csum_set(trans->journal, bh);
+
+ err = jbd2_journal_bmap(trans->journal, curr_blk,
+ &bh->b_blocknr);
+ if (err)
+ goto error;
+ dbg_printf("Writing revoke block at %llu:%llu\n",
+ curr_blk, bh->b_blocknr);
+ mark_buffer_dirty(bh);
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &bh);
+ err = bh->b_err;
+ if (err)
+ goto error;
+ curr_blk++;
+ }
+
+error:
+ trans->block = curr_blk;
+ brelse(bh);
+ return err;
+}
+
+static errcode_t journal_add_blocks_to_trans(journal_transaction_t *trans,
+ blk64_t *block_list, size_t block_len,
+ FILE *fp)
+{
+ blk64_t curr_blk, jdb_blk;
+ size_t i, j;
+ int csum_size = 0;
+ journal_header_t *jdb;
+ journal_block_tag_t *jdbt;
+ int tag_bytes;
+ void *buf = NULL, *jdb_buf = NULL;
+ struct buffer_head *bh = NULL, *data_bh;
+ errcode_t err;
+
+ JOURNAL_CHECK_TRANS_MAGIC(trans);
+
+ if ((trans->flags & J_TRANS_COMMITTED) ||
+ !(trans->flags & J_TRANS_OPEN))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (block_len == 0)
+ return 0;
+
+ /* Do we need to leave space at the end for a checksum? */
+ if (jbd2_journal_has_csum_v2or3(trans->journal))
+ csum_size = sizeof(struct jbd2_journal_block_tail);
+
+ curr_blk = jdb_blk = trans->block;
+
+ data_bh = getblk(trans->journal->j_dev, curr_blk,
+ trans->journal->j_blocksize);
+ if (data_bh == NULL)
+ return ENOMEM;
+ buf = data_bh->b_data;
+
+ /* write the descriptor block header */
+ bh = getblk(trans->journal->j_dev, curr_blk,
+ trans->journal->j_blocksize);
+ if (bh == NULL) {
+ err = ENOMEM;
+ goto error;
+ }
+ jdb = jdb_buf = bh->b_data;
+ jdb->h_magic = ext2fs_cpu_to_be32(JBD2_MAGIC_NUMBER);
+ jdb->h_blocktype = ext2fs_cpu_to_be32(JBD2_DESCRIPTOR_BLOCK);
+ jdb->h_sequence = ext2fs_cpu_to_be32(trans->tid);
+ jdbt = (journal_block_tag_t *)(jdb + 1);
+
+ curr_blk++;
+ for (i = 0; i < block_len; i++) {
+ j = fread(data_bh->b_data, trans->journal->j_blocksize, 1, fp);
+ if (j != 1) {
+ err = errno;
+ goto error;
+ }
+
+ tag_bytes = journal_tag_bytes(trans->journal);
+
+ /* No space left in descriptor block, write it out */
+ if ((char *)jdbt + tag_bytes >
+ (char *)jdb_buf + trans->journal->j_blocksize - csum_size) {
+ jbd2_descr_block_csum_set(trans->journal, bh);
+ err = jbd2_journal_bmap(trans->journal, jdb_blk,
+ &bh->b_blocknr);
+ if (err)
+ goto error;
+ dbg_printf("Writing descriptor block at %llu:%llu\n",
+ jdb_blk, bh->b_blocknr);
+ mark_buffer_dirty(bh);
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &bh);
+ err = bh->b_err;
+ if (err)
+ goto error;
+
+ jdbt = (journal_block_tag_t *)(jdb + 1);
+ jdb_blk = curr_blk;
+ curr_blk++;
+ }
+
+ if (block_list[i] >=
+ ext2fs_blocks_count(trans->journal->j_fs_dev->k_fs->super)) {
+ err = EXT2_ET_BAD_BLOCK_NUM;
+ goto error;
+ }
+
+ /* Fill out the block tag */
+ jdbt->t_blocknr = ext2fs_cpu_to_be32(block_list[i] & 0xFFFFFFFF);
+ jdbt->t_flags = 0;
+ if (jdbt != (journal_block_tag_t *)(jdb + 1))
+ jdbt->t_flags |= ext2fs_cpu_to_be16(JBD2_FLAG_SAME_UUID);
+ else {
+ memcpy(jdbt + tag_bytes,
+ trans->journal->j_superblock->s_uuid,
+ sizeof(trans->journal->j_superblock->s_uuid));
+ tag_bytes += 16;
+ }
+ if (i == block_len - 1)
+ jdbt->t_flags |= ext2fs_cpu_to_be16(JBD2_FLAG_LAST_TAG);
+ if (*((__u32 *)buf) == ext2fs_cpu_to_be32(JBD2_MAGIC_NUMBER)) {
+ *((__u32 *)buf) = 0;
+ jdbt->t_flags |= ext2fs_cpu_to_be16(JBD2_FLAG_ESCAPE);
+ }
+ if (jbd2_has_feature_64bit(trans->journal))
+ jdbt->t_blocknr_high = ext2fs_cpu_to_be32(block_list[i] >> 32);
+ jbd2_block_tag_csum_set(trans->journal, jdbt, data_bh,
+ trans->tid);
+
+ /* Write the data block */
+ err = jbd2_journal_bmap(trans->journal, curr_blk,
+ &data_bh->b_blocknr);
+ if (err)
+ goto error;
+ dbg_printf("Writing data block %llu at %llu:%llu tag %d\n",
+ block_list[i], curr_blk, data_bh->b_blocknr,
+ tag_bytes);
+ mark_buffer_dirty(data_bh);
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &data_bh);
+ err = data_bh->b_err;
+ if (err)
+ goto error;
+
+ curr_blk++;
+ jdbt = (journal_block_tag_t *)(((char *)jdbt) + tag_bytes);
+ }
+
+ /* Write out the last descriptor block */
+ if (jdbt != (journal_block_tag_t *)(jdb + 1)) {
+ jbd2_descr_block_csum_set(trans->journal, bh);
+ err = jbd2_journal_bmap(trans->journal, jdb_blk,
+ &bh->b_blocknr);
+ if (err)
+ goto error;
+ dbg_printf("Writing descriptor block at %llu:%llu\n",
+ jdb_blk, bh->b_blocknr);
+ mark_buffer_dirty(bh);
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &bh);
+ err = bh->b_err;
+ if (err)
+ goto error;
+ }
+
+error:
+ trans->block = curr_blk;
+ if (bh)
+ brelse(bh);
+ brelse(data_bh);
+ return err;
+}
+
+static blk64_t journal_guess_blocks(journal_t *journal, blk64_t data_blocks,
+ blk64_t revoke_blocks)
+{
+ blk64_t ret = 1;
+ unsigned int bs, sz;
+
+ /* Estimate # of revoke blocks */
+ bs = journal->j_blocksize;
+ if (jbd2_journal_has_csum_v2or3(journal))
+ bs -= sizeof(struct jbd2_journal_block_tail);
+ sz = jbd2_has_feature_64bit(journal) ? sizeof(__u64) : sizeof(__u32);
+ ret += revoke_blocks * sz / bs;
+
+ /* Estimate # of data blocks */
+ bs = journal->j_blocksize - 16;
+ if (jbd2_journal_has_csum_v2or3(journal))
+ bs -= sizeof(struct jbd2_journal_block_tail);
+ sz = journal_tag_bytes(journal);
+ ret += data_blocks * sz / bs;
+
+ ret += data_blocks;
+
+ return ret;
+}
+
+static errcode_t journal_open_trans(journal_t *journal,
+ journal_transaction_t *trans,
+ blk64_t blocks)
+{
+ trans->fs = journal->j_fs_dev->k_fs;
+ trans->journal = journal;
+ trans->flags = J_TRANS_OPEN;
+
+ if (journal->j_tail == 0) {
+ /* Clean journal, start at the tail */
+ trans->tid = journal->j_tail_sequence;
+ trans->start = journal->j_first;
+ } else {
+ /* Put new transaction at the head of the list */
+ trans->tid = journal->j_transaction_sequence;
+ trans->start = journal->j_head;
+ }
+
+ trans->block = trans->start;
+ if (trans->start + blocks > journal->j_last)
+ return ENOSPC;
+ trans->end = trans->block + blocks;
+ journal_dump_trans(trans, "new transaction");
+
+ trans->magic = J_TRANS_MAGIC;
+ return 0;
+}
+
+static errcode_t journal_close_trans(journal_transaction_t *trans)
+{
+ journal_t *journal;
+
+ JOURNAL_CHECK_TRANS_MAGIC(trans);
+
+ if (!(trans->flags & J_TRANS_COMMITTED))
+ return 0;
+
+ journal = trans->journal;
+ if (journal->j_tail == 0) {
+ /* Update the tail */
+ journal->j_tail_sequence = trans->tid;
+ journal->j_tail = trans->start;
+ journal->j_superblock->s_start = ext2fs_cpu_to_be32(trans->start);
+ }
+
+ /* Update the head */
+ journal->j_head = trans->end + 1;
+ journal->j_transaction_sequence = trans->tid + 1;
+
+ trans->magic = 0;
+
+ /* Mark ourselves as needing recovery */
+ if (!ext2fs_has_feature_journal_needs_recovery(trans->fs->super)) {
+ ext2fs_set_feature_journal_needs_recovery(trans->fs->super);
+ ext2fs_mark_super_dirty(trans->fs);
+ }
+
+ return 0;
+}
+
+#define JOURNAL_WRITE_NO_COMMIT 1
+static errcode_t journal_write(journal_t *journal,
+ int flags, blk64_t *block_list,
+ size_t block_len, blk64_t *revoke_list,
+ size_t revoke_len, FILE *fp)
+{
+ blk64_t blocks;
+ journal_transaction_t trans;
+ errcode_t err;
+
+ if (revoke_len > 0) {
+ jbd2_set_feature_revoke(journal);
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+
+ blocks = journal_guess_blocks(journal, block_len, revoke_len);
+ err = journal_open_trans(journal, &trans, blocks);
+ if (err)
+ goto error;
+
+ err = journal_add_blocks_to_trans(&trans, block_list, block_len, fp);
+ if (err)
+ goto error;
+
+ err = journal_add_revoke_to_trans(&trans, revoke_list, revoke_len);
+ if (err)
+ goto error;
+
+ if (!(flags & JOURNAL_WRITE_NO_COMMIT)) {
+ err = journal_commit_trans(&trans);
+ if (err)
+ goto error;
+ }
+
+ err = journal_close_trans(&trans);
+error:
+ return err;
+}
+
+void do_journal_write(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ blk64_t *blist = NULL, *rlist = NULL;
+ size_t bn = 0, rn = 0;
+ FILE *fp = NULL;
+ int opt;
+ int flags = 0;
+ errcode_t err;
+
+ if (current_journal == NULL) {
+ printf("Journal not open.\n");
+ return;
+ }
+
+ reset_getopt();
+ while ((opt = getopt(argc, argv, "b:r:c")) != -1) {
+ switch (opt) {
+ case 'b':
+ err = read_list(optarg, &blist, &bn);
+ if (err) {
+ com_err(argv[0], err,
+ "while reading block list");
+ goto out;
+ }
+ break;
+ case 'r':
+ err = read_list(optarg, &rlist, &rn);
+ if (err) {
+ com_err(argv[0], err,
+ "while reading revoke list");
+ goto out;
+ }
+ break;
+ case 'c':
+ flags |= JOURNAL_WRITE_NO_COMMIT;
+ break;
+ default:
+ printf("%s [-b blocks] [-r revoke] [-c] file\n",
+ argv[0]);
+ printf("-b: Write these blocks into transaction.\n");
+ printf("-c: Do not commit transaction.\n");
+ printf("-r: Revoke these blocks from transaction.\n");
+
+ goto out;
+ }
+ }
+
+ if (bn > 0 && optind != argc - 1) {
+ printf("Need a file to read blocks from.\n");
+ return;
+ }
+
+ if (bn > 0) {
+ fp = fopen(argv[optind], "r");
+ if (fp == NULL) {
+ com_err(argv[0], errno,
+ "while opening journal data file");
+ goto out;
+ }
+ }
+
+ err = journal_write(current_journal, flags, blist, bn,
+ rlist, rn, fp);
+ if (err)
+ com_err("journal_write", err, "while writing journal");
+
+ if (fp)
+ fclose(fp);
+out:
+ if (blist)
+ free(blist);
+ if (rlist)
+ free(rlist);
+}
+
+/* Make sure we wrap around the log correctly! */
+#define wrap(journal, var) \
+do { \
+ if (var >= (journal)->j_last) \
+ var -= ((journal)->j_last - (journal)->j_first); \
+} while (0)
+
+/*
+ * Count the number of in-use tags in a journal descriptor block.
+ */
+
+static int count_tags(journal_t *journal, char *buf)
+{
+ char *tagp;
+ journal_block_tag_t *tag;
+ int nr = 0, size = journal->j_blocksize;
+ int tag_bytes = journal_tag_bytes(journal);
+
+ if (jbd2_journal_has_csum_v2or3(journal))
+ size -= sizeof(struct jbd2_journal_block_tail);
+
+ tagp = buf + sizeof(journal_header_t);
+
+ while ((tagp - buf + tag_bytes) <= size) {
+ tag = (journal_block_tag_t *) tagp;
+
+ nr++;
+ tagp += tag_bytes;
+ if (!(tag->t_flags & ext2fs_cpu_to_be16(JBD2_FLAG_SAME_UUID)))
+ tagp += 16;
+
+ if (tag->t_flags & ext2fs_cpu_to_be16(JBD2_FLAG_LAST_TAG))
+ break;
+ }
+
+ return nr;
+}
+
+static errcode_t journal_find_head(journal_t *journal)
+{
+ unsigned int next_commit_ID;
+ blk64_t next_log_block, head_block;
+ int err;
+ journal_superblock_t *sb;
+ journal_header_t *tmp;
+ struct buffer_head *bh;
+ unsigned int sequence;
+ int blocktype;
+
+ /*
+ * First thing is to establish what we expect to find in the log
+ * (in terms of transaction IDs), and where (in terms of log
+ * block offsets): query the superblock.
+ */
+
+ sb = journal->j_superblock;
+ next_commit_ID = ext2fs_be32_to_cpu(sb->s_sequence);
+ next_log_block = ext2fs_be32_to_cpu(sb->s_start);
+ head_block = next_log_block;
+
+ if (next_log_block == 0)
+ return 0;
+
+ bh = getblk(journal->j_dev, 0, journal->j_blocksize);
+ if (bh == NULL)
+ return ENOMEM;
+
+ /*
+ * Now we walk through the log, transaction by transaction,
+ * making sure that each transaction has a commit block in the
+ * expected place. Each complete transaction gets replayed back
+ * into the main filesystem.
+ */
+ while (1) {
+ dbg_printf("Scanning for sequence ID %u at %lu/%lu\n",
+ next_commit_ID, (unsigned long)next_log_block,
+ journal->j_last);
+
+ /* Skip over each chunk of the transaction looking
+ * either the next descriptor block or the final commit
+ * record. */
+ err = jbd2_journal_bmap(journal, next_log_block,
+ &bh->b_blocknr);
+ if (err)
+ goto err;
+ mark_buffer_uptodate(bh, 0);
+ ll_rw_block(REQ_OP_READ, 0, 1, &bh);
+ err = bh->b_err;
+ if (err)
+ goto err;
+
+ next_log_block++;
+ wrap(journal, next_log_block);
+
+ /* What kind of buffer is it?
+ *
+ * If it is a descriptor block, check that it has the
+ * expected sequence number. Otherwise, we're all done
+ * here. */
+
+ tmp = (journal_header_t *)bh->b_data;
+
+ if (tmp->h_magic != ext2fs_cpu_to_be32(JBD2_MAGIC_NUMBER)) {
+ dbg_printf("JBD2: wrong magic 0x%x\n", tmp->h_magic);
+ goto err;
+ }
+
+ blocktype = ext2fs_be32_to_cpu(tmp->h_blocktype);
+ sequence = ext2fs_be32_to_cpu(tmp->h_sequence);
+ dbg_printf("Found magic %d, sequence %d\n",
+ blocktype, sequence);
+
+ if (sequence != next_commit_ID) {
+ dbg_printf("JBD2: Wrong sequence %d (wanted %d)\n",
+ sequence, next_commit_ID);
+ goto err;
+ }
+
+ /* OK, we have a valid descriptor block which matches
+ * all of the sequence number checks. What are we going
+ * to do with it? That depends on the pass... */
+
+ switch (blocktype) {
+ case JBD2_DESCRIPTOR_BLOCK:
+ next_log_block += count_tags(journal, bh->b_data);
+ wrap(journal, next_log_block);
+ continue;
+
+ case JBD2_COMMIT_BLOCK:
+ head_block = next_log_block;
+ next_commit_ID++;
+ continue;
+
+ case JBD2_REVOKE_BLOCK:
+ continue;
+
+ default:
+ dbg_printf("Unrecognised magic %d, end of scan.\n",
+ blocktype);
+ err = -EINVAL;
+ goto err;
+ }
+ }
+
+err:
+ if (err == 0) {
+ dbg_printf("head seq=%d blk=%llu\n", next_commit_ID,
+ head_block);
+ journal->j_transaction_sequence = next_commit_ID;
+ journal->j_head = head_block;
+ }
+ brelse(bh);
+ return err;
+}
+
+static void update_journal_csum(journal_t *journal, int ver)
+{
+ journal_superblock_t *jsb;
+
+ if (journal->j_format_version < 2)
+ return;
+
+ if (journal->j_tail != 0 ||
+ ext2fs_has_feature_journal_needs_recovery(
+ journal->j_fs_dev->k_fs->super)) {
+ printf("Journal needs recovery, will not add csums.\n");
+ return;
+ }
+
+ /* metadata_csum implies journal csum v3 */
+ jsb = journal->j_superblock;
+ if (ext2fs_has_feature_metadata_csum(journal->j_fs_dev->k_fs->super)) {
+ printf("Setting csum v%d\n", ver);
+ switch (ver) {
+ case 2:
+ jbd2_clear_feature_csum3(journal);
+ jbd2_set_feature_csum2(journal);
+ jbd2_clear_feature_checksum(journal);
+ break;
+ case 3:
+ jbd2_set_feature_csum3(journal);
+ jbd2_clear_feature_csum2(journal);
+ jbd2_clear_feature_checksum(journal);
+ break;
+ default:
+ printf("Unknown checksum v%d\n", ver);
+ break;
+ }
+ journal->j_superblock->s_checksum_type = JBD2_CRC32C_CHKSUM;
+ journal->j_csum_seed = jbd2_chksum(journal, ~0, jsb->s_uuid,
+ sizeof(jsb->s_uuid));
+ } else {
+ jbd2_clear_feature_csum3(journal);
+ jbd2_clear_feature_csum2(journal);
+ jbd2_set_feature_checksum(journal);
+ }
+}
+
+static void update_uuid(journal_t *journal)
+{
+ size_t z;
+ ext2_filsys fs;
+
+ if (journal->j_format_version < 2)
+ return;
+
+ for (z = 0; z < sizeof(journal->j_superblock->s_uuid); z++)
+ if (journal->j_superblock->s_uuid[z])
+ break;
+ if (z == 0)
+ return;
+
+ fs = journal->j_fs_dev->k_fs;
+ if (!ext2fs_has_feature_64bit(fs->super))
+ return;
+
+ if (jbd2_has_feature_64bit(journal) &&
+ ext2fs_has_feature_64bit(fs->super))
+ return;
+
+ if (journal->j_tail != 0 ||
+ ext2fs_has_feature_journal_needs_recovery(fs->super)) {
+ printf("Journal needs recovery, will not set 64bit.\n");
+ return;
+ }
+
+ memcpy(journal->j_superblock->s_uuid, fs->super->s_uuid,
+ sizeof(fs->super->s_uuid));
+}
+
+static void update_64bit_flag(journal_t *journal)
+{
+ if (journal->j_format_version < 2)
+ return;
+
+ if (!ext2fs_has_feature_64bit(journal->j_fs_dev->k_fs->super))
+ return;
+
+ if (jbd2_has_feature_64bit(journal) &&
+ ext2fs_has_feature_64bit(journal->j_fs_dev->k_fs->super))
+ return;
+
+ if (journal->j_tail != 0 ||
+ ext2fs_has_feature_journal_needs_recovery(
+ journal->j_fs_dev->k_fs->super)) {
+ printf("Journal needs recovery, will not set 64bit.\n");
+ return;
+ }
+
+ jbd2_set_feature_64bit(journal);
+}
+
+void do_journal_open(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int opt, enable_csum = 0, csum_ver = 3;
+ journal_t *journal;
+ errcode_t err;
+
+ if (check_fs_open(argv[0]))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+ if (check_fs_bitmaps(argv[0]))
+ return;
+ if (current_journal) {
+ printf("Journal is already open.\n");
+ return;
+ }
+ if (!ext2fs_has_feature_journal(current_fs->super)) {
+ printf("Journalling is not enabled on this filesystem.\n");
+ return;
+ }
+
+ reset_getopt();
+ while ((opt = getopt(argc, argv, "cv:f:")) != -1) {
+ switch (opt) {
+ case 'c':
+ enable_csum = 1;
+ break;
+ case 'f':
+ if (current_fs->journal_name)
+ free(current_fs->journal_name);
+ current_fs->journal_name = strdup(optarg);
+ break;
+ case 'v':
+ csum_ver = atoi(optarg);
+ if (csum_ver != 2 && csum_ver != 3) {
+ printf("Unknown journal csum v%d\n", csum_ver);
+ csum_ver = 3;
+ }
+ break;
+ default:
+ printf("%s: [-c] [-v ver] [-f ext_jnl]\n", argv[0]);
+ printf("-c: Enable journal checksumming.\n");
+ printf("-v: Use this version checksum format.\n");
+ printf("-f: Load this external journal.\n");
+ }
+ }
+
+ err = ext2fs_open_journal(current_fs, &current_journal);
+ if (err) {
+ com_err(argv[0], err, "while opening journal");
+ return;
+ }
+ journal = current_journal;
+
+ dbg_printf("JOURNAL: seq=%u tailseq=%u start=%lu first=%lu "
+ "maxlen=%lu\n", journal->j_tail_sequence,
+ journal->j_transaction_sequence, journal->j_tail,
+ journal->j_first, journal->j_last);
+
+ update_uuid(journal);
+ update_64bit_flag(journal);
+ if (enable_csum)
+ update_journal_csum(journal, csum_ver);
+
+ err = journal_find_head(journal);
+ if (err)
+ com_err(argv[0], err, "while examining journal");
+}
+
+void do_journal_close(int argc EXT2FS_ATTR((unused)),
+ char *argv[] EXT2FS_ATTR((unused)),
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (current_journal == NULL) {
+ printf("Journal not open.\n");
+ return;
+ }
+
+ ext2fs_close_journal(current_fs, &current_journal);
+}
+
+void do_journal_run(int argc EXT2FS_ATTR((unused)), char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t err;
+
+ if (check_fs_open(argv[0]))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+ if (check_fs_bitmaps(argv[0]))
+ return;
+ if (current_journal) {
+ printf("Please close the journal before recovering it.\n");
+ return;
+ }
+
+ err = ext2fs_run_ext3_journal(&current_fs);
+ if (err)
+ com_err("journal_run", err, "while recovering journal");
+ else {
+ ext2fs_clear_feature_journal_needs_recovery(current_fs->super);
+ ext2fs_mark_super_dirty(current_fs);
+ }
+}
diff --git a/debugfs/dump.c b/debugfs/dump.c
new file mode 100644
index 0000000..42f5204
--- /dev/null
+++ b/debugfs/dump.c
@@ -0,0 +1,385 @@
+/*
+ * dump.c --- dump the contents of an inode out to a file
+ *
+ * Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* for O_LARGEFILE */
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <utime.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+/*
+ * The mode_xlate function translates a linux mode into a native-OS mode_t.
+ */
+static struct {
+ __u16 lmask;
+ mode_t mask;
+} mode_table[] = {
+ { LINUX_S_IRUSR, S_IRUSR },
+ { LINUX_S_IWUSR, S_IWUSR },
+ { LINUX_S_IXUSR, S_IXUSR },
+ { LINUX_S_IRGRP, S_IRGRP },
+ { LINUX_S_IWGRP, S_IWGRP },
+ { LINUX_S_IXGRP, S_IXGRP },
+ { LINUX_S_IROTH, S_IROTH },
+ { LINUX_S_IWOTH, S_IWOTH },
+ { LINUX_S_IXOTH, S_IXOTH },
+ { 0, 0 }
+};
+
+static mode_t mode_xlate(__u16 lmode)
+{
+ mode_t mode = 0;
+ int i;
+
+ for (i=0; mode_table[i].lmask; i++) {
+ if (lmode & mode_table[i].lmask)
+ mode |= mode_table[i].mask;
+ }
+ return mode;
+}
+
+static void fix_perms(const char *cmd, const struct ext2_inode *inode,
+ int fd, const char *name)
+{
+ struct utimbuf ut;
+ int i;
+
+ if (fd != -1)
+ i = fchmod(fd, mode_xlate(inode->i_mode));
+ else
+ i = chmod(name, mode_xlate(inode->i_mode));
+ if (i == -1)
+ com_err(cmd, errno, "while setting permissions of %s", name);
+
+#ifndef HAVE_FCHOWN
+ i = chown(name, inode_uid(*inode), inode_gid(*inode));
+#else
+ if (fd != -1)
+ i = fchown(fd, inode_uid(*inode), inode_gid(*inode));
+ else
+ i = chown(name, inode_uid(*inode), inode_gid(*inode));
+#endif
+ if (i == -1)
+ com_err(cmd, errno, "while changing ownership of %s", name);
+
+ ut.actime = inode->i_atime;
+ ut.modtime = inode->i_mtime;
+ if (utime(name, &ut) == -1)
+ com_err(cmd, errno, "while setting times of %s", name);
+}
+
+static void dump_file(const char *cmdname, ext2_ino_t ino, int fd,
+ int preserve, char *outname)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+ char *buf = 0;
+ ext2_file_t e2_file;
+ int nbytes;
+ unsigned int got, blocksize = current_fs->blocksize;
+
+ if (debugfs_read_inode(ino, &inode, cmdname))
+ return;
+
+ retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
+ if (retval) {
+ com_err(cmdname, retval, "while opening ext2 file");
+ return;
+ }
+ retval = ext2fs_get_mem(blocksize, &buf);
+ if (retval) {
+ com_err(cmdname, retval, "while allocating memory");
+ return;
+ }
+ while (1) {
+ retval = ext2fs_file_read(e2_file, buf, blocksize, &got);
+ if (retval)
+ com_err(cmdname, retval, "while reading ext2 file");
+ if (got == 0)
+ break;
+ nbytes = write(fd, buf, got);
+ if ((unsigned) nbytes != got)
+ com_err(cmdname, errno, "while writing file");
+ }
+ if (buf)
+ ext2fs_free_mem(&buf);
+ retval = ext2fs_file_close(e2_file);
+ if (retval) {
+ com_err(cmdname, retval, "while closing ext2 file");
+ return;
+ }
+
+ if (preserve)
+ fix_perms("dump_file", &inode, fd, outname);
+
+ return;
+}
+
+void do_dump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ int fd;
+ int c;
+ int preserve = 0;
+ char *in_fn, *out_fn;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "p")) != EOF) {
+ switch (c) {
+ case 'p':
+ preserve++;
+ break;
+ default:
+ print_usage:
+ com_err(argv[0], 0, "Usage: dump_inode [-p] "
+ "<file> <output_file>");
+ return;
+ }
+ }
+ if (optind != argc-2)
+ goto print_usage;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ in_fn = argv[optind];
+ out_fn = argv[optind+1];
+
+ inode = string_to_inode(in_fn);
+ if (!inode)
+ return;
+
+ fd = open(out_fn, O_CREAT | O_WRONLY | O_TRUNC | O_LARGEFILE, 0666);
+ if (fd < 0) {
+ com_err(argv[0], errno, "while opening %s for dump_inode",
+ out_fn);
+ return;
+ }
+
+ dump_file(argv[0], inode, fd, preserve, out_fn);
+ if (close(fd) != 0) {
+ com_err(argv[0], errno, "while closing %s for dump_inode",
+ out_fn);
+ return;
+ }
+
+ return;
+}
+
+static void rdump_symlink(ext2_ino_t ino, struct ext2_inode *inode,
+ const char *fullname)
+{
+ ext2_file_t e2_file;
+ char *buf;
+ errcode_t retval;
+
+ buf = malloc(inode->i_size + 1);
+ if (!buf) {
+ com_err("rdump", errno, "while allocating for symlink");
+ goto errout;
+ }
+
+ if (ext2fs_is_fast_symlink(inode))
+ strcpy(buf, (char *) inode->i_block);
+ else {
+ unsigned bytes = inode->i_size;
+ char *p = buf;
+ retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
+ if (retval) {
+ com_err("rdump", retval, "while opening symlink");
+ goto errout;
+ }
+ for (;;) {
+ unsigned int got;
+ retval = ext2fs_file_read(e2_file, p, bytes, &got);
+ if (retval) {
+ com_err("rdump", retval, "while reading symlink");
+ goto errout;
+ }
+ bytes -= got;
+ p += got;
+ if (got == 0 || bytes == 0)
+ break;
+ }
+ buf[inode->i_size] = 0;
+ retval = ext2fs_file_close(e2_file);
+ if (retval)
+ com_err("rdump", retval, "while closing symlink");
+ }
+
+ if (symlink(buf, fullname) == -1) {
+ com_err("rdump", errno, "while creating symlink %s -> %s", buf, fullname);
+ goto errout;
+ }
+
+errout:
+ free(buf);
+}
+
+static int rdump_dirent(struct ext2_dir_entry *, int, int, char *, void *);
+
+static void rdump_inode(ext2_ino_t ino, struct ext2_inode *inode,
+ const char *name, const char *dumproot)
+{
+ char *fullname;
+
+ /* There are more efficient ways to do this, but this method
+ * requires only minimal debugging. */
+ fullname = malloc(strlen(dumproot) + strlen(name) + 2);
+ if (!fullname) {
+ com_err("rdump", errno, "while allocating memory");
+ return;
+ }
+ sprintf(fullname, "%s/%s", dumproot, name);
+
+ if (LINUX_S_ISLNK(inode->i_mode))
+ rdump_symlink(ino, inode, fullname);
+ else if (LINUX_S_ISREG(inode->i_mode)) {
+ int fd;
+ fd = open(fullname, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, S_IRWXU);
+ if (fd == -1) {
+ com_err("rdump", errno, "while opening %s", fullname);
+ goto errout;
+ }
+ dump_file("rdump", ino, fd, 1, fullname);
+ if (close(fd) != 0) {
+ com_err("rdump", errno, "while closing %s", fullname);
+ goto errout;
+ }
+ }
+ else if (LINUX_S_ISDIR(inode->i_mode) && strcmp(name, ".") && strcmp(name, "..")) {
+ errcode_t retval;
+
+ /* Create the directory with 0700 permissions, because we
+ * expect to have to create entries it. Then fix its perms
+ * once we've done the traversal. */
+ if (name[0] && mkdir(fullname, S_IRWXU) == -1) {
+ com_err("rdump", errno, "while making directory %s", fullname);
+ goto errout;
+ }
+
+ retval = ext2fs_dir_iterate(current_fs, ino, 0, 0,
+ rdump_dirent, (void *) fullname);
+ if (retval)
+ com_err("rdump", retval, "while dumping %s", fullname);
+
+ fix_perms("rdump", inode, -1, fullname);
+ }
+ /* else do nothing (don't dump device files, sockets, fifos, etc.) */
+
+errout:
+ free(fullname);
+}
+
+static int rdump_dirent(struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)), void *private)
+{
+ char name[EXT2_NAME_LEN + 1];
+ int thislen;
+ const char *dumproot = private;
+ struct ext2_inode inode;
+
+ thislen = ext2fs_dirent_name_len(dirent);
+ strncpy(name, dirent->name, thislen);
+ name[thislen] = 0;
+
+ if (debugfs_read_inode(dirent->inode, &inode, name))
+ return 0;
+
+ rdump_inode(dirent->inode, &inode, name, dumproot);
+
+ return 0;
+}
+
+void do_rdump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct stat st;
+ char *dest_dir;
+ int i;
+
+ if (common_args_process(argc, argv, 3, INT_MAX, "rdump",
+ "<directory>... <native directory>", 0))
+ return;
+
+ /* Pull out last argument */
+ dest_dir = argv[argc - 1];
+ argc--;
+
+ /* Ensure last arg is a directory. */
+ if (stat(dest_dir, &st) == -1) {
+ com_err("rdump", errno, "while statting %s", dest_dir);
+ return;
+ }
+ if (!S_ISDIR(st.st_mode)) {
+ com_err("rdump", 0, "%s is not a directory", dest_dir);
+ return;
+ }
+
+ for (i = 1; i < argc; i++) {
+ char *arg = argv[i], *basename;
+ struct ext2_inode inode;
+ ext2_ino_t ino = string_to_inode(arg);
+ if (!ino)
+ continue;
+
+ if (debugfs_read_inode(ino, &inode, arg))
+ continue;
+
+ basename = strrchr(arg, '/');
+ if (basename)
+ basename++;
+ else
+ basename = arg;
+
+ rdump_inode(ino, &inode, basename, dest_dir);
+ }
+}
+
+void do_cat(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+
+ if (common_inode_args_process(argc, argv, &inode, 0))
+ return;
+
+ fflush(stdout);
+ fflush(stderr);
+ dump_file(argv[0], inode, 1, 0, argv[2]);
+
+ return;
+}
+
diff --git a/debugfs/extent_cmds.ct b/debugfs/extent_cmds.ct
new file mode 100644
index 0000000..e1c4395
--- /dev/null
+++ b/debugfs/extent_cmds.ct
@@ -0,0 +1,77 @@
+#
+# Copyright (C) 1993 Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+command_table extent_cmds;
+
+request do_current_node, "Current extent node",
+ current_node, current;
+
+request do_root_node, "Goto root extent",
+ root_node, root;
+
+request do_last_leaf, "Goto last leaf",
+ last_leaf;
+
+request do_first_sib, "Goto first sibling",
+ first_sibling, first_sib;
+
+request do_last_sib, "Goto last sibling",
+ last_sibling, last_sib;
+
+request do_next_sib, "Goto next sibling",
+ next_sibling, next_sib, ns;
+
+request do_prev_sib, "Goto previous sibling",
+ prev_sibling, prev_sib, ps;
+
+request do_next_leaf, "Goto next leaf",
+ next_leaf, nl;
+
+request do_prev_leaf, "Goto previous leaf",
+ prev_leaf, pl;
+
+request do_next, "Goto next node",
+ next, n;
+
+request do_prev, "Goto previous node",
+ previous, prev, p;
+
+request do_up, "Up node",
+ up_node, up, u;
+
+request do_down, "Down node",
+ down_node, down, d;
+
+request do_delete_node, "Delete node",
+ delete_node, delete;
+
+request do_insert_node, "Insert node",
+ insert_node, insert;
+
+request do_split_node, "Split node",
+ split_node, split;
+
+request do_fix_parents, "Fix parents",
+ fix_parents, fixp;
+
+request do_set_bmap, "Set block mapping",
+ set_bmap;
+
+request do_replace_node, "Insert node",
+ replace_node, replace;
+
+request do_print_all, "Iterate over all nodes and print them",
+ print_all, all;
+
+request do_goto_block, "Goto extent containing specified block",
+ goto_block, goto;
+
+request do_info, "Print extent info",
+ info;
+
+request do_extent_close, "Close extent handle",
+ extent_close, ec;
+
+end;
+
diff --git a/debugfs/extent_inode.c b/debugfs/extent_inode.c
new file mode 100644
index 0000000..e4e815e
--- /dev/null
+++ b/debugfs/extent_inode.c
@@ -0,0 +1,568 @@
+/*
+ * extent_inode.c --- direct extent tree manipulation
+ *
+ * Copyright (C) 2012 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+static ext2_ino_t current_ino;
+static ext2_extent_handle_t current_handle;
+
+static void dbg_print_extent(char *desc, struct ext2fs_extent *extent)
+{
+ if (desc)
+ printf("%s: ", desc);
+ printf("extent: lblk %llu--%llu, len %u, pblk %llu, flags: ",
+ (unsigned long long) extent->e_lblk,
+ (unsigned long long) extent->e_lblk + extent->e_len - 1,
+ extent->e_len, (unsigned long long) extent->e_pblk);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_LEAF)
+ fputs("LEAF ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fputs("UNINIT ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT)
+ fputs("2ND_VISIT ", stdout);
+ if (!extent->e_flags)
+ fputs("(none)", stdout);
+ fputc('\n', stdout);
+
+}
+
+static int common_extent_args_process(int argc, char *argv[], int min_argc,
+ int max_argc, const char *cmd,
+ const char *usage, int flags)
+{
+ if (common_args_process(argc, argv, min_argc, max_argc, cmd,
+ usage, flags))
+ return 1;
+
+ if (!current_handle) {
+ com_err(cmd, 0, "Extent handle not open");
+ return 1;
+ }
+ return 0;
+}
+
+static char *orig_prompt, *extent_prompt;
+
+void do_extent_open(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ int ret;
+ errcode_t retval;
+ char *cp;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc == 1) {
+ if (current_ino)
+ printf("Current inode is %u\n", current_ino);
+ else
+ printf("No current inode\n");
+ return;
+ }
+
+ if (common_inode_args_process(argc, argv, &inode, 0))
+ return;
+
+ current_ino = 0;
+
+ retval = ext2fs_extent_open(current_fs, inode, &current_handle);
+ if (retval) {
+ com_err(argv[1], retval, "while opening extent handle");
+ return;
+ }
+
+ current_ino = inode;
+
+ orig_prompt = ss_get_prompt(sci_idx);
+ extent_prompt = malloc(strlen(orig_prompt) + 32);
+ if (extent_prompt == NULL) {
+ com_err(argv[1], retval, "out of memory");
+ return;
+ }
+
+ strcpy(extent_prompt, orig_prompt);
+ cp = strchr(extent_prompt, ':');
+ if (cp)
+ *cp = 0;
+ sprintf(extent_prompt + strlen(extent_prompt), " (extent ino %u): ",
+ current_ino);
+ ss_add_request_table(sci_idx, &extent_cmds, 1, &ret);
+ ss_set_prompt(sci_idx, extent_prompt);
+ return;
+}
+
+void do_extent_close(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int ret;
+
+ if (common_args_process(argc, argv, 1, 1,
+ "extent_close", "", 0))
+ return;
+
+ if (!current_handle) {
+ com_err(argv[0], 0, "Extent handle not open");
+ return;
+ }
+
+ ext2fs_extent_free(current_handle);
+ current_handle = NULL;
+ current_ino = 0;
+ ss_delete_request_table(sci_idx, &extent_cmds, &ret);
+ ss_set_prompt(sci_idx, orig_prompt);
+ free(extent_prompt);
+ extent_prompt = NULL;
+}
+
+static void generic_goto_node(const char *my_name, int argc,
+ char **argv, int op)
+{
+ struct ext2fs_extent extent;
+ errcode_t retval;
+
+ if (my_name && common_args_process(argc, argv, 1, 1,
+ my_name, "", 0))
+ return;
+
+ if (!current_handle) {
+ com_err(argv[0], 0, "Extent handle not open");
+ return;
+ }
+
+ retval = ext2fs_extent_get(current_handle, op, &extent);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+ dbg_print_extent(0, &extent);
+}
+
+void do_current_node(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("current_node", argc, argv, EXT2_EXTENT_CURRENT);
+}
+
+void do_root_node(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("root_node", argc, argv, EXT2_EXTENT_ROOT);
+}
+
+void do_last_leaf(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("last_leaf", argc, argv, EXT2_EXTENT_LAST_LEAF);
+}
+
+void do_first_sib(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("first_sib", argc, argv, EXT2_EXTENT_FIRST_SIB);
+}
+
+void do_last_sib(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("next_sib", argc, argv, EXT2_EXTENT_LAST_SIB);
+}
+
+void do_next_sib(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("next_sib", argc, argv, EXT2_EXTENT_NEXT_SIB);
+}
+
+void do_prev_sib(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("prev_sib", argc, argv, EXT2_EXTENT_PREV_SIB);
+}
+
+void do_next_leaf(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("next_leaf", argc, argv, EXT2_EXTENT_NEXT_LEAF);
+}
+
+void do_prev_leaf(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("prev_leaf", argc, argv, EXT2_EXTENT_PREV_LEAF);
+}
+
+void do_next(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("next", argc, argv, EXT2_EXTENT_NEXT);
+}
+
+void do_prev(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("prev", argc, argv, EXT2_EXTENT_PREV);
+}
+
+void do_up(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("up", argc, argv, EXT2_EXTENT_UP);
+}
+
+void do_down(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ generic_goto_node("down", argc, argv, EXT2_EXTENT_DOWN);
+}
+
+void do_delete_node(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct ext2fs_extent extent;
+ errcode_t retval;
+
+ if (common_extent_args_process(argc, argv, 1, 1, "delete_node",
+ "", CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ retval = ext2fs_extent_delete(current_handle, 0);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+
+ retval = ext2fs_extent_get(current_handle, EXT2_EXTENT_CURRENT,
+ &extent);
+ if (retval)
+ return;
+ dbg_print_extent(0, &extent);
+}
+
+void do_replace_node(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "[--uninit] <lblk> <len> <pblk>";
+ errcode_t retval;
+ struct ext2fs_extent extent;
+ int err;
+
+ if (common_extent_args_process(argc, argv, 3, 5, "replace_node",
+ usage, CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ extent.e_flags = 0;
+
+ if (!strcmp(argv[1], "--uninit")) {
+ argc--;
+ argv++;
+ extent.e_flags |= EXT2_EXTENT_FLAGS_UNINIT;
+ }
+
+ if (argc != 4) {
+ fprintf(stderr, "Usage: %s %s\n", argv[0], usage);
+ return;
+ }
+
+ err = strtoblk(argv[0], argv[1], "logical block", &extent.e_lblk);
+ if (err)
+ return;
+
+ extent.e_len = parse_ulong(argv[2], argv[0], "length", &err);
+ if (err)
+ return;
+
+ err = strtoblk(argv[0], argv[3], "physical block", &extent.e_pblk);
+ if (err)
+ return;
+
+ retval = ext2fs_extent_replace(current_handle, 0, &extent);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+ generic_goto_node(NULL, argc, argv, EXT2_EXTENT_CURRENT);
+}
+
+void do_split_node(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ if (common_extent_args_process(argc, argv, 1, 1, "split_node",
+ "", CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ retval = ext2fs_extent_node_split(current_handle);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+ generic_goto_node(NULL, argc, argv, EXT2_EXTENT_CURRENT);
+}
+
+void do_insert_node(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "[--after] [--uninit] <lblk> <len> <pblk>";
+ errcode_t retval;
+ struct ext2fs_extent extent;
+ char *cmd;
+ int err;
+ int flags = 0;
+
+ if (common_extent_args_process(argc, argv, 3, 6, "insert_node",
+ usage, CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ cmd = argv[0];
+
+ extent.e_flags = 0;
+
+ while (argc > 2) {
+ if (!strcmp(argv[1], "--after")) {
+ argc--;
+ argv++;
+ flags |= EXT2_EXTENT_INSERT_AFTER;
+ continue;
+ }
+ if (!strcmp(argv[1], "--uninit")) {
+ argc--;
+ argv++;
+ extent.e_flags |= EXT2_EXTENT_FLAGS_UNINIT;
+ continue;
+ }
+ break;
+ }
+
+ if (argc != 4) {
+ fprintf(stderr, "usage: %s %s\n", cmd, usage);
+ return;
+ }
+
+ err = strtoblk(cmd, argv[1], "logical block", &extent.e_lblk);
+ if (err)
+ return;
+
+ extent.e_len = parse_ulong(argv[2], cmd, "length", &err);
+ if (err)
+ return;
+
+ err = strtoblk(cmd, argv[3], "physical block", &extent.e_pblk);
+ if (err)
+ return;
+
+ retval = ext2fs_extent_insert(current_handle, flags, &extent);
+ if (retval) {
+ com_err(cmd, retval, 0);
+ return;
+ }
+ generic_goto_node(NULL, argc, argv, EXT2_EXTENT_CURRENT);
+}
+
+void do_set_bmap(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "[--uninit] <lblk> <pblk>";
+ struct ext2fs_extent extent;
+ errcode_t retval;
+ blk64_t logical;
+ blk64_t physical;
+ char *cmd = argv[0];
+ int flags = 0;
+ int err;
+
+ if (common_extent_args_process(argc, argv, 3, 5, "set_bmap",
+ usage, CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ if (argc > 2 && !strcmp(argv[1], "--uninit")) {
+ argc--;
+ argv++;
+ flags |= EXT2_EXTENT_SET_BMAP_UNINIT;
+ }
+
+ if (argc != 3) {
+ fprintf(stderr, "Usage: %s %s\n", cmd, usage);
+ return;
+ }
+
+ err = strtoblk(cmd, argv[1], "logical block", &logical);
+ if (err)
+ return;
+
+ err = strtoblk(cmd, argv[2], "physical block", &physical);
+ if (err)
+ return;
+
+ retval = ext2fs_extent_set_bmap(current_handle, logical,
+ physical, flags);
+ if (retval) {
+ com_err(cmd, retval, 0);
+ return;
+ }
+
+ retval = ext2fs_extent_get(current_handle, EXT2_EXTENT_CURRENT,
+ &extent);
+ if (retval)
+ return;
+ dbg_print_extent(0, &extent);
+}
+
+void do_print_all(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "[--leaf-only|--reverse|--reverse-leaf]";
+ struct ext2fs_extent extent;
+ errcode_t retval;
+ errcode_t end_err = EXT2_ET_EXTENT_NO_NEXT;
+ int op = EXT2_EXTENT_NEXT;
+ int first_op = EXT2_EXTENT_ROOT;
+
+
+ if (common_extent_args_process(argc, argv, 1, 2, "print_all",
+ usage, 0))
+ return;
+
+ if (argc == 2) {
+ if (!strcmp(argv[1], "--leaf-only"))
+ op = EXT2_EXTENT_NEXT_LEAF;
+ else if (!strcmp(argv[1], "--reverse")) {
+ op = EXT2_EXTENT_PREV;
+ first_op = EXT2_EXTENT_LAST_LEAF;
+ end_err = EXT2_ET_EXTENT_NO_PREV;
+ } else if (!strcmp(argv[1], "--reverse-leaf")) {
+ op = EXT2_EXTENT_PREV_LEAF;
+ first_op = EXT2_EXTENT_LAST_LEAF;
+ end_err = EXT2_ET_EXTENT_NO_PREV;
+ } else {
+ fprintf(stderr, "Usage: %s %s\n", argv[0], usage);
+ return;
+ }
+ }
+
+ retval = ext2fs_extent_get(current_handle, first_op, &extent);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+ dbg_print_extent(0, &extent);
+
+ while (1) {
+ retval = ext2fs_extent_get(current_handle, op, &extent);
+ if (retval == end_err)
+ break;
+
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+ dbg_print_extent(0, &extent);
+ }
+}
+
+void do_fix_parents(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ if (common_extent_args_process(argc, argv, 1, 1, "fix_parents", "",
+ CHECK_FS_RW))
+ return;
+
+ retval = ext2fs_extent_fix_parents(current_handle);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+}
+
+void do_info(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct ext2fs_extent extent;
+ struct ext2_extent_info info;
+ errcode_t retval;
+
+ if (common_extent_args_process(argc, argv, 1, 1, "info", "", 0))
+ return;
+
+ retval = ext2fs_extent_get_info(current_handle, &info);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+
+ retval = ext2fs_extent_get(current_handle,
+ EXT2_EXTENT_CURRENT, &extent);
+ if (retval) {
+ com_err(argv[0], retval, 0);
+ return;
+ }
+
+ dbg_print_extent(0, &extent);
+
+ printf("Current handle location: %d/%d (max: %d, bytes %d), level %d/%d\n",
+ info.curr_entry, info.num_entries, info.max_entries,
+ info.bytes_avail, info.curr_level, info.max_depth);
+ printf("\tmax lblk: %llu, max pblk: %llu\n",
+ (unsigned long long) info.max_lblk,
+ (unsigned long long) info.max_pblk);
+ printf("\tmax_len: %u, max_uninit_len: %u\n", info.max_len,
+ info.max_uninit_len);
+}
+
+void do_goto_block(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ blk64_t blk;
+ int level = 0, err;
+
+ if (common_extent_args_process(argc, argv, 2, 3, "goto_block",
+ "block [level]", 0))
+ return;
+
+ if (strtoblk(argv[0], argv[1], NULL, &blk))
+ return;
+
+ if (argc == 3) {
+ level = parse_ulong(argv[2], argv[0], "level", &err);
+ if (err)
+ return;
+ }
+
+ retval = ext2fs_extent_goto2(current_handle, level, (blk64_t) blk);
+
+ if (retval) {
+ com_err(argv[0], retval,
+ "while trying to go to block %llu, level %d",
+ (unsigned long long) blk, level);
+ return;
+ }
+
+ generic_goto_node(NULL, argc, argv, EXT2_EXTENT_CURRENT);
+}
diff --git a/debugfs/filefrag.c b/debugfs/filefrag.c
new file mode 100644
index 0000000..31c1440
--- /dev/null
+++ b/debugfs/filefrag.c
@@ -0,0 +1,330 @@
+/*
+ * filefrag.c --- display the fragmentation information for a file
+ *
+ * Copyright (C) 2011 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <utime.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+#define VERBOSE_OPT 0x0001
+#define DIR_OPT 0x0002
+#define RECURSIVE_OPT 0x0004
+
+struct dir_list {
+ char *name;
+ ext2_ino_t ino;
+ struct dir_list *next;
+};
+
+struct filefrag_struct {
+ FILE *f;
+ const char *name;
+ const char *dir_name;
+ int options;
+ int logical_width;
+ int physical_width;
+ int ext;
+ int cont_ext;
+ e2_blkcnt_t num;
+ e2_blkcnt_t logical_start;
+ blk64_t physical_start;
+ blk64_t expected;
+ struct dir_list *dir_list, *dir_last;
+};
+
+static int int_log10(unsigned long long arg)
+{
+ int l = 0;
+
+ arg = arg / 10;
+ while (arg) {
+ l++;
+ arg = arg / 10;
+ }
+ return l;
+}
+
+static void print_header(struct filefrag_struct *fs)
+{
+ if (fs->options & VERBOSE_OPT) {
+ fprintf(fs->f, "%4s %*s %*s %*s %*s\n", "ext",
+ fs->logical_width, "logical", fs->physical_width,
+ "physical", fs->physical_width, "expected",
+ fs->logical_width, "length");
+ }
+}
+
+static void report_filefrag(struct filefrag_struct *fs)
+{
+ if (fs->num == 0)
+ return;
+ if (fs->options & VERBOSE_OPT) {
+ if (fs->expected)
+ fprintf(fs->f, "%4d %*lu %*llu %*llu %*lu\n", fs->ext,
+ fs->logical_width,
+ (unsigned long) fs->logical_start,
+ fs->physical_width,
+ (unsigned long long) fs->physical_start,
+ fs->physical_width,
+ (unsigned long long) fs->expected,
+ fs->logical_width, (unsigned long) fs->num);
+ else
+ fprintf(fs->f, "%4d %*lu %*llu %*s %*lu\n", fs->ext,
+ fs->logical_width,
+ (unsigned long) fs->logical_start,
+ fs->physical_width,
+ (unsigned long long) fs->physical_start,
+ fs->physical_width, "",
+ fs->logical_width, (unsigned long) fs->num);
+ }
+ fs->ext++;
+}
+
+static int filefrag_blocks_proc(ext2_filsys ext4_fs EXT2FS_ATTR((unused)),
+ blk64_t *blocknr, e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct filefrag_struct *fs = private;
+
+ if (blockcnt < 0 || *blocknr == 0)
+ return 0;
+
+ if ((fs->num == 0) || (blockcnt != fs->logical_start + fs->num) ||
+ (*blocknr != fs->physical_start + fs->num)) {
+ report_filefrag(fs);
+ if (blockcnt == fs->logical_start + fs->num)
+ fs->expected = fs->physical_start + fs->num;
+ else
+ fs->expected = 0;
+ fs->logical_start = blockcnt;
+ fs->physical_start = *blocknr;
+ fs->num = 1;
+ fs->cont_ext++;
+ } else
+ fs->num++;
+ return 0;
+}
+
+static void filefrag(ext2_ino_t ino, struct ext2_inode *inode,
+ struct filefrag_struct *fs)
+{
+ errcode_t retval;
+ int blocksize = current_fs->blocksize;
+
+ fs->logical_width = int_log10((EXT2_I_SIZE(inode) + blocksize - 1) /
+ blocksize) + 1;
+ if (fs->logical_width < 7)
+ fs->logical_width = 7;
+ fs->ext = 0;
+ fs->cont_ext = 0;
+ fs->logical_start = 0;
+ fs->physical_start = 0;
+ fs->num = 0;
+
+ if (fs->options & VERBOSE_OPT) {
+ blk64_t num_blocks = ext2fs_inode_i_blocks(current_fs, inode);
+
+ if (!ext2fs_has_feature_huge_file(current_fs->super) ||
+ !(inode->i_flags & EXT4_HUGE_FILE_FL))
+ num_blocks /= current_fs->blocksize / 512;
+
+ fprintf(fs->f, "\n%s has %llu block(s), i_size is %llu\n",
+ fs->name, (unsigned long long) num_blocks,
+ (unsigned long long) EXT2_I_SIZE(inode));
+ }
+ print_header(fs);
+ if (ext2fs_inode_has_valid_blocks2(current_fs, inode)) {
+ retval = ext2fs_block_iterate3(current_fs, ino,
+ BLOCK_FLAG_READ_ONLY, NULL,
+ filefrag_blocks_proc, fs);
+ if (retval)
+ com_err("ext2fs_block_iterate3", retval, 0);
+ }
+
+ report_filefrag(fs);
+ fprintf(fs->f, "%s: %d contiguous extents%s\n", fs->name, fs->ext,
+ LINUX_S_ISDIR(inode->i_mode) ? " (dir)" : "");
+}
+
+static int filefrag_dir_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct filefrag_struct *fs = private;
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+ char name[EXT2_NAME_LEN + 1];
+ char *cp;
+ int thislen;
+
+ if (entry == DIRENT_DELETED_FILE)
+ return 0;
+
+ thislen = ext2fs_dirent_name_len(dirent);
+ strncpy(name, dirent->name, thislen);
+ name[thislen] = '\0';
+ ino = dirent->inode;
+
+ if (!strcmp(name, ".") || !strcmp(name, ".."))
+ return 0;
+
+ cp = malloc(strlen(fs->dir_name) + strlen(name) + 2);
+ if (!cp) {
+ fprintf(stderr, "Couldn't allocate memory for %s/%s\n",
+ fs->dir_name, name);
+ return 0;
+ }
+
+ sprintf(cp, "%s/%s", fs->dir_name, name);
+ fs->name = cp;
+
+ if (debugfs_read_inode(ino, &inode, fs->name))
+ goto errout;
+
+ filefrag(ino, &inode, fs);
+
+ if ((fs->options & RECURSIVE_OPT) && LINUX_S_ISDIR(inode.i_mode)) {
+ struct dir_list *p;
+
+ p = malloc(sizeof(struct dir_list));
+ if (!p) {
+ fprintf(stderr, "Couldn't allocate dir_list for %s\n",
+ fs->name);
+ goto errout;
+ }
+ memset(p, 0, sizeof(struct dir_list));
+ p->name = cp;
+ p->ino = ino;
+ if (fs->dir_last)
+ fs->dir_last->next = p;
+ else
+ fs->dir_list = p;
+ fs->dir_last = p;
+ return 0;
+ }
+errout:
+ free(cp);
+ fs->name = 0;
+ return 0;
+}
+
+
+static void dir_iterate(ext2_ino_t ino, struct filefrag_struct *fs)
+{
+ errcode_t retval;
+ struct dir_list *p = NULL;
+
+ fs->dir_name = fs->name;
+
+ while (1) {
+ retval = ext2fs_dir_iterate2(current_fs, ino, 0,
+ 0, filefrag_dir_proc, fs);
+ if (retval)
+ com_err("ext2fs_dir_iterate2", retval, 0);
+ if (p) {
+ free(p->name);
+ fs->dir_list = p->next;
+ if (!fs->dir_list)
+ fs->dir_last = 0;
+ free(p);
+ }
+ p = fs->dir_list;
+ if (!p)
+ break;
+ ino = p->ino;
+ fs->dir_name = p->name;
+ }
+}
+
+void do_filefrag(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct filefrag_struct fs;
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+ int c;
+
+ memset(&fs, 0, sizeof(fs));
+ if (check_fs_open(argv[0]))
+ return;
+
+ reset_getopt();
+ while ((c = getopt(argc, argv, "dvr")) != EOF) {
+ switch (c) {
+ case 'd':
+ fs.options |= DIR_OPT;
+ break;
+ case 'v':
+ fs.options |= VERBOSE_OPT;
+ break;
+ case 'r':
+ fs.options |= RECURSIVE_OPT;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (argc > optind+1) {
+ print_usage:
+ com_err(0, 0, "Usage: filefrag [-dvr] file");
+ return;
+ }
+
+ if (argc == optind) {
+ ino = cwd;
+ fs.name = ".";
+ } else {
+ ino = string_to_inode(argv[optind]);
+ fs.name = argv[optind];
+ }
+ if (!ino)
+ return;
+
+ if (debugfs_read_inode(ino, &inode, argv[0]))
+ return;
+
+ fs.f = open_pager();
+ fs.physical_width = int_log10(ext2fs_blocks_count(current_fs->super));
+ fs.physical_width++;
+ if (fs.physical_width < 8)
+ fs.physical_width = 8;
+
+ if (!LINUX_S_ISDIR(inode.i_mode) || (fs.options & DIR_OPT))
+ filefrag(ino, &inode, &fs);
+ else
+ dir_iterate(ino, &fs);
+
+ fprintf(fs.f, "\n");
+ close_pager(fs.f);
+
+ return;
+}
diff --git a/debugfs/htree.c b/debugfs/htree.c
new file mode 100644
index 0000000..a9f9211
--- /dev/null
+++ b/debugfs/htree.c
@@ -0,0 +1,488 @@
+/*
+ * htree.c --- hash tree routines
+ *
+ * Copyright (C) 2002 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+
+static FILE *pager;
+
+static void htree_dump_leaf_node(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ struct ext2_dx_root_info * rootnode,
+ blk64_t blk, char *buf)
+{
+ errcode_t errcode;
+ struct ext2_dir_entry *dirent;
+ int thislen, col = 0;
+ unsigned int offset = 0;
+ char name[EXT2_NAME_LEN + 1];
+ char tmp[EXT2_NAME_LEN + 64];
+ blk64_t pblk;
+ ext2_dirhash_t hash, minor_hash;
+ unsigned int rec_len;
+ int hash_alg;
+ int hash_flags = inode->i_flags & EXT4_CASEFOLD_FL;
+ int csum_size = 0;
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dir_entry_tail);
+
+ errcode = ext2fs_bmap2(fs, ino, inode, buf, 0, blk, 0, &pblk);
+ if (errcode) {
+ com_err("htree_dump_leaf_node", errcode,
+ "while mapping logical block %llu\n",
+ (unsigned long long) blk);
+ return;
+ }
+
+ fprintf(pager, "Reading directory block %llu, phys %llu\n",
+ (unsigned long long) blk, (unsigned long long) pblk);
+ errcode = ext2fs_read_dir_block4(current_fs, pblk, buf, 0, ino);
+ if (errcode) {
+ com_err("htree_dump_leaf_node", errcode,
+ "while reading block %llu (%llu)\n",
+ (unsigned long long) blk, (unsigned long long) pblk);
+ return;
+ }
+ hash_alg = rootnode->hash_version;
+ if ((hash_alg <= EXT2_HASH_TEA) &&
+ (fs->super->s_flags & EXT2_FLAGS_UNSIGNED_HASH))
+ hash_alg += 3;
+
+ while (offset < fs->blocksize) {
+ dirent = (struct ext2_dir_entry *) (buf + offset);
+ errcode = ext2fs_get_rec_len(fs, dirent, &rec_len);
+ if (errcode) {
+ com_err("htree_dump_leaf_inode", errcode,
+ "while getting rec_len for block %lu",
+ (unsigned long) blk);
+ return;
+ }
+ thislen = ext2fs_dirent_name_len(dirent);
+ if (((offset + rec_len) > fs->blocksize) ||
+ (rec_len < 8) ||
+ ((rec_len % 4) != 0) ||
+ ((unsigned) thislen + 8 > rec_len)) {
+ fprintf(pager, "Corrupted directory block (%llu)!\n",
+ (unsigned long long) blk);
+ break;
+ }
+ strncpy(name, dirent->name, thislen);
+ name[thislen] = '\0';
+ errcode = ext2fs_dirhash2(hash_alg, name, thislen,
+ fs->encoding, hash_flags,
+ fs->super->s_hash_seed,
+ &hash, &minor_hash);
+ if (errcode)
+ com_err("htree_dump_leaf_node", errcode,
+ "while calculating hash");
+ if ((offset == fs->blocksize - csum_size) &&
+ (dirent->inode == 0) &&
+ (dirent->rec_len == csum_size) &&
+ (dirent->name_len == EXT2_DIR_NAME_LEN_CSUM)) {
+ struct ext2_dir_entry_tail *t;
+
+ t = (struct ext2_dir_entry_tail *) dirent;
+
+ snprintf(tmp, EXT2_NAME_LEN + 64,
+ "leaf block checksum: 0x%08x ",
+ t->det_checksum);
+ } else {
+ snprintf(tmp, EXT2_NAME_LEN + 64,
+ "%u 0x%08x-%08x (%d) %s ",
+ dirent->inode, hash, minor_hash,
+ rec_len, name);
+ }
+ thislen = strlen(tmp);
+ if (col + thislen > 80) {
+ fprintf(pager, "\n");
+ col = 0;
+ }
+ fprintf(pager, "%s", tmp);
+ col += thislen;
+ offset += rec_len;
+ }
+ fprintf(pager, "\n");
+}
+
+
+static void htree_dump_int_block(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ struct ext2_dx_root_info * rootnode,
+ blk64_t blk, char *buf, int level);
+
+
+static void htree_dump_int_node(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ struct ext2_dx_root_info * rootnode,
+ struct ext2_dx_entry *ent, __u32 crc,
+ char *buf, int level)
+{
+ struct ext2_dx_countlimit dx_countlimit;
+ struct ext2_dx_tail *tail;
+ int hash, i;
+ int limit, count;
+ int remainder;
+
+ dx_countlimit = *((struct ext2_dx_countlimit *) ent);
+ count = ext2fs_le16_to_cpu(dx_countlimit.count);
+ limit = ext2fs_le16_to_cpu(dx_countlimit.limit);
+
+ fprintf(pager, "Number of entries (count): %d\n", count);
+ fprintf(pager, "Number of entries (limit): %d\n", limit);
+
+ remainder = fs->blocksize - (limit * sizeof(struct ext2_dx_entry));
+ if (ent == (struct ext2_dx_entry *)(rootnode + 1))
+ remainder -= sizeof(struct ext2_dx_root_info) + 24;
+ else
+ remainder -= 8;
+ if (ext2fs_has_feature_metadata_csum(fs->super) &&
+ remainder == sizeof(struct ext2_dx_tail)) {
+ tail = (struct ext2_dx_tail *)(ent + limit);
+ fprintf(pager, "Checksum: 0x%08x",
+ ext2fs_le32_to_cpu(tail->dt_checksum));
+ if (tail->dt_checksum != crc)
+ fprintf(pager, " --- EXPECTED: 0x%08x", crc);
+ fputc('\n', pager);
+ }
+
+ for (i=0; i < count; i++) {
+ hash = i ? ext2fs_le32_to_cpu(ent[i].hash) : 0;
+ fprintf(pager, "Entry #%d: Hash 0x%08x%s, block %u\n", i,
+ hash, (hash & 1) ? " (**)" : "",
+ ext2fs_le32_to_cpu(ent[i].block));
+ }
+
+ fprintf(pager, "\n");
+
+ for (i=0; i < count; i++) {
+ unsigned int hashval, block;
+
+ hashval = ext2fs_le32_to_cpu(ent[i].hash);
+ block = ext2fs_le32_to_cpu(ent[i].block);
+ fprintf(pager, "Entry #%d: Hash 0x%08x, block %u\n", i,
+ i ? hashval : 0, block);
+ if (level)
+ htree_dump_int_block(fs, ino, inode, rootnode,
+ block, buf, level-1);
+ else
+ htree_dump_leaf_node(fs, ino, inode, rootnode,
+ block, buf);
+ }
+
+ fprintf(pager, "---------------------\n");
+}
+
+static void htree_dump_int_block(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ struct ext2_dx_root_info * rootnode,
+ blk64_t blk, char *buf, int level)
+{
+ char *cbuf;
+ errcode_t errcode;
+ blk64_t pblk;
+ __u32 crc;
+
+ cbuf = malloc(fs->blocksize);
+ if (!cbuf) {
+ fprintf(pager, "Couldn't allocate child block.\n");
+ return;
+ }
+
+ errcode = ext2fs_bmap2(fs, ino, inode, buf, 0, blk, 0, &pblk);
+ if (errcode) {
+ com_err("htree_dump_int_block", errcode,
+ "while mapping logical block %llu\n",
+ (unsigned long long) blk);
+ goto errout;
+ }
+
+ errcode = io_channel_read_blk64(current_fs->io, pblk, 1, buf);
+ if (errcode) {
+ com_err("htree_dump_int_block", errcode,
+ "while reading block %llu\n",
+ (unsigned long long) blk);
+ goto errout;
+ }
+
+ errcode = ext2fs_dx_csum(current_fs, ino,
+ (struct ext2_dir_entry *) buf, &crc, NULL);
+ if (errcode) {
+ com_err("htree_dump_int_block", errcode,
+ "while calculating checksum for logical block %llu\n",
+ (unsigned long long) blk);
+ crc = (unsigned int) -1;
+ }
+ htree_dump_int_node(fs, ino, inode, rootnode,
+ (struct ext2_dx_entry *) (buf+8),
+ crc, cbuf, level);
+errout:
+ free(cbuf);
+}
+
+
+
+void do_htree_dump(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ blk64_t blk;
+ char *buf = NULL;
+ struct ext2_dx_root_info *rootnode;
+ struct ext2_dx_entry *ent;
+ errcode_t errcode;
+ __u32 crc;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ pager = open_pager();
+
+ if (common_inode_args_process(argc, argv, &ino, 0))
+ goto errout;
+
+ if (debugfs_read_inode(ino, &inode, argv[1]))
+ goto errout;
+
+ if (!LINUX_S_ISDIR(inode.i_mode)) {
+ com_err(argv[0], 0, "Not a directory");
+ goto errout;
+ }
+
+ if ((inode.i_flags & EXT2_BTREE_FL) == 0) {
+ com_err(argv[0], 0, "Not a hash-indexed directory");
+ goto errout;
+ }
+
+ buf = malloc(2*current_fs->blocksize);
+ if (!buf) {
+ com_err(argv[0], 0, "Couldn't allocate htree buffer");
+ goto errout;
+ }
+
+ errcode = ext2fs_bmap2(current_fs, ino, &inode, buf, 0, 0, 0, &blk);
+ if (errcode) {
+ com_err("do_htree_block", errcode,
+ "while mapping logical block 0\n");
+ goto errout;
+ }
+
+ errcode = io_channel_read_blk64(current_fs->io, blk,
+ 1, buf);
+ if (errcode) {
+ com_err(argv[0], errcode, "Error reading root node");
+ goto errout;
+ }
+
+ rootnode = (struct ext2_dx_root_info *) (buf + 24);
+
+ fprintf(pager, "Root node dump:\n");
+ fprintf(pager, "\t Reserved zero: %u\n", rootnode->reserved_zero);
+ fprintf(pager, "\t Hash Version: %d\n", rootnode->hash_version);
+ fprintf(pager, "\t Info length: %d\n", rootnode->info_length);
+ fprintf(pager, "\t Indirect levels: %d\n", rootnode->indirect_levels);
+ fprintf(pager, "\t Flags: %#x\n", rootnode->unused_flags);
+
+ ent = (struct ext2_dx_entry *)
+ ((char *)rootnode + rootnode->info_length);
+
+ errcode = ext2fs_dx_csum(current_fs, ino,
+ (struct ext2_dir_entry *) buf, &crc, NULL);
+ if (errcode) {
+ com_err("htree_dump_int_block", errcode,
+ "while calculating checksum for htree root\n");
+ crc = (unsigned int) -1;
+ }
+ htree_dump_int_node(current_fs, ino, &inode, rootnode, ent, crc,
+ buf + current_fs->blocksize,
+ rootnode->indirect_levels);
+
+errout:
+ free(buf);
+ close_pager(pager);
+}
+
+/*
+ * This function prints the hash of a given file.
+ */
+void do_dx_hash(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_dirhash_t hash, minor_hash;
+ errcode_t err;
+ int c;
+ int hash_version = 0;
+ __u32 hash_seed[4];
+ int hash_flags = 0;
+ const struct ext2fs_nls_table *encoding = NULL;
+
+ hash_seed[0] = hash_seed[1] = hash_seed[2] = hash_seed[3] = 0;
+
+ reset_getopt();
+ while ((c = getopt(argc, argv, "h:s:ce:")) != EOF) {
+ switch (c) {
+ case 'h':
+ hash_version = e2p_string2hash(optarg);
+ if (hash_version < 0)
+ hash_version = atoi(optarg);
+ break;
+ case 's':
+ if (uuid_parse(optarg, (unsigned char *) hash_seed)) {
+ fprintf(stderr, "Invalid UUID format: %s\n",
+ optarg);
+ return;
+ }
+ break;
+ case 'c':
+ hash_flags |= EXT4_CASEFOLD_FL;
+ break;
+ case 'e':
+ encoding = ext2fs_load_nls_table(e2p_str2encoding(optarg));
+ if (!encoding) {
+ fprintf(stderr, "Invalid encoding: %s\n",
+ optarg);
+ return;
+ }
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+ if (optind != argc-1) {
+ print_usage:
+ com_err(argv[0], 0, "usage: dx_hash [-h hash_alg] "
+ "[-s hash_seed] [-c] [-e encoding] filename");
+ return;
+ }
+ err = ext2fs_dirhash2(hash_version, argv[optind],
+ strlen(argv[optind]), encoding, hash_flags,
+ hash_seed, &hash, &minor_hash);
+
+ if (err) {
+ com_err(argv[0], err, "while calculating hash");
+ return;
+ }
+ printf("Hash of %s is 0x%0x (minor 0x%0x)\n", argv[optind],
+ hash, minor_hash);
+}
+
+/*
+ * Search for particular directory entry (useful for debugging very
+ * large hash tree directories that have lost some blocks from the
+ * btree index).
+ */
+struct process_block_struct {
+ char *search_name;
+ char *buf;
+ int len;
+};
+
+static int search_dir_block(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt, blk64_t ref_blk,
+ int ref_offset, void *priv_data);
+
+void do_dirsearch(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t inode;
+ struct process_block_struct pb;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 3) {
+ com_err(0, 0, "Usage: dirsearch dir filename");
+ return;
+ }
+
+ inode = string_to_inode(argv[1]);
+ if (!inode)
+ return;
+
+ pb.buf = malloc(current_fs->blocksize);
+ if (!pb.buf) {
+ com_err("dirsearch", 0, "Couldn't allocate buffer");
+ return;
+ }
+ pb.search_name = argv[2];
+ pb.len = strlen(pb.search_name);
+
+ ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, 0,
+ search_dir_block, &pb);
+
+ free(pb.buf);
+}
+
+
+static int search_dir_block(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ struct ext2_dir_entry *dirent;
+ errcode_t errcode;
+ unsigned int offset = 0;
+ unsigned int rec_len;
+
+ if (blockcnt < 0)
+ return 0;
+
+ p = (struct process_block_struct *) priv_data;
+
+ errcode = io_channel_read_blk64(current_fs->io, *blocknr, 1, p->buf);
+ if (errcode) {
+ com_err("search_dir_block", errcode,
+ "while reading block %lu", (unsigned long) *blocknr);
+ return BLOCK_ABORT;
+ }
+
+ while (offset < fs->blocksize) {
+ dirent = (struct ext2_dir_entry *) (p->buf + offset);
+ errcode = ext2fs_get_rec_len(fs, dirent, &rec_len);
+ if (errcode) {
+ com_err("htree_dump_leaf_inode", errcode,
+ "while getting rec_len for block %lu",
+ (unsigned long) *blocknr);
+ return BLOCK_ABORT;
+ }
+ if (dirent->inode &&
+ p->len == ext2fs_dirent_name_len(dirent) &&
+ strncmp(p->search_name, dirent->name,
+ p->len) == 0) {
+ printf("Entry found at logical block %lld, "
+ "phys %llu, offset %u\n", (long long)blockcnt,
+ (unsigned long long) *blocknr, offset);
+ printf("offset %u\n", offset);
+ return BLOCK_ABORT;
+ }
+ offset += rec_len;
+ }
+ return 0;
+}
+
diff --git a/debugfs/icheck.c b/debugfs/icheck.c
new file mode 100644
index 0000000..ed6e950
--- /dev/null
+++ b/debugfs/icheck.c
@@ -0,0 +1,176 @@
+/*
+ * icheck.c --- given a list of blocks, generate a list of inodes
+ *
+ * Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+
+#include "debugfs.h"
+
+struct block_info {
+ blk64_t blk;
+ ext2_ino_t ino;
+};
+
+struct block_walk_struct {
+ struct block_info *barray;
+ e2_blkcnt_t blocks_left;
+ e2_blkcnt_t num_blocks;
+ ext2_ino_t inode;
+};
+
+static int icheck_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct block_walk_struct *bw = (struct block_walk_struct *) private;
+ e2_blkcnt_t i;
+
+ for (i=0; i < bw->num_blocks; i++) {
+ if (!bw->barray[i].ino && bw->barray[i].blk == *block_nr) {
+ bw->barray[i].ino = bw->inode;
+ bw->blocks_left--;
+ }
+ }
+ if (!bw->blocks_left)
+ return BLOCK_ABORT;
+
+ return 0;
+}
+
+void do_icheck(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct block_walk_struct bw;
+ struct block_info *binfo;
+ int i;
+ ext2_inode_scan scan = 0;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ errcode_t retval;
+ char *block_buf;
+
+ if (argc < 2) {
+ com_err(argv[0], 0, "Usage: icheck <block number> ...");
+ return;
+ }
+ if (check_fs_open(argv[0]))
+ return;
+
+ bw.barray = malloc(sizeof(struct block_info) * argc);
+ if (!bw.barray) {
+ com_err("icheck", ENOMEM,
+ "while allocating inode info array");
+ return;
+ }
+ memset(bw.barray, 0, sizeof(struct block_info) * argc);
+
+ block_buf = malloc(current_fs->blocksize * 3);
+ if (!block_buf) {
+ com_err("icheck", ENOMEM, "while allocating block buffer");
+ goto error_out;
+ }
+
+ for (i=1; i < argc; i++) {
+ if (strtoblk(argv[0], argv[i], NULL, &bw.barray[i-1].blk))
+ goto error_out;
+ }
+
+ bw.num_blocks = bw.blocks_left = argc-1;
+
+ retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
+ if (retval) {
+ com_err("icheck", retval, "while opening inode scan");
+ goto error_out;
+ }
+
+ do {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ } while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
+ if (retval) {
+ com_err("icheck", retval, "while starting inode scan");
+ goto error_out;
+ }
+
+ while (ino) {
+ blk64_t blk;
+
+ if (!inode.i_links_count)
+ goto next;
+
+ bw.inode = ino;
+
+ blk = ext2fs_file_acl_block(current_fs, &inode);
+ if (blk) {
+ icheck_proc(current_fs, &blk, 0,
+ 0, 0, &bw);
+ if (bw.blocks_left == 0)
+ break;
+ ext2fs_file_acl_block_set(current_fs, &inode, blk);
+ }
+
+ if (!ext2fs_inode_has_valid_blocks2(current_fs, &inode))
+ goto next;
+ /*
+ * To handle filesystems touched by 0.3c extfs; can be
+ * removed later.
+ */
+ if (inode.i_dtime)
+ goto next;
+
+ retval = ext2fs_block_iterate3(current_fs, ino,
+ BLOCK_FLAG_READ_ONLY, block_buf,
+ icheck_proc, &bw);
+ if (retval) {
+ com_err("icheck", retval,
+ "while calling ext2fs_block_iterate");
+ goto next;
+ }
+
+ if (bw.blocks_left == 0)
+ break;
+
+ next:
+ do {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ } while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
+ if (retval) {
+ com_err("icheck", retval,
+ "while doing inode scan");
+ goto error_out;
+ }
+ }
+
+ printf("Block\tInode number\n");
+ for (i=0, binfo = bw.barray; i < bw.num_blocks; i++, binfo++) {
+ if (binfo->ino == 0) {
+ printf("%llu\t<block not found>\n",
+ (unsigned long long) binfo->blk);
+ continue;
+ }
+ printf("%llu\t%u\n", (unsigned long long) binfo->blk,
+ binfo->ino);
+ }
+
+error_out:
+ free(bw.barray);
+ free(block_buf);
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ return;
+}
diff --git a/debugfs/journal.c b/debugfs/journal.c
new file mode 100644
index 0000000..5bac0d3
--- /dev/null
+++ b/debugfs/journal.c
@@ -0,0 +1,947 @@
+/*
+ * journal.c --- code for handling the "ext3" journal
+ *
+ * Copyright (C) 2000 Andreas Dilger
+ * Copyright (C) 2000 Theodore Ts'o
+ *
+ * Parts of the code are based on fs/jfs/journal.c by Stephen C. Tweedie
+ * Copyright (C) 1999 Red Hat Software
+ *
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2 or at your discretion
+ * any later version.
+ */
+
+#include "config.h"
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/param.h>
+#include <sys/mount.h>
+#define MNT_FL (MS_MGC_VAL | MS_RDONLY)
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#define E2FSCK_INCLUDE_INLINE_FUNCS
+#include "uuid/uuid.h"
+#include "journal.h"
+
+static int bh_count = 0;
+
+#if EXT2_FLAT_INCLUDES
+#include "blkid.h"
+#else
+#include "blkid/blkid.h"
+#endif
+
+/*
+ * Define USE_INODE_IO to use the inode_io.c / fileio.c codepaths.
+ * This creates a larger static binary, and a smaller binary using
+ * shared libraries. It's also probably slightly less CPU-efficient,
+ * which is why it's not on by default. But, it's a good way of
+ * testing the functions in inode_io.c and fileio.c.
+ */
+#undef USE_INODE_IO
+
+/* Checksumming functions */
+static int ext2fs_journal_verify_csum_type(journal_t *j,
+ journal_superblock_t *jsb)
+{
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 1;
+
+ return jsb->s_checksum_type == JBD2_CRC32C_CHKSUM;
+}
+
+static __u32 ext2fs_journal_sb_csum(journal_superblock_t *jsb)
+{
+ __u32 crc, old_crc;
+
+ old_crc = jsb->s_checksum;
+ jsb->s_checksum = 0;
+ crc = ext2fs_crc32c_le(~0, (unsigned char *)jsb,
+ sizeof(journal_superblock_t));
+ jsb->s_checksum = old_crc;
+
+ return crc;
+}
+
+static int ext2fs_journal_sb_csum_verify(journal_t *j,
+ journal_superblock_t *jsb)
+{
+ __u32 provided, calculated;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 1;
+
+ provided = ext2fs_be32_to_cpu(jsb->s_checksum);
+ calculated = ext2fs_journal_sb_csum(jsb);
+
+ return provided == calculated;
+}
+
+static errcode_t ext2fs_journal_sb_csum_set(journal_t *j,
+ journal_superblock_t *jsb)
+{
+ __u32 crc;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 0;
+
+ crc = ext2fs_journal_sb_csum(jsb);
+ jsb->s_checksum = ext2fs_cpu_to_be32(crc);
+ return 0;
+}
+
+/* Kernel compatibility functions for handling the journal. These allow us
+ * to use the recovery.c file virtually unchanged from the kernel, so we
+ * don't have to do much to keep kernel and user recovery in sync.
+ */
+int jbd2_journal_bmap(journal_t *journal, unsigned long block,
+ unsigned long long *phys)
+{
+#ifdef USE_INODE_IO
+ *phys = block;
+ return 0;
+#else
+ struct inode *inode = journal->j_inode;
+ errcode_t retval;
+ blk64_t pblk;
+
+ if (!inode) {
+ *phys = block;
+ return 0;
+ }
+
+ retval = ext2fs_bmap2(inode->i_fs, inode->i_ino,
+ &inode->i_ext2, NULL, 0, (blk64_t) block,
+ 0, &pblk);
+ *phys = pblk;
+ return (int) retval;
+#endif
+}
+
+struct buffer_head *getblk(kdev_t kdev, unsigned long long blocknr,
+ int blocksize)
+{
+ struct buffer_head *bh;
+ int bufsize = sizeof(*bh) + kdev->k_fs->blocksize -
+ sizeof(bh->b_data);
+ errcode_t retval;
+
+ retval = ext2fs_get_memzero(bufsize, &bh);
+ if (retval)
+ return NULL;
+
+ if (journal_enable_debug >= 3)
+ bh_count++;
+ jfs_debug(4, "getblk for block %llu (%d bytes)(total %d)\n",
+ blocknr, blocksize, bh_count);
+
+ bh->b_fs = kdev->k_fs;
+ if (kdev->k_dev == K_DEV_FS)
+ bh->b_io = kdev->k_fs->io;
+ else
+ bh->b_io = kdev->k_fs->journal_io;
+ bh->b_size = blocksize;
+ bh->b_blocknr = blocknr;
+
+ return bh;
+}
+
+int sync_blockdev(kdev_t kdev)
+{
+ io_channel io;
+
+ if (kdev->k_dev == K_DEV_FS)
+ io = kdev->k_fs->io;
+ else
+ io = kdev->k_fs->journal_io;
+
+ return io_channel_flush(io) ? EIO : 0;
+}
+
+void ll_rw_block(int rw, int op_flags EXT2FS_ATTR((unused)), int nr,
+ struct buffer_head *bhp[])
+{
+ errcode_t retval;
+ struct buffer_head *bh;
+
+ for (; nr > 0; --nr) {
+ bh = *bhp++;
+ if (rw == REQ_OP_READ && !bh->b_uptodate) {
+ jfs_debug(3, "reading block %llu/%p\n",
+ bh->b_blocknr, (void *) bh);
+ retval = io_channel_read_blk64(bh->b_io,
+ bh->b_blocknr,
+ 1, bh->b_data);
+ if (retval) {
+ com_err(bh->b_fs->device_name, retval,
+ "while reading block %llu\n",
+ bh->b_blocknr);
+ bh->b_err = (int) retval;
+ continue;
+ }
+ bh->b_uptodate = 1;
+ } else if (rw == REQ_OP_WRITE && bh->b_dirty) {
+ jfs_debug(3, "writing block %llu/%p\n",
+ bh->b_blocknr,
+ (void *) bh);
+ retval = io_channel_write_blk64(bh->b_io,
+ bh->b_blocknr,
+ 1, bh->b_data);
+ if (retval) {
+ com_err(bh->b_fs->device_name, retval,
+ "while writing block %llu\n",
+ bh->b_blocknr);
+ bh->b_err = (int) retval;
+ continue;
+ }
+ bh->b_dirty = 0;
+ bh->b_uptodate = 1;
+ } else {
+ jfs_debug(3, "no-op %s for block %llu\n",
+ rw == REQ_OP_READ ? "read" : "write",
+ bh->b_blocknr);
+ }
+ }
+}
+
+void mark_buffer_dirty(struct buffer_head *bh)
+{
+ bh->b_dirty = 1;
+}
+
+static void mark_buffer_clean(struct buffer_head *bh)
+{
+ bh->b_dirty = 0;
+}
+
+void brelse(struct buffer_head *bh)
+{
+ if (bh->b_dirty)
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &bh);
+ jfs_debug(3, "freeing block %llu/%p (total %d)\n",
+ bh->b_blocknr, (void *) bh, --bh_count);
+ ext2fs_free_mem(&bh);
+}
+
+int buffer_uptodate(struct buffer_head *bh)
+{
+ return bh->b_uptodate;
+}
+
+void mark_buffer_uptodate(struct buffer_head *bh, int val)
+{
+ bh->b_uptodate = val;
+}
+
+void wait_on_buffer(struct buffer_head *bh)
+{
+ if (!bh->b_uptodate)
+ ll_rw_block(REQ_OP_READ, 0, 1, &bh);
+}
+
+
+static void ext2fs_clear_recover(ext2_filsys fs, int error)
+{
+ ext2fs_clear_feature_journal_needs_recovery(fs->super);
+
+ /* if we had an error doing journal recovery, we need a full fsck */
+ if (error)
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ /*
+ * If we replayed the journal by definition the file system
+ * was mounted since the last time it was checked
+ */
+ if (fs->super->s_lastcheck >= fs->super->s_mtime)
+ fs->super->s_lastcheck = fs->super->s_mtime - 1;
+ ext2fs_mark_super_dirty(fs);
+}
+
+/*
+ * This is a helper function to check the validity of the journal.
+ */
+struct process_block_struct {
+ e2_blkcnt_t last_block;
+};
+
+static int process_journal_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ blk64_t blk = *block_nr;
+
+ p = (struct process_block_struct *) priv_data;
+
+ if (!blk || blk < fs->super->s_first_data_block ||
+ blk >= ext2fs_blocks_count(fs->super))
+ return BLOCK_ABORT;
+
+ if (blockcnt >= 0)
+ p->last_block = blockcnt;
+ return 0;
+}
+
+static errcode_t ext2fs_get_journal(ext2_filsys fs, journal_t **ret_journal)
+{
+ struct process_block_struct pb;
+ struct ext2_super_block *sb = fs->super;
+ struct ext2_super_block jsuper;
+ struct buffer_head *bh;
+ struct inode *j_inode = NULL;
+ struct kdev_s *dev_fs = NULL, *dev_journal;
+ const char *journal_name = 0;
+ journal_t *journal = NULL;
+ errcode_t retval = 0;
+ io_manager io_ptr = 0;
+ unsigned long long start = 0;
+ int ext_journal = 0;
+ int tried_backup_jnl = 0;
+
+ retval = ext2fs_get_memzero(sizeof(journal_t), &journal);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_memzero(2 * sizeof(struct kdev_s), &dev_fs);
+ if (retval)
+ goto errout;
+ dev_journal = dev_fs+1;
+
+ dev_fs->k_fs = dev_journal->k_fs = fs;
+ dev_fs->k_dev = K_DEV_FS;
+ dev_journal->k_dev = K_DEV_JOURNAL;
+
+ journal->j_dev = dev_journal;
+ journal->j_fs_dev = dev_fs;
+ journal->j_inode = NULL;
+ journal->j_blocksize = fs->blocksize;
+
+ if (uuid_is_null(sb->s_journal_uuid)) {
+ if (!sb->s_journal_inum) {
+ retval = EXT2_ET_BAD_INODE_NUM;
+ goto errout;
+ }
+ retval = ext2fs_get_memzero(sizeof(*j_inode), &j_inode);
+ if (retval)
+ goto errout;
+
+ j_inode->i_fs = fs;
+ j_inode->i_ino = sb->s_journal_inum;
+
+ retval = ext2fs_read_inode(fs, sb->s_journal_inum,
+ &j_inode->i_ext2);
+ if (retval) {
+try_backup_journal:
+ if (sb->s_jnl_backup_type != EXT3_JNL_BACKUP_BLOCKS ||
+ tried_backup_jnl)
+ goto errout;
+ memset(&j_inode->i_ext2, 0, sizeof(struct ext2_inode));
+ memcpy(&j_inode->i_ext2.i_block[0], sb->s_jnl_blocks,
+ EXT2_N_BLOCKS*4);
+ j_inode->i_ext2.i_size_high = sb->s_jnl_blocks[15];
+ j_inode->i_ext2.i_size = sb->s_jnl_blocks[16];
+ j_inode->i_ext2.i_links_count = 1;
+ j_inode->i_ext2.i_mode = LINUX_S_IFREG | 0600;
+ tried_backup_jnl++;
+ }
+ if (!j_inode->i_ext2.i_links_count ||
+ !LINUX_S_ISREG(j_inode->i_ext2.i_mode)) {
+ retval = EXT2_ET_NO_JOURNAL;
+ goto try_backup_journal;
+ }
+ if (EXT2_I_SIZE(&j_inode->i_ext2) / journal->j_blocksize <
+ JBD2_MIN_JOURNAL_BLOCKS) {
+ retval = EXT2_ET_JOURNAL_TOO_SMALL;
+ goto try_backup_journal;
+ }
+ pb.last_block = -1;
+ retval = ext2fs_block_iterate3(fs, j_inode->i_ino,
+ BLOCK_FLAG_HOLE, 0,
+ process_journal_block, &pb);
+ if ((pb.last_block + 1) * fs->blocksize <
+ (int) EXT2_I_SIZE(&j_inode->i_ext2)) {
+ retval = EXT2_ET_JOURNAL_TOO_SMALL;
+ goto try_backup_journal;
+ }
+ if (tried_backup_jnl && (fs->flags & EXT2_FLAG_RW)) {
+ retval = ext2fs_write_inode(fs, sb->s_journal_inum,
+ &j_inode->i_ext2);
+ if (retval)
+ goto errout;
+ }
+
+ journal->j_total_len = EXT2_I_SIZE(&j_inode->i_ext2) /
+ journal->j_blocksize;
+
+#ifdef USE_INODE_IO
+ retval = ext2fs_inode_io_intern2(fs, sb->s_journal_inum,
+ &j_inode->i_ext2,
+ &journal_name);
+ if (retval)
+ goto errout;
+
+ io_ptr = inode_io_manager;
+#else
+ journal->j_inode = j_inode;
+ fs->journal_io = fs->io;
+ retval = (errcode_t) jbd2_journal_bmap(journal, 0, &start);
+ if (retval)
+ goto errout;
+#endif
+ } else {
+ ext_journal = 1;
+ if (!fs->journal_name) {
+ char uuid[37];
+ blkid_cache blkid;
+
+ blkid_get_cache(&blkid, NULL);
+ uuid_unparse(sb->s_journal_uuid, uuid);
+ fs->journal_name = blkid_get_devname(blkid,
+ "UUID", uuid);
+ if (!fs->journal_name)
+ fs->journal_name = blkid_devno_to_devname(sb->s_journal_dev);
+ blkid_put_cache(blkid);
+ }
+ journal_name = fs->journal_name;
+
+ if (!journal_name) {
+ retval = EXT2_ET_LOAD_EXT_JOURNAL;
+ goto errout;
+ }
+
+ jfs_debug(1, "Using journal file %s\n", journal_name);
+ io_ptr = unix_io_manager;
+ }
+
+#if 0
+ test_io_backing_manager = io_ptr;
+ io_ptr = test_io_manager;
+#endif
+#ifndef USE_INODE_IO
+ if (ext_journal)
+#endif
+ {
+ retval = io_ptr->open(journal_name, fs->flags & EXT2_FLAG_RW,
+ &fs->journal_io);
+ }
+ if (retval)
+ goto errout;
+
+ io_channel_set_blksize(fs->journal_io, fs->blocksize);
+
+ if (ext_journal) {
+ blk64_t maxlen;
+
+ start = ext2fs_journal_sb_start(fs->blocksize) - 1;
+ bh = getblk(dev_journal, start, fs->blocksize);
+ if (!bh) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto errout;
+ }
+ ll_rw_block(REQ_OP_READ, 0, 1, &bh);
+ retval = bh->b_err;
+ if (retval) {
+ brelse(bh);
+ goto errout;
+ }
+ memcpy(&jsuper, start ? bh->b_data :
+ bh->b_data + SUPERBLOCK_OFFSET,
+ sizeof(jsuper));
+#ifdef WORDS_BIGENDIAN
+ if (jsuper.s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC))
+ ext2fs_swap_super(&jsuper);
+#endif
+ if (jsuper.s_magic != EXT2_SUPER_MAGIC ||
+ !ext2fs_has_feature_journal_dev(&jsuper)) {
+ retval = EXT2_ET_LOAD_EXT_JOURNAL;
+ brelse(bh);
+ goto errout;
+ }
+ /* Make sure the journal UUID is correct */
+ if (memcmp(jsuper.s_uuid, fs->super->s_journal_uuid,
+ sizeof(jsuper.s_uuid))) {
+ retval = EXT2_ET_LOAD_EXT_JOURNAL;
+ brelse(bh);
+ goto errout;
+ }
+
+ /* Check the superblock checksum */
+ if (ext2fs_has_feature_metadata_csum(&jsuper)) {
+ struct struct_ext2_filsys fsx;
+ struct ext2_super_block superx;
+ void *p;
+
+ p = start ? bh->b_data : bh->b_data + SUPERBLOCK_OFFSET;
+ memcpy(&fsx, fs, sizeof(fsx));
+ memcpy(&superx, fs->super, sizeof(superx));
+ fsx.super = &superx;
+ ext2fs_set_feature_metadata_csum(fsx.super);
+ if (!ext2fs_superblock_csum_verify(&fsx, p)) {
+ retval = EXT2_ET_LOAD_EXT_JOURNAL;
+ brelse(bh);
+ goto errout;
+ }
+ }
+ brelse(bh);
+
+ maxlen = ext2fs_blocks_count(&jsuper);
+ journal->j_total_len = (maxlen < 1ULL << 32) ? maxlen :
+ (1ULL << 32) - 1;
+ start++;
+ }
+
+ bh = getblk(dev_journal, start, journal->j_blocksize);
+ if (!bh) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto errout;
+ }
+
+ journal->j_sb_buffer = bh;
+ journal->j_superblock = (journal_superblock_t *)bh->b_data;
+
+#ifdef USE_INODE_IO
+ if (j_inode)
+ ext2fs_free_mem(&j_inode);
+#endif
+
+ *ret_journal = journal;
+ return 0;
+
+errout:
+ if (dev_fs)
+ ext2fs_free_mem(&dev_fs);
+ if (j_inode)
+ ext2fs_free_mem(&j_inode);
+ if (journal)
+ ext2fs_free_mem(&journal);
+ return retval;
+}
+
+static errcode_t ext2fs_journal_fix_bad_inode(ext2_filsys fs)
+{
+ struct ext2_super_block *sb = fs->super;
+ int recover = ext2fs_has_feature_journal_needs_recovery(fs->super);
+ int has_journal = ext2fs_has_feature_journal(fs->super);
+
+ if (has_journal || sb->s_journal_inum) {
+ /* The journal inode is bogus, remove and force full fsck */
+ return EXT2_ET_BAD_INODE_NUM;
+ } else if (recover) {
+ return EXT2_ET_UNSUPP_FEATURE;
+ }
+ return 0;
+}
+
+#define V1_SB_SIZE 0x0024
+static void clear_v2_journal_fields(journal_t *journal)
+{
+ ext2_filsys fs = journal->j_dev->k_fs;
+
+ memset(((char *) journal->j_superblock) + V1_SB_SIZE, 0,
+ fs->blocksize-V1_SB_SIZE);
+ mark_buffer_dirty(journal->j_sb_buffer);
+}
+
+
+static errcode_t ext2fs_journal_load(journal_t *journal)
+{
+ ext2_filsys fs = journal->j_dev->k_fs;
+ journal_superblock_t *jsb;
+ struct buffer_head *jbh = journal->j_sb_buffer;
+
+ ll_rw_block(REQ_OP_READ, 0, 1, &jbh);
+ if (jbh->b_err)
+ return jbh->b_err;
+
+ jsb = journal->j_superblock;
+ /* If we don't even have JBD2_MAGIC, we probably have a wrong inode */
+ if (jsb->s_header.h_magic != htonl(JBD2_MAGIC_NUMBER))
+ return ext2fs_journal_fix_bad_inode(fs);
+
+ switch (ntohl(jsb->s_header.h_blocktype)) {
+ case JBD2_SUPERBLOCK_V1:
+ journal->j_format_version = 1;
+ if (jsb->s_feature_compat ||
+ jsb->s_feature_incompat ||
+ jsb->s_feature_ro_compat ||
+ jsb->s_nr_users)
+ clear_v2_journal_fields(journal);
+ break;
+
+ case JBD2_SUPERBLOCK_V2:
+ journal->j_format_version = 2;
+ if (ntohl(jsb->s_nr_users) > 1 &&
+ uuid_is_null(fs->super->s_journal_uuid))
+ clear_v2_journal_fields(journal);
+ if (ntohl(jsb->s_nr_users) > 1)
+ return EXT2_ET_JOURNAL_UNSUPP_VERSION;
+ break;
+
+ /*
+ * These should never appear in a journal super block, so if
+ * they do, the journal is badly corrupted.
+ */
+ case JBD2_DESCRIPTOR_BLOCK:
+ case JBD2_COMMIT_BLOCK:
+ case JBD2_REVOKE_BLOCK:
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ /* If we don't understand the superblock major type, but there
+ * is a magic number, then it is likely to be a new format we
+ * just don't understand, so leave it alone. */
+ default:
+ return EXT2_ET_JOURNAL_UNSUPP_VERSION;
+ }
+
+ if (JBD2_HAS_INCOMPAT_FEATURE(journal, ~JBD2_KNOWN_INCOMPAT_FEATURES))
+ return EXT2_ET_UNSUPP_FEATURE;
+
+ if (JBD2_HAS_RO_COMPAT_FEATURE(journal, ~JBD2_KNOWN_ROCOMPAT_FEATURES))
+ return EXT2_ET_RO_UNSUPP_FEATURE;
+
+ /* Checksum v1-3 are mutually exclusive features. */
+ if (jbd2_has_feature_csum2(journal) && jbd2_has_feature_csum3(journal))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ if (jbd2_journal_has_csum_v2or3(journal) &&
+ jbd2_has_feature_checksum(journal))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ if (!ext2fs_journal_verify_csum_type(journal, jsb) ||
+ !ext2fs_journal_sb_csum_verify(journal, jsb))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ if (jbd2_journal_has_csum_v2or3(journal))
+ journal->j_csum_seed = jbd2_chksum(journal, ~0, jsb->s_uuid,
+ sizeof(jsb->s_uuid));
+
+ /* We have now checked whether we know enough about the journal
+ * format to be able to proceed safely, so any other checks that
+ * fail we should attempt to recover from. */
+ if (jsb->s_blocksize != htonl(journal->j_blocksize))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ if (ntohl(jsb->s_maxlen) < journal->j_total_len)
+ journal->j_total_len = ntohl(jsb->s_maxlen);
+ else if (ntohl(jsb->s_maxlen) > journal->j_total_len)
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ journal->j_tail_sequence = ntohl(jsb->s_sequence);
+ journal->j_transaction_sequence = journal->j_tail_sequence;
+ journal->j_tail = ntohl(jsb->s_start);
+ journal->j_first = ntohl(jsb->s_first);
+ journal->j_last = ntohl(jsb->s_maxlen);
+
+ return 0;
+}
+
+static void ext2fs_journal_release(ext2_filsys fs, journal_t *journal,
+ int reset, int drop)
+{
+ journal_superblock_t *jsb;
+
+ if (drop)
+ mark_buffer_clean(journal->j_sb_buffer);
+ else if (fs->flags & EXT2_FLAG_RW) {
+ jsb = journal->j_superblock;
+ jsb->s_sequence = htonl(journal->j_tail_sequence);
+ if (reset)
+ jsb->s_start = 0; /* this marks the journal as empty */
+ ext2fs_journal_sb_csum_set(journal, jsb);
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+ brelse(journal->j_sb_buffer);
+
+ if (fs && fs->journal_io) {
+ if (fs->io != fs->journal_io)
+ io_channel_close(fs->journal_io);
+ fs->journal_io = NULL;
+ free(fs->journal_name);
+ fs->journal_name = NULL;
+ }
+
+#ifndef USE_INODE_IO
+ if (journal->j_inode)
+ ext2fs_free_mem(&journal->j_inode);
+#endif
+ if (journal->j_fs_dev)
+ ext2fs_free_mem(&journal->j_fs_dev);
+ ext2fs_free_mem(&journal);
+}
+
+/*
+ * This function makes sure that the superblock fields regarding the
+ * journal are consistent.
+ */
+static errcode_t ext2fs_check_ext3_journal(ext2_filsys fs)
+{
+ struct ext2_super_block *sb = fs->super;
+ journal_t *journal;
+ int recover = ext2fs_has_feature_journal_needs_recovery(fs->super);
+ errcode_t retval;
+
+ /* If we don't have any journal features, don't do anything more */
+ if (!ext2fs_has_feature_journal(sb) &&
+ !recover && sb->s_journal_inum == 0 && sb->s_journal_dev == 0 &&
+ uuid_is_null(sb->s_journal_uuid))
+ return 0;
+
+ retval = ext2fs_get_journal(fs, &journal);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_journal_load(journal);
+ if (retval)
+ goto err;
+
+ /*
+ * We want to make the flags consistent here. We will not leave with
+ * needs_recovery set but has_journal clear. We can't get in a loop
+ * with -y, -n, or -p, only if a user isn't making up their mind.
+ */
+ if (!ext2fs_has_feature_journal(sb)) {
+ retval = EXT2_ET_JOURNAL_FLAGS_WRONG;
+ goto err;
+ }
+
+ if (ext2fs_has_feature_journal(sb) &&
+ !ext2fs_has_feature_journal_needs_recovery(sb) &&
+ journal->j_superblock->s_start != 0) {
+ retval = EXT2_ET_JOURNAL_FLAGS_WRONG;
+ goto err;
+ }
+
+ /*
+ * If we don't need to do replay the journal, check to see if
+ * the journal's errno is set; if so, we need to mark the file
+ * system as being corrupt and clear the journal's s_errno.
+ */
+ if (!ext2fs_has_feature_journal_needs_recovery(sb) &&
+ journal->j_superblock->s_errno) {
+ fs->super->s_state |= EXT2_ERROR_FS;
+ ext2fs_mark_super_dirty(fs);
+ journal->j_superblock->s_errno = 0;
+ ext2fs_journal_sb_csum_set(journal, journal->j_superblock);
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+
+err:
+ ext2fs_journal_release(fs, journal, 0, retval ? 1 : 0);
+ return retval;
+}
+
+static errcode_t recover_ext3_journal(ext2_filsys fs)
+{
+ journal_t *journal;
+ errcode_t retval;
+
+ retval = jbd2_journal_init_revoke_record_cache();
+ if (retval)
+ return retval;
+
+ retval = jbd2_journal_init_revoke_table_cache();
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_journal(fs, &journal);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_journal_load(journal);
+ if (retval)
+ goto errout;
+
+ retval = jbd2_journal_init_revoke(journal, 1024);
+ if (retval)
+ goto errout;
+
+ retval = -jbd2_journal_recover(journal);
+ if (retval)
+ goto errout;
+
+ if (journal->j_failed_commit) {
+ journal->j_superblock->s_errno = -EINVAL;
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+
+ journal->j_tail_sequence = journal->j_transaction_sequence;
+
+errout:
+ jbd2_journal_destroy_revoke(journal);
+ jbd2_journal_destroy_revoke_record_cache();
+ jbd2_journal_destroy_revoke_table_cache();
+ ext2fs_journal_release(fs, journal, 1, 0);
+ return retval;
+}
+
+errcode_t ext2fs_run_ext3_journal(ext2_filsys *fsp)
+{
+ ext2_filsys fs = *fsp;
+ io_manager io_ptr = fs->io->manager;
+ errcode_t retval, recover_retval;
+ io_stats stats = 0;
+ unsigned long long kbytes_written = 0;
+ char *fsname;
+ int fsflags;
+ int fsblocksize;
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_FILE_RO;
+
+ if (fs->flags & EXT2_FLAG_DIRTY)
+ ext2fs_flush(fs); /* Force out any modifications */
+
+ recover_retval = recover_ext3_journal(fs);
+
+ /*
+ * Reload the filesystem context to get up-to-date data from disk
+ * because journal recovery will change the filesystem under us.
+ */
+ if (fs->super->s_kbytes_written &&
+ fs->io->manager->get_stats)
+ fs->io->manager->get_stats(fs->io, &stats);
+ if (stats && stats->bytes_written)
+ kbytes_written = stats->bytes_written >> 10;
+
+ ext2fs_mmp_stop(fs);
+ fsname = fs->device_name;
+ fs->device_name = NULL;
+ fsflags = fs->flags;
+ fsblocksize = fs->blocksize;
+ ext2fs_free(fs);
+ *fsp = NULL;
+ retval = ext2fs_open(fsname, fsflags, 0, fsblocksize, io_ptr, fsp);
+ ext2fs_free_mem(&fsname);
+ if (retval)
+ return retval;
+
+ fs = *fsp;
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+ fs->super->s_kbytes_written += kbytes_written;
+
+ /* Set the superblock flags */
+ ext2fs_clear_recover(fs, recover_retval != 0);
+
+ /*
+ * Do one last sanity check, and propagate journal->s_errno to
+ * the EXT2_ERROR_FS flag in the fs superblock if needed.
+ */
+ retval = ext2fs_check_ext3_journal(fs);
+ return retval ? retval : recover_retval;
+}
+
+errcode_t ext2fs_open_journal(ext2_filsys fs, journal_t **j)
+{
+ journal_t *journal;
+ errcode_t retval;
+
+ retval = jbd2_journal_init_revoke_record_cache();
+ if (retval)
+ return retval;
+
+ retval = jbd2_journal_init_revoke_table_cache();
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_journal(fs, &journal);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_journal_load(journal);
+ if (retval)
+ goto errout;
+
+ retval = jbd2_journal_init_revoke(journal, 1024);
+ if (retval)
+ goto errout;
+
+ if (journal->j_failed_commit) {
+ journal->j_superblock->s_errno = -EINVAL;
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+
+ *j = journal;
+ return 0;
+
+errout:
+ jbd2_journal_destroy_revoke(journal);
+ jbd2_journal_destroy_revoke_record_cache();
+ jbd2_journal_destroy_revoke_table_cache();
+ ext2fs_journal_release(fs, journal, 1, 0);
+ return retval;
+}
+
+errcode_t ext2fs_close_journal(ext2_filsys fs, journal_t **j)
+{
+ journal_t *journal = *j;
+
+ jbd2_journal_destroy_revoke(journal);
+ jbd2_journal_destroy_revoke_record_cache();
+ jbd2_journal_destroy_revoke_table_cache();
+ ext2fs_journal_release(fs, journal, 0, 0);
+ *j = NULL;
+
+ return 0;
+}
+
+void jbd2_commit_block_csum_set(journal_t *j, struct buffer_head *bh)
+{
+ struct commit_header *h;
+ __u32 csum;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return;
+
+ h = (struct commit_header *)(bh->b_data);
+ h->h_chksum_type = 0;
+ h->h_chksum_size = 0;
+ h->h_chksum[0] = 0;
+ csum = jbd2_chksum(j, j->j_csum_seed, bh->b_data, j->j_blocksize);
+ h->h_chksum[0] = ext2fs_cpu_to_be32(csum);
+}
+
+void jbd2_revoke_csum_set(journal_t *j, struct buffer_head *bh)
+{
+ jbd2_descr_block_csum_set(j, bh);
+}
+
+void jbd2_descr_block_csum_set(journal_t *j, struct buffer_head *bh)
+{
+ struct jbd2_journal_block_tail *tail;
+ __u32 csum;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return;
+
+ tail = (struct jbd2_journal_block_tail *)(bh->b_data + j->j_blocksize -
+ sizeof(struct jbd2_journal_block_tail));
+ tail->t_checksum = 0;
+ csum = jbd2_chksum(j, j->j_csum_seed, bh->b_data, j->j_blocksize);
+ tail->t_checksum = ext2fs_cpu_to_be32(csum);
+}
+
+void jbd2_block_tag_csum_set(journal_t *j, journal_block_tag_t *tag,
+ struct buffer_head *bh, __u32 sequence)
+{
+ journal_block_tag3_t *tag3 = (journal_block_tag3_t *)tag;
+ __u32 csum32;
+ __be32 seq;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return;
+
+ seq = ext2fs_cpu_to_be32(sequence);
+ csum32 = jbd2_chksum(j, j->j_csum_seed, (__u8 *)&seq, sizeof(seq));
+ csum32 = jbd2_chksum(j, csum32, bh->b_data, bh->b_size);
+
+ if (jbd2_has_feature_csum3(j))
+ tag3->t_checksum = ext2fs_cpu_to_be32(csum32);
+ else
+ tag->t_checksum = ext2fs_cpu_to_be16(csum32);
+}
+
diff --git a/debugfs/journal.h b/debugfs/journal.h
new file mode 100644
index 0000000..10b638e
--- /dev/null
+++ b/debugfs/journal.h
@@ -0,0 +1,25 @@
+/*
+ * journal.h
+ *
+ * Copyright (C) 2000 Andreas Dilger
+ * Copyright (C) 2000 Theodore Ts'o
+ *
+ * Parts of the code are based on fs/jfs/journal.c by Stephen C. Tweedie
+ * Copyright (C) 1999 Red Hat Software
+ *
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2 or at your discretion
+ * any later version.
+ */
+
+#include "jfs_user.h"
+
+/* journal.c */
+errcode_t ext2fs_open_journal(ext2_filsys fs, journal_t **j);
+errcode_t ext2fs_close_journal(ext2_filsys fs, journal_t **j);
+errcode_t ext2fs_run_ext3_journal(ext2_filsys *fs);
+void jbd2_commit_block_csum_set(journal_t *j, struct buffer_head *bh);
+void jbd2_revoke_csum_set(journal_t *j, struct buffer_head *bh);
+void jbd2_descr_block_csum_set(journal_t *j, struct buffer_head *bh);
+void jbd2_block_tag_csum_set(journal_t *j, journal_block_tag_t *tag,
+ struct buffer_head *bh, __u32 sequence);
diff --git a/debugfs/logdump.c b/debugfs/logdump.c
new file mode 100644
index 0000000..b600228
--- /dev/null
+++ b/debugfs/logdump.c
@@ -0,0 +1,933 @@
+/*
+ * logdump.c --- dump the contents of the journal out to a file
+ *
+ * Author: Stephen C. Tweedie, 2001 <sct@redhat.com>
+ * Copyright (C) 2001 Red Hat, Inc.
+ * Based on portions Copyright (C) 1994 Theodore Ts'o.
+ *
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <utime.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+#include "blkid/blkid.h"
+#include "jfs_user.h"
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+#include "ext2fs/fast_commit.h"
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+#include <uuid/uuid.h>
+
+enum journal_location {JOURNAL_IS_INTERNAL, JOURNAL_IS_EXTERNAL};
+
+#define ANY_BLOCK ((blk64_t) -1)
+
+static int dump_all, dump_super, dump_old, dump_contents, dump_descriptors;
+static int64_t dump_counts;
+static blk64_t block_to_dump, bitmap_to_dump, inode_block_to_dump;
+static unsigned int group_to_dump, inode_offset_to_dump;
+static ext2_ino_t inode_to_dump;
+
+struct journal_source
+{
+ enum journal_location where;
+ int fd;
+ ext2_file_t file;
+};
+
+static void dump_journal(char *, FILE *, struct journal_source *);
+
+static void dump_descriptor_block(FILE *, struct journal_source *,
+ char *, journal_superblock_t *,
+ unsigned int *, unsigned int, __u32, tid_t);
+
+static void dump_revoke_block(FILE *, char *, journal_superblock_t *,
+ unsigned int, unsigned int, tid_t);
+
+static void dump_metadata_block(FILE *, struct journal_source *,
+ journal_superblock_t*,
+ unsigned int, unsigned int, unsigned int,
+ unsigned int, tid_t);
+
+static void dump_fc_block(FILE *out_file, char *buf, int blocksize,
+ tid_t transaction, int *fc_done);
+
+static void do_hexdump (FILE *, char *, int);
+
+#define WRAP(jsb, blocknr, maxlen) \
+ if (blocknr >= (maxlen)) \
+ blocknr -= (maxlen - be32_to_cpu((jsb)->s_first));
+
+void do_logdump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int c;
+ int retval;
+ char *out_fn;
+ FILE *out_file;
+
+ char *inode_spec = NULL;
+ char *journal_fn = NULL;
+ int journal_fd = -1;
+ int use_sb = 0;
+ ext2_ino_t journal_inum;
+ struct ext2_inode journal_inode;
+ ext2_file_t journal_file = NULL;
+ char *tmp;
+ struct journal_source journal_source;
+ struct ext2_super_block *es = NULL;
+
+ journal_source.where = JOURNAL_IS_INTERNAL;
+ journal_source.fd = 0;
+ journal_source.file = 0;
+ dump_all = 0;
+ dump_old = 0;
+ dump_contents = 0;
+ dump_super = 0;
+ dump_descriptors = 1;
+ block_to_dump = ANY_BLOCK;
+ bitmap_to_dump = -1;
+ inode_block_to_dump = ANY_BLOCK;
+ inode_to_dump = -1;
+ dump_counts = -1;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "ab:ci:f:OsSn:")) != EOF) {
+ switch (c) {
+ case 'a':
+ dump_all++;
+ break;
+ case 'b':
+ block_to_dump = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(argv[0], 0,
+ "Bad block number - %s", optarg);
+ return;
+ }
+ dump_descriptors = 0;
+ break;
+ case 'c':
+ dump_contents++;
+ break;
+ case 'f':
+ journal_fn = optarg;
+ break;
+ case 'i':
+ inode_spec = optarg;
+ dump_descriptors = 0;
+ break;
+ case 'O':
+ dump_old++;
+ break;
+ case 's':
+ use_sb++;
+ break;
+ case 'S':
+ dump_super++;
+ break;
+ case 'n':
+ dump_counts = strtol(optarg, &tmp, 10);
+ if (*tmp) {
+ com_err(argv[0], 0,
+ "Bad log counts number - %s", optarg);
+ return;
+ }
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+ if (optind != argc && optind != argc-1) {
+ goto print_usage;
+ }
+
+ if (inode_spec) {
+ int inode_group, group_offset, inodes_per_block;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ inode_to_dump = string_to_inode(inode_spec);
+ if (!inode_to_dump)
+ return;
+
+ es = current_fs->super;
+ inode_group = ((inode_to_dump - 1)
+ / es->s_inodes_per_group);
+ group_offset = ((inode_to_dump - 1)
+ % es->s_inodes_per_group);
+ inodes_per_block = (current_fs->blocksize
+ / sizeof(struct ext2_inode));
+
+ inode_block_to_dump =
+ ext2fs_inode_table_loc(current_fs, inode_group) +
+ (group_offset / inodes_per_block);
+ inode_offset_to_dump = ((group_offset % inodes_per_block)
+ * sizeof(struct ext2_inode));
+ printf("Inode %u is at group %u, block %llu, offset %u\n",
+ inode_to_dump, inode_group,
+ (unsigned long long) inode_block_to_dump,
+ inode_offset_to_dump);
+ }
+
+ if (optind == argc) {
+ out_file = stdout;
+ } else {
+ out_fn = argv[optind];
+ out_file = fopen(out_fn, "w");
+ if (!out_file) {
+ com_err(argv[0], errno, "while opening %s for logdump",
+ out_fn);
+ goto cleanup;
+ }
+ }
+
+ if (block_to_dump != ANY_BLOCK) {
+ if (check_fs_open(argv[0]))
+ goto cleanup;
+ es = current_fs->super;
+ group_to_dump = ((block_to_dump -
+ es->s_first_data_block)
+ / es->s_blocks_per_group);
+ bitmap_to_dump = ext2fs_block_bitmap_loc(current_fs, group_to_dump);
+ }
+
+ if (journal_fn) {
+ /* Set up to read journal from a regular file somewhere */
+ journal_fd = open(journal_fn, O_RDONLY, 0);
+ if (journal_fd < 0) {
+ com_err(argv[0], errno, "while opening %s for logdump",
+ journal_fn);
+ goto cleanup;
+ }
+ journal_source.where = JOURNAL_IS_EXTERNAL;
+ journal_source.fd = journal_fd;
+ dump_journal(argv[0], out_file, &journal_source);
+ goto cleanup;
+
+ }
+ if (check_fs_open(argv[0]))
+ goto cleanup;
+ es = current_fs->super;
+
+ if ((journal_inum = es->s_journal_inum)) {
+ if (use_sb) {
+ if (es->s_jnl_backup_type != EXT3_JNL_BACKUP_BLOCKS) {
+ com_err(argv[0], 0,
+ "no journal backup in super block\n");
+ goto cleanup;
+ }
+ memset(&journal_inode, 0, sizeof(struct ext2_inode));
+ memcpy(&journal_inode.i_block[0], es->s_jnl_blocks,
+ EXT2_N_BLOCKS*4);
+ journal_inode.i_size_high = es->s_jnl_blocks[15];
+ journal_inode.i_size = es->s_jnl_blocks[16];
+ journal_inode.i_links_count = 1;
+ journal_inode.i_mode = LINUX_S_IFREG | 0600;
+ } else {
+ if (debugfs_read_inode(journal_inum, &journal_inode,
+ argv[0]))
+ goto cleanup;
+ }
+
+ retval = ext2fs_file_open2(current_fs, journal_inum,
+ &journal_inode, 0, &journal_file);
+ if (retval) {
+ com_err(argv[0], retval, "while opening ext2 file");
+ goto cleanup;
+ }
+ journal_source.where = JOURNAL_IS_INTERNAL;
+ journal_source.file = journal_file;
+ } else {
+ char uuid[37];
+
+ uuid_unparse(es->s_journal_uuid, uuid);
+ journal_fn = blkid_get_devname(NULL, "UUID", uuid);
+ if (!journal_fn)
+ journal_fn = blkid_devno_to_devname(es->s_journal_dev);
+ if (!journal_fn) {
+ com_err(argv[0], 0, "filesystem has no journal");
+ goto cleanup;
+ }
+ journal_fd = open(journal_fn, O_RDONLY, 0);
+ if (journal_fd < 0) {
+ com_err(argv[0], errno, "while opening %s for logdump",
+ journal_fn);
+ free(journal_fn);
+ goto cleanup;
+ }
+ fprintf(out_file, "Using external journal found at %s\n",
+ journal_fn);
+ free(journal_fn);
+ journal_source.where = JOURNAL_IS_EXTERNAL;
+ journal_source.fd = journal_fd;
+ }
+ dump_journal(argv[0], out_file, &journal_source);
+cleanup:
+ if (journal_fd >= 0)
+ close(journal_fd);
+ if (journal_file)
+ ext2fs_file_close(journal_file);
+ if (out_file && (out_file != stdout))
+ fclose(out_file);
+
+ return;
+
+print_usage:
+ fprintf(stderr, "%s: Usage: logdump [-acsOS] [-n<num_trans>] [-b<block>] [-i<filespec>]\n\t"
+ "[-f<journal_file>] [output_file]\n", argv[0]);
+}
+
+
+static int read_journal_block(const char *cmd, struct journal_source *source,
+ ext2_loff_t offset, char *buf, unsigned int size)
+{
+ int retval;
+ unsigned int got;
+
+ if (source->where == JOURNAL_IS_EXTERNAL) {
+ if (lseek(source->fd, offset, SEEK_SET) < 0) {
+ retval = errno;
+ goto seek_err;
+ }
+ retval = read(source->fd, buf, size);
+ if (retval < 0) {
+ retval = errno;
+ goto read_err;
+ }
+ got = retval;
+ retval = 0;
+ } else {
+ retval = ext2fs_file_llseek(source->file, offset,
+ EXT2_SEEK_SET, NULL);
+ if (retval) {
+ seek_err:
+ com_err(cmd, retval, "while seeking in reading journal");
+ return retval;
+ }
+ retval = ext2fs_file_read(source->file, buf, size, &got);
+ if (retval) {
+ read_err:
+ com_err(cmd, retval, "while reading journal");
+ return retval;
+ }
+ }
+ if (got != size) {
+ com_err(cmd, 0, "short read (read %u, expected %u) "
+ "while reading journal", got, size);
+ retval = -1;
+ }
+ return retval;
+}
+
+static const char *type_to_name(int btype)
+{
+ switch (btype) {
+ case JBD2_DESCRIPTOR_BLOCK:
+ return "descriptor block";
+ case JBD2_COMMIT_BLOCK:
+ return "commit block";
+ case JBD2_SUPERBLOCK_V1:
+ return "V1 superblock";
+ case JBD2_SUPERBLOCK_V2:
+ return "V2 superblock";
+ case JBD2_REVOKE_BLOCK:
+ return "revoke table";
+ }
+ return "unrecognised type";
+}
+
+
+static void dump_journal(char *cmdname, FILE *out_file,
+ struct journal_source *source)
+{
+ struct ext2_super_block *sb;
+ char jsb_buffer[1024];
+ char buf[EXT2_MAX_BLOCK_SIZE];
+ journal_superblock_t *jsb;
+ unsigned int blocksize = 1024;
+ int retval;
+ __u32 magic, sequence, blocktype;
+ journal_header_t *header;
+ tid_t transaction;
+ unsigned int blocknr = 0;
+ unsigned int first_transaction_blocknr;
+ int fc_done;
+ __u64 total_len;
+ __u32 maxlen;
+ int64_t cur_counts = 0;
+ bool exist_no_magic = false;
+
+ /* First, check to see if there's an ext2 superblock header */
+ retval = read_journal_block(cmdname, source, 0, buf, 2048);
+ if (retval)
+ return;
+
+ jsb = (journal_superblock_t *) buf;
+ sb = (struct ext2_super_block *) (buf+1024);
+#ifdef WORDS_BIGENDIAN
+ if (sb->s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC))
+ ext2fs_swap_super(sb);
+#endif
+
+ if ((be32_to_cpu(jsb->s_header.h_magic) != JBD2_MAGIC_NUMBER) &&
+ (sb->s_magic == EXT2_SUPER_MAGIC) &&
+ ext2fs_has_feature_journal_dev(sb)) {
+ blocksize = EXT2_BLOCK_SIZE(sb);
+ blocknr = (blocksize == 1024) ? 2 : 1;
+ uuid_unparse(sb->s_uuid, jsb_buffer);
+ fprintf(out_file, "Ext2 superblock header found.\n");
+ if (dump_all) {
+ fprintf(out_file, "\tuuid=%s\n", jsb_buffer);
+ fprintf(out_file, "\tblocksize=%d\n", blocksize);
+ fprintf(out_file, "\tjournal data size %lu\n",
+ (unsigned long) ext2fs_blocks_count(sb));
+ }
+ }
+
+ /* Next, read the journal superblock */
+ retval = read_journal_block(cmdname, source,
+ ((ext2_loff_t) blocknr) * blocksize,
+ jsb_buffer, 1024);
+ if (retval)
+ return;
+
+ if (dump_super) {
+ e2p_list_journal_super(out_file, jsb_buffer,
+ current_fs->blocksize, 0);
+ fputc('\n', out_file);
+ }
+
+ jsb = (journal_superblock_t *) jsb_buffer;
+ if (be32_to_cpu(jsb->s_header.h_magic) != JBD2_MAGIC_NUMBER) {
+ fprintf(out_file,
+ "Journal superblock magic number invalid!\n");
+ return;
+ }
+ blocksize = be32_to_cpu(jsb->s_blocksize);
+ if ((current_fs && (blocksize != current_fs->blocksize)) ||
+ (!current_fs && (!blocksize || (blocksize & (blocksize - 1)) ||
+ (blocksize > EXT2_MAX_BLOCK_SIZE)))) {
+ fprintf(out_file,
+ "Journal block size invalid: %u (%u)\n",
+ be32_to_cpu(jsb->s_blocksize), blocksize);
+ return;
+ }
+ transaction = be32_to_cpu(jsb->s_sequence);
+ blocknr = be32_to_cpu(jsb->s_start);
+ if (source->where == JOURNAL_IS_INTERNAL) {
+ retval = ext2fs_file_get_lsize(source->file, &total_len);
+ if (retval) {
+ stat_err:
+ com_err("dump_journal", retval,
+ "while getting journal inode size");
+ return;
+ }
+ total_len /= blocksize;
+ } else {
+ struct stat st;
+
+ if (fstat(source->fd, &st) < 0)
+ goto stat_err;
+ total_len = st.st_size / blocksize;
+ }
+ maxlen = be32_to_cpu(jsb->s_maxlen);
+ if (maxlen > total_len)
+ maxlen = total_len;
+
+ fprintf(out_file, "Journal starts at block %u, transaction %u\n",
+ blocknr, transaction);
+
+ if (!blocknr) {
+ /* Empty journal, nothing to do. */
+ if (!dump_old)
+ goto fc;
+ else
+ blocknr = 1;
+ }
+
+ first_transaction_blocknr = blocknr;
+
+ while (1) {
+ if (dump_old && (dump_counts != -1) && (cur_counts >= dump_counts))
+ break;
+
+ if ((blocknr == first_transaction_blocknr) &&
+ (cur_counts != 0) && dump_old && (dump_counts != -1)) {
+ fprintf(out_file, "Dump all %lld journal records.\n",
+ (long long) cur_counts);
+ break;
+ }
+
+ retval = read_journal_block(cmdname, source,
+ ((ext2_loff_t) blocknr) * blocksize,
+ buf, blocksize);
+ if (retval)
+ break;
+
+ header = (journal_header_t *) buf;
+
+ magic = be32_to_cpu(header->h_magic);
+ sequence = be32_to_cpu(header->h_sequence);
+ blocktype = be32_to_cpu(header->h_blocktype);
+
+ if (magic != JBD2_MAGIC_NUMBER) {
+ if (exist_no_magic == false) {
+ exist_no_magic = true;
+ fprintf(out_file, "No magic number at block %u: "
+ "end of journal.\n", blocknr);
+ }
+ if (dump_old && (dump_counts != -1)) {
+ blocknr++;
+ WRAP(jsb, blocknr, maxlen);
+ continue;
+ }
+ break;
+ }
+
+ if (sequence != transaction) {
+ fprintf (out_file, "Found sequence %u (not %u) at "
+ "block %u: end of journal.\n",
+ sequence, transaction, blocknr);
+ if (!dump_old)
+ break;
+ }
+
+ if (dump_descriptors) {
+ fprintf (out_file, "Found expected sequence %u, "
+ "type %u (%s) at block %u\n",
+ sequence, blocktype,
+ type_to_name(blocktype), blocknr);
+ }
+
+ switch (blocktype) {
+ case JBD2_DESCRIPTOR_BLOCK:
+ dump_descriptor_block(out_file, source, buf, jsb,
+ &blocknr, blocksize, maxlen,
+ transaction);
+ continue;
+
+ case JBD2_COMMIT_BLOCK:
+ cur_counts++;
+ transaction++;
+ blocknr++;
+ WRAP(jsb, blocknr, maxlen);
+ continue;
+
+ case JBD2_REVOKE_BLOCK:
+ dump_revoke_block(out_file, buf, jsb,
+ blocknr, blocksize,
+ transaction);
+ blocknr++;
+ WRAP(jsb, blocknr, maxlen);
+ continue;
+
+ default:
+ fprintf (out_file, "Unexpected block type %u at "
+ "block %u.\n", blocktype, blocknr);
+ break;
+ }
+ }
+
+fc:
+ blocknr = maxlen - jbd2_journal_get_num_fc_blks(jsb) + 1;
+ while (blocknr <= maxlen) {
+ retval = read_journal_block(cmdname, source,
+ ((ext2_loff_t) blocknr) * blocksize,
+ buf, blocksize);
+ if (retval)
+ return;
+
+ dump_fc_block(out_file, buf, blocksize, transaction, &fc_done);
+ if (!dump_old && fc_done)
+ break;
+ blocknr++;
+ }
+}
+
+static inline size_t journal_super_tag_bytes(journal_superblock_t *jsb)
+{
+ size_t sz;
+
+ if (JSB_HAS_INCOMPAT_FEATURE(jsb, JBD2_FEATURE_INCOMPAT_CSUM_V3))
+ return sizeof(journal_block_tag3_t);
+
+ sz = sizeof(journal_block_tag_t);
+
+ if (JSB_HAS_INCOMPAT_FEATURE(jsb, JBD2_FEATURE_INCOMPAT_CSUM_V2))
+ sz += sizeof(__u16);
+
+ if (JSB_HAS_INCOMPAT_FEATURE(jsb, JBD2_FEATURE_INCOMPAT_64BIT))
+ return sz;
+
+ return sz - sizeof(__u32);
+}
+
+static void dump_fc_block(FILE *out_file, char *buf, int blocksize,
+ tid_t transaction, int *fc_done)
+{
+ struct ext4_fc_tl tl;
+ struct ext4_fc_head *head;
+ struct ext4_fc_add_range *add_range;
+ struct ext4_fc_del_range *del_range;
+ struct ext4_fc_dentry_info *dentry_info;
+ struct ext4_fc_tail *tail;
+ struct ext3_extent *ex;
+ __u8 *cur, *val;
+
+ *fc_done = 0;
+ for (cur = (__u8 *)buf; cur < (__u8 *)buf + blocksize;
+ cur = cur + sizeof(tl) + le16_to_cpu(tl.fc_len)) {
+ memcpy(&tl, cur, sizeof(tl));
+ val = cur + sizeof(tl);
+
+ switch (le16_to_cpu(tl.fc_tag)) {
+ case EXT4_FC_TAG_ADD_RANGE:
+ add_range = (struct ext4_fc_add_range *)val;
+ ex = (struct ext3_extent *)add_range->fc_ex;
+ fprintf(out_file,
+ "tag %s, inode %d, lblk %u, pblk %llu, len %lu\n",
+ tag2str(tl.fc_tag),
+ le32_to_cpu(add_range->fc_ino),
+ le32_to_cpu(ex->ee_block),
+ le32_to_cpu(ex->ee_start) +
+ (((unsigned long long) le16_to_cpu(ex->ee_start_hi)) << 32),
+ le16_to_cpu(ex->ee_len) > EXT_INIT_MAX_LEN ?
+ le16_to_cpu(ex->ee_len) - EXT_INIT_MAX_LEN :
+ le16_to_cpu(ex->ee_len));
+ break;
+ case EXT4_FC_TAG_DEL_RANGE:
+ del_range = (struct ext4_fc_del_range *)val;
+ fprintf(out_file, "tag %s, inode %d, lblk %d, len %d\n",
+ tag2str(tl.fc_tag),
+ le32_to_cpu(del_range->fc_ino),
+ le32_to_cpu(del_range->fc_lblk),
+ le32_to_cpu(del_range->fc_len));
+ break;
+ case EXT4_FC_TAG_LINK:
+ case EXT4_FC_TAG_UNLINK:
+ case EXT4_FC_TAG_CREAT:
+ dentry_info = (struct ext4_fc_dentry_info *)val;
+ fprintf(out_file,
+ "tag %s, parent %d, ino %d, name \"%s\"\n",
+ tag2str(tl.fc_tag),
+ le32_to_cpu(dentry_info->fc_parent_ino),
+ le32_to_cpu(dentry_info->fc_ino),
+ dentry_info->fc_dname);
+ break;
+ case EXT4_FC_TAG_INODE:
+ fprintf(out_file, "tag %s, inode %d\n",
+ tag2str(tl.fc_tag),
+ le32_to_cpu(((struct ext4_fc_inode *)val)->fc_ino));
+ break;
+ case EXT4_FC_TAG_PAD:
+ fprintf(out_file, "tag %s\n", tag2str(tl.fc_tag));
+ break;
+ case EXT4_FC_TAG_TAIL:
+ tail = (struct ext4_fc_tail *)val;
+ fprintf(out_file, "tag %s, tid %d\n",
+ tag2str(tl.fc_tag),
+ le32_to_cpu(tail->fc_tid));
+ if (!dump_old &&
+ le32_to_cpu(tail->fc_tid) < transaction) {
+ *fc_done = 1;
+ return;
+ }
+ break;
+ case EXT4_FC_TAG_HEAD:
+ fprintf(out_file, "\n*** Fast Commit Area ***\n");
+ head = (struct ext4_fc_head *)val;
+ fprintf(out_file, "tag %s, features 0x%x, tid %d\n",
+ tag2str(tl.fc_tag),
+ le32_to_cpu(head->fc_features),
+ le32_to_cpu(head->fc_tid));
+ if (!dump_old &&
+ le32_to_cpu(head->fc_tid) < transaction) {
+ *fc_done = 1;
+ return;
+ }
+ break;
+ default:
+ *fc_done = 1;
+ break;
+ }
+ }
+}
+
+static void dump_descriptor_block(FILE *out_file,
+ struct journal_source *source,
+ char *buf,
+ journal_superblock_t *jsb,
+ unsigned int *blockp, unsigned blocksize,
+ __u32 maxlen,
+ tid_t transaction)
+{
+ unsigned offset, tag_size, csum_size = 0;
+ char *tagp;
+ journal_block_tag_t *tag;
+ unsigned int blocknr;
+ __u32 tag_block;
+ __u32 tag_flags;
+
+ tag_size = journal_super_tag_bytes(jsb);
+ offset = sizeof(journal_header_t);
+ blocknr = *blockp;
+
+ if (JSB_HAS_INCOMPAT_FEATURE(jsb, JBD2_FEATURE_INCOMPAT_CSUM_V3) ||
+ JSB_HAS_INCOMPAT_FEATURE(jsb, JBD2_FEATURE_INCOMPAT_CSUM_V2))
+ csum_size = sizeof(struct jbd2_journal_block_tail);
+
+ if (dump_all)
+ fprintf(out_file, "Dumping descriptor block, sequence %u, at "
+ "block %u:\n", transaction, blocknr);
+
+ ++blocknr;
+ WRAP(jsb, blocknr, maxlen);
+
+ do {
+ /* Work out the location of the current tag, and skip to
+ * the next one... */
+ tagp = &buf[offset];
+ tag = (journal_block_tag_t *) tagp;
+ offset += tag_size;
+
+ /* ... and if we have gone too far, then we've reached the
+ end of this block. */
+ if (offset > blocksize - csum_size)
+ break;
+
+ tag_block = be32_to_cpu(tag->t_blocknr);
+ tag_flags = be16_to_cpu(tag->t_flags);
+
+ if (!(tag_flags & JBD2_FLAG_SAME_UUID))
+ offset += 16;
+
+ dump_metadata_block(out_file, source, jsb,
+ blocknr, tag_block, tag_flags, blocksize,
+ transaction);
+
+ ++blocknr;
+ WRAP(jsb, blocknr, maxlen);
+
+ } while (!(tag_flags & JBD2_FLAG_LAST_TAG));
+
+ *blockp = blocknr;
+}
+
+
+static void dump_revoke_block(FILE *out_file, char *buf,
+ journal_superblock_t *jsb EXT2FS_ATTR((unused)),
+ unsigned int blocknr,
+ unsigned int blocksize,
+ tid_t transaction)
+{
+ unsigned int offset, max;
+ jbd2_journal_revoke_header_t *header;
+ unsigned long long rblock;
+ int tag_size = sizeof(__u32);
+
+ if (dump_all)
+ fprintf(out_file, "Dumping revoke block, sequence %u, at "
+ "block %u:\n", transaction, blocknr);
+
+ if (be32_to_cpu(jsb->s_feature_incompat) & JBD2_FEATURE_INCOMPAT_64BIT)
+ tag_size = sizeof(__u64);
+
+ header = (jbd2_journal_revoke_header_t *) buf;
+ offset = sizeof(jbd2_journal_revoke_header_t);
+ max = be32_to_cpu(header->r_count);
+ if (max > blocksize) {
+ fprintf(out_file, "Revoke block's r_count invalid: %u\b",
+ max);
+ max = blocksize;
+ }
+
+ while (offset < max) {
+ if (tag_size == sizeof(__u32)) {
+ __u32 *entry = (__u32 *) (buf + offset);
+ rblock = be32_to_cpu(*entry);
+ } else {
+ __u64 *entry = (__u64 *) (buf + offset);
+ rblock = ext2fs_be64_to_cpu(*entry);
+ }
+ if (dump_all || rblock == block_to_dump) {
+ fprintf(out_file, " Revoke FS block %llu",
+ (unsigned long long) rblock);
+ if (dump_all)
+ fprintf(out_file, "\n");
+ else
+ fprintf(out_file," at block %u, sequence %u\n",
+ blocknr, transaction);
+ }
+ offset += tag_size;
+ }
+}
+
+
+static void show_extent(FILE *out_file, int start_extent, int end_extent,
+ __u32 first_block)
+{
+ if (start_extent >= 0 && first_block != 0)
+ fprintf(out_file, "(%d+%u): %u ",
+ start_extent, end_extent-start_extent, first_block);
+}
+
+static void show_indirect(FILE *out_file, const char *name, __u32 where)
+{
+ if (where)
+ fprintf(out_file, "(%s): %u ", name, where);
+}
+
+
+static void dump_metadata_block(FILE *out_file, struct journal_source *source,
+ journal_superblock_t *jsb EXT2FS_ATTR((unused)),
+ unsigned int log_blocknr,
+ unsigned int fs_blocknr,
+ unsigned int log_tag_flags,
+ unsigned int blocksize,
+ tid_t transaction)
+{
+ int retval;
+ char buf[EXT2_MAX_BLOCK_SIZE];
+
+ if (!(dump_all
+ || (fs_blocknr == block_to_dump)
+ || (fs_blocknr == inode_block_to_dump)
+ || (fs_blocknr == bitmap_to_dump)))
+ return;
+
+ fprintf(out_file, " FS block %u logged at ", fs_blocknr);
+ if (!dump_all)
+ fprintf(out_file, "sequence %u, ", transaction);
+ fprintf(out_file, "journal block %u (flags 0x%x)\n", log_blocknr,
+ log_tag_flags);
+
+ /* There are two major special cases to parse:
+ *
+ * If this block is a block
+ * bitmap block, we need to give it special treatment so that we
+ * can log any allocates and deallocates which affect the
+ * block_to_dump query block.
+ *
+ * If the block is an inode block for the inode being searched
+ * for, then we need to dump the contents of that inode
+ * structure symbolically.
+ */
+
+ if (!(dump_contents && dump_all)
+ && fs_blocknr != block_to_dump
+ && fs_blocknr != bitmap_to_dump
+ && fs_blocknr != inode_block_to_dump)
+ return;
+
+ retval = read_journal_block("logdump", source,
+ ((ext2_loff_t) log_blocknr) * blocksize,
+ buf, blocksize);
+ if (retval)
+ return;
+
+ if (fs_blocknr == bitmap_to_dump) {
+ struct ext2_super_block *super;
+ int offset;
+
+ super = current_fs->super;
+ offset = ((block_to_dump - super->s_first_data_block) %
+ super->s_blocks_per_group);
+
+ fprintf(out_file, " (block bitmap for block %llu: "
+ "block is %s)\n",
+ (unsigned long long) block_to_dump,
+ ext2fs_test_bit(offset, buf) ? "SET" : "CLEAR");
+ }
+
+ if (fs_blocknr == inode_block_to_dump) {
+ struct ext2_inode *inode;
+ int first, prev, this, start_extent, i;
+
+ fprintf(out_file, " (inode block for inode %u):\n",
+ inode_to_dump);
+
+ inode = (struct ext2_inode *) (buf + inode_offset_to_dump);
+ internal_dump_inode(out_file, " ", inode_to_dump, inode, 0);
+
+ /* Dump out the direct/indirect blocks here:
+ * internal_dump_inode can only dump them from the main
+ * on-disk inode, not from the journaled copy of the
+ * inode. */
+
+ fprintf (out_file, " Blocks: ");
+ first = prev = start_extent = -1;
+
+ for (i=0; i<EXT2_NDIR_BLOCKS; i++) {
+ this = inode->i_block[i];
+ if (start_extent >= 0 && this == prev+1) {
+ prev = this;
+ continue;
+ } else {
+ show_extent(out_file, start_extent, i, first);
+ start_extent = i;
+ first = prev = this;
+ }
+ }
+ show_extent(out_file, start_extent, i, first);
+ show_indirect(out_file, "IND", inode->i_block[i++]);
+ show_indirect(out_file, "DIND", inode->i_block[i++]);
+ show_indirect(out_file, "TIND", inode->i_block[i++]);
+
+ fprintf(out_file, "\n");
+ }
+
+ if (dump_contents)
+ do_hexdump(out_file, buf, blocksize);
+
+}
+
+static void do_hexdump (FILE *out_file, char *buf, int blocksize)
+{
+ int i,j;
+ int *intp;
+ char *charp;
+ unsigned char c;
+
+ intp = (int *) buf;
+ charp = (char *) buf;
+
+ for (i=0; i<blocksize; i+=16) {
+ fprintf(out_file, " %04x: ", i);
+ for (j=0; j<16; j+=4)
+ fprintf(out_file, "%08x ", *intp++);
+ for (j=0; j<16; j++) {
+ c = *charp++;
+ if (c < ' ' || c >= 127)
+ c = '.';
+ fprintf(out_file, "%c", c);
+ }
+ fprintf(out_file, "\n");
+ }
+}
+
diff --git a/debugfs/ls.c b/debugfs/ls.c
new file mode 100644
index 0000000..525f084
--- /dev/null
+++ b/debugfs/ls.c
@@ -0,0 +1,252 @@
+/*
+ * ls.c --- list directories
+ *
+ * Copyright (C) 1997 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+/*
+ * list directory
+ */
+
+#define LONG_OPT 0x0001
+#define PARSE_OPT 0x0002
+#define RAW_OPT 0x0004
+#define ENCRYPT_OPT 0x8000
+
+struct list_dir_struct {
+ FILE *f;
+ int col;
+ int options;
+ int state;
+};
+
+static const char *monstr[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+
+static int print_filename(FILE *f, struct ext2_dir_entry *dirent, int options)
+{
+ unsigned char ch;
+ const char *cp = dirent->name;
+ int len = ext2fs_dirent_name_len(dirent);
+ int retlen = 0;
+
+ if ((options & ENCRYPT_OPT) && !(options & RAW_OPT)) {
+ if (f)
+ return fprintf(f, "<encrypted (%d)>", len);
+ else
+ return snprintf(NULL, 0, "<encrypted (%d)>", len);
+ }
+ while (len--) {
+ ch = *cp++;
+ if (ch < 32 || ch >= 127 || ch == '\\') {
+ if (f)
+ fprintf(f, "\\x%02x", ch);
+ retlen += 4;
+ } else {
+ if (f)
+ fputc(ch, f);
+ retlen++;
+ }
+ }
+ return retlen;
+}
+
+static int list_dir_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+ struct tm *tm_p;
+ time_t modtime;
+ char tmp[EXT2_NAME_LEN + 16];
+ char datestr[80];
+ char lbr, rbr;
+ int thislen;
+ int options;
+ struct list_dir_struct *ls = (struct list_dir_struct *) private;
+ struct ext2_dir_entry_tail *t = (struct ext2_dir_entry_tail *) dirent;
+
+ thislen = ext2fs_dirent_name_len(dirent);
+ ino = dirent->inode;
+ options = ls->options;
+ if (ls->state < 2) {
+ ls->state++;
+ options |= RAW_OPT;
+ }
+
+ if (entry == DIRENT_DELETED_FILE) {
+ lbr = '<';
+ rbr = '>';
+ ino = 0;
+ } else {
+ lbr = rbr = ' ';
+ }
+ if (options & PARSE_OPT) {
+ if (ino) {
+ if (debugfs_read_inode(ino, &inode, "ls"))
+ return 0;
+ } else
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ fprintf(ls->f,"/%u/%06o/%d/%d/%.*s/", ino, inode.i_mode,
+ inode_uid(inode), inode_gid(inode), thislen, dirent->name);
+ if (LINUX_S_ISDIR(inode.i_mode))
+ fprintf(ls->f, "/");
+ else
+ fprintf(ls->f, "%llu/",
+ (unsigned long long) EXT2_I_SIZE(&inode));
+ fprintf(ls->f, "\n");
+ } else if (options & LONG_OPT) {
+ if (ino) {
+ if (debugfs_read_inode(ino, &inode, "ls"))
+ return 0;
+ modtime = inode.i_mtime;
+ tm_p = localtime(&modtime);
+ sprintf(datestr, "%2d-%s-%4d %02d:%02d",
+ tm_p->tm_mday, monstr[tm_p->tm_mon],
+ 1900 + tm_p->tm_year, tm_p->tm_hour,
+ tm_p->tm_min);
+ } else {
+ strcpy(datestr, " ");
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ }
+ fprintf(ls->f, "%c%6u%c %6o ", lbr, ino, rbr, inode.i_mode);
+ if (entry == DIRENT_CHECKSUM) {
+ fprintf(ls->f, "(dirblock checksum: 0x%08x)\n",
+ t->det_checksum);
+ return 0;
+ }
+ fprintf(ls->f, "(%d) %5d %5d ",
+ ext2fs_dirent_file_type(dirent),
+ inode_uid(inode), inode_gid(inode));
+ fprintf(ls->f, "%5llu",
+ (unsigned long long) EXT2_I_SIZE(&inode));
+ fprintf(ls->f, " %s ", datestr);
+ print_filename(ls->f, dirent, options);
+ fputc('\n', ls->f);
+ } else {
+ if (entry == DIRENT_CHECKSUM) {
+ sprintf(tmp, "%c%u%c (dirblock checksum: 0x%08x) ",
+ lbr, dirent->inode, rbr, t->det_checksum);
+ thislen = strlen(tmp);
+ if (ls->col + thislen > 80) {
+ fputc('\n', ls->f);
+ ls->col = 0;
+ }
+ fprintf(ls->f, "%s", tmp);
+ ls->col += thislen;
+ return 0;
+ }
+ sprintf(tmp, "%c%u%c (%d) ", lbr, dirent->inode, rbr,
+ dirent->rec_len);
+ thislen = strlen(tmp) + 3;
+ thislen += print_filename(NULL, dirent, options);
+
+ if (ls->col + thislen > 80) {
+ fputc('\n', ls->f);
+ ls->col = 0;
+ }
+ fprintf(ls->f, "%s", tmp);
+ print_filename(ls->f, dirent, options);
+ fputs(" ", ls->f);
+ ls->col += thislen;
+ }
+ return 0;
+}
+
+void do_list_dir(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+ int retval;
+ int c;
+ int flags = DIRENT_FLAG_INCLUDE_EMPTY;
+ struct list_dir_struct ls;
+
+ ls.options = 0;
+ ls.state = 0;
+ if (check_fs_open(argv[0]))
+ return;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "cdlpr")) != EOF) {
+ switch (c) {
+ case 'c':
+ flags |= DIRENT_FLAG_INCLUDE_CSUM;
+ break;
+ case 'l':
+ ls.options |= LONG_OPT;
+ break;
+ case 'd':
+ flags |= DIRENT_FLAG_INCLUDE_REMOVED;
+ break;
+ case 'p':
+ ls.options |= PARSE_OPT;
+ break;
+ case 'r':
+ ls.options |= RAW_OPT;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (argc > optind+1) {
+ print_usage:
+ com_err(0, 0, "Usage: ls [-c] [-d] [-l] [-p] [-r] file");
+ return;
+ }
+
+ if (argc == optind)
+ ino = cwd;
+ else
+ ino = string_to_inode(argv[optind]);
+ if (!ino)
+ return;
+
+ ls.f = open_pager();
+ ls.col = 0;
+
+ if (debugfs_read_inode(ino, &inode, argv[0]))
+ return;
+
+ if (inode.i_flags & EXT4_ENCRYPT_FL)
+ ls.options |= ENCRYPT_OPT;
+
+ retval = ext2fs_dir_iterate2(current_fs, ino, flags,
+ 0, list_dir_proc, &ls);
+ fprintf(ls.f, "\n");
+ close_pager(ls.f);
+ if (retval)
+ com_err(argv[1], retval, 0);
+
+ return;
+}
+
+
diff --git a/debugfs/lsdel.c b/debugfs/lsdel.c
new file mode 100644
index 0000000..52c7419
--- /dev/null
+++ b/debugfs/lsdel.c
@@ -0,0 +1,219 @@
+/*
+ * lsdel.c --- routines to try to help a user recover a deleted file.
+ *
+ * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ * Theodore Ts'o. This file may be redistributed under the terms of
+ * the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "debugfs.h"
+
+struct deleted_info {
+ ext2_ino_t ino;
+ unsigned short mode;
+ __u32 uid;
+ __u64 size;
+ time_t dtime;
+ e2_blkcnt_t num_blocks;
+ e2_blkcnt_t free_blocks;
+};
+
+struct lsdel_struct {
+ ext2_ino_t inode;
+ e2_blkcnt_t num_blocks;
+ e2_blkcnt_t free_blocks;
+ e2_blkcnt_t bad_blocks;
+};
+
+static int deleted_info_compare(const void *a, const void *b)
+{
+ const struct deleted_info *arg1, *arg2;
+
+ arg1 = (const struct deleted_info *) a;
+ arg2 = (const struct deleted_info *) b;
+
+ return arg1->dtime - arg2->dtime;
+}
+
+static int lsdel_proc(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct lsdel_struct *lsd = (struct lsdel_struct *) private;
+
+ lsd->num_blocks++;
+
+ if (*block_nr < fs->super->s_first_data_block ||
+ *block_nr >= ext2fs_blocks_count(fs->super)) {
+ lsd->bad_blocks++;
+ return BLOCK_ABORT;
+ }
+
+ if (!ext2fs_test_block_bitmap2(fs->block_map,*block_nr))
+ lsd->free_blocks++;
+
+ return 0;
+}
+
+void do_lsdel(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct lsdel_struct lsd;
+ struct deleted_info *delarray;
+ int num_delarray, max_delarray;
+ ext2_inode_scan scan = 0;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ errcode_t retval;
+ char *block_buf;
+ int i;
+ long secs = 0;
+ char *tmp;
+ time_t now;
+ FILE *out;
+
+ if (common_args_process(argc, argv, 1, 2, "list_deleted_inodes",
+ "[secs]", 0))
+ return;
+
+ if (argc > 1) {
+ secs = strtol(argv[1],&tmp,0);
+ if (*tmp) {
+ com_err(argv[0], 0, "Bad time - %s",argv[1]);
+ return;
+ }
+ }
+
+ now = current_fs->now ? current_fs->now : time(0);
+ max_delarray = 100;
+ num_delarray = 0;
+ delarray = malloc(max_delarray * sizeof(struct deleted_info));
+ if (!delarray) {
+ com_err("ls_deleted_inodes", ENOMEM,
+ "while allocating deleted information storage");
+ exit(1);
+ }
+
+ block_buf = malloc(current_fs->blocksize * 3);
+ if (!block_buf) {
+ com_err("ls_deleted_inodes", ENOMEM, "while allocating block buffer");
+ goto error_out;
+ }
+
+ retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
+ if (retval) {
+ com_err("ls_deleted_inodes", retval,
+ "while opening inode scan");
+ goto error_out;
+ }
+
+ do {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ } while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
+ if (retval) {
+ com_err("ls_deleted_inodes", retval,
+ "while starting inode scan");
+ goto error_out;
+ }
+
+ while (ino) {
+ if ((inode.i_dtime == 0) ||
+ (secs && (labs(now - secs) > (long) inode.i_dtime)))
+ goto next;
+
+ lsd.inode = ino;
+ lsd.num_blocks = 0;
+ lsd.free_blocks = 0;
+ lsd.bad_blocks = 0;
+
+ if (ext2fs_inode_has_valid_blocks2(current_fs, &inode)) {
+ retval = ext2fs_block_iterate3(current_fs, ino,
+ BLOCK_FLAG_READ_ONLY,
+ block_buf,
+ lsdel_proc, &lsd);
+ if (retval) {
+ com_err("ls_deleted_inodes", retval,
+ "while calling ext2fs_block_iterate2");
+ goto next;
+ }
+ }
+ if ((lsd.free_blocks && !lsd.bad_blocks) ||
+ inode.i_flags & EXT4_INLINE_DATA_FL) {
+ if (num_delarray >= max_delarray) {
+ max_delarray += 50;
+ delarray = realloc(delarray,
+ max_delarray * sizeof(struct deleted_info));
+ if (!delarray) {
+ com_err("ls_deleted_inodes",
+ ENOMEM,
+ "while reallocating array");
+ exit(1);
+ }
+ }
+
+ delarray[num_delarray].ino = ino;
+ delarray[num_delarray].mode = inode.i_mode;
+ delarray[num_delarray].uid = inode_uid(inode);
+ delarray[num_delarray].size = EXT2_I_SIZE(&inode);
+ delarray[num_delarray].dtime = (__s32) inode.i_dtime;
+ delarray[num_delarray].num_blocks = lsd.num_blocks;
+ delarray[num_delarray].free_blocks = lsd.free_blocks;
+ num_delarray++;
+ }
+
+ next:
+ do {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ } while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
+ if (retval) {
+ com_err("ls_deleted_inodes", retval,
+ "while doing inode scan");
+ goto error_out;
+ }
+ }
+
+ out = open_pager();
+
+ fprintf(out, " Inode Owner Mode Size Blocks Time deleted\n");
+
+ qsort(delarray, num_delarray, sizeof(struct deleted_info),
+ deleted_info_compare);
+
+ for (i = 0; i < num_delarray; i++) {
+ fprintf(out, "%6u %6d %6o %6llu %6lld/%6lld %s",
+ delarray[i].ino,
+ delarray[i].uid, delarray[i].mode,
+ (unsigned long long) delarray[i].size,
+ (long long) delarray[i].free_blocks,
+ (long long) delarray[i].num_blocks,
+ time_to_string(delarray[i].dtime));
+ }
+ fprintf(out, "%d deleted inodes found.\n", num_delarray);
+ close_pager(out);
+
+error_out:
+ free(block_buf);
+ free(delarray);
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ return;
+}
+
+
+
diff --git a/debugfs/ncheck.c b/debugfs/ncheck.c
new file mode 100644
index 0000000..963b3a1
--- /dev/null
+++ b/debugfs/ncheck.c
@@ -0,0 +1,223 @@
+/*
+ * ncheck.c --- given a list of inodes, generate a list of names
+ *
+ * Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+struct inode_walk_struct {
+ ext2_ino_t dir;
+ ext2_ino_t *iarray;
+ int names_left;
+ int num_inodes;
+ int position;
+ char *parent;
+ unsigned int get_pathname_failed:1;
+ unsigned int check_dirent:1;
+};
+
+static int ncheck_proc(struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct inode_walk_struct *iw = (struct inode_walk_struct *) private;
+ struct ext2_inode inode;
+ errcode_t retval;
+ int filetype = ext2fs_dirent_file_type(dirent);
+ int i;
+
+ iw->position++;
+ if (iw->position <= 2)
+ return 0;
+ for (i=0; i < iw->num_inodes; i++) {
+ if (iw->iarray[i] == dirent->inode) {
+ if (!iw->parent && !iw->get_pathname_failed) {
+ retval = ext2fs_get_pathname(current_fs,
+ iw->dir,
+ 0, &iw->parent);
+ if (retval) {
+ com_err("ncheck", retval,
+ "while calling ext2fs_get_pathname for inode #%u", iw->dir);
+ iw->get_pathname_failed = 1;
+ }
+ }
+ if (iw->parent)
+ printf("%u\t%s/%.*s", iw->iarray[i],
+ iw->parent,
+ ext2fs_dirent_name_len(dirent),
+ dirent->name);
+ else
+ printf("%u\t<%u>/%.*s", iw->iarray[i],
+ iw->dir,
+ ext2fs_dirent_name_len(dirent),
+ dirent->name);
+ if (iw->check_dirent && filetype) {
+ if (!debugfs_read_inode(dirent->inode, &inode,
+ "ncheck") &&
+ filetype != ext2_file_type(inode.i_mode)) {
+ printf(" <--- BAD FILETYPE");
+ }
+ }
+ putc('\n', stdout);
+ iw->names_left--;
+ }
+ }
+ if (!iw->names_left)
+ return DIRENT_ABORT;
+
+ return 0;
+}
+
+void do_ncheck(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ struct inode_walk_struct iw;
+ int c, i;
+ ext2_inode_scan scan = 0;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ errcode_t retval;
+ char *tmp;
+
+ iw.check_dirent = 0;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "c")) != EOF) {
+ switch (c) {
+ case 'c':
+ iw.check_dirent = 1;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (argc <= 1) {
+ print_usage:
+ com_err(argv[0], 0, "Usage: ncheck [-c] <inode number> ...");
+ return;
+ }
+ if (check_fs_open(argv[0]))
+ return;
+
+ argc -= optind;
+ argv += optind;
+ iw.iarray = malloc(sizeof(ext2_ino_t) * argc);
+ if (!iw.iarray) {
+ com_err("ncheck", ENOMEM,
+ "while allocating inode number array");
+ return;
+ }
+ memset(iw.iarray, 0, sizeof(ext2_ino_t) * argc);
+
+ iw.names_left = 0;
+ for (i=0; i < argc; i++) {
+ char *str = argv[i];
+ int len = strlen(str);
+
+ if ((len > 2) && (str[0] == '<') && (str[len - 1] == '>'))
+ str++;
+ iw.iarray[i] = strtol(str, &tmp, 0);
+ if (*tmp && (str == argv[i] || *tmp != '>')) {
+ com_err("ncheck", 0, "Invalid inode number - '%s'",
+ argv[i]);
+ goto error_out;
+ }
+ if (debugfs_read_inode(iw.iarray[i], &inode, *argv))
+ goto error_out;
+ if (LINUX_S_ISDIR(inode.i_mode))
+ iw.names_left += 1;
+ else
+ iw.names_left += inode.i_links_count;
+ }
+
+ iw.num_inodes = argc;
+
+ retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
+ if (retval) {
+ com_err("ncheck", retval, "while opening inode scan");
+ goto error_out;
+ }
+
+ do {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ } while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
+ if (retval) {
+ com_err("ncheck", retval, "while starting inode scan");
+ goto error_out;
+ }
+
+ printf("Inode\tPathname\n");
+ while (ino) {
+ if (!inode.i_links_count)
+ goto next;
+ /*
+ * To handle filesystems touched by 0.3c extfs; can be
+ * removed later.
+ */
+ if (inode.i_dtime)
+ goto next;
+ /* Ignore anything that isn't a directory */
+ if (!LINUX_S_ISDIR(inode.i_mode))
+ goto next;
+
+ iw.position = 0;
+ iw.parent = 0;
+ iw.dir = ino;
+ iw.get_pathname_failed = 0;
+
+ retval = ext2fs_dir_iterate(current_fs, ino, 0, 0,
+ ncheck_proc, &iw);
+ ext2fs_free_mem(&iw.parent);
+ if (retval) {
+ com_err("ncheck", retval,
+ "while calling ext2_dir_iterate");
+ goto next;
+ }
+
+ if (iw.names_left == 0)
+ break;
+
+ next:
+ do {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ } while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
+
+ if (retval) {
+ com_err("ncheck", retval,
+ "while doing inode scan");
+ goto error_out;
+ }
+ }
+
+error_out:
+ free(iw.iarray);
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ return;
+}
+
+
+
diff --git a/debugfs/quota.c b/debugfs/quota.c
new file mode 100644
index 0000000..1da1e03
--- /dev/null
+++ b/debugfs/quota.c
@@ -0,0 +1,172 @@
+/*
+ * quota.c --- debugfs quota commands
+ *
+ * Copyright (C) 2014 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+const char *quota_type[] = { "user", "group", "project", NULL };
+
+static int load_quota_ctx(char *progname)
+{
+ errcode_t retval;
+
+ if (check_fs_open(progname))
+ return 1;
+
+ if (!ext2fs_has_feature_quota(current_fs->super)) {
+ com_err(progname, 0, "quota feature not enabled");
+ return 1;
+ }
+
+ if (current_qctx)
+ return 0;
+
+ retval = quota_init_context(&current_qctx, current_fs, 0);
+ if (retval) {
+ com_err(current_fs->device_name, retval,
+ "while trying to load quota information");
+ return 1;
+ }
+ return 0;
+}
+
+static int parse_quota_type(const char *cmdname, const char *str)
+{
+ errcode_t retval;
+ char *t;
+ int flags = 0;
+ int i;
+
+ for (i = 0; i < MAXQUOTAS; i++) {
+ if (strcasecmp(str, quota_type[i]) == 0)
+ break;
+ }
+ if (i >= MAXQUOTAS) {
+ i = strtol(str, &t, 0);
+ if (*t)
+ i = -1;
+ }
+ if (i < 0 || i >= MAXQUOTAS) {
+ com_err(0, 0, "Invalid quota type: %s", str);
+ printf("Valid quota types are: ");
+ for (i = 0; i < MAXQUOTAS; i++)
+ printf("%s ", quota_type[i]);
+ printf("\n");
+ return -1;
+ }
+
+ if (current_fs->flags & EXT2_FLAG_RW)
+ flags |= EXT2_FILE_WRITE;
+
+ retval = quota_file_open(current_qctx, NULL, 0, i, -1, flags);
+ if (retval) {
+ com_err(cmdname, retval,
+ "while opening quota inode (type %d)", i);
+ return -1;
+ }
+ return i;
+}
+
+
+static int list_quota_callback(struct dquot *dq,
+ void *cb_data EXT2FS_ATTR((unused)))
+{
+ printf("%10u %8lld %8lld %8lld %8lld %8lld %8lld\n",
+ dq->dq_id, (long long)dq->dq_dqb.dqb_curspace,
+ (long long)dq->dq_dqb.dqb_bsoftlimit,
+ (long long)dq->dq_dqb.dqb_bhardlimit,
+ (long long)dq->dq_dqb.dqb_curinodes,
+ (long long)dq->dq_dqb.dqb_isoftlimit,
+ (long long)dq->dq_dqb.dqb_ihardlimit);
+ return 0;
+}
+
+void do_list_quota(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ int type;
+ struct quota_handle *qh;
+
+ if (load_quota_ctx(argv[0]))
+ return;
+
+ if (argc != 2) {
+ com_err(0, 0, "Usage: list_quota <quota_type>\n");
+ return;
+ }
+
+ type = parse_quota_type(argv[0], argv[1]);
+ if (type < 0)
+ return;
+
+ printf("%7s %2s %8s %8s %8s %8s %8s %8s\n",
+ quota_type[type], "id",
+ "space", "quota", "limit", "inodes", "quota", "limit");
+ qh = current_qctx->quota_file[type];
+ retval = qh->qh_ops->scan_dquots(qh, list_quota_callback, NULL);
+ if (retval) {
+ com_err(argv[0], retval, "while scanning dquots");
+ return;
+ }
+}
+
+void do_get_quota(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int err, type;
+ struct quota_handle *qh;
+ struct dquot *dq;
+ qid_t id;
+
+ if (load_quota_ctx(argv[0]))
+ return;
+
+ if (argc != 3) {
+ com_err(0, 0, "Usage: get_quota <quota_type> <id>\n");
+ return;
+ }
+
+ type = parse_quota_type(argv[0], argv[1]);
+ if (type < 0)
+ return;
+
+ id = parse_ulong(argv[2], argv[0], "id", &err);
+ if (err)
+ return;
+
+ printf("%7s %2s %8s %8s %8s %8s %8s %8s\n",
+ quota_type[type], "id",
+ "space", "quota", "limit", "inodes", "quota", "limit");
+
+ qh = current_qctx->quota_file[type];
+
+ dq = qh->qh_ops->read_dquot(qh, id);
+ if (dq) {
+ list_quota_callback(dq, NULL);
+ ext2fs_free_mem(&dq);
+ } else {
+ com_err(argv[0], 0, "couldn't read quota record");
+ }
+}
diff --git a/debugfs/ro_debug_cmds.ct b/debugfs/ro_debug_cmds.ct
new file mode 100644
index 0000000..736ade6
--- /dev/null
+++ b/debugfs/ro_debug_cmds.ct
@@ -0,0 +1,99 @@
+#
+# Restricted set of debugfs commands
+#
+# Copyright (C) 1993 Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+command_table debug_cmds;
+
+request do_show_debugfs_params, "Show debugfs parameters",
+ show_debugfs_params, params;
+
+request do_open_filesys, "Open a filesystem",
+ open_filesys, open;
+
+request do_close_filesys, "Close the filesystem",
+ close_filesys, close;
+
+request do_freefrag, "Report free space fragmentation",
+ freefrag, e2freefrag;
+
+request do_show_super_stats, "Show superblock statistics",
+ show_super_stats, stats;
+
+request do_ncheck, "Do inode->name translation",
+ ncheck;
+
+request do_icheck, "Do block->inode translation",
+ icheck;
+
+request do_chroot, "Change root directory",
+ change_root_directory, chroot;
+
+request do_change_working_dir, "Change working directory",
+ change_working_directory, cd;
+
+request do_list_dir, "List directory",
+ list_directory, ls;
+
+request do_stat, "Show inode information ",
+ show_inode_info, stat;
+
+request do_dump_extents, "Dump extents information ",
+ dump_extents, extents, ex;
+
+request do_blocks, "Dump blocks used by an inode ",
+ blocks;
+
+request do_filefrag, "Report fragmentation information for an inode",
+ filefrag;
+
+request do_testi, "Test an inode's in-use flag",
+ testi;
+
+request do_find_free_block, "Find free block(s)",
+ find_free_block, ffb;
+
+request do_find_free_inode, "Find free inode(s)",
+ find_free_inode, ffi;
+
+request do_print_working_directory, "Print current working directory",
+ print_working_directory, pwd;
+
+request do_lsdel, "List deleted inodes",
+ list_deleted_inodes, lsdel;
+
+request do_logdump, "Dump the contents of the journal",
+ logdump;
+
+request do_htree_dump, "Dump a hash-indexed directory",
+ htree_dump, htree;
+
+request do_dx_hash, "Calculate the directory hash of a filename",
+ dx_hash, hash;
+
+request do_dirsearch, "Search a directory for a particular filename",
+ dirsearch;
+
+request do_bmap, "Calculate the logical->physical block mapping for an inode",
+ bmap;
+
+request do_imap, "Calculate the location of an inode",
+ imap;
+
+request do_supported_features, "Print features supported by this version of e2fsprogs",
+ supported_features;
+
+request do_dump_mmp, "Dump MMP information",
+ dump_mmp;
+
+request do_extent_open, "Open inode for extent manipulation",
+ extent_open, eo;
+
+request do_list_quota, "List quota",
+ lost_quota, lq;
+
+request do_get_quota, "Get quota",
+ get_quota, gq;
+
+end;
diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c
new file mode 100644
index 0000000..f916dea
--- /dev/null
+++ b/debugfs/set_fields.c
@@ -0,0 +1,1024 @@
+/*
+ * set_fields.c --- set a superblock value
+ *
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#define _XOPEN_SOURCE 600 /* for inclusion of strptime() and strtoull */
+
+#ifdef HAVE_STRTOULL
+#define STRTOULL strtoull
+#else
+#define STRTOULL strtoul
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <strings.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <assert.h>
+#if HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#include <fcntl.h>
+#include <utime.h>
+
+#include "debugfs.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+#include "support/quotaio.h"
+
+static struct ext2_super_block set_sb;
+static struct ext2_inode_large set_inode;
+static struct ext2_group_desc set_gd;
+static struct ext4_group_desc set_gd4;
+static struct mmp_struct set_mmp;
+static dgrp_t set_bg;
+static ext2_ino_t set_ino;
+static int array_idx;
+
+#define FLAG_ARRAY 0x0001
+#define FLAG_ALIAS 0x0002 /* Data intersects with other field */
+#define FLAG_CSUM 0x0004
+
+struct field_set_info {
+ const char *name;
+ void *ptr;
+ void *ptr2;
+ unsigned int size;
+ errcode_t (*func)(struct field_set_info *info, char *field, char *arg);
+ int flags;
+ int max_idx;
+};
+
+static errcode_t parse_uint(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_int(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_string(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_uuid(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_hashalg(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_encoding(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_time(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_bmap(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_gd_csum(struct field_set_info *info, char *field, char *arg);
+static errcode_t parse_inode_csum(struct field_set_info *info, char *field,
+ char *arg);
+static errcode_t parse_mmp_clear(struct field_set_info *info, char *field,
+ char *arg);
+
+#if __GNUC_PREREQ (4, 6) || defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
+static struct field_set_info super_fields[] = {
+ { "inodes_count", &set_sb.s_inodes_count, NULL, 4, parse_uint },
+ { "blocks_count", &set_sb.s_blocks_count, &set_sb.s_blocks_count_hi,
+ 4, parse_uint },
+ { "r_blocks_count", &set_sb.s_r_blocks_count,
+ &set_sb.s_r_blocks_count_hi, 4, parse_uint },
+ { "free_blocks_count", &set_sb.s_free_blocks_count,
+ &set_sb.s_free_blocks_hi, 4, parse_uint },
+ { "free_inodes_count", &set_sb.s_free_inodes_count, NULL, 4, parse_uint },
+ { "first_data_block", &set_sb.s_first_data_block, NULL, 4, parse_uint },
+ { "log_block_size", &set_sb.s_log_block_size, NULL, 4, parse_uint },
+ { "log_cluster_size", &set_sb.s_log_cluster_size, NULL, 4, parse_int },
+ { "blocks_per_group", &set_sb.s_blocks_per_group, NULL, 4, parse_uint },
+ { "clusters_per_group", &set_sb.s_clusters_per_group, NULL, 4, parse_uint },
+ { "inodes_per_group", &set_sb.s_inodes_per_group, NULL, 4, parse_uint },
+ { "mtime", &set_sb.s_mtime, NULL, 4, parse_time },
+ { "wtime", &set_sb.s_wtime, NULL, 4, parse_time },
+ { "mnt_count", &set_sb.s_mnt_count, NULL, 2, parse_uint },
+ { "max_mnt_count", &set_sb.s_max_mnt_count, NULL, 2, parse_int },
+ /* s_magic */
+ { "state", &set_sb.s_state, NULL, 2, parse_uint },
+ { "errors", &set_sb.s_errors, NULL, 2, parse_uint },
+ { "minor_rev_level", &set_sb.s_minor_rev_level, NULL, 2, parse_uint },
+ { "lastcheck", &set_sb.s_lastcheck, NULL, 4, parse_time },
+ { "checkinterval", &set_sb.s_checkinterval, NULL, 4, parse_uint },
+ { "creator_os", &set_sb.s_creator_os, NULL, 4, parse_uint },
+ { "rev_level", &set_sb.s_rev_level, NULL, 4, parse_uint },
+ { "def_resuid", &set_sb.s_def_resuid, NULL, 2, parse_uint },
+ { "def_resgid", &set_sb.s_def_resgid, NULL, 2, parse_uint },
+ { "first_ino", &set_sb.s_first_ino, NULL, 4, parse_uint },
+ { "inode_size", &set_sb.s_inode_size, NULL, 2, parse_uint },
+ { "block_group_nr", &set_sb.s_block_group_nr, NULL, 2, parse_uint },
+ { "feature_compat", &set_sb.s_feature_compat, NULL, 4, parse_uint },
+ { "feature_incompat", &set_sb.s_feature_incompat, NULL, 4, parse_uint },
+ { "feature_ro_compat", &set_sb.s_feature_ro_compat, NULL, 4, parse_uint },
+ { "uuid", &set_sb.s_uuid, NULL, 16, parse_uuid },
+ { "volume_name", &set_sb.s_volume_name, NULL, 16, parse_string },
+ { "last_mounted", &set_sb.s_last_mounted, NULL, 64, parse_string },
+ { "algorithm_usage_bitmap", &set_sb.s_algorithm_usage_bitmap, NULL,
+ 4, parse_uint },
+ { "prealloc_blocks", &set_sb.s_prealloc_blocks, NULL, 1, parse_uint },
+ { "prealloc_dir_blocks", &set_sb.s_prealloc_dir_blocks, NULL, 1,
+ parse_uint },
+ { "reserved_gdt_blocks", &set_sb.s_reserved_gdt_blocks, NULL, 2,
+ parse_uint },
+ { "journal_uuid", &set_sb.s_journal_uuid, NULL, 16, parse_uuid },
+ { "journal_inum", &set_sb.s_journal_inum, NULL, 4, parse_uint },
+ { "journal_dev", &set_sb.s_journal_dev, NULL, 4, parse_uint },
+ { "last_orphan", &set_sb.s_last_orphan, NULL, 4, parse_uint },
+ { "hash_seed", &set_sb.s_hash_seed, NULL, 16, parse_uuid },
+ { "def_hash_version", &set_sb.s_def_hash_version, NULL, 1, parse_hashalg },
+ { "jnl_backup_type", &set_sb.s_jnl_backup_type, NULL, 1, parse_uint },
+ { "desc_size", &set_sb.s_desc_size, NULL, 2, parse_uint },
+ { "default_mount_opts", &set_sb.s_default_mount_opts, NULL, 4, parse_uint },
+ { "first_meta_bg", &set_sb.s_first_meta_bg, NULL, 4, parse_uint },
+ { "mkfs_time", &set_sb.s_mkfs_time, NULL, 4, parse_time },
+ { "jnl_blocks", &set_sb.s_jnl_blocks[0], NULL, 4, parse_uint, FLAG_ARRAY,
+ 17 },
+ { "min_extra_isize", &set_sb.s_min_extra_isize, NULL, 2, parse_uint },
+ { "want_extra_isize", &set_sb.s_want_extra_isize, NULL, 2, parse_uint },
+ { "flags", &set_sb.s_flags, NULL, 4, parse_uint },
+ { "raid_stride", &set_sb.s_raid_stride, NULL, 2, parse_uint },
+ { "mmp_interval", &set_sb.s_mmp_update_interval, NULL, 2, parse_uint },
+ { "mmp_block", &set_sb.s_mmp_block, NULL, 8, parse_uint },
+ { "raid_stripe_width", &set_sb.s_raid_stripe_width, NULL, 4, parse_uint },
+ { "log_groups_per_flex", &set_sb.s_log_groups_per_flex, NULL, 1, parse_uint },
+ { "kbytes_written", &set_sb.s_kbytes_written, NULL, 8, parse_uint },
+ { "snapshot_inum", &set_sb.s_snapshot_inum, NULL, 4, parse_uint },
+ { "snapshot_id", &set_sb.s_snapshot_id, NULL, 4, parse_uint },
+ { "snapshot_r_blocks_count", &set_sb.s_snapshot_r_blocks_count,
+ NULL, 8, parse_uint },
+ { "snapshot_list", &set_sb.s_snapshot_list, NULL, 4, parse_uint },
+ { "mount_opts", &set_sb.s_mount_opts, NULL, 64, parse_string },
+ { "usr_quota_inum", &set_sb.s_usr_quota_inum, NULL, 4, parse_uint },
+ { "grp_quota_inum", &set_sb.s_grp_quota_inum, NULL, 4, parse_uint },
+ { "prj_quota_inum", &set_sb.s_prj_quota_inum, NULL, 4, parse_uint },
+ { "overhead_clusters", &set_sb.s_overhead_clusters, NULL, 4, parse_uint },
+ { "backup_bgs", &set_sb.s_backup_bgs[0], NULL, 4, parse_uint,
+ FLAG_ARRAY, 2 },
+ { "checksum", &set_sb.s_checksum, NULL, 4, parse_uint },
+ { "checksum_type", &set_sb.s_checksum_type, NULL, 1, parse_uint },
+ { "encryption_level", &set_sb.s_encryption_level, NULL, 1, parse_uint },
+ { "error_count", &set_sb.s_error_count, NULL, 4, parse_uint },
+ { "first_error_time", &set_sb.s_first_error_time, NULL, 4, parse_time },
+ { "first_error_ino", &set_sb.s_first_error_ino, NULL, 4, parse_uint },
+ { "first_error_block", &set_sb.s_first_error_block, NULL, 8, parse_uint },
+ { "first_error_func", &set_sb.s_first_error_func, NULL, 32, parse_string },
+ { "first_error_line", &set_sb.s_first_error_line, NULL, 4, parse_uint },
+ { "last_error_time", &set_sb.s_last_error_time, NULL, 4, parse_time },
+ { "last_error_ino", &set_sb.s_last_error_ino, NULL, 4, parse_uint },
+ { "last_error_block", &set_sb.s_last_error_block, NULL, 8, parse_uint },
+ { "last_error_func", &set_sb.s_last_error_func, NULL, 32, parse_string },
+ { "last_error_line", &set_sb.s_last_error_line, NULL, 4, parse_uint },
+ { "encrypt_algos", &set_sb.s_encrypt_algos, NULL, 1, parse_uint,
+ FLAG_ARRAY, 4 },
+ { "encrypt_pw_salt", &set_sb.s_encrypt_pw_salt, NULL, 16, parse_uuid },
+ { "lpf_ino", &set_sb.s_lpf_ino, NULL, 4, parse_uint },
+ { "checksum_seed", &set_sb.s_checksum_seed, NULL, 4, parse_uint },
+ { "encoding", &set_sb.s_encoding, NULL, 2, parse_encoding },
+ { "orphan_file_inum", &set_sb.s_orphan_file_inum, NULL, 4, parse_uint },
+ { 0, 0, 0, 0 }
+};
+
+static struct field_set_info inode_fields[] = {
+ { "mode", &set_inode.i_mode, NULL, 2, parse_uint },
+ { "uid", &set_inode.i_uid, &set_inode.osd2.linux2.l_i_uid_high,
+ 2, parse_uint },
+ { "size", &set_inode.i_size, &set_inode.i_size_high, 4, parse_uint },
+ { "atime", &set_inode.i_atime, &set_inode.i_atime_extra,
+ 4, parse_time },
+ { "ctime", &set_inode.i_ctime, &set_inode.i_ctime_extra,
+ 4, parse_time },
+ { "mtime", &set_inode.i_mtime, &set_inode.i_mtime_extra,
+ 4, parse_time },
+ { "dtime", &set_inode.i_dtime, NULL,
+ 4, parse_time },
+ { "gid", &set_inode.i_gid, &set_inode.osd2.linux2.l_i_gid_high,
+ 2, parse_uint },
+ { "links_count", &set_inode.i_links_count, NULL, 2, parse_uint },
+ /* Special case: i_blocks is 4 bytes, i_blocks_high is 2 bytes */
+ { "blocks", &set_inode.i_blocks, &set_inode.osd2.linux2.l_i_blocks_hi,
+ 6, parse_uint },
+ { "flags", &set_inode.i_flags, NULL, 4, parse_uint },
+ { "version", &set_inode.osd1.linux1.l_i_version,
+ &set_inode.i_version_hi, 4, parse_uint },
+ { "translator", &set_inode.osd1.hurd1.h_i_translator, NULL,
+ 4, parse_uint, FLAG_ALIAS },
+ { "block", &set_inode.i_block[0], NULL, 4, parse_uint, FLAG_ARRAY,
+ EXT2_NDIR_BLOCKS },
+ { "block[IND]", &set_inode.i_block[EXT2_IND_BLOCK], NULL, 4, parse_uint },
+ { "block[DIND]", &set_inode.i_block[EXT2_DIND_BLOCK], NULL, 4, parse_uint },
+ { "block[TIND]", &set_inode.i_block[EXT2_TIND_BLOCK], NULL, 4, parse_uint },
+ { "generation", &set_inode.i_generation, NULL, 4, parse_uint },
+ /* Special case: i_file_acl_high is 2 bytes */
+ { "file_acl", &set_inode.i_file_acl,
+ &set_inode.osd2.linux2.l_i_file_acl_high, 6, parse_uint },
+ { "faddr", &set_inode.i_faddr, NULL, 4, parse_uint },
+ { "frag", &set_inode.osd2.hurd2.h_i_frag, NULL, 1, parse_uint, FLAG_ALIAS },
+ { "fsize", &set_inode.osd2.hurd2.h_i_fsize, NULL, 1, parse_uint },
+ { "checksum", &set_inode.osd2.linux2.l_i_checksum_lo,
+ &set_inode.i_checksum_hi, 2, parse_inode_csum, FLAG_CSUM },
+ { "author", &set_inode.osd2.hurd2.h_i_author, NULL,
+ 4, parse_uint, FLAG_ALIAS },
+ { "extra_isize", &set_inode.i_extra_isize, NULL,
+ 2, parse_uint },
+ { "ctime_extra", &set_inode.i_ctime_extra, NULL,
+ 4, parse_uint, FLAG_ALIAS },
+ { "mtime_extra", &set_inode.i_mtime_extra, NULL,
+ 4, parse_uint, FLAG_ALIAS },
+ { "atime_extra", &set_inode.i_atime_extra, NULL,
+ 4, parse_uint, FLAG_ALIAS },
+ { "crtime", &set_inode.i_crtime, &set_inode.i_crtime_extra,
+ 4, parse_time },
+ { "crtime_extra", &set_inode.i_crtime_extra, NULL,
+ 4, parse_uint, FLAG_ALIAS },
+ { "projid", &set_inode.i_projid, NULL, 4, parse_uint },
+ { "bmap", NULL, NULL, 4, parse_bmap, FLAG_ARRAY },
+ { 0, 0, 0, 0 }
+};
+
+static struct field_set_info ext2_bg_fields[] = {
+ { "block_bitmap", &set_gd.bg_block_bitmap, NULL, 4, parse_uint },
+ { "inode_bitmap", &set_gd.bg_inode_bitmap, NULL, 4, parse_uint },
+ { "inode_table", &set_gd.bg_inode_table, NULL, 4, parse_uint },
+ { "free_blocks_count", &set_gd.bg_free_blocks_count, NULL, 2, parse_uint },
+ { "free_inodes_count", &set_gd.bg_free_inodes_count, NULL, 2, parse_uint },
+ { "used_dirs_count", &set_gd.bg_used_dirs_count, NULL, 2, parse_uint },
+ { "flags", &set_gd.bg_flags, NULL, 2, parse_uint },
+ { "itable_unused", &set_gd.bg_itable_unused, NULL, 2, parse_uint },
+ { "checksum", &set_gd.bg_checksum, NULL, 2, parse_gd_csum },
+ { 0, 0, 0, 0 }
+};
+
+static struct field_set_info ext4_bg_fields[] = {
+ { "block_bitmap", &set_gd4.bg_block_bitmap,
+ &set_gd4.bg_block_bitmap_hi, 4, parse_uint },
+ { "inode_bitmap", &set_gd4.bg_inode_bitmap,
+ &set_gd4.bg_inode_bitmap_hi, 4, parse_uint },
+ { "inode_table", &set_gd4.bg_inode_table,
+ &set_gd4.bg_inode_table_hi, 4, parse_uint },
+ { "free_blocks_count", &set_gd4.bg_free_blocks_count,
+ &set_gd4.bg_free_blocks_count_hi, 2, parse_uint },
+ { "free_inodes_count", &set_gd4.bg_free_inodes_count,
+ &set_gd4.bg_free_inodes_count_hi, 2, parse_uint },
+ { "used_dirs_count", &set_gd4.bg_used_dirs_count,
+ &set_gd4.bg_used_dirs_count_hi, 2, parse_uint },
+ { "flags", &set_gd4.bg_flags, NULL, 2, parse_uint },
+ { "exclude_bitmap", &set_gd4.bg_exclude_bitmap_lo,
+ &set_gd4.bg_exclude_bitmap_hi, 4, parse_uint },
+ { "block_bitmap_csum", &set_gd4.bg_block_bitmap_csum_lo,
+ &set_gd4.bg_block_bitmap_csum_hi, 2, parse_uint },
+ { "inode_bitmap_csum", &set_gd4.bg_inode_bitmap_csum_lo,
+ &set_gd4.bg_inode_bitmap_csum_hi, 2, parse_uint },
+ { "itable_unused", &set_gd4.bg_itable_unused,
+ &set_gd4.bg_itable_unused_hi, 2, parse_uint },
+ { "checksum", &set_gd4.bg_checksum, NULL, 2, parse_gd_csum },
+ { 0, 0, 0, 0 }
+};
+
+static struct field_set_info mmp_fields[] = {
+ { "clear", &set_mmp.mmp_magic, NULL, sizeof(set_mmp),
+ parse_mmp_clear, FLAG_ALIAS },
+ { "magic", &set_mmp.mmp_magic, NULL, 4, parse_uint },
+ { "seq", &set_mmp.mmp_seq, NULL, 4, parse_uint },
+ { "time", &set_mmp.mmp_time, NULL, 8, parse_uint },
+ { "nodename", &set_mmp.mmp_nodename, NULL, sizeof(set_mmp.mmp_nodename),
+ parse_string },
+ { "bdevname", &set_mmp.mmp_bdevname, NULL, sizeof(set_mmp.mmp_bdevname),
+ parse_string },
+ { "check_interval", &set_mmp.mmp_check_interval, NULL, 2, parse_uint },
+ { "checksum", &set_mmp.mmp_checksum, NULL, 4, parse_uint },
+ { 0, 0, 0, 0 }
+};
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+
+#ifdef UNITTEST
+
+
+static void do_verify_field_set_info(struct field_set_info *fields,
+ const void *data, size_t size)
+{
+ struct field_set_info *ss, *ss2;
+ const char *begin = (char *)data;
+ const char *end = begin + size;
+
+ for (ss = fields ; ss->name ; ss++) {
+ const char *ptr;
+
+ /* Check pointers */
+ ptr = ss->ptr;
+ assert(!ptr || (ptr >= begin && ptr < end));
+ ptr = ss->ptr2;
+ assert(!ptr || (ptr >= begin && ptr < end));
+
+ /* Check function */
+ assert(ss->func);
+
+ for (ss2 = fields ; ss2 != ss ; ss2++) {
+ /* Check duplicate names */
+ assert(strcmp(ss->name, ss2->name));
+
+ if (ss->flags & FLAG_ALIAS || ss2->flags & FLAG_ALIAS)
+ continue;
+ /* Check false aliases, might be copy-n-paste error */
+ assert(!ss->ptr || (ss->ptr != ss2->ptr &&
+ ss->ptr != ss2->ptr2));
+ assert(!ss->ptr2 || (ss->ptr2 != ss2->ptr &&
+ ss->ptr2 != ss2->ptr2));
+ }
+ }
+}
+
+int main(int argc, char **argv)
+{
+ do_verify_field_set_info(super_fields, &set_sb, sizeof(set_sb));
+ do_verify_field_set_info(inode_fields, &set_inode, sizeof(set_inode));
+ do_verify_field_set_info(ext2_bg_fields, &set_gd, sizeof(set_gd));
+ do_verify_field_set_info(ext4_bg_fields, &set_gd4, sizeof(set_gd4));
+ do_verify_field_set_info(mmp_fields, &set_mmp, sizeof(set_mmp));
+ return 0;
+}
+
+ext2_filsys current_fs;
+ext2_ino_t root, cwd;
+
+#endif /* UNITTEST */
+
+static int check_suffix(const char *field)
+{
+ int len = strlen(field);
+
+ if (len <= 3)
+ return 0;
+ field += len-3;
+ if (!strcmp(field, "_lo"))
+ return 1;
+ if (!strcmp(field, "_hi"))
+ return 2;
+ return 0;
+}
+
+static struct field_set_info *find_field(struct field_set_info *fields,
+ char *field)
+{
+ struct field_set_info *ss;
+ const char *prefix;
+ char *arg, *delim, *idx, *tmp;
+ int suffix, prefix_len;
+
+ if (fields == super_fields)
+ prefix = "s_";
+ else if (fields == inode_fields)
+ prefix = "i_";
+ else
+ prefix = "bg_";
+ prefix_len = strlen(prefix);
+ if (strncmp(field, prefix, prefix_len) == 0)
+ field += prefix_len;
+
+ arg = malloc(strlen(field)+1);
+ if (!arg)
+ return NULL;
+ strcpy(arg, field);
+
+ idx = strchr(arg, '[');
+ if (idx) {
+ *idx++ = 0;
+ delim = idx + strlen(idx) - 1;
+ if (!*idx || *delim != ']')
+ idx = 0;
+ else
+ *delim = 0;
+ }
+ /*
+ * Can we parse the number?
+ */
+ if (idx) {
+ array_idx = strtol(idx, &tmp, 0);
+ if (*tmp) {
+ *(--idx) = '[';
+ *delim = ']';
+ idx = 0;
+ }
+ }
+
+ /*
+ * If there is a valid _hi or a _lo suffix, strip it off
+ */
+ suffix = check_suffix(arg);
+ if (suffix > 0)
+ arg[strlen(arg)-3] = 0;
+
+ for (ss = fields ; ss->name ; ss++) {
+ if (suffix && ss->ptr2 == 0)
+ continue;
+ if (ss->flags & FLAG_ARRAY) {
+ if (!idx || (strcmp(ss->name, arg) != 0))
+ continue;
+ if (ss->max_idx > 0 && array_idx >= ss->max_idx)
+ continue;
+ } else {
+ if (strcmp(ss->name, arg) != 0)
+ continue;
+ }
+ free(arg);
+ return ss;
+ }
+ free(arg);
+ return NULL;
+}
+
+/*
+ * Note: info->size == 6 is special; this means a base size 4 bytes,
+ * and secondary (high) size of 2 bytes. This is needed for the
+ * special case of i_blocks_high and i_file_acl_high.
+ */
+static errcode_t parse_uint(struct field_set_info *info, char *field,
+ char *arg)
+{
+ unsigned long long n, num, mask, limit;
+ int suffix = check_suffix(field);
+ char *tmp;
+ void *field1 = info->ptr, *field2 = info->ptr2;
+ int size = (info->size == 6) ? 4 : info->size;
+ union {
+ __u64 *ptr64;
+ __u32 *ptr32;
+ __u16 *ptr16;
+ __u8 *ptr8;
+ } u;
+
+ if (suffix == 1)
+ field2 = 0;
+ if (suffix == 2) {
+ field1 = field2;
+ field2 = 0;
+ }
+
+ u.ptr8 = (__u8 *) field1;
+ if (info->flags & FLAG_ARRAY)
+ u.ptr8 += array_idx * info->size;
+
+ errno = 0;
+ num = STRTOULL(arg, &tmp, 0);
+ if (*tmp || errno) {
+ fprintf(stderr, "Couldn't parse '%s' for field %s.\n",
+ arg, info->name);
+ return EINVAL;
+ }
+ mask = ~0ULL >> ((8 - size) * 8);
+ limit = ~0ULL >> ((8 - info->size) * 8);
+ if (field2 && info->size != 6)
+ limit = ~0ULL >> ((8 - info->size*2) * 8);
+
+ if (num > limit) {
+ fprintf(stderr, "Value '%s' exceeds field %s maximum %llu.\n",
+ arg, info->name, limit);
+ return EINVAL;
+ }
+ n = num & mask;
+ switch (size) {
+ case 8:
+ *u.ptr64 = n;
+ break;
+ case 4:
+ *u.ptr32 = n;
+ break;
+ case 2:
+ *u.ptr16 = n;
+ break;
+ case 1:
+ *u.ptr8 = n;
+ break;
+ }
+ if (!field2)
+ return 0;
+ n = (size == 8) ? 0 : (num >> (size*8));
+ u.ptr8 = (__u8 *) field2;
+ if (info->size == 6)
+ size = 2;
+ switch (size) {
+ case 8:
+ /* Should never get here */
+ fprintf(stderr, "64-bit field %s has a second 64-bit field\n"
+ "defined; BUG?!?\n", info->name);
+ *u.ptr64 = 0;
+ break;
+ case 4:
+ *u.ptr32 = n;
+ break;
+ case 2:
+ *u.ptr16 = n;
+ break;
+ case 1:
+ *u.ptr8 = n;
+ break;
+ }
+ return 0;
+}
+
+static errcode_t parse_int(struct field_set_info *info,
+ char *field EXT2FS_ATTR((unused)), char *arg)
+{
+ long num;
+ char *tmp;
+ __s32 *ptr32;
+ __s16 *ptr16;
+ __s8 *ptr8;
+
+ num = strtol(arg, &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, "Couldn't parse '%s' for field %s.\n",
+ arg, info->name);
+ return EINVAL;
+ }
+ switch (info->size) {
+ case 4:
+ ptr32 = (__s32 *) info->ptr;
+ *ptr32 = num;
+ break;
+ case 2:
+ ptr16 = (__s16 *) info->ptr;
+ *ptr16 = num;
+ break;
+ case 1:
+ ptr8 = (__s8 *) info->ptr;
+ *ptr8 = num;
+ break;
+ }
+ return 0;
+}
+
+static errcode_t parse_string(struct field_set_info *info,
+ char *field EXT2FS_ATTR((unused)), char *arg)
+{
+ char *cp = (char *) info->ptr;
+
+ if (strlen(arg) >= info->size) {
+ fprintf(stderr, "Error maximum size for %s is %d.\n",
+ info->name, info->size);
+ return EINVAL;
+ }
+ strcpy(cp, arg);
+ return 0;
+}
+
+static errcode_t parse_time(struct field_set_info *info,
+ char *field, char *arg)
+{
+ __s64 t;
+ __u32 t_low, t_high;
+ __u32 *ptr_low, *ptr_high;
+
+ if (check_suffix(field))
+ return parse_uint(info, field, arg);
+
+ ptr_low = (__u32 *) info->ptr;
+ ptr_high = (__u32 *) info->ptr2;
+
+ t = string_to_time(arg);
+
+ if (t == -1) {
+ fprintf(stderr, "Couldn't parse '%s' for field %s.\n",
+ arg, info->name);
+ return EINVAL;
+ }
+ t_low = (__u32) t;
+ t_high = ((t - (__s32)t) >> 32) & EXT4_EPOCH_MASK;
+ *ptr_low = t_low;
+ if (ptr_high)
+ *ptr_high = (*ptr_high & ~EXT4_EPOCH_MASK) | t_high;
+ return 0;
+}
+
+static errcode_t parse_uuid(struct field_set_info *info,
+ char *field EXT2FS_ATTR((unused)), char *arg)
+{
+ unsigned char * p = (unsigned char *) info->ptr;
+
+ if ((strcasecmp(arg, "null") == 0) ||
+ (strcasecmp(arg, "clear") == 0)) {
+ uuid_clear(p);
+ } else if (strcasecmp(arg, "time") == 0) {
+ uuid_generate_time(p);
+ } else if (strcasecmp(arg, "random") == 0) {
+ uuid_generate(p);
+ } else if (uuid_parse(arg, p)) {
+ fprintf(stderr, "Invalid UUID format: %s\n", arg);
+ return EINVAL;
+ }
+ return 0;
+}
+
+static errcode_t parse_hashalg(struct field_set_info *info,
+ char *field EXT2FS_ATTR((unused)), char *arg)
+{
+ int hashv;
+ unsigned char *p = (unsigned char *) info->ptr;
+
+ hashv = e2p_string2hash(arg);
+ if (hashv < 0) {
+ fprintf(stderr, "Invalid hash algorithm: %s\n", arg);
+ return EINVAL;
+ }
+ *p = hashv;
+ return 0;
+}
+
+static errcode_t parse_encoding(struct field_set_info *info,
+ char *field EXT2FS_ATTR((unused)), char *arg)
+{
+ int encoding;
+ unsigned char *p = (unsigned char *) info->ptr;
+
+ encoding = e2p_str2encoding(arg);
+ if (encoding < 0)
+ return parse_uint(info, field, arg);
+ *p = encoding;
+ return 0;
+}
+
+static errcode_t parse_bmap(struct field_set_info *info,
+ char *field EXT2FS_ATTR((unused)), char *arg)
+{
+ blk64_t blk;
+ errcode_t retval;
+ char *tmp;
+
+ blk = strtoull(arg, &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, "Couldn't parse '%s' for field %s.\n",
+ arg, info->name);
+ return EINVAL;
+ }
+
+ retval = ext2fs_bmap2(current_fs, set_ino,
+ (struct ext2_inode *) &set_inode,
+ NULL, BMAP_ALLOC | BMAP_SET, array_idx, NULL,
+ &blk);
+ if (retval) {
+ com_err("set_inode", retval, "while setting block map");
+ }
+ return retval;
+}
+
+static errcode_t parse_gd_csum(struct field_set_info *info, char *field,
+ char *arg)
+{
+ __u16 *checksum = info->ptr;
+
+ if (strcmp(arg, "calc") == 0) {
+ *checksum = ext2fs_group_desc_csum(current_fs, set_bg);
+ printf("Checksum set to 0x%04x\n", *checksum);
+ return 0;
+ }
+ return parse_uint(info, field, arg);
+}
+
+static errcode_t parse_inode_csum(struct field_set_info *info, char *field,
+ char *arg)
+{
+ errcode_t retval = 0;
+ __u32 crc;
+ int is_large_inode = 0;
+
+ if (strcmp(arg, "calc") == 0) {
+ size_t sz = EXT2_INODE_SIZE(current_fs->super);
+ struct ext2_inode_large *tmp_inode = NULL;
+
+ retval = ext2fs_get_mem(sz, &tmp_inode);
+ if (retval)
+ goto out;
+
+ retval = ext2fs_read_inode_full(current_fs, set_ino,
+ (struct ext2_inode *) tmp_inode,
+ sz);
+ if (retval)
+ goto out;
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_inode_full(current_fs, tmp_inode,
+ tmp_inode, 1, sz);
+#endif
+
+ if (sz > EXT2_GOOD_OLD_INODE_SIZE)
+ is_large_inode = 1;
+
+ retval = ext2fs_inode_csum_set(current_fs, set_ino,
+ tmp_inode);
+ if (retval)
+ goto out;
+#ifdef WORDS_BIGENDIAN
+ crc = set_inode.i_checksum_lo =
+ ext2fs_swab16(tmp_inode->i_checksum_lo);
+
+#else
+ crc = set_inode.i_checksum_lo = tmp_inode->i_checksum_lo;
+#endif
+ if (is_large_inode &&
+ set_inode.i_extra_isize >=
+ (offsetof(struct ext2_inode_large,
+ i_checksum_hi) -
+ EXT2_GOOD_OLD_INODE_SIZE)) {
+#ifdef WORDS_BIGENDIAN
+ set_inode.i_checksum_lo =
+ ext2fs_swab16(tmp_inode->i_checksum_lo);
+#else
+ set_inode.i_checksum_hi = tmp_inode->i_checksum_hi;
+#endif
+ crc |= ((__u32)set_inode.i_checksum_hi) << 16;
+ }
+ printf("Checksum set to 0x%08x\n", crc);
+ out:
+ ext2fs_free_mem(&tmp_inode);
+ return retval;
+ }
+ return parse_uint(info, field, arg);
+}
+
+static void print_possible_fields(struct field_set_info *fields)
+{
+ struct field_set_info *ss;
+ const char *type, *cmd;
+ FILE *f;
+ char name[40], idx[40];
+
+ if (fields == super_fields) {
+ type = "Superblock";
+ cmd = "set_super_value";
+ } else if (fields == inode_fields) {
+ type = "Inode";
+ cmd = "set_inode";
+ } else if (fields == mmp_fields) {
+ type = "MMP";
+ cmd = "set_mmp_value";
+ } else {
+ type = "Block group descriptor";
+ cmd = "set_block_group";
+ }
+ f = open_pager();
+
+ fprintf(f, "%s fields supported by the %s command:\n", type, cmd);
+
+ for (ss = fields ; ss->name ; ss++) {
+ type = "unknown";
+ if (ss->func == parse_string)
+ type = "string";
+ else if (ss->func == parse_int)
+ type = "integer";
+ else if (ss->func == parse_uint)
+ type = "unsigned integer";
+ else if (ss->func == parse_uuid)
+ type = "UUID";
+ else if (ss->func == parse_hashalg)
+ type = "hash algorithm";
+ else if (ss->func == parse_time)
+ type = "date/time";
+ else if (ss->func == parse_bmap)
+ type = "set physical->logical block map";
+ else if (ss->func == parse_gd_csum)
+ type = "unsigned integer OR \"calc\"";
+ strcpy(name, ss->name);
+ if (ss->flags & FLAG_ARRAY) {
+ if (ss->max_idx > 0)
+ sprintf(idx, "[%d]", ss->max_idx);
+ else
+ strcpy(idx, "[]");
+ strcat(name, idx);
+ }
+ if (ss->ptr2)
+ strcat(name, "[_hi|_lo]");
+ fprintf(f, "\t%-25s\t%s\n", name, type);
+ }
+ close_pager(f);
+}
+
+
+void do_set_super(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "<field> <value>\n"
+ "\t\"set_super_value -l\" will list the names of "
+ "superblock fields\n\twhich can be set.";
+ static struct field_set_info *ss;
+
+ if ((argc == 2) && !strcmp(argv[1], "-l")) {
+ print_possible_fields(super_fields);
+ return;
+ }
+
+ if (common_args_process(argc, argv, 3, 3, "set_super_value",
+ usage, CHECK_FS_RW))
+ return;
+
+ if ((ss = find_field(super_fields, argv[1])) == 0) {
+ com_err(argv[0], 0, "invalid field specifier: %s", argv[1]);
+ return;
+ }
+ set_sb = *current_fs->super;
+ if (ss->func(ss, argv[1], argv[2]) == 0) {
+ *current_fs->super = set_sb;
+ ext2fs_mark_super_dirty(current_fs);
+ }
+}
+
+void do_set_inode(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "<inode> <field> <value>\n"
+ "\t\"set_inode_field -l\" will list the names of "
+ "the fields in an ext2 inode\n\twhich can be set.";
+ static struct field_set_info *ss;
+
+ if ((argc == 2) && !strcmp(argv[1], "-l")) {
+ print_possible_fields(inode_fields);
+ return;
+ }
+
+ if (common_args_process(argc, argv, 4, 4, "set_inode",
+ usage, CHECK_FS_RW))
+ return;
+
+ if ((ss = find_field(inode_fields, argv[2])) == 0) {
+ com_err(argv[0], 0, "invalid field specifier: %s", argv[2]);
+ return;
+ }
+
+ set_ino = string_to_inode(argv[1]);
+ if (!set_ino)
+ return;
+
+ if (debugfs_read_inode2(set_ino,
+ (struct ext2_inode *) &set_inode, argv[1],
+ sizeof(set_inode),
+ (ss->flags & FLAG_CSUM) ?
+ READ_INODE_NOCSUM : 0))
+ return;
+
+ if (ss->func(ss, argv[2], argv[3]) == 0) {
+ debugfs_write_inode2(set_ino,
+ (struct ext2_inode *) &set_inode,
+ argv[1], sizeof(set_inode),
+ (ss->flags & FLAG_CSUM) ?
+ WRITE_INODE_NOCSUM : 0);
+ }
+}
+
+void do_set_block_group_descriptor(int argc, char *argv[],
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "<bg number> <field> <value>\n"
+ "\t\"set_block_group -l\" will list the names of "
+ "the fields in a block group descriptor\n\twhich can be set.";
+ struct field_set_info *table;
+ struct field_set_info *ss;
+ char *end;
+ void *edit, *target;
+ int size;
+
+ /*
+ * Determine whether we are editing an ext2 or ext4 block group
+ * descriptor. Descriptors larger than ext4_group_desc cannot
+ * have their fields edited yet, because they do not have any
+ * names assigned. When that happens, this function needs to
+ * be updated for the new descriptor struct and fields.
+ */
+ if (current_fs &&
+ EXT2_DESC_SIZE(current_fs->super) >= EXT2_MIN_DESC_SIZE_64BIT) {
+ table = ext4_bg_fields;
+ edit = &set_gd4;
+ size = sizeof(set_gd4);
+ } else {
+ table = ext2_bg_fields;
+ edit = &set_gd;
+ size = sizeof(set_gd);
+ }
+
+ if ((argc == 2) && !strcmp(argv[1], "-l")) {
+ print_possible_fields(table);
+ return;
+ }
+
+ if (common_args_process(argc, argv, 4, 4, "set_block_group",
+ usage, CHECK_FS_RW))
+ return;
+
+ set_bg = strtoul(argv[1], &end, 0);
+ if (*end) {
+ com_err(argv[0], 0, "invalid block group number: %s", argv[1]);
+ return;
+ }
+
+ if (set_bg >= current_fs->group_desc_count) {
+ com_err(argv[0], 0, "block group number too big: %d", set_bg);
+ return;
+ }
+
+ if ((ss = find_field(table, argv[2])) == 0) {
+ com_err(argv[0], 0, "invalid field specifier: %s", argv[2]);
+ return;
+ }
+
+ target = ext2fs_group_desc(current_fs, current_fs->group_desc, set_bg);
+ memcpy(edit, target, size);
+ if (ss->func(ss, argv[2], argv[3]) == 0) {
+ memcpy(target, edit, size);
+ ext2fs_mark_super_dirty(current_fs);
+ }
+}
+
+static errcode_t parse_mmp_clear(struct field_set_info *info,
+ char *field EXT2FS_ATTR((unused)),
+ char *arg EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ retval = ext2fs_mmp_clear(current_fs);
+ if (retval != 0)
+ com_err("set_mmp_value", retval, "while clearing MMP block\n");
+ else
+ memcpy(info->ptr, current_fs->mmp_buf, info->size);
+
+ return 1; /* we don't need the MMP block written again */
+}
+
+#ifdef CONFIG_MMP
+void do_set_mmp_value(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "<field> <value>\n"
+ "\t\"set_mmp_value -l\" will list the names of "
+ "MMP fields\n\twhich can be set.";
+ static struct field_set_info *smmp;
+ struct mmp_struct *mmp_s;
+ errcode_t retval;
+
+ if (argc == 2 && strcmp(argv[1], "-l") == 0) {
+ print_possible_fields(mmp_fields);
+ return;
+ }
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (current_fs->super->s_mmp_block == 0) {
+ com_err(argv[0], 0, "no MMP block allocated\n");
+ return;
+ }
+
+ if (common_args_process(argc, argv, 2, 3, "set_mmp_value",
+ usage, CHECK_FS_RW))
+ return;
+
+ mmp_s = current_fs->mmp_buf;
+ if (mmp_s == NULL) {
+ retval = ext2fs_get_mem(current_fs->blocksize, &mmp_s);
+ if (retval) {
+ com_err(argv[0], retval, "allocating MMP buffer\n");
+ return;
+ }
+ retval = ext2fs_mmp_read(current_fs,
+ current_fs->super->s_mmp_block, mmp_s);
+ if (retval) {
+ com_err(argv[0], retval, "reading MMP block %llu.\n",
+ (long long)current_fs->super->s_mmp_block);
+ ext2fs_free_mem(&mmp_s);
+ return;
+ }
+ current_fs->mmp_buf = mmp_s;
+ }
+
+ smmp = find_field(mmp_fields, argv[1]);
+ if (smmp == 0) {
+ com_err(argv[0], 0, "invalid field specifier: %s", argv[1]);
+ return;
+ }
+
+ set_mmp = *mmp_s;
+ if (smmp->func(smmp, argv[1], argv[2]) == 0) {
+ ext2fs_mmp_write(current_fs, current_fs->super->s_mmp_block,
+ &set_mmp);
+ *mmp_s = set_mmp;
+ }
+}
+#else
+void do_set_mmp_value(int argc EXT2FS_ATTR((unused)),
+ char *argv[] EXT2FS_ATTR((unused)),
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ fprintf(stdout, "MMP is unsupported, please recompile with "
+ "--enable-mmp\n");
+}
+#endif
+
diff --git a/debugfs/unused.c b/debugfs/unused.c
new file mode 100644
index 0000000..08191a0
--- /dev/null
+++ b/debugfs/unused.c
@@ -0,0 +1,60 @@
+/*
+ * unused.c --- quick and dirty unused space dumper
+ *
+ * Copyright (C) 1997 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+void do_dump_unused(int argc EXT2FS_ATTR((unused)), char **argv,
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ blk64_t blk;
+ unsigned char buf[EXT2_MAX_BLOCK_SIZE];
+ unsigned int i;
+ errcode_t retval;
+
+ if (common_args_process(argc, argv, 1, 1,
+ "dump_unused", "", 0))
+ return;
+
+ for (blk=current_fs->super->s_first_data_block;
+ blk < ext2fs_blocks_count(current_fs->super); blk++) {
+ if (ext2fs_test_block_bitmap2(current_fs->block_map,blk))
+ continue;
+ retval = io_channel_read_blk64(current_fs->io, blk, 1, buf);
+ if (retval) {
+ com_err(argv[0], retval, "While reading block\n");
+ return;
+ }
+ for (i=0; i < current_fs->blocksize; i++)
+ if (buf[i])
+ break;
+ if (i >= current_fs->blocksize)
+ continue;
+ printf("\nUnused block %llu contains non-zero data:\n\n",
+ (unsigned long long) blk);
+ for (i=0; i < current_fs->blocksize; i++)
+ fputc(buf[i], stdout);
+ }
+}
diff --git a/debugfs/util.c b/debugfs/util.c
new file mode 100644
index 0000000..9e88054
--- /dev/null
+++ b/debugfs/util.c
@@ -0,0 +1,600 @@
+/*
+ * util.c --- utilities for the debugfs program
+ *
+ * Copyright (C) 1993, 1994 Theodore Ts'o. This file may be
+ * redistributed under the terms of the GNU Public License.
+ *
+ */
+
+#define _XOPEN_SOURCE 600 /* needed for strptime */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#include <signal.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+#ifdef HAVE_OPTRESET
+extern int optreset; /* defined by BSD, but not others */
+#endif
+
+#include "ss/ss.h"
+#include "debugfs.h"
+
+/*
+ * This function resets the libc getopt() function, which keeps
+ * internal state. Bad design! Stupid libc API designers! No
+ * biscuit!
+ *
+ * BSD-derived getopt() functions require that optind be reset to 1 in
+ * order to reset getopt() state. This used to be generally accepted
+ * way of resetting getopt(). However, glibc's getopt()
+ * has additional getopt() state beyond optind, and requires that
+ * optind be set zero to reset its state. So the unfortunate state of
+ * affairs is that BSD-derived versions of getopt() misbehave if
+ * optind is set to 0 in order to reset getopt(), and glibc's getopt()
+ * will core dump if optind is set 1 in order to reset getopt().
+ *
+ * More modern versions of BSD require that optreset be set to 1 in
+ * order to reset getopt(). Sigh. Standards, anyone?
+ *
+ * We hide the hair here.
+ */
+void reset_getopt(void)
+{
+#if defined(__GLIBC__) || defined(__linux__)
+ optind = 0;
+#else
+ optind = 1;
+#endif
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+}
+
+static const char *pager_search_list[] = { "pager", "more", "less", 0 };
+static const char *pager_dir_list[] = { "/usr/bin", "/bin", 0 };
+
+static const char *find_pager(char *buf)
+{
+ const char **i, **j;
+
+ for (i = pager_search_list; *i; i++) {
+ for (j = pager_dir_list; *j; j++) {
+ sprintf(buf, "%s/%s", *j, *i);
+ if (access(buf, X_OK) == 0)
+ return(buf);
+ }
+ }
+ return 0;
+}
+
+FILE *open_pager(void)
+{
+ FILE *outfile = 0;
+ const char *pager = ss_safe_getenv("DEBUGFS_PAGER");
+ char buf[80];
+
+ signal(SIGPIPE, SIG_IGN);
+ if (!isatty(1))
+ return stdout;
+ if (!pager)
+ pager = ss_safe_getenv("PAGER");
+ if (!pager)
+ pager = find_pager(buf);
+ if (!pager ||
+ (strcmp(pager, "__none__") == 0) ||
+ ((outfile = popen(pager, "w")) == 0))
+ return stdout;
+ return outfile;
+}
+
+void close_pager(FILE *stream)
+{
+ if (stream && stream != stdout) pclose(stream);
+}
+
+/*
+ * This routine is used whenever a command needs to turn a string into
+ * an inode.
+ */
+ext2_ino_t string_to_inode(char *str)
+{
+ ext2_ino_t ino;
+ int len = strlen(str);
+ char *end;
+ int retval;
+
+ /*
+ * If the string is of the form <ino>, then treat it as an
+ * inode number.
+ */
+ if ((len > 2) && (str[0] == '<') && (str[len-1] == '>')) {
+ ino = strtoul(str+1, &end, 0);
+ if (*end=='>' && (ino <= current_fs->super->s_inodes_count))
+ return ino;
+ }
+
+ retval = ext2fs_namei(current_fs, root, cwd, str, &ino);
+ if (retval) {
+ com_err(str, retval, 0);
+ return 0;
+ }
+ if (ino > current_fs->super->s_inodes_count) {
+ com_err(str, 0, "resolves to an illegal inode number: %u\n",
+ ino);
+ return 0;
+ }
+ return ino;
+}
+
+/*
+ * This routine returns 1 if the filesystem is not open, and prints an
+ * error message to that effect.
+ */
+int check_fs_open(char *name)
+{
+ if (!current_fs) {
+ com_err(name, 0, "Filesystem not open");
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * This routine returns 1 if a filesystem is open, and prints an
+ * error message to that effect.
+ */
+int check_fs_not_open(char *name)
+{
+ if (current_fs) {
+ com_err(name, 0,
+ "Filesystem %s is still open. Close it first.\n",
+ current_fs->device_name);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * This routine returns 1 if a filesystem is not opened read/write,
+ * and prints an error message to that effect.
+ */
+int check_fs_read_write(char *name)
+{
+ if (!(current_fs->flags & EXT2_FLAG_RW)) {
+ com_err(name, 0, "Filesystem opened read/only");
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * This routine returns 1 if a filesystem is doesn't have its inode
+ * and block bitmaps loaded, and prints an error message to that
+ * effect.
+ */
+int check_fs_bitmaps(char *name)
+{
+ if (!current_fs->block_map || !current_fs->inode_map) {
+ com_err(name, 0, "Filesystem bitmaps not loaded");
+ return 1;
+ }
+ return 0;
+}
+
+char *inode_time_to_string(__u32 xtime, __u32 xtime_extra)
+{
+ __s64 t = (__s32) xtime;
+
+ t += (__s64) (xtime_extra & EXT4_EPOCH_MASK) << 32;
+ return time_to_string(t);
+}
+
+/*
+ * This function takes a __s64 time value and converts it to a string,
+ * using ctime
+ */
+char *time_to_string(__s64 cl)
+{
+ static int do_gmt = -1;
+ time_t t = (time_t) cl;
+ const char *tz;
+
+ if (do_gmt == -1) {
+ /* The diet libc doesn't respect the TZ environment variable */
+ tz = ss_safe_getenv("TZ");
+ if (!tz)
+ tz = "";
+ do_gmt = !strcmp(tz, "GMT") || !strcmp(tz, "GMT0");
+ }
+
+ return asctime((do_gmt) ? gmtime(&t) : localtime(&t));
+}
+
+/*
+ * Parse a string as a time. Return ((time_t)-1) if the string
+ * doesn't appear to be a sane time.
+ */
+extern __s64 string_to_time(const char *arg)
+{
+ struct tm ts;
+ __s64 ret;
+ char *tmp;
+
+ if (strcmp(arg, "now") == 0) {
+ return time(0);
+ }
+ if (arg[0] == '@') {
+ /* interpret it as an integer */
+ arg++;
+ fallback:
+ ret = strtoll(arg, &tmp, 0);
+ if (*tmp)
+ return -1;
+ return ret;
+ }
+ memset(&ts, 0, sizeof(ts));
+#ifdef HAVE_STRPTIME
+ tmp = strptime(arg, "%Y%m%d%H%M%S", &ts);
+ if (tmp == NULL)
+ tmp = strptime(arg, "%Y%m%d%H%M", &ts);
+ if (tmp == NULL)
+ tmp = strptime(arg, "%Y%m%d", &ts);
+ if (tmp == NULL)
+ goto fallback;
+#else
+ sscanf(arg, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon,
+ &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec);
+ ts.tm_year -= 1900;
+ ts.tm_mon -= 1;
+ if (ts.tm_year < 0 || ts.tm_mon < 0 || ts.tm_mon > 11 ||
+ ts.tm_mday <= 0 || ts.tm_mday > 31 || ts.tm_hour > 23 ||
+ ts.tm_min > 59 || ts.tm_sec > 61)
+ goto fallback;
+#endif
+ ts.tm_isdst = -1;
+ /* strptime() may only update the specified fields, which does not
+ * necessarily include ts.tm_yday (%j). Calculate this if unset:
+ *
+ * Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ * 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+ *
+ * Start with 31 days per month. Even months have only 30 days, but
+ * reverse in August, subtract one day for those months. February has
+ * only 28 days, not 30, subtract two days. Add day of month, minus
+ * one, since day is not finished yet. Leap years handled afterward. */
+ if (ts.tm_yday == 0)
+ ts.tm_yday = (ts.tm_mon * 31) -
+ ((ts.tm_mon - (ts.tm_mon > 7)) / 2) -
+ 2 * (ts.tm_mon > 1) + ts.tm_mday - 1;
+ ret = ts.tm_sec + ts.tm_min*60 + ts.tm_hour*3600 + ts.tm_yday*86400 +
+ ((__s64) ts.tm_year-70)*31536000 +
+ (((__s64) ts.tm_year-69)/4)*86400 -
+ (((__s64) ts.tm_year-1)/100)*86400 +
+ (((__s64) ts.tm_year+299)/400)*86400;
+ return ret;
+}
+
+/*
+ * This function will convert a string to an unsigned long, printing
+ * an error message if it fails, and returning success or failure in err.
+ */
+unsigned long parse_ulong(const char *str, const char *cmd,
+ const char *descr, int *err)
+{
+ char *tmp;
+ unsigned long ret;
+
+ ret = strtoul(str, &tmp, 0);
+ if (*tmp == 0) {
+ if (err)
+ *err = 0;
+ return ret;
+ }
+ com_err(cmd, 0, "Bad %s - %s", descr, str);
+ if (err)
+ *err = 1;
+ else
+ exit(1);
+ return 0;
+}
+
+/*
+ * This function will convert a string to an unsigned long long, printing
+ * an error message if it fails, and returning success or failure in err.
+ */
+unsigned long long parse_ulonglong(const char *str, const char *cmd,
+ const char *descr, int *err)
+{
+ char *tmp;
+ unsigned long long ret;
+
+ ret = strtoull(str, &tmp, 0);
+ if (*tmp == 0) {
+ if (err)
+ *err = 0;
+ return ret;
+ }
+ com_err(cmd, 0, "Bad %s - %s", descr, str);
+ if (err)
+ *err = 1;
+ else
+ exit(1);
+ return 0;
+}
+
+/*
+ * This function will convert a string to a block number. It returns
+ * 0 on success, 1 on failure. On failure, it outputs either an optionally
+ * specified error message or a default.
+ */
+int strtoblk(const char *cmd, const char *str, const char *errmsg,
+ blk64_t *ret)
+{
+ blk64_t blk;
+ int err;
+
+ if (errmsg == NULL)
+ blk = parse_ulonglong(str, cmd, "block number", &err);
+ else
+ blk = parse_ulonglong(str, cmd, errmsg, &err);
+ *ret = blk;
+ return err;
+}
+
+/*
+ * This is a common helper function used by the command processing
+ * routines
+ */
+int common_args_process(int argc, char *argv[], int min_argc, int max_argc,
+ const char *cmd, const char *usage, int flags)
+{
+ if (argc < min_argc || argc > max_argc) {
+ com_err(argv[0], 0, "Usage: %s %s", cmd, usage);
+ return 1;
+ }
+ if (flags & CHECK_FS_NOTOPEN) {
+ if (check_fs_not_open(argv[0]))
+ return 1;
+ } else {
+ if (check_fs_open(argv[0]))
+ return 1;
+ }
+ if ((flags & CHECK_FS_RW) && check_fs_read_write(argv[0]))
+ return 1;
+ if ((flags & CHECK_FS_BITMAPS) && check_fs_bitmaps(argv[0]))
+ return 1;
+ return 0;
+}
+
+/*
+ * This is a helper function used by do_stat, do_freei, do_seti, and
+ * do_testi, etc. Basically, any command which takes a single
+ * argument which is a file/inode number specifier.
+ */
+int common_inode_args_process(int argc, char *argv[],
+ ext2_ino_t *inode, int flags)
+{
+ if (common_args_process(argc, argv, 2, 2, argv[0], "<file>", flags))
+ return 1;
+
+ *inode = string_to_inode(argv[1]);
+ if (!*inode)
+ return 1;
+ return 0;
+}
+
+/*
+ * This is a helper function used by do_freeb, do_setb, and do_testb
+ */
+int common_block_args_process(int argc, char *argv[],
+ blk64_t *block, blk64_t *count)
+{
+ int err;
+
+ if (common_args_process(argc, argv, 2, 3, argv[0],
+ "<block> [count]", CHECK_FS_BITMAPS))
+ return 1;
+
+ if (strtoblk(argv[0], argv[1], NULL, block))
+ return 1;
+ if (*block == 0) {
+ com_err(argv[0], 0, "Invalid block number 0");
+ return 1;
+ }
+
+ if (argc > 2) {
+ err = strtoblk(argv[0], argv[2], "count", count);
+ if (err)
+ return 1;
+ }
+ return 0;
+}
+
+int debugfs_read_inode2(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd, int bufsize, int flags)
+{
+ int retval;
+
+ retval = ext2fs_read_inode2(current_fs, ino, inode, bufsize, flags);
+ if (retval) {
+ com_err(cmd, retval, "while reading inode %u", ino);
+ return 1;
+ }
+ return 0;
+}
+
+int debugfs_read_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd)
+{
+ int retval;
+
+ retval = ext2fs_read_inode(current_fs, ino, inode);
+ if (retval) {
+ com_err(cmd, retval, "while reading inode %u", ino);
+ return 1;
+ }
+ return 0;
+}
+
+int debugfs_write_inode2(ext2_ino_t ino,
+ struct ext2_inode *inode,
+ const char *cmd,
+ int bufsize, int flags)
+{
+ int retval;
+
+ retval = ext2fs_write_inode2(current_fs, ino, inode, bufsize, flags);
+ if (retval) {
+ com_err(cmd, retval, "while writing inode %u", ino);
+ return 1;
+ }
+ return 0;
+}
+
+int debugfs_write_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd)
+{
+ int retval;
+
+ retval = ext2fs_write_inode(current_fs, ino, inode);
+ if (retval) {
+ com_err(cmd, retval, "while writing inode %u", ino);
+ return 1;
+ }
+ return 0;
+}
+
+int debugfs_write_new_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd)
+{
+ int retval;
+
+ retval = ext2fs_write_new_inode(current_fs, ino, inode);
+ if (retval) {
+ com_err(cmd, retval, "while creating inode %u", ino);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Given a mode, return the ext2 file type
+ */
+int ext2_file_type(unsigned int mode)
+{
+ if (LINUX_S_ISREG(mode))
+ return EXT2_FT_REG_FILE;
+
+ if (LINUX_S_ISDIR(mode))
+ return EXT2_FT_DIR;
+
+ if (LINUX_S_ISCHR(mode))
+ return EXT2_FT_CHRDEV;
+
+ if (LINUX_S_ISBLK(mode))
+ return EXT2_FT_BLKDEV;
+
+ if (LINUX_S_ISLNK(mode))
+ return EXT2_FT_SYMLINK;
+
+ if (LINUX_S_ISFIFO(mode))
+ return EXT2_FT_FIFO;
+
+ if (LINUX_S_ISSOCK(mode))
+ return EXT2_FT_SOCK;
+
+ return 0;
+}
+
+errcode_t read_list(char *str, blk64_t **list, size_t *len)
+{
+ blk64_t *lst = *list;
+ size_t ln = *len;
+ char *tok, *p = str;
+ errcode_t retval = 0;
+
+ while ((tok = strtok(p, ","))) {
+ blk64_t *l;
+ blk64_t x, y;
+ char *e;
+
+ errno = 0;
+ y = x = strtoull(tok, &e, 0);
+ if (errno) {
+ retval = errno;
+ break;
+ }
+ if (*e == '-') {
+ y = strtoull(e + 1, NULL, 0);
+ if (errno) {
+ retval = errno;
+ break;
+ }
+ } else if (*e != 0) {
+ retval = EINVAL;
+ break;
+ }
+ if (y < x) {
+ retval = EINVAL;
+ break;
+ }
+ l = realloc(lst, sizeof(blk64_t) * (ln + y - x + 1));
+ if (l == NULL) {
+ retval = ENOMEM;
+ break;
+ }
+ lst = l;
+ for (; x <= y; x++)
+ lst[ln++] = x;
+ p = NULL;
+ }
+
+ *list = lst;
+ *len = ln;
+ return retval;
+}
+
+void do_byte_hexdump(FILE *fp, unsigned char *buf, size_t bufsize)
+{
+ size_t i, j, max;
+ int suppress = -1;
+
+ for (i = 0; i < bufsize; i += 16) {
+ max = (bufsize - i > 16) ? 16 : bufsize - i;
+ if (suppress < 0) {
+ if (i && memcmp(buf + i, buf + i - max, max) == 0) {
+ suppress = i;
+ fprintf(fp, "*\n");
+ continue;
+ }
+ } else {
+ if (memcmp(buf + i, buf + suppress, max) == 0)
+ continue;
+ suppress = -1;
+ }
+ fprintf(fp, "%04o ", (unsigned int)i);
+ for (j = 0; j < 16; j++) {
+ if (j < max)
+ fprintf(fp, "%02x", buf[i+j]);
+ else
+ fprintf(fp, " ");
+ if ((j % 2) == 1)
+ fprintf(fp, " ");
+ }
+ fprintf(fp, " ");
+ for (j = 0; j < max; j++)
+ fprintf(fp, "%c", isprint(buf[i+j]) ? buf[i+j] : '.');
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "\n");
+}
diff --git a/debugfs/xattrs.c b/debugfs/xattrs.c
new file mode 100644
index 0000000..cd042bc
--- /dev/null
+++ b/debugfs/xattrs.c
@@ -0,0 +1,503 @@
+/*
+ * xattrs.c --- Modify extended attributes via debugfs.
+ *
+ * Copyright (C) 2014 Oracle. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+#include <ctype.h>
+#include "support/cstring.h"
+
+#include "debugfs.h"
+
+#define PRINT_XATTR_HEX 0x01
+#define PRINT_XATTR_RAW 0x02
+#define PRINT_XATTR_C 0x04
+#define PRINT_XATTR_STATFMT 0x08
+#define PRINT_XATTR_NOQUOTES 0x10
+
+/* Dump extended attributes */
+static void print_xattr_hex(FILE *f, const char *str, int len)
+{
+ int i;
+
+ for (i = 0; i < len; i++)
+ fprintf(f, "%02x ", (unsigned char)str[i]);
+}
+
+/* Dump extended attributes */
+static void print_xattr_string(FILE *f, const char *str, int len, int flags)
+{
+ int printable = 0;
+ int i;
+
+ if (flags & PRINT_XATTR_RAW) {
+ fwrite(str, len, 1, f);
+ return;
+ }
+
+ if ((flags & PRINT_XATTR_C) == 0) {
+ /* check: is string "printable enough?" */
+ for (i = 0; i < len; i++)
+ if (isprint(str[i]))
+ printable++;
+
+ if (printable <= len*7/8)
+ flags |= PRINT_XATTR_HEX;
+ }
+
+ if (flags & PRINT_XATTR_HEX) {
+ print_xattr_hex(f, str, len);
+ } else {
+ if ((flags & PRINT_XATTR_NOQUOTES) == 0)
+ fputc('\"', f);
+ print_c_string(f, str, len);
+ if ((flags & PRINT_XATTR_NOQUOTES) == 0)
+ fputc('\"', f);
+ }
+}
+
+static void print_xattr(FILE *f, char *name, char *value, size_t value_len,
+ int print_flags)
+{
+ print_xattr_string(f, name, strlen(name), PRINT_XATTR_NOQUOTES);
+ fprintf(f, " (%zu)", value_len);
+ if ((print_flags & PRINT_XATTR_STATFMT) &&
+ (strcmp(name, "system.data") == 0))
+ value_len = 0;
+ if (value_len != 0 &&
+ (!(print_flags & PRINT_XATTR_STATFMT) || (value_len < 40))) {
+ fprintf(f, " = ");
+ print_xattr_string(f, value, value_len, print_flags);
+ }
+ fputc('\n', f);
+}
+
+static int dump_attr(char *name, char *value, size_t value_len, void *data)
+{
+ FILE *out = data;
+
+ fprintf(out, " ");
+ print_xattr(out, name, value, value_len, PRINT_XATTR_STATFMT);
+ return 0;
+}
+
+void dump_inode_attributes(FILE *out, ext2_ino_t ino)
+{
+ struct ext2_xattr_handle *h;
+ size_t sz;
+ errcode_t err;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ return;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ err = ext2fs_xattrs_count(h, &sz);
+ if (err || sz == 0)
+ goto out;
+
+ fprintf(out, "Extended attributes:\n");
+ err = ext2fs_xattrs_iterate(h, dump_attr, out);
+ if (err)
+ goto out;
+
+out:
+ err = ext2fs_xattrs_close(&h);
+}
+
+void do_list_xattr(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+
+ if (argc != 2) {
+ printf("%s: Usage: %s <file>\n", argv[0],
+ argv[0]);
+ return;
+ }
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+
+ dump_inode_attributes(stdout, ino);
+}
+
+void do_get_xattr(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ struct ext2_xattr_handle *h;
+ FILE *fp = NULL;
+ char *buf = NULL;
+ size_t buflen;
+ int i;
+ int print_flags = 0;
+ unsigned int handle_flags = 0;
+ errcode_t err;
+
+ reset_getopt();
+ while ((i = getopt(argc, argv, "Cf:rxV")) != -1) {
+ switch (i) {
+ case 'f':
+ if (fp)
+ fclose(fp);
+ fp = fopen(optarg, "w");
+ if (fp == NULL) {
+ perror(optarg);
+ return;
+ }
+ break;
+ case 'r':
+ handle_flags |= XATTR_HANDLE_FLAG_RAW;
+ break;
+ case 'x':
+ print_flags |= PRINT_XATTR_HEX;
+ break;
+ case 'V':
+ print_flags |= PRINT_XATTR_RAW|
+ PRINT_XATTR_NOQUOTES;
+ break;
+ case 'C':
+ print_flags |= PRINT_XATTR_C;
+ break;
+ default:
+ goto usage;
+ }
+ }
+
+ if (optind != argc - 2) {
+ usage:
+ printf("%s: Usage: %s [-f outfile]|[-xVC] [-r] <file> <attr>\n",
+ argv[0], argv[0]);
+
+ goto out2;
+ }
+
+ if (check_fs_open(argv[0]))
+ goto out2;
+
+ ino = string_to_inode(argv[optind]);
+ if (!ino)
+ goto out2;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ goto out2;
+
+ err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
+ if (err)
+ goto out;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ err = ext2fs_xattr_get(h, argv[optind + 1], (void **)&buf, &buflen);
+ if (err)
+ goto out;
+
+ if (fp) {
+ fwrite(buf, buflen, 1, fp);
+ } else {
+ if (print_flags & PRINT_XATTR_RAW) {
+ if (print_flags & (PRINT_XATTR_HEX|PRINT_XATTR_C))
+ print_flags &= ~PRINT_XATTR_RAW;
+ print_xattr_string(stdout, buf, buflen, print_flags);
+ } else {
+ print_xattr(stdout, argv[optind + 1],
+ buf, buflen, print_flags);
+ }
+ printf("\n");
+ }
+
+ ext2fs_free_mem(&buf);
+out:
+ ext2fs_xattrs_close(&h);
+ if (err)
+ com_err(argv[0], err, "while getting extended attribute");
+out2:
+ if (fp)
+ fclose(fp);
+}
+
+void do_set_xattr(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ struct ext2_xattr_handle *h;
+ FILE *fp = NULL;
+ char *buf = NULL;
+ size_t buflen;
+ unsigned int handle_flags = 0;
+ int i;
+ errcode_t err;
+
+ reset_getopt();
+ while ((i = getopt(argc, argv, "f:r")) != -1) {
+ switch (i) {
+ case 'f':
+ if (fp)
+ fclose(fp);
+ fp = fopen(optarg, "r");
+ if (fp == NULL) {
+ perror(optarg);
+ return;
+ }
+ break;
+ case 'r':
+ handle_flags |= XATTR_HANDLE_FLAG_RAW;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (!(fp && optind == argc - 2) && !(!fp && optind == argc - 3)) {
+ print_usage:
+ printf("Usage:\t%s [-r] <file> <attr> <value>\n", argv[0]);
+ printf("\t%s -f <value_file> [-r] <file> <attr>\n", argv[0]);
+ goto out2;
+ }
+
+ if (check_fs_open(argv[0]))
+ goto out2;
+ if (check_fs_read_write(argv[0]))
+ goto out2;
+ if (check_fs_bitmaps(argv[0]))
+ goto out2;
+
+ ino = string_to_inode(argv[optind]);
+ if (!ino)
+ goto out2;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ goto out2;
+
+ err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
+ if (err)
+ goto out;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ if (fp) {
+ err = ext2fs_get_mem(current_fs->blocksize, &buf);
+ if (err)
+ goto out;
+ buflen = fread(buf, 1, current_fs->blocksize, fp);
+ } else {
+ buf = argv[optind + 2];
+ buflen = parse_c_string(buf);
+ }
+
+ err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
+out:
+ ext2fs_xattrs_close(&h);
+ if (err)
+ com_err(argv[0], err, "while setting extended attribute");
+out2:
+ if (fp) {
+ fclose(fp);
+ ext2fs_free_mem(&buf);
+ }
+}
+
+void do_rm_xattr(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t ino;
+ struct ext2_xattr_handle *h;
+ int i;
+ errcode_t err;
+
+ if (argc < 3) {
+ printf("%s: Usage: %s <file> <attrs>...\n", argv[0], argv[0]);
+ return;
+ }
+
+ if (check_fs_open(argv[0]))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+ if (check_fs_bitmaps(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ return;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ for (i = 2; i < argc; i++) {
+ err = ext2fs_xattr_remove(h, argv[i]);
+ if (err)
+ goto out;
+ }
+out:
+ ext2fs_xattrs_close(&h);
+ if (err)
+ com_err(argv[0], err, "while removing extended attribute");
+}
+
+/*
+ * Return non-zero if the string has a minimal number of non-printable
+ * characters.
+ */
+static int is_mostly_printable(const char *cp, int len)
+{
+ int np = 0;
+
+ if (len < 0)
+ len = strlen(cp);
+
+ while (len--) {
+ if (!isprint(*cp++)) {
+ np++;
+ if (np > 3)
+ return 0;
+ }
+ }
+ return 1;
+}
+
+static void safe_print(FILE *f, const char *cp, int len)
+{
+ unsigned char ch;
+
+ if (len < 0)
+ len = strlen(cp);
+
+ while (len--) {
+ ch = *cp++;
+ if (ch > 128) {
+ fputs("M-", f);
+ ch -= 128;
+ }
+ if ((ch < 32) || (ch == 0x7f)) {
+ fputc('^', f);
+ ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
+ }
+ fputc(ch, f);
+ }
+}
+
+static void dump_xattr_raw_entries(FILE *f, unsigned char *buf,
+ unsigned int start, unsigned int len,
+ unsigned value_start)
+{
+ struct ext2_ext_attr_entry ent;
+ unsigned int off = start;
+ unsigned int vstart;
+
+ while (off < len) {
+ if ((*(__u16 *) (buf + off)) == 0) {
+ fprintf(f, "last entry found at offset %u (%04o)\n",
+ off, off);
+ break;
+ }
+ if ((off + sizeof(struct ext2_ext_attr_entry)) >= len) {
+ fprintf(f, "xattr buffer overrun at %u (len = %u)\n",
+ off, len);
+ break;
+ }
+#if WORDS_BIGENDIAN
+ ext2fs_swap_ext_attr_entry(&ent,
+ (struct ext2_ext_attr_entry *) (buf + off));
+#else
+ ent = *((struct ext2_ext_attr_entry *) (buf + off));
+#endif
+ fprintf(f, "offset = %d (%04o), hash = %u, name_len = %u, "
+ "name_index = %u\n",
+ off, off, ent.e_hash, ent.e_name_len, ent.e_name_index);
+ vstart = value_start + ent.e_value_offs;
+ fprintf(f, "value_offset = %d (%04o), value_inum = %u, "
+ "value_size = %u\n", ent.e_value_offs,
+ vstart, ent.e_value_inum, ent.e_value_size);
+ off += sizeof(struct ext2_ext_attr_entry);
+ fprintf(f, "name = ");
+ if ((off + ent.e_name_len) >= len)
+ fprintf(f, "<runs off end>");
+ else
+ safe_print(f, (char *)(buf + off), ent.e_name_len);
+ fputc('\n', f);
+ if (ent.e_value_size == 0)
+ goto skip_value;
+ fprintf(f, "value = ");
+ if (ent.e_value_inum)
+ fprintf(f, "<ino %u>", ent.e_value_inum);
+ else if (ent.e_value_offs >= len ||
+ (vstart + ent.e_value_size) > len)
+ fprintf(f, "<runs off end>");
+ else if (is_mostly_printable((char *)(buf + vstart),
+ ent.e_value_size))
+ safe_print(f, (char *)(buf + vstart),
+ ent.e_value_size);
+ else {
+ fprintf(f, "<hexdump>\n");
+ do_byte_hexdump(f, (unsigned char *)(buf + vstart),
+ ent.e_value_size);
+ }
+ fputc('\n', f);
+ skip_value:
+ fputc('\n', f);
+ off += (ent.e_name_len + 3) & ~3;
+ }
+}
+
+void raw_inode_xattr_dump(FILE *f, unsigned char *buf, unsigned int len)
+{
+ __u32 magic = ext2fs_le32_to_cpu(*((__le32 *) buf));
+
+ fprintf(f, "magic = %08x, length = %u, value_start =4 \n\n",
+ magic, len);
+ if (magic == EXT2_EXT_ATTR_MAGIC)
+ dump_xattr_raw_entries(f, buf, 4, len, 4);
+}
+
+void block_xattr_dump(FILE *f, unsigned char *buf, unsigned int len)
+{
+ struct ext2_ext_attr_header header;
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_ext_attr_header(&header,
+ (struct ext2_ext_attr_header *) buf);
+#else
+ header = *((struct ext2_ext_attr_header *) buf);
+#endif
+ fprintf(f, "magic = %08x, length = %u\n", header.h_magic, len);
+ if (header.h_magic != EXT2_EXT_ATTR_MAGIC)
+ return;
+ fprintf(f, "refcount = %u, blocks = %u\n", header.h_refcount,
+ header.h_blocks);
+ fprintf(f, "hash = %08x, checksum = %08x\n", header.h_hash,
+ header.h_checksum);
+ fprintf(f, "reserved: %08x %08x %08x\n\n", header.h_reserved[0],
+ header.h_reserved[1], header.h_reserved[2]);
+
+ dump_xattr_raw_entries(f, buf,
+ sizeof(struct ext2_ext_attr_header), len, 0);
+}
diff --git a/debugfs/zap.c b/debugfs/zap.c
new file mode 100644
index 0000000..f862482
--- /dev/null
+++ b/debugfs/zap.c
@@ -0,0 +1,246 @@
+/*
+ * zap.c --- zap block
+ *
+ * Copyright (C) 2012 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "debugfs.h"
+
+void do_zap_block(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned long pattern = 0;
+ unsigned char *buf;
+ ext2_ino_t inode;
+ errcode_t errcode;
+ blk64_t block;
+ char *file = NULL;
+ int c, err;
+ int offset = -1;
+ int length = -1;
+ int bit = -1;
+
+ if (check_fs_open(argv[0]))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "b:f:l:o:p:")) != EOF) {
+ switch (c) {
+ case 'f':
+ file = optarg;
+ break;
+ case 'b':
+ bit = parse_ulong(optarg, argv[0],
+ "bit", &err);
+ if (err)
+ return;
+ if (bit >= (int) current_fs->blocksize * 8) {
+ com_err(argv[0], 0, "The bit to flip "
+ "must be within a %d block\n",
+ current_fs->blocksize);
+ return;
+ }
+ break;
+ case 'p':
+ pattern = parse_ulong(optarg, argv[0],
+ "pattern", &err);
+ if (err)
+ return;
+ if (pattern >= 256) {
+ com_err(argv[0], 0, "The fill pattern must "
+ "be an 8-bit value\n");
+ return;
+ }
+ break;
+ case 'o':
+ offset = parse_ulong(optarg, argv[0],
+ "offset", &err);
+ if (err)
+ return;
+ if (offset >= (int) current_fs->blocksize) {
+ com_err(argv[0], 0, "The offset must be "
+ "within a %d block\n",
+ current_fs->blocksize);
+ return;
+ }
+ break;
+
+ break;
+ case 'l':
+ length = parse_ulong(optarg, argv[0],
+ "length", &err);
+ if (err)
+ return;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (bit > 0 && offset > 0) {
+ com_err(argv[0], 0, "The -o and -b options can not be mixed.");
+ return;
+ }
+
+ if (offset < 0)
+ offset = 0;
+ if (length < 0)
+ length = current_fs->blocksize - offset;
+ if ((offset + length) > (int) current_fs->blocksize) {
+ com_err(argv[0], 0, "The specified length is too bug\n");
+ return;
+ }
+
+ if (argc != optind+1) {
+ print_usage:
+ com_err(0, 0, "Usage:\tzap_block [-f file] [-o offset] "
+ "[-l length] [-p pattern] block_num");
+ com_err(0, 0, "\tzap_block [-f file] [-b bit] "
+ "block_num");
+ return;
+ }
+
+ block = parse_ulonglong(argv[optind], argv[0], "block", &err);
+ if (err)
+ return;
+
+ if (file) {
+ inode = string_to_inode(file);
+ if (!inode)
+ return;
+ errcode = ext2fs_bmap2(current_fs, inode, 0, 0, 0,
+ block, 0, &block);
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while mapping logical block %llu\n",
+ (unsigned long long) block);
+ return;
+ }
+ }
+
+ buf = malloc(current_fs->blocksize);
+ if (!buf) {
+ com_err(argv[0], 0, "Couldn't allocate block buffer");
+ return;
+ }
+
+ errcode = io_channel_read_blk64(current_fs->io, block, 1, buf);
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while reading block %llu\n",
+ (unsigned long long) block);
+ goto errout;
+ }
+
+ if (bit >= 0)
+ buf[bit >> 3] ^= 1 << (bit & 7);
+ else
+ memset(buf+offset, pattern, length);
+
+ errcode = io_channel_write_blk64(current_fs->io, block, 1, buf);
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while write block %llu\n",
+ (unsigned long long) block);
+ goto errout;
+ }
+
+errout:
+ free(buf);
+ return;
+}
+
+void do_block_dump(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned char *buf;
+ ext2_ino_t inode;
+ errcode_t errcode;
+ blk64_t block;
+ char *file = NULL;
+ int xattr_dump = 0;
+ int c, err;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ reset_getopt();
+ while ((c = getopt (argc, argv, "f:x")) != EOF) {
+ switch (c) {
+ case 'f':
+ file = optarg;
+ break;
+ case 'x':
+ xattr_dump = 1;
+ break;
+ default:
+ goto print_usage;
+ }
+ }
+
+ if (argc != optind + 1) {
+ print_usage:
+ com_err(0, 0, "Usage: block_dump [-x] [-f inode] block_num");
+ return;
+ }
+
+ block = parse_ulonglong(argv[optind], argv[0], "block", &err);
+ if (err)
+ return;
+
+ if (file) {
+ inode = string_to_inode(file);
+ if (!inode)
+ return;
+ errcode = ext2fs_bmap2(current_fs, inode, 0, 0, 0,
+ block, 0, &block);
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while mapping logical block %llu\n",
+ (unsigned long long) block);
+ return;
+ }
+ }
+
+ buf = malloc(current_fs->blocksize);
+ if (!buf) {
+ com_err(argv[0], 0, "Couldn't allocate block buffer");
+ return;
+ }
+
+ errcode = io_channel_read_blk64(current_fs->io, block, 1, buf);
+ if (errcode) {
+ com_err(argv[0], errcode,
+ "while reading block %llu\n",
+ (unsigned long long) block);
+ goto errout;
+ }
+
+ if (xattr_dump)
+ block_xattr_dump(stdout, buf, current_fs->blocksize);
+ else
+ do_byte_hexdump(stdout, buf, current_fs->blocksize);
+errout:
+ free(buf);
+}
diff --git a/depfix.sed b/depfix.sed
new file mode 100644
index 0000000..680fb22
--- /dev/null
+++ b/depfix.sed
@@ -0,0 +1,35 @@
+#
+# Insert the header.....
+#
+1i\
+# +++ Dependency line eater +++\
+# \
+# Makefile dependencies follow. This must be the last section in\
+# the Makefile.in file\
+#
+
+#
+# Remove line continuations....
+#
+:FIRST
+y/ / /
+s/^ *//
+/\\$/{
+N
+y/ / /
+s/\\\n */ /
+bFIRST
+}
+s/ */ /g
+
+s;/usr/include/[^ ]* *;;g
+s;/usr/lib/[^ ]* *;;g
+s;/bin/[^ ]* *;;g
+s;\.\./[^ ]*lib/blkid/blkid[^ ]* *;;g
+s;\.\./[^ ]*lib/uuid/uuid.h[^ ]* *;;g
+
+#
+# Now insert a trailing newline...
+#
+$a\
+
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..a359453
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,85 @@
+#
+# Makefile for the doc directory
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = doc
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+DVI=texi2dvi --clean
+DVIPS=dvips -o "$@"
+INFO=@MAKEINFO@
+HTML=makeinfo --html --no-split
+PS2PDF=ps2pdf
+
+all:: libext2fs.info libext2fs.dvi libext2fs.html
+
+install-doc-libs: libext2fs.info libext2fs.dvi
+ $(Q) $(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
+ $(E) " MKDIR_P $(infodir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(infodir)
+ -$(Q) for i in libext2fs.info* ; do \
+ echo " INSTALL_DATA $(infodir)/$$i" ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
+ done
+ $(E) " GZIP $(infodir)/libext2fs.info*"
+ -$(Q) gzip -9n $(DESTDIR)$(infodir)/libext2fs.info*
+
+uninstall-doc-libs:
+ $(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
+
+libext2fs.info: $(srcdir)/libext2fs.texinfo
+ $(E) " MAKEINFO $@"
+ -$(Q) $(INFO) $(srcdir)/libext2fs.texinfo
+
+libext2fs.dvi: $(srcdir)/libext2fs.texinfo
+ $(E) " TEXI2DVI $@"
+ -$(Q) $(DVI) $(srcdir)/libext2fs.texinfo
+
+libext2fs.ps: libext2fs.dvi
+ $(E) " DVIPS $@"
+ -$(Q) $(DVIPS) libext2fs.dvi
+
+libext2fs.pdf: libext2fs.ps
+ $(E) " PS2PDF $@"
+ -$(Q) $(PS2PDF) libext2fs.ps
+
+libext2fs.html: $(srcdir)/libext2fs.texinfo
+ $(E) " TEXI2HTML $@"
+ -$(Q) $(HTML) $(srcdir)/libext2fs.texinfo
+
+.PHONY: distclean
+distclean:: clean
+ $(RM) -f Makefile
+
+.PHONY: clean
+clean:: clean-all
+
+.PHONY: clean-all
+clean-all:: clean-tex clean-backup clean-final clean-tarfiles clean-html
+
+.PHONY: clean-final
+clean-final::
+ $(RM) -f *.ps *.info *.info-? *.html *.pdf
+
+.PHONY: clean-tex
+clean-tex::
+ $(RM) -f *.aux *.cp *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr *.fns
+
+.PHONY: clean-backup
+clean-backup::
+ $(RM) -f *~ #*
+
+.PHONY: clean-tarfiles
+clean-tarfiles::
+ $(RM) -f *.tar *.tar.gz *.tgz
+
+clean-html::
+ $(RM) -f *.html
+
diff --git a/doc/RelNotes/v1.02.txt b/doc/RelNotes/v1.02.txt
new file mode 100644
index 0000000..27dce52
--- /dev/null
+++ b/doc/RelNotes/v1.02.txt
@@ -0,0 +1,25 @@
+E2fsprogs 1.02 (January 16, 1996)
+=================================
+
+Fix to allow e2fsprogs to be compiled on recent 1.3 (pl45+) kernels.
+
+Change e2fsck to print statistics of how many non-contiguous files are
+on the system. Note that a file which is larger than 8k blocks, it is
+guaranteed to be non-contiguous.
+
+In mke2fs, print a warning message if a user tries to format a whole
+disk (/dev/hda versus /dev/hda1). If a user really wants to format a
+whole disk, the -F (force) option forces mke2fs to format a whole disk
+as a filesystem.
+
+Fix a bug in fsck where in some cases it might start checking
+partitions in the next pass before it finishes checking partitions in
+the current pass. This still won't cause two partitions on the same
+disk will be checked, so it's rarely a problem in real life.
+
+Patch lsattr so that it won't hang when checking a named pipe.
+
+Minor compilation fixes:
+ * Fix the order of libraries that were linked in debugfs.
+ * Allow the sources to be compiled with -ansi turned on.
+
diff --git a/doc/RelNotes/v1.03.txt b/doc/RelNotes/v1.03.txt
new file mode 100644
index 0000000..3e6b25e
--- /dev/null
+++ b/doc/RelNotes/v1.03.txt
@@ -0,0 +1,33 @@
+E2fsprogs 1.03 (March 27, 1996)
+===============================
+
+Change the m68k bit numbering for bitmasks to match the bit numbering
+used by all other ext2 implementations. (This change was requested by
+the m68k kernel development team.)
+
+Support (in-development) filesystem format revision which supports
+(among other things) dynamically sized inodes.
+
+Fixed a bug in the ext2 library so that an intelligent error is
+returned if mke2fs is run with a ridiculously small number of blocks
+for a partition.
+
+Fixed a bug in the ext2 library which required that the device be
+openable in read/write mode in order to determine its size. This
+caused e2fsck -n to require read/write access when it was not
+previously necessary.
+
+Fixed a bug in e2fsck which caused it to occasionally fail the test
+suite depending on which version of the floating point library it was
+using.
+
+Fixed a bug in e2fsck so that it now halts with a fatal error when
+certain superblock consistency checks fail. Previously it continued
+running e2fsck, with some potential confusing/damaging consequences.
+
+Added new flag to fsck which allows the root to be checked in parallel
+with other filesystems. This is not the safest thing in the world to
+do, but some system administrators really wanted it.
+
+Fixed -Wall flames in lib/ss.
+
diff --git a/doc/RelNotes/v1.04.txt b/doc/RelNotes/v1.04.txt
new file mode 100644
index 0000000..0120c90
--- /dev/null
+++ b/doc/RelNotes/v1.04.txt
@@ -0,0 +1,49 @@
+E2fsprogs 1.04 (May 16, 1996)
+=============================
+
+First "official" (1.03 was a limited release only) to support building
+e2fsprogs under Linux 2.0 kernels (as well as late model 1.3 and 1.99
+kernels).
+
+This package includes a RPM specs file, that it can be built using the
+RedHat Package Manager.
+
+E2fsck now prints a hint that if there are lots of incorrectly located
+inode bitmaps, block bitmaps, and inode table blocks, the user might
+want to try using e2fsck -b 8193 first, to see if that fares any
+better.
+
+For ext2 filesystem written with the hurd, debugfs will now print out
+the translator field when printing an inode structure.
+
+Lots of miscellaneous linking/installation cleanups:
+
+ Libraries are now linked using a relative pathname, instead of
+ relying on -L working correct. It doesn't, in many cases, including
+ current versions of GNU ld. This guarantees that the build tree is
+ linking with the right libraries, instead of the ones installed in
+ /usr/lib.
+
+ Header files, man pages, and the et/ss shell scripts are now
+ generated using a custom substitution script, instead of relying on
+ the configure script. This prevents needless recompilation of
+ files; in addition, the custom substitution script is much faster.
+
+ e2fsck may now be linked dynamically, by using the
+ --enable-dynamic-e2fsck flag to configure. This is not recommended,
+ since it increases e2fsck's dependence on other files, but some
+ people need to save disk space, and other critical programs on their
+ systems were being linked dynamically anyway.
+
+ Programs such as fsck which didn't need to be linked against
+ libext2fs (or mke2fs which didn't need to be linked against libe2p)
+ only link against libraries they actually need. Otherwise, those
+ programs would require the presence of libraries that otherwise
+ could be removed from a rescue diskette.
+
+ The ss include files are now installed correctly so they can
+ actually be used by another package.
+
+ If the profiling libraries are built, they are now installed on a
+ "make install-libs".
+
diff --git a/doc/RelNotes/v1.05.txt b/doc/RelNotes/v1.05.txt
new file mode 100644
index 0000000..b1d22c1
--- /dev/null
+++ b/doc/RelNotes/v1.05.txt
@@ -0,0 +1,104 @@
+E2fsprogs 1.05 (September 7, 1996)
+==================================
+
+Add support for new fields in the ext2 superblock --- volume name,
+volume UUID, and last mounted field. Dumpe2fs displays these fields,
+tune2fs and mke2fs allows you to set them. E2fsck will automatically
+generate a UUID for those volumes that don't have them.
+
+Put in support for e2fsck to recognize HURD specific ext2 features ---
+most notably, the translator block. The e2fsprogs tools will now use
+the creator_os field in the superblock to correctly handle different
+OS-specific variants of the ext2 filesystem.
+
+E2fsck now fixes inodes which have a the deletion time set, but which
+have a non-zero i_link_count field by offering to clear the deletion
+time. Previously e2fsck assumed that the inode was deleted (per 0.3c
+ext2 kernel behavior) and offered to unlink the file.
+
+If e2fsck sets the clean bit, but nothing else, set the exit code
+FSCK_NONDESTRUCT. After all, e2fsck did fix a filesystem error --- it
+set the filesystem valid bit when it was previously cleared. :-) This
+was needed to make the HURD fsck driver happy.
+
+If the user refuses to attach an unattached inode, e2fsck will no
+longer set the inode's link count. Otherwise, the inode would end up
+getting marked as unused, which might cause loss of data later.
+
+Make the message issued by e2fsck when the superblock is corrupt less
+confusing for users. It now mentions that another reason for the
+"corrupt superblock" message might be that the partition might not be
+an ext2 filesystem at all (it might swap, msdos filesystem, ufs, etc.)
+
+Make the libext2 library more robust so that e2fsck won't coredump on
+an illegal superblock where the blocksize is zero. (f_crashdisk is
+the test case).
+
+By default, create filesystems where the default checkinterval is 6
+months (180 days). Linux servers can be robust enough that 20 reboots
+can be a long, long time.
+
+Added configure flag --enable-old-bitops, which forces the bitops to
+use the old (native) bitmask operations. By default on the sparc
+platform, the standard ext2 bit ordering is now used.
+
+Added a new feature to e2fsck to byte-swap filesystems; this can be
+used to convert old m68k filesystems to use the standard byte-order
+storage for the superblock, inodes, and directory blocks. This
+function is invoked by using the '-s' option to e2fsck.
+
+Debugfs's "dump" command has been enhanced so that it writes out the
+exact size of the file so that the nulls at the end of the file are
+eliminated. The command also accept a new "-p" option which will
+attempt to preserve the ownership, permissions, and file
+modification/access times.
+
+Debugfs has two new options, -f and -R. The -R option allows the user
+to execute a single debugfs command from the command line. The -f
+option allows the user to specify a "command file" containing debugfs
+commands which will get executed.
+
+Dumpe2fs now pretty prints the check interval, instead of just
+printing the check interval as a number of seconds.
+
+Fix bugs in debugfs: the params command when no filesystem is opened
+no longer causes a core dump. It is now possible to unlink a file
+when a pathname containing a '/' is specified.
+
+Tune2fs has a new -C option which sets the number of times the
+filesystem has been mounted.
+
+Fix the chattr '-v' option so that it actually works. Chattr was
+being buggy about the -v option parsing.
+
+Programmers' notes:
+-------------------
+
+The directory lib/uuid contains a set of library routines to generate
+DCE compatible UUIDs.
+
+Extended ext2fs_namei() to handle symbolic links. Added new function
+ext2fs_nami_follow() which will follow last symbolic link in the case
+where the pathname points to a sym link.
+
+The ext2fs_block_iterate function will now return the HURD translator
+block, if present. The new flag BLOCK_FLAG_DATA_ONLY will cause the
+iterator to return data blocks only. The ext2fs.h file now defines
+constants BLOCK_COUNT_IND, BLOCK_COUNT_DIND, BLOCK_COUNT_TIND, and
+BLOCK_COUNT_TRANSLATOR, which are the magic values passed in the block
+count field of the iterator callback function.
+
+The test script driver now takes an optional second argument, which is
+the test case to be run. This allows you to run a test case without
+needing to run the entire test suite.
+
+On Linux ELF systems, install the .so files in the correct places
+(/usr/lib). The .so files must be stored in the same directory as the
+.a files.
+
+Fixed miscellaneous HURD compilation issues with header file being
+included in the right order.
+
+Fixed debugfs so that it resets optind to zero, not one, since setting
+optind to zero is more correct.
+
diff --git a/doc/RelNotes/v1.06.txt b/doc/RelNotes/v1.06.txt
new file mode 100644
index 0000000..c6b8c92
--- /dev/null
+++ b/doc/RelNotes/v1.06.txt
@@ -0,0 +1,51 @@
+E2fsprogs 1.06 (October 7, 1996)
+================================
+
+Fixed serious bug in e2fsck: if the block descriptors are bad, don't
+smash the backup copies in ext2fs_close(). (The problem was that when
+e2fsck -p discovered the problem, while it was closing the filesystem
+and exiting, it was also blowing away the backup superblocks on the
+disk, which was less than friendly.) We now make it the case that we
+only write out the backup superblock and the back block descriptors if
+the filesystem is completely free from problems.
+
+Fixed a bug in block_interate in the lib/ext2fs library which caused
+e2fsck to fail on GNU Hurd-created filesystems.
+
+Add support for Linux/FT's bootloader, which actually uses
+EXT2_BOOT_LOADER, and sets its mode bits which caused e2fsck to want
+to clear the inode.
+
+Add support for the "A" (no atime update) attribute. (Note: this
+attribute is not yet in production kernels.)
+
+The test suite is not automatically run when doing a "make all" from
+the top level directory. Users should manually run "make check" if
+they wish to run the test suite.
+
+Upon a preenhalt(), make the printed message more explicit that
+running e2fsck "MANUALLY" means without the -p or -a options.
+
+In e2fsck, if a disconnected inode is zero-length, offer to clear it
+instead of offering to connect it to lost+found.
+
+In e2fsck, if a filesystem was just unmounted uncleanly, and needs
+e2fsck to be run over it, change e2fsck to explicitly display this
+fact.
+
+For dumpe2fs and e2fsck, cause the -V option to print out which
+version of the ext2fs library is actually getting used. (This will
+help detect mismatches of using a 1.06 utility with a 1.05 library,
+etc.)
+
+Programmers' notes:
+-------------------
+
+EXT2_SWAP_BYTES was changed to EXT2_FLAG_SWAP_BYTES, which better fits
+the naming convention.
+
+In ext2fs_initialize(), make sure the description for the inode bitmap
+is correctly initialize.
+
+Fixed minor type typo in ext2fs_allocate_generic_bitmap();
+
diff --git a/doc/RelNotes/v1.07.txt b/doc/RelNotes/v1.07.txt
new file mode 100644
index 0000000..d780c93
--- /dev/null
+++ b/doc/RelNotes/v1.07.txt
@@ -0,0 +1,122 @@
+E2fsprogs 1.07 (March 9, 1997)
+==============================
+
+E2fsck is now uses much less memory when checking really large
+filesystems (or rather, filesystems with a large number of inodes).
+Previously a filesystem with 1 million inodes required 4 megabytes of
+memory to store inode count statistics; that storage requirement has
+now been reduced to roughly half a megabyte.
+
+E2fsck can now properly deal with bad blocks appearing inside the
+inode table. Instead of trying to relocate the inode table (which
+often failed because there wasn't enough space), the inodes in the bad
+block are marked as in use.
+
+E2fsck will automatically try to use the backup superblocks if the
+primary superblocks have a bad magic number or have missing meta-data
+blocks (or meta-data blocks which are out of range).
+
+E2fsck's pass 3 has been made more efficient; most noticeable on
+filesystems with a very large number of directories.
+
+Completely revamped e2fsck's system of printing problem reports. It
+is now table driven, to make them more easily customizable and
+extendable. Error messages which can be printed out during preen mode
+are now one line long.
+
+Fixed e2fsck's filesystem swapping code so that it won't try to swap
+fast symbolic links or deleted files.
+
+Fixed e2fsck core dumping when fixing a filesystem which has no
+directories (not even a root directory).
+
+Added a check to e2fsck to make sure that the length of every
+directory entry is a multiple of 4 (since the kernel complains if it
+isn't).
+
+Added a check to e2fsck to make sure that a directory entry isn't a
+link to the root directory, since that isn't allowed.
+
+Added a check to e2fsck to now make sure the '.' and '..' directory
+entries are null terminated, since the 2.0 kernel requires it.
+
+Added check to write_bitmaps() to make sure the superblock doesn't get
+trashed if the inode or block bitmap is marked as being block zero.
+
+Added checking of the new feature set fields in the superblock, to
+avoid dealing with new filesystem features that this package wasn't
+set up to handle.
+
+Fixed a fencepost error in ext2fs_new_block() which would occasionally
+try to allocate a block beyond the end of a filesystem.
+
+When the UUID library picks a random IEEE 802 address (because it
+can't find one from a network card), it sets the multicast bit, to
+avoid conflicting with a legitimate IEEE 802 address.
+
+Mke2fs now sets the root directory's owner to be the real uid of the
+user running mke2fs. If the real uid is non-zero, it also sets
+the group ownership of the root directory to be the real group-id of
+the user running mke2fs.
+
+Mke2fs now has more intelligent error checking when it is given a
+non-existent device.
+
+When badblocks is given the -vv option, it now updates the block that
+it is currently testing on every block.
+
+Fixed a bug in fsck where it wouldn't modify the PATH environment
+currently correctly if PATH wasn't already set.
+
+Shared libraries now built with dependencies. This allows the shared
+library files to be used with dlopen(); it also makes the transition
+to libc 6 easier, since ld.so can tell which libc a particular shared
+library expects to use.
+
+Programmer's notes:
+-------------------
+
+Added new abstraction (defined in dblist.c) for maintaining a list of
+blocks which belongs to directories. This is used in e2fsck and other
+programs which need to iterate over all directories.
+
+Added new functions which test to see if a contiguous range of blocks
+(or inodes) are available. (ext2fs_*_bitmap_range).
+
+Added new function (ext2_inode_has_valid_blocks) which returns true if
+an inode has valid blocks. (moved from e2fsck code).
+
+Added new function (ext2fs_allocate_tables) which allocates the
+meta-data blocks as part of initializing a filesystem. (moved from
+mke2fs code).
+
+Added a new I/O manager for testing purposes. It will either allow a
+program to intercept I/O requests, or print debugging messages to
+trace the activity of a program using the I/O manager.
+
+The badblocks_list functions now store the bad blocks in a sorted
+order, and use a binary search to speed up badblocks_list_test.
+
+The inode scan function ext2fs_get_next_inode() may now return a soft
+error returns: MISSING_INODE_TABLE and BAD_BLOCK_IN_INODE_TABLE in
+those cases where part of an inode table is missing or there is a bad
+block in the inode table.
+
+Added a new function (ext2fs_block_iterate2) which adds new arguments to
+the callback function to return a pointer (block and offset) to the
+reference of the block.
+
+Added new function (ext2fs_inode_scan_goto_blockgroup) which allows an
+application to jump to a particular block group while doing an inode
+scan.
+
+The badblocks list functions were renamed from badblocks_* to
+ext2fs_badblocks_*. Backwards compatibility functions are available
+for now, but programs should be modified to use the new interface.
+
+Some of the library functions were reorganized into separate files to
+reduce the size of some programs which statically link against the
+ext2 library.
+
+Put in some miscellaneous fixes for the Alpha platform.
+
diff --git a/doc/RelNotes/v1.08.txt b/doc/RelNotes/v1.08.txt
new file mode 100644
index 0000000..f33ead5
--- /dev/null
+++ b/doc/RelNotes/v1.08.txt
@@ -0,0 +1,75 @@
+E2fsprogs 1.08 (April 10, 1997)
+===============================
+
+E2fsck 1.07 was very slow when checking very large filesystems with a
+lot of files that had hard links (i.e., news spools). This was fixed
+by seriously revamping the icount abstraction. Added a formal test
+suite for the icount abstraction.
+
+Debugfs now has a "-l" option to the "ls" command, which lists the
+inode number, permissions, owner, group, size, and name of the files
+in the directory.
+
+Fix a bug in e2fsck where when a directory had its blocks moved to
+another location during the pass 1b processing, the directory block
+list wasn't updated, so pass 2 wouldn't check (and correct) the
+correct directory block.
+
+E2fsck will now treat inodes which contain blocks which are claimed by
+the filesystem metadata by treating them as multiply claimed blocks.
+This way, the data in those blocks can be copied to a new block during
+the pass 1b--1d processing.
+
+E2fsck will attempt to determine the correct superblock number and
+display it in the diagnostic and warning messages if possible.
+
+Add support for a new (incompatible) feature, "sparse_super". This
+feature reduces the number of blocks which contain copies of backup
+superblocks and block group descriptors. (It is only an incompatible
+feature because of a bug in ext2_free_blocks.) mke2fs and tune2fs now
+support a new -s option; e2fsck will recognize filesystems built with
+this feature turned on.
+
+E2fsck now checks the library to make sure is the correct version,
+using new library functions. (This helps to diagnose incorrectly
+installed e2fsprogs distributions.)
+
+Dumpe2fs now prints more information; its now prints the the
+filesystem revision number, the filesystem sparse_super feature (if
+present), the block ranges for each block group, and the offset from
+the beginning of the block group.
+
+Mke2fs now distributes the inode and block bitmap blok so that the
+won't be concentrated in one or two disks in RAID/striping setups.
+Also, if the user chooses a 2k or 4k block group, mke2fs will try to
+choose the largest blocks per group that be chosen. (For 2k blocks,
+you can have up to 16384 blocks/group; for 4k blocks, you can have up
+to 32768 blocks/group.) Previously mke2fs would not allow
+specification of more than 8192 blocks per group, even if you were
+using a 2k or 4k block group.
+
+Programmer's notes:
+-------------------
+
+Added a new function ext2fs_create_icount2() which takes a "hint"
+argument. This hint argument presets the icount array with the list
+of inodes which actually need to be in the icount array. This really
+helps to speed up e2fsck.
+
+Added a new function ext2fs_icount_validate() which checks the rep
+invariant for the icount structure. This is used mostly for testing.
+
+The error message given when a bad inode number is passed to
+test_generic_bitmap to reflect EXT2FS_TEST_ERROR (instead of
+EXT2FS_UNMARK_ERROR).
+
+Added a new function ext2fs_set_dir_block which sets the block of a
+dblist entry, given the directory inode and blockcnt.
+
+Added a new function ext2fs_get_library_version() which returns the
+current library version, and ext2fs_parse_version_string() which
+returns a version number based on a e2fsprogs version string.
+
+The icount functions will return EINVAL if the passed in inode number
+is out of bounds.
+
diff --git a/doc/RelNotes/v1.09.txt b/doc/RelNotes/v1.09.txt
new file mode 100644
index 0000000..415de75
--- /dev/null
+++ b/doc/RelNotes/v1.09.txt
@@ -0,0 +1,14 @@
+E2fsprogs 1.09 (April 14, 1997)
+===============================
+
+Fixed bug in mke2fs (really in lib/ext2fs/initialize.c) which was
+accidentally introduced in the 1.08 release. The overhead calculation
+was accidentally removed, which caused ext2fs_initialize() to not
+notice when the filesystem size needed to be adjusted down because
+there wasn't enough space in the last block group.
+
+Fixed bug in version parsing library routine; it was always parsing
+the library version string, instead of using the passed-in string.
+
+Clarified chattr man page.
+
diff --git a/doc/RelNotes/v1.10.txt b/doc/RelNotes/v1.10.txt
new file mode 100644
index 0000000..1fa0a5e
--- /dev/null
+++ b/doc/RelNotes/v1.10.txt
@@ -0,0 +1,56 @@
+E2fsprogs 1.10 (April 24, 1997)
+===============================
+
+Mke2fs once again defaults to creating revision #0 filesystems, since
+people were complaining about breaking compatibility with 1.2 kernels.
+Warning messages were added to the mke2fs and tune2fs man pages that
+the sparse superblock option isn't supported by most kernels yet (1.2
+and 2.0 both don't support parse superblocks.)
+
+Added new flag to mke2fs, -R <raid options>, which allows the user to
+tell mke2fs about the RAID configuration of the filesystem. Currently
+the only supported raid option is "stride" which specifies the width
+of the RAID stripe.
+
+Fixed bug in e2fsck where pass1b would bomb out if there were any
+blocks marked bad in the inode table.
+
+Fixed rare bug in mke2fs where if the user had a very unlucky number
+of blocks in a filesystem (probability less than .002) the resulting
+filesystem would be corrupt in the last block group.
+
+Fixed bug where if e2fsck tried to allocate a block to fix a
+filesystem corruption problem and the filesystem had no free blocks,
+ext2fs_new_block() would loop forever.
+
+The configure script now checks explicitly to see if "-static" works,
+since that can't be assumed to be true --- RedHat doesn't install
+libc-static by default.
+
+Fixed bug in libext2's block iterator functions where under some
+circumstances, file with holes would cause the bcount parameter to the
+callback function to be incorrect. This bug didn't affect any of
+e2fsprogs programs, but it was discovered by Paul Mackerras, the
+author of the PPC boot loader.
+
+Removed use of static variables to store the inode cache in libext2fs.
+This caused problems if more than one filesystem was accessed via
+libext2fs (static variables in libraries are generally a bad idea).
+Again, this didn't affect e2fsprogs programs, but it was discovered by
+Paul Mackerras.
+
+Fixed minor bugs and version code drift to assure that e2fsprogs 1.10
+will compile cleanly with 1.2.13 kernels (even with a.out shared
+libraries!)
+
+Programmer's notes:
+-------------------
+
+Added new functions to duplicate an ext2 filesystem handle, and its
+associated substructure. New functions: ext2fs_dup_handle(),
+ext2fs_copy_dblist(), ext2fs_badblocks_copy(), ext2fs_copy_bitmap().
+Other structures, such as the io_channel and the inode_cache, now have
+a ref count so that they only get freed when they are no longer used
+by any filesystem handle. (These functions were added as part of the
+development effort for an ext2 resizer).
+
diff --git a/doc/RelNotes/v1.11.txt b/doc/RelNotes/v1.11.txt
new file mode 100644
index 0000000..33c89d5
--- /dev/null
+++ b/doc/RelNotes/v1.11.txt
@@ -0,0 +1,61 @@
+E2fsprogs 1.11 (June 17, 1997)
+==============================
+
+Fixed e2fsck to detect (previously ignored) conflicts between the
+superblock or block group descriptors and block bitmaps, inode
+bitmaps, and inode tables.
+
+Fixed bug in e2fsck so that when the message printed out when a block
+or inode bitmap conflicts with other data, it has the correct group
+number.
+
+Fixed bug in e2fsck and mke2fs where the blocksize wasn't being passed
+to badblocks. This meant that not all of the filesystem was being
+tested for bad blocks!
+
+Fixed an array boundary overrun case which cropped up in
+ext2fs_badblocks_list_test when a user tried running "mke2fs -c
+-b 4096".
+
+Adjusted the number of columns printed by mke2fs when displaying the
+superblock backups to avoid running over 80 columns when making a
+really big filesystem.
+
+Fixed up the man pages for e2fsck, debugfs, badblocks, chattr,
+dumpe2fs, fsck, mke2fs, and tune2fs (typos and other minor grammar
+fixes), thanks to some suggestions from Bill Hawes (whawes@star.net).
+
+Programmer's notes:
+-------------------
+
+Fixed install rule in lib/ss so that ss_err.h is actually getting
+installed.
+
+Fixed bug in ext2fs_copy_bitmap; the destination bitmap wasn't getting
+passed back to the caller.
+
+Fixed bug in ext2fs_inode_scan_goto_blockgroup; it had not been
+setting the current inode number (which meant this function wasn't
+working at all).
+
+Fixed bug in ext2fs_resize_generic_bitmap; it had not be zeroing all
+blocks in the bitmap when increasing the size of the bitmap.
+
+Changed the initial number of blocks allocated by ext2fs_init_dblist()
+to be more realistic.
+
+Added a new function ext2fs_allocate_group_table, which sets up the
+group descriptor information (and allocates inode and block bitmaps,
+and inode tables for a particular group). The function was created by
+factoring out code form ext2fs_allocate_tables().
+
+Added a new function ext2fs_move_blocks which takes a bitmap of the
+blocks to be moved, and moves them to another location on the
+boardboard.
+
+Make the unix_io channel's io_channel_flush implementation calls sync()
+to to flush the kernel buffers to disk.
+
+Added a new function ext2fs_dblist_count returns the number of
+directory blocks in dblist.
+
diff --git a/doc/RelNotes/v1.12.txt b/doc/RelNotes/v1.12.txt
new file mode 100644
index 0000000..9a11cd0
--- /dev/null
+++ b/doc/RelNotes/v1.12.txt
@@ -0,0 +1,153 @@
+E2fsprogs 1.12 (July 9, 1998)
+==================================
+
+E2fsprogs now works with glibc (at least with the version shipped with
+RedHat 5.0). The ext2fs_llseek() function should now work even with
+i386 ELF shared libraries and if llseek() is not present. We also
+explicitly do a configure test to see if (a) llseek is in libc, and
+(b) if llseek is declared in the system header files. (See standard
+complaints about libc developers don't understand the concept of
+compatibility with previous versions of libc.)
+
+The ext2fs library now writes out the block group number in each of
+the superblock copies. This makes it easier to automatically
+determine the starting block group of the filesystem when the block
+group information is trashed.
+
+Added support for the EXT2_FEATURE_INCOMPAT_FILETYPE feature,
+which means that e2fsprogs will ignore the high 8 bits of the
+directory entry's name_len field, so that it can be used for other
+purposes.
+
+Added support for the EXT2_FEATURE_RO_COMPAT_LARGE_FILE feature.
+E2fsprogs will now support filesystems with 64-bit sized files.
+
+Added support for the EXT2_FEATURE_COMPAT_DIR_PREALLOC feature.
+
+Added new program "e2label", contributed by Andries Brouwer. E2label
+provides an easy-to-use interface to modify the filesystem label.
+
+Fixed bug so that lsattr -v works instead of producing a core dump.
+
+Fixed a minor bug in mke2fs so that all groups with bad superblock
+backup blocks are printed (not just the first one).
+
+Mke2fs will check the size of the device, and if the user specifies a
+filesystem size larger than the apparent size of the device it will
+print a warning message and ask if the user wants to proceed.
+
+E2fsck has a new option -C, which sends completion information to the
+specified file descriptor. For the most part, this is intended for
+programs to use, although -C 0 will print a spinning character to the
+stdout device, which may be useful for users who want to see something
+happening while e2fsck goes about its business.
+
+Fixed a bug in e2fsck which could cause a core dump when it needs to
+expand the /lost+found directory, and sometimes the bitmaps haven't
+been merged in. Also fixed a related bug where ext2fs_write_dir_block
+was used to write out a non-directory block. (Which would be bad on a
+non-Intel platform with byte swapping going on.)
+
+Fixed bug in e2fsck where it would print a "programming error" message
+instead of correctly identifying where a bad block was in used when
+the bad block was in a non-primary superblock or block group
+descriptor. Also fixed a related bug when sparse superblocks are in
+use and there is a bad block where a superblock or block group
+descriptor would have been in a group that doesn't include a
+superblock.
+
+Fixed a bug in e2fsck (really in libext2fs's dblist function) where if
+the block group descriptor table is corrupt, it was possible to try to
+allocate a huge array, fail, and then abort e2fsck.
+ext2fs_get_num_dirs() now sanity checks the block group descriptor,
+and substitutes reasonable values if the descriptors are obviously bogus.
+
+If e2fsck finds a device file which has the immutable flag set and the
+i_blocks beyond the normal device number are non-zero, e2fsck will
+offer to remove it, since it's probably caused by garbage in the inode
+table.
+
+When opening a filesystem, e2fsck specially checks for the EROFS error
+code, and prints a specific error message to the user which is more
+user friendly.
+
+If the filesystem revision is too high, change the e2fsck to print
+that this is either because e2fsck is out of date, or because the
+superblock is corrupt.
+
+E2fsck now checks for directories that have duplicate '.' and '..'
+entries, and fixes this corruption.
+
+E2fsck no longer forces a sync of the filesystem (with attendant sleep
+calls) at all times. The ext2fs_flush() function now performs a sync
+only if it needed to write data blocks to disk.
+
+Fixed a minor bug in e2fsck's pass1b's file cloning function, where
+certain errors would not be properly reported.
+
+Updated and expanded a few points in the man pages which users
+complained weren't explicit enough.
+
+Added special case byte-swapping code if compiling on the PowerPC, to
+accommodate the strange big-endian variant of the ext2 filesystem that
+was previously used on the PowerPC port.
+
+
+Programmer's notes:
+-------------------
+
+Removed C++ keywords from the ext2fs libraries so that it could be
+compiled with C++.
+
+E2fsck's internal organization has now been massively reorganized so
+that pass*.c don't have any printf statements. Instead, all problems
+are reported through the fix_problem() abstraction interface. E2fsck
+has also been revamped so that it can be called as a library from a
+application.
+
+Added new fileio primitives in libext2fs for reading and writing
+files on an unmounted ext2 filesystem. This interface is now used by
+debugfs.
+
+Added a new libext2fs function for mapping logical block numbers of
+a file to a physical block number.
+
+Added a new libext2fs function, ext2fs_alloc_block(), which allocates
+a block, zeros it, and updates the filesystem accounting records
+appropriately.
+
+Added a new libext2fs function, ext2fs_set_bitmap_padding(), which
+sets the padding of the bitmap to be all one's. Used by e2fsck pass 5.
+
+The libext2fs functions now use a set of memory allocation wrapper
+functions: ext2fs_get_mem, ext2fs_free_mem, and ext2fs_resize_mem,
+instead of malloc, free, and resize. This makes it easier for us to
+be ported to strange environments where malloc, et. al. aren't
+necessarily available.
+
+Change the libext2fs function to return ext2-specific error codes
+(EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND, for example) instead of using
+and depending on the existence of system error codes (such as EEXIST
+and ENOENT).
+
+Renamed io.h to ext2_io.h to avoid collision with other OS's header
+files.
+
+Add protection against ext2_io.h and ext2fs.h being included multiple
+times.
+
+The types used for memory lengths, etc. have been made more portable.
+In general, the code has been made 16-bit safe. Added Mark
+Habersack's contributed DOS disk i/o routines.
+
+Miscellaneous portability fixes, including not depending on char's
+being signed.
+
+The io_channel structure has a new element, app_data, which is
+initialized by the ext2fs routines to contain a copy of the filesystem
+handle.
+
+ext2fs_check_directory()'s callback function may now return the error
+EXT2_ET_CALLBACK_NOTHANDLED if it wishes ext2fs_check_directory() to
+really do the checking, despite the presence of the callback function.
+
diff --git a/doc/RelNotes/v1.13.txt b/doc/RelNotes/v1.13.txt
new file mode 100644
index 0000000..35a69e6
--- /dev/null
+++ b/doc/RelNotes/v1.13.txt
@@ -0,0 +1,64 @@
+E2fsprogs 1.13 (December 15, 1998)
+==================================
+
+Fixed a bug in debugfs where an error messages weren't getting printed
+when the ext2 library routines to read inodes returned errors in the
+stat, cmri and rm commands.
+
+Fixed a bug in mke2fs so that if a ridiculous inode ratio parameter is
+provided, it won't create an inode table smaller than the minimum
+number of inodes required for a proper ext2 filesystem.
+
+Fsck now parses the /etc/fstab file directly (instead of using
+getmntent()), so that it can distinguish between a missing pass number
+field and pass number field of zero. This caused problems for
+diskless workstations where all of the filesystems in /etc/fstab have
+an explicit pass number of zero, and fsck could not distinguish this
+from a /etc/fstab file with missing pass numbers.
+
+E2fsck will create a /lost+found directory if there isn't one in the
+filesystem, since it's safer to create the lost+found directory before
+it's needed.
+
+Fixed e2fsck so that it would detect bogus immutable inodes which
+happen to be sockets and FIFO files, and offer to clear them.
+
+If a filesystem has multiple reasons why it needs to be checked, and
+one of the reasons is that it is uncleanly mounted, e2fsck will print
+that as the reason why the filesystem is being checked.
+
+Cleaned up the output routines of mke2fs so that it doesn't overflow
+an 80 column display when formatting really big filesystems.
+
+Added a sanity check to e2fsck to make sure that file descriptors 0,
+1, 2 are open before opening the hard disk. This avoids a problem
+where a broken program might exec e2fsck with those file descriptors
+closed, which would cause disastrous results if the kernel returns a
+file descriptor for the block device which is also used by FILE *
+stdout.
+
+Fixed up the e2fsck progress reporting functions so that the values
+reliably reach 100% at the completion of all of the e2fsck passes.
+
+Fixed minor documentation bugs in man pages and usage messages.
+
+Programmer's notes:
+-------------------
+
+Fixed a number of lint warnings in the ext2fs library and potential
+portability problems from other OS's header files that might define
+CPP macros for names like "max" and "min".
+
+ext2fs_badblocks_list_add() has been made more efficient when it needs
+to grow the bad blocks list.
+
+Fixed a bug in e2fsck which caused it to dereference a freed pointer
+just before exiting.
+
+Fixed the substitution process for generating the mk_cmds and compile_et
+scripts so that they will work outside of the build tree.
+
+Add sanity check to e2fsck so that if an internal routine
+(ext2fs_get_dir_info) returns NULL, avoid dereferencing the pointer
+and causing a core dump. This should never happen, but...
+
diff --git a/doc/RelNotes/v1.14.txt b/doc/RelNotes/v1.14.txt
new file mode 100644
index 0000000..1653587
--- /dev/null
+++ b/doc/RelNotes/v1.14.txt
@@ -0,0 +1,34 @@
+E2fsprogs 1.14 (January 9, 1999)
+================================
+
+Fix the fstab parsing code so that it can handle blank lines and
+comment characters. Also, missing pass numbers need to be treated as
+zero.
+
+Fixed a bug in e2fsck where under some circumstances (when e2fsck
+needs to restart processing after fixing an egregious inconsistency)
+it would try to access already freed memory.
+
+E2fsck now prints non-printable characters in directory entries and
+pathnames using '^' and 'M-' notation.
+
+Fixed chattr so that it will ignore symbolic links when doing
+recursive descent traversals. For both chattr and lsattr, no longer
+print the version string unless the -V option is given.
+
+Allow the system administrator to directly specify the number of
+inodes desired in the filesystem, for some special cases where this is
+necessary.
+
+Fix portability problems so that e2fsprogs can be compiled under Linux
+1.2 systems and Solaris systems.
+
+Update the config.guess file with a more recent version that will
+identify newer Linux platforms.
+
+Programmer's notes
+------------------
+
+Ext2fs_read_inode and ext2fs_write_inode will now return an error if
+an inode number of zero is passed to them.
+
diff --git a/doc/RelNotes/v1.15.txt b/doc/RelNotes/v1.15.txt
new file mode 100644
index 0000000..1b132bb
--- /dev/null
+++ b/doc/RelNotes/v1.15.txt
@@ -0,0 +1,122 @@
+E2fsprogs 1.15 (July 18, 1999)
+==============================
+
+Add configuration checks so that e2fsprogs will compile cleanly on
+Linux 2.3 kernels that have renamed i_version to i_generation.
+
+E2fsck now prints a progress/completion bar (and not just a simple
+spinner) if the -C0 option is requested or if it receives a SIGUSR1
+signal. Fsck will automatically manage the (potentially multiple)
+e2fsck processes to print completion bars if it is given a -C option,
+with the right thing happening if multiple filesystems are being
+checked in parallel.
+
+Mke2fs now has better automatic heuristics to determine the filesystem
+parameters to be used for a particular filesystem. Added a new option
+-T which allows the user to specify how the filesystem is to be used,
+which helps mke2fs do a better job selecting the filesystem parameters.
+
+Mke2fs now creates revision 1 filesystems by default, and with the
+sparse superblock feature enabled. The sparse superblock feature is
+not understood by Linux 2.0 kernels, so they will only allow read-only
+mounts of filesystems with this sparse superblocks.
+
+Fix bug where if /dev/null couldn't be opened (should never happen),
+e2fsck would hang in a tight loop.
+
+Make e2fsck handle the case where /lost+found isn't a directory.
+
+E2fsck now uses mallinfo if it exists to get accurate statistics about
+its memory usage.
+
+Fix bug in e2fsck where it wouldn't check to see if a disconnected
+inode had any problems before connecting it to /lost+found.
+
+Add check to e2fsck so it makes sure that total number of inodes in
+the filesystem is a sane number.
+
+Fix fencepost error when clearing an the end of the block bitmap which
+caused the last block in the bitmap not to get cleared.
+
+Cleaned up a number of messages in e2fsck:
+ * The message "Group's #'s copy of the group descriptor..."
+ was fixed so that the correct number would be displayed.
+ * Added missing space in the "disk write-protected" error message
+ * Cleaned up the error message printed when a non-interactive
+ e2fsck needs to abort a check because the filesystem
+ appears to be mounted.
+
+Added a new command-line utility, uuidgen, which will create and print
+a UUID.
+
+Make debugfs's icheck command more robust by checking to make sure an
+inode has valid blocks before iterating over the inode's blocks.
+
+UUID generation now uses a random-based scheme whenever possible to
+prevent potential privacy problems.
+
+Man pages for all of the UUID functions in the library were added.
+
+Fixed bug in fsck so it won't coredump if a filesystem not in
+/etc/fstab is given to it.
+
+Fsck now understands the UUID=xxxx and LABEL=yyyy forms in /etc/fstab
+that most of the other mount utilities understands.
+
+Mke2fs will make a filesystem even if it appears mounted if the force
+option is given.
+
+Dumpe2fs has new command-line options which allow a filesystem expert
+to specify the superblock and blocksize when opening a filesystem.
+This is mainly useful when examining the remains of a toasted
+filesystem.
+
+The badblocks program has been updated to display correctly on disks
+with large block numbers.
+
+The badblocks program no longer gives spurious errors when errors
+occur on non-block boundaries, which is common if the blocksize is
+larger than 1k.
+
+Mke2fs will sync the disk device every MKE2FS_SYNC block groups if the
+MKE2FS_SYNC environment variable is set. This is to work around a VM
+bug in the 2.0 kernel. I've heard a report that a RAID user was able
+to trigger it even using a 2.2 kernel, but hopefully it will not be
+needed for most Linux 2.2 users.
+
+Fixed miscellaneous documentation and man pages.
+
+Programmer's notes:
+-------------------
+
+Cleaned up functions such as pass1_get_blocks, pass1_read_inode which
+in e2fsck's pass1.c really should have been static.
+
+The return value of the uuid_compare() function was changed to make it
+match with the conventions used by strcmp, memcmp, and Paul Leach's
+UUID sample document.
+
+The "make depend" process has now been made more automated; it now
+automatically word-wraps the dependencies, and only replaces source
+Makefile.in if there has been a change in the dependencies. Also, a
+top-level "make depend" now recurses through all the subdirectories
+automatically.
+
+The Makefile in .../util has been changed so that subst is built using
+the native C compiler during a cross-compilation, since the subst
+program is only used during the build process. Also add an explicit
+rule to build util/subst by cd'ing to the correct directory and
+running Makefile.
+
+The man directories are defined in terms mandir, so that the configure
+script can override the location of the manual pages.
+
+The config files have been updated to recognize new machine types for
+both the i386 and alpha families.
+
+Fsck has been modified so that it will accurately create an
+fsck_instance even when the noexecute flag is set. This allows for
+accurate debugging of the fsck pass structure. Also, when the verbose
+flag is given twice, fsck will print debugging information about when
+fsck is waiting for jobs to finish.
+
diff --git a/doc/RelNotes/v1.16.txt b/doc/RelNotes/v1.16.txt
new file mode 100644
index 0000000..babf0fa
--- /dev/null
+++ b/doc/RelNotes/v1.16.txt
@@ -0,0 +1,87 @@
+E2fsprogs 1.16 (October 22, 1999)
+=================================
+
+Fixed a race condition bug in fsck; when printing a progress bar, if
+checking multiple filesystems in parallel, it was possible for fsck to
+send e2fsck a SIGUSR1 signal before e2fsck had installed its signal
+handler, which would cause it to terminate with a signal 10.
+
+E2fsck now properly handles filesystems that have the
+INCOMPAT_FILETYPE feature turned on. It can be used to convert a
+filesystem into using or not using FILETYPE feature.
+
+E2fsck now properly handles filesystems that have the IMAGIC feature
+turned on (this is used on Linux AFS servers).
+
+The mke2fs program now creates filesystems that have the filetype and
+sparse_superblock features enabled by default, unless it is run on a
+pre-2.2 kernel. These features are not supported by a pre-2.2 kernel,
+so there is now a new flag -O which allows the user to specify with
+which features she would like to create the filesystem; "mke2fs -O
+none" will create a filesystem compatible with 2.0 kernels.
+
+The tune2fs program now has a -O option which allows the user to set
+and reset "safe" filesystem features. Currently, the only ones which
+allows to be modified are the filetype and sparse_superblock features.
+Note setting or clearing either feature will require running e2fsck on
+the filesystem afterwards. (n.b. Clearing the sparse_superblock feature
+requires that there is enough free space on the filesystem for the
+extra superblocks which will be created by e2fsck.)
+
+Debugfs can now set and print filesystem features in the superblock
+using the "features" command. Dumpe2fs will print out the complete
+set of features when listing the superblock.
+
+Dumpe2fs has new options -f (force) and -h (header-only).
+
+Fixed a bug in e2fsck which could cause the PROGRAMMING ERROR/bonehead
+message to come up. This could happen when decrementing or
+incrementing a link count could result in an overflow.
+
+Fixed a bug in e2fsck where the block count on the lost+found
+directory would not be properly incremented when the directory was
+expanded to the point where an indirect block needed to be allocated.
+
+E2fsck now makes some additional sanity checks on the superblock to
+avoid crashing or giving a memory allocation error if some of the
+values in the superblock are unreasonable (but the superblock otherwise
+looks valid).
+
+Fixed a bug in e2fsck where a very badly corrupted filesystem might
+require two passes to completely fix the filesystem. This happened if
+an inode claimed blocks that was part of the filesystem metadata
+(typically, when garbage was written into an inode table or indirect
+block, since this kind of filesystem corruption normally doesn't
+happen otherwise).
+
+On the Alpha, glibc declares st_flags although it isn't actually used;
+the configure script was improved to detect this case so that
+e2fsprogs can avoid using the non-functional stat field.
+
+The manual pages were updated to use a more consistent formatting
+style consistent with standard Unix man pages. Mke2fs's man page
+added documentation for a few previously undocumented options.
+
+Fixed minor display bugs in tune2fs and mke2fs.
+
+Programmer's notes:
+-------------------
+
+Improved portability of e2fsprogs to non-Unix systems (in particular, NT).
+
+Added features to parse and print feature strings into the e2p library.
+(e2p_feature2string, e2p_string2feature, e2p_edit_feature).
+
+ext2fs_mkdir() and ext2fs_new_dir_block() now creates directories
+whose directory entries contain proper filetype information if the
+filesystem supports it.
+
+ext2fs_link() now uses the low 3 bits of its flags parameter to pass
+the directory entry filetype information. This is used to set the
+directory entry filetype information if the filesystem supports it.
+
+Fixed a bug in ext2fs_expand_dir() where the block count in a
+directory's inode would not be properly incremented when the directory
+was expanded to the point where an indirect block needed to be
+allocated.
+
diff --git a/doc/RelNotes/v1.17.txt b/doc/RelNotes/v1.17.txt
new file mode 100644
index 0000000..21ba194
--- /dev/null
+++ b/doc/RelNotes/v1.17.txt
@@ -0,0 +1,32 @@
+E2fsprogs 1.17 (October 26, 1999)
+=================================
+
+Fixed nasty typo in fsck which caused parallelized fsck's to go into an
+infinite loop.
+
+Fixed a bug in fsck where it used strncmp to compare a binary UUID,
+thus potentially causing problems if a binary UUID contained a NULL
+character.
+
+E2fsck now uses stricter checks for directory entries in pass 2:
+zero-length filenames are not allowed; neither are 8 byte long
+directory entries.
+
+The debugfs "dirty" command now clears the filesystem valid bit.
+(Previously this just set the dirty-as-in-needs-writing-out-to-disk
+bit in the in-core superblock image. The new functionality is more
+what the user expects, and is more useful.)
+
+Added a debugging hook to test parallel fsck; if the environment
+variable FSCK_FORCE_ALL_PARALLEL, then filesystems on the same drive
+will be checked in parallel when they normally would not be.
+
+Programmer's notes:
+-------------------
+
+Fixed some #ifdef's for compilation under the Hurd OS.
+
+Fixed minor W2K compatibility problems.
+
+Fixed some miscellaneous GCC warnings.
+
diff --git a/doc/RelNotes/v1.18.txt b/doc/RelNotes/v1.18.txt
new file mode 100644
index 0000000..17cc283
--- /dev/null
+++ b/doc/RelNotes/v1.18.txt
@@ -0,0 +1,46 @@
+E2fsprogs 1.18 (November 10, 1999)
+==================================
+
+Fix a core dumping bug in e2fsck if an imagic inode is present or
+(more rarely) if the filesystem is badly corrupted enough that e2fsck
+has to restart pass 1 processing. E2fsck now closes the filesystem
+before freeing a large number of its data structures, so in the case
+of future memory faults, at least the fixed filesystem will be fully
+written out.
+
+If a filesystem doesn't support imagic inodes, and e2fsck discovers an
+imagic inode, it will offer to clear the imagic flag.
+
+E2fsck will now offer to clear the immutable flag on special files
+(device/socket/fifos) when running it in non-preen mode.
+
+E2fsck will now set the filetype when creating /lost+found, and when
+connected orphaned inodes to /lost+found.
+
+Debugfs's ncheck and icheck commands now handles the case where there
+are bad blocks in the inode table without bombing out.
+
+The badblocks list processing code has been made more efficiently for
+appending a large number of (ordered) badblocks to the badblocks list.
+
+Some minor man page updates.
+
+Fsck now allows interactive e2fsck's when using fsck -As (not a common
+mode, but some people like to do this in boot scripts for silly reasons).
+
+Programmer's notes:
+-------------------
+
+The internal e2fsck problem code for PR_2_SPLIT_DOT was fixed to meet
+with the problem code convention.
+
+The badblocks list regression test program has been updated to work
+with previously made API name changes.
+
+The ext2fs_free() command now uses the new badblocks API to avoid
+using the compatibility layer.
+
+Added new regression test cases; the run_e2fsck test script now
+supports the ability for a test case to run a preparatory command
+before running e2fsck.
+
diff --git a/doc/RelNotes/v1.19.txt b/doc/RelNotes/v1.19.txt
new file mode 100644
index 0000000..1b8bbc6
--- /dev/null
+++ b/doc/RelNotes/v1.19.txt
@@ -0,0 +1,180 @@
+E2fsprogs 1.19 (July 13, 2000)
+==============================
+
+Release the resize2fs program since the timeout before it could
+be released under the GPL has finally expired.
+
+Add experimental support needed for the ext2 compression patches.
+This requires compiling e2fsprogs with the --enable-compression flag
+to the configure script.
+
+Added ext3 journalling support. E2fsck will run the journal (if
+necessary) by temporarily mounting the filesystem. /sbin/fsck.ext3 is
+installed as a symlink to e2fsck. Fsck has been taught about ext3,
+and treats it the same as ext2 in terms of the progress bar logic.
+Dumpe2fs will display the superblock journalling information if the
+filesystem has a journal. The ext2 library will now permit opening an
+ext3 filesystem with the recovery flag set. This is necessary for
+on-line dump's to work correctly, but there may be issues with this
+working well since ext3 is much less aggressive about syncing blocks to
+the filesystem, since they're safe on the journal.
+
+Tune2fs and e2fsck have been changed to allow the mount_count check to
+be disabled by setting max_mount_count to -1. (This was already
+supported by the kernel.)
+
+Create a symbolic link for fsck.ext3, since the e2fsprogs utilities
+are used for ext3 as well.
+
+Added internationalization support for e2fsprogs; must be enabled
+by passing --enable-nls to configure.
+
+Always use the provided ext2fs header files to insulate ourselves from
+kernel version changes. Which include files are used by e2fsprogs
+have also been cleaned up to improve portability.
+
+Limit the number of times that e2fsck updates the progress bar so that
+people who are booting using a 9600 baud console don't get swamped by
+too many updates.
+
+Improved the loop detection algorithm in e2sck's pass #3 so that it is
+much, much faster for large filesystems with a large number of
+directories.
+
+The memory footprint for e2fsck is now slightly smaller than before.
+
+E2fsck now checks if special devices have a non-zero size, and offers
+to clear the size field if it finds such an inode.
+
+E2fsck now checks if special devices have the append-only flag set,
+and offers to clear the inode.
+
+E2fsck now properly handles some "should never fail" cases during a
+bitmap copy in pass5.
+
+E2fsck now properly prints control characters in filenames as ^A .. ^Z.
+
+E2fsck now calculates the correct location of the backup superblock in
+the case of filesystem blocksizes > 1k.
+
+Fixed a bug in e2fsck's calculation of the number of inodes_per_block
+which normally didn't cause problems under most filesystem parameters,
+but could cause a valid superblock to be rejected in extreme cases.
+Other checks for validating superblock values were made more
+stringent.
+
+Added non-destructive write testing to the badblocks program, courtesy
+of David Beattie. The badblocks also now has an option to input the
+current set of bad blocks, so that known bad blocks are skipped to
+speed up the badblocks test. There is also a persistent rescan
+feature which causes badblocks to run until it has completed some
+number of passes without discovering any new bad blocks.
+
+Badblocks now checks to see if the device is mounted and refuses to do
+the tests involving writing to the device if it is mounted. Also,
+badblocks now allows the number of blocks to be checked to be
+defaulted to the size of the partition.
+
+Fixed a bug in fsck which didn't allow non-root users to be able to
+check filesystems if there were any LABEL= or UUID= entries in
+/etc/fstab.
+
+The Hurd doesn't support the filetype filesystem feature. The mke2fs
+program now makes sure that for the Hurd, the filetype feature is
+turned off. E2fsck will check to see if the filetype feature is
+turned on for Hurd filesystems, and offer to turn off the feature.
+
+Mke2fs now has a safety check to make sure the number of blocks do not
+exceed 32 bits even on a 64 bit platform.
+
+Really fixed a bug in fsck to allow "fsck -As" to run interactive
+fsck's. (For those people who like to do interactive fsck's in the
+/etc/rc scripts!?!)
+
+Debugfs has a few new features: the rdump command, which will do a
+recursive dump of a directory and all of its contents, and the lcd
+command which does a local chdir (much like the ftp command of the
+same name). In addition, the debugfs program and the open_filesystem
+command now takes three new options: -b and -s, which allows the
+blocksize and superblock location to be specified, and the -c option
+which is used in catastrophic situations where the block group
+descriptors are corrupt. If the -c option is specified, debugfs will
+skip trying to read in the block and inode bitmaps.
+
+Debugfs's lsdel command was fixed to handle bad blocks in the inode
+table.
+
+A Y2K bug in debugfs's "ls -l" handling was fixed by switching to use
+4 digit years.
+
+General improvements in error messages
+
+ - Mke2fs prints a sane error message if the partition size is zero
+ (usually because the partition table wasn't reread by the
+ kernel due to the partition being busy), instead of "invalid
+ argument passed to ext2 library while initializing superblock".
+
+ - Fsck now prints more self-explanatory message if an invalid UUID=
+ or LABEL= specification is passed to it.
+
+UUID library changed to use the LGPL.
+
+Fixed a bug in the UUID library where very rapid calls to the
+time-based UUID generator could cause duplicate UUID's to be returned.
+This was not a problem for e2fsprogs, but it could be a problem for
+other users of the library.
+
+Make the UUID library more robust in the face of missing or an
+improper /dev/urandom or /dev/random files.
+
+Added some random portability fixes for Solaris.
+
+Some minor man page updates.
+
+Fixed a memory leak in the ss library.
+
+
+Programmer's notes:
+-------------------
+
+We now try to use lseek64 and open64 from the LFS if possible.
+
+The 3rd parameter in e2p's print_flags is now a flags word, instead of
+a boolean option.
+
+The mark and unmark bitmap functions now return the previous state of
+the bit that was being changed, which is useful for some speed
+optimizations.
+
+The following functions have been added to enhance the badblocks list
+handling in libext2fs: ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
+ext2fs_badblocks_equal.
+
+The ext2 header files now have the latest journalling fields to the
+superblock.
+
+The ext2fs_mkdir function in libext2fs now properly backs out of error
+conditions robustly.
+
+Cleaned up makefiles:
+ - to cleanly compile with the -j flag.
+ - so distclean removes all generated files.
+ - so in case of an error while installing header files, the make aborts.
+
+Fix test_script so that it works correctly when compiling in the
+source directory.
+
+The random UUID generation routine has been made slightly better in
+the case where /dev/random doesn't exist. (Use of randomly-based UUID
+is still not recommended if /dev/random doesn't exist, however; it's
+better to use the time/ethernet MAC address UUID in this case.)
+
+Clean up the build process so it's more friendly in case of missing
+directories.
+
+The ext2fs header file can now be #include'd into C++ programs.
+
+The e2p.h header file is now installed.
+
+Added workaround to a gawk 3.0.5 bug in lib/ss/mk_cmds.
+
diff --git a/doc/RelNotes/v1.20.txt b/doc/RelNotes/v1.20.txt
new file mode 100644
index 0000000..c2423ad
--- /dev/null
+++ b/doc/RelNotes/v1.20.txt
@@ -0,0 +1,206 @@
+E2fsprogs 1.20 (May 20, 2001)
+=============================
+
+Add support for replaying the ext3 journal purely in user mode,
+including handling the orphaned inode list. Used code contributed by
+Andreas Dilger, with bug fixes and the orphaned inode handling done
+by Theodore Ts'o.
+
+The mke2fs and tune2fs programs can create or modify a filesystem to
+include an ext3 journal. Tune2fs also can be used to remove an ext3
+journal from a filesystem.
+
+E2fsck will now check for the existence of a linked list of orphan
+inodes in the superblock, and clear those inodes before starting the
+rest of the filesystem check (but after the journal playback).
+
+E2fsck now validates the file descriptor passed to the -C option,
+which saves against the completion bar getting written to an
+unexpected location, such as the disk being checked. (Debian
+bug/wishlist #55220)
+
+E2fsck will now bump the filesystem revision number from zero to one
+if any of the compatibility bits are set.
+
+Fixed a bug where a badly corrupted directory on a big endian system
+could cause e2fsck to die with a bus error. The
+ext2fs_read_dir_block() and ext2fs_process_dir_block() functions in
+the ext2 library now does alignment sanity checks on the rec_len field
+of the directory entry before using it.
+
+The ext2 library has been enhanced to make tune2fs safe to run on
+mounted filesystems. (Users could usually get away with using tune2fs
+on mounted filesystems before, but with the advent of ext3 and
+journalling, it became important to make tune2fs was *really* safe for
+use even when the filesystem being modified is mounted.) E2label is
+now implemented by tune2fs using an argv[0] dispatch, so that e2label
+is also now safe for use on mounted filesystems.
+
+Added a new program, e2image, which creates a backup of critical ext2
+filesystem data structures. The generated image file can be examined
+using dumpe2fs and debugfs. In the future, e2fsck will be able to use
+the image file to help recover very badly damaged filesystems.
+
+Fixed a number of LFS bugs in e2fsck; very, very large (> 2**42) files
+no longer cause e2fsck to bomb out. Also treat files > 2GB as being
+large file when deciding whether or not the filesystem has large files.
+
+Fixed lsattr and chattr so that they work correctly on large files.
+(Fixes Debian bug #72690.)
+
+Removed limitation in get_device_size() which imposed a one terabyte
+filesystem limitation. (Most 2.2 kernels still have a signed int
+problem which cause 1 TB block device limitation. Fortunately, the
+kernel patches to fix this are much easier than fixing the 2TB
+limitation in the kernel. :-)
+
+A max_mount_count of zero is now treated as if no mount count were
+set. (Previously, no mount count was indicated by using -1, and a
+mount count of zero caused e2fsck to always be run.)
+
+Mke2fs supports two new filesystem types largefile and largefile4.
+
+Mke2fs now adds some randomness in s_max_mount_count so that multiple
+filesystems won't be all checked at the same time under normal
+operations.
+
+Fixed bug in the progress bar printing code which could cause e2fsck
+to core dump on an illegal filesystem.
+
+Fixed bug in fsck which could allow more than one instance of e2fsck
+to be printing a progress bar. (Debian bug #65267)
+
+Fsck using a UUID or a LABEL specifier will work even if devfs is
+compiled into the kernel and not mounted. If the pathnames in
+/proc/partitions are incorrect, fsck will search /dev for the correct
+device (using the new ext2fs_find_block_device library function).
+Fsck now also checks the RAID devices first so that they are properly
+found when they are in use. Support has also been added to support
+additional IDE disks and the DAC 960 device names. (Debian bug #94159)
+
+Fixed a bug in fsck which caused it not deal properly with 16
+byte long filesystem labels.
+
+Fsck's -t option has been made a lot more flexible. The semantics for
+what happens if a comma-separated list to fsck has been regularized,
+and it is now possible to filter what filesystems will get checked
+based what is in the filesystem's fstab entry's option field. (Debian
+bug #89483.)
+
+The dumpe2fs program can now print out the group description
+information in hex, and also prints the location of the superblock and
+block group descriptor for those block groups that have them.
+
+Mke2fs now clears the ext2 superblock before it starts creating a
+filesystem, so that the superblock magic number is only written if the
+filesystem creation process successfully completes.
+
+The debugfs program's stat command now pretty-prints the blocks used
+by an inode so that it's more compact and informative.
+
+The debugfs stats command now uses the same libe2p code (which is used
+by dumpe2fs) to print the superblock header information. This is more
+complete, and it avoids a bit of code duplication.
+
+Added a new debugfs command, set_super_value (ssv) which allows the
+user to set arbitrary superblock fields.
+
+Debugfs was extended to support inode numbers in hex (by prefixing
+them with 0x), and so that modify_inode can set the inode generation
+number. Also, there is now a new function command called logdump
+which will dump an ext3 journal.
+
+Fixed a bug in debugfs so that quitting out of the pager doesn't kill
+debugfs.
+
+Debugfs's dump command now stops immediately upon reporting a disk
+read error. (Fixed a bug in ext2fs_file_read library routine which
+caused debugfs not to stop.) (Debian bug #79163)
+
+On systems with /proc/mounts (mainly Linux systems), /proc/mounts is
+checked before /etc/mtab is used, since /proc/mounts is more likely to
+be accurate.
+
+Added portability fixes for Solaris and Linux/ia64.
+
+Various manual pages were clarified and cleaned up. (Fixed debian
+bugs #63442, #67446, and #87216)
+
+
+Programmer's notes:
+-------------------
+
+The e2fsck message printer now supports %Iu and %Ig, which will print
+out the inode's user and group owners, respectively.
+
+E2fsprogs now includes its own version of include/linux/ext2_fs.h, so
+that no longer dependent on the system having the correct version of
+the kernel header files.
+
+Added a new function to libext2, ext2fs_find_block_device(), which
+searches the system (i.e., /dev, /devfs, /devices) for a pathname to a
+device given its device number.
+
+Added a new function to libext2, ext2fs_sync_device, which centralizes
+all of the places which might try to use the BLKFLSBUF or FDFLUSH
+ioctls (and usually failing to define them since the system header
+files don't usually do this for us, and we're trying to avoid usage of
+kernel include files now).
+
+Added new utility programs in tests/progs: random_exercise and
+hold_inode. They aren't built by default; they're useful for
+exercising ext3 filesystem code.
+
+Added a new ext2 filesystem flag, EXT2_FLAG_SUPER_ONLY, which causes
+the filesystem close functions to only update the superblock, and to
+not touch the block group descriptors. Needed by tune2fs when
+modifying a mounted filesystem.
+
+Got rid of struct ext2fs_sb and replaced it with the standard struct
+ext2_super_block from include/linux/ext2_fs.h. Note: this may break
+source (but not binary) compatibility of some users of the ext2
+library. Those applications should just simply do a global search and
+replace of struct ext2fs_sb with struct ext2_super_block, and include
+the new header file <ext2fs/ext2_fs.h> which defines it.
+
+The ino_t type has been renamed ext2_ino_t to protect applications
+that attempt to compile -D_FILE_OFFSET_BITS=64, since this
+inexplicably changes ino_t(!?). So we use ext2_ino_t to avoid an
+unexpected ABI change.
+
+The Makefiles have been reworked so that "make check" can be run from
+the top-level Makefile.
+
+Fix general gcc -Wall complaints and removed dead code.
+
+Remove use of NOARGS, because we assume everyone does ANSI C these
+days.
+
+Added build-rpm script from sct.
+
+New functions ext2fs_image_{inode,super,bitmap}_{read,write} added
+to support e2image.
+
+New function ext2fs_flush_icache which must be called if the
+application program modifies the inode table blocks without going
+through ext2fs_write_inode() interface.
+
+New ext2fs_check_mount_point() function, which will return the mount
+point of a device if mounted.
+
+The io_channel abstraction now has an optional interface,
+io_channel_write_range, which allows specific byte ranges to be
+written.
+
+The unix_io IO channel now supports write-through caching, so that
+journal creation is more efficient.
+
+Added x86 assembly language routines to support byte swapping, to
+reduce executable size.
+
+Fixed bug in the utility program subst so that it's possible to
+replace a substitution variable with a zero-length string.
+
+Fixed numbering e2fsck pass1 problem numbers; an extra zero had
+slipped into some of the problem number.
+
diff --git a/doc/RelNotes/v1.21.txt b/doc/RelNotes/v1.21.txt
new file mode 100644
index 0000000..c0a56e3
--- /dev/null
+++ b/doc/RelNotes/v1.21.txt
@@ -0,0 +1,119 @@
+E2fsprogs 1.21 (June 15, 2001)
+==============================
+
+Added new configure flags which allow a subset e2fsprogs to be built;
+this is most useful for boot floppies, since the resulting shared
+libraries and programs are slimmed down by removing features that
+aren't necessary for a boot floppy. The new flags that were added
+are: --disable-swapfs, which removes support for byte swapping old
+legacy PPC/68k filesystems, --disable-debugfs, which removes support
+for debugfs from the libext2fs library, --disable-imager, which
+removes support for the e2image program, and --disable-resizer, which
+removes support for resize2fs.
+
+E2fsck now prints the number of mounts or days elapsed since the last
+check when e2fsck is forced to check an otherwise clean filesystem.
+
+Tune2fs now prints an informative message about how often a filesystem
+will be checked when adding a journal to the filesystem, to remind the
+user that he/she may want to adjust those parameters using tune2fs
+-c/-i.
+
+Worked around hurd brain-damage which causes e2fsck to sometimes
+believe a filesystem is the root filesystem based on device numbers
+(since Hurd doesn't have dev_t's, which is arguably a POSIX.1
+violation).
+
+Fixed a bug introduced in 1.20 which caused e2fsck to abort with an
+erroneous error with the -F option was specified.
+
+Fixed a ext3 recovery bug in the revoke handling; synchronized with
+ext3 0.7a.
+
+Fixed two bugs in e2fsck's handling of dup block handling, dealing
+with relatively uncommon edge cases: a directory with an indirect
+block which is claimed by another file, and when the last inode in the
+filesystem has blocks claimed by another file.
+
+E2fsck now checks to see if the i_size field of a fast symlink is too
+big, and offers to clear the symlink if so.
+
+E2fsck now checks to see if i_size_high of special files is non-zero,
+and offers to clear i_size_high.
+
+Fix e2fsck's handling of incompatible journal flags so that the user
+has chance to abort, and then has the option to clear out the journal
+entirely. (Addresses Debian bug #98527.)
+
+Fixed a bug in fsck which could cause it to core dump if a mix of
+standard and non-standard device names are used in /etc/fstab.
+(Debian bug #100559)
+
+Fixed a bug in debugfs which caused read errors when copying a file to
+not be noticed.
+
+The debugfs set_super_value command can now modify the s_lastcheck field.
+
+Fixed a bug in lsattr and chattr which was accidentally introduced in
+1.20 to support > 2GB files; both lsattr and chattr wasn't reading
+directories correctly because the change modified the layout of struct
+dirent to be incompatible with the libe2p shared library.
+
+Cleaned up the mke2fs manual page and included a discussion about why
+it's good to periodically check the filesystem even when journalling is
+enabled.
+
+Programmer's notes:
+-------------------
+
+Fix general gcc -Wall complaints.
+
+The types needed by the ext2 header files are now provided by
+lib/ext2fs/ext2_types.h, instead of include/asm/types.h.
+
+Integers are now preferred to longs when trying to find a 32-bit type
+in ext2_types.h. Also, if linux/types.h has already been defined,
+don't try to redefine the types.
+
+Fixed make depend script so that it automatically corrects the
+pathname cleanups performed by make -M, so I don't have to fix them up
+by hand.
+
+Fixed the d_loaddump test case to be more robust, and not depend on
+bash'isms.
+
+Removed debugfs's dependence on pread(), which was accidentally
+introduced in e2fsprogs 1.20
+
+Fixed a performance bug in the libext2fs's icount routine; the size
+estimate of the icount array was incorrectly being calculated.
+
+Removed use of the badblocks compatibility functions in the e2fsprogs
+programs.
+
+Added paranoia code which protects against strange cases where /etc
+isn't on the root filesystem, or if /etc/mtab doesn't exist.
+
+The header file ext2_types.h is now installed.
+
+Autoconf is used to determine when we are on big-endian machines,
+instead of doing run-time tests, to save a few bytes of code.
+
+The ext2fs_mark_generic_bitmap and ext2fs_unmark_generic_bitmap
+functions are no longer inline functions, which saves space and
+doesn't really cost any real performance.
+
+The ext2fs library no longer depends on the e2p library. (What need
+there was of it --- namely, fsetflags, was coded in-line).
+
+Fixed the makefile so that lib/ext2fs/ext2_types.h is generated even
+when the user is stupid and tries compiling the package using "make
+install" as root.
+
+Miscellaneous code cleanups:
+ * Added missing files from Makefile.in's SRCS file, so that
+ their dependencies would be properly calculated.
+ * Removed redundant code
+ * Fixed comments in code
+ * Removed no-longer needed argsused #pragma.
+
diff --git a/doc/RelNotes/v1.22.txt b/doc/RelNotes/v1.22.txt
new file mode 100644
index 0000000..204a0c5
--- /dev/null
+++ b/doc/RelNotes/v1.22.txt
@@ -0,0 +1,31 @@
+E2fsprogs 1.22 (June 22, 2001)
+==============================
+
+Fixed a bug in e2fsck's handling of orphan inodes which are special
+files (i.e., block/character device files, named FIFO's, etc.).
+
+Fixed a bug accidentally introduced in e2fsprogs 1.21 which caused
+tune2fs to fail at adding a journal to a mounted filesystem.
+
+Fixed a few big-endian bugs in e2fsprogs
+ * The directory block functions were accidentally reporting
+ some directories as corrupted when they weren't.
+ * If e2fsprogs is compiled --disable-swapfs, the C language
+ equivalents weren't being included for big-endian platforms.
+ (Fixes Debian bug #101686).
+
+Fixed a Hurd compilation problem. (Addresses Debian bug #101361)
+
+Programmer's notes:
+-------------------
+
+Use platform independent method of defining the BLKFLSBUF and FDFLUSH
+ioctls, and allow them to be defined for non-i386 platforms.
+
+The uuid.h header file is now protected against multiple inclusions.
+
+E2fsprogs is now being developed using BitKeeper. Changed the test
+scripts to deal with BK's stripping CR characters from text files,
+and changed the top-level Makefile.in to avoid including BitKeeper
+files when generating the source tarball.
+
diff --git a/doc/RelNotes/v1.23.txt b/doc/RelNotes/v1.23.txt
new file mode 100644
index 0000000..c62b6f2
--- /dev/null
+++ b/doc/RelNotes/v1.23.txt
@@ -0,0 +1,65 @@
+E2fsprogs 1.23 (August 15, 2001)
+================================
+
+Add initial support for extended attributes (EA); e2fsck will
+correctly handle a filesystem with EA's and check the EA blocks for
+corruptions.
+
+E2fsck's symlink sanity checking has been cleaned up. It now checks
+the i_size value of fast symlinks, and checks for immutable flags
+being set of symlinks, etc.
+
+E2fsck now offers to clear inodes which are special files that have a
+non-zero i_blocks or i_size field. (The i_size field check was in the
+previous version of the code, but due to a bug it didn't offer to
+clear the inode unless i_size and i_size_high were both non-zero.)
+
+E2image can now create "raw" image files, which only contain the
+filesystem metadata placed in a spare file so that e2fsck, dumpe2fs,
+debugfs, etc., can be run directly on the raw image file.
+
+Add support for the 64-bit block device patches.
+
+Fixed bugs in creating external journals with a 1k blocksize.
+
+Add initial support for external journals (so long as the external
+journal only supports a single filesystem) in e2fsck.
+
+Remove requirement for needing to run fsck on a filesystem after
+removing a journal (either internal or external).
+
+The man pages now document how to create and manage external journals.
+
+Speed up the check of an ext3 filesystems by avoiding a needless flush
+of all of the superblock and block group descriptors.
+
+Speed up creating an internal journal using tune2fs in the case where
+the filesystem has a lot blocks already allocated.
+
+Tune2fs has been fixed to make sure that only error messages go to
+stderr, and normal message go to stdout. (Addresses Debian bug #108555)
+
+Fixed a minor bug in mke2fs; if -O none is passed to mke2fs, it will
+now not set the sparse_super feature. (Addresses Debian bug #108165)
+
+Add support in fsck for the filesystem type "auto".
+
+Fsck -A will not try to interpret device names for filesystems which
+have a pass number is 0. (Addresses Debian bug #106696).
+
+Fsck prints a warning message if now valid filesystems are passed to
+it. (Addresses Debian Bug #107458.)
+
+E2fsck now gives an explicit warning if there filesystem still has
+errors at the end of the run. (Addresses Debian bug #104502)
+
+E2fsck will set the EXT2_ERROR_FS flag if the journal superblock
+reflects an error. E2fsck will also not run the orphan list if the
+filesystem contains errors, since the orphan list might be corrupted.
+
+E2fsck now prints the number of large files when given the -v option.
+
+Fixed minor memory leaks in e2fsck.
+
+Some minor man pages updates. (Addresses Debian bug #30833, #108174)
+
diff --git a/doc/RelNotes/v1.24.txt b/doc/RelNotes/v1.24.txt
new file mode 100644
index 0000000..f8fd56c
--- /dev/null
+++ b/doc/RelNotes/v1.24.txt
@@ -0,0 +1,38 @@
+E2fsprogs 1.24a (September 2, 2001)
+===================================
+
+Fix brown-paper bug in mke2fs which caused it to segfault when
+printing the version string.
+
+
+E2fsprogs 1.24 (August 30, 2001)
+================================
+
+Revert the BLKGETSIZE64 support, since for some distributions, this
+ioctl has been used by an unofficial kernel patch to update the last
+sector on the disk, and this was causing disk corruption problems as a
+result.
+
+Mke2fs is now more careful about zapping swap space signatures and
+other filesystem/raid superblock magic values so that programs like
+mount who try to use heuristics to determine the filesystem type of a
+partition are less likely to be confused.
+
+E2fsck will no longer complain if the the mode of EXT2_RESIZE_INO is a
+regular file (since Andreas Dilger's on-line resizing tools will set
+its mode bits).
+
+Fixed some minor texinfo, man pages nits for spelling errors,
+texinfo warnings, etc. (Addresses Debian bug #110621.)
+
+E2fsprogs program no longer print the filesystem version number
+(i.e. 0.5b), since it only confuses people and doesn't serve any real
+purpose.
+
+E2fsck will once again compile under libc5, since it will supply its
+own version of strnlen if necessary.
+
+mke2fs and tune2fs will allow the use of UUID= or LABEL= specifiers
+when specifying the external journal device. tune2fs will also search
+devices looking for the external journal device when removing it.
+
diff --git a/doc/RelNotes/v1.25.txt b/doc/RelNotes/v1.25.txt
new file mode 100644
index 0000000..2f3be23
--- /dev/null
+++ b/doc/RelNotes/v1.25.txt
@@ -0,0 +1,46 @@
+E2fsprogs 1.25 (September 20, 2001)
+===================================
+
+This is primarily a bug-fix release; no new features were added, but
+there are a number of embarrassing bug fixes and cleanups applied.
+
+Fix a bug mke2fs which causes stack garbage to be written to disk when
+zapping disk sectors. (This bug could cause mke2fs to core dump for
+some kernels, I suspect with security enhancement patches.)
+
+Remove unneeded #include of <linux/config.h> which was breaking
+building e2fsprogs on the Hurd. (Addresses Debian bug #112414.)
+
+Updated tune2fs man page to reflect the fact that adding or removing a
+journal doesn't require running e2fsck.
+
+Remove use of AC_REQUIRE from autoconf which had been used to prevent
+AC_CANONICAL_HOST from being called twice; unfortunately this causes
+recent autoconf to bomb out since they don't allow AC_REQUIRE to be
+used outside of autoconf macros. Fortunately, it doesn't seem to be
+necessary any more, anyway.
+
+E2fsck will now not fall back to an alternate superblock if the user
+specifies the superblock location explicitly on the command-line.
+This allows easier recovery from a situation where the primary
+superblock and block groups are slightly corrupted, but the backup
+superblocks are completely broken.
+
+Fix problem which caused compile_et and mk_cmds to blow up if
+e2fsprogs was in a directory with a pathname that contained spaces.
+
+We are now more paranoid about checking the entry in /etc/mtab to make
+sure the filesystem is really mounted, since some broken distributions
+(read: Slackware) don't initialize /etc/mtab before checking non-root
+filesystems. (Slackware also doesn't check the root filesystem
+separately, and reboot if the root filesystem had changes applied to
+it, which is dangerous and broken, but there's nothing I can do about
+that.)
+
+Make UUID library C++ friendly by adding appropriate extern "C"
+declarations and using const in the function declarations.
+
+Fix up the com_err texinfo file so that it can product a valid info
+file (previously, it could only be used to generate paper
+documentation using texinfo.tex).
+
diff --git a/doc/RelNotes/v1.26.txt b/doc/RelNotes/v1.26.txt
new file mode 100644
index 0000000..0c4609c
--- /dev/null
+++ b/doc/RelNotes/v1.26.txt
@@ -0,0 +1,164 @@
+E2fsprogs 1.26 (February 3, 2002)
+=================================
+
+Dumpe2fs will keep going now if the bad block inode can't be read.
+(Previously it stopped with a fatal error.)
+
+E2fsck will now give an opportunity to run the journal even if the
+recovery flag is not set. This is the default behaviour if e2fsck is
+using a backup superblock, since the needs_recovery flag will never be
+set in the backup superblock copies.
+
+E2fsck now automatically finds the backup superblock/group descriptors
+even when the primary superblock is completely destroyed for 2k and 4k
+filesystems. (Previously it just guessed/assumed that we were dealing
+with a 1k filesystem in that case, and users had to manually specify
+the backup superblock number.)
+
+Fixed a bug in e2fsck where it dereferences a null pointer when there
+is a problem opening a filesystem in preen mode.
+
+E2fsck now handles external journals correctly; previously it trashed
+the external journal device if the journal needed to be replayed.
+
+Work around ulimit incompatibility problem caused by recent 2.4
+kernels; the unix IO module will automatically try to set any resource
+limits to be infinite on startup.
+
+Fixed a bug in e2fsck where it wasn't allocating a new block or inode
+bitmap if it wasn't present and the blocksize was 2k or 4k.
+ (Addresses Debian Bug #116975)
+
+E2fsck will check and fix botched ext3 V1 to V2 superblock updates by
+clearing the new V2 fields if they do not make sense or if the ext3
+superblock is version 1 superblock.
+
+E2fsck will automatically relocate the ext3 journal from a visible
+file (i.e., /.journal) to an hidden inode if the filesystem has been
+opened read/write. This allows the users to add a journal while the
+filesystem is mounted, but the next time the system is rebooted, the
+journal file will disappear. This avoids problems with backups,
+stupid operators with superuser bits, etc.
+
+Fix a bug in fsck where it would not support a filesystem type of
+"auto" if the device was specified in terms of LABEL=xxx or UUID=xxx.
+
+Fsck now supports fstab entries of the form "ext3,ext2". It will also
+automatically identify reiserfs filesystems.
+
+The number of processes spawned by fsck can now be limited using the
+FSCK_MAX_INST environment variable.
+
+Fsck now searches the LVM proc hierarchy to find logical volumes which
+should be searched for UUID and label information.
+
+Work around a bug in 2.4.10+ kernels by trying to unset the filesize
+limit if at all possible, when opening a block device. (The filesize
+limit shouldn't be applied against writes to a block device.)
+
+In mke2fs and e2fsck, specifying the -c option twice will now do
+a read/write test on the disk. Update the man pages to encourage
+using the -c option, and to discouraging running badblocks separately,
+since users tend to forget to set the blocksize when running
+badblocks.
+
+Mke2fs now automatically clears the immutable attribute on a
+pre-existing .journal file left over from a previous failed attempt to
+add a journal to an already-mounted filesystem.
+
+Fixed mke2fs's exit codes to consistently indicate when the mke2fs
+operation failed.
+
+Mke2fs now creates the lost+found directory with permissions of 0700,
+so that files that had previously lived in protected directory are
+safe if they get dropped in lost+found and the system administrator
+doesn't deal with immediately. (Addresses Debian #bug 118443)
+
+Mke2fs and e2fsck (and all programs that use the
+ext2fs_check_if_mounted function) will now properly identify that a
+device is mounted, even in cases where devfs has confused things with
+multiple devices names with the same identity, or if a dim-witted
+system administrator has done something stupid like creating device
+file aliases in their home directory. Also now checks for swap devices
+by using /proc/swaps. (Addresses Debian bug #106622)
+
+Added a new option (-T) to tune2fs which sets the time a filesystem
+was last checked.
+
+Speed up e2image when creating sparse raw image files by optimizing
+away excess lseek() system calls.
+
+Fix support of large (> 2GB) files when used as a filesystem in
+mke2fs, tune2fs, debugfs, and findsuper.
+
+Debugfs's stat and icheck commands now properly deals with large (>
+2GB) files.
+
+Debugfs's set_super_value command now prints out the list of valid
+superblock fields which can be set using the command.
+
+Debugfs's rm and kill_file command now updates the superblock free block
+and inode counts, thus keeping the filesystem consistent.
+
+Debugfs's lsdel command now takes an optional argument which allows
+the user to only see the most recently deleted files.
+
+A new command (undel) was added to debugfs which automates
+undeleting a deleted inode and linking it back to a directory.
+
+Debugfs's ls command now takes a new option, -d, which lists
+deleted directory entries.
+
+Debugfs's testb, freeb, setb, and find_free_block commands now take an
+optional count argument.
+
+Add support for a new ext2 file attribute, EXT2_NOTAIL_FL, which will
+be used to signal that a particular inode should not be eligible for
+tail-merging --- this is needed for programs like LILO.
+
+The findsuper (an unreleased, uninstalled utility program) has been
+improved to add extra validity checks and to add a progress meter.
+(It is still an unsupported program; the officially supported way to
+recover from a trashed partition table is to use gpart; findsuper is
+for wizards only. :-)
+
+Debugfs was fixed to compile with "configure --disable-swapfs".
+
+Cleaned up various manual pages. (Addresses Debian bug #119624, #120171)
+
+Added new translation file for Turkish.
+
+Programmer's notes:
+-------------------
+
+Fix general gcc -Wall complaints.
+
+E2fsprogs (mostly) works with the dietlibc.
+
+The programming texinfo file has been expanded to include description
+of additional libext2fs functions. (Still not completely done, but a
+lot of the more important functions have been documented.)
+
+Added a umask structure to struct_ext2_filsys, which currently only
+modifies the behaviour of ext2fs_mkdir(), but if we add any file
+creation functions to libext2fs, we should also make sure they respect
+the umask setting.
+
+The build-rpm script was fixed to be a bit more safe.
+
+The tests' Makefile now has a way of automating test case creation
+for e2fsck, using "make testnew".
+
+Created a new function, ext2fs_dir_iterate2 which passes more
+information to the callback function (identical to the one used by
+ext2fs_dblist_dir_iterate). The directory iterator functions take a
+new flag, DIRENT_FLAG_INCLUDE_REMOVED, which will return deleted
+directory entries. If the directory entry is deleted, the callback
+function will be called with the entry parameter set to
+DIRENT_DELETED_FILE.
+
+Added new functions, ext2fs_inode_alloc_stats and
+ext2fs_block_alloc_stats, which takes updates block/inode allocation
+statistics in the bitmaps, block group descriptors, and superblock
+when inodes or blocks are allocated or deallocated.
+
diff --git a/doc/RelNotes/v1.27.txt b/doc/RelNotes/v1.27.txt
new file mode 100644
index 0000000..fc302af
--- /dev/null
+++ b/doc/RelNotes/v1.27.txt
@@ -0,0 +1,60 @@
+E2fsprogs 1.27 (March 8, 2002)
+==============================
+
+The warning messages for mke2fs now go to standard error.
+
+Fixed to make sure "make check" runs all of the test programs with
+LD_LIBRARY_PATH set, so that we test the libraries in the build tree.
+
+The mke2fs program checks the boot sector for the BSD disk label, and
+avoids erasing it if it is there.
+
+Fixed a bug in e2fsck which caused it to core dump if the journal
+inode was missing when it was supposed to be there.
+
+E2fsck now prints ranges in pass 5 when printing deltas for the block
+and inode bitmaps.
+
+Debugfs's "ls -l" command now will print out the file type information
+in the directory entry.
+
+Create man pages and hard links for fsck.ext3 and mkfs.ext3. If
+mke2fs is invoked as mkfs.ext3, create the filesystem with a journal.
+
+Debugfs can now examine the experimental directory indexing
+information.
+
+Fixed bug in debugfs which caused it to core dump if modify_inode is
+called without an open filesystem.
+
+The debugfs lsdel command now runs its output through a pager first.
+
+When installing manual pages, remove the compressed manual pages first.
+
+Synchronized with Debian's packaging information for e2fsprogs-1.26-1.
+
+Fix the 2.4 resource limitation workaround introduced in 1.26 which
+actually broke things on mips32, sparc32, and Alpha platforms.
+
+Updated the I18N code so that calls to setlocate(LC_CTYPE, 0) are made
+(which is required by the newer libintl libraries).
+
+Programmer's notes:
+-------------------
+
+Fixed various gcc -Wall complaints.
+
+Fixed a few memory leaks in the e2fsck journalling code, and in the
+ismounted code checking for a swap device.
+
+Add new inode I/O abstraction interface which exports an inode as
+an I/O object.
+
+Exported ext2_file_flush as a public interface.
+
+In ext2_file_write, we now mark the buffer void * argument as a const, since ext2_file_write doesn't modify the buffer.
+
+Lots of small random portability fixes to make e2fsprogs build under
+AIX --- even without the 5L compatibility toolkit, and even using the
+uber-crippled AIX native C compiler.
+
diff --git a/doc/RelNotes/v1.28.txt b/doc/RelNotes/v1.28.txt
new file mode 100644
index 0000000..4463996
--- /dev/null
+++ b/doc/RelNotes/v1.28.txt
@@ -0,0 +1,146 @@
+E2fsprogs 1.28 (August 31, 2002)
+================================
+
+Add support for the Hashed-Tree Directory Indexing to e2fsck. Support
+for setting the htree flag is not included yet, although it can be
+manually turned on via the debugfs program.
+
+Clarified e2fsck error message which is printed when it cannot find
+sufficient contiguous block when relocating filesystem metadata.
+
+Added support for building an EVMS plugin module for ext2/3. This
+module is substantially the same as the EVMS module shipping with EVMS
+1.1, with one or two bugfixes. E2fsprogs can also build this plugin
+for use with EVMS 1.0 (which did not include the ext2 plugin module),
+if the configure --enable-old-evms flag is given.
+
+Fsck will search through EVMS volumes when trying to resolve
+filesystem specifications such as LABEL=xxx or UUID=xxx.
+
+Added a new utility program, /sbin/findfs, which will return
+filesystem specifications such as LABEL=xxx or UUID=xxx, and prints
+the device name.
+
+Update and clarified various man pages. (addresses Debian Bug #145044,
+#146437, #131350, #151990, #144621, #141938)
+
+If there are no filesystems specified on fsck's command line, fsck now
+treat that as if the -As options were given. Previously it would
+simply do nothing. (Addresses Debian Bug #153102)
+
+Mke2fs no longer treats a failure to be able to clear the MD signature
+at the end of the filesystem as a fatal error. (Addresses Debian Bug
+#155007)
+
+The e2p library functions (which are used by lsattr and chattr) now
+double check to make sure the file is a regular file or directory
+before attempting to use the ext2 ioctls. Some device drivers
+unfortunately respond to the ext2 ioctl's with unknown behaviour.
+(Addresses Debian Bug #152029).
+
+The extended attribute handling has been updated to correspond with
+the latest V2 bestbits ACL code.
+
+Fixed bug in e2fsck which caused it to not clear the dtime field when
+processing truncated inodes on the orphan list. This could cause data
+loss(!) if a filesystem is rebooted before a truncate has been
+committed.
+
+E2fsck now uses red/black trees in pass1b, which removes some O(n**2)
+algorithms. This makes e2fsck much faster in the case of severely
+corrupted filesystems where a large number of blocks are claimed by a
+large number of inodes. (Thanks to the 2.5 IDE device driver for
+inspiring this work.)
+
+Resize2fs has been significantly sped up when shrinking and expanding
+a filesystem by a very small number of blocks (for example, when EVMS
+is converting a partition to be an EVMS legacy volume).
+
+Added a new option to e2fsck, -D, which will optimize or compress all
+of the directories in the filesystem.
+
+E2fsck now catches SIGINT and SIGTERM to make sure it will can
+properly clean up and only exit at safe points. Fsck will pass
+SIGINT/SIGTERM to its child processes, and wait until they have all
+exited before it exits.
+
+The uuid parsing code in the uuid library now properly complains when
+an illegally formatted uuid is presented to it. (Addresses Debian bug
+#152891)
+
+Restrict use of the 2.4 setrlimit ABI f*ckup to kernels between 2.4.10
+and 2.4.17, since the workaround can cause problems when using a 2.4
+kernel with an old version of glibc built with the 2.2 headers.
+
+Fixed a bug in mke2fs where it wasn't properly clearing the initial
+superblock used by other filesystems. (Addresses Debian bug #147256.)
+
+Added support for the synchronous directory feature written by Andrew
+Morton.
+
+The debugfs program can delete directories using the rmdir command.
+
+Add support for 8k and 16k filesystems (for systems with page sizes
+that are greater or equal to 8k or 16k, respectively). Note that
+these filesystems can not be mounted on x86 systems, or other systems
+with only 4k page sizes, due to limitations in the current Linux VM
+code.
+
+Resize2fs requires that the filesystem state be valid and have no
+errors; otherwise, e2fsck -f must be run first. (Previously it simply
+required that the last fsck time be greater than the last mount time.)
+
+Configure now defaults the man pages directory to /usr/share/man on
+Linux systems.
+
+E2fsck now offers to truncate inodes which contain too many blocks (so
+that i_blocks would overflow. Also fixed handling of large sparse
+files.
+
+E2fsck now more completely checks for symlink validity, including
+requiring NULL termination and length checks.
+
+E2fsck will offer to try forcing a disk write to remap a bad block
+after finding a read error when reading a filesystem metadata block.
+
+Fixed a bug in debugfs which caused the -b and -s options to crash
+debugfs, as well as breaking the testb, setb, and clearb functions.
+
+Added a bmap command to debugfs which calculates the logical to
+physical block mapping for a particular inode.
+
+Fixed a bug in code which checked to see if a device was mounted which
+sometimes (rarely) failed in the case of a plain file.
+
+Fixed a bug in resize2fs where when it reported an error, it would
+print a message erroneously indicating that the filesystem had been
+resized before it aborted.
+
+When resizing a plain file which is smaller than the requested size,
+resize2fs will attempt to extended the file so that programs like
+e2fsck will not complain that the file is too small.
+
+Resize2fs will print the actual new size of the filesystem when it is
+finished resizing.
+
+Fixed a bug in debugfs where "ls -l" would report incorrect file type
+information on big-endian systems.
+
+
+Programmer's notes:
+-------------------
+
+Fixed collisions with C++ reserved words.
+
+Added portability fixes for building e2fsprogs on the HURD and AIX.
+
+Added the ext2ed program for creation of test cases. (ext2ed has many
+limitations and bugs which make it unsuitable for production use.)
+
+The ext2fs_read_dir_block2 and ext2fs_write_dir_block now take a new
+flag, EXT2_DIRBLOCK_V2_STRUCT, which will will reverse when the
+name_len field is byte swapped on big-endian machines, since in the
+V2 structure, name_len is a char field which is doesn't need to be
+byte swapped --- except if an old-style kernel had byte-swapped the
+name_len field as part of the V1 structure.
+
diff --git a/doc/RelNotes/v1.29.txt b/doc/RelNotes/v1.29.txt
new file mode 100644
index 0000000..8a060eb
--- /dev/null
+++ b/doc/RelNotes/v1.29.txt
@@ -0,0 +1,31 @@
+E2fsprogs 1.29 (September 24, 2002)
+===================================
+
+Fixed a bug in e2fsck which could corrupt a directory when optimizing
+it (via the -D option) or rebuilding the hash tree index with a 1 in
+512 probability, due to a fence post error.
+
+Fixed a bug in the LVM support code which caused LABEL='xxx' not to
+work correctly.
+
+Mke2fs now enables the directory indexing flag by default. (Since
+this is a compatible feature flag, it's safe to do so.)
+
+Tune2fs will support setting the directory indexing feature flag. It
+will automatically set up the default hash algorithm and hash seed
+fields in the superblock.
+
+If the bone-headed user enters the root filesystem twice in
+/etc/fstab, the -R option which skips the root filesystem will skip
+all of them. (Addresses Debian bug #159423). Note! This is not a
+precedent for dealing intelligently with any other kind of doubled
+entry in /etc/fstab!
+
+
+Programmer's notes:
+-------------------
+
+Removed perror declaration in lib/et/internal.h. All modern systems
+can be expected to define perror() these days. Besides, the lib/et
+code wasn't using perror at all anyway. :-)
+
diff --git a/doc/RelNotes/v1.30.txt b/doc/RelNotes/v1.30.txt
new file mode 100644
index 0000000..36b2f14
--- /dev/null
+++ b/doc/RelNotes/v1.30.txt
@@ -0,0 +1,122 @@
+E2fsprogs 1.30 (October 31, 2002)
+=================================
+
+When resizing a filesystem, and inodes need to moved, resize2fs will
+update the inode's ctime field, and the mtime field of the containing
+directories, so that incremental backups using dump/restore will work
+correctly.
+
+In order to avoid spurious errors, e2fsck will check the last
+superblock write time to determine whether or not it can safely use
+the LOW_DTIME checks to determine if there are inodes on the orphan
+inode linked list that had somehow gotten disconnected. (Addresses
+Sourceforge bug #620980)
+
+Partition in /proc/partitions that being with the string "lvm" are
+considered real partitions even if they do not end with a number.
+
+Fixed a bug in the the uuid generation function, where if /dev/urandom
+is not present, but /dev/random is, and there isn't sufficient
+entropy, the get_random_byte function could spin a loop forever.
+
+E2fsck, mke2fs, etc. will now reliably notice when image files are
+mounted using the loopback interface. (Addresses Sourceforge bug
+#619119)
+
+When flushing buffers (as is done by badblocks, for example) check to
+see if the BLKFLSBUF ioctl succeeds, and if so, avoid using the
+FDFLUSH ioctl which causes the MD device driver which causes confusing
+syslog messages about obsolete ioctl messages. (Addresses Sourceforge
+bug #545832).
+
+Debugfs's write command now checks to see if the destination filename
+exists before creating it. (Addresses Sourceforge bug #478195.)
+
+When installing man pages, search for compressed man pages using all
+commonly used compression extensions (i.e., .Z, .gz, .bz2, etc.)
+
+Fixed a bug in fsck where multiple filesystems specified on the
+command were not being checked in parallel due to a logic bug
+introduced to support the FSCK_MAX_INST environment variable.
+
+We have added a new superblock field, s_mkfs_time, which indicates
+when a filesystem was created. It is set via mke2fs, and printed out
+by dumpe2fs, but is not actually touched by the kernel.
+
+Dumpe2fs has been made more robust by not aborting if there is an
+error reading the block/inode bitmaps; instead it will still print out
+the location of the block/inode bitmaps and inode table.
+
+Add support for the an alternative block group descriptor layout which
+allows for on-line resizing without needing to prepare the filesystem
+in advance. (This is the incompat feature flag meta_bg.)
+
+Add support for storing default mount options in the superblock, so
+that the filesystem can be mounted with specific mount options without
+needing to specify them on the mount command line or in the /etc/fstab
+file.
+
+Add support for a new inode flag, which is to be used for indicating
+the top of directory hierarchies for the Orlov block allocator.
+
+Fix e2fsck so that if it creates the lost+found directory, it does so
+with the more appropriate permissions of 0700. Also change
+mklost+found so that it also creates the directory 0700.
+
+Fixed format bug in e2fsck if NLS is in use.
+
+Add a German translation for e2fsprogs's NLS support.
+
+Fixed e2fsck so that it more handles BAD_BLOCK_IN_INODE_TABLE even at
+the beginning of the inode table. This won't matter much, since if
+there is a bad block at the beginning of the inode table, the root
+directory won't be available. But at least e2fsck won't crash in this
+case.
+
+Fixed endian problems in the htree code for e2fsck and debugfs.
+
+When byte-swapping a filesystem on a PPC architecture, byte-swap the
+bitmaps since the historical big-endian ext2 variant had byte-swapped
+bitmaps, and the ext2fs library assumes this. This fixes the
+regression test suite on PPC machines.
+
+Fix e2image so that it handles a bad block in the inode table
+appropriately.
+
+E2fsck now uses a more sophisticated algorithm to salvage corrupted
+directories that recovers more information in the corrupted directory
+block.
+
+E2fsck now performs additional consistency checks on indexed (HTREE)
+directories.
+
+Fix a bug where e2fsck might get confused about whether a completely
+empty directory block is an empty leaf block or an interior htree
+node. This could cause e2fsck to get confused into think that a valid
+indexed directory was corrupted.
+
+E2fsck no longer creates an empty directory entry at the end of a
+directory block when optimizing a directory. This would cause some
+earlier versions of the dxdir kernel code to corrupt the directory
+when attempting to split a node containing an empty directory entry.
+
+E2fsck could sometimes in rare circumstances leave the indexed flag
+set after a small directory was optimized by compressing it instead of
+indexing it. (This should never happen in real life, since
+directories that small wouldn't have been indexed, but better safe
+than sorry.)
+
+E2fsck now only updates the master superblock in all cases. This
+slightly shortens its run time.
+
+Ext2ed can deal with directory entries of length 0; previously it
+would get stuck in an infinite loop.
+
+Fsck now has support for reiserfs volumes when parsing LABEL= and UUID=
+specifiers. (Sourceforge patch #613447)
+
+Badblocks will now work correctly on read-only devices such as
+CD-ROM's. (Sourceforge patch #600451)
+
+Updated and clarified man pages. (Addresses Debian bug #167108)
+
diff --git a/doc/RelNotes/v1.31.txt b/doc/RelNotes/v1.31.txt
new file mode 100644
index 0000000..fcc55ac
--- /dev/null
+++ b/doc/RelNotes/v1.31.txt
@@ -0,0 +1,39 @@
+E2fsprogs 1.31 (November 8, 2002)
+=================================
+
+Update EVMS ext2fsim plugin with EVMS 1.2. (We still support
+compiling the fsim plugin with EVMS 1.0 and 1.1.) Add better error
+handling for child process that die unexpectedly. Add a hack to force
+mkfs to create filesystems that won't cause problems with hardware
+that has 2k or 4k minimum blocksize requirements. Read from child
+processes in non-blocking mode, so that the GUI continues to update.
+
+Fix e2fsck so that it returns the appropriate exit code when the root
+filesystem has been changed, so that system's rc scripts will be told that
+the system needs to be rebooted.
+
+Fix a bug in ext2fs_flush/ext2fs_close; when the MASTER_SB_ONLY flag
+was set, some of the descriptor blocks that should have been written
+out were getting skipped.
+
+Changed e2fsck to force out changes to the backup copies of the
+superblock and block group descriptors when important changes are made
+to those data structures.
+
+Fix a bug where e2fsck could erroneously mark a filesystem as being
+clean if a check of dirty filesystem is interrupted with a ^C. (Bug
+introduced in e2fsprogs 1.28.)
+
+If journal debugging is enabled using --enable-jbd-debug, the debugging
+level is now set via the E2FSCK_JBD_DEBUG environment variable.
+
+If byteswapping support is disabled using configure --disable-swapfs,
+skip the tests which depend on byte-swapping, so that "make check"
+won't bomb out.
+
+Lsattr will now display the indexed directory flag. Also, some of
+the more esoteric compression flags are suppressed unless compression
+support has been enabled.
+
+Update man pages.
+
diff --git a/doc/RelNotes/v1.32.txt b/doc/RelNotes/v1.32.txt
new file mode 100644
index 0000000..15af94d
--- /dev/null
+++ b/doc/RelNotes/v1.32.txt
@@ -0,0 +1,14 @@
+E2fsprogs 1.32 (November 9, 2002)
+=================================
+
+Fixed a bug in the Unix I/O routines which caused needless writebacks
+of clean blocks from the unix_io cache (they were erroneously marked
+as being dirty, so they were getting written back to disk before
+getting evicted from the disk cache). This was harmless, but it
+significantly slowed down e2fsck.
+
+Made some other minor optimizations to the Unix I/O routines to save a
+small amount of CPU time.
+
+Updated internationalization files.
+
diff --git a/doc/RelNotes/v1.33.txt b/doc/RelNotes/v1.33.txt
new file mode 100644
index 0000000..d0f1742
--- /dev/null
+++ b/doc/RelNotes/v1.33.txt
@@ -0,0 +1,142 @@
+E2fsprogs 1.33 (April 21, 2003)
+===============================
+
+Added a new utility program, logsave, which captures the output of a
+command in a log file, even if the containing directory hasn't been
+mounted yet (in which case the it saves the output in memory until it
+can write out the logfile). This is useful for capturing the
+output of fsck during the boot sequence.
+
+Fixed some portability problems that were causing problems under
+the Cygwin32 environment.
+
+Mke2fs now interprets a negative number to the -b option as a minimum
+block size.
+
+Fixed a bug in mke2fs which was incorrectly checking the argument to
+the -g option if the default block size was used. (Addresses Debian
+bug #188319)
+
+Fsck now explicitly ignores tmpfs and devpts, and it will complain if
+it can not find filesystem checkers for jfs, reseirfs, and xfs.
+
+E2fsck now updates the global free block and inode counters from the
+block group specific counters quietly. This is needed for an
+experimental patch which eliminates locking the entire filesystem when
+allocating blocks or inodes; if the filesystem is not unmounted
+cleanly, the global counts may not be accurate.
+
+Imported bug fixes to the EVMS plugin from the EVMS 2.0 tree. (EVMS
+2.0 is not yet supported; this only pulled in the bug fixes: fixed
+possible hangs caused by bugs in calling waitpid, and not setting the
+pipe to non-blocking mode; also fixed a file descriptor leak; made
+sure all functions call log entry/exit functions.)
+
+Badblocks now flushes its output file as bad blocks are discovered.
+
+The uuid library is now more paranoid about assuming the correctness
+of the /dev/random device; it mixes in a stream of bytes from
+random/srandom, just in case.
+
+Update Debian files to reflect the fact that I am now the Debian
+maintainer of e2fsprogs. Other various Debian-specific packaging
+cleanups.
+
+Move the source tarball generation functions from the top-level
+makefile to the util/gen-tarball script.
+
+Updated the Turkish .po translation file.
+
+Added Heimdal and MIT krb5 extensions to the com_err library to make
+it more compatible with com_err libraries from those distributions.
+
+Changed dumpe2fs to always display the superblock fields relating to
+the journalling and/or directory indexing feature even if those
+features are not enabled.
+
+Updated and clarify copyright statement vis-a-vis alpha releases of
+e2fsprogs.
+
+The ss library will now try to dynamically link to the readline
+library and use it if it is present in the system. This means that
+the debugfs program now has line editing and history features. The
+SS_READLINE_PATH environment variable is used to find a readline or
+readline-compatible library.
+
+E2fsck now finds most duplicate filenames (all when rebuilding all
+directories via the -D option) and offers to delete or rename
+duplicate filenames/directory entries. (Addresses Debian Bug #176814).
+
+Fix bug in e2image. When writing out a raw image file, include data
+blocks from symlinks that do not store the symlink within the inode.
+
+Fix bug in resize2fs which incorrectly moved the block and inode
+bitmaps for sparse superblock filesystems and incorrectly marked
+blocks as in use. (Addresses Debian bug #174766)
+
+Added a new shared library, the blkid library, which efficiently
+allows fsck, mke2fs, e2fsck, and tune2fs to be able to look up LABEL
+and UUID filesystem specifiers without needing to search all of the
+devices in the system. Instead, the device is looked up in a cache
+file, and then verified to make sure the blkid cache is correct.
+
+Tune2fs and e2label will accept LABEL=xxx and UID=yyy specifiers for
+the device name, using the blkid library. (Addresses Debian bugs
+#166048, #179671)
+
+Fsck now supports backslash escapes in /etc/fstab so that \040 can be
+used for spaces in device labels.
+
+Removed 32-bit limitations for debugfs's dump command.
+
+If the user specifies a large number of inodes, Mke2fs will
+automatically adjust the number of blocks per group to find a valid
+set of filesystem parameters.
+
+Add workaround to detect broken MD devices where when some of the
+underlying devices are marked read-only, writes to the MD device are
+silently dropped. E2fsck will detect if there is an attempt to run
+the journal twice, and abort with an error if this is the case.
+(Addresses IBM Bugzilla bug #1226)
+
+E2fsck will print an error if more than one of the -p/-a, -n or -y
+options are specified.
+
+E2fsck will fix HTREE corruptions in preen mode, without stopping the
+boot process. This is needed because the 2.4 ext2 filesystem
+accidentally had the INDEX_FL backwards compatibility code removed.
+
+Mke2fs no longer creates filesystems with the dir_index flag set by
+default; the user has to specifically request it.
+
+Update and clarified various man pages. (Addresses Debian bugs
+#173612, #175233, #175113, and #170497, #185945, #188318)
+
+Created man page for the mk_cmds program (from the libss library).
+
+Programmer's notes:
+-------------------
+
+Fix various gcc -Wall nits.
+
+Fixed a lot of portability problems that caused e2fsprogs not to build
+successfully under Solaris and Apple/Darwin.
+
+Fixed a Makefile dependency to allow building e2fsprogs using parallel
+make jobs.
+
+Changes to create a subset distribution which consists only of the
+et, ss, uuid, and blkid libraries. The configure script and top-level
+makefile were changed to support working with a subset distribution.
+
+Removed EXT2_FEATURE_RO_COMPAT_BTREE_DIR mention of since it's not
+actually used, and might people who are looking for
+EXT2_FEATURE_COMPAT_DIR_INDEX, which is in use.
+
+Updated debian files to fix a number of Lintian warnings.
+
+Updated config.guess and config.sub with newer versions from the FSF.
+
+Removed unnecessary libraries from being linked into the fsck, lsattr,
+chattr, and blkid executables.
+
diff --git a/doc/RelNotes/v1.34.txt b/doc/RelNotes/v1.34.txt
new file mode 100644
index 0000000..f61095c
--- /dev/null
+++ b/doc/RelNotes/v1.34.txt
@@ -0,0 +1,130 @@
+E2fsprogs 1.34 (July 25, 2003)
+===============================
+
+Fixed a bug introduced in E2fsprogs 1.30 which caused fsck to spin in
+a tight loop while waiting for a child fsck to exit in some cases.
+This burns CPU times which slows down the low-level filesystem check.
+
+Added code to mke2fs to assure that the default block size for a
+filesystem is at least as big as the sector size of the device, if it
+can be determined.
+
+Changed mke2fs and resize2fs to round the default size of a filesystem
+to be an even multiple of the VM pagesize in order to avoid a Linux
+kernel bug introduced when the storage of the buffer cache was moved
+into the page cache.
+
+Mke2fs will warn the user when creating a filesystem with journalling
+and a blocksize greater than 4096. (Addresses Debian bug #193773)
+
+Fixed a bug in resize2fs which caused it to fail on filesystems with a
+non-empty bad block list. Resize2fs now discards any blocks on the
+badblock list which are no longer part of the filesystem as the result
+of a filesystem shrink. (Note: this means that shrinking and then
+enlarging a filesystem is no longer a reversible operation;
+information about bad blocks in the part of the filesystem which is to
+be chopped off will be lost.)
+
+Changed resize2fs so the user can use prefixes to specify the units of
+the new filesystem size (sectors, kilobytes, megabytes, or gigabytes),
+and to make the error and informational messages explicitly display
+the blocksize used by the filesystem, in order to avoid confusion.
+(Addresses Debian bug: #189814)
+
+Added a new debugfs command, dump_unused, which dumps the contents of
+all unused blocks to stdout. (Useful as an emergency try-to-find
+deleted data command.)
+
+Added a new debugfs command, imap, which prints the location of a
+specified inode in the inode table.
+
+Fixed a bug in the badblocks program which caused it to use one bit of
+randomness in its non-destructive read/write test, instead of using a
+full 8 bits of randomness.
+
+Added a new option (-t) to badblocks, which allows the user to control
+the test pattern(s) used when checking a disk.
+
+The blkid probe function now more correctly detects UDF filesystems.
+
+Fixed a bug in the blkid library which caused it to not update its
+cache if a filesystem changes from having a label to not having a
+label.
+
+Fixed a bug in the blkid library which could avoid an infinite loop
+in blkid_find_dev_with_tag() if /proc is not mounted and there the
+/etc/blkid.tab file has not yet been created.
+
+Fixed the badblocks program so that the destructive read/write test
+honors the -c option, and to use O_DIRECT when possible to avoid
+thrashing the system block buffer cache.
+
+Fixed various NLS issues.
+ - Added Czech and Swedish translations
+ - Removed testing NYC translation
+ - Fixed NLS support for message abbreviations in e2fsck
+ - Remove de-utf.po, since we shouldn't have two versions using different
+ charset encodings.
+ - Used ngettext() (abbreviated with the macro P_(str1, str2, n)) to
+ simplify the statistics reporting in e2fsck.
+
+Changed configure.in so that its defaults for *BSD systems no longer
+build an fsck wrapper, and not to install in /usr/local by default.
+
+Fixed some minor spelling errors/typo's in e2fsck and the configure
+script.
+
+Fixed various Debian packaging issues (see debian/changelog).
+
+Updated and clarified man pages. (Addresses Debian Bug #195616)
+
+Programmer's notes:
+-------------------
+
+Fix gcc -Wall nitpicks.
+
+Updated gettext implementation used by e2fsprogs to 0.11.5, and enable
+NLS support by default. (Added partial workaround for gettext/Darwin
+incompatibility problems.)
+
+Added full MIT KRB5 and Himdall compatibility support to the com_err
+library and the compile_et program. (Addresses Debian bug #191900)
+
+Added the blkid_known_fstype() function to the blkid library, which
+returns true if it is passed a filesystem type which is recognized by
+the blkid probing functions.
+
+Improved the documentation for the blkid library.
+
+Added the ext2fs_get_device_sectsize() function the the ext2fs library, which
+returns the hardware sector size of a device, if it is available.
+
+Added a dependency in the blkid library's .so file to the uuid
+library, since the former uses the latter. (Addresses Debian bug
+#194094)
+
+Added --with-diet-libc and --disable-evms to the configure script.
+
+Fixed a minor memory leak in the badblocks program.
+
+Fixed a portability problem in tune2fs --- not all systems have strptime().
+
+Fixed a portability problem in debugfs with the use of getopt() more
+than once. Old-style BSD, new-style BSD, and Linux C libraries all do
+things differently.
+
+Add support Windows support to ext2fs_get_device_size().
+
+Added (normally disabled) debugging code to the Unix I/O manager which
+causes it to disable all userspace caching if the NO_IO_CACHE is
+defined.
+
+Changed the test I/O manager so it can always be linked into e2fsck,
+mke2fs, and tune2fs if enabled via --enable-test-io-debug to the
+configure script. The test I/O manager will only print any debugging
+information if the TEST_IO_FLAGS or TEST_IO_BLOCK environment
+variables are set, which specifies which I/O operations are logged and
+a block number to watch, respectively. The log messages are sent to
+stderr by default, unless a filename is specified via the
+TEST_IO_LOGFILE environment variable.
+
diff --git a/doc/RelNotes/v1.35.txt b/doc/RelNotes/v1.35.txt
new file mode 100644
index 0000000..2a4c520
--- /dev/null
+++ b/doc/RelNotes/v1.35.txt
@@ -0,0 +1,166 @@
+E2fsprogs 1.35 (February 28, 2004)
+==================================
+
+E2fsck has a new -k option, which in conjunction with the -c options,
+preserves the existing badblocks list.
+
+Cleaned up e2fsck's preen-mode messages during the passes 1b, 1c, and 1d.
+
+E2fsprogs will now deal correctly with symlinks that contain
+extended attribute information, which can be created using SE Linux.
+(Addresses Debian Bug #232328)
+
+Remove a double longjmp into an invalid stack frame bug in e2fsck.
+(This was during an abort sequence, which normally worked on Linux and
+caused a core dump on other operating systems.)
+
+Fix NLS bug in e2fsck, by avoiding trying to expand an empty string
+(the NLS library will replace "" with the .po header information).
+
+Fix a bug in mke2fs which caused -T largefile or -T largefile4 to core
+dump due to a division by zero error. (Addresses Debian bug #207082)
+
+Fixed a bug in e2fsck which caused it to incorrectly fix a filesystem
+when reconnecting a directory requires creating a lost+found
+directory. (Addresses Debian bug #219640).
+
+Fixed a bug where e2fsck would bomb out if a journal needed to be
+replayed when using an alternate superblock.
+
+E2fsck will give an extra grace period before actually forcing a check
+if the laptop is running on battery. The next time fsck runs while
+the system is on the AC mains, or after the grace period is exceeded,
+the filesystem will be checked. (Addresses Debian bug #205177)
+
+E2fsck will inform the user when there are 5 or fewer mounts before a
+filesystem check will be forced. (Addresses Debian bug #157194)
+
+Fix e2fsck's handling of corrupted indirect blocks in the bad block.
+We now correctly handle the case where there is an overlap between a
+block group descriptor or a superblock and a bad block indirect block.
+In the case where the indirect block is corrupted, we now suggest
+"e2fsck -c".
+
+Fix byte swap bugs in e2fsck that caused the journal backup location
+in the superblock and symlinks created by SE Linux to be cleared
+by e2fsck on big-endian machines. (Addresses Debian bug #228723)
+
+E2fsck -c now replaces the current list of bad blocks with the ones
+found by badblocks.
+
+Fix bugs in e2fsck and tune2fs which could cause a core dump if a
+non-existent LABEL or UUID specifier is to e2fsck or tune2fs.
+
+Fix a potential bug in e2fsck which could cause it to core dump when
+trying to print the location of the backup superblock.
+
+Protect against a potential core dump in e2fsck when printing a
+message about backup superblocks.
+
+Add support for backing up the journal inode location in the
+superblock. E2fsck will automatically save the journal information in
+the superblock if it is not there already, and will use it if the
+journal inode appears to be corrupted. ext2fs_add_journal_inode()
+will also save the backup information, so that new filesystems created
+by mke2fs and filesystems that have journals added via tune2fs will
+also have journal location written to the superblock as well.
+Debugfs's logdump command has been enhanced so that it can use the
+journal information in the superblock.
+
+E2fsck will now update all superblocks when moving the journal inode.
+
+Shrink the size of the e2fsck executable by moving some initialized
+variables to the BSS segment.
+
+E2fsck will avoid printing the ^A and ^B characters which bracket the
+progress bar when stdout and stdin are a tty device instead of a pipe
+to another program. (Addresses Debian bug #204137)
+
+Debugfs's mkdir command will automatically expand the directory if
+necessary. (Addresses Debian Bug: #217892)
+
+Fixed a bug in debugfs so that copying a file from /dev/null uses the
+correct mode bits. (Addresses Debian Bug: #217456)
+
+If the environment variables DEBUFS_PAGER and PAGER are not set,
+debugfs now searches for the appropriate pager to use, beginning with
+/usr/bin/pager, and then falling back to 'more' and 'less'.
+(Addresses Debian bug #221977)
+
+Debugfs will now support 2.6 device numbers where the major or minor
+number may be larger than 255. (Addresses Sourceforge bug #865289)
+
+Fix debugging printf in resize2fs. (Addresses Debian Bug #271605)
+
+Chattr now stops processing options when it sees '--'. (Addresses
+Debian bug #225188)
+
+Fix regression tests so they work correctly when e2fsprogs is compiled
+with configure --disable-htree.
+
+Fix bug in uuid library when there is no network card and the library
+is generating a time-based uuid. The random MAC address was not
+correctly generated to be a multicast address.
+
+Add compile_et extensions from Heimdall that were missed the first time
+around.
+
+Fix bug in badblocks when using O_DIRECT; we need to make sure that
+we're reading from an offset which is page aligned. For read-only and
+read-write tests, we try to recover after an error so that we can
+continue reading on page-aligned boundaries. (Addresses Debian Bug
+#203713)
+
+Badblocks now checks 64 blocks at a time instead of 16. (Addresses
+Debian bug #232240)
+
+Updated and clarified various man pages. (Addresses Debian Bug
+#206845, #222606, #214920, #232406)
+
+Updated and fixed translations. (Addresses Debian bugs #200086, #214633)
+
+Fixed various Debian packaging issues (see debian/changelog).
+
+Programmer's notes:
+-------------------
+
+Fixed a build problem so that e2fsprogs would compile with the
+--enable-profile option to configure selected. (Addresses Sourceforge
+bug #811408)
+
+Fixed C++ problems with the ext2fs.h header. (Addresses Red Hat
+Bugzilla Bug #112448)
+
+Centralize code which calculates the location of the superblock
+and block group descriptors so that it is in a single library routine.
+
+Added two new functions, ext2fs_file_open2() and
+ext2fs_inode_io_intern2() which take a pointer to an inode structure.
+
+Fix compile_et to output the correct prototype for
+initialize_xxx_err_table_r() in the header file. (Addresses Debian
+bug #204332)
+
+In the lib/et makefile, make sure com_err.info is deleted on "make clean".
+
+Fix 64-bit warnings in e2fsprogs pass1b by using inttypes.h if
+present. This is for when we try stuffing an int into void * pointer.
+
+Fix type-punning which can cause gcc 3.x to miscompile code by getting
+confused about pointer aliasing. ext2fs_getmem(), ext2fs_free_mem(),
+and ext2fs_resize_mem() all now take a 'void *' instead of a 'void
+**'. The EVMS code uses an ugly union approach since we don't want to
+modify the EVMS interfaces.
+
+Make sure all Makefiles use $(MAKE) rather than hardcoded "make", to
+aid build process on systems can use invoke GNU make as "gmake".
+
+Added regression testing for mke2fs.
+
+Fixed gcc -Wall nitpicks.
+
+Fixed various compiler warnings.
+
+Add portability fixes for FreeBSD and for using fsctl under Darwin to
+support ext2 ioctl's.
+
diff --git a/doc/RelNotes/v1.36.txt b/doc/RelNotes/v1.36.txt
new file mode 100644
index 0000000..912bad2
--- /dev/null
+++ b/doc/RelNotes/v1.36.txt
@@ -0,0 +1,302 @@
+E2fsprogs 1.36 (February 4, 2005)
+=================================
+
+All of the patches that were applied to Fedora Core 3's
+e2fsprogs-1.35-11.2 have been integrated, although sometimes with a
+lot of bug fixes first. Users of Fedora Core 3 are strongly
+encouraged to upgrade to e2fsprogs 1.36 as soon as possible.
+
+Add support for filesystem with the online resizing via resize inode
+feature. Fixed numerous bugs from the Fedora patches. The Fedora
+patches also didn't bother to do any consistency checking on the
+resize inode, or add any tests to the regression test suite. The "-R
+resize=4g" option to mke2fs was a no-op in the Fedora patches, despite
+being listed in mke2fs's usage message. All of these shortcomings
+have been corrected.
+
+E2fsck can also also fix filesystems trashed by Fedora's resize2fs
+program. In order to do this, the user must run the commands:
+
+ debugfs -w /dev/hdXXX -R "features ^resize_inode"
+ e2fsck -f /dev/hdXXX
+
+Optionally, the ext2prepare command can be used to re-enable online
+resizing after the filesystem has been fixed.
+
+The fsck program will now accept an optional filedescriptor argument
+to the -C option. (The Fedora version of this patch would sometimes
+cause fsck to ignore a parameter on fsck's command line in some rare
+cases, sigh.)
+
+Make sure e2fsprogs doesn't write garbage into the reserved portion of
+large inodes.
+
+Make sure resize2fs releases the blocks belonging to the old inode
+table blocks when moving the inode table. (Addresses Debian Bug:
+#290894)
+
+Skip the r_resize_inode test if resize2fs is not compiled (due to
+configure --disable-resizer)
+
+E2fsck now checks the summary filesystem accounting information, and
+if any of the information is obviously wrong, it will force a full
+filesystem check. (Addresses Debian Bug #291571)
+
+Fix e2fsck to not complain when the resize_inode feature is enabled,
+s_reserved_gdt_blocks is zero, and there is no DIND block allocated in
+the resize inode.
+
+Fix e2fsck to note delete symlinks that contain an extended attribute
+after the ext_attr feature flag has been cleared. (Addresses Red Hat
+Bugzilla #146284).
+
+Add new utility program, copy_sparse.c, which is very useful
+for dealing with large sparse files (such as e2image files).
+
+Add support for jnl_blocks[] for debugfs's set_super_value.
+
+Fix filefrag so that it works correctly with sparse files.
+
+Filefrag -v will print first and last blocks.
+
+Add interpretation of OS Creator values for FreeBSD and Lites in mke2fs
+and dumpe2fs.
+
+Add mke2fs support so that it can support filesystems larger than 4TB
+automatically, by retrying with a 4k blocksize if the device size is
+too big to be expressed using a 1k blocksize. (Addresses Sourceforge
+bug #1106631)
+
+Change blkid to test for NTFS first because Windows sometimes doesn't
+clear enough of the partition to confuse the probing routines into
+thinking the old filesystem type is still valid. (Addresses Debian
+Bug #291990)
+
+Add support for swap partition label and uuid's in the blkid library.
+
+Add support to the blkid library to recognize Oracle ASM volumes.
+
+Make blkid -t display all devices that match the specified criteria,
+not just the first one, and work more consistently when the blkid
+cache file is not available or set to /dev/null. (Addresses Debian
+Bug #290530 and #292425)
+
+Badblocks will now correctly display block numbers greater than
+999,999,999 in its progress display.
+
+The tune2fs program will not allow the user from setting a ridiculous
+number of reserved blocks which would cause e2fsck to assume the
+superblock was corrupt. E2fsck's standards for what is a ridiculous
+number of reserved block has also been relaxed to 50% of the blocks in
+the filesystem.
+
+The blkid library will return vfat in preference to msdos, and ext3 in
+preference to ext2 (if the journalling flag is set) so that mount will
+do the right thing. (Addresses Debian bug #287455)
+
+Mke2fs will now use the -E option for extended options; the old -R
+(raid options) option is still accepted for backwards compatibility.
+Fix a double-free problem in resize2fs. (Red Hat Bugzilla #132707)
+
+Mke2fs will now accept a size in megabytes, gigabytes, and other units
+(via "32m" or "4g" on the command line) if the user finds this more
+convenient than specifying a block count.
+
+Fix an obscure, hard-to find bug in "e2fsck -S" caused by an inode
+cache coherency problem.
+
+Debugfs now supports a new command, set_inode_field, which allows a
+user to manually set a specific inode field more conveniently, as well
+as set entries in the indirect block map.
+
+Debugfs's set_super_value command has been enhanced so that the user
+can set most superblock fields, including the date/time fields and
+some of the more newly added superblock fields.
+
+E2fsprogs programs now accept an offset to be passed to the file
+specifiers, via the syntax: "/tmp/test.img?offset=1024".
+
+E2fsprogs programs will now accept blocksizes up to 65536; kernel
+support on the x86 doesn't exist for now, but it can be useful on
+other architectures with page sizes greater than 4k. There are 2.6
+kernel patches out there which enable this, but they are of this
+writing still experimental.
+
+The e2image command now takes the -s option which will scramble
+directory entries for raw image files.
+
+Fix a file descriptor leak in the filefrag program.
+
+Make sure e2fsck doesn't crash when /proc/acpi/ac_adapter is not
+present.
+
+Fix bug in debugfs where kill_file would lead to errors when deleting
+devices and symlinks. (Sourceforge Bugs #954741 and #957244)
+
+Fix bug in the blkid library when detecting the ocfs1 filesystem
+
+Remove obsolete EVMS 1.x and a.out DLL support.
+
+E2fsck will attempt to recover from a journal containing illegal blocks.
+
+Fixed two potential ordering constraint problems in e2fsck which might
+cause the filesystem to be corrupted if e2fsck is interrupted during a
+(extremely narrow) race window. Thanks to Junfeng Yang from the
+Stanford Metacompilation group for pointing this out.
+
+Fixed bug in e2fsck where it would not accurately detect whether or
+not the system is running on adaptor if the ACPI device representing
+the AC adapter didn't correspond to the what was used on IBM
+Thinkpads.
+
+Change e2fsck to accept directories greater than 32MB.
+
+Fix e2fsck so that a checkinterval of zero disables a time-based check
+of the filesystem.
+
+Debugfs will check the DEBUGFS_PAGER environment variable in preference
+to the PAGER environment variable. (Addresses Debian Bug #239547)
+
+Tune2fs will not mark rewrite the superblock if the feature bitmasks
+are not modified.
+
+The debugfs program will set the filetype information when creating a
+link.
+
+Add debugfs -d option to use a separate source of data blocks when
+reading from an e2image file.
+
+Add e2image -I option which allows the e2image metadata to be
+installed into a filesystem.
+
+Fixed bug in the badblocks program which caused "done" to always
+appear in English even when a translation was available. (Addresses
+Debian Bug #252836)
+
+The blkid program has a new option -o which controls the output format
+of the blkid program; this is makes blkid more convenient to use in
+shell scripts.
+
+Fix a minor bug in uuid library, which was not using the full 14 bits
+of clock sequence when generating UUID's.
+
+Fix a Y8.8888K problem in the uuid library.
+
+Logsave now creates a new session id for itself to avoid getting
+killed by init when transitioning between init levels.
+
+Change the licensing of the UUID library to be the 3-clause BSD-style
+license; this allows Apple to use the uuid library in Darwin.
+
+Add ocfs and ocfs2 probe support into the blkid library.
+
+Fix a memory and file descriptor leak in the blkid library.
+
+The blkid library will revalidate the device if the system time is
+earlier than last verification time of the device, since that
+indicates that the system time is probably not trustworthy.
+
+The blkid library will override the default location of the blkid.tab
+file by the BLKID_FILE environment variable, if it is available.
+
+Change the getsize functions to use the BLKGETSIZE64 ioctl on Linux 2.6.
+
+Add various portability fixes for lame new versions of glibc, Darwin
+and GNU/KFreeBSD, as well as removing XSI:ism's. (Addresses Debian
+Bugs #239934, #264630, #269044, #255589, #289133)
+
+Add support for Windows 9x/NT under Cygwin.
+
+Updated and clarified various man pages. (Addresses Debian Bugs #236383,
+ #241940, #238741, #242995, #256669, #268148, #256760, #273679)
+
+Updated and fixed translations. (Addresses Debian bugs #244105, #262836)
+
+Update the rpm spec files so that it works better with Fedora core 2
+and RH9.
+
+Fixed various Debian packaging issues (see debian/changelog). In
+particular, fixed the Debian initrd scripts. (#241183, #248050,
+#253595, #247775)
+
+
+Programmer's notes:
+-------------------
+
+Fixed various gcc -Wall warnings.
+
+The uuid library now has new functions uuid_unparse_upper() and
+uuid_unparse_lower() which forces the case of the hex digits to be
+upper case, or lower case.
+
+The build process has been sped up by enhancing the subst program
+to update the modtime on the generated files even when the generated
+file hasn't changed.
+
+The uuid library now uses C99 stdint.h types instead of custom types.
+
+Updated config.guess and config.sub with newer versions from the FSF.
+
+Removed out of date .cvsignore files from the source distribution.
+
+The ext2fs_unlink() function will return an error if both the name and
+inode number are unspecified, to avoid doing something surprising
+(such as unconditionally deleting the first directory entry).
+Directory entries are now deleted by coalescing them with the previous
+directory entry if possible, to avoid directory fragmentation. This
+is not an issue with the e2fsprogs suite, but may be a problem for
+some of the users of libext2fs, such as e2tools.
+
+Add support for version numbers of the form "1.36-rc1".
+
+Fix build of mke2fs.static.
+
+Add basic ext2fs library support for large (EA in inode) inodes.
+
+The test_io mechanism can now abort after n reads or writes to a
+particular block. The block is specified by TEST_IO_BLOCK environment
+variable, and the read/write count by the TEST_IO_READ_ABORT and
+TEST_IO_WRITE_ABORT environment variables. The block data is now only
+dumped if the 0x10 bit is set in TEST_IO_FLAGS.
+
+UUID_DEFINE() in the uuid library now creates a static variable, with
+__attribute__ ((unused)) if we are using GCC, so that UUID_DEFINE can
+be used in header files.
+
+Add support for the install-strip and install-shlibs-strip targets, as
+suggested by the GNU coding guidelines. "make install" no longer
+strips the binaries which are installed.
+
+Remove support for the --enable-old-bitops configure option which was
+only for very old sparc systems.
+
+Remove support for --enable-clear-htree; this was only needed during
+the early development of the htree patch.
+
+Use Linux-kernel-style makefile output so it is easier to see compiler
+warnings.
+
+Update gettext files to version 0.14.1.
+
+Update to use autoconf 2.5x.
+
+Improved support for compiling e2fsprogs under dietlibc.
+
+Make e2fsprogs portable to Solaris and FreeBSD systems.
+
+Add blkid_verify(), blkid_get_library_version(), and
+blkid_parse_version_string() functions to the blkid library.
+
+Add pkg-config files for e2fsprogs's libraries.
+
+Fix "make uninstall" to so that it removes everything that is installed.
+
+Add a configure --enable-maintainer-mode option which enables the
+makefile rules to rebuild the configure script from configure.in, and
+to rebuild the .gmo files in po directory.
+
+Drop the sparc assembly bitwise operations; it's less efficient
+than the GCC 3.4 compile code and triggers compiler warnings on
+sparc64. Thanks to Matthias Andree for his analysis and suggestions.
+(Addresses Debian Bug #232326)
+
diff --git a/doc/RelNotes/v1.37.txt b/doc/RelNotes/v1.37.txt
new file mode 100644
index 0000000..2b2646b
--- /dev/null
+++ b/doc/RelNotes/v1.37.txt
@@ -0,0 +1,55 @@
+E2fsprogs 1.37 (March 21, 2005)
+===============================
+
+Add support for checking the validity of Extended Attributes stored in
+inodes to e2fsck.
+
+Add support for dumping the contents of large inodes to debugfs,
+including the extended attributes stored in inodes.
+
+Fix mke2fs, e2fsck, debugfs, and the ext2fs_mkdir function so that
+when we create a new inode we make sure that the extra information in
+the inode (any extra fields in a large inode and any ea-in-inode
+information) is initialized correctly. This can take place when
+mke2fs creates the root and lost+found directory, when e2fsck creates
+a new root inode or a new lost+found directory, and when the user uses
+the debugfs write, mknod, or mkdir commands. Otherwise, the newly
+create inode could inherit garbage (or old EA information) from a
+previously deleted inode.
+
+Fixed a bug in e2fsck so it would notice if a file with an extended
+attribute block was exactly 2**32 blocks, such that i_blocks wrapped
+to zero.
+
+Added support to filefrag to detect files which are using the new
+experimental file extents format, and use the non-ext2 algorithm in
+that case. Fixed a bug to avoid reporting a false discontinuity if
+there is one or more unallocated blocks at the beginning of a file.
+
+Duplicated a check for noticing whether or not the number of blocks
+(given a certain blocksize) is greater than 2**32 when the
+BLKGETSIZE64 ioctl is not available to ext2fs_get_device_size(). This
+allows mke2fs to automatically use a larger blocksize when creating a
+filesystem on a very large device when run on systems that do not
+support BLKGETSIZE64.
+
+Fix the I18N build which was broken in e2fsprogs 1.36 because the
+build system had been switched to treat the .gmo files as shipped
+files (for backwards compatibility with systems that have older GNU
+I18N tools installed), but the gen_tarball.in script was still
+removing the .gmo files from the official source distribution.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs ##296769, #299341)
+
+Programmer's notes:
+-------------------
+
+Added new functions to the e2p library which convert between a string
+and os_type: e2p_os2string() and e2p_string2os(), and used them to
+make the generated binaries more compact.
+
+Fixed a compile-time error on Darwin systems.
+
+Cleaned up the lib/ext2fs Makefile slightly.
+
diff --git a/doc/RelNotes/v1.38.txt b/doc/RelNotes/v1.38.txt
new file mode 100644
index 0000000..d8ab030
--- /dev/null
+++ b/doc/RelNotes/v1.38.txt
@@ -0,0 +1,138 @@
+E2fsprogs 1.38 (June 30, 2005)
+==============================
+
+Fix blkid's test programs (built with "make check") compile correctly
+even without "configure --enable-blkid-debug".
+
+Fix ia64 core dump bug caused by e2fsprogs running afoul of C99 strict
+type aliasing rules on newer gcc compilers. (Addresses Red Hat
+Bugzilla ##161183.)
+
+Fix com_err library to make it more compatible with recent changes
+made to the com_err library in MIT Kerberos V5 version 1.4.
+(Addresses Sourceforge Bug #1150146)
+
+General cleanup of messages printed by e2fsprogs programs for grammar,
+consistency, and to make life easier for translators. Fixed a few
+strings containing English that had not been marked as needing
+translations. Removed strings that do not need to be translated, to
+make life easier for translators.
+
+Mke2fs and badblocks will take advantage of a feature in Linux 2.6 to
+test to see if a device appears to be in use instead of just relying
+on /proc/mounts and /etc/mtab. (Addresses Debian Bug #308594).
+
+Fix portability problem in the filefrag program affecting platforms
+where the size of an integer is smaller than the size of a long.
+(Addresses Debian Bug #309655)
+
+Mke2fs will now use a larger journal by default for filesystems
+greater than 4GB. (128 MB instead of 32MB).
+
+Mke2fs will refuse to create filesystems greater than 2**31-1 blocks,
+unless forced. This is to avoid signed vs. unsigned kernel bugs in
+block numbers that still need to be fixed.
+
+The blkid program has a new option which will more efficiently search
+for device when it is known (or expected) that only one matching
+device will be found in the system, such as when doing a lookup by
+UUID.
+
+Debian's e2fsprogs-specific initrd fragment will avoid including
+unnecessary libraries into the initrd ramdisk by unsetting LD_PRELOAD
+and LD_LIBRARY_PATH, and filtering out libraries found in
+/etc/ld.so.preload. (Addresses Debian Bug: #304003)
+
+Fixed a potential portability issue in the blkid programs for
+architectures where the char type is unsigned. (Addresses Sourceforge
+Bug: #1180585)
+
+Fix a bug in filefrag so that it doesn't falsely count an extra
+discontinuity when the first block found is an indirect block.
+(Addresses Debian Bug #307607).
+
+Fix blkid's recognition of cramfs filesystems, and enhance it to be
+able to handle cramfs labels.
+
+Fix debugfs's stat command to not core dump when a filesystem is not
+open.
+
+Fix e2fsck's handling of error conditions caused by the resize inode
+claiming blocks that are also used by other inodes, a filesystem
+corruption which was commonly caused by a bug in Fedora Core 3's
+resize2fs program.
+
+Fixed bug in filefrag which caused it to fail on non-ext2/3
+filesystems. (Addresses Debian Bug: #303509)
+
+If the superblock last mount time indicates that the system clock may
+not be accurate, then e2fsck will omit checking inodes' deletion time
+field for indications of a potential corrupted orphaned inode list.
+(Previously e2fsck only omitted these LOW_DTIME checks when the
+superblock's last write time looked insane.)
+
+Fixed a IA64 core dump bug in the e2p library which affected dumpe2fs.
+(Addresses Debian bug #302200)
+
+Make the blkid library more paranoid about being run from setgid
+programs, and to use __secure_getenv() from libc if it is available.
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses Debian Bugs: #304591, #304592, #304594, #304597, #304593
+and Sourceforge Bug: #1189803)
+
+Updated and fixed translations.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details.
+
+Programmer's notes:
+-------------------
+
+Ext2fs_set_bit(), ext2fs_clear_bit(), and ext2fs_test_bit( have been
+changed to take an unsigned int for the bit number. Negative bit
+numbers were never allowed (and didn't make any sense), so this should
+be a safe change. This is needed to allow safe use of block numbers
+greater than or equal to 2**31.
+
+The compile_et program will avoid recreating generated foo_err.c and
+foo_err.h files if no changes are necessary. The compile_et program
+will also atomically replace these files to avoid a potential parallel
+build race problem on SMP systems. (Addresses Sourceforge Bug:
+#1157933)
+
+Added a new function to the blkid library, blkid_probe_all_new(),
+which only probes newly added disk devices, and change
+blkid_find_dev_with_tag() to use this function so that when a
+requested tag is not found, devices that were previously not checked
+are searched before searching all devices in the system.
+
+Added new functions to the blkid library, blkid_dev_set_search() and
+blkid_dev_has_tag().
+
+E2fsck's problem strings can now use @m and @n as abbreviations for
+"multiply-claimed" and "invalid", respectively.
+
+The e2fsprog.pot file now has an explanation of how the @-expansion
+and %-expansion works, and strings in e2fsck/problem.c which contain @
+characters now have comments in e2fsprogs.pot with the @-expansion to
+make life easier for translators.
+
+Fixed missing return values in the ext2fs library which could cause it
+to return random garbage in certain error conditions.
+
+Allow the current time to be overridden via the E2FSCK_TIME environment
+variable for use in regression tests.
+
+The test script driver program now exits with a non-zero status if
+there any of its test that it ran failed.
+
+Fixed problems with parabuilds on SMP systems. (Addresses Sourceforge
+Bug: #1157933)
+
+Fixed "make check" so that it compiles correctly even when e2fsprogs'
+header files have not be installed in the system include directories.
+(Addresses Sourceforge Bug: #1180572)
+
+Fixed gcc -Wall nits.
+
diff --git a/doc/RelNotes/v1.39.txt b/doc/RelNotes/v1.39.txt
new file mode 100644
index 0000000..f7c4e9d
--- /dev/null
+++ b/doc/RelNotes/v1.39.txt
@@ -0,0 +1,248 @@
+E2fsprogs 1.39 (May 29, 2006)
+=============================
+
+Fix 32-bit cleanliness in e2fsprogs so that we can support filesystems
+between 2**31 and 2**32 blocks.
+
+Change mke2fs to use /etc/mke2fs.conf as a configuration file to
+configure the filesystem features, blocksize, and inode_ratio for
+different filesystem types.
+
+Mke2fs will now create filesystems hash trees and on-line resizing
+enabled by default, based on the new /etc/mke2fs.conf file.
+
+The e2fsprogs tools (resize2fs, e2fsck, mke2fs) will open the
+filesystem device node in exclusive mode to prevent accidents by
+system administrators. In the case of resize2fs and mke2fs, it will
+only use exclusive mode if the filesystem is not mounted.
+
+Fixed a bug in mke2fs which caused it to to fail when creating the
+resize inode for large filesystems. (Addresses Debian Bug #346580)
+
+When allocating space for the RAID filesystems with the stride
+parameter, mke2fs will now place each portion of the group's inode
+table right up after the superblock (if present) in order to minimize
+fragmentation of the free space.
+
+Speed up mke2fs and e2fsck by writing inode and block bitmaps more
+efficiently by writing the inode and block bitmaps in one pass, thus
+reducing the number of disk seeks required.
+
+Add support for on-line resizing to resize2fs.
+
+Fix blkid library so that logic to determine whether or not a device's
+cached information in /etc/blkid.tab needs to be verified or not
+doesn't get confused by a system clock which is insane (for example,
+if the battery is dead on a Macintosh running PPC Linux. (Addresses
+Red Hat Bug: #182188)
+
+The blkid library will now store the UUID of the external journal used
+by ext3 filesystems, so that in the future, the userspace mount binary
+can use this to find the location of the external journal and pass
+this information to the kernel.
+
+E2fsck will now consult a configuration file, /etc/e2fsck.conf to
+control how various options should be handled. See the e2fsck.conf
+man page for more details. (Addresses Debian Bug: #150295)
+
+E2fsck now prints an explanatory message when delaying a filesystem
+check when the system is running on battery. (Addresses Debian Bug:
+#350306)
+
+E2fsck will detect if the superblock's last mount field or last write
+field is in the future, and offer to fix if so. (Addresses Debian Bug
+#327580) These problems will be fixed automatically in preen mode
+since Debian's boot sequence bogusly doesn't set the time correctly
+until potentially very late in the bootup process, and this can cause
+false positives which will cause users' systems to fail to boot.
+(Addresses Debian Bugs #343662 and #343645)
+
+E2fsck now checks to see if the superblock hint for the location of
+the external journal is incorrect, and if so, offer to update it.
+(Addresses Debian Bug: #355644)
+
+Fix e2fsck from segfaulting on disconnected inodes that contain one or
+more extended attributes. (Addresses Debian Bug: #316736, #318463)
+
+E2fsck will stop and print a warning if the user tries running a
+read/write badblocks test on a read-only mounted root filesystem.
+
+Fix a memory leak in e2fsck's error paths. (Thanks to Michael
+C. Thompson for pointing these out; they were originally found using
+Coverity.)
+
+When resizing a file containing a filesystem, resize2fs will expand or
+truncate a file as necessary. (Addresses Debian Bug: #271607)
+
+Resize2fs will now automatically determine the RAID stride parameter that
+had been used to create the filesystem, and use that for newly created
+block groups. The RAID stride parameter may also be manually specified
+on the command line using the new -S option to resize2fs.
+
+Fix mke2fs so that it correctly creates external journals on
+big-endian machines (such as a S/390).
+
+Fix a bug in the e2p library which could cause dumpe2fs to (rarely)
+fail to print out the journal or hash seed UUID. (Thanks to Guillaume
+Chambraud for pointing this out.)
+
+Dumpe2fs will now print the size of the journal (if present).
+
+Fix debugfs's set_inode_field command so it can properly set the frag,
+fsize, uid_high, gid_high, and author fields in the inode instead of
+silently failing, and so that setting the i_size actually sets i_size
+correctly.
+
+Add a new debugfs command, set_current_time, which sets fs->now so
+that regression test suites can repeatedly modify the filesystem's
+last_write fields.
+
+Fix a bug in debugfs's icheck which would incorrectly report the owner
+of an extended attribute block.
+
+Fix the debugfs commands htree_dump, dx_hash, and list_dir so they print a
+print a usage message when an illegal option character is given.
+
+Fix debugfs's dump_unsued command on filesystems with a 64k blocksize
+so it won't core dump. (Addresses SourceForge bug #1424311)
+
+Fix mklost+found so that it creates a full-sized directory on
+filesystems with larger block sizes.
+
+Fix a file descriptor leak in blkid library.
+
+Fix a display bug in "badblocks -sv" so that the done message properly
+clears the block number at the end of the test. (Addresses Debian Bug
+#322231)
+
+Allow fractional percentages to the -m option in mke2fs and tune2fs
+(Addresses Debian Bug: #80205)
+
+Use fstat/fstat64 in getsize.c if the the target is a regular file,
+instead of attempting to do a binary search. Fix some fd leaks in
+error cases.
+
+Add support for device mapper library to the blkid library to ensure
+that the "best" (i.e., leaf) device is probed by the blkid library.
+
+Fix the blkid library so that it notices when an ext2 filesystem is
+upgraded to ext3.
+
+Improve the blkid's library VFAT/FAT detection; it now understands
+labels stored in the root directory, and is more paranoid about
+checking the FAT superblock values.
+
+Fixed a fd leak in the uuid library which was causing problems for the
+LVM tools. (Addresses Debian Bug: #345832)
+
+Add support for the reiser4 and software suspend partitions to the
+blkid library. Also add support for extract the label from iso9660
+filesystems.
+
+Fix a compile_et bug which miscount the number of error messages if
+continuations are used in the .et file.
+
+Add extra sanity checks to protect users from unusual circumstances
+where /etc/mtab may not be sane, by checking to see if the device is
+reported busy (works on Linux 2.6) kernels. (Addresses Debian Bug
+#319002)
+
+Updated French, Dutch, Polish, and Swedish translations. (Addresses Debian
+Bug: #343149, #341911, #300871, #316604, #316782, #330789)
+
+Fix use-after-free bug in e2fsck when finishing up the use of the
+e2fsck context structure.
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages and
+documentation. (Addresses Debian Bugs: #329859, #322188, #316811,
+#312515, #351268, #357951, #347295, #316040, #368392, #368393, #368394,
+#368179)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs #317862, #320389, #290429, #310950,
+#310428, #330737, #330736, #329074, #356293, #360046, #366017, #364516,
+#362544, #362970)
+
+
+Programmer's notes:
+-------------------
+
+Update config.guess and config.sub to latest version (2006-02-23) from
+FSF.
+
+Fix asm_types.h type conflicts on AMD 64 platforms. (Addresses Debian
+Bugs: #360661, #360317)
+
+Fixed the Makefile so that they work correctly on newer versions of
+GNU make (i.e., 3.81).
+
+Add valgrind support to the regression test suites, and eliminate
+false positives from valgrind.
+
+Add a regression test suite for the blkid library.
+
+Fix a fencepost error in resize2fs caught by valgrind.
+
+Fix compiler warnings about missing memcpy prototypes.
+
+We no longer have the sparc assembly code in the header file any more,
+so we shouldn't set _EXT2_HAVE_HAS_BITOPS_ for the sparc. This would
+break compiles on the sparc architectures when using gcc.
+
+In the libext2fs library, add the new field fs->now which if non-zero
+is used instead of the system time when setting various filesystem
+fields (last modified time, last write time, etc.)
+
+Fix gcc 4.01 complaints by adding a missing #include <string.h> to
+ext2fs.h which is needed since the inline functions use memcpy().
+(Addresses Sourceforge Bug #1251062)
+
+Use BUILD_CFLAGS and BUILD_LDFLAGS instead of CFLAGS and LDFLAGS in
+the build system when building files in the util directory which are
+needed during the build process. This avoids potential problems when
+cross-compiling and some of the options specified in CFLAGS or LDFLAGS
+are not recognized as valid by the host compiler. (Addresses
+Sourceforge Bug #1261547)
+
+Clean up the blkid library by making the superblock and generic i/o
+functions to be more generic. Clean up interface to the probe
+function, and fix memory leak. Finally, remove an unneeded reference
+to probe.h in the lib/blkid/resolve.c
+
+Add an ext2fs_read_bb_FILE regression test to confirm proper detection
+of invalid block #'s.
+
+The x86 asm constraints for ext2fs_{set/clear}_bit have been fixed to
+indicate that the the function read/writes the memory location.
+
+Fix various gcc -Wall complaints.
+
+Add a dependency to make sure that the subdirectories are created
+before creating all of the object files, in order to address parallel
+build problem in the library Makefiles. (Addresses Sourceforge Bug:
+#1261553)
+
+Add $(LDFLAGS) to the command line argument when generating an ELF or
+Solaris shared library, to allow cross-compile and other builds that
+might need to specify -L paths to needed libraries. (Addresses
+Sourceforge Bug #1261549)
+
+Add a new feature, EXT2_FEATURE_COMPAT_LAZY_BG, which is initially
+intended for testing purposes. It allows an ext2/ext3 developer to
+create very large filesystems using sparse files where most of the
+block groups are not initialized and so do not require much disk
+space. Eventually it could be used as a way of speeding up mke2fs and
+e2fsck for large filesystem, but that would be best done by adding an
+RO_COMPAT extension to the filesystem to allow the inode table to be
+lazily initialized on a per-block basis, instead of being entirely
+initialized or entirely unused on a per-blockgroup basis.
+
+Fix backwards compatibility so e2fsprogs will better compile on Linux
+2.0.35 systems.
+
+Make test scripts more robust against locale-related environment variables
+
+Fix type warning problem with sizeof() in ext2fs_open2().
+
+Fix type warning problem with time_t in debugfs.
+
diff --git a/doc/RelNotes/v1.40.txt b/doc/RelNotes/v1.40.txt
new file mode 100644
index 0000000..08608d2
--- /dev/null
+++ b/doc/RelNotes/v1.40.txt
@@ -0,0 +1,1043 @@
+E2fsprogs 1.40.11 (June 17, 2008)
+=================================
+
+Mke2fs, tune2fs, and resize2fs now use floating point to calculate the
+percentage of reserved blocks. (Addresses Debian Bug: #452639)
+
+Updated Spanish and Catalan translations.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #483962, #483023)
+
+Add detection for ZFS volumes to the libblkid library.
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses Debian Bug: #486463)
+
+Programmer's notes:
+-------------------
+
+Fix marginal C code in probe_lvm2() function to the blkid library more
+portable for older compilers.
+
+Fix build problems on MacOS X. (Addresses Sourceforge Bug: #1972473)
+
+Fix ext2fs_swap{16,32,64} functions so they can be used by external
+applications on big-endian machines. (Addresses Debian Bug: #484879)
+
+
+E2fsprogs 1.40.10 (May 21, 2008)
+================================
+
+When deciding whether or not to revalidate a blkid cache entry, if the
+device's mtime is newer than the last time the cached entry was
+validated, force a revalidation.
+
+Fix a potential data corruption bug in e2fsck in the journal replay.
+The chances of this is happening is extremely remote, especially the
+default data=ordered or data=writeback modes. However, if a block
+which has been journalled starts with the first four bytes 0xc03b3998,
+when e2fsck replays the journal, those four bytes will be replaced
+with zero's. Fortunately, it is highly, highly unlikely for e2fsck
+metadata to begin with those fatal 4 byte sequence, and unless
+data=ordered mode is in use, data blocks are never journalled.
+
+Updated German, Dutch, Swedish, and Vietnamese translations.
+
+Programmer's notes:
+-------------------
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details.
+
+Remove default sizes of types when cross compiling, since autoconf
+2.50 can figure this out automatically now.
+
+
+E2fsprogs 1.40.9 (April 27, 2008)
+=================================
+
+SuSE's security team audited uuidd and came up with a few minor
+issues. None of them are serious given that uuidd runs setuid as a
+unprivileged user which has no special access other than libuuid
+directory, but it's good to get them fixed.
+
+One additional fix in ext2fs_swap_inode_full() needed for resize2fs to
+work correctly with in-inode extended attributes.
+
+Updated German, Czech, Dutch, French, Polish, Swedish, and Vietnamese
+translations.
+
+Debugfs will avoid using a pager if the standard output is not a tty.
+
+Fix debugfs and tune2fs to correctly handle daylight savings time when
+parsing a time string.
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+
+Fix fsck completion bars when multiple filesystems were being checked
+in parallel. (Addresses Debian Bug: #432865, Addresses Launchpad Bug:
+#203323, Addresses Sourceforge Bug: #1926023)
+
+Fix fsck so that progress information is sent back correctly when
+multiple filesystems are being check and the output of fsck is being
+redirected to a file descriptor. Also, include the device name (w/o
+spaces) in the progress information sent back via a file descriptor.
+(Addresses Launchpad Bug: #203323, Addresses Sourceforge Bug:
+#1926023)
+
+Teach fsck to treat "ext4" and "ext4dev" as ext* filesystems.
+
+If logsave receives a SIGTERM or SIGINT signal, it will now pass that
+signal to its child process.
+
+Fix mke2fs's creation of are resize inode when there is a non-standard
+s_first_data_block setting.
+
+Fix bug in blkid when run by an unprivileged user; most devices were
+not reported correctly. 9Addresses Launchpad Bug: #220275)
+
+Mke2fs will not allow the logically incorrect combination of
+resize_inode and meta_bg, which had previously caused mke2fs to create
+a corrupt filesystem.
+
+Fix fsck in German locales so that a 'j' means yes.
+(Addresses Sourceforge Bug: #1947683)
+
+
+Programmer's notes:
+-------------------
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details.
+
+Update valgrind options in test_script to work with valgrind 3.2.3
+
+Update texinfo.tex to a much newer version from the FSF.
+
+Remove bashism for configure script and from the lib/ss Makefile.
+Addresses Sourceforge Bug: 1921969
+
+Fix some silently broken tests: m_no_opt, m_meta_bg, and m_raid_opt.
+
+Fix build system so that if texinfo is not installed, it won't print a
+(harmless) error message.
+
+
+E2fsprogs 1.40.8 (March 13, 2008)
+=================================
+
+Fixed e2image -I so it works on image files which are larger than 2GB.
+
+Fixed e2fsck's handling of directory inodes with a corrupt size field. If
+the size is larger than the number of blocks found in the inode, don't
+try to allocate extra empty blocks at the end of the directory to make
+up the difference; there's no point to doing that. In addition, if
+the size is not a multiple of a blocksize, always fix it.
+
+E2fsck handled a pass 2 "should never happen error" by not giving
+enough information and then core dumping. Unfortunately, it was all
+too easy to trigger the "should never happen" situation if a
+directory's inode size was not correct. This has been fixed, but
+e2fsck has also been taught how to handle this situation more
+gracefully, by simply removing the inode hash tree information, so
+that it can be rebuilt again after e2fsck's pass 3. (Addresses
+Launchpad Bug: #129395)
+
+Resize2fs had a bug resizing large inodes with extended attributes
+that was fixed in 1.40.6; unfortunately, it turned out it wasn't fixed
+completely on big-endian systems such as PowerPC. The bug should be
+completely fixed now. Yay for regression test suites. (Addresses Red
+Hat Bugzilla: #434893)
+
+Updated German, Czech, Dutch, Polish, Swedish, and Vietnamese
+translations. Many thanks to Philipp Thomas from Novell for stepping
+up to become the new German translation maintainer! (Addresses Debian
+Bugs: #302512, #370247, #401092, #412882).
+
+When e2fsck is clearing a corrupt inode's HTREE directory information,
+make it clear that it is just clearing the HTREE information, not the
+entire inode.
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+
+Programmer's notes
+------------------
+
+Add new functions, ext2fs_dblist_get_last() and
+ext2fs_dblist_drop_last(), which allows the caller to examine the last
+directory block entry added to the list, and to drop if it necessary.
+
+Fixed a portability problem in libblkid with DJGPP.
+
+Fix an obvious typo in an "internal error" message in e2fsck. Thanks
+to Philipp Thomas for pointing this out.
+
+If the info files are not built, change "make install" so it doesn't
+fail with an error code.
+
+
+E2fsprogs 1.40.7 (February 28, 2008)
+====================================
+
+Remove support for clearing the SPARSE_SUPER feature from tune2fs, and
+depreciate the -s option, since it can result in filesystems which
+e2fsck can't fix easily. There are very good reasons for wanting to
+disable sparse_super; users who wants to turn off sparse_super can use
+debugfs. (Addresses Sourceforge Bug: #1840286)
+
+Add missing options to mke2fs's usage message. (Addresses Sourceforge
+Bug: #1751393)
+
+Fix bug in resize2fs when large (greater than 128 byte) inodes are
+moved when a filesystem is shrunk; it was only moving the first 128
+bytes, so extended attributes were not getting moved. (Addresses Red
+Hat Bugzilla: #434893)
+
+E2fsck now prints an explicit message when the bad block inode is
+updated, to avoid confusion about why the filesystem was modified.
+(Addresses Sourceforge Bug: #756460)
+
+Allow mke2fs and tune2fs manipulate the large_file feature.
+Previously we just let the kernel and e2fsck do this automatically,
+but e2fsck will no longer automatically clear the large_file feature.
+It still isn't really necessary to worry about this feature flag
+explicitly, but some users seem to care. (Addresses Red Hat Bugzilla:
+#258381)
+
+Suppress message about an old-style fstab if the fstab file is empty.
+(Addresses Debian Bug: #468176)
+
+Fix (really minor) bug in debugfs's find_free_block so it avoids
+reporting a free block more than once if there are too few free blocks
+in the filesystem. (Addresses Sourceforge Bug: #1096315)
+
+Change e2fsck to no longer clear the LARGE_FILES feature flag
+automatically, when there are no more > 2GB files in the filesystem.
+It's been almost a decade since there have been kernels that don't
+support this flag, and e2fsck clears it quietly without telling the
+user why the filesystem has been changed.
+
+Fix bug which could cause libblkid to seg fault if a device mapper
+volume disappears while it is being probed. (Addresses RedHat
+Bugzilla: #433857)
+
+Enhance e2fsck's reporting of unsupported filesystem feature flags.
+(Addresses Sourceforge Feature Request: #1175808)
+
+Fix option syntax in dumpe2fs for explicit superblock and blocksize
+parameters. What was currently documented in the man page has been
+broken for some time, due to getopt() implementation changes. The
+option syntax has been changed to one which is can be more portable
+supported and which is consistent with the format for extended options
+in mke2fs and tune2fs. (Addresses Sourceforge Bug: #1830994)
+
+Add support to tune2fs to clear the resize_inode feature. This
+requires an fsck afterwards. (Addresses Red Hat Bugzilla: #167816)
+
+Teach blkid to detect LVM2 physical volumes. (Addresses Red Hat
+Bugzilla: #409321)
+
+Add support for setting RAID stride and stripe-width via mke2fs and
+tune2fs. Teach dumpe2fs to print the RAID parameters.
+
+Add support for setting new superblock fields to debugfs's
+set_super_value.
+
+Add support for printing "mostly-printable" extended attributes in
+Debugfs.
+
+Add support for the -M option to fsck, which causes it to ignore
+mounted filesystem.
+
+Fix uuidd so that it creates the pid file with the correct pid number.
+(Addresses Sourceforge Bug: #1893244)
+
+Fix various gcc -Wall warnings.
+
+Update Czech, Dutch, Polish, Swedish, and Vietnamese translations
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses Sourceforge Patch: #1399325)
+
+
+Programmer's notes:
+-------------------
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bug: #466929)
+
+Add new flag EXT2_FLAG_NONFREE_ON_ERROR ext2fs_open2() which returns a
+partially filled-in filesystem object on an error, so that e2fsck can
+print more intelligent error messages.
+
+Add a new function e2p_edit_feature2() which allows the caller to
+specify which feature flags are OK to set or clear, and which returns
+more specific information about feature flags which are not allowed to
+be set/cleared.
+
+Set the C locale in the test_script driver since it uses [A-Za-z].
+(Addresses Sourceforge Bug: #1890526)
+
+Use fcntl locking instead of lockf in libuuid since Cygwin doesn't
+support lockf().
+
+Change configure.in to avoid using the 'dc' command unless it is
+absolutely needed. (i.e., when using parsing a WIP-style version
+number) (Addresses Sourceforge Bug: #1893024)
+
+Add portability checks to support compilation under DJGPP.
+
+Update to the latest samba tdb code before the LGPLv3 change, which
+fixes a realloc() leak on failure.
+
+Fix memory leak in ext2fs_alloc_block().
+
+Fix makefile dependency issues for various install targets.
+(Addresses-Sourceforge-Patches: #1903484, #1903466, #1903456)
+
+Improve descriptions for the r_move_itable and r_resize_inode tests.
+
+
+E2fsprogs 1.40.6 (February 9, 2008)
+===================================
+
+Add support for returning labels for UDF filesystems in the blkid
+library.
+
+Fix bug in the blkid library where cached filesystems was not being
+flushed when opening USB devices returned the error ENOMEDIUM.
+(Addresses Debian Bug: #463787)
+
+Added logic to the blkid library to automatically choose whether a
+filesystem should be mounted as ext4 or ext4dev, as appropriate.
+
+Allow tune2fs to set and clear the test_fs flag on ext4 filesystems.
+
+Fix a bug in e2fsck which caused it to core dump if e2fsprogs had been
+configured with --enable-jbd-debug.
+
+Document the BLKID_FILE environment variable in the libblkid man page
+
+Programmer's Notes:
+-------------------
+
+Update e2fsprogs translation template and Vietnamese and Czech translations
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #436058)
+
+Don't try to create $DESTDIR/etc/init.d as part of make install as we
+don't install the init.d script (and it's not the recommended way to
+start uuidd anyway). (Addresses Sourceforge Bug: #1885085)
+
+Use thread local storage to fix a theoretical race condition if two
+threads try to format an unknown error code at the same time in the
+com_err library.
+
+
+E2fsprogs 1.40.5 (January 27, 2008)
+===================================
+
+Fix a potential overflow big in e2image if the device name is too
+long.
+
+Mke2fs will now create new filesystems with 256 byte inodes and the
+ext_attr feature flag by default. This allows for much better future
+compatibility with ext4 and speeds up extended attributes even on ext3
+filesystems.
+
+Teach e2fsck to ignore certain "safe" filesystem features which are
+set automatically by the kernel. Having the kernel set features
+automagically behind the user's back is a bad idea, and we should try
+to break the kernel of this habit, especially for the newer ext4
+feature flags. But for now, we will try to avoid needless full checks
+which can annoy users who are doing fresh installs.
+
+Add support in tune2fs and mke2fs for making a filesystem as being "ok
+to be used with test kernel code". This will be needed for using test
+filesystems with the latest ext4 kernel code.
+
+Change e2fsck -fD so that it sorts non-htree directories by inode
+numbers instead of by name, since that optimizes performances much
+more significantly. (Addresses-Sourceforge-Feature-Request: #532439)
+
+If e2image fills the disk, fix it so it exits right away instead of
+spewing large numbers of error messages.
+(Addresses-Sourceforge-Feature-Request: #606508)
+
+If ftruncate64() is not available for resize2fs, let it use ftrucate()
+instead, but have it check to see if the size would get truncated, and
+skip calling ftruncate in that case.
+
+Add support for detecting HFS+ filesystems in the blkid library.
+
+Add support in the blkid library for ext4/ext4dev filesystems.
+
+Fix a bug in blkid where it could die on a floating point exception
+when presented with a corrupt reiserfs image.
+
+Fix blkid's handling of ntfs UUID's so that leading zeros are printed
+such that UUID string is a fixed length.
+
+Add sample python bindings for the uuid library to the contrib
+directory. (Addresses-Sourceforge-Patches: #778817)
+
+Fix debugfs's 'lsdel' command so it uses ext2fs_block_iterate2 so it
+will work with large files. (Addresses Sourceforge Feature Request:
+#1257500 and Sourceforge Support Request: #1253511)
+
+Allow the debugfs 'undel' command to undelete an inode without linking
+it to a specific destination directory, since this might require
+allocating blocks that could overwrite some yet-to-be-recovered
+deleted files. (Addresses-Sourceforge-Feature-Request: #967141)
+
+Update Swedish translation from the Translation Project.
+
+Programmer's Notes:
+-------------------
+
+Fix configure handling of --sbindir (which should rarely be used, but
+someone did complain, so let's fix it). (Addresses Sourceforge Bug:
+#498381)
+
+Updated e2fsprogs.spec file to include a new uuidd package
+
+Use pkg-config to determine where to find the devmapper library so we
+can find out where it is located on different distributions.
+
+Fix Makefile race so that "make -j3 distclean" works correctly
+
+Fix portability problems on non-Linux/non-Hurd/non-Masix systems,
+especially on MacOS X systems. (Addresses Sourceforge Bugs: #1861633,
+#1819034, #1863819)
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #459403, #459475, #459614)
+
+Remove the --enable-dynamic-static configure option, and build e2fsck
+dynamically by default. If the user wants e2fsck.static, he/she will
+need to build it via "make -C e2fsck e2fsck.static"
+
+Fix various build warnings due to missing prototypes.
+(Addresses Sourceforge Patch: #1861663, #1861659)
+
+
+E2fsprogs 1.40.4 (December 31, 2007)
+====================================
+
+Improve time-based UUID generation. A new daemon uuidd, is started
+automatically by libuuid if necessary. This daemon is setuid to allow
+updates to /var/lib/libuuid, so the clock sequence number can be
+stored and so if the clock is set backwards, it can be detected.
+(Addresses Sourceforge Bug: #1529672, Addresses Red Hat Bugzilla:
+#233471)
+
+Filter out the NEEDS_RECOVERY feature flag when writing out the backup
+superblocks. This avoids e2fsck from concluding that a full
+filesystem check is required before backing up the superblock due to
+changes in the feature flags. (Addresses Debian Bug: #454926)
+
+Fix fsck to only treat the '#' character as a comment at the beginning
+of the line in /etc/fstab. Otherwise fstabs for the fuse filesystem
+will cause fsck to issue an bogus warning message.
+(Addresses Gentoo bug: #195405, Addresses Sourceforge bug: #1826147)
+
+Format control characters and characters with the high eighth bit set
+when printing the contents of the blkid cache, to prevent filesystems
+with garbage labels from sending escape sequences to the user's screen
+that might, for example place it in graphics mode. (Addresses Ubuntu
+Bug: #78087)
+
+Fix sign-extension problem on 64-bit systems in in the com_err
+library. (Addresses Sourceforge Bug: #1809658)
+
+Avoid division by zero error when probing an invalid FAT filesystem in
+the blkid library. (Addresses Sourceforge Bug: #1831627)
+
+Update Dutch, Polish, and Vietnamese translations from the Translation
+Project. Remove the Rwandan translation upon advice of the
+Translation Project.
+
+Programmer's Notes:
+-------------------
+
+Fix the libss "make check" regression test so that it works if the
+current directory is not in the user's path or if the libss shared
+library is not installed. (Addresses Sourceforge Bug: #1848974)
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses Debian Bugs: #444883, #441872)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #437720, #451172, #458017)
+
+Fix build failure on non-Linux/non-Hurd/non-Masix systems.
+(Addresses Sourceforge Bug: #1859778)
+
+Fix Hurd portability issues. (Addresses Debian Bug: #437720)
+
+
+E2fsprogs 1.40.3 (December 5, 2007)
+===================================
+
+Fix a potential security vulnerability where an untrusted filesystem
+can be corrupted in such a way that a program using libext2fs will
+allocate a buffer which is far too small. This can lead to either a
+crash or potentially a heap-based buffer overflow crash. No known
+exploits exist, but main concern is where an untrusted user who
+possesses privileged access in a guest Xen environment could corrupt a
+filesystem which is then accessed by the pygrub program, running as
+root in the dom0 host environment, thus allowing the untrusted user to
+gain privileged access in the host OS. Thanks to the McAfee AVERT
+Research group for reporting this issue. (Addresses CVE-2007-5497.)
+
+Fix heuristics in blkid which could cause a disk without partitions to
+be incorrectly skipped when a loopback device is present. (Addresses
+Red Hat Bugzilla #400321.)
+
+Fix e2image so that in raw mode it does not create an image file which
+is one byte too large.
+
+Change mke2fs's usage message so it recommends the preferred -E option
+instead of the deprecated -R option.
+
+Enhance the blkid library so it will recognize squashfs filesystems.
+(Addresses Red Hat Bugzilla #305151.)
+
+Enhance e2fsck so it will force the backup superblocks to be backed up
+if the filesystem is consistent and key constants have been changed
+(i.e., by an on-line resize) or by e2fsck in the course of its
+operations.
+
+Enhance blkid's detection of FAT filesystems; so that USB disks with
+only a single bootable partition will not get missed.
+
+E2fsck will no longer mark a filesystem as invalid if it has time
+errors (i.e., if superblock mount time or last write time is in the
+future) and the user refuses to fix the problem.
+
+The Ubuntu init scripts don't properly set the system time correctly
+from hardware clock if the hardware clock is configured to tick local
+time instead of GMT time. Work around this as best as we can by
+providing an option, buggy_init_scripts, in /etc/e2fsck.conf which can
+be set on Ubuntu systems. (Addresses Debian Bug #441093, and Ubuntu
+Bug #131201.)
+
+Fix fsck to ignore /etc/fstab entries for bind mounts. (Addresses Red
+Hat Bugzilla #151533.)
+
+Fix e2fsck so that if the superblock is corrupt, but still looks
+vaguely like an ext2/3/4 superblock, that it automatically tries to
+fall back to the backup superblock, instead of failing with a hard
+error.
+
+Make the e2fsprogs program more robust so that they will not crash
+when opening a corrupt filesystem where s_inode_size is zero.
+
+Change e2fsck so it uses sscanf() instead of atoi() so it non-numeric
+arguments are detected as such and the parse error is reported to the
+user. (Addresses Debian Bug #435381.)
+
+Change e2fsck so it will not complain if a file has blocks reallocated
+up to the next multiple of a system's page size.
+
+Fix bug in ext2fs_check_desc() which will cause e2fsck to complain
+about (valid) filesystems where the inode table extends to the last
+block of the block group. (Addresses Red Hat Bugzilla #214765.)
+
+Fix a bug in ext2fs_initialize() which causes mke2fs to fail while
+allocating inode tables for some relatively rare odd disk sizes.
+(Addresses Red Hat Bugzilla #241767.)
+
+Add Catalan translation and update Dutch and Swedish translations
+from the Translation Project.
+
+Fix big-endian byte-swapping bug in ext2fs_swap_inode_full(). We
+still had an issue when trying to figure out whether we need to
+byte-swap fast symlinks that contained extended attributes.
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses SourceForge Bug #1821333.)
+
+
+Programmer's Notes:
+-------------------
+
+Fix mke2fs tests to avoid needing any significant ^M (CR) characters
+
+Add "make check" to the RPM spec file
+
+Fix "make install" and 'make uninstall" in misc/Makefile.in so that it
+works correctly when the prefix is not the root directory.
+
+Fix the resize2fs tests, r_move_itable and r_resize_inode, so they
+clean up after themselves by deleting the test.img temporary file
+after completing the test.
+
+Fixed a corner case bug ext2fs_unlink() when trying to delete the
+first directory entry in a directory block and the last directory
+entry in the previous directory block is not in use. Fortunately
+ext2fs_unlink() is only used by debugfs and e2fsck, and in e2fsck in
+places where it is extremely unlikely to run into this corner case.
+
+Fix missing dependency which would cause parallel builds to fail.
+(Addresses Sourceforge Bug #1842331.)
+
+Fix a build error on newer gcc caused by lib/ext2fs/ismounted.c
+calling open(O_CREATE) with a missing mode parameter.
+
+Fix the test_ss.c in lib/ss so it can be used as an example
+application program for the library as well as a regression test
+suite.
+
+Fix ext2fs_dblist_dir_iterate() so that error codes and abort codes
+are properly passed back up through the call stack.
+
+E2fsprogs 1.40.2 (July 12, 2007)
+================================
+
+A recent change to e2fsck_add_dir_info() to use tdb files to check
+filesystems with a very large number of filesystems had a typo which
+caused us to resize the wrong data structure. This would cause a
+array overrun leading to malloc pointer corruptions and segfaults.
+Since we normally can very accurately predict how big the the dirinfo
+array needs to be, this bug only got triggered on very badly corrupted
+filesystems.
+
+Fix a bug in e2fsck which caused it to incorrectly salvage
+directories when the last entry's rec_len is bogusly too big. This
+resulted in a nonsense filesystem corruption to be reported, and
+required a second run of e2fsck to fully fix up the directory.
+
+Update tune2fs man page to include more discussion of reserved blocks
+(Addresses Launchpad bug #47817)
+
+Update Turkish, Polish, Dutch, and Vietnamese PO files from the
+Translation Project
+
+
+E2fsprogs 1.40.1 (July 7, 2007)
+===============================
+
+Fix bug which could cause libblkid to loop forever. When revalidating
+a partition where there is obsolete information in /etc/blkid.tab, we
+end up freeing a the type tag without clearing dev->bid_type, causing
+blkid_verify() to loop forever. (Addresses Debian Bug: #432052)
+
+The Turkish translation has a bug in it where it has the translation
+of "E@e '%Dn' in %p (%i)" to "E@E". This causes @E to be expanded at
+@E, recursively, forever, until the stack fills up and e2fsck core
+dumps. We fix this by making e2fsck stop @-expansions after a
+recursive depth of 10, which is far more than we need.
+(Addresses Sourceforge Bug: #1646081)
+
+Compile the default mke2fs.conf into mke2fs program. People are
+getting surprised by mke2fs creating filesystems with different
+defaults than earlier versions of mke2fs if mke2fs.conf is not
+present. So we now create a built in version of mke2fs.conf file
+which is used by mke2fs if the /etc/mke2fs.conf is not present.
+(Addresses SourceforgeBug: #1745818)
+
+Improve the config/parse_types.sh helper script. Fix a potential
+security problem if e2fsprogs is built as root (as Gentoo does!). In
+addition fix the script and how it is called from the configure script
+so that it does the right thing when cross-compiling. (Fixes Gentoo
+bug: #146903)
+
+Update Vietnamese, French, and Dutch PO files from the Translation
+Project. Also created a new e2fsprogs.pot file for translator.
+
+Fix bogus strip permission errors when building under Debian. When
+building the e2fsprogs dpkg's, the dh_strip command emits a large
+number of error messages caused by the permissions not being right.
+So run dh_fixperms before running dh_strip.
+
+Programmer's Notes:
+-------------------
+
+Add new function: profile_set_default(). This function sets the value
+of the pseudo file "<default>". If the file "<default>" had
+previously been passed to profile_init(), then def_string parameter
+will be parsed and used as the profile information for the "<default>"
+file.
+
+Fix mk_cmds's error reporting so that it is unambiguous that it is the
+mk_cmds script which is generating the error. (Obviates Gentoo patch:
+e2fsprogs-1.32-mk_cmds-cosmetic.patch)
+
+Fix the test suite to use LC_ALL instead of LANG. LC_ALL is the "high
+priority" environment variable that overrides all others, where as
+LANG is the lowest priority environment variable. If LC_ALL is set, it
+doesn't matter whether LANG, LANGUAGE, LC_COLLATE, LC_MESSAGES, and
+the all the rest are set. This will assure that the locale when
+running the test suites is the "C" locale. (Obviates Gentoo patch:
+e2fsprogs-1.38-tests-locale.patch)
+
+
+E2fsprogs 1.40 (June 29, 2007)
+==============================
+
+Fix divide by zero error in blkid's NTFS probing logic.
+
+Add new blkid -g option which causes the blkid cache to be garbage
+collected.
+
+Fix a bug in libblkid which could cause the internal field bid_type to
+become corrupted. Fortunately bid_type isn't used much, and bid_label
+and bid_uuid is only used by debugging code, so the impact of this bug
+was very minor.
+
+Mke2fs will now store the RAID stride value when a filesystem is
+created with a requested RAID stride, and then use it automatically in
+resize2fs.
+
+Mke2fs has a sanity check added to make sure (inode_size * num_inodes)
+isn't too big. In some cases Lustre users have tried specifying an
+inode size of 4096 bytes, while keeping an inode ratio of one inode
+per 4096 bytes.
+
+Improve sanity check in e2fsck's algorithm for finding a backup
+superblock, so that it won't accidentally find a superblock that was
+located in the journal, and then later reject it as being not a valid
+backup superblock.
+
+Fix e2fsck get_size logic so that it will work with the Linux floppy
+driver. The Linux floppy driver is a bit different from the other
+block device drivers, in that if the device has been opened with
+O_EXCL, it disallows another open(), even if the second open() does
+not have the O_EXCL flag. (Addresses Debian Bug: #410569)
+
+Fix error checking of badblock's last-block and start-block arguments.
+(Addresses Debian Bug: #416477)
+
+Fix e2fsck so that it doesn't overwrite the backup superblocks when
+recovering a journal until the master superblock has been confirmed as
+being sane.
+
+Change the blkid library to be much more paranoid about concluding
+that a partition contains an NTFS filesystem, and fetch the UUID and
+LABEL information from NTFS filesystems. (Addresses Launchpad Bug:
+#110138)
+
+Factor out the code which sets the default journal size and move it
+into libext2fs.
+
+Enhance e2fsck so it will recreate the ext3 journal if the original
+journal inode was cleared to due it being corrupt after finishing the
+filesystem check.
+
+Fix e2fsck so that it updates the journal inode if it is corrupted and
+the backup journal information from the superblock was successfully
+used to recover the filesystem.
+
+Fix e2fsck so that it checks all of the blocks in the journal inode
+for validity. The original code only checked the direct blocks to
+make sure the journal inode was sane. Unfortunately, if some or all
+of the indirect or doubly indirect blocks were corrupted, this would
+not be caught.
+
+Add support in blkid to detect LUKS encrypted partitions.
+
+Add extra sanity checks for extended attributes in the case where the
+size is zero but the offset is very large.
+
+Fix byte-swapping issues for large inodes in ext2fs_read_inode_full()
+and ext2fs_get_next_inode_full().
+
+Clarify the copyright licenses used by the various libraries in
+the top-level COPYING file (Red Hat Bugzilla: 166058)
+
+Make mke2fs's defaults when /etc/mke2fs.conf doesn't exist more sane.
+
+Fix mke2fs and debugfs to support large (> 16 bit) uid's and gid's.
+
+Remove check in e2fsck which requires EA's in inodes to be sorted;
+they don't need to be sorted, and e2fsck was previously wrongly
+clearing unsorted EA's stored in the inode structure.
+
+Allow mke2fs or tune2fs to create a substantially larger journal (up
+to 10,240,000 blocks).
+
+Fix MD superblock detection, and make sure the correct UUID is
+reported from the MD superblock.
+
+Fix a signed vs. unsigned bug in debugfs.
+
+Enhance debugfs's date parser so that it accepts integer values.
+
+Fix e2fsck's pass1c accounting so it doesn't terminate too early if a
+file with multiply claimed blocks is hard linked. or not at all if the
+root directory contains shared blocks
+
+Enhance debugfs so it can modify the block group descriptors using the
+command set_block_group_descriptor.
+
+Improve e2fsck's reporting of I/O errors so it's clearer what it was
+trying to do when an error happens
+
+Fix a bug in in how e2fsprogs byte swaps inodes containing fast
+symlinks that have extended attributes. (Addresses Red Hat Bugzilla:
+#232663 and LTC Bugzilla: #27634)
+
+Fix potential file descriptor leak in ext2fs_get_device_size() in an
+error case.
+
+Add libreadline.so.5 support to libss.
+
+Improve badblocks -n/-w exclusive usage message.
+
+Fix dump_unused segfault in debugfs when a filesystem is not open
+
+Fix memory leak in blkid library. (Addresses Debian Bug: #413661)
+
+Allow the debugfs lcd command to work w/o a filesystem being open.
+(Addresses LTC Bugzilla #27513)
+
+Fix e2fsck to clear i_size for special devices with a bogus i_blocks
+field on the first pass.
+
+Fix e2fsck to set the file type of the '..' entry when connecting
+a directory to lost+found. (Addresses Lustre Bug: #11645)
+
+Enhance e2fsck to recover directories whose modes field were corrupted
+to look like special files. This is probably only useful in
+artificial test cases, but it will be useful if we ever do the "inodes
+in directory" idea for ext4.
+
+Allow debugfs to dump (and rdump) > 2GB files. (Addresses Debian Bug:
+#412614)
+
+Fix resize2fs parsing of size parameter (in sector units). This was
+actually a bug in libe2p's parse_num_blocks() function. When handling
+the 's' suffix, it was ignoring the blocksize information passed in
+from the caller and always interpreting the number in terms of a 1k
+blocksize. (Addresses Debian Bug: #408298)
+
+There was a floating point precision error which could cause e2fsck to
+loop forever on really big filesystems with a large inode count.
+(Addresses Debian Bug: #411838)
+
+Fix memory leak in ext2fs_write_new_inode()
+
+Add support for using a scratch files directory to reduce e2fsck's
+memory utilization on really big filesystems. This uses the TDB
+library. See the [scratch_files] section of the e2fsck.conf man page
+for more details.
+
+Fixed type-punning bug which caused dumpe2fs to crash on the Arm
+platform (Addresses Debian Bug: #397044)
+
+Add explanatory message to badblocks that -n and -w are mutually exclusive
+(Addresses Debian Bug: #371869)
+
+Allow debugfs and dumpe2fs to support fs features under development.
+
+Add support for the new flag EXT2_FLAG_SOFTSUPP_FEATURES flag to
+ext2fs_open() , which allows application to open filesystems with features
+which are currently only partially supported by e2fsprogs.
+
+Allow unix_io to support offsets greater than 2G (Addresses
+SourceForge Bug: #1547922)
+
+Fixed overflow and signed/unsigned problems caused by the number of
+blocks or inodes exceeding 2**31 or being close to 2**32-1.
+
+Add support for unsigned directory hash calculations with hints in the
+superblock to fix cross-architectural portability for htree
+directories with filenames where the high 8th bit is set. (Addresses
+Debian: #389772)
+
+Fix resize2fs so that it gives user-intelligible error messages if the
+filesystem or the kernel does not support on-line resizing.
+(Addresses Debian Bug: #380548)
+
+Require mke2fs -F -F for really dangerous operations, since -F is
+needed for less dangerous operations such as creating filesystems
+images in regular files, or creating filesystems on whole block
+devices. These relatively innocuous usages should NOT be confused
+with running mke2fs on an apparently-mounted or in-use filesystem.
+
+Allow the default inode size to be specified into the mke2fs.conf
+file.
+
+Make the smallest default journal size is big enough so that on-line
+resizing should always work.
+
+Fix silly spelling error in e2fsck. (Addresses SourceForge bug:
+#1531372)
+
+Fix debugfs coredump when lsdel is run without an open filesystem
+(Addresses Debian Bug: #378335)
+
+Fix debugfs display bug us that bytes that have the high bit set are
+displayed as "ec" instead of "ffffffec".
+
+Add support in lsattr so it will display the EXT4_EXTENTS_FL flag.
+
+Device mapper scanning wasn't working in the blkid library because the
+pathnames had an extra "/dev" when they were being probed.
+
+Add GFS/GFS2 support to the blkid library.
+
+Fix blkid support of empty FAT filesystem labels.
+
+Avoid recursing forever (or for a long time) when the blkid library
+searches for a device and there are symlinks to directories in /dev.
+
+Avoid unaligned halfword access in blkid when accessing FAT
+superblocks, as this will cause Sparc/Solaris systems to throw a
+SIGBUS error.
+
+The latest devmapper libraries requires pthreads, add -lpthreads to
+the static link libraries for e2fsck.static if devmapper is enabled.
+(Addresses Debian bug: #388718)
+
+Improve the (non-installed, for experts only) findsuper program by
+printing the uuid and label from the superblocks, as well as the
+starting and ending offsets of the filesystem given the information in
+the superblock. Omit by default printing superblocks that are likely
+found in located in an ext3 journal unless an explicit -j option is
+given.
+
+Updated Spanish, French and Dutch translations and added Catalan
+translation. (Addresses Debian bug: #411562)
+
+Use FreeBSD's DIOCGMEDIASIZE and DIOCGDINFO ioctls if available when
+determining a partition's size, since binary searching to determine
+the device doesn't work on FreeBSD.
+
+Documentation about UUID's is available in enough places, and it's
+awkward to deal with debian-legal's insanities. So I'm caving in the
+"more-lunatic-than-RMS" wing of Debian by removing RFC-4122 so we
+don't have do the dfsg tarball. Also remove the rule that only tried
+to install RFC-4122 on Ubuntu, since Ubuntu seems to want to fetch
+e2fsprogs exclusively from Debian. (Addresses Debian Bug: #407107)
+
+Fix the info-dir line so that the menu name does not contain a .info
+prefix. First of all, it's ugly, secondly, it causes the install-info
+command to fail to remove the com_err info file from the
+/usr/share/info/dir file when the comerr-dev package is removed and
+purged. (Addresses Debian Bug: #401711)
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses Debian Bug: #369761, #373004, #379695)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs #389554, #390664, #413208, #419605,
+#408352, #415560, #399155)
+
+
+Programmer's notes:
+-------------------
+
+E2fsck now supports the %It expansion when printing a problem report.
+It will print the type of the inode in the problem context.
+
+Fix misc/Makefile.in so that it builds even if e2fsck hasn't been built yet
+(Addresses Sourceforge Bug: #1565561)
+
+Remove unused variables and other lint/gcc -Wall cleanups
+
+Add check to ext2fs_get_device_size() so it will return EFBIG for for
+filesystems contained in regular files where the filesystem image size
+is returned by stat64().
+
+Set local environment variables to C so mk_cmds and compile_et always
+work. (Addresses SourceForge Bug: #1532177)
+
+Added the 64-bit byte swapping function ext2fs_swab64().
+
+Added two new helper functions to prevent 2**31/2**32-1 overflow
+problems: ext2fs_div_ceil() and e2p_percent().
+
+Create new ext2fs library inline functions ext2fs_group_first_block()
+and ext2fs_group_last_block() in order to calculate the starting and
+ending blocks in a block group.
+
+Create the generated files read-only to remind developers not to edit them.
+
+Add support for autoconf 2.60 (with backwards compatibility for older
+versions of autoconf).
+
+Added an "make rpm" target to top-level Makefile
+
+Added various FreeBSD portability fixes.
+
+Exclude mercurial files from the RPM build tree to speed up copy/build.
+
+Use root_sysconfdir to define the locations of mke2fs.conf and
+e2fsck.conf instead of using a hard-coded /etc pathname.
+
+Prevent e2fsck.h and ext2_ext_attr.h from getting included multiple times.
+
+Fixed "make clean" in blkid's Makefile.in file from removing tst_*.c files.
+
+If diff -u is supported, use it to report test failures.
+
+Updates/improvements to RPM spec file
+
+Add on-disk format definitions for the following new features:
+EXT4_FEATURE_RO_COMPAT_HUGE_FILE, EXT4_FEATURE_RO_COMPAT_GDT_CSUM,
+EXT4_FEATURE_RO_COMPAT_DIR_NLINK, EXT4_FEATURE_INCOMPAT_64BIT,
+EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE
+
+Add a new make target "checked-failed" in the tests directory which
+reruns any failed tests
+
+Update draft-leach-uuids-guids-01.txt with rfc4122.txt
+
+Fix miscellaneous bugs reported by Coverity: Dead code, potential nul
+pointer dereferences, memory leaks, etc. None were security-critical
+problems.
+
+Fix up usage and decrement error messages in the test_icount program
+
+Add debugging code to the com_err library; if the environment variable
+COMERR_DEBUG is set to 1, print out debugging messages as error tables
+are added and removed from the com_err library. If the
+COMERR_DEBUG_FILE environment variable is set (and the process is not
+setuid) the debugging messages may be redirected to a file.
+
+Change all of the e2fsprogs programs to use the newer add_error_table()
+and remove_error_table() interfaces instead of the much older
+initialize_*_error_table() function.
+
+Add TDB support into the ext2fs library. This allows us to have a
+guaranteed library we can count on always being present so we can
+store data in an on-disk database.
+
+Add support for using TDB to store the icount data, so we don't run out
+of memory when checking really large filesystems.
+
+Change the regression test suite so that it skips empty test directories.
+
+Define the l_i_iversion field in ext2_inode. The l_i_version field is
+now defined from the old l_i_reserved1 field in the ext2 inode. This
+field will be used to store high 32 bits of the 64-bit inode version
+number.
+
+Add Makefile production rule for e2fsprogs.spec in case it gets
+deleted.
+
+Add new function profile_get_uint() to allow for a clean way to fetch
+unsigned integers from the context.
+
+Add test to make sure the ext2 superblock structure is 1024 bytes.
+
+Fix typo in name of f_dup4 regression test
+
+Add new function blkid_gc_cache() which performs a garbage collection
+pass on the /etc/blkid.tab file.
+
+The ext2fs_open() function now sets EXT2_FLAG_MASTER_SB_ONLY. In
+general, only e2fsck (after the filesystem is clean), tune2fs, and
+resize2fs should change the backup superblocks by default. Most
+callers of ext2fs_open() should not be touching any superblock fields
+which require the backups to be touched.
+
+Add new function to libext2fs, ext2fs_default_journal_size(), which
+returns the default journal size.
+
diff --git a/doc/RelNotes/v1.41.txt b/doc/RelNotes/v1.41.txt
new file mode 100644
index 0000000..e36e35d
--- /dev/null
+++ b/doc/RelNotes/v1.41.txt
@@ -0,0 +1,1594 @@
+E2fsprogs 1.41.14 (December 22, 2010)
+=====================================
+
+Fix spurious complaint in mke2fs where it would complain if the file
+system type "default" is not defined in mke2fs.conf.
+
+The resize2fs program will no longer clear the resize_inode feature
+when the number reserved group descriptor blocks reaches zero. This
+allows for subsequent shrinks of the file system to work cleanly for
+flex_bg file systems.
+
+The resize2fs program now handles devices which are exactly 16T;
+previously it would give an error saying that the file system was too
+big.
+
+E2fsck (and the libext2fs library) will not use the extended rec_len
+encoding for file systems whose block size is less than 64k, for
+consistency with the kernel.
+
+Programming notes
+-----------------
+
+E2fsprogs 1.41.13 would not compile on big-endian systems. This has
+been fixed. (Addresses Sourceforge Bug: #3138115)
+
+The ext2fs_block_iterator2() function passed an incorrect ref_offset
+to its callback function in the case of sparse files. (Addresses
+Sourceforge Bug: #3081087)
+
+Fix some type-punning warnings generated by newer versions of gcc.
+
+
+E2fsprogs 1.41.13 (December 13, 2010)
+=====================================
+
+E2fsck now supports the extended option "-E journal_only", which
+causes it to only do a journal replay. This is useful for scripts
+that want to first replay the journal and then check to see if it
+contains errors.
+
+E2fsck will now support UUID= and LABEL= specifiers for the -j option
+(which specifies where to find the external journal). (Addresses
+Debian Bug #559315)
+
+E2fsck now has support for the problems/<problem code>/force_no
+configuration option in e2fsck.conf, which forces a problem to not be
+fixed.
+
+Dumpe2fs will now avoid printing large negative offsets for the bitmap
+blocks and instead print a message which is a bit more helpful for
+flex_bg file systems.
+
+Mke2fs will now check the file system type (specified with the -t
+option) to make sure it is defined in the mke2fs.conf file; if it is
+not, it will print an error and abort. If the usage type (specified
+with the -T option) is not defined in mke2fs.conf, mke2fs will print a
+warning but will continue. (Addresses Debian Bug #594609)
+
+Clarified error message from resize2fs clarifying that on-line
+shrinking is not supported at all. (Addresses Debian Bug #599786)
+
+Fix an e2fsck bug that could cause a PROGRAMMING BUG error to be
+displayed. (Addresses Debian Bug #555456)
+
+E2fsck will open the external journal in exclusive mode, to prevent
+the journal from getting truncated while it is in use due to a user
+accidentally trying to run e2fsck on a snapshotted file system volume.
+(Addresses Debian Bug #587531)
+
+Fix a bug in e2fsck so it has the correct test for the EOFBLOCKS_FL
+flag.
+
+The tune2fs program can now set the uninit_bg feature without
+requiring an fsck.
+
+The tune2fs, dumpe2fs, and debugfs programs now support the new ext4
+default mount options settings which were added in 2.6.35.
+
+The e2fsck and dumpe2fs programs now support the new ext4 superblock
+fields which track where and when the first and most recent file
+system errors occurred. These fields are displayed by dumpe2fs and
+cleared by e2fsck. These new superblock fields were added in 2.6.36.
+
+Debugfs now uses a more concise format for listing extents in its
+stat command. This format also includes the interior extent tree
+blocks, which previously was missing from stat's output for
+extent-based files.
+
+Debugfs has a new option, -D, which will request Direct I/O access of
+the file system.
+
+Mke2fs will skip initializing the inode table if a device supports
+discard and the discard operation will result in zero'ed blocks.
+
+Badblocks will now correctly backspace over UTF-8 characters when
+displaying its progress bar. (Addresses Gentoo Bug #309909; Addresses
+Debian Bugs #583782 and #587834)
+
+E2freefrag will now display the total number of free extents.
+
+Resize2fs -P no longer requires a freshly checked filesystem before
+printing the minimum resize size.
+
+Fixed a floating point precision error in a binary tree search routine
+that can lead to seg fault in e2fsck and resize2fs.
+
+Fixed a bug in e2fsck where if both the original and backup superblock
+are invalid in some way, e2fsck will fail going back to the original
+superblock because it didn't close the backup superblock first, and
+the exclusive open prevented the file system from being reopened.
+
+Fixed a big in e2freefrag which caused getopt parsing to fail on
+architectures with unsigned chars. (Addresses Gentoo Bug: #299386)
+
+Clarified an mke2fs error message so a missed common in an -E option
+(i.e., mke2fs -t ext4 -E stride=128 stripe-width=512 /dev/sda1")
+results in a more understandable explanation to the user.
+
+Mke2fs now displays the correct valid inode ratio range when
+complaining about an invalid inode ratio specified by the user.
+
+Mke2fs now understands the extended option "discard" and "nodiscard",
+and the older option -K is deprecated. The default of whether
+discards are enabled by default can be controlled by the mke2fs.conf
+file.
+
+Mke2fs's handling of logical and physical sector sizes has been
+improved to reflect the fact that there will be some SSD's with 8k and
+16k physical sectors arriving soon. Mke2fs will no longer force block
+size to be the physical sector size, since there will be devices where
+the physical sector size is larger than the system's page size, and
+hence larger than the maximal supported block size. In addition, if
+the minimal and optimal io size are not exported by the device, and
+the physical sector size is larger than the block size, the physical
+sector size will be used to set the Raid I/O optimization hints in the
+superblock.
+
+E2fsck will now display a better, more specific error message when the
+user enters a typo'ed device name, instead of blathering on about
+alternate superblocks.
+
+Fixed various Debian Packaging Issues
+
+Updated/clarified man pages (Addresses Debian Bugs: #580236, #594004,
+#589345, #591083; Addresses Launchpad Bug: #505719)
+
+Update the Chinese, Chzech, Dutch, French, Germany, Indonesian,
+Polish, Swedish, and Vietnamese translations.
+
+
+Programmer's Notes
+------------------
+
+Fix a dependency definition for the static and profiled blkid
+libraries which could cause compile failures in some configurations.
+(Addresses Debian Bug: #604629)
+
+Add support for Direct I/O in the Unix I/O access layer.
+
+Fixed a memory leak in the Unix I/O layer when changing block sizes.
+
+Fixed minor memory leaks in mke2fs.
+
+Added a new function to the ext2fs library, ext2fs_get_memalign().
+
+The tst_super_size test program will check to make sure the superblock
+fields are correctly aligned and will print them out so they can be
+manually checked for correctness.
+
+Fixed some makefile dependencies for test programs in lib/ext2fs.
+
+Reserved the feature flags and superblock fields needed for the Next3
+snapshot feature.
+
+Reserved the feature flags for EXT4_FEATURE_INCOMPAT_DIRDATA and
+EXT4_INCOMPAT_EA_INODE.
+
+
+E2fsprogs 1.41.12 (May 17, 2010)
+================================
+
+Mke2fs now gives a correct error message if the external journal
+device is not found. (Addresses Red Hat Bug #572935)
+
+Resize2fs -P will now refuse to print a minimum size if the file
+system is not clean. Previously it would go ahead and print a minimum
+size anyway, which might not be correct, leading to user confusion.
+
+E2fsck now tests for extents that begin at physical block 0 and
+rejects them as invalid. (Addresses Google Bug: #2573806)
+
+Fixed a bug in e2fsck which could cause it to crash when trying to
+remove an invalid extent and the block bitmaps hadn't yet been loaded.
+(Addresses SourceForge Bug: #2971800)
+
+E2fsck now will completely skip time-based checks if the system clock
+looks insane or the option broken_system_clock is set in
+/etc/e2fsck.conf.
+
+E2fsck would previously report an i_blocks corruption for a 4T file
+created using posix_fallocate; this bug has been fixed.
+
+E2fsck will now correctly mark a sparse journal as invalid and will
+delete and recreate the journal to address the problem.
+
+E2fsck would previously incorrectly ask the user whether she would
+like to abort the file system check after finding a problem --- and
+then abort regardless of the user's answer. This is annoying, and
+has been fixed.
+
+E2fsck can now continue even if it fails to recreate the resize
+inode; previously it would just abort the file system check
+altogether.
+
+E2fsck could potentially remove directory entries for inodes found in
+the unused region of the inode table; this would generally happen on
+ext4 file systems that do not use journalling. This bug has been fixed
+by not clearing these directory entries once it has been established
+that bg_unused_inodes may not be trustworthy; once pass #2 has been
+completed, e2fsck will restart the file system check from the
+beginning, and then it will be safe to delete any directory entries
+pointing to inodes that appear to be deleted. (Addresses Google Bug:
+#2642165)
+
+E2fsck will not try to set the block group checksums if the user
+cancels the fsck with a control-C. It's a bad idea to set the
+checksums if e2fsck hasn't been completed, and it often results an the
+error message, "Inode bitmap not loaded while setting block group
+checksum info". (Addresses Launchpad Bug: #582035)
+
+The mke2fs program now queries the kernel for the physical as well as
+the logical sector size, and will not allow a blocksize below the
+logical, and will strongly encourage a blocksize at least as big as
+the physical blocksize. This is needed for 4k sector drives that
+emulate 512 byte sector sizes.
+
+Mke2fs will now allow a flex_bg size of 1. This is unusual, and
+rarely needed, but it is a legal value.
+
+E2fsck will check for cases where the EOFBLOCKS_FL is set when it is
+not needed, and offer to clear it; this is a sign of a kernel bug, but
+more importantly, some released kernels may crash when this situation
+is encountered on ext4 file systems. (Addresses Google Bug: #2604224)
+
+E2fsck will use the EOFBLOCKS_FL flag exclusively to check whether
+i_size is correct. (Kernels starting with 2.6.34 will set
+EOFBLOCKS_FL.)
+
+The com_err library will now only output ^M (a CR character) when the
+tty is in raw mode.
+
+Update the Czech, Chinese, Dutch, French, Germany, Indonesian, Polish,
+and Vietnamese translations.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #571247, #563487)
+
+
+Programmer's Notes
+------------------
+
+The regression test suite now uses its own mke2fs.conf file, so that
+downstream distributions want change the mke2fs.conf file which is
+distributed in the RPM or dpkg file, without worrying about screwing
+up the regression test results.
+
+Always build namei.o so that building with configure --disable-debugfs
+works correctly. Long-term, if we care about reduced e2fsprogs
+builds, we need a more general solution for deciding what .o files are
+needed for a particular build. Given that install floppies are going
+(gone?) the way the dodo bird, we probably don't care, though.
+(Addresses Sourceforge Bug: #2911433)
+
+Add configure options --enable-symlink-build and
+--enable-symlink-install, which allow e2fsprogs be built using
+symlinks instead of hard links, and to be installed using symlinks
+instead of hard links, respectively. It is useful when the file
+system where the build is taking place, or the file system where
+e2fsprogs is installed, can't handle hard links for some reason.
+(Addresses Sourceforge Bug: #1436294)
+
+Fixed compile warning in mke2fs.c.
+
+
+E2fsprogs 1.41.11 (March 14, 2010)
+==================================
+
+E2fsck will no longer give a fatal error and abort if the physical
+device has been resized beyond 2**32 blocks. (Addresses Launchpad
+Bug: #521648)
+
+Debugfs has a bug fixed so that "logdump -b <blk>" now properly shows
+the allocation status of the block <blk>. (Addresses Debian Bug:
+#564084)
+
+E2fsck now prints a much more emphatic and hopefully scary message
+when a file system is detected as mounted while doing a read/write
+check of the filesystem. Hopefully this will dissuade users from
+thinking, "surely that message doesn't apply to *me*" :-(
+
+E2fsck -n will now always open the file system read-only. We now
+disallow certain combination of options which previously were manual
+exceptions; this is bad because it causes users to think they are
+smarter than they really are. So "-n -c", "-n -l", "-n -L", and "-n
+-D" are no longer supported. (Addresses Launchpad Bug: #537483)
+
+In e2fsprogs 1.41.10, mke2fs would ask for confirmation to proceed if
+it detected a badly aligned partition. Unfortunately, this broke some
+distribution installation scripts, so it now just prints the warning
+message and proceeds. (Addresses Red Hat Bug: #569021. Addresses
+Launchpad Bug: #530071)
+
+Mke2fs would take a long time to create very large journal files for
+ext4. This was caused by a bug in ext2fs_block_iterate2(), which is
+now fixed.
+
+E2fsck now understands the EOFBLOCKS_FL flag which will be used in
+2.6.34 kernels to make e2fsck not complain about blocks deliberately
+fallocated() beyond an inode's i_size.
+
+E2fsprogs 1.41.10 introduced a regression (in commit b71e018) where
+e2fsck -fD can corrupt non-indexed directories when are exists one or
+more file names which alphabetically sort before ".". This can happen
+with ext2 filesystems or for small directories (take less than a lock)
+which contain filenames that begin with a space or some other
+punctuation mark. (Addresses Debian Bug: #573923, Addresses Launchpad
+Bug: #525114)
+
+
+Programmer's Notes
+------------------
+
+Add new test, f_rehash_dir, which checks to make sure e2fsck -D works
+correctly.
+
+The libcom_err function now has support for Heimdal's com_right_r
+function(). (Addresses Sourceforge Bug: #2963865, Addresses Debian
+Bug: #558910)
+
+
+E2fsprogs 1.41.10 (February 7, 2010)
+====================================
+
+Fix resize2fs bug which causes it to access invalid memory.
+
+Add libss support for libreadline.so.6.
+
+Fix e2fsck's check for extent-mapped directory with an incorrect file
+type.
+
+Add new e2fsck.conf configuration option, default/broken_system_clock
+to support systems with broken CMOS hardware clocks. Also, since too
+many distributions seem to have broken virtualization scripts now,
+e2fsck will by default accept dates which are off by up to 24 hours by
+default. (Addresses Debian Bugs: #559776, #557636)
+
+Fix a bug where mke2fs may not use the best placement of the inode
+table when there is only room for a single block group in the last
+flex_bg.
+
+E2fsck is now smarter when it needs to allocate blocks in the course
+of fixing file system problems. This reduces the number of spurious
+differences found in pass #5.
+
+E2fsck will no longer rehash directories which fit in a single
+directory block.
+
+E2fsck now correctly handles holes in extent-mapped directories (i.e.,
+sparse directories which use extents).
+
+Fix big-endian problems with ext2fs_bmap() and ext2fs_bmap2().
+
+Fix a bug in filefrag where on platforms which can allow file systems
+with 8k blocks, that it doesn't core dump when it sees a file system
+with 8k block sizes. (Thanks to Mikulas Patocka for pointing this
+out.)
+
+E2fsck will correctly fix directories that are have an inaccurate
+i_size as well as other problems in a single pass, instead of
+requiring two e2fsck runs before the file system is fully fixed.
+
+Fix e2fsck so it will correctly find and detect duplicate directory
+entries for non-indexed directories. ( Addresses Sourceforge Bug:
+#2862551)
+
+Mke2fs will use BLKDISCARD to pre-discard all blocks on an SSD or
+thinly-provisioned storage device. This can be disabled using the -K
+option.
+
+Enhance libext2fs so it works around bug in Linux version 2.6.19
+and earlier where the /proc/swaps file was missing the header on
+the first line.
+
+Fix bug in Linux version 2.6.19 and earlier where the /proc/swaps file
+was missing the header on the first line.
+
+Fix some big-endian bugs in e2fsck and libext2fs.
+
+Fix resize2fs so it works correctly on file systems with external
+journals instead of failing early with the error "Illegal inode
+number".
+
+Fix libss so that it does not seg fault when using a readline library
+which does not supply a readline_shutdown() function.
+
+Updated dumpe2fs's usage message so it correctly gives the right
+arguments summary for "-o superblock=<num>" and "-o blocksize=<num>".
+(Addresses Launchpad Bug: #448099)
+
+Teach libext2fs to ignore the high 32 bits of the i_blocks field
+when huge_file file system feature is set, but the inode does not
+have the HUGE_FILE_FL flag set.
+
+Fix e2fsck's handling of 64-bit i_blocks fields.
+
+E2fsck will now print "Illegal indirect block", "Illegal
+double-indirect block", etc., instead of "Illegal block #-1" or
+"Illegal block #-2", etc. This makes it easier for users to
+understand what has gone wrong. (Addresses SourceForge Bug: #2871782)
+
+Mke2fs now will obtain get device topology information from blkid and
+use it to populate the superblock stride and stripe sizes. It will
+also warn if the block device is misaligned
+
+Fix file descriptor leaks in fsck and debugfs. (Addresses Novell Bug:
+##524526)
+
+Fix the libext2fs library code to round up the bitmap size to a 4-byte
+boundary, to prevent spurious seg faults caused by the x86
+architecture. This doesn't affect Linux systems, but was a major
+problem on a number of *BSD systems. (Addresses Sourceforge Bug:
+#2328708)
+
+Fix resize2fs's minimum size required for a file system so it doesn't
+fail when "resize2fs -M" is run. (Addresses RedHat Bugzilla: #519131)
+
+Dumpe2fs now prints summary information about the contents of the
+journal.
+
+Avoid printing scary error messages when e2fsck starts running
+problems on low-memory systems, as it tends to panic and mislead the
+user. (Addresses Debian Bug: #509529)
+
+Fix blkid's modules.dep parser so it handles compressed (.ko.gz)
+modules files. (Address Red Hat Bug: #518572)
+
+Fix tune2fs so it can add a journal when an extent-enabled file system
+is mounted. (Addresses Launchpad bug: #416648)
+
+Update Czech, Indonesian, Polish and Vietnamese translations (from the
+Translation Project).
+
+Update/clarify man pages. (Addresses Sourceforge Bug: #2822186)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #540111)
+
+Programmer's Notes
+------------------
+
+The configure script supports the --with-cc, --with-ccopts, and
+--with-ldopts options. Instead, the more standard use of CC=,
+CCFLAGS=, and LDFLAGS= in the configure command line is used instead.
+Also, --with-ld, which never worked, was also removed.
+(Addresses Sourceforge Bug: #2843248)
+
+The in-tree header files are only used if the in-tree uuid or blkid
+libraries are used. Otherwise, use the system-provided uuid or blkid
+header files if using the system-provided libraries.
+
+Fix some build failures caused by --disable-* configure options.
+
+Work around a bug in autoconf 2.64.
+
+
+E2fsprogs 1.41.9 (August 22, 2009)
+==================================
+
+Fix a bug in e2fsck routines for reallocating an inode table which
+could cause it to loop forever on an ext4 filesystem with the FLEX_BG
+filesystem feature with a relatively rare (and specific) filesystem
+corruption. This fix causes e2fsck to try to find space for a new
+portion of the inode table in the containing flex_bg, and if that
+fails, the new portion of the inode table will be allocated in any
+free space available in the filesystem.
+
+Make e2fsck less annoying by only asking for permission to relocate a
+block group's inode table once, instead of for every overlapping
+block. Similarly, only ask once to recompute the block group
+checksums, instead of once for each corrupted block group's checksum.
+
+Fix filefrag to avoid print the extent header if the FIEMAP ioctl is
+not present, and it needs to fall back to using the FIBMAP ioctl.
+
+Fix filefrag to correctly print the number of extents for zero-length
+files. (Addresses Debian Bug: #540376)
+
+Filefrag now has a -B option which forces the use of the FIBMAP ioctl
+to more easily debug the FIBMAP code.
+
+Fixed filefrag for non-extent based files.
+
+Add a new program, e2freefrag, which displays information about the
+free space fragmentation in an ext2/3/4 filesystem.
+
+Fix inode resizing via tune2fs -I so that it works correctly in the
+face of non-empty bad blocks inodes, and if the filesystem was
+formatted using the "mke2fs -E stride=N" option for RAID arrays.
+
+Fix regression in ext2fs_extent_set_bmap() caused e2fsck -fD to fail
+and corrupt large directories if the directory needs to shrink by more
+than one block. (Addresses Debian Bug: #537510)
+
+Fix e2fsck's buggy_init_scritps=1 so that the if the last write and/or
+last mount times are in the future, they are corrected even if
+buggy_init_scripts is set. This is needed because otherwise resize2fs
+will refuse to resize the filesystem, even after running "e2fsck -f".
+(Addresses Launchpad bug: #373409)
+
+E2fsck will now print much fuller information when the last mount time
+or last written time is in the future, since most people can't seem to
+believe their distribution has buggy init scripts, or they have a
+failed CMOS/RTS clock battery.
+
+Enhance dumpe2fs to dump the extent information via the 'stat'
+command, and more detailed extent information via the new command
+'dump_extents'.
+
+Update French, Polish, Czech, and Swedish translations from the
+Translation Project.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details.
+
+Programmer's Notes
+------------------
+
+Fixed miscellaneous gcc -Wall warnings.
+
+Fixed memory leak in error path in ext2fs_block_iterate2()
+
+Fixed non-Linux build of the intl directory by adding support for the
+E/Q/V macros.
+
+The bitmap read/write functions now treat uninitialized bitmaps as
+unallocated; this fixes a number of problems in all e2fsprogs for ext4
+filesystems when there is a need to allocate new blocks or inodes, and
+there aren't any free blocks or inodes in the already-used block
+groups.
+
+Improve ext2fs_extent_set_bmap() to avoid creating new extents which
+get inserted into the extent tree when they are not needed.
+
+
+E2fsprogs 1.41.8 (July 11, 2009)
+================================
+
+Fix resize2fs's online resizing, fixing a regression which in
+e2fpsrogs 1.41.7. (Addresses Debian Bug: #535452)
+
+Fix potential filesystem corruptions caused by using resize2fs to
+shrinking ext4 filesystems with extents enabled. (Addresses Red Hat
+Bug: #510379)
+
+Optimize uuid_generate() to avoid running uuidd if it is not setuid or
+setgid and the currently running program doesn't have write access to
+the uuidd work directory.
+
+Add safety checks (for non-Linux systems) so that uuidd isn't run with
+file descriptors 0, 1, and 2 closed; and if they are closed, uuidd
+will be careful not to close the file descriptor for its unix domain
+socket when it detaches itself from the controlling tty. Also add
+safety checks so that if the unix domain socket between the uuid
+library and uuidd program is closed for any reason, both the library
+and the uuidd will return an appropriate error code instead of looping
+in an infinite loop.
+
+The e2croncheck script, which creates an LVM snapshot and then checks
+the ext3/4 filesystem via the LVM snapshot, has been added to the
+contrib directory.
+
+Fix the filefrag program for files that have more than 144 extents.
+
+Update French, Polish, Czech, Indonesian, and Swedish translations from
+the Translation Project.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bug #535530)
+
+Update/clarify man pages.
+
+Programmer's Notes
+------------------
+
+Fix compilation problem when configured with --disable-uuid.
+
+Don't build uuidgen if configured with --disable-uuid.
+
+Add the new library function ext2fs_test_inode_bitmap_range(), and
+optimized ext2fs_test_block_bitmap_range(), which will be needed for
+future optimizations for e2fsck.
+
+Fix makefile dependencies for libcom_err so that the Makefiles work
+well on non-GNU make program. (Addresses Sourceforge Patches: #2813809)
+
+Enhance the build system so that the full set of commands executed by
+the Makefiles are displayed, instead of the Linux kernel summary
+output, if the build was configured with --enable-verbose-makecmds, or
+if GNU make is in use and the V variable is non-null, i.e., via "make
+V=1".
+
+
+E2fsprogs 1.41.7 (June 29, 2009)
+================================
+
+Fix a bug in libext2fs which can cause e2fsck and resize2fs to write
+uninitialized data into the portion of the inode beyond the first 128
+bytes when operating on inodes mapped via extents; potentially
+corrupting filesystems.
+
+Fix memory leaks in e2fsprogs, including a very large memory leak
+which can cause e2fsck to run out of memory when checking very large
+filesystems using extents.
+
+The logsave program will now filter out the ^A and ^B characters when
+writing to the console.
+
+Harden ext2fs_validate_entry() so that lsdel will not read beyond the
+end of the block even if the directory block is corrupted.
+
+Fix debugfs from core dumping if the logdump command fails to open the
+output file.
+
+Enhance badblocks to print the currently tested block number when
+interrupted with ^C.
+
+Fix lsattr to exit with a non-zero status when it encounters errors.
+(Addresses RedHat Bugzilla #489841)
+
+Fix e2fsprogs to use the same encoding for rec_len in 64k (and larger)
+filesystems as the kernel when encoding rec_len >= 64k. For 64k
+filesystems (currently all that is supported by e2fsprogs, this is
+only a minor corner case).
+
+Resize2fs will now update the journal backup fields in the superblock
+if the journal is moved; this avoids an unnecessary full fsck after
+resizing the filesystem. (Addresses RedHat Bugzilla: #505339)
+
+Fix libext2fs to properly initialize i_extra_size when creating the
+journal and resize inodes.
+
+Change badblocks to allow block sizes larger than 4k.
+
+Fix the filefrag program so it correctly checks for errors from the
+fiemap ioctl.
+
+Update Chinese and Czech translation from the Translation Project.
+
+Clean up various man pages. (Addresses Debian Bug #531385 and #523063)
+
+
+Programmer's Notes
+------------------
+
+Add --disable-libuuid option to configure which uses an in-system
+installed version of libuuid; the private version is enabled by
+default.
+
+Add --valgrind-leakcheck option to the test_script program which runs
+valgrind with the appropriate options to find memory leaks.
+
+
+E2fsprogs 1.41.6 (May 30, 2009)
+===============================
+
+Fix a critical regression in e2fsck introduced version 1.41.5 which
+can undo updates to the block group descriptors after a journal replay.
+
+If e2fsck receives an I/O error while replaying the journal, prompt
+the user whether they want to ignore the error or not; if e2fsck is
+run in preen mode, force fsck to abort the preen pass.
+
+Fix a bug which would cause e2fsck to core dump if the filesystem
+contains a corrupt extent header, and the user declines to clear the
+inode. (Addresses Sourceforge Bug: #2791794)
+
+Fix e2fsck to restart only once in the case of multiple block groups
+which inodes in use that are in the uninitialized part of the block
+group's inode table.
+
+To reduce user confusion, if the /etc/mtab file is missing
+ext2fs_check_mount_point and ext2fs_check_if_mounted will return a
+new, explicit error code to indicate this case. This will cause
+e2fsck to give a clearer error message when the user is using buggy
+rescue CD's that don't properly set up /etc/mtab. (Addresses Debian
+Bug: #527859)
+
+Fix e2fsck so that if the primary group descriptors are corrupted, but
+the backup superblock is entirely invalid, to go back to using (and
+fixing) the primary group descriptors instead of completely giving up
+on the filesystem. (Addresses Debian Bug: #516820)
+
+Change e2fsck to not abort a preen pass if an inode is found to have
+i_file_acl_hi non-zero. Ext3 filesystems don't care, and newer
+kernels (post 2.6.29) will ignore this field. So let's fix it
+automatically during the preen pass instead of forcing the user to fix
+this up manually. (Addresses Debian Bug: #526524)
+
+Add resource tracking for e2fsck passes 1b through 1d.
+
+Speed up e2fsck by eliminating unnecessary journal checks if the
+filesystem is already mounted and doesn't need recovery (since the
+kernel would have run the journal when the filesystem was mounted.)
+Also speed up e2fsck by avoiding unnecessary block group descriptor
+updates in ext2fs_close().
+
+Add support to chattr to migrate inodes from using direct/indirect
+blocks to extents.
+
+Avoid corrupting the filesystem if there is an attempt to shrink a
+filesystem using resize2fs smaller than possible by making
+ext2fs_set_bmap() more careful not to delete the old block until the
+new block can be inserted. In addition, fix a bug in how the minimum
+size of the filesystem (plus a safety margin) is calculated, and
+modify resize2fs to refuse to shrink the filesystem below that minimum
+size without the force flag.
+
+Teach blkid to try to figure out DM device names using take advantage
+of information in sysfs when running on kernels (2.6.29 and later)
+which provide this information in /sys/block/dm-<N>/dm/name; this is
+much faster than scanning for the device number in /dev/mapper.
+
+Fix blkid to prefer /dev/mapper/<name> device names instead of the
+private /dev/dm-X names.
+
+Add an -a option to debugfs's close_filesys command which writes any
+changes to the superblock or block group descriptors to all of the
+backup superblock locations.
+
+Add support to the filefrag program to use the FIEMAP ioctl.
+
+Update Chinese translation from the Translation Project.
+
+Clean up various man pages. (Addresses Red Hat Bugzilla: #502971 and
+Launchpad Bug: #381854)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bug #506064)
+
+
+Programmer's Notes
+------------------
+
+Add test code to make sure e2fsck's problem.c doesn't have two problem
+codes assigned to duplicate values.
+
+Avoid using a hard-coded path for /bin/rm in block's test_probe.in.
+(Addresses Sourceforge Bug: #2780205)
+
+Clean up e2fsck by removing #ifdef RESOURCE_TRACK by adding an empty
+function declaration for init_resource_track() and
+print_resource_track() when RESOURCE_TRACK is not defined.
+
+The test code which is used to build the tst_csum program has been
+moved from from tst_csum.c into csum.c under an #ifdef DEBUG to to
+avoid compile problems caused by not having a prototype for
+ext2fs_group_desc_csum(). (Addresses Sourceforge Bug #2484331)
+
+Update the config.guess and config.sub file to the latest from the
+FSF, to allow e2fsprogs to build on the avr32 platform. (Addresses
+Debian Bug: #528330)
+
+Add a new function, ext2fs_extent_open2(), which behaves like
+pext2fs_extent_open(), but uses the user-supplied inode structure
+when opening an extent instead of reading the inode from disk.
+
+
+E2fsprogs 1.41.5 (April 23, 2009)
+=================================
+
+Fix a number of filesystem corruption bugs in resize2fs when growing
+or shrinking ext4 filesystems off-line (i.e., when the ext4 filesystem
+is not mounted).
+
+Debugfs can now set i_file_acl_high via the set_inodes_field command,
+and print a 64-bit file acl. This is useful for debugging filesystem
+corruptions where the high bits of i_file_acl_high are set. E2fsck
+will detect and fix non-zero i_file_acl_high on 32-bit filesystems
+since some Linux kernel versions pay attention to this field even when
+they shouldn't.
+
+Speed up e2fsck when checking clean filesystems by avoiding
+unnecessary block reads, and coalescing the block group descriptor
+blocks so they are read using a single read operation.
+
+The libuuid library will now close all file descriptors before running
+uuidd. This avoids problems when the calling program has open sockets
+which then never get closed because uuidd is a long-running helper
+daemon. (Addresses Launchpad bug: #305057)
+
+In order to avoid unnecessary full filesystem checks by e2fsck after
+an on-line resize, e2fsck will ignore the NEEDS_RECOVERY flag set on
+the backup superblocks. (Addresses Red Hat Bugzilla: #471925)
+
+Mke2fs will avoid trying to create the journal when run in
+superblock-only mode (mke2fs -S), since the left-over journal in the
+inode table will cause mke2fs to fail.
+
+Fix a bug in libext2fs functions that check to see if a particular
+device or filesystem image is mounted, which would cause these
+functions to report that a file identical to the (relative) pathname
+used by a pseudo-filesystem was mounted when in fact it was not.
+
+Update Czech translation from the Translation Project.
+
+Add Chinese (simplified) translation from the Translation Project.
+
+Fix support for external journals (which was broken in e2fsprogs
+1.41.4).
+
+Fix a regression in debugfs where the "stat" command when no
+filesystem was open would cause debugfs to crash with a segmentation
+violation.
+
+Starting in the 2.6.29 linux kernel, the ext4 filesystem driver can be
+used to support filesystems without a journal. Update the blkid
+library so it understands this.
+
+The blkid library will remove an entry from the blkid cache
+representing the entire disk if partitions are found, since presumably
+the device previously had no partition table, but has now transitioned
+to using a partition table.
+
+Add a check to mke2fs and tune2fs that the argument to the -m option
+(which specifies the reserved ratio) must be greater than zero.
+(Addresses Debian Bug: #517015)
+
+Add support for tracking the number kilobytes written to the
+filesystem via the superblock field s_kbytes_written. It will be
+updated by the kernel as well as by e2fsprogs programs which write to
+the filesystem. This is useful for tracking the wear to filesystems
+on Solid State Drives.
+
+Fix compatibility issue in the libext2fs info file and makeinfo
+version 4.12. (Addresses Red Hat Bugzilla: #481620)
+
+Update/clarify man pages. (Addresses Debian Bug: #515693, #365619)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bug: #506279)
+
+Programmer's Notes
+------------------
+
+Fix Hurd compilation problem in e2fsck and tune2fs (Addresses Debian
+Bug: #521602)
+
+Fix various gcc compilation warnings and other programming cleanups.
+(Addresses Red Hat Bugzilla: #486997)
+
+Add support for building the blkid command statically.
+
+Add support for disabling the built-in blkid library in favor of a
+system-installed blkid implementation via the configure option
+--disable-libblkid.
+
+
+E2fsprogs 1.41.4 (January 27, 2009)
+===================================
+
+Fixed a bug which could sometimes cause blkid to return an exit value
+of zero for a non-existent device (Addresses Debian Bug: #502541)
+
+Blkid will now recognize ext3 filesystems that have the test_fs flag
+set as ext3 filesystems.
+
+The blkid library will now recognize btrfs filesystems and swap
+devices currently used by user-level software suspend.
+
+Tune2fs now updates the block group checksums when changing the UUID
+to avoid causing e2fsck to complain vociferously at the next reboot.
+
+Tune2fs's inode size resizing algorithms have been fixed so it is not
+vastly inefficient for moderate-to-large filesystems, due to some
+O(n**2) and O(n*m) algorithms that didn't scale well at all.
+
+Fix tune2fs's inode resizing algorithm so it will not corrupt
+filesystems laid out for RAID filesystems; in addition, tune2fs will
+refuse to change the inode size for filesystems that have the flex_bg
+feature enabled. (This is a limitation in the current implementation
+of tune2fs -I.)
+
+E2fsprogs 1.41 broke debugfs's logdump command for normal ext3/4
+filesystems with 32-bit block numbers, when the headers for 64-bit
+block numbers was added. This regression has been fixed.
+
+Debugfs's ncheck command has been fixed to avoid printing garbage
+characters at the end of file names.
+
+Fix resize2fs for ext4 filesystems. Some blocks that that need moving
+when shrinking filesystems with uninit_bg feature would not be moved.
+In addition, blocks and inode table blocks were not being correctly
+freed when shrinking filesystems with the flex_bg feable, which caused
+resize2fs -M to fail. Finally, when blocks are moved, make sure the
+uninitialized flag in extents is preserved.
+
+Fix bug which caused dumpe2fs to abort with an error if run on a
+filesystem that contained an external journal.
+
+Some distributions used "mke3fs" as an alias for "mkfs.ext3"; check
+for this in argv[0] to provide better legacy support for these
+distributions. This is a practice that should NOT be continued,
+however.
+
+Mke2fs now has a new option -U, which allows the user to specify the
+UUID that should be used for the new filesystem.
+
+Mke2fs will treat devices that are exactly 16TB as if they were 16TB
+minus one block. This allows users who have read that ext3 supports
+up to 16TB filesystems and who create a 16TB LVM to not get confused,
+since the true limit is really 16TB minus one block.
+
+E2fsck will no longer abort an fsck run if block group has an errant
+INODE_UNINIT flag.
+
+E2fsck now distinguishes between fragmented directories and fragmented
+files in verbose mode statistics and in the fragcheck report.
+
+Fix a bug in e2fsck which caused it double count non-contiguous
+extent-based inodes.
+
+E2fsck will leave some slack space when repacking directories to allow
+room for a few directory entries to be added without causing leaf
+nodes to be split right away.
+
+Fix a bug which caused e2fsck to crash when it comes across a
+corrupted interior node in an extent tree with the error message:
+"Error1: Corrupt extent header on inode XXXXXX"
+
+E2fsck problem descriptions involving the journal are no longer
+referred to as "ext3" problems, since ext4 filesystems also have
+journals.
+
+Fix a long-standing bug in e2fsck which would cause it to crash when
+replying journals for filesystems with block sizes greater than 8k.
+
+Update Catalan translation from the Translation Project.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #503057, #502323, #511207)
+
+Programmer's Notes
+------------------
+
+Fix build of e2fsck.profiled, and add support for building profiled
+binaries in the misc directory if configured with --enable-profile.
+
+The ext2fs_open() function now performs more sanity checks on the
+superblock to avoid potential divide by zero errors by other parts of
+library.
+
+The ext2fs_read_inode_full() function now has a safety check to avoid
+a segmentation fault on corrupted filesystems.
+
+The ext2fs_new_inode() function now has a sanity check so that if the
+s_first_inode field in the superblock is insane, it will return
+EXT2_ET_INODE_ALLOC_FAIL instead of returning an invalid inode number.
+
+To avoid segmentation faults, ext2fs_block_alloc_stats() and
+ext2fs_inode_alloc_stats() now validates the passed inode or block
+number to avoid overrunning an array boundary.
+
+Various signed/unsigned errors for variables containing block numbers
+have been fixed.
+
+Accommodations for gcc's stupidity in not realizing that constant
+strings that do not contain a '%' character are safe to use in format
+strings have been made so that distributions that want to compile
+e2fsprogs with -Werror=format-security have an easier time doing so.
+
+Added a new 64-bit getsize interface, ext2fs_get_device_size2().
+
+Added the utility make-sparse.c to the contrib directory.
+
+The ext2fs_block_iterate2() function now reflects errors from
+ext2fs_extent_set_bmap() to the caller, if the callback tries to
+change a block on an extent-based file, and ext2fs_extent_set_bmap()
+fails for some reason (for example, there isn't enough disk space to
+split a node and expand the extent tree.
+
+The ext2fs_block_iterate2() function will preserve the uninit flag in
+extents when the callback function modifies a block in an extent-based
+file.
+
+E2fsck will now flag filesystems that have an insane s_first_ino field
+in their superblock, and attempt to use a backup superblock to repair
+the filesystem.
+
+
+E2fsprogs 1.41.3 (October 12, 2008)
+===================================
+
+E2fsck has been fixed so it prints the correct inode number for
+uinit_bg related problems.
+
+E2fsck will now offer to clear the test_fs flag if the ext4 filesystem
+is available on linux. This can be disabled via a configuration
+option in /etc/e2fsck.conf.
+
+Fix a file descriptor leak in libblkid when checking to see if an ext4
+or ext4dev module exists.
+
+Fix a bug in e2fsck where in preen mode, if there are disk I/O errors
+while trying to close a filesystem can lead to infinite loops.
+(Addresses Red Hat Bugzilla #465679)
+
+Fix a bug in resize2fs where passing in a bogus new size of 0 blocks
+will cause resize2fs to drop into an infinite loop. (Addresses Red
+Hat Bugzilla: #465984)
+
+Add a check in the Unix I/O functions in libext2fs so that when a
+device is opened read/write, return an error if the device is
+read-only using the BLKROGET ioctl.
+
+Fix debugfs's ncheck command so that it prints all of the names of
+hardlinks in the same directory.
+
+Fix a bug in libblkid so it correctly detects whether the ext4 and
+ext4dev filesystems are available, so that the ext4dev->ext4
+fallback code works correctly.
+
+Programmer's Notes
+------------------
+
+Fix a parallel build problem by making sure util/subst is built before
+trying to build the lib/et directory. (Addresses Sourceforge Bug:
+#2143281)
+
+Updated "make depend" information for crc16.o
+
+
+E2fsprogs 1.41.2 (October 2, 2008)
+==================================
+
+Fix e2fsck's automatic blocksize detection. This fixes a regression
+from e2fsprogs 1.40.7 which caused e2fsck to fail if the user
+specifies a block number using the -b option if the blocksize option
+isn't also specified using -B. Unfortunately, users very commonly
+invoke e2fsck using "e2fsck -b 32768 /dev/hdXXX" to use the backup
+superblock; in fact e2fsck will often suggest this kind of command
+line. Oops.
+
+Enhance the debugfs's "ncheck" command so it will print all of the
+pathnames for the specified inodes. (Previously, in some cases ncheck
+might not print a pathname for an inode at all if some of the other
+inodes had multiple hard links.)
+
+Enhance debugfs's "hash" command so the hash seed can be specified via
+a command-line option. In addition, allow the hash algorithm to be
+specified by name instead of just by number.
+
+Fix e2fsck so that we don't accidentally print the translation file's
+header when asking the user a custom question so there is no prompt
+defined for a particular problem record. For example, the question
+"Run journal anyway" will get the PO header tacked on because e2fsck
+erroneously passed the null string to _(). (Addresses Launchpad Bug:
+#246892)
+
+Enhance badblocks so that it can test a normal file which is greater
+than 2GB.
+
+Enhance the badblocks command so that it displays the time and
+percentage complete when in verbose mode. (Addresses Debian Bug:
+#429739)
+
+Fix a potential memory leak in a error handling path in debugfs's
+ncheck function.
+
+Fix a potential memory corruption problem if a memory allocation fails
+in resize2fs.
+
+Fix the usage message for debugfs's logdump command to be consistent
+with its man manpage.
+
+Update Polish, French, Vietnamese, Dutch, Indonesian, German, Czech,
+and Swedish translations from the Translation Project.
+
+Add documentation for the file I/O functions to the libext2fs.texinfo
+file. (Addresses Debian Bug: #484877)
+
+Update and clarified various man pages. (Addresses Launchpad Bug
+#275272; Addresses Debian Bugs: #498100, #498101, #498102, #498103)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bug: #497619)
+
+Programmer's Notes
+------------------
+
+Fix a potential file descriptor leak in libcom_err by setting the
+close-on-exec flag for a fd used for debugging. (Addresses Red Hat
+Bugzilla #464689)
+
+Fix a potential race in libcom_err by using sem_post/sem_init. SuSE
+has been carrying a patch for a long time to prevent a largely
+theoretical race condition if a multi-threaded application adds and
+removes error tables in multiple threads. Unfortunately SuSE's
+approach breaks compatibility by forcing applications to link and
+compile with the -pthread option; using pthread mutexes has
+historically been problematic. We fix this by using sem_post/sem_init
+instead.
+
+Fix e2fsprogs-libs build failure due to 'subs' target. (Addresses
+Sourceforge Bug: #2087502)
+
+Avoid linking e2initrd_helper, debugfs, blkid, and fsck with unneeded
+libraries when using ELF shared libraries.
+
+Fix ELF shared library when building on systems that don't already
+have the e2fsprogs shared libraries already installed. (Addresses
+Sourceforge Bug: #2088537)
+
+Fix the pkg-config files so they work correctly when linking with
+static libraries and fix the include directory so programs don't have
+to use #include <ext2fs/ext2fs.h>, but can use #include <ext2fs.h>
+instead. (Addresses Sourceforge Bug: #2089537)
+
+Make sure ext2fs_swab64() is compiled for all platforms, and not just
+for x86. (Addresses Debian Bug: #497515)
+
+Remove the unused ext2fs_find_{first,ext}_bit_set() functions for all
+non-x86 platforms. (They had been removed for x86 earlier.)
+
+Fix diet libc compilation support, which had bitrotted due to lack of
+TLC. Fixing this improves general portability.
+
+When installing the link library when using ELF shared libraries,
+avoid using absolute pathnames if the link library and the shared
+library are installed in the same directory. (Addresses Sourceforge
+Bug: #1782913)
+
+Fix gen-tarball so it will work even if the top-level directory has
+been renamed to something other than "e2fsprogs". Also make
+gen-tarball print the size of the resulting tar.gz file.
+
+
+E2fsprogs 1.41.1 (September 1, 2008)
+====================================
+
+Many people are forgetting to update their mke2fs.conf file, and this
+causes ext3, ext4, and ext4dev filesystems won't get created with the
+proper features enabled. We address this in two ways. First, mke2fs
+will issue a warning if there is not definition for an ext3, ext4, or
+ext4dev filesystem and the user is trying to create such a filesystem
+type. Secondly, when installing from a source build, "make install"
+will provide basic configuration file handling for /etc/mke2fs.conf.
+If it exists, and does not mention ext4dev, it will be moved aside to
+/etc/mke2fs.conf.e2fpsrogs-old and the new /etc/mke2fs.conf file will
+be installed. If the existing /etc/mke2fs.conf file does mention
+ext4dev, then "make install" will install official mke2fs.conf file as
+/etc/mke2fs.conf.e2fsprogs-new and issue a message to the user that
+they should look to see if any changes need to be merged.
+
+The mke2fs program will now create the journal in the middle of the
+filesystem, since this minimizes seek times on average for fsync-heavy
+workloads. In addition, mke2fs will now create journals using extents
+for filesystems that support them. This results in a more efficient
+encoding for the journal since it eliminates the need for using
+indirect blocks.
+
+The mke2fs program will avoid allocating an extra block to the
+journal. (Addresses Sourceforge Bug: #1483791)
+
+Mke2fs will correctly enforce the prohibition against features
+(specifically read-only features) in revision 0 filesystems. (Thanks
+to Benno Schulenberg for noticing this problem.)
+
+Mke2fs previously would occasionally create some slightly non-optimally
+placed inode tables; this bug has been fixed.
+
+The mke2fs and tune2fs programs now print the correct usage message
+describing the maximum journal size. (Addresses Debian Bug: #491620)
+
+Add support for setting the default hash algorithm used in b-tree
+directories in tune2fs (from a command-line option) or mke2fs (via
+mke2fs.conf). In addition, change the default hash algorithm to
+half_md4, since it is faster and better.
+
+The blkid library will now recognize MacOS hfsx filesystems, and
+correctly extract the label and uuid for hfs, hfsx, and hfsplus
+filesystems. (Addresses Sourceforge Feature Requests: #2060292)
+
+The blkid library has improved detection of JFS and HPFS filesystems.
+(Addresses Launchpad Bug: #255255)
+
+The blkid library is now much more efficiently handling devicemapper
+devices, mainly by no longer using the devicemapper library. This can
+speed up access for systems with a large number of device mapper
+devices.
+
+Blkid had a number of cache validation bugs in libblkid that have been
+fixed. (Addresses Debian Bug: #493216)
+
+Resize2fs will now properly close out the "updating inode references"
+progress bar so there is a newline printed before printing the final
+"resize is successful" message.
+
+Resize2fs will now correctly handle filesystems with extents and/o
+uninitialized block groups correctly when file/directory blocks need
+to relocated (i.e., when shrinking a filesystem or if the resize_inode
+is not present). To support this, the ext2fs library now supports
+initializing inode and block bitmaps that are not yet initialized when
+allocating them using ext2fs_new_block() and ext2fs_new_inode(). In
+addition, e2fs_block_iterate2() can now support changing the location
+of interior nodes of an extent tree, and ext2fs_extent_set_bmap() has
+been optimized to avoid creating unnecessary new extents when updating
+the location of blocks in the extent tree. This will also help out
+e2fsck's recovery of obscurely corrupted filesystems with extents,
+when blocks are claimed by multiple inodes.
+
+Add support for on-line resizing ext4 filesystem with the flex_bg
+filesystem feature. The method for doing so is not optimal, but to do
+a better job will require kernel support.
+
+E2fsprogs 1.41.0 introduced a bug in libext2fs which caused e2image and
+debugfs programs to not be able to read e2image files; the signed
+vs. unsigned bug in the code which read bitmaps from the e2image has
+been fixed. (Addresses Debian Bug: #495830)
+
+Resize2fs is now correctly managing the directory in-use counts when
+shrinking filesystems and directory inodes needed to be moved from one
+block group to another. This bug has been around since e2fsprogs
+1.26, and is largely harmless, but does cause a filesystem corruption
+which will be flagged by e2fsck after the filesystem has been shrunk.
+
+E2fsck will no longer issue spurious complaints about the inode size
+caused by very large extent-based files, and by blocks reallocated
+using fallocate() with the FALLOC_FL_KEEP_SIZE option. (Addresses
+Kernel Bugzilla: #11341)
+
+Mke2fs will now set the creation timestamp on the lost+found directory
+and the root directory. (More generally, all new inodes created using
+the ext2fs library will correctly set the creation timestamp.)
+
+E2fsck now correctly calculates ind/dind/tind statistics in the
+presence of extent-based files. In addition, "e2fsck -v" will report
+statistics of the depth of extent trees in the filesystem. E2fsck can
+also give an inode fragmentation report using "e2fsck -E fragcheck"
+which can be useful when debugging the kernel block allocation
+routines.
+
+Fix support for empty directory blocks in ext4 filesystems with 64k
+blocksize filesystems.
+
+E2fsck will now print the depth of corrupt htree directories.
+
+Debugfs's htree command now correctly understands extent-based
+directories. It will also print out the minor hash as well as the
+major hash.
+
+Debugfs has a new command which will print the supported features of
+e2fsprogs, to enable scripts to know whether the installed version of
+e2fsprogs can support a specific feature.
+
+Debugfs will now write files using extents for filesystems that
+support them.
+
+The error message printed by "tune2fs -I" if the inode size was too
+small was rather confusing, so it has been improved. Also, we won't
+try to create an undo log until we know that command-line-specified
+parameters such as "tune2fs -I <inode size>" are valid.
+
+Given some filesystems found "in the wild" that had non-zero block
+group checksums even though the uninit_bg/gdt_sum feature was not
+enabled, e2fsck would issue spurious error messages. Teach
+ext2fs_group_desc_csum_verify() to ignore the block group checksum
+entirely if the feature flag is not set. (Addresses Debian Bug:
+#490637)
+
+The blkid program will now print out a user-friendly listing of all of
+the block devices in the system and what they contain when given the
+-L option. (Addresses Debian Bug: #490527)
+
+The filefrag program now has a more accurate calculation for the
+number of ideal extents. (Addresses Debian Bug: #458306)
+
+The test I/O manager is now enabled by default, but its overhead is
+only incurred when it would be enabled via the TEST_IO_FLAGS or
+TEST_IO_BLOCK environment variables.
+
+Typographical errors in various program strings and usage messages
+have been fixed; most of these were pointed out by the e2fsprogs
+message catalog translators. (Thanks, translators!)
+
+Update and clarified various man pages, as well as some typographical
+errors in the libext2fs texinfo file.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details.
+
+Add Indonesian and update French, Polish, Dutch, German, Swedish,
+Czech, and Vietnamese Translations. (Addresses Debian Bugs: #313697,
+#401092)
+
+Programmer's Notes
+------------------
+
+Fix portability problem with the badblocks group; for systems that
+don't have nanosleep(), try using usleep() instead.
+
+The "make check" target in the e2fsck directory now sets
+LD_LIBRARY_PATH before running the various e2fsck internal library
+regression tests.
+
+The crc32 regression test in the e2fsck library is now portable to
+greater variety of environments, including big-endian systems and
+when cross-building e2fsprogs for embedded systems. (Addresses
+Sourceforge Bug: #2019287)
+
+The ext2fs_extent_set_bmap() had some bugs when setting the first
+block in a file, or when replacing a single block extent. Those cases
+fortunately were came up relatively rarely when e2fsck was checking
+files, but caused some problems when resize2fs was shrinking
+extent-based files.
+
+Fix a potential core-dumping bug in libe2p's iterate_on_dir()
+function.
+
+Various ext2fs library functions --- ext2fs_block_iterate2(),
+ext2fs_initialize() and ext2fs_extent_open() --- now correctly free
+allocated memory to avoid memory leaks in all of their error return
+paths.
+
+Ext2ed was failing to build because masix support had been removed in
+the rest of e2fsprogs, so ext2ed no longer has masix support, either.
+
+The configure script now respects the LDFLAGS environment variable if
+it is set when configure is called. (Addresses Sourceforge Feature
+Request: #1937287)
+
+Libuuid is now more portable to the Windows platform. (Addresses
+Sourceforge Feature Request: #1937287)
+
+The configure script now uses AC_MSG_{RESULT,WARN,ERROR} instead of
+bare echo commands so that configure flags such as --quiet work
+correctly. (Addresses Sourceforge Patches: #2058794)
+
+A few uses of sprintf have been removed from the ext2fs library to
+make life easier for bootloaders with a limited libc environment.
+(Addresses Sourceforge Bug: #2049120)
+
+The ext2fs_read_inode() checks the validity of the inode number passed
+to it earlier, to avoid doing some needless work when it would fail
+anyway.
+
+The ext2fs_open() checks the validity of the blocksize parameter
+passed to it earlier, to avoid doing some needless work when it would
+fail anyway.
+
+Disable a very annoying automatic "%.sh -> %" GNU make rule in the
+top-level Makefile. That automatic rule is used to better support
+SCCS, but it caused problems for a particular niche distribution which
+likes to use configure.sh files to store the configure options used to
+build a package. Unfortunately GNU make will use the configure.sh to
+replace the configure script, resulting in a self-inflicted fork bomb
+leading to an out-of-memory crash.
+
+To support old GNU C compilers don't use C99/C++ comments, but only
+K&R style comments, and don't try to use __builtin_expect if __GNUC__
+is less than 3. (__builtin_expect is only supported for gcc versions
+2.96 and up, and it's tricky to check for gcc 2.95 vs gcc 2.96; since
+this is an optimization, we only try to use __builtin_expect for gcc 3
+and up.)
+
+In e2fsck's crc routines, make sure we use WORDS_BIGENDIAN instead of
+__LITTLE_ENDIAN, which are only defined by glibc's header files and
+hence isn't portable.
+
+For the convenience for some distributions that need a static tune2fs,
+the Makefile for misc/ now has a tune2fs.static target.
+
+The ext2fs_block_iterate2() function now supports BLOCK_FLAG_APPEND
+for extent-based files
+
+The ext2fs_bmap() function now supports BMAP_ALLOC for extent-based
+files.
+
+All source files no longer have any trailing white space.
+
+The io_channel_read_blk64() and io_channel_write_blk64() functions are
+now functions instead of C preprocessor macros to provide better
+forward compatibility.
+
+The e2fpsrogs translation template now expands the @x abbreviation.
+
+Various namespace leakages in libblkid, libe2p, and libext2fs have
+been fixed.
+
+Fix a parallel build problem in e2fsprogs.
+
+E2fsprogs is now more portable to Solaris.
+ * blkid no longer assumes that the TIOCGSIZE and TIOCGWINSZ ioctl's
+ are always present.
+ * Scripts do not assume that /bin/true is always in /bin
+ * Don't use __FUNCTION__ since Solaris's C99 doesn't support it.
+ * Flush stdio handles before calling setbuf(), since Solaris will
+ discard any pending output to the stream.
+ * Define _XOPEN_SOURCE to 600 since Solaris's header files are very
+ picky about which C compiler can be used for SUSv3 conformance.
+ Use of C99 is not compatible with SUSv2 (_XOPEN_SOURCE=500),
+ and C89 is not compatible with SUSv3 (_XOPEN_SOURCE=600).
+ Since we need some SUSv3 functions, consistently use SUSv3 so
+ that e2fsprogs will build on Solaris using c99.
+ * Solaris C99 does not support varargs C preprocessor macros
+ * Solaris header files pollute the C namespace if in/netinet.h
+ is included, which conflicts with e2fsprogs' use of the kmem_cache_t
+ typedef.
+ * Solaris ships with a pathetically ancient shell in /bin/sh so we
+ avoid the use of various more advanced shell constructs such as $().
+
+The "make rpm" command will now take some extra configure options from
+the build environment without needing to patch the source tree.
+
+The ext2fs_add_dir_block() function will now grow the dblist more
+aggressively as an optimization to avoid copying the array too often.
+
+The e2fsck_write_bitmaps() will write the block and inode bitmaps
+together instead of in two passes.
+
+
+E2fsprogs 1.41 (July 10, 2008)
+==============================
+
+Add support for ext4 filesystem features, in particular extents,
+uninit_bg, flex_bg, huge_file, and dir_nlink features. Also add
+support for checking journal checksums. Debugfs will print new
+superblock and inode fields that were defined for ext4. For example,
+the nanosecond and i_version fields of an inode, and the
+s_min_extra_isize and s_wanted_extra_isize fields from the superblock.
+Note: Resize2fs doesn't currently support the combination of flex_bg
+and !resize_inode. (Addresses Debian Bug: #388452, #425477)
+
+Tune2fs can support migrating a filesystem from using 128 byte inodes
+to 256 byte inodes, so it can take advantage of the full features of
+ext4.
+
+Add support for "undo" support. E2fsck and mke2fs can optionally
+record an undo log which can replayed by the program e2undo.
+
+E2fsck could damage a filesystem by trying to relocate inode tables
+due to corrupted block group descriptors, where the attempted inode
+table relocation would do far more harm than good. E2fsck has been
+fixed to detect this these sorts of corrupted block group descriptors
+much earlier in e2fsck processing, so it can try to use the backup
+superblock and block group descriptors first. This should be a much
+better strategy for recovering these types of corrupted filesystems.
+(Addresses Sourceforge Bug: #1840291)
+
+E2fsck will display a more understandable message when the last check
+field in the superblock is in the future. (Addresses Debian Bug:
+#446005).
+
+E2fsck now performs more extensive and careful checks of extended
+attributes stored in the inode.
+
+Enhance mke2fs to print a more explanatory error message when
+ext2fs_get_device_size() returns EFBIG. (Addresses Debian Bug:
+#488663)
+
+Fix mke2fs to use a default block size of 4k when formatting an
+external journal device. This is done by using a fixed filesystem
+type list that consists only of the single filesystem type "journal"
+when looking up configuration keys in /etc/mke2fs.conf. (Addresses
+Debian Bug: #488663)
+
+Speed up how mke2fs writes the journal data blocks by writing the disk
+blocks in larger chunks.
+
+Fix blkid handling of stale devices. Fix a bug which could cause a
+core dump while garbage collecting the blkid cache, and assure that
+blkid_find_dev_with_tag() never returns a non-existent device. Also,
+if a filesystem is found at a new /dev location, eliminate any
+duplicate stale entries which can not be verified.
+(Addresses Debian Bugs: #487758, #487783)
+
+Add more paranoid checks for LVM volumes and swap partitions in
+blkid's probe function, to reduce the chances of false positives.
+
+The mke2fs program now has a much more sophisticated system for
+controlling configuration parameters of a newly created filesystem
+based on a split filesystem and usage type system. The -t option to
+mke2fs was a deprecated alias to -c; it now specifies a filesystem
+type (ext2, ext3, ext4, etc.), while the -T option can now be a comma
+separated usage list. The filesystem type information and type
+information is used to extract configuration parameters from the
+/etc/mke2fs.conf file.
+
+The mke2fs program will no longer complain and request the -f option
+when the user tries to create a filesystem with greater than 2**31
+blocks.
+
+When creating a filesystem for the GNU Hurd use a fs-type of Hurd and
+adjust the mke2fs.conf file so filesystems for the Hurd are created
+with a blocksize of 4096 and inode size of 128, which is all it knows
+how to handle. (Addresses Debian Bug: #471977)
+
+Mke2fs will always make sure that lost+found always has at least 2
+blocks, even for filesystems with very large blocksizes (i.e., 64kb).
+
+Resize2fs will now print the minimum needed filesystem size if given
+the -P option, and will resize the filesystem to the smallest possible
+size if given the -M option.
+
+Fix resize2fs to clean up the resize_inode if all of the reserved gdt
+blocks are consumed during an off-line resize.
+
+The "ls" command in debugfs now supports the -p option, which causes
+it to quote the filenames so that spaces or tabs in directory entries
+are easily visible. (Addresses Red Hat Bugzilla: #149480; Addresses
+Sourceforge Feature Request: #1201667)
+
+Fix a potential off-by-one buffer overflow in the fs_device_name in an
+e2image file.
+
+The chattr program will return a non-zero exit code in case of
+failures, and error messages can be suppressed with the -f option.
+(Addresses Red Hat Bugzilla: #180596)
+
+Fix a bug in badblocks which caused it to overrun an array and likely
+crash if more than 8 test patterns are specified using the -t option.
+(Addresses Debian Bug: #487298)
+
+Add support to badblocks to limit how quickly it reads from the disk
+drive (so it can be used for background scrubbing), and so it will
+abort after finding a given number of errors.
+
+Remove support for the legacy big-endian filesystem format which only
+existed on extremely long-dead PowerPC kernels almost a decade ago.
+
+Remove MASIX support from e2fsprogs.
+
+Add I/O statistics reporting to e2fsck.
+
+Update Vietnamese, Polish, French, Spanish, German, Catalan, Dutch,
+Czech translations.
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details. (Addresses Debian Bugs: #487443, #487675, #490003)
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses Debian Bugs: #393313, #487849, #440983, #440981)
+
+Programmer's Notes
+------------------
+
+Factor out bitmap code in preparation for adding 64-bit new-style
+bitmaps.
+
+Fix gcc -Wall warnings
+
+Fix the pkg-config files so that private libraries are specified in
+"Libs.private:".
+
+Fix the libext2fs.texinfo manual so it builds with modern versions of
+texinfo.
+
+Silence the makefile from showing the awk command used to build the
+
+Clean up the badblocks group so to make it more portable and robust.
+
+Avoid using predictable filenames in /tmp in blkid's regression test
+suite. Also remove bashism's in the regression test script.
+
+If the configure script is given --with-diet-libc, don't use thread
+local storage, since diet libc doesn't support TLS. (Addresses
+Sourceforge Bug: #2000654)
+
+Fix the blkid regression test suite to tolerate older versions of
+mkswap that don't support the -U option.
+
+A few library routines have been converted to support 64-bit block
+numbers; in particular, the I/O manager functions, the test_io,
+inode_io, and unix_io managers have all be converted to support 64-bit
+operation.
+
+Debugfs can now be extended for use by test programs. See
+lib/ext2fs/extents.c for an example for how it can be used. The test
+program links against the debugfs object files, and provides
+additional commands by defining an auxiliary libss command table.
+
+The lazy_bg filesystem feature, which was only used by developer's
+testing, has been removed since it has been largely supplanted by
+uninit_bg. This also simplifies the code.
+
diff --git a/doc/RelNotes/v1.42.txt b/doc/RelNotes/v1.42.txt
new file mode 100644
index 0000000..f0d2dd2
--- /dev/null
+++ b/doc/RelNotes/v1.42.txt
@@ -0,0 +1,1690 @@
+E2fsprogs 1.42.13 (May 17, 2015)
+================================
+
+Fixed a potential buffer overflow while closing a file system in
+libext2fs. (CVE-2015-1572, Addresses Debian Bug: #778948)
+
+Fixed a bug which could cause e2fsck to corrupt Hurd file systems.
+(Addresses Debian Bug: #760275)
+
+Fixed a deadlock which occurs when using systemd and e2fsck.conf's
+logging feature. (Addresses Debian Bug: #775234)
+
+Fixed a bug which could cause programs using libext2's inode table
+scanning functions from crashing on certain corrupted file systems.
+(Addresses Debian Bug: #773795)
+
+Fixed dumpe2fs so it won't crash if the user doesn't specify a block
+device (file system). (Addresses Debian Bug: #764293)
+
+Fixed e2fsck so if it notices unexpected HTREE blocks in pass 2, it
+will report the correct directory inode containing the inconsistency.
+
+If e2fsck fails to grow the dir_info structure due realloc(3) not
+having enough memory, it will now fail with explanatory message
+instead of staggering on failing with a confusing internal error
+messages.
+
+The tune2fs program will zero out the superblock journal backup
+information when removing a journal from a file system.
+
+The mke2fs program now enables the large_file feature by default.
+
+Fixed a bug which could cause badblocks to crash if there are millions
+and millions of bad blocks.
+
+Fixed some use-after-free bug in resize2fs and e2fsck.
+
+Fixed a memory leak in tune2fs.
+
+Fixed some bigendian bugs that had crept into both indirect and extent
+handling inside libext2fs.
+
+Updated/fixed various man pages.
+
+Update Esperanto, German, and Spanish translations. Added Danish
+translation.
+
+Programmer's Notes
+------------------
+
+Fixed coverity, sparse, gcc -Wall, and clang warnings/nits.
+
+Clean up some build system problems (build failures with various
+configure options, fix Posix portability issues, etc.)
+
+The functions ext2fs_inode_alloc_stats[2]() and
+ext2fs_block_alloc_stats[2]() now check the inode and block numbers
+passed to them, to avoid crashes caused by buggy callers.
+
+The libext2fs directory iterator will now check for an invalid
+directory entry length instead of possibly walking off the end of the
+directory buffer.
+
+
+E2fsprogs 1.42.12 (August 25, 2014)
+===================================
+
+Fix various e2fsck bugs when trying to repair bigalloc file systems.
+
+E2fsck can now repair a file system with an overly large
+s_first_meta_bg field, which had previously caused all e2fsprogs
+programs to crash when trying to open such a file system.
+
+Fix e2fsck so that it can correctly fix a number of rare file system
+corruptions that were discovered when using a file system fuzzer.
+
+Fix e2fsck so it does not try to write back block group descriptors if
+they have not been modified.
+
+Mke2fs program will now place metadata blocks in the last flex_bg so
+they are contiguous. This reduces free space fragmentation in a
+freshly created file system, as well as allowing mke2fs commands which
+request extremely large flex_bg size to succeed.
+
+Mke2fs now creates hugefiles more efficiently (with fewer extent tree
+blocks).
+
+Fix a 32/64-bit overflow bug that could cause resize2fs to loop
+forever. (Addresses-Launchpad-Bug: #1321958)
+
+The resize2fs program will now use much less memory when resizing very
+large file systems.
+
+Fix a bug which could cause resize2fs to get confused and produce a
+corrupted file system when shrinking a file system that had been
+previously expanded and converted to use the meta_bg file system
+format, but which no longer needs to use the meta_bg file system
+format any longer. This typically happened with large (> 16TB) file
+systems. (Addresses Debian Bug: #756922)
+
+The e4defrag program will now defrag backwards-allocated files.
+
+Fix tune2fs updating UUID's when manipulating file systems with
+external journals (both the file system and journal UUID).
+
+Fix tune2fs so it can remove an external journal for file systems with
+a 1k block size.
+
+Add a new debugfs command, "inode_dump", which prints the inode in hex
+and ASCII format.
+
+The debugfs's "set_inode_field" will now automatically allocate blocks
+for indirect blocks and extent tree blocks.
+
+Fix debugfs's "set_inode_field" so can properly handle
+"block[IND|DIND|TIND]".
+
+The debugfs "rdump" command will now take multiple source arguments.
+
+Fixed a double close(2) bug in "rdump" and "rdump -p".
+
+Fix debugfs's argument parsing for the freefrag command.
+
+Fix filefrag to properly handle using the FIBMAP ioctl (with -B).
+(Addresses Launchpad Bug: #1356496)
+
+Clarified messages that were confusing users in debugfs, e2fsck,
+mke2fs, and resize2fs (Addresses Debian Bugs: #758029, #757543,
+#757544)
+
+Dumpe2fs will now complain if extra arguments are given to it.
+(Addresses Debian Bug: #758074)
+
+Updated/fixed various man pages. (Addresses-Debian-Bug: #726760)
+
+Update Czech, Dutch, French, Polish, Spanish, Swedish, Ukrainian, and
+Vietnamese translations.
+
+Programmer's Notes
+------------------
+
+The Unix I/O layer will now use pread[64]/pwrite[64] to reduce the
+number of system calls issued.
+
+Fixed profiled build.
+
+The libext2fs library will now more efficiently split an extent tree
+index block when appending to an end of a file.
+
+Fixed free block accounting for 64-bit file systems.
+
+Add a new function ext2s_inode_size_set() which takes care of all of
+the required feature flag modifications.
+
+The regression tests no longer require the presence of the md5sum
+program.
+
+Fix build failure on MIPS platforms on Debian (Addresses Debian Bug:
+#754605)
+
+Fix various Coverity warnings (#1225003, #1229243, #1252003)
+
+
+E2fsprogs 1.42.11 (July 9, 2014)
+================================
+
+Add support so that mke2fs can create hugefiles so that they are
+aligned relative to the beginning of the disk, instead of relative to
+the beginning of the partition, using the mke2fs.conf configuration
+parameter "hugefiles_align_disk".
+
+Fix a bug which causes e2fsck to abort a journal replay on a file
+system with bigalloc enabled. (Addresses Debian Bug: #744953)
+
+Add sanity checks so that mke2fs will refuse insanely large flex_bg
+counts specified by the -G option. Insanely large flex_bg sizes can
+result in a file system which can't be unmounted, or with extremely
+pessimal metadata layouts.
+
+The mke2fs program will provide a better metadata layout for
+moderately large (but believable) flex_bg counts, such as 133,072.
+
+The mke2fs program will also check the kernel version number to
+determine whether the lazy_itable_init option is supported, so that
+lazy inode table initialization can be used even if the ext4 is
+compiled as a module which isn't loaded at the time that mke2fs is
+run.
+
+Add description of ext4's mount options to the ext4 section 5 man
+page.
+
+Improve the chattr man page and clean up the chattr usage message.
+
+E2fsck will now automatically fix a last mount time or last write time
+which is in the future in preen mode, instead of aborting the fsck
+check.
+
+Mke2fs will now check the file system revision number requested by the
+command line, and reject it if it is too large. A file system with an
+unsupported revision number will not be accepted by any of the other
+file system tools, and this command line option is rarely used, so
+let's try to help the user not shoot their own foot off.
+
+The debugfs program can now set the error count and associated
+first_error and last_error fields in the superblock using the
+set_super_value command.
+
+Resize2fs will not try to calculate the minimum size of a file system
+if it contains errors. Otherwise a very badly corrupted file system
+image can cause the minimum size calculation to loop forever. Since
+resize2fs will not allow a file system marked as containing errors to
+be resized. It's pointless to calculate the minimum size, so just
+skip it.
+
+Fixed a typo in one of mke2fs's error message.
+
+If filefrag runs into an error, it will continue processing the rest
+of the files specified on the command line, but then exit with an
+error code.
+
+Filefrag now prints some additional new flags (such as
+FIEMAP_EXTENT_ENCODED), and print unknown flags as hex values.
+
+Fixed support in filefrag for files with > 2**32 blocks on 32-bit
+platforms.
+
+Fixed a file descriptor leak in debugfs when copying files.
+
+Fixed a regression introduced in 1.42.10 which caused mke2fs to fail
+to create file systems larger than 2GB on 32-bit platforms.
+(Addresses Red Hat Bugzilla: #1099892, Debian Bug: #752107)
+
+Add Esperanto and Ukrainian translations, and update Czech, Dutch,
+French, German, Italian, Polish, Swedish, and Vietnamese
+translations.
+
+Fixed various compiler warnings.
+
+
+Programmer's Notes
+------------------
+
+The gcc "-checker" option has been long deprecated, so remove support
+from e2fsprogs. It was causing a few people to be confused when they
+tried enabling the configure option.
+
+Update to the latest version of the config.status and config.rpath
+files, as well as newer versions of the autoconf files in aclocal.m4.
+Also, move the e2fsprogs-specific macros to acinclude.m4, which allows
+people who want to use autoreconf to do so.
+
+Make the use of strptime() function in debugfs to be more portable to
+fix regression test failures for FreeBSD and MacOS.
+
+A few miscellaneous changes designed to make life easier for
+translators.
+
+Fix the f_quota test and some Makefile dependencies if quota support
+is not enabled.
+
+Fix cross-compilation support, which got broken in 1.42.10.
+(Addresses Debian Bug: #753375)
+
+Delete lib/ext2_types.h on a make clean, and build it as necessary.
+
+Add a debug program used for libext2fs unit tests.
+
+Clean up the tests so that it avoids using GNU-specific behaviour in
+mktemp. Make sure the temporary files are cleaned up if the tests are
+interrupted.
+
+Add a new ext2fs_close_free() helper function which automatically
+takes care of freeing the ext2_filsys structure even if ext2fs_close()
+returns an error.
+
+
+E2fsprogs 1.42.10 (May 18, 2014)
+================================
+
+Mke2fs now creates file systems in regular files (which is very often
+used when maintaining virtual machine images) without requiring the
+user to use the force option. In addition, the mke2fs output has been
+made much less verbose and only displays information that users will
+be more likely to find useful by default.
+
+Mke2fs now will ask the user to confirm that they want to continue
+before wiping out a pre-existing file system, partition table, or LVM
+physical volume.
+
+Mke2fs now has the ability to create file systems where all the
+metadata is located at the very beginning of the device. This can be
+useful for flash devices which have SLC flash at the beginning of the
+disk, for FAT compatibility, for example. As part of this, mke2fs and
+tune2fs can control the location of the data blocks used by the
+journal inode. In addition, the new sparse_super2 feature allows for
+even fewer (anywhere from zero to two) backup superblocks.
+
+Mke2fs now uses much less CPU when allocating the blocks used for very
+large file systems.
+
+Mke2fs can now support creating a file system at an offset. This can
+be useful when creating a disk image for virtual machines (Addresses
+Debian Bug: #497984)
+
+Previously, e2fsck had a number of very serious bugs when checking a
+file system which used the new the quota file system option (where the
+quota inodes were stored in hidden inodes) and the quota inode was
+inconsistent with the actual usage data. This problem was documented
+in https://ext4.wiki.kernel.org/index.php/Quota. These problems have
+been fixed in 1.42.10, so the quota should be safe to use with
+e2fsprogs 1.42.10.
+
+Fixed in a bug in resize2fs which could cause shrink operation fail in
+the unlikely situation when the inode table needs to be moved to a
+location before the current location.
+
+Resize2fs now has a much more accurate (and less conservative)
+estimation of how far the file system can be shrunk. This allows a
+mostly empty filesystem which is a few terabytes, to be shrunk to a
+few megabytes in a single resize2fs -M operation.
+
+E2fsck will now force a full file system check if there are any file
+system inconsistencies detected in the super block.
+
+The filefrag program will now display the shared extent flag, which is
+used by file systems such as btrfs.
+
+If the number of inodes in the file systems is larger than the time
+that file system was created (as measured by the number of seconds
+since January 1, 1970) e2fsck would print a scary (but otherwise
+harmless) warning of file system corruption for each inode in the
+orphan list. This false positive has been fixed.
+
+The e4defrag program has been fixed so it will no longer refuse with
+filesystem with the 64-bit or the bigalloc feature enabled.
+
+The logsave program will print a much less scary message which could
+lead users to believe something has gone very wrong with e2fsck exits
+with a non-zero exit status (since this is normal after e2fsck has
+automatically fixed a file system corruption during a preen
+operation). (Addresses Debian Bug: #468821)
+
+When creating a file system which is larger than 16TB, the
+resize_inode option must be disabled -- since the resize_inode simply
+doesn't support reserving metadata block numbers which is larger than
+32 bits. The mke2fs program does this automatically if the file
+system size is determined automatically. It will now also do this if
+the file size is specified explicitly.
+
+Fixed bugs associated with resize2fs and shrinking bigalloc file
+systems.
+
+The e2fsck program will no longer try to add a UUID on a mounted file
+system with checksums enabled, since this could leave the file system
+checksums broken.
+
+Tune2fs will allow the removal of an external journal from file system
+which is marked as needing the journal replayed when the force ("-f")
+option is given twice. (Addresses Debian Bug: #559301)
+
+Tune2fs will no longer support enabling sparse_super if the meta_bg
+file system feature is enabled, since it could result in data loss.
+In practice, all modern file systems have sparse_super is enabled, so
+it's not worth trying to change how tune2fs handles enabling the
+sparse_super feature.
+
+Fixed support for 1k block file systems with the meta_bg feature.
+
+When the superblock is corrupt, e2fsck can't figure out the location
+of the alternate superblock. Unfortunately, the routine that
+calculates the location of the alternate superblock uses 8193 if it
+can't figure this out, so the message printed by e2fsck always
+suggests using "e2fsck -b 8193". This message has been fixed to
+suggest both the superblock location of 8193 and and 32768.
+(Addresses Debian Bug: #719185)
+
+The lookback mount detection code that was introduced in 1.42.9 wasn't
+actually compiled in due to an autoconf oops, so it's fixed now in
+1.42.10. (Addresses Debian Bug: #497984)
+
+A bug introduced in 1.42.9 would cause debugfs to print two error
+messages if it found an error while parsing a user-supplied block
+number. This has been fixed in 1.42.10.
+
+Update Czech, Dutch, French, German, Polish, Spanish, Swedish, and
+Vietnamese translations. (Addresses Debian Bug: #703048)
+
+Updated/fixed various man pages. (Addresses Debian Bugs: #719189,
+#719184)
+
+Fixed various Debian Packaging Issues. (Addresses Debian Bug: #718725)
+
+
+Programmer's Notes
+------------------
+
+Fixed a lot of coverity, sparse, gcc -Wall, and clang warnings/nits.
+
+Allow the location of pkg-config files to be specified independent of
+the libdir location via a makefile variable.
+
+Fixed parse-types.sh not to complain when cross-compiling and the
+sizes of types are different between the target architecture and the
+architecture of the build system
+
+Allow the regression test suite to work correctly on systems which do
+not have the "truncate" or "mksawp" programs.
+
+Allow e2fsck to build correctly on systems (such as Android) that do
+not have the signal.h file.
+
+E2fsprogs now has code coverage testing which can be enabled using
+"configure --enable-gcov".
+
+The libe2p.h header file can now be used included by C++ programs.
+
+The profile/config file used by e2fsck and mke2fs will interpret
+numbers with a leading 0 character to mean that they should be
+interpreted as an octal integer.
+
+The extent handling functions in libext2fs have been improved so they
+have proper rollback when there is an error splitting an extent. Also
+fix a number of bugs when punching holes in files, and fix an
+off-by-one bug when inserting an extent into an empty inode.
+
+The libext2fs library now handles the support of BLOCK_UNINIT by
+clearing the portion of block bitmap when it is loaded, instead of
+when it is used. This reduces the chances of bugs, and and simplifies
+the code. It also means that debugfs will properly show that blocks
+in uninitialized block groups as being unused when using the testb
+command.
+
+The e4defrag program will try to use fadvise64 or posix_fadvise64() if
+it is present, which allows 64-bit offsets on 32-bit systems.
+
+
+E2fsprogs 1.42.9 (December 28, 2013)
+====================================
+
+Mke2fs will detect an attempt to create a file system on a loop
+mounted file and complain without the -FF option. Also fixed mke2fs
+so it allows the creation of a file system on a mounted device with
+two -F options, as documented in the man page, instead of three -F
+options.
+
+Fixed a large number of bugs in resize2fs, e2fsck, debugfs, and
+libext2fs to correctly handle bigalloc and 64-bit file systems. There
+were many corner cases that had not been noticed in previous uses of
+these file systems, since they are not as common. Some of the bugs
+could cause file system corruption or data loss, so users of 64-bit or
+bigalloc file systems are strongly urged to upgrade to e2fsprogs
+1.42.9.
+
+The tune2fs program will now not allow changing the uuid on a mounted
+file system which has the uninit_bg feature enabled. This avoids a
+nasty race where the kernel and tune2fs are both retrying rewrite the
+group descriptors at the same time, with different ideas about what
+the UUID should be.
+
+When e2fsck is rehashing an extent-mapped directory, it's possible
+(although very rare) that an extent block will need to be allocated;
+fix e2fsck to make sure that the block gets marked as used.
+
+Mke2fs will now properly set the LARGE_FILE feature when creating a
+journal >= 2GB --- which can happen when using 64k block size.
+
+Fixed debugfs so that its freei command will correctly handle a request
+to free a range of consecutive inodes.
+
+Fixed 2fsck so it will not erroneously complain that an external journal
+is invalid if it is exactly 2**32 blocks.
+
+Fixed e2fsck so it won't try checking for, and adding, a missing
+lost+found directory when running in read-only mode.
+
+Fixed e2image so that progress information won't get leaked to stdout.
+(Addresses Red Hat Bugzilla: #1327329)
+
+Fixed e2image to avoid some buffer overruns which would cause it to when
+creating a "standard (non-raw, non-qcow2) image file. Standard
+e2image files are actually very rarely used, so we didn't notice when
+the changes to enable the qcow2 format broke this e2image mode.
+
+Fixed mke2fs so that the extended option "-E resize=NNN" will not turn
+on the resize_inode feature when the meta_bg feature is set, since
+these two features can not be set at the same time.
+
+Fixed tune2fs so that when it disables the quota feature, it updates all
+of the backup superblocks.
+
+Fixed dumpe2fs that would cause it to abort when run using an image file
+when trying to print the journal information (which is not present in
+an e2image created image file).
+
+Fixed a potential integer overflow in e2reefrag.
+(Addresses-Debian-Bug: #718205)
+
+Enhance debugfs so that when copying a sparse file from a native file
+system into the file system image using the "write" command, it will
+create a sparse file into the destination file system.
+
+Enhanced debugfs so it can support a command line which is up to 8k
+long.
+
+E2image will refuse (unless the -f option is specified to force the
+issue) to create a raw or qcow image using a mounted file system,
+unless the -f option is specified to force the issue.
+
+E2image has been optimized for using it to efficiently copy a file
+system by only copying the allocated blocks, by using the options -ra.
+New options (-o and -O) have been added so that a source and
+destination offset can be given. The -p option will print progress
+information so the user will know how far along the copy is going.
+And finally, the new option -c is useful for updating a file system on
+an SSD, by avoiding unnecessary writes. E2image can also shift a file
+system image by doing an in place move.
+
+Fix a regression introduced in 1.42.8 which would cause e2fsck to
+erroneously report uninitialized extents past the EOF (as determined by
+i_size) to be invalid.
+
+Fixed resize2fs so under a corner case when an inode has a complex
+extent tree, it will not corrupt an interior node in the extent tree.
+
+Fixed resize2fs which would sometimes corrupt a file system when
+shrinking a file system to a minimum size using resize2fs -M.
+(Addresses Debian Bug: #660793)
+
+Fixed resize2fs so that it will relocate inode table blocks if this
+becomes necessary when shrinking the file system.
+
+Fixed resize2fs and e2fsck so they will not crash when hit a failure
+while operating on a file system with the MMP feature enabled.
+
+Fixed a bug in debugfs which caused it create an invalid inode when
+trying to write a zero-length file.
+
+E2fsck will no longer crash if it tries to delete an invalid
+extent-mapped symlink.
+
+E2fsck will no longer crash if it comes across an directory which is
+larger than 2GB (which is not allowed in valid file systems).
+
+Fixed debugfs's help texts to fully document all options and otherwise
+be more helpful.
+
+Updated/fixed various man pages. (Addresses Debian Bugs: #586218,
+#669730, #698076)
+
+Fixed various Debian Packaging Issues (#698879, #721365)
+
+
+Programmer's Notes
+------------------
+
+Fix sparse, gcc -Wall and clang nits.
+
+Update config.{guess,sub} to the latest version
+
+Fixed various memory and file descriptor leaks on various error paths,
+as well as some missing error return checks, which were found using
+Coverity.
+
+Run sparse against source files when building e2fsprogs with 'make
+C=1'. If instead C=2, it configures basic ext2 types for bitwise
+checking with sparse, which can help find the (many many) spots where
+conversion errors are (possibly) happening.
+
+Allow the regression test to be run in chrooted environments where
+/etc/mtab might be missing.
+
+The ext2fs_punch() function, which was introduced in 1.42, was broken
+in many ways, but this was never noticed since it wasn't used for
+anything significant. Some of the bugs include failing when trying to
+punch a completely sparse file, failing when punching an extent-mapped
+inode when the starting block was at the beginning of the inode, and
+not being able to punch a single block (where start_blk == end_block).
+It also didn't handle being passed an invalid, too-large ending block
+number, and didn't handle properly terminate at the right place when
+operating on an indirect-mapped inode.
+
+Fixed some minor typo's in the error catalog for libext2fs.
+
+Fixed ext2fs_file_set_size2() so that if it truncates an inode by
+setting the file size, to zero the rest of the block to the end of the
+file, so that if an ext4 FUSE driver tries to extended the file, that
+we don't avoid stale data from being returned.
+
+Fixed ext2fs_bmap() to disallow clients from trying to map or set
+logical blocks which are larger than what an extent-mapped or indirect
+block-mapped inode can allow.
+
+If debugfs (or some userspace program using libext2fs) creates a file
+which is larger than 2GB, make sure the large_file feature flag gets
+set.
+
+Fix a bug in ext2fs_link() where if there is multiple empty slots in the
+directory which are large enough, the directory entry could get
+inserted more than once in the directory.
+
+If quota support is disabled (which is the default), make sure that
+all traces of the quota support is removed from usage messages, man
+pages, and tune2fs must not be able to enable the quota file system
+feature. (Addresses Red Hat Bugzilla: #1010709)
+
+The ext2fs_file_write() now updates i_size on a successful write,
+instead of only updating i_size wen the file is closed via
+ext2fs_file_close().
+
+Added a shell script, populate-extfs.sh which uses debugfs to populate
+an ext2/3/4 file system image from a given directory. It is similar
+to the genext2fs program, but it supports ext3 and ext4 file system.
+
+Add changes to the libext2fs library to support block group
+descriptors larger than 64 bytes (for future compatibility).
+
+Fixed an off-by-one bug in ext2fs_file_set_size2() so that it will not
+leave an extra block in the file when truncating the file down to
+size.
+
+The html version info pages are now built using makeinfo --html
+instead of the unmaintained and now-obsolete texi2html program.
+
+
+E2fsprogs 1.42.8 (June 20, 2013)
+================================
+
+As a part of mke2fs's option parsing cleanup, the use of the -R option
+will give a warning that it is deprecated (it has been so documented
+since 2005) and -E should be used instead.
+
+Mke2fs will not give warnings about the bigalloc and quota options in
+quiet mode.
+
+If an invalid journal size is given to mke2fs, it will now complain
+and exit sooner.
+
+Debugfs was erroneously giving spurious error messages for certain
+extent_inode subcommands which take arguments (split_node,
+replace_node, and insert_node). This has been fixed.
+
+Fix the parsing of the 's' (sectors) in parse_num_blocks2, which among
+other programs is used by mke2fs.
+
+Change mke2fs so that it does not set the root directory to the real
+uid/gid of the mke2fs process. Add the extended option root_owner to
+override this behavior.
+
+Fix resize2fs when shrinking file systems to make sure that bitmap
+blocks aren't left outside the bounds of the shrunken file system.
+This could happen with flex_bg file systems that were grown using
+the old online resizing algorithm.
+
+E2fsck will now detect and repair corrupted extent trees which contain
+invalid extents at the end of the extent tree leaf block.
+
+E2fsck will now longer complain about zero length extended attribute
+values.
+
+Fix a regression introduced in e2fsprogs v1.42 which caused e2image -s
+to crash.
+
+Add safety check so tune2fs will not attempt to set the inode size to
+be larger than the block size.
+
+Fix e2fsck so it can check a read-only root file system with an
+external journal. (Addresses Debian Bug: #707030
+
+Fix off-line resizing of file systems with flex_bg && !resize_inode
+(Addresses Debian Bug: #696746)
+
+Fix e2image with large (> 32-bit) file systems (Addresses Debian Bug:
+#703067)
+
+Enhance chattr to allow clearing the extent flag if the kernel allows
+migrating extent based files to use indirect blocks.
+
+Update German translation.
+
+Updated/fixed various man pages. (Addresses Debian Bugs: #712429,
+#712430, #707609)
+
+Fixed various Debian Packaging Issues (Addresses Debian Bug #708307)
+
+Programmer's Notes
+------------------
+
+Use secure_getenv() in preference to __secure_getenv().
+
+Optimize CPU utilization of ext2fs_bg_has_super().
+
+Fix ext2fs_llseek() on 32-bit i386 systems to work correctly when
+SEEK_CUR is used with large files.
+
+The ext2fs_read_inode_full() function will no longer use
+fs->read_inode() if the caller has requested more than the base 128
+byte inode structure and the inode size is greater than 128 bytes.
+
+Fix build failure with --enable-jbd-debug.
+
+Clean up filtering of outputs for the regression tests by using a
+common sed script.
+
+Fix gcc -Wall and clang nits.
+
+
+E2fsprogs 1.42.7 (January 21, 2013)
+===================================
+
+Add warnings to mke2fs, resize2fs, and tune2fs that the bigalloc and
+quota features are still under development. For more information
+please see:
+ * https://ext4.wiki.kernel.org/index.php/Bigalloc
+ * https://ext4.wiki.kernel.org/index.php/Quota
+
+Add some new options to filefrag from Lustre's patches to e2fsprogs:
+ * add -k option to print extents in kB-sized units (like df -k)
+ * add -b {blocksize} to print extents in blocksize units
+ * add -e option to print extent format, even when FIBMAP is used
+ * add -X option to print extents in hexadecimal format
+
+Fix resize2fs so that it can handle off-line resizes of file systems
+with the flex_bg feature but without a resize_inode (or if we run out
+of reserved gdt blocks). This also fixes a problem where if the user
+creates a filesystem with a restricted number of reserved gdt blocks,
+an off-line resize which grows the file system could potentially
+result in file system corruption.
+
+Fix a resize2fs bug which could cause it to corrupt bigalloc file
+systems when doing an off-line resize.
+
+Further optimize resize2fs so it doesn't use quite as much CPU when
+resizing very large file systems.
+
+Fixed 32-bit overflow bugs which could cause resize2fs to fail and
+possibly corrupt the file system while resizing 64-bit file systems.
+
+Fix a bug in mke2fs where parsing "-E resize=NNN" will result in a
+mke2fs crash due to a divide-by-zero if the 64bit file system feature
+is enabled.
+
+Add better error checking to mke2fs to check for invalid parameters
+when creating bigalloc file system.
+
+When creating bigalloc filesystems, the -g option to mke2fs will now
+specify the number of clusters per block group.
+
+Add to debugfs the functionality to corrupt a specific file system
+block via the "zap_block" command.
+
+Add to debugfs the functionality to print out a hex dump of a block in
+the file system via the "block_dump" command.
+
+Add to debugfs the functionality to manipulate the extent tree
+directly via the "extent_open" command.
+
+Fixed debugfs's mknod command so that it updates the block group
+statistics.
+
+Fix e2fsck so it can detect and fix inconsistencies in the interior
+nodes of an inode's extent tree.
+
+Fix a potential memory corruption failure in e2fsck's error path if
+the call to ext2fs_open2() fails.
+
+Fix e2fsck if its logging function is enabled in e2fsck.conf, and the
+resulting file name for the log file is longer than 100 bytes, that it
+properly handles this situation instead of crashing.
+
+E2fsck will now report the amount of memory that it attempted to
+allocate when a memory allocation request fails, to make it easier to
+track down the problem.
+
+Fix mke2fs's handling of the mmp_update_interval option. (Addresses
+Lustre Bug: LU-1888)
+
+E2image can now include all data blocks in the e2image output file
+when the user specifies the -a option.
+
+If e2fsprogs is compiled without --enable-quota, make sure that
+tune2fs can not turn on the feature for new-style quota support, since
+afterwards, none of the e2fsprogs tools will be willing to touch that
+file system.
+
+Optimize e2fsck's so that it uses much less CPU for large file
+systems. This can result in significant speedups, especially on
+CPU-constrained systems. This was primarily done by optimizing
+libext2fs's bitmap functions. (Addresses Google Bug: #7534813)
+
+Fix debugfs's htree command so that all its messages are sent through
+the pager.
+
+Fixed debugfs's "dump_file" and "cat" functions work correctly
+on file systems whose block size is greater than 8k.
+
+Fix e2freefrag so it works on 64-bit file systems, and so it uses much
+less memory. (Addresses Google Bug: 7269948)
+
+Update the spd_readdir.c file in the contrib directory to include some
+additions which were made in 2008 that didn't get folded into the
+version which we checked into the e2fsprogs source tree. These
+enhancements include thread safety, support for readdir64_r(), and
+safe_getenv() support in case spd_readdir.so is used for setuid binaries.
+
+Update Czech, Dutch, French, German, Polish, Swedish, and Vietnamese
+translations
+
+Add a command to debugfs to create symlinks.
+
+Document the bigalloc feature in the mke2fs man page. (Addresses
+Debian Bug: #669730)
+
+
+Programmer's Notes
+------------------
+
+Fix gcc -Wall nits.
+
+Fix a spelling typo in the libext2fs texinfo documentation.
+
+Change the output from "make check" so that tools such as emacs's "M-x
+compile" does not mistake the output as containing a compiler error.
+
+Export two new functions from libext2fs: ext2fs_extent_node_split()
+and ext2fs_extent_goto2().
+
+The ext2fs_extents_fix_parents() was fixed so it does not modify the
+location of the extent handle if its current location is at an
+interior node, rather than a leaf node of an inode's extent tree.
+
+Add a regression test to assure that e2fsck can correctly fix an
+inconsistent interior node in an inode's extent tree.
+
+The ext2fs_{mark,unmark,test}_block_bitmap_range2() functions now
+correctly support bigalloc file systems which use store block usage
+information in units of clusters.
+
+Fixed the help text in the configure script for --enable-quota.
+
+The m68k-specific bitops code has been removed since they were
+incorrectly treating bit numbers with the high bit set as signed
+integers. Furthermore, modern compilers do a good enough job
+optimizing the generic code there is no point in having the m68k
+specific asm statements.
+
+Fixed how we link the test programs so they always use the static
+libraries, so that we test using the libraries which we have just
+built.
+
+Update config.guess and config.sub to the latest versions from the GNU
+project.
+
+Fixed the com_err.texinfo file so that it can produce a valid
+postscript/pdf printed output.
+
+Add a regression test which checks debugfs's ability to create
+symlinks, named FIFO's, and device nodes.
+
+Add a function ext2fs_symlink(), which creates symlinks to the
+libext2fs library.
+
+Add debugging code so we can test old kernel interfaces for online
+resize to resize2fs. This backwards compatibility checking is keyed
+off of the RESIZE2FS_KERNEL_VERSION, which is designed to allow us to
+test the functionality of the kernel's older resize ioctls without
+needing to install an old version of resize2fs, and to also test a
+modern resize2fs's ability to work with older kernels without having
+to install an older version of the kernel.
+
+
+E2fsprogs 1.42.6 (September 21, 2012)
+=====================================
+
+When mke2fs creates file systems with lazy itable initialization, the
+progress updates for writing the inode table happens so quickly that
+on a serial console, the time to write the progress updates can be the
+bottleneck. So mke2fs will now only update its progress indicators
+once a second.
+
+Resize2fs will skip initializing the inode tables if the kernel
+supports lazy_itable_init, which speeds up growing off-line growth of
+uninit_bg file systems significantly. Resize2fs will now also
+correctly set the itable_unused field in the block group descriptor to
+speed up the first e2fsck after the file system is grown.
+
+Resize2fs has been fixed so that on-line resizing of meta_bg file
+systems work correctly. This is needed to grow file system which are
+larger than 16T.
+
+Resize2fs will now correctly handle resizing file systems to 16TB on
+32-bit file systems when "16TB" is specified on the command line.
+
+Fix mke2fs so that it will be careful to set the reserved blocks ratio
+larger than 50%; this can happen when creating small file systems and
+when the last block group is dropped because there are not enough
+blocks to support the metadata blocks in the last block group.
+
+Fixed spelling mistake in debugfs's help message.
+
+Fixed a potential seg fault in e2fsck when there is an I/O error while
+reading the superblock.
+
+Fixed various Debian Packaging Issues (Addresses Debian Bug #677497)
+
+Updated/fixed various man pages. (Addresses Sourceforge Bug:
+#3559210)
+
+Programmer's Notes
+------------------
+
+The configure option --enable-relative-symlink was broken so that it
+needed to be --enable-symlink-relative-symlinks. We will support both
+for at least two years, but then the wrong configure option will be
+removed.
+
+Fixed a regression introduced in 1.42.5 so the link order for
+e2fsprogs' libraries will be correct for both static and shared
+linking. (Addresses Sourceforge Bug: #3554345)
+
+Add support for e2fsprogs to be compiled using clang/LLVM.
+
+Fix portability problems on non-Linux systems: avoid compile failures
+on systems that don't have malloc.h
+
+Fix f_mmp regression test suite so that debugfs gets killed if the
+test is interrupted.
+
+
+
+E2fsprogs 1.42.5 (July 29, 2012)
+================================
+
+Fixed a bug with mke2fs where if there is only 8 inodes per block
+group, the calculation of the number of uninitialized inodes in the
+first block group would go negative. This resulted in "mke2fs -N 256
+-t ext4 /tmp/foo.img 256m" trying to write so many blocks that /tmp
+would run out of space. (Addresses Sourceforge Bug: #3528892)
+
+Fixed a bug in how e2fsck would uniquify directory entry names.
+(AddressesSourceforge Bug: #3540545)
+
+Previously, e2fsck would only allow a mounted file system to be
+checked if it was the root file system and it was mounted read-only.
+Now it will allow any file system mounted read-only to be checked if
+the -f option is specified. This makes it easier to test how e2fsck
+handles checking file systems which are mounted without having to test
+on the root file system.
+
+Fixed a problem if e2fsck where if the root file system is mounted
+read-only, e2fsck would not clear an error indication in the journal
+superblock. Combined with a kernel bug, this would cause the e2fsck
+to check the file system after every single boot.
+
+The e4defrag program can now handle device symlinks, such as
+/dev/mapper/testvg-testlv, instead of insisting on a less
+human-friendly name such as /dev/dm-2. (Addresses Red Hat Bugzilla:
+#707209)
+
+Fixed filefrag so it will not crash with a segfault on files from a
+virtual file system such as /proc. (e.g., "filefrag
+/proc/partitions")
+
+Fixed filefrag so that it correctly reports the number of extents.
+(Addresses Red Hat Bugzilla: #840848)
+
+Fixed a file descriptor leak in logsave which could cause it to hang.
+(Addresses Debian Bug: #682592)
+
+Fixed e2fsck so that the file system is marked as containing an error
+if the user chooses not to fix the quota usage information.
+
+Fixed tune2fs so that it correctly removes the quota feature when the
+last quota inode is removed.
+
+Fix tune2fs so that after removing a quota inode, the block bitmap is
+updated; otherwise, e2fsck would complain after running 'tune2fs -O
+^quota <dev>'.
+
+Fix tune2fs so that when converting a file system from using legacy
+quota files to the new quota file system feature with hidden quota
+files, the accounting for these files is handled correctly so that
+e2fsck doesn't complain.
+
+Improved e2fsck's verbose reporting statistics, and allow the more
+verbose reporting to be enabled via /etc/e2fsck.conf.
+
+Fixed various Debian Packaging Issues (Addresses Debian Bug #678395)
+
+Updated/fixed various man pages. (Addresses Debian Bugs: #680114)
+
+
+Programmer's Notes
+------------------
+
+Fixed portability problems on other operating systems (e.g., Hurd and
+FreeBsd) caused by the attempted inclusion of <sys/quota.h>.
+
+Make sure that shared libraries link with the shared libraries built
+in the build tree, instead of the system provided libraries.
+Previously, libraries and executables were linked with the system
+libraries if present, and possibly using static archives instead of
+shared libraries. This was also problematic since if libext2fs.so is
+linked with a static libcom_err.a from system, the build system would
+attempt to link without -lpthread. (Addresses Sourceforge Bug:
+#3542572)
+
+
+E2fsprogs 1.42.4 (June 12, 2012)
+================================
+
+Fixed more 64-bit block number bugs (which could end up corrupting
+file systems!) in e2fsck, debugfs, and libext2fs.
+
+Fixed e2fsck's handling of the journal's s_errno field. E2fsck was
+not properly propagating the journal's s_errno field to the superblock
+field; it was not checking this field if the journal had already been
+replayed, and if the journal *was* being replayed, the "error bit"
+wasn't getting flushed out to disk.
+
+Fixed a false positive complaint by e2fsck if all of the extents in
+the last extent tree block are uninitialized and located after the end
+of the file as defined by i_size.
+
+The dumpe2fs will now display the journal's s_errno field if it is
+non-zero, and it will also display the journal's 64-bit feature flag
+if present.
+
+Fix e2fsck so that it always opens the device file in exclusive mode
+when it might need to modify the file system, and never if the -n
+option is specified. (Previously, there were a few corner cases where
+it might get things wrong in either direction.)
+
+E2fsck now correctly truncates or deallocates extent-mapped inodes on
+the orphan list. The root cause was a bug in libext2fs's block
+iterator which could end up skipping an extent when the last block in
+an extent is removed, causing the current extent to be removed from
+the extent tree.
+
+E2fsck now correctly sets the global free block and inode counts when
+truncating or removing inodes on the orphan list in preen mode.
+Previously, it would leave these values would be set incorrectly,
+which is largely a cosmetic issue since the kernel no longer pays
+attention to those fields, but it can cause spurious complaints in
+subsequent e2fsck runs.
+
+Fix i_blocks accounting when the libext2fs library needs to add or
+remove an extent tree block on bigalloc file systems.
+
+The lsattr and chattr programs now support the No_COW flag for the
+benefit of btrfs.
+
+Debugfs now interprets date strings of the form @ddd as ddd seconds
+after the beginning of the epoch. This is handy when setting an inode
+number into the d_time field when debugging orphan list handling.
+
+Fix a precedence bug with built-in quota support which might result in
+e2fsck paying attention to the quota inode field even if the built-in
+quota feature flag is not set. Fortunately, in practice that
+superblock field should be zero for non-built-in quota file systems,
+so it's unlikely this bug would have caused problems.
+
+Updated/fixed various man pages. (Addresses Debian Bugs: #674453,
+#674694)
+
+Programmer's Notes
+------------------
+
+The regression test suite can now run the integration tests in the
+tests directory in parallel, via "make -jN check".
+
+Add new test, f_zero_extent_length which tests e2fsck's handling of
+the case where all of the extents in the last extent tree block are
+uninitialized extents after i_size.
+
+Add a new test, f_jnl_errno, which checks handling of an error
+indication set in the journal superblock.
+
+Fix the test f_jnl_64bit so that it properly checks e2fsck's handling
+of a 64-bit journal.
+
+Add two tests, f_orphan_indirect_inode and f_orphan_extent_inode which
+tests e2fsck's handling of orphan inodes in preen mode, and truncation
+of extent inodes on the orphan list.
+
+Fixed more OS X portability issues.
+
+
+E2fsprogs 1.42.3 (May 14, 2012)
+===============================
+
+Fix a bug in the Unix I/O manager which could cause corruption of file
+systems with more than 16TB when e2fsprogs is compiled in 32-bit mode
+(i.e., when unsigned long is 32-bits). Also fix a bug which caused
+dumpe2fs to incorrectly display block numbers > 32-bits.
+
+Improve the support for integrated quota files (where quota is a first
+class supported feature using hidden files in the ext4 file system).
+Previously the quota file was getting rewritten even when it was not
+necessary, and e2fsck would erroneously try to hide quota files which
+were already hidden.
+
+Quiet complaints in e2fsck when the total free blocks or inodes are
+incorrect in the superblock after an system crash, since we don't
+update nor depend on the superblock summaries at each commit boundary.
+
+Fixed a regression introduced in 1.42.2 which would cause applications
+outside of e2fsprogs which did not pass the EXT2_FLAG_64BIT (and so
+would were still using the legacy 32-bit bitmaps) to crash. This was
+due to missing 32-bit compat code in side the function
+ext2fs_find_first_zero_generic_bmap(). (Addresses Red Hat Bugzilla:
+#808421)
+
+Fix a bug which would cause mke2fs to fail creating the journal if
+/etc/mtab and /proc/mounts are missing. (Addresses Sourceforge Bug:
+#3509398)
+
+Updated/fixed various man pages.
+
+Update Czech, Dutch, French, German, Polish, Swedish, and Vietnamese
+translations
+
+Fixed various Debian Packaging issues.
+
+
+Programmer's Notes
+------------------
+
+Change the nonsensically wrong types in the function signature of the
+inline function ext2fs_find_first_zero_block_bitmap2(). This was
+caused by a cut and paste error; fortunately no code in e2fsprogs used
+this inline function, and there are any users of this functions
+outside of e2fsprogs.
+
+Add support for systems which have valloc(), but which do have
+posix_memalign() nor memalign() (such as MacOS 10.5).
+
+Refactor and clean up the allocation of aligned buffers for Direct I/O
+support. Previously some allocations were requesting a greater
+alignment factor that what was strictly necessary. Also optimize
+reading and writing bitmaps using Direct I/O when the size of the
+bitmap did not fully cover the file system blocksize.
+
+Reserve the codepoints for the INCOMPAT features LARGEDATA and
+INLINEDATA.
+
+Improved the regression test suite by adding some new integration
+tests (f_jnl_32bit, f_jnl_64bit) which detect breakage of the on-disk
+jbd2 format, as well as f_eofblocks which tests the new handling of
+uninitialized and initialized blocks beyond i_size. Also add a new
+unit test which verifies 32-bit bitmaps support and the new
+find_first_zero primitives.
+
+Add a few dependencies to fix parallel (make -j) builds.
+
+Removed bash'isms which were breaking the regression test suite on
+systems where /bin/sh is not bash.
+
+The config.guess and config.sub have been updated to the 2012-02-10
+version.
+
+Fix a portability problem caused by assuming the present of mntent.h
+means that setmntent() exists. Instead, explicitly test for this in
+the configure script.
+
+If the sys/signal.h header file does not exist, don't try to include
+it, since it's not available on all systems.
+
+Add support for systems that do not support getpwuid_r()
+
+The configure script now supports a new option,
+--enable-relative-symlinks, which will install relative symlinks for
+the ELF shared library files. (Addresses Sourceforge Bug: #3520767).
+
+When building BSD shared libraries make sure the LDFLAGS variable is
+passed to the linker. Fixing this allows, for example, e2fsprogs to
+be built in 32-bit mode on Mac OS X Lion (Addresses Sourceforge Bug:
+#3517272)
+
+Fix gcc -Wall nitpicks
+
+
+E2fsprogs 1.42.2 (March 27, 2012)
+=================================
+
+The resize2fs program uses much less CPU and is much faster for very
+large file systems. (Addresses Debian Bug: #663237)
+
+The seti and freei commands in debugfs can now take an optional length
+argument to set and clear a contiguous range of inodes.
+
+E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we
+plan to remove support for it from the kernel file system driver. It
+really wasn't very useful and was causing more problems than it
+solves. Since e2fsck will complain if inodes that should have
+EOFBLOCKS_FL do not have the flag set, we are going to remove this
+check from e2fsprogs first, and then only remove the flag from the
+kernel much later.
+
+The mke2fs program can now use direct I/O via "mke2fs -D". This will
+slow down the mke2fs, but it makes it more polite on a loaded server
+by limiting the amount of memory that gets dirtied by mke2fs when it
+is using buffered I/O.
+
+E2fsck was needlessly closing and re-opening the file system as a side
+effect of adding Multiple Mount Protection (MMP). This isn't
+necessary for non-MMP file systems, so drop it.
+
+Print errors returned by ext2fs_open2() and ext2fs_check_desc() so we
+can more easily diagnose memory allocation failures caused by
+insufficient memory. E2fsck will now abort if there are memory
+allocation failures when the file system is initially opened and
+during the block group descriptor checks. (Addresses Google Bug:
+#6208183)
+
+If there are incorrect block group checks, e2fsck will now report the
+incorrect and corrected checksum values.
+
+The e2fsck program can now write log files containing the details of
+the problems that were found and fixed directly, via configuration
+parameters in /etc/e2fsck.conf.
+
+Added the ability to limit the number of messages reported by e2fsck
+for a given problem type. This avoids a potential bottleneck if there
+is a serial console which can cause a boot sequence to take a long
+time if e2fsck needs to report many, many file system errors.
+
+The dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which cause
+them to use much less memory for large file systems.
+
+The dumpe2fs program will now print the expected block group checksum
+if it is incorrect. This helps to diagnose problems caused by
+incorrect block group checksums.
+
+E2fsck now checks for extents with a zero length, since the kernel
+will oops if it comes across such a corrupted data structure. (See
+https://bugzilla.kernel.org/show_bug.cgi?id=42859)
+
+E2fsck has a number of bugs relating to discard that have been fixed.
+(1) Fixed a bug which could cause e2fsck to discard portions of the
+inode table which were actually in use. (2) E2fsck will now avoid
+using discard if the block device doesn't zero data on discard, since
+otherwise this could cause problems if the file system gets corrupted
+in the future. (3) E2fsck will now avoid using discard when it is run
+in read-only mode. (4) Fixed a bug which caused e2fsck to not issue
+discards in the last block group.
+
+E2fsck's CPU utilization in pass 5 has been optimized, which will
+speed up e2fsck slightly.
+
+E2image will now skip copying uninitialized bitmap and inode table
+blocks.
+
+Fixed mke2fs -S so it does not corrupt the first block group's
+information.
+
+E2fsck will now check the new sysfs interface to determine if we are
+using the battery or AC mains. (Addresses SourceForge Bug: #3439277)
+
+Updated/fixed various man pages. (Addresses Debian Bug: #665427)
+
+Fixed various Debian Packaging issues. (Addresses Debian Bug: #665885)
+
+Programmer's Notes
+------------------
+
+Fixed various portability issues for non-Linux systems, particularly
+MacOS X, as well as Linux systems running with the just-released glibc
+2.15.
+
+Fix file descriptor leak in ext2fs_close() if the file system with
+uninit_bg is opened read/only with a backup superblock. (Addresses
+SourceForge Bug: #3444351)
+
+Fixed an invalid return in a non-void function in the quota code.
+(Addresses SourceForge Bug: #3468423)
+
+Fixed the debian rules file so that the calls to dpkg-buildflags works
+when the shell is dash.
+
+The debian package build now uses V=1 so that there is more
+information about potential build failures in debian build logs.
+
+If the uninit flags get cleared by functions such as
+ext2fs_new_inode() or ext2fs_new_block2(), we now make sure the
+superblock is marked dirty and the block group descriptor checksum is
+updated if necessary.
+
+The debian rules file will now try to load debian/rules.custom of it
+exists. This file can skip various builds for speed reasons if there
+is no need for the e2fsck-static or udeb packages. Available
+customizations in the rules file includes SKIP_STATIC=yes,
+SKIP_BF=yes, and SKIP_DIETLIBC=yes.
+
+In addition, if the file misc/mke2fs.conf.custom.in exists in the
+source tree, it will be used instead of the standard misc.conf file in
+the upstream sources. This makes it easier for Debian-derived systems
+to distribute a custom mke2fs.conf file without having to worry about
+merge issues if future versions of e2fsprogs makes changes in the
+upstream default version of mke2fs.conf.
+
+
+E2fsprogs 1.42.1 (February 17, 2012)
+===================================
+
+The mke2fs and e2fsck now use significantly less memory when creating
+or checking very large file systems. This was enabled by adding
+extent-based bitmaps which are stored using a red-block tree, since
+block and inode allocations tend to be contiguous.
+
+The command mke2fs -S is used as a last ditch recovery command to
+write new superblock and block group descriptors, but _not_ to destroy
+the inode table in hopes of recovering from a badly corrupted file
+system. So if the uninit_bg feature is enabled, mke2fs -S will now
+set the unused inodes count field to zero. Otherwise, e2fsck -fy
+after using mke2fs -S would leave the file system completely empty.
+
+Since mke2fs recognizes mke3fs in argv[0] to mean "mkfs.ext3", also
+honor "mke4fs" to work the same as "mke2fs.ext4", since RHEL5 has
+installed an mke2fs binary using that name.
+
+The usage and help messages for the -G, -t and -T options in mke2fs
+have been fixed.
+
+If e2fsck needs to use the backup group descriptors, the
+ext2fs_open2() function clears the UNINIT bits to ensure all of the
+inodes in the file systems get scanned. However, the code which reset
+the UNINIT flags did not also recalculate the checksum, which produced
+many spurious (and scary) e2fsck messages. This has been fixed by
+resetting checksums when the UNINIT bits are cleared.
+
+Relax a check in e2fsck which required that the block bitmap to be
+initialized when the inode bitmap is in use. This will allow us to
+eventually eliminate code from the kernel which forcibly initialized
+the block bitmap when the inode bitmap is first used, requiring an
+extra journal credit and disk write. (Addresses Google Bug: #5944440)
+
+Make sure rdebugfs (which may be installed setuid or setgid disk) does
+not honor environment variables if euid != uid or egid != gid.
+
+Debugfs's ncheck command has been optimized and now is much more
+robust with faced with corrupted file systems. The ncheck command
+also now has a -c option which will verify the file type information
+in the directory entry to see if matches the inode's mode bits. This
+is extremely useful when trying to use debugsfs to determine which
+parts of the file system metadata can be trusted.
+
+E2image will try to use ftruncate64() to set the i_size for raw
+images, instead of writing a single null byte. This avoid allocating
+an extra block to the raw image, for those file systems and/or
+operating systems that support this. (Linux does.) In addition, fix
+a logic bug that caused the file to not be properly extended if the
+size of the last hole was exactly an multiple of a megabyte.
+
+Fixed a bug in resize2fs where for 1k and 2k file systems, where
+s_first_data_block is non-zero, this wasn't taken into account when
+calculate the minimum file system size for use with the -M option.
+
+Fixed the badblocks program to honor the -s flag when in read-only -t
+mode. (Addresses Debian Bug #646629)
+
+Update Czech, Dutch, French, Polish, and Swedish translations from the
+Translation Project.
+
+Fixed various Debian Packaging issues so that dpkg-buildflags is used
+if present, which allows e2fsprogs to be built with security hardening
+flags. (Addresses Debian Bugs: #654457)
+
+Programmer's Notes
+------------------
+
+Fix a bug in ext2fs_clear_generic_bmap() when used for 32-bit bitmaps.
+This was only an issue for programs compiled against e2fsprogs 1.41
+that manipulate bitmaps directly. (Addresses Sourceforge Bugs:
+#3451486)
+
+The libext2fs library now uses sysconf() to fetch the page size, instead
+of the deprecated getpagesize().
+
+The ext2fs_get_pathname() function will return a partial path if an a
+directory in the path is not a directory, displaying it as an inode
+number in angle brackets instead of giving up and displaying an error.
+This is much more helpful when a user is trying to debug a corrupted
+file system.
+
+Codepoints for the RO_COMPAT_REPLICA feature has been reserved.
+
+Added a new library function, ext2fs_file_get_inode_num(), for use by
+fuse2fs.
+
+Fixed a bug in ext2fs_file_set_size2() so that when it is truncating a
+file, it actually works.
+
+The block iterator now properly honors the BLOCK_ABORT flag for
+extent-based flags. Previously, it didn't, which generally made code
+be less efficient, but it could cause bugs in ext2fs_link(), for
+example, by causing it to insert multiple directory entries.
+
+Fixed an (harmless other than causing a compiler warning) use of an
+uninitialized variable in e2fsck's MMP code.
+
+
+E2fsprogs 1.42 (November 29, 2011)
+==================================
+
+This release of e2fsprogs has support for file systems > 16TB. Online
+resize requires kernel support which will hopefully be in Linux
+version 3.2. Offline support is not yet available for > 16TB file
+systems, but will be coming.
+
+This release of e2fsprogs has support for clustered allocation. This
+reduces the number of block (now cluster) bitmaps by allocating and
+deallocating space in contiguous power-of-2 collections of blocks,
+which are called clustered. This is a file system level feature,
+called 'bigalloc', which must be enabled when the file system is
+initially formatted. It is not backwards compatible with older
+kernels.
+
+Added support for the Multi-Mount Protection (MMP) feature.
+
+E2fsck more efficiently uses scratch files for really big file
+systems. (This is a feature that has to be turned on explicitly; see
+[scratch_files] in the e2fsck.conf man page.)
+
+Fix a bug in e2fsck where if the free blocks and inodes counts are
+incorrect, e2fsck would fix them without printing an error message.
+This would cause a "*** FILE SYSTEM WAS MODIFIED ***" message without
+any explanation of what was fixed.
+
+E2fsck will no longer attempt to clone an extended attribute block in
+pass1b handling if the file system does not support extended
+attributes.
+
+E2fsck will be more careful accidentally asking the user to continue
+if the file system is mounted, so that an escape sequence won't cause
+a false positive. (Addresses Debian Bug: #619859)
+
+E2fsck now uses less cpu time in pass 5 when large portions of the
+bitmaps are uninitialized.
+
+E2fsck will no longer segfault when a corrupted file system has a bad
+extent, and removing it leads to a block needing to be deallocated.
+(Addresses SourceForge Bug: #2971800)
+
+E2fsck will catch termination signals (segfaults, bus errors, sigfpe)
+and print debugging information to make it easier to find potential
+problems.
+
+E2fsck will check to see if the bad block inode looks insane, and will
+skip trying to use if it certain fields which should be zero look
+non-zero. This is to avoid a corrupted bad block inode causing e2fsck
+to get confused and do more harm than good.
+
+If e2fsck modifies certain superblock fields which the kernel doesn't
+look at, it will now mark the superblock as dirty without marking the
+file system as changed. This avoids signaling the init scripts that
+a reboot is necessary, since the kernel isn't going to look at those
+fields, so it won't care if they have been changed.
+
+Fixed a bug in the libext2fs library (in the binary search routine of
+the icount abstraction) that could (very, very rarely) cause e2fsck to
+die in the middle of pass 1 or pass 2 processing.
+
+E2fsck will not try to do a discard operation if the -n option was
+specified on the command line.
+
+E2fsck now supports an extended "discard" option which will cause
+e2fsck to attempt discard all unused blocks after a full, successful
+file system check.
+
+E2fsck will check for the bad block inode to make sure it looks sane
+before trusting it, to avoid causing more harm than good to the file
+system.
+
+E2fsck now returns additional status bits in its exit code if it
+aborts early in the e2fsck run.
+
+E2fsck now correctly calculates the maximum file size in the case of
+the huge_file file system feature enabled without extents.
+
+The mke2fs and e2fsck programs now tries to use the punch hole command
+as a "discard" when operating on normal files.
+
+The e2image program now supports the qcow2 format, which is a more
+efficient way of capturing file system dumps.
+
+Mke2fs now supports the [devices] stanza in mke2fs.conf which allows
+per-device defaults to be specified in the configuration file.
+
+Mke2fs now supports the reserved_ratio relation in the [defaults] and
+[fs_types] section in mke2fs.conf.
+
+Mke2fs now creates extent-mapped directories for the root and
+lost+found directories.
+
+Mke2fs will skip zero'ing the journal if the extended option
+"lazy_journal_init" is specified. This can save a lot of time, but it
+does add a small amount of risk if the system crashes before the
+journal is overwritten entirely once. It is especially useful for
+testing.
+
+Mke2fs will now create file systems that enable user namespace
+extended attributes and with time- and mount count-based file
+system checks disabled.
+
+Mke2fs will not set a stride or strip size of one block based on block
+device attributes obtained from sysfs.
+
+Mke2fs now displays a progress report during the discard process.
+
+Mke2fs now handles extreme file system parameters correctly which
+previously caused the inodes per group to drop below 8, leading to a
+segfault. (The inodes per group must be a multiple of 8, but the code
+didn't correctly deal with an inodes per group count less than 8.)
+
+Mke2fs and tune2fs previously would give an error if the user tried
+setting the stride and stripe-width parameters to zero; but this is
+necessary to disable the stride and stripe-width settings. So allow
+setting these superblock fields to zero. (Addresses Google Bug:
+#4988557)
+
+Mke2fs now gives a warning if the auto-detected block size exceeds the
+system's page size.
+
+If the enable_periodic_fsck option is false in /etc/mke2fs.conf (which
+is the default), mke2fs will now set the s_max_mnt_count superblock
+field to -1, instead of 0. Kernels older then 3.0 will print a
+spurious message on each mount then they see a s_max_mnt_count set to
+0, which will annoy users. (Addresses Debian Bug: #632637)
+
+The default mke2fs.conf now has entries for "big" and "huge", which
+are needed for very big file systems.
+
+The resize2fs program now has support for a new online resize ioctl
+that can support file systems > 16TB, once it arrives in v3.x kernels.
+
+Fixed bug which caused resize2fs to fail when shrinking an empty file
+system down to its minimal size. (Addresses Sourceforge Bug #3404051)
+
+Fixed tune2fs's mount options parsing. (Addresses Debian Bug: #641667)
+
+Allow tune2fs to remove external journals if the device can not be
+found.
+
+Debugfs's icheck will now correctly find inodes which use the
+searched-for block as an extended attribute block.
+
+Debugfs now has a new "punch" command which remove blocks from the
+middle of an inode.
+
+Debugfs now has a new "e2freefrag" command which analyzes the free
+space fragmentation of the file system, using the same code as the
+e2freefrag program.
+
+Debugfs now has a "filefrag" command which displays information about
+a file's fragmentation.
+
+Add support to build a metadata-only, read-only, stripped-down version
+of debugfs called rdebugfs.
+
+Fixed a potential stack overrun bug in debugfs.
+
+The badblocks program now correctly recovers from I/O errors when
+direct I/O is being used. The badblocks command now also supports a
+-B option which forces the use of buffered I/O, and the -v option will
+provide a more detailed breakdown of read, write, and failed
+comparison errors.
+
+Added e4defrag tool which uses the EXT4_IOC_MOVE_EXT ioctl.
+
+Added support for journals larger than 2GB.
+
+Support using both hard links and symlinks when installing e2fsprogs.
+
+Add overflow checking to tune2fs -i's fsck interval, which must fit in
+a 32-bit field.
+
+The debugfs command now has a new 'blocks' command which prints out
+data blocks of a particular inode in a format which is useful for
+scripting.
+
+Filefrag will report 0 extents correctly in verbose mode. (Addresses
+RedHat Bugzilla: #653234)
+
+Filefrag has been fixed so its -v report prints the correct expected
+block number (previously there had been an off-by-one error). In
+addition, it will now display the number of contiguous extents when -v
+is not specified. This makes it consistent with the number of extents
+printed when the -v option was specified. In addition, the number of
+contiguous extents is far more interesting/useful than the number of
+physical extents for very large files. (Addresses Debian Bug:
+#631498, #644792)
+
+Logsave's usage message has been fixed. (Addresses Debian Bug:
+#619788)
+
+Avoid an infinite loop in ext2fs_find_block_device() if there are
+symlink loops in /dev caused by a buggy udev.
+
+Added a useful "fallocate" program to the contrib directory.
+
+Fixed an ABI compatibility problem in libext2fs which broke the dump
+program. Also added back some macros which dump needed so it could
+compile against the latest version of ext2_fs.h (Addresses Debian Bug:
+#636418)
+
+Fixed parsing of MNTOPT_ options for tune2fs and debugfs (Addresses
+Debian Bug: #641667)
+
+Added internationalization support for libcom_err error table strings.
+
+Fixed various spelling mistakes found in various output strings found
+by I18N translators.
+
+Update translations: French, Chinese, Germany, Indonesian, Swedish,
+Vietnamese, Polish, Dutch, Czech. (Addresses Debian Bugs: #520985,
+#620659)
+
+Fixed various Debian Packaging issues. (Addresses Debian Bugs:
+#614662, #632169, #641838, #627535, #629355)
+
+Updated/clarified man pages. (Addresses Debian Bugs: #639411,
+#642193, #634883)
+
+Programmer's Notes
+------------------
+
+Initial support for quota as an integrated feature, where the quota
+files are hidden system files that are automatically maintained by
+e2fsck is present, although disabled by default. It must be enabled
+by using the configure option --enable-quota.
+
+Reserved the on-disk fields for the metadata checksum and snapshot
+features, which are currently in development.
+
+The ext2fs library now has the new functions ext2fs_punch(),
+ext2fs_get_memzero() and ext2fs_file_get_inode().
+
+The ext2fs library now has support for calculating the crc32c checksum
+(via the new functions ext2fs_crc32c_be and ext2fs_crc32c_le).
+
+The I/O manager now supports the discard operation.
+
+Reserved file system code points for new 1st class quota feature.
+
+Shortened the compilation lines by moving the autoconf defines to
+a config.h header file.
+
+Fixed a potential free of an uninitialized pointer in
+ext2fs_update_bb_inode().
+
+Fixed miscellaneous gcc -Wall and coverity warnings.
+
+Fixed portability issues for Mac OS X, Hurd, and FreeBSD.
+
+Fixed a build failure when OMIT_COM_ERR is defined.
+
+Improved error checking and fixed memory leaks caused by error return
+paths.
+
+Add ext2fs_flush2() and ext2fs_close2() which takes a flag to allow
+the fsync() to be skipped.
+
+Added a test for extent-mapped journals by mke2fs and tune2fs.
+
+Added a test for creating a large (over 4GB) journal using mke2fs.
+
+Added a test to make sure the inode size remains constant.
+
+The regression test script now prints the list of which tests failed.
+
+The regression test system now uses /tmp for its scratch files, which
+is often a tmpfs mounted file system and hence much faster.
+
+The i_e2image test was fixed so it works with valgrind.
+
+Tests that rely on debugfs are now skipped if debugfs wasn't built.
+
+Fixed the dependencies for "make check" so all required dependencies
+are built before running the regression tests.
+
+A link to com_err.h is installed in $(includedir) during a "make install".
+
+The po/*.gmo files are automatically rebuilt if they are missing or
+out of date. This helps out Debian packaging.
+
+Allow ext2fs_get_memalign() to compile on systems that don't have
+posix_memalign().
+
+Fixed a namespace leak in libext2fs (tdb_null).
+
diff --git a/doc/RelNotes/v1.43.0.txt b/doc/RelNotes/v1.43.0.txt
new file mode 100644
index 0000000..cf0602e
--- /dev/null
+++ b/doc/RelNotes/v1.43.0.txt
@@ -0,0 +1,234 @@
+E2fsprogs 1.43 (May 17, 2016)
+=============================
+
+Add support for the ext4 metadata checksum, checksum seed, inline
+data, encryption, project quota, and read-only features.
+
+Support for the very old, experimental, and never-added-to-mainline
+compression feature has been removed.
+
+Mke2fs will now create file systems with the metadata_csum and 64bit
+features enabled by default.
+
+The mke2fs program will now support multiple -O options (instead of
+just ignoring all but the last -O option).
+
+Mke2fs will now correctly determine the size of a file system and
+handle the discard operation correctly when the "-E offset=NNN" is
+used. (Addresses Debian Bug: #803629)
+
+The tune2fs program will ask the user for confirmation before starting
+dangerous operations if the terminal is available, and it will replay
+the journal if necessary.
+
+Add an ext2/3/4 FUSE server
+
+Debugfs can now modify extended attributes and journal transactions.
+
+Debugfs now can properly display and set extended timestamps.
+
+E2fsck will offer to fix extended timestamps that were incorrectly
+encoded by older kernels.
+
+Fix miscellaneous MMP bugs in debugfs.
+
+Fix sparse_super2 bugs in mke2fs and resize2fs.
+
+Fix or improve offset support in mke2fs, e2undo, and libext2fs.
+
+The resize2fs command can now convert file systems between 64-bit and
+32-bit mode.
+
+Fix potential out-of-bounds memory access in resize2fs when doing a
+large off-line file system grow operation.
+
+We now use a new e2undo file format which is much more efficient and
+faster than the old tdb-based scheme. Since it so much faster,
+e2fsck, tune2fs, debugfs, and resize2fs now also can support using
+creating an undo file.
+
+The mke2fs command can now set the error behavior when initializing
+the file system (so the administrator doesn't have to issue a separate
+tune2fs -e command).
+
+Teach mke2fs to parse a human-readable argument for -i option.
+
+Teach mke2fs to automatically handle creating file systems > 500T by
+automatically enable the meta_bg feature.
+
+Mke2fs will now prompt for user verification before rewriting a file
+system's superblock using the -S option.
+
+Mke2fs no longer complains if the user tries to create a file system
+using the entire block device (e.g., without using a partition). The
+minor number convention is not used by all block devices, and it's
+quite normal in some circumstances to create a file system on /dev/sdc
+instead of /dev/sdc1.
+
+Fix an "mke2fs -d" bug which could create inodes with invalid
+extended attribute blocks
+
+E2fsck is now much more paranoid about not freeing or corrupting
+critical metadata blocks, such as inode table blocks, even if
+corrupted indirect blocks or extent trees point at these blocks.
+
+E2fsck now prints block ranges in pass1b instead of listing all of the
+blocks exhaustively.
+
+E2fsck will try to expand the root directory if the lost+found can't
+be linked to the root directory. Also, offer to use the root
+directory if lost+found can't be created.
+
+E2fsck is now more paranoid handling corrupted extent trees as well as
+corrupted journals.
+
+E2fsck can now rebuild extent trees, either (a) to optimize them, (b)
+to recover from a corrupted extent tree, or (c) to convert
+block-mapped inodes to use extents.
+
+E2fsck now has a readahead mechanism which can significantly speed its
+performance, especially on RAID arrays.
+
+E2fsck now has a "yes to all" option which the user can give if she is
+tired of answering 'y' to a very large number of questions.
+
+E2fsck will now ignore the badblocks inode if the contents of the
+badblocks inode indicate that the portion inode table containing the
+badblocks inode is bad. (We must go deeper...)
+
+E2fsck can now correctly fix directory with holes on bigalloc file
+systems.
+
+E2fsck will now check for extent mapped inodes with no extent header
+and clear them if found.
+
+E2fsck now checks to make sure the extended attribute header doesn't
+result in the xattr extending beyond the bounds of the inode
+
+Fixed a bug in e2fsck to avoid overrunning a buffer containing jbd2
+revoke records if the journal is corrupted.
+
+Fixed a bug in e2fsck which could cause it loop forever if a special
+inode has too many invalid block mappings.
+
+Fixed a bug in e2fsck which could cause pass1b/c/d processing to get
+confused if an attempt to allocate a block can't find any free space
+in the file system.
+
+E2fsck will no longer try to force rewrite blocks located beyond the
+file system.
+
+The e2fsck program will no longer update the quota inodes when it is
+interrupted.
+
+Fix a bug which in rare cases would cause e2fsck -fD to corrupt an
+extent-mapped directory.
+
+Fixed a bug in resize2fs which could lead to resize2fs crashing or a
+corrupted file system if the file system is almost completely full
+when trying grow a file system and we need to allocate blocks to grow
+the block group descriptors.
+
+Fixed a bug in resize2fs which could cause it to get fooled trying to
+determine the RAID array's stride when flex_bg is enabled.
+
+Fix resize2fs bug that could leave block allocation bitmaps
+uninitialized.
+
+The dumpe2fs output has been improved so it is cleaner and always fits
+within 80 columns. Also added a more easily machine-parsable output
+of dumpe2fs.
+
+The mke2fs program can now pre-populate a file system from a directory
+hierarchy using the -d option.
+
+The mke2fs program now skips zeroing inode table blocks if they were
+already zeroed using the discard feature.
+
+Check to make sure file system features which can not be supported by
+HURD are not enabled if the file system is created to be
+HURD-compatible.
+
+Added a new e2fuzz command that will fuzz an ext4 image for testing
+purposes.
+
+The debugfs logdump command can now deal with 64-bit revoke tables
+correctly. Also, "logdump -O" will print the old log contents (before
+the journal was replayed).
+
+The debugfs bmap command can now be used to set or allocate a physical
+block.
+
+Fixed a bug so "filefrag -B -e -v" does not return a separate entry
+for each block.
+
+The filefrag program now accounts for holes in sparse files created by
+the file punch operation as an expected/optimal mapping.
+
+The file I/O functions now correctly handle inodes containing
+uninitialized blocks.
+
+Fix a bug in tune2fs so that removing uninit_bg feature on a bigalloc
+file system won't result in corrupted block bitmaps.
+
+Updated/fixed various man pages. (Addresses Debian Bug: #798425)
+
+
+Programmer's Notes
+------------------
+
+Fixed coverity, sparse, gcc -Wall, and clang warnings/nits.
+
+Added Android build files so that e2fsprogs can be built in the
+Android source tree.
+
+Reduce the use of libc functions in libext2fs that may not be present
+in the boot loader environment, at least for those functions that are
+needed by boot loaders such as yaboot.
+
+Developers can now override the debugging and optimization flags by
+redefining the CFLAGS makefile macro.
+
+The libext2fs library now has support for fallocate.
+
+The mke2fs command will now ask the user for confirmation if block
+device or image file contains an existing file system image, and
+stdout and stdin are connected to a tty.
+
+The libext2fs library now picks a more intelligent goal block when
+doing block allocations.
+
+The libext2fs library will now automatically set the BLOCK_UNINT flag
+if all of the blocks in a block group are free, to speed up future
+e2fsck and dumpe2fs operations on the file system.
+
+Add two new functions ext2fs_new_range() and ext2fs_alloc_range() to
+libext2fs.
+
+The ext2fs_zero_blocks() command will use FALLOC_FL_ZERO_RANGE for
+file-based images.
+
+The ext2fs_bmap() function supports new flags BMAP_UNINIT and
+BMAP_ZERO.
+
+The ext2fs_new_block2() function will now call the alloc_block hook
+before checking fs->block_map.
+
+Support for the MMP feature can now be disabled at compile time.
+
+Added support to manipulate extended attributes to libext2fs.
+
+Added a lot of new regression tests.
+
+Added endian annotations so it's possible to scan e2fsprogs for endian
+problems using a static code analyzer.
+
+Fixed memory leaks in libext2fs.
+
+The e2fsck jbd2 handling code has been resynced with the 3.16 kernel.
+There is now a script in the contrib directory which automates most of
+the resync process.
+
+The build system will now run cppcheck (a static code analysis tool)
+via "make C=1"
+
diff --git a/doc/RelNotes/v1.43.1.txt b/doc/RelNotes/v1.43.1.txt
new file mode 100644
index 0000000..9c27c13
--- /dev/null
+++ b/doc/RelNotes/v1.43.1.txt
@@ -0,0 +1,80 @@
+E2fsprogs 1.43.1 (June 8, 2016)
+===============================
+
+Fixed e2fsck so that it would correctly update the project quota usage
+when deleting a corrupted and inode, and fixed mke2fs so it wouldn't
+dereference memory beyond the small inode structure (which was wrong,
+but worked mostly by accident unless hardening or some security malloc
+was in use).
+
+Fixed a large number of FreeBSD portability problems. (To build on
+FreeBSD, however, we still need to use GNU Make and redirect dd to use
+GNU dd.)
+
+The configure script now supports --enable-hardening, which enables
+stack protection, fortify, read-only relocation tables, immediate
+dynamic symbol binding, and text segment ASLR (if the kernel has
+userspace ASLR support enabled) by enabling position independent
+executable code. (Distributions who want to do their own special
+thing can set CFLAGS, CFLAGS_SHLIB, CLFAGS_STLIB, LDFLAGS,
+LDFLAGS_SHLIB and LDFLAGS_STATIC as appropriate.)
+
+The configure script now supports --disable-tdb since on 64-bit
+systems, it's much faster to just enable additional swap space. The
+scratch_files feature in e2fsck.conf is mostly only useful on 32-bit
+systems.
+
+Fixed the Direct I/O fallback codepath in the Unix I/O manager so that
+read/modify/write worked correctly. Fortunately in practice (with the
+exception of the Undo handler when running on FreeBSD) used this buggy
+codepath. so file systems weren't getting corrupted.
+
+Mke2fs will now warn if the user provides a label which is too long.
+(Addresses Debian Bug: #791630)
+
+Debugfs's rdump command now works correctly when dumping the root
+directory of a file system. (Addresses Debian Bug: #766125)
+
+Fixed a bug in debugfs so it would correctly calculate a block group's
+checksum field field on 64-bit systems.
+
+E2fsck now has a much more understandable error message when the
+journal superblock is corrupt and the user declines to fix it.
+(Addresses Debian Bug: #768162)
+
+Fixed support of extended timestamps on 64-bit systems.
+
+Updated/fixed various man pages. (Addresses Debian Bugs: #766379,
+#761144, #770750, #428361, #766127)
+
+Fixed various Debian Packaging Issues. (Addresses Debian Bug: #825868)
+
+
+Programming notes
+-----------------
+
+Fixed coverity, sparse, gcc -Wall, and clang warnings/nits.
+
+Fixed Android build makefiles (which was missing a newly added file in
+lib/support).
+
+In general, checks on s_creator_os have been removed in favor of
+feature flag specific checks; if there is something that can't be
+checked via the presence of a feature flag, we will simply check
+whether the creator OS is *not* EXT2_OS_HURD which is the one
+operating system where there has been extensive abuse of the
+s_creator_os flag.
+
+The libmagic library has been suppressed when running the regression
+test suite to avoid false test failures caused by differences between
+versions of libmagic (and/or the magic number database).
+
+The tests/test_script program now accepts the --failed option, which
+will run those tests that had previously failed.
+
+Fixed tests build on those systems which require LDFLAGS to be set.
+
+Fixed the regression test suite so it will properly filter out version
+numbers with two components (such as 1.43) from log files before
+comparing them with the expected golden output.
+
diff --git a/doc/RelNotes/v1.43.2.txt b/doc/RelNotes/v1.43.2.txt
new file mode 100644
index 0000000..dafc1f2
--- /dev/null
+++ b/doc/RelNotes/v1.43.2.txt
@@ -0,0 +1,72 @@
+E2fsprogs 1.43.2 (September 1, 2016)
+====================================
+
+Fix resize2fs so it will not crash if there is an extended attribute
+block but it doesn't need to migrate any blocks during an off-line
+resize
+
+Fix a crash when mke2fs or debugfs tries to copy in a directory
+hierarchy containing an empty directory
+
+Mke2fs will now use a larger journal by default for filesystems
+greater than 128 GB. (1GB instead of 128 MB.)
+
+Fix an alignment bug in e2fsck which caused sparc64 architectures to
+crash when replaying the journal on file systems with a 64-bit block
+number.
+
+Clarify the message printed by tune2fs message when the user needs to
+run e2fsck so it's clear that the -f flag to e2fsck is needed to
+force a full e2fsck scan. (Addresses Debian Bug: #828022)
+
+Fix a bug in e2fsck caused by a power failure during e2fsck's journal
+replay could leave the file system in a state where if the file system
+is mounted without doing a full e2fsck scan, the file system could get
+corrupted
+
+Fix the logic in e2fsck which decides when to repair legacy negative
+timestamp encodings.
+
+Add a command to debugfs to copy the inode structure from one inode to
+another.
+
+Fix a typo in debugfs's stat command when printing out the dtime field
+on file systems with an extended timestamp.
+
+Fix big endian bugs in the e2undo program. (Addresses Red Hat Bug
+#1344636)
+
+Debugfs's logdump can now properly handle journals larger than 2GB.
+
+Avoid installing the man page for fuse2fs if it has not been built.
+
+Update the Catalan, Chinese, Danish, Dutch, French, German, Polish,
+Swedish, Ukrainian translations and added new translations for
+Hungarian and Serbian.
+
+
+Programming notes
+-----------------
+
+Fix portability problems in fuse2fs. Previously it wouldn't build on
+systems with older glibc versions where clock_gettime() is only
+available in the librt library, and if libintl is not bundled into the
+C library.
+
+Remove complicated logic which caused a static code analyzer to flag a
+false positive. (A static code analyzer also found a valid bug in
+deciding when to repair a legacy negative timestamp encoding, so
+eliminating false positives is important.)
+
+Fixed a bug where the ext2fs library cloud provoke when a
+extfs2_zero_blocks() is used (via fallocation, initializing a file
+system, uninitialized uninitialized inode table blocks) after a
+different file system which also used ext2fs_zero_blocks().
+
+Enable the unix_io manager in the ext2fs library so it can accept the
+use of a file descriptor. This is helpful in cases where the file
+descriptor comes from temporary file created using O_TMPFILE, or
+passed in from a unix domain socket.
+
+Fix a Windows64 portability bug.
+
diff --git a/doc/RelNotes/v1.43.3.txt b/doc/RelNotes/v1.43.3.txt
new file mode 100644
index 0000000..6b902cb
--- /dev/null
+++ b/doc/RelNotes/v1.43.3.txt
@@ -0,0 +1,27 @@
+E2fsprogs 1.43.3 (September 4, 2016)
+====================================
+
+Fix e2fsck's handling of timestamps on 32-bit systems.
+
+E2fsck will now check, and if necessary repair the extra isize fields
+in the inode and superblock.
+
+Fix crashes on architectures such as sparc64 that are sensitive to
+unaligned pointer dereferences in the journal recovery code when
+journal checksums are enabled.
+
+Programming notes
+-----------------
+
+Support reproducible builds by not capturing the build directory into
+the mk_cmds and compile_et scripts. Also fix debian build rules to
+ensure build reproducibility.
+
+Fix debian build rules to ensure build reproducibility and to avoid
+hiding the linker flags for e2fsck.static so the build hardening log
+scanner can properly audit the build.
+
+Fix compatibility with FreeBSD's pmake and teach the configure script
+to force the creation of pmake-compatible Makefiles if the
+FORCE_NATIVE_MAKE environment variable is set to a non-empty value.
+
diff --git a/doc/RelNotes/v1.43.4.txt b/doc/RelNotes/v1.43.4.txt
new file mode 100644
index 0000000..7b3f33d
--- /dev/null
+++ b/doc/RelNotes/v1.43.4.txt
@@ -0,0 +1,71 @@
+E2fsprogs 1.43.4 (January 31, 2017)
+===================================
+
+Fix e2fsck to require that the system.data extended attribute is
+always present even for files smaller than 60 bytes, to be consistent
+with the kernel.
+
+Fix a bug which was causing mke2fs -d and fuse2fs to improperly handle
+Posix ACL's.
+
+Fix a bug which could cause mke2fs -d to fail if there is an
+zero-length file in source directory tree.
+
+Clarify the default for the "proceed?" question printed by mke2fs and
+tune2fs. (Addresses Debian Bug: #852727)
+
+Debugfs will now display project quota information.
+
+Debugfs's do_set_xattr now uses C strings to parse extended attribute
+values, and will print the extended attributes using either C strings
+or hex bytes when using debugfs's do_get_xattr command. It will now
+allow developers to see the contents of the system.data extended
+attribute.
+
+Fix a bug in mke2fs where I/O errors weren't getting properly reported
+to the user.
+
+Fix multiblock writes in the unaligned Direct I/O fallback code.
+(Which is rarely needed on Linux systems, but which is required on
+Freebsd systems.)
+
+Make sure the default mke2fs.conf file includes the uninit_bg feature
+flag. (Which was accidentally dropped in v1.43).
+
+Fix a bug in resize2fs when operating on very large file systems which
+have a block size different from the VM page size.
+
+If the reported device size is absurdly large, mke2fs will now report
+an error instead looping forever or crashing.
+
+Fix various Coverity warnings and other memory leaks in fuse2fs and
+extended attribute manipulation functions.
+
+Replace a test file but which had a "non-commercial use-only"
+copyright permission file with a newer version from the Cyrus imapd
+package which now has a 4-clause BSD license, which was making some
+lawyers nervous, even though the test file in question was only used
+in lib/et's regression testing and was never included in any compiled
+binary. (Addresses Debian Bug: #840733)
+
+Stop installing mkfs.ext4dev and fsck.ext4dev
+
+Update Chinese, Czech, Polish, Serbian, and Spanish translations and
+add the Finnish and Malay translation. (Addresses-Debian-Bug: #774379)
+
+Update various man pages (Addresses-Debian-Bug: #852726)
+
+Programming notes
+-----------------
+
+Fix more FreeBSD-11 compatibility bugs, including some unmasked by
+FreeBSD 11-rc2.
+
+Fix the Mac build.
+
+Fix build failure on RHEL 5.x systems caused by an old version of
+libmagic.
+
+Fix a number of bugs reported by ASAN that can cause some (mostly
+harmless) memory dereferences beyond allocated memory.
+
diff --git a/doc/RelNotes/v1.43.5.txt b/doc/RelNotes/v1.43.5.txt
new file mode 100644
index 0000000..c8a5084
--- /dev/null
+++ b/doc/RelNotes/v1.43.5.txt
@@ -0,0 +1,133 @@
+E2fsprogs 1.43.5 (August 4, 2017)
+=================================
+
+Fix a bug which could cause e2fsck to loop forever when rebuilding an
+encrypted directory with entries with identical prefixes up to an
+embedded NUL character.
+
+Fix build when configured with --disable-threads or --enable-profile.
+
+Fix ext2fs_sync_device() so it returns the proper error code if the
+BLKFLSBUF ioctl fails for some reason.
+
+Fix a potential crash in tune2fs when enabling project quota when the
+file system has no inodes by fixing error handling in the
+quota_write_inode() in libsupport.
+
+Fix a bug in debugfs's "ls -p" handling which could cause it to print
+garbage after a file name in a directory entry.
+
+Fix a number of bugs in debugfs, dumpe2fs, e2fsck, tune2fs, and
+resize2fs where a carefully/maliciously corrupted file systems (found
+by American Fuzzy Lop) could these programs to crash or hang.
+(Addresses Debian Bug #868489)
+
+E2fsck no longer issues some harmless bitmap warnings caused by a
+corrupted file system; since those corruptions will be fixed up by
+e2fsck later, there's no point issuing these internal warnings.
+
+E2fsck will now notice invalid quota inode numbers, and offer to fix
+them.
+
+Fix a regression introduced in e2fsprogs 1.43 which broke mke2fs's
+hugefile creation so that they aren't contiguous. (Addresses Google
+Bugs 62791459 and 638037607)
+
+Fix how backup superblocks are written in big endian systems so they
+are all correctly byte swapped.
+
+Fixed tune2fs's support for enabling and disabling project quota.
+
+The badblock program now properly handles languages which have
+multi-column wide character such as Chinese. (Addresses Debian Bug:
+#860926)
+
+The mke2fs -U option now accepts "null", "clear", "random", or "time"
+just as tune2fs's -U option.
+
+Fix e2fsck's -E bmap2extent feature (which converts a file to use
+extents from indirect block maps) so that it handles sparse files correctly.
+
+Fix libext2fs to correctly handle accounting for an external xattr
+block on bigalloc file systems.
+
+Fix e2fsck to correctly handle quota accounting when deleting files
+that have multiply-claimed blocks pass 1b.
+
+Fix potential buffer overrun bug in e2fsck when using 128 byte inodes.
+(Addresses Google Bug 37326362).
+
+E2fsck's extent tree optimization can now be disabled via an
+command-line extended option or via an e2fsck.conf configuration
+parameter.
+
+The e2fsck program now properly updates the quota accounting when
+optimizing the extent tree. (Addresses Google Bug 36391645)
+
+Fix some error handling in e4crypt when operating on keyring ID's.
+
+Fix e2fsck's quota handling when the bigalloc feature is enabled.
+
+The libext2fs file system now uses readahead when opening file systems
+to speed up opening very large file systems with the meta_bg option.
+
+If e2fsck logging is enabled, e2fsck will report the exit code in the
+last line of the log file.
+
+Debugfs can now open file systems with a bad superblock checksum, and
+the show_super_stats command will print the expected checksum.
+
+Fix a regression introduced in e2fsprogs 1.43.4 where tune2fs was not
+able to correctly enable the quota feature. (Addresses Debian Bug
+#855417)
+
+E2fsck will only return an exit status code of 1 if it has fixed a
+file system corruption. If it only performed an optimal optimization
+of internal file system metadata, it will now return 0.
+
+Fix e2fsck so it won't check inode fields of deleted inodes. This was
+mostly harmless, but the addition of a check in 1.43.4 to enforce the
+requirement that inline data inodes have a system.data attribute
+caused a regression in xfstests generic/079. Fix this and a number of
+other checks which could lead to false positive reports of file system
+corruption.
+
+Removed a debugging printf in libsupport which could result to some
+extraneous and confusing output if the user specifies a quota type.
+
+The debugfs logdump command now accepts a new -S option which will
+cause it to print information about the journal superblock.
+
+Added a missing space in debugfs's ls -l output to separate the size
+and date fields.
+
+Update the Czech, Danish, Dutch, French, Hungarian, Polish, Serbian,
+Spanish, Swedish, Ukrainian, and Vietnamese translations.
+
+Update various man pages. (Addresses Debian Bugs #867895 and #865584)
+
+Fix various compiler and UBSAN warnings.
+
+Fixed various Debian Packaging Issues. (Addresses Debian Bugs
+#864144 and #866623)
+
+
+Programming notes
+-----------------
+
+The blkid library can now recognize exfat file systems.
+
+Add new test, j_recover_csum3_64bit, which checks to make sure we
+correctly recovering 64-bit journals using the v3 checksum format.
+
+Fix portability assumption in tests; don't depend on the existence of
+/dev/stdin.
+
+Fix portability with newer versions of glibc and with Cygwin builds on
+Windows 8 and Windows 10.
+
+Clean up the comments in problem.c match the message that will
+actually be printed.
+
+Removed an unused an obsolete header file.
+
diff --git a/doc/RelNotes/v1.43.6.txt b/doc/RelNotes/v1.43.6.txt
new file mode 100644
index 0000000..1050d5e
--- /dev/null
+++ b/doc/RelNotes/v1.43.6.txt
@@ -0,0 +1,70 @@
+E2fsprogs 1.43.6 (August 29, 2017)
+==================================
+
+Fix printing of quota inconsistency messages on 32-bit platforms in
+e2fsck. Also fix a bug which cause project quota problems to be
+labelled as group quota problems.
+
+Fix UI problems caused by fuzzy translations such that some messages
+are in English and some are in the foreign language, and it's not
+obvious to user how to answer yes/no questions. (Addresses Debian
+Bug: #856586).
+
+Fix some out-of-bounds memory accesses in e2fsck caused by (usually
+maliciously) corrupted file systems. (Addresses Debian Bugs: #871539,
+#871540)
+
+Optimize CPU usage in e2fsck for very large, very fragmented sparse
+files.
+
+Add an optional mode in e2fsck which trades off additional memory for
+CPU time when processing file systems that are heavily hard-linked.
+(This can be a very large amount of memory, so this feature is
+disabled for now. How to automatically determine when it would be
+helpful to enable this optimization, and when it is _safe_ to enable
+this optimization is still a bit of a research problem.)
+
+The mke2fs program will automatically upsize the inode size to 256 if
+it is not explicitly specified on command-line and the default inode
+size is not large enough to support the project quota feature
+requested by the user. If the inode size is explicitly specified to
+be 128 bytes, and the project quota is enabled mke2fs will fail since
+with an error explaining that project id's can't be supported when the
+inode size is < 256 bytes.
+
+The tune2fs program will not allow the project feature or project
+quotas to be enabled in the inode size is 128 bytes.
+
+The tune2fs program now prints a more understandable message explaining
+that the file system needs to be checked using e2fsck -f before
+running certain complex tune2fs operations. (Addresses Debian Bug:
+#857336)
+
+If the proceed_delay option is enabled in /etc/e2fsck.conf, the message
+indicating that user can wait N seconds to proceed was ambiguous.
+That message has been made more clear. (Addresses Debian Bug:
+#857336)
+
+Fix LFS bug which caused e2image to fail to create regular e2image
+files which are larger than 2 GiB on 32-bit platforms. (Addresses
+Debian Bug: #855246)
+
+Fix FreeBSD portability problem caused by the fact that they no longer
+use block devices. (Disks are character mode devices.)
+
+Update the Czech, French, Polish, Swedish, and Vietnamese translations.
+
+Fixed various Debian Packaging Issues.
+
+
+Programming notes
+-----------------
+
+Avoid changing the blkid cache when running tests. (Normally the
+blkid cache is not writable by the user running tests, but...)
+
+The tar file generation process will now create reproducible
+artifacts.
+
+Removed legacy entries for ext4dev in the default mke2fs.conf file.
+
diff --git a/doc/RelNotes/v1.43.7.txt b/doc/RelNotes/v1.43.7.txt
new file mode 100644
index 0000000..55e434f
--- /dev/null
+++ b/doc/RelNotes/v1.43.7.txt
@@ -0,0 +1,29 @@
+E2fsprogs 1.43.7 (October 16, 2017)
+===================================
+
+Fix the error handling code in debugfs, fuse2fs and tune2fs so errors
+trying to replay the journal won't accidentally result in a seg fault
+if reopening the file system after the journal replay fails for some
+reason.
+
+Fix resize2fs to avoid it from either failing or corrupting the file
+system image in certain corner cases when doing an off-line resize.
+
+Fix many spelling mistakes in various man pages, code comments, and
+program messages.
+
+Fix e2fsck and debugfs so that maliciously corrupted file systems will
+not cause buffer overflows. (Addresses Debian Bugs: #873757, #878104)
+
+Update German translation. (Addresses Debian Bug: #833514)
+
+Fixed various Debian Packaging Issues. (Addresses Debian Bugs:
+#873812, #873813, #876551)
+
+Programming notes
+-----------------
+
+Test descritions have been shorted to fit in 80 columns.
+
+Fix various tests to avoid leaving temp files in /tmp.
+
diff --git a/doc/RelNotes/v1.43.8.txt b/doc/RelNotes/v1.43.8.txt
new file mode 100644
index 0000000..cb26a16
--- /dev/null
+++ b/doc/RelNotes/v1.43.8.txt
@@ -0,0 +1,48 @@
+E2fsprogs 1.43.8 (January 1, 2018)
+==================================
+
+Fix a bug where updated bitmap checks might not be written to disk.
+(Addresses Debian Bug: #883869)
+
+Some newly added fields in the superblocks were not getting byte
+swapped (which were not noticed since big endian systems are amazingly
+unpopular). Fix them and compile-time checks to avoid this class of
+bugs from happening in the future. (Lustre Bug #9309)
+
+Fix a potential use after free bug in e2fsck when fixing a corrupted
+root node in directory hash tree.
+
+Fix a bug in e2fsck where a badly/maliciously corrupted superblock
+(which is not fixed due to the -n option, for example) can cause a
+floating point exception when printing the summary statistics.
+(Addresses Debian Bug: #879220)
+
+Fix debugfs's ncheck command so that it correctly prints the inode
+number when printing an error message.
+
+Fix a bug in e2freefrag where it could print an incorrect free blocks
+count on a file system with the 64-bit block number feature.
+
+Update the German, Serbian, Spanish, and Ukrainian translations.
+
+Fix a bug where resize2fs's free blocks sanity check could fail with a
+false positive and refuse to check a file system with the 64-bit block
+number feature.
+
+Fix and clarify various man pages and documentations. Also fixed up
+some random usage texts that were incorrect. (Addresses Debian Bugs:
+#880483)
+
+Fixed various Debian Packaging Issues. (Addresses Debian Bugs: #880207,
+#881408, #881590, #881591)
+
+Programming notes
+-----------------
+
+Fix various compiler warnings.
+
+Clean up Makefile output.
+
+Fix compatibility problems with glibc 2.27 casued by a collision with
+copy_file_range().
+
diff --git a/doc/RelNotes/v1.43.9.txt b/doc/RelNotes/v1.43.9.txt
new file mode 100644
index 0000000..6dbe0db
--- /dev/null
+++ b/doc/RelNotes/v1.43.9.txt
@@ -0,0 +1,15 @@
+E2fsprogs 1.43.9 (February 8, 2018)
+===================================
+
+Remove the huge file flag from libe2p (and hence from chattr/lsattr),
+since it was never made visible by the kernel. Remove the description
+of some compression related flags, and add a description of the
+encrypted file flag, and the project hierarchy flag.
+
+Remove a misplaced "MNP is unsupported" message from debugfs.
+
+Fix a build failure in lib/ext2fs/swapfs.c on big-endian systems.
+(Addresses Debian Bug #886119)
+
+Fix various Debian packaging issues. (Addresses Debian Bug #269569).
+
diff --git a/doc/RelNotes/v1.44.0.txt b/doc/RelNotes/v1.44.0.txt
new file mode 100644
index 0000000..59cd802
--- /dev/null
+++ b/doc/RelNotes/v1.44.0.txt
@@ -0,0 +1,82 @@
+E2fsprogs 1.44.0 (March 7, 2018)
+================================
+
+Updates/Fixes since v1.43.9:
+
+UI and Features
+---------------
+
+E2fsprogs now supports the large_dir (INCOMPAT_LARGEDIR) feature. This
+feature allows larger directories to be created, both with directory
+sizes over 2GB and and a maximum htree depth of 3 instead of the
+current limit of 2. These features are needed in order to exceed
+the currently limit of approximately 10M entries in a single
+directory for 4KB blocksize (~100k for 1KB).
+
+E2fsprogs now supports the ea_inode (INCOMPAT_EA_INODE) feature, which
+stores large extended attributes in an external inode instead of a
+single data block. This is backwards compatible with a Lustre file
+system feature, but it has been extended to support deduplicating
+extended attribute values which are used in multiple inodes.
+
+The metadata_csum feature (RO_COMPAT_METADATA_CSUM) is now enabled by
+default by mke2fs.
+
+The resize2fs program will no longer complain about resizing bigalloc
+file systems as being dangerous when doing an on-line resize (since this
+is purely a kernel feature).
+
+Debugfs's ls command will now print the high bits of the inode's mode
+bits.
+
+Fixes
+-----
+
+Fixed some potential buffer overrun bugs in the blkid library and in the
+fsck program.
+
+There were some corner cases which tune2fs wouldn't correctly handle
+when operating on a file system which was not cleanly mounted and thus
+required running the journal because it could be modified. Tune2fs will
+now run the journal before trying to change the superblock, and if the
+file system needs to be checked after the journal has been replayed, it
+will require it before proceeding. Also if the file system is busy (for
+example, because it is in use by Lustre), but is not present in the
+/proc/mounts or /etc/mtab, tune2fs will not try to replay the journal,
+since this could do real damage if it the file system is being actively
+modified by the kernel.
+
+The libss library (used by debugfs) now supports the version 7 of the
+libreadline shared library.
+
+The e2freefrag program will use the GETFSMAP ioctl if it is available
+and the file system is mounted, so that the free space statistics will
+be more accurate.
+
+The consistency checks for symlinks (especially for encrypted and inline
+data file sytems) in e2fsck are now much more careful/stringent. Also
+fixed a bug where creating a symlink using ext2fs_symlink() which was
+exactly 60 bytes long when inline data was enabled would result in a
+missing system.data xattr.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Mke2fs now uses io_channel_flush() instead of sync() for the sync_kludge
+feature.
+
+E2fsprogs now uses i_size as the primary way of determining whether a
+symlink is a fast symlink.
+
+Fix various compiler and UBSAN warnings.
+
+Long running test are now skipped with "make check" and only run when
+"make fullcheck". The test runner will warn when potentially long
+running tests are being run via "make check".
+
+E2fsck is now much faster for bigalloc file systems when scanning
+extents for bigalloc file systems. (Addresses Google Bug #36886699)
+
+Update Czech, Spanish, French, Malay, and Ukrainian translations.
+
diff --git a/doc/RelNotes/v1.44.1.txt b/doc/RelNotes/v1.44.1.txt
new file mode 100644
index 0000000..4503c92
--- /dev/null
+++ b/doc/RelNotes/v1.44.1.txt
@@ -0,0 +1,48 @@
+E2fsprogs 1.44.1 (March 24, 2018)
+================================
+
+Updates/Fixes since v1.44.0:
+
+Fixes
+-----
+
+E2fsprogs 1.44.0 introduced a regression introduced which caused e2fsck
+to fail to support HTree directories on big-endian systems. Fix how we
+read block numbers for internal htree nodes.
+
+Removed a potential memory leak from fsck.
+
+E2image now correctly creates e2image files for bigalloc file systems.
+
+Dumpe2fs and debugfs now correctly support e2image files for file
+systems that have the meta_bg option enabled.
+
+E2fsck and debugfs now correctly handle delete inodes (including
+processing the orphaned inode list in the case of e2fsck) for bigalloc
+file systems. (Addresses Google Bug: #73795618)
+
+Portability fixes for GNU Hurd. (Addresses Debian Bug: #893590)
+
+Portability fixes for building in some cross-build environments.
+
+Portability fixes for MacOS 10.6.8.
+
+Add clarifications to chattr's man page. (Addresses Debian Bug:
+#890390)
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Debugfs now reads allocation bitmaps much more efficiently when opening
+a file system.
+
+Update Swedish translation file.
+
+Add Vcs-* fields to debian packaging. (Addresses Debian Bug: #887512)
+
+Fix some test failures on GNU Hurd caused by a different default block
+size.
+
+Add new regression tests.
+
diff --git a/doc/RelNotes/v1.44.2.txt b/doc/RelNotes/v1.44.2.txt
new file mode 100644
index 0000000..7b5c774
--- /dev/null
+++ b/doc/RelNotes/v1.44.2.txt
@@ -0,0 +1,53 @@
+E2fsprogs 1.44.2 (May 14, 2018)
+===============================
+
+Updates/Fixes since v1.44.1:
+
+Fixes
+-----
+
+E2fsck now prints a warning message if broken_system_clock is set in
+e2fsck.conf and this causes the check interval to be ignored so it is
+clear to the user.
+
+Fix e2image handling of e2i files on big endian systems
+
+Add sanity checks for inodes containing xattr values to prevent
+maliciously crafted file systems from causing crashes caused by infinite
+recursion from causing e2fsck and debugfs to crash.
+
+Fix e2fsck so that quota usage is adjusted when clearing orphaned
+inodes.
+
+Fix filefrag so that unknown flags returned by FIEMAP won't cause a
+buffer overrun.
+
+Fix mke2fs to print a more useful/correct error message if
+ext2fs_close_free() at the end of the file system creation process.
+
+Improve chattr's man page.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Demote e2fsprogs in debian packaging from Essential: yes to
+XB-Important: yes (Addresses Debian Bug #474540)
+
+Fix intl/Makefile so it uses @AR@ instead of a hard-coded 'ar' (which
+matters when cross compiling).
+
+Update Polish translation file.
+
+Fix the address of the FSF in various GPL/LGPL copyright licenses.
+
+Clean up the i_bitmaps test so it doesn't leave temporary files behind.
+
+Remove use of /dev/stdin in the regression tests since not all systems
+have /dev/stdin.
+
+Fix the f_bigalloc_badinode and f_bigalloc_orphan_list regression tests
+so they uses mke2fs and ebugfs from the build tree. They may not exist
+in the users PATH, and if they not or if they are extremely
+old/obsolete, those tests would fail.
+
diff --git a/doc/RelNotes/v1.44.3.txt b/doc/RelNotes/v1.44.3.txt
new file mode 100644
index 0000000..e68032c
--- /dev/null
+++ b/doc/RelNotes/v1.44.3.txt
@@ -0,0 +1,106 @@
+E2fsprogs 1.44.3 (July 10, 2018)
+================================
+
+Updates/Fixes since v1.44.2:
+
+UI and Features
+---------------
+
+The debugfs inode_dump command can now print a hex dump of the i_block
+array and the extra space in the inode, as a convenience to someone
+investigating a corrupted inode.
+
+The debugfs block_dump and inode_dump command can now print low-level
+dump of extended attribute data structures in the block or inode.
+
+The dumpe2fs command can now print out information in the Multi-Mount
+Protection (MMP) block. This is also available as e2mmpstatus command
+for compatibility with the Lustre utilities.
+
+The debugfs command can now operate on some file systems with
+corrupted superblocks so they can be fixed. This includes file
+systems with a corrupted inodes count field and file systems where not
+all of the allocation bitmaps have valid locations or are not
+readable.
+
+
+Fixes
+-----
+
+The inode's project ID is now properly byte-swapped on big-endian
+systems.
+
+E2fsprogs now ignores s_desc_size for file systems that do not have
+the 64-bit feature set. This makes it more consistent with the
+kernel, so it can now operate on file systems that the kernel is
+willing to mount.
+
+E2fsck now considers device inodes with the extents flag as corrupt
+and offer to clear them.
+
+E2fsck more properly handles cases where s_inodes_count is corrupted.
+
+E2fsck no longer spews large number of errors when the superblock
+badly corrupted (restoring its behavior pre-1.43).
+
+E2fsck will now offer to set the dir_nlink feature if it is not set
+and file system requires the dir_nlink feature because there are too
+many subdirectories in a directory.
+
+E2fsck will no longer loop infinitely due to a maliciously crafted
+file system which has a fully uninitialized inode table in the first
+block group.
+
+E2fsck will no longer hang if the last block in the file system is a
+fixed-metadata block. (Very rare, but could happen.)
+
+E2fsck no longer allows initialized blocks to exist past i_size. This
+is something the Linux implementation of ext4 has never done (and should
+never do).
+
+While replaying the journal in e2fsck, certain errors would previously
+cause e2fsck to print a non-sensical error message (e.g., "Unknown code
+____ 251 while recovering journal"). This has been fixed.
+
+In cases where more than 75% of the block group will be used for group
+descriptor table, mke2fs would previously create an invalid file
+system with both the meta_bg and resize_inode features enabled. It
+will now disable the resize_inode feature.
+
+The mke2fs program now properly creates a file system which is exactly
+1 << 32 blocks. Previously the s_inodes_count field would overflow,
+and the file system would be created with a minimal number of inodes.
+
+Recent kernels will report errors on a file or block device which
+occurred before the file or block device was opened via fsync() or
+close(). This will cause e2fsck to incorrectly report a failure. Work
+around this by calling fsync() immediately after the file or block
+device is opened in the unix_io layer, and throwing away the error.
+
+Filefrag will no longer ignore errors returned by fsync.
+
+Debugfs will no longer print spurious checksum errors when failing to
+open a file system for unrelated reasons.
+
+Updated/fixed various man pages. (Addresses Launchpad Bug: #1743553)
+
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Debugfs's mknod command now works correctly on some 32-bit systems where
+previously it had a portability problem caused by some object files
+being compiled with LFS, and some without. This fixes some regression
+test failures on 32-bit MIPS (for example).
+
+Various clean ups, portability, and performance improvements to
+e2fsprogs's regression test framework.
+
+Fixed Coverity, sparse, gcc -Wall, and clang warnings/nits.
+
+Update Czech, Dutch, Spanish, French, Polish, Swedish, Ukrainian, and
+Vietnamese translations.
+
diff --git a/doc/RelNotes/v1.44.4.txt b/doc/RelNotes/v1.44.4.txt
new file mode 100644
index 0000000..db130c6
--- /dev/null
+++ b/doc/RelNotes/v1.44.4.txt
@@ -0,0 +1,60 @@
+E2fsprogs 1.44.4 (August 18, 2018)
+==================================
+
+Updates/Fixes since v1.44.3:
+
+UI and Features
+---------------
+
+Add basic support for the ext4 verity feature (aka fsverity). It is a
+read-only compatibility feature which uses Merkle trees to add
+functionality much like dm-verity on a per-file basis. For this release
+we simply allow e2fsck to accept file systems with the verity feature
+enable (no special handling is needed) and mke2fs to create file systems
+with the verity feature.
+
+
+Fixes
+-----
+
+E2fsck will now properly repair a file system that has both the
+resize_inode and meta_bg features enabled simultaneously (which is never
+supposed to happen, but it could happen in versions of mke2fs before
+1.44.3 when it was given parameters where more than 75% of the block
+group was used for group descriptor tables).
+
+Avoid a floating point exception crash when libblkid tries probing a
+maliciously corrupted HFS+ superblock.
+
+Debugfs's ncheck command now properly will handle inodes that have
+multiple hard links.
+
+On platforms that don't supply strdup, the replacement function for
+strdup() had a bug which would cause it to crash if it was used.
+(Fortunately this only happens if the [scratch_files] feature in e2fsck
+is used.)
+
+Fixed support for devices which have non-512 byte block sizes on Apple
+Darwin.
+
+E2fsprogs 1.44.3 would fail to compile on very old versions of gcc.
+This is now fixed.
+
+Update and clarify man pages. (Addresses Debian Bug: #757831)
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Instead of building the subset e2fsprogs-libs tar file, add a new
+configure option, --enable-subset. This along with other changes (such
+as dropping obsolete files that aren't shipped as part of
+e2fsprogs-X.YY.tar.gz) allows us to be able to build the tarball using
+the "git archive" command.
+
+Fixed various debian packaging issues (Addresses Debian Bug: #905195)
+
+Update Danish, Spanish, and Swedish translations.
+
diff --git a/doc/RelNotes/v1.44.5.txt b/doc/RelNotes/v1.44.5.txt
new file mode 100644
index 0000000..0cda992
--- /dev/null
+++ b/doc/RelNotes/v1.44.5.txt
@@ -0,0 +1,77 @@
+E2fsprogs 1.44.5 (December 15, 2018)
+====================================
+
+Updates/Fixes since v1.44.4:
+
+UI and Features
+---------------
+
+When e2fsck notices it could optimize an extent tree, it will now ask
+"Optimize?" instead of "Fix?", which was confusing some users since it
+implied that something was broken.
+
+
+Fixes
+-----
+
+Use 64-bit counters to track the number of files that are defragmented
+using in e4defrag, to avoid overflows when more than 2**32 files are
+defragmented. (Addresses Debian Bug: #888899)
+
+Correctly translate Posix ACL's. This was a regression introduced in
+v1.44. (Addresses Launchpad Bug: #1807288)
+
+Use the online free block counts so e2freefrag's percentages are
+correct.
+
+Fix a false warning that tune2fs will take long time to change a UUID if
+the metadata_csum feature is not enabled.
+
+E2fsck will only offer to set the inline_data feature flag when the
+inline flag is set on the inode, *and* the system.data xattr is present.
+
+E4defrag will handle the case where it is running as root and it can't
+find the file system to open more gracefully. (Addresses Debian Bug:
+#907634)
+
+Fix a bug where resize2fs was failing to update the extent tree
+checksums in an corner case. (Addresses Launchpad Bug: #1798562)
+
+Fix fuse2fs's command line parsing when options are specified after the
+target device/image.
+
+Fix a bug which could cause e2fsprogs tools to segfault on a corrupted
+file system where the journal's s_nr_users is impossibly large.
+
+E2image now includes the mmp block (if needed) when creating a
+metadata-only image.
+
+Fix various Verity handling bugs which made it completely unusable in
+e2fsprogs 1.44.4.
+
+Fix a bug in tune2fs where it would dereference of freed memory after
+replaying the journal.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Fix groff formatting nits in various man pages. (Addresses Debian Bug:
+#916188)
+
+Fixed various debian packaging issues (Addresses Debian Bug: #915942)
+
+Adjusted the copyright license for lib/blkid/version.c to be LGPL (and
+consistent with the rest of files in that directory).
+
+Fix various clang warnings.
+
+Fix "make install" when configure was run with --enable-subset.
+
+Make sure the regression tests clean up their tmpfile if the test script
+exits.
+
+Fix build failures on non-glibc systems.
+
diff --git a/doc/RelNotes/v1.44.6.txt b/doc/RelNotes/v1.44.6.txt
new file mode 100644
index 0000000..39e9b95
--- /dev/null
+++ b/doc/RelNotes/v1.44.6.txt
@@ -0,0 +1,48 @@
+E2fsprogs 1.44.6 (March 5, 2019)
+================================
+
+Updates/Fixes since v1.44.5:
+
+Fixes
+-----
+
+If files are created while e4defrag is running, it's quite possible for
+succeed_cnt to be larger than total_count, in which case the number of
+failures (calculated via total_count - succeed_cnt) will overflow and
+become a very large unsigned number. (Addresses Debian Bug: #888899)
+
+Fix e2fsck so it can correctly handle directories > 2 GiB when the
+largedir feature is enabled.
+
+Fix mke2fs's hugefile creation so that we correctly reserve enough
+metadata blocks for a given file system size. Otherwise for certain
+unfortunately sized disks/partitions, the hugefile creation would fail.
+(Addresses Google Bug: 123239032)
+
+Fix the libext2fs library to be more robust against invalid block group
+descriptors to prevent e2fsprogs from crashing (or possibly being
+p0wned) by maliciously modified file systems. (Addresses Google Bugs:
+119171089, 119929050)
+
+Fix mke2fs and debugfs so they can correctly copy in files > 2 GiB.
+
+Fix debugfs so its stat command can correctly display directory
+sizes > 2 GiB.
+
+Fix memory leaks in debugfs, mke2fs, and e2freefrag.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Avoid unnecessarily linking badblocks with the libblkid shared library.
+(Addresses Debian Bug: #919958)
+
+Stop depending on the debugfs binary for test data, since depending on
+the compiler, there might be sufficient aligned zero bytes that the
+resulting file(s) created by test cases could have unexpected sparse
+blocks, leading to test failures. (Addresses Google Bug: #122085761)
+
+Fixed various debian packaging issues.
diff --git a/doc/RelNotes/v1.45.0.txt b/doc/RelNotes/v1.45.0.txt
new file mode 100644
index 0000000..d92c11b
--- /dev/null
+++ b/doc/RelNotes/v1.45.0.txt
@@ -0,0 +1,40 @@
+E2fsprogs 1.45.0 (March 6, 2019)
+================================
+
+Updates/Fixes since v1.44.6:
+
+UI and Features
+---------------
+
+Tune2fs can now set the file system error bit to force a check at the
+next fsck by using the extended option "force_fsck".
+
+E2fsprogs now has an e2scrub script which will allow e2fsck to be run on
+volumes that are mounted on an LVM device. The e2scrub_all will find
+all ext* file systems and run them using e2scrub (if possible).
+
+Mke2fs will attempt to use ZERO_RANGE before PUNCH_HOLE so that we don't
+lose allocated blocks in preallocated files.
+
+The fuse2fs command now supports a "fakeroot" option to allow an
+unprivileged user to fuse2fs to modify rootfs images.
+
+Add initial support for setting the character set encoding and case
+folding file system feature. We don't have support to validate file
+names as being valid for a given character set encoding yet, but this
+will allow compatibility for this feature when the kernel support
+lands. This includes support in lsattr and chattr to understanding the
+casefold attribute flag.
+
+Debugfs can now set the inode's checksum field to test support for
+inodes with bad inode checksums.
+
+E2image now accepts the -b and -B options to allow the user to specify
+the superblock location when creating a raw or qcow2 image.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Add support for building e2fsprogs using Link Time Optimization (LTO),
+UBSAN, Address Sanitizer, or Thread Sanitizer.
diff --git a/doc/RelNotes/v1.45.1.txt b/doc/RelNotes/v1.45.1.txt
new file mode 100644
index 0000000..d8ae0bc
--- /dev/null
+++ b/doc/RelNotes/v1.45.1.txt
@@ -0,0 +1,81 @@
+E2fsprogs 1.45.1 (May 12, 2019)
+===============================
+
+Updates/Fixes since v1.45.0:
+
+UI and Features
+---------------
+
+Teach the e2scrub and e2scub_all commands the -n option, which prints
+what these commands would do.
+
+Finalize the casefold support so it is synchronized with what we
+actually shipped in the kernel. This includes updating to Unicode 12.1,
+dropping ASCII casefolding support, and switching from NFKD to NFD. The
+the ext4 feature name also changed from fname_encoding to casefold.
+Add support for casefold to dumpe2fs and debugfs.
+
+Debugfs now prints non-printable characters using C-style hex escape
+sequences (e.g., "\xc1" instead of M-A). The old scheme printed
+filenames in an ambiguous way, which complicated using debugfs for ext4
+encryption regression tests.
+
+E2fsck now checks to make sure that all unused bits in the block
+allocation bitmaps are set; if there are some unset bits in the block
+bitmaps for file systems where the blocks_per_group is less than
+8*blocksize (not the default), this can confuse the kernel's multi-block
+allocator and return a bogus free extent. E2fsprogs guarantees this
+when it writes out the bitmap blocks, but it's possible that file system
+blocks could have gotten corrupted since the last time e2fsprogs wrote
+out the bitmap blocks.
+
+E2fsck now has support write out a problem code log which can provide
+more debugging and monitoring information. This can be configured using
+/etc/e2fsck.conf.
+
+
+Fixes
+-----
+
+Teach e2scrub and e2scrub to give more intelligible error messages when
+the lvm2 and util-linux packages are not installed, or if the commands
+are not run as root.
+
+Teach e2scrub_all to skip trying to run e2scrub on a logical volume if
+its volume group did not have enough space to create a snapshot.
+(Addresses Debian Bug: #924301)
+
+E2scrub will tag its snapshots with UDISK_IGNORE so they do not show up
+in GUI's. (Addresses Debian Bug: #926112)
+
+Mark the e2scrub service files to indicate that CAP_SYS_ADMIN and
+CAP_SYS_RAWIO are required. This avoids errors when e2scrub is run an
+container where root does not have these capabilities. (Addresses
+Debian Bug: #926138)
+
+Fix mke2fs's check for absurdly large disks. Previously check was 2^10
+too small, so mke2fs would fail when trying to format a 900TB file
+system.
+
+Fixed debugfs so it correctly prints ea_in_inode xattr values.
+
+Fixed various casefold bugs.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Fix autoheader warnings caused by a missing template in AC_CHECK_LIB.
+
+Fix the the "make install-strip" command.
+
+Dropped utf8_* and nls_* symbols from the libext2fs shared library, to
+avoid namespace contamination.
+
+Fix the f_valid_ea_in_inode test so actually tests the ea_in_inode
+feature.
+
+Fixed various debian packaging issues. (Addresses Debian Bug: #924275)
+
diff --git a/doc/RelNotes/v1.45.2.txt b/doc/RelNotes/v1.45.2.txt
new file mode 100644
index 0000000..43126de
--- /dev/null
+++ b/doc/RelNotes/v1.45.2.txt
@@ -0,0 +1,30 @@
+E2fsprogs 1.45.2 (May 27, 2019)
+===============================
+
+Updates/Fixes since v1.45.1:
+
+Fixes
+-----
+
+Fixed various problems with how e2scrub_all is run from cron, when not
+all of the required packages are installed, or there are no LVM devices
+on the system. (Addresses Debian Bug: #929186, #929287, #928977)
+
+When mke2fs asks the user if she should proceed, fall back to the
+English 'y' or 'Y' characters since there could be a missing translation
+prompting the use of the English 'y' character. (Addresses Debian Bug:
+#907034)
+
+Fix spurious complaint of blocks beyond i_size for verity files.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Fixed various debian packaging issues.
+
+Fixed "make install" failure when the cron.d directory does not exist.
+
+Update the Czech, Malay, Polish, Spanish, Swedish, and Ukarainian
+translations. Add the new Portuguese translation.
+
diff --git a/doc/RelNotes/v1.45.3.txt b/doc/RelNotes/v1.45.3.txt
new file mode 100644
index 0000000..8d34aad
--- /dev/null
+++ b/doc/RelNotes/v1.45.3.txt
@@ -0,0 +1,65 @@
+E2fsprogs 1.45.3 (July 14, 2019)
+================================
+
+Updates/Fixes since v1.45.2:
+
+UI and Features
+---------------
+
+Whether or not automatic online scrubs will be run is now controlled by
+a setting in /etc/e2scrub.conf. To enable automatic online scrubs,
+uncomment out the line containing "periodic_e2scrub=1".
+
+The fuse2fs program is now installed in /usr/bin instead of /usr/sbin,
+since it does not require root privileges.
+
+Fuse2fs now works with if fusermount from FUSE V3 is installed.
+However, in order to provide this compatibility, if you are using a
+fusermount from FUSE v2, and you want to mount on top of a non-empty
+directory, you will need to specify -o nonempty explicitly. FUSE V3
+always allows mounting on top of non-empty directories, and will fail if
+the user or fuse2fs passes the nonempty option.
+
+
+Fixes
+-----
+
+Fixed a bug which caused e2fsck to improperly handle file systems that
+enabled both the large_dir and inline directories at the same time.
+
+E2scrub_all now correctly handles an encrypted (LUKS) ext[234] file
+system stacked on top of an LVM volume. (Addresses Debian Bug: #931387)
+
+Fixed a bug in "E2scrub_all -r" where it was incorrectly specifying
+which volume needed to have its e2scrub snapshot cleaned up. (Addresses
+Debian Bug: #931679)
+
+Fixed the Czech, Dutch, German, and Vietnamese translations which
+improperly used positional markers which broke a few translated e2fsck
+problem descriptions. (Addresses Debian Bug: #892173)
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Fixed various debian packaging issues. (Addresses Debian Bug: #931266,
+#923372)
+
+Fixed error checking for calls to posix_{memalign,fadvise}.
+
+Add regression test for checking a file system using fs-verity.
+
+Various regression test cleanups.
+
+Fixed various compiler warnings.
+
+Added xgettext markers to fix incorrectly marked strings in the
+e2fsprogs translations template file as being c-style printf strings
+when in fact they aren't.
+
+Added utility script which generates the release tarfile using git
+archive.
+
+Update the Czech, Dutch, and Portuguese translations from the
+Translation Project.
+
diff --git a/doc/RelNotes/v1.45.4.txt b/doc/RelNotes/v1.45.4.txt
new file mode 100644
index 0000000..acdd361
--- /dev/null
+++ b/doc/RelNotes/v1.45.4.txt
@@ -0,0 +1,50 @@
+E2fsprogs 1.45.4 (September 23, 2019)
+=====================================
+
+Updates/Fixes since v1.45.3:
+
+Fixes
+-----
+
+A maliciously corrupted file systems can trigger buffer overruns in the
+quota code used by e2fsck. (Addresses CVE-2019-5094)
+
+E2fsck now checks to make sure the casefold flag is only set on
+directories, and only when the casefold feature is enabled.
+
+E2fsck will not disable the low dtime checks when using a backup
+superblock where the last mount time is zero. This fixes a failure in
+xfstests ext4/007.
+
+Fix e2fsck so that when it needs to recreate the root directory, the
+quota counts are correctly updated.
+
+Fix e2scrub_all cron script so it checks to make sure e2scrub_all
+exists, since the crontab and cron script might stick around after the
+e2fsprogs package is removed. (Addresses Debian Bug: #932622)
+
+Fix e2scrub_all so that it works when the free space is exactly the
+snapshot size. (Addresses Debian Bug: #935009)
+
+Avoid spurious lvm warnings when e2scrub_all is run out of cron on
+non-systemd systems (Addresses Debian Bug: #940240)
+
+Update the man pages to document the new fsverity feature, and improve
+the documentation for the casefold and encrypt features.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Fixed various debian packaging issues. (Addresses Debian Bug: #933247,
+#932874, #932876, #932855, #932859, #932861, #932881, #932888)
+
+Fix false positive test failure in f_pre_1970_date_encoding on 32-bit
+systems with a 64-bit time_t. (Addresses Debian Bug: #932906)
+
+Fixed various compiler warnings. (Addresses Google Bug #118836063)
+
+Update the Czech, Dutch, French, German, Malay, Polish, Portuguese,
+Spanish, Swedish, Ukrainian, and Vietnamese translations from the
+Translation Project.
+
diff --git a/doc/RelNotes/v1.45.5.txt b/doc/RelNotes/v1.45.5.txt
new file mode 100644
index 0000000..70cef96
--- /dev/null
+++ b/doc/RelNotes/v1.45.5.txt
@@ -0,0 +1,88 @@
+E2fsprogs 1.45.5 (January 7, 2020)
+==================================
+
+Updates/Fixes since v1.45.4:
+
+Fixes
+-----
+
+E2fsck will no longer force a full file system check if time-based
+forced checks are disabled and the last mount time or last write time in
+the superblock are in the future.
+
+Fix a potential out of bounds write when checking a maliciously
+corrupted file system. This is probably not exploitable on 64-bit
+platforms, but may be exploitable on 32-bit binaries depending on how
+the compiler lays out the stack variables. (Addresses CVE-2019-5188)
+
+Fixed spurious weekly e-mails when e2scrub_all is run via a cron job
+on non-systemd systems. (Addresses Debian Bug: #944033)
+
+Remove an unnecessary sleep in e2scrub which could add up to an
+additional two second delay during the boot up. Also, avoid trying
+to reap aborted snapshots if it has been disabled via e2scrub.conf.
+(Addresses Debian Bug: #948193)
+
+If a mischievous system administrator mounts a pseudo-file system such
+as tmpfs with a device name that duplicates another mounted file system,
+this could potentially confuse resize2fs when it needs to find the mount
+point of a mounted file system. (Who would have guessed?) Add some
+sanity checking so that we can make libext2fs more robust against such
+insanity, at least on Linux. (GNU HURD doesn't support st_rdev.)
+
+Tune2fs now prohibits enabling or disabling uninit_bg if the file system
+is mounted, since this could result in the file system getting
+corrupted, and there is an unfortunate AskUbuntu article suggesting this
+as a way to modify a file system's UUID on a live file system. (Ext4
+now has a way to do this safely, using the metadata_csum_seed feature,
+which was added in the 4.4 Linux kernel.)
+
+Fix potential crash in e2fsck when rebuilding very large directories on
+file systems which have the new large_dir feature enable.
+
+Fix support of 32-bit uid's and gid's in fuse2fs and in mke2fs -d.
+
+Fix mke2fs's setting bad blocks to bigalloc file systems.
+
+Fix a bug where fuse2fs would incorrectly report the i_blocks fields for
+bigalloc file systems.
+
+Resize2fs's minimum size estimates (via resize2fs -M) estimates are now
+more accurate when run on mounted file systems.
+
+Fixed potential memory leak in read_bitmap() in libext2fs.
+
+Fixed various UBsan failures found when fuzzing file system images.
+(Addresses Google Bug: #128130353)
+
+Updated and clarified various man pages.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Speed up e2fsck on file systems with a very large number of inodes
+caused by repeated calls to gettext().
+
+The inode_io io_manager can now support files which are greater than
+2GB.
+
+The ext2_off_t and ext2_off64_t are now signed types so that
+ext2fs_file_lseek() and ext2fs_file_llseek() can work correctly.
+
+Reserve codepoint for the fast_commit feature.
+
+Fixed various Debian packaging issues.
+
+Fix portability problems for Illumous and on hurd/i386 (Addresses Debian
+Bug: #944649)
+
+Always compile the ext2fs_swap_* functions even on little-endian
+architectures, so that debian/libext2fs.symbols can be consistent across
+architectures.
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Updated config.guess and config.sub with newer versions from the FSF.
+
+Update the Chinese and Malay translations from the translation project.
diff --git a/doc/RelNotes/v1.45.6.txt b/doc/RelNotes/v1.45.6.txt
new file mode 100644
index 0000000..ac822bf
--- /dev/null
+++ b/doc/RelNotes/v1.45.6.txt
@@ -0,0 +1,62 @@
+E2fsprogs 1.45.6 (March 20, 2020)
+==================================
+
+Updates/Fixes since v1.45.5:
+
+UI and Features
+---------------
+
+Debugfs will ignore lines in its command files which start with a
+comment character ("#").
+
+
+Fixes
+-----
+
+Fixed a number of potential out of bounds memory accesses caused by
+fuzzed / malicious file systems. (Addresses Google Bug: #147849134)
+
+Fix a spurious complaint from e2fsck when a directory which previously
+had more than 32000 subdirectories has the number of subdirectories
+drops below 32000.
+
+Fix an ismounted check when an LVM device is renamed while the device is
+mounted.
+
+Mke2fs -d now correctly sets permission with files where the owner
+permissions are not rwx.
+
+Improve e2fsck's ability to deal with file systems with very large
+number of directories, such that various data structures take more than
+2GiB of memory. Use better structure packing to improve the memory
+efficiency of these data structures.
+
+Fix debugfs so it correctly prints inode numbers > 2**31.
+
+Filefrag now supports very large files (with > 4 billion blocks), as
+well as block sizes up to 1 GiB.
+
+Updated and clarified various man pages. (Addresses Debian Bugs:
+#953493, #953494, #951808)
+
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Reserved the error code EXT2_ET_NO_GDESC (which will be used in
+e2fsprogs v1.46+)
+
+Added a thread-safe variant of e2p_feature2string(),
+e2p_feature_to_string() to the libe2p library.
+
+Fixed portability problems caused by gcc 10.
+
+Fixed portability problem in libcom_err with GNU Hurd.
+
+Fixed various Debian packaging issues. (Addresses-Debian-Bug: #953926)
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Update the Malay translation from the translation project.
+
diff --git a/doc/RelNotes/v1.45.7.txt b/doc/RelNotes/v1.45.7.txt
new file mode 100644
index 0000000..f3957b1
--- /dev/null
+++ b/doc/RelNotes/v1.45.7.txt
@@ -0,0 +1,96 @@
+E2fsprogs 1.45.7 (January 28, 2021)
+==================================
+
+Updates/Fixes since v1.45.6:
+
+UI and Features
+---------------
+
+Mke2fs will now warn when creating a file system on a DAX-capable device
+and the block size is incompatible with DAX.
+
+The chattr and lsattr programs now support using the 'x' attribute to
+set/get dax support on a particular file.
+
+E2fsprogs now supports the gnu.* extended attribute namespace, which
+allows mke2fs -d to import the gnu.translator extended attributes.
+
+Add support for the simultaneous enablement of the casefold and
+encryption features, which ext4 supports starting with the v5.5 Linux
+kernel.
+
+
+Fixes
+-----
+
+When trying to run debugfs on a mounted file system, it's possible for
+the superblock to be read in an inconsistent state; debugfs will now
+retry the open in the hopes that it will succeed.
+
+Fix an off-by-one error when validating the depth of an htree which
+caused e2fsck to potentially fail to notice an invalid htree.
+
+Fix potential buffer overrun in e2fsck when scanning directory blocks in
+pass 2. (Addresses Google Bug: #158564737)
+
+Fix tune2fs so that it unlocks the MMP block if it can't perform the
+requested operation.
+
+Fix mke2fs so it can import the contents of a directory using the -d
+option when it has inode numbers that are greater than 2**32. Also fix
+an omission were the extended attributes on the top-level directory was
+not getting copied to the root directory.
+
+Fix e4crypt so that the add_key operation uses the explicitly provided
+salt if it is provided.
+
+Fix resize2fs to prevent it from overflowing the block group descriptors
+from overflowing the first block group. (This can only happen when the
+block size is 1k and the file system is very large.)
+
+Fix debugfs's set_super_value command so it can set 64-bit integer
+fields, such as s_kbytes_written.
+
+Fix filefrag so that it won't crash if the kernel returns zero for
+statfs(2)'s device id or if it returns a blocksize of zero the device's
+blocksize. This only happens with kernel bugs, but filefrag shouldn't
+crash when the kernel returns an unexpected value.
+
+Fix a few bad error code returns in the unix and sparse I/O managers.
+(These errors rarely happen in real life; these were find thanks to a
+static code checker.)
+
+E2fsck will no longer try to fix duplicate file names in an encrypted
+directory by mutating the file name since that will cause the decrypted
+file name to be gibberish, or to contain invalid characters.
+
+Updated and clarified various man pages.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+The misc/mke2fs.conf.in script now properly escaping of double quotes
+when incorporating the mke2fs.conf into the default_profile.c file. The
+upstream version of the mke2fs.conf.in file doesn't have any double
+quotes, but this allows a customized distribution of e2fsprogs to have
+double quotes in its default mke2fs profile.
+
+Speeded up mkfs.ext3 by batching calls to ext2fs_zero_blocks when
+zeroing the blocks for an indirect-block mapped journal inode.
+
+Fixed portability problem for implementations of grep which don't
+support extended regexp's without the -E option.
+
+Fix various compiler and Coverity warnings.
+
+Fixed portability issue which caused a build failure when mkdir -p is
+not thread safe; in that case, the Makefiles would not find the
+install_sh replacement script.
+
+Fixed various Debian packaging issues.
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Update the Dutch, Malay, and Serbian translations from the translation
+project.
diff --git a/doc/RelNotes/v1.46.0.txt b/doc/RelNotes/v1.46.0.txt
new file mode 100644
index 0000000..8fb5222
--- /dev/null
+++ b/doc/RelNotes/v1.46.0.txt
@@ -0,0 +1,108 @@
+E2fsprogs 1.46.0 (January 29, 2021)
+===================================
+
+Updates/Fixes since v1.45.7:
+
+UI and Features
+---------------
+
+E2fsprogs now supports the fast_commit (COMPAT_FAST_COMMIT) feature.
+This feature, first available in Linux version 5.10, adds a fine-grained
+journalling which improves the latency of the fsync(2) system call. It
+should also improve the performance of ext4 file systems exported via
+NFS.
+
+E2fsprogs now supports the stable_inodes (COMPAT_STABLE_INODES) feature.
+This needed to support fscrypt siphash algorithm, which calculates the
+initial vector (IV) for encryption based on the UUID and the inode
+number. This means that we can't renumber inodes (for example, when
+shrinking a file system) and the UUID can't be changed without breaking
+the ability to decrypt the encryption.
+
+E2fsprogs now supports file systems which have both file system
+encryption and the casefold feature enabled. This is used in some
+Android handsets, but has not yet landed upstream yet.
+
+E2fsck now will check file names on file systems with case folding
+enabled to make sure the characters are valid UTF-8 characters. This is
+done for file systems which enforce strict encodings, and optionally if
+the extended "check_encoding" option is requested.
+
+The fuse2fs program now supports the "-o norecovery" option, which will
+suppress any journal replay that might be necessary, and mounts the file
+system read-only.
+
+E2fsck will now find and fix file system corruptions when the encrypted
+files have a different policy from their containing directory.
+
+The "htree" command in debugfs now displays the metadata checksums for
+hash tree index blocks.
+
+Dumpe2fs will print the error code that Linux kernels newer than v5.6
+will save to indicate the class of error which triggered the ext4_error
+event.
+
+E2fsprogs programs (in particular, fuse2fs) can now update htree
+directories without clearing the htree index.
+
+Mke2fs now sets the s_overhead_cluster field, so that the kernel doesn't
+need to calculate it at mount time. This speeds up mounting very large
+file systems.
+
+
+Fixes
+-----
+
+E2fsck will properly handle checking for duplicated file names when case
+folding is enabled.
+
+Fix various bugs where a maliciously corrupted file systems could case
+e2fsck and other e2fsprogs programs to crash.
+
+Tune2fs will properly recalculate directory block checksums when
+clearing the dir_index feature.
+
+Fix a bug in e2fsck directory rehashing which could fail with ENOSPC
+because it doesn't take into account the space needed for the metadata
+checksum, and doesn't create a sufficiently deep index tree.
+
+Clarify the e2fsck messages when it resets the directory link count when
+it is set to the overflow value but it is no longer needed.
+
+The filefrag program can now request the kernel to display the extent
+status cache by using "filefrag -E". (This requires Linux version 5.4
+or newer.)
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Speed up mke2fs when creating large bigalloc file systems by optimizing
+ext2fs_convert_subcluster_bitmap().
+
+Bitmap blocks are now read using multiple threads (for systems with
+pthread support). This speeds up dumpe2fs, e2fsck, and debugfs for very
+large file systems.
+
+The dumpe2fs and tune2fs will now avoiding to read the block group
+descriptors when they are not needed, which speeds up these program when
+operating on very large file systems.
+
+Drop use of the sysctl(2) system call, which is deprecated in Linux.
+
+Add support for "configure --enable-developer-features" which enables
+features only meant for developer. The first such feature is "e2fsck -E
+clear_all_uninit_bits", which clears the uninitialized bit on all
+extents for all inodes. Note that this can end up exposing uninitialized
+data to userspace, and should only used in very specialized situations.
+
+The e2fsck/revoke.c and e2fsck/recovery.c files are now kept idential
+with the fs/jbd2 versions of these files in the kernel.
+
+Fix various compiler and Coverity warnings.
+
+Update to use gettext 0.19.8. This also removes the built-in "intl"
+directory as this is now considered deprecated by gettext. This means
+that if the system doesn't have gettext installed on the build system,
+we will simply disable NLS support.
+
diff --git a/doc/RelNotes/v1.46.1.txt b/doc/RelNotes/v1.46.1.txt
new file mode 100644
index 0000000..7026e5f
--- /dev/null
+++ b/doc/RelNotes/v1.46.1.txt
@@ -0,0 +1,41 @@
+E2fsprogs 1.46.1 (February 9, 2021)
+===================================
+
+Updates/Fixes since v1.46.0:
+
+Fixes
+-----
+
+Fix a bug in libext2fs and debugfs when trying to set an extended
+attribute will result in a seg fault.
+
+Fix e2fsck so it properly accepts large_dir directories which are
+greater than 4GB in size.
+
+Fix fast commit support on big endian architectures. Also avoid potential
+crash on an error handling case.
+
+Fix mke2fs -d so it correctly handles important a directory or small
+file which is stored using inline_data and contains an ACL or extended
+attribute. (Addresses-Debian-Bug: #971014)
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Fix build failure on systems with pthread && without FUSE support.
+
+Fix various compiler warnings.
+
+Fix portability problems by not depending on the glibc specific qsort_r
+function.
+
+Change configure.ac to use AS_HELP_STRING instead of the deprecated
+AC_HELP_STRING, and explicitly declare that the configure.ac requires
+autoconf 2.69.
+
+Fixed/improved various Debian packaging issues. (Addresses-Debian-Bug:
+#966686)
+
+Update the Czech, French, Malay, Polish, Portuguese, Swedish, and
+Ukranian translations from the translation project.
diff --git a/doc/RelNotes/v1.46.2.txt b/doc/RelNotes/v1.46.2.txt
new file mode 100644
index 0000000..8f15738
--- /dev/null
+++ b/doc/RelNotes/v1.46.2.txt
@@ -0,0 +1,64 @@
+E2fsprogs 1.46.2 (February 28, 2021)
+===================================
+
+Updates/Fixes since v1.46.1:
+
+UI and Features
+---------------
+
+Teach the tune2fs program to support "random" as an argument to the -c
+option, which sets the maximum mount count. (Addresses Debian Bug:
+#926293)
+
+Add support for the FS_NOCOMP_FL flag to chattr and lsattr.
+
+
+Fixes
+-----
+
+When resizing a small file systems to a super-large file system size,
+avoid issuing some scary bitmap operation warnings. (Addresses Github
+issue https://github.com/tytso/e2fsprogs/issues/60)
+
+Fix the debugfs rdump and ls commands so they will work correctly for
+uid's and gid's => 65536. (Addresses Github issue issue
+https://github.com/tytso/e2fsprogs/issues/63)
+
+Fix the debugfs write and symlink commands so they support targets which
+contain a pathname (instead of only working when writing a file or
+creating a symlink in the current directory). (Addresses Github issue
+https://github.com/tytso/e2fsprogs/issues/61)
+
+Fix Direct I/O support on block devices where the logical block size is
+greater 1k. (This includes Advanced Format HDD's, where the sector size
+is 4k, and IBM Mainframe DASD's, where the sector size is 2k.)
+
+Fix debugfs's logdump so it works on file systems whose block size is
+greater than 8k.
+
+Fix a where e2fsck could a crash when there is error while e2fsck is
+trying to open the file system, and e2fsck calls ext2fs_mmp_stop()
+before MMP has been initialized. (Addresses Debian Bug: #696609)
+
+Improved error checking in the fast commit replay code in e2fsck.
+
+Updated and clarified the chattr man page.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Fix various compiler and Coverity warnings.
+
+Update the Spanish translation from the translation project.
+
+Update the e2fsck/iscan.c test program so that it builds again.
+
+Fix an environmental dependency bug for the m_rootdir_acl regression
+test.
+
+Avoid the use of loff_t, which is not available for all compilers /
+system include files.
+
+Fix failure of the t_mmp_fail test when running on a device with a 4k
+logical sector size.
diff --git a/doc/RelNotes/v1.46.3.txt b/doc/RelNotes/v1.46.3.txt
new file mode 100644
index 0000000..b0e4d8b
--- /dev/null
+++ b/doc/RelNotes/v1.46.3.txt
@@ -0,0 +1,77 @@
+E2fsprogs 1.46.3 (July 27, 2021)
+================================
+
+Updates/Fixes since v1.46.2:
+
+UI and Features
+---------------
+
+Teach the filefrag program the -V option, which will print the version
+of the tool, or if -V option is specified twice, will print the list of
+supported FIEMAP flags.
+
+
+Fixes
+-----
+
+Fix bug in resize2fs where growing a file system with MMP enabled and
+there aren't any (or sufficient) reserved block group descriptors,
+resize2fs could potentially overwrite the MMP block, leading to file
+system corruption. (Addresses Debian Bug: #984472)
+
+Fix fast_commit portability problems on sparc64 and arm64 architectures
+(the latter when running e2fsprogs compiled for arm32). (Addresses
+Debian Bug: #987641)
+
+Fix missing mutex unlock in an error path in the Unix I/O manager.
+
+Fix Direct I/O support in the Unix I/O manager (this was a regression
+that was introduced in v1.46.2).
+
+Fix mke2fs to avoid discarding blocks beyond the end of the file system
+to be created when creating a file system which is smaller than 16MB and
+the file system size was explicitly specified and smaller than the size
+of the block device. (Addresses Debian Bug: #989630)
+
+Teach mke2fs to avoid giving a spurious warning about a pre-existing
+partition table and it is creating a file system at a non-zero offset
+(so the partition table wouldn't be overwritten in any case).
+(Addresses Debian Bug: #989612)
+
+Fix e2image -Q to prevent a multiplication overflow could corrupt the
+generated QCOW2 output file for very large file systems.
+
+When e2fsck repairs '.' and '..' entries in corrupted directories, set
+the file type in the directory entry to be EXT2_FT_DIR and do not leave
+the file type as EXT2_FT_UNKNOWN.
+
+Fix e2fsck so that the if the s_interval is zero, and the last mount or
+write time is in the future, it will fix invalid last mount/write
+timestamps in the superblock. (This was a regression introduced in
+v1.45.5.)
+
+Fix potential memory leaks and seg faults when memory allocations fail.
+
+Fix lsattr and chattr to avoid opening or calling EXT2_IOC_[GS]ETFLAGS
+on devices, since this can cause some devices to react badly as a
+result. (Thix fixes a regression introduced in v1.46.2 and addresses
+Debian Bug: #986332)
+
+Updated and clarified the e2image and filefrag man pages.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Avoid forking an unnecessary thread in ext2fs_rw_bitmaps().
+
+Avoid unnecessary stat(2) calls on mountpoints when checking if a file
+system is mounted.
+
+Add more modern support for Windows I/O.
+
+Fix various compiler and valgrind warnings.
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Update Dutch, Malay, and Serbian translations.
diff --git a/doc/RelNotes/v1.46.4.txt b/doc/RelNotes/v1.46.4.txt
new file mode 100644
index 0000000..5e39745
--- /dev/null
+++ b/doc/RelNotes/v1.46.4.txt
@@ -0,0 +1,69 @@
+E2fsprogs 1.46.4 (August 18, 2021)
+==================================
+
+Updates/Fixes since v1.46.3:
+
+UI and Features
+---------------
+
+The defaults for mke2fs now call for 256 byte inodes for all file
+systems (with the exception of file systems for the GNU Hurd, which only
+supports 128 byte inodes). Creating non-Hurd file systems with 128 byte
+inodes will trigger a warning message to make sure users are aware of
+the potential problems of using small/legacy inode sizes.
+
+The bigalloc feature is now considered supported if the cluster size no
+more than 16 times the block size. So the mke2fs program has been
+changes to only warn if the cluster size is larger than that.
+
+
+Fixes
+-----
+
+E2fsck now checks to make sure directory entries do not reference
+internal quota inodes.
+
+E2image now includes the quota inodes when creating file system image,
+since they are part of the file system metadata.
+
+E2fsck now properly accounts the quota usage of the project quota file.
+
+Fix a regression introduced in 1.64.3 where attempting to create a file
+system image using mke2fs into a non-existent file would fail.
+(Addresses Debian Bug: #992094)
+
+Fix mke2fs to correctly create Posix ACL's on big-endian systems when
+copying files from a directory hierarchy.
+
+Updated and clarified the resize2fs man page. (Addresses Debian Bug:
+#979411)
+
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Improve various regression tests to be more portable and to reflect the
+new default inode size of 256 byte inodes, even for small file systems.
+
+Fixed a GNU Hurd portability problem which was causing tests to fail.
+
+Fixed a test failure in f_baddotdir on big-endian systems. This wasn't
+necessarily a bug per se in e2fsck, but rather e2fsck having different
+behaviour on big-endian systems. (Addresses Debian Bug: #991922)
+
+Use WantedBy=multi-user.target in e2scrub_reap.service. (Addresses
+Debian Bug: #991349)
+
+Synchronize e2fsck/recovery.c with the kernel's fs/jbd2/recovery.c
+
+Fix various Coverity and compiler warnings.
+
+Fix various error pathes to make sure we don't leak resources or
+potentially use or try to free uninitialized pointers.
+
+Added a setup-schroot command for use on Debian porter boxes.
+
+Updated config.guess and config.sub with newer versions from the FSF.
+
+Update Czech, Dutch, French, Polish, Portuguese, and Swedish translations.
diff --git a/doc/RelNotes/v1.46.5.txt b/doc/RelNotes/v1.46.5.txt
new file mode 100644
index 0000000..1bd60c8
--- /dev/null
+++ b/doc/RelNotes/v1.46.5.txt
@@ -0,0 +1,82 @@
+E2fsprogs 1.46.5 (December 30, 2021)
+====================================
+
+Updates/Fixes since v1.46.4:
+
+UI and Features
+---------------
+
+When resizing a file system and the inode count exceeds the 2**32
+maximum, if resize2fs can successfully perform the resize by dropping
+the last block group, resize2fs will do that in order to allow the file
+system grow operation to succeed. For example, using the default inode
+ratio size of 16k, this will allow a successful resize to 64TB - 128MB
+when the storage device is 64TB.
+
+
+Fixes
+-----
+
+Avoid a potential infinite loop in resize2fs -P when the file system is
+corrupted (introduced in e2fsprogs 1.45.5). (Addresses github issue
+https://github.com/tytso/e2fsprogs/issues/94)
+
+E2fsck now updates the bg_checksum after fixing problems in the block
+group descriptor, which eliminates some unnecessary messages printed or
+asked of the system administrator.
+
+Fixed some potential deadlock problems in the unix_io handler in the case
+of I/O errors. The fix should also improve the performance of parallel
+bitmap loading.
+
+Fixed e2fsck's fast commit handling which could result it in crashing
+when trying to merge extents when there were none available to be
+merged.
+
+Fix e2fsck's support of quota limit data, which could sometimes get
+dropped when the quota data needs to be regenerated, or when processing
+the orphan list.
+
+Fix tune2fs to correctly transfer the quota limits when converting quota
+files to the internal quota inodes. Also add support for tune2fs to
+properly handle the older version 0 quota files.
+
+Fix debugfs's get_quota and list_quota commands so that the header of
+the report printed by these commands correctly reflect that the units of
+used space is in bytes instead of blocks.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Add some additional packages to the setup-schroot script to account for
+the fact that the script can be run on older Debian distributions and so
+the build dependencies might omit some packages needed to build
+e2fsprogs on unstable version of Debian.
+
+Reduce resize2fs's CPU overhead when counting the number of blocks in
+use which can reduce the wall clock time for very large file systems
+by substantial amount.
+
+Teach libuuid to use getrandom() or getentropy() if available in favor
+of reading from /dev/[u]random.
+
+Teach libss to use libreadline.so.8 if it is available.
+
+Update some test expect files to fix some regression tests that were
+broken in e2fsprogs 1.46.4.
+
+If the PRINT_FAILED environment variable is set, failed tests will
+display the diff output to make it easier to debug test failures on
+autobuilders.
+
+Fix various compiler warnings.
+
+Update tst_getsize to use ext2fs_get_size2() to support testing devices
+which are larger than 2**32 sectors.
+
+Fixed spelling mistakes in the mke2fs.conf man page.
+
+Update Chinese, Malay, Serbian, Spanish, Swedish, and Ukrainian
+translations.
+
diff --git a/doc/RelNotes/v1.46.6.txt b/doc/RelNotes/v1.46.6.txt
new file mode 100644
index 0000000..223a2e2
--- /dev/null
+++ b/doc/RelNotes/v1.46.6.txt
@@ -0,0 +1,164 @@
+E2fsprogs 1.46.6 (February 1, 2023)
+=====================================
+
+Updates/Fixes since v1.46.5:
+
+UI and Features
+---------------
+
+Debugfs's ncheck command now allows the inode number to be surrounded by
+angle brackets, to be consistent with other debugfs commands.
+
+Debugfs no longer prints a scary message when debugfs -c (which enables
+"catastrophic mode") is used. This was intended to allow debugfs to
+operate on very badly corrupted file systems, but it is now sometimes
+used to suppress reading the block and inode bitmaps when they are not
+needed.
+
+Resize2fs will round down the requested new file system size to the
+nearest cluster boundary when resizing bigalloc file systems.
+
+Improve error messages issued by badblocks.
+
+Fuse2fs now supports an offset=<bytes> option which allows operating on
+a file system image which is located starting at the specified offset
+from the beginning of the image.
+
+
+
+Fixes
+-----
+
+Pre-v6.2 Linux kernels had long-standing bug in how the extended
+attribute hash was calculated when there were non-ASCII characters in
+the xattr name, when the hash would be different depending on whether
+the C 'char' type was signed or unsigned. To address this bug, starting
+with e2fsprogs 1.46.6+ and Linux 6.2+, we will accept either the signed
+or unsigned hash variant, but only set the unsigned hash variant. Since
+extended attribute names are in practice composed of ASCII characters,
+other than various tests (such as generic/454), most users will
+hopefully not notice this change.
+
+Avoid triggering udev in dumpe2fs and "resize2fs -P" for file systems
+with MMP enabled by opening the device read-only when reading the MMP
+block.
+
+Fix MMP handling so it can notice when another writer has modify the MMP
+block out from under it when stopping a MMP sessions.
+
+Fix tune2fs so it will detect another device stealing the MMP sessions
+while rewriting metadata checksums.
+
+E2fsck will now check to make sure the journal inode does not have the
+encrypt flag set.
+
+Fix a deadlock bug in e2fsck's error handler when there are errors
+trying to write to the file system.
+
+Fix a bug where e2fsck could fail when specifying an undo file and an
+explicit superblock number.
+
+Fix e2image so it won't potentially loop forever for certain invalid
+file systems.
+
+Fix resize2fs to honor the E2FSPROGS_FAKE_TIME environment variable.
+This allows embedded system builders who use resize2fs as part of their
+image build process to create reproducible images.
+
+Fix tune2fs to avoid a crash if the journal replay fails and to make
+sure its exit status is non-zero if there is some failure.
+
+Fix tune2fs, fuse2fs, and debugsfs to update j_tail_sequence when
+replaying the journal.
+
+Add additional bullet-proofing for very badly corrupted file systems.
+Try avoid UBSAN warnings, null pointer derferences, and other memory
+bugs. (Addresses CVE-2022-1304)
+
+Don't fail when the source directory for mke2fs -d doesn't support
+extended attributese.
+
+Check for and handle malloc() failures when computing the log filename
+in e2fsck and in the libss library.
+
+Fix tune2fs and e2fsck to accept pathames which include '=' characters.
+Previously arguments to tune2fs and e2fsck which included '=' characters
+are presumed to be blkid specifiers such as UUID=xxx or LABEL=yyy. If a
+specifier is both a valid pathname name and blkid tag name specifier,
+priority is given to a blkid resolved pathname.
+
+Improve tune2fs's error messages.
+
+Fix a bug in tune2fs which could cause it to crash if device goes
+off-line just as it being opened.
+
+Fix the fsck driver so if it is interrupted while running fsck -N it
+doesn't end up kllling all processes on the system.
+
+Fix a crash in badblocks when the user specifies an overly large
+number of blocks tested at a time in read/write or nondestructive
+mode.
+
+Update and clarify's chattr's man page and usage message. Fix spelling
+typo's in a variety of different man pages and comments.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Update to autoconf 2.71.
+
+Update flags used to create shared library on Darwin/MacOS.
+
+Speed up e2fsck's clonning of multiply-claimed blocks so it is
+substantially faster on very large file systems.
+
+Add tests/fuzz directory with fuzzers from oss-fuzz.
+
+Add a Github Actions configuration file so that Github will run CI tests
+on Linux, Windows and MacOS on a push to the e2fsprogs github repo.
+
+Make the mtab parsing in ext2fs_check_mount_point() more careful so it
+won't get confused when a block device shows up in the mnt_name field
+for a virtual file system.
+
+Fix the libss's Makefile to create the man page directory before trying
+to install its man page.
+
+Fix various Coverity and compiler warnings.
+
+Make tests more portable on various different OS's and system
+configurations (e.g., with SELinux enabled, MacOS, and Windows)
+
+Use mallinfo2() instead of mallinfo() where avilable, since mallinfo()
+is deprecated on newer glibc versions.
+
+E2fsck will no longer do a full scan of disconnected directory when
+trying to print the parent directory, which is pointless and can slow
+down e2fsck if there are a large number of disconnected directories.
+
+Debugfs will now print the extended attribute's e_hash field.
+
+Fix the setup-schroot script to work on non-Linux platforms.
+
+Fix ext2fs_compare_generic_bmap() so it correctly compares all of the
+bits in the bitmap, and so that it works correctly when comparing a
+bitarray bitmap with a rbtree-based bitmap. (Fortunately, none of the
+programs in e2fsprogs uses bitmap comparison functions.)
+
+Fix memory leaks on error paths.
+
+Add support for the configure option --enable-largefile so that
+e2fsprogs can utilize largefile support for the MUSL C library.
+
+Add an note that the dict library code has been modified, as required by
+the Kazlib license.
+
+Synchronized changes from Android's AOSP e2fsprogs tree.
+
+Updated config.guess and config.sub with newer versions from the FSF.
+
+Add Friulian translation.
+
+Update Chinese, Czech, Dutch, French, German, Malay, Polish, Serbian,
+Spanish, Swedish, and Ukrainian translations.
diff --git a/doc/RelNotes/v1.47.0.txt b/doc/RelNotes/v1.47.0.txt
new file mode 100644
index 0000000..8af28b9
--- /dev/null
+++ b/doc/RelNotes/v1.47.0.txt
@@ -0,0 +1,53 @@
+E2fsprogs 1.47.0 (February 5, 2023)
+===================================
+
+Updates/Fixes since v1.46.6:
+
+UI and Features
+---------------
+
+Add support for the orphan_file feature, which speeds up workloads that
+are deleting or truncating a large number files in parallel. This
+compat feature was first supported in the v5.15 Linux kernel.
+
+The mke2fs program (via the mke2fs.conf file) now enables the
+metadata_csum_seed and orphan_file features by default. The
+metadata_csum_seed feature is an incompat feature which is first
+supported in the Linux kernel starting in the 4.4 kernel and e2fsprogs
+1.43.
+
+Mke2fs now supports the extended option "assume_storage_prezeroed" which
+causes mke2fs to skip zeroing the journal and inode tables and to mark
+the inode tables as zeroed.
+
+Add support to tune2fs and e2label to set the label and UUID for a
+mounted file system using a ioctl, which is more reliable than modifying
+the superblock via writing to the block device. The kernel support for
+setting the label landed in v5.17, while the support for adding the UUID
+landed in v6.0. If the ioctls are not supported, tune2fs and e2label
+will fall back old strategy of directly modifying the superblock.
+
+Allow tune2fs to disable the casefold feature after scanning all of the
+directories do not have the Casefold flag set.
+
+
+Fixes
+-----
+
+Fix a potential unbalanced mutex unlock when there is a short read while
+using the bounce buffer when using direct I/O.
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+Fix various Coverity and compiler warnings.
+
+Add the new function ext2fs_xattrs_read_inode() which takes an in-memory
+inode to avoid needing to reread an inode that was already read into
+memory.
+
+Teach debugfs logdump command the -n option which forces printing a
+specified number of transactions, even when a block missing a magic
+number would have stopped the logdump. (This is for debugging
+journalling problems.)
diff --git a/doc/libblkid.txt b/doc/libblkid.txt
new file mode 100644
index 0000000..4aea1b6
--- /dev/null
+++ b/doc/libblkid.txt
@@ -0,0 +1,78 @@
+libblkid - a library to handle device identification and token extraction
+
+Basic usage is as follows - there are two normal usage patterns:
+
+For cases where a program wants information about multiple devices, or
+expects to be doing multiple token searches, the program should
+directly initialize cache file via (second parameter is cache
+filename, NULL = default):
+
+ blkid_cache cache = NULL;
+ if (blkid_get_cache(&cache, NULL) < 0)
+ /* error reading the cache file, not really fatal */
+
+Note that if no cache file exists, an empty cache struct is still
+allocated. Usage of libblkid functions will use the cache to avoid
+needless device scans.
+
+The model of the blkid cache is that each device has a number of
+attributes that can be associated with it. Currently the attributes
+which are supported (and set) by blkid are:
+
+ TYPE filesystem type
+ UUID filesystem uuid
+ LABEL filesystem label
+
+
+How to use libblkid? Normally, you either want to find a device with
+a specific NAME=value token, or you want to output token(s) from a
+device. To find a device that matches a following attribute, you
+simply call the blkid_get_devname() function:
+
+ if ((devname = blkid_get_devname(cache, attribute_name, value))) {
+ /* do something with devname */
+ string_free(devname);
+ }
+
+The cache parameter is optional; if it is NULL, then the blkid library
+will load the default blkid.tab cache file, and then release the cache
+before function call returns. The return value is an allocated string
+which holds the resulting device name (if it is found). If the value
+is NULL, then attribute_name is parsed as if it were
+"<attribute_name>=<value>"; if it cannot be so parsed, then the
+original attribute_name is returned in a copied allocated string.
+This is a convenience to allow user programs to want to translate user
+input, whether it is of the form: "/dev/hda1", "LABEL=root",
+"UUID=082D-26E3", and get back a device name that it can use.
+
+Alternatively, of course, the programmer can pass an attribute name of
+"LABEL", and value of "root", if that is more convenient.
+
+Another common usage is to retrieve the value of a specific attribute
+for a particular device. This can be used to determine the filesystem
+type, or label, or uuid for a particular device:
+
+ if ((value = blkid_get_tag_value(cache, attribute_name, devname))) {
+ /* do something with value */
+ string_free(value);
+ }
+
+If a program needs to call multiple blkid functions, then passing in a
+cache value of NULL is not recommended, since the /etc/blkid.tab file
+will be repeatedly parsed over and over again, with memory allocated
+and deallocated. To initialize the blkid cache, blkid_get_cache()
+function is used:
+
+ if (blkid_get_cache(&cache, NULL) < 0)
+ goto errout;
+
+The second parameter of blkid_get_cache (if non-zero) is the alternate
+filename of the blkid cache file (where the default is
+/etc/blkid.tab). Normally, programs should just pass in NULL.
+
+If you have called blkid_get_cache(), you should call blkid_put_cache()
+when you are done using the blkid library functions. This will save the
+cache to the blkid.tab file, if you have write access to the file. It
+will also free all associated devices and tags:
+
+ blkid_put_cache(cache);
diff --git a/doc/libext2fs.texinfo b/doc/libext2fs.texinfo
new file mode 100644
index 0000000..5d4b053
--- /dev/null
+++ b/doc/libext2fs.texinfo
@@ -0,0 +1,1374 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename libext2fs.info
+@settitle The EXT2FS Library (version 1.47.0)
+@synindex tp fn
+@comment %**end of header
+
+@ifinfo
+@dircategory Development
+@direntry
+* libext2fs: (libext2fs). The EXT2FS library.
+@end direntry
+@end ifinfo
+
+@c smallbook
+
+@iftex
+@finalout
+@end iftex
+
+@c Note: the edition number is listed in *three* places; please update
+@c all three. Also, update the month and year where appropriate.
+
+@c ==> Update edition number for settitle and subtitle, and in the
+@c ==> following paragraph; update date, too.
+
+
+@ifinfo
+This file documents the ext2fs library, a library for manipulating the
+ext2 filesystem.
+
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 by Theodore Ts'o
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+@ignore
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+
+@end ignore
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the entire
+resulting derived work is distributed under the terms of a permission
+notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that this permission notice may be stated in a translation approved
+by the author.
+@end ifinfo
+
+@setchapternewpage on
+@titlepage
+@c use the new format for titles
+
+@title The EXT2FS Library
+@subtitle The EXT2FS Library
+@subtitle Version 1.47.0
+@subtitle February 2023
+
+@author by Theodore Ts'o
+
+@c Include the Distribution inside the titlepage so
+@c that headings are turned off.
+
+@tex
+\global\parindent=0pt
+\global\parskip=8pt
+\global\baselineskip=13pt
+@end tex
+
+@page
+@vskip 0pt plus 1filll
+Copyright @copyright{} 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Theodore Ts'o
+
+@sp 2
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the entire
+resulting derived work is distributed under the terms of a permission
+notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that this permission notice may be stated in a translation approved
+by the Foundation.
+@end titlepage
+@headings double
+
+@node Top, Introduction to the EXT2FS Library, (dir), (dir)
+
+@top The EXT2FS Library
+
+This manual documents the EXT2FS Library, version 1.47.0.
+
+@menu
+* Introduction to the EXT2FS Library::
+* EXT2FS Library Functions::
+* Concept Index::
+* Function Index::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node Introduction to the EXT2FS Library, EXT2FS Library Functions, Top, Top
+@comment node-name, next, previous, up
+@chapter Introduction to the EXT2FS Library
+
+The EXT2FS library is designed to allow user-level programs to
+manipulate an ext2 filesystem.
+
+@node EXT2FS Library Functions, Concept Index, Introduction to the EXT2FS Library, Top
+@comment node-name, next, previous, up
+@chapter EXT2FS Library Functions
+
+@menu
+* Filesystem-level functions::
+* File I/O Functions::
+* Inode Functions::
+* Directory functions::
+* Bitmap Functions::
+* EXT2 data abstractions::
+* Byte-swapping functions::
+* Other functions::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node Filesystem-level functions, File I/O Functions, EXT2FS Library Functions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section Filesystem-level functions
+
+The following functions operate on a filesystem handle. Most EXT2FS
+Library functions require a filesystem handle as their first argument.
+There are two functions which create a filesystem handle,
+@code{ext2fs_open} and @code{ext2fs_initialize}.
+
+The filesystem can also be closed using @code{ext2fs_close}, and any
+changes to the superblock and group descriptors can be written out to disk
+using @code{ext2fs_flush}.
+
+@menu
+* Opening an ext2 filesystem::
+* Closing and flushing out changes::
+* Initializing a filesystem::
+* Filesystem flag functions::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node Opening an ext2 filesystem, Closing and flushing out changes, Filesystem-level functions, Filesystem-level functions
+@comment node-name, next, previous, up
+@subsection Opening an ext2 filesystem
+
+Most libext2fs functions take a filesystem handle of type
+@code{ext2_filsys}. A filesystem handle is created either by opening
+an existing filesystem using @code{ext2fs_open}, or by initializing a new
+filesystem using @code{ext2fs_initialize}.
+
+@deftypefun errcode_t ext2fs_open (const char *@var{name}, int @var{flags}, int @var{superblock}, int @var{block_size}, io_manager @var{manager}, ext2_filsys *@var{ret_fs})
+
+Opens a filesystem named @var{name}, using the the io_manager
+@var{manager} to define the input/output routines needed to read and
+write the filesystem. In the case of the @code{unix_io} io_manager,
+@var{name} is interpreted as the Unix filename of the filesystem image.
+This is often a device file, such as @file{/dev/hda1}.
+
+The @var{superblock} parameter specifies the block number of the
+superblock which should be used when opening the filesystem.
+If @var{superblock} is zero, @code{ext2fs_open} will use the primary
+superblock located at offset 1024 bytes from the start of the filesystem
+image.
+
+The @var{block_size} parameter specifies the block size used by the
+filesystem. Normally this is determined automatically from the
+filesystem superblock. If @var{block_size} is non-zero, it must match
+the block size found in the superblock, or the error
+@code{EXT2_ET_UNEXPECTED_BLOCK_SIZE} will be returned. The
+@var{block_size} parameter is also used to help find the superblock when
+@var{superblock} is non-zero.
+
+The @var{flags} argument contains a bitmask of flags which control how
+the filesystem open should be handled.
+
+@table @code
+@item EXT2_FLAG_RW
+Open the filesystem for reading and writing. Without this flag, the
+filesystem is opened for reading only.
+
+@item EXT2_FLAG_FORCE
+Open the filesystem regardless of the feature sets listed in the
+superblock.
+
+@end table
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Closing and flushing out changes, Initializing a filesystem, Opening an ext2 filesystem, Filesystem-level functions
+@comment node-name, next, previous, up
+@subsection Closing and flushing out changes
+
+@deftypefun errcode_t ext2fs_flush (ext2_filsys @var{fs})
+
+Write any changes to the high-level filesystem data structures in the
+@var{fs} filesystem. The following data structures will be written out:
+
+@itemize @bullet
+@item The filesystem superblock
+@item The filesystem group descriptors
+@item The filesystem bitmaps, if read in via @code{ext2fs_read_bitmaps}.
+@end itemize
+
+@end deftypefun
+
+@deftypefun void ext2fs_free (ext2_filsys @var{fs})
+
+Close the io_manager abstraction for @var{fs} and release all memory
+associated with the filesystem handle.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_close (ext2_filsys @var{fs})
+
+Flush out any changes to the high-level filesystem data structures using
+@code{ext2fs_flush} if the filesystem is marked dirty; then close and
+free the filesystem using @code{ext2fs_free}.
+
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Initializing a filesystem, Filesystem flag functions, Closing and flushing out changes, Filesystem-level functions
+@comment node-name, next, previous, up
+@subsection Initializing a filesystem
+
+An ext2 filesystem is initializing by the @code{mke2fs} program. The
+two functions described here, @code{ext2fs_initialize} and
+@code{ext2fs_allocate_tables} do much of the initial work for setting up
+a filesystem. However, they don't do the whole job. @code{mke2fs}
+calls @code{ext2fs_initialize} to set up the filesystem superblock, and
+calls @code{ext2fs_allocate_tables} to allocate space for the inode
+table, and the inode and block bitmaps. In addition, @code{mke2fs} must
+also initialize the inode tables by clearing them with zeros, create the
+root and lost+found directories, and reserve the reserved inodes.
+
+@deftypefun errcode_t ext2fs_initialize (const char *@var{name}, int @var{flags}, struct ext2_super_block *@var{param}, io_manager @var{manager}, ext2_filsys *@var{ret_fs})
+
+This function is used by the @code{mke2fs} program to initialize a
+filesystem. The @code{ext2fs_initialize} function creates a filesystem
+handle which is returned in @var{ret_fs} that has been properly setup
+for a filesystem to be located in @var{name}, using the io_manager
+@var{manager}. The prototype superblock in @var{param} is used to
+supply parameters such as the number of blocks in the filesystem, the
+block size, etc.
+
+The @code{ext2fs_initialize} function does not actually do any I/O; that
+will be done when the application program calls @code{ext2fs_close} or
+@code{ext2fs_flush}. Also, this function only initializes the
+superblock and group descriptor structures. It does not create the
+inode table or the root directory. This must be done by the calling
+application, such as @code{mke2fs}.
+
+The following values may be set in the @var{param} prototype superblock;
+if a value of 0 is found in a field, @code{ext2fs_initialize} will use a
+default value. The calling application should zero out the prototype
+entire superblock, and then fill in any appropriate values.
+
+@table @code
+
+@item s_blocks_count
+The number of blocks in the filesystem. This parameter is mandatory and
+must be set by the calling application.
+
+@item s_inodes_count
+The number of inodes in the filesystem. The
+default value is determined by calculating the size of the filesystem,
+and creating one inode for every 4096 bytes.
+
+@item s_r_blocks_count
+The number of blocks which should be reserved for the superuser. The
+default value is zero blocks.
+
+@item s_log_block_size
+The blocksize of the filesystem. Valid values are 0 (1024 bytes), 1
+(2048 bytes), or 2 (4096 bytes). The default blocksize is 1024 bytes.
+
+@item s_log_frag_size
+The size of fragments. The ext2 filesystem does not support fragments
+(and may never support fragments). Currently this field must be the
+same as @code{s_log_block_size}.
+
+@item s_first_data_block
+The first data block for the filesystem. For filesystem with a
+blocksize of 1024 bytes, this value must be at least 1, since the
+superblock is located in block number 1. For filesystems with larger
+blocksizes, the superblock is still located at an offset of 1024 bytes,
+so the superblock is located in block number 0. By default, this value
+is set to 1 for filesystems with a block size of 1024 bytes, or 0 for
+filesystems with larger blocksizes.
+
+@item s_max_mnt_count
+This field defines the number of times that the filesystem can be
+mounted before it should be checked using @code{e2fsck}. When
+@code{e2fsck} is run without the @samp{-f} option, @code{e2fsck} will
+skip the filesystem check if the number of times that the filesystem has
+been mounted is less than @code{s_max_mnt_count} and if the interval
+between the last time a filesystem check was performed and the current
+time is less than @code{s_checkinterval} (see below). The default value
+of @code{s_max_mnt_count} is 20.
+
+@item s_checkinterval
+This field defines the minimal interval between filesystem checks. See
+the previous entry for a discussion of how this field is used by
+@code{e2fsck}. The default value of this field is 180 days (six
+months).
+
+@item s_errors
+This field defines the behavior which should be used by the kernel of
+errors are detected in the filesystem. Possible values include:
+
+@table @samp
+@item EXT2_ERRORS_CONTINUE
+Continue execution when errors are detected.
+
+@item EXT2_ERRORS_RO
+Remount the filesystem read-only.
+
+@item EXT2_ERRORS_PANIC
+Panic.
+
+@end table
+
+The default behavior is @samp{EXT2_ERRORS_CONTINUE}.
+
+@end table
+
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_allocate_tables (ext2_filsys @var{fs})
+Allocate space for the inode table and the block and inode bitmaps. The
+inode tables and block and inode bitmaps aren't actually initialized;
+this function just allocates the space for them.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Filesystem flag functions, , Initializing a filesystem, Filesystem-level functions
+@comment node-name, next, previous, up
+@subsection Filesystem flag functions
+
+The filesystem handle has a number of flags which can be manipulated
+using the following function. Some of these flags affect how the
+libext2fs filesystem behaves; others are provided solely for the
+application's convenience.
+
+@deftypefun void ext2fs_mark_changed (ext2_filsys @var{fs})
+@deftypefunx int ext2fs_test_changed (ext2_filsys @var{fs})
+This flag indicates whether or not the filesystem has been changed.
+It is not used by the ext2fs library.
+@end deftypefun
+
+@deftypefun void ext2fs_mark_super_dirty (ext2_filsys @var{fs})
+Mark the filesystem @var{fs} as being dirty; this will cause
+the superblock information to be flushed out when @code{ext2fs_close} is
+called. @code{ext2fs_mark_super_dirty} will also set the filesystem
+changed flag. The dirty flag is automatically cleared by
+@code{ext2fs_flush} when the superblock is written to disk.
+@end deftypefun
+
+@deftypefun void ext2fs_mark_valid (ext2_filsys @var{fs})
+@deftypefunx void ext2fs_unmark_valid (ext2_filsys @var{fs})
+@deftypefunx int ext2fs_test_valid (ext2_filsys @var{fs})
+This flag indicates whether or not the filesystem is free of errors.
+It is not used by libext2fs, and is solely for the application's
+convenience.
+@end deftypefun
+
+@deftypefun void ext2fs_mark_ib_dirty (ext2_filsys @var{fs})
+@deftypefunx void ext2fs_mark_bb_dirty (ext2_filsys @var{fs})
+@deftypefunx int ext2fs_test_ib_dirty (ext2_filsys @var{fs})
+@deftypefunx int ext2fs_test_bb_dirty (ext2_filsys @var{fs})
+These flags indicate whether or not the inode or block bitmaps have been
+modified. If the flag is set, it will cause the appropriate bitmap
+to be written when the filesystem is closed or flushed.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node File I/O Functions, Inode Functions, Filesystem-level functions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section File I/O Functions
+
+The following functions provide a convenient abstraction to read or
+write a file in an filesystem. The interface is similar in spirit to
+the Linux/POSIX file I/O system calls.
+
+@menu
+* File handle manipulation::
+* Reading and writing data::
+* Changing the file offset ::
+* Getting the file size::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node File handle manipulation, Reading and writing data, File I/O Functions, File I/O Functions
+@comment node-name, next, previous, up
+@subsection File handle manipulation
+
+The file handle functions much like a file descriptor in the Linux/POSIX
+file I/O system calls. Unlike the Linux/POSIX system calls, files are
+opened via inode numbers instead of via pathnames. To resolve a
+pathname to an inode number, use the function @code{ext2fs_namei} or to
+create a new file, use @code{ext2fs_new_inode} and @code{ext2fs_link}.
+
+@deftypefun errcode_t ext2fs_file_open2 (ext2_filsys @var{fs}, ext2_ino_t @var{ino}, struct ext2_inode *@var{inode}, int @var{flags}, ext2_file_t *@var{ret})
+@deftypefunx errcode_t ext2fs_file_open (ext2_filsys @var{fs}, ext2_ino_t @var{ino}, int @var{flags}, ext2_file_t *@var{ret})
+
+Opens a file identified by inode number @var{ino} in filesystem @var{fs}
+and returns a file handle in @var{ret}. If an inode structure is
+provided in @var{inode}, then it is used instead of reading the inode
+from the filesystem.
+
+The @var{flags} argument contains a bitmask of flags which control how
+the file should be opened.
+
+@table @code
+@item EXT2_FILE_WRITE
+Open the file for reading and writing. Without this flag, the file is
+opened for writing only.
+
+@item EXT2_FILE_CREATE
+Create the file if it is not already present.
+
+@end table
+@end deftypefun
+
+@deftypefun ext2_filsys ext2fs_file_get_fs (ext2_file_t @var{file})
+Return the filesystem handle where the open file @var{file} was opened.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_file_close (ext2_file_t @var{file})
+Close the file handle @var{file}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_file_flush (ext2_file_t @var{file})
+Force any data written via @code{ext2fs_file_write} to disk.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Reading and writing data, Changing the file offset , File handle manipulation, File I/O Functions
+@comment node-name, next, previous, up
+@subsection Reading and writing data
+
+@deftypefun errcode_t ext2fs_file_read (ext2_file_t @var{file}, void *@var{buf}, unsigned int @var{wanted}, unsigned int *@var{got})
+Read @var{wanted} bytes of data from @var{file} store it in the buffer
+@var{buf}. The number of bytes that was actually read is returned
+via @var{got}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_file_write (ext2_file_t @var{file}, const void *@var{buf}, unsigned int @var{nbytes}, unsigned int *@var{written})
+Write @var{wanted} bytes of data from the buffer @var{buf} to the
+current file position of @var{file}. The number of bytes that was
+actually written is returned via @var{written}.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Changing the file offset , Getting the file size, Reading and writing data, File I/O Functions
+@comment node-name, next, previous, up
+@subsection Changing the file offset
+
+@deftypefun errcode_t ext2fs_file_llseek (ext2_file_t @var{file}, __u64 @var{offset}, int @var{whence}, __u64 *@var{ret_pos})
+@deftypefunx errcode_t ext2fs_file_lseek (ext2_file_t @var{file}, ext2_off_t @var{offset}, int @var{whence}, ext2_off_t *@var{ret_pos})
+Change the current file position of @var{file} according to the
+directive @var{whence} as follows:
+
+@table @code
+@item EXT2_SEEK_SET
+The file position is set to @var{offset} bytes from the beginning of the
+file.
+
+@item EXT2_SEEK_CUR
+The file position set to its current location plus @var{offset} bytes.
+
+@item EXT2_SEEK_END
+The file position is set to the size of the file plus @var{offset}
+bytes.
+@end table
+
+The current offset is returned via @var{ret_pos}.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Getting the file size, , Changing the file offset , File I/O Functions
+@comment node-name, next, previous, up
+@subsection Getting the file size
+
+@deftypefun errcode_t ext2fs_file_get_lsize (ext2_file_t @var{file}, __u64 *@var{ret_size})
+Return the size of the file @var{file} in @var{ret_size}.
+@end deftypefun
+
+@deftypefun ext2_off_t ext2fs_file_get_size (ext2_file_t @var{file})
+Return the size of the file @var{file}.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Inode Functions, Directory functions, File I/O Functions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section Inode Functions
+
+@menu
+* Reading and writing inodes::
+* Iterating over inodes in a filesystem::
+* Iterating over blocks in an inode::
+* Inode Convenience Functions::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node Reading and writing inodes, Iterating over inodes in a filesystem, Inode Functions, Inode Functions
+@comment node-name, next, previous, up
+@subsection Reading and writing inodes
+
+@deftypefun errcode_t ext2fs_read_inode (ext2_filsys @var{fs}, ext2_ino_t @var{ino}, struct ext2_inode *@var{inode})
+Read the inode number @var{ino} into @var{inode}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_write_inode (ext2_filsys @var{fs}, ext2_ino_t @var{ino}, struct ext2_inode *@var{inode})
+Write @var{inode} to inode @var{ino}.
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Iterating over inodes in a filesystem, Iterating over blocks in an inode, Reading and writing inodes, Inode Functions
+@comment node-name, next, previous, up
+@subsection Iterating over inodes in a filesystem
+
+The inode_scan abstraction is useful for iterating over all the inodes
+in a filesystem.
+
+@deftypefun errcode_t ext2fs_open_inode_scan (ext2_filsys @var{fs}, int @var{buffer_blocks}, ext2_inode_scan *@var{scan})
+Initialize the iteration variable @var{scan}. This variable is used by
+@code{ext2fs_get_next_inode}. The @var{buffer_blocks} parameter
+controls how many blocks of the inode table are read in at a time. A
+large number of blocks requires more memory, but reduces the overhead in
+seeking and reading from the disk. If @var{buffer_blocks} is zero, a
+suitable default value will be used.
+@end deftypefun
+
+@deftypefun void ext2fs_close_inode_scan (ext2_inode_scan @var{scan})
+Release the memory associated with @var{scan} and invalidate it.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_get_next_inode (ext2_inode_scan @var{scan}, ext2_ino_t *@var{ino}, struct ext2_inode *@var{inode})
+
+This function returns the next inode from the filesystem; the inode
+number of the inode is stored in @var{ino}, and the inode is stored in
+@var{inode}.
+
+If the inode is located in a block that has been marked as bad,
+@code{ext2fs_get_next_inode} will return the error
+@code{EXT2_ET_BAD_BLOCK_IN_INODE_TABLE}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_inode_scan_goto_blockgroup (ext2_inode_scan @var{scan}, int @var{group})
+Start the inode scan at a particular ext2 blockgroup, @var{group}.
+This function may be safely called at any time while @var{scan} is valid.
+@end deftypefun
+
+@deftypefun void ext2fs_set_inode_callback (ext2_inode_scan @var{scan}, errcode_t (*done_group)(ext2_filsys @var{fs}, ext2_inode_scan @var{scan}, dgrp_t @var{group}, void * @var{private}), void *@var{done_group_data})
+Register a callback function which will be called by
+@code{ext2_get_next_inode} when all of the inodes in a block group have
+been processed.
+@end deftypefun
+
+@deftypefun int ext2fs_inode_scan_flags (ext2_inode_scan @var{scan}, int @var{set_flags}, int @var{clear_flags})
+
+Set the scan_flags @var{set_flags} and clear the scan_flags @var{clear_flags}.
+The following flags can be set using this interface:
+
+@table @samp
+
+@item EXT2_SF_SKIP_MISSING_ITABLE
+When a block group is missing an inode table, skip it. If this flag is
+not set @code{ext2fs_get_next_inode} will return the error
+EXT2_ET_MISSING_INODE_TABLE.
+
+@end table
+
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Iterating over blocks in an inode, Inode Convenience Functions, Iterating over inodes in a filesystem, Inode Functions
+@comment node-name, next, previous, up
+@subsection Iterating over blocks in an inode
+
+@deftypefun errcode_t ext2fs_block_iterate (ext2_filsys @var{fs}, ext2_ino_t @var{ino}, int @var{flags}, char *block_buf, int (*func)(ext2_filsys @var{fs}, blk_t *@var{blocknr}, int @var{blockcnt}, void *@var{private}), void *@var{private})
+
+Iterate over all of the blocks in inode number @var{ino} in filesystem
+@var{fs}, by calling the function @var{func} for each block in the
+inode. The @var{block_buf} parameter should either be NULL, or if the
+@code{ext2fs_block_iterate} function is called repeatedly, the overhead
+of allocating and freeing scratch memory can be avoided by passing a
+pointer to a scratch buffer which must be at least as big as three times the
+filesystem's blocksize.
+
+The @var{flags} parameter controls how the iterator will function:
+
+@table @samp
+
+@item BLOCK_FLAG_HOLE
+This flag indicates that the iterator function should be called on
+blocks where the block number is zero (also known as ``holes''.) It is
+also known as BLOCK_FLAG_APPEND, since it is also used by functions
+such as ext2fs_expand_dir() to add a new block to an inode.
+
+@item BLOCK_FLAG_DEPTH_TRAVERSE
+This flag indicates that the iterator function for the
+indirect, doubly indirect, etc. blocks should be called after all
+of the blocks contained in the indirect blocks are processed.
+This is useful if you are going to be deallocating blocks from an
+inode.
+
+@item BLOCK_FLAG_DATA_ONLY
+This flag indicates that the iterator function should be
+called for data blocks only.
+
+@end table
+
+The callback function @var{func} is called with a number of parameters;
+the @var{fs} and @var{private} parameters are self-explanatory, and
+their values are taken from the parameters to
+@code{ext2fs_block_iterate}. (The @var{private} data structure is
+generally used by callers to @code{ext2fs_block_iterate} so that some
+private data structure can be passed to the callback function. The
+@var{blockcnt} parameter, if non-negative, indicates the logical block
+number of a data block in the inode. If @var{blockcnt} is less than
+zero, then @var{func} was called on a metadata block, and @var{blockcnt}
+will be one of the following values: BLOCK_COUNT_IND, BLOCK_COUNT_DIND,
+BLOCK_COUNT_TIND, or BLOCK_COUNT_TRANSLATOR. The @var{blocknr} is a
+pointer to the inode or indirect block entry listing physical block
+number. The callback function may modify the physical block number, if
+it returns the @var{BLOCK_CHANGED} flag.
+
+
+The callback function @var{func} returns a result code which is composed of
+the logical OR of the following flags:
+
+@table @samp
+
+@item BLOCK_CHANGED
+
+This flag indicates that callback function has modified the physical
+block number pointed to by @var{blocknr}.
+
+@item BLOCK_ABORT
+
+This flag requests that @code{ext2fs_block_iterate} to stop immediately
+and return to the caller.
+
+@end table
+
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_block_iterate2 (ext2_filsys @var{fs}, ext2_ino_t @var{ino}, int @var{flags}, char *@var{block}_buf, int (*func)(ext2_filsys @var{fs}, blk_t *@var{blocknr}, e2_blkcnt_t @var{blockcnt}, blk_t @var{ref_blk}, int @var{ref_offset}, void *@var{private}), void *@var{private})
+
+This function is much like @code{ext2fs_block_iterate}, except that the
+@var{blockcnt} type is a 64-bit signed quantity, to support larger
+files, and the addition of the @var{ref_blk} and @var{ref_offset}
+arguments passed to the callback function, which identify the location
+of the physical block pointed to by pointer @var{blocknr}. If
+@var{ref_blk} is zero, then @var{ref_offset} contains the offset into
+the @code{i_blocks} array. If @var{ref_blk} is non-zero, then the physical
+block location is contained inside an indirect block group, and
+@var{ref_offset} contains the offset into the indirect block.
+
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Inode Convenience Functions, , Iterating over blocks in an inode, Inode Functions
+@comment node-name, next, previous, up
+@subsection Convenience functions for Inodes
+
+@deftypefun errcode_t ext2fs_get_blocks (ext2_filsys @var{fs}, ext2_ino_t @var{ino}, blk_t *@var{blocks})
+
+Returns an array of blocks corresponding to the direct,
+indirect, doubly indirect, and triply indirect blocks as stored in the
+inode structure.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_check_directory (ext2_filsys @var{fs}, ext2_ino_t @var{ino})
+Returns 0 if @var{ino} is a directory, and @code{ENOTDIR} if it is not.
+@end deftypefun
+
+@deftypefun int ext2fs_inode_has_valid_blocks (struct ext2_inode *@var{inode})
+
+Returns 1 if the inode's block entries actually valid block entries, and
+0 if not. Inodes which represent devices and fast symbolic links do not
+contain valid block entries.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Directory functions, Bitmap Functions, Inode Functions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section Directory functions
+
+@menu
+* Directory block functions::
+* Iterating over a directory::
+* Creating and expanding directories::
+* Creating and removing directory entries::
+* Looking up filenames::
+* Translating inode numbers to filenames::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node Directory block functions, Iterating over a directory, Directory functions, Directory functions
+@comment node-name, next, previous, up
+@subsection Directory block functions
+
+@deftypefun errcode_t ext2fs_read_dir_block (ext2_filsys @var{fs}, blk_t @var{block}, void *@var{buf})
+
+This function reads a directory block, performing
+byte swapping if necessary.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_write_dir_block (ext2_filsys @var{fs}, blk_t @var{block}, void *@var{buf})
+
+This function writes a directory block, performing
+byte swapping if necessary.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_new_dir_block (ext2_filsys @var{fs}, ext2_ino_t @var{dir_ino}, ext2_ino_t @var{parent_ino}, char **@var{block})
+
+This function creates a new directory block in @var{block}. If
+@var{dir_ino} is non-zero, then @var{dir_ino} and @var{parent_ino} are used
+to initialize directory entries for @file{.} and @file{..}, respectively.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Iterating over a directory, Creating and expanding directories, Directory block functions, Directory functions
+@comment node-name, next, previous, up
+@subsection Iterating over a directory
+
+@deftypefun errcode_t ext2fs_dir_iterate (ext2_filsys @var{fs}, ext2_ino_t @var{dir}, int @var{flags}, char *@var{block_buf}, int (*@var{func})(struct ext2_dir_entry *@var{dirent}, int @var{offset}, int @var{blocksize}, char *@var{buf}, void *@var{private}), void *@var{private})
+
+This function iterates over all of the directory entries in the
+directory @var{dir}, calling the callback function @var{func} for each
+directory entry in the directory. The @var{block_buf} parameter should
+either be NULL, or if the @code{ext2fs_dir_iterate} function is
+called repeatedly, the overhead of allocating and freeing
+scratch memory can be avoided by passing a pointer to a scratch buffer
+which must be at least as big as the filesystem's blocksize.
+
+The @var{flags} parameter controls how the iterator will function:
+
+@table @samp
+
+@item DIRENT_FLAG_INCLUDE_EMPTY
+
+This flag indicates that the callback function should be called even
+for deleted or empty directory entries.
+
+@end table
+
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Creating and expanding directories, Creating and removing directory entries, Iterating over a directory, Directory functions
+@comment node-name, next, previous, up
+@subsection Creating and expanding directories
+
+@deftypefun errcode_t ext2fs_mkdir (ext2_filsys @var{fs}, ext2_ino_t @var{parent}, ext2_ino_t @var{inum}, const char *@var{name})
+
+This function creates a new directory. If @var{inum} is zero, then a
+new inode will be allocated; otherwise, the directory will be created in
+the inode specified by @var{inum}. If @var{name} specifies the name of
+the new directory; if it is non-NULL, then the new directory will be
+linked into the parent directory @var{parent}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_expand_dir (ext2_filsys @var{fs}, ext2_ino_t @var{dir})
+
+This function adds a new empty directory block and appends it to
+the directory @var{dir}. This allows functions such as
+@code{ext2fs_link} to add new directory entries to a directory which is full.
+
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Creating and removing directory entries, Looking up filenames, Creating and expanding directories, Directory functions
+@comment node-name, next, previous, up
+@subsection Creating and removing directory entries
+
+@deftypefun errcode_t ext2fs_link (ext2_filsys @var{fs}, ext2_ino_t @var{dir}, const char *@var{name}, ext2_ino_t @var{ino}, int flags)
+
+This function adds a new directory entry to the directory @var{dir},
+with @var{name} and @var{ino} specifying the name and inode number in
+the directory entry, respectively.
+
+The low 3 bits of the flags field is used to specify the file type of
+inode: (No other flags are currently defined.)
+
+@table @samp
+
+@item EXT2_FT_UNKNOWN
+
+The file type is unknown.
+
+@item EXT2_FT_REG_FILE
+
+The file type is a normal file.
+
+@item EXT2_FT_DIR
+
+The file type is a directory.
+
+@item EXT2_FT_CHRDEV
+
+The file type is a character device.
+
+@item EXT2_FT_BLKDEV
+
+The file type is a block device.
+
+@item EXT2_FT_FIFO
+
+The file type is a named pipe.
+
+@item EXT2_FT_SOCK
+
+The file type is a unix domain socket.
+
+@item EXT2_FT_SYMLINK
+
+The file type is a symbolic link.
+@end table
+
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_unlink (ext2_filsys @var{fs}, ext2_ino_t @var{dir}, const char *@var{name}, ext2_ino_t @var{ino}, int @var{flags})
+
+This function removes a directory entry from @var{dir}.
+The directory entry to be removed is the first one which is
+matched by @var{name} and @var{ino}. If @var{name} is non-NULL,
+the directory entry's name must match @var{name}. If @var{ino} is
+non-zero, the directory entry's inode number must match @var{ino}.
+No flags are currently defined for @code{ext2fs_unlink}; callers should
+pass in zero to this parameter.
+
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Looking up filenames, Translating inode numbers to filenames, Creating and removing directory entries, Directory functions
+@comment node-name, next, previous, up
+@subsection Looking up filenames
+
+@deftypefun errcode_t ext2fs_lookup (ext2_filsys @var{fs}, ext2_ino_t @var{dir}, const char *@var{name}, int @var{namelen}, char *@var{buf}, ext2_ino_t *@var{inode})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_namei (ext2_filsys @var{fs}, ext2_ino_t @var{root}, ext2_ino_t @var{cwd}, const char *@var{name}, ext2_ino_t *@var{inode})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_namei_follow (ext2_filsys @var{fs}, ext2_ino_t @var{root}, ext2_ino_t @var{cwd}, const char *@var{name}, ext2_ino_t *@var{inode})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_follow_link (ext2_filsys @var{fs}, ext2_ino_t @var{root}, ext2_ino_t @var{cwd}, ext2_ino_t @var{inode}, ext2_ino_t *@var{res}_inode)
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Translating inode numbers to filenames, , Looking up filenames, Directory functions
+@comment node-name, next, previous, up
+@subsection Translating inode numbers to filenames
+
+@deftypefun errcode_t ext2fs_get_pathname (ext2_filsys @var{fs}, ext2_ino_t @var{dir}, ext2_ino_t @var{ino}, char **@var{name})
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Bitmap Functions, EXT2 data abstractions, Directory functions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section Bitmap Functions
+
+@menu
+* Reading and Writing Bitmaps::
+* Allocating Bitmaps::
+* Free bitmaps::
+* Bitmap Operations::
+* Comparing bitmaps::
+* Modifying Bitmaps::
+* Resizing Bitmaps::
+* Clearing Bitmaps::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node Reading and Writing Bitmaps, Allocating Bitmaps, Bitmap Functions, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Reading and Writing Bitmaps
+
+@deftypefun errcode_t ext2fs_write_inode_bitmap (ext2_filsys @var{fs})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_write_block_bitmap (ext2_filsys @var{fs})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_read_inode_bitmap (ext2_filsys @var{fs})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_read_block_bitmap (ext2_filsys @var{fs})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_read_bitmaps (ext2_filsys @var{fs})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_write_bitmaps (ext2_filsys @var{fs})
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Allocating Bitmaps, Free bitmaps, Reading and Writing Bitmaps, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Allocating Bitmaps
+
+@deftypefun errcode_t ext2fs_allocate_generic_bitmap (__u32 @var{start}, __u32 @var{end}, _u32 @var{real_end}, const char *@var{descr}, ext2fs_generic_bitmap *@var{ret})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_allocate_block_bitmap (ext2_filsys @var{fs}, const char *@var{descr}, ext2fs_block_bitmap *@var{ret})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_allocate_inode_bitmap (ext2_filsys @var{fs}, const char *@var{descr}, ext2fs_inode_bitmap *@var{ret})
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Free bitmaps, Bitmap Operations, Allocating Bitmaps, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Freeing bitmaps
+
+
+@deftypefun void ext2fs_free_generic_bitmap (ext2fs_inode_bitmap @var{bitmap})
+@end deftypefun
+
+@deftypefun void ext2fs_free_block_bitmap (ext2fs_block_bitmap @var{bitmap})
+@end deftypefun
+
+@deftypefun void ext2fs_free_inode_bitmap (ext2fs_inode_bitmap @var{bitmap})
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Bitmap Operations, Comparing bitmaps, Free bitmaps, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Bitmap Operations
+
+@deftypefun void ext2fs_mark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+@deftypefunx void ext2fs_unmark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+@deftypefunx int ext2fs_test_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+These functions set, clear, and test bits in a block bitmap @var{bitmap}.
+@end deftypefun
+
+
+@deftypefun void ext2fs_mark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+@deftypefunx void ext2fs_unmark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+@deftypefunx int ext2fs_test_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+These functions set, clear, and test bits in an inode bitmap @var{bitmap}.
+@end deftypefun
+
+@deftypefun void ext2fs_fast_mark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+@deftypefunx void ext2fs_fast_unmark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+@deftypefunx int ext2fs_fast_test_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+@deftypefunx void ext2fs_fast_mark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+@deftypefunx void ext2fs_fast_unmark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+@deftypefunx int ext2fs_fast_test_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+These ``fast'' functions are like their normal counterparts; however,
+they are implemented as inline functions and do not perform bounds
+checks on the inode number or block number; they are assumed to be
+correct. They should only be used in speed-critical applications, where
+the inode or block number has already been validated by other means.
+@end deftypefun
+
+@deftypefun blk_t ext2fs_get_block_bitmap_start (ext2fs_block_bitmap @var{bitmap})
+@deftypefunx ext2_ino_t ext2fs_get_inode_bitmap_start (ext2fs_inode_bitmap @var{bitmap})
+Return the first inode or block which is stored in the bitmap.
+@end deftypefun
+
+@deftypefun blk_t ext2fs_get_block_bitmap_end (ext2fs_block_bitmap @var{bitmap})
+@deftypefunx ext2_ino_t ext2fs_get_inode_bitmap_end (ext2fs_inode_bitmap @var{bitmap})
+
+Return the last inode or block which is stored in the bitmap.
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Comparing bitmaps, Modifying Bitmaps, Bitmap Operations, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Comparing bitmaps
+
+@deftypefun errcode_t ext2fs_compare_block_bitmap (ext2fs_block_bitmap @var{bm1}, ext2fs_block_bitmap @var{bm2})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_compare_inode_bitmap (ext2fs_inode_bitmap @var{bm1}, ext2fs_inode_bitmap @var{bm2})
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Modifying Bitmaps, Resizing Bitmaps, Comparing bitmaps, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Modifying Bitmaps
+
+@deftypefun errcode_t ext2fs_fudge_inode_bitmap_end (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{end}, ext2_ino_t *@var{oend})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_fudge_block_bitmap_end (ext2fs_block_bitmap @var{bitmap}, blk_t @var{end}, blk_t *@var{oend})
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Resizing Bitmaps, Clearing Bitmaps, Modifying Bitmaps, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Resizing Bitmaps
+
+@deftypefun errcode_t ext2fs_resize_generic_bitmap (__u32 @var{new_end}, __u32 @var{new_real_end}, ext2fs_generic_bitmap @var{bmap})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_resize_inode_bitmap (__u32 @var{new_end}, __u32 @var{new_real_end}, ext2fs_inode_bitmap @var{bmap})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_resize_block_bitmap (__u32 @var{new_end}, __u32 @var{new_real_end}, ext2fs_block_bitmap @var{bmap})
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Clearing Bitmaps, , Resizing Bitmaps, Bitmap Functions
+@comment node-name, next, previous, up
+@subsection Clearing Bitmaps
+
+@deftypefun void ext2fs_clear_inode_bitmap (ext2fs_inode_bitmap @var{bitmap})
+
+This function sets all of the bits in the inode bitmap @var{bitmap} to
+be zero.
+
+@end deftypefun
+
+@deftypefun void ext2fs_clear_block_bitmap (ext2fs_block_bitmap @var{bitmap})
+
+This function sets all of the bits in the block bitmap @var{bitmap} to
+be zero.
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node EXT2 data abstractions, Byte-swapping functions, Bitmap Functions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section EXT2 data abstractions
+
+The ext2 library has a number of abstractions which are useful for ext2
+utility programs.
+
+@menu
+* Badblocks list management::
+* Directory-block list management::
+* Inode count functions::
+@end menu
+
+@c ----------------------------------------------------------------------
+
+@node Badblocks list management, Directory-block list management, EXT2 data abstractions, EXT2 data abstractions
+@comment node-name, next, previous, up
+@subsection Badblocks list management
+
+
+@deftypefun errcode_t ext2fs_badblocks_list_create (ext2_badblocks_list *@var{ret}, int @var{size})
+@end deftypefun
+
+@deftypefun void ext2fs_badblocks_list_free (ext2_badblocks_list @var{bb})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_badblocks_list_add (ext2_badblocks_list @var{bb}, blk_t @var{blk})
+@end deftypefun
+
+@deftypefun int ext2fs_badblocks_list_test (ext2_badblocks_list @var{bb}, blk_t @var{blk})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_badblocks_list_iterate_begin (ext2_badblocks_list @var{bb}, ext2_badblocks_iterate *@var{ret})
+@end deftypefun
+
+@deftypefun int ext2fs_badblocks_list_iterate (ext2_badblocks_iterate iter, blk_t *@var{blk})
+@end deftypefun
+
+@deftypefun void ext2fs_badblocks_list_iterate_end (ext2_badblocks_iterate @var{iter})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_update_bb_inode (ext2_filsys @var{fs}, ext2_badblocks_list @var{bb_list})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_read_bb_inode (ext2_filsys @var{fs}, ext2_badblocks_list *@var{bb_list})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_read_bb_FILE (ext2_filsys @var{fs}, FILE *f, ext2_badblocks_list *@var{bb_list}, void (*invalid)(ext2_filsys @var{fs}, blk_t @var{blk}))
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Directory-block list management, Inode count functions, Badblocks list management, EXT2 data abstractions
+@comment node-name, next, previous, up
+@subsection Directory-block list management
+
+The dblist abstraction stores a list of blocks belonging to
+directories. This list can be useful when a program needs to iterate
+over all directory entries in a filesystem; @code{e2fsck} does this in
+pass 2 of its operations, and @code{debugfs} needs to do this when it is
+trying to turn an inode number into a pathname.
+
+@deftypefun errcode_t ext2fs_init_dblist (ext2_filsys @var{fs}, ext2_dblist *@var{ret_dblist})
+
+Creates a dblist data structure and returns it in @var{ret_dblist}.
+@end deftypefun
+
+@deftypefun void ext2fs_free_dblist (ext2_dblist @var{dblist})
+
+Free a dblist data structure.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_add_dir_block (ext2_dblist @var{dblist}, ext2_ino_t @var{ino}, blk_t @var{blk}, int @var{blockcnt})
+
+Add an entry to the dblist data structure. This call records the fact
+that block number @var{blockcnt} of directory inode @var{ino} is stored
+in block @var{blk}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_set_dir_block (ext2_dblist @var{dblist}, ext2_ino_t @var{ino}, blk_t @var{blk}, int @var{blockcnt})
+
+Change an entry in the dblist data structure; this changes the location
+of block number @var{blockcnt} of directory inode @var{ino} to be block
+@var{blk}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_dblist_iterate (ext2_dblist @var{dblist}, int (*func)(ext2_filsys @var{fs}, struct ext2_db_entry *@var{db_info}, void *@var{private}), void *@var{private})
+
+This iterator calls @var{func} for every entry in the dblist data structure.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_dblist_dir_iterate (ext2_dblist @var{dblist}, int flags, char *@var{block_buf}, int (*func)(ext2_ino_t @var{dir}, int @var{entry}, struct ext2_dir_entry *@var{dirent}, int @var{offset}, int @var{blocksize}, char *@var{buf}, void *@var{private}), void *@var{private})
+
+This iterator takes reads in the directory block indicated in each
+dblist entry, and calls @var{func} for each directory entry in each
+directory block. If @var{dblist} contains all the directory blocks in a
+filesystem, this function provides a convenient way to iterate over all
+directory entries for that filesystem.
+@end deftypefun
+
+@c ----------------------------------------------------------------------
+
+@node Inode count functions, , Directory-block list management, EXT2 data abstractions
+@comment node-name, next, previous, up
+@subsection Inode count functions
+
+The icount abstraction is a specialized data type used by @code{e2fsck}
+to store how many times a particular inode is referenced by the
+filesystem. This is used twice; once to store the actual number of times
+that the inode is reference; and once to store the claimed number of times
+the inode is referenced according to the inode structure.
+
+This abstraction is designed to be extremely efficient for storing this
+sort of information, by taking advantage of the following properties of
+inode counts, namely (1) inode counts are very often zero (because
+the inode is currently not in use), and (2) many files have a inode
+count of 1 (because they are a file which has no additional hard links).
+
+@deftypefun errcode_t ext2fs_create_icount2 (ext2_filsys @var{fs}, int @var{flags}, int @var{size}, ext2_icount_t @var{hint}, ext2_icount_t *@var{ret})
+
+Creates an icount structure for a filesystem @var{fs}, with initial space
+for @var{size} inodes whose count is greater than 1. The @var{flags}
+parameter is either 0 or @code{EXT2_ICOUNT_OPT_INCREMENT}, which
+indicates that icount structure should be able to increment inode counts
+quickly. The icount structure is returned in @var{ret}. The returned
+icount structure initially has a count of zero for all inodes.
+
+The @var{hint} parameter allows the caller to optionally pass in another
+icount structure which is used to initialize the array of inodes whose
+count is greater than 1. It is used purely as a speed optimization so
+that the icount structure can determine in advance which inodes are
+likely to contain a count grater than 1.
+@end deftypefun
+
+@deftypefun void ext2fs_free_icount (ext2_icount_t @var{icount})
+
+Frees an icount structure.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_icount_fetch (ext2_icount_t @var{icount}, ext2_ino_t @var{ino}, __u16 *@var{ret})
+
+Returns in @var{ret} the count for a particular inode @var{ino}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_icount_increment (ext2_icount_t @var{icount}, ext2_ino_t @var{ino}, __u16 *@var{ret})
+
+Increments the ref count for inode @var{ino}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_icount_decrement (ext2_icount_t @var{icount}, ext2_ino_t @var{ino}, __u16 *@var{ret})
+
+Decrements the ref count for inode @var{ino}.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_icount_store (ext2_icount_t @var{icount}, ext2_ino_t @var{ino}, __u16 @var{count})
+
+Sets the reference count for inode @var{ino} to be @var{count}.
+@end deftypefun
+
+@deftypefun ext2_ino_t ext2fs_get_icount_size (ext2_icount_t @var{icount})
+
+Returns the current number of inodes in @var{icount} which has a count
+greater than 1.
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_icount_validate (ext2_icount_t @var{icount}, FILE *@var{f})
+
+Validates the internal rep invariant of @var{icount}; if there are any
+problems, print out debugging information to @var{f}. This function is
+intended for debugging and testing use only.
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Byte-swapping functions, Other functions, EXT2 data abstractions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section Byte-swapping functions
+
+@deftypefun void ext2fs_swap_super (struct ext2_super_block * @var{super})
+@end deftypefun
+
+@deftypefun void ext2fs_swap_group_desc (struct ext2_group_desc *@var{gdp})
+@end deftypefun
+
+@deftypefun void ext2fs_swap_inode (ext2_filsys @var{fs}, struct ext2_inode *@var{to}, struct ext2_inode *@var{from}, int @var{hostorder})
+@end deftypefun
+
+@deftypefun int ext2fs_native_flag (void)
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Other functions, , Byte-swapping functions, EXT2FS Library Functions
+@comment node-name, next, previous, up
+@section Other functions
+
+/* alloc.c */
+@deftypefun errcode_t ext2fs_new_inode (ext2_filsys @var{fs}, ext2_ino_t @var{dir}, int @var{mode}, ext2fs_inode_bitmap @var{map}, ext2_ino_t *@var{ret})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_new_block (ext2_filsys @var{fs}, blk_t @var{goal}, ext2fs_block_bitmap @var{map}, blk_t *@var{ret})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_get_free_blocks (ext2_filsys @var{fs}, blk_t @var{start}, blk_t @var{finish}, int @var{num}, ext2fs_block_bitmap @var{map}, blk_t *@var{ret})
+@end deftypefun
+
+/* check_desc.c */
+@deftypefun errcode_t ext2fs_check_desc (ext2_filsys @var{fs})
+@end deftypefun
+
+@deftypefun errcode_t ext2fs_get_num_dirs (ext2_filsys @var{fs}, ext2_ino_t *@var{ret_num_dirs})
+@end deftypefun
+
+
+/* getsize.c */
+@deftypefun errcode_t ext2fs_get_device_size (const char *@var{file}, int @var{blocksize}, blk_t *@var{retblocks})
+@end deftypefun
+
+
+/* ismounted.c */
+@deftypefun errcode_t ext2fs_check_if_mounted (const char *@var{file}, int *@var{mount_flags})
+@end deftypefun
+
+/* version.c */
+
+@deftypefun int ext2fs_get_library_version (const char **@var{ver_string}, const char **@var{date_string})
+
+This function returns the current version of the ext2 library. The
+return value contains an integer version code, which consists of the
+major version number of the library multiplied by 100, plus the minor
+version number of the library. Hence, if the library version is 1.08,
+the returned value will be 108.
+
+If @var{ver_string} and/or @var{date_string} are non-NULL, they will be
+set to point at a constant string containing the library version and/or
+release date, respectively.
+@end deftypefun
+
+@deftypefun int ext2fs_parse_version_string (const char *@var{ver_string})
+
+This function takes a version string which may included in an
+application and returns a version code using the same algorithm used by
+@code{ext2fs_get_library_version}. It can be used by programs included
+in the @code{e2fsprogs} distribution to assure that they are using an
+up-to-date ext2 shared library.
+@end deftypefun
+
+/* inline functions */
+@deftypefun int ext2fs_group_of_blk (ext2_filsys @var{fs}, blk_t @var{blk})
+
+This function returns the block group which contains the block @var{blk}.
+
+@end deftypefun
+
+@deftypefun int ext2fs_group_of_ino (ext2_filsys @var{fs}, ext2_ino_t @var{ino})
+
+This function returns the block group which contains the inode @var{ino}.
+@end deftypefun
+
+
+@c ----------------------------------------------------------------------
+
+@node Concept Index, Function Index, EXT2FS Library Functions, Top
+@comment node-name, next, previous, up
+@unnumbered Concept Index
+@printindex cp
+
+@c ----------------------------------------------------------------------
+
+@node Function Index, , Concept Index, Top
+@comment node-name, next, previous, up
+@unnumbered Function and Type Index
+@printindex fn
+
+
+@contents
+@bye
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
new file mode 100644
index 0000000..dd52615
--- /dev/null
+++ b/doc/texinfo.tex
@@ -0,0 +1,7226 @@
+% texinfo.tex -- TeX macros to handle Texinfo files.
+%
+% Load plain if necessary, i.e., if running under initex.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+%
+\def\texinfoversion{2006-02-13.16}
+%
+% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
+% Software Foundation, Inc.
+%
+% This texinfo.tex file is free software; you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation; either version 2, or (at
+% your option) any later version.
+%
+% This texinfo.tex file is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this texinfo.tex file; see the file COPYING. If not, write
+% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+% Boston, MA 02110-1301, USA.
+%
+% As a special exception, when this file is read by TeX when processing
+% a Texinfo source document, you may use the result without
+% restriction. (This has been our intent since Texinfo was invented.)
+%
+% Please try the latest version of texinfo.tex before submitting bug
+% reports; you can get the latest version from:
+% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
+% ftp://tug.org/tex/texinfo.tex
+% (and all CTAN mirrors, see http://www.ctan.org).
+% The texinfo.tex in any given distribution could well be out
+% of date, so if that's what you're using, please check.
+%
+% Send bug reports to bug-texinfo@gnu.org. Please include including a
+% complete document in each bug report with which we can reproduce the
+% problem. Patches are, of course, greatly appreciated.
+%
+% To process a Texinfo manual with TeX, it's most reliable to use the
+% texi2dvi shell script that comes with the distribution. For a simple
+% manual foo.texi, however, you can get away with this:
+% tex foo.texi
+% texindex foo.??
+% tex foo.texi
+% tex foo.texi
+% dvips foo.dvi -o # or whatever; this makes foo.ps.
+% The extra TeX runs get the cross-reference information correct.
+% Sometimes one run after texindex suffices, and sometimes you need more
+% than two; texi2dvi does it as many times as necessary.
+%
+% It is possible to adapt texinfo.tex for other languages, to some
+% extent. You can get the existing language-specific files from the
+% full Texinfo distribution.
+%
+% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+
+
+\message{Loading texinfo [version \texinfoversion]:}
+
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}%
+ \catcode`+=\active \catcode`\_=\active}
+
+\message{Basics,}
+\chardef\other=12
+
+% We never want plain's \outer definition of \+ in Texinfo.
+% For @tex, we can use \tabalign.
+\let\+ = \relax
+
+% Save some plain tex macros whose names we will redefine.
+\let\ptexb=\b
+\let\ptexbullet=\bullet
+\let\ptexc=\c
+\let\ptexcomma=\,
+\let\ptexdot=\.
+\let\ptexdots=\dots
+\let\ptexend=\end
+\let\ptexequiv=\equiv
+\let\ptexexclam=\!
+\let\ptexfootnote=\footnote
+\let\ptexgtr=>
+\let\ptexhat=^
+\let\ptexi=\i
+\let\ptexindent=\indent
+\let\ptexinsert=\insert
+\let\ptexlbrace=\{
+\let\ptexless=<
+\let\ptexnewwrite\newwrite
+\let\ptexnoindent=\noindent
+\let\ptexplus=+
+\let\ptexrbrace=\}
+\let\ptexslash=\/
+\let\ptexstar=\*
+\let\ptext=\t
+
+% If this character appears in an error message or help string, it
+% starts a new line in the output.
+\newlinechar = `^^J
+
+% Use TeX 3.0's \inputlineno to get the line number, for better error
+% messages, but if we're using an old version of TeX, don't do anything.
+%
+\ifx\inputlineno\thisisundefined
+ \let\linenumber = \empty % Pre-3.0.
+\else
+ \def\linenumber{l.\the\inputlineno:\space}
+\fi
+
+% Set up fixed words for English if not already set.
+\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
+\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
+\ifx\putwordin\undefined \gdef\putwordin{in}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
+\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
+\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
+\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
+\ifx\putwordof\undefined \gdef\putwordof{of}\fi
+\ifx\putwordon\undefined \gdef\putwordon{on}\fi
+\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
+\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
+\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
+\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
+\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
+\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
+\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
+%
+\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
+\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
+\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
+\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
+\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
+\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
+\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
+\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
+\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
+\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
+\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
+\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
+%
+\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
+\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
+\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
+\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
+\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
+
+% Since the category of space is not known, we have to be careful.
+\chardef\spacecat = 10
+\def\spaceisspace{\catcode`\ =\spacecat}
+
+% Ignore a token.
+%
+\def\gobble#1{}
+
+% The following is used inside several \edef's.
+\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
+
+% Hyphenation fixes.
+\hyphenation{
+ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
+ ap-pen-dix bit-map bit-maps
+ data-base data-bases eshell fall-ing half-way long-est man-u-script
+ man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
+ par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
+ spell-ing spell-ings
+ stand-alone strong-est time-stamp time-stamps which-ever white-space
+ wide-spread wrap-around
+}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt}
+
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
+
+% Sometimes it is convenient to have everything in the transcript file
+% and nothing on the terminal. We don't just call \tracingall here,
+% since that produces some useless output on the terminal. We also make
+% some effort to order the tracing commands to reduce output in the log
+% file; cf. trace.sty in LaTeX.
+%
+\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
+\def\loggingall{%
+ \tracingstats2
+ \tracingpages1
+ \tracinglostchars2 % 2 gives us more in etex
+ \tracingparagraphs1
+ \tracingoutput1
+ \tracingmacros2
+ \tracingrestores1
+ \showboxbreadth\maxdimen \showboxdepth\maxdimen
+ \ifx\eTeXversion\undefined\else % etex gives us more logging
+ \tracingscantokens1
+ \tracingifs1
+ \tracinggroups1
+ \tracingnesting2
+ \tracingassigns1
+ \fi
+ \tracingcommands3 % 3 gives us more in etex
+ \errorcontextlines16
+}%
+
+% add check for \lastpenalty to plain's definitions. If the last thing
+% we did was a \nobreak, we don't want to insert more space.
+%
+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi\fi}
+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi\fi}
+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi\fi}
+
+% For @cropmarks command.
+% Do @cropmarks to get crop marks.
+%
+\newif\ifcropmarks
+\let\cropmarks = \cropmarkstrue
+%
+% Dimensions to add cropmarks at corners.
+% Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
+\newdimen\cornerlong \cornerlong=1pc
+\newdimen\cornerthick \cornerthick=.3pt
+\newdimen\topandbottommargin \topandbottommargin=.75in
+
+% Main output routine.
+\chardef\PAGE = 255
+\output = {\onepageout{\pagecontents\PAGE}}
+
+\newbox\headlinebox
+\newbox\footlinebox
+
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions, but you have to call it yourself.
+\def\onepageout#1{%
+ \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+ %
+ \ifodd\pageno \advance\hoffset by \bindingoffset
+ \else \advance\hoffset by -\bindingoffset\fi
+ %
+ % Do this outside of the \shipout so @code etc. will be expanded in
+ % the headline as they should be, not taken literally (outputting ''code).
+ \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ %
+ {%
+ % Have to do this stuff outside the \shipout because we want it to
+ % take effect in \write's, yet the group defined by the \vbox ends
+ % before the \shipout runs.
+ %
+ \indexdummies % don't expand commands in the output.
+ \normalturnoffactive % \ in index entries must not stay \, e.g., if
+ % the page break happens to be in the middle of an example.
+ % We don't want .vr (or whatever) entries like this:
+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % "\acronym" won't work when it's read back in;
+ % it needs to be
+ % {\code {{\tt \backslashcurfont }acronym}
+ \shipout\vbox{%
+ % Do this early so pdf references go to the beginning of the page.
+ \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
+ %
+ \ifcropmarks \vbox to \outervsize\bgroup
+ \hsize = \outerhsize
+ \vskip-\topandbottommargin
+ \vtop to0pt{%
+ \line{\ewtop\hfil\ewtop}%
+ \nointerlineskip
+ \line{%
+ \vbox{\moveleft\cornerthick\nstop}%
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}%
+ }%
+ \vss}%
+ \vskip\topandbottommargin
+ \line\bgroup
+ \hfil % center the page within the outer (page) hsize.
+ \ifodd\pageno\hskip\bindingoffset\fi
+ \vbox\bgroup
+ \fi
+ %
+ \unvbox\headlinebox
+ \pagebody{#1}%
+ \ifdim\ht\footlinebox > 0pt
+ % Only leave this space if the footline is nonempty.
+ % (We lessened \vsize for it in \oddfootingxxx.)
+ % The \baselineskip=24pt in plain's \makefootline has no effect.
+ \vskip 2\baselineskip
+ \unvbox\footlinebox
+ \fi
+ %
+ \ifcropmarks
+ \egroup % end of \vbox\bgroup
+ \hfil\egroup % end of (centering) \line\bgroup
+ \vskip\topandbottommargin plus1fill minus1fill
+ \boxmaxdepth = \cornerthick
+ \vbox to0pt{\vss
+ \line{%
+ \vbox{\moveleft\cornerthick\nsbot}%
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}%
+ }%
+ \nointerlineskip
+ \line{\ewbot\hfil\ewbot}%
+ }%
+ \egroup % \vbox from first cropmarks clause
+ \fi
+ }% end of \shipout\vbox
+ }% end of group with \indexdummies
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+
+\newinsert\margin \dimen\margin=\maxdimen
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha@viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+ \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
+\dimen@=\dp#1 \unvbox#1
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
+}
+
+% Here are the rules for the cropmarks. Note that they are
+% offset so that the space between them is truly \outerhsize or \outervsize
+% (P. A. MacKay, 12 November, 1986)
+%
+\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
+\def\nstop{\vbox
+ {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
+\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
+\def\nsbot{\vbox
+ {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Parse an argument, then pass it to #1. The argument is the rest of
+% the input line (except we remove a trailing comment). #1 should be a
+% macro which expects an ordinary undelimited TeX argument.
+%
+\def\parsearg{\parseargusing{}}
+\def\parseargusing#1#2{%
+ \def\next{#2}%
+ \begingroup
+ \obeylines
+ \spaceisspace
+ #1%
+ \parseargline\empty% Insert the \empty token, see \finishparsearg below.
+}
+
+{\obeylines %
+ \gdef\parseargline#1^^M{%
+ \endgroup % End of the group started in \parsearg.
+ \argremovecomment #1\comment\ArgTerm%
+ }%
+}
+
+% First remove any @comment, then any @c comment.
+\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
+%
+% \argremovec might leave us with trailing space, e.g.,
+% @end itemize @c foo
+% This space token undergoes the same procedure and is eventually removed
+% by \finishparsearg.
+%
+\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
+\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
+\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
+ \def\temp{#3}%
+ \ifx\temp\empty
+ % We cannot use \next here, as it holds the macro to run;
+ % thus we reuse \temp.
+ \let\temp\finishparsearg
+ \else
+ \let\temp\argcheckspaces
+ \fi
+ % Put the space token in:
+ \temp#1 #3\ArgTerm
+}
+
+% If a _delimited_ argument is enclosed in braces, they get stripped; so
+% to get _exactly_ the rest of the line, we had to prevent such situation.
+% We prepended an \empty token at the very beginning and we expand it now,
+% just before passing the control to \next.
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
+% either the null string, or it ends with \^^M---thus there is no danger
+% that a pair of braces would be stripped.
+%
+% But first, we have to remove the trailing space token.
+%
+\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
+
+% \parseargdef\foo{...}
+% is roughly equivalent to
+% \def\foo{\parsearg\Xfoo}
+% \def\Xfoo#1{...}
+%
+% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
+% favourite TeX trick. --kasal, 16nov03
+
+\def\parseargdef#1{%
+ \expandafter \doparseargdef \csname\string#1\endcsname #1%
+}
+\def\doparseargdef#1#2{%
+ \def#2{\parsearg#1}%
+ \def#1##1%
+}
+
+% Several utility definitions with active space:
+{
+ \obeyspaces
+ \gdef\obeyedspace{ }
+
+ % Make each space character in the input produce a normal interword
+ % space in the output. Don't allow a line break at this space, as this
+ % is used only in environments like @example, where each line of input
+ % should produce a line of output anyway.
+ %
+ \gdef\sepspaces{\obeyspaces\let =\tie}
+
+ % If an index command is used in an @example environment, any spaces
+ % therein should become regular spaces in the raw index file, not the
+ % expansion of \tie (\leavevmode \penalty \@M \ ).
+ \gdef\unsepspaces{\let =\space}
+}
+
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+% Define the framework for environments in texinfo.tex. It's used like this:
+%
+% \envdef\foo{...}
+% \def\Efoo{...}
+%
+% It's the responsibility of \envdef to insert \begingroup before the
+% actual body; @end closes the group after calling \Efoo. \envdef also
+% defines \thisenv, so the current environment is known; @end checks
+% whether the environment name matches. The \checkenv macro can also be
+% used to check whether the current environment is the one expected.
+%
+% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
+% are not treated as environments; they don't open a group. (The
+% implementation of @end takes care not to call \endgroup in this
+% special case.)
+
+
+% At runtime, environments start with this:
+\def\startenvironment#1{\begingroup\def\thisenv{#1}}
+% initialize
+\let\thisenv\empty
+
+% ... but they get defined via ``\envdef\foo{...}'':
+\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
+\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+
+% Check whether we're in the right environment:
+\def\checkenv#1{%
+ \def\temp{#1}%
+ \ifx\thisenv\temp
+ \else
+ \badenverr
+ \fi
+}
+
+% Environment mismatch, #1 expected:
+\def\badenverr{%
+ \errhelp = \EMsimple
+ \errmessage{This command can appear only \inenvironment\temp,
+ not \inenvironment\thisenv}%
+}
+\def\inenvironment#1{%
+ \ifx#1\empty
+ out of any environment%
+ \else
+ in environment \expandafter\string#1%
+ \fi
+}
+
+% @end foo executes the definition of \Efoo.
+% But first, it executes a specialized version of \checkenv
+%
+\parseargdef\end{%
+ \if 1\csname iscond.#1\endcsname
+ \else
+ % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
+ \expandafter\checkenv\csname#1\endcsname
+ \csname E#1\endcsname
+ \endgroup
+ \fi
+}
+
+\newhelp\EMsimple{Press RETURN to continue.}
+
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\tt\char64}}
+
+% This is turned off because it was never documented
+% and you can use @w{...} around a quote to suppress ligatures.
+%% Define @` and @' to be the same as ` and '
+%% but suppressing ligatures.
+%\def\`{{`}}
+%\def\'{{'}}
+
+% Used to generate quoted braces.
+\def\mylbrace {{\tt\char123}}
+\def\myrbrace {{\tt\char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux/toc files.
+ \catcode`\{ = \other \catcode`\} = \other
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \c
+\let\dotaccent = \.
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \t
+\let\ubaraccent = \b
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ptexi
+ \else\ifx\temp\jmacro \j
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence. (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo. Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+ L\kern-.36em
+ {\setbox0=\hbox{T}%
+ \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
+ \kern-.15em
+ \TeX
+}
+
+% Be sure we're in horizontal mode when doing a tie, since we make space
+% equivalent to this in @example-like environments. Otherwise, a space
+% at the beginning of a line will start with \penalty -- and
+% since \penalty is valid in vertical mode, we'd end up putting the
+% penalty on the vertical list instead of in the new paragraph.
+{\catcode`@ = 11
+ % Avoid using \@M directly, because that causes trouble
+ % if the definition is written into an index file.
+ \global\let\tiepenalty = \@M
+ \gdef\tie{\leavevmode\penalty\tiepenalty\ }
+}
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break\hbox{}\ignorespaces}
+
+% @/ allows a line break.
+\let\/=\allowbreak
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=\endofsentencespacefactor\space}
+
+% @! is an end-of-sentence bang.
+\def\!{!\spacefactor=\endofsentencespacefactor\space}
+
+% @? is an end-of-sentence query.
+\def\?{?\spacefactor=\endofsentencespacefactor\space}
+
+% @frenchspacing on|off says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\parseargdef\frenchspacing{%
+ \def\temp{#1}%
+ \ifx\temp\onword \plainfrenchspacing
+ \else\ifx\temp\offword \plainnonfrenchspacing
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+ \fi\fi
+}
+
+% @w prevents a word break. Without the \leavevmode, @w at the
+% beginning of a paragraph, when TeX is still in vertical mode, would
+% produce a whole line of output instead of starting the paragraph.
+\def\w#1{\leavevmode\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page, by enclosing
+% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
+% to keep its height that of a normal line. According to the rules for
+% \topskip (p.114 of the TeXbook), the glue inserted is
+% max (\topskip - \ht (first item), 0). If that height is large,
+% therefore, no glue is inserted, and the space between the headline and
+% the text is small, which looks bad.
+%
+% Another complication is that the group might be very large. This can
+% cause the glue on the previous page to be unduly stretched, because it
+% does not have much material. In this case, it's better to add an
+% explicit \vfill so that the extra space is at the bottom. The
+% threshold for doing this is if the group is more than \vfilllimit
+% percent of a page (\vfilllimit can be changed inside of @tex).
+%
+\newbox\groupbox
+\def\vfilllimit{0.7}
+%
+\envdef\group{%
+ \ifnum\catcode`\^^M=\active \else
+ \errhelp = \groupinvalidhelp
+ \errmessage{@group invalid in context where filling is enabled}%
+ \fi
+ \startsavinginserts
+ %
+ \setbox\groupbox = \vtop\bgroup
+ % Do @comment since we are called inside an environment such as
+ % @example, where each end-of-line in the input causes an
+ % end-of-line in the output. We don't want the end-of-line after
+ % the `@group' to put extra space in the output. Since @group
+ % should appear on a line by itself (according to the Texinfo
+ % manual), we don't worry about eating any user text.
+ \comment
+}
+%
+% The \vtop produces a box with normal height and large depth; thus, TeX puts
+% \baselineskip glue before it, and (when the next line of text is done)
+% \lineskip glue after it. Thus, space below is not quite equal to space
+% above. But it's pretty close.
+\def\Egroup{%
+ % To get correct interline space between the last line of the group
+ % and the first line afterwards, we have to propagate \prevdepth.
+ \endgraf % Not \par, as it may have been set to \lisppar.
+ \global\dimen1 = \prevdepth
+ \egroup % End the \vtop.
+ % \dimen0 is the vertical size of the group's box.
+ \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
+ % \dimen2 is how much space is left on the page (more or less).
+ \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
+ % if the group doesn't fit on the current page, and it's a big big
+ % group, force a page break.
+ \ifdim \dimen0 > \dimen2
+ \ifdim \pagetotal < \vfilllimit\pageheight
+ \page
+ \fi
+ \fi
+ \box\groupbox
+ \prevdepth = \dimen1
+ \checkinserts
+}
+%
+% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
+% message, so this ends up printing `@group can only ...'.
+%
+\newhelp\groupinvalidhelp{%
+group can only be used in environments such as @example,^^J%
+where each line of input produces a line of output.}
+
+% @need space-in-mils
+% forces a page break if there is not space-in-mils remaining.
+
+\newdimen\mil \mil=0.001in
+
+% Old definition--didn't work.
+%\parseargdef\need{\par %
+%% This method tries to make TeX break the page naturally
+%% if the depth of the box does not fit.
+%{\baselineskip=0pt%
+%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
+%\prevdepth=-1000pt
+%}}
+
+\parseargdef\need{%
+ % Ensure vertical mode, so we don't make a big box in the middle of a
+ % paragraph.
+ \par
+ %
+ % If the @need value is less than one line space, it's useless.
+ \dimen0 = #1\mil
+ \dimen2 = \ht\strutbox
+ \advance\dimen2 by \dp\strutbox
+ \ifdim\dimen0 > \dimen2
+ %
+ % Do a \strut just to make the height of this box be normal, so the
+ % normal leading is inserted relative to the preceding line.
+ % And a page break here is fine.
+ \vtop to #1\mil{\strut\vfil}%
+ %
+ % TeX does not even consider page breaks if a penalty added to the
+ % main vertical list is 10000 or more. But in order to see if the
+ % empty box we just added fits on the page, we must make it consider
+ % page breaks. On the other hand, we don't want to actually break the
+ % page after the empty box. So we use a penalty of 9999.
+ %
+ % There is an extremely small chance that TeX will actually break the
+ % page at this \penalty, if there are no other feasible breakpoints in
+ % sight. (If the user is using lots of big @group commands, which
+ % almost-but-not-quite fill up a page, TeX will have a hard time doing
+ % good page breaking, for example.) However, I could not construct an
+ % example where a page broke at this \penalty; if it happens in a real
+ % document, then we can reconsider our strategy.
+ \penalty9999
+ %
+ % Back up by the size of the box, whether we did a page break or not.
+ \kern -#1\mil
+ %
+ % Do not allow a page break right after this kern.
+ \nobreak
+ \fi
+}
+
+% @br forces paragraph break (and is undocumented).
+
+\let\br = \par
+
+% @page forces the start of a new page.
+%
+\def\page{\par\vfill\supereject}
+
+% @exdent text....
+% outputs text on separate line in roman font, starting at standard page margin
+
+% This records the amount of indent in the innermost environment.
+% That's how much \exdent should take out.
+\newskip\exdentamount
+
+% This defn is used inside fill environments such as @defun.
+\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
+
+% This defn is used inside nofill environments such as @example.
+\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
+ \leftline{\hskip\leftskip{\rm#1}}}}
+
+% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
+% paragraph. For more general purposes, use the \margin insertion
+% class. WHICH is `l' or `r'.
+%
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+%
+\def\doinmargin#1#2{\strut\vadjust{%
+ \nobreak
+ \kern-\strutdepth
+ \vtop to \strutdepth{%
+ \baselineskip=\strutdepth
+ \vss
+ % if you have multiple lines of stuff to put here, you'll need to
+ % make the vbox yourself of the appropriate size.
+ \ifx#1l%
+ \llap{\ignorespaces #2\hskip\inmarginspacing}%
+ \else
+ \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
+ \fi
+ \null
+ }%
+}}
+\def\inleftmargin{\doinmargin l}
+\def\inrightmargin{\doinmargin r}
+%
+% @inmargin{TEXT [, RIGHT-TEXT]}
+% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
+% else use TEXT for both).
+%
+\def\inmargin#1{\parseinmargin #1,,\finish}
+\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \def\lefttext{#1}% have both texts
+ \def\righttext{#2}%
+ \else
+ \def\lefttext{#1}% have only one text
+ \def\righttext{#1}%
+ \fi
+ %
+ \ifodd\pageno
+ \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
+ \else
+ \def\temp{\inleftmargin\lefttext}%
+ \fi
+ \temp
+}
+
+% @include file insert text of that file as input.
+%
+\def\include{\parseargusing\filenamecatcodes\includezzz}
+\def\includezzz#1{%
+ \pushthisfilestack
+ \def\thisfile{#1}%
+ {%
+ \makevalueexpandable
+ \def\temp{\input #1 }%
+ \expandafter
+ }\temp
+ \popthisfilestack
+}
+\def\filenamecatcodes{%
+ \catcode`\\=\other
+ \catcode`~=\other
+ \catcode`^=\other
+ \catcode`_=\other
+ \catcode`|=\other
+ \catcode`<=\other
+ \catcode`>=\other
+ \catcode`+=\other
+ \catcode`-=\other
+}
+
+\def\pushthisfilestack{%
+ \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
+}
+\def\pushthisfilestackX{%
+ \expandafter\pushthisfilestackY\thisfile\StackTerm
+}
+\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
+ \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
+}
+
+\def\popthisfilestack{\errthisfilestackempty}
+\def\errthisfilestackempty{\errmessage{Internal error:
+ the stack of filenames is empty.}}
+
+\def\thisfile{}
+
+% @center line
+% outputs that line, centered.
+%
+\parseargdef\center{%
+ \ifhmode
+ \let\next\centerH
+ \else
+ \let\next\centerV
+ \fi
+ \next{\hfil \ignorespaces#1\unskip \hfil}%
+}
+\def\centerH#1{%
+ {%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+ }%
+}
+\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
+
+% @sp n outputs n lines of vertical space
+
+\parseargdef\sp{\vskip #1\baselineskip}
+
+% @comment ...line which is ignored...
+% @c is the same as @comment
+% @ignore ... @end ignore is another way to write a comment
+
+\def\comment{\begingroup \catcode`\^^M=\other%
+\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
+\commentxxx}
+{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
+
+\let\c=\comment
+
+% @paragraphindent NCHARS
+% We'll use ems for NCHARS, close enough.
+% NCHARS can also be the word `asis' or `none'.
+% We cannot feasibly implement @paragraphindent asis, though.
+%
+\def\asisword{asis} % no translation, these are keywords
+\def\noneword{none}
+%
+\parseargdef\paragraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \defaultparindent = 0pt
+ \else
+ \defaultparindent = #1em
+ \fi
+ \fi
+ \parindent = \defaultparindent
+}
+
+% @exampleindent NCHARS
+% We'll use ems for NCHARS like @paragraphindent.
+% It seems @exampleindent asis isn't necessary, but
+% I preserve it to make it similar to @paragraphindent.
+\parseargdef\exampleindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \lispnarrowing = 0pt
+ \else
+ \lispnarrowing = #1em
+ \fi
+ \fi
+}
+
+% @firstparagraphindent WORD
+% If WORD is `none', then suppress indentation of the first paragraph
+% after a section heading. If WORD is `insert', then do indent at such
+% paragraphs.
+%
+% The paragraph indentation is suppressed or not by calling
+% \suppressfirstparagraphindent, which the sectioning commands do.
+% We switch the definition of this back and forth according to WORD.
+% By default, we suppress indentation.
+%
+\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
+\def\insertword{insert}
+%
+\parseargdef\firstparagraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\noneword
+ \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
+ \else\ifx\temp\insertword
+ \let\suppressfirstparagraphindent = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @firstparagraphindent option `\temp'}%
+ \fi\fi
+}
+
+% Here is how we actually suppress indentation. Redefine \everypar to
+% \kern backwards by \parindent, and then reset itself to empty.
+%
+% We also make \indent itself not actually do anything until the next
+% paragraph.
+%
+\gdef\dosuppressfirstparagraphindent{%
+ \gdef\indent{%
+ \restorefirstparagraphindent
+ \indent
+ }%
+ \gdef\noindent{%
+ \restorefirstparagraphindent
+ \noindent
+ }%
+ \global\everypar = {%
+ \kern -\parindent
+ \restorefirstparagraphindent
+ }%
+}
+
+\gdef\restorefirstparagraphindent{%
+ \global \let \indent = \ptexindent
+ \global \let \noindent = \ptexnoindent
+ \global \everypar = {}%
+}
+
+
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+ \catcode`\_ = \active
+ \gdef\mathunderscore{%
+ \catcode`\_=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+ }
+}
+% Another complication: we want \\ (and @\) to output a \ character.
+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
+% this is not advertised and we don't care. Texinfo does not
+% otherwise define @\.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ $\finishmath
+}
+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+ \catcode`^ = \active
+ \catcode`< = \active
+ \catcode`> = \active
+ \catcode`+ = \active
+ \gdef\mathactive{%
+ \let^ = \ptexhat
+ \let< = \ptexless
+ \let> = \ptexgtr
+ \let+ = \ptexplus
+ }
+}
+
+% @bullet and @minus need the same treatment as @math, just above.
+\def\bullet{$\ptexbullet$}
+\def\minus{$-$}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in a typewriter
+% font as three actual period characters.
+%
+\def\dots{%
+ \leavevmode
+ \hbox to 1.5em{%
+ \hskip 0pt plus 0.25fil
+ .\hfil.\hfil.%
+ \hskip 0pt plus 0.5fil
+ }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \dots
+ \spacefactor=\endofsentencespacefactor
+}
+
+% @comma{} is so commas can be inserted into text without messing up
+% Texinfo's parsing.
+%
+\let\comma = ,
+
+% @refill is a no-op.
+\let\refill=\relax
+
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate (before @setfilename).
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% @setfilename is done at the beginning of every texinfo file.
+% So open here the files we need to have open while reading the input.
+% This makes it possible to make a .fmt file for texinfo.
+\def\setfilename{%
+ \fixbackslash % Turn off hack to swallow `\input texinfo'.
+ \iflinks
+ \tryauxfile
+ % Open the new aux file. TeX will close it automatically at exit.
+ \immediate\openout\auxfile=\jobname.aux
+ \fi % \openindices needs to do some work in any case.
+ \openindices
+ \let\setfilename=\comment % Ignore extra @setfilename cmds.
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc.
+ \openin 1 texinfo.cnf
+ \ifeof 1 \else \input texinfo.cnf \fi
+ \closein 1
+ %
+ \comment % Ignore the actual filename.
+}
+
+% Called from \setfilename.
+%
+\def\openindices{%
+ \newindex{cp}%
+ \newcodeindex{fn}%
+ \newcodeindex{vr}%
+ \newcodeindex{tp}%
+ \newcodeindex{ky}%
+ \newcodeindex{pg}%
+}
+
+% @bye.
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+
+\message{pdf,}
+% adobe `portable' document format
+\newcount\tempnum
+\newcount\lnkcount
+\newtoks\filename
+\newcount\filenamelength
+\newcount\pgn
+\newtoks\toksA
+\newtoks\toksB
+\newtoks\toksC
+\newtoks\toksD
+\newbox\boxA
+\newcount\countA
+\newif\ifpdf
+\newif\ifpdfmakepagedest
+
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as \undefined,
+% borrowed from ifpdf.sty.
+\ifx\pdfoutput\undefined
+\else
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+
+% PDF uses PostScript string constants for the names of xref targets,
+% for display in the outlines, and in other places. Thus, we have to
+% double any backslashes. Otherwise, a name like "\node" will be
+% interpreted as a newline (\n), followed by o, d, e. Not good.
+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% (and related messages, the final outcome is that it is up to the TeX
+% user to double the backslashes and otherwise make the string valid, so
+% that's what we do).
+
+% double active backslashes.
+%
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@activebackslashdouble{%
+ @catcode`@\=@active
+ @let\=@doublebackslash}
+}
+
+% To handle parens, we must adopt a different approach, since parens are
+% not active characters. hyperref.dtx (which has the same problem as
+% us) handles it with this amazing macro to replace tokens. I've
+% tinkered with it a little for texinfo, but it's definitely from there.
+%
+% #1 is the tokens to replace.
+% #2 is the replacement.
+% #3 is the control sequence with the string.
+%
+\def\HyPsdSubst#1#2#3{%
+ \def\HyPsdReplace##1#1##2\END{%
+ ##1%
+ \ifx\\##2\\%
+ \else
+ #2%
+ \HyReturnAfterFi{%
+ \HyPsdReplace##2\END
+ }%
+ \fi
+ }%
+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
+}
+\long\def\HyReturnAfterFi#1\fi{\fi#1}
+
+% #1 is a control sequence in which to do the replacements.
+\def\backslashparens#1{%
+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
+ % \lastnode when called from \setref -> \pdfmkdest.
+ \HyPsdSubst{(}{\realbackslash(}{#1}%
+ \HyPsdSubst{)}{\realbackslash)}{#1}%
+}
+
+\ifpdf
+ \input pdfcolor
+ \pdfcatalog{/PageMode /UseOutlines}%
+ \def\dopdfimage#1#2#3{%
+ \def\imagewidth{#2}%
+ \def\imageheight{#3}%
+ % without \immediate, pdftex seg faults when the same image is
+ % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
+ \ifnum\pdftexversion < 14
+ \immediate\pdfimage
+ \else
+ \immediate\pdfximage
+ \fi
+ \ifx\empty\imagewidth\else width \imagewidth \fi
+ \ifx\empty\imageheight\else height \imageheight \fi
+ \ifnum\pdftexversion<13
+ #1.pdf%
+ \else
+ {#1.pdf}%
+ \fi
+ \ifnum\pdftexversion < 14 \else
+ \pdfrefximage \pdflastximage
+ \fi}
+ \def\pdfmkdest#1{{%
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
+ \atdummies
+ \activebackslashdouble
+ \def\pdfdestname{#1}%
+ \backslashparens\pdfdestname
+ \pdfdest name{\pdfdestname} xyz%
+ }}%
+ %
+ % used to mark target names; must be expandable.
+ \def\pdfmkpgn#1{#1}%
+ %
+ \let\linkcolor = \Blue % was Cyan, but that seems light?
+ \def\endlink{\Black\pdfendlink}
+ % Adding outlines to PDF; macros for calculating structure of outlines
+ % come from Petr Olsak
+ \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+ \else \csname#1\endcsname \fi}
+ \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
+ \advance\tempnum by 1
+ \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
+ %
+ % #1 is the section text, which is what will be displayed in the
+ % outline by the pdf viewer. #2 is the pdf expression for the number
+ % of subentries (or empty, for subsubsections). #3 is the node text,
+ % which might be empty if this toc entry had no corresponding node.
+ % #4 is the page number
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ % Generate a link to the node text if that exists; else, use the
+ % page number. We could generate a destination for the section
+ % text in the case where a section has no node, but it doesn't
+ % seem worth the trouble, since most documents are normally structured.
+ \def\pdfoutlinedest{#3}%
+ \ifx\pdfoutlinedest\empty
+ \def\pdfoutlinedest{#4}%
+ \else
+ % Doubled backslashes in the name.
+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
+ \backslashparens\pdfoutlinedest}%
+ \fi
+ %
+ % Also double the backslashes in the display string.
+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
+ \backslashparens\pdfoutlinetext}%
+ %
+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+ }
+ %
+ \def\pdfmakeoutlines{%
+ \begingroup
+ % Thanh's hack / proper braces in bookmarks
+ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
+ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
+ %
+ % Read toc silently, to get counts of subentries for \pdfoutline.
+ \def\numchapentry##1##2##3##4{%
+ \def\thischapnum{##2}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsecentry##1##2##3##4{%
+ \advancenumber{chap\thischapnum}%
+ \def\thissecnum{##2}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsubsecentry##1##2##3##4{%
+ \advancenumber{sec\thissecnum}%
+ \def\thissubsecnum{##2}%
+ }%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \advancenumber{subsec\thissubsecnum}%
+ }%
+ \def\thischapnum{0}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ %
+ % use \def rather than \let here because we redefine \chapentry et
+ % al. a second time, below.
+ \def\appentry{\numchapentry}%
+ \def\appsecentry{\numsecentry}%
+ \def\appsubsecentry{\numsubsecentry}%
+ \def\appsubsubsecentry{\numsubsubsecentry}%
+ \def\unnchapentry{\numchapentry}%
+ \def\unnsecentry{\numsecentry}%
+ \def\unnsubsecentry{\numsubsecentry}%
+ \def\unnsubsubsecentry{\numsubsubsecentry}%
+ \readdatafile{toc}%
+ %
+ % Read toc second time, this time actually producing the outlines.
+ % The `-' means take the \expnumber as the absolute number of
+ % subentries, which we calculated on our first read of the .toc above.
+ %
+ % We use the node names as the destinations.
+ \def\numchapentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+ \def\numsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+ \def\numsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+ \def\numsubsubsecentry##1##2##3##4{% count is always zero
+ \dopdfoutline{##1}{}{##3}{##4}}%
+ %
+ % PDF outlines are displayed using system fonts, instead of
+ % document fonts. Therefore we cannot use special characters,
+ % since the encoding is unknown. For example, the eogonek from
+ % Latin 2 (0xea) gets translated to a | character. Info from
+ % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
+ %
+ % xx to do this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Right
+ % now, I guess we'll just let the pdf reader have its way.
+ \indexnofonts
+ \setupdatafile
+ \catcode`\\=\active \otherbackslash
+ \input \jobname.toc
+ \endgroup
+ }
+ %
+ \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \ifx\p\space\else\addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \fi
+ \nextsp}
+ \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \ifnum\pdftexversion < 14
+ \let \startlink \pdfannotlink
+ \else
+ \let \startlink \pdfstartlink
+ \fi
+ % make a live url in pdf output.
+ \def\pdfurl#1{%
+ \begingroup
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
+ \makevalueexpandable
+ \leavevmode\Red
+ \startlink attr{/Border [0 0 0]}%
+ user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+ \endgroup}
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\pdflink#1{%
+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+ \linkcolor #1\endlink}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\else
+ \let\pdfmkdest = \gobble
+ \let\pdfurl = \gobble
+ \let\endlink = \relax
+ \let\linkcolor = \relax
+ \let\pdfmakeoutlines = \relax
+\fi % \ifx\pdfoutput
+
+
+\message{fonts,}
+
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+ \csname ten#1\endcsname % change the current font
+}
+
+% Select #1 fonts with the current style.
+%
+\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+\let\li = \sf % Sometimes we call it \li, not \sf.
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
+% Default leading.
+\newdimen\textleading \textleading = 13.2pt
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+\def\setleading#1{%
+ \normalbaselineskip = #1\relax
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
+
+% Set the font macro #1 to the font named #2, adding on the
+% specified font prefix (normally `cm').
+% #3 is the font's design size, #4 is a scale factor
+\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
+
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\undefined
+\def\fontprefix{cm}
+\fi
+% Support font families that don't use the same naming scheme as CM.
+\def\rmshape{r}
+\def\rmbshape{bx} %where the normal face is bold
+\def\bfshape{b}
+\def\bxshape{bx}
+\def\ttshape{tt}
+\def\ttbshape{tt}
+\def\ttslshape{sltt}
+\def\itshape{ti}
+\def\itbshape{bxti}
+\def\slshape{sl}
+\def\slbshape{bxsl}
+\def\sfshape{ss}
+\def\sfbshape{ss}
+\def\scshape{csc}
+\def\scbshape{csc}
+
+% Text fonts (11.2pt, magstep1).
+\def\textnominalsize{11pt}
+\edef\mainmagstep{\magstephalf}
+\setfont\textrm\rmshape{10}{\mainmagstep}
+\setfont\texttt\ttshape{10}{\mainmagstep}
+\setfont\textbf\bfshape{10}{\mainmagstep}
+\setfont\textit\itshape{10}{\mainmagstep}
+\setfont\textsl\slshape{10}{\mainmagstep}
+\setfont\textsf\sfshape{10}{\mainmagstep}
+\setfont\textsc\scshape{10}{\mainmagstep}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstep1}
+\setfont\deftt\ttshape{10}{\magstep1}
+\setfont\defttsl\ttslshape{10}{\magstep1}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}
+\setfont\smalltt\ttshape{9}{1000}
+\setfont\smallbf\bfshape{10}{900}
+\setfont\smallit\itshape{9}{1000}
+\setfont\smallsl\slshape{9}{1000}
+\setfont\smallsf\sfshape{9}{1000}
+\setfont\smallsc\scshape{10}{900}
+\setfont\smallttsl\ttslshape{10}{900}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}
+\setfont\smallertt\ttshape{8}{1000}
+\setfont\smallerbf\bfshape{10}{800}
+\setfont\smallerit\itshape{8}{1000}
+\setfont\smallersl\slshape{8}{1000}
+\setfont\smallersf\sfshape{8}{1000}
+\setfont\smallersc\scshape{10}{800}
+\setfont\smallerttsl\ttslshape{10}{800}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}
+\setfont\titleit\itbshape{10}{\magstep4}
+\setfont\titlesl\slbshape{10}{\magstep4}
+\setfont\titlett\ttbshape{12}{\magstep3}
+\setfont\titlettsl\ttslshape{10}{\magstep4}
+\setfont\titlesf\sfbshape{17}{\magstep1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\authorrm{\secrm}
+\def\authortt{\sectt}
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\def\chapnominalsize{17pt}
+\setfont\chaprm\rmbshape{12}{\magstep2}
+\setfont\chapit\itbshape{10}{\magstep3}
+\setfont\chapsl\slbshape{10}{\magstep3}
+\setfont\chaptt\ttbshape{12}{\magstep2}
+\setfont\chapttsl\ttslshape{10}{\magstep3}
+\setfont\chapsf\sfbshape{17}{1000}
+\let\chapbf=\chaprm
+\setfont\chapsc\scbshape{10}{\magstep3}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+
+% Section fonts (14.4pt).
+\def\secnominalsize{14pt}
+\setfont\secrm\rmbshape{12}{\magstep1}
+\setfont\secit\itbshape{10}{\magstep2}
+\setfont\secsl\slbshape{10}{\magstep2}
+\setfont\sectt\ttbshape{12}{\magstep1}
+\setfont\secttsl\ttslshape{10}{\magstep2}
+\setfont\secsf\sfbshape{12}{\magstep1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep2}
+\font\seci=cmmi12 scaled \magstep1
+\font\secsy=cmsy10 scaled \magstep2
+
+% Subsection fonts (13.15pt).
+\def\ssecnominalsize{13pt}
+\setfont\ssecrm\rmbshape{12}{\magstephalf}
+\setfont\ssecit\itbshape{10}{1315}
+\setfont\ssecsl\slbshape{10}{1315}
+\setfont\ssectt\ttbshape{12}{\magstephalf}
+\setfont\ssecttsl\ttslshape{10}{1315}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1315}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled 1315
+
+% Reduced fonts for @acro in text (10pt).
+\def\reducednominalsize{10pt}
+\setfont\reducedrm\rmshape{10}{1000}
+\setfont\reducedtt\ttshape{10}{1000}
+\setfont\reducedbf\bfshape{10}{1000}
+\setfont\reducedit\itshape{10}{1000}
+\setfont\reducedsl\slshape{10}{1000}
+\setfont\reducedsf\sfshape{10}{1000}
+\setfont\reducedsc\scshape{10}{1000}
+\setfont\reducedttsl\ttslshape{10}{1000}
+\font\reducedi=cmmi10
+\font\reducedsy=cmsy10
+
+% In order for the font changes to affect most math symbols and letters,
+% we have to define the \textfont of the standard families. Since
+% texinfo doesn't allow for producing subscripts and superscripts except
+% in the main text, we don't bother to reset \scriptfont and
+% \scriptscriptfont (which would also require loading a lot more fonts).
+%
+\def\resetmathfonts{%
+ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
+ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
+ \textfont\ttfam=\tentt \textfont\sffam=\tensf
+}
+
+% The font-changing commands redefine the meanings of \tenSTYLE, instead
+% of just \STYLE. We do this because \STYLE needs to also set the
+% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
+% \tenSTYLE to set the current font.
+%
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower). These relative commands are used in
+% the LaTeX logo and acronyms.
+%
+% This all needs generalizing, badly.
+%
+\def\textfonts{%
+ \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
+ \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
+ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
+ \let\tenttsl=\textttsl
+ \def\curfontsize{text}%
+ \def\lsize{reduced}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{\textleading}}
+\def\titlefonts{%
+ \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
+ \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
+ \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
+ \let\tenttsl=\titlettsl
+ \def\curfontsize{title}%
+ \def\lsize{chap}\def\lllsize{subsec}%
+ \resetmathfonts \setleading{25pt}}
+\def\titlefont#1{{\titlefonts\rm #1}}
+\def\chapfonts{%
+ \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
+ \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
+ \let\tenttsl=\chapttsl
+ \def\curfontsize{chap}%
+ \def\lsize{sec}\def\lllsize{text}%
+ \resetmathfonts \setleading{19pt}}
+\def\secfonts{%
+ \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
+ \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
+ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
+ \let\tenttsl=\secttsl
+ \def\curfontsize{sec}%
+ \def\lsize{subsec}\def\lllsize{reduced}%
+ \resetmathfonts \setleading{16pt}}
+\def\subsecfonts{%
+ \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
+ \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
+ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
+ \let\tenttsl=\ssecttsl
+ \def\curfontsize{ssec}%
+ \def\lsize{text}\def\lllsize{small}%
+ \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts
+\def\reducedfonts{%
+ \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
+ \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
+ \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
+ \let\tenttsl=\reducedttsl
+ \def\curfontsize{reduced}%
+ \def\lsize{small}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallfonts{%
+ \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
+ \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
+ \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
+ \let\tenttsl=\smallttsl
+ \def\curfontsize{small}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallerfonts{%
+ \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
+ \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
+ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
+ \let\tenttsl=\smallerttsl
+ \def\curfontsize{smaller}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{9.5pt}}
+
+% Set the fonts to use with the @small... environments.
+\let\smallexamplefonts = \smallfonts
+
+% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
+% can fit this many characters:
+% 8.5x11=86 smallbook=72 a4=90 a5=69
+% If we use \scriptfonts (8pt), then we can fit this many characters:
+% 8.5x11=90+ smallbook=80 a4=90+ a5=77
+% For me, subjectively, the few extra characters that fit aren't worth
+% the additional smallness of 8pt. So I'm making the default 9pt.
+%
+% By the way, for comparison, here's what fits with @example (10pt):
+% 8.5x11=71 smallbook=60 a4=75 a5=58
+%
+% I wish the USA used A4 paper.
+% --karl, 24jan03.
+
+
+% Set up the default fonts, so we can use them for creating boxes.
+%
+\textfonts \rm
+
+% Define these so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}
+\setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}
+\setfont\shortconttt\ttshape{12}{1000}
+
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
+
+% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
+% unless the following character is such as not to need one.
+\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
+ \ptexslash\fi\fi\fi}
+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+
+% like \smartslanted except unconditionally uses \ttsl.
+% @var is set to this for defun arguments.
+\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+
+% like \smartslanted except unconditionally use \sl. We never want
+% ttsl for book titles, do we?
+\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+
+\let\i=\smartitalic
+\let\slanted=\smartslanted
+\let\var=\smartslanted
+\let\dfn=\smartslanted
+\let\emph=\smartitalic
+
+% @b, explicit bold.
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+% @sansserif, explicit sans.
+\def\sansserif#1{{\sf #1}}
+
+% We can't just use \exhyphenpenalty, because that only has effect at
+% the end of a paragraph. Restore normal hyphenation at the end of the
+% group within which \nohyphenation is presumably called.
+%
+\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
+\def\restorehyphenation{\hyphenchar\font = `- }
+
+% Set sfcode to normal for the chars that usually have another value.
+% Can't use plain's \frenchspacing because it uses the `\x notation, and
+% sometimes \x has an active definition that messes things up.
+%
+\chardef\colonChar = `\:
+\chardef\commaChar = `\,
+\chardef\dotChar = `\.
+\chardef\exclamChar= `\!
+\chardef\questChar = `\?
+\chardef\semiChar = `\;
+%
+\catcode`@=11
+ \def\plainfrenchspacing{%
+ \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
+ \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ }
+ \def\plainnonfrenchspacing{%
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
+ }
+\catcode`@=\other
+\def\endofsentencespacefactor{3000}% default
+
+\def\t#1{%
+ {\tt \rawbackslash \plainfrenchspacing #1}%
+ \null
+}
+\def\samp#1{`\tclose{#1}'\null}
+\setfont\keyrm\rmshape{8}{1000}
+\font\keysy=cmsy9
+\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+ \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+ \vbox{\hrule\kern-0.4pt
+ \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+ \kern-0.4pt\hrule}%
+ \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+% The old definition, with no lozenge:
+%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+% @file, @option are the same as @samp.
+\let\file=\samp
+\let\option=\samp
+
+% @code is a modification of @t,
+% which makes spaces the same size as normal in the surrounding text.
+\def\tclose#1{%
+ {%
+ % Change normal interword space to be same as for the current font.
+ \spaceskip = \fontdimen2\font
+ %
+ % Switch to typewriter.
+ \tt
+ %
+ % But `\ ' produces the large typewriter interword space.
+ \def\ {{\spaceskip = 0pt{} }}%
+ %
+ % Turn off hyphenation.
+ \nohyphenation
+ %
+ \rawbackslash
+ \plainfrenchspacing
+ #1%
+ }%
+ \null
+}
+
+% We *must* turn on hyphenation at `-' and `_' in @code.
+% Otherwise, it is too hard to avoid overfull hboxes
+% in the Emacs manual, the Library manual, etc.
+
+% Unfortunately, TeX uses one parameter (\hyphenchar) to control
+% both hyphenation at - and hyphenation within words.
+% We must therefore turn them both off (\tclose does that)
+% and arrange explicitly to hyphenate at a dash.
+% -- rms.
+{
+ \catcode`\-=\active
+ \catcode`\_=\active
+ %
+ \global\def\code{\begingroup
+ \catcode`\-=\active \catcode`\_=\active
+ \ifallowcodebreaks
+ \let-\codedash
+ \let_\codeunder
+ \else
+ \let-\realdash
+ \let_\realunder
+ \fi
+ \codex
+ }
+}
+
+\def\realdash{-}
+\def\codedash{-\discretionary{}{}{}}
+\def\codeunder{%
+ % this is all so @math{@code{var_name}+1} can work. In math mode, _
+ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
+ % will therefore expand the active definition of _, which is us
+ % (inside @code that is), therefore an endless loop.
+ \ifusingtt{\ifmmode
+ \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
+ \else\normalunderscore \fi
+ \discretionary{}{}{}}%
+ {\_}%
+}
+\def\codex #1{\tclose{#1}\endgroup}
+
+% An additional complication: the above will allow breaks after, e.g.,
+% each of the four underscores in __typeof__. This is undesirable in
+% some manuals, especially if they don't have long identifiers in
+% general. @allowcodebreaks provides a way to control this.
+%
+\newif\ifallowcodebreaks \allowcodebreakstrue
+
+\def\keywordtrue{true}
+\def\keywordfalse{false}
+
+\parseargdef\allowcodebreaks{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\keywordtrue
+ \allowcodebreakstrue
+ \else\ifx\txiarg\keywordfalse
+ \allowcodebreaksfalse
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+ \fi\fi
+}
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+% `example' (@kbd uses ttsl only inside of @example and friends),
+% or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\txiarg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\txiarg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct.'
+\kbdinputstyle distinct
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\look}}\fi
+\else{\tclose{\kbdfont\look}}\fi}
+
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
+\let\env=\code
+\let\command=\code
+
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself. First (mandatory) arg is the url. Perhaps eventually put in
+% a hypertex \special here.
+%
+\def\uref#1{\douref #1,,,\finish}
+\def\douref#1,#2,#3,#4\finish{\begingroup
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \code{#1}% only url given, so show it
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+\else
+ \let\email=\uref
+\fi
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
+%
+\def\dmn#1{\thinspace #1}
+
+\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
+
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}} % roman font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
+%
+\def\acronym#1{\doacronym #1,,\finish}
+\def\doacronym#1,#2,#3\finish{%
+ {\selectfonts\lsize #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+}
+
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
+%
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+ {\plainfrenchspacing #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+}
+
+% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
+%
+\def\pounds{{\it\$}}
+
+% @euro{} comes from a separate font, depending on the current style.
+% We use the free feym* fonts from the eurosym package by Henrik
+% Theiling, which support regular, slanted, bold and bold slanted (and
+% "outlined" (blackboard board, sort of) versions, which we don't need).
+% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+%
+% Although only regular is the truly official Euro symbol, we ignore
+% that. The Euro is designed to be slightly taller than the regular
+% font height.
+%
+% feymr - regular
+% feymo - slanted
+% feybr - bold
+% feybo - bold slanted
+%
+% There is no good (free) typewriter version, to my knowledge.
+% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
+% Hmm.
+%
+% Also doesn't work in math. Do we need to do math with euro symbols?
+% Hope not.
+%
+%
+\def\euro{{\eurofont e}}
+\def\eurofont{%
+ % We set the font at each command, rather than predefining it in
+ % \textfonts and the other font-switching commands, so that
+ % installations which never need the symbol don't have to have the
+ % font installed.
+ %
+ % There is only one designed size (nominal 10pt), so we always scale
+ % that to the current nominal size.
+ %
+ % By the way, simply using "at 1em" works for cmr10 and the like, but
+ % does not work for cmbx10 and other extended/shrunken fonts.
+ %
+ \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
+ %
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
+ \else
+ % regular:
+ \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
+ \fi
+ \thiseurofont
+}
+
+% @registeredsymbol - R in a circle. The font for the R should really
+% be smaller yet, but lllsize is the best we can do for now.
+% Adapted from the plain.tex definition of \copyright.
+%
+\def\registeredsymbol{%
+ $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+ \hfil\crcr\Orb}}%
+ }$%
+}
+
+% Laurent Siebenmann reports \Orb undefined with:
+% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
+% so we'll define it if necessary.
+%
+\ifx\Orb\undefined
+\def\Orb{\mathhexbox20D}
+\fi
+
+
+\message{page headings,}
+
+\newskip\titlepagetopglue \titlepagetopglue = 1.5in
+\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
+
+% First the title page. Must do @settitle before @titlepage.
+\newif\ifseenauthor
+\newif\iffinishedtitlepage
+
+% Do an implicit @contents or @shortcontents after @end titlepage if the
+% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
+%
+\newif\ifsetcontentsaftertitlepage
+ \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
+\newif\ifsetshortcontentsaftertitlepage
+ \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+
+\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
+
+\envdef\titlepage{%
+ % Open one extra group, as we want to close it in the middle of \Etitlepage.
+ \begingroup
+ \parindent=0pt \textfonts
+ % Leave some space at the very top of the page.
+ \vglue\titlepagetopglue
+ % No rule at page bottom unless we print one at the top with @title.
+ \finishedtitlepagetrue
+ %
+ % Most title ``pages'' are actually two pages long, with space
+ % at the top of the second. We don't want the ragged left on the second.
+ \let\oldpage = \page
+ \def\page{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ \let\page = \oldpage
+ \page
+ \null
+ }%
+}
+
+\def\Etitlepage{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ % It is important to do the page break before ending the group,
+ % because the headline and footline are only empty inside the group.
+ % If we use the new definition of \page, we always get a blank page
+ % after the title page, which we certainly don't want.
+ \oldpage
+ \endgroup
+ %
+ % Need this before the \...aftertitlepage checks so that if they are
+ % in effect the toc pages will come out with page numbers.
+ \HEADINGSon
+ %
+ % If they want short, they certainly want long too.
+ \ifsetshortcontentsaftertitlepage
+ \shortcontents
+ \contents
+ \global\let\shortcontents = \relax
+ \global\let\contents = \relax
+ \fi
+ %
+ \ifsetcontentsaftertitlepage
+ \contents
+ \global\let\contents = \relax
+ \global\let\shortcontents = \relax
+ \fi
+}
+
+\def\finishtitlepage{%
+ \vskip4pt \hrule height 2pt width \hsize
+ \vskip\titlepagebottomglue
+ \finishedtitlepagetrue
+}
+
+%%% Macros to be used within @titlepage:
+
+\let\subtitlerm=\tenrm
+\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
+
+\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
+ \let\tt=\authortt}
+
+\parseargdef\title{%
+ \checkenv\titlepage
+ \leftline{\titlefonts\rm #1}
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+}
+
+\parseargdef\subtitle{%
+ \checkenv\titlepage
+ {\subtitlefont \rightline{#1}}%
+}
+
+% @author should come last, but may come many times.
+% It can also be used inside @quotation.
+%
+\parseargdef\author{%
+ \def\temp{\quotation}%
+ \ifx\thisenv\temp
+ \def\quotationauthor{#1}% printed in \Equotation.
+ \else
+ \checkenv\titlepage
+ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+ {\authorfont \leftline{#1}}%
+ \fi
+}
+
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks\evenheadline % headline on even pages
+\newtoks\oddheadline % headline on odd pages
+\newtoks\evenfootline % footline on even pages
+\newtoks\oddfootline % footline on odd pages
+
+% Now make TeX use those variables
+\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
+ \else \the\evenheadline \fi}}
+\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
+ \else \the\evenfootline \fi}\HEADINGShook}
+\let\HEADINGShook=\relax
+
+% Commands to set those variables.
+% For example, this is what @headings on does
+% @evenheading @thistitle|@thispage|@thischapter
+% @oddheading @thischapter|@thispage|@thistitle
+% @evenfooting @thisfile||
+% @oddfooting ||@thisfile
+
+
+\def\evenheading{\parsearg\evenheadingxxx}
+\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
+\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddheading{\parsearg\oddheadingxxx}
+\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
+\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
+\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
+\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
+ \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
+ %
+ % Leave some space for the footline. Hopefully ok to assume
+ % @evenfooting will not be used by itself.
+ \global\advance\pageheight by -\baselineskip
+ \global\advance\vsize by -\baselineskip
+}
+
+\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+
+
+% @headings double turns headings on for double-sided printing.
+% @headings single turns headings on for single-sided printing.
+% @headings off turns them off.
+% @headings on same as @headings double, retained for compatibility.
+% @headings after turns on double-sided headings after this page.
+% @headings doubleafter turns on double-sided headings after this page.
+% @headings singleafter turns on single-sided headings after this page.
+% By default, they are off at the start of a document,
+% and turned `on' after @end titlepage.
+
+\def\headings #1 {\csname HEADINGS#1\endcsname}
+
+\def\HEADINGSoff{%
+\global\evenheadline={\hfil} \global\evenfootline={\hfil}
+\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
+\HEADINGSoff
+% When we turn headings on, set the page number to 1.
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSdouble{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+\let\contentsalignmacro = \chappager
+
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingle{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+\def\HEADINGSon{\HEADINGSdouble}
+
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\let\HEADINGSdoubleafter=\HEADINGSafter
+\def\HEADINGSdoublex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
+\def\HEADINGSsinglex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+
+% Subroutines used in generating headings
+% This produces Day Month Year style of output.
+% Only define if not already defined, in case a txi-??.tex file has set
+% up a different format (e.g., txi-cs.tex does this).
+\ifx\today\undefined
+\def\today{%
+ \number\day\space
+ \ifcase\month
+ \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
+ \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
+ \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
+ \fi
+ \space\number\year}
+\fi
+
+% @settitle line... specifies the title of the document, for headings.
+% It generates no output of its own.
+\def\thistitle{\putwordNoTitle}
+\def\settitle{\parsearg{\gdef\thistitle}}
+
+
+\message{tables,}
+% Tables -- @table, @ftable, @vtable, @item(x).
+
+% default indentation of table text
+\newdimen\tableindent \tableindent=.8in
+% default indentation of @itemize and @enumerate text
+\newdimen\itemindent \itemindent=.3in
+% margin between end of table item and start of table text.
+\newdimen\itemmargin \itemmargin=.1in
+
+% used internally for \itemindent minus \itemmargin
+\newdimen\itemmax
+
+% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
+% these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\newif\ifitemxneedsnegativevskip
+
+\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\itemxpar \parsearg\itemzzz}
+
+\def\itemzzz #1{\begingroup %
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\tableindent
+ \setbox0=\hbox{\itemindicate{#1}}%
+ \itemindex{#1}%
+ \nobreak % This prevents a break before @itemx.
+ %
+ % If the item text does not fit in the space we have, put it on a line
+ % by itself, and do not allow a page break either before or after that
+ % line. We do not start a paragraph here because then if the next
+ % command is, e.g., @kindex, the whatsit would get put into the
+ % horizontal list on a line by itself, resulting in extra blank space.
+ \ifdim \wd0>\itemmax
+ %
+ % Make this a paragraph so we get the \parskip glue and wrapping,
+ % but leave it ragged-right.
+ \begingroup
+ \advance\leftskip by-\tableindent
+ \advance\hsize by\tableindent
+ \advance\rightskip by0pt plus1fil
+ \leavevmode\unhbox0\par
+ \endgroup
+ %
+ % We're going to be starting a paragraph, but we don't want the
+ % \parskip glue -- logically it's part of the @item we just started.
+ \nobreak \vskip-\parskip
+ %
+ % Stop a page break at the \parskip glue coming up. However, if
+ % what follows is an environment such as @example, there will be no
+ % \parskip glue; then the negative vskip we just inserted would
+ % cause the example and the item to crash together. So we use this
+ % bizarre value of 10001 as a signal to \aboveenvbreak to insert
+ % \parskip glue after all. Section titles are handled this way also.
+ %
+ \penalty 10001
+ \endgroup
+ \itemxneedsnegativevskipfalse
+ \else
+ % The item text fits into the space. Start a paragraph, so that the
+ % following text (if any) will end up on the same line.
+ \noindent
+ % Do this with kerns and \unhbox so that if there is a footnote in
+ % the item text, it can migrate to the main vertical list and
+ % eventually be printed.
+ \nobreak\kern-\tableindent
+ \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
+ \unhbox0
+ \nobreak\kern\dimen0
+ \endgroup
+ \itemxneedsnegativevskiptrue
+ \fi
+}
+
+\def\item{\errmessage{@item while not in a list environment}}
+\def\itemx{\errmessage{@itemx while not in a list environment}}
+
+% @table, @ftable, @vtable.
+\envdef\table{%
+ \let\itemindex\gobble
+ \tablecheck{table}%
+}
+\envdef\ftable{%
+ \def\itemindex ##1{\doind {fn}{\code{##1}}}%
+ \tablecheck{ftable}%
+}
+\envdef\vtable{%
+ \def\itemindex ##1{\doind {vr}{\code{##1}}}%
+ \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+ \ifnum \the\catcode`\^^M=\active
+ \endgroup
+ \errmessage{This command won't work in this context; perhaps the problem is
+ that we are \inenvironment\thisenv}%
+ \def\next{\doignore{#1}}%
+ \else
+ \let\next\tablex
+ \fi
+ \next
+}
+\def\tablex#1{%
+ \def\itemindicate{#1}%
+ \parsearg\tabley
+}
+\def\tabley#1{%
+ {%
+ \makevalueexpandable
+ \edef\temp{\noexpand\tablez #1\space\space\space}%
+ \expandafter
+ }\temp \endtablez
+}
+\def\tablez #1 #2 #3 #4\endtablez{%
+ \aboveenvbreak
+ \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
+ \ifnum 0#2>0 \tableindent=#2\mil \fi
+ \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
+ \itemmax=\tableindent
+ \advance \itemmax by -\itemmargin
+ \advance \leftskip by \tableindent
+ \exdentamount=\tableindent
+ \parindent = 0pt
+ \parskip = \smallskipamount
+ \ifdim \parskip=0pt \parskip=2pt \fi
+ \let\item = \internalBitem
+ \let\itemx = \internalBitemx
+}
+\def\Etable{\endgraf\afterenvbreak}
+\let\Eftable\Etable
+\let\Evtable\Etable
+\let\Eitemize\Etable
+\let\Eenumerate\Etable
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\envdef\itemize{\parsearg\doitemize}
+
+\def\doitemize#1{%
+ \aboveenvbreak
+ \itemmax=\itemindent
+ \advance\itemmax by -\itemmargin
+ \advance\leftskip by \itemindent
+ \exdentamount=\itemindent
+ \parindent=0pt
+ \parskip=\smallskipamount
+ \ifdim\parskip=0pt \parskip=2pt \fi
+ \def\itemcontents{#1}%
+ % @itemize with no arg is equivalent to @itemize @bullet.
+ \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+ \let\item=\itemizeitem
+}
+
+% Definition of @item while inside @itemize and @enumerate.
+%
+\def\itemizeitem{%
+ \advance\itemno by 1 % for enumerations
+ {\let\par=\endgraf \smallbreak}% reasonable place to break
+ {%
+ % If the document has an @itemize directly after a section title, a
+ % \nobreak will be last on the list, and \sectionheading will have
+ % done a \vskip-\parskip. In that case, we don't want to zero
+ % parskip, or the item text will crash with the heading. On the
+ % other hand, when there is normal text preceding the item (as there
+ % usually is), we do want to zero parskip, or there would be too much
+ % space. In that case, we won't have a \nobreak before. At least
+ % that's the theory.
+ \ifnum\lastpenalty<10000 \parskip=0in \fi
+ \noindent
+ \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+ \vadjust{\penalty 1200}}% not good to break after first line of item.
+ \flushcr
+}
+
+% \splitoff TOKENS\endmark defines \first to be the first token in
+% TOKENS, and \rest to be the remainder.
+%
+\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
+
+% Allow an optional argument of an uppercase letter, lowercase letter,
+% or number, to specify the first label in the enumerated list. No
+% argument is the same as `1'.
+%
+\envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
+\def\enumeratey #1 #2\endenumeratey{%
+ % If we were given no argument, pretend we were given `1'.
+ \def\thearg{#1}%
+ \ifx\thearg\empty \def\thearg{1}\fi
+ %
+ % Detect if the argument is a single token. If so, it might be a
+ % letter. Otherwise, the only valid thing it can be is a number.
+ % (We will always have one token, because of the test we just made.
+ % This is a good thing, since \splitoff doesn't work given nothing at
+ % all -- the first parameter is undelimited.)
+ \expandafter\splitoff\thearg\endmark
+ \ifx\rest\empty
+ % Only one token in the argument. It could still be anything.
+ % A ``lowercase letter'' is one whose \lccode is nonzero.
+ % An ``uppercase letter'' is one whose \lccode is both nonzero, and
+ % not equal to itself.
+ % Otherwise, we assume it's a number.
+ %
+ % We need the \relax at the end of the \ifnum lines to stop TeX from
+ % continuing to look for a <number>.
+ %
+ \ifnum\lccode\expandafter`\thearg=0\relax
+ \numericenumerate % a number (we hope)
+ \else
+ % It's a letter.
+ \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
+ \lowercaseenumerate % lowercase letter
+ \else
+ \uppercaseenumerate % uppercase letter
+ \fi
+ \fi
+ \else
+ % Multiple tokens in the argument. We hope it's a number.
+ \numericenumerate
+ \fi
+}
+
+% An @enumerate whose labels are integers. The starting integer is
+% given in \thearg.
+%
+\def\numericenumerate{%
+ \itemno = \thearg
+ \startenumeration{\the\itemno}%
+}
+
+% The starting (lowercase) letter is in \thearg.
+\def\lowercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more lowercase letters in @enumerate; get a bigger
+ alphabet}%
+ \fi
+ \char\lccode\itemno
+ }%
+}
+
+% The starting (uppercase) letter is in \thearg.
+\def\uppercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more uppercase letters in @enumerate; get a bigger
+ alphabet}
+ \fi
+ \char\uccode\itemno
+ }%
+}
+
+% Call \doitemize, adding a period to the first argument and supplying the
+% common last two arguments. Also subtract one from the initial value in
+% \itemno, since @item increments \itemno.
+%
+\def\startenumeration#1{%
+ \advance\itemno by -1
+ \doitemize{#1.}\flushcr
+}
+
+% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
+% to @enumerate.
+%
+\def\alphaenumerate{\enumerate{a}}
+\def\capsenumerate{\enumerate{A}}
+\def\Ealphaenumerate{\Eenumerate}
+\def\Ecapsenumerate{\Eenumerate}
+
+
+% @multitable macros
+% Amy Hendrickson, 8/18/94, 3/6/96
+%
+% @multitable ... @end multitable will make as many columns as desired.
+% Contents of each column will wrap at width given in preamble. Width
+% can be specified either with sample text given in a template line,
+% or in percent of \hsize, the current width of text on page.
+
+% Table can continue over pages but will only break between lines.
+
+% To make preamble:
+%
+% Either define widths of columns in terms of percent of \hsize:
+% @multitable @columnfractions .25 .3 .45
+% @item ...
+%
+% Numbers following @columnfractions are the percent of the total
+% current hsize to be used for each column. You may use as many
+% columns as desired.
+
+
+% Or use a template:
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item ...
+% using the widest term desired in each column.
+
+% Each new table line starts with @item, each subsequent new column
+% starts with @tab. Empty columns may be produced by supplying @tab's
+% with nothing between them for as many times as empty columns are needed,
+% ie, @tab@tab@tab will produce two empty columns.
+
+% @item, @tab do not need to be on their own lines, but it will not hurt
+% if they are.
+
+% Sample multitable:
+
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item first col stuff @tab second col stuff @tab third col
+% @item
+% first col stuff
+% @tab
+% second col stuff
+% @tab
+% third col
+% @item first col stuff @tab second col stuff
+% @tab Many paragraphs of text may be used in any column.
+%
+% They will wrap at the width determined by the template.
+% @item@tab@tab This will be in third column.
+% @end multitable
+
+% Default dimensions may be reset by user.
+% @multitableparskip is vertical space between paragraphs in table.
+% @multitableparindent is paragraph indent in table.
+% @multitablecolmargin is horizontal space to be left between columns.
+% @multitablelinespace is space to leave between table items, baseline
+% to baseline.
+% 0pt means it depends on current normal line spacing.
+%
+\newskip\multitableparskip
+\newskip\multitableparindent
+\newdimen\multitablecolspace
+\newskip\multitablelinespace
+\multitableparskip=0pt
+\multitableparindent=6pt
+\multitablecolspace=12pt
+\multitablelinespace=0pt
+
+% Macros used to set up halign preamble:
+%
+\let\endsetuptable\relax
+\def\xendsetuptable{\endsetuptable}
+\let\columnfractions\relax
+\def\xcolumnfractions{\columnfractions}
+\newif\ifsetpercent
+
+% #1 is the @columnfraction, usually a decimal number like .5, but might
+% be just 1. We just use it, whatever it is.
+%
+\def\pickupwholefraction#1 {%
+ \global\advance\colcount by 1
+ \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
+ \setuptable
+}
+
+\newcount\colcount
+\def\setuptable#1{%
+ \def\firstarg{#1}%
+ \ifx\firstarg\xendsetuptable
+ \let\go = \relax
+ \else
+ \ifx\firstarg\xcolumnfractions
+ \global\setpercenttrue
+ \else
+ \ifsetpercent
+ \let\go\pickupwholefraction
+ \else
+ \global\advance\colcount by 1
+ \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
+ % separator; typically that is always in the input, anyway.
+ \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+ \fi
+ \fi
+ \ifx\go\pickupwholefraction
+ % Put the argument back for the \pickupwholefraction call, so
+ % we'll always have a period there to be parsed.
+ \def\go{\pickupwholefraction#1}%
+ \else
+ \let\go = \setuptable
+ \fi%
+ \fi
+ \go
+}
+
+% multitable-only commands.
+%
+% @headitem starts a heading row, which we typeset in bold.
+% Assignments have to be global since we are inside the implicit group
+% of an alignment entry. Note that \everycr resets \everytab.
+\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+%
+% A \tab used to include \hskip1sp. But then the space in a template
+% line is not enough. That is bad. So let's go back to just `&' until
+% we encounter the problem it was intended to solve again.
+% --karl, nathan@acm.org, 20apr99.
+\def\tab{\checkenv\multitable &\the\everytab}%
+
+% @multitable ... @end multitable definitions:
+%
+\newtoks\everytab % insert after every tab.
+%
+\envdef\multitable{%
+ \vskip\parskip
+ \startsavinginserts
+ %
+ % @item within a multitable starts a normal row.
+ % We use \def instead of \let so that if one of the multitable entries
+ % contains an @itemize, we don't choke on the \item (seen as \crcr aka
+ % \endtemplate) expanding \doitemize.
+ \def\item{\crcr}%
+ %
+ \tolerance=9500
+ \hbadness=9500
+ \setmultitablespacing
+ \parskip=\multitableparskip
+ \parindent=\multitableparindent
+ \overfullrule=0pt
+ \global\colcount=0
+ %
+ \everycr = {%
+ \noalign{%
+ \global\everytab={}%
+ \global\colcount=0 % Reset the column counter.
+ % Check for saved footnotes, etc.
+ \checkinserts
+ % Keeps underfull box messages off when table breaks over pages.
+ %\filbreak
+ % Maybe so, but it also creates really weird page breaks when the
+ % table breaks over pages. Wouldn't \vfil be better? Wait until the
+ % problem manifests itself, so it can be fixed for real --karl.
+ }%
+ }%
+ %
+ \parsearg\domultitable
+}
+\def\domultitable#1{%
+ % To parse everything between @multitable and @item:
+ \setuptable#1 \endsetuptable
+ %
+ % This preamble sets up a generic column definition, which will
+ % be used as many times as user calls for columns.
+ % \vtop will set a single line and will also let text wrap and
+ % continue for many paragraphs if desired.
+ \halign\bgroup &%
+ \global\advance\colcount by 1
+ \multistrut
+ \vtop{%
+ % Use the current \colcount to find the correct column width:
+ \hsize=\expandafter\csname col\the\colcount\endcsname
+ %
+ % In order to keep entries from bumping into each other
+ % we will add a \leftskip of \multitablecolspace to all columns after
+ % the first one.
+ %
+ % If a template has been used, we will add \multitablecolspace
+ % to the width of each template entry.
+ %
+ % If the user has set preamble in terms of percent of \hsize we will
+ % use that dimension as the width of the column, and the \leftskip
+ % will keep entries from bumping into each other. Table will start at
+ % left margin and final column will justify at right margin.
+ %
+ % Make sure we don't inherit \rightskip from the outer environment.
+ \rightskip=0pt
+ \ifnum\colcount=1
+ % The first column will be indented with the surrounding text.
+ \advance\hsize by\leftskip
+ \else
+ \ifsetpercent \else
+ % If user has not set preamble in terms of percent of \hsize
+ % we will advance \hsize by \multitablecolspace.
+ \advance\hsize by \multitablecolspace
+ \fi
+ % In either case we will make \leftskip=\multitablecolspace:
+ \leftskip=\multitablecolspace
+ \fi
+ % Ignoring space at the beginning and end avoids an occasional spurious
+ % blank line, when TeX decides to break the line at the space before the
+ % box from the multistrut, so the strut ends up on a line by itself.
+ % For example:
+ % @multitable @columnfractions .11 .89
+ % @item @code{#}
+ % @tab Legal holiday which is valid in major parts of the whole country.
+ % Is automatically provided with highlighting sequences respectively
+ % marking characters.
+ \noindent\ignorespaces##\unskip\multistrut
+ }\cr
+}
+\def\Emultitable{%
+ \crcr
+ \egroup % end the \halign
+ \global\setpercentfalse
+}
+
+\def\setmultitablespacing{%
+ \def\multistrut{\strut}% just use the standard line spacing
+ %
+ % Compute \multitablelinespace (if not defined by user) for use in
+ % \multitableparskip calculation. We used define \multistrut based on
+ % this, but (ironically) that caused the spacing to be off.
+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
+\ifdim\multitablelinespace=0pt
+\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
+\global\advance\multitablelinespace by-\ht0
+\fi
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%% If so, set to same dimension as multitablelinespace.
+\ifdim\multitableparskip>\multitablelinespace
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi%
+\ifdim\multitableparskip=0pt
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi}
+
+
+\message{conditionals,}
+
+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
+% @ifnotxml always succeed. They currently do nothing; we don't
+% attempt to check whether the conditionals are properly nested. But we
+% have to remember that they are conditionals, so that @end doesn't
+% attempt to close an environment group.
+%
+\def\makecond#1{%
+ \expandafter\let\csname #1\endcsname = \relax
+ \expandafter\let\csname iscond.#1\endcsname = 1
+}
+\makecond{iftex}
+\makecond{ifnotdocbook}
+\makecond{ifnothtml}
+\makecond{ifnotinfo}
+\makecond{ifnotplaintext}
+\makecond{ifnotxml}
+
+% Ignore @ignore, @ifhtml, @ifinfo, and the like.
+%
+\def\direntry{\doignore{direntry}}
+\def\documentdescription{\doignore{documentdescription}}
+\def\docbook{\doignore{docbook}}
+\def\html{\doignore{html}}
+\def\ifdocbook{\doignore{ifdocbook}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifnottex{\doignore{ifnottex}}
+\def\ifplaintext{\doignore{ifplaintext}}
+\def\ifxml{\doignore{ifxml}}
+\def\ignore{\doignore{ignore}}
+\def\menu{\doignore{menu}}
+\def\xml{\doignore{xml}}
+
+% Ignore text until a line `@end #1', keeping track of nested conditionals.
+%
+% A count to remember the depth of nesting.
+\newcount\doignorecount
+
+\def\doignore#1{\begingroup
+ % Scan in ``verbatim'' mode:
+ \obeylines
+ \catcode`\@ = \other
+ \catcode`\{ = \other
+ \catcode`\} = \other
+ %
+ % Make sure that spaces turn into tokens that match what \doignoretext wants.
+ \spaceisspace
+ %
+ % Count number of #1's that we've seen.
+ \doignorecount = 0
+ %
+ % Swallow text until we reach the matching `@end #1'.
+ \dodoignore{#1}%
+}
+
+{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
+ \obeylines %
+ %
+ \gdef\dodoignore#1{%
+ % #1 contains the command name as a string, e.g., `ifinfo'.
+ %
+ % Define a command to find the next `@end #1'.
+ \long\def\doignoretext##1^^M@end #1{%
+ \doignoretextyyy##1^^M@#1\_STOP_}%
+ %
+ % And this command to find another #1 command, at the beginning of a
+ % line. (Otherwise, we would consider a line `@c @ifset', for
+ % example, to count as an @ifset for nesting.)
+ \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
+ %
+ % And now expand that command.
+ \doignoretext ^^M%
+ }%
+}
+
+\def\doignoreyyy#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty % Nothing found.
+ \let\next\doignoretextzzz
+ \else % Found a nested condition, ...
+ \advance\doignorecount by 1
+ \let\next\doignoretextyyy % ..., look for another.
+ % If we're here, #1 ends with ^^M\ifinfo (for example).
+ \fi
+ \next #1% the token \_STOP_ is present just after this macro.
+}
+
+% We have to swallow the remaining "\_STOP_".
+%
+\def\doignoretextzzz#1{%
+ \ifnum\doignorecount = 0 % We have just found the outermost @end.
+ \let\next\enddoignore
+ \else % Still inside a nested condition.
+ \advance\doignorecount by -1
+ \let\next\doignoretext % Look for the next @end.
+ \fi
+ \next
+}
+
+% Finish off ignored text.
+{ \obeylines%
+ % Ignore anything after the last `@end #1'; this matters in verbatim
+ % environments, where otherwise the newline after an ignored conditional
+ % would result in a blank line in the output.
+ \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
+}
+
+
+% @set VAR sets the variable VAR to an empty value.
+% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
+%
+% Since we want to separate VAR from REST-OF-LINE (which might be
+% empty), we can't just use \parsearg; we have to insert a space of our
+% own to delimit the rest of the line, and then take it out again if we
+% didn't need it.
+% We rely on the fact that \parsearg sets \catcode`\ =10.
+%
+\parseargdef\set{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+ {%
+ \makevalueexpandable
+ \def\temp{#2}%
+ \edef\next{\gdef\makecsname{SET#1}}%
+ \ifx\temp\empty
+ \next{}%
+ \else
+ \setzzz#2\endsetzzz
+ \fi
+ }%
+}
+% Remove the trailing space \setxxx inserted.
+\def\setzzz#1 \endsetzzz{\next{#1}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\parseargdef\clear{%
+ {%
+ \makevalueexpandable
+ \global\expandafter\let\csname SET#1\endcsname=\relax
+ }%
+}
+
+% @value{foo} gets the text saved in variable foo.
+\def\value{\begingroup\makevalueexpandable\valuexxx}
+\def\valuexxx#1{\expandablevalue{#1}\endgroup}
+{
+ \catcode`\- = \active \catcode`\_ = \active
+ %
+ \gdef\makevalueexpandable{%
+ \let\value = \expandablevalue
+ % We don't want these characters active, ...
+ \catcode`\-=\other \catcode`\_=\other
+ % ..., but we might end up with active ones in the argument if
+ % we're called from @code, as @code{@value{foo-bar_}}, though.
+ % So \let them to their normal equivalents.
+ \let-\realdash \let_\normalunderscore
+ }
+}
+
+% We have this subroutine so that we can handle at least some @value's
+% properly in indexes (we call \makevalueexpandable in \indexdummies).
+% The command has to be fully expandable (if the variable is set), since
+% the result winds up in the index file. This means that if the
+% variable's value contains other Texinfo commands, it's almost certain
+% it will fail (although perhaps we could fix that with sufficient work
+% to do a one-level expansion on the result, instead of complete).
+%
+\def\expandablevalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {[No value for ``#1'']}%
+ \message{Variable `#1', used in @value, is not set.}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+% To get special treatment of `@end ifset,' call \makeond and the redefine.
+%
+\makecond{ifset}
+\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
+\def\doifset#1#2{%
+ {%
+ \makevalueexpandable
+ \let\next=\empty
+ \expandafter\ifx\csname SET#2\endcsname\relax
+ #1% If not set, redefine \next.
+ \fi
+ \expandafter
+ }\next
+}
+\def\ifsetfail{\doignore{ifset}}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+% The `\else' inside the `\doifset' parameter is a trick to reuse the
+% above code: if the variable is not set, do nothing, if it is set,
+% then redefine \next to \ifclearfail.
+%
+\makecond{ifclear}
+\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
+\def\ifclearfail{\doignore{ifclear}}
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory=\comment
+
+% @defininfoenclose.
+\let\definfoenclose=\comment
+
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within macros and \if's.
+\edef\newwrite{\makecsname{ptexnewwrite}}
+
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is foo.
+% The name of an index should be no more than 2 characters long
+% for the sake of vms.
+%
+\def\newindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
+ \noexpand\doindex{#1}}
+}
+
+% @defindex foo == \newindex{foo}
+%
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+%
+\def\defcodeindex{\parsearg\newcodeindex}
+%
+\def\newcodeindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{%
+ \noexpand\docodeindex{#1}}%
+}
+
+
+% @synindex foo bar makes index foo feed into index bar.
+% Do this instead of @defindex foo if you don't want it as a separate index.
+%
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+%
+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
+
+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
+% #3 the target index (bar).
+\def\dosynindex#1#2#3{%
+ % Only do \closeout if we haven't already done it, else we'll end up
+ % closing the target index.
+ \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+ % The \closeout helps reduce unnecessary open files; the limit on the
+ % Acorn RISC OS is a mere 16 files.
+ \expandafter\closeout\csname#2indfile\endcsname
+ \expandafter\let\csname\donesynindex#2\endcsname = 1
+ \fi
+ % redefine \fooindfile:
+ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
+ \expandafter\let\csname#2indfile\endcsname=\temp
+ % redefine \fooindex:
+ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
+}
+
+% Define \doindex, the driver for all \fooindex macros.
+% Argument #1 is generated by the calling \fooindex macro,
+% and it is "foo", the name of the index.
+
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
+
+% like the previous two, but they put @code around the argument.
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
+%
+\def\indexdummies{%
+ \escapechar = `\\ % use backslash in output files.
+ \def\@{@}% change to @@ when we switch to @ as escape char in index files.
+ \def\ {\realbackslash\space }%
+ % Need these in case \tex is in effect and \{ is a \delimiter again.
+ % But can't use \lbracecmd and \rbracecmd because texindex assumes
+ % braces and backslashes are used only as delimiters.
+ \let\{ = \mylbrace
+ \let\} = \myrbrace
+ %
+ % Do the redefinitions.
+ \commondummies
+}
+
+% For the aux and toc files, @ is the escape character. So we want to
+% redefine everything using @ as the escape character (instead of
+% \realbackslash, still used for index files). When everything uses @,
+% this will be simpler.
+%
+\def\atdummies{%
+ \def\@{@@}%
+ \def\ {@ }%
+ \let\{ = \lbraceatcmd
+ \let\} = \rbraceatcmd
+ %
+ % Do the redefinitions.
+ \commondummies
+ \otherbackslash
+}
+
+% Called from \indexdummies and \atdummies.
+%
+\def\commondummies{%
+ %
+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
+ % preventing its expansion. This is used only for control% words,
+ % not control letters, because the \space would be incorrect for
+ % control characters, but is needed to separate the control word
+ % from whatever follows.
+ %
+ % For control letters, we have \definedummyletter, which omits the
+ % space.
+ %
+ % These can be used both for control words that take an argument and
+ % those that do not. If it is followed by {arg} in the input, then
+ % that will dutifully get written to the index (or wherever).
+ %
+ \def\definedummyword ##1{\def##1{\string##1\space}}%
+ \def\definedummyletter##1{\def##1{\string##1}}%
+ \let\definedummyaccent\definedummyletter
+ %
+ \commondummiesnofonts
+ %
+ \definedummyletter\_%
+ %
+ % Non-English letters.
+ \definedummyword\AA
+ \definedummyword\AE
+ \definedummyword\L
+ \definedummyword\OE
+ \definedummyword\O
+ \definedummyword\aa
+ \definedummyword\ae
+ \definedummyword\l
+ \definedummyword\oe
+ \definedummyword\o
+ \definedummyword\ss
+ \definedummyword\exclamdown
+ \definedummyword\questiondown
+ \definedummyword\ordf
+ \definedummyword\ordm
+ %
+ % Although these internal commands shouldn't show up, sometimes they do.
+ \definedummyword\bf
+ \definedummyword\gtr
+ \definedummyword\hat
+ \definedummyword\less
+ \definedummyword\sf
+ \definedummyword\sl
+ \definedummyword\tclose
+ \definedummyword\tt
+ %
+ \definedummyword\LaTeX
+ \definedummyword\TeX
+ %
+ % Assorted special characters.
+ \definedummyword\bullet
+ \definedummyword\comma
+ \definedummyword\copyright
+ \definedummyword\registeredsymbol
+ \definedummyword\dots
+ \definedummyword\enddots
+ \definedummyword\equiv
+ \definedummyword\error
+ \definedummyword\euro
+ \definedummyword\expansion
+ \definedummyword\minus
+ \definedummyword\pounds
+ \definedummyword\point
+ \definedummyword\print
+ \definedummyword\result
+ %
+ % We want to disable all macros so that they are not expanded by \write.
+ \macrolist
+ %
+ \normalturnoffactive
+ %
+ % Handle some cases of @value -- where it does not contain any
+ % (non-fully-expandable) commands.
+ \makevalueexpandable
+}
+
+% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+%
+\def\commondummiesnofonts{%
+ % Control letters and accents.
+ \definedummyletter\!%
+ \definedummyaccent\"%
+ \definedummyaccent\'%
+ \definedummyletter\*%
+ \definedummyaccent\,%
+ \definedummyletter\.%
+ \definedummyletter\/%
+ \definedummyletter\:%
+ \definedummyaccent\=%
+ \definedummyletter\?%
+ \definedummyaccent\^%
+ \definedummyaccent\`%
+ \definedummyaccent\~%
+ \definedummyword\u
+ \definedummyword\v
+ \definedummyword\H
+ \definedummyword\dotaccent
+ \definedummyword\ringaccent
+ \definedummyword\tieaccent
+ \definedummyword\ubaraccent
+ \definedummyword\udotaccent
+ \definedummyword\dotless
+ %
+ % Texinfo font commands.
+ \definedummyword\b
+ \definedummyword\i
+ \definedummyword\r
+ \definedummyword\sc
+ \definedummyword\t
+ %
+ % Commands that take arguments.
+ \definedummyword\acronym
+ \definedummyword\cite
+ \definedummyword\code
+ \definedummyword\command
+ \definedummyword\dfn
+ \definedummyword\emph
+ \definedummyword\env
+ \definedummyword\file
+ \definedummyword\kbd
+ \definedummyword\key
+ \definedummyword\math
+ \definedummyword\option
+ \definedummyword\pxref
+ \definedummyword\ref
+ \definedummyword\samp
+ \definedummyword\strong
+ \definedummyword\tie
+ \definedummyword\uref
+ \definedummyword\url
+ \definedummyword\var
+ \definedummyword\verb
+ \definedummyword\w
+ \definedummyword\xref
+}
+
+% \indexnofonts is used when outputting the strings to sort the index
+% by, and when constructing control sequence names. It eliminates all
+% control sequences and just writes whatever the best ASCII sort string
+% would be for a given command (usually its argument).
+%
+\def\indexnofonts{%
+ % Accent commands should become @asis.
+ \def\definedummyaccent##1{\let##1\asis}%
+ % We can just ignore other control letters.
+ \def\definedummyletter##1{\let##1\empty}%
+ % Hopefully, all control words can become @asis.
+ \let\definedummyword\definedummyaccent
+ %
+ \commondummiesnofonts
+ %
+ % Don't no-op \tt, since it isn't a user-level command
+ % and is used in the definitions of the active chars like <, >, |, etc.
+ % Likewise with the other plain tex font commands.
+ %\let\tt=\asis
+ %
+ \def\ { }%
+ \def\@{@}%
+ % how to handle braces?
+ \def\_{\normalunderscore}%
+ %
+ % Non-English letters.
+ \def\AA{AA}%
+ \def\AE{AE}%
+ \def\L{L}%
+ \def\OE{OE}%
+ \def\O{O}%
+ \def\aa{aa}%
+ \def\ae{ae}%
+ \def\l{l}%
+ \def\oe{oe}%
+ \def\o{o}%
+ \def\ss{ss}%
+ \def\exclamdown{!}%
+ \def\questiondown{?}%
+ \def\ordf{a}%
+ \def\ordm{o}%
+ %
+ \def\LaTeX{LaTeX}%
+ \def\TeX{TeX}%
+ %
+ % Assorted special characters.
+ % (The following {} will end up in the sort string, but that's ok.)
+ \def\bullet{bullet}%
+ \def\comma{,}%
+ \def\copyright{copyright}%
+ \def\registeredsymbol{R}%
+ \def\dots{...}%
+ \def\enddots{...}%
+ \def\equiv{==}%
+ \def\error{error}%
+ \def\euro{euro}%
+ \def\expansion{==>}%
+ \def\minus{-}%
+ \def\pounds{pounds}%
+ \def\point{.}%
+ \def\print{-|}%
+ \def\result{=>}%
+ %
+ % We need to get rid of all macros, leaving only the arguments (if present).
+ % Of course this is not nearly correct, but it is the best we can do for now.
+ % makeinfo does not expand macros in the argument to @deffn, which ends up
+ % writing an index entry, and texindex isn't prepared for an index sort entry
+ % that starts with \.
+ %
+ % Since macro invocations are followed by braces, we can just redefine them
+ % to take a single TeX argument. The case of a macro invocation that
+ % goes to end-of-line is not handled.
+ %
+ \macrolist
+}
+
+\let\indexbackslash=0 %overridden during \printindex.
+\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
+
+% Most index entries go through here, but \dosubind is the general case.
+% #1 is the index name, #2 is the entry text.
+\def\doind#1#2{\dosubind{#1}{#2}{}}
+
+% Workhorse for all \fooindexes.
+% #1 is name of index, #2 is stuff to put there, #3 is subentry --
+% empty if called from \doind, as we usually are (the main exception
+% is with most defuns, which call us directly).
+%
+\def\dosubind#1#2#3{%
+ \iflinks
+ {%
+ % Store the main index entry text (including the third arg).
+ \toks0 = {#2}%
+ % If third arg is present, precede it with a space.
+ \def\thirdarg{#3}%
+ \ifx\thirdarg\empty \else
+ \toks0 = \expandafter{\the\toks0 \space #3}%
+ \fi
+ %
+ \edef\writeto{\csname#1indfile\endcsname}%
+ %
+ \ifvmode
+ \dosubindsanitize
+ \else
+ \dosubindwrite
+ \fi
+ }%
+ \fi
+}
+
+% Write the entry in \toks0 to the index file:
+%
+\def\dosubindwrite{%
+ % Put the index entry in the margin if desired.
+ \ifx\SETmarginindex\relax\else
+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
+ \fi
+ %
+ % Remember, we are within a group.
+ \indexdummies % Must do this here, since \bf, etc expand at this stage
+ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ % Process the index entry with all font commands turned off, to
+ % get the string to sort by.
+ {\indexnofonts
+ \edef\temp{\the\toks0}% need full expansion
+ \xdef\indexsorttmp{\temp}%
+ }%
+ %
+ % Set up the complete index entry, with both the sort key and
+ % the original text, including any font commands. We write
+ % three arguments to \entry to the .?? file (four in the
+ % subentry case), texindex reduces to two when writing the .??s
+ % sorted result.
+ \edef\temp{%
+ \write\writeto{%
+ \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+ }%
+ \temp
+}
+
+% Take care of unwanted page breaks:
+%
+% If a skip is the last thing on the list now, preserve it
+% by backing up by \lastskip, doing the \write, then inserting
+% the skip again. Otherwise, the whatsit generated by the
+% \write will make \lastskip zero. The result is that sequences
+% like this:
+% @end defun
+% @tindex whatever
+% @defun ...
+% will have extra space inserted, because the \medbreak in the
+% start of the @defun won't see the skip inserted by the @end of
+% the previous defun.
+%
+% But don't do any of this if we're not in vertical mode. We
+% don't want to do a \vskip and prematurely end a paragraph.
+%
+% Avoid page breaks due to these extra skips, too.
+%
+% But wait, there is a catch there:
+% We'll have to check whether \lastskip is zero skip. \ifdim is not
+% sufficient for this purpose, as it ignores stretch and shrink parts
+% of the skip. The only way seems to be to check the textual
+% representation of the skip.
+%
+% The following is almost like \def\zeroskipmacro{0.0pt} except that
+% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
+%
+\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
+%
+% ..., ready, GO:
+%
+\def\dosubindsanitize{%
+ % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
+ \skip0 = \lastskip
+ \edef\lastskipmacro{\the\lastskip}%
+ \count255 = \lastpenalty
+ %
+ % If \lastskip is nonzero, that means the last item was a
+ % skip. And since a skip is discardable, that means this
+ % -\skip0 glue we're inserting is preceded by a
+ % non-discardable item, therefore it is not a potential
+ % breakpoint, therefore no \nobreak needed.
+ \ifx\lastskipmacro\zeroskipmacro
+ \else
+ \vskip-\skip0
+ \fi
+ %
+ \dosubindwrite
+ %
+ \ifx\lastskipmacro\zeroskipmacro
+ % If \lastskip was zero, perhaps the last item was a penalty, and
+ % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
+ % to re-insert the same penalty (values >10000 are used for various
+ % signals); since we just inserted a non-discardable item, any
+ % following glue (such as a \parskip) would be a breakpoint. For example:
+ %
+ % @deffn deffn-whatever
+ % @vindex index-whatever
+ % Description.
+ % would allow a break between the index-whatever whatsit
+ % and the "Description." paragraph.
+ \ifnum\count255>9999 \penalty\count255 \fi
+ \else
+ % On the other hand, if we had a nonzero \lastskip,
+ % this make-up glue would be preceded by a non-discardable item
+ % (the whatsit from the \write), so we must insert a \nobreak.
+ \nobreak\vskip\skip0
+ \fi
+}
+
+% The index entry written in the file actually looks like
+% \entry {sortstring}{page}{topic}
+% or
+% \entry {sortstring}{page}{topic}{subtopic}
+% The texindex program reads in these files and writes files
+% containing these kinds of lines:
+% \initial {c}
+% before the first topic whose initial is c
+% \entry {topic}{pagelist}
+% for a topic that is used without subtopics
+% \primary {topic}
+% for the beginning of a topic that is used with subtopics
+% \secondary {subtopic}{pagelist}
+% for each subtopic.
+
+% Define the user-accessible indexing commands
+% @findex, @vindex, @kindex, @cindex.
+
+\def\findex {\fnindex}
+\def\kindex {\kyindex}
+\def\cindex {\cpindex}
+\def\vindex {\vrindex}
+\def\tindex {\tpindex}
+\def\pindex {\pgindex}
+
+\def\cindexsub {\begingroup\obeylines\cindexsub}
+{\obeylines %
+\gdef\cindexsub "#1" #2^^M{\endgroup %
+\dosubind{cp}{#2}{#1}}}
+
+% Define the macros used in formatting output of the sorted index material.
+
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
+\parseargdef\printindex{\begingroup
+ \dobreak \chapheadingskip{10000}%
+ %
+ \smallfonts \rm
+ \tolerance = 9500
+ \everypar = {}% don't want the \kern\-parindent from indentation suppression.
+ %
+ % See if the index file exists and is nonempty.
+ % Change catcode of @ here so that if the index file contains
+ % \initial {@}
+ % as its first line, TeX doesn't complain about mismatched braces
+ % (because it thinks @} is a control sequence).
+ \catcode`\@ = 11
+ \openin 1 \jobname.#1s
+ \ifeof 1
+ % \enddoublecolumns gets confused if there is no text in the index,
+ % and it loses the chapter title and the aux file entries for the
+ % index. The easiest way to prevent this problem is to make sure
+ % there is some text.
+ \putwordIndexNonexistent
+ \else
+ %
+ % If the index file exists but is empty, then \openin leaves \ifeof
+ % false. We have to make TeX try to read something from the file, so
+ % it can discover if there is anything in it.
+ \read 1 to \temp
+ \ifeof 1
+ \putwordIndexIsEmpty
+ \else
+ % Index files are almost Texinfo source, but we use \ as the escape
+ % character. It would be better to use @, but that's too big a change
+ % to make right now.
+ \def\indexbackslash{\backslashcurfont}%
+ \catcode`\\ = 0
+ \escapechar = `\\
+ \begindoublecolumns
+ \input \jobname.#1s
+ \enddoublecolumns
+ \fi
+ \fi
+ \closein 1
+\endgroup}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+\def\initial#1{{%
+ % Some minor font changes for the special characters.
+ \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+ %
+ % Remove any glue we may have, we'll be inserting our own.
+ \removelastskip
+ %
+ % We like breaks before the index initials, so insert a bonus.
+ \nobreak
+ \vskip 0pt plus 3\baselineskip
+ \penalty 0
+ \vskip 0pt plus -3\baselineskip
+ %
+ % Typeset the initial. Making this add up to a whole number of
+ % baselineskips increases the chance of the dots lining up from column
+ % to column. It still won't often be perfect, because of the stretch
+ % we need before each entry, but it's better.
+ %
+ % No shrink because it confuses \balancecolumns.
+ \vskip 1.67\baselineskip plus .5\baselineskip
+ \leftline{\secbf #1}%
+ % Do our best not to break after the initial.
+ \nobreak
+ \vskip .33\baselineskip plus .1\baselineskip
+}}
+
+% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
+% then page number (#2) flushed to the right margin. It is used for index
+% and table of contents entries. The paragraph is indented by \leftskip.
+%
+% A straightforward implementation would start like this:
+% \def\entry#1#2{...
+% But this frozes the catcodes in the argument, and can cause problems to
+% @code, which sets - active. This problem was fixed by a kludge---
+% ``-'' was active throughout whole index, but this isn't really right.
+%
+% The right solution is to prevent \entry from swallowing the whole text.
+% --kasal, 21nov03
+\def\entry{%
+ \begingroup
+ %
+ % Start a new paragraph if necessary, so our assignments below can't
+ % affect previous text.
+ \par
+ %
+ % Do not fill out the last line with white space.
+ \parfillskip = 0in
+ %
+ % No extra space above this paragraph.
+ \parskip = 0in
+ %
+ % Do not prefer a separate line ending with a hyphen to fewer lines.
+ \finalhyphendemerits = 0
+ %
+ % \hangindent is only relevant when the entry text and page number
+ % don't both fit on one line. In that case, bob suggests starting the
+ % dots pretty far over on the line. Unfortunately, a large
+ % indentation looks wrong when the entry text itself is broken across
+ % lines. So we use a small indentation and put up with long leaders.
+ %
+ % \hangafter is reset to 1 (which is the value we want) at the start
+ % of each paragraph, so we need not do anything with that.
+ \hangindent = 2em
+ %
+ % When the entry text needs to be broken, just fill out the first line
+ % with blank space.
+ \rightskip = 0pt plus1fil
+ %
+ % A bit of stretch before each entry for the benefit of balancing
+ % columns.
+ \vskip 0pt plus1pt
+ %
+ % Swallow the left brace of the text (first parameter):
+ \afterassignment\doentry
+ \let\temp =
+}
+\def\doentry{%
+ \bgroup % Instead of the swallowed brace.
+ \noindent
+ \aftergroup\finishentry
+ % And now comes the text of the entry.
+}
+\def\finishentry#1{%
+ % #1 is the page number.
+ %
+ % The following is kludged to not output a line of dots in the index if
+ % there are no page numbers. The next person who breaks this will be
+ % cursed by a Unix daemon.
+ \def\tempa{{\rm }}%
+ \def\tempb{#1}%
+ \edef\tempc{\tempa}%
+ \edef\tempd{\tempb}%
+ \ifx\tempc\tempd
+ \ %
+ \else
+ %
+ % If we must, put the page number on a line of its own, and fill out
+ % this line with blank space. (The \hfil is overwhelmed with the
+ % fill leaders glue in \indexdotfill if the page number does fit.)
+ \hfil\penalty50
+ \null\nobreak\indexdotfill % Have leaders before the page number.
+ %
+ % The `\ ' here is removed by the implicit \unskip that TeX does as
+ % part of (the primitive) \par. Without it, a spurious underfull
+ % \hbox ensues.
+ \ifpdf
+ \pdfgettoks#1.%
+ \ \the\toksA
+ \else
+ \ #1%
+ \fi
+ \fi
+ \par
+ \endgroup
+}
+
+% Like \dotfill except takes at least 1 em.
+\def\indexdotfill{\cleaders
+ \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
+
+\def\primary #1{\line{#1\hfil}}
+
+\newskip\secondaryindent \secondaryindent=0.5cm
+\def\secondary#1#2{{%
+ \parfillskip=0in
+ \parskip=0in
+ \hangindent=1in
+ \hangafter=1
+ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
+ \ifpdf
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \else
+ #2
+ \fi
+ \par
+}}
+
+% Define two-column mode, which we use to typeset indexes.
+% Adapted from the TeXbook, page 416, which is to say,
+% the manmac.tex format used to print the TeXbook itself.
+\catcode`\@=11
+
+\newbox\partialpage
+\newdimen\doublecolumnhsize
+
+\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+ % Grab any single-column material above us.
+ \output = {%
+ %
+ % Here is a possibility not foreseen in manmac: if we accumulate a
+ % whole lot of material, we might end up calling this \output
+ % routine twice in a row (see the doublecol-lose test, which is
+ % essentially a couple of indexes with @setchapternewpage off). In
+ % that case we just ship out what is in \partialpage with the normal
+ % output routine. Generally, \partialpage will be empty when this
+ % runs and this will be a no-op. See the indexspread.tex test case.
+ \ifvoid\partialpage \else
+ \onepageout{\pagecontents\partialpage}%
+ \fi
+ %
+ \global\setbox\partialpage = \vbox{%
+ % Unvbox the main output page.
+ \unvbox\PAGE
+ \kern-\topskip \kern\baselineskip
+ }%
+ }%
+ \eject % run that output routine to set \partialpage
+ %
+ % Use the double-column output routine for subsequent pages.
+ \output = {\doublecolumnout}%
+ %
+ % Change the page size parameters. We could do this once outside this
+ % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
+ % format, but then we repeat the same computation. Repeating a couple
+ % of assignments once per index is clearly meaningless for the
+ % execution time, so we may as well do it in one place.
+ %
+ % First we halve the line length, less a little for the gutter between
+ % the columns. We compute the gutter based on the line length, so it
+ % changes automatically with the paper format. The magic constant
+ % below is chosen so that the gutter has the same value (well, +-<1pt)
+ % as it did when we hard-coded it.
+ %
+ % We put the result in a separate register, \doublecolumhsize, so we
+ % can restore it in \pagesofar, after \hsize itself has (potentially)
+ % been clobbered.
+ %
+ \doublecolumnhsize = \hsize
+ \advance\doublecolumnhsize by -.04154\hsize
+ \divide\doublecolumnhsize by 2
+ \hsize = \doublecolumnhsize
+ %
+ % Double the \vsize as well. (We don't need a separate register here,
+ % since nobody clobbers \vsize.)
+ \vsize = 2\vsize
+}
+
+% The double-column output routine for all double-column pages except
+% the last.
+%
+\def\doublecolumnout{%
+ \splittopskip=\topskip \splitmaxdepth=\maxdepth
+ % Get the available space for the double columns -- the normal
+ % (undoubled) page height minus any material left over from the
+ % previous page.
+ \dimen@ = \vsize
+ \divide\dimen@ by 2
+ \advance\dimen@ by -\ht\partialpage
+ %
+ % box0 will be the left-hand column, box2 the right.
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar
+ \unvbox255
+ \penalty\outputpenalty
+}
+%
+% Re-output the contents of the output page -- any previous material,
+% followed by the two boxes we just split, in box0 and box2.
+\def\pagesofar{%
+ \unvbox\partialpage
+ %
+ \hsize = \doublecolumnhsize
+ \wd0=\hsize \wd2=\hsize
+ \hbox to\pagewidth{\box0\hfil\box2}%
+}
+%
+% All done with double columns.
+\def\enddoublecolumns{%
+ \output = {%
+ % Split the last of the double-column material. Leave it on the
+ % current page, no automatic page break.
+ \balancecolumns
+ %
+ % If we end up splitting too much material for the current page,
+ % though, there will be another page break right after this \output
+ % invocation ends. Having called \balancecolumns once, we do not
+ % want to call it again. Therefore, reset \output to its normal
+ % definition right away. (We hope \balancecolumns will never be
+ % called on to balance too much material, but if it is, this makes
+ % the output somewhat more palatable.)
+ \global\output = {\onepageout{\pagecontents\PAGE}}%
+ }%
+ \eject
+ \endgroup % started in \begindoublecolumns
+ %
+ % \pagegoal was set to the doubled \vsize above, since we restarted
+ % the current page. We're now back to normal single-column
+ % typesetting, so reset \pagegoal to the normal \vsize (after the
+ % \endgroup where \vsize got restored).
+ \pagegoal = \vsize
+}
+%
+% Called at the end of the double column material.
+\def\balancecolumns{%
+ \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+ \dimen@ = \ht0
+ \advance\dimen@ by \topskip
+ \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by 2 % target to split to
+ %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
+ \splittopskip = \topskip
+ % Loop until we get a decent breakpoint.
+ {%
+ \vbadness = 10000
+ \loop
+ \global\setbox3 = \copy0
+ \global\setbox1 = \vsplit3 to \dimen@
+ \ifdim\ht3>\dimen@
+ \global\advance\dimen@ by 1pt
+ \repeat
+ }%
+ %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
+ %
+ \pagesofar
+}
+\catcode`\@ = \other
+
+
+\message{sectioning,}
+% Chapters, sections, etc.
+
+% \unnumberedno is an oxymoron, of course. But we count the unnumbered
+% sections so that we can refer to them unambiguously in the pdf
+% outlines by their "section number". We avoid collisions with chapter
+% numbers by starting them at 10000. (If a document ever has 10000
+% chapters, we're in trouble anyway, I'm sure.)
+\newcount\unnumberedno \unnumberedno = 10000
+\newcount\chapno
+\newcount\secno \secno=0
+\newcount\subsecno \subsecno=0
+\newcount\subsubsecno \subsubsecno=0
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount\appendixno \appendixno = `\@
+%
+% \def\appendixletter{\char\the\appendixno}
+% We do the following ugly conditional instead of the above simple
+% construct for the sake of pdftex, which needs the actual
+% letter in the expansion, not just typeset.
+%
+\def\appendixletter{%
+ \ifnum\appendixno=`A A%
+ \else\ifnum\appendixno=`B B%
+ \else\ifnum\appendixno=`C C%
+ \else\ifnum\appendixno=`D D%
+ \else\ifnum\appendixno=`E E%
+ \else\ifnum\appendixno=`F F%
+ \else\ifnum\appendixno=`G G%
+ \else\ifnum\appendixno=`H H%
+ \else\ifnum\appendixno=`I I%
+ \else\ifnum\appendixno=`J J%
+ \else\ifnum\appendixno=`K K%
+ \else\ifnum\appendixno=`L L%
+ \else\ifnum\appendixno=`M M%
+ \else\ifnum\appendixno=`N N%
+ \else\ifnum\appendixno=`O O%
+ \else\ifnum\appendixno=`P P%
+ \else\ifnum\appendixno=`Q Q%
+ \else\ifnum\appendixno=`R R%
+ \else\ifnum\appendixno=`S S%
+ \else\ifnum\appendixno=`T T%
+ \else\ifnum\appendixno=`U U%
+ \else\ifnum\appendixno=`V V%
+ \else\ifnum\appendixno=`W W%
+ \else\ifnum\appendixno=`X X%
+ \else\ifnum\appendixno=`Y Y%
+ \else\ifnum\appendixno=`Z Z%
+ % The \the is necessary, despite appearances, because \appendixletter is
+ % expanded while writing the .toc file. \char\appendixno is not
+ % expandable, thus it is written literally, thus all appendixes come out
+ % with the same letter (or @) in the toc without it.
+ \else\char\the\appendixno
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+% Each @chapter defines this as the name of the chapter.
+% page headings and footings can use it. @section does likewise.
+% However, they are not reliable, because we don't use marks.
+\def\thischapter{}
+\def\thissection{}
+
+\newcount\absseclevel % used to calculate proper heading level
+\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
+
+% @raisesections: treat @section as chapter, @subsection as section, etc.
+\def\raisesections{\global\advance\secbase by -1}
+\let\up=\raisesections % original BFox name
+
+% @lowersections: treat @chapter as section, @section as subsection, etc.
+\def\lowersections{\global\advance\secbase by 1}
+\let\down=\lowersections % original BFox name
+
+% we only have subsub.
+\chardef\maxseclevel = 3
+%
+% A numbered section within an unnumbered changes to unnumbered too.
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unmlevel = \maxseclevel
+%
+% Trace whether the current chapter is an appendix or not:
+% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
+\def\chapheadtype{N}
+
+% Choose a heading macro
+% #1 is heading type
+% #2 is heading level
+% #3 is text for heading
+\def\genhead#1#2#3{%
+ % Compute the abs. sec. level:
+ \absseclevel=#2
+ \advance\absseclevel by \secbase
+ % Make sure \absseclevel doesn't fall outside the range:
+ \ifnum \absseclevel < 0
+ \absseclevel = 0
+ \else
+ \ifnum \absseclevel > 3
+ \absseclevel = 3
+ \fi
+ \fi
+ % The heading type:
+ \def\headtype{#1}%
+ \if \headtype U%
+ \ifnum \absseclevel < \unmlevel
+ \chardef\unmlevel = \absseclevel
+ \fi
+ \else
+ % Check for appendix sections:
+ \ifnum \absseclevel = 0
+ \edef\chapheadtype{\headtype}%
+ \else
+ \if \headtype A\if \chapheadtype N%
+ \errmessage{@appendix... within a non-appendix chapter}%
+ \fi\fi
+ \fi
+ % Check for numbered within unnumbered:
+ \ifnum \absseclevel > \unmlevel
+ \def\headtype{U}%
+ \else
+ \chardef\unmlevel = 3
+ \fi
+ \fi
+ % Now print the heading:
+ \if \headtype U%
+ \ifcase\absseclevel
+ \unnumberedzzz{#3}%
+ \or \unnumberedseczzz{#3}%
+ \or \unnumberedsubseczzz{#3}%
+ \or \unnumberedsubsubseczzz{#3}%
+ \fi
+ \else
+ \if \headtype A%
+ \ifcase\absseclevel
+ \appendixzzz{#3}%
+ \or \appendixsectionzzz{#3}%
+ \or \appendixsubseczzz{#3}%
+ \or \appendixsubsubseczzz{#3}%
+ \fi
+ \else
+ \ifcase\absseclevel
+ \chapterzzz{#3}%
+ \or \seczzz{#3}%
+ \or \numberedsubseczzz{#3}%
+ \or \numberedsubsubseczzz{#3}%
+ \fi
+ \fi
+ \fi
+ \suppressfirstparagraphindent
+}
+
+% an interface:
+\def\numhead{\genhead N}
+\def\apphead{\genhead A}
+\def\unnmhead{\genhead U}
+
+% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
+% all lower-level sectioning counters to zero.
+%
+% Also set \chaplevelprefix, which we prepend to @float sequence numbers
+% (e.g., figures), q.v. By default (before any chapter), that is empty.
+\let\chaplevelprefix = \empty
+%
+\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
+\def\chapterzzz#1{%
+ % section resetting is \global in case the chapter is in a group, such
+ % as an @include file.
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\chapno by 1
+ %
+ % Used for \float.
+ \gdef\chaplevelprefix{\the\chapno.}%
+ \resetallfloatnos
+ %
+ \message{\putwordChapter\space \the\chapno}%
+ %
+ % Write the actual heading.
+ \chapmacro{#1}{Ynumbered}{\the\chapno}%
+ %
+ % So @section and the like are numbered underneath this chapter.
+ \global\let\section = \numberedsec
+ \global\let\subsection = \numberedsubsec
+ \global\let\subsubsection = \numberedsubsubsec
+}
+
+\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\def\appendixzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\appendixno by 1
+ \gdef\chaplevelprefix{\appendixletter.}%
+ \resetallfloatnos
+ %
+ \def\appendixnum{\putwordAppendix\space \appendixletter}%
+ \message{\appendixnum}%
+ %
+ \chapmacro{#1}{Yappendix}{\appendixletter}%
+ %
+ \global\let\section = \appendixsec
+ \global\let\subsection = \appendixsubsec
+ \global\let\subsubsection = \appendixsubsubsec
+}
+
+\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+\def\unnumberedzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\unnumberedno by 1
+ %
+ % Since an unnumbered has no number, no prefix for figures.
+ \global\let\chaplevelprefix = \empty
+ \resetallfloatnos
+ %
+ % This used to be simply \message{#1}, but TeX fully expands the
+ % argument to \message. Therefore, if #1 contained @-commands, TeX
+ % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
+ % expanded @cite (which turns out to cause errors because \cite is meant
+ % to be executed, not expanded).
+ %
+ % Anyway, we don't want the fully-expanded definition of @cite to appear
+ % as a result of the \message, we just want `@cite' itself. We use
+ % \the<toks register> to achieve this: TeX expands \the<toks> only once,
+ % simply yielding the contents of <toks register>. (We also do this for
+ % the toc entries.)
+ \toks0 = {#1}%
+ \message{(\the\toks0)}%
+ %
+ \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
+ %
+ \global\let\section = \unnumberedsec
+ \global\let\subsection = \unnumberedsubsec
+ \global\let\subsubsection = \unnumberedsubsubsec
+}
+
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\parseargdef\centerchap{%
+ % Well, we could do the following in a group, but that would break
+ % an assumption that \chapmacro is called at the outermost level.
+ % Thus we are safer this way: --kasal, 24feb04
+ \let\centerparametersmaybe = \centerparameters
+ \unnmhead0{#1}%
+ \let\centerparametersmaybe = \relax
+}
+
+% @top is like @unnumbered.
+\let\top\unnumbered
+
+% Sections.
+\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
+\def\seczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
+}
+
+\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
+\def\appendixsectionzzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
+}
+\let\appendixsec\appendixsection
+
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
+\def\unnumberedseczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
+}
+
+% Subsections.
+\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
+\def\numberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
+\def\appendixsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+\def\unnumberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno}%
+}
+
+% Subsubsections.
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
+\def\numberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynumbered}%
+ {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
+\def\appendixsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+\def\unnumberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+% These macros control what the section commands do, according
+% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
+% Define them by default for a numbered chapter.
+\let\section = \numberedsec
+\let\subsection = \numberedsubsec
+\let\subsubsection = \numberedsubsubsec
+
+% Define @majorheading, @heading and @subheading
+
+% NOTE on use of \vbox for chapter headings, section headings, and such:
+% 1) We use \vbox rather than the earlier \line to permit
+% overlong headings to fold.
+% 2) \hyphenpenalty is set to 10000 because hyphenation in a
+% heading is obnoxious; this forbids it.
+% 3) Likewise, headings look best if no \parindent is used, and
+% if justification is not attempted. Hence \raggedright.
+
+
+\def\majorheading{%
+ {\advance\chapheadingskip by 10pt \chapbreak }%
+ \parsearg\chapheadingzzz
+}
+
+\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
+\def\chapheadingzzz#1{%
+ {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}%
+ \bigskip \par\penalty 200\relax
+ \suppressfirstparagraphindent
+}
+
+% @heading, @subheading, @subsubheading.
+\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+
+% These macros generate a chapter, section, etc. heading only
+% (including whitespace, linebreaking, etc. around it),
+% given all the information in convenient, parsed form.
+
+%%% Args are the skip and penalty (usually negative)
+\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+
+%%% Define plain chapter starts, and page on/off switching for it
+% Parameter controlling skip before chapter headings (if needed)
+
+\newskip\chapheadingskip
+
+\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+\def\chappager{\par\vfill\supereject}
+\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
+
+\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+
+\def\CHAPPAGoff{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager
+\global\def\HEADINGSon{\HEADINGSsingle}}
+
+\def\CHAPPAGodd{%
+\global\let\contentsalignmacro = \chapoddpage
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage
+\global\def\HEADINGSon{\HEADINGSdouble}}
+
+\CHAPPAGon
+
+% Chapter opening.
+%
+% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
+% Yappendix, Yomitfromtoc), #3 the chapter number.
+%
+% To test against our argument.
+\def\Ynothingkeyword{Ynothing}
+\def\Yomitfromtockeyword{Yomitfromtoc}
+\def\Yappendixkeyword{Yappendix}
+%
+\def\chapmacro#1#2#3{%
+ \pchapsepmacro
+ {%
+ \chapfonts \rm
+ %
+ % Have to define \thissection before calling \donoderef, because the
+ % xref code eventually uses it. On the other hand, it has to be called
+ % after \pchapsepmacro, or the headline will change too soon.
+ \gdef\thissection{#1}%
+ \gdef\thischaptername{#1}%
+ %
+ % Only insert the separating space if we have a chapter/appendix
+ % number, and don't print the unnumbered ``number''.
+ \def\temptype{#2}%
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unnchap}%
+ \gdef\thischapter{#1}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
+ \def\toctype{omit}%
+ \gdef\thischapter{}%
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
+ \def\toctype{app}%
+ % We don't substitute the actual chapter name into \thischapter
+ % because we don't want its macros evaluated now. And we don't
+ % use \thissection because that changes with each section.
+ %
+ \xdef\thischapter{\putwordAppendix{} \appendixletter:
+ \noexpand\thischaptername}%
+ \else
+ \setbox0 = \hbox{#3\enspace}%
+ \def\toctype{numchap}%
+ \xdef\thischapter{\putwordChapter{} \the\chapno:
+ \noexpand\thischaptername}%
+ \fi\fi\fi
+ %
+ % Write the toc entry for this chapter. Must come before the
+ % \donoderef, because we include the current node name in the toc
+ % entry, and \donoderef resets it to empty.
+ \writetocentry{\toctype}{#1}{#3}%
+ %
+ % For pdftex, we have to write out the node definition (aka, make
+ % the pdfdest) after any page break, but before the actual text has
+ % been typeset. If the destination for the pdf outline is after the
+ % text, then jumping from the outline may wind up with the text not
+ % being visible, for instance under high magnification.
+ \donoderef{#2}%
+ %
+ % Typeset the actual heading.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent=\wd0 \centerparametersmaybe
+ \unhbox0 #1\par}%
+ }%
+ \nobreak\bigskip % no page break after a chapter title
+ \nobreak
+}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerparameters{%
+ \advance\rightskip by 3\rightskip
+ \leftskip = \rightskip
+ \parfillskip = 0pt
+}
+
+
+% I don't think this chapter style is supported any more, so I'm not
+% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
+%
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+%
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\nobreak
+}
+\def\chfopen #1#2{\chapoddpage {\chapfonts
+\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
+\par\penalty 5000 %
+}
+\def\centerchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt
+ \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
+}
+\def\CHAPFopen{%
+ \global\let\chapmacro=\chfopen
+ \global\let\centerchapmacro=\centerchfopen}
+
+
+% Section titles. These macros combine the section number parts and
+% call the generic \sectionheading to do the printing.
+%
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
+
+% Subsection titles.
+\newskip\subsecheadingskip
+\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
+
+% Subsubsection titles.
+\def\subsubsecheadingskip{\subsecheadingskip}
+\def\subsubsecheadingbreak{\subsecheadingbreak}
+
+
+% Print any size, any type, section title.
+%
+% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
+% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
+% section number.
+%
+\def\sectionheading#1#2#3#4{%
+ {%
+ % Switch to the right set of fonts.
+ \csname #2fonts\endcsname \rm
+ %
+ % Insert space above the heading.
+ \csname #2headingbreak\endcsname
+ %
+ % Only insert the space after the number if we have a section number.
+ \def\sectionlevel{#2}%
+ \def\temptype{#3}%
+ %
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unn}%
+ \gdef\thissection{#1}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ % for @headings -- no section number, don't include in toc,
+ % and don't redefine \thissection.
+ \setbox0 = \hbox{}%
+ \def\toctype{omit}%
+ \let\sectionlevel=\empty
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{app}%
+ \gdef\thissection{#1}%
+ \else
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{num}%
+ \gdef\thissection{#1}%
+ \fi\fi\fi
+ %
+ % Write the toc entry (before \donoderef). See comments in \chapmacro.
+ \writetocentry{\toctype\sectionlevel}{#1}{#4}%
+ %
+ % Write the node reference (= pdf destination for pdftex).
+ % Again, see comments in \chapmacro.
+ \donoderef{#3}%
+ %
+ % Interline glue will be inserted when the vbox is completed.
+ % That glue will be a valid breakpoint for the page, since it'll be
+ % preceded by a whatsit (usually from the \donoderef, or from the
+ % \writetocentry if there was no node). We don't want to allow that
+ % break, since then the whatsits could end up on page n while the
+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
+ \nobreak
+ %
+ % Output the actual section heading.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent=\wd0 % zero if no section number
+ \unhbox0 #1}%
+ }%
+ % Add extra space after the heading -- half of whatever came above it.
+ % Don't allow stretch, though.
+ \kern .5 \csname #2headingskip\endcsname
+ %
+ % Do not let the kern be a potential breakpoint, as it would be if it
+ % was followed by glue.
+ \nobreak
+ %
+ % We'll almost certainly start a paragraph next, so don't let that
+ % glue accumulate. (Not a breakpoint because it's preceded by a
+ % discardable item.)
+ \vskip-\parskip
+ %
+ % This is purely so the last item on the list is a known \penalty >
+ % 10000. This is so \startdefun can avoid allowing breakpoints after
+ % section headings. Otherwise, it would insert a valid breakpoint between:
+ %
+ % @section sec-whatever
+ % @deffn def-whatever
+ \penalty 10001
+}
+
+
+\message{toc,}
+% Table of contents.
+\newwrite\tocfile
+
+% Write an entry to the toc file, opening it if necessary.
+% Called from @chapter, etc.
+%
+% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
+% We append the current node name (if any) and page number as additional
+% arguments for the \{chap,sec,...}entry macros which will eventually
+% read this. The node name is used in the pdf outlines as the
+% destination to jump to.
+%
+% We open the .toc file for writing here instead of at @setfilename (or
+% any other fixed time) so that @contents can be anywhere in the document.
+% But if #1 is `omit', then we don't do anything. This is used for the
+% table of contents chapter openings themselves.
+%
+\newif\iftocfileopened
+\def\omitkeyword{omit}%
+%
+\def\writetocentry#1#2#3{%
+ \edef\writetoctype{#1}%
+ \ifx\writetoctype\omitkeyword \else
+ \iftocfileopened\else
+ \immediate\openout\tocfile = \jobname.toc
+ \global\tocfileopenedtrue
+ \fi
+ %
+ \iflinks
+ {\atdummies
+ \edef\temp{%
+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
+ \temp
+ }%
+ \fi
+ \fi
+ %
+ % Tell \shipout to create a pdf destination on each page, if we're
+ % writing pdf. These are used in the table of contents. We can't
+ % just write one on every page because the title pages are numbered
+ % 1 and 2 (the page numbers aren't printed), and so are the first
+ % two pages of the document. Thus, we'd have two destinations named
+ % `1', and two named `2'.
+ \ifpdf \global\pdfmakepagedesttrue \fi
+}
+
+
+% These characters do not print properly in the Computer Modern roman
+% fonts, so we must take special care. This is more or less redundant
+% with the Texinfo input format setup at the end of this file.
+%
+\def\activecatcodes{%
+ \catcode`\"=\active
+ \catcode`\$=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \catcode`\\=\active
+ \catcode`\^=\active
+ \catcode`\_=\active
+ \catcode`\|=\active
+ \catcode`\~=\active
+}
+
+
+% Read the toc file, which is essentially Texinfo input.
+\def\readtocfile{%
+ \setupdatafile
+ \activecatcodes
+ \input \jobname.toc
+}
+
+\newskip\contentsrightmargin \contentsrightmargin=1in
+\newcount\savepageno
+\newcount\lastnegativepageno \lastnegativepageno = -1
+
+% Prepare to read what we've written to \tocfile.
+%
+\def\startcontents#1{%
+ % If @setchapternewpage on, and @headings double, the contents should
+ % start on an odd page, unlike chapters. Thus, we maintain
+ % \contentsalignmacro in parallel with \pagealignmacro.
+ % From: Torbjorn Granlund <tege@matematik.su.se>
+ \contentsalignmacro
+ \immediate\closeout\tocfile
+ %
+ % Don't need to put `Contents' or `Short Contents' in the headline.
+ % It is abundantly clear what they are.
+ \def\thischapter{}%
+ \chapmacro{#1}{Yomitfromtoc}{}%
+ %
+ \savepageno = \pageno
+ \begingroup % Set up to handle contents files properly.
+ \raggedbottom % Worry more about breakpoints than the bottom.
+ \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+ %
+ % Roman numerals for page numbers.
+ \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
+}
+
+
+% Normal (long) toc.
+\def\contents{%
+ \startcontents{\putwordTOC}%
+ \openin 1 \jobname.toc
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \ifeof 1 \else
+ \pdfmakeoutlines
+ \fi
+ \closein 1
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+
+% And just the chapters.
+\def\summarycontents{%
+ \startcontents{\putwordShortTOC}%
+ %
+ \let\numchapentry = \shortchapentry
+ \let\appentry = \shortchapentry
+ \let\unnchapentry = \shortunnchapentry
+ % We want a true roman here for the page numbers.
+ \secfonts
+ \let\rm=\shortcontrm \let\bf=\shortcontbf
+ \let\sl=\shortcontsl \let\tt=\shortconttt
+ \rm
+ \hyphenpenalty = 10000
+ \advance\baselineskip by 1pt % Open it up a little.
+ \def\numsecentry##1##2##3##4{}
+ \let\appsecentry = \numsecentry
+ \let\unnsecentry = \numsecentry
+ \let\numsubsecentry = \numsecentry
+ \let\appsubsecentry = \numsecentry
+ \let\unnsubsecentry = \numsecentry
+ \let\numsubsubsecentry = \numsecentry
+ \let\appsubsubsecentry = \numsecentry
+ \let\unnsubsubsecentry = \numsecentry
+ \openin 1 \jobname.toc
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \closein 1
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+\let\shortcontents = \summarycontents
+
+% Typeset the label for a chapter or appendix for the short contents.
+% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
+%
+\def\shortchaplabel#1{%
+ % This space should be enough, since a single number is .5em, and the
+ % widest letter (M) is 1em, at least in the Computer Modern fonts.
+ % But use \hss just in case.
+ % (This space doesn't include the extra space that gets added after
+ % the label; that gets put in by \shortchapentry above.)
+ %
+ % We'd like to right-justify chapter numbers, but that looks strange
+ % with appendix letters. And right-justifying numbers and
+ % left-justifying letters looks strange when there is less than 10
+ % chapters. Have to read the whole toc once to know how many chapters
+ % there are before deciding ...
+ \hbox to 1em{#1\hss}%
+}
+
+% These macros generate individual entries in the table of contents.
+% The first argument is the chapter or section name.
+% The last argument is the page number.
+% The arguments in between are the chapter number, section number, ...
+
+% Chapters, in the main contents.
+\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
+%
+% Chapters, in the short toc.
+% See comments in \dochapentry re vbox and related settings.
+\def\shortchapentry#1#2#3#4{%
+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
+}
+
+% Appendices, in the main contents.
+% Need the word Appendix, and a fixed-size box.
+%
+\def\appendixbox#1{%
+ % We use M since it's probably the widest letter.
+ \setbox0 = \hbox{\putwordAppendix{} M}%
+ \hbox to \wd0{\putwordAppendix{} #1\hss}}
+%
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+
+% Unnumbered chapters.
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
+
+% Sections.
+\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
+\let\appsecentry=\numsecentry
+\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
+
+% Subsections.
+\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsecentry=\numsubsecentry
+\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
+
+% And subsubsections.
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsubsecentry=\numsubsubsecentry
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
+
+% This parameter controls the indentation of the various levels.
+% Same as \defaultparindent.
+\newdimen\tocindent \tocindent = 15pt
+
+% Now for the actual typesetting. In all these, #1 is the text and #2 is the
+% page number.
+%
+% If the toc has to be broken over pages, we want it to be at chapters
+% if at all possible; hence the \penalty.
+\def\dochapentry#1#2{%
+ \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+ \begingroup
+ \chapentryfonts
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \endgroup
+ \nobreak\vskip .25\baselineskip plus.1\baselineskip
+}
+
+\def\dosecentry#1#2{\begingroup
+ \secentryfonts \leftskip=\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsecentry#1#2{\begingroup
+ \subsecentryfonts \leftskip=2\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsubsecentry#1#2{\begingroup
+ \subsubsecentryfonts \leftskip=3\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+% We use the same \entry macro as for the index entries.
+\let\tocentry = \entry
+
+% Space between chapter (or whatever) number and the title.
+\def\labelspace{\hskip1em \relax}
+
+\def\dopageno#1{{\rm #1}}
+\def\doshortpageno#1{{\rm #1}}
+
+\def\chapentryfonts{\secfonts \rm}
+\def\secentryfonts{\textfonts}
+\def\subsecentryfonts{\textfonts}
+\def\subsubsecentryfonts{\textfonts}
+
+
+\message{environments,}
+% @foo ... @end foo.
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, it should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{%
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
+% @tex ... @end tex escapes into raw Tex temporarily.
+% One exception: @ is still an escape character, so that @end tex works.
+% But \@ or @@ will get a plain tex @ character.
+
+\envdef\tex{%
+ \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+ \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
+ \catcode `\%=14
+ \catcode `\+=\other
+ \catcode `\"=\other
+ \catcode `\|=\other
+ \catcode `\<=\other
+ \catcode `\>=\other
+ \escapechar=`\\
+ %
+ \let\b=\ptexb
+ \let\bullet=\ptexbullet
+ \let\c=\ptexc
+ \let\,=\ptexcomma
+ \let\.=\ptexdot
+ \let\dots=\ptexdots
+ \let\equiv=\ptexequiv
+ \let\!=\ptexexclam
+ \let\i=\ptexi
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \let\{=\ptexlbrace
+ \let\+=\tabalign
+ \let\}=\ptexrbrace
+ \let\/=\ptexslash
+ \let\*=\ptexstar
+ \let\t=\ptext
+ \let\frenchspacing=\plainfrenchspacing
+ %
+ \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+ \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
+ \def\@{@}%
+}
+% There is no need to define \Etex.
+
+% Define @lisp ... @end lisp.
+% @lisp environment forms a group so it can rebind things,
+% including the definition of @end lisp (which normally is erroneous).
+
+% Amount to narrow the margins by for @lisp.
+\newskip\lispnarrowing \lispnarrowing=0.4in
+
+% This is the definition that ^^M gets inside @lisp, @example, and other
+% such environments. \null is better than a space, since it doesn't
+% have any width.
+\def\lisppar{\null\endgraf}
+
+% This space is always present above and below environments.
+\newskip\envskipamount \envskipamount = 0pt
+
+% Make spacing and below environment symmetrical. We use \parskip here
+% to help in doing that, since in @example-like environments \parskip
+% is reset to zero; thus the \afterenvbreak inserts no space -- but the
+% start of the next paragraph will insert \parskip.
+%
+\def\aboveenvbreak{{%
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
+ \ifnum \lastpenalty=10000 \else
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
+ % it's not a good place to break if the last penalty was \nobreak
+ % or better ...
+ \ifnum\lastpenalty<10000 \penalty-50 \fi
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
+
+\let\afterenvbreak = \aboveenvbreak
+
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
+% also clear it, so that its embedded environments do the narrowing again.
+\let\nonarrowing=\relax
+
+% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
+% environment contents.
+\font\circle=lcircle10
+\newdimen\circthick
+\newdimen\cartouter\newdimen\cartinner
+\newskip\normbskip\newskip\normpskip\newskip\normlskip
+\circthick=\fontdimen8\circle
+%
+\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
+\def\ctr{{\hskip 6pt\circle\char'010}}
+\def\cbl{{\circle\char'012\hskip -6pt}}
+\def\cbr{{\hskip 6pt\circle\char'011}}
+\def\carttop{\hbox to \cartouter{\hskip\lskip
+ \ctl\leaders\hrule height\circthick\hfil\ctr
+ \hskip\rskip}}
+\def\cartbot{\hbox to \cartouter{\hskip\lskip
+ \cbl\leaders\hrule height\circthick\hfil\cbr
+ \hskip\rskip}}
+%
+\newskip\lskip\newskip\rskip
+
+\envdef\cartouche{%
+ \ifhmode\par\fi % can't be in the midst of a paragraph.
+ \startsavinginserts
+ \lskip=\leftskip \rskip=\rightskip
+ \leftskip=0pt\rightskip=0pt % we want these *outside*.
+ \cartinner=\hsize \advance\cartinner by-\lskip
+ \advance\cartinner by-\rskip
+ \cartouter=\hsize
+ \advance\cartouter by 18.4pt % allow for 3pt kerns on either
+ % side, and for 6pt waste from
+ % each corner char, and rule thickness
+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+ % Flag to tell @lisp, etc., not to narrow margin.
+ \let\nonarrowing = t%
+ \vbox\bgroup
+ \baselineskip=0pt\parskip=0pt\lineskip=0pt
+ \carttop
+ \hbox\bgroup
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \kern3pt
+ \hsize=\cartinner
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
+ \comment % For explanation, see the end of \def\group.
+}
+\def\Ecartouche{%
+ \ifhmode\par\fi
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
+ \egroup
+ \cartbot
+ \egroup
+ \checkinserts
+}
+
+
+% This macro is called at the beginning of all the @example variants,
+% inside a group.
+\def\nonfillstart{%
+ \aboveenvbreak
+ \hfuzz = 12pt % Don't be fussy
+ \sepspaces % Make spaces be word-separators rather than space tokens.
+ \let\par = \lisppar % don't ignore blank lines
+ \obeylines % each line of input is a line of output
+ \parskip = 0pt
+ \parindent = 0pt
+ \emergencystretch = 0pt % don't try to avoid overfull boxes
+ \ifx\nonarrowing\relax
+ \advance \leftskip by \lispnarrowing
+ \exdentamount=\lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \let\exdent=\nofillexdent
+}
+
+% If you want all examples etc. small: @set dispenvsize small.
+% If you want even small examples the full size: @set dispenvsize nosmall.
+% This affects the following displayed environments:
+% @example, @display, @format, @lisp
+%
+\def\smallword{small}
+\def\nosmallword{nosmall}
+\let\SETdispenvsize\relax
+\def\setnormaldispenv{%
+ \ifx\SETdispenvsize\smallword
+ \smallexamplefonts \rm
+ \fi
+}
+\def\setsmalldispenv{%
+ \ifx\SETdispenvsize\nosmallword
+ \else
+ \smallexamplefonts \rm
+ \fi
+}
+
+% We often define two environments, @foo and @smallfoo.
+% Let's do it by one command:
+\def\makedispenv #1#2{
+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+ \expandafter\let\csname E#1\endcsname \afterenvbreak
+ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
+}
+
+% Define two synonyms:
+\def\maketwodispenvs #1#2#3{
+ \makedispenv{#1}{#3}
+ \makedispenv{#2}{#3}
+}
+
+% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @smallexample and @smalllisp: use smaller fonts.
+% Originally contributed by Pavel@xerox.
+%
+\maketwodispenvs {lisp}{example}{%
+ \nonfillstart
+ \tt
+ \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
+ \gobble % eat return
+}
+
+% @display/@smalldisplay: same as @lisp except keep current font.
+%
+\makedispenv {display}{%
+ \nonfillstart
+ \gobble
+}
+
+% @format/@smallformat: same as @display except don't narrow margins.
+%
+\makedispenv{format}{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+
+% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
+\envdef\flushleft{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+\let\Eflushleft = \afterenvbreak
+
+% @flushright.
+%
+\envdef\flushright{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \advance\leftskip by 0pt plus 1fill
+ \gobble
+}
+\let\Eflushright = \afterenvbreak
+
+
+% @quotation does normal linebreaking (hence we can't use \nonfillstart)
+% and narrows the margins. We keep \parskip nonzero in general, since
+% we're doing normal filling. So, when using \aboveenvbreak and
+% \afterenvbreak, temporarily make \parskip 0.
+%
+\envdef\quotation{%
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \parindent=0pt
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \advance\rightskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \parsearg\quotationlabel
+}
+
+% We have retained a nonzero parskip for the environment, since we're
+% doing normal filling.
+%
+\def\Equotation{%
+ \par
+ \ifx\quotationauthor\undefined\else
+ % indent a bit.
+ \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
+ \fi
+ {\parskip=0pt \afterenvbreak}%
+}
+
+% If we're given an argument, typeset it in bold with a colon after.
+\def\quotationlabel#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty \else
+ {\bf #1: }%
+ \fi
+}
+
+
+% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
+% If we want to allow any <char> as delimiter,
+% we need the curly braces so that makeinfo sees the @verb command, eg:
+% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
+%
+% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
+%
+% [Knuth] p.344; only we need to do the other characters Texinfo sets
+% active too. Otherwise, they get lost as the first character on a
+% verbatim line.
+\def\dospecials{%
+ \do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
+ \do\<\do\>\do\|\do\@\do+\do\"%
+}
+%
+% [Knuth] p. 380
+\def\uncatcodespecials{%
+ \def\do##1{\catcode`##1=\other}\dospecials}
+%
+% [Knuth] pp. 380,381,391
+% Disable Spanish ligatures ?` and !` of \tt font
+\begingroup
+ \catcode`\`=\active\gdef`{\relax\lq}
+\endgroup
+%
+% Setup for the @verb command.
+%
+% Eight spaces for a tab
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
+\endgroup
+%
+\def\setupverb{%
+ \tt % easiest (and conventionally used) font for verbatim
+ \def\par{\leavevmode\endgraf}%
+ \catcode`\`=\active
+ \tabeightspaces
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+}
+
+% Setup for the @verbatim environment
+%
+% Real tab expansion
+\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
+%
+\def\starttabbox{\setbox0=\hbox\bgroup}
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabexpand{%
+ \catcode`\^^I=\active
+ \def^^I{\leavevmode\egroup
+ \dimen0=\wd0 % the width so far, or since the previous tab
+ \divide\dimen0 by\tabw
+ \multiply\dimen0 by\tabw % compute previous multiple of \tabw
+ \advance\dimen0 by\tabw % advance to next multiple of \tabw
+ \wd0=\dimen0 \box0 \starttabbox
+ }%
+ }
+\endgroup
+\def\setupverbatim{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ % Easiest (and conventionally used) font for verbatim
+ \tt
+ \def\par{\leavevmode\egroup\box0\endgraf}%
+ \catcode`\`=\active
+ \tabexpand
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+ \everypar{\starttabbox}%
+}
+
+% Do the @verb magic: verbatim text is quoted by unique
+% delimiter characters. Before first delimiter expect a
+% right brace, after last delimiter expect closing brace:
+%
+% \def\doverb'{'<char>#1<char>'}'{#1}
+%
+% [Knuth] p. 382; only eat outer {}
+\begingroup
+ \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
+ \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
+\endgroup
+%
+\def\verb{\begingroup\setupverb\doverb}
+%
+%
+% Do the @verbatim magic: define the macro \doverbatim so that
+% the (first) argument ends when '@end verbatim' is reached, ie:
+%
+% \def\doverbatim#1@end verbatim{#1}
+%
+% For Texinfo it's a lot easier than for LaTeX,
+% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
+% we need not redefine '\', '{' and '}'.
+%
+% Inspired by LaTeX's verbatim command set [latex.ltx]
+%
+\begingroup
+ \catcode`\ =\active
+ \obeylines %
+ % ignore everything up to the first ^^M, that's the newline at the end
+ % of the @verbatim input line itself. Otherwise we get an extra blank
+ % line in the output.
+ \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
+ % We really want {...\end verbatim} in the body of the macro, but
+ % without the active space; thus we have to use \xdef and \gobble.
+\endgroup
+%
+\envdef\verbatim{%
+ \setupverbatim\doverbatim
+}
+\let\Everbatim = \afterenvbreak
+
+
+% @verbatiminclude FILE - insert text of file in verbatim environment.
+%
+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
+%
+\def\doverbatiminclude#1{%
+ {%
+ \makevalueexpandable
+ \setupverbatim
+ \input #1
+ \afterenvbreak
+ }%
+}
+
+% @copying ... @end copying.
+% Save the text away for @insertcopying later.
+%
+% We save the uninterpreted tokens, rather than creating a box.
+% Saving the text in a box would be much easier, but then all the
+% typesetting commands (@smallbook, font changes, etc.) have to be done
+% beforehand -- and a) we want @copying to be done first in the source
+% file; b) letting users define the frontmatter in as flexible order as
+% possible is very desirable.
+%
+\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
+\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
+%
+\def\insertcopying{%
+ \begingroup
+ \parindent = 0pt % paragraph indentation looks wrong on title page
+ \scanexp\copyingtext
+ \endgroup
+}
+
+\message{defuns,}
+% @defun etc.
+
+\newskip\defbodyindent \defbodyindent=.4in
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+
+% Start the processing of @deffn:
+\def\startdefun{%
+ \ifnum\lastpenalty<10000
+ \medbreak
+ \else
+ % If there are two @def commands in a row, we'll have a \nobreak,
+ % which is there to keep the function description together with its
+ % header. But if there's nothing but headers, we need to allow a
+ % break somewhere. Check specifically for penalty 10002, inserted
+ % by \defargscommonending, instead of 10000, since the sectioning
+ % commands also insert a nobreak penalty, and we don't want to allow
+ % a break between a section heading and a defun.
+ %
+ \ifnum\lastpenalty=10002 \penalty2000 \fi
+ %
+ % Similarly, after a section heading, do not allow a break.
+ % But do insert the glue.
+ \medskip % preceded by discardable penalty, so not a breakpoint
+ \fi
+ %
+ \parindent=0in
+ \advance\leftskip by \defbodyindent
+ \exdentamount=\defbodyindent
+}
+
+\def\dodefunx#1{%
+ % First, check whether we are in the right environment:
+ \checkenv#1%
+ %
+ % As above, allow line break if we have multiple x headers in a row.
+ % It's not a great place, though.
+ \ifnum\lastpenalty=10002 \penalty3000 \fi
+ %
+ % And now, it's time to reuse the body of the original defun:
+ \expandafter\gobbledefun#1%
+}
+\def\gobbledefun#1\startdefun{}
+
+% \printdefunline \deffnheader{text}
+%
+\def\printdefunline#1#2{%
+ \begingroup
+ % call \deffnheader:
+ #1#2 \endheader
+ % common ending:
+ \interlinepenalty = 10000
+ \advance\rightskip by 0pt plus 1fil
+ \endgraf
+ \nobreak\vskip -\parskip
+ \penalty 10002 % signal to \startdefun and \dodefunx
+ % Some of the @defun-type tags do not enable magic parentheses,
+ % rendering the following check redundant. But we don't optimize.
+ \checkparencounts
+ \endgroup
+}
+
+\def\Edefun{\endgraf\medbreak}
+
+% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
+% the only thing remainnig is to define \deffnheader.
+%
+\def\makedefun#1{%
+ \expandafter\let\csname E#1\endcsname = \Edefun
+ \edef\temp{\noexpand\domakedefun
+ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
+ \temp
+}
+
+% \domakedefun \deffn \deffnx \deffnheader
+%
+% Define \deffn and \deffnx, without parameters.
+% \deffnheader has to be defined explicitly.
+%
+\def\domakedefun#1#2#3{%
+ \envdef#1{%
+ \startdefun
+ \parseargusing\activeparens{\printdefunline#3}%
+ }%
+ \def#2{\dodefunx#1}%
+ \def#3%
+}
+
+%%% Untyped functions:
+
+% @deffn category name args
+\makedefun{deffn}{\deffngeneral{}}
+
+% @deffn category class name args
+\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
+
+% \defopon {category on}class name args
+\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deffngeneral {subind}category name args
+%
+\def\deffngeneral#1#2 #3 #4\endheader{%
+ % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
+ \dosubind{fn}{\code{#3}}{#1}%
+ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
+}
+
+%%% Typed functions:
+
+% @deftypefn category type name args
+\makedefun{deftypefn}{\deftypefngeneral{}}
+
+% @deftypeop category class type name args
+\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
+
+% \deftypeopon {category on}class type name args
+\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypefngeneral {subind}category type name args
+%
+\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{fn}{\code{#4}}{#1}%
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Typed variables:
+
+% @deftypevr category type var args
+\makedefun{deftypevr}{\deftypecvgeneral{}}
+
+% @deftypecv category class type var args
+\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
+
+% \deftypecvof {category of}class type var args
+\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypecvgeneral {subind}category type var args
+%
+\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{vr}{\code{#4}}{#1}%
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Untyped variables:
+
+% @defvr category var args
+\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
+
+% @defcv category class var args
+\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
+
+% \defcvof {category of}class var args
+\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
+
+%%% Type:
+% @deftp category name args
+\makedefun{deftp}#1 #2 #3\endheader{%
+ \doind{tp}{\code{#2}}%
+ \defname{#1}{}{#2}\defunargs{#3\unskip}%
+}
+
+% Remaining @defun-like shortcuts:
+\makedefun{defun}{\deffnheader{\putwordDeffunc} }
+\makedefun{defmac}{\deffnheader{\putwordDefmac} }
+\makedefun{defspec}{\deffnheader{\putwordDefspec} }
+\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
+\makedefun{defvar}{\defvrheader{\putwordDefvar} }
+\makedefun{defopt}{\defvrheader{\putwordDefopt} }
+\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
+\makedefun{defmethod}{\defopon\putwordMethodon}
+\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
+\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
+\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
+
+% \defname, which formats the name of the @def (not the args).
+% #1 is the category, such as "Function".
+% #2 is the return type, if any.
+% #3 is the function name.
+%
+% We are followed by (but not passed) the arguments, if any.
+%
+\def\defname#1#2#3{%
+ % Get the values of \leftskip and \rightskip as they were outside the @def...
+ \advance\leftskip by -\defbodyindent
+ %
+ % How we'll format the type name. Putting it in brackets helps
+ % distinguish it from the body text that may end up on the next line
+ % just below it.
+ \def\temp{#1}%
+ \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
+ %
+ % Figure out line sizes for the paragraph shape.
+ % The first line needs space for \box0; but if \rightskip is nonzero,
+ % we need only space for the part of \box0 which exceeds it:
+ \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
+ % The continuations:
+ \dimen2=\hsize \advance\dimen2 by -\defargsindent
+ % (plain.tex says that \dimen1 should be used only as global.)
+ \parshape 2 0in \dimen0 \defargsindent \dimen2
+ %
+ % Put the type name to the right margin.
+ \noindent
+ \hbox to 0pt{%
+ \hfil\box0 \kern-\hsize
+ % \hsize has to be shortened this way:
+ \kern\leftskip
+ % Intentionally do not respect \rightskip, since we need the space.
+ }%
+ %
+ % Allow all lines to be underfull without complaint:
+ \tolerance=10000 \hbadness=10000
+ \exdentamount=\defbodyindent
+ {%
+ % defun fonts. We use typewriter by default (used to be bold) because:
+ % . we're printing identifiers, they should be in tt in principle.
+ % . in languages with many accents, such as Czech or French, it's
+ % common to leave accents off identifiers. The result looks ok in
+ % tt, but exceedingly strange in rm.
+ % . we don't want -- and --- to be treated as ligatures.
+ % . this still does not fix the ?` and !` ligatures, but so far no
+ % one has made identifiers using them :).
+ \df \tt
+ \def\temp{#2}% return value type
+ \ifx\temp\empty\else \tclose{\temp} \fi
+ #3% output function name
+ }%
+ {\rm\enskip}% hskip 0.5 em of \tenrm
+ %
+ \boldbrax
+ % arguments will be output next, if any.
+}
+
+% Print arguments in slanted roman (not ttsl), inconsistently with using
+% tt for the name. This is because literal text is sometimes needed in
+% the argument list (groff manual), and ttsl and tt are not very
+% distinguishable. Prevent hyphenation at `-' chars.
+%
+\def\defunargs#1{%
+ % use sl by default (not ttsl),
+ % tt for the names.
+ \df \sl \hyphenchar\font=0
+ %
+ % On the other hand, if an argument has two dashes (for instance), we
+ % want a way to get ttsl. Let's try @var for that.
+ \let\var=\ttslanted
+ #1%
+ \sl\hyphenchar\font=45
+}
+
+% We want ()&[] to print specially on the defun line.
+%
+\def\activeparens{%
+ \catcode`\(=\active \catcode`\)=\active
+ \catcode`\[=\active \catcode`\]=\active
+ \catcode`\&=\active
+}
+
+% Make control sequences which act like normal parenthesis chars.
+\let\lparen = ( \let\rparen = )
+
+% Be sure that we always have a definition for `(', etc. For example,
+% if the fn name has parens in it, \boldbrax will not be in effect yet,
+% so TeX would otherwise complain about undefined control sequence.
+{
+ \activeparens
+ \global\let(=\lparen \global\let)=\rparen
+ \global\let[=\lbrack \global\let]=\rbrack
+ \global\let& = \&
+
+ \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+ \gdef\magicamp{\let&=\amprm}
+}
+
+\newcount\parencount
+
+% If we encounter &foo, then turn on ()-hacking afterwards
+\newif\ifampseen
+\def\amprm#1 {\ampseentrue{\bf\&#1 }}
+
+\def\parenfont{%
+ \ifampseen
+ % At the first level, print parens in roman,
+ % otherwise use the default font.
+ \ifnum \parencount=1 \rm \fi
+ \else
+ % The \sf parens (in \boldbrax) actually are a little bolder than
+ % the contained text. This is especially needed for [ and ] .
+ \sf
+ \fi
+}
+\def\infirstlevel#1{%
+ \ifampseen
+ \ifnum\parencount=1
+ #1%
+ \fi
+ \fi
+}
+\def\bfafterword#1 {#1 \bf}
+
+\def\opnr{%
+ \global\advance\parencount by 1
+ {\parenfont(}%
+ \infirstlevel \bfafterword
+}
+\def\clnr{%
+ {\parenfont)}%
+ \infirstlevel \sl
+ \global\advance\parencount by -1
+}
+
+\newcount\brackcount
+\def\lbrb{%
+ \global\advance\brackcount by 1
+ {\bf[}%
+}
+\def\rbrb{%
+ {\bf]}%
+ \global\advance\brackcount by -1
+}
+
+\def\checkparencounts{%
+ \ifnum\parencount=0 \else \badparencount \fi
+ \ifnum\brackcount=0 \else \badbrackcount \fi
+}
+\def\badparencount{%
+ \errmessage{Unbalanced parentheses in @def}%
+ \global\parencount=0
+}
+\def\badbrackcount{%
+ \errmessage{Unbalanced square braces in @def}%
+ \global\brackcount=0
+}
+
+
+\message{macros,}
+% @macro.
+
+% To do this right we need a feature of e-TeX, \scantokens,
+% which we arrange to emulate with a temporary file in ordinary TeX.
+\ifx\eTeXversion\undefined
+ \newwrite\macscribble
+ \def\scantokens#1{%
+ \toks0={#1}%
+ \immediate\openout\macscribble=\jobname.tmp
+ \immediate\write\macscribble{\the\toks0}%
+ \immediate\closeout\macscribble
+ \input \jobname.tmp
+ }
+\fi
+
+\def\scanmacro#1{%
+ \begingroup
+ \newlinechar`\^^M
+ \let\xeatspaces\eatspaces
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ % ... and \example
+ \spaceisspace
+ %
+ % Append \endinput to make sure that TeX does not see the ending newline.
+ %
+ % I've verified that it is necessary both for e-TeX and for ordinary TeX
+ % --kasal, 29nov03
+ \scantokens{#1\endinput}%
+ \endgroup
+}
+
+\def\scanexp#1{%
+ \edef\temp{\noexpand\scanmacro{#1}}%
+ \temp
+}
+
+\newcount\paramno % Count of parameters
+\newtoks\macname % Macro name
+\newif\ifrecursive % Is it recursive?
+
+% List of all defined macros in the form
+% \definedummyword\macro1\definedummyword\macro2...
+% Currently is also contains all @aliases; the list can be split
+% if there is a need.
+\def\macrolist{}
+
+% Add the macro to \macrolist
+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
+\def\addtomacrolistxxx#1{%
+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \xdef\macrolist{\the\toks0}%
+}
+
+% Utility routines.
+% This does \let #1 = #2, with \csnames; that is,
+% \let \csname#1\endcsname = \csname#2\endcsname
+% (except of course we have to play expansion games).
+%
+\def\cslet#1#2{%
+ \expandafter\let
+ \csname#1\expandafter\endcsname
+ \csname#2\endcsname
+}
+
+% Trim leading and trailing spaces off a string.
+% Concepts from aro-bend problem 15 (see CTAN).
+{\catcode`\@=11
+\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
+\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
+\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
+\def\unbrace#1{#1}
+\unbrace{\gdef\trim@@@ #1 } #2@{#1}
+}
+
+% Trim a single trailing ^^M off a string.
+{\catcode`\^^M=\other \catcode`\Q=3%
+\gdef\eatcr #1{\eatcra #1Q^^MQ}%
+\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
+\gdef\eatcrb#1Q#2Q{#1}%
+}
+
+% Macro bodies are absorbed as an argument in a context where
+% all characters are catcode 10, 11 or 12, except \ which is active
+% (as in normal texinfo). It is necessary to change the definition of \.
+
+% It's necessary to have hard CRs when the macro is executed. This is
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% body, and then making it the \newlinechar in \scanmacro.
+
+\def\scanctxt{%
+ \catcode`\"=\other
+ \catcode`\+=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\@=\other
+ \catcode`\^=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\~=\other
+}
+
+\def\scanargctxt{%
+ \scanctxt
+ \catcode`\\=\other
+ \catcode`\^^M=\other
+}
+
+\def\macrobodyctxt{%
+ \scanctxt
+ \catcode`\{=\other
+ \catcode`\}=\other
+ \catcode`\^^M=\other
+ \usembodybackslash
+}
+
+\def\macroargctxt{%
+ \scanctxt
+ \catcode`\\=\other
+}
+
+% \mbodybackslash is the definition of \ in @macro bodies.
+% It maps \foo\ => \csname macarg.foo\endcsname => #N
+% where N is the macro parameter number.
+% We define \csname macarg.\endcsname to be \realbackslash, so
+% \\ in macro replacement text gets you a backslash.
+
+{\catcode`@=0 @catcode`@\=@active
+ @gdef@usembodybackslash{@let\=@mbodybackslash}
+ @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
+}
+\expandafter\def\csname macarg.\endcsname{\realbackslash}
+
+\def\macro{\recursivefalse\parsearg\macroxxx}
+\def\rmacro{\recursivetrue\parsearg\macroxxx}
+
+\def\macroxxx#1{%
+ \getargs{#1}% now \macname is the macname and \argl the arglist
+ \ifx\argl\empty % no arguments
+ \paramno=0%
+ \else
+ \expandafter\parsemargdef \argl;%
+ \fi
+ \if1\csname ismacro.\the\macname\endcsname
+ \message{Warning: redefining \the\macname}%
+ \else
+ \expandafter\ifx\csname \the\macname\endcsname \relax
+ \else \errmessage{Macro name \the\macname\space already defined}\fi
+ \global\cslet{macsave.\the\macname}{\the\macname}%
+ \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
+ \addtomacrolist{\the\macname}%
+ \fi
+ \begingroup \macrobodyctxt
+ \ifrecursive \expandafter\parsermacbody
+ \else \expandafter\parsemacbody
+ \fi}
+
+\parseargdef\unmacro{%
+ \if1\csname ismacro.#1\endcsname
+ \global\cslet{#1}{macsave.#1}%
+ \global\expandafter\let \csname ismacro.#1\endcsname=0%
+ % Remove the macro name from \macrolist:
+ \begingroup
+ \expandafter\let\csname#1\endcsname \relax
+ \let\definedummyword\unmacrodo
+ \xdef\macrolist{\macrolist}%
+ \endgroup
+ \else
+ \errmessage{Macro #1 not defined}%
+ \fi
+}
+
+% Called by \do from \dounmacro on each macro. The idea is to omit any
+% macro definitions that have been changed to \relax.
+%
+\def\unmacrodo#1{%
+ \ifx #1\relax
+ % remove this
+ \else
+ \noexpand\definedummyword \noexpand#1%
+ \fi
+}
+
+% This makes use of the obscure feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
+\def\getargs#1{\getargsxxx#1{}}
+\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
+\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacargs#1{\def\argl{#1}}
+
+% Parse the optional {params} list. Set up \paramno and \paramlist
+% so \defmacro knows what to do. Define \macarg.blah for each blah
+% in the params list, to be ##N where N is the position in that list.
+% That gets used by \mbodybackslash (above).
+
+% We need to get `macro parameter char #' into several definitions.
+% The technique used is stolen from LaTeX: let \hash be something
+% unexpandable, insert that wherever you need a #, and then redefine
+% it to # just before using the token list produced.
+%
+% The same technique is used to protect \eatspaces till just before
+% the macro is used.
+
+\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
+ \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdefxxx#1,{%
+ \if#1;\let\next=\relax
+ \else \let\next=\parsemargdefxxx
+ \advance\paramno by 1%
+ \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+ {\xeatspaces{\hash\the\paramno}}%
+ \edef\paramlist{\paramlist\hash\the\paramno,}%
+ \fi\next}
+
+% These two commands read recursive and nonrecursive macro bodies.
+% (They're different since rec and nonrec macros end differently.)
+
+\long\def\parsemacbody#1@end macro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\long\def\parsermacbody#1@end rmacro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+
+% This defines the macro itself. There are six cases: recursive and
+% nonrecursive macros of zero, one, and many arguments.
+% Much magic with \expandafter here.
+% \xdef is used so that macro definitions will survive the file
+% they're defined in; @include reads the file inside a group.
+\def\defmacro{%
+ \let\hash=##% convert placeholders to macro parameter chars
+ \ifrecursive
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\scanmacro{\temp}}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup\noexpand\scanmacro{\temp}}%
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \fi
+ \else
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \fi
+ \fi}
+
+\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
+
+% \braceorline decides whether the next nonwhitespace character is a
+% {. If so it reads up to the closing }, if not, it reads the whole
+% line. Whatever was read is then fed to the next control sequence
+% as an argument (by \parsebrace or \parsearg)
+\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
+\def\braceorlinexxx{%
+ \ifx\nchar\bgroup\else
+ \expandafter\parsearg
+ \fi \next}
+
+
+% @alias.
+% We need some trickery to remove the optional spaces around the equal
+% sign. Just make them active and then expand them all to nothing.
+\def\alias{\parseargusing\obeyspaces\aliasxxx}
+\def\aliasxxx #1{\aliasyyy#1\relax}
+\def\aliasyyy #1=#2\relax{%
+ {%
+ \expandafter\let\obeyedspace=\empty
+ \addtomacrolist{#1}%
+ \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
+ }%
+ \next
+}
+
+
+\message{cross references,}
+
+\newwrite\auxfile
+
+\newif\ifhavexrefs % True if xref values are known.
+\newif\ifwarnedxrefs % True if we warned once that they aren't known.
+
+% @inforef is relatively simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+ node \samp{\ignorespaces#1{}}}
+
+% @node's only job in TeX is to define \lastnode, which is used in
+% cross-references. The @node line might or might not have commas, and
+% might or might not have spaces before the first comma, like:
+% @node foo , bar , ...
+% We don't want such trailing spaces in the node name.
+%
+\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
+%
+% also remove a trailing comma, in case of something like this:
+% @node Help-Cross, , , Cross-refs
+\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+
+\let\nwnode=\node
+\let\lastnode=\empty
+
+% Write a cross-reference definition for the current node. #1 is the
+% type (Ynumbered, Yappendix, Ynothing).
+%
+\def\donoderef#1{%
+ \ifx\lastnode\empty\else
+ \setref{\lastnode}{#1}%
+ \global\let\lastnode=\empty
+ \fi
+}
+
+% @anchor{NAME} -- define xref target at arbitrary point.
+%
+\newcount\savesfregister
+%
+\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
+\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
+\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
+
+% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
+% anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name taken from \thissection,
+% or the anchor name.
+% 2) NAME-snt - section number and type, passed as the SNT arg, or
+% empty for anchors.
+% 3) NAME-pg - the page number.
+%
+% This is called from \donoderef, \anchor, and \dofloat. In the case of
+% floats, there is an additional part, which is not written here:
+% 4) NAME-lof - the text as it should appear in a @listoffloats.
+%
+\def\setref#1#2{%
+ \pdfmkdest{#1}%
+ \iflinks
+ {%
+ \atdummies % preserve commands, but don't expand them
+ \edef\writexrdef##1##2{%
+ \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
+ ##1}{##2}}% these are parameters of \writexrdef
+ }%
+ \toks0 = \expandafter{\thissection}%
+ \immediate \writexrdef{title}{\the\toks0 }%
+ \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
+ \writexrdef{pg}{\folio}% will be written later, during \shipout
+ }%
+ \fi
+}
+
+% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
+% the node name, #2 the name of the Info cross-reference, #3 the printed
+% node name, #4 the name of the Info file, #5 the name of the printed
+% manual. All but the node name can be omitted.
+%
+\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
+\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
+\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
+ \unsepspaces
+ \def\printedmanual{\ignorespaces #5}%
+ \def\printedrefname{\ignorespaces #3}%
+ \setbox1=\hbox{\printedmanual\unskip}%
+ \setbox0=\hbox{\printedrefname\unskip}%
+ \ifdim \wd0 = 0pt
+ % No printed node name was explicitly given.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+ % Use the node name inside the square brackets.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ % Use the actual chapter/section title appear inside
+ % the square brackets. Use the real section title if we have it.
+ \ifdim \wd1 > 0pt
+ % It is in another manual, so we don't have it.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ \ifhavexrefs
+ % We know the real title if we have the xref values.
+ \def\printedrefname{\refx{#1-title}{}}%
+ \else
+ % Otherwise just copy the Info node name.
+ \def\printedrefname{\ignorespaces #1}%
+ \fi%
+ \fi
+ \fi
+ \fi
+ %
+ % Make link in pdf output.
+ \ifpdf
+ \leavevmode
+ \getfilename{#4}%
+ {\turnoffactive
+ % See comments at \activebackslashdouble.
+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
+ \backslashparens\pdfxrefdest}%
+ %
+ \ifnum\filenamelength>0
+ \startlink attr{/Border [0 0 0]}%
+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
+ \else
+ \startlink attr{/Border [0 0 0]}%
+ goto name{\pdfmkpgn{\pdfxrefdest}}%
+ \fi
+ }%
+ \linkcolor
+ \fi
+ %
+ % Float references are printed completely differently: "Figure 1.2"
+ % instead of "[somenode], p.3". We distinguish them by the
+ % LABEL-title being set to a magic string.
+ {%
+ % Have to otherify everything special to allow the \csname to
+ % include an _ in the xref name, etc.
+ \indexnofonts
+ \turnoffactive
+ \expandafter\global\expandafter\let\expandafter\Xthisreftitle
+ \csname XR#1-title\endcsname
+ }%
+ \iffloat\Xthisreftitle
+ % If the user specified the print name (third arg) to the ref,
+ % print it instead of our usual "Figure 1.2".
+ \ifdim\wd0 = 0pt
+ \refx{#1-snt}{}%
+ \else
+ \printedrefname
+ \fi
+ %
+ % if the user also gave the printed manual name (fifth arg), append
+ % "in MANUALNAME".
+ \ifdim \wd1 > 0pt
+ \space \putwordin{} \cite{\printedmanual}%
+ \fi
+ \else
+ % node/anchor (non-float) references.
+ %
+ % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
+ % insert empty discretionaries after hyphens, which means that it will
+ % not find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens, this
+ % is a loss. Therefore, we give the text of the node name again, so it
+ % is as if TeX is seeing it for the first time.
+ \ifdim \wd1 > 0pt
+ \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+ \else
+ % _ (for example) has to be the character _ for the purposes of the
+ % control sequence corresponding to the node, but it has to expand
+ % into the usual \leavevmode...\vrule stuff for purposes of
+ % printing. So we \turnoffactive for the \refx-snt, back on for the
+ % printing, back off for the \refx-pg.
+ {\turnoffactive
+ % Only output a following space if the -snt ref is nonempty; for
+ % @unnumbered and @anchor, it won't be.
+ \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
+ \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+ }%
+ % output the `[mynode]' via a macro so it can be overridden.
+ \xrefprintnodename\printedrefname
+ %
+ % But we always want a comma and a space:
+ ,\space
+ %
+ % output the `page 3'.
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% This macro is called from \xrefX for the `[nodename]' part of xref
+% output. It's a separate macro only so it can be changed more easily,
+% since square brackets don't work well in some documents. Particularly
+% one that Bob is working on :).
+%
+\def\xrefprintnodename#1{[#1]}
+
+% Things referred to by \setref.
+%
+\def\Ynothing{}
+\def\Yomitfromtoc{}
+\def\Ynumbered{%
+ \ifnum\secno=0
+ \putwordChapter@tie \the\chapno
+ \else \ifnum\subsecno=0
+ \putwordSection@tie \the\chapno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
+ \else
+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+\def\Yappendix{%
+ \ifnum\secno=0
+ \putwordAppendix@tie @char\the\appendixno{}%
+ \else \ifnum\subsecno=0
+ \putwordSection@tie @char\the\appendixno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
+ \else
+ \putwordSection@tie
+ @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+
+% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
+% If its value is nonempty, SUFFIX is output afterward.
+%
+\def\refx#1#2{%
+ {%
+ \indexnofonts
+ \otherbackslash
+ \expandafter\global\expandafter\let\expandafter\thisrefX
+ \csname XR#1\endcsname
+ }%
+ \ifx\thisrefX\relax
+ % If not defined, say something at least.
+ \angleleft un\-de\-fined\angleright
+ \iflinks
+ \ifhavexrefs
+ \message{\linenumber Undefined cross reference `#1'.}%
+ \else
+ \ifwarnedxrefs\else
+ \global\warnedxrefstrue
+ \message{Cross reference values unknown; you must run TeX again.}%
+ \fi
+ \fi
+ \fi
+ \else
+ % It's defined, so just use it.
+ \thisrefX
+ \fi
+ #2% Output the suffix in any case.
+}
+
+% This is the macro invoked by entries in the aux file. Usually it's
+% just a \def (we prepend XR to the control sequence name to avoid
+% collisions). But if this is a float type, we have more work to do.
+%
+\def\xrdef#1#2{%
+ \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value.
+ %
+ % Was that xref control sequence that we just defined for a float?
+ \expandafter\iffloat\csname XR#1\endcsname
+ % it was a float, and we have the (safe) float type in \iffloattype.
+ \expandafter\let\expandafter\floatlist
+ \csname floatlist\iffloattype\endcsname
+ %
+ % Is this the first time we've seen this float type?
+ \expandafter\ifx\floatlist\relax
+ \toks0 = {\do}% yes, so just \do
+ \else
+ % had it before, so preserve previous elements in list.
+ \toks0 = \expandafter{\floatlist\do}%
+ \fi
+ %
+ % Remember this xref in the control sequence \floatlistFLOATTYPE,
+ % for later use in \listoffloats.
+ \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}%
+ \fi
+}
+
+% Read the last existing aux file, if any. No error if none exists.
+%
+\def\tryauxfile{%
+ \openin 1 \jobname.aux
+ \ifeof 1 \else
+ \readdatafile{aux}%
+ \global\havexrefstrue
+ \fi
+ \closein 1
+}
+
+\def\setupdatafile{%
+ \catcode`\^^@=\other
+ \catcode`\^^A=\other
+ \catcode`\^^B=\other
+ \catcode`\^^C=\other
+ \catcode`\^^D=\other
+ \catcode`\^^E=\other
+ \catcode`\^^F=\other
+ \catcode`\^^G=\other
+ \catcode`\^^H=\other
+ \catcode`\^^K=\other
+ \catcode`\^^L=\other
+ \catcode`\^^N=\other
+ \catcode`\^^P=\other
+ \catcode`\^^Q=\other
+ \catcode`\^^R=\other
+ \catcode`\^^S=\other
+ \catcode`\^^T=\other
+ \catcode`\^^U=\other
+ \catcode`\^^V=\other
+ \catcode`\^^W=\other
+ \catcode`\^^X=\other
+ \catcode`\^^Z=\other
+ \catcode`\^^[=\other
+ \catcode`\^^\=\other
+ \catcode`\^^]=\other
+ \catcode`\^^^=\other
+ \catcode`\^^_=\other
+ % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
+ % in xref tags, i.e., node names. But since ^^e4 notation isn't
+ % supported in the main text, it doesn't seem desirable. Furthermore,
+ % that is not enough: for node names that actually contain a ^
+ % character, we would end up writing a line like this: 'xrdef {'hat
+ % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
+ % argument, and \hat is not an expandable control sequence. It could
+ % all be worked out, but why? Either we support ^^ or we don't.
+ %
+ % The other change necessary for this was to define \auxhat:
+ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
+ % and then to call \auxhat in \setq.
+ %
+ \catcode`\^=\other
+ %
+ % Special characters. Should be turned off anyway, but...
+ \catcode`\~=\other
+ \catcode`\[=\other
+ \catcode`\]=\other
+ \catcode`\"=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\$=\other
+ \catcode`\#=\other
+ \catcode`\&=\other
+ \catcode`\%=\other
+ \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
+ %
+ % This is to support \ in node names and titles, since the \
+ % characters end up in a \csname. It's easier than
+ % leaving it active and making its active definition an actual \
+ % character. What I don't understand is why it works in the *value*
+ % of the xrdef. Seems like it should be a catcode12 \, and that
+ % should not typeset properly. But it works, so I'm moving on for
+ % now. --karl, 15jan04.
+ \catcode`\\=\other
+ %
+ % Make the characters 128-255 be printing characters.
+ {%
+ \count1=128
+ \def\loop{%
+ \catcode\count1=\other
+ \advance\count1 by 1
+ \ifnum \count1<256 \loop \fi
+ }%
+ }%
+ %
+ % @ is our escape character in .aux files, and we need braces.
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\@=0
+}
+
+\def\readdatafile#1{%
+\begingroup
+ \setupdatafile
+ \input\jobname.#1
+\endgroup}
+
+\message{insertions,}
+% including footnotes.
+
+\newcount \footnoteno
+
+% The trailing space in the following definition for supereject is
+% vital for proper filling; pages come out unaligned when you do a
+% pagealignmacro call if that space before the closing brace is
+% removed. (Generally, numeric constants should always be followed by a
+% space to prevent strange expansion errors.)
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+% @footnotestyle is meaningful for info output only.
+\let\footnotestyle=\comment
+
+{\catcode `\@=11
+%
+% Auto-number footnotes. Otherwise like plain.
+\gdef\footnote{%
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \global\advance\footnoteno by \@ne
+ \edef\thisfootno{$^{\the\footnoteno}$}%
+ %
+ % In case the footnote comes at the end of a sentence, preserve the
+ % extra spacing after we do the footnote number.
+ \let\@sf\empty
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
+ %
+ % Remove inadvertent blank space before typesetting the footnote number.
+ \unskip
+ \thisfootno\@sf
+ \dofootnote
+}%
+
+% Don't bother with the trickery in plain.tex to not require the
+% footnote text as a parameter. Our footnotes don't need to be so general.
+%
+% Oh yes, they do; otherwise, @ifset (and anything else that uses
+% \parseargline) fails inside footnotes because the tokens are fixed when
+% the footnote is read. --karl, 16nov96.
+%
+\gdef\dofootnote{%
+ \insert\footins\bgroup
+ % We want to typeset this text as a normal paragraph, even if the
+ % footnote reference occurs in (for example) a display environment.
+ % So reset some parameters.
+ \hsize=\pagewidth
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % top baseline for broken footnotes
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty\@MM
+ \leftskip\z@skip
+ \rightskip\z@skip
+ \spaceskip\z@skip
+ \xspaceskip\z@skip
+ \parindent\defaultparindent
+ %
+ \smallfonts \rm
+ %
+ % Because we use hanging indentation in footnotes, a @noindent appears
+ % to exdent this text, so make it be a no-op. makeinfo does not use
+ % hanging indentation so @noindent can still be needed within footnote
+ % text after an @example or the like (not that this is good style).
+ \let\noindent = \relax
+ %
+ % Hang the footnote text off the number. Use \everypar in case the
+ % footnote extends for more than one paragraph.
+ \everypar = {\hang}%
+ \textindent{\thisfootno}%
+ %
+ % Don't crash into the line above the footnote text. Since this
+ % expands into a box, it must come within the paragraph, lest it
+ % provide a place where TeX can split the footnote.
+ \footstrut
+ \futurelet\next\fo@t
+}
+}%end \catcode `\@=11
+
+% In case a @footnote appears in a vbox, save the footnote text and create
+% the real \insert just after the vbox finished. Otherwise, the insertion
+% would be lost.
+% Similarly, if a @footnote appears inside an alignment, save the footnote
+% text to a box and make the \insert when a row of the table is finished.
+% And the same can be done for other insert classes. --kasal, 16nov03.
+
+% Replace the \insert primitive by a cheating macro.
+% Deeper inside, just make sure that the saved insertions are not spilled
+% out prematurely.
+%
+\def\startsavinginserts{%
+ \ifx \insert\ptexinsert
+ \let\insert\saveinsert
+ \else
+ \let\checkinserts\relax
+ \fi
+}
+
+% This \insert replacement works for both \insert\footins{foo} and
+% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
+%
+\def\saveinsert#1{%
+ \edef\next{\noexpand\savetobox \makeSAVEname#1}%
+ \afterassignment\next
+ % swallow the left brace
+ \let\temp =
+}
+\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
+\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
+
+\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
+
+\def\placesaveins#1{%
+ \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
+ {\box#1}%
+}
+
+% eat @SAVE -- beware, all of them have catcode \other:
+{
+ \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
+ \gdef\gobblesave @SAVE{}
+}
+
+% initialization:
+\def\newsaveins #1{%
+ \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
+ \next
+}
+\def\newsaveinsX #1{%
+ \csname newbox\endcsname #1%
+ \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
+ \checksaveins #1}%
+}
+
+% initialize:
+\let\checkinserts\empty
+\newsaveins\footins
+\newsaveins\margin
+
+
+% @image. We use the macros from epsf.tex to support this.
+% If epsf.tex is not installed and @image is used, we complain.
+%
+% Check for and read epsf.tex up front. If we read it only at @image
+% time, we might be inside a group, and then its definitions would get
+% undone and the next image would fail.
+\openin 1 = epsf.tex
+\ifeof 1 \else
+ % Do not bother showing banner with epsf.tex v2.7k (available in
+ % doc/epsf.tex and on ctan).
+ \def\epsfannounce{\toks0 = }%
+ \input epsf.tex
+\fi
+\closein 1
+%
+% We will only complain once about lack of epsf.tex.
+\newif\ifwarnednoepsf
+\newhelp\noepsfhelp{epsf.tex must be installed for images to
+ work. It is also included in the Texinfo distribution, or you can get
+ it from ftp://tug.org/tex/epsf.tex.}
+%
+\def\image#1{%
+ \ifx\epsfbox\undefined
+ \ifwarnednoepsf \else
+ \errhelp = \noepsfhelp
+ \errmessage{epsf.tex not found, images will be ignored}%
+ \global\warnednoepsftrue
+ \fi
+ \else
+ \imagexxx #1,,,,,\finish
+ \fi
+}
+%
+% Arguments to @image:
+% #1 is (mandatory) image filename; we tack on .eps extension.
+% #2 is (optional) width, #3 is (optional) height.
+% #4 is (ignored optional) html alt text.
+% #5 is (ignored optional) extension.
+% #6 is just the usual extra ignored arg for parsing this stuff.
+\newif\ifimagevmode
+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
+ \catcode`\^^M = 5 % in case we're inside an example
+ \normalturnoffactive % allow _ et al. in names
+ % If the image is by itself, center it.
+ \ifvmode
+ \imagevmodetrue
+ \nobreak\bigskip
+ % Usually we'll have text after the image which will insert
+ % \parskip glue, so insert it here too to equalize the space
+ % above and below.
+ \nobreak\vskip\parskip
+ \nobreak
+ \line\bgroup
+ \fi
+ %
+ % Output the image.
+ \ifpdf
+ \dopdfimage{#1}{#2}{#3}%
+ \else
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ \epsfbox{#1.eps}%
+ \fi
+ %
+ \ifimagevmode \egroup \bigbreak \fi % space after the image
+\endgroup}
+
+
+% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
+% etc. We don't actually implement floating yet, we always include the
+% float "here". But it seemed the best name for the future.
+%
+\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
+
+% There may be a space before second and/or third parameter; delete it.
+\def\eatcommaspace#1, {#1,}
+
+% #1 is the optional FLOATTYPE, the text label for this float, typically
+% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
+% this float will not be numbered and cannot be referred to.
+%
+% #2 is the optional xref label. Also must be present for the float to
+% be referable.
+%
+% #3 is the optional positioning argument; for now, it is ignored. It
+% will somehow specify the positions allowed to float to (here, top, bottom).
+%
+% We keep a separate counter for each FLOATTYPE, which we reset at each
+% chapter-level command.
+\let\resetallfloatnos=\empty
+%
+\def\dofloat#1,#2,#3,#4\finish{%
+ \let\thiscaption=\empty
+ \let\thisshortcaption=\empty
+ %
+ % don't lose footnotes inside @float.
+ %
+ % BEWARE: when the floats start float, we have to issue warning whenever an
+ % insert appears inside a float which could possibly float. --kasal, 26may04
+ %
+ \startsavinginserts
+ %
+ % We can't be used inside a paragraph.
+ \par
+ %
+ \vtop\bgroup
+ \def\floattype{#1}%
+ \def\floatlabel{#2}%
+ \def\floatloc{#3}% we do nothing with this yet.
+ %
+ \ifx\floattype\empty
+ \let\safefloattype=\empty
+ \else
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ \fi
+ %
+ % If label is given but no type, we handle that as the empty type.
+ \ifx\floatlabel\empty \else
+ % We want each FLOATTYPE to be numbered separately (Figure 1,
+ % Table 1, Figure 2, ...). (And if no label, no number.)
+ %
+ \expandafter\getfloatno\csname\safefloattype floatno\endcsname
+ \global\advance\floatno by 1
+ %
+ {%
+ % This magic value for \thissection is output by \setref as the
+ % XREFLABEL-title value. \xrefX uses it to distinguish float
+ % labels (which have a completely different output format) from
+ % node and anchor labels. And \xrdef uses it to construct the
+ % lists of floats.
+ %
+ \edef\thissection{\floatmagic=\safefloattype}%
+ \setref{\floatlabel}{Yfloat}%
+ }%
+ \fi
+ %
+ % start with \parskip glue, I guess.
+ \vskip\parskip
+ %
+ % Don't suppress indentation if a float happens to start a section.
+ \restorefirstparagraphindent
+}
+
+% we have these possibilities:
+% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
+% @float Foo,lbl & no caption: Foo 1.1
+% @float Foo & @caption{Cap}: Foo: Cap
+% @float Foo & no caption: Foo
+% @float ,lbl & Caption{Cap}: 1.1: Cap
+% @float ,lbl & no caption: 1.1
+% @float & @caption{Cap}: Cap
+% @float & no caption:
+%
+\def\Efloat{%
+ \let\floatident = \empty
+ %
+ % In all cases, if we have a float type, it comes first.
+ \ifx\floattype\empty \else \def\floatident{\floattype}\fi
+ %
+ % If we have an xref label, the number comes next.
+ \ifx\floatlabel\empty \else
+ \ifx\floattype\empty \else % if also had float type, need tie first.
+ \appendtomacro\floatident{\tie}%
+ \fi
+ % the number.
+ \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
+ \fi
+ %
+ % Start the printed caption with what we've constructed in
+ % \floatident, but keep it separate; we need \floatident again.
+ \let\captionline = \floatident
+ %
+ \ifx\thiscaption\empty \else
+ \ifx\floatident\empty \else
+ \appendtomacro\captionline{: }% had ident, so need a colon between
+ \fi
+ %
+ % caption text.
+ \appendtomacro\captionline{\scanexp\thiscaption}%
+ \fi
+ %
+ % If we have anything to print, print it, with space before.
+ % Eventually this needs to become an \insert.
+ \ifx\captionline\empty \else
+ \vskip.5\parskip
+ \captionline
+ %
+ % Space below caption.
+ \vskip\parskip
+ \fi
+ %
+ % If have an xref label, write the list of floats info. Do this
+ % after the caption, to avoid chance of it being a breakpoint.
+ \ifx\floatlabel\empty \else
+ % Write the text that goes in the lof to the aux file as
+ % \floatlabel-lof. Besides \floatident, we include the short
+ % caption if specified, else the full caption if specified, else nothing.
+ {%
+ \atdummies
+ %
+ % since we read the caption text in the macro world, where ^^M
+ % is turned into a normal character, we have to scan it back, so
+ % we don't write the literal three characters "^^M" into the aux file.
+ \scanexp{%
+ \xdef\noexpand\gtemp{%
+ \ifx\thisshortcaption\empty
+ \thiscaption
+ \else
+ \thisshortcaption
+ \fi
+ }%
+ }%
+ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
+ }%
+ \fi
+ \egroup % end of \vtop
+ %
+ % place the captured inserts
+ %
+ % BEWARE: when the floats start floating, we have to issue warning
+ % whenever an insert appears inside a float which could possibly
+ % float. --kasal, 26may04
+ %
+ \checkinserts
+}
+
+% Append the tokens #2 to the definition of macro #1, not expanding either.
+%
+\def\appendtomacro#1#2{%
+ \expandafter\def\expandafter#1\expandafter{#1#2}%
+}
+
+% @caption, @shortcaption
+%
+\def\caption{\docaption\thiscaption}
+\def\shortcaption{\docaption\thisshortcaption}
+\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
+\def\defcaption#1#2{\egroup \def#1{#2}}
+
+% The parameter is the control sequence identifying the counter we are
+% going to use. Create it if it doesn't exist and assign it to \floatno.
+\def\getfloatno#1{%
+ \ifx#1\relax
+ % Haven't seen this figure type before.
+ \csname newcount\endcsname #1%
+ %
+ % Remember to reset this floatno at the next chap.
+ \expandafter\gdef\expandafter\resetallfloatnos
+ \expandafter{\resetallfloatnos #1=0 }%
+ \fi
+ \let\floatno#1%
+}
+
+% \setref calls this to get the XREFLABEL-snt value. We want an @xref
+% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
+% first read the @float command.
+%
+\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
+
+% Magic string used for the XREFLABEL-title value, so \xrefX can
+% distinguish floats from other xref types.
+\def\floatmagic{!!float!!}
+
+% #1 is the control sequence we are passed; we expand into a conditional
+% which is true if #1 represents a float ref. That is, the magic
+% \thissection value which we \setref above.
+%
+\def\iffloat#1{\expandafter\doiffloat#1==\finish}
+%
+% #1 is (maybe) the \floatmagic string. If so, #2 will be the
+% (safe) float type for this float. We set \iffloattype to #2.
+%
+\def\doiffloat#1=#2=#3\finish{%
+ \def\temp{#1}%
+ \def\iffloattype{#2}%
+ \ifx\temp\floatmagic
+}
+
+% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
+%
+\parseargdef\listoffloats{%
+ \def\floattype{#1}% floattype
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ %
+ % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
+ \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
+ \ifhavexrefs
+ % if the user said @listoffloats foo but never @float foo.
+ \message{\linenumber No `\safefloattype' floats to list.}%
+ \fi
+ \else
+ \begingroup
+ \leftskip=\tocindent % indent these entries like a toc
+ \let\do=\listoffloatsdo
+ \csname floatlist\safefloattype\endcsname
+ \endgroup
+ \fi
+}
+
+% This is called on each entry in a list of floats. We're passed the
+% xref label, in the form LABEL-title, which is how we save it in the
+% aux file. We strip off the -title and look up \XRLABEL-lof, which
+% has the text we're supposed to typeset here.
+%
+% Figures without xref labels will not be included in the list (since
+% they won't appear in the aux file).
+%
+\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
+\def\listoffloatsdoentry#1-title\finish{{%
+ % Can't fully expand XR#1-lof because it can contain anything. Just
+ % pass the control sequence. On the other hand, XR#1-pg is just the
+ % page number, and we want to fully expand that so we can get a link
+ % in pdf output.
+ \toksA = \expandafter{\csname XR#1-lof\endcsname}%
+ %
+ % use the same \entry macro we use to generate the TOC and index.
+ \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
+ \writeentry
+}}
+
+\message{localization,}
+% and i18n.
+
+% @documentlanguage is usually given very early, just after
+% @setfilename. If done too late, it may not override everything
+% properly. Single argument is the language abbreviation.
+% It would be nice if we could set up a hyphenation file here.
+%
+\parseargdef\documentlanguage{%
+ \tex % read txi-??.tex file in plain TeX.
+ % Read the file if it exists.
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \else
+ \input txi-#1.tex
+ \fi
+ \closein 1
+ \endgroup
+}
+\newhelp\nolanghelp{The given language definition file cannot be found or
+is empty. Maybe you need to install it? In the current directory
+should work if nowhere else does.}
+
+
+% @documentencoding should change something in TeX eventually, most
+% likely, but for now just recognize it.
+\let\documentencoding = \comment
+
+
+% Page size parameters.
+%
+\newdimen\defaultparindent \defaultparindent = 15pt
+
+\chapheadingskip = 15pt plus 4pt minus 2pt
+\secheadingskip = 12pt plus 3pt minus 2pt
+\subsecheadingskip = 9pt plus 2pt minus 2pt
+
+% Prevent underfull vbox error messages.
+\vbadness = 10000
+
+% Don't be so finicky about underfull hboxes, either.
+\hbadness = 2000
+
+% Following George Bush, just get rid of widows and orphans.
+\widowpenalty=10000
+\clubpenalty=10000
+
+% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
+% using an old version of TeX, don't do anything. We want the amount of
+% stretch added to depend on the line length, hence the dependence on
+% \hsize. We call this whenever the paper size is set.
+%
+\def\setemergencystretch{%
+ \ifx\emergencystretch\thisisundefined
+ % Allow us to assign to \emergencystretch anyway.
+ \def\emergencystretch{\dimen0}%
+ \else
+ \emergencystretch = .15\hsize
+ \fi
+}
+
+% Parameters in order: 1) textheight; 2) textwidth;
+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+% 7) physical page height; 8) physical page width.
+%
+% We also call \setleading{\textleading}, so the caller should define
+% \textleading. The caller should also set \parskip.
+%
+\def\internalpagesizes#1#2#3#4#5#6#7#8{%
+ \voffset = #3\relax
+ \topskip = #6\relax
+ \splittopskip = \topskip
+ %
+ \vsize = #1\relax
+ \advance\vsize by \topskip
+ \outervsize = \vsize
+ \advance\outervsize by 2\topandbottommargin
+ \pageheight = \vsize
+ %
+ \hsize = #2\relax
+ \outerhsize = \hsize
+ \advance\outerhsize by 0.5in
+ \pagewidth = \hsize
+ %
+ \normaloffset = #4\relax
+ \bindingoffset = #5\relax
+ %
+ \ifpdf
+ \pdfpageheight #7\relax
+ \pdfpagewidth #8\relax
+ \fi
+ %
+ \setleading{\textleading}
+ %
+ \parindent = \defaultparindent
+ \setemergencystretch
+}
+
+% @letterpaper (the default).
+\def\letterpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % If page is nothing but text, make it come out even.
+ \internalpagesizes{46\baselineskip}{6in}%
+ {\voffset}{.25in}%
+ {\bindingoffset}{36pt}%
+ {11in}{8.5in}%
+}}
+
+% Use @smallbook to reset parameters for 7x9.25 trim size.
+\def\smallbook{{\globaldefs = 1
+ \parskip = 2pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.5in}{5in}%
+ {\voffset}{.25in}%
+ {\bindingoffset}{16pt}%
+ {9.25in}{7in}%
+ %
+ \lispnarrowing = 0.3in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .5cm
+}}
+
+% Use @smallerbook to reset parameters for 6x9 trim size.
+% (Just testing, parameters still in flux.)
+\def\smallerbook{{\globaldefs = 1
+ \parskip = 1.5pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.4in}{4.8in}%
+ {-.2in}{-.4in}%
+ {0pt}{14pt}%
+ {9in}{6in}%
+ %
+ \lispnarrowing = 0.25in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .4cm
+}}
+
+% Use @afourpaper to print on European A4 paper.
+\def\afourpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % Double-side printing via postscript on Laserjet 4050
+ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
+ % To change the settings for a different printer or situation, adjust
+ % \normaloffset until the front-side and back-side texts align. Then
+ % do the same for \bindingoffset. You can set these for testing in
+ % your texinfo source file like this:
+ % @tex
+ % \global\normaloffset = -6mm
+ % \global\bindingoffset = 10mm
+ % @end tex
+ \internalpagesizes{51\baselineskip}{160mm}
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{44pt}%
+ {297mm}{210mm}%
+ %
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 5mm
+}}
+
+% Use @afivepaper to print on European A5 paper.
+% From romildo@urano.iceb.ufop.br, 2 July 2000.
+% He also recommends making @example and @lisp be small.
+\def\afivepaper{{\globaldefs = 1
+ \parskip = 2pt plus 1pt minus 0.1pt
+ \textleading = 12.5pt
+ %
+ \internalpagesizes{160mm}{120mm}%
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{8pt}%
+ {210mm}{148mm}%
+ %
+ \lispnarrowing = 0.2in
+ \tolerance = 800
+ \hfuzz = 1.2pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 2mm
+ \tableindent = 12mm
+}}
+
+% A specific text layout, 24x15cm overall, intended for A4 paper.
+\def\afourlatex{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{237mm}{150mm}%
+ {\voffset}{4.6mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ %
+ % Must explicitly reset to 0 because we call \afourpaper.
+ \globaldefs = 0
+}}
+
+% Use @afourwide to print on A4 paper in landscape format.
+\def\afourwide{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{241mm}{165mm}%
+ {\voffset}{-2.95mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ \globaldefs = 0
+}}
+
+% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
+% Perhaps we should allow setting the margins, \topskip, \parskip,
+% and/or leading, also. Or perhaps we should compute them somehow.
+%
+\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
+\def\pagesizesyyy#1,#2,#3\finish{{%
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
+ \globaldefs = 1
+ %
+ \parskip = 3pt plus 2pt minus 1pt
+ \setleading{\textleading}%
+ %
+ \dimen0 = #1
+ \advance\dimen0 by \voffset
+ %
+ \dimen2 = \hsize
+ \advance\dimen2 by \normaloffset
+ %
+ \internalpagesizes{#1}{\hsize}%
+ {\voffset}{\normaloffset}%
+ {\bindingoffset}{44pt}%
+ {\dimen0}{\dimen2}%
+}}
+
+% Set default to letter.
+%
+\letterpaper
+
+
+\message{and turning on texinfo input format.}
+
+% Define macros to output various characters with catcode for normal text.
+\catcode`\"=\other
+\catcode`\~=\other
+\catcode`\^=\other
+\catcode`\_=\other
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode`\+=\other
+\catcode`\$=\other
+\def\normaldoublequote{"}
+\def\normaltilde{~}
+\def\normalcaret{^}
+\def\normalunderscore{_}
+\def\normalverticalbar{|}
+\def\normalless{<}
+\def\normalgreater{>}
+\def\normalplus{+}
+\def\normaldollar{$}%$ font-lock fix
+
+% This macro is used to make a character print one way in \tt
+% (where it can probably be output as-is), and another way in other fonts,
+% where something hairier probably needs to be done.
+%
+% #1 is what to print if we are indeed using \tt; #2 is what to print
+% otherwise. Since all the Computer Modern typewriter fonts have zero
+% interword stretch (and shrink), and it is reasonable to expect all
+% typewriter fonts to have this, we can check that font parameter.
+%
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font. Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts. But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary).
+% Most of these we simply print from the \tt font, but for some, we can
+% use math or other variants that look better in normal text.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt\char34}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt\char126}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+
+\catcode`\_=\active
+\def_{\ifusingtt\normalunderscore\_}
+\let\realunder=_
+% Subroutine for the previous macro.
+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+
+\catcode`\|=\active
+\def|{{\tt\char124}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+% Used sometimes to turn off (effectively) the active characters even after
+% parsing them.
+\def\turnoffactive{%
+ \normalturnoffactive
+ \otherbackslash
+}
+
+\catcode`\@=0
+
+% \backslashcurfont outputs one backslash character in current font,
+% as in \char`\\.
+\global\chardef\backslashcurfont=`\\
+\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
+
+% \realbackslash is an actual character `\' with catcode other, and
+% \doublebackslash is two of them (for the pdf outlines).
+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
+
+% In texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active
+@def@normalbackslash{{@tt@backslashcurfont}}
+% On startup, @fixbackslash assigns:
+% @let \ = @normalbackslash
+
+% \rawbackslash defines an active \ to do \backslashcurfont.
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other.
+@gdef@rawbackslash{@let\=@backslashcurfont}
+@gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+@def@normalturnoffactive{%
+ @let\=@normalbackslash
+ @let"=@normaldoublequote
+ @let~=@normaltilde
+ @let^=@normalcaret
+ @let_=@normalunderscore
+ @let|=@normalverticalbar
+ @let<=@normalless
+ @let>=@normalgreater
+ @let+=@normalplus
+ @let$=@normaldollar %$ font-lock fix
+ @unsepspaces
+}
+
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
+
+% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
+% That is what \eatinput is for; after that, the `\' should revert to printing
+% a backslash.
+%
+@gdef@eatinput input texinfo{@fixbackslash}
+@global@let\ = @eatinput
+
+% On the other hand, perhaps the file did not have a `\input texinfo'. Then
+% the first `\' in the file would cause an error. This macro tries to fix
+% that, assuming it is called before the first `\' could plausibly occur.
+% Also turn back on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
+@gdef@fixbackslash{%
+ @ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active
+ @catcode`@_=@active
+}
+
+% Say @foo, not \foo, in error messages.
+@escapechar = `@@
+
+% These look ok in all fonts, so just make them not special.
+@catcode`@& = @other
+@catcode`@# = @other
+@catcode`@% = @other
+
+
+@c Local variables:
+@c eval: (add-hook 'write-file-hooks 'time-stamp)
+@c page-delimiter: "^\\\\message"
+@c time-stamp-start: "def\\\\texinfoversion{"
+@c time-stamp-format: "%:y-%02m-%02d.%02H"
+@c time-stamp-end: "}"
+@c End:
+
+@c vim:sw=2:
+
+@ignore
+ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
+@end ignore
diff --git a/e2fsck/Android.bp b/e2fsck/Android.bp
new file mode 100644
index 0000000..b42de9d
--- /dev/null
+++ b/e2fsck/Android.bp
@@ -0,0 +1,86 @@
+// Copyright 2017 The Android Open Source Project
+
+//########################
+// Build the e2fsck binary
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-GPL-2.0
+ // SPDX-license-identifier-LGPL
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_defaults {
+ name: "e2fsck-defaults",
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "e2fsck.c",
+ "super.c",
+ "pass1.c",
+ "pass1b.c",
+ "pass2.c",
+ "pass3.c",
+ "pass4.c",
+ "pass5.c",
+ "logfile.c",
+ "journal.c",
+ "recovery.c",
+ "revoke.c",
+ "badblocks.c",
+ "util.c",
+ "unix.c",
+ "dirinfo.c",
+ "dx_dirinfo.c",
+ "ehandler.c",
+ "problem.c",
+ "message.c",
+ "ea_refcount.c",
+ "quota.c",
+ "rehash.c",
+ "region.c",
+ "sigcatcher.c",
+ "readahead.c",
+ "extents.c",
+ "encrypted_files.c",
+ ],
+}
+
+e2fsck_libs = [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_com_err",
+ "libext2_uuid",
+ "libext2_quota",
+ "libext2_e2p",
+]
+
+cc_binary {
+ name: "e2fsck",
+ host_supported: true,
+ vendor_ramdisk_available: true,
+ defaults: ["e2fsck-defaults"],
+
+ shared_libs: e2fsck_libs,
+ required: ["badblocks"],
+}
+
+cc_binary {
+ name: "e2fsck_static",
+ static_executable: true,
+ defaults: ["e2fsck-defaults"],
+
+ static_libs: e2fsck_libs,
+}
+
+cc_binary {
+ name: "e2fsck_ramdisk",
+ stem: "e2fsck",
+ static_executable: true,
+ ramdisk: true,
+ defaults: ["e2fsck-defaults"],
+ static_libs: e2fsck_libs,
+}
diff --git a/e2fsck/CHANGES b/e2fsck/CHANGES
new file mode 100644
index 0000000..eb4cfde
--- /dev/null
+++ b/e2fsck/CHANGES
@@ -0,0 +1,53 @@
+[tytso:19940101.1200EST]
+
+Add new options -l and -L, to append to and modify the bad-blocks list.
+
+Fix bugs in bad-block cloning.
+
+[tytso:19931230.1832EST]
+
+Clean up e2fsck and library to be clean even when compiling with full
+warnings enabled.
+
+Make e2fsck deal with zero-length directories correctly.
+
+Deleted inodes from old ext2fs code (inodes with dtime set but
+non-zero link count) are detected, and the user is given the
+opportunity to clear them.
+
+The last bit in the last group of the block bitmap padding was not
+being checked; now fixed.
+
+The free_blocks and free_inodes count in the last group weren't being
+checked. Now fixed.
+
+[tytso:19931101.0007EST]
+
+Fixed bugs with root reallocation; previously the parent pointers in
+the dirinfo structure would get corrupted, causing many different '..'
+links to be wrong. Also, the inode link count for the root directory
+wasn't always being set correctly. (All of this would be fixed on
+the second e2fsck, however).
+
+Fixed to recognize filesystem corruption caused by mke2fs 0.2b (where
+/ and /lost+found had non-zero dtime entries). Offers to fix /'s
+dtime entry.
+
+e2fsck will now expand the /lost+found directory if it runs out of room.
+
+Fixed dependency on BLOCK_SIZE in pass2. e2fsck will now handle 4k
+filesystems w/o problems.
+
+e2fsck will now move bad blocks found in the inode bitmaps, block
+bitmaps, and in the inode tables. (Can't handle bad blocks found in
+the superblock and the group descriptors.) (Doesn't update alternate
+superblocks, group descriptors.)
+
+e2fsck now supports the -b option, to allow a user to specify an
+alternate superblock.
+
+The -B option now specifies the blocksize of the filesystem. (If not
+specified, and the -b option is specified, e2fsck will attempt to
+search through various blocksizes to find the correct one.)
+
+Added manual page.
diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in
new file mode 100644
index 0000000..fbb7b15
--- /dev/null
+++ b/e2fsck/Makefile.in
@@ -0,0 +1,656 @@
+#
+# Makefile for e2fsck
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = e2fsck
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+PROGS= e2fsck
+MANPAGES= e2fsck.8
+FMANPAGES= e2fsck.conf.5
+
+LIBS= $(LIBSUPPORT) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(LIBUUID) \
+ $(LIBINTL) $(LIBE2P) $(LIBMAGIC) $(SYSLIBS)
+DEPLIBS= $(DEPLIBSUPPORT) $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(DEPLIBBLKID) \
+ $(DEPLIBUUID) $(DEPLIBE2P)
+
+STATIC_LIBS= $(STATIC_LIBSUPPORT) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+ $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(STATIC_LIBE2P) \
+ $(LIBMAGIC) $(SYSLIBS)
+STATIC_DEPLIBS= $(DEPSTATIC_LIBSUPPORT) $(STATIC_LIBEXT2FS) \
+ $(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBBLKID) \
+ $(DEPSTATIC_LIBUUID) $(DEPSTATIC_LIBE2P)
+
+PROFILED_LIBS= $(PROFILED_LIBSUPPORT) $(PROFILED_LIBEXT2FS) \
+ $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) \
+ $(PROFILED_LIBE2P) $(LIBINTL) $(LIBMAGIC) $(SYSLIBS)
+PROFILED_DEPLIBS= $(DEPPROFILED_LIBSUPPORT) $(PROFILED_LIBEXT2FS) \
+ $(DEPPROFILED_LIBCOM_ERR) $(DEPPROFILED_LIBBLKID) \
+ $(DEPPROFILED_LIBUUID) $(DEPPROFILED_LIBE2P)
+
+COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../lib/et/et ../lib/et/compile_et
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+#
+# Flags for doing mtrace --- uncomment to produce mtracing e2fsck
+# Note: The optimization flags must include -g
+#
+#MTRACE= -DMTRACE
+#MTRACE_OBJ= mtrace.o
+#MTRACE_SRC= $(srcdir)/mtrace.c
+#OPT= -g
+
+#
+# Flags for doing mcheck --- uncomment to produce mchecking e2fsck
+# Note: The optimization flags must include -g
+#
+#MCHECK= -DMCHECK
+
+OBJS= unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o \
+ pass3.o pass4.o pass5.o journal.o badblocks.o util.o dirinfo.o \
+ dx_dirinfo.o ehandler.o problem.o message.o quota.o recovery.o \
+ region.o revoke.o ea_refcount.o rehash.o \
+ logfile.o sigcatcher.o $(MTRACE_OBJ) readahead.o \
+ extents.o encrypted_files.o
+
+PROFILED_OBJS= profiled/unix.o profiled/e2fsck.o \
+ profiled/super.o profiled/pass1.o profiled/pass1b.o \
+ profiled/pass2.o profiled/pass3.o profiled/pass4.o profiled/pass5.o \
+ profiled/journal.o profiled/badblocks.o profiled/util.o \
+ profiled/dirinfo.o profiled/dx_dirinfo.o profiled/ehandler.o \
+ profiled/message.o profiled/problem.o profiled/quota.o \
+ profiled/recovery.o profiled/region.o profiled/revoke.o \
+ profiled/ea_refcount.o profiled/rehash.o \
+ profiled/logfile.o profiled/sigcatcher.o \
+ profiled/readahead.o profiled/extents.o \
+ profiled/encrypted_files.o
+
+SRCS= $(srcdir)/e2fsck.c \
+ $(srcdir)/super.c \
+ $(srcdir)/pass1.c \
+ $(srcdir)/pass1b.c \
+ $(srcdir)/pass2.c \
+ $(srcdir)/pass3.c \
+ $(srcdir)/pass4.c \
+ $(srcdir)/pass5.c \
+ $(srcdir)/journal.c \
+ $(srcdir)/recovery.c \
+ $(srcdir)/revoke.c \
+ $(srcdir)/badblocks.c \
+ $(srcdir)/util.c \
+ $(srcdir)/unix.c \
+ $(srcdir)/dirinfo.c \
+ $(srcdir)/dx_dirinfo.c \
+ $(srcdir)/ehandler.c \
+ $(srcdir)/problem.c \
+ $(srcdir)/message.c \
+ $(srcdir)/ea_refcount.c \
+ $(srcdir)/rehash.c \
+ $(srcdir)/readahead.c \
+ $(srcdir)/region.c \
+ $(srcdir)/sigcatcher.c \
+ $(srcdir)/logfile.c \
+ $(srcdir)/quota.c \
+ $(srcdir)/extents.c \
+ $(srcdir)/encrypted_files.c \
+ $(MTRACE_SRC)
+
+all:: profiled $(PROGS) e2fsck $(MANPAGES) $(FMANPAGES)
+
+@PROFILE_CMT@all:: e2fsck.profiled
+
+all-static:: e2fsck.static
+
+e2fsck: $(OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) $(RDYNAMIC) -o e2fsck $(OBJS) $(LIBS)
+
+e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(LDFLAGS_STATIC) -o e2fsck.static $(OBJS) $(STATIC_LIBS)
+
+e2fsck.profiled: $(OBJS) $(PROFILED_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
+ $(PROFILED_LIBS)
+
+tst_sigcatcher: $(srcdir)/sigcatcher.c sigcatcher.o
+ $(E) " CC $@"
+ $(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(RDYNAMIC) \
+ $(srcdir)/sigcatcher.c -DDEBUG -o tst_sigcatcher
+
+tst_problem: $(srcdir)/problem.c $(srcdir)/problem.h $(LIBEXT2FS) \
+ $(DEPLIBCOM_ERR)
+ $(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o tst_problem \
+ $(srcdir)/problem.c -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR) \
+ $(LIBINTL) $(SYSLIBS)
+
+tst_refcount: ea_refcount.c $(DEPLIBCOM_ERR) $(LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_refcount $(srcdir)/ea_refcount.c \
+ $(ALL_CFLAGS) $(ALL_LDFLAGS) -DTEST_PROGRAM \
+ $(LIBCOM_ERR) $(LIBEXT2FS) $(SYSLIBS)
+
+tst_logfile: $(srcdir)/logfile.c
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_logfile $(srcdir)/logfile.c \
+ $(ALL_CFLAGS) $(ALL_LDFLAGS) -DTEST_PROGRAM $(SYSLIBS)
+
+tst_region: region.c $(LIBEXT2FS) $(DEPLIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_region $(srcdir)/region.c \
+ $(ALL_CFLAGS) $(ALL_LDFLAGS) -DTEST_PROGRAM \
+ $(LIBEXT2FS) $(LIBCOM_ERR) $(SYSLIBS)
+
+fullcheck check:: tst_refcount tst_region tst_problem
+ $(TESTENV) ./tst_refcount
+ $(TESTENV) ./tst_region
+ $(TESTENV) ./tst_problem
+
+extend: extend.o
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)
+
+flushb: flushb.o
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)
+
+iscan: iscan.o $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) -o iscan iscan.o $(LIBS)
+
+iscan.static: iscan.o $(STATIC_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(LDFLAGS_STATIC) -o iscan.static iscan.o $(STATIC_LIBS)
+
+test_profile: $(srcdir)/profile.c profile_helpers.o argv_parse.o \
+ prof_err.o profile.h $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o test_profile -DDEBUG_PROGRAM $(srcdir)/profile.c prof_err.o \
+ profile_helpers.o argv_parse.o $(STATIC_LIBCOM_ERR) \
+ $(ALL_CFLAGS)
+
+profiled:
+@PROFILE_CMT@ $(E) " MKDIR $@"
+@PROFILE_CMT@ $(Q) mkdir profiled
+
+e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2fsck.8.in e2fsck.8
+
+e2fsck.conf.5: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.conf.5.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2fsck.conf.5.in e2fsck.conf.5
+
+installdirs:
+ $(E) " MKDIR_P $(root_sbindir) $(man8dir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(root_sbindir) \
+ $(DESTDIR)$(man8dir) $(DESTDIR)$(man5dir)
+
+install: $(PROGS) $(MANPAGES) $(FMANPAGES) installdirs
+ $(Q) for i in $(PROGS); do \
+ $(ES) " INSTALL $(root_sbindir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(Q) for i in ext2 ext3 ext4; do \
+ $(ES) " LINK $(root_sbindir)/fsck.$$i"; \
+ (cd $(DESTDIR)$(root_sbindir); \
+ $(LN) $(LINK_INSTALL_FLAGS) e2fsck fsck.$$i); \
+ done
+ $(Q) for i in $(MANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
+ done; \
+ $(ES) " INSTALL_DATA $(man8dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+ done
+ $(Q) for i in $(FMANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man5dir)/$$i.$$j; \
+ done; \
+ $(ES) " INSTALL_DATA $(man5dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man5dir)/$$i; \
+ done
+ $(Q) for i in ext2 ext3 ext4; do \
+ $(ES) " LINK $(man8dir)/fsck.$$i.8"; \
+ (cd $(DESTDIR)$(man8dir); \
+ $(LN) $(LINK_INSTALL_FLAGS) e2fsck.8 fsck.$$i.8); \
+ done
+
+install-strip: install
+ $(Q) for i in $(PROGS); do \
+ $(ES) " STRIP $(root_sbindir)/$$i"; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+
+uninstall:
+ for i in $(PROGS); do \
+ $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2 \
+ $(DESTDIR)$(root_sbindir)/fsck.ext3 \
+ $(DESTDIR)$(root_sbindir)/fsck.ext4
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
+ done
+ for i in $(FMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man5dir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2 \
+ $(DESTDIR)$(root_sbindir)/fsck.ext3 \
+ $(DESTDIR)$(root_sbindir)/fsck.ext4
+
+clean::
+ $(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
+ e2fsck.shared e2fsck.profiled flushb e2fsck.8 \
+ tst_problem tst_region tst_refcount tst_crc32 \
+ gen_crc32table e2fsck.conf.5 \
+ prof_err.c prof_err.h test_profile iscan iscan.static
+ $(RM) -rf profiled
+
+mostlyclean: clean
+distclean: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+e2fsck.o: $(srcdir)/e2fsck.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+super.o: $(srcdir)/super.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+pass1.o: $(srcdir)/pass1.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/problem.h
+pass1b.o: $(srcdir)/pass1b.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h $(top_srcdir)/lib/support/dict.h
+pass2.o: $(srcdir)/pass2.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h $(top_srcdir)/lib/support/dict.h
+pass3.o: $(srcdir)/pass3.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+pass4.o: $(srcdir)/pass4.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+pass5.o: $(srcdir)/pass5.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+journal.o: $(srcdir)/journal.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(srcdir)/problem.h
+recovery.o: $(srcdir)/recovery.c $(srcdir)/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h
+revoke.o: $(srcdir)/revoke.c $(srcdir)/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h
+badblocks.o: $(srcdir)/badblocks.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+util.o: $(srcdir)/util.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+unix.o: $(srcdir)/unix.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/support/plausible.h \
+ $(top_srcdir)/lib/support/devname.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h $(srcdir)/jfs_user.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/version.h
+dirinfo.o: $(srcdir)/dirinfo.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/tdb.h
+dx_dirinfo.o: $(srcdir)/dx_dirinfo.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+ehandler.o: $(srcdir)/ehandler.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+problem.o: $(srcdir)/problem.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h $(srcdir)/problemP.h
+message.o: $(srcdir)/message.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/support/profile.h $(top_builddir)/lib/support/prof_err.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+ea_refcount.o: $(srcdir)/ea_refcount.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+rehash.o: $(srcdir)/rehash.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h $(top_srcdir)/lib/support/sort_r.h
+readahead.o: $(srcdir)/readahead.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+region.o: $(srcdir)/region.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+sigcatcher.o: $(srcdir)/sigcatcher.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+logfile.o: $(srcdir)/logfile.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+quota.o: $(srcdir)/quota.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+extents.o: $(srcdir)/extents.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h
+encrypted_files.o: $(srcdir)/encrypted_files.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(srcdir)/problem.h $(top_srcdir)/lib/ext2fs/rbtree.h
diff --git a/e2fsck/badblocks.c b/e2fsck/badblocks.c
new file mode 100644
index 0000000..fec5f10
--- /dev/null
+++ b/e2fsck/badblocks.c
@@ -0,0 +1,142 @@
+/*
+ * badblocks.c --- replace/append bad blocks to the bad block inode
+ *
+ * Copyright (C) 1993, 1994 Theodore Ts'o. This file may be
+ * redistributed under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include <et/com_err.h>
+#include "e2fsck.h"
+
+static int check_bb_inode_blocks(ext2_filsys fs, blk_t *block_nr, int blockcnt,
+ void *priv_data);
+
+
+static void invalid_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk_t blk)
+{
+ printf(_("Bad block %u out of range; ignored.\n"), blk);
+ return;
+}
+
+void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file,
+ int replace_bad_blocks)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ badblocks_list bb_list = 0;
+ FILE *f;
+ char buf[1024];
+
+ e2fsck_read_bitmaps(ctx);
+
+ /*
+ * Make sure the bad block inode is sane. If there are any
+ * illegal blocks, clear them.
+ */
+ retval = ext2fs_block_iterate(fs, EXT2_BAD_INO, 0, 0,
+ check_bb_inode_blocks, 0);
+ if (retval) {
+ com_err("ext2fs_block_iterate", retval, "%s",
+ _("while sanity checking the bad blocks inode"));
+ goto fatal;
+ }
+
+ /*
+ * If we're appending to the bad blocks inode, read in the
+ * current bad blocks.
+ */
+ if (!replace_bad_blocks) {
+ retval = ext2fs_read_bb_inode(fs, &bb_list);
+ if (retval) {
+ com_err("ext2fs_read_bb_inode", retval, "%s",
+ _("while reading the bad blocks inode"));
+ goto fatal;
+ }
+ }
+
+ /*
+ * Now read in the bad blocks from the file; if
+ * bad_blocks_file is null, then try to run the badblocks
+ * command.
+ */
+ if (bad_blocks_file) {
+ f = fopen(bad_blocks_file, "r");
+ if (!f) {
+ com_err("read_bad_blocks_file", errno,
+ _("while trying to open %s"), bad_blocks_file);
+ goto fatal;
+ }
+ } else {
+ sprintf(buf, "badblocks -b %d -X %s%s%s %llu", fs->blocksize,
+ (ctx->options & E2F_OPT_PREEN) ? "" : "-s ",
+ (ctx->options & E2F_OPT_WRITECHECK) ? "-n " : "",
+ fs->device_name,
+ (unsigned long long) ext2fs_blocks_count(fs->super)-1);
+ f = popen(buf, "r");
+ if (!f) {
+ com_err("read_bad_blocks_file", errno,
+ _("while trying popen '%s'"), buf);
+ goto fatal;
+ }
+ }
+ retval = ext2fs_read_bb_FILE(fs, f, &bb_list, invalid_block);
+ if (bad_blocks_file)
+ fclose(f);
+ else
+ pclose(f);
+ if (retval) {
+ com_err("ext2fs_read_bb_FILE", retval, "%s",
+ _("while reading in list of bad blocks from file"));
+ goto fatal;
+ }
+
+ /*
+ * Finally, update the bad blocks from the bad_block_map
+ */
+ printf("%s: Updating bad block inode.\n", ctx->device_name);
+ retval = ext2fs_update_bb_inode(fs, bb_list);
+ if (retval) {
+ com_err("ext2fs_update_bb_inode", retval, "%s",
+ _("while updating bad block inode"));
+ goto fatal;
+ }
+
+ ext2fs_badblocks_list_free(bb_list);
+ return;
+
+fatal:
+ ctx->flags |= E2F_FLAG_ABORT;
+ if (bb_list)
+ ext2fs_badblocks_list_free(bb_list);
+ return;
+
+}
+
+static int check_bb_inode_blocks(ext2_filsys fs,
+ blk_t *block_nr,
+ int blockcnt EXT2FS_ATTR((unused)),
+ void *priv_data EXT2FS_ATTR((unused)))
+{
+ if (!*block_nr)
+ return 0;
+
+ /*
+ * If the block number is outrageous, clear it and ignore it.
+ */
+ if (*block_nr >= ext2fs_blocks_count(fs->super) ||
+ *block_nr < fs->super->s_first_data_block) {
+ printf(_("Warning: illegal block %u found in bad block inode. "
+ "Cleared.\n"), *block_nr);
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ }
+
+ return 0;
+}
+
diff --git a/e2fsck/dirinfo.c b/e2fsck/dirinfo.c
new file mode 100644
index 0000000..9873e38
--- /dev/null
+++ b/e2fsck/dirinfo.c
@@ -0,0 +1,489 @@
+/*
+ * dirinfo.c --- maintains the directory information table for e2fsck.
+ *
+ * Copyright (C) 1993 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#undef DIRINFO_DEBUG
+
+#include "config.h"
+#include "e2fsck.h"
+#include <sys/stat.h>
+#include <fcntl.h>
+#include "uuid/uuid.h"
+
+#include "ext2fs/ext2fs.h"
+#include <ext2fs/tdb.h>
+
+struct dir_info_db {
+ ext2_ino_t count;
+ ext2_ino_t size;
+ struct dir_info *array;
+ struct dir_info *last_lookup;
+#ifdef CONFIG_TDB
+ char *tdb_fn;
+ TDB_CONTEXT *tdb;
+#endif
+};
+
+struct dir_info_iter {
+ ext2_ino_t i;
+#ifdef CONFIG_TDB
+ TDB_DATA tdb_iter;
+#endif
+};
+
+struct dir_info_ent {
+ ext2_ino_t dotdot; /* Parent according to '..' */
+ ext2_ino_t parent; /* Parent according to treewalk */
+};
+
+
+static void e2fsck_put_dir_info(e2fsck_t ctx, struct dir_info *dir);
+
+#ifdef CONFIG_TDB
+static void setup_tdb(e2fsck_t ctx, ext2_ino_t num_dirs)
+{
+ struct dir_info_db *db = ctx->dir_info;
+ ext2_ino_t threshold;
+ errcode_t retval;
+ mode_t save_umask;
+ char *tdb_dir, uuid[40];
+ int fd, enable;
+
+ profile_get_string(ctx->profile, "scratch_files", "directory", 0, 0,
+ &tdb_dir);
+ profile_get_uint(ctx->profile, "scratch_files",
+ "numdirs_threshold", 0, 0, &threshold);
+ profile_get_boolean(ctx->profile, "scratch_files",
+ "dirinfo", 0, 1, &enable);
+
+ if (!enable || !tdb_dir || access(tdb_dir, W_OK) ||
+ (threshold && num_dirs <= threshold))
+ return;
+
+ retval = ext2fs_get_mem(strlen(tdb_dir) + 64, &db->tdb_fn);
+ if (retval)
+ return;
+
+ uuid_unparse(ctx->fs->super->s_uuid, uuid);
+ sprintf(db->tdb_fn, "%s/%s-dirinfo-XXXXXX", tdb_dir, uuid);
+ save_umask = umask(077);
+ fd = mkstemp(db->tdb_fn);
+ umask(save_umask);
+ if (fd < 0) {
+ db->tdb = NULL;
+ return;
+ }
+
+ if (num_dirs < 99991)
+ num_dirs = 99991; /* largest 5 digit prime */
+
+ db->tdb = tdb_open(db->tdb_fn, num_dirs, TDB_NOLOCK | TDB_NOSYNC,
+ O_RDWR | O_CREAT | O_TRUNC, 0600);
+ close(fd);
+}
+#endif
+
+static void setup_db(e2fsck_t ctx)
+{
+ struct dir_info_db *db;
+ ext2_ino_t num_dirs;
+ errcode_t retval;
+
+ db = (struct dir_info_db *)
+ e2fsck_allocate_memory(ctx, sizeof(struct dir_info_db),
+ "directory map db");
+ db->count = db->size = 0;
+ db->array = 0;
+
+ ctx->dir_info = db;
+
+ retval = ext2fs_get_num_dirs(ctx->fs, &num_dirs);
+ if (retval)
+ num_dirs = 1024; /* Guess */
+
+#ifdef CONFIG_TDB
+ setup_tdb(ctx, num_dirs);
+
+ if (db->tdb) {
+#ifdef DIRINFO_DEBUG
+ printf("Note: using tdb!\n");
+#endif
+ return;
+ }
+#endif
+
+ db->size = num_dirs + 10;
+ db->array = (struct dir_info *)
+ e2fsck_allocate_memory(ctx, db->size
+ * sizeof (struct dir_info),
+ "directory map");
+}
+
+/*
+ * This subroutine is called during pass1 to create a directory info
+ * entry. During pass1, the passed-in parent is 0; it will get filled
+ * in during pass2.
+ */
+void e2fsck_add_dir_info(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent)
+{
+ struct dir_info *dir, *old_array;
+ ext2_ino_t i, j;
+ errcode_t retval;
+ unsigned long old_size;
+
+#ifdef DIRINFO_DEBUG
+ printf("add_dir_info for inode (%u, %u)...\n", ino, parent);
+#endif
+ if (!ctx->dir_info)
+ setup_db(ctx);
+
+ if (ctx->dir_info->count >= ctx->dir_info->size) {
+ old_size = ctx->dir_info->size * sizeof(struct dir_info);
+ ctx->dir_info->size += 10;
+ old_array = ctx->dir_info->array;
+ retval = ext2fs_resize_mem(old_size, ctx->dir_info->size *
+ sizeof(struct dir_info),
+ &ctx->dir_info->array);
+ if (retval) {
+ fprintf(stderr, "Couldn't reallocate dir_info "
+ "structure to %u entries\n",
+ ctx->dir_info->size);
+ fatal_error(ctx, 0);
+ ctx->dir_info->size -= 10;
+ return;
+ }
+ if (old_array != ctx->dir_info->array)
+ ctx->dir_info->last_lookup = NULL;
+ }
+
+#ifdef CONFIG_TDB
+ if (ctx->dir_info->tdb) {
+ struct dir_info ent;
+
+ ent.ino = ino;
+ ent.parent = parent;
+ ent.dotdot = parent;
+ e2fsck_put_dir_info(ctx, &ent);
+ return;
+ }
+#endif
+
+ /*
+ * Normally, add_dir_info is called with each inode in
+ * sequential order; but once in a while (like when pass 3
+ * needs to recreate the root directory or lost+found
+ * directory) it is called out of order. In those cases, we
+ * need to move the dir_info entries down to make room, since
+ * the dir_info array needs to be sorted by inode number for
+ * get_dir_info()'s sake.
+ */
+ if (ctx->dir_info->count &&
+ ctx->dir_info->array[ctx->dir_info->count-1].ino >= ino) {
+ for (i = ctx->dir_info->count-1; i > 0; i--)
+ if (ctx->dir_info->array[i-1].ino < ino)
+ break;
+ dir = &ctx->dir_info->array[i];
+ if (dir->ino != ino)
+ for (j = ctx->dir_info->count++; j > i; j--)
+ ctx->dir_info->array[j] = ctx->dir_info->array[j-1];
+ } else
+ dir = &ctx->dir_info->array[ctx->dir_info->count++];
+
+ dir->ino = ino;
+ dir->dotdot = parent;
+ dir->parent = parent;
+}
+
+/*
+ * get_dir_info() --- given an inode number, try to find the directory
+ * information entry for it.
+ */
+static struct dir_info *e2fsck_get_dir_info(e2fsck_t ctx, ext2_ino_t ino)
+{
+ struct dir_info_db *db = ctx->dir_info;
+ ext2_ino_t low, high, mid;
+
+ if (!db)
+ return 0;
+
+#ifdef DIRINFO_DEBUG
+ printf("e2fsck_get_dir_info %u...", ino);
+#endif
+
+#ifdef CONFIG_TDB
+ if (db->tdb) {
+ static struct dir_info ret_dir_info;
+ TDB_DATA key, data;
+ struct dir_info_ent *buf;
+
+ key.dptr = (unsigned char *) &ino;
+ key.dsize = sizeof(ext2_ino_t);
+
+ data = tdb_fetch(db->tdb, key);
+ if (!data.dptr) {
+ if (tdb_error(db->tdb) != TDB_ERR_NOEXIST)
+ printf("fetch failed: %s\n",
+ tdb_errorstr(db->tdb));
+ return 0;
+ }
+
+ buf = (struct dir_info_ent *) data.dptr;
+ ret_dir_info.ino = ino;
+ ret_dir_info.dotdot = buf->dotdot;
+ ret_dir_info.parent = buf->parent;
+#ifdef DIRINFO_DEBUG
+ printf("(%u,%u,%u)\n", ino, buf->dotdot, buf->parent);
+#endif
+ free(data.dptr);
+ return &ret_dir_info;
+ }
+#endif
+
+ if (db->last_lookup && db->last_lookup->ino == ino)
+ return db->last_lookup;
+
+ low = 0;
+ high = ctx->dir_info->count - 1;
+ if (ino == ctx->dir_info->array[low].ino) {
+#ifdef DIRINFO_DEBUG
+ printf("(%u,%u,%u)\n", ino,
+ ctx->dir_info->array[low].dotdot,
+ ctx->dir_info->array[low].parent);
+#endif
+ return &ctx->dir_info->array[low];
+ }
+ if (ino == ctx->dir_info->array[high].ino) {
+#ifdef DIRINFO_DEBUG
+ printf("(%u,%u,%u)\n", ino,
+ ctx->dir_info->array[high].dotdot,
+ ctx->dir_info->array[high].parent);
+#endif
+ return &ctx->dir_info->array[high];
+ }
+
+ while (low < high) {
+ /* sum may overflow, but result will fit into mid again */
+ mid = (unsigned long long)(low + high) / 2;
+ if (mid == low || mid == high)
+ break;
+ if (ino == ctx->dir_info->array[mid].ino) {
+#ifdef DIRINFO_DEBUG
+ printf("(%u,%u,%u)\n", ino,
+ ctx->dir_info->array[mid].dotdot,
+ ctx->dir_info->array[mid].parent);
+#endif
+ return &ctx->dir_info->array[mid];
+ }
+ if (ino < ctx->dir_info->array[mid].ino)
+ high = mid;
+ else
+ low = mid;
+ }
+ return 0;
+}
+
+static void e2fsck_put_dir_info(e2fsck_t ctx EXT2FS_NO_TDB_UNUSED,
+ struct dir_info *dir EXT2FS_NO_TDB_UNUSED)
+{
+#ifdef CONFIG_TDB
+ struct dir_info_db *db = ctx->dir_info;
+ struct dir_info_ent buf;
+ TDB_DATA key, data;
+#endif
+
+#ifdef DIRINFO_DEBUG
+ printf("e2fsck_put_dir_info (%u, %u, %u)...", dir->ino, dir->dotdot,
+ dir->parent);
+#endif
+
+#ifdef CONFIG_TDB
+ if (!db->tdb)
+ return;
+
+ buf.parent = dir->parent;
+ buf.dotdot = dir->dotdot;
+
+ key.dptr = (unsigned char *) &dir->ino;
+ key.dsize = sizeof(ext2_ino_t);
+ data.dptr = (unsigned char *) &buf;
+ data.dsize = sizeof(buf);
+
+ if (tdb_store(db->tdb, key, data, TDB_REPLACE) == -1) {
+ printf("store failed: %s\n", tdb_errorstr(db->tdb));
+ }
+#endif
+}
+
+/*
+ * Free the dir_info structure when it isn't needed any more.
+ */
+void e2fsck_free_dir_info(e2fsck_t ctx)
+{
+ if (ctx->dir_info) {
+#ifdef CONFIG_TDB
+ if (ctx->dir_info->tdb)
+ tdb_close(ctx->dir_info->tdb);
+ if (ctx->dir_info->tdb_fn) {
+ if (unlink(ctx->dir_info->tdb_fn) < 0)
+ com_err("e2fsck_free_dir_info", errno,
+ _("while freeing dir_info tdb file"));
+ ext2fs_free_mem(&ctx->dir_info->tdb_fn);
+ }
+#endif
+ if (ctx->dir_info->array)
+ ext2fs_free_mem(&ctx->dir_info->array);
+ ctx->dir_info->array = 0;
+ ctx->dir_info->size = 0;
+ ctx->dir_info->count = 0;
+ ext2fs_free_mem(&ctx->dir_info);
+ ctx->dir_info = 0;
+ }
+}
+
+/*
+ * Return the count of number of directories in the dir_info structure
+ */
+int e2fsck_get_num_dirinfo(e2fsck_t ctx)
+{
+ return ctx->dir_info ? ctx->dir_info->count : 0;
+}
+
+struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx)
+{
+ struct dir_info_iter *iter;
+
+ iter = e2fsck_allocate_memory(ctx, sizeof(struct dir_info_iter),
+ "dir_info iterator");
+
+#ifdef CONFIG_TDB
+ if (ctx->dir_info->tdb)
+ iter->tdb_iter = tdb_firstkey(ctx->dir_info->tdb);
+#endif
+
+ return iter;
+}
+
+void e2fsck_dir_info_iter_end(e2fsck_t ctx EXT2FS_ATTR((unused)),
+ struct dir_info_iter *iter)
+{
+#ifdef CONFIG_TDB
+ free(iter->tdb_iter.dptr);
+#endif
+ ext2fs_free_mem(&iter);
+}
+
+/*
+ * A simple iterator function
+ */
+struct dir_info *e2fsck_dir_info_iter(e2fsck_t ctx, struct dir_info_iter *iter)
+{
+ if (!ctx->dir_info || !iter)
+ return 0;
+
+#ifdef CONFIG_TDB
+ if (ctx->dir_info->tdb) {
+ static struct dir_info ret_dir_info;
+ struct dir_info_ent *buf;
+ TDB_DATA data, key;
+
+ if (iter->tdb_iter.dptr == 0)
+ return 0;
+ key = iter->tdb_iter;
+ data = tdb_fetch(ctx->dir_info->tdb, key);
+ if (!data.dptr) {
+ printf("iter fetch failed: %s\n",
+ tdb_errorstr(ctx->dir_info->tdb));
+ return 0;
+ }
+ buf = (struct dir_info_ent *) data.dptr;
+ ret_dir_info.ino = *((ext2_ino_t *) iter->tdb_iter.dptr);
+ ret_dir_info.dotdot = buf->dotdot;
+ ret_dir_info.parent = buf->parent;
+ iter->tdb_iter = tdb_nextkey(ctx->dir_info->tdb, key);
+ free(key.dptr);
+ free(data.dptr);
+ return &ret_dir_info;
+ }
+#endif
+
+ if (iter->i >= ctx->dir_info->count)
+ return 0;
+
+#ifdef DIRINFO_DEBUG
+ printf("iter(%u, %u, %u)...", ctx->dir_info->array[iter->i].ino,
+ ctx->dir_info->array[iter->i].dotdot,
+ ctx->dir_info->array[iter->i].parent);
+#endif
+ ctx->dir_info->last_lookup = ctx->dir_info->array + iter->i++;
+ return(ctx->dir_info->last_lookup);
+}
+
+/*
+ * This function only sets the parent pointer, and requires that
+ * dirinfo structure has already been created.
+ */
+int e2fsck_dir_info_set_parent(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t parent)
+{
+ struct dir_info *p;
+
+ p = e2fsck_get_dir_info(ctx, ino);
+ if (!p)
+ return 1;
+ p->parent = parent;
+ e2fsck_put_dir_info(ctx, p);
+ return 0;
+}
+
+/*
+ * This function only sets the dot dot pointer, and requires that
+ * dirinfo structure has already been created.
+ */
+int e2fsck_dir_info_set_dotdot(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t dotdot)
+{
+ struct dir_info *p;
+
+ p = e2fsck_get_dir_info(ctx, ino);
+ if (!p)
+ return 1;
+ p->dotdot = dotdot;
+ e2fsck_put_dir_info(ctx, p);
+ return 0;
+}
+
+/*
+ * This function only sets the parent pointer, and requires that
+ * dirinfo structure has already been created.
+ */
+int e2fsck_dir_info_get_parent(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t *parent)
+{
+ struct dir_info *p;
+
+ p = e2fsck_get_dir_info(ctx, ino);
+ if (!p)
+ return 1;
+ *parent = p->parent;
+ return 0;
+}
+
+/*
+ * This function only sets the dot dot pointer, and requires that
+ * dirinfo structure has already been created.
+ */
+int e2fsck_dir_info_get_dotdot(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t *dotdot)
+{
+ struct dir_info *p;
+
+ p = e2fsck_get_dir_info(ctx, ino);
+ if (!p)
+ return 1;
+ *dotdot = p->dotdot;
+ return 0;
+}
+
diff --git a/e2fsck/dx_dirinfo.c b/e2fsck/dx_dirinfo.c
new file mode 100644
index 0000000..4b764b0
--- /dev/null
+++ b/e2fsck/dx_dirinfo.c
@@ -0,0 +1,154 @@
+/*
+ * dirinfo.c --- maintains the directory information table for e2fsck.
+ *
+ * Copyright (C) 1993 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include "e2fsck.h"
+
+/*
+ * This subroutine is called during pass1 to create a directory info
+ * entry. During pass1, the passed-in parent is 0; it will get filled
+ * in during pass2.
+ */
+void e2fsck_add_dx_dir(e2fsck_t ctx, ext2_ino_t ino, struct ext2_inode *inode,
+ int num_blocks)
+{
+ struct dx_dir_info *dir;
+ ext2_ino_t i, j;
+ errcode_t retval;
+ unsigned long old_size;
+
+#if 0
+ printf("add_dx_dir_info for inode %lu...\n", ino);
+#endif
+ if (!ctx->dx_dir_info) {
+ ctx->dx_dir_info_count = 0;
+ ctx->dx_dir_info_size = 100; /* Guess */
+ ctx->dx_dir_info = (struct dx_dir_info *)
+ e2fsck_allocate_memory(ctx, ctx->dx_dir_info_size
+ * sizeof (struct dx_dir_info),
+ "directory map");
+ }
+
+ if (ctx->dx_dir_info_count >= ctx->dx_dir_info_size) {
+ old_size = ctx->dx_dir_info_size * sizeof(struct dx_dir_info);
+ ctx->dx_dir_info_size += 10;
+ retval = ext2fs_resize_mem(old_size, ctx->dx_dir_info_size *
+ sizeof(struct dx_dir_info),
+ &ctx->dx_dir_info);
+ if (retval) {
+ fprintf(stderr, "Couldn't reallocate dx_dir_info "
+ "structure to %u entries\n",
+ ctx->dx_dir_info_size);
+ fatal_error(ctx, 0);
+ ctx->dx_dir_info_size -= 10;
+ return;
+ }
+ }
+
+ /*
+ * Normally, add_dx_dir_info is called with each inode in
+ * sequential order; but once in a while (like when pass 3
+ * needs to recreate the root directory or lost+found
+ * directory) it is called out of order. In those cases, we
+ * need to move the dx_dir_info entries down to make room, since
+ * the dx_dir_info array needs to be sorted by inode number for
+ * get_dx_dir_info()'s sake.
+ */
+ if (ctx->dx_dir_info_count &&
+ ctx->dx_dir_info[ctx->dx_dir_info_count-1].ino >= ino) {
+ for (i = ctx->dx_dir_info_count-1; i > 0; i--)
+ if (ctx->dx_dir_info[i-1].ino < ino)
+ break;
+ dir = &ctx->dx_dir_info[i];
+ if (dir->ino != ino)
+ for (j = ctx->dx_dir_info_count++; j > i; j--)
+ ctx->dx_dir_info[j] = ctx->dx_dir_info[j-1];
+ } else
+ dir = &ctx->dx_dir_info[ctx->dx_dir_info_count++];
+
+ dir->ino = ino;
+ dir->numblocks = num_blocks;
+ dir->hashversion = 0;
+ dir->casefolded_hash = !!(inode->i_flags & EXT4_CASEFOLD_FL);
+ dir->dx_block = e2fsck_allocate_memory(ctx, num_blocks
+ * sizeof (struct dx_dirblock_info),
+ "dx_block info array");
+}
+
+/*
+ * get_dx_dir_info() --- given an inode number, try to find the directory
+ * information entry for it.
+ */
+struct dx_dir_info *e2fsck_get_dx_dir_info(e2fsck_t ctx, ext2_ino_t ino)
+{
+ ext2_ino_t low, high, mid;
+
+ low = 0;
+ high = ctx->dx_dir_info_count-1;
+ if (!ctx->dx_dir_info)
+ return 0;
+ if (ino == ctx->dx_dir_info[low].ino)
+ return &ctx->dx_dir_info[low];
+ if (ino == ctx->dx_dir_info[high].ino)
+ return &ctx->dx_dir_info[high];
+
+ while (low < high) {
+ /* sum may overflow, but result will fit into mid again */
+ mid = (unsigned long long)(low + high) / 2;
+ if (mid == low || mid == high)
+ break;
+ if (ino == ctx->dx_dir_info[mid].ino)
+ return &ctx->dx_dir_info[mid];
+ if (ino < ctx->dx_dir_info[mid].ino)
+ high = mid;
+ else
+ low = mid;
+ }
+ return 0;
+}
+
+/*
+ * Free the dx_dir_info structure when it isn't needed any more.
+ */
+void e2fsck_free_dx_dir_info(e2fsck_t ctx)
+{
+ struct dx_dir_info *dir;
+ ext2_ino_t i;
+
+ if (ctx->dx_dir_info) {
+ dir = ctx->dx_dir_info;
+ for (i=0; i < ctx->dx_dir_info_count; i++,dir++) {
+ if (dir->dx_block) {
+ ext2fs_free_mem(&dir->dx_block);
+ dir->dx_block = 0;
+ }
+ }
+ ext2fs_free_mem(&ctx->dx_dir_info);
+ ctx->dx_dir_info = 0;
+ }
+ ctx->dx_dir_info_size = 0;
+ ctx->dx_dir_info_count = 0;
+}
+
+/*
+ * Return the count of number of directories in the dx_dir_info structure
+ */
+ext2_ino_t e2fsck_get_num_dx_dirinfo(e2fsck_t ctx)
+{
+ return ctx->dx_dir_info_count;
+}
+
+/*
+ * A simple iterator function
+ */
+struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, ext2_ino_t *control)
+{
+ if (*control >= ctx->dx_dir_info_count)
+ return 0;
+
+ return ctx->dx_dir_info + (*control)++;
+}
diff --git a/e2fsck/e2fsck.8.in b/e2fsck/e2fsck.8.in
new file mode 100644
index 0000000..dc6a585
--- /dev/null
+++ b/e2fsck/e2fsck.8.in
@@ -0,0 +1,509 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH E2FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2fsck \- check a Linux ext2/ext3/ext4 file system
+.SH SYNOPSIS
+.B e2fsck
+[
+.B \-pacnyrdfkvtDFV
+]
+[
+.B \-b
+.I superblock
+]
+[
+.B \-B
+.I blocksize
+]
+[
+.BR \-l | \-L
+.I bad_blocks_file
+]
+[
+.B \-C
+.I fd
+]
+@JDEV@[
+@JDEV@.B \-j
+@JDEV@.I external-journal
+@JDEV@]
+[
+.B \-E
+.I extended_options
+]
+[
+.B \-z
+.I undo_file
+]
+.I device
+.SH DESCRIPTION
+.B e2fsck
+is used to check the ext2/ext3/ext4 family of file systems.
+For ext3 and ext4 file systems that use a journal, if the system has been
+shut down uncleanly without any errors, normally, after replaying the
+committed transactions in the journal, the file system should be
+marked as clean. Hence, for file systems that use journaling,
+.B e2fsck
+will normally replay the journal and exit, unless its superblock
+indicates that further checking is required.
+.PP
+.I device
+is a block device (e.g.,
+.IR /dev/sdc1 )
+or file containing the file system.
+.PP
+Note that in general it is not safe to run
+.B e2fsck
+on mounted file systems. The only exception is if the
+.B \-n
+option is specified, and
+.BR \-c ,
+.BR \-l ,
+or
+.B -L
+options are
+.I not
+specified. However, even if it is safe to do so, the results printed by
+.B e2fsck
+are not valid if the file system is mounted. If
+.B e2fsck
+asks whether or not you should check a file system which is mounted,
+the only correct answer is ``no''. Only experts who really know what
+they are doing should consider answering this question in any other way.
+.PP
+If
+.B e2fsck
+is run in interactive mode (meaning that none of
+.BR \-y ,
+.BR \-n ,
+or
+.BR \-p
+are specified), the program will ask the user to fix each problem found in the
+file system. A response of 'y' will fix the error; 'n' will leave the error
+unfixed; and 'a' will fix the problem and all subsequent problems; pressing
+Enter will proceed with the default response, which is printed before the
+question mark. Pressing Control-C terminates e2fsck immediately.
+.SH OPTIONS
+.TP
+.B \-a
+This option does the same thing as the
+.B \-p
+option. It is provided for backwards compatibility only; it is
+suggested that people use
+.B \-p
+option whenever possible.
+.TP
+.BI \-b " superblock"
+Instead of using the normal superblock, use an alternative superblock
+specified by
+.IR superblock .
+This option is normally used when the primary superblock has been
+corrupted. The location of backup superblocks is dependent on the
+file system's blocksize, the number of blocks per group, and features
+such as
+.BR sparse_super .
+.IP
+Additional backup superblocks can be determined by using the
+.B mke2fs
+program using the
+.B \-n
+option to print out where the superblocks exist, supposing
+.B mke2fs
+is supplied with arguments that are consistent with the file system's layout
+(e.g. blocksize, blocks per group,
+.BR sparse_super ,
+etc.).
+.IP
+If an alternative superblock is specified and
+the file system is not opened read-only, e2fsck will make sure that the
+primary superblock is updated appropriately upon completion of the
+file system check.
+.TP
+.BI \-B " blocksize"
+Normally,
+.B e2fsck
+will search for the superblock at various different
+block sizes in an attempt to find the appropriate block size.
+This search can be fooled in some cases. This option forces
+.B e2fsck
+to only try locating the superblock at a particular blocksize.
+If the superblock is not found,
+.B e2fsck
+will terminate with a fatal error.
+.TP
+.B \-c
+This option causes
+.B e2fsck
+to use
+.BR badblocks (8)
+program to do a read-only scan of the device in order to find any bad
+blocks. If any bad blocks are found, they are added to the bad block
+inode to prevent them from being allocated to a file or directory. If
+this option is specified twice, then the bad block scan will be done
+using a non-destructive read-write test.
+.TP
+.BI \-C " fd"
+This option causes
+.B e2fsck
+to write completion information to the specified file descriptor
+so that the progress of the file system
+check can be monitored. This option is typically used by programs
+which are running
+.BR e2fsck .
+If the file descriptor number is negative, then absolute value of
+the file descriptor will be used, and the progress information will be
+suppressed initially. It can later be enabled by sending the
+.B e2fsck
+process a SIGUSR1 signal.
+If the file descriptor specified is 0,
+.B e2fsck
+will print a completion bar as it goes about its business. This requires
+that e2fsck is running on a video console or terminal.
+.TP
+.B \-d
+Print debugging output (useless unless you are debugging
+.BR e2fsck ).
+.TP
+.B \-D
+Optimize directories in file system. This option causes e2fsck to
+try to optimize all directories, either by re-indexing them if the
+file system supports directory indexing, or by sorting and compressing
+directories for smaller directories, or for file systems using
+traditional linear directories.
+.IP
+Even without the
+.B \-D
+option,
+.B e2fsck
+may sometimes optimize a few directories --- for example, if
+directory indexing is enabled and a directory is not indexed and would
+benefit from being indexed, or if the index structures are corrupted
+and need to be rebuilt. The
+.B \-D
+option forces all directories in the file system to be optimized. This can
+sometimes make them a little smaller and slightly faster to search, but
+in practice, you should rarely need to use this option.
+.IP
+The
+.B \-D
+option will detect directory entries with duplicate names in a single
+directory, which e2fsck normally does not enforce for performance reasons.
+.TP
+.BI \-E " extended_options"
+Set e2fsck extended options. Extended options are comma
+separated, and may take an argument using the equals ('=') sign. The
+following options are supported:
+.RS 1.2i
+.TP
+.BI ea_ver= extended_attribute_version
+Set the version of the extended attribute blocks which
+.B e2fsck
+will require while checking the file system. The version number may
+be 1 or 2. The default extended attribute version format is 2.
+.TP
+.BI journal_only
+Only replay the journal if required, but do not perform any further checks
+or repairs.
+.TP
+.BI fragcheck
+During pass 1, print a detailed report of any discontiguous blocks for
+files in the file system.
+.TP
+.BI discard
+Attempt to discard free blocks and unused inode blocks after the full
+file system check (discarding blocks is useful on solid state devices and sparse
+/ thin-provisioned storage). Note that discard is done in pass 5 AFTER the
+file system has been fully checked and only if it does not contain recognizable
+errors. However there might be cases where
+.B e2fsck
+does not fully recognize a problem and hence in this case this
+option may prevent you from further manual data recovery.
+.TP
+.BI nodiscard
+Do not attempt to discard free blocks and unused inode blocks. This option is
+exactly the opposite of discard option. This is set as default.
+.TP
+.BI no_optimize_extents
+Do not offer to optimize the extent tree by eliminating unnecessary
+width or depth. This can also be enabled in the options section of
+.BR /etc/e2fsck.conf .
+.TP
+.BI optimize_extents
+Offer to optimize the extent tree by eliminating unnecessary
+width or depth. This is the default unless otherwise specified in
+.BR /etc/e2fsck.conf .
+.TP
+.BI inode_count_fullmap
+Trade off using memory for speed when checking a file system with a
+large number of hard-linked files. The amount of memory required is
+proportional to the number of inodes in the file system. For large file
+systems, this can be gigabytes of memory. (For example, a 40TB file system
+with 2.8 billion inodes will consume an additional 5.7 GB memory if this
+optimization is enabled.) This optimization can also be enabled in the
+options section of
+.BR /etc/e2fsck.conf .
+.TP
+.BI no_inode_count_fullmap
+Disable the
+.B inode_count_fullmap
+optimization. This is the default unless otherwise specified in
+.BR /etc/e2fsck.conf .
+.TP
+.BI readahead_kb
+Use this many KiB of memory to pre-fetch metadata in the hopes of reducing
+e2fsck runtime. By default, this is set to the size of two block groups' inode
+tables (typically 4MiB on a regular ext4 file system); if this amount is more
+than 1/50th of total physical memory, readahead is disabled. Set this to zero
+to disable readahead entirely.
+.TP
+.BI bmap2extent
+Convert block-mapped files to extent-mapped files.
+.TP
+.BI fixes_only
+Only fix damaged metadata; do not optimize htree directories or compress
+extent trees. This option is incompatible with the -D and -E bmap2extent
+options.
+.TP
+.BI check_encoding
+Force verification of encoded filenames in case-insensitive directories.
+This is the default mode if the file system has the strict flag enabled.
+.TP
+.BI unshare_blocks
+If the file system has shared blocks, with the shared blocks read-only feature
+enabled, then this will unshare all shared blocks and unset the read-only
+feature bit. If there is not enough free space then the operation will fail.
+If the file system does not have the read-only feature bit, but has shared
+blocks anyway, then this option will have no effect. Note when using this
+option, if there is no free space to clone blocks, there is no prompt to
+delete files and instead the operation will fail.
+.IP
+Note that unshare_blocks implies the "-f" option to ensure that all passes
+are run. Additionally, if "-n" is also specified, e2fsck will simulate trying
+to allocate enough space to deduplicate. If this fails, the exit code will
+be non-zero.
+.RE
+.TP
+.B \-f
+Force checking even if the file system seems clean.
+.TP
+.B \-F
+Flush the file system device's buffer caches before beginning. Only
+really useful for doing
+.B e2fsck
+time trials.
+@JDEV@.TP
+@JDEV@.BI \-j " external-journal"
+@JDEV@Set the pathname where the external-journal for this file system can be
+@JDEV@found.
+.TP
+.BI \-k
+When combined with the
+.B \-c
+option, any existing bad blocks in the bad blocks list are preserved,
+and any new bad blocks found by running
+.BR badblocks (8)
+will be added to the existing bad blocks list.
+.TP
+.BI \-l " filename"
+Add the block numbers listed in the file specified by
+.I filename
+to the list of bad blocks. The format of this file is the same as the
+one generated by the
+.BR badblocks (8)
+program. Note that the block numbers are based on the blocksize
+of the file system. Hence,
+.BR badblocks (8)
+must be given the blocksize of the file system in order to obtain correct
+results. As a result, it is much simpler and safer to use the
+.B -c
+option to
+.BR e2fsck ,
+since it will assure that the correct parameters are passed to the
+.B badblocks
+program.
+.TP
+.BI \-L " filename"
+Set the bad blocks list to be the list of blocks specified by
+.IR filename .
+(This option is the same as the
+.B \-l
+option, except the bad blocks list is cleared before the blocks listed
+in the file are added to the bad blocks list.)
+.TP
+.B \-n
+Open the file system read-only, and assume an answer of `no' to all
+questions. Allows
+.B e2fsck
+to be used non-interactively. This option
+may not be specified at the same time as the
+.B \-p
+or
+.B \-y
+options.
+.TP
+.B \-p
+Automatically repair ("preen") the file system. This option will cause
+.B e2fsck
+to automatically
+fix any file system problems that can be safely fixed without human
+intervention. If
+.B e2fsck
+discovers a problem which may require the system administrator
+to take additional corrective action,
+.B e2fsck
+will print a description of the problem and then exit with the value 4
+logically or'ed into the exit code. (See the \fBEXIT CODE\fR section.)
+This option is normally used by the system's boot scripts. It may not
+be specified at the same time as the
+.B \-n
+or
+.B \-y
+options.
+.TP
+.B \-r
+This option does nothing at all; it is provided only for backwards
+compatibility.
+.TP
+.B \-t
+Print timing statistics for
+.BR e2fsck .
+If this option is used twice, additional timing statistics are printed
+on a pass by pass basis.
+.TP
+.B \-v
+Verbose mode.
+.TP
+.B \-V
+Print version information and exit.
+.TP
+.B \-y
+Assume an answer of `yes' to all questions; allows
+.B e2fsck
+to be used non-interactively. This option
+may not be specified at the same time as the
+.B \-n
+or
+.B \-p
+options.
+.TP
+.BI \-z " undo_file"
+Before overwriting a file system block, write the old contents of the block to
+an undo file. This undo file can be used with e2undo(8) to restore the old
+contents of the file system should something go wrong. If the empty string is
+passed as the undo_file argument, the undo file will be written to a file named
+e2fsck-\fIdevice\fR.e2undo in the directory specified via the
+\fIE2FSPROGS_UNDO_DIR\fR environment variable.
+
+WARNING: The undo file cannot be used to recover from a power or system crash.
+.SH EXIT CODE
+The exit code returned by
+.B e2fsck
+is the sum of the following conditions:
+.br
+\ 0\ \-\ No errors
+.br
+\ 1\ \-\ File system errors corrected
+.br
+\ 2\ \-\ File system errors corrected, system should
+.br
+\ \ \ \ be rebooted
+.br
+\ 4\ \-\ File system errors left uncorrected
+.br
+\ 8\ \-\ Operational error
+.br
+\ 16\ \-\ Usage or syntax error
+.br
+\ 32\ \-\ E2fsck canceled by user request
+.br
+\ 128\ \-\ Shared library error
+.br
+.SH SIGNALS
+The following signals have the following effect when sent to
+.BR e2fsck .
+.TP
+.B SIGUSR1
+This signal causes
+.B e2fsck
+to start displaying a completion bar or emitting progress information.
+(See discussion of the
+.B \-C
+option.)
+.TP
+.B SIGUSR2
+This signal causes
+.B e2fsck
+to stop displaying a completion bar or emitting progress information.
+.SH REPORTING BUGS
+Almost any piece of software will have bugs. If you manage to find a
+file system which causes
+.B e2fsck
+to crash, or which
+.B e2fsck
+is unable to repair, please report it to the author.
+.PP
+Please include as much information as possible in your bug report.
+Ideally, include a complete transcript of the
+.B e2fsck
+run, so I can see exactly what error messages are displayed. (Make sure
+the messages printed by
+.B e2fsck
+are in English; if your system has been
+configured so that
+.BR e2fsck 's
+messages have been translated into another language, please set the the
+.B LC_ALL
+environment variable to
+.B C
+so that the transcript of e2fsck's output will be useful to me.)
+If you
+have a writable file system where the transcript can be stored, the
+.BR script (1)
+program is a handy way to save the output of
+.B e2fsck
+to a file.
+.PP
+It is also useful to send the output of
+.BR dumpe2fs (8).
+If a specific inode or inodes seems to be giving
+.B e2fsck
+trouble, try running the
+.BR debugfs (8)
+command and send the output of the
+.BR stat (1u)
+command run on the relevant inode(s). If the inode is a directory, the
+.B debugfs
+.I dump
+command will allow you to extract the contents of the directory inode,
+which can sent to me after being first run through
+.BR uuencode (1).
+The most useful data you can send to help reproduce
+the bug is a compressed raw image dump of the file system, generated using
+.BR e2image (8).
+See the
+.BR e2image (8)
+man page for more details.
+.PP
+Always include the full version string which
+.B e2fsck
+displays when it is run, so I know which version you are running.
+.SH ENVIRONMENT
+.TP
+.BI E2FSCK_CONFIG
+Determines the location of the configuration file (see
+.BR e2fsck.conf (5)).
+.SH AUTHOR
+This version of
+.B e2fsck
+was written by Theodore Ts'o <tytso@mit.edu>.
+.SH SEE ALSO
+.BR e2fsck.conf (5),
+.BR badblocks (8),
+.BR dumpe2fs (8),
+.BR debugfs (8),
+.BR e2image (8),
+.BR mke2fs (8),
+.BR tune2fs (8)
diff --git a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c
new file mode 100644
index 0000000..1e295e3
--- /dev/null
+++ b/e2fsck/e2fsck.c
@@ -0,0 +1,271 @@
+/*
+ * e2fsck.c - a consistency checker for the new extended file system.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <errno.h>
+
+#include "e2fsck.h"
+#include "problem.h"
+
+/*
+ * This function allocates an e2fsck context
+ */
+errcode_t e2fsck_allocate_context(e2fsck_t *ret)
+{
+ e2fsck_t context;
+ errcode_t retval;
+ char *time_env;
+
+ retval = ext2fs_get_mem(sizeof(struct e2fsck_struct), &context);
+ if (retval)
+ return retval;
+
+ memset(context, 0, sizeof(struct e2fsck_struct));
+
+ context->process_inode_size = 256;
+ context->ext_attr_ver = 2;
+ context->blocks_per_page = 1;
+ context->htree_slack_percentage = 255;
+
+ time_env = getenv("E2FSCK_TIME");
+ if (time_env)
+ context->now = (time_t) strtoull(time_env, NULL, 0);
+ else {
+ context->now = time(0);
+ if (context->now < 1262322000) /* January 1 2010 */
+ context->flags |= E2F_FLAG_TIME_INSANE;
+ }
+
+ *ret = context;
+ return 0;
+}
+
+/*
+ * This function resets an e2fsck context; it is called when e2fsck
+ * needs to be restarted.
+ */
+errcode_t e2fsck_reset_context(e2fsck_t ctx)
+{
+ int i;
+
+ ctx->flags &= E2F_RESET_FLAGS;
+ ctx->lost_and_found = 0;
+ ctx->bad_lost_and_found = 0;
+ if (ctx->inode_used_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_used_map);
+ ctx->inode_used_map = 0;
+ }
+ if (ctx->inode_dir_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_dir_map);
+ ctx->inode_dir_map = 0;
+ }
+ if (ctx->inode_reg_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_reg_map);
+ ctx->inode_reg_map = 0;
+ }
+ if (ctx->block_found_map) {
+ ext2fs_free_block_bitmap(ctx->block_found_map);
+ ctx->block_found_map = 0;
+ }
+ if (ctx->inode_casefold_map) {
+ ext2fs_free_block_bitmap(ctx->inode_casefold_map);
+ ctx->inode_casefold_map = 0;
+ }
+ if (ctx->inode_link_info) {
+ ext2fs_free_icount(ctx->inode_link_info);
+ ctx->inode_link_info = 0;
+ }
+ if (ctx->journal_io) {
+ if (ctx->fs && ctx->fs->io != ctx->journal_io)
+ io_channel_close(ctx->journal_io);
+ ctx->journal_io = 0;
+ }
+ if (ctx->fs && ctx->fs->dblist) {
+ ext2fs_free_dblist(ctx->fs->dblist);
+ ctx->fs->dblist = 0;
+ }
+ e2fsck_free_dir_info(ctx);
+ e2fsck_free_dx_dir_info(ctx);
+ if (ctx->refcount) {
+ ea_refcount_free(ctx->refcount);
+ ctx->refcount = 0;
+ }
+ if (ctx->refcount_extra) {
+ ea_refcount_free(ctx->refcount_extra);
+ ctx->refcount_extra = 0;
+ }
+ if (ctx->ea_block_quota_blocks) {
+ ea_refcount_free(ctx->ea_block_quota_blocks);
+ ctx->ea_block_quota_blocks = 0;
+ }
+ if (ctx->ea_block_quota_inodes) {
+ ea_refcount_free(ctx->ea_block_quota_inodes);
+ ctx->ea_block_quota_inodes = 0;
+ }
+ if (ctx->ea_inode_refs) {
+ ea_refcount_free(ctx->ea_inode_refs);
+ ctx->ea_inode_refs = 0;
+ }
+ if (ctx->block_dup_map) {
+ ext2fs_free_block_bitmap(ctx->block_dup_map);
+ ctx->block_dup_map = 0;
+ }
+ if (ctx->block_ea_map) {
+ ext2fs_free_block_bitmap(ctx->block_ea_map);
+ ctx->block_ea_map = 0;
+ }
+ if (ctx->block_metadata_map) {
+ ext2fs_free_block_bitmap(ctx->block_metadata_map);
+ ctx->block_metadata_map = 0;
+ }
+ if (ctx->inode_bb_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_bb_map);
+ ctx->inode_bb_map = 0;
+ }
+ if (ctx->inode_bad_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_bad_map);
+ ctx->inode_bad_map = 0;
+ }
+ if (ctx->inode_imagic_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_imagic_map);
+ ctx->inode_imagic_map = 0;
+ }
+ if (ctx->dirs_to_hash) {
+ ext2fs_u32_list_free(ctx->dirs_to_hash);
+ ctx->dirs_to_hash = 0;
+ }
+ destroy_encrypted_file_info(ctx);
+
+ /*
+ * Clear the array of invalid meta-data flags
+ */
+ if (ctx->invalid_inode_bitmap_flag) {
+ ext2fs_free_mem(&ctx->invalid_inode_bitmap_flag);
+ ctx->invalid_inode_bitmap_flag = 0;
+ }
+ if (ctx->invalid_block_bitmap_flag) {
+ ext2fs_free_mem(&ctx->invalid_block_bitmap_flag);
+ ctx->invalid_block_bitmap_flag = 0;
+ }
+ if (ctx->invalid_inode_table_flag) {
+ ext2fs_free_mem(&ctx->invalid_inode_table_flag);
+ ctx->invalid_inode_table_flag = 0;
+ }
+ if (ctx->casefolded_dirs) {
+ ext2fs_u32_list_free(ctx->casefolded_dirs);
+ ctx->casefolded_dirs = 0;
+ }
+ if (ctx->inode_count) {
+ ext2fs_free_icount(ctx->inode_count);
+ ctx->inode_count = 0;
+ }
+
+ /* Clear statistic counters */
+ ctx->fs_directory_count = 0;
+ ctx->fs_regular_count = 0;
+ ctx->fs_blockdev_count = 0;
+ ctx->fs_chardev_count = 0;
+ ctx->fs_links_count = 0;
+ ctx->fs_symlinks_count = 0;
+ ctx->fs_fast_symlinks_count = 0;
+ ctx->fs_fifo_count = 0;
+ ctx->fs_total_count = 0;
+ ctx->fs_badblocks_count = 0;
+ ctx->fs_sockets_count = 0;
+ ctx->fs_ind_count = 0;
+ ctx->fs_dind_count = 0;
+ ctx->fs_tind_count = 0;
+ ctx->fs_fragmented = 0;
+ ctx->fs_fragmented_dir = 0;
+ ctx->large_files = 0;
+ ctx->large_dirs = 0;
+
+ for (i=0; i < MAX_EXTENT_DEPTH_COUNT; i++)
+ ctx->extent_depth_count[i] = 0;
+
+ /* Reset the superblock to the user's requested value */
+ ctx->superblock = ctx->use_superblock;
+
+ return 0;
+}
+
+void e2fsck_free_context(e2fsck_t ctx)
+{
+ if (!ctx)
+ return;
+
+ e2fsck_reset_context(ctx);
+ if (ctx->blkid)
+ blkid_put_cache(ctx->blkid);
+
+ if (ctx->profile)
+ profile_release(ctx->profile);
+
+ if (ctx->filesystem_name)
+ ext2fs_free_mem(&ctx->filesystem_name);
+
+ if (ctx->device_name)
+ ext2fs_free_mem(&ctx->device_name);
+
+ if (ctx->log_fn)
+ free(ctx->log_fn);
+
+ if (ctx->logf)
+ fclose(ctx->logf);
+
+ if (ctx->problem_log_fn)
+ free(ctx->problem_log_fn);
+
+ if (ctx->problem_logf) {
+ fputs("</problem_log>\n", ctx->problem_logf);
+ fclose(ctx->problem_logf);
+ }
+ ext2fs_free_mem(&ctx);
+}
+
+/*
+ * This function runs through the e2fsck passes and calls them all,
+ * returning restart, abort, or cancel as necessary...
+ */
+typedef void (*pass_t)(e2fsck_t ctx);
+
+static pass_t e2fsck_passes[] = {
+ e2fsck_pass1, e2fsck_pass1e, e2fsck_pass2, e2fsck_pass3,
+ e2fsck_pass4, e2fsck_pass5, 0 };
+
+int e2fsck_run(e2fsck_t ctx)
+{
+ int i;
+ pass_t e2fsck_pass;
+
+#ifdef HAVE_SETJMP_H
+ if (setjmp(ctx->abort_loc)) {
+ ctx->flags &= ~E2F_FLAG_SETJMP_OK;
+ return (ctx->flags & E2F_FLAG_RUN_RETURN);
+ }
+ ctx->flags |= E2F_FLAG_SETJMP_OK;
+#endif
+
+ for (i=0; (e2fsck_pass = e2fsck_passes[i]); i++) {
+ if (ctx->flags & E2F_FLAG_RUN_RETURN)
+ break;
+ if (e2fsck_mmp_update(ctx->fs))
+ fatal_error(ctx, 0);
+ e2fsck_pass(ctx);
+ if (ctx->progress)
+ (void) (ctx->progress)(ctx, 0, 0, 0);
+ }
+ ctx->flags &= ~E2F_FLAG_SETJMP_OK;
+
+ if (ctx->flags & E2F_FLAG_RUN_RETURN)
+ return (ctx->flags & E2F_FLAG_RUN_RETURN);
+ return 0;
+}
diff --git a/e2fsck/e2fsck.conf.5.in b/e2fsck/e2fsck.conf.5.in
new file mode 100644
index 0000000..e82610d
--- /dev/null
+++ b/e2fsck/e2fsck.conf.5.in
@@ -0,0 +1,501 @@
+.\" -*- nroff -*-
+.\" Copyright 2006 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH e2fsck.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2fsck.conf \- Configuration file for e2fsck
+.SH DESCRIPTION
+.I e2fsck.conf
+is the configuration file for
+.BR e2fsck (8).
+It controls the default behavior of
+.BR e2fsck (8)
+while it is checking ext2, ext3, or ext4 file systems.
+.PP
+The
+.I e2fsck.conf
+file uses an INI-style format. Stanzas, or top-level sections, are
+delimited by square braces: [ ]. Within each section, each line
+defines a relation, which assigns tags to values, or to a subsection,
+which contains further relations or subsections.
+.\" Tags can be assigned multiple values
+An example of the INI-style format used by this configuration file
+follows below:
+.P
+ [section1]
+.br
+ tag1 = value_a
+.br
+ tag1 = value_b
+.br
+ tag2 = value_c
+.P
+ [section 2]
+.br
+ tag3 = {
+.br
+ subtag1 = subtag_value_a
+.br
+ subtag1 = subtag_value_b
+.br
+ subtag2 = subtag_value_c
+.br
+ }
+.br
+ tag1 = value_d
+.br
+ tag2 = value_e
+.br
+ }
+.P
+Comments are delimited by a semicolon (';') or a hash ('#') character
+at the beginning of the comment, and are terminated by the end of
+line character.
+.P
+Tags and values must be quoted using double quotes if they contain
+spaces. Within a quoted string, the standard backslash interpretations
+apply: "\en" (for the newline character),
+"\et" (for the tab character), "\eb" (for the backspace character),
+and "\e\e" (for the backslash character).
+.P
+The following stanzas are used in the
+.I e2fsck.conf
+file. They will be described in more detail in future sections of this
+document.
+.TP
+.I [options]
+This stanza contains general configuration parameters for
+.BR e2fsck 's
+behavior.
+.TP
+.I [defaults]
+Contains relations which define the default parameters used by
+.BR e2fsck (8).
+In general, these defaults may be overridden by command-line options
+provided by the user.
+.TP
+.I [problems]
+This stanza allows the administrator to reconfigure how e2fsck handles
+various file system inconsistencies.
+@TDB_MAN_COMMENT@.TP
+@TDB_MAN_COMMENT@.I [scratch_files]
+@TDB_MAN_COMMENT@This stanza controls when e2fsck will attempt to use
+@TDB_MAN_COMMENT@scratch files to reduce the need for memory.
+.SH THE [options] STANZA
+The following relations are defined in the
+.I [options]
+stanza.
+.TP
+.I allow_cancellation
+If this relation is set to a boolean value of true, then if the user
+interrupts e2fsck using ^C, and the file system is not explicitly flagged
+as containing errors, e2fsck will exit with an exit status of 0 instead
+of 32. This setting defaults to false.
+.TP
+.I accept_time_fudge
+Unfortunately, due to Windows' unfortunate design decision
+to configure the hardware clock to tick localtime, instead
+of the more proper and less error-prone UTC time, many
+users end up in the situation where the system clock is
+incorrectly set at the time when e2fsck is run.
+.IP
+Historically this was usually due to some distributions
+having buggy init scripts and/or installers that didn't
+correctly detect this case and take appropriate
+countermeasures. Unfortunately, this is occasionally
+true even today, usually due to a
+buggy or misconfigured virtualization manager or the
+installer not having access to a network time server
+during the installation process. So by default, we allow
+the superblock times to be fudged by up to 24 hours.
+This can be disabled by setting
+.I accept_time_fudge
+to the
+boolean value of false. This setting defaults to true.
+.TP
+.I broken_system_clock
+The
+.BR e2fsck (8)
+program has some heuristics that assume that the system clock is
+correct. In addition, many system programs make similar assumptions.
+For example, the UUID library depends on time not going backwards in
+order for it to be able to make its guarantees about issuing universally
+unique ID's. Systems with broken system clocks, are well, broken.
+However, broken system clocks, particularly in embedded systems, do
+exist. E2fsck will attempt to use heuristics to determine if the time
+can not be trusted; and to skip time-based checks if this is true. If
+this boolean is set to true, then e2fsck will always assume that the
+system clock can not be trusted.
+.TP
+.I buggy_init_scripts
+This boolean relation is an alias for
+.I accept_time_fudge
+for backwards compatibility; it used to
+be that the behavior defined by
+.I accept_time_fudge
+above defaulted to false, and
+.I buggy_init_scripts
+would enable superblock time field to be wrong by up to 24 hours. When
+we changed the default, we also renamed this boolean relation to
+.IR accept_time_fudge.
+.TP
+.I clear_test_fs_flag
+This boolean relation controls whether or not
+.BR e2fsck (8)
+will offer to clear
+the test_fs flag if the ext4 file system is available on the system. It
+defaults to true.
+.TP
+.I defer_check_on_battery
+This boolean relation controls whether or not the interval between
+file system checks (either based on time or number of mounts) should
+be doubled if the system is running on battery. This setting defaults to
+true.
+.TP
+.I indexed_dir_slack_percentage
+When
+.BR e2fsck (8)
+repacks a indexed directory, reserve the specified percentage of
+empty space in each leaf nodes so that a few new entries can
+be added to the directory without splitting leaf nodes, so that
+the average fill ratio of directories can be maintained at a
+higher, more efficient level. This relation defaults to 20
+percent.
+.TP
+.I inode_count_fullmap
+If this boolean relation is true, trade off using memory for speed when
+checking a file system with a large number of hard-linked files. The
+amount of memory required is proportional to the number of inodes in the
+file system. For large file systems, this can be gigabytes of memory.
+(For example a 40TB file system with 2.8 billion inodes will consume an
+additional 5.7 GB memory if this optimization is enabled.) This setting
+defaults to false.
+.TP
+.I log_dir
+If the
+.I log_filename
+or
+.I problem_log_filename
+relations contains a relative pathname, then the log file will be placed
+in the directory named by the
+.I log_dir
+relation.
+.TP
+.I log_dir_fallback
+This relation contains an alternate directory that will be used if the
+directory specified by
+.I log_dir
+is not available or is not writable.
+.TP
+.I log_dir_wait
+If this boolean relation is true, them if the directories specified by
+.I log_dir
+or
+.I log_dir_fallback
+are not available or are not yet writable, e2fsck will save the output
+in a memory buffer, and a child process will periodically test to see if
+the log directory has become available after the boot sequence has
+mounted the requested file system for reading/writing. This implements the
+functionality provided by
+.BR logsave (8)
+for e2fsck log files.
+.TP
+.I log_filename
+This relation specifies the file name where a copy of e2fsck's output
+will be written. If certain problem reports are suppressed using the
+.I max_count_problems
+relation, (or on a per-problem basis using the
+.I max_count
+relation), the full set of problem reports will be written to the log
+file. The filename may contain various percent-expressions (%D, %T, %N,
+etc.) which will be expanded so that the file name for the log file can
+include things like date, time, device name, and other run-time
+parameters. See the
+.B LOGGING
+section for more details.
+.TP
+.I max_count_problems
+This relation specifies the maximum number of problem reports of a
+particular type will be printed to stdout before further problem reports
+of that type are squelched. This can be useful if the console is slow
+(i.e., connected to a serial port) and so a large amount of output could
+end up delaying the boot process for a long time (potentially hours).
+.TP
+.I no_optimize_extents
+If this boolean relation is true, do not offer to optimize the extent
+tree by reducing the tree's width or depth. This setting defaults to false.
+.TP
+.I problem_log_filename
+This relation specifies the file name where a log of problem codes
+found by e2fsck be written. The filename may contain various
+percent-expressions (%D, %T, %N,
+etc.) which will be expanded so that the file name for the log file can
+include things like date, time, device name, and other run-time
+parameters. See the
+.B LOGGING
+section for more details.
+.TP
+.I readahead_mem_pct
+Use this percentage of memory to try to read in metadata blocks ahead of the
+main e2fsck thread. This should reduce run times, depending on the speed of
+the underlying storage and the amount of free memory. There is no default, but
+see
+.B readahead_kb
+for more details.
+.TP
+.I readahead_kb
+Use this amount of memory to read in metadata blocks ahead of the main checking
+thread. Setting this value to zero disables readahead entirely. By default,
+this is set the size of two block groups' inode tables (typically 4MiB on a
+regular ext4 file system); if this amount is more than 1/50th of total physical
+memory, readahead is disabled.
+.TP
+.I report_features
+If this boolean relation is true, e2fsck will print the file system
+features as part of its verbose reporting (i.e., if the
+.B -v
+option is specified)
+.TP
+.I report_time
+If this boolean relation is true, e2fsck will run as if the options
+.B -tt
+are always specified. This will cause e2fsck to print timing statistics
+on a pass by pass basis for full file system checks.
+.TP
+.I report_verbose
+If this boolean relation is true, e2fsck will run as if the option
+.B -v
+is always specified. This will cause e2fsck to print some additional
+information at the end of each full file system check.
+.SH THE [defaults] STANZA
+The following relations are defined in the
+.I [defaults]
+stanza.
+.TP
+.I undo_dir
+This relation specifies the directory where the undo file should be
+stored. It can be overridden via the
+.B E2FSPROGS_UNDO_DIR
+environment variable. If the directory location is set to the value
+.IR none ,
+.B e2fsck
+will not create an undo file.
+.SH THE [problems] STANZA
+Each tag in the
+.I [problems]
+stanza names a problem code specified with a leading "0x" followed by
+six hex digits.
+The value of the tag is a subsection where the relations in that
+subsection override the default treatment of that particular problem
+code.
+.P
+Note that inappropriate settings in this stanza may cause
+.B e2fsck
+to behave incorrectly, or even crash. Most system administrators should
+not be making changes to this section without referring to source code.
+.P
+Within each problem code's subsection, the following tags may be used:
+.TP
+.I description
+This relation allows the message which is printed when this file system
+inconsistency is detected to be overridden.
+.TP
+.I preen_ok
+This boolean relation overrides the default behavior controlling
+whether this file system problem should be automatically fixed when
+.B e2fsck
+is running in preen mode.
+.TP
+.I max_count
+This integer relation overrides the
+.I max_count_problems
+parameter (set in the options section) for this particular problem.
+.TP
+.I no_ok
+This boolean relation overrides the default behavior determining
+whether or not the file system will be marked as inconsistent if the user
+declines to fix the reported problem.
+.TP
+.I no_default
+This boolean relation overrides whether the default answer for this
+problem (or question) should be "no".
+.TP
+.I preen_nomessage
+This boolean relation overrides the default behavior controlling
+whether or not the description for this file system problem should
+be suppressed when
+.B e2fsck
+is running in preen mode.
+.TP
+.I no_nomsg
+This boolean relation overrides the default behavior controlling
+whether or not the description for this file system problem should
+be suppressed when a problem forced not to be fixed, either because
+.B e2fsck
+is run with the
+.B -n
+option or because the
+.I force_no
+flag has been set for the problem.
+.TP
+.I force_no
+This boolean option, if set to true, forces a problem to never be fixed.
+That is, it will be as if the user problem responds 'no' to the question
+of 'should this problem be fixed?'. The
+.I force_no
+option even overrides the
+.B -y
+option given on the command-line (just for the specific problem, of course).
+.TP
+.I not_a_fix
+This boolean option, it set to true, marks the problem as
+one where if the user gives permission to make the requested change,
+it does not mean that the file system had a problem which has since
+been fixed. This is used for requests to optimize the file system's
+data structure, such as pruning an extent tree.
+@TDB_MAN_COMMENT@.SH THE [scratch_files] STANZA
+@TDB_MAN_COMMENT@The following relations are defined in the
+@TDB_MAN_COMMENT@.I [scratch_files]
+@TDB_MAN_COMMENT@stanza.
+@TDB_MAN_COMMENT@.TP
+@TDB_MAN_COMMENT@.I directory
+@TDB_MAN_COMMENT@If the directory named by this relation exists and is
+@TDB_MAN_COMMENT@writeable, then e2fsck will attempt to use this
+@TDB_MAN_COMMENT@directory to store scratch files instead of using
+@TDB_MAN_COMMENT@in-memory data structures.
+@TDB_MAN_COMMENT@.TP
+@TDB_MAN_COMMENT@.I numdirs_threshold
+@TDB_MAN_COMMENT@If this relation is set, then in-memory data structures
+@TDB_MAN_COMMENT@will be used if the number of directories in the file system
+@TDB_MAN_COMMENT@are fewer than amount specified.
+@TDB_MAN_COMMENT@.TP
+@TDB_MAN_COMMENT@.I dirinfo
+@TDB_MAN_COMMENT@This relation controls whether or not the scratch file
+@TDB_MAN_COMMENT@directory is used instead of an in-memory data
+@TDB_MAN_COMMENT@structure for directory information. It defaults to
+@TDB_MAN_COMMENT@true.
+@TDB_MAN_COMMENT@.TP
+@TDB_MAN_COMMENT@.I icount
+@TDB_MAN_COMMENT@This relation controls whether or not the scratch file
+@TDB_MAN_COMMENT@directory is used instead of an in-memory data
+@TDB_MAN_COMMENT@structure when tracking inode counts. It defaults to
+@TDB_MAN_COMMENT@true.
+.SH LOGGING
+E2fsck has the facility to save the information from an e2fsck run in a
+directory so that a system administrator can review its output at their
+leisure. This allows information captured during the automatic e2fsck
+preen run, as well as a manually started e2fsck run, to be saved for
+posterity. This facility is controlled by the
+.IR log_filename ,
+.IR log_dir ,
+.IR log_dir_fallback ,
+and
+.I log_dir_wait
+relations in the
+.I [options]
+stanza.
+.PP
+The filename in
+.I log_filename
+may contain the following percent-expressions that will be expanded as
+follows.
+.TP
+.B %d
+The current day of the month
+.TP
+.B %D
+The current date; this is a equivalent of
+.B %Y%m%d
+.TP
+.B %h
+The hostname of the system.
+.TP
+.B %H
+The current hour in 24-hour format (00..23)
+.TP
+.B %m
+The current month as a two-digit number (01..12)
+.TP
+.B %M
+The current minute (00..59)
+.TP
+.B %N
+The name of the block device containing the file system, with any
+directory pathname stripped off.
+.TP
+.B %p
+The pid of the e2fsck process
+.TP
+.B %s
+The current time expressed as the number of seconds since 1970-01-01
+00:00:00 UTC
+.TP
+.B %S
+The current second (00..59)
+.TP
+.B %T
+The current time; this is equivalent of
+.B %H%M%S
+.TP
+.B %u
+The name of the user running e2fsck.
+.TP
+.B %U
+This percent expression does not expand to anything, but it signals that
+any following date or time expressions should be expressed in UTC time
+instead of the local timezone.
+.TP
+.B %y
+The last two digits of the current year (00..99)
+.TP
+.B %Y
+The current year (i.e., 2012).
+.SH EXAMPLES
+The following recipe will prevent e2fsck from aborting during the boot
+process when a file system contains orphaned files. (Of course, this is
+not always a good idea, since critical files that are needed for the
+security of the system could potentially end up in lost+found, and
+starting the system without first having a system administrator check
+things out may be dangerous.)
+.P
+.br
+ [problems]
+.br
+ 0x040002 = {
+.br
+ preen_ok = true
+.br
+ description = "@u @i %i. "
+.br
+ }
+.P
+The following recipe will cause an e2fsck logfile to be written to the
+directory /var/log/e2fsck, with a filename that contains the device
+name, the hostname of the system, the date, and time: e.g.,
+"e2fsck-sda3.server.INFO.20120314-112142". If the directory containing
+/var/log is located on the root file system
+which is initially mounted read-only, then the output will be saved in
+memory and written out once the root file system has been remounted
+read/write. To avoid too much detail from being written to the serial
+console (which could potentially slow down the boot sequence), only print
+no more than 16 instances of each type of file system corruption.
+.P
+.br
+ [options]
+.br
+ max_count_problems = 16
+.br
+ log_dir = /var/log/e2fsck
+.br
+ log_filename = e2fsck-%N.%h.INFO.%D-%T
+.br
+ log_dir_wait = true
+.P
+.SH FILES
+.TP
+.I /etc/e2fsck.conf
+The configuration file for
+.BR e2fsck (8).
+.SH SEE ALSO
+.BR e2fsck (8)
diff --git a/e2fsck/e2fsck.h b/e2fsck/e2fsck.h
new file mode 100644
index 0000000..3f2dc30
--- /dev/null
+++ b/e2fsck/e2fsck.h
@@ -0,0 +1,738 @@
+/*
+ * e2fsck.h
+ *
+ * Copyright (C) 1993, 1994 Theodore Ts'o. This file may be
+ * redistributed under the terms of the GNU Public License.
+ *
+ */
+
+#ifndef _E2FSCK_H
+#define _E2FSCK_H
+
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <time.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SETJMP_H
+#include <setjmp.h>
+#endif
+
+#if EXT2_FLAT_INCLUDES
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "blkid.h"
+#else
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "blkid/blkid.h"
+#endif
+
+#include "support/profile.h"
+#include "support/prof_err.h"
+
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#include <locale.h>
+#define _(a) (gettext (a))
+#ifdef gettext_noop
+#define N_(a) gettext_noop (a)
+#else
+#define N_(a) (a)
+#endif
+#define P_(singular, plural, n) (ngettext (singular, plural, n))
+#ifndef NLS_CAT_NAME
+#define NLS_CAT_NAME "e2fsprogs"
+#endif
+#ifndef LOCALEDIR
+#define LOCALEDIR "/usr/share/locale"
+#endif
+#else
+#define _(a) (a)
+#define N_(a) a
+#define P_(singular, plural, n) ((n) == 1 ? (singular) : (plural))
+#endif
+
+#ifdef __GNUC__
+#define E2FSCK_ATTR(x) __attribute__(x)
+#else
+#define E2FSCK_ATTR(x)
+#endif
+
+#include "support/quotaio.h"
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+#include "ext2fs/fast_commit.h"
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+
+/*
+ * Exit codes used by fsck-type programs
+ */
+#define FSCK_OK 0 /* No errors */
+#define FSCK_NONDESTRUCT 1 /* File system errors corrected */
+#define FSCK_REBOOT 2 /* System should be rebooted */
+#define FSCK_UNCORRECTED 4 /* File system errors left uncorrected */
+#define FSCK_ERROR 8 /* Operational error */
+#define FSCK_USAGE 16 /* Usage or syntax error */
+#define FSCK_CANCELED 32 /* Aborted with a signal or ^C */
+#define FSCK_LIBRARY 128 /* Shared library error */
+
+/*
+ * The last ext2fs revision level that this version of e2fsck is able to
+ * support
+ */
+#define E2FSCK_CURRENT_REV 1
+
+/*
+ * The directory information structure; stores directory information
+ * collected in earlier passes, to avoid disk i/o in fetching the
+ * directory information.
+ */
+struct dir_info {
+ ext2_ino_t ino; /* Inode number */
+ ext2_ino_t dotdot; /* Parent according to '..' */
+ ext2_ino_t parent; /* Parent according to treewalk */
+};
+
+
+/*
+ * The indexed directory information structure; stores information for
+ * directories which contain a hash tree index.
+ */
+struct dx_dir_info {
+ ext2_ino_t ino; /* Inode number */
+ short depth; /* depth of tree (15 bits) */
+ __u8 hashversion;
+ __u8 casefolded_hash:1;
+ blk_t numblocks; /* number of blocks in dir */
+ struct dx_dirblock_info *dx_block; /* Array of size numblocks */
+};
+
+#define DX_DIRBLOCK_ROOT 1
+#define DX_DIRBLOCK_LEAF 2
+#define DX_DIRBLOCK_NODE 3
+#define DX_DIRBLOCK_CORRUPT 4
+#define DX_DIRBLOCK_CLEARED 8
+
+struct dx_dirblock_info {
+ int type;
+ int flags;
+ blk64_t phys;
+ blk64_t parent;
+ blk64_t previous;
+ ext2_dirhash_t min_hash;
+ ext2_dirhash_t max_hash;
+ ext2_dirhash_t node_min_hash;
+ ext2_dirhash_t node_max_hash;
+};
+
+#define DX_FLAG_REFERENCED 1
+#define DX_FLAG_DUP_REF 2
+#define DX_FLAG_FIRST 4
+#define DX_FLAG_LAST 8
+
+struct encrypted_file_info;
+
+#define RESOURCE_TRACK
+
+#ifdef RESOURCE_TRACK
+/*
+ * This structure is used for keeping track of how much resources have
+ * been used for a particular pass of e2fsck.
+ */
+struct resource_track {
+ struct timeval time_start;
+ struct timeval user_start;
+ struct timeval system_start;
+ void *brk_start;
+ unsigned long long bytes_read;
+ unsigned long long bytes_written;
+};
+#endif
+
+/*
+ * E2fsck options
+ */
+#define E2F_OPT_READONLY 0x0001
+#define E2F_OPT_PREEN 0x0002
+#define E2F_OPT_YES 0x0004
+#define E2F_OPT_NO 0x0008
+#define E2F_OPT_TIME 0x0010
+#define E2F_OPT_TIME2 0x0020
+#define E2F_OPT_CHECKBLOCKS 0x0040
+#define E2F_OPT_DEBUG 0x0080
+#define E2F_OPT_FORCE 0x0100
+#define E2F_OPT_WRITECHECK 0x0200
+#define E2F_OPT_COMPRESS_DIRS 0x0400
+#define E2F_OPT_FRAGCHECK 0x0800
+#define E2F_OPT_JOURNAL_ONLY 0x1000 /* only replay the journal */
+#define E2F_OPT_DISCARD 0x2000
+#define E2F_OPT_CONVERT_BMAP 0x4000 /* convert blockmap to extent */
+#define E2F_OPT_FIXES_ONLY 0x8000 /* skip all optimizations */
+#define E2F_OPT_NOOPT_EXTENTS 0x10000 /* don't optimize extents */
+#define E2F_OPT_ICOUNT_FULLMAP 0x20000 /* use an array for inode counts */
+#define E2F_OPT_UNSHARE_BLOCKS 0x40000
+#define E2F_OPT_CLEAR_UNINIT 0x80000 /* Hack to clear the uninit bit */
+#define E2F_OPT_CHECK_ENCODING 0x100000 /* Force verification of encoded filenames */
+
+/*
+ * E2fsck flags
+ */
+#define E2F_FLAG_ABORT 0x0001 /* Abort signaled */
+#define E2F_FLAG_CANCEL 0x0002 /* Cancel signaled */
+#define E2F_FLAG_SIGNAL_MASK (E2F_FLAG_ABORT | E2F_FLAG_CANCEL)
+#define E2F_FLAG_RESTART 0x0004 /* Restart signaled */
+#define E2F_FLAG_RUN_RETURN (E2F_FLAG_SIGNAL_MASK | E2F_FLAG_RESTART)
+#define E2F_FLAG_RESTART_LATER 0x0008 /* Restart after all iterations done */
+#define E2F_FLAG_SETJMP_OK 0x0010 /* Setjmp valid for abort */
+
+#define E2F_FLAG_PROG_BAR 0x0020 /* Progress bar on screen */
+#define E2F_FLAG_PROG_SUPPRESS 0x0040 /* Progress suspended */
+#define E2F_FLAG_JOURNAL_INODE 0x0080 /* Create a new ext3 journal inode */
+#define E2F_FLAG_SB_SPECIFIED 0x0100 /* The superblock was explicitly
+ * specified by the user */
+#define E2F_FLAG_RESTARTED 0x0200 /* E2fsck has been restarted */
+#define E2F_FLAG_RESIZE_INODE 0x0400 /* Request to recreate resize inode */
+#define E2F_FLAG_GOT_DEVSIZE 0x0800 /* Device size has been fetched */
+#define E2F_FLAG_EXITING 0x1000 /* E2fsck exiting due to errors */
+#define E2F_FLAG_TIME_INSANE 0x2000 /* Time is insane */
+#define E2F_FLAG_PROBLEMS_FIXED 0x4000 /* At least one problem was fixed */
+#define E2F_FLAG_ALLOC_OK 0x8000 /* Can we allocate blocks? */
+
+#define E2F_RESET_FLAGS (E2F_FLAG_TIME_INSANE | E2F_FLAG_PROBLEMS_FIXED)
+
+/*
+ * Defines for indicating the e2fsck pass number
+ */
+#define E2F_PASS_1 1
+#define E2F_PASS_2 2
+#define E2F_PASS_3 3
+#define E2F_PASS_4 4
+#define E2F_PASS_5 5
+#define E2F_PASS_1B 6
+
+/*
+ * Define the extended attribute refcount structure
+ */
+typedef struct ea_refcount *ext2_refcount_t;
+
+/*
+ * This is the global e2fsck structure.
+ */
+typedef struct e2fsck_struct *e2fsck_t;
+
+#define MAX_EXTENT_DEPTH_COUNT 8
+
+/*
+ * This structure is used to manage the list of extents in a file. Placing
+ * it here since this is used by fast_commit.h.
+ */
+struct extent_list {
+ blk64_t blocks_freed;
+ struct ext2fs_extent *extents;
+ unsigned int count;
+ unsigned int size;
+ unsigned int ext_read;
+ errcode_t retval;
+ ext2_ino_t ino;
+};
+
+/* State structure for fast commit replay */
+struct e2fsck_fc_replay_state {
+ struct extent_list fc_extent_list;
+ int fc_replay_num_tags;
+ int fc_replay_expected_off;
+ enum passtype fc_current_pass;
+ int fc_cur_tag;
+ unsigned int fc_crc;
+ __u16 fc_super_state;
+};
+
+struct e2fsck_struct {
+ ext2_filsys fs;
+ const char *program_name;
+ char *filesystem_name;
+ char *device_name;
+ char *io_options;
+ FILE *logf;
+ char *log_fn;
+ FILE *problem_logf;
+ char *problem_log_fn;
+ int flags; /* E2fsck internal flags */
+ int options;
+ unsigned blocksize; /* blocksize */
+ blk64_t use_superblock; /* sb requested by user */
+ blk64_t superblock; /* sb used to open fs */
+ blk64_t num_blocks; /* Total number of blocks */
+ blk64_t free_blocks;
+ ext2_ino_t free_inodes;
+ int mount_flags;
+ int openfs_flags;
+ blkid_cache blkid; /* blkid cache */
+
+#ifdef HAVE_SETJMP_H
+ jmp_buf abort_loc;
+#endif
+ unsigned long abort_code;
+
+ int (*progress)(e2fsck_t ctx, int pass, unsigned long cur,
+ unsigned long max);
+
+ ext2fs_inode_bitmap inode_used_map; /* Inodes which are in use */
+ ext2fs_inode_bitmap inode_bad_map; /* Inodes which are bad somehow */
+ ext2fs_inode_bitmap inode_dir_map; /* Inodes which are directories */
+ ext2fs_inode_bitmap inode_bb_map; /* Inodes which are in bad blocks */
+ ext2fs_inode_bitmap inode_imagic_map; /* AFS inodes */
+ ext2fs_inode_bitmap inode_reg_map; /* Inodes which are regular files*/
+ ext2fs_inode_bitmap inode_casefold_map; /* Inodes which are casefolded */
+
+ ext2fs_block_bitmap block_found_map; /* Blocks which are in use */
+ ext2fs_block_bitmap block_dup_map; /* Blks referenced more than once */
+ ext2fs_block_bitmap block_ea_map; /* Blocks which are used by EA's */
+
+ /*
+ * Inode count arrays
+ */
+ ext2_icount_t inode_count;
+ ext2_icount_t inode_link_info;
+
+ ext2_refcount_t refcount;
+ ext2_refcount_t refcount_extra;
+
+ /*
+ * Quota blocks and inodes to be charged for each ea block.
+ */
+ ext2_refcount_t ea_block_quota_blocks;
+ ext2_refcount_t ea_block_quota_inodes;
+
+ /*
+ * ea_inode references from attr entries.
+ */
+ ext2_refcount_t ea_inode_refs;
+
+ /*
+ * Array of flags indicating whether an inode bitmap, block
+ * bitmap, or inode table is invalid
+ */
+ int *invalid_inode_bitmap_flag;
+ int *invalid_block_bitmap_flag;
+ int *invalid_inode_table_flag;
+ int invalid_bitmaps; /* There are invalid bitmaps/itable */
+
+ /*
+ * Block buffer
+ */
+ char *block_buf;
+
+ /*
+ * For pass1_check_directory and pass1_get_blocks
+ */
+ ext2_ino_t stashed_ino;
+ struct ext2_inode *stashed_inode;
+
+ /*
+ * Location of the lost and found directory
+ */
+ ext2_ino_t lost_and_found;
+ int bad_lost_and_found;
+
+ /*
+ * Directory information
+ */
+ struct dir_info_db *dir_info;
+
+ /*
+ * Indexed directory information
+ */
+ ext2_ino_t dx_dir_info_count;
+ ext2_ino_t dx_dir_info_size;
+ struct dx_dir_info *dx_dir_info;
+
+ /*
+ * Directories to hash
+ */
+ ext2_u32_list dirs_to_hash;
+
+ /*
+ * Encrypted file information
+ */
+ struct encrypted_file_info *encrypted_files;
+
+ /*
+ * Tuning parameters
+ */
+ int process_inode_size;
+ int inode_buffer_blocks;
+ unsigned int htree_slack_percentage;
+
+ /*
+ * ext3 journal support
+ */
+ io_channel journal_io;
+ char *journal_name;
+
+ /*
+ * Ext4 quota support
+ */
+ quota_ctx_t qctx;
+#ifdef RESOURCE_TRACK
+ /*
+ * For timing purposes
+ */
+ struct resource_track global_rtrack;
+#endif
+
+ /*
+ * How we display the progress update (for unix)
+ */
+ int progress_fd;
+ int progress_pos;
+ int progress_last_percent;
+ unsigned int progress_last_time;
+ int interactive; /* Are we connected directly to a tty? */
+ char start_meta[2], stop_meta[2];
+
+ /* File counts */
+ __u32 fs_directory_count;
+ __u32 fs_regular_count;
+ __u32 fs_blockdev_count;
+ __u32 fs_chardev_count;
+ __u32 fs_links_count;
+ __u32 fs_symlinks_count;
+ __u32 fs_fast_symlinks_count;
+ __u32 fs_fifo_count;
+ __u32 fs_total_count;
+ __u32 fs_badblocks_count;
+ __u32 fs_sockets_count;
+ __u32 fs_ind_count;
+ __u32 fs_dind_count;
+ __u32 fs_tind_count;
+ __u32 fs_fragmented;
+ __u32 fs_fragmented_dir;
+ __u32 large_files;
+ __u32 large_dirs;
+ __u32 fs_ext_attr_inodes;
+ __u32 fs_ext_attr_blocks;
+ __u32 extent_depth_count[MAX_EXTENT_DEPTH_COUNT];
+
+ /* misc fields */
+ time_t now;
+ time_t time_fudge; /* For working around buggy init scripts */
+ int ext_attr_ver;
+ profile_t profile;
+ int blocks_per_page;
+ ext2_u32_list casefolded_dirs;
+
+ /* Reserve blocks for root and l+f re-creation */
+ blk64_t root_repair_block, lnf_repair_block;
+
+ /*
+ * For the use of callers of the e2fsck functions; not used by
+ * e2fsck functions themselves.
+ */
+ void *priv_data;
+ ext2fs_block_bitmap block_metadata_map; /* Metadata blocks */
+
+ /* How much are we allowed to readahead? */
+ unsigned long long readahead_kb;
+
+ /*
+ * Inodes to rebuild extent trees
+ */
+ ext2fs_inode_bitmap inodes_to_rebuild;
+
+ /* Undo file */
+ char *undo_file;
+
+ /* Fast commit replay state */
+ struct e2fsck_fc_replay_state fc_replay_state;
+};
+
+/* Data structures to evaluate whether an extent tree needs rebuilding. */
+struct extent_tree_level {
+ unsigned int num_extents;
+ unsigned int max_extents;
+};
+
+struct extent_tree_info {
+ ext2_ino_t ino;
+ int force_rebuild;
+ struct extent_tree_level ext_info[MAX_EXTENT_DEPTH_COUNT];
+};
+
+/* Used by the region allocation code */
+typedef __u64 region_addr_t;
+typedef struct region_struct *region_t;
+
+#ifndef HAVE_STRNLEN
+#define strnlen(str, x) e2fsck_strnlen((str),(x))
+extern int e2fsck_strnlen(const char * s, int count);
+#endif
+
+/*
+ * Procedure declarations
+ */
+
+extern void e2fsck_pass1(e2fsck_t ctx);
+extern void e2fsck_pass1_dupblocks(e2fsck_t ctx, char *block_buf);
+extern void e2fsck_pass2(e2fsck_t ctx);
+extern void e2fsck_pass3(e2fsck_t ctx);
+extern void e2fsck_pass4(e2fsck_t ctx);
+extern void e2fsck_pass5(e2fsck_t ctx);
+
+/* e2fsck.c */
+extern errcode_t e2fsck_allocate_context(e2fsck_t *ret);
+extern errcode_t e2fsck_reset_context(e2fsck_t ctx);
+extern void e2fsck_free_context(e2fsck_t ctx);
+extern int e2fsck_run(e2fsck_t ctx);
+
+
+/* badblock.c */
+extern void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file,
+ int replace_bad_blocks);
+
+/* dirinfo.c */
+extern void e2fsck_add_dir_info(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent);
+extern void e2fsck_free_dir_info(e2fsck_t ctx);
+extern int e2fsck_get_num_dirinfo(e2fsck_t ctx);
+extern struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx);
+extern struct dir_info *e2fsck_dir_info_iter(e2fsck_t ctx,
+ struct dir_info_iter *);
+extern void e2fsck_dir_info_iter_end(e2fsck_t ctx, struct dir_info_iter *);
+extern int e2fsck_dir_info_set_parent(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t parent);
+extern int e2fsck_dir_info_set_dotdot(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t dotdot);
+extern int e2fsck_dir_info_get_parent(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t *parent);
+extern int e2fsck_dir_info_get_dotdot(e2fsck_t ctx, ext2_ino_t ino,
+ ext2_ino_t *dotdot);
+
+/* dx_dirinfo.c */
+extern void e2fsck_add_dx_dir(e2fsck_t ctx, ext2_ino_t ino,
+ struct ext2_inode *inode, int num_blocks);
+extern struct dx_dir_info *e2fsck_get_dx_dir_info(e2fsck_t ctx, ext2_ino_t ino);
+extern void e2fsck_free_dx_dir_info(e2fsck_t ctx);
+extern ext2_ino_t e2fsck_get_num_dx_dirinfo(e2fsck_t ctx);
+extern struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx,
+ ext2_ino_t *control);
+
+/* ea_refcount.c */
+typedef __u64 ea_key_t;
+typedef __u64 ea_value_t;
+
+extern errcode_t ea_refcount_create(size_t size, ext2_refcount_t *ret);
+extern void ea_refcount_free(ext2_refcount_t refcount);
+extern errcode_t ea_refcount_fetch(ext2_refcount_t refcount, ea_key_t ea_key,
+ ea_value_t *ret);
+extern errcode_t ea_refcount_increment(ext2_refcount_t refcount,
+ ea_key_t ea_key, ea_value_t *ret);
+extern errcode_t ea_refcount_decrement(ext2_refcount_t refcount,
+ ea_key_t ea_key, ea_value_t *ret);
+extern errcode_t ea_refcount_store(ext2_refcount_t refcount, ea_key_t ea_key,
+ ea_value_t count);
+extern size_t ext2fs_get_refcount_size(ext2_refcount_t refcount);
+extern void ea_refcount_intr_begin(ext2_refcount_t refcount);
+extern ea_key_t ea_refcount_intr_next(ext2_refcount_t refcount,
+ ea_value_t *ret);
+
+/* ehandler.c */
+extern const char *ehandler_operation(const char *op);
+extern void ehandler_init(io_channel channel);
+
+/* encrypted_files.c */
+
+struct problem_context;
+int add_encrypted_file(e2fsck_t ctx, struct problem_context *pctx);
+
+#define NO_ENCRYPTION_POLICY ((__u32)-1)
+#define CORRUPT_ENCRYPTION_POLICY ((__u32)-2)
+#define UNRECOGNIZED_ENCRYPTION_POLICY ((__u32)-3)
+__u32 find_encryption_policy(e2fsck_t ctx, ext2_ino_t ino);
+
+void destroy_encryption_policy_map(e2fsck_t ctx);
+void destroy_encrypted_file_info(e2fsck_t ctx);
+
+/* extents.c */
+errcode_t e2fsck_rebuild_extents_later(e2fsck_t ctx, ext2_ino_t ino);
+int e2fsck_ino_will_be_rebuilt(e2fsck_t ctx, ext2_ino_t ino);
+void e2fsck_pass1e(e2fsck_t ctx);
+errcode_t e2fsck_check_rebuild_extents(e2fsck_t ctx, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ struct problem_context *pctx);
+errcode_t e2fsck_should_rebuild_extents(e2fsck_t ctx,
+ struct problem_context *pctx,
+ struct extent_tree_info *eti,
+ struct ext2_extent_info *info);
+errcode_t e2fsck_read_extents(e2fsck_t ctx, struct extent_list *extents);
+errcode_t e2fsck_rewrite_extent_tree(e2fsck_t ctx,
+ struct extent_list *extents);
+
+/* journal.c */
+extern errcode_t e2fsck_check_ext3_journal(e2fsck_t ctx);
+extern errcode_t e2fsck_run_ext3_journal(e2fsck_t ctx);
+extern void e2fsck_move_ext3_journal(e2fsck_t ctx);
+extern int e2fsck_fix_ext3_journal_hint(e2fsck_t ctx);
+
+/* logfile.c */
+extern void set_up_logging(e2fsck_t ctx);
+
+/* quota.c */
+extern void e2fsck_hide_quota(e2fsck_t ctx);
+extern void e2fsck_validate_quota_inodes(e2fsck_t ctx);
+
+/* pass1.c */
+extern errcode_t e2fsck_setup_icount(e2fsck_t ctx, const char *icount_name,
+ int flags, ext2_icount_t hint,
+ ext2_icount_t *ret);
+extern void e2fsck_use_inode_shortcuts(e2fsck_t ctx, int use_shortcuts);
+extern int e2fsck_pass1_check_device_inode(ext2_filsys fs,
+ struct ext2_inode *inode);
+extern int e2fsck_pass1_check_symlink(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, char *buf);
+extern void e2fsck_clear_inode(e2fsck_t ctx, ext2_ino_t ino,
+ struct ext2_inode *inode, int restart_flag,
+ const char *source);
+extern void e2fsck_intercept_block_allocations(e2fsck_t ctx);
+
+/* pass2.c */
+extern int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir,
+ ext2_ino_t ino, char *buf);
+
+/* pass3.c */
+extern int e2fsck_reconnect_file(e2fsck_t ctx, ext2_ino_t inode);
+extern errcode_t e2fsck_expand_directory(e2fsck_t ctx, ext2_ino_t dir,
+ int num, int gauranteed_size);
+extern ext2_ino_t e2fsck_get_lost_and_found(e2fsck_t ctx, int fix);
+extern errcode_t e2fsck_adjust_inode_count(e2fsck_t ctx, ext2_ino_t ino,
+ int adj);
+
+/* readahead.c */
+#define E2FSCK_READA_SUPER (0x01)
+#define E2FSCK_READA_GDT (0x02)
+#define E2FSCK_READA_BBITMAP (0x04)
+#define E2FSCK_READA_IBITMAP (0x08)
+#define E2FSCK_READA_ITABLE (0x10)
+#define E2FSCK_READA_ALL_FLAGS (0x1F)
+errcode_t e2fsck_readahead(ext2_filsys fs, int flags, dgrp_t start,
+ dgrp_t ngroups);
+#define E2FSCK_RA_DBLIST_IGNORE_BLOCKCNT (0x01)
+#define E2FSCK_RA_DBLIST_ALL_FLAGS (0x01)
+errcode_t e2fsck_readahead_dblist(ext2_filsys fs, int flags,
+ ext2_dblist dblist,
+ unsigned long long start,
+ unsigned long long count);
+int e2fsck_can_readahead(ext2_filsys fs);
+unsigned long long e2fsck_guess_readahead(ext2_filsys fs);
+
+/* region.c */
+extern region_t region_create(region_addr_t min, region_addr_t max);
+extern void region_free(region_t region);
+extern int region_allocate(region_t region, region_addr_t start, int n);
+
+/* rehash.c */
+void e2fsck_rehash_dir_later(e2fsck_t ctx, ext2_ino_t ino);
+int e2fsck_dir_will_be_rehashed(e2fsck_t ctx, ext2_ino_t ino);
+errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino,
+ struct problem_context *pctx);
+void e2fsck_rehash_directories(e2fsck_t ctx);
+
+/* sigcatcher.c */
+void sigcatcher_setup(void);
+
+/* super.c */
+void check_super_block(e2fsck_t ctx);
+int check_backup_super_block(e2fsck_t ctx);
+void check_resize_inode(e2fsck_t ctx);
+int check_init_orphan_file(e2fsck_t ctx);
+
+/* util.c */
+extern void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned long size,
+ const char *description);
+extern int ask(e2fsck_t ctx, const char * string, int def);
+extern int ask_yn(e2fsck_t ctx, const char * string, int def);
+extern void fatal_error(e2fsck_t ctx, const char * fmt_string);
+extern void log_out(e2fsck_t ctx, const char *fmt, ...)
+ E2FSCK_ATTR((format(printf, 2, 3)));
+extern void log_err(e2fsck_t ctx, const char *fmt, ...)
+ E2FSCK_ATTR((format(printf, 2, 3)));
+extern void e2fsck_read_bitmaps(e2fsck_t ctx);
+extern void e2fsck_write_bitmaps(e2fsck_t ctx);
+extern void preenhalt(e2fsck_t ctx);
+extern char *string_copy(e2fsck_t ctx, const char *str, size_t len);
+extern int fs_proc_check(const char *fs_name);
+extern int check_for_modules(const char *fs_name);
+#ifdef RESOURCE_TRACK
+extern void print_resource_track(e2fsck_t ctx,
+ const char *desc,
+ struct resource_track *track,
+ io_channel channel);
+extern void init_resource_track(struct resource_track *track,
+ io_channel channel);
+#else
+#define print_resource_track(ctx, desc, track, channel) do { } while (0)
+#define init_resource_track(track, channel) do { } while (0)
+#endif
+extern int inode_has_valid_blocks(struct ext2_inode *inode);
+extern void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char * proc);
+extern void e2fsck_read_inode_full(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode *inode,
+ const int bufsize, const char *proc);
+extern void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char * proc);
+extern void e2fsck_write_inode_full(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, int bufsize,
+ const char *proc);
+#ifdef MTRACE
+extern void mtrace_print(char *mesg);
+#endif
+extern blk64_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs,
+ const char *name, io_manager manager);
+extern int ext2_file_type(unsigned int mode);
+extern int write_all(int fd, char *buf, size_t count);
+void dump_mmp_msg(struct mmp_struct *mmp, const char *fmt, ...)
+ E2FSCK_ATTR((format(printf, 2, 3)));
+errcode_t e2fsck_mmp_update(ext2_filsys fs);
+
+extern void e2fsck_set_bitmap_type(ext2_filsys fs,
+ unsigned int default_type,
+ const char *profile_name,
+ unsigned int *old_type);
+extern errcode_t e2fsck_allocate_inode_bitmap(ext2_filsys fs,
+ const char *descr,
+ int default_type,
+ const char *profile_name,
+ ext2fs_inode_bitmap *ret);
+extern errcode_t e2fsck_allocate_block_bitmap(ext2_filsys fs,
+ const char *descr,
+ int default_type,
+ const char *profile_name,
+ ext2fs_block_bitmap *ret);
+extern errcode_t e2fsck_allocate_subcluster_bitmap(ext2_filsys fs,
+ const char *descr,
+ int default_type,
+ const char *profile_name,
+ ext2fs_block_bitmap *ret);
+unsigned long long get_memory_size(void);
+
+/* unix.c */
+extern void e2fsck_clear_progbar(e2fsck_t ctx);
+extern int e2fsck_simple_progress(e2fsck_t ctx, const char *label,
+ float percent, unsigned int dpynum);
+
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+
+#endif /* _E2FSCK_H */
diff --git a/e2fsck/ea_refcount.c b/e2fsck/ea_refcount.c
new file mode 100644
index 0000000..7154b47
--- /dev/null
+++ b/e2fsck/ea_refcount.c
@@ -0,0 +1,476 @@
+/*
+ * ea_refcount.c
+ *
+ * Copyright (C) 2001 Theodore Ts'o. This file may be
+ * redistributed under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+
+#ifdef TEST_PROGRAM
+#undef ENABLE_NLS
+#endif
+#include "e2fsck.h"
+
+/*
+ * The strategy we use for keeping track of EA refcounts is as
+ * follows. We keep a sorted array of first EA blocks and its
+ * reference counts. Once the refcount has dropped to zero, it is
+ * removed from the array to save memory space. Once the EA block is
+ * checked, its bit is set in the block_ea_map bitmap.
+ */
+struct ea_refcount_el {
+ /* ea_key could either be an inode number or block number. */
+ ea_key_t ea_key;
+ ea_value_t ea_value;
+};
+
+struct ea_refcount {
+ size_t count;
+ size_t size;
+ size_t cursor;
+ struct ea_refcount_el *list;
+};
+
+void ea_refcount_free(ext2_refcount_t refcount)
+{
+ if (!refcount)
+ return;
+
+ if (refcount->list)
+ ext2fs_free_mem(&refcount->list);
+ ext2fs_free_mem(&refcount);
+}
+
+errcode_t ea_refcount_create(size_t size, ext2_refcount_t *ret)
+{
+ ext2_refcount_t refcount;
+ errcode_t retval;
+ size_t bytes;
+
+ retval = ext2fs_get_memzero(sizeof(struct ea_refcount), &refcount);
+ if (retval)
+ return retval;
+
+ if (!size)
+ size = 500;
+ refcount->size = size;
+ bytes = size * sizeof(struct ea_refcount_el);
+#ifdef DEBUG
+ printf("Refcount allocated %zu entries, %zu bytes.\n",
+ refcount->size, bytes);
+#endif
+ retval = ext2fs_get_memzero(bytes, &refcount->list);
+ if (retval)
+ goto errout;
+
+ refcount->count = 0;
+ refcount->cursor = 0;
+
+ *ret = refcount;
+ return 0;
+
+errout:
+ ea_refcount_free(refcount);
+ return(retval);
+}
+
+/*
+ * collapse_refcount() --- go through the refcount array, and get rid
+ * of any count == zero entries
+ */
+static void refcount_collapse(ext2_refcount_t refcount)
+{
+ unsigned int i, j;
+ struct ea_refcount_el *list;
+
+ list = refcount->list;
+ for (i = 0, j = 0; i < refcount->count; i++) {
+ if (list[i].ea_value) {
+ if (i != j)
+ list[j] = list[i];
+ j++;
+ }
+ }
+#if defined(DEBUG) || defined(TEST_PROGRAM)
+ printf("Refcount_collapse: size was %zu, now %d\n",
+ refcount->count, j);
+#endif
+ refcount->count = j;
+}
+
+
+/*
+ * insert_refcount_el() --- Insert a new entry into the sorted list at a
+ * specified position.
+ */
+static struct ea_refcount_el *insert_refcount_el(ext2_refcount_t refcount,
+ ea_key_t ea_key, int pos)
+{
+ struct ea_refcount_el *el;
+ errcode_t retval;
+ size_t new_size = 0;
+ int num;
+
+ if (refcount->count >= refcount->size) {
+ new_size = refcount->size + 100;
+#ifdef DEBUG
+ printf("Reallocating refcount %d entries...\n", new_size);
+#endif
+ retval = ext2fs_resize_mem((size_t) refcount->size *
+ sizeof(struct ea_refcount_el),
+ (size_t) new_size *
+ sizeof(struct ea_refcount_el),
+ &refcount->list);
+ if (retval)
+ return 0;
+ refcount->size = new_size;
+ }
+ num = (int) refcount->count - pos;
+ if (num < 0)
+ return 0; /* should never happen */
+ if (num) {
+ memmove(&refcount->list[pos+1], &refcount->list[pos],
+ sizeof(struct ea_refcount_el) * num);
+ }
+ refcount->count++;
+ el = &refcount->list[pos];
+ el->ea_key = ea_key;
+ el->ea_value = 0;
+ return el;
+}
+
+
+/*
+ * get_refcount_el() --- given an block number, try to find refcount
+ * information in the sorted list. If the create flag is set,
+ * and we can't find an entry, create one in the sorted list.
+ */
+static struct ea_refcount_el *get_refcount_el(ext2_refcount_t refcount,
+ ea_key_t ea_key, int create)
+{
+ int low, high, mid;
+
+ if (!refcount || !refcount->list)
+ return 0;
+retry:
+ low = 0;
+ high = (int) refcount->count-1;
+ if (create && ((refcount->count == 0) ||
+ (ea_key > refcount->list[high].ea_key))) {
+ if (refcount->count >= refcount->size)
+ refcount_collapse(refcount);
+
+ return insert_refcount_el(refcount, ea_key,
+ (unsigned) refcount->count);
+ }
+ if (refcount->count == 0)
+ return 0;
+
+ if (refcount->cursor >= refcount->count)
+ refcount->cursor = 0;
+ if (ea_key == refcount->list[refcount->cursor].ea_key)
+ return &refcount->list[refcount->cursor++];
+#ifdef DEBUG
+ printf("Non-cursor get_refcount_el: %u\n", ea_key);
+#endif
+ while (low <= high) {
+ mid = (low+high)/2;
+ if (ea_key == refcount->list[mid].ea_key) {
+ refcount->cursor = mid+1;
+ return &refcount->list[mid];
+ }
+ if (ea_key < refcount->list[mid].ea_key)
+ high = mid-1;
+ else
+ low = mid+1;
+ }
+ /*
+ * If we need to create a new entry, it should be right at
+ * low (where high will be left at low-1).
+ */
+ if (create) {
+ if (refcount->count >= refcount->size) {
+ refcount_collapse(refcount);
+ if (refcount->count < refcount->size)
+ goto retry;
+ }
+ return insert_refcount_el(refcount, ea_key, low);
+ }
+ return 0;
+}
+
+errcode_t ea_refcount_fetch(ext2_refcount_t refcount, ea_key_t ea_key,
+ ea_value_t *ret)
+{
+ struct ea_refcount_el *el;
+
+ el = get_refcount_el(refcount, ea_key, 0);
+ if (!el) {
+ *ret = 0;
+ return 0;
+ }
+ *ret = el->ea_value;
+ return 0;
+}
+
+errcode_t ea_refcount_increment(ext2_refcount_t refcount, ea_key_t ea_key,
+ ea_value_t *ret)
+{
+ struct ea_refcount_el *el;
+
+ el = get_refcount_el(refcount, ea_key, 1);
+ if (!el)
+ return EXT2_ET_NO_MEMORY;
+ el->ea_value++;
+
+ if (ret)
+ *ret = el->ea_value;
+ return 0;
+}
+
+errcode_t ea_refcount_decrement(ext2_refcount_t refcount, ea_key_t ea_key,
+ ea_value_t *ret)
+{
+ struct ea_refcount_el *el;
+
+ el = get_refcount_el(refcount, ea_key, 0);
+ if (!el || el->ea_value == 0)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ el->ea_value--;
+
+ if (ret)
+ *ret = el->ea_value;
+ return 0;
+}
+
+errcode_t ea_refcount_store(ext2_refcount_t refcount, ea_key_t ea_key,
+ ea_value_t ea_value)
+{
+ struct ea_refcount_el *el;
+
+ /*
+ * Get the refcount element
+ */
+ el = get_refcount_el(refcount, ea_key, ea_value ? 1 : 0);
+ if (!el)
+ return ea_value ? EXT2_ET_NO_MEMORY : 0;
+ el->ea_value = ea_value;
+ return 0;
+}
+
+size_t ext2fs_get_refcount_size(ext2_refcount_t refcount)
+{
+ if (!refcount)
+ return 0;
+
+ return refcount->size;
+}
+
+void ea_refcount_intr_begin(ext2_refcount_t refcount)
+{
+ refcount->cursor = 0;
+}
+
+ea_key_t ea_refcount_intr_next(ext2_refcount_t refcount,
+ ea_value_t *ret)
+{
+ struct ea_refcount_el *list;
+
+ while (1) {
+ if (refcount->cursor >= refcount->count)
+ return 0;
+ list = refcount->list;
+ if (list[refcount->cursor].ea_value) {
+ if (ret)
+ *ret = list[refcount->cursor].ea_value;
+ return list[refcount->cursor++].ea_key;
+ }
+ refcount->cursor++;
+ }
+}
+
+
+#ifdef TEST_PROGRAM
+
+errcode_t ea_refcount_validate(ext2_refcount_t refcount, FILE *out)
+{
+ errcode_t ret = 0;
+ int i;
+ const char *bad = "bad refcount";
+
+ if (refcount->count > refcount->size) {
+ fprintf(out, "%s: count > size\n", bad);
+ return EXT2_ET_INVALID_ARGUMENT;
+ }
+ for (i=1; i < refcount->count; i++) {
+ if (refcount->list[i-1].ea_key >= refcount->list[i].ea_key) {
+ fprintf(out,
+ "%s: list[%d].ea_key=%llu, list[%d].ea_key=%llu\n",
+ bad, i-1,
+ (unsigned long long) refcount->list[i-1].ea_key,
+ i,
+ (unsigned long long) refcount->list[i].ea_key);
+ ret = EXT2_ET_INVALID_ARGUMENT;
+ }
+ }
+ return ret;
+}
+
+#define BCODE_END 0
+#define BCODE_CREATE 1
+#define BCODE_FREE 2
+#define BCODE_STORE 3
+#define BCODE_INCR 4
+#define BCODE_DECR 5
+#define BCODE_FETCH 6
+#define BCODE_VALIDATE 7
+#define BCODE_LIST 8
+#define BCODE_COLLAPSE 9
+
+int bcode_program[] = {
+ BCODE_CREATE, 5,
+ BCODE_STORE, 3, 3,
+ BCODE_STORE, 4, 4,
+ BCODE_STORE, 1, 1,
+ BCODE_STORE, 8, 8,
+ BCODE_STORE, 2, 2,
+ BCODE_STORE, 4, 0,
+ BCODE_STORE, 2, 0,
+ BCODE_STORE, 6, 6,
+ BCODE_VALIDATE,
+ BCODE_STORE, 4, 4,
+ BCODE_STORE, 2, 2,
+ BCODE_FETCH, 1,
+ BCODE_FETCH, 2,
+ BCODE_INCR, 3,
+ BCODE_INCR, 3,
+ BCODE_DECR, 4,
+ BCODE_STORE, 4, 4,
+ BCODE_VALIDATE,
+ BCODE_STORE, 20, 20,
+ BCODE_STORE, 40, 40,
+ BCODE_STORE, 30, 30,
+ BCODE_STORE, 10, 10,
+ BCODE_DECR, 30,
+ BCODE_FETCH, 30,
+ BCODE_DECR, 2,
+ BCODE_DECR, 2,
+ BCODE_COLLAPSE,
+ BCODE_LIST,
+ BCODE_VALIDATE,
+ BCODE_FREE,
+ BCODE_END
+};
+
+int main(int argc, char **argv)
+{
+ int i = 0;
+ ext2_refcount_t refcount;
+ size_t size;
+ ea_key_t ea_key;
+ ea_value_t arg;
+ errcode_t retval;
+
+ while (1) {
+ switch (bcode_program[i++]) {
+ case BCODE_END:
+ exit(0);
+ case BCODE_CREATE:
+ size = bcode_program[i++];
+ retval = ea_refcount_create(size, &refcount);
+ if (retval) {
+ com_err("ea_refcount_create", retval,
+ "while creating size %zu", size);
+ exit(1);
+ } else
+ printf("Creating refcount with size %zu\n",
+ size);
+ break;
+ case BCODE_FREE:
+ ea_refcount_free(refcount);
+ refcount = 0;
+ printf("Freeing refcount\n");
+ break;
+ case BCODE_STORE:
+ ea_key = (size_t) bcode_program[i++];
+ arg = bcode_program[i++];
+ printf("Storing ea_key %llu with value %llu\n",
+ (unsigned long long) ea_key,
+ (unsigned long long) arg);
+ retval = ea_refcount_store(refcount, ea_key, arg);
+ if (retval)
+ com_err("ea_refcount_store", retval,
+ "while storing ea_key %llu",
+ (unsigned long long) ea_key);
+ break;
+ case BCODE_FETCH:
+ ea_key = (size_t) bcode_program[i++];
+ retval = ea_refcount_fetch(refcount, ea_key, &arg);
+ if (retval)
+ com_err("ea_refcount_fetch", retval,
+ "while fetching ea_key %llu",
+ (unsigned long long) ea_key);
+ else
+ printf("bcode_fetch(%llu) returns %llu\n",
+ (unsigned long long) ea_key,
+ (unsigned long long) arg);
+ break;
+ case BCODE_INCR:
+ ea_key = (size_t) bcode_program[i++];
+ retval = ea_refcount_increment(refcount, ea_key, &arg);
+ if (retval)
+ com_err("ea_refcount_increment", retval,
+ "while incrementing ea_key %llu",
+ (unsigned long long) ea_key);
+ else
+ printf("bcode_increment(%llu) returns %llu\n",
+ (unsigned long long) ea_key,
+ (unsigned long long) arg);
+ break;
+ case BCODE_DECR:
+ ea_key = (size_t) bcode_program[i++];
+ retval = ea_refcount_decrement(refcount, ea_key, &arg);
+ if (retval)
+ com_err("ea_refcount_decrement", retval,
+ "while decrementing ea_key %llu",
+ (unsigned long long) ea_key);
+ else
+ printf("bcode_decrement(%llu) returns %llu\n",
+ (unsigned long long) ea_key,
+ (unsigned long long) arg);
+ break;
+ case BCODE_VALIDATE:
+ retval = ea_refcount_validate(refcount, stderr);
+ if (retval)
+ com_err("ea_refcount_validate", retval,
+ "while validating");
+ else
+ printf("Refcount validation OK.\n");
+ break;
+ case BCODE_LIST:
+ ea_refcount_intr_begin(refcount);
+ while (1) {
+ ea_key = ea_refcount_intr_next(refcount, &arg);
+ if (!ea_key)
+ break;
+ printf("\tea_key=%llu, count=%llu\n",
+ (unsigned long long) ea_key,
+ (unsigned long long) arg);
+ }
+ break;
+ case BCODE_COLLAPSE:
+ refcount_collapse(refcount);
+ break;
+ }
+
+ }
+}
+
+#endif
diff --git a/e2fsck/ehandler.c b/e2fsck/ehandler.c
new file mode 100644
index 0000000..71ca301
--- /dev/null
+++ b/e2fsck/ehandler.c
@@ -0,0 +1,133 @@
+/*
+ * ehandler.c --- handle bad block errors which come up during the
+ * course of an e2fsck session.
+ *
+ * Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <termios.h>
+
+#include "e2fsck.h"
+
+#include <sys/time.h>
+#include <sys/resource.h>
+
+static const char *operation;
+
+static errcode_t e2fsck_handle_read_error(io_channel channel,
+ unsigned long block,
+ int count,
+ void *data,
+ size_t size EXT2FS_ATTR((unused)),
+ int actual EXT2FS_ATTR((unused)),
+ errcode_t error)
+{
+ int i;
+ char *p;
+ ext2_filsys fs = (ext2_filsys) channel->app_data;
+ e2fsck_t ctx;
+
+ ctx = (e2fsck_t) fs->priv_data;
+ if (ctx->flags & E2F_FLAG_EXITING)
+ return 0;
+ /*
+ * If more than one block was read, try reading each block
+ * separately. We could use the actual bytes read to figure
+ * out where to start, but we don't bother.
+ */
+ if (count > 1) {
+ p = (char *) data;
+ for (i=0; i < count; i++, p += channel->block_size, block++) {
+ error = io_channel_read_blk64(channel, block,
+ 1, p);
+ if (error)
+ return error;
+ }
+ return 0;
+ }
+ if (operation)
+ printf(_("Error reading block %lu (%s) while %s. "), block,
+ error_message(error), operation);
+ else
+ printf(_("Error reading block %lu (%s). "), block,
+ error_message(error));
+ preenhalt(ctx);
+
+ /* Don't rewrite a block past the end of the FS. */
+ if (block >= ext2fs_blocks_count(fs->super))
+ return 0;
+
+ if (ask(ctx, _("Ignore error"), 1)) {
+ if (ask(ctx, _("Force rewrite"), 1))
+ io_channel_write_blk64(channel, block, count, data);
+ return 0;
+ }
+
+ return error;
+}
+
+static errcode_t e2fsck_handle_write_error(io_channel channel,
+ unsigned long block,
+ int count,
+ const void *data,
+ size_t size EXT2FS_ATTR((unused)),
+ int actual EXT2FS_ATTR((unused)),
+ errcode_t error)
+{
+ int i;
+ const char *p;
+ ext2_filsys fs = (ext2_filsys) channel->app_data;
+ e2fsck_t ctx;
+
+ ctx = (e2fsck_t) fs->priv_data;
+ if (ctx->flags & E2F_FLAG_EXITING)
+ return 0;
+
+ /*
+ * If more than one block was written, try writing each block
+ * separately. We could use the actual bytes read to figure
+ * out where to start, but we don't bother.
+ */
+ if (count > 1) {
+ p = (const char *) data;
+ for (i=0; i < count; i++, p += channel->block_size, block++) {
+ error = io_channel_write_blk64(channel, block,
+ 1, p);
+ if (error)
+ return error;
+ }
+ return 0;
+ }
+
+ if (operation)
+ printf(_("Error writing block %lu (%s) while %s. "), block,
+ error_message(error), operation);
+ else
+ printf(_("Error writing block %lu (%s). "), block,
+ error_message(error));
+ preenhalt(ctx);
+ if (ask(ctx, _("Ignore error"), 1))
+ return 0;
+
+ return error;
+}
+
+const char *ehandler_operation(const char *op)
+{
+ const char *ret = operation;
+
+ operation = op;
+ return ret;
+}
+
+void ehandler_init(io_channel channel)
+{
+ channel->read_error = e2fsck_handle_read_error;
+ channel->write_error = e2fsck_handle_write_error;
+}
diff --git a/e2fsck/emptydir.c b/e2fsck/emptydir.c
new file mode 100644
index 0000000..7aea7b6
--- /dev/null
+++ b/e2fsck/emptydir.c
@@ -0,0 +1,194 @@
+/*
+ * emptydir.c --- clear empty directory blocks
+ *
+ * Copyright (C) 1998 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * This file has the necessary routines to search for empty directory
+ * blocks and get rid of them.
+ */
+
+#include "config.h"
+#include "e2fsck.h"
+#include "problem.h"
+
+/*
+ * For e2fsck.h
+ */
+struct empty_dir_info_struct {
+ ext2_dblist empty_dblist;
+ ext2fs_block_bitmap empty_dir_blocks;
+ ext2fs_inode_bitmap dir_map;
+ char *block_buf;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ blk64_t logblk;
+ blk64_t freed_blocks;
+};
+
+typedef struct empty_dir_info_struct *empty_dir_info;
+
+extern empty_dir_info init_empty_dir(e2fsck_t ctx);
+extern void free_empty_dirblock(empty_dir_info edi);
+extern void add_empty_dirblock(empty_dir_info edi,
+ struct ext2_db_entry2 *db);
+extern void process_empty_dirblock(e2fsck_t ctx, empty_dir_info edi);
+
+
+empty_dir_info init_empty_dir(e2fsck_t ctx)
+{
+ empty_dir_info edi;
+ errcode_t retval;
+
+ edi = e2fsck_allocate_memzero(ctx, sizeof(struct empty_dir_info_struct),
+ "empty dir info");
+ if (retval)
+ return NULL;
+
+ retval = ext2fs_init_dblist(ctx->fs, &edi->empty_dblist);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_allocate_block_bitmap(ctx->fs, _("empty dirblocks"),
+ &edi->empty_dir_blocks);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_allocate_inode_bitmap(ctx->fs, _("empty dir map"),
+ &edi->dir_map);
+ if (retval)
+ goto errout;
+
+ return (edi);
+
+errout:
+ free_empty_dirblock(edi);
+ return NULL;
+}
+
+void free_empty_dirblock(empty_dir_info edi)
+{
+ if (!edi)
+ return;
+ if (edi->empty_dblist)
+ ext2fs_free_dblist(edi->empty_dblist);
+ if (edi->empty_dir_blocks)
+ ext2fs_free_block_bitmap(edi->empty_dir_blocks);
+ if (edi->dir_map)
+ ext2fs_free_inode_bitmap(edi->dir_map);
+
+ memset(edi, 0, sizeof(struct empty_dir_info_struct));
+ ext2fs_free_mem(&edi);
+}
+
+void add_empty_dirblock(empty_dir_info edi,
+ struct ext2_db_entry2 *db)
+{
+ if (!edi || !db)
+ return;
+
+ if (db->ino == 11)
+ return; /* Inode number 11 is usually lost+found */
+
+ printf(_("Empty directory block %u (#%d) in inode %u\n"),
+ db->blk, db->blockcnt, db->ino);
+
+ ext2fs_mark_block_bitmap2(edi->empty_dir_blocks, db->blk);
+ if (ext2fs_test_inode_bitmap(edi->dir_map, db->ino))
+ return;
+ ext2fs_mark_inode_bitmap(edi->dir_map, db->ino);
+
+ ext2fs_add_dir_block2(edi->empty_dblist, db->ino,
+ db->blk, db->blockcnt);
+}
+
+/*
+ * Helper function used by fix_directory.
+ *
+ * XXX need to finish this. General approach is to use bmap to
+ * iterate over all of the logical blocks using the bmap function, and
+ * copy the block reference as necessary. Big question --- what do
+ * about error recovery?
+ *
+ * Also question --- how to free the indirect blocks.
+ */
+int empty_pass1(ext2_filsys fs, blk64_t *block_nr, e2_blkcnt_t blockcnt,
+ blk64_t ref_block, int ref_offset, void *priv_data)
+{
+ empty_dir_info edi = (empty_dir_info) priv_data;
+ blk64_t block, new_block;
+ errcode_t retval;
+
+ if (blockcnt < 0)
+ return 0;
+ block = *block_nr;
+ do {
+ retval = ext2fs_bmap2(fs, edi->ino, &edi->inode,
+ edi->block_buf, 0, edi->logblk, 0,
+ &new_block);
+ if (retval)
+ return DIRENT_ABORT; /* XXX what to do? */
+ if (new_block == 0)
+ break;
+ edi->logblk++;
+ } while (ext2fs_test_block_bitmap2(edi->empty_dir_blocks, new_block));
+
+ if (new_block == block)
+ return 0;
+ if (new_block == 0)
+ edi->freed_blocks++;
+ *block_nr = new_block;
+ return BLOCK_CHANGED;
+}
+
+static int fix_directory(ext2_filsys fs,
+ struct ext2_db_entry2 *db,
+ void *priv_data)
+{
+ errcode_t retval;
+
+ empty_dir_info edi = (empty_dir_info) priv_data;
+
+ edi->logblk = 0;
+ edi->freed_blocks = 0;
+ edi->ino = db->ino;
+
+ retval = ext2fs_read_inode(fs, db->ino, &edi->inode);
+ if (retval)
+ return 0;
+
+ retval = ext2fs_block_iterate3(fs, db->ino, 0, edi->block_buf,
+ empty_pass1, edi);
+ if (retval)
+ return 0;
+
+ if (edi->freed_blocks) {
+ edi->inode.i_size -= edi->freed_blocks * fs->blocksize;
+ ext2fs_iblk_add_blocks(fs, &edi->inode, edi->freed_blocks);
+ retval = ext2fs_write_inode(fs, db->ino, &edi->inode);
+ if (retval)
+ return 0;
+ }
+ return 0;
+}
+
+void process_empty_dirblock(e2fsck_t ctx, empty_dir_info edi)
+{
+ if (!edi)
+ return;
+
+ retval = ext2f_get_mem(ctx, ctx->fs->blocksize * 3,
+ &edi->block_buf);
+
+ if (edi->block_buf) {
+ (void) ext2fs_dblist_iterate2(edi->empty_dblist,
+ fix_directory, &edi);
+ }
+ ext2fs_free_mem(&edi->block_buf);
+ free_empty_dirblock(edi);
+}
+
diff --git a/e2fsck/encrypted_files.c b/e2fsck/encrypted_files.c
new file mode 100644
index 0000000..16be2d6
--- /dev/null
+++ b/e2fsck/encrypted_files.c
@@ -0,0 +1,458 @@
+/*
+ * encrypted_files.c --- save information about encrypted files
+ *
+ * Copyright 2019 Google LLC
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/*
+ * e2fsck pass 1 (inode table scan) creates a map from inode number to
+ * encryption policy for all encrypted inodes. But it's optimized so that the
+ * full xattrs aren't saved but rather only 32-bit "policy IDs", since usually
+ * many inodes share the same encryption policy. This requires also maintaining
+ * a second map, from policy to policy ID. See add_encrypted_file().
+ *
+ * We also use run-length encoding to save memory when many adjacent inodes
+ * share the same encryption policy, which is often the case too.
+ *
+ * e2fsck pass 2 (directory structure check) uses the inode => policy ID map to
+ * verify that all regular files, directories, and symlinks in encrypted
+ * directories use the directory's encryption policy.
+ */
+
+#include "config.h"
+
+#include "e2fsck.h"
+#include "problem.h"
+#include "ext2fs/rbtree.h"
+
+#define FSCRYPT_KEY_DESCRIPTOR_SIZE 8
+#define FSCRYPT_KEY_IDENTIFIER_SIZE 16
+#define FS_KEY_DERIVATION_NONCE_SIZE 16
+
+struct fscrypt_context_v1 {
+ __u8 version;
+ __u8 contents_encryption_mode;
+ __u8 filenames_encryption_mode;
+ __u8 flags;
+ __u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
+ __u8 nonce[FS_KEY_DERIVATION_NONCE_SIZE];
+};
+
+struct fscrypt_context_v2 {
+ __u8 version;
+ __u8 contents_encryption_mode;
+ __u8 filenames_encryption_mode;
+ __u8 flags;
+ __u8 __reserved[4];
+ __u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE];
+ __u8 nonce[FS_KEY_DERIVATION_NONCE_SIZE];
+};
+
+/* On-disk format of encryption xattr */
+union fscrypt_context {
+ __u8 version;
+ struct fscrypt_context_v1 v1;
+ struct fscrypt_context_v2 v2;
+};
+
+struct fscrypt_policy_v1 {
+ __u8 version;
+ __u8 contents_encryption_mode;
+ __u8 filenames_encryption_mode;
+ __u8 flags;
+ __u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
+};
+
+struct fscrypt_policy_v2 {
+ __u8 version;
+ __u8 contents_encryption_mode;
+ __u8 filenames_encryption_mode;
+ __u8 flags;
+ __u8 __reserved[4];
+ __u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE];
+};
+
+/* The encryption "policy" is the fscrypt_context excluding the nonce. */
+union fscrypt_policy {
+ __u8 version;
+ struct fscrypt_policy_v1 v1;
+ struct fscrypt_policy_v2 v2;
+};
+
+/* A range of inodes which share the same encryption policy */
+struct encrypted_file_range {
+ ext2_ino_t first_ino;
+ ext2_ino_t last_ino;
+ __u32 policy_id;
+};
+
+/* Information about the encrypted files which have been seen so far */
+struct encrypted_file_info {
+ /*
+ * Map from inode number to encryption policy ID, implemented as a
+ * sorted array of inode ranges, each of which shares the same policy.
+ * Inodes are added in order of increasing inode number.
+ *
+ * Freed after pass 2.
+ */
+ struct encrypted_file_range *file_ranges;
+ size_t file_ranges_count;
+ size_t file_ranges_capacity;
+
+ /*
+ * Map from encryption policy to encryption policy ID, for the unique
+ * encryption policies that have been seen so far. next_policy_id is
+ * the next available ID, starting at 0.
+ *
+ * Freed after pass 1.
+ */
+ struct rb_root policies;
+ __u32 next_policy_id;
+};
+
+/* Entry in encrypted_file_info::policies */
+struct policy_map_entry {
+ union fscrypt_policy policy;
+ __u32 policy_id;
+ struct rb_node node;
+};
+
+static int cmp_fscrypt_policies(e2fsck_t ctx, const union fscrypt_policy *a,
+ const union fscrypt_policy *b)
+{
+ if (a->version != b->version)
+ return (int)a->version - (int)b->version;
+
+ switch (a->version) {
+ case 1:
+ return memcmp(a, b, sizeof(a->v1));
+ case 2:
+ return memcmp(a, b, sizeof(a->v2));
+ }
+ fatal_error(ctx, "Unhandled encryption policy version");
+ return 0;
+}
+
+/* Read an inode's encryption xattr. */
+static errcode_t read_encryption_xattr(e2fsck_t ctx, ext2_ino_t ino,
+ void **value, size_t *value_len)
+{
+ struct ext2_xattr_handle *h;
+ errcode_t retval;
+
+ retval = ext2fs_xattrs_open(ctx->fs, ino, &h);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_xattrs_read(h);
+ if (retval == 0)
+ retval = ext2fs_xattr_get(h, "c", value, value_len);
+
+ ext2fs_xattrs_close(&h);
+ return retval;
+}
+
+/*
+ * Convert an fscrypt_context to an fscrypt_policy. Returns 0,
+ * CORRUPT_ENCRYPTION_POLICY, or UNRECOGNIZED_ENCRYPTION_POLICY.
+ */
+static __u32 fscrypt_context_to_policy(const void *xattr, size_t xattr_size,
+ union fscrypt_policy *policy_u)
+{
+ const union fscrypt_context *ctx_u = xattr;
+
+ if (xattr_size < 1)
+ return CORRUPT_ENCRYPTION_POLICY;
+ switch (ctx_u->version) {
+ case 0:
+ return CORRUPT_ENCRYPTION_POLICY;
+ case 1: {
+ struct fscrypt_policy_v1 *policy = &policy_u->v1;
+ const struct fscrypt_context_v1 *ctx = &ctx_u->v1;
+
+ if (xattr_size != sizeof(*ctx))
+ return CORRUPT_ENCRYPTION_POLICY;
+ policy->version = ctx->version;
+ policy->contents_encryption_mode =
+ ctx->contents_encryption_mode;
+ policy->filenames_encryption_mode =
+ ctx->filenames_encryption_mode;
+ policy->flags = ctx->flags;
+ memcpy(policy->master_key_descriptor,
+ ctx->master_key_descriptor,
+ sizeof(policy->master_key_descriptor));
+ return 0;
+ }
+ case 2: {
+ struct fscrypt_policy_v2 *policy = &policy_u->v2;
+ const struct fscrypt_context_v2 *ctx = &ctx_u->v2;
+
+ if (xattr_size != sizeof(*ctx))
+ return CORRUPT_ENCRYPTION_POLICY;
+ policy->version = ctx->version;
+ policy->contents_encryption_mode =
+ ctx->contents_encryption_mode;
+ policy->filenames_encryption_mode =
+ ctx->filenames_encryption_mode;
+ policy->flags = ctx->flags;
+ memcpy(policy->__reserved, ctx->__reserved,
+ sizeof(policy->__reserved));
+ memcpy(policy->master_key_identifier,
+ ctx->master_key_identifier,
+ sizeof(policy->master_key_identifier));
+ return 0;
+ }
+ }
+ return UNRECOGNIZED_ENCRYPTION_POLICY;
+}
+
+/*
+ * Read an inode's encryption xattr and get/allocate its encryption policy ID,
+ * or alternatively use one of the special IDs NO_ENCRYPTION_POLICY,
+ * CORRUPT_ENCRYPTION_POLICY, or UNRECOGNIZED_ENCRYPTION_POLICY.
+ *
+ * Returns nonzero only if out of memory.
+ */
+static errcode_t get_encryption_policy_id(e2fsck_t ctx, ext2_ino_t ino,
+ __u32 *policy_id_ret)
+{
+ struct encrypted_file_info *info = ctx->encrypted_files;
+ struct rb_node **new = &info->policies.rb_node;
+ struct rb_node *parent = NULL;
+ void *xattr;
+ size_t xattr_size;
+ union fscrypt_policy policy;
+ __u32 policy_id;
+ struct policy_map_entry *entry;
+ errcode_t retval;
+
+ retval = read_encryption_xattr(ctx, ino, &xattr, &xattr_size);
+ if (retval == EXT2_ET_NO_MEMORY)
+ return retval;
+ if (retval) {
+ *policy_id_ret = NO_ENCRYPTION_POLICY;
+ return 0;
+ }
+
+ /* Translate the xattr to an fscrypt_policy, if possible. */
+ policy_id = fscrypt_context_to_policy(xattr, xattr_size, &policy);
+ ext2fs_free_mem(&xattr);
+ if (policy_id != 0)
+ goto out;
+
+ /* Check if the policy was already seen. */
+ while (*new) {
+ int res;
+
+ parent = *new;
+ entry = ext2fs_rb_entry(parent, struct policy_map_entry, node);
+ res = cmp_fscrypt_policies(ctx, &policy, &entry->policy);
+ if (res < 0) {
+ new = &parent->rb_left;
+ } else if (res > 0) {
+ new = &parent->rb_right;
+ } else {
+ /* Policy already seen. Use existing ID. */
+ policy_id = entry->policy_id;
+ goto out;
+ }
+ }
+
+ /* First time seeing this policy. Allocate a new policy ID. */
+ retval = ext2fs_get_mem(sizeof(*entry), &entry);
+ if (retval)
+ goto out;
+ policy_id = info->next_policy_id++;
+ entry->policy_id = policy_id;
+ entry->policy = policy;
+ ext2fs_rb_link_node(&entry->node, parent, new);
+ ext2fs_rb_insert_color(&entry->node, &info->policies);
+out:
+ *policy_id_ret = policy_id;
+ return retval;
+}
+
+static int handle_nomem(e2fsck_t ctx, struct problem_context *pctx,
+ size_t size_needed)
+{
+ pctx->num = size_needed;
+ fix_problem(ctx, PR_1_ALLOCATE_ENCRYPTED_INODE_LIST, pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+}
+
+static int append_ino_and_policy_id(e2fsck_t ctx, struct problem_context *pctx,
+ ext2_ino_t ino, __u32 policy_id)
+{
+ struct encrypted_file_info *info = ctx->encrypted_files;
+ struct encrypted_file_range *range;
+
+ /* See if we can just extend the last range. */
+ if (info->file_ranges_count > 0) {
+ range = &info->file_ranges[info->file_ranges_count - 1];
+
+ if (ino <= range->last_ino) {
+ /* Should never get here */
+ fatal_error(ctx,
+ "Encrypted inodes processed out of order");
+ }
+
+ if (ino == range->last_ino + 1 &&
+ policy_id == range->policy_id) {
+ range->last_ino++;
+ return 0;
+ }
+ }
+ /* Nope, a new range is needed. */
+
+ if (info->file_ranges_count == info->file_ranges_capacity) {
+ /* Double the capacity by default. */
+ size_t new_capacity = info->file_ranges_capacity * 2;
+
+ /* ... but go from 0 to 128 right away. */
+ if (new_capacity < 128)
+ new_capacity = 128;
+
+ /* We won't need more than the filesystem's inode count. */
+ if (new_capacity > ctx->fs->super->s_inodes_count)
+ new_capacity = ctx->fs->super->s_inodes_count;
+
+ /* To be safe, ensure the capacity really increases. */
+ if (new_capacity < info->file_ranges_capacity + 1)
+ new_capacity = info->file_ranges_capacity + 1;
+
+ if (ext2fs_resize_mem(info->file_ranges_capacity *
+ sizeof(*range),
+ new_capacity * sizeof(*range),
+ &info->file_ranges) != 0)
+ return handle_nomem(ctx, pctx,
+ new_capacity * sizeof(*range));
+
+ info->file_ranges_capacity = new_capacity;
+ }
+ range = &info->file_ranges[info->file_ranges_count++];
+ range->first_ino = ino;
+ range->last_ino = ino;
+ range->policy_id = policy_id;
+ return 0;
+}
+
+/*
+ * Handle an inode that has EXT4_ENCRYPT_FL set during pass 1. Normally this
+ * just finds the unique ID that identifies the inode's encryption policy
+ * (allocating a new ID if needed), and adds the inode number and its policy ID
+ * to the encrypted_file_info so that it's available in pass 2.
+ *
+ * But this also handles:
+ * - If the inode doesn't have an encryption xattr at all, offer to clear the
+ * encrypt flag.
+ * - If the encryption xattr is clearly corrupt, tell the caller that the whole
+ * inode should be cleared.
+ * - To be future-proof: if the encryption xattr has an unrecognized version
+ * number, it *might* be valid, so we don't consider it invalid. But we can't
+ * do much with it, so give all such policies the same ID,
+ * UNRECOGNIZED_ENCRYPTION_POLICY.
+ *
+ * Returns -1 if the inode should be cleared, otherwise 0.
+ */
+int add_encrypted_file(e2fsck_t ctx, struct problem_context *pctx)
+{
+ struct encrypted_file_info *info = ctx->encrypted_files;
+ ext2_ino_t ino = pctx->ino;
+ __u32 policy_id;
+
+ /* Allocate the encrypted_file_info if needed. */
+ if (info == NULL) {
+ if (ext2fs_get_memzero(sizeof(*info), &info) != 0)
+ return handle_nomem(ctx, pctx, sizeof(*info));
+ ctx->encrypted_files = info;
+ }
+
+ /* Get a unique ID for this inode's encryption policy. */
+ if (get_encryption_policy_id(ctx, ino, &policy_id) != 0)
+ return handle_nomem(ctx, pctx, 0 /* unknown size */);
+ if (policy_id == NO_ENCRYPTION_POLICY) {
+ if (fix_problem(ctx, PR_1_MISSING_ENCRYPTION_XATTR, pctx)) {
+ pctx->inode->i_flags &= ~EXT4_ENCRYPT_FL;
+ e2fsck_write_inode(ctx, ino, pctx->inode, "pass1");
+ }
+ return 0;
+ } else if (policy_id == CORRUPT_ENCRYPTION_POLICY) {
+ if (fix_problem(ctx, PR_1_CORRUPT_ENCRYPTION_XATTR, pctx))
+ return -1;
+ return 0;
+ }
+
+ /* Store this ino => policy_id mapping in the encrypted_file_info. */
+ return append_ino_and_policy_id(ctx, pctx, ino, policy_id);
+}
+
+/*
+ * Find the ID of an inode's encryption policy, using the information saved
+ * earlier.
+ *
+ * If the inode is encrypted, returns the policy ID or
+ * UNRECOGNIZED_ENCRYPTION_POLICY. Else, returns NO_ENCRYPTION_POLICY.
+ */
+__u32 find_encryption_policy(e2fsck_t ctx, ext2_ino_t ino)
+{
+ const struct encrypted_file_info *info = ctx->encrypted_files;
+ size_t l, r;
+
+ if (info == NULL)
+ return NO_ENCRYPTION_POLICY;
+ l = 0;
+ r = info->file_ranges_count;
+ while (l < r) {
+ size_t m = l + (r - l) / 2;
+ const struct encrypted_file_range *range =
+ &info->file_ranges[m];
+
+ if (ino < range->first_ino)
+ r = m;
+ else if (ino > range->last_ino)
+ l = m + 1;
+ else
+ return range->policy_id;
+ }
+ return NO_ENCRYPTION_POLICY;
+}
+
+/* Destroy ctx->encrypted_files->policies */
+void destroy_encryption_policy_map(e2fsck_t ctx)
+{
+ struct encrypted_file_info *info = ctx->encrypted_files;
+
+ if (info) {
+ struct rb_root *policies = &info->policies;
+
+ while (!ext2fs_rb_empty_root(policies)) {
+ struct policy_map_entry *entry;
+
+ entry = ext2fs_rb_entry(policies->rb_node,
+ struct policy_map_entry, node);
+ ext2fs_rb_erase(&entry->node, policies);
+ ext2fs_free_mem(&entry);
+ }
+ info->next_policy_id = 0;
+ }
+}
+
+/* Destroy ctx->encrypted_files */
+void destroy_encrypted_file_info(e2fsck_t ctx)
+{
+ struct encrypted_file_info *info = ctx->encrypted_files;
+
+ if (info) {
+ destroy_encryption_policy_map(ctx);
+ ext2fs_free_mem(&info->file_ranges);
+ ext2fs_free_mem(&info);
+ ctx->encrypted_files = NULL;
+ }
+}
diff --git a/e2fsck/extend.c b/e2fsck/extend.c
new file mode 100644
index 0000000..9d17e44
--- /dev/null
+++ b/e2fsck/extend.c
@@ -0,0 +1,83 @@
+/*
+ * extend.c --- extend a file so that it has at least a specified
+ * number of blocks.
+ *
+ * Copyright (C) 1993, 1994, 1995 Theodore Ts'o.
+ *
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include "../misc/nls-enable.h"
+
+static void usage(char *progname)
+{
+ fprintf(stderr, _("%s: %s filename nblocks blocksize\n"),
+ progname, progname);
+ exit(1);
+}
+
+
+int main(int argc, char **argv)
+{
+ char *filename;
+ int nblocks, blocksize;
+ int fd;
+ char *block;
+ errcode_t retval;
+ int ret;
+
+ if (argc != 4)
+ usage(argv[0]);
+
+ filename = argv[1];
+ nblocks = strtoul(argv[2], 0, 0) - 1;
+ blocksize = strtoul(argv[3], 0, 0);
+
+ if (nblocks < 0) {
+ fprintf(stderr, _("Illegal number of blocks!\n"));
+ exit(1);
+ }
+
+ retval = ext2fs_get_memzero(blocksize, &block);
+ if (retval) {
+ fprintf(stderr, _("Couldn't allocate block buffer (size=%d)\n"),
+ blocksize);
+ exit(1);
+ }
+
+ fd = open(filename, O_RDWR);
+ if (fd < 0) {
+ perror(filename);
+ exit(1);
+ }
+ ret = lseek(fd, nblocks*blocksize, SEEK_SET);
+ if (ret < 0) {
+ perror("lseek");
+ exit(1);
+ }
+ ret = read(fd, block, blocksize);
+ if (ret < 0) {
+ perror("read");
+ exit(1);
+ }
+ ret = lseek(fd, nblocks*blocksize, SEEK_SET);
+ if (ret < 0) {
+ perror("lseek #2");
+ exit(1);
+ }
+ ret = write(fd, block, blocksize);
+ if (ret < 0) {
+ perror("read");
+ exit(1);
+ }
+ ext2fs_free_mem(&block);
+ return(0);
+}
diff --git a/e2fsck/extents.c b/e2fsck/extents.c
new file mode 100644
index 0000000..70798f3
--- /dev/null
+++ b/e2fsck/extents.c
@@ -0,0 +1,620 @@
+/*
+ * extents.c --- rebuild extent tree
+ *
+ * Copyright (C) 2014 Oracle.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include "e2fsck.h"
+#include "problem.h"
+
+#undef DEBUG
+#undef DEBUG_SUMMARY
+#undef DEBUG_FREE
+
+#define NUM_EXTENTS 341 /* about one ETB' worth of extents */
+
+static errcode_t e2fsck_rebuild_extents(e2fsck_t ctx, ext2_ino_t ino);
+
+/* Schedule an inode to have its extent tree rebuilt during pass 1E. */
+errcode_t e2fsck_rebuild_extents_later(e2fsck_t ctx, ext2_ino_t ino)
+{
+ errcode_t retval = 0;
+
+ if (!ext2fs_has_feature_extents(ctx->fs->super) ||
+ (ctx->options & E2F_OPT_NO) ||
+ (ino != EXT2_ROOT_INO && ino < ctx->fs->super->s_first_ino))
+ return 0;
+
+ if (ctx->flags & E2F_FLAG_ALLOC_OK)
+ return e2fsck_rebuild_extents(ctx, ino);
+
+ if (!ctx->inodes_to_rebuild)
+ retval = e2fsck_allocate_inode_bitmap(ctx->fs,
+ _("extent rebuild inode map"),
+ EXT2FS_BMAP64_RBTREE,
+ "inodes_to_rebuild",
+ &ctx->inodes_to_rebuild);
+ if (retval)
+ return retval;
+
+ ext2fs_mark_inode_bitmap2(ctx->inodes_to_rebuild, ino);
+ return 0;
+}
+
+/* Ask if an inode will have its extents rebuilt during pass 1E. */
+int e2fsck_ino_will_be_rebuilt(e2fsck_t ctx, ext2_ino_t ino)
+{
+ if (!ctx->inodes_to_rebuild)
+ return 0;
+ return ext2fs_test_inode_bitmap2(ctx->inodes_to_rebuild, ino);
+}
+
+static errcode_t load_extents(e2fsck_t ctx, struct extent_list *list)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_extent_handle_t handle;
+ struct ext2fs_extent extent;
+ errcode_t retval;
+
+ retval = ext2fs_extent_open(fs, list->ino, &handle);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_ROOT, &extent);
+ if (retval)
+ goto out;
+
+ do {
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT)
+ goto next;
+
+ /* Internal node; free it and we'll re-allocate it later */
+ if (!(extent.e_flags & EXT2_EXTENT_FLAGS_LEAF)) {
+#if defined(DEBUG) || defined(DEBUG_FREE)
+ printf("ino=%d free=%llu bf=%llu\n", list->ino,
+ extent.e_pblk, list->blocks_freed + 1);
+#endif
+ list->blocks_freed++;
+ ext2fs_block_alloc_stats2(fs, extent.e_pblk, -1);
+ goto next;
+ }
+
+ list->ext_read++;
+ /* Can we attach it to the previous extent? */
+ if (list->count) {
+ struct ext2fs_extent *last = list->extents +
+ list->count - 1;
+ blk64_t end = last->e_len + extent.e_len;
+
+ if (last->e_pblk + last->e_len == extent.e_pblk &&
+ last->e_lblk + last->e_len == extent.e_lblk &&
+ (last->e_flags & EXT2_EXTENT_FLAGS_UNINIT) ==
+ (extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ end < (1ULL << 32)) {
+ last->e_len += extent.e_len;
+#ifdef DEBUG
+ printf("R: ino=%d len=%u\n", list->ino,
+ last->e_len);
+#endif
+ goto next;
+ }
+ }
+
+ /* Do we need to expand? */
+ if (list->count == list->size) {
+ unsigned int new_size = (list->size + NUM_EXTENTS) *
+ sizeof(struct ext2fs_extent);
+ retval = ext2fs_resize_mem(0, new_size, &list->extents);
+ if (retval)
+ goto out;
+ list->size += NUM_EXTENTS;
+ }
+
+ /* Add a new extent */
+ memcpy(list->extents + list->count, &extent, sizeof(extent));
+#ifdef DEBUG
+ printf("R: ino=%d pblk=%llu lblk=%llu len=%u\n", list->ino,
+ extent.e_pblk, extent.e_lblk, extent.e_len);
+#endif
+ list->count++;
+next:
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT, &extent);
+ } while (retval == 0);
+
+out:
+ /* Ok if we run off the end */
+ if (retval == EXT2_ET_EXTENT_NO_NEXT)
+ retval = 0;
+ ext2fs_extent_free(handle);
+ return retval;
+}
+
+static int find_blocks(ext2_filsys fs, blk64_t *blocknr, e2_blkcnt_t blockcnt,
+ blk64_t ref_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)), void *priv_data)
+{
+ struct extent_list *list = priv_data;
+
+ /* Internal node? */
+ if (blockcnt < 0) {
+#if defined(DEBUG) || defined(DEBUG_FREE)
+ printf("ino=%d free=%llu bf=%llu\n", list->ino, *blocknr,
+ list->blocks_freed + 1);
+#endif
+ list->blocks_freed++;
+ ext2fs_block_alloc_stats2(fs, *blocknr, -1);
+ return 0;
+ }
+
+ /* Can we attach it to the previous extent? */
+ if (list->count) {
+ struct ext2fs_extent *last = list->extents +
+ list->count - 1;
+ blk64_t end = last->e_len + 1;
+
+ if (last->e_lblk + last->e_len == (__u64) blockcnt &&
+ last->e_pblk + last->e_len == *blocknr &&
+ end < (1ULL << 32)) {
+ last->e_len++;
+#ifdef DEBUG
+ printf("R: ino=%d len=%u\n", list->ino, last->e_len);
+#endif
+ return 0;
+ }
+ }
+
+ /* Do we need to expand? */
+ if (list->count == list->size) {
+ unsigned int new_size = (list->size + NUM_EXTENTS) *
+ sizeof(struct ext2fs_extent);
+ list->retval = ext2fs_resize_mem(0, new_size, &list->extents);
+ if (list->retval)
+ return BLOCK_ABORT;
+ list->size += NUM_EXTENTS;
+ }
+
+ /* Add a new extent */
+ list->extents[list->count].e_pblk = *blocknr;
+ list->extents[list->count].e_lblk = blockcnt;
+ list->extents[list->count].e_len = 1;
+ list->extents[list->count].e_flags = 0;
+#ifdef DEBUG
+ printf("R: ino=%d pblk=%llu lblk=%llu len=%u\n", list->ino, *blocknr,
+ blockcnt, 1);
+#endif
+ list->count++;
+
+ return 0;
+}
+
+static errcode_t rewrite_extent_replay(e2fsck_t ctx, struct extent_list *list,
+ struct ext2_inode_large *inode)
+{
+ errcode_t retval;
+ ext2_extent_handle_t handle;
+ unsigned int i, ext_written;
+ struct ext2fs_extent *ex, extent;
+ blk64_t start_val, delta;
+
+ /* Reset extent tree */
+ inode->i_flags &= ~EXT4_EXTENTS_FL;
+ memset(inode->i_block, 0, sizeof(inode->i_block));
+
+ /* Make a note of freed blocks */
+ quota_data_sub(ctx->qctx, inode, list->ino,
+ list->blocks_freed * ctx->fs->blocksize);
+ retval = ext2fs_iblk_sub_blocks(ctx->fs, EXT2_INODE(inode),
+ list->blocks_freed);
+ if (retval)
+ return retval;
+
+ /* Now stuff extents into the file */
+ retval = ext2fs_extent_open2(ctx->fs, list->ino, EXT2_INODE(inode),
+ &handle);
+ if (retval)
+ return retval;
+
+ ext_written = 0;
+
+ start_val = ext2fs_get_stat_i_blocks(ctx->fs, EXT2_INODE(inode));
+
+ for (i = 0, ex = list->extents; i < list->count; i++, ex++) {
+ if (ex->e_len == 0)
+ continue;
+ memcpy(&extent, ex, sizeof(struct ext2fs_extent));
+ extent.e_flags &= EXT2_EXTENT_FLAGS_UNINIT;
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT) {
+ if (extent.e_len > EXT_UNINIT_MAX_LEN) {
+ extent.e_len = EXT_UNINIT_MAX_LEN;
+ ex->e_pblk += EXT_UNINIT_MAX_LEN;
+ ex->e_lblk += EXT_UNINIT_MAX_LEN;
+ ex->e_len -= EXT_UNINIT_MAX_LEN;
+ ex--;
+ i--;
+ }
+ } else {
+ if (extent.e_len > EXT_INIT_MAX_LEN) {
+ extent.e_len = EXT_INIT_MAX_LEN;
+ ex->e_pblk += EXT_INIT_MAX_LEN;
+ ex->e_lblk += EXT_INIT_MAX_LEN;
+ ex->e_len -= EXT_INIT_MAX_LEN;
+ ex--;
+ i--;
+ }
+ }
+
+#ifdef DEBUG
+ printf("W: ino=%d pblk=%llu lblk=%llu len=%u\n", list->ino,
+ extent.e_pblk, extent.e_lblk, extent.e_len);
+#endif
+ retval = ext2fs_extent_insert(handle, EXT2_EXTENT_INSERT_AFTER,
+ &extent);
+ if (retval)
+ goto err;
+ retval = ext2fs_extent_fix_parents(handle);
+ if (retval)
+ goto err;
+ ext_written++;
+ }
+
+ delta = ext2fs_get_stat_i_blocks(ctx->fs, EXT2_INODE(inode)) -
+ start_val;
+ if (delta)
+ quota_data_add(ctx->qctx, inode, list->ino, delta << 9);
+
+#if defined(DEBUG) || defined(DEBUG_SUMMARY)
+ printf("rebuild: ino=%d extents=%d->%d\n", ino, list->ext_read,
+ ext_written);
+#endif
+ e2fsck_write_inode(ctx, list->ino, EXT2_INODE(inode),
+ "rebuild_extents");
+
+err:
+ ext2fs_extent_free(handle);
+ return retval;
+}
+
+errcode_t e2fsck_rewrite_extent_tree(e2fsck_t ctx, struct extent_list *list)
+{
+ struct ext2_inode_large inode;
+ blk64_t blk_count;
+ errcode_t err;
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(ctx->fs, list->ino, EXT2_INODE(&inode),
+ sizeof(inode));
+ if (err)
+ return err;
+
+ /* Skip deleted inodes and inline data files */
+ if (inode.i_flags & EXT4_INLINE_DATA_FL)
+ return 0;
+
+ err = rewrite_extent_replay(ctx, list, &inode);
+ if (err)
+ return err;
+
+ err = ext2fs_count_blocks(ctx->fs, list->ino, EXT2_INODE(&inode),
+ &blk_count);
+ if (err)
+ return err;
+ err = ext2fs_iblk_set(ctx->fs, EXT2_INODE(&inode), blk_count);
+ if (err)
+ return err;
+ return ext2fs_write_inode_full(ctx->fs, list->ino, EXT2_INODE(&inode),
+ sizeof(inode));
+}
+
+errcode_t e2fsck_read_extents(e2fsck_t ctx, struct extent_list *extents)
+{
+ struct ext2_inode_large inode;
+ errcode_t retval;
+
+ extents->extents = NULL;
+ extents->count = 0;
+ extents->blocks_freed = 0;
+ extents->ext_read = 0;
+ extents->size = NUM_EXTENTS;
+ retval = ext2fs_get_array(NUM_EXTENTS, sizeof(struct ext2fs_extent),
+ &extents->extents);
+ if (retval)
+ return ENOMEM;
+
+ retval = ext2fs_read_inode(ctx->fs, extents->ino, EXT2_INODE(&inode));
+ if (retval)
+ goto err_out;
+
+ retval = load_extents(ctx, extents);
+ if (!retval)
+ return 0;
+err_out:
+ ext2fs_free_mem(&extents->extents);
+ extents->size = 0;
+ extents->count = 0;
+ return retval;
+}
+
+static errcode_t rebuild_extent_tree(e2fsck_t ctx, struct extent_list *list,
+ ext2_ino_t ino)
+{
+ struct ext2_inode_large inode;
+ errcode_t retval;
+
+ list->count = 0;
+ list->blocks_freed = 0;
+ list->ino = ino;
+ list->ext_read = 0;
+ e2fsck_read_inode_full(ctx, ino, EXT2_INODE(&inode), sizeof(inode),
+ "rebuild_extents");
+
+ /* Skip deleted inodes and inline data files */
+ if (inode.i_links_count == 0 ||
+ inode.i_flags & EXT4_INLINE_DATA_FL)
+ return 0;
+
+ /* Collect lblk->pblk mappings */
+ if (inode.i_flags & EXT4_EXTENTS_FL) {
+ retval = load_extents(ctx, list);
+ if (retval)
+ return retval;
+ return rewrite_extent_replay(ctx, list, &inode);
+ }
+
+ retval = ext2fs_block_iterate3(ctx->fs, ino, BLOCK_FLAG_READ_ONLY, 0,
+ find_blocks, list);
+
+ return retval || list->retval ||
+ rewrite_extent_replay(ctx, list, &inode);
+}
+
+/* Rebuild the extents immediately */
+static errcode_t e2fsck_rebuild_extents(e2fsck_t ctx, ext2_ino_t ino)
+{
+ struct extent_list list = { 0 };
+ errcode_t err;
+
+ if (!ext2fs_has_feature_extents(ctx->fs->super) ||
+ (ctx->options & E2F_OPT_NO) ||
+ (ino != EXT2_ROOT_INO && ino < ctx->fs->super->s_first_ino))
+ return 0;
+
+ e2fsck_read_bitmaps(ctx);
+ err = ext2fs_get_array(NUM_EXTENTS, sizeof(struct ext2fs_extent),
+ &list.extents);
+ if (err)
+ return err;
+ list.size = NUM_EXTENTS;
+ err = rebuild_extent_tree(ctx, &list, ino);
+ ext2fs_free_mem(&list.extents);
+
+ return err;
+}
+
+static void rebuild_extents(e2fsck_t ctx, const char *pass_name, int pr_header)
+{
+ struct problem_context pctx;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ struct extent_list list = { 0 };
+ int first = 1;
+ ext2_ino_t ino = 0;
+ errcode_t retval;
+
+ if (!ext2fs_has_feature_extents(ctx->fs->super) ||
+ !ext2fs_test_valid(ctx->fs) ||
+ ctx->invalid_bitmaps) {
+ if (ctx->inodes_to_rebuild)
+ ext2fs_free_inode_bitmap(ctx->inodes_to_rebuild);
+ ctx->inodes_to_rebuild = NULL;
+ }
+
+ if (ctx->inodes_to_rebuild == NULL)
+ return;
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ clear_problem_context(&pctx);
+ e2fsck_read_bitmaps(ctx);
+
+ list.size = NUM_EXTENTS;
+ retval = ext2fs_get_array(sizeof(struct ext2fs_extent),
+ list.size, &list.extents);
+ if (retval)
+ return;
+ while (1) {
+ retval = ext2fs_find_first_set_inode_bitmap2(
+ ctx->inodes_to_rebuild, ino + 1,
+ ctx->fs->super->s_inodes_count, &ino);
+ if (retval)
+ break;
+ pctx.ino = ino;
+ if (first) {
+ fix_problem(ctx, pr_header, &pctx);
+ first = 0;
+ }
+ pctx.errcode = rebuild_extent_tree(ctx, &list, ino);
+ if (pctx.errcode) {
+ end_problem_latch(ctx, PR_LATCH_OPTIMIZE_EXT);
+ fix_problem(ctx, PR_1E_OPTIMIZE_EXT_ERR, &pctx);
+ }
+ if (ctx->progress && !ctx->progress_fd)
+ e2fsck_simple_progress(ctx, "Rebuilding extents",
+ 100.0 * (float) ino /
+ (float) ctx->fs->super->s_inodes_count,
+ ino);
+ }
+ end_problem_latch(ctx, PR_LATCH_OPTIMIZE_EXT);
+
+ ext2fs_free_inode_bitmap(ctx->inodes_to_rebuild);
+ ctx->inodes_to_rebuild = NULL;
+ ext2fs_free_mem(&list.extents);
+
+ print_resource_track(ctx, pass_name, &rtrack, ctx->fs->io);
+}
+
+/* Scan a file to see if we should rebuild its extent tree */
+errcode_t e2fsck_check_rebuild_extents(e2fsck_t ctx, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ struct problem_context *pctx)
+{
+ struct extent_tree_info eti;
+ struct ext2_extent_info info, top_info;
+ struct ext2fs_extent extent;
+ ext2_extent_handle_t ehandle;
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+
+ /* block map file and we want extent conversion */
+ if (!(inode->i_flags & EXT4_EXTENTS_FL) &&
+ !(inode->i_flags & EXT4_INLINE_DATA_FL) &&
+ (ctx->options & E2F_OPT_CONVERT_BMAP)) {
+ return e2fsck_rebuild_extents_later(ctx, ino);
+ }
+
+ if (!(inode->i_flags & EXT4_EXTENTS_FL))
+ return 0;
+ memset(&eti, 0, sizeof(eti));
+ eti.ino = ino;
+
+ /* Otherwise, go scan the extent tree... */
+ retval = ext2fs_extent_open2(fs, ino, inode, &ehandle);
+ if (retval)
+ return 0;
+
+ retval = ext2fs_extent_get_info(ehandle, &top_info);
+ if (retval)
+ goto out;
+
+ /* Check maximum extent depth */
+ pctx->ino = ino;
+ pctx->blk = top_info.max_depth;
+ pctx->blk2 = ext2fs_max_extent_depth(ehandle);
+ if (pctx->blk2 < pctx->blk &&
+ fix_problem(ctx, PR_1_EXTENT_BAD_MAX_DEPTH, pctx))
+ eti.force_rebuild = 1;
+
+ /* Can we collect extent tree level stats? */
+ pctx->blk = MAX_EXTENT_DEPTH_COUNT;
+ if (pctx->blk2 > pctx->blk)
+ fix_problem(ctx, PR_1E_MAX_EXTENT_TREE_DEPTH, pctx);
+
+ /* We need to fix tree depth problems, but the scan isn't a fix. */
+ if (ctx->options & E2F_OPT_FIXES_ONLY)
+ goto out;
+
+ retval = ext2fs_extent_get(ehandle, EXT2_EXTENT_ROOT, &extent);
+ if (retval)
+ goto out;
+
+ do {
+ retval = ext2fs_extent_get_info(ehandle, &info);
+ if (retval)
+ break;
+
+ /*
+ * If this is the first extent in an extent block that we
+ * haven't visited, collect stats on the block.
+ */
+ if (info.curr_entry == 1 &&
+ !(extent.e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT) &&
+ !eti.force_rebuild &&
+ info.curr_level < MAX_EXTENT_DEPTH_COUNT) {
+ struct extent_tree_level *etl;
+
+ etl = eti.ext_info + info.curr_level;
+ etl->num_extents += info.num_entries;
+ etl->max_extents += info.max_entries;
+ /*
+ * Implementation wart: Splitting extent blocks when
+ * appending will leave the old block with one free
+ * entry. Therefore unless the node is totally full,
+ * pretend that a non-root extent block can hold one
+ * fewer entry than it actually does, so that we don't
+ * repeatedly rebuild the extent tree.
+ */
+ if (info.curr_level &&
+ info.num_entries < info.max_entries)
+ etl->max_extents--;
+ }
+
+ /* Skip to the end of a block of leaf nodes */
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_LEAF) {
+ retval = ext2fs_extent_get(ehandle,
+ EXT2_EXTENT_LAST_SIB,
+ &extent);
+ if (retval)
+ break;
+ }
+
+ retval = ext2fs_extent_get(ehandle, EXT2_EXTENT_NEXT, &extent);
+ } while (retval == 0);
+out:
+ ext2fs_extent_free(ehandle);
+ return e2fsck_should_rebuild_extents(ctx, pctx, &eti, &top_info);
+}
+
+/* Having scanned a file's extent tree, decide if we should rebuild it */
+errcode_t e2fsck_should_rebuild_extents(e2fsck_t ctx,
+ struct problem_context *pctx,
+ struct extent_tree_info *eti,
+ struct ext2_extent_info *info)
+{
+ struct extent_tree_level *ei;
+ int i, j, op;
+ unsigned int extents_per_block;
+
+ if (eti->force_rebuild)
+ goto rebuild;
+
+ if (ctx->options & E2F_OPT_NOOPT_EXTENTS)
+ return 0;
+
+ extents_per_block = (ctx->fs->blocksize -
+ sizeof(struct ext3_extent_header)) /
+ sizeof(struct ext3_extent);
+
+ /* If the extent tree is too deep, then rebuild it. */
+ if (info->max_depth > MAX_EXTENT_DEPTH_COUNT-1) {
+ pctx->blk = info->max_depth;
+ op = PR_1E_CAN_COLLAPSE_EXTENT_TREE;
+ goto rebuild;
+ }
+ /*
+ * If we can consolidate a level or shorten the tree, schedule the
+ * extent tree to be rebuilt.
+ */
+ for (i = 0, ei = eti->ext_info; i < info->max_depth + 1; i++, ei++) {
+ if (ei->max_extents - ei->num_extents > extents_per_block) {
+ pctx->blk = i;
+ op = PR_1E_CAN_NARROW_EXTENT_TREE;
+ goto rebuild;
+ }
+ for (j = 0; j < i; j++) {
+ if (ei->num_extents < eti->ext_info[j].max_extents) {
+ pctx->blk = i;
+ op = PR_1E_CAN_COLLAPSE_EXTENT_TREE;
+ goto rebuild;
+ }
+ }
+ }
+ return 0;
+
+rebuild:
+ if (eti->force_rebuild || fix_problem(ctx, op, pctx))
+ return e2fsck_rebuild_extents_later(ctx, eti->ino);
+ return 0;
+}
+
+void e2fsck_pass1e(e2fsck_t ctx)
+{
+ rebuild_extents(ctx, "Pass 1E", PR_1E_PASS_HEADER);
+}
diff --git a/e2fsck/flushb.c b/e2fsck/flushb.c
new file mode 100644
index 0000000..6100fc6
--- /dev/null
+++ b/e2fsck/flushb.c
@@ -0,0 +1,67 @@
+/*
+ * flushb.c --- This routine flushes the disk buffers for a disk
+ *
+ * Copyright 1997, 2000, by Theodore Ts'o.
+ *
+ * WARNING: use of flushb on some older 2.2 kernels on a heavily loaded
+ * system will corrupt filesystems. This program is not really useful
+ * beyond for benchmarking scripts.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/mount.h>
+#include "../misc/nls-enable.h"
+
+/* For Linux, define BLKFLSBUF if necessary */
+#if (!defined(BLKFLSBUF) && defined(__linux__))
+#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
+#endif
+
+const char *progname;
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s disk\n"), progname);
+ exit(1);
+}
+
+int main(int argc, char **argv)
+{
+ int fd;
+
+ progname = argv[0];
+ if (argc != 2)
+ usage();
+
+ fd = open(argv[1], O_RDONLY, 0);
+ if (fd < 0) {
+ perror("open");
+ exit(1);
+ }
+ /*
+ * Note: to reread the partition table, use the ioctl
+ * BLKRRPART instead of BLKFSLBUF.
+ */
+#ifdef BLKFLSBUF
+ if (ioctl(fd, BLKFLSBUF, 0) < 0) {
+ perror("ioctl BLKFLSBUF");
+ exit(1);
+ }
+ return 0;
+#else
+ fprintf(stderr,
+ _("BLKFLSBUF ioctl not supported! Can't flush buffers.\n"));
+ return 1;
+#endif
+}
diff --git a/e2fsck/iscan.c b/e2fsck/iscan.c
new file mode 100644
index 0000000..33c6a4c
--- /dev/null
+++ b/e2fsck/iscan.c
@@ -0,0 +1,265 @@
+/*
+ * Test to see how quickly we can scan the inode table (not doing
+ * anything else)
+ */
+
+#include "config.h"
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <termios.h>
+#include <time.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <unistd.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/ioctl.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#if EXT2_FLAT_INCLUDES
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "blkid.h"
+#else
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "blkid/blkid.h"
+#endif
+
+#include "et/com_err.h"
+#include "../version.h"
+
+struct resource_track {
+ struct timeval time_start;
+ struct timeval user_start;
+ struct timeval system_start;
+ void *brk_start;
+ unsigned long long bytes_read;
+ unsigned long long bytes_written;
+};
+
+extern int isatty(int);
+
+const char * program_name = "iscan";
+const char * device_name = NULL;
+
+int yflag = 0;
+int nflag = 0;
+int preen = 0;
+int inode_buffer_blocks = 0;
+int invalid_bitmaps = 0;
+
+struct resource_track global_rtrack;
+
+void init_resource_track(struct resource_track *track, io_channel channel)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+ io_stats io_start = 0;
+
+ track->brk_start = sbrk(0);
+ gettimeofday(&track->time_start, 0);
+#ifdef HAVE_GETRUSAGE
+#ifdef sun
+ memset(&r, 0, sizeof(struct rusage));
+#endif
+ getrusage(RUSAGE_SELF, &r);
+ track->user_start = r.ru_utime;
+ track->system_start = r.ru_stime;
+#else
+ track->user_start.tv_sec = track->user_start.tv_usec = 0;
+ track->system_start.tv_sec = track->system_start.tv_usec = 0;
+#endif
+ track->bytes_read = 0;
+ track->bytes_written = 0;
+ if (channel && channel->manager && channel->manager->get_stats)
+ channel->manager->get_stats(channel, &io_start);
+ if (io_start) {
+ track->bytes_read = io_start->bytes_read;
+ track->bytes_written = io_start->bytes_written;
+ }
+}
+
+static float timeval_subtract(struct timeval *tv1,
+ struct timeval *tv2)
+{
+ return ((tv1->tv_sec - tv2->tv_sec) +
+ ((float) (tv1->tv_usec - tv2->tv_usec)) / 1000000);
+}
+
+void print_resource_track(const char *desc,
+ struct resource_track *track, io_channel channel)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+ struct timeval time_end;
+
+ gettimeofday(&time_end, 0);
+
+ if (desc)
+ printf("%s: ", desc);
+
+#define kbytes(x) (((unsigned long long)(x) + 1023) / 1024)
+#ifdef HAVE_MALLINFO2
+ if (1) {
+ struct mallinfo2 malloc_info = mallinfo2();
+
+ printf("Memory used: %lluk/%lluk (%lluk/%lluk), ",
+ kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ kbytes(malloc_info.uordblks),
+ kbytes(malloc_info.fordblks));
+ } else
+#elif defined HAVE_MALLINFO
+ /* don't use mallinfo() if over 2GB used, since it returns "int" */
+ if ((char *)sbrk(0) - (char *)track->brk_start < 2LL << 30) {
+ struct mallinfo malloc_info = mallinfo();
+
+ printf("Memory used: %lluk/%lluk (%lluk/%lluk), ",
+ kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ kbytes(malloc_info.uordblks),
+ kbytes(malloc_info.fordblks));
+ } else
+#endif
+ printf("Memory used: %lluk, ",
+ kbytes(((char *)sbrk(0)) - ((char *)track->brk_start)));
+
+#ifdef HAVE_GETRUSAGE
+ getrusage(RUSAGE_SELF, &r);
+
+ printf("time: %5.2f/%5.2f/%5.2f\n",
+ timeval_subtract(&time_end, &track->time_start),
+ timeval_subtract(&r.ru_utime, &track->user_start),
+ timeval_subtract(&r.ru_stime, &track->system_start));
+#else
+ printf("elapsed time: %6.3f\n",
+ timeval_subtract(&time_end, &track->time_start));
+#endif
+#define mbytes(x) (((x) + 1048575) / 1048576)
+ if (channel && channel->manager && channel->manager->get_stats) {
+ io_stats delta = 0;
+ unsigned long long bytes_read = 0;
+ unsigned long long bytes_written = 0;
+
+ if (desc)
+ printf("%s: ", desc);
+
+ channel->manager->get_stats(channel, &delta);
+ if (delta) {
+ bytes_read = delta->bytes_read - track->bytes_read;
+ bytes_written = delta->bytes_written -
+ track->bytes_written;
+ }
+ printf("I/O read: %lluMB, write: %lluMB, "
+ "rate: %.2fMB/s\n",
+ mbytes(bytes_read), mbytes(bytes_written),
+ (double)mbytes(bytes_read + bytes_written) /
+ timeval_subtract(&time_end, &track->time_start));
+ }
+}
+
+static void usage(void)
+{
+ fprintf(stderr,
+ "Usage: %s [-F] [-I inode_buffer_blocks] device\n",
+ program_name);
+ exit(1);
+}
+
+static void PRS(int argc, char *argv[])
+{
+ int flush = 0;
+ int c;
+#ifdef MTRACE
+ extern void *mallwatch;
+#endif
+ errcode_t retval;
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ initialize_ext2_error_table();
+
+ if (argc && *argv)
+ program_name = *argv;
+ while ((c = getopt (argc, argv, "FI")) != EOF)
+ switch (c) {
+ case 'F':
+ flush = 1;
+ break;
+ case 'I':
+ inode_buffer_blocks = atoi(optarg);
+ break;
+ default:
+ usage ();
+ }
+ device_name = argv[optind];
+ if (flush) {
+ int fd = open(device_name, O_RDONLY, 0);
+
+ if (fd < 0) {
+ com_err("open", errno,
+ "while opening %s for flushing", device_name);
+ exit(1);
+ }
+ if ((retval = ext2fs_sync_device(fd, 1))) {
+ com_err("ext2fs_sync_device", retval,
+ "while trying to flush %s", device_name);
+ exit(1);
+ }
+ close(fd);
+ }
+}
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0;
+ int exit_value = 0;
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ __u32 num_inodes = 0;
+ struct ext2_inode inode;
+ ext2_inode_scan scan;
+
+ PRS(argc, argv);
+
+ retval = ext2fs_open(device_name, 0,
+ 0, 0, unix_io_manager, &fs);
+ if (retval) {
+ com_err(program_name, retval, "while trying to open '%s'",
+ device_name);
+ exit(1);
+ }
+
+ init_resource_track(&global_rtrack, fs->io);
+
+ retval = ext2fs_open_inode_scan(fs, inode_buffer_blocks, &scan);
+ if (retval) {
+ com_err(program_name, retval, "while opening inode scan");
+ exit(1);
+ }
+
+ while (1) {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval) {
+ com_err(program_name, retval,
+ "while getting next inode");
+ exit(1);
+ }
+ if (ino == 0)
+ break;
+ num_inodes++;
+ }
+
+ print_resource_track(NULL, &global_rtrack, fs->io);
+ printf("%u inodes scanned.\n", num_inodes);
+
+ exit(0);
+}
diff --git a/e2fsck/jfs_user.h b/e2fsck/jfs_user.h
new file mode 100644
index 0000000..5928a8a
--- /dev/null
+++ b/e2fsck/jfs_user.h
@@ -0,0 +1,321 @@
+/*
+ * Compatibility header file for e2fsck which should be included
+ * instead of linux/jfs.h
+ *
+ * Copyright (C) 2000 Stephen C. Tweedie
+ *
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2 or at your discretion
+ * any later version.
+ */
+#ifndef _JFS_USER_H
+#define _JFS_USER_H
+
+#include "config.h"
+
+#ifdef DEBUGFS
+#include <stdio.h>
+#include <stdlib.h>
+#if EXT2_FLAT_INCLUDES
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "blkid.h"
+#else
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "blkid/blkid.h"
+#endif
+#else
+/*
+ * Pull in the definition of the e2fsck context structure
+ */
+#include "e2fsck.h"
+#endif
+
+#if __STDC_VERSION__ < 199901L
+# if __GNUC__ >= 2 || _MSC_VER >= 1300
+# define __func__ __FUNCTION__
+# else
+# define __func__ "<unknown>"
+# endif
+#endif
+
+struct buffer_head {
+#ifdef DEBUGFS
+ ext2_filsys b_fs;
+#else
+ e2fsck_t b_ctx;
+#endif
+ io_channel b_io;
+ int b_size;
+ int b_err;
+ unsigned int b_dirty:1;
+ unsigned int b_uptodate:1;
+ unsigned long long b_blocknr;
+ char b_data[4096];
+};
+
+struct inode {
+#ifdef DEBUGFS
+ ext2_filsys i_fs;
+#else
+ e2fsck_t i_ctx;
+#endif
+ ext2_ino_t i_ino;
+ struct ext2_inode i_ext2;
+};
+
+struct kdev_s {
+#ifdef DEBUGFS
+ ext2_filsys k_fs;
+#else
+ e2fsck_t k_ctx;
+#endif
+ int k_dev;
+};
+
+#define K_DEV_FS 1
+#define K_DEV_JOURNAL 2
+
+#define lock_buffer(bh) do {} while (0)
+#define unlock_buffer(bh) do {} while (0)
+#define buffer_req(bh) 1
+#define do_readahead(journal, start) do {} while (0)
+
+struct kmem_cache {
+ unsigned int object_size;
+};
+
+#define cond_resched() do { } while (0)
+
+#define __init
+
+/*
+ * Now pull in the real linux/jfs.h definitions.
+ */
+#include <ext2fs/kernel-jbd.h>
+
+/*
+ * We use the standard libext2fs portability tricks for inline
+ * functions.
+ */
+#ifdef NO_INLINE_FUNCS
+extern struct kmem_cache *kmem_cache_create(const char *name,
+ unsigned int size,
+ unsigned int align,
+ unsigned int flags,
+ void (*ctor)(void *));
+extern void kmem_cache_destroy(struct kmem_cache *s);
+extern void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags);
+extern void kmem_cache_free(struct kmem_cache *s, void *objp);
+extern void *kmalloc(size_t size, gfp_t flags);
+extern void kfree(const void *objp);
+extern size_t journal_tag_bytes(journal_t *journal);
+extern __u32 __hash_32(__u32 val);
+extern __u32 hash_32(__u32 val, unsigned int bits);
+extern __u32 hash_64(__u64 val, unsigned int bits);
+extern void *kmalloc_array(unsigned n, unsigned size, int flags);
+extern __u32 jbd2_chksum(journal_t *j, __u32 crc, const void *address,
+ unsigned int length);
+extern void jbd2_descriptor_block_csum_set(journal_t *j,
+ struct buffer_head *bh);
+#endif
+
+#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
+#ifdef E2FSCK_INCLUDE_INLINE_FUNCS
+#if (__STDC_VERSION__ >= 199901L)
+#define _INLINE_ extern inline
+#else
+#define _INLINE_ inline
+#endif
+#else /* !E2FSCK_INCLUDE_INLINE FUNCS */
+#if (__STDC_VERSION__ >= 199901L)
+#define _INLINE_ inline
+#else /* not C99 */
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif /* __GNUC__ */
+#endif /* __STDC_VERSION__ >= 199901L */
+#endif /* E2FSCK_INCLUDE_INLINE_FUNCS */
+
+_INLINE_ struct kmem_cache *
+kmem_cache_create(const char *name EXT2FS_ATTR((unused)),
+ unsigned int size,
+ unsigned int align EXT2FS_ATTR((unused)),
+ unsigned int flags EXT2FS_ATTR((unused)),
+ void (*ctor)(void *) EXT2FS_ATTR((unused)))
+{
+ struct kmem_cache *new_cache;
+
+ new_cache = malloc(sizeof(*new_cache));
+ if (new_cache)
+ new_cache->object_size = size;
+ return new_cache;
+}
+
+_INLINE_ void kmem_cache_destroy(struct kmem_cache *s)
+{
+ free(s);
+}
+
+_INLINE_ void *kmem_cache_alloc(struct kmem_cache *cachep,
+ gfp_t flags EXT2FS_ATTR((unused)))
+{
+ return malloc(cachep->object_size);
+}
+
+_INLINE_ void kmem_cache_free(struct kmem_cache *s EXT2FS_ATTR((unused)),
+ void *objp)
+{
+ free(objp);
+}
+
+_INLINE_ void *kmalloc(size_t size, gfp_t flags EXT2FS_ATTR((unused)))
+{
+ return malloc(size);
+}
+
+_INLINE_ void kfree(const void *objp)
+{
+#ifdef HAVE_INTPTR_T
+ /*
+ * Work around a botch in the C standard, which triggers
+ * compiler warnings. For better or for worse, the kernel
+ * uses const void * for kfree, while the C standard mandates
+ * the use of void *. See: https://yarchive.net/comp/const.html
+ */
+ free((void *)(intptr_t)objp);
+#else
+ free((void *)objp);
+#endif
+}
+
+/* generic hashing taken from the Linux kernel */
+#define GOLDEN_RATIO_32 0x61C88647
+#define GOLDEN_RATIO_64 0x61C8864680B583EBull
+
+_INLINE_ __u32 __hash_32(__u32 val)
+{
+ return val * GOLDEN_RATIO_32;
+}
+
+_INLINE_ __u32 hash_32(__u32 val, unsigned int bits)
+{
+ /* High bits are more random, so use them. */
+ return __hash_32(val) >> (32 - bits);
+}
+
+_INLINE_ __u32 hash_64(__u64 val, unsigned int bits)
+{
+ if (sizeof(long) >= 8) {
+ /* 64x64-bit multiply is efficient on all 64-bit processors */
+ return val * GOLDEN_RATIO_64 >> (64 - bits);
+ } else {
+ /* Hash 64 bits using only 32x32-bit multiply. */
+ return hash_32((__u32)val ^ __hash_32(val >> 32), bits);
+ }
+}
+
+_INLINE_ void *kmalloc_array(unsigned n, unsigned size,
+ int flags EXT2FS_ATTR((unused)))
+{
+ if (n && (~0U)/n < size)
+ return NULL;
+ return malloc(n * size);
+}
+
+_INLINE_ __u32 jbd2_chksum(journal_t *j EXT2FS_ATTR((unused)),
+ __u32 crc, const void *address,
+ unsigned int length)
+{
+ return ext2fs_crc32c_le(crc, address, length);
+}
+
+_INLINE_ void jbd2_descriptor_block_csum_set(journal_t *j,
+ struct buffer_head *bh)
+{
+ struct jbd2_journal_block_tail *tail;
+ __u32 csum;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return;
+
+ tail = (struct jbd2_journal_block_tail *)(bh->b_data + j->j_blocksize -
+ sizeof(struct jbd2_journal_block_tail));
+ tail->t_checksum = 0;
+ csum = jbd2_chksum(j, j->j_csum_seed, bh->b_data, j->j_blocksize);
+ tail->t_checksum = cpu_to_be32(csum);
+}
+#undef _INLINE_
+#endif
+
+/*
+ * Kernel compatibility functions are defined in journal.c
+ */
+int jbd2_journal_bmap(journal_t *journal, unsigned long block,
+ unsigned long long *phys);
+struct buffer_head *getblk(kdev_t ctx, unsigned long long blocknr,
+ int blocksize);
+int sync_blockdev(kdev_t kdev);
+void ll_rw_block(int rw, int op_flags, int nr, struct buffer_head *bh[]);
+void mark_buffer_dirty(struct buffer_head *bh);
+void mark_buffer_uptodate(struct buffer_head *bh, int val);
+void brelse(struct buffer_head *bh);
+int buffer_uptodate(struct buffer_head *bh);
+void wait_on_buffer(struct buffer_head *bh);
+
+/*
+ * Define newer 2.5 interfaces
+ */
+#define __getblk(dev, blocknr, blocksize) getblk(dev, blocknr, blocksize)
+#define set_buffer_uptodate(bh) mark_buffer_uptodate(bh, 1)
+
+#ifdef DEBUGFS
+#include <assert.h>
+#undef J_ASSERT
+#define J_ASSERT(x) assert(x)
+
+#define JSB_HAS_INCOMPAT_FEATURE(jsb, mask) \
+ ((jsb)->s_header.h_blocktype == ext2fs_cpu_to_be32(JBD2_SUPERBLOCK_V2) && \
+ ((jsb)->s_feature_incompat & ext2fs_cpu_to_be32((mask))))
+#else /* !DEBUGFS */
+
+extern e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
+
+#define J_ASSERT(assert) \
+ do { if (!(assert)) { \
+ printf ("Assertion failure in %s() at %s line %d: " \
+ "\"%s\"\n", \
+ __func__, __FILE__, __LINE__, # assert); \
+ fatal_error(e2fsck_global_ctx, 0); \
+ } } while (0)
+
+#endif /* DEBUGFS */
+
+#ifndef EFSBADCRC
+#define EFSBADCRC EXT2_ET_BAD_CRC
+#endif
+#ifndef EFSCORRUPTED
+#define EFSCORRUPTED EXT2_ET_FILESYSTEM_CORRUPTED
+#endif
+
+/* recovery.c */
+extern int jbd2_journal_recover (journal_t *journal);
+extern int jbd2_journal_skip_recovery (journal_t *);
+
+/* revoke.c */
+extern int jbd2_journal_init_revoke(journal_t *, int);
+extern void jbd2_journal_destroy_revoke(journal_t *);
+extern void jbd2_journal_destroy_revoke_record_cache(void);
+extern void jbd2_journal_destroy_revoke_table_cache(void);
+extern int jbd2_journal_init_revoke_record_cache(void);
+extern int jbd2_journal_init_revoke_table_cache(void);
+
+
+extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t);
+extern int jbd2_journal_test_revoke(journal_t *, unsigned long long, tid_t);
+extern void jbd2_journal_clear_revoke(journal_t *);
+
+#endif /* _JFS_USER_H */
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
new file mode 100644
index 0000000..c7868d8
--- /dev/null
+++ b/e2fsck/journal.c
@@ -0,0 +1,1900 @@
+/*
+ * journal.c --- code for handling the "ext3" journal
+ *
+ * Copyright (C) 2000 Andreas Dilger
+ * Copyright (C) 2000 Theodore Ts'o
+ *
+ * Parts of the code are based on fs/jfs/journal.c by Stephen C. Tweedie
+ * Copyright (C) 1999 Red Hat Software
+ *
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2 or at your discretion
+ * any later version.
+ */
+
+#include "config.h"
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/param.h>
+#include <sys/mount.h>
+#define MNT_FL (MS_MGC_VAL | MS_RDONLY)
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#define E2FSCK_INCLUDE_INLINE_FUNCS
+#include "jfs_user.h"
+#include "problem.h"
+#include "uuid/uuid.h"
+
+static int bh_count = 0;
+
+/*
+ * Define USE_INODE_IO to use the inode_io.c / fileio.c codepaths.
+ * This creates a larger static binary, and a smaller binary using
+ * shared libraries. It's also probably slightly less CPU-efficient,
+ * which is why it's not on by default. But, it's a good way of
+ * testing the functions in inode_io.c and fileio.c.
+ */
+#undef USE_INODE_IO
+
+/* Checksumming functions */
+static int e2fsck_journal_verify_csum_type(journal_t *j,
+ journal_superblock_t *jsb)
+{
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 1;
+
+ return jsb->s_checksum_type == JBD2_CRC32C_CHKSUM;
+}
+
+static __u32 e2fsck_journal_sb_csum(journal_superblock_t *jsb)
+{
+ __u32 crc, old_crc;
+
+ old_crc = jsb->s_checksum;
+ jsb->s_checksum = 0;
+ crc = ext2fs_crc32c_le(~0, (unsigned char *)jsb,
+ sizeof(journal_superblock_t));
+ jsb->s_checksum = old_crc;
+
+ return crc;
+}
+
+static int e2fsck_journal_sb_csum_verify(journal_t *j,
+ journal_superblock_t *jsb)
+{
+ __u32 provided, calculated;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 1;
+
+ provided = ext2fs_be32_to_cpu(jsb->s_checksum);
+ calculated = e2fsck_journal_sb_csum(jsb);
+
+ return provided == calculated;
+}
+
+static errcode_t e2fsck_journal_sb_csum_set(journal_t *j,
+ journal_superblock_t *jsb)
+{
+ __u32 crc;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 0;
+
+ crc = e2fsck_journal_sb_csum(jsb);
+ jsb->s_checksum = ext2fs_cpu_to_be32(crc);
+ return 0;
+}
+
+/* Kernel compatibility functions for handling the journal. These allow us
+ * to use the recovery.c file virtually unchanged from the kernel, so we
+ * don't have to do much to keep kernel and user recovery in sync.
+ */
+int jbd2_journal_bmap(journal_t *journal, unsigned long block,
+ unsigned long long *phys)
+{
+#ifdef USE_INODE_IO
+ *phys = block;
+ return 0;
+#else
+ struct inode *inode = journal->j_inode;
+ errcode_t retval;
+ blk64_t pblk;
+
+ if (!inode) {
+ *phys = block;
+ return 0;
+ }
+
+ retval= ext2fs_bmap2(inode->i_ctx->fs, inode->i_ino,
+ &inode->i_ext2, NULL, 0, (blk64_t) block,
+ 0, &pblk);
+ *phys = pblk;
+ return -1 * ((int) retval);
+#endif
+}
+
+struct buffer_head *getblk(kdev_t kdev, unsigned long long blocknr,
+ int blocksize)
+{
+ struct buffer_head *bh;
+ int bufsize = sizeof(*bh) + kdev->k_ctx->fs->blocksize -
+ sizeof(bh->b_data);
+
+ bh = e2fsck_allocate_memory(kdev->k_ctx, bufsize, "block buffer");
+ if (!bh)
+ return NULL;
+
+ if (journal_enable_debug >= 3)
+ bh_count++;
+ jfs_debug(4, "getblk for block %llu (%d bytes)(total %d)\n",
+ blocknr, blocksize, bh_count);
+
+ bh->b_ctx = kdev->k_ctx;
+ if (kdev->k_dev == K_DEV_FS)
+ bh->b_io = kdev->k_ctx->fs->io;
+ else
+ bh->b_io = kdev->k_ctx->journal_io;
+ bh->b_size = blocksize;
+ bh->b_blocknr = blocknr;
+
+ return bh;
+}
+
+int sync_blockdev(kdev_t kdev)
+{
+ io_channel io;
+
+ if (kdev->k_dev == K_DEV_FS)
+ io = kdev->k_ctx->fs->io;
+ else
+ io = kdev->k_ctx->journal_io;
+
+ return io_channel_flush(io) ? -EIO : 0;
+}
+
+void ll_rw_block(int rw, int op_flags EXT2FS_ATTR((unused)), int nr,
+ struct buffer_head *bhp[])
+{
+ errcode_t retval;
+ struct buffer_head *bh;
+
+ for (; nr > 0; --nr) {
+ bh = *bhp++;
+ if (rw == REQ_OP_READ && !bh->b_uptodate) {
+ jfs_debug(3, "reading block %llu/%p\n",
+ bh->b_blocknr, (void *) bh);
+ retval = io_channel_read_blk64(bh->b_io,
+ bh->b_blocknr,
+ 1, bh->b_data);
+ if (retval) {
+ com_err(bh->b_ctx->device_name, retval,
+ "while reading block %llu\n",
+ bh->b_blocknr);
+ bh->b_err = (int) retval;
+ continue;
+ }
+ bh->b_uptodate = 1;
+ } else if (rw == REQ_OP_WRITE && bh->b_dirty) {
+ jfs_debug(3, "writing block %llu/%p\n",
+ bh->b_blocknr,
+ (void *) bh);
+ retval = io_channel_write_blk64(bh->b_io,
+ bh->b_blocknr,
+ 1, bh->b_data);
+ if (retval) {
+ com_err(bh->b_ctx->device_name, retval,
+ "while writing block %llu\n",
+ bh->b_blocknr);
+ bh->b_err = (int) retval;
+ continue;
+ }
+ bh->b_dirty = 0;
+ bh->b_uptodate = 1;
+ } else {
+ jfs_debug(3, "no-op %s for block %llu\n",
+ rw == REQ_OP_READ ? "read" : "write",
+ bh->b_blocknr);
+ }
+ }
+}
+
+void mark_buffer_dirty(struct buffer_head *bh)
+{
+ bh->b_dirty = 1;
+}
+
+static void mark_buffer_clean(struct buffer_head * bh)
+{
+ bh->b_dirty = 0;
+}
+
+void brelse(struct buffer_head *bh)
+{
+ if (bh->b_dirty)
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &bh);
+ jfs_debug(3, "freeing block %llu/%p (total %d)\n",
+ bh->b_blocknr, (void *) bh, --bh_count);
+ ext2fs_free_mem(&bh);
+}
+
+int buffer_uptodate(struct buffer_head *bh)
+{
+ return bh->b_uptodate;
+}
+
+void mark_buffer_uptodate(struct buffer_head *bh, int val)
+{
+ bh->b_uptodate = val;
+}
+
+void wait_on_buffer(struct buffer_head *bh)
+{
+ if (!bh->b_uptodate)
+ ll_rw_block(REQ_OP_READ, 0, 1, &bh);
+}
+
+
+static void e2fsck_clear_recover(e2fsck_t ctx, int error)
+{
+ ext2fs_clear_feature_journal_needs_recovery(ctx->fs->super);
+
+ /* if we had an error doing journal recovery, we need a full fsck */
+ if (error)
+ ctx->fs->super->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(ctx->fs);
+}
+
+/*
+ * This is a helper function to check the validity of the journal.
+ */
+struct process_block_struct {
+ e2_blkcnt_t last_block;
+};
+
+static int process_journal_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ blk64_t blk = *block_nr;
+
+ p = (struct process_block_struct *) priv_data;
+
+ if (!blk || blk < fs->super->s_first_data_block ||
+ blk >= ext2fs_blocks_count(fs->super))
+ return BLOCK_ABORT;
+
+ if (blockcnt >= 0)
+ p->last_block = blockcnt;
+ return 0;
+}
+
+static int ext4_fc_replay_scan(journal_t *j, struct buffer_head *bh,
+ int off, tid_t expected_tid)
+{
+ e2fsck_t ctx = j->j_fs_dev->k_ctx;
+ struct e2fsck_fc_replay_state *state;
+ int ret = JBD2_FC_REPLAY_CONTINUE;
+ struct ext4_fc_add_range ext;
+ struct ext4_fc_tl tl;
+ struct ext4_fc_tail tail;
+ __u8 *start, *cur, *end, *val;
+ struct ext4_fc_head head;
+ struct ext2fs_extent ext2fs_ex = {0};
+
+ state = &ctx->fc_replay_state;
+
+ start = (__u8 *)bh->b_data;
+ end = (__u8 *)bh->b_data + j->j_blocksize - 1;
+
+ jbd_debug(1, "Scan phase starting, expected %d", expected_tid);
+ if (state->fc_replay_expected_off == 0) {
+ memset(state, 0, sizeof(*state));
+ /* Check if we can stop early */
+ if (le16_to_cpu(((struct ext4_fc_tl *)start)->fc_tag)
+ != EXT4_FC_TAG_HEAD) {
+ jbd_debug(1, "Ending early!, not a head tag");
+ return 0;
+ }
+ }
+
+ if (off != state->fc_replay_expected_off) {
+ ret = -EFSCORRUPTED;
+ goto out_err;
+ }
+
+ state->fc_replay_expected_off++;
+ for (cur = start; cur < end; cur = cur + le16_to_cpu(tl.fc_len) + sizeof(tl)) {
+ memcpy(&tl, cur, sizeof(tl));
+ val = cur + sizeof(tl);
+
+ jbd_debug(3, "Scan phase, tag:%s, blk %lld\n",
+ tag2str(le16_to_cpu(tl.fc_tag)), bh->b_blocknr);
+ switch (le16_to_cpu(tl.fc_tag)) {
+ case EXT4_FC_TAG_ADD_RANGE:
+ memcpy(&ext, val, sizeof(ext));
+ ret = ext2fs_decode_extent(&ext2fs_ex,
+ (void *)&ext.fc_ex,
+ sizeof(ext.fc_ex));
+ if (ret)
+ ret = JBD2_FC_REPLAY_STOP;
+ else
+ ret = JBD2_FC_REPLAY_CONTINUE;
+ /* fallthrough */
+ case EXT4_FC_TAG_DEL_RANGE:
+ case EXT4_FC_TAG_LINK:
+ case EXT4_FC_TAG_UNLINK:
+ case EXT4_FC_TAG_CREAT:
+ case EXT4_FC_TAG_INODE:
+ case EXT4_FC_TAG_PAD:
+ state->fc_cur_tag++;
+ state->fc_crc = jbd2_chksum(j, state->fc_crc, cur,
+ sizeof(tl) + ext4_fc_tag_len(&tl));
+ break;
+ case EXT4_FC_TAG_TAIL:
+ state->fc_cur_tag++;
+ memcpy(&tail, val, sizeof(tail));
+ state->fc_crc = jbd2_chksum(j, state->fc_crc, cur,
+ sizeof(tl) +
+ offsetof(struct ext4_fc_tail,
+ fc_crc));
+ jbd_debug(1, "tail tid %d, expected %d\n",
+ le32_to_cpu(tail.fc_tid), expected_tid);
+ if (le32_to_cpu(tail.fc_tid) == expected_tid &&
+ le32_to_cpu(tail.fc_crc) == state->fc_crc) {
+ state->fc_replay_num_tags = state->fc_cur_tag;
+ } else {
+ ret = state->fc_replay_num_tags ?
+ JBD2_FC_REPLAY_STOP : -EFSBADCRC;
+ }
+ state->fc_crc = 0;
+ break;
+ case EXT4_FC_TAG_HEAD:
+ memcpy(&head, val, sizeof(head));
+ if (le32_to_cpu(head.fc_features) &
+ ~EXT4_FC_SUPPORTED_FEATURES) {
+ ret = -EOPNOTSUPP;
+ break;
+ }
+ if (le32_to_cpu(head.fc_tid) != expected_tid) {
+ ret = -EINVAL;
+ break;
+ }
+ state->fc_cur_tag++;
+ state->fc_crc = jbd2_chksum(j, state->fc_crc, cur,
+ sizeof(tl) + ext4_fc_tag_len(&tl));
+ break;
+ default:
+ ret = state->fc_replay_num_tags ?
+ JBD2_FC_REPLAY_STOP : -ECANCELED;
+ }
+ if (ret < 0 || ret == JBD2_FC_REPLAY_STOP)
+ break;
+ }
+
+out_err:
+ return ret;
+}
+
+static int __errcode_to_errno(errcode_t err, const char *func, int line)
+{
+ if (err == 0)
+ return 0;
+ fprintf(stderr, "Error \"%s\" encountered in function %s at line %d\n",
+ error_message(err), func, line);
+ if (err <= 256)
+ return -err;
+ return -EFAULT;
+}
+
+#define errcode_to_errno(err) __errcode_to_errno(err, __func__, __LINE__)
+
+#define ex_end(__ex) ((__ex)->e_lblk + (__ex)->e_len - 1)
+#define ex_pend(__ex) ((__ex)->e_pblk + (__ex)->e_len - 1)
+
+static int make_room(struct extent_list *list, int i)
+{
+ int ret;
+
+ if (list->count == list->size) {
+ unsigned int new_size = (list->size + 341) *
+ sizeof(struct ext2fs_extent);
+ ret = errcode_to_errno(ext2fs_resize_mem(0, new_size, &list->extents));
+ if (ret)
+ return ret;
+ list->size += 341;
+ }
+
+ memmove(&list->extents[i + 1], &list->extents[i],
+ sizeof(list->extents[0]) * (list->count - i));
+ list->count++;
+ return 0;
+}
+
+static int ex_compar(const void *arg1, const void *arg2)
+{
+ const struct ext2fs_extent *ex1 = (const struct ext2fs_extent *)arg1;
+ const struct ext2fs_extent *ex2 = (const struct ext2fs_extent *)arg2;
+
+ if (ex1->e_lblk < ex2->e_lblk)
+ return -1;
+ if (ex1->e_lblk > ex2->e_lblk)
+ return 1;
+ return ex1->e_len - ex2->e_len;
+}
+
+static int ex_len_compar(const void *arg1, const void *arg2)
+{
+ const struct ext2fs_extent *ex1 = (const struct ext2fs_extent *)arg1;
+ const struct ext2fs_extent *ex2 = (const struct ext2fs_extent *)arg2;
+
+ if (ex1->e_len < ex2->e_len)
+ return 1;
+
+ if (ex1->e_lblk > ex2->e_lblk)
+ return -1;
+
+ return 0;
+}
+
+static void ex_sort_and_merge(struct extent_list *list)
+{
+ unsigned int i, j;
+
+ if (list->count < 2)
+ return;
+
+ /*
+ * Reverse sort by length, that way we strip off all the 0 length
+ * extents
+ */
+ qsort(list->extents, list->count, sizeof(struct ext2fs_extent),
+ ex_len_compar);
+
+ for (i = 0; i < list->count; i++) {
+ if (list->extents[i].e_len == 0) {
+ list->count = i;
+ break;
+ }
+ }
+
+ if (list->count == 0)
+ return;
+
+ /* Now sort by logical offset */
+ qsort(list->extents, list->count, sizeof(list->extents[0]),
+ ex_compar);
+
+ /* Merge adjacent extents if they are logically and physically contiguous */
+ i = 0;
+ while (i < list->count - 1) {
+ if (ex_end(&list->extents[i]) + 1 != list->extents[i + 1].e_lblk ||
+ ex_pend(&list->extents[i]) + 1 != list->extents[i + 1].e_pblk ||
+ (list->extents[i].e_flags & EXT2_EXTENT_FLAGS_UNINIT) !=
+ (list->extents[i + 1].e_flags & EXT2_EXTENT_FLAGS_UNINIT)) {
+ i++;
+ continue;
+ }
+
+ list->extents[i].e_len += list->extents[i + 1].e_len;
+ for (j = i + 1; j < list->count - 1; j++)
+ list->extents[j] = list->extents[j + 1];
+ list->count--;
+ }
+}
+
+/* must free blocks that are released */
+static int ext4_modify_extent_list(e2fsck_t ctx, struct extent_list *list,
+ struct ext2fs_extent *ex, int del)
+{
+ int ret, offset;
+ unsigned int i;
+ struct ext2fs_extent add_ex = *ex;
+
+ /* First let's create a hole from ex->e_lblk of length ex->e_len */
+ for (i = 0; i < list->count; i++) {
+ if (ex_end(&list->extents[i]) < add_ex.e_lblk)
+ continue;
+
+ /* Case 1: No overlap */
+ if (list->extents[i].e_lblk > ex_end(&add_ex))
+ break;
+ /*
+ * Unmark all the blocks in bb now. All the blocks get marked
+ * before we exit this function.
+ */
+ ext2fs_unmark_block_bitmap_range2(ctx->fs->block_map,
+ list->extents[i].e_pblk, list->extents[i].e_len);
+ /* Case 2: Split */
+ if (list->extents[i].e_lblk < add_ex.e_lblk &&
+ ex_end(&list->extents[i]) > ex_end(&add_ex)) {
+ ret = make_room(list, i + 1);
+ if (ret)
+ return ret;
+ list->extents[i + 1] = list->extents[i];
+ offset = ex_end(&add_ex) + 1 - list->extents[i].e_lblk;
+ list->extents[i + 1].e_lblk += offset;
+ list->extents[i + 1].e_pblk += offset;
+ list->extents[i + 1].e_len -= offset;
+ list->extents[i].e_len =
+ add_ex.e_lblk - list->extents[i].e_lblk;
+ break;
+ }
+
+ /* Case 3: Exact overlap */
+ if (add_ex.e_lblk <= list->extents[i].e_lblk &&
+ ex_end(&list->extents[i]) <= ex_end(&add_ex)) {
+
+ list->extents[i].e_len = 0;
+ continue;
+ }
+
+ /* Case 4: Partial overlap */
+ if (ex_end(&list->extents[i]) > ex_end(&add_ex)) {
+ offset = ex_end(&add_ex) + 1 - list->extents[i].e_lblk;
+ list->extents[i].e_lblk += offset;
+ list->extents[i].e_pblk += offset;
+ list->extents[i].e_len -= offset;
+ break;
+ }
+
+ if (ex_end(&add_ex) >= ex_end(&list->extents[i]))
+ list->extents[i].e_len =
+ add_ex.e_lblk > list->extents[i].e_lblk ?
+ add_ex.e_lblk - list->extents[i].e_lblk : 0;
+ }
+
+ if (add_ex.e_len && !del) {
+ make_room(list, list->count);
+ list->extents[list->count - 1] = add_ex;
+ }
+
+ ex_sort_and_merge(list);
+
+ /* Mark all occupied blocks allocated */
+ for (i = 0; i < list->count; i++)
+ ext2fs_mark_block_bitmap_range2(ctx->fs->block_map,
+ list->extents[i].e_pblk, list->extents[i].e_len);
+ ext2fs_mark_bb_dirty(ctx->fs);
+
+ return 0;
+}
+
+static int ext4_add_extent_to_list(e2fsck_t ctx, struct extent_list *list,
+ struct ext2fs_extent *ex)
+{
+ return ext4_modify_extent_list(ctx, list, ex, 0 /* add */);
+}
+
+static int ext4_del_extent_from_list(e2fsck_t ctx, struct extent_list *list,
+ struct ext2fs_extent *ex)
+{
+ return ext4_modify_extent_list(ctx, list, ex, 1 /* delete */);
+}
+
+static int ext4_fc_read_extents(e2fsck_t ctx, ext2_ino_t ino)
+{
+ struct extent_list *extent_list = &ctx->fc_replay_state.fc_extent_list;
+
+ if (extent_list->ino == ino)
+ return 0;
+
+ extent_list->ino = ino;
+ return errcode_to_errno(e2fsck_read_extents(ctx, extent_list));
+}
+
+/*
+ * Flush extents in replay state on disk. @ino is the inode that is going
+ * to be processed next. So, we hold back flushing of the extent list
+ * if the next inode that's going to be processed is same as the one with
+ * cached extents in our replay state. That allows us to gather multiple extents
+ * for the inode so that we can flush all of them at once and it also saves us
+ * from continuously growing and shrinking the extent tree.
+ */
+static void ext4_fc_flush_extents(e2fsck_t ctx, ext2_ino_t ino)
+{
+ struct extent_list *extent_list = &ctx->fc_replay_state.fc_extent_list;
+
+ if (extent_list->ino == ino || extent_list->ino == 0)
+ return;
+ e2fsck_rewrite_extent_tree(ctx, extent_list);
+ ext2fs_free_mem(&extent_list->extents);
+ memset(extent_list, 0, sizeof(*extent_list));
+}
+
+/* Helper struct for dentry replay routines */
+struct dentry_info_args {
+ ext2_ino_t parent_ino;
+ ext2_ino_t ino;
+ int dname_len;
+ char *dname;
+};
+
+static inline int tl_to_darg(struct dentry_info_args *darg,
+ struct ext4_fc_tl *tl, __u8 *val)
+{
+ struct ext4_fc_dentry_info fcd;
+
+ memcpy(&fcd, val, sizeof(fcd));
+
+ darg->parent_ino = le32_to_cpu(fcd.fc_parent_ino);
+ darg->ino = le32_to_cpu(fcd.fc_ino);
+ darg->dname_len = ext4_fc_tag_len(tl) -
+ sizeof(struct ext4_fc_dentry_info);
+ darg->dname = malloc(darg->dname_len + 1);
+ if (!darg->dname)
+ return -ENOMEM;
+ memcpy(darg->dname,
+ val + sizeof(struct ext4_fc_dentry_info),
+ darg->dname_len);
+ darg->dname[darg->dname_len] = 0;
+ jbd_debug(1, "%s: %s, ino %u, parent %u\n",
+ le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_CREAT ? "create" :
+ (le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_LINK ? "link" :
+ (le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_UNLINK ? "unlink" :
+ "error")), darg->dname, darg->ino, darg->parent_ino);
+ return 0;
+}
+
+static int ext4_fc_handle_unlink(e2fsck_t ctx, struct ext4_fc_tl *tl, __u8 *val)
+{
+ struct dentry_info_args darg;
+ int ret;
+
+ ret = tl_to_darg(&darg, tl, val);
+ if (ret)
+ return ret;
+ ext4_fc_flush_extents(ctx, darg.ino);
+ ret = errcode_to_errno(ext2fs_unlink(ctx->fs, darg.parent_ino,
+ darg.dname, darg.ino, 0));
+ /* It's okay if the above call fails */
+ free(darg.dname);
+
+ return ret;
+}
+
+static int ext4_fc_handle_link_and_create(e2fsck_t ctx, struct ext4_fc_tl *tl, __u8 *val)
+{
+ struct dentry_info_args darg;
+ ext2_filsys fs = ctx->fs;
+ struct ext2_inode_large inode_large;
+ int ret, filetype, mode;
+
+ ret = tl_to_darg(&darg, tl, val);
+ if (ret)
+ return ret;
+ ext4_fc_flush_extents(ctx, 0);
+ ret = errcode_to_errno(ext2fs_read_inode(fs, darg.ino,
+ (struct ext2_inode *)&inode_large));
+ if (ret)
+ goto out;
+
+ mode = inode_large.i_mode;
+
+ if (LINUX_S_ISREG(mode))
+ filetype = EXT2_FT_REG_FILE;
+ else if (LINUX_S_ISDIR(mode))
+ filetype = EXT2_FT_DIR;
+ else if (LINUX_S_ISCHR(mode))
+ filetype = EXT2_FT_CHRDEV;
+ else if (LINUX_S_ISBLK(mode))
+ filetype = EXT2_FT_BLKDEV;
+ else if (LINUX_S_ISLNK(mode))
+ return EXT2_FT_SYMLINK;
+ else if (LINUX_S_ISFIFO(mode))
+ filetype = EXT2_FT_FIFO;
+ else if (LINUX_S_ISSOCK(mode))
+ filetype = EXT2_FT_SOCK;
+ else {
+ ret = -EINVAL;
+ goto out;
+ }
+
+ /*
+ * Forcefully unlink if the same name is present and ignore the error
+ * if any, since this dirent might not exist
+ */
+ ext2fs_unlink(fs, darg.parent_ino, darg.dname, darg.ino,
+ EXT2FS_UNLINK_FORCE);
+
+ ret = errcode_to_errno(
+ ext2fs_link(fs, darg.parent_ino, darg.dname, darg.ino,
+ filetype));
+out:
+ free(darg.dname);
+ return ret;
+
+}
+
+/* This function fixes the i_blocks field in the replayed indoe */
+static void ext4_fc_replay_fixup_iblocks(struct ext2_inode_large *ondisk_inode,
+ struct ext2_inode_large *fc_inode)
+{
+ if (ondisk_inode->i_flags & EXT4_EXTENTS_FL) {
+ struct ext3_extent_header *eh;
+
+ eh = (struct ext3_extent_header *)(&ondisk_inode->i_block[0]);
+ if (le16_to_cpu(eh->eh_magic) != EXT3_EXT_MAGIC) {
+ memset(eh, 0, sizeof(*eh));
+ eh->eh_magic = cpu_to_le16(EXT3_EXT_MAGIC);
+ eh->eh_max = cpu_to_le16(
+ (sizeof(ondisk_inode->i_block) -
+ sizeof(struct ext3_extent_header)) /
+ sizeof(struct ext3_extent));
+ }
+ } else if (ondisk_inode->i_flags & EXT4_INLINE_DATA_FL) {
+ memcpy(ondisk_inode->i_block, fc_inode->i_block,
+ sizeof(fc_inode->i_block));
+ }
+}
+
+static int ext4_fc_handle_inode(e2fsck_t ctx, __u8 *val)
+{
+ int ino, inode_len = EXT2_GOOD_OLD_INODE_SIZE;
+ struct ext2_inode_large *inode = NULL, *fc_inode = NULL;
+ __le32 fc_ino;
+ __u8 *fc_raw_inode;
+ errcode_t err;
+ blk64_t blks;
+
+ memcpy(&fc_ino, val, sizeof(fc_ino));
+ fc_raw_inode = val + sizeof(fc_ino);
+ ino = le32_to_cpu(fc_ino);
+
+ if (EXT2_INODE_SIZE(ctx->fs->super) > EXT2_GOOD_OLD_INODE_SIZE) {
+ __u16 extra_isize = ext2fs_le16_to_cpu(
+ ((struct ext2_inode_large *)fc_raw_inode)->i_extra_isize);
+
+ if ((extra_isize < (sizeof(inode->i_extra_isize) +
+ sizeof(inode->i_checksum_hi))) ||
+ (extra_isize > (EXT2_INODE_SIZE(ctx->fs->super) -
+ EXT2_GOOD_OLD_INODE_SIZE))) {
+ err = EFSCORRUPTED;
+ goto out;
+ }
+ inode_len += extra_isize;
+ }
+ err = ext2fs_get_mem(inode_len, &inode);
+ if (err)
+ goto out;
+ err = ext2fs_get_mem(inode_len, &fc_inode);
+ if (err)
+ goto out;
+ ext4_fc_flush_extents(ctx, ino);
+
+ err = ext2fs_read_inode_full(ctx->fs, ino, (struct ext2_inode *)inode,
+ inode_len);
+ if (err)
+ goto out;
+ memcpy(fc_inode, fc_raw_inode, inode_len);
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_inode_full(ctx->fs, fc_inode, fc_inode, 0, inode_len);
+#endif
+ memcpy(inode, fc_inode, offsetof(struct ext2_inode_large, i_block));
+ memcpy(&inode->i_generation, &fc_inode->i_generation,
+ inode_len - offsetof(struct ext2_inode_large, i_generation));
+ ext4_fc_replay_fixup_iblocks(inode, fc_inode);
+ err = ext2fs_count_blocks(ctx->fs, ino, EXT2_INODE(inode), &blks);
+ if (err)
+ goto out;
+ ext2fs_iblk_set(ctx->fs, EXT2_INODE(inode), blks);
+ ext2fs_inode_csum_set(ctx->fs, ino, inode);
+
+ err = ext2fs_write_inode_full(ctx->fs, ino, (struct ext2_inode *)inode,
+ inode_len);
+ if (err)
+ goto out;
+ if (inode->i_links_count)
+ ext2fs_mark_inode_bitmap2(ctx->fs->inode_map, ino);
+ else
+ ext2fs_unmark_inode_bitmap2(ctx->fs->inode_map, ino);
+ ext2fs_mark_ib_dirty(ctx->fs);
+
+out:
+ ext2fs_free_mem(&inode);
+ ext2fs_free_mem(&fc_inode);
+ return errcode_to_errno(err);
+}
+
+/*
+ * Handle add extent replay tag.
+ */
+static int ext4_fc_handle_add_extent(e2fsck_t ctx, __u8 *val)
+{
+ struct ext2fs_extent extent;
+ struct ext4_fc_add_range add_range;
+ ext2_ino_t ino;
+ int ret = 0;
+
+ memcpy(&add_range, val, sizeof(add_range));
+ ino = le32_to_cpu(add_range.fc_ino);
+ ext4_fc_flush_extents(ctx, ino);
+
+ ret = ext4_fc_read_extents(ctx, ino);
+ if (ret)
+ return ret;
+ memset(&extent, 0, sizeof(extent));
+ ret = errcode_to_errno(ext2fs_decode_extent(
+ &extent, (void *)add_range.fc_ex,
+ sizeof(add_range.fc_ex)));
+ if (ret)
+ return ret;
+ return ext4_add_extent_to_list(ctx,
+ &ctx->fc_replay_state.fc_extent_list, &extent);
+}
+
+/*
+ * Handle delete logical range replay tag.
+ */
+static int ext4_fc_handle_del_range(e2fsck_t ctx, __u8 *val)
+{
+ struct ext2fs_extent extent;
+ struct ext4_fc_del_range del_range;
+ int ret, ino;
+
+ memcpy(&del_range, val, sizeof(del_range));
+ ino = le32_to_cpu(del_range.fc_ino);
+ ext4_fc_flush_extents(ctx, ino);
+
+ memset(&extent, 0, sizeof(extent));
+ extent.e_lblk = le32_to_cpu(del_range.fc_lblk);
+ extent.e_len = le32_to_cpu(del_range.fc_len);
+ ret = ext4_fc_read_extents(ctx, ino);
+ if (ret)
+ return ret;
+ return ext4_del_extent_from_list(ctx,
+ &ctx->fc_replay_state.fc_extent_list, &extent);
+}
+
+/*
+ * Main recovery path entry point. This function returns JBD2_FC_REPLAY_CONTINUE
+ * to indicate that it is expecting more fast commit blocks. It returns
+ * JBD2_FC_REPLAY_STOP to indicate that replay is done.
+ */
+static int ext4_fc_replay(journal_t *journal, struct buffer_head *bh,
+ enum passtype pass, int off, tid_t expected_tid)
+{
+ e2fsck_t ctx = journal->j_fs_dev->k_ctx;
+ struct e2fsck_fc_replay_state *state = &ctx->fc_replay_state;
+ int ret = JBD2_FC_REPLAY_CONTINUE;
+ struct ext4_fc_tl tl;
+ __u8 *start, *end, *cur, *val;
+
+ if (pass == PASS_SCAN) {
+ state->fc_current_pass = PASS_SCAN;
+ return ext4_fc_replay_scan(journal, bh, off, expected_tid);
+ }
+
+ if (state->fc_replay_num_tags == 0)
+ goto replay_done;
+
+ if (state->fc_current_pass != pass) {
+ /* Starting replay phase */
+ state->fc_current_pass = pass;
+ /* We will reset checksums */
+ ctx->fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ ret = errcode_to_errno(ext2fs_read_bitmaps(ctx->fs));
+ if (ret) {
+ jbd_debug(1, "Error %d while reading bitmaps\n", ret);
+ return ret;
+ }
+ state->fc_super_state = ctx->fs->super->s_state;
+ /*
+ * Mark the file system to indicate it contains errors. That's
+ * because the updates performed by fast commit replay code are
+ * not atomic and may result in inconsistent file system if it
+ * crashes before the replay is complete.
+ */
+ ctx->fs->super->s_state |= EXT2_ERROR_FS;
+ ctx->fs->super->s_state |= EXT4_FC_REPLAY;
+ ext2fs_mark_super_dirty(ctx->fs);
+ ext2fs_flush(ctx->fs);
+ }
+
+ start = (__u8 *)bh->b_data;
+ end = (__u8 *)bh->b_data + journal->j_blocksize - 1;
+
+ for (cur = start; cur < end; cur = cur + le16_to_cpu(tl.fc_len) + sizeof(tl)) {
+ memcpy(&tl, cur, sizeof(tl));
+ val = cur + sizeof(tl);
+
+ if (state->fc_replay_num_tags == 0)
+ goto replay_done;
+ jbd_debug(3, "Replay phase processing %s tag\n",
+ tag2str(le16_to_cpu(tl.fc_tag)));
+ state->fc_replay_num_tags--;
+ switch (le16_to_cpu(tl.fc_tag)) {
+ case EXT4_FC_TAG_CREAT:
+ case EXT4_FC_TAG_LINK:
+ ret = ext4_fc_handle_link_and_create(ctx, &tl, val);
+ break;
+ case EXT4_FC_TAG_UNLINK:
+ ret = ext4_fc_handle_unlink(ctx, &tl, val);
+ break;
+ case EXT4_FC_TAG_ADD_RANGE:
+ ret = ext4_fc_handle_add_extent(ctx, val);
+ break;
+ case EXT4_FC_TAG_DEL_RANGE:
+ ret = ext4_fc_handle_del_range(ctx, val);
+ break;
+ case EXT4_FC_TAG_INODE:
+ ret = ext4_fc_handle_inode(ctx, val);
+ break;
+ case EXT4_FC_TAG_TAIL:
+ ext4_fc_flush_extents(ctx, 0);
+ case EXT4_FC_TAG_PAD:
+ case EXT4_FC_TAG_HEAD:
+ break;
+ default:
+ ret = -ECANCELED;
+ break;
+ }
+ if (ret < 0)
+ break;
+ ret = JBD2_FC_REPLAY_CONTINUE;
+ }
+ return ret;
+replay_done:
+ jbd_debug(1, "End of fast commit replay\n");
+ if (state->fc_current_pass != pass)
+ return JBD2_FC_REPLAY_STOP;
+
+ ext2fs_calculate_summary_stats(ctx->fs, 0 /* update bg also */);
+ ext2fs_write_block_bitmap(ctx->fs);
+ ext2fs_write_inode_bitmap(ctx->fs);
+ ext2fs_mark_super_dirty(ctx->fs);
+ ext2fs_set_gdt_csum(ctx->fs);
+ ctx->fs->super->s_state = state->fc_super_state;
+ ext2fs_flush(ctx->fs);
+
+ return JBD2_FC_REPLAY_STOP;
+}
+
+static errcode_t e2fsck_get_journal(e2fsck_t ctx, journal_t **ret_journal)
+{
+ struct process_block_struct pb;
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct ext2_super_block jsuper;
+ struct problem_context pctx;
+ struct buffer_head *bh;
+ struct inode *j_inode = NULL;
+ struct kdev_s *dev_fs = NULL, *dev_journal;
+ const char *journal_name = 0;
+ journal_t *journal = NULL;
+ errcode_t retval = 0;
+ io_manager io_ptr = 0;
+ unsigned long long start = 0;
+ int ret;
+ int ext_journal = 0;
+ int tried_backup_jnl = 0;
+
+ clear_problem_context(&pctx);
+
+ journal = e2fsck_allocate_memory(ctx, sizeof(journal_t), "journal");
+ if (!journal) {
+ return EXT2_ET_NO_MEMORY;
+ }
+
+ dev_fs = e2fsck_allocate_memory(ctx, 2*sizeof(struct kdev_s), "kdev");
+ if (!dev_fs) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto errout;
+ }
+ dev_journal = dev_fs+1;
+
+ dev_fs->k_ctx = dev_journal->k_ctx = ctx;
+ dev_fs->k_dev = K_DEV_FS;
+ dev_journal->k_dev = K_DEV_JOURNAL;
+
+ journal->j_dev = dev_journal;
+ journal->j_fs_dev = dev_fs;
+ journal->j_inode = NULL;
+ journal->j_blocksize = ctx->fs->blocksize;
+
+ if (uuid_is_null(sb->s_journal_uuid)) {
+ /*
+ * The full set of superblock sanity checks haven't
+ * been performed yet, so we need to do some basic
+ * checks here to avoid potential array overruns.
+ */
+ if (!sb->s_journal_inum ||
+ (sb->s_journal_inum >
+ (ctx->fs->group_desc_count * sb->s_inodes_per_group))) {
+ retval = EXT2_ET_BAD_INODE_NUM;
+ goto errout;
+ }
+ j_inode = e2fsck_allocate_memory(ctx, sizeof(*j_inode),
+ "journal inode");
+ if (!j_inode) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto errout;
+ }
+
+ j_inode->i_ctx = ctx;
+ j_inode->i_ino = sb->s_journal_inum;
+
+ if ((retval = ext2fs_read_inode(ctx->fs,
+ sb->s_journal_inum,
+ &j_inode->i_ext2))) {
+ try_backup_journal:
+ if (sb->s_jnl_backup_type != EXT3_JNL_BACKUP_BLOCKS ||
+ tried_backup_jnl)
+ goto errout;
+ memset(&j_inode->i_ext2, 0, sizeof(struct ext2_inode));
+ memcpy(&j_inode->i_ext2.i_block[0], sb->s_jnl_blocks,
+ EXT2_N_BLOCKS*4);
+ j_inode->i_ext2.i_size_high = sb->s_jnl_blocks[15];
+ j_inode->i_ext2.i_size = sb->s_jnl_blocks[16];
+ j_inode->i_ext2.i_links_count = 1;
+ j_inode->i_ext2.i_mode = LINUX_S_IFREG | 0600;
+ e2fsck_use_inode_shortcuts(ctx, 1);
+ ctx->stashed_ino = j_inode->i_ino;
+ ctx->stashed_inode = &j_inode->i_ext2;
+ tried_backup_jnl++;
+ }
+ if (!j_inode->i_ext2.i_links_count ||
+ !LINUX_S_ISREG(j_inode->i_ext2.i_mode) ||
+ (j_inode->i_ext2.i_flags & EXT4_ENCRYPT_FL)) {
+ retval = EXT2_ET_NO_JOURNAL;
+ goto try_backup_journal;
+ }
+ if (EXT2_I_SIZE(&j_inode->i_ext2) / journal->j_blocksize <
+ JBD2_MIN_JOURNAL_BLOCKS) {
+ retval = EXT2_ET_JOURNAL_TOO_SMALL;
+ goto try_backup_journal;
+ }
+ pb.last_block = -1;
+ retval = ext2fs_block_iterate3(ctx->fs, j_inode->i_ino,
+ BLOCK_FLAG_HOLE, 0,
+ process_journal_block, &pb);
+ if ((pb.last_block + 1) * ctx->fs->blocksize <
+ (int) EXT2_I_SIZE(&j_inode->i_ext2)) {
+ retval = EXT2_ET_JOURNAL_TOO_SMALL;
+ goto try_backup_journal;
+ }
+ if (tried_backup_jnl && !(ctx->options & E2F_OPT_READONLY)) {
+ retval = ext2fs_write_inode(ctx->fs, sb->s_journal_inum,
+ &j_inode->i_ext2);
+ if (retval)
+ goto errout;
+ }
+
+ journal->j_total_len = EXT2_I_SIZE(&j_inode->i_ext2) /
+ journal->j_blocksize;
+
+#ifdef USE_INODE_IO
+ retval = ext2fs_inode_io_intern2(ctx->fs, sb->s_journal_inum,
+ &j_inode->i_ext2,
+ &journal_name);
+ if (retval)
+ goto errout;
+
+ io_ptr = inode_io_manager;
+#else
+ journal->j_inode = j_inode;
+ ctx->journal_io = ctx->fs->io;
+ if ((ret = jbd2_journal_bmap(journal, 0, &start)) != 0) {
+ retval = (errcode_t) (-1 * ret);
+ goto errout;
+ }
+#endif
+ } else {
+ ext_journal = 1;
+ if (!ctx->journal_name) {
+ char uuid[37];
+
+ uuid_unparse(sb->s_journal_uuid, uuid);
+ ctx->journal_name = blkid_get_devname(ctx->blkid,
+ "UUID", uuid);
+ if (!ctx->journal_name)
+ ctx->journal_name = blkid_devno_to_devname(sb->s_journal_dev);
+ }
+ journal_name = ctx->journal_name;
+
+ if (!journal_name) {
+ fix_problem(ctx, PR_0_CANT_FIND_JOURNAL, &pctx);
+ retval = EXT2_ET_LOAD_EXT_JOURNAL;
+ goto errout;
+ }
+
+ jfs_debug(1, "Using journal file %s\n", journal_name);
+ io_ptr = unix_io_manager;
+ }
+
+#if 0
+ test_io_backing_manager = io_ptr;
+ io_ptr = test_io_manager;
+#endif
+#ifndef USE_INODE_IO
+ if (ext_journal)
+#endif
+ {
+ int flags = IO_FLAG_RW;
+ if (!(ctx->mount_flags & EXT2_MF_ISROOT &&
+ ctx->mount_flags & EXT2_MF_READONLY))
+ flags |= IO_FLAG_EXCLUSIVE;
+ if ((ctx->mount_flags & EXT2_MF_READONLY) &&
+ (ctx->options & E2F_OPT_FORCE))
+ flags &= ~IO_FLAG_EXCLUSIVE;
+
+
+ retval = io_ptr->open(journal_name, flags,
+ &ctx->journal_io);
+ }
+ if (retval)
+ goto errout;
+
+ io_channel_set_blksize(ctx->journal_io, ctx->fs->blocksize);
+
+ if (ext_journal) {
+ blk64_t maxlen;
+
+ start = ext2fs_journal_sb_start(ctx->fs->blocksize) - 1;
+ bh = getblk(dev_journal, start, ctx->fs->blocksize);
+ if (!bh) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto errout;
+ }
+ ll_rw_block(REQ_OP_READ, 0, 1, &bh);
+ if ((retval = bh->b_err) != 0) {
+ brelse(bh);
+ goto errout;
+ }
+ memcpy(&jsuper, start ? bh->b_data : bh->b_data + SUPERBLOCK_OFFSET,
+ sizeof(jsuper));
+#ifdef WORDS_BIGENDIAN
+ if (jsuper.s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC))
+ ext2fs_swap_super(&jsuper);
+#endif
+ if (jsuper.s_magic != EXT2_SUPER_MAGIC ||
+ !ext2fs_has_feature_journal_dev(&jsuper)) {
+ fix_problem(ctx, PR_0_EXT_JOURNAL_BAD_SUPER, &pctx);
+ retval = EXT2_ET_LOAD_EXT_JOURNAL;
+ brelse(bh);
+ goto errout;
+ }
+ /* Make sure the journal UUID is correct */
+ if (memcmp(jsuper.s_uuid, ctx->fs->super->s_journal_uuid,
+ sizeof(jsuper.s_uuid))) {
+ fix_problem(ctx, PR_0_JOURNAL_BAD_UUID, &pctx);
+ retval = EXT2_ET_LOAD_EXT_JOURNAL;
+ brelse(bh);
+ goto errout;
+ }
+
+ /* Check the superblock checksum */
+ if (ext2fs_has_feature_metadata_csum(&jsuper)) {
+ struct struct_ext2_filsys fsx;
+ struct ext2_super_block superx;
+ void *p;
+
+ p = start ? bh->b_data : bh->b_data + SUPERBLOCK_OFFSET;
+ memcpy(&fsx, ctx->fs, sizeof(fsx));
+ memcpy(&superx, ctx->fs->super, sizeof(superx));
+ fsx.super = &superx;
+ ext2fs_set_feature_metadata_csum(fsx.super);
+ if (!ext2fs_superblock_csum_verify(&fsx, p) &&
+ fix_problem(ctx, PR_0_EXT_JOURNAL_SUPER_CSUM_INVALID,
+ &pctx)) {
+ ext2fs_superblock_csum_set(&fsx, p);
+ mark_buffer_dirty(bh);
+ }
+ }
+ brelse(bh);
+
+ maxlen = ext2fs_blocks_count(&jsuper);
+ journal->j_total_len = (maxlen < 1ULL << 32) ? maxlen : (1ULL << 32) - 1;
+ start++;
+ }
+
+ if (!(bh = getblk(dev_journal, start, journal->j_blocksize))) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto errout;
+ }
+
+ journal->j_sb_buffer = bh;
+ journal->j_superblock = (journal_superblock_t *)bh->b_data;
+ if (ext2fs_has_feature_fast_commit(ctx->fs->super))
+ journal->j_fc_replay_callback = ext4_fc_replay;
+ else
+ journal->j_fc_replay_callback = NULL;
+
+#ifdef USE_INODE_IO
+ if (j_inode)
+ ext2fs_free_mem(&j_inode);
+#endif
+
+ *ret_journal = journal;
+ e2fsck_use_inode_shortcuts(ctx, 0);
+ return 0;
+
+errout:
+ e2fsck_use_inode_shortcuts(ctx, 0);
+ if (dev_fs)
+ ext2fs_free_mem(&dev_fs);
+ if (j_inode)
+ ext2fs_free_mem(&j_inode);
+ if (journal)
+ ext2fs_free_mem(&journal);
+ return retval;
+}
+
+static errcode_t e2fsck_journal_fix_bad_inode(e2fsck_t ctx,
+ struct problem_context *pctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ int recover = ext2fs_has_feature_journal_needs_recovery(ctx->fs->super);
+ int has_journal = ext2fs_has_feature_journal(ctx->fs->super);
+
+ if (has_journal || sb->s_journal_inum) {
+ /* The journal inode is bogus, remove and force full fsck */
+ pctx->ino = sb->s_journal_inum;
+ if (fix_problem(ctx, PR_0_JOURNAL_BAD_INODE, pctx)) {
+ if (has_journal && sb->s_journal_inum)
+ printf("*** journal has been deleted ***\n\n");
+ ext2fs_clear_feature_journal(sb);
+ sb->s_journal_inum = 0;
+ memset(sb->s_jnl_blocks, 0, sizeof(sb->s_jnl_blocks));
+ ctx->flags |= E2F_FLAG_JOURNAL_INODE;
+ ctx->fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ e2fsck_clear_recover(ctx, 1);
+ return 0;
+ }
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+ } else if (recover) {
+ if (fix_problem(ctx, PR_0_JOURNAL_RECOVER_SET, pctx)) {
+ e2fsck_clear_recover(ctx, 1);
+ return 0;
+ }
+ return EXT2_ET_UNSUPP_FEATURE;
+ }
+ return 0;
+}
+
+#define V1_SB_SIZE 0x0024
+static void clear_v2_journal_fields(journal_t *journal)
+{
+ e2fsck_t ctx = journal->j_dev->k_ctx;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ if (!fix_problem(ctx, PR_0_CLEAR_V2_JOURNAL, &pctx))
+ return;
+
+ ctx->flags |= E2F_FLAG_PROBLEMS_FIXED;
+ memset(((char *) journal->j_superblock) + V1_SB_SIZE, 0,
+ ctx->fs->blocksize-V1_SB_SIZE);
+ mark_buffer_dirty(journal->j_sb_buffer);
+}
+
+
+static errcode_t e2fsck_journal_load(journal_t *journal)
+{
+ e2fsck_t ctx = journal->j_dev->k_ctx;
+ journal_superblock_t *jsb;
+ struct buffer_head *jbh = journal->j_sb_buffer;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ ll_rw_block(REQ_OP_READ, 0, 1, &jbh);
+ if (jbh->b_err) {
+ com_err(ctx->device_name, jbh->b_err, "%s",
+ _("reading journal superblock\n"));
+ return jbh->b_err;
+ }
+
+ jsb = journal->j_superblock;
+ /* If we don't even have JBD2_MAGIC, we probably have a wrong inode */
+ if (jsb->s_header.h_magic != htonl(JBD2_MAGIC_NUMBER))
+ return e2fsck_journal_fix_bad_inode(ctx, &pctx);
+
+ switch (ntohl(jsb->s_header.h_blocktype)) {
+ case JBD2_SUPERBLOCK_V1:
+ journal->j_format_version = 1;
+ if (jsb->s_feature_compat ||
+ jsb->s_feature_incompat ||
+ jsb->s_feature_ro_compat ||
+ jsb->s_nr_users)
+ clear_v2_journal_fields(journal);
+ break;
+
+ case JBD2_SUPERBLOCK_V2:
+ journal->j_format_version = 2;
+ if (ntohl(jsb->s_nr_users) > 1 &&
+ uuid_is_null(ctx->fs->super->s_journal_uuid))
+ clear_v2_journal_fields(journal);
+ if (ntohl(jsb->s_nr_users) > 1) {
+ fix_problem(ctx, PR_0_JOURNAL_UNSUPP_MULTIFS, &pctx);
+ return EXT2_ET_JOURNAL_UNSUPP_VERSION;
+ }
+ break;
+
+ /*
+ * These should never appear in a journal super block, so if
+ * they do, the journal is badly corrupted.
+ */
+ case JBD2_DESCRIPTOR_BLOCK:
+ case JBD2_COMMIT_BLOCK:
+ case JBD2_REVOKE_BLOCK:
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ /* If we don't understand the superblock major type, but there
+ * is a magic number, then it is likely to be a new format we
+ * just don't understand, so leave it alone. */
+ default:
+ return EXT2_ET_JOURNAL_UNSUPP_VERSION;
+ }
+
+ if (JBD2_HAS_INCOMPAT_FEATURE(journal, ~JBD2_KNOWN_INCOMPAT_FEATURES))
+ return EXT2_ET_UNSUPP_FEATURE;
+
+ if (JBD2_HAS_RO_COMPAT_FEATURE(journal, ~JBD2_KNOWN_ROCOMPAT_FEATURES))
+ return EXT2_ET_RO_UNSUPP_FEATURE;
+
+ /* Checksum v1-3 are mutually exclusive features. */
+ if (jbd2_has_feature_csum2(journal) && jbd2_has_feature_csum3(journal))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ if (jbd2_journal_has_csum_v2or3(journal) &&
+ jbd2_has_feature_checksum(journal))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ if (!e2fsck_journal_verify_csum_type(journal, jsb) ||
+ !e2fsck_journal_sb_csum_verify(journal, jsb))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ if (jbd2_journal_has_csum_v2or3(journal))
+ journal->j_csum_seed = jbd2_chksum(journal, ~0, jsb->s_uuid,
+ sizeof(jsb->s_uuid));
+
+ /* We have now checked whether we know enough about the journal
+ * format to be able to proceed safely, so any other checks that
+ * fail we should attempt to recover from. */
+ if (jsb->s_blocksize != htonl(journal->j_blocksize)) {
+ com_err(ctx->program_name, EXT2_ET_CORRUPT_JOURNAL_SB,
+ _("%s: no valid journal superblock found\n"),
+ ctx->device_name);
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+ }
+
+ if (ntohl(jsb->s_maxlen) < journal->j_total_len)
+ journal->j_total_len = ntohl(jsb->s_maxlen);
+ else if (ntohl(jsb->s_maxlen) > journal->j_total_len) {
+ com_err(ctx->program_name, EXT2_ET_CORRUPT_JOURNAL_SB,
+ _("%s: journal too short\n"),
+ ctx->device_name);
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+ }
+
+ journal->j_tail_sequence = ntohl(jsb->s_sequence);
+ journal->j_transaction_sequence = journal->j_tail_sequence;
+ journal->j_tail = ntohl(jsb->s_start);
+ journal->j_first = ntohl(jsb->s_first);
+ if (jbd2_has_feature_fast_commit(journal)) {
+ if (ntohl(jsb->s_maxlen) - jbd2_journal_get_num_fc_blks(jsb)
+ < JBD2_MIN_JOURNAL_BLOCKS) {
+ com_err(ctx->program_name, EXT2_ET_CORRUPT_JOURNAL_SB,
+ _("%s: incorrect fast commit blocks\n"),
+ ctx->device_name);
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+ }
+ journal->j_fc_last = ntohl(jsb->s_maxlen);
+ journal->j_last = journal->j_fc_last -
+ jbd2_journal_get_num_fc_blks(jsb);
+ journal->j_fc_first = journal->j_last + 1;
+ } else {
+ journal->j_last = ntohl(jsb->s_maxlen);
+ }
+
+ return 0;
+}
+
+static void e2fsck_journal_reset_super(e2fsck_t ctx, journal_superblock_t *jsb,
+ journal_t *journal)
+{
+ char *p;
+ union {
+ uuid_t uuid;
+ __u32 val[4];
+ } u;
+ __u32 new_seq = 0;
+ int i;
+
+ /* Leave a valid existing V1 superblock signature alone.
+ * Anything unrecognisable we overwrite with a new V2
+ * signature. */
+
+ if (jsb->s_header.h_magic != htonl(JBD2_MAGIC_NUMBER) ||
+ jsb->s_header.h_blocktype != htonl(JBD2_SUPERBLOCK_V1)) {
+ jsb->s_header.h_magic = htonl(JBD2_MAGIC_NUMBER);
+ jsb->s_header.h_blocktype = htonl(JBD2_SUPERBLOCK_V2);
+ }
+
+ /* Zero out everything else beyond the superblock header */
+
+ p = ((char *) jsb) + sizeof(journal_header_t);
+ memset (p, 0, ctx->fs->blocksize-sizeof(journal_header_t));
+
+ jsb->s_blocksize = htonl(ctx->fs->blocksize);
+ jsb->s_maxlen = htonl(journal->j_total_len);
+ jsb->s_first = htonl(1);
+
+ /* Initialize the journal sequence number so that there is "no"
+ * chance we will find old "valid" transactions in the journal.
+ * This avoids the need to zero the whole journal (slow to do,
+ * and risky when we are just recovering the filesystem).
+ */
+ uuid_generate(u.uuid);
+ for (i = 0; i < 4; i ++)
+ new_seq ^= u.val[i];
+ jsb->s_sequence = htonl(new_seq);
+ e2fsck_journal_sb_csum_set(journal, jsb);
+
+ mark_buffer_dirty(journal->j_sb_buffer);
+ ll_rw_block(REQ_OP_WRITE, 0, 1, &journal->j_sb_buffer);
+}
+
+static errcode_t e2fsck_journal_fix_corrupt_super(e2fsck_t ctx,
+ journal_t *journal,
+ struct problem_context *pctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ int recover = ext2fs_has_feature_journal_needs_recovery(ctx->fs->super);
+
+ if (ext2fs_has_feature_journal(sb)) {
+ if (fix_problem(ctx, PR_0_JOURNAL_BAD_SUPER, pctx)) {
+ e2fsck_journal_reset_super(ctx, journal->j_superblock,
+ journal);
+ journal->j_transaction_sequence = 1;
+ e2fsck_clear_recover(ctx, recover);
+ return 0;
+ }
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+ } else if (e2fsck_journal_fix_bad_inode(ctx, pctx))
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+
+ return 0;
+}
+
+static void e2fsck_journal_release(e2fsck_t ctx, journal_t *journal,
+ int reset, int drop)
+{
+ journal_superblock_t *jsb;
+
+ if (drop)
+ mark_buffer_clean(journal->j_sb_buffer);
+ else if (!(ctx->options & E2F_OPT_READONLY)) {
+ jsb = journal->j_superblock;
+ jsb->s_sequence = htonl(journal->j_tail_sequence);
+ if (reset)
+ jsb->s_start = 0; /* this marks the journal as empty */
+ e2fsck_journal_sb_csum_set(journal, jsb);
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+ brelse(journal->j_sb_buffer);
+
+ if (ctx->journal_io) {
+ if (ctx->fs && ctx->fs->io != ctx->journal_io)
+ io_channel_close(ctx->journal_io);
+ ctx->journal_io = 0;
+ }
+
+#ifndef USE_INODE_IO
+ if (journal->j_inode)
+ ext2fs_free_mem(&journal->j_inode);
+#endif
+ if (journal->j_fs_dev)
+ ext2fs_free_mem(&journal->j_fs_dev);
+ ext2fs_free_mem(&journal);
+}
+
+/*
+ * This function makes sure that the superblock fields regarding the
+ * journal are consistent.
+ */
+errcode_t e2fsck_check_ext3_journal(e2fsck_t ctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ journal_t *journal;
+ int recover = ext2fs_has_feature_journal_needs_recovery(ctx->fs->super);
+ struct problem_context pctx;
+ problem_t problem;
+ int reset = 0, force_fsck = 0;
+ errcode_t retval;
+
+ /* If we don't have any journal features, don't do anything more */
+ if (!ext2fs_has_feature_journal(sb) &&
+ !recover && sb->s_journal_inum == 0 && sb->s_journal_dev == 0 &&
+ uuid_is_null(sb->s_journal_uuid))
+ return 0;
+
+ clear_problem_context(&pctx);
+ pctx.num = sb->s_journal_inum;
+
+ retval = e2fsck_get_journal(ctx, &journal);
+ if (retval) {
+ if ((retval == EXT2_ET_BAD_INODE_NUM) ||
+ (retval == EXT2_ET_BAD_BLOCK_NUM) ||
+ (retval == EXT2_ET_JOURNAL_TOO_SMALL) ||
+ (retval == EXT2_ET_NO_JOURNAL))
+ return e2fsck_journal_fix_bad_inode(ctx, &pctx);
+ return retval;
+ }
+
+ retval = e2fsck_journal_load(journal);
+ if (retval) {
+ if ((retval == EXT2_ET_CORRUPT_JOURNAL_SB) ||
+ ((retval == EXT2_ET_UNSUPP_FEATURE) &&
+ (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_INCOMPAT,
+ &pctx))) ||
+ ((retval == EXT2_ET_RO_UNSUPP_FEATURE) &&
+ (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_ROCOMPAT,
+ &pctx))) ||
+ ((retval == EXT2_ET_JOURNAL_UNSUPP_VERSION) &&
+ (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_VERSION, &pctx))))
+ retval = e2fsck_journal_fix_corrupt_super(ctx, journal,
+ &pctx);
+ e2fsck_journal_release(ctx, journal, 0, 1);
+ return retval;
+ }
+
+ /*
+ * We want to make the flags consistent here. We will not leave with
+ * needs_recovery set but has_journal clear. We can't get in a loop
+ * with -y, -n, or -p, only if a user isn't making up their mind.
+ */
+no_has_journal:
+ if (!ext2fs_has_feature_journal(sb)) {
+ recover = ext2fs_has_feature_journal_needs_recovery(sb);
+ if (fix_problem(ctx, PR_0_JOURNAL_HAS_JOURNAL, &pctx)) {
+ if (recover &&
+ !fix_problem(ctx, PR_0_JOURNAL_RECOVER_SET, &pctx))
+ goto no_has_journal;
+ /*
+ * Need a full fsck if we are releasing a
+ * journal stored on a reserved inode.
+ */
+ force_fsck = recover ||
+ (sb->s_journal_inum < EXT2_FIRST_INODE(sb));
+ /* Clear all of the journal fields */
+ sb->s_journal_inum = 0;
+ sb->s_journal_dev = 0;
+ memset(sb->s_journal_uuid, 0,
+ sizeof(sb->s_journal_uuid));
+ e2fsck_clear_recover(ctx, force_fsck);
+ } else if (!(ctx->options & E2F_OPT_READONLY)) {
+ ext2fs_set_feature_journal(sb);
+ ctx->fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ ext2fs_mark_super_dirty(ctx->fs);
+ }
+ }
+
+ if (ext2fs_has_feature_journal(sb) &&
+ !ext2fs_has_feature_journal_needs_recovery(sb) &&
+ journal->j_superblock->s_start != 0) {
+ /* Print status information */
+ fix_problem(ctx, PR_0_JOURNAL_RECOVERY_CLEAR, &pctx);
+ if (ctx->superblock)
+ problem = PR_0_JOURNAL_RUN_DEFAULT;
+ else
+ problem = PR_0_JOURNAL_RUN;
+ if (fix_problem(ctx, problem, &pctx)) {
+ ctx->options |= E2F_OPT_FORCE;
+ ext2fs_set_feature_journal_needs_recovery(sb);
+ ext2fs_mark_super_dirty(ctx->fs);
+ } else if (fix_problem(ctx,
+ PR_0_JOURNAL_RESET_JOURNAL, &pctx)) {
+ reset = 1;
+ sb->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(ctx->fs);
+ }
+ /*
+ * If the user answers no to the above question, we
+ * ignore the fact that journal apparently has data;
+ * accidentally replaying over valid data would be far
+ * worse than skipping a questionable recovery.
+ *
+ * XXX should we abort with a fatal error here? What
+ * will the ext3 kernel code do if a filesystem with
+ * !NEEDS_RECOVERY but with a non-zero
+ * journal->j_superblock->s_start is mounted?
+ */
+ }
+
+ /*
+ * If we don't need to do replay the journal, check to see if
+ * the journal's errno is set; if so, we need to mark the file
+ * system as being corrupt and clear the journal's s_errno.
+ */
+ if (!ext2fs_has_feature_journal_needs_recovery(sb) &&
+ journal->j_superblock->s_errno) {
+ ctx->fs->super->s_state |= EXT2_ERROR_FS;
+ ext2fs_mark_super_dirty(ctx->fs);
+ journal->j_superblock->s_errno = 0;
+ e2fsck_journal_sb_csum_set(journal, journal->j_superblock);
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+
+ e2fsck_journal_release(ctx, journal, reset, 0);
+ return retval;
+}
+
+static errcode_t recover_ext3_journal(e2fsck_t ctx)
+{
+ struct problem_context pctx;
+ journal_t *journal;
+ errcode_t retval;
+
+ clear_problem_context(&pctx);
+
+ retval = jbd2_journal_init_revoke_record_cache();
+ if (retval)
+ return retval;
+
+ retval = jbd2_journal_init_revoke_table_cache();
+ if (retval)
+ return retval;
+
+ retval = e2fsck_get_journal(ctx, &journal);
+ if (retval)
+ return retval;
+
+ retval = e2fsck_journal_load(journal);
+ if (retval)
+ goto errout;
+
+ retval = jbd2_journal_init_revoke(journal, 1024);
+ if (retval)
+ goto errout;
+
+ retval = -jbd2_journal_recover(journal);
+ if (retval)
+ goto errout;
+
+ if (journal->j_failed_commit) {
+ pctx.ino = journal->j_failed_commit;
+ fix_problem(ctx, PR_0_JNL_TXN_CORRUPT, &pctx);
+ journal->j_superblock->s_errno = -EINVAL;
+ mark_buffer_dirty(journal->j_sb_buffer);
+ }
+
+ journal->j_tail_sequence = journal->j_transaction_sequence;
+
+errout:
+ jbd2_journal_destroy_revoke(journal);
+ jbd2_journal_destroy_revoke_record_cache();
+ jbd2_journal_destroy_revoke_table_cache();
+ e2fsck_journal_release(ctx, journal, 1, 0);
+ return retval;
+}
+
+errcode_t e2fsck_run_ext3_journal(e2fsck_t ctx)
+{
+ io_manager io_ptr = ctx->fs->io->manager;
+ int blocksize = ctx->fs->blocksize;
+ errcode_t retval, recover_retval;
+ io_stats stats = 0;
+ unsigned long long kbytes_written = 0;
+
+ printf(_("%s: recovering journal\n"), ctx->device_name);
+ if (ctx->options & E2F_OPT_READONLY) {
+ printf(_("%s: won't do journal recovery while read-only\n"),
+ ctx->device_name);
+ return EXT2_ET_FILE_RO;
+ }
+
+ if (ctx->fs->flags & EXT2_FLAG_DIRTY)
+ ext2fs_flush(ctx->fs); /* Force out any modifications */
+
+ recover_retval = recover_ext3_journal(ctx);
+
+ /*
+ * Reload the filesystem context to get up-to-date data from disk
+ * because journal recovery will change the filesystem under us.
+ */
+ if (ctx->fs->super->s_kbytes_written &&
+ ctx->fs->io->manager->get_stats)
+ ctx->fs->io->manager->get_stats(ctx->fs->io, &stats);
+ if (stats && stats->bytes_written)
+ kbytes_written = stats->bytes_written >> 10;
+
+ ext2fs_mmp_stop(ctx->fs);
+ ext2fs_free(ctx->fs);
+ retval = ext2fs_open(ctx->filesystem_name, ctx->openfs_flags,
+ ctx->superblock, blocksize, io_ptr,
+ &ctx->fs);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while trying to re-open %s"),
+ ctx->device_name);
+ fatal_error(ctx, 0);
+ }
+ ctx->fs->priv_data = ctx;
+ ctx->fs->now = ctx->now;
+ ctx->fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+ ctx->fs->super->s_kbytes_written += kbytes_written;
+
+ /* Set the superblock flags */
+ e2fsck_clear_recover(ctx, recover_retval != 0);
+
+ /*
+ * Do one last sanity check, and propagate journal->s_errno to
+ * the EXT2_ERROR_FS flag in the fs superblock if needed.
+ */
+ retval = e2fsck_check_ext3_journal(ctx);
+ return retval ? retval : recover_retval;
+}
+
+/*
+ * This function will move the journal inode from a visible file in
+ * the filesystem directory hierarchy to the reserved inode if necessary.
+ */
+static const char * const journal_names[] = {
+ ".journal", "journal", ".journal.dat", "journal.dat", 0 };
+
+void e2fsck_move_ext3_journal(e2fsck_t ctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct problem_context pctx;
+ struct ext2_inode inode;
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino;
+ errcode_t retval;
+ const char * const * cpp;
+ dgrp_t group;
+ int mount_flags;
+
+ clear_problem_context(&pctx);
+
+ /*
+ * If the filesystem is opened read-only, or there is no
+ * journal, then do nothing.
+ */
+ if ((ctx->options & E2F_OPT_READONLY) ||
+ (sb->s_journal_inum == 0) ||
+ !ext2fs_has_feature_journal(sb))
+ return;
+
+ /*
+ * Read in the journal inode
+ */
+ if (ext2fs_read_inode(fs, sb->s_journal_inum, &inode) != 0)
+ return;
+
+ /*
+ * If it's necessary to backup the journal inode, do so.
+ */
+ if ((sb->s_jnl_backup_type == 0) ||
+ ((sb->s_jnl_backup_type == EXT3_JNL_BACKUP_BLOCKS) &&
+ memcmp(inode.i_block, sb->s_jnl_blocks, EXT2_N_BLOCKS*4))) {
+ if (fix_problem(ctx, PR_0_BACKUP_JNL, &pctx)) {
+ memcpy(sb->s_jnl_blocks, inode.i_block,
+ EXT2_N_BLOCKS*4);
+ sb->s_jnl_blocks[15] = inode.i_size_high;
+ sb->s_jnl_blocks[16] = inode.i_size;
+ sb->s_jnl_backup_type = EXT3_JNL_BACKUP_BLOCKS;
+ ext2fs_mark_super_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ }
+ }
+
+ /*
+ * If the journal is already the hidden inode, then do nothing
+ */
+ if (sb->s_journal_inum == EXT2_JOURNAL_INO)
+ return;
+
+ /*
+ * The journal inode had better have only one link and not be readable.
+ */
+ if (inode.i_links_count != 1)
+ return;
+
+ /*
+ * If the filesystem is mounted, or we can't tell whether
+ * or not it's mounted, do nothing.
+ */
+ retval = ext2fs_check_if_mounted(ctx->filesystem_name, &mount_flags);
+ if (retval || (mount_flags & EXT2_MF_MOUNTED))
+ return;
+
+ /*
+ * If we can't find the name of the journal inode, then do
+ * nothing.
+ */
+ for (cpp = journal_names; *cpp; cpp++) {
+ retval = ext2fs_lookup(fs, EXT2_ROOT_INO, *cpp,
+ strlen(*cpp), 0, &ino);
+ if ((retval == 0) && (ino == sb->s_journal_inum))
+ break;
+ }
+ if (*cpp == 0)
+ return;
+
+ /* We need the inode bitmap to be loaded */
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval)
+ return;
+
+ pctx.str = *cpp;
+ if (!fix_problem(ctx, PR_0_MOVE_JOURNAL, &pctx))
+ return;
+
+ /*
+ * OK, we've done all the checks, let's actually move the
+ * journal inode. Errors at this point mean we need to force
+ * an ext2 filesystem check.
+ */
+ if ((retval = ext2fs_unlink(fs, EXT2_ROOT_INO, *cpp, ino, 0)) != 0)
+ goto err_out;
+ if ((retval = ext2fs_write_inode(fs, EXT2_JOURNAL_INO, &inode)) != 0)
+ goto err_out;
+ sb->s_journal_inum = EXT2_JOURNAL_INO;
+ ext2fs_mark_super_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ inode.i_links_count = 0;
+ inode.i_dtime = ctx->now;
+ if ((retval = ext2fs_write_inode(fs, ino, &inode)) != 0)
+ goto err_out;
+
+ group = ext2fs_group_of_ino(fs, ino);
+ ext2fs_unmark_inode_bitmap2(fs->inode_map, ino);
+ ext2fs_mark_ib_dirty(fs);
+ ext2fs_bg_free_inodes_count_set(fs, group, ext2fs_bg_free_inodes_count(fs, group) + 1);
+ ext2fs_group_desc_csum_set(fs, group);
+ fs->super->s_free_inodes_count++;
+ return;
+
+err_out:
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_0_ERR_MOVE_JOURNAL, &pctx);
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(fs);
+ return;
+}
+
+/*
+ * This function makes sure the superblock hint for the external
+ * journal is correct.
+ */
+int e2fsck_fix_ext3_journal_hint(e2fsck_t ctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct problem_context pctx;
+ char uuid[37], *journal_name;
+ struct stat st;
+
+ if (!ext2fs_has_feature_journal(sb) ||
+ uuid_is_null(sb->s_journal_uuid))
+ return 0;
+
+ uuid_unparse(sb->s_journal_uuid, uuid);
+ journal_name = blkid_get_devname(ctx->blkid, "UUID", uuid);
+ if (!journal_name)
+ return 0;
+
+ if (stat(journal_name, &st) < 0) {
+ free(journal_name);
+ return 0;
+ }
+
+ if (st.st_rdev != sb->s_journal_dev) {
+ clear_problem_context(&pctx);
+ pctx.num = st.st_rdev;
+ if (fix_problem(ctx, PR_0_EXTERNAL_JOURNAL_HINT, &pctx)) {
+ sb->s_journal_dev = st.st_rdev;
+ ext2fs_mark_super_dirty(ctx->fs);
+ }
+ }
+
+ free(journal_name);
+ return 0;
+}
diff --git a/e2fsck/logfile.c b/e2fsck/logfile.c
new file mode 100644
index 0000000..9d79eed
--- /dev/null
+++ b/e2fsck/logfile.c
@@ -0,0 +1,411 @@
+/*
+ * logfile.c --- set up e2fsck log files
+ *
+ * Copyright 1996, 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "e2fsck.h"
+#include <pwd.h>
+
+extern e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
+
+struct string {
+ char *s;
+ int len;
+ int end;
+};
+
+static void alloc_string(struct string *s, int len)
+{
+ s->s = malloc(len);
+/* e2fsck_allocate_memory(ctx, len, "logfile name"); */
+ s->len = s->s ? len : 0;
+ s->end = 0;
+}
+
+static void append_string(struct string *s, const char *a, int len)
+{
+ int needlen;
+
+ if (!len)
+ len = strlen(a);
+
+ needlen = s->end + len + 1;
+ if (needlen > s->len) {
+ char *n;
+
+ if (s->len * 2 > needlen)
+ needlen = s->len * 2;
+ n = realloc(s->s, needlen);
+
+ if (n) {
+ s->s = n;
+ s->len = needlen;
+ } else {
+ /* Don't append if we ran out of memory */
+ return;
+ }
+ }
+ memcpy(s->s + s->end, a, len);
+ s->end += len;
+ s->s[s->end] = 0;
+}
+
+#define FLAG_UTC 0x0001
+
+static void expand_percent_expression(e2fsck_t ctx, char ch,
+ struct string *s, int *flags)
+{
+ struct tm *tm = NULL, tm_struct;
+ struct passwd *pw = NULL, pw_struct;
+ char *cp;
+ char buf[256];
+
+ if ((ch == 'D') || (ch == 'd') || (ch == 'm') || (ch == 'y') ||
+ (ch == 'Y') ||
+ (ch == 'T') || (ch == 'H') || (ch == 'M') || (ch == 'S')) {
+ tzset();
+ tm = (*flags & FLAG_UTC) ? gmtime_r(&ctx->now, &tm_struct) :
+ localtime_r(&ctx->now, &tm_struct);
+ }
+
+ switch (ch) {
+ case '%':
+ append_string(s, "%", 1);
+ return;
+ case 'd':
+ sprintf(buf, "%02d", tm->tm_mday);
+ break;
+ case 'D':
+ sprintf(buf, "%d%02d%02d", tm->tm_year + 1900, tm->tm_mon + 1,
+ tm->tm_mday);
+ break;
+ case 'h':
+#ifdef TEST_PROGRAM
+ strcpy(buf, "server");
+#else
+ buf[0] = 0;
+ gethostname(buf, sizeof(buf));
+ buf[sizeof(buf)-1] = 0;
+#endif
+ break;
+ case 'H':
+ sprintf(buf, "%02d", tm->tm_hour);
+ break;
+ case 'm':
+ sprintf(buf, "%02d", tm->tm_mon + 1);
+ break;
+ case 'M':
+ sprintf(buf, "%02d", tm->tm_min);
+ break;
+ case 'N': /* block device name */
+ cp = strrchr(ctx->filesystem_name, '/');
+ if (cp)
+ cp++;
+ else
+ cp = ctx->filesystem_name;
+ append_string(s, cp, 0);
+ return;
+ case 'p':
+ sprintf(buf, "%lu", (unsigned long) getpid());
+ break;
+ case 's':
+ sprintf(buf, "%lu", (unsigned long) ctx->now);
+ break;
+ case 'S':
+ sprintf(buf, "%02d", tm->tm_sec);
+ break;
+ case 'T':
+ sprintf(buf, "%02d%02d%02d", tm->tm_hour, tm->tm_min,
+ tm->tm_sec);
+ break;
+ case 'u':
+#ifdef TEST_PROGRAM
+ strcpy(buf, "tytso");
+ break;
+#else
+#ifdef HAVE_GETPWUID_R
+ getpwuid_r(getuid(), &pw_struct, buf, sizeof(buf), &pw);
+#else
+ pw = getpwuid(getuid());
+#endif
+ if (pw)
+ append_string(s, pw->pw_name, 0);
+ return;
+#endif
+ case 'U':
+ *flags |= FLAG_UTC;
+ return;
+ case 'y':
+ sprintf(buf, "%02d", tm->tm_year % 100);
+ break;
+ case 'Y':
+ sprintf(buf, "%d", tm->tm_year + 1900);
+ break;
+ default:
+ sprintf(buf, "%%%c", ch);
+ break;
+ }
+ append_string(s, buf, 0);
+}
+
+static void expand_logfn(e2fsck_t ctx, const char *log_fn, struct string *s)
+{
+ const char *cp;
+ int i;
+ int flags = 0;
+
+ alloc_string(s, 100);
+ for (cp = log_fn; *cp; cp++) {
+ if (cp[0] == '%') {
+ cp++;
+ expand_percent_expression(ctx, *cp, s, &flags);
+ continue;
+ }
+ for (i = 0; cp[i]; i++)
+ if (cp[i] == '%')
+ break;
+ append_string(s, cp, i);
+ cp += i-1;
+ }
+}
+
+static int outbufsize;
+static void *outbuf;
+
+static int do_read(int fd)
+{
+ int c;
+ char *n;
+ char buffer[4096];
+
+ c = read(fd, buffer, sizeof(buffer)-1);
+ if (c <= 0)
+ return c;
+
+ n = realloc(outbuf, outbufsize + c);
+ if (n) {
+ outbuf = n;
+ memcpy(((char *)outbuf)+outbufsize, buffer, c);
+ outbufsize += c;
+ }
+ return c;
+}
+
+/*
+ * Fork a child process to save the output of the logfile until the
+ * appropriate file system is mounted read/write.
+ */
+static FILE *save_output(const char *s0, const char *s1, const char *s2)
+{
+ int c, fd, fds[2];
+ char *cp;
+ pid_t pid;
+ FILE *ret;
+
+ if (s0 && *s0 == 0)
+ s0 = 0;
+ if (s1 && *s1 == 0)
+ s1 = 0;
+ if (s2 && *s2 == 0)
+ s2 = 0;
+
+ /* At least one potential output file name is valid */
+ if (!s0 && !s1 && !s2)
+ return NULL;
+ if (pipe(fds) < 0) {
+ perror("pipe");
+ exit(1);
+ }
+
+ pid = fork();
+ if (pid < 0) {
+ perror("fork");
+ exit(1);
+ }
+
+ if (pid == 0) {
+ if (e2fsck_global_ctx && e2fsck_global_ctx->progress_fd)
+ close(e2fsck_global_ctx->progress_fd);
+ if (daemon(0, 0) < 0) {
+ perror("daemon");
+ exit(1);
+ }
+ /*
+ * Grab the output from our parent
+ */
+ close(fds[1]);
+ while (do_read(fds[0]) > 0)
+ ;
+ close(fds[0]);
+
+ /* OK, now let's try to open the output file */
+ fd = -1;
+ while (1) {
+ if (fd < 0 && s0)
+ fd = open(s0, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ if (fd < 0 && s1)
+ fd = open(s1, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ if (fd < 0 && s2)
+ fd = open(s2, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ if (fd >= 0)
+ break;
+ sleep(1);
+ }
+
+ cp = outbuf;
+ while (outbufsize > 0) {
+ c = write(fd, cp, outbufsize);
+ if (c < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ break;
+ }
+ outbufsize -= c;
+ cp += c;
+ }
+ exit(0);
+ }
+
+ close(fds[0]);
+ ret = fdopen(fds[1], "w");
+ if (!ret)
+ close(fds[1]);
+ return ret;
+}
+
+#ifndef TEST_PROGRAM
+static FILE *set_up_log_file(e2fsck_t ctx, const char *key, const char *fn)
+{
+ FILE *f = NULL;
+ struct string s, s1, s2;
+ char *s0 = 0, *log_dir = 0, *log_fn = 0;
+ int log_dir_wait = 0;
+
+ s.s = s1.s = s2.s = 0;
+
+ profile_get_boolean(ctx->profile, "options", "log_dir_wait", 0, 0,
+ &log_dir_wait);
+ if (fn)
+ log_fn = string_copy(ctx, fn, 0);
+ else
+ profile_get_string(ctx->profile, "options", key,
+ 0, 0, &log_fn);
+ profile_get_string(ctx->profile, "options", "log_dir", 0, 0, &log_dir);
+
+ if (!log_fn || !log_fn[0])
+ goto out;
+
+ expand_logfn(ctx, log_fn, &s);
+ if ((log_fn[0] == '/') || !log_dir || !log_dir[0])
+ s0 = s.s;
+
+ if (log_dir && log_dir[0]) {
+ alloc_string(&s1, strlen(log_dir) + strlen(s.s) + 2);
+ append_string(&s1, log_dir, 0);
+ append_string(&s1, "/", 1);
+ append_string(&s1, s.s, 0);
+ }
+
+ free(log_dir);
+ profile_get_string(ctx->profile, "options", "log_dir_fallback", 0, 0,
+ &log_dir);
+ if (log_dir && log_dir[0]) {
+ alloc_string(&s2, strlen(log_dir) + strlen(s.s) + 2);
+ append_string(&s2, log_dir, 0);
+ append_string(&s2, "/", 1);
+ append_string(&s2, s.s, 0);
+ printf("%s\n", s2.s);
+ }
+
+ if (s0)
+ f = fopen(s0, "w");
+ if (!f && s1.s)
+ f = fopen(s1.s, "w");
+ if (!f && s2.s)
+ f = fopen(s2.s, "w");
+ if (!f && log_dir_wait)
+ f = save_output(s0, s1.s, s2.s);
+
+out:
+ free(s.s);
+ free(s1.s);
+ free(s2.s);
+ free(log_fn);
+ free(log_dir);
+ return f;
+}
+
+void set_up_logging(e2fsck_t ctx)
+{
+ ctx->logf = set_up_log_file(ctx, "log_filename", ctx->log_fn);
+ ctx->problem_logf = set_up_log_file(ctx, "problem_log_filename",
+ ctx->problem_log_fn);
+}
+#else
+void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned long size,
+ const char *description)
+{
+ void *ret;
+ char buf[256];
+
+ ret = malloc(size);
+ if (!ret) {
+ sprintf(buf, "Can't allocate %s\n", description);
+ exit(1);
+ }
+ memset(ret, 0, size);
+ return ret;
+}
+
+errcode_t e2fsck_allocate_context(e2fsck_t *ret)
+{
+ e2fsck_t context;
+ errcode_t retval;
+ char *time_env;
+
+ context = malloc(sizeof(struct e2fsck_struct));
+ if (!context)
+ return ENOMEM;
+
+ memset(context, 0, sizeof(struct e2fsck_struct));
+
+ context->now = 1332006474;
+
+ context->filesystem_name = "/dev/sda3";
+ context->device_name = "fslabel";
+
+ *ret = context;
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ e2fsck_t ctx;
+ struct string s;
+
+ putenv("TZ=EST+5:00");
+ e2fsck_allocate_context(&ctx);
+ expand_logfn(ctx, "e2fsck-%N.%h.%u.%D-%T", &s);
+ printf("%s\n", s.s);
+ free(s.s);
+ expand_logfn(ctx, "e2fsck-%N.%h.%u.%Y%m%d-%H%M%S", &s);
+ printf("%s\n", s.s);
+ free(s.s);
+
+ return 0;
+}
+#endif
diff --git a/e2fsck/message.c b/e2fsck/message.c
new file mode 100644
index 0000000..ba38038
--- /dev/null
+++ b/e2fsck/message.c
@@ -0,0 +1,556 @@
+/*
+ * message.c --- print e2fsck messages (with compression)
+ *
+ * Copyright 1996, 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * print_e2fsck_message() prints a message to the user, using
+ * compression techniques and expansions of abbreviations.
+ *
+ * The following % expansions are supported:
+ *
+ * %b <blk> block number
+ * %B <blkcount> interpret blkcount as blkcount
+ * %c <blk2> block number
+ * %Di <dirent>->ino inode number
+ * %Dn <dirent>->name string
+ * %Dr <dirent>->rec_len
+ * %Dl <dirent>->name_len
+ * %Dt <dirent>->filetype
+ * %d <dir> inode number
+ * %g <group> integer
+ * %i <ino> inode number
+ * %Is <inode> -> i_size
+ * %IS <inode> -> i_extra_isize
+ * %Ib <inode> -> i_blocks
+ * %Il <inode> -> i_links_count
+ * %Im <inode> -> i_mode
+ * %IM <inode> -> i_mtime
+ * %IF <inode> -> i_faddr
+ * %If <inode> -> i_file_acl
+ * %Id <inode> -> i_size_high
+ * %Iu <inode> -> i_uid
+ * %Ig <inode> -> i_gid
+ * %It <inode type>
+ * %j <ino2> inode number
+ * %m <com_err error message>
+ * %N <num>
+ * %p ext2fs_get_pathname of directory <ino>
+ * %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+ * the containing directory. (If dirent is NULL
+ * then return the pathname of directory <ino2>)
+ * %q ext2fs_get_pathname of directory <dir>
+ * %Q ext2fs_get_pathname of directory <ino> with <dir> as
+ * the containing directory.
+ * %r <blkcount> interpret blkcount as refcount
+ * %s <str> miscellaneous string
+ * %t time (in <num>)
+ * %T current time
+ * %U quota type (in <num>)
+ * %S backup superblock
+ * %X <num> hexadecimal format
+ *
+ * The following '@' expansions are supported:
+ *
+ * @a extended attribute
+ * @A error allocating
+ * @b block
+ * @B bitmap
+ * @c compress
+ * @C conflicts with some other fs block
+ * @D deleted
+ * @d directory
+ * @e entry
+ * @E Entry '%Dn' in %p (%i)
+ * @f filesystem
+ * @F for @i %i (%Q) is
+ * @g group
+ * @h HTREE directory inode
+ * @i inode
+ * @I illegal
+ * @j journal
+ * @l lost+found
+ * @L is a link
+ * @m multiply-claimed
+ * @n invalid
+ * @o orphaned
+ * @p problem in
+ * @q quota
+ * @r root inode
+ * @s should be
+ * @S superblock
+ * @u unattached
+ * @v device
+ * @x extent
+ * @z zero-length
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <termios.h>
+#include "support/quotaio.h"
+
+#include "e2fsck.h"
+#include "problem.h"
+
+#ifdef __GNUC__
+#define _INLINE_ __inline__
+#else
+#define _INLINE_
+#endif
+
+/*
+ * This structure defines the abbreviations used by the text strings
+ * below. The first character in the string is the index letter. An
+ * abbreviation of the form '@<i>' is expanded by looking up the index
+ * letter <i> in the table below.
+ */
+static const char *abbrevs[] = {
+ N_("aextended attribute"),
+ N_("Aerror allocating"),
+ N_("bblock"),
+ N_("Bbitmap"),
+ N_("ccompress"),
+ N_("Cconflicts with some other fs @b"),
+ N_("ddirectory"),
+ N_("Ddeleted"),
+ N_("eentry"),
+ N_("E@e '%Dn' in %p (%i)"),
+ N_("ffilesystem"),
+ N_("Ffor @i %i (%Q) is"),
+ N_("ggroup"),
+ N_("hHTREE @d @i"),
+ N_("iinode"),
+ N_("Iillegal"),
+ N_("jjournal"),
+ N_("llost+found"),
+ N_("Lis a link"),
+ N_("mmultiply-claimed"),
+ N_("ninvalid"),
+ N_("oorphaned"),
+ N_("pproblem in"),
+ N_("qquota"),
+ N_("rroot @i"),
+ N_("sshould be"),
+ N_("Ssuper@b"),
+ N_("uunattached"),
+ N_("vdevice"),
+ N_("xextent"),
+ N_("zzero-length"),
+ "@@",
+ 0
+ };
+
+/*
+ * Give more user friendly names to the "special" inodes.
+ */
+#define num_special_inodes 11
+static const char *special_inode_name[] =
+{
+ N_("<The NULL inode>"), /* 0 */
+ N_("<The bad blocks inode>"), /* 1 */
+ "/", /* 2 */
+ N_("<The user quota inode>"), /* 3 */
+ N_("<The group quota inode>"), /* 4 */
+ N_("<The boot loader inode>"), /* 5 */
+ N_("<The undelete directory inode>"), /* 6 */
+ N_("<The group descriptor inode>"), /* 7 */
+ N_("<The journal inode>"), /* 8 */
+ N_("<Reserved inode 9>"), /* 9 */
+ N_("<Reserved inode 10>"), /* 10 */
+};
+
+/*
+ * This function does "safe" printing. It will convert non-printable
+ * ASCII characters using '^' and M- notation.
+ */
+static void safe_print(FILE *f, const char *cp, int len)
+{
+ unsigned char ch;
+
+ if (len < 0)
+ len = strlen(cp);
+
+ while (len--) {
+ ch = *cp++;
+ if (ch > 128) {
+ fputs("M-", f);
+ ch -= 128;
+ }
+ if ((ch < 32) || (ch == 0x7f)) {
+ fputc('^', f);
+ ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
+ }
+ fputc(ch, f);
+ }
+}
+
+
+/*
+ * This function prints a pathname, using the ext2fs_get_pathname
+ * function
+ */
+static void print_pathname(FILE *f, ext2_filsys fs, ext2_ino_t dir,
+ ext2_ino_t ino)
+{
+ errcode_t retval = 0;
+ char *path;
+
+ if (!dir && (ino < num_special_inodes)) {
+ fputs(_(special_inode_name[ino]), f);
+ return;
+ }
+
+ if (fs)
+ retval = ext2fs_get_pathname(fs, dir, ino, &path);
+ if (!fs || retval)
+ fputs("???", f);
+ else {
+ safe_print(f, path, -1);
+ ext2fs_free_mem(&path);
+ }
+}
+
+static void print_time(FILE *f, time_t t)
+{
+ const char * time_str;
+ static int do_gmt = -1;
+
+#ifdef __dietlibc__
+ /* The diet libc doesn't respect the TZ environment variable */
+ if (do_gmt == -1) {
+ time_str = getenv("TZ");
+ if (!time_str)
+ time_str = "";
+ do_gmt = !strcmp(time_str, "GMT") ||
+ !strcmp(time_str, "GMT0");
+ }
+#endif
+ time_str = asctime((do_gmt > 0) ? gmtime(&t) : localtime(&t));
+ fprintf(f, "%.24s", time_str);
+}
+
+/*
+ * This function handles the '@' expansion. We allow recursive
+ * expansion; an @ expression can contain further '@' and '%'
+ * expressions.
+ */
+static _INLINE_ void expand_at_expression(FILE *f, e2fsck_t ctx, char ch,
+ struct problem_context *pctx,
+ int *first, int recurse)
+{
+ const char **cpp, *str;
+
+ /* Search for the abbreviation */
+ for (cpp = abbrevs; *cpp; cpp++) {
+ if (ch == *cpp[0])
+ break;
+ }
+ if (*cpp && recurse < 10) {
+ str = _(*cpp) + 1;
+ if (*first && islower(*str)) {
+ *first = 0;
+ fputc(toupper(*str++), f);
+ }
+ print_e2fsck_message(f, ctx, str, pctx, *first, recurse+1);
+ } else
+ fprintf(f, "@%c", ch);
+}
+
+/*
+ * This function expands '%IX' expressions
+ */
+static _INLINE_ void expand_inode_expression(FILE *f, ext2_filsys fs, char ch,
+ struct problem_context *ctx)
+{
+ struct ext2_inode *inode;
+ struct ext2_inode_large *large_inode;
+
+ if (!ctx || !ctx->inode)
+ goto no_inode;
+
+ inode = ctx->inode;
+ large_inode = (struct ext2_inode_large *) inode;
+
+ switch (ch) {
+ case 's':
+ fprintf(f, "%llu", (unsigned long long) EXT2_I_SIZE(inode));
+ break;
+ case 'S':
+ fprintf(f, "%u", large_inode->i_extra_isize);
+ break;
+ case 'b':
+ if (ext2fs_has_feature_huge_file(fs->super))
+ fprintf(f, "%llu", inode->i_blocks +
+ (((long long) inode->osd2.linux2.l_i_blocks_hi)
+ << 32));
+ else
+ fprintf(f, "%u", inode->i_blocks);
+ break;
+ case 'l':
+ fprintf(f, "%d", inode->i_links_count);
+ break;
+ case 'm':
+ fprintf(f, "0%o", inode->i_mode);
+ break;
+ case 'M':
+ print_time(f, inode->i_mtime);
+ break;
+ case 'F':
+ fprintf(f, "%u", inode->i_faddr);
+ break;
+ case 'f':
+ fprintf(f, "%llu",
+ (unsigned long long) ext2fs_file_acl_block(fs, inode));
+ break;
+ case 'd':
+ fprintf(f, "%u", (LINUX_S_ISDIR(inode->i_mode) ?
+ inode->i_size_high : 0));
+ break;
+ case 'u':
+ fprintf(f, "%d", inode_uid(*inode));
+ break;
+ case 'g':
+ fprintf(f, "%d", inode_gid(*inode));
+ break;
+ case 't':
+ if (LINUX_S_ISREG(inode->i_mode))
+ fputs(_("regular file"), f);
+ else if (LINUX_S_ISDIR(inode->i_mode))
+ fputs(_("directory"), f);
+ else if (LINUX_S_ISCHR(inode->i_mode))
+ fputs(_("character device"), f);
+ else if (LINUX_S_ISBLK(inode->i_mode))
+ fputs(_("block device"), f);
+ else if (LINUX_S_ISFIFO(inode->i_mode))
+ fputs(_("named pipe"), f);
+ else if (LINUX_S_ISLNK(inode->i_mode))
+ fputs(_("symbolic link"), f);
+ else if (LINUX_S_ISSOCK(inode->i_mode))
+ fputs(_("socket"), f);
+ else
+ fprintf(f, _("unknown file type with mode 0%o"),
+ inode->i_mode);
+ break;
+ default:
+ no_inode:
+ fprintf(f, "%%I%c", ch);
+ break;
+ }
+}
+
+/*
+ * This function expands '%dX' expressions
+ */
+static _INLINE_ void expand_dirent_expression(FILE *f, ext2_filsys fs, char ch,
+ struct problem_context *ctx)
+{
+ struct ext2_dir_entry *dirent;
+ unsigned int rec_len, len;
+
+ if (!ctx || !ctx->dirent)
+ goto no_dirent;
+
+ dirent = ctx->dirent;
+
+ switch (ch) {
+ case 'i':
+ fprintf(f, "%u", dirent->inode);
+ break;
+ case 'n':
+ len = ext2fs_dirent_name_len(dirent);
+ if ((ext2fs_get_rec_len(fs, dirent, &rec_len) == 0) &&
+ (len > rec_len))
+ len = rec_len;
+ safe_print(f, dirent->name, len);
+ break;
+ case 'r':
+ (void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+ fprintf(f, "%u", rec_len);
+ break;
+ case 'l':
+ fprintf(f, "%u", ext2fs_dirent_name_len(dirent));
+ break;
+ case 't':
+ fprintf(f, "%u", ext2fs_dirent_file_type(dirent));
+ break;
+ default:
+ no_dirent:
+ fprintf(f, "%%D%c", ch);
+ break;
+ }
+}
+
+static _INLINE_ void expand_percent_expression(FILE *f, ext2_filsys fs,
+ char ch, int width, int *first,
+ struct problem_context *ctx)
+{
+ e2fsck_t e2fsck_ctx = fs ? (e2fsck_t) fs->priv_data : NULL;
+ const char *m;
+
+ if (!ctx)
+ goto no_context;
+
+ switch (ch) {
+ case '%':
+ fputc('%', f);
+ break;
+ case 'b':
+ fprintf(f, "%*llu", width, (unsigned long long) ctx->blk);
+ break;
+ case 'B':
+ if (ctx->blkcount == BLOCK_COUNT_IND)
+ m = _("indirect block");
+ else if (ctx->blkcount == BLOCK_COUNT_DIND)
+ m = _("double indirect block");
+ else if (ctx->blkcount == BLOCK_COUNT_TIND)
+ m = _("triple indirect block");
+ else if (ctx->blkcount == BLOCK_COUNT_TRANSLATOR)
+ m = _("translator block");
+ else
+ m = _("block #");
+ if (*first && islower(m[0]))
+ fputc(toupper(*m++), f);
+ fputs(m, f);
+ if (ctx->blkcount >= 0)
+ fprintf(f, "%lld", (long long) ctx->blkcount);
+ break;
+ case 'c':
+ fprintf(f, "%*llu", width, (unsigned long long) ctx->blk2);
+ break;
+ case 'd':
+ fprintf(f, "%*u", width, ctx->dir);
+ break;
+ case 'g':
+ fprintf(f, "%*u", width, ctx->group);
+ break;
+ case 'i':
+ fprintf(f, "%*u", width, ctx->ino);
+ break;
+ case 'j':
+ fprintf(f, "%*u", width, ctx->ino2);
+ break;
+ case 'm':
+ fprintf(f, "%*s", width, error_message(ctx->errcode));
+ break;
+ case 'N':
+ fprintf(f, "%*llu", width, (long long)ctx->num);
+ break;
+ case 'n':
+ fprintf(f, "%*llu", width, (long long)ctx->num2);
+ break;
+ case 'p':
+ print_pathname(f, fs, ctx->ino, 0);
+ break;
+ case 'P':
+ print_pathname(f, fs, ctx->ino2,
+ ctx->dirent ? ctx->dirent->inode : 0);
+ break;
+ case 'q':
+ print_pathname(f, fs, ctx->dir, 0);
+ break;
+ case 'Q':
+ print_pathname(f, fs, ctx->dir, ctx->ino);
+ break;
+ case 'r':
+ fprintf(f, "%*lld", width, (long long) ctx->blkcount);
+ break;
+ case 'S':
+ fprintf(f, "%llu",
+ (unsigned long long) get_backup_sb(NULL, fs,
+ NULL, NULL));
+ break;
+ case 's':
+ fprintf(f, "%*s", width, ctx->str ? ctx->str : "NULL");
+ break;
+ case 't':
+ print_time(f, (time_t) ctx->num);
+ break;
+ case 'T':
+ print_time(f, e2fsck_ctx ? e2fsck_ctx->now : time(0));
+ break;
+ case 'U':
+ switch (ctx->num) {
+ case USRQUOTA:
+ m = _("user");
+ break;
+ case GRPQUOTA:
+ m = _("group");
+ break;
+ case PRJQUOTA:
+ m = _("project");
+ break;
+ default:
+ m = _("unknown quota type");
+ break;
+ }
+ if (*first && islower(m[0]))
+ fputc(toupper(*m++), f);
+ fputs(m, f);
+ if (ctx->num > PRJQUOTA)
+ fprintf(f, " %d", (int) ctx->num);
+ break;
+ case 'x':
+ fprintf(f, "0x%0*x", width, ctx->csum1);
+ break;
+ case 'X':
+ fprintf(f, "0x%0*llx", width, (long long)ctx->num);
+ break;
+ case 'y':
+ fprintf(f, "0x%0*x", width, ctx->csum2);
+ break;
+ default:
+ no_context:
+ fprintf(f, "%%%c", ch);
+ break;
+ }
+}
+
+void print_e2fsck_message(FILE *f, e2fsck_t ctx, const char *msg,
+ struct problem_context *pctx, int first,
+ int recurse)
+{
+ ext2_filsys fs = ctx->fs;
+ const char * cp;
+ int i, width;
+
+ e2fsck_clear_progbar(ctx);
+ for (cp = msg; *cp; cp++) {
+ if (cp[0] == '@') {
+ cp++;
+ expand_at_expression(f, ctx, *cp, pctx, &first,
+ recurse);
+ } else if (cp[0] == '%') {
+ cp++;
+ width = 0;
+ while (isdigit(cp[0])) {
+ width = (width * 10) + cp[0] - '0';
+ cp++;
+ }
+ if (cp[0] == 'I') {
+ cp++;
+ expand_inode_expression(f, fs, *cp, pctx);
+ } else if (cp[0] == 'D') {
+ cp++;
+ expand_dirent_expression(f, fs, *cp, pctx);
+ } else {
+ expand_percent_expression(f, fs, *cp, width,
+ &first, pctx);
+ }
+ } else {
+ for (i=0; cp[i]; i++)
+ if ((cp[i] == '@') || cp[i] == '%')
+ break;
+ fprintf(f, "%.*s", i, cp);
+ cp += i-1;
+ }
+ first = 0;
+ }
+}
diff --git a/e2fsck/mtrace.awk b/e2fsck/mtrace.awk
new file mode 100644
index 0000000..7e96b8a
--- /dev/null
+++ b/e2fsck/mtrace.awk
@@ -0,0 +1,37 @@
+#!/usr/bin/awk -f
+#
+# Awk program to analyze mtrace.c output.
+#
+$1 == "+" { if (allocated[$2] != "")
+ print "+", $2, "Alloc", NR, "duplicate:", allocated[$2];
+ else
+ allocated[$2] = $3;
+ }
+$1 == "-" { if (allocated[$2] != "") {
+ allocated[$2] = "";
+ if (allocated[$2] != "")
+ print "DELETE FAILED", $2, allocated[$2];
+ } else
+ print "-", $2, "Free", NR, "was never alloc'd";
+ }
+$1 == "<" { if (allocated[$2] != "")
+ allocated[$2] = "";
+ else
+ print "-", $2, "Realloc", NR, "was never alloc'd";
+ }
+$1 == ">" { if (allocated[$2] != "")
+ print "+", $2, "Realloc", NR, "duplicate:", allocated[$2];
+ else
+ allocated[$2] = $3;
+ }
+
+# Ignore "= Start"
+$1 == "=" { }
+# Ignore failed realloc attempts for now
+$1 == "!" { }
+
+
+END { for (x in allocated)
+ if (allocated[x] != "")
+ print "+", x, allocated[x];
+ }
diff --git a/e2fsck/mtrace.c b/e2fsck/mtrace.c
new file mode 100644
index 0000000..2b7b34a
--- /dev/null
+++ b/e2fsck/mtrace.c
@@ -0,0 +1,160 @@
+/* More debugging hooks for `malloc'.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ Written April 2, 1991 by John Gilmore of Cygnus Support.
+ Based on mcheck.c by Mike Haertel.
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA.
+
+ The author may be reached (Email) at the address mike@ai.mit.edu,
+ or (US mail) as Mike Haertel c/o Free Software Foundation. */
+
+#include "config.h"
+
+#ifndef _MALLOC_INTERNAL
+#define _MALLOC_INTERNAL
+#include "./mtrace.h"
+#endif
+
+#include <stdio.h>
+
+#ifndef __GNU_LIBRARY__
+extern char *getenv ();
+#else
+#include <stdlib.h>
+#endif
+
+static FILE *mallstream;
+static char mallenv[]= "MALLOC_TRACE";
+static char mallbuf[BUFSIZ]; /* Buffer for the output. */
+
+/* Address to breakpoint on accesses to... */
+__ptr_t mallwatch;
+
+/* Old hook values. */
+static void (*tr_old_free_hook) __P ((__ptr_t ptr));
+static __ptr_t (*tr_old_malloc_hook) __P ((size_t size));
+static __ptr_t (*tr_old_realloc_hook) __P ((__ptr_t ptr, size_t size));
+
+/*
+ * Added by TYT, 10/10/93 --- so that we can print
+ */
+FILE *malloc_get_mallstream()
+{
+ return mallstream;
+}
+
+/* This function is called when the block being alloc'd, realloc'd, or
+ freed has an address matching the variable "mallwatch". In a debugger,
+ set "mallwatch" to the address of interest, then put a breakpoint on
+ tr_break. */
+
+void tr_break __P ((void));
+void
+tr_break ()
+{
+}
+
+static void tr_freehook __P ((__ptr_t));
+static void
+tr_freehook (ptr)
+ __ptr_t ptr;
+{
+ fprintf (mallstream, "- %p\n", ptr); /* Be sure to print it first. */
+ if (ptr == mallwatch)
+ tr_break ();
+ __free_hook = tr_old_free_hook;
+ free (ptr);
+ __free_hook = tr_freehook;
+}
+
+static __ptr_t tr_mallochook __P ((size_t));
+static __ptr_t
+tr_mallochook (size)
+ size_t size;
+{
+ __ptr_t hdr;
+
+ __malloc_hook = tr_old_malloc_hook;
+ hdr = (__ptr_t) malloc (size);
+ __malloc_hook = tr_mallochook;
+
+ /* We could be printing a NULL here; that's OK. */
+ fprintf (mallstream, "+ %p %d\n", hdr, size);
+
+ if (hdr == mallwatch)
+ tr_break ();
+
+ return hdr;
+}
+
+static __ptr_t tr_reallochook __P ((__ptr_t, size_t));
+static __ptr_t
+tr_reallochook (ptr, size)
+ __ptr_t ptr;
+ size_t size;
+{
+ __ptr_t hdr;
+
+ if (ptr == mallwatch)
+ tr_break ();
+
+ __free_hook = tr_old_free_hook;
+ __malloc_hook = tr_old_malloc_hook;
+ __realloc_hook = tr_old_realloc_hook;
+ hdr = (__ptr_t) realloc (ptr, size);
+ __free_hook = tr_freehook;
+ __malloc_hook = tr_mallochook;
+ __realloc_hook = tr_reallochook;
+ if (hdr == NULL)
+ /* Failed realloc. */
+ fprintf (mallstream, "! %p %d\n", ptr, size);
+ else
+ fprintf (mallstream, "< %p\n> %p %d\n", ptr, hdr, size);
+
+ if (hdr == mallwatch)
+ tr_break ();
+
+ return hdr;
+}
+
+/* We enable tracing if either the environment variable MALLOC_TRACE
+ is set, or if the variable mallwatch has been patched to an address
+ that the debugging user wants us to stop on. When patching mallwatch,
+ don't forget to set a breakpoint on tr_break! */
+
+void
+mtrace ()
+{
+ char *mallfile;
+
+ mallfile = getenv (mallenv);
+ if (mallfile != NULL || mallwatch != NULL)
+ {
+ mallstream = fopen (mallfile != NULL ? mallfile : "/dev/null", "w");
+ if (mallstream != NULL)
+ {
+ /* Be sure it doesn't malloc its buffer! */
+ setbuf (mallstream, mallbuf);
+ fprintf (mallstream, "= Start\n");
+ tr_old_free_hook = __free_hook;
+ __free_hook = tr_freehook;
+ tr_old_malloc_hook = __malloc_hook;
+ __malloc_hook = tr_mallochook;
+ tr_old_realloc_hook = __realloc_hook;
+ __realloc_hook = tr_reallochook;
+ }
+ }
+}
diff --git a/e2fsck/mtrace.h b/e2fsck/mtrace.h
new file mode 100644
index 0000000..2ed20eb
--- /dev/null
+++ b/e2fsck/mtrace.h
@@ -0,0 +1,231 @@
+/* Declarations for `malloc' and friends.
+ Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+ Written May 1989 by Mike Haertel.
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA.
+
+ The author may be reached (Email) at the address mike@ai.mit.edu,
+ or (US mail) as Mike Haertel c/o Free Software Foundation. */
+
+#ifndef _MTRACE_H
+
+#define _MTRACE_H 1
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
+#undef __P
+#define __P(args) args
+#undef __ptr_t
+#define __ptr_t void *
+#else /* Not C++ or ANSI C. */
+#undef __P
+#define __P(args) ()
+#undef const
+#define const
+#undef __ptr_t
+#define __ptr_t char *
+#endif /* C++ or ANSI C. */
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifdef __STDC__
+#include <stddef.h>
+#else
+#undef size_t
+#define size_t unsigned int
+#undef ptrdiff_t
+#define ptrdiff_t int
+#endif
+
+
+/* Allocate SIZE bytes of memory. */
+extern __ptr_t malloc __P ((size_t __size));
+/* Re-allocate the previously allocated block
+ in __ptr_t, making the new block SIZE bytes long. */
+extern __ptr_t realloc __P ((__ptr_t __ptr, size_t __size));
+/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
+extern __ptr_t calloc __P ((size_t __nmemb, size_t __size));
+/* Free a block allocated by `malloc', `realloc' or `calloc'. */
+extern void free __P ((__ptr_t __ptr));
+
+/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
+extern __ptr_t memalign __P ((size_t __alignment, size_t __size));
+
+/* Allocate SIZE bytes on a page boundary. */
+extern __ptr_t valloc __P ((size_t __size));
+
+
+#ifdef _MALLOC_INTERNAL
+
+#include <stdio.h> /* Harmless, gets __GNU_LIBRARY__ defined. */
+
+#if defined(__GNU_LIBRARY__) || defined(STDC_HEADERS) || defined(USG)
+#include <string.h>
+#else
+#ifndef memset
+#define memset(s, zero, n) bzero ((s), (n))
+#endif
+#ifndef memcpy
+#define memcpy(d, s, n) bcopy ((s), (d), (n))
+#endif
+#endif
+
+
+#if defined(__GNU_LIBRARY__) || defined(__STDC__)
+#include <limits.h>
+#else
+#define CHAR_BIT 8
+#endif
+
+/* The allocator divides the heap into blocks of fixed size; large
+ requests receive one or more whole blocks, and small requests
+ receive a fragment of a block. Fragment sizes are powers of two,
+ and all fragments of a block are the same size. When all the
+ fragments in a block have been freed, the block itself is freed. */
+#define INT_BIT (CHAR_BIT * sizeof(int))
+#define BLOCKLOG (INT_BIT > 16 ? 12 : 9)
+#define BLOCKSIZE (1 << BLOCKLOG)
+#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE)
+
+/* Determine the amount of memory spanned by the initial heap table
+ (not an absolute limit). */
+#define HEAP (INT_BIT > 16 ? 4194304 : 65536)
+
+/* Number of contiguous free blocks allowed to build up at the end of
+ memory before they will be returned to the system. */
+#define FINAL_FREE_BLOCKS 8
+
+/* Data structure giving per-block information. */
+typedef union
+ {
+ /* Heap information for a busy block. */
+ struct
+ {
+ /* Zero for a large block, or positive giving the
+ logarithm to the base two of the fragment size. */
+ int type;
+ union
+ {
+ struct
+ {
+ size_t nfree; /* Free fragments in a fragmented block. */
+ size_t first; /* First free fragment of the block. */
+ } frag;
+ /* Size (in blocks) of a large cluster. */
+ size_t size;
+ } info;
+ } busy;
+ /* Heap information for a free block
+ (that may be the first of a free cluster). */
+ struct
+ {
+ size_t size; /* Size (in blocks) of a free cluster. */
+ size_t next; /* Index of next free cluster. */
+ size_t prev; /* Index of previous free cluster. */
+ } free;
+ } malloc_info;
+
+/* Pointer to first block of the heap. */
+extern char *_heapbase;
+
+/* Table indexed by block number giving per-block information. */
+extern malloc_info *_heapinfo;
+
+/* Address to block number and vice versa. */
+#define BLOCK(A) (((char *) (A) - _heapbase) / BLOCKSIZE + 1)
+#define ADDRESS(B) ((__ptr_t) (((B) - 1) * BLOCKSIZE + _heapbase))
+
+/* Current search index for the heap table. */
+extern size_t _heapindex;
+
+/* Limit of valid info table indices. */
+extern size_t _heaplimit;
+
+/* Doubly linked lists of free fragments. */
+struct list
+ {
+ struct list *next;
+ struct list *prev;
+ };
+
+/* Free list headers for each fragment size. */
+extern struct list _fraghead[];
+
+/* List of blocks allocated with `memalign' (or `valloc'). */
+struct alignlist
+ {
+ struct alignlist *next;
+ __ptr_t aligned; /* The address that memaligned returned. */
+ __ptr_t exact; /* The address that malloc returned. */
+ };
+extern struct alignlist *_aligned_blocks;
+
+/* Instrumentation. */
+extern size_t _chunks_used;
+extern size_t _bytes_used;
+extern size_t _chunks_free;
+extern size_t _bytes_free;
+
+/* Internal version of `free' used in `morecore' (malloc.c). */
+extern void _free_internal __P ((__ptr_t __ptr));
+
+#endif /* _MALLOC_INTERNAL. */
+
+/* Underlying allocation function; successive calls should
+ return contiguous pieces of memory. */
+extern __ptr_t (*__morecore) __P ((ptrdiff_t __size));
+
+/* Default value of `__morecore'. */
+extern __ptr_t __default_morecore __P ((ptrdiff_t __size));
+
+/* Nonzero if `malloc' has been called and done its initialization. */
+extern int __malloc_initialized;
+
+/* Hooks for debugging versions. */
+extern void (*__free_hook) __P ((__ptr_t __ptr));
+extern __ptr_t (*__malloc_hook) __P ((size_t __size));
+extern __ptr_t (*__realloc_hook) __P ((__ptr_t __ptr, size_t __size));
+
+/* Activate a standard collection of debugging hooks. */
+extern void mcheck __P ((void (*__func) __P ((void))));
+
+/* Activate a standard collection of tracing hooks. */
+extern void mtrace __P ((void));
+
+/* Statistics available to the user. */
+struct mstats
+ {
+ size_t bytes_total; /* Total size of the heap. */
+ size_t chunks_used; /* Chunks allocated by the user. */
+ size_t bytes_used; /* Byte total of user-allocated chunks. */
+ size_t chunks_free; /* Chunks in the free list. */
+ size_t bytes_free; /* Byte total of chunks in the free list. */
+ };
+
+/* Pick up the current statistics. */
+extern struct mstats mstats __P ((void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* mtrace.h */
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
new file mode 100644
index 0000000..a341c72
--- /dev/null
+++ b/e2fsck/pass1.c
@@ -0,0 +1,4466 @@
+/*
+ * pass1.c -- pass #1 of e2fsck: sequential scan of the inode table
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * Pass 1 of e2fsck iterates over all the inodes in the filesystems,
+ * and applies the following tests to each inode:
+ *
+ * - The mode field of the inode must be legal.
+ * - The size and block count fields of the inode are correct.
+ * - A data block must not be used by another inode
+ *
+ * Pass 1 also gathers the collects the following information:
+ *
+ * - A bitmap of which inodes are in use. (inode_used_map)
+ * - A bitmap of which inodes are directories. (inode_dir_map)
+ * - A bitmap of which inodes are regular files. (inode_reg_map)
+ * - A bitmap of which inodes have bad fields. (inode_bad_map)
+ * - A bitmap of which inodes are in bad blocks. (inode_bb_map)
+ * - A bitmap of which inodes are imagic inodes. (inode_imagic_map)
+ * - A bitmap of which inodes are casefolded. (inode_casefold_map)
+ * - A bitmap of which blocks are in use. (block_found_map)
+ * - A bitmap of which blocks are in use by two inodes (block_dup_map)
+ * - The data blocks of the directory inodes. (dir_map)
+ * - Ref counts for ea_inodes. (ea_inode_refs)
+ * - The encryption policy ID of each encrypted inode. (encrypted_files)
+ *
+ * Pass 1 is designed to stash away enough information so that the
+ * other passes should not need to read in the inode information
+ * during the normal course of a filesystem check. (Although if an
+ * inconsistency is detected, other passes may need to read in an
+ * inode to fix it.)
+ *
+ * Note that pass 1B will be invoked if there are any duplicate blocks
+ * found.
+ */
+
+#define _GNU_SOURCE 1 /* get strnlen() */
+#include "config.h"
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "e2fsck.h"
+#include <ext2fs/ext2_ext_attr.h>
+#include <e2p/e2p.h>
+
+#include "problem.h"
+
+#ifdef NO_INLINE_FUNCS
+#define _INLINE_
+#else
+#define _INLINE_ inline
+#endif
+
+#undef DEBUG
+
+struct ea_quota {
+ blk64_t blocks;
+ __u64 inodes;
+};
+
+static int process_block(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt, blk64_t ref_blk,
+ int ref_offset, void *priv_data);
+static int process_bad_block(ext2_filsys fs, blk64_t *block_nr,
+ e2_blkcnt_t blockcnt, blk64_t ref_blk,
+ int ref_offset, void *priv_data);
+static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
+ char *block_buf,
+ const struct ea_quota *ea_ibody_quota);
+static void mark_table_blocks(e2fsck_t ctx);
+static void alloc_bb_map(e2fsck_t ctx);
+static void alloc_imagic_map(e2fsck_t ctx);
+static void mark_inode_bad(e2fsck_t ctx, ext2_ino_t ino);
+static void add_casefolded_dir(e2fsck_t ctx, ext2_ino_t ino);
+static void handle_fs_bad_blocks(e2fsck_t ctx);
+static void process_inodes(e2fsck_t ctx, char *block_buf);
+static EXT2_QSORT_TYPE process_inode_cmp(const void *a, const void *b);
+static errcode_t scan_callback(ext2_filsys fs, ext2_inode_scan scan,
+ dgrp_t group, void * priv_data);
+static void adjust_extattr_refcount(e2fsck_t ctx, ext2_refcount_t refcount,
+ char *block_buf, int adjust_sign);
+/* static char *describe_illegal_block(ext2_filsys fs, blk64_t block); */
+
+struct process_block_struct {
+ ext2_ino_t ino;
+ unsigned is_dir:1, is_reg:1, clear:1, suppress:1,
+ fragmented:1, compressed:1, bbcheck:1,
+ inode_modified:1;
+ blk64_t num_blocks;
+ blk64_t max_blocks;
+ blk64_t last_block;
+ e2_blkcnt_t last_init_lblock;
+ e2_blkcnt_t last_db_block;
+ int num_illegal_blocks;
+ blk64_t previous_block;
+ struct ext2_inode *inode;
+ struct problem_context *pctx;
+ ext2fs_block_bitmap fs_meta_blocks;
+ e2fsck_t ctx;
+ blk64_t next_lblock;
+ struct extent_tree_info eti;
+};
+
+struct process_inode_block {
+ ext2_ino_t ino;
+ struct ea_quota ea_ibody_quota;
+ struct ext2_inode_large inode;
+};
+
+struct scan_callback_struct {
+ e2fsck_t ctx;
+ char *block_buf;
+};
+
+/*
+ * For the inodes to process list.
+ */
+static struct process_inode_block *inodes_to_process;
+static int process_inode_count;
+
+static __u64 ext2_max_sizes[EXT2_MAX_BLOCK_LOG_SIZE -
+ EXT2_MIN_BLOCK_LOG_SIZE + 1];
+
+/*
+ * Check to make sure a device inode is real. Returns 1 if the device
+ * checks out, 0 if not.
+ *
+ * Note: this routine is now also used to check FIFO's and Sockets,
+ * since they have the same requirement; the i_block fields should be
+ * zero.
+ */
+int e2fsck_pass1_check_device_inode(ext2_filsys fs EXT2FS_ATTR((unused)),
+ struct ext2_inode *inode)
+{
+ int i;
+
+ /*
+ * If the index or extents flag is set, then this is a bogus
+ * device/fifo/socket
+ */
+ if (inode->i_flags & (EXT2_INDEX_FL | EXT4_EXTENTS_FL))
+ return 0;
+
+ /*
+ * We should be able to do the test below all the time, but
+ * because the kernel doesn't forcibly clear the device
+ * inode's additional i_block fields, there are some rare
+ * occasions when a legitimate device inode will have non-zero
+ * additional i_block fields. So for now, we only complain
+ * when the immutable flag is set, which should never happen
+ * for devices. (And that's when the problem is caused, since
+ * you can't set or clear immutable flags for devices.) Once
+ * the kernel has been fixed we can change this...
+ */
+ if (inode->i_flags & (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL)) {
+ for (i=4; i < EXT2_N_BLOCKS; i++)
+ if (inode->i_block[i])
+ return 0;
+ }
+ return 1;
+}
+
+/*
+ * Check to make sure a symlink inode is real. Returns 1 if the symlink
+ * checks out, 0 if not.
+ */
+int e2fsck_pass1_check_symlink(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, char *buf)
+{
+ unsigned int buflen;
+ unsigned int len;
+
+ if ((inode->i_size_high || inode->i_size == 0) ||
+ (inode->i_flags & EXT2_INDEX_FL))
+ return 0;
+
+ if (inode->i_flags & EXT4_INLINE_DATA_FL) {
+ size_t inline_size;
+
+ if (inode->i_flags & EXT4_EXTENTS_FL)
+ return 0;
+ if (ext2fs_inline_data_size(fs, ino, &inline_size))
+ return 0;
+ if (inode->i_size != inline_size)
+ return 0;
+
+ return 1;
+ }
+
+ if (ext2fs_is_fast_symlink(inode)) {
+ if (inode->i_flags & EXT4_EXTENTS_FL)
+ return 0;
+ buf = (char *)inode->i_block;
+ buflen = sizeof(inode->i_block);
+ } else {
+ ext2_extent_handle_t handle;
+ struct ext2_extent_info info;
+ struct ext2fs_extent extent;
+ blk64_t blk;
+ int i;
+
+ if (inode->i_flags & EXT4_EXTENTS_FL) {
+ if (ext2fs_extent_open2(fs, ino, inode, &handle))
+ return 0;
+ if (ext2fs_extent_get_info(handle, &info) ||
+ (info.num_entries != 1) ||
+ (info.max_depth != 0)) {
+ ext2fs_extent_free(handle);
+ return 0;
+ }
+ if (ext2fs_extent_get(handle, EXT2_EXTENT_ROOT,
+ &extent) ||
+ (extent.e_lblk != 0) ||
+ (extent.e_len != 1)) {
+ ext2fs_extent_free(handle);
+ return 0;
+ }
+ blk = extent.e_pblk;
+ ext2fs_extent_free(handle);
+ } else {
+ blk = inode->i_block[0];
+
+ for (i = 1; i < EXT2_N_BLOCKS; i++)
+ if (inode->i_block[i])
+ return 0;
+ }
+
+ if (blk < fs->super->s_first_data_block ||
+ blk >= ext2fs_blocks_count(fs->super))
+ return 0;
+
+ if (io_channel_read_blk64(fs->io, blk, 1, buf))
+ return 0;
+
+ buflen = fs->blocksize;
+ }
+
+ if (inode->i_flags & EXT4_ENCRYPT_FL)
+ len = ext2fs_le16_to_cpu(*(__u16 *)buf) + 2;
+ else
+ len = strnlen(buf, buflen);
+
+ if (len >= buflen)
+ return 0;
+
+ if (len != inode->i_size)
+ return 0;
+ return 1;
+}
+
+/*
+ * If the extents or inlinedata flags are set on the inode, offer to clear 'em.
+ */
+#define BAD_SPECIAL_FLAGS (EXT4_EXTENTS_FL | EXT4_INLINE_DATA_FL)
+static void check_extents_inlinedata(e2fsck_t ctx,
+ struct problem_context *pctx)
+{
+ if (!(pctx->inode->i_flags & BAD_SPECIAL_FLAGS))
+ return;
+
+ if (!fix_problem(ctx, PR_1_SPECIAL_EXTENTS_IDATA, pctx))
+ return;
+
+ pctx->inode->i_flags &= ~BAD_SPECIAL_FLAGS;
+ e2fsck_write_inode(ctx, pctx->ino, pctx->inode, "pass1");
+}
+#undef BAD_SPECIAL_FLAGS
+
+/*
+ * If the immutable (or append-only) flag is set on the inode, offer
+ * to clear it.
+ */
+#define BAD_SPECIAL_FLAGS (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL)
+static void check_immutable(e2fsck_t ctx, struct problem_context *pctx)
+{
+ if (!(pctx->inode->i_flags & BAD_SPECIAL_FLAGS))
+ return;
+
+ if (!fix_problem(ctx, PR_1_SET_IMMUTABLE, pctx))
+ return;
+
+ pctx->inode->i_flags &= ~BAD_SPECIAL_FLAGS;
+ e2fsck_write_inode(ctx, pctx->ino, pctx->inode, "pass1");
+}
+
+/*
+ * If device, fifo or socket, check size is zero -- if not offer to
+ * clear it
+ */
+static void check_size(e2fsck_t ctx, struct problem_context *pctx)
+{
+ struct ext2_inode *inode = pctx->inode;
+
+ if (EXT2_I_SIZE(inode) == 0)
+ return;
+
+ if (!fix_problem(ctx, PR_1_SET_NONZSIZE, pctx))
+ return;
+
+ ext2fs_inode_size_set(ctx->fs, inode, 0);
+ e2fsck_write_inode(ctx, pctx->ino, pctx->inode, "pass1");
+}
+
+/*
+ * For a given size, calculate how many blocks would be charged towards quota.
+ */
+static blk64_t size_to_quota_blocks(ext2_filsys fs, size_t size)
+{
+ blk64_t clusters;
+
+ clusters = DIV_ROUND_UP(size, fs->blocksize << fs->cluster_ratio_bits);
+ return EXT2FS_C2B(fs, clusters);
+}
+
+/*
+ * Check validity of EA inode. Return 0 if EA inode is valid, otherwise return
+ * the problem code.
+ */
+static problem_t check_large_ea_inode(e2fsck_t ctx,
+ struct ext2_ext_attr_entry *entry,
+ struct problem_context *pctx,
+ blk64_t *quota_blocks)
+{
+ struct ext2_inode inode;
+ __u32 hash, signed_hash;
+ errcode_t retval;
+
+ /* Check if inode is within valid range */
+ if ((entry->e_value_inum < EXT2_FIRST_INODE(ctx->fs->super)) ||
+ (entry->e_value_inum > ctx->fs->super->s_inodes_count)) {
+ pctx->num = entry->e_value_inum;
+ return PR_1_ATTR_VALUE_EA_INODE;
+ }
+
+ e2fsck_read_inode(ctx, entry->e_value_inum, &inode, "pass1");
+
+ retval = ext2fs_ext_attr_hash_entry3(ctx->fs, entry, NULL, &hash,
+ &signed_hash);
+ if (retval) {
+ com_err("check_large_ea_inode", retval,
+ _("while hashing entry with e_value_inum = %u"),
+ entry->e_value_inum);
+ fatal_error(ctx, 0);
+ }
+
+ if ((hash == entry->e_hash) || (signed_hash == entry->e_hash)) {
+ *quota_blocks = size_to_quota_blocks(ctx->fs,
+ entry->e_value_size);
+ } else {
+ /* This might be an old Lustre-style ea_inode reference. */
+ if (inode.i_mtime == pctx->ino &&
+ inode.i_generation == pctx->inode->i_generation) {
+ *quota_blocks = 0;
+ } else {
+ /* If target inode is also missing EA_INODE flag,
+ * this is likely to be a bad reference.
+ */
+ if (!(inode.i_flags & EXT4_EA_INODE_FL)) {
+ pctx->num = entry->e_value_inum;
+ return PR_1_ATTR_VALUE_EA_INODE;
+ } else {
+ pctx->num = entry->e_hash;
+ return PR_1_ATTR_HASH;
+ }
+ }
+ }
+
+ if (!(inode.i_flags & EXT4_EA_INODE_FL)) {
+ pctx->num = entry->e_value_inum;
+ if (fix_problem(ctx, PR_1_ATTR_SET_EA_INODE_FL, pctx)) {
+ inode.i_flags |= EXT4_EA_INODE_FL;
+ ext2fs_write_inode(ctx->fs, entry->e_value_inum,
+ &inode);
+ } else {
+ return PR_1_ATTR_NO_EA_INODE_FL;
+ }
+ }
+ return 0;
+}
+
+static void inc_ea_inode_refs(e2fsck_t ctx, struct problem_context *pctx,
+ struct ext2_ext_attr_entry *first, void *end)
+{
+ struct ext2_ext_attr_entry *entry = first;
+ struct ext2_ext_attr_entry *np = EXT2_EXT_ATTR_NEXT(entry);
+
+ while ((void *) entry < end && (void *) np < end &&
+ !EXT2_EXT_IS_LAST_ENTRY(entry)) {
+ if (!entry->e_value_inum)
+ goto next;
+ if (!ctx->ea_inode_refs) {
+ pctx->errcode = ea_refcount_create(0,
+ &ctx->ea_inode_refs);
+ if (pctx->errcode) {
+ pctx->num = 4;
+ fix_problem(ctx, PR_1_ALLOCATE_REFCOUNT, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ ea_refcount_increment(ctx->ea_inode_refs, entry->e_value_inum,
+ 0);
+ next:
+ entry = np;
+ np = EXT2_EXT_ATTR_NEXT(entry);
+ }
+}
+
+static void check_ea_in_inode(e2fsck_t ctx, struct problem_context *pctx,
+ struct ea_quota *ea_ibody_quota)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct ext2_inode_large *inode;
+ struct ext2_ext_attr_entry *entry;
+ char *start, *header, *end;
+ unsigned int storage_size, remain;
+ problem_t problem = 0;
+ region_t region = 0;
+
+ ea_ibody_quota->blocks = 0;
+ ea_ibody_quota->inodes = 0;
+
+ inode = (struct ext2_inode_large *) pctx->inode;
+ storage_size = EXT2_INODE_SIZE(ctx->fs->super) - EXT2_GOOD_OLD_INODE_SIZE -
+ inode->i_extra_isize;
+ header = ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize;
+ end = header + storage_size;
+ start = header + sizeof(__u32);
+ entry = (struct ext2_ext_attr_entry *) start;
+
+ /* scan all entry's headers first */
+
+ /* take finish entry 0UL into account */
+ remain = storage_size - sizeof(__u32);
+
+ region = region_create(0, storage_size);
+ if (!region) {
+ fix_problem(ctx, PR_1_EA_ALLOC_REGION_ABORT, pctx);
+ problem = 0;
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if (region_allocate(region, 0, sizeof(__u32))) {
+ problem = PR_1_INODE_EA_ALLOC_COLLISION;
+ goto fix;
+ }
+
+ while (remain >= sizeof(struct ext2_ext_attr_entry) &&
+ !EXT2_EXT_IS_LAST_ENTRY(entry)) {
+ __u32 hash;
+
+ if (region_allocate(region, (char *)entry - (char *)header,
+ EXT2_EXT_ATTR_LEN(entry->e_name_len))) {
+ problem = PR_1_INODE_EA_ALLOC_COLLISION;
+ goto fix;
+ }
+
+ /* header eats this space */
+ remain -= sizeof(struct ext2_ext_attr_entry);
+
+ /* is attribute name valid? */
+ if (EXT2_EXT_ATTR_SIZE(entry->e_name_len) > remain) {
+ pctx->num = entry->e_name_len;
+ problem = PR_1_ATTR_NAME_LEN;
+ goto fix;
+ }
+
+ /* attribute len eats this space */
+ remain -= EXT2_EXT_ATTR_SIZE(entry->e_name_len);
+
+ if (entry->e_value_inum == 0) {
+ /* check value size */
+ if (entry->e_value_size > remain) {
+ pctx->num = entry->e_value_size;
+ problem = PR_1_ATTR_VALUE_SIZE;
+ goto fix;
+ }
+
+ if (entry->e_value_size &&
+ region_allocate(region,
+ sizeof(__u32) + entry->e_value_offs,
+ EXT2_EXT_ATTR_SIZE(
+ entry->e_value_size))) {
+ problem = PR_1_INODE_EA_ALLOC_COLLISION;
+ goto fix;
+ }
+
+ hash = ext2fs_ext_attr_hash_entry(entry,
+ start + entry->e_value_offs);
+ if (entry->e_hash != 0 && entry->e_hash != hash)
+ hash = ext2fs_ext_attr_hash_entry_signed(entry,
+ start + entry->e_value_offs);
+
+ /* e_hash may be 0 in older inode's ea */
+ if (entry->e_hash != 0 && entry->e_hash != hash) {
+ pctx->num = entry->e_hash;
+ problem = PR_1_ATTR_HASH;
+ goto fix;
+ }
+ } else {
+ blk64_t quota_blocks;
+
+ problem = check_large_ea_inode(ctx, entry, pctx,
+ &quota_blocks);
+ if (problem != 0)
+ goto fix;
+
+ ea_ibody_quota->blocks += quota_blocks;
+ ea_ibody_quota->inodes++;
+ }
+
+ /* If EA value is stored in external inode then it does not
+ * consume space here */
+ if (entry->e_value_inum == 0)
+ remain -= entry->e_value_size;
+
+ entry = EXT2_EXT_ATTR_NEXT(entry);
+ }
+
+ if (region_allocate(region, (char *)entry - (char *)header,
+ sizeof(__u32))) {
+ problem = PR_1_INODE_EA_ALLOC_COLLISION;
+ goto fix;
+ }
+fix:
+ if (region)
+ region_free(region);
+ /*
+ * it seems like a corruption. it's very unlikely we could repair
+ * EA(s) in automatic fashion -bzzz
+ */
+ if (problem == 0 || !fix_problem(ctx, problem, pctx)) {
+ inc_ea_inode_refs(ctx, pctx,
+ (struct ext2_ext_attr_entry *)start, end);
+ return;
+ }
+
+ /* simply remove all possible EA(s) */
+ *((__u32 *)header) = 0UL;
+ e2fsck_write_inode_full(ctx, pctx->ino, pctx->inode,
+ EXT2_INODE_SIZE(sb), "pass1");
+ ea_ibody_quota->blocks = 0;
+ ea_ibody_quota->inodes = 0;
+}
+
+static int check_inode_extra_negative_epoch(__u32 xtime, __u32 extra) {
+ return (xtime & (1U << 31)) != 0 &&
+ (extra & EXT4_EPOCH_MASK) == EXT4_EPOCH_MASK;
+}
+
+#define CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, xtime) \
+ check_inode_extra_negative_epoch(inode->i_##xtime, \
+ inode->i_##xtime##_extra)
+
+/* When today's date is earlier than 2242, we assume that atimes,
+ * ctimes, crtimes, and mtimes with years in the range 2310..2378 are
+ * actually pre-1970 dates mis-encoded.
+ */
+#define EXT4_EXTRA_NEGATIVE_DATE_CUTOFF 2 * (1LL << 32)
+
+static void check_inode_extra_space(e2fsck_t ctx, struct problem_context *pctx,
+ struct ea_quota *ea_ibody_quota)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct ext2_inode_large *inode;
+ __u32 *eamagic;
+ int min, max;
+
+ ea_ibody_quota->blocks = 0;
+ ea_ibody_quota->inodes = 0;
+
+ inode = (struct ext2_inode_large *) pctx->inode;
+ if (EXT2_INODE_SIZE(sb) == EXT2_GOOD_OLD_INODE_SIZE) {
+ /* this isn't large inode. so, nothing to check */
+ return;
+ }
+
+#if 0
+ printf("inode #%u, i_extra_size %d\n", pctx->ino,
+ inode->i_extra_isize);
+#endif
+ /* i_extra_isize must cover i_extra_isize + i_checksum_hi at least */
+ min = sizeof(inode->i_extra_isize) + sizeof(inode->i_checksum_hi);
+ max = EXT2_INODE_SIZE(sb) - EXT2_GOOD_OLD_INODE_SIZE;
+ /*
+ * For now we will allow i_extra_isize to be 0, but really
+ * implementations should never allow i_extra_isize to be 0
+ */
+ if (inode->i_extra_isize &&
+ (inode->i_extra_isize < min || inode->i_extra_isize > max ||
+ inode->i_extra_isize & 3)) {
+ if (!fix_problem(ctx, PR_1_EXTRA_ISIZE, pctx))
+ return;
+ if (inode->i_extra_isize < min || inode->i_extra_isize > max)
+ inode->i_extra_isize = sb->s_want_extra_isize;
+ else
+ inode->i_extra_isize = (inode->i_extra_isize + 3) & ~3;
+ e2fsck_write_inode_full(ctx, pctx->ino, pctx->inode,
+ EXT2_INODE_SIZE(sb), "pass1");
+ }
+
+ /* check if there is no place for an EA header */
+ if (inode->i_extra_isize >= max - sizeof(__u32))
+ return;
+
+ eamagic = (__u32 *) (((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize);
+ if (*eamagic == EXT2_EXT_ATTR_MAGIC) {
+ /* it seems inode has an extended attribute(s) in body */
+ check_ea_in_inode(ctx, pctx, ea_ibody_quota);
+ }
+
+ /*
+ * If the inode's extended atime (ctime, crtime, mtime) is stored in
+ * the old, invalid format, repair it.
+ */
+ if (((sizeof(time_t) <= 4) ||
+ (((sizeof(time_t) > 4) &&
+ ctx->now < EXT4_EXTRA_NEGATIVE_DATE_CUTOFF))) &&
+ (CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, atime) ||
+ CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, ctime) ||
+ CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, crtime) ||
+ CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, mtime))) {
+
+ if (!fix_problem(ctx, PR_1_EA_TIME_OUT_OF_RANGE, pctx))
+ return;
+
+ if (CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, atime))
+ inode->i_atime_extra &= ~EXT4_EPOCH_MASK;
+ if (CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, ctime))
+ inode->i_ctime_extra &= ~EXT4_EPOCH_MASK;
+ if (CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, crtime))
+ inode->i_crtime_extra &= ~EXT4_EPOCH_MASK;
+ if (CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, mtime))
+ inode->i_mtime_extra &= ~EXT4_EPOCH_MASK;
+ e2fsck_write_inode_full(ctx, pctx->ino, pctx->inode,
+ EXT2_INODE_SIZE(sb), "pass1");
+ }
+
+}
+
+/*
+ * Check to see if the inode might really be a directory, despite i_mode
+ *
+ * This is a lot of complexity for something for which I'm not really
+ * convinced happens frequently in the wild. If for any reason this
+ * causes any problems, take this code out.
+ * [tytso:20070331.0827EDT]
+ */
+static void check_is_really_dir(e2fsck_t ctx, struct problem_context *pctx,
+ char *buf)
+{
+ struct ext2_inode *inode = pctx->inode;
+ struct ext2_dir_entry *dirent;
+ errcode_t retval;
+ blk64_t blk;
+ unsigned int i, rec_len, not_device = 0;
+ int extent_fs;
+ int inlinedata_fs;
+
+ /*
+ * If the mode looks OK, we believe it. If the first block in
+ * the i_block array is 0, this cannot be a directory. If the
+ * inode is extent-mapped, it is still the case that the latter
+ * cannot be 0 - the magic number in the extent header would make
+ * it nonzero.
+ */
+ if (LINUX_S_ISDIR(inode->i_mode) || LINUX_S_ISREG(inode->i_mode) ||
+ LINUX_S_ISLNK(inode->i_mode) || inode->i_block[0] == 0)
+ return;
+
+ /*
+ * Check the block numbers in the i_block array for validity:
+ * zero blocks are skipped (but the first one cannot be zero -
+ * see above), other blocks are checked against the first and
+ * max data blocks (from the the superblock) and against the
+ * block bitmap. Any invalid block found means this cannot be
+ * a directory.
+ *
+ * If there are non-zero blocks past the fourth entry, then
+ * this cannot be a device file: we remember that for the next
+ * check.
+ *
+ * For extent mapped files, we don't do any sanity checking:
+ * just try to get the phys block of logical block 0 and run
+ * with it.
+ *
+ * For inline data files, we just try to get the size of inline
+ * data. If it's true, we will treat it as a directory.
+ */
+
+ extent_fs = ext2fs_has_feature_extents(ctx->fs->super);
+ inlinedata_fs = ext2fs_has_feature_inline_data(ctx->fs->super);
+ if (inlinedata_fs && (inode->i_flags & EXT4_INLINE_DATA_FL)) {
+ size_t size;
+ __u32 dotdot;
+ unsigned int rec_len2;
+ struct ext2_dir_entry de;
+
+ if (ext2fs_inline_data_size(ctx->fs, pctx->ino, &size))
+ return;
+ /*
+ * If the size isn't a multiple of 4, it's probably not a
+ * directory??
+ */
+ if (size & 3)
+ return;
+ /*
+ * If the first 10 bytes don't look like a directory entry,
+ * it's probably not a directory.
+ */
+ memcpy(&dotdot, inode->i_block, sizeof(dotdot));
+ memcpy(&de, ((char *)inode->i_block) + EXT4_INLINE_DATA_DOTDOT_SIZE,
+ EXT2_DIR_REC_LEN(0));
+ dotdot = ext2fs_le32_to_cpu(dotdot);
+ de.inode = ext2fs_le32_to_cpu(de.inode);
+ de.rec_len = ext2fs_le16_to_cpu(de.rec_len);
+ ext2fs_get_rec_len(ctx->fs, &de, &rec_len2);
+ if (dotdot >= ctx->fs->super->s_inodes_count ||
+ (dotdot < EXT2_FIRST_INO(ctx->fs->super) &&
+ dotdot != EXT2_ROOT_INO) ||
+ de.inode >= ctx->fs->super->s_inodes_count ||
+ (de.inode < EXT2_FIRST_INO(ctx->fs->super) &&
+ de.inode != 0) ||
+ rec_len2 > EXT4_MIN_INLINE_DATA_SIZE -
+ EXT4_INLINE_DATA_DOTDOT_SIZE)
+ return;
+ /* device files never have a "system.data" entry */
+ goto isdir;
+ } else if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL)) {
+ /* extent mapped */
+ if (ext2fs_bmap2(ctx->fs, pctx->ino, inode, 0, 0, 0, 0,
+ &blk))
+ return;
+ /* device files are never extent mapped */
+ not_device++;
+ } else {
+ for (i=0; i < EXT2_N_BLOCKS; i++) {
+ blk = inode->i_block[i];
+ if (!blk)
+ continue;
+ if (i >= 4)
+ not_device++;
+
+ if (blk < ctx->fs->super->s_first_data_block ||
+ blk >= ext2fs_blocks_count(ctx->fs->super) ||
+ ext2fs_fast_test_block_bitmap2(ctx->block_found_map,
+ blk))
+ return; /* Invalid block, can't be dir */
+ }
+ blk = inode->i_block[0];
+ }
+
+ /*
+ * If the mode says this is a device file and the i_links_count field
+ * is sane and we have not ruled it out as a device file previously,
+ * we declare it a device file, not a directory.
+ */
+ if ((LINUX_S_ISCHR(inode->i_mode) || LINUX_S_ISBLK(inode->i_mode)) &&
+ (inode->i_links_count == 1) && !not_device)
+ return;
+
+ /* read the first block */
+ ehandler_operation(_("reading directory block"));
+ retval = ext2fs_read_dir_block4(ctx->fs, blk, buf, 0, pctx->ino);
+ ehandler_operation(0);
+ if (retval)
+ return;
+
+ dirent = (struct ext2_dir_entry *) buf;
+ retval = ext2fs_get_rec_len(ctx->fs, dirent, &rec_len);
+ if (retval)
+ return;
+ if ((ext2fs_dirent_name_len(dirent) != 1) ||
+ (dirent->name[0] != '.') ||
+ (dirent->inode != pctx->ino) ||
+ (rec_len < 12) ||
+ (rec_len % 4) ||
+ (rec_len >= ctx->fs->blocksize - 12))
+ return;
+
+ dirent = (struct ext2_dir_entry *) (buf + rec_len);
+ retval = ext2fs_get_rec_len(ctx->fs, dirent, &rec_len);
+ if (retval)
+ return;
+ if ((ext2fs_dirent_name_len(dirent) != 2) ||
+ (dirent->name[0] != '.') ||
+ (dirent->name[1] != '.') ||
+ (rec_len < 12) ||
+ (rec_len % 4))
+ return;
+
+isdir:
+ if (fix_problem(ctx, PR_1_TREAT_AS_DIRECTORY, pctx)) {
+ inode->i_mode = (inode->i_mode & 07777) | LINUX_S_IFDIR;
+ e2fsck_write_inode_full(ctx, pctx->ino, inode,
+ EXT2_INODE_SIZE(ctx->fs->super),
+ "check_is_really_dir");
+ }
+}
+
+extern errcode_t e2fsck_setup_icount(e2fsck_t ctx, const char *icount_name,
+ int flags, ext2_icount_t hint,
+ ext2_icount_t *ret)
+{
+ unsigned int threshold;
+ unsigned int save_type;
+ ext2_ino_t num_dirs;
+ errcode_t retval;
+ char *tdb_dir;
+ int enable;
+
+ *ret = 0;
+
+ profile_get_string(ctx->profile, "scratch_files", "directory", 0, 0,
+ &tdb_dir);
+ profile_get_uint(ctx->profile, "scratch_files",
+ "numdirs_threshold", 0, 0, &threshold);
+ profile_get_boolean(ctx->profile, "scratch_files",
+ "icount", 0, 1, &enable);
+
+ retval = ext2fs_get_num_dirs(ctx->fs, &num_dirs);
+ if (retval)
+ num_dirs = 1024; /* Guess */
+
+ if (enable && tdb_dir && !access(tdb_dir, W_OK) &&
+ (!threshold || num_dirs > threshold)) {
+ retval = ext2fs_create_icount_tdb(ctx->fs, tdb_dir,
+ flags, ret);
+ if (retval == 0)
+ return 0;
+ }
+ e2fsck_set_bitmap_type(ctx->fs, EXT2FS_BMAP64_RBTREE, icount_name,
+ &save_type);
+ if (ctx->options & E2F_OPT_ICOUNT_FULLMAP)
+ flags |= EXT2_ICOUNT_OPT_FULLMAP;
+ retval = ext2fs_create_icount2(ctx->fs, flags, 0, hint, ret);
+ ctx->fs->default_bitmap_type = save_type;
+ return retval;
+}
+
+static errcode_t recheck_bad_inode_checksum(ext2_filsys fs, ext2_ino_t ino,
+ e2fsck_t ctx,
+ struct problem_context *pctx)
+{
+ errcode_t retval;
+ struct ext2_inode_large inode;
+
+ /*
+ * Reread inode. If we don't see checksum error, then this inode
+ * has been fixed elsewhere.
+ */
+ ctx->stashed_ino = 0;
+ retval = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (retval && retval != EXT2_ET_INODE_CSUM_INVALID)
+ return retval;
+ if (!retval)
+ return 0;
+
+ /*
+ * Checksum still doesn't match. That implies that the inode passes
+ * all the sanity checks, so maybe the checksum is simply corrupt.
+ * See if the user will go for fixing that.
+ */
+ if (!fix_problem(ctx, PR_1_INODE_ONLY_CSUM_INVALID, pctx))
+ return 0;
+
+ retval = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ return retval;
+}
+
+static void reserve_block_for_root_repair(e2fsck_t ctx)
+{
+ blk64_t blk = 0;
+ errcode_t err;
+ ext2_filsys fs = ctx->fs;
+
+ ctx->root_repair_block = 0;
+ if (ext2fs_test_inode_bitmap2(ctx->inode_used_map, EXT2_ROOT_INO))
+ return;
+
+ err = ext2fs_new_block2(fs, 0, ctx->block_found_map, &blk);
+ if (err)
+ return;
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, blk);
+ ctx->root_repair_block = blk;
+}
+
+static void reserve_block_for_lnf_repair(e2fsck_t ctx)
+{
+ blk64_t blk = 0;
+ errcode_t err;
+ ext2_filsys fs = ctx->fs;
+ static const char name[] = "lost+found";
+ ext2_ino_t ino;
+
+ ctx->lnf_repair_block = 0;
+ if (!ext2fs_lookup(fs, EXT2_ROOT_INO, name, sizeof(name)-1, 0, &ino))
+ return;
+
+ err = ext2fs_new_block2(fs, 0, ctx->block_found_map, &blk);
+ if (err)
+ return;
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, blk);
+ ctx->lnf_repair_block = blk;
+}
+
+static errcode_t get_inline_data_ea_size(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ size_t *sz)
+{
+ void *p;
+ struct ext2_xattr_handle *handle;
+ errcode_t retval;
+
+ retval = ext2fs_xattrs_open(fs, ino, &handle);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_xattrs_read_inode(handle,
+ (struct ext2_inode_large *)inode);
+ if (retval)
+ goto err;
+
+ retval = ext2fs_xattr_get(handle, "system.data", &p, sz);
+ if (retval)
+ goto err;
+ ext2fs_free_mem(&p);
+err:
+ (void) ext2fs_xattrs_close(&handle);
+ return retval;
+}
+
+static void finish_processing_inode(e2fsck_t ctx, ext2_ino_t ino,
+ struct problem_context *pctx,
+ int failed_csum)
+{
+ if (!failed_csum)
+ return;
+
+ /*
+ * If the inode failed the checksum and the user didn't
+ * clear the inode, test the checksum again -- if it still
+ * fails, ask the user if the checksum should be corrected.
+ */
+ pctx->errcode = recheck_bad_inode_checksum(ctx->fs, ino, ctx, pctx);
+ if (pctx->errcode)
+ ctx->flags |= E2F_FLAG_ABORT;
+}
+#define FINISH_INODE_LOOP(ctx, ino, pctx, failed_csum) \
+ do { \
+ finish_processing_inode((ctx), (ino), (pctx), (failed_csum)); \
+ if ((ctx)->flags & E2F_FLAG_ABORT) \
+ return; \
+ } while (0)
+
+static int could_be_block_map(ext2_filsys fs, struct ext2_inode *inode)
+{
+ __u32 x;
+ int i;
+
+ for (i = 0; i < EXT2_N_BLOCKS; i++) {
+ x = inode->i_block[i];
+#ifdef WORDS_BIGENDIAN
+ x = ext2fs_swab32(x);
+#endif
+ if (x >= ext2fs_blocks_count(fs->super))
+ return 0;
+ }
+
+ return 1;
+}
+
+/*
+ * Figure out what to do with an inode that has both extents and inline data
+ * inode flags set. Returns -1 if we decide to erase the inode, 0 otherwise.
+ */
+static int fix_inline_data_extents_file(e2fsck_t ctx,
+ ext2_ino_t ino,
+ struct ext2_inode *inode,
+ int inode_size,
+ struct problem_context *pctx)
+{
+ size_t max_inline_ea_size;
+ ext2_filsys fs = ctx->fs;
+ int dirty = 0;
+
+ /* Both feature flags not set? Just run the regular checks */
+ if (!ext2fs_has_feature_extents(fs->super) &&
+ !ext2fs_has_feature_inline_data(fs->super))
+ return 0;
+
+ /* Clear both flags if it's a special file */
+ if (LINUX_S_ISCHR(inode->i_mode) ||
+ LINUX_S_ISBLK(inode->i_mode) ||
+ LINUX_S_ISFIFO(inode->i_mode) ||
+ LINUX_S_ISSOCK(inode->i_mode)) {
+ check_extents_inlinedata(ctx, pctx);
+ return 0;
+ }
+
+ /* If it looks like an extent tree, try to clear inlinedata */
+ if (ext2fs_extent_header_verify(inode->i_block,
+ sizeof(inode->i_block)) == 0 &&
+ fix_problem(ctx, PR_1_CLEAR_INLINE_DATA_FOR_EXTENT, pctx)) {
+ inode->i_flags &= ~EXT4_INLINE_DATA_FL;
+ dirty = 1;
+ goto out;
+ }
+
+ /* If it looks short enough to be inline data, try to clear extents */
+ if (inode_size > EXT2_GOOD_OLD_INODE_SIZE)
+ max_inline_ea_size = inode_size -
+ (EXT2_GOOD_OLD_INODE_SIZE +
+ ((struct ext2_inode_large *)inode)->i_extra_isize);
+ else
+ max_inline_ea_size = 0;
+ if (EXT2_I_SIZE(inode) <
+ EXT4_MIN_INLINE_DATA_SIZE + max_inline_ea_size &&
+ fix_problem(ctx, PR_1_CLEAR_EXTENT_FOR_INLINE_DATA, pctx)) {
+ inode->i_flags &= ~EXT4_EXTENTS_FL;
+ dirty = 1;
+ goto out;
+ }
+
+ /*
+ * Too big for inline data, but no evidence of extent tree -
+ * maybe it's a block map file? If the mappings all look valid?
+ */
+ if (could_be_block_map(fs, inode) &&
+ fix_problem(ctx, PR_1_CLEAR_EXTENT_INLINE_DATA_FLAGS, pctx)) {
+#ifdef WORDS_BIGENDIAN
+ int i;
+
+ for (i = 0; i < EXT2_N_BLOCKS; i++)
+ inode->i_block[i] = ext2fs_swab32(inode->i_block[i]);
+#endif
+
+ inode->i_flags &= ~(EXT4_EXTENTS_FL | EXT4_INLINE_DATA_FL);
+ dirty = 1;
+ goto out;
+ }
+
+ /* Oh well, just clear the busted inode. */
+ if (fix_problem(ctx, PR_1_CLEAR_EXTENT_INLINE_DATA_INODE, pctx)) {
+ e2fsck_clear_inode(ctx, ino, inode, 0, "pass1");
+ return -1;
+ }
+
+out:
+ if (dirty)
+ e2fsck_write_inode(ctx, ino, inode, "pass1");
+
+ return 0;
+}
+
+static void pass1_readahead(e2fsck_t ctx, dgrp_t *group, ext2_ino_t *next_ino)
+{
+ ext2_ino_t inodes_in_group = 0, inodes_per_block, inodes_per_buffer;
+ dgrp_t start = *group, grp;
+ blk64_t blocks_to_read = 0;
+ errcode_t err = EXT2_ET_INVALID_ARGUMENT;
+
+ if (ctx->readahead_kb == 0)
+ goto out;
+
+ /* Keep iterating groups until we have enough to readahead */
+ inodes_per_block = EXT2_INODES_PER_BLOCK(ctx->fs->super);
+ for (grp = start; grp < ctx->fs->group_desc_count; grp++) {
+ if (ext2fs_bg_flags_test(ctx->fs, grp, EXT2_BG_INODE_UNINIT))
+ continue;
+ inodes_in_group = ctx->fs->super->s_inodes_per_group -
+ ext2fs_bg_itable_unused(ctx->fs, grp);
+ blocks_to_read += (inodes_in_group + inodes_per_block - 1) /
+ inodes_per_block;
+ if (blocks_to_read * ctx->fs->blocksize >
+ ctx->readahead_kb * 1024)
+ break;
+ }
+
+ err = e2fsck_readahead(ctx->fs, E2FSCK_READA_ITABLE, start,
+ grp - start + 1);
+ if (err == EAGAIN) {
+ ctx->readahead_kb /= 2;
+ err = 0;
+ }
+
+out:
+ if (err) {
+ /* Error; disable itable readahead */
+ *group = ctx->fs->group_desc_count;
+ *next_ino = ctx->fs->super->s_inodes_count;
+ } else {
+ /*
+ * Don't do more readahead until we've reached the first inode
+ * of the last inode scan buffer block for the last group.
+ */
+ *group = grp + 1;
+ inodes_per_buffer = (ctx->inode_buffer_blocks ?
+ ctx->inode_buffer_blocks :
+ EXT2_INODE_SCAN_DEFAULT_BUFFER_BLOCKS) *
+ ctx->fs->blocksize /
+ EXT2_INODE_SIZE(ctx->fs->super);
+ inodes_in_group--;
+ *next_ino = inodes_in_group -
+ (inodes_in_group % inodes_per_buffer) + 1 +
+ (grp * ctx->fs->super->s_inodes_per_group);
+ }
+}
+
+/*
+ * Check if the passed ino is one of the used superblock quota inodes.
+ *
+ * Before the quota inodes were journaled, older superblock quota inodes
+ * were just regular files in the filesystem and not reserved inodes. This
+ * checks if the passed ino is one of the s_*_quota_inum superblock fields,
+ * which may not always be the same as the EXT4_*_QUOTA_INO fields.
+ */
+static int quota_inum_is_super(struct ext2_super_block *sb, ext2_ino_t ino)
+{
+ enum quota_type qtype;
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++)
+ if (*quota_sb_inump(sb, qtype) == ino)
+ return 1;
+
+ return 0;
+}
+
+/*
+ * Check if the passed ino is one of the reserved quota inodes.
+ * This checks if the inode number is one of the reserved EXT4_*_QUOTA_INO
+ * inodes. These inodes may or may not be in use by the quota feature.
+ */
+static int quota_inum_is_reserved(ext2_filsys fs, ext2_ino_t ino)
+{
+ enum quota_type qtype;
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++)
+ if (quota_type2inum(qtype, fs->super) == ino)
+ return 1;
+
+ return 0;
+}
+
+void e2fsck_pass1(e2fsck_t ctx)
+{
+ int i;
+ __u64 max_sizes;
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino = 0;
+ struct ext2_inode *inode = NULL;
+ ext2_inode_scan scan = NULL;
+ char *block_buf = NULL;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ unsigned char frag, fsize;
+ struct problem_context pctx;
+ struct scan_callback_struct scan_struct;
+ struct ext2_super_block *sb = ctx->fs->super;
+ const char *old_op;
+ const char *eop_next_inode = _("getting next inode from scan");
+ int imagic_fs, extent_fs, inlinedata_fs, casefold_fs;
+ int low_dtime_check = 1;
+ unsigned int inode_size = EXT2_INODE_SIZE(fs->super);
+ unsigned int bufsize;
+ int failed_csum = 0;
+ ext2_ino_t ino_threshold = 0;
+ dgrp_t ra_group = 0;
+ struct ea_quota ea_ibody_quota;
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ clear_problem_context(&pctx);
+
+ /* If we can do readahead, figure out how many groups to pull in. */
+ if (!e2fsck_can_readahead(ctx->fs))
+ ctx->readahead_kb = 0;
+ else if (ctx->readahead_kb == ~0ULL)
+ ctx->readahead_kb = e2fsck_guess_readahead(ctx->fs);
+ pass1_readahead(ctx, &ra_group, &ino_threshold);
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1_PASS_HEADER, &pctx);
+
+ if (ext2fs_has_feature_dir_index(fs->super) &&
+ !(ctx->options & E2F_OPT_NO)) {
+ if (ext2fs_u32_list_create(&ctx->dirs_to_hash, 50))
+ ctx->dirs_to_hash = 0;
+ }
+
+#ifdef MTRACE
+ mtrace_print("Pass 1");
+#endif
+
+#define EXT2_BPP(bits) (1ULL << ((bits) - 2))
+
+ for (i = EXT2_MIN_BLOCK_LOG_SIZE; i <= EXT2_MAX_BLOCK_LOG_SIZE; i++) {
+ max_sizes = EXT2_NDIR_BLOCKS + EXT2_BPP(i);
+ max_sizes = max_sizes + EXT2_BPP(i) * EXT2_BPP(i);
+ max_sizes = max_sizes + EXT2_BPP(i) * EXT2_BPP(i) * EXT2_BPP(i);
+ max_sizes = (max_sizes * (1UL << i));
+ ext2_max_sizes[i - EXT2_MIN_BLOCK_LOG_SIZE] = max_sizes;
+ }
+#undef EXT2_BPP
+
+ imagic_fs = ext2fs_has_feature_imagic_inodes(sb);
+ extent_fs = ext2fs_has_feature_extents(sb);
+ inlinedata_fs = ext2fs_has_feature_inline_data(sb);
+ casefold_fs = ext2fs_has_feature_casefold(sb);
+
+ /*
+ * Allocate bitmaps structures
+ */
+ pctx.errcode = e2fsck_allocate_inode_bitmap(fs, _("in-use inode map"),
+ EXT2FS_BMAP64_RBTREE,
+ "inode_used_map",
+ &ctx->inode_used_map);
+ if (pctx.errcode) {
+ pctx.num = 1;
+ fix_problem(ctx, PR_1_ALLOCATE_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ pctx.errcode = e2fsck_allocate_inode_bitmap(fs,
+ _("directory inode map"),
+ EXT2FS_BMAP64_AUTODIR,
+ "inode_dir_map", &ctx->inode_dir_map);
+ if (pctx.errcode) {
+ pctx.num = 2;
+ fix_problem(ctx, PR_1_ALLOCATE_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ pctx.errcode = e2fsck_allocate_inode_bitmap(fs,
+ _("regular file inode map"), EXT2FS_BMAP64_RBTREE,
+ "inode_reg_map", &ctx->inode_reg_map);
+ if (pctx.errcode) {
+ pctx.num = 6;
+ fix_problem(ctx, PR_1_ALLOCATE_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ pctx.errcode = e2fsck_allocate_subcluster_bitmap(fs,
+ _("in-use block map"), EXT2FS_BMAP64_RBTREE,
+ "block_found_map", &ctx->block_found_map);
+ if (pctx.errcode) {
+ pctx.num = 1;
+ fix_problem(ctx, PR_1_ALLOCATE_BBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ pctx.errcode = e2fsck_allocate_block_bitmap(fs,
+ _("metadata block map"), EXT2FS_BMAP64_RBTREE,
+ "block_metadata_map", &ctx->block_metadata_map);
+ if (pctx.errcode) {
+ pctx.num = 1;
+ fix_problem(ctx, PR_1_ALLOCATE_BBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if (casefold_fs) {
+ pctx.errcode =
+ e2fsck_allocate_inode_bitmap(fs,
+ _("inode casefold map"),
+ EXT2FS_BMAP64_RBTREE,
+ "inode_casefold_map",
+ &ctx->inode_casefold_map);
+ if (pctx.errcode) {
+ pctx.num = 1;
+ fix_problem(ctx, PR_1_ALLOCATE_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ pctx.errcode = e2fsck_setup_icount(ctx, "inode_link_info", 0, NULL,
+ &ctx->inode_link_info);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_ALLOCATE_ICOUNT, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ bufsize = inode_size;
+ if (bufsize < sizeof(struct ext2_inode_large))
+ bufsize = sizeof(struct ext2_inode_large);
+ inode = (struct ext2_inode *)
+ e2fsck_allocate_memory(ctx, bufsize, "scratch inode");
+
+ inodes_to_process = (struct process_inode_block *)
+ e2fsck_allocate_memory(ctx,
+ (ctx->process_inode_size *
+ sizeof(struct process_inode_block)),
+ "array of inodes to process");
+ process_inode_count = 0;
+
+ pctx.errcode = ext2fs_init_dblist(fs, 0);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_ALLOCATE_DBCOUNT, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+
+ /*
+ * If the last orphan field is set, clear it, since the pass1
+ * processing will automatically find and clear the orphans.
+ * In the future, we may want to try using the last_orphan
+ * linked list ourselves, but for now, we clear it so that the
+ * ext3 mount code won't get confused.
+ */
+ if (!(ctx->options & E2F_OPT_READONLY)) {
+ if (fs->super->s_last_orphan) {
+ fs->super->s_last_orphan = 0;
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+ mark_table_blocks(ctx);
+ pctx.errcode = ext2fs_convert_subcluster_bitmap(fs,
+ &ctx->block_found_map);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_CONVERT_SUBCLUSTER, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 3,
+ "block iterate buffer");
+ if (EXT2_INODE_SIZE(fs->super) == EXT2_GOOD_OLD_INODE_SIZE)
+ e2fsck_use_inode_shortcuts(ctx, 1);
+ e2fsck_intercept_block_allocations(ctx);
+ old_op = ehandler_operation(_("opening inode scan"));
+ pctx.errcode = ext2fs_open_inode_scan(fs, ctx->inode_buffer_blocks,
+ &scan);
+ ehandler_operation(old_op);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ ext2fs_inode_scan_flags(scan, EXT2_SF_SKIP_MISSING_ITABLE |
+ EXT2_SF_WARN_GARBAGE_INODES, 0);
+ ctx->stashed_inode = inode;
+ scan_struct.ctx = ctx;
+ scan_struct.block_buf = block_buf;
+ ext2fs_set_inode_callback(scan, scan_callback, &scan_struct);
+ if (ctx->progress && ((ctx->progress)(ctx, 1, 0,
+ ctx->fs->group_desc_count)))
+ goto endit;
+ if ((fs->super->s_wtime &&
+ fs->super->s_wtime < fs->super->s_inodes_count) ||
+ (fs->super->s_mtime &&
+ fs->super->s_mtime < fs->super->s_inodes_count) ||
+ (fs->super->s_mkfs_time &&
+ fs->super->s_mkfs_time < fs->super->s_inodes_count))
+ low_dtime_check = 0;
+
+ if (ext2fs_has_feature_mmp(fs->super) &&
+ fs->super->s_mmp_block > fs->super->s_first_data_block &&
+ fs->super->s_mmp_block < ext2fs_blocks_count(fs->super))
+ ext2fs_mark_block_bitmap2(ctx->block_found_map,
+ fs->super->s_mmp_block);
+
+ /* Set up ctx->lost_and_found if possible */
+ (void) e2fsck_get_lost_and_found(ctx, 0);
+
+ while (1) {
+ if (ino % (fs->super->s_inodes_per_group * 4) == 1) {
+ if (e2fsck_mmp_update(fs))
+ fatal_error(ctx, 0);
+ }
+ old_op = ehandler_operation(eop_next_inode);
+ pctx.errcode = ext2fs_get_next_inode_full(scan, &ino,
+ inode, inode_size);
+ if (ino > ino_threshold)
+ pass1_readahead(ctx, &ra_group, &ino_threshold);
+ ehandler_operation(old_op);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto endit;
+ if (pctx.errcode == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE) {
+ /*
+ * If badblocks says badblocks is bad, offer to clear
+ * the list, update the in-core bb list, and restart
+ * the inode scan.
+ */
+ if (ino == EXT2_BAD_INO &&
+ fix_problem(ctx, PR_1_BADBLOCKS_IN_BADBLOCKS,
+ &pctx)) {
+ errcode_t err;
+
+ e2fsck_clear_inode(ctx, ino, inode, 0, "pass1");
+ ext2fs_badblocks_list_free(ctx->fs->badblocks);
+ ctx->fs->badblocks = NULL;
+ err = ext2fs_read_bb_inode(ctx->fs,
+ &ctx->fs->badblocks);
+ if (err) {
+ fix_problem(ctx, PR_1_ISCAN_ERROR,
+ &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ } else
+ ctx->flags |= E2F_FLAG_RESTART;
+ goto endit;
+ }
+ if (!ctx->inode_bb_map)
+ alloc_bb_map(ctx);
+ ext2fs_mark_inode_bitmap2(ctx->inode_bb_map, ino);
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ continue;
+ }
+ if (pctx.errcode &&
+ pctx.errcode != EXT2_ET_INODE_CSUM_INVALID &&
+ pctx.errcode != EXT2_ET_INODE_IS_GARBAGE) {
+ fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ if (!ino)
+ break;
+ pctx.ino = ino;
+ pctx.inode = inode;
+ ctx->stashed_ino = ino;
+
+ /* Clear trashed inode? */
+ if (pctx.errcode == EXT2_ET_INODE_IS_GARBAGE &&
+ inode->i_links_count > 0 &&
+ fix_problem(ctx, PR_1_INODE_IS_GARBAGE, &pctx)) {
+ pctx.errcode = 0;
+ e2fsck_clear_inode(ctx, ino, inode, 0, "pass1");
+ }
+ failed_csum = pctx.errcode != 0;
+
+ /*
+ * Check for inodes who might have been part of the
+ * orphaned list linked list. They should have gotten
+ * dealt with by now, unless the list had somehow been
+ * corrupted.
+ *
+ * FIXME: In the future, inodes which are still in use
+ * (and which are therefore) pending truncation should
+ * be handled specially. Right now we just clear the
+ * dtime field, and the normal e2fsck handling of
+ * inodes where i_size and the inode blocks are
+ * inconsistent is to fix i_size, instead of releasing
+ * the extra blocks. This won't catch the inodes that
+ * was at the end of the orphan list, but it's better
+ * than nothing. The right answer is that there
+ * shouldn't be any bugs in the orphan list handling. :-)
+ */
+ if (inode->i_dtime && low_dtime_check &&
+ inode->i_dtime < ctx->fs->super->s_inodes_count) {
+ if (fix_problem(ctx, PR_1_LOW_DTIME, &pctx)) {
+ inode->i_dtime = inode->i_links_count ?
+ 0 : ctx->now;
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ }
+
+ if (inode->i_links_count) {
+ pctx.errcode = ext2fs_icount_store(ctx->inode_link_info,
+ ino, inode->i_links_count);
+ if (pctx.errcode) {
+ pctx.num = inode->i_links_count;
+ fix_problem(ctx, PR_1_ICOUNT_STORE, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ } else if ((ino >= EXT2_FIRST_INODE(fs->super)) &&
+ !quota_inum_is_reserved(fs, ino)) {
+ if (!inode->i_dtime && inode->i_mode) {
+ if (fix_problem(ctx,
+ PR_1_ZERO_DTIME, &pctx)) {
+ inode->i_dtime = ctx->now;
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ }
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ }
+
+ if ((inode->i_flags & EXT4_CASEFOLD_FL) &&
+ ((!LINUX_S_ISDIR(inode->i_mode) &&
+ fix_problem(ctx, PR_1_CASEFOLD_NONDIR, &pctx)) ||
+ (!casefold_fs &&
+ fix_problem(ctx, PR_1_CASEFOLD_FEATURE, &pctx)))) {
+ inode->i_flags &= ~EXT4_CASEFOLD_FL;
+ e2fsck_write_inode(ctx, ino, inode, "pass1");
+ }
+
+ /* Conflicting inlinedata/extents inode flags? */
+ if ((inode->i_flags & EXT4_INLINE_DATA_FL) &&
+ (inode->i_flags & EXT4_EXTENTS_FL)) {
+ int res = fix_inline_data_extents_file(ctx, ino, inode,
+ inode_size,
+ &pctx);
+ if (res < 0) {
+ /* skip FINISH_INODE_LOOP */
+ continue;
+ }
+ }
+
+ /* Test for incorrect inline_data flags settings. */
+ if ((inode->i_flags & EXT4_INLINE_DATA_FL) && !inlinedata_fs &&
+ (ino >= EXT2_FIRST_INODE(fs->super))) {
+ size_t size = 0;
+
+ pctx.errcode = get_inline_data_ea_size(fs, ino, inode,
+ &size);
+ if (!pctx.errcode &&
+ fix_problem(ctx, PR_1_INLINE_DATA_FEATURE, &pctx)) {
+ ext2fs_set_feature_inline_data(sb);
+ ext2fs_mark_super_dirty(fs);
+ inlinedata_fs = 1;
+ } else if (fix_problem(ctx, PR_1_INLINE_DATA_SET, &pctx)) {
+ e2fsck_clear_inode(ctx, ino, inode, 0, "pass1");
+ /* skip FINISH_INODE_LOOP */
+ continue;
+ }
+ }
+
+ /* Test for inline data flag but no attr */
+ if ((inode->i_flags & EXT4_INLINE_DATA_FL) && inlinedata_fs &&
+ (ino >= EXT2_FIRST_INODE(fs->super))) {
+ size_t size = 0;
+ errcode_t err;
+ int flags;
+
+ flags = fs->flags;
+ if (failed_csum)
+ fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ err = get_inline_data_ea_size(fs, ino, inode, &size);
+ fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+
+ switch (err) {
+ case 0:
+ /* Everything is awesome... */
+ break;
+ case EXT2_ET_BAD_EA_BLOCK_NUM:
+ case EXT2_ET_BAD_EA_HASH:
+ case EXT2_ET_BAD_EA_HEADER:
+ case EXT2_ET_EA_BAD_NAME_LEN:
+ case EXT2_ET_EA_BAD_VALUE_SIZE:
+ case EXT2_ET_EA_KEY_NOT_FOUND:
+ case EXT2_ET_EA_NO_SPACE:
+ case EXT2_ET_MISSING_EA_FEATURE:
+ case EXT2_ET_INLINE_DATA_CANT_ITERATE:
+ case EXT2_ET_INLINE_DATA_NO_BLOCK:
+ case EXT2_ET_INLINE_DATA_NO_SPACE:
+ case EXT2_ET_NO_INLINE_DATA:
+ case EXT2_ET_EXT_ATTR_CSUM_INVALID:
+ case EXT2_ET_EA_BAD_VALUE_OFFSET:
+ case EXT2_ET_EA_INODE_CORRUPTED:
+ /* broken EA or no system.data EA; truncate */
+ if (fix_problem(ctx, PR_1_INLINE_DATA_NO_ATTR,
+ &pctx)) {
+ err = ext2fs_inode_size_set(fs, inode, 0);
+ if (err) {
+ pctx.errcode = err;
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ inode->i_flags &= ~EXT4_INLINE_DATA_FL;
+ memset(&inode->i_block, 0,
+ sizeof(inode->i_block));
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ break;
+ default:
+ /* Some other kind of non-xattr error? */
+ pctx.errcode = err;
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ }
+
+ /*
+ * Test for incorrect extent flag settings.
+ *
+ * On big-endian machines we must be careful:
+ * When the inode is read, the i_block array is not swapped
+ * if the extent flag is set. Therefore if we are testing
+ * for or fixing a wrongly-set flag, we must potentially
+ * (un)swap before testing, or after fixing.
+ */
+
+ /*
+ * In this case the extents flag was set when read, so
+ * extent_header_verify is ok. If the inode is cleared,
+ * no need to swap... so no extra swapping here.
+ */
+ if ((inode->i_flags & EXT4_EXTENTS_FL) && !extent_fs &&
+ (inode->i_links_count || (ino == EXT2_BAD_INO) ||
+ (ino == EXT2_ROOT_INO) || (ino == EXT2_JOURNAL_INO))) {
+ if ((ext2fs_extent_header_verify(inode->i_block,
+ sizeof(inode->i_block)) == 0) &&
+ fix_problem(ctx, PR_1_EXTENT_FEATURE, &pctx)) {
+ ext2fs_set_feature_extents(sb);
+ ext2fs_mark_super_dirty(fs);
+ extent_fs = 1;
+ } else if (fix_problem(ctx, PR_1_EXTENTS_SET, &pctx)) {
+ clear_inode:
+ e2fsck_clear_inode(ctx, ino, inode, 0, "pass1");
+ if (ino == EXT2_BAD_INO)
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map,
+ ino);
+ /* skip FINISH_INODE_LOOP */
+ continue;
+ }
+ }
+
+ /*
+ * For big-endian machines:
+ * If the inode didn't have the extents flag set when it
+ * was read, then the i_blocks array was swapped. To test
+ * as an extents header, we must swap it back first.
+ * IF we then set the extents flag, the entire i_block
+ * array must be un/re-swapped to make it proper extents data.
+ */
+ if (extent_fs && !(inode->i_flags & EXT4_EXTENTS_FL) &&
+ (inode->i_links_count || (ino == EXT2_BAD_INO) ||
+ (ino == EXT2_ROOT_INO) || (ino == EXT2_JOURNAL_INO)) &&
+ (LINUX_S_ISREG(inode->i_mode) ||
+ LINUX_S_ISDIR(inode->i_mode))) {
+ void *ehp;
+#ifdef WORDS_BIGENDIAN
+ __u32 tmp_block[EXT2_N_BLOCKS];
+
+ for (i = 0; i < EXT2_N_BLOCKS; i++)
+ tmp_block[i] = ext2fs_swab32(inode->i_block[i]);
+ ehp = tmp_block;
+#else
+ ehp = inode->i_block;
+#endif
+ if ((ext2fs_extent_header_verify(ehp,
+ sizeof(inode->i_block)) == 0) &&
+ (fix_problem(ctx, PR_1_UNSET_EXTENT_FL, &pctx))) {
+ inode->i_flags |= EXT4_EXTENTS_FL;
+#ifdef WORDS_BIGENDIAN
+ memcpy(inode->i_block, tmp_block,
+ sizeof(inode->i_block));
+#endif
+ e2fsck_write_inode(ctx, ino, inode, "pass1");
+ failed_csum = 0;
+ }
+ }
+
+ if (ino == EXT2_BAD_INO) {
+ struct process_block_struct pb;
+
+ if ((failed_csum || inode->i_mode || inode->i_uid ||
+ inode->i_gid || inode->i_links_count ||
+ (inode->i_flags & EXT4_INLINE_DATA_FL) ||
+ inode->i_file_acl) &&
+ fix_problem(ctx, PR_1_INVALID_BAD_INODE, &pctx)) {
+ memset(inode, 0, sizeof(struct ext2_inode));
+ e2fsck_write_inode(ctx, ino, inode,
+ "clear bad inode");
+ failed_csum = 0;
+ }
+
+ pctx.errcode = ext2fs_copy_bitmap(ctx->block_found_map,
+ &pb.fs_meta_blocks);
+ if (pctx.errcode) {
+ pctx.num = 4;
+ fix_problem(ctx, PR_1_ALLOCATE_BBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ pb.ino = EXT2_BAD_INO;
+ pb.num_blocks = pb.last_block = 0;
+ pb.last_db_block = -1;
+ pb.num_illegal_blocks = 0;
+ pb.suppress = 0; pb.clear = 0; pb.is_dir = 0;
+ pb.is_reg = 0; pb.fragmented = 0; pb.bbcheck = 0;
+ pb.inode = inode;
+ pb.pctx = &pctx;
+ pb.ctx = ctx;
+ pctx.errcode = ext2fs_block_iterate3(fs, ino, 0,
+ block_buf, process_bad_block, &pb);
+ ext2fs_free_block_bitmap(pb.fs_meta_blocks);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_BLOCK_ITERATE, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ if (pb.bbcheck)
+ if (!fix_problem(ctx, PR_1_BBINODE_BAD_METABLOCK_PROMPT, &pctx)) {
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ clear_problem_context(&pctx);
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ } else if (ino == EXT2_ROOT_INO) {
+ /*
+ * Make sure the root inode is a directory; if
+ * not, offer to clear it. It will be
+ * regenerated in pass #3.
+ */
+ if (!LINUX_S_ISDIR(inode->i_mode)) {
+ if (fix_problem(ctx, PR_1_ROOT_NO_DIR, &pctx))
+ goto clear_inode;
+ }
+ /*
+ * If dtime is set, offer to clear it. mke2fs
+ * version 0.2b created filesystems with the
+ * dtime field set for the root and lost+found
+ * directories. We won't worry about
+ * /lost+found, since that can be regenerated
+ * easily. But we will fix the root directory
+ * as a special case.
+ */
+ if (inode->i_dtime && inode->i_links_count) {
+ if (fix_problem(ctx, PR_1_ROOT_DTIME, &pctx)) {
+ inode->i_dtime = 0;
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ }
+ } else if (ino == EXT2_JOURNAL_INO) {
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ if (fs->super->s_journal_inum == EXT2_JOURNAL_INO) {
+ if (!LINUX_S_ISREG(inode->i_mode) &&
+ fix_problem(ctx, PR_1_JOURNAL_BAD_MODE,
+ &pctx)) {
+ inode->i_mode = LINUX_S_IFREG;
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ check_blocks(ctx, &pctx, block_buf, NULL);
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ }
+ if ((inode->i_links_count ||
+ inode->i_blocks || inode->i_block[0]) &&
+ fix_problem(ctx, PR_1_JOURNAL_INODE_NOT_CLEAR,
+ &pctx)) {
+ memset(inode, 0, inode_size);
+ ext2fs_icount_store(ctx->inode_link_info,
+ ino, 0);
+ e2fsck_write_inode_full(ctx, ino, inode,
+ inode_size, "pass1");
+ failed_csum = 0;
+ }
+ } else if (quota_inum_is_reserved(fs, ino)) {
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ if (ext2fs_has_feature_quota(fs->super) &&
+ quota_inum_is_super(fs->super, ino)) {
+ if (!LINUX_S_ISREG(inode->i_mode) &&
+ fix_problem(ctx, PR_1_QUOTA_BAD_MODE,
+ &pctx)) {
+ inode->i_mode = LINUX_S_IFREG;
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ check_blocks(ctx, &pctx, block_buf, NULL);
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ }
+ if ((inode->i_links_count ||
+ inode->i_blocks || inode->i_block[0]) &&
+ fix_problem(ctx, PR_1_QUOTA_INODE_NOT_CLEAR,
+ &pctx)) {
+ memset(inode, 0, inode_size);
+ ext2fs_icount_store(ctx->inode_link_info,
+ ino, 0);
+ e2fsck_write_inode_full(ctx, ino, inode,
+ inode_size, "pass1");
+ failed_csum = 0;
+ }
+ } else if (ino == fs->super->s_orphan_file_inum) {
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ if (ext2fs_has_feature_orphan_file(fs->super)) {
+ if (!LINUX_S_ISREG(inode->i_mode) &&
+ fix_problem(ctx, PR_1_ORPHAN_FILE_BAD_MODE,
+ &pctx)) {
+ inode->i_mode = LINUX_S_IFREG;
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ check_blocks(ctx, &pctx, block_buf, NULL);
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ }
+ if ((inode->i_links_count ||
+ inode->i_blocks || inode->i_block[0]) &&
+ fix_problem(ctx, PR_1_ORPHAN_FILE_NOT_CLEAR,
+ &pctx)) {
+ memset(inode, 0, inode_size);
+ ext2fs_icount_store(ctx->inode_link_info, ino,
+ 0);
+ e2fsck_write_inode_full(ctx, ino, inode,
+ inode_size, "pass1");
+ failed_csum = 0;
+ }
+ } else if (ino < EXT2_FIRST_INODE(fs->super)) {
+ problem_t problem = 0;
+
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ if (ino == EXT2_BOOT_LOADER_INO) {
+ if (LINUX_S_ISDIR(inode->i_mode))
+ problem = PR_1_RESERVED_BAD_MODE;
+ } else if (ino == EXT2_RESIZE_INO) {
+ if (inode->i_mode &&
+ !LINUX_S_ISREG(inode->i_mode))
+ problem = PR_1_RESERVED_BAD_MODE;
+ } else {
+ if (inode->i_mode != 0)
+ problem = PR_1_RESERVED_BAD_MODE;
+ }
+ if (problem) {
+ if (fix_problem(ctx, problem, &pctx)) {
+ inode->i_mode = 0;
+ e2fsck_write_inode(ctx, ino, inode,
+ "pass1");
+ failed_csum = 0;
+ }
+ }
+ check_blocks(ctx, &pctx, block_buf, NULL);
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ }
+
+ if (!inode->i_links_count) {
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ }
+ /*
+ * n.b. 0.3c ext2fs code didn't clear i_links_count for
+ * deleted files. Oops.
+ *
+ * Since all new ext2 implementations get this right,
+ * we now assume that the case of non-zero
+ * i_links_count and non-zero dtime means that we
+ * should keep the file, not delete it.
+ *
+ */
+ if (inode->i_dtime) {
+ if (fix_problem(ctx, PR_1_SET_DTIME, &pctx)) {
+ inode->i_dtime = 0;
+ e2fsck_write_inode(ctx, ino, inode, "pass1");
+ failed_csum = 0;
+ }
+ }
+
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ switch (fs->super->s_creator_os) {
+ case EXT2_OS_HURD:
+ frag = inode->osd2.hurd2.h_i_frag;
+ fsize = inode->osd2.hurd2.h_i_fsize;
+ break;
+ default:
+ frag = fsize = 0;
+ }
+
+ if (inode->i_faddr || frag || fsize ||
+ (!ext2fs_has_feature_largedir(fs->super) &&
+ (LINUX_S_ISDIR(inode->i_mode) && inode->i_size_high)))
+ mark_inode_bad(ctx, ino);
+ if ((fs->super->s_creator_os != EXT2_OS_HURD) &&
+ !ext2fs_has_feature_64bit(fs->super) &&
+ inode->osd2.linux2.l_i_file_acl_high != 0)
+ mark_inode_bad(ctx, ino);
+ if ((fs->super->s_creator_os != EXT2_OS_HURD) &&
+ !ext2fs_has_feature_huge_file(fs->super) &&
+ (inode->osd2.linux2.l_i_blocks_hi != 0))
+ mark_inode_bad(ctx, ino);
+ if (inode->i_flags & EXT2_IMAGIC_FL) {
+ if (imagic_fs) {
+ if (!ctx->inode_imagic_map)
+ alloc_imagic_map(ctx);
+ ext2fs_mark_inode_bitmap2(ctx->inode_imagic_map,
+ ino);
+ } else {
+ if (fix_problem(ctx, PR_1_SET_IMAGIC, &pctx)) {
+ inode->i_flags &= ~EXT2_IMAGIC_FL;
+ e2fsck_write_inode(ctx, ino,
+ inode, "pass1");
+ failed_csum = 0;
+ }
+ }
+ }
+
+ check_inode_extra_space(ctx, &pctx, &ea_ibody_quota);
+ check_is_really_dir(ctx, &pctx, block_buf);
+
+ /*
+ * ext2fs_inode_has_valid_blocks2 does not actually look
+ * at i_block[] values, so not endian-sensitive here.
+ */
+ if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL) &&
+ LINUX_S_ISLNK(inode->i_mode) &&
+ !ext2fs_inode_has_valid_blocks2(fs, inode) &&
+ fix_problem(ctx, PR_1_FAST_SYMLINK_EXTENT_FL, &pctx)) {
+ inode->i_flags &= ~EXT4_EXTENTS_FL;
+ e2fsck_write_inode(ctx, ino, inode, "pass1");
+ failed_csum = 0;
+ }
+
+ if ((inode->i_flags & EXT4_ENCRYPT_FL) &&
+ add_encrypted_file(ctx, &pctx) < 0)
+ goto clear_inode;
+
+ if (casefold_fs && inode->i_flags & EXT4_CASEFOLD_FL)
+ ext2fs_mark_inode_bitmap2(ctx->inode_casefold_map, ino);
+
+ if (LINUX_S_ISDIR(inode->i_mode)) {
+ ext2fs_mark_inode_bitmap2(ctx->inode_dir_map, ino);
+ e2fsck_add_dir_info(ctx, ino, 0);
+ ctx->fs_directory_count++;
+ if (inode->i_flags & EXT4_CASEFOLD_FL)
+ add_casefolded_dir(ctx, ino);
+ } else if (LINUX_S_ISREG (inode->i_mode)) {
+ ext2fs_mark_inode_bitmap2(ctx->inode_reg_map, ino);
+ ctx->fs_regular_count++;
+ } else if (LINUX_S_ISCHR (inode->i_mode) &&
+ e2fsck_pass1_check_device_inode(fs, inode)) {
+ check_extents_inlinedata(ctx, &pctx);
+ check_immutable(ctx, &pctx);
+ check_size(ctx, &pctx);
+ ctx->fs_chardev_count++;
+ } else if (LINUX_S_ISBLK (inode->i_mode) &&
+ e2fsck_pass1_check_device_inode(fs, inode)) {
+ check_extents_inlinedata(ctx, &pctx);
+ check_immutable(ctx, &pctx);
+ check_size(ctx, &pctx);
+ ctx->fs_blockdev_count++;
+ } else if (LINUX_S_ISLNK (inode->i_mode) &&
+ e2fsck_pass1_check_symlink(fs, ino, inode,
+ block_buf)) {
+ check_immutable(ctx, &pctx);
+ ctx->fs_symlinks_count++;
+ if (inode->i_flags & EXT4_INLINE_DATA_FL) {
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ } else if (ext2fs_is_fast_symlink(inode)) {
+ ctx->fs_fast_symlinks_count++;
+ check_blocks(ctx, &pctx, block_buf,
+ &ea_ibody_quota);
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+ continue;
+ }
+ }
+ else if (LINUX_S_ISFIFO (inode->i_mode) &&
+ e2fsck_pass1_check_device_inode(fs, inode)) {
+ check_extents_inlinedata(ctx, &pctx);
+ check_immutable(ctx, &pctx);
+ check_size(ctx, &pctx);
+ ctx->fs_fifo_count++;
+ } else if ((LINUX_S_ISSOCK (inode->i_mode)) &&
+ e2fsck_pass1_check_device_inode(fs, inode)) {
+ check_extents_inlinedata(ctx, &pctx);
+ check_immutable(ctx, &pctx);
+ check_size(ctx, &pctx);
+ ctx->fs_sockets_count++;
+ } else
+ mark_inode_bad(ctx, ino);
+ if (!(inode->i_flags & EXT4_EXTENTS_FL) &&
+ !(inode->i_flags & EXT4_INLINE_DATA_FL)) {
+ if (inode->i_block[EXT2_IND_BLOCK])
+ ctx->fs_ind_count++;
+ if (inode->i_block[EXT2_DIND_BLOCK])
+ ctx->fs_dind_count++;
+ if (inode->i_block[EXT2_TIND_BLOCK])
+ ctx->fs_tind_count++;
+ }
+ if (!(inode->i_flags & EXT4_EXTENTS_FL) &&
+ !(inode->i_flags & EXT4_INLINE_DATA_FL) &&
+ (inode->i_block[EXT2_IND_BLOCK] ||
+ inode->i_block[EXT2_DIND_BLOCK] ||
+ inode->i_block[EXT2_TIND_BLOCK] ||
+ ext2fs_file_acl_block(fs, inode))) {
+ struct process_inode_block *itp;
+
+ itp = &inodes_to_process[process_inode_count];
+ itp->ino = ino;
+ itp->ea_ibody_quota = ea_ibody_quota;
+ if (inode_size < sizeof(struct ext2_inode_large))
+ memcpy(&itp->inode, inode, inode_size);
+ else
+ memcpy(&itp->inode, inode, sizeof(itp->inode));
+ process_inode_count++;
+ } else
+ check_blocks(ctx, &pctx, block_buf, &ea_ibody_quota);
+
+ FINISH_INODE_LOOP(ctx, ino, &pctx, failed_csum);
+
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto endit;
+
+ if (process_inode_count >= ctx->process_inode_size) {
+ process_inodes(ctx, block_buf);
+
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto endit;
+ }
+ }
+ process_inodes(ctx, block_buf);
+ ext2fs_close_inode_scan(scan);
+ scan = NULL;
+
+ reserve_block_for_root_repair(ctx);
+ reserve_block_for_lnf_repair(ctx);
+
+ /*
+ * If any extended attribute blocks' reference counts need to
+ * be adjusted, either up (ctx->refcount_extra), or down
+ * (ctx->refcount), then fix them.
+ */
+ if (ctx->refcount) {
+ adjust_extattr_refcount(ctx, ctx->refcount, block_buf, -1);
+ ea_refcount_free(ctx->refcount);
+ ctx->refcount = 0;
+ }
+ if (ctx->refcount_extra) {
+ adjust_extattr_refcount(ctx, ctx->refcount_extra,
+ block_buf, +1);
+ ea_refcount_free(ctx->refcount_extra);
+ ctx->refcount_extra = 0;
+ }
+
+ if (ctx->ea_block_quota_blocks) {
+ ea_refcount_free(ctx->ea_block_quota_blocks);
+ ctx->ea_block_quota_blocks = 0;
+ }
+
+ if (ctx->ea_block_quota_inodes) {
+ ea_refcount_free(ctx->ea_block_quota_inodes);
+ ctx->ea_block_quota_inodes = 0;
+ }
+
+ if (ctx->invalid_bitmaps)
+ handle_fs_bad_blocks(ctx);
+
+ /* We don't need the block_ea_map any more */
+ if (ctx->block_ea_map) {
+ ext2fs_free_block_bitmap(ctx->block_ea_map);
+ ctx->block_ea_map = 0;
+ }
+
+ /* We don't need the encryption policy => ID map any more */
+ destroy_encryption_policy_map(ctx);
+
+ if (ctx->flags & E2F_FLAG_RESIZE_INODE) {
+ clear_problem_context(&pctx);
+ pctx.errcode = ext2fs_create_resize_inode(fs);
+ if (pctx.errcode) {
+ if (!fix_problem(ctx, PR_1_RESIZE_INODE_CREATE,
+ &pctx)) {
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto endit;
+ }
+ pctx.errcode = 0;
+ }
+ if (!pctx.errcode) {
+ e2fsck_read_inode(ctx, EXT2_RESIZE_INO, inode,
+ "recreate inode");
+ inode->i_mtime = ctx->now;
+ e2fsck_write_inode(ctx, EXT2_RESIZE_INO, inode,
+ "recreate inode");
+ }
+ ctx->flags &= ~E2F_FLAG_RESIZE_INODE;
+ }
+
+ if (ctx->flags & E2F_FLAG_RESTART) {
+ /*
+ * Only the master copy of the superblock and block
+ * group descriptors are going to be written during a
+ * restart, so set the superblock to be used to be the
+ * master superblock.
+ */
+ ctx->use_superblock = 0;
+ goto endit;
+ }
+
+ if (ctx->large_dirs && !ext2fs_has_feature_largedir(fs->super)) {
+ if (fix_problem(ctx, PR_2_FEATURE_LARGE_DIRS, &pctx)) {
+ ext2fs_set_feature_largedir(fs->super);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ ext2fs_mark_super_dirty(fs);
+ }
+ if (fs->super->s_rev_level == EXT2_GOOD_OLD_REV &&
+ fix_problem(ctx, PR_1_FS_REV_LEVEL, &pctx)) {
+ ext2fs_update_dynamic_rev(fs);
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+ if (ctx->block_dup_map) {
+ if (ctx->options & E2F_OPT_PREEN) {
+ clear_problem_context(&pctx);
+ fix_problem(ctx, PR_1_DUP_BLOCKS_PREENSTOP, &pctx);
+ }
+ e2fsck_pass1_dupblocks(ctx, block_buf);
+ }
+ ctx->flags |= E2F_FLAG_ALLOC_OK;
+endit:
+ e2fsck_use_inode_shortcuts(ctx, 0);
+ ext2fs_free_mem(&inodes_to_process);
+ inodes_to_process = 0;
+
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ if (block_buf)
+ ext2fs_free_mem(&block_buf);
+ if (inode)
+ ext2fs_free_mem(&inode);
+
+ /*
+ * The l+f inode may have been cleared, so zap it now and
+ * later passes will recalculate it if necessary
+ */
+ ctx->lost_and_found = 0;
+
+ if ((ctx->flags & E2F_FLAG_SIGNAL_MASK) == 0)
+ print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io);
+ else
+ ctx->invalid_bitmaps++;
+}
+#undef FINISH_INODE_LOOP
+
+/*
+ * When the inode_scan routines call this callback at the end of the
+ * glock group, call process_inodes.
+ */
+static errcode_t scan_callback(ext2_filsys fs,
+ ext2_inode_scan scan EXT2FS_ATTR((unused)),
+ dgrp_t group, void * priv_data)
+{
+ struct scan_callback_struct *scan_struct;
+ e2fsck_t ctx;
+
+ scan_struct = (struct scan_callback_struct *) priv_data;
+ ctx = scan_struct->ctx;
+
+ process_inodes((e2fsck_t) fs->priv_data, scan_struct->block_buf);
+
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 1, group+1,
+ ctx->fs->group_desc_count))
+ return EXT2_ET_CANCEL_REQUESTED;
+
+ return 0;
+}
+
+/*
+ * Process the inodes in the "inodes to process" list.
+ */
+static void process_inodes(e2fsck_t ctx, char *block_buf)
+{
+ int i;
+ struct ext2_inode *old_stashed_inode;
+ ext2_ino_t old_stashed_ino;
+ const char *old_operation;
+ char buf[80];
+ struct problem_context pctx;
+
+#if 0
+ printf("begin process_inodes: ");
+#endif
+ if (process_inode_count == 0)
+ return;
+ old_operation = ehandler_operation(0);
+ old_stashed_inode = ctx->stashed_inode;
+ old_stashed_ino = ctx->stashed_ino;
+ qsort(inodes_to_process, process_inode_count,
+ sizeof(struct process_inode_block), process_inode_cmp);
+ clear_problem_context(&pctx);
+ for (i=0; i < process_inode_count; i++) {
+ pctx.inode = ctx->stashed_inode =
+ (struct ext2_inode *) &inodes_to_process[i].inode;
+ pctx.ino = ctx->stashed_ino = inodes_to_process[i].ino;
+
+#if 0
+ printf("%u ", pctx.ino);
+#endif
+ sprintf(buf, _("reading indirect blocks of inode %u"),
+ pctx.ino);
+ ehandler_operation(buf);
+ check_blocks(ctx, &pctx, block_buf,
+ &inodes_to_process[i].ea_ibody_quota);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ break;
+ }
+ ctx->stashed_inode = old_stashed_inode;
+ ctx->stashed_ino = old_stashed_ino;
+ process_inode_count = 0;
+#if 0
+ printf("end process inodes\n");
+#endif
+ ehandler_operation(old_operation);
+}
+
+static EXT2_QSORT_TYPE process_inode_cmp(const void *a, const void *b)
+{
+ const struct process_inode_block *ib_a =
+ (const struct process_inode_block *) a;
+ const struct process_inode_block *ib_b =
+ (const struct process_inode_block *) b;
+ int ret;
+
+ ret = (ib_a->inode.i_block[EXT2_IND_BLOCK] -
+ ib_b->inode.i_block[EXT2_IND_BLOCK]);
+ if (ret == 0)
+ /*
+ * We only call process_inodes() for non-extent
+ * inodes, so it's OK to pass NULL to
+ * ext2fs_file_acl_block() here.
+ */
+ ret = ext2fs_file_acl_block(0, ext2fs_const_inode(&ib_a->inode)) -
+ ext2fs_file_acl_block(0, ext2fs_const_inode(&ib_b->inode));
+ if (ret == 0)
+ ret = ib_a->ino - ib_b->ino;
+ return ret;
+}
+
+/*
+ * Mark an inode as being bad in some what
+ */
+static void mark_inode_bad(e2fsck_t ctx, ext2_ino_t ino)
+{
+ struct problem_context pctx;
+
+ if (!ctx->inode_bad_map) {
+ clear_problem_context(&pctx);
+
+ pctx.errcode = e2fsck_allocate_inode_bitmap(ctx->fs,
+ _("bad inode map"), EXT2FS_BMAP64_RBTREE,
+ "inode_bad_map", &ctx->inode_bad_map);
+ if (pctx.errcode) {
+ pctx.num = 3;
+ fix_problem(ctx, PR_1_ALLOCATE_IBITMAP_ERROR, &pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ ext2fs_mark_inode_bitmap2(ctx->inode_bad_map, ino);
+}
+
+static void add_casefolded_dir(e2fsck_t ctx, ext2_ino_t ino)
+{
+ struct problem_context pctx;
+
+ if (!ctx->casefolded_dirs) {
+ pctx.errcode = ext2fs_u32_list_create(&ctx->casefolded_dirs, 0);
+ if (pctx.errcode)
+ goto error;
+ }
+ pctx.errcode = ext2fs_u32_list_add(ctx->casefolded_dirs, ino);
+ if (pctx.errcode == 0)
+ return;
+error:
+ fix_problem(ctx, PR_1_ALLOCATE_CASEFOLDED_DIRLIST, &pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+}
+
+/*
+ * This procedure will allocate the inode "bb" (badblock) map table
+ */
+static void alloc_bb_map(e2fsck_t ctx)
+{
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+ pctx.errcode = e2fsck_allocate_inode_bitmap(ctx->fs,
+ _("inode in bad block map"), EXT2FS_BMAP64_RBTREE,
+ "inode_bb_map", &ctx->inode_bb_map);
+ if (pctx.errcode) {
+ pctx.num = 4;
+ fix_problem(ctx, PR_1_ALLOCATE_IBITMAP_ERROR, &pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+}
+
+/*
+ * This procedure will allocate the inode imagic table
+ */
+static void alloc_imagic_map(e2fsck_t ctx)
+{
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+ pctx.errcode = e2fsck_allocate_inode_bitmap(ctx->fs,
+ _("imagic inode map"), EXT2FS_BMAP64_RBTREE,
+ "inode_imagic_map", &ctx->inode_imagic_map);
+ if (pctx.errcode) {
+ pctx.num = 5;
+ fix_problem(ctx, PR_1_ALLOCATE_IBITMAP_ERROR, &pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+}
+
+/*
+ * Marks a block as in use, setting the dup_map if it's been set
+ * already. Called by process_block and process_bad_block.
+ *
+ * WARNING: Assumes checks have already been done to make sure block
+ * is valid. This is true in both process_block and process_bad_block.
+ */
+static _INLINE_ void mark_block_used(e2fsck_t ctx, blk64_t block)
+{
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ if (ext2fs_fast_test_block_bitmap2(ctx->block_found_map, block)) {
+ if (ext2fs_has_feature_shared_blocks(ctx->fs->super) &&
+ !(ctx->options & E2F_OPT_UNSHARE_BLOCKS)) {
+ return;
+ }
+ if (!ctx->block_dup_map) {
+ pctx.errcode = e2fsck_allocate_block_bitmap(ctx->fs,
+ _("multiply claimed block map"),
+ EXT2FS_BMAP64_RBTREE, "block_dup_map",
+ &ctx->block_dup_map);
+ if (pctx.errcode) {
+ pctx.num = 3;
+ fix_problem(ctx, PR_1_ALLOCATE_BBITMAP_ERROR,
+ &pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ ext2fs_fast_mark_block_bitmap2(ctx->block_dup_map, block);
+ } else {
+ ext2fs_fast_mark_block_bitmap2(ctx->block_found_map, block);
+ }
+}
+
+/*
+ * When cluster size is greater than one block, it is caller's responsibility
+ * to make sure block parameter starts at a cluster boundary.
+ */
+static _INLINE_ void mark_blocks_used(e2fsck_t ctx, blk64_t block,
+ unsigned int num)
+{
+ if (ext2fs_test_block_bitmap_range2(ctx->block_found_map, block, num))
+ ext2fs_mark_block_bitmap_range2(ctx->block_found_map, block, num);
+ else {
+ unsigned int i;
+
+ for (i = 0; i < num; i += EXT2FS_CLUSTER_RATIO(ctx->fs))
+ mark_block_used(ctx, block + i);
+ }
+}
+
+/*
+ * Adjust the extended attribute block's reference counts at the end
+ * of pass 1, either by subtracting out references for EA blocks that
+ * are still referenced in ctx->refcount, or by adding references for
+ * EA blocks that had extra references as accounted for in
+ * ctx->refcount_extra.
+ */
+static void adjust_extattr_refcount(e2fsck_t ctx, ext2_refcount_t refcount,
+ char *block_buf, int adjust_sign)
+{
+ struct ext2_ext_attr_header *header;
+ struct problem_context pctx;
+ ext2_filsys fs = ctx->fs;
+ blk64_t blk;
+ __u32 should_be;
+ ea_value_t count;
+
+ clear_problem_context(&pctx);
+
+ ea_refcount_intr_begin(refcount);
+ while (1) {
+ if ((blk = ea_refcount_intr_next(refcount, &count)) == 0)
+ break;
+ pctx.blk = blk;
+ pctx.errcode = ext2fs_read_ext_attr3(fs, blk, block_buf,
+ pctx.ino);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_EXTATTR_READ_ABORT, &pctx);
+ return;
+ }
+ header = (struct ext2_ext_attr_header *) block_buf;
+ pctx.blkcount = header->h_refcount;
+ should_be = header->h_refcount + adjust_sign * (int)count;
+ pctx.num = should_be;
+ if (fix_problem(ctx, PR_1_EXTATTR_REFCOUNT, &pctx)) {
+ header->h_refcount = should_be;
+ pctx.errcode = ext2fs_write_ext_attr3(fs, blk,
+ block_buf,
+ pctx.ino);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_EXTATTR_WRITE_ABORT,
+ &pctx);
+ continue;
+ }
+ }
+ }
+}
+
+/*
+ * Handle processing the extended attribute blocks
+ */
+static int check_ext_attr(e2fsck_t ctx, struct problem_context *pctx,
+ char *block_buf, struct ea_quota *ea_block_quota)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino = pctx->ino;
+ struct ext2_inode *inode = pctx->inode;
+ blk64_t blk;
+ char * end;
+ struct ext2_ext_attr_header *header;
+ struct ext2_ext_attr_entry *first, *entry;
+ blk64_t quota_blocks = EXT2FS_C2B(fs, 1);
+ __u64 quota_inodes = 0;
+ region_t region = 0;
+ int failed_csum = 0;
+
+ ea_block_quota->blocks = 0;
+ ea_block_quota->inodes = 0;
+
+ blk = ext2fs_file_acl_block(fs, inode);
+ if (blk == 0)
+ return 0;
+
+ /*
+ * If the Extended attribute flag isn't set, then a non-zero
+ * file acl means that the inode is corrupted.
+ *
+ * Or if the extended attribute block is an invalid block,
+ * then the inode is also corrupted.
+ */
+ if (!ext2fs_has_feature_xattr(fs->super) ||
+ (blk < fs->super->s_first_data_block) ||
+ (blk >= ext2fs_blocks_count(fs->super))) {
+ mark_inode_bad(ctx, ino);
+ return 0;
+ }
+
+ /* If ea bitmap hasn't been allocated, create it */
+ if (!ctx->block_ea_map) {
+ pctx->errcode = e2fsck_allocate_block_bitmap(fs,
+ _("ext attr block map"),
+ EXT2FS_BMAP64_RBTREE, "block_ea_map",
+ &ctx->block_ea_map);
+ if (pctx->errcode) {
+ pctx->num = 2;
+ fix_problem(ctx, PR_1_ALLOCATE_BBITMAP_ERROR, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+ }
+ }
+
+ /* Create the EA refcount structure if necessary */
+ if (!ctx->refcount) {
+ pctx->errcode = ea_refcount_create(0, &ctx->refcount);
+ if (pctx->errcode) {
+ pctx->num = 1;
+ fix_problem(ctx, PR_1_ALLOCATE_REFCOUNT, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+ }
+ }
+
+#if 0
+ /* Debugging text */
+ printf("Inode %u has EA block %u\n", ino, blk);
+#endif
+
+ /* Have we seen this EA block before? */
+ if (ext2fs_fast_test_block_bitmap2(ctx->block_ea_map, blk)) {
+ ea_block_quota->blocks = EXT2FS_C2B(fs, 1);
+ ea_block_quota->inodes = 0;
+
+ if (ctx->ea_block_quota_blocks) {
+ ea_refcount_fetch(ctx->ea_block_quota_blocks, blk,
+ &quota_blocks);
+ if (quota_blocks)
+ ea_block_quota->blocks = quota_blocks;
+ }
+
+ if (ctx->ea_block_quota_inodes)
+ ea_refcount_fetch(ctx->ea_block_quota_inodes, blk,
+ &ea_block_quota->inodes);
+
+ if (ea_refcount_decrement(ctx->refcount, blk, 0) == 0)
+ return 1;
+ /* Ooops, this EA was referenced more than it stated */
+ if (!ctx->refcount_extra) {
+ pctx->errcode = ea_refcount_create(0,
+ &ctx->refcount_extra);
+ if (pctx->errcode) {
+ pctx->num = 2;
+ fix_problem(ctx, PR_1_ALLOCATE_REFCOUNT, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+ }
+ }
+ ea_refcount_increment(ctx->refcount_extra, blk, 0);
+ return 1;
+ }
+
+ /*
+ * OK, we haven't seen this EA block yet. So we need to
+ * validate it
+ */
+ pctx->blk = blk;
+ pctx->errcode = ext2fs_read_ext_attr3(fs, blk, block_buf, pctx->ino);
+ if (pctx->errcode == EXT2_ET_EXT_ATTR_CSUM_INVALID) {
+ pctx->errcode = 0;
+ failed_csum = 1;
+ } else if (pctx->errcode == EXT2_ET_BAD_EA_HEADER)
+ pctx->errcode = 0;
+
+ if (pctx->errcode &&
+ fix_problem(ctx, PR_1_READ_EA_BLOCK, pctx)) {
+ pctx->errcode = 0;
+ goto clear_extattr;
+ }
+ header = (struct ext2_ext_attr_header *) block_buf;
+ pctx->blk = ext2fs_file_acl_block(fs, inode);
+ if (((ctx->ext_attr_ver == 1) &&
+ (header->h_magic != EXT2_EXT_ATTR_MAGIC_v1)) ||
+ ((ctx->ext_attr_ver == 2) &&
+ (header->h_magic != EXT2_EXT_ATTR_MAGIC))) {
+ if (fix_problem(ctx, PR_1_BAD_EA_BLOCK, pctx))
+ goto clear_extattr;
+ }
+
+ if (header->h_blocks != 1) {
+ if (fix_problem(ctx, PR_1_EA_MULTI_BLOCK, pctx))
+ goto clear_extattr;
+ }
+
+ if (pctx->errcode && fix_problem(ctx, PR_1_READ_EA_BLOCK, pctx))
+ goto clear_extattr;
+
+ region = region_create(0, fs->blocksize);
+ if (!region) {
+ fix_problem(ctx, PR_1_EA_ALLOC_REGION_ABORT, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+ }
+ if (region_allocate(region, 0, sizeof(struct ext2_ext_attr_header))) {
+ if (fix_problem(ctx, PR_1_EA_ALLOC_COLLISION, pctx))
+ goto clear_extattr;
+ }
+
+ first = (struct ext2_ext_attr_entry *)(header+1);
+ end = block_buf + fs->blocksize;
+ entry = first;
+ while ((char *)entry < end && *(__u32 *)entry) {
+ __u32 hash;
+
+ if (region_allocate(region, (char *)entry - (char *)header,
+ EXT2_EXT_ATTR_LEN(entry->e_name_len))) {
+ if (fix_problem(ctx, PR_1_EA_ALLOC_COLLISION, pctx))
+ goto clear_extattr;
+ break;
+ }
+ if ((ctx->ext_attr_ver == 1 &&
+ (entry->e_name_len == 0 || entry->e_name_index != 0)) ||
+ (ctx->ext_attr_ver == 2 &&
+ entry->e_name_index == 0)) {
+ if (fix_problem(ctx, PR_1_EA_BAD_NAME, pctx))
+ goto clear_extattr;
+ break;
+ }
+ if (entry->e_value_inum == 0) {
+ if (entry->e_value_size > EXT2_XATTR_SIZE_MAX ||
+ (entry->e_value_offs + entry->e_value_size >
+ fs->blocksize)) {
+ if (fix_problem(ctx, PR_1_EA_BAD_VALUE, pctx))
+ goto clear_extattr;
+ break;
+ }
+ if (entry->e_value_size &&
+ region_allocate(region, entry->e_value_offs,
+ EXT2_EXT_ATTR_SIZE(entry->e_value_size))) {
+ if (fix_problem(ctx, PR_1_EA_ALLOC_COLLISION,
+ pctx))
+ goto clear_extattr;
+ }
+
+ hash = ext2fs_ext_attr_hash_entry(entry, block_buf +
+ entry->e_value_offs);
+ if (entry->e_hash != hash)
+ hash = ext2fs_ext_attr_hash_entry_signed(entry,
+ block_buf + entry->e_value_offs);
+
+ if (entry->e_hash != hash) {
+ pctx->num = entry->e_hash;
+ if (fix_problem(ctx, PR_1_ATTR_HASH, pctx))
+ goto clear_extattr;
+ entry->e_hash = hash;
+ }
+ } else {
+ problem_t problem;
+ blk64_t entry_quota_blocks;
+
+ problem = check_large_ea_inode(ctx, entry, pctx,
+ &entry_quota_blocks);
+ if (problem && fix_problem(ctx, problem, pctx))
+ goto clear_extattr;
+
+ quota_blocks += entry_quota_blocks;
+ quota_inodes++;
+ }
+
+ entry = EXT2_EXT_ATTR_NEXT(entry);
+ }
+ if (region_allocate(region, (char *)entry - (char *)header, 4)) {
+ if (fix_problem(ctx, PR_1_EA_ALLOC_COLLISION, pctx))
+ goto clear_extattr;
+ }
+ region_free(region);
+
+ /*
+ * We only get here if there was no other errors that were fixed.
+ * If there was a checksum fail, ask to correct it.
+ */
+ if (failed_csum &&
+ fix_problem(ctx, PR_1_EA_BLOCK_ONLY_CSUM_INVALID, pctx)) {
+ pctx->errcode = ext2fs_write_ext_attr3(fs, blk, block_buf,
+ pctx->ino);
+ if (pctx->errcode)
+ return 0;
+ }
+
+ if (quota_blocks != EXT2FS_C2B(fs, 1U)) {
+ if (!ctx->ea_block_quota_blocks) {
+ pctx->errcode = ea_refcount_create(0,
+ &ctx->ea_block_quota_blocks);
+ if (pctx->errcode) {
+ pctx->num = 3;
+ goto refcount_fail;
+ }
+ }
+ ea_refcount_store(ctx->ea_block_quota_blocks, blk,
+ quota_blocks);
+ }
+
+ if (quota_inodes) {
+ if (!ctx->ea_block_quota_inodes) {
+ pctx->errcode = ea_refcount_create(0,
+ &ctx->ea_block_quota_inodes);
+ if (pctx->errcode) {
+ pctx->num = 4;
+refcount_fail:
+ fix_problem(ctx, PR_1_ALLOCATE_REFCOUNT, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+ }
+ }
+
+ ea_refcount_store(ctx->ea_block_quota_inodes, blk,
+ quota_inodes);
+ }
+ ea_block_quota->blocks = quota_blocks;
+ ea_block_quota->inodes = quota_inodes;
+
+ inc_ea_inode_refs(ctx, pctx, first, end);
+ ea_refcount_store(ctx->refcount, blk, header->h_refcount - 1);
+ mark_block_used(ctx, blk);
+ ext2fs_fast_mark_block_bitmap2(ctx->block_ea_map, blk);
+ return 1;
+
+clear_extattr:
+ if (region)
+ region_free(region);
+ ext2fs_file_acl_block_set(fs, inode, 0);
+ e2fsck_write_inode(ctx, ino, inode, "check_ext_attr");
+ return 0;
+}
+
+/* Returns 1 if bad htree, 0 if OK */
+static int handle_htree(e2fsck_t ctx, struct problem_context *pctx,
+ ext2_ino_t ino, struct ext2_inode *inode,
+ char *block_buf)
+{
+ struct ext2_dx_root_info *root;
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ blk64_t blk;
+
+ if ((!LINUX_S_ISDIR(inode->i_mode) &&
+ fix_problem(ctx, PR_1_HTREE_NODIR, pctx)) ||
+ (!ext2fs_has_feature_dir_index(fs->super) &&
+ fix_problem(ctx, PR_1_HTREE_SET, pctx)))
+ return 1;
+
+ pctx->errcode = ext2fs_bmap2(fs, ino, inode, 0, 0, 0, 0, &blk);
+
+ if ((pctx->errcode) ||
+ (blk == 0) ||
+ (blk < fs->super->s_first_data_block) ||
+ (blk >= ext2fs_blocks_count(fs->super))) {
+ if (fix_problem(ctx, PR_1_HTREE_BADROOT, pctx))
+ return 1;
+ else
+ return 0;
+ }
+
+ retval = io_channel_read_blk64(fs->io, blk, 1, block_buf);
+ if (retval && fix_problem(ctx, PR_1_HTREE_BADROOT, pctx))
+ return 1;
+
+ /* XXX should check that beginning matches a directory */
+ root = (struct ext2_dx_root_info *) (block_buf + 24);
+
+ if ((root->reserved_zero || root->info_length < 8) &&
+ fix_problem(ctx, PR_1_HTREE_BADROOT, pctx))
+ return 1;
+
+ pctx->num = root->hash_version;
+ if ((root->hash_version != EXT2_HASH_LEGACY) &&
+ (root->hash_version != EXT2_HASH_HALF_MD4) &&
+ (root->hash_version != EXT2_HASH_TEA) &&
+ (root->hash_version != EXT2_HASH_SIPHASH) &&
+ fix_problem(ctx, PR_1_HTREE_HASHV, pctx))
+ return 1;
+
+ if (ext4_hash_in_dirent(inode)) {
+ if (root->hash_version != EXT2_HASH_SIPHASH &&
+ fix_problem(ctx, PR_1_HTREE_NEEDS_SIPHASH, pctx))
+ return 1;
+ } else {
+ if (root->hash_version == EXT2_HASH_SIPHASH &&
+ fix_problem(ctx, PR_1_HTREE_CANNOT_SIPHASH, pctx))
+ return 1;
+ }
+
+ if ((root->unused_flags & EXT2_HASH_FLAG_INCOMPAT) &&
+ fix_problem(ctx, PR_1_HTREE_INCOMPAT, pctx))
+ return 1;
+
+ pctx->num = root->indirect_levels;
+ /* if htree level is clearly too high, consider it to be broken */
+ if (root->indirect_levels > EXT4_HTREE_LEVEL &&
+ fix_problem(ctx, PR_1_HTREE_DEPTH, pctx))
+ return 1;
+
+ /* if level is only maybe too high, LARGE_DIR feature could be unset */
+ if (root->indirect_levels > ext2_dir_htree_level(fs) &&
+ !ext2fs_has_feature_largedir(fs->super)) {
+ int blockbits = EXT2_BLOCK_SIZE_BITS(fs->super) + 10;
+ unsigned idx_pb = 1 << (blockbits - 3);
+
+ /* compare inode size/blocks vs. max-sized 2-level htree */
+ if (EXT2_I_SIZE(pctx->inode) <
+ (idx_pb - 1) * (idx_pb - 2) << blockbits &&
+ pctx->inode->i_blocks <
+ (idx_pb - 1) * (idx_pb - 2) << (blockbits - 9) &&
+ fix_problem(ctx, PR_1_HTREE_DEPTH, pctx))
+ return 1;
+ }
+
+ if (root->indirect_levels > EXT4_HTREE_LEVEL_COMPAT ||
+ ext2fs_needs_large_file_feature(EXT2_I_SIZE(inode)))
+ ctx->large_dirs++;
+
+ return 0;
+}
+
+void e2fsck_clear_inode(e2fsck_t ctx, ext2_ino_t ino,
+ struct ext2_inode *inode, int restart_flag,
+ const char *source)
+{
+ inode->i_flags = 0;
+ inode->i_links_count = 0;
+ ext2fs_icount_store(ctx->inode_link_info, ino, 0);
+ inode->i_dtime = ctx->now;
+
+ /*
+ * If a special inode has such rotten block mappings that we
+ * want to clear the whole inode, be sure to actually zap
+ * the block maps because i_links_count isn't checked for
+ * special inodes, and we'll end up right back here the next
+ * time we run fsck.
+ */
+ if (ino < EXT2_FIRST_INODE(ctx->fs->super))
+ memset(inode->i_block, 0, sizeof(inode->i_block));
+
+ ext2fs_unmark_inode_bitmap2(ctx->inode_dir_map, ino);
+ ext2fs_unmark_inode_bitmap2(ctx->inode_used_map, ino);
+ if (ctx->inode_reg_map)
+ ext2fs_unmark_inode_bitmap2(ctx->inode_reg_map, ino);
+ if (ctx->inode_bad_map)
+ ext2fs_unmark_inode_bitmap2(ctx->inode_bad_map, ino);
+
+ /*
+ * If the inode was partially accounted for before processing
+ * was aborted, we need to restart the pass 1 scan.
+ */
+ ctx->flags |= restart_flag;
+
+ if (ino == EXT2_BAD_INO)
+ memset(inode, 0, sizeof(struct ext2_inode));
+
+ e2fsck_write_inode(ctx, ino, inode, source);
+}
+
+/*
+ * Use the multiple-blocks reclamation code to fix alignment problems in
+ * a bigalloc filesystem. We want a logical cluster to map to *only* one
+ * physical cluster, and we want the block offsets within that cluster to
+ * line up.
+ */
+static int has_unaligned_cluster_map(e2fsck_t ctx,
+ blk64_t last_pblk, blk64_t last_lblk,
+ blk64_t pblk, blk64_t lblk)
+{
+ blk64_t cluster_mask;
+
+ if (!ctx->fs->cluster_ratio_bits)
+ return 0;
+ cluster_mask = EXT2FS_CLUSTER_MASK(ctx->fs);
+
+ /*
+ * If the block in the logical cluster doesn't align with the block in
+ * the physical cluster...
+ */
+ if ((lblk & cluster_mask) != (pblk & cluster_mask))
+ return 1;
+
+ /*
+ * If we cross a physical cluster boundary within a logical cluster...
+ */
+ if (last_pblk && (lblk & cluster_mask) != 0 &&
+ EXT2FS_B2C(ctx->fs, lblk) == EXT2FS_B2C(ctx->fs, last_lblk) &&
+ EXT2FS_B2C(ctx->fs, pblk) != EXT2FS_B2C(ctx->fs, last_pblk))
+ return 1;
+
+ return 0;
+}
+
+static void scan_extent_node(e2fsck_t ctx, struct problem_context *pctx,
+ struct process_block_struct *pb,
+ blk64_t start_block, blk64_t end_block,
+ blk64_t eof_block,
+ ext2_extent_handle_t ehandle,
+ int try_repairs)
+{
+ struct ext2fs_extent extent;
+ blk64_t blk, last_lblk;
+ unsigned int i, n;
+ int is_dir, is_leaf;
+ problem_t problem;
+ struct ext2_extent_info info;
+ int failed_csum = 0;
+
+ if (pctx->errcode == EXT2_ET_EXTENT_CSUM_INVALID)
+ failed_csum = 1;
+
+ pctx->errcode = ext2fs_extent_get_info(ehandle, &info);
+ if (pctx->errcode)
+ return;
+ if (!(ctx->options & E2F_OPT_FIXES_ONLY) &&
+ !pb->eti.force_rebuild &&
+ info.curr_level < MAX_EXTENT_DEPTH_COUNT) {
+ struct extent_tree_level *etl;
+
+ etl = pb->eti.ext_info + info.curr_level;
+ etl->num_extents += info.num_entries;
+ etl->max_extents += info.max_entries;
+ /*
+ * Implementation wart: Splitting extent blocks when appending
+ * will leave the old block with one free entry. Therefore
+ * unless the node is totally full, pretend that a non-root
+ * extent block can hold one fewer entry than it actually does,
+ * so that we don't repeatedly rebuild the extent tree.
+ */
+ if (info.curr_level && info.num_entries < info.max_entries)
+ etl->max_extents--;
+ }
+
+ pctx->errcode = ext2fs_extent_get(ehandle, EXT2_EXTENT_FIRST_SIB,
+ &extent);
+ while ((pctx->errcode == 0 ||
+ pctx->errcode == EXT2_ET_EXTENT_CSUM_INVALID) &&
+ info.num_entries-- > 0) {
+ is_leaf = extent.e_flags & EXT2_EXTENT_FLAGS_LEAF;
+ is_dir = LINUX_S_ISDIR(pctx->inode->i_mode);
+ last_lblk = extent.e_lblk + extent.e_len - 1;
+
+ problem = 0;
+ pctx->blk = extent.e_pblk;
+ pctx->blk2 = extent.e_lblk;
+ pctx->num = extent.e_len;
+ pctx->blkcount = extent.e_lblk + extent.e_len;
+
+ if (extent.e_pblk == 0 ||
+ extent.e_pblk < ctx->fs->super->s_first_data_block ||
+ extent.e_pblk >= ext2fs_blocks_count(ctx->fs->super))
+ problem = PR_1_EXTENT_BAD_START_BLK;
+ else if (extent.e_lblk < start_block)
+ problem = PR_1_OUT_OF_ORDER_EXTENTS;
+ else if ((end_block && last_lblk > end_block) &&
+ !(last_lblk > eof_block &&
+ ((extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT) ||
+ (pctx->inode->i_flags & EXT4_VERITY_FL))))
+ problem = PR_1_EXTENT_END_OUT_OF_BOUNDS;
+ else if (is_leaf && extent.e_len == 0)
+ problem = PR_1_EXTENT_LENGTH_ZERO;
+ else if (is_leaf &&
+ (extent.e_pblk + extent.e_len) >
+ ext2fs_blocks_count(ctx->fs->super))
+ problem = PR_1_EXTENT_ENDS_BEYOND;
+ else if (is_leaf && is_dir && !pctx->inode->i_size_high &&
+ !ext2fs_has_feature_largedir(ctx->fs->super) &&
+ ((extent.e_lblk + extent.e_len) >
+ (1U << (21 - ctx->fs->super->s_log_block_size))))
+ problem = PR_1_TOOBIG_DIR;
+
+ if (is_leaf && problem == 0 && extent.e_len > 0) {
+#if 0
+ printf("extent_region(ino=%u, expect=%llu, "
+ "lblk=%llu, len=%u)\n", pb->ino,
+ (unsigned long long) pb->next_lblock,
+ (unsigned long long) extent.e_lblk,
+ extent.e_len);
+#endif
+ if (extent.e_lblk < pb->next_lblock)
+ problem = PR_1_EXTENT_COLLISION;
+ else if (extent.e_lblk + extent.e_len > pb->next_lblock)
+ pb->next_lblock = extent.e_lblk + extent.e_len;
+ }
+
+ /*
+ * Uninitialized blocks in a directory? Clear the flag and
+ * we'll interpret the blocks later.
+ */
+ if (try_repairs && is_dir && problem == 0 &&
+ (extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ fix_problem(ctx, PR_1_UNINIT_DBLOCK, pctx)) {
+ extent.e_flags &= ~EXT2_EXTENT_FLAGS_UNINIT;
+ pb->inode_modified = 1;
+ pctx->errcode = ext2fs_extent_replace(ehandle, 0,
+ &extent);
+ if (pctx->errcode)
+ return;
+ failed_csum = 0;
+ }
+#ifdef CONFIG_DEVELOPER_FEATURES
+ if (try_repairs && !is_dir && problem == 0 &&
+ (ctx->options & E2F_OPT_CLEAR_UNINIT) &&
+ (extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ fix_problem(ctx, PR_1_CLEAR_UNINIT_EXTENT, pctx)) {
+ extent.e_flags &= ~EXT2_EXTENT_FLAGS_UNINIT;
+ pb->inode_modified = 1;
+ pctx->errcode = ext2fs_extent_replace(ehandle, 0,
+ &extent);
+ if (pctx->errcode)
+ return;
+ failed_csum = 0;
+ }
+#endif
+ if (try_repairs && problem) {
+report_problem:
+ if (fix_problem(ctx, problem, pctx)) {
+ if (ctx->invalid_bitmaps) {
+ /*
+ * If fsck knows the bitmaps are bad,
+ * skip to the next extent and
+ * try to clear this extent again
+ * after fixing the bitmaps, by
+ * restarting fsck.
+ */
+ pctx->errcode = ext2fs_extent_get(
+ ehandle,
+ EXT2_EXTENT_NEXT_SIB,
+ &extent);
+ ctx->flags |= E2F_FLAG_RESTART_LATER;
+ if (pctx->errcode ==
+ EXT2_ET_NO_CURRENT_NODE) {
+ pctx->errcode = 0;
+ break;
+ }
+ continue;
+ }
+ e2fsck_read_bitmaps(ctx);
+ pb->inode_modified = 1;
+ pctx->errcode =
+ ext2fs_extent_delete(ehandle, 0);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_extent_delete";
+ return;
+ }
+ pctx->errcode = ext2fs_extent_fix_parents(ehandle);
+ if (pctx->errcode &&
+ pctx->errcode != EXT2_ET_NO_CURRENT_NODE) {
+ pctx->str = "ext2fs_extent_fix_parents";
+ return;
+ }
+ pctx->errcode = ext2fs_extent_get(ehandle,
+ EXT2_EXTENT_CURRENT,
+ &extent);
+ if (pctx->errcode == EXT2_ET_NO_CURRENT_NODE) {
+ pctx->errcode = 0;
+ break;
+ }
+ failed_csum = 0;
+ continue;
+ }
+ goto next;
+ }
+
+ if (!is_leaf) {
+ blk64_t lblk = extent.e_lblk;
+ int next_try_repairs = 1;
+
+ blk = extent.e_pblk;
+
+ /*
+ * If this lower extent block collides with critical
+ * metadata, don't try to repair the damage. Pass 1b
+ * will reallocate the block; then we can try again.
+ */
+ if (pb->ino != EXT2_RESIZE_INO &&
+ extent.e_pblk < ctx->fs->super->s_blocks_count &&
+ ext2fs_test_block_bitmap2(ctx->block_metadata_map,
+ extent.e_pblk)) {
+ next_try_repairs = 0;
+ pctx->blk = blk;
+ fix_problem(ctx,
+ PR_1_CRITICAL_METADATA_COLLISION,
+ pctx);
+ if ((ctx->options & E2F_OPT_NO) == 0)
+ ctx->flags |= E2F_FLAG_RESTART_LATER;
+ }
+ pctx->errcode = ext2fs_extent_get(ehandle,
+ EXT2_EXTENT_DOWN, &extent);
+ if (pctx->errcode &&
+ pctx->errcode != EXT2_ET_EXTENT_CSUM_INVALID) {
+ pctx->str = "EXT2_EXTENT_DOWN";
+ problem = PR_1_EXTENT_HEADER_INVALID;
+ if (!next_try_repairs)
+ return;
+ if (pctx->errcode == EXT2_ET_EXTENT_HEADER_BAD)
+ goto report_problem;
+ return;
+ }
+ /* The next extent should match this index's logical start */
+ if (extent.e_lblk != lblk) {
+ struct ext2_extent_info e_info;
+
+ pctx->errcode = ext2fs_extent_get_info(ehandle,
+ &e_info);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_extent_get_info";
+ return;
+ }
+ pctx->blk = lblk;
+ pctx->blk2 = extent.e_lblk;
+ pctx->num = e_info.curr_level - 1;
+ problem = PR_1_EXTENT_INDEX_START_INVALID;
+ if (fix_problem(ctx, problem, pctx)) {
+ pb->inode_modified = 1;
+ pctx->errcode =
+ ext2fs_extent_fix_parents(ehandle);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_extent_fix_parents";
+ return;
+ }
+ }
+ }
+ scan_extent_node(ctx, pctx, pb, extent.e_lblk,
+ last_lblk, eof_block, ehandle,
+ next_try_repairs);
+ if (pctx->errcode)
+ return;
+ pctx->errcode = ext2fs_extent_get(ehandle,
+ EXT2_EXTENT_UP, &extent);
+ if (pctx->errcode) {
+ pctx->str = "EXT2_EXTENT_UP";
+ return;
+ }
+ mark_block_used(ctx, blk);
+ pb->num_blocks++;
+ goto next;
+ }
+
+ if ((pb->previous_block != 0) &&
+ (pb->previous_block+1 != extent.e_pblk)) {
+ if (ctx->options & E2F_OPT_FRAGCHECK) {
+ char type = '?';
+
+ if (pb->is_dir)
+ type = 'd';
+ else if (pb->is_reg)
+ type = 'f';
+
+ printf(("%6lu(%c): expecting %6lu "
+ "actual extent "
+ "phys %6lu log %lu len %lu\n"),
+ (unsigned long) pctx->ino, type,
+ (unsigned long) pb->previous_block+1,
+ (unsigned long) extent.e_pblk,
+ (unsigned long) extent.e_lblk,
+ (unsigned long) extent.e_len);
+ }
+ pb->fragmented = 1;
+ }
+ /*
+ * If we notice a gap in the logical block mappings of an
+ * extent-mapped directory, offer to close the hole by
+ * moving the logical block down, otherwise we'll go mad in
+ * pass 3 allocating empty directory blocks to fill the hole.
+ */
+ if (try_repairs && is_dir &&
+ pb->last_block + 1 < extent.e_lblk) {
+ blk64_t new_lblk;
+
+ new_lblk = pb->last_block + 1;
+ if (EXT2FS_CLUSTER_RATIO(ctx->fs) > 1)
+ new_lblk = ((new_lblk +
+ EXT2FS_CLUSTER_RATIO(ctx->fs) - 1) &
+ ~EXT2FS_CLUSTER_MASK(ctx->fs)) |
+ (extent.e_pblk &
+ EXT2FS_CLUSTER_MASK(ctx->fs));
+ pctx->blk = extent.e_lblk;
+ pctx->blk2 = new_lblk;
+ if (fix_problem(ctx, PR_1_COLLAPSE_DBLOCK, pctx)) {
+ extent.e_lblk = new_lblk;
+ pb->inode_modified = 1;
+ pctx->errcode = ext2fs_extent_replace(ehandle,
+ 0, &extent);
+ if (pctx->errcode) {
+ pctx->errcode = 0;
+ goto alloc_later;
+ }
+ pctx->errcode = ext2fs_extent_fix_parents(ehandle);
+ if (pctx->errcode)
+ goto failed_add_dir_block;
+ pctx->errcode = ext2fs_extent_goto(ehandle,
+ extent.e_lblk);
+ if (pctx->errcode)
+ goto failed_add_dir_block;
+ last_lblk = extent.e_lblk + extent.e_len - 1;
+ failed_csum = 0;
+ }
+ }
+alloc_later:
+ if (is_dir) {
+ while (++pb->last_db_block <
+ (e2_blkcnt_t) extent.e_lblk) {
+ pctx->errcode = ext2fs_add_dir_block2(
+ ctx->fs->dblist,
+ pb->ino, 0,
+ pb->last_db_block);
+ if (pctx->errcode) {
+ pctx->blk = 0;
+ pctx->num = pb->last_db_block;
+ goto failed_add_dir_block;
+ }
+ }
+
+ for (i = 0; i < extent.e_len; i++) {
+ pctx->errcode = ext2fs_add_dir_block2(
+ ctx->fs->dblist,
+ pctx->ino,
+ extent.e_pblk + i,
+ extent.e_lblk + i);
+ if (pctx->errcode) {
+ pctx->blk = extent.e_pblk + i;
+ pctx->num = extent.e_lblk + i;
+ failed_add_dir_block:
+ fix_problem(ctx, PR_1_ADD_DBLOCK, pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ if (extent.e_len > 0)
+ pb->last_db_block = extent.e_lblk + extent.e_len - 1;
+ }
+ if (has_unaligned_cluster_map(ctx, pb->previous_block,
+ pb->last_block,
+ extent.e_pblk,
+ extent.e_lblk)) {
+ for (i = 0; i < extent.e_len; i++) {
+ pctx->blk = extent.e_lblk + i;
+ pctx->blk2 = extent.e_pblk + i;
+ fix_problem(ctx, PR_1_MISALIGNED_CLUSTER, pctx);
+ mark_block_used(ctx, extent.e_pblk + i);
+ mark_block_used(ctx, extent.e_pblk + i);
+ }
+ }
+
+ /*
+ * Check whether first cluster got marked in previous iteration.
+ */
+ if (ctx->fs->cluster_ratio_bits &&
+ pb->previous_block &&
+ (EXT2FS_B2C(ctx->fs, extent.e_pblk) ==
+ EXT2FS_B2C(ctx->fs, pb->previous_block)))
+ /* Set blk to the beginning of next cluster. */
+ blk = EXT2FS_C2B(
+ ctx->fs,
+ EXT2FS_B2C(ctx->fs, extent.e_pblk) + 1);
+ else
+ /* Set blk to the beginning of current cluster. */
+ blk = EXT2FS_C2B(ctx->fs,
+ EXT2FS_B2C(ctx->fs, extent.e_pblk));
+
+ if (blk < extent.e_pblk + extent.e_len) {
+ mark_blocks_used(ctx, blk,
+ extent.e_pblk + extent.e_len - blk);
+ n = DIV_ROUND_UP(extent.e_pblk + extent.e_len - blk,
+ EXT2FS_CLUSTER_RATIO(ctx->fs));
+ pb->num_blocks += n;
+ }
+ pb->last_block = extent.e_lblk + extent.e_len - 1;
+ pb->previous_block = extent.e_pblk + extent.e_len - 1;
+ start_block = pb->last_block = last_lblk;
+ if (is_leaf && !is_dir &&
+ !(extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT))
+ pb->last_init_lblock = last_lblk;
+ next:
+ pctx->errcode = ext2fs_extent_get(ehandle,
+ EXT2_EXTENT_NEXT_SIB,
+ &extent);
+ }
+
+ /* Failed csum but passes checks? Ask to fix checksum. */
+ if (failed_csum &&
+ fix_problem(ctx, PR_1_EXTENT_ONLY_CSUM_INVALID, pctx)) {
+ pb->inode_modified = 1;
+ pctx->errcode = ext2fs_extent_replace(ehandle, 0, &extent);
+ if (pctx->errcode)
+ return;
+ }
+
+ if (pctx->errcode == EXT2_ET_EXTENT_NO_NEXT)
+ pctx->errcode = 0;
+}
+
+static void check_blocks_extents(e2fsck_t ctx, struct problem_context *pctx,
+ struct process_block_struct *pb)
+{
+ struct ext2_extent_info info;
+ struct ext2_inode *inode = pctx->inode;
+ ext2_extent_handle_t ehandle;
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino = pctx->ino;
+ errcode_t retval;
+ blk64_t eof_lblk;
+ struct ext3_extent_header *eh;
+
+ /* Check for a proper extent header... */
+ eh = (struct ext3_extent_header *) &inode->i_block[0];
+ retval = ext2fs_extent_header_verify(eh, sizeof(inode->i_block));
+ if (retval) {
+ if (fix_problem(ctx, PR_1_MISSING_EXTENT_HEADER, pctx))
+ e2fsck_clear_inode(ctx, ino, inode, 0,
+ "check_blocks_extents");
+ pctx->errcode = 0;
+ return;
+ }
+
+ /* ...since this function doesn't fail if i_block is zeroed. */
+ pctx->errcode = ext2fs_extent_open2(fs, ino, inode, &ehandle);
+ if (pctx->errcode) {
+ if (fix_problem(ctx, PR_1_READ_EXTENT, pctx))
+ e2fsck_clear_inode(ctx, ino, inode, 0,
+ "check_blocks_extents");
+ pctx->errcode = 0;
+ return;
+ }
+
+ retval = ext2fs_extent_get_info(ehandle, &info);
+ if (retval == 0) {
+ int max_depth = info.max_depth;
+
+ if (max_depth >= MAX_EXTENT_DEPTH_COUNT)
+ max_depth = MAX_EXTENT_DEPTH_COUNT-1;
+ ctx->extent_depth_count[max_depth]++;
+ }
+
+ /* Check maximum extent depth */
+ pctx->blk = info.max_depth;
+ pctx->blk2 = ext2fs_max_extent_depth(ehandle);
+ if (pctx->blk2 < pctx->blk &&
+ fix_problem(ctx, PR_1_EXTENT_BAD_MAX_DEPTH, pctx))
+ pb->eti.force_rebuild = 1;
+
+ /* Can we collect extent tree level stats? */
+ pctx->blk = MAX_EXTENT_DEPTH_COUNT;
+ if (pctx->blk2 > pctx->blk)
+ fix_problem(ctx, PR_1E_MAX_EXTENT_TREE_DEPTH, pctx);
+ memset(pb->eti.ext_info, 0, sizeof(pb->eti.ext_info));
+ pb->eti.ino = pb->ino;
+
+ pb->next_lblock = 0;
+
+ eof_lblk = ((EXT2_I_SIZE(inode) + fs->blocksize - 1) >>
+ EXT2_BLOCK_SIZE_BITS(fs->super)) - 1;
+ scan_extent_node(ctx, pctx, pb, 0, 0, eof_lblk, ehandle, 1);
+ if (pctx->errcode &&
+ fix_problem(ctx, PR_1_EXTENT_ITERATE_FAILURE, pctx)) {
+ pb->num_blocks = 0;
+ inode->i_blocks = 0;
+ e2fsck_clear_inode(ctx, ino, inode, E2F_FLAG_RESTART,
+ "check_blocks_extents");
+ pctx->errcode = 0;
+ }
+ ext2fs_extent_free(ehandle);
+
+ /* Rebuild unless it's a dir and we're rehashing it */
+ if (LINUX_S_ISDIR(inode->i_mode) &&
+ e2fsck_dir_will_be_rehashed(ctx, ino))
+ return;
+
+ if (ctx->options & E2F_OPT_CONVERT_BMAP)
+ e2fsck_rebuild_extents_later(ctx, ino);
+ else
+ e2fsck_should_rebuild_extents(ctx, pctx, &pb->eti, &info);
+}
+
+/*
+ * In fact we don't need to check blocks for an inode with inline data
+ * because this inode doesn't have any blocks. In this function all
+ * we need to do is add this inode into dblist when it is a directory.
+ */
+static void check_blocks_inline_data(e2fsck_t ctx, struct problem_context *pctx,
+ struct process_block_struct *pb)
+{
+ int flags;
+ size_t inline_data_size = 0;
+
+ if (!pb->is_dir) {
+ pctx->errcode = 0;
+ return;
+ }
+
+ /* Process the dirents in i_block[] as the "first" block. */
+ pctx->errcode = ext2fs_add_dir_block2(ctx->fs->dblist, pb->ino, 0, 0);
+ if (pctx->errcode)
+ goto err;
+
+ /* Process the dirents in the EA as a "second" block. */
+ flags = ctx->fs->flags;
+ ctx->fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ pctx->errcode = ext2fs_inline_data_size(ctx->fs, pb->ino,
+ &inline_data_size);
+ ctx->fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (ctx->fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+ if (pctx->errcode) {
+ pctx->errcode = 0;
+ return;
+ }
+
+ if (inline_data_size <= EXT4_MIN_INLINE_DATA_SIZE)
+ return;
+
+ pctx->errcode = ext2fs_add_dir_block2(ctx->fs->dblist, pb->ino, 0, 1);
+ if (pctx->errcode)
+ goto err;
+
+ return;
+err:
+ pctx->blk = 0;
+ pctx->num = 0;
+ fix_problem(ctx, PR_1_ADD_DBLOCK, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+}
+
+/*
+ * This subroutine is called on each inode to account for all of the
+ * blocks used by that inode.
+ */
+static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
+ char *block_buf, const struct ea_quota *ea_ibody_quota)
+{
+ ext2_filsys fs = ctx->fs;
+ struct process_block_struct pb;
+ ext2_ino_t ino = pctx->ino;
+ struct ext2_inode *inode = pctx->inode;
+ unsigned bad_size = 0;
+ int dirty_inode = 0;
+ int extent_fs;
+ int inlinedata_fs;
+ __u64 size;
+ struct ea_quota ea_block_quota;
+
+ pb.ino = ino;
+ pb.num_blocks = EXT2FS_B2C(ctx->fs,
+ ea_ibody_quota ? ea_ibody_quota->blocks : 0);
+ pb.last_block = ~0;
+ pb.last_init_lblock = -1;
+ pb.last_db_block = -1;
+ pb.num_illegal_blocks = 0;
+ pb.suppress = 0; pb.clear = 0;
+ pb.fragmented = 0;
+ pb.compressed = 0;
+ pb.previous_block = 0;
+ pb.is_dir = LINUX_S_ISDIR(inode->i_mode);
+ pb.is_reg = LINUX_S_ISREG(inode->i_mode);
+ pb.max_blocks = 1U << (31 - fs->super->s_log_block_size);
+ pb.inode = inode;
+ pb.pctx = pctx;
+ pb.ctx = ctx;
+ pb.inode_modified = 0;
+ pb.eti.force_rebuild = 0;
+ pctx->ino = ino;
+ pctx->errcode = 0;
+
+ extent_fs = ext2fs_has_feature_extents(ctx->fs->super);
+ inlinedata_fs = ext2fs_has_feature_inline_data(ctx->fs->super);
+
+ if (check_ext_attr(ctx, pctx, block_buf, &ea_block_quota)) {
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto out;
+ pb.num_blocks += EXT2FS_B2C(ctx->fs, ea_block_quota.blocks);
+ }
+
+ if (inlinedata_fs && (inode->i_flags & EXT4_INLINE_DATA_FL))
+ check_blocks_inline_data(ctx, pctx, &pb);
+ else if (ext2fs_inode_has_valid_blocks2(fs, inode)) {
+ if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL))
+ check_blocks_extents(ctx, pctx, &pb);
+ else {
+ int flags;
+ /*
+ * If we've modified the inode, write it out before
+ * iterate() tries to use it.
+ */
+ if (dirty_inode) {
+ e2fsck_write_inode(ctx, ino, inode,
+ "check_blocks");
+ dirty_inode = 0;
+ }
+ flags = fs->flags;
+ fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ pctx->errcode = ext2fs_block_iterate3(fs, ino,
+ pb.is_dir ? BLOCK_FLAG_HOLE : 0,
+ block_buf, process_block, &pb);
+ /*
+ * We do not have uninitialized extents in non extent
+ * files.
+ */
+ pb.last_init_lblock = pb.last_block;
+ /*
+ * If iterate() changed a block mapping, we have to
+ * re-read the inode. If we decide to clear the
+ * inode after clearing some stuff, we'll re-write the
+ * bad mappings into the inode!
+ */
+ if (pb.inode_modified)
+ e2fsck_read_inode(ctx, ino, inode,
+ "check_blocks");
+ fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+
+ if (ctx->options & E2F_OPT_CONVERT_BMAP) {
+#ifdef DEBUG
+ printf("bmap rebuild ino=%d\n", ino);
+#endif
+ if (!LINUX_S_ISDIR(inode->i_mode) ||
+ !e2fsck_dir_will_be_rehashed(ctx, ino))
+ e2fsck_rebuild_extents_later(ctx, ino);
+ }
+ }
+ }
+ end_problem_latch(ctx, PR_LATCH_BLOCK);
+ end_problem_latch(ctx, PR_LATCH_TOOBIG);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto out;
+ if (pctx->errcode)
+ fix_problem(ctx, PR_1_BLOCK_ITERATE, pctx);
+
+ if (pb.fragmented && pb.num_blocks < fs->super->s_blocks_per_group) {
+ if (LINUX_S_ISDIR(inode->i_mode))
+ ctx->fs_fragmented_dir++;
+ else
+ ctx->fs_fragmented++;
+ }
+
+ if (pb.clear) {
+ e2fsck_clear_inode(ctx, ino, inode, E2F_FLAG_RESTART,
+ "check_blocks");
+ return;
+ }
+
+ if (inode->i_flags & EXT2_INDEX_FL) {
+ if (handle_htree(ctx, pctx, ino, inode, block_buf)) {
+ inode->i_flags &= ~EXT2_INDEX_FL;
+ dirty_inode++;
+ } else {
+ e2fsck_add_dx_dir(ctx, ino, inode, pb.last_block+1);
+ }
+ }
+
+ if (!pb.num_blocks && pb.is_dir &&
+ !(inode->i_flags & EXT4_INLINE_DATA_FL)) {
+ if (fix_problem(ctx, PR_1_ZERO_LENGTH_DIR, pctx)) {
+ e2fsck_clear_inode(ctx, ino, inode, 0, "check_blocks");
+ ctx->fs_directory_count--;
+ return;
+ }
+ }
+
+ if (ino != quota_type2inum(PRJQUOTA, fs->super) &&
+ ino != fs->super->s_orphan_file_inum &&
+ (ino == EXT2_ROOT_INO || ino >= EXT2_FIRST_INODE(ctx->fs->super)) &&
+ !(inode->i_flags & EXT4_EA_INODE_FL)) {
+ quota_data_add(ctx->qctx, (struct ext2_inode_large *) inode,
+ ino,
+ pb.num_blocks * EXT2_CLUSTER_SIZE(fs->super));
+ quota_data_inodes(ctx->qctx, (struct ext2_inode_large *) inode,
+ ino, (ea_ibody_quota ?
+ ea_ibody_quota->inodes : 0) +
+ ea_block_quota.inodes + 1);
+ }
+
+ if (!ext2fs_has_feature_huge_file(fs->super) ||
+ !(inode->i_flags & EXT4_HUGE_FILE_FL))
+ pb.num_blocks *= (fs->blocksize / 512);
+ pb.num_blocks *= EXT2FS_CLUSTER_RATIO(fs);
+#if 0
+ printf("inode %u, i_size = %u, last_block = %llu, i_blocks=%llu, num_blocks = %llu\n",
+ ino, inode->i_size, (unsigned long long) pb.last_block,
+ (unsigned long long) ext2fs_inode_i_blocks(fs, inode),
+ (unsigned long long) pb.num_blocks);
+#endif
+ size = EXT2_I_SIZE(inode);
+ if (pb.is_dir) {
+ unsigned nblock = size >> EXT2_BLOCK_SIZE_BITS(fs->super);
+ if (inode->i_flags & EXT4_INLINE_DATA_FL) {
+ int flags;
+ size_t sz = 0;
+ errcode_t err;
+
+ flags = ctx->fs->flags;
+ ctx->fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ err = ext2fs_inline_data_size(ctx->fs, pctx->ino,
+ &sz);
+ ctx->fs->flags = (flags &
+ EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (ctx->fs->flags &
+ ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+ if (err || sz != size) {
+ bad_size = 7;
+ pctx->num = sz;
+ }
+ } else if (size & (fs->blocksize - 1))
+ bad_size = 5;
+ else if (nblock > (pb.last_block + 1))
+ bad_size = 1;
+ else if (nblock < (pb.last_block + 1)) {
+ if (((pb.last_block + 1) - nblock) >
+ fs->super->s_prealloc_dir_blocks)
+ bad_size = 2;
+ }
+ } else {
+ if ((pb.last_init_lblock >= 0) &&
+ /* Do not allow initialized allocated blocks past i_size*/
+ (size < (__u64)pb.last_init_lblock * fs->blocksize) &&
+ !(inode->i_flags & EXT4_VERITY_FL))
+ bad_size = 3;
+ else if (!(extent_fs && (inode->i_flags & EXT4_EXTENTS_FL)) &&
+ size > ext2_max_sizes[fs->super->s_log_block_size])
+ /* too big for a direct/indirect-mapped file */
+ bad_size = 4;
+ else if ((extent_fs && (inode->i_flags & EXT4_EXTENTS_FL)) &&
+ size >
+ ((1ULL << (32 + EXT2_BLOCK_SIZE_BITS(fs->super))) - 1))
+ /* too big for an extent-based file - 32bit ee_block */
+ bad_size = 6;
+ }
+ /* i_size for symlinks is checked elsewhere */
+ if (bad_size && !LINUX_S_ISLNK(inode->i_mode)) {
+ /* Did inline_data set pctx->num earlier? */
+ if (bad_size != 7)
+ pctx->num = (pb.last_block + 1) * fs->blocksize;
+ pctx->group = bad_size;
+ if (fix_problem(ctx, PR_1_BAD_I_SIZE, pctx)) {
+ ext2fs_inode_size_set(fs, inode, pctx->num);
+ if (EXT2_I_SIZE(inode) == 0 &&
+ (inode->i_flags & EXT4_INLINE_DATA_FL)) {
+ memset(inode->i_block, 0,
+ sizeof(inode->i_block));
+ inode->i_flags &= ~EXT4_INLINE_DATA_FL;
+ }
+ dirty_inode++;
+ }
+ pctx->num = 0;
+ }
+ if (LINUX_S_ISREG(inode->i_mode) &&
+ ext2fs_needs_large_file_feature(EXT2_I_SIZE(inode)))
+ ctx->large_files++;
+ if ((fs->super->s_creator_os != EXT2_OS_HURD) &&
+ ((pb.num_blocks != ext2fs_inode_i_blocks(fs, inode)) ||
+ (ext2fs_has_feature_huge_file(fs->super) &&
+ (inode->i_flags & EXT4_HUGE_FILE_FL) &&
+ (inode->osd2.linux2.l_i_blocks_hi != 0)))) {
+ pctx->num = pb.num_blocks;
+ if (fix_problem(ctx, PR_1_BAD_I_BLOCKS, pctx)) {
+ inode->i_blocks = pb.num_blocks;
+ inode->osd2.linux2.l_i_blocks_hi = pb.num_blocks >> 32;
+ dirty_inode++;
+ }
+ pctx->num = 0;
+ }
+
+ /*
+ * The kernel gets mad if we ask it to allocate bigalloc clusters to
+ * a block mapped file, so rebuild it as an extent file. We can skip
+ * symlinks because they're never rewritten.
+ */
+ if (ext2fs_has_feature_bigalloc(fs->super) &&
+ (LINUX_S_ISREG(inode->i_mode) || LINUX_S_ISDIR(inode->i_mode)) &&
+ ext2fs_inode_data_blocks2(fs, inode) > 0 &&
+ (ino == EXT2_ROOT_INO || ino >= EXT2_FIRST_INO(fs->super)) &&
+ !(inode->i_flags & (EXT4_EXTENTS_FL | EXT4_INLINE_DATA_FL)) &&
+ fix_problem(ctx, PR_1_NO_BIGALLOC_BLOCKMAP_FILES, pctx)) {
+ pctx->errcode = e2fsck_rebuild_extents_later(ctx, ino);
+ if (pctx->errcode)
+ goto out;
+ }
+
+ if (ctx->dirs_to_hash && pb.is_dir &&
+ !(ctx->lost_and_found && ctx->lost_and_found == ino) &&
+ !(inode->i_flags & EXT2_INDEX_FL) &&
+ ((inode->i_size / fs->blocksize) >= 3))
+ e2fsck_rehash_dir_later(ctx, ino);
+
+out:
+ if (dirty_inode)
+ e2fsck_write_inode(ctx, ino, inode, "check_blocks");
+}
+
+#if 0
+/*
+ * Helper function called by process block when an illegal block is
+ * found. It returns a description about why the block is illegal
+ */
+static char *describe_illegal_block(ext2_filsys fs, blk64_t block)
+{
+ blk64_t super;
+ int i;
+ static char problem[80];
+
+ super = fs->super->s_first_data_block;
+ strcpy(problem, "PROGRAMMING ERROR: Unknown reason for illegal block");
+ if (block < super) {
+ sprintf(problem, "< FIRSTBLOCK (%u)", super);
+ return(problem);
+ } else if (block >= ext2fs_blocks_count(fs->super)) {
+ sprintf(problem, "> BLOCKS (%u)", ext2fs_blocks_count(fs->super));
+ return(problem);
+ }
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (block == super) {
+ sprintf(problem, "is the superblock in group %d", i);
+ break;
+ }
+ if (block > super &&
+ block <= (super + fs->desc_blocks)) {
+ sprintf(problem, "is in the group descriptors "
+ "of group %d", i);
+ break;
+ }
+ if (block == ext2fs_block_bitmap_loc(fs, i)) {
+ sprintf(problem, "is the block bitmap of group %d", i);
+ break;
+ }
+ if (block == ext2fs_inode_bitmap_loc(fs, i)) {
+ sprintf(problem, "is the inode bitmap of group %d", i);
+ break;
+ }
+ if (block >= ext2fs_inode_table_loc(fs, i) &&
+ (block < ext2fs_inode_table_loc(fs, i)
+ + fs->inode_blocks_per_group)) {
+ sprintf(problem, "is in the inode table of group %d",
+ i);
+ break;
+ }
+ super += fs->super->s_blocks_per_group;
+ }
+ return(problem);
+}
+#endif
+
+/*
+ * This is a helper function for check_blocks().
+ */
+static int process_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ struct problem_context *pctx;
+ blk64_t blk = *block_nr;
+ int ret_code = 0;
+ problem_t problem = 0;
+ e2fsck_t ctx;
+
+ p = (struct process_block_struct *) priv_data;
+ pctx = p->pctx;
+ ctx = p->ctx;
+
+ /*
+ * For a directory, add logical block zero for processing even if it's
+ * not mapped or we'll be perennially stuck with broken "." and ".."
+ * entries.
+ */
+ if (p->is_dir && blockcnt == 0 && blk == 0) {
+ pctx->errcode = ext2fs_add_dir_block2(fs->dblist, p->ino, 0, 0);
+ if (pctx->errcode) {
+ pctx->blk = blk;
+ pctx->num = blockcnt;
+ goto failed_add_dir_block;
+ }
+ p->last_db_block++;
+ }
+
+ if (blk == 0)
+ return 0;
+
+#if 0
+ printf("Process_block, inode %lu, block %u, #%d\n", p->ino, blk,
+ blockcnt);
+#endif
+
+ /*
+ * Simplistic fragmentation check. We merely require that the
+ * file be contiguous. (Which can never be true for really
+ * big files that are greater than a block group.)
+ */
+ if (p->previous_block && p->ino != EXT2_RESIZE_INO) {
+ if (p->previous_block+1 != blk) {
+ if (ctx->options & E2F_OPT_FRAGCHECK) {
+ char type = '?';
+
+ if (p->is_dir)
+ type = 'd';
+ else if (p->is_reg)
+ type = 'f';
+
+ printf(_("%6lu(%c): expecting %6lu "
+ "got phys %6lu (blkcnt %lld)\n"),
+ (unsigned long) pctx->ino, type,
+ (unsigned long) p->previous_block+1,
+ (unsigned long) blk,
+ (long long) blockcnt);
+ }
+ p->fragmented = 1;
+ }
+ }
+
+ if (p->is_dir && !ext2fs_has_feature_largedir(fs->super) &&
+ !pctx->inode->i_size_high &&
+ blockcnt > (1 << (21 - fs->super->s_log_block_size)))
+ problem = PR_1_TOOBIG_DIR;
+ if (p->is_dir && p->num_blocks + 1 >= p->max_blocks)
+ problem = PR_1_TOOBIG_DIR;
+ if (p->is_reg && p->num_blocks + 1 >= p->max_blocks)
+ problem = PR_1_TOOBIG_REG;
+ if (!p->is_dir && !p->is_reg && blockcnt > 0)
+ problem = PR_1_TOOBIG_SYMLINK;
+
+ if (blk < fs->super->s_first_data_block ||
+ blk >= ext2fs_blocks_count(fs->super))
+ problem = PR_1_ILLEGAL_BLOCK_NUM;
+
+ /*
+ * If this IND/DIND/TIND block is squatting atop some critical metadata
+ * (group descriptors, superblock, bitmap, inode table), any write to
+ * "fix" mapping problems will destroy the metadata. We'll let pass 1b
+ * fix that and restart fsck.
+ */
+ if (blockcnt < 0 &&
+ p->ino != EXT2_RESIZE_INO &&
+ blk < ctx->fs->super->s_blocks_count &&
+ ext2fs_test_block_bitmap2(ctx->block_metadata_map, blk)) {
+ pctx->blk = blk;
+ fix_problem(ctx, PR_1_CRITICAL_METADATA_COLLISION, pctx);
+ if ((ctx->options & E2F_OPT_NO) == 0)
+ ctx->flags |= E2F_FLAG_RESTART_LATER;
+ }
+
+ if (problem) {
+ p->num_illegal_blocks++;
+ /*
+ * A bit of subterfuge here -- we're trying to fix a block
+ * mapping, but the IND/DIND/TIND block could have collided
+ * with some critical metadata. So, fix the in-core mapping so
+ * iterate won't go insane, but return 0 instead of
+ * BLOCK_CHANGED so that it won't write the remapping out to
+ * our multiply linked block.
+ *
+ * Even if we previously determined that an *IND block
+ * conflicts with critical metadata, we must still try to
+ * iterate the *IND block as if it is an *IND block to find and
+ * mark the blocks it points to. Better to be overly cautious
+ * with the used_blocks map so that we don't move the *IND
+ * block to a block that's really in use!
+ */
+ if (p->ino != EXT2_RESIZE_INO &&
+ ref_block != 0 &&
+ ext2fs_test_block_bitmap2(ctx->block_metadata_map,
+ ref_block)) {
+ *block_nr = 0;
+ return 0;
+ }
+ if (!p->suppress && (p->num_illegal_blocks % 12) == 0) {
+ if (fix_problem(ctx, PR_1_TOO_MANY_BAD_BLOCKS, pctx)) {
+ p->clear = 1;
+ return BLOCK_ABORT;
+ }
+ if (fix_problem(ctx, PR_1_SUPPRESS_MESSAGES, pctx)) {
+ p->suppress = 1;
+ set_latch_flags(PR_LATCH_BLOCK,
+ PRL_SUPPRESS, 0);
+ }
+ }
+ pctx->blk = blk;
+ pctx->blkcount = blockcnt;
+ if (fix_problem(ctx, problem, pctx)) {
+ blk = *block_nr = 0;
+ ret_code = BLOCK_CHANGED;
+ p->inode_modified = 1;
+ /*
+ * If the directory block is too big and is beyond the
+ * end of the FS, don't bother trying to add it for
+ * processing -- the kernel would never have created a
+ * directory this large, and we risk an ENOMEM abort.
+ * In any case, the toobig handler for extent-based
+ * directories also doesn't feed toobig blocks to
+ * pass 2.
+ */
+ if (problem == PR_1_TOOBIG_DIR)
+ return ret_code;
+ goto mark_dir;
+ } else
+ return 0;
+ }
+
+ if (p->ino == EXT2_RESIZE_INO) {
+ /*
+ * The resize inode has already be sanity checked
+ * during pass #0 (the superblock checks). All we
+ * have to do is mark the double indirect block as
+ * being in use; all of the other blocks are handled
+ * by mark_table_blocks()).
+ */
+ if (blockcnt == BLOCK_COUNT_DIND)
+ mark_block_used(ctx, blk);
+ p->num_blocks++;
+ } else if (!(ctx->fs->cluster_ratio_bits &&
+ p->previous_block &&
+ (EXT2FS_B2C(ctx->fs, blk) ==
+ EXT2FS_B2C(ctx->fs, p->previous_block)) &&
+ (blk & EXT2FS_CLUSTER_MASK(ctx->fs)) ==
+ ((unsigned) blockcnt & EXT2FS_CLUSTER_MASK(ctx->fs)))) {
+ mark_block_used(ctx, blk);
+ p->num_blocks++;
+ } else if (has_unaligned_cluster_map(ctx, p->previous_block,
+ p->last_block, blk, blockcnt)) {
+ pctx->blk = blockcnt;
+ pctx->blk2 = blk;
+ fix_problem(ctx, PR_1_MISALIGNED_CLUSTER, pctx);
+ mark_block_used(ctx, blk);
+ mark_block_used(ctx, blk);
+ }
+ if (blockcnt >= 0)
+ p->last_block = blockcnt;
+ p->previous_block = blk;
+mark_dir:
+ if (p->is_dir && (blockcnt >= 0)) {
+ while (++p->last_db_block < blockcnt) {
+ pctx->errcode = ext2fs_add_dir_block2(fs->dblist,
+ p->ino, 0,
+ p->last_db_block);
+ if (pctx->errcode) {
+ pctx->blk = 0;
+ pctx->num = p->last_db_block;
+ goto failed_add_dir_block;
+ }
+ }
+ pctx->errcode = ext2fs_add_dir_block2(fs->dblist, p->ino,
+ blk, blockcnt);
+ if (pctx->errcode) {
+ pctx->blk = blk;
+ pctx->num = blockcnt;
+ failed_add_dir_block:
+ fix_problem(ctx, PR_1_ADD_DBLOCK, pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return BLOCK_ABORT;
+ }
+ }
+ return ret_code;
+}
+
+static int process_bad_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ blk64_t blk = *block_nr;
+ blk64_t first_block;
+ dgrp_t i;
+ struct problem_context *pctx;
+ e2fsck_t ctx;
+
+ if (!blk)
+ return 0;
+
+ p = (struct process_block_struct *) priv_data;
+ ctx = p->ctx;
+ pctx = p->pctx;
+
+ pctx->ino = EXT2_BAD_INO;
+ pctx->blk = blk;
+ pctx->blkcount = blockcnt;
+
+ if ((blk < fs->super->s_first_data_block) ||
+ (blk >= ext2fs_blocks_count(fs->super))) {
+ if (fix_problem(ctx, PR_1_BB_ILLEGAL_BLOCK_NUM, pctx)) {
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ } else
+ return 0;
+ }
+
+ if (blockcnt < 0) {
+ if (ext2fs_test_block_bitmap2(p->fs_meta_blocks, blk)) {
+ p->bbcheck = 1;
+ if (fix_problem(ctx, PR_1_BB_FS_BLOCK, pctx)) {
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ }
+ } else if (ext2fs_test_block_bitmap2(ctx->block_found_map,
+ blk)) {
+ p->bbcheck = 1;
+ if (fix_problem(ctx, PR_1_BBINODE_BAD_METABLOCK,
+ pctx)) {
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ }
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return BLOCK_ABORT;
+ } else
+ mark_block_used(ctx, blk);
+ return 0;
+ }
+#if 0
+ printf ("DEBUG: Marking %u as bad.\n", blk);
+#endif
+ ctx->fs_badblocks_count++;
+ /*
+ * If the block is not used, then mark it as used and return.
+ * If it is already marked as found, this must mean that
+ * there's an overlap between the filesystem table blocks
+ * (bitmaps and inode table) and the bad block list.
+ */
+ if (!ext2fs_test_block_bitmap2(ctx->block_found_map, blk)) {
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, blk);
+ return 0;
+ }
+ /*
+ * Try to find the where the filesystem block was used...
+ */
+ first_block = fs->super->s_first_data_block;
+
+ for (i = 0; i < fs->group_desc_count; i++ ) {
+ pctx->group = i;
+ pctx->blk = blk;
+ if (!ext2fs_bg_has_super(fs, i))
+ goto skip_super;
+ if (blk == first_block) {
+ if (i == 0) {
+ if (fix_problem(ctx,
+ PR_1_BAD_PRIMARY_SUPERBLOCK,
+ pctx)) {
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ }
+ return 0;
+ }
+ fix_problem(ctx, PR_1_BAD_SUPERBLOCK, pctx);
+ return 0;
+ }
+ if ((blk > first_block) &&
+ (blk <= first_block + fs->desc_blocks)) {
+ if (i == 0) {
+ pctx->blk = *block_nr;
+ if (fix_problem(ctx,
+ PR_1_BAD_PRIMARY_GROUP_DESCRIPTOR, pctx)) {
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ }
+ return 0;
+ }
+ fix_problem(ctx, PR_1_BAD_GROUP_DESCRIPTORS, pctx);
+ return 0;
+ }
+ skip_super:
+ if (blk == ext2fs_block_bitmap_loc(fs, i)) {
+ if (fix_problem(ctx, PR_1_BB_BAD_BLOCK, pctx)) {
+ ctx->invalid_block_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ return 0;
+ }
+ if (blk == ext2fs_inode_bitmap_loc(fs, i)) {
+ if (fix_problem(ctx, PR_1_IB_BAD_BLOCK, pctx)) {
+ ctx->invalid_inode_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ return 0;
+ }
+ if ((blk >= ext2fs_inode_table_loc(fs, i)) &&
+ (blk < (ext2fs_inode_table_loc(fs, i) +
+ fs->inode_blocks_per_group))) {
+ /*
+ * If there are bad blocks in the inode table,
+ * the inode scan code will try to do
+ * something reasonable automatically.
+ */
+ return 0;
+ }
+ first_block += fs->super->s_blocks_per_group;
+ }
+ /*
+ * If we've gotten to this point, then the only
+ * possibility is that the bad block inode meta data
+ * is using a bad block.
+ */
+ if ((blk == p->inode->i_block[EXT2_IND_BLOCK]) ||
+ (blk == p->inode->i_block[EXT2_DIND_BLOCK]) ||
+ (blk == p->inode->i_block[EXT2_TIND_BLOCK])) {
+ p->bbcheck = 1;
+ if (fix_problem(ctx, PR_1_BBINODE_BAD_METABLOCK, pctx)) {
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ }
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return BLOCK_ABORT;
+ return 0;
+ }
+
+ pctx->group = -1;
+
+ /* Warn user that the block wasn't claimed */
+ fix_problem(ctx, PR_1_PROGERR_CLAIMED_BLOCK, pctx);
+
+ return 0;
+}
+
+static void new_table_block(e2fsck_t ctx, blk64_t first_block, dgrp_t group,
+ const char *name, int num, blk64_t *new_block)
+{
+ ext2_filsys fs = ctx->fs;
+ dgrp_t last_grp;
+ blk64_t old_block = *new_block;
+ blk64_t last_block;
+ dgrp_t flexbg;
+ unsigned flexbg_size;
+ int i, is_flexbg;
+ char *buf;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ pctx.group = group;
+ pctx.blk = old_block;
+ pctx.str = name;
+
+ /*
+ * For flex_bg filesystems, first try to allocate the metadata
+ * within the flex_bg, and if that fails then try finding the
+ * space anywhere in the filesystem.
+ */
+ is_flexbg = ext2fs_has_feature_flex_bg(fs->super);
+ if (is_flexbg) {
+ flexbg_size = 1U << fs->super->s_log_groups_per_flex;
+ flexbg = group / flexbg_size;
+ first_block = ext2fs_group_first_block2(fs,
+ flexbg_size * flexbg);
+ last_grp = group | (flexbg_size - 1);
+ if (last_grp >= fs->group_desc_count)
+ last_grp = fs->group_desc_count - 1;
+ last_block = ext2fs_group_last_block2(fs, last_grp);
+ } else
+ last_block = ext2fs_group_last_block2(fs, group);
+ pctx.errcode = ext2fs_get_free_blocks2(fs, first_block, last_block,
+ num, ctx->block_found_map,
+ new_block);
+ if (is_flexbg && (pctx.errcode == EXT2_ET_BLOCK_ALLOC_FAIL))
+ pctx.errcode = ext2fs_get_free_blocks2(fs,
+ fs->super->s_first_data_block,
+ ext2fs_blocks_count(fs->super),
+ num, ctx->block_found_map, new_block);
+ if (pctx.errcode) {
+ pctx.num = num;
+ fix_problem(ctx, PR_1_RELOC_BLOCK_ALLOCATE, &pctx);
+ ext2fs_unmark_valid(fs);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ pctx.errcode = ext2fs_get_mem(fs->blocksize, &buf);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_RELOC_MEMORY_ALLOCATE, &pctx);
+ ext2fs_unmark_valid(fs);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ ext2fs_mark_super_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ pctx.blk2 = *new_block;
+ fix_problem(ctx, (old_block ? PR_1_RELOC_FROM_TO :
+ PR_1_RELOC_TO), &pctx);
+ pctx.blk2 = 0;
+ for (i = 0; i < num; i++) {
+ pctx.blk = i;
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, (*new_block)+i);
+ if (old_block) {
+ pctx.errcode = io_channel_read_blk64(fs->io,
+ old_block + i, 1, buf);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1_RELOC_READ_ERR, &pctx);
+ pctx.blk = (*new_block) + i;
+ pctx.errcode = io_channel_write_blk64(fs->io, pctx.blk,
+ 1, buf);
+ } else {
+ pctx.blk = (*new_block) + i;
+ pctx.errcode = ext2fs_zero_blocks2(fs, pctx.blk, 1,
+ NULL, NULL);
+ }
+
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1_RELOC_WRITE_ERR, &pctx);
+ }
+ ext2fs_free_mem(&buf);
+}
+
+/*
+ * This routine gets called at the end of pass 1 if bad blocks are
+ * detected in the superblock, group descriptors, inode_bitmaps, or
+ * block bitmaps. At this point, all of the blocks have been mapped
+ * out, so we can try to allocate new block(s) to replace the bad
+ * blocks.
+ */
+static void handle_fs_bad_blocks(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ dgrp_t i;
+ blk64_t first_block;
+ blk64_t new_blk;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ first_block = ext2fs_group_first_block2(fs, i);
+
+ if (ctx->invalid_block_bitmap_flag[i]) {
+ new_blk = ext2fs_block_bitmap_loc(fs, i);
+ new_table_block(ctx, first_block, i, _("block bitmap"),
+ 1, &new_blk);
+ ext2fs_block_bitmap_loc_set(fs, i, new_blk);
+ }
+ if (ctx->invalid_inode_bitmap_flag[i]) {
+ new_blk = ext2fs_inode_bitmap_loc(fs, i);
+ new_table_block(ctx, first_block, i, _("inode bitmap"),
+ 1, &new_blk);
+ ext2fs_inode_bitmap_loc_set(fs, i, new_blk);
+ }
+ if (ctx->invalid_inode_table_flag[i]) {
+ new_blk = ext2fs_inode_table_loc(fs, i);
+ new_table_block(ctx, first_block, i, _("inode table"),
+ fs->inode_blocks_per_group,
+ &new_blk);
+ ext2fs_inode_table_loc_set(fs, i, new_blk);
+ ctx->flags |= E2F_FLAG_RESTART;
+ }
+ }
+ ctx->invalid_bitmaps = 0;
+}
+
+/*
+ * This routine marks all blocks which are used by the superblock,
+ * group descriptors, inode bitmaps, and block bitmaps.
+ */
+static void mark_table_blocks(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t b;
+ dgrp_t i;
+ unsigned int j;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ pctx.group = i;
+
+ ext2fs_reserve_super_and_bgd(fs, i, ctx->block_found_map);
+ ext2fs_reserve_super_and_bgd(fs, i, ctx->block_metadata_map);
+
+ /*
+ * Mark the blocks used for the inode table
+ */
+ if (ext2fs_inode_table_loc(fs, i)) {
+ for (j = 0, b = ext2fs_inode_table_loc(fs, i);
+ j < fs->inode_blocks_per_group;
+ j++, b++) {
+ if (ext2fs_test_block_bitmap2(ctx->block_found_map,
+ b)) {
+ pctx.blk = b;
+ if (!ctx->invalid_inode_table_flag[i] &&
+ fix_problem(ctx,
+ PR_1_ITABLE_CONFLICT, &pctx)) {
+ ctx->invalid_inode_table_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ } else {
+ ext2fs_mark_block_bitmap2(
+ ctx->block_found_map, b);
+ ext2fs_mark_block_bitmap2(
+ ctx->block_metadata_map, b);
+ }
+ }
+ }
+
+ /*
+ * Mark block used for the block bitmap
+ */
+ if (ext2fs_block_bitmap_loc(fs, i)) {
+ if (ext2fs_test_block_bitmap2(ctx->block_found_map,
+ ext2fs_block_bitmap_loc(fs, i))) {
+ pctx.blk = ext2fs_block_bitmap_loc(fs, i);
+ if (fix_problem(ctx, PR_1_BB_CONFLICT, &pctx)) {
+ ctx->invalid_block_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ } else {
+ ext2fs_mark_block_bitmap2(ctx->block_found_map,
+ ext2fs_block_bitmap_loc(fs, i));
+ ext2fs_mark_block_bitmap2(ctx->block_metadata_map,
+ ext2fs_block_bitmap_loc(fs, i));
+ }
+ }
+ /*
+ * Mark block used for the inode bitmap
+ */
+ if (ext2fs_inode_bitmap_loc(fs, i)) {
+ if (ext2fs_test_block_bitmap2(ctx->block_found_map,
+ ext2fs_inode_bitmap_loc(fs, i))) {
+ pctx.blk = ext2fs_inode_bitmap_loc(fs, i);
+ if (fix_problem(ctx, PR_1_IB_CONFLICT, &pctx)) {
+ ctx->invalid_inode_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ } else {
+ ext2fs_mark_block_bitmap2(ctx->block_metadata_map,
+ ext2fs_inode_bitmap_loc(fs, i));
+ ext2fs_mark_block_bitmap2(ctx->block_found_map,
+ ext2fs_inode_bitmap_loc(fs, i));
+ }
+ }
+ }
+}
+
+/*
+ * These subroutines short circuits ext2fs_get_blocks and
+ * ext2fs_check_directory; we use them since we already have the inode
+ * structure, so there's no point in letting the ext2fs library read
+ * the inode again.
+ */
+static errcode_t pass1_get_blocks(ext2_filsys fs, ext2_ino_t ino,
+ blk_t *blocks)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+ int i;
+
+ if ((ino != ctx->stashed_ino) || !ctx->stashed_inode)
+ return EXT2_ET_CALLBACK_NOTHANDLED;
+
+ for (i=0; i < EXT2_N_BLOCKS; i++)
+ blocks[i] = ctx->stashed_inode->i_block[i];
+ return 0;
+}
+
+static errcode_t pass1_read_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+
+ if ((ino != ctx->stashed_ino) || !ctx->stashed_inode)
+ return EXT2_ET_CALLBACK_NOTHANDLED;
+ *inode = *ctx->stashed_inode;
+ return 0;
+}
+
+static errcode_t pass1_write_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+
+ if ((ino == ctx->stashed_ino) && ctx->stashed_inode &&
+ (inode != ctx->stashed_inode))
+ *ctx->stashed_inode = *inode;
+ return EXT2_ET_CALLBACK_NOTHANDLED;
+}
+
+static errcode_t pass1_check_directory(ext2_filsys fs, ext2_ino_t ino)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+
+ if ((ino != ctx->stashed_ino) || !ctx->stashed_inode)
+ return EXT2_ET_CALLBACK_NOTHANDLED;
+
+ if (!LINUX_S_ISDIR(ctx->stashed_inode->i_mode))
+ return EXT2_ET_NO_DIRECTORY;
+ return 0;
+}
+
+static errcode_t e2fsck_get_alloc_block(ext2_filsys fs, blk64_t goal,
+ blk64_t *ret)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+ errcode_t retval;
+ blk64_t new_block;
+
+ if (ctx->block_found_map) {
+ retval = ext2fs_new_block2(fs, goal, ctx->block_found_map,
+ &new_block);
+ if (retval)
+ return retval;
+ if (fs->block_map) {
+ ext2fs_mark_block_bitmap2(fs->block_map, new_block);
+ ext2fs_mark_bb_dirty(fs);
+ }
+ } else {
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+
+ retval = ext2fs_new_block2(fs, goal, fs->block_map, &new_block);
+ if (retval)
+ return retval;
+ }
+
+ *ret = new_block;
+ return (0);
+}
+
+static errcode_t e2fsck_new_range(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, blk64_t *pblk, blk64_t *plen)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+ errcode_t retval;
+
+ if (ctx->block_found_map)
+ return ext2fs_new_range(fs, flags, goal, len,
+ ctx->block_found_map, pblk, plen);
+
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+
+ return ext2fs_new_range(fs, flags, goal, len, fs->block_map,
+ pblk, plen);
+}
+
+static void e2fsck_block_alloc_stats(ext2_filsys fs, blk64_t blk, int inuse)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+
+ /* Never free a critical metadata block */
+ if (ctx->block_found_map &&
+ ctx->block_metadata_map &&
+ inuse < 0 &&
+ ext2fs_test_block_bitmap2(ctx->block_metadata_map, blk))
+ return;
+
+ if (ctx->block_found_map) {
+ if (inuse > 0)
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, blk);
+ else
+ ext2fs_unmark_block_bitmap2(ctx->block_found_map, blk);
+ }
+}
+
+static void e2fsck_block_alloc_stats_range(ext2_filsys fs, blk64_t blk,
+ blk_t num, int inuse)
+{
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+
+ /* Never free a critical metadata block */
+ if (ctx->block_found_map &&
+ ctx->block_metadata_map &&
+ inuse < 0 &&
+ ext2fs_test_block_bitmap_range2(ctx->block_metadata_map, blk, num))
+ return;
+
+ if (ctx->block_found_map) {
+ if (inuse > 0)
+ ext2fs_mark_block_bitmap_range2(ctx->block_found_map,
+ blk, num);
+ else
+ ext2fs_unmark_block_bitmap_range2(ctx->block_found_map,
+ blk, num);
+ }
+}
+
+void e2fsck_use_inode_shortcuts(e2fsck_t ctx, int use_shortcuts)
+{
+ ext2_filsys fs = ctx->fs;
+
+ if (use_shortcuts) {
+ fs->get_blocks = pass1_get_blocks;
+ fs->check_directory = pass1_check_directory;
+ fs->read_inode = pass1_read_inode;
+ fs->write_inode = pass1_write_inode;
+ ctx->stashed_ino = 0;
+ } else {
+ fs->get_blocks = 0;
+ fs->check_directory = 0;
+ fs->read_inode = 0;
+ fs->write_inode = 0;
+ }
+}
+
+void e2fsck_intercept_block_allocations(e2fsck_t ctx)
+{
+ ext2fs_set_alloc_block_callback(ctx->fs, e2fsck_get_alloc_block, 0);
+ ext2fs_set_block_alloc_stats_callback(ctx->fs,
+ e2fsck_block_alloc_stats, 0);
+ ext2fs_set_new_range_callback(ctx->fs, e2fsck_new_range, NULL);
+ ext2fs_set_block_alloc_stats_range_callback(ctx->fs,
+ e2fsck_block_alloc_stats_range, NULL);
+}
diff --git a/e2fsck/pass1b.c b/e2fsck/pass1b.c
new file mode 100644
index 0000000..950af5b
--- /dev/null
+++ b/e2fsck/pass1b.c
@@ -0,0 +1,1046 @@
+/*
+ * pass1b.c --- Pass #1b of e2fsck
+ *
+ * This file contains pass1B, pass1C, and pass1D of e2fsck. They are
+ * only invoked if pass 1 discovered blocks which are in use by more
+ * than one inode.
+ *
+ * Pass1B scans the data blocks of all the inodes again, generating a
+ * complete list of duplicate blocks and which inodes have claimed
+ * them.
+ *
+ * Pass1C does a tree-traversal of the filesystem, to determine the
+ * parent directories of these inodes. This step is necessary so that
+ * e2fsck can print out the pathnames of affected inodes.
+ *
+ * Pass1D is a reconciliation pass. For each inode with duplicate
+ * blocks, the user is prompted if s/he would like to clone the file
+ * (so that the file gets a fresh copy of the duplicated blocks) or
+ * simply to delete the file.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ */
+
+#include "config.h"
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+#ifndef HAVE_INTPTR_T
+typedef long intptr_t;
+#endif
+
+/* Needed for architectures where sizeof(int) != sizeof(void *) */
+#define INT_TO_VOIDPTR(val) ((void *)(intptr_t)(val))
+#define VOIDPTR_TO_INT(ptr) ((int)(intptr_t)(ptr))
+
+#include <et/com_err.h>
+#include "e2fsck.h"
+
+#include "problem.h"
+#include "support/dict.h"
+
+/* Define an extension to the ext2 library's block count information */
+#define BLOCK_COUNT_EXTATTR (-5)
+
+struct cluster_el {
+ blk64_t cluster;
+ struct cluster_el *next;
+};
+
+struct inode_el {
+ ext2_ino_t inode;
+ struct inode_el *next;
+};
+
+struct dup_cluster {
+ int num_bad;
+ struct inode_el *inode_list;
+};
+
+/*
+ * This structure stores information about a particular inode which
+ * is sharing blocks with other inodes. This information is collected
+ * to display to the user, so that the user knows what files he or she
+ * is dealing with, when trying to decide how to resolve the conflict
+ * of multiply-claimed blocks.
+ */
+struct dup_inode {
+ ext2_ino_t dir;
+ int num_dupblocks;
+ struct ext2_inode_large inode;
+ struct cluster_el *cluster_list;
+};
+
+static int process_pass1b_block(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt, blk64_t ref_blk,
+ int ref_offset, void *priv_data);
+static void delete_file(e2fsck_t ctx, ext2_ino_t ino,
+ struct dup_inode *dp, char *block_buf);
+static errcode_t clone_file(e2fsck_t ctx, ext2_ino_t ino,
+ struct dup_inode *dp, char* block_buf);
+static int check_if_fs_block(e2fsck_t ctx, blk64_t block);
+static int check_if_fs_cluster(e2fsck_t ctx, blk64_t cluster);
+
+static void pass1b(e2fsck_t ctx, char *block_buf);
+static void pass1c(e2fsck_t ctx, char *block_buf);
+static void pass1d(e2fsck_t ctx, char *block_buf);
+
+static int dup_inode_count = 0;
+static int dup_inode_founddir = 0;
+
+static dict_t clstr_dict, ino_dict;
+
+static ext2fs_inode_bitmap inode_dup_map;
+
+static int dict_int_cmp(const void *cmp_ctx EXT2FS_ATTR((unused)),
+ const void *a, const void *b)
+{
+ intptr_t ia, ib;
+
+ ia = (intptr_t)a;
+ ib = (intptr_t)b;
+
+ return (ia-ib);
+}
+
+/*
+ * Add a duplicate block record
+ */
+static void add_dupe(e2fsck_t ctx, ext2_ino_t ino, blk64_t cluster,
+ struct ext2_inode_large *inode)
+{
+ dnode_t *n;
+ struct dup_cluster *db;
+ struct dup_inode *di;
+ struct cluster_el *cluster_el;
+ struct inode_el *ino_el;
+
+ n = dict_lookup(&clstr_dict, INT_TO_VOIDPTR(cluster));
+ if (n)
+ db = (struct dup_cluster *) dnode_get(n);
+ else {
+ db = (struct dup_cluster *) e2fsck_allocate_memory(ctx,
+ sizeof(struct dup_cluster), "duplicate cluster header");
+ db->num_bad = 0;
+ db->inode_list = 0;
+ dict_alloc_insert(&clstr_dict, INT_TO_VOIDPTR(cluster), db);
+ }
+ ino_el = (struct inode_el *) e2fsck_allocate_memory(ctx,
+ sizeof(struct inode_el), "inode element");
+ ino_el->inode = ino;
+ ino_el->next = db->inode_list;
+ db->inode_list = ino_el;
+ db->num_bad++;
+
+ n = dict_lookup(&ino_dict, INT_TO_VOIDPTR(ino));
+ if (n)
+ di = (struct dup_inode *) dnode_get(n);
+ else {
+ di = (struct dup_inode *) e2fsck_allocate_memory(ctx,
+ sizeof(struct dup_inode), "duplicate inode header");
+ if (ino == EXT2_ROOT_INO) {
+ di->dir = EXT2_ROOT_INO;
+ dup_inode_founddir++;
+ } else
+ di->dir = 0;
+
+ di->num_dupblocks = 0;
+ di->cluster_list = 0;
+ di->inode = *inode;
+ dict_alloc_insert(&ino_dict, INT_TO_VOIDPTR(ino), di);
+ }
+ cluster_el = (struct cluster_el *) e2fsck_allocate_memory(ctx,
+ sizeof(struct cluster_el), "cluster element");
+ cluster_el->cluster = cluster;
+ cluster_el->next = di->cluster_list;
+ di->cluster_list = cluster_el;
+ di->num_dupblocks++;
+}
+
+/*
+ * Free a duplicate inode record
+ */
+static void inode_dnode_free(dnode_t *node,
+ void *context EXT2FS_ATTR((unused)))
+{
+ struct dup_inode *di;
+ struct cluster_el *p, *next;
+
+ di = (struct dup_inode *) dnode_get(node);
+ for (p = di->cluster_list; p; p = next) {
+ next = p->next;
+ ext2fs_free_mem(&p);
+ }
+ ext2fs_free_mem(&di);
+ ext2fs_free_mem(&node);
+}
+
+/*
+ * Free a duplicate cluster record
+ */
+static void cluster_dnode_free(dnode_t *node,
+ void *context EXT2FS_ATTR((unused)))
+{
+ struct dup_cluster *dc;
+ struct inode_el *p, *next;
+
+ dc = (struct dup_cluster *) dnode_get(node);
+ for (p = dc->inode_list; p; p = next) {
+ next = p->next;
+ ext2fs_free_mem(&p);
+ }
+ ext2fs_free_mem(&dc);
+ ext2fs_free_mem(&node);
+}
+
+
+/*
+ * Main procedure for handling duplicate blocks
+ */
+void e2fsck_pass1_dupblocks(e2fsck_t ctx, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct problem_context pctx;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+
+ clear_problem_context(&pctx);
+
+ pctx.errcode = e2fsck_allocate_inode_bitmap(fs,
+ _("multiply claimed inode map"),
+ EXT2FS_BMAP64_RBTREE, "inode_dup_map",
+ &inode_dup_map);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1B_ALLOCATE_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ dict_init(&ino_dict, DICTCOUNT_T_MAX, dict_int_cmp);
+ dict_init(&clstr_dict, DICTCOUNT_T_MAX, dict_int_cmp);
+ dict_set_allocator(&ino_dict, NULL, inode_dnode_free, NULL);
+ dict_set_allocator(&clstr_dict, NULL, cluster_dnode_free, NULL);
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ pass1b(ctx, block_buf);
+ print_resource_track(ctx, "Pass 1b", &rtrack, ctx->fs->io);
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ pass1c(ctx, block_buf);
+ print_resource_track(ctx, "Pass 1c", &rtrack, ctx->fs->io);
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ pass1d(ctx, block_buf);
+ print_resource_track(ctx, "Pass 1d", &rtrack, ctx->fs->io);
+
+ if (ext2fs_has_feature_shared_blocks(ctx->fs->super) &&
+ (ctx->options & E2F_OPT_UNSHARE_BLOCKS)) {
+ /*
+ * If we successfully managed to unshare all blocks, unset the
+ * shared block feature.
+ */
+ blk64_t next;
+ int result = ext2fs_find_first_set_block_bitmap2(
+ ctx->block_dup_map,
+ ctx->fs->super->s_first_data_block,
+ ext2fs_blocks_count(ctx->fs->super) - 1,
+ &next);
+ if (result == ENOENT && !(ctx->options & E2F_OPT_NO)) {
+ ext2fs_clear_feature_shared_blocks(ctx->fs->super);
+ ext2fs_mark_super_dirty(ctx->fs);
+ }
+ }
+
+ /*
+ * Time to free all of the accumulated data structures that we
+ * don't need anymore.
+ */
+ dict_free_nodes(&ino_dict);
+ dict_free_nodes(&clstr_dict);
+ ext2fs_free_inode_bitmap(inode_dup_map);
+}
+
+/*
+ * Scan the inodes looking for inodes that contain duplicate blocks.
+ */
+struct process_block_struct {
+ e2fsck_t ctx;
+ ext2_ino_t ino;
+ int dup_blocks;
+ blk64_t cur_cluster, phys_cluster;
+ blk64_t last_blk;
+ struct ext2_inode_large *inode;
+ struct problem_context *pctx;
+};
+
+static void pass1b(e2fsck_t ctx, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino = 0;
+ struct ext2_inode_large inode;
+ ext2_inode_scan scan;
+ struct process_block_struct pb;
+ struct problem_context pctx;
+ problem_t op;
+
+ clear_problem_context(&pctx);
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1B_PASS_HEADER, &pctx);
+ pctx.errcode = ext2fs_open_inode_scan(fs, ctx->inode_buffer_blocks,
+ &scan);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1B_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ ctx->stashed_inode = EXT2_INODE(&inode);
+ pb.ctx = ctx;
+ pb.pctx = &pctx;
+ pctx.str = "pass1b";
+ while (1) {
+ if (ino % (fs->super->s_inodes_per_group * 4) == 1) {
+ if (e2fsck_mmp_update(fs))
+ fatal_error(ctx, 0);
+ }
+ pctx.errcode = ext2fs_get_next_inode_full(scan, &ino,
+ EXT2_INODE(&inode), sizeof(inode));
+ if (pctx.errcode == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE)
+ continue;
+ if (pctx.errcode) {
+ pctx.ino = ino;
+ fix_problem(ctx, PR_1B_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if (!ino)
+ break;
+ pctx.ino = ctx->stashed_ino = ino;
+ if ((ino != EXT2_BAD_INO) &&
+ !ext2fs_test_inode_bitmap2(ctx->inode_used_map, ino))
+ continue;
+
+ pb.ino = ino;
+ pb.dup_blocks = 0;
+ pb.inode = &inode;
+ pb.cur_cluster = ~0;
+ pb.phys_cluster = ~0;
+ pb.last_blk = 0;
+ pb.pctx->blk = pb.pctx->blk2 = 0;
+
+ if (ext2fs_inode_has_valid_blocks2(fs, EXT2_INODE(&inode)) ||
+ (ino == EXT2_BAD_INO))
+ pctx.errcode = ext2fs_block_iterate3(fs, ino,
+ BLOCK_FLAG_READ_ONLY, block_buf,
+ process_pass1b_block, &pb);
+ /* If the feature is not set, attrs will be cleared later anyway */
+ if (ext2fs_has_feature_xattr(fs->super) &&
+ ext2fs_file_acl_block(fs, EXT2_INODE(&inode))) {
+ blk64_t blk = ext2fs_file_acl_block(fs, EXT2_INODE(&inode));
+ process_pass1b_block(fs, &blk,
+ BLOCK_COUNT_EXTATTR, 0, 0, &pb);
+ ext2fs_file_acl_block_set(fs, EXT2_INODE(&inode), blk);
+ }
+ if (pb.dup_blocks) {
+ if (ino != EXT2_BAD_INO) {
+ op = pctx.blk == pctx.blk2 ?
+ PR_1B_DUP_BLOCK : PR_1B_DUP_RANGE;
+ fix_problem(ctx, op, pb.pctx);
+ }
+ end_problem_latch(ctx, PR_LATCH_DBLOCK);
+ if (ino >= EXT2_FIRST_INODE(fs->super) ||
+ ino == EXT2_ROOT_INO)
+ dup_inode_count++;
+ }
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
+ }
+ ext2fs_close_inode_scan(scan);
+ e2fsck_use_inode_shortcuts(ctx, 0);
+}
+
+static int process_pass1b_block(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ e2fsck_t ctx;
+ blk64_t lc, pc;
+ problem_t op;
+
+ if (*block_nr == 0)
+ return 0;
+ p = (struct process_block_struct *) priv_data;
+ ctx = p->ctx;
+ lc = EXT2FS_B2C(fs, blockcnt);
+ pc = EXT2FS_B2C(fs, *block_nr);
+
+ if (!ext2fs_test_block_bitmap2(ctx->block_dup_map, *block_nr))
+ goto finish;
+
+ /* OK, this is a duplicate block */
+ if (p->ino != EXT2_BAD_INO) {
+ if (p->last_blk + 1 != *block_nr) {
+ if (p->last_blk) {
+ op = p->pctx->blk == p->pctx->blk2 ?
+ PR_1B_DUP_BLOCK :
+ PR_1B_DUP_RANGE;
+ fix_problem(ctx, op, p->pctx);
+ }
+ p->pctx->blk = *block_nr;
+ }
+ p->pctx->blk2 = *block_nr;
+ p->last_blk = *block_nr;
+ }
+ p->dup_blocks++;
+ ext2fs_mark_inode_bitmap2(inode_dup_map, p->ino);
+
+ /*
+ * Qualifications for submitting a block for duplicate processing:
+ * It's an extent/indirect block (and has a negative logical offset);
+ * we've crossed a logical cluster boundary; or the physical cluster
+ * suddenly changed, which indicates that blocks in a logical cluster
+ * are mapped to multiple physical clusters.
+ */
+ if (blockcnt < 0 || lc != p->cur_cluster || pc != p->phys_cluster)
+ add_dupe(ctx, p->ino, EXT2FS_B2C(fs, *block_nr), p->inode);
+
+finish:
+ p->cur_cluster = lc;
+ p->phys_cluster = pc;
+ return 0;
+}
+
+/*
+ * Pass 1c: Scan directories for inodes with duplicate blocks. This
+ * is used so that we can print pathnames when prompting the user for
+ * what to do.
+ */
+struct search_dir_struct {
+ int count;
+ ext2_ino_t first_inode;
+ ext2_ino_t max_inode;
+};
+
+static int search_dirent_proc(ext2_ino_t dir, int entry,
+ struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct search_dir_struct *sd;
+ struct dup_inode *p;
+ dnode_t *n;
+
+ sd = (struct search_dir_struct *) priv_data;
+
+ if (dirent->inode > sd->max_inode)
+ /* Should abort this inode, but not everything */
+ return 0;
+
+ if ((dirent->inode < sd->first_inode) || (entry < DIRENT_OTHER_FILE) ||
+ !ext2fs_test_inode_bitmap2(inode_dup_map, dirent->inode))
+ return 0;
+
+ n = dict_lookup(&ino_dict, INT_TO_VOIDPTR(dirent->inode));
+ if (!n)
+ return 0;
+ p = (struct dup_inode *) dnode_get(n);
+ if (!p->dir) {
+ p->dir = dir;
+ sd->count--;
+ }
+
+ return(sd->count ? 0 : DIRENT_ABORT);
+}
+
+
+static void pass1c(e2fsck_t ctx, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct search_dir_struct sd;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
+
+ /*
+ * Search through all directories to translate inodes to names
+ * (by searching for the containing directory for that inode.)
+ */
+ sd.count = dup_inode_count - dup_inode_founddir;
+ sd.first_inode = EXT2_FIRST_INODE(fs->super);
+ sd.max_inode = fs->super->s_inodes_count;
+ ext2fs_dblist_dir_iterate(fs->dblist, 0, block_buf,
+ search_dirent_proc, &sd);
+}
+
+static void pass1d(e2fsck_t ctx, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct dup_inode *p, *t;
+ struct dup_cluster *q;
+ ext2_ino_t *shared, ino;
+ int shared_len;
+ int i;
+ int file_ok;
+ int meta_data = 0;
+ struct problem_context pctx;
+ dnode_t *n, *m;
+ struct cluster_el *s;
+ struct inode_el *r;
+
+ clear_problem_context(&pctx);
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
+ e2fsck_read_bitmaps(ctx);
+
+ pctx.num = dup_inode_count; /* dict_count(&ino_dict); */
+ fix_problem(ctx, PR_1D_NUM_DUP_INODES, &pctx);
+ shared = (ext2_ino_t *) e2fsck_allocate_memory(ctx,
+ sizeof(ext2_ino_t) * dict_count(&ino_dict),
+ "Shared inode list");
+ for (n = dict_first(&ino_dict); n; n = dict_next(&ino_dict, n)) {
+ p = (struct dup_inode *) dnode_get(n);
+ shared_len = 0;
+ file_ok = 1;
+ ino = (ext2_ino_t)VOIDPTR_TO_INT(dnode_getkey(n));
+ if (ino == EXT2_BAD_INO || ino == EXT2_RESIZE_INO)
+ continue;
+
+ /*
+ * Find all of the inodes which share blocks with this
+ * one. First we find all of the duplicate blocks
+ * belonging to this inode, and then search each block
+ * get the list of inodes, and merge them together.
+ */
+ for (s = p->cluster_list; s; s = s->next) {
+ m = dict_lookup(&clstr_dict,
+ INT_TO_VOIDPTR(s->cluster));
+ if (!m)
+ continue; /* Should never happen... */
+ q = (struct dup_cluster *) dnode_get(m);
+ if (q->num_bad > 1)
+ file_ok = 0;
+ if (check_if_fs_cluster(ctx, s->cluster)) {
+ file_ok = 0;
+ meta_data = 1;
+ }
+
+ /*
+ * Add all inodes used by this block to the
+ * shared[] --- which is a unique list, so
+ * if an inode is already in shared[], don't
+ * add it again.
+ */
+ for (r = q->inode_list; r; r = r->next) {
+ if (r->inode == ino)
+ continue;
+ for (i = 0; i < shared_len; i++)
+ if (shared[i] == r->inode)
+ break;
+ if (i == shared_len) {
+ shared[shared_len++] = r->inode;
+ }
+ }
+ }
+
+ /*
+ * Report the inode that we are working on
+ */
+ pctx.inode = EXT2_INODE(&p->inode);
+ pctx.ino = ino;
+ pctx.dir = p->dir;
+ pctx.blkcount = p->num_dupblocks;
+ pctx.num = meta_data ? shared_len+1 : shared_len;
+ fix_problem(ctx, PR_1D_DUP_FILE, &pctx);
+ pctx.blkcount = 0;
+ pctx.num = 0;
+
+ if (meta_data)
+ fix_problem(ctx, PR_1D_SHARE_METADATA, &pctx);
+
+ for (i = 0; i < shared_len; i++) {
+ m = dict_lookup(&ino_dict, INT_TO_VOIDPTR(shared[i]));
+ if (!m)
+ continue; /* should never happen */
+ t = (struct dup_inode *) dnode_get(m);
+ /*
+ * Report the inode that we are sharing with
+ */
+ pctx.inode = EXT2_INODE(&t->inode);
+ pctx.ino = shared[i];
+ pctx.dir = t->dir;
+ fix_problem(ctx, PR_1D_DUP_FILE_LIST, &pctx);
+ }
+ /*
+ * Even if the file shares blocks with itself, we still need to
+ * clone the blocks.
+ */
+ if (file_ok && (meta_data ? shared_len+1 : shared_len) != 0) {
+ fix_problem(ctx, PR_1D_DUP_BLOCKS_DEALT, &pctx);
+ continue;
+ }
+ if ((ctx->options & E2F_OPT_UNSHARE_BLOCKS) ||
+ fix_problem(ctx, PR_1D_CLONE_QUESTION, &pctx)) {
+ pctx.errcode = clone_file(ctx, ino, p, block_buf);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1D_CLONE_ERROR, &pctx);
+ else
+ continue;
+ }
+ /*
+ * Note: When unsharing blocks, we don't prompt to delete
+ * files. If the clone operation fails than the unshare
+ * operation should fail too.
+ */
+ if (!(ctx->options & E2F_OPT_UNSHARE_BLOCKS) &&
+ fix_problem(ctx, PR_1D_DELETE_QUESTION, &pctx))
+ delete_file(ctx, ino, p, block_buf);
+ else
+ ext2fs_unmark_valid(fs);
+ }
+ ext2fs_free_mem(&shared);
+}
+
+/*
+ * Drop the refcount on the dup_block structure, and clear the entry
+ * in the block_dup_map if appropriate.
+ */
+static void decrement_badcount(e2fsck_t ctx, blk64_t block,
+ struct dup_cluster *p)
+{
+ p->num_bad--;
+ if (p->num_bad <= 0 ||
+ (p->num_bad == 1 && !check_if_fs_block(ctx, block))) {
+ if (check_if_fs_cluster(ctx, EXT2FS_B2C(ctx->fs, block)))
+ return;
+ ext2fs_unmark_block_bitmap2(ctx->block_dup_map, block);
+ }
+}
+
+static int delete_file_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *pb;
+ struct dup_cluster *p;
+ dnode_t *n;
+ e2fsck_t ctx;
+ blk64_t c, lc;
+
+ pb = (struct process_block_struct *) priv_data;
+ ctx = pb->ctx;
+
+ if (*block_nr == 0)
+ return 0;
+
+ c = EXT2FS_B2C(fs, *block_nr);
+ lc = EXT2FS_B2C(fs, blockcnt);
+ if (ext2fs_test_block_bitmap2(ctx->block_dup_map, *block_nr)) {
+ n = dict_lookup(&clstr_dict, INT_TO_VOIDPTR(c));
+ if (n) {
+ if (lc != pb->cur_cluster) {
+ p = (struct dup_cluster *) dnode_get(n);
+ decrement_badcount(ctx, *block_nr, p);
+ pb->dup_blocks++;
+ }
+ } else
+ com_err("delete_file_block", 0,
+ _("internal error: can't find dup_blk for %llu\n"),
+ (unsigned long long) *block_nr);
+ } else {
+ if ((*block_nr % EXT2FS_CLUSTER_RATIO(ctx->fs)) == 0)
+ ext2fs_block_alloc_stats2(fs, *block_nr, -1);
+ pb->dup_blocks++;
+ }
+ pb->cur_cluster = lc;
+
+ return 0;
+}
+
+static void delete_file(e2fsck_t ctx, ext2_ino_t ino,
+ struct dup_inode *dp, char* block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct process_block_struct pb;
+ struct problem_context pctx;
+ unsigned int count;
+
+ clear_problem_context(&pctx);
+ pctx.ino = pb.ino = ino;
+ pb.dup_blocks = 0;
+ pb.ctx = ctx;
+ pctx.str = "delete_file";
+ pb.cur_cluster = ~0;
+
+ if (ext2fs_inode_has_valid_blocks2(fs, EXT2_INODE(&dp->inode)))
+ pctx.errcode = ext2fs_block_iterate3(fs, ino,
+ BLOCK_FLAG_READ_ONLY,
+ block_buf,
+ delete_file_block, &pb);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
+ if (ctx->inode_bad_map)
+ ext2fs_unmark_inode_bitmap2(ctx->inode_bad_map, ino);
+ if (ctx->inode_reg_map)
+ ext2fs_unmark_inode_bitmap2(ctx->inode_reg_map, ino);
+ ext2fs_unmark_inode_bitmap2(ctx->inode_dir_map, ino);
+ ext2fs_unmark_inode_bitmap2(ctx->inode_used_map, ino);
+ ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(dp->inode.i_mode));
+ quota_data_sub(ctx->qctx, &dp->inode, ino,
+ pb.dup_blocks * fs->blocksize);
+ quota_data_inodes(ctx->qctx, &dp->inode, ino, -1);
+
+ /* Inode may have changed by block_iterate, so reread it */
+ e2fsck_read_inode_full(ctx, ino, EXT2_INODE(&dp->inode),
+ sizeof(dp->inode), "delete_file");
+ e2fsck_clear_inode(ctx, ino, EXT2_INODE(&dp->inode), 0, "delete_file");
+ if (ext2fs_file_acl_block(fs, EXT2_INODE(&dp->inode)) &&
+ ext2fs_has_feature_xattr(fs->super)) {
+ blk64_t file_acl_block = ext2fs_file_acl_block(fs,
+ EXT2_INODE(&dp->inode));
+
+ count = 1;
+ pctx.errcode = ext2fs_adjust_ea_refcount3(fs, file_acl_block,
+ block_buf, -1, &count, ino);
+ if (pctx.errcode == EXT2_ET_BAD_EA_BLOCK_NUM) {
+ pctx.errcode = 0;
+ count = 1;
+ }
+ if (pctx.errcode) {
+ pctx.blk = file_acl_block;
+ fix_problem(ctx, PR_1B_ADJ_EA_REFCOUNT, &pctx);
+ }
+ /*
+ * If the count is zero, then arrange to have the
+ * block deleted. If the block is in the block_dup_map,
+ * also call delete_file_block since it will take care
+ * of keeping the accounting straight.
+ */
+ if ((count == 0) ||
+ ext2fs_test_block_bitmap2(ctx->block_dup_map,
+ file_acl_block)) {
+ delete_file_block(fs, &file_acl_block,
+ BLOCK_COUNT_EXTATTR, 0, 0, &pb);
+ ext2fs_file_acl_block_set(fs, EXT2_INODE(&dp->inode),
+ file_acl_block);
+ quota_data_sub(ctx->qctx, &dp->inode, ino,
+ fs->blocksize);
+ }
+ }
+}
+
+struct clone_struct {
+ errcode_t errcode;
+ blk64_t dup_cluster;
+ blk64_t alloc_block;
+ ext2_ino_t dir, ino;
+ char *buf;
+ e2fsck_t ctx;
+ struct ext2_inode_large *inode;
+
+ struct dup_cluster *save_dup_cluster;
+ blk64_t save_blocknr;
+};
+
+/*
+ * Decrement the bad count *after* we've shown that (a) we can allocate a
+ * replacement block and (b) remap the file blocks. Unfortunately, there's no
+ * way to find out if the remap succeeded until either the next
+ * clone_file_block() call (an error when remapping the block after returning
+ * BLOCK_CHANGED will halt the iteration) or after block_iterate() returns.
+ * Otherwise, it's possible that we decrease the badcount once in preparation
+ * to remap, then the remap fails (either we can't find a replacement block or
+ * we have to split the extent tree and can't find a new extent block), so we
+ * delete the file, which decreases the badcount again.
+ */
+static void deferred_dec_badcount(struct clone_struct *cs)
+{
+ if (!cs->save_dup_cluster)
+ return;
+ decrement_badcount(cs->ctx, cs->save_blocknr, cs->save_dup_cluster);
+ cs->save_dup_cluster = NULL;
+}
+
+static int clone_file_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct dup_cluster *p = NULL;
+ blk64_t new_block;
+ errcode_t retval;
+ struct clone_struct *cs = (struct clone_struct *) priv_data;
+ dnode_t *n;
+ e2fsck_t ctx;
+ blk64_t c;
+ int is_meta = 0;
+ int should_write = 1;
+
+ ctx = cs->ctx;
+ deferred_dec_badcount(cs);
+
+ if (*block_nr == 0)
+ return 0;
+
+ if (ext2fs_has_feature_shared_blocks(ctx->fs->super) &&
+ (ctx->options & E2F_OPT_UNSHARE_BLOCKS) &&
+ (ctx->options & E2F_OPT_NO))
+ should_write = 0;
+
+ c = EXT2FS_B2C(fs, blockcnt);
+
+ if (c == cs->dup_cluster && cs->alloc_block) {
+ new_block = cs->alloc_block;
+ goto got_block;
+ }
+
+ if (ext2fs_test_block_bitmap2(ctx->block_dup_map, *block_nr)) {
+ n = dict_lookup(&clstr_dict,
+ INT_TO_VOIDPTR(EXT2FS_B2C(fs, *block_nr)));
+ if (!n) {
+ com_err("clone_file_block", 0,
+ _("internal error: can't find dup_blk for %llu\n"),
+ (unsigned long long) *block_nr);
+ return 0;
+ }
+
+ p = (struct dup_cluster *) dnode_get(n);
+
+ cs->dup_cluster = c;
+ /*
+ * Let's try an implied cluster allocation. If we get the same
+ * cluster back, then we need to find a new block; otherwise,
+ * we're merely fixing the problem of one logical cluster being
+ * mapped to multiple physical clusters.
+ */
+ new_block = 0;
+ retval = ext2fs_map_cluster_block(fs, cs->ino,
+ EXT2_INODE(cs->inode),
+ blockcnt, &new_block);
+ if (retval == 0 && new_block != 0 &&
+ EXT2FS_B2C(ctx->fs, new_block) !=
+ EXT2FS_B2C(ctx->fs, *block_nr))
+ goto cluster_alloc_ok;
+ retval = ext2fs_new_block2(fs, 0, ctx->block_found_map,
+ &new_block);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ if (ext2fs_has_feature_shared_blocks(fs->super)) {
+ /*
+ * Update the block stats so we don't get a prompt to fix block
+ * counts in the final pass.
+ */
+ ext2fs_block_alloc_stats2(fs, new_block, +1);
+ }
+cluster_alloc_ok:
+ cs->alloc_block = new_block;
+
+ got_block:
+ new_block &= ~EXT2FS_CLUSTER_MASK(fs);
+ new_block += EXT2FS_CLUSTER_MASK(fs) & blockcnt;
+ if (cs->dir && (blockcnt >= 0)) {
+ retval = ext2fs_set_dir_block2(fs->dblist,
+ cs->dir, new_block, blockcnt);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ }
+#if 0
+ printf("Cloning block #%lld from %llu to %llu\n",
+ blockcnt, (unsigned long long) *block_nr,
+ (unsigned long long) new_block);
+#endif
+ retval = io_channel_read_blk64(fs->io, *block_nr, 1, cs->buf);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ if (should_write) {
+ retval = io_channel_write_blk64(fs->io, new_block, 1, cs->buf);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ }
+ if (check_if_fs_cluster(ctx, EXT2FS_B2C(fs, *block_nr)))
+ is_meta = 1;
+ cs->save_dup_cluster = (is_meta ? NULL : p);
+ cs->save_blocknr = *block_nr;
+ *block_nr = new_block;
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, new_block);
+ ext2fs_mark_block_bitmap2(fs->block_map, new_block);
+
+ if (!should_write) {
+ /* Don't try to change extent information; we want e2fsck to
+ * return success.
+ */
+ return 0;
+ }
+ return BLOCK_CHANGED;
+ }
+ return 0;
+}
+
+static errcode_t clone_file(e2fsck_t ctx, ext2_ino_t ino,
+ struct dup_inode *dp, char* block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct clone_struct cs;
+ struct problem_context pctx;
+ blk64_t blk, new_blk;
+ dnode_t *n;
+ struct inode_el *ino_el;
+ struct dup_cluster *dc;
+ struct dup_inode *di;
+
+ clear_problem_context(&pctx);
+ cs.errcode = 0;
+ cs.dir = 0;
+ cs.dup_cluster = ~0;
+ cs.alloc_block = 0;
+ cs.ctx = ctx;
+ cs.ino = ino;
+ cs.inode = &dp->inode;
+ cs.save_dup_cluster = NULL;
+ cs.save_blocknr = 0;
+ retval = ext2fs_get_mem(fs->blocksize, &cs.buf);
+ if (retval)
+ return retval;
+
+ if (ext2fs_test_inode_bitmap2(ctx->inode_dir_map, ino))
+ cs.dir = ino;
+
+ pctx.ino = ino;
+ pctx.str = "clone_file";
+ if (ext2fs_inode_has_valid_blocks2(fs, EXT2_INODE(&dp->inode)))
+ pctx.errcode = ext2fs_block_iterate3(fs, ino, 0, block_buf,
+ clone_file_block, &cs);
+ deferred_dec_badcount(&cs);
+ ext2fs_mark_bb_dirty(fs);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
+ retval = pctx.errcode;
+ goto errout;
+ }
+ if (cs.errcode) {
+ com_err("clone_file", cs.errcode, "%s",
+ _("returned from clone_file_block"));
+ retval = cs.errcode;
+ goto errout;
+ }
+ /* The inode may have changed on disk, so we have to re-read it */
+ e2fsck_read_inode_full(ctx, ino, EXT2_INODE(&dp->inode),
+ sizeof(dp->inode), "clone file EA");
+ blk = ext2fs_file_acl_block(fs, EXT2_INODE(&dp->inode));
+ new_blk = blk;
+ if (blk && (clone_file_block(fs, &new_blk,
+ BLOCK_COUNT_EXTATTR, 0, 0, &cs) ==
+ BLOCK_CHANGED)) {
+ ext2fs_file_acl_block_set(fs, EXT2_INODE(&dp->inode), new_blk);
+ e2fsck_write_inode_full(ctx, ino, EXT2_INODE(&dp->inode),
+ sizeof(dp->inode), "clone file EA");
+ /*
+ * If we cloned the EA block, find all other inodes
+ * which referred to that EA block, and modify
+ * them to point to the new EA block.
+ */
+ n = dict_lookup(&clstr_dict,
+ INT_TO_VOIDPTR(EXT2FS_B2C(fs, blk)));
+ if (!n) {
+ com_err("clone_file", 0,
+ _("internal error: couldn't lookup EA "
+ "block record for %llu"),
+ (unsigned long long) blk);
+ retval = 0; /* OK to stumble on... */
+ goto errout;
+ }
+ dc = (struct dup_cluster *) dnode_get(n);
+ for (ino_el = dc->inode_list; ino_el; ino_el = ino_el->next) {
+ if (ino_el->inode == ino)
+ continue;
+ n = dict_lookup(&ino_dict, INT_TO_VOIDPTR(ino_el->inode));
+ if (!n) {
+ com_err("clone_file", 0,
+ _("internal error: couldn't lookup EA "
+ "inode record for %u"),
+ ino_el->inode);
+ retval = 0; /* OK to stumble on... */
+ goto errout;
+ }
+ di = (struct dup_inode *) dnode_get(n);
+ if (ext2fs_file_acl_block(fs,
+ EXT2_INODE(&di->inode)) == blk) {
+ ext2fs_file_acl_block_set(fs,
+ EXT2_INODE(&di->inode),
+ ext2fs_file_acl_block(fs, EXT2_INODE(&dp->inode)));
+ e2fsck_write_inode_full(ctx, ino_el->inode,
+ EXT2_INODE(&di->inode),
+ sizeof(di->inode), "clone file EA");
+ decrement_badcount(ctx, blk, dc);
+ }
+ }
+ }
+ retval = 0;
+errout:
+ ext2fs_free_mem(&cs.buf);
+ return retval;
+}
+
+/*
+ * This routine returns 1 if a block overlaps with one of the superblocks,
+ * group descriptors, inode bitmaps, or block bitmaps.
+ */
+static int check_if_fs_block(e2fsck_t ctx, blk64_t block)
+{
+ return ext2fs_test_block_bitmap2(ctx->block_metadata_map, block);
+}
+
+/*
+ * This routine returns 1 if a cluster overlaps with one of the superblocks,
+ * group descriptors, inode bitmaps, or block bitmaps.
+ */
+static int check_if_fs_cluster(e2fsck_t ctx, blk64_t cluster)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t block = EXT2FS_C2B(fs, cluster);
+ int i;
+
+ for (i = 0; i < EXT2FS_CLUSTER_RATIO(fs); i++) {
+ if (ext2fs_test_block_bitmap2(ctx->block_metadata_map,
+ block + i))
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
new file mode 100644
index 0000000..410edd1
--- /dev/null
+++ b/e2fsck/pass2.c
@@ -0,0 +1,2171 @@
+/*
+ * pass2.c --- check directory structure
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * Pass 2 of e2fsck iterates through all active directory inodes, and
+ * applies to following tests to each directory entry in the directory
+ * blocks in the inodes:
+ *
+ * - The length of the directory entry (rec_len) should be at
+ * least 8 bytes, and no more than the remaining space
+ * left in the directory block.
+ * - The length of the name in the directory entry (name_len)
+ * should be less than (rec_len - 8).
+ * - The inode number in the directory entry should be within
+ * legal bounds.
+ * - The inode number should refer to a in-use inode.
+ * - The first entry should be '.', and its inode should be
+ * the inode of the directory.
+ * - The second entry should be '..'.
+ *
+ * To minimize disk seek time, the directory blocks are processed in
+ * sorted order of block numbers.
+ *
+ * Pass 2 also collects the following information:
+ * - The inode numbers of the subdirectories for each directory.
+ *
+ * Pass 2 relies on the following information from previous passes:
+ * - The directory information collected in pass 1.
+ * - The inode_used_map bitmap
+ * - The inode_bad_map bitmap
+ * - The inode_dir_map bitmap
+ * - The encrypted_file_info
+ * - The inode_casefold_map bitmap
+ *
+ * Pass 2 frees the following data structures
+ * - The inode_bad_map bitmap
+ * - The inode_reg_map bitmap
+ * - The encrypted_file_info
+ * - The inode_casefold_map bitmap
+ */
+
+#define _GNU_SOURCE 1 /* get strnlen() */
+#include "config.h"
+#include <string.h>
+
+#include "e2fsck.h"
+#include "problem.h"
+#include "support/dict.h"
+
+#ifdef NO_INLINE_FUNCS
+#define _INLINE_
+#else
+#define _INLINE_ inline
+#endif
+
+/* #define DX_DEBUG */
+
+/*
+ * Keeps track of how many times an inode is referenced.
+ */
+static void deallocate_inode(e2fsck_t ctx, ext2_ino_t ino, char* block_buf);
+static int check_dir_block2(ext2_filsys fs,
+ struct ext2_db_entry2 *dir_blocks_info,
+ void *priv_data);
+static int check_dir_block(ext2_filsys fs,
+ struct ext2_db_entry2 *dir_blocks_info,
+ void *priv_data);
+static int allocate_dir_block(e2fsck_t ctx,
+ struct ext2_db_entry2 *dir_blocks_info,
+ char *buf, struct problem_context *pctx);
+static void clear_htree(e2fsck_t ctx, ext2_ino_t ino);
+static short htree_depth(struct dx_dir_info *dx_dir,
+ struct dx_dirblock_info *dx_db);
+static EXT2_QSORT_TYPE special_dir_block_cmp(const void *a, const void *b);
+
+struct check_dir_struct {
+ char *buf;
+ struct problem_context pctx;
+ int count, max;
+ e2fsck_t ctx;
+ unsigned long long list_offset;
+ unsigned long long ra_entries;
+ unsigned long long next_ra_off;
+};
+
+static void update_parents(struct dx_dir_info *dx_dir, int type)
+{
+ struct dx_dirblock_info *dx_db, *dx_parent, *dx_previous;
+ blk_t b;
+
+ for (b = 0, dx_db = dx_dir->dx_block;
+ b < dx_dir->numblocks;
+ b++, dx_db++) {
+ dx_parent = &dx_dir->dx_block[dx_db->parent];
+ if (dx_db->type != type)
+ continue;
+
+ /*
+ * XXX Make sure dx_parent->min_hash > dx_db->min_hash
+ */
+ if (dx_db->flags & DX_FLAG_FIRST) {
+ dx_parent->min_hash = dx_db->min_hash;
+ if (dx_parent->previous) {
+ dx_previous =
+ &dx_dir->dx_block[dx_parent->previous];
+ dx_previous->node_max_hash =
+ dx_parent->min_hash;
+ }
+ }
+ /*
+ * XXX Make sure dx_parent->max_hash < dx_db->max_hash
+ */
+ if (dx_db->flags & DX_FLAG_LAST) {
+ dx_parent->max_hash = dx_db->max_hash;
+ }
+ }
+}
+
+void e2fsck_pass2(e2fsck_t ctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct problem_context pctx;
+ ext2_filsys fs = ctx->fs;
+ char *buf = NULL;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ struct check_dir_struct cd;
+ struct dx_dir_info *dx_dir;
+ struct dx_dirblock_info *dx_db;
+ blk_t b;
+ ext2_ino_t i;
+ short depth;
+ problem_t code;
+ int bad_dir;
+ int (*check_dir_func)(ext2_filsys fs,
+ struct ext2_db_entry2 *dir_blocks_info,
+ void *priv_data);
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ clear_problem_context(&cd.pctx);
+
+#ifdef MTRACE
+ mtrace_print("Pass 2");
+#endif
+
+ fs->flags |= EXT2_FLAG_IGNORE_SWAP_DIRENT;
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_2_PASS_HEADER, &cd.pctx);
+
+ cd.pctx.errcode = e2fsck_setup_icount(ctx, "inode_count",
+ EXT2_ICOUNT_OPT_INCREMENT,
+ ctx->inode_link_info, &ctx->inode_count);
+ if (cd.pctx.errcode) {
+ fix_problem(ctx, PR_2_ALLOCATE_ICOUNT, &cd.pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto cleanup;
+ }
+ buf = (char *) e2fsck_allocate_memory(ctx, 2*fs->blocksize,
+ "directory scan buffer");
+
+ /*
+ * Set up the parent pointer for the root directory, if
+ * present. (If the root directory is not present, we will
+ * create it in pass 3.)
+ */
+ (void) e2fsck_dir_info_set_parent(ctx, EXT2_ROOT_INO, EXT2_ROOT_INO);
+
+ cd.buf = buf;
+ cd.ctx = ctx;
+ cd.count = 1;
+ cd.max = ext2fs_dblist_count2(fs->dblist);
+ cd.list_offset = 0;
+ cd.ra_entries = ctx->readahead_kb * 1024 / ctx->fs->blocksize;
+ cd.next_ra_off = 0;
+
+ if (ctx->progress)
+ (void) (ctx->progress)(ctx, 2, 0, cd.max);
+
+ if (ext2fs_has_feature_dir_index(fs->super))
+ ext2fs_dblist_sort2(fs->dblist, special_dir_block_cmp);
+
+ check_dir_func = cd.ra_entries ? check_dir_block2 : check_dir_block;
+ cd.pctx.errcode = ext2fs_dblist_iterate2(fs->dblist, check_dir_func,
+ &cd);
+ if (ctx->flags & E2F_FLAG_RESTART_LATER) {
+ ctx->flags |= E2F_FLAG_RESTART;
+ ctx->flags &= ~E2F_FLAG_RESTART_LATER;
+ }
+
+ if (ctx->flags & E2F_FLAG_RUN_RETURN)
+ goto cleanup;
+
+ if (cd.pctx.errcode) {
+ fix_problem(ctx, PR_2_DBLIST_ITERATE, &cd.pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto cleanup;
+ }
+
+ for (i=0; (dx_dir = e2fsck_dx_dir_info_iter(ctx, &i)) != 0;) {
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto cleanup;
+ if (e2fsck_dir_will_be_rehashed(ctx, dx_dir->ino) ||
+ dx_dir->numblocks == 0)
+ continue;
+ clear_problem_context(&pctx);
+ bad_dir = 0;
+ pctx.dir = dx_dir->ino;
+ dx_db = dx_dir->dx_block;
+ if (dx_db->flags & DX_FLAG_REFERENCED)
+ dx_db->flags |= DX_FLAG_DUP_REF;
+ else
+ dx_db->flags |= DX_FLAG_REFERENCED;
+ /*
+ * Find all of the first and last leaf blocks, and
+ * update their parent's min and max hash values
+ */
+ update_parents(dx_dir, DX_DIRBLOCK_LEAF);
+
+ /* for 3 level htree: update 2 level parent's min
+ * and max hash values */
+ update_parents(dx_dir, DX_DIRBLOCK_NODE);
+
+ for (b=0, dx_db = dx_dir->dx_block;
+ b < dx_dir->numblocks;
+ b++, dx_db++) {
+ pctx.blkcount = b;
+ pctx.group = dx_db->parent;
+ code = 0;
+ if (!(dx_db->flags & DX_FLAG_FIRST) &&
+ (dx_db->min_hash < dx_db->node_min_hash)) {
+ pctx.blk = dx_db->min_hash;
+ pctx.blk2 = dx_db->node_min_hash;
+ code = PR_2_HTREE_MIN_HASH;
+ fix_problem(ctx, code, &pctx);
+ bad_dir++;
+ }
+ if (dx_db->type == DX_DIRBLOCK_LEAF) {
+ depth = htree_depth(dx_dir, dx_db);
+ if (depth != dx_dir->depth) {
+ pctx.num = dx_dir->depth;
+ code = PR_2_HTREE_BAD_DEPTH;
+ fix_problem(ctx, code, &pctx);
+ bad_dir++;
+ }
+ }
+ /*
+ * This test doesn't apply for the root block
+ * at block #0
+ */
+ if (b &&
+ (dx_db->max_hash > dx_db->node_max_hash)) {
+ pctx.blk = dx_db->max_hash;
+ pctx.blk2 = dx_db->node_max_hash;
+ code = PR_2_HTREE_MAX_HASH;
+ fix_problem(ctx, code, &pctx);
+ bad_dir++;
+ }
+ if (!(dx_db->flags & DX_FLAG_REFERENCED)) {
+ code = PR_2_HTREE_NOTREF;
+ fix_problem(ctx, code, &pctx);
+ bad_dir++;
+ } else if (dx_db->flags & DX_FLAG_DUP_REF) {
+ code = PR_2_HTREE_DUPREF;
+ fix_problem(ctx, code, &pctx);
+ bad_dir++;
+ }
+ }
+ if (bad_dir && fix_problem(ctx, PR_2_HTREE_CLEAR, &pctx)) {
+ clear_htree(ctx, dx_dir->ino);
+ dx_dir->numblocks = 0;
+ }
+ }
+ e2fsck_free_dx_dir_info(ctx);
+
+ ext2fs_free_mem(&buf);
+ ext2fs_free_dblist(fs->dblist);
+
+ if (ctx->inode_bad_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_bad_map);
+ ctx->inode_bad_map = 0;
+ }
+ if (ctx->inode_reg_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_reg_map);
+ ctx->inode_reg_map = 0;
+ }
+ if (ctx->inode_casefold_map) {
+ ext2fs_free_inode_bitmap(ctx->inode_casefold_map);
+ ctx->inode_casefold_map = 0;
+ }
+ destroy_encrypted_file_info(ctx);
+ if (ctx->casefolded_dirs) {
+ ext2fs_u32_list_free(ctx->casefolded_dirs);
+ ctx->casefolded_dirs = 0;
+ }
+
+ clear_problem_context(&pctx);
+ if (ctx->large_files) {
+ if (!ext2fs_has_feature_large_file(sb) &&
+ fix_problem(ctx, PR_2_FEATURE_LARGE_FILES, &pctx)) {
+ ext2fs_set_feature_large_file(sb);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ ext2fs_mark_super_dirty(fs);
+ }
+ if (sb->s_rev_level == EXT2_GOOD_OLD_REV &&
+ fix_problem(ctx, PR_1_FS_REV_LEVEL, &pctx)) {
+ ext2fs_update_dynamic_rev(fs);
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+ print_resource_track(ctx, _("Pass 2"), &rtrack, fs->io);
+cleanup:
+ ext2fs_free_mem(&buf);
+ fs->flags &= ~EXT2_FLAG_IGNORE_SWAP_DIRENT;
+}
+
+#define MAX_DEPTH 32000
+static short htree_depth(struct dx_dir_info *dx_dir,
+ struct dx_dirblock_info *dx_db)
+{
+ short depth = 0;
+
+ while (dx_db->type != DX_DIRBLOCK_ROOT && depth < MAX_DEPTH) {
+ dx_db = &dx_dir->dx_block[dx_db->parent];
+ depth++;
+ }
+ return depth;
+}
+
+static int dict_de_cmp(const void *cmp_ctx EXT2FS_ATTR((unused)),
+ const void *a, const void *b)
+{
+ const struct ext2_dir_entry *de_a, *de_b;
+ int a_len, b_len;
+
+ de_a = (const struct ext2_dir_entry *) a;
+ a_len = ext2fs_dirent_name_len(de_a);
+ de_b = (const struct ext2_dir_entry *) b;
+ b_len = ext2fs_dirent_name_len(de_b);
+
+ if (a_len != b_len)
+ return (a_len - b_len);
+
+ return memcmp(de_a->name, de_b->name, a_len);
+}
+
+static int dict_de_cf_cmp(const void *cmp_ctx, const void *a, const void *b)
+{
+ const struct ext2fs_nls_table *tbl = cmp_ctx;
+ const struct ext2_dir_entry *de_a, *de_b;
+ int a_len, b_len;
+
+ de_a = (const struct ext2_dir_entry *) a;
+ a_len = ext2fs_dirent_name_len(de_a);
+ de_b = (const struct ext2_dir_entry *) b;
+ b_len = ext2fs_dirent_name_len(de_b);
+
+ return ext2fs_casefold_cmp(tbl,
+ (const unsigned char *) de_a->name, a_len,
+ (const unsigned char *) de_b->name, b_len);
+}
+
+/*
+ * This is special sort function that makes sure that directory blocks
+ * with a dirblock of zero are sorted to the beginning of the list.
+ * This guarantees that the root node of the htree directories are
+ * processed first, so we know what hash version to use.
+ */
+static EXT2_QSORT_TYPE special_dir_block_cmp(const void *a, const void *b)
+{
+ const struct ext2_db_entry2 *db_a =
+ (const struct ext2_db_entry2 *) a;
+ const struct ext2_db_entry2 *db_b =
+ (const struct ext2_db_entry2 *) b;
+
+ if (db_a->blockcnt && !db_b->blockcnt)
+ return 1;
+
+ if (!db_a->blockcnt && db_b->blockcnt)
+ return -1;
+
+ if (db_a->blk != db_b->blk)
+ return (int) (db_a->blk - db_b->blk);
+
+ if (db_a->ino != db_b->ino)
+ return (int) (db_a->ino - db_b->ino);
+
+ return (int) (db_a->blockcnt - db_b->blockcnt);
+}
+
+
+/*
+ * Make sure the first entry in the directory is '.', and that the
+ * directory entry is sane.
+ */
+static int check_dot(e2fsck_t ctx,
+ struct ext2_dir_entry *dirent,
+ ext2_ino_t ino, struct problem_context *pctx)
+{
+ struct ext2_dir_entry *nextdir;
+ unsigned int rec_len, new_len;
+ int status = 0;
+ int created = 0;
+ problem_t problem = 0;
+ int ftype = EXT2_FT_DIR;
+
+ if (!dirent->inode)
+ problem = PR_2_MISSING_DOT;
+ else if ((ext2fs_dirent_name_len(dirent) != 1) ||
+ (dirent->name[0] != '.'))
+ problem = PR_2_1ST_NOT_DOT;
+ else if (dirent->name[1] != '\0')
+ problem = PR_2_DOT_NULL_TERM;
+
+ (void) ext2fs_get_rec_len(ctx->fs, dirent, &rec_len);
+ if (problem) {
+ if (!ext2fs_has_feature_filetype(ctx->fs->super))
+ ftype = EXT2_FT_UNKNOWN;
+ if (fix_problem(ctx, problem, pctx)) {
+ if (rec_len < 12)
+ rec_len = dirent->rec_len = 12;
+ dirent->inode = ino;
+ ext2fs_dirent_set_name_len(dirent, 1);
+ ext2fs_dirent_set_file_type(dirent, ftype);
+ dirent->name[0] = '.';
+ dirent->name[1] = '\0';
+ status = 1;
+ created = 1;
+ }
+ }
+ if (dirent->inode != ino) {
+ if (fix_problem(ctx, PR_2_BAD_INODE_DOT, pctx)) {
+ dirent->inode = ino;
+ status = 1;
+ }
+ }
+ if (rec_len > 12) {
+ new_len = rec_len - 12;
+ if (new_len > 12) {
+ if (created ||
+ fix_problem(ctx, PR_2_SPLIT_DOT, pctx)) {
+ nextdir = (struct ext2_dir_entry *)
+ ((char *) dirent + 12);
+ dirent->rec_len = 12;
+ /* if the next entry looks like "..", leave it
+ * and let check_dotdot() verify the dirent,
+ * otherwise zap the following entry. */
+ if (strncmp(nextdir->name, "..", 3) != 0) {
+ (void)ext2fs_set_rec_len(ctx->fs,
+ new_len,
+ nextdir);
+ nextdir->inode = 0;
+ ext2fs_dirent_set_name_len(nextdir, 0);
+ ext2fs_dirent_set_file_type(nextdir,
+ ftype);
+#ifdef WORDS_BIGENDIAN
+ } else {
+ (void) ext2fs_dirent_swab_in2(ctx->fs,
+ (char *) nextdir,
+ ctx->fs->blocksize - 12, 0);
+#endif
+ }
+ status = 1;
+ }
+ }
+ }
+ return status;
+}
+
+/*
+ * Make sure the second entry in the directory is '..', and that the
+ * directory entry is sane. We do not check the inode number of '..'
+ * here; this gets done in pass 3.
+ */
+static int check_dotdot(e2fsck_t ctx,
+ struct ext2_dir_entry *dirent,
+ ext2_ino_t ino, struct problem_context *pctx)
+{
+ problem_t problem = 0;
+ unsigned int rec_len;
+ int ftype = EXT2_FT_DIR;
+
+ if (!dirent->inode)
+ problem = PR_2_MISSING_DOT_DOT;
+ else if ((ext2fs_dirent_name_len(dirent) != 2) ||
+ (dirent->name[0] != '.') ||
+ (dirent->name[1] != '.'))
+ problem = PR_2_2ND_NOT_DOT_DOT;
+ else if (dirent->name[2] != '\0')
+ problem = PR_2_DOT_DOT_NULL_TERM;
+
+ (void) ext2fs_get_rec_len(ctx->fs, dirent, &rec_len);
+ if (problem) {
+ if (!ext2fs_has_feature_filetype(ctx->fs->super))
+ ftype = EXT2_FT_UNKNOWN;
+ if (fix_problem(ctx, problem, pctx)) {
+ if (rec_len < 12)
+ dirent->rec_len = 12;
+ /*
+ * Note: we don't have the parent inode just
+ * yet, so we will fill it in with the root
+ * inode. This will get fixed in pass 3.
+ */
+ dirent->inode = EXT2_ROOT_INO;
+ ext2fs_dirent_set_name_len(dirent, 2);
+ ext2fs_dirent_set_file_type(dirent, ftype);
+ dirent->name[0] = '.';
+ dirent->name[1] = '.';
+ dirent->name[2] = '\0';
+ return 1;
+ }
+ return 0;
+ }
+ if (e2fsck_dir_info_set_dotdot(ctx, ino, dirent->inode)) {
+ fix_problem(ctx, PR_2_NO_DIRINFO, pctx);
+ return -1;
+ }
+ return 0;
+}
+
+/*
+ * Check to make sure a directory entry doesn't contain any illegal
+ * characters.
+ */
+static int check_name(e2fsck_t ctx,
+ struct ext2_dir_entry *dirent,
+ struct problem_context *pctx)
+{
+ int i;
+ int fixup = -1;
+ int ret = 0;
+
+ for ( i = 0; i < ext2fs_dirent_name_len(dirent); i++) {
+ if (dirent->name[i] != '/' && dirent->name[i] != '\0')
+ continue;
+ if (fixup < 0)
+ fixup = fix_problem(ctx, PR_2_BAD_NAME, pctx);
+ if (fixup == 0)
+ return 0;
+ dirent->name[i] = '.';
+ ret = 1;
+ }
+ return ret;
+}
+
+static int encrypted_check_name(e2fsck_t ctx,
+ const struct ext2_dir_entry *dirent,
+ struct problem_context *pctx)
+{
+ if (ext2fs_dirent_name_len(dirent) < EXT4_CRYPTO_BLOCK_SIZE) {
+ if (fix_problem(ctx, PR_2_BAD_ENCRYPTED_NAME, pctx))
+ return 1;
+ ext2fs_unmark_valid(ctx->fs);
+ }
+ return 0;
+}
+
+static int encoded_check_name(e2fsck_t ctx,
+ struct ext2_dir_entry *dirent,
+ struct problem_context *pctx)
+{
+ const struct ext2fs_nls_table *tbl = ctx->fs->encoding;
+ int ret;
+ int len = ext2fs_dirent_name_len(dirent);
+ char *pos, *end;
+
+ ret = ext2fs_check_encoded_name(tbl, dirent->name, len, &pos);
+ if (ret < 0) {
+ fatal_error(ctx, _("NLS is broken."));
+ } else if(ret > 0) {
+ ret = fix_problem(ctx, PR_2_BAD_ENCODED_NAME, pctx);
+ if (ret) {
+ end = &dirent->name[len];
+ for (; *pos && pos != end; pos++)
+ *pos = '.';
+ }
+ }
+
+ return (ret || check_name(ctx, dirent, pctx));
+}
+
+/*
+ * Check the directory filetype (if present)
+ */
+static _INLINE_ int check_filetype(e2fsck_t ctx,
+ struct ext2_dir_entry *dirent,
+ ext2_ino_t dir_ino EXT2FS_ATTR((unused)),
+ struct problem_context *pctx)
+{
+ int filetype = ext2fs_dirent_file_type(dirent);
+ int should_be = EXT2_FT_UNKNOWN;
+ struct ext2_inode inode;
+
+ if (!ext2fs_has_feature_filetype(ctx->fs->super)) {
+ if (filetype == 0 ||
+ !fix_problem(ctx, PR_2_CLEAR_FILETYPE, pctx))
+ return 0;
+ ext2fs_dirent_set_file_type(dirent, EXT2_FT_UNKNOWN);
+ return 1;
+ }
+
+ if (ext2fs_test_inode_bitmap2(ctx->inode_dir_map, dirent->inode)) {
+ should_be = EXT2_FT_DIR;
+ } else if (ext2fs_test_inode_bitmap2(ctx->inode_reg_map,
+ dirent->inode)) {
+ should_be = EXT2_FT_REG_FILE;
+ } else if (ctx->inode_bad_map &&
+ ext2fs_test_inode_bitmap2(ctx->inode_bad_map,
+ dirent->inode))
+ should_be = 0;
+ else {
+ e2fsck_read_inode(ctx, dirent->inode, &inode,
+ "check_filetype");
+ should_be = ext2_file_type(inode.i_mode);
+ }
+ if (filetype == should_be)
+ return 0;
+ pctx->num = should_be;
+
+ if (fix_problem(ctx, filetype ? PR_2_BAD_FILETYPE : PR_2_SET_FILETYPE,
+ pctx) == 0)
+ return 0;
+
+ ext2fs_dirent_set_file_type(dirent, should_be);
+ return 1;
+}
+
+static void parse_int_node(ext2_filsys fs,
+ struct ext2_db_entry2 *db,
+ struct check_dir_struct *cd,
+ struct dx_dir_info *dx_dir,
+ char *block_buf, int failed_csum)
+{
+ struct ext2_dx_root_info *root;
+ struct ext2_dx_entry *ent;
+ struct ext2_dx_countlimit *limit;
+ struct dx_dirblock_info *dx_db;
+ int i, expect_limit, count;
+ blk_t blk;
+ ext2_dirhash_t min_hash = 0xffffffff;
+ ext2_dirhash_t max_hash = 0;
+ ext2_dirhash_t hash = 0, prev_hash;
+ int csum_size = 0;
+
+ if (db->blockcnt == 0) {
+ root = (struct ext2_dx_root_info *) (block_buf + 24);
+
+#ifdef DX_DEBUG
+ printf("Root node dump:\n");
+ printf("\t Reserved zero: %u\n", root->reserved_zero);
+ printf("\t Hash Version: %u\n", root->hash_version);
+ printf("\t Info length: %u\n", root->info_length);
+ printf("\t Indirect levels: %u\n", root->indirect_levels);
+ printf("\t Flags: %x\n", root->unused_flags);
+#endif
+
+ ent = (struct ext2_dx_entry *) (block_buf + 24 + root->info_length);
+
+ if (failed_csum &&
+ (e2fsck_dir_will_be_rehashed(cd->ctx, cd->pctx.ino) ||
+ fix_problem(cd->ctx, PR_2_HTREE_ROOT_CSUM_INVALID,
+ &cd->pctx)))
+ goto clear_and_exit;
+ } else {
+ ent = (struct ext2_dx_entry *) (block_buf+8);
+
+ if (failed_csum &&
+ (e2fsck_dir_will_be_rehashed(cd->ctx, cd->pctx.ino) ||
+ fix_problem(cd->ctx, PR_2_HTREE_NODE_CSUM_INVALID,
+ &cd->pctx)))
+ goto clear_and_exit;
+ }
+
+ limit = (struct ext2_dx_countlimit *) ent;
+
+#ifdef DX_DEBUG
+ printf("Number of entries (count): %d\n",
+ ext2fs_le16_to_cpu(limit->count));
+ printf("Number of entries (limit): %d\n",
+ ext2fs_le16_to_cpu(limit->limit));
+#endif
+
+ count = ext2fs_le16_to_cpu(limit->count);
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dx_tail);
+ expect_limit = (fs->blocksize -
+ (csum_size + ((char *) ent - block_buf))) /
+ sizeof(struct ext2_dx_entry);
+ if (ext2fs_le16_to_cpu(limit->limit) != expect_limit) {
+ cd->pctx.num = ext2fs_le16_to_cpu(limit->limit);
+ if (fix_problem(cd->ctx, PR_2_HTREE_BAD_LIMIT, &cd->pctx))
+ goto clear_and_exit;
+ }
+ if (count > expect_limit) {
+ cd->pctx.num = count;
+ if (fix_problem(cd->ctx, PR_2_HTREE_BAD_COUNT, &cd->pctx))
+ goto clear_and_exit;
+ count = expect_limit;
+ }
+
+ for (i=0; i < count; i++) {
+ prev_hash = hash;
+ hash = i ? (ext2fs_le32_to_cpu(ent[i].hash) & ~1) : 0;
+#ifdef DX_DEBUG
+ printf("Entry #%d: Hash 0x%08x, block %u\n", i,
+ hash, ext2fs_le32_to_cpu(ent[i].block));
+#endif
+ blk = ext2fs_le32_to_cpu(ent[i].block) & EXT4_DX_BLOCK_MASK;
+ /* Check to make sure the block is valid */
+ if (blk >= dx_dir->numblocks) {
+ cd->pctx.blk = blk;
+ if (fix_problem(cd->ctx, PR_2_HTREE_BADBLK,
+ &cd->pctx))
+ goto clear_and_exit;
+ continue;
+ }
+ if (hash < prev_hash &&
+ fix_problem(cd->ctx, PR_2_HTREE_HASH_ORDER, &cd->pctx))
+ goto clear_and_exit;
+ dx_db = &dx_dir->dx_block[blk];
+ if (dx_db->flags & DX_FLAG_REFERENCED) {
+ dx_db->flags |= DX_FLAG_DUP_REF;
+ } else {
+ dx_db->flags |= DX_FLAG_REFERENCED;
+ dx_db->parent = db->blockcnt;
+ }
+
+ dx_db->previous =
+ i ? (ext2fs_le32_to_cpu(ent[i-1].block) &
+ EXT4_DX_BLOCK_MASK) : 0;
+
+ if (hash < min_hash)
+ min_hash = hash;
+ if (hash > max_hash)
+ max_hash = hash;
+ dx_db->node_min_hash = hash;
+ if ((i+1) < count)
+ dx_db->node_max_hash =
+ ext2fs_le32_to_cpu(ent[i+1].hash) & ~1;
+ else {
+ dx_db->node_max_hash = 0xfffffffe;
+ dx_db->flags |= DX_FLAG_LAST;
+ }
+ if (i == 0)
+ dx_db->flags |= DX_FLAG_FIRST;
+ }
+#ifdef DX_DEBUG
+ printf("Blockcnt = %d, min hash 0x%08x, max hash 0x%08x\n",
+ db->blockcnt, min_hash, max_hash);
+#endif
+ dx_db = &dx_dir->dx_block[db->blockcnt];
+ dx_db->min_hash = min_hash;
+ dx_db->max_hash = max_hash;
+ return;
+
+clear_and_exit:
+ clear_htree(cd->ctx, cd->pctx.ino);
+ dx_dir->numblocks = 0;
+ e2fsck_rehash_dir_later(cd->ctx, cd->pctx.ino);
+}
+
+/*
+ * Given a busted directory, try to salvage it somehow.
+ *
+ */
+static void salvage_directory(ext2_filsys fs,
+ struct ext2_dir_entry *dirent,
+ struct ext2_dir_entry *prev,
+ unsigned int *offset,
+ unsigned int block_len,
+ int hash_in_dirent)
+{
+ char *cp = (char *) dirent;
+ int left;
+ unsigned int rec_len, prev_rec_len;
+ unsigned int name_len;
+
+ /*
+ * If the space left for the entry is too small to be an entry,
+ * we can't access dirent's fields, so plumb in the values needed
+ * so that the previous entry absorbs this one.
+ */
+ if (block_len - *offset < EXT2_DIR_ENTRY_HEADER_LEN) {
+ name_len = 0;
+ rec_len = block_len - *offset;
+ } else {
+ name_len = ext2fs_dirent_name_len(dirent);
+ (void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+ }
+ left = block_len - *offset - rec_len;
+
+ /*
+ * Special case of directory entry of size 8: copy what's left
+ * of the directory block up to cover up the invalid hole.
+ */
+ if ((left >= (int) ext2fs_dir_rec_len(1, hash_in_dirent)) &&
+ (rec_len == EXT2_DIR_ENTRY_HEADER_LEN)) {
+ memmove(cp, cp+EXT2_DIR_ENTRY_HEADER_LEN, left);
+ memset(cp + left, 0, EXT2_DIR_ENTRY_HEADER_LEN);
+ return;
+ }
+ /*
+ * If the directory entry overruns the end of the directory
+ * block, and the name is small enough to fit, then adjust the
+ * record length.
+ */
+ if ((left < 0) &&
+ ((int) rec_len + left > EXT2_DIR_ENTRY_HEADER_LEN) &&
+ ((int) ext2fs_dir_rec_len(name_len, hash_in_dirent) <= (int) rec_len + left) &&
+ dirent->inode <= fs->super->s_inodes_count &&
+ strnlen(dirent->name, name_len) == name_len) {
+ (void) ext2fs_set_rec_len(fs, (int) rec_len + left, dirent);
+ return;
+ }
+ /*
+ * If the record length of the directory entry is a multiple
+ * of four, and not too big, such that it is valid, let the
+ * previous directory entry absorb the invalid one.
+ */
+ if (prev && rec_len && (rec_len % 4) == 0 &&
+ (*offset + rec_len <= block_len)) {
+ (void) ext2fs_get_rec_len(fs, prev, &prev_rec_len);
+ prev_rec_len += rec_len;
+ (void) ext2fs_set_rec_len(fs, prev_rec_len, prev);
+ *offset += rec_len;
+ return;
+ }
+ /*
+ * Default salvage method --- kill all of the directory
+ * entries for the rest of the block. We will either try to
+ * absorb it into the previous directory entry, or create a
+ * new empty directory entry the rest of the directory block.
+ */
+ if (prev) {
+ (void) ext2fs_get_rec_len(fs, prev, &prev_rec_len);
+ prev_rec_len += block_len - *offset;
+ (void) ext2fs_set_rec_len(fs, prev_rec_len, prev);
+ *offset = fs->blocksize;
+ } else {
+ rec_len = block_len - *offset;
+ (void) ext2fs_set_rec_len(fs, rec_len, dirent);
+ ext2fs_dirent_set_name_len(dirent, 0);
+ ext2fs_dirent_set_file_type(dirent, EXT2_FT_UNKNOWN);
+ dirent->inode = 0;
+ }
+}
+
+#define NEXT_DIRENT(d) ((void *)((char *)(d) + (d)->rec_len))
+static errcode_t insert_dirent_tail(ext2_filsys fs, void *dirbuf)
+{
+ struct ext2_dir_entry *d;
+ void *top;
+ struct ext2_dir_entry_tail *t;
+
+ d = dirbuf;
+ top = EXT2_DIRENT_TAIL(dirbuf, fs->blocksize);
+
+ while (d->rec_len && !(d->rec_len & 0x3) && NEXT_DIRENT(d) <= top)
+ d = NEXT_DIRENT(d);
+
+ if (d != top) {
+ unsigned int min_size = EXT2_DIR_REC_LEN(
+ ext2fs_dirent_name_len(dirbuf));
+ if (min_size > (char *)top - (char *)d)
+ return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;
+ d->rec_len = (char *)top - (char *)d;
+ }
+
+ t = (struct ext2_dir_entry_tail *)top;
+ if (t->det_reserved_zero1 ||
+ t->det_rec_len != sizeof(struct ext2_dir_entry_tail) ||
+ t->det_reserved_name_len != EXT2_DIR_NAME_LEN_CSUM)
+ ext2fs_initialize_dirent_tail(fs, t);
+
+ return 0;
+}
+#undef NEXT_DIRENT
+
+static errcode_t fix_inline_dir_size(e2fsck_t ctx, ext2_ino_t ino,
+ size_t *inline_data_size,
+ struct problem_context *pctx,
+ char *buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct ext2_inode inode;
+ size_t new_size, old_size;
+ errcode_t retval;
+
+ old_size = *inline_data_size;
+ /*
+ * If there's not enough bytes to start the "second" dir block
+ * (in the EA space) then truncate everything to the first block.
+ */
+ if (old_size > EXT4_MIN_INLINE_DATA_SIZE &&
+ old_size < EXT4_MIN_INLINE_DATA_SIZE +
+ EXT2_DIR_REC_LEN(1)) {
+ old_size = EXT4_MIN_INLINE_DATA_SIZE;
+ new_size = old_size;
+ } else
+ /* Increase to the next four-byte boundary for salvaging */
+ new_size = old_size + (4 - (old_size & 3));
+ memset(buf + old_size, 0, new_size - old_size);
+ retval = ext2fs_inline_data_set(fs, ino, 0, buf, new_size);
+ if (retval == EXT2_ET_INLINE_DATA_NO_SPACE) {
+ /* Or we can't, so truncate. */
+ new_size -= 4;
+ retval = ext2fs_inline_data_set(fs, ino, 0, buf, new_size);
+ if (retval) {
+ if (fix_problem(ctx, PR_2_FIX_INLINE_DIR_FAILED,
+ pctx)) {
+ new_size = 0;
+ goto write_inode;
+ }
+ goto err;
+ }
+ } else if (retval) {
+ if (fix_problem(ctx, PR_2_FIX_INLINE_DIR_FAILED,
+ pctx)) {
+ new_size = 0;
+ goto write_inode;
+ }
+ goto err;
+ }
+
+write_inode:
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ goto err;
+
+ retval = ext2fs_inode_size_set(fs, &inode, new_size);
+ if (retval)
+ goto err;
+ if (new_size == 0)
+ inode.i_flags &= ~EXT4_INLINE_DATA_FL;
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ goto err;
+ *inline_data_size = new_size;
+
+err:
+ return retval;
+}
+
+/* Return true if this type of file needs encryption */
+static int needs_encryption(e2fsck_t ctx, const struct ext2_dir_entry *dirent)
+{
+ int filetype = ext2fs_dirent_file_type(dirent);
+ ext2_ino_t ino = dirent->inode;
+ struct ext2_inode inode;
+
+ if (filetype != EXT2_FT_UNKNOWN)
+ return filetype == EXT2_FT_REG_FILE ||
+ filetype == EXT2_FT_DIR ||
+ filetype == EXT2_FT_SYMLINK;
+
+ if (ext2fs_test_inode_bitmap2(ctx->inode_reg_map, ino) ||
+ ext2fs_test_inode_bitmap2(ctx->inode_dir_map, ino))
+ return 1;
+
+ e2fsck_read_inode(ctx, ino, &inode, "check_encryption_policy");
+ return LINUX_S_ISREG(inode.i_mode) ||
+ LINUX_S_ISDIR(inode.i_mode) ||
+ LINUX_S_ISLNK(inode.i_mode);
+}
+
+/*
+ * All regular files, directories, and symlinks in encrypted directories must be
+ * encrypted using the same encryption policy as their directory.
+ *
+ * Returns 1 if the dirent should be cleared, otherwise 0.
+ */
+static int check_encryption_policy(e2fsck_t ctx,
+ const struct ext2_dir_entry *dirent,
+ __u32 dir_encpolicy_id,
+ struct problem_context *pctx)
+{
+ __u32 file_encpolicy_id = find_encryption_policy(ctx, dirent->inode);
+
+ /* Same policy or both UNRECOGNIZED_ENCRYPTION_POLICY? */
+ if (file_encpolicy_id == dir_encpolicy_id)
+ return 0;
+
+ if (file_encpolicy_id == NO_ENCRYPTION_POLICY) {
+ if (!needs_encryption(ctx, dirent))
+ return 0;
+ return fix_problem(ctx, PR_2_UNENCRYPTED_FILE, pctx);
+ }
+
+ return fix_problem(ctx, PR_2_INCONSISTENT_ENCRYPTION_POLICY, pctx);
+}
+
+/*
+ * Check an encrypted directory entry.
+ *
+ * Returns 1 if the dirent should be cleared, otherwise 0.
+ */
+static int check_encrypted_dirent(e2fsck_t ctx,
+ const struct ext2_dir_entry *dirent,
+ __u32 dir_encpolicy_id,
+ struct problem_context *pctx)
+{
+ if (encrypted_check_name(ctx, dirent, pctx))
+ return 1;
+ if (check_encryption_policy(ctx, dirent, dir_encpolicy_id, pctx))
+ return 1;
+ return 0;
+}
+
+static int check_dir_block2(ext2_filsys fs,
+ struct ext2_db_entry2 *db,
+ void *priv_data)
+{
+ int err;
+ struct check_dir_struct *cd = priv_data;
+
+ if (cd->ra_entries && cd->list_offset >= cd->next_ra_off) {
+ err = e2fsck_readahead_dblist(fs,
+ E2FSCK_RA_DBLIST_IGNORE_BLOCKCNT,
+ fs->dblist,
+ cd->list_offset + cd->ra_entries / 8,
+ cd->ra_entries);
+ if (err)
+ cd->ra_entries = 0;
+ cd->next_ra_off = cd->list_offset + (cd->ra_entries * 7 / 8);
+ }
+
+ err = check_dir_block(fs, db, priv_data);
+ cd->list_offset++;
+ return err;
+}
+
+static int check_dir_block(ext2_filsys fs,
+ struct ext2_db_entry2 *db,
+ void *priv_data)
+{
+ struct dx_dir_info *dx_dir;
+ struct dx_dirblock_info *dx_db = 0;
+ struct ext2_dir_entry *dirent, *prev, dot, dotdot;
+ ext2_dirhash_t hash;
+ unsigned int offset = 0;
+ int dir_modified = 0;
+ int dot_state;
+ unsigned int rec_len;
+ blk64_t block_nr = db->blk;
+ ext2_ino_t ino = db->ino;
+ ext2_ino_t subdir_parent;
+ __u16 links;
+ struct check_dir_struct *cd;
+ char *buf, *ibuf;
+ e2fsck_t ctx;
+ problem_t problem;
+ struct ext2_dx_root_info *root;
+ struct ext2_dx_countlimit *limit;
+ static dict_t de_dict;
+ struct problem_context pctx;
+ int dups_found = 0;
+ int ret;
+ int dx_csum_size = 0, de_csum_size = 0;
+ int failed_csum = 0;
+ int is_leaf = 1;
+ size_t inline_data_size = 0;
+ int filetype = 0;
+ __u32 dir_encpolicy_id = NO_ENCRYPTION_POLICY;
+ int hash_in_dirent = 0;
+ int casefolded = 0;
+ size_t max_block_size;
+ int hash_flags = 0;
+ static char *eop_read_dirblock = NULL;
+ int cf_dir = 0;
+
+ cd = (struct check_dir_struct *) priv_data;
+ ibuf = buf = cd->buf;
+ ctx = cd->ctx;
+
+ /* We only want filename encoding verification on strict
+ * mode or if explicitly requested by user. */
+ if (ext2fs_test_inode_bitmap2(ctx->inode_casefold_map, ino) &&
+ ((ctx->fs->super->s_encoding_flags & EXT4_ENC_STRICT_MODE_FL) ||
+ (ctx->options & E2F_OPT_CHECK_ENCODING)))
+ cf_dir = 1;
+
+ if (ctx->flags & E2F_FLAG_RUN_RETURN)
+ return DIRENT_ABORT;
+
+ if (ctx->progress && (ctx->progress)(ctx, 2, cd->count++, cd->max))
+ return DIRENT_ABORT;
+
+ if (ext2fs_has_feature_metadata_csum(fs->super)) {
+ dx_csum_size = sizeof(struct ext2_dx_tail);
+ de_csum_size = sizeof(struct ext2_dir_entry_tail);
+ }
+
+ if (ext2fs_has_feature_filetype(fs->super))
+ filetype = EXT2_FT_DIR << 8;
+
+ /*
+ * Make sure the inode is still in use (could have been
+ * deleted in the duplicate/bad blocks pass.
+ */
+ if (!(ext2fs_test_inode_bitmap2(ctx->inode_used_map, ino)))
+ return 0;
+
+ cd->pctx.ino = ino;
+ cd->pctx.blk = block_nr;
+ cd->pctx.blkcount = db->blockcnt;
+ cd->pctx.ino2 = 0;
+ cd->pctx.dirent = 0;
+ cd->pctx.num = 0;
+
+ if (ext2fs_has_feature_inline_data(fs->super)) {
+ errcode_t ec;
+
+ ec = ext2fs_inline_data_size(fs, ino, &inline_data_size);
+ if (ec && ec != EXT2_ET_NO_INLINE_DATA)
+ return DIRENT_ABORT;
+ }
+
+ /* This will allow (at some point in the future) to punch out empty
+ * directory blocks and reduce the space used by a directory that grows
+ * very large and then the files are deleted. For now, all that is
+ * needed is to avoid e2fsck filling in these holes as part of
+ * feature flag. */
+ if (db->blk == 0 && ext2fs_has_feature_largedir(fs->super) &&
+ !ext2fs_has_feature_inline_data(fs->super))
+ return 0;
+
+ if (db->blk == 0 && !inline_data_size) {
+ if (allocate_dir_block(ctx, db, buf, &cd->pctx))
+ return 0;
+ block_nr = db->blk;
+ }
+
+ if (db->blockcnt)
+ dot_state = 2;
+ else
+ dot_state = 0;
+
+ if (ctx->dirs_to_hash &&
+ ext2fs_u32_list_test(ctx->dirs_to_hash, ino))
+ dups_found++;
+
+#if 0
+ printf("In process_dir_block block %lu, #%d, inode %lu\n", block_nr,
+ db->blockcnt, ino);
+#endif
+
+ if (!eop_read_dirblock)
+ eop_read_dirblock = (char *) _("reading directory block");
+ ehandler_operation(eop_read_dirblock);
+ if (inline_data_size) {
+ memset(buf, 0, fs->blocksize - inline_data_size);
+ cd->pctx.errcode = ext2fs_inline_data_get(fs, ino, 0, buf, 0);
+ if (cd->pctx.errcode)
+ goto inline_read_fail;
+#ifdef WORDS_BIGENDIAN
+ if (db->blockcnt)
+ goto skip_first_read_swab;
+ *((__u32 *)buf) = ext2fs_le32_to_cpu(*((__u32 *)buf));
+ cd->pctx.errcode = ext2fs_dirent_swab_in2(fs,
+ buf + EXT4_INLINE_DATA_DOTDOT_SIZE,
+ EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DATA_DOTDOT_SIZE,
+ 0);
+ if (cd->pctx.errcode)
+ goto inline_read_fail;
+skip_first_read_swab:
+ if (inline_data_size <= EXT4_MIN_INLINE_DATA_SIZE ||
+ !db->blockcnt)
+ goto inline_read_fail;
+ cd->pctx.errcode = ext2fs_dirent_swab_in2(fs,
+ buf + EXT4_MIN_INLINE_DATA_SIZE,
+ inline_data_size - EXT4_MIN_INLINE_DATA_SIZE,
+ 0);
+#endif
+ } else
+ cd->pctx.errcode = ext2fs_read_dir_block4(fs, block_nr,
+ buf, 0, ino);
+inline_read_fail:
+ pctx.ino = ino;
+ pctx.num = inline_data_size;
+ if (((inline_data_size & 3) ||
+ (inline_data_size > EXT4_MIN_INLINE_DATA_SIZE &&
+ inline_data_size < EXT4_MIN_INLINE_DATA_SIZE +
+ EXT2_DIR_REC_LEN(1))) &&
+ fix_problem(ctx, PR_2_BAD_INLINE_DIR_SIZE, &pctx)) {
+ errcode_t err = fix_inline_dir_size(ctx, ino,
+ &inline_data_size, &pctx,
+ buf);
+ if (err)
+ return DIRENT_ABORT;
+
+ }
+ ehandler_operation(0);
+ if (cd->pctx.errcode == EXT2_ET_DIR_CORRUPTED)
+ cd->pctx.errcode = 0; /* We'll handle this ourselves */
+ else if (cd->pctx.errcode == EXT2_ET_DIR_CSUM_INVALID) {
+ cd->pctx.errcode = 0; /* We'll handle this ourselves */
+ failed_csum = 1;
+ }
+ if (cd->pctx.errcode) {
+ char *buf2;
+ if (!fix_problem(ctx, PR_2_READ_DIRBLOCK, &cd->pctx)) {
+ ctx->flags |= E2F_FLAG_ABORT;
+ return DIRENT_ABORT;
+ }
+ ext2fs_new_dir_block(fs, db->blockcnt == 0 ? ino : 0,
+ EXT2_ROOT_INO, &buf2);
+ memcpy(buf, buf2, fs->blocksize);
+ ext2fs_free_mem(&buf2);
+ }
+ dx_dir = e2fsck_get_dx_dir_info(ctx, ino);
+ if (dx_dir && dx_dir->numblocks) {
+ if (db->blockcnt >= dx_dir->numblocks) {
+ pctx.dir = ino;
+ if (fix_problem(ctx, PR_2_UNEXPECTED_HTREE_BLOCK,
+ &pctx)) {
+ clear_htree(ctx, ino);
+ dx_dir->numblocks = 0;
+ dx_db = 0;
+ goto out_htree;
+ }
+ fatal_error(ctx, _("Can not continue."));
+ }
+ dx_db = &dx_dir->dx_block[db->blockcnt];
+ dx_db->type = DX_DIRBLOCK_LEAF;
+ dx_db->phys = block_nr;
+ dx_db->min_hash = ~0;
+ dx_db->max_hash = 0;
+
+ dirent = (struct ext2_dir_entry *) buf;
+ (void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+ limit = (struct ext2_dx_countlimit *) (buf+8);
+ if (db->blockcnt == 0) {
+ root = (struct ext2_dx_root_info *) (buf + 24);
+ dx_db->type = DX_DIRBLOCK_ROOT;
+ dx_db->flags |= DX_FLAG_FIRST | DX_FLAG_LAST;
+
+ /* large_dir was set in pass1 if large dirs were found,
+ * so ext2_dir_htree_level() should now be correct */
+ if ((root->reserved_zero ||
+ root->info_length < 8 ||
+ root->indirect_levels >=
+ ext2_dir_htree_level(fs)) &&
+ fix_problem(ctx, PR_2_HTREE_BAD_ROOT, &cd->pctx)) {
+ clear_htree(ctx, ino);
+ dx_dir->numblocks = 0;
+ dx_db = NULL;
+ }
+ dx_dir->hashversion = root->hash_version;
+ if ((dx_dir->hashversion <= EXT2_HASH_TEA) &&
+ (fs->super->s_flags & EXT2_FLAGS_UNSIGNED_HASH))
+ dx_dir->hashversion += 3;
+ dx_dir->depth = root->indirect_levels + 1;
+ } else if ((dirent->inode == 0) &&
+ (rec_len == fs->blocksize) &&
+ (ext2fs_dirent_name_len(dirent) == 0) &&
+ (ext2fs_le16_to_cpu(limit->limit) ==
+ ((fs->blocksize - (8 + dx_csum_size)) /
+ sizeof(struct ext2_dx_entry)))) {
+ dx_db->type = DX_DIRBLOCK_NODE;
+ }
+ is_leaf = dx_db ? (dx_db->type == DX_DIRBLOCK_LEAF) : 0;
+ }
+out_htree:
+
+ /* Leaf node with no space for csum? Rebuild dirs in pass 3A. */
+ if (is_leaf && !inline_data_size && failed_csum &&
+ !ext2fs_dirent_has_tail(fs, (struct ext2_dir_entry *)buf)) {
+ de_csum_size = 0;
+ if (e2fsck_dir_will_be_rehashed(ctx, ino)) {
+ failed_csum = 0;
+ goto skip_checksum;
+ }
+ if (!fix_problem(cd->ctx, PR_2_LEAF_NODE_MISSING_CSUM,
+ &cd->pctx))
+ goto skip_checksum;
+ e2fsck_rehash_dir_later(ctx, ino);
+ failed_csum = 0;
+ goto skip_checksum;
+ }
+ /* htree nodes don't use fake dirents to store checksums */
+ if (!is_leaf)
+ de_csum_size = 0;
+
+skip_checksum:
+ if (inline_data_size) {
+ if (db->blockcnt) {
+ buf += EXT4_MIN_INLINE_DATA_SIZE;
+ max_block_size = inline_data_size - EXT4_MIN_INLINE_DATA_SIZE;
+ /* Zero-length second block, just exit */
+ if (max_block_size == 0)
+ return 0;
+ } else {
+ max_block_size = EXT4_MIN_INLINE_DATA_SIZE;
+ }
+ } else
+ max_block_size = fs->blocksize - de_csum_size;
+
+ dir_encpolicy_id = find_encryption_policy(ctx, ino);
+
+ if (cf_dir) {
+ dict_init(&de_dict, DICTCOUNT_T_MAX, dict_de_cf_cmp);
+ dict_set_cmp_context(&de_dict, (const void *)ctx->fs->encoding);
+ } else {
+ dict_init(&de_dict, DICTCOUNT_T_MAX, dict_de_cmp);
+ }
+ if (ctx->casefolded_dirs)
+ casefolded = ext2fs_u32_list_test(ctx->casefolded_dirs, ino);
+ hash_in_dirent = (casefolded &&
+ (dir_encpolicy_id != NO_ENCRYPTION_POLICY));
+
+ prev = 0;
+ do {
+ dgrp_t group;
+ ext2_ino_t first_unused_inode;
+ unsigned int name_len;
+ /* csum entry is not checked here, so don't worry about it */
+ int extended = (dot_state > 1) && hash_in_dirent;
+ unsigned int min_dir_len = ext2fs_dir_rec_len(1, extended);
+
+ problem = 0;
+ if (!inline_data_size || dot_state > 1) {
+ dirent = (struct ext2_dir_entry *) (buf + offset);
+ /*
+ * If there's not even space for the entry header,
+ * force salvaging this dir.
+ */
+ if (max_block_size - offset < EXT2_DIR_ENTRY_HEADER_LEN)
+ rec_len = ext2fs_dir_rec_len(1, extended);
+ else
+ (void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+ cd->pctx.dirent = dirent;
+ cd->pctx.num = offset;
+ if ((offset + rec_len > max_block_size) ||
+ (rec_len < min_dir_len) ||
+ ((rec_len % 4) != 0) ||
+ ((ext2fs_dir_rec_len(ext2fs_dirent_name_len(dirent),
+ extended)) > rec_len)) {
+ if (fix_problem(ctx, PR_2_DIR_CORRUPTED,
+ &cd->pctx)) {
+#ifdef WORDS_BIGENDIAN
+ /*
+ * On big-endian systems, if the dirent
+ * swap routine finds a rec_len that it
+ * doesn't like, it continues
+ * processing the block as if rec_len
+ * == EXT2_DIR_ENTRY_HEADER_LEN. This means that the name
+ * field gets byte swapped, which means
+ * that salvage will not detect the
+ * correct name length (unless the name
+ * has a length that's an exact
+ * multiple of four bytes), and it'll
+ * discard the entry (unnecessarily)
+ * and the rest of the dirent block.
+ * Therefore, swap the rest of the
+ * block back to disk order, run
+ * salvage, and re-swap anything after
+ * the salvaged dirent.
+ */
+ int need_reswab = 0;
+ if (rec_len < EXT2_DIR_ENTRY_HEADER_LEN || rec_len % 4) {
+ need_reswab = 1;
+ ext2fs_dirent_swab_in2(fs,
+ ((char *)dirent) + EXT2_DIR_ENTRY_HEADER_LEN,
+ max_block_size - offset - EXT2_DIR_ENTRY_HEADER_LEN,
+ 0);
+ }
+#endif
+ salvage_directory(fs, dirent, prev,
+ &offset,
+ max_block_size,
+ hash_in_dirent);
+#ifdef WORDS_BIGENDIAN
+ if (need_reswab) {
+ unsigned int len;
+
+ (void) ext2fs_get_rec_len(fs,
+ dirent, &len);
+ len += offset;
+ if (max_block_size > len)
+ ext2fs_dirent_swab_in2(fs,
+ ((char *)dirent) + len, max_block_size - len, 0);
+ }
+#endif
+ dir_modified++;
+ continue;
+ } else
+ goto abort_free_dict;
+ }
+ } else {
+ if (dot_state == 0) {
+ memset(&dot, 0, sizeof(dot));
+ dirent = &dot;
+ dirent->inode = ino;
+ dirent->rec_len = EXT2_DIR_REC_LEN(1);
+ dirent->name_len = 1 | filetype;
+ dirent->name[0] = '.';
+ } else if (dot_state == 1) {
+ memset(&dotdot, 0, sizeof(dotdot));
+ dirent = &dotdot;
+ dirent->inode =
+ ((struct ext2_dir_entry *)buf)->inode;
+ dirent->rec_len = EXT2_DIR_REC_LEN(2);
+ dirent->name_len = 2 | filetype;
+ dirent->name[0] = '.';
+ dirent->name[1] = '.';
+ } else {
+ fatal_error(ctx, _("Can not continue."));
+ }
+ cd->pctx.dirent = dirent;
+ cd->pctx.num = offset;
+ }
+
+ if (dot_state == 0) {
+ if (check_dot(ctx, dirent, ino, &cd->pctx))
+ dir_modified++;
+ } else if (dot_state == 1) {
+ ret = check_dotdot(ctx, dirent, ino, &cd->pctx);
+ if (ret < 0)
+ goto abort_free_dict;
+ if (ret)
+ dir_modified++;
+ } else if (dirent->inode == ino) {
+ problem = PR_2_LINK_DOT;
+ if (fix_problem(ctx, PR_2_LINK_DOT, &cd->pctx)) {
+ dirent->inode = 0;
+ dir_modified++;
+ goto next;
+ }
+ }
+ if (!dirent->inode)
+ goto next;
+
+ /*
+ * Make sure the inode listed is a legal one.
+ */
+ name_len = ext2fs_dirent_name_len(dirent);
+ if (((dirent->inode != EXT2_ROOT_INO) &&
+ (dirent->inode < EXT2_FIRST_INODE(fs->super))) ||
+ (dirent->inode > fs->super->s_inodes_count) ||
+ (dirent->inode == fs->super->s_usr_quota_inum) ||
+ (dirent->inode == fs->super->s_grp_quota_inum) ||
+ (dirent->inode == fs->super->s_prj_quota_inum) ||
+ (dirent->inode == fs->super->s_orphan_file_inum)) {
+ problem = PR_2_BAD_INO;
+ } else if (ctx->inode_bb_map &&
+ (ext2fs_test_inode_bitmap2(ctx->inode_bb_map,
+ dirent->inode))) {
+ /*
+ * If the inode is in a bad block, offer to
+ * clear it.
+ */
+ problem = PR_2_BB_INODE;
+ } else if ((dot_state > 1) && (name_len == 1) &&
+ (dirent->name[0] == '.')) {
+ /*
+ * If there's a '.' entry in anything other
+ * than the first directory entry, it's a
+ * duplicate entry that should be removed.
+ */
+ problem = PR_2_DUP_DOT;
+ } else if ((dot_state > 1) && (name_len == 2) &&
+ (dirent->name[0] == '.') &&
+ (dirent->name[1] == '.')) {
+ /*
+ * If there's a '..' entry in anything other
+ * than the second directory entry, it's a
+ * duplicate entry that should be removed.
+ */
+ problem = PR_2_DUP_DOT_DOT;
+ } else if ((dot_state > 1) &&
+ (dirent->inode == EXT2_ROOT_INO)) {
+ /*
+ * Don't allow links to the root directory.
+ * We check this specially to make sure we
+ * catch this error case even if the root
+ * directory hasn't been created yet.
+ */
+ problem = PR_2_LINK_ROOT;
+ } else if ((dot_state > 1) && (name_len == 0)) {
+ /*
+ * Don't allow zero-length directory names.
+ */
+ problem = PR_2_NULL_NAME;
+ }
+
+ if (problem) {
+ if (fix_problem(ctx, problem, &cd->pctx)) {
+ dirent->inode = 0;
+ dir_modified++;
+ goto next;
+ } else {
+ ext2fs_unmark_valid(fs);
+ if (problem == PR_2_BAD_INO)
+ goto next;
+ }
+ }
+
+ /*
+ * If the inode was marked as having bad fields in
+ * pass1, process it and offer to fix/clear it.
+ * (We wait until now so that we can display the
+ * pathname to the user.)
+ */
+ if (ctx->inode_bad_map &&
+ ext2fs_test_inode_bitmap2(ctx->inode_bad_map,
+ dirent->inode)) {
+ if (e2fsck_process_bad_inode(ctx, ino,
+ dirent->inode,
+ buf + fs->blocksize)) {
+ dirent->inode = 0;
+ dir_modified++;
+ goto next;
+ }
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return DIRENT_ABORT;
+ }
+
+ group = ext2fs_group_of_ino(fs, dirent->inode);
+ first_unused_inode = group * fs->super->s_inodes_per_group +
+ 1 + fs->super->s_inodes_per_group -
+ ext2fs_bg_itable_unused(fs, group);
+ cd->pctx.group = group;
+
+ /*
+ * Check if the inode was missed out because
+ * _INODE_UNINIT flag was set or bg_itable_unused was
+ * incorrect. If so, clear the _INODE_UNINIT flag and
+ * restart e2fsck. In the future it would be nice if
+ * we could call a function in pass1.c that checks the
+ * newly visible inodes.
+ */
+ if (ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)) {
+ pctx.num = dirent->inode;
+ if (fix_problem(ctx, PR_2_INOREF_BG_INO_UNINIT,
+ &cd->pctx)){
+ ext2fs_bg_flags_clear(fs, group,
+ EXT2_BG_INODE_UNINIT);
+ ext2fs_group_desc_csum_set(fs, group);
+ ext2fs_mark_super_dirty(fs);
+ ctx->flags |= E2F_FLAG_RESTART_LATER;
+ } else {
+ ext2fs_unmark_valid(fs);
+ if (problem == PR_2_BAD_INO)
+ goto next;
+ }
+ } else if (dirent->inode >= first_unused_inode) {
+ pctx.num = dirent->inode;
+ if (fix_problem(ctx, PR_2_INOREF_IN_UNUSED, &cd->pctx)){
+ ext2fs_bg_itable_unused_set(fs, group, 0);
+ ext2fs_group_desc_csum_set(fs, group);
+ ext2fs_mark_super_dirty(fs);
+ ctx->flags |= E2F_FLAG_RESTART_LATER;
+ } else {
+ ext2fs_unmark_valid(fs);
+ if (problem == PR_2_BAD_INO)
+ goto next;
+ }
+ }
+
+ /*
+ * Offer to clear unused inodes; if we are going to be
+ * restarting the scan due to bg_itable_unused being
+ * wrong, then don't clear any inodes to avoid zapping
+ * inodes that were skipped during pass1 due to an
+ * incorrect bg_itable_unused; we'll get any real
+ * problems after we restart.
+ */
+ if (!(ctx->flags & E2F_FLAG_RESTART_LATER) &&
+ !(ext2fs_test_inode_bitmap2(ctx->inode_used_map,
+ dirent->inode)))
+ problem = PR_2_UNUSED_INODE;
+
+ if (problem) {
+ if (fix_problem(ctx, problem, &cd->pctx)) {
+ dirent->inode = 0;
+ dir_modified++;
+ goto next;
+ } else {
+ ext2fs_unmark_valid(fs);
+ if (problem == PR_2_BAD_INO)
+ goto next;
+ }
+ }
+
+ if (check_filetype(ctx, dirent, ino, &cd->pctx))
+ dir_modified++;
+
+ if (dir_encpolicy_id != NO_ENCRYPTION_POLICY) {
+ /* Encrypted directory */
+ if (dot_state > 1 &&
+ check_encrypted_dirent(ctx, dirent,
+ dir_encpolicy_id,
+ &cd->pctx)) {
+ dirent->inode = 0;
+ dir_modified++;
+ goto next;
+ }
+ } else if (cf_dir) {
+ /* Casefolded directory */
+ if (encoded_check_name(ctx, dirent, &cd->pctx))
+ dir_modified++;
+ } else {
+ /* Unencrypted and uncasefolded directory */
+ if (check_name(ctx, dirent, &cd->pctx))
+ dir_modified++;
+ }
+
+ if (dx_db) {
+ if (dx_dir->casefolded_hash)
+ hash_flags = EXT4_CASEFOLD_FL;
+
+ if (dx_dir->hashversion == EXT2_HASH_SIPHASH) {
+ if (dot_state > 1)
+ hash = EXT2_DIRENT_HASH(dirent);
+ } else {
+ ext2fs_dirhash2(dx_dir->hashversion,
+ dirent->name,
+ ext2fs_dirent_name_len(dirent),
+ fs->encoding, hash_flags,
+ fs->super->s_hash_seed,
+ &hash, 0);
+ }
+ if (hash < dx_db->min_hash)
+ dx_db->min_hash = hash;
+ if (hash > dx_db->max_hash)
+ dx_db->max_hash = hash;
+ }
+
+ /*
+ * If this is a directory, then mark its parent in its
+ * dir_info structure. If the parent field is already
+ * filled in, then this directory has more than one
+ * hard link. We assume the first link is correct,
+ * and ask the user if he/she wants to clear this one.
+ */
+ if ((dot_state > 1) &&
+ (ext2fs_test_inode_bitmap2(ctx->inode_dir_map,
+ dirent->inode))) {
+ if (e2fsck_dir_info_get_parent(ctx, dirent->inode,
+ &subdir_parent)) {
+ cd->pctx.ino = dirent->inode;
+ fix_problem(ctx, PR_2_NO_DIRINFO, &cd->pctx);
+ goto abort_free_dict;
+ }
+ if (subdir_parent) {
+ cd->pctx.ino2 = subdir_parent;
+ if (fix_problem(ctx, PR_2_LINK_DIR,
+ &cd->pctx)) {
+ dirent->inode = 0;
+ dir_modified++;
+ goto next;
+ }
+ cd->pctx.ino2 = 0;
+ } else {
+ (void) e2fsck_dir_info_set_parent(ctx,
+ dirent->inode, ino);
+ }
+ }
+
+ if (dups_found) {
+ ;
+ } else if (dict_lookup(&de_dict, dirent)) {
+ clear_problem_context(&pctx);
+ pctx.ino = ino;
+ pctx.dirent = dirent;
+ fix_problem(ctx, PR_2_REPORT_DUP_DIRENT, &pctx);
+ e2fsck_rehash_dir_later(ctx, ino);
+ dups_found++;
+ } else
+ dict_alloc_insert(&de_dict, dirent, dirent);
+
+ ext2fs_icount_increment(ctx->inode_count, dirent->inode,
+ &links);
+ if (links > 1)
+ ctx->fs_links_count++;
+ ctx->fs_total_count++;
+ next:
+ prev = dirent;
+ if (dir_modified)
+ (void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+ if (!inline_data_size || dot_state > 1) {
+ offset += rec_len;
+ } else {
+ if (dot_state == 1) {
+ offset = 4;
+ /*
+ * If we get here, we're checking an inline
+ * directory and we've just checked a (fake)
+ * dotdot entry that we created on the stack.
+ * Therefore set 'prev' to NULL so that if we
+ * call salvage_directory on the next entry,
+ * it won't try to absorb the next entry into
+ * the on-stack dotdot entry.
+ */
+ prev = NULL;
+ }
+ }
+ dot_state++;
+ } while (offset < max_block_size);
+#if 0
+ printf("\n");
+#endif
+ if (dx_db) {
+#ifdef DX_DEBUG
+ printf("db_block %d, type %d, min_hash 0x%0x, max_hash 0x%0x\n",
+ db->blockcnt, dx_db->type,
+ dx_db->min_hash, dx_db->max_hash);
+#endif
+ cd->pctx.dir = cd->pctx.ino;
+ if ((dx_db->type == DX_DIRBLOCK_ROOT) ||
+ (dx_db->type == DX_DIRBLOCK_NODE))
+ parse_int_node(fs, db, cd, dx_dir, buf, failed_csum);
+ }
+
+ if (offset != max_block_size) {
+ cd->pctx.num = rec_len + offset - max_block_size;
+ if (fix_problem(ctx, PR_2_FINAL_RECLEN, &cd->pctx)) {
+ dirent->rec_len = cd->pctx.num;
+ dir_modified++;
+ }
+ }
+ if (dir_modified) {
+ int flags, will_rehash;
+ /* leaf block with no tail? Rehash dirs later. */
+ if (ext2fs_has_feature_metadata_csum(fs->super) &&
+ is_leaf &&
+ !inline_data_size &&
+ !ext2fs_dirent_has_tail(fs, (struct ext2_dir_entry *)buf)) {
+ if (insert_dirent_tail(fs, buf) == 0)
+ goto write_and_fix;
+ e2fsck_rehash_dir_later(ctx, ino);
+ }
+
+write_and_fix:
+ will_rehash = e2fsck_dir_will_be_rehashed(ctx, ino);
+ if (will_rehash) {
+ flags = ctx->fs->flags;
+ ctx->fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ }
+ if (inline_data_size) {
+ buf = ibuf;
+#ifdef WORDS_BIGENDIAN
+ if (db->blockcnt)
+ goto skip_first_write_swab;
+ *((__u32 *)buf) = ext2fs_le32_to_cpu(*((__u32 *)buf));
+ cd->pctx.errcode = ext2fs_dirent_swab_out2(fs,
+ buf + EXT4_INLINE_DATA_DOTDOT_SIZE,
+ EXT4_MIN_INLINE_DATA_SIZE -
+ EXT4_INLINE_DATA_DOTDOT_SIZE,
+ 0);
+ if (cd->pctx.errcode)
+ goto skip_second_write_swab;
+skip_first_write_swab:
+ if (inline_data_size <= EXT4_MIN_INLINE_DATA_SIZE ||
+ !db->blockcnt)
+ goto skip_second_write_swab;
+ cd->pctx.errcode = ext2fs_dirent_swab_out2(fs,
+ buf + EXT4_MIN_INLINE_DATA_SIZE,
+ inline_data_size -
+ EXT4_MIN_INLINE_DATA_SIZE,
+ 0);
+skip_second_write_swab:
+ if (cd->pctx.errcode &&
+ !fix_problem(ctx, PR_2_WRITE_DIRBLOCK, &cd->pctx))
+ goto abort_free_dict;
+#endif
+ cd->pctx.errcode =
+ ext2fs_inline_data_set(fs, ino, 0, buf,
+ inline_data_size);
+ } else
+ cd->pctx.errcode = ext2fs_write_dir_block4(fs, block_nr,
+ buf, 0, ino);
+ if (will_rehash)
+ ctx->fs->flags = (flags &
+ EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (ctx->fs->flags &
+ ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+ if (cd->pctx.errcode) {
+ if (!fix_problem(ctx, PR_2_WRITE_DIRBLOCK,
+ &cd->pctx))
+ goto abort_free_dict;
+ }
+ ext2fs_mark_changed(fs);
+ } else if (is_leaf && failed_csum && !dir_modified) {
+ /*
+ * If a leaf node that fails csum makes it this far without
+ * alteration, ask the user if the checksum should be fixed.
+ */
+ if (fix_problem(ctx, PR_2_LEAF_NODE_ONLY_CSUM_INVALID,
+ &cd->pctx))
+ goto write_and_fix;
+ }
+ dict_free_nodes(&de_dict);
+ return 0;
+abort_free_dict:
+ ctx->flags |= E2F_FLAG_ABORT;
+ dict_free_nodes(&de_dict);
+ return DIRENT_ABORT;
+}
+
+struct del_block {
+ e2fsck_t ctx;
+ e2_blkcnt_t num;
+ blk64_t last_cluster;
+};
+
+/*
+ * This function is called to deallocate a block, and is an iterator
+ * functioned called by deallocate inode via ext2fs_iterate_block().
+ */
+static int deallocate_inode_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct del_block *p = priv_data;
+ blk64_t cluster = EXT2FS_B2C(fs, *block_nr);
+
+ if (*block_nr == 0)
+ return 0;
+
+ if (cluster == p->last_cluster)
+ return 0;
+
+ p->last_cluster = cluster;
+ if ((*block_nr < fs->super->s_first_data_block) ||
+ (*block_nr >= ext2fs_blocks_count(fs->super)))
+ return 0;
+
+ ext2fs_block_alloc_stats2(fs, *block_nr, -1);
+ p->num++;
+ return 0;
+}
+
+/*
+ * This function deallocates an inode
+ */
+static void deallocate_inode(e2fsck_t ctx, ext2_ino_t ino, char* block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct ext2_inode inode;
+ struct problem_context pctx;
+ __u32 count;
+ struct del_block del_block;
+
+ e2fsck_read_inode(ctx, ino, &inode, "deallocate_inode");
+ clear_problem_context(&pctx);
+ pctx.ino = ino;
+
+ /*
+ * Fix up the bitmaps...
+ */
+ e2fsck_read_bitmaps(ctx);
+ ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(inode.i_mode));
+
+ if (ext2fs_file_acl_block(fs, &inode) &&
+ ext2fs_has_feature_xattr(fs->super)) {
+ pctx.errcode = ext2fs_adjust_ea_refcount3(fs,
+ ext2fs_file_acl_block(fs, &inode),
+ block_buf, -1, &count, ino);
+ if (pctx.errcode == EXT2_ET_BAD_EA_BLOCK_NUM) {
+ pctx.errcode = 0;
+ count = 1;
+ }
+ if (pctx.errcode) {
+ pctx.blk = ext2fs_file_acl_block(fs, &inode);
+ fix_problem(ctx, PR_2_ADJ_EA_REFCOUNT, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if (count == 0) {
+ ext2fs_block_alloc_stats2(fs,
+ ext2fs_file_acl_block(fs, &inode), -1);
+ }
+ ext2fs_file_acl_block_set(fs, &inode, 0);
+ }
+
+ if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
+ goto clear_inode;
+
+ /* Inline data inodes don't have blocks to iterate */
+ if (inode.i_flags & EXT4_INLINE_DATA_FL)
+ goto clear_inode;
+
+ if (ext2fs_needs_large_file_feature(EXT2_I_SIZE(&inode))) {
+ if (LINUX_S_ISREG(inode.i_mode))
+ ctx->large_files--;
+ else if (LINUX_S_ISDIR(inode.i_mode))
+ ctx->large_dirs--;
+ }
+
+ del_block.ctx = ctx;
+ del_block.num = 0;
+ del_block.last_cluster = 0;
+ pctx.errcode = ext2fs_block_iterate3(fs, ino, 0, block_buf,
+ deallocate_inode_block,
+ &del_block);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_2_DEALLOC_INODE, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+clear_inode:
+ /* Inode may have changed by block_iterate, so reread it */
+ e2fsck_read_inode(ctx, ino, &inode, "deallocate_inode");
+ e2fsck_clear_inode(ctx, ino, &inode, 0, "deallocate_inode");
+}
+
+/*
+ * This function clears the htree flag on an inode
+ */
+static void clear_htree(e2fsck_t ctx, ext2_ino_t ino)
+{
+ struct ext2_inode inode;
+
+ e2fsck_read_inode(ctx, ino, &inode, "clear_htree");
+ inode.i_flags = inode.i_flags & ~EXT2_INDEX_FL;
+ e2fsck_write_inode(ctx, ino, &inode, "clear_htree");
+ if (ctx->dirs_to_hash)
+ ext2fs_u32_list_add(ctx->dirs_to_hash, ino);
+}
+
+
+int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir,
+ ext2_ino_t ino, char *buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct ext2_inode inode;
+ int inode_modified = 0;
+ int not_fixed = 0;
+ unsigned char *frag, *fsize;
+ struct problem_context pctx;
+ problem_t problem = 0;
+
+ e2fsck_read_inode(ctx, ino, &inode, "process_bad_inode");
+
+ clear_problem_context(&pctx);
+ pctx.ino = ino;
+ pctx.dir = dir;
+ pctx.inode = &inode;
+
+ if (ext2fs_file_acl_block(fs, &inode) &&
+ !ext2fs_has_feature_xattr(fs->super)) {
+ if (fix_problem(ctx, PR_2_FILE_ACL_ZERO, &pctx)) {
+ ext2fs_file_acl_block_set(fs, &inode, 0);
+ inode_modified++;
+ } else
+ not_fixed++;
+ }
+
+ if (!LINUX_S_ISDIR(inode.i_mode) && !LINUX_S_ISREG(inode.i_mode) &&
+ !LINUX_S_ISCHR(inode.i_mode) && !LINUX_S_ISBLK(inode.i_mode) &&
+ !LINUX_S_ISLNK(inode.i_mode) && !LINUX_S_ISFIFO(inode.i_mode) &&
+ !(LINUX_S_ISSOCK(inode.i_mode)))
+ problem = PR_2_BAD_MODE;
+ else if (LINUX_S_ISCHR(inode.i_mode)
+ && !e2fsck_pass1_check_device_inode(fs, &inode))
+ problem = PR_2_BAD_CHAR_DEV;
+ else if (LINUX_S_ISBLK(inode.i_mode)
+ && !e2fsck_pass1_check_device_inode(fs, &inode))
+ problem = PR_2_BAD_BLOCK_DEV;
+ else if (LINUX_S_ISFIFO(inode.i_mode)
+ && !e2fsck_pass1_check_device_inode(fs, &inode))
+ problem = PR_2_BAD_FIFO;
+ else if (LINUX_S_ISSOCK(inode.i_mode)
+ && !e2fsck_pass1_check_device_inode(fs, &inode))
+ problem = PR_2_BAD_SOCKET;
+ else if (LINUX_S_ISLNK(inode.i_mode)
+ && !e2fsck_pass1_check_symlink(fs, ino, &inode, buf)) {
+ problem = PR_2_INVALID_SYMLINK;
+ }
+
+ if (problem) {
+ if (fix_problem(ctx, problem, &pctx)) {
+ deallocate_inode(ctx, ino, 0);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return 0;
+ return 1;
+ } else
+ not_fixed++;
+ problem = 0;
+ }
+
+ if (inode.i_faddr) {
+ if (fix_problem(ctx, PR_2_FADDR_ZERO, &pctx)) {
+ inode.i_faddr = 0;
+ inode_modified++;
+ } else
+ not_fixed++;
+ }
+
+ switch (fs->super->s_creator_os) {
+ case EXT2_OS_HURD:
+ frag = &inode.osd2.hurd2.h_i_frag;
+ fsize = &inode.osd2.hurd2.h_i_fsize;
+ break;
+ default:
+ frag = fsize = 0;
+ }
+ if (frag && *frag) {
+ pctx.num = *frag;
+ if (fix_problem(ctx, PR_2_FRAG_ZERO, &pctx)) {
+ *frag = 0;
+ inode_modified++;
+ } else
+ not_fixed++;
+ pctx.num = 0;
+ }
+ if (fsize && *fsize) {
+ pctx.num = *fsize;
+ if (fix_problem(ctx, PR_2_FSIZE_ZERO, &pctx)) {
+ *fsize = 0;
+ inode_modified++;
+ } else
+ not_fixed++;
+ pctx.num = 0;
+ }
+
+ if ((fs->super->s_creator_os == EXT2_OS_LINUX) &&
+ !ext2fs_has_feature_huge_file(fs->super) &&
+ (inode.osd2.linux2.l_i_blocks_hi != 0)) {
+ pctx.num = inode.osd2.linux2.l_i_blocks_hi;
+ if (fix_problem(ctx, PR_2_BLOCKS_HI_ZERO, &pctx)) {
+ inode.osd2.linux2.l_i_blocks_hi = 0;
+ inode_modified++;
+ }
+ }
+
+ if ((fs->super->s_creator_os == EXT2_OS_LINUX) &&
+ !ext2fs_has_feature_64bit(fs->super) &&
+ inode.osd2.linux2.l_i_file_acl_high != 0) {
+ pctx.num = inode.osd2.linux2.l_i_file_acl_high;
+ if (fix_problem(ctx, PR_2_I_FILE_ACL_HI_ZERO, &pctx)) {
+ inode.osd2.linux2.l_i_file_acl_high = 0;
+ inode_modified++;
+ } else
+ not_fixed++;
+ }
+
+ if (ext2fs_file_acl_block(fs, &inode) &&
+ ((ext2fs_file_acl_block(fs, &inode) < fs->super->s_first_data_block) ||
+ (ext2fs_file_acl_block(fs, &inode) >= ext2fs_blocks_count(fs->super)))) {
+ if (fix_problem(ctx, PR_2_FILE_ACL_BAD, &pctx)) {
+ ext2fs_file_acl_block_set(fs, &inode, 0);
+ inode_modified++;
+ } else
+ not_fixed++;
+ }
+ if (inode.i_size_high && !ext2fs_has_feature_largedir(fs->super) &&
+ inode.i_blocks < 1ULL << (29 - EXT2_BLOCK_SIZE_BITS(fs->super)) &&
+ LINUX_S_ISDIR(inode.i_mode)) {
+ if (fix_problem(ctx, PR_2_DIR_SIZE_HIGH_ZERO, &pctx)) {
+ inode.i_size_high = 0;
+ inode_modified++;
+ } else
+ not_fixed++;
+ }
+
+ if (inode_modified)
+ e2fsck_write_inode(ctx, ino, &inode, "process_bad_inode");
+ if (!not_fixed && ctx->inode_bad_map)
+ ext2fs_unmark_inode_bitmap2(ctx->inode_bad_map, ino);
+ return 0;
+}
+
+/*
+ * allocate_dir_block --- this function allocates a new directory
+ * block for a particular inode; this is done if a directory has
+ * a "hole" in it, or if a directory has a illegal block number
+ * that was zeroed out and now needs to be replaced.
+ */
+static int allocate_dir_block(e2fsck_t ctx,
+ struct ext2_db_entry2 *db,
+ char *buf EXT2FS_ATTR((unused)),
+ struct problem_context *pctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t blk = 0;
+ char *block;
+ struct ext2_inode inode;
+
+ if (fix_problem(ctx, PR_2_DIRECTORY_HOLE, pctx) == 0)
+ return 1;
+
+ /*
+ * Read the inode and block bitmaps in; we'll be messing with
+ * them.
+ */
+ e2fsck_read_bitmaps(ctx);
+
+ /*
+ * First, find a free block
+ */
+ e2fsck_read_inode(ctx, db->ino, &inode, "allocate_dir_block");
+ pctx->errcode = ext2fs_map_cluster_block(fs, db->ino, &inode,
+ db->blockcnt, &blk);
+ if (pctx->errcode || blk == 0) {
+ blk = ext2fs_find_inode_goal(fs, db->ino, &inode, db->blockcnt);
+ pctx->errcode = ext2fs_new_block2(fs, blk,
+ ctx->block_found_map, &blk);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_new_block";
+ fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx);
+ return 1;
+ }
+ }
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, blk);
+ ext2fs_mark_block_bitmap2(fs->block_map, blk);
+ ext2fs_mark_bb_dirty(fs);
+
+ /*
+ * Now let's create the actual data block for the inode
+ */
+ if (db->blockcnt)
+ pctx->errcode = ext2fs_new_dir_block(fs, 0, 0, &block);
+ else
+ pctx->errcode = ext2fs_new_dir_block(fs, db->ino,
+ EXT2_ROOT_INO, &block);
+
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_new_dir_block";
+ fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx);
+ return 1;
+ }
+
+ pctx->errcode = ext2fs_write_dir_block4(fs, blk, block, 0, db->ino);
+ ext2fs_free_mem(&block);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_write_dir_block";
+ fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx);
+ return 1;
+ }
+
+ /*
+ * Update the inode block count
+ */
+ ext2fs_iblk_add_blocks(fs, &inode, 1);
+ if (EXT2_I_SIZE(&inode) < ((__u64) db->blockcnt+1) * fs->blocksize) {
+ pctx->errcode = ext2fs_inode_size_set(fs, &inode,
+ (db->blockcnt+1) * fs->blocksize);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_inode_size_set";
+ fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx);
+ return 1;
+ }
+ }
+ e2fsck_write_inode(ctx, db->ino, &inode, "allocate_dir_block");
+
+ /*
+ * Finally, update the block pointers for the inode
+ */
+ db->blk = blk;
+ pctx->errcode = ext2fs_bmap2(fs, db->ino, &inode, 0, BMAP_SET,
+ db->blockcnt, 0, &blk);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_block_iterate";
+ fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx);
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c
new file mode 100644
index 0000000..16d243f
--- /dev/null
+++ b/e2fsck/pass3.c
@@ -0,0 +1,921 @@
+/*
+ * pass3.c -- pass #3 of e2fsck: Check for directory connectivity
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * Pass #3 assures that all directories are connected to the
+ * filesystem tree, using the following algorithm:
+ *
+ * First, the root directory is checked to make sure it exists; if
+ * not, e2fsck will offer to create a new one. It is then marked as
+ * "done".
+ *
+ * Then, pass3 iterates over all directory inodes; for each directory
+ * it attempts to trace up the filesystem tree, using dirinfo.parent
+ * until it reaches a directory which has been marked "done". If it
+ * can not do so, then the directory must be disconnected, and e2fsck
+ * will offer to reconnect it to /lost+found. While it is chasing
+ * parent pointers up the filesystem tree, if pass3 sees a directory
+ * twice, then it has detected a filesystem loop, and it will again
+ * offer to reconnect the directory to /lost+found in order to break the
+ * filesystem loop.
+ *
+ * Pass 3 also contains the subroutine, e2fsck_reconnect_file() to
+ * reconnect inodes to /lost+found; this subroutine is also used by
+ * pass 4. e2fsck_reconnect_file() calls get_lost_and_found(), which
+ * is responsible for creating /lost+found if it does not exist.
+ *
+ * Pass 3 frees the following data structures:
+ * - The dirinfo directory information cache.
+ */
+
+#include "config.h"
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "e2fsck.h"
+#include "problem.h"
+
+static void check_root(e2fsck_t ctx);
+static int check_directory(e2fsck_t ctx, ext2_ino_t ino,
+ struct problem_context *pctx);
+static void fix_dotdot(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent);
+
+static ext2fs_inode_bitmap inode_loop_detect = 0;
+static ext2fs_inode_bitmap inode_done_map = 0;
+
+void e2fsck_pass3(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ struct dir_info_iter *iter = NULL;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ struct problem_context pctx;
+ struct dir_info *dir;
+ unsigned long maxdirs, count;
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ clear_problem_context(&pctx);
+
+#ifdef MTRACE
+ mtrace_print("Pass 3");
+#endif
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_3_PASS_HEADER, &pctx);
+
+ /*
+ * Allocate some bitmaps to do loop detection.
+ */
+ pctx.errcode = e2fsck_allocate_inode_bitmap(fs, _("inode done bitmap"),
+ EXT2FS_BMAP64_AUTODIR,
+ "inode_done_map", &inode_done_map);
+ if (pctx.errcode) {
+ pctx.num = 2;
+ fix_problem(ctx, PR_3_ALLOCATE_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto abort_exit;
+ }
+ print_resource_track(ctx, _("Peak memory"), &ctx->global_rtrack, NULL);
+
+ check_root(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto abort_exit;
+
+ ext2fs_mark_inode_bitmap2(inode_done_map, EXT2_ROOT_INO);
+
+ maxdirs = e2fsck_get_num_dirinfo(ctx);
+ count = 1;
+
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 3, 0, maxdirs))
+ goto abort_exit;
+
+ iter = e2fsck_dir_info_iter_begin(ctx);
+ while ((dir = e2fsck_dir_info_iter(ctx, iter)) != 0) {
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK ||
+ ctx->flags & E2F_FLAG_RESTART)
+ goto abort_exit;
+ if (ctx->progress && (ctx->progress)(ctx, 3, count++, maxdirs))
+ goto abort_exit;
+ if (ext2fs_test_inode_bitmap2(ctx->inode_dir_map, dir->ino))
+ if (check_directory(ctx, dir->ino, &pctx))
+ goto abort_exit;
+ }
+
+ /*
+ * Force the creation of /lost+found if not present
+ */
+ if ((ctx->options & E2F_OPT_READONLY) == 0)
+ e2fsck_get_lost_and_found(ctx, 1);
+
+ /*
+ * If there are any directories that need to be indexed or
+ * optimized, do it here.
+ */
+ e2fsck_rehash_directories(ctx);
+
+abort_exit:
+ if (iter)
+ e2fsck_dir_info_iter_end(ctx, iter);
+ e2fsck_free_dir_info(ctx);
+ if (inode_loop_detect) {
+ ext2fs_free_inode_bitmap(inode_loop_detect);
+ inode_loop_detect = 0;
+ }
+ if (inode_done_map) {
+ ext2fs_free_inode_bitmap(inode_done_map);
+ inode_done_map = 0;
+ }
+
+ if (ctx->lnf_repair_block) {
+ ext2fs_unmark_block_bitmap2(ctx->block_found_map,
+ ctx->lnf_repair_block);
+ ctx->lnf_repair_block = 0;
+ }
+ if (ctx->root_repair_block) {
+ ext2fs_unmark_block_bitmap2(ctx->block_found_map,
+ ctx->root_repair_block);
+ ctx->root_repair_block = 0;
+ }
+
+ print_resource_track(ctx, _("Pass 3"), &rtrack, ctx->fs->io);
+}
+
+/*
+ * This makes sure the root inode is present; if not, we ask if the
+ * user wants us to create it. Not creating it is a fatal error.
+ */
+static void check_root(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t blk;
+ struct ext2_inode_large inode;
+ struct ext2_inode *iptr = (struct ext2_inode *) &inode;
+ char * block;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ if (ext2fs_test_inode_bitmap2(ctx->inode_used_map, EXT2_ROOT_INO)) {
+ /*
+ * If the root inode is not a directory, die here. The
+ * user must have answered 'no' in pass1 when we
+ * offered to clear it.
+ */
+ if (!(ext2fs_test_inode_bitmap2(ctx->inode_dir_map,
+ EXT2_ROOT_INO))) {
+ fix_problem(ctx, PR_3_ROOT_NOT_DIR_ABORT, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ }
+ return;
+ }
+
+ if (!fix_problem(ctx, PR_3_NO_ROOT_INODE, &pctx)) {
+ fix_problem(ctx, PR_3_NO_ROOT_INODE_ABORT, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ e2fsck_read_bitmaps(ctx);
+
+ /*
+ * First, find a free block
+ */
+ if (ctx->root_repair_block) {
+ blk = ctx->root_repair_block;
+ ctx->root_repair_block = 0;
+ goto skip_new_block;
+ }
+ pctx.errcode = ext2fs_new_block2(fs, 0, ctx->block_found_map, &blk);
+ if (pctx.errcode) {
+ pctx.str = "ext2fs_new_block";
+ fix_problem(ctx, PR_3_CREATE_ROOT_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, blk);
+skip_new_block:
+ ext2fs_mark_block_bitmap2(fs->block_map, blk);
+ ext2fs_mark_bb_dirty(fs);
+
+ /*
+ * Set up the inode structure
+ */
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = 040755;
+ inode.i_size = fs->blocksize;
+ inode.i_atime = inode.i_ctime = inode.i_mtime = ctx->now;
+ inode.i_links_count = 2;
+ ext2fs_iblk_set(fs, iptr, 1);
+ inode.i_block[0] = blk;
+ inode.i_extra_isize = sizeof(struct ext2_inode_large) -
+ EXT2_GOOD_OLD_INODE_SIZE;
+
+ /*
+ * Write out the inode.
+ */
+ pctx.errcode = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, iptr);
+ if (pctx.errcode) {
+ pctx.str = "ext2fs_write_inode";
+ fix_problem(ctx, PR_3_CREATE_ROOT_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ /*
+ * Now let's create the actual data block for the inode.
+ * Due to metadata_csum, we must write the dir blocks AFTER
+ * the inode has been written to disk!
+ */
+ pctx.errcode = ext2fs_new_dir_block(fs, EXT2_ROOT_INO, EXT2_ROOT_INO,
+ &block);
+ if (pctx.errcode) {
+ pctx.str = "ext2fs_new_dir_block";
+ fix_problem(ctx, PR_3_CREATE_ROOT_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ pctx.errcode = ext2fs_write_dir_block4(fs, blk, block, 0,
+ EXT2_ROOT_INO);
+ ext2fs_free_mem(&block);
+ if (pctx.errcode) {
+ pctx.str = "ext2fs_write_dir_block4";
+ fix_problem(ctx, PR_3_CREATE_ROOT_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ /*
+ * Miscellaneous bookkeeping...
+ */
+ e2fsck_add_dir_info(ctx, EXT2_ROOT_INO, EXT2_ROOT_INO);
+ ext2fs_icount_store(ctx->inode_count, EXT2_ROOT_INO, 2);
+ ext2fs_icount_store(ctx->inode_link_info, EXT2_ROOT_INO, 2);
+
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, EXT2_ROOT_INO);
+ ext2fs_mark_inode_bitmap2(ctx->inode_dir_map, EXT2_ROOT_INO);
+ ext2fs_mark_inode_bitmap2(fs->inode_map, EXT2_ROOT_INO);
+ ext2fs_mark_ib_dirty(fs);
+ quota_data_add(ctx->qctx, &inode, EXT2_ROOT_INO,
+ EXT2_CLUSTER_SIZE(fs->super));
+ quota_data_inodes(ctx->qctx, &inode, EXT2_ROOT_INO, +1);
+}
+
+/*
+ * This subroutine is responsible for making sure that a particular
+ * directory is connected to the root; if it isn't we trace it up as
+ * far as we can go, and then offer to connect the resulting parent to
+ * the lost+found. We have to do loop detection; if we ever discover
+ * a loop, we treat that as a disconnected directory and offer to
+ * reparent it to lost+found.
+ *
+ * However, loop detection is expensive, because for very large
+ * filesystems, the inode_loop_detect bitmap is huge, and clearing it
+ * is non-trivial. Loops in filesystems are also a rare error case,
+ * and we shouldn't optimize for error cases. So we try two passes of
+ * the algorithm. The first time, we ignore loop detection and merely
+ * increment a counter; if the counter exceeds some extreme threshold,
+ * then we try again with the loop detection bitmap enabled.
+ */
+static int check_directory(e2fsck_t ctx, ext2_ino_t dir,
+ struct problem_context *pctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino = dir, parent;
+ int loop_pass = 0, parent_count = 0;
+
+ while (1) {
+ /*
+ * Mark this inode as being "done"; by the time we
+ * return from this function, the inode we either be
+ * verified as being connected to the directory tree,
+ * or we will have offered to reconnect this to
+ * lost+found.
+ *
+ * If it was marked done already, then we've reached a
+ * parent we've already checked.
+ */
+ if (ext2fs_mark_inode_bitmap2(inode_done_map, ino))
+ break;
+
+ if (e2fsck_dir_info_get_parent(ctx, ino, &parent)) {
+ fix_problem(ctx, PR_3_NO_DIRINFO, pctx);
+ return 0;
+ }
+
+ /*
+ * If this directory doesn't have a parent, or we've
+ * seen the parent once already, then offer to
+ * reparent it to lost+found
+ */
+ if (!parent ||
+ (loop_pass &&
+ ext2fs_test_inode_bitmap2(inode_loop_detect, parent))) {
+ pctx->ino = ino;
+ if (parent)
+ pctx->dir = parent;
+ else
+ (void) ext2fs_lookup(fs, ino, "..", 2, NULL,
+ &pctx->dir);
+ if (fix_problem(ctx, !parent ? PR_3_UNCONNECTED_DIR :
+ PR_3_LOOPED_DIR, pctx)) {
+ if (e2fsck_reconnect_file(ctx, pctx->ino)) {
+ ext2fs_unmark_valid(fs);
+ } else {
+ fix_dotdot(ctx, pctx->ino,
+ ctx->lost_and_found);
+ parent = ctx->lost_and_found;
+ }
+ }
+ break;
+ }
+ ino = parent;
+ if (loop_pass) {
+ ext2fs_mark_inode_bitmap2(inode_loop_detect, ino);
+ } else if (parent_count++ > 2048) {
+ /*
+ * If we've run into a path depth that's
+ * greater than 2048, try again with the inode
+ * loop bitmap turned on and start from the
+ * top.
+ */
+ loop_pass = 1;
+ if (inode_loop_detect)
+ ext2fs_clear_inode_bitmap(inode_loop_detect);
+ else {
+ pctx->errcode = e2fsck_allocate_inode_bitmap(fs, _("inode loop detection bitmap"), EXT2FS_BMAP64_AUTODIR, "inode_loop_detect", &inode_loop_detect);
+ if (pctx->errcode) {
+ pctx->num = 1;
+ fix_problem(ctx,
+ PR_3_ALLOCATE_IBITMAP_ERROR, pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return -1;
+ }
+ }
+ ino = dir;
+ }
+ }
+
+ /*
+ * Make sure that .. and the parent directory are the same;
+ * offer to fix it if not.
+ */
+ pctx->ino = dir;
+ if (e2fsck_dir_info_get_dotdot(ctx, dir, &pctx->ino2) ||
+ e2fsck_dir_info_get_parent(ctx, dir, &pctx->dir)) {
+ fix_problem(ctx, PR_3_NO_DIRINFO, pctx);
+ return 0;
+ }
+ if (pctx->ino2 != pctx->dir) {
+ if (fix_problem(ctx, PR_3_BAD_DOT_DOT, pctx))
+ fix_dotdot(ctx, dir, pctx->dir);
+ }
+ return 0;
+}
+
+/*
+ * This routine gets the lost_and_found inode, making it a directory
+ * if necessary
+ */
+ext2_ino_t e2fsck_get_lost_and_found(e2fsck_t ctx, int fix)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino;
+ blk64_t blk;
+ errcode_t retval;
+ struct ext2_inode_large inode;
+ char * block;
+ static const char name[] = "lost+found";
+ struct problem_context pctx;
+ int will_rehash, flags;
+
+ if (ctx->lost_and_found)
+ return ctx->lost_and_found;
+
+ clear_problem_context(&pctx);
+
+ will_rehash = e2fsck_dir_will_be_rehashed(ctx, EXT2_ROOT_INO);
+ if (will_rehash) {
+ flags = ctx->fs->flags;
+ ctx->fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ }
+ retval = ext2fs_lookup(fs, EXT2_ROOT_INO, name,
+ sizeof(name)-1, 0, &ino);
+ if (will_rehash)
+ ctx->fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (ctx->fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+ if (retval && !fix)
+ return 0;
+ if (!retval) {
+ /* Lost+found shouldn't have inline data */
+ retval = ext2fs_read_inode_full(fs, ino, EXT2_INODE(&inode),
+ sizeof(inode));
+ if (fix && retval)
+ return 0;
+
+ if (fix && (inode.i_flags & EXT4_INLINE_DATA_FL)) {
+ if (!fix_problem(ctx, PR_3_LPF_INLINE_DATA, &pctx))
+ return 0;
+ goto unlink;
+ }
+
+ if (fix && (inode.i_flags & EXT4_ENCRYPT_FL)) {
+ if (!fix_problem(ctx, PR_3_LPF_ENCRYPTED, &pctx))
+ return 0;
+ goto unlink;
+ }
+
+ if (ext2fs_check_directory(fs, ino) == 0) {
+ ctx->lost_and_found = ino;
+ return ino;
+ }
+
+ /* Lost+found isn't a directory! */
+ if (!fix)
+ return 0;
+ pctx.ino = ino;
+ if (!fix_problem(ctx, PR_3_LPF_NOTDIR, &pctx))
+ return 0;
+
+unlink:
+ /* OK, unlink the old /lost+found file. */
+ pctx.errcode = ext2fs_unlink(fs, EXT2_ROOT_INO, name, ino, 0);
+ if (pctx.errcode) {
+ pctx.str = "ext2fs_unlink";
+ fix_problem(ctx, PR_3_CREATE_LPF_ERROR, &pctx);
+ return 0;
+ }
+ (void) e2fsck_dir_info_set_parent(ctx, ino, 0);
+ e2fsck_adjust_inode_count(ctx, ino, -1);
+ /*
+ * If the old lost+found was a directory, we've just
+ * disconnected it from the directory tree, which
+ * means we need to restart the directory tree scan.
+ * The simplest way to do this is restart the whole
+ * e2fsck operation.
+ */
+ if (LINUX_S_ISDIR(inode.i_mode))
+ ctx->flags |= E2F_FLAG_RESTART;
+ } else if (retval != EXT2_ET_FILE_NOT_FOUND) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_ERR_FIND_LPF, &pctx);
+ }
+ if (!fix_problem(ctx, PR_3_NO_LF_DIR, 0))
+ return 0;
+
+ /*
+ * Read the inode and block bitmaps in; we'll be messing with
+ * them.
+ */
+ e2fsck_read_bitmaps(ctx);
+
+ /*
+ * First, find a free block
+ */
+ if (ctx->lnf_repair_block) {
+ blk = ctx->lnf_repair_block;
+ ctx->lnf_repair_block = 0;
+ goto skip_new_block;
+ }
+ retval = ext2fs_new_block2(fs, 0, ctx->block_found_map, &blk);
+ if (retval == EXT2_ET_BLOCK_ALLOC_FAIL &&
+ fix_problem(ctx, PR_3_LPF_NO_SPACE, &pctx)) {
+ fix_problem(ctx, PR_3_NO_SPACE_TO_RECOVER, &pctx);
+ ctx->lost_and_found = EXT2_ROOT_INO;
+ return 0;
+ }
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_ERR_LPF_NEW_BLOCK, &pctx);
+ return 0;
+ }
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, blk);
+skip_new_block:
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+
+ /*
+ * Next find a free inode.
+ */
+ retval = ext2fs_new_inode(fs, EXT2_ROOT_INO, 040700,
+ ctx->inode_used_map, &ino);
+ if (retval == EXT2_ET_INODE_ALLOC_FAIL &&
+ fix_problem(ctx, PR_3_LPF_NO_SPACE, &pctx)) {
+ fix_problem(ctx, PR_3_NO_SPACE_TO_RECOVER, &pctx);
+ ctx->lost_and_found = EXT2_ROOT_INO;
+ return 0;
+ }
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_ERR_LPF_NEW_INODE, &pctx);
+ return 0;
+ }
+ ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+ ext2fs_mark_inode_bitmap2(ctx->inode_dir_map, ino);
+ ext2fs_inode_alloc_stats2(fs, ino, +1, 1);
+
+ /*
+ * Set up the inode structure
+ */
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = 040700;
+ inode.i_size = fs->blocksize;
+ inode.i_atime = inode.i_ctime = inode.i_mtime = ctx->now;
+ inode.i_links_count = 2;
+ ext2fs_iblk_set(fs, EXT2_INODE(&inode), 1);
+ inode.i_block[0] = blk;
+
+ /*
+ * Next, write out the inode.
+ */
+ pctx.errcode = ext2fs_write_new_inode(fs, ino, EXT2_INODE(&inode));
+ if (pctx.errcode) {
+ pctx.str = "ext2fs_write_inode";
+ fix_problem(ctx, PR_3_CREATE_LPF_ERROR, &pctx);
+ return 0;
+ }
+
+ /*
+ * Now let's create the actual data block for the inode.
+ * Due to metadata_csum, the directory block MUST be written
+ * after the inode is written to disk!
+ */
+ retval = ext2fs_new_dir_block(fs, ino, EXT2_ROOT_INO, &block);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_ERR_LPF_NEW_DIR_BLOCK, &pctx);
+ return 0;
+ }
+
+ retval = ext2fs_write_dir_block4(fs, blk, block, 0, ino);
+ ext2fs_free_mem(&block);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_ERR_LPF_WRITE_BLOCK, &pctx);
+ return 0;
+ }
+
+ /*
+ * Finally, create the directory link
+ */
+ pctx.errcode = ext2fs_link(fs, EXT2_ROOT_INO, name, ino, EXT2_FT_DIR);
+ if (pctx.errcode == EXT2_ET_DIR_NO_SPACE) {
+ pctx.errcode = ext2fs_expand_dir(fs, EXT2_ROOT_INO);
+ if (pctx.errcode)
+ goto link_error;
+ pctx.errcode = ext2fs_link(fs, EXT2_ROOT_INO, name, ino,
+ EXT2_FT_DIR);
+ }
+ if (pctx.errcode) {
+link_error:
+ pctx.str = "ext2fs_link";
+ fix_problem(ctx, PR_3_CREATE_LPF_ERROR, &pctx);
+ return 0;
+ }
+
+ /*
+ * Miscellaneous bookkeeping that needs to be kept straight.
+ */
+ e2fsck_add_dir_info(ctx, ino, EXT2_ROOT_INO);
+ e2fsck_adjust_inode_count(ctx, EXT2_ROOT_INO, 1);
+ ext2fs_icount_store(ctx->inode_count, ino, 2);
+ ext2fs_icount_store(ctx->inode_link_info, ino, 2);
+ ctx->lost_and_found = ino;
+ quota_data_add(ctx->qctx, &inode, ino, EXT2_CLUSTER_SIZE(fs->super));
+ quota_data_inodes(ctx->qctx, &inode, ino, +1);
+#if 0
+ printf("/lost+found created; inode #%lu\n", ino);
+#endif
+ return ino;
+}
+
+/*
+ * This routine will connect a file to lost+found
+ */
+int e2fsck_reconnect_file(e2fsck_t ctx, ext2_ino_t ino)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ char name[80];
+ struct problem_context pctx;
+ struct ext2_inode inode;
+ int file_type = 0;
+
+ clear_problem_context(&pctx);
+ pctx.ino = ino;
+
+ if (!ctx->bad_lost_and_found && !ctx->lost_and_found) {
+ if (e2fsck_get_lost_and_found(ctx, 1) == 0)
+ ctx->bad_lost_and_found++;
+ }
+ if (ctx->bad_lost_and_found) {
+ fix_problem(ctx, PR_3_NO_LPF, &pctx);
+ return 1;
+ }
+
+ sprintf(name, "#%u", ino);
+ if (ext2fs_read_inode(fs, ino, &inode) == 0)
+ file_type = ext2_file_type(inode.i_mode);
+ retval = ext2fs_link(fs, ctx->lost_and_found, name, ino, file_type);
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ if (!fix_problem(ctx, PR_3_EXPAND_LF_DIR, &pctx))
+ return 1;
+ retval = e2fsck_expand_directory(ctx, ctx->lost_and_found,
+ 1, 0);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_CANT_EXPAND_LPF, &pctx);
+ return 1;
+ }
+ retval = ext2fs_link(fs, ctx->lost_and_found, name,
+ ino, file_type);
+ }
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_CANT_RECONNECT, &pctx);
+ return 1;
+ }
+ e2fsck_adjust_inode_count(ctx, ino, 1);
+
+ return 0;
+}
+
+/*
+ * Utility routine to adjust the inode counts on an inode.
+ */
+errcode_t e2fsck_adjust_inode_count(e2fsck_t ctx, ext2_ino_t ino, int adj)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct ext2_inode inode;
+
+ if (!ino)
+ return 0;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+
+#if 0
+ printf("Adjusting link count for inode %lu by %d (from %d)\n", ino, adj,
+ inode.i_links_count);
+#endif
+
+ if (adj == 1) {
+ ext2fs_icount_increment(ctx->inode_count, ino, 0);
+ if (inode.i_links_count == (__u16) ~0)
+ return 0;
+ ext2fs_icount_increment(ctx->inode_link_info, ino, 0);
+ inode.i_links_count++;
+ } else if (adj == -1) {
+ ext2fs_icount_decrement(ctx->inode_count, ino, 0);
+ if (inode.i_links_count == 0)
+ return 0;
+ ext2fs_icount_decrement(ctx->inode_link_info, ino, 0);
+ inode.i_links_count--;
+ }
+
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+
+ return 0;
+}
+
+/*
+ * Fix parent --- this routine fixes up the parent of a directory.
+ */
+struct fix_dotdot_struct {
+ ext2_filsys fs;
+ ext2_ino_t parent;
+ int done;
+ e2fsck_t ctx;
+};
+
+static int fix_dotdot_proc(struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct fix_dotdot_struct *fp = (struct fix_dotdot_struct *) priv_data;
+ errcode_t retval;
+ struct problem_context pctx;
+
+ if (ext2fs_dirent_name_len(dirent) != 2)
+ return 0;
+ if (strncmp(dirent->name, "..", 2))
+ return 0;
+
+ clear_problem_context(&pctx);
+
+ retval = e2fsck_adjust_inode_count(fp->ctx, dirent->inode, -1);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(fp->ctx, PR_3_ADJUST_INODE, &pctx);
+ }
+ retval = e2fsck_adjust_inode_count(fp->ctx, fp->parent, 1);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(fp->ctx, PR_3_ADJUST_INODE, &pctx);
+ }
+ dirent->inode = fp->parent;
+ if (ext2fs_has_feature_filetype(fp->ctx->fs->super))
+ ext2fs_dirent_set_file_type(dirent, EXT2_FT_DIR);
+ else
+ ext2fs_dirent_set_file_type(dirent, EXT2_FT_UNKNOWN);
+
+ fp->done++;
+ return DIRENT_ABORT | DIRENT_CHANGED;
+}
+
+static void fix_dotdot(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct fix_dotdot_struct fp;
+ struct problem_context pctx;
+ int flags, will_rehash;
+
+ fp.fs = fs;
+ fp.parent = parent;
+ fp.done = 0;
+ fp.ctx = ctx;
+
+#if 0
+ printf("Fixing '..' of inode %lu to be %lu...\n", ino, parent);
+#endif
+
+ clear_problem_context(&pctx);
+ pctx.ino = ino;
+ will_rehash = e2fsck_dir_will_be_rehashed(ctx, ino);
+ if (will_rehash) {
+ flags = ctx->fs->flags;
+ ctx->fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ }
+ retval = ext2fs_dir_iterate(fs, ino, DIRENT_FLAG_INCLUDE_EMPTY,
+ 0, fix_dotdot_proc, &fp);
+ if (will_rehash)
+ ctx->fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (ctx->fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+ if (retval || !fp.done) {
+ pctx.errcode = retval;
+ fix_problem(ctx, retval ? PR_3_FIX_PARENT_ERR :
+ PR_3_FIX_PARENT_NOFIND, &pctx);
+ ext2fs_unmark_valid(fs);
+ }
+ (void) e2fsck_dir_info_set_dotdot(ctx, ino, parent);
+ if (e2fsck_dir_info_set_parent(ctx, ino, ctx->lost_and_found))
+ fix_problem(ctx, PR_3_NO_DIRINFO, &pctx);
+
+ return;
+}
+
+/*
+ * These routines are responsible for expanding a /lost+found if it is
+ * too small.
+ */
+
+struct expand_dir_struct {
+ blk64_t num;
+ e2_blkcnt_t guaranteed_size;
+ blk64_t newblocks;
+ blk64_t last_block;
+ errcode_t err;
+ e2fsck_t ctx;
+ ext2_ino_t dir;
+};
+
+static int expand_dir_proc(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct expand_dir_struct *es = (struct expand_dir_struct *) priv_data;
+ blk64_t new_blk;
+ static blk64_t last_blk = 0;
+ char *block;
+ errcode_t retval;
+ e2fsck_t ctx;
+
+ ctx = es->ctx;
+
+ if (es->guaranteed_size && blockcnt >= es->guaranteed_size)
+ return BLOCK_ABORT;
+
+ if (blockcnt > 0)
+ es->last_block = blockcnt;
+ if (*blocknr) {
+ last_blk = *blocknr;
+ return 0;
+ }
+
+ if (blockcnt &&
+ (EXT2FS_B2C(fs, last_blk) == EXT2FS_B2C(fs, last_blk + 1)))
+ new_blk = last_blk + 1;
+ else {
+ last_blk &= ~EXT2FS_CLUSTER_MASK(fs);
+ retval = ext2fs_new_block2(fs, last_blk, ctx->block_found_map,
+ &new_blk);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ es->newblocks++;
+ ext2fs_block_alloc_stats2(fs, new_blk, +1);
+ }
+ last_blk = new_blk;
+
+ if (blockcnt > 0) {
+ retval = ext2fs_new_dir_block(fs, 0, 0, &block);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ es->num--;
+ retval = ext2fs_write_dir_block4(fs, new_blk, block, 0,
+ es->dir);
+ ext2fs_free_mem(&block);
+ } else
+ retval = ext2fs_zero_blocks2(fs, new_blk, 1, NULL, NULL);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ *blocknr = new_blk;
+ ext2fs_mark_block_bitmap2(ctx->block_found_map, new_blk);
+
+ if (es->num == 0)
+ return (BLOCK_CHANGED | BLOCK_ABORT);
+ else
+ return BLOCK_CHANGED;
+}
+
+errcode_t e2fsck_expand_directory(e2fsck_t ctx, ext2_ino_t dir,
+ int num, int guaranteed_size)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct expand_dir_struct es;
+ struct ext2_inode_large inode;
+ blk64_t sz;
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ /*
+ * Read the inode and block bitmaps in; we'll be messing with
+ * them.
+ */
+ e2fsck_read_bitmaps(ctx);
+
+ retval = ext2fs_check_directory(fs, dir);
+ if (retval)
+ return retval;
+
+ es.num = num;
+ es.guaranteed_size = guaranteed_size;
+ es.last_block = 0;
+ es.err = 0;
+ es.newblocks = 0;
+ es.ctx = ctx;
+ es.dir = dir;
+
+ retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_APPEND,
+ 0, expand_dir_proc, &es);
+
+ if (es.err)
+ return es.err;
+
+ /*
+ * Update the size and block count fields in the inode.
+ */
+ retval = ext2fs_read_inode_full(fs, dir,
+ EXT2_INODE(&inode), sizeof(inode));
+ if (retval)
+ return retval;
+
+ sz = (es.last_block + 1) * fs->blocksize;
+ retval = ext2fs_inode_size_set(fs, EXT2_INODE(&inode), sz);
+ if (retval)
+ return retval;
+ ext2fs_iblk_add_blocks(fs, EXT2_INODE(&inode), es.newblocks);
+ quota_data_add(ctx->qctx, &inode, dir,
+ es.newblocks * EXT2_CLUSTER_SIZE(fs->super));
+
+ e2fsck_write_inode_full(ctx, dir, EXT2_INODE(&inode),
+ sizeof(inode), "expand_directory");
+
+ return 0;
+}
+
diff --git a/e2fsck/pass4.c b/e2fsck/pass4.c
new file mode 100644
index 0000000..d2dda02
--- /dev/null
+++ b/e2fsck/pass4.c
@@ -0,0 +1,302 @@
+/*
+ * pass4.c -- pass #4 of e2fsck: Check reference counts
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * Pass 4 frees the following data structures:
+ * - A bitmap of which inodes are in bad blocks. (inode_bb_map)
+ * - A bitmap of which inodes are imagic inodes. (inode_imagic_map)
+ * - Ref counts for ea_inodes. (ea_inode_refs)
+ */
+
+#include "config.h"
+#include "e2fsck.h"
+#include "problem.h"
+#include <ext2fs/ext2_ext_attr.h>
+
+/*
+ * This routine is called when an inode is not connected to the
+ * directory tree.
+ *
+ * This subroutine returns 1 then the caller shouldn't bother with the
+ * rest of the pass 4 tests.
+ */
+static int disconnect_inode(e2fsck_t ctx, ext2_ino_t i, ext2_ino_t *last_ino,
+ struct ext2_inode_large *inode)
+{
+ ext2_filsys fs = ctx->fs;
+ struct problem_context pctx;
+ __u32 eamagic = 0;
+ int extra_size = 0;
+
+ if (*last_ino != i) {
+ e2fsck_read_inode_full(ctx, i, EXT2_INODE(inode),
+ EXT2_INODE_SIZE(fs->super),
+ "pass4: disconnect_inode");
+ *last_ino = i;
+ }
+ if (EXT2_INODE_SIZE(fs->super) > EXT2_GOOD_OLD_INODE_SIZE)
+ extra_size = inode->i_extra_isize;
+
+ clear_problem_context(&pctx);
+ pctx.ino = i;
+ pctx.inode = EXT2_INODE(inode);
+
+ if (EXT2_INODE_SIZE(fs->super) -EXT2_GOOD_OLD_INODE_SIZE -extra_size >0)
+ eamagic = *(__u32 *)(((char *)inode) +EXT2_GOOD_OLD_INODE_SIZE +
+ extra_size);
+ /*
+ * Offer to delete any zero-length files that does not have
+ * blocks. If there is an EA block, it might have useful
+ * information, so we won't prompt to delete it, but let it be
+ * reconnected to lost+found.
+ */
+ if (!inode->i_blocks && eamagic != EXT2_EXT_ATTR_MAGIC &&
+ (LINUX_S_ISREG(inode->i_mode) || LINUX_S_ISDIR(inode->i_mode))) {
+ if (fix_problem(ctx, PR_4_ZERO_LEN_INODE, &pctx)) {
+ e2fsck_clear_inode(ctx, i, EXT2_INODE(inode), 0,
+ "disconnect_inode");
+ /*
+ * Fix up the bitmaps...
+ */
+ e2fsck_read_bitmaps(ctx);
+ ext2fs_inode_alloc_stats2(fs, i, -1,
+ LINUX_S_ISDIR(inode->i_mode));
+ quota_data_inodes(ctx->qctx, inode, i, -1);
+ return 0;
+ }
+ }
+
+ /*
+ * Prompt to reconnect.
+ */
+ if (fix_problem(ctx, PR_4_UNATTACHED_INODE, &pctx)) {
+ if (e2fsck_reconnect_file(ctx, i))
+ ext2fs_unmark_valid(fs);
+ *last_ino = 0;
+ } else {
+ /*
+ * If we don't attach the inode, then skip the
+ * i_links_test since there's no point in trying to
+ * force i_links_count to zero.
+ */
+ ext2fs_unmark_valid(fs);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * This function is called when link_counted is zero. So this may not be
+ * an xattr inode at all. Return immediately if EA_INODE flag is not set.
+ */
+static void check_ea_inode(e2fsck_t ctx, ext2_ino_t i, ext2_ino_t *last_ino,
+ struct ext2_inode_large *inode, __u16 *link_counted)
+{
+ __u64 actual_refs = 0;
+ __u64 ref_count;
+
+ if (*last_ino != i) {
+ e2fsck_read_inode_full(ctx, i, EXT2_INODE(inode),
+ EXT2_INODE_SIZE(ctx->fs->super),
+ "pass4: check_ea_inode");
+ *last_ino = i;
+ }
+ if (!(inode->i_flags & EXT4_EA_INODE_FL))
+ return;
+
+ if (ctx->ea_inode_refs)
+ ea_refcount_fetch(ctx->ea_inode_refs, i, &actual_refs);
+ if (!actual_refs)
+ return;
+
+ /*
+ * There are some attribute references, link_counted is now considered
+ * to be 1.
+ */
+ *link_counted = 1;
+
+ ref_count = ext2fs_get_ea_inode_ref(EXT2_INODE(inode));
+
+ /* Old Lustre-style xattr inodes do not have a stored refcount.
+ * However, their i_ctime and i_atime should be the same.
+ */
+ if (ref_count != actual_refs && inode->i_ctime != inode->i_atime) {
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+ pctx.ino = i;
+ pctx.num = ref_count;
+ pctx.num2 = actual_refs;
+ if (fix_problem(ctx, PR_4_EA_INODE_REF_COUNT, &pctx)) {
+ ext2fs_set_ea_inode_ref(EXT2_INODE(inode), actual_refs);
+ e2fsck_write_inode(ctx, i, EXT2_INODE(inode), "pass4");
+ }
+ }
+}
+
+void e2fsck_pass4(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t i;
+ struct ext2_inode_large *inode;
+ int inode_size = EXT2_INODE_SIZE(fs->super);
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ struct problem_context pctx;
+ __u16 link_count, link_counted;
+ int dir_nlink_fs;
+ char *buf = 0;
+ dgrp_t group, maxgroup;
+
+ init_resource_track(&rtrack, ctx->fs->io);
+
+#ifdef MTRACE
+ mtrace_print("Pass 4");
+#endif
+ /*
+ * Since pass4 is mostly CPU bound, start readahead of bitmaps
+ * ahead of pass 5 if we haven't already loaded them.
+ */
+ if (ctx->readahead_kb &&
+ (fs->block_map == NULL || fs->inode_map == NULL))
+ e2fsck_readahead(fs, E2FSCK_READA_BBITMAP |
+ E2FSCK_READA_IBITMAP,
+ 0, fs->group_desc_count);
+
+ clear_problem_context(&pctx);
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_4_PASS_HEADER, &pctx);
+
+ dir_nlink_fs = ext2fs_has_feature_dir_nlink(fs->super);
+
+ group = 0;
+ maxgroup = fs->group_desc_count;
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 4, 0, maxgroup))
+ return;
+
+ inode = e2fsck_allocate_memory(ctx, inode_size, "scratch inode");
+
+ /* Protect loop from wrap-around if s_inodes_count maxed */
+ for (i = 1; i <= fs->super->s_inodes_count && i > 0; i++) {
+ ext2_ino_t last_ino = 0;
+ int isdir;
+
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto errout;
+ if ((i % fs->super->s_inodes_per_group) == 0) {
+ group++;
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 4, group, maxgroup))
+ goto errout;
+ }
+ if (i == quota_type2inum(PRJQUOTA, ctx->fs->super) ||
+ i == fs->super->s_orphan_file_inum || i == EXT2_BAD_INO ||
+ (i > EXT2_ROOT_INO && i < EXT2_FIRST_INODE(fs->super)))
+ continue;
+ if (!(ext2fs_test_inode_bitmap2(ctx->inode_used_map, i)) ||
+ (ctx->inode_imagic_map &&
+ ext2fs_test_inode_bitmap2(ctx->inode_imagic_map, i)) ||
+ (ctx->inode_bb_map &&
+ ext2fs_test_inode_bitmap2(ctx->inode_bb_map, i)))
+ continue;
+ ext2fs_icount_fetch(ctx->inode_link_info, i, &link_count);
+ ext2fs_icount_fetch(ctx->inode_count, i, &link_counted);
+
+ if (link_counted == 0) {
+ /*
+ * link_counted is expected to be 0 for an ea_inode.
+ * check_ea_inode() will update link_counted if
+ * necessary.
+ */
+ check_ea_inode(ctx, i, &last_ino, inode, &link_counted);
+ }
+
+ if (link_counted == 0) {
+ if (!buf)
+ buf = e2fsck_allocate_memory(ctx,
+ fs->blocksize, "bad_inode buffer");
+ if (e2fsck_process_bad_inode(ctx, 0, i, buf))
+ continue;
+ if (disconnect_inode(ctx, i, &last_ino, inode))
+ continue;
+ ext2fs_icount_fetch(ctx->inode_link_info, i,
+ &link_count);
+ ext2fs_icount_fetch(ctx->inode_count, i,
+ &link_counted);
+ }
+ isdir = ext2fs_test_inode_bitmap2(ctx->inode_dir_map, i);
+ if (isdir && (link_counted > EXT2_LINK_MAX)) {
+ if (!dir_nlink_fs &&
+ fix_problem(ctx, PR_4_DIR_NLINK_FEATURE, &pctx)) {
+ ext2fs_set_feature_dir_nlink(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ dir_nlink_fs = 1;
+ }
+ link_counted = 1;
+ }
+ if (link_counted != link_count) {
+ int fix_nlink = 0;
+
+ if (last_ino != i) {
+ e2fsck_read_inode_full(ctx, i,
+ EXT2_INODE(inode),
+ inode_size, "pass4");
+ last_ino = i;
+ }
+ pctx.ino = i;
+ pctx.inode = EXT2_INODE(inode);
+ if ((link_count != inode->i_links_count) && !isdir &&
+ (inode->i_links_count <= EXT2_LINK_MAX)) {
+ pctx.num = link_count;
+ fix_problem(ctx,
+ PR_4_INCONSISTENT_COUNT, &pctx);
+ }
+ pctx.num = link_counted;
+ /* i_link_count was previously exceeded, but no longer
+ * is, fix this but don't consider it an error */
+ if (isdir && link_counted > 1 &&
+ (inode->i_flags & EXT2_INDEX_FL) &&
+ link_count == 1) {
+ if ((ctx->options & E2F_OPT_READONLY) == 0) {
+ fix_nlink =
+ fix_problem(ctx,
+ PR_4_DIR_OVERFLOW_REF_COUNT,
+ &pctx);
+ }
+ } else {
+ fix_nlink = fix_problem(ctx, PR_4_BAD_REF_COUNT,
+ &pctx);
+ }
+ if (fix_nlink) {
+ inode->i_links_count = link_counted;
+ e2fsck_write_inode_full(ctx, i,
+ EXT2_INODE(inode),
+ inode_size, "pass4");
+ }
+ }
+ }
+ ext2fs_free_icount(ctx->inode_link_info); ctx->inode_link_info = 0;
+ ext2fs_free_icount(ctx->inode_count); ctx->inode_count = 0;
+ ext2fs_free_inode_bitmap(ctx->inode_bb_map);
+ ctx->inode_bb_map = 0;
+ ea_refcount_free(ctx->ea_inode_refs);
+ ctx->ea_inode_refs = 0;
+ ext2fs_free_inode_bitmap(ctx->inode_imagic_map);
+ ctx->inode_imagic_map = 0;
+errout:
+ if (buf)
+ ext2fs_free_mem(&buf);
+
+ ext2fs_free_mem(&inode);
+ print_resource_track(ctx, _("Pass 4"), &rtrack, ctx->fs->io);
+}
+
diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
new file mode 100644
index 0000000..c1d45a5
--- /dev/null
+++ b/e2fsck/pass5.c
@@ -0,0 +1,958 @@
+/*
+ * pass5.c --- check block and inode bitmaps against on-disk bitmaps
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ */
+
+#include "config.h"
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "e2fsck.h"
+#include "problem.h"
+
+static void check_block_bitmaps(e2fsck_t ctx);
+static void check_inode_bitmaps(e2fsck_t ctx);
+static void check_inode_end(e2fsck_t ctx);
+static void check_block_end(e2fsck_t ctx);
+static void check_inode_bitmap_checksum(e2fsck_t ctx);
+static void check_block_bitmap_checksum(e2fsck_t ctx);
+
+void e2fsck_pass5(e2fsck_t ctx)
+{
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ struct problem_context pctx;
+
+#ifdef MTRACE
+ mtrace_print("Pass 5");
+#endif
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ clear_problem_context(&pctx);
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_5_PASS_HEADER, &pctx);
+
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 5, 0, ctx->fs->group_desc_count*2))
+ return;
+
+ e2fsck_read_bitmaps(ctx);
+
+ check_block_bitmaps(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+ check_inode_bitmaps(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+ check_inode_end(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+ check_block_end(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+
+ check_inode_bitmap_checksum(ctx);
+ check_block_bitmap_checksum(ctx);
+
+ ext2fs_free_inode_bitmap(ctx->inode_used_map);
+ ctx->inode_used_map = 0;
+ ext2fs_free_inode_bitmap(ctx->inode_dir_map);
+ ctx->inode_dir_map = 0;
+ ext2fs_free_block_bitmap(ctx->block_found_map);
+ ctx->block_found_map = 0;
+ ext2fs_free_block_bitmap(ctx->block_metadata_map);
+ ctx->block_metadata_map = 0;
+
+ print_resource_track(ctx, _("Pass 5"), &rtrack, ctx->fs->io);
+}
+
+static void check_inode_bitmap_checksum(e2fsck_t ctx)
+{
+ struct problem_context pctx;
+ char *buf = NULL;
+ dgrp_t i;
+ int nbytes;
+ ext2_ino_t ino_itr;
+ errcode_t retval;
+
+ if (!ext2fs_has_feature_metadata_csum(ctx->fs->super))
+ return;
+
+ /* If bitmap is dirty from being fixed, checksum will be corrected */
+ if (ext2fs_test_ib_dirty(ctx->fs))
+ return;
+
+ nbytes = (size_t)(EXT2_INODES_PER_GROUP(ctx->fs->super) / 8);
+ retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
+ if (retval) {
+ com_err(ctx->program_name, 0, "%s",
+ _("check_inode_bitmap_checksum: Memory allocation error"));
+ fatal_error(ctx, 0);
+ }
+
+ clear_problem_context(&pctx);
+ for (i = 0; i < ctx->fs->group_desc_count; i++) {
+ if (ext2fs_bg_flags_test(ctx->fs, i, EXT2_BG_INODE_UNINIT))
+ continue;
+
+ ino_itr = 1 + (i * (nbytes << 3));
+ retval = ext2fs_get_inode_bitmap_range2(ctx->fs->inode_map,
+ ino_itr, nbytes << 3,
+ buf);
+ if (retval)
+ break;
+
+ if (ext2fs_inode_bitmap_csum_verify(ctx->fs, i, buf, nbytes))
+ continue;
+ pctx.group = i;
+ if (!fix_problem(ctx, PR_5_INODE_BITMAP_CSUM_INVALID, &pctx))
+ continue;
+
+ /*
+ * Fixing one checksum will rewrite all of them. The bitmap
+ * will be checked against the one we made during pass1 for
+ * discrepancies, and fixed if need be.
+ */
+ ext2fs_mark_ib_dirty(ctx->fs);
+ break;
+ }
+
+ ext2fs_free_mem(&buf);
+}
+
+static void check_block_bitmap_checksum(e2fsck_t ctx)
+{
+ struct problem_context pctx;
+ char *buf = NULL;
+ dgrp_t i;
+ int nbytes;
+ blk64_t blk_itr;
+ errcode_t retval;
+
+ if (!ext2fs_has_feature_metadata_csum(ctx->fs->super))
+ return;
+
+ /* If bitmap is dirty from being fixed, checksum will be corrected */
+ if (ext2fs_test_bb_dirty(ctx->fs))
+ return;
+
+ nbytes = (size_t)(EXT2_CLUSTERS_PER_GROUP(ctx->fs->super) / 8);
+ retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
+ if (retval) {
+ com_err(ctx->program_name, 0, "%s",
+ _("check_block_bitmap_checksum: Memory allocation error"));
+ fatal_error(ctx, 0);
+ }
+
+ clear_problem_context(&pctx);
+ for (i = 0; i < ctx->fs->group_desc_count; i++) {
+ if (ext2fs_bg_flags_test(ctx->fs, i, EXT2_BG_BLOCK_UNINIT))
+ continue;
+
+ blk_itr = EXT2FS_B2C(ctx->fs,
+ ctx->fs->super->s_first_data_block) +
+ ((blk64_t) i * (nbytes << 3));
+ retval = ext2fs_get_block_bitmap_range2(ctx->fs->block_map,
+ blk_itr, nbytes << 3,
+ buf);
+ if (retval)
+ break;
+
+ if (ext2fs_block_bitmap_csum_verify(ctx->fs, i, buf, nbytes))
+ continue;
+ pctx.group = i;
+ if (!fix_problem(ctx, PR_5_BLOCK_BITMAP_CSUM_INVALID, &pctx))
+ continue;
+
+ /*
+ * Fixing one checksum will rewrite all of them. The bitmap
+ * will be checked against the one we made during pass1 for
+ * discrepancies, and fixed if need be.
+ */
+ ext2fs_mark_bb_dirty(ctx->fs);
+ break;
+ }
+
+ ext2fs_free_mem(&buf);
+}
+
+static void e2fsck_discard_blocks(e2fsck_t ctx, blk64_t start,
+ blk64_t count)
+{
+ ext2_filsys fs = ctx->fs;
+
+ /*
+ * If the filesystem has changed it means that there was an corruption
+ * which should be repaired, but in some cases just one e2fsck run is
+ * not enough to fix the problem, hence it is not safe to run discard
+ * in this case.
+ */
+ if (ext2fs_test_changed(fs))
+ ctx->options &= ~E2F_OPT_DISCARD;
+
+ if ((ctx->options & E2F_OPT_DISCARD) &&
+ (io_channel_discard(fs->io, start, count)))
+ ctx->options &= ~E2F_OPT_DISCARD;
+}
+
+/*
+ * This will try to discard number 'count' inodes starting at
+ * inode number 'start' within the 'group'. Note that 'start'
+ * is 1-based, it means that we need to adjust it by -1 in this
+ * function to compute right offset in the particular inode table.
+ */
+static void e2fsck_discard_inodes(e2fsck_t ctx, dgrp_t group,
+ ext2_ino_t start, int count)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t blk, num;
+
+ /*
+ * Sanity check for 'start'
+ */
+ if ((start < 1) || (start > EXT2_INODES_PER_GROUP(fs->super))) {
+ printf("PROGRAMMING ERROR: Got start %d outside of group %d!"
+ " Disabling discard\n",
+ start, group);
+ ctx->options &= ~E2F_OPT_DISCARD;
+ }
+
+ /*
+ * Do not attempt to discard if E2F_OPT_DISCARD is not set. And also
+ * skip the discard on this group if discard does not zero data.
+ * The reason is that if the inode table is not zeroed discard would
+ * no help us since we need to zero it anyway, or if the inode table
+ * is zeroed then the read after discard would not be deterministic
+ * anyway and we would not be able to assume that this inode table
+ * was zeroed anymore so we would have to zero it again, which does
+ * not really make sense.
+ */
+ if (!(ctx->options & E2F_OPT_DISCARD) ||
+ !io_channel_discard_zeroes_data(fs->io))
+ return;
+
+ /*
+ * Start is inode number within the group which starts
+ * counting from 1, so we need to adjust it.
+ */
+ start -= 1;
+
+ /*
+ * We can discard only blocks containing only unused
+ * inodes in the table.
+ */
+ blk = DIV_ROUND_UP(start,
+ EXT2_INODES_PER_BLOCK(fs->super));
+ count -= (blk * EXT2_INODES_PER_BLOCK(fs->super) - start);
+ blk += ext2fs_inode_table_loc(fs, group);
+ num = count / EXT2_INODES_PER_BLOCK(fs->super);
+
+ if (num > 0)
+ e2fsck_discard_blocks(ctx, blk, num);
+}
+
+#define NO_BLK ((blk64_t) -1)
+
+static void print_bitmap_problem(e2fsck_t ctx, problem_t problem,
+ struct problem_context *pctx)
+{
+ switch (problem) {
+ case PR_5_BLOCK_UNUSED:
+ if (pctx->blk == pctx->blk2)
+ pctx->blk2 = 0;
+ else
+ problem = PR_5_BLOCK_RANGE_UNUSED;
+ break;
+ case PR_5_BLOCK_USED:
+ if (pctx->blk == pctx->blk2)
+ pctx->blk2 = 0;
+ else
+ problem = PR_5_BLOCK_RANGE_USED;
+ break;
+ case PR_5_INODE_UNUSED:
+ if (pctx->ino == pctx->ino2)
+ pctx->ino2 = 0;
+ else
+ problem = PR_5_INODE_RANGE_UNUSED;
+ break;
+ case PR_5_INODE_USED:
+ if (pctx->ino == pctx->ino2)
+ pctx->ino2 = 0;
+ else
+ problem = PR_5_INODE_RANGE_USED;
+ break;
+ }
+ fix_problem(ctx, problem, pctx);
+ pctx->blk = pctx->blk2 = NO_BLK;
+ pctx->ino = pctx->ino2 = 0;
+}
+
+/* Just to be more succinct */
+#define B2C(x) EXT2FS_B2C(fs, (x))
+#define EQ_CLSTR(x, y) (B2C(x) == B2C(y))
+#define LE_CLSTR(x, y) (B2C(x) <= B2C(y))
+#define GE_CLSTR(x, y) (B2C(x) >= B2C(y))
+
+static void check_block_bitmaps(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t i;
+ unsigned int *free_array;
+ dgrp_t g, group = 0;
+ unsigned int blocks = 0;
+ blk64_t free_blocks = 0;
+ blk64_t first_free = ext2fs_blocks_count(fs->super);
+ unsigned int group_free = 0;
+ int actual, bitmap;
+ struct problem_context pctx;
+ problem_t problem, save_problem;
+ int fixit, had_problem;
+ errcode_t retval;
+ int redo_flag = 0;
+ char *actual_buf, *bitmap_buf;
+
+ actual_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize,
+ "actual bitmap buffer");
+ bitmap_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize,
+ "bitmap block buffer");
+
+ clear_problem_context(&pctx);
+ free_array = (unsigned int *) e2fsck_allocate_memory(ctx,
+ fs->group_desc_count * sizeof(unsigned int), "free block count array");
+
+ if ((B2C(fs->super->s_first_data_block) <
+ ext2fs_get_block_bitmap_start2(ctx->block_found_map)) ||
+ (B2C(ext2fs_blocks_count(fs->super)-1) >
+ ext2fs_get_block_bitmap_end2(ctx->block_found_map))) {
+ pctx.num = 1;
+ pctx.blk = B2C(fs->super->s_first_data_block);
+ pctx.blk2 = B2C(ext2fs_blocks_count(fs->super) - 1);
+ pctx.ino = ext2fs_get_block_bitmap_start2(ctx->block_found_map);
+ pctx.ino2 = ext2fs_get_block_bitmap_end2(ctx->block_found_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ goto errout;
+ }
+
+ if ((B2C(fs->super->s_first_data_block) <
+ ext2fs_get_block_bitmap_start2(fs->block_map)) ||
+ (B2C(ext2fs_blocks_count(fs->super)-1) >
+ ext2fs_get_block_bitmap_end2(fs->block_map))) {
+ pctx.num = 2;
+ pctx.blk = B2C(fs->super->s_first_data_block);
+ pctx.blk2 = B2C(ext2fs_blocks_count(fs->super) - 1);
+ pctx.ino = ext2fs_get_block_bitmap_start2(fs->block_map);
+ pctx.ino2 = ext2fs_get_block_bitmap_end2(fs->block_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ goto errout;
+ }
+
+redo_counts:
+ had_problem = 0;
+ save_problem = 0;
+ pctx.blk = pctx.blk2 = NO_BLK;
+ for (i = B2C(fs->super->s_first_data_block);
+ i < ext2fs_blocks_count(fs->super);
+ i += EXT2FS_CLUSTER_RATIO(fs)) {
+ int first_block_in_bg = (B2C(i) -
+ B2C(fs->super->s_first_data_block)) %
+ fs->super->s_clusters_per_group == 0;
+ int n, nbytes = fs->super->s_clusters_per_group / 8;
+
+ actual = ext2fs_fast_test_block_bitmap2(ctx->block_found_map, i);
+
+ /*
+ * Try to optimize pass5 by extracting a bitmap block
+ * as expected from what we have on disk, and then
+ * comparing the two. If they are identical, then
+ * update the free block counts and go on to the next
+ * block group. This is much faster than doing the
+ * individual bit-by-bit comparison. The one downside
+ * is that this doesn't work if we are asking e2fsck
+ * to do a discard operation.
+ */
+ if (!first_block_in_bg ||
+ (group == fs->group_desc_count - 1) ||
+ (ctx->options & E2F_OPT_DISCARD))
+ goto no_optimize;
+
+ retval = ext2fs_get_block_bitmap_range2(ctx->block_found_map,
+ B2C(i), fs->super->s_clusters_per_group,
+ actual_buf);
+ if (retval)
+ goto no_optimize;
+ retval = ext2fs_get_block_bitmap_range2(fs->block_map,
+ B2C(i), fs->super->s_clusters_per_group,
+ bitmap_buf);
+ if (retval)
+ goto no_optimize;
+ if (memcmp(actual_buf, bitmap_buf, nbytes) != 0)
+ goto no_optimize;
+ n = ext2fs_bitcount(actual_buf, nbytes);
+ group_free = fs->super->s_clusters_per_group - n;
+ free_blocks += group_free;
+ i += EXT2FS_C2B(fs, fs->super->s_clusters_per_group - 1);
+ goto next_group;
+ no_optimize:
+
+ if (redo_flag)
+ bitmap = actual;
+ else
+ bitmap = ext2fs_fast_test_block_bitmap2(fs->block_map, i);
+
+ if (!actual == !bitmap)
+ goto do_counts;
+
+ if (!actual && bitmap) {
+ /*
+ * Block not used, but marked in use in the bitmap.
+ */
+ problem = PR_5_BLOCK_UNUSED;
+ } else {
+ /*
+ * Block used, but not marked in use in the bitmap.
+ */
+ problem = PR_5_BLOCK_USED;
+
+ if (ext2fs_bg_flags_test(fs, group,
+ EXT2_BG_BLOCK_UNINIT)) {
+ struct problem_context pctx2;
+ pctx2.blk = i;
+ pctx2.group = group;
+ if (fix_problem(ctx, PR_5_BLOCK_UNINIT,
+ &pctx2))
+ ext2fs_bg_flags_clear(fs, group,
+ EXT2_BG_BLOCK_UNINIT);
+ }
+ }
+ if (pctx.blk == NO_BLK) {
+ pctx.blk = pctx.blk2 = i;
+ save_problem = problem;
+ } else {
+ if ((problem == save_problem) &&
+ (pctx.blk2 == i - EXT2FS_CLUSTER_RATIO(fs)))
+ pctx.blk2 += EXT2FS_CLUSTER_RATIO(fs);
+ else {
+ print_bitmap_problem(ctx, save_problem, &pctx);
+ pctx.blk = pctx.blk2 = i;
+ save_problem = problem;
+ }
+ }
+ ctx->flags |= E2F_FLAG_PROG_SUPPRESS;
+ had_problem++;
+
+ /*
+ * If there a problem we should turn off the discard so we
+ * do not compromise the filesystem.
+ */
+ ctx->options &= ~E2F_OPT_DISCARD;
+
+ do_counts:
+ if (!bitmap) {
+ group_free++;
+ free_blocks++;
+ if (first_free > i)
+ first_free = i;
+ } else if (i > first_free) {
+ e2fsck_discard_blocks(ctx, first_free,
+ (i - first_free));
+ first_free = ext2fs_blocks_count(fs->super);
+ }
+ blocks ++;
+ if ((blocks == fs->super->s_clusters_per_group) ||
+ (EXT2FS_B2C(fs, i) ==
+ EXT2FS_B2C(fs, ext2fs_blocks_count(fs->super)-1))) {
+ /*
+ * If the last block of this group is free, then we can
+ * discard it as well.
+ */
+ if (!bitmap && i >= first_free)
+ e2fsck_discard_blocks(ctx, first_free,
+ (i - first_free) + 1);
+ next_group:
+ first_free = ext2fs_blocks_count(fs->super);
+
+ free_array[group] = group_free;
+ group ++;
+ blocks = 0;
+ group_free = 0;
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 5, group,
+ fs->group_desc_count*2))
+ goto errout;
+ }
+ }
+ if (pctx.blk != NO_BLK)
+ print_bitmap_problem(ctx, save_problem, &pctx);
+ if (had_problem)
+ fixit = end_problem_latch(ctx, PR_LATCH_BBITMAP);
+ else
+ fixit = -1;
+ ctx->flags &= ~E2F_FLAG_PROG_SUPPRESS;
+
+ if (fixit == 1) {
+ ext2fs_free_block_bitmap(fs->block_map);
+ retval = ext2fs_copy_bitmap(ctx->block_found_map,
+ &fs->block_map);
+ if (retval) {
+ clear_problem_context(&pctx);
+ fix_problem(ctx, PR_5_COPY_BBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto errout;
+ }
+ ext2fs_set_bitmap_padding(fs->block_map);
+ ext2fs_mark_bb_dirty(fs);
+
+ /* Redo the counts */
+ blocks = 0; free_blocks = 0; group_free = 0; group = 0;
+ memset(free_array, 0, fs->group_desc_count * sizeof(int));
+ redo_flag++;
+ goto redo_counts;
+ } else if (fixit == 0)
+ ext2fs_unmark_valid(fs);
+
+ for (g = 0; g < fs->group_desc_count; g++) {
+ if (free_array[g] != ext2fs_bg_free_blocks_count(fs, g)) {
+ pctx.group = g;
+ pctx.blk = ext2fs_bg_free_blocks_count(fs, g);
+ pctx.blk2 = free_array[g];
+
+ if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT_GROUP,
+ &pctx)) {
+ ext2fs_bg_free_blocks_count_set(fs, g, free_array[g]);
+ ext2fs_mark_super_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ }
+ }
+ free_blocks = EXT2FS_C2B(fs, free_blocks);
+ if (free_blocks != ext2fs_free_blocks_count(fs->super)) {
+ pctx.group = 0;
+ pctx.blk = ext2fs_free_blocks_count(fs->super);
+ pctx.blk2 = free_blocks;
+
+ if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT, &pctx)) {
+ ext2fs_free_blocks_count_set(fs->super, free_blocks);
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+errout:
+ ext2fs_free_mem(&free_array);
+ ext2fs_free_mem(&actual_buf);
+ ext2fs_free_mem(&bitmap_buf);
+}
+
+static void check_inode_bitmaps(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t i;
+ unsigned int free_inodes = 0;
+ int group_free = 0;
+ int dirs_count = 0;
+ dgrp_t group = 0;
+ unsigned int inodes = 0;
+ ext2_ino_t *free_array;
+ ext2_ino_t *dir_array;
+ int actual, bitmap;
+ errcode_t retval;
+ struct problem_context pctx;
+ problem_t problem, save_problem;
+ int fixit, had_problem;
+ int csum_flag;
+ int skip_group = 0;
+ int redo_flag = 0;
+ ext2_ino_t first_free = fs->super->s_inodes_per_group + 1;
+
+ clear_problem_context(&pctx);
+ free_array = (ext2_ino_t *) e2fsck_allocate_memory(ctx,
+ fs->group_desc_count * sizeof(ext2_ino_t), "free inode count array");
+
+ dir_array = (ext2_ino_t *) e2fsck_allocate_memory(ctx,
+ fs->group_desc_count * sizeof(ext2_ino_t), "directory count array");
+
+ if ((1 < ext2fs_get_inode_bitmap_start2(ctx->inode_used_map)) ||
+ (fs->super->s_inodes_count >
+ ext2fs_get_inode_bitmap_end2(ctx->inode_used_map))) {
+ pctx.num = 3;
+ pctx.blk = 1;
+ pctx.blk2 = fs->super->s_inodes_count;
+ pctx.ino = ext2fs_get_inode_bitmap_start2(ctx->inode_used_map);
+ pctx.ino2 = ext2fs_get_inode_bitmap_end2(ctx->inode_used_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ goto errout;
+ }
+ if ((1 < ext2fs_get_inode_bitmap_start2(fs->inode_map)) ||
+ (fs->super->s_inodes_count >
+ ext2fs_get_inode_bitmap_end2(fs->inode_map))) {
+ pctx.num = 4;
+ pctx.blk = 1;
+ pctx.blk2 = fs->super->s_inodes_count;
+ pctx.ino = ext2fs_get_inode_bitmap_start2(fs->inode_map);
+ pctx.ino2 = ext2fs_get_inode_bitmap_end2(fs->inode_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ goto errout;
+ }
+
+ csum_flag = ext2fs_has_group_desc_csum(fs);
+redo_counts:
+ had_problem = 0;
+ save_problem = 0;
+ pctx.ino = pctx.ino2 = 0;
+ if (csum_flag &&
+ (ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)))
+ skip_group++;
+
+ /* Protect loop from wrap-around if inodes_count is maxed */
+ for (i = 1; i <= fs->super->s_inodes_count && i > 0; i++) {
+ bitmap = 0;
+ if (skip_group &&
+ i % fs->super->s_inodes_per_group == 1) {
+ /*
+ * Current inode is the first inode
+ * in the current block group.
+ */
+ if (ext2fs_test_inode_bitmap_range(
+ ctx->inode_used_map, i,
+ fs->super->s_inodes_per_group)) {
+ /*
+ * When the compared inodes in inodes bitmap
+ * are 0, count the free inode,
+ * skip the current block group.
+ */
+ first_free = 1;
+ inodes = fs->super->s_inodes_per_group - 1;
+ group_free = inodes;
+ free_inodes += inodes;
+ i += inodes;
+ skip_group = 0;
+ goto do_counts;
+ }
+ }
+
+ actual = ext2fs_fast_test_inode_bitmap2(ctx->inode_used_map, i);
+ if (redo_flag)
+ bitmap = actual;
+ else if (!skip_group)
+ bitmap = ext2fs_fast_test_inode_bitmap2(fs->inode_map, i);
+ if (!actual == !bitmap)
+ goto do_counts;
+
+ if (!actual && bitmap) {
+ /*
+ * Inode wasn't used, but marked in bitmap
+ */
+ problem = PR_5_INODE_UNUSED;
+ } else /* if (actual && !bitmap) */ {
+ /*
+ * Inode used, but not in bitmap
+ */
+ problem = PR_5_INODE_USED;
+
+ /* We should never hit this, because it means that
+ * inodes were marked in use that weren't noticed
+ * in pass1 or pass 2. It is easier to fix the problem
+ * than to kill e2fsck and leave the user stuck. */
+ if (skip_group) {
+ struct problem_context pctx2;
+ pctx2.blk = i;
+ pctx2.group = group;
+ if (fix_problem(ctx, PR_5_INODE_UNINIT,&pctx2)){
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT);
+ skip_group = 0;
+ }
+ }
+ }
+ if (pctx.ino == 0) {
+ pctx.ino = pctx.ino2 = i;
+ save_problem = problem;
+ } else {
+ if ((problem == save_problem) &&
+ (pctx.ino2 == i-1))
+ pctx.ino2++;
+ else {
+ print_bitmap_problem(ctx, save_problem, &pctx);
+ pctx.ino = pctx.ino2 = i;
+ save_problem = problem;
+ }
+ }
+ ctx->flags |= E2F_FLAG_PROG_SUPPRESS;
+ had_problem++;
+ /*
+ * If there a problem we should turn off the discard so we
+ * do not compromise the filesystem.
+ */
+ ctx->options &= ~E2F_OPT_DISCARD;
+
+do_counts:
+ inodes++;
+ if (bitmap) {
+ if (ext2fs_test_inode_bitmap2(ctx->inode_dir_map, i))
+ dirs_count++;
+ if (inodes > first_free) {
+ e2fsck_discard_inodes(ctx, group, first_free,
+ inodes - first_free);
+ first_free = fs->super->s_inodes_per_group + 1;
+ }
+ } else {
+ group_free++;
+ free_inodes++;
+ if (first_free > inodes)
+ first_free = inodes;
+ }
+
+ if ((inodes == fs->super->s_inodes_per_group) ||
+ (i == fs->super->s_inodes_count)) {
+ /*
+ * If the last inode is free, we can discard it as well.
+ */
+ if (!bitmap && inodes >= first_free)
+ e2fsck_discard_inodes(ctx, group, first_free,
+ inodes - first_free + 1);
+ /*
+ * If discard zeroes data and the group inode table
+ * was not zeroed yet, set itable as zeroed
+ */
+ if ((ctx->options & E2F_OPT_DISCARD) &&
+ io_channel_discard_zeroes_data(fs->io) &&
+ !(ext2fs_bg_flags_test(fs, group,
+ EXT2_BG_INODE_ZEROED))) {
+ ext2fs_bg_flags_set(fs, group,
+ EXT2_BG_INODE_ZEROED);
+ ext2fs_group_desc_csum_set(fs, group);
+ }
+
+ first_free = fs->super->s_inodes_per_group + 1;
+ free_array[group] = group_free;
+ dir_array[group] = dirs_count;
+ group ++;
+ inodes = 0;
+ skip_group = 0;
+ group_free = 0;
+ dirs_count = 0;
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 5,
+ group + fs->group_desc_count,
+ fs->group_desc_count*2))
+ goto errout;
+ if (csum_flag &&
+ (i != fs->super->s_inodes_count) &&
+ (ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)
+ ))
+ skip_group++;
+ }
+ }
+ if (pctx.ino)
+ print_bitmap_problem(ctx, save_problem, &pctx);
+
+ if (had_problem)
+ fixit = end_problem_latch(ctx, PR_LATCH_IBITMAP);
+ else
+ fixit = -1;
+ ctx->flags &= ~E2F_FLAG_PROG_SUPPRESS;
+
+ if (fixit == 1) {
+ ext2fs_free_inode_bitmap(fs->inode_map);
+ retval = ext2fs_copy_bitmap(ctx->inode_used_map,
+ &fs->inode_map);
+ if (retval) {
+ clear_problem_context(&pctx);
+ fix_problem(ctx, PR_5_COPY_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ goto errout;
+ }
+ ext2fs_set_bitmap_padding(fs->inode_map);
+ ext2fs_mark_ib_dirty(fs);
+
+ /* redo counts */
+ inodes = 0; free_inodes = 0; group_free = 0;
+ dirs_count = 0; group = 0;
+ memset(free_array, 0, fs->group_desc_count * sizeof(int));
+ memset(dir_array, 0, fs->group_desc_count * sizeof(int));
+ redo_flag++;
+ goto redo_counts;
+ } else if (fixit == 0)
+ ext2fs_unmark_valid(fs);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (free_array[i] != ext2fs_bg_free_inodes_count(fs, i)) {
+ pctx.group = i;
+ pctx.ino = ext2fs_bg_free_inodes_count(fs, i);
+ pctx.ino2 = free_array[i];
+ if (fix_problem(ctx, PR_5_FREE_INODE_COUNT_GROUP,
+ &pctx)) {
+ ext2fs_bg_free_inodes_count_set(fs, i, free_array[i]);
+ ext2fs_mark_super_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ }
+ if (dir_array[i] != ext2fs_bg_used_dirs_count(fs, i)) {
+ pctx.group = i;
+ pctx.ino = ext2fs_bg_used_dirs_count(fs, i);
+ pctx.ino2 = dir_array[i];
+
+ if (fix_problem(ctx, PR_5_FREE_DIR_COUNT_GROUP,
+ &pctx)) {
+ ext2fs_bg_used_dirs_count_set(fs, i, dir_array[i]);
+ ext2fs_mark_super_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ }
+ }
+ if (free_inodes != fs->super->s_free_inodes_count) {
+ pctx.group = -1;
+ pctx.ino = fs->super->s_free_inodes_count;
+ pctx.ino2 = free_inodes;
+
+ if (fix_problem(ctx, PR_5_FREE_INODE_COUNT, &pctx)) {
+ fs->super->s_free_inodes_count = free_inodes;
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+errout:
+ ext2fs_free_mem(&free_array);
+ ext2fs_free_mem(&dir_array);
+}
+
+static void check_inode_end(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t end, save_inodes_count, i;
+ struct problem_context pctx;
+ int asked = 0;
+
+ clear_problem_context(&pctx);
+
+ end = (__u64)EXT2_INODES_PER_GROUP(fs->super) * fs->group_desc_count;
+ pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map, end,
+ &save_inodes_count);
+ if (pctx.errcode) {
+ pctx.num = 1;
+ fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+ if (save_inodes_count == end)
+ goto check_intra_bg_tail;
+
+ /* protect loop from wrap-around if end is maxed */
+ for (i = save_inodes_count + 1; i <= end && i > save_inodes_count; i++) {
+ if (!ext2fs_test_inode_bitmap(fs->inode_map, i)) {
+ asked = 1;
+ if (fix_problem(ctx, PR_5_INODE_BMAP_PADDING, &pctx)) {
+ for (; i <= end; i++)
+ ext2fs_mark_inode_bitmap(fs->inode_map,
+ i);
+ ext2fs_mark_ib_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ break;
+ }
+ }
+
+ pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map,
+ save_inodes_count, 0);
+ if (pctx.errcode) {
+ pctx.num = 2;
+ fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+ /*
+ * If the number of inodes per block group != blocksize, we
+ * can also have a potential problem with the tail bits in
+ * each individual inode bitmap block. If there is a problem,
+ * it would have been noticed when the bitmap was loaded. And
+ * fixing this is easy; all we need to do force the bitmap to
+ * be written back to disk.
+ */
+check_intra_bg_tail:
+ if (!asked && fs->flags & EXT2_FLAG_IBITMAP_TAIL_PROBLEM) {
+ if (fix_problem(ctx, PR_5_INODE_BMAP_PADDING, &pctx))
+ ext2fs_mark_ib_dirty(fs);
+ else
+ ext2fs_unmark_valid(fs);
+ }
+}
+
+static void check_block_end(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t end, save_blocks_count, i;
+ struct problem_context pctx;
+ int asked = 0;
+
+ clear_problem_context(&pctx);
+
+ end = ext2fs_get_block_bitmap_start2(fs->block_map) +
+ EXT2_GROUPS_TO_CLUSTERS(fs->super, fs->group_desc_count) - 1;
+ pctx.errcode = ext2fs_fudge_block_bitmap_end2(fs->block_map, end,
+ &save_blocks_count);
+ if (pctx.errcode) {
+ pctx.num = 3;
+ fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+ if (save_blocks_count == end)
+ goto check_intra_bg_tail;
+
+ /* Protect loop from wrap-around if end is maxed */
+ for (i = save_blocks_count + 1; i <= end && i > save_blocks_count; i++) {
+ if (!ext2fs_test_block_bitmap2(fs->block_map,
+ EXT2FS_C2B(fs, i))) {
+ asked = 1;
+ if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx)) {
+ for (; i <= end; i++)
+ ext2fs_mark_block_bitmap2(fs->block_map,
+ EXT2FS_C2B(fs, i));
+ ext2fs_mark_bb_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ break;
+ }
+ }
+
+ pctx.errcode = ext2fs_fudge_block_bitmap_end2(fs->block_map,
+ save_blocks_count, 0);
+ if (pctx.errcode) {
+ pctx.num = 4;
+ fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+ /*
+ * If the number of blocks per block group != blocksize, we
+ * can also have a potential problem with the tail bits in
+ * each individual block bitmap block. If there is a problem,
+ * it would have been noticed when the bitmap was loaded. And
+ * fixing this is easy; all we need to do force the bitmap to
+ * be written back to disk.
+ */
+check_intra_bg_tail:
+ if (!asked && fs->flags & EXT2_FLAG_BBITMAP_TAIL_PROBLEM) {
+ if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx))
+ ext2fs_mark_bb_dirty(fs);
+ else
+ ext2fs_unmark_valid(fs);
+ }
+}
diff --git a/e2fsck/problem.c b/e2fsck/problem.c
new file mode 100644
index 0000000..6ad6fb8
--- /dev/null
+++ b/e2fsck/problem.c
@@ -0,0 +1,2756 @@
+/*
+ * problem.c --- report filesystem problems to the user
+ *
+ * Copyright 1996, 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <termios.h>
+
+#include "e2fsck.h"
+
+#include "problem.h"
+#include "problemP.h"
+
+#define PROMPT_NONE 0
+#define PROMPT_FIX 1
+#define PROMPT_CLEAR 2
+#define PROMPT_RELOCATE 3
+#define PROMPT_ALLOCATE 4
+#define PROMPT_EXPAND 5
+#define PROMPT_CONNECT 6
+#define PROMPT_CREATE 7
+#define PROMPT_SALVAGE 8
+#define PROMPT_TRUNCATE 9
+#define PROMPT_CLEAR_INODE 10
+#define PROMPT_ABORT 11
+#define PROMPT_SPLIT 12
+#define PROMPT_CONTINUE 13
+#define PROMPT_CLONE 14
+#define PROMPT_DELETE 15
+#define PROMPT_SUPPRESS 16
+#define PROMPT_UNLINK 17
+#define PROMPT_CLEAR_HTREE 18
+#define PROMPT_RECREATE 19
+#define PROMPT_OPTIMIZE 20
+#define PROMPT_CLEAR_FLAG 21
+#define PROMPT_NULL 22
+
+/*
+ * These are the prompts which are used to ask the user if they want
+ * to fix a problem.
+ */
+static const char *prompt[] = {
+ N_("(no prompt)"), /* PROMPT_NONE = 0 */
+ N_("Fix"), /* PROMPT_FIX = 1 */
+ N_("Clear"), /* PROMPT_CLEAR = 2 */
+ N_("Relocate"), /* PROMPT_RELOCATE = 3 */
+ N_("Allocate"), /* PROMPT_CREATE = 4 */
+ N_("Expand"), /* PROMPT_EXPAND = 5 */
+ N_("Connect to /lost+found"), /* PROMPT_CONNECT = 6 */
+ N_("Create"), /* PROMPT_CREATE = 7 */
+ N_("Salvage"), /* PROMPT_SALVAGE = 8 */
+ N_("Truncate"), /* PROMPT_TRUNCATE = 9 */
+ N_("Clear inode"), /* PROMPT_CLEAR_INODE = 10 */
+ N_("Abort"), /* PROMPT_ABORT = 11 */
+ N_("Split"), /* PROMPT_SPLIT = 12 */
+ N_("Continue"), /* PROMPT_CONTINUE = 13 */
+ N_("Clone multiply-claimed blocks"), /* PROMPT_CLONE = 14 */
+ N_("Delete file"), /* PROMPT_DELETE = 15 */
+ N_("Suppress messages"), /* PROMPT_SUPPRESS = 16 */
+ N_("Unlink"), /* PROMPT_UNLINK = 17 */
+ N_("Clear HTree index"), /* PROMPT_CLEAR_HTREE = 18 */
+ N_("Recreate"), /* PROMPT_RECREATE = 19 */
+ N_("Optimize"), /* PROMPT_OPTIMIZE = 20 */
+ N_("Clear flag"), /* PROMPT_CLEAR_FLAG = 21 */
+ "", /* PROMPT_NULL = 22 */
+};
+
+/*
+ * These messages are printed when we are preen mode and we will be
+ * automatically fixing the problem.
+ */
+static const char *preen_msg[] = {
+ N_("(NONE)"), /* 0 */
+ N_("FIXED"), /* 1 */
+ N_("CLEARED"), /* 2 */
+ N_("RELOCATED"), /* 3 */
+ N_("ALLOCATED"), /* 4 */
+ N_("EXPANDED"), /* 5 */
+ N_("RECONNECTED"), /* 6 */
+ N_("CREATED"), /* 7 */
+ N_("SALVAGED"), /* 8 */
+ N_("TRUNCATED"), /* 9 */
+ N_("INODE CLEARED"), /* 10 */
+ N_("ABORTED"), /* 11 */
+ N_("SPLIT"), /* 12 */
+ N_("CONTINUING"), /* 13 */
+ N_("MULTIPLY-CLAIMED BLOCKS CLONED"), /* 14 */
+ N_("FILE DELETED"), /* 15 */
+ N_("SUPPRESSED"), /* 16 */
+ N_("UNLINKED"), /* 17 */
+ N_("HTREE INDEX CLEARED"),/* 18 */
+ N_("WILL RECREATE"), /* 19 */
+ N_("WILL OPTIMIZE"), /* 20 */
+ N_("FLAG CLEARED"), /* 21 */
+ "", /* 22 */
+};
+
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
+static struct e2fsck_problem problem_table[] = {
+
+ /* Pre-Pass 1 errors */
+
+ /* Block bitmap for group is not in group */
+ { PR_0_BB_NOT_GROUP, N_("@b @B for @g %g is not in @g. (@b %b)\n"),
+ PROMPT_RELOCATE, PR_LATCH_RELOC, 0, 0, 0 },
+
+ /* Inode bitmap for group is not in group */
+ { PR_0_IB_NOT_GROUP, N_("@i @B for @g %g is not in @g. (@b %b)\n"),
+ PROMPT_RELOCATE, PR_LATCH_RELOC, 0, 0, 0 },
+
+ /* Inode table for group is not in group. (block nnnn) */
+ { PR_0_ITABLE_NOT_GROUP,
+ N_("@i table for @g %g is not in @g. (@b %b)\n"
+ "WARNING: SEVERE DATA LOSS POSSIBLE.\n"),
+ PROMPT_RELOCATE, PR_LATCH_RELOC, 0, 0, 0 },
+
+ /* Superblock corrupt */
+ { PR_0_SB_CORRUPT,
+ N_("\nThe @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+ "@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+ "@f (and not swap or ufs or something else), then the @S\n"
+ "is corrupt, and you might try running e2fsck with an alternate @S:\n"
+ " e2fsck -b 8193 <@v>\n"
+ " or\n"
+ " e2fsck -b 32768 <@v>\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Filesystem size is wrong */
+ { PR_0_FS_SIZE_WRONG,
+ N_("The @f size (according to the @S) is %b @bs\n"
+ "The physical size of the @v is %c @bs\n"
+ "Either the @S or the partition table is likely to be corrupt!\n"),
+ PROMPT_ABORT, 0, 0, 0, 0 },
+
+ /* Fragments not supported */
+ { PR_0_NO_FRAGMENTS,
+ N_("@S @b_size = %b, fragsize = %c.\n"
+ "This version of e2fsck does not support fragment sizes different\n"
+ "from the @b size.\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Superblock blocks_per_group = bbbb, should have been cccc */
+ { PR_0_BLOCKS_PER_GROUP,
+ N_("@S @bs_per_group = %b, should have been %c\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_0_SB_CORRUPT, 0, 0 },
+
+ /* Superblock first_data_block = bbbb, should have been cccc */
+ { PR_0_FIRST_DATA_BLOCK,
+ N_("@S first_data_@b = %b, should have been %c\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_0_SB_CORRUPT, 0, 0 },
+
+ /* Filesystem did not have a UUID; generating one */
+ { PR_0_ADD_UUID,
+ N_("@f did not have a UUID; generating one.\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Relocate hint */
+ { PR_0_RELOCATE_HINT,
+ /* xgettext:no-c-format */
+ N_("Note: if several inode or block bitmap blocks or part\n"
+ "of the inode table require relocation, you may wish to try\n"
+ "running e2fsck with the '-b %S' option first. The problem\n"
+ "may lie only with the primary block group descriptors, and\n"
+ "the backup block group descriptors may be OK.\n\n"),
+ PROMPT_NONE, PR_PREEN_OK | PR_NOCOLLATE, 0, 0, 0 },
+
+ /* Miscellaneous superblock corruption */
+ { PR_0_MISC_CORRUPT_SUPER,
+ N_("Corruption found in @S. (%s = %N).\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_0_SB_CORRUPT, 0, 0 },
+
+ /* Error determining physical device size of filesystem */
+ { PR_0_GETSIZE_ERROR,
+ /* xgettext:no-c-format */
+ N_("Error determining size of the physical @v: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Inode count in superblock is incorrect */
+ { PR_0_INODE_COUNT_WRONG,
+ N_("@i count in @S is %i, @s %j.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ { PR_0_HURD_CLEAR_FILETYPE,
+ N_("The Hurd does not support the filetype feature.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Superblock has an invalid journal (inode inum) */
+ { PR_0_JOURNAL_BAD_INODE,
+ /* xgettext:no-c-format */
+ N_("@S has an @n @j (@i %i).\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* External journal has multiple filesystem users (unsupported) */
+ { PR_0_JOURNAL_UNSUPP_MULTIFS,
+ N_("External @j has multiple @f users (unsupported).\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Can't find external journal */
+ { PR_0_CANT_FIND_JOURNAL,
+ N_("Can't find external @j\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* External journal has bad superblock */
+ { PR_0_EXT_JOURNAL_BAD_SUPER,
+ N_("External @j has bad @S\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Superblock has a bad journal UUID */
+ { PR_0_JOURNAL_BAD_UUID,
+ N_("External @j does not support this @f\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Filesystem journal superblock is an unknown type */
+ { PR_0_JOURNAL_UNSUPP_SUPER,
+ N_("@f @j @S is unknown type %N (unsupported).\n"
+ "It is likely that your copy of e2fsck is old and/or doesn't "
+ "support this @j format.\n"
+ "It is also possible the @j @S is corrupt.\n"),
+ PROMPT_ABORT, PR_NO_OK | PR_AFTER_CODE, PR_0_JOURNAL_BAD_SUPER,
+ 0, 0 },
+
+ /* Journal superblock is corrupt */
+ { PR_0_JOURNAL_BAD_SUPER,
+ N_("@j @S is corrupt.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Superblock has_journal flag is clear but has a journal */
+ { PR_0_JOURNAL_HAS_JOURNAL,
+ N_("@S has_@j flag is clear, but a @j is present.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Superblock needs_recovery flag is set but no journal is present */
+ { PR_0_JOURNAL_RECOVER_SET,
+ N_("@S needs_recovery flag is set, but no @j is present.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Superblock needs_recovery flag is set, but journal has data */
+ { PR_0_JOURNAL_RECOVERY_CLEAR,
+ N_("@S needs_recovery flag is clear, but @j has data.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Ask if we should clear the journal */
+ { PR_0_JOURNAL_RESET_JOURNAL,
+ N_("Clear @j"),
+ PROMPT_NULL, PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Filesystem revision is 0, but feature flags are set */
+ { PR_0_FS_REV_LEVEL,
+ N_("@f has feature flag(s) set, but is a revision 0 @f. "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Clearing orphan inode */
+ { PR_0_ORPHAN_CLEAR_INODE,
+ N_("%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Illegal block found in orphaned inode */
+ { PR_0_ORPHAN_ILLEGAL_BLOCK_NUM,
+ N_("@I %B (%b) found in @o @i %i.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Already cleared block found in orphaned inode */
+ { PR_0_ORPHAN_ALREADY_CLEARED_BLOCK,
+ N_("Already cleared %B (%b) found in @o @i %i.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Illegal orphan inode in superblock */
+ { PR_0_ORPHAN_ILLEGAL_HEAD_INODE,
+ /* xgettext:no-c-format */
+ N_("@I @o @i %i in @S.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Illegal inode in orphaned inode list */
+ { PR_0_ORPHAN_ILLEGAL_INODE,
+ /* xgettext:no-c-format */
+ N_("@I @i %i in @o @i list.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Journal superblock has an unknown read-only feature flag set */
+ { PR_0_JOURNAL_UNSUPP_ROCOMPAT,
+ N_("@j @S has an unknown read-only feature flag set.\n"),
+ PROMPT_ABORT, 0, 0, 0, 0 },
+
+ /* Journal superblock has an unknown incompatible feature flag set */
+ { PR_0_JOURNAL_UNSUPP_INCOMPAT,
+ N_("@j @S has an unknown incompatible feature flag set.\n"),
+ PROMPT_ABORT, 0, 0, 0, 0 },
+
+ /* Journal version not supported by this e2fsck */
+ { PR_0_JOURNAL_UNSUPP_VERSION,
+ N_("@j version not supported by this e2fsck.\n"),
+ PROMPT_ABORT, 0, 0, 0, 0 },
+
+ /* Moving journal from /file to hidden inode */
+ { PR_0_MOVE_JOURNAL,
+ /* xgettext:no-c-format */
+ N_("Moving @j from /%s to hidden @i.\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error moving journal to hidden file */
+ { PR_0_ERR_MOVE_JOURNAL,
+ /* xgettext:no-c-format */
+ N_("Error moving @j: %m\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Found invalid V2 journal superblock fields */
+ { PR_0_CLEAR_V2_JOURNAL,
+ N_("Found @n V2 @j @S fields (from V1 @j).\n"
+ "Clearing fields beyond the V1 @j @S...\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Ask if we should run the journal anyway */
+ { PR_0_JOURNAL_RUN,
+ N_("Run @j anyway"),
+ PROMPT_NULL, 0, 0, 0, 0 },
+
+ /* Run the journal by default */
+ { PR_0_JOURNAL_RUN_DEFAULT,
+ N_("Recovery flag not set in backup @S, so running @j anyway.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Backing up journal inode block information */
+ { PR_0_BACKUP_JNL,
+ N_("Backing up @j @i @b information.\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Filesystem does not have resize_inode enabled, but
+ * s_reserved_gdt_blocks is nnnn; should be zero */
+ { PR_0_NONZERO_RESERVED_GDT_BLOCKS,
+ N_("@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+ "is %N; @s zero. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Resize_inode not enabled, but the resize inode is non-zero */
+ { PR_0_CLEAR_RESIZE_INODE,
+ N_("Resize_@i not enabled, but the resize @i is non-zero. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Resize inode not valid */
+ { PR_0_RESIZE_INODE_INVALID,
+ N_("Resize @i not valid. "),
+ PROMPT_RECREATE, 0, 0, 0, 0 },
+
+ /* Superblock last mount time is in the future */
+ { PR_0_FUTURE_SB_LAST_MOUNT,
+ N_("@S last mount time (%t,\n\tnow = %T) is in the future.\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Superblock last write time is in the future */
+ { PR_0_FUTURE_SB_LAST_WRITE,
+ N_("@S last write time (%t,\n\tnow = %T) is in the future.\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Superblock hint for external superblock should be xxxx */
+ { PR_0_EXTERNAL_JOURNAL_HINT,
+ /* xgettext:no-c-format */
+ N_("@S hint for external superblock @s %X. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Adding dirhash hint to filesystem */
+ { PR_0_DIRHASH_HINT,
+ N_("Adding dirhash hint to @f.\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* group descriptor N checksum is invalid, should be yyyy. */
+ { PR_0_GDT_CSUM,
+ N_("@g descriptor %g checksum is %04x, should be %04y. "),
+ PROMPT_FIX, PR_PREEN_OK | PR_LATCH_BG_CHECKSUM, 0, 0, 0 },
+
+ /* group descriptor N marked uninitialized without feature set. */
+ { PR_0_GDT_UNINIT,
+ /* xgettext:no-c-format */
+ N_("@g descriptor %g marked uninitialized without feature set.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Group descriptor N has invalid unused inodes count. */
+ { PR_0_GDT_ITABLE_UNUSED,
+ N_("@g descriptor %g has invalid unused inodes count %b. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Last group block bitmap uninitialized. */
+ { PR_0_BB_UNINIT_LAST,
+ N_("Last @g @b @B uninitialized. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Journal transaction was corrupt, replay was aborted */
+ { PR_0_JNL_TXN_CORRUPT,
+ /* xgettext:no-c-format */
+ N_("Journal transaction %i was corrupt, replay was aborted.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* The test_fs filesystem flag is set (and ext4 is available) */
+ { PR_0_CLEAR_TESTFS_FLAG,
+ N_("The test_fs flag is set (and ext4 is available). "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Last mount time is in the future (fudged) */
+ { PR_0_FUTURE_SB_LAST_MOUNT_FUDGED,
+ N_("@S last mount time is in the future.\n\t(by less than a day, "
+ "probably due to the hardware clock being incorrectly set)\n"),
+ PROMPT_NONE, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Last write time is in the future (fudged) */
+ { PR_0_FUTURE_SB_LAST_WRITE_FUDGED,
+ N_("@S last write time is in the future.\n\t(by less than a day, "
+ "probably due to the hardware clock being incorrectly set)\n"),
+ PROMPT_NONE, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* One or more block group descriptor checksums are invalid (latch) */
+ { PR_0_GDT_CSUM_LATCH,
+ N_("One or more @b @g descriptor checksums are invalid. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Setting free inodes count to right (was wrong) */
+ { PR_0_FREE_INODE_COUNT,
+ N_("Setting free @is count to %j (was %i)\n"),
+ PROMPT_NONE, PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Setting free blocks count to right (was wrong) */
+ { PR_0_FREE_BLOCK_COUNT,
+ N_("Setting free @bs count to %c (was %b)\n"),
+ PROMPT_NONE, PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Making quota inode hidden */
+ { PR_0_HIDE_QUOTA,
+ N_("Hiding %U @q @i %i (%Q).\n"),
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Superblock has invalid MMP block. */
+ { PR_0_MMP_INVALID_BLK,
+ N_("@S has invalid MMP block. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Superblock has invalid MMP magic. */
+ { PR_0_MMP_INVALID_MAGIC,
+ N_("@S has invalid MMP magic. "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Opening file system failed */
+ { PR_0_OPEN_FAILED,
+ /* xgettext:no-c-format */
+ N_("ext2fs_open2: %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Checking group descriptor failed */
+ { PR_0_CHECK_DESC_FAILED,
+ /* xgettext:no-c-format */
+ N_("ext2fs_check_desc: %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Superblock metadata_csum supersedes uninit_bg; both feature
+ * bits cannot be set simultaneously. */
+ { PR_0_META_AND_GDT_CSUM_SET,
+ N_("@S metadata_csum supersedes uninit_bg; both feature "
+ "bits cannot be set simultaneously."),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Superblock MMP block checksum does not match MMP block. */
+ { PR_0_MMP_CSUM_INVALID,
+ N_("@S MMP @b checksum does not match. "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Superblock 64bit filesystem needs extents to access the whole disk */
+ { PR_0_64BIT_WITHOUT_EXTENTS,
+ N_("@S 64bit @f needs extents to access the whole disk. "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* The first_meta_bg is too big */
+ { PR_0_FIRST_META_BG_TOO_BIG,
+ N_("First_meta_bg is too big. (%N, max value %g). "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* External journal superblock checksum does not match superblock */
+ { PR_0_EXT_JOURNAL_SUPER_CSUM_INVALID,
+ N_("External @j @S checksum does not match @S. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Superblock metadata_csum_seed means nothing without metadata_csum */
+ { PR_0_CSUM_SEED_WITHOUT_META_CSUM,
+ N_("@S metadata_csum_seed is not necessary without metadata_csum."),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Error initializing quota context */
+ { PR_0_QUOTA_INIT_CTX,
+ /* xgettext:no-c-format */
+ N_("Error initializing quota context in support library: %m\n"),
+ PROMPT_NULL, PR_FATAL, 0, 0, 0 },
+
+ /* Bad required extra isize in superblock */
+ { PR_0_BAD_MIN_EXTRA_ISIZE,
+ N_("Bad required extra isize in @S (%N). "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Bad desired extra isize in superblock */
+ { PR_0_BAD_WANT_EXTRA_ISIZE,
+ N_("Bad desired extra isize in @S (%N). "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Invalid quota inode number */
+ { PR_0_INVALID_QUOTA_INO,
+ N_("Invalid %U @q @i %i. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Too many inodes in the filesystem */
+ { PR_0_INODE_COUNT_BIG,
+ N_("@S would have too many inodes (%N).\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_0_SB_CORRUPT, 0, 0 },
+
+ /* Meta_bg and resize_inode are not compatible, disable resize_inode*/
+ { PR_0_DISABLE_RESIZE_INODE,
+ N_("Resize_@i and meta_bg features are enabled. Those features are\n"
+ "not compatible. Resize @i should be disabled. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Orphan file contains holes */
+ { PR_0_ORPHAN_FILE_HOLE,
+ N_("Orphan file (@i %i) contains hole at @b %b. Terminating orphan file recovery.\n"),
+ PROMPT_NONE, 0 },
+
+ /* Orphan file block has wrong magic */
+ { PR_0_ORPHAN_FILE_BAD_MAGIC,
+ N_("Orphan file (@i %i) @b %b contains wrong magic. Terminating orphan file recovery.\n"),
+ PROMPT_NONE, 0 },
+
+ /* Orphan file block has wrong checksum */
+ { PR_0_ORPHAN_FILE_BAD_CHECKSUM,
+ N_("Orphan file (@i %i) @b %b contains wrong checksum. Terminating orphan file recovery.\n"),
+ PROMPT_NONE, 0 },
+
+ /* Orphan file size isn't multiple of blocks size */
+ { PR_0_ORPHAN_FILE_WRONG_SIZE,
+ N_("Orphan file (@i %i) size is not multiple of block size. Terminating orphan file recovery.\n"),
+ PROMPT_NONE, 0 },
+
+ /* Pass 1 errors */
+
+ /* Pass 1: Checking inodes, blocks, and sizes */
+ { PR_1_PASS_HEADER,
+ N_("Pass 1: Checking @is, @bs, and sizes\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+ /* Root inode is not a directory */
+ { PR_1_ROOT_NO_DIR, N_("@r is not a @d. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Root inode has dtime set */
+ { PR_1_ROOT_DTIME,
+ N_("@r has dtime set (probably due to old mke2fs). "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Reserved inode has bad mode */
+ { PR_1_RESERVED_BAD_MODE,
+ N_("Reserved @i %i (%Q) has @n mode. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Deleted inode inum has zero dtime */
+ { PR_1_ZERO_DTIME,
+ /* xgettext:no-c-format */
+ N_("@D @i %i has zero dtime. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode inum is in use, but has dtime set */
+ { PR_1_SET_DTIME,
+ /* xgettext:no-c-format */
+ N_("@i %i is in use, but has dtime set. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode inum is a zero-length directory */
+ { PR_1_ZERO_LENGTH_DIR,
+ /* xgettext:no-c-format */
+ N_("@i %i is a @z @d. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Group block bitmap at block conflicts with some other fs block */
+ { PR_1_BB_CONFLICT,
+ N_("@g %g's @b @B at %b @C.\n"),
+ PROMPT_RELOCATE, 0, 0, 0, 0 },
+
+ /* Group inode bitmap at block conflicts with some other fs block */
+ { PR_1_IB_CONFLICT,
+ N_("@g %g's @i @B at %b @C.\n"),
+ PROMPT_RELOCATE, 0, 0, 0, 0 },
+
+ /* Group inode table at block conflicts with some other fs block */
+ { PR_1_ITABLE_CONFLICT,
+ N_("@g %g's @i table at %b @C.\n"),
+ PROMPT_RELOCATE, 0, 0, 0, 0 },
+
+ /* Group block bitmap (block) is bad */
+ { PR_1_BB_BAD_BLOCK,
+ N_("@g %g's @b @B (%b) is bad. "),
+ PROMPT_RELOCATE, 0, 0, 0, 0 },
+
+ /* Group inode bitmap (block) is bad */
+ { PR_1_IB_BAD_BLOCK,
+ N_("@g %g's @i @B (%b) is bad. "),
+ PROMPT_RELOCATE, 0, 0, 0, 0 },
+
+ /* Inode inum, i_size is small, should be larger */
+ { PR_1_BAD_I_SIZE,
+ N_("@i %i, i_size is %Is, @s %N. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode inum, i_blocks is small, should be larger */
+ { PR_1_BAD_I_BLOCKS,
+ N_("@i %i, i_@bs is %Ib, @s %N. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Illegal block number in inode */
+ { PR_1_ILLEGAL_BLOCK_NUM,
+ N_("@I %B (%b) in @i %i. "),
+ PROMPT_CLEAR, PR_LATCH_BLOCK, 0, 0, 0 },
+
+ /* Block number overlaps filesystem metadata in inode */
+ { PR_1_BLOCK_OVERLAPS_METADATA,
+ N_("%B (%b) overlaps @f metadata in @i %i. "),
+ PROMPT_CLEAR, PR_LATCH_BLOCK, 0, 0, 0 },
+
+ /* Inode has illegal blocks (latch question) */
+ { PR_1_INODE_BLOCK_LATCH,
+ /* xgettext:no-c-format */
+ N_("@i %i has illegal @b(s). "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Too many illegal blocks in inode */
+ { PR_1_TOO_MANY_BAD_BLOCKS,
+ /* xgettext:no-c-format */
+ N_("Too many illegal @bs in @i %i.\n"),
+ PROMPT_CLEAR_INODE, PR_NO_OK, 0, 0, 0 },
+
+ /* Illegal block number in bad block inode */
+ { PR_1_BB_ILLEGAL_BLOCK_NUM,
+ N_("@I %B (%b) in bad @b @i. "),
+ PROMPT_CLEAR, PR_LATCH_BBLOCK, 0, 0, 0 },
+
+ /* Bad block inode has illegal blocks (latch question) */
+ { PR_1_INODE_BBLOCK_LATCH,
+ N_("Bad @b @i has illegal @b(s). "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Duplicate or bad blocks in use! */
+ { PR_1_DUP_BLOCKS_PREENSTOP,
+ N_("Duplicate or bad @b in use!\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Bad block number used as bad block inode indirect block */
+ { PR_1_BBINODE_BAD_METABLOCK,
+ N_("Bad @b %b used as bad @b @i indirect @b. "),
+ PROMPT_CLEAR, PR_LATCH_BBLOCK, 0, 0, 0 },
+
+ /* Inconsistency can't be fixed prompt */
+ { PR_1_BBINODE_BAD_METABLOCK_PROMPT,
+ N_("\nThe bad @b @i has probably been corrupted. You probably\n"
+ "should stop now and run ""e2fsck -c"" to scan for bad blocks\n"
+ "in the @f.\n"),
+ PROMPT_CONTINUE, PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Bad primary block */
+ { PR_1_BAD_PRIMARY_BLOCK,
+ N_("\nIf the @b is really bad, the @f can not be fixed.\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_1_BAD_PRIMARY_BLOCK_PROMPT, 0, 0 },
+
+ /* Bad primary block prompt */
+ { PR_1_BAD_PRIMARY_BLOCK_PROMPT,
+ N_("You can remove this @b from the bad @b list and hope\n"
+ "that the @b is really OK. But there are no guarantees.\n\n"),
+ PROMPT_CLEAR, PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* The primary superblock block is on the bad block list */
+ { PR_1_BAD_PRIMARY_SUPERBLOCK,
+ N_("The primary @S (%b) is on the bad @b list.\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_1_BAD_PRIMARY_BLOCK, 0, 0 },
+
+ /* Bad primary block group descriptors */
+ { PR_1_BAD_PRIMARY_GROUP_DESCRIPTOR,
+ N_("Block %b in the primary @g descriptors "
+ "is on the bad @b list\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_1_BAD_PRIMARY_BLOCK, 0, 0 },
+
+ /* Warning: Group number's superblock (block) is bad */
+ { PR_1_BAD_SUPERBLOCK,
+ N_("Warning: Group %g's @S (%b) is bad.\n"),
+ PROMPT_NONE, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Warning: Group number's copy of the group descriptors has a bad
+ * block */
+ { PR_1_BAD_GROUP_DESCRIPTORS,
+ N_("Warning: Group %g's copy of the @g descriptors has a bad "
+ "@b (%b).\n"),
+ PROMPT_NONE, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Block number claimed for no reason in process_bad_blocks */
+ { PR_1_PROGERR_CLAIMED_BLOCK,
+ N_("Programming error? @b #%b claimed for no reason in "
+ "process_bad_@b.\n"),
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Allocating number contiguous block(s) in block group number */
+ { PR_1_RELOC_BLOCK_ALLOCATE,
+ N_("@A %N contiguous @b(s) in @b @g %g for %s: %m\n"),
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Allocating block buffer for relocating process */
+ { PR_1_RELOC_MEMORY_ALLOCATE,
+ /* xgettext:no-c-format */
+ N_("@A @b buffer for relocating %s\n"),
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Relocating group number's information from X to Y */
+ { PR_1_RELOC_FROM_TO,
+ N_("Relocating @g %g's %s from %b to %c...\n"),
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Relocating group number's information to X */
+ { PR_1_RELOC_TO,
+ /* xgettext:no-c-format */
+ N_("Relocating @g %g's %s to %c...\n"), /* xgettext:no-c-format */
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Warning: could not read block number of relocation process */
+ { PR_1_RELOC_READ_ERR,
+ N_("Warning: could not read @b %b of %s: %m\n"),
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Warning: could not write block number of relocation process */
+ { PR_1_RELOC_WRITE_ERR,
+ N_("Warning: could not write @b %b for %s: %m\n"),
+ PROMPT_NONE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Error allocating inode bitmap */
+ { PR_1_ALLOCATE_IBITMAP_ERROR,
+ N_("@A @i @B (%N): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error allocating block bitmap */
+ { PR_1_ALLOCATE_BBITMAP_ERROR,
+ N_("@A @b @B (%N): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error allocating icount link information */
+ { PR_1_ALLOCATE_ICOUNT,
+ /* xgettext:no-c-format */
+ N_("@A icount link information: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error allocating directory block array */
+ { PR_1_ALLOCATE_DBCOUNT,
+ /* xgettext:no-c-format */
+ N_("@A @d @b array: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error while scanning inodes */
+ { PR_1_ISCAN_ERROR,
+ /* xgettext:no-c-format */
+ N_("Error while scanning @is (%i): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error while iterating over blocks in inode */
+ { PR_1_BLOCK_ITERATE,
+ /* xgettext:no-c-format */
+ N_("Error while iterating over @bs in @i %i: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error storing inode count information */
+ { PR_1_ICOUNT_STORE,
+ N_("Error storing @i count information (@i=%i, count=%N): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error storing directory block information */
+ { PR_1_ADD_DBLOCK,
+ N_("Error storing @d @b information "
+ "(@i=%i, @b=%b, num=%N): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error reading inode (for clearing) */
+ { PR_1_READ_INODE,
+ /* xgettext:no-c-format */
+ N_("Error reading @i %i: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Suppress messages prompt */
+ { PR_1_SUPPRESS_MESSAGES, "", PROMPT_SUPPRESS, PR_NO_OK, 0, 0, 0 },
+
+ /* Imagic number has imagic flag set when fs doesn't support it */
+ { PR_1_SET_IMAGIC,
+ /* xgettext:no-c-format */
+ N_("@i %i has imagic flag set. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Immutable flag set on a device or socket inode */
+ { PR_1_SET_IMMUTABLE,
+ /* xgettext:no-c-format */
+ N_("Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+ "or append-only flag set. "),
+ PROMPT_CLEAR, PR_PREEN_OK | PR_PREEN_NO | PR_NO_OK, 0, 0, 0 },
+
+ /* Non-zero size for device, fifo or socket inode */
+ { PR_1_SET_NONZSIZE,
+ /* xgettext:no-c-format */
+ N_("Special (@v/socket/fifo) @i %i has non-zero size. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Filesystem has feature flag(s) set, but is a revision 0 filesystem */
+ { PR_1_FS_REV_LEVEL,
+ N_("@f has feature flag(s) set, but is a revision 0 @f. "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Journal inode is not in use, but contains data */
+ { PR_1_JOURNAL_INODE_NOT_CLEAR,
+ N_("@j @i is not in use, but contains data. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Journal is not a regular file */
+ { PR_1_JOURNAL_BAD_MODE,
+ N_("@j is not regular file. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode that was part of the orphan list */
+ { PR_1_LOW_DTIME,
+ /* xgettext:no-c-format */
+ N_("@i %i was part of the @o @i list. "),
+ PROMPT_FIX, PR_LATCH_LOW_DTIME, 0, 0, 0 },
+
+ /* Inodes that were part of a corrupted orphan linked list found
+ * (latch question) */
+ { PR_1_ORPHAN_LIST_REFUGEES,
+ N_("@is that were part of a corrupted orphan linked list found. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Error allocating refcount structure */
+ { PR_1_ALLOCATE_REFCOUNT,
+ N_("@A refcount structure (%N): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error reading extended attribute block */
+ { PR_1_READ_EA_BLOCK,
+ N_("Error reading @a @b %b for @i %i. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Inode number has a bad extended attribute block */
+ { PR_1_BAD_EA_BLOCK,
+ N_("@i %i has a bad @a @b %b. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Error reading Extended Attribute block while fixing refcount */
+ { PR_1_EXTATTR_READ_ABORT,
+ N_("Error reading @a @b %b (%m). "),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Extended attribute number has reference count incorrect */
+ { PR_1_EXTATTR_REFCOUNT,
+ N_("@a @b %b has reference count %r, @s %N. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Error writing Extended Attribute block while fixing refcount */
+ { PR_1_EXTATTR_WRITE_ABORT,
+ N_("Error writing @a @b %b (%m). "),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Extended attribute block has h_blocks > 1 */
+ { PR_1_EA_MULTI_BLOCK,
+ N_("@a @b %b has h_@bs > 1. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Allocating extended attribute region allocation structure */
+ { PR_1_EA_ALLOC_REGION_ABORT,
+ N_("@A @a region allocation structure. "),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Extended Attribute block number is corrupt (allocation collision) */
+ { PR_1_EA_ALLOC_COLLISION,
+ N_("@a @b %b is corrupt (allocation collision). "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Extended attribute block number is corrupt (invalid name) */
+ { PR_1_EA_BAD_NAME,
+ N_("@a @b %b is corrupt (@n name). "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Extended attribute block number is corrupt (invalid value) */
+ { PR_1_EA_BAD_VALUE,
+ N_("@a @b %b is corrupt (@n value). "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Inode number is too big (latch question) */
+ { PR_1_INODE_TOOBIG,
+ /* xgettext:no-c-format */
+ N_("@i %i is too big. "), PROMPT_TRUNCATE, 0, 0, 0, 0 },
+
+ /* Problem causes directory to be too big */
+ { PR_1_TOOBIG_DIR,
+ N_("%B (%b) causes @d to be too big. "),
+ PROMPT_CLEAR, PR_LATCH_TOOBIG, 0, 0, 0 },
+
+ /* Problem causes file to be too big */
+ { PR_1_TOOBIG_REG,
+ N_("%B (%b) causes file to be too big. "),
+ PROMPT_CLEAR, PR_LATCH_TOOBIG, 0, 0, 0 },
+
+ /* Problem causes symlink to be too big */
+ { PR_1_TOOBIG_SYMLINK,
+ N_("%B (%b) causes symlink to be too big. "),
+ PROMPT_CLEAR, PR_LATCH_TOOBIG, 0, 0, 0 },
+
+ /* Inode has INDEX_FL flag set on filesystem without htree support */
+ { PR_1_HTREE_SET,
+ /* xgettext:no-c-format */
+ N_("@i %i has INDEX_FL flag set on @f without htree support.\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode number has INDEX_FL flag set but is on a directory */
+ { PR_1_HTREE_NODIR,
+ /* xgettext:no-c-format */
+ N_("@i %i has INDEX_FL flag set but is not a @d.\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* htree directory has an invalid root node */
+ { PR_1_HTREE_BADROOT,
+ /* xgettext:no-c-format */
+ N_("@h %i has an @n root node.\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Htree directory has an unsupported hash version */
+ { PR_1_HTREE_HASHV,
+ N_("@h %i has an unsupported hash version (%N)\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Htree directory uses an Incompatible htree root node flag */
+ { PR_1_HTREE_INCOMPAT,
+ /* xgettext:no-c-format */
+ N_("@h %i uses an incompatible htree root node flag.\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Htree directory has a tree depth which is too big */
+ { PR_1_HTREE_DEPTH,
+ N_("@h %i has a tree depth (%N) which is too big\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Bad block inode has an indirect block number that conflicts with
+ * filesystem metadata */
+ { PR_1_BB_FS_BLOCK,
+ N_("Bad @b @i has an indirect @b (%b) that conflicts with\n"
+ "@f metadata. "),
+ PROMPT_CLEAR, PR_LATCH_BBLOCK, 0, 0, 0 },
+
+ /* Resize inode (re)creation failed */
+ { PR_1_RESIZE_INODE_CREATE,
+ /* xgettext:no-c-format */
+ N_("Resize @i (re)creation failed: %m."),
+ PROMPT_CONTINUE, 0, 0, 0, 0 },
+
+ /* inode has a extra size i_extra_isize which is invalid */
+ { PR_1_EXTRA_ISIZE,
+ N_("@i %i has a extra size (%IS) which is @n\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Extended attribute in inode has a namelen which is invalid */
+ { PR_1_ATTR_NAME_LEN,
+ N_("@a in @i %i has a namelen (%N) which is @n\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Extended attribute in inode has a value offset which is invalid */
+ { PR_1_ATTR_VALUE_OFFSET,
+ N_("@a in @i %i has a value offset (%N) which is @n\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* extended attribute in inode has a value block which is invalid */
+ { PR_1_ATTR_VALUE_BLOCK,
+ N_("@a in @i %i has a value @b (%N) which is @n (must be 0)\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* extended attribute in inode has a value size which is invalid */
+ { PR_1_ATTR_VALUE_SIZE,
+ N_("@a in @i %i has a value size (%N) which is @n\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* extended attribute in inode has a hash which is invalid */
+ { PR_1_ATTR_HASH,
+ N_("@a in @i %i has a hash (%N) which is @n\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* inode is a type but it looks like it is really a directory */
+ { PR_1_TREAT_AS_DIRECTORY,
+ N_("@i %i is a %It but it looks like it is really a directory.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Error while reading extent tree in inode */
+ { PR_1_READ_EXTENT,
+ /* xgettext:no-c-format */
+ N_("Error while reading over @x tree in @i %i: %m\n"),
+ PROMPT_CLEAR_INODE, 0, 0, 0, 0 },
+
+ /* Failure to iterate extents in inode */
+ { PR_1_EXTENT_ITERATE_FAILURE,
+ N_("Failed to iterate extents in @i %i\n"
+ "\t(op %s, blk %b, lblk %c): %m\n"),
+ PROMPT_CLEAR_INODE, 0, 0, 0, 0 },
+
+ /* Inode has an invalid extent starting block */
+ { PR_1_EXTENT_BAD_START_BLK,
+ N_("@i %i has an @n extent\n\t(logical @b %c, @n physical @b %b, len %N)\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Inode has an invalid extent that ends beyond filesystem */
+ { PR_1_EXTENT_ENDS_BEYOND,
+ N_("@i %i has an @n extent\n\t(logical @b %c, physical @b %b, @n len %N)\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* inode has EXTENTS_FL flag set on filesystem without extents support*/
+ { PR_1_EXTENTS_SET,
+ /* xgettext:no-c-format */
+ N_("@i %i has EXTENTS_FL flag set on @f without extents support.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* inode is in extents format, but superblock is missing EXTENTS feature */
+ { PR_1_EXTENT_FEATURE,
+ /* xgettext:no-c-format */
+ N_("@i %i is in extent format, but @S is missing EXTENTS feature\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* inode missing EXTENTS_FL, but is an extent inode */
+ { PR_1_UNSET_EXTENT_FL,
+ /* xgettext:no-c-format */
+ N_("@i %i missing EXTENT_FL, but is in extents format\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Fast symlink has EXTENTS_FL set */
+ { PR_1_FAST_SYMLINK_EXTENT_FL,
+ /* xgettext:no-c-format */
+ N_("Fast symlink %i has EXTENT_FL set. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Extents are out of order */
+ { PR_1_OUT_OF_ORDER_EXTENTS,
+ N_("@i %i has out of order extents\n\t(@n logical @b %c, physical @b %b, len %N)\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ { PR_1_EXTENT_HEADER_INVALID,
+ N_("@i %i has an invalid extent node (blk %b, lblk %c)\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Failed to convert subcluster block bitmap */
+ { PR_1_CONVERT_SUBCLUSTER,
+ /* xgettext:no-c-format */
+ N_("Error converting subcluster @b @B: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Quota inode is not a regular file */
+ { PR_1_QUOTA_BAD_MODE,
+ N_("@q @i is not a regular file. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Quota inode is not in use, but contains data */
+ { PR_1_QUOTA_INODE_NOT_CLEAR,
+ N_("@q @i is not in use, but contains data. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Quota inode is visible to the user */
+ { PR_1_QUOTA_INODE_NOT_HIDDEN,
+ N_("@q @i is visible to the user. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* The bad block inode looks invalid */
+ { PR_1_INVALID_BAD_INODE,
+ N_("The bad @b @i looks @n. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Extent has zero length extent */
+ { PR_1_EXTENT_LENGTH_ZERO,
+ N_("@i %i has zero length extent\n\t(@n logical @b %c, physical @b %b)\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* inode seems to contain garbage */
+ { PR_1_INODE_IS_GARBAGE,
+ /* xgettext:no-c-format */
+ N_("@i %i seems to contain garbage. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* inode passes checks, but checksum does not match inode */
+ { PR_1_INODE_ONLY_CSUM_INVALID,
+ /* xgettext:no-c-format */
+ N_("@i %i passes checks, but checksum does not match @i. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode extended attribute is corrupt (allocation collision) */
+ { PR_1_INODE_EA_ALLOC_COLLISION,
+ /* xgettext:no-c-format */
+ N_("@i %i @a is corrupt (allocation collision). "),
+ PROMPT_CLEAR, 0, 0, 0, 0},
+
+ /*
+ * Inode extent block passes checks, but checksum does not match
+ * extent
+ */
+ { PR_1_EXTENT_ONLY_CSUM_INVALID,
+ N_("@i %i extent block passes checks, but checksum does not match "
+ "extent\n\t(logical @b %c, physical @b %b, len %N)\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /*
+ * Inode extended attribute block passes checks, but checksum does not
+ * match block.
+ */
+ { PR_1_EA_BLOCK_ONLY_CSUM_INVALID,
+ N_("@i %i @a @b %b passes checks, but checksum does not match @b. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Interior extent node level number of inode doesn't first node down */
+ { PR_1_EXTENT_INDEX_START_INVALID,
+ N_("Interior @x node level %N of @i %i:\n"
+ "Logical start %b does not match logical start %c at next level. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Inode end of extent exceeds allowed value */
+ { PR_1_EXTENT_END_OUT_OF_BOUNDS,
+ N_("@i %i, end of extent exceeds allowed value\n\t(logical @b %c, physical @b %b, len %N)\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Inode has inline data, but superblock is missing INLINE_DATA feature */
+ { PR_1_INLINE_DATA_FEATURE,
+ /* xgettext:no-c-format */
+ N_("@i %i has inline data, but @S is missing INLINE_DATA feature\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* inode has INLINE_DATA_FL flag on filesystem without inline data */
+ { PR_1_INLINE_DATA_SET,
+ /* xgettext:no-c-format */
+ N_("@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /*
+ * Inode block conflicts with critical metadata, skipping block checks
+ */
+ { PR_1_CRITICAL_METADATA_COLLISION,
+ /* xgettext:no-c-format */
+ N_("@i %i block %b conflicts with critical metadata, skipping block checks.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Directory inode block <block> should be at block <otherblock> */
+ { PR_1_COLLAPSE_DBLOCK,
+ N_("@d @i %i @b %b should be at @b %c. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Extents/inlinedata flag set on a device or socket inode */
+ { PR_1_UNINIT_DBLOCK,
+ /* xgettext:no-c-format */
+ N_("@d @i %i has @x marked uninitialized at @b %c. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode logical block (physical block) violates cluster allocation */
+ { PR_1_MISALIGNED_CLUSTER,
+ N_("@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\nWill fix in pass 1B.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Inode has INLINE_DATA_FL flag but extended attribute not found */
+ { PR_1_INLINE_DATA_NO_ATTR,
+ /* xgettext:no-c-format */
+ N_("@i %i has INLINE_DATA_FL flag but @a not found. "),
+ PROMPT_TRUNCATE, 0, 0, 0, 0 },
+
+ /* Special (device/socket/fifo) file (inode num) has extents
+ * or inline-data flag set */
+ { PR_1_SPECIAL_EXTENTS_IDATA,
+ /* xgettext:no-c-format */
+ N_("Special (@v/socket/fifo) file (@i %i) has extents\n"
+ "or inline-data flag set. "),
+ PROMPT_CLEAR, PR_PREEN_OK | PR_PREEN_NO | PR_NO_OK, 0, 0, 0 },
+
+ /* Inode has extent header but inline data flag is set */
+ { PR_1_CLEAR_INLINE_DATA_FOR_EXTENT,
+ /* xgettext:no-c-format */
+ N_("@i %i has @x header but inline data flag is set.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Inode seems to have inline data but extent flag is set */
+ { PR_1_CLEAR_EXTENT_FOR_INLINE_DATA,
+ /* xgettext:no-c-format */
+ N_("@i %i seems to have inline data but @x flag is set.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Inode seems to have block map but inline data and extent flags set */
+ { PR_1_CLEAR_EXTENT_INLINE_DATA_FLAGS,
+ /* xgettext:no-c-format */
+ N_("@i %i seems to have @b map but inline data and @x flags set.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Inode has inline data and extent flags but i_block contains junk */
+ { PR_1_CLEAR_EXTENT_INLINE_DATA_INODE,
+ /* xgettext:no-c-format */
+ N_("@i %i has inline data and @x flags set but i_block contains junk.\n"),
+ PROMPT_CLEAR_INODE, 0, 0, 0, 0 },
+
+ /* Bad block list says the bad block list inode is bad */
+ { PR_1_BADBLOCKS_IN_BADBLOCKS,
+ N_("Bad block list says the bad block list @i is bad. "),
+ PROMPT_CLEAR_INODE, 0, 0, 0, 0 },
+
+ /* Error allocating extent region allocation structure */
+ { PR_1_EXTENT_ALLOC_REGION_ABORT,
+ N_("@A @x region allocation structure. "),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Inode leaf has a duplicate extent mapping */
+ { PR_1_EXTENT_COLLISION,
+ N_("@i %i has a duplicate @x mapping\n\t(logical @b %c, @n physical @b %b, len %N)\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Error allocating memory for encrypted inode list */
+ { PR_1_ALLOCATE_ENCRYPTED_INODE_LIST,
+ N_("@A %N bytes of memory for encrypted @i list\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Inode extent tree could be more shallow */
+ { PR_1_EXTENT_BAD_MAX_DEPTH,
+ N_("@i %i @x tree could be more shallow (%b; could be <= %c)\n"),
+ PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK, 0, 0, 0 },
+
+ /* inode num on bigalloc filesystem cannot be block mapped */
+ { PR_1_NO_BIGALLOC_BLOCKMAP_FILES,
+ /* xgettext:no-c-format */
+ N_("@i %i on bigalloc @f cannot be @b mapped. "),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Inode has corrupt extent header */
+ { PR_1_MISSING_EXTENT_HEADER,
+ /* xgettext:no-c-format */
+ N_("@i %i has corrupt @x header. "),
+ PROMPT_CLEAR_INODE, 0, 0, 0, 0 },
+
+ /* Timestamp(s) on inode beyond 2310-04-04 are likely pre-1970. */
+ { PR_1_EA_TIME_OUT_OF_RANGE,
+ /* xgettext:no-c-format */
+ N_("Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Inode has illegal extended attribute value inode */
+ { PR_1_ATTR_VALUE_EA_INODE,
+ N_("@i %i has @I @a value @i %N.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode has invalid extended attribute. EA inode missing
+ * EA_INODE flag. */
+ { PR_1_ATTR_NO_EA_INODE_FL,
+ N_("@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* EA inode for parent inode missing EA_INODE flag. */
+ { PR_1_ATTR_SET_EA_INODE_FL,
+ N_("EA @i %N for parent @i %i missing EA_INODE flag.\n "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Offer to clear uninitialized flag on an extent */
+ { PR_1_CLEAR_UNINIT_EXTENT,
+ /* xgettext:no-c-format */
+ N_("@i %i has @x marked uninitialized at @b %c (len %N). "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Casefold flag set on a non-directory */
+ { PR_1_CASEFOLD_NONDIR,
+ N_("@i %i has the casefold flag set but is not a directory. "),
+ PROMPT_CLEAR_FLAG, 0, 0, 0, 0 },
+
+ /* Casefold flag set, but file system is missing the casefold feature */
+ { PR_1_CASEFOLD_FEATURE,
+ N_("@d %p has the casefold flag, but the\ncasefold feature is not enabled. "),
+ PROMPT_CLEAR_FLAG, 0, 0, 0, 0 },
+
+ /* Inode has encrypt flag but no encryption extended attribute */
+ { PR_1_MISSING_ENCRYPTION_XATTR,
+ N_("@i %i has encrypt flag but no encryption @a.\n"),
+ PROMPT_CLEAR_FLAG, 0, 0, 0, 0 },
+
+ /* Encrypted inode has corrupt encryption extended attribute */
+ { PR_1_CORRUPT_ENCRYPTION_XATTR,
+ N_("Encrypted @i %i has corrupt encryption @a.\n"),
+ PROMPT_CLEAR_INODE, 0, 0, 0, 0 },
+
+ /* Htree directory should use SipHash but does not */
+ { PR_1_HTREE_NEEDS_SIPHASH,
+ N_("@h %i uses hash version (%N), but should use SipHash (6) \n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Htree directory uses SipHash but should not */
+ { PR_1_HTREE_CANNOT_SIPHASH,
+ N_("@h %i uses SipHash, but should not. "),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Orphan file has bad mode */
+ { PR_1_ORPHAN_FILE_BAD_MODE,
+ N_("Orphan file @i %i is not regular file. "),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* Orphan file inode is not in use, but contains data */
+ { PR_1_ORPHAN_FILE_NOT_CLEAR,
+ N_("Orphan file @i %i is not in use, but contains data. "),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* Pass 1b errors */
+
+ /* Pass 1B: Rescan for duplicate/bad blocks */
+ { PR_1B_PASS_HEADER,
+ N_("\nRunning additional passes to resolve @bs claimed by more than one @i...\n"
+ "Pass 1B: Rescanning for @m @bs\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+ /* Duplicate/bad block(s) header */
+ { PR_1B_DUP_BLOCK_HEADER,
+ /* xgettext:no-c-format */
+ N_("@m @b(s) in @i %i:"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Duplicate/bad block(s) in inode */
+ { PR_1B_DUP_BLOCK,
+ " %b",
+ PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR, 0, 0, 0 },
+
+ /* Duplicate/bad block(s) end */
+ { PR_1B_DUP_BLOCK_END,
+ "\n",
+ PROMPT_NONE, PR_PREEN_NOHDR, 0, 0, 0 },
+
+ /* Error while scanning inodes */
+ { PR_1B_ISCAN_ERROR,
+ /* xgettext:no-c-format */
+ N_("Error while scanning inodes (%i): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error allocating inode bitmap */
+ { PR_1B_ALLOCATE_IBITMAP_ERROR,
+ /* xgettext:no-c-format */
+ N_("@A @i @B (@i_dup_map): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error while iterating over blocks */
+ { PR_1B_BLOCK_ITERATE,
+ /* xgettext:no-c-format */
+ N_("Error while iterating over @bs in @i %i (%s): %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error adjusting EA refcount */
+ { PR_1B_ADJ_EA_REFCOUNT,
+ N_("Error adjusting refcount for @a @b %b (@i %i): %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Duplicate/bad block range in inode */
+ { PR_1B_DUP_RANGE,
+ " %b--%c",
+ PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR, 0, 0, 0 },
+
+ /* Pass 1C: Scan directories for inodes with multiply-claimed blocks. */
+ { PR_1C_PASS_HEADER,
+ N_("Pass 1C: Scanning directories for @is with @m @bs\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+
+ /* Pass 1D: Reconciling multiply-claimed blocks */
+ { PR_1D_PASS_HEADER,
+ N_("Pass 1D: Reconciling @m @bs\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+ /* File has duplicate blocks */
+ { PR_1D_DUP_FILE,
+ N_("File %Q (@i #%i, mod time %IM) \n"
+ " has %r @m @b(s), shared with %N file(s):\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* List of files sharing duplicate blocks */
+ { PR_1D_DUP_FILE_LIST,
+ N_("\t%Q (@i #%i, mod time %IM)\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* File sharing blocks with filesystem metadata */
+ { PR_1D_SHARE_METADATA,
+ N_("\t<@f metadata>\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Report of how many duplicate/bad inodes */
+ { PR_1D_NUM_DUP_INODES,
+ N_("(There are %N @is containing @m @bs.)\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Duplicated blocks already reassigned or cloned. */
+ { PR_1D_DUP_BLOCKS_DEALT,
+ N_("@m @bs already reassigned or cloned.\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Clone duplicate/bad blocks? */
+ { PR_1D_CLONE_QUESTION,
+ "", PROMPT_CLONE, PR_NO_OK, 0, 0, 0 },
+
+ /* Delete file? */
+ { PR_1D_DELETE_QUESTION,
+ "", PROMPT_DELETE, 0, 0, 0, 0 },
+
+ /* Couldn't clone file (error) */
+ { PR_1D_CLONE_ERROR,
+ /* xgettext:no-c-format */
+ N_("Couldn't clone file: %m\n"), PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Pass 1E Extent tree optimization */
+
+ /* Pass 1E: Optimizing extent trees */
+ { PR_1E_PASS_HEADER,
+ N_("Pass 1E: Optimizing @x trees\n"),
+ PROMPT_NONE, PR_HEADER | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Failed to optimize extent tree */
+ { PR_1E_OPTIMIZE_EXT_ERR,
+ /* xgettext:no-c-format */
+ N_("Failed to optimize @x tree %p (%i): %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Optimizing extent trees */
+ { PR_1E_OPTIMIZE_EXT_HEADER,
+ N_("Optimizing @x trees: "),
+ PROMPT_NONE, PR_MSG_ONLY, 0, 0, 0 },
+
+ /* Rebuilding extent tree %d */
+ { PR_1E_OPTIMIZE_EXT,
+ " %i",
+ PROMPT_NONE, PR_LATCH_OPTIMIZE_EXT | PR_PREEN_NOHDR, 0, 0, 0 },
+
+ /* Rebuilding extent tree end */
+ { PR_1E_OPTIMIZE_EXT_END,
+ "\n",
+ PROMPT_NONE, PR_PREEN_NOHDR, 0, 0, 0 },
+
+ /* Internal error: extent tree depth too large */
+ { PR_1E_MAX_EXTENT_TREE_DEPTH,
+ N_("Internal error: max extent tree depth too large (%b; expected=%c).\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Inode extent tree could be shorter */
+ { PR_1E_CAN_COLLAPSE_EXTENT_TREE,
+ N_("@i %i @x tree (at level %b) could be shorter. "),
+ PROMPT_OPTIMIZE, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK | PR_NOT_A_FIX, 0, 0, 0 },
+
+ /* Inode extent tree could be narrower */
+ { PR_1E_CAN_NARROW_EXTENT_TREE,
+ N_("@i %i @x tree (at level %b) could be narrower. "),
+ PROMPT_OPTIMIZE, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK | PR_NOT_A_FIX, 0, 0, 0 },
+
+ /* Pass 2 errors */
+
+ /* Pass 2: Checking directory structure */
+ { PR_2_PASS_HEADER,
+ N_("Pass 2: Checking @d structure\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+ /* Bad inode number for '.' */
+ { PR_2_BAD_INODE_DOT,
+ /* xgettext:no-c-format */
+ N_("@n @i number for '.' in @d @i %i.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Entry 'xxxx' in /a/b/c has bad inode number.*/
+ { PR_2_BAD_INO,
+ N_("@E has @n @i #: %Di.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Entry 'xxxx' in /a/b/c has deleted/unused inode nnnnn.*/
+ { PR_2_UNUSED_INODE,
+ N_("@E has @D/unused @i %Di. "),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Directory entry is link to '.' */
+ { PR_2_LINK_DOT,
+ N_("@E @L to '.' "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Directory entry points to inode now located in a bad block */
+ { PR_2_BB_INODE,
+ N_("@E points to @i (%Di) located in a bad @b.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Directory entry contains a link to a directory */
+ { PR_2_LINK_DIR,
+ N_("@E @L to @d %P (%Di).\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Directory entry contains a link to the root directory */
+ { PR_2_LINK_ROOT,
+ N_("@E @L to the @r.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Directory entry has illegal characters in its name */
+ { PR_2_BAD_NAME,
+ N_("@E has illegal characters in its name.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Missing '.' in directory inode */
+ { PR_2_MISSING_DOT,
+ /* xgettext:no-c-format */
+ N_("Missing '.' in @d @i %i.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Missing '..' in directory inode */
+ { PR_2_MISSING_DOT_DOT,
+ /* xgettext:no-c-format */
+ N_("Missing '..' in @d @i %i.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* First entry in directory inode doesn't contain '.' */
+ { PR_2_1ST_NOT_DOT,
+ N_("First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Second entry in directory inode doesn't contain '..' */
+ { PR_2_2ND_NOT_DOT_DOT,
+ N_("Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* i_faddr should be zero */
+ { PR_2_FADDR_ZERO,
+ N_("i_faddr @F %IF, @s zero.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* i_file_acl should be zero */
+ { PR_2_FILE_ACL_ZERO,
+ N_("i_file_acl @F %If, @s zero.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* i_size_high should be zero */
+ { PR_2_DIR_SIZE_HIGH_ZERO,
+ N_("i_size_high @F %Id, @s zero.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* i_frag should be zero */
+ { PR_2_FRAG_ZERO,
+ N_("i_frag @F %N, @s zero.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* i_fsize should be zero */
+ { PR_2_FSIZE_ZERO,
+ N_("i_fsize @F %N, @s zero.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* inode has bad mode */
+ { PR_2_BAD_MODE,
+ N_("@i %i (%Q) has @n mode (%Im).\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* directory corrupted */
+ { PR_2_DIR_CORRUPTED,
+ N_("@d @i %i, %B, offset %N: @d corrupted\n"),
+ PROMPT_SALVAGE, 0, 0, 0, 0 },
+
+ /* filename too long */
+ { PR_2_FILENAME_LONG,
+ N_("@d @i %i, %B, offset %N: filename too long\n"),
+ PROMPT_TRUNCATE, 0, 0, 0, 0 },
+
+ /* Directory inode has a missing block (hole) */
+ { PR_2_DIRECTORY_HOLE,
+ N_("@d @i %i has an unallocated %B. "),
+ PROMPT_ALLOCATE, 0, 0, 0, 0 },
+
+ /* '.' is not NULL terminated */
+ { PR_2_DOT_NULL_TERM,
+ /* xgettext:no-c-format */
+ N_("'.' @d @e in @d @i %i is not NULL terminated\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* '..' is not NULL terminated */
+ { PR_2_DOT_DOT_NULL_TERM,
+ /* xgettext:no-c-format */
+ N_("'..' @d @e in @d @i %i is not NULL terminated\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Illegal character device inode */
+ { PR_2_BAD_CHAR_DEV,
+ N_("@i %i (%Q) is an @I character @v.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Illegal block device inode */
+ { PR_2_BAD_BLOCK_DEV,
+ N_("@i %i (%Q) is an @I @b @v.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Duplicate '.' entry */
+ { PR_2_DUP_DOT,
+ N_("@E is duplicate '.' @e.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Duplicate '..' entry */
+ { PR_2_DUP_DOT_DOT,
+ N_("@E is duplicate '..' @e.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Internal error: couldn't find dir_info */
+ { PR_2_NO_DIRINFO,
+ /* xgettext:no-c-format */
+ N_("Internal error: couldn't find dir_info for %i.\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Final rec_len is wrong */
+ { PR_2_FINAL_RECLEN,
+ N_("@E has rec_len of %Dr, @s %N.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Error allocating icount structure */
+ { PR_2_ALLOCATE_ICOUNT,
+ /* xgettext:no-c-format */
+ N_("@A icount structure: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error iterating over directory blocks */
+ { PR_2_DBLIST_ITERATE,
+ /* xgettext:no-c-format */
+ N_("Error iterating over @d @bs: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error reading directory block */
+ { PR_2_READ_DIRBLOCK,
+ N_("Error reading @d @b %b (@i %i): %m\n"),
+ PROMPT_CONTINUE, 0, 0, 0, 0 },
+
+ /* Error writing directory block */
+ { PR_2_WRITE_DIRBLOCK,
+ N_("Error writing @d @b %b (@i %i): %m\n"),
+ PROMPT_CONTINUE, 0, 0, 0, 0 },
+
+ /* Error allocating new directory block */
+ { PR_2_ALLOC_DIRBOCK,
+ /* xgettext:no-c-format */
+ N_("@A new @d @b for @i %i (%s): %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error deallocating inode */
+ { PR_2_DEALLOC_INODE,
+ /* xgettext:no-c-format */
+ N_("Error deallocating @i %i: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Directory entry for '.' is big. Split? */
+ { PR_2_SPLIT_DOT,
+ /* xgettext:no-c-format */
+ N_("@d @e for '.' in %p (%i) is big.\n"),
+ PROMPT_SPLIT, PR_NO_OK, 0, 0, 0 },
+
+ /* Illegal FIFO inode */
+ { PR_2_BAD_FIFO,
+ N_("@i %i (%Q) is an @I FIFO.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Illegal socket inode */
+ { PR_2_BAD_SOCKET,
+ N_("@i %i (%Q) is an @I socket.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Directory filetype not set */
+ { PR_2_SET_FILETYPE,
+ N_("Setting filetype for @E to %N.\n"),
+ PROMPT_NONE, PR_PREEN_OK | PR_NO_OK | PR_NO_NOMSG, 0, 0, 0 },
+
+ /* Directory filetype incorrect */
+ { PR_2_BAD_FILETYPE,
+ N_("@E has an incorrect filetype (was %Dt, @s %N).\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Directory filetype set on filesystem */
+ { PR_2_CLEAR_FILETYPE,
+ N_("@E has filetype set.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Directory filename is null */
+ { PR_2_NULL_NAME,
+ N_("@E has a @z name.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Invalid symlink */
+ { PR_2_INVALID_SYMLINK,
+ N_("Symlink %Q (@i #%i) is @n.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* i_file_acl (extended attribute block) is bad */
+ { PR_2_FILE_ACL_BAD,
+ N_("@a @b @F @n (%If).\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Filesystem contains large files, but has no such flag in sb */
+ { PR_2_FEATURE_LARGE_FILES,
+ N_("@f contains large files, but lacks LARGE_FILE flag in @S.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Node in HTREE directory not referenced */
+ { PR_2_HTREE_NOTREF,
+ N_("@p @h %d: %B not referenced\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Node in HTREE directory referenced twice */
+ { PR_2_HTREE_DUPREF,
+ N_("@p @h %d: %B referenced twice\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Node in HTREE directory has bad min hash */
+ { PR_2_HTREE_MIN_HASH,
+ N_("@p @h %d: %B has bad min hash\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Node in HTREE directory has bad max hash */
+ { PR_2_HTREE_MAX_HASH,
+ N_("@p @h %d: %B has bad max hash\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Clear invalid HTREE directory */
+ { PR_2_HTREE_CLEAR,
+ N_("@n @h %d (%q). "), PROMPT_CLEAR_HTREE, 0, 0, 0, 0 },
+
+ /* Filesystem has large directories, but has no such flag in sb */
+ { PR_2_FEATURE_LARGE_DIRS,
+ N_("@f has large directories, but lacks LARGE_DIR flag in @S.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Bad block in htree interior node */
+ { PR_2_HTREE_BADBLK,
+ N_("@p @h %d (%q): bad @b number %b.\n"),
+ PROMPT_CLEAR_HTREE, 0, 0, 0, 0 },
+
+ /* Error adjusting EA refcount */
+ { PR_2_ADJ_EA_REFCOUNT,
+ N_("Error adjusting refcount for @a @b %b (@i %i): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Problem in HTREE directory inode: root node is invalid */
+ { PR_2_HTREE_BAD_ROOT,
+ /* xgettext:no-c-format */
+ N_("@p @h %d: root node is @n\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Invalid HTREE limit */
+ { PR_2_HTREE_BAD_LIMIT,
+ N_("@p @h %d: %B has @n limit (%N)\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Invalid HTREE count */
+ { PR_2_HTREE_BAD_COUNT,
+ N_("@p @h %d: %B has @n count (%N)\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* HTREE interior node has out-of-order hashes in table */
+ { PR_2_HTREE_HASH_ORDER,
+ N_("@p @h %d: %B has an unordered hash table\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Node in HTREE directory has invalid depth */
+ { PR_2_HTREE_BAD_DEPTH,
+ N_("@p @h %d: %B has @n depth (%N)\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Duplicate directory entry found */
+ { PR_2_DUPLICATE_DIRENT,
+ N_("Duplicate @E found. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Non-unique filename found */
+ { PR_2_NON_UNIQUE_FILE, /* xgettext: no-c-format */
+ N_("@E has a non-unique filename.\nRename to %s"),
+ PROMPT_NULL, 0, 0, 0, 0 },
+
+ /* Duplicate directory entry found */
+ { PR_2_REPORT_DUP_DIRENT,
+ N_("Duplicate @e '%Dn' found.\n\tMarking %p (%i) to be rebuilt.\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* i_blocks_hi should be zero */
+ { PR_2_BLOCKS_HI_ZERO,
+ N_("i_blocks_hi @F %N, @s zero.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Unexpected HTREE block */
+ { PR_2_UNEXPECTED_HTREE_BLOCK,
+ N_("Unexpected @b in @h %d (%q).\n"), PROMPT_CLEAR_HTREE, 0,
+ 0, 0, 0 },
+
+ /* Inode found in group where _INODE_UNINIT is set */
+ { PR_2_INOREF_BG_INO_UNINIT,
+ N_("@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Inode found in group unused inodes area */
+ { PR_2_INOREF_IN_UNUSED,
+ N_("@E references @i %Di found in @g %g's unused inodes area.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* i_blocks_hi should be zero */
+ { PR_2_I_FILE_ACL_HI_ZERO,
+ N_("i_file_acl_hi @F %N, @s zero.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK, 0, 0, 0 },
+
+ /* htree root node fails checksum */
+ { PR_2_HTREE_ROOT_CSUM_INVALID,
+ /* xgettext:no-c-format */
+ N_("@p @h %d: root node fails checksum.\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* htree internal node fails checksum */
+ { PR_2_HTREE_NODE_CSUM_INVALID,
+ /* xgettext:no-c-format */
+ N_("@p @h %d: internal node fails checksum.\n"),
+ PROMPT_CLEAR_HTREE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* leaf node has no checksum */
+ { PR_2_LEAF_NODE_MISSING_CSUM,
+ N_("@d @i %i, %B, offset %N: @d has no checksum.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* leaf node passes checks but fails checksum */
+ { PR_2_LEAF_NODE_ONLY_CSUM_INVALID,
+ N_("@d @i %i, %B: @d passes checks but fails checksum.\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* inline directory inode size must be a multiple of 4 */
+ { PR_2_BAD_INLINE_DIR_SIZE,
+ N_("Inline @d @i %i size (%N) must be a multiple of 4.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* fixing size of inline directory inode failed */
+ { PR_2_FIX_INLINE_DIR_FAILED,
+ /* xgettext:no-c-format */
+ N_("Fixing size of inline @d @i %i failed.\n"),
+ PROMPT_TRUNCATE, 0, 0, 0, 0 },
+
+ /* Encrypted directory entry is too short */
+ { PR_2_BAD_ENCRYPTED_NAME,
+ N_("Encrypted @E is too short.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Encrypted directory contains unencrypted file */
+ { PR_2_UNENCRYPTED_FILE,
+ N_("Encrypted @E references unencrypted @i %Di.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Encrypted directory contains file with different encryption policy */
+ { PR_2_INCONSISTENT_ENCRYPTION_POLICY,
+ N_("Encrypted @E references @i %Di, which has a different encryption policy.\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Casefolded directory entry has illegal characters in its name */
+ { PR_2_BAD_ENCODED_NAME,
+ N_("@E has illegal UTF-8 characters in its name.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Non-unique filename found, but can't rename */
+ { PR_2_NON_UNIQUE_FILE_NO_RENAME,
+ N_("Duplicate filename @E found. "),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+
+ /* Pass 3 errors */
+
+ /* Pass 3: Checking directory connectivity */
+ { PR_3_PASS_HEADER,
+ N_("Pass 3: Checking @d connectivity\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+ /* Root inode not allocated */
+ { PR_3_NO_ROOT_INODE,
+ N_("@r not allocated. "),
+ PROMPT_ALLOCATE, 0, 0, 0, 0 },
+
+ /* No room in lost+found */
+ { PR_3_EXPAND_LF_DIR,
+ N_("No room in @l @d. "),
+ PROMPT_EXPAND, 0, 0, 0, 0 },
+
+ /* Unconnected directory inode */
+ { PR_3_UNCONNECTED_DIR,
+ /* xgettext:no-c-format */
+ N_("Unconnected @d @i %i (was in %q)\n"),
+ PROMPT_CONNECT, 0, 0, 0, 0 },
+
+ /* /lost+found not found */
+ { PR_3_NO_LF_DIR,
+ N_("/@l not found. "),
+ PROMPT_CREATE, PR_PREEN_OK, 0, 0, 0 },
+
+ /* .. entry is incorrect */
+ { PR_3_BAD_DOT_DOT,
+ N_("'..' in %Q (%i) is %P (%j), @s %q (%d).\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Bad or non-existent /lost+found. Cannot reconnect */
+ { PR_3_NO_LPF,
+ /* xgettext:no-c-format */
+ N_("Bad or non-existent /@l. Cannot reconnect.\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Could not expand /lost+found */
+ { PR_3_CANT_EXPAND_LPF,
+ /* xgettext:no-c-format */
+ N_("Could not expand /@l: %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Could not reconnect inode */
+ { PR_3_CANT_RECONNECT,
+ /* xgettext:no-c-format */
+ N_("Could not reconnect %i: %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error while trying to find /lost+found */
+ { PR_3_ERR_FIND_LPF,
+ /* xgettext:no-c-format */
+ N_("Error while trying to find /@l: %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error in ext2fs_new_block while creating /lost+found */
+ { PR_3_ERR_LPF_NEW_BLOCK,
+ /* xgettext:no-c-format */
+ N_("ext2fs_new_@b: %m while trying to create /@l @d\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error in ext2fs_new_inode while creating /lost+found */
+ { PR_3_ERR_LPF_NEW_INODE,
+ /* xgettext:no-c-format */
+ N_("ext2fs_new_@i: %m while trying to create /@l @d\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error in ext2fs_new_dir_block while creating /lost+found */
+ { PR_3_ERR_LPF_NEW_DIR_BLOCK,
+ /* xgettext:no-c-format */
+ N_("ext2fs_new_dir_@b: %m while creating new @d @b\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error while writing directory block for /lost+found */
+ { PR_3_ERR_LPF_WRITE_BLOCK,
+ /* xgettext:no-c-format */
+ N_("ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error while adjusting inode count */
+ { PR_3_ADJUST_INODE,
+ /* xgettext:no-c-format */
+ N_("Error while adjusting @i count on @i %i\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Couldn't fix parent directory -- error */
+ { PR_3_FIX_PARENT_ERR,
+ /* xgettext:no-c-format */
+ N_("Couldn't fix parent of @i %i: %m\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Couldn't fix parent directory -- couldn't find it */
+ { PR_3_FIX_PARENT_NOFIND,
+ /* xgettext:no-c-format */
+ N_("Couldn't fix parent of @i %i: Couldn't find parent @d @e\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error allocating inode bitmap */
+ { PR_3_ALLOCATE_IBITMAP_ERROR,
+ N_("@A @i @B (%N): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error creating root directory */
+ { PR_3_CREATE_ROOT_ERROR,
+ /* xgettext:no-c-format */
+ N_("Error creating root @d (%s): %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error creating lost and found directory */
+ { PR_3_CREATE_LPF_ERROR,
+ /* xgettext:no-c-format */
+ N_("Error creating /@l @d (%s): %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Root inode is not directory; aborting */
+ { PR_3_ROOT_NOT_DIR_ABORT,
+ N_("@r is not a @d; aborting.\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Cannot proceed without a root inode. */
+ { PR_3_NO_ROOT_INODE_ABORT,
+ N_("Cannot proceed without a @r.\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Internal error: couldn't find dir_info */
+ { PR_3_NO_DIRINFO,
+ N_("Internal error: couldn't find dir_info for %i.\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Lost+found not a directory */
+ { PR_3_LPF_NOTDIR,
+ /* xgettext:no-c-format */
+ N_("/@l is not a @d (ino=%i)\n"),
+ PROMPT_UNLINK, 0, 0, 0, 0 },
+
+ /* Lost+found has inline data */
+ { PR_3_LPF_INLINE_DATA,
+ N_("/@l has inline data\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Cannot allocate /lost+found. */
+ { PR_3_LPF_NO_SPACE,
+ N_("Cannot allocate space for /@l.\nPlace lost files in root directory instead"),
+ PROMPT_NULL, 0, 0, 0, 0 },
+
+ /* Delete some files and re-run e2fsck. */
+ { PR_3_NO_SPACE_TO_RECOVER,
+ N_("Insufficient space to recover lost files!\nMove data off the @f and re-run e2fsck.\n\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Lost+found is encrypted */
+ { PR_3_LPF_ENCRYPTED,
+ N_("/@l is encrypted\n"),
+ PROMPT_CLEAR, 0, 0, 0, 0 },
+
+ /* Recursively looped directory inode */
+ { PR_3_LOOPED_DIR,
+ /* xgettext:no-c-format */
+ N_("Recursively looped @d @i %i (%p)\n"),
+ PROMPT_CONNECT, 0, 0, 0, 0 },
+
+ /* Pass 3A Directory Optimization */
+
+ /* Pass 3A: Optimizing directories */
+ { PR_3A_PASS_HEADER,
+ N_("Pass 3A: Optimizing directories\n"),
+ PROMPT_NONE, PR_HEADER | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Error iterating over directories */
+ { PR_3A_OPTIMIZE_ITER,
+ /* xgettext:no-c-format */
+ N_("Failed to create dirs_to_hash iterator: %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Error rehash directory */
+ { PR_3A_OPTIMIZE_DIR_ERR,
+ N_("Failed to optimize directory %q (%d): %m\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ /* Rehashing dir header */
+ { PR_3A_OPTIMIZE_DIR_HEADER,
+ N_("Optimizing directories: "),
+ PROMPT_NONE, PR_MSG_ONLY, 0, 0, 0 },
+
+ /* Rehashing directory %d */
+ { PR_3A_OPTIMIZE_DIR,
+ " %d",
+ PROMPT_NONE, PR_LATCH_OPTIMIZE_DIR | PR_PREEN_NOHDR, 0, 0, 0 },
+
+ /* Rehashing dir end */
+ { PR_3A_OPTIMIZE_DIR_END,
+ "\n",
+ PROMPT_NONE, PR_PREEN_NOHDR, 0, 0, 0 },
+
+ /* Pass 4 errors */
+
+ /* Pass 4: Checking reference counts */
+ { PR_4_PASS_HEADER,
+ N_("Pass 4: Checking reference counts\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+ /* Unattached zero-length inode */
+ { PR_4_ZERO_LEN_INODE,
+ /* xgettext:no-c-format */
+ N_("@u @z @i %i. "),
+ PROMPT_CLEAR, PR_PREEN_OK|PR_NO_OK, 0, 0, 0 },
+
+ /* Unattached inode */
+ { PR_4_UNATTACHED_INODE,
+ /* xgettext:no-c-format */
+ N_("@u @i %i\n"),
+ PROMPT_CONNECT, 0, 0, 0, 0 },
+
+ /* Inode ref count wrong */
+ { PR_4_BAD_REF_COUNT,
+ N_("@i %i ref count is %Il, @s %N. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ { PR_4_INCONSISTENT_COUNT,
+ N_("WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+ "\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+ "@i_link_info[%i] is %N, @i.i_links_count is %Il. "
+ "They @s the same!\n"),
+ PROMPT_NONE, 0, 0, 0, 0 },
+
+ { PR_4_EA_INODE_REF_COUNT,
+ N_("@a @i %i ref count is %N, @s %n. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* directory exceeds max links, but no DIR_NLINK feature in superblock*/
+ { PR_4_DIR_NLINK_FEATURE,
+ N_("@d exceeds max links, but no DIR_NLINK feature in @S.\n"),
+ PROMPT_FIX, 0, 0, 0, 0 },
+
+ /* Directory inode ref count set to overflow but could be exact value */
+ { PR_4_DIR_OVERFLOW_REF_COUNT,
+ N_("@d @i %i ref count set to overflow but could be exact value %N. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Pass 5 errors */
+
+ /* Pass 5: Checking group summary information */
+ { PR_5_PASS_HEADER,
+ N_("Pass 5: Checking @g summary information\n"),
+ PROMPT_NONE, PR_HEADER, 0, 0, 0 },
+
+ /* Padding at end of inode bitmap is not set. */
+ { PR_5_INODE_BMAP_PADDING,
+ N_("Padding at end of @i @B is not set. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Padding at end of block bitmap is not set. */
+ { PR_5_BLOCK_BMAP_PADDING,
+ N_("Padding at end of @b @B is not set. "),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Block bitmap differences header */
+ { PR_5_BLOCK_BITMAP_HEADER,
+ N_("@b @B differences: "),
+ PROMPT_NONE, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Block not used, but marked in bitmap */
+ { PR_5_BLOCK_UNUSED,
+ " -%b",
+ PROMPT_NONE, PR_LATCH_BBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Block used, but not marked used in bitmap */
+ { PR_5_BLOCK_USED,
+ " +%b",
+ PROMPT_NONE, PR_LATCH_BBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Block bitmap differences end */
+ { PR_5_BLOCK_BITMAP_END,
+ "\n",
+ PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Inode bitmap differences header */
+ { PR_5_INODE_BITMAP_HEADER,
+ N_("@i @B differences: "),
+ PROMPT_NONE, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Inode not used, but marked in bitmap */
+ { PR_5_INODE_UNUSED,
+ " -%i",
+ PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Inode used, but not marked used in bitmap */
+ { PR_5_INODE_USED,
+ " +%i",
+ PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Inode bitmap differences end */
+ { PR_5_INODE_BITMAP_END,
+ "\n",
+ PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Free inodes count for group wrong */
+ { PR_5_FREE_INODE_COUNT_GROUP,
+ N_("Free @is count wrong for @g #%g (%i, counted=%j).\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Directories count for group wrong */
+ { PR_5_FREE_DIR_COUNT_GROUP,
+ N_("Directories count wrong for @g #%g (%i, counted=%j).\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Free inodes count wrong */
+ { PR_5_FREE_INODE_COUNT,
+ N_("Free @is count wrong (%i, counted=%j).\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Free blocks count for group wrong */
+ { PR_5_FREE_BLOCK_COUNT_GROUP,
+ N_("Free @bs count wrong for @g #%g (%b, counted=%c).\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Free blocks count wrong */
+ { PR_5_FREE_BLOCK_COUNT,
+ N_("Free @bs count wrong (%b, counted=%c).\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK | PR_PREEN_NOMSG, 0, 0, 0 },
+
+ /* Programming error: bitmap endpoints don't match */
+ { PR_5_BMAP_ENDPOINTS,
+ N_("PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't "
+ "match calculated @B endpoints (%i, %j)\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Internal error: fudging end of bitmap */
+ { PR_5_FUDGE_BITMAP_ERROR,
+ N_("Internal error: fudging end of bitmap (%N)\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error copying in replacement inode bitmap */
+ { PR_5_COPY_IBITMAP_ERROR,
+ /* xgettext:no-c-format */
+ N_("Error copying in replacement @i @B: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Error copying in replacement block bitmap */
+ { PR_5_COPY_BBITMAP_ERROR,
+ /* xgettext:no-c-format */
+ N_("Error copying in replacement @b @B: %m\n"),
+ PROMPT_NONE, PR_FATAL, 0, 0, 0 },
+
+ /* Block range not used, but marked in bitmap */
+ { PR_5_BLOCK_RANGE_UNUSED,
+ " -(%b--%c)",
+ PROMPT_NONE, PR_LATCH_BBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Block range used, but not marked used in bitmap */
+ { PR_5_BLOCK_RANGE_USED,
+ " +(%b--%c)",
+ PROMPT_NONE, PR_LATCH_BBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Inode range not used, but marked in bitmap */
+ { PR_5_INODE_RANGE_UNUSED,
+ " -(%i--%j)",
+ PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Inode range used, but not marked used in bitmap */
+ { PR_5_INODE_RANGE_USED,
+ " +(%i--%j)",
+ PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG,
+ 0, 0, 0 },
+
+ /* Group N block(s) in use but group is marked BLOCK_UNINIT */
+ { PR_5_BLOCK_UNINIT,
+ /* xgettext:no-c-format */
+ N_("@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Group N inode(s) in use but group is marked INODE_UNINIT */
+ { PR_5_INODE_UNINIT,
+ /* xgettext:no-c-format */
+ N_("@g %g @i(s) in use but @g is marked INODE_UNINIT\n"),
+ PROMPT_FIX, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Group N inode bitmap does not match checksum */
+ { PR_5_INODE_BITMAP_CSUM_INVALID,
+ /* xgettext:no-c-format */
+ N_("@g %g @i @B does not match checksum.\n"),
+ PROMPT_FIX, PR_LATCH_IBITMAP | PR_PREEN_OK, 0, 0, 0 },
+
+ /* Group N block bitmap does not match checksum */
+ { PR_5_BLOCK_BITMAP_CSUM_INVALID,
+ /* xgettext:no-c-format */
+ N_("@g %g @b @B does not match checksum.\n"),
+ PROMPT_FIX, PR_LATCH_BBITMAP | PR_PREEN_OK, 0, 0, 0 },
+
+ /* Post-Pass 5 errors */
+
+ /* Recreate journal if E2F_FLAG_JOURNAL_INODE flag is set */
+ { PR_6_RECREATE_JOURNAL,
+ N_("Recreate @j"),
+ PROMPT_NULL, PR_PREEN_OK | PR_NO_OK, 0, 0, 0 },
+
+ /* Update quota information if it is inconsistent */
+ { PR_6_UPDATE_QUOTAS,
+ N_("Update quota info for quota type %N"),
+ PROMPT_NULL, PR_PREEN_OK, 0, 0, 0 },
+
+ /* Error setting block group checksum info */
+ { PR_6_SET_BG_CHECKSUM,
+ /* xgettext:no-c-format */
+ N_("Error setting @b @g checksum info: %m\n"),
+ PROMPT_NULL, PR_FATAL, 0, 0, 0 },
+
+ /* Error writing file system info */
+ { PR_6_FLUSH_FILESYSTEM,
+ /* xgettext:no-c-format */
+ N_("Error writing file system info: %m\n"),
+ PROMPT_NULL, PR_FATAL, 0, 0, 0 },
+
+ /* Error flushing writes to storage device */
+ { PR_6_IO_FLUSH,
+ /* xgettext:no-c-format */
+ N_("Error flushing writes to storage device: %m\n"),
+ PROMPT_NULL, PR_FATAL, 0, 0, 0 },
+
+ /* Error writing quota information */
+ { PR_6_WRITE_QUOTAS,
+ N_("Error writing quota info for quota type %N: %m\n"),
+ PROMPT_NULL, 0, 0, 0, 0 },
+
+ /* Orphan file without a journal */
+ { PR_6_ORPHAN_FILE_WITHOUT_JOURNAL,
+ N_("@S has orphan file without @j.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* Orphan file truncation failed */
+ { PR_6_ORPHAN_FILE_TRUNC_FAILED,
+ N_("Failed to truncate orphan file.\n"),
+ PROMPT_NONE, 0 },
+
+ /* Failed to initialize orphan file */
+ { PR_6_ORPHAN_FILE_CORRUPTED,
+ N_("Failed to initialize orphan file.\n"),
+ PROMPT_RECREATE, PR_PREEN_OK },
+
+ /* Cannot fix corrupted orphan file with invalid bitmaps */
+ { PR_6_ORPHAN_FILE_BITMAP_INVALID,
+ N_("Cannot fix corrupted orphan file with invalid bitmaps.\n"),
+ PROMPT_NONE, 0 },
+
+ /* Orphan file creation failed */
+ { PR_6_ORPHAN_FILE_CREATE_FAILED,
+ N_("Failed to truncate orphan file (@i %i).\n"),
+ PROMPT_NONE, 0 },
+
+ /* Orphan file block contains data */
+ { PR_6_ORPHAN_BLOCK_DIRTY,
+ N_("Orphan file (@i %i) @b %b is not clean.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* orphan_present set but orphan file is empty */
+ { PR_6_ORPHAN_PRESENT_CLEAN_FILE,
+ N_("Feature orphan_present is set but orphan file is clean.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* orphan_present set but orphan_file is not */
+ { PR_6_ORPHAN_PRESENT_NO_FILE,
+ N_("Feature orphan_present is set but feature orphan_file is not.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* Orphan file size isn't multiple of blocks size */
+ { PR_6_ORPHAN_FILE_WRONG_SIZE,
+ N_("Orphan file (@i %i) size is not multiple of block size.\n"),
+ PROMPT_NONE, 0 },
+
+ /* Orphan file contains holes */
+ { PR_6_ORPHAN_FILE_HOLE,
+ N_("Orphan file (@i %i) contains hole at @b %b.\n"),
+ PROMPT_NONE, 0 },
+
+ { 0 }
+};
+
+/*
+ * This is the latch flags register. It allows several problems to be
+ * "latched" together. This means that the user has to answer but one
+ * question for the set of problems, and all of the associated
+ * problems will be either fixed or not fixed.
+ */
+static struct latch_descr pr_latch_info[] = {
+ { PR_LATCH_BLOCK, PR_1_INODE_BLOCK_LATCH, 0, 0 },
+ { PR_LATCH_BBLOCK, PR_1_INODE_BBLOCK_LATCH, 0, 0 },
+ { PR_LATCH_IBITMAP, PR_5_INODE_BITMAP_HEADER, PR_5_INODE_BITMAP_END, 0 },
+ { PR_LATCH_BBITMAP, PR_5_BLOCK_BITMAP_HEADER, PR_5_BLOCK_BITMAP_END, 0 },
+ { PR_LATCH_RELOC, PR_0_RELOCATE_HINT, 0, 0 },
+ { PR_LATCH_DBLOCK, PR_1B_DUP_BLOCK_HEADER, PR_1B_DUP_BLOCK_END, 0 },
+ { PR_LATCH_LOW_DTIME, PR_1_ORPHAN_LIST_REFUGEES, 0, 0 },
+ { PR_LATCH_TOOBIG, PR_1_INODE_TOOBIG, 0, 0 },
+ { PR_LATCH_OPTIMIZE_DIR, PR_3A_OPTIMIZE_DIR_HEADER, PR_3A_OPTIMIZE_DIR_END, 0 },
+ { PR_LATCH_BG_CHECKSUM, PR_0_GDT_CSUM_LATCH, 0, 0 },
+ { PR_LATCH_OPTIMIZE_EXT, PR_1E_OPTIMIZE_EXT_HEADER, PR_1E_OPTIMIZE_EXT_END, 0 },
+ { -1, 0, 0, 0 },
+};
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+
+static struct e2fsck_problem *find_problem(problem_t code)
+{
+ int i;
+
+ for (i=0; problem_table[i].e2p_code; i++) {
+ if (problem_table[i].e2p_code == code)
+ return &problem_table[i];
+ }
+ return 0;
+}
+
+static struct latch_descr *find_latch(int code)
+{
+ int i;
+
+ for (i=0; pr_latch_info[i].latch_code >= 0; i++) {
+ if (pr_latch_info[i].latch_code == code)
+ return &pr_latch_info[i];
+ }
+ return 0;
+}
+
+int end_problem_latch(e2fsck_t ctx, int mask)
+{
+ struct latch_descr *ldesc;
+ struct problem_context pctx;
+ int answer = -1;
+
+ ldesc = find_latch(mask);
+ if (!ldesc)
+ return answer;
+ if (ldesc->end_message && (ldesc->flags & PRL_LATCHED)) {
+ clear_problem_context(&pctx);
+ answer = fix_problem(ctx, ldesc->end_message, &pctx);
+ }
+ ldesc->flags &= ~(PRL_VARIABLE);
+ return answer;
+}
+
+int set_latch_flags(int mask, int setflags, int clearflags)
+{
+ struct latch_descr *ldesc;
+
+ ldesc = find_latch(mask);
+ if (!ldesc)
+ return -1;
+ ldesc->flags |= setflags;
+ ldesc->flags &= ~clearflags;
+ return 0;
+}
+
+int get_latch_flags(int mask, int *value)
+{
+ struct latch_descr *ldesc;
+
+ ldesc = find_latch(mask);
+ if (!ldesc)
+ return -1;
+ *value = ldesc->flags;
+ return 0;
+}
+
+void clear_problem_context(struct problem_context *ctx)
+{
+ memset(ctx, 0, sizeof(struct problem_context));
+ ctx->blkcount = -1;
+ ctx->group = -1;
+}
+
+static void reconfigure_bool(e2fsck_t ctx, struct e2fsck_problem *ptr,
+ const char *key, int mask, const char *name)
+{
+ int val;
+
+ val = (ptr->flags & mask);
+ profile_get_boolean(ctx->profile, "problems", key, name, val, &val);
+ if (val)
+ ptr->flags |= mask;
+ else
+ ptr->flags &= ~mask;
+}
+
+static void print_problem(FILE *f, problem_t code, int answer, int fixed,
+ struct e2fsck_problem *ptr,
+ struct problem_context *pctx)
+{
+ if (ptr->flags & PR_HEADER) {
+ fprintf(f, "<header code=\"0x%06x\"/>\n", code);
+ return;
+ }
+ fprintf(f, "<problem code=\"0x%06x\" answer=\"%d\"", code, answer);
+ if (pctx->errcode)
+ fprintf(f, " errcode=\"%lu\"", pctx->errcode);
+ if (fixed)
+ fputs(" fixed=\"1\"", f);
+ if (pctx->ino)
+ fprintf(f, " ino=\"%u\"", pctx->ino);
+ if (pctx->ino2)
+ fprintf(f, " ino2=\"%u\"", pctx->ino2);
+ if (pctx->dir)
+ fprintf(f, " dir=\"%u\"", pctx->dir);
+ if (pctx->blk)
+ fprintf(f, " blk=\"%llu\"", (unsigned long long) pctx->blk);
+ if (pctx->blk2)
+ fprintf(f, " blk2=\"%llu\"", (unsigned long long) pctx->blk2);
+ if (pctx->blkcount != (e2_blkcnt_t) -1)
+ fprintf(f, " blkcount=\"%lld\"", (unsigned long long) pctx->blkcount);
+ if (pctx->group != (dgrp_t) -1)
+ fprintf(f, " group=\"%u\"", pctx->group);
+ if (pctx->csum1)
+ fprintf(f, " csum1=\"%u\"", pctx->csum1);
+ if (pctx->csum2)
+ fprintf(f, " csum2=\"%u\"", pctx->csum2);
+ if (pctx->num)
+ fprintf(f, " num=\"%llu\"", (unsigned long long) pctx->num);
+ if (pctx->num2)
+ fprintf(f, " num2=\"%llu\"", (unsigned long long) pctx->num2);
+ if (pctx->str)
+ fprintf(f, " str=\"%s\"", pctx->str);
+ fputs("/>\n", f);
+}
+
+int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
+{
+ ext2_filsys fs = ctx->fs;
+ struct e2fsck_problem *ptr;
+ struct latch_descr *ldesc = 0;
+ const char *message;
+ int def_yn, answer, ans;
+ int print_answer = 0;
+ int suppress = 0;
+ int fixed = 0;
+
+ ptr = find_problem(code);
+ if (!ptr) {
+ printf(_("Unhandled error code (0x%x)!\n"), code);
+ return 0;
+ }
+ if (!(ptr->flags & PR_CONFIG)) {
+ char key[9], *new_desc = NULL;
+
+ sprintf(key, "0x%06x", code);
+
+ profile_get_string(ctx->profile, "problems", key,
+ "description", 0, &new_desc);
+ if (new_desc)
+ ptr->e2p_description = new_desc;
+
+ reconfigure_bool(ctx, ptr, key, PR_PREEN_OK, "preen_ok");
+ reconfigure_bool(ctx, ptr, key, PR_NO_OK, "no_ok");
+ reconfigure_bool(ctx, ptr, key, PR_NO_DEFAULT, "no_default");
+ reconfigure_bool(ctx, ptr, key, PR_MSG_ONLY, "print_message_only");
+ reconfigure_bool(ctx, ptr, key, PR_PREEN_NOMSG, "preen_nomessage");
+ reconfigure_bool(ctx, ptr, key, PR_NOCOLLATE, "no_collate");
+ reconfigure_bool(ctx, ptr, key, PR_NO_NOMSG, "no_nomsg");
+ reconfigure_bool(ctx, ptr, key, PR_PREEN_NOHDR, "preen_noheader");
+ reconfigure_bool(ctx, ptr, key, PR_FORCE_NO, "force_no");
+ reconfigure_bool(ctx, ptr, key, PR_NOT_A_FIX, "not_a_fix");
+ profile_get_integer(ctx->profile, "options",
+ "max_count_problems", 0, 0,
+ &ptr->max_count);
+ profile_get_integer(ctx->profile, "problems", key, "max_count",
+ ptr->max_count, &ptr->max_count);
+
+ ptr->flags |= PR_CONFIG;
+ }
+ def_yn = 1;
+ ptr->count++;
+ if ((ptr->flags & PR_NO_DEFAULT) ||
+ ((ptr->flags & PR_PREEN_NO) && (ctx->options & E2F_OPT_PREEN)) ||
+ (ctx->options & E2F_OPT_NO))
+ def_yn= 0;
+
+ /*
+ * Do special latch processing. This is where we ask the
+ * latch question, if it exists
+ */
+ if (ptr->flags & PR_LATCH_MASK &&
+ (ldesc = find_latch(ptr->flags & PR_LATCH_MASK)) != NULL) {
+ if (ldesc->question && !(ldesc->flags & PRL_LATCHED)) {
+ ans = fix_problem(ctx, ldesc->question, pctx);
+ if (ans == 1)
+ ldesc->flags |= PRL_YES;
+ if (ans == 0)
+ ldesc->flags |= PRL_NO;
+ ldesc->flags |= PRL_LATCHED;
+ }
+ if (ldesc->flags & PRL_SUPPRESS)
+ suppress++;
+ }
+ if ((ptr->flags & PR_PREEN_NOMSG) &&
+ (ctx->options & E2F_OPT_PREEN))
+ suppress++;
+ if ((ptr->flags & PR_NO_NOMSG) &&
+ ((ctx->options & E2F_OPT_NO) || (ptr->flags & PR_FORCE_NO)))
+ suppress++;
+ if (ptr->max_count && (ptr->count > ptr->max_count)) {
+ if (ctx->options & (E2F_OPT_NO | E2F_OPT_YES))
+ suppress++;
+ if ((ctx->options & E2F_OPT_PREEN) &&
+ (ptr->flags & PR_PREEN_OK))
+ suppress++;
+ if (ldesc && (ldesc->flags & (PRL_YES | PRL_NO)))
+ suppress++;
+ if (ptr->count == ptr->max_count + 1) {
+ if (ctx->problem_logf)
+ fprintf(ctx->problem_logf,
+ "<suppressed code=\"0x%06x\"/>\n",
+ code);
+ printf("...problem 0x%06x suppressed\n",
+ ptr->e2p_code);
+ fflush(stdout);
+ }
+ }
+ message = ptr->e2p_description;
+ if (*message)
+ message = _(message);
+ if (!suppress) {
+ if ((ctx->options & E2F_OPT_PREEN) &&
+ !(ptr->flags & PR_PREEN_NOHDR)) {
+ printf("%s: ", ctx->device_name ?
+ ctx->device_name : ctx->filesystem_name);
+ }
+ if (*message)
+ print_e2fsck_message(stdout, ctx, message, pctx, 1, 0);
+ }
+ if (ctx->logf && message)
+ print_e2fsck_message(ctx->logf, ctx, message, pctx, 1, 0);
+ if (!(ptr->flags & PR_PREEN_OK) && (ptr->prompt != PROMPT_NONE))
+ preenhalt(ctx);
+
+ if (ptr->flags & PR_FATAL)
+ fatal_error(ctx, 0);
+
+ if (ptr->prompt == PROMPT_NONE) {
+ if (ptr->flags & PR_NOCOLLATE)
+ answer = -1;
+ else
+ answer = def_yn;
+ } else {
+ if (ptr->flags & PR_FORCE_NO) {
+ answer = 0;
+ print_answer = 1;
+ } else if (ctx->options & E2F_OPT_PREEN) {
+ answer = def_yn;
+ if (!(ptr->flags & PR_PREEN_NOMSG))
+ print_answer = 1;
+ } else if (ldesc && (ldesc->flags & (PRL_YES | PRL_NO))) {
+ print_answer = 1;
+ if (ldesc->flags & PRL_YES)
+ answer = 1;
+ else
+ answer = 0;
+ } else
+ answer = ask(ctx, (ptr->prompt == PROMPT_NULL) ? "" :
+ _(prompt[(int) ptr->prompt]), def_yn);
+ if (!answer && !(ptr->flags & PR_NO_OK))
+ ext2fs_unmark_valid(fs);
+
+ if (print_answer) {
+ if (!suppress)
+ printf("%s.\n", answer ?
+ _(preen_msg[(int) ptr->prompt]) :
+ _("IGNORED"));
+ if (ctx->logf)
+ fprintf(ctx->logf, "%s.\n", answer ?
+ _(preen_msg[(int) ptr->prompt]) :
+ _("IGNORED"));
+ }
+ }
+
+ if ((ptr->prompt == PROMPT_ABORT) && answer)
+ fatal_error(ctx, 0);
+
+ if (ptr->flags & PR_AFTER_CODE)
+ answer = fix_problem(ctx, ptr->second_code, pctx);
+
+ if (answer && (ptr->prompt != PROMPT_NONE) &&
+ !(ptr->flags & PR_NOT_A_FIX)) {
+ fixed = 1;
+ ctx->flags |= E2F_FLAG_PROBLEMS_FIXED;
+ }
+
+ if (ctx->problem_logf)
+ print_problem(ctx->problem_logf, code, answer, fixed,
+ ptr, pctx);
+
+ return answer;
+}
+
+#ifdef UNITTEST
+
+#include <stdlib.h>
+#include <stdio.h>
+
+errcode_t
+profile_get_boolean(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, int def_val, int *ret_boolean)
+{
+ return 0;
+}
+
+errcode_t
+profile_get_integer(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, int def_val, int *ret_int)
+{
+ return 0;
+}
+
+void print_e2fsck_message(FILE *f, e2fsck_t ctx, const char *msg,
+ struct problem_context *pctx, int first,
+ int recurse)
+{
+ return;
+}
+
+void fatal_error(e2fsck_t ctx, const char *msg)
+{
+ return;
+}
+
+void preenhalt(e2fsck_t ctx)
+{
+ return;
+}
+
+errcode_t
+profile_get_string(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, const char *def_val,
+ char **ret_string)
+{
+ return 0;
+}
+
+int ask (e2fsck_t ctx, const char * string, int def)
+{
+ return 0;
+}
+
+int verify_problem_table(e2fsck_t ctx)
+{
+ struct e2fsck_problem *curr, *prev = NULL;
+ int rc = 0;
+
+ for (prev = NULL, curr = problem_table; curr->e2p_code; prev = curr++) {
+ if (prev == NULL)
+ continue;
+
+ if (curr->e2p_code > prev->e2p_code)
+ continue;
+
+ if (curr->e2p_code == prev->e2p_code)
+ fprintf(stderr, "*** Duplicate in problem table:\n");
+ else
+ fprintf(stderr, "*** Unordered problem table:\n");
+
+ fprintf(stderr, "curr code = 0x%08x: %s\n",
+ curr->e2p_code, curr->e2p_description);
+ fprintf(stderr, "*** prev code = 0x%08x: %s\n",
+ prev->e2p_code, prev->e2p_description);
+
+ fprintf(stderr, "*** This is a %sprogramming error in e2fsck\n",
+ (curr->e2p_code == prev->e2p_code) ? "fatal " : "");
+
+ rc = 1;
+ }
+
+ return rc;
+}
+
+int main(int argc, char *argv[])
+{
+ e2fsck_t ctx;
+ int rc;
+
+ memset(&ctx, 0, sizeof(ctx)); /* just to quiet compiler */
+ rc = verify_problem_table(ctx);
+ if (rc == 0)
+ printf("e2fsck problem table verified\n");
+
+ return rc;
+}
+#endif /* UNITTEST */
diff --git a/e2fsck/problem.h b/e2fsck/problem.h
new file mode 100644
index 0000000..b47b0c6
--- /dev/null
+++ b/e2fsck/problem.h
@@ -0,0 +1,1359 @@
+/*
+ * problem.h --- e2fsck problem error codes
+ *
+ * Copyright 1996 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+typedef __u32 problem_t;
+
+struct problem_context {
+ errcode_t errcode;
+ ext2_ino_t ino, ino2, dir;
+ struct ext2_inode *inode;
+ struct ext2_dir_entry *dirent;
+ blk64_t blk, blk2;
+ e2_blkcnt_t blkcount;
+ dgrp_t group;
+ __u32 csum1, csum2;
+ __u64 num, num2;
+ const char *str;
+};
+
+/*
+ * We define a set of "latch groups"; these are problems which are
+ * handled as a set. The user answers once for a particular latch
+ * group.
+ */
+#define PR_LATCH_MASK 0x0ff0 /* Latch mask */
+#define PR_LATCH_BLOCK 0x0010 /* Latch for illegal blocks (pass 1) */
+#define PR_LATCH_BBLOCK 0x0020 /* Latch for bad block inode blocks (pass 1) */
+#define PR_LATCH_IBITMAP 0x0030 /* Latch for pass 5 inode bitmap proc. */
+#define PR_LATCH_BBITMAP 0x0040 /* Latch for pass 5 inode bitmap proc. */
+#define PR_LATCH_RELOC 0x0050 /* Latch for superblock relocate hint */
+#define PR_LATCH_DBLOCK 0x0060 /* Latch for pass 1b dup block headers */
+#define PR_LATCH_LOW_DTIME 0x0070 /* Latch for pass1 orphaned list refugees */
+#define PR_LATCH_TOOBIG 0x0080 /* Latch for file to big errors */
+#define PR_LATCH_OPTIMIZE_DIR 0x0090 /* Latch for optimize directories */
+#define PR_LATCH_BG_CHECKSUM 0x00A0 /* Latch for block group checksums */
+#define PR_LATCH_OPTIMIZE_EXT 0x00B0 /* Latch for rebuild extents */
+
+#define PR_LATCH(x) ((((x) & PR_LATCH_MASK) >> 4) - 1)
+
+/*
+ * Latch group descriptor flags
+ */
+#define PRL_YES 0x0001 /* Answer yes */
+#define PRL_NO 0x0002 /* Answer no */
+#define PRL_LATCHED 0x0004 /* The latch group is latched */
+#define PRL_SUPPRESS 0x0008 /* Suppress all latch group questions */
+
+#define PRL_VARIABLE 0x000f /* All the flags that need to be reset */
+
+/*
+ * Pre-Pass 1 errors
+ */
+
+/* Block bitmap for group gggg is not in group */
+#define PR_0_BB_NOT_GROUP 0x000001
+
+/* Inode bitmap for group gggg is not in group */
+#define PR_0_IB_NOT_GROUP 0x000002
+
+/* Inode table for group gggg is not in group. (block nnnn) */
+#define PR_0_ITABLE_NOT_GROUP 0x000003
+
+/* Superblock corrupt */
+#define PR_0_SB_CORRUPT 0x000004
+
+/* Filesystem size is wrong */
+#define PR_0_FS_SIZE_WRONG 0x000005
+
+/* Fragments not supported */
+#define PR_0_NO_FRAGMENTS 0x000006
+
+/* Superblock blocks_per_group = bbbb, should have been cccc */
+#define PR_0_BLOCKS_PER_GROUP 0x000007
+
+/* Superblock first_data_block = bbbb, should have been cccc */
+#define PR_0_FIRST_DATA_BLOCK 0x000008
+
+/* Filesystem did not have a UUID; generating one */
+#define PR_0_ADD_UUID 0x000009
+
+/* Relocate hint */
+#define PR_0_RELOCATE_HINT 0x00000A
+
+/* Miscellaneous superblock corruption */
+#define PR_0_MISC_CORRUPT_SUPER 0x00000B
+
+/* Error determining physical device size of filesystem */
+#define PR_0_GETSIZE_ERROR 0x00000C
+
+/* Inode count in the superblock incorrect */
+#define PR_0_INODE_COUNT_WRONG 0x00000D
+
+/* The Hurd does not support the filetype feature */
+#define PR_0_HURD_CLEAR_FILETYPE 0x00000E
+
+/* Superblock has an invalid journal (inode inum) */
+#define PR_0_JOURNAL_BAD_INODE 0x00000F
+
+/* External journal has multiple filesystem users (unsupported) */
+#define PR_0_JOURNAL_UNSUPP_MULTIFS 0x000010
+
+/* Can't find external journal */
+#define PR_0_CANT_FIND_JOURNAL 0x000011
+
+/* External journal has bad superblock */
+#define PR_0_EXT_JOURNAL_BAD_SUPER 0x000012
+
+/* Superblock has a bad journal UUID */
+#define PR_0_JOURNAL_BAD_UUID 0x000013
+
+/* Filesystem journal superblock is an unknown type */
+#define PR_0_JOURNAL_UNSUPP_SUPER 0x000014
+
+/* Journal superblock is corrupt */
+#define PR_0_JOURNAL_BAD_SUPER 0x000015
+
+/* Superblock has_journal flag is clear but has a journal */
+#define PR_0_JOURNAL_HAS_JOURNAL 0x000016
+
+/* Superblock needs_recovery flag is set but no journal is present */
+#define PR_0_JOURNAL_RECOVER_SET 0x000017
+
+/* Journal has data, but recovery flag is clear */
+#define PR_0_JOURNAL_RECOVERY_CLEAR 0x000018
+
+/* Ask if we should clear the journal */
+#define PR_0_JOURNAL_RESET_JOURNAL 0x000019
+
+/* Filesystem revision is 0, but feature flags are set */
+#define PR_0_FS_REV_LEVEL 0x00001A
+
+/* Clearing orphan inode */
+#define PR_0_ORPHAN_CLEAR_INODE 0x000020
+
+/* Illegal block found in orphaned inode */
+#define PR_0_ORPHAN_ILLEGAL_BLOCK_NUM 0x000021
+
+/* Already cleared block found in orphaned inode */
+#define PR_0_ORPHAN_ALREADY_CLEARED_BLOCK 0x000022
+
+/* Illegal orphan inode in superblock */
+#define PR_0_ORPHAN_ILLEGAL_HEAD_INODE 0x000023
+
+/* Illegal inode in orphaned inode list */
+#define PR_0_ORPHAN_ILLEGAL_INODE 0x000024
+
+/* Journal has unsupported read-only feature - abort */
+#define PR_0_JOURNAL_UNSUPP_ROCOMPAT 0x000025
+
+/* Journal has unsupported incompatible feature - abort */
+#define PR_0_JOURNAL_UNSUPP_INCOMPAT 0x000026
+
+/* Journal version not supported by this e2fsck */
+#define PR_0_JOURNAL_UNSUPP_VERSION 0x000027
+
+/* Moving journal from /file to hidden inode */
+#define PR_0_MOVE_JOURNAL 0x000028
+
+/* Error moving journal to hidden file */
+#define PR_0_ERR_MOVE_JOURNAL 0x000029
+
+/* Found invalid V2 journal superblock fields */
+#define PR_0_CLEAR_V2_JOURNAL 0x00002A
+
+/* Run journal anyway */
+#define PR_0_JOURNAL_RUN 0x00002B
+
+/* Run journal anyway by default */
+#define PR_0_JOURNAL_RUN_DEFAULT 0x00002C
+
+/* Backing up journal inode block information */
+#define PR_0_BACKUP_JNL 0x00002D
+
+/* Filesystem does not have resize_inode enabled, but
+ * s_reserved_gdt_blocks is nnnn; should be zero */
+#define PR_0_NONZERO_RESERVED_GDT_BLOCKS 0x00002E
+
+/* Resize_inode not enabled, but the resize inode is non-zero */
+#define PR_0_CLEAR_RESIZE_INODE 0x00002F
+
+/* Resize inode not valid */
+#define PR_0_RESIZE_INODE_INVALID 0x000030
+
+/* Superblock last mount time is in the future */
+#define PR_0_FUTURE_SB_LAST_MOUNT 0x000031
+
+/* Superblock last write time is in the future */
+#define PR_0_FUTURE_SB_LAST_WRITE 0x000032
+
+/* Superblock hint for external superblock should be xxxx */
+#define PR_0_EXTERNAL_JOURNAL_HINT 0x000033
+
+/* Adding dirhash hint to filesystem */
+#define PR_0_DIRHASH_HINT 0x000034
+
+/* group descriptor N checksum is invalid, should be yyyy. */
+#define PR_0_GDT_CSUM 0x000035
+
+/* Group descriptor N marked uninitialized without feature set. */
+#define PR_0_GDT_UNINIT 0x000036
+
+/* Block bitmap is not initialised and Inode bitmap is -- NO LONGER USED */
+/* #define PR_0_BB_UNINIT_IB_INIT 0x000037 */
+
+/* Group descriptor N has invalid unused inodes count. */
+#define PR_0_GDT_ITABLE_UNUSED 0x000038
+
+/* Last group block bitmap is uninitialized. */
+#define PR_0_BB_UNINIT_LAST 0x000039
+
+/* Journal transaction was corrupt, replay was aborted */
+#define PR_0_JNL_TXN_CORRUPT 0x00003A
+
+/* The test_fs filesystem flag is set and ext4 is available */
+#define PR_0_CLEAR_TESTFS_FLAG 0x00003B
+
+/* Last mount time is in the future (fudged) */
+#define PR_0_FUTURE_SB_LAST_MOUNT_FUDGED 0x00003C
+
+/* Last write time is in the future (fudged) */
+#define PR_0_FUTURE_SB_LAST_WRITE_FUDGED 0x00003D
+
+/* One or more block group descriptor checksums are invalid (latch) */
+#define PR_0_GDT_CSUM_LATCH 0x00003E
+
+/* Setting free inodes count to right (was wrong) */
+#define PR_0_FREE_INODE_COUNT 0x00003F
+
+/* Setting free blocks count to right (was wrong) */
+#define PR_0_FREE_BLOCK_COUNT 0x000040
+
+/* Making quota inode hidden */
+#define PR_0_HIDE_QUOTA 0x000041
+
+/* Superblock has invalid MMP block. */
+#define PR_0_MMP_INVALID_BLK 0x000042
+
+/* Superblock has invalid MMP magic. */
+#define PR_0_MMP_INVALID_MAGIC 0x000043
+
+/* Opening file system failed */
+#define PR_0_OPEN_FAILED 0x000044
+
+/* Checking group descriptor failed */
+#define PR_0_CHECK_DESC_FAILED 0x000045
+
+/* Superblock metadata_csum supersedes uninit_bg; both feature
+ * bits cannot be set simultaneously. */
+#define PR_0_META_AND_GDT_CSUM_SET 0x000046
+
+/* Superblock MMP block checksum does not match MMP block. */
+#define PR_0_MMP_CSUM_INVALID 0x000047
+
+/* Superblock 64bit filesystem needs extents to access the whole disk */
+#define PR_0_64BIT_WITHOUT_EXTENTS 0x000048
+
+/* The first_meta_bg is too big */
+#define PR_0_FIRST_META_BG_TOO_BIG 0x000049
+
+/* External journal superblock checksum does not match superblock */
+#define PR_0_EXT_JOURNAL_SUPER_CSUM_INVALID 0x00004A
+
+/* metadata_csum_seed means nothing without metadata_csum */
+#define PR_0_CSUM_SEED_WITHOUT_META_CSUM 0x00004B
+
+/* Error initializing quota context */
+#define PR_0_QUOTA_INIT_CTX 0x00004C
+
+/* Bad required extra isize in superblock */
+#define PR_0_BAD_MIN_EXTRA_ISIZE 0x00004D
+
+/* Bad desired extra isize in superblock */
+#define PR_0_BAD_WANT_EXTRA_ISIZE 0x00004E
+
+/* Invalid quota inode number */
+#define PR_0_INVALID_QUOTA_INO 0x00004F
+
+/* Inode count in the superblock incorrect */
+#define PR_0_INODE_COUNT_BIG 0x000050
+
+/* Meta_bg and resize_inode are not compatible, remove resize_inode*/
+#define PR_0_DISABLE_RESIZE_INODE 0x000051
+
+/* Orphan file contains holes */
+#define PR_0_ORPHAN_FILE_HOLE 0x000052
+
+/* Orphan file block has wrong magic */
+#define PR_0_ORPHAN_FILE_BAD_MAGIC 0x000053
+
+/* Orphan file block has wrong checksum */
+#define PR_0_ORPHAN_FILE_BAD_CHECKSUM 0x000054
+
+/* Orphan file size isn't multiple of blocks size */
+#define PR_0_ORPHAN_FILE_WRONG_SIZE 0x000055
+
+/*
+ * Pass 1 errors
+ */
+
+/* Pass 1: Checking inodes, blocks, and sizes */
+#define PR_1_PASS_HEADER 0x010000
+
+/* Root inode is not a directory */
+#define PR_1_ROOT_NO_DIR 0x010001
+
+/* Root inode has dtime set */
+#define PR_1_ROOT_DTIME 0x010002
+
+/* Reserved inode has bad mode */
+#define PR_1_RESERVED_BAD_MODE 0x010003
+
+/* Deleted inode inum has zero dtime */
+#define PR_1_ZERO_DTIME 0x010004
+
+/* Inode inum is in use, but has dtime set */
+#define PR_1_SET_DTIME 0x010005
+
+/* Inode inum is a zero-length directory */
+#define PR_1_ZERO_LENGTH_DIR 0x010006
+
+/* Group block bitmap at block conflicts with some other fs block */
+#define PR_1_BB_CONFLICT 0x010007
+
+/* Group inode bitmap at block conflicts with some other fs block */
+#define PR_1_IB_CONFLICT 0x010008
+
+/* Group inode table at block conflicts with some other fs block */
+#define PR_1_ITABLE_CONFLICT 0x010009
+
+/* Group block bitmap (block) is bad */
+#define PR_1_BB_BAD_BLOCK 0x01000A
+
+/* Group inode bitmap (block) is bad */
+#define PR_1_IB_BAD_BLOCK 0x01000B
+
+/* Inode i_size is small, should be larger */
+#define PR_1_BAD_I_SIZE 0x01000C
+
+/* Inode i_blocks is small, should be larger */
+#define PR_1_BAD_I_BLOCKS 0x01000D
+
+/* Illegal block number in inode */
+#define PR_1_ILLEGAL_BLOCK_NUM 0x01000E
+
+/* Block number overlaps filesystem metadata in inode */
+#define PR_1_BLOCK_OVERLAPS_METADATA 0x01000F
+
+/* Inode has illegal blocks (latch question) */
+#define PR_1_INODE_BLOCK_LATCH 0x010010
+
+/* Too many illegal blocks in inode */
+#define PR_1_TOO_MANY_BAD_BLOCKS 0x010011
+
+/* Illegal block number in bad block inode */
+#define PR_1_BB_ILLEGAL_BLOCK_NUM 0x010012
+
+/* Bad block inode has illegal blocks (latch question) */
+#define PR_1_INODE_BBLOCK_LATCH 0x010013
+
+/* Duplicate or bad blocks in use! */
+#define PR_1_DUP_BLOCKS_PREENSTOP 0x010014
+
+/* Bad block number used as bad block inode indirect block */
+#define PR_1_BBINODE_BAD_METABLOCK 0x010015
+
+/* Inconsistency can't be fixed prompt */
+#define PR_1_BBINODE_BAD_METABLOCK_PROMPT 0x010016
+
+/* Bad primary block */
+#define PR_1_BAD_PRIMARY_BLOCK 0x010017
+
+/* Bad primary block prompt */
+#define PR_1_BAD_PRIMARY_BLOCK_PROMPT 0x010018
+
+/* The primary superblock block is on the bad block list */
+#define PR_1_BAD_PRIMARY_SUPERBLOCK 0x010019
+
+/* Bad primary block group descriptors */
+#define PR_1_BAD_PRIMARY_GROUP_DESCRIPTOR 0x01001A
+
+/* Warning: Group number's superblock (block) is bad */
+#define PR_1_BAD_SUPERBLOCK 0x01001B
+
+/* Warning: Group number's copy of the group descriptors has a bad block */
+#define PR_1_BAD_GROUP_DESCRIPTORS 0x01001C
+
+/* Block number claimed for no reason in process_bad_blocks */
+#define PR_1_PROGERR_CLAIMED_BLOCK 0x01001D
+
+/* Allocating number contiguous block(s) in block group number */
+#define PR_1_RELOC_BLOCK_ALLOCATE 0x01001E
+
+/* Allocating block buffer for relocating process */
+#define PR_1_RELOC_MEMORY_ALLOCATE 0x01001F
+
+/* Relocating group number's information from X to Y */
+#define PR_1_RELOC_FROM_TO 0x010020
+
+/* Relocating group number's information to X */
+#define PR_1_RELOC_TO 0x010021
+
+/* Warning: could not read block number of relocation process */
+#define PR_1_RELOC_READ_ERR 0x010022
+
+/* Warning: could not write block number of relocation process */
+#define PR_1_RELOC_WRITE_ERR 0x010023
+
+/* Error allocating inode bitmap */
+#define PR_1_ALLOCATE_IBITMAP_ERROR 0x010024
+
+/* Error allocating block bitmap */
+#define PR_1_ALLOCATE_BBITMAP_ERROR 0x010025
+
+/* Error allocating icount link information */
+#define PR_1_ALLOCATE_ICOUNT 0x010026
+
+/* Error allocating directory block array */
+#define PR_1_ALLOCATE_DBCOUNT 0x010027
+
+/* Error while scanning inodes */
+#define PR_1_ISCAN_ERROR 0x010028
+
+/* Error while iterating over blocks in inode */
+#define PR_1_BLOCK_ITERATE 0x010029
+
+/* Error storing inode count information */
+#define PR_1_ICOUNT_STORE 0x01002A
+
+/* Error storing directory block information */
+#define PR_1_ADD_DBLOCK 0x01002B
+
+/* Error reading inode (for clearing) */
+#define PR_1_READ_INODE 0x01002C
+
+/* Suppress messages prompt */
+#define PR_1_SUPPRESS_MESSAGES 0x01002D
+
+/* Imagic number has imagic flag set when fs doesn't support it */
+#define PR_1_SET_IMAGIC 0x01002F
+
+/* Immutable flag set on a device or socket inode */
+#define PR_1_SET_IMMUTABLE 0x010030
+
+/* Compression flag set on a non-compressed filesystem -- no longer used*/
+/* #define PR_1_COMPR_SET 0x010031 */
+
+/* Non-zero size on on device, fifo or socket inode */
+#define PR_1_SET_NONZSIZE 0x010032
+
+/* Filesystem has feature flag(s) set, but is a revision 0 filesystem */
+#define PR_1_FS_REV_LEVEL 0x010033
+
+/* Journal inode is not in use, but contains data */
+#define PR_1_JOURNAL_INODE_NOT_CLEAR 0x010034
+
+/* Journal is not a regular file */
+#define PR_1_JOURNAL_BAD_MODE 0x010035
+
+/* Inode that was part of the orphan list */
+#define PR_1_LOW_DTIME 0x010036
+
+/* Inodes that were part of a corrupted orphan linked list found
+ * (latch question) */
+#define PR_1_ORPHAN_LIST_REFUGEES 0x010037
+
+/* Error allocating refcount structure */
+#define PR_1_ALLOCATE_REFCOUNT 0x010038
+
+/* Error reading extended attribute block */
+#define PR_1_READ_EA_BLOCK 0x010039
+
+/* Inode number has a bad extended attribute block */
+#define PR_1_BAD_EA_BLOCK 0x01003A
+
+/* Error reading Extended Attribute block while fixing refcount -- abort */
+#define PR_1_EXTATTR_READ_ABORT 0x01003B
+
+/* Extended attribute number has reference count incorrect, should be */
+#define PR_1_EXTATTR_REFCOUNT 0x01003C
+
+/* Error writing Extended Attribute block while fixing refcount */
+#define PR_1_EXTATTR_WRITE_ABORT 0x01003D
+
+/* Extended attribute block has h_blocks > 1 */
+#define PR_1_EA_MULTI_BLOCK 0x01003E
+
+/* Allocating extended attribute region allocation structure */
+#define PR_1_EA_ALLOC_REGION_ABORT 0x01003F
+
+/* Extended Attribute block number is corrupt (allocation collision) */
+#define PR_1_EA_ALLOC_COLLISION 0x010040
+
+/* Extended attribute block number is corrupt (invalid name) */
+#define PR_1_EA_BAD_NAME 0x010041
+
+/* Extended attribute block number is corrupt (invalid value) */
+#define PR_1_EA_BAD_VALUE 0x010042
+
+/* Inode number is too big (latch question) */
+#define PR_1_INODE_TOOBIG 0x010043
+
+/* Problem causes directory to be too big */
+#define PR_1_TOOBIG_DIR 0x010044
+
+/* Problem causes file to be too big */
+#define PR_1_TOOBIG_REG 0x010045
+
+/* Problem causes symlink to be too big */
+#define PR_1_TOOBIG_SYMLINK 0x010046
+
+/* Inode has INDEX_FL flag set on filesystem without htree support */
+#define PR_1_HTREE_SET 0x010047
+
+/* Inode number has INDEX_FL flag set but is on a directory */
+#define PR_1_HTREE_NODIR 0x010048
+
+/* htree directory has an invalid root node */
+#define PR_1_HTREE_BADROOT 0x010049
+
+/* Htree directory has an unsupported hash version */
+#define PR_1_HTREE_HASHV 0x01004A
+
+/* Htree directory uses an Incompatible htree root node flag */
+#define PR_1_HTREE_INCOMPAT 0x01004B
+
+/* Htree directory has a tree depth which is too big */
+#define PR_1_HTREE_DEPTH 0x01004C
+
+/* Bad block inode has an indirect block number that conflicts with
+ * filesystem metadata */
+#define PR_1_BB_FS_BLOCK 0x01004D
+
+/* Resize inode (re)creation failed */
+#define PR_1_RESIZE_INODE_CREATE 0x01004E
+
+/* inode has a extra size i_extra_isize which is invalid */
+#define PR_1_EXTRA_ISIZE 0x01004F
+
+/* Extended attribute in inode has a namelen which is invalid */
+#define PR_1_ATTR_NAME_LEN 0x010050
+
+/* Extended attribute in inode has a value offset which is invalid */
+#define PR_1_ATTR_VALUE_OFFSET 0x010051
+
+/* extended attribute in inode has a value block which is invalid */
+#define PR_1_ATTR_VALUE_BLOCK 0x010052
+
+/* extended attribute in inode has a value size which is invalid */
+#define PR_1_ATTR_VALUE_SIZE 0x010053
+
+/* extended attribute in inode has a hash which is invalid */
+#define PR_1_ATTR_HASH 0x010054
+
+/* inode is a type but it looks like it is really a directory */
+#define PR_1_TREAT_AS_DIRECTORY 0x010055
+
+/* Error while reading extent tree in inode */
+#define PR_1_READ_EXTENT 0x010056
+
+/* Failure to iterate extents in inode */
+#define PR_1_EXTENT_ITERATE_FAILURE 0x010057
+
+/* Inode has an invalid extent starting block */
+#define PR_1_EXTENT_BAD_START_BLK 0x010058
+
+/* Inode has an invalid extent that ends beyond filesystem */
+#define PR_1_EXTENT_ENDS_BEYOND 0x010059
+
+/* inode has EXTENTS_FL flag set on filesystem without extents support */
+#define PR_1_EXTENTS_SET 0x01005A
+
+/* inode is in extents format, but superblock is missing EXTENTS feature */
+#define PR_1_EXTENT_FEATURE 0x01005B
+
+/* inode missing EXTENTS_FL, but is an extent inode */
+#define PR_1_UNSET_EXTENT_FL 0x01005C
+
+/* Fast symlink has EXTENTS_FL set */
+#define PR_1_FAST_SYMLINK_EXTENT_FL 0x01005D
+
+/* Extents are out of order */
+#define PR_1_OUT_OF_ORDER_EXTENTS 0x01005E
+
+/* Extent node header invalid */
+#define PR_1_EXTENT_HEADER_INVALID 0x01005F
+
+/* PR_1_EOFBLOCKS_FL_SET 0x010060 was here */
+
+/* Failed to convert subcluster block bitmap */
+#define PR_1_CONVERT_SUBCLUSTER 0x010061
+
+/* Quota inode is not a regular file */
+#define PR_1_QUOTA_BAD_MODE 0x010062
+
+/* Quota inode is not in use, but contains data */
+#define PR_1_QUOTA_INODE_NOT_CLEAR 0x010063
+
+/* Quota inode is visible to the user */
+#define PR_1_QUOTA_INODE_NOT_HIDDEN 0x010064
+
+/* The bad block inode looks invalid */
+#define PR_1_INVALID_BAD_INODE 0x010065
+
+/* Extent has zero length extent */
+#define PR_1_EXTENT_LENGTH_ZERO 0x010066
+
+/* inode seems to contain garbage */
+#define PR_1_INODE_IS_GARBAGE 0x010067
+
+/* inode passes checks, but checksum does not match inode */
+#define PR_1_INODE_ONLY_CSUM_INVALID 0x010068
+
+/* Inode extended attribute is corrupt (allocation collision) */
+#define PR_1_INODE_EA_ALLOC_COLLISION 0x010069
+
+/* Inode extent block passes checks, but checksum does not match extent */
+#define PR_1_EXTENT_ONLY_CSUM_INVALID 0x01006A
+
+/* Inode extended attribute block passes checks, but checksum does not
+ * match block. */
+#define PR_1_EA_BLOCK_ONLY_CSUM_INVALID 0x01006C
+
+/* Interior extent node level number of inode doesn't first node down */
+#define PR_1_EXTENT_INDEX_START_INVALID 0x01006D
+
+/* Inode end of extent exceeds allowed value */
+#define PR_1_EXTENT_END_OUT_OF_BOUNDS 0x01006E
+
+/* inode has INLINE_DATA_FL flag on filesystem without inline data */
+#define PR_1_INLINE_DATA_FEATURE 0x01006F
+
+/* inode has INLINE_DATA_FL flag on filesystem without inline data */
+#define PR_1_INLINE_DATA_SET 0x010070
+
+/* Inode block conflicts with critical metadata, skipping block checks */
+#define PR_1_CRITICAL_METADATA_COLLISION 0x010071
+
+/* Directory inode block <block> should be at block <otherblock> */
+#define PR_1_COLLAPSE_DBLOCK 0x010072
+
+/* Directory inode block <block> should be at block <otherblock> */
+#define PR_1_UNINIT_DBLOCK 0x010073
+
+/* Inode logical block (physical block) violates cluster allocation */
+#define PR_1_MISALIGNED_CLUSTER 0x010074
+
+/* Inode has INLINE_DATA_FL flag but extended attribute not found */
+#define PR_1_INLINE_DATA_NO_ATTR 0x010075
+
+/* Special (device/socket/fifo) file (inode num) has extents
+ * or inline-data flag set */
+#define PR_1_SPECIAL_EXTENTS_IDATA 0x010076
+
+/* Inode has extent header but inline data flag is set */
+#define PR_1_CLEAR_INLINE_DATA_FOR_EXTENT 0x010077
+
+/* Inode seems to have inline data but extent flag is set */
+#define PR_1_CLEAR_EXTENT_FOR_INLINE_DATA 0x010078
+
+/* Inode seems to have block map but inline data and extent flags set */
+#define PR_1_CLEAR_EXTENT_INLINE_DATA_FLAGS 0x010079
+
+/* Inode has inline data and extent flags but i_block contains junk */
+#define PR_1_CLEAR_EXTENT_INLINE_DATA_INODE 0x01007A
+
+/* Bad block list says the bad block list inode is bad */
+#define PR_1_BADBLOCKS_IN_BADBLOCKS 0x01007B
+
+/* Error allocating extent region allocation structure */
+#define PR_1_EXTENT_ALLOC_REGION_ABORT 0x01007C
+
+/* Inode leaf has a duplicate extent mapping */
+#define PR_1_EXTENT_COLLISION 0x01007D
+
+/* Error allocating memory for encrypted inode list */
+#define PR_1_ALLOCATE_ENCRYPTED_INODE_LIST 0x01007E
+
+/* Inode extent tree could be more shallow */
+#define PR_1_EXTENT_BAD_MAX_DEPTH 0x01007F
+
+/* inode num on bigalloc filesystem cannot be block mapped */
+#define PR_1_NO_BIGALLOC_BLOCKMAP_FILES 0x010080
+
+/* Inode has corrupt extent header */
+#define PR_1_MISSING_EXTENT_HEADER 0x010081
+
+/* Timestamp(s) on inode beyond 2310-04-04 are likely pre-1970. */
+#define PR_1_EA_TIME_OUT_OF_RANGE 0x010082
+
+/* Inode has illegal EA value inode */
+#define PR_1_ATTR_VALUE_EA_INODE 0x010083
+
+/* Parent inode has invalid EA entry. EA inode does not have
+ * EXT4_EA_INODE_FL flag. Delete EA entry? */
+#define PR_1_ATTR_NO_EA_INODE_FL 0x010085
+
+/* EA inode for parent inode does not have EXT4_EA_INODE_FL flag */
+#define PR_1_ATTR_SET_EA_INODE_FL 0x010086
+
+/* Offer to clear uninitialized flag on an extent */
+#define PR_1_CLEAR_UNINIT_EXTENT 0x010087
+
+/* Casefold flag set on a non-directory */
+#define PR_1_CASEFOLD_NONDIR 0x010088
+
+/* Casefold flag set, but file system is missing the casefold feature */
+#define PR_1_CASEFOLD_FEATURE 0x010089
+
+/* Inode has encrypt flag but no encryption extended attribute */
+#define PR_1_MISSING_ENCRYPTION_XATTR 0x01008A
+
+/* Encrypted inode has corrupt encryption extended attribute */
+#define PR_1_CORRUPT_ENCRYPTION_XATTR 0x01008B
+
+/* Error allocating memory for casefolded directory list */
+#define PR_1_ALLOCATE_CASEFOLDED_DIRLIST 0x01008C
+
+/* Htree directory should use SipHash but does not */
+#define PR_1_HTREE_NEEDS_SIPHASH 0x01008D
+
+/* Htree directory uses SipHash but should not */
+#define PR_1_HTREE_CANNOT_SIPHASH 0x01008E
+
+/* Orphan file inode is not a regular file */
+#define PR_1_ORPHAN_FILE_BAD_MODE 0x01008F
+
+/* Orphan file inode is not in use, but contains data */
+#define PR_1_ORPHAN_FILE_NOT_CLEAR 0x010090
+
+/*
+ * Pass 1b errors
+ */
+
+/* Pass 1B: Rescan for duplicate/bad blocks */
+#define PR_1B_PASS_HEADER 0x011000
+
+/* Duplicate/bad block(s) header */
+#define PR_1B_DUP_BLOCK_HEADER 0x011001
+
+/* Duplicate/bad block(s) in inode */
+#define PR_1B_DUP_BLOCK 0x011002
+
+/* Duplicate/bad block(s) end */
+#define PR_1B_DUP_BLOCK_END 0x011003
+
+/* Error while scanning inodes */
+#define PR_1B_ISCAN_ERROR 0x011004
+
+/* Error allocating inode bitmap */
+#define PR_1B_ALLOCATE_IBITMAP_ERROR 0x011005
+
+/* Error while iterating over blocks */
+#define PR_1B_BLOCK_ITERATE 0x011006
+
+/* Error adjusting EA refcount */
+#define PR_1B_ADJ_EA_REFCOUNT 0x011007
+
+/* Duplicate/bad block range in inode */
+#define PR_1B_DUP_RANGE 0x011008
+
+/* Pass 1C: Scan directories for inodes with dup blocks. */
+#define PR_1C_PASS_HEADER 0x012000
+
+
+/* Pass 1D: Reconciling duplicate blocks */
+#define PR_1D_PASS_HEADER 0x013000
+
+/* File has duplicate blocks */
+#define PR_1D_DUP_FILE 0x013001
+
+/* List of files sharing duplicate blocks */
+#define PR_1D_DUP_FILE_LIST 0x013002
+
+/* File sharing blocks with filesystem metadata */
+#define PR_1D_SHARE_METADATA 0x013003
+
+/* Report of how many duplicate/bad inodes */
+#define PR_1D_NUM_DUP_INODES 0x013004
+
+/* Duplicated blocks already reassigned or cloned. */
+#define PR_1D_DUP_BLOCKS_DEALT 0x013005
+
+/* Clone duplicate/bad blocks? */
+#define PR_1D_CLONE_QUESTION 0x013006
+
+/* Delete file? */
+#define PR_1D_DELETE_QUESTION 0x013007
+
+/* Couldn't clone file (error) */
+#define PR_1D_CLONE_ERROR 0x013008
+
+/*
+ * Pass 1e --- rebuilding extent trees
+ */
+/* Pass 1e: Rebuilding extent trees */
+#define PR_1E_PASS_HEADER 0x014000
+
+/* Error rehash directory */
+#define PR_1E_OPTIMIZE_EXT_ERR 0x014001
+
+/* Rebuilding extent trees */
+#define PR_1E_OPTIMIZE_EXT_HEADER 0x014002
+
+/* Rebuilding extent %d */
+#define PR_1E_OPTIMIZE_EXT 0x014003
+
+/* Rebuilding extent tree end */
+#define PR_1E_OPTIMIZE_EXT_END 0x014004
+
+/* Internal error: extent tree depth too large */
+#define PR_1E_MAX_EXTENT_TREE_DEPTH 0x014005
+
+/* Inode extent tree could be shorter */
+#define PR_1E_CAN_COLLAPSE_EXTENT_TREE 0x014006
+
+/* Inode extent tree could be narrower */
+#define PR_1E_CAN_NARROW_EXTENT_TREE 0x014007
+
+/*
+ * Pass 2 errors
+ */
+
+/* Pass 2: Checking directory structure */
+#define PR_2_PASS_HEADER 0x020000
+
+/* Bad inode number for '.' */
+#define PR_2_BAD_INODE_DOT 0x020001
+
+/* Directory entry has bad inode number */
+#define PR_2_BAD_INO 0x020002
+
+/* Directory entry has deleted or unused inode */
+#define PR_2_UNUSED_INODE 0x020003
+
+/* Directory entry is link to '.' */
+#define PR_2_LINK_DOT 0x020004
+
+/* Directory entry points to inode now located in a bad block */
+#define PR_2_BB_INODE 0x020005
+
+/* Directory entry contains a link to a directory */
+#define PR_2_LINK_DIR 0x020006
+
+/* Directory entry contains a link to the root directory */
+#define PR_2_LINK_ROOT 0x020007
+
+/* Directory entry has illegal characters in its name */
+#define PR_2_BAD_NAME 0x020008
+
+/* Missing '.' in directory inode */
+#define PR_2_MISSING_DOT 0x020009
+
+/* Missing '..' in directory inode */
+#define PR_2_MISSING_DOT_DOT 0x02000A
+
+/* First entry in directory inode doesn't contain '.' */
+#define PR_2_1ST_NOT_DOT 0x02000B
+
+/* Second entry in directory inode doesn't contain '..' */
+#define PR_2_2ND_NOT_DOT_DOT 0x02000C
+
+/* i_faddr should be zero */
+#define PR_2_FADDR_ZERO 0x02000D
+
+/* i_file_acl should be zero */
+#define PR_2_FILE_ACL_ZERO 0x02000E
+
+/* i_size_high should be zero */
+#define PR_2_DIR_SIZE_HIGH_ZERO 0x02000F
+
+/* i_frag should be zero */
+#define PR_2_FRAG_ZERO 0x020010
+
+/* i_fsize should be zero */
+#define PR_2_FSIZE_ZERO 0x020011
+
+/* inode has bad mode */
+#define PR_2_BAD_MODE 0x020012
+
+/* directory corrupted */
+#define PR_2_DIR_CORRUPTED 0x020013
+
+/* filename too long */
+#define PR_2_FILENAME_LONG 0x020014
+
+/* Directory inode has a missing block (hole) */
+#define PR_2_DIRECTORY_HOLE 0x020015
+
+/* '.' is not NULL terminated */
+#define PR_2_DOT_NULL_TERM 0x020016
+
+/* '..' is not NULL terminated */
+#define PR_2_DOT_DOT_NULL_TERM 0x020017
+
+/* Illegal character device in inode */
+#define PR_2_BAD_CHAR_DEV 0x020018
+
+/* Illegal block device in inode */
+#define PR_2_BAD_BLOCK_DEV 0x020019
+
+/* Duplicate '.' entry */
+#define PR_2_DUP_DOT 0x02001A
+
+/* Duplicate '..' entry */
+#define PR_2_DUP_DOT_DOT 0x02001B
+
+/* Internal error: couldn't find dir_info */
+#define PR_2_NO_DIRINFO 0x02001C
+
+/* Final rec_len is wrong */
+#define PR_2_FINAL_RECLEN 0x02001D
+
+/* Error allocating icount structure */
+#define PR_2_ALLOCATE_ICOUNT 0x02001E
+
+/* Error iterating over directory blocks */
+#define PR_2_DBLIST_ITERATE 0x02001F
+
+/* Error reading directory block */
+#define PR_2_READ_DIRBLOCK 0x020020
+
+/* Error writing directory block */
+#define PR_2_WRITE_DIRBLOCK 0x020021
+
+/* Error allocating new directory block */
+#define PR_2_ALLOC_DIRBOCK 0x020022
+
+/* Error deallocating inode */
+#define PR_2_DEALLOC_INODE 0x020023
+
+/* Directory entry for '.' is big. Split? */
+#define PR_2_SPLIT_DOT 0x020024
+
+/* Illegal FIFO */
+#define PR_2_BAD_FIFO 0x020025
+
+/* Illegal socket */
+#define PR_2_BAD_SOCKET 0x020026
+
+/* Directory filetype not set */
+#define PR_2_SET_FILETYPE 0x020027
+
+/* Directory filetype incorrect */
+#define PR_2_BAD_FILETYPE 0x020028
+
+/* Directory filetype set when it shouldn't be */
+#define PR_2_CLEAR_FILETYPE 0x020029
+
+/* Directory filename can't be zero-length */
+#define PR_2_NULL_NAME 0x020030
+
+/* Invalid symlink */
+#define PR_2_INVALID_SYMLINK 0x020031
+
+/* i_file_acl (extended attribute) is bad */
+#define PR_2_FILE_ACL_BAD 0x020032
+
+/* Filesystem contains large files, but has no such flag in sb */
+#define PR_2_FEATURE_LARGE_FILES 0x020033
+
+/* Node in HTREE directory not referenced */
+#define PR_2_HTREE_NOTREF 0x020034
+
+/* Node in HTREE directory referenced twice */
+#define PR_2_HTREE_DUPREF 0x020035
+
+/* Node in HTREE directory has bad min hash */
+#define PR_2_HTREE_MIN_HASH 0x020036
+
+/* Node in HTREE directory has bad max hash */
+#define PR_2_HTREE_MAX_HASH 0x020037
+
+/* Clear invalid HTREE directory */
+#define PR_2_HTREE_CLEAR 0x020038
+
+/* Filesystem has large directories, but has no such flag in superblock */
+#define PR_2_FEATURE_LARGE_DIRS 0x020039
+
+/* Bad block in htree interior node */
+#define PR_2_HTREE_BADBLK 0x02003A
+
+/* Error adjusting EA refcount */
+#define PR_2_ADJ_EA_REFCOUNT 0x02003B
+
+/* Invalid HTREE root node */
+#define PR_2_HTREE_BAD_ROOT 0x02003C
+
+/* Invalid HTREE limit */
+#define PR_2_HTREE_BAD_LIMIT 0x02003D
+
+/* Invalid HTREE count */
+#define PR_2_HTREE_BAD_COUNT 0x02003E
+
+/* HTREE interior node has out-of-order hashes in table */
+#define PR_2_HTREE_HASH_ORDER 0x02003F
+
+/* Node in HTREE directory has bad depth */
+#define PR_2_HTREE_BAD_DEPTH 0x020040
+
+/* Duplicate directory entry found */
+#define PR_2_DUPLICATE_DIRENT 0x020041
+
+/* Non-unique filename found */
+#define PR_2_NON_UNIQUE_FILE 0x020042
+
+/* Duplicate directory entry found */
+#define PR_2_REPORT_DUP_DIRENT 0x020043
+
+/* i_blocks_hi should be zero */
+#define PR_2_BLOCKS_HI_ZERO 0x020044
+
+/* Unexpected HTREE block */
+#define PR_2_UNEXPECTED_HTREE_BLOCK 0x020045
+
+/* Inode found in group where _INODE_UNINIT is set */
+#define PR_2_INOREF_BG_INO_UNINIT 0x020046
+
+/* Inode found in group unused inodes area */
+#define PR_2_INOREF_IN_UNUSED 0x020047
+
+/* i_file_acl_hi should be zero */
+#define PR_2_I_FILE_ACL_HI_ZERO 0x020048
+
+/* htree root node fails checksum */
+#define PR_2_HTREE_ROOT_CSUM_INVALID 0x020049
+
+/* htree node fails checksum */
+#define PR_2_HTREE_NODE_CSUM_INVALID 0x02004A
+
+/* no space in leaf for checksum */
+#define PR_2_LEAF_NODE_MISSING_CSUM 0x02004C
+
+/* dir leaf node passes checks, but fails checksum */
+#define PR_2_LEAF_NODE_ONLY_CSUM_INVALID 0x02004D
+
+/* bad inline directory size */
+#define PR_2_BAD_INLINE_DIR_SIZE 0x02004E
+
+/* fixing inline dir size failed */
+#define PR_2_FIX_INLINE_DIR_FAILED 0x02004F
+
+/* Encrypted directory entry is too short */
+#define PR_2_BAD_ENCRYPTED_NAME 0x020050
+
+/* Encrypted directory contains unencrypted file */
+#define PR_2_UNENCRYPTED_FILE 0x020051
+
+/* Encrypted directory contains file with different encryption policy */
+#define PR_2_INCONSISTENT_ENCRYPTION_POLICY 0x020052
+
+/* Encoded directory entry has illegal characters in its name */
+#define PR_2_BAD_ENCODED_NAME 0x020053
+
+/* Non-unique filename found, but can't rename */
+#define PR_2_NON_UNIQUE_FILE_NO_RENAME 0x020054
+
+/*
+ * Pass 3 errors
+ */
+
+/* Pass 3: Checking directory connectivity */
+#define PR_3_PASS_HEADER 0x030000
+
+/* Root inode not allocated */
+#define PR_3_NO_ROOT_INODE 0x030001
+
+/* No room in lost+found */
+#define PR_3_EXPAND_LF_DIR 0x030002
+
+/* Unconnected directory inode */
+#define PR_3_UNCONNECTED_DIR 0x030003
+
+/* /lost+found not found */
+#define PR_3_NO_LF_DIR 0x030004
+
+/* .. entry is incorrect */
+#define PR_3_BAD_DOT_DOT 0x030005
+
+/* Bad or non-existent /lost+found. Cannot reconnect */
+#define PR_3_NO_LPF 0x030006
+
+/* Could not expand /lost+found */
+#define PR_3_CANT_EXPAND_LPF 0x030007
+
+/* Could not reconnect inode */
+#define PR_3_CANT_RECONNECT 0x030008
+
+/* Error while trying to find /lost+found */
+#define PR_3_ERR_FIND_LPF 0x030009
+
+/* Error in ext2fs_new_block while creating /lost+found */
+#define PR_3_ERR_LPF_NEW_BLOCK 0x03000A
+
+/* Error in ext2fs_new_inode while creating /lost+found */
+#define PR_3_ERR_LPF_NEW_INODE 0x03000B
+
+/* Error in ext2fs_new_dir_block while creating /lost+found */
+#define PR_3_ERR_LPF_NEW_DIR_BLOCK 0x03000C
+
+/* Error while writing directory block for /lost+found */
+#define PR_3_ERR_LPF_WRITE_BLOCK 0x03000D
+
+/* Error while adjusting inode count */
+#define PR_3_ADJUST_INODE 0x03000E
+
+/* Couldn't fix parent directory -- error */
+#define PR_3_FIX_PARENT_ERR 0x03000F
+
+/* Couldn't fix parent directory -- couldn't find it */
+#define PR_3_FIX_PARENT_NOFIND 0x030010
+
+/* Error allocating inode bitmap */
+#define PR_3_ALLOCATE_IBITMAP_ERROR 0x030011
+
+/* Error creating root directory */
+#define PR_3_CREATE_ROOT_ERROR 0x030012
+
+/* Error creating lost and found directory */
+#define PR_3_CREATE_LPF_ERROR 0x030013
+
+/* Root inode is not directory; aborting */
+#define PR_3_ROOT_NOT_DIR_ABORT 0x030014
+
+/* Cannot proceed without a root inode. */
+#define PR_3_NO_ROOT_INODE_ABORT 0x030015
+
+/* Internal error: couldn't find dir_info */
+#define PR_3_NO_DIRINFO 0x030016
+
+/* Lost+found is not a directory */
+#define PR_3_LPF_NOTDIR 0x030017
+
+/* Lost+found has inline data */
+#define PR_3_LPF_INLINE_DATA 0x030018
+
+/* Cannot allocate lost+found */
+#define PR_3_LPF_NO_SPACE 0x030019
+
+/* Insufficient space to recover lost files */
+#define PR_3_NO_SPACE_TO_RECOVER 0x03001A
+
+/* Lost+found is encrypted */
+#define PR_3_LPF_ENCRYPTED 0x03001B
+
+/* Recursively looped directory inode */
+#define PR_3_LOOPED_DIR 0x03001D
+
+/*
+ * Pass 3a --- rehashing directories
+ */
+/* Pass 3a: Reindexing directories */
+#define PR_3A_PASS_HEADER 0x031000
+
+/* Error iterating over directories */
+#define PR_3A_OPTIMIZE_ITER 0x031001
+
+/* Error rehash directory */
+#define PR_3A_OPTIMIZE_DIR_ERR 0x031002
+
+/* Rehashing dir header */
+#define PR_3A_OPTIMIZE_DIR_HEADER 0x031003
+
+/* Rehashing directory %d */
+#define PR_3A_OPTIMIZE_DIR 0x031004
+
+/* Rehashing dir end */
+#define PR_3A_OPTIMIZE_DIR_END 0x031005
+
+/* Pass 3B is really just 1E */
+
+/*
+ * Pass 4 errors
+ */
+
+/* Pass 4: Checking reference counts */
+#define PR_4_PASS_HEADER 0x040000
+
+/* Unattached zero-length inode */
+#define PR_4_ZERO_LEN_INODE 0x040001
+
+/* Unattached inode */
+#define PR_4_UNATTACHED_INODE 0x040002
+
+/* Inode ref count wrong */
+#define PR_4_BAD_REF_COUNT 0x040003
+
+/* Inconsistent inode count information cached */
+#define PR_4_INCONSISTENT_COUNT 0x040004
+
+/* Extended attribute inode ref count wrong */
+#define PR_4_EA_INODE_REF_COUNT 0x040005
+
+/* directory exceeds max links, but no DIR_NLINK feature in superblock */
+#define PR_4_DIR_NLINK_FEATURE 0x040006
+
+/* Directory ref count set to overflow but it doesn't have to be */
+#define PR_4_DIR_OVERFLOW_REF_COUNT 0x040007
+
+/*
+ * Pass 5 errors
+ */
+
+/* Pass 5: Checking group summary information */
+#define PR_5_PASS_HEADER 0x050000
+
+/* Padding at end of inode bitmap is not set. */
+#define PR_5_INODE_BMAP_PADDING 0x050001
+
+/* Padding at end of block bitmap is not set. */
+#define PR_5_BLOCK_BMAP_PADDING 0x050002
+
+/* Block bitmap differences header */
+#define PR_5_BLOCK_BITMAP_HEADER 0x050003
+
+/* Block not used, but marked in bitmap */
+#define PR_5_BLOCK_UNUSED 0x050004
+
+/* Block used, but not marked used in bitmap */
+#define PR_5_BLOCK_USED 0x050005
+
+/* Block bitmap differences end */
+#define PR_5_BLOCK_BITMAP_END 0x050006
+
+/* Inode bitmap differences header */
+#define PR_5_INODE_BITMAP_HEADER 0x050007
+
+/* Inode not used, but marked in bitmap */
+#define PR_5_INODE_UNUSED 0x050008
+
+/* Inode used, but not marked used in bitmap */
+#define PR_5_INODE_USED 0x050009
+
+/* Inode bitmap differences end */
+#define PR_5_INODE_BITMAP_END 0x05000A
+
+/* Free inodes count for group wrong */
+#define PR_5_FREE_INODE_COUNT_GROUP 0x05000B
+
+/* Directories count for group wrong */
+#define PR_5_FREE_DIR_COUNT_GROUP 0x05000C
+
+/* Free inodes count wrong */
+#define PR_5_FREE_INODE_COUNT 0x05000D
+
+/* Free blocks count for group wrong */
+#define PR_5_FREE_BLOCK_COUNT_GROUP 0x05000E
+
+/* Free blocks count wrong */
+#define PR_5_FREE_BLOCK_COUNT 0x05000F
+
+/* Programming error: bitmap endpoints don't match */
+#define PR_5_BMAP_ENDPOINTS 0x050010
+
+/* Internal error: fudging end of bitmap */
+#define PR_5_FUDGE_BITMAP_ERROR 0x050011
+
+/* Error copying in replacement inode bitmap */
+#define PR_5_COPY_IBITMAP_ERROR 0x050012
+
+/* Error copying in replacement block bitmap */
+#define PR_5_COPY_BBITMAP_ERROR 0x050013
+
+/* Block range not used, but marked in bitmap */
+#define PR_5_BLOCK_RANGE_UNUSED 0x050014
+
+/* Block range used, but not marked used in bitmap */
+#define PR_5_BLOCK_RANGE_USED 0x050015
+
+/* Inode range not used, but marked in bitmap */
+#define PR_5_INODE_RANGE_UNUSED 0x050016
+
+/* Inode range used, but not marked used in bitmap */
+#define PR_5_INODE_RANGE_USED 0x050017
+
+/* Block in use but group is marked BLOCK_UNINIT */
+#define PR_5_BLOCK_UNINIT 0x050018
+
+/* Inode in use but group is marked INODE_UNINIT */
+#define PR_5_INODE_UNINIT 0x050019
+
+/* Inode bitmap checksum does not match */
+#define PR_5_INODE_BITMAP_CSUM_INVALID 0x05001A
+
+/* Block bitmap checksum does not match */
+#define PR_5_BLOCK_BITMAP_CSUM_INVALID 0x05001B
+
+/*
+ * Post-Pass 5 errors
+ */
+
+/* Recreate the journal if E2F_FLAG_JOURNAL_INODE flag is set */
+#define PR_6_RECREATE_JOURNAL 0x060001
+
+/* Update quota information if it is inconsistent */
+#define PR_6_UPDATE_QUOTAS 0x060002
+
+/* Error setting block group checksum info */
+#define PR_6_SET_BG_CHECKSUM 0x060003
+
+/* Error writing file system info */
+#define PR_6_FLUSH_FILESYSTEM 0x060004
+
+/* Error flushing writes to storage device */
+#define PR_6_IO_FLUSH 0x060005
+
+/* Error updating quota information */
+#define PR_6_WRITE_QUOTAS 0x060006
+
+/* Orphan file without a journal */
+#define PR_6_ORPHAN_FILE_WITHOUT_JOURNAL 0x060007
+
+/* Orphan file truncation failed */
+#define PR_6_ORPHAN_FILE_TRUNC_FAILED 0x060008
+
+/* Failed to initialize orphan file */
+#define PR_6_ORPHAN_FILE_CORRUPTED 0x060009
+
+/* Cannot fix corrupted orphan file with invalid bitmaps */
+#define PR_6_ORPHAN_FILE_BITMAP_INVALID 0x06000A
+
+/* Orphan file creation failed */
+#define PR_6_ORPHAN_FILE_CREATE_FAILED 0x06000B
+
+/* Orphan file block contains data */
+#define PR_6_ORPHAN_BLOCK_DIRTY 0x06000C
+
+/* orphan_present set but orphan file is empty */
+#define PR_6_ORPHAN_PRESENT_CLEAN_FILE 0x06000D
+
+/* orphan_present set but orphan_file is not */
+#define PR_6_ORPHAN_PRESENT_NO_FILE 0x06000E
+
+/* Orphan file size isn't multiple of blocks size */
+#define PR_6_ORPHAN_FILE_WRONG_SIZE 0x06000F
+
+/* Orphan file contains holes */
+#define PR_6_ORPHAN_FILE_HOLE 0x060010
+
+/*
+ * Function declarations
+ */
+int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx);
+int end_problem_latch(e2fsck_t ctx, int mask);
+int set_latch_flags(int mask, int setflags, int clearflags);
+int get_latch_flags(int mask, int *value);
+void clear_problem_context(struct problem_context *pctx);
+
+/* message.c */
+void print_e2fsck_message(FILE *f, e2fsck_t ctx, const char *msg,
+ struct problem_context *pctx, int first,
+ int recurse);
+
diff --git a/e2fsck/problemP.h b/e2fsck/problemP.h
new file mode 100644
index 0000000..95c1a70
--- /dev/null
+++ b/e2fsck/problemP.h
@@ -0,0 +1,48 @@
+/*
+ * problemP.h --- Private header file for fix_problem()
+ *
+ * Copyright 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+struct e2fsck_problem {
+ problem_t e2p_code;
+ const char * e2p_description;
+ char prompt;
+ int flags;
+ problem_t second_code;
+ int count;
+ int max_count;
+};
+
+struct latch_descr {
+ int latch_code;
+ problem_t question;
+ problem_t end_message;
+ int flags;
+};
+
+#define PR_PREEN_OK 0x000001 /* Don't need to do preenhalt */
+#define PR_NO_OK 0x000002 /* If user answers no, don't make fs invalid */
+#define PR_NO_DEFAULT 0x000004 /* Default to no */
+#define PR_MSG_ONLY 0x000008 /* Print message only */
+
+/* Bit positions 0x000ff0 are reserved for the PR_LATCH flags */
+
+#define PR_FATAL 0x001000 /* Fatal error */
+#define PR_AFTER_CODE 0x002000 /* After asking the first question, */
+ /* ask another */
+#define PR_PREEN_NOMSG 0x004000 /* Don't print a message if we're preening */
+#define PR_NOCOLLATE 0x008000 /* Don't collate answers for this latch */
+#define PR_NO_NOMSG 0x010000 /* Don't print a message if e2fsck -n */
+#define PR_PREEN_NO 0x020000 /* Use No as an answer if preening */
+#define PR_PREEN_NOHDR 0x040000 /* Don't print the preen header */
+#define PR_CONFIG 0x080000 /* This problem has been customized
+ from the config file */
+#define PR_FORCE_NO 0x100000 /* Force the answer to be no */
+#define PR_NOT_A_FIX 0x200000 /* Yes doesn't mean a problem was fixed */
+#define PR_HEADER 0x400000 /* Problem is a header marker */
diff --git a/e2fsck/quota.c b/e2fsck/quota.c
new file mode 100644
index 0000000..f9b68c9
--- /dev/null
+++ b/e2fsck/quota.c
@@ -0,0 +1,127 @@
+/*
+ * quota.c --- code for handling ext4 quota inodes
+ *
+ */
+
+#include "config.h"
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/param.h>
+#include <sys/mount.h>
+#define MNT_FL (MS_MGC_VAL | MS_RDONLY)
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#include "e2fsck.h"
+#include "problem.h"
+
+static errcode_t move_quota_inode(ext2_filsys fs, ext2_ino_t from_ino,
+ ext2_ino_t to_ino, enum quota_type qtype)
+{
+ struct ext2_inode inode;
+ errcode_t retval;
+ char qf_name[QUOTA_NAME_LEN];
+
+ /* We need the inode bitmap to be loaded */
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval) {
+ com_err("ext2fs_read_bitmaps", retval, "%s",
+ _("in move_quota_inode"));
+ return retval;
+ }
+
+ retval = ext2fs_read_inode(fs, from_ino, &inode);
+ if (retval) {
+ com_err("ext2fs_read_inode", retval, "%s",
+ _("in move_quota_inode"));
+ return retval;
+ }
+
+ inode.i_links_count = 1;
+ inode.i_mode = LINUX_S_IFREG | 0600;
+ inode.i_flags = EXT2_IMMUTABLE_FL;
+ if (ext2fs_has_feature_extents(fs->super))
+ inode.i_flags |= EXT4_EXTENTS_FL;
+
+ retval = ext2fs_write_new_inode(fs, to_ino, &inode);
+ if (retval) {
+ com_err("ext2fs_write_new_inode", retval, "%s",
+ _("in move_quota_inode"));
+ return retval;
+ }
+
+ /* unlink the old inode */
+ quota_get_qf_name(qtype, QFMT_VFS_V1, qf_name);
+ retval = ext2fs_unlink(fs, EXT2_ROOT_INO, qf_name, from_ino, 0);
+ if (retval) {
+ com_err("ext2fs_unlink", retval, "%s",
+ _("in move_quota_inode"));
+ return retval;
+ }
+ ext2fs_inode_alloc_stats(fs, from_ino, -1);
+ /* Clear out the original inode in the inode-table block. */
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ ext2fs_write_inode(fs, from_ino, &inode);
+ return 0;
+}
+
+void e2fsck_hide_quota(e2fsck_t ctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct problem_context pctx;
+ ext2_filsys fs = ctx->fs;
+ enum quota_type qtype;
+ ext2_ino_t quota_ino;
+
+ clear_problem_context(&pctx);
+
+ if ((ctx->options & E2F_OPT_READONLY) ||
+ !ext2fs_has_feature_quota(sb))
+ return;
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ pctx.dir = 2; /* This is a guess, but it's a good one */
+ pctx.ino = *quota_sb_inump(sb, qtype);
+ pctx.num = qtype;
+ quota_ino = quota_type2inum(qtype, fs->super);
+ if (pctx.ino && (pctx.ino != quota_ino) &&
+ fix_problem(ctx, PR_0_HIDE_QUOTA, &pctx)) {
+ if (move_quota_inode(fs, pctx.ino, quota_ino, qtype))
+ continue;
+ *quota_sb_inump(sb, qtype) = quota_ino;
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+ return;
+}
+
+void e2fsck_validate_quota_inodes(e2fsck_t ctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct problem_context pctx;
+ ext2_filsys fs = ctx->fs;
+ enum quota_type qtype;
+
+ clear_problem_context(&pctx);
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ pctx.ino = *quota_sb_inump(sb, qtype);
+ pctx.num = qtype;
+ if (pctx.ino &&
+ ((pctx.ino == EXT2_BAD_INO) ||
+ (pctx.ino == EXT2_ROOT_INO) ||
+ (pctx.ino == EXT2_BOOT_LOADER_INO) ||
+ (pctx.ino == EXT2_UNDEL_DIR_INO) ||
+ (pctx.ino == EXT2_RESIZE_INO) ||
+ (pctx.ino == EXT2_JOURNAL_INO) ||
+ (pctx.ino == EXT2_EXCLUDE_INO) ||
+ (pctx.ino == EXT4_REPLICA_INO) ||
+ (pctx.ino > fs->super->s_inodes_count)) &&
+ fix_problem(ctx, PR_0_INVALID_QUOTA_INO, &pctx)) {
+ *quota_sb_inump(sb, qtype) = 0;
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+}
diff --git a/e2fsck/readahead.c b/e2fsck/readahead.c
new file mode 100644
index 0000000..38d4ec4
--- /dev/null
+++ b/e2fsck/readahead.c
@@ -0,0 +1,254 @@
+/*
+ * readahead.c -- Prefetch filesystem metadata to speed up fsck.
+ *
+ * Copyright (C) 2014 Oracle.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <string.h>
+
+#include "e2fsck.h"
+
+#undef DEBUG
+
+#ifdef DEBUG
+# define dbg_printf(f, a...) do {printf(f, ## a); fflush(stdout); } while (0)
+#else
+# define dbg_printf(f, a...)
+#endif
+
+struct read_dblist {
+ errcode_t err;
+ blk64_t run_start;
+ blk64_t run_len;
+ int flags;
+};
+
+static int readahead_dir_block(ext2_filsys fs, struct ext2_db_entry2 *db,
+ void *priv_data)
+{
+ struct read_dblist *pr = priv_data;
+ e2_blkcnt_t count = (pr->flags & E2FSCK_RA_DBLIST_IGNORE_BLOCKCNT ?
+ 1 : db->blockcnt);
+
+ if (!pr->run_len || db->blk != pr->run_start + pr->run_len) {
+ if (pr->run_len) {
+ pr->err = io_channel_cache_readahead(fs->io,
+ pr->run_start,
+ pr->run_len);
+ dbg_printf("readahead start=%llu len=%llu err=%d\n",
+ pr->run_start, pr->run_len,
+ (int)pr->err);
+ }
+ pr->run_start = db->blk;
+ pr->run_len = 0;
+ }
+ pr->run_len += count;
+
+ return pr->err ? DBLIST_ABORT : 0;
+}
+
+errcode_t e2fsck_readahead_dblist(ext2_filsys fs, int flags,
+ ext2_dblist dblist,
+ unsigned long long start,
+ unsigned long long count)
+{
+ errcode_t err;
+ struct read_dblist pr;
+
+ dbg_printf("%s: flags=0x%x\n", __func__, flags);
+ if (flags & ~E2FSCK_RA_DBLIST_ALL_FLAGS)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ memset(&pr, 0, sizeof(pr));
+ pr.flags = flags;
+ err = ext2fs_dblist_iterate3(dblist, readahead_dir_block, start,
+ count, &pr);
+ if (pr.err)
+ return pr.err;
+ if (err)
+ return err;
+
+ if (pr.run_len)
+ err = io_channel_cache_readahead(fs->io, pr.run_start,
+ pr.run_len);
+
+ return err;
+}
+
+static errcode_t e2fsck_readahead_bitmap(ext2_filsys fs,
+ ext2fs_block_bitmap ra_map)
+{
+ blk64_t start, end, out;
+ errcode_t err;
+
+ start = 1;
+ end = ext2fs_blocks_count(fs->super) - 1;
+
+ err = ext2fs_find_first_set_block_bitmap2(ra_map, start, end, &out);
+ while (err == 0) {
+ start = out;
+ err = ext2fs_find_first_zero_block_bitmap2(ra_map, start, end,
+ &out);
+ if (err == ENOENT) {
+ out = end;
+ err = 0;
+ if (out == start)
+ break;
+ } else if (err)
+ break;
+
+ err = io_channel_cache_readahead(fs->io, start, out - start);
+ if (err)
+ break;
+ start = out;
+ err = ext2fs_find_first_set_block_bitmap2(ra_map, start, end,
+ &out);
+ }
+
+ if (err == ENOENT)
+ err = 0;
+
+ return err;
+}
+
+/* Try not to spew bitmap range errors for readahead */
+static errcode_t mark_bmap_range(ext2fs_block_bitmap map,
+ blk64_t blk, unsigned int num)
+{
+ if (blk >= ext2fs_get_generic_bmap_start(map) &&
+ blk + num <= ext2fs_get_generic_bmap_end(map))
+ ext2fs_mark_block_bitmap_range2(map, blk, num);
+ else
+ return EXT2_ET_INVALID_ARGUMENT;
+ return 0;
+}
+
+static errcode_t mark_bmap(ext2fs_block_bitmap map, blk64_t blk)
+{
+ if (blk >= ext2fs_get_generic_bmap_start(map) &&
+ blk <= ext2fs_get_generic_bmap_end(map))
+ ext2fs_mark_block_bitmap2(map, blk);
+ else
+ return EXT2_ET_INVALID_ARGUMENT;
+ return 0;
+}
+
+errcode_t e2fsck_readahead(ext2_filsys fs, int flags, dgrp_t start,
+ dgrp_t ngroups)
+{
+ blk64_t super, old_gdt, new_gdt;
+ blk_t blocks;
+ dgrp_t i;
+ ext2fs_block_bitmap ra_map = NULL;
+ dgrp_t end = start + ngroups;
+ errcode_t err = 0;
+
+ dbg_printf("%s: flags=0x%x start=%d groups=%d\n", __func__, flags,
+ start, ngroups);
+ if (flags & ~E2FSCK_READA_ALL_FLAGS)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (end > fs->group_desc_count)
+ end = fs->group_desc_count;
+
+ if (flags == 0)
+ return 0;
+
+ err = ext2fs_allocate_block_bitmap(fs, "readahead bitmap",
+ &ra_map);
+ if (err)
+ return err;
+
+ for (i = start; i < end; i++) {
+ err = ext2fs_super_and_bgd_loc2(fs, i, &super, &old_gdt,
+ &new_gdt, &blocks);
+ if (err)
+ break;
+
+ if (flags & E2FSCK_READA_SUPER) {
+ err = mark_bmap(ra_map, super);
+ if (err)
+ break;
+ }
+
+ if (flags & E2FSCK_READA_GDT) {
+ err = mark_bmap_range(ra_map,
+ old_gdt ? old_gdt : new_gdt,
+ blocks);
+ if (err)
+ break;
+ }
+
+ if ((flags & E2FSCK_READA_BBITMAP) &&
+ !ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
+ ext2fs_bg_free_blocks_count(fs, i) <
+ fs->super->s_blocks_per_group) {
+ super = ext2fs_block_bitmap_loc(fs, i);
+ err = mark_bmap(ra_map, super);
+ if (err)
+ break;
+ }
+
+ if ((flags & E2FSCK_READA_IBITMAP) &&
+ !ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT) &&
+ ext2fs_bg_free_inodes_count(fs, i) <
+ fs->super->s_inodes_per_group) {
+ super = ext2fs_inode_bitmap_loc(fs, i);
+ err = mark_bmap(ra_map, super);
+ if (err)
+ break;
+ }
+
+ if ((flags & E2FSCK_READA_ITABLE) &&
+ ext2fs_bg_free_inodes_count(fs, i) <
+ fs->super->s_inodes_per_group) {
+ super = ext2fs_inode_table_loc(fs, i);
+ blocks = fs->inode_blocks_per_group -
+ (ext2fs_bg_itable_unused(fs, i) *
+ EXT2_INODE_SIZE(fs->super) / fs->blocksize);
+ err = mark_bmap_range(ra_map, super, blocks);
+ if (err)
+ break;
+ }
+ }
+
+ if (!err)
+ err = e2fsck_readahead_bitmap(fs, ra_map);
+
+ ext2fs_free_block_bitmap(ra_map);
+ return err;
+}
+
+int e2fsck_can_readahead(ext2_filsys fs)
+{
+ errcode_t err;
+
+ err = io_channel_cache_readahead(fs->io, 0, 1);
+ dbg_printf("%s: supp=%d\n", __func__, err != EXT2_ET_OP_NOT_SUPPORTED);
+ return err != EXT2_ET_OP_NOT_SUPPORTED;
+}
+
+unsigned long long e2fsck_guess_readahead(ext2_filsys fs)
+{
+ unsigned long long guess;
+
+ /*
+ * The optimal readahead sizes were experimentally determined by
+ * djwong in August 2014. Setting the RA size to two block groups'
+ * worth of inode table blocks seems to yield the largest reductions
+ * in e2fsck runtime.
+ */
+ guess = 2ULL * fs->blocksize * fs->inode_blocks_per_group;
+
+ /* Disable RA if it'd use more 1/50th of RAM. */
+ if (get_memory_size() > (guess * 50))
+ return guess / 1024;
+
+ return 0;
+}
diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c
new file mode 100644
index 0000000..8ca3527
--- /dev/null
+++ b/e2fsck/recovery.c
@@ -0,0 +1,931 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * linux/fs/jbd2/recovery.c
+ *
+ * Written by Stephen C. Tweedie <sct@redhat.com>, 1999
+ *
+ * Copyright 1999-2000 Red Hat Software --- All Rights Reserved
+ *
+ * Journal recovery routines for the generic filesystem journaling code;
+ * part of the ext2fs journaling system.
+ */
+
+#ifndef __KERNEL__
+#include "jfs_user.h"
+#else
+#include <linux/time.h>
+#include <linux/fs.h>
+#include <linux/jbd2.h>
+#include <linux/errno.h>
+#include <linux/crc32.h>
+#include <linux/blkdev.h>
+#endif
+
+/*
+ * Maintain information about the progress of the recovery job, so that
+ * the different passes can carry information between them.
+ */
+struct recovery_info
+{
+ tid_t start_transaction;
+ tid_t end_transaction;
+
+ int nr_replays;
+ int nr_revokes;
+ int nr_revoke_hits;
+};
+
+static int do_one_pass(journal_t *journal,
+ struct recovery_info *info, enum passtype pass);
+static int scan_revoke_records(journal_t *, struct buffer_head *,
+ tid_t, struct recovery_info *);
+
+#ifdef __KERNEL__
+
+/* Release readahead buffers after use */
+static void journal_brelse_array(struct buffer_head *b[], int n)
+{
+ while (--n >= 0)
+ brelse (b[n]);
+}
+
+
+/*
+ * When reading from the journal, we are going through the block device
+ * layer directly and so there is no readahead being done for us. We
+ * need to implement any readahead ourselves if we want it to happen at
+ * all. Recovery is basically one long sequential read, so make sure we
+ * do the IO in reasonably large chunks.
+ *
+ * This is not so critical that we need to be enormously clever about
+ * the readahead size, though. 128K is a purely arbitrary, good-enough
+ * fixed value.
+ */
+
+#define MAXBUF 8
+static int do_readahead(journal_t *journal, unsigned int start)
+{
+ int err;
+ unsigned int max, nbufs, next;
+ unsigned long long blocknr;
+ struct buffer_head *bh;
+
+ struct buffer_head * bufs[MAXBUF];
+
+ /* Do up to 128K of readahead */
+ max = start + (128 * 1024 / journal->j_blocksize);
+ if (max > journal->j_total_len)
+ max = journal->j_total_len;
+
+ /* Do the readahead itself. We'll submit MAXBUF buffer_heads at
+ * a time to the block device IO layer. */
+
+ nbufs = 0;
+
+ for (next = start; next < max; next++) {
+ err = jbd2_journal_bmap(journal, next, &blocknr);
+
+ if (err) {
+ printk(KERN_ERR "JBD2: bad block at offset %u\n",
+ next);
+ goto failed;
+ }
+
+ bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
+ if (!bh) {
+ err = -ENOMEM;
+ goto failed;
+ }
+
+ if (!buffer_uptodate(bh) && !buffer_locked(bh)) {
+ bufs[nbufs++] = bh;
+ if (nbufs == MAXBUF) {
+ ll_rw_block(REQ_OP_READ, 0, nbufs, bufs);
+ journal_brelse_array(bufs, nbufs);
+ nbufs = 0;
+ }
+ } else
+ brelse(bh);
+ }
+
+ if (nbufs)
+ ll_rw_block(REQ_OP_READ, 0, nbufs, bufs);
+ err = 0;
+
+failed:
+ if (nbufs)
+ journal_brelse_array(bufs, nbufs);
+ return err;
+}
+
+#endif /* __KERNEL__ */
+
+
+/*
+ * Read a block from the journal
+ */
+
+static int jread(struct buffer_head **bhp, journal_t *journal,
+ unsigned int offset)
+{
+ int err;
+ unsigned long long blocknr;
+ struct buffer_head *bh;
+
+ *bhp = NULL;
+
+ if (offset >= journal->j_total_len) {
+ printk(KERN_ERR "JBD2: corrupted journal superblock\n");
+ return -EFSCORRUPTED;
+ }
+
+ err = jbd2_journal_bmap(journal, offset, &blocknr);
+
+ if (err) {
+ printk(KERN_ERR "JBD2: bad block at offset %u\n",
+ offset);
+ return err;
+ }
+
+ bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
+ if (!bh)
+ return -ENOMEM;
+
+ if (!buffer_uptodate(bh)) {
+ /* If this is a brand new buffer, start readahead.
+ Otherwise, we assume we are already reading it. */
+ if (!buffer_req(bh))
+ do_readahead(journal, offset);
+ wait_on_buffer(bh);
+ }
+
+ if (!buffer_uptodate(bh)) {
+ printk(KERN_ERR "JBD2: Failed to read block at offset %u\n",
+ offset);
+ brelse(bh);
+ return -EIO;
+ }
+
+ *bhp = bh;
+ return 0;
+}
+
+static int jbd2_descriptor_block_csum_verify(journal_t *j, void *buf)
+{
+ struct jbd2_journal_block_tail *tail;
+ __be32 provided;
+ __u32 calculated;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 1;
+
+ tail = (struct jbd2_journal_block_tail *)((char *)buf +
+ j->j_blocksize - sizeof(struct jbd2_journal_block_tail));
+ provided = tail->t_checksum;
+ tail->t_checksum = 0;
+ calculated = jbd2_chksum(j, j->j_csum_seed, buf, j->j_blocksize);
+ tail->t_checksum = provided;
+
+ return provided == cpu_to_be32(calculated);
+}
+
+/*
+ * Count the number of in-use tags in a journal descriptor block.
+ */
+
+static int count_tags(journal_t *journal, struct buffer_head *bh)
+{
+ char * tagp;
+ journal_block_tag_t tag;
+ int nr = 0, size = journal->j_blocksize;
+ int tag_bytes = journal_tag_bytes(journal);
+
+ if (jbd2_journal_has_csum_v2or3(journal))
+ size -= sizeof(struct jbd2_journal_block_tail);
+
+ tagp = &bh->b_data[sizeof(journal_header_t)];
+
+ while ((tagp - bh->b_data + tag_bytes) <= size) {
+ memcpy(&tag, tagp, sizeof(tag));
+
+ nr++;
+ tagp += tag_bytes;
+ if (!(tag.t_flags & cpu_to_be16(JBD2_FLAG_SAME_UUID)))
+ tagp += 16;
+
+ if (tag.t_flags & cpu_to_be16(JBD2_FLAG_LAST_TAG))
+ break;
+ }
+
+ return nr;
+}
+
+
+/* Make sure we wrap around the log correctly! */
+#define wrap(journal, var) \
+do { \
+ unsigned long _wrap_last = \
+ jbd2_has_feature_fast_commit(journal) ? \
+ (journal)->j_fc_last : (journal)->j_last; \
+ \
+ if (var >= _wrap_last) \
+ var -= (_wrap_last - (journal)->j_first); \
+} while (0)
+
+static int fc_do_one_pass(journal_t *journal,
+ struct recovery_info *info, enum passtype pass)
+{
+ unsigned int expected_commit_id = info->end_transaction;
+ unsigned long next_fc_block;
+ struct buffer_head *bh;
+ int err = 0;
+
+ next_fc_block = journal->j_fc_first;
+ if (!journal->j_fc_replay_callback)
+ return 0;
+
+ while (next_fc_block <= journal->j_fc_last) {
+ jbd_debug(3, "Fast commit replay: next block %ld\n",
+ next_fc_block);
+ err = jread(&bh, journal, next_fc_block);
+ if (err) {
+ jbd_debug(3, "Fast commit replay: read error\n");
+ break;
+ }
+
+ err = journal->j_fc_replay_callback(journal, bh, pass,
+ next_fc_block - journal->j_fc_first,
+ expected_commit_id);
+ next_fc_block++;
+ if (err < 0 || err == JBD2_FC_REPLAY_STOP)
+ break;
+ err = 0;
+ }
+
+ if (err)
+ jbd_debug(3, "Fast commit replay failed, err = %d\n", err);
+
+ return err;
+}
+
+/**
+ * jbd2_journal_recover - recovers a on-disk journal
+ * @journal: the journal to recover
+ *
+ * The primary function for recovering the log contents when mounting a
+ * journaled device.
+ *
+ * Recovery is done in three passes. In the first pass, we look for the
+ * end of the log. In the second, we assemble the list of revoke
+ * blocks. In the third and final pass, we replay any un-revoked blocks
+ * in the log.
+ */
+int jbd2_journal_recover(journal_t *journal)
+{
+ int err, err2;
+ journal_superblock_t * sb;
+
+ struct recovery_info info;
+
+ memset(&info, 0, sizeof(info));
+ sb = journal->j_superblock;
+
+ /*
+ * The journal superblock's s_start field (the current log head)
+ * is always zero if, and only if, the journal was cleanly
+ * unmounted.
+ */
+
+ if (!sb->s_start) {
+ jbd_debug(1, "No recovery required, last transaction %d\n",
+ be32_to_cpu(sb->s_sequence));
+ journal->j_transaction_sequence = be32_to_cpu(sb->s_sequence) + 1;
+ return 0;
+ }
+
+ err = do_one_pass(journal, &info, PASS_SCAN);
+ if (!err)
+ err = do_one_pass(journal, &info, PASS_REVOKE);
+ if (!err)
+ err = do_one_pass(journal, &info, PASS_REPLAY);
+
+ jbd_debug(1, "JBD2: recovery, exit status %d, "
+ "recovered transactions %u to %u\n",
+ err, info.start_transaction, info.end_transaction);
+ jbd_debug(1, "JBD2: Replayed %d and revoked %d/%d blocks\n",
+ info.nr_replays, info.nr_revoke_hits, info.nr_revokes);
+
+ /* Restart the log at the next transaction ID, thus invalidating
+ * any existing commit records in the log. */
+ journal->j_transaction_sequence = ++info.end_transaction;
+
+ jbd2_journal_clear_revoke(journal);
+ err2 = sync_blockdev(journal->j_fs_dev);
+ if (!err)
+ err = err2;
+ /* Make sure all replayed data is on permanent storage */
+ if (journal->j_flags & JBD2_BARRIER) {
+ err2 = blkdev_issue_flush(journal->j_fs_dev);
+ if (!err)
+ err = err2;
+ }
+ return err;
+}
+
+/**
+ * jbd2_journal_skip_recovery - Start journal and wipe exiting records
+ * @journal: journal to startup
+ *
+ * Locate any valid recovery information from the journal and set up the
+ * journal structures in memory to ignore it (presumably because the
+ * caller has evidence that it is out of date).
+ * This function doesn't appear to be exported..
+ *
+ * We perform one pass over the journal to allow us to tell the user how
+ * much recovery information is being erased, and to let us initialise
+ * the journal transaction sequence numbers to the next unused ID.
+ */
+int jbd2_journal_skip_recovery(journal_t *journal)
+{
+ int err;
+
+ struct recovery_info info;
+
+ memset (&info, 0, sizeof(info));
+
+ err = do_one_pass(journal, &info, PASS_SCAN);
+
+ if (err) {
+ printk(KERN_ERR "JBD2: error %d scanning journal\n", err);
+ ++journal->j_transaction_sequence;
+ } else {
+#ifdef CONFIG_JBD2_DEBUG
+ int dropped = info.end_transaction -
+ be32_to_cpu(journal->j_superblock->s_sequence);
+ jbd_debug(1,
+ "JBD2: ignoring %d transaction%s from the journal.\n",
+ dropped, (dropped == 1) ? "" : "s");
+#endif
+ journal->j_transaction_sequence = ++info.end_transaction;
+ }
+
+ journal->j_tail = 0;
+ return err;
+}
+
+static inline unsigned long long read_tag_block(journal_t *journal,
+ journal_block_tag_t *tag)
+{
+ unsigned long long block = be32_to_cpu(tag->t_blocknr);
+ if (jbd2_has_feature_64bit(journal))
+ block |= (u64)be32_to_cpu(tag->t_blocknr_high) << 32;
+ return block;
+}
+
+/*
+ * calc_chksums calculates the checksums for the blocks described in the
+ * descriptor block.
+ */
+static int calc_chksums(journal_t *journal, struct buffer_head *bh,
+ unsigned long *next_log_block, __u32 *crc32_sum)
+{
+ int i, num_blks, err;
+ unsigned long io_block;
+ struct buffer_head *obh;
+
+ num_blks = count_tags(journal, bh);
+ /* Calculate checksum of the descriptor block. */
+ *crc32_sum = crc32_be(*crc32_sum, (void *)bh->b_data, bh->b_size);
+
+ for (i = 0; i < num_blks; i++) {
+ io_block = (*next_log_block)++;
+ wrap(journal, *next_log_block);
+ err = jread(&obh, journal, io_block);
+ if (err) {
+ printk(KERN_ERR "JBD2: IO error %d recovering block "
+ "%lu in log\n", err, io_block);
+ return 1;
+ } else {
+ *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
+ obh->b_size);
+ }
+ put_bh(obh);
+ }
+ return 0;
+}
+
+static int jbd2_commit_block_csum_verify(journal_t *j, void *buf)
+{
+ struct commit_header *h;
+ __be32 provided;
+ __u32 calculated;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 1;
+
+ h = buf;
+ provided = h->h_chksum[0];
+ h->h_chksum[0] = 0;
+ calculated = jbd2_chksum(j, j->j_csum_seed, buf, j->j_blocksize);
+ h->h_chksum[0] = provided;
+
+ return provided == cpu_to_be32(calculated);
+}
+
+static int jbd2_block_tag_csum_verify(journal_t *j, journal_block_tag_t *tag,
+ journal_block_tag3_t *tag3,
+ void *buf, __u32 sequence)
+{
+ __u32 csum32;
+ __be32 seq;
+
+ if (!jbd2_journal_has_csum_v2or3(j))
+ return 1;
+
+ seq = cpu_to_be32(sequence);
+ csum32 = jbd2_chksum(j, j->j_csum_seed, (__u8 *)&seq, sizeof(seq));
+ csum32 = jbd2_chksum(j, csum32, buf, j->j_blocksize);
+
+ if (jbd2_has_feature_csum3(j))
+ return tag3->t_checksum == cpu_to_be32(csum32);
+ else
+ return tag->t_checksum == cpu_to_be16(csum32);
+}
+
+static int do_one_pass(journal_t *journal,
+ struct recovery_info *info, enum passtype pass)
+{
+ unsigned int first_commit_ID, next_commit_ID;
+ unsigned long next_log_block;
+ int err, success = 0;
+ journal_superblock_t * sb;
+ journal_header_t * tmp;
+ struct buffer_head * bh;
+ unsigned int sequence;
+ int blocktype;
+ int tag_bytes = journal_tag_bytes(journal);
+ __u32 crc32_sum = ~0; /* Transactional Checksums */
+ int descr_csum_size = 0;
+ int block_error = 0;
+ bool need_check_commit_time = false;
+ __u64 last_trans_commit_time = 0, commit_time;
+
+ /*
+ * First thing is to establish what we expect to find in the log
+ * (in terms of transaction IDs), and where (in terms of log
+ * block offsets): query the superblock.
+ */
+
+ sb = journal->j_superblock;
+ next_commit_ID = be32_to_cpu(sb->s_sequence);
+ next_log_block = be32_to_cpu(sb->s_start);
+
+ first_commit_ID = next_commit_ID;
+ if (pass == PASS_SCAN)
+ info->start_transaction = first_commit_ID;
+
+ jbd_debug(1, "Starting recovery pass %d\n", pass);
+
+ /*
+ * Now we walk through the log, transaction by transaction,
+ * making sure that each transaction has a commit block in the
+ * expected place. Each complete transaction gets replayed back
+ * into the main filesystem.
+ */
+
+ while (1) {
+ int flags;
+ char * tagp;
+ journal_block_tag_t tag;
+ struct buffer_head * obh;
+ struct buffer_head * nbh;
+
+ cond_resched();
+
+ /* If we already know where to stop the log traversal,
+ * check right now that we haven't gone past the end of
+ * the log. */
+
+ if (pass != PASS_SCAN)
+ if (tid_geq(next_commit_ID, info->end_transaction))
+ break;
+
+ jbd_debug(2, "Scanning for sequence ID %u at %lu/%lu\n",
+ next_commit_ID, next_log_block,
+ jbd2_has_feature_fast_commit(journal) ?
+ journal->j_fc_last : journal->j_last);
+
+ /* Skip over each chunk of the transaction looking
+ * either the next descriptor block or the final commit
+ * record. */
+
+ jbd_debug(3, "JBD2: checking block %ld\n", next_log_block);
+ err = jread(&bh, journal, next_log_block);
+ if (err)
+ goto failed;
+
+ next_log_block++;
+ wrap(journal, next_log_block);
+
+ /* What kind of buffer is it?
+ *
+ * If it is a descriptor block, check that it has the
+ * expected sequence number. Otherwise, we're all done
+ * here. */
+
+ tmp = (journal_header_t *)bh->b_data;
+
+ if (tmp->h_magic != cpu_to_be32(JBD2_MAGIC_NUMBER)) {
+ brelse(bh);
+ break;
+ }
+
+ blocktype = be32_to_cpu(tmp->h_blocktype);
+ sequence = be32_to_cpu(tmp->h_sequence);
+ jbd_debug(3, "Found magic %d, sequence %d\n",
+ blocktype, sequence);
+
+ if (sequence != next_commit_ID) {
+ brelse(bh);
+ break;
+ }
+
+ /* OK, we have a valid descriptor block which matches
+ * all of the sequence number checks. What are we going
+ * to do with it? That depends on the pass... */
+
+ switch(blocktype) {
+ case JBD2_DESCRIPTOR_BLOCK:
+ /* Verify checksum first */
+ if (jbd2_journal_has_csum_v2or3(journal))
+ descr_csum_size =
+ sizeof(struct jbd2_journal_block_tail);
+ if (descr_csum_size > 0 &&
+ !jbd2_descriptor_block_csum_verify(journal,
+ bh->b_data)) {
+ /*
+ * PASS_SCAN can see stale blocks due to lazy
+ * journal init. Don't error out on those yet.
+ */
+ if (pass != PASS_SCAN) {
+ pr_err("JBD2: Invalid checksum recovering block %lu in log\n",
+ next_log_block);
+ err = -EFSBADCRC;
+ brelse(bh);
+ goto failed;
+ }
+ need_check_commit_time = true;
+ jbd_debug(1,
+ "invalid descriptor block found in %lu\n",
+ next_log_block);
+ }
+
+ /* If it is a valid descriptor block, replay it
+ * in pass REPLAY; if journal_checksums enabled, then
+ * calculate checksums in PASS_SCAN, otherwise,
+ * just skip over the blocks it describes. */
+ if (pass != PASS_REPLAY) {
+ if (pass == PASS_SCAN &&
+ jbd2_has_feature_checksum(journal) &&
+ !need_check_commit_time &&
+ !info->end_transaction) {
+ if (calc_chksums(journal, bh,
+ &next_log_block,
+ &crc32_sum)) {
+ put_bh(bh);
+ break;
+ }
+ put_bh(bh);
+ continue;
+ }
+ next_log_block += count_tags(journal, bh);
+ wrap(journal, next_log_block);
+ put_bh(bh);
+ continue;
+ }
+
+ /* A descriptor block: we can now write all of
+ * the data blocks. Yay, useful work is finally
+ * getting done here! */
+
+ tagp = &bh->b_data[sizeof(journal_header_t)];
+ while ((tagp - bh->b_data + tag_bytes)
+ <= journal->j_blocksize - descr_csum_size) {
+ unsigned long io_block;
+
+ memcpy(&tag, tagp, sizeof(tag));
+ flags = be16_to_cpu(tag.t_flags);
+
+ io_block = next_log_block++;
+ wrap(journal, next_log_block);
+ err = jread(&obh, journal, io_block);
+ if (err) {
+ /* Recover what we can, but
+ * report failure at the end. */
+ success = err;
+ printk(KERN_ERR
+ "JBD2: IO error %d recovering "
+ "block %ld in log\n",
+ err, io_block);
+ } else {
+ unsigned long long blocknr;
+
+ J_ASSERT(obh != NULL);
+ blocknr = read_tag_block(journal,
+ &tag);
+
+ /* If the block has been
+ * revoked, then we're all done
+ * here. */
+ if (jbd2_journal_test_revoke
+ (journal, blocknr,
+ next_commit_ID)) {
+ brelse(obh);
+ ++info->nr_revoke_hits;
+ goto skip_write;
+ }
+
+ /* Look for block corruption */
+ if (!jbd2_block_tag_csum_verify(
+ journal, &tag, (journal_block_tag3_t *)tagp,
+ obh->b_data, be32_to_cpu(tmp->h_sequence))) {
+ brelse(obh);
+ success = -EFSBADCRC;
+ printk(KERN_ERR "JBD2: Invalid "
+ "checksum recovering "
+ "data block %llu in "
+ "log\n", blocknr);
+ block_error = 1;
+ goto skip_write;
+ }
+
+ /* Find a buffer for the new
+ * data being restored */
+ nbh = __getblk(journal->j_fs_dev,
+ blocknr,
+ journal->j_blocksize);
+ if (nbh == NULL) {
+ printk(KERN_ERR
+ "JBD2: Out of memory "
+ "during recovery.\n");
+ err = -ENOMEM;
+ brelse(bh);
+ brelse(obh);
+ goto failed;
+ }
+
+ lock_buffer(nbh);
+ memcpy(nbh->b_data, obh->b_data,
+ journal->j_blocksize);
+ if (flags & JBD2_FLAG_ESCAPE) {
+ *((__be32 *)nbh->b_data) =
+ cpu_to_be32(JBD2_MAGIC_NUMBER);
+ }
+
+ BUFFER_TRACE(nbh, "marking dirty");
+ set_buffer_uptodate(nbh);
+ mark_buffer_dirty(nbh);
+ BUFFER_TRACE(nbh, "marking uptodate");
+ ++info->nr_replays;
+ /* ll_rw_block(WRITE, 1, &nbh); */
+ unlock_buffer(nbh);
+ brelse(obh);
+ brelse(nbh);
+ }
+
+ skip_write:
+ tagp += tag_bytes;
+ if (!(flags & JBD2_FLAG_SAME_UUID))
+ tagp += 16;
+
+ if (flags & JBD2_FLAG_LAST_TAG)
+ break;
+ }
+
+ brelse(bh);
+ continue;
+
+ case JBD2_COMMIT_BLOCK:
+ /* How to differentiate between interrupted commit
+ * and journal corruption ?
+ *
+ * {nth transaction}
+ * Checksum Verification Failed
+ * |
+ * ____________________
+ * | |
+ * async_commit sync_commit
+ * | |
+ * | GO TO NEXT "Journal Corruption"
+ * | TRANSACTION
+ * |
+ * {(n+1)th transanction}
+ * |
+ * _______|______________
+ * | |
+ * Commit block found Commit block not found
+ * | |
+ * "Journal Corruption" |
+ * _____________|_________
+ * | |
+ * nth trans corrupt OR nth trans
+ * and (n+1)th interrupted interrupted
+ * before commit block
+ * could reach the disk.
+ * (Cannot find the difference in above
+ * mentioned conditions. Hence assume
+ * "Interrupted Commit".)
+ */
+ commit_time = be64_to_cpu(
+ ((struct commit_header *)bh->b_data)->h_commit_sec);
+ /*
+ * If need_check_commit_time is set, it means we are in
+ * PASS_SCAN and csum verify failed before. If
+ * commit_time is increasing, it's the same journal,
+ * otherwise it is stale journal block, just end this
+ * recovery.
+ */
+ if (need_check_commit_time) {
+ if (commit_time >= last_trans_commit_time) {
+ pr_err("JBD2: Invalid checksum found in transaction %u\n",
+ next_commit_ID);
+ err = -EFSBADCRC;
+ brelse(bh);
+ goto failed;
+ }
+ ignore_crc_mismatch:
+ /*
+ * It likely does not belong to same journal,
+ * just end this recovery with success.
+ */
+ jbd_debug(1, "JBD2: Invalid checksum ignored in transaction %u, likely stale data\n",
+ next_commit_ID);
+ brelse(bh);
+ goto done;
+ }
+
+ /*
+ * Found an expected commit block: if checksums
+ * are present, verify them in PASS_SCAN; else not
+ * much to do other than move on to the next sequence
+ * number.
+ */
+ if (pass == PASS_SCAN &&
+ jbd2_has_feature_checksum(journal)) {
+ struct commit_header *cbh =
+ (struct commit_header *)bh->b_data;
+ unsigned found_chksum =
+ be32_to_cpu(cbh->h_chksum[0]);
+
+ if (info->end_transaction) {
+ journal->j_failed_commit =
+ info->end_transaction;
+ brelse(bh);
+ break;
+ }
+
+ /* Neither checksum match nor unused? */
+ if (!((crc32_sum == found_chksum &&
+ cbh->h_chksum_type ==
+ JBD2_CRC32_CHKSUM &&
+ cbh->h_chksum_size ==
+ JBD2_CRC32_CHKSUM_SIZE) ||
+ (cbh->h_chksum_type == 0 &&
+ cbh->h_chksum_size == 0 &&
+ found_chksum == 0)))
+ goto chksum_error;
+
+ crc32_sum = ~0;
+ }
+ if (pass == PASS_SCAN &&
+ !jbd2_commit_block_csum_verify(journal,
+ bh->b_data)) {
+ chksum_error:
+ if (commit_time < last_trans_commit_time)
+ goto ignore_crc_mismatch;
+ info->end_transaction = next_commit_ID;
+
+ if (!jbd2_has_feature_async_commit(journal)) {
+ journal->j_failed_commit =
+ next_commit_ID;
+ brelse(bh);
+ break;
+ }
+ }
+ if (pass == PASS_SCAN)
+ last_trans_commit_time = commit_time;
+ brelse(bh);
+ next_commit_ID++;
+ continue;
+
+ case JBD2_REVOKE_BLOCK:
+ /*
+ * Check revoke block crc in pass_scan, if csum verify
+ * failed, check commit block time later.
+ */
+ if (pass == PASS_SCAN &&
+ !jbd2_descriptor_block_csum_verify(journal,
+ bh->b_data)) {
+ jbd_debug(1, "JBD2: invalid revoke block found in %lu\n",
+ next_log_block);
+ need_check_commit_time = true;
+ }
+ /* If we aren't in the REVOKE pass, then we can
+ * just skip over this block. */
+ if (pass != PASS_REVOKE) {
+ brelse(bh);
+ continue;
+ }
+
+ err = scan_revoke_records(journal, bh,
+ next_commit_ID, info);
+ brelse(bh);
+ if (err)
+ goto failed;
+ continue;
+
+ default:
+ jbd_debug(3, "Unrecognised magic %d, end of scan.\n",
+ blocktype);
+ brelse(bh);
+ goto done;
+ }
+ }
+
+ done:
+ /*
+ * We broke out of the log scan loop: either we came to the
+ * known end of the log or we found an unexpected block in the
+ * log. If the latter happened, then we know that the "current"
+ * transaction marks the end of the valid log.
+ */
+
+ if (pass == PASS_SCAN) {
+ if (!info->end_transaction)
+ info->end_transaction = next_commit_ID;
+ } else {
+ /* It's really bad news if different passes end up at
+ * different places (but possible due to IO errors). */
+ if (info->end_transaction != next_commit_ID) {
+ printk(KERN_ERR "JBD2: recovery pass %d ended at "
+ "transaction %u, expected %u\n",
+ pass, next_commit_ID, info->end_transaction);
+ if (!success)
+ success = -EIO;
+ }
+ }
+
+ if (jbd2_has_feature_fast_commit(journal) && pass != PASS_REVOKE) {
+ err = fc_do_one_pass(journal, info, pass);
+ if (err)
+ success = err;
+ }
+
+ if (block_error && success == 0)
+ success = -EIO;
+ return success;
+
+ failed:
+ return err;
+}
+
+/* Scan a revoke record, marking all blocks mentioned as revoked. */
+
+static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
+ tid_t sequence, struct recovery_info *info)
+{
+ jbd2_journal_revoke_header_t *header;
+ int offset, max;
+ unsigned csum_size = 0;
+ __u32 rcount;
+ int record_len = 4;
+
+ header = (jbd2_journal_revoke_header_t *) bh->b_data;
+ offset = sizeof(jbd2_journal_revoke_header_t);
+ rcount = be32_to_cpu(header->r_count);
+
+ if (jbd2_journal_has_csum_v2or3(journal))
+ csum_size = sizeof(struct jbd2_journal_block_tail);
+ if (rcount > journal->j_blocksize - csum_size)
+ return -EINVAL;
+ max = rcount;
+
+ if (jbd2_has_feature_64bit(journal))
+ record_len = 8;
+
+ while (offset + record_len <= max) {
+ unsigned long long blocknr;
+ int err;
+
+ if (record_len == 4)
+ blocknr = be32_to_cpu(* ((__be32 *) (bh->b_data+offset)));
+ else
+ blocknr = be64_to_cpu(* ((__be64 *) (bh->b_data+offset)));
+ offset += record_len;
+ err = jbd2_journal_set_revoke(journal, blocknr, sequence);
+ if (err)
+ return err;
+ ++info->nr_revokes;
+ }
+ return 0;
+}
diff --git a/e2fsck/region.c b/e2fsck/region.c
new file mode 100644
index 0000000..698f7bd
--- /dev/null
+++ b/e2fsck/region.c
@@ -0,0 +1,236 @@
+/*
+ * region.c --- code which manages allocations within a region.
+ *
+ * Copyright (C) 2001 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+
+#ifdef TEST_PROGRAM
+#undef ENABLE_NLS
+#endif
+#include "e2fsck.h"
+
+struct region_el {
+ region_addr_t start;
+ region_addr_t end;
+ struct region_el *next;
+};
+
+struct region_struct {
+ region_addr_t min;
+ region_addr_t max;
+ struct region_el *allocated;
+ struct region_el *last;
+};
+
+region_t region_create(region_addr_t min, region_addr_t max)
+{
+ region_t region;
+ errcode_t retval;
+
+ retval = ext2fs_get_memzero(sizeof(struct region_struct), &region);
+ if (retval)
+ return NULL;
+
+ region->min = min;
+ region->max = max;
+ region->last = NULL;
+ return region;
+}
+
+void region_free(region_t region)
+{
+ struct region_el *r, *next;
+
+ for (r = region->allocated; r; r = next) {
+ next = r->next;
+ ext2fs_free_mem(&r);
+ }
+ memset(region, 0, sizeof(struct region_struct));
+ ext2fs_free_mem(&region);
+}
+
+int region_allocate(region_t region, region_addr_t start, int n)
+{
+ struct region_el *r, *new_region, *prev, *next;
+ region_addr_t end;
+ errcode_t retval;
+
+ end = start+n;
+ if ((start < region->min) || (end > region->max))
+ return -1;
+ if (n == 0)
+ return 1;
+
+ if (region->last && region->last->end == start &&
+ !region->last->next) {
+ region->last->end = end;
+ return 0;
+ }
+ if (region->last && start > region->last->end &&
+ !region->last->next) {
+ r = NULL;
+ prev = region->last;
+ goto append_to_list;
+ }
+
+ /*
+ * Search through the linked list. If we find that it
+ * conflicts with something that's already allocated, return
+ * 1; if we can find an existing region which we can grow, do
+ * so. Otherwise, stop when we find the appropriate place
+ * insert a new region element into the linked list.
+ */
+ for (r = region->allocated, prev=NULL; r; prev = r, r = r->next) {
+ if (((start >= r->start) && (start < r->end)) ||
+ ((end > r->start) && (end <= r->end)) ||
+ ((start <= r->start) && (end >= r->end)))
+ return 1;
+ if (end == r->start) {
+ r->start = start;
+ return 0;
+ }
+ if (start == r->end) {
+ if ((next = r->next)) {
+ if (end > next->start)
+ return 1;
+ if (end == next->start) {
+ r->end = next->end;
+ r->next = next->next;
+ ext2fs_free_mem(&next);
+ if (!r->next)
+ region->last = r;
+ return 0;
+ }
+ }
+ r->end = end;
+ return 0;
+ }
+ if (start < r->start)
+ break;
+ }
+ /*
+ * Insert a new region element structure into the linked list
+ */
+append_to_list:
+ retval = ext2fs_get_mem(sizeof(struct region_el), &new_region);
+ if (retval)
+ return -1;
+ new_region->start = start;
+ new_region->end = start + n;
+ new_region->next = r;
+ if (!new_region->next)
+ region->last = new_region;
+ if (prev)
+ prev->next = new_region;
+ else
+ region->allocated = new_region;
+ return 0;
+}
+
+#ifdef TEST_PROGRAM
+#include <stdio.h>
+
+#define BCODE_END 0
+#define BCODE_CREATE 1
+#define BCODE_FREE 2
+#define BCODE_ALLOCATE 3
+#define BCODE_PRINT 4
+
+int bcode_program[] = {
+ BCODE_CREATE, 1, 1001,
+ BCODE_PRINT,
+ BCODE_ALLOCATE, 10, 10,
+ BCODE_ALLOCATE, 30, 10,
+ BCODE_PRINT,
+ BCODE_ALLOCATE, 1, 15,
+ BCODE_ALLOCATE, 15, 8,
+ BCODE_ALLOCATE, 1, 20,
+ BCODE_ALLOCATE, 1, 8,
+ BCODE_PRINT,
+ BCODE_ALLOCATE, 40, 10,
+ BCODE_PRINT,
+ BCODE_ALLOCATE, 22, 5,
+ BCODE_PRINT,
+ BCODE_ALLOCATE, 27, 3,
+ BCODE_PRINT,
+ BCODE_ALLOCATE, 20, 2,
+ BCODE_PRINT,
+ BCODE_ALLOCATE, 49, 1,
+ BCODE_ALLOCATE, 50, 5,
+ BCODE_ALLOCATE, 9, 2,
+ BCODE_ALLOCATE, 9, 1,
+ BCODE_PRINT,
+ BCODE_FREE,
+ BCODE_END
+};
+
+void region_print(region_t region, FILE *f)
+{
+ struct region_el *r;
+ int i = 0;
+
+ fprintf(f, "Printing region (min=%llu. max=%llu)\n\t",
+ (unsigned long long) region->min,
+ (unsigned long long) region->max);
+ for (r = region->allocated; r; r = r->next) {
+ fprintf(f, "(%llu, %llu) ",
+ (unsigned long long) r->start,
+ (unsigned long long) r->end);
+ if (++i >= 8)
+ fprintf(f, "\n\t");
+ }
+ fprintf(f, "\n");
+}
+
+int main(int argc, char **argv)
+{
+ region_t r = NULL;
+ int pc = 0, ret;
+ region_addr_t start, end;
+
+
+ while (1) {
+ switch (bcode_program[pc++]) {
+ case BCODE_END:
+ exit(0);
+ case BCODE_CREATE:
+ start = bcode_program[pc++];
+ end = bcode_program[pc++];
+ printf("Creating region with args(%llu, %llu)\n",
+ (unsigned long long) start,
+ (unsigned long long) end);
+ r = region_create(start, end);
+ if (!r) {
+ fprintf(stderr, "Couldn't create region.\n");
+ exit(1);
+ }
+ break;
+ case BCODE_ALLOCATE:
+ start = bcode_program[pc++];
+ end = bcode_program[pc++];
+ ret = region_allocate(r, start, end);
+ printf("Region_allocate(%llu, %llu) returns %d\n",
+ (unsigned long long) start,
+ (unsigned long long) end, ret);
+ break;
+ case BCODE_PRINT:
+ region_print(r, stdout);
+ break;
+ }
+ }
+ if (r)
+ region_free(r);
+}
+
+#endif /* TEST_PROGRAM */
diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
new file mode 100644
index 0000000..c1da7d5
--- /dev/null
+++ b/e2fsck/rehash.c
@@ -0,0 +1,1189 @@
+/*
+ * rehash.c --- rebuild hash tree directories
+ *
+ * Copyright (C) 2002 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * This algorithm is designed for simplicity of implementation and to
+ * pack the directory as much as possible. It however requires twice
+ * as much memory as the size of the directory. The maximum size
+ * directory supported using a 4k blocksize is roughly a gigabyte, and
+ * so there may very well be problems with machines that don't have
+ * virtual memory, and obscenely large directories.
+ *
+ * An alternate algorithm which is much more disk intensive could be
+ * written, and probably will need to be written in the future. The
+ * design goals of such an algorithm are: (a) use (roughly) constant
+ * amounts of memory, no matter how large the directory, (b) the
+ * directory must be safe at all times, even if e2fsck is interrupted
+ * in the middle, (c) we must use minimal amounts of extra disk
+ * blocks. This pretty much requires an incremental approach, where
+ * we are reading from one part of the directory, and inserting into
+ * the front half. So the algorithm will have to keep track of a
+ * moving block boundary between the new tree and the old tree, and
+ * files will need to be moved from the old directory and inserted
+ * into the new tree. If the new directory requires space which isn't
+ * yet available, blocks from the beginning part of the old directory
+ * may need to be moved to the end of the directory to make room for
+ * the new tree:
+ *
+ * --------------------------------------------------------
+ * | new tree | | old tree |
+ * --------------------------------------------------------
+ * ^ ptr ^ptr
+ * tail new head old
+ *
+ * This is going to be a pain in the tuckus to implement, and will
+ * require a lot more disk accesses. So I'm going to skip it for now;
+ * it's only really going to be an issue for really, really big
+ * filesystems (when we reach the level of tens of millions of files
+ * in a single directory). It will probably be easier to simply
+ * require that e2fsck use VM first.
+ */
+
+#include "config.h"
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include "e2fsck.h"
+#include "problem.h"
+#include "support/sort_r.h"
+
+/* Schedule a dir to be rebuilt during pass 3A. */
+void e2fsck_rehash_dir_later(e2fsck_t ctx, ext2_ino_t ino)
+{
+ if (!ctx->dirs_to_hash)
+ ext2fs_u32_list_create(&ctx->dirs_to_hash, 50);
+ if (ctx->dirs_to_hash)
+ ext2fs_u32_list_add(ctx->dirs_to_hash, ino);
+}
+
+/* Ask if a dir will be rebuilt during pass 3A. */
+int e2fsck_dir_will_be_rehashed(e2fsck_t ctx, ext2_ino_t ino)
+{
+ if (ctx->options & E2F_OPT_COMPRESS_DIRS)
+ return 1;
+ if (!ctx->dirs_to_hash)
+ return 0;
+ return ext2fs_u32_list_test(ctx->dirs_to_hash, ino);
+}
+
+#undef REHASH_DEBUG
+
+struct fill_dir_struct {
+ char *buf;
+ struct ext2_inode *inode;
+ ext2_ino_t ino;
+ errcode_t err;
+ e2fsck_t ctx;
+ struct hash_entry *harray;
+ blk_t max_array, num_array;
+ ext2_off64_t dir_size;
+ int compress;
+ ext2_ino_t parent;
+ ext2_ino_t dir;
+};
+
+struct hash_entry {
+ ext2_dirhash_t hash;
+ ext2_dirhash_t minor_hash;
+ ext2_ino_t ino;
+ struct ext2_dir_entry *dir;
+};
+
+struct out_dir {
+ blk_t num;
+ blk_t max;
+ char *buf;
+ ext2_dirhash_t *hashes;
+};
+
+#define DOTDOT_OFFSET 12
+
+static int is_fake_entry(ext2_filsys fs, int lblk, unsigned int offset)
+{
+ /* Entries in the first block before this value refer to . or .. */
+ if (lblk == 0 && offset <= DOTDOT_OFFSET)
+ return 1;
+ /* Check if this is likely the csum entry */
+ if (ext2fs_has_feature_metadata_csum(fs->super) &&
+ (offset & (fs->blocksize - 1)) ==
+ fs->blocksize - sizeof(struct ext2_dir_entry_tail))
+ return 1;
+ return 0;
+}
+
+static int fill_dir_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct fill_dir_struct *fd = (struct fill_dir_struct *) priv_data;
+ struct hash_entry *ent;
+ struct ext2_dir_entry *dirent;
+ char *dir;
+ unsigned int offset, dir_offset, rec_len, name_len;
+ int hash_alg, hash_flags, hash_in_entry;
+
+ if (blockcnt < 0)
+ return 0;
+
+ offset = blockcnt * fs->blocksize;
+ if (offset + fs->blocksize > fd->inode->i_size) {
+ fd->err = EXT2_ET_DIR_CORRUPTED;
+ return BLOCK_ABORT;
+ }
+
+ dir = (fd->buf+offset);
+ if (*block_nr == 0) {
+ memset(dir, 0, fs->blocksize);
+ dirent = (struct ext2_dir_entry *) dir;
+ (void) ext2fs_set_rec_len(fs, fs->blocksize, dirent);
+ } else {
+ int flags = fs->flags;
+ fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ fd->err = ext2fs_read_dir_block4(fs, *block_nr, dir, 0,
+ fd->dir);
+ fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+ if (fd->err)
+ return BLOCK_ABORT;
+ }
+ hash_flags = fd->inode->i_flags & EXT4_CASEFOLD_FL;
+ hash_in_entry = ext4_hash_in_dirent(fd->inode);
+ hash_alg = fs->super->s_def_hash_version;
+ if ((hash_alg <= EXT2_HASH_TEA) &&
+ (fs->super->s_flags & EXT2_FLAGS_UNSIGNED_HASH))
+ hash_alg += 3;
+ /* While the directory block is "hot", index it. */
+ dir_offset = 0;
+ while (dir_offset < fs->blocksize) {
+ unsigned int min_rec = EXT2_DIR_ENTRY_HEADER_LEN;
+ int extended = hash_in_entry && !is_fake_entry(fs, blockcnt, dir_offset);
+
+ if (extended)
+ min_rec += EXT2_DIR_ENTRY_HASH_LEN;
+ dirent = (struct ext2_dir_entry *) (dir + dir_offset);
+ (void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+ name_len = ext2fs_dirent_name_len(dirent);
+ if (((dir_offset + rec_len) > fs->blocksize) ||
+ (rec_len < min_rec) ||
+ ((rec_len % 4) != 0) ||
+ (name_len + min_rec > rec_len)) {
+ fd->err = EXT2_ET_DIR_CORRUPTED;
+ return BLOCK_ABORT;
+ }
+ dir_offset += rec_len;
+ if (dirent->inode == 0)
+ continue;
+ if ((name_len) == 0) {
+ fd->err = EXT2_ET_DIR_CORRUPTED;
+ return BLOCK_ABORT;
+ }
+ if (!fd->compress && (name_len == 1) &&
+ (dirent->name[0] == '.'))
+ continue;
+ if (!fd->compress && (name_len == 2) &&
+ (dirent->name[0] == '.') && (dirent->name[1] == '.')) {
+ fd->parent = dirent->inode;
+ continue;
+ }
+ if (fd->num_array >= fd->max_array) {
+ errcode_t retval;
+
+ retval = ext2fs_resize_array(sizeof(struct hash_entry),
+ fd->max_array,
+ fd->max_array + 500,
+ &fd->harray);
+ if (retval) {
+ fd->err = retval;
+ return BLOCK_ABORT;
+ }
+ fd->max_array += 500;
+ }
+ ent = fd->harray + fd->num_array++;
+ ent->dir = dirent;
+ fd->dir_size += ext2fs_dir_rec_len(name_len, extended);
+ ent->ino = dirent->inode;
+ if (extended) {
+ ent->hash = EXT2_DIRENT_HASH(dirent);
+ ent->minor_hash = EXT2_DIRENT_MINOR_HASH(dirent);
+ } else if (fd->compress) {
+ ent->hash = ent->minor_hash = 0;
+ } else {
+ fd->err = ext2fs_dirhash2(hash_alg,
+ dirent->name, name_len,
+ fs->encoding, hash_flags,
+ fs->super->s_hash_seed,
+ &ent->hash, &ent->minor_hash);
+ if (fd->err)
+ return BLOCK_ABORT;
+ }
+ }
+
+ return 0;
+}
+
+/* Used for sorting the hash entry */
+static EXT2_QSORT_TYPE ino_cmp(const void *a, const void *b)
+{
+ const struct hash_entry *he_a = (const struct hash_entry *) a;
+ const struct hash_entry *he_b = (const struct hash_entry *) b;
+
+ return (he_a->ino - he_b->ino);
+}
+
+struct name_cmp_ctx
+{
+ int casefold;
+ const struct ext2fs_nls_table *tbl;
+};
+
+static int same_name(const struct name_cmp_ctx *cmp_ctx, char *s1,
+ int len1, char *s2, int len2)
+{
+ if (!cmp_ctx->casefold)
+ return (len1 == len2 && !memcmp(s1, s2, len1));
+ else
+ return !ext2fs_casefold_cmp(cmp_ctx->tbl,
+ (unsigned char *) s1, len1,
+ (unsigned char *) s2, len2);
+}
+
+/* Used for sorting the hash entry */
+static EXT2_QSORT_TYPE name_cmp(const void *a, const void *b)
+{
+ const struct hash_entry *he_a = (const struct hash_entry *) a;
+ const struct hash_entry *he_b = (const struct hash_entry *) b;
+ unsigned int he_a_len, he_b_len, min_len;
+ int ret;
+
+ he_a_len = ext2fs_dirent_name_len(he_a->dir);
+ he_b_len = ext2fs_dirent_name_len(he_b->dir);
+ min_len = he_a_len;
+ if (min_len > he_b_len)
+ min_len = he_b_len;
+
+ ret = memcmp(he_a->dir->name, he_b->dir->name, min_len);
+ if (ret == 0) {
+ if (he_a_len > he_b_len)
+ ret = 1;
+ else if (he_a_len < he_b_len)
+ ret = -1;
+ else
+ ret = he_b->dir->inode - he_a->dir->inode;
+ }
+ return ret;
+}
+
+static EXT2_QSORT_TYPE name_cf_cmp(const struct name_cmp_ctx *ctx,
+ const void *a, const void *b)
+{
+ const struct hash_entry *he_a = (const struct hash_entry *) a;
+ const struct hash_entry *he_b = (const struct hash_entry *) b;
+ unsigned int he_a_len, he_b_len;
+ int ret;
+
+ he_a_len = ext2fs_dirent_name_len(he_a->dir);
+ he_b_len = ext2fs_dirent_name_len(he_b->dir);
+
+ ret = ext2fs_casefold_cmp(ctx->tbl,
+ (unsigned char *) he_a->dir->name, he_a_len,
+ (unsigned char *) he_b->dir->name, he_b_len);
+ if (ret == 0) {
+ if (he_a_len > he_b_len)
+ ret = 1;
+ else if (he_a_len < he_b_len)
+ ret = -1;
+ else
+ ret = he_b->dir->inode - he_a->dir->inode;
+ }
+ return ret;
+}
+
+/* Used for sorting the hash entry */
+static EXT2_QSORT_TYPE hash_cmp(const void *a, const void *b, void *arg)
+{
+ const struct name_cmp_ctx *ctx = (struct name_cmp_ctx *) arg;
+ const struct hash_entry *he_a = (const struct hash_entry *) a;
+ const struct hash_entry *he_b = (const struct hash_entry *) b;
+ int ret;
+
+ if (he_a->hash > he_b->hash)
+ ret = 1;
+ else if (he_a->hash < he_b->hash)
+ ret = -1;
+ else {
+ if (he_a->minor_hash > he_b->minor_hash)
+ ret = 1;
+ else if (he_a->minor_hash < he_b->minor_hash)
+ ret = -1;
+ else {
+ if (ctx->casefold)
+ ret = name_cf_cmp(ctx, a, b);
+ else
+ ret = name_cmp(a, b);
+ }
+ }
+ return ret;
+}
+
+static errcode_t alloc_size_dir(ext2_filsys fs, struct out_dir *outdir,
+ blk_t blocks)
+{
+ errcode_t retval;
+
+ if (outdir->max) {
+ retval = ext2fs_resize_array(fs->blocksize, outdir->max, blocks,
+ &outdir->buf);
+ if (retval)
+ return retval;
+ retval = ext2fs_resize_array(sizeof(ext2_dirhash_t),
+ outdir->max, blocks,
+ &outdir->hashes);
+ if (retval)
+ return retval;
+ } else {
+ retval = ext2fs_get_array(fs->blocksize, blocks, &outdir->buf);
+ if (retval)
+ return retval;
+ retval = ext2fs_get_array(sizeof(ext2_dirhash_t), blocks,
+ &outdir->hashes);
+ if (retval)
+ return retval;
+ outdir->num = 0;
+ }
+ outdir->max = blocks;
+ return 0;
+}
+
+static void free_out_dir(struct out_dir *outdir)
+{
+ free(outdir->buf);
+ free(outdir->hashes);
+ outdir->max = 0;
+ outdir->num =0;
+}
+
+static errcode_t get_next_block(ext2_filsys fs, struct out_dir *outdir,
+ char ** ret)
+{
+ errcode_t retval;
+
+ if (outdir->num >= outdir->max) {
+ int increment = outdir->max / 10;
+
+ if (increment < 50)
+ increment = 50;
+ retval = alloc_size_dir(fs, outdir, outdir->max + increment);
+ if (retval)
+ return retval;
+ }
+ *ret = outdir->buf + (size_t)outdir->num++ * fs->blocksize;
+ memset(*ret, 0, fs->blocksize);
+ return 0;
+}
+
+/*
+ * This function is used to make a unique filename. We do this by
+ * appending ~0, and then incrementing the number. However, we cannot
+ * expand the length of the filename beyond the padding available in
+ * the directory entry.
+ */
+static void mutate_name(char *str, unsigned int *len)
+{
+ int i;
+ unsigned int l = *len;
+
+ /*
+ * First check to see if it looks the name has been mutated
+ * already
+ */
+ for (i = l-1; i > 0; i--) {
+ if (!isdigit(str[i]))
+ break;
+ }
+ if ((i == (int)l - 1) || (str[i] != '~')) {
+ if (((l-1) & 3) < 2)
+ l += 2;
+ else
+ l = (l+3) & ~3;
+ if (l > 255)
+ l = 255;
+ str[l-2] = '~';
+ str[l-1] = '0';
+ *len = l;
+ return;
+ }
+ for (i = l-1; i >= 0; i--) {
+ if (isdigit(str[i])) {
+ if (str[i] == '9')
+ str[i] = '0';
+ else {
+ str[i]++;
+ return;
+ }
+ continue;
+ }
+ if (i == 1) {
+ if (str[0] == 'z')
+ str[0] = 'A';
+ else if (str[0] == 'Z') {
+ str[0] = '~';
+ str[1] = '0';
+ } else
+ str[0]++;
+ } else if (i > 0) {
+ str[i] = '1';
+ str[i-1] = '~';
+ } else {
+ if (str[0] == '~')
+ str[0] = 'a';
+ else
+ str[0]++;
+ }
+ break;
+ }
+}
+
+static int duplicate_search_and_fix(e2fsck_t ctx, ext2_filsys fs,
+ ext2_ino_t ino,
+ struct fill_dir_struct *fd,
+ const struct name_cmp_ctx *cmp_ctx)
+{
+ struct problem_context pctx;
+ struct hash_entry *ent, *prev;
+ blk_t i, j;
+ int fixed = 0;
+ char new_name[256];
+ unsigned int new_len;
+ int hash_alg;
+ int hash_flags = fd->inode->i_flags & EXT4_CASEFOLD_FL;
+
+ clear_problem_context(&pctx);
+ pctx.ino = ino;
+
+ hash_alg = fs->super->s_def_hash_version;
+ if ((hash_alg <= EXT2_HASH_TEA) &&
+ (fs->super->s_flags & EXT2_FLAGS_UNSIGNED_HASH))
+ hash_alg += 3;
+
+ for (i=1; i < fd->num_array; i++) {
+ ent = fd->harray + i;
+ prev = ent - 1;
+ if (!ent->dir->inode ||
+ !same_name(cmp_ctx, ent->dir->name,
+ ext2fs_dirent_name_len(ent->dir),
+ prev->dir->name,
+ ext2fs_dirent_name_len(prev->dir)))
+ continue;
+ pctx.dirent = ent->dir;
+ if ((ent->dir->inode == prev->dir->inode) &&
+ fix_problem(ctx, PR_2_DUPLICATE_DIRENT, &pctx)) {
+ e2fsck_adjust_inode_count(ctx, ent->dir->inode, -1);
+ ent->dir->inode = 0;
+ fixed++;
+ continue;
+ }
+ /* Can't alter encrypted name without key, so just drop it */
+ if (fd->inode->i_flags & EXT4_ENCRYPT_FL) {
+ if (fix_problem(ctx, PR_2_NON_UNIQUE_FILE_NO_RENAME, &pctx)) {
+ e2fsck_adjust_inode_count(ctx, ent->dir->inode, -1);
+ ent->dir->inode = 0;
+ fixed++;
+ continue;
+ }
+ }
+ new_len = ext2fs_dirent_name_len(ent->dir);
+ if (new_len == 0) {
+ /* should never happen */
+ ext2fs_unmark_valid(fs);
+ continue;
+ }
+ memcpy(new_name, ent->dir->name, new_len);
+ mutate_name(new_name, &new_len);
+ for (j=0; j < fd->num_array; j++) {
+ if ((i==j) ||
+ !same_name(cmp_ctx, new_name, new_len,
+ fd->harray[j].dir->name,
+ ext2fs_dirent_name_len(fd->harray[j].dir))) {
+ continue;
+ }
+ mutate_name(new_name, &new_len);
+
+ j = -1;
+ }
+ new_name[new_len] = 0;
+ pctx.str = new_name;
+ if (fix_problem(ctx, PR_2_NON_UNIQUE_FILE, &pctx)) {
+ memcpy(ent->dir->name, new_name, new_len);
+ ext2fs_dirent_set_name_len(ent->dir, new_len);
+ ext2fs_dirhash2(hash_alg, new_name, new_len,
+ fs->encoding, hash_flags,
+ fs->super->s_hash_seed,
+ &ent->hash, &ent->minor_hash);
+ fixed++;
+ }
+ }
+ return fixed;
+}
+
+
+static errcode_t copy_dir_entries(e2fsck_t ctx,
+ struct fill_dir_struct *fd,
+ struct out_dir *outdir)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ char *block_start;
+ struct hash_entry *ent;
+ struct ext2_dir_entry *dirent;
+ unsigned int rec_len, prev_rec_len, left, slack, offset;
+ blk_t i;
+ ext2_dirhash_t prev_hash;
+ int csum_size = 0;
+ struct ext2_dir_entry_tail *t;
+ int hash_in_entry = ext4_hash_in_dirent(fd->inode);
+ unsigned int min_rec_len = ext2fs_dir_rec_len(1, hash_in_entry);
+
+ if (ctx->htree_slack_percentage == 255) {
+ profile_get_uint(ctx->profile, "options",
+ "indexed_dir_slack_percentage",
+ 0, 20,
+ &ctx->htree_slack_percentage);
+ if (ctx->htree_slack_percentage > 100)
+ ctx->htree_slack_percentage = 20;
+ }
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dir_entry_tail);
+
+ outdir->max = 0;
+ retval = alloc_size_dir(fs, outdir,
+ (fd->dir_size / fs->blocksize) + 2);
+ if (retval)
+ return retval;
+ outdir->num = fd->compress ? 0 : 1;
+ offset = 0;
+ outdir->hashes[0] = 0;
+ prev_hash = 1;
+ if ((retval = get_next_block(fs, outdir, &block_start)))
+ return retval;
+ dirent = (struct ext2_dir_entry *) block_start;
+ prev_rec_len = 0;
+ rec_len = 0;
+ left = fs->blocksize - csum_size;
+ slack = fd->compress ? min_rec_len :
+ ((fs->blocksize - csum_size) * ctx->htree_slack_percentage)/100;
+ if (slack < min_rec_len)
+ slack = min_rec_len;
+ for (i = 0; i < fd->num_array; i++) {
+ ent = fd->harray + i;
+ if (ent->dir->inode == 0)
+ continue;
+ rec_len = ext2fs_dir_rec_len(ext2fs_dirent_name_len(ent->dir),
+ hash_in_entry);
+ if (rec_len > left) {
+ if (left) {
+ left += prev_rec_len;
+ retval = ext2fs_set_rec_len(fs, left, dirent);
+ if (retval)
+ return retval;
+ }
+ if (csum_size) {
+ t = EXT2_DIRENT_TAIL(block_start,
+ fs->blocksize);
+ ext2fs_initialize_dirent_tail(fs, t);
+ }
+ if ((retval = get_next_block(fs, outdir,
+ &block_start)))
+ return retval;
+ offset = 0;
+ }
+ left = (fs->blocksize - csum_size) - offset;
+ dirent = (struct ext2_dir_entry *) (block_start + offset);
+ if (offset == 0) {
+ if (ent->hash == prev_hash)
+ outdir->hashes[outdir->num-1] = ent->hash | 1;
+ else
+ outdir->hashes[outdir->num-1] = ent->hash;
+ }
+ dirent->inode = ent->dir->inode;
+ ext2fs_dirent_set_name_len(dirent,
+ ext2fs_dirent_name_len(ent->dir));
+ ext2fs_dirent_set_file_type(dirent,
+ ext2fs_dirent_file_type(ent->dir));
+ retval = ext2fs_set_rec_len(fs, rec_len, dirent);
+ if (retval)
+ return retval;
+ prev_rec_len = rec_len;
+ memcpy(dirent->name, ent->dir->name,
+ ext2fs_dirent_name_len(dirent));
+ if (hash_in_entry) {
+ EXT2_DIRENT_HASHES(dirent)->hash = ext2fs_cpu_to_le32(ent->hash);
+ EXT2_DIRENT_HASHES(dirent)->minor_hash =
+ ext2fs_cpu_to_le32(ent->minor_hash);
+ }
+ offset += rec_len;
+ left -= rec_len;
+ if (left < slack) {
+ prev_rec_len += left;
+ retval = ext2fs_set_rec_len(fs, prev_rec_len, dirent);
+ if (retval)
+ return retval;
+ offset += left;
+ left = 0;
+ }
+ prev_hash = ent->hash;
+ }
+ if (left)
+ retval = ext2fs_set_rec_len(fs, rec_len + left, dirent);
+ if (csum_size) {
+ t = EXT2_DIRENT_TAIL(block_start, fs->blocksize);
+ ext2fs_initialize_dirent_tail(fs, t);
+ }
+
+ return retval;
+}
+
+
+static struct ext2_dx_root_info *set_root_node(ext2_filsys fs, char *buf,
+ ext2_ino_t ino, ext2_ino_t parent,
+ struct ext2_inode *inode)
+{
+ struct ext2_dir_entry *dir;
+ struct ext2_dx_root_info *root;
+ struct ext2_dx_countlimit *limits;
+ int filetype = 0;
+ int csum_size = 0;
+
+ if (ext2fs_has_feature_filetype(fs->super))
+ filetype = EXT2_FT_DIR;
+
+ memset(buf, 0, fs->blocksize);
+ dir = (struct ext2_dir_entry *) buf;
+ dir->inode = ino;
+ dir->name[0] = '.';
+ ext2fs_dirent_set_name_len(dir, 1);
+ ext2fs_dirent_set_file_type(dir, filetype);
+ dir->rec_len = 12;
+ dir = (struct ext2_dir_entry *) (buf + 12);
+ dir->inode = parent;
+ dir->name[0] = '.';
+ dir->name[1] = '.';
+ ext2fs_dirent_set_name_len(dir, 2);
+ ext2fs_dirent_set_file_type(dir, filetype);
+ dir->rec_len = fs->blocksize - 12;
+
+ root = (struct ext2_dx_root_info *) (buf+24);
+ root->reserved_zero = 0;
+ if (ext4_hash_in_dirent(inode))
+ root->hash_version = EXT2_HASH_SIPHASH;
+ else
+ root->hash_version = fs->super->s_def_hash_version;
+ root->info_length = 8;
+ root->indirect_levels = 0;
+ root->unused_flags = 0;
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dx_tail);
+
+ limits = (struct ext2_dx_countlimit *) (buf+32);
+ limits->limit = (fs->blocksize - (32 + csum_size)) /
+ sizeof(struct ext2_dx_entry);
+ limits->count = 0;
+
+ return root;
+}
+
+
+static struct ext2_dx_entry *set_int_node(ext2_filsys fs, char *buf)
+{
+ struct ext2_dir_entry *dir;
+ struct ext2_dx_countlimit *limits;
+ int csum_size = 0;
+
+ memset(buf, 0, fs->blocksize);
+ dir = (struct ext2_dir_entry *) buf;
+ dir->inode = 0;
+ (void) ext2fs_set_rec_len(fs, fs->blocksize, dir);
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dx_tail);
+
+ limits = (struct ext2_dx_countlimit *) (buf+8);
+ limits->limit = (fs->blocksize - (8 + csum_size)) /
+ sizeof(struct ext2_dx_entry);
+ limits->count = 0;
+
+ return (struct ext2_dx_entry *) limits;
+}
+
+static int alloc_blocks(ext2_filsys fs,
+ struct ext2_dx_countlimit **limit,
+ struct ext2_dx_entry **prev_ent,
+ struct ext2_dx_entry **next_ent,
+ int *prev_offset, int *next_offset,
+ struct out_dir *outdir, int i,
+ int *prev_count, int *next_count)
+{
+ errcode_t retval;
+ char *block_start;
+
+ if (*limit)
+ (*limit)->limit = (*limit)->count =
+ ext2fs_cpu_to_le16((*limit)->limit);
+ *prev_ent = (struct ext2_dx_entry *) (outdir->buf + *prev_offset);
+ (*prev_ent)->block = ext2fs_cpu_to_le32(outdir->num);
+
+ if (i != 1)
+ (*prev_ent)->hash =
+ ext2fs_cpu_to_le32(outdir->hashes[i]);
+
+ retval = get_next_block(fs, outdir, &block_start);
+ if (retval)
+ return retval;
+
+ /* outdir->buf might be reallocated */
+ *prev_ent = (struct ext2_dx_entry *) (outdir->buf + *prev_offset);
+
+ *next_ent = set_int_node(fs, block_start);
+ *limit = (struct ext2_dx_countlimit *)(*next_ent);
+ if (next_offset)
+ *next_offset = ((char *) *next_ent - outdir->buf);
+
+ *next_count = (*limit)->limit;
+ (*prev_offset) += sizeof(struct ext2_dx_entry);
+ (*prev_count)--;
+
+ return 0;
+}
+
+/*
+ * This function takes the leaf nodes which have been written in
+ * outdir, and populates the root node and any necessary interior nodes.
+ */
+static errcode_t calculate_tree(ext2_filsys fs,
+ struct out_dir *outdir,
+ ext2_ino_t ino,
+ ext2_ino_t parent,
+ struct ext2_inode *inode)
+{
+ struct ext2_dx_root_info *root_info;
+ struct ext2_dx_entry *root, *int_ent, *dx_ent = 0;
+ struct ext2_dx_countlimit *root_limit, *int_limit, *limit;
+ errcode_t retval;
+ int i, c1, c2, c3, nblks;
+ int limit_offset, int_offset, root_offset;
+
+ root_info = set_root_node(fs, outdir->buf, ino, parent, inode);
+ root_offset = limit_offset = ((char *) root_info - outdir->buf) +
+ root_info->info_length;
+ root_limit = (struct ext2_dx_countlimit *) (outdir->buf + limit_offset);
+ c1 = root_limit->limit;
+ nblks = outdir->num;
+
+ /* Write out the pointer blocks */
+ if (nblks - 1 <= c1) {
+ /* Just write out the root block, and we're done */
+ root = (struct ext2_dx_entry *) (outdir->buf + root_offset);
+ for (i=1; i < nblks; i++) {
+ root->block = ext2fs_cpu_to_le32(i);
+ if (i != 1)
+ root->hash =
+ ext2fs_cpu_to_le32(outdir->hashes[i]);
+ root++;
+ c1--;
+ }
+ } else if (nblks - 1 <= ext2fs_htree_intnode_maxrecs(fs, c1)) {
+ c2 = 0;
+ limit = NULL;
+ root_info->indirect_levels = 1;
+ for (i=1; i < nblks; i++) {
+ if (c2 == 0 && c1 == 0)
+ return ENOSPC;
+ if (c2 == 0) {
+ retval = alloc_blocks(fs, &limit, &root,
+ &dx_ent, &root_offset,
+ NULL, outdir, i, &c1,
+ &c2);
+ if (retval)
+ return retval;
+ }
+ dx_ent->block = ext2fs_cpu_to_le32(i);
+ if (c2 != limit->limit)
+ dx_ent->hash =
+ ext2fs_cpu_to_le32(outdir->hashes[i]);
+ dx_ent++;
+ c2--;
+ }
+ limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
+ limit->limit = ext2fs_cpu_to_le16(limit->limit);
+ } else {
+ c2 = 0;
+ c3 = 0;
+ limit = NULL;
+ int_limit = 0;
+ root_info->indirect_levels = 2;
+ for (i = 1; i < nblks; i++) {
+ if (c3 == 0 && c2 == 0 && c1 == 0)
+ return ENOSPC;
+ if (c3 == 0 && c2 == 0) {
+ retval = alloc_blocks(fs, &int_limit, &root,
+ &int_ent, &root_offset,
+ &int_offset, outdir, i,
+ &c1, &c2);
+ if (retval)
+ return retval;
+ }
+ if (c3 == 0) {
+ int delta1 = (char *)int_limit - outdir->buf;
+ int delta2 = (char *)root - outdir->buf;
+
+ retval = alloc_blocks(fs, &limit, &int_ent,
+ &dx_ent, &int_offset,
+ NULL, outdir, i, &c2,
+ &c3);
+ if (retval)
+ return retval;
+
+ /* outdir->buf might be reallocated */
+ int_limit = (struct ext2_dx_countlimit *)
+ (outdir->buf + delta1);
+ root = (struct ext2_dx_entry *)
+ (outdir->buf + delta2);
+ }
+ dx_ent->block = ext2fs_cpu_to_le32(i);
+ if (c3 != limit->limit)
+ dx_ent->hash =
+ ext2fs_cpu_to_le32(outdir->hashes[i]);
+ dx_ent++;
+ c3--;
+ }
+ int_limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
+ int_limit->limit = ext2fs_cpu_to_le16(limit->limit);
+
+ limit->count = ext2fs_cpu_to_le16(limit->limit - c3);
+ limit->limit = ext2fs_cpu_to_le16(limit->limit);
+
+ }
+ root_limit = (struct ext2_dx_countlimit *) (outdir->buf + limit_offset);
+ root_limit->count = ext2fs_cpu_to_le16(root_limit->limit - c1);
+ root_limit->limit = ext2fs_cpu_to_le16(root_limit->limit);
+
+ return 0;
+}
+
+struct write_dir_struct {
+ struct out_dir *outdir;
+ errcode_t err;
+ ext2_ino_t ino;
+ e2fsck_t ctx;
+ ext2_ino_t dir;
+};
+
+/*
+ * Helper function which writes out a directory block.
+ */
+static int write_dir_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct write_dir_struct *wd = (struct write_dir_struct *) priv_data;
+ char *dir, *buf = 0;
+
+#ifdef REHASH_DEBUG
+ printf("%u: write_dir_block %lld:%lld", wd->ino, blockcnt, *block_nr);
+#endif
+ if ((*block_nr == 0) || (blockcnt < 0)) {
+#ifdef REHASH_DEBUG
+ printf(" - skip\n");
+#endif
+ return 0;
+ }
+ if (blockcnt < wd->outdir->num)
+ dir = wd->outdir->buf + (blockcnt * fs->blocksize);
+ else if (wd->ctx->lost_and_found == wd->dir) {
+ /* Don't release any extra directory blocks for lost+found */
+ wd->err = ext2fs_new_dir_block(fs, 0, 0, &buf);
+ if (wd->err)
+ return BLOCK_ABORT;
+ dir = buf;
+ wd->outdir->num++;
+ } else {
+ /* Don't free blocks at the end of the directory, they
+ * will be truncated by the caller. */
+#ifdef REHASH_DEBUG
+ printf(" - not freed\n");
+#endif
+ return 0;
+ }
+ wd->err = ext2fs_write_dir_block4(fs, *block_nr, dir, 0, wd->dir);
+ if (buf)
+ ext2fs_free_mem(&buf);
+
+#ifdef REHASH_DEBUG
+ printf(" - write (%d)\n", wd->err);
+#endif
+ if (wd->err)
+ return BLOCK_ABORT;
+ return 0;
+}
+
+static errcode_t write_directory(e2fsck_t ctx, ext2_filsys fs,
+ struct out_dir *outdir,
+ ext2_ino_t ino, struct ext2_inode *inode,
+ int compress)
+{
+ struct write_dir_struct wd;
+ errcode_t retval;
+
+ retval = e2fsck_expand_directory(ctx, ino, -1, outdir->num);
+ if (retval)
+ return retval;
+
+ wd.outdir = outdir;
+ wd.err = 0;
+ wd.ino = ino;
+ wd.ctx = ctx;
+ wd.dir = ino;
+
+ retval = ext2fs_block_iterate3(fs, ino, 0, NULL,
+ write_dir_block, &wd);
+ if (retval)
+ return retval;
+ if (wd.err)
+ return wd.err;
+
+ e2fsck_read_inode(ctx, ino, inode, "rehash_dir");
+ if (compress)
+ inode->i_flags &= ~EXT2_INDEX_FL;
+ else
+ inode->i_flags |= EXT2_INDEX_FL;
+#ifdef REHASH_DEBUG
+ printf("%u: set inode size to %u blocks = %u bytes\n",
+ ino, outdir->num, outdir->num * fs->blocksize);
+#endif
+ retval = ext2fs_inode_size_set(fs, inode, (ext2_off64_t)outdir->num *
+ fs->blocksize);
+ if (retval)
+ return retval;
+
+ /* ext2fs_punch() calls ext2fs_write_inode() which writes the size */
+ return ext2fs_punch(fs, ino, inode, NULL, outdir->num, ~0ULL);
+}
+
+errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino,
+ struct problem_context *pctx)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct ext2_inode inode;
+ char *dir_buf = 0;
+ struct fill_dir_struct fd = { NULL, NULL, 0, 0, 0, NULL,
+ 0, 0, 0, 0, 0, 0 };
+ struct out_dir outdir = { 0, 0, 0, 0 };
+ struct name_cmp_ctx name_cmp_ctx = {0, NULL};
+
+ e2fsck_read_inode(ctx, ino, &inode, "rehash_dir");
+
+ if (ext2fs_has_feature_inline_data(fs->super) &&
+ (inode.i_flags & EXT4_INLINE_DATA_FL))
+ return 0;
+
+ retval = ext2fs_get_mem(inode.i_size, &dir_buf);
+ if (retval)
+ goto errout;
+
+ fd.max_array = inode.i_size / 32;
+ retval = ext2fs_get_array(sizeof(struct hash_entry),
+ fd.max_array, &fd.harray);
+ if (retval)
+ goto errout;
+
+ fd.ino = ino;
+ fd.ctx = ctx;
+ fd.buf = dir_buf;
+ fd.inode = &inode;
+ fd.dir = ino;
+ if (!ext2fs_has_feature_dir_index(fs->super) ||
+ (inode.i_size / fs->blocksize) < 2)
+ fd.compress = 1;
+ fd.parent = 0;
+
+ if (fs->encoding && (inode.i_flags & EXT4_CASEFOLD_FL)) {
+ name_cmp_ctx.casefold = 1;
+ name_cmp_ctx.tbl = fs->encoding;
+ }
+
+retry_nohash:
+ /* Read in the entire directory into memory */
+ retval = ext2fs_block_iterate3(fs, ino, 0, 0,
+ fill_dir_block, &fd);
+ if (fd.err) {
+ retval = fd.err;
+ goto errout;
+ }
+
+ /*
+ * If the entries read are less than a block, then don't index
+ * the directory
+ */
+ if (!fd.compress && (fd.dir_size < (fs->blocksize - 24))) {
+ fd.compress = 1;
+ fd.dir_size = 0;
+ fd.num_array = 0;
+ goto retry_nohash;
+ }
+
+#if 0
+ printf("%d entries (%d bytes) found in inode %d\n",
+ fd.num_array, fd.dir_size, ino);
+#endif
+
+ /* Sort the list */
+resort:
+ if (fd.compress && fd.num_array > 1)
+ sort_r(fd.harray+2, fd.num_array-2, sizeof(struct hash_entry),
+ hash_cmp, &name_cmp_ctx);
+ else
+ sort_r(fd.harray, fd.num_array, sizeof(struct hash_entry),
+ hash_cmp, &name_cmp_ctx);
+
+ /*
+ * Look for duplicates
+ */
+ if (duplicate_search_and_fix(ctx, fs, ino, &fd, &name_cmp_ctx))
+ goto resort;
+
+ if (ctx->options & E2F_OPT_NO) {
+ retval = 0;
+ goto errout;
+ }
+
+ /* Sort non-hashed directories by inode number */
+ if (fd.compress && fd.num_array > 1)
+ qsort(fd.harray+2, fd.num_array-2,
+ sizeof(struct hash_entry), ino_cmp);
+
+ /*
+ * Copy the directory entries. In a htree directory these
+ * will become the leaf nodes.
+ */
+ retval = copy_dir_entries(ctx, &fd, &outdir);
+ if (retval)
+ goto errout;
+
+ free(dir_buf); dir_buf = 0;
+
+ if (!fd.compress) {
+ /* Calculate the interior nodes */
+ retval = calculate_tree(fs, &outdir, ino, fd.parent, fd.inode);
+ if (retval)
+ goto errout;
+ }
+
+ retval = write_directory(ctx, fs, &outdir, ino, &inode, fd.compress);
+ if (retval)
+ goto errout;
+
+ if (ctx->options & E2F_OPT_CONVERT_BMAP)
+ retval = e2fsck_rebuild_extents_later(ctx, ino);
+ else
+ retval = e2fsck_check_rebuild_extents(ctx, ino, &inode, pctx);
+errout:
+ ext2fs_free_mem(&dir_buf);
+ ext2fs_free_mem(&fd.harray);
+
+ free_out_dir(&outdir);
+ return retval;
+}
+
+void e2fsck_rehash_directories(e2fsck_t ctx)
+{
+ struct problem_context pctx;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ struct dir_info *dir;
+ ext2_u32_iterate iter;
+ struct dir_info_iter * dirinfo_iter = 0;
+ ext2_ino_t ino;
+ errcode_t retval;
+ int cur, max, all_dirs, first = 1;
+
+ init_resource_track(&rtrack, ctx->fs->io);
+ all_dirs = ctx->options & E2F_OPT_COMPRESS_DIRS;
+
+ if (!ctx->dirs_to_hash && !all_dirs)
+ return;
+
+ (void) e2fsck_get_lost_and_found(ctx, 0);
+
+ clear_problem_context(&pctx);
+
+ cur = 0;
+ if (all_dirs) {
+ dirinfo_iter = e2fsck_dir_info_iter_begin(ctx);
+ max = e2fsck_get_num_dirinfo(ctx);
+ } else {
+ retval = ext2fs_u32_list_iterate_begin(ctx->dirs_to_hash,
+ &iter);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3A_OPTIMIZE_ITER, &pctx);
+ return;
+ }
+ max = ext2fs_u32_list_count(ctx->dirs_to_hash);
+ }
+ while (1) {
+ if (all_dirs) {
+ if ((dir = e2fsck_dir_info_iter(ctx,
+ dirinfo_iter)) == 0)
+ break;
+ ino = dir->ino;
+ } else {
+ if (!ext2fs_u32_list_iterate(iter, &ino))
+ break;
+ }
+ if (!ext2fs_test_inode_bitmap2(ctx->inode_dir_map, ino))
+ continue;
+
+ pctx.dir = ino;
+ if (first) {
+ fix_problem(ctx, PR_3A_PASS_HEADER, &pctx);
+ first = 0;
+ }
+#if 0
+ fix_problem(ctx, PR_3A_OPTIMIZE_DIR, &pctx);
+#endif
+ pctx.errcode = e2fsck_rehash_dir(ctx, ino, &pctx);
+ if (pctx.errcode) {
+ end_problem_latch(ctx, PR_LATCH_OPTIMIZE_DIR);
+ fix_problem(ctx, PR_3A_OPTIMIZE_DIR_ERR, &pctx);
+ }
+ if (ctx->progress && !ctx->progress_fd)
+ e2fsck_simple_progress(ctx, "Rebuilding directory",
+ 100.0 * (float) (++cur) / (float) max, ino);
+ }
+ end_problem_latch(ctx, PR_LATCH_OPTIMIZE_DIR);
+ if (all_dirs)
+ e2fsck_dir_info_iter_end(ctx, dirinfo_iter);
+ else
+ ext2fs_u32_list_iterate_end(iter);
+
+ if (ctx->dirs_to_hash)
+ ext2fs_u32_list_free(ctx->dirs_to_hash);
+ ctx->dirs_to_hash = 0;
+
+ print_resource_track(ctx, "Pass 3A", &rtrack, ctx->fs->io);
+}
diff --git a/e2fsck/revoke.c b/e2fsck/revoke.c
new file mode 100644
index 0000000..fa60878
--- /dev/null
+++ b/e2fsck/revoke.c
@@ -0,0 +1,743 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * linux/fs/jbd2/revoke.c
+ *
+ * Written by Stephen C. Tweedie <sct@redhat.com>, 2000
+ *
+ * Copyright 2000 Red Hat corp --- All Rights Reserved
+ *
+ * Journal revoke routines for the generic filesystem journaling code;
+ * part of the ext2fs journaling system.
+ *
+ * Revoke is the mechanism used to prevent old log records for deleted
+ * metadata from being replayed on top of newer data using the same
+ * blocks. The revoke mechanism is used in two separate places:
+ *
+ * + Commit: during commit we write the entire list of the current
+ * transaction's revoked blocks to the journal
+ *
+ * + Recovery: during recovery we record the transaction ID of all
+ * revoked blocks. If there are multiple revoke records in the log
+ * for a single block, only the last one counts, and if there is a log
+ * entry for a block beyond the last revoke, then that log entry still
+ * gets replayed.
+ *
+ * We can get interactions between revokes and new log data within a
+ * single transaction:
+ *
+ * Block is revoked and then journaled:
+ * The desired end result is the journaling of the new block, so we
+ * cancel the revoke before the transaction commits.
+ *
+ * Block is journaled and then revoked:
+ * The revoke must take precedence over the write of the block, so we
+ * need either to cancel the journal entry or to write the revoke
+ * later in the log than the log block. In this case, we choose the
+ * latter: journaling a block cancels any revoke record for that block
+ * in the current transaction, so any revoke for that block in the
+ * transaction must have happened after the block was journaled and so
+ * the revoke must take precedence.
+ *
+ * Block is revoked and then written as data:
+ * The data write is allowed to succeed, but the revoke is _not_
+ * cancelled. We still need to prevent old log records from
+ * overwriting the new data. We don't even need to clear the revoke
+ * bit here.
+ *
+ * We cache revoke status of a buffer in the current transaction in b_states
+ * bits. As the name says, revokevalid flag indicates that the cached revoke
+ * status of a buffer is valid and we can rely on the cached status.
+ *
+ * Revoke information on buffers is a tri-state value:
+ *
+ * RevokeValid clear: no cached revoke status, need to look it up
+ * RevokeValid set, Revoked clear:
+ * buffer has not been revoked, and cancel_revoke
+ * need do nothing.
+ * RevokeValid set, Revoked set:
+ * buffer has been revoked.
+ *
+ * Locking rules:
+ * We keep two hash tables of revoke records. One hashtable belongs to the
+ * running transaction (is pointed to by journal->j_revoke), the other one
+ * belongs to the committing transaction. Accesses to the second hash table
+ * happen only from the kjournald and no other thread touches this table. Also
+ * journal_switch_revoke_table() which switches which hashtable belongs to the
+ * running and which to the committing transaction is called only from
+ * kjournald. Therefore we need no locks when accessing the hashtable belonging
+ * to the committing transaction.
+ *
+ * All users operating on the hash table belonging to the running transaction
+ * have a handle to the transaction. Therefore they are safe from kjournald
+ * switching hash tables under them. For operations on the lists of entries in
+ * the hash table j_revoke_lock is used.
+ *
+ * Finally, also replay code uses the hash tables but at this moment no one else
+ * can touch them (filesystem isn't mounted yet) and hence no locking is
+ * needed.
+ */
+
+#ifndef __KERNEL__
+#include "jfs_user.h"
+#else
+#include <linux/time.h>
+#include <linux/fs.h>
+#include <linux/jbd2.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/init.h>
+#include <linux/bio.h>
+#include <linux/log2.h>
+#include <linux/hash.h>
+#endif
+
+static struct kmem_cache *jbd2_revoke_record_cache;
+static struct kmem_cache *jbd2_revoke_table_cache;
+
+/* Each revoke record represents one single revoked block. During
+ journal replay, this involves recording the transaction ID of the
+ last transaction to revoke this block. */
+
+struct jbd2_revoke_record_s
+{
+ struct list_head hash;
+ tid_t sequence; /* Used for recovery only */
+ unsigned long long blocknr;
+};
+
+
+/* The revoke table is just a simple hash table of revoke records. */
+struct jbd2_revoke_table_s
+{
+ /* It is conceivable that we might want a larger hash table
+ * for recovery. Must be a power of two. */
+ int hash_size;
+ int hash_shift;
+ struct list_head *hash_table;
+};
+
+
+#ifdef __KERNEL__
+static void write_one_revoke_record(transaction_t *,
+ struct list_head *,
+ struct buffer_head **, int *,
+ struct jbd2_revoke_record_s *);
+static void flush_descriptor(journal_t *, struct buffer_head *, int);
+#endif
+
+/* Utility functions to maintain the revoke table */
+
+static inline int hash(journal_t *journal, unsigned long long block)
+{
+ return hash_64(block, journal->j_revoke->hash_shift);
+}
+
+static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr,
+ tid_t seq)
+{
+ struct list_head *hash_list;
+ struct jbd2_revoke_record_s *record;
+ gfp_t gfp_mask = GFP_NOFS;
+
+ if (journal_oom_retry)
+ gfp_mask |= __GFP_NOFAIL;
+ record = kmem_cache_alloc(jbd2_revoke_record_cache, gfp_mask);
+ if (!record)
+ return -ENOMEM;
+
+ record->sequence = seq;
+ record->blocknr = blocknr;
+ hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)];
+ spin_lock(&journal->j_revoke_lock);
+ list_add(&record->hash, hash_list);
+ spin_unlock(&journal->j_revoke_lock);
+ return 0;
+}
+
+/* Find a revoke record in the journal's hash table. */
+
+static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal,
+ unsigned long long blocknr)
+{
+ struct list_head *hash_list;
+ struct jbd2_revoke_record_s *record;
+
+ hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)];
+
+ spin_lock(&journal->j_revoke_lock);
+ record = (struct jbd2_revoke_record_s *) hash_list->next;
+ while (&(record->hash) != hash_list) {
+ if (record->blocknr == blocknr) {
+ spin_unlock(&journal->j_revoke_lock);
+ return record;
+ }
+ record = (struct jbd2_revoke_record_s *) record->hash.next;
+ }
+ spin_unlock(&journal->j_revoke_lock);
+ return NULL;
+}
+
+void jbd2_journal_destroy_revoke_record_cache(void)
+{
+ kmem_cache_destroy(jbd2_revoke_record_cache);
+ jbd2_revoke_record_cache = NULL;
+}
+
+void jbd2_journal_destroy_revoke_table_cache(void)
+{
+ kmem_cache_destroy(jbd2_revoke_table_cache);
+ jbd2_revoke_table_cache = NULL;
+}
+
+int __init jbd2_journal_init_revoke_record_cache(void)
+{
+ J_ASSERT(!jbd2_revoke_record_cache);
+ jbd2_revoke_record_cache = KMEM_CACHE(jbd2_revoke_record_s,
+ SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY);
+
+ if (!jbd2_revoke_record_cache) {
+ pr_emerg("JBD2: failed to create revoke_record cache\n");
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+int __init jbd2_journal_init_revoke_table_cache(void)
+{
+ J_ASSERT(!jbd2_revoke_table_cache);
+ jbd2_revoke_table_cache = KMEM_CACHE(jbd2_revoke_table_s,
+ SLAB_TEMPORARY);
+ if (!jbd2_revoke_table_cache) {
+ pr_emerg("JBD2: failed to create revoke_table cache\n");
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+static struct jbd2_revoke_table_s *jbd2_journal_init_revoke_table(int hash_size)
+{
+ int shift = 0;
+ int tmp = hash_size;
+ struct jbd2_revoke_table_s *table;
+
+ table = kmem_cache_alloc(jbd2_revoke_table_cache, GFP_KERNEL);
+ if (!table)
+ goto out;
+
+ while((tmp >>= 1UL) != 0UL)
+ shift++;
+
+ table->hash_size = hash_size;
+ table->hash_shift = shift;
+ table->hash_table =
+ kmalloc_array(hash_size, sizeof(struct list_head), GFP_KERNEL);
+ if (!table->hash_table) {
+ kmem_cache_free(jbd2_revoke_table_cache, table);
+ table = NULL;
+ goto out;
+ }
+
+ for (tmp = 0; tmp < hash_size; tmp++)
+ INIT_LIST_HEAD(&table->hash_table[tmp]);
+
+out:
+ return table;
+}
+
+static void jbd2_journal_destroy_revoke_table(struct jbd2_revoke_table_s *table)
+{
+ int i;
+ struct list_head *hash_list;
+
+ for (i = 0; i < table->hash_size; i++) {
+ hash_list = &table->hash_table[i];
+ J_ASSERT(list_empty(hash_list));
+ }
+
+ kfree(table->hash_table);
+ kmem_cache_free(jbd2_revoke_table_cache, table);
+}
+
+/* Initialise the revoke table for a given journal to a given size. */
+int jbd2_journal_init_revoke(journal_t *journal, int hash_size)
+{
+ J_ASSERT(journal->j_revoke_table[0] == NULL);
+ J_ASSERT(is_power_of_2(hash_size));
+
+ journal->j_revoke_table[0] = jbd2_journal_init_revoke_table(hash_size);
+ if (!journal->j_revoke_table[0])
+ goto fail0;
+
+ journal->j_revoke_table[1] = jbd2_journal_init_revoke_table(hash_size);
+ if (!journal->j_revoke_table[1])
+ goto fail1;
+
+ journal->j_revoke = journal->j_revoke_table[1];
+
+ spin_lock_init(&journal->j_revoke_lock);
+
+ return 0;
+
+fail1:
+ jbd2_journal_destroy_revoke_table(journal->j_revoke_table[0]);
+ journal->j_revoke_table[0] = NULL;
+fail0:
+ return -ENOMEM;
+}
+
+/* Destroy a journal's revoke table. The table must already be empty! */
+void jbd2_journal_destroy_revoke(journal_t *journal)
+{
+ journal->j_revoke = NULL;
+ if (journal->j_revoke_table[0])
+ jbd2_journal_destroy_revoke_table(journal->j_revoke_table[0]);
+ if (journal->j_revoke_table[1])
+ jbd2_journal_destroy_revoke_table(journal->j_revoke_table[1]);
+}
+
+
+#ifdef __KERNEL__
+
+/*
+ * jbd2_journal_revoke: revoke a given buffer_head from the journal. This
+ * prevents the block from being replayed during recovery if we take a
+ * crash after this current transaction commits. Any subsequent
+ * metadata writes of the buffer in this transaction cancel the
+ * revoke.
+ *
+ * Note that this call may block --- it is up to the caller to make
+ * sure that there are no further calls to journal_write_metadata
+ * before the revoke is complete. In ext3, this implies calling the
+ * revoke before clearing the block bitmap when we are deleting
+ * metadata.
+ *
+ * Revoke performs a jbd2_journal_forget on any buffer_head passed in as a
+ * parameter, but does _not_ forget the buffer_head if the bh was only
+ * found implicitly.
+ *
+ * bh_in may not be a journalled buffer - it may have come off
+ * the hash tables without an attached journal_head.
+ *
+ * If bh_in is non-zero, jbd2_journal_revoke() will decrement its b_count
+ * by one.
+ */
+
+int jbd2_journal_revoke(handle_t *handle, unsigned long long blocknr,
+ struct buffer_head *bh_in)
+{
+ struct buffer_head *bh = NULL;
+ journal_t *journal;
+ struct block_device *bdev;
+ int err;
+
+ might_sleep();
+ if (bh_in)
+ BUFFER_TRACE(bh_in, "enter");
+
+ journal = handle->h_transaction->t_journal;
+ if (!jbd2_journal_set_features(journal, 0, 0, JBD2_FEATURE_INCOMPAT_REVOKE)){
+ J_ASSERT (!"Cannot set revoke feature!");
+ return -EINVAL;
+ }
+
+ bdev = journal->j_fs_dev;
+ bh = bh_in;
+
+ if (!bh) {
+ bh = __find_get_block(bdev, blocknr, journal->j_blocksize);
+ if (bh)
+ BUFFER_TRACE(bh, "found on hash");
+ }
+#ifdef JBD2_EXPENSIVE_CHECKING
+ else {
+ struct buffer_head *bh2;
+
+ /* If there is a different buffer_head lying around in
+ * memory anywhere... */
+ bh2 = __find_get_block(bdev, blocknr, journal->j_blocksize);
+ if (bh2) {
+ /* ... and it has RevokeValid status... */
+ if (bh2 != bh && buffer_revokevalid(bh2))
+ /* ...then it better be revoked too,
+ * since it's illegal to create a revoke
+ * record against a buffer_head which is
+ * not marked revoked --- that would
+ * risk missing a subsequent revoke
+ * cancel. */
+ J_ASSERT_BH(bh2, buffer_revoked(bh2));
+ put_bh(bh2);
+ }
+ }
+#endif
+
+ if (WARN_ON_ONCE(handle->h_revoke_credits <= 0)) {
+ if (!bh_in)
+ brelse(bh);
+ return -EIO;
+ }
+ /* We really ought not ever to revoke twice in a row without
+ first having the revoke cancelled: it's illegal to free a
+ block twice without allocating it in between! */
+ if (bh) {
+ if (!J_EXPECT_BH(bh, !buffer_revoked(bh),
+ "inconsistent data on disk")) {
+ if (!bh_in)
+ brelse(bh);
+ return -EIO;
+ }
+ set_buffer_revoked(bh);
+ set_buffer_revokevalid(bh);
+ if (bh_in) {
+ BUFFER_TRACE(bh_in, "call jbd2_journal_forget");
+ jbd2_journal_forget(handle, bh_in);
+ } else {
+ BUFFER_TRACE(bh, "call brelse");
+ __brelse(bh);
+ }
+ }
+ handle->h_revoke_credits--;
+
+ jbd_debug(2, "insert revoke for block %llu, bh_in=%p\n",blocknr, bh_in);
+ err = insert_revoke_hash(journal, blocknr,
+ handle->h_transaction->t_tid);
+ BUFFER_TRACE(bh_in, "exit");
+ return err;
+}
+
+/*
+ * Cancel an outstanding revoke. For use only internally by the
+ * journaling code (called from jbd2_journal_get_write_access).
+ *
+ * We trust buffer_revoked() on the buffer if the buffer is already
+ * being journaled: if there is no revoke pending on the buffer, then we
+ * don't do anything here.
+ *
+ * This would break if it were possible for a buffer to be revoked and
+ * discarded, and then reallocated within the same transaction. In such
+ * a case we would have lost the revoked bit, but when we arrived here
+ * the second time we would still have a pending revoke to cancel. So,
+ * do not trust the Revoked bit on buffers unless RevokeValid is also
+ * set.
+ */
+int jbd2_journal_cancel_revoke(handle_t *handle, struct journal_head *jh)
+{
+ struct jbd2_revoke_record_s *record;
+ journal_t *journal = handle->h_transaction->t_journal;
+ int need_cancel;
+ int did_revoke = 0; /* akpm: debug */
+ struct buffer_head *bh = jh2bh(jh);
+
+ jbd_debug(4, "journal_head %p, cancelling revoke\n", jh);
+
+ /* Is the existing Revoke bit valid? If so, we trust it, and
+ * only perform the full cancel if the revoke bit is set. If
+ * not, we can't trust the revoke bit, and we need to do the
+ * full search for a revoke record. */
+ if (test_set_buffer_revokevalid(bh)) {
+ need_cancel = test_clear_buffer_revoked(bh);
+ } else {
+ need_cancel = 1;
+ clear_buffer_revoked(bh);
+ }
+
+ if (need_cancel) {
+ record = find_revoke_record(journal, bh->b_blocknr);
+ if (record) {
+ jbd_debug(4, "cancelled existing revoke on "
+ "blocknr %llu\n", (unsigned long long)bh->b_blocknr);
+ spin_lock(&journal->j_revoke_lock);
+ list_del(&record->hash);
+ spin_unlock(&journal->j_revoke_lock);
+ kmem_cache_free(jbd2_revoke_record_cache, record);
+ did_revoke = 1;
+ }
+ }
+
+#ifdef JBD2_EXPENSIVE_CHECKING
+ /* There better not be one left behind by now! */
+ record = find_revoke_record(journal, bh->b_blocknr);
+ J_ASSERT_JH(jh, record == NULL);
+#endif
+
+ /* Finally, have we just cleared revoke on an unhashed
+ * buffer_head? If so, we'd better make sure we clear the
+ * revoked status on any hashed alias too, otherwise the revoke
+ * state machine will get very upset later on. */
+ if (need_cancel) {
+ struct buffer_head *bh2;
+ bh2 = __find_get_block(bh->b_bdev, bh->b_blocknr, bh->b_size);
+ if (bh2) {
+ if (bh2 != bh)
+ clear_buffer_revoked(bh2);
+ __brelse(bh2);
+ }
+ }
+ return did_revoke;
+}
+
+/*
+ * journal_clear_revoked_flag clears revoked flag of buffers in
+ * revoke table to reflect there is no revoked buffers in the next
+ * transaction which is going to be started.
+ */
+void jbd2_clear_buffer_revoked_flags(journal_t *journal)
+{
+ struct jbd2_revoke_table_s *revoke = journal->j_revoke;
+ int i = 0;
+
+ for (i = 0; i < revoke->hash_size; i++) {
+ struct list_head *hash_list;
+ struct list_head *list_entry;
+ hash_list = &revoke->hash_table[i];
+
+ list_for_each(list_entry, hash_list) {
+ struct jbd2_revoke_record_s *record;
+ struct buffer_head *bh;
+ record = (struct jbd2_revoke_record_s *)list_entry;
+ bh = __find_get_block(journal->j_fs_dev,
+ record->blocknr,
+ journal->j_blocksize);
+ if (bh) {
+ clear_buffer_revoked(bh);
+ __brelse(bh);
+ }
+ }
+ }
+}
+
+/* journal_switch_revoke table select j_revoke for next transaction
+ * we do not want to suspend any processing until all revokes are
+ * written -bzzz
+ */
+void jbd2_journal_switch_revoke_table(journal_t *journal)
+{
+ int i;
+
+ if (journal->j_revoke == journal->j_revoke_table[0])
+ journal->j_revoke = journal->j_revoke_table[1];
+ else
+ journal->j_revoke = journal->j_revoke_table[0];
+
+ for (i = 0; i < journal->j_revoke->hash_size; i++)
+ INIT_LIST_HEAD(&journal->j_revoke->hash_table[i]);
+}
+
+/*
+ * Write revoke records to the journal for all entries in the current
+ * revoke hash, deleting the entries as we go.
+ */
+void jbd2_journal_write_revoke_records(transaction_t *transaction,
+ struct list_head *log_bufs)
+{
+ journal_t *journal = transaction->t_journal;
+ struct buffer_head *descriptor;
+ struct jbd2_revoke_record_s *record;
+ struct jbd2_revoke_table_s *revoke;
+ struct list_head *hash_list;
+ int i, offset, count;
+
+ descriptor = NULL;
+ offset = 0;
+ count = 0;
+
+ /* select revoke table for committing transaction */
+ revoke = journal->j_revoke == journal->j_revoke_table[0] ?
+ journal->j_revoke_table[1] : journal->j_revoke_table[0];
+
+ for (i = 0; i < revoke->hash_size; i++) {
+ hash_list = &revoke->hash_table[i];
+
+ while (!list_empty(hash_list)) {
+ record = (struct jbd2_revoke_record_s *)
+ hash_list->next;
+ write_one_revoke_record(transaction, log_bufs,
+ &descriptor, &offset, record);
+ count++;
+ list_del(&record->hash);
+ kmem_cache_free(jbd2_revoke_record_cache, record);
+ }
+ }
+ if (descriptor)
+ flush_descriptor(journal, descriptor, offset);
+ jbd_debug(1, "Wrote %d revoke records\n", count);
+}
+
+/*
+ * Write out one revoke record. We need to create a new descriptor
+ * block if the old one is full or if we have not already created one.
+ */
+
+static void write_one_revoke_record(transaction_t *transaction,
+ struct list_head *log_bufs,
+ struct buffer_head **descriptorp,
+ int *offsetp,
+ struct jbd2_revoke_record_s *record)
+{
+ journal_t *journal = transaction->t_journal;
+ int csum_size = 0;
+ struct buffer_head *descriptor;
+ int sz, offset;
+
+ /* If we are already aborting, this all becomes a noop. We
+ still need to go round the loop in
+ jbd2_journal_write_revoke_records in order to free all of the
+ revoke records: only the IO to the journal is omitted. */
+ if (is_journal_aborted(journal))
+ return;
+
+ descriptor = *descriptorp;
+ offset = *offsetp;
+
+ /* Do we need to leave space at the end for a checksum? */
+ if (jbd2_journal_has_csum_v2or3(journal))
+ csum_size = sizeof(struct jbd2_journal_block_tail);
+
+ if (jbd2_has_feature_64bit(journal))
+ sz = 8;
+ else
+ sz = 4;
+
+ /* Make sure we have a descriptor with space left for the record */
+ if (descriptor) {
+ if (offset + sz > journal->j_blocksize - csum_size) {
+ flush_descriptor(journal, descriptor, offset);
+ descriptor = NULL;
+ }
+ }
+
+ if (!descriptor) {
+ descriptor = jbd2_journal_get_descriptor_buffer(transaction,
+ JBD2_REVOKE_BLOCK);
+ if (!descriptor)
+ return;
+
+ /* Record it so that we can wait for IO completion later */
+ BUFFER_TRACE(descriptor, "file in log_bufs");
+ jbd2_file_log_bh(log_bufs, descriptor);
+
+ offset = sizeof(jbd2_journal_revoke_header_t);
+ *descriptorp = descriptor;
+ }
+
+ if (jbd2_has_feature_64bit(journal))
+ * ((__be64 *)(&descriptor->b_data[offset])) =
+ cpu_to_be64(record->blocknr);
+ else
+ * ((__be32 *)(&descriptor->b_data[offset])) =
+ cpu_to_be32(record->blocknr);
+ offset += sz;
+
+ *offsetp = offset;
+}
+
+/*
+ * Flush a revoke descriptor out to the journal. If we are aborting,
+ * this is a noop; otherwise we are generating a buffer which needs to
+ * be waited for during commit, so it has to go onto the appropriate
+ * journal buffer list.
+ */
+
+static void flush_descriptor(journal_t *journal,
+ struct buffer_head *descriptor,
+ int offset)
+{
+ jbd2_journal_revoke_header_t *header;
+
+ if (is_journal_aborted(journal))
+ return;
+
+ header = (jbd2_journal_revoke_header_t *)descriptor->b_data;
+ header->r_count = cpu_to_be32(offset);
+ jbd2_descriptor_block_csum_set(journal, descriptor);
+
+ set_buffer_jwrite(descriptor);
+ BUFFER_TRACE(descriptor, "write");
+ set_buffer_dirty(descriptor);
+ write_dirty_buffer(descriptor, REQ_SYNC);
+}
+#endif
+
+/*
+ * Revoke support for recovery.
+ *
+ * Recovery needs to be able to:
+ *
+ * record all revoke records, including the tid of the latest instance
+ * of each revoke in the journal
+ *
+ * check whether a given block in a given transaction should be replayed
+ * (ie. has not been revoked by a revoke record in that or a subsequent
+ * transaction)
+ *
+ * empty the revoke table after recovery.
+ */
+
+/*
+ * First, setting revoke records. We create a new revoke record for
+ * every block ever revoked in the log as we scan it for recovery, and
+ * we update the existing records if we find multiple revokes for a
+ * single block.
+ */
+
+int jbd2_journal_set_revoke(journal_t *journal,
+ unsigned long long blocknr,
+ tid_t sequence)
+{
+ struct jbd2_revoke_record_s *record;
+
+ record = find_revoke_record(journal, blocknr);
+ if (record) {
+ /* If we have multiple occurrences, only record the
+ * latest sequence number in the hashed record */
+ if (tid_gt(sequence, record->sequence))
+ record->sequence = sequence;
+ return 0;
+ }
+ return insert_revoke_hash(journal, blocknr, sequence);
+}
+
+/*
+ * Test revoke records. For a given block referenced in the log, has
+ * that block been revoked? A revoke record with a given transaction
+ * sequence number revokes all blocks in that transaction and earlier
+ * ones, but later transactions still need replayed.
+ */
+
+int jbd2_journal_test_revoke(journal_t *journal,
+ unsigned long long blocknr,
+ tid_t sequence)
+{
+ struct jbd2_revoke_record_s *record;
+
+ record = find_revoke_record(journal, blocknr);
+ if (!record)
+ return 0;
+ if (tid_gt(sequence, record->sequence))
+ return 0;
+ return 1;
+}
+
+/*
+ * Finally, once recovery is over, we need to clear the revoke table so
+ * that it can be reused by the running filesystem.
+ */
+
+void jbd2_journal_clear_revoke(journal_t *journal)
+{
+ int i;
+ struct list_head *hash_list;
+ struct jbd2_revoke_record_s *record;
+ struct jbd2_revoke_table_s *revoke;
+
+ revoke = journal->j_revoke;
+
+ for (i = 0; i < revoke->hash_size; i++) {
+ hash_list = &revoke->hash_table[i];
+ while (!list_empty(hash_list)) {
+ record = (struct jbd2_revoke_record_s*) hash_list->next;
+ list_del(&record->hash);
+ kmem_cache_free(jbd2_revoke_record_cache, record);
+ }
+ }
+}
diff --git a/e2fsck/scantest.c b/e2fsck/scantest.c
new file mode 100644
index 0000000..ed3595f
--- /dev/null
+++ b/e2fsck/scantest.c
@@ -0,0 +1,141 @@
+/*
+ * scantest.c - test the speed of the inode scan routine
+ */
+
+#include "config.h"
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <termios.h>
+#include <time.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <unistd.h>
+#include <sys/ioctl.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#include <sys/resource.h>
+
+#include "et/com_err.h"
+#include "../version.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+
+
+extern int isatty(int);
+
+const char * device_name = NULL;
+
+/*
+ * This structure is used for keeping track of how much resources have
+ * been used for a particular pass of e2fsck.
+ */
+struct resource_track {
+ struct timeval time_start;
+ struct timeval user_start;
+ struct timeval system_start;
+ void *brk_start;
+};
+
+struct resource_track global_rtrack;
+
+void init_resource_track(struct resource_track *track)
+{
+ struct rusage r;
+
+ track->brk_start = sbrk(0);
+ gettimeofday(&track->time_start, 0);
+ getrusage(RUSAGE_SELF, &r);
+ track->user_start = r.ru_utime;
+ track->system_start = r.ru_stime;
+}
+
+static __inline__ float timeval_subtract(struct timeval *tv1,
+ struct timeval *tv2)
+{
+ return ((tv1->tv_sec - tv2->tv_sec) +
+ ((float) (tv1->tv_usec - tv2->tv_usec)) / 1000000);
+}
+
+static void print_resource_track(struct resource_track *track)
+{
+ struct rusage r;
+ struct timeval time_end;
+
+ gettimeofday(&time_end, 0);
+ getrusage(RUSAGE_SELF, &r);
+
+ printf(_("Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"),
+ (unsigned long)((char *)sbrk(0) - (char *)track->brk_start),
+ timeval_subtract(&time_end, &track->time_start),
+ timeval_subtract(&r.ru_utime, &track->user_start),
+ timeval_subtract(&r.ru_stime, &track->system_start));
+}
+
+
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0;
+ int exit_value = 0;
+ int i;
+ ext2_filsys fs;
+ ext2_inode_scan scan;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+
+ printf(_("size of inode=%d\n"), sizeof(inode));
+
+ device_name = "/dev/hda3";
+
+ init_resource_track(&global_rtrack);
+
+ retval = ext2fs_open(device_name, 0,
+ 0, 0, unix_io_manager, &fs);
+ if (retval) {
+ com_err(argv[0], retval, _("while trying to open %s"),
+ device_name);
+ exit(1);
+ }
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval) {
+ com_err(argv[0], retval, _("while opening inode scan"));
+ exit(1);
+ }
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval) {
+ com_err(argv[0], retval, _("while starting inode scan"));
+ exit(1);
+ }
+ while (ino) {
+ if (!inode.i_links_count)
+ goto next;
+ printf("%lu\n", inode.i_blocks);
+ next:
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval) {
+ com_err(argv[0], retval,
+ _("while doing inode scan"));
+ exit(1);
+ }
+ }
+
+
+ ext2fs_close_free(&fs);
+
+ print_resource_track(&global_rtrack);
+
+ return exit_value;
+}
diff --git a/e2fsck/sigcatcher.c b/e2fsck/sigcatcher.c
new file mode 100644
index 0000000..a9d3b7f
--- /dev/null
+++ b/e2fsck/sigcatcher.c
@@ -0,0 +1,446 @@
+/*
+ * sigcatcher.c --- print a backtrace on a SIGSEGV, et. al
+ *
+ * Copyright (C) 2011 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+#ifdef HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
+
+#include "e2fsck.h"
+
+struct str_table {
+ int num;
+ const char *name;
+};
+
+#define DEFINE_ENTRY(SYM) { SYM, #SYM },
+#define END_TABLE { 0, 0 }
+
+static struct str_table sig_table[] = {
+#ifdef SIGHUP
+ DEFINE_ENTRY(SIGHUP)
+#endif
+#ifdef SIGINT
+ DEFINE_ENTRY(SIGINT)
+#endif
+#ifdef SIGQUIT
+ DEFINE_ENTRY(SIGQUIT)
+#endif
+#ifdef SIGILL
+ DEFINE_ENTRY(SIGILL)
+#endif
+#ifdef SIGTRAP
+ DEFINE_ENTRY(SIGTRAP)
+#endif
+#ifdef SIGABRT
+ DEFINE_ENTRY(SIGABRT)
+#endif
+#ifdef SIGIOT
+ DEFINE_ENTRY(SIGIOT)
+#endif
+#ifdef SIGBUS
+ DEFINE_ENTRY(SIGBUS)
+#endif
+#ifdef SIGFPE
+ DEFINE_ENTRY(SIGFPE)
+#endif
+#ifdef SIGKILL
+ DEFINE_ENTRY(SIGKILL)
+#endif
+#ifdef SIGUSR1
+ DEFINE_ENTRY(SIGUSR1)
+#endif
+#ifdef SIGSEGV
+ DEFINE_ENTRY(SIGSEGV)
+#endif
+#ifdef SIGUSR2
+ DEFINE_ENTRY(SIGUSR2)
+#endif
+#ifdef SIGPIPE
+ DEFINE_ENTRY(SIGPIPE)
+#endif
+#ifdef SIGALRM
+ DEFINE_ENTRY(SIGALRM)
+#endif
+#ifdef SIGTERM
+ DEFINE_ENTRY(SIGTERM)
+#endif
+#ifdef SIGSTKFLT
+ DEFINE_ENTRY(SIGSTKFLT)
+#endif
+#ifdef SIGCHLD
+ DEFINE_ENTRY(SIGCHLD)
+#endif
+#ifdef SIGCONT
+ DEFINE_ENTRY(SIGCONT)
+#endif
+#ifdef SIGSTOP
+ DEFINE_ENTRY(SIGSTOP)
+#endif
+#ifdef SIGTSTP
+ DEFINE_ENTRY(SIGTSTP)
+#endif
+#ifdef SIGTTIN
+ DEFINE_ENTRY(SIGTTIN)
+#endif
+#ifdef SIGTTOU
+ DEFINE_ENTRY(SIGTTOU)
+#endif
+#ifdef SIGURG
+ DEFINE_ENTRY(SIGURG)
+#endif
+#ifdef SIGXCPU
+ DEFINE_ENTRY(SIGXCPU)
+#endif
+#ifdef SIGXFSZ
+ DEFINE_ENTRY(SIGXFSZ)
+#endif
+#ifdef SIGVTALRM
+ DEFINE_ENTRY(SIGVTALRM)
+#endif
+#ifdef SIGPROF
+ DEFINE_ENTRY(SIGPROF)
+#endif
+#ifdef SIGWINCH
+ DEFINE_ENTRY(SIGWINCH)
+#endif
+#ifdef SIGIO
+ DEFINE_ENTRY(SIGIO)
+#endif
+#ifdef SIGPOLL
+ DEFINE_ENTRY(SIGPOLL)
+#endif
+#ifdef SIGPWR
+ DEFINE_ENTRY(SIGPWR)
+#endif
+#ifdef SIGSYS
+ DEFINE_ENTRY(SIGSYS)
+#endif
+ END_TABLE
+};
+
+static struct str_table generic_code_table[] = {
+#ifdef SI_ASYNCNL
+ DEFINE_ENTRY(SI_ASYNCNL)
+#endif
+#ifdef SI_TKILL
+ DEFINE_ENTRY(SI_TKILL)
+#endif
+#ifdef SI_SIGIO
+ DEFINE_ENTRY(SI_SIGIO)
+#endif
+#ifdef SI_ASYNCIO
+ DEFINE_ENTRY(SI_ASYNCIO)
+#endif
+#ifdef SI_MESGQ
+ DEFINE_ENTRY(SI_MESGQ)
+#endif
+#ifdef SI_TIMER
+ DEFINE_ENTRY(SI_TIMER)
+#endif
+#ifdef SI_QUEUE
+ DEFINE_ENTRY(SI_QUEUE)
+#endif
+#ifdef SI_USER
+ DEFINE_ENTRY(SI_USER)
+#endif
+#ifdef SI_KERNEL
+ DEFINE_ENTRY(SI_KERNEL)
+#endif
+ END_TABLE
+};
+
+static struct str_table sigill_code_table[] = {
+#ifdef ILL_ILLOPC
+ DEFINE_ENTRY(ILL_ILLOPC)
+#endif
+#ifdef ILL_ILLOPN
+ DEFINE_ENTRY(ILL_ILLOPN)
+#endif
+#ifdef ILL_ILLADR
+ DEFINE_ENTRY(ILL_ILLADR)
+#endif
+#ifdef ILL_ILLTRP
+ DEFINE_ENTRY(ILL_ILLTRP)
+#endif
+#ifdef ILL_PRVOPC
+ DEFINE_ENTRY(ILL_PRVOPC)
+#endif
+#ifdef ILL_PRVREG
+ DEFINE_ENTRY(ILL_PRVREG)
+#endif
+#ifdef ILL_COPROC
+ DEFINE_ENTRY(ILL_COPROC)
+#endif
+#ifdef ILL_BADSTK
+ DEFINE_ENTRY(ILL_BADSTK)
+#endif
+#ifdef BUS_ADRALN
+ DEFINE_ENTRY(BUS_ADRALN)
+#endif
+#ifdef BUS_ADRERR
+ DEFINE_ENTRY(BUS_ADRERR)
+#endif
+#ifdef BUS_OBJERR
+ DEFINE_ENTRY(BUS_OBJERR)
+#endif
+ END_TABLE
+};
+
+static struct str_table sigfpe_code_table[] = {
+#ifdef FPE_INTDIV
+ DEFINE_ENTRY(FPE_INTDIV)
+#endif
+#ifdef FPE_INTOVF
+ DEFINE_ENTRY(FPE_INTOVF)
+#endif
+#ifdef FPE_FLTDIV
+ DEFINE_ENTRY(FPE_FLTDIV)
+#endif
+#ifdef FPE_FLTOVF
+ DEFINE_ENTRY(FPE_FLTOVF)
+#endif
+#ifdef FPE_FLTUND
+ DEFINE_ENTRY(FPE_FLTUND)
+#endif
+#ifdef FPE_FLTRES
+ DEFINE_ENTRY(FPE_FLTRES)
+#endif
+#ifdef FPE_FLTINV
+ DEFINE_ENTRY(FPE_FLTINV)
+#endif
+#ifdef FPE_FLTSUB
+ DEFINE_ENTRY(FPE_FLTSUB)
+#endif
+ END_TABLE
+};
+
+static struct str_table sigsegv_code_table[] = {
+#ifdef SEGV_MAPERR
+ DEFINE_ENTRY(SEGV_MAPERR)
+#endif
+#ifdef SEGV_ACCERR
+ DEFINE_ENTRY(SEGV_ACCERR)
+#endif
+ END_TABLE
+};
+
+
+static struct str_table sigbus_code_table[] = {
+#ifdef BUS_ADRALN
+ DEFINE_ENTRY(BUS_ADRALN)
+#endif
+#ifdef BUS_ADRERR
+ DEFINE_ENTRY(BUS_ADRERR)
+#endif
+#ifdef BUS_OBJERR
+ DEFINE_ENTRY(BUS_OBJERR)
+#endif
+ END_TABLE
+};
+
+#if 0 /* should this be hooked in somewhere? */
+static struct str_table sigstrap_code_table[] = {
+#ifdef TRAP_BRKPT
+ DEFINE_ENTRY(TRAP_BRKPT)
+#endif
+#ifdef TRAP_TRACE
+ DEFINE_ENTRY(TRAP_TRACE)
+#endif
+ END_TABLE
+};
+#endif
+
+static struct str_table sigcld_code_table[] = {
+#ifdef CLD_EXITED
+ DEFINE_ENTRY(CLD_EXITED)
+#endif
+#ifdef CLD_KILLED
+ DEFINE_ENTRY(CLD_KILLED)
+#endif
+#ifdef CLD_DUMPED
+ DEFINE_ENTRY(CLD_DUMPED)
+#endif
+#ifdef CLD_TRAPPED
+ DEFINE_ENTRY(CLD_TRAPPED)
+#endif
+#ifdef CLD_STOPPED
+ DEFINE_ENTRY(CLD_STOPPED)
+#endif
+#ifdef CLD_CONTINUED
+ DEFINE_ENTRY(CLD_CONTINUED)
+#endif
+ END_TABLE
+};
+
+#if 0 /* should this be hooked in somewhere? */
+static struct str_table sigpoll_code_table[] = {
+#ifdef POLL_IN
+ DEFINE_ENTRY(POLL_IN)
+#endif
+#ifdef POLL_OUT
+ DEFINE_ENTRY(POLL_OUT)
+#endif
+#ifdef POLL_MSG
+ DEFINE_ENTRY(POLL_MSG)
+#endif
+#ifdef POLL_ERR
+ DEFINE_ENTRY(POLL_ERR)
+#endif
+#ifdef POLL_PRI
+ DEFINE_ENTRY(POLL_PRI)
+#endif
+#ifdef POLL_HUP
+ DEFINE_ENTRY(POLL_HUP)
+#endif
+ END_TABLE
+};
+#endif
+
+static const char *lookup_table(int num, struct str_table *table)
+{
+ struct str_table *p;
+
+ for (p=table; p->name; p++)
+ if (num == p->num)
+ return(p->name);
+ return NULL;
+}
+
+static const char *lookup_table_fallback(int num, struct str_table *table)
+{
+ static char buf[32];
+ const char *ret = lookup_table(num, table);
+
+ if (ret)
+ return ret;
+ snprintf(buf, sizeof(buf), "%d", num);
+ buf[sizeof(buf)-1] = 0;
+ return buf;
+}
+
+static void die_signal_handler(int signum, siginfo_t *siginfo,
+ void *context EXT2FS_ATTR((unused)))
+{
+ const char *cp;
+
+ fprintf(stderr, "Signal (%d) %s ", signum,
+ lookup_table_fallback(signum, sig_table));
+ if (siginfo->si_code == SI_USER)
+ fprintf(stderr, "(sent from pid %u) ", siginfo->si_pid);
+ cp = lookup_table(siginfo->si_code, generic_code_table);
+ if (cp)
+ fprintf(stderr, "si_code=%s ", cp);
+ else if (signum == SIGILL)
+ fprintf(stderr, "si_code=%s ",
+ lookup_table_fallback(siginfo->si_code,
+ sigill_code_table));
+ else if (signum == SIGFPE)
+ fprintf(stderr, "si_code=%s ",
+ lookup_table_fallback(siginfo->si_code,
+ sigfpe_code_table));
+ else if (signum == SIGSEGV)
+ fprintf(stderr, "si_code=%s ",
+ lookup_table_fallback(siginfo->si_code,
+ sigsegv_code_table));
+ else if (signum == SIGBUS)
+ fprintf(stderr, "si_code=%s ",
+ lookup_table_fallback(siginfo->si_code,
+ sigbus_code_table));
+ else if (signum == SIGCHLD)
+ fprintf(stderr, "si_code=%s ",
+ lookup_table_fallback(siginfo->si_code,
+ sigcld_code_table));
+ else
+ fprintf(stderr, "si code=%d ", siginfo->si_code);
+ if ((siginfo->si_code != SI_USER) &&
+ (signum == SIGILL || signum == SIGFPE ||
+ signum == SIGSEGV || signum == SIGBUS))
+ fprintf(stderr, "fault addr=%p", siginfo->si_addr);
+ fprintf(stderr, "\n");
+
+#if defined(HAVE_BACKTRACE) && !defined(DISABLE_BACKTRACE)
+ {
+ void *stack_syms[32];
+ int frames;
+
+ frames = backtrace(stack_syms, 32);
+ backtrace_symbols_fd(stack_syms, frames, 2);
+ }
+#endif
+ exit(FSCK_ERROR);
+}
+
+void sigcatcher_setup(void)
+{
+ struct sigaction sa;
+
+ memset(&sa, 0, sizeof(struct sigaction));
+ sa.sa_sigaction = die_signal_handler;
+ sa.sa_flags = SA_SIGINFO;
+
+ sigaction(SIGFPE, &sa, 0);
+ sigaction(SIGILL, &sa, 0);
+ sigaction(SIGBUS, &sa, 0);
+ sigaction(SIGSEGV, &sa, 0);
+ sigaction(SIGABRT, &sa, 0);
+}
+
+
+#ifdef DEBUG
+#include <getopt.h>
+
+void usage(void)
+{
+ fprintf(stderr, "tst_sigcatcher: [-akfn]\n");
+ exit(1);
+}
+
+int main(int argc, char** argv)
+{
+ struct sigaction sa;
+ char *p = 0;
+ int i, c;
+ volatile x=0;
+
+ memset(&sa, 0, sizeof(struct sigaction));
+ sa.sa_sigaction = die_signal_handler;
+ sa.sa_flags = SA_SIGINFO;
+ for (i=1; i < 31; i++)
+ sigaction(i, &sa, 0);
+
+ while ((c = getopt (argc, argv, "afkn")) != EOF)
+ switch (c) {
+ case 'a':
+ abort();
+ break;
+ case 'f':
+ printf("%d\n", 42/x);
+ case 'k':
+ kill(getpid(), SIGTERM);
+ break;
+ case 'n':
+ *p = 42;
+ default:
+ usage ();
+ }
+
+ printf("Sleeping for 10 seconds, send kill signal to pid %u...\n",
+ getpid());
+ fflush(stdout);
+ sleep(10);
+ exit(0);
+}
+#endif
diff --git a/e2fsck/super.c b/e2fsck/super.c
new file mode 100644
index 0000000..9495e02
--- /dev/null
+++ b/e2fsck/super.c
@@ -0,0 +1,1461 @@
+/*
+ * e2fsck.c - superblock checks
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifndef EXT2_SKIP_UUID
+#include "uuid/uuid.h"
+#endif
+#include "e2fsck.h"
+#include "problem.h"
+
+#define MIN_CHECK 1
+#define MAX_CHECK 2
+#define LOG2_CHECK 4
+
+static int check_super_value(e2fsck_t ctx, const char *descr,
+ unsigned long value, int flags,
+ unsigned long min_val, unsigned long max_val)
+{
+ struct problem_context pctx;
+
+ if ((flags & MIN_CHECK && value < min_val) ||
+ (flags & MAX_CHECK && value > max_val) ||
+ (flags & LOG2_CHECK && (value & (value - 1)) != 0)) {
+ clear_problem_context(&pctx);
+ pctx.num = value;
+ pctx.str = descr;
+ fix_problem(ctx, PR_0_MISC_CORRUPT_SUPER, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+ }
+ return 1;
+}
+
+static int check_super_value64(e2fsck_t ctx, const char *descr,
+ __u64 value, int flags,
+ __u64 min_val, __u64 max_val)
+{
+ struct problem_context pctx;
+
+ if ((flags & MIN_CHECK && value < min_val) ||
+ (flags & MAX_CHECK && value > max_val) ||
+ (flags & LOG2_CHECK && (value & (value - 1)) != 0)) {
+ clear_problem_context(&pctx);
+ pctx.num = value;
+ pctx.str = descr;
+ fix_problem(ctx, PR_0_MISC_CORRUPT_SUPER, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return 0;
+ }
+ return 1;
+}
+
+/*
+ * helper function to release an inode
+ */
+struct process_block_struct {
+ e2fsck_t ctx;
+ char *buf;
+ struct problem_context *pctx;
+ int truncating;
+ int truncate_offset;
+ e2_blkcnt_t truncate_block;
+ int truncated_blocks;
+ int abort;
+ errcode_t errcode;
+ blk64_t last_cluster;
+ struct ext2_inode_large *inode;
+};
+
+static int release_inode_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_block_struct *pb;
+ e2fsck_t ctx;
+ struct problem_context *pctx;
+ blk64_t blk = *block_nr;
+ blk64_t cluster = EXT2FS_B2C(fs, *block_nr);
+ int retval = 0;
+
+ pb = (struct process_block_struct *) priv_data;
+ ctx = pb->ctx;
+ pctx = pb->pctx;
+
+ pctx->blk = blk;
+ pctx->blkcount = blockcnt;
+
+ if (blk == 0)
+ return 0;
+
+ if (pb->last_cluster == cluster)
+ return 0;
+
+ pb->last_cluster = cluster;
+
+ if ((blk < fs->super->s_first_data_block) ||
+ (blk >= ext2fs_blocks_count(fs->super))) {
+ fix_problem(ctx, PR_0_ORPHAN_ILLEGAL_BLOCK_NUM, pctx);
+ return_abort:
+ pb->abort = 1;
+ return BLOCK_ABORT;
+ }
+
+ if (!ext2fs_test_block_bitmap2(fs->block_map, blk)) {
+ fix_problem(ctx, PR_0_ORPHAN_ALREADY_CLEARED_BLOCK, pctx);
+ goto return_abort;
+ }
+
+ /*
+ * If we are deleting an orphan, then we leave the fields alone.
+ * If we are truncating an orphan, then update the inode fields
+ * and clean up any partial block data.
+ */
+ if (pb->truncating) {
+ /*
+ * We only remove indirect blocks if they are
+ * completely empty.
+ */
+ if (blockcnt < 0) {
+ int i, limit;
+ blk_t *bp;
+
+ pb->errcode = io_channel_read_blk64(fs->io, blk, 1,
+ pb->buf);
+ if (pb->errcode)
+ goto return_abort;
+
+ limit = fs->blocksize >> 2;
+ for (i = 0, bp = (blk_t *) pb->buf;
+ i < limit; i++, bp++)
+ if (*bp)
+ return 0;
+ }
+ /*
+ * We don't remove direct blocks until we've reached
+ * the truncation block.
+ */
+ if (blockcnt >= 0 && blockcnt < pb->truncate_block)
+ return 0;
+ /*
+ * If part of the last block needs truncating, we do
+ * it here.
+ */
+ if ((blockcnt == pb->truncate_block) && pb->truncate_offset) {
+ pb->errcode = io_channel_read_blk64(fs->io, blk, 1,
+ pb->buf);
+ if (pb->errcode)
+ goto return_abort;
+ memset(pb->buf + pb->truncate_offset, 0,
+ fs->blocksize - pb->truncate_offset);
+ pb->errcode = io_channel_write_blk64(fs->io, blk, 1,
+ pb->buf);
+ if (pb->errcode)
+ goto return_abort;
+ }
+ pb->truncated_blocks++;
+ *block_nr = 0;
+ retval |= BLOCK_CHANGED;
+ }
+
+ if (ctx->qctx)
+ quota_data_sub(ctx->qctx, pb->inode, 0, ctx->fs->blocksize);
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ ctx->free_blocks++;
+ return retval;
+}
+
+/*
+ * This function releases an inode. Returns 1 if an inconsistency was
+ * found. If the inode has a link count, then it is being truncated and
+ * not deleted.
+ */
+static int release_inode_blocks(e2fsck_t ctx, ext2_ino_t ino,
+ struct ext2_inode_large *inode, char *block_buf,
+ struct problem_context *pctx)
+{
+ struct process_block_struct pb;
+ ext2_filsys fs = ctx->fs;
+ blk64_t blk;
+ errcode_t retval;
+ __u32 count;
+
+ if (!ext2fs_inode_has_valid_blocks2(fs, EXT2_INODE(inode)))
+ return 0;
+
+ pb.buf = block_buf + 3 * ctx->fs->blocksize;
+ pb.ctx = ctx;
+ pb.abort = 0;
+ pb.errcode = 0;
+ pb.pctx = pctx;
+ pb.last_cluster = 0;
+ pb.inode = inode;
+ if (inode->i_links_count) {
+ pb.truncating = 1;
+ pb.truncate_block = (e2_blkcnt_t)
+ ((EXT2_I_SIZE(inode) + fs->blocksize - 1) /
+ fs->blocksize);
+ pb.truncate_offset = inode->i_size % fs->blocksize;
+ } else {
+ pb.truncating = 0;
+ pb.truncate_block = 0;
+ pb.truncate_offset = 0;
+ }
+ pb.truncated_blocks = 0;
+ retval = ext2fs_block_iterate3(fs, ino, BLOCK_FLAG_DEPTH_TRAVERSE,
+ block_buf, release_inode_block, &pb);
+ if (retval) {
+ com_err("release_inode_blocks", retval,
+ _("while calling ext2fs_block_iterate for inode %u"),
+ ino);
+ return 1;
+ }
+ if (pb.abort)
+ return 1;
+
+ /* Refresh the inode since ext2fs_block_iterate may have changed it */
+ e2fsck_read_inode_full(ctx, ino, EXT2_INODE(inode), sizeof(*inode),
+ "release_inode_blocks");
+
+ if (pb.truncated_blocks)
+ ext2fs_iblk_sub_blocks(fs, EXT2_INODE(inode),
+ pb.truncated_blocks);
+
+ blk = ext2fs_file_acl_block(fs, EXT2_INODE(inode));
+ if (blk) {
+ retval = ext2fs_adjust_ea_refcount3(fs, blk, block_buf, -1,
+ &count, ino);
+ if (retval == EXT2_ET_BAD_EA_BLOCK_NUM) {
+ retval = 0;
+ count = 1;
+ }
+ if (retval) {
+ com_err("release_inode_blocks", retval,
+ _("while calling ext2fs_adjust_ea_refcount2 for inode %u"),
+ ino);
+ return 1;
+ }
+ if (count == 0) {
+ if (ctx->qctx)
+ quota_data_sub(ctx->qctx, inode, 0,
+ ctx->fs->blocksize);
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ ctx->free_blocks++;
+ }
+ ext2fs_file_acl_block_set(fs, EXT2_INODE(inode), 0);
+ }
+ return 0;
+}
+
+/* Load all quota data in preparation for orphan clearing. */
+static errcode_t e2fsck_read_all_quotas(e2fsck_t ctx)
+{
+ ext2_ino_t qf_ino;
+ enum quota_type qtype;
+ errcode_t retval = 0;
+
+ if (!ext2fs_has_feature_quota(ctx->fs->super))
+ return retval;
+
+ retval = quota_init_context(&ctx->qctx, ctx->fs, 0);
+ if (retval)
+ return retval;
+
+ for (qtype = 0 ; qtype < MAXQUOTAS; qtype++) {
+ qf_ino = *quota_sb_inump(ctx->fs->super, qtype);
+ if (qf_ino == 0)
+ continue;
+
+ retval = quota_read_all_dquots(ctx->qctx, qf_ino, qtype,
+ QREAD_USAGE | QREAD_LIMITS);
+ if (retval)
+ break;
+ }
+ if (retval)
+ quota_release_context(&ctx->qctx);
+ return retval;
+}
+
+/* Write all the quota info to disk. */
+static errcode_t e2fsck_write_all_quotas(e2fsck_t ctx)
+{
+ struct problem_context pctx;
+ enum quota_type qtype;
+
+ if (!ext2fs_has_feature_quota(ctx->fs->super))
+ return 0;
+
+ clear_problem_context(&pctx);
+ for (qtype = 0 ; qtype < MAXQUOTAS; qtype++) {
+ pctx.num = qtype;
+ pctx.errcode = quota_write_inode(ctx->qctx, 1 << qtype);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_6_WRITE_QUOTAS, &pctx);
+ break;
+ }
+ }
+
+ quota_release_context(&ctx->qctx);
+ return pctx.errcode;
+}
+
+static int release_orphan_inode(e2fsck_t ctx, ext2_ino_t *ino, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct problem_context pctx;
+ struct ext2_inode_large inode;
+ ext2_ino_t next_ino;
+
+ e2fsck_read_inode_full(ctx, *ino, EXT2_INODE(&inode),
+ sizeof(inode), "release_orphan_inode");
+ clear_problem_context(&pctx);
+ pctx.ino = *ino;
+ pctx.inode = EXT2_INODE(&inode);
+ pctx.str = inode.i_links_count ? _("Truncating") : _("Clearing");
+
+ fix_problem(ctx, PR_0_ORPHAN_CLEAR_INODE, &pctx);
+
+ next_ino = inode.i_dtime;
+ if (next_ino &&
+ ((next_ino < EXT2_FIRST_INODE(fs->super)) ||
+ (next_ino > fs->super->s_inodes_count))) {
+ pctx.ino = next_ino;
+ fix_problem(ctx, PR_0_ORPHAN_ILLEGAL_INODE, &pctx);
+ return 1;
+ }
+
+ if (release_inode_blocks(ctx, *ino, &inode, block_buf, &pctx))
+ return 1;
+
+ if (!inode.i_links_count) {
+ if (ctx->qctx)
+ quota_data_inodes(ctx->qctx, &inode, *ino, -1);
+ ext2fs_inode_alloc_stats2(fs, *ino, -1,
+ LINUX_S_ISDIR(inode.i_mode));
+ ctx->free_inodes++;
+ inode.i_dtime = ctx->now;
+ } else {
+ inode.i_dtime = 0;
+ }
+ e2fsck_write_inode_full(ctx, *ino, EXT2_INODE(&inode),
+ sizeof(inode), "delete_file");
+ *ino = next_ino;
+ return 0;
+}
+
+struct process_orphan_block_data {
+ e2fsck_t ctx;
+ char *buf;
+ char *block_buf;
+ e2_blkcnt_t blocks;
+ int abort;
+ int clear;
+ errcode_t errcode;
+ ext2_ino_t ino;
+ __u32 generation;
+};
+
+static int process_orphan_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_orphan_block_data *pd;
+ e2fsck_t ctx;
+ struct problem_context pctx;
+ blk64_t blk = *block_nr;
+ struct ext4_orphan_block_tail *tail;
+ int j;
+ int inodes_per_ob;
+ __u32 *bdata;
+ ext2_ino_t ino;
+
+ pd = priv_data;
+ ctx = pd->ctx;
+ clear_problem_context(&pctx);
+ pctx.ino = fs->super->s_orphan_file_inum;
+ pctx.blk = blockcnt;
+
+ /* Orphan file must not have holes */
+ if (!blk) {
+ if (blockcnt == pd->blocks)
+ return BLOCK_ABORT;
+ fix_problem(ctx, PR_0_ORPHAN_FILE_HOLE, &pctx);
+return_abort:
+ pd->abort = 1;
+ return BLOCK_ABORT;
+ }
+ inodes_per_ob = ext2fs_inodes_per_orphan_block(fs);
+ pd->errcode = io_channel_read_blk64(fs->io, blk, 1, pd->buf);
+ if (pd->errcode)
+ goto return_abort;
+ tail = ext2fs_orphan_block_tail(fs, pd->buf);
+ if (ext2fs_le32_to_cpu(tail->ob_magic) !=
+ EXT4_ORPHAN_BLOCK_MAGIC) {
+ fix_problem(ctx, PR_0_ORPHAN_FILE_BAD_MAGIC, &pctx);
+ goto return_abort;
+ }
+ if (!ext2fs_orphan_file_block_csum_verify(fs,
+ fs->super->s_orphan_file_inum, blk, pd->buf)) {
+ fix_problem(ctx, PR_0_ORPHAN_FILE_BAD_CHECKSUM, &pctx);
+ goto return_abort;
+ }
+ bdata = (__u32 *)pd->buf;
+ for (j = 0; j < inodes_per_ob; j++) {
+ if (!bdata[j])
+ continue;
+ ino = ext2fs_le32_to_cpu(bdata[j]);
+ if (release_orphan_inode(ctx, &ino, pd->block_buf))
+ goto return_abort;
+ }
+ return 0;
+}
+
+static int process_orphan_file(e2fsck_t ctx, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ char *orphan_buf;
+ struct process_orphan_block_data pd;
+ int ret = 0;
+ ext2_ino_t orphan_inum = fs->super->s_orphan_file_inum;
+ struct ext2_inode orphan_inode;
+ struct problem_context pctx;
+ errcode_t retval;
+
+ if (!ext2fs_has_feature_orphan_file(fs->super))
+ return 0;
+
+ clear_problem_context(&pctx);
+ pctx.ino = orphan_inum;
+
+ orphan_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
+ "orphan block buffer");
+ retval = ext2fs_read_inode(fs, orphan_inum, &orphan_inode);
+ if (retval < 0) {
+ com_err("process_orphan_file", retval,
+ _("while reading inode %d"), orphan_inum);
+ ret = 1;
+ goto out;
+ }
+ if (EXT2_I_SIZE(&orphan_inode) & (fs->blocksize - 1)) {
+ fix_problem(ctx, PR_0_ORPHAN_FILE_WRONG_SIZE, &pctx);
+ ret = 1;
+ goto out;
+ }
+ pd.buf = orphan_buf + 3 * fs->blocksize;
+ pd.block_buf = block_buf;
+ pd.blocks = EXT2_I_SIZE(&orphan_inode) / fs->blocksize;
+ pd.ctx = ctx;
+ pd.abort = 0;
+ pd.errcode = 0;
+ retval = ext2fs_block_iterate3(fs, orphan_inum,
+ BLOCK_FLAG_DATA_ONLY | BLOCK_FLAG_HOLE,
+ orphan_buf, process_orphan_block, &pd);
+ if (retval) {
+ com_err("process_orphan_block", retval,
+ _("while calling ext2fs_block_iterate for inode %d"),
+ orphan_inum);
+ ret = 1;
+ goto out;
+ }
+ if (pd.abort) {
+ if (pd.errcode) {
+ com_err("process_orphan_block", pd.errcode,
+ _("while reading blocks of inode %d"),
+ orphan_inum);
+ }
+ ret = 1;
+ }
+out:
+ ext2fs_free_mem(&orphan_buf);
+ return ret;
+}
+
+/*
+ * This function releases all of the orphan inodes. It returns 1 if
+ * it hit some error, and 0 on success.
+ */
+static int release_orphan_inodes(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino;
+ struct problem_context pctx;
+ char *block_buf;
+
+ if (fs->super->s_last_orphan == 0 &&
+ !ext2fs_has_feature_orphan_present(fs->super))
+ return 0;
+
+ clear_problem_context(&pctx);
+ ino = fs->super->s_last_orphan;
+ pctx.ino = ino;
+ pctx.errcode = e2fsck_read_all_quotas(ctx);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_0_QUOTA_INIT_CTX, &pctx);
+ return 1;
+ }
+
+ /*
+ * Win or lose, we won't be using the head of the orphan inode
+ * list again.
+ */
+ fs->super->s_last_orphan = 0;
+ ext2fs_mark_super_dirty(fs);
+
+ /*
+ * If the filesystem contains errors, don't process the orphan list
+ * or orphan file, since neither can be trusted; and we're going to
+ * be running a full e2fsck run anyway... We clear orphan file contents
+ * after filesystem is checked to avoid clearing someone else's data.
+ */
+ if (fs->super->s_state & EXT2_ERROR_FS) {
+ if (ctx->qctx)
+ quota_release_context(&ctx->qctx);
+ return 0;
+ }
+
+ if (ino && ((ino < EXT2_FIRST_INODE(fs->super)) ||
+ (ino > fs->super->s_inodes_count))) {
+ fix_problem(ctx, PR_0_ORPHAN_ILLEGAL_HEAD_INODE, &pctx);
+ goto err_qctx;
+ }
+
+ block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
+ "block iterate buffer");
+ e2fsck_read_bitmaps(ctx);
+
+ /* First process orphan list */
+ while (ino) {
+ if (release_orphan_inode(ctx, &ino, block_buf))
+ goto err_buf;
+ }
+
+ /* Next process orphan file */
+ if (ext2fs_has_feature_orphan_present(fs->super) &&
+ !ext2fs_has_feature_orphan_file(fs->super))
+ goto err_buf;
+ if (process_orphan_file(ctx, block_buf))
+ goto err_buf;
+
+ ext2fs_free_mem(&block_buf);
+ pctx.errcode = e2fsck_write_all_quotas(ctx);
+ if (pctx.errcode)
+ goto err;
+ return 0;
+err_buf:
+ ext2fs_free_mem(&block_buf);
+err_qctx:
+ if (ctx->qctx)
+ quota_release_context(&ctx->qctx);
+err:
+ return 1;
+}
+
+static int reinit_orphan_block(ext2_filsys fs,
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct process_orphan_block_data *pd;
+ e2fsck_t ctx;
+ blk64_t blk = *block_nr;
+ struct problem_context pctx;
+
+ pd = priv_data;
+ ctx = pd->ctx;
+
+ /* Orphan file must not have holes */
+ if (!blk) {
+ if (blockcnt == pd->blocks)
+ return BLOCK_ABORT;
+
+ clear_problem_context(&pctx);
+ pctx.ino = fs->super->s_orphan_file_inum;
+ pctx.blk = blockcnt;
+ fix_problem(ctx, PR_6_ORPHAN_FILE_HOLE, &pctx);
+return_abort:
+ pd->abort = 1;
+ return BLOCK_ABORT;
+ }
+
+ if (ext2fs_has_feature_metadata_csum(fs->super)) {
+ struct ext4_orphan_block_tail *tail;
+
+ tail = ext2fs_orphan_block_tail(fs, pd->buf);
+ /*
+ * Update checksum to match expected buffer contents with
+ * appropriate block number.
+ */
+ tail->ob_checksum = ext2fs_do_orphan_file_block_csum(fs,
+ pd->ino, pd->generation, blk, pd->buf);
+ }
+ if (!pd->clear) {
+ pd->errcode = io_channel_read_blk64(fs->io, blk, 1,
+ pd->block_buf);
+ /* Block is already cleanly initialized? */
+ if (!memcmp(pd->block_buf, pd->buf, fs->blocksize))
+ return 0;
+
+ clear_problem_context(&pctx);
+ pctx.ino = fs->super->s_orphan_file_inum;
+ pctx.blk = blockcnt;
+ if (!fix_problem(ctx, PR_6_ORPHAN_BLOCK_DIRTY, &pctx))
+ goto return_abort;
+ pd->clear = 1;
+ }
+ pd->errcode = io_channel_write_blk64(fs->io, blk, 1, pd->buf);
+ if (pd->errcode)
+ goto return_abort;
+ return 0;
+}
+
+/*
+ * Check and clear orphan file. We just return non-zero if we hit some
+ * inconsistency. Caller will truncate & recreate new orphan file.
+ */
+int check_init_orphan_file(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ char *orphan_buf;
+ struct process_orphan_block_data pd;
+ struct ext4_orphan_block_tail *tail;
+ ext2_ino_t orphan_inum = fs->super->s_orphan_file_inum;
+ struct ext2_inode orphan_inode;
+ int ret = 0;
+ errcode_t retval;
+
+ orphan_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 5,
+ "orphan block buffer");
+ e2fsck_read_inode(ctx, orphan_inum, &orphan_inode, "orphan inode");
+ if (EXT2_I_SIZE(&orphan_inode) & (fs->blocksize - 1)) {
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+ pctx.ino = orphan_inum;
+ fix_problem(ctx, PR_6_ORPHAN_FILE_WRONG_SIZE, &pctx);
+ ret = 1;
+ goto out;
+ }
+ pd.buf = orphan_buf + 3 * fs->blocksize;
+ pd.block_buf = orphan_buf + 4 * fs->blocksize;
+ pd.blocks = EXT2_I_SIZE(&orphan_inode) / fs->blocksize;
+ pd.ctx = ctx;
+ pd.abort = 0;
+ pd.clear = 0;
+ pd.errcode = 0;
+ pd.ino = orphan_inum;
+ pd.generation = orphan_inode.i_generation;
+ /* Initialize buffer to write */
+ memset(pd.buf, 0, fs->blocksize);
+ tail = ext2fs_orphan_block_tail(fs, pd.buf);
+ tail->ob_magic = ext2fs_cpu_to_le32(EXT4_ORPHAN_BLOCK_MAGIC);
+
+ retval = ext2fs_block_iterate3(fs, orphan_inum,
+ BLOCK_FLAG_DATA_ONLY | BLOCK_FLAG_HOLE,
+ orphan_buf, reinit_orphan_block, &pd);
+ if (retval) {
+ com_err("reinit_orphan_block", retval,
+ _("while calling ext2fs_block_iterate for inode %d"),
+ orphan_inum);
+ ret = 1;
+ goto out;
+ }
+ if (pd.abort) {
+ if (pd.errcode) {
+ com_err("process_orphan_block", pd.errcode,
+ _("while reading blocks of inode %d"),
+ orphan_inum);
+ }
+ ret = 1;
+ }
+
+ /* We had to clear some blocks. Report it up. */
+ if (ret == 0 && pd.clear)
+ ret = 2;
+out:
+ ext2fs_free_mem(&orphan_buf);
+ return ret;
+}
+
+/*
+ * Check the resize inode to make sure it is sane. We check both for
+ * the case where on-line resizing is not enabled (in which case the
+ * resize inode should be cleared) as well as the case where on-line
+ * resizing is enabled.
+ */
+void check_resize_inode(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ struct ext2_inode inode;
+ struct problem_context pctx;
+ int i, gdt_off, ind_off;
+ dgrp_t j;
+ blk_t blk, pblk;
+ blk_t expect; /* for resize inode, which is 32-bit only */
+ __u32 *dind_buf = 0, *ind_buf;
+ errcode_t retval;
+
+ clear_problem_context(&pctx);
+
+ if (ext2fs_has_feature_resize_inode(fs->super) &&
+ ext2fs_has_feature_meta_bg(fs->super) &&
+ fix_problem(ctx, PR_0_DISABLE_RESIZE_INODE, &pctx)) {
+ ext2fs_clear_feature_resize_inode(fs->super);
+ fs->super->s_reserved_gdt_blocks = 0;
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ /*
+ * If the resize inode feature isn't set, then
+ * s_reserved_gdt_blocks must be zero.
+ */
+ if (!ext2fs_has_feature_resize_inode(fs->super)) {
+ if (fs->super->s_reserved_gdt_blocks) {
+ pctx.num = fs->super->s_reserved_gdt_blocks;
+ if (fix_problem(ctx, PR_0_NONZERO_RESERVED_GDT_BLOCKS,
+ &pctx)) {
+ fs->super->s_reserved_gdt_blocks = 0;
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+ }
+
+ /* Read the resize inode */
+ pctx.ino = EXT2_RESIZE_INO;
+ retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
+ if (retval) {
+ if (ext2fs_has_feature_resize_inode(fs->super))
+ ctx->flags |= E2F_FLAG_RESIZE_INODE;
+ return;
+ }
+
+ /*
+ * If the resize inode feature isn't set, check to make sure
+ * the resize inode is cleared; then we're done.
+ */
+ if (!ext2fs_has_feature_resize_inode(fs->super)) {
+ for (i=0; i < EXT2_N_BLOCKS; i++) {
+ if (inode.i_block[i])
+ break;
+ }
+ if ((i < EXT2_N_BLOCKS) &&
+ fix_problem(ctx, PR_0_CLEAR_RESIZE_INODE, &pctx)) {
+ memset(&inode, 0, sizeof(inode));
+ e2fsck_write_inode(ctx, EXT2_RESIZE_INO, &inode,
+ "clear_resize");
+ }
+ return;
+ }
+
+ /*
+ * The resize inode feature is enabled; check to make sure the
+ * only block in use is the double indirect block
+ */
+ blk = inode.i_block[EXT2_DIND_BLOCK];
+ for (i=0; i < EXT2_N_BLOCKS; i++) {
+ if (i != EXT2_DIND_BLOCK && inode.i_block[i])
+ break;
+ }
+ if ((i < EXT2_N_BLOCKS) || !blk || !inode.i_links_count ||
+ !(inode.i_mode & LINUX_S_IFREG) ||
+ (blk < fs->super->s_first_data_block ||
+ blk >= ext2fs_blocks_count(fs->super))) {
+ resize_inode_invalid:
+ if (fix_problem(ctx, PR_0_RESIZE_INODE_INVALID, &pctx)) {
+ memset(&inode, 0, sizeof(inode));
+ e2fsck_write_inode(ctx, EXT2_RESIZE_INO, &inode,
+ "clear_resize");
+ ctx->flags |= E2F_FLAG_RESIZE_INODE;
+ }
+ if (!(ctx->options & E2F_OPT_READONLY)) {
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(fs);
+ }
+ goto cleanup;
+ }
+ dind_buf = (__u32 *) e2fsck_allocate_memory(ctx, fs->blocksize * 2,
+ "resize dind buffer");
+ ind_buf = (__u32 *) ((char *) dind_buf + fs->blocksize);
+
+ retval = ext2fs_read_ind_block(fs, blk, dind_buf);
+ if (retval)
+ goto resize_inode_invalid;
+
+ gdt_off = fs->desc_blocks;
+ pblk = fs->super->s_first_data_block + 1 + fs->desc_blocks;
+ if (fs->blocksize == 1024 && fs->super->s_first_data_block == 0)
+ pblk++; /* Deal with 1024 blocksize bigalloc fs */
+ for (i = 0; i < fs->super->s_reserved_gdt_blocks / 4;
+ i++, gdt_off++, pblk++) {
+ gdt_off %= fs->blocksize/4;
+ if (dind_buf[gdt_off] != pblk)
+ goto resize_inode_invalid;
+ retval = ext2fs_read_ind_block(fs, pblk, ind_buf);
+ if (retval)
+ goto resize_inode_invalid;
+ ind_off = 0;
+ for (j = 1; j < fs->group_desc_count; j++) {
+ if (!ext2fs_bg_has_super(fs, j))
+ continue;
+ expect = pblk + EXT2_GROUPS_TO_BLOCKS(fs->super, j);
+ if (ind_buf[ind_off] != expect)
+ goto resize_inode_invalid;
+ ind_off++;
+ }
+ }
+
+cleanup:
+ if (dind_buf)
+ ext2fs_free_mem(&dind_buf);
+
+ }
+
+/*
+ * This function checks the dirhash signed/unsigned hint if necessary.
+ */
+static void e2fsck_fix_dirhash_hint(e2fsck_t ctx)
+{
+ struct ext2_super_block *sb = ctx->fs->super;
+ struct problem_context pctx;
+ char c;
+
+ if ((ctx->options & E2F_OPT_READONLY) ||
+ !ext2fs_has_feature_dir_index(sb) ||
+ (sb->s_flags & (EXT2_FLAGS_SIGNED_HASH|EXT2_FLAGS_UNSIGNED_HASH)))
+ return;
+
+ c = (char) 255;
+
+ clear_problem_context(&pctx);
+ if (fix_problem(ctx, PR_0_DIRHASH_HINT, &pctx)) {
+ if (((int) c) == -1) {
+ sb->s_flags |= EXT2_FLAGS_SIGNED_HASH;
+ } else {
+ sb->s_flags |= EXT2_FLAGS_UNSIGNED_HASH;
+ }
+ ext2fs_mark_super_dirty(ctx->fs);
+ }
+}
+
+
+void check_super_block(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk64_t first_block, last_block;
+ struct ext2_super_block *sb = fs->super;
+ unsigned int ipg_max;
+ problem_t problem;
+ blk64_t blocks_per_group = fs->super->s_blocks_per_group;
+ __u32 bpg_max, cpg_max;
+ __u64 blks_max;
+ int inodes_per_block;
+ int inode_size;
+ int accept_time_fudge;
+ int broken_system_clock;
+ dgrp_t i;
+ blk64_t should_be;
+ struct problem_context pctx;
+ blk64_t free_blocks = 0;
+ ext2_ino_t free_inodes = 0;
+ int csum_flag, clear_test_fs_flag;
+
+ inodes_per_block = EXT2_INODES_PER_BLOCK(fs->super);
+ ipg_max = inodes_per_block * (blocks_per_group - 4);
+ if (ipg_max > EXT2_MAX_INODES_PER_GROUP(sb))
+ ipg_max = EXT2_MAX_INODES_PER_GROUP(sb);
+ cpg_max = 8 * EXT2_BLOCK_SIZE(sb);
+ if (cpg_max > EXT2_MAX_CLUSTERS_PER_GROUP(sb))
+ cpg_max = EXT2_MAX_CLUSTERS_PER_GROUP(sb);
+ bpg_max = 8 * EXT2_BLOCK_SIZE(sb) * EXT2FS_CLUSTER_RATIO(fs);
+ if (bpg_max > EXT2_MAX_BLOCKS_PER_GROUP(sb))
+ bpg_max = EXT2_MAX_BLOCKS_PER_GROUP(sb);
+
+ ctx->invalid_inode_bitmap_flag = (int *) e2fsck_allocate_memory(ctx,
+ sizeof(int) * fs->group_desc_count, "invalid_inode_bitmap");
+ ctx->invalid_block_bitmap_flag = (int *) e2fsck_allocate_memory(ctx,
+ sizeof(int) * fs->group_desc_count, "invalid_block_bitmap");
+ ctx->invalid_inode_table_flag = (int *) e2fsck_allocate_memory(ctx,
+ sizeof(int) * fs->group_desc_count, "invalid_inode_table");
+
+ blks_max = (1ULL << 32) * EXT2_MAX_BLOCKS_PER_GROUP(fs->super);
+ if (ext2fs_has_feature_64bit(fs->super)) {
+ if (blks_max > ((1ULL << 48) - 1))
+ blks_max = (1ULL << 48) - 1;
+ } else {
+ if (blks_max > ((1ULL << 32) - 1))
+ blks_max = (1ULL << 32) - 1;
+ }
+
+ clear_problem_context(&pctx);
+
+ /*
+ * Verify the super block constants...
+ */
+ if (!check_super_value(ctx, "inodes_count", sb->s_inodes_count,
+ MIN_CHECK, 1, 0))
+ return;
+ if (!check_super_value64(ctx, "blocks_count", ext2fs_blocks_count(sb),
+ MIN_CHECK | MAX_CHECK, 1, blks_max))
+ return;
+ if (!check_super_value(ctx, "first_data_block", sb->s_first_data_block,
+ MAX_CHECK, 0, ext2fs_blocks_count(sb)))
+ return;
+ if (!check_super_value(ctx, "log_block_size", sb->s_log_block_size,
+ MIN_CHECK | MAX_CHECK, 0,
+ EXT2_MAX_BLOCK_LOG_SIZE - EXT2_MIN_BLOCK_LOG_SIZE))
+ return;
+ if (!check_super_value(ctx, "log_cluster_size",
+ sb->s_log_cluster_size,
+ MIN_CHECK | MAX_CHECK, sb->s_log_block_size,
+ (EXT2_MAX_CLUSTER_LOG_SIZE -
+ EXT2_MIN_CLUSTER_LOG_SIZE)))
+ return;
+ if (!check_super_value(ctx, "clusters_per_group",
+ sb->s_clusters_per_group,
+ MIN_CHECK | MAX_CHECK, 8, cpg_max))
+ return;
+ if (!check_super_value(ctx, "blocks_per_group", sb->s_blocks_per_group,
+ MIN_CHECK | MAX_CHECK, 8, bpg_max))
+ return;
+ if (!check_super_value(ctx, "inodes_per_group", sb->s_inodes_per_group,
+ MIN_CHECK | MAX_CHECK, inodes_per_block, ipg_max))
+ return;
+ if (!check_super_value(ctx, "r_blocks_count", ext2fs_r_blocks_count(sb),
+ MAX_CHECK, 0, ext2fs_blocks_count(sb) / 2))
+ return;
+ if (!check_super_value(ctx, "reserved_gdt_blocks",
+ sb->s_reserved_gdt_blocks, MAX_CHECK, 0,
+ fs->blocksize / sizeof(__u32)))
+ return;
+ if (!check_super_value(ctx, "desc_size",
+ sb->s_desc_size, MAX_CHECK | LOG2_CHECK, 0,
+ EXT2_MAX_DESC_SIZE))
+ return;
+
+ should_be = (__u64)sb->s_inodes_per_group * fs->group_desc_count;
+ if (should_be > ~0U) {
+ pctx.num = should_be;
+ fix_problem(ctx, PR_0_INODE_COUNT_BIG, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if (sb->s_inodes_count != should_be) {
+ pctx.ino = sb->s_inodes_count;
+ pctx.ino2 = should_be;
+ if (fix_problem(ctx, PR_0_INODE_COUNT_WRONG, &pctx)) {
+ sb->s_inodes_count = should_be;
+ ext2fs_mark_super_dirty(fs);
+ } else {
+ pctx.num = sb->s_inodes_count;
+ pctx.str = "inodes_count";
+ fix_problem(ctx, PR_0_MISC_CORRUPT_SUPER, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ if (sb->s_rev_level > EXT2_GOOD_OLD_REV &&
+ !check_super_value(ctx, "first_ino", sb->s_first_ino,
+ MIN_CHECK | MAX_CHECK,
+ EXT2_GOOD_OLD_FIRST_INO, sb->s_inodes_count))
+ return;
+ inode_size = EXT2_INODE_SIZE(sb);
+ if (!check_super_value(ctx, "inode_size",
+ inode_size, MIN_CHECK | MAX_CHECK | LOG2_CHECK,
+ EXT2_GOOD_OLD_INODE_SIZE, fs->blocksize))
+ return;
+ if (sb->s_blocks_per_group != (sb->s_clusters_per_group *
+ EXT2FS_CLUSTER_RATIO(fs))) {
+ pctx.num = sb->s_clusters_per_group * EXT2FS_CLUSTER_RATIO(fs);
+ pctx.str = "block_size";
+ fix_problem(ctx, PR_0_MISC_CORRUPT_SUPER, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ if ((ctx->flags & E2F_FLAG_GOT_DEVSIZE) &&
+ (ctx->num_blocks < ext2fs_blocks_count(sb))) {
+ pctx.blk = ext2fs_blocks_count(sb);
+ pctx.blk2 = ctx->num_blocks;
+ if (fix_problem(ctx, PR_0_FS_SIZE_WRONG, &pctx)) {
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+
+ should_be = (sb->s_log_block_size == 0 &&
+ EXT2FS_CLUSTER_RATIO(fs) == 1) ? 1 : 0;
+ if (sb->s_first_data_block != should_be) {
+ pctx.blk = sb->s_first_data_block;
+ pctx.blk2 = should_be;
+ fix_problem(ctx, PR_0_FIRST_DATA_BLOCK, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ if (EXT2_INODE_SIZE(sb) > EXT2_GOOD_OLD_INODE_SIZE) {
+ unsigned min =
+ sizeof(((struct ext2_inode_large *) 0)->i_extra_isize) +
+ sizeof(((struct ext2_inode_large *) 0)->i_checksum_hi);
+ unsigned max = EXT2_INODE_SIZE(sb) - EXT2_GOOD_OLD_INODE_SIZE;
+ pctx.num = sb->s_min_extra_isize;
+ if (sb->s_min_extra_isize &&
+ (sb->s_min_extra_isize < min ||
+ sb->s_min_extra_isize > max ||
+ sb->s_min_extra_isize & 3) &&
+ fix_problem(ctx, PR_0_BAD_MIN_EXTRA_ISIZE, &pctx)) {
+ sb->s_min_extra_isize =
+ (sizeof(struct ext2_inode_large) -
+ EXT2_GOOD_OLD_INODE_SIZE);
+ ext2fs_mark_super_dirty(fs);
+ }
+ pctx.num = sb->s_want_extra_isize;
+ if (sb->s_want_extra_isize &&
+ (sb->s_want_extra_isize < min ||
+ sb->s_want_extra_isize > max ||
+ sb->s_want_extra_isize & 3) &&
+ fix_problem(ctx, PR_0_BAD_WANT_EXTRA_ISIZE, &pctx)) {
+ sb->s_want_extra_isize =
+ (sizeof(struct ext2_inode_large) -
+ EXT2_GOOD_OLD_INODE_SIZE);
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+ /* Are metadata_csum and uninit_bg both set? */
+ if (ext2fs_has_feature_metadata_csum(fs->super) &&
+ ext2fs_has_feature_gdt_csum(fs->super) &&
+ fix_problem(ctx, PR_0_META_AND_GDT_CSUM_SET, &pctx)) {
+ ext2fs_clear_feature_gdt_csum(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ for (i = 0; i < fs->group_desc_count; i++)
+ ext2fs_group_desc_csum_set(fs, i);
+ }
+
+ /* We can't have ^metadata_csum,metadata_csum_seed */
+ if (!ext2fs_has_feature_metadata_csum(fs->super) &&
+ ext2fs_has_feature_csum_seed(fs->super) &&
+ fix_problem(ctx, PR_0_CSUM_SEED_WITHOUT_META_CSUM, &pctx)) {
+ ext2fs_clear_feature_csum_seed(fs->super);
+ fs->super->s_checksum_seed = 0;
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ /* Is 64bit set and extents unset? */
+ if (ext2fs_has_feature_64bit(fs->super) &&
+ !ext2fs_has_feature_extents(fs->super) &&
+ fix_problem(ctx, PR_0_64BIT_WITHOUT_EXTENTS, &pctx)) {
+ ext2fs_set_feature_extents(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ /* Did user ask us to convert files to extents? */
+ if (ctx->options & E2F_OPT_CONVERT_BMAP) {
+ ext2fs_set_feature_extents(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ if (ext2fs_has_feature_meta_bg(fs->super) &&
+ (fs->super->s_first_meta_bg > fs->desc_blocks)) {
+ pctx.group = fs->desc_blocks;
+ pctx.num = fs->super->s_first_meta_bg;
+ if (fix_problem(ctx, PR_0_FIRST_META_BG_TOO_BIG, &pctx)) {
+ ext2fs_clear_feature_meta_bg(fs->super);
+ fs->super->s_first_meta_bg = 0;
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+ /*
+ * Verify the group descriptors....
+ */
+ first_block = sb->s_first_data_block;
+ last_block = ext2fs_blocks_count(sb)-1;
+
+ csum_flag = ext2fs_has_group_desc_csum(fs);
+ for (i = 0; i < fs->group_desc_count; i++) {
+ pctx.group = i;
+
+ if (!ext2fs_has_feature_flex_bg(fs->super)) {
+ first_block = ext2fs_group_first_block2(fs, i);
+ last_block = ext2fs_group_last_block2(fs, i);
+ }
+
+ if ((ext2fs_block_bitmap_loc(fs, i) < first_block) ||
+ (ext2fs_block_bitmap_loc(fs, i) > last_block)) {
+ pctx.blk = ext2fs_block_bitmap_loc(fs, i);
+ if (fix_problem(ctx, PR_0_BB_NOT_GROUP, &pctx))
+ ext2fs_block_bitmap_loc_set(fs, i, 0);
+ }
+ if (ext2fs_block_bitmap_loc(fs, i) == 0) {
+ ctx->invalid_block_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ if ((ext2fs_inode_bitmap_loc(fs, i) < first_block) ||
+ (ext2fs_inode_bitmap_loc(fs, i) > last_block)) {
+ pctx.blk = ext2fs_inode_bitmap_loc(fs, i);
+ if (fix_problem(ctx, PR_0_IB_NOT_GROUP, &pctx))
+ ext2fs_inode_bitmap_loc_set(fs, i, 0);
+ }
+ if (ext2fs_inode_bitmap_loc(fs, i) == 0) {
+ ctx->invalid_inode_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ if ((ext2fs_inode_table_loc(fs, i) < first_block) ||
+ ((ext2fs_inode_table_loc(fs, i) +
+ fs->inode_blocks_per_group - 1) > last_block)) {
+ pctx.blk = ext2fs_inode_table_loc(fs, i);
+ if (fix_problem(ctx, PR_0_ITABLE_NOT_GROUP, &pctx))
+ ext2fs_inode_table_loc_set(fs, i, 0);
+ }
+ if (ext2fs_inode_table_loc(fs, i) == 0) {
+ ctx->invalid_inode_table_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ free_blocks += ext2fs_bg_free_blocks_count(fs, i);
+ free_inodes += ext2fs_bg_free_inodes_count(fs, i);
+
+ if ((ext2fs_bg_free_blocks_count(fs, i) > sb->s_blocks_per_group) ||
+ (ext2fs_bg_free_inodes_count(fs, i) > sb->s_inodes_per_group) ||
+ (ext2fs_bg_used_dirs_count(fs, i) > sb->s_inodes_per_group))
+ ext2fs_unmark_valid(fs);
+
+ should_be = 0;
+ if (!ext2fs_group_desc_csum_verify(fs, i)) {
+ pctx.csum1 = ext2fs_bg_checksum(fs, i);
+ pctx.csum2 = ext2fs_group_desc_csum(fs, i);
+ if (fix_problem(ctx, PR_0_GDT_CSUM, &pctx)) {
+ ext2fs_bg_flags_clear(fs, i, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_bg_flags_clear(fs, i, EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_itable_unused_set(fs, i, 0);
+ should_be = 1;
+ }
+ ext2fs_unmark_valid(fs);
+ }
+
+ if (!csum_flag &&
+ (ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT) ||
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT) ||
+ ext2fs_bg_itable_unused(fs, i) != 0)) {
+ if (fix_problem(ctx, PR_0_GDT_UNINIT, &pctx)) {
+ ext2fs_bg_flags_clear(fs, i, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_bg_flags_clear(fs, i, EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_itable_unused_set(fs, i, 0);
+ should_be = 1;
+ }
+ ext2fs_unmark_valid(fs);
+ }
+
+ if (i == fs->group_desc_count - 1 &&
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT)) {
+ if (fix_problem(ctx, PR_0_BB_UNINIT_LAST, &pctx)) {
+ ext2fs_bg_flags_clear(fs, i, EXT2_BG_BLOCK_UNINIT);
+ should_be = 1;
+ }
+ ext2fs_unmark_valid(fs);
+ }
+
+ if (csum_flag &&
+ (ext2fs_bg_itable_unused(fs, i) > ext2fs_bg_free_inodes_count(fs, i) ||
+ ext2fs_bg_itable_unused(fs, i) > sb->s_inodes_per_group)) {
+ pctx.blk = ext2fs_bg_itable_unused(fs, i);
+ if (fix_problem(ctx, PR_0_GDT_ITABLE_UNUSED, &pctx)) {
+ ext2fs_bg_itable_unused_set(fs, i, 0);
+ should_be = 1;
+ }
+ ext2fs_unmark_valid(fs);
+ }
+
+ if (should_be)
+ ext2fs_group_desc_csum_set(fs, i);
+ /* If the user aborts e2fsck by typing ^C, stop right away */
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+ }
+
+ ctx->free_blocks = EXT2FS_C2B(fs, free_blocks);
+ ctx->free_inodes = free_inodes;
+
+ if ((ext2fs_free_blocks_count(sb) > ext2fs_blocks_count(sb)) ||
+ (sb->s_free_inodes_count > sb->s_inodes_count))
+ ext2fs_unmark_valid(fs);
+
+
+ /*
+ * If we have invalid bitmaps, set the error state of the
+ * filesystem.
+ */
+ if (ctx->invalid_bitmaps && !(ctx->options & E2F_OPT_READONLY)) {
+ sb->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ clear_problem_context(&pctx);
+
+#ifndef EXT2_SKIP_UUID
+ /*
+ * If the UUID field isn't assigned, assign it.
+ * Skip if checksums are enabled and the filesystem is mounted,
+ * if the id changes under the kernel remounting rw may fail.
+ */
+ if (!(ctx->options & E2F_OPT_READONLY) && uuid_is_null(sb->s_uuid) &&
+ !ext2fs_has_feature_metadata_csum(ctx->fs->super) &&
+ (!csum_flag || !(ctx->mount_flags & EXT2_MF_MOUNTED))) {
+ if (fix_problem(ctx, PR_0_ADD_UUID, &pctx)) {
+ uuid_generate(sb->s_uuid);
+ ext2fs_init_csum_seed(fs);
+ fs->flags |= EXT2_FLAG_DIRTY;
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ }
+ }
+#endif
+
+ /*
+ * Check to see if we should disable the test_fs flag
+ */
+ profile_get_boolean(ctx->profile, "options",
+ "clear_test_fs_flag", 0, 1,
+ &clear_test_fs_flag);
+ if (!(ctx->options & E2F_OPT_READONLY) &&
+ clear_test_fs_flag &&
+ (fs->super->s_flags & EXT2_FLAGS_TEST_FILESYS) &&
+ (fs_proc_check("ext4") || check_for_modules("ext4"))) {
+ if (fix_problem(ctx, PR_0_CLEAR_TESTFS_FLAG, &pctx)) {
+ fs->super->s_flags &= ~EXT2_FLAGS_TEST_FILESYS;
+ fs->flags |= EXT2_FLAG_DIRTY;
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ }
+ }
+
+ /*
+ * For the Hurd, check to see if the filetype option is set,
+ * since it doesn't support it.
+ */
+ if (!(ctx->options & E2F_OPT_READONLY) &&
+ fs->super->s_creator_os == EXT2_OS_HURD &&
+ ext2fs_has_feature_filetype(fs->super)) {
+ if (fix_problem(ctx, PR_0_HURD_CLEAR_FILETYPE, &pctx)) {
+ ext2fs_clear_feature_filetype(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ }
+ }
+
+ /*
+ * If we have any of the compatibility flags set, we need to have a
+ * revision 1 filesystem. Most kernels will not check the flags on
+ * a rev 0 filesystem and we may have corruption issues because of
+ * the incompatible changes to the filesystem.
+ */
+ if (!(ctx->options & E2F_OPT_READONLY) &&
+ fs->super->s_rev_level == EXT2_GOOD_OLD_REV &&
+ (fs->super->s_feature_compat ||
+ fs->super->s_feature_ro_compat ||
+ fs->super->s_feature_incompat) &&
+ fix_problem(ctx, PR_0_FS_REV_LEVEL, &pctx)) {
+ ext2fs_update_dynamic_rev(fs);
+ ext2fs_mark_super_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ }
+
+ /*
+ * Clean up any orphan inodes, if present.
+ */
+ if (!(ctx->options & E2F_OPT_READONLY) && release_orphan_inodes(ctx)) {
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ /*
+ * Unfortunately, due to Windows' unfortunate design decision
+ * to configure the hardware clock to tick localtime, instead
+ * of the more proper and less error-prone UTC time, many
+ * users end up in the situation where the system clock is
+ * incorrectly set at the time when e2fsck is run.
+ *
+ * Historically this was usually due to some distributions
+ * having buggy init scripts and/or installers that didn't
+ * correctly detect this case and take appropriate
+ * countermeasures. However, it's still possible, despite the
+ * best efforts of init script and installer authors to not be
+ * able to detect this misconfiguration, usually due to a
+ * buggy or misconfigured virtualization manager or the
+ * installer not having access to a network time server during
+ * the installation process. So by default, we allow the
+ * superblock times to be fudged by up to 24 hours. This can
+ * be disabled by setting options.accept_time_fudge to the
+ * boolean value of false in e2fsck.conf. We also support
+ * options.buggy_init_scripts for backwards compatibility.
+ */
+ profile_get_boolean(ctx->profile, "options", "accept_time_fudge",
+ 0, 1, &accept_time_fudge);
+ profile_get_boolean(ctx->profile, "options", "buggy_init_scripts",
+ 0, accept_time_fudge, &accept_time_fudge);
+ ctx->time_fudge = accept_time_fudge ? 86400 : 0;
+
+ profile_get_boolean(ctx->profile, "options", "broken_system_clock",
+ 0, 0, &broken_system_clock);
+
+ /*
+ * Check to see if the superblock last mount time or last
+ * write time is in the future.
+ */
+ if (((ctx->options & E2F_OPT_FORCE) || fs->super->s_checkinterval) &&
+ !broken_system_clock && !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
+ (fs->super->s_mtime > (__u32) ctx->now)) {
+ pctx.num = fs->super->s_mtime;
+ problem = PR_0_FUTURE_SB_LAST_MOUNT;
+ if (fs->super->s_mtime <= (__u32) ctx->now + ctx->time_fudge)
+ problem = PR_0_FUTURE_SB_LAST_MOUNT_FUDGED;
+ if (fix_problem(ctx, problem, &pctx)) {
+ fs->super->s_mtime = ctx->now;
+ fs->flags |= EXT2_FLAG_DIRTY;
+ }
+ }
+ if (((ctx->options & E2F_OPT_FORCE) || fs->super->s_checkinterval) &&
+ !broken_system_clock && !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
+ (fs->super->s_wtime > (__u32) ctx->now)) {
+ pctx.num = fs->super->s_wtime;
+ problem = PR_0_FUTURE_SB_LAST_WRITE;
+ if (fs->super->s_wtime <= (__u32) ctx->now + ctx->time_fudge)
+ problem = PR_0_FUTURE_SB_LAST_WRITE_FUDGED;
+ if (fix_problem(ctx, problem, &pctx)) {
+ fs->super->s_wtime = ctx->now;
+ fs->flags |= EXT2_FLAG_DIRTY;
+ }
+ }
+
+ e2fsck_validate_quota_inodes(ctx);
+
+ /*
+ * Move the ext3 journal file, if necessary.
+ */
+ e2fsck_move_ext3_journal(ctx);
+
+ /*
+ * Fix journal hint, if necessary
+ */
+ e2fsck_fix_ext3_journal_hint(ctx);
+
+ /*
+ * Add dirhash hint if necessary
+ */
+ e2fsck_fix_dirhash_hint(ctx);
+
+ /*
+ * Hide quota inodes if necessary.
+ */
+ e2fsck_hide_quota(ctx);
+
+ return;
+}
+
+/*
+ * Check to see if we should backup the master sb to the backup super
+ * blocks. Returns non-zero if the sb should be backed up.
+ */
+
+/*
+ * A few flags are set on the fly by the kernel, but only in the
+ * primary superblock. This is actually a bad thing, and we should
+ * try to discourage it in the future. In particular, for the newer
+ * ext4 files, especially EXT4_FEATURE_RO_COMPAT_DIR_NLINK and
+ * EXT3_FEATURE_INCOMPAT_EXTENTS. So some of these may go away in the
+ * future. EXT3_FEATURE_INCOMPAT_RECOVER may also get set when
+ * copying the primary superblock during online resize.
+ *
+ * The kernel will set EXT2_FEATURE_COMPAT_EXT_ATTR, but
+ * unfortunately, we shouldn't ignore it since if it's not set in the
+ * backup, the extended attributes in the filesystem will be stripped
+ * away.
+ */
+#define FEATURE_RO_COMPAT_IGNORE (EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK)
+#define FEATURE_INCOMPAT_IGNORE (EXT3_FEATURE_INCOMPAT_EXTENTS| \
+ EXT3_FEATURE_INCOMPAT_RECOVER)
+
+int check_backup_super_block(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ dgrp_t g;
+ blk64_t sb;
+ int ret = 0;
+ char buf[SUPERBLOCK_SIZE];
+ struct ext2_super_block *backup_sb;
+
+ /*
+ * If we are already writing out the backup blocks, then we
+ * don't need to test. Also, if the filesystem is invalid, or
+ * the check was aborted or cancelled, we also don't want to
+ * do the backup. If the filesystem was opened read-only then
+ * we can't do the backup.
+ */
+ if (((fs->flags & EXT2_FLAG_MASTER_SB_ONLY) == 0) ||
+ !ext2fs_test_valid(fs) ||
+ (fs->super->s_state & EXT2_ERROR_FS) ||
+ (ctx->flags & (E2F_FLAG_ABORT | E2F_FLAG_CANCEL)) ||
+ (ctx->options & E2F_OPT_READONLY))
+ return 0;
+
+ for (g = 1; g < fs->group_desc_count; g++) {
+ if (!ext2fs_bg_has_super(fs, g))
+ continue;
+
+ sb = ext2fs_group_first_block2(fs, g);
+
+ retval = io_channel_read_blk(fs->io, sb, -SUPERBLOCK_SIZE,
+ buf);
+ if (retval)
+ continue;
+ backup_sb = (struct ext2_super_block *) buf;
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_super(backup_sb);
+#endif
+ if ((backup_sb->s_magic != EXT2_SUPER_MAGIC) ||
+ (backup_sb->s_rev_level > EXT2_LIB_CURRENT_REV) ||
+ ((backup_sb->s_log_block_size + EXT2_MIN_BLOCK_LOG_SIZE) >
+ EXT2_MAX_BLOCK_LOG_SIZE) ||
+ (EXT2_INODE_SIZE(backup_sb) < EXT2_GOOD_OLD_INODE_SIZE))
+ continue;
+
+#define SUPER_INCOMPAT_DIFFERENT(x) \
+ ((fs->super->x & ~FEATURE_INCOMPAT_IGNORE) != \
+ (backup_sb->x & ~FEATURE_INCOMPAT_IGNORE))
+#define SUPER_RO_COMPAT_DIFFERENT(x) \
+ ((fs->super->x & ~FEATURE_RO_COMPAT_IGNORE) != \
+ (backup_sb->x & ~FEATURE_RO_COMPAT_IGNORE))
+#define SUPER_DIFFERENT(x) \
+ (fs->super->x != backup_sb->x)
+
+ if (SUPER_DIFFERENT(s_feature_compat) ||
+ SUPER_INCOMPAT_DIFFERENT(s_feature_incompat) ||
+ SUPER_RO_COMPAT_DIFFERENT(s_feature_ro_compat) ||
+ SUPER_DIFFERENT(s_blocks_count) ||
+ SUPER_DIFFERENT(s_blocks_count_hi) ||
+ SUPER_DIFFERENT(s_inodes_count) ||
+ memcmp(fs->super->s_uuid, backup_sb->s_uuid,
+ sizeof(fs->super->s_uuid)))
+ ret = 1;
+ break;
+ }
+ return ret;
+}
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
new file mode 100644
index 0000000..e5b672a
--- /dev/null
+++ b/e2fsck/unix.c
@@ -0,0 +1,2171 @@
+/*
+ * unix.c - The unix-specific code for e2fsck
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <unistd.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+#include <libgen.h>
+
+#include "e2p/e2p.h"
+#include "et/com_err.h"
+#include "e2p/e2p.h"
+#include "uuid/uuid.h"
+#include "support/plausible.h"
+#include "support/devname.h"
+#include "e2fsck.h"
+#include "problem.h"
+#include "jfs_user.h"
+#include "../version.h"
+
+/* Command line options */
+static int cflag; /* check disk */
+static int show_version_only;
+static int verbose;
+
+static int replace_bad_blocks;
+static int keep_bad_blocks;
+static char *bad_blocks_file;
+
+e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
+
+#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jbd-debug */
+int journal_enable_debug = -1;
+#endif
+
+static void usage(e2fsck_t ctx)
+{
+ fprintf(stderr,
+ _("Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+ "\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+ "\t\t[-E extended-options] [-z undo_file] device\n"),
+ ctx->program_name ? ctx->program_name : "e2fsck");
+
+ fprintf(stderr, "%s", _("\nEmergency help:\n"
+ " -p Automatic repair (no questions)\n"
+ " -n Make no changes to the filesystem\n"
+ " -y Assume \"yes\" to all questions\n"
+ " -c Check for bad blocks and add them to the badblock list\n"
+ " -f Force checking even if filesystem is marked clean\n"));
+ fprintf(stderr, "%s", _(""
+ " -v Be verbose\n"
+ " -b superblock Use alternative superblock\n"
+ " -B blocksize Force blocksize when looking for superblock\n"
+ " -j external_journal Set location of the external journal\n"
+ " -l bad_blocks_file Add to badblocks list\n"
+ " -L bad_blocks_file Set badblocks list\n"
+ " -z undo_file Create an undo file\n"
+ ));
+
+ exit(FSCK_USAGE);
+}
+
+static void show_stats(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t inodes, inodes_used;
+ blk64_t blocks, blocks_used;
+ unsigned int dir_links;
+ unsigned int num_files, num_links;
+ __u32 *mask, m;
+ int frag_percent_file = 0, frag_percent_dir = 0, frag_percent_total = 0;
+ int i, j, printed = 0;
+
+ dir_links = 2 * ctx->fs_directory_count - 1;
+ num_files = ctx->fs_total_count - dir_links;
+ num_links = ctx->fs_links_count - dir_links;
+ inodes = fs->super->s_inodes_count;
+ inodes_used = (fs->super->s_inodes_count -
+ fs->super->s_free_inodes_count);
+ blocks = ext2fs_blocks_count(fs->super);
+ blocks_used = (ext2fs_blocks_count(fs->super) -
+ ext2fs_free_blocks_count(fs->super));
+
+ if (inodes_used > 0) {
+ frag_percent_file = (10000 * ctx->fs_fragmented) / inodes_used;
+ frag_percent_file = (frag_percent_file + 5) / 10;
+
+ frag_percent_dir = (10000 * ctx->fs_fragmented_dir) / inodes_used;
+ frag_percent_dir = (frag_percent_dir + 5) / 10;
+
+ frag_percent_total = ((10000 * (ctx->fs_fragmented +
+ ctx->fs_fragmented_dir))
+ / inodes_used);
+ frag_percent_total = (frag_percent_total + 5) / 10;
+ }
+
+ if (!verbose) {
+ log_out(ctx, _("%s: %u/%u files (%0d.%d%% non-contiguous), "
+ "%llu/%llu blocks\n"),
+ ctx->device_name, inodes_used, inodes,
+ frag_percent_total / 10, frag_percent_total % 10,
+ (unsigned long long) blocks_used,
+ (unsigned long long) blocks);
+ return;
+ }
+ profile_get_boolean(ctx->profile, "options", "report_features", 0, 0,
+ &i);
+ if (verbose && i) {
+ log_out(ctx, "\nFilesystem features:");
+ mask = &ctx->fs->super->s_feature_compat;
+ for (i = 0; i < 3; i++, mask++) {
+ for (j = 0, m = 1; j < 32; j++, m <<= 1) {
+ if (*mask & m) {
+ log_out(ctx, " %s",
+ e2p_feature2string(i, m));
+ printed++;
+ }
+ }
+ }
+ if (printed == 0)
+ log_out(ctx, " (none)");
+ log_out(ctx, "\n");
+ }
+
+ log_out(ctx, P_("\n%12u inode used (%2.2f%%, out of %u)\n",
+ "\n%12u inodes used (%2.2f%%, out of %u)\n",
+ inodes_used), inodes_used,
+ 100.0 * inodes_used / inodes, inodes);
+ log_out(ctx, P_("%12u non-contiguous file (%0d.%d%%)\n",
+ "%12u non-contiguous files (%0d.%d%%)\n",
+ ctx->fs_fragmented),
+ ctx->fs_fragmented, frag_percent_file / 10,
+ frag_percent_file % 10);
+ log_out(ctx, P_("%12u non-contiguous directory (%0d.%d%%)\n",
+ "%12u non-contiguous directories (%0d.%d%%)\n",
+ ctx->fs_fragmented_dir),
+ ctx->fs_fragmented_dir, frag_percent_dir / 10,
+ frag_percent_dir % 10);
+ log_out(ctx, _(" # of inodes with ind/dind/tind blocks: "
+ "%u/%u/%u\n"),
+ ctx->fs_ind_count, ctx->fs_dind_count, ctx->fs_tind_count);
+
+ for (j=MAX_EXTENT_DEPTH_COUNT-1; j >=0; j--)
+ if (ctx->extent_depth_count[j])
+ break;
+ if (++j) {
+ log_out(ctx, "%s", _(" Extent depth histogram: "));
+ for (i=0; i < j; i++) {
+ if (i)
+ fputc('/', stdout);
+ log_out(ctx, "%u", ctx->extent_depth_count[i]);
+ }
+ log_out(ctx, "\n");
+ }
+
+ log_out(ctx, P_("%12llu block used (%2.2f%%, out of %llu)\n",
+ "%12llu blocks used (%2.2f%%, out of %llu)\n",
+ blocks_used),
+ (unsigned long long) blocks_used, 100.0 * blocks_used / blocks,
+ (unsigned long long) blocks);
+ log_out(ctx, P_("%12u bad block\n", "%12u bad blocks\n",
+ ctx->fs_badblocks_count), ctx->fs_badblocks_count);
+ log_out(ctx, P_("%12u large file\n", "%12u large files\n",
+ ctx->large_files), ctx->large_files);
+ log_out(ctx, P_("\n%12u regular file\n", "\n%12u regular files\n",
+ ctx->fs_regular_count), ctx->fs_regular_count);
+ log_out(ctx, P_("%12u directory\n", "%12u directories\n",
+ ctx->fs_directory_count), ctx->fs_directory_count);
+ log_out(ctx, P_("%12u character device file\n",
+ "%12u character device files\n", ctx->fs_chardev_count),
+ ctx->fs_chardev_count);
+ log_out(ctx, P_("%12u block device file\n", "%12u block device files\n",
+ ctx->fs_blockdev_count), ctx->fs_blockdev_count);
+ log_out(ctx, P_("%12u fifo\n", "%12u fifos\n", ctx->fs_fifo_count),
+ ctx->fs_fifo_count);
+ log_out(ctx, P_("%12u link\n", "%12u links\n", num_links),
+ ctx->fs_links_count - dir_links);
+ log_out(ctx, P_("%12u symbolic link", "%12u symbolic links",
+ ctx->fs_symlinks_count), ctx->fs_symlinks_count);
+ log_out(ctx, P_(" (%u fast symbolic link)\n",
+ " (%u fast symbolic links)\n",
+ ctx->fs_fast_symlinks_count),
+ ctx->fs_fast_symlinks_count);
+ log_out(ctx, P_("%12u socket\n", "%12u sockets\n",
+ ctx->fs_sockets_count),
+ ctx->fs_sockets_count);
+ log_out(ctx, "------------\n");
+ log_out(ctx, P_("%12u file\n", "%12u files\n", num_files),
+ num_files);
+}
+
+static void check_mount(e2fsck_t ctx)
+{
+ errcode_t retval;
+ int cont;
+
+ retval = ext2fs_check_if_mounted(ctx->filesystem_name,
+ &ctx->mount_flags);
+ if (retval) {
+ com_err("ext2fs_check_if_mount", retval,
+ _("while determining whether %s is mounted."),
+ ctx->filesystem_name);
+ return;
+ }
+
+ /*
+ * If the filesystem isn't mounted, or it's the root
+ * filesystem and it's mounted read-only, and we're not doing
+ * a read/write check, then everything's fine.
+ */
+ if ((!(ctx->mount_flags & (EXT2_MF_MOUNTED | EXT2_MF_BUSY))) ||
+ ((ctx->mount_flags & EXT2_MF_ISROOT) &&
+ (ctx->mount_flags & EXT2_MF_READONLY) &&
+ !(ctx->options & E2F_OPT_WRITECHECK)))
+ return;
+
+ if (((ctx->options & E2F_OPT_READONLY) ||
+ ((ctx->options & E2F_OPT_FORCE) &&
+ (ctx->mount_flags & EXT2_MF_READONLY))) &&
+ !(ctx->options & E2F_OPT_WRITECHECK)) {
+ if (ctx->mount_flags & EXT2_MF_MOUNTED)
+ log_out(ctx, _("Warning! %s is mounted.\n"),
+ ctx->filesystem_name);
+ else
+ log_out(ctx, _("Warning! %s is in use.\n"),
+ ctx->filesystem_name);
+ return;
+ }
+
+ if (ctx->mount_flags & EXT2_MF_MOUNTED)
+ log_out(ctx, _("%s is mounted.\n"), ctx->filesystem_name);
+ else
+ log_out(ctx, _("%s is in use.\n"), ctx->filesystem_name);
+ if (!ctx->interactive || ctx->mount_flags & EXT2_MF_BUSY)
+ fatal_error(ctx, _("Cannot continue, aborting.\n\n"));
+ puts("\007\007\007\007");
+ log_out(ctx, "%s", _("\n\nWARNING!!! "
+ "The filesystem is mounted. "
+ "If you continue you ***WILL***\n"
+ "cause ***SEVERE*** filesystem damage.\n\n"));
+ puts("\007\007\007");
+ cont = ask_yn(ctx, _("Do you really want to continue"), 0);
+ if (!cont) {
+ printf("%s", _("check aborted.\n"));
+ exit (0);
+ }
+ return;
+}
+
+static int is_on_batt(void)
+{
+ FILE *f;
+ DIR *d;
+ char tmp[80], tmp2[80], fname[NAME_MAX+30];
+ unsigned int acflag;
+ struct dirent* de;
+
+ f = fopen("/sys/class/power_supply/AC/online", "r");
+ if (f) {
+ if (fscanf(f, "%u\n", &acflag) == 1) {
+ fclose(f);
+ return (!acflag);
+ }
+ fclose(f);
+ }
+ f = fopen("/proc/apm", "r");
+ if (f) {
+ if (fscanf(f, "%79s %79s %79s %x", tmp, tmp, tmp, &acflag) != 4)
+ acflag = 1;
+ fclose(f);
+ return (acflag != 1);
+ }
+ d = opendir("/proc/acpi/ac_adapter");
+ if (d) {
+ while ((de=readdir(d)) != NULL) {
+ if (!strncmp(".", de->d_name, 1))
+ continue;
+ snprintf(fname, sizeof(fname),
+ "/proc/acpi/ac_adapter/%s/state",
+ de->d_name);
+ f = fopen(fname, "r");
+ if (!f)
+ continue;
+ if (fscanf(f, "%79s %79s", tmp2, tmp) != 2)
+ tmp[0] = 0;
+ fclose(f);
+ if (strncmp(tmp, "off-line", 8) == 0) {
+ closedir(d);
+ return 1;
+ }
+ }
+ closedir(d);
+ }
+ return 0;
+}
+
+/*
+ * This routine checks to see if a filesystem can be skipped; if so,
+ * it will exit with E2FSCK_OK. Under some conditions it will print a
+ * message explaining why a check is being forced.
+ */
+static void check_if_skip(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ struct problem_context pctx;
+ const char *reason = NULL;
+ unsigned int reason_arg = 0;
+ long next_check;
+ int batt = is_on_batt();
+ int defer_check_on_battery;
+ int broken_system_clock;
+ time_t lastcheck;
+
+ if (ctx->flags & E2F_FLAG_PROBLEMS_FIXED)
+ return;
+
+ profile_get_boolean(ctx->profile, "options", "broken_system_clock",
+ 0, 0, &broken_system_clock);
+ if (ctx->flags & E2F_FLAG_TIME_INSANE)
+ broken_system_clock = 1;
+ profile_get_boolean(ctx->profile, "options",
+ "defer_check_on_battery", 0, 1,
+ &defer_check_on_battery);
+ if (!defer_check_on_battery)
+ batt = 0;
+
+ if ((ctx->options & E2F_OPT_FORCE) || bad_blocks_file || cflag)
+ return;
+
+ if (ctx->options & E2F_OPT_JOURNAL_ONLY)
+ goto skip;
+
+ lastcheck = fs->super->s_lastcheck;
+ if (lastcheck > ctx->now)
+ lastcheck -= ctx->time_fudge;
+ if ((fs->super->s_state & EXT2_ERROR_FS) ||
+ !ext2fs_test_valid(fs))
+ reason = _(" contains a file system with errors");
+ else if ((fs->super->s_state & EXT2_VALID_FS) == 0)
+ reason = _(" was not cleanly unmounted");
+ else if (check_backup_super_block(ctx))
+ reason = _(" primary superblock features different from backup");
+ else if ((fs->super->s_max_mnt_count > 0) &&
+ (fs->super->s_mnt_count >=
+ (unsigned) fs->super->s_max_mnt_count)) {
+ reason = _(" has been mounted %u times without being checked");
+ reason_arg = fs->super->s_mnt_count;
+ if (batt && (fs->super->s_mnt_count <
+ (unsigned) fs->super->s_max_mnt_count*2))
+ reason = 0;
+ } else if (!broken_system_clock && fs->super->s_checkinterval &&
+ (ctx->now < lastcheck)) {
+ reason = _(" has filesystem last checked time in the future");
+ if (batt)
+ reason = 0;
+ } else if (!broken_system_clock && fs->super->s_checkinterval &&
+ ((ctx->now - lastcheck) >=
+ ((time_t) fs->super->s_checkinterval))) {
+ reason = _(" has gone %u days without being checked");
+ reason_arg = (ctx->now - fs->super->s_lastcheck)/(3600*24);
+ if (batt && ((ctx->now - fs->super->s_lastcheck) <
+ fs->super->s_checkinterval*2))
+ reason = 0;
+ } else if (broken_system_clock && fs->super->s_checkinterval) {
+ log_out(ctx, "%s: ", ctx->device_name);
+ log_out(ctx, "%s",
+ _("ignoring check interval, broken_system_clock set\n"));
+ }
+
+ if (reason) {
+ log_out(ctx, "%s", ctx->device_name);
+ log_out(ctx, reason, reason_arg);
+ log_out(ctx, "%s", _(", check forced.\n"));
+ return;
+ }
+
+ /*
+ * Update the global counts from the block group counts. This
+ * is needed since modern kernels don't update the global
+ * counts so as to avoid locking the entire file system. So
+ * if the filesystem is not unmounted cleanly, the global
+ * counts may not be accurate. Update them here if we can,
+ * for the benefit of users who might examine the file system
+ * using dumpe2fs. (This is for cosmetic reasons only.)
+ */
+ clear_problem_context(&pctx);
+ pctx.ino = fs->super->s_free_inodes_count;
+ pctx.ino2 = ctx->free_inodes;
+ if ((pctx.ino != pctx.ino2) &&
+ !(ctx->options & E2F_OPT_READONLY) &&
+ fix_problem(ctx, PR_0_FREE_INODE_COUNT, &pctx)) {
+ fs->super->s_free_inodes_count = ctx->free_inodes;
+ ext2fs_mark_super_dirty(fs);
+ }
+ clear_problem_context(&pctx);
+ pctx.blk = ext2fs_free_blocks_count(fs->super);
+ pctx.blk2 = ctx->free_blocks;
+ if ((pctx.blk != pctx.blk2) &&
+ !(ctx->options & E2F_OPT_READONLY) &&
+ fix_problem(ctx, PR_0_FREE_BLOCK_COUNT, &pctx)) {
+ ext2fs_free_blocks_count_set(fs->super, ctx->free_blocks);
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ /* Print the summary message when we're skipping a full check */
+ log_out(ctx, _("%s: clean, %u/%u files, %llu/%llu blocks"),
+ ctx->device_name,
+ fs->super->s_inodes_count - fs->super->s_free_inodes_count,
+ fs->super->s_inodes_count,
+ (unsigned long long) ext2fs_blocks_count(fs->super) -
+ ext2fs_free_blocks_count(fs->super),
+ (unsigned long long) ext2fs_blocks_count(fs->super));
+ next_check = 100000;
+ if (fs->super->s_max_mnt_count > 0) {
+ next_check = fs->super->s_max_mnt_count - fs->super->s_mnt_count;
+ if (next_check <= 0)
+ next_check = 1;
+ }
+ if (!broken_system_clock && fs->super->s_checkinterval &&
+ ((ctx->now - fs->super->s_lastcheck) >= fs->super->s_checkinterval))
+ next_check = 1;
+ if (next_check <= 5) {
+ if (next_check == 1) {
+ if (batt)
+ log_out(ctx, "%s",
+ _(" (check deferred; on battery)"));
+ else
+ log_out(ctx, "%s",
+ _(" (check after next mount)"));
+ } else
+ log_out(ctx, _(" (check in %ld mounts)"),
+ next_check);
+ }
+ log_out(ctx, "\n");
+skip:
+ ext2fs_close_free(&ctx->fs);
+ e2fsck_free_context(ctx);
+ exit(FSCK_OK);
+}
+
+/*
+ * For completion notice
+ */
+struct percent_tbl {
+ int max_pass;
+ int table[32];
+};
+static struct percent_tbl e2fsck_tbl = {
+ 5, { 0, 70, 90, 92, 95, 100 }
+};
+static char bar[128], spaces[128];
+
+static float calc_percent(struct percent_tbl *tbl, int pass, int curr,
+ int max)
+{
+ float percent;
+
+ if (pass <= 0)
+ return 0.0;
+ if (pass > tbl->max_pass || max == 0)
+ return 100.0;
+ percent = ((float) curr) / ((float) max);
+ return ((percent * (tbl->table[pass] - tbl->table[pass-1]))
+ + tbl->table[pass-1]);
+}
+
+void e2fsck_clear_progbar(e2fsck_t ctx)
+{
+ if (!(ctx->flags & E2F_FLAG_PROG_BAR))
+ return;
+
+ printf("%s%s\r%s", ctx->start_meta, spaces + (sizeof(spaces) - 80),
+ ctx->stop_meta);
+ fflush(stdout);
+ ctx->flags &= ~E2F_FLAG_PROG_BAR;
+}
+
+int e2fsck_simple_progress(e2fsck_t ctx, const char *label, float percent,
+ unsigned int dpynum)
+{
+ static const char spinner[] = "\\|/-";
+ int i;
+ unsigned int tick;
+ struct timeval tv;
+ int dpywidth;
+ int fixed_percent;
+
+ if (ctx->flags & E2F_FLAG_PROG_SUPPRESS)
+ return 0;
+
+ /*
+ * Calculate the new progress position. If the
+ * percentage hasn't changed, then we skip out right
+ * away.
+ */
+ fixed_percent = (int) ((10 * percent) + 0.5);
+ if (ctx->progress_last_percent == fixed_percent)
+ return 0;
+ ctx->progress_last_percent = fixed_percent;
+
+ /*
+ * If we've already updated the spinner once within
+ * the last 1/8th of a second, no point doing it
+ * again.
+ */
+ gettimeofday(&tv, NULL);
+ tick = (tv.tv_sec << 3) + (tv.tv_usec / (1000000 / 8));
+ if ((tick == ctx->progress_last_time) &&
+ (fixed_percent != 0) && (fixed_percent != 1000))
+ return 0;
+ ctx->progress_last_time = tick;
+
+ /*
+ * Advance the spinner, and note that the progress bar
+ * will be on the screen
+ */
+ ctx->progress_pos = (ctx->progress_pos+1) & 3;
+ ctx->flags |= E2F_FLAG_PROG_BAR;
+
+ dpywidth = 66 - strlen(label);
+ dpywidth = 8 * (dpywidth / 8);
+ if (dpynum)
+ dpywidth -= 8;
+
+ i = ((percent * dpywidth) + 50) / 100;
+ printf("%s%s: |%s%s", ctx->start_meta, label,
+ bar + (sizeof(bar) - (i+1)),
+ spaces + (sizeof(spaces) - (dpywidth - i + 1)));
+ if (fixed_percent == 1000)
+ fputc('|', stdout);
+ else
+ fputc(spinner[ctx->progress_pos & 3], stdout);
+ printf(" %4.1f%% ", percent);
+ if (dpynum)
+ printf("%u\r", dpynum);
+ else
+ fputs(" \r", stdout);
+ fputs(ctx->stop_meta, stdout);
+
+ if (fixed_percent == 1000)
+ e2fsck_clear_progbar(ctx);
+ fflush(stdout);
+
+ return 0;
+}
+
+static int e2fsck_update_progress(e2fsck_t ctx, int pass,
+ unsigned long cur, unsigned long max)
+{
+ char buf[1024];
+ float percent;
+
+ if (pass == 0)
+ return 0;
+
+ if (ctx->progress_fd) {
+ snprintf(buf, sizeof(buf), "%d %lu %lu %s\n",
+ pass, cur, max, ctx->device_name);
+ write_all(ctx->progress_fd, buf, strlen(buf));
+ } else {
+ percent = calc_percent(&e2fsck_tbl, pass, cur, max);
+ e2fsck_simple_progress(ctx, ctx->device_name,
+ percent, 0);
+ }
+ return 0;
+}
+
+#define PATH_SET "PATH=/sbin"
+
+/*
+ * Make sure 0,1,2 file descriptors are open, so that we don't open
+ * the filesystem using the same file descriptor as stdout or stderr.
+ */
+static void reserve_stdio_fds(void)
+{
+ int fd = 0;
+
+ while (fd <= 2) {
+ fd = open("/dev/null", O_RDWR);
+ if (fd < 0) {
+ fprintf(stderr, _("ERROR: Couldn't open "
+ "/dev/null (%s)\n"),
+ strerror(errno));
+ return;
+ }
+ }
+ (void) close(fd);
+}
+
+#ifdef HAVE_SIGNAL_H
+static void signal_progress_on(int sig EXT2FS_ATTR((unused)))
+{
+ e2fsck_t ctx = e2fsck_global_ctx;
+
+ if (!ctx)
+ return;
+
+ ctx->progress = e2fsck_update_progress;
+}
+
+static void signal_progress_off(int sig EXT2FS_ATTR((unused)))
+{
+ e2fsck_t ctx = e2fsck_global_ctx;
+
+ if (!ctx)
+ return;
+
+ e2fsck_clear_progbar(ctx);
+ ctx->progress = 0;
+}
+
+static void signal_cancel(int sig EXT2FS_ATTR((unused)))
+{
+ e2fsck_t ctx = e2fsck_global_ctx;
+
+ if (!ctx)
+ exit(FSCK_CANCELED);
+
+ ctx->flags |= E2F_FLAG_CANCEL;
+}
+#endif
+
+static void parse_extended_opts(e2fsck_t ctx, const char *opts)
+{
+ char *buf, *token, *next, *p, *arg;
+ int ea_ver;
+ int extended_usage = 0;
+ unsigned long long reada_kb;
+
+ buf = string_copy(ctx, opts, 0);
+ for (token = buf; token && *token; token = next) {
+ p = strchr(token, ',');
+ next = 0;
+ if (p) {
+ *p = 0;
+ next = p+1;
+ }
+ arg = strchr(token, '=');
+ if (arg) {
+ *arg = 0;
+ arg++;
+ }
+ if (strcmp(token, "ea_ver") == 0) {
+ if (!arg) {
+ extended_usage++;
+ continue;
+ }
+ ea_ver = strtoul(arg, &p, 0);
+ if (*p ||
+ ((ea_ver != 1) && (ea_ver != 2))) {
+ fprintf(stderr, "%s",
+ _("Invalid EA version.\n"));
+ extended_usage++;
+ continue;
+ }
+ ctx->ext_attr_ver = ea_ver;
+ } else if (strcmp(token, "readahead_kb") == 0) {
+ if (!arg) {
+ extended_usage++;
+ continue;
+ }
+ reada_kb = strtoull(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr, "%s",
+ _("Invalid readahead buffer size.\n"));
+ extended_usage++;
+ continue;
+ }
+ ctx->readahead_kb = reada_kb;
+ } else if (strcmp(token, "fragcheck") == 0) {
+ ctx->options |= E2F_OPT_FRAGCHECK;
+ continue;
+ } else if (strcmp(token, "journal_only") == 0) {
+ if (arg) {
+ extended_usage++;
+ continue;
+ }
+ ctx->options |= E2F_OPT_JOURNAL_ONLY;
+ } else if (strcmp(token, "discard") == 0) {
+ ctx->options |= E2F_OPT_DISCARD;
+ continue;
+ } else if (strcmp(token, "nodiscard") == 0) {
+ ctx->options &= ~E2F_OPT_DISCARD;
+ continue;
+ } else if (strcmp(token, "optimize_extents") == 0) {
+ ctx->options &= ~E2F_OPT_NOOPT_EXTENTS;
+ continue;
+ } else if (strcmp(token, "no_optimize_extents") == 0) {
+ ctx->options |= E2F_OPT_NOOPT_EXTENTS;
+ continue;
+ } else if (strcmp(token, "inode_count_fullmap") == 0) {
+ ctx->options |= E2F_OPT_ICOUNT_FULLMAP;
+ continue;
+ } else if (strcmp(token, "no_inode_count_fullmap") == 0) {
+ ctx->options &= ~E2F_OPT_ICOUNT_FULLMAP;
+ continue;
+ } else if (strcmp(token, "log_filename") == 0) {
+ if (!arg)
+ extended_usage++;
+ else
+ ctx->log_fn = string_copy(ctx, arg, 0);
+ continue;
+ } else if (strcmp(token, "problem_log") == 0) {
+ if (!arg)
+ extended_usage++;
+ else
+ ctx->problem_log_fn = string_copy(ctx, arg, 0);
+ continue;
+ } else if (strcmp(token, "bmap2extent") == 0) {
+ ctx->options |= E2F_OPT_CONVERT_BMAP;
+ continue;
+ } else if (strcmp(token, "fixes_only") == 0) {
+ ctx->options |= E2F_OPT_FIXES_ONLY;
+ continue;
+ } else if (strcmp(token, "unshare_blocks") == 0) {
+ ctx->options |= E2F_OPT_UNSHARE_BLOCKS;
+ ctx->options |= E2F_OPT_FORCE;
+ continue;
+ } else if (strcmp(token, "check_encoding") == 0) {
+ ctx->options |= E2F_OPT_CHECK_ENCODING;
+ continue;
+#ifdef CONFIG_DEVELOPER_FEATURES
+ } else if (strcmp(token, "clear_all_uninit_bits") == 0) {
+ ctx->options |= E2F_OPT_CLEAR_UNINIT;
+ continue;
+#endif
+ } else {
+ fprintf(stderr, _("Unknown extended option: %s\n"),
+ token);
+ extended_usage++;
+ }
+ }
+ free(buf);
+
+ if (extended_usage) {
+ fputs(_("\nExtended options are separated by commas, "
+ "and may take an argument which\n"
+ "is set off by an equals ('=') sign. "
+ "Valid extended options are:\n\n"), stderr);
+ fputs(_("\tea_ver=<ea_version (1 or 2)>\n"), stderr);
+ fputs("\tfragcheck\n", stderr);
+ fputs("\tjournal_only\n", stderr);
+ fputs("\tdiscard\n", stderr);
+ fputs("\tnodiscard\n", stderr);
+ fputs("\toptimize_extents\n", stderr);
+ fputs("\tno_optimize_extents\n", stderr);
+ fputs("\tinode_count_fullmap\n", stderr);
+ fputs("\tno_inode_count_fullmap\n", stderr);
+ fputs(_("\treadahead_kb=<buffer size>\n"), stderr);
+ fputs("\tbmap2extent\n", stderr);
+ fputs("\tunshare_blocks\n", stderr);
+ fputs("\tfixes_only\n", stderr);
+ fputs("\tcheck_encoding\n", stderr);
+ fputc('\n', stderr);
+ exit(1);
+ }
+}
+
+static void syntax_err_report(const char *filename, long err, int line_num)
+{
+ fprintf(stderr,
+ _("Syntax error in e2fsck config file (%s, line #%d)\n\t%s\n"),
+ filename, line_num, error_message(err));
+ exit(FSCK_ERROR);
+}
+
+static const char *config_fn[] = { ROOT_SYSCONFDIR "/e2fsck.conf", 0 };
+
+static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
+{
+ int flush = 0;
+ int c, fd;
+#ifdef MTRACE
+ extern void *mallwatch;
+#endif
+ e2fsck_t ctx;
+ errcode_t retval;
+#ifdef HAVE_SIGNAL_H
+ struct sigaction sa;
+#endif
+ char *extended_opts = 0;
+ char *cp;
+ int res; /* result of sscanf */
+#ifdef CONFIG_JBD_DEBUG
+ char *jbd_debug;
+#endif
+ unsigned long long phys_mem_kb, blk;
+
+ retval = e2fsck_allocate_context(&ctx);
+ if (retval)
+ return retval;
+
+ *ret_ctx = ctx;
+ e2fsck_global_ctx = ctx;
+
+ setvbuf(stdout, NULL, _IONBF, BUFSIZ);
+ setvbuf(stderr, NULL, _IONBF, BUFSIZ);
+ if (getenv("E2FSCK_FORCE_INTERACTIVE") || (isatty(0) && isatty(1))) {
+ ctx->interactive = 1;
+ } else {
+ ctx->start_meta[0] = '\001';
+ ctx->stop_meta[0] = '\002';
+ }
+ memset(bar, '=', sizeof(bar)-1);
+ memset(spaces, ' ', sizeof(spaces)-1);
+ add_error_table(&et_ext2_error_table);
+ add_error_table(&et_prof_error_table);
+ blkid_get_cache(&ctx->blkid, NULL);
+
+ if (argc && *argv)
+ ctx->program_name = *argv;
+ else
+ usage(NULL);
+
+ phys_mem_kb = get_memory_size() / 1024;
+ ctx->readahead_kb = ~0ULL;
+ while ((c = getopt(argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDkz:")) != EOF)
+ switch (c) {
+ case 'C':
+ ctx->progress = e2fsck_update_progress;
+ res = sscanf(optarg, "%d", &ctx->progress_fd);
+ if (res != 1)
+ goto sscanf_err;
+
+ if (ctx->progress_fd < 0) {
+ ctx->progress = 0;
+ ctx->progress_fd = ctx->progress_fd * -1;
+ }
+ if (!ctx->progress_fd)
+ break;
+ /* Validate the file descriptor to avoid disasters */
+ fd = dup(ctx->progress_fd);
+ if (fd < 0) {
+ fprintf(stderr,
+ _("Error validating file descriptor %d: %s\n"),
+ ctx->progress_fd,
+ error_message(errno));
+ fatal_error(ctx,
+ _("Invalid completion information file descriptor"));
+ } else
+ close(fd);
+ break;
+ case 'D':
+ ctx->options |= E2F_OPT_COMPRESS_DIRS;
+ break;
+ case 'E':
+ extended_opts = optarg;
+ break;
+ case 'p':
+ case 'a':
+ if (ctx->options & (E2F_OPT_YES|E2F_OPT_NO)) {
+ conflict_opt:
+ fatal_error(ctx,
+ _("Only one of the options -p/-a, -n or -y may be specified."));
+ }
+ ctx->options |= E2F_OPT_PREEN;
+ break;
+ case 'n':
+ if (ctx->options & (E2F_OPT_YES|E2F_OPT_PREEN))
+ goto conflict_opt;
+ ctx->options |= E2F_OPT_NO;
+ break;
+ case 'y':
+ if (ctx->options & (E2F_OPT_PREEN|E2F_OPT_NO))
+ goto conflict_opt;
+ ctx->options |= E2F_OPT_YES;
+ break;
+ case 't':
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME)
+ ctx->options |= E2F_OPT_TIME2;
+ else
+ ctx->options |= E2F_OPT_TIME;
+#else
+ fprintf(stderr, _("The -t option is not "
+ "supported on this version of e2fsck.\n"));
+#endif
+ break;
+ case 'c':
+ if (cflag++)
+ ctx->options |= E2F_OPT_WRITECHECK;
+ ctx->options |= E2F_OPT_CHECKBLOCKS;
+ break;
+ case 'r':
+ /* What we do by default, anyway! */
+ break;
+ case 'b':
+ res = sscanf(optarg, "%llu", &blk);
+ ctx->use_superblock = blk;
+ if (res != 1)
+ goto sscanf_err;
+ ctx->flags |= E2F_FLAG_SB_SPECIFIED;
+ break;
+ case 'B':
+ ctx->blocksize = atoi(optarg);
+ break;
+ case 'I':
+ res = sscanf(optarg, "%d", &ctx->inode_buffer_blocks);
+ if (res != 1)
+ goto sscanf_err;
+ break;
+ case 'j':
+ ctx->journal_name = get_devname(ctx->blkid,
+ optarg, NULL);
+ if (!ctx->journal_name) {
+ com_err(ctx->program_name, 0,
+ _("Unable to resolve '%s'"),
+ optarg);
+ fatal_error(ctx, 0);
+ }
+ break;
+ case 'P':
+ res = sscanf(optarg, "%d", &ctx->process_inode_size);
+ if (res != 1)
+ goto sscanf_err;
+ break;
+ case 'L':
+ replace_bad_blocks++;
+ /* fall through */
+ case 'l':
+ if (bad_blocks_file)
+ free(bad_blocks_file);
+ bad_blocks_file = string_copy(ctx, optarg, 0);
+ break;
+ case 'd':
+ ctx->options |= E2F_OPT_DEBUG;
+ break;
+ case 'f':
+ ctx->options |= E2F_OPT_FORCE;
+ break;
+ case 'F':
+ flush = 1;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'V':
+ show_version_only = 1;
+ break;
+#ifdef MTRACE
+ case 'M':
+ mallwatch = (void *) strtol(optarg, NULL, 0);
+ break;
+#endif
+ case 'N':
+ ctx->device_name = string_copy(ctx, optarg, 0);
+ break;
+ case 'k':
+ keep_bad_blocks++;
+ break;
+ case 'z':
+ ctx->undo_file = optarg;
+ break;
+ default:
+ usage(ctx);
+ }
+ if (show_version_only)
+ return 0;
+ if (optind != argc - 1)
+ usage(ctx);
+ if ((ctx->options & E2F_OPT_NO) &&
+ (ctx->options & E2F_OPT_COMPRESS_DIRS)) {
+ com_err(ctx->program_name, 0, "%s",
+ _("The -n and -D options are incompatible."));
+ fatal_error(ctx, 0);
+ }
+ if ((ctx->options & E2F_OPT_NO) && cflag) {
+ com_err(ctx->program_name, 0, "%s",
+ _("The -n and -c options are incompatible."));
+ fatal_error(ctx, 0);
+ }
+ if ((ctx->options & E2F_OPT_NO) && bad_blocks_file) {
+ com_err(ctx->program_name, 0, "%s",
+ _("The -n and -l/-L options are incompatible."));
+ fatal_error(ctx, 0);
+ }
+ if (ctx->options & E2F_OPT_NO)
+ ctx->options |= E2F_OPT_READONLY;
+
+ ctx->io_options = strchr(argv[optind], '?');
+ if (ctx->io_options)
+ *ctx->io_options++ = 0;
+ ctx->filesystem_name = get_devname(ctx->blkid, argv[optind], 0);
+ if (!ctx->filesystem_name) {
+ com_err(ctx->program_name, 0, _("Unable to resolve '%s'"),
+ argv[optind]);
+ fatal_error(ctx, 0);
+ }
+ if (extended_opts)
+ parse_extended_opts(ctx, extended_opts);
+
+ /* Complain about mutually exclusive rebuilding activities */
+ if (getenv("E2FSCK_FIXES_ONLY"))
+ ctx->options |= E2F_OPT_FIXES_ONLY;
+ if ((ctx->options & E2F_OPT_COMPRESS_DIRS) &&
+ (ctx->options & E2F_OPT_FIXES_ONLY)) {
+ com_err(ctx->program_name, 0, "%s",
+ _("The -D and -E fixes_only options are incompatible."));
+ fatal_error(ctx, 0);
+ }
+ if ((ctx->options & E2F_OPT_CONVERT_BMAP) &&
+ (ctx->options & E2F_OPT_FIXES_ONLY)) {
+ com_err(ctx->program_name, 0, "%s",
+ _("The -E bmap2extent and fixes_only options are incompatible."));
+ fatal_error(ctx, 0);
+ }
+
+ if ((cp = getenv("E2FSCK_CONFIG")) != NULL)
+ config_fn[0] = cp;
+ profile_set_syntax_err_cb(syntax_err_report);
+ profile_init(config_fn, &ctx->profile);
+
+ profile_get_boolean(ctx->profile, "options", "report_time", 0, 0,
+ &c);
+ if (c)
+ ctx->options |= E2F_OPT_TIME | E2F_OPT_TIME2;
+ profile_get_boolean(ctx->profile, "options", "report_verbose", 0, 0,
+ &c);
+ if (c)
+ verbose = 1;
+
+ profile_get_boolean(ctx->profile, "options", "no_optimize_extents",
+ 0, 0, &c);
+ if (c)
+ ctx->options |= E2F_OPT_NOOPT_EXTENTS;
+
+ profile_get_boolean(ctx->profile, "options", "inode_count_fullmap",
+ 0, 0, &c);
+ if (c)
+ ctx->options |= E2F_OPT_ICOUNT_FULLMAP;
+
+ if (ctx->readahead_kb == ~0ULL) {
+ profile_get_integer(ctx->profile, "options",
+ "readahead_mem_pct", 0, -1, &c);
+ if (c >= 0 && c <= 100)
+ ctx->readahead_kb = phys_mem_kb * c / 100;
+ profile_get_integer(ctx->profile, "options",
+ "readahead_kb", 0, -1, &c);
+ if (c >= 0)
+ ctx->readahead_kb = c;
+ if (ctx->readahead_kb != ~0ULL &&
+ ctx->readahead_kb > phys_mem_kb)
+ ctx->readahead_kb = phys_mem_kb;
+ }
+
+ /* Turn off discard in read-only mode */
+ if ((ctx->options & E2F_OPT_NO) &&
+ (ctx->options & E2F_OPT_DISCARD))
+ ctx->options &= ~E2F_OPT_DISCARD;
+
+ if (flush) {
+ fd = open(ctx->filesystem_name, O_RDONLY, 0);
+ if (fd < 0) {
+ com_err("open", errno,
+ _("while opening %s for flushing"),
+ ctx->filesystem_name);
+ fatal_error(ctx, 0);
+ }
+ if ((retval = ext2fs_sync_device(fd, 1))) {
+ com_err("ext2fs_sync_device", retval,
+ _("while trying to flush %s"),
+ ctx->filesystem_name);
+ fatal_error(ctx, 0);
+ }
+ close(fd);
+ }
+ if (cflag && bad_blocks_file) {
+ fprintf(stderr, "%s", _("The -c and the -l/-L options may not "
+ "be both used at the same time.\n"));
+ exit(FSCK_USAGE);
+ }
+#ifdef HAVE_SIGNAL_H
+ /*
+ * Set up signal action
+ */
+ memset(&sa, 0, sizeof(struct sigaction));
+ sa.sa_handler = signal_cancel;
+ sigaction(SIGINT, &sa, 0);
+ sigaction(SIGTERM, &sa, 0);
+#ifdef SA_RESTART
+ sa.sa_flags = SA_RESTART;
+#endif
+ sa.sa_handler = signal_progress_on;
+ sigaction(SIGUSR1, &sa, 0);
+ sa.sa_handler = signal_progress_off;
+ sigaction(SIGUSR2, &sa, 0);
+#endif
+
+ /* Update our PATH to include /sbin if we need to run badblocks */
+ if (cflag) {
+ char *oldpath = getenv("PATH");
+ char *newpath;
+ int len = sizeof(PATH_SET) + 1;
+
+ if (oldpath)
+ len += strlen(oldpath);
+
+ newpath = malloc(len);
+ if (!newpath)
+ fatal_error(ctx, "Couldn't malloc() newpath");
+ strcpy(newpath, PATH_SET);
+
+ if (oldpath) {
+ strcat(newpath, ":");
+ strcat(newpath, oldpath);
+ }
+ putenv(newpath);
+ }
+#ifdef CONFIG_JBD_DEBUG
+ jbd_debug = getenv("E2FSCK_JBD_DEBUG");
+ if (jbd_debug) {
+ res = sscanf(jbd_debug, "%d", &journal_enable_debug);
+ if (res != 1) {
+ fprintf(stderr,
+ _("E2FSCK_JBD_DEBUG \"%s\" not an integer\n\n"),
+ jbd_debug);
+ exit (1);
+ }
+ }
+#endif
+ return 0;
+
+sscanf_err:
+ fprintf(stderr, _("\nInvalid non-numeric argument to -%c (\"%s\")\n\n"),
+ c, optarg);
+ exit (1);
+}
+
+static errcode_t try_open_fs(e2fsck_t ctx, int flags, io_manager io_ptr,
+ ext2_filsys *ret_fs)
+{
+ errcode_t retval;
+
+ *ret_fs = NULL;
+
+ if (ctx->superblock) {
+ unsigned long blocksize = ctx->blocksize;
+
+ if (!blocksize) {
+ for (blocksize = EXT2_MIN_BLOCK_SIZE;
+ blocksize <= EXT2_MAX_BLOCK_SIZE; blocksize *= 2) {
+
+ retval = ext2fs_open2(ctx->filesystem_name,
+ ctx->io_options, flags,
+ ctx->superblock, blocksize,
+ unix_io_manager, ret_fs);
+ if (*ret_fs) {
+ ext2fs_free(*ret_fs);
+ *ret_fs = NULL;
+ }
+ if (!retval)
+ break;
+ }
+ if (retval)
+ return retval;
+ }
+
+ retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options,
+ flags, ctx->superblock, blocksize,
+ io_ptr, ret_fs);
+ } else
+ retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options,
+ flags, 0, 0, io_ptr, ret_fs);
+
+ if (retval == 0) {
+ (*ret_fs)->priv_data = ctx;
+ e2fsck_set_bitmap_type(*ret_fs, EXT2FS_BMAP64_RBTREE,
+ "default", NULL);
+ }
+ return retval;
+}
+
+static const char *my_ver_string = E2FSPROGS_VERSION;
+static const char *my_ver_date = E2FSPROGS_DATE;
+
+static errcode_t e2fsck_check_mmp(ext2_filsys fs, e2fsck_t ctx)
+{
+ struct mmp_struct *mmp_s;
+ unsigned int mmp_check_interval;
+ errcode_t retval = 0;
+ struct problem_context pctx;
+ unsigned int wait_time = 0;
+
+ clear_problem_context(&pctx);
+ if (fs->mmp_buf == NULL) {
+ retval = ext2fs_get_mem(fs->blocksize, &fs->mmp_buf);
+ if (retval)
+ goto check_error;
+ }
+
+ retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, fs->mmp_buf);
+ if (retval)
+ goto check_error;
+
+ mmp_s = fs->mmp_buf;
+
+ mmp_check_interval = fs->super->s_mmp_update_interval;
+ if (mmp_check_interval < EXT4_MMP_MIN_CHECK_INTERVAL)
+ mmp_check_interval = EXT4_MMP_MIN_CHECK_INTERVAL;
+
+ /*
+ * If check_interval in MMP block is larger, use that instead of
+ * check_interval from the superblock.
+ */
+ if (mmp_s->mmp_check_interval > mmp_check_interval)
+ mmp_check_interval = mmp_s->mmp_check_interval;
+
+ wait_time = mmp_check_interval * 2 + 1;
+
+ if (mmp_s->mmp_seq == EXT4_MMP_SEQ_CLEAN)
+ retval = 0;
+ else if (mmp_s->mmp_seq == EXT4_MMP_SEQ_FSCK)
+ retval = EXT2_ET_MMP_FSCK_ON;
+ else if (mmp_s->mmp_seq > EXT4_MMP_SEQ_MAX)
+ retval = EXT2_ET_MMP_UNKNOWN_SEQ;
+
+ if (retval)
+ goto check_error;
+
+ /* Print warning if e2fsck will wait for more than 20 secs. */
+ if (verbose || wait_time > EXT4_MMP_MIN_CHECK_INTERVAL * 4) {
+ log_out(ctx, _("MMP interval is %u seconds and total wait "
+ "time is %u seconds. Please wait...\n"),
+ mmp_check_interval, wait_time * 2);
+ }
+
+ return 0;
+
+check_error:
+
+ if (retval == EXT2_ET_MMP_BAD_BLOCK) {
+ if (fix_problem(ctx, PR_0_MMP_INVALID_BLK, &pctx)) {
+ fs->super->s_mmp_block = 0;
+ ext2fs_mark_super_dirty(fs);
+ retval = 0;
+ }
+ } else if (retval == EXT2_ET_MMP_FAILED) {
+ com_err(ctx->program_name, retval, "%s",
+ _("while checking MMP block"));
+ dump_mmp_msg(fs->mmp_buf, NULL);
+ } else if (retval == EXT2_ET_MMP_FSCK_ON ||
+ retval == EXT2_ET_MMP_UNKNOWN_SEQ) {
+ com_err(ctx->program_name, retval, "%s",
+ _("while checking MMP block"));
+ dump_mmp_msg(fs->mmp_buf,
+ _("If you are sure the filesystem is not "
+ "in use on any node, run:\n"
+ "'tune2fs -f -E clear_mmp %s'\n"),
+ ctx->device_name);
+ } else if (retval == EXT2_ET_MMP_MAGIC_INVALID) {
+ if (fix_problem(ctx, PR_0_MMP_INVALID_MAGIC, &pctx)) {
+ ext2fs_mmp_clear(fs);
+ retval = 0;
+ }
+ } else if (retval == EXT2_ET_MMP_CSUM_INVALID) {
+ if (fix_problem(ctx, PR_0_MMP_CSUM_INVALID, &pctx)) {
+ ext2fs_mmp_clear(fs);
+ retval = 0;
+ }
+ } else
+ com_err(ctx->program_name, retval, "%s",
+ _("while reading MMP block"));
+ return retval;
+}
+
+static int e2fsck_setup_tdb(e2fsck_t ctx, io_manager *io_ptr)
+{
+ errcode_t retval = ENOMEM;
+ char *tdb_dir = NULL, *tdb_file = NULL;
+ char *dev_name, *tmp_name;
+ int free_tdb_dir = 0;
+
+ /* (re)open a specific undo file */
+ if (ctx->undo_file && ctx->undo_file[0] != 0) {
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto err;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(ctx->undo_file);
+ if (retval)
+ goto err;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"),
+ ctx->undo_file, ctx->filesystem_name);
+ return retval;
+ }
+
+ /*
+ * Configuration via a conf file would be
+ * nice
+ */
+ tdb_dir = getenv("E2FSPROGS_UNDO_DIR");
+ if (!tdb_dir) {
+ profile_get_string(ctx->profile, "defaults",
+ "undo_dir", 0, "/var/lib/e2fsprogs",
+ &tdb_dir);
+ free_tdb_dir = 1;
+ }
+
+ if (!strcmp(tdb_dir, "none") || (tdb_dir[0] == 0) ||
+ access(tdb_dir, W_OK)) {
+ if (free_tdb_dir)
+ free(tdb_dir);
+ return 0;
+ }
+
+ tmp_name = strdup(ctx->filesystem_name);
+ if (!tmp_name)
+ goto errout;
+ dev_name = basename(tmp_name);
+ tdb_file = malloc(strlen(tdb_dir) + 8 + strlen(dev_name) + 7 + 1);
+ if (!tdb_file) {
+ free(tmp_name);
+ goto errout;
+ }
+ sprintf(tdb_file, "%s/e2fsck-%s.e2undo", tdb_dir, dev_name);
+ free(tmp_name);
+
+ if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
+ retval = errno;
+ com_err(ctx->program_name, retval,
+ _("while trying to delete %s"), tdb_file);
+ goto errout;
+ }
+
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto errout;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(tdb_file);
+ if (retval)
+ goto errout;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"), tdb_file, ctx->filesystem_name);
+
+ if (free_tdb_dir)
+ free(tdb_dir);
+ free(tdb_file);
+ return 0;
+
+errout:
+ if (free_tdb_dir)
+ free(tdb_dir);
+ free(tdb_file);
+err:
+ com_err(ctx->program_name, retval, "%s",
+ _("while trying to setup undo file\n"));
+ return retval;
+}
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0, retval2 = 0, orig_retval = 0;
+ int exit_value = FSCK_OK;
+ ext2_filsys fs = 0;
+ io_manager io_ptr;
+ struct ext2_super_block *sb;
+ const char *lib_ver_date;
+ int my_ver, lib_ver;
+ e2fsck_t ctx;
+ blk64_t orig_superblock = ~(blk64_t)0;
+ struct problem_context pctx;
+ int flags, run_result, was_changed;
+ int journal_size;
+ int sysval, sys_page_size = 4096;
+ int old_bitmaps;
+ __u32 features[3];
+ char *cp;
+ enum quota_type qtype;
+ struct ext2fs_journal_params jparams;
+
+ clear_problem_context(&pctx);
+ sigcatcher_setup();
+#ifdef MTRACE
+ mtrace();
+#endif
+#ifdef MCHECK
+ mcheck(0);
+#endif
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ my_ver = ext2fs_parse_version_string(my_ver_string);
+ lib_ver = ext2fs_get_library_version(0, &lib_ver_date);
+ if (my_ver > lib_ver) {
+ fprintf( stderr, "%s",
+ _("Error: ext2fs library version out of date!\n"));
+ show_version_only++;
+ }
+
+ retval = PRS(argc, argv, &ctx);
+ if (retval) {
+ com_err("e2fsck", retval, "%s",
+ _("while trying to initialize program"));
+ exit(FSCK_ERROR);
+ }
+ reserve_stdio_fds();
+
+ set_up_logging(ctx);
+ if (ctx->logf) {
+ int i;
+
+ fputs("E2fsck run: ", ctx->logf);
+ for (i = 0; i < argc; i++) {
+ if (i)
+ fputc(' ', ctx->logf);
+ fputs(argv[i], ctx->logf);
+ }
+ fputc('\n', ctx->logf);
+ }
+ if (ctx->problem_logf) {
+ int i;
+
+ fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
+ ctx->problem_logf);
+ fprintf(ctx->problem_logf, "<problem_log time=\"%lu\">\n",
+ (unsigned long) ctx->now);
+ fprintf(ctx->problem_logf, "<invocation prog=\"%s\"",
+ argv[0]);
+ for (i = 1; i < argc; i++)
+ fprintf(ctx->problem_logf, " arg%d=\"%s\"", i, argv[i]);
+ fputs("/>\n", ctx->problem_logf);
+ }
+
+ init_resource_track(&ctx->global_rtrack, NULL);
+ if (!(ctx->options & E2F_OPT_PREEN) || show_version_only)
+ log_err(ctx, "e2fsck %s (%s)\n", my_ver_string,
+ my_ver_date);
+
+ if (show_version_only) {
+ log_err(ctx, _("\tUsing %s, %s\n"),
+ error_message(EXT2_ET_BASE), lib_ver_date);
+ exit(FSCK_OK);
+ }
+
+ check_mount(ctx);
+
+ if (!(ctx->options & E2F_OPT_PREEN) &&
+ !(ctx->options & E2F_OPT_NO) &&
+ !(ctx->options & E2F_OPT_YES)) {
+ if (!ctx->interactive)
+ fatal_error(ctx,
+ _("need terminal for interactive repairs"));
+ }
+ ctx->superblock = ctx->use_superblock;
+
+ flags = EXT2_FLAG_SKIP_MMP | EXT2_FLAG_THREADS;
+restart:
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+#endif
+ io_ptr = unix_io_manager;
+ flags |= EXT2_FLAG_NOFREE_ON_ERROR;
+ profile_get_boolean(ctx->profile, "options", "old_bitmaps", 0, 0,
+ &old_bitmaps);
+ if (!old_bitmaps)
+ flags |= EXT2_FLAG_64BITS;
+ if ((ctx->options & E2F_OPT_READONLY) == 0) {
+ flags |= EXT2_FLAG_RW;
+ if (!(ctx->mount_flags & EXT2_MF_ISROOT &&
+ ctx->mount_flags & EXT2_MF_READONLY))
+ flags |= EXT2_FLAG_EXCLUSIVE;
+ if ((ctx->mount_flags & EXT2_MF_READONLY) &&
+ (ctx->options & E2F_OPT_FORCE))
+ flags &= ~EXT2_FLAG_EXCLUSIVE;
+ }
+
+ if (ctx->undo_file) {
+ retval = e2fsck_setup_tdb(ctx, &io_ptr);
+ if (retval)
+ exit(FSCK_ERROR);
+ }
+
+ ctx->openfs_flags = flags;
+ retval = try_open_fs(ctx, flags, io_ptr, &fs);
+
+ if (!ctx->superblock && !(ctx->options & E2F_OPT_PREEN) &&
+ !(ctx->flags & E2F_FLAG_SB_SPECIFIED) &&
+ ((retval == EXT2_ET_BAD_MAGIC) ||
+ (retval == EXT2_ET_SB_CSUM_INVALID) ||
+ (retval == EXT2_ET_CORRUPT_SUPERBLOCK) ||
+ ((retval == 0) && (retval2 = ext2fs_check_desc(fs))))) {
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_0_OPEN_FAILED, &pctx);
+ }
+ if (retval2) {
+ pctx.errcode = retval2;
+ fix_problem(ctx, PR_0_CHECK_DESC_FAILED, &pctx);
+ }
+ pctx.errcode = 0;
+ if (retval2 == ENOMEM || retval2 == EXT2_ET_NO_MEMORY) {
+ retval = retval2;
+ goto failure;
+ }
+ if (fs->flags & EXT2_FLAG_NOFREE_ON_ERROR) {
+ ext2fs_free(fs);
+ fs = NULL;
+ }
+ if (!fs || (fs->group_desc_count > 1)) {
+ log_out(ctx, _("%s: %s trying backup blocks...\n"),
+ ctx->program_name,
+ retval ? _("Superblock invalid,") :
+ _("Group descriptors look bad..."));
+ orig_superblock = ctx->superblock;
+ get_backup_sb(ctx, fs, ctx->filesystem_name, io_ptr);
+ if (fs)
+ ext2fs_close_free(&fs);
+ orig_retval = retval;
+ retval = try_open_fs(ctx, flags, io_ptr, &fs);
+ if ((orig_retval == 0) && retval != 0) {
+ if (fs)
+ ext2fs_close_free(&fs);
+ log_out(ctx, _("%s: %s while using the "
+ "backup blocks"),
+ ctx->program_name,
+ error_message(retval));
+ log_out(ctx, _("%s: going back to original "
+ "superblock\n"),
+ ctx->program_name);
+ ctx->superblock = orig_superblock;
+ retval = try_open_fs(ctx, flags, io_ptr, &fs);
+ }
+ }
+ }
+ if (((retval == EXT2_ET_UNSUPP_FEATURE) ||
+ (retval == EXT2_ET_RO_UNSUPP_FEATURE)) &&
+ fs && fs->super) {
+ sb = fs->super;
+ features[0] = (sb->s_feature_compat &
+ ~EXT2_LIB_FEATURE_COMPAT_SUPP);
+ features[1] = (sb->s_feature_incompat &
+ ~EXT2_LIB_FEATURE_INCOMPAT_SUPP);
+ features[2] = (sb->s_feature_ro_compat &
+ ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP);
+ if (features[0] || features[1] || features[2])
+ goto print_unsupp_features;
+ }
+failure:
+ if (retval) {
+ if (orig_retval)
+ retval = orig_retval;
+ com_err(ctx->program_name, retval, _("while trying to open %s"),
+ ctx->filesystem_name);
+ if (retval == EXT2_ET_REV_TOO_HIGH) {
+ log_out(ctx, "%s",
+ _("The filesystem revision is apparently "
+ "too high for this version of e2fsck.\n"
+ "(Or the filesystem superblock "
+ "is corrupt)\n\n"));
+ fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
+ } else if (retval == EXT2_ET_SHORT_READ)
+ log_out(ctx, "%s",
+ _("Could this be a zero-length partition?\n"));
+ else if ((retval == EPERM) || (retval == EACCES))
+ log_out(ctx, _("You must have %s access to the "
+ "filesystem or be root\n"),
+ (ctx->options & E2F_OPT_READONLY) ?
+ "r/o" : "r/w");
+ else if (retval == ENXIO)
+ log_out(ctx, "%s",
+ _("Possibly non-existent or swap device?\n"));
+ else if (retval == EBUSY)
+ log_out(ctx, "%s", _("Filesystem mounted or opened "
+ "exclusively by another program?\n"));
+ else if (retval == ENOENT)
+ log_out(ctx, "%s",
+ _("Possibly non-existent device?\n"));
+#ifdef EROFS
+ else if (retval == EROFS)
+ log_out(ctx, "%s", _("Disk write-protected; use the "
+ "-n option to do a read-only\n"
+ "check of the device.\n"));
+#endif
+ else {
+ /*
+ * Let's try once more will less consistency checking
+ * so that we are able to recover from more errors
+ * (e.g. some tool messing up some value in the sb).
+ */
+ if (((retval == EXT2_ET_CORRUPT_SUPERBLOCK) ||
+ (retval == EXT2_ET_BAD_DESC_SIZE)) &&
+ !(flags & EXT2_FLAG_IGNORE_SB_ERRORS)) {
+ if (fs)
+ ext2fs_close_free(&fs);
+ log_out(ctx, _("%s: Trying to load superblock "
+ "despite errors...\n"),
+ ctx->program_name);
+ flags |= EXT2_FLAG_IGNORE_SB_ERRORS;
+ /*
+ * If we tried backup sb, revert to the
+ * original one now.
+ */
+ if (orig_superblock != ~(blk64_t)0)
+ ctx->superblock = orig_superblock;
+ goto restart;
+ }
+ fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
+ if (retval == EXT2_ET_BAD_MAGIC)
+ check_plausibility(ctx->filesystem_name,
+ CHECK_FS_EXIST, NULL);
+ }
+ fatal_error(ctx, 0);
+ }
+ /*
+ * We only update the master superblock because (a) paranoia;
+ * we don't want to corrupt the backup superblocks, and (b) we
+ * don't need to update the mount count and last checked
+ * fields in the backup superblock (the kernel doesn't update
+ * the backup superblocks anyway). With newer versions of the
+ * library this flag is set by ext2fs_open2(), but we set this
+ * here just to be sure. (No, we don't support e2fsck running
+ * with some other libext2fs than the one that it was shipped
+ * with, but just in case....)
+ */
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+
+ if (!(ctx->flags & E2F_FLAG_GOT_DEVSIZE)) {
+ __u32 blocksize = EXT2_BLOCK_SIZE(fs->super);
+ int need_restart = 0;
+
+ pctx.errcode = ext2fs_get_device_size2(ctx->filesystem_name,
+ blocksize,
+ &ctx->num_blocks);
+ /*
+ * The floppy driver refuses to allow anyone else to
+ * open the device if has been opened with O_EXCL;
+ * this is unlike other block device drivers in Linux.
+ * To handle this, we close the filesystem and then
+ * reopen the filesystem after we get the device size.
+ */
+ if (pctx.errcode == EBUSY) {
+ ext2fs_close_free(&fs);
+ need_restart++;
+ pctx.errcode =
+ ext2fs_get_device_size2(ctx->filesystem_name,
+ blocksize,
+ &ctx->num_blocks);
+ }
+ if (pctx.errcode == EXT2_ET_UNIMPLEMENTED)
+ ctx->num_blocks = 0;
+ else if (pctx.errcode) {
+ fix_problem(ctx, PR_0_GETSIZE_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ fatal_error(ctx, 0);
+ }
+ ctx->flags |= E2F_FLAG_GOT_DEVSIZE;
+ if (need_restart)
+ goto restart;
+ }
+
+ ctx->fs = fs;
+ fs->now = ctx->now;
+ sb = fs->super;
+
+ if (sb->s_rev_level > E2FSCK_CURRENT_REV) {
+ com_err(ctx->program_name, EXT2_ET_REV_TOO_HIGH,
+ _("while trying to open %s"),
+ ctx->filesystem_name);
+ get_newer:
+ fatal_error(ctx, _("Get a newer version of e2fsck!"));
+ }
+
+ /*
+ * Set the device name, which is used whenever we print error
+ * or informational messages to the user.
+ */
+ if (ctx->device_name == 0 && sb->s_volume_name[0])
+ ctx->device_name = string_copy(ctx, (char *) sb->s_volume_name,
+ sizeof(sb->s_volume_name));
+
+ if (ctx->device_name == 0)
+ ctx->device_name = string_copy(ctx, ctx->filesystem_name, 0);
+ for (cp = ctx->device_name; *cp; cp++)
+ if (isspace(*cp) || *cp == ':')
+ *cp = '_';
+
+ if (ctx->problem_logf) {
+
+ fprintf(ctx->problem_logf, "<filesystem dev=\"%s\"",
+ ctx->filesystem_name);
+ if (!uuid_is_null(sb->s_uuid)) {
+ char buf[48];
+
+ uuid_unparse(sb->s_uuid, buf);
+ fprintf(ctx->problem_logf, " uuid=\"%s\"", buf);
+ }
+ if (sb->s_volume_name[0])
+ fprintf(ctx->problem_logf, " label=\"%.*s\"",
+ EXT2_LEN_STR(sb->s_volume_name));
+
+ fputs("/>\n", ctx->problem_logf);
+ }
+
+ ehandler_init(fs->io);
+
+ if (ext2fs_has_feature_mmp(fs->super) &&
+ (flags & EXT2_FLAG_SKIP_MMP)) {
+ if (e2fsck_check_mmp(fs, ctx))
+ fatal_error(ctx, 0);
+
+ /*
+ * Restart in order to reopen fs but this time start mmp.
+ */
+ ext2fs_close_free(&ctx->fs);
+ flags &= ~EXT2_FLAG_SKIP_MMP;
+ goto restart;
+ }
+
+ if (ctx->logf)
+ fprintf(ctx->logf, "Filesystem UUID: %s\n",
+ e2p_uuid2str(sb->s_uuid));
+
+ /*
+ * Make sure the ext3 superblock fields are consistent.
+ */
+ if ((ctx->mount_flags & (EXT2_MF_MOUNTED | EXT2_MF_BUSY)) == 0) {
+ retval = e2fsck_check_ext3_journal(ctx);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while checking journal for %s"),
+ ctx->device_name);
+ fatal_error(ctx,
+ _("Cannot proceed with file system check"));
+ }
+ }
+
+ /*
+ * Check to see if we need to do ext3-style recovery. If so,
+ * do it, and then restart the fsck.
+ */
+ if (ext2fs_has_feature_journal_needs_recovery(sb)) {
+ if (ctx->options & E2F_OPT_READONLY) {
+ log_out(ctx, "%s",
+ _("Warning: skipping journal recovery because "
+ "doing a read-only filesystem check.\n"));
+ io_channel_flush(ctx->fs->io);
+ } else {
+ if (ctx->flags & E2F_FLAG_RESTARTED) {
+ /*
+ * Whoops, we attempted to run the
+ * journal twice. This should never
+ * happen, unless the hardware or
+ * device driver is being bogus.
+ */
+ com_err(ctx->program_name, 0,
+ _("unable to set superblock flags "
+ "on %s\n"), ctx->device_name);
+ fatal_error(ctx, 0);
+ }
+ retval = e2fsck_run_ext3_journal(ctx);
+ if (retval == EFSBADCRC) {
+ log_out(ctx, _("Journal checksum error "
+ "found in %s\n"),
+ ctx->device_name);
+ } else if (retval == EFSCORRUPTED) {
+ log_out(ctx, _("Journal corrupted in %s\n"),
+ ctx->device_name);
+ } else if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while recovering journal of %s"),
+ ctx->device_name);
+ }
+ ext2fs_close_free(&ctx->fs);
+ ctx->flags |= E2F_FLAG_RESTARTED;
+ goto restart;
+ }
+ }
+
+ /*
+ * Check for compatibility with the feature sets. We need to
+ * be more stringent than ext2fs_open().
+ */
+ features[0] = sb->s_feature_compat & ~EXT2_LIB_FEATURE_COMPAT_SUPP;
+ features[1] = sb->s_feature_incompat & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP;
+ features[2] = (sb->s_feature_ro_compat &
+ ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP);
+print_unsupp_features:
+ if (features[0] || features[1] || features[2]) {
+ int i, j;
+ __u32 *mask = features, m;
+
+ log_err(ctx, _("%s has unsupported feature(s):"),
+ ctx->filesystem_name);
+
+ for (i=0; i <3; i++,mask++) {
+ for (j=0,m=1; j < 32; j++, m<<=1) {
+ if (*mask & m)
+ log_err(ctx, " %s",
+ e2p_feature2string(i, m));
+ }
+ }
+ log_err(ctx, "\n");
+ goto get_newer;
+ }
+
+ if (ext2fs_has_feature_casefold(sb) && !fs->encoding) {
+ log_err(ctx, _("%s has unsupported encoding: %0x\n"),
+ ctx->filesystem_name, sb->s_encoding);
+ goto get_newer;
+ }
+
+ /*
+ * If the user specified a specific superblock, presumably the
+ * master superblock has been trashed. So we mark the
+ * superblock as dirty, so it can be written out.
+ */
+ if (ctx->superblock &&
+ !(ctx->options & E2F_OPT_READONLY))
+ ext2fs_mark_super_dirty(fs);
+
+ /*
+ * Calculate the number of filesystem blocks per pagesize. If
+ * fs->blocksize > page_size, set the number of blocks per
+ * pagesize to 1 to avoid division by zero errors.
+ */
+#ifdef _SC_PAGESIZE
+ sysval = sysconf(_SC_PAGESIZE);
+ if (sysval > 0)
+ sys_page_size = sysval;
+#endif /* _SC_PAGESIZE */
+ ctx->blocks_per_page = sys_page_size / fs->blocksize;
+ if (ctx->blocks_per_page == 0)
+ ctx->blocks_per_page = 1;
+
+ if (ctx->superblock)
+ set_latch_flags(PR_LATCH_RELOC, PRL_LATCHED, 0);
+ ext2fs_mark_valid(fs);
+ check_super_block(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ fatal_error(ctx, 0);
+ check_if_skip(ctx);
+ check_resize_inode(ctx);
+ if (bad_blocks_file)
+ read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
+ else if (cflag)
+ read_bad_blocks_file(ctx, 0, !keep_bad_blocks); /* Test disk */
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ fatal_error(ctx, 0);
+
+ /*
+ * Mark the system as valid, 'til proven otherwise
+ */
+ ext2fs_mark_valid(fs);
+
+ retval = ext2fs_read_bb_inode(fs, &fs->badblocks);
+ if (retval) {
+ log_out(ctx, _("%s: %s while reading bad blocks inode\n"),
+ ctx->program_name, error_message(retval));
+ preenhalt(ctx);
+ log_out(ctx, "%s", _("This doesn't bode well, "
+ "but we'll try to go on...\n"));
+ }
+
+ /*
+ * Save the journal size in megabytes.
+ * Try and use the journal size from the backup else let e2fsck
+ * find the default journal size. If fast commit feature is enabled,
+ * it is not clear how many of the journal blocks were fast commit
+ * blocks. So, ignore the size of journal found in backup.
+ *
+ * TODO: Add a new backup type that captures fast commit info as
+ * well.
+ */
+ if (sb->s_jnl_backup_type == EXT3_JNL_BACKUP_BLOCKS &&
+ !ext2fs_has_feature_fast_commit(sb))
+ journal_size = (sb->s_jnl_blocks[15] << (32 - 20)) |
+ (sb->s_jnl_blocks[16] >> 20);
+ else
+ journal_size = -1;
+
+ if (ext2fs_has_feature_quota(sb)) {
+ /* Quotas were enabled. Do quota accounting during fsck. */
+ clear_problem_context(&pctx);
+ pctx.errcode = quota_init_context(&ctx->qctx, ctx->fs, 0);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_0_QUOTA_INIT_CTX, &pctx);
+ fatal_error(ctx, 0);
+ }
+ }
+
+ run_result = e2fsck_run(ctx);
+ e2fsck_clear_progbar(ctx);
+
+ if (!ctx->invalid_bitmaps &&
+ (ctx->flags & E2F_FLAG_JOURNAL_INODE)) {
+ if (fix_problem(ctx, PR_6_RECREATE_JOURNAL, &pctx)) {
+ if (journal_size < 1024) {
+ ext2fs_get_journal_params(&jparams, fs);
+ } else {
+ jparams.num_journal_blocks = journal_size;
+ jparams.num_fc_blocks = 0;
+ }
+ log_out(ctx, _("Creating journal (%d blocks): "),
+ jparams.num_journal_blocks);
+ fflush(stdout);
+ retval = ext2fs_add_journal_inode3(fs, &jparams, ~0ULL, 0);
+ if (retval) {
+ log_out(ctx, "%s: while trying to create "
+ "journal\n", error_message(retval));
+ goto no_journal;
+ }
+ log_out(ctx, "%s", _(" Done.\n"));
+ log_out(ctx, "%s",
+ _("\n*** journal has been regenerated ***\n"));
+ }
+ }
+
+no_journal:
+ if (run_result & E2F_FLAG_ABORT) {
+ fatal_error(ctx, _("aborted"));
+ } else if (run_result & E2F_FLAG_CANCEL) {
+ log_out(ctx, _("%s: e2fsck canceled.\n"), ctx->device_name ?
+ ctx->device_name : ctx->filesystem_name);
+ exit_value |= FSCK_CANCELED;
+ goto cleanup;
+ }
+
+ if (ext2fs_has_feature_orphan_file(fs->super)) {
+ int ret;
+
+ /* No point in orphan file without a journal... */
+ if (!ext2fs_has_feature_journal(fs->super) &&
+ fix_problem(ctx, PR_6_ORPHAN_FILE_WITHOUT_JOURNAL, &pctx)) {
+ retval = ext2fs_truncate_orphan_file(fs);
+ if (retval) {
+ /* Huh, failed to delete file */
+ fix_problem(ctx, PR_6_ORPHAN_FILE_TRUNC_FAILED,
+ &pctx);
+ goto check_quotas;
+ }
+ ext2fs_clear_feature_orphan_file(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ goto check_quotas;
+ }
+ ret = check_init_orphan_file(ctx);
+ if (ret == 2 ||
+ (ret == 0 && ext2fs_has_feature_orphan_present(fs->super) &&
+ fix_problem(ctx, PR_6_ORPHAN_PRESENT_CLEAN_FILE, &pctx))) {
+ ext2fs_clear_feature_orphan_present(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ } else if (ret == 1 &&
+ fix_problem(ctx, PR_6_ORPHAN_FILE_CORRUPTED, &pctx)) {
+ int orphan_file_blocks;
+
+ if (ctx->invalid_bitmaps) {
+ fix_problem(ctx,
+ PR_6_ORPHAN_FILE_BITMAP_INVALID,
+ &pctx);
+ goto check_quotas;
+ }
+
+ retval = ext2fs_truncate_orphan_file(fs);
+ if (retval) {
+ /* Huh, failed to truncate file */
+ fix_problem(ctx, PR_6_ORPHAN_FILE_TRUNC_FAILED,
+ &pctx);
+ goto check_quotas;
+ }
+
+ orphan_file_blocks =
+ ext2fs_default_orphan_file_blocks(fs);
+ log_out(ctx, _("Creating orphan file (%d blocks): "),
+ orphan_file_blocks);
+ fflush(stdout);
+ retval = ext2fs_create_orphan_file(fs,
+ orphan_file_blocks);
+ if (retval) {
+ log_out(ctx, "%s: while trying to create "
+ "orphan file\n", error_message(retval));
+ fix_problem(ctx, PR_6_ORPHAN_FILE_CREATE_FAILED,
+ &pctx);
+ goto check_quotas;
+ }
+ log_out(ctx, "%s", _(" Done.\n"));
+ }
+ } else if (ext2fs_has_feature_orphan_present(fs->super) &&
+ fix_problem(ctx, PR_6_ORPHAN_PRESENT_NO_FILE, &pctx)) {
+ ext2fs_clear_feature_orphan_present(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ }
+check_quotas:
+ if (ctx->qctx && !ctx->invalid_bitmaps) {
+ int needs_writeout;
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (*quota_sb_inump(sb, qtype) == 0)
+ continue;
+ needs_writeout = 0;
+ pctx.num = qtype;
+ retval = quota_compare_and_update(ctx->qctx, qtype,
+ &needs_writeout);
+ if ((retval || needs_writeout) &&
+ fix_problem(ctx, PR_6_UPDATE_QUOTAS, &pctx)) {
+ pctx.errcode = quota_write_inode(ctx->qctx,
+ 1 << qtype);
+ if (pctx.errcode)
+ (void) fix_problem(ctx,
+ PR_6_WRITE_QUOTAS, &pctx);
+ }
+ }
+ quota_release_context(&ctx->qctx);
+ }
+
+ if (run_result == E2F_FLAG_RESTART) {
+ log_out(ctx, "%s",
+ _("Restarting e2fsck from the beginning...\n"));
+ retval = e2fsck_reset_context(ctx);
+ if (retval) {
+ com_err(ctx->program_name, retval, "%s",
+ _("while resetting context"));
+ fatal_error(ctx, 0);
+ }
+ ext2fs_close_free(&ctx->fs);
+ goto restart;
+ }
+
+cleanup:
+#ifdef MTRACE
+ mtrace_print("Cleanup");
+#endif
+ was_changed = ext2fs_test_changed(fs);
+ if (!(ctx->flags & E2F_FLAG_RUN_RETURN) &&
+ !(ctx->options & E2F_OPT_READONLY)) {
+ if (ext2fs_test_valid(fs)) {
+ if (!(sb->s_state & EXT2_VALID_FS))
+ exit_value |= FSCK_NONDESTRUCT;
+ sb->s_state = EXT2_VALID_FS;
+ if (check_backup_super_block(ctx))
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ } else
+ sb->s_state &= ~EXT2_VALID_FS;
+ if (!(ctx->flags & E2F_FLAG_TIME_INSANE))
+ sb->s_lastcheck = ctx->now;
+ sb->s_mnt_count = 0;
+ memset(((char *) sb) + EXT4_S_ERR_START, 0, EXT4_S_ERR_LEN);
+ pctx.errcode = ext2fs_set_gdt_csum(ctx->fs);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_6_SET_BG_CHECKSUM, &pctx);
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ if (ext2fs_has_feature_shared_blocks(ctx->fs->super) &&
+ (ctx->options & E2F_OPT_UNSHARE_BLOCKS) &&
+ (ctx->options & E2F_OPT_NO))
+ /* Don't try to write or flush I/O, we just wanted to know whether or
+ * not there were enough free blocks to undo deduplication.
+ */
+ goto skip_write;
+
+ if (!(ctx->options & E2F_OPT_READONLY)) {
+ e2fsck_write_bitmaps(ctx);
+ if (fs->flags & EXT2_FLAG_DIRTY) {
+ pctx.errcode = ext2fs_flush(ctx->fs);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_6_FLUSH_FILESYSTEM, &pctx);
+ }
+ pctx.errcode = io_channel_flush(ctx->fs->io);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_6_IO_FLUSH, &pctx);
+ }
+
+ if (was_changed) {
+ int fs_fixed = (ctx->flags & E2F_FLAG_PROBLEMS_FIXED);
+
+ if (fs_fixed)
+ exit_value |= FSCK_NONDESTRUCT;
+ if (!(ctx->options & E2F_OPT_PREEN)) {
+#if 0 /* Do this later; it breaks too many tests' golden outputs */
+ log_out(ctx, fs_fixed ?
+ _("\n%s: ***** FILE SYSTEM ERRORS "
+ "CORRECTED *****\n") :
+ _("%s: File system was modified.\n"),
+ ctx->device_name);
+#else
+ log_out(ctx,
+ _("\n%s: ***** FILE SYSTEM WAS MODIFIED *****\n"),
+ ctx->device_name);
+#endif
+ }
+ if (ctx->mount_flags & EXT2_MF_ISROOT) {
+ log_out(ctx, _("%s: ***** REBOOT SYSTEM *****\n"),
+ ctx->device_name);
+ exit_value |= FSCK_REBOOT;
+ }
+ }
+
+skip_write:
+ if (!ext2fs_test_valid(fs) ||
+ ((exit_value & FSCK_CANCELED) &&
+ (sb->s_state & EXT2_ERROR_FS))) {
+ log_out(ctx, _("\n%s: ********** WARNING: Filesystem still has "
+ "errors **********\n\n"), ctx->device_name);
+ exit_value |= FSCK_UNCORRECTED;
+ exit_value &= ~FSCK_NONDESTRUCT;
+ }
+ if (exit_value & FSCK_CANCELED) {
+ int allow_cancellation;
+
+ profile_get_boolean(ctx->profile, "options",
+ "allow_cancellation", 0, 0,
+ &allow_cancellation);
+ exit_value &= ~FSCK_NONDESTRUCT;
+ if (allow_cancellation && ext2fs_test_valid(fs) &&
+ (sb->s_state & EXT2_VALID_FS) &&
+ !(sb->s_state & EXT2_ERROR_FS))
+ exit_value = 0;
+ } else
+ show_stats(ctx);
+
+ print_resource_track(ctx, NULL, &ctx->global_rtrack, ctx->fs->io);
+
+ ext2fs_close_free(&ctx->fs);
+ free(ctx->journal_name);
+
+ if (ctx->logf)
+ fprintf(ctx->logf, "Exit status: %d\n", exit_value);
+ e2fsck_free_context(ctx);
+ remove_error_table(&et_ext2_error_table);
+ remove_error_table(&et_prof_error_table);
+ return exit_value;
+}
diff --git a/e2fsck/util.c b/e2fsck/util.c
new file mode 100644
index 0000000..42740d9
--- /dev/null
+++ b/e2fsck/util.c
@@ -0,0 +1,900 @@
+/*
+ * util.c --- miscellaneous utilities
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+
+#ifdef HAVE_CONIO_H
+#undef HAVE_TERMIOS_H
+#include <conio.h>
+#define read_a_char() getch()
+#else
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#endif
+
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "e2fsck.h"
+
+extern e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
+
+#include <stdarg.h>
+#include <time.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+void fatal_error(e2fsck_t ctx, const char *msg)
+{
+ ext2_filsys fs = ctx->fs;
+ int exit_value = FSCK_ERROR;
+
+ if (msg)
+ fprintf (stderr, "e2fsck: %s\n", msg);
+ if (!fs)
+ goto out;
+ if (fs->io && fs->super) {
+ ext2fs_mmp_stop(ctx->fs);
+ if (ctx->fs->io->magic == EXT2_ET_MAGIC_IO_CHANNEL)
+ io_channel_flush(ctx->fs->io);
+ else
+ log_err(ctx, "e2fsck: io manager magic bad!\n");
+ }
+ if (ext2fs_test_changed(fs)) {
+ exit_value |= FSCK_NONDESTRUCT;
+ log_out(ctx, _("\n%s: ***** FILE SYSTEM WAS MODIFIED *****\n"),
+ ctx->device_name);
+ if (ctx->mount_flags & EXT2_MF_ISROOT)
+ exit_value |= FSCK_REBOOT;
+ }
+ if (!ext2fs_test_valid(fs)) {
+ log_out(ctx, _("\n%s: ********** WARNING: Filesystem still has "
+ "errors **********\n\n"), ctx->device_name);
+ exit_value |= FSCK_UNCORRECTED;
+ exit_value &= ~FSCK_NONDESTRUCT;
+ }
+out:
+ ctx->flags |= E2F_FLAG_ABORT;
+ if (ctx->flags & E2F_FLAG_SETJMP_OK)
+ longjmp(ctx->abort_loc, 1);
+ if (ctx->logf)
+ fprintf(ctx->logf, "Exit status: %d\n", exit_value);
+ exit(exit_value);
+}
+
+void log_out(e2fsck_t ctx, const char *fmt, ...)
+{
+ va_list pvar;
+
+ va_start(pvar, fmt);
+ vprintf(fmt, pvar);
+ va_end(pvar);
+ if (ctx->logf) {
+ va_start(pvar, fmt);
+ vfprintf(ctx->logf, fmt, pvar);
+ va_end(pvar);
+ }
+}
+
+void log_err(e2fsck_t ctx, const char *fmt, ...)
+{
+ va_list pvar;
+
+ va_start(pvar, fmt);
+ vfprintf(stderr, fmt, pvar);
+ va_end(pvar);
+ if (ctx->logf) {
+ va_start(pvar, fmt);
+ vfprintf(ctx->logf, fmt, pvar);
+ va_end(pvar);
+ }
+}
+
+void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned long size,
+ const char *description)
+{
+ void *ret;
+ char buf[256];
+
+#ifdef DEBUG_ALLOCATE_MEMORY
+ printf("Allocating %lu bytes for %s...\n", size, description);
+#endif
+ if (ext2fs_get_memzero(size, &ret)) {
+ sprintf(buf, "Can't allocate %lu bytes for %s\n",
+ size, description);
+ fatal_error(ctx, buf);
+ }
+
+ return ret;
+}
+
+char *string_copy(e2fsck_t ctx EXT2FS_ATTR((unused)),
+ const char *str, size_t len)
+{
+ char *ret;
+
+ if (!str)
+ return NULL;
+ if (!len)
+ len = strlen(str);
+ ret = malloc(len+1);
+ if (ret) {
+ strncpy(ret, str, len);
+ ret[len] = 0;
+ }
+ return ret;
+}
+
+#ifndef HAVE_STRNLEN
+/*
+ * Incredibly, libc5 doesn't appear to have strnlen. So we have to
+ * provide our own.
+ */
+int e2fsck_strnlen(const char * s, int count)
+{
+ const char *cp = s;
+
+ while (count-- && *cp)
+ cp++;
+ return cp - s;
+}
+#endif
+
+#ifndef HAVE_CONIO_H
+static int read_a_char(void)
+{
+ char c;
+ int r;
+ int fail = 0;
+
+ while(1) {
+ if (e2fsck_global_ctx &&
+ (e2fsck_global_ctx->flags & E2F_FLAG_CANCEL)) {
+ return 3;
+ }
+ r = read(0, &c, 1);
+ if (r == 1)
+ return c;
+ if (fail++ > 100)
+ break;
+ }
+ return EOF;
+}
+#endif
+
+int ask_yn(e2fsck_t ctx, const char * string, int def)
+{
+ int c;
+ const char *defstr;
+ const char *short_yes = _("yY");
+ const char *short_no = _("nN");
+ const char *short_yesall = _("aA");
+ const char *english_yes = "yY";
+ const char *english_no = "nN";
+ const char *english_yesall = "aA";
+ const char *yesall_prompt = _(" ('a' enables 'yes' to all) ");
+ const char *extra_prompt = "";
+ static int yes_answers;
+
+#ifdef HAVE_TERMIOS_H
+ struct termios termios, tmp;
+
+ if (tcgetattr (0, &termios) < 0)
+ memset(&termios, 0, sizeof(termios));
+ tmp = termios;
+ tmp.c_lflag &= ~(ICANON | ECHO);
+ tmp.c_cc[VMIN] = 1;
+ tmp.c_cc[VTIME] = 0;
+ tcsetattr (0, TCSANOW, &tmp);
+#endif
+
+ if (def == 1)
+ defstr = _(_("<y>"));
+ else if (def == 0)
+ defstr = _(_("<n>"));
+ else
+ defstr = _(" (y/n)");
+ /*
+ * If the user presses 'y' more than 8 (but less than 12) times in
+ * succession without pressing anything else, display a hint about
+ * yes-to-all mode.
+ */
+ if (yes_answers > 12)
+ yes_answers = -1;
+ else if (yes_answers > 8)
+ extra_prompt = yesall_prompt;
+ log_out(ctx, "%s%s%s? ", string, extra_prompt, defstr);
+ while (1) {
+ fflush (stdout);
+ if ((c = read_a_char()) == EOF)
+ break;
+ if (c == 3) {
+#ifdef HAVE_TERMIOS_H
+ tcsetattr (0, TCSANOW, &termios);
+#endif
+ if (ctx->flags & E2F_FLAG_SETJMP_OK) {
+ log_out(ctx, "\n");
+ longjmp(e2fsck_global_ctx->abort_loc, 1);
+ }
+ log_out(ctx, "%s", _("cancelled!\n"));
+ yes_answers = 0;
+ return 0;
+ }
+ if (strchr(short_yes, (char) c)) {
+ do_yes:
+ def = 1;
+ if (yes_answers >= 0)
+ yes_answers++;
+ break;
+ } else if (strchr(short_no, (char) c)) {
+ do_no:
+ def = 0;
+ yes_answers = -1;
+ break;
+ } else if (strchr(short_yesall, (char)c)) {
+ do_all:
+ def = 2;
+ yes_answers = -1;
+ ctx->options |= E2F_OPT_YES;
+ break;
+ } else if (strchr(english_yes, (char) c)) {
+ goto do_yes;
+ } else if (strchr(english_no, (char) c)) {
+ goto do_no;
+ } else if (strchr(english_yesall, (char) c)) {
+ goto do_all;
+ } else if ((c == 27 || c == ' ' || c == '\n') && (def != -1)) {
+ yes_answers = -1;
+ break;
+ }
+ }
+ if (def == 2)
+ log_out(ctx, "%s", _("yes to all\n"));
+ else if (def)
+ log_out(ctx, "%s", _("yes\n"));
+ else
+ log_out(ctx, "%s", _("no\n"));
+#ifdef HAVE_TERMIOS_H
+ tcsetattr (0, TCSANOW, &termios);
+#endif
+ return def;
+}
+
+int ask (e2fsck_t ctx, const char * string, int def)
+{
+ if (ctx->options & E2F_OPT_NO) {
+ log_out(ctx, _("%s? no\n\n"), string);
+ return 0;
+ }
+ if (ctx->options & E2F_OPT_YES) {
+ log_out(ctx, _("%s? yes\n\n"), string);
+ return 1;
+ }
+ if (ctx->options & E2F_OPT_PREEN) {
+ log_out(ctx, "%s? %s\n\n", string, def ? _("yes") : _("no"));
+ return def;
+ }
+ return ask_yn(ctx, string, def);
+}
+
+void e2fsck_read_bitmaps(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ const char *old_op;
+ unsigned int save_type;
+ int flags;
+
+ if (ctx->invalid_bitmaps) {
+ com_err(ctx->program_name, 0,
+ _("e2fsck_read_bitmaps: illegal bitmap block(s) for %s"),
+ ctx->device_name);
+ fatal_error(ctx, 0);
+ }
+
+ old_op = ehandler_operation(_("reading inode and block bitmaps"));
+ e2fsck_set_bitmap_type(fs, EXT2FS_BMAP64_RBTREE, "fs_bitmaps",
+ &save_type);
+ flags = ctx->fs->flags;
+ ctx->fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ retval = ext2fs_read_bitmaps(fs);
+ ctx->fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) |
+ (ctx->fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS);
+ fs->default_bitmap_type = save_type;
+ ehandler_operation(old_op);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while retrying to read bitmaps for %s"),
+ ctx->device_name);
+ fatal_error(ctx, 0);
+ }
+}
+
+void e2fsck_write_bitmaps(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ const char *old_op;
+
+ old_op = ehandler_operation(_("writing block and inode bitmaps"));
+ retval = ext2fs_write_bitmaps(fs);
+ ehandler_operation(old_op);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while rewriting block and inode bitmaps for %s"),
+ ctx->device_name);
+ fatal_error(ctx, 0);
+ }
+}
+
+void preenhalt(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ return;
+ log_err(ctx, _("\n\n%s: UNEXPECTED INCONSISTENCY; "
+ "RUN fsck MANUALLY.\n\t(i.e., without -a or -p options)\n"),
+ ctx->device_name);
+ ctx->flags |= E2F_FLAG_EXITING;
+ if (fs != NULL) {
+ fs->super->s_state |= EXT2_ERROR_FS;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_close_free(&fs);
+ }
+ exit(FSCK_UNCORRECTED);
+}
+
+#ifdef RESOURCE_TRACK
+void init_resource_track(struct resource_track *track, io_channel channel)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+ io_stats io_start = 0;
+
+ track->brk_start = sbrk(0);
+ gettimeofday(&track->time_start, 0);
+#ifdef HAVE_GETRUSAGE
+#ifdef sun
+ memset(&r, 0, sizeof(struct rusage));
+#endif
+ getrusage(RUSAGE_SELF, &r);
+ track->user_start = r.ru_utime;
+ track->system_start = r.ru_stime;
+#else
+ track->user_start.tv_sec = track->user_start.tv_usec = 0;
+ track->system_start.tv_sec = track->system_start.tv_usec = 0;
+#endif
+ track->bytes_read = 0;
+ track->bytes_written = 0;
+ if (channel && channel->manager && channel->manager->get_stats)
+ channel->manager->get_stats(channel, &io_start);
+ if (io_start) {
+ track->bytes_read = io_start->bytes_read;
+ track->bytes_written = io_start->bytes_written;
+ }
+}
+
+#ifdef __GNUC__
+#define _INLINE_ __inline__
+#else
+#define _INLINE_
+#endif
+
+static _INLINE_ float timeval_subtract(struct timeval *tv1,
+ struct timeval *tv2)
+{
+ return ((tv1->tv_sec - tv2->tv_sec) +
+ ((float) (tv1->tv_usec - tv2->tv_usec)) / 1000000);
+}
+
+void print_resource_track(e2fsck_t ctx, const char *desc,
+ struct resource_track *track, io_channel channel)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+ struct timeval time_end;
+
+ if ((desc && !(ctx->options & E2F_OPT_TIME2)) ||
+ (!desc && !(ctx->options & E2F_OPT_TIME)))
+ return;
+
+ e2fsck_clear_progbar(ctx);
+ gettimeofday(&time_end, 0);
+
+ if (desc)
+ log_out(ctx, "%s: ", desc);
+
+#define kbytes(x) (((unsigned long long)(x) + 1023) / 1024)
+#ifdef HAVE_MALLINFO2
+ if (1) {
+ struct mallinfo2 malloc_info = mallinfo2();
+
+ log_out(ctx, _("Memory used: %lluk/%lluk (%lluk/%lluk), "),
+ kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ kbytes(malloc_info.uordblks),
+ kbytes(malloc_info.fordblks));
+ } else
+#elif defined HAVE_MALLINFO
+ /* don't use mallinfo() if over 2GB used, since it returns "int" */
+ if ((char *)sbrk(0) - (char *)track->brk_start < 2LL << 30) {
+ struct mallinfo malloc_info = mallinfo();
+
+ log_out(ctx, _("Memory used: %lluk/%lluk (%lluk/%lluk), "),
+ kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ kbytes(malloc_info.uordblks),
+ kbytes(malloc_info.fordblks));
+ } else
+#endif
+ log_out(ctx, _("Memory used: %lluk, "),
+ kbytes(((char *)sbrk(0)) - ((char *)track->brk_start)));
+
+#ifdef HAVE_GETRUSAGE
+ getrusage(RUSAGE_SELF, &r);
+
+ log_out(ctx, _("time: %5.2f/%5.2f/%5.2f\n"),
+ timeval_subtract(&time_end, &track->time_start),
+ timeval_subtract(&r.ru_utime, &track->user_start),
+ timeval_subtract(&r.ru_stime, &track->system_start));
+#else
+ log_out(ctx, _("elapsed time: %6.3f\n"),
+ timeval_subtract(&time_end, &track->time_start));
+#endif
+#define mbytes(x) (((x) + 1048575) / 1048576)
+ if (channel && channel->manager && channel->manager->get_stats) {
+ io_stats delta = 0;
+ unsigned long long bytes_read = 0;
+ unsigned long long bytes_written = 0;
+
+ if (desc)
+ log_out(ctx, "%s: ", desc);
+
+ channel->manager->get_stats(channel, &delta);
+ if (delta) {
+ bytes_read = delta->bytes_read - track->bytes_read;
+ bytes_written = delta->bytes_written -
+ track->bytes_written;
+ }
+ log_out(ctx, "I/O read: %lluMB, write: %lluMB, "
+ "rate: %.2fMB/s\n",
+ mbytes(bytes_read), mbytes(bytes_written),
+ (double)mbytes(bytes_read + bytes_written) /
+ timeval_subtract(&time_end, &track->time_start));
+ }
+}
+#endif /* RESOURCE_TRACK */
+
+void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char *proc)
+{
+ errcode_t retval;
+
+ retval = ext2fs_read_inode(ctx->fs, ino, inode);
+ if (retval) {
+ com_err("ext2fs_read_inode", retval,
+ _("while reading inode %lu in %s"), ino, proc);
+ fatal_error(ctx, 0);
+ }
+}
+
+void e2fsck_read_inode_full(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode *inode, int bufsize,
+ const char *proc)
+{
+ errcode_t retval;
+
+ retval = ext2fs_read_inode_full(ctx->fs, ino, inode, bufsize);
+ if (retval) {
+ com_err("ext2fs_read_inode_full", retval,
+ _("while reading inode %lu in %s"), ino, proc);
+ fatal_error(ctx, 0);
+ }
+}
+
+void e2fsck_write_inode_full(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, int bufsize,
+ const char *proc)
+{
+ errcode_t retval;
+
+ retval = ext2fs_write_inode_full(ctx->fs, ino, inode, bufsize);
+ if (retval) {
+ com_err("ext2fs_write_inode", retval,
+ _("while writing inode %lu in %s"), ino, proc);
+ fatal_error(ctx, 0);
+ }
+}
+
+void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char *proc)
+{
+ errcode_t retval;
+
+ retval = ext2fs_write_inode(ctx->fs, ino, inode);
+ if (retval) {
+ com_err("ext2fs_write_inode", retval,
+ _("while writing inode %lu in %s"), ino, proc);
+ fatal_error(ctx, 0);
+ }
+}
+
+#ifdef MTRACE
+void mtrace_print(char *mesg)
+{
+ FILE *malloc_get_mallstream();
+ FILE *f = malloc_get_mallstream();
+
+ if (f)
+ fprintf(f, "============= %s\n", mesg);
+}
+#endif
+
+blk64_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name,
+ io_manager manager)
+{
+ struct ext2_super_block *sb;
+ io_channel io = NULL;
+ void *buf = NULL;
+ int blocksize;
+ blk64_t superblock, ret_sb = 8193;
+
+ if (fs && fs->super) {
+ ret_sb = (fs->super->s_blocks_per_group +
+ fs->super->s_first_data_block);
+ if (ctx) {
+ ctx->superblock = ret_sb;
+ ctx->blocksize = fs->blocksize;
+ }
+ return ret_sb;
+ }
+
+ if (ctx) {
+ if (ctx->blocksize) {
+ ret_sb = ctx->blocksize * 8;
+ if (ctx->blocksize == 1024)
+ ret_sb++;
+ ctx->superblock = ret_sb;
+ return ret_sb;
+ }
+ ctx->superblock = ret_sb;
+ ctx->blocksize = 1024;
+ }
+
+ if (!name || !manager)
+ goto cleanup;
+
+ if (manager->open(name, 0, &io) != 0)
+ goto cleanup;
+
+ if (ext2fs_get_mem(SUPERBLOCK_SIZE, &buf))
+ goto cleanup;
+ sb = (struct ext2_super_block *) buf;
+
+ for (blocksize = EXT2_MIN_BLOCK_SIZE;
+ blocksize <= EXT2_MAX_BLOCK_SIZE ; blocksize *= 2) {
+ superblock = blocksize*8;
+ if (blocksize == 1024)
+ superblock++;
+ io_channel_set_blksize(io, blocksize);
+ if (io_channel_read_blk64(io, superblock,
+ -SUPERBLOCK_SIZE, buf))
+ continue;
+#ifdef WORDS_BIGENDIAN
+ if (sb->s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC))
+ ext2fs_swap_super(sb);
+#endif
+ if ((sb->s_magic == EXT2_SUPER_MAGIC) &&
+ (EXT2_BLOCK_SIZE(sb) == blocksize)) {
+ ret_sb = superblock;
+ if (ctx) {
+ ctx->superblock = superblock;
+ ctx->blocksize = blocksize;
+ }
+ break;
+ }
+ }
+
+cleanup:
+ if (io)
+ io_channel_close(io);
+ if (buf)
+ ext2fs_free_mem(&buf);
+ return (ret_sb);
+}
+
+/*
+ * Given a mode, return the ext2 file type
+ */
+int ext2_file_type(unsigned int mode)
+{
+ if (LINUX_S_ISREG(mode))
+ return EXT2_FT_REG_FILE;
+
+ if (LINUX_S_ISDIR(mode))
+ return EXT2_FT_DIR;
+
+ if (LINUX_S_ISCHR(mode))
+ return EXT2_FT_CHRDEV;
+
+ if (LINUX_S_ISBLK(mode))
+ return EXT2_FT_BLKDEV;
+
+ if (LINUX_S_ISLNK(mode))
+ return EXT2_FT_SYMLINK;
+
+ if (LINUX_S_ISFIFO(mode))
+ return EXT2_FT_FIFO;
+
+ if (LINUX_S_ISSOCK(mode))
+ return EXT2_FT_SOCK;
+
+ return 0;
+}
+
+/*
+ * Check to see if a filesystem is in /proc/filesystems.
+ * Returns 1 if found, 0 if not
+ */
+int fs_proc_check(const char *fs_name)
+{
+ FILE *f;
+ char buf[80], *cp, *t;
+
+ f = fopen("/proc/filesystems", "r");
+ if (!f)
+ return (0);
+ while (!feof(f)) {
+ if (!fgets(buf, sizeof(buf), f))
+ break;
+ cp = buf;
+ if (!isspace(*cp)) {
+ while (*cp && !isspace(*cp))
+ cp++;
+ }
+ while (*cp && isspace(*cp))
+ cp++;
+ if ((t = strchr(cp, '\n')) != NULL)
+ *t = 0;
+ if ((t = strchr(cp, '\t')) != NULL)
+ *t = 0;
+ if ((t = strchr(cp, ' ')) != NULL)
+ *t = 0;
+ if (!strcmp(fs_name, cp)) {
+ fclose(f);
+ return (1);
+ }
+ }
+ fclose(f);
+ return (0);
+}
+
+/*
+ * Check to see if a filesystem is available as a module
+ * Returns 1 if found, 0 if not
+ */
+int check_for_modules(const char *fs_name)
+{
+#ifdef __linux__
+ struct utsname uts;
+ FILE *f;
+ char buf[1024], *cp, *t;
+ int i;
+
+ if (uname(&uts))
+ return (0);
+ snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release);
+
+ f = fopen(buf, "r");
+ if (!f)
+ return (0);
+ while (!feof(f)) {
+ if (!fgets(buf, sizeof(buf), f))
+ break;
+ if ((cp = strchr(buf, ':')) != NULL)
+ *cp = 0;
+ else
+ continue;
+ if ((cp = strrchr(buf, '/')) != NULL)
+ cp++;
+ else
+ cp = buf;
+ i = strlen(cp);
+ if (i > 3) {
+ t = cp + i - 3;
+ if (!strcmp(t, ".ko"))
+ *t = 0;
+ }
+ if (!strcmp(cp, fs_name)) {
+ fclose(f);
+ return (1);
+ }
+ }
+ fclose(f);
+#endif /* __linux__ */
+ return (0);
+}
+
+/*
+ * Helper function that does the right thing if write returns a
+ * partial write, or an EAGAIN/EINTR error.
+ */
+int write_all(int fd, char *buf, size_t count)
+{
+ ssize_t ret;
+ int c = 0;
+
+ while (count > 0) {
+ ret = write(fd, buf, count);
+ if (ret < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ return -1;
+ }
+ count -= ret;
+ buf += ret;
+ c += ret;
+ }
+ return c;
+}
+
+void dump_mmp_msg(struct mmp_struct *mmp, const char *fmt, ...)
+{
+ va_list pvar;
+
+ if (fmt) {
+ printf("MMP check failed: ");
+ va_start(pvar, fmt);
+ vprintf(fmt, pvar);
+ va_end(pvar);
+ }
+ if (mmp) {
+ time_t t = mmp->mmp_time;
+
+ printf("MMP_block:\n");
+ printf(" mmp_magic: 0x%x\n", mmp->mmp_magic);
+ printf(" mmp_check_interval: %d\n",
+ mmp->mmp_check_interval);
+ printf(" mmp_sequence: %08x\n", mmp->mmp_seq);
+ printf(" mmp_update_date: %s", ctime(&t));
+ printf(" mmp_update_time: %lld\n",
+ (long long) mmp->mmp_time);
+ printf(" mmp_node_name: %.*s\n",
+ EXT2_LEN_STR(mmp->mmp_nodename));
+ printf(" mmp_device_name: %.*s\n",
+ EXT2_LEN_STR(mmp->mmp_bdevname));
+ }
+}
+
+errcode_t e2fsck_mmp_update(ext2_filsys fs)
+{
+ errcode_t retval;
+
+ retval = ext2fs_mmp_update(fs);
+ if (retval == EXT2_ET_MMP_CHANGE_ABORT)
+ dump_mmp_msg(fs->mmp_cmp,
+ _("UNEXPECTED INCONSISTENCY: the filesystem is "
+ "being modified while fsck is running.\n"));
+
+ return retval;
+}
+
+void e2fsck_set_bitmap_type(ext2_filsys fs, unsigned int default_type,
+ const char *profile_name, unsigned int *old_type)
+{
+ unsigned type;
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+
+ if (old_type)
+ *old_type = fs->default_bitmap_type;
+ profile_get_uint(ctx->profile, "bitmaps", profile_name, 0,
+ default_type, &type);
+ profile_get_uint(ctx->profile, "bitmaps", "all", 0, type, &type);
+ fs->default_bitmap_type = type ? type : default_type;
+}
+
+errcode_t e2fsck_allocate_inode_bitmap(ext2_filsys fs, const char *descr,
+ int deftype,
+ const char *name,
+ ext2fs_inode_bitmap *ret)
+{
+ errcode_t retval;
+ unsigned int save_type;
+
+ e2fsck_set_bitmap_type(fs, deftype, name, &save_type);
+ retval = ext2fs_allocate_inode_bitmap(fs, descr, ret);
+ fs->default_bitmap_type = save_type;
+ return retval;
+}
+
+errcode_t e2fsck_allocate_block_bitmap(ext2_filsys fs, const char *descr,
+ int deftype,
+ const char *name,
+ ext2fs_block_bitmap *ret)
+{
+ errcode_t retval;
+ unsigned int save_type;
+
+ e2fsck_set_bitmap_type(fs, deftype, name, &save_type);
+ retval = ext2fs_allocate_block_bitmap(fs, descr, ret);
+ fs->default_bitmap_type = save_type;
+ return retval;
+}
+
+errcode_t e2fsck_allocate_subcluster_bitmap(ext2_filsys fs, const char *descr,
+ int deftype,
+ const char *name,
+ ext2fs_block_bitmap *ret)
+{
+ errcode_t retval;
+ unsigned int save_type;
+
+ e2fsck_set_bitmap_type(fs, deftype, name, &save_type);
+ retval = ext2fs_allocate_subcluster_bitmap(fs, descr, ret);
+ fs->default_bitmap_type = save_type;
+ return retval;
+}
+
+/* Return memory size in bytes */
+unsigned long long get_memory_size(void)
+{
+#if defined(_SC_PHYS_PAGES)
+# if defined(_SC_PAGESIZE)
+ return (unsigned long long)sysconf(_SC_PHYS_PAGES) *
+ (unsigned long long)sysconf(_SC_PAGESIZE);
+# elif defined(_SC_PAGE_SIZE)
+ return (unsigned long long)sysconf(_SC_PHYS_PAGES) *
+ (unsigned long long)sysconf(_SC_PAGE_SIZE);
+# endif
+#elif defined(CTL_HW)
+# if (defined(HW_MEMSIZE) || defined(HW_PHYSMEM64))
+# define CTL_HW_INT64
+# elif (defined(HW_PHYSMEM) || defined(HW_REALMEM))
+# define CTL_HW_UINT
+# endif
+ int mib[2];
+
+ mib[0] = CTL_HW;
+# if defined(HW_MEMSIZE)
+ mib[1] = HW_MEMSIZE;
+# elif defined(HW_PHYSMEM64)
+ mib[1] = HW_PHYSMEM64;
+# elif defined(HW_REALMEM)
+ mib[1] = HW_REALMEM;
+# elif defined(HW_PYSMEM)
+ mib[1] = HW_PHYSMEM;
+# endif
+# if defined(CTL_HW_INT64)
+ unsigned long long size = 0;
+# elif defined(CTL_HW_UINT)
+ unsigned int size = 0;
+# endif
+ return 0;
+#else
+# warning "Don't know how to detect memory on your platform?"
+ return 0;
+#endif
+}
diff --git a/e2fsprogs.lsm b/e2fsprogs.lsm
new file mode 100644
index 0000000..3dec8c9
--- /dev/null
+++ b/e2fsprogs.lsm
@@ -0,0 +1,16 @@
+Begin3
+Title: EXT2 Filesystem utilities
+Version: 1.47.0
+Entered-date: 2023-02-05
+Description: The filesystem utilities for the EXT2, EXT3, and EXT4
+ filesystems, including e2fsck, mke2fs, dumpe2fs, and others.
+Keywords: utilities, filesystem, Ext2fs, ext3, ext4
+Author: tytso@mit.edu (Theodore Tso)
+Maintained-by: tytso@mit.edu (Theodore Tso)
+Primary-site: ftp.kernel.org /pub/linux/kernel/people/tytso/e2fsprogs
+ 9400kB e2fsprogs-1.46.7.tar.gz
+ 1kB e2fsprogs-1.46.7.lsm
+pAlternate-site: download.sourceforge.net /pub/sourceforge/e2fsprogs
+Platforms: linux 1.2.x/1.3.x/2.0.x/2.1.x/2.2.x/2.3.x/2.4.x/2.5.x/2.6.x/3.x/4.x/5.x/6.x
+Copying-policy: GPL-2/LGPL-2
+End
diff --git a/e2fsprogs.spec b/e2fsprogs.spec
new file mode 100644
index 0000000..bdcf761
--- /dev/null
+++ b/e2fsprogs.spec
@@ -0,0 +1,244 @@
+%define _root_sbindir /sbin
+%define _root_libdir /%{_lib}
+%define _root_localedir /usr/share/locale
+%define _root_etcdir /etc
+
+Summary: Utilities for managing ext2/ext3/ext4 filesystems
+Name: e2fsprogs
+Version: 1.47.0
+Release: 0
+License: GPLv2
+Group: System Environment/Base
+Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
+Url: http://e2fsprogs.sourceforge.net/
+Prereq: /sbin/ldconfig
+BuildRoot: %{_tmppath}/%{name}-root
+
+%description
+The e2fsprogs package contains a number of utilities for creating,
+checking, modifying, and correcting any inconsistencies in ext2, ext3,
+and ext4 filesystems. E2fsprogs contains e2fsck (used to repair
+filesystem inconsistencies after an unclean shutdown), mke2fs (used to
+initialize a partition to contain an empty ext2 filesystem), debugfs
+(used to examine the internal structure of a filesystem, to manually
+repair a corrupted filesystem or to create test cases for e2fsck),
+tune2fs (used to modify filesystem parameters), resize2fs to grow and
+shrink unmounted ext2 filesystems, and most of the other core ext2fs
+filesystem utilities.
+
+You should install the e2fsprogs package if you are using any ext2,
+ext3, or ext4 filesystems (if you're not sure, you probably should
+install this package). You may also need to install it (even if you
+don't use ext2/ext3/ext4) for the libuuid and libblkid libraries and
+fsck tool that are included here.
+
+%package devel
+Summary: Ext2 filesystem-specific static libraries and headers.
+Group: Development/Libraries
+Requires: e2fsprogs = %{version}
+Prereq: /sbin/install-info
+
+%description devel
+E2fsprogs-devel contains the libraries and header files needed to
+develop ext2, ext3, or ext4 filesystem-specific programs.
+
+You should install e2fsprogs-devel if you want to develop
+ext2. ext3. or ext4 filesystem-specific programs. If you install
+e2fsprogs-devel, you'll also want to install e2fsprogs.
+
+%package -n uuidd
+Summary: helper daemon to guarantee uniqueness of time-based UUIDs
+Group: System Environment/Daemons
+License: GPLv2
+Requires: e2fsprogs = %{version}
+Requires(pre): shadow-utils
+
+%description -n uuidd
+The uuidd package contains a userspace daemon (uuidd) which guarantees
+uniqueness of time-based UUID generation even at very high rates on
+SMP systems.
+
+%prep
+%setup
+
+%build
+%configure --enable-elf-shlibs --enable-nls \
+ %{?extra_config_flags:%extra_config_flags}
+make
+make check
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export PATH=/sbin:$PATH
+make install install-libs DESTDIR="$RPM_BUILD_ROOT" \
+ root_sbindir=%{_root_sbindir} root_libdir=%{_root_libdir}
+/sbin/ldconfig -n ${RPM_BUILD_ROOT}%{_libdir}
+
+# Add a dir that uuidd needs that the Makefiles don't create
+install -d $RPM_BUILD_ROOT/var/lib/libuuid
+
+%find_lang %{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%post devel
+if [ -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
+ /sbin/install-info %{_infodir}/libext2fs.info.gz %{_infodir}/dir
+fi
+exit 0
+
+%postun devel
+if [ $1 = 0 -a -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
+ /sbin/install-info --delete %{_infodir}/libext2fs.info.gz %{_infodir}/dir
+fi
+exit 0
+
+%pre -n uuidd
+getent group uuidd >/dev/null || groupadd -r uuidd
+getent passwd uuidd >/dev/null || \
+useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
+ -c "UUID generator helper daemon" uuidd
+exit 0
+
+%files -f %{name}.lang
+%defattr(-,root,root)
+%doc README RELEASE-NOTES
+
+%{_root_sbindir}/badblocks
+%{_root_sbindir}/blkid
+%{_root_sbindir}/debugfs
+%{_root_sbindir}/dumpe2fs
+%{_root_sbindir}/e2fsck
+%{_root_sbindir}/e2image
+%{_root_sbindir}/e2label
+%{_root_sbindir}/e2mmpstatus
+%{_root_sbindir}/e2undo
+%{_root_sbindir}/findfs
+%{_root_sbindir}/fsck
+%{_root_sbindir}/fsck.ext2
+%{_root_sbindir}/fsck.ext3
+%{_root_sbindir}/fsck.ext4
+%{_root_sbindir}/fsck.ext4dev
+%{_root_sbindir}/logsave
+%{_root_sbindir}/mke2fs
+%{_root_etcdir}/mke2fs.conf
+%{_root_sbindir}/mkfs.ext2
+%{_root_sbindir}/mkfs.ext3
+%{_root_sbindir}/mkfs.ext4
+%{_root_sbindir}/mkfs.ext4dev
+%{_root_sbindir}/resize2fs
+%{_root_sbindir}/tune2fs
+%{_sbindir}/filefrag
+%{_sbindir}/mklost+found
+%{_sbindir}/e2freefrag
+
+%{_root_libdir}/libblkid.so.*
+%{_root_libdir}/libcom_err.so.*
+%{_root_libdir}/libe2p.so.*
+%{_root_libdir}/libext2fs.so.*
+%{_root_libdir}/libss.so.*
+%{_root_libdir}/libuuid.so.*
+
+%{_libdir}/e2initrd_helper
+
+%{_bindir}/chattr
+%{_bindir}/lsattr
+%{_bindir}/uuidgen
+%{_mandir}/man1/chattr.1*
+%{_mandir}/man1/lsattr.1*
+%{_mandir}/man1/uuidgen.1*
+
+%{_mandir}/man5/e2fsck.conf.5*
+%{_mandir}/man5/mke2fs.conf.5*
+
+%{_mandir}/man8/badblocks.8*
+%{_mandir}/man8/blkid.8*
+%{_mandir}/man8/debugfs.8*
+%{_mandir}/man8/dumpe2fs.8*
+%{_mandir}/man8/e2fsck.8*
+%{_mandir}/man8/findfs.8*
+%{_mandir}/man8/fsck.ext2.8*
+%{_mandir}/man8/fsck.ext3.8*
+%{_mandir}/man8/fsck.ext4.8*
+%{_mandir}/man8/fsck.ext4dev.8*
+%{_mandir}/man8/e2image.8*
+%{_mandir}/man8/e2label.8*
+%{_mandir}/man8/e2mmpstatus.8*
+%{_mandir}/man8/e2undo.8*
+%{_mandir}/man8/fsck.8*
+%{_mandir}/man8/logsave.8*
+%{_mandir}/man8/mke2fs.8*
+%{_mandir}/man8/mkfs.ext2.8*
+%{_mandir}/man8/mkfs.ext3.8*
+%{_mandir}/man8/mkfs.ext4.8*
+%{_mandir}/man8/mkfs.ext4dev.8*
+%{_mandir}/man8/mklost+found.8*
+%{_mandir}/man8/resize2fs.8*
+%{_mandir}/man8/tune2fs.8*
+%{_mandir}/man8/filefrag.8*
+%{_mandir}/man8/e2freefrag.8*
+
+%files devel
+%defattr(-,root,root)
+%{_infodir}/libext2fs.info*
+%{_bindir}/compile_et
+%{_bindir}/mk_cmds
+
+%{_libdir}/libblkid.a
+%{_libdir}/libblkid.so
+%{_libdir}/libcom_err.a
+%{_libdir}/libcom_err.so
+%{_libdir}/libe2p.a
+%{_libdir}/libe2p.so
+%{_libdir}/libext2fs.a
+%{_libdir}/libext2fs.so
+%{_libdir}/libss.a
+%{_libdir}/libss.so
+%{_libdir}/libuuid.a
+%{_libdir}/libuuid.so
+
+%{_libdir}/pkgconfig/blkid.pc
+%{_libdir}/pkgconfig/com_err.pc
+%{_libdir}/pkgconfig/e2p.pc
+%{_libdir}/pkgconfig/ext2fs.pc
+%{_libdir}/pkgconfig/ss.pc
+%{_libdir}/pkgconfig/uuid.pc
+
+%{_datadir}/et
+%{_datadir}/ss
+%{_includedir}/blkid
+%{_includedir}/e2p
+%{_includedir}/et
+%{_includedir}/com_err.h
+%{_includedir}/ext2fs
+%{_includedir}/ss
+%{_includedir}/uuid
+%{_mandir}/man1/compile_et.1*
+%{_mandir}/man1/mk_cmds.1*
+%{_mandir}/man3/com_err.3*
+%{_mandir}/man3/libblkid.3*
+%{_mandir}/man3/uuid.3*
+%{_mandir}/man3/uuid_clear.3*
+%{_mandir}/man3/uuid_compare.3*
+%{_mandir}/man3/uuid_copy.3*
+%{_mandir}/man3/uuid_generate.3*
+%{_mandir}/man3/uuid_generate_random.3*
+%{_mandir}/man3/uuid_generate_time.3*
+%{_mandir}/man3/uuid_is_null.3*
+%{_mandir}/man3/uuid_parse.3*
+%{_mandir}/man3/uuid_time.3*
+%{_mandir}/man3/uuid_unparse.3*
+
+%files -n uuidd
+%defattr(-,root,root)
+# if you want to run via init
+# /etc/init.d/uuidd
+%{_mandir}/man8/uuidd.8*
+%attr(6755, uuidd, uuidd) %{_sbindir}/uuidd
+%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
+
diff --git a/ext2ed/COPYRIGHT b/ext2ed/COPYRIGHT
new file mode 100644
index 0000000..5585eb6
--- /dev/null
+++ b/ext2ed/COPYRIGHT
@@ -0,0 +1,346 @@
+EXT2ED is hereby placed under the terms of the GNU General Public License.
+Follows the GNU license.
+
+Gadi Oxman, August 1995
+
+---------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ext2ed/Makefile.in b/ext2ed/Makefile.in
new file mode 100644
index 0000000..e4724ca
--- /dev/null
+++ b/ext2ed/Makefile.in
@@ -0,0 +1,97 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = ext2ed
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+PROGS= ext2ed
+MANPAGES= ext2ed.8
+
+DOC_DIR = $datadir/doc/ext2ed
+
+LIBS = -lncurses $(LIBEXT2FS)
+
+SRCS= $(srcdir)/main.c $(srcdir)/init.c $(srcdir)/general_com.c \
+ $(srcdir)/inode_com.c $(srcdir)/dir_com.c $(srcdir)/super_com.c \
+ $(srcdir)/disk.c $(srcdir)/win.c $(srcdir)/group_com.c \
+ $(srcdir)/file_com.c $(srcdir)/blockbitmap_com.c \
+ $(srcdir)/ext2_com.c $(srcdir)/inodebitmap_com.c
+
+OBJS= main.o init.o general_com.o inode_com.o dir_com.o super_com.o \
+ disk.o win.o group_com.o file_com.o blockbitmap_com.o ext2_com.o \
+ inodebitmap_com.o
+
+DOCS= doc/ext2ed-design.pdf doc/user-guide.pdf doc/ext2fs-overview.pdf \
+ doc/ext2ed-design.html doc/user-guide.html doc/ext2fs-overview.html
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+ $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(CPPCHECK_CMD) $(CPPFLAGS) $<
+
+.SUFFIXES: .sgml .ps .pdf .html
+
+.sgml.ps:
+ mkdir -p doc
+ sgmltools -b ps $<
+ -mv `echo $< | sed -e 's/.sgml$$/.ps/'` $@
+
+.sgml.pdf:
+ mkdir -p doc
+ sgmltools -b pdf $<
+ -mv `echo $< | sed -e 's/.sgml$$/.pdf/'` $@
+
+.sgml.html:
+ mkdir -p doc
+ sgmltools -b onehtml $<
+ -mv `echo $< | sed -e 's/.sgml$$/.html/'` $@
+
+all:: $(PROGS) $(MANPAGES) ext2ed.conf
+
+docs: $(DOCS)
+
+ext2ed: $(OBJS)
+ $(CC) $(ALL_LDFLAGS) -o ext2ed $(OBJS) $(LIBS)
+
+ext2ed.8: $(DEP_SUBSTITUTE) $(srcdir)/ext2ed.8.in
+ $(SUBSTITUTE_UPTIME) $(srcdir)/ext2ed.8.in ext2ed.8
+
+ext2ed.conf: $(DEP_SUBSTITUTE) $(srcdir)/ext2ed.conf.in
+ $(SUBSTITUTE_UPTIME) $(srcdir)/ext2ed.conf.in ext2ed.conf
+
+clean::
+ $(RM) -f ext2ed $(OBJS) $(DOCS) ext2ed.conf ext2ed.8
+ -rmdir doc
+
+install: ext2ed
+ install -d $(root_sysconfdir)
+ install -m 755 ext2ed $(sbindir)
+ install -m 644 $(srcdir)/ext2.descriptors $(datadir)
+ install -m 644 ext2ed.conf $(root_sysconfdir)
+ install -m 644 ext2ed.8 $(man8dir)
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+main.o: $(srcdir)/main.c $(srcdir)/ext2ed.h
+general_com.o: $(srcdir)/general_com.c $(srcdir)/ext2ed.h
+inode_com.o: $(srcdir)/inode_com.c $(srcdir)/ext2ed.h
+dir_com.o: $(srcdir)/dir_com.c $(srcdir)/ext2ed.h
+super_com.o: $(srcdir)/super_com.c $(srcdir)/ext2ed.h
+disk.o: $(srcdir)/disk.c $(srcdir)/ext2ed.h
+win.o: $(srcdir)/win.c $(srcdir)/ext2ed.h
+group_com.o: $(srcdir)/group_com.c $(srcdir)/ext2ed.h
+file_com.o: $(srcdir)/file_com.c $(srcdir)/ext2ed.h
+blockbitmap_com.o: $(srcdir)/blockbitmap_com.c $(srcdir)/ext2ed.h
+ext2_com.o: $(srcdir)/ext2_com.c $(srcdir)/ext2ed.h
+inodebitmap_com.o: $(srcdir)/inodebitmap_com.c $(srcdir)/ext2ed.h
diff --git a/ext2ed/README b/ext2ed/README
new file mode 100644
index 0000000..1f473cf
--- /dev/null
+++ b/ext2ed/README
@@ -0,0 +1,160 @@
+ext2ed - The extended-2 filesystem editor, version e2fsprogs
+
+
+This version of ext2ed has been modified and updated by Theodore Ts'o
+for inclusion with the e2fsprogs package. It now builds with modern
+ncurses and I've fixed various small bugs, particular in the redrawing
+and resizing functions.
+
+It is currently not built by default -- the top-level e2fsprogs
+Makefile doesn't recurse into this directory. This is because ext2ed
+has a number of VERY SERIOUS shortcomings:
+
+1) It doesn't work on filesystems bigger than 2GB
+
+2) It assumes that all's the world an Intel, and assumes that
+ everything is in Intel (little-endian) byte order.
+
+Fixing either of these problems would be non-trivial, and so I at this
+point DO NOT RECOMMEND that distributions try to include this program,
+even as modified and updated in e2fsprogs. This especially goes for
+Debian, where the Debian maintainer for e2fsprogs has a history of
+making authorized changes to e2fsprogs to include programs that aren't
+supported, and then starts bugging me with bug reports. YES I KNOW.
+THIS PROGRAM HAS HORRIBLE SHORTCOMINGS. IT IS INCLUDED HERE ONLY
+BECAUSE IT'S A CONVENIENT WAY FOR (FOR E2FSPROGS DEVELOPERS ON INTEL
+MACHINES) TO GENERATE TEST CASES BY SELECTIVELY CORRUPTING
+FILESYSTEMS. I WILL NOT SUPPORT THIS PROGRAM FOR USE BY GENERAL USERS
+SO PLEASE DO NOT INCLUDE IT IN A DISTRIBUTION.
+
+I have currently disabled the use of GNU Readline in this program,
+because readline and ncurses really don't play well together at all.
+Readline assumes that it can write arbitrary text to the screen
+(especially when it tries to print out a completion list), which just
+doesn't work with ncurses. Fixing this so they would work together
+would require wholesale changes to readline.
+
+ Theodore Ts'o
+ tytso@MIT.EDU
+ May 12, 2001
+
+----------------------------------------------------------------------------
+
+ext2ed - The extended-2 filesystem editor, version 0.2
+------------------------------------------------------
+
+This is version 0.2 of ext2ed - The extended-2 filesystem editor.
+
+Modifications on Apr 5 2001
+This is minor bug fixes to ext2ed, as of April 2001.
+It supports modern ext2 version that has file type in directory structure
+and fixes the misunderstanding between ncurses and
+readline.
+
+I first applied patches from Red Hat except the one for readline that
+rewrote a readline behavior.
+
+Globals diffs between version 0.1 and 0.2 is stored in file :
+ diff-ext2ed.1.2
+
+Christian Bac <Christian.Bac@nt-evry.fr>
+
+----------------------------------------------------------------------------
+
+Documentation
+-------------
+
+ext2ed's documentation consists of three documents:
+
+1. The user's guide.
+2. Technical overview of the ext2 filesystem.
+3. The EXT2ED design and implementation document.
+
+Those documents are available in the doc directory, in linuxdoc-sgml and
+postscript formats.
+
+The documentation is also available online at:
+
+http://tochnapc2.technion.ac.il
+
+under the ext2ed section.
+
+Installation
+------------
+
+ext2ed requires the kernel sources and the readline and ncurses packages.
+Please edit the makefile if you are using an "old" version of ncurses (See the
+details below) or if gcc can't find the various header files and libraries.
+
+To install, simply issue a 'make' command to compile and a 'make install'
+command to install. I have also included an already compiled linux a.out
+binary.
+
+ext2ed and ncurses
+------------------
+
+ext2ed uses the ncurses library for terminal output. It is very important
+that ncurses will be properly installed on your system:
+
+1. Old versions of ncurses (around 1.8.5) need the OLD_NCURSES compile
+ time option in EXT2ED.
+
+ At least from 1.9.2c, this flag should not be used. I would recommend
+ upgrading the ncurses library to the newer versions.
+
+2. ncurses uses its own terminfo database rather then the termcap file.
+ It is important that the terminfo database will be found by ncurses.
+ If this is not the case, you will see on startup some lines which
+ refer to /etc/termcap. This will mean that there is a problem with
+ the terminfo database.
+
+3. Newer versions of ncurses (and the 1.3 series of the kernel) describe
+ the linux console in the entry 'linux' and not 'console', as it was
+ before. If you run ext2ed in the linux console, you should either
+ set your TERM environment variable to 'linux' or link
+ l/linux to c/console in the terminfo database.
+
+4. The precompiled binary was linked with ncurses 1.9.4 and will search
+ for the terminfo database on /usr/local/lib/terminfo. If you are
+ using it, and your 1.9.4 compatible terminfo database is not on the
+ directory above, use the TERMINFO environment variable to specify
+ an alternate location.
+
+Running ext2ed
+--------------
+
+For those of you who don't like reading lengthy articles, here are a few
+basic guidelines:
+
+1. Don't use ext2ed to change a mounted filesystem !
+
+ Using ext2ed in read-only mode on a mounted filesystem can be allowed
+ by using the configuration file option 'AllowMountedRead on'. However,
+ note that the displayed data will be unreliable.
+
+2. ext2ed currently can't handle filesystems bigger than 2 GB. I am
+ sorry for the inconvenience. This will hopefully be fixed in future
+ releases.
+
+3. Before running ext2ed, edit the configuration file
+ /var/lib/ext2ed/ext2ed.conf to suit your needs. The various
+ configuration options are documented there.
+
+4. Use the 'setdevice' command to open an ext2 filesystem.
+ e.g. 'setdevice /dev/hda1'.
+
+5. If the filesystem is an ext2 filesystem and ext2ed fails to
+ autodetect this, use the 'ForceExt2 on' configuration file option.
+
+6. The filesystem will always be opened in read-only mode. Feel free to
+ experiment, but take care with the 'enablewrite' command.
+
+-----------------------------------------------------------------------------
+
+Feel free to send me feedback with anything regarding to ext2ed.
+
+Enjoy,
+
+Gadi Oxman <tgud@tochnapc2.technion.ac.il>
+Haifa, August 23 1995
+
diff --git a/ext2ed/blockbitmap_com.c b/ext2ed/blockbitmap_com.c
new file mode 100644
index 0000000..53e61dc
--- /dev/null
+++ b/ext2ed/blockbitmap_com.c
@@ -0,0 +1,266 @@
+/*
+
+/usr/src/ext2ed/blockbitmap_com.c
+
+A part of the extended file system 2 disk editor.
+
+-------------------------
+Handles the block bitmap.
+-------------------------
+
+This file implements the commands which are specific to the blockbitmap type.
+
+First written on: July 5 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ext2ed.h"
+
+/*
+
+The functions in this file use the flobal structure block_bitmap_info. This structure contains the current
+position in the bitmap.
+
+*/
+
+void type_ext2_block_bitmap___entry (char *command_line)
+
+/*
+
+This function changes the current entry in the bitmap. It just changes the entry_num variable in block_bitmap_info
+and dispatches a show command to show the new entry.
+
+*/
+
+{
+ unsigned long entry_num;
+ char *ptr,buffer [80];
+
+
+
+ ptr=parse_word (command_line,buffer); /* Get the requested entry */
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");
+ refresh_command_win (); return;
+ }
+ ptr=parse_word (ptr,buffer);
+
+ entry_num=atol (buffer);
+
+
+ if (entry_num >= file_system_info.super_block.s_blocks_per_group) { /* Check if it is a valid entry number */
+
+ wprintw (command_win,"Error - Entry number out of bounds\n");
+ refresh_command_win ();return;
+ }
+
+
+
+ block_bitmap_info.entry_num=entry_num; /* If it is, just change entry_num and */
+ strcpy (buffer,"show");dispatch (buffer); /* dispatch a show command */
+}
+
+void type_ext2_block_bitmap___next (char *command_line)
+
+/*
+
+This function passes to the next entry in the bitmap. We just call the above entry command.
+
+*/
+
+{
+ long entry_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ entry_offset=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",block_bitmap_info.entry_num+entry_offset);
+ dispatch (buffer);
+}
+
+void type_ext2_block_bitmap___prev (char *command_line)
+
+{
+ long entry_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ entry_offset=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",block_bitmap_info.entry_num-entry_offset);
+ dispatch (buffer);
+}
+
+void type_ext2_block_bitmap___allocate (char *command_line)
+
+/*
+
+This function starts allocating block from the current position. Allocating involves setting the correct bits
+in the bitmap. This function is a vector version of allocate_block below - We just run on the blocks that
+we need to allocate, and call allocate_block for each one.
+
+*/
+
+{
+ long entry_num,num=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer); /* Get the number of blocks to allocate */
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ num=atol (buffer);
+ }
+
+ entry_num=block_bitmap_info.entry_num;
+ /* Check for limits */
+ if (num > file_system_info.super_block.s_blocks_per_group-entry_num) {
+ wprintw (command_win,"Error - There aren't that much blocks in the group\n");
+ refresh_command_win ();return;
+ }
+
+ while (num) { /* And call allocate_block */
+ allocate_block (entry_num); /* for each block */
+ num--;entry_num++;
+ }
+
+ dispatch ("show"); /* Show the result */
+}
+
+void type_ext2_block_bitmap___deallocate (char *command_line)
+
+/* This is the opposite of the above function - We call deallocate_block instead of allocate_block */
+
+{
+ long entry_num,num=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ num=atol (buffer);
+ }
+
+ entry_num=block_bitmap_info.entry_num;
+ if (num > file_system_info.super_block.s_blocks_per_group-entry_num) {
+ wprintw (command_win,"Error - There aren't that much blocks in the group\n");
+ refresh_command_win ();return;
+ }
+
+ while (num) {
+ deallocate_block (entry_num);
+ num--;entry_num++;
+ }
+
+ dispatch ("show");
+}
+
+
+void allocate_block (long entry_num)
+
+/* In this function we convert the bit number into the right byte and inner bit positions. */
+
+{
+ unsigned char bit_mask=1;
+ int byte_offset,j;
+
+ byte_offset=entry_num/8; /* Find the correct byte - entry_num/8 */
+ /* The position inside the byte is entry_num %8 */
+ for (j=0;j<entry_num%8;j++)
+ bit_mask*=2; /* Generate the or mask - 1 at the right place */
+ type_data.u.buffer [byte_offset] |= bit_mask; /* And apply it */
+}
+
+void deallocate_block (long entry_num)
+
+/* This is the opposite of allocate_block above. We use an and mask instead of an or mask. */
+
+{
+ unsigned char bit_mask=1;
+ int byte_offset,j;
+
+ byte_offset=entry_num/8;
+ for (j=0;j<entry_num%8;j++)
+ bit_mask*=2;
+ bit_mask^=0xff;
+
+ type_data.u.buffer [byte_offset] &= bit_mask;
+}
+
+void type_ext2_block_bitmap___show (char *command_line)
+
+/*
+
+We show the bitmap as a series of bits, grouped at 8-bit intervals. We display 8 such groups on each line.
+The current position (as known from block_bitmap_info.entry_num) is highlighted.
+
+*/
+
+{
+ int i,j;
+ unsigned char *ptr;
+ unsigned long block_num,entry_num;
+
+ ptr=type_data.u.buffer;
+ show_pad_info.line=0;show_pad_info.max_line=-1;
+
+ wmove (show_pad,0,0);
+ for (i=0,entry_num=0;i<file_system_info.super_block.s_blocks_per_group/8;i++,ptr++) {
+ for (j=1;j<=128;j*=2) { /* j contains the and bit mask */
+ if (entry_num==block_bitmap_info.entry_num) { /* Highlight the current entry */
+ wattrset (show_pad,A_REVERSE);
+ show_pad_info.line=show_pad_info.max_line-show_pad_info.display_lines/2;
+ }
+
+ if ((*ptr) & j) /* Apply the mask */
+ wprintw (show_pad,"1");
+ else
+ wprintw (show_pad,"0");
+
+ if (entry_num==block_bitmap_info.entry_num)
+ wattrset (show_pad,A_NORMAL);
+
+ entry_num++; /* Pass to the next entry */
+ }
+ wprintw (show_pad," ");
+ if (i%8==7) { /* Display 8 groups in a row */
+ wprintw (show_pad,"\n");
+ show_pad_info.max_line++;
+ }
+ }
+
+ refresh_show_pad ();
+ show_info (); /* Show the usual information */
+
+ /* Show the group number */
+ wmove (show_win,1,0);
+ wprintw (show_win,"Block bitmap of block group %ld\n",block_bitmap_info.group_num);
+ /* Show the block number */
+
+ block_num=block_bitmap_info.entry_num+block_bitmap_info.group_num*file_system_info.super_block.s_blocks_per_group;
+ block_num+=file_system_info.super_block.s_first_data_block;
+
+ wprintw (show_win,"Status of block %ld - ",block_num); /* and the allocation status */
+ ptr=type_data.u.buffer+block_bitmap_info.entry_num/8;
+ j=1;
+ for (i=block_bitmap_info.entry_num % 8;i>0;i--)
+ j*=2;
+ if ((*ptr) & j)
+ wprintw (show_win,"Allocated\n");
+ else
+ wprintw (show_win,"Free\n");
+ refresh_show_win ();
+}
diff --git a/ext2ed/dir_com.c b/ext2ed/dir_com.c
new file mode 100644
index 0000000..67bb4b5
--- /dev/null
+++ b/ext2ed/dir_com.c
@@ -0,0 +1,678 @@
+/*
+
+/usr/src/ext2ed/dir_com.c
+
+A part of the extended file system 2 disk editor.
+
+--------------------
+Handles directories.
+--------------------
+
+This file contains the codes which allows the user to handle directories.
+
+Most of the functions use the global variable file_info (along with the special directory fields there) to save
+information and pass it between them.
+
+Since a directory is just a big file which is composed of directory entries, you will find that
+the functions here are a superset of those in the file_com.c source.
+
+We assume that the user reached here using the dir command of the inode type and not by using settype dir, so
+that init_dir_info is indeed called to gather the required information.
+
+type_data is not changed! It still contains the inode of the file - We handle the directory in our own
+variables, so that settype ext2_inode will "go back" to the inode of this directory.
+
+First written on: April 28 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ext2ed.h"
+
+char name_search [80];
+long entry_num_search;
+
+int init_dir_info (struct struct_file_info *info_ptr)
+
+/*
+
+This function is called by the inode of the directory when the user issues the dir command from the inode.
+It is used to gather information about the inode and to reset some variables which we need in order to handle
+directories.
+
+*/
+
+{
+ struct ext2_inode *ptr;
+
+ ptr=&type_data.u.t_ext2_inode; /* type_data contains the inode */
+
+ info_ptr->inode_ptr=ptr;
+ info_ptr->inode_offset=device_offset; /* device offset contains the inode's offset */
+
+ /* Reset the current position to the start */
+
+ info_ptr->global_block_num=ptr->i_block [0];
+ info_ptr->global_block_offset=ptr->i_block [0]*file_system_info.block_size;
+ info_ptr->block_num=0;
+ info_ptr->file_offset=0;
+ /* Set the size of the directory */
+
+ info_ptr->blocks_count=(ptr->i_size+file_system_info.block_size-1)/file_system_info.block_size;
+ info_ptr->file_length=ptr->i_size;
+
+ info_ptr->level=0; /* We start using direct blocks */
+ info_ptr->display=HEX; /* This is not actually used */
+
+ info_ptr->dir_entry_num=0;info_ptr->dir_entries_count=0; /* We'll start at the first directory entry */
+ info_ptr->dir_entry_offset=0;
+
+ /* Find dir_entries_count */
+
+ info_ptr->dir_entries_count=count_dir_entries (); /* Set the total number of entries */
+
+ return (1);
+}
+
+struct struct_file_info search_dir_entries (int (*action) (struct struct_file_info *info),int *status)
+
+/*
+ This is the main function in this source file. Various actions are implemented using this basic function.
+
+ This routine runs on all directory entries in the current directory.
+ For each entry, action is called. We'll act according to the return code of action:
+
+ ABORT - Current dir entry is returned.
+ CONTINUE - Continue searching.
+ FOUND - Current dir entry is returned.
+
+ If the last entry is reached, it is returned, along with an ABORT status.
+
+ status is updated to the returned code of action.
+*/
+
+{
+ struct struct_file_info info; /* Temporary variables used to */
+ struct ext2_dir_entry_2 *dir_entry_ptr; /* contain the current search entries */
+ int return_code, next;
+
+ info=first_file_info; /* Start from the first entry - Read it */
+ low_read (info.buffer,file_system_info.block_size,info.global_block_offset);
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (info.buffer+info.dir_entry_offset);
+
+ while (info.file_offset < info.file_length) { /* While we haven't reached the end */
+
+ *status=return_code=action (&info); /* Call the client function to test */
+ /* the current entry */
+ if (return_code==ABORT || return_code==FOUND)
+ return (info); /* Stop, if so asked */
+
+ /* Pass to the next entry */
+
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (info.buffer+info.dir_entry_offset);
+
+ info.dir_entry_num++;
+ next = dir_entry_ptr->rec_len;
+ if (!next)
+ next = file_system_info.block_size - info.dir_entry_offset;
+ info.dir_entry_offset += next;
+ info.file_offset += next;
+
+ if (info.file_offset >= info.file_length) break;
+
+ if (info.dir_entry_offset >= file_system_info.block_size) { /* We crossed a block boundary */
+ /* Find the next block, */
+ info.block_num++;
+ info.global_block_num=file_block_to_global_block (info.block_num,&info);
+ info.global_block_offset=info.global_block_num*file_system_info.block_size;
+ info.file_offset=info.block_num*file_system_info.block_size;
+ info.dir_entry_offset=0;
+ /* read it and update the pointer */
+
+ low_read (info.buffer,file_system_info.block_size,info.global_block_offset);
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (info.buffer+info.dir_entry_offset);
+
+ }
+
+ }
+
+ *status=ABORT;return (info); /* There was no match */
+}
+
+long count_dir_entries (void)
+
+/*
+
+This function counts the number of entries in the directory. We just call search_dir_entries till the end.
+The client function is action_count, which just tell search_dir_entries to continue.
+
+*/
+
+{
+ int status;
+
+ return (search_dir_entries (&action_count,&status).dir_entry_num);
+}
+
+int action_count (struct struct_file_info *info)
+
+/*
+
+Used by count_dir_entries above - This function is called by search_dir_entries, and it tells it to continue
+searching, until we get to the last entry.
+
+*/
+
+{
+ return (CONTINUE); /* Just continue searching */
+}
+
+void type_dir___cd (char *command_line)
+
+/*
+ Changes to a directory, relative to the current directory.
+
+ This is a complicated operation, so I would repeat here the explanation from the design and
+ implementation document.
+
+1. The path is checked that it is not an absolute path (from /). If it is, we let the general cd to do the job by
+ calling directly type_ext2___cd.
+
+2. The path is divided into the nearest path and the rest of the path. For example, cd 1/2/3/4 is divided into
+ 1 and into 2/3/4.
+
+3. It is the first part of the path that we need to search for in the current directory. We search for it using
+ search_dir_entries, which accepts the action_name function as the client function.
+
+4. search_dir_entries will scan the entire entries and will call our action_name function for each entry.
+ In action_name, the required name will be checked against the name of the current entry, and FOUND will be
+ returned when a match occurs.
+
+5. If the required entry is found, we dispatch a remember command to insert the current inode (remember that
+ type_data is still intact and contains the inode of the current directory) into the object memory.
+ This is required to easily support symbolic links - If we find later that the inode pointed by the entry is
+ actually a symbolic link, we'll need to return to this point, and the above inode doesn't have (and can't have,
+ because of hard links) the information necessary to "move back".
+
+6. We then dispatch a followinode command to reach the inode pointed by the required entry. This command will
+ automatically change the type to ext2_inode - We are now at an inode, and all the inode commands are available.
+
+7. We check the inode's type to see if it is a directory. If it is, we dispatch a dir command to "enter the directory",
+ and recursively call ourself (The type is dir again) by dispatching a cd command, with the rest of the path
+ as an argument.
+
+8. If the inode's type is a symbolic link (only fast symbolic link were meanwhile implemented. I guess this is
+ typically the case.), we note the path it is pointing at, the saved inode is recalled, we dispatch dir to
+ get back to the original directory, and we call ourself again with the link path/rest of the path argument.
+
+9. In any other case, we just stop at the resulting inode.
+
+*/
+
+{
+ int status;
+ char *ptr,full_dir_name [500],dir_name [500],temp [500],temp2 [500];
+ struct struct_file_info info;
+ struct ext2_dir_entry_2 *dir_entry_ptr;
+
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (file_info.buffer+file_info.dir_entry_offset);
+
+ ptr=parse_word (command_line,dir_name);
+
+ if (*ptr==0) { /* cd alone will enter the highlighted directory */
+ strncpy (full_dir_name,dir_entry_ptr->name,dir_entry_ptr->name_len);
+ full_dir_name [dir_entry_ptr->name_len]=0;
+ }
+ else
+ ptr=parse_word (ptr,full_dir_name);
+
+ ptr=strchr (full_dir_name,'/');
+
+ if (ptr==full_dir_name) { /* Pathname is from root - Let the general cd do the job */
+ sprintf (temp,"cd %s",full_dir_name);type_ext2___cd (temp);return;
+ }
+
+ if (ptr==NULL) {
+ strcpy (dir_name,full_dir_name);
+ full_dir_name [0]=0;
+ }
+
+ else {
+ strncpy (dir_name,full_dir_name,ptr-full_dir_name);
+ dir_name [ptr-full_dir_name]=0;
+ strcpy (full_dir_name,++ptr);
+ }
+ /* dir_name contains the current entry, while */
+ /* full_dir_name contains the rest */
+
+ strcpy (name_search,dir_name); /* name_search is used to hold the required entry name */
+
+ if (dir_entry_ptr->name_len != strlen (dir_name) ||
+ strncmp (dir_name,dir_entry_ptr->name,dir_entry_ptr->name_len)!=0)
+ info=search_dir_entries (&action_name,&status); /* Search for the entry. Answer in info. */
+ else {
+ status=FOUND;info=file_info;
+ }
+
+ if (status==FOUND) { /* If found */
+ file_info=info; /* Switch to it, by setting the global file_info */
+ dispatch ("remember internal_variable"); /* Move the inode into the objects memory */
+
+ dispatch ("followinode"); /* Go to the inode pointed by this directory entry */
+
+ if (S_ISLNK (type_data.u.t_ext2_inode.i_mode)) {/* Symbolic link ? */
+
+ if (type_data.u.t_ext2_inode.i_size > 60) { /* I'm lazy, I guess :-) */
+ wprintw (command_win,"Error - Sorry, Only fast symbolic link following is currently supported\n");
+ refresh_command_win ();
+ return;
+ }
+ /* Get the pointed name and append the previous path */
+
+ strcpy (temp2,(unsigned char *) &type_data.u.t_ext2_inode.i_block);
+ strcat (temp2,"/");
+ strcat (temp2,full_dir_name);
+
+ dispatch ("recall internal_variable"); /* Return to the original inode */
+ dispatch ("dir"); /* and to the directory */
+
+ sprintf (temp,"cd %s",temp2); /* And continue from there by dispatching a cd command */
+ dispatch (temp); /* (which can call ourself or the general cd) */
+
+ return;
+ }
+
+ if (S_ISDIR (type_data.u.t_ext2_inode.i_mode)) { /* Is it an inode of a directory ? */
+
+ dispatch ("dir"); /* Yes - Pass to the pointed directory */
+
+ if (full_dir_name [0] != 0) { /* And call ourself with the rest of the pathname */
+ sprintf (temp,"cd %s",full_dir_name);
+ dispatch (temp);
+ }
+
+ return;
+ }
+
+ else { /* If we can't continue from here, we'll just stop */
+ wprintw (command_win,"Can\'t continue - Stopping at last inode\n");refresh_command_win ();
+ return;
+ }
+ }
+
+ wprintw (command_win,"Error - Directory entry %s not found.\n",dir_name); /* Hmm, an invalid path somewhere */
+ refresh_command_win ();
+}
+
+int action_name (struct struct_file_info *info)
+
+/*
+
+Compares the current search entry name (somewhere inside info) with the required name (in name_search).
+Returns FOUND if found, or CONTINUE if not found.
+
+*/
+
+{
+ struct ext2_dir_entry_2 *dir_entry_ptr;
+
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (info->buffer+info->dir_entry_offset);
+
+ if (dir_entry_ptr->name_len != strlen (name_search))
+ return (CONTINUE);
+
+ if (strncmp (dir_entry_ptr->name,name_search,dir_entry_ptr->name_len)==0)
+ return (FOUND);
+
+ return (CONTINUE);
+}
+
+void type_dir___entry (char *command_line)
+
+/*
+
+Selects a directory entry according to its number.
+search_dir_entries is used along with action_entry_num, in the same fashion as the previous usage of search_dir_entries.
+
+*/
+
+{
+ int status;
+ struct struct_file_info info;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Argument_not_specified\n");wrefresh (command_win);
+ return;
+ }
+ ptr=parse_word (ptr,buffer);
+ entry_num_search=atol (buffer);
+
+ if (entry_num_search < 0 || entry_num_search >= file_info.dir_entries_count) {
+ wprintw (command_win,"Error - Entry number out of range\n");wrefresh (command_win);
+ return;
+ }
+
+ info=search_dir_entries (&action_entry_num,&status);
+ if (status==FOUND) {
+ file_info=info;
+ dispatch ("show");
+ return;
+ }
+#ifdef DEBUG
+ internal_error ("dir_com","type_dir___entry","According to our gathered data, we should have found this entry");
+#endif
+}
+
+int action_entry_num (struct struct_file_info *info)
+
+/*
+
+Used by the above function. Just compares the current number (in info) with the required one.
+
+*/
+
+{
+ if (info->dir_entry_num == entry_num_search)
+ return (FOUND);
+
+ return (CONTINUE);
+}
+
+void type_dir___followinode (char *command_line)
+
+/*
+
+Here we pass to the inode pointed by the current entry.
+It involves computing the device offset of the inode and using directly the setoffset and settype commands.
+
+*/
+{
+ long inode_offset;
+ char buffer [80];
+
+ struct ext2_dir_entry_2 *dir_entry_ptr;
+
+ low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (file_info.buffer+file_info.dir_entry_offset);
+
+ inode_offset=inode_num_to_inode_offset (dir_entry_ptr->inode); /* Compute the inode's offset */
+ sprintf (buffer,"setoffset %ld",inode_offset);dispatch (buffer); /* Move to it */
+ sprintf (buffer,"settype ext2_inode");dispatch (buffer); /* and set the type to an inode */
+}
+
+void type_dir___inode (char *command_line)
+
+/*
+
+Returns to the parent inode of the current directory.
+This is trivial, as we type_data is still intact and contains the parent inode !
+
+*/
+
+{
+ dispatch ("settype ext2_inode");
+}
+
+
+void type_dir___show (char *command_line)
+
+/*
+
+We use search_dir_entries to run on all the entries. Each time, action_show will be called to show one entry.
+
+*/
+
+{
+ int status;
+
+ wmove (show_pad,0,0);
+ show_pad_info.max_line=-1;
+
+ search_dir_entries (&action_show,&status);
+ show_pad_info.line=file_info.dir_entry_num-show_pad_info.display_lines/2;
+ refresh_show_pad ();
+ show_dir_status ();
+}
+
+int action_show (struct struct_file_info *info)
+
+/*
+
+Show the current search entry (info) in one line. If the entry happens to be the current edited entry, it is highlighted.
+
+*/
+
+{
+ unsigned char temp [80];
+ struct ext2_dir_entry_2 *dir_entry_ptr;
+
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (info->buffer+info->dir_entry_offset);
+
+ if (info->dir_entry_num == file_info.dir_entry_num) /* Highlight the current entry */
+ wattrset (show_pad,A_REVERSE);
+
+ strncpy (temp,dir_entry_ptr->name,dir_entry_ptr->name_len); /* The name is not terminated */
+ temp [dir_entry_ptr->name_len]=0;
+ if (dir_entry_ptr->name_len > (COLS - 55) && COLS > 55)
+ temp [COLS-55]=0;
+ wprintw (show_pad,"inode = %-8lu rec_len = %-4lu name_len = %-3lu name = %s\n", /* Display the various fields */
+ dir_entry_ptr->inode,dir_entry_ptr->rec_len,dir_entry_ptr->name_len,temp);
+
+ show_pad_info.max_line++;
+
+ if (info->dir_entry_num == file_info.dir_entry_num)
+ wattrset (show_pad,A_NORMAL);
+
+ return (CONTINUE); /* And pass to the next */
+}
+
+void type_dir___next (char *command_line)
+
+/*
+
+This function moves to the next directory entry. It just uses the current information and the entry command.
+
+*/
+
+{
+ int offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ offset*=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",file_info.dir_entry_num+offset);dispatch (buffer);
+
+}
+
+void type_dir___prev (char *command_line)
+
+{
+ int offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ offset*=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",file_info.dir_entry_num-offset);dispatch (buffer);
+}
+
+void show_dir_status (void)
+
+/*
+
+Various statistics about the directory.
+
+*/
+
+{
+ long inode_num;
+
+ wmove (show_win,0,0);
+ wprintw (show_win,"Directory listing. Block %ld. ",file_info.global_block_num);
+ wprintw (show_win,"Directory entry %ld of %ld.\n",file_info.dir_entry_num,file_info.dir_entries_count-1);
+ wprintw (show_win,"Directory Offset %ld of %ld. ",file_info.file_offset,file_info.file_length-1);
+
+ inode_num=inode_offset_to_inode_num (file_info.inode_offset);
+ wprintw (show_win,"File inode %ld. Indirection level %ld.\n",inode_num,file_info.level);
+
+ refresh_show_win ();
+}
+
+void type_dir___remember (char *command_line)
+
+/*
+
+This is overridden here because we don't remember a directory - It is too complicated. Instead, we remember the
+inode of the current directory.
+
+*/
+
+{
+ int found=0;
+ long entry_num;
+ char *ptr,buffer [80];
+ struct struct_descriptor *descriptor_ptr;
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Argument not specified\n");wrefresh (command_win);
+ return;
+ }
+
+ ptr=parse_word (ptr,buffer);
+
+ entry_num=remember_lifo.entries_count++;
+ if (entry_num>REMEMBER_COUNT-1) {
+ entry_num=0;
+ remember_lifo.entries_count--;
+ }
+
+ descriptor_ptr=first_type;
+ while (descriptor_ptr!=NULL && !found) {
+ if (strcmp (descriptor_ptr->name,"ext2_inode")==0)
+ found=1;
+ else
+ descriptor_ptr=descriptor_ptr->next;
+ }
+
+
+ remember_lifo.offset [entry_num]=device_offset;
+ remember_lifo.type [entry_num]=descriptor_ptr;
+ strcpy (remember_lifo.name [entry_num],buffer);
+
+ wprintw (command_win,"Object %s in Offset %ld remembered as %s\n",descriptor_ptr->name,device_offset,buffer);
+ wrefresh (command_win);
+}
+
+void type_dir___set (char *command_line)
+
+/*
+
+Since the dir object doesn't have variables, we provide the impression that it has here. ext2_dir_entry was not used
+because it is of variable length.
+
+*/
+
+{
+ int found=0;
+ unsigned char *ptr,buffer [80],variable [80],value [80],temp [80];
+ struct ext2_dir_entry_2 *dir_entry_ptr;
+
+ dir_entry_ptr=(struct ext2_dir_entry_2 *) (file_info.buffer+file_info.dir_entry_offset);
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Missing arguments\n");refresh_command_win ();
+ return;
+ }
+ parse_word (ptr,buffer);
+ ptr=strchr (buffer,'=');
+ if (ptr==NULL) {
+ wprintw (command_win,"Error - Bad syntax\n");refresh_command_win ();return;
+ }
+ strncpy (variable,buffer,ptr-buffer);variable [ptr-buffer]=0;
+ strcpy (value,++ptr);
+
+ if (strcasecmp ("inode",variable)==0) {
+ found=1;
+ dir_entry_ptr->inode=atol (value);
+ wprintw (command_win,"Variable %s set to %lu\n",variable,dir_entry_ptr->inode);refresh_command_win ();
+
+ }
+
+ if (strcasecmp ("rec_len",variable)==0) {
+ found=1;
+ dir_entry_ptr->rec_len=(unsigned int) atol (value);
+ wprintw (command_win,"Variable %s set to %lu\n",variable,dir_entry_ptr->rec_len);refresh_command_win ();
+
+ }
+
+ if (strcasecmp ("name_len",variable)==0) {
+ found=1;
+ dir_entry_ptr->name_len=(unsigned int) atol (value);
+ wprintw (command_win,"Variable %s set to %lu\n",variable,dir_entry_ptr->name_len);refresh_command_win ();
+
+ }
+
+ if (strcasecmp ("name",variable)==0) {
+ found=1;
+ if (strlen (value) > dir_entry_ptr->name_len) {
+ wprintw (command_win,"Error - Length of name greater then name_len\n");
+ refresh_command_win ();return;
+ }
+ strncpy (dir_entry_ptr->name,value,strlen (value));
+ wprintw (command_win,"Variable %s set to %s\n",variable,value);refresh_command_win ();
+
+ }
+
+ if (found) {
+ wattrset (show_pad,A_REVERSE);
+ strncpy (temp,dir_entry_ptr->name,dir_entry_ptr->name_len);
+ temp [dir_entry_ptr->name_len]=0;
+ wmove (show_pad,file_info.dir_entry_num,0);
+ wprintw (show_pad,"inode = %-8lu rec_len = %-4lu name_len = %-3lu name = %s\n",
+ dir_entry_ptr->inode,dir_entry_ptr->rec_len,dir_entry_ptr->name_len,temp);
+ wattrset (show_pad,A_NORMAL);
+ show_pad_info.line=file_info.dir_entry_num-show_pad_info.display_lines/2;
+ refresh_show_pad ();
+ show_dir_status ();
+ }
+
+ else {
+ wprintw (command_win,"Error - Variable %s not found\n",variable);
+ refresh_command_win ();
+ }
+
+}
+
+void type_dir___writedata (char *command_line)
+
+/*
+
+We need to override this since the data is not in type_data. Instead, we have to write the buffer which corresponds
+to the current block.
+
+*/
+
+{
+ low_write (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
+ return;
+}
diff --git a/ext2ed/disk.c b/ext2ed/disk.c
new file mode 100644
index 0000000..4612d00
--- /dev/null
+++ b/ext2ed/disk.c
@@ -0,0 +1,239 @@
+/*
+
+/usr/src/ext2ed/disk.c
+
+A part of the extended file system 2 disk editor.
+
+-------------------------------------------------
+The filesystem's disk activity pass through here.
+-------------------------------------------------
+
+This file is acting as a filter - Before we pass an actual read or write request to the operating system, we
+double check the various permissions and possible errors here.
+
+The major update which needs to be done here is switching to the use of the llseek system call, so that we will
+be able to support ext2 filesystems up to 4 TB. Currently, due to the standard fseek usage, we can't handle
+filesystems bigger than 4 GB. The limit is actually 2 GB because I used long rather than unsigned long long at too
+many places in the program. To conclude - This upgrade needs to be done carefully; There are many places to change.
+
+First written on: April 9 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "ext2ed.h"
+
+int write_access;
+
+int low_read (unsigned char *buffer,unsigned long length,unsigned long offset)
+
+/*
+
+This function is used when we need to read something from the filesystem.
+
+*/
+
+{
+
+#ifdef DEBUG
+
+ char temp [80];
+
+ if (device_handle==NULL) { /* Check that a device is indeed open */
+ internal_error ("No device opened yet read requested","disk","low_read");
+ return (0);
+ }
+ if (offset > file_system_info.file_system_size) { /* Check that the offset is within limits */
+ sprintf (temp,"Seek offset %ld is out of range",offset);
+ internal_error (temp,"disk","low_read");
+ return (0);
+ }
+
+#endif
+
+ if ( (fseek (device_handle,offset,SEEK_SET))==-1) { /* Seek to the required offset */
+ wprintw (command_win,"Error - Failed to seek to offset %ld in device %s\n",offset,device_name);
+ refresh_command_win ();
+ return (0);
+ };
+
+ if ( (fread (buffer,1,length,device_handle))==-1) { /* And do the actual reading */
+ wprintw (command_win,"Error - Failed to read from offset %ld in device %s\n",offset,device_name);
+ refresh_command_win ();return (0);
+ };
+
+ return (1);
+}
+
+int low_write (unsigned char *buffer,unsigned long length,unsigned long offset)
+
+/*
+
+This is used to change something in the filesystem.
+write_access is checked to see if we are allowed to do the actual writing.
+As a double safety measure, AllowChanges is rechecked here.
+If logging is enabled, we log the change before writing it to the device.
+
+*/
+{
+ char temp [80];
+
+ if (!write_access) {
+ wprintw (command_win,"Error - Write access not available (use enablewrite)\n");
+ return (0);
+ }
+
+#ifdef DEBUG
+
+ if (!AllowChanges) {
+ internal_error ("AllowChanges=0 yet enablewrite succeeded","disk","low_write");
+ return (0);
+ }
+
+ if (device_handle==NULL) {
+ internal_error ("No device opened yet read requested","disk","low_write");
+ return (0);
+ }
+
+ if (offset > file_system_info.file_system_size) {
+ sprintf (temp,"Seek offset %ld is out of range",offset);
+ internal_error (temp,"disk","low_write");
+ return (0);
+ }
+
+#endif
+
+ if (LogChanges)
+ if (!log_changes (buffer,length,offset))
+ return (0);
+
+ if ( (fseek (device_handle,offset,SEEK_SET))==-1) {
+ wprintw (command_win,"Error - Failed to seek to offset %ld in device %s\n",offset,device_name);
+ refresh_command_win ();return (0);
+ };
+
+
+ if ( (fwrite (buffer,1,length,device_handle))==-1) {
+ wprintw (command_win,"Error - Failed to write to offset %ld in device %s\n",offset,device_name);
+ refresh_command_win ();return (0);
+ };
+
+ wprintw (command_win,"Data written");refresh_command_win ();
+ return (1);
+}
+
+int log_changes (unsigned char *buffer,unsigned long length,unsigned long offset)
+
+/*
+
+Log the change in a primitive form - An hex dump of the data before the change and after the change.
+The hex bytes are converted to text, so that they will be readable with a standard text editor.
+
+*/
+
+{
+ unsigned char *original;
+
+ int i;
+ time_t current_time;
+ FILE *fp;
+
+ if ((fp=fopen (LogFile,"a+"))==NULL) {
+ wprintw (command_win,"Error - Unable to open log file %s\n",LogFile);
+ refresh_command_win ();return (0);
+ };
+
+ current_time=time (NULL);
+
+ fprintf (fp,"\n----- EXT2ED log begin -----\n\n");
+ fprintf (fp,"Time: %s\nDevice: %s\n",ctime ((time_t *) &current_time),device_name);
+ fprintf (fp,"Offset: %lu\nLength: %lu\n",offset,length);
+
+ original=(unsigned char *) malloc (length*sizeof (unsigned char));
+
+ if (original==NULL) {
+ wprintw (command_win,"Fatal error - Can\'t allocate %lu bytes!");
+ refresh_command_win ();fclose (fp);return (0);
+ }
+
+ if (!low_read (original,length,offset)) {
+ fclose (fp);return (0);
+ }
+
+ fprintf (fp,"\nOriginal data:\n\n");
+
+ for (i=0;i<length;i++) {
+ if (i%16==0 && i!=0) fprintf (fp,"\n");
+ fprintf (fp,"%02x ",original [i]);
+ }
+
+ fprintf (fp,"\n\nNew data:\n\n");
+
+ for (i=0;i<length;i++) {
+ if (i%16==0 && i!=0) fprintf (fp,"\n");
+ fprintf (fp,"%02x ",buffer [i]);
+ }
+
+ fprintf (fp,"\n----- EXT2ED log end -----\n");
+
+ fclose (fp);
+ return (1);
+}
+
+int load_type_data (void)
+
+/*
+
+Just read from the current position into type data.
+
+*/
+
+{
+ if (device_handle==NULL) {
+ printf ("Error - No device opened\n");
+ return (0);
+ }
+
+ if (device_offset==-1) {
+ printf ("Error - No offset set\n");
+ return (0);
+ }
+
+ if (low_read (type_data.u.buffer,EXT2_MAX_BLOCK_SIZE,device_offset)==0)
+ return (0);
+
+ if (current_type!=NULL)
+ if (strcmp (current_type->name,"ext2_dir_entry")==0)
+ current_type->length=type_data.u.t_ext2_dir_entry.rec_len;
+
+ return (1);
+}
+
+int write_type_data (void)
+
+{
+ if (device_handle==NULL) {
+ wprintw (command_win,"Error - No device opened\n");
+ refresh_command_win ();
+ return (0);
+ }
+
+ if (device_offset==-1) {
+ wprintw (command_win,"Error - No offset set\n");
+ refresh_command_win ();
+ return (0);
+ }
+
+ if (low_write (type_data.u.buffer,file_system_info.block_size,device_offset)==0)
+ return (0);
+
+ return (1);
+}
+
diff --git a/ext2ed/doc/ext2ed-design.sgml b/ext2ed/doc/ext2ed-design.sgml
new file mode 100644
index 0000000..b2cab37
--- /dev/null
+++ b/ext2ed/doc/ext2ed-design.sgml
@@ -0,0 +1,3459 @@
+<!DOCTYPE Article PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
+
+<Article>
+
+<ArtHeader>
+
+<Title>EXT2ED - The Extended-2 filesystem editor - Design and implementation</Title>
+<AUTHOR
+>
+<FirstName>Programmed by Gadi Oxman, with the guide of Avner Lottem</FirstName>
+</AUTHOR
+>
+<PubDate>v0.1, August 3 1995</PubDate>
+
+</ArtHeader>
+
+<Sect1>
+<Title>About EXT2ED documentation</Title>
+
+<Para>
+The EXT2ED documentation consists of three parts:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The ext2 filesystem overview.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The EXT2ED user's guide.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The EXT2ED design and implementation.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+This document is not the user's guide. If you just intend to use EXT2ED, you
+may not want to read it.
+</Para>
+
+<Para>
+However, if you intend to browse and modify the source code, this document is
+for you.
+</Para>
+
+<Para>
+In any case, If you intend to read this article, I strongly suggest that you
+will be familiar with the material presented in the other two articles as well.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Preface</Title>
+
+<Para>
+In this document I will try to explain how EXT2ED is constructed.
+At this time of writing, the initial version is finished and ready
+for distribution; It is fully functional. However, this was not always the
+case.
+</Para>
+
+<Para>
+At first, I didn't know much about Unix, much less about Unix filesystems,
+and even less about Linux and the extended-2 filesystem. While working
+on this project, I gradually acquired knowledge about all of the above
+subjects. I can think of two ways in which I could have made my project:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ The "Engineer" way
+
+Learn the subject thoroughly before I get to the programming itself.
+Then, I could easily see the entire picture and select the best
+course of action, taking all the factors into account.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The "Explorer - Progressive" way.
+
+Jump immediately into the cold water - Start programming and
+learning the material in parallel.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+<Para>
+I guess that the above dilemma is typical and appears all through science and
+technology.
+</Para>
+
+<Para>
+However, I didn't have the luxury of choice when I started my project -
+Linux is a relatively new (and great!) operating system. The extended-2
+filesystem is even newer - Its first release lies somewhere in 1993 - Only
+passed two years until I started working on my project.
+</Para>
+
+<Para>
+The situation I found myself at the beginning was that I didn't have a fully
+detailed document which describes the ext2 filesystem. In fact, I didn't
+have any ext2 document at all. When I asked Avner about documentation, he
+suggested two references:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ A general Unix book - THE DESIGN OF THE UNIX OPERATING SYSTEM, by
+Maurice J. Bach.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The kernel sources.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+I read the relevant parts of the book before I started my project - It is a
+bit old now, but the principles are still the same. However, I needed
+more than just the principles.
+</Para>
+
+<Para>
+The kernel sources are a rare bonus! You don't get everyday the full
+sources of the operating system. There is so much that can be learned from
+them, and it is the ultimate source - The exact answer how the kernel
+works is there, with all the fine details. At the first week I started to
+look at random at the relevant parts of the sources. However, it is difficult
+to understand the global picture from direct reading of over one hundred
+page sources. Then, I started to do some programming. I didn't know
+yet what I was looking for, and I started to work on the project like a kid
+who starts to build a large puzzle.
+</Para>
+
+<Para>
+However, this was exactly the interesting part! It is frustrating to know
+it all from advance - I think that the discovery itself, bit by bit, is the
+key to a true learning and understanding.
+</Para>
+
+<Para>
+Now, in this document, I am trying to present the subject. Even though I
+developed EXT2ED progressively, I now can see the entire subject much
+brighter than I did before, and though I do have the option of presenting it
+only in the "engineer" way. However, I will not do that.
+</Para>
+
+<Para>
+My presentation will be mixed - Sometimes I will present a subject with an
+incremental perspective, and sometimes from a "top down" view. I'll leave
+you to decide if my presentation choice was wise :-)
+</Para>
+
+<Para>
+In addition, you'll notice that the sections tend to get shorter as we get
+closer to the end. The reason is simply that I started to feel that I was
+repeating myself so I decided to present only the new ideas.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Getting started ...</Title>
+
+<Para>
+Getting started is almost always the most difficult task. Once you get
+started, things start "running" ...
+</Para>
+
+<Sect2>
+<Title>Before the actual programming</Title>
+
+<Para>
+From mine talking with Avner, I understood that Linux, like any other Unix
+system, provides accesses to the entire disk as though it were a general
+file - Accessing the device. It is surely a nice idea. Avner suggested two
+ways of action:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Opening the device like a regular file in the user space.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Constructing a device driver which will run in the kernel space and
+provide hooks for the user space program. The advantage is that it
+will be a part of the kernel, and would be able to use the ext2
+kernel functions to do some of the work.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+I chose the first way. I think that the basic reason was simplicity - Learning
+the ext2 filesystem was complicated enough, and adding to it the task of
+learning how to program in the kernel space was too much. I still don't know
+how to program a device driver, and this is perhaps the bad part, but
+concerning the project in a back-perspective, I think that the first way is
+superior to the second; Ironically, because of the very reason I chose it -
+Simplicity. EXT2ED can now run entirely in the user space (which I think is
+a point in favor, because it doesn't require the user to recompile its
+kernel), and the entire hard work is mine, which fitted nicely into the
+learning experience - I didn't use other code to do the job (aside from
+looking at the sources, of-course).
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Jumping into the cold water</Title>
+
+<Para>
+I didn't know almost anything of the structure of the ext2 filesystem.
+Reading the sources was not enough - I needed to experiment. However, a tool
+for experiments in the ext2 filesystem was exactly my project! - Kind of a
+paradox.
+</Para>
+
+<Para>
+I started immediately with constructing a simple <Literal remap="tt">hex editor</Literal> - It would
+open the device as a regular file, provide means of moving inside the
+filesystem with a simple <Literal remap="tt">offset</Literal> method, and just show a
+<Literal remap="tt"> hex dump</Literal> of the contents at this point. Programming this was trivially
+simple of-course. At this point, the user-interface didn't matter to me - I
+wanted a fast way to interact. As a result, I chose a simple command line
+parser. Of course, there where no windows at this point.
+</Para>
+
+<Para>
+A hex editor is nice, but is not enough. It indeed enabled me to see each part
+of the filesystem, but the format of the viewed data was difficult to
+analyze. I wanted to see the data in a more intuitive way.
+</Para>
+
+<Para>
+At this point of time, the most helpful file in the sources was the ext2
+main include file - <Literal remap="tt">/usr/include/linux/ext2&lowbar;fs.h</Literal>. Among its contents
+there were various structures which I assumed they are disk images - Appear
+exactly like that on the disk.
+</Para>
+
+<Para>
+I wanted a <Literal remap="tt">quick</Literal> way to get going. I didn't have the patience to learn
+each of the structures use in the code. Rather, I wanted to see them in action,
+so that I could explore the connections between them - Test my assumptions,
+and reach other assumptions.
+</Para>
+
+<Para>
+So after the <Literal remap="tt">hex editor</Literal>, EXT2ED progressed into a tool which has some
+elements of a compiler. I programmed EXT2ED to <Literal remap="tt">dynamically read the kernel
+ext2 main include file in run time</Literal>, and process the information. The goal
+was to <Literal remap="tt">imply a structure-definition on the current offset at the
+filesystem</Literal>. EXT2ED would then display the structure as a list of its
+variables names and contents, instead of a meaningless hex dump.
+</Para>
+
+<Para>
+The format of the include file is not very complicated - The structures
+are mostly <Literal remap="tt">flat</Literal> - Didn't contain a lot of recursive structure; Only a
+global structure definition, and some variables. There were cases of
+structures inside structures, I treated them in a somewhat non-elegant way - I
+made all the structures flat, and expanded the arrays. As a result, the parser
+was very simple. After all, this was not an exercise in compiling, and I
+wanted to quickly get some results.
+</Para>
+
+<Para>
+To handle the task, I constructed the <Literal remap="tt">struct&lowbar;descriptor</Literal> structure.
+Each <Literal remap="tt">struct&lowbar;descriptor instance</Literal> contained information which is needed
+in order to format a block of data according to the C structure contained in
+the kernel source. The information contained:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The descriptor name, used to reference to the structure in EXT2ED.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The name of each variable.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The relative offset of the each variable in the data block.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The length, in bytes, of each variable.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+Since I didn't want to limit the number of structures, I chose a simple
+double linked list to store the information. One variable contained the
+<Literal remap="tt">current structure type</Literal> - A pointer to the relevant
+<Literal remap="tt">struct&lowbar;descriptor</Literal>.
+</Para>
+
+<Para>
+Now EXT2ED contained basically three command line operations:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ setdevice
+
+Used to open a device for reading only. Write access was postponed
+to a very advanced state in the project, simply because I didn't
+know a thing of the filesystem structure, and I believed that
+making actual changes would do nothing but damage :-)
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ setoffset
+
+Used to move in the device.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ settype
+
+Used to imply a structure definition on the current place.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ show
+
+Used to display the data. It displayed the data in a simple hex dump
+if there was no type set, or in a nice formatted way - As a list of
+the variable contents, if there was.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+Command line analyzing was primitive back then - A simple switch, as far as
+I can remember - Nothing alike the current flow control, but it was enough
+at the time.
+</Para>
+
+<Para>
+At the end, I had something to start working with. It knew to format many
+structures - None of which I understood - and provided me, without too much
+work, something to start with.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Starting to explore</Title>
+
+<Para>
+With the above tool in my pocket, I started to explore the ext2 filesystem
+structure. From the brief reading in Bach's book, I got familiar to some
+basic concepts - The <Literal remap="tt">superblock</Literal>, for example. It seems that the
+superblock is an important part of the filesystem. I decided to start
+exploring with that.
+</Para>
+
+<Para>
+I realized that the superblock should be at a fixed location in the
+filesystem - Probably near the beginning. There can be no other way -
+The kernel should start at some place to find it. A brief looking in
+the kernel sources revealed that the superblock is signed by a special
+signature - A <Literal remap="tt">magic number</Literal> - EXT2&lowbar;SUPER&lowbar;MAGIC (0xEF53 - EF probably
+stands for Extended Filesystem). I quickly found the superblock at the
+fixed offset 1024 in the filesystem - The <Literal remap="tt">s&lowbar;magic</Literal> variable in the
+superblock was set exactly to the above value.
+</Para>
+
+<Para>
+It seems that starting with the <Literal remap="tt">superblock</Literal> was a good bet - Just from
+the list of variables, one can learn a lot. I didn't understand all of them
+at the time, but it seemed that the following keywords were repeating themselves
+in various variables:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ block
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ inode
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ group
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+At this point, I started to explore the block groups. I will not detail here
+the technical design of the ext2 filesystem. I have written a special
+article which explains just that, in the "engineering" way. Please refer to it
+if you feel that you are lacking knowledge in the structure of the ext2
+filesystem.
+</Para>
+
+<Para>
+I was exploring the filesystem in this way for some time, along with reading
+the sources. This lead naturally to the next step.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Object specific commands</Title>
+
+<Para>
+What has become clear is that the above way of exploring is not powerful
+enough - I found myself doing various calculations manually in order to pass
+between related structures. I needed to replace some tasks with an automated
+procedure.
+</Para>
+
+<Para>
+In addition, it also became clear that (of-course) each key object in the
+filesystem has its special place in regard to the overall ext2 filesystem
+design, and needs a <Literal remap="tt">fine tuned handling</Literal>. It is at this point that the
+structure definitions <Literal remap="tt">came to life</Literal> - They became <Literal remap="tt">object
+definitions</Literal>, making EXT2ED <Literal remap="tt">object oriented</Literal>.
+</Para>
+
+<Para>
+The actual meaning of the breathtaking words above, is that each structure
+now had a list of <Literal remap="tt">private commands</Literal>, which ended up in
+<Literal remap="tt">calling special fine-tuned C functions</Literal>. This approach was
+found to be very powerful and is <Literal remap="tt">the heart of EXT2ED even now</Literal>.
+</Para>
+
+<Para>
+In order to implement the above concepts, I added the structure
+<Literal remap="tt">struct&lowbar;commands</Literal>. The role of this structure is to group together a
+group of commands, which can be later assigned to a specific type. Each
+structure had:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ A list of command names.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ A list of pointers to functions, which binds each command to its
+special fine-tuned C function.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+In order to relate a list of commands to a type definition, each
+<Literal remap="tt">struct&lowbar;descriptor</Literal> structure (explained earlier) was added a private
+<Literal remap="tt">struct&lowbar;commands</Literal> structure.
+</Para>
+
+<Para>
+Follows the current definitions of <Literal remap="tt">struct&lowbar;descriptor</Literal> and of
+<Literal remap="tt">struct&lowbar;command</Literal>:
+
+<ProgramListing>
+struct struct_descriptor {
+ unsigned long length;
+ unsigned char name [60];
+ unsigned short fields_num;
+ unsigned char field_names [MAX_FIELDS][80];
+ unsigned short field_lengths [MAX_FIELDS];
+ unsigned short field_positions [MAX_FIELDS];
+ struct struct_commands type_commands;
+ struct struct_descriptor *prev,*next;
+};
+
+typedef void (*PF) (char *);
+
+struct struct_commands {
+ int last_command;
+ char *names [MAX_COMMANDS_NUM];
+ char *descriptions [MAX_COMMANDS_NUM];
+ PF callback [MAX_COMMANDS_NUM];
+};
+</ProgramListing>
+
+
+</Para>
+
+</Sect1>
+
+<Sect1 id="flow-control">
+<Title>Program flow control</Title>
+
+<Para>
+Obviously the above approach lead to a major redesign of EXT2ED. The
+main engine of the resulting design is basically the same even now.
+</Para>
+
+<Para>
+I redesigned the program flow control. Up to now, I analyzed the user command
+line with the simple switch method. Now I used the far superior callback
+method.
+</Para>
+
+<Para>
+I divided the available user commands into two groups:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ General commands.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Type specific commands.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+As a result, at each point in time, the user was able to enter a
+<Literal remap="tt">general command</Literal>, selectable from a list of general commands which was
+always available, or a <Literal remap="tt">type specific command</Literal>, selectable from a list of
+commands which <Literal remap="tt">changed in time</Literal> according to the current type that the
+user was editing. The special <Literal remap="tt">type specific command</Literal> "knew" how to
+handle the object in the best possible way - It was "fine tuned" for the
+object's place in the ext2 filesystem design.
+</Para>
+
+<Para>
+In order to implement the above idea, I constructed a global variable of
+type <Literal remap="tt">struct&lowbar;commands</Literal>, which contained the <Literal remap="tt">general commands</Literal>.
+The <Literal remap="tt">type specific commands</Literal> were accessible through the <Literal remap="tt">struct
+descriptors</Literal>, as explained earlier.
+</Para>
+
+<Para>
+The program flow was now done according to the following algorithm:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Ask the user for a command line.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Analyze the user command - Separate it into <Literal remap="tt">command</Literal> and
+<Literal remap="tt">arguments</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Trace the list of known objects to match the command name to a type.
+If the type is found, call the callback function, with the arguments
+as a parameter. Then go back to step (1).
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ If the command is not type specific, try to find it in the general
+commands, and call it if found. Go back to step (1).
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ If the command is not found, issue a short error message, and return
+to step (1).
+</Para>
+</ListItem>
+
+</OrderedList>
+
+Note the <Literal remap="tt">order</Literal> of the above steps. In particular, note that a command
+is first assumed to be a type-specific command and only if this fails, a
+general command is searched. The "<Literal remap="tt">side-effect</Literal>" (main effect, actually)
+is that when we have two commands with the <Literal remap="tt">same name</Literal> - One that is a
+type specific command, and one that is a general command, the dispatching
+algorithm will call the <Literal remap="tt">type specific command</Literal>. This allows
+<Literal remap="tt">overriding</Literal> of a command to provide <Literal remap="tt">fine-tuned</Literal> operation.
+For example, the <Literal remap="tt">show</Literal> command is overridden nearly everywhere,
+to accommodate for the different ways in which different objects are displayed,
+in order to provide an intuitive fine-tuned display.
+</Para>
+
+<Para>
+The above is done in the <Literal remap="tt">dispatch</Literal> function, in <Literal remap="tt">main.c</Literal>. Since
+it is a very important function in EXT2ED, and it is relatively short, I will
+list it entirely here. Note that a redesign was made since then - Another
+level was added between the two described, but I'll elaborate more on this
+later. However, the basic structure follows the explanation described above.
+
+<ProgramListing>
+int dispatch (char *command_line)
+
+{
+ int i,found=0;
+ char command [80];
+
+ parse_word (command_line,command);
+
+ if (strcmp (command,"quit")==0) return (1);
+
+ /* 1. Search for type specific commands FIRST - Allows overriding of a general command */
+
+ if (current_type != NULL)
+ for (i=0;i&#60;=current_type-&#62;type_commands.last_command &#38;&#38; !found;i++) {
+ if (strcmp (command,current_type-&#62;type_commands.names [i])==0) {
+ (*current_type-&#62;type_commands.callback [i]) (command_line);
+ found=1;
+ }
+ }
+
+ /* 2. Now search for ext2 filesystem general commands */
+
+ if (!found)
+ for (i=0;i&#60;=ext2_commands.last_command &#38;&#38; !found;i++) {
+ if (strcmp (command,ext2_commands.names [i])==0) {
+ (*ext2_commands.callback [i]) (command_line);
+ found=1;
+ }
+ }
+
+
+ /* 3. If not found, search the general commands */
+
+ if (!found)
+ for (i=0;i&#60;=general_commands.last_command &#38;&#38; !found;i++) {
+ if (strcmp (command,general_commands.names [i])==0) {
+ (*general_commands.callback [i]) (command_line);
+ found=1;
+ }
+ }
+
+ if (!found) {
+ wprintw (command_win,"Error: Unknown command\n");
+ refresh_command_win ();
+ }
+
+ return (0);
+}
+</ProgramListing>
+
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Source files in EXT2ED</Title>
+
+<Para>
+The project was getting large enough to be split into several source
+files. I split the source as much as I could into self-contained
+source files. The source files consist of the following blocks:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Main include file - ext2ed.h</Literal>
+
+This file contains the definitions of the various structures,
+variables and functions used in EXT2ED. It is included by all source
+files in EXT2ED.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Main block - main.c</Literal>
+
+<Literal remap="tt">main.c</Literal> handles the upper level of the program flow control.
+It contains the <Literal remap="tt">parser</Literal> and the <Literal remap="tt">dispatcher</Literal>. Its task is
+to ask the user for a required action, and to pass control to other
+lower level functions in order to do the actual job.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Initialization - init.c</Literal>
+
+The init source is responsible for the various initialization
+actions which need to be done through the program. For example,
+auto detection of an ext2 filesystem when selecting a device and
+initialization of the filesystem-specific structures described
+earlier.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Disk activity - disk.c</Literal>
+
+<Literal remap="tt">disk.c</Literal> is handles the lower level interaction with the
+device. All disk activity is passed through this file - The various
+functions through the source code request disk actions from the
+functions in this file. In this way, for example, we can easily block
+the write access to the device.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Display output activity - win.c</Literal>
+
+In a similar way to <Literal remap="tt">disk.c</Literal>, the user-interface functions and
+most of the interaction with the <Literal remap="tt">ncurses library</Literal> are done
+here. Nothing will be actually written to a specific window without
+calling a function from this file.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Commands available through dispatching - *&lowbar;com.c </Literal>
+
+The above file name is generic - Each file which ends with
+<Literal remap="tt">&lowbar;com.c</Literal> contains a group of related commands which can be
+called through <Literal remap="tt">the dispatching function</Literal>.
+
+Each object typically has its own file. A separate file is also
+available for the general commands.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+The entire list of source files available at this time is:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ blockbitmap&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ dir&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ disk.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ ext2&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ file&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ general&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ group&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ init.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ inode&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ inodebitmap&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ main.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ super&lowbar;com.c
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ win.c
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>User interface</Title>
+
+<Para>
+The user interface is text-based only and is based on the following
+libraries:
+</Para>
+
+<Para>
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The <Literal remap="tt">ncurses</Literal> library, developed by <Literal remap="tt">Zeyd Ben-Halim</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The <Literal remap="tt">GNU readline</Literal> library.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The user interaction is command line based - The user enters a command
+line, which consists of a <Literal remap="tt">command</Literal> and of <Literal remap="tt">arguments</Literal>. This fits
+nicely with the program flow control described earlier - The <Literal remap="tt">command</Literal>
+is used by <Literal remap="tt">dispatch</Literal> to select the right function, and the
+<Literal remap="tt">arguments</Literal> are interpreted by the function itself.
+</Para>
+
+<Sect2>
+<Title>The ncurses library</Title>
+
+<Para>
+The <Literal remap="tt">ncurses</Literal> library enables me to divide the screen into "windows".
+The main advantage is that I treat the "window" in a virtual way, asking
+the ncurses library to "write to a window". However, the ncurses
+library internally buffers the requests, and nothing is actually passed to the
+terminal until an explicit refresh is requested. When the refresh request is
+made, ncurses compares the current terminal state (as known in the last time
+that a refresh was done) with the new to be shown state, and passes to the
+terminal the minimal information required to update the display. As a
+result, the display output is optimized behind the scenes by the
+<Literal remap="tt">ncurses</Literal> library, while I can still treat it in a virtual way.
+</Para>
+
+<Para>
+There are two basic concepts in the <Literal remap="tt">ncurses</Literal> library:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ A window.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ A pad.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+A window can be no bigger than the actual terminal size. A pad, however, is
+not limited in its size.
+</Para>
+
+<Para>
+The user screen is divided by EXT2ED into three windows and one pad:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Title window.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Status window.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Main display pad.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Command window.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The <Literal remap="tt">title window</Literal> is static - It just displays the current version
+of EXT2ED.
+</Para>
+
+<Para>
+The user interaction is done in the <Literal remap="tt">command window</Literal>. The user enters a
+<Literal remap="tt">command line</Literal>, feedback is usually displayed there, and then relevant
+data is usually displayed in the main display and in the status window.
+</Para>
+
+<Para>
+The <Literal remap="tt">main display</Literal> is using a <Literal remap="tt">pad</Literal> instead of a window because
+the amount of information which is written to it is not known in advance.
+Therefor, the user treats the main display as a "window" into a bigger
+display and can <Literal remap="tt">scroll vertically</Literal> using the <Literal remap="tt">pgdn</Literal> and <Literal remap="tt">pgup</Literal>
+commands. Although the <Literal remap="tt">pad</Literal> mechanism enables me to use horizontal
+scrolling, I have not utilized this.
+</Para>
+
+<Para>
+When I need to show something to the user, I use the ncurses <Literal remap="tt">wprintw</Literal>
+command. Then an explicit refresh command is required. As explained before,
+the refresh commands is piped through <Literal remap="tt">win.c</Literal>. For example, to update
+the command window, <Literal remap="tt">refresh&lowbar;command&lowbar;win ()</Literal> is used.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The readline library</Title>
+
+<Para>
+Avner suggested me to integrate the GNU <Literal remap="tt">readline</Literal> library in my project.
+The <Literal remap="tt">readline</Literal> library is designed specifically for programs which use
+command line interface. It provides a nice package of <Literal remap="tt">command line editing
+tools</Literal> - Inserting, deleting words, and the whole package of editing tools
+which are normally available in the <Literal remap="tt">bash</Literal> shell (Refer to the readline
+documentation for details). In addition, I utilized the <Literal remap="tt">history</Literal>
+feature of the readline library - The entered commands are saved in a
+<Literal remap="tt">command history</Literal>, and can be called later by whatever means that the
+readline package provides. Command completion is also supported - When the
+user enters a partial command name, EXT2ED will provide the readline library
+with the possible completions.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Possible support of other filesystems</Title>
+
+<Para>
+The entire ext2 layer is provided through specific objects. Given another
+set of objects, support of other filesystem can be provided using the same
+dispatching mechanism. In order to prepare the surface for this option, I
+added yet another layer to the two-layer structure presented earlier. EXT2ED
+commands now consist of three layers:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The general commands.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The ext2 general commands.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The ext2 object specific commands.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+The general commands are provided by the <Literal remap="tt">general&lowbar;com.c</Literal> source file,
+and are always available. The two other levels are not present when EXT2ED
+loads - They are dynamically added by <Literal remap="tt">init.c</Literal> when EXT2ED detects an
+ext2 filesystem on the device.
+</Para>
+
+<Para>
+The abstraction levels presented above helps to extend EXT2ED to fully
+support a new filesystem, with its own specific type commands.
+</Para>
+
+<Para>
+Even without any source code modification, the user is free to add structure
+definitions in a separate file (specified in the configuration file),
+which will be added to the list of available objects. The added objects will
+consist only of variables, of-course, and will be used through the more
+primitive <Literal remap="tt">setoffset</Literal> and <Literal remap="tt">settype</Literal> commands.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>On the implementation of the various commands</Title>
+
+<Para>
+This section points out some typical programming style that I used in many
+places at the code.
+</Para>
+
+<Sect2>
+<Title>The explicit use of the dispatch function</Title>
+
+<Para>
+The various commands are reached by the user through the <Literal remap="tt">dispatch</Literal>
+function. This is not surprising. The fact that can be surprising, at least in
+a first look, is that <Literal remap="tt">you'll find the dispatch call in many of my
+own functions!</Literal>.
+</Para>
+
+<Para>
+I am in fact using my own implemented functions to construct higher
+level operations. I am heavily using the fact that the dispatching mechanism
+is object oriented ant that the <Literal remap="tt">overriding</Literal> principle takes place and
+selects the proper function to call when several commands with the same name
+are accessible.
+</Para>
+
+<Para>
+Sometimes, however, I call the explicit command directly, without passing
+through <Literal remap="tt">dispatch</Literal>. This is typically done when I want to bypass the
+<Literal remap="tt">overriding</Literal> effect.
+</Para>
+
+<Para>
+
+This is used, for example, in the interaction between the global cd command
+and the dir object specific cd command. You will see there that in order
+to implement the "entire" cd command, the type specific cd command uses both
+a dispatching mechanism to call itself recursively if a relative path is
+used, or a direct call of the general cd handling function if an explicit path
+is used.
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Passing information between handling functions</Title>
+
+<Para>
+Typically, every source code file which handles one object type has a global
+structure specifically designed for it which is used by most of the
+functions in that file. This is used to pass information between the various
+functions there, and to physically provide the link to other related
+objects, typically for initialization use.
+</Para>
+
+<Para>
+
+For example, in order to edit a file, information about the
+inode is needed - The file command is available only when editing an
+inode. When the file command is issued, the handling function (found,
+according to the source division outlined above, in inode_com.c) will
+store the necessary information about the inode in a specific structure
+of type struct_file_info which will be available for use by the file_com.c
+functions. Only then it will set the type to file. This is also the reason
+that a direct asynchronous set of the object type to a file through a settype
+command will fail - The above data structure will not be initialized
+properly because the user never was at the inode of the file.
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>A very simplified overview of a typical command handling function</Title>
+
+<Para>
+This is a very simplified overview. Detailed information will follow
+where appropriate.
+</Para>
+
+<Sect3>
+<Title>The prototype of a typical handling function</Title>
+
+<Para>
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ I chose a unified <Literal remap="tt">naming convention</Literal> for the various object
+specific commands. It is perhaps best showed with an example:
+
+The prototype of the handling function of the command <Literal remap="tt">next</Literal> of
+the type <Literal remap="tt">file</Literal> is:
+
+<Screen>
+ extern void type_file___next (char *command_line);
+
+</Screen>
+
+
+For other types and commands, the words <Literal remap="tt">file</Literal> and <Literal remap="tt">next</Literal>
+should be replaced accordingly.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The ext2 general commands syntax is similar. For example, the ext2
+general command <Literal remap="tt">super</Literal> results in calling:
+
+<Screen>
+ extern void type_ext2___super (char *command_line);
+
+</Screen>
+
+Those functions are available in <Literal remap="tt">ext2&lowbar;com.c</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The general commands syntax is even simpler - The name of the
+handling function is exactly the name of the commands. Those
+functions are available in <Literal remap="tt">general&lowbar;com.c</Literal>.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+</Sect3>
+
+<Sect3>
+<Title>"Typical" algorithm</Title>
+
+<Para>
+This section can't of-course provide meaningful information - Each
+command is handled differently, but the following frame is typical:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Parse command line arguments and analyze them. Return with an error
+message if the syntax is wrong.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ "Act accordingly", perhaps making use of the global variable available
+to this type.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Use some <Literal remap="tt">dispatch / direct </Literal> calls in order to pass control to
+other lower-level user commands.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Sometimes <Literal remap="tt">dispatch</Literal> to the object's <Literal remap="tt">show</Literal> command to
+display the resulting data to the user.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+I told you it is meaningless :-)
+</Para>
+
+</Sect3>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Initialization overview</Title>
+
+<Para>
+In this section I will discuss some aspects of the various initialization
+routines available in the source file <Literal remap="tt">init.c</Literal>.
+</Para>
+
+<Sect2>
+<Title>Upon startup</Title>
+
+<Para>
+Follows the function <Literal remap="tt">main</Literal>, appearing of-course in <Literal remap="tt">main.c</Literal>:
+
+
+<ProgramListing>
+int main (void)
+
+{
+ if (!init ()) return (0); /* Perform some initial initialization */
+ /* Quit if failed */
+
+ parser (); /* Get and parse user commands */
+
+ prepare_to_close (); /* Do some cleanup */
+ printf ("Quitting ...\n");
+ return (1); /* And quit */
+}
+</ProgramListing>
+
+</Para>
+
+<Para>
+The two initialization functions, which are called by <Literal remap="tt">main</Literal>, are:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ init
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ prepare&lowbar;to&lowbar;close
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Sect3>
+<Title>The init function</Title>
+
+<Para>
+<Literal remap="tt">init</Literal> is called from <Literal remap="tt">main</Literal> upon startup. It initializes the
+following tasks / subsystems:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Processing of the <Literal remap="tt">user configuration file</Literal>, by using the
+<Literal remap="tt">process&lowbar;configuration&lowbar;file</Literal> function. Failing to complete the
+configuration file processing is considered a <Literal remap="tt">fatal error</Literal>,
+and EXT2ED is aborted. I did it this way because the configuration
+file has some sensitive user options like write access behavior, and
+I wanted to be sure that the user is aware of them.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Registration of the <Literal remap="tt">general commands</Literal> through the use of
+the <Literal remap="tt">add&lowbar;general&lowbar;commands</Literal> function.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Reset of the object memory rotating lifo structure.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Reset of the device parameters and of the current type.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Initialization of the windows subsystem - The interface between the
+ncurses library and EXT2ED, through the use of the <Literal remap="tt">init&lowbar;windows</Literal>
+function, available in <Literal remap="tt">win.c</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Initialization of the interface between the readline library and
+EXT2ED, through <Literal remap="tt">init&lowbar;readline</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Initialization of the <Literal remap="tt">signals</Literal> subsystem, through
+<Literal remap="tt">init&lowbar;signals</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Disabling write access. Write access needs to be explicitly enabled
+using a user command, to prevent accidental user mistakes.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+When <Literal remap="tt">init</Literal> is finished, it dispatches the <Literal remap="tt">help</Literal> command in order
+to show the available commands to the user. Note that the ext2 layer is still
+not added; It will be added if and when EXT2ED will detect an ext2
+filesystem on a device.
+</Para>
+
+</Sect3>
+
+<Sect3>
+<Title>The prepare&lowbar;to&lowbar;close function</Title>
+
+<Para>
+The <Literal remap="tt">prepare&lowbar;to&lowbar;close</Literal> function reverses some of the actions done
+earlier in EXT2ED and freeing the dynamically allocated memory.
+Specifically, it:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Closes the open device, if any.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Removes the first level - Removing the general commands, through
+the use of <Literal remap="tt">free&lowbar;user&lowbar;commands</Literal>, with a pointer to the
+general&lowbar;commands structure as a parameter.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Removes of the second level - Removing the ext2 ext2 general
+commands, in much the same way.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Removes of the third level - Removing the objects and the object
+specific commands, by using <Literal remap="tt">free&lowbar;struct&lowbar;descriptors</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Closes the window subsystem, and detaches EXT2ED from the ncurses
+library, through the use of the <Literal remap="tt">close&lowbar;windows</Literal> function,
+available in <Literal remap="tt">win.c</Literal>.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+</Sect3>
+
+</Sect2>
+
+<Sect2>
+<Title>Registration of commands</Title>
+
+<Para>
+Addition of a user command is done through the <Literal remap="tt">add&lowbar;user&lowbar;command</Literal>
+function. The prototype is:
+
+<Screen>
+void add_user_command (struct struct_commands *ptr,char *name,char
+*description,PF callback);
+</Screen>
+
+The function receives a pointer to a structure of type
+<Literal remap="tt">struct&lowbar;commands</Literal>, a desired name for the command which will be used by
+the user to identify the command, a short description which is utilized by the
+<Literal remap="tt">help</Literal> subsystem, and a pointer to a C function which will be called if
+<Literal remap="tt">dispatch</Literal> decides that this command was requested.
+</Para>
+
+<Para>
+The <Literal remap="tt">add&lowbar;user&lowbar;command</Literal> is a <Literal remap="tt">low level function</Literal> used in the three
+levels to add user commands. For example, addition of the <Literal remap="tt">ext2
+general commands is done by:</Literal>
+
+<ProgramListing>
+void add_ext2_general_commands (void)
+
+{
+ add_user_command (&amp;ext2_commands,"super","Moves to the superblock of the filesystem",type_ext2___super);
+ add_user_command (&amp;ext2_commands,"group","Moves to the first group descriptor",type_ext2___group);
+ add_user_command (&amp;ext2_commands,"cd","Moves to the directory specified",type_ext2___cd);
+}
+</ProgramListing>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Registration of objects</Title>
+
+<Para>
+Registration of objects is based, as explained earlier, on the "compilation"
+of an external user file, which has a syntax similar to the C language
+<Literal remap="tt">struct</Literal> keyword. The primitive parser I have implemented detects the
+definition of structures, and calls some lower level functions to actually
+register the new detected object. The parser's prototype is:
+
+<Screen>
+int set_struct_descriptors (char *file_name)
+</Screen>
+
+It opens the given file name, and calls, when appropriate:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ add&lowbar;new&lowbar;descriptor
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ add&lowbar;new&lowbar;variable
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+<Literal remap="tt">add&lowbar;new&lowbar;descriptor</Literal> is a low level function which adds a new descriptor
+to the doubly linked list of the available objects. It will then call
+<Literal remap="tt">fill&lowbar;type&lowbar;commands</Literal>, which will add specific commands to the object,
+if the object is known.
+</Para>
+
+<Para>
+<Literal remap="tt">add&lowbar;new&lowbar;variable</Literal> will add a new variable of the requested length to the
+specified descriptor.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Initialization upon specification of a device</Title>
+
+<Para>
+When the general command <Literal remap="tt">setdevice</Literal> is used to open a device, some
+initialization sequence takes place, which is intended to determine two
+factors:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Are we dealing with an ext2 filesystem ?
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ What are the basic filesystem parameters, such as its total size and
+its block size ?
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+This questions are answered by the <Literal remap="tt">set&lowbar;file&lowbar;system&lowbar;info</Literal>, possibly
+using some <Literal remap="tt">help from the user</Literal>, through the configuration file.
+The answers are placed in the <Literal remap="tt">file&lowbar;system&lowbar;info</Literal> structure, which is of
+type <Literal remap="tt">struct&lowbar;file&lowbar;system&lowbar;info</Literal>:
+
+<ProgramListing>
+struct struct_file_system_info {
+ unsigned long file_system_size;
+ unsigned long super_block_offset;
+ unsigned long first_group_desc_offset;
+ unsigned long groups_count;
+ unsigned long inodes_per_block;
+ unsigned long blocks_per_group; /* The name is misleading; beware */
+ unsigned long no_blocks_in_group;
+ unsigned short block_size;
+ struct ext2_super_block super_block;
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+Autodetection of an ext2 filesystem is usually recommended. However, on a damaged
+filesystem I can't assure a success. That's were the user comes in - He can
+<Literal remap="tt">override</Literal> the auto detection procedure and force an ext2 filesystem, by
+selecting the proper options in the configuration file.
+</Para>
+
+<Para>
+If auto detection succeeds, the second question above is automatically
+answered - I get all the information I need from the filesystem itself. In
+any case, default parameters can be supplied in the configuration file and
+the user can select the required behavior.
+</Para>
+
+<Para>
+If we decide to treat the filesystem as an ext2 filesystem, <Literal remap="tt">registration of
+the ext2 specific objects</Literal> is done at this point, by calling the
+<Literal remap="tt">set&lowbar;struct&lowbar;descriptors</Literal> outlined earlier, with the name of the file
+which describes the ext2 objects, and is basically based on the ext2 sources
+main include file. At this point, EXT2ED can be fully used by the user.
+</Para>
+
+<Para>
+If we do not register the ext2 specific objects, the user can still provide
+object definitions in a separate file, and will be able to use EXT2ED in a
+<Literal remap="tt">limited form</Literal>, but more sophisticated than a simple hex editor.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>main.c</Title>
+
+<Para>
+As described earlier, <Literal remap="tt">main.c</Literal> is used as a front-head to the entire
+program. <Literal remap="tt">main.c</Literal> contains the following elements:
+</Para>
+
+<Sect2>
+<Title>The main routine</Title>
+
+<Para>
+The <Literal remap="tt">main</Literal> routine was displayed above. Its task is to pass control to
+the initialization routines and to the parser.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The parser</Title>
+
+<Para>
+The parser consists of the following functions:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The <Literal remap="tt">parser</Literal> function, which reads the command line from the
+user and saves it in readline's history buffer and in the internal
+last-command buffer.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The <Literal remap="tt">parse&lowbar;word</Literal> function, which receives a string and parses
+the first word from it, ignoring whitespaces, and returns a pointer
+to the rest of the string.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The <Literal remap="tt">complete&lowbar;command</Literal> function, which is used by the readline
+library for command completion. It scans the available commands at
+this point and determines the possible completions.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The dispatcher</Title>
+
+<Para>
+The dispatcher was already explained in the flow control section - section
+<XRef LinkEnd="flow-control">. Its task is to pass control to the proper command
+handling function, based on the command line's command.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The self-sanity control</Title>
+
+<Para>
+This is not fully implemented.
+</Para>
+
+<Para>
+The general idea was to provide a control system which will supervise the
+internal work of EXT2ED. Since I am pretty sure that bugs exist, I have
+double checked myself in a few instances, and issued an <Literal remap="tt">internal
+error</Literal> warning if I reached the conclusion that something is not logical.
+The internal error is reported by the function <Literal remap="tt">internal&lowbar;error</Literal>,
+available in <Literal remap="tt">main.c</Literal>.
+</Para>
+
+<Para>
+The self sanity check is compiled only if the compile time option
+<Literal remap="tt">DEBUG</Literal> is selected.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The windows interface</Title>
+
+<Para>
+Screen handling and interfacing to the <Literal remap="tt">ncurses</Literal> library is done in
+<Literal remap="tt">win.c</Literal>.
+</Para>
+
+<Sect2>
+<Title>Initialization</Title>
+
+<Para>
+Opening of the windows is done in <Literal remap="tt">init&lowbar;windows</Literal>. In
+<Literal remap="tt">close&lowbar;windows</Literal>, we just close our windows. The various window lengths
+with an exception to the <Literal remap="tt">show pad</Literal> are defined in the main header file.
+The rest of the display will be used by the <Literal remap="tt">show pad</Literal>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Display output</Title>
+
+<Para>
+Each actual refreshing of the terminal monitor is done by using the
+appropriate refresh function from this file: <Literal remap="tt">refresh&lowbar;title&lowbar;win</Literal>,
+<Literal remap="tt">refresh&lowbar;show&lowbar;win</Literal>, <Literal remap="tt">refresh&lowbar;show&lowbar;pad</Literal> and
+<Literal remap="tt">refresh&lowbar;command&lowbar;win</Literal>.
+</Para>
+
+<Para>
+With the exception of the <Literal remap="tt">show pad</Literal>, each function simply calls the
+<Literal remap="tt">ncurses refresh command</Literal>. In order to provide to <Literal remap="tt">scrolling</Literal> in
+the <Literal remap="tt">show pad</Literal>, some information about its status is constantly updated
+by the various functions which display output in it. <Literal remap="tt">refresh&lowbar;show&lowbar;pad</Literal>
+passes this information to <Literal remap="tt">ncurses</Literal> so that the correct part of the pad
+is actually copied to the display.
+</Para>
+
+<Para>
+The above information is saved in a global variable of type <Literal remap="tt">struct
+struct&lowbar;pad&lowbar;info</Literal>:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct struct_pad_info {
+ int display_lines,display_cols;
+ int line,col;
+ int max_line,max_col;
+ int disable_output;
+};
+</ProgramListing>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Screen redraw</Title>
+
+<Para>
+The <Literal remap="tt">redraw&lowbar;all</Literal> function will just reopen the windows. This action is
+necessary if the display gets garbled from some reason.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The disk interface</Title>
+
+<Para>
+All the disk activity with regard to the filesystem passes through the file
+<Literal remap="tt">disk.c</Literal>. This is done that way to provide additional levels of safety
+concerning the disk access. This way, global decisions considering the disk
+can be easily accomplished. The benefits of this isolation will become even
+clearer in the next sections.
+</Para>
+
+<Sect2>
+<Title>Low level functions</Title>
+
+<Para>
+Read requests are ultimately handled by <Literal remap="tt">low&lowbar;read</Literal> and write requests
+are handled by <Literal remap="tt">low&lowbar;write</Literal>. They just receive the length of the data
+block, the offset in the filesystem and a pointer to the buffer and pass the
+request to the <Literal remap="tt">fread</Literal> or <Literal remap="tt">fwrite</Literal> standard library functions.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Mounted filesystems</Title>
+
+<Para>
+EXT2ED design assumes that the edited filesystem is not mounted. Even if
+a <Literal remap="tt">reasonably simple</Literal> way to handle mounted filesystems exists, it is
+probably <Literal remap="tt">too complicated</Literal> :-)
+</Para>
+
+<Para>
+Write access to a mounted filesystem will be denied. Read access can be
+allowed by using a configuration file option. The mount status is determined
+by reading the file /etc/mtab.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Write access</Title>
+
+<Para>
+Write access is the most sensitive part in the program. This program is
+intended for <Literal remap="tt">editing filesystems</Literal>. It is obvious that a small mistake
+in this regard can make the filesystem not usable anymore.
+</Para>
+
+<Para>
+The following safety measures are added, of-course, to the general Unix
+permission protection - The user can always disable write access on the
+device file itself.
+</Para>
+
+<Para>
+Considering the user, the following safety measures were taken:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ The filesystem is <Literal remap="tt">never</Literal> opened with write-access enables.
+Rather, the user must explicitly request to enable write-access.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The user can <Literal remap="tt">disable</Literal> write access entirely by using a
+<Literal remap="tt">configuration file option</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Changes are never done automatically - Whenever the user makes
+changes, they are done in memory. An explicit <Literal remap="tt">writedata</Literal>
+command should be issued to make the changes active in the disk.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+Considering myself, I tried to protect against my bugs by:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Opening the device in read-only mode until a write request is
+issued by the user.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Limiting <Literal remap="tt">actual</Literal> filesystem access to two functions only -
+<Literal remap="tt">low&lowbar;read</Literal> for reading, and <Literal remap="tt">low&lowbar;write</Literal> for writing. Those
+functions were programmed carefully, and I added the self
+sanity checks there. In addition, this is the only place in which I
+need to check the user options described above - There can be no
+place in which I can "forget" to check them.
+
+Note that The disabling of write-access through the configuration file
+is double checked here only as a <Literal remap="tt">self-sanity</Literal> check - If
+<Literal remap="tt">DEBUG</Literal> is selected, since write enable should have been refused
+and write-access is always disabled at startup, hence finding
+<Literal remap="tt">here</Literal> that the user has write access disabled through the
+configuration file clearly indicates that I have a bug somewhere.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The following safety measure can provide protection against <Literal remap="tt">both</Literal> user
+mistakes and my own bugs:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ I added a <Literal remap="tt">logging option</Literal>, which logs every actual write
+access to the disk in the lowest level - In <Literal remap="tt">low&lowbar;write</Literal> itself.
+
+The logging has nothing to do with the current type and the various
+other higher level operations of EXT2ED - It is simply a hex dump of
+the contents which will be overwritten; Both the original contents
+and the new written data.
+
+In that case, even if the user makes a mistake, the original data
+can be retrieved.
+
+Even If I have a bug somewhere which causes incorrect data to be
+written to the disk, the logging option will still log exactly the
+original contents at the place were data was incorrectly overwritten.
+(This assumes, of-course, that <Literal remap="tt">low-write</Literal> and the <Literal remap="tt">logging
+itself</Literal> work correctly. I have done my best to verify that this is
+indeed the case).
+
+The <Literal remap="tt">logging</Literal> option is implemented in the <Literal remap="tt">log&lowbar;changes</Literal>
+function.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Reading / Writing objects</Title>
+
+<Para>
+Usually <Literal remap="tt">(not always)</Literal>, the current object data is available in the
+global variable <Literal remap="tt">type&lowbar;data</Literal>, which is of the type:
+
+<ProgramListing>
+struct struct_type_data {
+ long offset_in_block;
+
+ union union_type_data {
+ char buffer [EXT2_MAX_BLOCK_SIZE];
+ struct ext2_acl_header t_ext2_acl_header;
+ struct ext2_acl_entry t_ext2_acl_entry;
+ struct ext2_old_group_desc t_ext2_old_group_desc;
+ struct ext2_group_desc t_ext2_group_desc;
+ struct ext2_inode t_ext2_inode;
+ struct ext2_super_block t_ext2_super_block;
+ struct ext2_dir_entry t_ext2_dir_entry;
+ } u;
+};
+</ProgramListing>
+
+The above union enables me, in the program, to treat the data as raw data or
+as a meaningful filesystem object.
+</Para>
+
+<Para>
+The reading and writing, if done to this global variable, are done through
+the functions <Literal remap="tt">load&lowbar;type&lowbar;data</Literal> and <Literal remap="tt">write&lowbar;type&lowbar;data</Literal>, available in
+<Literal remap="tt">disk.c</Literal>.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The general commands</Title>
+
+<Para>
+The <Literal remap="tt">general commands</Literal> are handled in the file <Literal remap="tt">general&lowbar;com.c</Literal>.
+</Para>
+
+<Sect2>
+<Title>The help system</Title>
+
+<Para>
+The help command is handled by the function <Literal remap="tt">help</Literal>. The algorithm is as
+follows:
+</Para>
+
+<Para>
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Check the command line arguments. If there is an argument, pass
+control to the <Literal remap="tt">detailed&lowbar;help</Literal> function, in order to provide
+help on the specific command.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ If general help was requested, display a list of the available
+commands at this point. The three levels are displayed in reverse
+order - First the commands which are specific to the current type
+(If a current type is defined), then the ext2 general commands (If
+we decided that the filesystem should be treated like an ext2
+filesystem), then the general commands.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Display information about EXT2ED - Current version, general
+information about the project, etc.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The setdevice command</Title>
+
+<Para>
+The <Literal remap="tt">setdevice</Literal> commands result in calling the <Literal remap="tt">set&lowbar;device</Literal>
+function. The algorithm is:
+</Para>
+
+<Para>
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Parse the command line argument. If it isn't available report the
+error and return.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Close the current open device, if there is one.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Open the new device in read-only mode. Update the global variables
+<Literal remap="tt">device&lowbar;name</Literal> and <Literal remap="tt">device&lowbar;handle</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Disable write access.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Empty the object memory.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Unregister the ext2 general commands, using
+<Literal remap="tt">free&lowbar;user&lowbar;commands</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Unregister the current objects, using <Literal remap="tt">free&lowbar;struct&lowbar;descriptors</Literal>
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Call <Literal remap="tt">set&lowbar;file&lowbar;system&lowbar;info</Literal> to auto-detect an ext2 filesystem
+and set the basic filesystem values.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Add the <Literal remap="tt">alternate descriptors</Literal>, supplied by the user.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Set the device offset to the filesystem start by dispatching
+<Literal remap="tt">setoffset 0</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Show the new available commands by dispatching the <Literal remap="tt">help</Literal>
+command.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Basic maneuvering</Title>
+
+<Para>
+Basic maneuvering is done using the <Literal remap="tt">setoffset</Literal> and the <Literal remap="tt">settype</Literal>
+user commands.
+</Para>
+
+<Para>
+<Literal remap="tt">set&lowbar;offset</Literal> accepts some alternative forms of specifying the new
+offset. They all ultimately lead to changing the <Literal remap="tt">device&lowbar;offset</Literal>
+global variable and seeking to the new position. <Literal remap="tt">set&lowbar;offset</Literal> also
+calls <Literal remap="tt">load&lowbar;type&lowbar;data</Literal> to read a block ahead of the new position into
+the <Literal remap="tt">type&lowbar;data</Literal> global variable.
+</Para>
+
+<Para>
+<Literal remap="tt">set&lowbar;type</Literal> will point the global variable <Literal remap="tt">current&lowbar;type</Literal> to the
+correct entry in the double linked list of the known objects. If the
+requested type is <Literal remap="tt">hex</Literal> or <Literal remap="tt">none</Literal>, <Literal remap="tt">current&lowbar;type</Literal> will be
+initialized to <Literal remap="tt">NULL</Literal>. <Literal remap="tt">set&lowbar;type</Literal> will also dispatch <Literal remap="tt">show</Literal>,
+so that the object data will be re-formatted in the new format.
+</Para>
+
+<Para>
+When editing an ext2 filesystem, it is not intended that those commands will
+be used directly, and it is usually not required. My implementation of the
+ext2 layer, on the other hand, uses this lower level commands on countless
+occasions.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The display functions</Title>
+
+<Para>
+The general command version of <Literal remap="tt">show</Literal> is handled by the <Literal remap="tt">show</Literal>
+function. This command is overridden by various objects to provide a display
+which is better suited to the object.
+</Para>
+
+<Para>
+The general show command will format the data in <Literal remap="tt">type&lowbar;data</Literal> according
+to the structure definition of the current type and show it on the <Literal remap="tt">show
+pad</Literal>. If there is no current type, the data will be shown as a simple hex
+dump; Otherwise, the list of variables, along with their values will be shown.
+</Para>
+
+<Para>
+A call to <Literal remap="tt">show&lowbar;info</Literal> is also made - <Literal remap="tt">show&lowbar;info</Literal> will provide
+<Literal remap="tt">general statistics</Literal> on the <Literal remap="tt">show&lowbar;window</Literal>, such as the current
+block, current type, current offset and current page.
+</Para>
+
+<Para>
+The <Literal remap="tt">pgup</Literal> and <Literal remap="tt">pgdn</Literal> general commands just update the
+<Literal remap="tt">show&lowbar;pad&lowbar;info</Literal> global variable - We just increment
+<Literal remap="tt">show&lowbar;pad&lowbar;info.line</Literal> with the number of lines in the screen -
+<Literal remap="tt">show&lowbar;pad&lowbar;info.display&lowbar;lines</Literal>, which was initialized in
+<Literal remap="tt">init&lowbar;windows</Literal>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Changing data</Title>
+
+<Para>
+Data change is done in memory only. An update to the disk if followed by an
+explicit <Literal remap="tt">writedata</Literal> command to the disk. The <Literal remap="tt">write&lowbar;data</Literal>
+function simple calls the <Literal remap="tt">write&lowbar;type&lowbar;data</Literal> function, outlined earlier.
+</Para>
+
+<Para>
+The <Literal remap="tt">set</Literal> command is used for changing the data.
+</Para>
+
+<Para>
+If there is no current type, control is passed to the <Literal remap="tt">hex&lowbar;set</Literal> function,
+which treats the data as a block of bytes and uses the
+<Literal remap="tt">type&lowbar;data.offset&lowbar;in&lowbar;block</Literal> variable to write the new text or hex string
+to the correct place in the block.
+</Para>
+
+<Para>
+If a current type is defined, the requested variable is searched in the
+current object, and the desired new valued is entered.
+</Para>
+
+<Para>
+The <Literal remap="tt">enablewrite</Literal> commands just sets the global variable
+<Literal remap="tt">write&lowbar;access</Literal> to <Literal remap="tt">1</Literal> and re-opens the filesystem in read-write
+mode, if possible.
+</Para>
+
+<Para>
+If the current type is NULL, a hex-mode is assumed - The <Literal remap="tt">next</Literal> and
+<Literal remap="tt">prev</Literal> commands will just update <Literal remap="tt">type&lowbar;data.offset&lowbar;in&lowbar;block</Literal>.
+</Para>
+
+<Para>
+If the current type is not NULL, the The <Literal remap="tt">next</Literal> and <Literal remap="tt">prev</Literal> command
+are usually overridden anyway. If they are not overridden, it will be assumed
+that the user is editing an array of such objects, and they will just pass
+to the next / prev element by dispatching to <Literal remap="tt">setoffset</Literal> using the
+<Literal remap="tt">setoffset type + / - X</Literal> syntax.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The ext2 general commands</Title>
+
+<Para>
+The ext2 general commands are contained in the <Literal remap="tt">ext2&lowbar;general&lowbar;commands</Literal>
+global variable (which is of type <Literal remap="tt">struct struct&lowbar;commands</Literal>).
+</Para>
+
+<Para>
+The handling functions are implemented in the source file <Literal remap="tt">ext2&lowbar;com.c</Literal>.
+I will include the entire source code since it is relatively short.
+</Para>
+
+<Sect2>
+<Title>The super command</Title>
+
+<Para>
+The super command just "brings the user" to the main superblock and set the
+type to ext2&lowbar;super&lowbar;block. The implementation is trivial:
+</Para>
+
+<Para>
+
+<ProgramListing>
+void type_ext2___super (char *command_line)
+
+{
+ char buffer [80];
+
+ super_info.copy_num=0;
+ sprintf (buffer,"setoffset %ld",file_system_info.super_block_offset);dispatch (buffer);
+ sprintf (buffer,"settype ext2_super_block");dispatch (buffer);
+}
+</ProgramListing>
+
+It involves only setting the <Literal remap="tt">copy&lowbar;num</Literal> variable to indicate the main
+copy, dispatching a <Literal remap="tt">setoffset</Literal> command to reach the superblock, and
+dispatching a <Literal remap="tt">settype</Literal> to enable the superblock specific commands.
+This last command will also call the <Literal remap="tt">show</Literal> command of the
+<Literal remap="tt">ext2&lowbar;super&lowbar;block</Literal> type, through dispatching at the general command
+<Literal remap="tt">settype</Literal>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The group command</Title>
+
+<Para>
+The group command will bring the user to the specified group descriptor in
+the main copy of the group descriptors. The type will be set to
+<Literal remap="tt">ext2&lowbar;group&lowbar;desc</Literal>:
+
+<ProgramListing>
+void type_ext2___group (char *command_line)
+
+{
+ long group_num=0;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ group_num=atol (buffer);
+ }
+
+ group_info.copy_num=0;group_info.group_num=0;
+ sprintf (buffer,"setoffset %ld",file_system_info.first_group_desc_offset);dispatch (buffer);
+ sprintf (buffer,"settype ext2_group_desc");dispatch (buffer);
+ sprintf (buffer,"entry %ld",group_num);dispatch (buffer);
+}
+</ProgramListing>
+
+The implementation is as trivial as the <Literal remap="tt">super</Literal> implementation. Note
+the use of the <Literal remap="tt">entry</Literal> command, which is a command of the
+<Literal remap="tt">ext2&lowbar;group&lowbar;desc</Literal> object, to pass to the correct group descriptor.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The cd command</Title>
+
+<Para>
+The <Literal remap="tt">cd</Literal> command performs the usual cd function. The path to the global
+cd command is a path from <Literal remap="tt">/</Literal>.
+</Para>
+
+<Para>
+<Literal remap="tt">This is one of the best examples of the power of the object oriented
+design and of the dispatching mechanism. The operation is complicated, yet the
+implementation is surprisingly short!</Literal>
+</Para>
+
+<Para>
+
+<ProgramListing>
+void type_ext2___cd (char *command_line)
+
+{
+ char temp [80],buffer [80],*ptr;
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");
+ refresh_command_win ();return;
+ }
+ ptr=parse_word (ptr,buffer);
+
+ if (buffer [0] != '/') {
+ wprintw (command_win,"Error - Use a full pathname (begin with '/')\n");
+ refresh_command_win ();return;
+ }
+
+ dispatch ("super");dispatch ("group");dispatch ("inode");
+ dispatch ("next");dispatch ("dir");
+ if (buffer [1] != 0) {
+ sprintf (temp,"cd %s",buffer+1);dispatch (temp);
+ }
+}
+</ProgramListing>
+
+</Para>
+
+<Para>
+Note the number of the dispatch calls!
+</Para>
+
+<Para>
+<Literal remap="tt">super</Literal> is used to get to the superblock. <Literal remap="tt">group</Literal> to get to the
+first group descriptor. <Literal remap="tt">inode</Literal> brings us to the first inode - The bad
+blocks inode. A <Literal remap="tt">next</Literal> is command to pass to the root directory inode,
+a <Literal remap="tt">dir</Literal> command "enters" the directory, and then we let the <Literal remap="tt">object
+specific cd command</Literal> to take us from there (The object is <Literal remap="tt">dir</Literal>, so
+that <Literal remap="tt">dispatch</Literal> will call the <Literal remap="tt">cd</Literal> command of the <Literal remap="tt">dir</Literal> type).
+Note that a symbolic link following could bring us back to the root directory,
+thus the innocent calls above treats nicely such a recursive case!
+</Para>
+
+<Para>
+I feel that the above is <Literal remap="tt">intuitive</Literal> - I was expressing myself "in the
+language" of the ext2 filesystem - (Go to the inode, etc), and the code was
+written exactly in this spirit!
+</Para>
+
+<Para>
+I can write more at this point, but I guess I am already a bit carried
+away with the self compliments :-)
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The superblock</Title>
+
+<Para>
+This section details the handling of the superblock.
+</Para>
+
+<Sect2>
+<Title>The superblock variables</Title>
+
+<Para>
+The superblock object is <Literal remap="tt">ext2&lowbar;super&lowbar;block</Literal>. The definition is just
+taken from the kernel ext2 main include file - /usr/include/linux/ext2&lowbar;fs.h.
+<FOOTNOTE>
+
+<Para>
+Those lines of source are copyrighted by <Literal remap="tt">Remy Card</Literal> - The author of the
+ext2 filesystem, and by <Literal remap="tt">Linus Torvalds</Literal> - The first author of the Linux
+operating system. Please cross reference the section Acknowledgments for the
+full copyright.
+</Para>
+
+</FOOTNOTE>
+
+
+
+<ProgramListing>
+struct ext2_super_block {
+ __u32 s_inodes_count; /* Inodes count */
+ __u32 s_blocks_count; /* Blocks count */
+ __u32 s_r_blocks_count; /* Reserved blocks count */
+ __u32 s_free_blocks_count; /* Free blocks count */
+ __u32 s_free_inodes_count; /* Free inodes count */
+ __u32 s_first_data_block; /* First Data Block */
+ __u32 s_log_block_size; /* Block size */
+ __s32 s_log_frag_size; /* Fragment size */
+ __u32 s_blocks_per_group; /* # Blocks per group */
+ __u32 s_frags_per_group; /* # Fragments per group */
+ __u32 s_inodes_per_group; /* # Inodes per group */
+ __u32 s_mtime; /* Mount time */
+ __u32 s_wtime; /* Write time */
+ __u16 s_mnt_count; /* Mount count */
+ __s16 s_max_mnt_count; /* Maximal mount count */
+ __u16 s_magic; /* Magic signature */
+ __u16 s_state; /* File system state */
+ __u16 s_errors; /* Behavior when detecting errors */
+ __u16 s_pad;
+ __u32 s_lastcheck; /* time of last check */
+ __u32 s_checkinterval; /* max. time between checks */
+ __u32 s_creator_os; /* OS */
+ __u32 s_rev_level; /* Revision level */
+ __u16 s_def_resuid; /* Default uid for reserved blocks */
+ __u16 s_def_resgid; /* Default gid for reserved blocks */
+ __u32 s_reserved[0]; /* Padding to the end of the block */
+ __u32 s_reserved[1]; /* Padding to the end of the block */
+ .
+ .
+ .
+ __u32 s_reserved[234]; /* Padding to the end of the block */
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+Note that I <Literal remap="tt">expanded</Literal> the array due to my primitive parser
+implementation. The various fields are described in the <Literal remap="tt">technical
+document</Literal>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The superblock commands</Title>
+
+<Para>
+This section explains the commands available in the <Literal remap="tt">ext2&lowbar;super&lowbar;block</Literal>
+type. They all appear in <Literal remap="tt">super&lowbar;com.c</Literal>
+</Para>
+
+<Sect3>
+<Title>The show command</Title>
+
+<Para>
+The <Literal remap="tt">show</Literal> command is overridden here in order to provide more
+information than just the list of variables. A <Literal remap="tt">show</Literal> command will end
+up in calling <Literal remap="tt">type&lowbar;super&lowbar;block&lowbar;&lowbar;&lowbar;show</Literal>.
+</Para>
+
+<Para>
+The first thing that we do is calling the <Literal remap="tt">general show command</Literal> in
+order to display the list of variables.
+</Para>
+
+<Para>
+We then add some interpretation to the various lines to make the data
+somewhat more intuitive (Expansion of the time variables and the creator
+operating system code, for example).
+</Para>
+
+<Para>
+We also display the <Literal remap="tt">backup copy number</Literal> of the superblock in the status
+window. This copy number is saved in the <Literal remap="tt">super&lowbar;info</Literal> global variable -
+<Literal remap="tt">super&lowbar;info.copy&lowbar;num</Literal>. Currently, this is the only variable there ...
+but this type of internal variable saving is typical through my
+implementation.
+</Para>
+
+</Sect3>
+
+<Sect3>
+<Title>The backup copies handling commands</Title>
+
+<Para>
+The <Literal remap="tt">current copy number</Literal> is available in <Literal remap="tt">super&lowbar;info.copy&lowbar;num</Literal>. It
+was initialized in the ext2 command <Literal remap="tt">super</Literal>, and is used by the various
+superblock routines.
+</Para>
+
+<Para>
+The <Literal remap="tt">gocopy</Literal> routine will pass to another copy of the superblock. The
+new device offset will be computed with the aid of the variables in the
+<Literal remap="tt">file&lowbar;system&lowbar;info</Literal> structure. Then the routine will <Literal remap="tt">dispatch</Literal> to
+the <Literal remap="tt">setoffset</Literal> and the <Literal remap="tt">show</Literal> routines.
+</Para>
+
+<Para>
+The <Literal remap="tt">setactivecopy</Literal> routine will just save the current superblock data
+in a temporary variable of type <Literal remap="tt">ext2&lowbar;super&lowbar;block</Literal>, and will dispatch
+<Literal remap="tt">gocopy 0</Literal> to pass to the main superblock. Then it will place the saved
+data in place of the actual data.
+</Para>
+
+<Para>
+The above two commands can be used if the main superblock is corrupted.
+</Para>
+
+</Sect3>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The group descriptors</Title>
+
+<Para>
+The group descriptors handling mechanism allows the user to take a tour in
+the group descriptors table, stopping at each point, and examining the
+relevant inode table, block allocation map or inode allocation map through
+dispatching to the relevant objects.
+</Para>
+
+<Para>
+Some information about the group descriptors is available in the global
+variable <Literal remap="tt">group&lowbar;info</Literal>, which is of type <Literal remap="tt">struct&lowbar;group&lowbar;info</Literal>:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct struct_group_info {
+ unsigned long copy_num;
+ unsigned long group_num;
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+<Literal remap="tt">group&lowbar;num</Literal> is the index of the current descriptor in the table.
+</Para>
+
+<Para>
+<Literal remap="tt">copy&lowbar;num</Literal> is the number of the current backup copy.
+</Para>
+
+<Sect2>
+<Title>The group descriptor's variables</Title>
+
+<Para>
+
+<ProgramListing>
+struct ext2_group_desc
+{
+ __u32 bg_block_bitmap; /* Blocks bitmap block */
+ __u32 bg_inode_bitmap; /* Inodes bitmap block */
+ __u32 bg_inode_table; /* Inodes table block */
+ __u16 bg_free_blocks_count; /* Free blocks count */
+ __u16 bg_free_inodes_count; /* Free inodes count */
+ __u16 bg_used_dirs_count; /* Directories count */
+ __u16 bg_pad;
+ __u32 bg_reserved[3];
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+The first three variables are used to provide the links to the
+<Literal remap="tt">blockbitmap, inodebitmap and inode</Literal> objects.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Movement in the table</Title>
+
+<Para>
+Movement in the group descriptors table is done using the <Literal remap="tt">next, prev and
+entry</Literal> commands. Note that the first two commands <Literal remap="tt">override</Literal> the
+general commands of the same name. The <Literal remap="tt">next and prev</Literal> command are just
+calling the <Literal remap="tt">entry</Literal> function to do the job. I will show <Literal remap="tt">next</Literal>,
+for example:
+</Para>
+
+<Para>
+
+<ProgramListing>
+void type_ext2_group_desc___next (char *command_line)
+
+{
+ long entry_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ entry_offset=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",group_info.group_num+entry_offset);
+ dispatch (buffer);
+}
+</ProgramListing>
+
+The <Literal remap="tt">entry</Literal> function is also simple - It just calculates the offset
+using the information in <Literal remap="tt">group&lowbar;info</Literal> and in <Literal remap="tt">file&lowbar;system&lowbar;info</Literal>,
+and uses the usual <Literal remap="tt">setoffset / show</Literal> pair.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The show command</Title>
+
+<Para>
+As usual, the <Literal remap="tt">show</Literal> command is overridden. The implementation is
+similar to the superblock's show implementation - We just call the general
+show command, and add some information in the status window - The contents of
+the <Literal remap="tt">group&lowbar;info</Literal> structure.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Moving between backup copies</Title>
+
+<Para>
+This is done exactly like the superblock case. Please refer to explanation
+there.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Links to the available friends</Title>
+
+<Para>
+From a group descriptor, one typically wants to reach an <Literal remap="tt">inode</Literal>, or
+one of the <Literal remap="tt">allocation bitmaps</Literal>. This is done using the <Literal remap="tt">inode,
+blockbitmap or inodebitmap</Literal> commands. The implementation is again trivial
+- Get the necessary information from the group descriptor, initialize the
+structures of the next type, and issue the <Literal remap="tt">setoffset / settype</Literal> pair.
+</Para>
+
+<Para>
+For example, here is the implementation of the <Literal remap="tt">blockbitmap</Literal> command:
+</Para>
+
+<Para>
+
+<ProgramListing>
+void type_ext2_group_desc___blockbitmap (char *command_line)
+
+{
+ long block_bitmap_offset;
+ char buffer [80];
+
+ block_bitmap_info.entry_num=0;
+ block_bitmap_info.group_num=group_info.group_num;
+
+ block_bitmap_offset=type_data.u.t_ext2_group_desc.bg_block_bitmap;
+ sprintf (buffer,"setoffset block %ld",block_bitmap_offset);dispatch (buffer);
+ sprintf (buffer,"settype block_bitmap");dispatch (buffer);
+}
+</ProgramListing>
+
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The inode table</Title>
+
+<Para>
+The inode handling enables the user to move in the inode table, edit the
+various attributes of the inode, and follow to the next stage - A file or a
+directory.
+</Para>
+
+<Sect2>
+<Title>The inode variables</Title>
+
+<Para>
+
+<ProgramListing>
+struct ext2_inode {
+ __u16 i_mode; /* File mode */
+ __u16 i_uid; /* Owner Uid */
+ __u32 i_size; /* Size in bytes */
+ __u32 i_atime; /* Access time */
+ __u32 i_ctime; /* Creation time */
+ __u32 i_mtime; /* Modification time */
+ __u32 i_dtime; /* Deletion Time */
+ __u16 i_gid; /* Group Id */
+ __u16 i_links_count; /* Links count */
+ __u32 i_blocks; /* Blocks count */
+ __u32 i_flags; /* File flags */
+ union {
+ struct {
+ __u32 l_i_reserved1;
+ } linux1;
+ struct {
+ __u32 h_i_translator;
+ } hurd1;
+ } osd1; /* OS dependent 1 */
+ __u32 i_block[EXT2_N_BLOCKS]; /* Pointers to blocks */
+ __u32 i_version; /* File version (for NFS) */
+ __u32 i_file_acl; /* File ACL */
+ __u32 i_size_high; /* High 32bits of size */
+ __u32 i_faddr; /* Fragment address */
+ union {
+ struct {
+ __u8 l_i_frag; /* Fragment number */
+ __u8 l_i_fsize; /* Fragment size */
+ __u16 i_pad1;
+ __u32 l_i_reserved2[2];
+ } linux2;
+ struct {
+ __u8 h_i_frag; /* Fragment number */
+ __u8 h_i_fsize; /* Fragment size */
+ __u16 h_i_mode_high;
+ __u16 h_i_uid_high;
+ __u16 h_i_gid_high;
+ __u32 h_i_author;
+ } hurd2;
+ } osd2; /* OS dependent 2 */
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+The above is the original source code definition. We can see that the inode
+supports <Literal remap="tt">Operating systems specific structures</Literal>. In addition to the
+expansion of the arrays, I have <Literal remap="tt">"flattened</Literal> the inode to support only
+the <Literal remap="tt">Linux</Literal> declaration. It seemed that this one occasion of multiple
+variable aliases didn't justify the complication of generally supporting
+aliases. In any case, the above system specific variables are not used
+internally by EXT2ED, and the user is free to change the definition in
+<Literal remap="tt">ext2.descriptors</Literal> to accommodate for his needs.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The handling functions</Title>
+
+<Para>
+The user interface to <Literal remap="tt">movement</Literal> is the usual <Literal remap="tt">next / prev /
+entry</Literal> interface. There is really nothing special in those functions - The
+size of the inode is fixed, the total number of inodes is known from the
+superblock information, and the current entry can be figured up from the
+device offset and the inode table start offset, which is known from the
+corresponding group descriptor. Those functions are a bit older then some
+other implementations of <Literal remap="tt">next</Literal> and <Literal remap="tt">prev</Literal>, and they do not save
+information in a special structure. Rather, they recompute it when
+necessary.
+</Para>
+
+<Para>
+The <Literal remap="tt">show</Literal> command is overridden here, and provides a lot of additional
+information about the inode - Its type, interpretation of the permissions,
+special ext2 attributes (Immutable file, for example), and a lot more.
+Again, the <Literal remap="tt">general show</Literal> is called first, and then the additional
+information is written.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Accessing files and directories</Title>
+
+<Para>
+From the inode, a <Literal remap="tt">file</Literal> or a <Literal remap="tt">directory</Literal> can typically be reached.
+In order to treat a file, for example, its inode needs to be constantly
+accessed. To satisfy that need, when editing a file or a directory, the
+inode is still saved in memory - <Literal remap="tt">type&lowbar;data</Literal> is not overwritten.
+Rather, the following takes place:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ An internal global structure which is used by the types <Literal remap="tt">file</Literal>
+and <Literal remap="tt">dir</Literal> handling functions is initialized by calling the
+appropriate function.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The type is changed accordingly.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+The result is that a <Literal remap="tt">settype ext2&lowbar;inode</Literal> is the only action necessary
+to return to the inode - We actually never left it.
+</Para>
+
+<Para>
+Follows the implementation of the inode's <Literal remap="tt">file</Literal> command:
+</Para>
+
+<Para>
+
+<ProgramListing>
+void type_ext2_inode___file (char *command_line)
+
+{
+ char buffer [80];
+
+ if (!S_ISREG (type_data.u.t_ext2_inode.i_mode)) {
+ wprintw (command_win,"Error - Inode type is not file\n");
+ refresh_command_win (); return;
+ }
+
+ if (!init_file_info ()) {
+ wprintw (command_win,"Error - Unable to show file\n");
+ refresh_command_win ();return;
+ }
+
+ sprintf (buffer,"settype file");dispatch (buffer);
+}
+</ProgramListing>
+
+</Para>
+
+<Para>
+As we can see - We just call <Literal remap="tt">init&lowbar;file&lowbar;info</Literal> to get the necessary
+information from the inode, and set the type to <Literal remap="tt">file</Literal>. The next call
+to <Literal remap="tt">show</Literal>, will dispatch to the <Literal remap="tt">file's show</Literal> implementation.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Viewing a file</Title>
+
+<Para>
+There isn't an ext2 kernel structure which corresponds to a file - A file is
+just a series of blocks which are determined by its inode. As explained in
+the last section, the inode is never actually left - The type is changed to
+<Literal remap="tt">file</Literal> - A type which contains no variables, and a special structure is
+initialized:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct struct_file_info {
+
+ struct ext2_inodes *inode_ptr;
+
+ long inode_offset;
+ long global_block_num,global_block_offset;
+ long block_num,blocks_count;
+ long file_offset,file_length;
+ long level;
+ unsigned char buffer [EXT2_MAX_BLOCK_SIZE];
+ long offset_in_block;
+
+ int display;
+ /* The following is used if the file is a directory */
+
+ long dir_entry_num,dir_entries_count;
+ long dir_entry_offset;
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+The <Literal remap="tt">inode&lowbar;ptr</Literal> will just point to the inode in <Literal remap="tt">type&lowbar;data</Literal>, which
+is not overwritten while the user is editing the file, as the
+<Literal remap="tt">setoffset</Literal> command is not internally used. The <Literal remap="tt">buffer</Literal>
+will contain the current viewed block of the file. The other variables
+contain information about the current place in the file. For example,
+<Literal remap="tt">global&lowbar;block&lowbar;num</Literal> just contains the current block number.
+</Para>
+
+<Para>
+The general idea is that the above data structure will provide the file
+handling functions all the accurate information which is needed to accomplish
+their task.
+</Para>
+
+<Para>
+The global structure of the above type, <Literal remap="tt">file&lowbar;info</Literal>, is initialized by
+<Literal remap="tt">init&lowbar;file&lowbar;info</Literal> in <Literal remap="tt">file&lowbar;com.c</Literal>, which is called by the
+<Literal remap="tt">type&lowbar;ext2&lowbar;inode&lowbar;&lowbar;&lowbar;file</Literal> function when the user requests to watch the
+file. <Literal remap="tt">It is updated as necessary to provide accurate information as long as
+the file is edited.</Literal>
+</Para>
+
+<Sect2>
+<Title>Returning to the file's inode</Title>
+
+<Para>
+Concerning the method I used to handle files, the above task is trivial:
+
+<ProgramListing>
+void type_file___inode (char *command_line)
+
+{
+ dispatch ("settype ext2_inode");
+}
+</ProgramListing>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>File movement</Title>
+
+<Para>
+EXT2ED keeps track of the current position in the file. Movement inside the
+current block is done using <Literal remap="tt">next, prev and offset</Literal> - They just change
+<Literal remap="tt">file&lowbar;info.offset&lowbar;in&lowbar;block</Literal>.
+</Para>
+
+<Para>
+Movement between blocks is done using <Literal remap="tt">nextblock, prevblock and block</Literal>.
+To accomplish this, the direct blocks, indirect blocks, etc, need to be
+traced. This is done by <Literal remap="tt">file&lowbar;block&lowbar;to&lowbar;global&lowbar;block</Literal>, which accepts a
+file's internal block number, and converts it to the actual filesystem block
+number.
+</Para>
+
+<Para>
+
+<ProgramListing>
+long file_block_to_global_block (long file_block,struct struct_file_info *file_info_ptr)
+
+{
+ long last_direct,last_indirect,last_dindirect;
+ long f_indirect,s_indirect;
+
+ last_direct=EXT2_NDIR_BLOCKS-1;
+ last_indirect=last_direct+file_system_info.block_size/4;
+ last_dindirect=last_indirect+(file_system_info.block_size/4) \
+ *(file_system_info.block_size/4);
+
+ if (file_block &#60;= last_direct) {
+ file_info_ptr-&#62;level=0;
+ return (file_info_ptr-&#62;inode_ptr-&#62;i_block [file_block]);
+ }
+
+ if (file_block &#60;= last_indirect) {
+ file_info_ptr-&#62;level=1;
+ file_block=file_block-last_direct-1;
+ return (return_indirect (file_info_ptr-&#62;inode_ptr-&#62; \
+ i_block [EXT2_IND_BLOCK],file_block));
+ }
+
+ if (file_block &#60;= last_dindirect) {
+ file_info_ptr-&#62;level=2;
+ file_block=file_block-last_indirect-1;
+ return (return_dindirect (file_info_ptr-&#62;inode_ptr-&#62; \
+ i_block [EXT2_DIND_BLOCK],file_block));
+ }
+
+ file_info_ptr-&#62;level=3;
+ file_block=file_block-last_dindirect-1;
+ return (return_tindirect (file_info_ptr-&#62;inode_ptr-&#62; \
+ i_block [EXT2_TIND_BLOCK],file_block));
+}
+</ProgramListing>
+
+<Literal remap="tt">last&lowbar;direct, last&lowbar;indirect, etc</Literal>, contain the last internal block number
+which is accessed by this method - If the requested block is smaller then
+<Literal remap="tt">last&lowbar;direct</Literal>, for example, it is a direct block.
+</Para>
+
+<Para>
+If the block is a direct block, its number is just taken from the inode.
+A non-direct block is handled by <Literal remap="tt">return&lowbar;indirect, return&lowbar;dindirect and
+return&lowbar;tindirect</Literal>, which correspond to indirect, double-indirect and
+triple-indirect. Each of the above functions is constructed using the lower
+level functions. For example, <Literal remap="tt">return&lowbar;dindirect</Literal> is constructed as
+follows:
+</Para>
+
+<Para>
+
+<ProgramListing>
+long return_dindirect (long table_block,long block_num)
+
+{
+ long f_indirect;
+
+ f_indirect=block_num/(file_system_info.block_size/4);
+ f_indirect=return_indirect (table_block,f_indirect);
+ return (return_indirect (f_indirect,block_num%(file_system_info.block_size/4)));
+}
+</ProgramListing>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Object memory</Title>
+
+<Para>
+The <Literal remap="tt">remember</Literal> command is overridden here and in the <Literal remap="tt">dir</Literal> type -
+We just remember the inode of the file. It is just simpler to implement, and
+doesn't seem like a big limitation.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Changing data</Title>
+
+<Para>
+The <Literal remap="tt">set</Literal> command is overridden, and provides the same functionality
+like the usage of the <Literal remap="tt">general set</Literal> command with no type declared. The
+<Literal remap="tt">writedata</Literal> is overridden so that we'll write the edited block
+(file&lowbar;info.buffer) and not <Literal remap="tt">type&lowbar;data</Literal> (Which contains the inode).
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Directories</Title>
+
+<Para>
+A directory is just a file which is formatted according to a special format.
+As such, EXT2ED handles directories and files quite alike. Specifically, the
+same variable of type <Literal remap="tt">struct&lowbar;file&lowbar;info</Literal> which is used in the
+<Literal remap="tt">file</Literal>, is used here.
+</Para>
+
+<Para>
+The <Literal remap="tt">dir</Literal> type uses all the variables in the above structure, as
+opposed to the <Literal remap="tt">file</Literal> type, which didn't use the last ones.
+</Para>
+
+<Sect2>
+<Title>The search&lowbar;dir&lowbar;entries function</Title>
+
+<Para>
+The entire situation is similar to that which was described in the
+<Literal remap="tt">file</Literal> type, with one main change:
+</Para>
+
+<Para>
+The main function in <Literal remap="tt">dir&lowbar;com.c</Literal> is <Literal remap="tt">search&lowbar;dir&lowbar;entries</Literal>. This
+function will <Literal remap="tt">"run"</Literal> on the entire entries in the directory, and will
+call a client's function each time. The client's function is supplied as an
+argument, and will check the current entry for a match, based on its own
+criterion. It will then signal <Literal remap="tt">search&lowbar;dir&lowbar;entries</Literal> whether to
+<Literal remap="tt">ABORT</Literal> the search, whether it <Literal remap="tt">FOUND</Literal> the entry it was looking
+for, or that the entry is still not found, and we should <Literal remap="tt">CONTINUE</Literal>
+searching. Follows the declaration:
+
+<ProgramListing>
+struct struct_file_info search_dir_entries \
+ (int (*action) (struct struct_file_info *info),int *status)
+
+/*
+ This routine runs on all directory entries in the current directory.
+ For each entry, action is called. The return code of action is one of
+ the following:
+
+ ABORT - Current dir entry is returned.
+ CONTINUE - Continue searching.
+ FOUND - Current dir entry is returned.
+
+ If the last entry is reached, it is returned, along with an ABORT status.
+
+ status is updated to the returned code of action.
+*/
+</ProgramListing>
+
+</Para>
+
+<Para>
+With the above tool in hand, many operations are simple to perform - Here is
+the way I counted the entries in the current directory:
+</Para>
+
+<Para>
+
+<ProgramListing>
+long count_dir_entries (void)
+
+{
+ int status;
+
+ return (search_dir_entries (&amp;action_count,&amp;status).dir_entry_num);
+}
+
+int action_count (struct struct_file_info *info)
+
+{
+ return (CONTINUE);
+}
+</ProgramListing>
+
+It will just <Literal remap="tt">CONTINUE</Literal> until the last entry. The returned structure
+(of type <Literal remap="tt">struct&lowbar;file&lowbar;info</Literal>) will have its number in the
+<Literal remap="tt">dir&lowbar;entry&lowbar;num</Literal> field, and this is exactly the required number!
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The cd command</Title>
+
+<Para>
+The <Literal remap="tt">cd</Literal> command accepts a relative path, and moves there ...
+The implementation is of-course a bit more complicated:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ The path is checked that it is not an absolute path (from <Literal remap="tt">/</Literal>).
+If it is, we let the <Literal remap="tt">general cd</Literal> to do the job by calling
+directly <Literal remap="tt">type&lowbar;ext2&lowbar;&lowbar;&lowbar;cd</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The path is divided into the nearest path and the rest of the path.
+For example, cd 1/2/3/4 is divided into <Literal remap="tt">1</Literal> and into
+<Literal remap="tt">2/3/4</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ It is the first part of the path that we need to search for in the
+current directory. We search for it using <Literal remap="tt">search&lowbar;dir&lowbar;entries</Literal>,
+which accepts the <Literal remap="tt">action&lowbar;name</Literal> function as the user defined
+function.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">search&lowbar;dir&lowbar;entries</Literal> will scan the entire entries and will call
+our <Literal remap="tt">action&lowbar;name</Literal> function for each entry. In
+<Literal remap="tt">action&lowbar;name</Literal>, the required name will be checked against the
+name of the current entry, and <Literal remap="tt">FOUND</Literal> will be returned when a
+match occurs.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ If the required entry is found, we dispatch a <Literal remap="tt">remember</Literal>
+command to insert the current <Literal remap="tt">inode</Literal> into the object memory.
+This is required to easily support <Literal remap="tt">symbolic links</Literal> - If we
+find later that the inode pointed by the entry is actually a
+symbolic link, we'll need to return to this point, and the above
+inode doesn't have (and can't have, because of <Literal remap="tt">hard links</Literal>) the
+information necessary to "move back".
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ We then dispatch a <Literal remap="tt">followinode</Literal> command to reach the inode
+pointed by the required entry. This command will automatically
+change the type to <Literal remap="tt">ext2&lowbar;inode</Literal> - We are now at an inode, and
+all the inode commands are available.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ We check the inode's type to see if it is a directory. If it is, we
+dispatch a <Literal remap="tt">dir</Literal> command to "enter the directory", and
+recursively call ourself (The type is <Literal remap="tt">dir</Literal> again) by
+dispatching a <Literal remap="tt">cd</Literal> command, with the rest of the path as an
+argument.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ If the inode's type is a symbolic link (only fast symbolic link were
+meanwhile implemented. I guess this is typically the case.), we note
+the path it is pointing at, the saved inode is recalled, we dispatch
+<Literal remap="tt">dir</Literal> to get back to the original directory, and we call
+ourself again with the <Literal remap="tt">link path/rest of the path</Literal> argument.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ In any other case, we just stop at the resulting inode.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The block and inode allocation bitmaps</Title>
+
+<Para>
+The block allocation bitmap is reached by the corresponding group descriptor.
+The group descriptor handling functions will save the necessary information
+into a structure of the <Literal remap="tt">struct&lowbar;block&lowbar;bitmap&lowbar;info</Literal> type:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct struct_block_bitmap_info {
+ unsigned long entry_num;
+ unsigned long group_num;
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+The <Literal remap="tt">show</Literal> command is overridden, and will show the block as a series of
+bits, each bit corresponding to a block. The main variable is the
+<Literal remap="tt">entry&lowbar;num</Literal> variable, declared above, which is just the current block
+number in this block group. The current entry is highlighted, and the
+<Literal remap="tt">next, prev and entry</Literal> commands just change the above variable.
+</Para>
+
+<Para>
+The <Literal remap="tt">allocate and deallocate</Literal> change the specified bits. Nothing
+special about them - They just contain code which converts between bit and
+byte locations.
+</Para>
+
+<Para>
+The <Literal remap="tt">inode allocation bitmap</Literal> is treated in much the same fashion, with
+the same commands available.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Filesystem size limitation</Title>
+
+<Para>
+While an ext2 filesystem has a size limit of <Literal remap="tt">4 TB</Literal>, EXT2ED currently
+<Literal remap="tt">can't</Literal> handle filesystems which are <Literal remap="tt">bigger than 2 GB</Literal>.
+</Para>
+
+<Para>
+This limitation results from my usage of <Literal remap="tt">32 bit long variables</Literal> and
+of the <Literal remap="tt">fseek</Literal> filesystem call, which can't seek up to 4 TB.
+</Para>
+
+<Para>
+By looking in the <Literal remap="tt">ext2 library</Literal> source code by <Literal remap="tt">Theodore Ts'o</Literal>,
+I discovered the <Literal remap="tt">llseek</Literal> system call which can seek to a
+<Literal remap="tt">64 bit unsigned long long</Literal> offset. Correcting the situation is not
+difficult in concept - I need to change long into unsigned long long where
+appropriate and modify <Literal remap="tt">disk.c</Literal> to use the llseek system call.
+</Para>
+
+<Para>
+However, fixing the above limitation involves making changes in many places
+in the code and will obviously make the entire code less stable. For that
+reason, I chose to release EXT2ED as it is now and to postpone the above fix
+to the next release.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Conclusion</Title>
+
+<Para>
+Had I known in advance the structure of the ext2 filesystem, I feel that
+the resulting design would have been quite different from the presented
+design above.
+</Para>
+
+<Para>
+EXT2ED has now two levels of abstraction - A <Literal remap="tt">general</Literal> filesystem, and an
+<Literal remap="tt">ext2</Literal> filesystem, and the surface is more or less prepared for additions
+of other filesystems. Had I approached the design in the "engineering" way,
+I guess that the first level above would not have existed.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Copyright</Title>
+
+<Para>
+EXT2ED is Copyright (C) 1995 Gadi Oxman.
+</Para>
+
+<Para>
+EXT2ED is hereby placed under the GPL - Gnu Public License. You are free and
+welcome to copy, view and modify the sources. My only wish is that my
+copyright presented above will be left and that a list of the bug fixes,
+added features, etc, will be provided.
+</Para>
+
+<Para>
+The entire EXT2ED project is based, of-course, on the kernel sources. The
+<Literal remap="tt">ext2.descriptors</Literal> distributed with EXT2ED is a slightly modified
+version of the main ext2 include file, /usr/include/linux/ext2&lowbar;fs.h. Follows
+the original copyright:
+</Para>
+
+<Para>
+
+<ProgramListing>
+/*
+ * linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * from
+ *
+ * linux/include/linux/minix_fs.h
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+</ProgramListing>
+
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Acknowledgments</Title>
+
+<Para>
+EXT2ED was constructed as a student project in the software
+laboratory of the faculty of electrical-engineering in the
+<Literal remap="tt">Technion - Israel's institute of technology</Literal>.
+</Para>
+
+<Para>
+At first, I would like to thank <Literal remap="tt">Avner Lottem</Literal> and <Literal remap="tt">Doctor Ilana
+David</Literal> for their interest and assistance in this project.
+</Para>
+
+<Para>
+I would also like to thank the following people, who were involved in the
+design and implementation of the ext2 filesystem kernel code and support
+utilities:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Remy Card</Literal>
+
+Who designed, implemented and maintains the ext2 filesystem kernel
+code, and some of the ext2 utilities. <Literal remap="tt">Remy Card</Literal> is also the
+author of several helpful slides concerning the ext2 filesystem.
+Specifically, he is the author of <Literal remap="tt">File Management in the Linux
+Kernel</Literal> and of <Literal remap="tt">The Second Extended File System - Current
+State, Future Development</Literal>.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Wayne Davison</Literal>
+
+Who designed the ext2 filesystem.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Stephen Tweedie</Literal>
+
+Who helped designing the ext2 filesystem kernel code and wrote the
+slides <Literal remap="tt">Optimizations in File Systems</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Theodore Ts'o</Literal>
+
+Who is the author of several ext2 utilities and of the ext2 library
+<Literal remap="tt">libext2fs</Literal> (which I didn't use, simply because I didn't know
+it exists when I started to work on my project).
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+Lastly, I would like to thank, of-course, <Literal remap="tt">Linus Torvalds</Literal> and the
+<Literal remap="tt">Linux community</Literal> for providing all of us with such a great operating
+system.
+</Para>
+
+<Para>
+Please contact me in a case of bug report, suggestions, or just about
+anything concerning EXT2ED.
+</Para>
+
+<Para>
+Enjoy,
+</Para>
+
+<Para>
+Gadi Oxman &lt;tgud@tochnapc2.technion.ac.il&gt;
+</Para>
+
+<Para>
+Haifa, August 95
+</Para>
+
+</Sect1>
+
+</Article>
diff --git a/ext2ed/doc/ext2fs-overview.sgml b/ext2ed/doc/ext2fs-overview.sgml
new file mode 100644
index 0000000..0d54f07
--- /dev/null
+++ b/ext2ed/doc/ext2fs-overview.sgml
@@ -0,0 +1,1569 @@
+<!DOCTYPE Article PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
+
+<Article>
+
+<ArtHeader>
+
+<Title>The extended-2 filesystem overview</Title>
+<AUTHOR
+>
+<FirstName>Gadi Oxman, tgud@tochnapc2.technion.ac.il</FirstName>
+</AUTHOR
+>
+<PubDate>v0.1, August 3 1995</PubDate>
+
+</ArtHeader>
+
+<Sect1>
+<Title>Preface</Title>
+
+<Para>
+This document attempts to present an overview of the internal structure of
+the ext2 filesystem. It was written in summer 95, while I was working on the
+<Literal remap="tt">ext2 filesystem editor project (EXT2ED)</Literal>.
+</Para>
+
+<Para>
+In the process of constructing EXT2ED, I acquired knowledge of the various
+design aspects of the the ext2 filesystem. This document is a result of an
+effort to document this knowledge.
+</Para>
+
+<Para>
+This is only the initial version of this document. It is obviously neither
+error-prone nor complete, but at least it provides a starting point.
+</Para>
+
+<Para>
+In the process of learning the subject, I have used the following sources /
+tools:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Experimenting with EXT2ED, as it was developed.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The ext2 kernel sources:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The main ext2 include file,
+<FILENAME>/usr/include/linux/ext2&lowbar;fs.h</FILENAME>
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The contents of the directory <FILENAME>/usr/src/linux/fs/ext2</FILENAME>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The VFS layer sources (only a bit).
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The slides: The Second Extended File System, Current State, Future
+Development, by <personname><firstname>Remy</firstname> <surname>Card</surname></personname>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The slides: Optimisation in File Systems, by <personname><firstname>Stephen</firstname> <surname>Tweedie</surname></personname>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The various ext2 utilities.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Introduction</Title>
+
+<Para>
+The <Literal remap="tt">Second Extended File System (Ext2fs)</Literal> is very popular among Linux
+users. If you use Linux, chances are that you are using the ext2 filesystem.
+</Para>
+
+<Para>
+Ext2fs was designed by <personname><firstname>Remy</firstname> <surname>Card</surname></personname> and <personname><firstname>Wayne</firstname> <surname>Davison</surname></personname>. It was
+implemented by <personname><firstname>Remy</firstname> <surname>Card</surname></personname> and was further enhanced by <personname><firstname>Stephen</firstname>
+<surname>Tweedie</surname></personname> and <personname><firstname>Theodore</firstname> <surname>Ts'o</surname></personname>.
+</Para>
+
+<Para>
+The ext2 filesystem is still under development. I will document here
+version 0.5a, which is distributed along with Linux 1.2.x. At this time of
+writing, the most recent version of Linux is 1.3.13, and the version of the
+ext2 kernel source is 0.5b. A lot of fancy enhancements are planned for the
+ext2 filesystem in Linux 1.3, so stay tuned.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>A filesystem - Why do we need it?</Title>
+
+<Para>
+I thought that before we dive into the various small details, I'll reserve a
+few minutes for the discussion of filesystems from a general point of view.
+</Para>
+
+<Para>
+A <Literal remap="tt">filesystem</Literal> consists of two word - <Literal remap="tt">file</Literal> and <Literal remap="tt">system</Literal>.
+</Para>
+
+<Para>
+Everyone knows the meaning of the word <Literal remap="tt">file</Literal> - A bunch of data put
+somewhere. where? This is an important question. I, for example, usually
+throw almost everything into a single drawer, and have difficulties finding
+something later.
+</Para>
+
+<Para>
+This is where the <Literal remap="tt">system</Literal> comes in - Instead of just throwing the data
+to the device, we generalize and construct a <Literal remap="tt">system</Literal> which will
+virtualize for us a nice and ordered structure in which we could arrange our
+data in much the same way as books are arranged in a library. The purpose of
+the filesystem, as I understand it, is to make it easy for us to update and
+maintain our data.
+</Para>
+
+<Para>
+Normally, by <Literal remap="tt">mounting</Literal> filesystems, we just use the nice and logical
+virtual structure. However, the disk knows nothing about that - The device
+driver views the disk as a large continuous paper in which we can write notes
+wherever we wish. It is the task of the filesystem management code to store
+bookkeeping information which will serve the kernel for showing us the nice
+and ordered virtual structure.
+</Para>
+
+<Para>
+In this document, we consider one particular administrative structure - The
+Second Extended Filesystem.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>The Linux VFS layer</Title>
+
+<Para>
+When Linux was first developed, it supported only one filesystem - The
+<Literal remap="tt">Minix</Literal> filesystem. Today, Linux has the ability to support several
+filesystems concurrently. This was done by the introduction of another layer
+between the kernel and the filesystem code - The Virtual File System (VFS).
+</Para>
+
+<Para>
+The kernel "speaks" with the VFS layer. The VFS layer passes the kernel's
+request to the proper filesystem management code. I haven't learned much of
+the VFS layer as I didn't need it for the construction of EXT2ED so that I
+can't elaborate on it. Just be aware that it exists.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>About blocks and block groups</Title>
+
+<Para>
+In order to ease management, the ext2 filesystem logically divides the disk
+into small units called <Literal remap="tt">blocks</Literal>. A block is the smallest unit which
+can be allocated. Each block in the filesystem can be <Literal remap="tt">allocated</Literal> or
+<Literal remap="tt">free</Literal>.
+<FOOTNOTE>
+
+<Para>
+The Ext2fs source code refers to the concept of <Literal remap="tt">fragments</Literal>, which I
+believe are supposed to be sub-block allocations. As far as I know,
+fragments are currently unsupported in Ext2fs.
+</Para>
+
+</FOOTNOTE>
+
+The block size can be selected to be 1024, 2048 or 4096 bytes when creating
+the filesystem.
+</Para>
+
+<Para>
+Ext2fs groups together a fixed number of sequential blocks into a <Literal remap="tt">group
+block</Literal>. The resulting situation is that the filesystem is managed as a
+series of group blocks. This is done in order to keep related information
+physically close on the disk and to ease the management task. As a result,
+much of the filesystem management reduces to management of a single blocks
+group.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>The view of inodes from the point of view of a blocks group</Title>
+
+<Para>
+Each file in the filesystem is reserved a special <Literal remap="tt">inode</Literal>. I don't want
+to explain inodes now. Rather, I would like to treat it as another resource,
+much like a <Literal remap="tt">block</Literal> - Each blocks group contains a limited number of
+inode, while any specific inode can be <Literal remap="tt">allocated</Literal> or
+<Literal remap="tt">unallocated</Literal>.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>The group descriptors</Title>
+
+<Para>
+Each blocks group is accompanied by a <Literal remap="tt">group descriptor</Literal>. The group
+descriptor summarizes some necessary information about the specific group
+block. Follows the definition of the group descriptor, as defined in
+<FILENAME>/usr/include/linux/ext2&lowbar;fs.h</FILENAME>:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct ext2_group_desc
+{
+ __u32 bg_block_bitmap; /* Blocks bitmap block */
+ __u32 bg_inode_bitmap; /* Inodes bitmap block */
+ __u32 bg_inode_table; /* Inodes table block */
+ __u16 bg_free_blocks_count; /* Free blocks count */
+ __u16 bg_free_inodes_count; /* Free inodes count */
+ __u16 bg_used_dirs_count; /* Directories count */
+ __u16 bg_pad;
+ __u32 bg_reserved[3];
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+The last three variables: <Literal remap="tt">bg&lowbar;free&lowbar;blocks&lowbar;count, bg&lowbar;free&lowbar;inodes&lowbar;count and bg&lowbar;used&lowbar;dirs&lowbar;count</Literal> provide statistics about the use of the three
+resources in a blocks group - The <Literal remap="tt">blocks</Literal>, the <Literal remap="tt">inodes</Literal> and the
+<Literal remap="tt">directories</Literal>. I believe that they are used by the kernel for balancing
+the load between the various blocks groups.
+</Para>
+
+<Para>
+<Literal remap="tt">bg&lowbar;block&lowbar;bitmap</Literal> contains the block number of the <Literal remap="tt">block allocation
+bitmap block</Literal>. This is used to allocate / deallocate each block in the
+specific blocks group.
+</Para>
+
+<Para>
+<Literal remap="tt">bg&lowbar;inode&lowbar;bitmap</Literal> is fully analogous to the previous variable - It
+contains the block number of the <Literal remap="tt">inode allocation bitmap block</Literal>, which
+is used to allocate / deallocate each specific inode in the filesystem.
+</Para>
+
+<Para>
+<Literal remap="tt">bg&lowbar;inode&lowbar;table</Literal> contains the block number of the start of the
+<Literal remap="tt">inode table of the current blocks group</Literal>. The <Literal remap="tt">inode table</Literal> is
+just the actual inodes which are reserved for the current block.
+</Para>
+
+<Para>
+The block bitmap block, inode bitmap block and the inode table are created
+when the filesystem is created.
+</Para>
+
+<Para>
+The group descriptors are placed one after the other. Together they make the
+<Literal remap="tt">group descriptors table</Literal>.
+</Para>
+
+<Para>
+Each blocks group contains the entire table of group descriptors in its
+second block, right after the superblock. However, only the first copy (in
+group 0) is actually used by the kernel. The other copies are there for
+backup purposes and can be of use if the main copy gets corrupted.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>The block bitmap allocation block</Title>
+
+<Para>
+Each blocks group contains one special block which is actually a map of the
+entire blocks in the group, with respect to their allocation status. Each
+<Literal remap="tt">bit</Literal> in the block bitmap indicated whether a specific block in the
+group is used or free.
+</Para>
+
+<Para>
+The format is actually quite simple - Just view the entire block as a series
+of bits. For example,
+</Para>
+
+<Para>
+Suppose the block size is 1024 bytes. As such, there is a place for
+1024*8=8192 blocks in a group block. This number is one of the fields in the
+filesystem's <Literal remap="tt">superblock</Literal>, which will be explained later.
+</Para>
+
+<Para>
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Block 0 in the blocks group is managed by bit 0 of byte 0 in the bitmap
+block.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Block 7 in the blocks group is managed by bit 7 of byte 0 in the bitmap
+block.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Block 8 in the blocks group is managed by bit 0 of byte 1 in the bitmap
+block.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Block 8191 in the blocks group is managed by bit 7 of byte 1023 in the
+bitmap block.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+A value of "<Literal remap="tt">1</Literal>" in the appropriate bit signals that the block is
+allocated, while a value of "<Literal remap="tt">0</Literal>" signals that the block is
+unallocated.
+</Para>
+
+<Para>
+You will probably notice that typically, all the bits in a byte contain the
+same value, making the byte's value <Literal remap="tt">0</Literal> or <Literal remap="tt">0ffh</Literal>. This is done by
+the kernel on purpose in order to group related data in physically close
+blocks, since the physical device is usually optimized to handle such a close
+relationship.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>The inode allocation bitmap</Title>
+
+<Para>
+The format of the inode allocation bitmap block is exactly like the format of
+the block allocation bitmap block. The explanation above is valid here, with
+the work <Literal remap="tt">block</Literal> replaced by <Literal remap="tt">inode</Literal>. Typically, there are much less
+inodes then blocks in a blocks group and thus only part of the inode bitmap
+block is used. The number of inodes in a blocks group is another variable
+which is listed in the <Literal remap="tt">superblock</Literal>.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>On the inode and the inode tables</Title>
+
+<Para>
+An inode is a main resource in the ext2 filesystem. It is used for various
+purposes, but the main two are:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Support of files
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Support of directories
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+Each file, for example, will allocate one inode from the filesystem
+resources.
+</Para>
+
+<Para>
+An ext2 filesystem has a total number of available inodes which is determined
+while creating the filesystem. When all the inodes are used, for example, you
+will not be able to create an additional file even though there will still
+be free blocks on the filesystem.
+</Para>
+
+<Para>
+Each inode takes up 128 bytes in the filesystem. By default, <Literal remap="tt">mke2fs</Literal>
+reserves an inode for each 4096 bytes of the filesystem space.
+</Para>
+
+<Para>
+The inodes are placed in several tables, each of which contains the same
+number of inodes and is placed at a different blocks group. The goal is to
+place inodes and their related files in the same blocks group because of
+locality arguments.
+</Para>
+
+<Para>
+The number of inodes in a blocks group is available in the superblock variable
+<Literal remap="tt">s&lowbar;inodes&lowbar;per&lowbar;group</Literal>. For example, if there are 2000 inodes per group,
+group 0 will contain the inodes 1-2000, group 2 will contain the inodes
+2001-4000, and so on.
+</Para>
+
+<Para>
+Each inode table is accessed from the group descriptor of the specific
+blocks group which contains the table.
+</Para>
+
+<Para>
+Follows the structure of an inode in Ext2fs:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct ext2_inode {
+ __u16 i_mode; /* File mode */
+ __u16 i_uid; /* Owner Uid */
+ __u32 i_size; /* Size in bytes */
+ __u32 i_atime; /* Access time */
+ __u32 i_ctime; /* Creation time */
+ __u32 i_mtime; /* Modification time */
+ __u32 i_dtime; /* Deletion Time */
+ __u16 i_gid; /* Group Id */
+ __u16 i_links_count; /* Links count */
+ __u32 i_blocks; /* Blocks count */
+ __u32 i_flags; /* File flags */
+ union {
+ struct {
+ __u32 l_i_reserved1;
+ } linux1;
+ struct {
+ __u32 h_i_translator;
+ } hurd1;
+ struct {
+ __u32 m_i_reserved1;
+ } masix1;
+ } osd1; /* OS dependent 1 */
+ __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
+ __u32 i_version; /* File version (for NFS) */
+ __u32 i_file_acl; /* File ACL */
+ __u32 i_size_high; /* High 32bits of size */
+ __u32 i_faddr; /* Fragment address */
+ union {
+ struct {
+ __u8 l_i_frag; /* Fragment number */
+ __u8 l_i_fsize; /* Fragment size */
+ __u16 i_pad1;
+ __u32 l_i_reserved2[2];
+ } linux2;
+ struct {
+ __u8 h_i_frag; /* Fragment number */
+ __u8 h_i_fsize; /* Fragment size */
+ __u16 h_i_mode_high;
+ __u16 h_i_uid_high;
+ __u16 h_i_gid_high;
+ __u32 h_i_author;
+ } hurd2;
+ struct {
+ __u8 m_i_frag; /* Fragment number */
+ __u8 m_i_fsize; /* Fragment size */
+ __u16 m_pad1;
+ __u32 m_i_reserved2[2];
+ } masix2;
+ } osd2; /* OS dependent 2 */
+};
+</ProgramListing>
+
+</Para>
+
+<Sect2>
+<Title>The allocated blocks</Title>
+
+<Para>
+The basic functionality of an inode is to group together a series of
+allocated blocks. There is no limitation on the allocated blocks - Each
+block can be allocated to each inode. Nevertheless, block allocation will
+usually be done in series to take advantage of the locality principle.
+</Para>
+
+<Para>
+The inode is not always used in that way. I will now explain the allocation
+of blocks, assuming that the current inode type indeed refers to a list of
+allocated blocks.
+</Para>
+
+<Para>
+It was found experimentally that many of the files in the filesystem are
+actually quite small. To take advantage of this effect, the kernel provides
+storage of up to 12 block numbers in the inode itself. Those blocks are
+called <Literal remap="tt">direct blocks</Literal>. The advantage is that once the kernel has the
+inode, it can directly access the file's blocks, without an additional disk
+access. Those 12 blocks are directly specified in the variables
+<Literal remap="tt">i&lowbar;block[0] to i&lowbar;block[11]</Literal>.
+</Para>
+
+<Para>
+<Literal remap="tt">i&lowbar;block[12]</Literal> is the <Literal remap="tt">indirect block</Literal> - The block pointed by
+i&lowbar;block&lsqb;12] will <Literal remap="tt">not</Literal> be a data block. Rather, it will just contain a
+list of direct blocks. For example, if the block size is 1024 bytes, since
+each block number is 4 bytes long, there will be place for 256 indirect
+blocks. That is, block 13 till block 268 in the file will be accessed by the
+<Literal remap="tt">indirect block</Literal> method. The penalty in this case, compared to the
+direct blocks case, is that an additional access to the device is needed -
+We need <Literal remap="tt">two</Literal> accesses to reach the required data block.
+</Para>
+
+<Para>
+In much the same way, <Literal remap="tt">i&lowbar;block[13]</Literal> is the <Literal remap="tt">double indirect block</Literal>
+and <Literal remap="tt">i&lowbar;block[14]</Literal> is the <Literal remap="tt">triple indirect block</Literal>.
+</Para>
+
+<Para>
+<Literal remap="tt">i&lowbar;block[13]</Literal> points to a block which contains pointers to indirect
+blocks. Each one of them is handled in the way described above.
+</Para>
+
+<Para>
+In much the same way, the triple indirect block is just an additional level
+of indirection - It will point to a list of double indirect blocks.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The i&lowbar;mode variable</Title>
+
+<Para>
+The i&lowbar;mode variable is used to determine the <Literal remap="tt">inode type</Literal> and the
+associated <Literal remap="tt">permissions</Literal>. It is best described by representing it as an
+octal number. Since it is a 16 bit variable, there will be 6 octal digits.
+Those are divided into two parts - The rightmost 4 digits and the leftmost 2
+digits.
+</Para>
+
+<Sect3>
+<Title>The rightmost 4 octal digits</Title>
+
+<Para>
+The rightmost 4 digits are <Literal remap="tt">bit options</Literal> - Each bit has its own
+purpose.
+</Para>
+
+<Para>
+The last 3 digits (Octal digits 0,1 and 2) are just the usual permissions,
+in the known form <Literal remap="tt">rwxrwxrwx</Literal>. Digit 2 refers to the user, digit 1 to
+the group and digit 2 to everyone else. They are used by the kernel to grant
+or deny access to the object presented by this inode.
+<FOOTNOTE>
+
+<Para>
+A <Literal remap="tt">smarter</Literal> permissions control is one of the enhancements planned for
+Linux 1.3 - The ACL (Access Control Lists). Actually, from browsing of the
+kernel source, some of the ACL handling is already done.
+</Para>
+
+</FOOTNOTE>
+
+</Para>
+
+<Para>
+Bit number 9 signals that the file (I'll refer to the object presented by
+the inode as file even though it can be a special device, for example) is
+<Literal remap="tt">set VTX</Literal>. I still don't know what is the meaning of "VTX".
+</Para>
+
+<Para>
+Bit number 10 signals that the file is <Literal remap="tt">set group id</Literal> - I don't know
+exactly the meaning of the above either.
+</Para>
+
+<Para>
+Bit number 11 signals that the file is <Literal remap="tt">set user id</Literal>, which means that
+the file will run with an effective user id root.
+</Para>
+
+</Sect3>
+
+<Sect3>
+<Title>The leftmost two octal digits</Title>
+
+<Para>
+Note the the leftmost octal digit can only be 0 or 1, since the total number
+of bits is 16.
+</Para>
+
+<Para>
+Those digits, as opposed to the rightmost 4 digits, are not bit mapped
+options. They determine the type of the "file" to which the inode belongs:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">01</Literal> - The file is a <Literal remap="tt">FIFO</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">02</Literal> - The file is a <Literal remap="tt">character device</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">04</Literal> - The file is a <Literal remap="tt">directory</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">06</Literal> - The file is a <Literal remap="tt">block device</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">10</Literal> - The file is a <Literal remap="tt">regular file</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">12</Literal> - The file is a <Literal remap="tt">symbolic link</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">14</Literal> - The file is a <Literal remap="tt">socket</Literal>.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect3>
+
+</Sect2>
+
+<Sect2>
+<Title>Time and date</Title>
+
+<Para>
+Linux records the last time in which various operations occurred with the
+file. The time and date are saved in the standard C library format - The
+number of seconds which passed since 00:00:00 GMT, January 1, 1970. The
+following times are recorded:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">i&lowbar;ctime</Literal> - The time in which the inode was last allocated. In
+other words, the time in which the file was created.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">i&lowbar;mtime</Literal> - The time in which the file was last modified.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">i&lowbar;atime</Literal> - The time in which the file was last accessed.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">i&lowbar;dtime</Literal> - The time in which the inode was deallocated. In
+other words, the time in which the file was deleted.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>i&lowbar;size</Title>
+
+<Para>
+<Literal remap="tt">i&lowbar;size</Literal> contains information about the size of the object presented by
+the inode. If the inode corresponds to a regular file, this is just the size
+of the file in bytes. In other cases, the interpretation of the variable is
+different.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>User and group id</Title>
+
+<Para>
+The user and group id of the file are just saved in the variables
+<Literal remap="tt">i&lowbar;uid</Literal> and <Literal remap="tt">i&lowbar;gid</Literal>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Hard links</Title>
+
+<Para>
+Later, when we'll discuss the implementation of directories, it will be
+explained that each <Literal remap="tt">directory entry</Literal> points to an inode. It is quite
+possible that a <Literal remap="tt">single inode</Literal> will be pointed to from <Literal remap="tt">several</Literal>
+directories. In that case, we say that there exist <Literal remap="tt">hard links</Literal> to the
+file - The file can be accessed from each of the directories.
+</Para>
+
+<Para>
+The kernel keeps track of the number of hard links in the variable
+<Literal remap="tt">i&lowbar;links&lowbar;count</Literal>. The variable is set to "1" when first allocating the
+inode, and is incremented with each additional link. Deletion of a file will
+delete the current directory entry and will decrement the number of links.
+Only when this number reaches zero, the inode will be actually deallocated.
+</Para>
+
+<Para>
+The name <Literal remap="tt">hard link</Literal> is used to distinguish between the alias method
+described above, to another alias method called <Literal remap="tt">symbolic linking</Literal>,
+which will be described later.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>The Ext2fs extended flags</Title>
+
+<Para>
+The ext2 filesystem associates additional flags with an inode. The extended
+attributes are stored in the variable <Literal remap="tt">i&lowbar;flags</Literal>. <Literal remap="tt">i&lowbar;flags</Literal> is a 32
+bit variable. Only the 7 rightmost bits are defined. Of them, only 5 bits
+are used in version 0.5a of the filesystem. Specifically, the
+<Literal remap="tt">undelete</Literal> and the <Literal remap="tt">compress</Literal> features are not implemented, and
+are to be introduced in Linux 1.3 development.
+</Para>
+
+<Para>
+The currently available flags are:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ bit 0 - Secure deletion.
+
+When this bit is on, the file's blocks are zeroed when the file is
+deleted. With this bit off, they will just be left with their
+original data when the inode is deallocated.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ bit 1 - Undelete.
+
+This bit is not supported yet. It will be used to provide an
+<Literal remap="tt">undelete</Literal> feature in future Ext2fs developments.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ bit 2 - Compress file.
+
+This bit is also not supported. The plan is to offer "compression on
+the fly" in future releases.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ bit 3 - Synchronous updates.
+
+With this bit on, the meta-data will be written synchronously to the
+disk, as if the filesystem was mounted with the "sync" mount option.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ bit 4 - Immutable file.
+
+When this bit is on, the file will stay as it is - Can not be
+changed, deleted, renamed, no hard links, etc, before the bit is
+cleared.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ bit 5 - Append only file.
+
+With this option active, data will only be appended to the file.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ bit 6 - Do not dump this file.
+
+I think that this bit is used by the port of dump to linux (ported by
+<Literal remap="tt">Remy Card</Literal>) to check if the file should not be dumped.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Symbolic links</Title>
+
+<Para>
+The <Literal remap="tt">hard links</Literal> presented above are just another pointers to the same
+inode. The important aspect is that the inode number is <Literal remap="tt">fixed</Literal> when
+the link is created. This means that the implementation details of the
+filesystem are visible to the user - In a pure abstract usage of the
+filesystem, the user should not care about inodes.
+</Para>
+
+<Para>
+The above causes several limitations:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Hard links can be done only in the same filesystem. This is obvious,
+since a hard link is just an inode number in some directory entry,
+and the above elements are filesystem specific.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ You can not "replace" the file which is pointed to by the hard link
+after the link creation. "Replacing" the file in one directory will
+still leave the original file in the other directory - The
+"replacement" will not deallocate the original inode, but rather
+allocate another inode for the new version, and the directory entry
+at the other place will just point to the old inode number.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+<Literal remap="tt">Symbolic link</Literal>, on the other hand, is analyzed at <Literal remap="tt">run time</Literal>. A
+symbolic link is just a <Literal remap="tt">pathname</Literal> which is accessible from an inode.
+As such, it "speaks" in the language of the abstract filesystem. When the
+kernel reaches a symbolic link, it will <Literal remap="tt">follow it in run time</Literal> using
+its normal way of reaching directories.
+</Para>
+
+<Para>
+As such, symbolic link can be made <Literal remap="tt">across different filesystems</Literal> and a
+replacement of a file with a new version will automatically be active on all
+its symbolic links.
+</Para>
+
+<Para>
+The disadvantage is that hard link doesn't consume space except to a small
+directory entry. Symbolic link, on the other hand, consumes at least an
+inode, and can also consume one block.
+</Para>
+
+<Para>
+When the inode is identified as a symbolic link, the kernel needs to find
+the path to which it points.
+</Para>
+
+<Sect3>
+<Title>Fast symbolic links</Title>
+
+<Para>
+When the pathname contains up to 64 bytes, it can be saved directly in the
+inode, on the <Literal remap="tt">i&lowbar;block[0] - i&lowbar;block[15]</Literal> variables, since those are not
+needed in that case. This is called <Literal remap="tt">fast</Literal> symbolic link. It is fast
+because the pathname resolution can be done using the inode itself, without
+accessing additional blocks. It is also economical, since it allocates only
+an inode. The length of the pathname is stored in the <Literal remap="tt">i&lowbar;size</Literal>
+variable.
+</Para>
+
+</Sect3>
+
+<Sect3>
+<Title>Slow symbolic links</Title>
+
+<Para>
+Starting from 65 bytes, additional block is allocated (by the use of
+<Literal remap="tt">i&lowbar;block[0]</Literal>) and the pathname is stored in it. It is called slow
+because the kernel needs to read additional block to resolve the pathname.
+The length is again saved in <Literal remap="tt">i&lowbar;size</Literal>.
+</Para>
+
+</Sect3>
+
+</Sect2>
+
+<Sect2>
+<Title>i&lowbar;version</Title>
+
+<Para>
+<Literal remap="tt">i&lowbar;version</Literal> is used with regard to Network File System. I don't know
+its exact use.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Reserved variables</Title>
+
+<Para>
+As far as I know, the variables which are connected to ACL and fragments
+are not currently used. They will be supported in future versions.
+</Para>
+
+<Para>
+Ext2fs is being ported to other operating systems. As far as I know,
+at least in linux, the os dependent variables are also not used.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Special reserved inodes</Title>
+
+<Para>
+The first ten inodes on the filesystem are special inodes:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Inode 1 is the <Literal remap="tt">bad blocks inode</Literal> - I believe that its data
+blocks contain a list of the bad blocks in the filesystem, which
+should not be allocated.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Inode 2 is the <Literal remap="tt">root inode</Literal> - The inode of the root directory.
+It is the starting point for reaching a known path in the filesystem.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Inode 3 is the <Literal remap="tt">acl index inode</Literal>. Access control lists are
+currently not supported by the ext2 filesystem, so I believe this
+inode is not used.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Inode 4 is the <Literal remap="tt">acl data inode</Literal>. Of course, the above applies
+here too.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Inode 5 is the <Literal remap="tt">boot loader inode</Literal>. I don't know its
+usage.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Inode 6 is the <Literal remap="tt">undelete directory inode</Literal>. It is also a
+foundation for future enhancements, and is currently not used.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Inodes 7-10 are <Literal remap="tt">reserved</Literal> and currently not used.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Directories</Title>
+
+<Para>
+A directory is implemented in the same way as files are implemented (with
+the direct blocks, indirect blocks, etc) - It is just a file which is
+formatted with a special format - A list of directory entries.
+</Para>
+
+<Para>
+Follows the definition of a directory entry:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct ext2_dir_entry {
+ __u32 inode; /* Inode number */
+ __u16 rec_len; /* Directory entry length */
+ __u16 name_len; /* Name length */
+ char name[EXT2_NAME_LEN]; /* File name */
+};
+</ProgramListing>
+
+</Para>
+
+<Para>
+Ext2fs supports file names of varying lengths, up to 255 bytes. The
+<Literal remap="tt">name</Literal> field above just contains the file name. Note that it is
+<Literal remap="tt">not zero terminated</Literal>; Instead, the variable <Literal remap="tt">name&lowbar;len</Literal> contains
+the length of the file name.
+</Para>
+
+<Para>
+The variable <Literal remap="tt">rec&lowbar;len</Literal> is provided because the directory entries are
+padded with zeroes so that the next entry will be in an offset which is
+a multiplication of 4. The resulting directory entry size is stored in
+<Literal remap="tt">rec&lowbar;len</Literal>. If the directory entry is the last in the block, it is
+padded with zeroes till the end of the block, and rec&lowbar;len is updated
+accordingly.
+</Para>
+
+<Para>
+The <Literal remap="tt">inode</Literal> variable points to the inode of the above file.
+</Para>
+
+<Para>
+Deletion of directory entries is done by appending of the deleted entry
+space to the previous (or next, I am not sure) entry.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>The superblock</Title>
+
+<Para>
+The <Literal remap="tt">superblock</Literal> is a block which contains information which describes
+the state of the internal filesystem.
+</Para>
+
+<Para>
+The superblock is located at the <Literal remap="tt">fixed offset 1024</Literal> in the device. Its
+length is 1024 bytes also.
+</Para>
+
+<Para>
+The superblock, like the group descriptors, is copied on each blocks group
+boundary for backup purposes. However, only the main copy is used by the
+kernel.
+</Para>
+
+<Para>
+The superblock contain three types of information:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Filesystem parameters which are fixed and which were determined when
+this specific filesystem was created. Some of those parameters can
+be different in different installations of the ext2 filesystem, but
+can not be changed once the filesystem was created.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Filesystem parameters which are tunable - Can always be changed.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Information about the current filesystem state.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+Follows the superblock definition:
+</Para>
+
+<Para>
+
+<ProgramListing>
+struct ext2_super_block {
+ __u32 s_inodes_count; /* Inodes count */
+ __u32 s_blocks_count; /* Blocks count */
+ __u32 s_r_blocks_count; /* Reserved blocks count */
+ __u32 s_free_blocks_count; /* Free blocks count */
+ __u32 s_free_inodes_count; /* Free inodes count */
+ __u32 s_first_data_block; /* First Data Block */
+ __u32 s_log_block_size; /* Block size */
+ __s32 s_log_frag_size; /* Fragment size */
+ __u32 s_blocks_per_group; /* # Blocks per group */
+ __u32 s_frags_per_group; /* # Fragments per group */
+ __u32 s_inodes_per_group; /* # Inodes per group */
+ __u32 s_mtime; /* Mount time */
+ __u32 s_wtime; /* Write time */
+ __u16 s_mnt_count; /* Mount count */
+ __s16 s_max_mnt_count; /* Maximal mount count */
+ __u16 s_magic; /* Magic signature */
+ __u16 s_state; /* File system state */
+ __u16 s_errors; /* Behaviour when detecting errors */
+ __u16 s_pad;
+ __u32 s_lastcheck; /* time of last check */
+ __u32 s_checkinterval; /* max. time between checks */
+ __u32 s_creator_os; /* OS */
+ __u32 s_rev_level; /* Revision level */
+ __u16 s_def_resuid; /* Default uid for reserved blocks */
+ __u16 s_def_resgid; /* Default gid for reserved blocks */
+ __u32 s_reserved[235]; /* Padding to the end of the block */
+};
+</ProgramListing>
+
+</Para>
+
+<Sect2>
+<Title>superblock identification</Title>
+
+<Para>
+The ext2 filesystem's superblock is identified by the <Literal remap="tt">s&lowbar;magic</Literal> field.
+The current ext2 magic number is 0xEF53. I presume that "EF" means "Extended
+Filesystem". In versions of the ext2 filesystem prior to 0.2B, the magic
+number was 0xEF51. Those filesystems are not compatible with the current
+versions; Specifically, the group descriptors definition is different. I
+doubt if there still exists such a installation.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Filesystem fixed parameters</Title>
+
+<Para>
+By using the word <Literal remap="tt">fixed</Literal>, I mean fixed with respect to a particular
+installation. Those variables are usually not fixed with respect to
+different installations.
+</Para>
+
+<Para>
+The <Literal remap="tt">block size</Literal> is determined by using the <Literal remap="tt">s&lowbar;log&lowbar;block&lowbar;size</Literal>
+variable. The block size is 1024*pow (2,s&lowbar;log&lowbar;block&lowbar;size) and should be
+between 1024 and 4096. The available options are 1024, 2048 and 4096.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;inodes&lowbar;count</Literal> contains the total number of available inodes.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;blocks&lowbar;count</Literal> contains the total number of available blocks.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;first&lowbar;data&lowbar;block</Literal> specifies in which of the <Literal remap="tt">device block</Literal> the
+<Literal remap="tt">superblock</Literal> is present. The superblock is always present at the fixed
+offset 1024, but the device block numbering can differ. For example, if the
+block size is 1024, the superblock will be at <Literal remap="tt">block 1</Literal> with respect to
+the device. However, if the block size is 4096, offset 1024 is included in
+<Literal remap="tt">block 0</Literal> of the device, and in that case <Literal remap="tt">s&lowbar;first&lowbar;data&lowbar;block</Literal>
+will contain 0. At least this is how I understood this variable.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;blocks&lowbar;per&lowbar;group</Literal> contains the number of blocks which are grouped
+together as a blocks group.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;inodes&lowbar;per&lowbar;group</Literal> contains the number of inodes available in a group
+block. I think that this is always the total number of inodes divided by the
+number of blocks groups.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;creator&lowbar;os</Literal> contains a code number which specifies the operating
+system which created this specific filesystem:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Linux</Literal> :-) is specified by the value <Literal remap="tt">0</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Hurd</Literal> is specified by the value <Literal remap="tt">1</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Masix</Literal> is specified by the value <Literal remap="tt">2</Literal>.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;rev&lowbar;level</Literal> contains the major version of the ext2 filesystem.
+Currently this is always <Literal remap="tt">0</Literal>, as the most recent version is 0.5B. It
+will probably take some time until we reach version 1.0.
+</Para>
+
+<Para>
+As far as I know, fragments (sub-block allocations) are currently not
+supported and hence a block is equal to a fragment. As a result,
+<Literal remap="tt">s&lowbar;log&lowbar;frag&lowbar;size</Literal> and <Literal remap="tt">s&lowbar;frags&lowbar;per&lowbar;group</Literal> are always equal to
+<Literal remap="tt">s&lowbar;log&lowbar;block&lowbar;size</Literal> and <Literal remap="tt">s&lowbar;blocks&lowbar;per&lowbar;group</Literal>, respectively.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Ext2fs error handling</Title>
+
+<Para>
+The ext2 filesystem error handling is based on the following philosophy:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Identification of problems is done by the kernel code.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The correction task is left to an external utility, such as
+<Literal remap="tt">e2fsck by Theodore Ts'o</Literal> for <Literal remap="tt">automatic</Literal> analysis and
+correction, or perhaps <Literal remap="tt">debugfs by Theodore Ts'o</Literal> and
+<Literal remap="tt">EXT2ED by myself</Literal>, for <Literal remap="tt">hand</Literal> analysis and correction.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+<Para>
+The <Literal remap="tt">s&lowbar;state</Literal> variable is used by the kernel to pass the identification
+result to third party utilities:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">bit 0</Literal> of s&lowbar;state is reset when the partition is mounted and
+set when the partition is unmounted. Thus, a value of 0 on an
+unmounted filesystem means that the filesystem was not unmounted
+properly - The filesystem is not "clean" and probably contains
+errors.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">bit 1</Literal> of s&lowbar;state is set by the kernel when it detects an
+error in the filesystem. A value of 0 doesn't mean that there isn't
+an error in the filesystem, just that the kernel didn't find any.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The kernel behavior when an error is found is determined by the user tunable
+parameter <Literal remap="tt">s&lowbar;errors</Literal>:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The kernel will ignore the error and continue if <Literal remap="tt">s&lowbar;errors=1</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The kernel will remount the filesystem in read-only mode if
+<Literal remap="tt">s&lowbar;errors=2</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ A kernel panic will be issued if <Literal remap="tt">s&lowbar;errors=3</Literal>.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The default behavior is to ignore the error.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Additional parameters used by e2fsck</Title>
+
+<Para>
+Of-course, <Literal remap="tt">e2fsck</Literal> will check the filesystem if errors were detected
+or if the filesystem is not clean.
+</Para>
+
+<Para>
+In addition, each time the filesystem is mounted, <Literal remap="tt">s&lowbar;mnt&lowbar;count</Literal> is
+incremented. When s&lowbar;mnt&lowbar;count reaches <Literal remap="tt">s&lowbar;max&lowbar;mnt&lowbar;count</Literal>, <Literal remap="tt">e2fsck</Literal>
+will force a check on the filesystem even though it may be clean. It will
+then zero s&lowbar;mnt&lowbar;count. <Literal remap="tt">s&lowbar;max&lowbar;mnt&lowbar;count</Literal> is a tunable parameter.
+</Para>
+
+<Para>
+E2fsck also records the last time in which the file system was checked in
+the <Literal remap="tt">s&lowbar;lastcheck</Literal> variable. The user tunable parameter
+<Literal remap="tt">s&lowbar;checkinterval</Literal> will contain the number of seconds which are allowed
+to pass since <Literal remap="tt">s&lowbar;lastcheck</Literal> until a check is forced. A value of
+<Literal remap="tt">0</Literal> disables time-based check.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Additional user tunable parameters</Title>
+
+<Para>
+<Literal remap="tt">s&lowbar;r&lowbar;blocks&lowbar;count</Literal> contains the number of disk blocks which are
+reserved for root, the user whose id number is <Literal remap="tt">s&lowbar;def&lowbar;resuid</Literal> and the
+group whose id number is <Literal remap="tt">s&lowbar;deg&lowbar;resgid</Literal>. The kernel will refuse to
+allocate those last <Literal remap="tt">s&lowbar;r&lowbar;blocks&lowbar;count</Literal> if the user is not one of the
+above. This is done so that the filesystem will usually not be 100&percnt; full,
+since 100&percnt; full filesystems can affect various aspects of operation.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;def&lowbar;resuid</Literal> and <Literal remap="tt">s&lowbar;def&lowbar;resgid</Literal> contain the id of the user and
+of the group who can use the reserved blocks in addition to root.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>Filesystem current state</Title>
+
+<Para>
+<Literal remap="tt">s&lowbar;free&lowbar;blocks&lowbar;count</Literal> contains the current number of free blocks
+in the filesystem.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;free&lowbar;inodes&lowbar;count</Literal> contains the current number of free inodes in the
+filesystem.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;mtime</Literal> contains the time at which the system was last mounted.
+</Para>
+
+<Para>
+<Literal remap="tt">s&lowbar;wtime</Literal> contains the last time at which something was changed in the
+filesystem.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Copyright</Title>
+
+<Para>
+This document contains source code which was taken from the Linux ext2
+kernel source code, mainly from <FILENAME>/usr/include/linux/ext2&lowbar;fs.h</FILENAME>. Follows
+the original copyright:
+</Para>
+
+<Para>
+
+<ProgramListing>
+/*
+ * linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * from
+ *
+ * linux/include/linux/minix_fs.h
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+</ProgramListing>
+
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Acknowledgments</Title>
+
+<Para>
+I would like to thank the following people, who were involved in the
+design and implementation of the ext2 filesystem kernel code and support
+utilities:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Remy Card</Literal>
+
+Who designed, implemented and maintains the ext2 filesystem kernel
+code, and some of the ext2 utilities. <Literal remap="tt">Remy Card</Literal> is also the
+author of several helpful slides concerning the ext2 filesystem.
+Specifically, he is the author of <Literal remap="tt">File Management in the Linux
+Kernel</Literal> and of <Literal remap="tt">The Second Extended File System - Current
+State, Future Development</Literal>.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Wayne Davison</Literal>
+
+Who designed the ext2 filesystem.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Stephen Tweedie</Literal>
+
+Who helped designing the ext2 filesystem kernel code and wrote the
+slides <Literal remap="tt">Optimizations in File Systems</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Literal remap="tt">Theodore Ts'o</Literal>
+
+Who is the author of several ext2 utilities and of the ext2 library
+<Literal remap="tt">libext2fs</Literal> (which I didn't use, simply because I didn't know
+it exists when I started to work on my project).
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+Lastly, I would like to thank, of-course, <Literal remap="tt">Linus Torvalds</Literal> and the
+<Literal remap="tt">Linux community</Literal> for providing all of us with such a great operating
+system.
+</Para>
+
+<Para>
+Please contact me in a case of an error report, suggestions, or just about
+anything concerning this document.
+</Para>
+
+<Para>
+Enjoy,
+</Para>
+
+<Para>
+Gadi Oxman &lt;tgud@tochnapc2.technion.ac.il&gt;
+</Para>
+
+<Para>
+Haifa, August 95
+</Para>
+
+</Sect1>
+
+</Article>
diff --git a/ext2ed/doc/user-guide.sgml b/ext2ed/doc/user-guide.sgml
new file mode 100644
index 0000000..1e8f3cd
--- /dev/null
+++ b/ext2ed/doc/user-guide.sgml
@@ -0,0 +1,2258 @@
+<!DOCTYPE Article PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+
+<Article>
+
+<ArticleInfo>
+
+<Title>EXT2ED - The Extended-2 filesystem editor - User's guide</Title>
+<AUTHOR>
+<FirstName>Gadi Oxman, tgud@tochnapc2.technion.ac.il</FirstName>
+</AUTHOR>
+<PubDate>v0.1, August 3 1995</PubDate>
+
+<Abstract>
+
+<Para>
+This is only the initial version of this document. It may be unclear at
+some places. Please send me feedback with anything regarding to it.
+</Para>
+
+</Abstract>
+
+</ArticleInfo>
+
+<Sect1>
+<Title>About EXT2ED documentation</Title>
+
+<Para>
+The EXT2ED documentation consists of three parts:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The ext2 filesystem overview.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The EXT2ED user's guide.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The EXT2ED design and implementation.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+If you intend to used EXT2ED, I strongly suggest that you would be familiar
+with the material presented in the <Literal remap="tt">ext2 filesystem overview</Literal> as well.
+</Para>
+
+<Para>
+If you also intend to browse and modify the source code, I suggest that you
+will also read the article <Literal remap="tt">The EXT2ED design and implementation</Literal>, as it
+provides a general overview of the structure of my source code.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Introduction</Title>
+
+<Para>
+EXT2ED is a "disk editor" for the ext2 filesystem. Its purpose is to show
+you the internal structures of the ext2 filesystem in an rather intuitive
+and logical way, so that it will be easier to "travel" between the various
+internal filesystem structures.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Basic concepts in EXT2ED</Title>
+
+<Para>
+Two basic concepts in EXT2ED are <Literal remap="tt">commands</Literal> and <Literal remap="tt">types</Literal>.
+</Para>
+
+<Para>
+EXT2ED is object-oriented in the sense that it defines objects in the
+filesystem, like a <Literal remap="tt">super-block</Literal> or a <Literal remap="tt">directory</Literal>. An object is
+something which "knows" how to handle some aspect of the filesystem.
+</Para>
+
+<Para>
+Your interaction with EXT2ED is done through <Literal remap="tt">commands</Literal> which EXT2ED
+accepts. There are three levels of commands:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ General Commands
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Extended-2 Filesystem general commands
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Type specific commands
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+The General commands are always available.
+</Para>
+
+<Para>
+The ext2 general commands are available only when editing an ext2 filesystem.
+</Para>
+
+<Para>
+The Type specific commands are available when editing a specific object in the
+filesystem. Each object typically comes with its own set of internal
+variables, and its own set of commands, which are fine tuned handle the
+corresponding structure in the filesystem.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Running EXT2ED</Title>
+
+<Para>
+Running EXT2ED is as simple as typing <Literal remap="tt">ext2ed</Literal> from the shell prompt.
+There are no command line switches.
+</Para>
+
+<Para>
+When first run, EXT2ED parses its configuration file, <Literal remap="tt">ext2ed.conf</Literal>.
+This file must exist.
+</Para>
+
+<Para>
+When the configuration file processing is done, EXT2ED screen should appear
+on the screen, with the command prompt <Literal remap="tt">ext2ed&#62;</Literal> displayed.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>EXT2ED user interface</Title>
+
+<Para>
+EXT2ED uses the <Emphasis>ncurses</Emphasis> library for screen management. Your screen
+will be divided into four parts, from top to bottom:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Title window
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Status window
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Main editing window
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Command window
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+The title window just displays the current version of EXT2ED.
+</Para>
+
+<Para>
+The status window will display various information regarding the state of
+the editing at this point.
+</Para>
+
+<Para>
+The main editing window is the place at which the actual data will be shown.
+Almost every command will cause some display at this window. This window, as
+opposed to the three others, is of variable length - You always look at one
+page of it. The current page and the total numbers of pages at this moment
+is displayed at the status window. Moving between pages is done by the use
+of the <Command>pgdn</Command> and <Command>pgup</Command> commands.
+</Para>
+
+<Para>
+The command window is at the bottom of the screen. It always displays a
+command prompt <Literal remap="tt">ext2ed&#62;</Literal> and allows you to type a command. Feedback
+about the commands entered is displayed to this window also.
+</Para>
+
+<Para>
+EXT2ED uses the <Emphasis>readline</Emphasis> library while processing a command line. All
+the usual editing keys are available. Each entered command is placed into a
+history of commands, and can be recalled later. Command Completion is also
+supported - Just start to type a command, and press the completion key.
+</Para>
+
+<Para>
+Pressing <Literal remap="tt">enter</Literal> at the command window, without entering a command,
+recalls the last command. This is useful when moving between close entries,
+in the <Command>next</Command> command, for example.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Getting started</Title>
+
+<Sect2>
+<Title>A few precautions</Title>
+
+<Para>
+EXT2ED is a tool for filesystem <Literal remap="tt">editing</Literal>. As such, it can be
+<Literal remap="tt">dangerous</Literal>. The summary to the subsections below is that
+<Literal remap="tt">You must know what you are doing</Literal>.
+</Para>
+
+<Sect3 id="mounted-ref">
+<Title>A mounted filesystem</Title>
+
+<Para>
+EXT2ED is not designed to work on a mounted filesystem - It is complicated
+enough as it is; I didn't even try to think of handling the various race
+conditions. As such, please respect the following advice:
+</Para>
+
+<Para>
+<Literal remap="tt">Do not use EXT2ED on a mounted filesystem !</Literal>
+</Para>
+
+<Para>
+EXT2ED will not allow write access to a mounted filesystem. Although it is
+fairly easy to change EXT2ED so that it will be allowed, I hereby request
+again- EXT2ED is not designed for that action, and will most likely corrupt
+data if used that way. Please don't do that.
+</Para>
+
+<Para>
+Concerning read access, I chose to leave the decision for the user through
+the configuration file option <Literal remap="tt">AllowMountedRead</Literal>. Although read access
+on a mounted partition will not do any damage to the filesystem, the data
+displayed to you will not be reliable, and showing you incorrect information
+may be as bad as corrupting the filesystem. However, you may still wish to
+do that.
+</Para>
+
+</Sect3>
+
+<Sect3>
+<Title>Write access</Title>
+
+<Para>
+Considering the obvious sensitivity of the subject, I took the following
+actions:
+</Para>
+
+<Para>
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ EXT2ED will always start with a read-only access. Write access mode
+needs to be specifically entered by the <Command>enablewrite</Command> command.
+Until this is done, no write will be allowed. Write access can be
+disabled at any time with <Command>disablewrite</Command>. When
+<Command>enablewrite</Command> is issued, the device is reopened in read-write
+mode. Needless to say, the device permissions should allow that.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ As a second level of protection, you can disallow write access in
+the configuration file by using the <Literal remap="tt">AllowChanges off</Literal>
+configuration option. In this case, the <Command>enablewrite</Command> command
+will be refused.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ When write access is enabled, the data will never change
+immediately. Rather, a specific <Command>writedata</Command> command is needed
+to update the object in the disk with the changed object in memory.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ In addition, A logging option is provided through the configuration
+file options <Literal remap="tt">LogChanges</Literal> and <Literal remap="tt">LogFile</Literal>. With logging
+enabled, each change to the disk will be logged at a very primitive
+level - A hex dump of the original data and of the new written data.
+The log file will be a text file which is easily readable, and you
+can make use of it to undo any changes which you made (EXT2ED doesn't
+make use of the log file for that purpose, it just logs the changes).
+</Para>
+</ListItem>
+
+</OrderedList>
+
+Please remember that this is only the initial release of EXT2ED, and it is
+not very much tested - It is reasonable to assume that <Literal remap="tt">there are
+bugs</Literal>.
+However, the logging option above can offer protection even from this
+unfortunate case. Therefor, I highly recommend that at least when first
+working with EXT2ED, the logging option will be enabled, despite the disk
+space which it consumes.
+</Para>
+
+</Sect3>
+
+</Sect2>
+
+<Sect2 id="help-ref">
+<Title>The help command</Title>
+
+<Para>
+When loaded, EXT2ED will show a short help screen. This help screen can
+always be retrieved by the command <Command>help</Command>. The help screen displays a
+list of all the commands which are available at this point. At startup, only
+the <Literal remap="tt">General commands</Literal> are available.
+This will change with time, since each object has its own commands. Thus,
+commands which are available now may not be available later.
+Using <Command>help</Command> <Emphasis>command</Emphasis> will display additional information about
+the specific command <Emphasis>command</Emphasis>.
+</Para>
+
+</Sect2>
+
+<Sect2 id="setdevice-ref">
+<Title>The setdevice command</Title>
+
+<Para>
+The first command that is usually entered to EXT2ED is the <Command>setdevice</Command>
+command. This command simply tells EXT2ED on which device the filesystem is
+present. For example, suppose my ext2 filesystem is on the first partition
+of my ide disk. The command will be:
+
+<Screen>
+setdevice /dev/hda1
+</Screen>
+
+The following actions will take place in the following order:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ EXT2ED will check if the partition is mounted.
+If the partition is mounted (<Literal remap="tt">highly not recommended</Literal>),
+the accept/reject behavior will be decided by the configuration
+file. Cross reference section <XRef LinkEnd="mounted-ref">.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The specified device will be opened in read-only mode. The
+permissions of the device should be set in a way that allows
+you to open the device for read access.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Autodetection of an ext2 filesystem will be made by searching for
+the ext2 magic number in the main superblock.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ In the case of a successful recognition of an ext2 filesystem, the
+ext2 filesystem specific commands and the ext2 specific object
+definitions will be registered. The object definitions will be read
+at run time from a file specified by the configuration file.
+
+In case of a corrupted ext2 filesystem, it is quite possible that
+the main superblock is damaged and autodetection will fail. In that
+case, use the configuration option <Literal remap="tt">ForceExt2 on</Literal>. This is not
+the default case since EXT2ED can be used at a lower level to edit a
+non-ext2 filesystem.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ In a case of a successful autodetection, essential information about
+the filesystem such as the block size will be read from the
+superblock, unless the used overrides this behavior with an
+configuration option (not recommended). In that case, the parameters
+will be read from the configuration file.
+
+In a case of an autodetection failure, the essential parameters
+will be read from the configuration file.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+Assuming that you are editing an ext2 filesystem and that everything goes
+well, you will notice that additional commands are now available in the help
+screen, under the section <Literal remap="tt">ext2 filesystem general commands</Literal>. In
+addition, EXT2ED now recognizes a few objects which are essential to the
+editing of an ext2 filesystem.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Two levels of usage</Title>
+
+<Sect2>
+<Title>Low level usage</Title>
+
+<Para>
+This section explains what EXT2ED provides even when not editing an ext2
+filesystem.
+</Para>
+
+<Para>
+Even at this level, EXT2ED is more than just a hex editor. It still allows
+definition of objects and variables in run time through a user file,
+although of-course the objects will not have special fine tuned functions
+connected to them. EXT2ED will allow you to move in the filesystem using
+<Command>setoffset</Command>, and to apply an object definition on a specific place
+using <Command>settype</Command> <Emphasis>type</Emphasis>. From this point and on, the object will
+be shown <Literal remap="tt">in its native form</Literal> - You will see a list of the
+variables rather than just a hex dump, and you will be able to change each
+variable in the intuitive form <Command>set variable=value</Command>.
+</Para>
+
+<Para>
+To define objects, use the configuration option <Literal remap="tt">AlternateDescriptors</Literal>.
+</Para>
+
+<Para>
+There are now two forms of editing:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Editing without a type. In this case, the disk block will be shown
+as a text+hex dump, and you will be able to move along and change it.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Editing with a type. In this case, the object's variables will be
+shown, and you will be able to change each variable in its native form.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>High level usage</Title>
+
+<Para>
+EXT2ED was designed for the editing of the ext2 filesystem. As such, it
+"understands" the filesystem structure to some extent. Each object now has
+special fine tuned 'C' functions connected to it, which knows how to display
+it in an intuitive form, and how the object fits in the general design of
+the ext2 filesystem. It is of-course much easier to use this type of
+editing. For example:
+
+<Screen>
+Issue <Emphasis>group 2</Emphasis> to look at the main copy of the third group block
+descriptor. With <Emphasis>gocopy 1</Emphasis> you can move to its first backup copy,
+and with <Emphasis>inode</Emphasis> you can start editing the inode table of the above
+group block. From here, if the inode corresponds to a file, you can
+use <Emphasis>file</Emphasis> to edit the file in a "continuous" way, using
+<Emphasis>nextblock</Emphasis> to pass to its next block, letting EXT2ED following by
+itself the direct blocks, indirect blocks, ..., while still preserving the
+actual view of the exact block usage of the file.
+</Screen>
+
+The point is that the "tour" of the filesystem will now be synchronous rather
+than asynchronous - Each object has the "links" to pass between connected
+logical structures, and special fine-tuned functions to deal with it.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>General commands</Title>
+
+<Para>
+I will now start with a systematic explanation of the general commands.
+Please feel free to experiment, but take care when using the
+<Literal remap="tt">enablewrite</Literal> command.
+</Para>
+
+<Para>
+Whenever a command syntax is specified, arguments which are optional are
+enclosed with square brackets.
+</Para>
+
+<Para>
+Please note that in EXT2ED, each command can be overridden by a specific
+object to provide special fine-tuned functionality. In general, I was
+attempting to preserve the similarity between those functions, which are
+accessible by the same name.
+</Para>
+
+<Sect2 id="disablewrite-ref">
+<Title>disablewrite</Title>
+
+<Para>
+
+<Screen>
+Syntax: disablewrite
+</Screen>
+
+<Command>disablewrite</Command> is used to reopen the device with read-only access. When
+first running EXT2ED, the device is opened in read-only mode, and an
+explicit <Command>enablewrite</Command> is required for write access. When finishing
+with changing, a <Command>disablewrite</Command> is recommended for safety. Cross
+reference section <XRef LinkEnd="disablewrite-ref">.
+</Para>
+
+</Sect2>
+
+<Sect2 id="enablewrite-ref">
+<Title>enablewrite</Title>
+
+<Para>
+
+<Screen>
+Syntax: enablewrite
+</Screen>
+
+<Command>enablewrite</Command> is used to reopen the device with read-write access.
+When first running EXT2ED, the device is opened in read-only mode, and an
+explicit <Command>enablewrite</Command> is required for write access.
+<Command>enablewrite</Command> will fail if write access is disabled from the
+configuration file by the <Literal remap="tt">AllowChanges off</Literal> configuration option.
+Even after <Command>enablewrite</Command>, an explicit <Command>writedata</Command>
+is required to actually write the new data to the disk.
+When finishing with changing, a <Command>disablewrite</Command> is recommended for safety.
+Cross reference section <XRef LinkEnd="enablewrite-ref">.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>help</Title>
+
+<Para>
+
+<Screen>
+Syntax: help [command]
+</Screen>
+
+The <Command>help</Command> command is described at section <XRef LinkEnd="help-ref">.
+</Para>
+
+</Sect2>
+
+<Sect2 id="next-ref">
+<Title>next</Title>
+
+<Para>
+
+<Screen>
+Syntax: next [number]
+</Screen>
+
+This section describes the <Emphasis>general command</Emphasis> <Command>next</Command>. <Command>next</Command>
+is overridden by several types in EXT2ED, to provide fine-tuned
+functionality.
+</Para>
+
+<Para>
+The <Literal remap="tt">next general command</Literal> behavior is depended on whether you are editing a
+specific object, or none.
+</Para>
+
+<Para>
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ In the case where Type is <Literal remap="tt">none</Literal> (The current type is showed
+on the status window by the <Command>show</Command> command), <Literal remap="tt">next</Literal>
+passes to the next <Emphasis>number</Emphasis> bytes in the current edited block.
+If <Emphasis>number</Emphasis> is not specified, <Emphasis>number=1</Emphasis> is assumed.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ In the case where Type is defined, the <Command>next</Command> commands assumes
+that you are editing an array of objects of that type, and the
+<Command>next</Command> command will just pass to the next entry in the array.
+If <Emphasis>number</Emphasis> is defined, it will pass <Emphasis>number</Emphasis> entries
+ahead.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2 id="pgdn-ref">
+<Title>pgdn</Title>
+
+<Para>
+
+<Screen>
+Syntax: pgdn
+</Screen>
+
+Usually the edited data doesn't fit into the visible main window. In this
+case, the status window will indicate that there is more to see "below" by
+the message <Literal remap="tt">Page x of y</Literal>. This means that there are <Emphasis>y</Emphasis> pages
+total, and you are currently viewing the <Emphasis>x</Emphasis> page. With the <Command>pgdn</Command>
+command, you can pass to the next available page.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>pgup</Title>
+
+<Para>
+
+<Screen>
+Syntax: pgup
+</Screen>
+
+</Para>
+
+<Para>
+<Command>pgup</Command> is the opposite of <Command>pgdn</Command> - It will pass to the previous
+page. Cross reference section <XRef LinkEnd="pgdn-ref">.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>prev</Title>
+
+<Para>
+
+<Screen>
+Syntax: prev [number]
+</Screen>
+
+</Para>
+
+<Para>
+<Command>prev</Command> is the opposite of <Command>next</Command>. Cross reference section
+<XRef LinkEnd="next-ref">.
+</Para>
+
+</Sect2>
+
+<Sect2 id="recall-ref">
+<Title>recall</Title>
+
+<Para>
+
+<Screen>
+Syntax: recall object
+</Screen>
+
+<Command>recall</Command> is the opposite of <Command>remember</Command>. It will place you at the
+place you where when saving the object position and type information. Cross
+reference section <XRef LinkEnd="remember-ref">.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>redraw</Title>
+
+<Para>
+
+<Screen>
+Syntax: redraw
+</Screen>
+
+Sometimes the screen display gets corrupted. I still have problems with
+this. The <Command>redraw</Command> command simply redraws the entire display screen.
+</Para>
+
+</Sect2>
+
+<Sect2 id="remember-ref">
+<Title>remember</Title>
+
+<Para>
+
+<Screen>
+Syntax: remember object
+</Screen>
+
+EXT2ED provides you <Literal remap="tt">memory</Literal> of objects; While editing, you may reach an
+object which you will like to return to later. The <Command>remember</Command> command
+will store in memory the current place and type of the object. You can
+return to the object by using the <Command>recall</Command> command. Cross reference
+section <XRef LinkEnd="recall-ref">.
+</Para>
+
+<Para>
+<Literal remap="tt">Note:</Literal>
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ When remembering a <Literal remap="tt">file</Literal> or a <Literal remap="tt">directory</Literal>, the
+corresponding inode will be saved in memory. The basic reason is that
+the inode is essential for finding the blocks of the file or the
+directory.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>set</Title>
+
+<Para>
+
+<Screen>
+Syntax: set [text || hex] arg1 [arg2 arg3 ...]
+
+or
+
+Syntax: set variable=value
+</Screen>
+
+The <Command>set</Command> command is used to modify the current data.
+The <Command>set general command</Command> behavior is depended on whether you are editing a
+specific object, or none.
+</Para>
+
+<Para>
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ In the case where Type is <Command>none</Command>, the first syntax should be
+used. The set command affects the data starting at the current
+highlighted position in the edited block.
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ When using the <Command>set hex</Command> command, a list of
+hexadecimal bytes should follow.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ When using the <Command>set text</Command> command, it should be followed
+by a text string.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+Examples:
+
+<Screen>
+ set hex 09 0a 0b 0c 0d 0e 0f
+ set text Linux is just great !
+
+</Screen>
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ In the case where Type is defined, the second syntax should be used.
+The set commands just sets the variable <Emphasis>variable</Emphasis> with the
+value <Emphasis>value</Emphasis>.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+In any case, the data is only changed in memory. For an actual update to the
+disk, use the <Command>writedata</Command> command.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>setdevice</Title>
+
+<Para>
+
+<Screen>
+Syntax: setdevice device
+</Screen>
+
+The <Command>setdevice</Command> command is described at section <XRef LinkEnd="setdevice-ref">.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>setoffset</Title>
+
+<Para>
+
+<Screen>
+Syntax: setoffset [block || type] [+|-]offset
+</Screen>
+
+The <Command>setoffset</Command> command is used to move asynchronously inside the file
+system. It is considered a low level command, and usually should not be used
+when editing an ext2 filesystem, simply because movement is better
+utilized through the specific ext2 commands.
+</Para>
+
+<Para>
+The <Command>offset</Command> is in bytes, and meanwhile should be positive and smaller
+than 2GB.
+</Para>
+
+<Para>
+Use of the <Command>block</Command> modifier changes the counting unit to block.
+</Para>
+
+<Para>
+Use of the <Literal remap="tt">+ or -</Literal> modifiers signals that the offset is relative to
+the current position.
+</Para>
+
+<Para>
+use of the <Literal remap="tt">type</Literal> modifier is allowed only with relative offset. This
+modifier will multiply the offset by the size of the current type.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>settype</Title>
+
+<Para>
+
+<Screen>
+Syntax: settype type || [none | hex]
+</Screen>
+
+The <Command>settype</Command> command is used to move apply the object definitions of
+the type <Emphasis>type</Emphasis> on the current position. It is considered a low level
+command and usually should not be used when editing an ext2 filesystem since
+EXT2ED provides better tools. It is of-course very useful when editing a
+non-ext2 filesystem and using user-defined objects.
+</Para>
+
+<Para>
+When <Emphasis>type</Emphasis> is <Emphasis>hex</Emphasis> or <Emphasis>none</Emphasis>, the data will be displayed as
+a hex and text dump.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>show</Title>
+
+<Para>
+
+<Screen>
+Syntax: show
+</Screen>
+
+The <Command>show</Command> command will show the data of the current object at the
+current position on the main display window. It will also update the status
+window with type specific information. It may be necessary to use
+<Command>pgdn</Command> and <Command>pgup</Command> to view the entire data.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>writedata</Title>
+
+<Para>
+
+<Screen>
+Syntax: writedata
+</Screen>
+
+The <Command>writedata</Command> command will update the disk with the object data that
+is currently in memory. This is the point at which actual change is made to
+the filesystem. Without this command, the edited data will not have any
+effect. Write access should be allowed for a successful update.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>Editing an ext2 filesystem</Title>
+
+<Para>
+In order to edit an ext2 filesystem, you should, of course, know the structure
+of the ext2 filesystem. If you feel that you lack some knowledge in this
+area, I suggest that you do some of the following:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Read the supplied ext2 technical information. I tried to summarize
+the basic information which is needed to get you started.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Get the slides that Remy Card (The author of the ext2 filesystem)
+prepared concerning the ext2 filesystem.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Read the kernel sources.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+At this point, you should be familiar with the following terms:
+<Literal remap="tt">block, inode, superblock, block groups, block allocation bitmap, inode
+allocation bitmap, group descriptors, file, directory.</Literal>Most of the above
+are objects in EXT2ED.
+</Para>
+
+<Para>
+When editing an ext2 filesystem it is recommended that you use the ext2
+specific commands, rather then the general commands <Command>setoffset</Command> and
+<Command>settype</Command>, mainly because:
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ In most cases it will be unreliable, and will display incorrect
+information.
+
+Sometimes in order to edit an object, EXT2ED needs the information
+of some other related objects. For example, when editing a
+directory, EXT2ED needs access to the inode of the edited directory.
+Simply setting the type to a directory <Literal remap="tt">will be unreliable</Literal>,
+since the object assumes that you passed through its inode to reach
+it, and expects this information, which isn't initialized if you
+directly set the type to a directory.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ EXT2ED offers far better tools for handling the ext2 filesystem
+using the ext2 specific commands.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>ext2 general commands</Title>
+
+<Para>
+The <Literal remap="tt">ext2 general commands</Literal> are available only when you are editing an
+ext2 filesystem. They are <Literal remap="tt">general</Literal> in the sense that they are not
+specific to some object, and can be invoked anytime.
+</Para>
+
+<Sect2 id="general-superblock">
+<Title>super</Title>
+
+<Para>
+
+<Screen>
+Syntax: super
+</Screen>
+
+The <Command>super</Command> command will "bring you" to the main superblock copy. It
+will automatically set the object type to <Literal remap="tt">ext2&lowbar;super&lowbar;block</Literal>. Then you
+will be able to view and edit the superblock. When you are in the
+superblock, other commands will be available.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>group</Title>
+
+<Para>
+
+<Screen>
+Syntax: group [number]
+</Screen>
+
+The <Command>group</Command> command will "bring you" to the main copy of the
+<Emphasis>number</Emphasis> group descriptor. It will automatically set the object type to
+<Literal remap="tt">ext2&lowbar;group&lowbar;desc</Literal>. Then you will be able to view and edit the group
+descriptor entry. When you are there, other commands will be available.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>cd</Title>
+
+<Para>
+
+<Screen>
+Syntax: cd path
+</Screen>
+
+The <Command>cd</Command> command will let you travel in the filesystem in the nice way
+that the mounted filesystem would have let you.
+</Para>
+
+<Para>
+The <Command>cd</Command> command is a complicated command. Although it may sound
+simple at first, an implementation of a typical cd requires passing through
+the group descriptors, inodes, directory entries, etc. For example:
+</Para>
+
+<Para>
+The innocent cd /usr command can be done by using more primitive
+EXT2ED commands in the following way (It is implemented exactly this way):
+
+<OrderedList>
+<ListItem>
+
+<Para>
+ Using <Command>group 0</Command> to go to the first group descriptor.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using <Command>inode</Command> to get to the Bad blocks inode.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using <Command>next</Command> to pass to the root directory inode.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using <Command>dir</Command> to see the directory.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using <Command>next</Command> until we find the directory usr.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using <Command>followinode</Command> to pass to the inode corresponding to usr.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using <Command>dir</Command> to see the directory of /usr.
+</Para>
+</ListItem>
+
+</OrderedList>
+
+And those commands aren't that primitive; For example, the tracing of the
+blocks which belong to the root directory is done automatically by the dir
+command behind the scenes, and the followinode command will automatically
+"run" to the correct group descriptor in order to find the required inode.
+</Para>
+
+<Para>
+The path to the <Command>general cd</Command> command needs to be a full pathname -
+Starting from <Filename>/</Filename>. The <Command>cd</Command> command stops at the last reachable
+point, which can be a directory entry, in which case the type will be set to
+<Literal remap="tt">dir</Literal>, or an inode, in which case the type will be set to
+<Literal remap="tt">ext2&lowbar;inode</Literal>. Symbolic links (Only fast symbolic links, meanwhile) are
+automatically followed (if they are not across filesystems, of-course). If
+the type is set to <Literal remap="tt">dir</Literal>, you can use a path relative to the
+"current directory".
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The superblock</Title>
+
+<Para>
+The superblock can always be reached by the ext2 general command
+<Command>super</Command>. Cross reference section <XRef LinkEnd="general-superblock">.
+</Para>
+
+<Para>
+The status window will show you which copy of the superblock copies you are
+currently editing.
+</Para>
+
+<Para>
+The main data window will show you the values of the various superblock
+variables, along with some interpretation of the values.
+</Para>
+
+<Para>
+Data can be changed with the <Command>set</Command> and <Command>writedata</Command> commands.
+
+<Screen>
+For example, set s_r_blocks_count=1400 will reserve 1400 blocks for root.
+</Screen>
+
+</Para>
+
+<Sect2>
+<Title>gocopy</Title>
+
+<Para>
+
+<Screen>
+Syntax: gocopy number
+</Screen>
+
+The <Command>gocopy</Command> command will "bring you" to the backup copy <Emphasis>number</Emphasis>
+of the superblock copies. <Command>gocopy 0</Command>, for example, will bring you to
+the main copy.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>setactivecopy</Title>
+
+<Para>
+
+<Screen>
+Syntax: setactivecopy
+</Screen>
+
+The <Command>setactivecopy</Command> command will copy the contents of the current
+superblock copy onto the contents of the main copy. It will also switch to
+editing of the main copy. No actual data is written to disk, of-course,
+until you issue the <Command>writedata</Command> command.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The group descriptors</Title>
+
+<Para>
+The group descriptors can be edited by the <Command>group</Command> command.
+</Para>
+
+<Para>
+The status window will indicate the current group descriptor, the total
+number of group descriptors (and hence of group blocks), and the backup copy
+number.
+</Para>
+
+<Para>
+The main data window will just show you the values of the various variables.
+</Para>
+
+<Para>
+Basically, you can use the <Command>next</Command> and <Command>prev</Command> commands, along with the
+<Command>set</Command> command, to modify the group descriptors.
+</Para>
+
+<Para>
+The group descriptors object is a junction, from which you can reach:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The inode table of the corresponding block group (the <Literal remap="tt">inode</Literal>
+command)
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The block allocation bitmap (the <Literal remap="tt">blockbitmap</Literal> command)
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The inode allocation bitmap (the <Literal remap="tt">inodebitmap</Literal> command)
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Sect2>
+<Title>blockbitmap</Title>
+
+<Para>
+
+<Screen>
+Syntax: blockbitmap
+</Screen>
+
+The <Command>blockbitmap</Command> command will let you edit the block bitmap allocation
+block of the current group block.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>entry</Title>
+
+<Para>
+
+<Screen>
+Syntax: entry number
+</Screen>
+
+The <Command>entry</Command> command will move you to the <Emphasis>number</Emphasis> group descriptor in the
+group descriptors table.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>inode</Title>
+
+<Para>
+
+<Screen>
+Syntax: inode
+</Screen>
+
+The <Command>inode</Command> command will pass you to the first inode in the current
+group block.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>inodebitmap</Title>
+
+<Para>
+
+<Screen>
+Syntax: inodebitmap
+</Screen>
+
+The <Command>inodebitmap</Command> command will let you edit the inode bitmap allocation
+block of the current group block.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>next</Title>
+
+<Para>
+
+<Screen>
+Syntax: next [number]
+</Screen>
+
+The <Command>next</Command> command will pass to the next <Emphasis>number</Emphasis> group
+descriptor. If <Emphasis>number</Emphasis> is omitted, <Emphasis>number=1</Emphasis> is assumed.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>prev</Title>
+
+<Para>
+
+<Screen>
+Syntax: prev [number]
+</Screen>
+
+The <Command>prev</Command> command will pass to the previous <Emphasis>number</Emphasis> group
+descriptor. If <Emphasis>number</Emphasis> is omitted, <Emphasis>number=1</Emphasis> is assumed.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>setactivecopy</Title>
+
+<Para>
+
+<Screen>
+Syntax: setactivecopy
+</Screen>
+
+The <Command>setactivecopy</Command> command copies the contents of the current group
+descriptor, to its main copy. The updated main copy will then be shown. No
+actual change is made to the disk until you issue the <Command>writedata</Command>
+command.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The inode</Title>
+
+<Para>
+An inode can be reached by the following two ways:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ Using <Command>inode</Command> from the corresponding group descriptor.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using <Command>followinode</Command> from a directory entry.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Using the <Command>cd</Command> command with the pathname to the file.
+
+For example, <Command>cd /usr/src/ext2ed/ext2ed.h</Command>
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The status window will indicate:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The current global inode number.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The total total number of inodes.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ On which block group the inode is allocated.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The total number of inodes in this group block.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The index of the current inode in the current group block.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The type of the inode (file, directory, special, etc).
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The main data window, in addition to the list of variables, will contain
+some interpretations on the right side.
+</Para>
+
+<Para>
+If the inode corresponds to a file, you can use the <Command>file</Command> command to
+edit the file.
+</Para>
+
+<Para>
+If the inode is an inode of a directory, you can use the <Command>dir</Command> command
+to edit the directory.
+</Para>
+
+<Sect2>
+<Title>dir</Title>
+
+<Para>
+
+<Screen>
+Syntax: dir
+</Screen>
+
+If the inode mode corresponds to a directory (shown on the status window),
+you can enter directory mode editing by using <Literal remap="tt">dir</Literal>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>entry</Title>
+
+<Para>
+
+<Screen>
+Syntax: entry number
+</Screen>
+
+The <Command>entry</Command> command will move you to the <Emphasis>number</Emphasis> inode in the
+current inode table.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>file</Title>
+
+<Para>
+
+<Screen>
+Syntax: file
+</Screen>
+
+If the inode mode corresponds to a file (shown on the status window),
+you can enter file mode editing by using <Command>file</Command>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>group</Title>
+
+<Para>
+
+<Screen>
+Syntax: group
+</Screen>
+
+The <Command>group</Command> command is used to go to the group descriptor of the
+current group block.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>next</Title>
+
+<Para>
+
+<Screen>
+Syntax: next [number]
+</Screen>
+
+The <Command>next</Command> command will pass to the next <Emphasis>number</Emphasis> inode.
+If <Emphasis>number</Emphasis> is omitted, <Emphasis>number=1</Emphasis> is assumed.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>prev</Title>
+
+<Para>
+
+<Screen>
+Syntax: prev [number]
+</Screen>
+
+The <Command>prev</Command> command will pass to the previous <Emphasis>number</Emphasis> inode.
+If <Emphasis>number</Emphasis> is omitted, <Emphasis>number=1</Emphasis> is assumed.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The file</Title>
+
+<Para>
+When editing a file, EXT2ED offers you a both a continuous and a true
+fragmented view of the file - The file is still shown block by block with
+the true block number at each stage and EXT2ED offers you commands which
+allow you to move between the <Literal remap="tt">file blocks</Literal>, while finding the
+allocated blocks by using the inode information behind the scenes.
+</Para>
+
+<Para>
+Aside from this, the editing is just a <Literal remap="tt">hex editing</Literal> - You move the
+cursor in the current block of the file by using <Command>next</Command> and
+<Command>prev</Command>, move between blocks by <Command>nextblock</Command> and <Command>prevblock</Command>,
+and make changes by the <Command>set</Command> command. Note that the set command is
+overridden here - There are no variables. The <Command>writedata</Command> command will
+update the current block to the disk.
+</Para>
+
+<Para>
+Reaching a file can be done by using the <Command>file</Command> command from its inode.
+The inode can be reached by any other means, for example, by the
+<Command>cd</Command> command, if you know the file name.
+</Para>
+
+<Para>
+The status window will indicate:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The global block number.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The internal file block number.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The file offset.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The file size.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The file inode number.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The indirection level - Whether it is a direct block (0), indirect
+(1), etc.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+The main data window will display the file either in hex mode or in text
+mode, select-able by the <Command>display</Command> command.
+</Para>
+
+<Para>
+In hex mode, EXT2ED will display offsets in the current block, along with a
+text and hex dump of the current block.
+</Para>
+
+<Para>
+In either case the <Literal remap="tt">current place</Literal> will be highlighted. In the hex mode
+it will be always highlighted, while in the text mode it will be highlighted
+if the character is display-able.
+</Para>
+
+<Sect2>
+<Title>block</Title>
+
+<Para>
+
+<Screen>
+Syntax: block block_num
+</Screen>
+
+The <Command>block</Command> command is used to move inside the file. The
+<Emphasis>block&lowbar;num</Emphasis> argument is the requested internal file block number. A
+value of 0 will reach the beginning of the file.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>display</Title>
+
+<Para>
+
+<Screen>
+Syntax: display [text || hex]
+</Screen>
+
+The <Command>display</Command> command changes the display mode of the file.
+<Command>display
+hex</Command> will switch to <Command>hex mode</Command>, while <Command>display text</Command> will switch
+to text mode. The default mode when no <Command>display</Command> command is issued is
+<Command>hex mode</Command>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>inode</Title>
+
+<Para>
+
+<Screen>
+Syntax: inode
+</Screen>
+
+The <Command>inode</Command> command will return to the inode of the current file.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>next</Title>
+
+<Para>
+
+<Screen>
+Syntax: next [num]
+</Screen>
+
+The <Command>next</Command> command will pass to the next byte in the file. If
+<Emphasis>num</Emphasis> is supplied, it will pass to the next <Emphasis>num</Emphasis> bytes.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>nextblock</Title>
+
+<Para>
+
+<Screen>
+Syntax: nextblock [num]
+</Screen>
+
+The <Command>nextblock</Command> command will pass to the next block in the file. If
+<Emphasis>num</Emphasis> is supplied, it will pass to the next <Emphasis>num</Emphasis> blocks.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>prev</Title>
+
+<Para>
+
+<Screen>
+Syntax: prev [num]
+</Screen>
+
+The <Command>prev</Command> command will pass to the previous byte in the file. If
+<Emphasis>num</Emphasis> is supplied, it will pass to the previous <Emphasis>num</Emphasis> bytes.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>prevblock</Title>
+
+<Para>
+
+<Screen>
+Syntax: prevblock [num]
+</Screen>
+
+The <Command>nextblock</Command> command will pass to the previous block in the file. If
+<Emphasis>num</Emphasis> is supplied, it will pass to the previous <Emphasis>num</Emphasis> blocks.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>offset</Title>
+
+<Para>
+
+<Screen>
+Syntax: offset file_offset
+</Screen>
+
+The <Command>offset</Command> command will move to the specified offset in the file.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>set</Title>
+
+<Para>
+
+<Screen>
+Syntax: set [text || hex] arg1 [arg2 arg3 ...]
+</Screen>
+
+The <Command>file set</Command> command is working like the <Literal remap="tt">general set command</Literal>,
+with <Literal remap="tt">type=none</Literal>. There are no variables.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>writedata</Title>
+
+<Para>
+
+<Screen>
+Syntax: writedata
+</Screen>
+
+The <Command>writedata</Command> command will update the current file block in the disk.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The directory</Title>
+
+<Para>
+When editing a file, EXT2ED analyzes for you both the allocation blocks of
+the directory entries, and the directory entries.
+</Para>
+
+<Para>
+Each directory entry is displayed on one row. You can move the highlighted
+entry with the usual <Command>next</Command> and <Command>prev</Command> commands, and "dive in"
+with the <Command>followinode</Command> command.
+</Para>
+
+<Para>
+The status window will indicate:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ The directory entry number.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The total number of directory entries in this directory.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The current global block number.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The current offset in the entire directory - When viewing the
+directory as a continuous file.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The inode number of the directory itself.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ The indirection level - Whether it is a direct block (0), indirect
+(1), etc.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Sect2>
+<Title>cd</Title>
+
+<Para>
+
+<Screen>
+Syntax: cd [path]
+</Screen>
+
+The <Command>cd</Command> command is used in the usual meaning, like the global cd
+command.
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+ If <Emphasis>path</Emphasis> is not specified, the current directory entry is
+followed.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Emphasis>path</Emphasis> can be relative to the current directory.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ <Emphasis>path</Emphasis> can also end up in a file, in which case the file inode
+will be reached.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+ Symbolic link (fast only, meanwhile) is automatically followed.
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>entry</Title>
+
+<Para>
+
+<Screen>
+Syntax: entry [entry_num]
+</Screen>
+
+The <Command>entry</Command> command sets <Emphasis>entry&lowbar;num</Emphasis> as the current directory
+entry.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>followinode</Title>
+
+<Para>
+
+<Screen>
+Syntax: followinode
+</Screen>
+
+The <Command>followinode</Command> command will move you to the inode pointed by the
+current directory entry.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>inode</Title>
+
+<Para>
+
+<Screen>
+Syntax: inode
+</Screen>
+
+The <Command>inode</Command> command will return you to the parent inode of the whole
+directory listing.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>next</Title>
+
+<Para>
+
+<Screen>
+Syntax: next [num]
+</Screen>
+
+The <Command>next</Command> command will pass to the next directory entry.
+If <Emphasis>num</Emphasis> is supplied, it will pass to the next <Emphasis>num</Emphasis> entries.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>prev</Title>
+
+<Para>
+
+<Screen>
+Syntax: prev [num]
+</Screen>
+
+The <Command>prev</Command> command will pass to the previous directory entry.
+If <Emphasis>num</Emphasis> is supplied, it will pass to the previous <Emphasis>num</Emphasis> entries.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>writedata</Title>
+
+<Para>
+
+<Screen>
+Syntax: writedata
+</Screen>
+
+The <Command>writedata</Command> command will write the current directory entry to the
+disk.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1 id="block-bitmap">
+<Title>The block allocation bitmap</Title>
+
+<Para>
+The <Literal remap="tt">block allocation bitmap</Literal> of any block group can be reached from
+the corresponding group descriptor.
+</Para>
+
+<Para>
+You will be offered a bit listing of the entire blocks in the group. The
+current block will be highlighted and its number will be displayed in the
+status window.
+</Para>
+
+<Para>
+A value of "1" means that the block is allocated, while a value of "0"
+signals that it is free. The value is also interpreted in the status
+window. You can use the usual <Command>next/prev</Command> commands, along with the
+<Command>allocate/deallocate</Command> commands.
+</Para>
+
+<Sect2>
+<Title>allocate</Title>
+
+<Para>
+
+<Screen>
+Syntax: allocate [num]
+</Screen>
+
+The <Command>allocate</Command> command allocates <Emphasis>num</Emphasis> blocks, starting from the
+highlighted position. If <Emphasis>num</Emphasis> is not specified, <Emphasis>num=1</Emphasis> is assumed.
+Of-course, no actual change is made until you issue a <Command>writedata</Command> command.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>deallocate</Title>
+
+<Para>
+
+<Screen>
+Syntax: deallocate [num]
+</Screen>
+
+The <Command>deallocate</Command> command deallocates <Emphasis>num</Emphasis> blocks, starting from the
+highlighted position. If <Emphasis>num</Emphasis> is not specified, <Emphasis>num=1</Emphasis> is assumed.
+Of-course, no actual change is made until you issue a <Command>writedata</Command> command.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>entry</Title>
+
+<Para>
+
+<Screen>
+Syntax: entry [entry_num]
+</Screen>
+
+The <Command>entry</Command> command sets the current highlighted block to
+<Emphasis>entry&lowbar;num</Emphasis>.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>next</Title>
+
+<Para>
+
+<Screen>
+Syntax: next [num]
+</Screen>
+
+The <Command>next</Command> command will pass to the next bit, which corresponds to the
+next block. If <Emphasis>num</Emphasis> is supplied, it will pass to the next <Emphasis>num</Emphasis>
+bits.
+</Para>
+
+</Sect2>
+
+<Sect2>
+<Title>prev</Title>
+
+<Para>
+
+<Screen>
+Syntax: prev [num]
+</Screen>
+
+The <Command>prev</Command> command will pass to the previous bit, which corresponds to the
+previous block. If <Emphasis>num</Emphasis> is supplied, it will pass to the previous
+<Emphasis>num</Emphasis> bits.
+</Para>
+
+</Sect2>
+
+</Sect1>
+
+<Sect1>
+<Title>The inode allocation bitmap</Title>
+
+<Para>
+The <Literal remap="tt">inode allocation bitmap</Literal> is very similar to the block allocation
+bitmap explained above. It is also reached from the corresponding group
+descriptor. Please refer to section <XRef LinkEnd="block-bitmap">.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Filesystem size limitation</Title>
+
+<Para>
+While an ext2 filesystem has a size limit of <Literal remap="tt">4 TB</Literal>, EXT2ED currently
+<Literal remap="tt">can't</Literal> handle filesystems which are <Literal remap="tt">bigger than 2 GB</Literal>.
+</Para>
+
+<Para>
+I am sorry for the inconvenience. This will hopefully be fixed in future
+releases.
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Copyright</Title>
+
+<Para>
+EXT2ED is Copyright (C) 1995 Gadi Oxman.
+</Para>
+
+<Para>
+EXT2ED is hereby placed under the GPL - Gnu Public License. You are free and
+welcome to copy, view and modify the sources. My only wish is that my
+copyright presented above will be left and that a list of the bug fixes,
+added features, etc, will be provided.
+</Para>
+
+<Para>
+The entire EXT2ED project is based, of-course, on the kernel sources. The
+<Literal remap="tt">ext2.descriptors</Literal> distributed with EXT2ED is a slightly modified
+version of the main ext2 include file, /usr/include/linux/ext2&lowbar;fs.h. Follows
+the original copyright:
+</Para>
+
+<Para>
+
+<Screen>
+/*
+ * linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * from
+ *
+ * linux/include/linux/minix_fs.h
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+</Screen>
+
+</Para>
+
+</Sect1>
+
+<Sect1>
+<Title>Acknowledgments</Title>
+
+<Para>
+EXT2ED was constructed as a student project in the software
+laboratory of the faculty of electrical-engineering in the
+<Literal remap="tt">Technion - Israel's institute of technology</Literal>.
+</Para>
+
+<Para>
+At first, I would like to thank <PersonName><FirstName>Avner</FirstName> <SurName>Lottem</SurName></PersonName> and <PersonName><Honorific>Doctor</Honorific> <FirstName>Ilana</FirstName> <SurName>David</Surname></PersonName> for their interest and assistance in this project.
+</Para>
+
+<Para>
+I would also like to thank the following people, who were involved in the
+design and implementation of the ext2 filesystem kernel code and support
+utilities:
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+<PersonName><FirstName>Remy</FirstName> <SurName>Card</SurName></PersonName>
+
+Who designed, implemented and maintains the ext2 filesystem kernel
+code, and some of the ext2 utilities. Remy Card is also the author
+of several helpful slides concerning the ext2 filesystem.
+Specifically, he is the author of <Literal remap="tt">File Management in the Linux
+Kernel</Literal> and of <Literal remap="tt">The Second Extended File System - Current State,
+Future Development</Literal>.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+<PersonName><FirstName>Wayne</FirstName> <SurName>Davison</SurName></PersonName>
+
+Who designed the ext2 filesystem.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+<PersonName><FirstName>Stephen</FirstName> <Surname>Tweedie</SurName></PersonName>
+
+Who helped designing the ext2 filesystem kernel code and wrote the
+slides <Literal remap="tt">Optimizations in File Systems</Literal>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+<PersonName><FirstName>Theodore</FirstName> <SurName>Ts'o</SurName></PersonName>
+
+Who is the author of several ext2 utilities and of the ext2 library
+<Literal remap="tt">libext2fs</Literal> (which I didn't use, simply because I didn't know
+it exists when I started to work on my project).
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+<Para>
+Lastly, I would like to thank, of-course, <PersonName><FirstName>Linus</FirstName> <SurName>Torvalds</SurName></PersonName> and the
+Linux community for providing all of us with such a great operating
+system.
+</Para>
+
+<Para>
+Please contact me in a case of bug report, suggestions, or just about
+anything concerning EXT2ED.
+</Para>
+
+<Para>
+Enjoy,
+</Para>
+
+<Para>
+Gadi Oxman &lt;tgud@tochnapc2.technion.ac.il&gt;
+</Para>
+
+<Para>
+Haifa, August 95
+</Para>
+
+</Sect1>
+
+</Article>
diff --git a/ext2ed/ext2.descriptors b/ext2ed/ext2.descriptors
new file mode 100644
index 0000000..e356f4c
--- /dev/null
+++ b/ext2ed/ext2.descriptors
@@ -0,0 +1,976 @@
+Extended 2 filesystem structure definitions for ext2ed.
+
+Most of this file is just copied from the ext2 main include file.
+
+My parser is very primitive - It only searches for the struct keywords,
+and uses the variables in there. The rest of the file is just ignored.
+
+You will find at the end a few additional types which are not available in
+the original include file, such as the types "file" and "dir". They have
+no variables, but are necessary due to the way ext2ed binds C commands
+to specific types.
+
+Gadi Oxman, 7/95
+
+Here is the original copyright:
+
+/*
+ * linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * from
+ *
+ * linux/include/linux/minix_fs.h
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+
+/*
+ * ACL structures
+ */
+struct ext2_acl_header /* Header of Access Control Lists */
+{
+ unsigned long aclh_size;
+ unsigned long aclh_file_count;
+ unsigned long aclh_acle_count;
+ unsigned long aclh_first_acle;
+};
+
+struct ext2_acl_entry /* Access Control List Entry */
+{
+ unsigned long acle_size;
+ unsigned short acle_perms; /* Access permissions */
+ unsigned short acle_type; /* Type of entry */
+ unsigned short acle_tag; /* User or group identity */
+ unsigned short acle_pad1;
+ unsigned long acle_next; /* Pointer on next entry for the */
+ /* same inode or on next free entry */
+};
+
+/*
+ * Structure of a blocks group descriptor
+ */
+
+struct ext2_group_desc
+{
+ __u32 bg_block_bitmap; /* Blocks bitmap block */
+ __u32 bg_inode_bitmap; /* Inodes bitmap block */
+ __u32 bg_inode_table; /* Inodes table block */
+ __u16 bg_free_blocks_count; /* Free blocks count */
+ __u16 bg_free_inodes_count; /* Free inodes count */
+ __u16 bg_used_dirs_count; /* Directories count */
+ __u16 bg_pad;
+ __u32 bg_reserved[0];
+ __u32 bg_reserved[1];
+ __u32 bg_reserved[2];
+};
+
+/*
+ * Structure of an inode on the disk
+ */
+struct ext2_inode {
+ __u16 i_mode; /* File mode */
+ __u16 i_uid; /* Owner Uid */
+ __u32 i_size; /* Size in bytes */
+ __u32 i_atime; /* Access time */
+ __u32 i_ctime; /* Creation time */
+ __u32 i_mtime; /* Modification time */
+ __u32 i_dtime; /* Deletion Time */
+ __u16 i_gid; /* Group Id */
+ __u16 i_links_count; /* Links count */
+ __u32 i_blocks; /* Blocks count */
+ __u32 i_flags; /* File flags */
+ __u32 l_i_reserved1;
+ __u32 i_block[0]; /* Pointers to blocks */
+ __u32 i_block[1]; /* Pointers to blocks */
+ __u32 i_block[2]; /* Pointers to blocks */
+ __u32 i_block[3]; /* Pointers to blocks */
+ __u32 i_block[4]; /* Pointers to blocks */
+ __u32 i_block[5]; /* Pointers to blocks */
+ __u32 i_block[6]; /* Pointers to blocks */
+ __u32 i_block[7]; /* Pointers to blocks */
+ __u32 i_block[8]; /* Pointers to blocks */
+ __u32 i_block[9]; /* Pointers to blocks */
+ __u32 i_block[10]; /* Pointers to blocks */
+ __u32 i_block[11]; /* Pointers to blocks */
+ __u32 i_block[12]; /* Pointers to blocks */
+ __u32 i_block[13]; /* Pointers to blocks */
+ __u32 i_block[14]; /* Pointers to blocks */
+ __u32 i_version; /* File version (for NFS) */
+ __u32 i_file_acl; /* File ACL */
+ __u32 i_size_high; /* High 32bits of size */
+ __u32 i_faddr; /* Fragment address */
+ __u8 l_i_frag; /* Fragment number */
+ __u8 l_i_fsize; /* Fragment size */
+ __u16 i_pad1;
+ __u16 l_i_uid_high; /* these 2 fields */
+ __u16 l_i_gid_high; /* were reserved2[0] */
+ __u32 l_i_reserved2;
+};
+
+/*
+ * Structure of the super block
+ */
+struct ext2_super_block {
+ __u32 s_inodes_count; /* Inodes count */
+ __u32 s_blocks_count; /* Blocks count */
+ __u32 s_r_blocks_count; /* Reserved blocks count */
+ __u32 s_free_blocks_count; /* Free blocks count */
+ __u32 s_free_inodes_count; /* Free inodes count */
+ __u32 s_first_data_block; /* First Data Block */
+ __u32 s_log_block_size; /* Block size */
+ __s32 s_log_frag_size; /* Fragment size */
+ __u32 s_blocks_per_group; /* # Blocks per group */
+ __u32 s_frags_per_group; /* # Fragments per group */
+ __u32 s_inodes_per_group; /* # Inodes per group */
+ __u32 s_mtime; /* Mount time */
+ __u32 s_wtime; /* Write time */
+ __u16 s_mnt_count; /* Mount count */
+ __s16 s_max_mnt_count; /* Maximal mount count */
+ __u16 s_magic; /* Magic signature */
+ __u16 s_state; /* File system state */
+ __u16 s_errors; /* Behaviour when detecting errors */
+ __u16 s_minor_rev_level; /* minor revision level */
+ __u32 s_lastcheck; /* time of last check */
+ __u32 s_checkinterval; /* max. time between checks */
+ __u32 s_creator_os; /* OS */
+ __u32 s_rev_level; /* Revision level */
+ __u16 s_def_resuid; /* Default uid for reserved blocks */
+ __u16 s_def_resgid; /* Default gid for reserved blocks */
+ __u32 s_first_ino; /* First non-reserved inode */
+ __u16 s_inode_size; /* size of inode structure */
+ __u16 s_block_group_nr; /* block group # of this superblock */
+ __u32 s_feature_compat; /* compatible feature set */
+ __u32 s_feature_incompat; /* incompatible feature set */
+ __u32 s_feature_ro_compat; /* readonly-compatible feature set */
+ char[16] s_uuid; /* 128-bit uuid for volume */
+ char[16] s_volume_name; /* volume name */
+ char[64] s_last_mounted; /* directory where last mounted */
+ __u32 s_algorithm_usage_bitmap; /* For compression */
+ /*
+ * Performance hints. Directory preallocation should only
+ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
+ */
+ __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
+ __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
+ __u16 s_padding1;
+ /*
+ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
+ */
+ char[16] s_journal_uuid; /* uuid of journal superblock */
+ __u32 s_journal_inum; /* inode number of journal file */
+ __u32 s_journal_dev; /* device number of journal file */
+ __u32 s_last_orphan; /* start of list of inodes to delete */
+
+
+ __u32 s_reserved[0]; /* Padding to the end of the block */
+ __u32 s_reserved[1];
+ __u32 s_reserved[2];
+ __u32 s_reserved[3];
+ __u32 s_reserved[4];
+ __u32 s_reserved[5];
+ __u32 s_reserved[6];
+ __u32 s_reserved[7];
+ __u32 s_reserved[8];
+ __u32 s_reserved[9];
+ __u32 s_reserved[10];
+ __u32 s_reserved[11];
+ __u32 s_reserved[12];
+ __u32 s_reserved[13];
+ __u32 s_reserved[14];
+ __u32 s_reserved[15];
+ __u32 s_reserved[16];
+ __u32 s_reserved[17];
+ __u32 s_reserved[18];
+ __u32 s_reserved[19];
+ __u32 s_reserved[20];
+ __u32 s_reserved[21];
+ __u32 s_reserved[22];
+ __u32 s_reserved[23];
+ __u32 s_reserved[24];
+ __u32 s_reserved[25];
+ __u32 s_reserved[26];
+ __u32 s_reserved[27];
+ __u32 s_reserved[28];
+ __u32 s_reserved[29];
+ __u32 s_reserved[30];
+ __u32 s_reserved[31];
+ __u32 s_reserved[32];
+ __u32 s_reserved[33];
+ __u32 s_reserved[34];
+ __u32 s_reserved[35];
+ __u32 s_reserved[36];
+ __u32 s_reserved[37];
+ __u32 s_reserved[38];
+ __u32 s_reserved[39];
+ __u32 s_reserved[40];
+ __u32 s_reserved[41];
+ __u32 s_reserved[42];
+ __u32 s_reserved[43];
+ __u32 s_reserved[44];
+ __u32 s_reserved[45];
+ __u32 s_reserved[46];
+ __u32 s_reserved[47];
+ __u32 s_reserved[48];
+ __u32 s_reserved[49];
+ __u32 s_reserved[50];
+ __u32 s_reserved[51];
+ __u32 s_reserved[52];
+ __u32 s_reserved[53];
+ __u32 s_reserved[54];
+ __u32 s_reserved[55];
+ __u32 s_reserved[56];
+ __u32 s_reserved[57];
+ __u32 s_reserved[58];
+ __u32 s_reserved[59];
+ __u32 s_reserved[60];
+ __u32 s_reserved[61];
+ __u32 s_reserved[62];
+ __u32 s_reserved[63];
+ __u32 s_reserved[64];
+ __u32 s_reserved[65];
+ __u32 s_reserved[66];
+ __u32 s_reserved[67];
+ __u32 s_reserved[68];
+ __u32 s_reserved[69];
+ __u32 s_reserved[70];
+ __u32 s_reserved[71];
+ __u32 s_reserved[72];
+ __u32 s_reserved[73];
+ __u32 s_reserved[74];
+ __u32 s_reserved[75];
+ __u32 s_reserved[76];
+ __u32 s_reserved[77];
+ __u32 s_reserved[78];
+ __u32 s_reserved[79];
+ __u32 s_reserved[80];
+ __u32 s_reserved[81];
+ __u32 s_reserved[82];
+ __u32 s_reserved[83];
+ __u32 s_reserved[84];
+ __u32 s_reserved[85];
+ __u32 s_reserved[86];
+ __u32 s_reserved[87];
+ __u32 s_reserved[88];
+ __u32 s_reserved[89];
+ __u32 s_reserved[90];
+ __u32 s_reserved[91];
+ __u32 s_reserved[92];
+ __u32 s_reserved[93];
+ __u32 s_reserved[94];
+ __u32 s_reserved[95];
+ __u32 s_reserved[96];
+ __u32 s_reserved[97];
+ __u32 s_reserved[98];
+ __u32 s_reserved[99];
+ __u32 s_reserved[100];
+ __u32 s_reserved[101];
+ __u32 s_reserved[102];
+ __u32 s_reserved[103];
+ __u32 s_reserved[104];
+ __u32 s_reserved[105];
+ __u32 s_reserved[106];
+ __u32 s_reserved[107];
+ __u32 s_reserved[108];
+ __u32 s_reserved[109];
+ __u32 s_reserved[110];
+ __u32 s_reserved[111];
+ __u32 s_reserved[112];
+ __u32 s_reserved[113];
+ __u32 s_reserved[114];
+ __u32 s_reserved[115];
+ __u32 s_reserved[116];
+ __u32 s_reserved[117];
+ __u32 s_reserved[118];
+ __u32 s_reserved[119];
+ __u32 s_reserved[120];
+ __u32 s_reserved[121];
+ __u32 s_reserved[122];
+ __u32 s_reserved[123];
+ __u32 s_reserved[124];
+ __u32 s_reserved[125];
+ __u32 s_reserved[126];
+ __u32 s_reserved[127];
+ __u32 s_reserved[128];
+ __u32 s_reserved[129];
+ __u32 s_reserved[130];
+ __u32 s_reserved[131];
+ __u32 s_reserved[132];
+ __u32 s_reserved[133];
+ __u32 s_reserved[134];
+ __u32 s_reserved[135];
+ __u32 s_reserved[136];
+ __u32 s_reserved[137];
+ __u32 s_reserved[138];
+ __u32 s_reserved[139];
+ __u32 s_reserved[140];
+ __u32 s_reserved[141];
+ __u32 s_reserved[142];
+ __u32 s_reserved[143];
+ __u32 s_reserved[144];
+ __u32 s_reserved[145];
+ __u32 s_reserved[146];
+ __u32 s_reserved[147];
+ __u32 s_reserved[148];
+ __u32 s_reserved[149];
+ __u32 s_reserved[150];
+ __u32 s_reserved[151];
+ __u32 s_reserved[152];
+ __u32 s_reserved[153];
+ __u32 s_reserved[154];
+ __u32 s_reserved[155];
+ __u32 s_reserved[156];
+ __u32 s_reserved[157];
+ __u32 s_reserved[158];
+ __u32 s_reserved[159];
+ __u32 s_reserved[160];
+ __u32 s_reserved[161];
+ __u32 s_reserved[162];
+ __u32 s_reserved[163];
+ __u32 s_reserved[164];
+ __u32 s_reserved[165];
+ __u32 s_reserved[166];
+ __u32 s_reserved[167];
+ __u32 s_reserved[168];
+ __u32 s_reserved[169];
+ __u32 s_reserved[170];
+ __u32 s_reserved[171];
+ __u32 s_reserved[172];
+ __u32 s_reserved[173];
+ __u32 s_reserved[174];
+ __u32 s_reserved[175];
+ __u32 s_reserved[176];
+ __u32 s_reserved[177];
+ __u32 s_reserved[178];
+ __u32 s_reserved[179];
+ __u32 s_reserved[180];
+ __u32 s_reserved[181];
+ __u32 s_reserved[182];
+ __u32 s_reserved[183];
+ __u32 s_reserved[184];
+ __u32 s_reserved[185];
+ __u32 s_reserved[186];
+ __u32 s_reserved[187];
+ __u32 s_reserved[188];
+ __u32 s_reserved[189];
+ __u32 s_reserved[190];
+ __u32 s_reserved[191];
+ __u32 s_reserved[192];
+ __u32 s_reserved[193];
+ __u32 s_reserved[194];
+ __u32 s_reserved[195];
+ __u32 s_reserved[196];
+};
+
+The following is actually not used, due to the variable length of the
+name field. EXT2ED handles directories through the type "dir" below.
+
+/*
+ * Structure of a directory entry
+ */
+
+/* struct ext2_dir_entry { */
+/*
+ __u32 inode; /* Inode number */
+ __u16 rec_len; /* Directory entry length */
+ __u16 name_len; /* Name length */
+ char name[EXT2_NAME_LEN]; /* File name */
+};
+*/
+
+struct file {
+};
+
+struct dir {
+};
+
+struct block_bitmap {
+};
+
+struct inode_bitmap {
+};
+
+struct ext2_dx_root_node {
+ __u32 dot_inode;
+ __u16 dot_rec_len;
+ __u8 dot_name_len;
+ __u8 dot_file_type;
+ char[4] dot_name;
+ __u32 dot_dot_inode;
+ __u16 dot_dot_rec_len;
+ __u8 dot_dot_name_len;
+ __u8 dot_dot_file_type;
+ char[4] dot_dot_name;
+ __u32 reserved_zero;
+ __u8 hash_version; /* 0 now, 1 at release */
+ __u8 info_length; /* 8 */
+ __u8 indirect_levels;
+ __u8 unused_flags;
+ __u16 limit;
+ __u16 count;
+ __u32 block[0];
+ __u32 hash[1];
+ __u32 block[1];
+ __u32 hash[2];
+ __u32 block[2];
+ __u32 hash[3];
+ __u32 block[3];
+ __u32 hash[4];
+ __u32 block[4];
+ __u32 hash[5];
+ __u32 block[5];
+ __u32 hash[6];
+ __u32 block[6];
+ __u32 hash[7];
+ __u32 block[7];
+ __u32 hash[8];
+ __u32 block[8];
+ __u32 hash[9];
+ __u32 block[9];
+ __u32 hash[10];
+ __u32 block[10];
+ __u32 hash[11];
+ __u32 block[11];
+ __u32 hash[12];
+ __u32 block[12];
+ __u32 hash[13];
+ __u32 block[13];
+ __u32 hash[14];
+ __u32 block[14];
+ __u32 hash[15];
+ __u32 block[15];
+ __u32 hash[16];
+ __u32 block[16];
+ __u32 hash[17];
+ __u32 block[17];
+ __u32 hash[18];
+ __u32 block[18];
+ __u32 hash[19];
+ __u32 block[19];
+ __u32 hash[20];
+ __u32 block[20];
+ __u32 hash[21];
+ __u32 block[21];
+ __u32 hash[22];
+ __u32 block[22];
+ __u32 hash[23];
+ __u32 block[23];
+ __u32 hash[24];
+ __u32 block[24];
+ __u32 hash[25];
+ __u32 block[25];
+ __u32 hash[26];
+ __u32 block[26];
+ __u32 hash[27];
+ __u32 block[27];
+ __u32 hash[28];
+ __u32 block[28];
+ __u32 hash[29];
+ __u32 block[29];
+ __u32 hash[30];
+ __u32 block[30];
+ __u32 hash[31];
+ __u32 block[31];
+ __u32 hash[32];
+ __u32 block[32];
+ __u32 hash[33];
+ __u32 block[33];
+ __u32 hash[34];
+ __u32 block[34];
+ __u32 hash[35];
+ __u32 block[35];
+ __u32 hash[36];
+ __u32 block[36];
+ __u32 hash[37];
+ __u32 block[37];
+ __u32 hash[38];
+ __u32 block[38];
+ __u32 hash[39];
+ __u32 block[39];
+ __u32 hash[40];
+ __u32 block[40];
+ __u32 hash[41];
+ __u32 block[41];
+ __u32 hash[42];
+ __u32 block[42];
+ __u32 hash[43];
+ __u32 block[43];
+ __u32 hash[44];
+ __u32 block[44];
+ __u32 hash[45];
+ __u32 block[45];
+ __u32 hash[46];
+ __u32 block[46];
+ __u32 hash[47];
+ __u32 block[47];
+ __u32 hash[48];
+ __u32 block[48];
+ __u32 hash[49];
+ __u32 block[49];
+ __u32 hash[50];
+ __u32 block[50];
+ __u32 hash[51];
+ __u32 block[51];
+ __u32 hash[52];
+ __u32 block[52];
+ __u32 hash[53];
+ __u32 block[53];
+ __u32 hash[54];
+ __u32 block[54];
+ __u32 hash[55];
+ __u32 block[55];
+ __u32 hash[56];
+ __u32 block[56];
+ __u32 hash[57];
+ __u32 block[57];
+ __u32 hash[58];
+ __u32 block[58];
+ __u32 hash[59];
+ __u32 block[59];
+ __u32 hash[60];
+ __u32 block[60];
+ __u32 hash[61];
+ __u32 block[61];
+ __u32 hash[62];
+ __u32 block[62];
+ __u32 hash[63];
+ __u32 block[63];
+ __u32 hash[64];
+ __u32 block[64];
+ __u32 hash[65];
+ __u32 block[65];
+ __u32 hash[66];
+ __u32 block[66];
+ __u32 hash[67];
+ __u32 block[67];
+ __u32 hash[68];
+ __u32 block[68];
+ __u32 hash[69];
+ __u32 block[69];
+ __u32 hash[70];
+ __u32 block[70];
+ __u32 hash[71];
+ __u32 block[71];
+ __u32 hash[72];
+ __u32 block[72];
+ __u32 hash[73];
+ __u32 block[73];
+ __u32 hash[74];
+ __u32 block[74];
+ __u32 hash[75];
+ __u32 block[75];
+ __u32 hash[76];
+ __u32 block[76];
+ __u32 hash[77];
+ __u32 block[77];
+ __u32 hash[78];
+ __u32 block[78];
+ __u32 hash[79];
+ __u32 block[79];
+ __u32 hash[80];
+ __u32 block[80];
+ __u32 hash[81];
+ __u32 block[81];
+ __u32 hash[82];
+ __u32 block[82];
+ __u32 hash[83];
+ __u32 block[83];
+ __u32 hash[84];
+ __u32 block[84];
+ __u32 hash[85];
+ __u32 block[85];
+ __u32 hash[86];
+ __u32 block[86];
+ __u32 hash[87];
+ __u32 block[87];
+ __u32 hash[88];
+ __u32 block[88];
+ __u32 hash[89];
+ __u32 block[89];
+ __u32 hash[80];
+ __u32 block[80];
+ __u32 hash[81];
+ __u32 block[81];
+ __u32 hash[82];
+ __u32 block[82];
+ __u32 hash[83];
+ __u32 block[83];
+ __u32 hash[84];
+ __u32 block[84];
+ __u32 hash[85];
+ __u32 block[85];
+ __u32 hash[86];
+ __u32 block[86];
+ __u32 hash[87];
+ __u32 block[87];
+ __u32 hash[88];
+ __u32 block[88];
+ __u32 hash[89];
+ __u32 block[89];
+ __u32 hash[90];
+ __u32 block[90];
+ __u32 hash[91];
+ __u32 block[91];
+ __u32 hash[92];
+ __u32 block[92];
+ __u32 hash[93];
+ __u32 block[93];
+ __u32 hash[94];
+ __u32 block[94];
+ __u32 hash[95];
+ __u32 block[95];
+ __u32 hash[96];
+ __u32 block[96];
+ __u32 hash[97];
+ __u32 block[97];
+ __u32 hash[98];
+ __u32 block[98];
+ __u32 hash[99];
+ __u32 block[99];
+ __u32 hash[100];
+ __u32 block[100];
+ __u32 hash[101];
+ __u32 block[101];
+ __u32 hash[102];
+ __u32 block[102];
+ __u32 hash[103];
+ __u32 block[103];
+ __u32 hash[104];
+ __u32 block[104];
+ __u32 hash[105];
+ __u32 block[105];
+ __u32 hash[106];
+ __u32 block[106];
+ __u32 hash[107];
+ __u32 block[107];
+ __u32 hash[108];
+ __u32 block[108];
+ __u32 hash[109];
+ __u32 block[109];
+ __u32 hash[110];
+ __u32 block[110];
+ __u32 hash[111];
+ __u32 block[111];
+ __u32 hash[112];
+ __u32 block[112];
+ __u32 hash[113];
+ __u32 block[113];
+ __u32 hash[114];
+ __u32 block[114];
+ __u32 hash[115];
+ __u32 block[115];
+ __u32 hash[116];
+ __u32 block[116];
+ __u32 hash[117];
+ __u32 block[117];
+ __u32 hash[118];
+ __u32 block[118];
+ __u32 hash[119];
+ __u32 block[119];
+ __u32 hash[120];
+ __u32 block[120];
+ __u32 hash[121];
+ __u32 block[121];
+ __u32 hash[122];
+ __u32 block[122];
+ __u32 hash[123];
+ __u32 block[123];
+ __u32 hash[124];
+ __u32 block[124];
+ __u32 hash[125];
+ __u32 block[125];
+ __u32 hash[126];
+ __u32 block[126];
+ __u32 hash[127];
+ __u32 block[127];
+};
+
+struct ext2_dx_int_node {
+ __u32 fake_inode;
+ __u16 fake_rec_len;
+ __u8 fake_name_len;
+ __u8 fake_file_type;
+ __u16 limit;
+ __u16 count;
+ __u32 block[0];
+ __u32 hash[1];
+ __u32 block[1];
+ __u32 hash[2];
+ __u32 block[2];
+ __u32 hash[3];
+ __u32 block[3];
+ __u32 hash[4];
+ __u32 block[4];
+ __u32 hash[5];
+ __u32 block[5];
+ __u32 hash[6];
+ __u32 block[6];
+ __u32 hash[7];
+ __u32 block[7];
+ __u32 hash[8];
+ __u32 block[8];
+ __u32 hash[9];
+ __u32 block[9];
+ __u32 hash[10];
+ __u32 block[10];
+ __u32 hash[11];
+ __u32 block[11];
+ __u32 hash[12];
+ __u32 block[12];
+ __u32 hash[13];
+ __u32 block[13];
+ __u32 hash[14];
+ __u32 block[14];
+ __u32 hash[15];
+ __u32 block[15];
+ __u32 hash[16];
+ __u32 block[16];
+ __u32 hash[17];
+ __u32 block[17];
+ __u32 hash[18];
+ __u32 block[18];
+ __u32 hash[19];
+ __u32 block[19];
+ __u32 hash[20];
+ __u32 block[20];
+ __u32 hash[21];
+ __u32 block[21];
+ __u32 hash[22];
+ __u32 block[22];
+ __u32 hash[23];
+ __u32 block[23];
+ __u32 hash[24];
+ __u32 block[24];
+ __u32 hash[25];
+ __u32 block[25];
+ __u32 hash[26];
+ __u32 block[26];
+ __u32 hash[27];
+ __u32 block[27];
+ __u32 hash[28];
+ __u32 block[28];
+ __u32 hash[29];
+ __u32 block[29];
+ __u32 hash[30];
+ __u32 block[30];
+ __u32 hash[31];
+ __u32 block[31];
+ __u32 hash[32];
+ __u32 block[32];
+ __u32 hash[33];
+ __u32 block[33];
+ __u32 hash[34];
+ __u32 block[34];
+ __u32 hash[35];
+ __u32 block[35];
+ __u32 hash[36];
+ __u32 block[36];
+ __u32 hash[37];
+ __u32 block[37];
+ __u32 hash[38];
+ __u32 block[38];
+ __u32 hash[39];
+ __u32 block[39];
+ __u32 hash[40];
+ __u32 block[40];
+ __u32 hash[41];
+ __u32 block[41];
+ __u32 hash[42];
+ __u32 block[42];
+ __u32 hash[43];
+ __u32 block[43];
+ __u32 hash[44];
+ __u32 block[44];
+ __u32 hash[45];
+ __u32 block[45];
+ __u32 hash[46];
+ __u32 block[46];
+ __u32 hash[47];
+ __u32 block[47];
+ __u32 hash[48];
+ __u32 block[48];
+ __u32 hash[49];
+ __u32 block[49];
+ __u32 hash[50];
+ __u32 block[50];
+ __u32 hash[51];
+ __u32 block[51];
+ __u32 hash[52];
+ __u32 block[52];
+ __u32 hash[53];
+ __u32 block[53];
+ __u32 hash[54];
+ __u32 block[54];
+ __u32 hash[55];
+ __u32 block[55];
+ __u32 hash[56];
+ __u32 block[56];
+ __u32 hash[57];
+ __u32 block[57];
+ __u32 hash[58];
+ __u32 block[58];
+ __u32 hash[59];
+ __u32 block[59];
+ __u32 hash[60];
+ __u32 block[60];
+ __u32 hash[61];
+ __u32 block[61];
+ __u32 hash[62];
+ __u32 block[62];
+ __u32 hash[63];
+ __u32 block[63];
+ __u32 hash[64];
+ __u32 block[64];
+ __u32 hash[65];
+ __u32 block[65];
+ __u32 hash[66];
+ __u32 block[66];
+ __u32 hash[67];
+ __u32 block[67];
+ __u32 hash[68];
+ __u32 block[68];
+ __u32 hash[69];
+ __u32 block[69];
+ __u32 hash[70];
+ __u32 block[70];
+ __u32 hash[71];
+ __u32 block[71];
+ __u32 hash[72];
+ __u32 block[72];
+ __u32 hash[73];
+ __u32 block[73];
+ __u32 hash[74];
+ __u32 block[74];
+ __u32 hash[75];
+ __u32 block[75];
+ __u32 hash[76];
+ __u32 block[76];
+ __u32 hash[77];
+ __u32 block[77];
+ __u32 hash[78];
+ __u32 block[78];
+ __u32 hash[79];
+ __u32 block[79];
+ __u32 hash[80];
+ __u32 block[80];
+ __u32 hash[81];
+ __u32 block[81];
+ __u32 hash[82];
+ __u32 block[82];
+ __u32 hash[83];
+ __u32 block[83];
+ __u32 hash[84];
+ __u32 block[84];
+ __u32 hash[85];
+ __u32 block[85];
+ __u32 hash[86];
+ __u32 block[86];
+ __u32 hash[87];
+ __u32 block[87];
+ __u32 hash[88];
+ __u32 block[88];
+ __u32 hash[89];
+ __u32 block[89];
+ __u32 hash[80];
+ __u32 block[80];
+ __u32 hash[81];
+ __u32 block[81];
+ __u32 hash[82];
+ __u32 block[82];
+ __u32 hash[83];
+ __u32 block[83];
+ __u32 hash[84];
+ __u32 block[84];
+ __u32 hash[85];
+ __u32 block[85];
+ __u32 hash[86];
+ __u32 block[86];
+ __u32 hash[87];
+ __u32 block[87];
+ __u32 hash[88];
+ __u32 block[88];
+ __u32 hash[89];
+ __u32 block[89];
+ __u32 hash[90];
+ __u32 block[90];
+ __u32 hash[91];
+ __u32 block[91];
+ __u32 hash[92];
+ __u32 block[92];
+ __u32 hash[93];
+ __u32 block[93];
+ __u32 hash[94];
+ __u32 block[94];
+ __u32 hash[95];
+ __u32 block[95];
+ __u32 hash[96];
+ __u32 block[96];
+ __u32 hash[97];
+ __u32 block[97];
+ __u32 hash[98];
+ __u32 block[98];
+ __u32 hash[99];
+ __u32 block[99];
+ __u32 hash[100];
+ __u32 block[100];
+ __u32 hash[101];
+ __u32 block[101];
+ __u32 hash[102];
+ __u32 block[102];
+ __u32 hash[103];
+ __u32 block[103];
+ __u32 hash[104];
+ __u32 block[104];
+ __u32 hash[105];
+ __u32 block[105];
+ __u32 hash[106];
+ __u32 block[106];
+ __u32 hash[107];
+ __u32 block[107];
+ __u32 hash[108];
+ __u32 block[108];
+ __u32 hash[109];
+ __u32 block[109];
+ __u32 hash[110];
+ __u32 block[110];
+ __u32 hash[111];
+ __u32 block[111];
+ __u32 hash[112];
+ __u32 block[112];
+ __u32 hash[113];
+ __u32 block[113];
+ __u32 hash[114];
+ __u32 block[114];
+ __u32 hash[115];
+ __u32 block[115];
+ __u32 hash[116];
+ __u32 block[116];
+ __u32 hash[117];
+ __u32 block[117];
+ __u32 hash[118];
+ __u32 block[118];
+ __u32 hash[119];
+ __u32 block[119];
+ __u32 hash[120];
+ __u32 block[120];
+ __u32 hash[121];
+ __u32 block[121];
+ __u32 hash[122];
+ __u32 block[122];
+ __u32 hash[123];
+ __u32 block[123];
+ __u32 hash[124];
+ __u32 block[124];
+ __u32 hash[125];
+ __u32 block[125];
+ __u32 hash[126];
+ __u32 block[126];
+ __u32 hash[127];
+ __u32 block[127];
+};
+
+
diff --git a/ext2ed/ext2_com.c b/ext2ed/ext2_com.c
new file mode 100644
index 0000000..ed004f2
--- /dev/null
+++ b/ext2ed/ext2_com.c
@@ -0,0 +1,98 @@
+/*
+
+/usr/src/ext2ed/ext2_com.c
+
+A part of the extended file system 2 disk editor.
+
+--------------------------------------
+Extended-2 filesystem General commands
+--------------------------------------
+
+The commands here will be registered when we are editing an ext2 filesystem
+
+First written on: July 28 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ext2ed.h"
+
+void type_ext2___super (char *command_line)
+
+/*
+
+We are moving to the superblock - Just use setoffset and settype. The offset was gathered in the
+initialization phase (but is constant - 1024).
+
+*/
+
+{
+ char buffer [80];
+
+ super_info.copy_num=0;
+ sprintf (buffer,"setoffset %ld",file_system_info.super_block_offset);dispatch (buffer);
+ sprintf (buffer,"settype ext2_super_block");dispatch (buffer);
+}
+
+void type_ext2___cd (char *command_line)
+
+/*
+
+A global cd command - The path should start with /.
+
+We implement it through dispatching to our primitive functions.
+
+*/
+
+{
+ char temp [80],buffer [80],*ptr;
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");refresh_command_win ();return;
+ }
+ ptr=parse_word (ptr,buffer);
+
+ if (buffer [0] != '/') {
+ wprintw (command_win,"Error - Use a full pathname (begin with '/')\n");refresh_command_win ();return;
+ }
+
+ /* Note the various dispatches below - They should be intuitive if you know the ext2 filesystem structure */
+
+ dispatch ("super");dispatch ("group");dispatch ("inode");dispatch ("next");dispatch ("dir");
+ if (buffer [1] != 0) {
+ sprintf (temp,"cd %s",buffer+1);dispatch (temp);
+ }
+}
+
+void type_ext2___group (char *command_line)
+
+/*
+
+We go to the group descriptors.
+First, we go to the first group descriptor in the main copy.
+Then, we use the group's entry command to pass to another group.
+
+*/
+
+{
+ long group_num=0;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ group_num=atol (buffer);
+ }
+
+ group_info.copy_num=0;group_info.group_num=0;
+ sprintf (buffer,"setoffset %ld",file_system_info.first_group_desc_offset);dispatch (buffer);
+ sprintf (buffer,"settype ext2_group_desc");dispatch (buffer);
+ sprintf (buffer,"entry %ld",group_num);dispatch (buffer);
+}
diff --git a/ext2ed/ext2ed.8.in b/ext2ed/ext2ed.8.in
new file mode 100644
index 0000000..e827277
--- /dev/null
+++ b/ext2ed/ext2ed.8.in
@@ -0,0 +1,72 @@
+.\" -*- nroff -*-
+.TH EXT2ED 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+ext2ed \- ext2 file system editor
+.SH SYNOPSIS
+.B ext2ed
+.SH DESCRIPTION
+.B ext2ed
+in an
+.B editor
+for the
+.B second extended file system.
+Its aim is to show you the various internal file system structures in an
+intuitive form so that you would be able to easily understand and modify
+them.
+.SH DOCUMENTATION
+The documentation is not available in man page format. Instead, I have
+written three articles which are related to ext2ed:
+
+The first article is
+.B The user's guide.
+This article explains how to use ext2ed.
+
+The second article is
+.B The Ext2fs overview.
+This article gives an overview of internal structure of the ext2 file system.
+You need to understand the internal layout in order to effectively edit
+your file system.
+
+The third article is
+.B EXT2ED - Design and implementation.
+This article explains how I constructed ext2ed. You may want to have a look
+in it if you plan to view or modify the source code.
+
+.SH WARNING
+
+.B
+Do not use ext2ed on a mounted file system.
+
+.SH FILES
+.TP
+.I /usr/bin/ext2ed
+The program itself.
+.TP
+.I @root_sysconfdir@/ext2ed.conf
+ext2ed's configuration file.
+.TP
+.I @datadir@/ext2.descriptors
+Definition of the various objects for the ext2 file system.
+.TP
+.I /var/log/ext2ed.log
+Log file of actual changes made to the file system.
+.TP
+.I /usr/man/man8/ext2ed.8
+The manual page.
+.TP
+.I @datadir@/doc/ext2ed/user-guide-0.1.ps
+The user's guide.
+.TP
+.I @datadir@/doc/ext2ed/Ext2fs-overview-0.1.ps
+Technical overview of the ext2 file system.
+.TP
+.I @datadir@/doc/ext2ed/ext2ed-design-0.1.ps
+EXT2ED design notes.
+
+.SH BUGS
+File Systems bigger than 2 GB aren't yet supported.
+.SH AUTHOR
+Gadi Oxman <tgud@tochnapc2.technion.ac.il>
+.SH SEE ALSO
+.BR e2fsck (8),
+.BR debugfs (8)
diff --git a/ext2ed/ext2ed.conf.in b/ext2ed/ext2ed.conf.in
new file mode 100644
index 0000000..c079623
--- /dev/null
+++ b/ext2ed/ext2ed.conf.in
@@ -0,0 +1,79 @@
+##############################################################################
+# ext2ed.conf #
+# #
+# Configuration file for the extended 2 file system disk editor. #
+##############################################################################
+
+# Ext2Descriptors is the location of the ext2 filesystem structure
+# definitions.
+
+
+Ext2Descriptors @datadir@/ext2.descriptors
+
+
+# Using AlternateDescriptors you can declare additional structures. Those
+# structures can contain only variables. Linking functions to the objects is
+# possible only through source code additions.
+
+
+AlternateDescriptors
+
+
+# LogFile is the location of the log file. Actual changes to the filesystem
+# are logged there. See also LogChanges.
+
+
+LogFile /var/log/ext2ed.log
+
+
+# The following selects the default behavior when changes are made to the
+# filesystem. When on, each change will be logged - Both the previous data
+# and the new written data.
+
+
+LogChanges on
+
+
+# AllowChanges off will not allow ext2ed to do any changes to the
+# filesystem - The "enablewrite" command will not work. When on, enablewrite
+# will still have to be issued to allow write access.
+
+
+AllowChanges on
+
+
+# With this option you can choose whether ext2ed will allow read-only mode on
+# a mounted filesystem. Read-Write mode is never allowed on a mounted
+# filesystem.
+
+
+AllowMountedRead on
+
+
+# When ForceExt2 is set to on, the filesystem is assumed to be ext2
+# filesystem, despite the possibly corrupt superblock magic number reading.
+# All the ext2 specific commands will be available despite the possible
+# autodetection failure.
+
+ForceExt2 off
+
+
+# Normally, the various filesystem parameters such as the block size and the
+# total number of blocks are gathered from the ext2 filesystem itself.
+# However, on a corrupt filesystem, ext2ed is unable to get the right
+# parameters. In this case, they will be taken from here. See also
+# ForceDefault.
+
+
+DefaultBlockSize 1024
+DefaultTotalBlocks 2097151 # ~2 GB total size
+DefaultBlocksInGroup 8192
+
+# With ForceDefault on, you can force the use of the default parameters
+# above. This is not recommended, as ext2ed will fallback by default to those
+# parameters if it can't figure up the parameters from the filesystem itself.
+
+
+ForceDefault off
+
+
diff --git a/ext2ed/ext2ed.h b/ext2ed/ext2ed.h
new file mode 100644
index 0000000..0ac77b7
--- /dev/null
+++ b/ext2ed/ext2ed.h
@@ -0,0 +1,435 @@
+
+/*
+
+/usr/src/ext2ed/ext2ed.h
+
+A part of the extended file system 2 disk editor.
+
+--------------------------------------
+Include file for the ext2 disk editor.
+--------------------------------------
+
+This file contains declarations which are needed by all the files in ext2ed.
+
+First written on: April 9 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#ifndef EXT2ED_EDITOR_H
+#define EXT2ED_EDITOR_H
+
+/*
+
+-----------------------
+ User definable options
+-----------------------
+
+*/
+
+#define DEBUG /* Activate self-sanity checks */
+
+#include <ext2fs/ext2_fs.h> /* Main kernel ext2 include file */
+#include <sys/stat.h>
+
+#include <ncurses.h>
+
+#define MAX_FIELDS 400
+
+#define MAX_COMMAND_LINE 81
+#define MAX_COMMANDS_NUM 30 /* Maximum number of commands of one type */
+#define REMEMBER_COUNT 30 /* Object memory size */
+
+/*
+ The user screen consists of four parts:
+
+ 1. Title window (title_win).
+ 2. Show (status) window (show_win).
+ 3. Main show pad (show_pad).
+ 4. Command window (command_win).
+
+*/
+
+/*
+
+ The show pad is mapped to the space left between the other three windows.
+
+ If you wondered why ext2ed grabs so memory, the answer is probably below - I wanted to treat
+ the virtual display as infinite. Decrease the following for more realistic memory consumption.
+
+*/
+
+#define SHOW_PAD_LINES 3000
+#define SHOW_PAD_COLS (COLS > 140 ? COLS : 140)
+
+#define COMMAND_WIN_LINES 6 /* Change this to your preferences */
+#define TITLE_WIN_LINES 3
+#define SHOW_WIN_LINES 3
+
+#define HEX 1
+#define TEXT 2
+
+#ifndef EXT2_PRE_02B_MAGIC
+ #define EXT2_PRE_02B_MAGIC 0xEF51
+#endif
+
+
+typedef void (*PF) (char *); /* Used to point to the dispatched functions */
+
+struct struct_commands { /* Holds commands of an object */
+ int last_command;
+ char *names [MAX_COMMANDS_NUM];
+ char *descriptions [MAX_COMMANDS_NUM];
+ PF callback [MAX_COMMANDS_NUM];
+};
+
+struct struct_descriptor { /* Describes an object */
+ unsigned long length;
+ unsigned char name [60];
+ unsigned short fields_num;
+ unsigned char field_names [MAX_FIELDS][80];
+ unsigned char field_types [MAX_FIELDS];
+ unsigned short field_lengths [MAX_FIELDS];
+ unsigned short field_positions [MAX_FIELDS];
+ struct struct_commands type_commands;
+ struct struct_descriptor *prev,*next;
+};
+
+#define FIELD_TYPE_INT 1
+#define FIELD_TYPE_UINT 2
+#define FIELD_TYPE_CHAR 3
+
+struct struct_type_data { /* The object's data is usually here */
+ long offset_in_block;
+
+ union union_type_data { /* Format it in various ways */
+ char buffer [EXT2_MAX_BLOCK_SIZE];
+ struct ext2_acl_header t_ext2_acl_header;
+ struct ext2_acl_entry t_ext2_acl_entry;
+ struct ext2_group_desc t_ext2_group_desc;
+ struct ext2_inode t_ext2_inode;
+ struct ext2_super_block t_ext2_super_block;
+ struct ext2_dir_entry t_ext2_dir_entry;
+ } u;
+};
+
+struct struct_file_system_info { /* Important information about the filesystem */
+ unsigned long long file_system_size;
+ unsigned long super_block_offset;
+ unsigned long first_group_desc_offset;
+ unsigned long groups_count;
+ unsigned long inodes_per_block;
+ unsigned long blocks_per_group; /* The name is misleading; beware */
+ unsigned long no_blocks_in_group;
+ unsigned short block_size;
+ struct ext2_super_block super_block;
+};
+
+struct struct_file_info { /* Used to handle files and directories */
+
+ struct ext2_inode *inode_ptr;
+
+ long inode_offset;
+ long global_block_num,global_block_offset;
+ long block_num,blocks_count;
+ long file_offset,file_length;
+ long level;
+ unsigned char buffer [EXT2_MAX_BLOCK_SIZE];
+ long offset_in_block;
+
+ int display;
+ /* The following is used if the file is a directory */
+
+ long dir_entry_num,dir_entries_count;
+ long dir_entry_offset;
+};
+
+struct struct_super_info { /* Used to handle the superblock */
+ unsigned long copy_num;
+};
+
+struct struct_group_info { /* Used to handle the group descriptors */
+ unsigned long copy_num;
+ unsigned long group_num;
+};
+
+struct struct_block_bitmap_info { /* Used in blockbitmap_com.c */
+ unsigned long entry_num;
+ unsigned long group_num;
+};
+
+struct struct_inode_bitmap_info { /* Used in inodebitmap_com.c */
+ unsigned long entry_num;
+ unsigned long group_num;
+};
+
+struct struct_remember_lifo { /* Implements the objects circular memory */
+ long entries_count;
+
+ long offset [REMEMBER_COUNT];
+ struct struct_descriptor *type [REMEMBER_COUNT];
+ char name [REMEMBER_COUNT][80];
+};
+
+struct struct_pad_info { /* Used to zoom into the pad window */
+ int display_lines,display_cols;
+ int line,col;
+ int max_line,max_col;
+ int disable_output;
+};
+
+/* Global variables (defined mostly in main.c) */
+
+/* Configurable variables (Through configuration file) */
+
+extern char AlternateDescriptors [200];
+extern char Ext2Descriptors [200];
+extern char LogFile [200];
+extern int LogChanges;
+extern int AllowChanges;
+extern int AllowMountedRead;
+extern int ForceExt2;
+extern int DefaultBlockSize;
+extern unsigned long DefaultTotalBlocks;
+extern unsigned long DefaultBlocksInGroup;
+extern int ForceDefault;
+
+extern char device_name [80];
+extern char last_command_line [80];
+extern FILE *device_handle;
+extern long device_offset;
+extern int mounted;
+
+extern short block_size;
+extern struct struct_commands general_commands;
+extern struct struct_commands ext2_commands;
+extern struct struct_descriptor *first_type;
+extern struct struct_descriptor *last_type;
+extern struct struct_descriptor *current_type;
+extern struct struct_type_data type_data;
+extern struct struct_file_system_info file_system_info;
+extern struct struct_file_info file_info,first_file_info;
+extern struct struct_group_info group_info;
+extern struct struct_super_info super_info;
+extern struct struct_block_bitmap_info block_bitmap_info;
+extern struct struct_inode_bitmap_info inode_bitmap_info;
+extern struct struct_remember_lifo remember_lifo;
+extern struct struct_pad_info show_pad_info;
+extern int write_access;
+
+extern int redraw_request;
+extern char lines_s [80];
+extern char cols_s [80];
+
+
+/* init.c */
+
+extern int init (void);
+extern void prepare_to_close (void);
+extern int set_struct_descriptors (char *file_name);
+extern void free_struct_descriptors (void);
+extern struct struct_descriptor *add_new_descriptor (char *name);
+extern void add_new_variable (struct struct_descriptor *descriptor,char *v_type,char *v_name);
+extern void fill_type_commands (struct struct_descriptor *ptr);
+extern void add_user_command (struct struct_commands *ptr,char *name,char *description,PF callback);
+extern void free_user_commands (struct struct_commands *ptr);
+extern int set_file_system_info (void);
+extern int process_configuration_file (void);
+extern void add_general_commands (void);
+extern void add_ext2_general_commands (void);
+extern void check_mounted (char *name);
+
+int get_next_option (FILE *fp,char *option,char *value);
+void init_readline (void);
+void init_signals (void);
+void signal_SIGWINCH_handler (int sig_num);
+void signal_SIGTERM_handler (int sig_num);
+void signal_SIGSEGV_handler (int sig_num);
+
+/* general_com.c */
+
+/* General commands which are available always */
+
+extern void help (char *command_line);
+extern void set (char *command_line);
+extern void set_device (char *command_line);
+extern void set_offset (char *command_line);
+extern void set_type (char *command_line);
+extern void show (char *command_line);
+extern void pgup (char *command_line);
+extern void pgdn (char *command_line);
+extern void redraw (char *command_line);
+extern void remember (char *command_line);
+extern void recall (char *command_line);
+extern void cd (char *command_line);
+extern void enable_write (char *command_line);
+extern void disable_write (char *command_line);
+extern void write_data (char *command_line);
+extern void next (char *command_line);
+extern void prev (char *command_line);
+
+void hex_set (char *command_line);
+void detailed_help (char *text);
+
+
+/* ext2_com.c */
+
+/* Extended2 filesystem general commands - Available only when editing an
+ ext2 filesystem */
+
+extern void type_ext2___super (char *command_line);
+extern void type_ext2___group (char *command_line);
+extern void type_ext2___cd (char *command_line);
+
+
+/* main.c */
+
+extern int version_major,version_minor;
+extern char revision_date [80];
+extern char email_address [80];
+
+#ifdef DEBUG
+extern void internal_error (char *description,char *source_name,char *function_name);
+#endif
+
+void parser (void);
+extern int dispatch (char *command_line);
+char *parse_word (char *source,char *dest);
+char *complete_command (char *text,int state);
+char *dupstr (char *src);
+
+
+
+/* disk.c */
+
+extern int load_type_data (void);
+extern int write_type_data (void);
+extern int low_read (unsigned char *buffer,unsigned long length,unsigned long offset);
+extern int low_write (unsigned char *buffer,unsigned long length,unsigned long offset);
+extern int log_changes (unsigned char *buffer,unsigned long length,unsigned long offset);
+
+/* file_com.c */
+
+extern int init_file_info (void);
+extern void type_file___show (char *command_line);
+extern void type_file___inode (char *command_line);
+extern void type_file___display (char *command_line);
+extern void type_file___prev (char *command_line);
+extern void type_file___next (char *command_line);
+extern void type_file___offset (char *command_line);
+extern void type_file___prevblock (char *command_line);
+extern void type_file___nextblock (char *command_line);
+extern void type_file___block (char *command_line);
+extern void type_file___remember (char *command_line);
+extern void type_file___set (char *command_line);
+extern void type_file___writedata (char *command_line);
+
+extern long file_block_to_global_block (long file_block,struct struct_file_info *file_info_ptr);
+extern long return_indirect (long table_block,long block_num);
+extern long return_dindirect (long table_block,long block_num);
+extern long return_tindirect (long table_block,long block_num);
+
+void file_show_hex (void);
+void file_show_text (void);
+void show_status (void);
+
+/* inode_com.c */
+
+extern void type_ext2_inode___next (char *command_line);
+extern void type_ext2_inode___prev (char *command_line);
+extern void type_ext2_inode___show (char *command_line);
+extern void type_ext2_inode___group (char *command_line);
+extern void type_ext2_inode___entry (char *command_line);
+extern void type_ext2_inode___file (char *command_line);
+extern void type_ext2_inode___dir (char *command_line);
+
+extern long inode_offset_to_group_num (long inode_offset);
+extern long int inode_offset_to_inode_num (long inode_offset);
+extern long int inode_num_to_inode_offset (long inode_num);
+
+/* dir_com.c */
+
+extern int init_dir_info (struct struct_file_info *info);
+extern void type_dir___show (char *command_line);
+extern void type_dir___inode (char *command_line);
+extern void type_dir___pgdn (char *command_line);
+extern void type_dir___pgup (char *command_line);
+extern void type_dir___prev (char *command_line);
+extern void type_dir___next (char *command_line);
+extern void type_dir___followinode (char *command_line);
+extern void type_dir___remember (char *command_line);
+extern void type_dir___cd (char *command_line);
+extern void type_dir___entry (char *command_line);
+extern void type_dir___writedata (char *command_line);
+extern void type_dir___set (char *command_line);
+
+#define HEX 1
+#define TEXT 2
+
+#define ABORT 0
+#define CONTINUE 1
+#define FOUND 2
+
+struct struct_file_info search_dir_entries (int (*action) (struct struct_file_info *info),int *status);
+int action_count (struct struct_file_info *info);
+void show_dir_status (void);
+long count_dir_entries (void);
+int action_name (struct struct_file_info *info);
+int action_entry_num (struct struct_file_info *info);
+int action_show (struct struct_file_info *info);
+
+/* super_com.c */
+
+extern void type_ext2_super_block___show (char *command_line);
+extern void type_ext2_super_block___gocopy (char *command_line);
+extern void type_ext2_super_block___setactivecopy (char *command_line);
+
+/* group_com.c */
+
+extern void type_ext2_group_desc___next (char *command_line);
+extern void type_ext2_group_desc___prev (char *command_line);
+extern void type_ext2_group_desc___entry (char *command_line);
+extern void type_ext2_group_desc___show (char *command_line);
+extern void type_ext2_group_desc___inode (char *command_line);
+extern void type_ext2_group_desc___gocopy (char *command_line);
+extern void type_ext2_group_desc___blockbitmap (char *command_line);
+extern void type_ext2_group_desc___inodebitmap (char *command_line);
+extern void type_ext2_group_desc___setactivecopy (char *command_line);
+
+/* blockbitmap_com.c */
+
+extern void type_ext2_block_bitmap___show (char *command_line);
+extern void type_ext2_block_bitmap___entry (char *command_line);
+extern void type_ext2_block_bitmap___next (char *command_line);
+extern void type_ext2_block_bitmap___prev (char *command_line);
+extern void type_ext2_block_bitmap___allocate (char *command_line);
+extern void type_ext2_block_bitmap___deallocate (char *command_line);
+void allocate_block (long entry_num);
+void deallocate_block (long entry_num);
+
+/* inodebitmap_bom.c */
+
+extern void type_ext2_inode_bitmap___show (char *command_line);
+extern void type_ext2_inode_bitmap___entry (char *command_line);
+extern void type_ext2_inode_bitmap___next (char *command_line);
+extern void type_ext2_inode_bitmap___prev (char *command_line);
+extern void type_ext2_inode_bitmap___allocate (char *command_line);
+extern void type_ext2_inode_bitmap___deallocate (char *command_line);
+void allocate_inode (long entry_num);
+void deallocate_inode (long entry_num);
+
+/* win.c */
+
+extern WINDOW *title_win,*show_win,*command_win,*show_pad;
+
+extern void init_windows (void);
+extern void refresh_title_win (void);
+extern void refresh_show_win (void);
+extern void refresh_show_pad (void);
+extern void refresh_command_win (void);
+extern void show_info (void);
+extern void redraw_all (void);
+extern void close_windows (void);
+
+#endif /* EXT2ED_EDITOR_H */
diff --git a/ext2ed/file_com.c b/ext2ed/file_com.c
new file mode 100644
index 0000000..d667959
--- /dev/null
+++ b/ext2ed/file_com.c
@@ -0,0 +1,565 @@
+/*
+
+/usr/src/ext2ed/file_com.c
+
+A part of the extended file system 2 disk editor.
+
+----------------------------
+Commands which handle a file
+----------------------------
+
+First written on: April 18 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ext2ed.h"
+
+int init_file_info (void)
+
+{
+ struct ext2_inode *ptr;
+
+ ptr=&type_data.u.t_ext2_inode;
+
+ file_info.inode_ptr=ptr;
+ file_info.inode_offset=device_offset;
+
+ file_info.global_block_num=ptr->i_block [0];
+ file_info.global_block_offset=ptr->i_block [0]*file_system_info.block_size;
+ file_info.block_num=0;
+ file_info.blocks_count=(ptr->i_size+file_system_info.block_size-1)/file_system_info.block_size;
+ file_info.file_offset=0;
+ file_info.file_length=ptr->i_size;
+ file_info.level=0;
+ file_info.offset_in_block=0;
+
+ file_info.display=HEX;
+
+ low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
+
+ return (1);
+}
+
+
+void type_file___inode (char *command_line)
+
+{
+ dispatch ("settype ext2_inode");
+}
+
+void type_file___show (char *command_line)
+
+{
+ if (file_info.display==HEX)
+ file_show_hex ();
+ if (file_info.display==TEXT)
+ file_show_text ();
+}
+
+void type_file___nextblock (char *command_line)
+
+{
+ long block_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ block_offset*=atol (buffer);
+ }
+
+ if (file_info.block_num+block_offset >= file_info.blocks_count) {
+ wprintw (command_win,"Error - Block offset out of range\n");wrefresh (command_win);
+ return;
+ }
+
+ file_info.block_num+=block_offset;
+ file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info);
+ file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size;
+ file_info.file_offset=file_info.block_num*file_system_info.block_size;
+
+ low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
+
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+void type_file___next (char *command_line)
+
+{
+ int offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ offset*=atol (buffer);
+ }
+
+ if (file_info.offset_in_block+offset < file_system_info.block_size) {
+ file_info.offset_in_block+=offset;
+ sprintf (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Offset out of block\n");refresh_command_win ();
+ }
+}
+
+void type_file___offset (char *command_line)
+
+{
+ unsigned long offset;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ offset=atol (buffer);
+ }
+ else {
+ wprintw (command_win,"Error - Argument not specified\n");refresh_command_win ();
+ return;
+ }
+
+ if (offset < file_system_info.block_size) {
+ file_info.offset_in_block=offset;
+ sprintf (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Offset out of block\n");refresh_command_win ();
+ }
+}
+
+void type_file___prev (char *command_line)
+
+{
+ int offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ offset*=atol (buffer);
+ }
+
+ if (file_info.offset_in_block-offset >= 0) {
+ file_info.offset_in_block-=offset;
+ sprintf (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Offset out of block\n");refresh_command_win ();
+ }
+}
+
+void type_file___prevblock (char *command_line)
+
+{
+ long block_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ block_offset*=atol (buffer);
+ }
+
+ if (file_info.block_num-block_offset < 0) {
+ wprintw (command_win,"Error - Block offset out of range\n");wrefresh (command_win);
+ return;
+ }
+
+ file_info.block_num-=block_offset;
+ file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info);
+ file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size;
+ file_info.file_offset=file_info.block_num*file_system_info.block_size;
+
+ low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
+
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+void type_file___block (char *command_line)
+
+{
+ long block_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Invalid arguments\n");wrefresh (command_win);
+ return;
+ }
+
+ ptr=parse_word (ptr,buffer);
+ block_offset=atol (buffer);
+
+ if (block_offset < 0 || block_offset >= file_info.blocks_count) {
+ wprintw (command_win,"Error - Block offset out of range\n");wrefresh (command_win);
+ return;
+ }
+
+ file_info.block_num=block_offset;
+ file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info);
+ file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size;
+ file_info.file_offset=file_info.block_num*file_system_info.block_size;
+
+ low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
+
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+void type_file___display (char *command_line)
+
+{
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0)
+ strcpy (buffer,"hex");
+ else
+ ptr=parse_word (ptr,buffer);
+
+ if (strcasecmp (buffer,"hex")==0) {
+ wprintw (command_win,"Display set to hex\n");wrefresh (command_win);
+ file_info.display=HEX;
+ sprintf (buffer,"show");dispatch (buffer);
+ }
+
+ else if (strcasecmp (buffer,"text")==0) {
+ wprintw (command_win,"Display set to text\n");wrefresh (command_win);
+ file_info.display=TEXT;
+ sprintf (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Invalid arguments\n");wrefresh (command_win);
+ }
+}
+
+void file_show_hex (void)
+
+{
+ long offset=0,l,i;
+ unsigned char *ch_ptr;
+
+ /* device_offset and type_data points to the inode */
+
+ show_pad_info.line=0;
+
+ wmove (show_pad,0,0);
+ ch_ptr=file_info.buffer;
+ for (l=0;l<file_system_info.block_size/16;l++) {
+ if (file_info.file_offset+offset>file_info.file_length-1) break;
+ wprintw (show_pad,"%08ld : ",offset);
+ for (i=0;i<16;i++) {
+
+ if (file_info.file_offset+offset+i>file_info.file_length-1) {
+ wprintw (show_pad," ");
+ }
+
+ else {
+ if (file_info.offset_in_block==offset+i)
+ wattrset (show_pad,A_REVERSE);
+
+ if (ch_ptr [i]>=' ' && ch_ptr [i]<='z')
+ wprintw (show_pad,"%c",ch_ptr [i]);
+ else
+ wprintw (show_pad,".");
+
+ if (file_info.offset_in_block==offset+i)
+ wattrset (show_pad,A_NORMAL);
+ }
+ }
+
+ wprintw (show_pad," ");
+ for (i=0;i<16;i++) {
+ if (file_info.file_offset+offset+i>file_info.file_length-1) break;
+ if (file_info.offset_in_block==offset+i)
+ wattrset (show_pad,A_REVERSE);
+
+ wprintw (show_pad,"%02x",ch_ptr [i]);
+
+ if (file_info.offset_in_block==offset+i) {
+ wattrset (show_pad,A_NORMAL);
+ show_pad_info.line=l-l % show_pad_info.display_lines;
+ }
+
+ wprintw (show_pad," ");
+
+ }
+
+ wprintw (show_pad,"\n");
+ offset+=i;
+ ch_ptr+=i;
+ }
+
+ show_pad_info.max_line=l-1;
+
+ refresh_show_pad ();
+
+ show_status ();
+}
+
+void file_show_text (void)
+
+{
+ long offset=0,last_offset,l=0,cols=0;
+ unsigned char *ch_ptr;
+
+ /* device_offset and type_data points to the inode */
+
+ show_pad_info.line=0;
+ wmove (show_pad,0,0);
+ ch_ptr=file_info.buffer;
+
+ last_offset=file_system_info.block_size-1;
+
+ if (file_info.file_offset+last_offset > file_info.file_length-1)
+ last_offset=file_info.file_length-1-file_info.file_offset;
+
+ while ( (offset <= last_offset) && l<SHOW_PAD_LINES) {
+
+ if (cols==SHOW_PAD_COLS-1) {
+ wprintw (show_pad,"\n");
+ l++;cols=0;
+ }
+
+
+ if (file_info.offset_in_block==offset)
+ wattrset (show_pad,A_REVERSE);
+
+ if (*ch_ptr >= ' ' && *ch_ptr <= 'z')
+ wprintw (show_pad,"%c",*ch_ptr);
+
+
+ else {
+ if (*ch_ptr == 0xa) {
+ wprintw (show_pad,"\n");
+ l++;cols=0;
+ }
+
+ else if (*ch_ptr == 0x9)
+ wprintw (show_pad," ");
+
+ else
+ wprintw (show_pad,".");
+ }
+
+ if (file_info.offset_in_block==offset) {
+ wattrset (show_pad,A_NORMAL);
+ show_pad_info.line=l-l % show_pad_info.display_lines;
+ }
+
+
+ offset++;cols++;ch_ptr++;
+ }
+
+ wprintw (show_pad,"\n");
+ show_pad_info.max_line=l;
+
+ refresh_show_pad ();
+
+ show_status ();
+}
+
+void show_status (void)
+
+{
+ long inode_num;
+
+ werase (show_win);wmove (show_win,0,0);
+ wprintw (show_win,"File contents. Block %ld. ",file_info.global_block_num);
+ wprintw (show_win,"File block %ld of %ld. ",file_info.block_num,file_info.blocks_count-1);
+ wprintw (show_win,"File Offset %ld of %ld.",file_info.file_offset,file_info.file_length-1);
+
+ wmove (show_win,1,0);
+ inode_num=inode_offset_to_inode_num (file_info.inode_offset);
+ wprintw (show_win,"File inode %ld. Indirection level %ld.",inode_num,file_info.level);
+
+ refresh_show_win ();
+}
+
+void type_file___remember (char *command_line)
+
+{
+ int found=0;
+ long entry_num;
+ char *ptr,buffer [80];
+ struct struct_descriptor *descriptor_ptr;
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Argument not specified\n");wrefresh (command_win);
+ return;
+ }
+
+ ptr=parse_word (ptr,buffer);
+
+ entry_num=remember_lifo.entries_count++;
+ if (entry_num>REMEMBER_COUNT-1) {
+ entry_num=0;
+ remember_lifo.entries_count--;
+ }
+
+ descriptor_ptr=first_type;
+ while (descriptor_ptr!=NULL && !found) {
+ if (strcmp (descriptor_ptr->name,"ext2_inode")==0)
+ found=1;
+ else
+ descriptor_ptr=descriptor_ptr->next;
+ }
+
+
+ remember_lifo.offset [entry_num]=device_offset;
+ remember_lifo.type [entry_num]=descriptor_ptr;
+ strcpy (remember_lifo.name [entry_num],buffer);
+
+ wprintw (command_win,"Object %s in Offset %ld remembered as %s\n",descriptor_ptr->name,device_offset,buffer);
+ wrefresh (command_win);
+}
+
+void type_file___set (char *command_line)
+
+{
+ unsigned char tmp;
+ char *ptr,buffer [80],*ch_ptr;
+ int mode=HEX;
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Argument not specified\n");refresh_command_win ();return;
+ }
+
+ ptr=parse_word (ptr,buffer);
+
+ if (strcasecmp (buffer,"text")==0) {
+ mode=TEXT;
+ strcpy (buffer,ptr);
+ }
+
+ else if (strcasecmp (buffer,"hex")==0) {
+ mode=HEX;
+ ptr=parse_word (ptr,buffer);
+ }
+
+ if (*buffer==0) {
+ wprintw (command_win,"Error - Data not specified\n");refresh_command_win ();return;
+ }
+
+ if (mode==HEX) {
+ do {
+ tmp=(unsigned char) strtol (buffer,NULL,16);
+ file_info.buffer [file_info.offset_in_block]=tmp;
+ file_info.offset_in_block++;
+ ptr=parse_word (ptr,buffer);
+ if (file_info.offset_in_block==file_system_info.block_size) {
+ if (*ptr) {
+ wprintw (command_win,"Error - Ending offset outside block, only partial string changed\n");
+ refresh_command_win ();
+ }
+ file_info.offset_in_block--;
+ }
+ } while (*buffer) ;
+ }
+
+ else {
+ ch_ptr=buffer;
+ while (*ch_ptr) {
+ tmp=(unsigned char) *ch_ptr++;
+ file_info.buffer [file_info.offset_in_block]=tmp;
+ file_info.offset_in_block++;
+ if (file_info.offset_in_block==file_system_info.block_size) {
+ if (*ch_ptr) {
+ wprintw (command_win,"Error - Ending offset outside block, only partial string changed\n");
+ refresh_command_win ();
+ }
+ file_info.offset_in_block--;
+ }
+ }
+ }
+
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+void type_file___writedata (char *command_line)
+
+{
+ low_write (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
+ return;
+}
+
+long file_block_to_global_block (long file_block,struct struct_file_info *file_info_ptr)
+
+{
+ long last_direct,last_indirect,last_dindirect;
+
+ last_direct=EXT2_NDIR_BLOCKS-1;
+ last_indirect=last_direct+file_system_info.block_size/4;
+ last_dindirect=last_indirect+(file_system_info.block_size/4)*(file_system_info.block_size/4);
+
+ if (file_block <= last_direct) {
+ file_info_ptr->level=0;
+ return (file_info_ptr->inode_ptr->i_block [file_block]);
+ }
+
+ if (file_block <= last_indirect) {
+ file_info_ptr->level=1;
+ file_block=file_block-last_direct-1;
+ return (return_indirect (file_info_ptr->inode_ptr->i_block [EXT2_IND_BLOCK],file_block));
+ }
+
+ if (file_block <= last_dindirect) {
+ file_info_ptr->level=2;
+ file_block=file_block-last_indirect-1;
+ return (return_dindirect (file_info_ptr->inode_ptr->i_block [EXT2_DIND_BLOCK],file_block));
+ }
+
+ file_info_ptr->level=3;
+ file_block=file_block-last_dindirect-1;
+ return (return_tindirect (file_info_ptr->inode_ptr->i_block [EXT2_TIND_BLOCK],file_block));
+}
+
+long return_indirect (long table_block,long block_num)
+
+{
+ long block_table [EXT2_MAX_BLOCK_SIZE/4];
+
+ low_read ((char *) block_table,file_system_info.block_size,table_block*file_system_info.block_size);
+ return (block_table [block_num]);
+}
+
+long return_dindirect (long table_block,long block_num)
+
+{
+ long f_indirect;
+
+ f_indirect=block_num/(file_system_info.block_size/4);
+ f_indirect=return_indirect (table_block,f_indirect);
+ return (return_indirect (f_indirect,block_num%(file_system_info.block_size/4)));
+}
+
+long return_tindirect (long table_block,long block_num)
+
+{
+ long s_indirect;
+
+ s_indirect=block_num/((file_system_info.block_size/4)*(file_system_info.block_size/4));
+ s_indirect=return_indirect (table_block,s_indirect);
+ return (return_dindirect (s_indirect,block_num%((file_system_info.block_size/4)*(file_system_info.block_size/4))));
+}
diff --git a/ext2ed/general_com.c b/ext2ed/general_com.c
new file mode 100644
index 0000000..aa274e3
--- /dev/null
+++ b/ext2ed/general_com.c
@@ -0,0 +1,907 @@
+/*
+
+/usr/src/ext2ed/general_com.c
+
+A part of the extended file system 2 disk editor.
+
+---------------------
+General user commands
+---------------------
+
+First written on: April 9 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ext2ed.h"
+#include "../version.h"
+
+void help (char *command_line)
+
+{
+ int i,max_line=0;
+ char argument [80],*ptr;
+
+ werase (show_pad);wmove (show_pad,0,0);
+
+ ptr=parse_word (command_line,argument);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,argument);
+ if (*argument!=0) {
+ detailed_help (argument);
+ return;
+ }
+ }
+
+ if (current_type!=NULL) {
+
+ wprintw (show_pad,"Type %s specific commands:\n",current_type->name);max_line++;
+
+ if (current_type->type_commands.last_command==-1) {
+ wprintw (show_pad,"\nnone\n");max_line+=2;
+ }
+ else
+ for (i=0;i<=current_type->type_commands.last_command;i++) {
+ if (i%5==0) {
+ wprintw (show_pad,"\n");max_line++;
+ }
+ wprintw (show_pad,"%-13s",current_type->type_commands.names [i]);
+ if (i%5!=4)
+ wprintw (show_pad,"; ");
+ }
+
+ wprintw (show_pad,"\n\n");max_line+=2;
+ }
+
+ if (ext2_commands.last_command != -1) {
+ wprintw (show_pad,"ext2 filesystem general commands: \n");max_line++;
+ for (i=0;i<=ext2_commands.last_command;i++) {
+ if (i%5==0) {
+ wprintw (show_pad,"\n");max_line++;
+ }
+ wprintw (show_pad,"%-13s",ext2_commands.names [i]);
+ if (i%5!=4)
+ wprintw (show_pad,"; ");
+
+ }
+ wprintw (show_pad,"\n\n");max_line+=2;
+ }
+
+ wprintw (show_pad,"General commands: \n");
+
+ for (i=0;i<=general_commands.last_command;i++) {
+ if (i%5==0) {
+ wprintw (show_pad,"\n");max_line++;
+ }
+ wprintw (show_pad,"%-13s",general_commands.names [i]);
+ if (i%5!=4)
+ wprintw (show_pad,"; ");
+ }
+
+ wprintw (show_pad,"\n\n");max_line+=2;
+
+ wprintw (show_pad,"EXT2ED ver %s (%s)\n",E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ wprintw (show_pad,"Copyright (C) 1995 Gadi Oxman\n");
+ wprintw (show_pad,"Reviewed 2001 Christian Bac\n");
+ wprintw (show_pad,"Modified and enhanced by Theodore Ts'o, 2002\n");
+ wprintw (show_pad,"EXT2ED is hereby placed under the terms of the GNU General Public License.\n\n");
+ wprintw (show_pad,"EXT2ED was programmed as a student project in the software laboratory\n");
+ wprintw (show_pad,"of the faculty of electrical engineering in the\n");
+ wprintw (show_pad,"Technion - Israel Institute of Technology\n");
+ wprintw (show_pad,"with the guide of Avner Lottem and Dr. Ilana David.\n");
+
+ max_line+=10;
+
+ show_pad_info.line=0;show_pad_info.max_line=max_line;
+
+ werase (show_win);wmove (show_win,0,0);
+ wprintw (show_win,"EXT2ED help");
+
+ refresh_show_win ();
+ refresh_show_pad ();
+}
+
+void detailed_help (char *text)
+
+{
+ int i;
+
+ if (current_type != NULL)
+ for (i=0;i<=current_type->type_commands.last_command;i++) {
+ if (strcmp (current_type->type_commands.names [i],text)==0) {
+ wprintw (show_pad,"%s - %s\n",text,current_type->type_commands.descriptions [i]);
+ refresh_show_pad ();return;
+ }
+ }
+
+ for (i=0;i<=ext2_commands.last_command;i++) {
+ if (strcmp (ext2_commands.names [i],text)==0) {
+ wprintw (show_pad,"%s - %s\n",text,ext2_commands.descriptions [i]);
+ refresh_show_pad ();return;
+ }
+ }
+
+ for (i=0;i<=general_commands.last_command;i++) {
+ if (strcmp (general_commands.names [i],text)==0) {
+ wprintw (show_pad,"%s - %s\n",text,general_commands.descriptions [i]);
+ refresh_show_pad ();return;
+ }
+ }
+
+ if (strcmp ("quit",text)==0) {
+ wprintw (show_pad,"quit - Exists EXT2ED");
+ refresh_show_pad ();return;
+ }
+
+ wprintw (show_pad,"Error - Command %s not available now\n",text);
+ refresh_show_pad ();return;
+}
+
+
+
+void set_device (char *command_line)
+
+{
+ char *ptr,new_device [80];
+
+ ptr=parse_word (command_line,new_device);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Device name not specified\n");
+ refresh_command_win ();return;
+ }
+ parse_word (ptr,new_device);
+ check_mounted (new_device);
+ if (mounted && !AllowMountedRead) {
+ wprintw (command_win,"Error - Filesystem is mounted, aborting\n");
+ wprintw (command_win,"You may wish to use the AllowMountedRead on configuration option\n");
+ refresh_command_win ();return;
+ }
+
+ if (mounted && AllowMountedRead) {
+ wprintw (command_win,"Warning - Filesystem is mounted. Displayed data may be unreliable.\n");
+ refresh_command_win ();
+ }
+
+ if (device_handle!=NULL)
+ fclose (device_handle);
+
+ if ( (device_handle=fopen (new_device,"rb"))==NULL) {
+ wprintw (command_win,"Error - Can not open device %s\n",new_device);refresh_command_win ();
+ return;
+ }
+ else {
+ strcpy (device_name,new_device);
+ write_access=0; /* Write access disabled */
+ current_type=NULL; /* There is no type now */
+ remember_lifo.entries_count=0; /* Empty Object memory */
+ free_user_commands (&ext2_commands); /* Free filesystem specific objects */
+ free_struct_descriptors ();
+ if (!set_file_system_info ()) { /* Error while getting info --> abort */
+ free_user_commands (&ext2_commands);
+ free_struct_descriptors ();
+ fclose (device_handle);
+ device_handle=NULL; /* Notice that our device is still not set up */
+ device_offset=-1;
+ return;
+ }
+ if (*AlternateDescriptors) /* Check if user defined objects exist */
+ set_struct_descriptors (AlternateDescriptors);
+ dispatch ("setoffset 0");
+ dispatch ("help"); /* Show help screen */
+ wprintw (command_win,"Device changed to %s",device_name);refresh_command_win ();
+ }
+}
+
+void set_offset (char *command_line)
+
+{
+ long mult=1;
+ long new_offset;
+ char *ptr,new_offset_buffer [80];
+
+ if (device_handle==NULL) {
+ wprintw (command_win,"Error - No device opened\n");refresh_command_win ();
+ return;
+ }
+
+ ptr=parse_word (command_line,new_offset_buffer);
+
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");refresh_command_win ();
+ return;
+ }
+
+ ptr=parse_word (ptr,new_offset_buffer);
+
+ if (strcmp (new_offset_buffer,"block")==0) {
+ mult=file_system_info.block_size;
+ ptr=parse_word (ptr,new_offset_buffer);
+ }
+
+ if (strcmp (new_offset_buffer,"type")==0) {
+ if (current_type==NULL) {
+ wprintw (command_win,"Error - No type set\n");refresh_command_win ();
+ return;
+ }
+
+ mult=current_type->length;
+ ptr=parse_word (ptr,new_offset_buffer);
+ }
+
+ if (*new_offset_buffer==0) {
+ wprintw (command_win,"Error - No offset specified\n");refresh_command_win ();
+ return;
+ }
+
+ if (new_offset_buffer [0]=='+') {
+ if (device_offset==-1) {
+ wprintw (command_win,"Error - Select a fixed offset first\n");refresh_command_win ();
+ return;
+ }
+ new_offset=device_offset+atol (new_offset_buffer+1)*mult;
+ }
+
+ else if (new_offset_buffer [0]=='-') {
+ if (device_offset==-1) {
+ wprintw (command_win,"Error - Select a fixed offset first\n");refresh_command_win ();
+ return;
+ }
+ new_offset=device_offset-atol (new_offset_buffer+1)*mult;
+ if (new_offset<0) new_offset=0;
+ }
+
+ else
+ new_offset=atol (new_offset_buffer)*mult;
+
+ if ( (fseek (device_handle,new_offset,SEEK_SET))==-1) {
+ wprintw (command_win,"Error - Failed to seek to offset %ld in device %s\n",new_offset,device_name);
+ refresh_command_win ();
+ return;
+ };
+ device_offset=new_offset;
+ wprintw (command_win,"Device offset changed to %ld\n",device_offset);refresh_command_win ();
+ load_type_data ();
+ type_data.offset_in_block=0;
+}
+
+void set_int(short len, void *ptr, char *name, char *value)
+{
+ char *char_ptr;
+ short *short_ptr;
+ long *long_ptr;
+ long v;
+ char *tmp;
+
+ v = strtol(value, &tmp, 0);
+ if (*tmp) {
+ wprintw( command_win, "Bad value - %s\n", value);
+ return;
+ }
+ switch (len) {
+ case 1:
+ char_ptr = (char *) ptr;
+ *char_ptr = v;
+ break;
+ case 2:
+ short_ptr = (short *) ptr;
+ *short_ptr = v;
+ break;
+ case 4:
+ long_ptr = (long *) ptr;
+ *long_ptr = v;
+ break;
+ default:
+ wprintw (command_win,
+ "set_int: unsupported length: %d\n", len);
+ return;
+ }
+ wprintw (command_win, "Variable %s set to %s\n",
+ name, value);
+}
+
+void set_uint(short len, void *ptr, char *name, char *value)
+{
+ unsigned char *char_ptr;
+ unsigned short *short_ptr;
+ unsigned long *long_ptr;
+ unsigned long v;
+ char *tmp;
+
+ v = strtoul(value, &tmp, 0);
+ if (*tmp) {
+ wprintw( command_win, "Bad value - %s\n", value);
+ return;
+ }
+ switch (len) {
+ case 1:
+ char_ptr = (unsigned char *) ptr;
+ *char_ptr = v;
+ break;
+ case 2:
+ short_ptr = (unsigned short *) ptr;
+ *short_ptr = v;
+ break;
+ case 4:
+ long_ptr = (unsigned long *) ptr;
+ *long_ptr = v;
+ break;
+ default:
+ wprintw (command_win,
+ "set_uint: unsupported length: %d\n", len);
+ return;
+ }
+ wprintw (command_win, "Variable %s set to %s\n",
+ name, value);
+}
+
+void set_char(short len, void *ptr, char *name, char *value)
+{
+ if (strlen(value)+1 > len) {
+ wprintw( command_win, "Value %s too big for field\n",
+ name, len);
+ return;
+ }
+ memset(ptr, 0, len);
+ strcpy((char *) ptr, value);
+ wprintw (command_win, "Variable %s set to %s\n",
+ name, value);
+}
+
+
+void set (char *command_line)
+
+{
+ unsigned short *int_ptr;
+ unsigned char *char_ptr;
+ unsigned long *long_ptr,offset=0;
+ int i,len, found=0;
+ char *ptr,buffer [80],variable [80],value [80];
+
+ if (device_handle==NULL) {
+ wprintw (command_win,"Error - No device opened\n");refresh_command_win ();
+ return;
+ }
+
+ if (current_type==NULL) {
+ hex_set (command_line);
+ return;
+ }
+
+ ptr=parse_word (command_line,buffer);
+ if (ptr==NULL || *ptr==0) {
+ wprintw (command_win,"Error - Missing arguments\n");refresh_command_win ();
+ return;
+ }
+ parse_word (ptr,buffer);
+ ptr=strchr (buffer,'=');
+ if (ptr==NULL) {
+ wprintw (command_win,"Error - Bad syntax\n");refresh_command_win ();return;
+ }
+ strncpy (variable,buffer,ptr-buffer);variable [ptr-buffer]=0;
+ strcpy (value,++ptr);
+
+ if (current_type==NULL) {
+ wprintw (command_win,"Sorry, not yet supported\n");refresh_command_win ();return;
+ }
+
+ for (i=0;i<current_type->fields_num && !found;i++) {
+ if (strcmp (current_type->field_names [i],variable)==0) {
+ found=1;
+ ptr=type_data.u.buffer+offset;
+ len = current_type->field_lengths [i];
+ switch (current_type->field_types [i]) {
+ case FIELD_TYPE_INT:
+ set_int(len, ptr, variable, value);
+ break;
+ case FIELD_TYPE_UINT:
+ set_uint(len, ptr, variable, value);
+ break;
+ case FIELD_TYPE_CHAR:
+ set_char(len, ptr, variable, value);
+ break;
+ default:
+ wprintw (command_win,
+ "set: unhandled type %d\n",
+ current_type->field_types [i]);
+ break;
+ }
+ refresh_command_win ();
+ }
+ offset+=current_type->field_lengths [i];
+ }
+ if (found)
+ dispatch ("show");
+ else {
+ wprintw (command_win,"Error - Variable %s not found\n",variable);
+ refresh_command_win ();
+ }
+}
+
+void hex_set (char *command_line)
+
+{
+ unsigned char tmp;
+ char *ptr,buffer [80],*ch_ptr;
+ int mode=HEX;
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Argument not specified\n");refresh_command_win ();return;
+ }
+
+ ptr=parse_word (ptr,buffer);
+
+ if (strcasecmp (buffer,"text")==0) {
+ mode=TEXT;
+ strcpy (buffer,ptr);
+ }
+
+ else if (strcasecmp (buffer,"hex")==0) {
+ mode=HEX;
+ ptr=parse_word (ptr,buffer);
+ }
+
+ if (*buffer==0) {
+ wprintw (command_win,"Error - Data not specified\n");refresh_command_win ();return;
+ }
+
+ if (mode==HEX) {
+ do {
+ tmp=(unsigned char) strtol (buffer,NULL,16);
+ type_data.u.buffer [type_data.offset_in_block]=tmp;
+ type_data.offset_in_block++;
+ ptr=parse_word (ptr,buffer);
+ if (type_data.offset_in_block==file_system_info.block_size) {
+ if (*ptr) {
+ wprintw (command_win,"Error - Ending offset outside block, only partial string changed\n");
+ refresh_command_win ();
+ }
+ type_data.offset_in_block--;
+ }
+ } while (*buffer) ;
+ }
+
+ else {
+ ch_ptr=buffer;
+ while (*ch_ptr) {
+ tmp=(unsigned char) *ch_ptr++;
+ type_data.u.buffer [type_data.offset_in_block]=tmp;
+ type_data.offset_in_block++;
+ if (type_data.offset_in_block==file_system_info.block_size) {
+ if (*ch_ptr) {
+ wprintw (command_win,"Error - Ending offset outside block, only partial string changed\n");
+ refresh_command_win ();
+ }
+ type_data.offset_in_block--;
+ }
+ }
+ }
+
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+
+
+void set_type (char *command_line)
+
+{
+ struct struct_descriptor *descriptor_ptr;
+ char *ptr,buffer [80],tmp_buffer [80];
+ short found=0;
+
+ if (!load_type_data ())
+ return;
+
+ ptr=parse_word (command_line,buffer);
+ parse_word (ptr,buffer);
+
+ if (strcmp (buffer,"none")==0 || strcmp (buffer,"hex")==0) {
+ wprintw (command_win,"Data will be shown as hex dump\n");refresh_command_win ();
+ current_type=NULL;
+ sprintf (tmp_buffer,"show");dispatch (tmp_buffer);
+ return;
+ }
+
+ descriptor_ptr=first_type;
+ while (descriptor_ptr!=NULL && !found) {
+ if (strcmp (descriptor_ptr->name,buffer)==0)
+ found=1;
+ else
+ descriptor_ptr=descriptor_ptr->next;
+ }
+ if (found) {
+ wprintw (command_win,"Structure type set to %s\n",buffer);refresh_command_win ();
+ current_type=descriptor_ptr;
+ sprintf (tmp_buffer,"show");dispatch (tmp_buffer);
+ }
+ else {
+ wprintw (command_win,"Error - %s is not a valid type\n",buffer);refresh_command_win ();
+ }
+}
+
+void show_int(short len, void *ptr)
+{
+ long temp;
+ char *format;
+
+ switch (len) {
+ case 1:
+ temp = *((char *) ptr);
+ format = "%3d (0x%02x)\n";
+ break;
+ case 2:
+ temp = *((short *) ptr);
+ format = "%d (0x%x)\n";
+ break;
+ case 4:
+ temp = *((long *) ptr);
+ format = "%d\n";
+ break;
+ default:
+ wprintw (show_pad, "unimplemented\n");
+ return;
+ }
+ wprintw(show_pad, format, temp, temp);
+}
+
+void show_uint(short len, void *ptr)
+{
+ unsigned long temp;
+ char *format;
+
+ switch (len) {
+ case 1:
+ temp = *((unsigned char *) ptr);
+ temp = temp & 0xFF;
+ format = "%3u (0x%02x)\n";
+ break;
+ case 2:
+ temp = *((unsigned short *) ptr);
+ temp = temp & 0xFFFF;
+ format = "%u (0x%x)\n";
+ break;
+ case 4:
+ temp = (unsigned long) *((unsigned long *) ptr);
+ format = "%u\n";
+ break;
+ default:
+ wprintw (show_pad, "unimplemented\n");
+ return;
+ }
+ wprintw(show_pad, format, temp, temp);
+}
+
+void show_char(short len, void *ptr)
+{
+ unsigned char *cp = (unsigned char *) ptr;
+ unsigned char ch;
+ int i,j;
+
+ wprintw(show_pad, "\"");
+
+ for (i=0; i < len; i++) {
+ ch = *cp++;
+ if (ch == 0) {
+ for (j=i+1; j < len; j++)
+ if (cp[j-i])
+ break;
+ if (j == len)
+ break;
+ }
+ if (ch > 128) {
+ wprintw(show_pad, "M-");
+ ch -= 128;
+ }
+ if ((ch < 32) || (ch == 0x7f)) {
+ wprintw(show_pad, "^");
+ ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
+ }
+ wprintw(show_pad, "%c", ch);
+ }
+
+ wprintw(show_pad, "\"\n");
+}
+
+
+
+void show (char *command_line)
+
+{
+ unsigned int i,l,len,temp_int;
+ unsigned long offset=0,temp_long;
+ unsigned char temp_char,*ch_ptr;
+ void *ptr;
+
+ if (device_handle==NULL)
+ return;
+
+ show_pad_info.line=0;
+
+ if (current_type==NULL) {
+ wmove (show_pad,0,0);
+ ch_ptr=type_data.u.buffer;
+ for (l=0;l<file_system_info.block_size/16;l++) {
+ wprintw (show_pad,"%08ld : ",offset);
+ for (i=0;i<16;i++) {
+ if (type_data.offset_in_block==offset+i)
+ wattrset (show_pad,A_REVERSE);
+
+ if (ch_ptr [i]>=' ' && ch_ptr [i]<='z')
+ wprintw (show_pad,"%c",ch_ptr [i]);
+ else
+ wprintw (show_pad,".");
+ if (type_data.offset_in_block==offset+i)
+ wattrset (show_pad,A_NORMAL);
+ }
+ wprintw (show_pad," ");
+ for (i=0;i<16;i++) {
+ if (type_data.offset_in_block==offset+i)
+ wattrset (show_pad,A_REVERSE);
+
+ wprintw (show_pad,"%02x",ch_ptr [i]);
+
+ if (type_data.offset_in_block==offset+i) {
+ wattrset (show_pad,A_NORMAL);
+ show_pad_info.line=l-l % show_pad_info.display_lines;
+ }
+
+ wprintw (show_pad," ");
+ }
+ wprintw (show_pad,"\n");
+ offset+=16;
+ ch_ptr+=16;
+ }
+ show_pad_info.max_line=l-1;show_pad_info.max_col=COLS-1;
+ refresh_show_pad ();show_info ();
+ }
+ else {
+ wmove (show_pad,0,0);l=0;
+ for (i=0;i<current_type->fields_num;i++) {
+ wprintw (show_pad,"%-20s = ",current_type->field_names [i]);
+ ptr=type_data.u.buffer+offset;
+ len = current_type->field_lengths[i];
+ switch (current_type->field_types[i]) {
+ case FIELD_TYPE_INT:
+ show_int(len, ptr);
+ break;
+ case FIELD_TYPE_UINT:
+ show_uint(len, ptr);
+ break;
+ case FIELD_TYPE_CHAR:
+ show_char(len, ptr);
+ break;
+ default:
+ wprintw (show_pad, "unimplemented\n");
+ break;
+ }
+ offset+=len;
+ l++;
+ }
+ current_type->length=offset;
+ show_pad_info.max_line=l-1;
+ refresh_show_pad ();show_info ();
+ }
+}
+
+void next (char *command_line)
+
+{
+ long offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ offset*=atol (buffer);
+ }
+
+ if (current_type!=NULL) {
+ sprintf (buffer,"setoffset type +%ld",offset);
+ dispatch (buffer);
+ return;
+ }
+
+ if (type_data.offset_in_block+offset < file_system_info.block_size) {
+ type_data.offset_in_block+=offset;
+ sprintf (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Offset out of block\n");refresh_command_win ();
+ }
+}
+
+void prev (char *command_line)
+
+{
+ long offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ offset*=atol (buffer);
+ }
+
+ if (current_type!=NULL) {
+ sprintf (buffer,"setoffset type -%ld",offset);
+ dispatch (buffer);
+ return;
+ }
+
+ if (type_data.offset_in_block-offset >= 0) {
+ type_data.offset_in_block-=offset;
+ sprintf (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Offset out of block\n");refresh_command_win ();
+ }
+}
+
+void pgdn (char *commnad_line)
+
+{
+ show_pad_info.line+=show_pad_info.display_lines;
+ refresh_show_pad ();refresh_show_win ();
+}
+
+void pgup (char *command_line)
+
+{
+ show_pad_info.line-=show_pad_info.display_lines;
+ refresh_show_pad ();refresh_show_win ();
+}
+
+void redraw (char *command_line)
+
+{
+ redraw_all ();
+ dispatch ("show");
+}
+
+void remember (char *command_line)
+
+{
+ long entry_num;
+ char *ptr,buffer [80];
+
+ if (device_handle==NULL) {
+ wprintw (command_win,"Error - No device opened\n");refresh_command_win ();
+ return;
+ }
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Argument not specified\n");refresh_command_win ();
+ return;
+ }
+
+ ptr=parse_word (ptr,buffer);
+
+ entry_num=remember_lifo.entries_count++;
+ if (entry_num>REMEMBER_COUNT-1) {
+ entry_num=0;
+ remember_lifo.entries_count--;
+ }
+
+ remember_lifo.offset [entry_num]=device_offset;
+ remember_lifo.type [entry_num]=current_type;
+ strcpy (remember_lifo.name [entry_num],buffer);
+
+ if (current_type!=NULL)
+ wprintw (command_win,"Object %s in Offset %ld remembered as %s\n",current_type->name,device_offset,buffer);
+ else
+ wprintw (command_win,"Offset %ld remembered as %s\n",device_offset,buffer);
+
+ refresh_command_win ();
+}
+
+void recall (char *command_line)
+
+{
+ char *ptr,buffer [80];
+ long entry_num;
+
+ if (device_handle==NULL) {
+ wprintw (command_win,"Error - No device opened\n");refresh_command_win ();
+ return;
+ }
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr==0) {
+ wprintw (command_win,"Error - Argument not specified\n");refresh_command_win ();
+ return;
+ }
+
+ ptr=parse_word (ptr,buffer);
+
+
+ for (entry_num=remember_lifo.entries_count-1;entry_num>=0;entry_num--) {
+ if (strcmp (remember_lifo.name [entry_num],buffer)==0)
+ break;
+ }
+
+ if (entry_num==-1) {
+ wprintw (command_win,"Error - Can not recall %s\n",buffer);refresh_command_win ();
+ return;
+ }
+
+ sprintf (buffer,"setoffset %ld",remember_lifo.offset [entry_num]);dispatch (buffer);
+ if (remember_lifo.type [entry_num] != NULL) {
+ sprintf (buffer,"settype %s",remember_lifo.type [entry_num]->name);dispatch (buffer);
+ }
+
+ else {
+ sprintf (buffer,"settype none");dispatch (buffer);
+ }
+
+ wprintw (command_win,"Object %s in Offset %ld recalled\n",current_type->name,device_offset);
+ refresh_command_win ();
+}
+
+void enable_write (char *command_line)
+
+{
+ FILE *fp;
+
+ if (device_handle==NULL) {
+ wprintw (command_win,"Error - No device opened\n");refresh_command_win ();
+ return;
+ }
+
+ if (!AllowChanges) {
+ wprintw (command_win,"Sorry, write access is not allowed\n");
+ return;
+ }
+
+ if (mounted) {
+ wprintw (command_win,"Error - Filesystem is mounted\n");
+ return;
+ }
+
+ if ( (fp=fopen (device_name,"r+b"))==NULL) {
+ wprintw (command_win,"Error - Can not open device %s for reading and writing\n",device_name);refresh_command_win ();
+ return;
+ }
+ fclose (device_handle);
+ device_handle=fp;write_access=1;
+ wprintw (command_win,"Write access enabled - Be careful\n");refresh_command_win ();
+}
+
+void disable_write (char *command_line)
+
+{
+ FILE *fp;
+
+ if (device_handle==NULL) {
+ wprintw (command_win,"Error - No device opened\n");refresh_command_win ();
+ return;
+ }
+
+ if ( (fp=fopen (device_name,"rb"))==NULL) {
+ wprintw (command_win,"Error - Can not open device %s\n",device_name);refresh_command_win ();
+ return;
+ }
+
+ fclose (device_handle);
+ device_handle=fp;write_access=0;
+ wprintw (command_win,"Write access disabled\n");refresh_command_win ();
+}
+
+void write_data (char *command_line)
+
+{
+ write_type_data ();
+}
diff --git a/ext2ed/group_com.c b/ext2ed/group_com.c
new file mode 100644
index 0000000..aaed16e
--- /dev/null
+++ b/ext2ed/group_com.c
@@ -0,0 +1,183 @@
+/*
+
+/usr/src/ext2ed/group_com.c
+
+A part of the extended file system 2 disk editor.
+
+General user commands
+
+First written on: April 17 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ext2ed.h"
+
+void type_ext2_group_desc___next (char *command_line)
+
+{
+ long entry_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ entry_offset=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",group_info.group_num+entry_offset);
+ dispatch (buffer);
+}
+
+void type_ext2_group_desc___prev (char *command_line)
+
+{
+ long entry_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ entry_offset=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",group_info.group_num-entry_offset);
+ dispatch (buffer);
+}
+
+void type_ext2_group_desc___entry (char *command_line)
+
+{
+ long group_num;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");refresh_command_win ();return;
+ }
+ ptr=parse_word (ptr,buffer);
+
+ group_num=atol (buffer);
+
+ if (group_num < 0 || group_num >= file_system_info.groups_count) {
+ wprintw (command_win,"Error - Entry number out of bounds\n");refresh_command_win ();return;
+ }
+
+ device_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+
+ sprintf (buffer,"setoffset %ld",device_offset);dispatch (buffer);
+ strcpy (buffer,"show");dispatch (buffer);
+ group_info.group_num=group_num;
+}
+
+
+void type_ext2_group_desc___gocopy (char *command_line)
+
+{
+ unsigned long copy_num,offset;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");refresh_command_win ();return;
+ }
+ ptr=parse_word (ptr,buffer);
+
+ copy_num=atol (buffer);
+
+ offset=file_system_info.first_group_desc_offset+copy_num*file_system_info.super_block.s_blocks_per_group*file_system_info.block_size;
+
+ if (offset > file_system_info.file_system_size) {
+ wprintw (command_win,"Error - Copy number out of bounds\n");refresh_command_win ();return;
+ }
+
+ group_info.copy_num=copy_num;
+ device_offset=offset+group_info.group_num*sizeof (struct ext2_group_desc);
+
+ sprintf (buffer,"setoffset %ld",device_offset);dispatch (buffer);
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+
+void type_ext2_group_desc___show (char *command_line)
+
+{
+ long group_num,temp;
+
+ temp=(device_offset-file_system_info.first_group_desc_offset) % (file_system_info.super_block.s_blocks_per_group*file_system_info.block_size);
+ group_num=temp/sizeof (struct ext2_group_desc);
+
+ show (command_line);
+
+ wmove (show_win,1,0);wprintw (show_win,"\n");wmove (show_win,2,0);
+ wprintw (show_win,"Group %ld of %ld ",group_num,file_system_info.groups_count-1);
+ wprintw (show_win,"in copy %ld ",group_info.copy_num);
+ if (group_info.copy_num==0) wprintw (show_win,"(Main copy)");
+ wprintw (show_win,"\n");refresh_show_win ();
+
+ if (group_num==0) {
+ wprintw (command_win,"Reached first group descriptor\n");
+ wrefresh (command_win);
+ }
+
+ if (group_num==file_system_info.groups_count-1) {
+ wprintw (command_win,"Reached last group descriptor\n");
+ wrefresh (command_win);
+ }
+}
+
+void type_ext2_group_desc___inode (char *command_line)
+
+{
+ long inode_offset;
+ char buffer [80];
+
+ inode_offset=type_data.u.t_ext2_group_desc.bg_inode_table;
+ sprintf (buffer,"setoffset block %ld",inode_offset);dispatch (buffer);
+ sprintf (buffer,"settype ext2_inode");dispatch (buffer);
+}
+
+void type_ext2_group_desc___blockbitmap (char *command_line)
+
+{
+ long block_bitmap_offset;
+ char buffer [80];
+
+ block_bitmap_info.entry_num=0;
+ block_bitmap_info.group_num=group_info.group_num;
+
+ block_bitmap_offset=type_data.u.t_ext2_group_desc.bg_block_bitmap;
+ sprintf (buffer,"setoffset block %ld",block_bitmap_offset);dispatch (buffer);
+ sprintf (buffer,"settype block_bitmap");dispatch (buffer);
+}
+
+void type_ext2_group_desc___inodebitmap (char *command_line)
+
+{
+ long inode_bitmap_offset;
+ char buffer [80];
+
+ inode_bitmap_info.entry_num=0;
+ inode_bitmap_info.group_num=group_info.group_num;
+
+ inode_bitmap_offset=type_data.u.t_ext2_group_desc.bg_inode_bitmap;
+ sprintf (buffer,"setoffset block %ld",inode_bitmap_offset);dispatch (buffer);
+ sprintf (buffer,"settype inode_bitmap");dispatch (buffer);
+}
+
+void type_ext2_group_desc___setactivecopy (char *command_line)
+
+{
+ struct ext2_group_desc gd;
+
+ gd=type_data.u.t_ext2_group_desc;
+ dispatch ("gocopy 0");
+ type_data.u.t_ext2_group_desc=gd;
+ dispatch ("show");
+}
diff --git a/ext2ed/init.c b/ext2ed/init.c
new file mode 100644
index 0000000..4e58431
--- /dev/null
+++ b/ext2ed/init.c
@@ -0,0 +1,633 @@
+/*
+
+/usr/src/ext2ed/init.c
+
+A part of the extended file system 2 disk editor.
+
+--------------------------------
+Various initialization routines.
+--------------------------------
+
+First written on: April 9 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_READLINE
+#include <readline.h>
+#endif
+#include <signal.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "ext2ed.h"
+
+char lines_s [80],cols_s [80];
+
+void signal_handler (void);
+
+void prepare_to_close (void)
+
+{
+ close_windows ();
+ if (device_handle!=NULL)
+ fclose (device_handle);
+ free_user_commands (&general_commands);
+ free_user_commands (&ext2_commands);
+ free_struct_descriptors ();
+}
+
+int init (void)
+
+{
+ printf ("Initializing ...\n");
+
+ if (!process_configuration_file ()) {
+ fprintf (stderr,"Error - Unable to complete configuration. Quitting.\n");
+ return (0);
+ };
+
+ general_commands.last_command=-1; /* No commands whatsoever meanwhile */
+ ext2_commands.last_command=-1;
+ add_general_commands (); /* Add the general commands, available always */
+ device_handle=NULL; /* Notice that our device is still not set up */
+ device_offset=-1;
+ current_type=NULL; /* No filesystem specific types yet */
+
+ remember_lifo.entries_count=0; /* Object memory is empty */
+
+ init_windows (); /* Initialize the NCURSES interface */
+ init_readline (); /* Initialize the READLINE interface */
+ init_signals (); /* Initialize the signal handlers */
+ write_access=0; /* Write access disabled */
+
+ strcpy (last_command_line,"help"); /* Show the help screen to the user */
+ dispatch ("help");
+ return (1); /* Success */
+}
+
+void add_general_commands (void)
+
+{
+ add_user_command (&general_commands,"help","EXT2ED help system",help);
+ add_user_command (&general_commands,"set","Changes a variable in the current object",set);
+ add_user_command (&general_commands,"setdevice","Selects the filesystem block device (e.g. /dev/hda1)",set_device);
+ add_user_command (&general_commands,"setoffset","Moves asynchronously in the filesystem",set_offset);
+ add_user_command (&general_commands,"settype","Tells EXT2ED how to interpret the current object",set_type);
+ add_user_command (&general_commands,"show","Displays the current object",show);
+ add_user_command (&general_commands,"pgup","Scrolls data one page up",pgup);
+ add_user_command (&general_commands,"pgdn","Scrolls data one page down",pgdn);
+ add_user_command (&general_commands,"redraw","Redisplay the screen",redraw);
+ add_user_command (&general_commands,"remember","Saves the current position and data information",remember);
+ add_user_command (&general_commands,"recall","Gets back to the saved object position",recall);
+ add_user_command (&general_commands,"enablewrite","Enters Read/Write mode - Allows changing the filesystem",enable_write);
+ add_user_command (&general_commands,"disablewrite","Enters read only mode",disable_write);
+ add_user_command (&general_commands,"writedata","Write data back to disk",write_data);
+ add_user_command (&general_commands,"next","Moves to the next byte in hex mode",next);
+ add_user_command (&general_commands,"prev","Moves to the previous byte in hex mode",prev);
+}
+
+void add_ext2_general_commands (void)
+
+{
+ add_user_command (&ext2_commands,"super","Moves to the superblock of the filesystem",type_ext2___super);
+ add_user_command (&ext2_commands,"group","Moves to the first group descriptor",type_ext2___group);
+ add_user_command (&ext2_commands,"cd","Moves to the directory specified",type_ext2___cd);
+}
+
+int set_struct_descriptors (char *file_name)
+
+{
+ FILE *fp;
+ char current_line [500],current_word [50],*ch;
+ char variable_name [50],variable_type [20];
+ struct struct_descriptor *current_descriptor;
+
+ if ( (fp=fopen (file_name,"rt"))==NULL) {
+ wprintw (command_win,"Error - Failed to open descriptors file %s\n",file_name);
+ refresh_command_win (); return (0);
+ };
+
+ while (!feof (fp)) {
+ fgets (current_line,500,fp);
+ if (feof (fp)) break;
+ ch=parse_word (current_line,current_word);
+ if (strcmp (current_word,"struct")==0) {
+ ch=parse_word (ch,current_word);
+ current_descriptor=add_new_descriptor (current_word);
+
+ while (strchr (current_line,'{')==NULL) {
+ fgets (current_line,500,fp);
+ if (feof (fp)) break;
+ };
+ if (feof (fp)) break;
+
+ fgets (current_line,500,fp);
+
+ while (strchr (current_line,'}')==NULL) {
+ while (strchr (current_line,';')==NULL) {
+ fgets (current_line,500,fp);
+ if (strchr (current_line,'}')!=NULL) break;
+ };
+ if (strchr (current_line,'}') !=NULL) break;
+ ch=parse_word (current_line,variable_type);
+ ch=parse_word (ch,variable_name);
+ while (variable_name [strlen (variable_name)-1]!=';') {
+ strcpy (variable_type,variable_name);
+ ch=parse_word (ch,variable_name);
+ };
+ variable_name [strlen (variable_name)-1]=0;
+ add_new_variable (current_descriptor,variable_type,variable_name);
+ fgets (current_line,500,fp);
+ };
+ };
+ };
+
+ fclose (fp);
+ return (1);
+}
+
+void free_struct_descriptors (void)
+
+{
+ struct struct_descriptor *ptr,*next;
+
+ ptr=first_type;
+ while (ptr!=NULL) {
+ next=ptr->next;
+ free_user_commands (&ptr->type_commands);
+ free (ptr);
+ ptr=next;
+ }
+ first_type=last_type=current_type=NULL;
+}
+
+void free_user_commands (struct struct_commands *ptr)
+
+{
+ int i;
+
+ for (i=0;i<=ptr->last_command;i++) {
+ free (ptr->names [i]);
+ free (ptr->descriptions [i]);
+ }
+
+ ptr->last_command=-1;
+}
+
+struct struct_descriptor *add_new_descriptor (char *name)
+
+{
+ struct struct_descriptor *ptr;
+
+ ptr = malloc (sizeof (struct struct_descriptor));
+ if (ptr == NULL) {
+ printf ("Error - Can not allocate memory - Quitting\n");
+ exit (1);
+ }
+ memset(ptr, 0, sizeof(struct struct_descriptor));
+ ptr->prev = ptr->next = NULL;
+ strcpy (ptr->name,name);
+ ptr->length=0;
+ ptr->fields_num=0;
+ if (first_type==NULL) {
+ first_type = last_type = ptr;
+ } else {
+ ptr->prev = last_type; last_type->next = ptr; last_type=ptr;
+ }
+ ptr->type_commands.last_command=-1;
+ fill_type_commands (ptr);
+ return (ptr);
+}
+
+struct type_table {
+ char *name;
+ int field_type;
+ int len;
+};
+
+struct type_table type_table[] = {
+ { "long", FIELD_TYPE_INT, 4 },
+ { "short", FIELD_TYPE_INT, 2 },
+ { "char", FIELD_TYPE_CHAR, 1 },
+ { "__u32", FIELD_TYPE_UINT, 4 },
+ { "__s32", FIELD_TYPE_INT, 4 },
+ { "__u16", FIELD_TYPE_UINT, 2 },
+ { "__s16", FIELD_TYPE_INT, 2 },
+ { "__u8", FIELD_TYPE_UINT, 1 },
+ { "__s8", FIELD_TYPE_INT, 1 },
+ { 0, 0, 0 }
+};
+
+void add_new_variable (struct struct_descriptor *ptr,char *v_type,char *v_name)
+
+{
+ short len=1;
+ char field_type=FIELD_TYPE_INT;
+ struct type_table *p;
+
+ strcpy (ptr->field_names [ptr->fields_num],v_name);
+ ptr->field_positions [ptr->fields_num]=ptr->length;
+
+ for (p = type_table; p->name; p++) {
+ if (strcmp(v_type, p->name) == 0) {
+ len = p->len;
+ field_type = p->field_type;
+ break;
+ }
+ }
+ if (p->name == 0) {
+ if (strncmp(v_type, "char[", 5) == 0) {
+ len = atoi(v_type+5);
+ field_type = FIELD_TYPE_CHAR;
+ } else {
+ printf("Unknown type %s for field %s\n", v_type, v_name);
+ exit(1);
+ }
+ }
+
+ ptr->field_lengths [ptr->fields_num] = len;
+ ptr->field_types [ptr->fields_num] = field_type;
+
+ ptr->length+=len;
+ ptr->fields_num++;
+}
+
+void fill_type_commands (struct struct_descriptor *ptr)
+
+/*
+
+Set specific type user commands.
+
+*/
+
+{
+
+ if (strcmp ((ptr->name),"file")==0) {
+ add_user_command (&ptr->type_commands,"show","Shows file data",type_file___show);
+ add_user_command (&ptr->type_commands,"inode","Returns to the inode of the current file",type_file___inode);
+ add_user_command (&ptr->type_commands,"display","Specifies data format - text or hex",type_file___display);
+ add_user_command (&ptr->type_commands,"next","Pass to next byte",type_file___next);
+ add_user_command (&ptr->type_commands,"prev","Pass to the previous byte",type_file___prev);
+ add_user_command (&ptr->type_commands,"offset","Pass to a specified byte in the current block",type_file___offset);
+ add_user_command (&ptr->type_commands,"nextblock","Pass to next file block",type_file___nextblock);
+ add_user_command (&ptr->type_commands,"prevblock","Pass to the previous file block",type_file___prevblock);
+ add_user_command (&ptr->type_commands,"block","Specify which file block to edit",type_file___block);
+ add_user_command (&ptr->type_commands,"remember","Saves the file\'s inode position for later reference",type_file___remember);
+ add_user_command (&ptr->type_commands,"set","Sets the current byte",type_file___set);
+ add_user_command (&ptr->type_commands,"writedata","Writes the current block to the disk",type_file___writedata);
+ }
+
+ if (strcmp ((ptr->name),"ext2_inode")==0) {
+ add_user_command (&ptr->type_commands,"show","Shows inode data",type_ext2_inode___show);
+ add_user_command (&ptr->type_commands,"next","Move to next inode in current block group",type_ext2_inode___next);
+ add_user_command (&ptr->type_commands,"prev","Move to next inode in current block group",type_ext2_inode___prev);
+ add_user_command (&ptr->type_commands,"group","Move to the group descriptors of the current inode table",type_ext2_inode___group);
+ add_user_command (&ptr->type_commands,"entry","Move to a specified entry in the current inode table",type_ext2_inode___entry);
+ add_user_command (&ptr->type_commands,"file","Display file data of the current inode",type_ext2_inode___file);
+ add_user_command (&ptr->type_commands,"dir","Display directory data of the current inode",type_ext2_inode___dir);
+ }
+
+ if (strcmp ((ptr->name),"dir")==0) {
+ add_user_command (&ptr->type_commands,"show","Shows current directory data",type_dir___show);
+ add_user_command (&ptr->type_commands,"inode","Returns to the inode of the current directory",type_dir___inode);
+ add_user_command (&ptr->type_commands,"next","Pass to the next directory entry",type_dir___next);
+ add_user_command (&ptr->type_commands,"prev","Pass to the previous directory entry",type_dir___prev);
+ add_user_command (&ptr->type_commands,"followinode","Follows the inode specified in this directory entry",type_dir___followinode);
+ add_user_command (&ptr->type_commands,"remember","Remember the inode of the current directory entry",type_dir___remember);
+ add_user_command (&ptr->type_commands,"cd","Changes directory relative to the current directory",type_dir___cd);
+ add_user_command (&ptr->type_commands,"entry","Moves to a specified entry in the current directory",type_dir___entry);
+ add_user_command (&ptr->type_commands,"writedata","Writes the current entry to the disk",type_dir___writedata);
+ add_user_command (&ptr->type_commands,"set","Changes a variable in the current directory entry",type_dir___set);
+ }
+
+ if (strcmp ((ptr->name),"ext2_super_block")==0) {
+ add_user_command (&ptr->type_commands,"show","Displays the super block data",type_ext2_super_block___show);
+ add_user_command (&ptr->type_commands,"gocopy","Move to another backup copy of the superblock",type_ext2_super_block___gocopy);
+ add_user_command (&ptr->type_commands,"setactivecopy","Copies the current superblock to the main superblock",type_ext2_super_block___setactivecopy);
+ }
+
+ if (strcmp ((ptr->name),"ext2_group_desc")==0) {
+ add_user_command (&ptr->type_commands,"next","Pass to the next block group descriptor",type_ext2_group_desc___next);
+ add_user_command (&ptr->type_commands,"prev","Pass to the previous group descriptor",type_ext2_group_desc___prev);
+ add_user_command (&ptr->type_commands,"entry","Pass to a specific group descriptor",type_ext2_group_desc___entry);
+ add_user_command (&ptr->type_commands,"show","Shows the current group descriptor",type_ext2_group_desc___show);
+ add_user_command (&ptr->type_commands,"inode","Pass to the inode table of the current group block",type_ext2_group_desc___inode);
+ add_user_command (&ptr->type_commands,"gocopy","Move to another backup copy of the group descriptor",type_ext2_group_desc___gocopy);
+ add_user_command (&ptr->type_commands,"blockbitmap","Show the block allocation bitmap of the current group block",type_ext2_group_desc___blockbitmap);
+ add_user_command (&ptr->type_commands,"inodebitmap","Show the inode allocation bitmap of the current group block",type_ext2_group_desc___inodebitmap);
+ add_user_command (&ptr->type_commands,"setactivecopy","Copies the current group descriptor to the main table",type_ext2_super_block___setactivecopy);
+ }
+
+ if (strcmp ((ptr->name),"block_bitmap")==0) {
+ add_user_command (&ptr->type_commands,"show","Displays the block allocation bitmap",type_ext2_block_bitmap___show);
+ add_user_command (&ptr->type_commands,"entry","Moves to a specific bit",type_ext2_block_bitmap___entry);
+ add_user_command (&ptr->type_commands,"next","Moves to the next bit",type_ext2_block_bitmap___next);
+ add_user_command (&ptr->type_commands,"prev","Moves to the previous bit",type_ext2_block_bitmap___prev);
+ add_user_command (&ptr->type_commands,"allocate","Allocates the current block",type_ext2_block_bitmap___allocate);
+ add_user_command (&ptr->type_commands,"deallocate","Deallocates the current block",type_ext2_block_bitmap___deallocate);
+ }
+
+ if (strcmp ((ptr->name),"inode_bitmap")==0) {
+ add_user_command (&ptr->type_commands,"show","Displays the inode allocation bitmap",type_ext2_inode_bitmap___show);
+ add_user_command (&ptr->type_commands,"entry","Moves to a specific bit",type_ext2_inode_bitmap___entry);
+ add_user_command (&ptr->type_commands,"next","Moves to the next bit",type_ext2_inode_bitmap___next);
+ add_user_command (&ptr->type_commands,"prev","Moves to the previous bit",type_ext2_inode_bitmap___prev);
+ add_user_command (&ptr->type_commands,"allocate","Allocates the current inode",type_ext2_inode_bitmap___allocate);
+ add_user_command (&ptr->type_commands,"deallocate","Deallocates the current inode",type_ext2_inode_bitmap___deallocate);
+ }
+
+}
+
+void add_user_command (struct struct_commands *ptr,char *name,char *description,PF callback)
+
+{
+ int num;
+
+ num=ptr->last_command;
+ if (num+1==MAX_COMMANDS_NUM) {
+ printf ("Internal Error - Can't add command %s\n",name);
+ return;
+ }
+
+ ptr->last_command=++num;
+
+ ptr->names [num]=(char *) malloc (strlen (name)+1);
+ strcpy (ptr->names [num],name);
+
+ if (*description!=0) {
+ ptr->descriptions [num]=(char *) malloc (strlen (description)+1);
+ strcpy (ptr->descriptions [num],description);
+ }
+
+ ptr->callback [num]=callback;
+}
+
+int set_file_system_info (void)
+
+{
+ int ext2_detected=0;
+ struct ext2_super_block *sb;
+
+ file_system_info.super_block_offset=1024;
+ file_system_info.file_system_size=DefaultTotalBlocks*DefaultBlockSize;
+
+ low_read ((char *) &file_system_info.super_block,sizeof (struct ext2_super_block),file_system_info.super_block_offset);
+
+ sb=&file_system_info.super_block;
+
+ if (sb->s_magic == EXT2_SUPER_MAGIC)
+ ext2_detected=1;
+
+ if (ext2_detected)
+ wprintw (command_win,"Detected extended 2 file system on device %s\n",device_name);
+ else
+ wprintw (command_win,"Warning - Extended 2 filesystem not detected on device %s\n",device_name);
+
+ if (!ext2_detected && !ForceExt2)
+ wprintw (command_win,"You may wish to use the configuration option ForceExt2 on\n");
+
+ if (ForceExt2 && !ext2_detected)
+ wprintw (command_win,"Forcing extended 2 filesystem\n");
+
+ if (ForceDefault || !ext2_detected)
+ wprintw (command_win,"Forcing default parameters\n");
+
+ refresh_command_win ();
+
+ if (ext2_detected || ForceExt2) {
+ add_ext2_general_commands ();
+ if (!set_struct_descriptors (Ext2Descriptors))
+ return (0);
+ }
+
+ if (!ForceDefault && ext2_detected) {
+
+ file_system_info.block_size=EXT2_MIN_BLOCK_SIZE << sb->s_log_block_size;
+ if (file_system_info.block_size == EXT2_MIN_BLOCK_SIZE)
+ file_system_info.first_group_desc_offset=2*EXT2_MIN_BLOCK_SIZE;
+ else
+ file_system_info.first_group_desc_offset=file_system_info.block_size;
+ file_system_info.groups_count = ext2fs_div64_ceil(ext2fs_blocks_count(sb),
+ sb->s_blocks_per_group);
+
+ file_system_info.inodes_per_block=file_system_info.block_size/sizeof (struct ext2_inode);
+ file_system_info.blocks_per_group=sb->s_inodes_per_group/file_system_info.inodes_per_block;
+ file_system_info.no_blocks_in_group=sb->s_blocks_per_group;
+ file_system_info.file_system_size=(ext2fs_blocks_count(sb)-1)*file_system_info.block_size;
+ }
+
+ else {
+ file_system_info.file_system_size=DefaultTotalBlocks*DefaultBlockSize;
+ file_system_info.block_size=DefaultBlockSize;
+ file_system_info.no_blocks_in_group=DefaultBlocksInGroup;
+ }
+
+ if (file_system_info.file_system_size > 2147483647) {
+ wprintw (command_win,"Sorry, filesystems bigger than 2 GB are currently not supported\n");
+ return (0);
+ }
+ return (1);
+}
+
+void init_readline (void)
+
+{
+#ifdef HAVE_READLINE
+ rl_completion_entry_function=(Function *) complete_command;
+#endif
+}
+
+void init_signals (void)
+
+{
+ signal (SIGWINCH, signal_SIGWINCH_handler); /* Catch SIGWINCH */
+ signal (SIGTERM, signal_SIGTERM_handler);
+ signal (SIGSEGV, signal_SIGSEGV_handler);
+
+}
+
+void signal_SIGWINCH_handler (int sig_num)
+
+{
+ redraw_request=1; /* We will handle it in main.c */
+
+ /* Reset signal handler */
+ signal (SIGWINCH, signal_SIGWINCH_handler);
+
+}
+
+void signal_SIGTERM_handler (int sig_num)
+
+{
+ prepare_to_close ();
+ printf ("Terminated due to signal %d\n",sig_num);
+ exit (1);
+}
+
+void signal_SIGSEGV_handler (int sig_num)
+
+{
+ prepare_to_close ();
+ printf ("Killed by signal %d!\n",sig_num);
+ exit (1);
+}
+
+int process_configuration_file (void)
+
+{
+ char buffer [300];
+ char option [80],value [80];
+ FILE *fp;
+
+ strcpy (buffer, ROOT_SYSCONFDIR);
+ strcat (buffer,"/ext2ed.conf");
+
+ if ((fp=fopen (buffer,"rt"))==NULL) {
+ fprintf (stderr,"Error - Unable to open configuration file %s\n",buffer);
+ return (0);
+ }
+
+ while (get_next_option (fp,option,value)) {
+ if (strcasecmp (option,"Ext2Descriptors")==0) {
+ strcpy (Ext2Descriptors,value);
+ }
+
+ else if (strcasecmp (option,"AlternateDescriptors")==0) {
+ strcpy (AlternateDescriptors,value);
+ }
+
+ else if (strcasecmp (option,"LogFile")==0) {
+ strcpy (LogFile,value);
+ }
+
+ else if (strcasecmp (option,"LogChanges")==0) {
+ if (strcasecmp (value,"on")==0)
+ LogChanges = 1;
+ else if (strcasecmp (value,"off")==0)
+ LogChanges = 0;
+ else {
+ fprintf (stderr,"Error - Illegal value: %s %s\n",option,value);
+ fclose (fp);return (0);
+ }
+ }
+
+ else if (strcasecmp (option,"AllowChanges")==0) {
+ if (strcasecmp (value,"on")==0)
+ AllowChanges = 1;
+ else if (strcasecmp (value,"off")==0)
+ AllowChanges = 0;
+ else {
+ fprintf (stderr,"Error - Illegal value: %s %s\n",option,value);
+ fclose (fp);return (0);
+ }
+ }
+
+ else if (strcasecmp (option,"AllowMountedRead")==0) {
+ if (strcasecmp (value,"on")==0)
+ AllowMountedRead = 1;
+ else if (strcasecmp (value,"off")==0)
+ AllowMountedRead = 0;
+ else {
+ fprintf (stderr,"Error - Illegal value: %s %s\n",option,value);
+ fclose (fp);return (0);
+ }
+ }
+
+ else if (strcasecmp (option,"ForceExt2")==0) {
+ if (strcasecmp (value,"on")==0)
+ ForceExt2 = 1;
+ else if (strcasecmp (value,"off")==0)
+ ForceExt2 = 0;
+ else {
+ fprintf (stderr,"Error - Illegal value: %s %s\n",option,value);
+ fclose (fp);return (0);
+ }
+ }
+
+ else if (strcasecmp (option,"DefaultBlockSize")==0) {
+ DefaultBlockSize = atoi (value);
+ }
+
+ else if (strcasecmp (option,"DefaultTotalBlocks")==0) {
+ DefaultTotalBlocks = strtoul (value,NULL,10);
+ }
+
+ else if (strcasecmp (option,"DefaultBlocksInGroup")==0) {
+ DefaultBlocksInGroup = strtoul (value,NULL,10);
+ }
+
+ else if (strcasecmp (option,"ForceDefault")==0) {
+ if (strcasecmp (value,"on")==0)
+ ForceDefault = 1;
+ else if (strcasecmp (value,"off")==0)
+ ForceDefault = 0;
+ else {
+ fprintf (stderr,"Error - Illegal value: %s %s\n",option,value);
+ fclose (fp);return (0);
+ }
+ }
+
+ else {
+ fprintf (stderr,"Error - Unknown option: %s\n",option);
+ fclose (fp);return (0);
+ }
+ }
+
+ printf ("Configuration completed\n");
+ fclose (fp);
+ return (1);
+}
+
+int get_next_option (FILE *fp,char *option,char *value)
+
+{
+ char *ptr;
+ char buffer [600];
+
+ if (feof (fp)) return (0);
+ do{
+ if (feof (fp)) return (0);
+ fgets (buffer,500,fp);
+ } while (buffer [0]=='#' || buffer [0]=='\n');
+
+ ptr=parse_word (buffer,option);
+ ptr=parse_word (ptr,value);
+ return (1);
+}
+
+void check_mounted (char *name)
+
+{
+ FILE *fp;
+ char *ptr;
+ char current_line [500],current_word [200];
+
+ mounted=0;
+
+ if ( (fp=fopen ("/etc/mtab","rt"))==NULL) {
+ wprintw (command_win,"Error - Failed to open /etc/mtab. Assuming filesystem is mounted.\n");
+ refresh_command_win ();mounted=1;return;
+ };
+
+ while (!feof (fp)) {
+ fgets (current_line,500,fp);
+ if (feof (fp)) break;
+ ptr=parse_word (current_line,current_word);
+ if (strcasecmp (current_word,name)==0) {
+ mounted=1;fclose (fp);return;
+ }
+ };
+
+ fclose (fp);
+
+ return;
+}
diff --git a/ext2ed/inode_com.c b/ext2ed/inode_com.c
new file mode 100644
index 0000000..2d3dd6d
--- /dev/null
+++ b/ext2ed/inode_com.c
@@ -0,0 +1,437 @@
+/*
+
+/usr/src/ext2ed/inode_com.c
+
+A part of the extended file system 2 disk editor.
+
+Commands relevant to ext2_inode type.
+
+First written on: April 9 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "ext2ed.h"
+
+void type_ext2_inode___prev (char *command_line)
+
+{
+
+ char *ptr,buffer [80];
+
+ long group_num,group_offset,entry_num,block_num,first_entry,last_entry;
+ long inode_num,mult=1;
+ struct ext2_group_desc desc;
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ mult=atol (buffer);
+ }
+
+ block_num=device_offset/file_system_info.block_size;
+
+ group_num=inode_offset_to_group_num (device_offset);
+ group_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+
+ low_read ((char *) &desc,sizeof (struct ext2_group_desc),group_offset);
+
+ entry_num=(device_offset-desc.bg_inode_table*file_system_info.block_size)/sizeof (struct ext2_inode);
+
+ first_entry=0;last_entry=file_system_info.super_block.s_inodes_per_group-1;
+ inode_num=0;
+
+ if (entry_num-mult+1>0) {
+ device_offset-=sizeof (struct ext2_inode)*mult;
+ entry_num-=mult;
+
+ sprintf (buffer,"setoffset %ld",device_offset);dispatch (buffer);
+ strcpy (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Entry out of limits\n");refresh_command_win ();
+ }
+
+ if (entry_num==0) {
+ wprintw (command_win,"Reached first inode in current group descriptor\n");
+ refresh_command_win ();
+ }
+}
+
+void type_ext2_inode___next (char *command_line)
+
+{
+
+ char *ptr,buffer [80];
+
+ long group_num,group_offset,entry_num,block_num,first_entry,last_entry;
+ long inode_num,mult=1;
+ struct ext2_group_desc desc;
+
+ ptr=parse_word (command_line,buffer);
+
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ mult=atol (buffer);
+ }
+
+
+ block_num=device_offset/file_system_info.block_size;
+
+ group_num=inode_offset_to_group_num (device_offset);
+ group_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+
+ low_read ((char *) &desc,sizeof (struct ext2_group_desc),group_offset);
+
+ entry_num=(device_offset-desc.bg_inode_table*file_system_info.block_size)/sizeof (struct ext2_inode);
+
+ first_entry=0;last_entry=file_system_info.super_block.s_inodes_per_group-1;
+ inode_num=0;
+
+ if (entry_num+mult-1<last_entry) {
+ device_offset+=sizeof (struct ext2_inode)*mult;
+ entry_num+=mult;
+
+ sprintf (buffer,"setoffset %ld",device_offset);dispatch (buffer);
+ strcpy (buffer,"show");dispatch (buffer);
+ }
+
+ else {
+ wprintw (command_win,"Error - Entry out of limits\n");refresh_command_win ();
+ }
+
+ if (entry_num==last_entry) {
+ wprintw (command_win,"Reached last inode in current group descriptor\n");
+ refresh_command_win ();
+ }
+}
+
+
+void type_ext2_inode___show (char *command_line)
+
+{
+ struct ext2_inode *inode_ptr;
+
+ unsigned short temp;
+ int i;
+
+ long group_num,group_offset,entry_num,block_num,first_entry,last_entry,inode_num;
+ struct ext2_group_desc desc;
+
+ block_num=device_offset/file_system_info.block_size;
+
+ group_num=inode_offset_to_group_num (device_offset);
+ group_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+
+ low_read ((char *) &desc,sizeof (struct ext2_group_desc),group_offset);
+
+ entry_num=(device_offset-desc.bg_inode_table*file_system_info.block_size)/sizeof (struct ext2_inode);
+ first_entry=0;last_entry=file_system_info.super_block.s_inodes_per_group-1;
+ inode_num=group_num*file_system_info.super_block.s_inodes_per_group+1;
+ inode_num+=entry_num;
+
+ inode_ptr=&type_data.u.t_ext2_inode;
+
+ show (command_line);
+
+ wmove (show_pad,0,40);wprintw (show_pad,"octal = %06o ",inode_ptr->i_mode);
+ for (i=6;i>=0;i-=3) {
+ temp=inode_ptr->i_mode & 0x1ff;
+ temp=temp >> i;
+ if (temp & 4)
+ wprintw (show_pad,"r");
+ else
+ wprintw (show_pad,"-");
+
+ if (temp & 2)
+ wprintw (show_pad,"w");
+ else
+ wprintw (show_pad,"-");
+
+ if (temp & 1)
+ wprintw (show_pad,"x");
+ else
+ wprintw (show_pad,"-");
+ }
+ wmove (show_pad,3,40);wprintw (show_pad,"%s",ctime ((time_t *) &type_data.u.t_ext2_inode.i_atime));
+ wmove (show_pad,4,40);wprintw (show_pad,"%s",ctime ((time_t *) &type_data.u.t_ext2_inode.i_ctime));
+ wmove (show_pad,5,40);wprintw (show_pad,"%s",ctime ((time_t *) &type_data.u.t_ext2_inode.i_mtime));
+ wmove (show_pad,6,40);wprintw (show_pad,"%s",ctime ((time_t *) &type_data.u.t_ext2_inode.i_dtime));
+
+ wmove (show_pad,10,40);
+ temp=inode_ptr->i_flags;
+
+ if (temp & EXT2_SECRM_FL)
+ wprintw (show_pad,"s");
+ else
+ wprintw (show_pad,"-");
+
+
+ if (temp & EXT2_UNRM_FL)
+ wprintw (show_pad,"u");
+ else
+ wprintw (show_pad,"-");
+
+ if (temp & EXT2_COMPR_FL)
+ wprintw (show_pad,"c");
+ else
+ wprintw (show_pad,"-");
+
+ if (temp & EXT2_SYNC_FL)
+ wprintw (show_pad,"S");
+ else
+ wprintw (show_pad,"-");
+
+ if (temp & EXT2_IMMUTABLE_FL)
+ wprintw (show_pad,"i");
+ else
+ wprintw (show_pad,"-");
+
+ if (temp & EXT2_APPEND_FL)
+ wprintw (show_pad,"a");
+ else
+ wprintw (show_pad,"-");
+
+ if (temp & EXT2_NODUMP_FL)
+ wprintw (show_pad,"d");
+ else
+ wprintw (show_pad,"-");
+
+ refresh_show_pad ();
+
+ wmove (show_win,1,0);
+
+ wprintw (show_win,"Inode %ld of %ld. Entry %ld of %ld in group descriptor %ld.\n"
+ ,inode_num,file_system_info.super_block.s_inodes_count,entry_num,last_entry,group_num);
+
+ wprintw (show_win,"Inode type: ");
+
+ if (inode_num < EXT2_GOOD_OLD_FIRST_INO) {
+ switch (inode_num) {
+ case EXT2_BAD_INO:
+ wprintw (show_win,"Bad blocks inode - ");
+ break;
+ case EXT2_ROOT_INO:
+ wprintw (show_win,"Root inode - ");
+ break;
+ case EXT4_USR_QUOTA_INO:
+ wprintw (show_win,"User quota inode - ");
+ break;
+ case EXT4_GRP_QUOTA_INO:
+ wprintw (show_win,"Group quota inode - ");
+ break;
+ case EXT2_BOOT_LOADER_INO:
+ wprintw (show_win,"Boot loader inode - ");
+ break;
+ case EXT2_UNDEL_DIR_INO:
+ wprintw (show_win,"Undelete directory inode - ");
+ break;
+ default:
+ wprintw (show_win,"Reserved inode - ");
+ break;
+ }
+ }
+ if (type_data.u.t_ext2_inode.i_mode==0)
+ wprintw (show_win,"Free. ");
+
+ if (S_ISREG (type_data.u.t_ext2_inode.i_mode))
+ wprintw (show_win,"File. ");
+
+ if (S_ISDIR (type_data.u.t_ext2_inode.i_mode))
+ wprintw (show_win,"Directory. ");
+
+ if (S_ISLNK (type_data.u.t_ext2_inode.i_mode)) {
+ wprintw (show_win,"Symbolic link. ");
+ wmove (show_pad,12,40);
+
+ if (inode_ptr->i_size <= 60)
+ wprintw (show_pad,"-> %s",(char *) &type_data.u.t_ext2_inode.i_block [0]);
+ else
+ wprintw (show_pad,"Slow symbolic link\n");
+ refresh_show_pad ();
+ }
+
+ if (S_ISCHR (type_data.u.t_ext2_inode.i_mode))
+ wprintw (show_win,"Character device.");
+
+ if (S_ISBLK (type_data.u.t_ext2_inode.i_mode))
+ wprintw (show_win,"Block device. ");
+
+ wprintw (show_win,"\n");refresh_show_win ();
+
+ if (entry_num==last_entry) {
+ wprintw (command_win,"Reached last inode in current group descriptor\n");
+ refresh_command_win ();
+ }
+
+ if (entry_num==first_entry) {
+ wprintw (command_win,"Reached first inode in current group descriptor\n");
+ refresh_command_win ();
+ }
+
+}
+
+void type_ext2_inode___entry (char *command_line)
+
+{
+ char *ptr,buffer [80];
+
+ long group_num,group_offset,entry_num,block_num,wanted_entry;
+ struct ext2_group_desc desc;
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) return;
+ ptr=parse_word (ptr,buffer);
+ wanted_entry=atol (buffer);
+
+ block_num=device_offset/file_system_info.block_size;
+
+ group_num=inode_offset_to_group_num (device_offset);
+ group_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+
+ low_read ((char *) &desc,sizeof (struct ext2_group_desc),group_offset);
+
+ entry_num=(device_offset-desc.bg_inode_table*file_system_info.block_size)/sizeof (struct ext2_inode);
+
+ if (wanted_entry > entry_num) {
+ sprintf (buffer,"next %ld",wanted_entry-entry_num);
+ dispatch (buffer);
+ }
+
+ else if (wanted_entry < entry_num) {
+ sprintf (buffer,"prev %ld",entry_num-wanted_entry);
+ dispatch (buffer);
+ }
+}
+
+void type_ext2_inode___group (char *command_line)
+
+{
+ char buffer [80];
+
+ long group_num,group_offset;
+
+ group_num=inode_offset_to_group_num (device_offset);
+ group_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+
+ sprintf (buffer,"setoffset %ld",group_offset);dispatch (buffer);
+ sprintf (buffer,"settype ext2_group_desc");dispatch (buffer);
+}
+
+void type_ext2_inode___file (char *command_line)
+
+{
+ char buffer [80];
+
+ if (!S_ISREG (type_data.u.t_ext2_inode.i_mode)) {
+ wprintw (command_win,"Error - Inode type is not file\n");refresh_command_win ();
+ return;
+ }
+
+ if (!init_file_info ()) {
+ wprintw (command_win,"Error - Unable to show file\n");refresh_command_win ();
+ return;
+ }
+
+ sprintf (buffer,"settype file");dispatch (buffer);
+}
+
+void type_ext2_inode___dir (char *command_line)
+
+{
+ char buffer [80];
+
+ if (!S_ISDIR (type_data.u.t_ext2_inode.i_mode)) {
+ wprintw (command_win,"Error - Inode type is not directory\n");refresh_command_win ();
+ return;
+ }
+
+/* It is very important to init first_file_info first, as search_dir_entries relies on it */
+
+ if (!init_dir_info (&first_file_info)) {
+ wprintw (command_win,"Error - Unable to show directory\n");refresh_command_win ();
+ return;
+ }
+
+ file_info=first_file_info;
+
+ sprintf (buffer,"settype dir");dispatch (buffer);
+}
+
+long inode_offset_to_group_num (long inode_offset)
+
+{
+ int found=0;
+ struct ext2_group_desc desc;
+
+ long block_num,group_offset,group_num;
+
+ block_num=inode_offset/file_system_info.block_size;
+
+ group_offset=file_system_info.first_group_desc_offset;
+ group_num=(group_offset-file_system_info.first_group_desc_offset)/sizeof (struct ext2_group_desc);
+
+ while (!found && group_num>=0 && group_num<file_system_info.groups_count) {
+ low_read ((char *) &desc,sizeof (struct ext2_group_desc),group_offset);
+ if (block_num>=desc.bg_inode_table && block_num<desc.bg_inode_table+file_system_info.blocks_per_group)
+ found=1;
+ else
+ group_offset+=sizeof (struct ext2_group_desc);
+ group_num=(group_offset-file_system_info.first_group_desc_offset)/sizeof (struct ext2_group_desc);
+ }
+
+ if (!found)
+ return (-1);
+
+ return (group_num);
+}
+
+
+
+long int inode_offset_to_inode_num (long inode_offset)
+
+{
+ long group_num,group_offset,entry_num,block_num,first_entry,last_entry,inode_num;
+ struct ext2_group_desc desc;
+
+ block_num=inode_offset/file_system_info.block_size;
+
+ group_num=inode_offset_to_group_num (inode_offset);
+ group_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+
+ low_read ((char *) &desc,sizeof (struct ext2_group_desc),group_offset);
+
+ entry_num=(inode_offset-desc.bg_inode_table*file_system_info.block_size)/sizeof (struct ext2_inode);
+ first_entry=0;last_entry=file_system_info.super_block.s_inodes_per_group-1;
+ inode_num=group_num*file_system_info.super_block.s_inodes_per_group+1;
+ inode_num+=entry_num;
+
+ return (inode_num);
+}
+
+long int inode_num_to_inode_offset (long inode_num)
+
+{
+ long group_num,group_offset,inode_offset,inode_entry;
+ struct ext2_group_desc desc;
+
+ inode_num--;
+
+ group_num=inode_num/file_system_info.super_block.s_inodes_per_group;
+ inode_entry=inode_num%file_system_info.super_block.s_inodes_per_group;
+ group_offset=file_system_info.first_group_desc_offset+group_num*sizeof (struct ext2_group_desc);
+ low_read ((char *) &desc,sizeof (struct ext2_group_desc),group_offset);
+
+ inode_offset=desc.bg_inode_table*file_system_info.block_size+inode_entry*sizeof (struct ext2_inode);
+
+ return (inode_offset);
+}
diff --git a/ext2ed/inodebitmap_com.c b/ext2ed/inodebitmap_com.c
new file mode 100644
index 0000000..157807a
--- /dev/null
+++ b/ext2ed/inodebitmap_com.c
@@ -0,0 +1,215 @@
+/*
+
+/usr/src/ext2ed/inodebitmap_com.c
+
+A part of the extended file system 2 disk editor.
+
+-------------------------
+Handles the inode bitmap.
+-------------------------
+
+Please refer to the documentation in blockbitmap_com.c - Those two files are almost equal.
+
+First written on: July 25 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ext2ed.h"
+
+
+void type_ext2_inode_bitmap___entry (char *command_line)
+
+{
+ unsigned long entry_num;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");refresh_command_win ();return;
+ }
+ ptr=parse_word (ptr,buffer);
+
+ entry_num=atol (buffer);
+
+ if (entry_num >= file_system_info.super_block.s_inodes_per_group) {
+ wprintw (command_win,"Error - Entry number out of bounds\n");refresh_command_win ();return;
+ }
+
+ inode_bitmap_info.entry_num=entry_num;
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+void type_ext2_inode_bitmap___next (char *command_line)
+
+{
+ long entry_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ entry_offset=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",inode_bitmap_info.entry_num+entry_offset);
+ dispatch (buffer);
+}
+
+void type_ext2_inode_bitmap___prev (char *command_line)
+
+{
+ long entry_offset=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ entry_offset=atol (buffer);
+ }
+
+ sprintf (buffer,"entry %ld",inode_bitmap_info.entry_num-entry_offset);
+ dispatch (buffer);
+}
+
+void type_ext2_inode_bitmap___allocate (char *command_line)
+
+{
+ long entry_num,num=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ num=atol (buffer);
+ }
+
+ entry_num=inode_bitmap_info.entry_num;
+ if (num > file_system_info.super_block.s_inodes_per_group-entry_num) {
+ wprintw (command_win,"Error - There aren't that much inodes in the group\n");
+ refresh_command_win ();return;
+ }
+
+ while (num) {
+ allocate_inode (entry_num);
+ num--;entry_num++;
+ }
+
+ dispatch ("show");
+}
+
+void type_ext2_inode_bitmap___deallocate (char *command_line)
+
+{
+ long entry_num,num=1;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr!=0) {
+ ptr=parse_word (ptr,buffer);
+ num=atol (buffer);
+ }
+
+ entry_num=inode_bitmap_info.entry_num;
+ if (num > file_system_info.super_block.s_inodes_per_group-entry_num) {
+ wprintw (command_win,"Error - There aren't that much inodes in the group\n");
+ refresh_command_win ();return;
+ }
+
+ while (num) {
+ deallocate_inode (entry_num);
+ num--;entry_num++;
+ }
+
+ dispatch ("show");
+}
+
+
+void allocate_inode (long entry_num)
+
+{
+ unsigned char bit_mask=1;
+ int byte_offset,j;
+
+ byte_offset=entry_num/8;
+ for (j=0;j<entry_num%8;j++)
+ bit_mask*=2;
+ type_data.u.buffer [byte_offset] |= bit_mask;
+}
+
+void deallocate_inode (long entry_num)
+
+{
+ unsigned char bit_mask=1;
+ int byte_offset,j;
+
+ byte_offset=entry_num/8;
+ for (j=0;j<entry_num%8;j++)
+ bit_mask*=2;
+ bit_mask^=0xff;
+
+ type_data.u.buffer [byte_offset] &= bit_mask;
+}
+
+void type_ext2_inode_bitmap___show (char *command_line)
+
+{
+ int i,j;
+ unsigned char *ptr;
+ unsigned long inode_num,entry_num;
+
+ ptr=type_data.u.buffer;
+ show_pad_info.line=0;show_pad_info.max_line=-1;
+
+ wmove (show_pad,0,0);
+ for (i=0,entry_num=0;i<file_system_info.super_block.s_inodes_per_group/8;i++,ptr++) {
+ for (j=1;j<=128;j*=2) {
+ if (entry_num==inode_bitmap_info.entry_num) {
+ wattrset (show_pad,A_REVERSE);
+ show_pad_info.line=show_pad_info.max_line-show_pad_info.display_lines/2;
+ }
+
+ if ((*ptr) & j)
+ wprintw (show_pad,"1");
+ else
+ wprintw (show_pad,"0");
+
+ if (entry_num==inode_bitmap_info.entry_num)
+ wattrset (show_pad,A_NORMAL);
+
+ entry_num++;
+ }
+ wprintw (show_pad," ");
+ if (i%8==7) {
+ wprintw (show_pad,"\n");
+ show_pad_info.max_line++;
+ }
+ }
+
+ if (i%8!=7) {
+ wprintw (show_pad,"\n");
+ show_pad_info.max_line++;
+ }
+
+ refresh_show_pad ();
+ show_info ();
+ wmove (show_win,1,0);wprintw (show_win,"Inode bitmap of block group %ld\n",inode_bitmap_info.group_num);
+
+ inode_num=1+inode_bitmap_info.entry_num+inode_bitmap_info.group_num*file_system_info.super_block.s_inodes_per_group;
+ wprintw (show_win,"Status of inode %ld - ",inode_num);
+ ptr=type_data.u.buffer+inode_bitmap_info.entry_num/8;
+ j=1;
+ for (i=inode_bitmap_info.entry_num % 8;i>0;i--)
+ j*=2;
+ if ((*ptr) & j)
+ wprintw (show_win,"Allocated\n");
+ else
+ wprintw (show_win,"Free\n");
+ refresh_show_win ();
+}
diff --git a/ext2ed/main.c b/ext2ed/main.c
new file mode 100644
index 0000000..9d33a8e
--- /dev/null
+++ b/ext2ed/main.c
@@ -0,0 +1,548 @@
+/*
+
+/usr/src/ext2ed/main.c
+
+A part of the extended file system 2 disk editor.
+
+------------
+Main program
+------------
+
+This file mostly contains:
+
+1. A list of global variables used through the entire program.
+2. The parser, which asks the command line from the user.
+3. The dispatcher, which analyzes the command line and calls the appropriate handler function.
+4. A command pattern matcher which is used along with the readline completion feature.
+5. A function which tells the user that an internal error has occurred.
+
+First written on: March 30 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+
+#ifdef HAVE_READLINE
+#include <readline.h>
+#include <history.h>
+#endif
+
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "ext2ed.h"
+
+/* Global variables */
+
+/*
+
+Configuration file options
+
+The following variables will be set by init.c to the values selected in the user configuration file.
+They are initialized below to some logical defaults.
+
+*/
+
+
+char Ext2Descriptors [200]="ext2.descriptors"; /* The location of the ext2 filesystem object definition */
+char AlternateDescriptors [200]=""; /* We allow the user to define additional structures */
+char LogFile [200]="ext2ed.log"; /* The location of the log file - Each write will be logged there */
+int LogChanges=1; /* 1 enables logging, 0 disables logging */
+int AllowChanges=0; /* When set, the enablewrite command will fail */
+int AllowMountedRead=0; /* Behavior when trying to open a mounted filesystem read-only */
+int ForceExt2=0; /* When set, ext2 autodetection is overridden */
+int DefaultBlockSize=1024;
+unsigned long DefaultTotalBlocks=2097151;
+unsigned long DefaultBlocksInGroup=8192; /* The default values are used when an ext2 filesystem is not */
+int ForceDefault=0; /* detected, or ForceDefault is set */
+
+char last_command_line [80]; /* A simple one command cache, in addition to the readline history */
+
+char device_name [80]; /* The location of the filesystem */
+FILE *device_handle=NULL; /* This is passed to the fopen / fread ... commands */
+long device_offset; /* The current position in the filesystem */
+ /* Note that we have a 2 GB limitation */
+
+int mounted=0; /* This is set when we find that the filesystem is mounted */
+
+struct struct_commands general_commands,ext2_commands; /* Used to define the general and ext2 commands */
+struct struct_descriptor *first_type,*last_type,*current_type; /* Used to access the double linked list */
+struct struct_type_data type_data; /* The current data is sometimes stored here */
+struct struct_file_system_info file_system_info; /* Essential information on the filesystem */
+struct struct_file_info file_info,first_file_info; /* Used by file_com.c to access files */
+struct struct_group_info group_info; /* Used by group_com.c */
+struct struct_super_info super_info; /* Used by super_com.c */
+struct struct_remember_lifo remember_lifo; /* A circular memory of objects */
+struct struct_block_bitmap_info block_bitmap_info; /* Used by blockbitmap_com.c */
+struct struct_inode_bitmap_info inode_bitmap_info; /* Used by inodebitmap_com.c */
+
+int redraw_request=0; /* Is set by a signal handler to handle terminal */
+ /* screen size change. */
+
+
+/*
+ * We just call the parser to get commands from the user. We quit when
+ * parser returns.
+ */
+int main (int argc, char **argv)
+{
+ int write_priv = 0;
+ int c;
+ char *buf;
+
+ if (!init ())
+ return (1);
+ while ((c = getopt (argc, argv, "w")) != EOF) {
+ switch (c) {
+ case 'w':
+ write_priv++;
+ break;
+ }
+ }
+ if (optind < argc) {
+ buf = malloc(strlen(argv[optind]) + 32);
+ if (!buf) {
+ fprintf(stderr, "Couldn't allocate filename buffer\n");
+ exit(1);
+ }
+ strcpy(buf, "set_device ");
+ strcat(buf, argv[optind]);
+ set_device(buf);
+ free(buf);
+ if (write_priv) {
+ wprintw (command_win,"\n");
+ enable_write("enable_write");
+ }
+ }
+ parser (); /* Get and parse user commands */
+ prepare_to_close(); /* Do some cleanup */
+ printf("Quitting ...\n");
+ return(0);
+}
+
+
+/*
+ * Read a character from the command window
+ */
+int command_read_key()
+{
+ int key = 0;
+
+ while (!key) {
+ if (redraw_request) {
+ redraw_all();
+ redraw_request=0;
+ }
+ key = wgetch(command_win);
+ switch (key) {
+ case 0x1A:
+ key = 0;
+ kill(getpid(), SIGTSTP);
+ break;
+
+ case KEY_NPAGE:
+ pgdn("");
+ refresh_command_win ();
+ break;
+
+ case KEY_PPAGE:
+ pgup("");
+ refresh_command_win ();
+ break;
+ case ERR:
+ key = 0;
+ break;
+
+ case KEY_BACKSPACE:
+ key = '\b';
+ }
+ if ((key < 32 && key != '\b' && key != '\n') ||
+ (key > 127))
+ key = 0;
+ }
+ return key;
+}
+
+#ifdef HAVE_READLINE
+int rl_getc_replacement(FILE *f)
+{
+ int key = command_read_key();
+
+ if (key == '\b') {
+ if (rl_point > 0)
+ wprintw(command_win, "\b \b");
+ } else
+ wprintw(command_win, "%c", key);
+ return key;
+}
+
+/*
+ * This function asks the user for a command and calls the dispatcher
+ * function, dispatch, to analyze it. We use the readline library
+ * function readline to read the command, hence all the usual readline
+ * keys are available. The new command is saved both in the
+ * readline's history and in our tiny one-command cache, so that only
+ * the enter key is needed to retype it.
+ */
+void parser (void)
+{
+ char *ptr,command_line [80];
+ int quit=0;
+
+#if 0
+ noecho();
+ cbreak();
+ keypad(command_win, 1);
+ wtimeout(command_win, 100);
+
+ rl_getc_function = rl_getc_replacement;
+#endif
+
+ while (!quit) {
+ /* Terminal screen size has changed */
+ if (redraw_request) {
+ redraw_all();
+ redraw_request=0;
+ }
+
+ wmove (command_win,0,0);
+ wclrtoeol (command_win);
+ wprintw (command_win,"ext2ed > ");
+ refresh_command_win ();
+
+ /*
+ * The ncurses library optimizes cursor movement by
+ * keeping track of the cursor position. However, by
+ * using the readline library I'm breaking its
+ * assumptions. The double -1 arguments tell ncurses
+ * to disable cursor movement optimization this
+ * time.
+ */
+ mvcur (-1,-1,LINES-COMMAND_WIN_LINES,0);
+
+ /* echo (); */
+ ptr=readline ("ext2ed > ");
+ /* noecho (); */
+
+ /*
+ * Readline allocated the buffer - Copy the string
+ * and free the allocated buffer
+ * XXX WHY???
+ */
+ strcpy (command_line,ptr);
+ free (ptr);
+
+ if (*command_line != 0)
+ add_history (command_line);
+
+ /* If only enter was pressed, recall the last command */
+ if (*command_line==0)
+ strcpy (command_line,last_command_line);
+
+ /* Emulate readline's actions for ncurses */
+ mvcur (-1,-1,LINES-COMMAND_WIN_LINES,0);
+ werase (command_win);
+ wprintw (command_win,"ext2ed > ");
+ wprintw (command_win,command_line);
+ wprintw (command_win,"\n");
+ refresh_command_win ();
+
+ /* Save this command in our tiny cache */
+ strcpy (last_command_line,command_line);
+
+ /* And call dispatch to do the actual job */
+ quit=dispatch (command_line);
+ }
+}
+#else
+void read_line(char * foo) {
+ char * chptr = foo;
+ int ch;
+ int done = 0;
+
+ while (!done && (ch = command_read_key())) {
+ switch (ch) {
+ case '\n':
+ done = 1;
+ break;
+
+ case '\b':
+ if (chptr > foo) {
+ wprintw(command_win, "\b \b");
+ chptr--;
+ }
+ break;
+
+ default:
+ if (ch > 256)
+ break;
+ if (ch == '\n') break;
+ *chptr++ = ch;
+ wprintw(command_win, "%c", ch);
+ break;
+ }
+ }
+ *chptr = '\0';
+}
+
+void parser (void)
+{
+ char command_line [80];
+ int quit=0;
+
+ noecho();
+ cbreak();
+ wtimeout(command_win, 100);
+ keypad(command_win, 1);
+
+ while (!quit) {
+ /* Terminal screen size has changed */
+ if (redraw_request) {
+ redraw_all();
+ redraw_request=0;
+ }
+
+ wmove (command_win,0,0);wclrtoeol (command_win);
+
+ wmove(command_win, 0, 0);
+ wprintw(command_win, "ext2ed > ");
+ read_line(command_line);
+
+ /* If only enter was pressed, recall the last command */
+ if (*command_line==0)
+ strcpy (command_line,last_command_line);
+
+ mvcur (-1,-1,LINES-COMMAND_WIN_LINES + 1,0);
+
+ strcpy (last_command_line,command_line); /* Save this command in our tiny cache */
+
+ /* And call dispatch to do the actual job */
+ quit=dispatch (command_line);
+ }
+}
+#endif
+
+
+/*
+ * This is a very important function. Its task is to receive a command
+ * name and link it to a C function. There are three types of commands:
+ *
+ * 1. General commands - Always available and accessed through
+ * general_commands.
+ * 2. Ext2 specific commands - Available when editing an ext2
+ * filesystem, accessed through ext2_commands.
+ * 3. Type specific commands - Those are changing according to the
+ * current type. The global variable current_type points to the
+ * current object definition (of type struct_descriptor). In it, the
+ * struct_commands entry contains the type specific commands links.
+ *
+ * Overriding is an important feature - Much like in C++ : The same
+ * command name can dispatch to different functions. The overriding
+ * priority is 3,2,1; That is - A type specific command will always
+ * override a general command. This is used through the program to
+ * allow fine tuned operation.
+ *
+ * When an handling function is found, it is called along with the
+ * command line that was passed to us. The handling function is then
+ * free to interpret the arguments in its own style.
+ */
+int dispatch (char *command_line)
+{
+ int i,found=0;
+
+ char command [80];
+
+ parse_word (command_line,command);
+
+ if (strcasecmp (command,"quit")==0) return (1);
+
+ /* 1. Search for type specific commands FIRST - Allows
+ overriding of a general command */
+
+ if (current_type != NULL)
+ for (i=0;
+ i<=current_type->type_commands.last_command && !found;
+ i++) {
+ if (strcasecmp (command,current_type->type_commands.names [i])==0) {
+ (*current_type->type_commands.callback [i]) (command_line);
+ found=1;
+ }
+ }
+
+ /* 2. Now search for ext2 filesystem general commands */
+
+ if (!found)
+ for (i=0;i<=ext2_commands.last_command && !found;i++) {
+ if (strcasecmp (command,ext2_commands.names [i])==0) {
+ (*ext2_commands.callback [i]) (command_line);
+ found=1;
+ }
+ }
+
+
+ /* 3. If not found, search the general commands */
+
+ if (!found)
+ for (i=0;i<=general_commands.last_command && !found;i++) {
+ if (strcasecmp (command,general_commands.names [i])==0) {
+ (*general_commands.callback [i]) (command_line);
+ found=1;
+ }
+ }
+
+ /* 4. If not found, issue an error message and return */
+
+ if (!found) {
+ wprintw (command_win,"Error: Unknown command\n");
+ refresh_command_win ();
+ }
+
+ return (0);
+}
+
+
+/*
+ *
+ * This function copies the next word in source to the variable dest,
+ * ignoring whitespaces. It returns a pointer to the next word in
+ * source. It is used to split the command line into command and arguments.
+ */
+char *parse_word (char *source,char *dest)
+{
+ char ch,*source_ptr,*target_ptr;
+
+ if (*source==0) {
+ *dest=0;
+ return (source);
+ };
+
+ source_ptr=source;target_ptr=dest;
+ do {
+ ch=*source_ptr++;
+ } while (! (ch>' ' && ch<='z') && ch!=0);
+
+ while (ch>' ' && ch<='z') {
+ *target_ptr++=ch;
+ ch=*source_ptr++;
+ }
+
+ *target_ptr=0;
+
+ source_ptr--;
+ do {
+ ch=*source_ptr++;
+ } while (! (ch>' ' && ch<='z') && ch!=0);
+
+ return (--source_ptr);
+}
+
+/*
+ * text is the partial command entered by the user; We assume that it
+ * is a part of a command - I didn't write code for smarter completion.
+ *
+ * The state variable is an index which tells us how many possible
+ * completions we already returned to readline.
+ *
+ * We return only one possible completion or (char *) NULL if there
+ * are no more completions. This function will be called by readline
+ * over and over until we tell it to stop.
+ *
+ * While scanning for possible completions, we use the same priority
+ * definition which was used in dispatch.
+ */
+#if HAVE_READLINE
+char *complete_command (char *text,int state)
+{
+ int state_index=-1;
+ int i,len;
+
+ len=strlen (text);
+
+ /* Is the command type specific ? */
+
+ if (current_type != NULL)
+ for (i=0;i<=current_type->type_commands.last_command;i++) {
+ if (strncmp (current_type->type_commands.names [i],text,len)==0) {
+ state_index++;
+ if (state==state_index) {
+ return (dupstr (current_type->type_commands.names [i]));
+ }
+ }
+ }
+
+ /* No, perhaps ext2 specific command then ? */
+
+ for (i=0;i<=ext2_commands.last_command;i++) {
+ if (strncmp (ext2_commands.names [i],text,len)==0) {
+ state_index++;
+ if (state==state_index)
+ return (dupstr (ext2_commands.names [i]));
+ }
+ }
+
+
+ /* Check for a general command */
+
+ for (i=0;i<=general_commands.last_command;i++) {
+ if (strncmp (general_commands.names [i],text,len)==0) {
+ state_index++;
+ if (state==state_index)
+ return (dupstr (general_commands.names [i]));
+ }
+ }
+
+ /* quit is handled differently */
+
+ if (strncmp ("quit",text,len)==0) {
+ state_index++;
+ if (state==state_index)
+ return (dupstr ("quit"));
+ }
+
+ /* No more completions */
+
+ return ((char *) NULL);
+}
+#endif
+
+
+/*
+ * Nothing special - Just allocates enough space and copy the string.
+ */
+char *dupstr (char *src)
+{
+ char *ptr;
+
+ ptr=(char *) malloc (strlen (src)+1);
+ if (!ptr)
+ return NULL;
+ strcpy (ptr,src);
+ return (ptr);
+}
+
+#ifdef DEBUG
+/*
+ * This function reports an internal error. It is almost not used. One
+ * place in which I do check for internal errors is disk.c.
+ *
+ * We just report the error, and try to continue ...
+ */
+void internal_error (char *description,char *source_name,char *function_name)
+{
+ wprintw (command_win,"Internal error - Found by source: %s.c , function: %s\n",source_name,function_name);
+ wprintw (command_win,"\t%s\n",description);
+ wprintw (command_win,"Press enter to (hopefully) continue\n");
+ refresh_command_win ();getch ();werase (command_win);
+}
+
+#endif
diff --git a/ext2ed/super_com.c b/ext2ed/super_com.c
new file mode 100644
index 0000000..a998970
--- /dev/null
+++ b/ext2ed/super_com.c
@@ -0,0 +1,156 @@
+/*
+
+/usr/src/ext2ed/super_com.c
+
+A part of the extended file system 2 disk editor.
+
+----------------------
+Handles the superblock
+----------------------
+
+First written on: April 9 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "ext2ed.h"
+
+void type_ext2_super_block___show (char *command_line)
+
+{
+ struct ext2_super_block *super;
+ super=&type_data.u.t_ext2_super_block;
+
+ show (command_line);
+
+ if (ext2fs_blocks_count(super) != 0) {
+ wmove (show_pad,2,40);wprintw (show_pad,"%2.2f%%",100*(float) ext2fs_r_blocks_count(super)/ (float) ext2fs_blocks_count(super));
+ wmove (show_pad,3,40);wprintw (show_pad,"%2.2f%%",100*(float) ext2fs_free_blocks_count(super)/ (float) ext2fs_blocks_count(super));
+ }
+
+ if (super->s_inodes_count != 0) {
+ wmove (show_pad,4,40);wprintw (show_pad,"%2.2f%%",100*(float) super->s_free_inodes_count/ (float) super->s_inodes_count);
+ }
+
+ wmove (show_pad,6,40);
+ switch (super->s_log_block_size) {
+ case 0: wprintw (show_pad,"1024 bytes");break;
+ case 1: wprintw (show_pad,"2048 bytes");break;
+ case 2: wprintw (show_pad,"4096 bytes");break;
+ }
+ wmove (show_pad,11,40);wprintw (show_pad,"%s",ctime ((time_t *) &type_data.u.t_ext2_super_block.s_mtime));
+ wmove (show_pad,12,40);wprintw (show_pad,"%s",ctime ((time_t *) &type_data.u.t_ext2_super_block.s_wtime));
+ wmove (show_pad,19,40);wprintw (show_pad,"%s",ctime ((time_t *) &type_data.u.t_ext2_super_block.s_lastcheck));
+ wmove (show_pad,15,40);
+
+ switch (type_data.u.t_ext2_super_block.s_magic) {
+ case EXT2_SUPER_MAGIC:
+ wprintw (show_pad,"ext2 >= 0.2B");
+ break;
+ case EXT2_PRE_02B_MAGIC:
+ wprintw (show_pad,"ext2 < 0.2B (not supported)");
+ break;
+ default:
+ wprintw (show_pad,"Unknown");
+ break;
+ }
+
+ wmove (show_pad,16,40);
+ if (type_data.u.t_ext2_super_block.s_state & 0x1)
+ wprintw (show_pad,"clean ");
+ else
+ wprintw (show_pad,"not clean ");
+
+ if (type_data.u.t_ext2_super_block.s_state & 0x2)
+ wprintw (show_pad,"with errors ");
+ else
+ wprintw (show_pad,"with no errors");
+
+ wmove (show_pad,17,40);
+
+ switch (type_data.u.t_ext2_super_block.s_errors) {
+ case EXT2_ERRORS_CONTINUE:
+ wprintw (show_pad,"Continue");
+ break;
+ case EXT2_ERRORS_RO:
+ wprintw (show_pad,"Remount read only");
+ break;
+ case EXT2_ERRORS_PANIC:
+ wprintw (show_pad,"Issue kernel panic");
+ break;
+ default:
+ wprintw (show_pad,"Unknown");
+ break;
+ }
+
+ wmove (show_pad,21,40);
+
+ switch (type_data.u.t_ext2_super_block.s_creator_os) {
+
+ case EXT2_OS_LINUX:
+ wprintw (show_pad,"Linux :-)");
+ break;
+
+ case EXT2_OS_HURD:
+ wprintw (show_pad,"Hurd");
+ break;
+
+ default:
+ wprintw (show_pad,"Unknown");
+ break;
+ }
+
+ refresh_show_pad ();
+
+ wmove (show_win,1,0);wprintw (show_win,"\n");wmove (show_win,2,0);
+ wprintw (show_win,"Superblock copy %ld ",super_info.copy_num);
+ if (super_info.copy_num==0)
+ wprintw (show_win,"(main copy)");
+ wprintw (show_win,"\n");
+ refresh_show_win ();
+}
+
+void type_ext2_super_block___gocopy (char *command_line)
+
+{
+ unsigned long copy_num,offset;
+ char *ptr,buffer [80];
+
+ ptr=parse_word (command_line,buffer);
+ if (*ptr==0) {
+ wprintw (command_win,"Error - No argument specified\n");refresh_command_win ();return;
+ }
+ ptr=parse_word (ptr,buffer);
+
+ copy_num=atol (buffer);
+
+ offset=file_system_info.super_block_offset+copy_num*file_system_info.no_blocks_in_group*file_system_info.block_size;
+
+ if (offset > file_system_info.file_system_size) {
+ wprintw (command_win,"Error - Copy number out of bounds\n");refresh_command_win ();return;
+ }
+
+ super_info.copy_num=copy_num;
+ device_offset=offset;
+
+ sprintf (buffer,"setoffset %ld",device_offset);dispatch (buffer);
+ strcpy (buffer,"show");dispatch (buffer);
+}
+
+void type_ext2_super_block___setactivecopy (char *command_line)
+
+{
+ struct ext2_super_block sb;
+
+ sb=type_data.u.t_ext2_super_block;
+ dispatch ("gocopy 0");
+ type_data.u.t_ext2_super_block=sb;
+ dispatch ("show");
+}
diff --git a/ext2ed/win.c b/ext2ed/win.c
new file mode 100644
index 0000000..23d0da1
--- /dev/null
+++ b/ext2ed/win.c
@@ -0,0 +1,232 @@
+/*
+
+/usr/src/ext2ed/win.c
+
+A part of the extended file system 2 disk editor.
+
+--------------------------------------------------------
+Window management - Interfacing with the ncurses library
+--------------------------------------------------------
+
+First written on: April 17 1995
+Modified on : April 05 2001 Christian.Bac@int-evry.fr
+it looks like readline does not like that initscr decides to set the tty to
+noecho.
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+
+#include "ext2ed.h"
+#include "../version.h"
+
+struct struct_pad_info show_pad_info;
+WINDOW *title_win,*show_win,*command_win,*mt_win1,*mt_win2,*show_pad;
+
+/* to remember configuration after initscr
+ * and modify it
+ */
+struct termios termioInit, termioCurrent;
+
+void draw_title_win (void)
+{
+ char title_string [128];
+
+ werase(title_win);
+ box (title_win,0,0);
+ sprintf (title_string,"EXT2ED - Extended-2 File System editor ver %s (%s)", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ wmove (title_win,TITLE_WIN_LINES/2,(COLS-strlen (title_string))/2);
+ wprintw (title_win,title_string);
+ wrefresh(title_win);
+}
+
+void setup_show_win(void)
+{
+ wbkgdset (show_win,A_REVERSE);werase (show_win);
+ show_pad_info.line=0;
+ show_pad_info.col=0;
+ show_pad_info.display_lines=LINES-TITLE_WIN_LINES-SHOW_WIN_LINES-COMMAND_WIN_LINES-2;
+ show_pad_info.display_cols=COLS;
+ show_pad_info.max_line=show_pad_info.display_lines-1;show_pad_info.max_col=show_pad_info.display_cols-1;
+ show_pad_info.disable_output=0;
+}
+
+void init_windows (void)
+{
+ initscr ();
+ tcgetattr(0,&termioInit); /* save initial config */
+ termioCurrent = termioInit;
+ termioCurrent.c_lflag |= ECHO; /* set echo on */
+ tcsetattr(0,TCSANOW,&termioCurrent);
+
+ if (LINES<TITLE_WIN_LINES+SHOW_WIN_LINES+COMMAND_WIN_LINES+3) {
+ printf ("Sorry, your terminal screen is too small\n");
+ printf ("Error - Can not initialize windows\n");
+ exit (1);
+ }
+
+ title_win=newwin (TITLE_WIN_LINES,COLS,0,0);
+ show_win=newwin (SHOW_WIN_LINES,COLS,TITLE_WIN_LINES,0);
+ show_pad=newpad (SHOW_PAD_LINES,SHOW_PAD_COLS);
+ mt_win1=newwin (1,COLS,TITLE_WIN_LINES+SHOW_WIN_LINES,0);
+ mt_win2=newwin (1,COLS,LINES-COMMAND_WIN_LINES-1,0);
+ command_win=newwin (COMMAND_WIN_LINES,COLS,LINES-COMMAND_WIN_LINES,0);
+
+ if (title_win==NULL || show_win==NULL || show_pad==NULL || command_win==NULL) {
+ printf ("Error - Not enough memory - Can not initialize windows\n");exit (1);
+ }
+
+ draw_title_win();
+
+ setup_show_win();
+
+ scrollok (command_win,TRUE);
+
+ refresh_title_win ();
+ refresh_show_win ();
+ refresh_show_pad();
+ refresh_command_win ();
+ wrefresh(mt_win1);
+ wrefresh(mt_win2);
+}
+
+void refresh_title_win (void)
+{
+ wrefresh (title_win);
+}
+
+void refresh_show_win (void)
+{
+ int current_page,total_pages;
+
+ current_page=show_pad_info.line/show_pad_info.display_lines+1;
+ if (show_pad_info.line%show_pad_info.display_lines)
+ current_page++;
+ total_pages=show_pad_info.max_line/show_pad_info.display_lines+1;
+
+ wmove (show_win,2,COLS-18);
+ wprintw (show_win,"Page %d of %d\n",current_page,total_pages);
+
+ wmove (show_win,2,COLS-18);
+ wrefresh (show_win);
+}
+
+
+void refresh_show_pad (void)
+
+{
+ int left,top,right,bottom,i;
+
+ if (show_pad_info.disable_output)
+ return;
+
+ if (show_pad_info.max_line < show_pad_info.display_lines-1) {
+ for (i=show_pad_info.max_line+1;i<show_pad_info.display_lines;i++) {
+ wmove (show_pad,i,0);wprintw (show_pad,"\n");
+ }
+ }
+ left=0;right=show_pad_info.display_cols-1;
+ top=TITLE_WIN_LINES+SHOW_WIN_LINES+1;bottom=top+show_pad_info.display_lines-1;
+
+ if (show_pad_info.line > show_pad_info.max_line-show_pad_info.display_lines+1)
+ show_pad_info.line=show_pad_info.max_line-show_pad_info.display_lines+1;
+
+ if (show_pad_info.line < 0)
+ show_pad_info.line=0;
+
+#ifdef OLD_NCURSES
+ prefresh (show_pad,show_pad_info.line,show_pad_info.col,top,left,show_pad_info.display_lines-1,show_pad_info.display_cols-1);
+#else
+ prefresh (show_pad,show_pad_info.line,show_pad_info.col,top,left,top+show_pad_info.display_lines-1,left+show_pad_info.display_cols-1);
+#endif
+}
+
+void refresh_command_win (void)
+{
+ wrefresh (command_win);
+}
+
+void close_windows (void)
+{
+// echo ();
+ tcsetattr(0,TCSANOW,&termioInit);
+
+ delwin (title_win);
+ delwin (command_win);
+ delwin (show_win);
+ delwin (show_pad);
+
+ endwin ();
+}
+
+void show_info (void)
+{
+ int block_num,block_offset;
+
+ block_num=device_offset/file_system_info.block_size;
+ block_offset=device_offset%file_system_info.block_size;
+
+ wmove (show_win,0,0);
+ wprintw (show_win,"Offset %-3ld in block %ld. ",block_offset,block_num);
+ if (current_type != NULL)
+ wprintw (show_win,"Type: %s\n",current_type->name);
+ else
+ wprintw (show_win,"Type: %s\n","none");
+
+ refresh_show_win ();
+}
+
+
+void redraw_all (void)
+{
+ int min_lines = TITLE_WIN_LINES+SHOW_WIN_LINES+COMMAND_WIN_LINES+3;
+ struct winsize ws;
+ int save_col, save_lines;
+
+ /* get the size of the terminal connected to stdout */
+ ioctl(1, TIOCGWINSZ, &ws);
+ /*
+ * Do it again because GDB doesn't stop before the first ioctl
+ * call, we want an up-to-date size when we're
+ * single-stepping.
+ */
+ if (ioctl(1, TIOCGWINSZ, &ws) == 0) {
+ if (ws.ws_row < min_lines)
+ ws.ws_row = min_lines;
+ if ((ws.ws_row != LINES) || (ws.ws_col != COLS)) {
+ wmove (show_win,2,COLS-18);
+ wclrtoeol(show_win);
+ wrefresh(show_win);
+ resizeterm(ws.ws_row, ws.ws_col);
+ wresize(title_win, TITLE_WIN_LINES,COLS);
+ wresize(show_win, SHOW_WIN_LINES,COLS);
+ wresize(command_win, COMMAND_WIN_LINES,COLS);
+ wresize(mt_win1, 1,COLS);
+ wresize(mt_win2, 1,COLS);
+ mvwin(mt_win2, LINES-COMMAND_WIN_LINES-1,0);
+ mvwin(command_win, LINES-COMMAND_WIN_LINES,0);
+ draw_title_win();
+ show_pad_info.display_lines=LINES-TITLE_WIN_LINES-SHOW_WIN_LINES-COMMAND_WIN_LINES-2;
+ show_pad_info.display_cols=COLS;
+ }
+ }
+ clearok(title_win, 1);
+ clearok(show_win, 1);
+ clearok(command_win, 1);
+ clearok(mt_win1, 1);
+ clearok(mt_win2, 1);
+ wrefresh(mt_win1);
+ wrefresh(mt_win2);
+ refresh_show_pad();
+ refresh_show_win();
+ refresh_title_win ();
+ refresh_command_win ();
+}
diff --git a/include/mingw/arpa/inet.h b/include/mingw/arpa/inet.h
new file mode 100644
index 0000000..55dfa36
--- /dev/null
+++ b/include/mingw/arpa/inet.h
@@ -0,0 +1,5 @@
+#pragma once
+
+/* Windows is always little endian. */
+#define htonl __builtin_bswap32
+#define ntohl __builtin_bswap32
diff --git a/include/mingw/grp.h b/include/mingw/grp.h
new file mode 100644
index 0000000..67f62d9
--- /dev/null
+++ b/include/mingw/grp.h
@@ -0,0 +1,16 @@
+
+#pragma once
+
+#include <sys/types.h>
+
+__inline struct group * getgrnam(char* g){return 0;}
+
+struct group
+ {
+ char *gr_name;
+ char *gr_passwd;
+ __gid_t gr_gid;
+ char **gr_mem;
+ };
+
+#define getgrgid(i) NULL
diff --git a/include/mingw/linux/types.h b/include/mingw/linux/types.h
new file mode 100644
index 0000000..9631456
--- /dev/null
+++ b/include/mingw/linux/types.h
@@ -0,0 +1,30 @@
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
+
+//#ifndef _MSC_VER
+//#error _MSC_VER not defined
+//#endif
+
+#include <sys/types.h>
+
+typedef unsigned __int8 __u8;
+typedef signed __int8 __s8;
+
+typedef signed __int16 __s16;
+typedef unsigned __int16 __u16;
+
+typedef signed __int32 __s32;
+typedef unsigned __int32 __u32;
+
+typedef signed __int64 __s64;
+typedef unsigned __int64 __u64;
+
+
+//typedef __u32 ino_t;
+typedef __u32 dev_t;
+typedef __u32 uid_t;
+typedef __u32 gid_t;
+
+#include <stdint.h>
+
+#endif /* LINUX_TYPES_H */
diff --git a/include/mingw/pwd.h b/include/mingw/pwd.h
new file mode 100644
index 0000000..d048842
--- /dev/null
+++ b/include/mingw/pwd.h
@@ -0,0 +1,20 @@
+
+#pragma once
+
+#include <sys/types.h>
+
+__inline struct passwd* getpwnam (char* g){return 0;}
+
+struct passwd
+{
+ char *pw_name;
+ char *pw_passwd;
+ __uid_t pw_uid;
+ __gid_t pw_gid;
+ char *pw_gecos;
+ char *pw_dir;
+ char *pw_shell;
+};
+
+#define getpwuid(i) NULL
+
diff --git a/include/mingw/sys/stat.h b/include/mingw/sys/stat.h
new file mode 100644
index 0000000..0ca1d1b
--- /dev/null
+++ b/include/mingw/sys/stat.h
@@ -0,0 +1,20 @@
+
+#pragma once
+
+#if HAVE_SYS_STAT_H
+#include_next <sys/stat.h>
+#endif
+
+#ifndef lstat
+#define lstat stat
+#endif
+
+#ifndef S_ISLNK
+#ifdef __S_IFLNK
+#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
+#else
+#define S_ISLNK(mode) 0
+#endif
+#endif
+
+#define link(a, b) CreateHardLink((a), (b), NULL)
diff --git a/include/mingw/sys/sysmacros.h b/include/mingw/sys/sysmacros.h
new file mode 100644
index 0000000..a790cb2
--- /dev/null
+++ b/include/mingw/sys/sysmacros.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#ifndef makedev
+#define makedev(maj, min) (((maj) << 8) + (min))
+#endif
diff --git a/include/mingw/sys/types.h b/include/mingw/sys/types.h
new file mode 100644
index 0000000..9d048fc
--- /dev/null
+++ b/include/mingw/sys/types.h
@@ -0,0 +1,9 @@
+
+#pragma once
+
+#include_next <sys/types.h>
+
+#include <linux/types.h>
+
+typedef unsigned short __uid_t;
+typedef unsigned short __gid_t;
diff --git a/include/mingw/unistd.h b/include/mingw/unistd.h
new file mode 100644
index 0000000..b201858
--- /dev/null
+++ b/include/mingw/unistd.h
@@ -0,0 +1,54 @@
+#pragma once
+
+// Copyright transferred from Raider Solutions, Inc to
+// Kern Sibbald and John Walker by express permission.
+//
+// Copyright (C) 2004-2006 Kern Sibbald
+// Copyright (C) 2014 Adam Kropelin
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+#ifndef __COMPAT_UNISTD_H_
+#define __COMPAT_UNISTD_H_
+
+#include_next <unistd.h>
+
+#define _PC_PATH_MAX 1
+#define _PC_NAME_MAX 2
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+long pathconf(const char *, int);
+#define getpid _getpid
+#define getppid() 0
+
+unsigned int sleep(unsigned int seconds);
+
+#define getuid() 0
+#define getgid() 0
+#define geteuid() 1
+#define getegid() 0
+
+// no-oped sync
+__inline void sync(void){};
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __COMPAT_UNISTD_H_ */ \ No newline at end of file
diff --git a/include/nonunix/asm/types.h b/include/nonunix/asm/types.h
new file mode 100644
index 0000000..ad1c889
--- /dev/null
+++ b/include/nonunix/asm/types.h
@@ -0,0 +1 @@
+#include "../linux/types.h"
diff --git a/include/nonunix/config.h b/include/nonunix/config.h
new file mode 100644
index 0000000..e269d20
--- /dev/null
+++ b/include/nonunix/config.h
@@ -0,0 +1,21 @@
+
+#define _INO_T_DEFINED 1
+
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_GETOPT_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_SETJMP_H 1
+
+#define HAVE_STRCASECMP 1
+#define strcasecmp _stricmp
+#define strncasecmp _strnicmp
+
+#define HAVE_CONIO_H 1
+
+#define HAVE_EXT2_INODE_VERSION 1
+
+#define inline __forceinline
+
+#define _CTYPE_DISABLE_MACROS
+
diff --git a/include/nonunix/dirent.h b/include/nonunix/dirent.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/dirent.h
diff --git a/include/nonunix/getopt.h b/include/nonunix/getopt.h
new file mode 100644
index 0000000..88b62fd
--- /dev/null
+++ b/include/nonunix/getopt.h
@@ -0,0 +1,135 @@
+/* Declarations for getopt.
+ Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GETOPT_VARIABLE
+#define GETOPT_VARIABLE
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern GETOPT_VARIABLE char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern GETOPT_VARIABLE int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern GETOPT_VARIABLE int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern GETOPT_VARIABLE int optopt;
+
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+#if defined (__STDC__) && __STDC__
+ const char *name;
+#else
+ char *name;
+#endif
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+#if defined (__STDC__) && __STDC__
+#ifdef __GNU_LIBRARY__
+/* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+#endif /* __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+ const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind);
+
+/* Internal only. Users should not call this directly. */
+extern int _getopt_internal (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind,
+ int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GETOPT_H */
diff --git a/include/nonunix/grp.h b/include/nonunix/grp.h
new file mode 100644
index 0000000..ef019bd
--- /dev/null
+++ b/include/nonunix/grp.h
@@ -0,0 +1,17 @@
+
+#pragma once
+
+typedef unsigned short __gid_t;
+__inline __gid_t getgid(void){return 0;}
+__inline struct group * getgrnam(char* g){return 0;}
+
+struct group
+ {
+ char *gr_name;
+ char *gr_passwd;
+ __gid_t gr_gid;
+ char **gr_mem;
+ };
+
+#define getgrgid(i) NULL
+
diff --git a/include/nonunix/linux/types.h b/include/nonunix/linux/types.h
new file mode 100644
index 0000000..eb87011
--- /dev/null
+++ b/include/nonunix/linux/types.h
@@ -0,0 +1,33 @@
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
+
+//#ifndef _MSC_VER
+//#error _MSC_VER not defined
+//#endif
+
+#include <sys/types.h>
+
+typedef unsigned __int8 __u8;
+typedef signed __int8 __s8;
+
+typedef signed __int64 __s64;
+typedef unsigned __int64 __u64;
+
+typedef signed __int16 __s16;
+typedef unsigned __int16 __u16;
+
+typedef signed __int32 __s32;
+typedef unsigned __int32 __u32;
+
+typedef signed __int64 __s64;
+typedef unsigned __int64 __u64;
+
+
+//typedef __u32 ino_t;
+typedef __u32 dev_t;
+typedef __u32 uid_t;
+typedef __u32 gid_t;
+
+#include <stdint.h>
+
+#endif /* LINUX_TYPES_H */
diff --git a/include/nonunix/pwd.h b/include/nonunix/pwd.h
new file mode 100644
index 0000000..a724ea2
--- /dev/null
+++ b/include/nonunix/pwd.h
@@ -0,0 +1,22 @@
+
+#pragma once
+
+typedef unsigned short __uid_t;
+__inline __uid_t getuid(void){return 0;}
+__inline int geteuid(void){return 1;}
+__inline struct passwd* getpwnam (char* g){return 0;}
+
+
+struct passwd
+{
+ char *pw_name;
+ char *pw_passwd;
+ __uid_t pw_uid;
+ __gid_t pw_gid;
+ char *pw_gecos;
+ char *pw_dir;
+ char *pw_shell;
+};
+
+#define getpwuid(i) NULL
+
diff --git a/include/nonunix/sys/file.h b/include/nonunix/sys/file.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/sys/file.h
diff --git a/include/nonunix/sys/ioctl.h b/include/nonunix/sys/ioctl.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/sys/ioctl.h
diff --git a/include/nonunix/sys/param.h b/include/nonunix/sys/param.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/sys/param.h
diff --git a/include/nonunix/sys/resource.h b/include/nonunix/sys/resource.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/sys/resource.h
diff --git a/include/nonunix/sys/socket.h b/include/nonunix/sys/socket.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/sys/socket.h
diff --git a/include/nonunix/sys/time.h b/include/nonunix/sys/time.h
new file mode 100644
index 0000000..91fd187
--- /dev/null
+++ b/include/nonunix/sys/time.h
@@ -0,0 +1 @@
+#include <time.h>
diff --git a/include/nonunix/sys/wait.h b/include/nonunix/sys/wait.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/sys/wait.h
diff --git a/include/nonunix/termios.h b/include/nonunix/termios.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/nonunix/termios.h
diff --git a/include/nonunix/unistd.h b/include/nonunix/unistd.h
new file mode 100644
index 0000000..5053587
--- /dev/null
+++ b/include/nonunix/unistd.h
@@ -0,0 +1,49 @@
+
+
+#pragma once
+
+#include <stdlib.h>
+#include <process.h>
+#include <io.h>
+
+#define EOPNOTSUPP 95
+
+#define O_NONBLOCK 0
+#define O_RDONLY _O_RDONLY
+#define O_RDWR _O_RDWR
+
+#define popen _popen
+#define pclose _pclose
+#define sleep _sleep
+#define stat _stat
+#define open _open
+#define close _close
+#define fstat _fstat
+#define read _read
+#define write _write
+#define off_t _off_t
+#define lseek _lseek
+#define putenv _putenv
+#define getpid _getpid
+#define utimbuf _utimbuf
+#define sys_nerr _sys_nerr
+#define sys_errlist _sys_errlist
+#define isatty _isatty
+#define getch _getch
+
+#include <grp.h>
+#include <pwd.h>
+
+
+// no-oped sync
+__inline void sync(void){};
+
+
+
+#define gettimeofday(p, v) ((p)->tv_sec = (p)->tv_usec = 0)
+
+
+#define strcasecmp _stricmp
+
+
+
diff --git a/include/nonunix/utime.h b/include/nonunix/utime.h
new file mode 100644
index 0000000..8285f38
--- /dev/null
+++ b/include/nonunix/utime.h
@@ -0,0 +1 @@
+#include <sys/utime.h>
diff --git a/install-utils/compile_manpages b/install-utils/compile_manpages
new file mode 100644
index 0000000..fb3bbdb
--- /dev/null
+++ b/install-utils/compile_manpages
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+MAN8="debugfs badblocks e2fsck mke2fs dumpe2fs mklost+found \
+ fsck tune2fs"
+MAN1="lsattr chattr"
+
+for i in $MAN8
+do
+ man -S 8 $i > /dev/null
+done
+
+
+for i in $MAN1
+do
+ man -S 1 $i > /dev/null
+done
+
+exit 0
diff --git a/install-utils/convfstab b/install-utils/convfstab
new file mode 100644
index 0000000..11160bf
--- /dev/null
+++ b/install-utils/convfstab
@@ -0,0 +1,78 @@
+#!/bin/sh
+# Make /etc/fstab standard compliant.
+# M.Weller (eowmob@exp-math.uni-essen.de) 13.11.1994.
+# This script is public domain. Still if only slightly
+# modified a credit to me might be nice.
+
+ROOT_PASS=1 # Pass for root file system
+NON_ROOT_PASS=2 # Pass for non root file systems
+DEF_FLAGS="defaults" # Default filesysflags
+DEF_DUMP=0 # Default dumpfreq.
+
+while read LINE
+do
+ set -- $LINE
+ if [ $# != 0 ]
+ then
+ case $1 in
+ \#* | !* )
+ echo "$LINE"
+ # Actually there are no comments allowed in /etc/fstab
+ echo "Warning: comment in /etc/fstab detected." >&2
+ echo "Please remove it by hand." >&2
+ ;;
+ * )
+ if [ $# -gt 6 ] || [ $# -lt 3 ]
+ then
+ echo "Don't have a clue about \"$LINE\"." >&2
+ echo "$LINE"
+ else
+ case $2 in
+ / )
+ PASS=$ROOT_PASS
+ ;;
+ none )
+ PASS=0
+ ;;
+ * )
+ PASS=$NON_ROOT_PASS
+ ;;
+ esac
+ DUMP=$DEF_DUMP
+ case $3 in
+ ignore | iso9660 | msdos | hpfs | sysv | \
+ xenix | coherent | nfs | proc | sw | swap )
+ DUMP=0;
+ PASS=0;
+ ;;
+ esac
+ case $# in
+ 3 )
+ echo "$LINE $DEF_FLAGS $DUMP $PASS"
+ ;;
+ 4 )
+ echo "$LINE $DUMP $PASS"
+ ;;
+ 5 )
+ echo "$LINE $PASS"
+ ;;
+ 6)
+ echo "$LINE"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ else
+ echo "Warning: One empty line removed." >&2
+ fi
+done </etc/fstab >/tmp/newfstab.$$
+mv -f /etc/fstab /etc/fstab.bak
+mv -f /tmp/newfstab.$$ /etc/fstab
+if [ $? != 0 ]
+then
+ echo "Installation of patched /etc/fstab failed."
+ echo "It would have been:"
+ cat /tmp/newfstab.$$
+ rm -f /tmp/newfstab.$$
+fi
diff --git a/install-utils/remove_preformat_manpages b/install-utils/remove_preformat_manpages
new file mode 100644
index 0000000..67dfff8
--- /dev/null
+++ b/install-utils/remove_preformat_manpages
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+PREFORMAT_ROOT=/usr/man/preformat
+COMPILED_ROOT=/usr/man
+
+MAN8="debugfs.8 badblocks.8 e2fsck.8 mke2fs.8 dumpe2fs.8 mklost+found.8 \
+ fsck.8 tune2fs.8 e2label.8"
+MAN1="lsattr.1 chattr.1"
+
+for i in $MAN8
+do
+ rm -f $PREFORMAT_ROOT/cat8/$i $COMPILED_ROOT/cat8/$i \
+ $PREFORMAT_ROOT/cat8/$i.gz $COMPILED_ROOT/cat8/$i.gz
+done
+
+
+for i in $MAN1
+do
+ rm -f $PREFORMAT_ROOT/cat1/$i $COMPILED_ROOT/cat1/$i \
+ $PREFORMAT_ROOT/cat1/$i.gz $COMPILED_ROOT/cat1/$i.gz
+done
diff --git a/lib/Android.bp b/lib/Android.bp
new file mode 100644
index 0000000..529fa23
--- /dev/null
+++ b/lib/Android.bp
@@ -0,0 +1,45 @@
+// Copyright 2017 The Android Open Source Project
+
+// All the libraries under this directory export their headers as relative
+// paths to this directory (external/e2fsprogs/lib). This is a helper headers
+// only library to allow exporting
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-0BSD
+ // SPDX-license-identifier-BSD
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-GPL-2.0
+ // SPDX-license-identifier-LGPL
+ // SPDX-license-identifier-LGPL-2.1
+ // SPDX-license-identifier-LGPL-3.0
+ // SPDX-license-identifier-MIT
+ // legacy_unencumbered
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library_headers {
+ name: "libext2-headers",
+ host_supported: true,
+ vendor_available: true,
+ product_available: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+ export_include_dirs: ["."],
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.virt",
+ ],
+}
+
+subdirs = [
+ "*",
+]
diff --git a/lib/Makefile.bsd-lib b/lib/Makefile.bsd-lib
new file mode 100644
index 0000000..2792ba3
--- /dev/null
+++ b/lib/Makefile.bsd-lib
@@ -0,0 +1,47 @@
+#
+# This is a Makefile stub which handles the creation of BSD shared
+# libraries.
+#
+# In order to use this stub, the following makefile variables must be defined.
+#
+# BSDLIB_VERSION = 1.0
+# BSDLIB_IMAGE = libce
+# BSDLIB_MYDIR = et
+# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
+#
+
+all:: image
+
+real-subdirs:: Makefile
+ @echo " MKDIR pic"
+ @mkdir -p pic
+
+BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION)
+BSDLIB_PIC_FLAG = -fpic
+
+image: $(BSD_LIB)
+
+$(BSD_LIB): $(OBJS)
+ (cd pic; ld -Bshareable -o $(BSD_LIB) $(LDFLAGS_SHLIB) $(OBJS))
+ $(MV) pic/$(BSD_LIB) .
+ $(RM) -f ../$(BSD_LIB)
+ (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB))
+
+install-shlibs install:: $(BSD_LIB)
+ @echo " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
+ @$(INSTALL_PROGRAM) $(BSD_LIB) \
+ $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+ @-$(LDCONFIG)
+
+install-strip: install
+
+install-shlibs-strip:: install-shlibs
+
+uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+
+clean::
+ $(RM) -rf pic
+ $(RM) -f $(BSD_LIB)
+ $(RM) -f ../$(BSD_LIB)
diff --git a/lib/Makefile.checker b/lib/Makefile.checker
new file mode 100644
index 0000000..0b5f9a3
--- /dev/null
+++ b/lib/Makefile.checker
@@ -0,0 +1,3 @@
+# This is a placeholder so builds don't break after a "git pull"
+# which removed the checker infrastructure. This file can be deleted
+# after e2fsprogs 1.44 is released
diff --git a/lib/Makefile.darwin-lib b/lib/Makefile.darwin-lib
new file mode 100644
index 0000000..95e8ee0
--- /dev/null
+++ b/lib/Makefile.darwin-lib
@@ -0,0 +1,52 @@
+#
+# This is a Makefile stub which handles the creation of Darwin BSD shared
+# libraries.
+#
+# In order to use this stub, the following makefile variables must be defined.
+#
+# BSDLIB_VERSION = 1.0
+# BSDLIB_IMAGE = libce
+# BSDLIB_MYDIR = et
+# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
+#
+
+all:: image
+
+real-subdirs:: Makefile
+ $(E) " MKDIR pic"
+ $(Q) mkdir -p pic
+
+BSD_LIB = $(BSDLIB_IMAGE).$(BSDLIB_VERSION).dylib
+BSDLIB_PIC_FLAG = -fPIC
+
+image: $(BSD_LIB)
+
+$(BSD_LIB): $(OBJS)
+ $(E) " GEN_BSD_SOLIB $(BSD_LIB)"
+ $(Q) (cd pic; $(CC) -dynamiclib -compatibility_version 1.0 -current_version $(BSDLIB_VERSION) \
+ -install_name $(BSDLIB_INSTALL_DIR)/$(BSD_LIB) \
+ -undefined dynamic_lookup -o $(BSD_LIB) $(OBJS))
+ $(Q) $(MV) pic/$(BSD_LIB) .
+ $(Q) $(RM) -f ../$(BSD_LIB)
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB))
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(BSD_LIB) $(BSDLIB_IMAGE).dylib)
+
+install-shlibs install:: $(BSD_LIB)
+ $(E) " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
+ $(Q) $(INSTALL_PROGRAM) $(BSD_LIB) \
+ $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+ -$(Q) $(LDCONFIG)
+
+install-strip: install
+
+install-shlibs-strip:: install-shlibs
+
+uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+
+clean::
+ $(RM) -rf pic
+ $(RM) -f $(BSD_LIB)
+ $(RM) -f ../$(BSD_LIB)
+ $(RM) -f ../$(BSDLIB_IMAGE).dylib
diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib
new file mode 100644
index 0000000..f850f3d
--- /dev/null
+++ b/lib/Makefile.elf-lib
@@ -0,0 +1,75 @@
+#
+# This is a Makefile stub which handles the creation of Linux ELF shared
+# libraries.
+#
+# In order to use this stub, the following makefile variables must be defined.
+#
+# ELF_VERSION = 1.0
+# ELF_SO_VERSION = 1
+# ELF_IMAGE = libce
+# ELF_MYDIR = et
+# ELF_INSTALL_DIR = $(SHLIBDIR)
+# ELF_OTHER_LIBS = -lc
+
+all:: image
+
+real-subdirs:: Makefile
+ $(E) " MKDIR elfshared"
+ $(Q) mkdir -p elfshared
+
+ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
+ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
+
+image: $(ELF_LIB)
+
+$(ELF_LIB): $(OBJS)
+ $(E) " GEN_ELF_SOLIB $(ELF_LIB)"
+ $(Q) (cd elfshared; $(CC) -o $(ELF_LIB) \
+ -L$(top_builddir)/../lib $(LDFLAGS_SHLIB) -fPIC -shared \
+ -Wl,-soname,$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS))
+ $(Q) $(MV) elfshared/$(ELF_LIB) .
+ $(Q) $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$(ELF_LIB) $(ELF_LIB))
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_IMAGE).so)
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_SONAME))
+
+installdirs-elf-lib::
+ $(E) " MKDIR_P $(ELF_INSTALL_DIR) $(libdir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(ELF_INSTALL_DIR) \
+ $(DESTDIR)$(libdir)
+
+installdirs:: installdirs-elf-lib
+
+install-shlibs install:: $(ELF_LIB) installdirs-elf-lib $(DEP_INSTALL_SYMLINK)
+ $(E) " INSTALL-ELF-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
+ $(Q) $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+ $(E) " SYMLINK $(ELF_INSTALL_DIR)/$(ELF_SONAME)"
+ $(Q) $(INSTALL_SYMLINK) $(ELF_INSTALL_DIR)/$(ELF_LIB) \
+ $(ELF_INSTALL_DIR)/$(ELF_SONAME) $(DESTDIR)
+ $(E) " SYMLINK $(libdir)/$(ELF_IMAGE).so"
+ $(Q) $(INSTALL_SYMLINK) $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(libdir)/$(ELF_IMAGE).so $(DESTDIR)
+ $(E) " LDCONFIG"
+ $(Q) -$(LDCONFIG)
+
+install-strip: install
+ $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
+ $(Q) $(STRIP) --strip-unneeded --remove-section=.comment \
+ --remove-section=.note $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+
+install-shlibs-strip:: install-shlibs
+ $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
+ $(Q) $(STRIP) --strip-unneeded --remove-section=.comment \
+ --remove-section=.note $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+
+uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
+ $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(DESTDIR)$(libdir)/$(ELF_IMAGE).so
+ -$(LDCONFIG)
+
+clean::
+ $(RM) -rf elfshared
+ $(RM) -f $(ELF_LIB)
+ $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
diff --git a/lib/Makefile.library b/lib/Makefile.library
new file mode 100644
index 0000000..f78467a
--- /dev/null
+++ b/lib/Makefile.library
@@ -0,0 +1,27 @@
+all:: subdirs $(LIBRARY).a
+
+install-shlibs-strip::
+
+install-shlibs::
+
+uninstall-shlibs::
+
+real-subdirs::
+
+subdirs:: Makefile
+ $(Q) $(MAKE) -s real-subdirs
+ $(Q) touch subdirs
+
+clean::
+ $(Q) $(RM) -f subdirs
+
+$(LIBRARY).a: $(OBJS)
+ $(E) " GEN_LIB $@"
+ $(Q) (if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
+ $(Q) $(ARGEN) $@ $(OBJS)
+ -@$(RANLIB) $@
+ $(Q) $(RM) -f ../$@
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$@ $@)
+
+$(LIB)/$(LIBRARY).a: $(LIBRARY).a
diff --git a/lib/Makefile.profile b/lib/Makefile.profile
new file mode 100644
index 0000000..180f5bc
--- /dev/null
+++ b/lib/Makefile.profile
@@ -0,0 +1,27 @@
+all:: $(LIBRARY)_p.a
+
+real-subdirs:: Makefile
+ $(E) " MKDIR profiled"
+ $(Q) mkdir -p profiled
+
+clean::
+ $(RM) -rf profiled
+ $(RM) -f $(LIBRARY)_p.a ../$(LIBRARY)_p.a
+
+$(LIBRARY)_p.a: $(OBJS)
+ $(E) " GEN_PROFILED_LIB $(ELF_LIB)"
+ $(Q) (if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
+ $(Q) (cd profiled; $(ARUPD) ../$@ $(OBJS))
+ -$(Q) $(RANLIB) $@
+ $(Q) $(RM) -f ../$@
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$@ $@)
+
+install:: $(LIBRARY)_p.a installdirs
+ $(E) " INSTALL_DATA $(libdir)/$(LIBRARY)_p.a"
+ $(Q) $(INSTALL_DATA) $(LIBRARY)_p.a $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
+ -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
+ $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
diff --git a/lib/Makefile.solaris-lib b/lib/Makefile.solaris-lib
new file mode 100644
index 0000000..1e63636
--- /dev/null
+++ b/lib/Makefile.solaris-lib
@@ -0,0 +1,65 @@
+#
+# This is a Makefile stub which handles the creation of Linux ELF shared
+# libraries.
+#
+# In order to use this stub, the following makefile variables must be defined.
+#
+# ELF_VERSION = 1.0
+# ELF_SO_VERSION = 1
+# ELF_IMAGE = libce
+# ELF_MYDIR = et
+# ELF_INSTALL_DIR = $(SHLIBDIR)
+# ELF_OTHER_LIBS = -lc
+
+all:: image
+
+real-subdirs:: Makefile
+ $(E) " MKDIR elfshared"
+ $(Q) mkdir -p elfshared
+
+ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
+ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
+
+image: $(ELF_LIB)
+
+$(ELF_LIB): $(OBJS)
+ $(E) " GEN_ELF_SOLIB $(ELF_LIB)"
+ $(Q) (cd elfshared; $(CC) --shared -o $(ELF_LIB) \
+ -L$(top_builddir)/../lib $(LDFLAGS_SHLIB) \
+ -Wl,-h,$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS))
+ $(Q) $(MV) elfshared/$(ELF_LIB) .
+ $(Q) $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$(ELF_LIB) $(ELF_LIB))
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_IMAGE).so)
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_SONAME))
+
+installdirs-elf-lib::
+ $(MKDIR_P) $(DESTDIR)$(ELF_INSTALL_DIR) \
+ $(DESTDIR)$(libdir)
+
+installdirs:: installdirs-elf-lib
+
+install-shlibs install:: $(ELF_LIB) installdirs-elf-lib
+ $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+ $(LN_S) -f $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
+ $(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(DESTDIR)$(libdir)/$(ELF_IMAGE).so
+ -$(LDCONFIG)
+
+install-strip: install
+ $(STRIP) -x $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+
+install-shlibs-strip:: install-shlibs
+ $(STRIP) -x $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+
+uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
+ $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(DESTDIR)$(libdir)/$(ELF_IMAGE).so
+ -$(LDCONFIG)
+
+clean::
+ $(RM) -rf elfshared
+ $(RM) -f $(ELF_LIB)
+ $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
diff --git a/lib/blkid/Android.bp b/lib/blkid/Android.bp
new file mode 100644
index 0000000..891c74a
--- /dev/null
+++ b/lib/blkid/Android.bp
@@ -0,0 +1,49 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-LGPL
+ // SPDX-license-identifier-LGPL-2.1
+ // SPDX-license-identifier-LGPL-3.0
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library {
+ name: "libext2_blkid",
+ host_supported: true,
+ ramdisk_available: true,
+ vendor_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "cache.c",
+ "dev.c",
+ "devname.c",
+ "devno.c",
+ "getsize.c",
+ "llseek.c",
+ "probe.c",
+ "read.c",
+ "resolve.c",
+ "save.c",
+ "tag.c",
+ "version.c",
+ ],
+ shared_libs: ["libext2_uuid"],
+
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+}
diff --git a/lib/blkid/Makefile.in b/lib/blkid/Makefile.in
new file mode 100644
index 0000000..c5ca920
--- /dev/null
+++ b/lib/blkid/Makefile.in
@@ -0,0 +1,224 @@
+# Makefile for libblkid
+#
+# Copyright (C) 2001 Theodore Ts'o (tytso@mit.edu)
+#
+# This file can be redistributed under the terms of the
+# GNU Lesser General Public License
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/blkid
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+all::
+
+SMANPAGES= libblkid.3
+
+OBJS= cache.o dev.o devname.o devno.o getsize.o llseek.o probe.o \
+ read.o resolve.o save.o tag.o version.o
+
+SRCS= $(srcdir)/cache.c $(srcdir)/dev.c $(srcdir)/devname.c $(srcdir)/devno.c \
+ $(srcdir)/getsize.c $(srcdir)/llseek.c $(srcdir)/probe.c \
+ $(srcdir)/read.c $(srcdir)/resolve.c $(srcdir)/save.c $(srcdir)/tag.c \
+ $(srcdir)/version.c
+
+HFILES_IN= blkid.h blkid_types.h
+
+LIBRARY= libblkid
+LIBDIR= blkid
+
+ELF_VERSION = 1.0
+ELF_SO_VERSION = 1
+ELF_IMAGE = libblkid
+ELF_MYDIR = blkid
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS = -luuid
+
+BSDLIB_VERSION = 2.0
+BSDLIB_IMAGE = libblkid
+BSDLIB_MYDIR = blkid
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_ELF@
+@MAKEFILE_BSDLIB@
+@MAKEFILE_PROFILE@
+
+LIBS_BLKID= $(STATIC_LIBBLKID) $(STATIC_LIBUUID)
+DEPLIBS_BLKID= $(DEPSTATIC_LIBBLKID) $(DEPSTATIC_LIBUUID)
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
+@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+all:: $(SMANPAGES) blkid.pc
+
+blkid_types.h: $(srcdir)/blkid_types.h.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); \
+ CONFIG_FILES=$(my_dir)/blkid_types.h ./config.status
+
+blkid.h: $(srcdir)/blkid.h.in
+ $(E) " CP $@"
+ $(Q) cp $(srcdir)/blkid.h.in blkid.h
+
+libblkid.3: $(DEP_SUBSTITUTE) $(srcdir)/libblkid.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/libblkid.3.in libblkid.3
+
+tst_cache: $(srcdir)/cache.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_cache -DTEST_PROGRAM $(srcdir)/cache.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_dev: $(srcdir)/dev.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_dev -DTEST_PROGRAM $(srcdir)/dev.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_devname: $(srcdir)/devname.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_devname -DTEST_PROGRAM $(srcdir)/devname.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_devno: $(srcdir)/devno.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_devno -DTEST_PROGRAM $(srcdir)/devno.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_getsize: $(srcdir)/getsize.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_getsize -DTEST_PROGRAM $(srcdir)/getsize.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_probe: $(srcdir)/probe.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_probe -DTEST_PROGRAM $(srcdir)/probe.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_read: $(srcdir)/read.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_read -DTEST_PROGRAM $(srcdir)/read.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_resolve: $(srcdir)/resolve.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_resolve -DTEST_PROGRAM $(srcdir)/resolve.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_save: $(srcdir)/save.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_save -DTEST_PROGRAM $(srcdir)/save.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_tag: $(srcdir)/tag.c $(DEPLIBS_BLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_tag -DTEST_PROGRAM $(srcdir)/tag.c $(LIBS_BLKID) $(ALL_CFLAGS)
+
+tst_types: tst_types.o blkid_types.h
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_types $(ALL_LDFLAGS) tst_types.o
+
+../../misc/blkid.o: $(top_srcdir)/misc/blkid.c blkid.h
+ $(E) " CC $@"
+ $(Q) $(CC) $(ALL_CFLAGS) -c $(top_srcdir)/misc/blkid.c \
+ -o ../../misc/blkid.o
+
+blkid: ../../misc/blkid.o libblkid.a $(DEPLIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) -o blkid ../../misc/blkid.o libblkid.a $(LIBUUID)
+
+test_probe: test_probe.in Makefile
+ $(E) "Creating test_probe..."
+ $(E) "#!/bin/sh" > test_probe
+ $(E) "SRCDIR=@srcdir@" >> test_probe
+ $(Q) cat $(srcdir)/test_probe.in >> test_probe
+ $(Q) chmod +x test_probe
+
+fullcheck check:: all tst_cache tst_dev tst_devname tst_devno \
+ tst_getsize tst_probe tst_read tst_resolve tst_save tst_tag \
+ test_probe tst_types
+ ./test_probe
+ ./tst_types
+
+blkid.pc: $(srcdir)/blkid.pc.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); CONFIG_FILES=lib/blkid/blkid.pc ./config.status
+
+installdirs::
+ $(E) " MKDIR_P $(libdir) $(includedir)/blkid"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/blkid $(DESTDIR)$(pkgconfigdir)
+
+install:: all installdirs
+ $(E) " INSTALL_DATA $(libdir)/libblkid.a"
+ $(Q) $(INSTALL_DATA) libblkid.a $(DESTDIR)$(libdir)/libblkid.a
+ -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libblkid.a
+ $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libblkid.a
+ $(Q) set -e; for i in $(HFILES_IN); do \
+ echo " INSTALL_DATA $(includedir)/blkid/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir)/blkid/$$i; \
+ done
+ $(Q) for i in $(SMANPAGES); do \
+ echo " INSTALL_DATA $(man3dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
+ done
+ $(E) " INSTALL_DATA $(pkgconfigdir)/blkid.pc"
+ $(Q) $(INSTALL_DATA) blkid.pc $(DESTDIR)$(pkgconfigdir)/blkid.pc
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libblkid.a \
+ $(DESTDIR)$(pkgconfigdir)/blkid.pc
+ $(RM) -rf $(DESTDIR)$(includedir)/blkid
+ for i in $(SMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man3dir)/$$i; \
+ done
+
+clean::
+ $(RM) -f \#* *.s *.o *.orig *.a *~ *.bak tst_cache tst_dev tst_devname \
+ tst_devno tst_getsize tst_probe tst_read tst_resolve tst_save \
+ tst_tag tst_types tests/*.out tests/*.ok \
+ tests/*.img results test_probe core profiled/* \
+ blkid.h blkid_types.h ../libblkid.a ../libblkid_p.a \
+ $(SMANPAGES) blkid blkid.pc
+ @echo rmdir tests/tmp tests
+ @(rmdir tests/tmp tests 2> /dev/null ; exit 0)
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile blkid.pc \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+$(OBJS): subdirs $(HFILES_IN)
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+cache.o: $(srcdir)/cache.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+dev.o: $(srcdir)/dev.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+devname.o: $(srcdir)/devname.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+devno.o: $(srcdir)/devno.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+getsize.o: $(srcdir)/getsize.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+llseek.o: $(srcdir)/llseek.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+probe.o: $(srcdir)/probe.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h \
+ $(srcdir)/probe.h
+read.o: $(srcdir)/read.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+resolve.o: $(srcdir)/resolve.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+save.o: $(srcdir)/save.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+tag.o: $(srcdir)/tag.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/blkidP.h $(srcdir)/list.h
+version.o: $(srcdir)/version.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/version.h
diff --git a/lib/blkid/blkid.h.in b/lib/blkid/blkid.h.in
new file mode 100644
index 0000000..81f3098
--- /dev/null
+++ b/lib/blkid/blkid.h.in
@@ -0,0 +1,110 @@
+/*
+ * blkid.h - Interface for libblkid, a library to identify block devices
+ *
+ * Copyright (C) 2001 Andreas Dilger
+ * Copyright (C) 2003 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#ifndef _BLKID_BLKID_H
+#define _BLKID_BLKID_H
+
+#include <sys/types.h>
+#include <blkid/blkid_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BLKID_VERSION "1.0.0"
+#define BLKID_DATE "12-Feb-2003"
+
+typedef struct blkid_struct_dev *blkid_dev;
+typedef struct blkid_struct_cache *blkid_cache;
+typedef __s64 blkid_loff_t;
+
+typedef struct blkid_struct_tag_iterate *blkid_tag_iterate;
+typedef struct blkid_struct_dev_iterate *blkid_dev_iterate;
+
+/*
+ * Flags for blkid_get_dev
+ *
+ * BLKID_DEV_CREATE Create an empty device structure if not found
+ * in the cache.
+ * BLKID_DEV_VERIFY Make sure the device structure corresponds
+ * with reality.
+ * BLKID_DEV_FIND Just look up a device entry, and return NULL
+ * if it is not found.
+ * BLKID_DEV_NORMAL Get a valid device structure, either from the
+ * cache or by probing the device.
+ */
+#define BLKID_DEV_FIND 0x0000
+#define BLKID_DEV_CREATE 0x0001
+#define BLKID_DEV_VERIFY 0x0002
+#define BLKID_DEV_NORMAL (BLKID_DEV_CREATE | BLKID_DEV_VERIFY)
+
+/* cache.c */
+extern void blkid_put_cache(blkid_cache cache);
+extern int blkid_get_cache(blkid_cache *cache, const char *filename);
+extern void blkid_gc_cache(blkid_cache cache);
+
+/* dev.c */
+extern const char *blkid_dev_devname(blkid_dev dev);
+
+extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache);
+extern int blkid_dev_set_search(blkid_dev_iterate iter,
+ char *search_type, char *search_value);
+extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev);
+extern void blkid_dev_iterate_end(blkid_dev_iterate iterate);
+
+/* devno.c */
+extern char *blkid_devno_to_devname(dev_t devno);
+
+/* devname.c */
+extern int blkid_probe_all(blkid_cache cache);
+extern int blkid_probe_all_new(blkid_cache cache);
+extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname,
+ int flags);
+
+/* getsize.c */
+extern blkid_loff_t blkid_get_dev_size(int fd);
+
+/* probe.c */
+int blkid_known_fstype(const char *fstype);
+extern blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev);
+
+/* read.c */
+
+/* resolve.c */
+extern char *blkid_get_tag_value(blkid_cache cache, const char *tagname,
+ const char *devname);
+extern char *blkid_get_devname(blkid_cache cache, const char *token,
+ const char *value);
+
+/* tag.c */
+extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev);
+extern int blkid_tag_next(blkid_tag_iterate iterate,
+ const char **type, const char **value);
+extern void blkid_tag_iterate_end(blkid_tag_iterate iterate);
+extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
+ const char *value);
+extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache,
+ const char *type,
+ const char *value);
+extern int blkid_parse_tag_string(const char *token, char **ret_type,
+ char **ret_val);
+
+/* version.c */
+extern int blkid_parse_version_string(const char *ver_string);
+extern int blkid_get_library_version(const char **ver_string,
+ const char **date_string);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BLKID_BLKID_H */
diff --git a/lib/blkid/blkid.pc.in b/lib/blkid/blkid.pc.in
new file mode 100644
index 0000000..808fe22
--- /dev/null
+++ b/lib/blkid/blkid.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: blkid
+Description: Block device id library
+Version: @E2FSPROGS_VERSION@
+Requires.private: uuid
+Cflags: -I${includedir}/blkid -I${includedir}
+Libs: -L${libdir} -lblkid
diff --git a/lib/blkid/blkidP.h b/lib/blkid/blkidP.h
new file mode 100644
index 0000000..b3fe4a6
--- /dev/null
+++ b/lib/blkid/blkidP.h
@@ -0,0 +1,204 @@
+/*
+ * blkidP.h - Internal interfaces for libblkid
+ *
+ * Copyright (C) 2001 Andreas Dilger
+ * Copyright (C) 2003 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#ifndef _BLKID_BLKIDP_H
+#define _BLKID_BLKIDP_H
+
+#include <sys/types.h>
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#include <blkid/blkid.h>
+
+#include <blkid/list.h>
+
+#ifdef __GNUC__
+#define __BLKID_ATTR(x) __attribute__(x)
+#else
+#define __BLKID_ATTR(x)
+#endif
+
+
+/*
+ * This describes the attributes of a specific device.
+ * We can traverse all of the tags by bid_tags (linking to the tag bit_names).
+ * The bid_label and bid_uuid fields are shortcuts to the LABEL and UUID tag
+ * values, if they exist.
+ */
+struct blkid_struct_dev
+{
+ struct list_head bid_devs; /* All devices in the cache */
+ struct list_head bid_tags; /* All tags for this device */
+ blkid_cache bid_cache; /* Dev belongs to this cache */
+ char *bid_name; /* Device inode pathname */
+ char *bid_type; /* Preferred device TYPE */
+ int bid_pri; /* Device priority */
+ dev_t bid_devno; /* Device major/minor number */
+ time_t bid_time; /* Last update time of device */
+ unsigned int bid_flags; /* Device status bitflags */
+ char *bid_label; /* Shortcut to device LABEL */
+ char *bid_uuid; /* Shortcut to binary UUID */
+};
+
+#define BLKID_BID_FL_VERIFIED 0x0001 /* Device data validated from disk */
+#define BLKID_BID_FL_INVALID 0x0004 /* Device is invalid */
+
+/*
+ * Each tag defines a NAME=value pair for a particular device. The tags
+ * are linked via bit_names for a single device, so that traversing the
+ * names list will get you a list of all tags associated with a device.
+ * They are also linked via bit_values for all devices, so one can easily
+ * search all tags with a given NAME for a specific value.
+ */
+struct blkid_struct_tag
+{
+ struct list_head bit_tags; /* All tags for this device */
+ struct list_head bit_names; /* All tags with given NAME */
+ char *bit_name; /* NAME of tag (shared) */
+ char *bit_val; /* value of tag */
+ blkid_dev bit_dev; /* pointer to device */
+};
+typedef struct blkid_struct_tag *blkid_tag;
+
+/*
+ * Minimum number of seconds between device probes, even when reading
+ * from the cache. This is to avoid re-probing all devices which were
+ * just probed by another program that does not share the cache.
+ */
+#define BLKID_PROBE_MIN 2
+
+/*
+ * Time in seconds an entry remains verified in the in-memory cache
+ * before being reverified (in case of long-running processes that
+ * keep a cache in memory and continue to use it for a long time).
+ */
+#define BLKID_PROBE_INTERVAL 200
+
+/* This describes an entire blkid cache file and probed devices.
+ * We can traverse all of the found devices via bic_list.
+ * We can traverse all of the tag types by bic_tags, which hold empty tags
+ * for each tag type. Those tags can be used as list_heads for iterating
+ * through all devices with a specific tag type (e.g. LABEL).
+ */
+struct blkid_struct_cache
+{
+ struct list_head bic_devs; /* List head of all devices */
+ struct list_head bic_tags; /* List head of all tag types */
+ time_t bic_time; /* Last probe time */
+ time_t bic_ftime; /* Mod time of the cachefile */
+ unsigned int bic_flags; /* Status flags of the cache */
+ char *bic_filename; /* filename of cache */
+};
+
+#define BLKID_BIC_FL_PROBED 0x0002 /* We probed /proc/partition devices */
+#define BLKID_BIC_FL_CHANGED 0x0004 /* Cache has changed from disk */
+
+extern char *blkid_strdup(const char *s);
+extern char *blkid_strndup(const char *s, const int length);
+
+#define BLKID_CACHE_FILE "/etc/blkid.tab"
+
+#define BLKID_ERR_IO 5
+#define BLKID_ERR_PROC 9
+#define BLKID_ERR_MEM 12
+#define BLKID_ERR_CACHE 14
+#define BLKID_ERR_DEV 19
+#define BLKID_ERR_PARAM 22
+#define BLKID_ERR_BIG 27
+
+/*
+ * Priority settings for different types of devices
+ */
+#define BLKID_PRI_DM 40
+#define BLKID_PRI_EVMS 30
+#define BLKID_PRI_LVM 20
+#define BLKID_PRI_MD 10
+
+#if defined(TEST_PROGRAM) && !defined(CONFIG_BLKID_DEBUG)
+#define CONFIG_BLKID_DEBUG
+#endif
+
+#define DEBUG_CACHE 0x0001
+#define DEBUG_DUMP 0x0002
+#define DEBUG_DEV 0x0004
+#define DEBUG_DEVNAME 0x0008
+#define DEBUG_DEVNO 0x0010
+#define DEBUG_PROBE 0x0020
+#define DEBUG_READ 0x0040
+#define DEBUG_RESOLVE 0x0080
+#define DEBUG_SAVE 0x0100
+#define DEBUG_TAG 0x0200
+#define DEBUG_INIT 0x8000
+#define DEBUG_ALL 0xFFFF
+
+#ifdef CONFIG_BLKID_DEBUG
+#include <stdio.h>
+extern int blkid_debug_mask;
+#define DBG(m,x) if ((m) & blkid_debug_mask) x;
+#else
+#define DBG(m,x)
+#endif
+
+#ifdef CONFIG_BLKID_DEBUG
+extern void blkid_debug_dump_dev(blkid_dev dev);
+extern void blkid_debug_dump_tag(blkid_tag tag);
+#endif
+
+static inline int blkidP_is_disk_device(mode_t mode)
+{
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ return S_ISBLK(mode) || S_ISCHR(mode);
+#else
+ return S_ISBLK(mode);
+#endif
+}
+
+/* devno.c */
+struct dir_list {
+ char *name;
+ struct dir_list *next;
+};
+extern void blkid__scan_dir(const char *, dev_t, struct dir_list **, char **);
+
+/* lseek.c */
+extern blkid_loff_t blkid_llseek(int fd, blkid_loff_t offset, int whence);
+
+/* read.c */
+extern void blkid_read_cache(blkid_cache cache);
+
+/* save.c */
+extern int blkid_flush_cache(blkid_cache cache);
+
+/*
+ * Functions to create and find a specific tag type: tag.c
+ */
+extern void blkid_free_tag(blkid_tag tag);
+extern blkid_tag blkid_find_tag_dev(blkid_dev dev, const char *type);
+extern int blkid_set_tag(blkid_dev dev, const char *name,
+ const char *value, const int vlength);
+
+/*
+ * Functions to create and find a specific tag type: dev.c
+ */
+extern blkid_dev blkid_new_dev(void);
+extern void blkid_free_dev(blkid_dev dev);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BLKID_BLKIDP_H */
diff --git a/lib/blkid/blkid_types.h.in b/lib/blkid/blkid_types.h.in
new file mode 100644
index 0000000..d4c81d0
--- /dev/null
+++ b/lib/blkid/blkid_types.h.in
@@ -0,0 +1,167 @@
+/*
+ * If linux/types.h is already been included, assume it has defined
+ * everything we need. (cross fingers) Other header files may have
+ * also defined the types that we need.
+ */
+#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
+ !defined(_EXT2_TYPES_H))
+#define _BLKID_TYPES_H
+
+@ASM_TYPES_HEADER@
+
+#ifndef HAVE___U8
+#define HAVE___U8
+#ifdef __U8_TYPEDEF
+typedef __U8_TYPEDEF __u8;
+#else
+typedef unsigned char __u8;
+#endif
+#endif /* HAVE___U8 */
+
+#ifndef HAVE___S8
+#define HAVE___S8
+#ifdef __S8_TYPEDEF
+typedef __S8_TYPEDEF __s8;
+#else
+typedef signed char __s8;
+#endif
+#endif /* HAVE___S8 */
+
+#ifndef HAVE___U16
+#define HAVE___U16
+#ifdef __U16_TYPEDEF
+typedef __U16_TYPEDEF __u16;
+#else
+#if (@SIZEOF_INT@ == 2)
+typedef unsigned int __u16;
+#else
+#if (@SIZEOF_SHORT@ == 2)
+typedef unsigned short __u16;
+#else
+#undef HAVE___U16
+ ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __U16_TYPEDEF */
+#endif /* HAVE___U16 */
+
+#ifndef HAVE___S16
+#define HAVE___S16
+#ifdef __S16_TYPEDEF
+typedef __S16_TYPEDEF __s16;
+#else
+#if (@SIZEOF_INT@ == 2)
+typedef int __s16;
+#else
+#if (@SIZEOF_SHORT@ == 2)
+typedef short __s16;
+#else
+#undef HAVE___S16
+ ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __S16_TYPEDEF */
+#endif /* HAVE___S16 */
+
+#ifndef HAVE___U32
+#define HAVE___U32
+#ifdef __U32_TYPEDEF
+typedef __U32_TYPEDEF __u32;
+#else
+#if (@SIZEOF_INT@ == 4)
+typedef unsigned int __u32;
+#else
+#if (@SIZEOF_LONG@ == 4)
+typedef unsigned long __u32;
+#else
+#if (@SIZEOF_SHORT@ == 4)
+typedef unsigned short __u32;
+#else
+#undef HAVE___U32
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __U32_TYPEDEF */
+#endif /* HAVE___U32 */
+
+#ifndef HAVE___S32
+#define HAVE___S32
+#ifdef __S32_TYPEDEF
+typedef __S32_TYPEDEF __s32;
+#else
+#if (@SIZEOF_INT@ == 4)
+typedef int __s32;
+#else
+#if (@SIZEOF_LONG@ == 4)
+typedef long __s32;
+#else
+#if (@SIZEOF_SHORT@ == 4)
+typedef short __s32;
+#else
+#undef HAVE___S32
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __S32_TYPEDEF */
+#endif /* HAVE___S32 */
+
+#ifndef HAVE___U64
+#define HAVE___U64
+#ifdef __U64_TYPEDEF
+typedef __U64_TYPEDEF __u64;
+#else
+#if (@SIZEOF_INT@ == 8)
+typedef unsigned int __u64;
+#else
+#if (@SIZEOF_LONG_LONG@ == 8)
+typedef unsigned long long __u64;
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef unsigned long __u64;
+#else
+#undef HAVE___U64
+ ?== error: undefined 64 bit type
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __U64_TYPEDEF */
+#endif /* HAVE___U64 */
+
+#ifndef HAVE___S64
+#define HAVE___S64
+#ifdef __S64_TYPEDEF
+typedef __S64_TYPEDEF __s64;
+#else
+#if (@SIZEOF_INT@ == 8)
+typedef int __s64;
+#else
+#if (@SIZEOF_LONG_LONG@ == 8)
+#if defined(__GNUC__)
+typedef __signed__ long long __s64;
+#else
+typedef signed long long __s64;
+#endif /* __GNUC__ */
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef long __s64;
+#else
+#undef HAVE___S64
+ ?== error: undefined 64 bit type
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __S64_TYPEDEF */
+#endif /* HAVE___S64 */
+
+#undef __S8_TYPEDEF
+#undef __U8_TYPEDEF
+#undef __S16_TYPEDEF
+#undef __U16_TYPEDEF
+#undef __S32_TYPEDEF
+#undef __U32_TYPEDEF
+#undef __S64_TYPEDEF
+#undef __U64_TYPEDEF
+
+#endif /* _*_TYPES_H */
diff --git a/lib/blkid/cache.c b/lib/blkid/cache.c
new file mode 100644
index 0000000..80c8089
--- /dev/null
+++ b/lib/blkid/cache.c
@@ -0,0 +1,209 @@
+/*
+ * cache.c - allocation/initialization/free routines for cache
+ *
+ * Copyright (C) 2001 Andreas Dilger
+ * Copyright (C) 2003 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#else
+#define PR_GET_DUMPABLE 3
+#endif
+#if (!defined(HAVE_PRCTL) && defined(linux))
+#include <sys/syscall.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include "blkidP.h"
+
+int blkid_debug_mask = 0;
+
+
+static char *safe_getenv(const char *arg)
+{
+ if ((getuid() != geteuid()) || (getgid() != getegid()))
+ return NULL;
+#if HAVE_PRCTL
+ if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#else
+#if (defined(linux) && defined(SYS_prctl))
+ if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#endif
+#endif
+
+#if defined(HAVE_SECURE_GETENV)
+ return secure_getenv(arg);
+#elif defined(HAVE___SECURE_GETENV)
+ return __secure_getenv(arg);
+#else
+ return getenv(arg);
+#endif
+}
+
+#if 0 /* ifdef CONFIG_BLKID_DEBUG */
+static blkid_debug_dump_cache(int mask, blkid_cache cache)
+{
+ struct list_head *p;
+
+ if (!cache) {
+ printf("cache: NULL\n");
+ return;
+ }
+
+ printf("cache: time = %lu\n", cache->bic_time);
+ printf("cache: flags = 0x%08X\n", cache->bic_flags);
+
+ list_for_each(p, &cache->bic_devs) {
+ blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs);
+ blkid_debug_dump_dev(dev);
+ }
+}
+#endif
+
+int blkid_get_cache(blkid_cache *ret_cache, const char *filename)
+{
+ blkid_cache cache;
+
+#ifdef CONFIG_BLKID_DEBUG
+ if (!(blkid_debug_mask & DEBUG_INIT)) {
+ char *dstr = getenv("BLKID_DEBUG");
+
+ if (dstr)
+ blkid_debug_mask = strtoul(dstr, 0, 0);
+ blkid_debug_mask |= DEBUG_INIT;
+ }
+#endif
+
+ DBG(DEBUG_CACHE, printf("creating blkid cache (using %s)\n",
+ filename ? filename : "default cache"));
+
+ if (!(cache = (blkid_cache) calloc(1, sizeof(struct blkid_struct_cache))))
+ return -BLKID_ERR_MEM;
+
+ INIT_LIST_HEAD(&cache->bic_devs);
+ INIT_LIST_HEAD(&cache->bic_tags);
+
+ if (filename && !strlen(filename))
+ filename = 0;
+ if (!filename)
+ filename = safe_getenv("BLKID_FILE");
+ if (!filename)
+ filename = BLKID_CACHE_FILE;
+ cache->bic_filename = blkid_strdup(filename);
+
+ blkid_read_cache(cache);
+
+ *ret_cache = cache;
+ return 0;
+}
+
+void blkid_put_cache(blkid_cache cache)
+{
+ if (!cache)
+ return;
+
+ (void) blkid_flush_cache(cache);
+
+ DBG(DEBUG_CACHE, printf("freeing cache struct\n"));
+
+ /* DBG(DEBUG_CACHE, blkid_debug_dump_cache(cache)); */
+
+ while (!list_empty(&cache->bic_devs)) {
+ blkid_dev dev = list_entry(cache->bic_devs.next,
+ struct blkid_struct_dev,
+ bid_devs);
+ blkid_free_dev(dev);
+ }
+
+ while (!list_empty(&cache->bic_tags)) {
+ blkid_tag tag = list_entry(cache->bic_tags.next,
+ struct blkid_struct_tag,
+ bit_tags);
+
+ while (!list_empty(&tag->bit_names)) {
+ blkid_tag bad = list_entry(tag->bit_names.next,
+ struct blkid_struct_tag,
+ bit_names);
+
+ DBG(DEBUG_CACHE, printf("warning: unfreed tag %s=%s\n",
+ bad->bit_name, bad->bit_val));
+ blkid_free_tag(bad);
+ }
+ blkid_free_tag(tag);
+ }
+ free(cache->bic_filename);
+
+ free(cache);
+}
+
+void blkid_gc_cache(blkid_cache cache)
+{
+ struct list_head *p, *pnext;
+ struct stat st;
+
+ if (!cache)
+ return;
+
+ list_for_each_safe(p, pnext, &cache->bic_devs) {
+ blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs);
+ if (stat(dev->bid_name, &st) < 0) {
+ DBG(DEBUG_CACHE,
+ printf("freeing %s\n", dev->bid_name));
+ blkid_free_dev(dev);
+ cache->bic_flags |= BLKID_BIC_FL_CHANGED;
+ } else {
+ DBG(DEBUG_CACHE,
+ printf("Device %s exists\n", dev->bid_name));
+ }
+ }
+}
+
+
+#ifdef TEST_PROGRAM
+int main(int argc, char** argv)
+{
+ blkid_cache cache = NULL;
+ int ret;
+
+ blkid_debug_mask = DEBUG_ALL;
+ if ((argc > 2)) {
+ fprintf(stderr, "Usage: %s [filename] \n", argv[0]);
+ exit(1);
+ }
+
+ if ((ret = blkid_get_cache(&cache, argv[1])) < 0) {
+ fprintf(stderr, "error %d parsing cache file %s\n", ret,
+ argv[1] ? argv[1] : BLKID_CACHE_FILE);
+ exit(1);
+ }
+ if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+ fprintf(stderr, "%s: error creating cache (%d)\n",
+ argv[0], ret);
+ exit(1);
+ }
+ if ((ret = blkid_probe_all(cache) < 0))
+ fprintf(stderr, "error probing devices\n");
+
+ blkid_put_cache(cache);
+
+ return ret;
+}
+#endif
diff --git a/lib/blkid/dev.c b/lib/blkid/dev.c
new file mode 100644
index 0000000..1d62dd8
--- /dev/null
+++ b/lib/blkid/dev.c
@@ -0,0 +1,254 @@
+/*
+ * dev.c - allocation/initialization/free routines for dev
+ *
+ * Copyright (C) 2001 Andreas Dilger
+ * Copyright (C) 2003 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+
+#include "blkidP.h"
+
+blkid_dev blkid_new_dev(void)
+{
+ blkid_dev dev;
+
+ if (!(dev = (blkid_dev) calloc(1, sizeof(struct blkid_struct_dev))))
+ return NULL;
+
+ INIT_LIST_HEAD(&dev->bid_devs);
+ INIT_LIST_HEAD(&dev->bid_tags);
+
+ return dev;
+}
+
+void blkid_free_dev(blkid_dev dev)
+{
+ if (!dev)
+ return;
+
+ DBG(DEBUG_DEV,
+ printf(" freeing dev %s (%s)\n", dev->bid_name, dev->bid_type ?
+ dev->bid_type : "(null)"));
+ DBG(DEBUG_DEV, blkid_debug_dump_dev(dev));
+
+ list_del(&dev->bid_devs);
+ while (!list_empty(&dev->bid_tags)) {
+ blkid_tag tag = list_entry(dev->bid_tags.next,
+ struct blkid_struct_tag,
+ bit_tags);
+ blkid_free_tag(tag);
+ }
+ free(dev->bid_name);
+ free(dev);
+}
+
+/*
+ * Given a blkid device, return its name
+ */
+extern const char *blkid_dev_devname(blkid_dev dev)
+{
+ return dev->bid_name;
+}
+
+#ifdef CONFIG_BLKID_DEBUG
+void blkid_debug_dump_dev(blkid_dev dev)
+{
+ struct list_head *p;
+
+ if (!dev) {
+ printf(" dev: NULL\n");
+ return;
+ }
+
+ printf(" dev: name = %s\n", dev->bid_name);
+ printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno);
+ printf(" dev: TIME=\"%ld\"\n", (long)dev->bid_time);
+ printf(" dev: PRI=\"%d\"\n", dev->bid_pri);
+ printf(" dev: flags = 0x%08X\n", dev->bid_flags);
+
+ list_for_each(p, &dev->bid_tags) {
+ blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags);
+ if (tag)
+ printf(" tag: %s=\"%s\"\n", tag->bit_name,
+ tag->bit_val);
+ else
+ printf(" tag: NULL\n");
+ }
+ printf("\n");
+}
+#endif
+
+/*
+ * dev iteration routines for the public libblkid interface.
+ *
+ * These routines do not expose the list.h implementation, which are a
+ * contamination of the namespace, and which force us to reveal far, far
+ * too much of our internal implementation. I'm not convinced I want
+ * to keep list.h in the long term, anyway. It's fine for kernel
+ * programming, but performance is not the #1 priority for this
+ * library, and I really don't like the tradeoff of type-safety for
+ * performance for this application. [tytso:20030125.2007EST]
+ */
+
+/*
+ * This series of functions iterate over all devices in a blkid cache
+ */
+#define DEV_ITERATE_MAGIC 0x01a5284c
+
+struct blkid_struct_dev_iterate {
+ int magic;
+ blkid_cache cache;
+ char *search_type;
+ char *search_value;
+ struct list_head *p;
+};
+
+extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache)
+{
+ blkid_dev_iterate iter;
+
+ iter = malloc(sizeof(struct blkid_struct_dev_iterate));
+ if (iter) {
+ iter->magic = DEV_ITERATE_MAGIC;
+ iter->cache = cache;
+ iter->p = cache->bic_devs.next;
+ iter->search_type = 0;
+ iter->search_value = 0;
+ }
+ return (iter);
+}
+
+extern int blkid_dev_set_search(blkid_dev_iterate iter,
+ char *search_type, char *search_value)
+{
+ char *new_type, *new_value;
+
+ if (!iter || iter->magic != DEV_ITERATE_MAGIC || !search_type ||
+ !search_value)
+ return -1;
+ new_type = malloc(strlen(search_type)+1);
+ new_value = malloc(strlen(search_value)+1);
+ if (!new_type || !new_value) {
+ free(new_type);
+ free(new_value);
+ return -1;
+ }
+ strcpy(new_type, search_type);
+ strcpy(new_value, search_value);
+ free(iter->search_type);
+ free(iter->search_value);
+ iter->search_type = new_type;
+ iter->search_value = new_value;
+ return 0;
+}
+
+/*
+ * Return 0 on success, -1 on error
+ */
+extern int blkid_dev_next(blkid_dev_iterate iter,
+ blkid_dev *ret_dev)
+{
+ blkid_dev dev;
+
+ *ret_dev = 0;
+ if (!iter || iter->magic != DEV_ITERATE_MAGIC)
+ return -1;
+ while (iter->p != &iter->cache->bic_devs) {
+ dev = list_entry(iter->p, struct blkid_struct_dev, bid_devs);
+ iter->p = iter->p->next;
+ if (iter->search_type &&
+ !blkid_dev_has_tag(dev, iter->search_type,
+ iter->search_value))
+ continue;
+ *ret_dev = dev;
+ return 0;
+ }
+ return -1;
+}
+
+extern void blkid_dev_iterate_end(blkid_dev_iterate iter)
+{
+ if (!iter || iter->magic != DEV_ITERATE_MAGIC)
+ return;
+ iter->magic = 0;
+ free(iter);
+}
+
+#ifdef TEST_PROGRAM
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+
+void usage(char *prog)
+{
+ fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask]\n", prog);
+ fprintf(stderr, "\tList all devices and exit\n");
+ exit(1);
+}
+
+int main(int argc, char **argv)
+{
+ blkid_dev_iterate iter;
+ blkid_cache cache = NULL;
+ blkid_dev dev;
+ int c, ret;
+ char *tmp;
+ char *file = NULL;
+ char *search_type = NULL;
+ char *search_value = NULL;
+
+ while ((c = getopt (argc, argv, "m:f:")) != EOF)
+ switch (c) {
+ case 'f':
+ file = optarg;
+ break;
+ case 'm':
+ blkid_debug_mask = strtoul (optarg, &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, "Invalid debug mask: %s\n",
+ optarg);
+ exit(1);
+ }
+ break;
+ case '?':
+ usage(argv[0]);
+ }
+ if (argc >= optind+2) {
+ search_type = argv[optind];
+ search_value = argv[optind+1];
+ optind += 2;
+ }
+ if (argc != optind)
+ usage(argv[0]);
+
+ if ((ret = blkid_get_cache(&cache, file)) != 0) {
+ fprintf(stderr, "%s: error creating cache (%d)\n",
+ argv[0], ret);
+ exit(1);
+ }
+
+ iter = blkid_dev_iterate_begin(cache);
+ if (search_type)
+ blkid_dev_set_search(iter, search_type, search_value);
+ while (blkid_dev_next(iter, &dev) == 0) {
+ printf("Device: %s\n", blkid_dev_devname(dev));
+ }
+ blkid_dev_iterate_end(iter);
+
+
+ blkid_put_cache(cache);
+ return (0);
+}
+#endif
diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c
new file mode 100644
index 0000000..6a21963
--- /dev/null
+++ b/lib/blkid/devname.c
@@ -0,0 +1,561 @@
+/*
+ * devname.c - get a dev by its device inode name
+ *
+ * Copyright (C) Andries Brouwer
+ * Copyright (C) 1999, 2000, 2001, 2002, 2003 Theodore Ts'o
+ * Copyright (C) 2001 Andreas Dilger
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#define _GNU_SOURCE 1
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <dirent.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h>
+#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+#include <time.h>
+
+#include "blkidP.h"
+
+/*
+ * Find a dev struct in the cache by device name, if available.
+ *
+ * If there is no entry with the specified device name, and the create
+ * flag is set, then create an empty device entry.
+ */
+blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags)
+{
+ blkid_dev dev = NULL, tmp;
+ struct list_head *p, *pnext;
+
+ if (!cache || !devname)
+ return NULL;
+
+ list_for_each(p, &cache->bic_devs) {
+ tmp = list_entry(p, struct blkid_struct_dev, bid_devs);
+ if (strcmp(tmp->bid_name, devname))
+ continue;
+
+ DBG(DEBUG_DEVNAME,
+ printf("found devname %s in cache\n", tmp->bid_name));
+ dev = tmp;
+ break;
+ }
+
+ if (!dev && (flags & BLKID_DEV_CREATE)) {
+ if (access(devname, F_OK) < 0)
+ return NULL;
+ dev = blkid_new_dev();
+ if (!dev)
+ return NULL;
+ dev->bid_time = INT_MIN;
+ dev->bid_name = blkid_strdup(devname);
+ dev->bid_cache = cache;
+ list_add_tail(&dev->bid_devs, &cache->bic_devs);
+ cache->bic_flags |= BLKID_BIC_FL_CHANGED;
+ }
+
+ if (flags & BLKID_DEV_VERIFY) {
+ dev = blkid_verify(cache, dev);
+ if (!dev || !(dev->bid_flags & BLKID_BID_FL_VERIFIED))
+ return dev;
+ /*
+ * If the device is verified, then search the blkid
+ * cache for any entries that match on the type, uuid,
+ * and label, and verify them; if a cache entry can
+ * not be verified, then it's stale and so we remove
+ * it.
+ */
+ list_for_each_safe(p, pnext, &cache->bic_devs) {
+ blkid_dev dev2;
+ dev2 = list_entry(p, struct blkid_struct_dev, bid_devs);
+ if (dev2->bid_flags & BLKID_BID_FL_VERIFIED)
+ continue;
+ if (!dev->bid_type || !dev2->bid_type ||
+ strcmp(dev->bid_type, dev2->bid_type))
+ continue;
+ if (dev->bid_label && dev2->bid_label &&
+ strcmp(dev->bid_label, dev2->bid_label))
+ continue;
+ if (dev->bid_uuid && dev2->bid_uuid &&
+ strcmp(dev->bid_uuid, dev2->bid_uuid))
+ continue;
+ if ((dev->bid_label && !dev2->bid_label) ||
+ (!dev->bid_label && dev2->bid_label) ||
+ (dev->bid_uuid && !dev2->bid_uuid) ||
+ (!dev->bid_uuid && dev2->bid_uuid))
+ continue;
+ dev2 = blkid_verify(cache, dev2);
+ if (dev2 && !(dev2->bid_flags & BLKID_BID_FL_VERIFIED))
+ blkid_free_dev(dev2);
+ }
+ }
+ return dev;
+}
+
+/* Directories where we will try to search for device names */
+static const char *dirlist[] = { "/dev", "/devfs", "/devices", NULL };
+
+static int is_dm_leaf(const char *devname)
+{
+ struct dirent *de, *d_de;
+ DIR *dir, *d_dir;
+ char path[300];
+ int ret = 1;
+
+ if ((dir = opendir("/sys/block")) == NULL)
+ return 0;
+ while ((de = readdir(dir)) != NULL) {
+ if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, "..") ||
+ !strcmp(de->d_name, devname) ||
+ strncmp(de->d_name, "dm-", 3) ||
+ strlen(de->d_name) > sizeof(path)-32)
+ continue;
+ sprintf(path, "/sys/block/%s/slaves", de->d_name);
+ if ((d_dir = opendir(path)) == NULL)
+ continue;
+ while ((d_de = readdir(d_dir)) != NULL) {
+ if (!strcmp(d_de->d_name, devname)) {
+ ret = 0;
+ break;
+ }
+ }
+ closedir(d_dir);
+ if (!ret)
+ break;
+ }
+ closedir(dir);
+ return ret;
+}
+
+/*
+ * Since 2.6.29 (patch 784aae735d9b0bba3f8b9faef4c8b30df3bf0128) kernel sysfs
+ * provides the real DM device names in /sys/block/<ptname>/dm/name
+ */
+static char *get_dm_name(const char *ptname)
+{
+ FILE *f;
+ size_t sz;
+ char path[300], name[256], *res = NULL;
+
+ snprintf(path, sizeof(path), "/sys/block/%s/dm/name", ptname);
+ if ((f = fopen(path, "r")) == NULL)
+ return NULL;
+
+ /* read "<name>\n" from sysfs */
+ if (fgets(name, sizeof(name), f) && (sz = strlen(name)) > 1) {
+ name[sz - 1] = '\0';
+ snprintf(path, sizeof(path), "/dev/mapper/%s", name);
+ res = blkid_strdup(path);
+ }
+ fclose(f);
+ return res;
+}
+
+/*
+ * Probe a single block device to add to the device cache.
+ */
+static void probe_one(blkid_cache cache, const char *ptname,
+ dev_t devno, int pri, int only_if_new)
+{
+ blkid_dev dev = NULL;
+ struct list_head *p, *pnext;
+ const char **dir;
+ char *devname = NULL;
+
+ /* See if we already have this device number in the cache. */
+ list_for_each_safe(p, pnext, &cache->bic_devs) {
+ blkid_dev tmp = list_entry(p, struct blkid_struct_dev,
+ bid_devs);
+ if (tmp->bid_devno == devno) {
+ if (only_if_new && !access(tmp->bid_name, F_OK))
+ return;
+ dev = blkid_verify(cache, tmp);
+ if (dev && (dev->bid_flags & BLKID_BID_FL_VERIFIED))
+ break;
+ dev = 0;
+ }
+ }
+ if (dev && dev->bid_devno == devno)
+ goto set_pri;
+
+ /* Try to translate private device-mapper dm-<N> names
+ * to standard /dev/mapper/<name>.
+ */
+ if (!strncmp(ptname, "dm-", 3) && isdigit(ptname[3])) {
+ devname = get_dm_name(ptname);
+ if (!devname)
+ blkid__scan_dir("/dev/mapper", devno, 0, &devname);
+ if (devname)
+ goto get_dev;
+ }
+
+ /*
+ * Take a quick look at /dev/ptname for the device number. We check
+ * all of the likely device directories. If we don't find it, or if
+ * the stat information doesn't check out, use blkid_devno_to_devname()
+ * to find it via an exhaustive search for the device major/minor.
+ */
+ for (dir = dirlist; *dir; dir++) {
+ struct stat st;
+ char device[256];
+
+ sprintf(device, "%s/%s", *dir, ptname);
+ if ((dev = blkid_get_dev(cache, device, BLKID_DEV_FIND)) &&
+ dev->bid_devno == devno)
+ goto set_pri;
+
+ if (stat(device, &st) == 0 &&
+ blkidP_is_disk_device(st.st_mode) &&
+ st.st_rdev == devno) {
+ devname = blkid_strdup(device);
+ goto get_dev;
+ }
+ }
+ /* Do a short-cut scan of /dev/mapper first */
+ if (!devname)
+ devname = get_dm_name(ptname);
+ if (!devname)
+ blkid__scan_dir("/dev/mapper", devno, 0, &devname);
+ if (!devname) {
+ devname = blkid_devno_to_devname(devno);
+ if (!devname)
+ return;
+ }
+get_dev:
+ dev = blkid_get_dev(cache, devname, BLKID_DEV_NORMAL);
+ free(devname);
+set_pri:
+ if (dev) {
+ if (pri)
+ dev->bid_pri = pri;
+ else if (!strncmp(dev->bid_name, "/dev/mapper/", 11)) {
+ dev->bid_pri = BLKID_PRI_DM;
+ if (is_dm_leaf(ptname))
+ dev->bid_pri += 5;
+ } else if (!strncmp(ptname, "md", 2))
+ dev->bid_pri = BLKID_PRI_MD;
+ }
+ return;
+}
+
+#define PROC_PARTITIONS "/proc/partitions"
+#define VG_DIR "/proc/lvm/VGs"
+
+/*
+ * This function initializes the UUID cache with devices from the LVM
+ * proc hierarchy. We currently depend on the names of the LVM
+ * hierarchy giving us the device structure in /dev. (XXX is this a
+ * safe thing to do?)
+ */
+#ifdef VG_DIR
+static dev_t lvm_get_devno(const char *lvm_device)
+{
+ FILE *lvf;
+ char buf[1024];
+ int ma, mi;
+ dev_t ret = 0;
+
+ DBG(DEBUG_DEVNAME, printf("opening %s\n", lvm_device));
+ if ((lvf = fopen(lvm_device, "r")) == NULL) {
+ DBG(DEBUG_DEVNAME, printf("%s: (%d) %s\n", lvm_device, errno,
+ strerror(errno)));
+ return 0;
+ }
+
+ while (fgets(buf, sizeof(buf), lvf)) {
+ if (sscanf(buf, "device: %d:%d", &ma, &mi) == 2) {
+ ret = makedev(ma, mi);
+ break;
+ }
+ }
+ fclose(lvf);
+
+ return ret;
+}
+
+static void lvm_probe_all(blkid_cache cache, int only_if_new)
+{
+ DIR *vg_list;
+ struct dirent *vg_iter;
+ int vg_len = strlen(VG_DIR);
+ dev_t dev;
+
+ if ((vg_list = opendir(VG_DIR)) == NULL)
+ return;
+
+ DBG(DEBUG_DEVNAME, printf("probing LVM devices under %s\n", VG_DIR));
+
+ while ((vg_iter = readdir(vg_list)) != NULL) {
+ DIR *lv_list;
+ char *vdirname;
+ char *vg_name;
+ struct dirent *lv_iter;
+
+ vg_name = vg_iter->d_name;
+ if (!strcmp(vg_name, ".") || !strcmp(vg_name, ".."))
+ continue;
+ vdirname = malloc(vg_len + strlen(vg_name) + 8);
+ if (!vdirname)
+ goto exit;
+ sprintf(vdirname, "%s/%s/LVs", VG_DIR, vg_name);
+
+ lv_list = opendir(vdirname);
+ free(vdirname);
+ if (lv_list == NULL)
+ continue;
+
+ while ((lv_iter = readdir(lv_list)) != NULL) {
+ char *lv_name, *lvm_device;
+
+ lv_name = lv_iter->d_name;
+ if (!strcmp(lv_name, ".") || !strcmp(lv_name, ".."))
+ continue;
+
+ lvm_device = malloc(vg_len + strlen(vg_name) +
+ strlen(lv_name) + 8);
+ if (!lvm_device) {
+ closedir(lv_list);
+ goto exit;
+ }
+ sprintf(lvm_device, "%s/%s/LVs/%s", VG_DIR, vg_name,
+ lv_name);
+ dev = lvm_get_devno(lvm_device);
+ sprintf(lvm_device, "%s/%s", vg_name, lv_name);
+ DBG(DEBUG_DEVNAME, printf("LVM dev %s: devno 0x%04X\n",
+ lvm_device,
+ (unsigned int) dev));
+ probe_one(cache, lvm_device, dev, BLKID_PRI_LVM,
+ only_if_new);
+ free(lvm_device);
+ }
+ closedir(lv_list);
+ }
+exit:
+ closedir(vg_list);
+}
+#endif
+
+#define PROC_EVMS_VOLUMES "/proc/evms/volumes"
+
+static int
+evms_probe_all(blkid_cache cache, int only_if_new)
+{
+ char line[100];
+ int ma, mi, sz, num = 0;
+ FILE *procpt;
+ char device[110];
+
+ procpt = fopen(PROC_EVMS_VOLUMES, "r");
+ if (!procpt)
+ return 0;
+ while (fgets(line, sizeof(line), procpt)) {
+ if (sscanf (line, " %d %d %d %*s %*s %[^\n ]",
+ &ma, &mi, &sz, device) != 4)
+ continue;
+
+ DBG(DEBUG_DEVNAME, printf("Checking partition %s (%d, %d)\n",
+ device, ma, mi));
+
+ probe_one(cache, device, makedev(ma, mi), BLKID_PRI_EVMS,
+ only_if_new);
+ num++;
+ }
+ fclose(procpt);
+ return num;
+}
+
+/*
+ * Read the device data for all available block devices in the system.
+ */
+static int probe_all(blkid_cache cache, int only_if_new)
+{
+ FILE *proc;
+ char line[1024];
+ char ptname0[129], ptname1[129], *ptname = 0;
+ char *ptnames[2];
+ dev_t devs[2];
+ int ma, mi;
+ unsigned long long sz;
+ int lens[2] = { 0, 0 };
+ int which = 0, last = 0;
+ struct list_head *p, *pnext;
+
+ ptnames[0] = ptname0;
+ ptnames[1] = ptname1;
+
+ if (!cache)
+ return -BLKID_ERR_PARAM;
+
+ if (cache->bic_flags & BLKID_BIC_FL_PROBED &&
+ time(0) - cache->bic_time < BLKID_PROBE_INTERVAL)
+ return 0;
+
+ blkid_read_cache(cache);
+ evms_probe_all(cache, only_if_new);
+#ifdef VG_DIR
+ lvm_probe_all(cache, only_if_new);
+#endif
+
+ proc = fopen(PROC_PARTITIONS, "r");
+ if (!proc)
+ return -BLKID_ERR_PROC;
+
+ while (fgets(line, sizeof(line), proc)) {
+ last = which;
+ which ^= 1;
+ ptname = ptnames[which];
+
+ if (sscanf(line, " %d %d %llu %128[^\n ]",
+ &ma, &mi, &sz, ptname) != 4)
+ continue;
+ devs[which] = makedev(ma, mi);
+
+ DBG(DEBUG_DEVNAME, printf("read partition name %s\n", ptname));
+
+ /* Skip whole disk devs unless they have no partitions.
+ * If base name of device has changed, also
+ * check previous dev to see if it didn't have a partn.
+ * heuristic: partition name ends in a digit, & partition
+ * names contain whole device name as substring.
+ *
+ * Skip extended partitions.
+ * heuristic: size is 1
+ *
+ * FIXME: skip /dev/{ida,cciss,rd} whole-disk devs
+ */
+
+ lens[which] = strlen(ptname);
+
+ /* ends in a digit, clearly a partition, so check */
+ if (isdigit(ptname[lens[which] - 1])) {
+ DBG(DEBUG_DEVNAME,
+ printf("partition dev %s, devno 0x%04X\n",
+ ptname, (unsigned int) devs[which]));
+
+ if (sz > 1)
+ probe_one(cache, ptname, devs[which], 0,
+ only_if_new);
+ lens[which] = 0; /* mark as checked */
+ }
+
+ /*
+ * If last was a whole disk and we just found a partition
+ * on it, remove the whole-disk dev from the cache if
+ * it exists.
+ */
+ if (lens[last] && !strncmp(ptnames[last], ptname, lens[last])) {
+ list_for_each_safe(p, pnext, &cache->bic_devs) {
+ blkid_dev tmp;
+
+ /* find blkid dev for the whole-disk devno */
+ tmp = list_entry(p, struct blkid_struct_dev,
+ bid_devs);
+ if (tmp->bid_devno == devs[last]) {
+ DBG(DEBUG_DEVNAME,
+ printf("freeing %s\n",
+ tmp->bid_name));
+ blkid_free_dev(tmp);
+ cache->bic_flags |= BLKID_BIC_FL_CHANGED;
+ break;
+ }
+ }
+ lens[last] = 0;
+ }
+ /*
+ * If last was not checked because it looked like a whole-disk
+ * dev, and the device's base name has changed,
+ * check last as well.
+ */
+ if (lens[last] && strncmp(ptnames[last], ptname, lens[last])) {
+ DBG(DEBUG_DEVNAME,
+ printf("whole dev %s, devno 0x%04X\n",
+ ptnames[last], (unsigned int) devs[last]));
+ probe_one(cache, ptnames[last], devs[last], 0,
+ only_if_new);
+ lens[last] = 0;
+ }
+ }
+
+ /* Handle the last device if it wasn't partitioned */
+ if (lens[which])
+ probe_one(cache, ptname, devs[which], 0, only_if_new);
+
+ fclose(proc);
+ blkid_flush_cache(cache);
+ return 0;
+}
+
+int blkid_probe_all(blkid_cache cache)
+{
+ int ret;
+
+ DBG(DEBUG_PROBE, printf("Begin blkid_probe_all()\n"));
+ ret = probe_all(cache, 0);
+ cache->bic_time = time(0);
+ cache->bic_flags |= BLKID_BIC_FL_PROBED;
+ DBG(DEBUG_PROBE, printf("End blkid_probe_all()\n"));
+ return ret;
+}
+
+int blkid_probe_all_new(blkid_cache cache)
+{
+ int ret;
+
+ DBG(DEBUG_PROBE, printf("Begin blkid_probe_all_new()\n"));
+ ret = probe_all(cache, 1);
+ DBG(DEBUG_PROBE, printf("End blkid_probe_all_new()\n"));
+ return ret;
+}
+
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ blkid_cache cache = NULL;
+ int ret;
+
+ blkid_debug_mask = DEBUG_ALL;
+ if (argc != 1) {
+ fprintf(stderr, "Usage: %s\n"
+ "Probe all devices and exit\n", argv[0]);
+ exit(1);
+ }
+ if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+ fprintf(stderr, "%s: error creating cache (%d)\n",
+ argv[0], ret);
+ exit(1);
+ }
+ if (blkid_probe_all(cache) < 0)
+ printf("%s: error probing devices\n", argv[0]);
+
+ blkid_put_cache(cache);
+ return (0);
+}
+#endif
diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c
new file mode 100644
index 0000000..b1cadc9
--- /dev/null
+++ b/lib/blkid/devno.c
@@ -0,0 +1,242 @@
+/*
+ * devno.c - find a particular device by its device number (major/minor)
+ *
+ * Copyright (C) 2000, 2001, 2003 Theodore Ts'o
+ * Copyright (C) 2001 Andreas Dilger
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <dirent.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h>
+#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+
+#include "blkidP.h"
+
+#if defined(__GNUC__) && __GNUC__ >= 8
+/* gcc incorrectly thinks the destination string is not being null-terminated */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
+
+char *blkid_strndup(const char *s, int length)
+{
+ char *ret;
+
+ if (!s)
+ return NULL;
+
+ if (!length)
+ length = strlen(s);
+
+ ret = malloc(length + 1);
+ if (ret) {
+ strncpy(ret, s, length);
+ ret[length] = '\0';
+ }
+ return ret;
+}
+
+#if defined(__GNUC__) && __GNUC__ >= 8
+#pragma GCC diagnostic pop
+#endif
+
+char *blkid_strdup(const char *s)
+{
+ return blkid_strndup(s, 0);
+}
+
+/*
+ * This function adds an entry to the directory list
+ */
+static void add_to_dirlist(const char *name, struct dir_list **list)
+{
+ struct dir_list *dp;
+
+ dp = malloc(sizeof(struct dir_list));
+ if (!dp)
+ return;
+ dp->name = blkid_strdup(name);
+ if (!dp->name) {
+ free(dp);
+ return;
+ }
+ dp->next = *list;
+ *list = dp;
+}
+
+/*
+ * This function frees a directory list
+ */
+static void free_dirlist(struct dir_list **list)
+{
+ struct dir_list *dp, *next;
+
+ for (dp = *list; dp; dp = next) {
+ next = dp->next;
+ free(dp->name);
+ free(dp);
+ }
+ *list = NULL;
+}
+
+void blkid__scan_dir(const char *dirname, dev_t devno, struct dir_list **list,
+ char **devname)
+{
+ DIR *dir;
+ struct dirent *dp;
+ char path[1024];
+ int dirlen;
+ struct stat st;
+
+ if ((dir = opendir(dirname)) == NULL)
+ return;
+ dirlen = strlen(dirname) + 2;
+ while ((dp = readdir(dir)) != 0) {
+ if (dirlen + strlen(dp->d_name) >= sizeof(path))
+ continue;
+
+ if (dp->d_name[0] == '.' &&
+ ((dp->d_name[1] == 0) ||
+ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0))))
+ continue;
+
+ sprintf(path, "%s/%s", dirname, dp->d_name);
+ if (stat(path, &st) < 0)
+ continue;
+
+ if (blkidP_is_disk_device(st.st_mode) && st.st_rdev == devno) {
+ *devname = blkid_strdup(path);
+ DBG(DEBUG_DEVNO,
+ printf("found 0x%llx at %s (%p)\n", (long long)devno,
+ path, *devname));
+ break;
+ }
+ if (list && S_ISDIR(st.st_mode) && !lstat(path, &st) &&
+ S_ISDIR(st.st_mode))
+ add_to_dirlist(path, list);
+ }
+ closedir(dir);
+ return;
+}
+
+/* Directories where we will try to search for device numbers */
+static const char *devdirs[] = { "/devices", "/devfs", "/dev", NULL };
+
+/*
+ * This function finds the pathname to a block device with a given
+ * device number. It returns a pointer to allocated memory to the
+ * pathname on success, and NULL on failure.
+ */
+char *blkid_devno_to_devname(dev_t devno)
+{
+ struct dir_list *list = NULL, *new_list = NULL;
+ char *devname = NULL;
+ const char **dir;
+
+ /*
+ * Add the starting directories to search in reverse order of
+ * importance, since we are using a stack...
+ */
+ for (dir = devdirs; *dir; dir++)
+ add_to_dirlist(*dir, &list);
+
+ while (list) {
+ struct dir_list *current = list;
+
+ list = list->next;
+ DBG(DEBUG_DEVNO, printf("directory %s\n", current->name));
+ blkid__scan_dir(current->name, devno, &new_list, &devname);
+ free(current->name);
+ free(current);
+ if (devname)
+ break;
+ /*
+ * If we're done checking at this level, descend to
+ * the next level of subdirectories. (breadth-first)
+ */
+ if (list == NULL) {
+ list = new_list;
+ new_list = NULL;
+ }
+ }
+ free_dirlist(&list);
+ free_dirlist(&new_list);
+
+ if (!devname) {
+ DBG(DEBUG_DEVNO,
+ printf("blkid: couldn't find devno 0x%04lx\n",
+ (unsigned long) devno));
+ } else {
+ DBG(DEBUG_DEVNO,
+ printf("found devno 0x%04llx as %s\n", (long long)devno, devname));
+ }
+
+
+ return devname;
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char** argv)
+{
+ char *devname, *tmp;
+ int major, minor;
+ dev_t devno;
+ const char *errmsg = "Couldn't parse %s: %s\n";
+
+ blkid_debug_mask = DEBUG_ALL;
+ if ((argc != 2) && (argc != 3)) {
+ fprintf(stderr, "Usage:\t%s device_number\n\t%s major minor\n"
+ "Resolve a device number to a device name\n",
+ argv[0], argv[0]);
+ exit(1);
+ }
+ if (argc == 2) {
+ devno = strtoul(argv[1], &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, errmsg, "device number", argv[1]);
+ exit(1);
+ }
+ } else {
+ major = strtoul(argv[1], &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, errmsg, "major number", argv[1]);
+ exit(1);
+ }
+ minor = strtoul(argv[2], &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, errmsg, "minor number", argv[2]);
+ exit(1);
+ }
+ devno = makedev(major, minor);
+ }
+ printf("Looking for device 0x%04llx\n", (long long)devno);
+ devname = blkid_devno_to_devname(devno);
+ free(devname);
+ return 0;
+}
+#endif
diff --git a/lib/blkid/getsize.c b/lib/blkid/getsize.c
new file mode 100644
index 0000000..7a6e6fd
--- /dev/null
+++ b/lib/blkid/getsize.c
@@ -0,0 +1,217 @@
+/*
+ * getsize.c --- get the size of a partition.
+ *
+ * Copyright (C) 1995, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include "blkidP.h"
+
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_LINUX_FD_H
+#include <linux/fd.h>
+#endif
+#ifdef HAVE_SYS_DISKLABEL_H
+#include <sys/disklabel.h>
+#endif
+#ifdef HAVE_SYS_DISK_H
+#include <sys/disk.h>
+#endif
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+
+#if defined(__linux__) && defined(_IO) && !defined(BLKGETSIZE)
+#define BLKGETSIZE _IO(0x12,96) /* return device size */
+#endif
+
+#if defined(__linux__) && defined(_IOR) && !defined(BLKGETSIZE64)
+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */
+#endif
+
+#ifdef APPLE_DARWIN
+#define BLKGETSIZE DKIOCGETBLOCKCOUNT32
+#endif /* APPLE_DARWIN */
+
+static int valid_offset(int fd, blkid_loff_t offset)
+{
+ char ch;
+
+ if (blkid_llseek(fd, offset, 0) < 0)
+ return 0;
+ if (read(fd, &ch, 1) < 1)
+ return 0;
+ return 1;
+}
+
+/*
+ * Returns the number of bytes in a partition
+ */
+blkid_loff_t blkid_get_dev_size(int fd)
+{
+ unsigned long long size64 __BLKID_ATTR((unused));
+ blkid_loff_t high, low;
+
+#if defined DKIOCGETBLOCKCOUNT && defined DKIOCGETBLOCKSIZE /* For Apple Darwin */
+ unsigned int size;
+
+ if (ioctl(fd, DKIOCGETBLOCKCOUNT, &size64) >= 0 &&
+ ioctl(fd, DKIOCGETBLOCKSIZE, &size) >= 0) {
+ if (sizeof(blkid_loff_t) < sizeof(unsigned long long) &&
+ (size64 * size) > 0xFFFFFFFF)
+ return 0; /* EFBIG */
+ return (blkid_loff_t)size64 * size;
+ }
+#endif
+
+#ifdef BLKGETSIZE64
+ {
+ int valid_blkgetsize64 = 1;
+#ifdef __linux__
+ struct utsname ut;
+
+ if ((uname(&ut) == 0) &&
+ ((ut.release[0] == '2') && (ut.release[1] == '.') &&
+ (ut.release[2] < '6') && (ut.release[3] == '.')))
+ valid_blkgetsize64 = 0;
+#endif
+ if (valid_blkgetsize64 &&
+ ioctl(fd, BLKGETSIZE64, &size64) >= 0) {
+ if (sizeof(blkid_loff_t) < sizeof(unsigned long long) &&
+ (size64 > 0xFFFFFFFF))
+ return 0; /* EFBIG */
+ return size64;
+ }
+ }
+#endif /* BLKGETSIZE64 */
+
+#ifdef BLKGETSIZE
+ {
+ unsigned long size;
+
+ if (ioctl(fd, BLKGETSIZE, &size) >= 0)
+ return (blkid_loff_t)size << 9;
+ }
+#endif
+
+/* tested on FreeBSD 6.1-RELEASE i386 */
+#ifdef DIOCGMEDIASIZE
+ if (ioctl(fd, DIOCGMEDIASIZE, &size64) >= 0)
+ return (off_t)size64;
+#endif /* DIOCGMEDIASIZE */
+
+#ifdef FDGETPRM
+ {
+ struct floppy_struct this_floppy;
+
+ if (ioctl(fd, FDGETPRM, &this_floppy) >= 0)
+ return (blkid_loff_t)this_floppy.size << 9;
+ }
+#endif
+#if defined(HAVE_SYS_DISKLABEL_H) && defined(DIOCGDINFO)
+ {
+ int part = -1;
+ struct disklabel lab;
+ struct partition *pp;
+ char ch;
+ struct stat st;
+
+ /*
+ * This code works for FreeBSD 4.11 i386, except for the full
+ * device (such as /dev/ad0). It doesn't work properly for
+ * newer FreeBSD though. FreeBSD >= 5.0 should be covered by
+ * the DIOCGMEDIASIZE above however.
+ *
+ * Note that FreeBSD >= 4.0 has disk devices as unbuffered (raw,
+ * character) devices, so we need to check for S_ISCHR, too.
+ */
+ if (fstat(fd, &st) >= 0 &&
+ blkidP_is_disk_device(st.st_mode))
+ part = st.st_rdev & 7;
+
+ if (part >= 0 && (ioctl(fd, DIOCGDINFO, (char *)&lab) >= 0)) {
+ pp = &lab.d_partitions[part];
+ if (pp->p_size)
+ return pp->p_size << 9;
+ }
+ }
+#endif /* defined(HAVE_SYS_DISKLABEL_H) && defined(DIOCGDINFO) */
+ {
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ struct stat64 st;
+ if (fstat64(fd, &st) == 0)
+#else
+ struct stat st;
+ if (fstat(fd, &st) == 0)
+#endif
+ if (S_ISREG(st.st_mode))
+ return st.st_size;
+ }
+
+ /*
+ * OK, we couldn't figure it out by using a specialized ioctl,
+ * which is generally the best way. So do binary search to
+ * find the size of the partition.
+ */
+ low = 0;
+ for (high = 1024; valid_offset(fd, high); high *= 2)
+ low = high;
+ while (low < high - 1) {
+ const blkid_loff_t mid = (low + high) / 2;
+
+ if (valid_offset(fd, mid))
+ low = mid;
+ else
+ high = mid;
+ }
+ return low + 1;
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ long long bytes;
+ int fd;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: %s device\n"
+ "Determine the size of a device\n", argv[0]);
+ return 1;
+ }
+
+ if ((fd = open(argv[1], O_RDONLY)) < 0)
+ perror(argv[0]);
+
+ bytes = blkid_get_dev_size(fd);
+ printf("Device %s has %lld 1k blocks.\n", argv[1],
+ (unsigned long long)bytes >> 10);
+
+ return 0;
+}
+#endif
diff --git a/lib/blkid/libblkid.3.in b/lib/blkid/libblkid.3.in
new file mode 100644
index 0000000..18c4a27
--- /dev/null
+++ b/lib/blkid/libblkid.3.in
@@ -0,0 +1,80 @@
+.\" Copyright 2001 Andreas Dilger (adilger@turbolinux.com)
+.\"
+.\" This man page was created for libblkid.so.1.0 from e2fsprogs-1.24.
+.\"
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.\" Created Wed Sep 14 12:02:12 2001, Andreas Dilger
+.TH LIBBLKID 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+libblkid \- block device identification library
+.SH SYNOPSIS
+.B #include <blkid/blkid.h>
+.sp
+.B cc
+.I file.c
+.B \-lblkid
+.SH DESCRIPTION
+The
+.B libblkid
+library is used to identify block devices (disks) as to their content (e.g.
+file system type) as well as extracting additional information such as
+file system labels/volume names, unique identifiers/serial numbers, etc.
+A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
+specific block device names into configuration files.
+.P
+Block device information is normally kept in a cache file
+.I /etc/blkid.tab
+and is verified to still be valid before being returned to the user
+(if the user has read permission on the raw block device, otherwise not).
+The cache file also allows unprivileged users (normally anyone other
+than root, or those not in the "disk" group) to locate devices by label/id.
+The standard location of the cache file can be overridden by the
+environment variable BLKID_FILE.
+.P
+In situations where one is getting information about a single known device,
+it does not impact performance whether the cache is used or not (unless you
+are not able to read the block device directly). If you are dealing with
+multiple devices, use of the cache is highly recommended (even if empty) as
+devices will be scanned at most one time and the on-disk cache will be
+updated if possible. There is rarely a reason not to use the cache.
+.P
+In some cases (modular kernels), block devices are not even visible until
+after they are accessed the first time, so it is critical that there is
+some way to locate these devices without enumerating only visible devices,
+so the use of the cache file is
+.B required
+in this situation.
+.SH AUTHOR
+.B libblkid
+was written by Andreas Dilger for the ext2 file system utilities, with input
+from Ted Ts'o. The library was subsequently heavily modified by Ted Ts'o.
+.SH FILES
+.TP
+.I /etc/blkid.tab
+Caches data extracted from each recognized block device.
+.SH AVAILABILITY
+.B libblkid
+is part of the e2fsprogs package since version 1.33 and is available from
+http://e2fsprogs.sourceforge.net.
+.SH COPYING
+.B libblkid
+is available under the terms of the GNU Library General Public License (LGPL),
+version 2 (or at your discretion any later version). A copy of the LGPL
+should be included with this library in the file COPYING. If not, write to
+.RS
+Free Software Foundation, Inc.
+.br
+51 Franklin St
+.br
+Fifth Floor
+.br
+Boston, MA 02110-1301 USA
+.RE
+.PP
+or visit
+.UR http://www.gnu.org/licenses/licenses.html#LGPL
+http://www.gnu.org/licenses/licenses.html#LGPL
+.UE
+.SH "SEE ALSO"
+.BR blkid (8)
diff --git a/lib/blkid/list.h b/lib/blkid/list.h
new file mode 100644
index 0000000..eb1c513
--- /dev/null
+++ b/lib/blkid/list.h
@@ -0,0 +1,184 @@
+#if !defined(_BLKID_LIST_H) && !defined(LIST_HEAD_INIT)
+#define _BLKID_LIST_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+#ifdef __GNUC__
+#define _INLINE_ static __inline__
+#else /* For Watcom C */
+#define _INLINE_ static inline
+#endif
+
+/*
+ * Simple doubly linked list implementation.
+ *
+ * Some of the internal functions ("__xxx") are useful when
+ * manipulating whole lists rather than single entries, as
+ * sometimes we already know the next/prev entries and we can
+ * generate better code by using them directly rather than
+ * using the generic single-entry routines.
+ */
+
+struct list_head {
+ struct list_head *next, *prev;
+};
+
+#define LIST_HEAD_INIT(name) { &(name), &(name) }
+
+#define INIT_LIST_HEAD(ptr) do { \
+ (ptr)->next = (ptr); (ptr)->prev = (ptr); \
+} while (0)
+
+/*
+ * Insert a new entry between two known consecutive entries.
+ *
+ * This is only for internal list manipulation where we know
+ * the prev/next entries already!
+ */
+_INLINE_ void __list_add(struct list_head * add,
+ struct list_head * prev,
+ struct list_head * next)
+{
+ next->prev = add;
+ add->next = next;
+ add->prev = prev;
+ prev->next = add;
+}
+
+/**
+ * list_add - add a new entry
+ * @add: new entry to be added
+ * @head: list head to add it after
+ *
+ * Insert a new entry after the specified head.
+ * This is good for implementing stacks.
+ */
+_INLINE_ void list_add(struct list_head *add, struct list_head *head)
+{
+ __list_add(add, head, head->next);
+}
+
+/**
+ * list_add_tail - add a new entry
+ * @add: new entry to be added
+ * @head: list head to add it before
+ *
+ * Insert a new entry before the specified head.
+ * This is useful for implementing queues.
+ */
+_INLINE_ void list_add_tail(struct list_head *add, struct list_head *head)
+{
+ __list_add(add, head->prev, head);
+}
+
+/*
+ * Delete a list entry by making the prev/next entries
+ * point to each other.
+ *
+ * This is only for internal list manipulation where we know
+ * the prev/next entries already!
+ */
+_INLINE_ void __list_del(struct list_head * prev,
+ struct list_head * next)
+{
+ next->prev = prev;
+ prev->next = next;
+}
+
+/**
+ * list_del - deletes entry from list.
+ * @entry: the element to delete from the list.
+ *
+ * list_empty() on @entry does not return true after this, @entry is
+ * in an undefined state.
+ */
+_INLINE_ void list_del(struct list_head *entry)
+{
+ __list_del(entry->prev, entry->next);
+}
+
+/**
+ * list_del_init - deletes entry from list and reinitialize it.
+ * @entry: the element to delete from the list.
+ */
+_INLINE_ void list_del_init(struct list_head *entry)
+{
+ __list_del(entry->prev, entry->next);
+ INIT_LIST_HEAD(entry);
+}
+
+/**
+ * list_empty - tests whether a list is empty
+ * @head: the list to test.
+ */
+_INLINE_ int list_empty(struct list_head *head)
+{
+ return head->next == head;
+}
+
+/**
+ * list_splice - join two lists
+ * @list: the new list to add.
+ * @head: the place to add it in the first list.
+ */
+_INLINE_ void list_splice(struct list_head *list, struct list_head *head)
+{
+ struct list_head *first = list->next;
+
+ if (first != list) {
+ struct list_head *last = list->prev;
+ struct list_head *at = head->next;
+
+ first->prev = head;
+ head->next = first;
+
+ last->next = at;
+ at->prev = last;
+ }
+}
+
+/**
+ * list_entry - get the struct for this entry
+ * @ptr: the &struct list_head pointer.
+ * @type: the type of the struct this is embedded in.
+ * @member: the name of the list_struct within the struct.
+ */
+#define list_entry(ptr, type, member) \
+ ((type *)((char *)(ptr)-(unsigned long)(intptr_t)(&((type *)0)->member)))
+
+/**
+ * list_for_each - iterate over elements in a list
+ * @pos: the &struct list_head to use as a loop counter.
+ * @head: the head for your list.
+ */
+#define list_for_each(pos, head) \
+ for (pos = (head)->next; pos != (head); pos = pos->next)
+
+/**
+ * list_for_each_safe - iterate over elements in a list, but don't dereference
+ * pos after the body is done (in case it is freed)
+ * @pos: the &struct list_head to use as a loop counter.
+ * @pnext: the &struct list_head to use as a pointer to the next item.
+ * @head: the head for your list (not included in iteration).
+ */
+#define list_for_each_safe(pos, pnext, head) \
+ for (pos = (head)->next, pnext = pos->next; pos != (head); \
+ pos = pnext, pnext = pos->next)
+
+#undef _INLINE_
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BLKID_LIST_H */
diff --git a/lib/blkid/llseek.c b/lib/blkid/llseek.c
new file mode 100644
index 0000000..5929864
--- /dev/null
+++ b/lib/blkid/llseek.c
@@ -0,0 +1,147 @@
+/*
+ * llseek.c -- stub calling the llseek system call
+ *
+ * Copyright (C) 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef __MSDOS__
+#include <io.h>
+#endif
+
+#include "blkidP.h"
+
+#ifdef __linux__
+
+#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
+
+#define my_llseek lseek64
+
+#elif defined(HAVE_LLSEEK)
+#include <sys/syscall.h>
+
+#ifndef HAVE_LLSEEK_PROTOTYPE
+extern long long llseek(int fd, long long offset, int origin);
+#endif
+
+#define my_llseek llseek
+
+#else /* ! HAVE_LLSEEK */
+
+#if SIZEOF_LONG == SIZEOF_LONG_LONG
+
+#define llseek lseek
+
+#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
+
+#include <linux/unistd.h>
+
+#ifndef __NR__llseek
+#define __NR__llseek 140
+#endif
+
+#ifndef __i386__
+static int _llseek(unsigned int, unsigned long, unsigned long,
+ blkid_loff_t *, unsigned int);
+
+static _syscall5(int, _llseek, unsigned int, fd, unsigned long, offset_high,
+ unsigned long, offset_low, blkid_loff_t *, result,
+ unsigned int, origin)
+#endif
+
+static blkid_loff_t my_llseek(int fd, blkid_loff_t offset, int origin)
+{
+ blkid_loff_t result;
+ int retval;
+
+#ifndef __i386__
+ retval = _llseek(fd, ((unsigned long long) offset) >> 32,
+ ((unsigned long long)offset) & 0xffffffff,
+ &result, origin);
+#else
+ retval = syscall(__NR__llseek, fd, ((unsigned long long) offset) >> 32,
+ ((unsigned long long)offset) & 0xffffffff,
+ &result, origin);
+#endif
+ return (retval == -1 ? (blkid_loff_t) retval : result);
+}
+
+#endif /* __alpha__ || __ia64__ */
+
+#endif /* HAVE_LLSEEK */
+
+blkid_loff_t blkid_llseek(int fd, blkid_loff_t offset, int whence)
+{
+ blkid_loff_t result;
+ static int do_compat = 0;
+
+ if ((sizeof(off_t) >= sizeof(blkid_loff_t)) ||
+ (offset < ((blkid_loff_t) 1 << ((sizeof(off_t)*8) -1))))
+ return lseek(fd, (off_t) offset, whence);
+
+ if (do_compat) {
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+ result = my_llseek(fd, offset, whence);
+ if (result == -1 && errno == ENOSYS) {
+ /*
+ * Just in case this code runs on top of an old kernel
+ * which does not support the llseek system call
+ */
+ do_compat++;
+ errno = EOVERFLOW;
+ }
+ return result;
+}
+
+#else /* !linux */
+
+#ifndef EOVERFLOW
+#ifdef EXT2_ET_INVALID_ARGUMENT
+#define EOVERFLOW EXT2_ET_INVALID_ARGUMENT
+#else
+#define EOVERFLOW 112
+#endif
+#endif
+
+blkid_loff_t blkid_llseek(int fd, blkid_loff_t offset, int origin)
+{
+#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
+ return lseek64 (fd, offset, origin);
+#else
+ if ((sizeof(off_t) < sizeof(blkid_loff_t)) &&
+ (offset >= ((blkid_loff_t) 1 << ((sizeof(off_t)*8) - 1)))) {
+ errno = EOVERFLOW;
+ return -1;
+ }
+ return lseek(fd, (off_t) offset, origin);
+#endif
+}
+
+#endif /* linux */
+
+
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
new file mode 100644
index 0000000..6a3bb24
--- /dev/null
+++ b/lib/blkid/probe.c
@@ -0,0 +1,1841 @@
+/*
+ * probe.c - identify a block device by its contents, and return a dev
+ * struct with the details
+ *
+ * Copyright (C) 1999 by Andries Brouwer
+ * Copyright (C) 1999, 2000, 2003 by Theodore Ts'o
+ * Copyright (C) 2001 by Andreas Dilger
+ * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h>
+#endif
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include "blkidP.h"
+#include "uuid/uuid.h"
+#include "probe.h"
+
+static int figure_label_len(const unsigned char *label, int len)
+{
+ const unsigned char *end = label + len - 1;
+
+ while (end >= label && (*end == ' ' || *end == 0))
+ --end;
+ if (end >= label)
+ return end - label + 1;
+ return 0;
+}
+
+static unsigned char *get_buffer(struct blkid_probe *pr,
+ blkid_loff_t off, size_t len)
+{
+ ssize_t ret_read;
+ unsigned char *newbuf;
+
+ if (off + len <= SB_BUFFER_SIZE) {
+ if (!pr->sbbuf) {
+ pr->sbbuf = malloc(SB_BUFFER_SIZE);
+ if (!pr->sbbuf)
+ return NULL;
+ if (lseek(pr->fd, 0, SEEK_SET) < 0)
+ return NULL;
+ ret_read = read(pr->fd, pr->sbbuf, SB_BUFFER_SIZE);
+ if (ret_read < 0)
+ ret_read = 0;
+ pr->sb_valid = ret_read;
+ }
+ if (off+len > pr->sb_valid)
+ return NULL;
+ return pr->sbbuf + off;
+ } else {
+ if (len > pr->buf_max) {
+ newbuf = realloc(pr->buf, len);
+ if (newbuf == NULL)
+ return NULL;
+ pr->buf = newbuf;
+ pr->buf_max = len;
+ }
+ if (blkid_llseek(pr->fd, off, SEEK_SET) < 0)
+ return NULL;
+ ret_read = read(pr->fd, pr->buf, len);
+ if (ret_read != (ssize_t) len)
+ return NULL;
+ return pr->buf;
+ }
+}
+
+
+/*
+ * This is a special case code to check for an MDRAID device. We do
+ * this special since it requires checking for a superblock at the end
+ * of the device.
+ */
+static int check_mdraid(int fd, unsigned char *ret_uuid)
+{
+ struct mdp_superblock_s *md;
+ blkid_loff_t offset;
+ char buf[4096];
+
+ if (fd < 0)
+ return -BLKID_ERR_PARAM;
+
+ offset = (blkid_get_dev_size(fd) & ~((blkid_loff_t)65535)) - 65536;
+
+ if (blkid_llseek(fd, offset, 0) < 0 ||
+ read(fd, buf, 4096) != 4096)
+ return -BLKID_ERR_IO;
+ /* Check for magic number */
+ if (memcmp("\251+N\374", buf, 4) && memcmp("\374N+\251", buf, 4))
+ return -BLKID_ERR_PARAM;
+
+ if (!ret_uuid)
+ return 0;
+ *ret_uuid = 0;
+
+ /* The MD UUID is not contiguous in the superblock, make it so */
+ md = (struct mdp_superblock_s *)buf;
+ if (md->set_uuid0 || md->set_uuid1 || md->set_uuid2 || md->set_uuid3) {
+ memcpy(ret_uuid, &md->set_uuid0, 4);
+ memcpy(ret_uuid + 4, &md->set_uuid1, 12);
+ }
+ return 0;
+}
+
+static void set_uuid(blkid_dev dev, uuid_t uuid, const char *tag)
+{
+ char str[37];
+
+ if (!uuid_is_null(uuid)) {
+ uuid_unparse(uuid, str);
+ blkid_set_tag(dev, tag ? tag : "UUID", str, sizeof(str));
+ }
+}
+
+static void get_ext2_info(blkid_dev dev, struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct ext2_super_block *es = (struct ext2_super_block *) buf;
+ const char *label = 0;
+
+ DBG(DEBUG_PROBE, printf("ext2_sb.compat = %08X:%08X:%08X\n",
+ blkid_le32(es->s_feature_compat),
+ blkid_le32(es->s_feature_incompat),
+ blkid_le32(es->s_feature_ro_compat)));
+
+ if (es->s_volume_name[0])
+ label = es->s_volume_name;
+ blkid_set_tag(dev, "LABEL", label, sizeof(es->s_volume_name));
+
+ set_uuid(dev, es->s_uuid, 0);
+
+ if ((es->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+ !uuid_is_null(es->s_journal_uuid))
+ set_uuid(dev, es->s_journal_uuid, "EXT_JOURNAL");
+
+ if (strcmp(id->bim_type, "ext2") &&
+ ((blkid_le32(es->s_feature_incompat) &
+ EXT2_FEATURE_INCOMPAT_UNSUPPORTED) == 0))
+ blkid_set_tag(dev, "SEC_TYPE", "ext2", sizeof("ext2"));
+}
+
+/*
+ * Check to see if a filesystem is in /proc/filesystems.
+ * Returns 1 if found, 0 if not
+ */
+static int fs_proc_check(const char *fs_name)
+{
+ FILE *f;
+ char buf[80], *cp, *t;
+
+ f = fopen("/proc/filesystems", "r");
+ if (!f)
+ return (0);
+ while (!feof(f)) {
+ if (!fgets(buf, sizeof(buf), f))
+ break;
+ cp = buf;
+ if (!isspace(*cp)) {
+ while (*cp && !isspace(*cp))
+ cp++;
+ }
+ while (*cp && isspace(*cp))
+ cp++;
+ if ((t = strchr(cp, '\n')) != NULL)
+ *t = 0;
+ if ((t = strchr(cp, '\t')) != NULL)
+ *t = 0;
+ if ((t = strchr(cp, ' ')) != NULL)
+ *t = 0;
+ if (!strcmp(fs_name, cp)) {
+ fclose(f);
+ return (1);
+ }
+ }
+ fclose(f);
+ return (0);
+}
+
+/*
+ * Check to see if a filesystem is available as a module
+ * Returns 1 if found, 0 if not
+ */
+static int check_for_modules(const char *fs_name)
+{
+#ifdef __linux__
+ struct utsname uts;
+ FILE *f;
+ char buf[1024], *cp;
+ int namesz;
+
+ if (uname(&uts))
+ return (0);
+ snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release);
+
+ f = fopen(buf, "r");
+ if (!f)
+ return (0);
+
+ namesz = strlen(fs_name);
+
+ while (!feof(f)) {
+ if (!fgets(buf, sizeof(buf), f))
+ break;
+ if ((cp = strchr(buf, ':')) != NULL)
+ *cp = 0;
+ else
+ continue;
+ if ((cp = strrchr(buf, '/')) != NULL)
+ cp++;
+ else
+ cp = buf;
+ if (!strncmp(cp, fs_name, namesz) &&
+ (!strcmp(cp + namesz, ".ko") ||
+ !strcmp(cp + namesz, ".ko.gz"))) {
+ fclose(f);
+ return (1);
+ }
+ }
+ fclose(f);
+#endif
+ return (0);
+}
+
+static int linux_version_code(void)
+{
+#ifdef __linux__
+ struct utsname ut;
+ static int version_code = -1;
+ int major, minor, rev;
+ char *endptr;
+ const char *cp;
+
+ if (version_code > 0)
+ return version_code;
+
+ if (uname(&ut))
+ return 0;
+ cp = ut.release;
+
+ major = strtol(cp, &endptr, 10);
+ if (cp == endptr || *endptr != '.')
+ return 0;
+ cp = endptr + 1;
+ minor = strtol(cp, &endptr, 10);
+ if (cp == endptr || *endptr != '.')
+ return 0;
+ cp = endptr + 1;
+ rev = strtol(cp, &endptr, 10);
+ if (cp == endptr)
+ return 0;
+ version_code = (((major * 256) + minor) * 256) + rev;
+ return version_code;
+#else
+ return 0;
+#endif
+}
+
+#define EXT4_SUPPORTS_EXT2 (2 * 65536 + 6*256 + 29)
+
+static int system_supports_ext2(void)
+{
+ static time_t last_check = 0;
+ static int ret = -1;
+ time_t now = time(0);
+
+ if (ret != -1 || (now - last_check) < 5)
+ return ret;
+ last_check = now;
+ ret = (fs_proc_check("ext2") || check_for_modules("ext2"));
+ return ret;
+}
+
+static int system_supports_ext4(void)
+{
+ static time_t last_check = 0;
+ static int ret = -1;
+ time_t now = time(0);
+
+ if (ret != -1 || (now - last_check) < 5)
+ return ret;
+ last_check = now;
+ ret = (fs_proc_check("ext4") || check_for_modules("ext4"));
+ return ret;
+}
+
+static int system_supports_ext4dev(void)
+{
+ static time_t last_check = 0;
+ static int ret = -1;
+ time_t now = time(0);
+
+ if (ret != -1 || (now - last_check) < 5)
+ return ret;
+ last_check = now;
+ ret = (fs_proc_check("ext4dev") || check_for_modules("ext4dev"));
+ return ret;
+}
+
+static int probe_ext4dev(struct blkid_probe *probe,
+ struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct ext2_super_block *es;
+ es = (struct ext2_super_block *)buf;
+
+ /* Distinguish from jbd */
+ if (blkid_le32(es->s_feature_incompat) &
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
+ return -BLKID_ERR_PARAM;
+
+ /*
+ * If the filesystem does not have a journal and ext2 and ext4
+ * is not present, then force this to be detected as an
+ * ext4dev filesystem.
+ */
+ if (!(blkid_le32(es->s_feature_compat) &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+ !system_supports_ext2() && !system_supports_ext4() &&
+ system_supports_ext4dev() &&
+ linux_version_code() >= EXT4_SUPPORTS_EXT2)
+ goto force_ext4dev;
+
+ /*
+ * If the filesystem is marked as OK for use by in-development
+ * filesystem code, but ext4dev is not supported, and ext4 is,
+ * then don't call ourselves ext4dev, since we should be
+ * detected as ext4 in that case.
+ *
+ * If the filesystem is marked as in use by production
+ * filesystem, then it can only be used by ext4 and NOT by
+ * ext4dev, so always disclaim we are ext4dev in that case.
+ */
+ if (blkid_le32(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) {
+ if (!system_supports_ext4dev() && system_supports_ext4())
+ return -BLKID_ERR_PARAM;
+ } else
+ return -BLKID_ERR_PARAM;
+
+force_ext4dev:
+ get_ext2_info(probe->dev, id, buf);
+ return 0;
+}
+
+static int probe_ext4(struct blkid_probe *probe, struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct ext2_super_block *es;
+ es = (struct ext2_super_block *)buf;
+
+ /* Distinguish from jbd */
+ if (blkid_le32(es->s_feature_incompat) &
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
+ return -BLKID_ERR_PARAM;
+
+ /*
+ * If the filesystem does not have a journal and ext2 is not
+ * present, then force this to be detected as an ext2
+ * filesystem.
+ */
+ if (!(blkid_le32(es->s_feature_compat) &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+ !system_supports_ext2() && system_supports_ext4() &&
+ linux_version_code() >= EXT4_SUPPORTS_EXT2)
+ goto force_ext4;
+
+ /* Ext4 has at least one feature which ext3 doesn't understand */
+ if (!(blkid_le32(es->s_feature_ro_compat) &
+ EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) &&
+ !(blkid_le32(es->s_feature_incompat) &
+ EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
+ return -BLKID_ERR_PARAM;
+
+force_ext4:
+ /*
+ * If the filesystem is a OK for use by in-development
+ * filesystem code, and ext4dev is supported or ext4 is not
+ * supported, then don't call ourselves ext4, so we can redo
+ * the detection and mark the filesystem as ext4dev.
+ *
+ * If the filesystem is marked as in use by production
+ * filesystem, then it can only be used by ext4 and NOT by
+ * ext4dev.
+ */
+ if (blkid_le32(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) {
+ if (system_supports_ext4dev() || !system_supports_ext4())
+ return -BLKID_ERR_PARAM;
+ }
+ get_ext2_info(probe->dev, id, buf);
+ return 0;
+}
+
+static int probe_ext3(struct blkid_probe *probe, struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct ext2_super_block *es;
+ es = (struct ext2_super_block *)buf;
+
+ /* ext3 requires journal */
+ if (!(blkid_le32(es->s_feature_compat) &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+ return -BLKID_ERR_PARAM;
+
+ /* Any features which ext3 doesn't understand */
+ if ((blkid_le32(es->s_feature_ro_compat) &
+ EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) ||
+ (blkid_le32(es->s_feature_incompat) &
+ EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
+ return -BLKID_ERR_PARAM;
+
+ get_ext2_info(probe->dev, id, buf);
+ return 0;
+}
+
+static int probe_ext2(struct blkid_probe *probe, struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct ext2_super_block *es;
+
+ es = (struct ext2_super_block *)buf;
+
+ /* Distinguish between ext3 and ext2 */
+ if ((blkid_le32(es->s_feature_compat) &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+ return -BLKID_ERR_PARAM;
+
+ /* Any features which ext2 doesn't understand */
+ if ((blkid_le32(es->s_feature_ro_compat) &
+ EXT2_FEATURE_RO_COMPAT_UNSUPPORTED) ||
+ (blkid_le32(es->s_feature_incompat) &
+ EXT2_FEATURE_INCOMPAT_UNSUPPORTED))
+ return -BLKID_ERR_PARAM;
+
+ /*
+ * If ext2 is not present, but ext4 or ext4dev are, then
+ * disclaim we are ext2
+ */
+ if (!system_supports_ext2() &&
+ (system_supports_ext4() || system_supports_ext4dev()) &&
+ linux_version_code() >= EXT4_SUPPORTS_EXT2)
+ return -BLKID_ERR_PARAM;
+
+ get_ext2_info(probe->dev, id, buf);
+ return 0;
+}
+
+static int probe_jbd(struct blkid_probe *probe, struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct ext2_super_block *es = (struct ext2_super_block *) buf;
+
+ if (!(blkid_le32(es->s_feature_incompat) &
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV))
+ return -BLKID_ERR_PARAM;
+
+ get_ext2_info(probe->dev, id, buf);
+
+ return 0;
+}
+
+#define FAT_ATTR_VOLUME_ID 0x08
+#define FAT_ATTR_DIR 0x10
+#define FAT_ATTR_LONG_NAME 0x0f
+#define FAT_ATTR_MASK 0x3f
+#define FAT_ENTRY_FREE 0xe5
+
+static const char *no_name = "NO NAME ";
+
+static unsigned char *search_fat_label(struct vfat_dir_entry *dir, int count)
+{
+ int i;
+
+ for (i = 0; i < count; i++) {
+ if (dir[i].name[0] == 0x00)
+ break;
+
+ if ((dir[i].name[0] == FAT_ENTRY_FREE) ||
+ (dir[i].cluster_high != 0 || dir[i].cluster_low != 0) ||
+ ((dir[i].attr & FAT_ATTR_MASK) == FAT_ATTR_LONG_NAME))
+ continue;
+
+ if ((dir[i].attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
+ FAT_ATTR_VOLUME_ID) {
+ return dir[i].name;
+ }
+ }
+ return 0;
+}
+
+/* FAT label extraction from the root directory taken from Kay
+ * Sievers's volume_id library */
+static int probe_fat(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct vfat_super_block *vs = (struct vfat_super_block *) buf;
+ struct msdos_super_block *ms = (struct msdos_super_block *) buf;
+ struct vfat_dir_entry *dir;
+ char serno[10];
+ const unsigned char *label = 0, *vol_label = 0, *tmp;
+ unsigned char *vol_serno;
+ int label_len = 0, maxloop = 100;
+ __u16 sector_size, dir_entries, reserved;
+ __u32 sect_count, fat_size, dir_size, cluster_count, fat_length;
+ __u32 buf_size, start_data_sect, next, root_start, root_dir_entries;
+
+ /* sector size check */
+ tmp = (unsigned char *)&ms->ms_sector_size;
+ sector_size = tmp[0] + (tmp[1] << 8);
+ if (sector_size != 0x200 && sector_size != 0x400 &&
+ sector_size != 0x800 && sector_size != 0x1000)
+ return 1;
+
+ tmp = (unsigned char *)&ms->ms_dir_entries;
+ dir_entries = tmp[0] + (tmp[1] << 8);
+ reserved = blkid_le16(ms->ms_reserved);
+ tmp = (unsigned char *)&ms->ms_sectors;
+ sect_count = tmp[0] + (tmp[1] << 8);
+ if (sect_count == 0)
+ sect_count = blkid_le32(ms->ms_total_sect);
+
+ fat_length = blkid_le16(ms->ms_fat_length);
+ if (fat_length == 0)
+ fat_length = blkid_le32(vs->vs_fat32_length);
+
+ fat_size = fat_length * ms->ms_fats;
+ dir_size = ((dir_entries * sizeof(struct vfat_dir_entry)) +
+ (sector_size-1)) / sector_size;
+
+ cluster_count = sect_count - (reserved + fat_size + dir_size);
+ if (ms->ms_cluster_size == 0)
+ return 1;
+ cluster_count /= ms->ms_cluster_size;
+
+ if (cluster_count > FAT32_MAX)
+ return 1;
+
+ if (ms->ms_fat_length) {
+ /* the label may be an attribute in the root directory */
+ root_start = (reserved + fat_size) * sector_size;
+ root_dir_entries = vs->vs_dir_entries[0] +
+ (vs->vs_dir_entries[1] << 8);
+
+ buf_size = root_dir_entries * sizeof(struct vfat_dir_entry);
+ dir = (struct vfat_dir_entry *) get_buffer(probe, root_start,
+ buf_size);
+ if (dir)
+ vol_label = search_fat_label(dir, root_dir_entries);
+
+ if (!vol_label || !memcmp(vol_label, no_name, 11))
+ vol_label = ms->ms_label;
+ vol_serno = ms->ms_serno;
+
+ blkid_set_tag(probe->dev, "SEC_TYPE", "msdos",
+ sizeof("msdos"));
+ } else {
+ /* Search the FAT32 root dir for the label attribute */
+ buf_size = vs->vs_cluster_size * sector_size;
+ start_data_sect = reserved + fat_size;
+
+ next = blkid_le32(vs->vs_root_cluster);
+ while (next && --maxloop) {
+ __u32 next_sect_off;
+ __u64 next_off, fat_entry_off;
+ int count;
+
+ next_sect_off = (next - 2) * vs->vs_cluster_size;
+ next_off = (__u64) (start_data_sect + next_sect_off) *
+ sector_size;
+
+ dir = (struct vfat_dir_entry *)
+ get_buffer(probe, next_off, buf_size);
+ if (dir == NULL)
+ break;
+
+ count = buf_size / sizeof(struct vfat_dir_entry);
+
+ vol_label = search_fat_label(dir, count);
+ if (vol_label)
+ break;
+
+ /* get FAT entry */
+ fat_entry_off =
+ ((unsigned int) reserved *
+ (unsigned int) sector_size) +
+ (next * sizeof(__u32));
+ buf = get_buffer(probe, fat_entry_off, buf_size);
+ if (buf == NULL)
+ break;
+
+ /* set next cluster */
+ next = blkid_le32(*((__u32 *) buf) & 0x0fffffff);
+ }
+
+ if (!vol_label || !memcmp(vol_label, no_name, 11))
+ vol_label = vs->vs_label;
+ vol_serno = vs->vs_serno;
+ }
+
+ if (vol_label && memcmp(vol_label, no_name, 11)) {
+ if ((label_len = figure_label_len(vol_label, 11)))
+ label = vol_label;
+ }
+
+ /* We can't just print them as %04X, because they are unaligned */
+ sprintf(serno, "%02X%02X-%02X%02X", vol_serno[3], vol_serno[2],
+ vol_serno[1], vol_serno[0]);
+
+ blkid_set_tag(probe->dev, "LABEL", (const char *) label, label_len);
+ blkid_set_tag(probe->dev, "UUID", serno, sizeof(serno)-1);
+
+ return 0;
+}
+
+/*
+ * The FAT filesystem could be without a magic string in superblock
+ * (e.g. old floppies). This heuristic for FAT detection is inspired
+ * by http://vrfy.org/projects/volume_id/ and Linux kernel.
+ * [7-Jul-2005, Karel Zak <kzak@redhat.com>]
+ */
+static int probe_fat_nomagic(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct msdos_super_block *ms;
+
+ ms = (struct msdos_super_block *)buf;
+
+ /* heads check */
+ if (ms->ms_heads == 0)
+ return 1;
+
+ /* cluster size check*/
+ if (ms->ms_cluster_size == 0 ||
+ (ms->ms_cluster_size & (ms->ms_cluster_size-1)))
+ return 1;
+
+ /* media check */
+ if (ms->ms_media < 0xf8 && ms->ms_media != 0xf0)
+ return 1;
+
+ /* fat counts(Linux kernel expects at least 1 FAT table) */
+ if (!ms->ms_fats)
+ return 1;
+
+ /*
+ * OS/2 and apparently DFSee will place a FAT12/16-like
+ * pseudo-superblock in the first 512 bytes of non-FAT
+ * filesystems --- at least JFS and HPFS, and possibly others.
+ * So we explicitly check for those filesystems at the
+ * FAT12/16 filesystem magic field identifier, and if they are
+ * present, we rule this out as a FAT filesystem, despite the
+ * FAT-like pseudo-header.
+ */
+ if ((memcmp(ms->ms_magic, "JFS ", 8) == 0) ||
+ (memcmp(ms->ms_magic, "HPFS ", 8) == 0))
+ return 1;
+
+ return probe_fat(probe, id, buf);
+}
+
+static int probe_ntfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct ntfs_super_block *ns;
+ struct master_file_table_record *mft;
+ struct file_attribute *attr;
+ char uuid_str[17], label_str[129], *cp;
+ int bytes_per_sector, sectors_per_cluster;
+ int mft_record_size, attr_off, attr_len;
+ unsigned int i, attr_type, val_len;
+ int val_off;
+ __u64 nr_clusters;
+ blkid_loff_t off;
+ unsigned char *buf_mft, *val;
+
+ ns = (struct ntfs_super_block *) buf;
+
+ bytes_per_sector = ns->bios_parameter_block[0] +
+ (ns->bios_parameter_block[1] << 8);
+ sectors_per_cluster = ns->bios_parameter_block[2];
+
+ if ((bytes_per_sector < 512) || (sectors_per_cluster == 0))
+ return 1;
+
+ if (ns->cluster_per_mft_record < 0)
+ mft_record_size = 1 << (0-ns->cluster_per_mft_record);
+ else
+ mft_record_size = ns->cluster_per_mft_record *
+ sectors_per_cluster * bytes_per_sector;
+ nr_clusters = blkid_le64(ns->number_of_sectors) / sectors_per_cluster;
+
+ if ((blkid_le64(ns->mft_cluster_location) > nr_clusters) ||
+ (blkid_le64(ns->mft_mirror_cluster_location) > nr_clusters))
+ return 1;
+
+ off = blkid_le64(ns->mft_mirror_cluster_location) *
+ bytes_per_sector * sectors_per_cluster;
+
+ buf_mft = get_buffer(probe, off, mft_record_size);
+ if (!buf_mft)
+ return 1;
+
+ if (memcmp(buf_mft, "FILE", 4))
+ return 1;
+
+ off = blkid_le64(ns->mft_cluster_location) * bytes_per_sector *
+ sectors_per_cluster;
+
+ buf_mft = get_buffer(probe, off, mft_record_size);
+ if (!buf_mft)
+ return 1;
+
+ if (memcmp(buf_mft, "FILE", 4))
+ return 1;
+
+ off += MFT_RECORD_VOLUME * mft_record_size;
+
+ buf_mft = get_buffer(probe, off, mft_record_size);
+ if (!buf_mft)
+ return 1;
+
+ if (memcmp(buf_mft, "FILE", 4))
+ return 1;
+
+ mft = (struct master_file_table_record *) buf_mft;
+
+ attr_off = blkid_le16(mft->attrs_offset);
+ label_str[0] = 0;
+
+ while (1) {
+ attr = (struct file_attribute *) (buf_mft + attr_off);
+ attr_len = blkid_le16(attr->len);
+ attr_type = blkid_le32(attr->type);
+ val_off = blkid_le16(attr->value_offset);
+ val_len = blkid_le32(attr->value_len);
+
+ attr_off += attr_len;
+
+ if ((attr_off > mft_record_size) ||
+ (attr_len == 0))
+ break;
+
+ if (attr_type == MFT_RECORD_ATTR_END)
+ break;
+
+ if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) {
+ if (val_len > sizeof(label_str))
+ val_len = sizeof(label_str)-1;
+
+ for (i=0, cp=label_str; i < val_len; i+=2,cp++) {
+ val = ((__u8 *) attr) + val_off + i;
+ *cp = val[0];
+ if (val[1])
+ *cp = '?';
+ }
+ *cp = 0;
+ }
+ }
+
+ sprintf(uuid_str, "%016llX", blkid_le64(ns->volume_serial));
+ blkid_set_tag(probe->dev, "UUID", uuid_str, 0);
+ if (label_str[0])
+ blkid_set_tag(probe->dev, "LABEL", label_str, 0);
+ return 0;
+}
+
+
+static int probe_xfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct xfs_super_block *xs;
+ const char *label = 0;
+
+ xs = (struct xfs_super_block *)buf;
+
+ if (strlen(xs->xs_fname))
+ label = xs->xs_fname;
+ blkid_set_tag(probe->dev, "LABEL", label, sizeof(xs->xs_fname));
+ set_uuid(probe->dev, xs->xs_uuid, 0);
+ return 0;
+}
+
+static int probe_reiserfs(struct blkid_probe *probe,
+ struct blkid_magic *id, unsigned char *buf)
+{
+ struct reiserfs_super_block *rs = (struct reiserfs_super_block *) buf;
+ unsigned int blocksize;
+ const char *label = 0;
+
+ blocksize = blkid_le16(rs->rs_blocksize);
+
+ /* The blocksize must be at least 1k */
+ if ((blocksize >> 10) == 0)
+ return -BLKID_ERR_PARAM;
+
+ /* If the superblock is inside the journal, we have the wrong one */
+ if (id->bim_kboff/(blocksize>>10) > blkid_le32(rs->rs_journal_block))
+ return -BLKID_ERR_BIG;
+
+ /* LABEL/UUID are only valid for later versions of Reiserfs v3.6. */
+ if (id->bim_magic[6] == '2' || id->bim_magic[6] == '3') {
+ if (strlen(rs->rs_label))
+ label = rs->rs_label;
+ set_uuid(probe->dev, rs->rs_uuid, 0);
+ }
+ blkid_set_tag(probe->dev, "LABEL", label, sizeof(rs->rs_label));
+
+ return 0;
+}
+
+static int probe_reiserfs4(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct reiser4_super_block *rs4 = (struct reiser4_super_block *) buf;
+ const unsigned char *label = 0;
+
+ if (strlen((char *) rs4->rs4_label))
+ label = rs4->rs4_label;
+ set_uuid(probe->dev, rs4->rs4_uuid, 0);
+ blkid_set_tag(probe->dev, "LABEL", (const char *) label,
+ sizeof(rs4->rs4_label));
+
+ return 0;
+}
+
+static int probe_jfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct jfs_super_block *js;
+ const char *label = 0;
+
+ js = (struct jfs_super_block *)buf;
+
+ if (blkid_le32(js->js_bsize) != (1U << blkid_le16(js->js_l2bsize)))
+ return 1;
+
+ if (blkid_le32(js->js_pbsize) != (1U << blkid_le16(js->js_l2pbsize)))
+ return 1;
+
+ if ((blkid_le16(js->js_l2bsize) - blkid_le16(js->js_l2pbsize)) !=
+ blkid_le16(js->js_l2bfactor))
+ return 1;
+
+ if (strlen((char *) js->js_label))
+ label = (char *) js->js_label;
+ blkid_set_tag(probe->dev, "LABEL", label, sizeof(js->js_label));
+ set_uuid(probe->dev, js->js_uuid, 0);
+ return 0;
+}
+
+static int probe_zfs(struct blkid_probe *probe __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf __BLKID_ATTR((unused)))
+{
+#if 0
+ char *vdev_label;
+ const char *pool_name = 0;
+
+ /* read nvpair data for pool name, pool GUID (complex) */
+ blkid_set_tag(probe->dev, "LABEL", pool_name, sizeof(pool_name));
+ set_uuid(probe->dev, pool_guid, 0);
+#endif
+ return 0;
+}
+
+static int probe_luks(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ char uuid[41];
+
+ /* 168 is the offset to the 40 character uuid:
+ * http://luks.endorphin.org/LUKS-on-disk-format.pdf */
+ strncpy(uuid, (char *) buf+168, 40);
+ uuid[40] = 0;
+ blkid_set_tag(probe->dev, "UUID", uuid, 40);
+ return 0;
+}
+
+static int probe_romfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct romfs_super_block *ros;
+ const char *label = 0;
+
+ ros = (struct romfs_super_block *)buf;
+
+ if (strlen((char *) ros->ros_volume))
+ label = (char *) ros->ros_volume;
+ blkid_set_tag(probe->dev, "LABEL", label, 0);
+ return 0;
+}
+
+static int probe_cramfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct cramfs_super_block *csb;
+ const char *label = 0;
+
+ csb = (struct cramfs_super_block *)buf;
+
+ if (strlen((char *) csb->name))
+ label = (char *) csb->name;
+ blkid_set_tag(probe->dev, "LABEL", label, 0);
+ return 0;
+}
+
+static int probe_swap0(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf __BLKID_ATTR((unused)))
+{
+ blkid_set_tag(probe->dev, "UUID", 0, 0);
+ blkid_set_tag(probe->dev, "LABEL", 0, 0);
+ return 0;
+}
+
+static int probe_swap1(struct blkid_probe *probe,
+ struct blkid_magic *id,
+ unsigned char *buf __BLKID_ATTR((unused)))
+{
+ struct swap_id_block *sws;
+
+ probe_swap0(probe, id, buf);
+ /*
+ * Version 1 swap headers are always located at offset of 1024
+ * bytes, although the swap signature itself is located at the
+ * end of the page (which may vary depending on hardware
+ * pagesize).
+ */
+ sws = (struct swap_id_block *) get_buffer(probe, 1024, 1024);
+ if (!sws)
+ return 1;
+
+ /* check for wrong version or zeroed pagecount, for sanity */
+ if (!memcmp(id->bim_magic, "SWAPSPACE2", id->bim_len) &&
+ (sws->sws_version != 1 || sws->sws_lastpage == 0))
+ return 1;
+
+ /* arbitrary sanity check.. is there any garbage down there? */
+ if (sws->sws_pad[32] == 0 && sws->sws_pad[33] == 0) {
+ if (sws->sws_volume[0])
+ blkid_set_tag(probe->dev, "LABEL", sws->sws_volume,
+ sizeof(sws->sws_volume));
+ if (sws->sws_uuid[0])
+ set_uuid(probe->dev, sws->sws_uuid, 0);
+ }
+ return 0;
+}
+
+static int probe_iso9660(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct iso_volume_descriptor *iso;
+ const unsigned char *label;
+
+ iso = (struct iso_volume_descriptor *) buf;
+ label = iso->volume_id;
+
+ blkid_set_tag(probe->dev, "LABEL", (const char *) label,
+ figure_label_len(label, 32));
+ return 0;
+}
+
+
+static const char
+*udf_magic[] = { "BEA01", "BOOT2", "CD001", "CDW02", "NSR02",
+ "NSR03", "TEA01", 0 };
+
+static int probe_udf(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf __BLKID_ATTR((unused)))
+{
+ int j, bs;
+ struct iso_volume_descriptor *isosb;
+ const char ** m;
+
+ /* determine the block size by scanning in 2K increments
+ (block sizes larger than 2K will be null padded) */
+ for (bs = 1; bs < 16; bs++) {
+ isosb = (struct iso_volume_descriptor *)
+ get_buffer(probe, (blkid_loff_t) bs*2048+32768,
+ sizeof(*isosb));
+ if (!isosb)
+ return 1;
+ if (isosb->vd_id[0])
+ break;
+ }
+
+ /* Scan up to another 64 blocks looking for additional VSD's */
+ for (j = 1; j < 64; j++) {
+ if (j > 1) {
+ isosb = (struct iso_volume_descriptor *)
+ get_buffer(probe, j*bs*2048+32768,
+ sizeof(*isosb));
+ if (!isosb)
+ return 1;
+ }
+ /* If we find NSR0x then call it udf:
+ NSR01 for UDF 1.00
+ NSR02 for UDF 1.50
+ NSR03 for UDF 2.00 */
+ if (!memcmp(isosb->vd_id, "NSR0", 4))
+ return probe_iso9660(probe, id, buf);
+ for (m = udf_magic; *m; m++)
+ if (!memcmp(*m, isosb->vd_id, 5))
+ break;
+ if (*m == 0)
+ return 1;
+ }
+ return 1;
+}
+
+static int probe_ocfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct ocfs_volume_header ovh;
+ struct ocfs_volume_label ovl;
+ __u32 major;
+
+ memcpy(&ovh, buf, sizeof(ovh));
+ memcpy(&ovl, buf+512, sizeof(ovl));
+
+ major = ocfsmajor(ovh);
+ if (major == 1)
+ blkid_set_tag(probe->dev,"SEC_TYPE","ocfs1",sizeof("ocfs1"));
+ else if (major >= 9)
+ blkid_set_tag(probe->dev,"SEC_TYPE","ntocfs",sizeof("ntocfs"));
+
+ blkid_set_tag(probe->dev, "LABEL", ovl.label, ocfslabellen(ovl));
+ blkid_set_tag(probe->dev, "MOUNT", ovh.mount, ocfsmountlen(ovh));
+ set_uuid(probe->dev, ovl.vol_id, 0);
+ return 0;
+}
+
+static int probe_ocfs2(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct ocfs2_super_block *osb;
+
+ osb = (struct ocfs2_super_block *)buf;
+
+ blkid_set_tag(probe->dev, "LABEL", osb->s_label, sizeof(osb->s_label));
+ set_uuid(probe->dev, osb->s_uuid, 0);
+ return 0;
+}
+
+static int probe_oracleasm(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct oracle_asm_disk_label *dl;
+
+ dl = (struct oracle_asm_disk_label *)buf;
+
+ blkid_set_tag(probe->dev, "LABEL", dl->dl_id, sizeof(dl->dl_id));
+ return 0;
+}
+
+static int probe_gfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct gfs2_sb *sbd;
+ const char *label = 0;
+
+ sbd = (struct gfs2_sb *)buf;
+
+ if (blkid_be32(sbd->sb_fs_format) == GFS_FORMAT_FS &&
+ blkid_be32(sbd->sb_multihost_format) == GFS_FORMAT_MULTI)
+ {
+ blkid_set_tag(probe->dev, "UUID", 0, 0);
+
+ if (strlen(sbd->sb_locktable))
+ label = sbd->sb_locktable;
+ blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable));
+ return 0;
+ }
+ return 1;
+}
+
+static int probe_gfs2(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct gfs2_sb *sbd;
+ const char *label = 0;
+
+ sbd = (struct gfs2_sb *)buf;
+
+ if (blkid_be32(sbd->sb_fs_format) == GFS2_FORMAT_FS &&
+ blkid_be32(sbd->sb_multihost_format) == GFS2_FORMAT_MULTI)
+ {
+ blkid_set_tag(probe->dev, "UUID", 0, 0);
+
+ if (strlen(sbd->sb_locktable))
+ label = sbd->sb_locktable;
+ blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable));
+ return 0;
+ }
+ return 1;
+}
+
+static void unicode_16be_to_utf8(unsigned char *str, int out_len,
+ const unsigned char *buf, int in_len)
+{
+ int i, j;
+ unsigned int c;
+
+ for (i = j = 0; i + 2 <= in_len; i += 2) {
+ c = (buf[i] << 8) | buf[i+1];
+ if (c == 0) {
+ str[j] = '\0';
+ break;
+ } else if (c < 0x80) {
+ if (j+1 >= out_len)
+ break;
+ str[j++] = (unsigned char) c;
+ } else if (c < 0x800) {
+ if (j+2 >= out_len)
+ break;
+ str[j++] = (unsigned char) (0xc0 | (c >> 6));
+ str[j++] = (unsigned char) (0x80 | (c & 0x3f));
+ } else {
+ if (j+3 >= out_len)
+ break;
+ str[j++] = (unsigned char) (0xe0 | (c >> 12));
+ str[j++] = (unsigned char) (0x80 | ((c >> 6) & 0x3f));
+ str[j++] = (unsigned char) (0x80 | (c & 0x3f));
+ }
+ }
+ str[j] = '\0';
+}
+
+static void unicode_16le_to_utf8(unsigned char *str, int out_len,
+ const unsigned char *buf, int in_len)
+{
+ int i, j;
+ unsigned int c;
+
+ for (i = j = 0; i + 2 <= in_len; i += 2) {
+ c = (buf[i+1] << 8) | buf[i];
+ if (c == 0) {
+ str[j] = '\0';
+ break;
+ } else if (c < 0x80) {
+ if (j+1 >= out_len)
+ break;
+ str[j++] = (unsigned char) c;
+ } else if (c < 0x800) {
+ if (j+2 >= out_len)
+ break;
+ str[j++] = (unsigned char) (0xc0 | (c >> 6));
+ str[j++] = (unsigned char) (0x80 | (c & 0x3f));
+ } else {
+ if (j+3 >= out_len)
+ break;
+ str[j++] = (unsigned char) (0xe0 | (c >> 12));
+ str[j++] = (unsigned char) (0x80 | ((c >> 6) & 0x3f));
+ str[j++] = (unsigned char) (0x80 | (c & 0x3f));
+ }
+ }
+ str[j] = '\0';
+}
+
+static int probe_hfs(struct blkid_probe *probe __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct hfs_mdb *hfs = (struct hfs_mdb *)buf;
+ char uuid_str[17];
+ __u64 uuid;
+
+ if ((memcmp(hfs->embed_sig, "H+", 2) == 0) ||
+ (memcmp(hfs->embed_sig, "HX", 2) == 0))
+ return 1; /* Not hfs, but an embedded HFS+ */
+
+ memcpy(&uuid, hfs->finder_info.id, 8);
+ uuid = blkid_le64(uuid);
+ if (uuid) {
+ sprintf(uuid_str, "%016llX", uuid);
+ blkid_set_tag(probe->dev, "UUID", uuid_str, 0);
+ }
+ blkid_set_tag(probe->dev, "LABEL", (char *)hfs->label, hfs->label_len);
+ return 0;
+}
+
+
+#define HFSPLUS_SECTOR_SIZE 512
+
+static int probe_hfsplus(struct blkid_probe *probe,
+ struct blkid_magic *id,
+ unsigned char *buf)
+{
+ struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
+ struct hfsplus_bnode_descriptor *descr;
+ struct hfsplus_bheader_record *bnode;
+ struct hfsplus_catalog_key *key;
+ struct hfsplus_vol_header *hfsplus;
+ struct hfs_mdb *sbd = (struct hfs_mdb *) buf;
+ unsigned int alloc_block_size;
+ unsigned int alloc_first_block;
+ unsigned int embed_first_block;
+ unsigned int off = 0;
+ unsigned int blocksize;
+ unsigned int cat_block;
+ unsigned int ext_block_start;
+ unsigned int ext_block_count;
+ unsigned int record_count;
+ unsigned int leaf_node_head;
+ unsigned int leaf_node_count;
+ unsigned int leaf_node_size;
+ unsigned int leaf_block;
+ unsigned int label_len;
+ __u64 leaf_off, uuid;
+ char uuid_str[17], label[512];
+ int ext;
+
+ /* Check for a HFS+ volume embedded in a HFS volume */
+ if (memcmp(sbd->signature, "BD", 2) == 0) {
+ if ((memcmp(sbd->embed_sig, "H+", 2) != 0) &&
+ (memcmp(sbd->embed_sig, "HX", 2) != 0))
+ /* This must be an HFS volume, so fail */
+ return 1;
+
+ alloc_block_size = blkid_be32(sbd->al_blk_size);
+ alloc_first_block = blkid_be16(sbd->al_bl_st);
+ embed_first_block = blkid_be16(sbd->embed_startblock);
+ off = (alloc_first_block * 512) +
+ (embed_first_block * alloc_block_size);
+ buf = get_buffer(probe, off + (id->bim_kboff * 1024),
+ sizeof(*sbd));
+ if (!buf)
+ return 1;
+
+ hfsplus = (struct hfsplus_vol_header *) buf;
+ }
+
+ hfsplus = (struct hfsplus_vol_header *) buf;
+
+ if ((memcmp(hfsplus->signature, "H+", 2) != 0) &&
+ (memcmp(hfsplus->signature, "HX", 2) != 0))
+ return 1;
+
+ memcpy(&uuid, hfsplus->finder_info.id, 8);
+ uuid = blkid_le64(uuid);
+ if (uuid) {
+ sprintf(uuid_str, "%016llX", uuid);
+ blkid_set_tag(probe->dev, "UUID", uuid_str, 0);
+ }
+
+ blocksize = blkid_be32(hfsplus->blocksize);
+ if (blocksize < HFSPLUS_SECTOR_SIZE)
+ return 1;
+
+ memcpy(extents, hfsplus->cat_file.extents, sizeof(extents));
+ cat_block = blkid_be32(extents[0].start_block);
+
+ buf = get_buffer(probe, off + ((__u64) cat_block * blocksize), 0x2000);
+ if (!buf)
+ return 0;
+
+ bnode = (struct hfsplus_bheader_record *)
+ &buf[sizeof(struct hfsplus_bnode_descriptor)];
+
+ leaf_node_head = blkid_be32(bnode->leaf_head);
+ leaf_node_size = blkid_be16(bnode->node_size);
+ leaf_node_count = blkid_be32(bnode->leaf_count);
+ if (leaf_node_count == 0)
+ return 0;
+
+ leaf_block = (leaf_node_head * leaf_node_size) / blocksize;
+
+ /* get physical location */
+ for (ext = 0; ext < HFSPLUS_EXTENT_COUNT; ext++) {
+ ext_block_start = blkid_be32(extents[ext].start_block);
+ ext_block_count = blkid_be32(extents[ext].block_count);
+ if (ext_block_count == 0)
+ return 0;
+
+ /* this is our extent */
+ if (leaf_block < ext_block_count)
+ break;
+
+ leaf_block -= ext_block_count;
+ }
+ if (ext == HFSPLUS_EXTENT_COUNT)
+ return 0;
+
+ leaf_off = (__u64) (ext_block_start + leaf_block) * blocksize;
+
+ buf = get_buffer(probe, off + leaf_off, leaf_node_size);
+ if (!buf)
+ return 0;
+
+ descr = (struct hfsplus_bnode_descriptor *) buf;
+ record_count = blkid_be16(descr->num_recs);
+ if (record_count == 0)
+ return 0;
+
+ if (descr->type != HFS_NODE_LEAF)
+ return 0;
+
+ key = (struct hfsplus_catalog_key *)
+ &buf[sizeof(struct hfsplus_bnode_descriptor)];
+
+ if (blkid_be32(key->parent_id) != HFSPLUS_POR_CNID)
+ return 0;
+
+ label_len = blkid_be16(key->unicode_len) * 2;
+ unicode_16be_to_utf8((unsigned char *)label, sizeof(label),
+ key->unicode, label_len);
+ blkid_set_tag(probe->dev, "LABEL", label, 0);
+ return 0;
+}
+
+#define LVM2_LABEL_SIZE 512
+static unsigned int lvm2_calc_crc(const void *buf, unsigned int size)
+{
+ static const unsigned int crctab[] = {
+ 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac,
+ 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c,
+ 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c,
+ 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c
+ };
+ unsigned int i, crc = 0xf597a6cf;
+ const __u8 *data = (const __u8 *) buf;
+
+ for (i = 0; i < size; i++) {
+ crc ^= *data++;
+ crc = (crc >> 4) ^ crctab[crc & 0xf];
+ crc = (crc >> 4) ^ crctab[crc & 0xf];
+ }
+ return crc;
+}
+
+static int probe_lvm2(struct blkid_probe *probe,
+ struct blkid_magic *id,
+ unsigned char *buf)
+{
+ int sector = (id->bim_kboff) << 1;
+ struct lvm2_pv_label_header *label= (struct lvm2_pv_label_header *)buf;
+ char *p, *q, uuid[40];
+ unsigned int i, b;
+
+ /* buf is at 0k or 1k offset; find label inside */
+ if (memcmp(buf, "LABELONE", 8) == 0) {
+ label = (struct lvm2_pv_label_header *)buf;
+ } else if (memcmp(buf + 512, "LABELONE", 8) == 0) {
+ label = (struct lvm2_pv_label_header *)(buf + 512);
+ sector++;
+ } else {
+ return 1;
+ }
+
+ if (blkid_le64(label->sector_xl) != (unsigned) sector) {
+ DBG(DEBUG_PROBE,
+ printf("LVM2: label for sector %llu found at sector %d\n",
+ blkid_le64(label->sector_xl), sector));
+ return 1;
+ }
+
+ if (lvm2_calc_crc(&label->offset_xl, LVM2_LABEL_SIZE -
+ ((char *)&label->offset_xl - (char *)label)) !=
+ blkid_le32(label->crc_xl)) {
+ DBG(DEBUG_PROBE,
+ printf("LVM2: label checksum incorrect at sector %d\n",
+ sector));
+ return 1;
+ }
+
+ for (i=0, b=1, p=uuid, q= (char *) label->pv_uuid; i < LVM2_ID_LEN;
+ i++, b <<= 1) {
+ if (b & 0x4444440)
+ *p++ = '-';
+ *p++ = *q++;
+ }
+
+ blkid_set_tag(probe->dev, "UUID", uuid, LVM2_ID_LEN+6);
+
+ return 0;
+}
+
+static int probe_btrfs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct btrfs_super_block *bs;
+ const char *label = 0;
+
+ bs = (struct btrfs_super_block *)buf;
+
+ if (strlen(bs->label))
+ label = bs->label;
+ blkid_set_tag(probe->dev, "LABEL", label, sizeof(bs->label));
+ set_uuid(probe->dev, bs->fsid, 0);
+ return 0;
+}
+
+static int probe_f2fs(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct f2fs_super_block *bs;
+
+ bs = (struct f2fs_super_block *)buf;
+ set_uuid(probe->dev, bs->uuid, 0);
+ return 0;
+}
+
+static uint64_t exfat_block_to_offset(const struct exfat_super_block *sb,
+ uint64_t block)
+{
+ return block << sb->block_bits;
+}
+
+static uint64_t exfat_cluster_to_block(const struct exfat_super_block *sb,
+ uint32_t cluster)
+{
+ return sb->cluster_block_start +
+ ((uint64_t)(cluster - EXFAT_FIRST_DATA_CLUSTER) << sb->bpc_bits);
+}
+
+static uint64_t exfat_cluster_to_offset(const struct exfat_super_block *sb,
+ uint32_t cluster)
+{
+ return exfat_block_to_offset(sb, exfat_cluster_to_block(sb, cluster));
+}
+
+static uint32_t exfat_next_cluster(struct blkid_probe *probe,
+ const struct exfat_super_block *sb,
+ uint32_t cluster)
+{
+ uint32_t *next;
+ uint64_t offset;
+
+ offset = exfat_block_to_offset(sb, sb->fat_block_start)
+ + (uint64_t) cluster * sizeof (cluster);
+ next = (uint32_t *)get_buffer(probe, offset, sizeof (uint32_t));
+
+ return next ? *next : 0;
+}
+
+static struct exfat_entry_label *find_exfat_entry_label(
+ struct blkid_probe *probe, const struct exfat_super_block *sb)
+{
+ uint32_t cluster = sb->rootdir_cluster;
+ uint64_t offset = exfat_cluster_to_offset(sb, cluster);
+ uint8_t *entry;
+ const size_t max_iter = 10000;
+ size_t i = 0;
+
+ for (; i < max_iter; ++i) {
+ entry = (uint8_t *)get_buffer(probe, offset, EXFAT_ENTRY_SIZE);
+ if (!entry)
+ return NULL;
+ if (entry[0] == EXFAT_ENTRY_EOD)
+ return NULL;
+ if (entry[0] == EXFAT_ENTRY_LABEL)
+ return (struct exfat_entry_label*) entry;
+
+ offset += EXFAT_ENTRY_SIZE;
+ if (offset % CLUSTER_SIZE(sb) == 0) {
+ cluster = exfat_next_cluster(probe, sb, cluster);
+ if (cluster < EXFAT_FIRST_DATA_CLUSTER)
+ return NULL;
+ if (cluster > EXFAT_LAST_DATA_CLUSTER)
+ return NULL;
+ offset = exfat_cluster_to_offset(sb, cluster);
+ }
+ }
+
+ return NULL;
+}
+
+static int probe_exfat(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct exfat_super_block *sb;
+ struct exfat_entry_label *label;
+ char uuid[40];
+
+ sb = (struct exfat_super_block *)buf;
+ if (!sb || CLUSTER_SIZE(sb) == 0) {
+ DBG(DEBUG_PROBE, printf("bad exfat superblock.\n"));
+ return errno ? - errno : 1;
+ }
+
+ label = find_exfat_entry_label(probe, sb);
+ if (label) {
+ unsigned char utf8_label[128];
+ unicode_16le_to_utf8(utf8_label, sizeof(utf8_label), label->name, label->length * 2);
+ blkid_set_tag(probe->dev, "LABEL", (char *) utf8_label, 0);
+ } else {
+ blkid_set_tag(probe->dev, "LABEL", "disk", 4);
+ }
+
+ memset(uuid, 0, sizeof (uuid));
+ snprintf(uuid, sizeof (uuid), "%02hhX%02hhX-%02hhX%02hhX",
+ sb->volume_serial[3], sb->volume_serial[2],
+ sb->volume_serial[1], sb->volume_serial[0]);
+ blkid_set_tag(probe->dev, "UUID", uuid, strlen(uuid));
+
+ return 0;
+}
+
+/*
+ * Various filesystem magics that we can check for. Note that kboff and
+ * sboff are in kilobytes and bytes respectively. All magics are in
+ * byte strings so we don't worry about endian issues.
+ */
+static struct blkid_magic type_array[] = {
+/* type kboff sboff len magic probe */
+ { "oracleasm", 0, 32, 8, "ORCLDISK", probe_oracleasm },
+ { "ntfs", 0, 3, 8, "NTFS ", probe_ntfs },
+ { "jbd", 1, 0x38, 2, "\123\357", probe_jbd },
+ { "ext4dev", 1, 0x38, 2, "\123\357", probe_ext4dev },
+ { "ext4", 1, 0x38, 2, "\123\357", probe_ext4 },
+ { "ext3", 1, 0x38, 2, "\123\357", probe_ext3 },
+ { "ext2", 1, 0x38, 2, "\123\357", probe_ext2 },
+ { "reiserfs", 8, 0x34, 8, "ReIsErFs", probe_reiserfs },
+ { "reiserfs", 64, 0x34, 9, "ReIsEr2Fs", probe_reiserfs },
+ { "reiserfs", 64, 0x34, 9, "ReIsEr3Fs", probe_reiserfs },
+ { "reiserfs", 64, 0x34, 8, "ReIsErFs", probe_reiserfs },
+ { "reiserfs", 8, 20, 8, "ReIsErFs", probe_reiserfs },
+ { "reiser4", 64, 0, 7, "ReIsEr4", probe_reiserfs4 },
+ { "gfs2", 64, 0, 4, "\x01\x16\x19\x70", probe_gfs2 },
+ { "gfs", 64, 0, 4, "\x01\x16\x19\x70", probe_gfs },
+ { "vfat", 0, 0x52, 5, "MSWIN", probe_fat },
+ { "vfat", 0, 0x52, 8, "FAT32 ", probe_fat },
+ { "vfat", 0, 0x36, 5, "MSDOS", probe_fat },
+ { "vfat", 0, 0x36, 8, "FAT16 ", probe_fat },
+ { "vfat", 0, 0x36, 8, "FAT12 ", probe_fat },
+ { "vfat", 0, 0, 1, "\353", probe_fat_nomagic },
+ { "vfat", 0, 0, 1, "\351", probe_fat_nomagic },
+ { "vfat", 0, 0x1fe, 2, "\125\252", probe_fat_nomagic },
+ { "minix", 1, 0x10, 2, "\177\023", 0 },
+ { "minix", 1, 0x10, 2, "\217\023", 0 },
+ { "minix", 1, 0x10, 2, "\150\044", 0 },
+ { "minix", 1, 0x10, 2, "\170\044", 0 },
+ { "vxfs", 1, 0, 4, "\365\374\001\245", 0 },
+ { "xfs", 0, 0, 4, "XFSB", probe_xfs },
+ { "romfs", 0, 0, 8, "-rom1fs-", probe_romfs },
+ { "bfs", 0, 0, 4, "\316\372\173\033", 0 },
+ { "cramfs", 0, 0, 4, "E=\315\050", probe_cramfs },
+ { "qnx4", 0, 4, 6, "QNX4FS", 0 },
+ { "udf", 32, 1, 5, "BEA01", probe_udf },
+ { "udf", 32, 1, 5, "BOOT2", probe_udf },
+ { "udf", 32, 1, 5, "CD001", probe_udf },
+ { "udf", 32, 1, 5, "CDW02", probe_udf },
+ { "udf", 32, 1, 5, "NSR02", probe_udf },
+ { "udf", 32, 1, 5, "NSR03", probe_udf },
+ { "udf", 32, 1, 5, "TEA01", probe_udf },
+ { "iso9660", 32, 1, 5, "CD001", probe_iso9660 },
+ { "iso9660", 32, 9, 5, "CDROM", probe_iso9660 },
+ { "jfs", 32, 0, 4, "JFS1", probe_jfs },
+ /* ZFS has 128 root blocks (#4 is the first used), check only 6 of them */
+ { "zfs", 128, 0, 8, "\0\0\0\0\0\xba\xb1\x0c", probe_zfs },
+ { "zfs", 128, 0, 8, "\x0c\xb1\xba\0\0\0\0\0", probe_zfs },
+ { "zfs", 132, 0, 8, "\0\0\0\0\0\xba\xb1\x0c", probe_zfs },
+ { "zfs", 132, 0, 8, "\x0c\xb1\xba\0\0\0\0\0", probe_zfs },
+ { "zfs", 136, 0, 8, "\0\0\0\0\0\xba\xb1\x0c", probe_zfs },
+ { "zfs", 136, 0, 8, "\x0c\xb1\xba\0\0\0\0\0", probe_zfs },
+ { "zfs", 384, 0, 8, "\0\0\0\0\0\xba\xb1\x0c", probe_zfs },
+ { "zfs", 384, 0, 8, "\x0c\xb1\xba\0\0\0\0\0", probe_zfs },
+ { "zfs", 388, 0, 8, "\0\0\0\0\0\xba\xb1\x0c", probe_zfs },
+ { "zfs", 388, 0, 8, "\x0c\xb1\xba\0\0\0\0\0", probe_zfs },
+ { "zfs", 392, 0, 8, "\0\0\0\0\0\xba\xb1\x0c", probe_zfs },
+ { "zfs", 392, 0, 8, "\x0c\xb1\xba\0\0\0\0\0", probe_zfs },
+ { "hfsplus", 1, 0, 2, "BD", probe_hfsplus },
+ { "hfsplus", 1, 0, 2, "H+", probe_hfsplus },
+ { "hfsplus", 1, 0, 2, "HX", probe_hfsplus },
+ { "hfs", 1, 0, 2, "BD", probe_hfs },
+ { "ufs", 8, 0x55c, 4, "T\031\001\000", 0 },
+ { "hpfs", 8, 0, 4, "I\350\225\371", 0 },
+ { "sysv", 0, 0x3f8, 4, "\020~\030\375", 0 },
+ { "swap", 0, 0xff6, 10, "SWAP-SPACE", probe_swap0 },
+ { "swap", 0, 0xff6, 10, "SWAPSPACE2", probe_swap1 },
+ { "swsuspend", 0, 0xff6, 9, "S1SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0xff6, 9, "S2SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0xff6, 9, "ULSUSPEND", probe_swap1 },
+ { "swap", 0, 0x1ff6, 10, "SWAP-SPACE", probe_swap0 },
+ { "swap", 0, 0x1ff6, 10, "SWAPSPACE2", probe_swap1 },
+ { "swsuspend", 0, 0x1ff6, 9, "S1SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0x1ff6, 9, "S2SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0x1ff6, 9, "ULSUSPEND", probe_swap1 },
+ { "swap", 0, 0x3ff6, 10, "SWAP-SPACE", probe_swap0 },
+ { "swap", 0, 0x3ff6, 10, "SWAPSPACE2", probe_swap1 },
+ { "swsuspend", 0, 0x3ff6, 9, "S1SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0x3ff6, 9, "S2SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0x3ff6, 9, "ULSUSPEND", probe_swap1 },
+ { "swap", 0, 0x7ff6, 10, "SWAP-SPACE", probe_swap0 },
+ { "swap", 0, 0x7ff6, 10, "SWAPSPACE2", probe_swap1 },
+ { "swsuspend", 0, 0x7ff6, 9, "S1SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0x7ff6, 9, "S2SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0x7ff6, 9, "ULSUSPEND", probe_swap1 },
+ { "swap", 0, 0xfff6, 10, "SWAP-SPACE", probe_swap0 },
+ { "swap", 0, 0xfff6, 10, "SWAPSPACE2", probe_swap1 },
+ { "swsuspend", 0, 0xfff6, 9, "S1SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0xfff6, 9, "S2SUSPEND", probe_swap1 },
+ { "swsuspend", 0, 0xfff6, 9, "ULSUSPEND", probe_swap1 },
+ { "ocfs", 0, 8, 9, "OracleCFS", probe_ocfs },
+ { "ocfs2", 1, 0, 6, "OCFSV2", probe_ocfs2 },
+ { "ocfs2", 2, 0, 6, "OCFSV2", probe_ocfs2 },
+ { "ocfs2", 4, 0, 6, "OCFSV2", probe_ocfs2 },
+ { "ocfs2", 8, 0, 6, "OCFSV2", probe_ocfs2 },
+ { "crypt_LUKS", 0, 0, 6, "LUKS\xba\xbe", probe_luks },
+ { "squashfs", 0, 0, 4, "sqsh", 0 },
+ { "squashfs", 0, 0, 4, "hsqs", 0 },
+ { "lvm2pv", 0, 0x218, 8, "LVM2 001", probe_lvm2 },
+ { "lvm2pv", 0, 0x018, 8, "LVM2 001", probe_lvm2 },
+ { "lvm2pv", 1, 0x018, 8, "LVM2 001", probe_lvm2 },
+ { "lvm2pv", 1, 0x218, 8, "LVM2 001", probe_lvm2 },
+ { "btrfs", 64, 0x40, 8, "_BHRfS_M", probe_btrfs },
+ { "f2fs", 1, 0, 4, "\x10\x20\xf5\xf2", probe_f2fs },
+ { "exfat", 0, 3, 8, "EXFAT ", probe_exfat },
+ { NULL, 0, 0, 0, NULL, NULL }
+};
+
+/*
+ * Verify that the data in dev is consistent with what is on the actual
+ * block device (using the devname field only). Normally this will be
+ * called when finding items in the cache, but for long running processes
+ * is also desirable to revalidate an item before use.
+ *
+ * If we are unable to revalidate the data, we return the old data and
+ * do not set the BLKID_BID_FL_VERIFIED flag on it.
+ */
+blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
+{
+ struct blkid_magic *id;
+ struct blkid_probe probe;
+ blkid_tag_iterate iter;
+ unsigned char *buf;
+ const char *type, *value;
+ struct stat st;
+ time_t now;
+ double diff;
+ int idx;
+
+ if (!dev)
+ return NULL;
+
+ now = time(0);
+ diff = difftime(now, dev->bid_time);
+
+ if (stat(dev->bid_name, &st) < 0) {
+ DBG(DEBUG_PROBE,
+ printf("blkid_verify: error %s (%d) while "
+ "trying to stat %s\n", strerror(errno), errno,
+ dev->bid_name));
+ open_err:
+ if ((errno == EPERM) || (errno == EACCES) || (errno == ENOENT)) {
+ /* We don't have read permission, just return cache data. */
+ DBG(DEBUG_PROBE, printf("returning unverified data for %s\n",
+ dev->bid_name));
+ return dev;
+ }
+ blkid_free_dev(dev);
+ return NULL;
+ }
+
+ if ((now >= dev->bid_time) &&
+ (st.st_mtime <= dev->bid_time) &&
+ ((diff < BLKID_PROBE_MIN) ||
+ (dev->bid_flags & BLKID_BID_FL_VERIFIED &&
+ diff < BLKID_PROBE_INTERVAL)))
+ return dev;
+
+ DBG(DEBUG_PROBE,
+ printf("need to revalidate %s (cache time %lu, stat time %lu,\n\t"
+ "time since last check %lu)\n",
+ dev->bid_name, (unsigned long)dev->bid_time,
+ (unsigned long)st.st_mtime, (unsigned long)diff));
+
+ if ((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) {
+ DBG(DEBUG_PROBE, printf("blkid_verify: error %s (%d) while "
+ "opening %s\n", strerror(errno), errno,
+ dev->bid_name));
+ goto open_err;
+ }
+
+ probe.cache = cache;
+ probe.dev = dev;
+ probe.sbbuf = 0;
+ probe.buf = 0;
+ probe.buf_max = 0;
+
+ /*
+ * Iterate over the type array. If we already know the type,
+ * then try that first. If it doesn't work, then blow away
+ * the type information, and try again.
+ *
+ */
+try_again:
+ type = 0;
+ if (!dev->bid_type || !strcmp(dev->bid_type, "mdraid")) {
+ uuid_t uuid;
+
+ if (check_mdraid(probe.fd, uuid) == 0) {
+ set_uuid(dev, uuid, 0);
+ type = "mdraid";
+ goto found_type;
+ }
+ }
+ for (id = type_array; id->bim_type; id++) {
+ if (dev->bid_type &&
+ strcmp(id->bim_type, dev->bid_type))
+ continue;
+
+ idx = id->bim_kboff + (id->bim_sboff >> 10);
+ buf = get_buffer(&probe, (__u64) idx << 10, 1024);
+ if (!buf)
+ continue;
+
+ if (memcmp(id->bim_magic, buf + (id->bim_sboff & 0x3ff),
+ id->bim_len))
+ continue;
+
+ if ((id->bim_probe == NULL) ||
+ (id->bim_probe(&probe, id, buf) == 0)) {
+ type = id->bim_type;
+ goto found_type;
+ }
+ }
+
+ if (!id->bim_type && dev->bid_type) {
+ /*
+ * Zap the device filesystem information and try again
+ */
+ DBG(DEBUG_PROBE,
+ printf("previous fs type %s not valid, "
+ "trying full probe\n", dev->bid_type));
+ iter = blkid_tag_iterate_begin(dev);
+ while (blkid_tag_next(iter, &type, &value) == 0)
+ blkid_set_tag(dev, type, 0, 0);
+ blkid_tag_iterate_end(iter);
+ goto try_again;
+ }
+
+ if (!dev->bid_type) {
+ blkid_free_dev(dev);
+ dev = 0;
+ goto found_type;
+ }
+
+found_type:
+ if (dev && type) {
+ dev->bid_devno = st.st_rdev;
+ dev->bid_time = time(0);
+ dev->bid_flags |= BLKID_BID_FL_VERIFIED;
+ cache->bic_flags |= BLKID_BIC_FL_CHANGED;
+
+ blkid_set_tag(dev, "TYPE", type, 0);
+
+ DBG(DEBUG_PROBE, printf("%s: devno 0x%04llx, type %s\n",
+ dev->bid_name, (long long)st.st_rdev, type));
+ }
+
+ free(probe.sbbuf);
+ free(probe.buf);
+ if (probe.fd >= 0)
+ close(probe.fd);
+
+ return dev;
+}
+
+int blkid_known_fstype(const char *fstype)
+{
+ struct blkid_magic *id;
+
+ for (id = type_array; id->bim_type; id++) {
+ if (strcmp(fstype, id->bim_type) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ blkid_dev dev;
+ blkid_cache cache;
+ int ret;
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s device\n"
+ "Probe a single device to determine type\n", argv[0]);
+ exit(1);
+ }
+ if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+ fprintf(stderr, "%s: error creating cache (%d)\n",
+ argv[0], ret);
+ exit(1);
+ }
+ dev = blkid_get_dev(cache, argv[1], BLKID_DEV_NORMAL);
+ if (!dev) {
+ printf("%s: %s has an unsupported type\n", argv[0], argv[1]);
+ return (1);
+ }
+ printf("TYPE='%s'\n", dev->bid_type ? dev->bid_type : "(null)");
+ if (dev->bid_label)
+ printf("LABEL='%s'\n", dev->bid_label);
+ if (dev->bid_uuid)
+ printf("UUID='%s'\n", dev->bid_uuid);
+
+ blkid_free_dev(dev);
+ return (0);
+}
+#endif
diff --git a/lib/blkid/probe.h b/lib/blkid/probe.h
new file mode 100644
index 0000000..063a5b5
--- /dev/null
+++ b/lib/blkid/probe.h
@@ -0,0 +1,852 @@
+/*
+ * probe.h - constants and on-disk structures for extracting device data
+ *
+ * Copyright (C) 1999 by Andries Brouwer
+ * Copyright (C) 1999, 2000, 2003 by Theodore Ts'o
+ * Copyright (C) 2001 by Andreas Dilger
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#ifndef _BLKID_PROBE_H
+#define _BLKID_PROBE_H
+
+#include <stdint.h>
+
+#include <blkid/blkid_types.h>
+
+struct blkid_magic;
+
+#define SB_BUFFER_SIZE 0x11000
+
+struct blkid_probe {
+ int fd;
+ blkid_cache cache;
+ blkid_dev dev;
+ unsigned char *sbbuf;
+ size_t sb_valid;
+ unsigned char *buf;
+ size_t buf_max;
+};
+
+typedef int (*blkid_probe_t)(struct blkid_probe *probe,
+ struct blkid_magic *id, unsigned char *buf);
+
+struct blkid_magic {
+ const char *bim_type; /* type name for this magic */
+ long bim_kboff; /* kilobyte offset of superblock */
+ unsigned bim_sboff; /* byte offset within superblock */
+ unsigned bim_len; /* length of magic */
+ const char *bim_magic; /* magic string */
+ blkid_probe_t bim_probe; /* probe function */
+};
+
+/*
+ * Structures for each of the content types we want to extract information
+ * from. We do not necessarily need the magic field here, because we have
+ * already identified the content type before we get this far. It may still
+ * be useful if there are probe functions which handle multiple content types.
+ */
+struct ext2_super_block {
+ __u32 s_inodes_count;
+ __u32 s_blocks_count;
+ __u32 s_r_blocks_count;
+ __u32 s_free_blocks_count;
+ __u32 s_free_inodes_count;
+ __u32 s_first_data_block;
+ __u32 s_log_block_size;
+ __u32 s_dummy3[7];
+ unsigned char s_magic[2];
+ __u16 s_state;
+ __u32 s_dummy5[8];
+ __u32 s_feature_compat;
+ __u32 s_feature_incompat;
+ __u32 s_feature_ro_compat;
+ unsigned char s_uuid[16];
+ char s_volume_name[16];
+ char s_last_mounted[64];
+ __u32 s_algorithm_usage_bitmap;
+ __u8 s_prealloc_blocks;
+ __u8 s_prealloc_dir_blocks;
+ __u16 s_reserved_gdt_blocks;
+ __u8 s_journal_uuid[16];
+ __u32 s_journal_inum;
+ __u32 s_journal_dev;
+ __u32 s_last_orphan;
+ __u32 s_hash_seed[4];
+ __u8 s_def_hash_version;
+ __u8 s_jnl_backup_type;
+ __u16 s_reserved_word_pad;
+ __u32 s_default_mount_opts;
+ __u32 s_first_meta_bg;
+ __u32 s_mkfs_time;
+ __u32 s_jnl_blocks[17];
+ __u32 s_blocks_count_hi;
+ __u32 s_r_blocks_count_hi;
+ __u32 s_free_blocks_hi;
+ __u16 s_min_extra_isize;
+ __u16 s_want_extra_isize;
+ __u32 s_flags;
+ __u16 s_raid_stride;
+ __u16 s_mmp_interval;
+ __u64 s_mmp_block;
+ __u32 s_raid_stripe_width;
+ __u32 s_reserved[163];
+};
+
+/* for s_flags */
+#define EXT2_FLAGS_TEST_FILESYS 0x0004
+
+/* for s_feature_compat */
+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
+
+/* for s_feature_ro_compat */
+#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008
+#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020
+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
+#define EXT4_FEATURE_RO_COMPAT_QUOTA 0x0100
+#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400
+
+/* for s_feature_incompat */
+#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
+#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
+#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */
+#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
+#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
+#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
+
+#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+ EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
+#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
+ EXT2_FEATURE_INCOMPAT_META_BG)
+#define EXT2_FEATURE_INCOMPAT_UNSUPPORTED ~EXT2_FEATURE_INCOMPAT_SUPP
+#define EXT2_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT2_FEATURE_RO_COMPAT_SUPP
+
+#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+ EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
+#define EXT3_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
+ EXT3_FEATURE_INCOMPAT_RECOVER| \
+ EXT2_FEATURE_INCOMPAT_META_BG)
+#define EXT3_FEATURE_INCOMPAT_UNSUPPORTED ~EXT3_FEATURE_INCOMPAT_SUPP
+#define EXT3_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT3_FEATURE_RO_COMPAT_SUPP
+
+
+struct xfs_super_block {
+ unsigned char xs_magic[4];
+ __u32 xs_blocksize;
+ __u64 xs_dblocks;
+ __u64 xs_rblocks;
+ __u32 xs_dummy1[2];
+ unsigned char xs_uuid[16];
+ __u32 xs_dummy2[15];
+ char xs_fname[12];
+ __u32 xs_dummy3[2];
+ __u64 xs_icount;
+ __u64 xs_ifree;
+ __u64 xs_fdblocks;
+};
+
+struct reiserfs_super_block {
+ __u32 rs_blocks_count;
+ __u32 rs_free_blocks;
+ __u32 rs_root_block;
+ __u32 rs_journal_block;
+ __u32 rs_journal_dev;
+ __u32 rs_orig_journal_size;
+ __u32 rs_dummy2[5];
+ __u16 rs_blocksize;
+ __u16 rs_dummy3[3];
+ unsigned char rs_magic[12];
+ __u32 rs_dummy4[5];
+ unsigned char rs_uuid[16];
+ char rs_label[16];
+};
+
+struct reiser4_super_block {
+ unsigned char rs4_magic[16];
+ __u16 rs4_dummy[2];
+ unsigned char rs4_uuid[16];
+ unsigned char rs4_label[16];
+ __u64 rs4_dummy2;
+};
+
+struct jfs_super_block {
+ unsigned char js_magic[4];
+ __u32 js_version;
+ __u64 js_size;
+ __u32 js_bsize; /* 4: aggregate block size in bytes */
+ __u16 js_l2bsize; /* 2: log2 of s_bsize */
+ __u16 js_l2bfactor; /* 2: log2(s_bsize/hardware block size) */
+ __u32 js_pbsize; /* 4: hardware/LVM block size in bytes */
+ __u16 js_l2pbsize; /* 2: log2 of s_pbsize */
+ __u16 js_pad; /* 2: padding necessary for alignment */
+ __u32 js_dummy2[26];
+ unsigned char js_uuid[16];
+ unsigned char js_label[16];
+ unsigned char js_loguuid[16];
+};
+
+struct romfs_super_block {
+ unsigned char ros_magic[8];
+ __u32 ros_dummy1[2];
+ unsigned char ros_volume[16];
+};
+
+struct cramfs_super_block {
+ __u8 magic[4];
+ __u32 size;
+ __u32 flags;
+ __u32 future;
+ __u8 signature[16];
+ struct cramfs_info {
+ __u32 crc;
+ __u32 edition;
+ __u32 blocks;
+ __u32 files;
+ } info;
+ __u8 name[16];
+};
+
+struct swap_id_block {
+/* unsigned char sws_boot[1024]; */
+ __u32 sws_version;
+ __u32 sws_lastpage;
+ __u32 sws_nrbad;
+ unsigned char sws_uuid[16];
+ char sws_volume[16];
+ unsigned char sws_pad[117];
+ __u32 sws_badpg;
+};
+
+/* Yucky misaligned values */
+struct vfat_super_block {
+/* 00*/ unsigned char vs_ignored[3];
+/* 03*/ unsigned char vs_sysid[8];
+/* 0b*/ unsigned char vs_sector_size[2];
+/* 0d*/ __u8 vs_cluster_size;
+/* 0e*/ __u16 vs_reserved;
+/* 10*/ __u8 vs_fats;
+/* 11*/ unsigned char vs_dir_entries[2];
+/* 13*/ unsigned char vs_sectors[2];
+/* 15*/ unsigned char vs_media;
+/* 16*/ __u16 vs_fat_length;
+/* 18*/ __u16 vs_secs_track;
+/* 1a*/ __u16 vs_heads;
+/* 1c*/ __u32 vs_hidden;
+/* 20*/ __u32 vs_total_sect;
+/* 24*/ __u32 vs_fat32_length;
+/* 28*/ __u16 vs_flags;
+/* 2a*/ __u8 vs_version[2];
+/* 2c*/ __u32 vs_root_cluster;
+/* 30*/ __u16 vs_insfo_sector;
+/* 32*/ __u16 vs_backup_boot;
+/* 34*/ __u16 vs_reserved2[6];
+/* 40*/ unsigned char vs_unknown[3];
+/* 43*/ unsigned char vs_serno[4];
+/* 47*/ unsigned char vs_label[11];
+/* 52*/ unsigned char vs_magic[8];
+/* 5a*/ unsigned char vs_dummy2[164];
+/*1fe*/ unsigned char vs_pmagic[2];
+};
+
+/* Yucky misaligned values */
+struct msdos_super_block {
+/* 00*/ unsigned char ms_ignored[3];
+/* 03*/ unsigned char ms_sysid[8];
+/* 0b*/ unsigned char ms_sector_size[2];
+/* 0d*/ __u8 ms_cluster_size;
+/* 0e*/ __u16 ms_reserved;
+/* 10*/ __u8 ms_fats;
+/* 11*/ unsigned char ms_dir_entries[2];
+/* 13*/ unsigned char ms_sectors[2];
+/* 15*/ unsigned char ms_media;
+/* 16*/ __u16 ms_fat_length;
+/* 18*/ __u16 ms_secs_track;
+/* 1a*/ __u16 ms_heads;
+/* 1c*/ __u32 ms_hidden;
+/* 20*/ __u32 ms_total_sect;
+/* 24*/ unsigned char ms_unknown[3];
+/* 27*/ unsigned char ms_serno[4];
+/* 2b*/ unsigned char ms_label[11];
+/* 36*/ unsigned char ms_magic[8];
+/* 3d*/ unsigned char ms_dummy2[192];
+/*1fe*/ unsigned char ms_pmagic[2];
+};
+
+struct vfat_dir_entry {
+ __u8 name[11];
+ __u8 attr;
+ __u16 time_creat;
+ __u16 date_creat;
+ __u16 time_acc;
+ __u16 date_acc;
+ __u16 cluster_high;
+ __u16 time_write;
+ __u16 date_write;
+ __u16 cluster_low;
+ __u32 size;
+};
+
+/* maximum number of clusters */
+#define FAT12_MAX 0xFF4
+#define FAT16_MAX 0xFFF4
+#define FAT32_MAX 0x0FFFFFF6
+
+struct minix_super_block {
+ __u16 ms_ninodes;
+ __u16 ms_nzones;
+ __u16 ms_imap_blocks;
+ __u16 ms_zmap_blocks;
+ __u16 ms_firstdatazone;
+ __u16 ms_log_zone_size;
+ __u32 ms_max_size;
+ unsigned char ms_magic[2];
+ __u16 ms_state;
+ __u32 ms_zones;
+};
+
+struct mdp_superblock_s {
+ __u32 md_magic;
+ __u32 major_version;
+ __u32 minor_version;
+ __u32 patch_version;
+ __u32 gvalid_words;
+ __u32 set_uuid0;
+ __u32 ctime;
+ __u32 level;
+ __u32 size;
+ __u32 nr_disks;
+ __u32 raid_disks;
+ __u32 md_minor;
+ __u32 not_persistent;
+ __u32 set_uuid1;
+ __u32 set_uuid2;
+ __u32 set_uuid3;
+};
+
+struct hfs_super_block {
+ char h_magic[2];
+ char h_dummy[18];
+ __u32 h_blksize;
+};
+
+struct ocfs_volume_header {
+ unsigned char minor_version[4];
+ unsigned char major_version[4];
+ unsigned char signature[128];
+ char mount[128];
+ unsigned char mount_len[2];
+};
+
+struct ocfs_volume_label {
+ unsigned char disk_lock[48];
+ char label[64];
+ unsigned char label_len[2];
+ unsigned char vol_id[16];
+ unsigned char vol_id_len[2];
+};
+
+#define ocfsmajor(o) ((__u32)o.major_version[0] \
+ + (((__u32) o.major_version[1]) << 8) \
+ + (((__u32) o.major_version[2]) << 16) \
+ + (((__u32) o.major_version[3]) << 24))
+#define ocfslabellen(o) ((__u32)o.label_len[0] + (((__u32) o.label_len[1]) << 8))
+#define ocfsmountlen(o) ((__u32)o.mount_len[0] + (((__u32) o.mount_len[1])<<8))
+
+#define OCFS_MAGIC "OracleCFS"
+
+struct ocfs2_super_block {
+ unsigned char signature[8];
+ unsigned char s_dummy1[184];
+ unsigned char s_dummy2[80];
+ char s_label[64];
+ unsigned char s_uuid[16];
+};
+
+#define OCFS2_MIN_BLOCKSIZE 512
+#define OCFS2_MAX_BLOCKSIZE 4096
+
+#define OCFS2_SUPER_BLOCK_BLKNO 2
+
+#define OCFS2_SUPER_BLOCK_SIGNATURE "OCFSV2"
+
+struct oracle_asm_disk_label {
+ char dummy[32];
+ char dl_tag[8];
+ char dl_id[24];
+};
+
+#define ORACLE_ASM_DISK_LABEL_MARKED "ORCLDISK"
+#define ORACLE_ASM_DISK_LABEL_OFFSET 32
+
+struct iso_volume_descriptor {
+ unsigned char vd_type;
+ unsigned char vd_id[5];
+ unsigned char vd_version;
+ unsigned char flags;
+ unsigned char system_id[32];
+ unsigned char volume_id[32];
+ unsigned char unused[8];
+ unsigned char space_size[8];
+ unsigned char escape_sequences[8];
+};
+
+/* Common gfs/gfs2 constants: */
+#define GFS_MAGIC 0x01161970
+#define GFS_DEFAULT_BSIZE 4096
+#define GFS_SUPERBLOCK_OFFSET (0x10 * GFS_DEFAULT_BSIZE)
+#define GFS_METATYPE_SB 1
+#define GFS_FORMAT_SB 100
+#define GFS_LOCKNAME_LEN 64
+
+/* gfs1 constants: */
+#define GFS_FORMAT_FS 1309
+#define GFS_FORMAT_MULTI 1401
+/* gfs2 constants: */
+#define GFS2_FORMAT_FS 1801
+#define GFS2_FORMAT_MULTI 1900
+
+struct gfs2_meta_header {
+ __u32 mh_magic;
+ __u32 mh_type;
+ __u64 __pad0; /* Was generation number in gfs1 */
+ __u32 mh_format;
+ __u32 __pad1; /* Was incarnation number in gfs1 */
+};
+
+struct gfs2_inum {
+ __u64 no_formal_ino;
+ __u64 no_addr;
+};
+
+struct gfs2_sb {
+ struct gfs2_meta_header sb_header;
+
+ __u32 sb_fs_format;
+ __u32 sb_multihost_format;
+ __u32 __pad0; /* Was superblock flags in gfs1 */
+
+ __u32 sb_bsize;
+ __u32 sb_bsize_shift;
+ __u32 __pad1; /* Was journal segment size in gfs1 */
+
+ struct gfs2_inum sb_master_dir; /* Was jindex dinode in gfs1 */
+ struct gfs2_inum __pad2; /* Was rindex dinode in gfs1 */
+ struct gfs2_inum sb_root_dir;
+
+ char sb_lockproto[GFS_LOCKNAME_LEN];
+ char sb_locktable[GFS_LOCKNAME_LEN];
+ /* In gfs1, quota and license dinodes followed */
+};
+
+struct ntfs_super_block {
+ __u8 jump[3];
+ __u8 oem_id[8];
+ __u8 bios_parameter_block[25];
+ __u16 unused[2];
+ __u64 number_of_sectors;
+ __u64 mft_cluster_location;
+ __u64 mft_mirror_cluster_location;
+ __s8 cluster_per_mft_record;
+ __u8 reserved1[3];
+ __s8 cluster_per_index_record;
+ __u8 reserved2[3];
+ __u64 volume_serial;
+ __u16 checksum;
+};
+
+struct master_file_table_record {
+ __u32 magic;
+ __u16 usa_ofs;
+ __u16 usa_count;
+ __u64 lsn;
+ __u16 sequence_number;
+ __u16 link_count;
+ __u16 attrs_offset;
+ __u16 flags;
+ __u32 bytes_in_use;
+ __u32 bytes_allocated;
+} __attribute__((__packed__));
+
+struct file_attribute {
+ __u32 type;
+ __u32 len;
+ __u8 non_resident;
+ __u8 name_len;
+ __u16 name_offset;
+ __u16 flags;
+ __u16 instance;
+ __u32 value_len;
+ __u16 value_offset;
+} __attribute__((__packed__));
+
+#define MFT_RECORD_VOLUME 3
+#define MFT_RECORD_ATTR_VOLUME_NAME 0x60
+#define MFT_RECORD_ATTR_VOLUME_INFO 0x70
+#define MFT_RECORD_ATTR_OBJECT_ID 0x40
+#define MFT_RECORD_ATTR_END 0xffffffffu
+
+/* HFS / HFS+ */
+struct hfs_finder_info {
+ __u32 boot_folder;
+ __u32 start_app;
+ __u32 open_folder;
+ __u32 os9_folder;
+ __u32 reserved;
+ __u32 osx_folder;
+ __u8 id[8];
+} __attribute__((packed));
+
+struct hfs_mdb {
+ __u8 signature[2];
+ __u32 cr_date;
+ __u32 ls_Mod;
+ __u16 atrb;
+ __u16 nm_fls;
+ __u16 vbm_st;
+ __u16 alloc_ptr;
+ __u16 nm_al_blks;
+ __u32 al_blk_size;
+ __u32 clp_size;
+ __u16 al_bl_st;
+ __u32 nxt_cnid;
+ __u16 free_bks;
+ __u8 label_len;
+ __u8 label[27];
+ __u32 vol_bkup;
+ __u16 vol_seq_num;
+ __u32 wr_cnt;
+ __u32 xt_clump_size;
+ __u32 ct_clump_size;
+ __u16 num_root_dirs;
+ __u32 file_count;
+ __u32 dir_count;
+ struct hfs_finder_info finder_info;
+ __u8 embed_sig[2];
+ __u16 embed_startblock;
+ __u16 embed_blockcount;
+} __attribute__((packed));
+
+
+#define HFS_NODE_LEAF 0xff
+#define HFSPLUS_POR_CNID 1
+
+struct hfsplus_bnode_descriptor {
+ __u32 next;
+ __u32 prev;
+ __u8 type;
+ __u8 height;
+ __u16 num_recs;
+ __u16 reserved;
+} __attribute__((packed));
+
+struct hfsplus_bheader_record {
+ __u16 depth;
+ __u32 root;
+ __u32 leaf_count;
+ __u32 leaf_head;
+ __u32 leaf_tail;
+ __u16 node_size;
+} __attribute__((packed));
+
+struct hfsplus_catalog_key {
+ __u16 key_len;
+ __u32 parent_id;
+ __u16 unicode_len;
+ __u8 unicode[255 * 2];
+} __attribute__((packed));
+
+struct hfsplus_extent {
+ __u32 start_block;
+ __u32 block_count;
+} __attribute__((packed));
+
+#define HFSPLUS_EXTENT_COUNT 8
+struct hfsplus_fork {
+ __u64 total_size;
+ __u32 clump_size;
+ __u32 total_blocks;
+ struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
+} __attribute__((packed));
+
+struct hfsplus_vol_header {
+ __u8 signature[2];
+ __u16 version;
+ __u32 attributes;
+ __u32 last_mount_vers;
+ __u32 reserved;
+ __u32 create_date;
+ __u32 modify_date;
+ __u32 backup_date;
+ __u32 checked_date;
+ __u32 file_count;
+ __u32 folder_count;
+ __u32 blocksize;
+ __u32 total_blocks;
+ __u32 free_blocks;
+ __u32 next_alloc;
+ __u32 rsrc_clump_sz;
+ __u32 data_clump_sz;
+ __u32 next_cnid;
+ __u32 write_count;
+ __u64 encodings_bmp;
+ struct hfs_finder_info finder_info;
+ struct hfsplus_fork alloc_file;
+ struct hfsplus_fork ext_file;
+ struct hfsplus_fork cat_file;
+ struct hfsplus_fork attr_file;
+ struct hfsplus_fork start_file;
+} __attribute__((packed));
+
+
+/* this is lvm's label_header & pv_header combined. */
+
+#define LVM2_ID_LEN 32
+
+struct lvm2_pv_label_header {
+ /* label_header */
+ __u8 id[8]; /* LABELONE */
+ __u64 sector_xl; /* Sector number of this label */
+ __u32 crc_xl; /* From next field to end of sector */
+ __u32 offset_xl; /* Offset from start of struct to contents */
+ __u8 type[8]; /* LVM2 001 */
+ /* pv_header */
+ __u8 pv_uuid[LVM2_ID_LEN];
+} __attribute__ ((packed));
+
+
+/*
+ * this is a very generous portion of the super block, giving us
+ * room to translate 14 chunks with 3 stripes each.
+ */
+#define BTRFS_SYSTEM_CHUNK_ARRAY_SIZE 2048
+#define BTRFS_LABEL_SIZE 256
+#define BTRFS_UUID_SIZE 16
+#define BTRFS_FSID_SIZE 16
+#define BTRFS_CSUM_SIZE 32
+
+struct btrfs_dev_item {
+ /* the internal btrfs device id */
+ __u64 devid;
+
+ /* size of the device */
+ __u64 total_bytes;
+
+ /* bytes used */
+ __u64 bytes_used;
+
+ /* optimal io alignment for this device */
+ __u32 io_align;
+
+ /* optimal io width for this device */
+ __u32 io_width;
+
+ /* minimal io size for this device */
+ __u32 sector_size;
+
+ /* type and info about this device */
+ __u64 type;
+
+ /* expected generation for this device */
+ __u64 generation;
+
+ /*
+ * starting byte of this partition on the device,
+ * to allow for stripe alignment in the future
+ */
+ __u64 start_offset;
+
+ /* grouping information for allocation decisions */
+ __u32 dev_group;
+
+ /* seek speed 0-100 where 100 is fastest */
+ __u8 seek_speed;
+
+ /* bandwidth 0-100 where 100 is fastest */
+ __u8 bandwidth;
+
+ /* btrfs generated uuid for this device */
+ __u8 uuid[BTRFS_UUID_SIZE];
+
+ /* uuid of FS who owns this device */
+ __u8 fsid[BTRFS_UUID_SIZE];
+} __attribute__ ((__packed__));
+
+/*
+ * the super block basically lists the main trees of the FS
+ * it currently lacks any block count etc etc
+ */
+struct btrfs_super_block {
+ __u8 csum[BTRFS_CSUM_SIZE];
+ /* the first 3 fields must match struct btrfs_header */
+ __u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */
+ __u64 bytenr; /* this block number */
+ __u64 flags;
+
+ /* allowed to be different from the btrfs_header from here own down */
+ __u64 magic;
+ __u64 generation;
+ __u64 root;
+ __u64 chunk_root;
+ __u64 log_root;
+
+ /* this will help find the new super based on the log root */
+ __u64 log_root_transid;
+ __u64 total_bytes;
+ __u64 bytes_used;
+ __u64 root_dir_objectid;
+ __u64 num_devices;
+ __u32 sectorsize;
+ __u32 nodesize;
+ __u32 leafsize;
+ __u32 stripesize;
+ __u32 sys_chunk_array_size;
+ __u64 chunk_root_generation;
+ __u64 compat_flags;
+ __u64 compat_ro_flags;
+ __u64 incompat_flags;
+ __u16 csum_type;
+ __u8 root_level;
+ __u8 chunk_root_level;
+ __u8 log_root_level;
+ struct btrfs_dev_item dev_item;
+
+ char label[BTRFS_LABEL_SIZE];
+
+ /* future expansion */
+ __u64 reserved[32];
+ __u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
+} __attribute__ ((__packed__));
+
+#define F2FS_MAX_EXTENSION 64 /* # of extension entries */
+
+struct f2fs_super_block {
+ __u32 magic; /* Magic Number */
+ __u16 major_ver; /* Major Version */
+ __u16 minor_ver; /* Minor Version */
+ __u32 log_sectorsize; /* log2 sector size in bytes */
+ __u32 log_sectors_per_block; /* log2 # of sectors per block */
+ __u32 log_blocksize; /* log2 block size in bytes */
+ __u32 log_blocks_per_seg; /* log2 # of blocks per segment */
+ __u32 segs_per_sec; /* # of segments per section */
+ __u32 secs_per_zone; /* # of sections per zone */
+ __u32 checksum_offset; /* checksum offset inside super block */
+ __u64 block_count; /* total # of user blocks */
+ __u32 section_count; /* total # of sections */
+ __u32 segment_count; /* total # of segments */
+ __u32 segment_count_ckpt; /* # of segments for checkpoint */
+ __u32 segment_count_sit; /* # of segments for SIT */
+ __u32 segment_count_nat; /* # of segments for NAT */
+ __u32 segment_count_ssa; /* # of segments for SSA */
+ __u32 segment_count_main; /* # of segments for main area */
+ __u32 segment0_blkaddr; /* start block address of segment 0 */
+ __u32 cp_blkaddr; /* start block address of checkpoint */
+ __u32 sit_blkaddr; /* start block address of SIT */
+ __u32 nat_blkaddr; /* start block address of NAT */
+ __u32 ssa_blkaddr; /* start block address of SSA */
+ __u32 main_blkaddr; /* start block address of main area */
+ __u32 root_ino; /* root inode number */
+ __u32 node_ino; /* node inode number */
+ __u32 meta_ino; /* meta inode number */
+ __u8 uuid[16]; /* 128-bit uuid for volume */
+ __u16 volume_name[512]; /* volume name */
+ __u32 extension_count; /* # of extensions below */
+ __u8 extension_list[F2FS_MAX_EXTENSION][8]; /* extension array */
+} __attribute__((__packed__));
+
+struct exfat_super_block {
+ uint8_t jump[3];
+ uint8_t oem_name[8];
+ uint8_t __unused1[53];
+ uint64_t block_start;
+ uint64_t block_count;
+ uint32_t fat_block_start;
+ uint32_t fat_block_count;
+ uint32_t cluster_block_start;
+ uint32_t cluster_count;
+ uint32_t rootdir_cluster;
+ uint8_t volume_serial[4];
+ struct {
+ uint8_t vermin;
+ uint8_t vermaj;
+ } version;
+ uint16_t volume_state;
+ uint8_t block_bits;
+ uint8_t bpc_bits;
+ uint8_t fat_count;
+ uint8_t drive_no;
+ uint8_t allocated_percent;
+} __attribute__((__packed__));
+
+struct exfat_entry_label {
+ uint8_t type;
+ uint8_t length;
+ uint8_t name[30];
+} __attribute__((__packed__));
+
+#define BLOCK_SIZE(sb) (1 << (sb)->block_bits)
+#define CLUSTER_SIZE(sb) (BLOCK_SIZE(sb) << (sb)->bpc_bits)
+
+#define EXFAT_FIRST_DATA_CLUSTER 2
+#define EXFAT_LAST_DATA_CLUSTER 0xffffff6
+#define EXFAT_ENTRY_SIZE 32
+
+#define EXFAT_ENTRY_EOD 0x00
+#define EXFAT_ENTRY_LABEL 0x83
+
+/*
+ * Byte swap functions
+ */
+#ifdef __GNUC__
+#define _INLINE_ static __inline__
+#else /* For Watcom C */
+#define _INLINE_ static inline
+#endif
+
+_INLINE_ __u16 blkid_swab16(__u16 val)
+{
+ return (val >> 8) | (val << 8);
+}
+
+_INLINE_ __u32 blkid_swab32(__u32 val)
+{
+ return ((val>>24) | ((val>>8)&0xFF00) |
+ ((val<<8)&0xFF0000) | (val<<24));
+}
+
+_INLINE_ __u64 blkid_swab64(__u64 val)
+{
+ return (blkid_swab32(val >> 32) |
+ (((__u64) blkid_swab32(val & 0xFFFFFFFFUL)) << 32));
+}
+
+#ifdef WORDS_BIGENDIAN
+#define blkid_le16(x) blkid_swab16(x)
+#define blkid_le32(x) blkid_swab32(x)
+#define blkid_le64(x) blkid_swab64(x)
+#define blkid_be16(x) (x)
+#define blkid_be32(x) (x)
+#define blkid_be64(x) (x)
+#else
+#define blkid_le16(x) (x)
+#define blkid_le32(x) (x)
+#define blkid_le64(x) (x)
+#define blkid_be16(x) blkid_swab16(x)
+#define blkid_be32(x) blkid_swab32(x)
+#define blkid_be64(x) blkid_swab64(x)
+#endif
+
+#undef _INLINE_
+
+#endif /* _BLKID_PROBE_H */
diff --git a/lib/blkid/read.c b/lib/blkid/read.c
new file mode 100644
index 0000000..b894856
--- /dev/null
+++ b/lib/blkid/read.c
@@ -0,0 +1,494 @@
+/*
+ * read.c - read the blkid cache from disk, to avoid scanning all devices
+ *
+ * Copyright (C) 2001, 2003 Theodore Y. Ts'o
+ * Copyright (C) 2001 Andreas Dilger
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#define _XOPEN_SOURCE 600 /* for inclusion of strtoull */
+
+#include "config.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "blkidP.h"
+#include "uuid/uuid.h"
+
+#ifdef HAVE_STRTOULL
+#define STRTOULL strtoull /* defined in stdlib.h if you try hard enough */
+#else
+/* FIXME: need to support real strtoull here */
+#define STRTOULL strtoul
+#endif
+
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef TEST_PROGRAM
+#define blkid_debug_dump_dev(dev) (debug_dump_dev(dev))
+static void debug_dump_dev(blkid_dev dev);
+#endif
+
+/*
+ * File format:
+ *
+ * <device [<NAME="value"> ...]>device_name</device>
+ *
+ * The following tags are required for each entry:
+ * <ID="id"> unique (within this file) ID number of this device
+ * <TIME="time"> (ascii time_t) time this entry was last read from disk
+ * <TYPE="type"> (detected) type of filesystem/data for this partition
+ *
+ * The following tags may be present, depending on the device contents
+ * <LABEL="label"> (user supplied) label (volume name, etc)
+ * <UUID="uuid"> (generated) universally unique identifier (serial no)
+ */
+
+static char *skip_over_blank(char *cp)
+{
+ while (*cp && isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *skip_over_word(char *cp)
+{
+ char ch;
+
+ while ((ch = *cp)) {
+ /* If we see a backslash, skip the next character */
+ if (ch == '\\') {
+ cp++;
+ if (*cp == '\0')
+ break;
+ cp++;
+ continue;
+ }
+ if (isspace(ch) || ch == '<' || ch == '>')
+ break;
+ cp++;
+ }
+ return cp;
+}
+
+static char *strip_line(char *line)
+{
+ char *p;
+
+ line = skip_over_blank(line);
+
+ p = line + strlen(line) - 1;
+
+ while (*line) {
+ if (isspace(*p))
+ *p-- = '\0';
+ else
+ break;
+ }
+
+ return line;
+}
+
+#if 0
+static char *parse_word(char **buf)
+{
+ char *word, *next;
+
+ word = *buf;
+ if (*word == '\0')
+ return NULL;
+
+ word = skip_over_blank(word);
+ next = skip_over_word(word);
+ if (*next) {
+ char *end = next - 1;
+ if (*end == '"' || *end == '\'')
+ *end = '\0';
+ *next++ = '\0';
+ }
+ *buf = next;
+
+ if (*word == '"' || *word == '\'')
+ word++;
+ return word;
+}
+#endif
+
+/*
+ * Start parsing a new line from the cache.
+ *
+ * line starts with "<device" return 1 -> continue parsing line
+ * line starts with "<foo", empty, or # return 0 -> skip line
+ * line starts with other, return -BLKID_ERR_CACHE -> error
+ */
+static int parse_start(char **cp)
+{
+ char *p;
+
+ p = strip_line(*cp);
+
+ /* Skip comment or blank lines. We can't just NUL the first '#' char,
+ * in case it is inside quotes, or escaped.
+ */
+ if (*p == '\0' || *p == '#')
+ return 0;
+
+ if (!strncmp(p, "<device", 7)) {
+ DBG(DEBUG_READ, printf("found device header: %8s\n", p));
+ p += 7;
+
+ *cp = p;
+ return 1;
+ }
+
+ if (*p == '<')
+ return 0;
+
+ return -BLKID_ERR_CACHE;
+}
+
+/* Consume the remaining XML on the line (cosmetic only) */
+static int parse_end(char **cp)
+{
+ *cp = skip_over_blank(*cp);
+
+ if (!strncmp(*cp, "</device>", 9)) {
+ DBG(DEBUG_READ, printf("found device trailer %9s\n", *cp));
+ *cp += 9;
+ return 0;
+ }
+
+ return -BLKID_ERR_CACHE;
+}
+
+/*
+ * Allocate a new device struct with device name filled in. Will handle
+ * finding the device on lines of the form:
+ * <device foo=bar>devname</device>
+ * <device>devname<foo>bar</foo></device>
+ */
+static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp)
+{
+ char *start, *tmp, *end, *name;
+ int ret;
+
+ if ((ret = parse_start(cp)) <= 0)
+ return ret;
+
+ start = tmp = strchr(*cp, '>');
+ if (!start) {
+ DBG(DEBUG_READ,
+ printf("blkid: short line parsing dev: %s\n", *cp));
+ return -BLKID_ERR_CACHE;
+ }
+ start = skip_over_blank(start + 1);
+ end = skip_over_word(start);
+
+ DBG(DEBUG_READ, printf("device should be %.*s\n",
+ (int)(end - start), start));
+
+ if (**cp == '>')
+ *cp = end;
+ else
+ (*cp)++;
+
+ *tmp = '\0';
+
+ if (!(tmp = strrchr(end, '<')) || parse_end(&tmp) < 0) {
+ DBG(DEBUG_READ,
+ printf("blkid: missing </device> ending: %s\n", end));
+ } else if (tmp)
+ *tmp = '\0';
+
+ if (end - start <= 1) {
+ DBG(DEBUG_READ, printf("blkid: empty device name: %s\n", *cp));
+ return -BLKID_ERR_CACHE;
+ }
+
+ name = blkid_strndup(start, end-start);
+ if (name == NULL)
+ return -BLKID_ERR_MEM;
+
+ DBG(DEBUG_READ, printf("found dev %s\n", name));
+
+ if (!(*dev = blkid_get_dev(cache, name, BLKID_DEV_CREATE))) {
+ free(name);
+ return -BLKID_ERR_MEM;
+ }
+
+ free(name);
+ return 1;
+}
+
+/*
+ * Extract a tag of the form NAME="value" from the line.
+ */
+static int parse_token(char **name, char **value, char **cp)
+{
+ char *end;
+
+ if (!name || !value || !cp)
+ return -BLKID_ERR_PARAM;
+
+ if (!(*value = strchr(*cp, '=')))
+ return 0;
+
+ **value = '\0';
+ *name = strip_line(*cp);
+ *value = skip_over_blank(*value + 1);
+
+ if (**value == '"') {
+ end = strchr(*value + 1, '"');
+ if (!end) {
+ DBG(DEBUG_READ,
+ printf("unbalanced quotes at: %s\n", *value));
+ *cp = *value;
+ return -BLKID_ERR_CACHE;
+ }
+ (*value)++;
+ *end = '\0';
+ end++;
+ } else {
+ end = skip_over_word(*value);
+ if (*end) {
+ *end = '\0';
+ end++;
+ }
+ }
+ *cp = end;
+
+ return 1;
+}
+
+/*
+ * Extract a tag of the form <NAME>value</NAME> from the line.
+ */
+/*
+static int parse_xml(char **name, char **value, char **cp)
+{
+ char *end;
+
+ if (!name || !value || !cp)
+ return -BLKID_ERR_PARAM;
+
+ *name = strip_line(*cp);
+
+ if ((*name)[0] != '<' || (*name)[1] == '/')
+ return 0;
+
+ FIXME: finish this.
+}
+*/
+
+/*
+ * Extract a tag from the line.
+ *
+ * Return 1 if a valid tag was found.
+ * Return 0 if no tag found.
+ * Return -ve error code.
+ */
+static int parse_tag(blkid_cache cache, blkid_dev dev, char **cp)
+{
+ char *name;
+ char *value;
+ int ret;
+
+ if (!cache || !dev)
+ return -BLKID_ERR_PARAM;
+
+ if ((ret = parse_token(&name, &value, cp)) <= 0 /* &&
+ (ret = parse_xml(&name, &value, cp)) <= 0 */)
+ return ret;
+
+ /* Some tags are stored directly in the device struct */
+ if (!strcmp(name, "DEVNO"))
+ dev->bid_devno = STRTOULL(value, 0, 0);
+ else if (!strcmp(name, "PRI"))
+ dev->bid_pri = strtol(value, 0, 0);
+ else if (!strcmp(name, "TIME"))
+ dev->bid_time = STRTOULL(value, 0, 0);
+ else
+ ret = blkid_set_tag(dev, name, value, strlen(value));
+
+ DBG(DEBUG_READ, printf(" tag: %s=\"%s\"\n", name, value));
+
+ return ret < 0 ? ret : 1;
+}
+
+/*
+ * Parse a single line of data, and return a newly allocated dev struct.
+ * Add the new device to the cache struct, if one was read.
+ *
+ * Lines are of the form <device [TAG="value" ...]>/dev/foo</device>
+ *
+ * Returns -ve value on error.
+ * Returns 0 otherwise.
+ * If a valid device was read, *dev_p is non-NULL, otherwise it is NULL
+ * (e.g. comment lines, unknown XML content, etc).
+ */
+static int blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp)
+{
+ blkid_dev dev;
+ int ret;
+
+ if (!cache || !dev_p)
+ return -BLKID_ERR_PARAM;
+
+ *dev_p = NULL;
+
+ DBG(DEBUG_READ, printf("line: %s\n", cp));
+
+ if ((ret = parse_dev(cache, dev_p, &cp)) <= 0)
+ return ret;
+
+ dev = *dev_p;
+
+ while ((ret = parse_tag(cache, dev, &cp)) > 0) {
+ ;
+ }
+
+ if (dev->bid_type == NULL) {
+ DBG(DEBUG_READ,
+ printf("blkid: device %s has no TYPE\n",dev->bid_name));
+ blkid_free_dev(dev);
+ }
+
+ DBG(DEBUG_READ, blkid_debug_dump_dev(dev));
+
+ return ret;
+}
+
+/*
+ * Parse the specified filename, and return the data in the supplied or
+ * a newly allocated cache struct. If the file doesn't exist, return a
+ * new empty cache struct.
+ */
+void blkid_read_cache(blkid_cache cache)
+{
+ FILE *file;
+ char buf[4096];
+ int fd, lineno = 0;
+ struct stat st;
+
+ if (!cache)
+ return;
+
+ /*
+ * If the file doesn't exist, then we just return an empty
+ * struct so that the cache can be populated.
+ */
+ if ((fd = open(cache->bic_filename, O_RDONLY)) < 0)
+ return;
+ if (fstat(fd, &st) < 0)
+ goto errout;
+ if ((st.st_mtime == cache->bic_ftime) ||
+ (cache->bic_flags & BLKID_BIC_FL_CHANGED)) {
+ DBG(DEBUG_CACHE, printf("skipping re-read of %s\n",
+ cache->bic_filename));
+ goto errout;
+ }
+
+ DBG(DEBUG_CACHE, printf("reading cache file %s\n",
+ cache->bic_filename));
+
+ file = fdopen(fd, "r");
+ if (!file)
+ goto errout;
+
+ while (fgets(buf, sizeof(buf), file)) {
+ blkid_dev dev;
+ unsigned int end;
+
+ lineno++;
+ if (buf[0] == 0)
+ continue;
+ end = strlen(buf) - 1;
+ /* Continue reading next line if it ends with a backslash */
+ while (buf[end] == '\\' && end < sizeof(buf) - 2 &&
+ fgets(buf + end, sizeof(buf) - end, file)) {
+ end = strlen(buf) - 1;
+ lineno++;
+ }
+
+ if (blkid_parse_line(cache, &dev, buf) < 0) {
+ DBG(DEBUG_READ,
+ printf("blkid: bad format on line %d\n", lineno));
+ continue;
+ }
+ }
+ fclose(file);
+
+ /*
+ * Initially we do not need to write out the cache file.
+ */
+ cache->bic_flags &= ~BLKID_BIC_FL_CHANGED;
+ cache->bic_ftime = st.st_mtime;
+
+ return;
+errout:
+ close(fd);
+ return;
+}
+
+#ifdef TEST_PROGRAM
+static void debug_dump_dev(blkid_dev dev)
+{
+ struct list_head *p;
+
+ if (!dev) {
+ printf(" dev: NULL\n");
+ return;
+ }
+
+ printf(" dev: name = %s\n", dev->bid_name);
+ printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno);
+ printf(" dev: TIME=\"%lld\"\n", (long long)dev->bid_time);
+ printf(" dev: PRI=\"%d\"\n", dev->bid_pri);
+ printf(" dev: flags = 0x%08X\n", dev->bid_flags);
+
+ list_for_each(p, &dev->bid_tags) {
+ blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags);
+ if (tag)
+ printf(" tag: %s=\"%s\"\n", tag->bit_name,
+ tag->bit_val);
+ else
+ printf(" tag: NULL\n");
+ }
+ printf("\n");
+}
+
+int main(int argc, char**argv)
+{
+ blkid_cache cache = NULL;
+ int ret;
+
+ blkid_debug_mask = DEBUG_ALL;
+ if (argc > 2) {
+ fprintf(stderr, "Usage: %s [filename]\n"
+ "Test parsing of the cache (filename)\n", argv[0]);
+ exit(1);
+ }
+ if ((ret = blkid_get_cache(&cache, argv[1])) < 0)
+ fprintf(stderr, "error %d reading cache file %s\n", ret,
+ argv[1] ? argv[1] : BLKID_CACHE_FILE);
+
+ blkid_put_cache(cache);
+
+ return ret;
+}
+#endif
diff --git a/lib/blkid/resolve.c b/lib/blkid/resolve.c
new file mode 100644
index 0000000..3bc37b0
--- /dev/null
+++ b/lib/blkid/resolve.c
@@ -0,0 +1,140 @@
+/*
+ * resolve.c - resolve names and tags into specific devices
+ *
+ * Copyright (C) 2001, 2003 Theodore Ts'o.
+ * Copyright (C) 2001 Andreas Dilger
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "blkidP.h"
+
+/*
+ * Find a tagname (e.g. LABEL or UUID) on a specific device.
+ */
+char *blkid_get_tag_value(blkid_cache cache, const char *tagname,
+ const char *devname)
+{
+ blkid_tag found;
+ blkid_dev dev;
+ blkid_cache c = cache;
+ char *ret = NULL;
+
+ DBG(DEBUG_RESOLVE, printf("looking for %s on %s\n", tagname, devname));
+
+ if (!devname)
+ return NULL;
+
+ if (!cache) {
+ if (blkid_get_cache(&c, NULL) < 0)
+ return NULL;
+ }
+
+ if ((dev = blkid_get_dev(c, devname, BLKID_DEV_NORMAL)) &&
+ (found = blkid_find_tag_dev(dev, tagname)))
+ ret = blkid_strdup(found->bit_val);
+
+ if (!cache)
+ blkid_put_cache(c);
+
+ return ret;
+}
+
+/*
+ * Locate a device name from a token (NAME=value string), or (name, value)
+ * pair. In the case of a token, value is ignored. If the "token" is not
+ * of the form "NAME=value" and there is no value given, then it is assumed
+ * to be the actual devname and a copy is returned.
+ */
+char *blkid_get_devname(blkid_cache cache, const char *token,
+ const char *value)
+{
+ blkid_dev dev;
+ blkid_cache c = cache;
+ char *t = 0, *v = 0;
+ char *ret = NULL;
+
+ if (!token)
+ return NULL;
+
+ if (!cache) {
+ if (blkid_get_cache(&c, NULL) < 0)
+ return NULL;
+ }
+
+ DBG(DEBUG_RESOLVE,
+ printf("looking for %s%s%s %s\n", token, value ? "=" : "",
+ value ? value : "", cache ? "in cache" : "from disk"));
+
+ if (!value) {
+ if (!strchr(token, '=')) {
+ ret = blkid_strdup(token);
+ goto out;
+ }
+ blkid_parse_tag_string(token, &t, &v);
+ if (!t || !v)
+ goto out;
+ token = t;
+ value = v;
+ }
+
+ dev = blkid_find_dev_with_tag(c, token, value);
+ if (!dev)
+ goto out;
+
+ ret = blkid_strdup(blkid_dev_devname(dev));
+
+out:
+ free(t);
+ free(v);
+ if (!cache) {
+ blkid_put_cache(c);
+ }
+ return (ret);
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ char *value;
+ blkid_cache cache;
+
+ blkid_debug_mask = DEBUG_ALL;
+ if (argc != 2 && argc != 3) {
+ fprintf(stderr, "Usage:\t%s tagname=value\n"
+ "\t%s tagname devname\n"
+ "Find which device holds a given token or\n"
+ "Find what the value of a tag is in a device\n",
+ argv[0], argv[0]);
+ exit(1);
+ }
+ if (blkid_get_cache(&cache, "/dev/null") < 0) {
+ fprintf(stderr, "Couldn't get blkid cache\n");
+ exit(1);
+ }
+
+ if (argv[2]) {
+ value = blkid_get_tag_value(cache, argv[1], argv[2]);
+ printf("%s has tag %s=%s\n", argv[2], argv[1],
+ value ? value : "<missing>");
+ } else {
+ value = blkid_get_devname(cache, argv[1], NULL);
+ printf("%s has tag %s\n", value ? value : "<none>", argv[1]);
+ }
+ blkid_put_cache(cache);
+ return value ? 0 : 1;
+}
+#endif
diff --git a/lib/blkid/save.c b/lib/blkid/save.c
new file mode 100644
index 0000000..6f4499c
--- /dev/null
+++ b/lib/blkid/save.c
@@ -0,0 +1,213 @@
+/*
+ * save.c - write the cache struct to disk
+ *
+ * Copyright (C) 2001 by Andreas Dilger
+ * Copyright (C) 2003 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include "blkidP.h"
+
+#ifdef _WIN32
+#include "windows.h"
+#endif
+
+static int save_dev(blkid_dev dev, FILE *file)
+{
+ struct list_head *p;
+
+ if (!dev || dev->bid_name[0] != '/')
+ return 0;
+
+ DBG(DEBUG_SAVE,
+ printf("device %s, type %s\n", dev->bid_name, dev->bid_type ?
+ dev->bid_type : "(null)"));
+
+ fprintf(file,
+ "<device DEVNO=\"0x%04lx\" TIME=\"%ld\"",
+ (unsigned long) dev->bid_devno, (long) dev->bid_time);
+ if (dev->bid_pri)
+ fprintf(file, " PRI=\"%d\"", dev->bid_pri);
+ list_for_each(p, &dev->bid_tags) {
+ blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags);
+ fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val);
+ }
+ fprintf(file, ">%s</device>\n", dev->bid_name);
+
+ return 0;
+}
+
+/*
+ * Write out the cache struct to the cache file on disk.
+ */
+int blkid_flush_cache(blkid_cache cache)
+{
+ struct list_head *p;
+ char *tmp = NULL;
+ const char *opened = NULL;
+ const char *filename;
+ FILE *file = NULL;
+ int fd, ret = 0;
+ struct stat st;
+
+ if (!cache)
+ return -BLKID_ERR_PARAM;
+
+ if (list_empty(&cache->bic_devs) ||
+ !(cache->bic_flags & BLKID_BIC_FL_CHANGED)) {
+ DBG(DEBUG_SAVE, printf("skipping cache file write\n"));
+ return 0;
+ }
+
+ filename = cache->bic_filename ? cache->bic_filename: BLKID_CACHE_FILE;
+
+ /* If we can't write to the cache file, then don't even try */
+ if (((ret = stat(filename, &st)) < 0 && errno != ENOENT) ||
+ (ret == 0 && access(filename, W_OK) < 0)) {
+ DBG(DEBUG_SAVE,
+ printf("can't write to cache file %s\n", filename));
+ return 0;
+ }
+
+ /*
+ * Try and create a temporary file in the same directory so
+ * that in case of error we don't overwrite the cache file.
+ * If the cache file doesn't yet exist, it isn't a regular
+ * file (e.g. /dev/null or a socket), or we couldn't create
+ * a temporary file then we open it directly.
+ */
+ if (ret == 0 && S_ISREG(st.st_mode)) {
+ tmp = malloc(strlen(filename) + 8);
+ if (tmp) {
+ mode_t save_umask = umask(022);
+ sprintf(tmp, "%s-XXXXXX", filename);
+ fd = mkstemp(tmp);
+ umask(save_umask);
+ if (fd >= 0) {
+ file = fdopen(fd, "w");
+ opened = tmp;
+ }
+#ifndef _WIN32
+ fchmod(fd, 0644);
+#else
+ chmod(tmp, 0644);
+#endif
+ }
+ }
+
+ if (!file) {
+ file = fopen(filename, "w");
+ opened = filename;
+ }
+
+ DBG(DEBUG_SAVE,
+ printf("writing cache file %s (really %s)\n",
+ filename, opened));
+
+ if (!file) {
+ ret = errno;
+ goto errout;
+ }
+
+ list_for_each(p, &cache->bic_devs) {
+ blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs);
+ if (!dev->bid_type)
+ continue;
+ if ((ret = save_dev(dev, file)) < 0)
+ break;
+ }
+
+ if (ret >= 0) {
+ cache->bic_flags &= ~BLKID_BIC_FL_CHANGED;
+ ret = 1;
+ }
+
+ fclose(file);
+ if (opened != filename) {
+ if (ret < 0) {
+ (void) unlink(opened);
+ DBG(DEBUG_SAVE,
+ printf("unlinked temp cache %s\n", opened));
+ } else {
+ char *backup;
+
+ backup = malloc(strlen(filename) + 5);
+ if (backup) {
+ sprintf(backup, "%s.old", filename);
+ unlink(backup);
+#if defined(__GNUC__) && __GNUC__ >= 5
+/* explicit (void) cast is not enough with glibc and _FORTIFY_SOURCE */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-result"
+#endif
+ (void) link(filename, backup);
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic pop
+#endif
+ free(backup);
+ }
+ if (rename(opened, filename) < 0)
+ (void) unlink(opened);
+ DBG(DEBUG_SAVE,
+ printf("moved temp cache %s\n", opened));
+ }
+ }
+
+errout:
+ free(tmp);
+ return ret;
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ blkid_cache cache = NULL;
+ int ret;
+
+ blkid_debug_mask = DEBUG_ALL;
+ if (argc > 2) {
+ fprintf(stderr, "Usage: %s [filename]\n"
+ "Test loading/saving a cache (filename)\n", argv[0]);
+ exit(1);
+ }
+
+ if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+ fprintf(stderr, "%s: error creating cache (%d)\n",
+ argv[0], ret);
+ exit(1);
+ }
+ if ((ret = blkid_probe_all(cache)) < 0) {
+ fprintf(stderr, "error (%d) probing devices\n", ret);
+ exit(1);
+ }
+ cache->bic_filename = blkid_strdup(argv[1]);
+
+ if ((ret = blkid_flush_cache(cache)) < 0) {
+ fprintf(stderr, "error (%d) saving cache\n", ret);
+ exit(1);
+ }
+
+ blkid_put_cache(cache);
+
+ return ret;
+}
+#endif
diff --git a/lib/blkid/tag.c b/lib/blkid/tag.c
new file mode 100644
index 0000000..e88ebc4
--- /dev/null
+++ b/lib/blkid/tag.c
@@ -0,0 +1,471 @@
+/*
+ * tag.c - allocation/initialization/free routines for tag structs
+ *
+ * Copyright (C) 2001 Andreas Dilger
+ * Copyright (C) 2003 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "blkidP.h"
+
+static blkid_tag blkid_new_tag(void)
+{
+ blkid_tag tag;
+
+ if (!(tag = (blkid_tag) calloc(1, sizeof(struct blkid_struct_tag))))
+ return NULL;
+
+ INIT_LIST_HEAD(&tag->bit_tags);
+ INIT_LIST_HEAD(&tag->bit_names);
+
+ return tag;
+}
+
+#ifdef CONFIG_BLKID_DEBUG
+void blkid_debug_dump_tag(blkid_tag tag)
+{
+ if (!tag) {
+ printf(" tag: NULL\n");
+ return;
+ }
+
+ printf(" tag: %s=\"%s\"\n", tag->bit_name, tag->bit_val);
+}
+#endif
+
+void blkid_free_tag(blkid_tag tag)
+{
+ if (!tag)
+ return;
+
+ DBG(DEBUG_TAG, printf(" freeing tag %s=%s\n", tag->bit_name,
+ tag->bit_val ? tag->bit_val : "(NULL)"));
+ DBG(DEBUG_TAG, blkid_debug_dump_tag(tag));
+
+ list_del(&tag->bit_tags); /* list of tags for this device */
+ list_del(&tag->bit_names); /* list of tags with this type */
+
+ free(tag->bit_name);
+ free(tag->bit_val);
+
+ free(tag);
+}
+
+/*
+ * Find the desired tag on a device. If value is NULL, then the
+ * first such tag is returned, otherwise return only exact tag if found.
+ */
+blkid_tag blkid_find_tag_dev(blkid_dev dev, const char *type)
+{
+ struct list_head *p;
+
+ if (!dev || !type)
+ return NULL;
+
+ list_for_each(p, &dev->bid_tags) {
+ blkid_tag tmp = list_entry(p, struct blkid_struct_tag,
+ bit_tags);
+
+ if (!strcmp(tmp->bit_name, type))
+ return tmp;
+ }
+ return NULL;
+}
+
+extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
+ const char *value)
+{
+ blkid_tag tag;
+
+ if (!dev || !type)
+ return -1;
+
+ tag = blkid_find_tag_dev(dev, type);
+ if (!value)
+ return (tag != NULL);
+ if (!tag || strcmp(tag->bit_val, value))
+ return 0;
+ return 1;
+}
+
+/*
+ * Find the desired tag type in the cache.
+ * We return the head tag for this tag type.
+ */
+static blkid_tag blkid_find_head_cache(blkid_cache cache, const char *type)
+{
+ blkid_tag head = NULL, tmp;
+ struct list_head *p;
+
+ if (!cache || !type)
+ return NULL;
+
+ list_for_each(p, &cache->bic_tags) {
+ tmp = list_entry(p, struct blkid_struct_tag, bit_tags);
+ if (!strcmp(tmp->bit_name, type)) {
+ DBG(DEBUG_TAG,
+ printf(" found cache tag head %s\n", type));
+ head = tmp;
+ break;
+ }
+ }
+ return head;
+}
+
+/*
+ * Set a tag on an existing device.
+ *
+ * If value is NULL, then delete the tagsfrom the device.
+ */
+int blkid_set_tag(blkid_dev dev, const char *name,
+ const char *value, const int vlength)
+{
+ blkid_tag t = 0, head = 0;
+ char *val = 0;
+ char **dev_var = 0;
+
+ if (!dev || !name)
+ return -BLKID_ERR_PARAM;
+
+ if (!(val = blkid_strndup(value, vlength)) && value)
+ return -BLKID_ERR_MEM;
+
+ /*
+ * Certain common tags are linked directly to the device struct
+ * We need to know what they are before we do anything else because
+ * the function name parameter might get freed later on.
+ */
+ if (!strcmp(name, "TYPE"))
+ dev_var = &dev->bid_type;
+ else if (!strcmp(name, "LABEL"))
+ dev_var = &dev->bid_label;
+ else if (!strcmp(name, "UUID"))
+ dev_var = &dev->bid_uuid;
+
+ t = blkid_find_tag_dev(dev, name);
+ if (!value) {
+ if (t)
+ blkid_free_tag(t);
+ } else if (t) {
+ if (!strcmp(t->bit_val, val)) {
+ /* Same thing, exit */
+ free(val);
+ return 0;
+ }
+ free(t->bit_val);
+ t->bit_val = val;
+ } else {
+ /* Existing tag not present, add to device */
+ if (!(t = blkid_new_tag()))
+ goto errout;
+ t->bit_name = blkid_strdup(name);
+ t->bit_val = val;
+ t->bit_dev = dev;
+
+ list_add_tail(&t->bit_tags, &dev->bid_tags);
+
+ if (dev->bid_cache) {
+ head = blkid_find_head_cache(dev->bid_cache,
+ t->bit_name);
+ if (!head) {
+ head = blkid_new_tag();
+ if (!head)
+ goto errout;
+
+ DBG(DEBUG_TAG,
+ printf(" creating new cache tag head %s\n", name));
+ head->bit_name = blkid_strdup(name);
+ if (!head->bit_name)
+ goto errout;
+ list_add_tail(&head->bit_tags,
+ &dev->bid_cache->bic_tags);
+ }
+ list_add_tail(&t->bit_names, &head->bit_names);
+ }
+ }
+
+ /* Link common tags directly to the device struct */
+ if (dev_var)
+ *dev_var = val;
+
+ if (dev->bid_cache)
+ dev->bid_cache->bic_flags |= BLKID_BIC_FL_CHANGED;
+ return 0;
+
+errout:
+ if (t)
+ blkid_free_tag(t);
+ else free(val);
+ if (head)
+ blkid_free_tag(head);
+ return -BLKID_ERR_MEM;
+}
+
+
+/*
+ * Parse a "NAME=value" string. This is slightly different than
+ * parse_token, because that will end an unquoted value at a space, while
+ * this will assume that an unquoted value is the rest of the token (e.g.
+ * if we are passed an already quoted string from the command-line we don't
+ * have to both quote and escape quote so that the quotes make it to
+ * us).
+ *
+ * Returns 0 on success, and -1 on failure.
+ */
+int blkid_parse_tag_string(const char *token, char **ret_type, char **ret_val)
+{
+ char *name, *value, *cp;
+
+ DBG(DEBUG_TAG, printf("trying to parse '%s' as a tag\n", token));
+
+ if (!token || !(cp = strchr(token, '=')))
+ return -1;
+
+ name = blkid_strdup(token);
+ if (!name)
+ return -1;
+ value = name + (cp - token);
+ *value++ = '\0';
+ if (*value == '"' || *value == '\'') {
+ char c = *value++;
+ if (!(cp = strrchr(value, c)))
+ goto errout; /* missing closing quote */
+ *cp = '\0';
+ }
+ value = blkid_strdup(value);
+ if (!value)
+ goto errout;
+
+ *ret_type = name;
+ *ret_val = value;
+
+ return 0;
+
+errout:
+ free(name);
+ return -1;
+}
+
+/*
+ * Tag iteration routines for the public libblkid interface.
+ *
+ * These routines do not expose the list.h implementation, which are a
+ * contamination of the namespace, and which force us to reveal far, far
+ * too much of our internal implementation. I'm not convinced I want
+ * to keep list.h in the long term, anyway. It's fine for kernel
+ * programming, but performance is not the #1 priority for this
+ * library, and I really don't like the tradeoff of type-safety for
+ * performance for this application. [tytso:20030125.2007EST]
+ */
+
+/*
+ * This series of functions iterate over all tags in a device
+ */
+#define TAG_ITERATE_MAGIC 0x01a5284c
+
+struct blkid_struct_tag_iterate {
+ int magic;
+ blkid_dev dev;
+ struct list_head *p;
+};
+
+extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev)
+{
+ blkid_tag_iterate iter;
+
+ iter = malloc(sizeof(struct blkid_struct_tag_iterate));
+ if (iter) {
+ iter->magic = TAG_ITERATE_MAGIC;
+ iter->dev = dev;
+ iter->p = dev->bid_tags.next;
+ }
+ return (iter);
+}
+
+/*
+ * Return 0 on success, -1 on error
+ */
+extern int blkid_tag_next(blkid_tag_iterate iter,
+ const char **type, const char **value)
+{
+ blkid_tag tag;
+
+ *type = 0;
+ *value = 0;
+ if (!iter || iter->magic != TAG_ITERATE_MAGIC ||
+ iter->p == &iter->dev->bid_tags)
+ return -1;
+ tag = list_entry(iter->p, struct blkid_struct_tag, bit_tags);
+ *type = tag->bit_name;
+ *value = tag->bit_val;
+ iter->p = iter->p->next;
+ return 0;
+}
+
+extern void blkid_tag_iterate_end(blkid_tag_iterate iter)
+{
+ if (!iter || iter->magic != TAG_ITERATE_MAGIC)
+ return;
+ iter->magic = 0;
+ free(iter);
+}
+
+/*
+ * This function returns a device which matches a particular
+ * type/value pair. If there is more than one device that matches the
+ * search specification, it returns the one with the highest priority
+ * value. This allows us to give preference to EVMS or LVM devices.
+ */
+extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache,
+ const char *type,
+ const char *value)
+{
+ blkid_tag head;
+ blkid_dev dev;
+ int pri;
+ struct list_head *p;
+ int probe_new = 0;
+
+ if (!cache || !type || !value)
+ return NULL;
+
+ blkid_read_cache(cache);
+
+ DBG(DEBUG_TAG, printf("looking for %s=%s in cache\n", type, value));
+
+try_again:
+ pri = -1;
+ dev = 0;
+ head = blkid_find_head_cache(cache, type);
+
+ if (head) {
+ list_for_each(p, &head->bit_names) {
+ blkid_tag tmp = list_entry(p, struct blkid_struct_tag,
+ bit_names);
+
+ if (!strcmp(tmp->bit_val, value) &&
+ (tmp->bit_dev->bid_pri > pri) &&
+ !access(tmp->bit_dev->bid_name, F_OK)) {
+ dev = tmp->bit_dev;
+ pri = dev->bid_pri;
+ }
+ }
+ }
+ if (dev && !(dev->bid_flags & BLKID_BID_FL_VERIFIED)) {
+ dev = blkid_verify(cache, dev);
+ if (!dev || (dev && (dev->bid_flags & BLKID_BID_FL_VERIFIED)))
+ goto try_again;
+ }
+
+ if (!dev && !probe_new) {
+ if (blkid_probe_all_new(cache) < 0)
+ return NULL;
+ probe_new++;
+ goto try_again;
+ }
+
+ if (!dev && !(cache->bic_flags & BLKID_BIC_FL_PROBED)) {
+ if (blkid_probe_all(cache) < 0)
+ return NULL;
+ goto try_again;
+ }
+ return dev;
+}
+
+#ifdef TEST_PROGRAM
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+
+void usage(char *prog)
+{
+ fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask] device "
+ "[type value]\n",
+ prog);
+ fprintf(stderr, "\tList all tags for a device and exit\n");
+ exit(1);
+}
+
+int main(int argc, char **argv)
+{
+ blkid_tag_iterate iter;
+ blkid_cache cache = NULL;
+ blkid_dev dev;
+ int c, ret, found;
+ int flags = BLKID_DEV_FIND;
+ char *tmp;
+ char *file = NULL;
+ char *devname = NULL;
+ char *search_type = NULL;
+ char *search_value = NULL;
+ const char *type, *value;
+
+ while ((c = getopt (argc, argv, "m:f:")) != EOF)
+ switch (c) {
+ case 'f':
+ file = optarg;
+ break;
+ case 'm':
+ blkid_debug_mask = strtoul (optarg, &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, "Invalid debug mask: %s\n",
+ optarg);
+ exit(1);
+ }
+ break;
+ case '?':
+ usage(argv[0]);
+ }
+ if (argc > optind)
+ devname = argv[optind++];
+ if (argc > optind)
+ search_type = argv[optind++];
+ if (argc > optind)
+ search_value = argv[optind++];
+ if (!devname || (argc != optind))
+ usage(argv[0]);
+
+ if ((ret = blkid_get_cache(&cache, file)) != 0) {
+ fprintf(stderr, "%s: error creating cache (%d)\n",
+ argv[0], ret);
+ exit(1);
+ }
+
+ dev = blkid_get_dev(cache, devname, flags);
+ if (!dev) {
+ fprintf(stderr, "%s: Can not find device in blkid cache\n",
+ devname);
+ exit(1);
+ }
+ if (search_type) {
+ found = blkid_dev_has_tag(dev, search_type, search_value);
+ printf("Device %s: (%s, %s) %s\n", blkid_dev_devname(dev),
+ search_type, search_value ? search_value : "NULL",
+ found ? "FOUND" : "NOT FOUND");
+ return(!found);
+ }
+ printf("Device %s...\n", blkid_dev_devname(dev));
+
+ iter = blkid_tag_iterate_begin(dev);
+ while (blkid_tag_next(iter, &type, &value) == 0) {
+ printf("\tTag %s has value %s\n", type, value);
+ }
+ blkid_tag_iterate_end(iter);
+
+ blkid_put_cache(cache);
+ return (0);
+}
+#endif
diff --git a/lib/blkid/test_probe.in b/lib/blkid/test_probe.in
new file mode 100644
index 0000000..a7b29a2
--- /dev/null
+++ b/lib/blkid/test_probe.in
@@ -0,0 +1,62 @@
+
+TESTS=$*
+
+if test "$TESTS"x = x ; then
+ for i in $SRCDIR/tests/*.img.bz2
+ do
+ TESTS="$TESTS `basename $i .img.bz2`"
+ done
+fi
+
+mkdir -p tests/tmp
+
+for i in $TESTS
+do
+ printf "%s: " $i
+ RESULTS=$SRCDIR/tests/$i.results
+ IMAGE_BZ2=$SRCDIR/tests/$i.img.bz2
+ IMAGE=tests/tmp/$i.img.$$
+ if test ! -f $IMAGE_BZ2 -a ! -f $RESULTS ;
+ then
+ echo "non-existent"
+ continue
+ fi
+ if [ "$i" = "swap0" ] && which mkswap > /dev/null; then
+ # swap is native-endian, so regenerate before testing
+ dd if=/dev/zero of=$IMAGE bs=16k count=64 2> /dev/null
+ mkswap -v0 $IMAGE > /dev/null
+ elif [ "$i" = "swap1" ] && which mkswap > /dev/null; then
+ # swap is native-endian, so regenerate before testing
+ dd if=/dev/zero of=$IMAGE bs=16k count=64 2> /dev/null
+ # check if mkswap supports the "-U" option
+ if mkswap -h 2>&1 | grep -q -- '-U'; then
+ UUID="-U 8ff8e77f-8553-485e-8656-58be67a81666"
+ else
+ RMUUID="| grep -v UUID"
+ RES_TMP=$SRCDIR/tests/tmp/$i.results
+ grep -v UUID $RESULTS > $RES_TMP
+ RESULTS=$RES_TMP
+ fi
+ mkswap -v1 -L SWAP-TEST $UUID $IMAGE >/dev/null
+ else
+ bunzip2 < $IMAGE_BZ2 > $IMAGE
+ fi
+ eval ./tst_probe $IMAGE $RMUUID > tests/$i.out
+ rm -f $IMAGE tests/$i.ok tests/$i.failed
+ cmp -s tests/$i.out $RESULTS
+ unset RMUUID
+ if [ $? = 0 ]; then
+ echo ok
+ touch tests/$i.ok
+ else
+ echo failed
+ diff -c tests/$i.out $RESULTS > tests/$i.failed
+ fi
+done
+
+num_ok=`ls tests/*.ok 2>/dev/null | wc -l`
+num_failed=`ls tests/*.failed 2>/dev/null | wc -l`
+
+echo "$num_ok tests succeeded $num_failed tests failed"
+
+test "$num_failed" -eq 0 || exit 1
diff --git a/lib/blkid/tests/cramfs.img.bz2 b/lib/blkid/tests/cramfs.img.bz2
new file mode 100644
index 0000000..d638116
--- /dev/null
+++ b/lib/blkid/tests/cramfs.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/cramfs.results b/lib/blkid/tests/cramfs.results
new file mode 100644
index 0000000..984d9e2
--- /dev/null
+++ b/lib/blkid/tests/cramfs.results
@@ -0,0 +1,2 @@
+TYPE='cramfs'
+LABEL='test-cram'
diff --git a/lib/blkid/tests/ext2.img.bz2 b/lib/blkid/tests/ext2.img.bz2
new file mode 100644
index 0000000..d1811ce
--- /dev/null
+++ b/lib/blkid/tests/ext2.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/ext2.results b/lib/blkid/tests/ext2.results
new file mode 100644
index 0000000..4fa7a2a
--- /dev/null
+++ b/lib/blkid/tests/ext2.results
@@ -0,0 +1,3 @@
+TYPE='ext2'
+LABEL='test-ext2'
+UUID='22f0eac3-5c89-4ec1-9076-60799119aaea'
diff --git a/lib/blkid/tests/ext3.img.bz2 b/lib/blkid/tests/ext3.img.bz2
new file mode 100644
index 0000000..5394598
--- /dev/null
+++ b/lib/blkid/tests/ext3.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/ext3.results b/lib/blkid/tests/ext3.results
new file mode 100644
index 0000000..4dc2252
--- /dev/null
+++ b/lib/blkid/tests/ext3.results
@@ -0,0 +1,3 @@
+TYPE='ext3'
+LABEL='test-ext3'
+UUID='35f66dab-477e-4090-a872-95ee0e493ad6'
diff --git a/lib/blkid/tests/fat.img.bz2 b/lib/blkid/tests/fat.img.bz2
new file mode 100644
index 0000000..1fa7f2d
--- /dev/null
+++ b/lib/blkid/tests/fat.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/fat.results b/lib/blkid/tests/fat.results
new file mode 100644
index 0000000..7441872
--- /dev/null
+++ b/lib/blkid/tests/fat.results
@@ -0,0 +1,3 @@
+TYPE='vfat'
+LABEL='TEST-FAT'
+UUID='DEAD-BEEF'
diff --git a/lib/blkid/tests/fat32_label_64MB.img.bz2 b/lib/blkid/tests/fat32_label_64MB.img.bz2
new file mode 100644
index 0000000..ca76293
--- /dev/null
+++ b/lib/blkid/tests/fat32_label_64MB.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/fat32_label_64MB.results b/lib/blkid/tests/fat32_label_64MB.results
new file mode 100644
index 0000000..f2f56c2
--- /dev/null
+++ b/lib/blkid/tests/fat32_label_64MB.results
@@ -0,0 +1,3 @@
+TYPE='vfat'
+LABEL='BINGO'
+UUID='8CB5-BA49'
diff --git a/lib/blkid/tests/iso.img.bz2 b/lib/blkid/tests/iso.img.bz2
new file mode 100644
index 0000000..4efb6ad
--- /dev/null
+++ b/lib/blkid/tests/iso.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/iso.results b/lib/blkid/tests/iso.results
new file mode 100644
index 0000000..6a5d1dc
--- /dev/null
+++ b/lib/blkid/tests/iso.results
@@ -0,0 +1,2 @@
+TYPE='iso9660'
+LABEL='test-iso'
diff --git a/lib/blkid/tests/jbd.img.bz2 b/lib/blkid/tests/jbd.img.bz2
new file mode 100644
index 0000000..f0d7f91
--- /dev/null
+++ b/lib/blkid/tests/jbd.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/jbd.results b/lib/blkid/tests/jbd.results
new file mode 100644
index 0000000..2a43089
--- /dev/null
+++ b/lib/blkid/tests/jbd.results
@@ -0,0 +1,2 @@
+TYPE='jbd'
+UUID='0d7a07df-7b06-4829-bce7-3b9c3ece570c'
diff --git a/lib/blkid/tests/jfs.img.bz2 b/lib/blkid/tests/jfs.img.bz2
new file mode 100644
index 0000000..1d4d249
--- /dev/null
+++ b/lib/blkid/tests/jfs.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/jfs.results b/lib/blkid/tests/jfs.results
new file mode 100644
index 0000000..5d752a3
--- /dev/null
+++ b/lib/blkid/tests/jfs.results
@@ -0,0 +1,3 @@
+TYPE='jfs'
+LABEL='test-jfs'
+UUID='9bf7b82e-7583-4c74-99a4-189a691f27b5'
diff --git a/lib/blkid/tests/minix.img.bz2 b/lib/blkid/tests/minix.img.bz2
new file mode 100644
index 0000000..d11f3a8
--- /dev/null
+++ b/lib/blkid/tests/minix.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/minix.results b/lib/blkid/tests/minix.results
new file mode 100644
index 0000000..d0b448f
--- /dev/null
+++ b/lib/blkid/tests/minix.results
@@ -0,0 +1 @@
+TYPE='minix'
diff --git a/lib/blkid/tests/ocfs2.img.bz2 b/lib/blkid/tests/ocfs2.img.bz2
new file mode 100644
index 0000000..0bad915
--- /dev/null
+++ b/lib/blkid/tests/ocfs2.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/ocfs2.results b/lib/blkid/tests/ocfs2.results
new file mode 100644
index 0000000..918afa3
--- /dev/null
+++ b/lib/blkid/tests/ocfs2.results
@@ -0,0 +1,3 @@
+TYPE='ocfs2'
+LABEL='test-ocfs2'
+UUID='6b6bfbea-3a79-4f0c-b166-a20776102445'
diff --git a/lib/blkid/tests/reiser3.img.bz2 b/lib/blkid/tests/reiser3.img.bz2
new file mode 100644
index 0000000..1802bc2
--- /dev/null
+++ b/lib/blkid/tests/reiser3.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/reiser3.results b/lib/blkid/tests/reiser3.results
new file mode 100644
index 0000000..8c3bb7c
--- /dev/null
+++ b/lib/blkid/tests/reiser3.results
@@ -0,0 +1,3 @@
+TYPE='reiserfs'
+LABEL='TESTREISER'
+UUID='9efe7863-b124-46dc-ad68-8ecd04230a7b'
diff --git a/lib/blkid/tests/reiser4.img.bz2 b/lib/blkid/tests/reiser4.img.bz2
new file mode 100644
index 0000000..b50d12e
--- /dev/null
+++ b/lib/blkid/tests/reiser4.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/reiser4.results b/lib/blkid/tests/reiser4.results
new file mode 100644
index 0000000..b312289
--- /dev/null
+++ b/lib/blkid/tests/reiser4.results
@@ -0,0 +1,3 @@
+TYPE='reiser4'
+LABEL='TESTR4'
+UUID='9722633c-d69a-4881-b1c8-bedecbbf39d2'
diff --git a/lib/blkid/tests/romfs.img.bz2 b/lib/blkid/tests/romfs.img.bz2
new file mode 100644
index 0000000..b5e3109
--- /dev/null
+++ b/lib/blkid/tests/romfs.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/romfs.results b/lib/blkid/tests/romfs.results
new file mode 100644
index 0000000..03e8622
--- /dev/null
+++ b/lib/blkid/tests/romfs.results
@@ -0,0 +1,2 @@
+TYPE='romfs'
+LABEL='test-romfs'
diff --git a/lib/blkid/tests/small-fat32.img.bz2 b/lib/blkid/tests/small-fat32.img.bz2
new file mode 100644
index 0000000..8b90f9c
--- /dev/null
+++ b/lib/blkid/tests/small-fat32.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/small-fat32.results b/lib/blkid/tests/small-fat32.results
new file mode 100644
index 0000000..bd5ebf4
--- /dev/null
+++ b/lib/blkid/tests/small-fat32.results
@@ -0,0 +1,3 @@
+TYPE='vfat'
+LABEL='TESTVFAT'
+UUID='1423-AAE1'
diff --git a/lib/blkid/tests/swap0.img.bz2 b/lib/blkid/tests/swap0.img.bz2
new file mode 100644
index 0000000..e61e375
--- /dev/null
+++ b/lib/blkid/tests/swap0.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/swap0.results b/lib/blkid/tests/swap0.results
new file mode 100644
index 0000000..8742a60
--- /dev/null
+++ b/lib/blkid/tests/swap0.results
@@ -0,0 +1 @@
+TYPE='swap'
diff --git a/lib/blkid/tests/swap1.img.bz2 b/lib/blkid/tests/swap1.img.bz2
new file mode 100644
index 0000000..fbab9ed
--- /dev/null
+++ b/lib/blkid/tests/swap1.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/swap1.results b/lib/blkid/tests/swap1.results
new file mode 100644
index 0000000..ea04e5d
--- /dev/null
+++ b/lib/blkid/tests/swap1.results
@@ -0,0 +1,3 @@
+TYPE='swap'
+LABEL='SWAP-TEST'
+UUID='8ff8e77f-8553-485e-8656-58be67a81666'
diff --git a/lib/blkid/tests/udf.img.bz2 b/lib/blkid/tests/udf.img.bz2
new file mode 100644
index 0000000..bd2deb0
--- /dev/null
+++ b/lib/blkid/tests/udf.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/udf.results b/lib/blkid/tests/udf.results
new file mode 100644
index 0000000..1f7aa48
--- /dev/null
+++ b/lib/blkid/tests/udf.results
@@ -0,0 +1,2 @@
+TYPE='udf'
+LABEL='test-udf'
diff --git a/lib/blkid/tests/xfs.img.bz2 b/lib/blkid/tests/xfs.img.bz2
new file mode 100644
index 0000000..cf6982b
--- /dev/null
+++ b/lib/blkid/tests/xfs.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/xfs.results b/lib/blkid/tests/xfs.results
new file mode 100644
index 0000000..18e8d88
--- /dev/null
+++ b/lib/blkid/tests/xfs.results
@@ -0,0 +1,3 @@
+TYPE='xfs'
+LABEL='test-xfs'
+UUID='8c8a0a5a-9f57-492e-9610-45a61f38f58a'
diff --git a/lib/blkid/tests/zfs.img.bz2 b/lib/blkid/tests/zfs.img.bz2
new file mode 100644
index 0000000..92f445a
--- /dev/null
+++ b/lib/blkid/tests/zfs.img.bz2
Binary files differ
diff --git a/lib/blkid/tests/zfs.results b/lib/blkid/tests/zfs.results
new file mode 100644
index 0000000..c0f8fb9
--- /dev/null
+++ b/lib/blkid/tests/zfs.results
@@ -0,0 +1 @@
+TYPE='zfs'
diff --git a/lib/blkid/tst_types.c b/lib/blkid/tst_types.c
new file mode 100644
index 0000000..cb612ae
--- /dev/null
+++ b/lib/blkid/tst_types.c
@@ -0,0 +1,64 @@
+/*
+ * This testing program makes sure the blkid_types header file
+ *
+ * Copyright (C) 2006 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <sys/types.h>
+#include "blkid/blkid_types.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ if (sizeof(__u8) != 1) {
+ printf("Sizeof(__u8) is %d should be 1\n",
+ (int)sizeof(__u8));
+ exit(1);
+ }
+ if (sizeof(__s8) != 1) {
+ printf("Sizeof(_s8) is %d should be 1\n",
+ (int)sizeof(__s8));
+ exit(1);
+ }
+ if (sizeof(__u16) != 2) {
+ printf("Sizeof(__u16) is %d should be 2\n",
+ (int)sizeof(__u16));
+ exit(1);
+ }
+ if (sizeof(__s16) != 2) {
+ printf("Sizeof(__s16) is %d should be 2\n",
+ (int)sizeof(__s16));
+ exit(1);
+ }
+ if (sizeof(__u32) != 4) {
+ printf("Sizeof(__u32) is %d should be 4\n",
+ (int)sizeof(__u32));
+ exit(1);
+ }
+ if (sizeof(__s32) != 4) {
+ printf("Sizeof(__s32) is %d should be 4\n",
+ (int)sizeof(__s32));
+ exit(1);
+ }
+ if (sizeof(__u64) != 8) {
+ printf("Sizeof(__u64) is %d should be 8\n",
+ (int)sizeof(__u64));
+ exit(1);
+ }
+ if (sizeof(__s64) != 8) {
+ printf("Sizeof(__s64) is %d should be 8\n",
+ (int)sizeof(__s64));
+ exit(1);
+ }
+ printf("The blkid_types.h types are correct.\n");
+ exit(0);
+}
+
diff --git a/lib/blkid/version.c b/lib/blkid/version.c
new file mode 100644
index 0000000..72124f4
--- /dev/null
+++ b/lib/blkid/version.c
@@ -0,0 +1,50 @@
+/*
+ * version.c --- Return the version of the blkid library
+ *
+ * Copyright (C) 2004 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include <blkid/blkid.h>
+#include "../../version.h"
+
+static const char *lib_version = E2FSPROGS_VERSION;
+static const char *lib_date = E2FSPROGS_DATE;
+
+int blkid_parse_version_string(const char *ver_string)
+{
+ const char *cp;
+ int version = 0;
+
+ for (cp = ver_string; *cp; cp++) {
+ if (*cp == '.')
+ continue;
+ if (!isdigit(*cp))
+ break;
+ version = (version * 10) + (*cp - '0');
+ }
+ return version;
+}
+
+int blkid_get_library_version(const char **ver_string,
+ const char **date_string)
+{
+ if (ver_string)
+ *ver_string = lib_version;
+ if (date_string)
+ *date_string = lib_date;
+
+ return blkid_parse_version_string(lib_version);
+}
diff --git a/lib/config.h.in b/lib/config.h.in
new file mode 100644
index 0000000..ab38266
--- /dev/null
+++ b/lib/config.h.in
@@ -0,0 +1,665 @@
+/* lib/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* Define to 1 if debugging the blkid library */
+#undef CONFIG_BLKID_DEBUG
+
+/* Define to 1 to compile findfs */
+#undef CONFIG_BUILD_FINDFS
+
+/* Define to 1 for features for use by ext4 developers */
+#undef CONFIG_DEVELOPER_FEATURES
+
+/* Define to 1 if debugging ext3/4 journal code */
+#undef CONFIG_JBD_DEBUG
+
+/* Define to 1 to enable mmp support */
+#undef CONFIG_MMP
+
+/* Define to 1 to enable tdb support */
+#undef CONFIG_TDB
+
+/* Define to 1 if the testio I/O manager should be enabled */
+#undef CONFIG_TESTIO_DEBUG
+
+/* Define to 1 to disable use of backtrace */
+#undef DISABLE_BACKTRACE
+
+/* Define to 1 to enable bitmap stats. */
+#undef ENABLE_BMAP_STATS
+
+/* Define to 1 to enable bitmap stats. */
+#undef ENABLE_BMAP_STATS_OPS
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#undef ENABLE_NLS
+
+/* Define to 1 if you have the `add_key' function. */
+#undef HAVE_ADD_KEY
+
+/* Define to 1 if you have the <attr/xattr.h> header file. */
+#undef HAVE_ATTR_XATTR_H
+
+/* Define to 1 if you have the `backtrace' function. */
+#undef HAVE_BACKTRACE
+
+/* Define to 1 if blkid has blkid_probe_enable_partitions */
+#undef HAVE_BLKID_PROBE_ENABLE_PARTITIONS
+
+/* Define to 1 if blkid has blkid_probe_get_topology */
+#undef HAVE_BLKID_PROBE_GET_TOPOLOGY
+
+/* Define to 1 if blkid has blkid_topology_get_dax */
+#undef HAVE_BLKID_TOPOLOGY_GET_DAX
+
+/* Define to 1 if you have the BSD-style 'qsort_r' function. */
+#undef HAVE_BSD_QSORT_R
+
+/* Define to 1 if you have the Mac OS X function
+ CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES
+
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `chflags' function. */
+#undef HAVE_CHFLAGS
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dlopen' function. */
+#undef HAVE_DLOPEN
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#undef HAVE_EXECINFO_H
+
+/* Define to 1 if Ext2 ioctls present */
+#undef HAVE_EXT2_IOCTLS
+
+/* Define to 1 if you have the `fadvise64' function. */
+#undef HAVE_FADVISE64
+
+/* Define to 1 if you have the `fallocate' function. */
+#undef HAVE_FALLOCATE
+
+/* Define to 1 if you have the `fallocate64' function. */
+#undef HAVE_FALLOCATE64
+
+/* Define to 1 if you have the `fchown' function. */
+#undef HAVE_FCHOWN
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the `fdatasync' function. */
+#undef HAVE_FDATASYNC
+
+/* Define to 1 if you have the `fstat64' function. */
+#undef HAVE_FSTAT64
+
+/* Define to 1 if you have the `fsync' function. */
+#undef HAVE_FSYNC
+
+/* Define to 1 if you have the `ftruncate64' function. */
+#undef HAVE_FTRUNCATE64
+
+/* Define to 1 if you have the <fuse.h> header file. */
+#undef HAVE_FUSE_H
+
+/* Define to 1 if you have the `futimes' function. */
+#undef HAVE_FUTIMES
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAVE_GETDTABLESIZE
+
+/* Define to 1 if you have the `getentropy' function. */
+#undef HAVE_GETENTROPY
+
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
+
+/* Define to 1 if you have the `getmntinfo' function. */
+#undef HAVE_GETMNTINFO
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getpwuid_r' function. */
+#undef HAVE_GETPWUID_R
+
+/* Define to 1 if you have the `getrandom' function. */
+#undef HAVE_GETRANDOM
+
+/* Define to 1 if you have the `getrlimit' function. */
+#undef HAVE_GETRLIMIT
+
+/* Define to 1 if you have the `getrusage' function. */
+#undef HAVE_GETRUSAGE
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the GNU-style 'qsort_r' function. */
+#undef HAVE_GNU_QSORT_R
+
+/* Define if you have the iconv() function and it works. */
+#undef HAVE_ICONV
+
+/* Define to 1 if the system has the type `intptr_t'. */
+#undef HAVE_INTPTR_T
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `jrand48' function. */
+#undef HAVE_JRAND48
+
+/* Define to 1 if you have the `keyctl' function. */
+#undef HAVE_KEYCTL
+
+/* Define to 1 if you have the <linux/falloc.h> header file. */
+#undef HAVE_LINUX_FALLOC_H
+
+/* Define to 1 if you have the <linux/fd.h> header file. */
+#undef HAVE_LINUX_FD_H
+
+/* Define to 1 if you have the <linux/fsmap.h> header file. */
+#undef HAVE_LINUX_FSMAP_H
+
+/* Define to 1 if you have the <linux/loop.h> header file. */
+#undef HAVE_LINUX_LOOP_H
+
+/* Define to 1 if you have the <linux/major.h> header file. */
+#undef HAVE_LINUX_MAJOR_H
+
+/* Define to 1 if you have the <linux/types.h> header file. */
+#undef HAVE_LINUX_TYPES_H
+
+/* Define to 1 if you have the `llistxattr' function. */
+#undef HAVE_LLISTXATTR
+
+/* Define to 1 if you have the `llseek' function. */
+#undef HAVE_LLSEEK
+
+/* Define to 1 if llseek declared in unistd.h */
+#undef HAVE_LLSEEK_PROTOTYPE
+
+/* Define to 1 if you have the `lseek64' function. */
+#undef HAVE_LSEEK64
+
+/* Define to 1 if lseek64 declared in unistd.h */
+#undef HAVE_LSEEK64_PROTOTYPE
+
+/* Define to 1 if you have the <magic.h> header file. */
+#undef HAVE_MAGIC_H
+
+/* Define to 1 if you have the `mallinfo' function. */
+#undef HAVE_MALLINFO
+
+/* Define to 1 if you have the `mallinfo2' function. */
+#undef HAVE_MALLINFO2
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the `mbstowcs' function. */
+#undef HAVE_MBSTOWCS
+
+/* Define to 1 if you have the `memalign' function. */
+#undef HAVE_MEMALIGN
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the <mntent.h> header file. */
+#undef HAVE_MNTENT_H
+
+/* Define to 1 if mount supports nodev. */
+#undef HAVE_MOUNT_NODEV
+
+/* Define to 1 if mount supports nosuid. */
+#undef HAVE_MOUNT_NOSUID
+
+/* Define to 1 if you have the `msync' function. */
+#undef HAVE_MSYNC
+
+/* Define to 1 if you have the `nanosleep' function. */
+#undef HAVE_NANOSLEEP
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <net/if_dl.h> header file. */
+#undef HAVE_NET_IF_DL_H
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
+/* Define to 1 if you have the `open64' function. */
+#undef HAVE_OPEN64
+
+/* Define to 1 if optreset for getopt is present */
+#undef HAVE_OPTRESET
+
+/* Define to 1 if you have the `pathconf' function. */
+#undef HAVE_PATHCONF
+
+/* Define to 1 if you have the <paths.h> header file. */
+#undef HAVE_PATHS_H
+
+/* Define to 1 if you have the `posix_fadvise' function. */
+#undef HAVE_POSIX_FADVISE
+
+/* Define to 1 if you have the `posix_fadvise64' function. */
+#undef HAVE_POSIX_FADVISE64
+
+/* Define to 1 if you have the `posix_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
+
+/* Define to 1 if you have the `prctl' function. */
+#undef HAVE_PRCTL
+
+/* Define to 1 if you have the `pread' function. */
+#undef HAVE_PREAD
+
+/* Define to 1 if you have the `pread64' function. */
+#undef HAVE_PREAD64
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
+/* Define to 1 if you have the `pwrite' function. */
+#undef HAVE_PWRITE
+
+/* Define to 1 if you have the `pwrite64' function. */
+#undef HAVE_PWRITE64
+
+/* Define to 1 if you have the `qsort_r' function. */
+#undef HAVE_QSORT_R
+
+/* Define to 1 if dirent has d_reclen */
+#undef HAVE_RECLEN_DIRENT
+
+/* Define to 1 if if struct sockaddr contains sa_len */
+#undef HAVE_SA_LEN
+
+/* Define to 1 if you have the `secure_getenv' function. */
+#undef HAVE_SECURE_GETENV
+
+/* Define to 1 if you have the <semaphore.h> header file. */
+#undef HAVE_SEMAPHORE_H
+
+/* Define to 1 if sem_init() exists */
+#undef HAVE_SEM_INIT
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#undef HAVE_SETJMP_H
+
+/* Define to 1 if you have the `setmntent' function. */
+#undef HAVE_SETMNTENT
+
+/* Define to 1 if you have the `setresgid' function. */
+#undef HAVE_SETRESGID
+
+/* Define to 1 if you have the `setresuid' function. */
+#undef HAVE_SETRESUID
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the `srandom' function. */
+#undef HAVE_SRANDOM
+
+/* Define to 1 if struct stat has st_flags */
+#undef HAVE_STAT_FLAGS
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strnlen' function. */
+#undef HAVE_STRNLEN
+
+/* Define to 1 if you have the `strptime' function. */
+#undef HAVE_STRPTIME
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* Define to 1 if `st_atim' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM
+
+/* Define to 1 if you have the `sync_file_range' function. */
+#undef HAVE_SYNC_FILE_RANGE
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the <sys/acl.h> header file. */
+#undef HAVE_SYS_ACL_H
+
+/* Define to 1 if you have the <sys/disklabel.h> header file. */
+#undef HAVE_SYS_DISKLABEL_H
+
+/* Define to 1 if you have the <sys/disk.h> header file. */
+#undef HAVE_SYS_DISK_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/key.h> header file. */
+#undef HAVE_SYS_KEY_H
+
+/* Define to 1 if you have the <sys/mkdev.h> header file. */
+#undef HAVE_SYS_MKDEV_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/mount.h> header file. */
+#undef HAVE_SYS_MOUNT_H
+
+/* Define to 1 if you have the <sys/prctl.h> header file. */
+#undef HAVE_SYS_PRCTL_H
+
+/* Define to 1 if you have the <sys/random.h> header file. */
+#undef HAVE_SYS_RANDOM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+#undef HAVE_SYS_SYSCALL_H
+
+/* Define to 1 if you have the <sys/sysmacros.h> header file. */
+#undef HAVE_SYS_SYSMACROS_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <sys/xattr.h> header file. */
+#undef HAVE_SYS_XATTR_H
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the <termio.h> header file. */
+#undef HAVE_TERMIO_H
+
+/* Define to 1 if ssize_t declared */
+#undef HAVE_TYPE_SSIZE_T
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `usleep' function. */
+#undef HAVE_USLEEP
+
+/* Define to 1 if you have the `utime' function. */
+#undef HAVE_UTIME
+
+/* Define to 1 if you have the `utimes' function. */
+#undef HAVE_UTIMES
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if you have the `valloc' function. */
+#undef HAVE_VALLOC
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
+/* package name for gettext */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of `off_t', as computed by sizeof. */
+#undef SIZEOF_OFF_T
+
+/* The size of `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of `time_t', as computed by sizeof. */
+#undef SIZEOF_TIME_T
+
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
+#undef STDC_HEADERS
+
+/* If the compiler supports a TLS storage class define it to that here */
+#undef TLS
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable X/Open extensions. Define to 500 only if necessary
+ to make mbstate_t available. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
+
+
+/* Define to 1 to build uuidd */
+#undef USE_UUIDD
+
+/* version for gettext */
+#undef VERSION
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to 1 if Apple Darwin libintl workaround is needed */
+#undef _INTL_REDIRECT_MACROS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+#include <dirpaths.h>
diff --git a/lib/dirpaths.h.in b/lib/dirpaths.h.in
new file mode 100644
index 0000000..6ccb55b
--- /dev/null
+++ b/lib/dirpaths.h.in
@@ -0,0 +1,10 @@
+/*
+ * This file contains the path names for various directories as
+ * controlled by the configure script.
+ */
+
+/* Where to put the messages file for internationalization support */
+#define LOCALEDIR "@datadir@/locale"
+
+/* Where to find the mke2fs.conf and e2fsck.conf files */
+#define ROOT_SYSCONFDIR "@root_sysconfdir@"
diff --git a/lib/e2p/Android.bp b/lib/e2p/Android.bp
new file mode 100644
index 0000000..bed92c1
--- /dev/null
+++ b/lib/e2p/Android.bp
@@ -0,0 +1,58 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-LGPL
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library {
+ name: "libext2_e2p",
+ host_supported: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "encoding.c",
+ "errcode.c",
+ "feature.c",
+ "fgetflags.c",
+ "fsetflags.c",
+ "fgetproject.c",
+ "fsetproject.c",
+ "fgetversion.c",
+ "fsetversion.c",
+ "getflags.c",
+ "getversion.c",
+ "hashstr.c",
+ "iod.c",
+ "ljs.c",
+ "ls.c",
+ "mntopts.c",
+ "parse_num.c",
+ "pe.c",
+ "pf.c",
+ "ps.c",
+ "setflags.c",
+ "setversion.c",
+ "uuid.c",
+ "ostype.c",
+ "percent.c",
+ ],
+
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+}
diff --git a/lib/e2p/Makefile.in b/lib/e2p/Makefile.in
new file mode 100644
index 0000000..92d9c01
--- /dev/null
+++ b/lib/e2p/Makefile.in
@@ -0,0 +1,223 @@
+# Makefile for the second extended file system utility functions
+#
+# Copyright (C) 1993 Remy Card (card@masi.ibp.fr)
+#
+# This file can be redistributed under the terms of the GNU General
+# Public License
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/e2p
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+all:: e2p.pc
+
+OBJS= feature.o fgetflags.o fsetflags.o fgetversion.o fsetversion.o \
+ getflags.o getversion.o hashstr.o iod.o ls.o ljs.o mntopts.o \
+ parse_num.o pe.o pf.o ps.o setflags.o setversion.o uuid.o \
+ ostype.o percent.o crypto_mode.o fgetproject.o fsetproject.o \
+ encoding.o errcode.o
+
+SRCS= $(srcdir)/feature.c $(srcdir)/fgetflags.c \
+ $(srcdir)/fsetflags.c $(srcdir)/fgetversion.c \
+ $(srcdir)/fsetversion.c $(srcdir)/getflags.c \
+ $(srcdir)/getversion.c $(srcdir)/hashstr.c $(srcdir)/iod.c \
+ $(srcdir)/ls.c $(srcdir)/ljs.c $(srcdir)/mntopts.c \
+ $(srcdir)/parse_num.c $(srcdir)/pe.c $(srcdir)/pf.c \
+ $(srcdir)/ps.c $(srcdir)/setflags.c $(srcdir)/setversion.c \
+ $(srcdir)/uuid.c $(srcdir)/ostype.c $(srcdir)/percent.c \
+ $(srcdir)/crypto_mode.c $(srcdir)/fgetproject.c \
+ $(srcdir)/fsetproject.c $(srcdir)/encoding.c \
+ $(srcdir)/errcode.c
+
+HFILES= e2p.h
+
+LIBRARY= libe2p
+LIBDIR= e2p
+
+ELF_VERSION = 2.3
+ELF_SO_VERSION = 2
+ELF_IMAGE = libe2p
+ELF_MYDIR = e2p
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS =
+
+BSDLIB_VERSION = 2.1
+BSDLIB_IMAGE = libe2p
+BSDLIB_MYDIR = e2p
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_ELF@
+@MAKEFILE_BSDLIB@
+@MAKEFILE_PROFILE@
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
+@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+e2p.pc: $(srcdir)/e2p.pc.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); CONFIG_FILES=lib/e2p/e2p.pc ./config.status
+
+tst_ostype: $(srcdir)/ostype.c
+ $(E) " LD $@"
+ $(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_ostype \
+ $(srcdir)/ostype.c $(ALL_CFLAGS) $(ALL_LDFLAGS)
+
+tst_feature: $(srcdir)/feature.c
+ $(E) " LD $@"
+ $(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_feature \
+ $(srcdir)/feature.c $(ALL_CFLAGS) $(ALL_LDFLAGS)
+
+fullcheck check:: tst_ostype tst_feature
+ ./tst_ostype
+ ./tst_feature
+
+installdirs::
+ $(E) " MKDIR_P $(libdir) $(includedir)/e2p"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/e2p $(DESTDIR)$(pkgconfigdir)
+
+install:: all installdirs
+ $(E) " INSTALL_DATA $(libdir)/libe2p.a"
+ $(Q) $(INSTALL_DATA) libe2p.a $(DESTDIR)$(libdir)/libe2p.a
+ -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libe2p.a
+ $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libe2p.a
+ $(Q) set -e; for i in $(HFILES); do \
+ echo " INSTALL_DATA $(includedir)/e2p/$$i"; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/e2p/$$i; \
+ done
+ $(E) " INSTALL_DATA $(pkgconfigdir)/e2p.pc"
+ $(Q) $(INSTALL_DATA) e2p.pc $(DESTDIR)$(pkgconfigdir)/e2p.pc
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libe2p.a \
+ $(DESTDIR)$(pkgconfigdir)/e2p.pc
+ $(RM) -rf $(DESTDIR)$(includedir)/e2p
+
+clean::
+ $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/*
+ $(RM) -f ../libe2p.a ../libe2p_p.a tst_ostype tst_feature e2p.pc
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile e2p.pc \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+$(OBJS): subdirs
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+feature.o: $(srcdir)/feature.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
+ $(top_srcdir)/lib/ext2fs/compiler.h
+fgetflags.o: $(srcdir)/fgetflags.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fsetflags.o: $(srcdir)/fsetflags.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fgetversion.o: $(srcdir)/fgetversion.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fsetversion.o: $(srcdir)/fsetversion.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+getflags.o: $(srcdir)/getflags.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+getversion.o: $(srcdir)/getversion.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+hashstr.o: $(srcdir)/hashstr.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+iod.o: $(srcdir)/iod.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+ls.o: $(srcdir)/ls.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+ljs.o: $(srcdir)/ljs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h
+mntopts.o: $(srcdir)/mntopts.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+parse_num.o: $(srcdir)/parse_num.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+pe.o: $(srcdir)/pe.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+pf.o: $(srcdir)/pf.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+ps.o: $(srcdir)/ps.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+setflags.o: $(srcdir)/setflags.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+setversion.o: $(srcdir)/setversion.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+uuid.o: $(srcdir)/uuid.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h
+ostype.o: $(srcdir)/ostype.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+percent.o: $(srcdir)/percent.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+crypto_mode.o: $(srcdir)/crypto_mode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fgetproject.o: $(srcdir)/fgetproject.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/project.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/e2p.h
+fsetproject.o: $(srcdir)/fsetproject.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/project.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/e2p.h
+encoding.o: $(srcdir)/encoding.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+errcode.o: $(srcdir)/errcode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
diff --git a/lib/e2p/crypto_mode.c b/lib/e2p/crypto_mode.c
new file mode 100644
index 0000000..4933016
--- /dev/null
+++ b/lib/e2p/crypto_mode.c
@@ -0,0 +1,74 @@
+/*
+ * crypto_mode.c --- convert between encryption modes and strings
+ *
+ * Copyright (C) 1999 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "e2p.h"
+
+struct mode {
+ int num;
+ const char *string;
+};
+
+static struct mode mode_list[] = {
+ { EXT4_ENCRYPTION_MODE_INVALID, "Invalid"},
+ { EXT4_ENCRYPTION_MODE_AES_256_XTS, "AES-256-XTS"},
+ { EXT4_ENCRYPTION_MODE_AES_256_GCM, "AES-256-GCM"},
+ { EXT4_ENCRYPTION_MODE_AES_256_CBC, "AES-256-CBC"},
+ { 0, 0 },
+};
+
+const char *e2p_encmode2string(int num)
+{
+ struct mode *p;
+ static char buf[20];
+
+ for (p = mode_list; p->string; p++) {
+ if (num == p->num)
+ return p->string;
+ }
+ sprintf(buf, "ENC_MODE_%d", num);
+ return buf;
+}
+
+/*
+ * Returns the hash algorithm, or -1 on error
+ */
+int e2p_string2encmode(char *string)
+{
+ struct mode *p;
+ char *eptr;
+ int num;
+
+ for (p = mode_list; p->string; p++) {
+ if (!strcasecmp(string, p->string)) {
+ return p->num;
+ }
+ }
+ if (strncasecmp(string, "ENC_MODE_", 9))
+ return -1;
+
+ if (string[9] == 0)
+ return -1;
+ num = strtol(string+9, &eptr, 10);
+ if (num > 255 || num < 0)
+ return -1;
+ if (*eptr)
+ return -1;
+ return num;
+}
+
diff --git a/lib/e2p/e2p.h b/lib/e2p/e2p.h
new file mode 100644
index 0000000..5f4793e
--- /dev/null
+++ b/lib/e2p/e2p.h
@@ -0,0 +1,92 @@
+/*
+ * e2p.h --- header file for the e2p library
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include <sys/types.h> /* Needed by dirent.h on netbsd */
+#include <stdio.h>
+#include <dirent.h>
+
+#include <ext2fs/ext2_fs.h>
+
+#define E2P_FEATURE_COMPAT 0
+#define E2P_FEATURE_INCOMPAT 1
+#define E2P_FEATURE_RO_INCOMPAT 2
+#define E2P_FEATURE_TYPE_MASK 0x03
+
+#define E2P_FEATURE_NEGATE_FLAG 0x80
+
+#define E2P_FS_FEATURE 0
+#define E2P_JOURNAL_FEATURE 1
+
+/* `options' for print_flags() */
+
+#define PFOPT_LONG 1 /* Must be 1 for compatibility with `int long_format'. */
+
+
+int fgetflags (const char * name, unsigned long * flags);
+int fgetversion (const char * name, unsigned long * version);
+int fsetflags (const char * name, unsigned long flags);
+int fsetversion (const char * name, unsigned long version);
+int fgetproject(const char *name, unsigned long *project);
+int fsetproject(const char *name, unsigned long project);
+int getflags (int fd, unsigned long * flags);
+int getversion (int fd, unsigned long * version);
+int iterate_on_dir (const char * dir_name,
+ int (*func) (const char *, struct dirent *, void *),
+ void * private_arg);
+void list_super(struct ext2_super_block * s);
+void list_super2(struct ext2_super_block * s, FILE *f);
+void print_fs_errors (FILE * f, unsigned short errors);
+void print_flags (FILE * f, unsigned long flags, unsigned options);
+void print_fs_state (FILE * f, unsigned short state);
+int setflags (int fd, unsigned long flags);
+int setversion (int fd, unsigned long version);
+
+#define E2P_LIST_JOURNAL_FLAG_FC 0x1
+void e2p_list_journal_super(FILE *f, char *journal_sb_buf,
+ int exp_block_size, int flags);
+
+void e2p_feature_to_string(int compat, unsigned int mask, char *buf,
+ size_t buf_len);
+const char *e2p_feature2string(int compat, unsigned int mask);
+const char *e2p_jrnl_feature2string(int compat, unsigned int mask);
+int e2p_string2feature(char *string, int *compat, unsigned int *mask);
+int e2p_jrnl_string2feature(char *string, int *compat_type, unsigned int *mask);
+int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array);
+int e2p_edit_feature2(const char *str, __u32 *compat_array, __u32 *ok_array,
+ __u32 *clear_ok_array, int *type_err,
+ unsigned int *mask_err);
+
+int e2p_is_null_uuid(void *uu);
+void e2p_uuid_to_str(void *uu, char *out);
+const char *e2p_uuid2str(void *uu);
+
+const char *e2p_hash2string(int num);
+int e2p_string2hash(char *string);
+
+const char *e2p_mntopt2string(unsigned int mask);
+int e2p_string2mntopt(char *string, unsigned int *mask);
+int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok);
+
+unsigned long parse_num_blocks(const char *arg, int log_block_size);
+unsigned long long parse_num_blocks2(const char *arg, int log_block_size);
+
+char *e2p_os2string(int os_type);
+int e2p_string2os(char *str);
+
+unsigned int e2p_percent(int percent, unsigned int base);
+
+const char *e2p_encmode2string(int num);
+int e2p_string2encmode(char *string);
+
+int e2p_str2encoding(const char *string);
+const char *e2p_encoding2str(int encoding);
+int e2p_get_encoding_flags(int encoding);
+int e2p_str2encoding_flags(int encoding, char *param, __u16 *flags);
+
+const char *e2p_errcode2str(unsigned int err);
diff --git a/lib/e2p/e2p.pc.in b/lib/e2p/e2p.pc.in
new file mode 100644
index 0000000..150b089
--- /dev/null
+++ b/lib/e2p/e2p.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: e2p
+Description: Ext2fs userspace programs utility library
+Version: @E2FSPROGS_VERSION@
+Requires:
+Cflags: -I${includedir}/e2p -I${includedir}
+Libs: -L${libdir} -le2p
diff --git a/lib/e2p/encoding.c b/lib/e2p/encoding.c
new file mode 100644
index 0000000..24266fc
--- /dev/null
+++ b/lib/e2p/encoding.c
@@ -0,0 +1,118 @@
+/*
+ * encoding.c --- convert between encoding magic numbers and strings
+ *
+ * Copyright (C) 2018 Collabora Ltd.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include "e2p.h"
+
+#define ARRAY_SIZE(array) \
+ (sizeof(array) / sizeof(array[0]))
+
+static const struct {
+ const char *name;
+ __u16 encoding_magic;
+ __u16 default_flags;
+
+} ext4_encoding_map[] = {
+ {
+ .encoding_magic = EXT4_ENC_UTF8_12_1,
+ .name = "utf8-12.1",
+ .default_flags = 0,
+ },
+ {
+ .encoding_magic = EXT4_ENC_UTF8_12_1,
+ .name = "utf8",
+ .default_flags = 0,
+ },
+};
+
+static const struct enc_flags {
+ __u16 flag;
+ const char *param;
+} encoding_flags[] = {
+ { EXT4_ENC_STRICT_MODE_FL, "strict" },
+};
+
+/* Return a positive number < 0xff indicating the encoding magic number
+ * or a negative value indicating error. */
+int e2p_str2encoding(const char *string)
+{
+ unsigned int i;
+
+ for (i = 0 ; i < ARRAY_SIZE(ext4_encoding_map); i++)
+ if (!strcmp(string, ext4_encoding_map[i].name))
+ return ext4_encoding_map[i].encoding_magic;
+
+ return -EINVAL;
+}
+
+/* Return the name of an encoding or NULL */
+const char *e2p_encoding2str(int encoding)
+{
+ unsigned int i;
+ static char buf[32];
+
+ for (i = 0 ; i < ARRAY_SIZE(ext4_encoding_map); i++)
+ if (ext4_encoding_map[i].encoding_magic == encoding)
+ return ext4_encoding_map[i].name;
+ sprintf(buf, "UNKNOWN_ENCODING_%d", encoding);
+ return buf;
+}
+
+int e2p_get_encoding_flags(int encoding)
+{
+ unsigned int i;
+
+ for (i = 0 ; i < ARRAY_SIZE(ext4_encoding_map); i++)
+ if (ext4_encoding_map[i].encoding_magic == encoding)
+ return ext4_encoding_map[i].default_flags;
+
+ return 0;
+}
+
+int e2p_str2encoding_flags(int encoding, char *param, __u16 *flags)
+{
+ char *f = strtok(param, "-");
+ const struct enc_flags *fl;
+ unsigned int i, neg = 0;
+
+ if (encoding != EXT4_ENC_UTF8_12_1)
+ return -EINVAL;
+ while (f) {
+ neg = 0;
+ if (!strncmp("no", f, 2)) {
+ neg = 1;
+ f += 2;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(encoding_flags); i++) {
+ fl = &encoding_flags[i];
+ if (!strcmp(fl->param, f)) {
+ if (neg)
+ *flags &= ~fl->flag;
+ else
+ *flags |= fl->flag;
+
+ goto next_flag;
+ }
+ }
+ return -EINVAL;
+ next_flag:
+ f = strtok(NULL, "-");
+ }
+ return 0;
+}
diff --git a/lib/e2p/errcode.c b/lib/e2p/errcode.c
new file mode 100644
index 0000000..1627c9d
--- /dev/null
+++ b/lib/e2p/errcode.c
@@ -0,0 +1,48 @@
+/*
+ * errcode.c - convert an error code to a string
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "e2p.h"
+
+static const char *err_string[] = {
+ "",
+ "UNKNOWN", /* 1 */
+ "EIO", /* 2 */
+ "ENOMEM", /* 3 */
+ "EFSBADCRC", /* 4 */
+ "EFSCORRUPTED", /* 5 */
+ "ENOSPC", /* 6 */
+ "ENOKEY", /* 7 */
+ "EROFS", /* 8 */
+ "EFBIG", /* 9 */
+ "EEXIST", /* 10 */
+ "ERANGE", /* 11 */
+ "EOVERFLOW", /* 12 */
+ "EBUSY", /* 13 */
+ "ENOTDIR", /* 14 */
+ "ENOTEMPTY", /* 15 */
+ "ESHUTDOWN", /* 16 */
+ "EFAULT", /* 17 */
+};
+
+#define ARRAY_SIZE(array) \
+ (sizeof(array) / sizeof(array[0]))
+
+/* Return the name of an encoding or NULL */
+const char *e2p_errcode2str(unsigned int err)
+{
+ static char buf[32];
+
+ if (err < ARRAY_SIZE(err_string))
+ return err_string[err];
+
+ sprintf(buf, "UNKNOWN_ERRCODE_%u", err);
+ return buf;
+}
+
+
diff --git a/lib/e2p/feature.c b/lib/e2p/feature.c
new file mode 100644
index 0000000..29b7b15
--- /dev/null
+++ b/lib/e2p/feature.c
@@ -0,0 +1,449 @@
+/*
+ * feature.c --- convert between features and strings
+ *
+ * Copyright (C) 1999 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "e2p.h"
+#include <ext2fs/ext2fs.h>
+#include <ext2fs/kernel-jbd.h>
+
+struct feature {
+ int compat;
+ unsigned int mask;
+ const char *string;
+};
+
+static struct feature feature_list[] = {
+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_DIR_PREALLOC,
+ "dir_prealloc" },
+ { E2P_FEATURE_COMPAT, EXT3_FEATURE_COMPAT_HAS_JOURNAL,
+ "has_journal" },
+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_IMAGIC_INODES,
+ "imagic_inodes" },
+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_EXT_ATTR,
+ "ext_attr" },
+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_DIR_INDEX,
+ "dir_index" },
+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INODE,
+ "resize_inode" },
+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_LAZY_BG,
+ "lazy_bg" },
+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_EXCLUDE_BITMAP,
+ "snapshot_bitmap" },
+ { E2P_FEATURE_COMPAT, EXT4_FEATURE_COMPAT_SPARSE_SUPER2,
+ "sparse_super2" },
+ { E2P_FEATURE_COMPAT, EXT4_FEATURE_COMPAT_FAST_COMMIT,
+ "fast_commit" },
+ { E2P_FEATURE_COMPAT, EXT4_FEATURE_COMPAT_STABLE_INODES,
+ "stable_inodes" },
+ { E2P_FEATURE_COMPAT, EXT4_FEATURE_COMPAT_ORPHAN_FILE,
+ "orphan_file" },
+
+ { E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER,
+ "sparse_super" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_LARGE_FILE,
+ "large_file" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_HUGE_FILE,
+ "huge_file" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_GDT_CSUM,
+ "uninit_bg" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_GDT_CSUM,
+ "uninit_groups" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_DIR_NLINK,
+ "dir_nlink" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE,
+ "extra_isize" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_QUOTA,
+ "quota" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_BIGALLOC,
+ "bigalloc"},
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_METADATA_CSUM,
+ "metadata_csum"},
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_REPLICA,
+ "replica" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_READONLY,
+ "read-only" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_PROJECT,
+ "project"},
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_SHARED_BLOCKS,
+ "shared_blocks"},
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_VERITY,
+ "verity"},
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_ORPHAN_PRESENT,
+ "orphan_present" },
+
+ { E2P_FEATURE_INCOMPAT, EXT2_FEATURE_INCOMPAT_COMPRESSION,
+ "compression" },
+ { E2P_FEATURE_INCOMPAT, EXT2_FEATURE_INCOMPAT_FILETYPE,
+ "filetype" },
+ { E2P_FEATURE_INCOMPAT, EXT3_FEATURE_INCOMPAT_RECOVER,
+ "needs_recovery" },
+ { E2P_FEATURE_INCOMPAT, EXT3_FEATURE_INCOMPAT_JOURNAL_DEV,
+ "journal_dev" },
+ { E2P_FEATURE_INCOMPAT, EXT3_FEATURE_INCOMPAT_EXTENTS,
+ "extent" },
+ { E2P_FEATURE_INCOMPAT, EXT3_FEATURE_INCOMPAT_EXTENTS,
+ "extents" },
+ { E2P_FEATURE_INCOMPAT, EXT2_FEATURE_INCOMPAT_META_BG,
+ "meta_bg" },
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_64BIT,
+ "64bit" },
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_MMP,
+ "mmp" },
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_FLEX_BG,
+ "flex_bg"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_EA_INODE,
+ "ea_inode"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_DIRDATA,
+ "dirdata"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CSUM_SEED,
+ "metadata_csum_seed"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_LARGEDIR,
+ "large_dir"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_INLINE_DATA,
+ "inline_data"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_ENCRYPT,
+ "encrypt"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CASEFOLD,
+ "casefold"},
+ { E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CASEFOLD,
+ "fname_encoding"},
+ { 0, 0, 0 },
+};
+
+static struct feature jrnl_feature_list[] = {
+ { E2P_FEATURE_COMPAT, JBD2_FEATURE_COMPAT_CHECKSUM,
+ "journal_checksum" },
+
+ { E2P_FEATURE_INCOMPAT, JBD2_FEATURE_INCOMPAT_REVOKE,
+ "journal_incompat_revoke" },
+ { E2P_FEATURE_INCOMPAT, JBD2_FEATURE_INCOMPAT_64BIT,
+ "journal_64bit" },
+ { E2P_FEATURE_INCOMPAT, JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT,
+ "journal_async_commit" },
+ { E2P_FEATURE_INCOMPAT, JBD2_FEATURE_INCOMPAT_CSUM_V2,
+ "journal_checksum_v2" },
+ { E2P_FEATURE_INCOMPAT, JBD2_FEATURE_INCOMPAT_CSUM_V3,
+ "journal_checksum_v3" },
+ { 0, 0, 0 },
+};
+
+void e2p_feature_to_string(int compat, unsigned int mask, char *buf,
+ size_t buf_len)
+{
+ struct feature *f;
+ char fchar;
+ int fnum;
+
+ for (f = feature_list; f->string; f++) {
+ if ((compat == f->compat) &&
+ (mask == f->mask)) {
+ strncpy(buf, f->string, buf_len);
+ buf[buf_len - 1] = 0;
+ return;
+ }
+ }
+ switch (compat) {
+ case E2P_FEATURE_COMPAT:
+ fchar = 'C';
+ break;
+ case E2P_FEATURE_INCOMPAT:
+ fchar = 'I';
+ break;
+ case E2P_FEATURE_RO_INCOMPAT:
+ fchar = 'R';
+ break;
+ default:
+ fchar = '?';
+ break;
+ }
+ for (fnum = 0; mask >>= 1; fnum++);
+ sprintf(buf, "FEATURE_%c%d", fchar, fnum);
+}
+
+const char *e2p_feature2string(int compat, unsigned int mask)
+{
+ static char buf[20];
+
+ e2p_feature_to_string(compat, mask, buf, sizeof(buf) / sizeof(buf[0]));
+ return buf;
+}
+
+int e2p_string2feature(char *string, int *compat_type, unsigned int *mask)
+{
+ struct feature *f;
+ char *eptr;
+ int num;
+
+ for (f = feature_list; f->string; f++) {
+ if (!strcasecmp(string, f->string)) {
+ *compat_type = f->compat;
+ *mask = f->mask;
+ return 0;
+ }
+ }
+ if (strncasecmp(string, "FEATURE_", 8))
+ return 1;
+
+ switch (string[8]) {
+ case 'c':
+ case 'C':
+ *compat_type = E2P_FEATURE_COMPAT;
+ break;
+ case 'i':
+ case 'I':
+ *compat_type = E2P_FEATURE_INCOMPAT;
+ break;
+ case 'r':
+ case 'R':
+ *compat_type = E2P_FEATURE_RO_INCOMPAT;
+ break;
+ default:
+ return 1;
+ }
+ if (string[9] == 0)
+ return 1;
+ num = strtol(string+9, &eptr, 10);
+ if (num > 31 || num < 0)
+ return 1;
+ if (*eptr)
+ return 1;
+ *mask = 1 << num;
+ return 0;
+}
+
+const char *e2p_jrnl_feature2string(int compat, unsigned int mask)
+{
+ struct feature *f;
+ static char buf[20];
+ char fchar;
+ int fnum;
+
+ for (f = jrnl_feature_list; f->string; f++) {
+ if ((compat == f->compat) &&
+ (mask == f->mask))
+ return f->string;
+ }
+ switch (compat) {
+ case E2P_FEATURE_COMPAT:
+ fchar = 'C';
+ break;
+ case E2P_FEATURE_INCOMPAT:
+ fchar = 'I';
+ break;
+ case E2P_FEATURE_RO_INCOMPAT:
+ fchar = 'R';
+ break;
+ default:
+ fchar = '?';
+ break;
+ }
+ for (fnum = 0; mask >>= 1; fnum++);
+ sprintf(buf, "FEATURE_%c%d", fchar, fnum);
+ return buf;
+}
+
+int e2p_jrnl_string2feature(char *string, int *compat_type, unsigned int *mask)
+{
+ struct feature *f;
+ char *eptr;
+ int num;
+
+ for (f = jrnl_feature_list; f->string; f++) {
+ if (!strcasecmp(string, f->string)) {
+ *compat_type = f->compat;
+ *mask = f->mask;
+ return 0;
+ }
+ }
+ if (strncasecmp(string, "FEATURE_", 8))
+ return 1;
+
+ switch (string[8]) {
+ case 'c':
+ case 'C':
+ *compat_type = E2P_FEATURE_COMPAT;
+ break;
+ case 'i':
+ case 'I':
+ *compat_type = E2P_FEATURE_INCOMPAT;
+ break;
+ case 'r':
+ case 'R':
+ *compat_type = E2P_FEATURE_RO_INCOMPAT;
+ break;
+ default:
+ return 1;
+ }
+ if (string[9] == 0)
+ return 1;
+ num = strtol(string+9, &eptr, 10);
+ if (num > 31 || num < 0)
+ return 1;
+ if (*eptr)
+ return 1;
+ *mask = 1 << num;
+ return 0;
+}
+static char *skip_over_blanks(char *cp)
+{
+ while (*cp && isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *skip_over_word(char *cp)
+{
+ while (*cp && !isspace(*cp) && *cp != ',')
+ cp++;
+ return cp;
+}
+
+/*
+ * Edit a feature set array as requested by the user. The ok_array,
+ * if set, allows the application to limit what features the user is
+ * allowed to set or clear using this function. If clear_ok_array is set,
+ * then use it tell whether or not it is OK to clear a filesystem feature.
+ */
+int e2p_edit_feature2(const char *str, __u32 *compat_array, __u32 *ok_array,
+ __u32 *clear_ok_array, int *type_err,
+ unsigned int *mask_err)
+{
+ char *cp, *buf, *next;
+ int neg;
+ unsigned int mask;
+ int compat_type;
+ int rc = 0;
+
+ if (!clear_ok_array)
+ clear_ok_array = ok_array;
+
+ if (type_err)
+ *type_err = 0;
+ if (mask_err)
+ *mask_err = 0;
+
+ buf = malloc(strlen(str)+1);
+ if (!buf)
+ return 1;
+ strcpy(buf, str);
+ for (cp = buf; cp && *cp; cp = next ? next+1 : 0) {
+ neg = 0;
+ cp = skip_over_blanks(cp);
+ next = skip_over_word(cp);
+
+ if (*next == 0)
+ next = 0;
+ else
+ *next = 0;
+
+ if ((strcasecmp(cp, "none") == 0) ||
+ (strcasecmp(cp, "clear") == 0)) {
+ compat_array[0] = 0;
+ compat_array[1] = 0;
+ compat_array[2] = 0;
+ continue;
+ }
+
+ switch (*cp) {
+ case '-':
+ case '^':
+ neg++;
+ /* fallthrough */
+ case '+':
+ cp++;
+ break;
+ }
+ if (e2p_string2feature(cp, &compat_type, &mask)) {
+ rc = 1;
+ break;
+ }
+ if (neg) {
+ if (clear_ok_array &&
+ !(clear_ok_array[compat_type] & mask)) {
+ rc = 1;
+ if (type_err)
+ *type_err = (compat_type |
+ E2P_FEATURE_NEGATE_FLAG);
+ if (mask_err)
+ *mask_err = mask;
+ break;
+ }
+ compat_array[compat_type] &= ~mask;
+ } else {
+ if (ok_array && !(ok_array[compat_type] & mask)) {
+ rc = 1;
+ if (type_err)
+ *type_err = compat_type;
+ if (mask_err)
+ *mask_err = mask;
+ break;
+ }
+ compat_array[compat_type] |= mask;
+ }
+ }
+ free(buf);
+ return rc;
+}
+
+int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array)
+{
+ return e2p_edit_feature2(str, compat_array, ok_array, 0, 0, 0);
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ int compat, compat2, i;
+ unsigned int mask, mask2;
+ const char *str;
+ struct feature *f;
+
+ for (i = 0; i < 2; i++) {
+ if (i == 0) {
+ f = feature_list;
+ printf("Feature list:\n");
+ } else {
+ printf("\nJournal feature list:\n");
+ f = jrnl_feature_list;
+ }
+ for (; f->string; f++) {
+ if (i == 0) {
+ e2p_string2feature((char *)f->string, &compat,
+ &mask);
+ str = e2p_feature2string(compat, mask);
+ } else {
+ e2p_jrnl_string2feature((char *)f->string,
+ &compat, &mask);
+ str = e2p_jrnl_feature2string(compat, mask);
+ }
+
+ printf("\tCompat = %d, Mask = %u, %s\n",
+ compat, mask, f->string);
+ if (strcmp(f->string, str)) {
+ if (e2p_string2feature((char *) str, &compat2,
+ &mask2) ||
+ (compat2 != compat) ||
+ (mask2 != mask)) {
+ fprintf(stderr, "Failure!\n");
+ exit(1);
+ }
+ }
+ }
+ }
+ exit(0);
+}
+#endif
diff --git a/lib/e2p/fgetflags.c b/lib/e2p/fgetflags.c
new file mode 100644
index 0000000..24a7166
--- /dev/null
+++ b/lib/e2p/fgetflags.c
@@ -0,0 +1,117 @@
+/*
+ * fgetflags.c - Get a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if HAVE_EXT2_IOCTLS
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
+
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW)
+
+int fgetflags (const char * name, unsigned long * flags)
+{
+#if HAVE_STAT_FLAGS && !(APPLE_DARWIN && HAVE_EXT2_IOCTLS)
+ struct stat buf;
+
+ if (stat (name, &buf) == -1)
+ return -1;
+
+ *flags = 0;
+#ifdef UF_IMMUTABLE
+ if (buf.st_flags & UF_IMMUTABLE)
+ *flags |= EXT2_IMMUTABLE_FL;
+#endif
+#ifdef UF_APPEND
+ if (buf.st_flags & UF_APPEND)
+ *flags |= EXT2_APPEND_FL;
+#endif
+#ifdef UF_NODUMP
+ if (buf.st_flags & UF_NODUMP)
+ *flags |= EXT2_NODUMP_FL;
+#endif
+
+ return 0;
+#elif APPLE_DARWIN && HAVE_EXT2_IOCTLS
+ int f, save_errno = 0;
+
+ f = -1;
+ save_errno = syscall(SYS_fsctl, name, EXT2_IOC_GETFLAGS, &f, 0);
+ *flags = f;
+ return (save_errno);
+#elif HAVE_EXT2_IOCTLS
+ struct stat buf;
+ int fd, r, f, save_errno = 0;
+
+ if (!stat(name, &buf) &&
+ !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+ fd = open(name, OPEN_FLAGS);
+ if (fd == -1) {
+ if (errno == ELOOP || errno == ENXIO)
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+ if (!fstat(fd, &buf) &&
+ !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
+ close(fd);
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+ r = ioctl(fd, EXT2_IOC_GETFLAGS, &f);
+ if (r == -1) {
+ if (errno == ENOTTY)
+ errno = EOPNOTSUPP;
+ save_errno = errno;
+ }
+ *flags = f;
+ close(fd);
+ if (save_errno)
+ errno = save_errno;
+ return r;
+#else
+ errno = EOPNOTSUPP;
+ return -1;
+#endif
+}
diff --git a/lib/e2p/fgetproject.c b/lib/e2p/fgetproject.c
new file mode 100644
index 0000000..12320b5
--- /dev/null
+++ b/lib/e2p/fgetproject.c
@@ -0,0 +1,63 @@
+/*
+ * fgetproject.c --- get project id
+ *
+ * Copyright (C) 1999 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if HAVE_EXT2_IOCTLS
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include "project.h"
+#endif
+
+#include "e2p.h"
+
+#ifdef O_LARGEFILE
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE)
+#else
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK)
+#endif
+
+int fgetproject(const char *name, unsigned long *project)
+{
+#ifndef FS_IOC_FSGETXATTR
+ errno = EOPNOTSUPP;
+ return -1;
+#else
+ int fd, r, save_errno = 0;
+ struct fsxattr fsx;
+
+ fd = open (name, OPEN_FLAGS);
+ if (fd == -1)
+ return -1;
+ r = ioctl (fd, FS_IOC_FSGETXATTR, &fsx);
+ if (r == 0)
+ *project = fsx.fsx_projid;
+ save_errno = errno;
+ close (fd);
+ if (save_errno)
+ errno = save_errno;
+ return r;
+#endif
+}
diff --git a/lib/e2p/fgetversion.c b/lib/e2p/fgetversion.c
new file mode 100644
index 0000000..f3a5b4c
--- /dev/null
+++ b/lib/e2p/fgetversion.c
@@ -0,0 +1,74 @@
+/*
+ * fgetversion.c - Get a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#if HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+#ifdef O_LARGEFILE
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE)
+#else
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK)
+#endif
+
+int fgetversion(const char *name, unsigned long *version)
+{
+ unsigned int ver = -1;
+ int rc = -1;
+#if HAVE_EXT2_IOCTLS
+# if !APPLE_DARWIN
+ int fd, save_errno = 0;
+
+ fd = open(name, OPEN_FLAGS);
+ if (fd == -1)
+ return -1;
+
+ rc = ioctl(fd, EXT2_IOC_GETVERSION, &ver);
+ if (rc == -1)
+ save_errno = errno;
+ close(fd);
+ if (rc == -1)
+ errno = save_errno;
+# else /* APPLE_DARWIN */
+ rc = syscall(SYS_fsctl, name, EXT2_IOC_GETVERSION, &ver, 0);
+# endif /* !APPLE_DARWIN */
+#else /* ! HAVE_EXT2_IOCTLS */
+ errno = EOPNOTSUPP;
+#endif /* ! HAVE_EXT2_IOCTLS */
+ if (rc == 0)
+ *version = ver;
+
+ return rc;
+}
diff --git a/lib/e2p/fsetflags.c b/lib/e2p/fsetflags.c
new file mode 100644
index 0000000..d865d24
--- /dev/null
+++ b/lib/e2p/fsetflags.c
@@ -0,0 +1,118 @@
+/*
+ * fsetflags.c - Set a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if HAVE_EXT2_IOCTLS
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+/*
+ * Deal with lame glibc's that define this function without actually
+ * implementing it. Can you say "attractive nuisance", boys and girls?
+ * I knew you could!
+ */
+#ifdef __linux__
+#undef HAVE_CHFLAGS
+#endif
+
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
+
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW)
+
+int fsetflags (const char * name, unsigned long flags)
+{
+#if HAVE_CHFLAGS && !(APPLE_DARWIN && HAVE_EXT2_IOCTLS)
+ unsigned long bsd_flags = 0;
+
+#ifdef UF_IMMUTABLE
+ if (flags & EXT2_IMMUTABLE_FL)
+ bsd_flags |= UF_IMMUTABLE;
+#endif
+#ifdef UF_APPEND
+ if (flags & EXT2_APPEND_FL)
+ bsd_flags |= UF_APPEND;
+#endif
+#ifdef UF_NODUMP
+ if (flags & EXT2_NODUMP_FL)
+ bsd_flags |= UF_NODUMP;
+#endif
+
+ return chflags (name, bsd_flags);
+#elif APPLE_DARWIN && HAVE_EXT2_IOCTLS
+ int f = (int) flags;
+ return syscall(SYS_fsctl, name, EXT2_IOC_SETFLAGS, &f, 0);
+#elif HAVE_EXT2_IOCTLS
+ struct stat buf;
+ int fd, r, f, save_errno = 0;
+
+ if (!stat(name, &buf) &&
+ !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+ fd = open(name, OPEN_FLAGS);
+ if (fd == -1) {
+ if (errno == ELOOP || errno == ENXIO)
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+ if (!fstat(fd, &buf) &&
+ !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
+ close(fd);
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+ f = (int) flags;
+ r = ioctl(fd, EXT2_IOC_SETFLAGS, &f);
+ if (r == -1) {
+ if (errno == ENOTTY)
+ errno = EOPNOTSUPP;
+ save_errno = errno;
+ }
+ close(fd);
+ if (save_errno)
+ errno = save_errno;
+ return r;
+#else
+ errno = EOPNOTSUPP;
+ return -1;
+#endif
+}
diff --git a/lib/e2p/fsetproject.c b/lib/e2p/fsetproject.c
new file mode 100644
index 0000000..5df7090
--- /dev/null
+++ b/lib/e2p/fsetproject.c
@@ -0,0 +1,69 @@
+/*
+ * fgetproject.c --- get project id
+ *
+ * Copyright (C) 1999 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if HAVE_EXT2_IOCTLS
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include "project.h"
+#endif
+
+#include "e2p.h"
+
+#ifdef O_LARGEFILE
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE)
+#else
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK)
+#endif
+
+int fsetproject(const char *name, unsigned long project)
+{
+#ifndef FS_IOC_FSGETXATTR
+ errno = EOPNOTSUPP;
+ return -1;
+#else
+ int fd, r, save_errno = 0;
+ struct fsxattr fsx;
+
+ fd = open (name, OPEN_FLAGS);
+ if (fd == -1)
+ return -1;
+ r = ioctl (fd, FS_IOC_FSGETXATTR, &fsx);
+ if (r == -1) {
+ save_errno = errno;
+ goto errout;
+ }
+ fsx.fsx_projid = project;
+ r = ioctl (fd, FS_IOC_FSSETXATTR, &fsx);
+ if (r == -1)
+ save_errno = errno;
+errout:
+ close (fd);
+ if (save_errno)
+ errno = save_errno;
+ return r;
+#endif
+}
diff --git a/lib/e2p/fsetversion.c b/lib/e2p/fsetversion.c
new file mode 100644
index 0000000..5f844b5
--- /dev/null
+++ b/lib/e2p/fsetversion.c
@@ -0,0 +1,71 @@
+/*
+ * fsetversion.c - Set a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#if HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+#ifdef O_LARGEFILE
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE)
+#else
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK)
+#endif
+
+int fsetversion (const char * name, unsigned long version)
+{
+#if HAVE_EXT2_IOCTLS
+#if !APPLE_DARWIN
+ int fd, r, ver, save_errno = 0;
+
+ fd = open (name, OPEN_FLAGS);
+ if (fd == -1)
+ return -1;
+ ver = (int) version;
+ r = ioctl (fd, EXT2_IOC_SETVERSION, &ver);
+ if (r == -1)
+ save_errno = errno;
+ close (fd);
+ if (save_errno)
+ errno = save_errno;
+ return r;
+#else
+ int ver = (int)version;
+ return syscall(SYS_fsctl, name, EXT2_IOC_SETVERSION, &ver, 0);
+#endif
+#else /* ! HAVE_EXT2_IOCTLS */
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
diff --git a/lib/e2p/getflags.c b/lib/e2p/getflags.c
new file mode 100644
index 0000000..6708cd6
--- /dev/null
+++ b/lib/e2p/getflags.c
@@ -0,0 +1,71 @@
+/*
+ * getflags.c - Get a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if HAVE_EXT2_IOCTLS
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+int getflags (int fd, unsigned long * flags)
+{
+#if HAVE_STAT_FLAGS
+ struct stat buf;
+
+ if (fstat (fd, &buf) == -1)
+ return -1;
+
+ *flags = 0;
+#ifdef UF_IMMUTABLE
+ if (buf.st_flags & UF_IMMUTABLE)
+ *flags |= EXT2_IMMUTABLE_FL;
+#endif
+#ifdef UF_APPEND
+ if (buf.st_flags & UF_APPEND)
+ *flags |= EXT2_APPEND_FL;
+#endif
+#ifdef UF_NODUMP
+ if (buf.st_flags & UF_NODUMP)
+ *flags |= EXT2_NODUMP_FL;
+#endif
+
+ return 0;
+#else
+#if HAVE_EXT2_IOCTLS
+ struct stat buf;
+ int r, f;
+
+ if (!fstat(fd, &buf) &&
+ !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode))
+ goto notsupp;
+ r = ioctl(fd, EXT2_IOC_GETFLAGS, &f);
+ *flags = f;
+
+ return r;
+notsupp:
+#endif /* HAVE_EXT2_IOCTLS */
+#endif
+ errno = EOPNOTSUPP;
+ return -1;
+}
diff --git a/lib/e2p/getversion.c b/lib/e2p/getversion.c
new file mode 100644
index 0000000..d374a0e
--- /dev/null
+++ b/lib/e2p/getversion.c
@@ -0,0 +1,41 @@
+/*
+ * getversion.c - Get a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+int getversion (int fd, unsigned long * version)
+{
+#if HAVE_EXT2_IOCTLS
+ int r, ver;
+
+ r = ioctl (fd, EXT2_IOC_GETVERSION, &ver);
+ *version = ver;
+ return r;
+#else /* ! HAVE_EXT2_IOCTLS */
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
diff --git a/lib/e2p/hashstr.c b/lib/e2p/hashstr.c
new file mode 100644
index 0000000..a73758c
--- /dev/null
+++ b/lib/e2p/hashstr.c
@@ -0,0 +1,72 @@
+/*
+ * feature.c --- convert between features and strings
+ *
+ * Copyright (C) 1999 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "e2p.h"
+
+struct hash {
+ int num;
+ const char *string;
+};
+
+static struct hash hash_list[] = {
+ { EXT2_HASH_LEGACY, "legacy" },
+ { EXT2_HASH_HALF_MD4, "half_md4" },
+ { EXT2_HASH_TEA, "tea" },
+ { 0, 0 },
+};
+
+const char *e2p_hash2string(int num)
+{
+ struct hash *p;
+ static char buf[20];
+
+ for (p = hash_list; p->string; p++) {
+ if (num == p->num)
+ return p->string;
+ }
+ sprintf(buf, "HASHALG_%d", num);
+ return buf;
+}
+
+/*
+ * Returns the hash algorithm, or -1 on error
+ */
+int e2p_string2hash(char *string)
+{
+ struct hash *p;
+ char *eptr;
+ int num;
+
+ for (p = hash_list; p->string; p++) {
+ if (!strcasecmp(string, p->string)) {
+ return p->num;
+ }
+ }
+ if (strncasecmp(string, "HASHALG_", 8))
+ return -1;
+
+ if (string[8] == 0)
+ return -1;
+ num = strtol(string+8, &eptr, 10);
+ if (num > 255 || num < 0)
+ return -1;
+ if (*eptr)
+ return -1;
+ return num;
+}
+
diff --git a/lib/e2p/iod.c b/lib/e2p/iod.c
new file mode 100644
index 0000000..6a030dd
--- /dev/null
+++ b/lib/e2p/iod.c
@@ -0,0 +1,76 @@
+/*
+ * iod.c - Iterate a function on each entry of a directory
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#include "config.h"
+#include "e2p.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+int iterate_on_dir (const char * dir_name,
+ int (*func) (const char *, struct dirent *, void *),
+ void * private)
+{
+ DIR * dir;
+ struct dirent *de, *dep;
+ int max_len = -1, len, ret = 0;
+
+#if HAVE_PATHCONF && defined(_PC_NAME_MAX)
+ max_len = pathconf(dir_name, _PC_NAME_MAX);
+#endif
+ if (max_len == -1) {
+#ifdef _POSIX_NAME_MAX
+ max_len = _POSIX_NAME_MAX;
+#else
+#ifdef NAME_MAX
+ max_len = NAME_MAX;
+#else
+ max_len = 256;
+#endif /* NAME_MAX */
+#endif /* _POSIX_NAME_MAX */
+ }
+ max_len += sizeof(struct dirent);
+
+ de = malloc(max_len+1);
+ if (!de)
+ return -1;
+ memset(de, 0, max_len+1);
+
+ dir = opendir (dir_name);
+ if (dir == NULL) {
+ free(de);
+ return -1;
+ }
+ while ((dep = readdir (dir))) {
+#ifdef HAVE_RECLEN_DIRENT
+ len = dep->d_reclen;
+ if (len > max_len)
+ len = max_len;
+#else
+ len = sizeof(struct dirent);
+#endif
+ memcpy(de, dep, len);
+ if ((*func)(dir_name, de, private))
+ ret++;
+ }
+ free(de);
+ closedir(dir);
+ return ret;
+}
diff --git a/lib/e2p/ljs.c b/lib/e2p/ljs.c
new file mode 100644
index 0000000..5972819
--- /dev/null
+++ b/lib/e2p/ljs.c
@@ -0,0 +1,134 @@
+/*
+ * ljs.c - List the contents of an journal superblock
+ *
+ * Copyright (C) 1995, 1996, 1997 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <string.h>
+#include <grp.h>
+#include <pwd.h>
+#include <time.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "e2p.h"
+#include "ext2fs/kernel-jbd.h"
+
+#ifdef WORDS_BIGENDIAN
+#define e2p_be32(x) (x)
+#else
+static __u32 e2p_swab32(__u32 val)
+{
+ return ((val>>24) | ((val>>8)&0xFF00) |
+ ((val<<8)&0xFF0000) | (val<<24));
+}
+
+#define e2p_be32(x) e2p_swab32(x)
+#endif
+
+/*
+ * This function is copied from kernel-jbd.h's function
+ * jbd2_journal_get_num_fc_blks() to avoid inter-library dependencies.
+ */
+static inline int get_num_fc_blks(journal_superblock_t *jsb)
+{
+ int num_fc_blocks = e2p_be32(jsb->s_num_fc_blks);
+
+ return num_fc_blocks ? num_fc_blocks : JBD2_DEFAULT_FAST_COMMIT_BLOCKS;
+}
+
+static const char *journal_checksum_type_str(__u8 type)
+{
+ switch (type) {
+ case JBD2_CRC32C_CHKSUM:
+ return "crc32c";
+ default:
+ return "unknown";
+ }
+}
+
+void e2p_list_journal_super(FILE *f, char *journal_sb_buf,
+ int exp_block_size, int flags)
+{
+ journal_superblock_t *jsb = (journal_superblock_t *) journal_sb_buf;
+ __u32 *mask_ptr, mask, m;
+ unsigned int size;
+ int j, printed = 0;
+ unsigned int i, nr_users;
+ int num_fc_blks = 0;
+ int journal_blks = 0;
+
+ if (flags & E2P_LIST_JOURNAL_FLAG_FC)
+ num_fc_blks = get_num_fc_blks((journal_superblock_t *)journal_sb_buf);
+ journal_blks = ntohl(jsb->s_maxlen) - num_fc_blks;
+ fprintf(f, "%s", "Journal features: ");
+ for (i=0, mask_ptr=&jsb->s_feature_compat; i <3; i++,mask_ptr++) {
+ mask = e2p_be32(*mask_ptr);
+ for (j=0,m=1; j < 32; j++, m<<=1) {
+ if (mask & m) {
+ fprintf(f, " %s", e2p_jrnl_feature2string(i, m));
+ printed++;
+ }
+ }
+ }
+ if (printed == 0)
+ fprintf(f, " (none)");
+ fputc('\n', f);
+ fputs("Total journal size: ", f);
+ size = (ntohl(jsb->s_blocksize) / 1024) * ntohl(jsb->s_maxlen);
+ if (size < 8192)
+ fprintf(f, "%uk\n", size);
+ else
+ fprintf(f, "%uM\n", size >> 10);
+ nr_users = (unsigned int) ntohl(jsb->s_nr_users);
+ if (exp_block_size != (int) ntohl(jsb->s_blocksize))
+ fprintf(f, "Journal block size: %u\n",
+ (unsigned int)ntohl(jsb->s_blocksize));
+ fprintf(f, "Total journal blocks: %u\n",
+ (unsigned int)(journal_blks + num_fc_blks));
+ fprintf(f, "Max transaction length: %u\n",
+ (unsigned int)journal_blks);
+ fprintf(f, "Fast commit length: %u\n",
+ (unsigned int)num_fc_blks);
+
+ if (ntohl(jsb->s_first) != 1)
+ fprintf(f, "Journal first block: %u\n",
+ (unsigned int)ntohl(jsb->s_first));
+ fprintf(f, "Journal sequence: 0x%08x\n"
+ "Journal start: %u\n",
+ (unsigned int)ntohl(jsb->s_sequence),
+ (unsigned int)ntohl(jsb->s_start));
+ if (nr_users != 1)
+ fprintf(f, "Journal number of users: %u\n", nr_users);
+ if (jsb->s_feature_compat & e2p_be32(JBD2_FEATURE_COMPAT_CHECKSUM))
+ fprintf(f, "%s", "Journal checksum type: crc32\n");
+ if ((jsb->s_feature_incompat &
+ e2p_be32(JBD2_FEATURE_INCOMPAT_CSUM_V3)) ||
+ (jsb->s_feature_incompat &
+ e2p_be32(JBD2_FEATURE_INCOMPAT_CSUM_V2)))
+ fprintf(f, "Journal checksum type: %s\n"
+ "Journal checksum: 0x%08x\n",
+ journal_checksum_type_str(jsb->s_checksum_type),
+ e2p_be32(jsb->s_checksum));
+ if ((nr_users > 1) ||
+ !e2p_is_null_uuid(&jsb->s_users[0])) {
+ for (i=0; i < nr_users && i < JBD2_USERS_MAX; i++) {
+ printf(i ? " %s\n"
+ : "Journal users: %s\n",
+ e2p_uuid2str(&jsb->s_users[i * UUID_SIZE]));
+ }
+ }
+ if (jsb->s_errno != 0)
+ fprintf(f, "Journal errno: %d\n",
+ (int) ntohl(jsb->s_errno));
+}
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c
new file mode 100644
index 0000000..0b74aea
--- /dev/null
+++ b/lib/e2p/ls.c
@@ -0,0 +1,494 @@
+/*
+ * ls.c - List the contents of an ext2fs superblock
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * Copyright (C) 1995, 1996, 1997 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <string.h>
+#include <grp.h>
+#include <pwd.h>
+#include <time.h>
+
+#include "e2p.h"
+#include "support/quotaio.h"
+
+static void print_user (unsigned short uid, FILE *f)
+{
+ struct passwd *pw;
+
+ fprintf(f, "%u ", uid);
+ pw = getpwuid (uid);
+ if (pw == NULL)
+ fprintf(f, "(user unknown)\n");
+ else
+ fprintf(f, "(user %s)\n", pw->pw_name);
+}
+
+static void print_group (unsigned short gid, FILE *f)
+{
+ struct group *gr;
+
+ fprintf(f, "%u ", gid);
+ gr = getgrgid (gid);
+ if (gr == NULL)
+ fprintf(f, "(group unknown)\n");
+ else
+ fprintf(f, "(group %s)\n", gr->gr_name);
+}
+
+#define MONTH_INT (86400 * 30)
+#define WEEK_INT (86400 * 7)
+#define DAY_INT (86400)
+#define HOUR_INT (60 * 60)
+#define MINUTE_INT (60)
+
+static const char *interval_string(unsigned int secs)
+{
+ static char buf[256], tmp[80];
+ int hr, min, num;
+
+ buf[0] = 0;
+
+ if (secs == 0)
+ return "<none>";
+
+ if (secs >= MONTH_INT) {
+ num = secs / MONTH_INT;
+ secs -= num*MONTH_INT;
+ sprintf(buf, "%d month%s", num, (num>1) ? "s" : "");
+ }
+ if (secs >= WEEK_INT) {
+ num = secs / WEEK_INT;
+ secs -= num*WEEK_INT;
+ sprintf(tmp, "%s%d week%s", buf[0] ? ", " : "",
+ num, (num>1) ? "s" : "");
+ strcat(buf, tmp);
+ }
+ if (secs >= DAY_INT) {
+ num = secs / DAY_INT;
+ secs -= num*DAY_INT;
+ sprintf(tmp, "%s%d day%s", buf[0] ? ", " : "",
+ num, (num>1) ? "s" : "");
+ strcat(buf, tmp);
+ }
+ if (secs > 0) {
+ hr = secs / HOUR_INT;
+ secs -= hr*HOUR_INT;
+ min = secs / MINUTE_INT;
+ secs -= min*MINUTE_INT;
+ sprintf(tmp, "%s%d:%02d:%02d", buf[0] ? ", " : "",
+ hr, min, secs);
+ strcat(buf, tmp);
+ }
+ return buf;
+}
+
+static void print_features(struct ext2_super_block * s, FILE *f)
+{
+#ifdef EXT2_DYNAMIC_REV
+ int i, j, printed=0;
+ __u32 *mask = &s->s_feature_compat, m;
+
+ fprintf(f, "Filesystem features: ");
+ for (i=0; i <3; i++,mask++) {
+ for (j=0,m=1; j < 32; j++, m<<=1) {
+ if (*mask & m) {
+ fprintf(f, " %s", e2p_feature2string(i, m));
+ printed++;
+ }
+ }
+ }
+ if (printed == 0)
+ fprintf(f, " (none)");
+ fprintf(f, "\n");
+#endif
+}
+
+static void print_mntopts(struct ext2_super_block * s, FILE *f)
+{
+#ifdef EXT2_DYNAMIC_REV
+ int i, printed=0;
+ __u32 mask = s->s_default_mount_opts, m;
+
+ fprintf(f, "Default mount options: ");
+ if (mask & EXT3_DEFM_JMODE) {
+ fprintf(f, " %s", e2p_mntopt2string(mask & EXT3_DEFM_JMODE));
+ printed++;
+ }
+ for (i=0,m=1; i < 32; i++, m<<=1) {
+ if (m & EXT3_DEFM_JMODE)
+ continue;
+ if (mask & m) {
+ fprintf(f, " %s", e2p_mntopt2string(m));
+ printed++;
+ }
+ }
+ if (printed == 0)
+ fprintf(f, " (none)");
+ fprintf(f, "\n");
+#endif
+}
+
+static void print_super_flags(struct ext2_super_block * s, FILE *f)
+{
+ int flags_found = 0;
+
+ if (s->s_flags == 0)
+ return;
+
+ fputs("Filesystem flags: ", f);
+ if (s->s_flags & EXT2_FLAGS_SIGNED_HASH) {
+ fputs("signed_directory_hash ", f);
+ flags_found++;
+ }
+ if (s->s_flags & EXT2_FLAGS_UNSIGNED_HASH) {
+ fputs("unsigned_directory_hash ", f);
+ flags_found++;
+ }
+ if (s->s_flags & EXT2_FLAGS_TEST_FILESYS) {
+ fputs("test_filesystem ", f);
+ flags_found++;
+ }
+ if (flags_found)
+ fputs("\n", f);
+ else
+ fputs("(none)\n", f);
+}
+
+static __u64 e2p_blocks_count(struct ext2_super_block *super)
+{
+ return super->s_blocks_count |
+ (ext2fs_has_feature_64bit(super) ?
+ (__u64) super->s_blocks_count_hi << 32 : 0);
+}
+
+static __u64 e2p_r_blocks_count(struct ext2_super_block *super)
+{
+ return super->s_r_blocks_count |
+ (ext2fs_has_feature_64bit(super) ?
+ (__u64) super->s_r_blocks_count_hi << 32 : 0);
+}
+
+static __u64 e2p_free_blocks_count(struct ext2_super_block *super)
+{
+ return super->s_free_blocks_count |
+ (ext2fs_has_feature_64bit(super) ?
+ (__u64) super->s_free_blocks_hi << 32 : 0);
+}
+
+#ifndef EXT2_INODE_SIZE
+#define EXT2_INODE_SIZE(s) sizeof(struct ext2_inode)
+#endif
+
+#ifndef EXT2_GOOD_OLD_REV
+#define EXT2_GOOD_OLD_REV 0
+#endif
+
+static const char *checksum_type(__u8 type)
+{
+ switch (type) {
+ case EXT2_CRC32C_CHKSUM:
+ return "crc32c";
+ default:
+ return "unknown";
+ }
+}
+
+static const char *quota_prefix[MAXQUOTAS] = {
+ [USRQUOTA] = "User quota inode:",
+ [GRPQUOTA] = "Group quota inode:",
+ [PRJQUOTA] = "Project quota inode:",
+};
+
+/**
+ * Convert type of quota to written representation
+ */
+static const char *quota_type2prefix(enum quota_type qtype)
+{
+ return quota_prefix[qtype];
+}
+
+void list_super2(struct ext2_super_block * sb, FILE *f)
+{
+ int inode_blocks_per_group;
+ char *str;
+ time_t tm;
+ enum quota_type qtype;
+
+ inode_blocks_per_group = (((sb->s_inodes_per_group *
+ EXT2_INODE_SIZE(sb)) +
+ EXT2_BLOCK_SIZE(sb) - 1) /
+ EXT2_BLOCK_SIZE(sb));
+ if (sb->s_volume_name[0])
+ fprintf(f, "Filesystem volume name: %.*s\n",
+ EXT2_LEN_STR(sb->s_volume_name));
+ else
+ fprintf(f, "Filesystem volume name: <none>\n");
+ if (sb->s_last_mounted[0])
+ fprintf(f, "Last mounted on: %.*s\n",
+ EXT2_LEN_STR(sb->s_last_mounted));
+ else
+ fprintf(f, "Last mounted on: <not available>\n");
+ fprintf(f, "Filesystem UUID: %s\n", e2p_uuid2str(sb->s_uuid));
+ fprintf(f, "Filesystem magic number: 0x%04X\n", sb->s_magic);
+ fprintf(f, "Filesystem revision #: %d", sb->s_rev_level);
+ if (sb->s_rev_level == EXT2_GOOD_OLD_REV) {
+ fprintf(f, " (original)\n");
+#ifdef EXT2_DYNAMIC_REV
+ } else if (sb->s_rev_level == EXT2_DYNAMIC_REV) {
+ fprintf(f, " (dynamic)\n");
+#endif
+ } else
+ fprintf(f, " (unknown)\n");
+ print_features(sb, f);
+ print_super_flags(sb, f);
+ print_mntopts(sb, f);
+ if (sb->s_mount_opts[0])
+ fprintf(f, "Mount options: %.*s\n",
+ EXT2_LEN_STR(sb->s_mount_opts));
+ fprintf(f, "Filesystem state: ");
+ print_fs_state (f, sb->s_state);
+ fprintf(f, "\n");
+ fprintf(f, "Errors behavior: ");
+ print_fs_errors(f, sb->s_errors);
+ fprintf(f, "\n");
+ str = e2p_os2string(sb->s_creator_os);
+ fprintf(f, "Filesystem OS type: %s\n", str);
+ free(str);
+ fprintf(f, "Inode count: %u\n", sb->s_inodes_count);
+ fprintf(f, "Block count: %llu\n",
+ (unsigned long long) e2p_blocks_count(sb));
+ fprintf(f, "Reserved block count: %llu\n",
+ (unsigned long long) e2p_r_blocks_count(sb));
+ if (sb->s_overhead_clusters)
+ fprintf(f, "Overhead clusters: %u\n",
+ sb->s_overhead_clusters);
+ fprintf(f, "Free blocks: %llu\n",
+ (unsigned long long) e2p_free_blocks_count(sb));
+ fprintf(f, "Free inodes: %u\n", sb->s_free_inodes_count);
+ fprintf(f, "First block: %u\n", sb->s_first_data_block);
+ fprintf(f, "Block size: %u\n", EXT2_BLOCK_SIZE(sb));
+ if (ext2fs_has_feature_bigalloc(sb))
+ fprintf(f, "Cluster size: %u\n",
+ EXT2_CLUSTER_SIZE(sb));
+ else
+ fprintf(f, "Fragment size: %u\n",
+ EXT2_CLUSTER_SIZE(sb));
+ if (ext2fs_has_feature_64bit(sb))
+ fprintf(f, "Group descriptor size: %u\n", sb->s_desc_size);
+ if (sb->s_reserved_gdt_blocks)
+ fprintf(f, "Reserved GDT blocks: %u\n",
+ sb->s_reserved_gdt_blocks);
+ fprintf(f, "Blocks per group: %u\n", sb->s_blocks_per_group);
+ if (ext2fs_has_feature_bigalloc(sb))
+ fprintf(f, "Clusters per group: %u\n",
+ sb->s_clusters_per_group);
+ else
+ fprintf(f, "Fragments per group: %u\n",
+ sb->s_clusters_per_group);
+ fprintf(f, "Inodes per group: %u\n", sb->s_inodes_per_group);
+ fprintf(f, "Inode blocks per group: %u\n", inode_blocks_per_group);
+ if (sb->s_raid_stride)
+ fprintf(f, "RAID stride: %u\n",
+ sb->s_raid_stride);
+ if (sb->s_raid_stripe_width)
+ fprintf(f, "RAID stripe width: %u\n",
+ sb->s_raid_stripe_width);
+ if (sb->s_first_meta_bg)
+ fprintf(f, "First meta block group: %u\n",
+ sb->s_first_meta_bg);
+ if (sb->s_log_groups_per_flex)
+ fprintf(f, "Flex block group size: %u\n",
+ 1U << sb->s_log_groups_per_flex);
+ if (sb->s_mkfs_time) {
+ tm = sb->s_mkfs_time;
+ fprintf(f, "Filesystem created: %s", ctime(&tm));
+ }
+ tm = sb->s_mtime;
+ fprintf(f, "Last mount time: %s",
+ sb->s_mtime ? ctime(&tm) : "n/a\n");
+ tm = sb->s_wtime;
+ fprintf(f, "Last write time: %s", ctime(&tm));
+ fprintf(f, "Mount count: %u\n", sb->s_mnt_count);
+ fprintf(f, "Maximum mount count: %d\n", sb->s_max_mnt_count);
+ tm = sb->s_lastcheck;
+ fprintf(f, "Last checked: %s", ctime(&tm));
+ fprintf(f, "Check interval: %u (%s)\n", sb->s_checkinterval,
+ interval_string(sb->s_checkinterval));
+ if (sb->s_checkinterval)
+ {
+ time_t next;
+
+ next = sb->s_lastcheck + sb->s_checkinterval;
+ fprintf(f, "Next check after: %s", ctime(&next));
+ }
+#define POW2(x) ((__u64) 1 << (x))
+ if (sb->s_kbytes_written) {
+ fprintf(f, "Lifetime writes: ");
+ if (sb->s_kbytes_written < POW2(13))
+ fprintf(f, "%llu kB\n",
+ (unsigned long long) sb->s_kbytes_written);
+ else if (sb->s_kbytes_written < POW2(23))
+ fprintf(f, "%llu MB\n", (unsigned long long)
+ (sb->s_kbytes_written + POW2(9)) >> 10);
+ else if (sb->s_kbytes_written < POW2(33))
+ fprintf(f, "%llu GB\n", (unsigned long long)
+ (sb->s_kbytes_written + POW2(19)) >> 20);
+ else if (sb->s_kbytes_written < POW2(43))
+ fprintf(f, "%llu TB\n", (unsigned long long)
+ (sb->s_kbytes_written + POW2(29)) >> 30);
+ else
+ fprintf(f, "%llu PB\n", (unsigned long long)
+ (sb->s_kbytes_written + POW2(39)) >> 40);
+ }
+ fprintf(f, "Reserved blocks uid: ");
+ print_user(sb->s_def_resuid, f);
+ fprintf(f, "Reserved blocks gid: ");
+ print_group(sb->s_def_resgid, f);
+ if (sb->s_rev_level >= EXT2_DYNAMIC_REV) {
+ fprintf(f, "First inode: %d\n", sb->s_first_ino);
+ fprintf(f, "Inode size: %d\n", sb->s_inode_size);
+ if (sb->s_min_extra_isize)
+ fprintf(f, "Required extra isize: %d\n",
+ sb->s_min_extra_isize);
+ if (sb->s_want_extra_isize)
+ fprintf(f, "Desired extra isize: %d\n",
+ sb->s_want_extra_isize);
+ }
+ if (!e2p_is_null_uuid(sb->s_journal_uuid))
+ fprintf(f, "Journal UUID: %s\n",
+ e2p_uuid2str(sb->s_journal_uuid));
+ if (sb->s_journal_inum)
+ fprintf(f, "Journal inode: %u\n",
+ sb->s_journal_inum);
+ if (sb->s_journal_dev)
+ fprintf(f, "Journal device: 0x%04x\n",
+ sb->s_journal_dev);
+ if (sb->s_last_orphan)
+ fprintf(f, "First orphan inode: %u\n",
+ sb->s_last_orphan);
+ if (ext2fs_has_feature_dir_index(sb) ||
+ sb->s_def_hash_version)
+ fprintf(f, "Default directory hash: %s\n",
+ e2p_hash2string(sb->s_def_hash_version));
+ if (!e2p_is_null_uuid(sb->s_hash_seed))
+ fprintf(f, "Directory Hash Seed: %s\n",
+ e2p_uuid2str(sb->s_hash_seed));
+ if (sb->s_jnl_backup_type) {
+ fprintf(f, "Journal backup: ");
+ switch (sb->s_jnl_backup_type) {
+ case 1:
+ fprintf(f, "inode blocks\n");
+ break;
+ default:
+ fprintf(f, "type %u\n", sb->s_jnl_backup_type);
+ }
+ }
+ if (sb->s_backup_bgs[0] || sb->s_backup_bgs[1]) {
+ fprintf(f, "Backup block groups: ");
+ if (sb->s_backup_bgs[0])
+ fprintf(f, "%u ", sb->s_backup_bgs[0]);
+ if (sb->s_backup_bgs[1])
+ fprintf(f, "%u ", sb->s_backup_bgs[1]);
+ fputc('\n', f);
+ }
+ if (sb->s_snapshot_inum) {
+ fprintf(f, "Snapshot inode: %u\n",
+ sb->s_snapshot_inum);
+ fprintf(f, "Snapshot ID: %u\n",
+ sb->s_snapshot_id);
+ fprintf(f, "Snapshot reserved blocks: %llu\n",
+ (unsigned long long) sb->s_snapshot_r_blocks_count);
+ }
+ if (sb->s_snapshot_list)
+ fprintf(f, "Snapshot list head: %u\n",
+ sb->s_snapshot_list);
+ if (sb->s_error_count)
+ fprintf(f, "FS Error count: %u\n",
+ sb->s_error_count);
+ if (sb->s_first_error_time) {
+ tm = sb->s_first_error_time;
+ fprintf(f, "First error time: %s", ctime(&tm));
+ fprintf(f, "First error function: %.*s\n",
+ EXT2_LEN_STR(sb->s_first_error_func));
+ fprintf(f, "First error line #: %u\n",
+ sb->s_first_error_line);
+ if (sb->s_first_error_ino)
+ fprintf(f, "First error inode #: %u\n",
+ sb->s_first_error_ino);
+ if (sb->s_first_error_block)
+ fprintf(f, "First error block #: %llu\n",
+ (unsigned long long) sb->s_first_error_block);
+ if (sb->s_first_error_errcode)
+ fprintf(f, "First error err: %s\n",
+ e2p_errcode2str(sb->s_first_error_errcode));
+ }
+ if (sb->s_last_error_time) {
+ tm = sb->s_last_error_time;
+ fprintf(f, "Last error time: %s", ctime(&tm));
+ fprintf(f, "Last error function: %.*s\n",
+ EXT2_LEN_STR(sb->s_last_error_func));
+ fprintf(f, "Last error line #: %u\n",
+ sb->s_last_error_line);
+ if (sb->s_last_error_ino)
+ fprintf(f, "Last error inode #: %u\n",
+ sb->s_last_error_ino);
+ if (sb->s_last_error_block)
+ fprintf(f, "Last error block #: %llu\n",
+ (unsigned long long) sb->s_last_error_block);
+ if (sb->s_last_error_errcode)
+ fprintf(f, "Last error err: %s\n",
+ e2p_errcode2str(sb->s_last_error_errcode));
+ }
+ if (ext2fs_has_feature_mmp(sb)) {
+ fprintf(f, "MMP block number: %llu\n",
+ (unsigned long long) sb->s_mmp_block);
+ fprintf(f, "MMP update interval: %u\n",
+ sb->s_mmp_update_interval);
+ }
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (*quota_sb_inump(sb, qtype) != 0)
+ fprintf(f, "%-26s%u\n",
+ quota_type2prefix(qtype),
+ *quota_sb_inump(sb, qtype));
+ }
+
+ if (ext2fs_has_feature_metadata_csum(sb)) {
+ fprintf(f, "Checksum type: %s\n",
+ checksum_type(sb->s_checksum_type));
+ fprintf(f, "Checksum: 0x%08x\n",
+ sb->s_checksum);
+ }
+ if (!e2p_is_null_uuid(sb->s_encrypt_pw_salt))
+ fprintf(f, "Encryption PW Salt: %s\n",
+ e2p_uuid2str(sb->s_encrypt_pw_salt));
+
+ if (ext2fs_has_feature_csum_seed(sb))
+ fprintf(f, "Checksum seed: 0x%08x\n",
+ sb->s_checksum_seed);
+ if (ext2fs_has_feature_casefold(sb))
+ fprintf(f, "Character encoding: %s\n",
+ e2p_encoding2str(sb->s_encoding));
+ if (ext2fs_has_feature_orphan_file(sb))
+ fprintf(f, "Orphan file inode: %u\n",
+ sb->s_orphan_file_inum);
+}
+
+void list_super (struct ext2_super_block * s)
+{
+ list_super2(s, stdout);
+}
+
diff --git a/lib/e2p/mntopts.c b/lib/e2p/mntopts.c
new file mode 100644
index 0000000..7d0ae9c
--- /dev/null
+++ b/lib/e2p/mntopts.c
@@ -0,0 +1,150 @@
+/*
+ * mountopts.c --- convert between default mount options and strings
+ *
+ * Copyright (C) 2002 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "e2p.h"
+
+struct mntopt {
+ unsigned int mask;
+ const char *string;
+};
+
+static struct mntopt mntopt_list[] = {
+ { EXT2_DEFM_DEBUG, "debug" },
+ { EXT2_DEFM_BSDGROUPS, "bsdgroups" },
+ { EXT2_DEFM_XATTR_USER, "user_xattr" },
+ { EXT2_DEFM_ACL, "acl" },
+ { EXT2_DEFM_UID16, "uid16" },
+ { EXT3_DEFM_JMODE_DATA, "journal_data" },
+ { EXT3_DEFM_JMODE_ORDERED, "journal_data_ordered" },
+ { EXT3_DEFM_JMODE_WBACK, "journal_data_writeback" },
+ { EXT4_DEFM_NOBARRIER, "nobarrier" },
+ { EXT4_DEFM_BLOCK_VALIDITY, "block_validity" },
+ { EXT4_DEFM_DISCARD, "discard"},
+ { EXT4_DEFM_NODELALLOC, "nodelalloc"},
+ { 0, 0 },
+};
+
+const char *e2p_mntopt2string(unsigned int mask)
+{
+ struct mntopt *f;
+ static char buf[20];
+ int fnum;
+
+ for (f = mntopt_list; f->string; f++) {
+ if (mask == f->mask)
+ return f->string;
+ }
+ for (fnum = 0; mask >>= 1; fnum++);
+ sprintf(buf, "MNTOPT_%d", fnum);
+ return buf;
+}
+
+int e2p_string2mntopt(char *string, unsigned int *mask)
+{
+ struct mntopt *f;
+ char *eptr;
+ int num;
+
+ for (f = mntopt_list; f->string; f++) {
+ if (!strcasecmp(string, f->string)) {
+ *mask = f->mask;
+ return 0;
+ }
+ }
+ if (strncasecmp(string, "MNTOPT_", 7))
+ return 1;
+
+ if (string[8] == 0)
+ return 1;
+ num = strtol(string+8, &eptr, 10);
+ if (num > 31 || num < 0)
+ return 1;
+ if (*eptr)
+ return 1;
+ *mask = 1 << num;
+ return 0;
+}
+
+static char *skip_over_blanks(char *cp)
+{
+ while (*cp && isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *skip_over_word(char *cp)
+{
+ while (*cp && !isspace(*cp) && *cp != ',')
+ cp++;
+ return cp;
+}
+
+/*
+ * Edit a mntopt set array as requested by the user. The ok
+ * parameter, if non-zero, allows the application to limit what
+ * mntopts the user is allowed to set or clear using this function.
+ */
+int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok)
+{
+ char *cp, *buf, *next;
+ int neg;
+ unsigned int mask;
+ int rc = 0;
+
+ buf = malloc(strlen(str)+1);
+ if (!buf)
+ return 1;
+ strcpy(buf, str);
+ cp = buf;
+ while (cp && *cp) {
+ neg = 0;
+ cp = skip_over_blanks(cp);
+ next = skip_over_word(cp);
+ if (*next == 0)
+ next = 0;
+ else
+ *next = 0;
+ switch (*cp) {
+ case '-':
+ case '^':
+ neg++;
+ /* fallthrough */
+ case '+':
+ cp++;
+ break;
+ }
+ if (e2p_string2mntopt(cp, &mask)) {
+ rc = 1;
+ break;
+ }
+ if (ok && !(ok & mask)) {
+ rc = 1;
+ break;
+ }
+ if (mask & EXT3_DEFM_JMODE)
+ *mntopts &= ~EXT3_DEFM_JMODE;
+ if (neg)
+ *mntopts &= ~mask;
+ else
+ *mntopts |= mask;
+ cp = next ? next+1 : 0;
+ }
+ free(buf);
+ return rc;
+}
diff --git a/lib/e2p/ostype.c b/lib/e2p/ostype.c
new file mode 100644
index 0000000..c5fd8ab
--- /dev/null
+++ b/lib/e2p/ostype.c
@@ -0,0 +1,79 @@
+/*
+ * getostype.c - Get the Filesystem OS type
+ *
+ * Copyright (C) 2004,2005 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "e2p.h"
+#include <string.h>
+#include <stdlib.h>
+
+static const char *os_tab[] =
+ { "Linux",
+ "Hurd",
+ "Masix",
+ "FreeBSD",
+ "Lites",
+ 0 };
+
+/*
+ * Convert an os_type to a string
+ */
+char *e2p_os2string(int os_type)
+{
+ const char *os;
+ char *ret;
+
+ if (os_type >= 0 && os_type <= EXT2_OS_LITES)
+ os = os_tab[os_type];
+ else
+ os = "(unknown os)";
+
+ ret = malloc(strlen(os)+1);
+ if (ret)
+ strcpy(ret, os);
+ return ret;
+}
+
+/*
+ * Convert an os_type to a string
+ */
+int e2p_string2os(char *str)
+{
+ const char **cpp;
+ int i = 0;
+
+ for (cpp = os_tab; *cpp; cpp++, i++) {
+ if (!strcasecmp(str, *cpp))
+ return i;
+ }
+ return -1;
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ char *s;
+ int i, os;
+
+ for (i=0; i <= EXT2_OS_LITES; i++) {
+ s = e2p_os2string(i);
+ os = e2p_string2os(s);
+ printf("%d: %s (%d)\n", i, s, os);
+ free(s);
+ if (i != os) {
+ fprintf(stderr, "Failure!\n");
+ exit(1);
+ }
+ }
+ exit(0);
+}
+#endif
+
+
diff --git a/lib/e2p/parse_num.c b/lib/e2p/parse_num.c
new file mode 100644
index 0000000..e8d6283
--- /dev/null
+++ b/lib/e2p/parse_num.c
@@ -0,0 +1,91 @@
+/*
+ * parse_num.c - Parse the number of blocks
+ *
+ * Copyright (C) 2004,2005 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "e2p.h"
+
+#include <stdlib.h>
+
+unsigned long long parse_num_blocks2(const char *arg, int log_block_size)
+{
+ char *p;
+ unsigned long long num;
+
+ num = strtoull(arg, &p, 0);
+
+ if (p[0] && p[1])
+ return 0;
+
+ switch (*p) { /* Using fall-through logic */
+ case 'T': case 't':
+ num <<= 10;
+ /* fallthrough */
+ case 'G': case 'g':
+ num <<= 10;
+ /* fallthrough */
+ case 'M': case 'm':
+ num <<= 10;
+ /* fallthrough */
+ case 'K': case 'k':
+ if (log_block_size < 0)
+ num <<= 10;
+ else
+ num >>= log_block_size;
+ break;
+ case 's':
+ if (log_block_size < 0)
+ num <<= 9;
+ else
+ num >>= (1+log_block_size);
+ break;
+ case '\0':
+ break;
+ default:
+ return 0;
+ }
+ return num;
+}
+
+unsigned long parse_num_blocks(const char *arg, int log_block_size)
+{
+ return parse_num_blocks2(arg, log_block_size);
+}
+
+#ifdef DEBUG
+#include <unistd.h>
+#include <stdio.h>
+
+main(int argc, char **argv)
+{
+ unsigned long num;
+ int log_block_size = 0;
+
+ if (argc != 2 && argc != 3) {
+ fprintf(stderr, "Usage: %s arg [log_block_size]\n", argv[0]);
+ exit(1);
+ }
+
+ if (argc == 3) {
+ char *p;
+
+ log_block_size = strtol(argv[2], &p, 0);
+ if (*p) {
+ fprintf(stderr, "Bad log_block_size: %s\n", argv[2]);
+ exit(1);
+ }
+ }
+
+ num = parse_num_blocks(argv[1], log_block_size);
+
+ printf("Parsed number: %lu\n", num);
+ exit(0);
+}
+#endif
diff --git a/lib/e2p/pe.c b/lib/e2p/pe.c
new file mode 100644
index 0000000..1f24545
--- /dev/null
+++ b/lib/e2p/pe.c
@@ -0,0 +1,40 @@
+/*
+ * pe.c - Print a second extended filesystem errors behavior
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 94/01/09 - Creation
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "e2p.h"
+
+void print_fs_errors (FILE * f, unsigned short errors)
+{
+ switch (errors)
+ {
+ case EXT2_ERRORS_CONTINUE:
+ fprintf (f, "Continue");
+ break;
+ case EXT2_ERRORS_RO:
+ fprintf (f, "Remount read-only");
+ break;
+ case EXT2_ERRORS_PANIC:
+ fprintf (f, "Panic");
+ break;
+ default:
+ fprintf (f, "Unknown (continue)");
+ }
+}
diff --git a/lib/e2p/percent.c b/lib/e2p/percent.c
new file mode 100644
index 0000000..e340cd7
--- /dev/null
+++ b/lib/e2p/percent.c
@@ -0,0 +1,67 @@
+/*
+ * percent.c - Take percentage of a number
+ *
+ * Copyright (C) 2006 Theodore Ts'o <tytso@mit.edu>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "e2p.h"
+
+#include <stdlib.h>
+
+/*
+ * We work really hard to calculate this accurately, while avoiding
+ * an overflow. "Is there a hyphen in anal-retentive?" :-)
+ */
+unsigned int e2p_percent(int percent, unsigned int base)
+{
+ unsigned int mask = ~((1 << (sizeof(unsigned int) - 1) * 8) - 1);
+
+ if (!percent)
+ return 0;
+ if (100 % percent == 0)
+ return base / (100 / percent);
+ if (mask & base)
+ return (base / 100) * percent;
+ return base * percent / 100;
+}
+
+#ifdef DEBUG
+#include <unistd.h>
+#include <stdio.h>
+
+main(int argc, char **argv)
+{
+ unsigned int base;
+ int percent;
+ char *p;
+ int log_block_size = 0;
+
+ if (argc != 3) {
+ fprintf(stderr, "Usage: %s percent base\n", argv[0]);
+ exit(1);
+ }
+
+ percent = strtoul(argv[1], &p, 0);
+ if (p[0] && p[1]) {
+ fprintf(stderr, "Bad percent: %s\n", argv[1]);
+ exit(1);
+ }
+
+ base = strtoul(argv[2], &p, 0);
+ if (p[0] && p[1]) {
+ fprintf(stderr, "Bad base: %s\n", argv[2]);
+ exit(1);
+ }
+
+ printf("%d percent of %u is %u.\n", percent, base,
+ e2p_percent(percent, base));
+
+ exit(0);
+}
+#endif
diff --git a/lib/e2p/pf.c b/lib/e2p/pf.c
new file mode 100644
index 0000000..81e3bb2
--- /dev/null
+++ b/lib/e2p/pf.c
@@ -0,0 +1,79 @@
+/*
+ * pf.c - Print file attributes on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "e2p.h"
+
+struct flags_name {
+ unsigned long flag;
+ const char *short_name;
+ const char *long_name;
+};
+
+static struct flags_name flags_array[] = {
+ { EXT2_SECRM_FL, "s", "Secure_Deletion" },
+ { EXT2_UNRM_FL, "u" , "Undelete" },
+ { EXT2_SYNC_FL, "S", "Synchronous_Updates" },
+ { EXT2_DIRSYNC_FL, "D", "Synchronous_Directory_Updates" },
+ { EXT2_IMMUTABLE_FL, "i", "Immutable" },
+ { EXT2_APPEND_FL, "a", "Append_Only" },
+ { EXT2_NODUMP_FL, "d", "No_Dump" },
+ { EXT2_NOATIME_FL, "A", "No_Atime" },
+ { EXT2_COMPR_FL, "c", "Compression_Requested" },
+ { EXT4_ENCRYPT_FL, "E", "Encrypted" },
+ { EXT3_JOURNAL_DATA_FL, "j", "Journaled_Data" },
+ { EXT2_INDEX_FL, "I", "Indexed_directory" },
+ { EXT2_NOTAIL_FL, "t", "No_Tailmerging" },
+ { EXT2_TOPDIR_FL, "T", "Top_of_Directory_Hierarchies" },
+ { EXT4_EXTENTS_FL, "e", "Extents" },
+ { FS_NOCOW_FL, "C", "No_COW" },
+ { FS_DAX_FL, "x", "DAX" },
+ { EXT4_CASEFOLD_FL, "F", "Casefold" },
+ { EXT4_INLINE_DATA_FL, "N", "Inline_Data" },
+ { EXT4_PROJINHERIT_FL, "P", "Project_Hierarchy" },
+ { EXT4_VERITY_FL, "V", "Verity" },
+ { EXT2_NOCOMPR_FL, "m", "Dont_Compress" },
+ { 0, NULL, NULL }
+};
+
+void print_flags (FILE * f, unsigned long flags, unsigned options)
+{
+ int long_opt = (options & PFOPT_LONG);
+ struct flags_name *fp;
+ int first = 1;
+
+ for (fp = flags_array; fp->flag != 0; fp++) {
+ if (flags & fp->flag) {
+ if (long_opt) {
+ if (first)
+ first = 0;
+ else
+ fputs(", ", f);
+ fputs(fp->long_name, f);
+ } else
+ fputs(fp->short_name, f);
+ } else {
+ if (!long_opt)
+ fputs("-", f);
+ }
+ }
+ if (long_opt && first)
+ fputs("---", f);
+}
diff --git a/lib/e2p/project.h b/lib/e2p/project.h
new file mode 100644
index 0000000..253425a
--- /dev/null
+++ b/lib/e2p/project.h
@@ -0,0 +1,27 @@
+/*
+ * project.h
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include <ext2fs/ext2_fs.h>
+
+#if defined(__linux__) && !defined(FS_IOC_FSGETXATTR)
+#define FS_IOC_FSGETXATTR _IOR('X', 31, struct fsxattr)
+#define FS_IOC_FSSETXATTR _IOW('X', 32, struct fsxattr)
+
+/*
+ * Structure for FS_IOC_FSGETXATTR and FS_IOC_FSSETXATTR.
+ */
+struct fsxattr {
+ __u32 fsx_xflags; /* xflags field value (get/set) */
+ __u32 fsx_extsize; /* extsize field value (get/set)*/
+ __u32 fsx_nextents; /* nextents field value (get) */
+ __u32 fsx_projid; /* project identifier (get/set) */
+ unsigned char fsx_pad[12];
+};
+#endif
+
diff --git a/lib/e2p/ps.c b/lib/e2p/ps.c
new file mode 100644
index 0000000..757f8a6
--- /dev/null
+++ b/lib/e2p/ps.c
@@ -0,0 +1,32 @@
+/*
+ * ps.c - Print filesystem state
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/12/22 - Creation
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "e2p.h"
+
+void print_fs_state (FILE * f, unsigned short state)
+{
+ if (state & EXT2_VALID_FS)
+ fprintf (f, " clean");
+ else
+ fprintf (f, " not clean");
+ if (state & EXT2_ERROR_FS)
+ fprintf (f, " with errors");
+}
diff --git a/lib/e2p/setflags.c b/lib/e2p/setflags.c
new file mode 100644
index 0000000..0f6a3e0
--- /dev/null
+++ b/lib/e2p/setflags.c
@@ -0,0 +1,77 @@
+/*
+ * setflags.c - Set a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if HAVE_EXT2_IOCTLS
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+/*
+ * Deal with lame glibc's that define this function without actually
+ * implementing it. Can you say "attractive nuisance", boys and girls?
+ * I knew you could!
+ */
+#ifdef __linux__
+#undef HAVE_CHFLAGS
+#endif
+
+int setflags (int fd, unsigned long flags)
+{
+#if HAVE_CHFLAGS
+ unsigned long bsd_flags = 0;
+
+#ifdef UF_IMMUTABLE
+ if (flags & EXT2_IMMUTABLE_FL)
+ bsd_flags |= UF_IMMUTABLE;
+#endif
+#ifdef UF_APPEND
+ if (flags & EXT2_APPEND_FL)
+ bsd_flags |= UF_APPEND;
+#endif
+#ifdef UF_NODUMP
+ if (flags & EXT2_NODUMP_FL)
+ bsd_flags |= UF_NODUMP;
+#endif
+
+ return fchflags (fd, bsd_flags);
+#else /* ! HAVE_CHFLAGS */
+#if HAVE_EXT2_IOCTLS
+ struct stat buf;
+ int f;
+
+ if (!fstat(fd, &buf) &&
+ !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+ f = (int) flags;
+
+ return ioctl(fd, EXT2_IOC_SETFLAGS, &f);
+#else
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* HAVE_EXT2_IOCTLS */
+#endif /* HAVE_CHFLAGS */
+}
diff --git a/lib/e2p/setversion.c b/lib/e2p/setversion.c
new file mode 100644
index 0000000..dd4a3f0
--- /dev/null
+++ b/lib/e2p/setversion.c
@@ -0,0 +1,40 @@
+/*
+ * setversion.c - Set a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#include "config.h"
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+int setversion (int fd, unsigned long version)
+{
+#if HAVE_EXT2_IOCTLS
+ int ver;
+
+ ver = (int) version;
+ return ioctl (fd, EXT2_IOC_SETVERSION, &ver);
+#else /* ! HAVE_EXT2_IOCTLS */
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
diff --git a/lib/e2p/uuid.c b/lib/e2p/uuid.c
new file mode 100644
index 0000000..a102092
--- /dev/null
+++ b/lib/e2p/uuid.c
@@ -0,0 +1,85 @@
+/*
+ * uuid.c -- utility routines for manipulating UUID's.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <ext2fs/ext2_types.h>
+
+#include "e2p.h"
+
+struct uuid {
+ __u32 time_low;
+ __u16 time_mid;
+ __u16 time_hi_and_version;
+ __u16 clock_seq;
+ __u8 node[6];
+};
+
+/* Returns 1 if the uuid is the NULL uuid */
+int e2p_is_null_uuid(void *uu)
+{
+ __u8 *cp;
+ int i;
+
+ for (i=0, cp = uu; i < 16; i++)
+ if (*cp++)
+ return 0;
+ return 1;
+}
+
+static void e2p_unpack_uuid(void *in, struct uuid *uu)
+{
+ __u8 *ptr = in;
+ __u32 tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_low = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_mid = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_hi_and_version = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->clock_seq = tmp;
+
+ memcpy(uu->node, ptr, 6);
+}
+
+void e2p_uuid_to_str(void *uu, char *out)
+{
+ struct uuid uuid;
+
+ e2p_unpack_uuid(uu, &uuid);
+ sprintf(out,
+ "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
+ uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
+ uuid.node[0], uuid.node[1], uuid.node[2],
+ uuid.node[3], uuid.node[4], uuid.node[5]);
+}
+
+const char *e2p_uuid2str(void *uu)
+{
+ static char buf[80];
+
+ if (e2p_is_null_uuid(uu))
+ return "<none>";
+ e2p_uuid_to_str(uu, buf);
+ return buf;
+}
+
diff --git a/lib/et/Android.bp b/lib/et/Android.bp
new file mode 100644
index 0000000..565feb5
--- /dev/null
+++ b/lib/et/Android.bp
@@ -0,0 +1,40 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-0BSD
+ // SPDX-license-identifier-BSD
+ // SPDX-license-identifier-GPL-2.0
+ // SPDX-license-identifier-MIT
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library {
+ name: "libext2_com_err",
+ host_supported: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "error_message.c",
+ "et_name.c",
+ "init_et.c",
+ "com_err.c",
+ "com_right.c",
+ ],
+
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+}
diff --git a/lib/et/Makefile.in b/lib/et/Makefile.in
new file mode 100644
index 0000000..d411f23
--- /dev/null
+++ b/lib/et/Makefile.in
@@ -0,0 +1,185 @@
+#
+# Makefile for lib/et
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/et
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+DEP_MAKEFILE = $(DEP_LIB_MAKEFILES)
+
+@MCONFIG@
+
+all:: compile_et com_err.pc
+
+OBJS= error_message.o et_name.o init_et.o com_err.o com_right.o
+SRCS = $(srcdir)/error_message.c $(srcdir)/et_name.c $(srcdir)/init_et.c \
+ $(srcdir)/com_err.c $(srcdir)/com_right.c
+
+HFILES= com_err.h
+SHARE_FILES= et_c.awk et_h.awk
+
+LIBRARY= libcom_err
+LIBDIR= et
+
+ELF_VERSION = 2.1
+ELF_SO_VERSION = 2
+ELF_IMAGE = libcom_err
+ELF_MYDIR = et
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS = @SEM_INIT_LIB@
+
+BSDLIB_VERSION = 1.1
+BSDLIB_IMAGE = libcom_err
+BSDLIB_MYDIR = et
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+#
+# what to build...
+#
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
+@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_ELF@
+@MAKEFILE_BSDLIB@
+@MAKEFILE_PROFILE@
+
+compile_et: $(DEP_SUBSTITUTE) $(srcdir)/compile_et.sh.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE) $(srcdir)/compile_et.sh.in compile_et
+ $(Q) $(CHMOD) +x compile_et
+
+DVI=texi2dvi
+DVIPS=dvips -o "$@"
+INFO=@MAKEINFO@
+HTML=makeinfo --html --no-split
+PS2PDF=ps2pdf
+
+com_err.ps : com_err.dvi
+com_err.dvi: com_err.texinfo
+
+com_err.info: $(srcdir)/com_err.texinfo
+ $(E) " MAKEINFO $@"
+ -$(Q) $(INFO) $(srcdir)/com_err.texinfo
+
+com_err.dvi: $(srcdir)/com_err.texinfo
+ $(E) " TEXI2DVI $@"
+ -$(Q) $(DVI) $(srcdir)/com_err.texinfo
+
+com_err.ps: com_err.dvi
+ $(E) " DVIPS $@"
+ -$(Q) $(DVIPS) com_err.dvi
+
+com_err.pdf: com_err.ps
+ $(E) " PS2PDF $@"
+ -$(Q) $(PS2PDF) com_err.ps
+
+com_err.html: $(srcdir)/com_err.texinfo
+ $(E) " MAKEINFO $@"
+ -$(Q) $(HTML) $(srcdir)/com_err.texinfo
+
+com_err.pc: $(srcdir)/com_err.pc.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); CONFIG_FILES=lib/et/com_err.pc ./config.status
+
+#libcom_err.o: $(LIBOBJS)
+# $(LD) -r -s -o libcom_err.o $(LIBOBJS)
+# chmod -x libcom_err.o
+
+TAGS: $(SRCS)
+ $(TAGS) $(SRCS)
+
+installdirs::
+ $(E) " MKDIR_P $(libdir) $(includedir)/et $(datadir)/et $(bindir) $(man1dir) $(man3dir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et \
+ $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) \
+ $(DESTDIR)$(man3dir) $(DESTDIR)$(pkgconfigdir)
+
+install:: compile_et libcom_err.a $(HFILES) installdirs com_err.pc
+ $(E) " INSTALL_DATA $(libdir)/libcom_err.a"
+ $(Q) $(INSTALL_DATA) libcom_err.a $(DESTDIR)$(libdir)/libcom_err.a
+ -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libcom_err.a
+ $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libcom_err.a
+ $(Q) for i in $(HFILES); do \
+ echo " INSTALL_DATA $(includedir)/et/$$i"; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/et/$$i; \
+ done
+ $(Q) (cd $(DESTDIR)$(includedir) ;\
+ $(LN) $(LINK_INSTALL_FLAGS) et/com_err.h . )
+ $(Q) for i in $(SHARE_FILES); do \
+ echo " INSTALL_DATA $(datadir)/et/$$i"; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/et/$$i; \
+ done
+ $(E) " INSTALL_SCRIPT $(bindir)/compile_et"
+ $(Q) $(INSTALL_SCRIPT) compile_et $(DESTDIR)$(bindir)/compile_et
+ $(E) " INSTALL_DATA $(man3dir)/com_err.3"
+ $(Q) $(INSTALL_DATA) $(srcdir)/com_err.3 $(DESTDIR)$(man3dir)/com_err.3
+ $(E) " INSTALL_DATA $(man1dir)/compile_et.1"
+ $(Q) $(INSTALL_DATA) $(srcdir)/compile_et.1 \
+ $(DESTDIR)$(man1dir)/compile_et.1
+ $(E) " INSTALL_DATA $(pkgconfigdir)/com_err.pc"
+ $(Q) $(INSTALL_DATA) com_err.pc $(DESTDIR)$(pkgconfigdir)/com_err.pc
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libcom_err.a \
+ $(DESTDIR)$(bindir)/compile_et \
+ $(DESTDIR)$(pkgconfigdir)/com_err.pc
+ $(RM) -rf $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et
+
+fullcheck check:: compile_et
+ for i in $(srcdir)/test_cases/*.et ; do \
+ t=`basename $$i | sed -e 's/.et//'`; \
+ _ET_DIR_OVERRIDE=$(srcdir) ./compile_et $$i ; \
+ diff -c $(srcdir)/test_cases/$$t.c $$t.c > $$t.failed; \
+ if [ $$? -ne 0 ]; then echo Test case $$t failed; exit 1 ; fi ; \
+ diff -c $(srcdir)/test_cases/$$t.h $$t.h >> $$t.failed; \
+ if [ $$? -ne 0 ]; then echo Test case $$t failed; exit 1 ; fi ; \
+ $(RM) -f $$t.c $$t.h $$t.failed; \
+ echo "Test case $$t succeeded" ; \
+ done
+
+clean::
+ $(RM) -f compile_et libcom_err.a libcom_err_p.a com_err.info
+ $(RM) -f $(OBJS) profiled/*
+ $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.ps TAGS *.ln \
+ *.html *.cp *.fn *.fns *.ky *.log *.pc *.pg *.toc *.tp *.vr \
+ *.pdf
+ $(RM) -f ../libcom_err.a ../libcom_err_p.a
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile com_err.pc \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+$(OBJS): subdirs
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+error_message.o: $(srcdir)/error_message.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h \
+ $(srcdir)/internal.h
+et_name.o: $(srcdir)/et_name.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h \
+ $(srcdir)/internal.h
+init_et.o: $(srcdir)/init_et.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h
+com_err.o: $(srcdir)/com_err.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h \
+ $(srcdir)/internal.h
+com_right.o: $(srcdir)/com_right.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h
diff --git a/lib/et/com_err.3 b/lib/et/com_err.3
new file mode 100644
index 0000000..5a25f09
--- /dev/null
+++ b/lib/et/com_err.3
@@ -0,0 +1,87 @@
+.\" Copyright (c) 1988 Massachusetts Institute of Technology,
+.\" Student Information Processing Board.
+.\"
+.TH COM_ERR 3 "22 Nov 1988" SIPB
+.SH NAME
+com_err \- common error display routine
+.SH SYNOPSIS
+.nf
+ #include <et/com_err.h>
+void (*\fIproc\fR) (const char *, long, const char *, va_list);
+.PP
+void com_err (const char *whoami, long code, const char *format, ...);
+.PP
+proc = set_com_err_hook (proc);
+.PP
+proc = reset_com_err_hook ();
+.PP
+void initialize_XXXX_error_table ();
+.fi
+.SH DESCRIPTION
+.I Com_err
+displays an error message on the standard error stream
+.I stderr
+(see
+.IR stdio (3S))
+composed of the
+.I whoami
+string, which should specify the program name or some subportion of
+a program, followed by an error message generated from the
+.I code
+value (derived from
+.IR compile_et (1)),
+and a string produced using the
+.I format
+string and any following arguments, in the same style as
+.IR fprintf (3).
+
+The behavior of
+.I com_err
+can be modified using
+.I set_com_err_hook;
+this defines a procedure which is called with the arguments passed to
+.I com_err,
+instead of the default internal procedure which sends the formatted
+text to error output. Thus the error messages from a program can all
+easily be diverted to another form of diagnostic logging, such as
+.IR syslog (3).
+.I Reset_com_err_hook
+may be used to restore the behavior of
+.I com_err
+to its default form. Both procedures return the previous ``hook''
+value. These ``hook'' procedures must have the declaration given for
+.I proc
+above in the synopsis.
+
+The
+.I initialize_XXXX_error_table
+routine is generated mechanically by
+.IR compile_et (1)
+from a source file containing names and associated strings. Each
+table has a name of up to four characters, which is used in place of
+the
+.B XXXX
+in the name of the routine. These routines should be called before
+any of the corresponding error codes are used, so that the
+.I com_err
+library will recognize error codes from these tables when they are
+used.
+
+The
+.B com_err.h
+header file should be included in any source file that uses routines
+from the
+.I com_err
+library; executable files must be linked using
+.I ``-lcom_err''
+in order to cause the
+.I com_err
+library to be included.
+
+.\" .IR for manual entries
+.\" .PP for paragraph breaks
+
+.SH "SEE ALSO"
+compile_et (1), syslog (3).
+
+Ken Raeburn, "A Common Error Description Library for UNIX".
diff --git a/lib/et/com_err.c b/lib/et/com_err.c
new file mode 100644
index 0000000..7294c6d
--- /dev/null
+++ b/lib/et/com_err.c
@@ -0,0 +1,105 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board.
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include "com_err.h"
+#include "error_table.h"
+#include "internal.h"
+
+static void
+default_com_err_proc (const char *whoami, errcode_t code, const
+ char *fmt, va_list args)
+ COM_ERR_ATTR((format(printf, 3, 0)));
+
+static void
+default_com_err_proc (const char *whoami, errcode_t code, const
+ char *fmt, va_list args)
+{
+ int do_cr = 1, fd = fileno(stderr);
+
+ if (whoami) {
+ fputs(whoami, stderr);
+ fputs(": ", stderr);
+ }
+ if (code) {
+ fputs(error_message(code), stderr);
+ fputs(" ", stderr);
+ }
+ if (fmt) {
+ vfprintf (stderr, fmt, args);
+ }
+ if (!isatty(fd))
+ do_cr = 0;
+#ifdef HAVE_TERMIOS_H
+ else {
+ struct termios t;
+
+ if ((tcgetattr(fd, &t)) == 0 &&
+ (t.c_oflag & OPOST) && (t.c_oflag & ONLCR))
+ do_cr = 0;
+ }
+#endif
+ if (do_cr)
+ fputc('\r', stderr);
+ fputc('\n', stderr);
+ fflush(stderr);
+}
+
+typedef void (*errf) (const char *, errcode_t, const char *, va_list)
+ COM_ERR_ATTR((format(printf, 3, 0)));
+
+errf com_err_hook = default_com_err_proc;
+
+void com_err_va (const char *whoami, errcode_t code, const char *fmt,
+ va_list args)
+{
+ (*com_err_hook) (whoami, code, fmt, args);
+}
+
+void com_err (const char *whoami,
+ errcode_t code,
+ const char *fmt, ...)
+{
+ va_list pvar;
+
+ if (!com_err_hook)
+ com_err_hook = default_com_err_proc;
+ va_start(pvar, fmt);
+ com_err_va (whoami, code, fmt, pvar);
+ va_end(pvar);
+}
+
+errf set_com_err_hook(errf new_proc)
+{
+ errf x = com_err_hook;
+
+ if (new_proc)
+ com_err_hook = new_proc;
+ else
+ com_err_hook = default_com_err_proc;
+
+ return x;
+}
+
+errf reset_com_err_hook(void) {
+ errf x = com_err_hook;
+ com_err_hook = default_com_err_proc;
+ return x;
+}
diff --git a/lib/et/com_err.h b/lib/et/com_err.h
new file mode 100644
index 0000000..27a36ea
--- /dev/null
+++ b/lib/et/com_err.h
@@ -0,0 +1,68 @@
+/*
+ * Header file for common error description library.
+ *
+ * Copyright 1988, Student Information Processing Board of the
+ * Massachusetts Institute of Technology.
+ *
+ * For copyright and distribution info, see the documentation supplied
+ * with this package.
+ */
+
+#if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__)
+
+#ifdef __GNUC__
+#define COM_ERR_ATTR(x) __attribute__(x)
+#else
+#define COM_ERR_ATTR(x)
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+
+typedef long errcode_t;
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list;
+
+extern void com_err (const char *, long, const char *, ...)
+ COM_ERR_ATTR((format(printf, 3, 4)));
+
+extern void com_err_va (const char *whoami, errcode_t code, const char *fmt,
+ va_list args)
+ COM_ERR_ATTR((format(printf, 3, 0)));
+
+extern char const *error_message (long);
+extern void (*com_err_hook) (const char *, long, const char *, va_list);
+extern void (*set_com_err_hook (void (*) (const char *, long,
+ const char *, va_list)))
+ (const char *, long, const char *, va_list);
+extern void (*reset_com_err_hook (void)) (const char *, long,
+ const char *, va_list);
+extern int init_error_table(const char * const *msgs, long base, int count);
+extern char *(*set_com_err_gettext (char *(*) (const char *)))
+ (const char *);
+
+extern errcode_t add_error_table(const struct error_table * et);
+extern errcode_t remove_error_table(const struct error_table * et);
+extern void add_to_error_table(struct et_list *new_table);
+
+/* Provided for Heimdall compatibility */
+extern const char *com_right(struct et_list *list, long code);
+extern const char *com_right_r(struct et_list *list, long code, char *str, size_t len);
+extern void initialize_error_table_r(struct et_list **list,
+ const char **messages,
+ int num_errors,
+ long base);
+extern void free_error_table(struct et_list *et);
+
+/* Provided for compatibility with other com_err libraries */
+extern int et_list_lock(void);
+extern int et_list_unlock(void);
+
+#define __COM_ERR_H
+#define __COM_ERR_H__
+#endif /* !defined(__COM_ERR_H) && !defined(__COM_ERR_H__)*/
diff --git a/lib/et/com_err.pc.in b/lib/et/com_err.pc.in
new file mode 100644
index 0000000..86df8a2
--- /dev/null
+++ b/lib/et/com_err.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: com_err
+Description: Common error description library
+Version: @E2FSPROGS_VERSION@
+Requires:
+Cflags: -I${includedir}/et -I${includedir}
+Libs: -L${libdir} -lcom_err
+Libs.private: @SEM_INIT_LIB@
diff --git a/lib/et/com_err.texinfo b/lib/et/com_err.texinfo
new file mode 100644
index 0000000..3e7ae32
--- /dev/null
+++ b/lib/et/com_err.texinfo
@@ -0,0 +1,532 @@
+\input texinfo @c -*-texinfo-*-
+
+@c $Header$
+@c $Source$
+@c $Locker$
+
+@c Note that although this source file is in texinfo format (more
+@c or less), it is not yet suitable for turning into an ``info''
+@c file. Sorry, maybe next time.
+@c
+@c In order to produce hardcopy documentation from a texinfo file,
+@c run ``tex com_err.texinfo'' which will load in texinfo.tex,
+@c provided in this distribution. (texinfo.tex is from the Free
+@c Software Foundation, and is under different copyright restrictions
+@c from the rest of this package.)
+
+@setfilename com_err.info
+@settitle A Common Error Description Library for UNIX
+
+@ifinfo
+@dircategory Development
+@direntry
+* Com_err: (com_err). A Common Error Description Library for UNIX.
+@end direntry
+@end ifinfo
+
+@c smallbook
+
+@iftex
+@finalout
+@end iftex
+
+@ifinfo
+This file documents the use of the Common Error Description library.
+
+Copyright (C) 1987, 1988 Student Information Processing Board of the
+Massachusetts Institute of Technology.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
+used in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B.
+make no representations about the suitability of this software for any
+purpose. It is provided "as is" without express or implied warranty.
+
+Note that the file texinfo.tex, provided with this distribution, is from
+the Free Software Foundation, and is under different copyright restrictions
+from the remainder of this package.
+
+@ignore
+Permission is granted to process this file through Tex and print the
+results, provided the printed document carries copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+
+@end ignore
+@end ifinfo
+
+@setchapternewpage odd
+
+@titlepage
+@center @titlefont{A Common Error Description}
+@center @titlefont{Library for UNIX}
+@sp 2
+@center Ken Raeburn
+@center Bill Sommerfeld
+@sp 1
+@center MIT Student Information Processing Board
+@sp 3
+@center last updated 1 January 1989
+@center for version 1.2
+@center ***DRAFT COPY ONLY***
+
+@vskip 2in
+
+@center @b{Abstract}
+
+UNIX has always had a clean and simple system call interface, with a
+standard set of error codes passed between the kernel and user
+programs. Unfortunately, the same cannot be said of many of the
+libraries layered on top of the primitives provided by the kernel.
+Typically, each one has used a different style of indicating errors to
+their callers, leading to a total hodgepodge of error handling, and
+considerable amounts of work for the programmer. This paper describes
+a library and associated utilities which allows a more uniform way for
+libraries to return errors to their callers, and for programs to
+describe errors and exceptional conditions to their users.
+
+@page
+@vskip 0pt plus 1filll
+
+Copyright @copyright{} 1987, 1988 by the Student Information Processing
+Board of the Massachusetts Institute of Technology.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
+used in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B.
+make no representations about the suitability of this software for any
+purpose. It is provided "as is" without express or implied warranty.
+
+Note that the file texinfo.tex, provided with this distribution, is from
+the Free Software Foundation, and is under different copyright restrictions
+from the remainder of this package.
+
+@end titlepage
+
+@node Top, Why com_err?, (dir), (dir)
+
+@top A Common Error Description Library for UNIX
+
+This manual documents the com_err library.
+
+@menu
+* Why com_err?::
+* Error codes::
+* Error table source file::
+* The error-table compiler::
+* Run-time support routines::
+* Coding Conventions::
+* Building and Installation::
+* Bug Reports::
+* Acknowledgements::
+@end menu
+
+@page
+
+@node Why com_err?, Error codes, Top, Top
+@chapter Why com_err?
+
+In building application software packages, a programmer often has to
+deal with a number of libraries, each of which can use a different
+error-reporting mechanism. Sometimes one of two values is returned,
+indicating simply SUCCESS or FAILURE, with no description of errors
+encountered. Sometimes it is an index into a table of text strings,
+where the name of the table used is dependent on the library being
+used when the error is generated; since each table starts numbering at
+0 or 1, additional information as to the source of the error code is
+needed to determine which table to look at. Sometimes no text messages are
+supplied at all, and the programmer must supply them at any point at which
+he may wish to report error conditions.
+Often, a global variable is assigned some value describing the error, but
+the programmer has to know in each case whether to look at @code{errno},
+@code{h_errno}, the return value from @code{hes_err()}, or whatever other
+variables or routines are specified.
+And what happens if something
+in the procedure of
+examining or reporting the error changes the same variable?
+
+The package we have developed is an attempt to present a common
+error-handling mechanism to manipulate the most common form of error code
+in a fashion that does not have the problems listed above.
+
+A list of up to 256 text messages is supplied to a translator we have
+written, along with the three- to four-character ``name'' of the error
+table. The library using this error table need only call a routine
+generated from this error-table source to make the table ``known'' to the
+com_err library, and any error code the library generates can be converted
+to the corresponding error message. There is also a default format for
+error codes accidentally returned before making the table known, which is
+of the form @samp{unknown code foo 32}, where @samp{foo} would be the name
+of the table.
+
+@node Error codes, Error table source file, Why com_err?, Top
+@chapter Error codes
+
+Error codes themselves are 32 bit (signed) integers, of which the high
+order 24 bits are an identifier of which error table the error code is
+from, and the low order 8 bits are a sequential error number within
+the table. An error code may thus be easily decomposed into its component
+parts. Only the lowest 32 bits of an error code are considered significant
+on systems which support wider values.
+
+Error table 0 is defined to match the UNIX system call error table
+(@code{sys_errlist}); this allows @code{errno} values to be used directly
+in the library (assuming that @code{errno} is of a type with the same width
+as @t{long}). Other error table numbers are formed by compacting together
+the first four characters of the error table name. The mapping between
+characters in the name and numeric values in the error code are defined in
+a system-independent fashion, so that two systems that can pass integral
+values between them can reliably pass error codes without loss of meaning;
+this should work even if the character sets used are not the same.
+(However, if this is to be done, error table 0 should be avoided, since the
+local system call error tables may differ.)
+
+Any variable which is to contain an error code should be declared @t{long}.
+The draft proposed American National Standard for C (as of May, 1988)
+requires that @t{long} variables be at least 32 bits; any system which does
+not support 32-bit @t{long} values cannot make use of this package (nor
+much other software that assumes an ANSI-C environment base) without
+significant effort.
+
+@node Error table source file, The error-table compiler, Error codes, Top
+@chapter Error table source file
+
+The error table source file begins with the declaration of the table name,
+as
+
+@example
+error_table @var{tablename}
+@end example
+
+Individual error codes are
+specified with
+
+@example
+error_code @var{ERROR_NAME}, @var{"text message"}
+@end example
+
+where @samp{ec} can also be used as a short form of @samp{error_code}. To
+indicate the end of the table, use @samp{end}. Thus, a (short) sample
+error table might be:
+
+@example
+
+ error_table dsc
+
+ error_code DSC_DUP_MTG_NAME,
+ "Meeting already exists"
+
+ ec DSC_BAD_PATH,
+ "A bad meeting pathname was given"
+
+ ec DSC_BAD_MODES,
+ "Invalid mode for this access control list"
+
+ end
+
+@end example
+
+@node The error-table compiler, Run-time support routines, Error table source file, Top
+@chapter The error-table compiler
+
+The error table compiler is named @code{compile_et}. It takes one
+argument, the pathname of a file (ending in @samp{.et}, e.g.,
+@samp{dsc_err.et}) containing an error table source file. It parses the
+error table, and generates two output files -- a C header file
+(@samp{discuss_err.h}) which contains definitions of the numerical values
+of the error codes defined in the error table, and a C source file which
+should be compiled and linked with the executable. The header file must be
+included in the source of a module which wishes to reference the error
+codes defined; the object module generated from the C code may be linked in
+to a program which wishes to use the printed forms of the error codes.
+
+@node Run-time support routines, Coding Conventions, The error-table compiler, Top
+@chapter Run-time support routines
+
+Any source file which uses the routines supplied with or produced by the
+com_err package should include the header file @file{<com_err.h>}. It
+contains declarations and definitions which may be needed on some systems.
+(Some functions cannot be referenced properly without the return type
+declarations in this file. Some functions may work properly on most
+architectures even without the header file, but relying on this is not
+recommended.)
+
+The run-time support routines and variables provided via this package
+include the following:
+
+@example
+void initialize_@var{xxxx}_error_table (void);
+@end example
+
+One of these routines is built by the error compiler for each error table.
+It makes the @var{xxxx} error table ``known'' to the error reporting
+system. By convention, this routine should be called in the initialization
+routine of the @var{xxxx} library. If the library has no initialization
+routine, some combination of routines which form the core of the library
+should ensure that this routine is called. It is not advised to leave it
+the caller to make this call.
+
+There is no harm in calling this routine more than once.
+
+@example
+#define ERROR_TABLE_BASE_@var{xxxx} @var{nnnnn}L
+@end example
+
+This symbol contains the value of the first error code entry in the
+specified table.
+This rarely needs be used by the
+programmer.
+
+@deftypefun const char *error_message (long @var{code});
+
+This routine returns the character string error message associated
+with @code{code}; if this is associated with an unknown error table, or
+if the code is associated with a known error table but the code is not
+in the table, a string of the form @samp{Unknown code @var{xxxx nn}} is
+returned, where @var{xxxx} is the error table name produced by
+reversing the compaction performed on the error table number implied
+by that error code, and @var{nn} is the offset from that base value.
+
+Although this routine is available for use when needed, its use should be
+left to circumstances which render @code{com_err} (below) unusable.
+
+@end deftypefun
+
+@deftypefun void com_err (const char *@var{whoami}, long @var{error_code}, const char *@var{format}, ...);
+
+This routine provides an alternate way to print error messages to
+standard error; it allows the error message to be passed in as a
+parameter, rather than in an external variable. @emph{Provide grammatical
+context for ``message.''}
+
+The module reporting the error should be passed in via @var{whoami}.
+If @var{format} is @code{(char *)NULL}, the formatted message will not be
+printed. @var{format} may not be omitted.
+
+@end deftypefun
+
+@deftypefun void com_err_va (const char *@var{whoami}, long @var{error_code}, const char *@var{format}, va_list @var{args});
+
+This routine provides an interface, equivalent to @code{com_err} above,
+which may be used by higher-level variadic functions (functions which
+accept variable numbers of arguments).
+
+@end deftypefun
+
+@deftypefun void *set_com_err_hook (void (*@var{proc}) (const char *@var{whoami}, long @var{error_code}, va_list @var{args}) (const char *@var{whoami}, long @var{error_code}, va_list @var{args}));
+
+@deftypefunx void reset_com_err_hook ();
+
+These two routines allow a routine to be dynamically substituted for
+@samp{com_err}. After @samp{set_com_err_hook} has been called,
+calls to @samp{com_err} will turn into calls to the new hook routine.
+@samp{reset_com_err_hook} turns off this hook. This may intended to
+be used in daemons (to use a routine which calls @cite{syslog(3)}), or
+in a window system application (which could pop up a dialogue box).
+
+If a program is to be used in an environment in which simply printing
+messages to the @code{stderr} stream would be inappropriate (such as in a
+daemon program which runs without a terminal attached),
+@code{set_com_err_hook} may be used to redirect output from @code{com_err}.
+The following is an example of an error handler which uses @cite{syslog(3)}
+as supplied in BSD 4.3:
+
+@example
+#include <stdio.h>
+#include <stdarg.h>
+#include <syslog.h>
+
+/* extern openlog (const char * name, int logopt, int facility); */
+/* extern syslog (int priority, char * message, ...); */
+
+void hook (const char * whoami, long code,
+ const char * format, va_list args)
+@{
+ char buffer[BUFSIZ];
+ static int initialized = 0;
+ if (!initialized) @{
+ openlog (whoami,
+ LOG_NOWAIT|LOG_CONS|LOG_PID|LOG_NDELAY,
+ LOG_DAEMON);
+ initialized = 1;
+ @}
+ vsprintf (buffer, format, args);
+ syslog (LOG_ERR, "%s %s", error_message (code), buffer);
+@}
+@end example
+
+After making the call
+@code{set_com_err_hook (hook);},
+any calls to @code{com_err} will result in messages being sent to the
+@var{syslogd} daemon for logging.
+The name of the program, @samp{whoami}, is supplied to the
+@samp{openlog()} call, and the message is formatted into a buffer and
+passed to @code{syslog}.
+
+Note that since the extra arguments to @code{com_err} are passed by
+reference via the @code{va_list} value @code{args}, the hook routine may
+place any form of interpretation on them, including ignoring them. For
+consistency, @code{printf}-style interpretation is suggested, via
+@code{vsprintf} (or @code{_doprnt} on BSD systems without full support for
+the ANSI C library).
+
+@end deftypefun
+
+@node Coding Conventions, Building and Installation, Run-time support routines, Top
+@chapter Coding Conventions
+
+The following conventions are just some general stylistic conventions
+to follow when writing robust libraries and programs. Conventions
+similar to this are generally followed inside the UNIX kernel and most
+routines in the Multics operating system. In general, a routine
+either succeeds (returning a zero error code, and doing some side
+effects in the process), or it fails, doing minimal side effects; in
+any event, any invariant which the library assumes must be maintained.
+
+In general, it is not in the domain of non user-interface library
+routines to write error messages to the user's terminal, or halt the
+process. Such forms of ``error handling'' should be reserved for
+failures of internal invariants and consistency checks only, as it
+provides the user of the library no way to clean up for himself in the
+event of total failure.
+
+Library routines which can fail should be set up to return an error
+code. This should usually be done as the return value of the
+function; if this is not acceptable, the routine should return a
+``null'' value, and put the error code into a parameter passed by
+reference.
+
+Routines which use the first style of interface can be used from
+user-interface levels of a program as follows:
+
+@example
+@{
+ if ((code = initialize_world(getuid(), random())) != 0) @{
+ com_err("demo", code,
+ "when trying to initialize world");
+ exit(1);
+ @}
+ if ((database = open_database("my_secrets", &code))==NULL) @{
+ com_err("demo", code,
+ "while opening my_secrets");
+ exit(1);
+ @}
+@}
+@end example
+
+A caller which fails to check the return status is in error. It is
+possible to look for code which ignores error returns by using lint;
+look for error messages of the form ``foobar returns value which is
+sometimes ignored'' or ``foobar returns value which is always
+ignored.''
+
+Since libraries may be built out of other libraries, it is often necessary
+for the success of one routine to depend on another. When a lower level
+routine returns an error code, the middle level routine has a few possible
+options. It can simply return the error code to its caller after doing
+some form of cleanup, it can substitute one of its own, or it can take
+corrective action of its own and continue normally. For instance, a
+library routine which makes a ``connect'' system call to make a network
+connection may reflect the system error code @code{ECONNREFUSED}
+(Connection refused) to its caller, or it may return a ``server not
+available, try again later,'' or it may try a different server.
+
+Cleanup which is typically necessary may include, but not be limited
+to, freeing allocated memory which will not be needed any more,
+unlocking concurrency locks, dropping reference counts, closing file
+descriptors, or otherwise undoing anything which the procedure did up
+to this point. When there are a lot of things which can go wrong, it
+is generally good to write one block of error-handling code which is
+branched to, using a goto, in the event of failure. A common source
+of errors in UNIX programs is failing to close file descriptors on
+error returns; this leaves a number of ``zombied'' file descriptors
+open, which eventually causes the process to run out of file
+descriptors and fall over.
+
+@example
+@{
+ FILE *f1=NULL, *f2=NULL, *f3=NULL;
+ int status = 0;
+
+ if ( (f1 = fopen(FILE1, "r")) == NULL) @{
+ status = errno;
+ goto error;
+ @}
+
+ /*
+ * Crunch for a while
+ */
+
+ if ( (f2 = fopen(FILE2, "w")) == NULL) @{
+ status = errno;
+ goto error;
+ @}
+
+ if ( (f3 = fopen(FILE3, "a+")) == NULL) @{
+ status = errno;
+ goto error;
+ @}
+
+ /*
+ * Do more processing.
+ */
+ fclose(f1);
+ fclose(f2);
+ fclose(f3);
+ return 0;
+
+error:
+ if (f1) fclose(f1);
+ if (f2) fclose(f2);
+ if (f3) fclose(f3);
+ return status;
+@}
+@end example
+
+@node Building and Installation, Bug Reports, Coding Conventions, Top
+@chapter Building and Installation
+
+The distribution of this package will probably be done as a compressed
+``tar''-format file available via anonymous FTP from SIPB.MIT.EDU.
+Retrieve @samp{pub/com_err.tar.Z} and extract the contents. A subdirectory
+@t{profiled} should be created to hold objects compiled for profiling.
+Running ``make all'' should then be sufficient to build the library and
+error-table compiler. The files @samp{libcom_err.a},
+@samp{libcom_err_p.a}, @samp{com_err.h}, and @samp{compile_et} should be
+installed for use; @samp{com_err.3} and @samp{compile_et.1} can also be
+installed as manual pages.
+
+@node Bug Reports, Acknowledgements, Building and Installation, Top
+@chapter Bug Reports
+
+The principal author of this library is: Ken
+Raeburn, @t{raeburn@@MIT.EDU}.
+
+This version of the com_err library is being maintained by Theodore
+Ts'o, and so bugs and comments should be sent to @t{tytso@@thunk.org}.
+
+
+@node Acknowledgements, , Bug Reports, Top
+@chapter Acknowledgements
+
+I would like to thank: Bill Sommerfeld, for his help with some of this
+documentation, and catching some of the bugs the first time around;
+Honeywell Information Systems, for not killing off the @emph{Multics}
+operating system before I had an opportunity to use it; Honeywell's
+customers, who persuaded them not to do so, for a while; Ted Anderson of
+CMU, for catching some problems before version 1.2 left the nest; Stan
+Zanarotti and several others of MIT's Student Information Processing Board,
+for getting us started with ``discuss,'' for which this package was
+originally written; and everyone I've talked into --- I mean, asked to read
+this document and the ``man'' pages.
+
+@contents
+@bye
diff --git a/lib/et/com_right.c b/lib/et/com_right.c
new file mode 100644
index 0000000..a4ed535
--- /dev/null
+++ b/lib/et/com_right.c
@@ -0,0 +1,120 @@
+/*
+ * com_right.c -- provide Heimdall / Kerberos4kth com_err interfaces
+ * for backwards compatibility
+ *
+ * Copyright (c) 2003 by Theodore Ts'o
+ *
+ * Taken from lib/com_err/error.c from Kerberos4kth distribution.
+ *
+ * Copyright (c) 1997, 1998, 2001 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the Institute nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "com_err.h"
+#include "error_table.h"
+
+const char *
+com_right(struct et_list *list, long code)
+{
+ struct et_list *p;
+ for (p = list; p; p = p->next) {
+ if (code >= p->table->base && code < p->table->base + p->table->n_msgs)
+ return p->table->msgs[code - p->table->base];
+ }
+ return NULL;
+}
+
+const char *
+com_right_r(struct et_list *list, long code, char *str, size_t len)
+{
+ struct et_list *p;
+ for (p = list; p; p = p->next) {
+ if ((code >= p->table->base) &&
+ (code < p->table->base + p->table->n_msgs)) {
+ strncpy(str, p->table->msgs[code - p->table->base], len);
+ str[len-1] = '\0';
+ return str;
+ }
+ }
+ return NULL;
+}
+
+struct foobar {
+ struct et_list etl;
+ struct error_table tab;
+};
+
+/*
+ * We provide this routine for compatibility with Heimdall generated
+ * foo_err.c files, but we don't use this ourselves for foo_err.c
+ * files generated by our compile_et. This is so our foo_err.c
+ * files can be used with older com_err libraries without running
+ * afoul of dependencies.
+ */
+void
+initialize_error_table_r(struct et_list **list,
+ const char **messages,
+ int num_errors,
+ long base)
+{
+ struct et_list *et, **end;
+ struct error_table *tab;
+ struct foobar *f;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == messages)
+ return;
+ f = malloc(sizeof(*f));
+ if (f == NULL)
+ return;
+ et = &f->etl;
+ et->table = tab = &f->tab;
+ tab->msgs = messages;
+ tab->n_msgs = num_errors;
+ tab->base = base;
+ et->next = NULL;
+ *end = et;
+}
+
+
+void
+free_error_table(struct et_list *et)
+{
+ while(et){
+ struct et_list *p = et;
+ et = et->next;
+ free(p);
+ }
+}
diff --git a/lib/et/compile_et.1 b/lib/et/compile_et.1
new file mode 100644
index 0000000..7219441
--- /dev/null
+++ b/lib/et/compile_et.1
@@ -0,0 +1,82 @@
+.\" Copyright (c) 1988 Massachusetts Institute of Technology,
+.\" Student Information Processing Board. All rights reserved.
+.\"
+.\" $Header$
+.\"
+.TH COMPILE_ET 1 "30 Mar 1998" SIPB
+.SH NAME
+compile_et \- error table compiler
+.SH SYNOPSIS
+.B compile_et
+file
+.SH DESCRIPTION
+.B Compile_et
+converts a table listing error-code names and associated messages into
+a C source file suitable for use with the
+.IR com_err (3)
+library.
+
+The source file name must end with a suffix of ``.et''; the file
+consists of a declaration supplying the name (up to four characters
+long) of the error-code table:
+
+.B error_table
+.I name
+
+followed by up to 256 entries of the form:
+
+.B error_code
+.I name,
+"
+.I string
+"
+
+and a final
+
+.B end
+
+to indicate the end of the table.
+
+The name of the table is used to construct the name of a subroutine
+.I initialize_XXXX_error_table
+which must be called in order for the
+.I com_err
+library to recognize the error table.
+
+The various error codes defined are assigned sequentially increasing
+numbers (starting with a large number computed as a hash function of
+the name of the table); thus for compatibility it is suggested that
+new codes be added only to the end of an existing table, and that no
+codes be removed from tables.
+
+The names defined in the table are placed into a C header file with
+preprocessor directives defining them as integer constants of up to
+32 bits in magnitude.
+
+A C source file is also generated which should be compiled and linked
+with the object files which reference these error codes; it contains
+the text of the messages and the initialization subroutine. Both C
+files have names derived from that of the original source file, with
+the ``.et'' suffix replaced by ``.c'' and ``.h''.
+
+A ``#'' in the source file is treated as a comment character, and all
+remaining text to the end of the source line will be ignored.
+
+.SH BUGS
+
+Since the original
+.B compile_et
+uses a very simple parser based on
+.IR yacc (1),
+and this current version of
+.B compile_et
+uses an awk/sed combination of scripts,
+its error recovery leaves much to be desired.
+
+.\" .IR for manual entries
+.\" .PP for paragraph breaks
+
+.SH "SEE ALSO"
+com_err (3).
+
+Ken Raeburn, "A Common Error Description Library for UNIX".
diff --git a/lib/et/compile_et.sh.in b/lib/et/compile_et.sh.in
new file mode 100644
index 0000000..3cba7c7
--- /dev/null
+++ b/lib/et/compile_et.sh.in
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+#
+
+AWK=@AWK@
+DIR=@datadir@/et
+
+if test "$1" = "--build-tree" ; then
+ shift;
+ DIR="$ET_DIR"
+fi
+
+if test "x$1" = x ; then
+ echo "Usage: compile_et file"
+ exit 1
+fi
+
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+if test -n "$_ET_DIR_OVERRIDE" ; then
+ DIR="$_ET_DIR_OVERRIDE";
+fi
+
+if test ! -f "$DIR/et_h.awk" || test ! -f "$DIR/et_c.awk" ; then
+ echo "compile_et: Couldn't find compile_et's template files."
+ exit 1
+fi
+
+ROOT=`echo $1 | sed -e s/.et$//`
+BASE=`basename $ROOT`
+
+if test ! -f "$ROOT.et" ; then
+ echo "compile_et: $ROOT.et: File not found"
+ exit 1;
+fi
+
+$AWK -f "${DIR}/et_h.awk" "outfile=${BASE}.h.$$" "outfn=${BASE}.h" "$ROOT.et"
+if test -f ${BASE}.h && cmp -s ${BASE}.h.$$ ${BASE}.h ; then
+ rm -f ${BASE}.h.$$
+else
+ mv -f ${BASE}.h.$$ ${BASE}.h
+ chmod a-w ${BASE}.h
+fi
+$AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c.$$" "outfn=${BASE}.c" "$ROOT.et"
+if test -f ${BASE}.c && cmp -s ${BASE}.c.$$ ${BASE}.c ; then
+ rm -f ${BASE}.c.$$
+else
+ mv -f ${BASE}.c.$$ ${BASE}.c
+ chmod a-w ${BASE}.c
+fi
diff --git a/lib/et/error_message.c b/lib/et/error_message.c
new file mode 100644
index 0000000..8b9474f
--- /dev/null
+++ b/lib/et/error_message.c
@@ -0,0 +1,355 @@
+/*
+ * $Header$
+ * $Source$
+ * $Locker$
+ *
+ * Copyright 1987 by the Student Information Processing Board
+ * of the Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#else
+#define PR_GET_DUMPABLE 3
+#endif
+#if (!defined(HAVE_PRCTL) && defined(linux))
+#include <sys/syscall.h>
+#endif
+#ifdef HAVE_SEMAPHORE_H
+#include <semaphore.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_FCNTL
+#include <fcntl.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include "com_err.h"
+#include "error_table.h"
+#include "internal.h"
+
+#ifdef TLS
+#define THREAD_LOCAL static TLS
+#else
+#define THREAD_LOCAL static
+#endif
+
+THREAD_LOCAL char buffer[25];
+
+struct et_list * _et_list = (struct et_list *) NULL;
+struct et_list * _et_dynamic_list = (struct et_list *) NULL;
+
+#ifdef __GNUC__
+#define COMERR_ATTR(x) __attribute__(x)
+#else
+#define COMERR_ATTR(x)
+#endif
+
+#ifdef HAVE_SEM_INIT
+static sem_t _et_lock;
+static int _et_lock_initialized;
+
+static void COMERR_ATTR((constructor)) setup_et_lock(void)
+{
+ sem_init(&_et_lock, 0, 1);
+ _et_lock_initialized = 1;
+}
+
+static void COMERR_ATTR((destructor)) fini_et_lock(void)
+{
+ sem_destroy(&_et_lock);
+ _et_lock_initialized = 0;
+}
+#endif
+
+
+int et_list_lock(void)
+{
+#ifdef HAVE_SEM_INIT
+ if (!_et_lock_initialized)
+ setup_et_lock();
+ return sem_wait(&_et_lock);
+#else
+ return 0;
+#endif
+}
+
+int et_list_unlock(void)
+{
+#ifdef HAVE_SEM_INIT
+ if (_et_lock_initialized)
+ return sem_post(&_et_lock);
+#endif
+ return 0;
+}
+
+typedef char *(*gettextf) (const char *);
+
+static gettextf com_err_gettext = NULL;
+
+gettextf set_com_err_gettext(gettextf new_proc)
+{
+ gettextf x = com_err_gettext;
+
+ com_err_gettext = new_proc;
+
+ return x;
+}
+
+#ifdef __GNU__
+#define SYS_ERR_BASE 0x40000000
+#else
+#define SYS_ERR_BASE 0
+#endif
+
+const char * error_message (errcode_t code)
+{
+ int offset;
+ struct et_list *et;
+ errcode_t table_num;
+ int started = 0;
+ char *cp;
+
+ offset = (int) (code & ((1<<ERRCODE_RANGE)-1));
+ table_num = code - offset;
+ if (table_num == SYS_ERR_BASE) {
+#ifdef HAS_SYS_ERRLIST
+ if (code < sys_nerr)
+ return(sys_errlist[code]);
+ else
+ goto oops;
+#else
+ cp = strerror(code);
+ if (cp)
+ return(cp);
+ else
+ goto oops;
+#endif
+ }
+ et_list_lock();
+ for (et = _et_list; et; et = et->next) {
+ if ((et->table->base & 0xffffffL) == (table_num & 0xffffffL)) {
+ /* This is the right table */
+ if (et->table->n_msgs <= offset) {
+ break;
+ } else {
+ const char *msg = et->table->msgs[offset];
+ et_list_unlock();
+ if (com_err_gettext)
+ return (*com_err_gettext)(msg);
+ else
+ return msg;
+ }
+ }
+ }
+ for (et = _et_dynamic_list; et; et = et->next) {
+ if ((et->table->base & 0xffffffL) == (table_num & 0xffffffL)) {
+ /* This is the right table */
+ if (et->table->n_msgs <= offset) {
+ break;
+ } else {
+ const char *msg = et->table->msgs[offset];
+ et_list_unlock();
+ if (com_err_gettext)
+ return (*com_err_gettext)(msg);
+ else
+ return msg;
+ }
+ }
+ }
+ et_list_unlock();
+oops:
+ strcpy (buffer, "Unknown code ");
+ if (table_num) {
+ strcat (buffer, error_table_name (table_num));
+ strcat (buffer, " ");
+ }
+ for (cp = buffer; *cp; cp++)
+ ;
+ if (offset >= 100) {
+ *cp++ = '0' + offset / 100;
+ offset %= 100;
+ started++;
+ }
+ if (started || offset >= 10) {
+ *cp++ = '0' + offset / 10;
+ offset %= 10;
+ }
+ *cp++ = '0' + offset;
+ *cp = '\0';
+ return(buffer);
+}
+
+/*
+ * This routine will only return a value if the we are not running as
+ * a privileged process.
+ */
+static char *safe_getenv(const char *arg)
+{
+#if !defined(_WIN32)
+ if ((getuid() != geteuid()) || (getgid() != getegid()))
+ return NULL;
+#endif
+#if HAVE_PRCTL
+ if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#else
+#if (defined(linux) && defined(SYS_prctl))
+ if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#endif
+#endif
+
+#if defined(HAVE_SECURE_GETENV)
+ return secure_getenv(arg);
+#elif defined(HAVE___SECURE_GETENV)
+ return __secure_getenv(arg);
+#else
+ return getenv(arg);
+#endif
+}
+
+#define DEBUG_INIT 0x8000
+#define DEBUG_ADDREMOVE 0x0001
+
+static int debug_mask = 0;
+static FILE *debug_f = 0;
+
+static void init_debug(void)
+{
+ char *dstr, *fn, *tmp;
+
+ if (debug_mask & DEBUG_INIT)
+ return;
+
+ dstr = getenv("COMERR_DEBUG");
+ if (dstr) {
+ debug_mask = strtoul(dstr, &tmp, 0);
+ if (*tmp || errno)
+ debug_mask = 0;
+ }
+
+ debug_mask |= DEBUG_INIT;
+ if (debug_mask == DEBUG_INIT)
+ return;
+
+ fn = safe_getenv("COMERR_DEBUG_FILE");
+ if (fn)
+ debug_f = fopen(fn, "a");
+ if (!debug_f)
+ debug_f = fopen("/dev/tty", "a");
+ if (debug_f) {
+#ifdef HAVE_FCNTL
+ int fd = fileno(debug_f);
+
+ if (fd >= 0) {
+ int flags = fcntl(fd, F_GETFD);
+
+ if (flags >= 0)
+ flags = fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
+ if (flags < 0) {
+ fprintf(debug_f, "Couldn't set FD_CLOEXEC "
+ "on debug FILE: %s\n", strerror(errno));
+ fclose(debug_f);
+ debug_f = NULL;
+ debug_mask = DEBUG_INIT;
+ }
+ }
+#endif
+ } else
+ debug_mask = DEBUG_INIT;
+}
+
+/*
+ * New interface provided by krb5's com_err library
+ */
+errcode_t add_error_table(const struct error_table * et)
+{
+ struct et_list *el;
+
+ if (!(el = (struct et_list *) malloc(sizeof(struct et_list))))
+ return ENOMEM;
+
+ if (et_list_lock() != 0) {
+ free(el);
+ return errno;
+ }
+
+ el->table = et;
+ el->next = _et_dynamic_list;
+ _et_dynamic_list = el;
+
+ init_debug();
+ if (debug_mask & DEBUG_ADDREMOVE)
+ fprintf(debug_f, "add_error_table: %s (0x%p)\n",
+ error_table_name(et->base),
+ (const void *) et);
+
+ et_list_unlock();
+ return 0;
+}
+
+/*
+ * New interface provided by krb5's com_err library
+ */
+errcode_t remove_error_table(const struct error_table * et)
+{
+ struct et_list *el;
+ struct et_list *el2 = 0;
+
+ if (et_list_lock() != 0)
+ return ENOENT;
+
+ el = _et_dynamic_list;
+ init_debug();
+ while (el) {
+ if (el->table->base == et->base) {
+ if (el2) /* Not the beginning of the list */
+ el2->next = el->next;
+ else
+ _et_dynamic_list = el->next;
+ (void) free(el);
+ if (debug_mask & DEBUG_ADDREMOVE)
+ fprintf(debug_f,
+ "remove_error_table: %s (0x%p)\n",
+ error_table_name(et->base),
+ (const void *) et);
+ et_list_unlock();
+ return 0;
+ }
+ el2 = el;
+ el = el->next;
+ }
+ if (debug_mask & DEBUG_ADDREMOVE)
+ fprintf(debug_f, "remove_error_table FAILED: %s (0x%p)\n",
+ error_table_name(et->base),
+ (const void *) et);
+ et_list_unlock();
+ return ENOENT;
+}
+
+/*
+ * Variant of the interface provided by Heimdal's com_err library
+ */
+void
+add_to_error_table(struct et_list *new_table)
+{
+ add_error_table(new_table->table);
+}
diff --git a/lib/et/error_table.h b/lib/et/error_table.h
new file mode 100644
index 0000000..24e4762
--- /dev/null
+++ b/lib/et/error_table.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 1988 by the Student Information Processing Board of the
+ * Massachusetts Institute of Technology.
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#ifndef _ET_H
+
+struct et_list {
+ struct et_list *next;
+ const struct error_table *table;
+};
+extern struct et_list *_et_list, *_et_dynamic_list;
+
+#define ERRCODE_RANGE 8 /* # of bits to shift table number */
+#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
+
+extern const char *error_table_name(errcode_t num);
+
+#define _ET_H
+#endif
diff --git a/lib/et/et_c.awk b/lib/et/et_c.awk
new file mode 100644
index 0000000..99c33ba
--- /dev/null
+++ b/lib/et/et_c.awk
@@ -0,0 +1,269 @@
+BEGIN {
+if ( length(outfn) == 0) {
+ outfn = outfile
+}
+char_shift=64
+## "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
+c2n["A"]=1
+c2n["B"]=2
+c2n["C"]=3
+c2n["D"]=4
+c2n["E"]=5
+c2n["F"]=6
+c2n["G"]=7
+c2n["H"]=8
+c2n["I"]=9
+c2n["J"]=10
+c2n["K"]=11
+c2n["L"]=12
+c2n["M"]=13
+c2n["N"]=14
+c2n["O"]=15
+c2n["P"]=16
+c2n["Q"]=17
+c2n["R"]=18
+c2n["S"]=19
+c2n["T"]=20
+c2n["U"]=21
+c2n["V"]=22
+c2n["W"]=23
+c2n["X"]=24
+c2n["Y"]=25
+c2n["Z"]=26
+c2n["a"]=27
+c2n["b"]=28
+c2n["c"]=29
+c2n["d"]=30
+c2n["e"]=31
+c2n["f"]=32
+c2n["g"]=33
+c2n["h"]=34
+c2n["i"]=35
+c2n["j"]=36
+c2n["k"]=37
+c2n["l"]=38
+c2n["m"]=39
+c2n["n"]=40
+c2n["o"]=41
+c2n["p"]=42
+c2n["q"]=43
+c2n["r"]=44
+c2n["s"]=45
+c2n["t"]=46
+c2n["u"]=47
+c2n["v"]=48
+c2n["w"]=49
+c2n["x"]=50
+c2n["y"]=51
+c2n["z"]=52
+c2n["0"]=53
+c2n["1"]=54
+c2n["2"]=55
+c2n["3"]=56
+c2n["4"]=57
+c2n["5"]=58
+c2n["6"]=59
+c2n["7"]=60
+c2n["8"]=61
+c2n["9"]=62
+c2n["_"]=63
+}
+/^#/ { next }
+/^[ \t]*(error_table|et)[ \t]+[a-zA-Z][a-zA-Z0-9_]+/ {
+ table_number = 0
+ mod_base = 1000000
+ if (NF > 2) {
+ table_name = $3
+ base_name = $2
+ } else {
+ table_name = $2
+ base_name = table_name
+ }
+ for(i=1; i<=length(base_name); i++) {
+ table_number=(table_number*char_shift)+c2n[substr(base_name,i,1)]
+ }
+
+ # We start playing *_high, *low games here because the some
+ # awk programs do not have the necessary precision (sigh)
+ tab_base_low = table_number % mod_base
+ if (tab_base_low < 0) {
+ # Work around stupid bug in the ARM libm
+ tab_base_low = tab_base_low + mod_base
+ }
+ tab_base_high = int(table_number / mod_base)
+ tab_base_sign = 1;
+
+ # figure out: table_number_base=table_number*256
+ tab_base_low = tab_base_low * 256
+ tab_base_high = (tab_base_high * 256) + \
+ int(tab_base_low / mod_base)
+ tab_base_low = tab_base_low % mod_base
+ if (tab_base_low < 0) {
+ # Work around stupid bug in the ARM libm
+ tab_base_low = tab_base_low + mod_base
+ }
+
+ if (table_number > 128*256*256) {
+ # figure out: table_number_base -= 256*256*256*256
+ # sub_high, sub_low is 256*256*256*256
+ sub_low = 256*256*256 % mod_base
+ sub_high = int(256*256*256 / mod_base)
+
+ sub_low = sub_low * 256
+ sub_high = (sub_high * 256) + int(sub_low / mod_base)
+ sub_low = sub_low % mod_base
+
+ tab_base_low = sub_low - tab_base_low;
+ tab_base_high = sub_high - tab_base_high;
+ tab_base_sign = -1;
+ if (tab_base_low < 0) {
+ tab_base_low = tab_base_low + mod_base
+ tab_base_high--
+ }
+ }
+ print "/*" > outfile
+ print " * " outfn ":" > outfile
+ print " * This file is automatically generated; please do not edit it." > outfile
+ print " */" > outfile
+
+ print "" > outfile
+ print "#include <stdlib.h>" > outfile
+ print "" > outfile
+ print "#define N_(a) a" > outfile
+ print "" > outfile
+ print "static const char * const text[] = {" > outfile
+ table_item_count = 0
+}
+
+(continuation == 1) && ($0 ~ /\\[ \t]*$/) {
+ text=substr($0,1,length($0)-1);
+# printf "\t\t\"%s\"\n", text > outfile
+ cont_buf=cont_buf text;
+}
+
+(continuation == 1) && ($0 ~ /"[ \t]*$/) {
+# printf "\t\t\"%s,\n", $0 > outfile
+ printf "\tN_(%s),\n", cont_buf $0 > outfile
+ continuation = 0;
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,[^ \t]/ {
+ # Be tolerant to missing whitespace after `,' ...
+ sub(/,/, ", ")
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,[ \t]*$/ {
+ table_item_count++
+ skipone=1
+ next
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,[ \t]*".*"[ \t]*$/ {
+ text=""
+ for (i=3; i<=NF; i++) {
+ text = text FS $i
+ }
+ text=substr(text,2,length(text)-1);
+ printf "\tN_(%s),\n", text > outfile
+ table_item_count++
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,[ \t]*".*\\[ \t]*$/ {
+ text=""
+ for (i=3; i<=NF; i++) {
+ text = text FS $i
+ }
+ text=substr(text,2,length(text)-2);
+# printf "\t%s\"\n", text > outfile
+ cont_buf=text
+ table_item_count++
+ continuation++;
+}
+
+/^[ \t]*".*\\[ \t]*$/ {
+ if (skipone) {
+ text=substr($0,1,length($0)-1);
+# printf "\t%s\"\n", text > outfile
+ cont_buf=text
+ continuation++;
+ }
+ skipone=0
+}
+
+{
+ if (skipone) {
+ printf "\tN_(%s),\n", $0 > outfile
+ }
+ skipone=0
+}
+
+/^[ \t]*(prefix)$/ {
+ prefix_str = ""
+}
+
+/^[ \t]*(prefix)[ \t]+[A-Z_0-9]+/ {
+ prefix_str = $2 "_"
+}
+
+/^[ \t]*(index)[ \t]+[A-Z_0-9]+/ {
+ new_idx = $2
+ for (i = table_item_count ; i < new_idx; i++) {
+ printf "\tN_(\"Reserved %s error (%d)\"),\n", \
+ table_name, table_item_count++ > outfile
+ }
+}
+
+END {
+ print " 0" > outfile
+ print "};" > outfile
+ print "" > outfile
+ print "struct error_table {" > outfile
+ print " char const * const * msgs;" > outfile
+ print " long base;" > outfile
+ print " int n_msgs;" > outfile
+ print "};" > outfile
+ print "struct et_list {" > outfile
+ print " struct et_list *next;" > outfile
+ print " const struct error_table * table;" > outfile
+ print "};" > outfile
+ print "extern struct et_list *_et_list;" > outfile
+ print "" > outfile
+ if (tab_base_high == 0) {
+ print "const struct error_table et_" table_name "_error_table = { text, " \
+ sprintf("%dL, %d };", tab_base_sign*tab_base_low, \
+ table_item_count) > outfile
+ } else {
+ print "const struct error_table et_" table_name "_error_table = { text, " \
+ sprintf("%d%06dL, %d };", tab_base_sign*tab_base_high, \
+ tab_base_low, table_item_count) > outfile
+ }
+ print "" > outfile
+ print "static struct et_list link = { 0, 0 };" > outfile
+ print "" > outfile
+ print "void initialize_" table_name "_error_table_r(struct et_list **list);" > outfile
+ print "void initialize_" table_name "_error_table(void);" > outfile
+ print "" > outfile
+ print "void initialize_" table_name "_error_table(void) {" > outfile
+ print " initialize_" table_name "_error_table_r(&_et_list);" > outfile
+ print "}" > outfile
+ print "" > outfile
+ print "/* For Heimdal compatibility */" > outfile
+ print "void initialize_" table_name "_error_table_r(struct et_list **list)" > outfile
+ print "{" > outfile
+ print " struct et_list *et, **end;" > outfile
+ print "" > outfile
+ print " for (end = list, et = *list; et; end = &et->next, et = et->next)" > outfile
+ print " if (et->table->msgs == text)" > outfile
+ print " return;" > outfile
+ print " et = malloc(sizeof(struct et_list));" > outfile
+ print " if (et == 0) {" > outfile
+ print " if (!link.table)" > outfile
+ print " et = &link;" > outfile
+ print " else" > outfile
+ print " return;" > outfile
+ print " }" > outfile
+ print " et->table = &et_" table_name "_error_table;" > outfile
+ print " et->next = 0;" > outfile
+ print " *end = et;" > outfile
+ print "}" > outfile
+}
diff --git a/lib/et/et_h.awk b/lib/et/et_h.awk
new file mode 100644
index 0000000..8337121
--- /dev/null
+++ b/lib/et/et_h.awk
@@ -0,0 +1,204 @@
+BEGIN {
+if ( length(outfn) == 0) {
+ outfn = outfile
+}
+char_shift=64
+## "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
+c2n["A"]=1
+c2n["B"]=2
+c2n["C"]=3
+c2n["D"]=4
+c2n["E"]=5
+c2n["F"]=6
+c2n["G"]=7
+c2n["H"]=8
+c2n["I"]=9
+c2n["J"]=10
+c2n["K"]=11
+c2n["L"]=12
+c2n["M"]=13
+c2n["N"]=14
+c2n["O"]=15
+c2n["P"]=16
+c2n["Q"]=17
+c2n["R"]=18
+c2n["S"]=19
+c2n["T"]=20
+c2n["U"]=21
+c2n["V"]=22
+c2n["W"]=23
+c2n["X"]=24
+c2n["Y"]=25
+c2n["Z"]=26
+c2n["a"]=27
+c2n["b"]=28
+c2n["c"]=29
+c2n["d"]=30
+c2n["e"]=31
+c2n["f"]=32
+c2n["g"]=33
+c2n["h"]=34
+c2n["i"]=35
+c2n["j"]=36
+c2n["k"]=37
+c2n["l"]=38
+c2n["m"]=39
+c2n["n"]=40
+c2n["o"]=41
+c2n["p"]=42
+c2n["q"]=43
+c2n["r"]=44
+c2n["s"]=45
+c2n["t"]=46
+c2n["u"]=47
+c2n["v"]=48
+c2n["w"]=49
+c2n["x"]=50
+c2n["y"]=51
+c2n["z"]=52
+c2n["0"]=53
+c2n["1"]=54
+c2n["2"]=55
+c2n["3"]=56
+c2n["4"]=57
+c2n["5"]=58
+c2n["6"]=59
+c2n["7"]=60
+c2n["8"]=61
+c2n["9"]=62
+c2n["_"]=63
+}
+/^#/ { next }
+/^[ \t]*(error_table|et)[ \t]+[a-zA-Z][a-zA-Z0-9_]+/ {
+ table_number = 0
+ mod_base = 1000000
+ if (NF > 2) {
+ table_name = $3
+ base_name = $2
+ } else {
+ table_name = $2
+ base_name = table_name
+ }
+ for(i=1; i<=length(base_name); i++) {
+ table_number=(table_number*char_shift)+c2n[substr(base_name,i,1)]
+ }
+ # We start playing *_high, *low games here because the some
+ # awk programs do not have the necessary precision (sigh)
+ tab_base_low = table_number % mod_base
+ if (tab_base_low < 0) {
+ # Work around stupid bug in the ARM libm
+ tab_base_low = tab_base_low + mod_base
+ }
+ tab_base_high = int(table_number / mod_base)
+ tab_base_sign = 1;
+
+ # figure out: table_number_base=table_number*256
+ tab_base_low = tab_base_low * 256
+ tab_base_high = (tab_base_high * 256) + \
+ int(tab_base_low / mod_base)
+ tab_base_low = tab_base_low % mod_base
+ if (tab_base_low < 0) {
+ # Work around stupid bug in the ARM libm
+ tab_base_low = tab_base_low + mod_base
+ }
+
+ if (table_number > 128*256*256) {
+ # figure out: table_number_base -= 256*256*256*256
+ # sub_high, sub_low is 256*256*256*256
+ sub_low = 256*256*256 % mod_base
+ sub_high = int(256*256*256 / mod_base)
+
+ sub_low = sub_low * 256
+ sub_high = (sub_high * 256) + int(sub_low / mod_base)
+ sub_low = sub_low % mod_base
+
+ tab_base_low = sub_low - tab_base_low;
+ tab_base_high = sub_high - tab_base_high;
+ tab_base_sign = -1;
+ if (tab_base_low < 0) {
+ tab_base_low = tab_base_low + mod_base
+ tab_base_high--
+ }
+ }
+ prefix_str = ""
+ curr_idx = 0
+ curr_low = tab_base_low
+ curr_high = tab_base_high
+ curr_sign = tab_base_sign
+ print "/*" > outfile
+ print " * " outfn ":" > outfile
+ print " * This file is automatically generated; please do not edit it." > outfile
+ print " */" > outfile
+ print "" > outfile
+ print "#include <et/com_err.h>" > outfile
+ print "" > outfile
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,/ {
+ # Be tolerant to missing whitespace after `,' ...
+ sub(/,/, ", ")
+
+ tag=prefix_str substr($2,1,length($2)-1)
+ if (curr_high == 0) {
+ printf "#define %-40s (%dL)\n", tag, \
+ curr_sign*curr_low > outfile
+ } else {
+ printf "#define %-40s (%d%06dL)\n", tag, curr_high*curr_sign, \
+ curr_low > outfile
+ }
+ curr_low += curr_sign;
+ curr_idx++;
+ if (curr_low >= mod_base) {
+ curr_low -= mod_base;
+ curr_high++
+ }
+ if (curr_low < 0) {
+ cur_low += mod_base
+ cur_high--
+ }
+}
+
+/^[ \t]*(prefix)$/ {
+ prefix_str = ""
+}
+
+/^[ \t]*(prefix)[ \t]+[A-Z_0-9]+/ {
+ prefix_str = $2 "_"
+}
+
+/^[ \t]*(index)[ \t]+[A-Z_0-9]+/ {
+ new_idx = $2
+ curr_low += curr_sign * (new_idx - curr_idx)
+ curr_idx = new_idx
+ if (curr_low >= mod_base) {
+ curr_low -= mod_base;
+ curr_high++
+ }
+ if (curr_low < 0) {
+ cur_low += mod_base
+ cur_high--
+ }
+}
+
+
+END {
+ print "extern const struct error_table et_" table_name "_error_table;" > outfile
+ print "extern void initialize_" table_name "_error_table(void);" > outfile
+ print "" > outfile
+ print "/* For compatibility with Heimdal */" > outfile
+ print "extern void initialize_" table_name "_error_table_r(struct et_list **list);" > outfile
+ print "" > outfile
+ if (tab_base_high == 0) {
+ print "#define ERROR_TABLE_BASE_" table_name " (" \
+ sprintf("%d", tab_base_sign*tab_base_low) \
+ "L)" > outfile
+ } else {
+ print "#define ERROR_TABLE_BASE_" table_name " (" \
+ sprintf("%d%06d", tab_base_sign*tab_base_high, \
+ tab_base_low) "L)" > outfile
+ }
+ print "" > outfile
+ print "/* for compatibility with older versions... */" > outfile
+ print "#define init_" table_name "_err_tbl initialize_" table_name "_error_table" > outfile
+ print "#define " table_name "_err_base ERROR_TABLE_BASE_" table_name > outfile
+}
diff --git a/lib/et/et_name.c b/lib/et/et_name.c
new file mode 100644
index 0000000..d9a3e87
--- /dev/null
+++ b/lib/et/et_name.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright 1987 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include "com_err.h"
+#include "error_table.h"
+#include "internal.h"
+
+static const char char_set[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
+
+static char buf[6];
+
+const char * error_table_name(errcode_t num)
+{
+ int ch;
+ int i;
+ char *p;
+
+ /* num = aa aaa abb bbb bcc ccc cdd ddd d?? ??? ??? */
+ p = buf;
+ num >>= ERRCODE_RANGE;
+ /* num = ?? ??? ??? aaa aaa bbb bbb ccc ccc ddd ddd */
+ num &= 077777777L;
+ /* num = 00 000 000 aaa aaa bbb bbb ccc ccc ddd ddd */
+ for (i = 4; i >= 0; i--) {
+ ch = (int)((num >> BITS_PER_CHAR * i) & ((1 << BITS_PER_CHAR) - 1));
+ if (ch != 0)
+ *p++ = char_set[ch-1];
+ }
+ *p = '\0';
+ return(buf);
+}
diff --git a/lib/et/init_et.c b/lib/et/init_et.c
new file mode 100644
index 0000000..772660d
--- /dev/null
+++ b/lib/et/init_et.c
@@ -0,0 +1,53 @@
+/*
+ * $Header$
+ * $Source$
+ * $Locker$
+ *
+ * Copyright 1986, 1987, 1988 by MIT Information Systems and
+ * the MIT Student Information Processing Board.
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <errno.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include "com_err.h"
+#include "error_table.h"
+
+struct foobar {
+ struct et_list etl;
+ struct error_table et;
+};
+
+extern struct et_list * _et_dynamic_list;
+
+int init_error_table(const char * const *msgs, long base, int count)
+{
+ struct foobar * new_et;
+
+ if (!base || !count || !msgs)
+ return 0;
+
+ new_et = (struct foobar *) malloc(sizeof(struct foobar));
+ if (!new_et)
+ return ENOMEM; /* oops */
+ new_et->etl.table = &new_et->et;
+ new_et->et.msgs = msgs;
+ new_et->et.base = base;
+ new_et->et.n_msgs= count;
+
+ new_et->etl.next = _et_dynamic_list;
+ _et_dynamic_list = &new_et->etl;
+ return 0;
+}
diff --git a/lib/et/internal.h b/lib/et/internal.h
new file mode 100644
index 0000000..d16f373
--- /dev/null
+++ b/lib/et/internal.h
@@ -0,0 +1,19 @@
+/*
+ * internal include file for com_err package
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include <errno.h>
+
+#ifdef NEED_SYS_ERRLIST
+extern char const * const sys_errlist[];
+extern const int sys_nerr;
+#endif
diff --git a/lib/et/test_cases/continuation.c b/lib/et/test_cases/continuation.c
new file mode 100644
index 0000000..1207897
--- /dev/null
+++ b/lib/et/test_cases/continuation.c
@@ -0,0 +1,55 @@
+/*
+ * continuation.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+#define N_(a) a
+
+static const char * const text[] = {
+ N_("New password was found in a dictionary of possible passwords and\ntherefore may be easily guessed. Please choose another password.\nSee the ovpasswd man page for help in choosing a good password."),
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_ovk_error_table = { text, 43787520L, 1 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_ovk_error_table_r(struct et_list **list);
+void initialize_ovk_error_table(void);
+
+void initialize_ovk_error_table(void) {
+ initialize_ovk_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_ovk_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_ovk_error_table;
+ et->next = 0;
+ *end = et;
+}
diff --git a/lib/et/test_cases/continuation.et b/lib/et/test_cases/continuation.et
new file mode 100644
index 0000000..64d1674
--- /dev/null
+++ b/lib/et/test_cases/continuation.et
@@ -0,0 +1,8 @@
+ error_table ovk
+
+error_code CHPASS_UTIL_PASSWORD_IN_DICTIONARY,
+"New password was found in a dictionary of possible passwords and\n\
+therefore may be easily guessed. Please choose another password.\n\
+See the ovpasswd man page for help in choosing a good password."
+
+ end
diff --git a/lib/et/test_cases/continuation.h b/lib/et/test_cases/continuation.h
new file mode 100644
index 0000000..9cfe602
--- /dev/null
+++ b/lib/et/test_cases/continuation.h
@@ -0,0 +1,19 @@
+/*
+ * continuation.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define CHPASS_UTIL_PASSWORD_IN_DICTIONARY (43787520L)
+extern const struct error_table et_ovk_error_table;
+extern void initialize_ovk_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_ovk_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_ovk (43787520L)
+
+/* for compatibility with older versions... */
+#define init_ovk_err_tbl initialize_ovk_error_table
+#define ovk_err_base ERROR_TABLE_BASE_ovk
diff --git a/lib/et/test_cases/heimdal.c b/lib/et/test_cases/heimdal.c
new file mode 100644
index 0000000..d9be4ce
--- /dev/null
+++ b/lib/et/test_cases/heimdal.c
@@ -0,0 +1,136 @@
+/*
+ * heimdal.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+#define N_(a) a
+
+static const char * const text[] = {
+ N_("Kerberos successful"),
+ N_("Kerberos principal expired"),
+ N_("Kerberos service expired"),
+ N_("Kerberos auth expired"),
+ N_("Incorrect kerberos master key version"),
+ N_("Incorrect kerberos master key version"),
+ N_("Incorrect kerberos master key version"),
+ N_("Kerberos error: byte order unknown"),
+ N_("Kerberos principal unknown"),
+ N_("Kerberos principal not unique"),
+ N_("Kerberos principal has null key"),
+ N_("Reserved krb error (11)"),
+ N_("Reserved krb error (12)"),
+ N_("Reserved krb error (13)"),
+ N_("Reserved krb error (14)"),
+ N_("Reserved krb error (15)"),
+ N_("Reserved krb error (16)"),
+ N_("Reserved krb error (17)"),
+ N_("Reserved krb error (18)"),
+ N_("Reserved krb error (19)"),
+ N_("Generic error from Kerberos KDC"),
+ N_("Can't read Kerberos ticket file"),
+ N_("Can't find Kerberos ticket or TGT"),
+ N_("Reserved krb error (23)"),
+ N_("Reserved krb error (24)"),
+ N_("Reserved krb error (25)"),
+ N_("Kerberos TGT Expired"),
+ N_("Reserved krb error (27)"),
+ N_("Reserved krb error (28)"),
+ N_("Reserved krb error (29)"),
+ N_("Reserved krb error (30)"),
+ N_("Kerberos error: Can't decode authenticator"),
+ N_("Kerberos ticket expired"),
+ N_("Kerberos ticket not yet valid"),
+ N_("Kerberos error: Repeated request"),
+ N_("The kerberos ticket isn't for us"),
+ N_("Kerberos request inconsistent"),
+ N_("Kerberos error: delta_t too big"),
+ N_("Kerberos error: incorrect net address"),
+ N_("Kerberos protocol version mismatch"),
+ N_("Kerberos error: invalid msg type"),
+ N_("Kerberos error: message stream modified"),
+ N_("Kerberos error: message out of order"),
+ N_("Kerberos error: unauthorized request"),
+ N_("Reserved krb error (44)"),
+ N_("Reserved krb error (45)"),
+ N_("Reserved krb error (46)"),
+ N_("Reserved krb error (47)"),
+ N_("Reserved krb error (48)"),
+ N_("Reserved krb error (49)"),
+ N_("Reserved krb error (50)"),
+ N_("Kerberos error: current PW is null"),
+ N_("Kerberos error: Incorrect current password"),
+ N_("Kerberos protocol error"),
+ N_("Error returned by Kerberos KDC"),
+ N_("Null Kerberos ticket returned by KDC"),
+ N_("Kerberos error: Retry count exceeded"),
+ N_("Kerberos error: Can't send request"),
+ N_("Reserved krb error (58)"),
+ N_("Reserved krb error (59)"),
+ N_("Reserved krb error (60)"),
+ N_("Kerberos error: not all tickets returned"),
+ N_("Kerberos error: incorrect password"),
+ N_("Kerberos error: Protocol Error"),
+ N_("Reserved krb error (64)"),
+ N_("Reserved krb error (65)"),
+ N_("Reserved krb error (66)"),
+ N_("Reserved krb error (67)"),
+ N_("Reserved krb error (68)"),
+ N_("Reserved krb error (69)"),
+ N_("Other error"),
+ N_("Don't have Kerberos ticket-granting ticket"),
+ N_("Reserved krb error (72)"),
+ N_("Reserved krb error (73)"),
+ N_("Reserved krb error (74)"),
+ N_("Reserved krb error (75)"),
+ N_("No ticket file found"),
+ N_("Couldn't access ticket file"),
+ N_("Couldn't lock ticket file"),
+ N_("Bad ticket file format"),
+ N_("tf_init not called first"),
+ N_("Bad Kerberos name format"),
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_krb_error_table = { text, 39525376L, 82 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_krb_error_table_r(struct et_list **list);
+void initialize_krb_error_table(void);
+
+void initialize_krb_error_table(void) {
+ initialize_krb_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_krb_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_krb_error_table;
+ et->next = 0;
+ *end = et;
+}
diff --git a/lib/et/test_cases/heimdal.et b/lib/et/test_cases/heimdal.et
new file mode 100644
index 0000000..9dce192
--- /dev/null
+++ b/lib/et/test_cases/heimdal.et
@@ -0,0 +1,65 @@
+# Copyright 1987,1988 Massachusetts Institute of Technology
+#
+# For copying and distribution information, see the file
+# "mit-copyright.h".
+#
+# This might look like a com_err file, but is not
+#
+id "$Id: krb_err.et,v 1.7 1998/03/29 14:19:52 bg Exp $"
+
+error_table krb
+
+prefix KRBET
+ec KSUCCESS, "Kerberos successful"
+ec KDC_NAME_EXP, "Kerberos principal expired"
+ec KDC_SERVICE_EXP, "Kerberos service expired"
+ec KDC_AUTH_EXP, "Kerberos auth expired"
+ec KDC_PKT_VER, "Incorrect kerberos master key version"
+ec KDC_P_MKEY_VER, "Incorrect kerberos master key version"
+ec KDC_S_MKEY_VER, "Incorrect kerberos master key version"
+ec KDC_BYTE_ORDER, "Kerberos error: byte order unknown"
+ec KDC_PR_UNKNOWN, "Kerberos principal unknown"
+ec KDC_PR_N_UNIQUE, "Kerberos principal not unique"
+ec KDC_NULL_KEY, "Kerberos principal has null key"
+index 20
+ec KDC_GEN_ERR, "Generic error from Kerberos KDC"
+ec GC_TKFIL, "Can't read Kerberos ticket file"
+ec GC_NOTKT, "Can't find Kerberos ticket or TGT"
+index 26
+ec MK_AP_TGTEXP, "Kerberos TGT Expired"
+index 31
+ec RD_AP_UNDEC, "Kerberos error: Can't decode authenticator"
+ec RD_AP_EXP, "Kerberos ticket expired"
+ec RD_AP_NYV, "Kerberos ticket not yet valid"
+ec RD_AP_REPEAT, "Kerberos error: Repeated request"
+ec RD_AP_NOT_US, "The kerberos ticket isn't for us"
+ec RD_AP_INCON, "Kerberos request inconsistent"
+ec RD_AP_TIME, "Kerberos error: delta_t too big"
+ec RD_AP_BADD, "Kerberos error: incorrect net address"
+ec RD_AP_VERSION, "Kerberos protocol version mismatch"
+ec RD_AP_MSG_TYPE, "Kerberos error: invalid msg type"
+ec RD_AP_MODIFIED, "Kerberos error: message stream modified"
+ec RD_AP_ORDER, "Kerberos error: message out of order"
+ec RD_AP_UNAUTHOR, "Kerberos error: unauthorized request"
+index 51
+ec GT_PW_NULL, "Kerberos error: current PW is null"
+ec GT_PW_BADPW, "Kerberos error: Incorrect current password"
+ec GT_PW_PROT, "Kerberos protocol error"
+ec GT_PW_KDCERR, "Error returned by Kerberos KDC"
+ec GT_PW_NULLTKT, "Null Kerberos ticket returned by KDC"
+ec SKDC_RETRY, "Kerberos error: Retry count exceeded"
+ec SKDC_CANT, "Kerberos error: Can't send request"
+index 61
+ec INTK_W_NOTALL, "Kerberos error: not all tickets returned"
+ec INTK_BADPW, "Kerberos error: incorrect password"
+ec INTK_PROT, "Kerberos error: Protocol Error"
+index 70
+ec INTK_ERR, "Other error"
+ec AD_NOTGT, "Don't have Kerberos ticket-granting ticket"
+index 76
+ec NO_TKT_FIL, "No ticket file found"
+ec TKT_FIL_ACC, "Couldn't access ticket file"
+ec TKT_FIL_LCK, "Couldn't lock ticket file"
+ec TKT_FIL_FMT, "Bad ticket file format"
+ec TKT_FIL_INI, "tf_init not called first"
+ec KNAME_FMT, "Bad Kerberos name format"
diff --git a/lib/et/test_cases/heimdal.h b/lib/et/test_cases/heimdal.h
new file mode 100644
index 0000000..5c94354
--- /dev/null
+++ b/lib/et/test_cases/heimdal.h
@@ -0,0 +1,64 @@
+/*
+ * heimdal.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define KRBET_KSUCCESS (39525376L)
+#define KRBET_KDC_NAME_EXP (39525377L)
+#define KRBET_KDC_SERVICE_EXP (39525378L)
+#define KRBET_KDC_AUTH_EXP (39525379L)
+#define KRBET_KDC_PKT_VER (39525380L)
+#define KRBET_KDC_P_MKEY_VER (39525381L)
+#define KRBET_KDC_S_MKEY_VER (39525382L)
+#define KRBET_KDC_BYTE_ORDER (39525383L)
+#define KRBET_KDC_PR_UNKNOWN (39525384L)
+#define KRBET_KDC_PR_N_UNIQUE (39525385L)
+#define KRBET_KDC_NULL_KEY (39525386L)
+#define KRBET_KDC_GEN_ERR (39525396L)
+#define KRBET_GC_TKFIL (39525397L)
+#define KRBET_GC_NOTKT (39525398L)
+#define KRBET_MK_AP_TGTEXP (39525402L)
+#define KRBET_RD_AP_UNDEC (39525407L)
+#define KRBET_RD_AP_EXP (39525408L)
+#define KRBET_RD_AP_NYV (39525409L)
+#define KRBET_RD_AP_REPEAT (39525410L)
+#define KRBET_RD_AP_NOT_US (39525411L)
+#define KRBET_RD_AP_INCON (39525412L)
+#define KRBET_RD_AP_TIME (39525413L)
+#define KRBET_RD_AP_BADD (39525414L)
+#define KRBET_RD_AP_VERSION (39525415L)
+#define KRBET_RD_AP_MSG_TYPE (39525416L)
+#define KRBET_RD_AP_MODIFIED (39525417L)
+#define KRBET_RD_AP_ORDER (39525418L)
+#define KRBET_RD_AP_UNAUTHOR (39525419L)
+#define KRBET_GT_PW_NULL (39525427L)
+#define KRBET_GT_PW_BADPW (39525428L)
+#define KRBET_GT_PW_PROT (39525429L)
+#define KRBET_GT_PW_KDCERR (39525430L)
+#define KRBET_GT_PW_NULLTKT (39525431L)
+#define KRBET_SKDC_RETRY (39525432L)
+#define KRBET_SKDC_CANT (39525433L)
+#define KRBET_INTK_W_NOTALL (39525437L)
+#define KRBET_INTK_BADPW (39525438L)
+#define KRBET_INTK_PROT (39525439L)
+#define KRBET_INTK_ERR (39525446L)
+#define KRBET_AD_NOTGT (39525447L)
+#define KRBET_NO_TKT_FIL (39525452L)
+#define KRBET_TKT_FIL_ACC (39525453L)
+#define KRBET_TKT_FIL_LCK (39525454L)
+#define KRBET_TKT_FIL_FMT (39525455L)
+#define KRBET_TKT_FIL_INI (39525456L)
+#define KRBET_KNAME_FMT (39525457L)
+extern const struct error_table et_krb_error_table;
+extern void initialize_krb_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_krb_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_krb (39525376L)
+
+/* for compatibility with older versions... */
+#define init_krb_err_tbl initialize_krb_error_table
+#define krb_err_base ERROR_TABLE_BASE_krb
diff --git a/lib/et/test_cases/heimdal2.c b/lib/et/test_cases/heimdal2.c
new file mode 100644
index 0000000..d2ad572
--- /dev/null
+++ b/lib/et/test_cases/heimdal2.c
@@ -0,0 +1,122 @@
+/*
+ * heimdal2.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+#define N_(a) a
+
+static const char * const text[] = {
+ N_("$Id: kadm_err.et,v 1.5 1998/01/16 23:11:27 joda Exp $"),
+ N_("Cannot fetch local realm"),
+ N_("Unable to fetch credentials"),
+ N_("Bad key supplied"),
+ N_("Can't encrypt data"),
+ N_("Cannot encode/decode authentication info"),
+ N_("Principal attempting change is in wrong realm"),
+ N_("Packet is too large"),
+ N_("Version number is incorrect"),
+ N_("Checksum does not match"),
+ N_("Unsealing private data failed"),
+ N_("Unsupported operation"),
+ N_("Could not find administrating host"),
+ N_("Administrating host name is unknown"),
+ N_("Could not find service name in services database"),
+ N_("Could not create socket"),
+ N_("Could not connect to server"),
+ N_("Could not fetch local socket address"),
+ N_("Could not fetch master key"),
+ N_("Could not verify master key"),
+ N_("Entry already exists in database"),
+ N_("Database store error"),
+ N_("Database read error"),
+ N_("Insufficient access to perform requested operation"),
+ N_("Data is available for return to client"),
+ N_("No such entry in the database"),
+ N_("Memory exhausted"),
+ N_("Could not fetch system hostname"),
+ N_("Could not bind port"),
+ N_("Length mismatch problem"),
+ N_("Illegal use of wildcard"),
+ N_("Database is locked or in use--try again later"),
+ N_("Insecure password rejected"),
+ N_("Cleartext password and DES key did not match"),
+ N_("Invalid principal for change srvtab request"),
+ N_("Attempt do delete immutable principal"),
+ N_("Reserved kadm error (36)"),
+ N_("Reserved kadm error (37)"),
+ N_("Reserved kadm error (38)"),
+ N_("Reserved kadm error (39)"),
+ N_("Reserved kadm error (40)"),
+ N_("Reserved kadm error (41)"),
+ N_("Reserved kadm error (42)"),
+ N_("Reserved kadm error (43)"),
+ N_("Reserved kadm error (44)"),
+ N_("Reserved kadm error (45)"),
+ N_("Reserved kadm error (46)"),
+ N_("Reserved kadm error (47)"),
+ N_("Reserved kadm error (48)"),
+ N_("Reserved kadm error (49)"),
+ N_("Reserved kadm error (50)"),
+ N_("Reserved kadm error (51)"),
+ N_("Reserved kadm error (52)"),
+ N_("Reserved kadm error (53)"),
+ N_("Reserved kadm error (54)"),
+ N_("Reserved kadm error (55)"),
+ N_("Reserved kadm error (56)"),
+ N_("Reserved kadm error (57)"),
+ N_("Reserved kadm error (58)"),
+ N_("Reserved kadm error (59)"),
+ N_("Reserved kadm error (60)"),
+ N_("Reserved kadm error (61)"),
+ N_("Reserved kadm error (62)"),
+ N_("Reserved kadm error (63)"),
+ N_("Null passwords are not allowed"),
+ N_("Password is too short"),
+ N_("Too few character classes in password"),
+ N_("Password is in the password dictionary"),
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_kadm_error_table = { text, -1783126272L, 68 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_kadm_error_table_r(struct et_list **list);
+void initialize_kadm_error_table(void);
+
+void initialize_kadm_error_table(void) {
+ initialize_kadm_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_kadm_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_kadm_error_table;
+ et->next = 0;
+ *end = et;
+}
diff --git a/lib/et/test_cases/heimdal2.et b/lib/et/test_cases/heimdal2.et
new file mode 100644
index 0000000..703600c
--- /dev/null
+++ b/lib/et/test_cases/heimdal2.et
@@ -0,0 +1,65 @@
+# $Id: kadm_err.et,v 1.5 1998/01/16 23:11:27 joda Exp $
+#
+# Copyright 1988 by the Massachusetts Institute of Technology.
+#
+# For copying and distribution information, please see the file
+# <mit-copyright.h>.
+#
+# Kerberos administration server error table
+#
+ et kadm
+
+# KADM_SUCCESS, as all success codes should be, is zero
+
+ec KADM_RCSID, "$Id: kadm_err.et,v 1.5 1998/01/16 23:11:27 joda Exp $"
+# /* Building and unbuilding the packet errors */
+ec KADM_NO_REALM, "Cannot fetch local realm"
+ec KADM_NO_CRED, "Unable to fetch credentials"
+ec KADM_BAD_KEY, "Bad key supplied"
+ec KADM_NO_ENCRYPT, "Can't encrypt data"
+ec KADM_NO_AUTH, "Cannot encode/decode authentication info"
+ec KADM_WRONG_REALM, "Principal attempting change is in wrong realm"
+ec KADM_NO_ROOM, "Packet is too large"
+ec KADM_BAD_VER, "Version number is incorrect"
+ec KADM_BAD_CHK, "Checksum does not match"
+ec KADM_NO_READ, "Unsealing private data failed"
+ec KADM_NO_OPCODE, "Unsupported operation"
+ec KADM_NO_HOST, "Could not find administrating host"
+ec KADM_UNK_HOST, "Administrating host name is unknown"
+ec KADM_NO_SERV, "Could not find service name in services database"
+ec KADM_NO_SOCK, "Could not create socket"
+ec KADM_NO_CONN, "Could not connect to server"
+ec KADM_NO_HERE, "Could not fetch local socket address"
+ec KADM_NO_MAST, "Could not fetch master key"
+ec KADM_NO_VERI, "Could not verify master key"
+
+# /* From the server side routines */
+ec KADM_INUSE, "Entry already exists in database"
+ec KADM_UK_SERROR, "Database store error"
+ec KADM_UK_RERROR, "Database read error"
+ec KADM_UNAUTH, "Insufficient access to perform requested operation"
+# KADM_DATA isn't really an error, but...
+ec KADM_DATA, "Data is available for return to client"
+ec KADM_NOENTRY, "No such entry in the database"
+
+ec KADM_NOMEM, "Memory exhausted"
+ec KADM_NO_HOSTNAME, "Could not fetch system hostname"
+ec KADM_NO_BIND, "Could not bind port"
+ec KADM_LENGTH_ERROR, "Length mismatch problem"
+ec KADM_ILL_WILDCARD, "Illegal use of wildcard"
+
+ec KADM_DB_INUSE, "Database is locked or in use--try again later"
+
+ec KADM_INSECURE_PW, "Insecure password rejected"
+ec KADM_PW_MISMATCH, "Cleartext password and DES key did not match"
+
+ec KADM_NOT_SERV_PRINC, "Invalid principal for change srvtab request"
+ec KADM_IMMUTABLE, "Attempt do delete immutable principal"
+# password quality basically stolen from OV libkadm5
+index 64
+prefix KADM_PASS_Q
+ec NULL, "Null passwords are not allowed"
+ec TOOSHORT, "Password is too short"
+ec CLASS, "Too few character classes in password"
+ec DICT, "Password is in the password dictionary"
+end
diff --git a/lib/et/test_cases/heimdal2.h b/lib/et/test_cases/heimdal2.h
new file mode 100644
index 0000000..3c2cb7d
--- /dev/null
+++ b/lib/et/test_cases/heimdal2.h
@@ -0,0 +1,58 @@
+/*
+ * heimdal2.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define KADM_RCSID (-1783126272L)
+#define KADM_NO_REALM (-1783126271L)
+#define KADM_NO_CRED (-1783126270L)
+#define KADM_BAD_KEY (-1783126269L)
+#define KADM_NO_ENCRYPT (-1783126268L)
+#define KADM_NO_AUTH (-1783126267L)
+#define KADM_WRONG_REALM (-1783126266L)
+#define KADM_NO_ROOM (-1783126265L)
+#define KADM_BAD_VER (-1783126264L)
+#define KADM_BAD_CHK (-1783126263L)
+#define KADM_NO_READ (-1783126262L)
+#define KADM_NO_OPCODE (-1783126261L)
+#define KADM_NO_HOST (-1783126260L)
+#define KADM_UNK_HOST (-1783126259L)
+#define KADM_NO_SERV (-1783126258L)
+#define KADM_NO_SOCK (-1783126257L)
+#define KADM_NO_CONN (-1783126256L)
+#define KADM_NO_HERE (-1783126255L)
+#define KADM_NO_MAST (-1783126254L)
+#define KADM_NO_VERI (-1783126253L)
+#define KADM_INUSE (-1783126252L)
+#define KADM_UK_SERROR (-1783126251L)
+#define KADM_UK_RERROR (-1783126250L)
+#define KADM_UNAUTH (-1783126249L)
+#define KADM_DATA (-1783126248L)
+#define KADM_NOENTRY (-1783126247L)
+#define KADM_NOMEM (-1783126246L)
+#define KADM_NO_HOSTNAME (-1783126245L)
+#define KADM_NO_BIND (-1783126244L)
+#define KADM_LENGTH_ERROR (-1783126243L)
+#define KADM_ILL_WILDCARD (-1783126242L)
+#define KADM_DB_INUSE (-1783126241L)
+#define KADM_INSECURE_PW (-1783126240L)
+#define KADM_PW_MISMATCH (-1783126239L)
+#define KADM_NOT_SERV_PRINC (-1783126238L)
+#define KADM_IMMUTABLE (-1783126237L)
+#define KADM_PASS_Q_NULL (-1783126208L)
+#define KADM_PASS_Q_TOOSHORT (-1783126207L)
+#define KADM_PASS_Q_CLASS (-1783126206L)
+#define KADM_PASS_Q_DICT (-1783126205L)
+extern const struct error_table et_kadm_error_table;
+extern void initialize_kadm_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_kadm_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_kadm (-1783126272L)
+
+/* for compatibility with older versions... */
+#define init_kadm_err_tbl initialize_kadm_error_table
+#define kadm_err_base ERROR_TABLE_BASE_kadm
diff --git a/lib/et/test_cases/heimdal3.c b/lib/et/test_cases/heimdal3.c
new file mode 100644
index 0000000..b8b9b73
--- /dev/null
+++ b/lib/et/test_cases/heimdal3.c
@@ -0,0 +1,56 @@
+/*
+ * heimdal3.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+#define N_(a) a
+
+static const char * const text[] = {
+ N_("Test message 1"),
+ N_("Test message 2"),
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_h3test_error_table = { text, 43787520L, 2 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_h3test_error_table_r(struct et_list **list);
+void initialize_h3test_error_table(void);
+
+void initialize_h3test_error_table(void) {
+ initialize_h3test_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_h3test_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_h3test_error_table;
+ et->next = 0;
+ *end = et;
+}
diff --git a/lib/et/test_cases/heimdal3.et b/lib/et/test_cases/heimdal3.et
new file mode 100644
index 0000000..a0bd5c1
--- /dev/null
+++ b/lib/et/test_cases/heimdal3.et
@@ -0,0 +1,5 @@
+error_table ovk h3test
+prefix H3TEST
+ec TEST1, "Test message 1"
+ec TEST2, "Test message 2"
+end
diff --git a/lib/et/test_cases/heimdal3.h b/lib/et/test_cases/heimdal3.h
new file mode 100644
index 0000000..91d2cb9
--- /dev/null
+++ b/lib/et/test_cases/heimdal3.h
@@ -0,0 +1,20 @@
+/*
+ * heimdal3.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define H3TEST_TEST1 (43787520L)
+#define H3TEST_TEST2 (43787521L)
+extern const struct error_table et_h3test_error_table;
+extern void initialize_h3test_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_h3test_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_h3test (43787520L)
+
+/* for compatibility with older versions... */
+#define init_h3test_err_tbl initialize_h3test_error_table
+#define h3test_err_base ERROR_TABLE_BASE_h3test
diff --git a/lib/et/test_cases/imap_err.c b/lib/et/test_cases/imap_err.c
new file mode 100644
index 0000000..4d2ffc6
--- /dev/null
+++ b/lib/et/test_cases/imap_err.c
@@ -0,0 +1,115 @@
+/*
+ * imap_err.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+#define N_(a) a
+
+static const char * const text[] = {
+ N_( "Internal Error"),
+ N_( "System I/O error"),
+ N_( "Item does not exist"),
+ N_( "Operating System Error"),
+ N_( "mail system storage has been exceeded"),
+ N_( "Permission denied"),
+ N_( "Over quota"),
+ N_( "Message size exceeds fixed limit"),
+ N_( "Too many user flags in mailbox"),
+ N_( "Invalid namespace prefix in configuration file"),
+ N_( "Mailbox has an invalid format"),
+ N_( "Replication inconsistency detected"),
+ N_( "Mailbox format corruption detected"),
+ N_( "Operation is not supported on mailbox"),
+ N_( "Mailbox does not exist"),
+ N_( "Mailbox already exists"),
+ N_( "Invalid mailbox name"),
+ N_( "Invalid mailbox type"),
+ N_( "Mailbox has been moved to another server"),
+ N_( "Mailbox is currently reserved"),
+ N_( "Mailbox is locked"),
+ N_( "Delivery to mailbox is disabled"),
+ N_( "Unknown/invalid partition"),
+ N_( "Invalid identifier"),
+ N_( "Message contains NUL characters"),
+ N_( "Message contains bare newlines"),
+ N_( "Message contains non-ASCII characters in headers"),
+ N_( "Message contains invalid header"),
+ N_( "Message has no header/body separator"),
+ N_( "Quota root does not exist"),
+ N_( "Bad protocol"),
+ N_( "Syntax error in parameters"),
+ N_( "Invalid annotation entry"),
+ N_( "Invalid annotation attribute"),
+ N_( "Invalid annotation value"),
+ N_( "Bad URL"),
+ N_( "Zero-length message literal"),
+ N_( "Invalid server requested"),
+ N_( "Server(s) unavailable to complete operation"),
+ N_( "The remote Server(s) denied the operation"),
+ N_( "Retry operation"),
+ N_( "This mailbox hierarchy does not exist on a single backend server."),
+ N_( "The remote server does not support MULTIAPPEND"),
+ N_( "Unrecognized character set"),
+ N_( "Invalid user"),
+ N_( "Login incorrect"),
+ N_( "Anonymous login is not permitted"),
+ N_( "Unsupported quota resource"),
+ N_( "Authentication failed"),
+ N_( "Client cancelled authentication"),
+ N_( "Protocol error during authentication"),
+ N_( "Mailbox is over %s quota"),
+ N_( "Mailbox is at %d%% of %s quota"),
+ N_( "Message %d no longer exists"),
+ N_( "Unable to checkpoint \\Seen state"),
+ N_( "Unable to preserve \\Seen state"),
+ N_( "No matching messages"),
+ N_( "No matching annotations"),
+ N_( "[UNKNOWN-CTE] Can not process the binary data"),
+ N_( "LOGOUT received"),
+ N_( "Completed"),
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_imap_error_table = { text, -1904809472L, 61 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_imap_error_table_r(struct et_list **list);
+void initialize_imap_error_table(void);
+
+void initialize_imap_error_table(void) {
+ initialize_imap_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_imap_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_imap_error_table;
+ et->next = 0;
+ *end = et;
+}
diff --git a/lib/et/test_cases/imap_err.et b/lib/et/test_cases/imap_err.et
new file mode 100644
index 0000000..bfae243
--- /dev/null
+++ b/lib/et/test_cases/imap_err.et
@@ -0,0 +1,238 @@
+# imap_err.et -- Error codes for Cyrus IMAP server programs
+#
+# Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# 3. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any legal
+# details, please contact
+# Carnegie Mellon University
+# Center for Technology Transfer and Enterprise Creation
+# 4615 Forbes Avenue
+# Suite 302
+# Pittsburgh, PA 15213
+# (412) 268-7393, fax: (412) 268-7395
+# innovation@andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+error_table imap
+
+ec IMAP_INTERNAL,
+ "Internal Error"
+
+ec IMAP_IOERROR,
+ "System I/O error"
+
+ec IMAP_NOTFOUND,
+ "Item does not exist"
+
+ec IMAP_SYS_ERROR,
+ "Operating System Error"
+
+ec IMAP_NOSPACE,
+ "mail system storage has been exceeded"
+
+ec IMAP_PERMISSION_DENIED,
+ "Permission denied"
+
+ec IMAP_QUOTA_EXCEEDED,
+ "Over quota"
+
+ec IMAP_MESSAGE_TOO_LARGE,
+ "Message size exceeds fixed limit"
+
+ec IMAP_USERFLAG_EXHAUSTED,
+ "Too many user flags in mailbox"
+
+ec IMAP_NAMESPACE_BADPREFIX,
+ "Invalid namespace prefix in configuration file"
+
+ec IMAP_MAILBOX_BADFORMAT,
+ "Mailbox has an invalid format"
+
+ec IMAP_SYNC_CHECKSUM,
+ "Replication inconsistency detected"
+
+ec IMAP_MAILBOX_CHECKSUM,
+ "Mailbox format corruption detected"
+
+ec IMAP_MAILBOX_NOTSUPPORTED,
+ "Operation is not supported on mailbox"
+
+ec IMAP_MAILBOX_NONEXISTENT,
+ "Mailbox does not exist"
+
+ec IMAP_MAILBOX_EXISTS,
+ "Mailbox already exists"
+
+ec IMAP_MAILBOX_BADNAME,
+ "Invalid mailbox name"
+
+ec IMAP_MAILBOX_BADTYPE,
+ "Invalid mailbox type"
+
+ec IMAP_MAILBOX_MOVED,
+ "Mailbox has been moved to another server"
+
+ec IMAP_MAILBOX_RESERVED,
+ "Mailbox is currently reserved"
+
+ec IMAP_MAILBOX_LOCKED,
+ "Mailbox is locked"
+
+ec IMAP_MAILBOX_DISABLED,
+ "Delivery to mailbox is disabled"
+
+ec IMAP_PARTITION_UNKNOWN,
+ "Unknown/invalid partition"
+
+ec IMAP_INVALID_IDENTIFIER,
+ "Invalid identifier"
+
+ec IMAP_MESSAGE_CONTAINSNULL,
+ "Message contains NUL characters"
+
+ec IMAP_MESSAGE_CONTAINSNL,
+ "Message contains bare newlines"
+
+ec IMAP_MESSAGE_CONTAINS8BIT,
+ "Message contains non-ASCII characters in headers"
+
+ec IMAP_MESSAGE_BADHEADER,
+ "Message contains invalid header"
+
+ec IMAP_MESSAGE_NOBLANKLINE,
+ "Message has no header/body separator"
+
+ec IMAP_QUOTAROOT_NONEXISTENT,
+ "Quota root does not exist"
+
+ec IMAP_PROTOCOL_ERROR,
+ "Bad protocol"
+
+ec IMAP_PROTOCOL_BAD_PARAMETERS,
+ "Syntax error in parameters"
+
+ec IMAP_ANNOTATION_BADENTRY,
+ "Invalid annotation entry"
+
+ec IMAP_ANNOTATION_BADATTRIB,
+ "Invalid annotation attribute"
+
+ec IMAP_ANNOTATION_BADVALUE,
+ "Invalid annotation value"
+
+ec IMAP_BADURL,
+ "Bad URL"
+
+ec IMAP_ZERO_LENGTH_LITERAL,
+ "Zero-length message literal"
+
+# following used only proxy/db operations
+ec IMAP_BAD_SERVER,
+ "Invalid server requested"
+
+ec IMAP_SERVER_UNAVAILABLE,
+ "Server(s) unavailable to complete operation"
+
+ec IMAP_REMOTE_DENIED,
+ "The remote Server(s) denied the operation"
+
+ec IMAP_AGAIN,
+ "Retry operation"
+
+ec IMAP_NOT_SINGULAR_ROOT,
+ "This mailbox hierarchy does not exist on a single backend server."
+
+ec IMAP_REMOTE_NO_MULTIAPPEND,
+ "The remote server does not support MULTIAPPEND"
+
+# Following only used for internationalization of error messages
+
+ec IMAP_UNRECOGNIZED_CHARSET,
+ "Unrecognized character set"
+
+ec IMAP_INVALID_USER,
+ "Invalid user"
+
+ec IMAP_INVALID_LOGIN,
+ "Login incorrect"
+
+ec IMAP_ANONYMOUS_NOT_PERMITTED,
+ "Anonymous login is not permitted"
+
+ec IMAP_UNSUPPORTED_QUOTA,
+ "Unsupported quota resource"
+
+# Following used only for SASL operations
+
+ec IMAP_SASL_FAIL,
+ "Authentication failed"
+
+ec IMAP_SASL_CANCEL,
+ "Client cancelled authentication"
+
+ec IMAP_SASL_PROTERR,
+ "Protocol error during authentication"
+
+# Following used for internationalization of untagged OK/NO responses
+
+ec IMAP_NO_OVERQUOTA,
+ "Mailbox is over %s quota"
+
+ec IMAP_NO_CLOSEQUOTA,
+ "Mailbox is at %d%% of %s quota"
+
+ec IMAP_NO_MSGGONE,
+ "Message %d no longer exists"
+
+ec IMAP_NO_CHECKSEEN,
+ "Unable to checkpoint \\Seen state"
+
+ec IMAP_NO_CHECKPRESERVE,
+ "Unable to preserve \\Seen state"
+
+ec IMAP_NO_NOSUCHMSG,
+ "No matching messages"
+
+ec IMAP_NO_NOSUCHANNOTATION,
+ "No matching annotations"
+
+ec IMAP_NO_UNKNOWN_CTE,
+ "[UNKNOWN-CTE] Can not process the binary data"
+
+# Following used for internationalization of untagged BYE response
+
+ec IMAP_BYE_LOGOUT,
+ "LOGOUT received"
+
+# Following used for internationalization of tagged OK response
+
+ec IMAP_OK_COMPLETED,
+ "Completed"
+
+end
diff --git a/lib/et/test_cases/imap_err.h b/lib/et/test_cases/imap_err.h
new file mode 100644
index 0000000..bfa8f65
--- /dev/null
+++ b/lib/et/test_cases/imap_err.h
@@ -0,0 +1,79 @@
+/*
+ * imap_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define IMAP_INTERNAL (-1904809472L)
+#define IMAP_IOERROR (-1904809471L)
+#define IMAP_NOTFOUND (-1904809470L)
+#define IMAP_SYS_ERROR (-1904809469L)
+#define IMAP_NOSPACE (-1904809468L)
+#define IMAP_PERMISSION_DENIED (-1904809467L)
+#define IMAP_QUOTA_EXCEEDED (-1904809466L)
+#define IMAP_MESSAGE_TOO_LARGE (-1904809465L)
+#define IMAP_USERFLAG_EXHAUSTED (-1904809464L)
+#define IMAP_NAMESPACE_BADPREFIX (-1904809463L)
+#define IMAP_MAILBOX_BADFORMAT (-1904809462L)
+#define IMAP_SYNC_CHECKSUM (-1904809461L)
+#define IMAP_MAILBOX_CHECKSUM (-1904809460L)
+#define IMAP_MAILBOX_NOTSUPPORTED (-1904809459L)
+#define IMAP_MAILBOX_NONEXISTENT (-1904809458L)
+#define IMAP_MAILBOX_EXISTS (-1904809457L)
+#define IMAP_MAILBOX_BADNAME (-1904809456L)
+#define IMAP_MAILBOX_BADTYPE (-1904809455L)
+#define IMAP_MAILBOX_MOVED (-1904809454L)
+#define IMAP_MAILBOX_RESERVED (-1904809453L)
+#define IMAP_MAILBOX_LOCKED (-1904809452L)
+#define IMAP_MAILBOX_DISABLED (-1904809451L)
+#define IMAP_PARTITION_UNKNOWN (-1904809450L)
+#define IMAP_INVALID_IDENTIFIER (-1904809449L)
+#define IMAP_MESSAGE_CONTAINSNULL (-1904809448L)
+#define IMAP_MESSAGE_CONTAINSNL (-1904809447L)
+#define IMAP_MESSAGE_CONTAINS8BIT (-1904809446L)
+#define IMAP_MESSAGE_BADHEADER (-1904809445L)
+#define IMAP_MESSAGE_NOBLANKLINE (-1904809444L)
+#define IMAP_QUOTAROOT_NONEXISTENT (-1904809443L)
+#define IMAP_PROTOCOL_ERROR (-1904809442L)
+#define IMAP_PROTOCOL_BAD_PARAMETERS (-1904809441L)
+#define IMAP_ANNOTATION_BADENTRY (-1904809440L)
+#define IMAP_ANNOTATION_BADATTRIB (-1904809439L)
+#define IMAP_ANNOTATION_BADVALUE (-1904809438L)
+#define IMAP_BADURL (-1904809437L)
+#define IMAP_ZERO_LENGTH_LITERAL (-1904809436L)
+#define IMAP_BAD_SERVER (-1904809435L)
+#define IMAP_SERVER_UNAVAILABLE (-1904809434L)
+#define IMAP_REMOTE_DENIED (-1904809433L)
+#define IMAP_AGAIN (-1904809432L)
+#define IMAP_NOT_SINGULAR_ROOT (-1904809431L)
+#define IMAP_REMOTE_NO_MULTIAPPEND (-1904809430L)
+#define IMAP_UNRECOGNIZED_CHARSET (-1904809429L)
+#define IMAP_INVALID_USER (-1904809428L)
+#define IMAP_INVALID_LOGIN (-1904809427L)
+#define IMAP_ANONYMOUS_NOT_PERMITTED (-1904809426L)
+#define IMAP_UNSUPPORTED_QUOTA (-1904809425L)
+#define IMAP_SASL_FAIL (-1904809424L)
+#define IMAP_SASL_CANCEL (-1904809423L)
+#define IMAP_SASL_PROTERR (-1904809422L)
+#define IMAP_NO_OVERQUOTA (-1904809421L)
+#define IMAP_NO_CLOSEQUOTA (-1904809420L)
+#define IMAP_NO_MSGGONE (-1904809419L)
+#define IMAP_NO_CHECKSEEN (-1904809418L)
+#define IMAP_NO_CHECKPRESERVE (-1904809417L)
+#define IMAP_NO_NOSUCHMSG (-1904809416L)
+#define IMAP_NO_NOSUCHANNOTATION (-1904809415L)
+#define IMAP_NO_UNKNOWN_CTE (-1904809414L)
+#define IMAP_BYE_LOGOUT (-1904809413L)
+#define IMAP_OK_COMPLETED (-1904809412L)
+extern const struct error_table et_imap_error_table;
+extern void initialize_imap_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_imap_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_imap (-1904809472L)
+
+/* for compatibility with older versions... */
+#define init_imap_err_tbl initialize_imap_error_table
+#define imap_err_base ERROR_TABLE_BASE_imap
diff --git a/lib/et/test_cases/simple.c b/lib/et/test_cases/simple.c
new file mode 100644
index 0000000..10ab1a3
--- /dev/null
+++ b/lib/et/test_cases/simple.c
@@ -0,0 +1,76 @@
+/*
+ * simple.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+#define N_(a) a
+
+static const char * const text[] = {
+ N_( "Can't read ticket file"),
+ N_( "Can't find ticket or TGT"),
+ N_( "TGT expired"),
+ N_( "Can't decode authenticator"),
+ N_( "Ticket expired"),
+ N_( "Repeated request"),
+ N_( "The ticket isn't for us"),
+ N_( "Request is inconsistent"),
+ N_( "Delta-T too big"),
+ N_( "Incorrect net address"),
+ N_( "Protocol version mismatch"),
+ N_( "Invalid message type"),
+ N_( "Message stream modified"),
+ N_( "Message out of order"),
+ N_( "Unauthorized request"),
+ N_( "Current password is null"),
+ N_( "Incorrect current password"),
+ N_( "Protocol error"),
+ N_( "Error returned by KDC"),
+ N_( "Null ticket returned by KDC"),
+ N_( "Retry count exceeded"),
+ N_( "Can't send request"),
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_krb_error_table = { text, 39525376L, 22 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_krb_error_table_r(struct et_list **list);
+void initialize_krb_error_table(void);
+
+void initialize_krb_error_table(void) {
+ initialize_krb_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_krb_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_krb_error_table;
+ et->next = 0;
+ *end = et;
+}
diff --git a/lib/et/test_cases/simple.et b/lib/et/test_cases/simple.et
new file mode 100644
index 0000000..4c7b77f
--- /dev/null
+++ b/lib/et/test_cases/simple.et
@@ -0,0 +1,69 @@
+ error_table krb
+
+ error_code KRB_MK_AP_TKFIL,
+ "Can't read ticket file"
+
+ ec KRB_MK_AP_NOTKT,
+ "Can't find ticket or TGT"
+
+ ec KRB_MK_AP_TGTEXP,
+ "TGT expired"
+
+ ec KRB_RD_AP_UNDEC,
+ "Can't decode authenticator"
+
+ ec KRB_RD_AP_EXP,
+ "Ticket expired"
+
+ ec KRB_RD_AP_REPEAT,
+ "Repeated request"
+
+ ec KRB_RD_AP_NOT_US,
+ "The ticket isn't for us"
+
+ ec KRB_RD_AP_INCON,
+ "Request is inconsistent"
+
+ ec KRB_RD_AP_TIME,
+ "Delta-T too big"
+
+ ec KRB_RD_AP_BADD,
+ "Incorrect net address"
+
+ ec KRB_RD_AP_VERSION,
+ "Protocol version mismatch"
+
+ ec KRB_RD_AP_MSG_TYPE,
+ "Invalid message type"
+
+ ec KRB_RD_AP_MODIFIED,
+ "Message stream modified"
+
+ ec KRB_RD_AP_ORDER,
+ "Message out of order"
+
+ ec KRB_RD_AP_UNAUTHOR,
+ "Unauthorized request"
+
+ ec KRB_GT_PW_NULL,
+ "Current password is null"
+
+ ec KRB_GT_PW_BADPW,
+ "Incorrect current password"
+
+ ec KRB_GT_PW_PROT,
+ "Protocol error"
+
+ ec KRB_GT_PW_KDCERR,
+ "Error returned by KDC"
+
+ ec KRB_GT_PW_NULLTKT,
+ "Null ticket returned by KDC"
+
+ ec KRB_SKDC_RETRY,
+ "Retry count exceeded"
+
+ ec KRB_SKDC_CANT,
+ "Can't send request"
+
+ end
diff --git a/lib/et/test_cases/simple.h b/lib/et/test_cases/simple.h
new file mode 100644
index 0000000..e7800b7
--- /dev/null
+++ b/lib/et/test_cases/simple.h
@@ -0,0 +1,40 @@
+/*
+ * simple.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define KRB_MK_AP_TKFIL (39525376L)
+#define KRB_MK_AP_NOTKT (39525377L)
+#define KRB_MK_AP_TGTEXP (39525378L)
+#define KRB_RD_AP_UNDEC (39525379L)
+#define KRB_RD_AP_EXP (39525380L)
+#define KRB_RD_AP_REPEAT (39525381L)
+#define KRB_RD_AP_NOT_US (39525382L)
+#define KRB_RD_AP_INCON (39525383L)
+#define KRB_RD_AP_TIME (39525384L)
+#define KRB_RD_AP_BADD (39525385L)
+#define KRB_RD_AP_VERSION (39525386L)
+#define KRB_RD_AP_MSG_TYPE (39525387L)
+#define KRB_RD_AP_MODIFIED (39525388L)
+#define KRB_RD_AP_ORDER (39525389L)
+#define KRB_RD_AP_UNAUTHOR (39525390L)
+#define KRB_GT_PW_NULL (39525391L)
+#define KRB_GT_PW_BADPW (39525392L)
+#define KRB_GT_PW_PROT (39525393L)
+#define KRB_GT_PW_KDCERR (39525394L)
+#define KRB_GT_PW_NULLTKT (39525395L)
+#define KRB_SKDC_RETRY (39525396L)
+#define KRB_SKDC_CANT (39525397L)
+extern const struct error_table et_krb_error_table;
+extern void initialize_krb_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_krb_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_krb (39525376L)
+
+/* for compatibility with older versions... */
+#define init_krb_err_tbl initialize_krb_error_table
+#define krb_err_base ERROR_TABLE_BASE_krb
diff --git a/lib/et/texinfo.tex b/lib/et/texinfo.tex
new file mode 100644
index 0000000..dd52615
--- /dev/null
+++ b/lib/et/texinfo.tex
@@ -0,0 +1,7226 @@
+% texinfo.tex -- TeX macros to handle Texinfo files.
+%
+% Load plain if necessary, i.e., if running under initex.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+%
+\def\texinfoversion{2006-02-13.16}
+%
+% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
+% Software Foundation, Inc.
+%
+% This texinfo.tex file is free software; you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation; either version 2, or (at
+% your option) any later version.
+%
+% This texinfo.tex file is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this texinfo.tex file; see the file COPYING. If not, write
+% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+% Boston, MA 02110-1301, USA.
+%
+% As a special exception, when this file is read by TeX when processing
+% a Texinfo source document, you may use the result without
+% restriction. (This has been our intent since Texinfo was invented.)
+%
+% Please try the latest version of texinfo.tex before submitting bug
+% reports; you can get the latest version from:
+% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
+% ftp://tug.org/tex/texinfo.tex
+% (and all CTAN mirrors, see http://www.ctan.org).
+% The texinfo.tex in any given distribution could well be out
+% of date, so if that's what you're using, please check.
+%
+% Send bug reports to bug-texinfo@gnu.org. Please include including a
+% complete document in each bug report with which we can reproduce the
+% problem. Patches are, of course, greatly appreciated.
+%
+% To process a Texinfo manual with TeX, it's most reliable to use the
+% texi2dvi shell script that comes with the distribution. For a simple
+% manual foo.texi, however, you can get away with this:
+% tex foo.texi
+% texindex foo.??
+% tex foo.texi
+% tex foo.texi
+% dvips foo.dvi -o # or whatever; this makes foo.ps.
+% The extra TeX runs get the cross-reference information correct.
+% Sometimes one run after texindex suffices, and sometimes you need more
+% than two; texi2dvi does it as many times as necessary.
+%
+% It is possible to adapt texinfo.tex for other languages, to some
+% extent. You can get the existing language-specific files from the
+% full Texinfo distribution.
+%
+% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+
+
+\message{Loading texinfo [version \texinfoversion]:}
+
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}%
+ \catcode`+=\active \catcode`\_=\active}
+
+\message{Basics,}
+\chardef\other=12
+
+% We never want plain's \outer definition of \+ in Texinfo.
+% For @tex, we can use \tabalign.
+\let\+ = \relax
+
+% Save some plain tex macros whose names we will redefine.
+\let\ptexb=\b
+\let\ptexbullet=\bullet
+\let\ptexc=\c
+\let\ptexcomma=\,
+\let\ptexdot=\.
+\let\ptexdots=\dots
+\let\ptexend=\end
+\let\ptexequiv=\equiv
+\let\ptexexclam=\!
+\let\ptexfootnote=\footnote
+\let\ptexgtr=>
+\let\ptexhat=^
+\let\ptexi=\i
+\let\ptexindent=\indent
+\let\ptexinsert=\insert
+\let\ptexlbrace=\{
+\let\ptexless=<
+\let\ptexnewwrite\newwrite
+\let\ptexnoindent=\noindent
+\let\ptexplus=+
+\let\ptexrbrace=\}
+\let\ptexslash=\/
+\let\ptexstar=\*
+\let\ptext=\t
+
+% If this character appears in an error message or help string, it
+% starts a new line in the output.
+\newlinechar = `^^J
+
+% Use TeX 3.0's \inputlineno to get the line number, for better error
+% messages, but if we're using an old version of TeX, don't do anything.
+%
+\ifx\inputlineno\thisisundefined
+ \let\linenumber = \empty % Pre-3.0.
+\else
+ \def\linenumber{l.\the\inputlineno:\space}
+\fi
+
+% Set up fixed words for English if not already set.
+\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
+\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
+\ifx\putwordin\undefined \gdef\putwordin{in}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
+\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
+\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
+\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
+\ifx\putwordof\undefined \gdef\putwordof{of}\fi
+\ifx\putwordon\undefined \gdef\putwordon{on}\fi
+\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
+\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
+\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
+\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
+\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
+\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
+\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
+%
+\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
+\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
+\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
+\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
+\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
+\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
+\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
+\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
+\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
+\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
+\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
+\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
+%
+\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
+\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
+\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
+\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
+\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
+
+% Since the category of space is not known, we have to be careful.
+\chardef\spacecat = 10
+\def\spaceisspace{\catcode`\ =\spacecat}
+
+% Ignore a token.
+%
+\def\gobble#1{}
+
+% The following is used inside several \edef's.
+\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
+
+% Hyphenation fixes.
+\hyphenation{
+ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
+ ap-pen-dix bit-map bit-maps
+ data-base data-bases eshell fall-ing half-way long-est man-u-script
+ man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
+ par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
+ spell-ing spell-ings
+ stand-alone strong-est time-stamp time-stamps which-ever white-space
+ wide-spread wrap-around
+}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt}
+
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
+
+% Sometimes it is convenient to have everything in the transcript file
+% and nothing on the terminal. We don't just call \tracingall here,
+% since that produces some useless output on the terminal. We also make
+% some effort to order the tracing commands to reduce output in the log
+% file; cf. trace.sty in LaTeX.
+%
+\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
+\def\loggingall{%
+ \tracingstats2
+ \tracingpages1
+ \tracinglostchars2 % 2 gives us more in etex
+ \tracingparagraphs1
+ \tracingoutput1
+ \tracingmacros2
+ \tracingrestores1
+ \showboxbreadth\maxdimen \showboxdepth\maxdimen
+ \ifx\eTeXversion\undefined\else % etex gives us more logging
+ \tracingscantokens1
+ \tracingifs1
+ \tracinggroups1
+ \tracingnesting2
+ \tracingassigns1
+ \fi
+ \tracingcommands3 % 3 gives us more in etex
+ \errorcontextlines16
+}%
+
+% add check for \lastpenalty to plain's definitions. If the last thing
+% we did was a \nobreak, we don't want to insert more space.
+%
+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi\fi}
+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi\fi}
+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi\fi}
+
+% For @cropmarks command.
+% Do @cropmarks to get crop marks.
+%
+\newif\ifcropmarks
+\let\cropmarks = \cropmarkstrue
+%
+% Dimensions to add cropmarks at corners.
+% Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
+\newdimen\cornerlong \cornerlong=1pc
+\newdimen\cornerthick \cornerthick=.3pt
+\newdimen\topandbottommargin \topandbottommargin=.75in
+
+% Main output routine.
+\chardef\PAGE = 255
+\output = {\onepageout{\pagecontents\PAGE}}
+
+\newbox\headlinebox
+\newbox\footlinebox
+
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions, but you have to call it yourself.
+\def\onepageout#1{%
+ \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+ %
+ \ifodd\pageno \advance\hoffset by \bindingoffset
+ \else \advance\hoffset by -\bindingoffset\fi
+ %
+ % Do this outside of the \shipout so @code etc. will be expanded in
+ % the headline as they should be, not taken literally (outputting ''code).
+ \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ %
+ {%
+ % Have to do this stuff outside the \shipout because we want it to
+ % take effect in \write's, yet the group defined by the \vbox ends
+ % before the \shipout runs.
+ %
+ \indexdummies % don't expand commands in the output.
+ \normalturnoffactive % \ in index entries must not stay \, e.g., if
+ % the page break happens to be in the middle of an example.
+ % We don't want .vr (or whatever) entries like this:
+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % "\acronym" won't work when it's read back in;
+ % it needs to be
+ % {\code {{\tt \backslashcurfont }acronym}
+ \shipout\vbox{%
+ % Do this early so pdf references go to the beginning of the page.
+ \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
+ %
+ \ifcropmarks \vbox to \outervsize\bgroup
+ \hsize = \outerhsize
+ \vskip-\topandbottommargin
+ \vtop to0pt{%
+ \line{\ewtop\hfil\ewtop}%
+ \nointerlineskip
+ \line{%
+ \vbox{\moveleft\cornerthick\nstop}%
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}%
+ }%
+ \vss}%
+ \vskip\topandbottommargin
+ \line\bgroup
+ \hfil % center the page within the outer (page) hsize.
+ \ifodd\pageno\hskip\bindingoffset\fi
+ \vbox\bgroup
+ \fi
+ %
+ \unvbox\headlinebox
+ \pagebody{#1}%
+ \ifdim\ht\footlinebox > 0pt
+ % Only leave this space if the footline is nonempty.
+ % (We lessened \vsize for it in \oddfootingxxx.)
+ % The \baselineskip=24pt in plain's \makefootline has no effect.
+ \vskip 2\baselineskip
+ \unvbox\footlinebox
+ \fi
+ %
+ \ifcropmarks
+ \egroup % end of \vbox\bgroup
+ \hfil\egroup % end of (centering) \line\bgroup
+ \vskip\topandbottommargin plus1fill minus1fill
+ \boxmaxdepth = \cornerthick
+ \vbox to0pt{\vss
+ \line{%
+ \vbox{\moveleft\cornerthick\nsbot}%
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}%
+ }%
+ \nointerlineskip
+ \line{\ewbot\hfil\ewbot}%
+ }%
+ \egroup % \vbox from first cropmarks clause
+ \fi
+ }% end of \shipout\vbox
+ }% end of group with \indexdummies
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+
+\newinsert\margin \dimen\margin=\maxdimen
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha@viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+ \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
+\dimen@=\dp#1 \unvbox#1
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
+}
+
+% Here are the rules for the cropmarks. Note that they are
+% offset so that the space between them is truly \outerhsize or \outervsize
+% (P. A. MacKay, 12 November, 1986)
+%
+\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
+\def\nstop{\vbox
+ {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
+\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
+\def\nsbot{\vbox
+ {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Parse an argument, then pass it to #1. The argument is the rest of
+% the input line (except we remove a trailing comment). #1 should be a
+% macro which expects an ordinary undelimited TeX argument.
+%
+\def\parsearg{\parseargusing{}}
+\def\parseargusing#1#2{%
+ \def\next{#2}%
+ \begingroup
+ \obeylines
+ \spaceisspace
+ #1%
+ \parseargline\empty% Insert the \empty token, see \finishparsearg below.
+}
+
+{\obeylines %
+ \gdef\parseargline#1^^M{%
+ \endgroup % End of the group started in \parsearg.
+ \argremovecomment #1\comment\ArgTerm%
+ }%
+}
+
+% First remove any @comment, then any @c comment.
+\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
+%
+% \argremovec might leave us with trailing space, e.g.,
+% @end itemize @c foo
+% This space token undergoes the same procedure and is eventually removed
+% by \finishparsearg.
+%
+\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
+\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
+\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
+ \def\temp{#3}%
+ \ifx\temp\empty
+ % We cannot use \next here, as it holds the macro to run;
+ % thus we reuse \temp.
+ \let\temp\finishparsearg
+ \else
+ \let\temp\argcheckspaces
+ \fi
+ % Put the space token in:
+ \temp#1 #3\ArgTerm
+}
+
+% If a _delimited_ argument is enclosed in braces, they get stripped; so
+% to get _exactly_ the rest of the line, we had to prevent such situation.
+% We prepended an \empty token at the very beginning and we expand it now,
+% just before passing the control to \next.
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
+% either the null string, or it ends with \^^M---thus there is no danger
+% that a pair of braces would be stripped.
+%
+% But first, we have to remove the trailing space token.
+%
+\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
+
+% \parseargdef\foo{...}
+% is roughly equivalent to
+% \def\foo{\parsearg\Xfoo}
+% \def\Xfoo#1{...}
+%
+% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
+% favourite TeX trick. --kasal, 16nov03
+
+\def\parseargdef#1{%
+ \expandafter \doparseargdef \csname\string#1\endcsname #1%
+}
+\def\doparseargdef#1#2{%
+ \def#2{\parsearg#1}%
+ \def#1##1%
+}
+
+% Several utility definitions with active space:
+{
+ \obeyspaces
+ \gdef\obeyedspace{ }
+
+ % Make each space character in the input produce a normal interword
+ % space in the output. Don't allow a line break at this space, as this
+ % is used only in environments like @example, where each line of input
+ % should produce a line of output anyway.
+ %
+ \gdef\sepspaces{\obeyspaces\let =\tie}
+
+ % If an index command is used in an @example environment, any spaces
+ % therein should become regular spaces in the raw index file, not the
+ % expansion of \tie (\leavevmode \penalty \@M \ ).
+ \gdef\unsepspaces{\let =\space}
+}
+
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+% Define the framework for environments in texinfo.tex. It's used like this:
+%
+% \envdef\foo{...}
+% \def\Efoo{...}
+%
+% It's the responsibility of \envdef to insert \begingroup before the
+% actual body; @end closes the group after calling \Efoo. \envdef also
+% defines \thisenv, so the current environment is known; @end checks
+% whether the environment name matches. The \checkenv macro can also be
+% used to check whether the current environment is the one expected.
+%
+% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
+% are not treated as environments; they don't open a group. (The
+% implementation of @end takes care not to call \endgroup in this
+% special case.)
+
+
+% At runtime, environments start with this:
+\def\startenvironment#1{\begingroup\def\thisenv{#1}}
+% initialize
+\let\thisenv\empty
+
+% ... but they get defined via ``\envdef\foo{...}'':
+\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
+\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+
+% Check whether we're in the right environment:
+\def\checkenv#1{%
+ \def\temp{#1}%
+ \ifx\thisenv\temp
+ \else
+ \badenverr
+ \fi
+}
+
+% Environment mismatch, #1 expected:
+\def\badenverr{%
+ \errhelp = \EMsimple
+ \errmessage{This command can appear only \inenvironment\temp,
+ not \inenvironment\thisenv}%
+}
+\def\inenvironment#1{%
+ \ifx#1\empty
+ out of any environment%
+ \else
+ in environment \expandafter\string#1%
+ \fi
+}
+
+% @end foo executes the definition of \Efoo.
+% But first, it executes a specialized version of \checkenv
+%
+\parseargdef\end{%
+ \if 1\csname iscond.#1\endcsname
+ \else
+ % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
+ \expandafter\checkenv\csname#1\endcsname
+ \csname E#1\endcsname
+ \endgroup
+ \fi
+}
+
+\newhelp\EMsimple{Press RETURN to continue.}
+
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\tt\char64}}
+
+% This is turned off because it was never documented
+% and you can use @w{...} around a quote to suppress ligatures.
+%% Define @` and @' to be the same as ` and '
+%% but suppressing ligatures.
+%\def\`{{`}}
+%\def\'{{'}}
+
+% Used to generate quoted braces.
+\def\mylbrace {{\tt\char123}}
+\def\myrbrace {{\tt\char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux/toc files.
+ \catcode`\{ = \other \catcode`\} = \other
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \c
+\let\dotaccent = \.
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \t
+\let\ubaraccent = \b
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ptexi
+ \else\ifx\temp\jmacro \j
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence. (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo. Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+ L\kern-.36em
+ {\setbox0=\hbox{T}%
+ \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
+ \kern-.15em
+ \TeX
+}
+
+% Be sure we're in horizontal mode when doing a tie, since we make space
+% equivalent to this in @example-like environments. Otherwise, a space
+% at the beginning of a line will start with \penalty -- and
+% since \penalty is valid in vertical mode, we'd end up putting the
+% penalty on the vertical list instead of in the new paragraph.
+{\catcode`@ = 11
+ % Avoid using \@M directly, because that causes trouble
+ % if the definition is written into an index file.
+ \global\let\tiepenalty = \@M
+ \gdef\tie{\leavevmode\penalty\tiepenalty\ }
+}
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break\hbox{}\ignorespaces}
+
+% @/ allows a line break.
+\let\/=\allowbreak
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=\endofsentencespacefactor\space}
+
+% @! is an end-of-sentence bang.
+\def\!{!\spacefactor=\endofsentencespacefactor\space}
+
+% @? is an end-of-sentence query.
+\def\?{?\spacefactor=\endofsentencespacefactor\space}
+
+% @frenchspacing on|off says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\parseargdef\frenchspacing{%
+ \def\temp{#1}%
+ \ifx\temp\onword \plainfrenchspacing
+ \else\ifx\temp\offword \plainnonfrenchspacing
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+ \fi\fi
+}
+
+% @w prevents a word break. Without the \leavevmode, @w at the
+% beginning of a paragraph, when TeX is still in vertical mode, would
+% produce a whole line of output instead of starting the paragraph.
+\def\w#1{\leavevmode\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page, by enclosing
+% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
+% to keep its height that of a normal line. According to the rules for
+% \topskip (p.114 of the TeXbook), the glue inserted is
+% max (\topskip - \ht (first item), 0). If that height is large,
+% therefore, no glue is inserted, and the space between the headline and
+% the text is small, which looks bad.
+%
+% Another complication is that the group might be very large. This can
+% cause the glue on the previous page to be unduly stretched, because it
+% does not have much material. In this case, it's better to add an
+% explicit \vfill so that the extra space is at the bottom. The
+% threshold for doing this is if the group is more than \vfilllimit
+% percent of a page (\vfilllimit can be changed inside of @tex).
+%
+\newbox\groupbox
+\def\vfilllimit{0.7}
+%
+\envdef\group{%
+ \ifnum\catcode`\^^M=\active \else
+ \errhelp = \groupinvalidhelp
+ \errmessage{@group invalid in context where filling is enabled}%
+ \fi
+ \startsavinginserts
+ %
+ \setbox\groupbox = \vtop\bgroup
+ % Do @comment since we are called inside an environment such as
+ % @example, where each end-of-line in the input causes an
+ % end-of-line in the output. We don't want the end-of-line after
+ % the `@group' to put extra space in the output. Since @group
+ % should appear on a line by itself (according to the Texinfo
+ % manual), we don't worry about eating any user text.
+ \comment
+}
+%
+% The \vtop produces a box with normal height and large depth; thus, TeX puts
+% \baselineskip glue before it, and (when the next line of text is done)
+% \lineskip glue after it. Thus, space below is not quite equal to space
+% above. But it's pretty close.
+\def\Egroup{%
+ % To get correct interline space between the last line of the group
+ % and the first line afterwards, we have to propagate \prevdepth.
+ \endgraf % Not \par, as it may have been set to \lisppar.
+ \global\dimen1 = \prevdepth
+ \egroup % End the \vtop.
+ % \dimen0 is the vertical size of the group's box.
+ \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
+ % \dimen2 is how much space is left on the page (more or less).
+ \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
+ % if the group doesn't fit on the current page, and it's a big big
+ % group, force a page break.
+ \ifdim \dimen0 > \dimen2
+ \ifdim \pagetotal < \vfilllimit\pageheight
+ \page
+ \fi
+ \fi
+ \box\groupbox
+ \prevdepth = \dimen1
+ \checkinserts
+}
+%
+% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
+% message, so this ends up printing `@group can only ...'.
+%
+\newhelp\groupinvalidhelp{%
+group can only be used in environments such as @example,^^J%
+where each line of input produces a line of output.}
+
+% @need space-in-mils
+% forces a page break if there is not space-in-mils remaining.
+
+\newdimen\mil \mil=0.001in
+
+% Old definition--didn't work.
+%\parseargdef\need{\par %
+%% This method tries to make TeX break the page naturally
+%% if the depth of the box does not fit.
+%{\baselineskip=0pt%
+%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
+%\prevdepth=-1000pt
+%}}
+
+\parseargdef\need{%
+ % Ensure vertical mode, so we don't make a big box in the middle of a
+ % paragraph.
+ \par
+ %
+ % If the @need value is less than one line space, it's useless.
+ \dimen0 = #1\mil
+ \dimen2 = \ht\strutbox
+ \advance\dimen2 by \dp\strutbox
+ \ifdim\dimen0 > \dimen2
+ %
+ % Do a \strut just to make the height of this box be normal, so the
+ % normal leading is inserted relative to the preceding line.
+ % And a page break here is fine.
+ \vtop to #1\mil{\strut\vfil}%
+ %
+ % TeX does not even consider page breaks if a penalty added to the
+ % main vertical list is 10000 or more. But in order to see if the
+ % empty box we just added fits on the page, we must make it consider
+ % page breaks. On the other hand, we don't want to actually break the
+ % page after the empty box. So we use a penalty of 9999.
+ %
+ % There is an extremely small chance that TeX will actually break the
+ % page at this \penalty, if there are no other feasible breakpoints in
+ % sight. (If the user is using lots of big @group commands, which
+ % almost-but-not-quite fill up a page, TeX will have a hard time doing
+ % good page breaking, for example.) However, I could not construct an
+ % example where a page broke at this \penalty; if it happens in a real
+ % document, then we can reconsider our strategy.
+ \penalty9999
+ %
+ % Back up by the size of the box, whether we did a page break or not.
+ \kern -#1\mil
+ %
+ % Do not allow a page break right after this kern.
+ \nobreak
+ \fi
+}
+
+% @br forces paragraph break (and is undocumented).
+
+\let\br = \par
+
+% @page forces the start of a new page.
+%
+\def\page{\par\vfill\supereject}
+
+% @exdent text....
+% outputs text on separate line in roman font, starting at standard page margin
+
+% This records the amount of indent in the innermost environment.
+% That's how much \exdent should take out.
+\newskip\exdentamount
+
+% This defn is used inside fill environments such as @defun.
+\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
+
+% This defn is used inside nofill environments such as @example.
+\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
+ \leftline{\hskip\leftskip{\rm#1}}}}
+
+% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
+% paragraph. For more general purposes, use the \margin insertion
+% class. WHICH is `l' or `r'.
+%
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+%
+\def\doinmargin#1#2{\strut\vadjust{%
+ \nobreak
+ \kern-\strutdepth
+ \vtop to \strutdepth{%
+ \baselineskip=\strutdepth
+ \vss
+ % if you have multiple lines of stuff to put here, you'll need to
+ % make the vbox yourself of the appropriate size.
+ \ifx#1l%
+ \llap{\ignorespaces #2\hskip\inmarginspacing}%
+ \else
+ \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
+ \fi
+ \null
+ }%
+}}
+\def\inleftmargin{\doinmargin l}
+\def\inrightmargin{\doinmargin r}
+%
+% @inmargin{TEXT [, RIGHT-TEXT]}
+% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
+% else use TEXT for both).
+%
+\def\inmargin#1{\parseinmargin #1,,\finish}
+\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \def\lefttext{#1}% have both texts
+ \def\righttext{#2}%
+ \else
+ \def\lefttext{#1}% have only one text
+ \def\righttext{#1}%
+ \fi
+ %
+ \ifodd\pageno
+ \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
+ \else
+ \def\temp{\inleftmargin\lefttext}%
+ \fi
+ \temp
+}
+
+% @include file insert text of that file as input.
+%
+\def\include{\parseargusing\filenamecatcodes\includezzz}
+\def\includezzz#1{%
+ \pushthisfilestack
+ \def\thisfile{#1}%
+ {%
+ \makevalueexpandable
+ \def\temp{\input #1 }%
+ \expandafter
+ }\temp
+ \popthisfilestack
+}
+\def\filenamecatcodes{%
+ \catcode`\\=\other
+ \catcode`~=\other
+ \catcode`^=\other
+ \catcode`_=\other
+ \catcode`|=\other
+ \catcode`<=\other
+ \catcode`>=\other
+ \catcode`+=\other
+ \catcode`-=\other
+}
+
+\def\pushthisfilestack{%
+ \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
+}
+\def\pushthisfilestackX{%
+ \expandafter\pushthisfilestackY\thisfile\StackTerm
+}
+\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
+ \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
+}
+
+\def\popthisfilestack{\errthisfilestackempty}
+\def\errthisfilestackempty{\errmessage{Internal error:
+ the stack of filenames is empty.}}
+
+\def\thisfile{}
+
+% @center line
+% outputs that line, centered.
+%
+\parseargdef\center{%
+ \ifhmode
+ \let\next\centerH
+ \else
+ \let\next\centerV
+ \fi
+ \next{\hfil \ignorespaces#1\unskip \hfil}%
+}
+\def\centerH#1{%
+ {%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+ }%
+}
+\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
+
+% @sp n outputs n lines of vertical space
+
+\parseargdef\sp{\vskip #1\baselineskip}
+
+% @comment ...line which is ignored...
+% @c is the same as @comment
+% @ignore ... @end ignore is another way to write a comment
+
+\def\comment{\begingroup \catcode`\^^M=\other%
+\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
+\commentxxx}
+{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
+
+\let\c=\comment
+
+% @paragraphindent NCHARS
+% We'll use ems for NCHARS, close enough.
+% NCHARS can also be the word `asis' or `none'.
+% We cannot feasibly implement @paragraphindent asis, though.
+%
+\def\asisword{asis} % no translation, these are keywords
+\def\noneword{none}
+%
+\parseargdef\paragraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \defaultparindent = 0pt
+ \else
+ \defaultparindent = #1em
+ \fi
+ \fi
+ \parindent = \defaultparindent
+}
+
+% @exampleindent NCHARS
+% We'll use ems for NCHARS like @paragraphindent.
+% It seems @exampleindent asis isn't necessary, but
+% I preserve it to make it similar to @paragraphindent.
+\parseargdef\exampleindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \lispnarrowing = 0pt
+ \else
+ \lispnarrowing = #1em
+ \fi
+ \fi
+}
+
+% @firstparagraphindent WORD
+% If WORD is `none', then suppress indentation of the first paragraph
+% after a section heading. If WORD is `insert', then do indent at such
+% paragraphs.
+%
+% The paragraph indentation is suppressed or not by calling
+% \suppressfirstparagraphindent, which the sectioning commands do.
+% We switch the definition of this back and forth according to WORD.
+% By default, we suppress indentation.
+%
+\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
+\def\insertword{insert}
+%
+\parseargdef\firstparagraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\noneword
+ \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
+ \else\ifx\temp\insertword
+ \let\suppressfirstparagraphindent = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @firstparagraphindent option `\temp'}%
+ \fi\fi
+}
+
+% Here is how we actually suppress indentation. Redefine \everypar to
+% \kern backwards by \parindent, and then reset itself to empty.
+%
+% We also make \indent itself not actually do anything until the next
+% paragraph.
+%
+\gdef\dosuppressfirstparagraphindent{%
+ \gdef\indent{%
+ \restorefirstparagraphindent
+ \indent
+ }%
+ \gdef\noindent{%
+ \restorefirstparagraphindent
+ \noindent
+ }%
+ \global\everypar = {%
+ \kern -\parindent
+ \restorefirstparagraphindent
+ }%
+}
+
+\gdef\restorefirstparagraphindent{%
+ \global \let \indent = \ptexindent
+ \global \let \noindent = \ptexnoindent
+ \global \everypar = {}%
+}
+
+
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+ \catcode`\_ = \active
+ \gdef\mathunderscore{%
+ \catcode`\_=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+ }
+}
+% Another complication: we want \\ (and @\) to output a \ character.
+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
+% this is not advertised and we don't care. Texinfo does not
+% otherwise define @\.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ $\finishmath
+}
+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+ \catcode`^ = \active
+ \catcode`< = \active
+ \catcode`> = \active
+ \catcode`+ = \active
+ \gdef\mathactive{%
+ \let^ = \ptexhat
+ \let< = \ptexless
+ \let> = \ptexgtr
+ \let+ = \ptexplus
+ }
+}
+
+% @bullet and @minus need the same treatment as @math, just above.
+\def\bullet{$\ptexbullet$}
+\def\minus{$-$}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in a typewriter
+% font as three actual period characters.
+%
+\def\dots{%
+ \leavevmode
+ \hbox to 1.5em{%
+ \hskip 0pt plus 0.25fil
+ .\hfil.\hfil.%
+ \hskip 0pt plus 0.5fil
+ }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \dots
+ \spacefactor=\endofsentencespacefactor
+}
+
+% @comma{} is so commas can be inserted into text without messing up
+% Texinfo's parsing.
+%
+\let\comma = ,
+
+% @refill is a no-op.
+\let\refill=\relax
+
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate (before @setfilename).
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% @setfilename is done at the beginning of every texinfo file.
+% So open here the files we need to have open while reading the input.
+% This makes it possible to make a .fmt file for texinfo.
+\def\setfilename{%
+ \fixbackslash % Turn off hack to swallow `\input texinfo'.
+ \iflinks
+ \tryauxfile
+ % Open the new aux file. TeX will close it automatically at exit.
+ \immediate\openout\auxfile=\jobname.aux
+ \fi % \openindices needs to do some work in any case.
+ \openindices
+ \let\setfilename=\comment % Ignore extra @setfilename cmds.
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc.
+ \openin 1 texinfo.cnf
+ \ifeof 1 \else \input texinfo.cnf \fi
+ \closein 1
+ %
+ \comment % Ignore the actual filename.
+}
+
+% Called from \setfilename.
+%
+\def\openindices{%
+ \newindex{cp}%
+ \newcodeindex{fn}%
+ \newcodeindex{vr}%
+ \newcodeindex{tp}%
+ \newcodeindex{ky}%
+ \newcodeindex{pg}%
+}
+
+% @bye.
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+
+\message{pdf,}
+% adobe `portable' document format
+\newcount\tempnum
+\newcount\lnkcount
+\newtoks\filename
+\newcount\filenamelength
+\newcount\pgn
+\newtoks\toksA
+\newtoks\toksB
+\newtoks\toksC
+\newtoks\toksD
+\newbox\boxA
+\newcount\countA
+\newif\ifpdf
+\newif\ifpdfmakepagedest
+
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as \undefined,
+% borrowed from ifpdf.sty.
+\ifx\pdfoutput\undefined
+\else
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+
+% PDF uses PostScript string constants for the names of xref targets,
+% for display in the outlines, and in other places. Thus, we have to
+% double any backslashes. Otherwise, a name like "\node" will be
+% interpreted as a newline (\n), followed by o, d, e. Not good.
+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% (and related messages, the final outcome is that it is up to the TeX
+% user to double the backslashes and otherwise make the string valid, so
+% that's what we do).
+
+% double active backslashes.
+%
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@activebackslashdouble{%
+ @catcode`@\=@active
+ @let\=@doublebackslash}
+}
+
+% To handle parens, we must adopt a different approach, since parens are
+% not active characters. hyperref.dtx (which has the same problem as
+% us) handles it with this amazing macro to replace tokens. I've
+% tinkered with it a little for texinfo, but it's definitely from there.
+%
+% #1 is the tokens to replace.
+% #2 is the replacement.
+% #3 is the control sequence with the string.
+%
+\def\HyPsdSubst#1#2#3{%
+ \def\HyPsdReplace##1#1##2\END{%
+ ##1%
+ \ifx\\##2\\%
+ \else
+ #2%
+ \HyReturnAfterFi{%
+ \HyPsdReplace##2\END
+ }%
+ \fi
+ }%
+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
+}
+\long\def\HyReturnAfterFi#1\fi{\fi#1}
+
+% #1 is a control sequence in which to do the replacements.
+\def\backslashparens#1{%
+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
+ % \lastnode when called from \setref -> \pdfmkdest.
+ \HyPsdSubst{(}{\realbackslash(}{#1}%
+ \HyPsdSubst{)}{\realbackslash)}{#1}%
+}
+
+\ifpdf
+ \input pdfcolor
+ \pdfcatalog{/PageMode /UseOutlines}%
+ \def\dopdfimage#1#2#3{%
+ \def\imagewidth{#2}%
+ \def\imageheight{#3}%
+ % without \immediate, pdftex seg faults when the same image is
+ % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
+ \ifnum\pdftexversion < 14
+ \immediate\pdfimage
+ \else
+ \immediate\pdfximage
+ \fi
+ \ifx\empty\imagewidth\else width \imagewidth \fi
+ \ifx\empty\imageheight\else height \imageheight \fi
+ \ifnum\pdftexversion<13
+ #1.pdf%
+ \else
+ {#1.pdf}%
+ \fi
+ \ifnum\pdftexversion < 14 \else
+ \pdfrefximage \pdflastximage
+ \fi}
+ \def\pdfmkdest#1{{%
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
+ \atdummies
+ \activebackslashdouble
+ \def\pdfdestname{#1}%
+ \backslashparens\pdfdestname
+ \pdfdest name{\pdfdestname} xyz%
+ }}%
+ %
+ % used to mark target names; must be expandable.
+ \def\pdfmkpgn#1{#1}%
+ %
+ \let\linkcolor = \Blue % was Cyan, but that seems light?
+ \def\endlink{\Black\pdfendlink}
+ % Adding outlines to PDF; macros for calculating structure of outlines
+ % come from Petr Olsak
+ \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+ \else \csname#1\endcsname \fi}
+ \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
+ \advance\tempnum by 1
+ \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
+ %
+ % #1 is the section text, which is what will be displayed in the
+ % outline by the pdf viewer. #2 is the pdf expression for the number
+ % of subentries (or empty, for subsubsections). #3 is the node text,
+ % which might be empty if this toc entry had no corresponding node.
+ % #4 is the page number
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ % Generate a link to the node text if that exists; else, use the
+ % page number. We could generate a destination for the section
+ % text in the case where a section has no node, but it doesn't
+ % seem worth the trouble, since most documents are normally structured.
+ \def\pdfoutlinedest{#3}%
+ \ifx\pdfoutlinedest\empty
+ \def\pdfoutlinedest{#4}%
+ \else
+ % Doubled backslashes in the name.
+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
+ \backslashparens\pdfoutlinedest}%
+ \fi
+ %
+ % Also double the backslashes in the display string.
+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
+ \backslashparens\pdfoutlinetext}%
+ %
+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+ }
+ %
+ \def\pdfmakeoutlines{%
+ \begingroup
+ % Thanh's hack / proper braces in bookmarks
+ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
+ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
+ %
+ % Read toc silently, to get counts of subentries for \pdfoutline.
+ \def\numchapentry##1##2##3##4{%
+ \def\thischapnum{##2}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsecentry##1##2##3##4{%
+ \advancenumber{chap\thischapnum}%
+ \def\thissecnum{##2}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsubsecentry##1##2##3##4{%
+ \advancenumber{sec\thissecnum}%
+ \def\thissubsecnum{##2}%
+ }%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \advancenumber{subsec\thissubsecnum}%
+ }%
+ \def\thischapnum{0}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ %
+ % use \def rather than \let here because we redefine \chapentry et
+ % al. a second time, below.
+ \def\appentry{\numchapentry}%
+ \def\appsecentry{\numsecentry}%
+ \def\appsubsecentry{\numsubsecentry}%
+ \def\appsubsubsecentry{\numsubsubsecentry}%
+ \def\unnchapentry{\numchapentry}%
+ \def\unnsecentry{\numsecentry}%
+ \def\unnsubsecentry{\numsubsecentry}%
+ \def\unnsubsubsecentry{\numsubsubsecentry}%
+ \readdatafile{toc}%
+ %
+ % Read toc second time, this time actually producing the outlines.
+ % The `-' means take the \expnumber as the absolute number of
+ % subentries, which we calculated on our first read of the .toc above.
+ %
+ % We use the node names as the destinations.
+ \def\numchapentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+ \def\numsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+ \def\numsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+ \def\numsubsubsecentry##1##2##3##4{% count is always zero
+ \dopdfoutline{##1}{}{##3}{##4}}%
+ %
+ % PDF outlines are displayed using system fonts, instead of
+ % document fonts. Therefore we cannot use special characters,
+ % since the encoding is unknown. For example, the eogonek from
+ % Latin 2 (0xea) gets translated to a | character. Info from
+ % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
+ %
+ % xx to do this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Right
+ % now, I guess we'll just let the pdf reader have its way.
+ \indexnofonts
+ \setupdatafile
+ \catcode`\\=\active \otherbackslash
+ \input \jobname.toc
+ \endgroup
+ }
+ %
+ \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \ifx\p\space\else\addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \fi
+ \nextsp}
+ \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \ifnum\pdftexversion < 14
+ \let \startlink \pdfannotlink
+ \else
+ \let \startlink \pdfstartlink
+ \fi
+ % make a live url in pdf output.
+ \def\pdfurl#1{%
+ \begingroup
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
+ \makevalueexpandable
+ \leavevmode\Red
+ \startlink attr{/Border [0 0 0]}%
+ user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+ \endgroup}
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\pdflink#1{%
+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+ \linkcolor #1\endlink}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\else
+ \let\pdfmkdest = \gobble
+ \let\pdfurl = \gobble
+ \let\endlink = \relax
+ \let\linkcolor = \relax
+ \let\pdfmakeoutlines = \relax
+\fi % \ifx\pdfoutput
+
+
+\message{fonts,}
+
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+ \csname ten#1\endcsname % change the current font
+}
+
+% Select #1 fonts with the current style.
+%
+\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+\let\li = \sf % Sometimes we call it \li, not \sf.
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
+% Default leading.
+\newdimen\textleading \textleading = 13.2pt
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+\def\setleading#1{%
+ \normalbaselineskip = #1\relax
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
+
+% Set the font macro #1 to the font named #2, adding on the
+% specified font prefix (normally `cm').
+% #3 is the font's design size, #4 is a scale factor
+\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
+
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\undefined
+\def\fontprefix{cm}
+\fi
+% Support font families that don't use the same naming scheme as CM.
+\def\rmshape{r}
+\def\rmbshape{bx} %where the normal face is bold
+\def\bfshape{b}
+\def\bxshape{bx}
+\def\ttshape{tt}
+\def\ttbshape{tt}
+\def\ttslshape{sltt}
+\def\itshape{ti}
+\def\itbshape{bxti}
+\def\slshape{sl}
+\def\slbshape{bxsl}
+\def\sfshape{ss}
+\def\sfbshape{ss}
+\def\scshape{csc}
+\def\scbshape{csc}
+
+% Text fonts (11.2pt, magstep1).
+\def\textnominalsize{11pt}
+\edef\mainmagstep{\magstephalf}
+\setfont\textrm\rmshape{10}{\mainmagstep}
+\setfont\texttt\ttshape{10}{\mainmagstep}
+\setfont\textbf\bfshape{10}{\mainmagstep}
+\setfont\textit\itshape{10}{\mainmagstep}
+\setfont\textsl\slshape{10}{\mainmagstep}
+\setfont\textsf\sfshape{10}{\mainmagstep}
+\setfont\textsc\scshape{10}{\mainmagstep}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstep1}
+\setfont\deftt\ttshape{10}{\magstep1}
+\setfont\defttsl\ttslshape{10}{\magstep1}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}
+\setfont\smalltt\ttshape{9}{1000}
+\setfont\smallbf\bfshape{10}{900}
+\setfont\smallit\itshape{9}{1000}
+\setfont\smallsl\slshape{9}{1000}
+\setfont\smallsf\sfshape{9}{1000}
+\setfont\smallsc\scshape{10}{900}
+\setfont\smallttsl\ttslshape{10}{900}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}
+\setfont\smallertt\ttshape{8}{1000}
+\setfont\smallerbf\bfshape{10}{800}
+\setfont\smallerit\itshape{8}{1000}
+\setfont\smallersl\slshape{8}{1000}
+\setfont\smallersf\sfshape{8}{1000}
+\setfont\smallersc\scshape{10}{800}
+\setfont\smallerttsl\ttslshape{10}{800}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}
+\setfont\titleit\itbshape{10}{\magstep4}
+\setfont\titlesl\slbshape{10}{\magstep4}
+\setfont\titlett\ttbshape{12}{\magstep3}
+\setfont\titlettsl\ttslshape{10}{\magstep4}
+\setfont\titlesf\sfbshape{17}{\magstep1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\authorrm{\secrm}
+\def\authortt{\sectt}
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\def\chapnominalsize{17pt}
+\setfont\chaprm\rmbshape{12}{\magstep2}
+\setfont\chapit\itbshape{10}{\magstep3}
+\setfont\chapsl\slbshape{10}{\magstep3}
+\setfont\chaptt\ttbshape{12}{\magstep2}
+\setfont\chapttsl\ttslshape{10}{\magstep3}
+\setfont\chapsf\sfbshape{17}{1000}
+\let\chapbf=\chaprm
+\setfont\chapsc\scbshape{10}{\magstep3}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+
+% Section fonts (14.4pt).
+\def\secnominalsize{14pt}
+\setfont\secrm\rmbshape{12}{\magstep1}
+\setfont\secit\itbshape{10}{\magstep2}
+\setfont\secsl\slbshape{10}{\magstep2}
+\setfont\sectt\ttbshape{12}{\magstep1}
+\setfont\secttsl\ttslshape{10}{\magstep2}
+\setfont\secsf\sfbshape{12}{\magstep1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep2}
+\font\seci=cmmi12 scaled \magstep1
+\font\secsy=cmsy10 scaled \magstep2
+
+% Subsection fonts (13.15pt).
+\def\ssecnominalsize{13pt}
+\setfont\ssecrm\rmbshape{12}{\magstephalf}
+\setfont\ssecit\itbshape{10}{1315}
+\setfont\ssecsl\slbshape{10}{1315}
+\setfont\ssectt\ttbshape{12}{\magstephalf}
+\setfont\ssecttsl\ttslshape{10}{1315}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1315}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled 1315
+
+% Reduced fonts for @acro in text (10pt).
+\def\reducednominalsize{10pt}
+\setfont\reducedrm\rmshape{10}{1000}
+\setfont\reducedtt\ttshape{10}{1000}
+\setfont\reducedbf\bfshape{10}{1000}
+\setfont\reducedit\itshape{10}{1000}
+\setfont\reducedsl\slshape{10}{1000}
+\setfont\reducedsf\sfshape{10}{1000}
+\setfont\reducedsc\scshape{10}{1000}
+\setfont\reducedttsl\ttslshape{10}{1000}
+\font\reducedi=cmmi10
+\font\reducedsy=cmsy10
+
+% In order for the font changes to affect most math symbols and letters,
+% we have to define the \textfont of the standard families. Since
+% texinfo doesn't allow for producing subscripts and superscripts except
+% in the main text, we don't bother to reset \scriptfont and
+% \scriptscriptfont (which would also require loading a lot more fonts).
+%
+\def\resetmathfonts{%
+ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
+ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
+ \textfont\ttfam=\tentt \textfont\sffam=\tensf
+}
+
+% The font-changing commands redefine the meanings of \tenSTYLE, instead
+% of just \STYLE. We do this because \STYLE needs to also set the
+% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
+% \tenSTYLE to set the current font.
+%
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower). These relative commands are used in
+% the LaTeX logo and acronyms.
+%
+% This all needs generalizing, badly.
+%
+\def\textfonts{%
+ \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
+ \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
+ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
+ \let\tenttsl=\textttsl
+ \def\curfontsize{text}%
+ \def\lsize{reduced}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{\textleading}}
+\def\titlefonts{%
+ \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
+ \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
+ \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
+ \let\tenttsl=\titlettsl
+ \def\curfontsize{title}%
+ \def\lsize{chap}\def\lllsize{subsec}%
+ \resetmathfonts \setleading{25pt}}
+\def\titlefont#1{{\titlefonts\rm #1}}
+\def\chapfonts{%
+ \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
+ \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
+ \let\tenttsl=\chapttsl
+ \def\curfontsize{chap}%
+ \def\lsize{sec}\def\lllsize{text}%
+ \resetmathfonts \setleading{19pt}}
+\def\secfonts{%
+ \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
+ \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
+ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
+ \let\tenttsl=\secttsl
+ \def\curfontsize{sec}%
+ \def\lsize{subsec}\def\lllsize{reduced}%
+ \resetmathfonts \setleading{16pt}}
+\def\subsecfonts{%
+ \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
+ \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
+ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
+ \let\tenttsl=\ssecttsl
+ \def\curfontsize{ssec}%
+ \def\lsize{text}\def\lllsize{small}%
+ \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts
+\def\reducedfonts{%
+ \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
+ \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
+ \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
+ \let\tenttsl=\reducedttsl
+ \def\curfontsize{reduced}%
+ \def\lsize{small}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallfonts{%
+ \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
+ \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
+ \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
+ \let\tenttsl=\smallttsl
+ \def\curfontsize{small}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallerfonts{%
+ \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
+ \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
+ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
+ \let\tenttsl=\smallerttsl
+ \def\curfontsize{smaller}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{9.5pt}}
+
+% Set the fonts to use with the @small... environments.
+\let\smallexamplefonts = \smallfonts
+
+% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
+% can fit this many characters:
+% 8.5x11=86 smallbook=72 a4=90 a5=69
+% If we use \scriptfonts (8pt), then we can fit this many characters:
+% 8.5x11=90+ smallbook=80 a4=90+ a5=77
+% For me, subjectively, the few extra characters that fit aren't worth
+% the additional smallness of 8pt. So I'm making the default 9pt.
+%
+% By the way, for comparison, here's what fits with @example (10pt):
+% 8.5x11=71 smallbook=60 a4=75 a5=58
+%
+% I wish the USA used A4 paper.
+% --karl, 24jan03.
+
+
+% Set up the default fonts, so we can use them for creating boxes.
+%
+\textfonts \rm
+
+% Define these so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}
+\setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}
+\setfont\shortconttt\ttshape{12}{1000}
+
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
+
+% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
+% unless the following character is such as not to need one.
+\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
+ \ptexslash\fi\fi\fi}
+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+
+% like \smartslanted except unconditionally uses \ttsl.
+% @var is set to this for defun arguments.
+\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+
+% like \smartslanted except unconditionally use \sl. We never want
+% ttsl for book titles, do we?
+\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+
+\let\i=\smartitalic
+\let\slanted=\smartslanted
+\let\var=\smartslanted
+\let\dfn=\smartslanted
+\let\emph=\smartitalic
+
+% @b, explicit bold.
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+% @sansserif, explicit sans.
+\def\sansserif#1{{\sf #1}}
+
+% We can't just use \exhyphenpenalty, because that only has effect at
+% the end of a paragraph. Restore normal hyphenation at the end of the
+% group within which \nohyphenation is presumably called.
+%
+\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
+\def\restorehyphenation{\hyphenchar\font = `- }
+
+% Set sfcode to normal for the chars that usually have another value.
+% Can't use plain's \frenchspacing because it uses the `\x notation, and
+% sometimes \x has an active definition that messes things up.
+%
+\chardef\colonChar = `\:
+\chardef\commaChar = `\,
+\chardef\dotChar = `\.
+\chardef\exclamChar= `\!
+\chardef\questChar = `\?
+\chardef\semiChar = `\;
+%
+\catcode`@=11
+ \def\plainfrenchspacing{%
+ \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
+ \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ }
+ \def\plainnonfrenchspacing{%
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
+ }
+\catcode`@=\other
+\def\endofsentencespacefactor{3000}% default
+
+\def\t#1{%
+ {\tt \rawbackslash \plainfrenchspacing #1}%
+ \null
+}
+\def\samp#1{`\tclose{#1}'\null}
+\setfont\keyrm\rmshape{8}{1000}
+\font\keysy=cmsy9
+\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+ \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+ \vbox{\hrule\kern-0.4pt
+ \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+ \kern-0.4pt\hrule}%
+ \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+% The old definition, with no lozenge:
+%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+% @file, @option are the same as @samp.
+\let\file=\samp
+\let\option=\samp
+
+% @code is a modification of @t,
+% which makes spaces the same size as normal in the surrounding text.
+\def\tclose#1{%
+ {%
+ % Change normal interword space to be same as for the current font.
+ \spaceskip = \fontdimen2\font
+ %
+ % Switch to typewriter.
+ \tt
+ %
+ % But `\ ' produces the large typewriter interword space.
+ \def\ {{\spaceskip = 0pt{} }}%
+ %
+ % Turn off hyphenation.
+ \nohyphenation
+ %
+ \rawbackslash
+ \plainfrenchspacing
+ #1%
+ }%
+ \null
+}
+
+% We *must* turn on hyphenation at `-' and `_' in @code.
+% Otherwise, it is too hard to avoid overfull hboxes
+% in the Emacs manual, the Library manual, etc.
+
+% Unfortunately, TeX uses one parameter (\hyphenchar) to control
+% both hyphenation at - and hyphenation within words.
+% We must therefore turn them both off (\tclose does that)
+% and arrange explicitly to hyphenate at a dash.
+% -- rms.
+{
+ \catcode`\-=\active
+ \catcode`\_=\active
+ %
+ \global\def\code{\begingroup
+ \catcode`\-=\active \catcode`\_=\active
+ \ifallowcodebreaks
+ \let-\codedash
+ \let_\codeunder
+ \else
+ \let-\realdash
+ \let_\realunder
+ \fi
+ \codex
+ }
+}
+
+\def\realdash{-}
+\def\codedash{-\discretionary{}{}{}}
+\def\codeunder{%
+ % this is all so @math{@code{var_name}+1} can work. In math mode, _
+ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
+ % will therefore expand the active definition of _, which is us
+ % (inside @code that is), therefore an endless loop.
+ \ifusingtt{\ifmmode
+ \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
+ \else\normalunderscore \fi
+ \discretionary{}{}{}}%
+ {\_}%
+}
+\def\codex #1{\tclose{#1}\endgroup}
+
+% An additional complication: the above will allow breaks after, e.g.,
+% each of the four underscores in __typeof__. This is undesirable in
+% some manuals, especially if they don't have long identifiers in
+% general. @allowcodebreaks provides a way to control this.
+%
+\newif\ifallowcodebreaks \allowcodebreakstrue
+
+\def\keywordtrue{true}
+\def\keywordfalse{false}
+
+\parseargdef\allowcodebreaks{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\keywordtrue
+ \allowcodebreakstrue
+ \else\ifx\txiarg\keywordfalse
+ \allowcodebreaksfalse
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+ \fi\fi
+}
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+% `example' (@kbd uses ttsl only inside of @example and friends),
+% or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\txiarg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\txiarg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct.'
+\kbdinputstyle distinct
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\look}}\fi
+\else{\tclose{\kbdfont\look}}\fi}
+
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
+\let\env=\code
+\let\command=\code
+
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself. First (mandatory) arg is the url. Perhaps eventually put in
+% a hypertex \special here.
+%
+\def\uref#1{\douref #1,,,\finish}
+\def\douref#1,#2,#3,#4\finish{\begingroup
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \code{#1}% only url given, so show it
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+\else
+ \let\email=\uref
+\fi
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
+%
+\def\dmn#1{\thinspace #1}
+
+\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
+
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}} % roman font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
+%
+\def\acronym#1{\doacronym #1,,\finish}
+\def\doacronym#1,#2,#3\finish{%
+ {\selectfonts\lsize #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+}
+
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
+%
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+ {\plainfrenchspacing #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+}
+
+% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
+%
+\def\pounds{{\it\$}}
+
+% @euro{} comes from a separate font, depending on the current style.
+% We use the free feym* fonts from the eurosym package by Henrik
+% Theiling, which support regular, slanted, bold and bold slanted (and
+% "outlined" (blackboard board, sort of) versions, which we don't need).
+% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+%
+% Although only regular is the truly official Euro symbol, we ignore
+% that. The Euro is designed to be slightly taller than the regular
+% font height.
+%
+% feymr - regular
+% feymo - slanted
+% feybr - bold
+% feybo - bold slanted
+%
+% There is no good (free) typewriter version, to my knowledge.
+% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
+% Hmm.
+%
+% Also doesn't work in math. Do we need to do math with euro symbols?
+% Hope not.
+%
+%
+\def\euro{{\eurofont e}}
+\def\eurofont{%
+ % We set the font at each command, rather than predefining it in
+ % \textfonts and the other font-switching commands, so that
+ % installations which never need the symbol don't have to have the
+ % font installed.
+ %
+ % There is only one designed size (nominal 10pt), so we always scale
+ % that to the current nominal size.
+ %
+ % By the way, simply using "at 1em" works for cmr10 and the like, but
+ % does not work for cmbx10 and other extended/shrunken fonts.
+ %
+ \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
+ %
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
+ \else
+ % regular:
+ \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
+ \fi
+ \thiseurofont
+}
+
+% @registeredsymbol - R in a circle. The font for the R should really
+% be smaller yet, but lllsize is the best we can do for now.
+% Adapted from the plain.tex definition of \copyright.
+%
+\def\registeredsymbol{%
+ $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+ \hfil\crcr\Orb}}%
+ }$%
+}
+
+% Laurent Siebenmann reports \Orb undefined with:
+% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
+% so we'll define it if necessary.
+%
+\ifx\Orb\undefined
+\def\Orb{\mathhexbox20D}
+\fi
+
+
+\message{page headings,}
+
+\newskip\titlepagetopglue \titlepagetopglue = 1.5in
+\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
+
+% First the title page. Must do @settitle before @titlepage.
+\newif\ifseenauthor
+\newif\iffinishedtitlepage
+
+% Do an implicit @contents or @shortcontents after @end titlepage if the
+% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
+%
+\newif\ifsetcontentsaftertitlepage
+ \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
+\newif\ifsetshortcontentsaftertitlepage
+ \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+
+\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
+
+\envdef\titlepage{%
+ % Open one extra group, as we want to close it in the middle of \Etitlepage.
+ \begingroup
+ \parindent=0pt \textfonts
+ % Leave some space at the very top of the page.
+ \vglue\titlepagetopglue
+ % No rule at page bottom unless we print one at the top with @title.
+ \finishedtitlepagetrue
+ %
+ % Most title ``pages'' are actually two pages long, with space
+ % at the top of the second. We don't want the ragged left on the second.
+ \let\oldpage = \page
+ \def\page{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ \let\page = \oldpage
+ \page
+ \null
+ }%
+}
+
+\def\Etitlepage{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ % It is important to do the page break before ending the group,
+ % because the headline and footline are only empty inside the group.
+ % If we use the new definition of \page, we always get a blank page
+ % after the title page, which we certainly don't want.
+ \oldpage
+ \endgroup
+ %
+ % Need this before the \...aftertitlepage checks so that if they are
+ % in effect the toc pages will come out with page numbers.
+ \HEADINGSon
+ %
+ % If they want short, they certainly want long too.
+ \ifsetshortcontentsaftertitlepage
+ \shortcontents
+ \contents
+ \global\let\shortcontents = \relax
+ \global\let\contents = \relax
+ \fi
+ %
+ \ifsetcontentsaftertitlepage
+ \contents
+ \global\let\contents = \relax
+ \global\let\shortcontents = \relax
+ \fi
+}
+
+\def\finishtitlepage{%
+ \vskip4pt \hrule height 2pt width \hsize
+ \vskip\titlepagebottomglue
+ \finishedtitlepagetrue
+}
+
+%%% Macros to be used within @titlepage:
+
+\let\subtitlerm=\tenrm
+\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
+
+\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
+ \let\tt=\authortt}
+
+\parseargdef\title{%
+ \checkenv\titlepage
+ \leftline{\titlefonts\rm #1}
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+}
+
+\parseargdef\subtitle{%
+ \checkenv\titlepage
+ {\subtitlefont \rightline{#1}}%
+}
+
+% @author should come last, but may come many times.
+% It can also be used inside @quotation.
+%
+\parseargdef\author{%
+ \def\temp{\quotation}%
+ \ifx\thisenv\temp
+ \def\quotationauthor{#1}% printed in \Equotation.
+ \else
+ \checkenv\titlepage
+ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+ {\authorfont \leftline{#1}}%
+ \fi
+}
+
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks\evenheadline % headline on even pages
+\newtoks\oddheadline % headline on odd pages
+\newtoks\evenfootline % footline on even pages
+\newtoks\oddfootline % footline on odd pages
+
+% Now make TeX use those variables
+\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
+ \else \the\evenheadline \fi}}
+\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
+ \else \the\evenfootline \fi}\HEADINGShook}
+\let\HEADINGShook=\relax
+
+% Commands to set those variables.
+% For example, this is what @headings on does
+% @evenheading @thistitle|@thispage|@thischapter
+% @oddheading @thischapter|@thispage|@thistitle
+% @evenfooting @thisfile||
+% @oddfooting ||@thisfile
+
+
+\def\evenheading{\parsearg\evenheadingxxx}
+\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
+\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddheading{\parsearg\oddheadingxxx}
+\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
+\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
+\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
+\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
+ \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
+ %
+ % Leave some space for the footline. Hopefully ok to assume
+ % @evenfooting will not be used by itself.
+ \global\advance\pageheight by -\baselineskip
+ \global\advance\vsize by -\baselineskip
+}
+
+\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+
+
+% @headings double turns headings on for double-sided printing.
+% @headings single turns headings on for single-sided printing.
+% @headings off turns them off.
+% @headings on same as @headings double, retained for compatibility.
+% @headings after turns on double-sided headings after this page.
+% @headings doubleafter turns on double-sided headings after this page.
+% @headings singleafter turns on single-sided headings after this page.
+% By default, they are off at the start of a document,
+% and turned `on' after @end titlepage.
+
+\def\headings #1 {\csname HEADINGS#1\endcsname}
+
+\def\HEADINGSoff{%
+\global\evenheadline={\hfil} \global\evenfootline={\hfil}
+\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
+\HEADINGSoff
+% When we turn headings on, set the page number to 1.
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSdouble{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+\let\contentsalignmacro = \chappager
+
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingle{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+\def\HEADINGSon{\HEADINGSdouble}
+
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\let\HEADINGSdoubleafter=\HEADINGSafter
+\def\HEADINGSdoublex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
+\def\HEADINGSsinglex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+
+% Subroutines used in generating headings
+% This produces Day Month Year style of output.
+% Only define if not already defined, in case a txi-??.tex file has set
+% up a different format (e.g., txi-cs.tex does this).
+\ifx\today\undefined
+\def\today{%
+ \number\day\space
+ \ifcase\month
+ \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
+ \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
+ \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
+ \fi
+ \space\number\year}
+\fi
+
+% @settitle line... specifies the title of the document, for headings.
+% It generates no output of its own.
+\def\thistitle{\putwordNoTitle}
+\def\settitle{\parsearg{\gdef\thistitle}}
+
+
+\message{tables,}
+% Tables -- @table, @ftable, @vtable, @item(x).
+
+% default indentation of table text
+\newdimen\tableindent \tableindent=.8in
+% default indentation of @itemize and @enumerate text
+\newdimen\itemindent \itemindent=.3in
+% margin between end of table item and start of table text.
+\newdimen\itemmargin \itemmargin=.1in
+
+% used internally for \itemindent minus \itemmargin
+\newdimen\itemmax
+
+% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
+% these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\newif\ifitemxneedsnegativevskip
+
+\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\itemxpar \parsearg\itemzzz}
+
+\def\itemzzz #1{\begingroup %
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\tableindent
+ \setbox0=\hbox{\itemindicate{#1}}%
+ \itemindex{#1}%
+ \nobreak % This prevents a break before @itemx.
+ %
+ % If the item text does not fit in the space we have, put it on a line
+ % by itself, and do not allow a page break either before or after that
+ % line. We do not start a paragraph here because then if the next
+ % command is, e.g., @kindex, the whatsit would get put into the
+ % horizontal list on a line by itself, resulting in extra blank space.
+ \ifdim \wd0>\itemmax
+ %
+ % Make this a paragraph so we get the \parskip glue and wrapping,
+ % but leave it ragged-right.
+ \begingroup
+ \advance\leftskip by-\tableindent
+ \advance\hsize by\tableindent
+ \advance\rightskip by0pt plus1fil
+ \leavevmode\unhbox0\par
+ \endgroup
+ %
+ % We're going to be starting a paragraph, but we don't want the
+ % \parskip glue -- logically it's part of the @item we just started.
+ \nobreak \vskip-\parskip
+ %
+ % Stop a page break at the \parskip glue coming up. However, if
+ % what follows is an environment such as @example, there will be no
+ % \parskip glue; then the negative vskip we just inserted would
+ % cause the example and the item to crash together. So we use this
+ % bizarre value of 10001 as a signal to \aboveenvbreak to insert
+ % \parskip glue after all. Section titles are handled this way also.
+ %
+ \penalty 10001
+ \endgroup
+ \itemxneedsnegativevskipfalse
+ \else
+ % The item text fits into the space. Start a paragraph, so that the
+ % following text (if any) will end up on the same line.
+ \noindent
+ % Do this with kerns and \unhbox so that if there is a footnote in
+ % the item text, it can migrate to the main vertical list and
+ % eventually be printed.
+ \nobreak\kern-\tableindent
+ \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
+ \unhbox0
+ \nobreak\kern\dimen0
+ \endgroup
+ \itemxneedsnegativevskiptrue
+ \fi
+}
+
+\def\item{\errmessage{@item while not in a list environment}}
+\def\itemx{\errmessage{@itemx while not in a list environment}}
+
+% @table, @ftable, @vtable.
+\envdef\table{%
+ \let\itemindex\gobble
+ \tablecheck{table}%
+}
+\envdef\ftable{%
+ \def\itemindex ##1{\doind {fn}{\code{##1}}}%
+ \tablecheck{ftable}%
+}
+\envdef\vtable{%
+ \def\itemindex ##1{\doind {vr}{\code{##1}}}%
+ \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+ \ifnum \the\catcode`\^^M=\active
+ \endgroup
+ \errmessage{This command won't work in this context; perhaps the problem is
+ that we are \inenvironment\thisenv}%
+ \def\next{\doignore{#1}}%
+ \else
+ \let\next\tablex
+ \fi
+ \next
+}
+\def\tablex#1{%
+ \def\itemindicate{#1}%
+ \parsearg\tabley
+}
+\def\tabley#1{%
+ {%
+ \makevalueexpandable
+ \edef\temp{\noexpand\tablez #1\space\space\space}%
+ \expandafter
+ }\temp \endtablez
+}
+\def\tablez #1 #2 #3 #4\endtablez{%
+ \aboveenvbreak
+ \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
+ \ifnum 0#2>0 \tableindent=#2\mil \fi
+ \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
+ \itemmax=\tableindent
+ \advance \itemmax by -\itemmargin
+ \advance \leftskip by \tableindent
+ \exdentamount=\tableindent
+ \parindent = 0pt
+ \parskip = \smallskipamount
+ \ifdim \parskip=0pt \parskip=2pt \fi
+ \let\item = \internalBitem
+ \let\itemx = \internalBitemx
+}
+\def\Etable{\endgraf\afterenvbreak}
+\let\Eftable\Etable
+\let\Evtable\Etable
+\let\Eitemize\Etable
+\let\Eenumerate\Etable
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\envdef\itemize{\parsearg\doitemize}
+
+\def\doitemize#1{%
+ \aboveenvbreak
+ \itemmax=\itemindent
+ \advance\itemmax by -\itemmargin
+ \advance\leftskip by \itemindent
+ \exdentamount=\itemindent
+ \parindent=0pt
+ \parskip=\smallskipamount
+ \ifdim\parskip=0pt \parskip=2pt \fi
+ \def\itemcontents{#1}%
+ % @itemize with no arg is equivalent to @itemize @bullet.
+ \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+ \let\item=\itemizeitem
+}
+
+% Definition of @item while inside @itemize and @enumerate.
+%
+\def\itemizeitem{%
+ \advance\itemno by 1 % for enumerations
+ {\let\par=\endgraf \smallbreak}% reasonable place to break
+ {%
+ % If the document has an @itemize directly after a section title, a
+ % \nobreak will be last on the list, and \sectionheading will have
+ % done a \vskip-\parskip. In that case, we don't want to zero
+ % parskip, or the item text will crash with the heading. On the
+ % other hand, when there is normal text preceding the item (as there
+ % usually is), we do want to zero parskip, or there would be too much
+ % space. In that case, we won't have a \nobreak before. At least
+ % that's the theory.
+ \ifnum\lastpenalty<10000 \parskip=0in \fi
+ \noindent
+ \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+ \vadjust{\penalty 1200}}% not good to break after first line of item.
+ \flushcr
+}
+
+% \splitoff TOKENS\endmark defines \first to be the first token in
+% TOKENS, and \rest to be the remainder.
+%
+\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
+
+% Allow an optional argument of an uppercase letter, lowercase letter,
+% or number, to specify the first label in the enumerated list. No
+% argument is the same as `1'.
+%
+\envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
+\def\enumeratey #1 #2\endenumeratey{%
+ % If we were given no argument, pretend we were given `1'.
+ \def\thearg{#1}%
+ \ifx\thearg\empty \def\thearg{1}\fi
+ %
+ % Detect if the argument is a single token. If so, it might be a
+ % letter. Otherwise, the only valid thing it can be is a number.
+ % (We will always have one token, because of the test we just made.
+ % This is a good thing, since \splitoff doesn't work given nothing at
+ % all -- the first parameter is undelimited.)
+ \expandafter\splitoff\thearg\endmark
+ \ifx\rest\empty
+ % Only one token in the argument. It could still be anything.
+ % A ``lowercase letter'' is one whose \lccode is nonzero.
+ % An ``uppercase letter'' is one whose \lccode is both nonzero, and
+ % not equal to itself.
+ % Otherwise, we assume it's a number.
+ %
+ % We need the \relax at the end of the \ifnum lines to stop TeX from
+ % continuing to look for a <number>.
+ %
+ \ifnum\lccode\expandafter`\thearg=0\relax
+ \numericenumerate % a number (we hope)
+ \else
+ % It's a letter.
+ \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
+ \lowercaseenumerate % lowercase letter
+ \else
+ \uppercaseenumerate % uppercase letter
+ \fi
+ \fi
+ \else
+ % Multiple tokens in the argument. We hope it's a number.
+ \numericenumerate
+ \fi
+}
+
+% An @enumerate whose labels are integers. The starting integer is
+% given in \thearg.
+%
+\def\numericenumerate{%
+ \itemno = \thearg
+ \startenumeration{\the\itemno}%
+}
+
+% The starting (lowercase) letter is in \thearg.
+\def\lowercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more lowercase letters in @enumerate; get a bigger
+ alphabet}%
+ \fi
+ \char\lccode\itemno
+ }%
+}
+
+% The starting (uppercase) letter is in \thearg.
+\def\uppercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more uppercase letters in @enumerate; get a bigger
+ alphabet}
+ \fi
+ \char\uccode\itemno
+ }%
+}
+
+% Call \doitemize, adding a period to the first argument and supplying the
+% common last two arguments. Also subtract one from the initial value in
+% \itemno, since @item increments \itemno.
+%
+\def\startenumeration#1{%
+ \advance\itemno by -1
+ \doitemize{#1.}\flushcr
+}
+
+% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
+% to @enumerate.
+%
+\def\alphaenumerate{\enumerate{a}}
+\def\capsenumerate{\enumerate{A}}
+\def\Ealphaenumerate{\Eenumerate}
+\def\Ecapsenumerate{\Eenumerate}
+
+
+% @multitable macros
+% Amy Hendrickson, 8/18/94, 3/6/96
+%
+% @multitable ... @end multitable will make as many columns as desired.
+% Contents of each column will wrap at width given in preamble. Width
+% can be specified either with sample text given in a template line,
+% or in percent of \hsize, the current width of text on page.
+
+% Table can continue over pages but will only break between lines.
+
+% To make preamble:
+%
+% Either define widths of columns in terms of percent of \hsize:
+% @multitable @columnfractions .25 .3 .45
+% @item ...
+%
+% Numbers following @columnfractions are the percent of the total
+% current hsize to be used for each column. You may use as many
+% columns as desired.
+
+
+% Or use a template:
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item ...
+% using the widest term desired in each column.
+
+% Each new table line starts with @item, each subsequent new column
+% starts with @tab. Empty columns may be produced by supplying @tab's
+% with nothing between them for as many times as empty columns are needed,
+% ie, @tab@tab@tab will produce two empty columns.
+
+% @item, @tab do not need to be on their own lines, but it will not hurt
+% if they are.
+
+% Sample multitable:
+
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item first col stuff @tab second col stuff @tab third col
+% @item
+% first col stuff
+% @tab
+% second col stuff
+% @tab
+% third col
+% @item first col stuff @tab second col stuff
+% @tab Many paragraphs of text may be used in any column.
+%
+% They will wrap at the width determined by the template.
+% @item@tab@tab This will be in third column.
+% @end multitable
+
+% Default dimensions may be reset by user.
+% @multitableparskip is vertical space between paragraphs in table.
+% @multitableparindent is paragraph indent in table.
+% @multitablecolmargin is horizontal space to be left between columns.
+% @multitablelinespace is space to leave between table items, baseline
+% to baseline.
+% 0pt means it depends on current normal line spacing.
+%
+\newskip\multitableparskip
+\newskip\multitableparindent
+\newdimen\multitablecolspace
+\newskip\multitablelinespace
+\multitableparskip=0pt
+\multitableparindent=6pt
+\multitablecolspace=12pt
+\multitablelinespace=0pt
+
+% Macros used to set up halign preamble:
+%
+\let\endsetuptable\relax
+\def\xendsetuptable{\endsetuptable}
+\let\columnfractions\relax
+\def\xcolumnfractions{\columnfractions}
+\newif\ifsetpercent
+
+% #1 is the @columnfraction, usually a decimal number like .5, but might
+% be just 1. We just use it, whatever it is.
+%
+\def\pickupwholefraction#1 {%
+ \global\advance\colcount by 1
+ \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
+ \setuptable
+}
+
+\newcount\colcount
+\def\setuptable#1{%
+ \def\firstarg{#1}%
+ \ifx\firstarg\xendsetuptable
+ \let\go = \relax
+ \else
+ \ifx\firstarg\xcolumnfractions
+ \global\setpercenttrue
+ \else
+ \ifsetpercent
+ \let\go\pickupwholefraction
+ \else
+ \global\advance\colcount by 1
+ \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
+ % separator; typically that is always in the input, anyway.
+ \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+ \fi
+ \fi
+ \ifx\go\pickupwholefraction
+ % Put the argument back for the \pickupwholefraction call, so
+ % we'll always have a period there to be parsed.
+ \def\go{\pickupwholefraction#1}%
+ \else
+ \let\go = \setuptable
+ \fi%
+ \fi
+ \go
+}
+
+% multitable-only commands.
+%
+% @headitem starts a heading row, which we typeset in bold.
+% Assignments have to be global since we are inside the implicit group
+% of an alignment entry. Note that \everycr resets \everytab.
+\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+%
+% A \tab used to include \hskip1sp. But then the space in a template
+% line is not enough. That is bad. So let's go back to just `&' until
+% we encounter the problem it was intended to solve again.
+% --karl, nathan@acm.org, 20apr99.
+\def\tab{\checkenv\multitable &\the\everytab}%
+
+% @multitable ... @end multitable definitions:
+%
+\newtoks\everytab % insert after every tab.
+%
+\envdef\multitable{%
+ \vskip\parskip
+ \startsavinginserts
+ %
+ % @item within a multitable starts a normal row.
+ % We use \def instead of \let so that if one of the multitable entries
+ % contains an @itemize, we don't choke on the \item (seen as \crcr aka
+ % \endtemplate) expanding \doitemize.
+ \def\item{\crcr}%
+ %
+ \tolerance=9500
+ \hbadness=9500
+ \setmultitablespacing
+ \parskip=\multitableparskip
+ \parindent=\multitableparindent
+ \overfullrule=0pt
+ \global\colcount=0
+ %
+ \everycr = {%
+ \noalign{%
+ \global\everytab={}%
+ \global\colcount=0 % Reset the column counter.
+ % Check for saved footnotes, etc.
+ \checkinserts
+ % Keeps underfull box messages off when table breaks over pages.
+ %\filbreak
+ % Maybe so, but it also creates really weird page breaks when the
+ % table breaks over pages. Wouldn't \vfil be better? Wait until the
+ % problem manifests itself, so it can be fixed for real --karl.
+ }%
+ }%
+ %
+ \parsearg\domultitable
+}
+\def\domultitable#1{%
+ % To parse everything between @multitable and @item:
+ \setuptable#1 \endsetuptable
+ %
+ % This preamble sets up a generic column definition, which will
+ % be used as many times as user calls for columns.
+ % \vtop will set a single line and will also let text wrap and
+ % continue for many paragraphs if desired.
+ \halign\bgroup &%
+ \global\advance\colcount by 1
+ \multistrut
+ \vtop{%
+ % Use the current \colcount to find the correct column width:
+ \hsize=\expandafter\csname col\the\colcount\endcsname
+ %
+ % In order to keep entries from bumping into each other
+ % we will add a \leftskip of \multitablecolspace to all columns after
+ % the first one.
+ %
+ % If a template has been used, we will add \multitablecolspace
+ % to the width of each template entry.
+ %
+ % If the user has set preamble in terms of percent of \hsize we will
+ % use that dimension as the width of the column, and the \leftskip
+ % will keep entries from bumping into each other. Table will start at
+ % left margin and final column will justify at right margin.
+ %
+ % Make sure we don't inherit \rightskip from the outer environment.
+ \rightskip=0pt
+ \ifnum\colcount=1
+ % The first column will be indented with the surrounding text.
+ \advance\hsize by\leftskip
+ \else
+ \ifsetpercent \else
+ % If user has not set preamble in terms of percent of \hsize
+ % we will advance \hsize by \multitablecolspace.
+ \advance\hsize by \multitablecolspace
+ \fi
+ % In either case we will make \leftskip=\multitablecolspace:
+ \leftskip=\multitablecolspace
+ \fi
+ % Ignoring space at the beginning and end avoids an occasional spurious
+ % blank line, when TeX decides to break the line at the space before the
+ % box from the multistrut, so the strut ends up on a line by itself.
+ % For example:
+ % @multitable @columnfractions .11 .89
+ % @item @code{#}
+ % @tab Legal holiday which is valid in major parts of the whole country.
+ % Is automatically provided with highlighting sequences respectively
+ % marking characters.
+ \noindent\ignorespaces##\unskip\multistrut
+ }\cr
+}
+\def\Emultitable{%
+ \crcr
+ \egroup % end the \halign
+ \global\setpercentfalse
+}
+
+\def\setmultitablespacing{%
+ \def\multistrut{\strut}% just use the standard line spacing
+ %
+ % Compute \multitablelinespace (if not defined by user) for use in
+ % \multitableparskip calculation. We used define \multistrut based on
+ % this, but (ironically) that caused the spacing to be off.
+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
+\ifdim\multitablelinespace=0pt
+\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
+\global\advance\multitablelinespace by-\ht0
+\fi
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%% If so, set to same dimension as multitablelinespace.
+\ifdim\multitableparskip>\multitablelinespace
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi%
+\ifdim\multitableparskip=0pt
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi}
+
+
+\message{conditionals,}
+
+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
+% @ifnotxml always succeed. They currently do nothing; we don't
+% attempt to check whether the conditionals are properly nested. But we
+% have to remember that they are conditionals, so that @end doesn't
+% attempt to close an environment group.
+%
+\def\makecond#1{%
+ \expandafter\let\csname #1\endcsname = \relax
+ \expandafter\let\csname iscond.#1\endcsname = 1
+}
+\makecond{iftex}
+\makecond{ifnotdocbook}
+\makecond{ifnothtml}
+\makecond{ifnotinfo}
+\makecond{ifnotplaintext}
+\makecond{ifnotxml}
+
+% Ignore @ignore, @ifhtml, @ifinfo, and the like.
+%
+\def\direntry{\doignore{direntry}}
+\def\documentdescription{\doignore{documentdescription}}
+\def\docbook{\doignore{docbook}}
+\def\html{\doignore{html}}
+\def\ifdocbook{\doignore{ifdocbook}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifnottex{\doignore{ifnottex}}
+\def\ifplaintext{\doignore{ifplaintext}}
+\def\ifxml{\doignore{ifxml}}
+\def\ignore{\doignore{ignore}}
+\def\menu{\doignore{menu}}
+\def\xml{\doignore{xml}}
+
+% Ignore text until a line `@end #1', keeping track of nested conditionals.
+%
+% A count to remember the depth of nesting.
+\newcount\doignorecount
+
+\def\doignore#1{\begingroup
+ % Scan in ``verbatim'' mode:
+ \obeylines
+ \catcode`\@ = \other
+ \catcode`\{ = \other
+ \catcode`\} = \other
+ %
+ % Make sure that spaces turn into tokens that match what \doignoretext wants.
+ \spaceisspace
+ %
+ % Count number of #1's that we've seen.
+ \doignorecount = 0
+ %
+ % Swallow text until we reach the matching `@end #1'.
+ \dodoignore{#1}%
+}
+
+{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
+ \obeylines %
+ %
+ \gdef\dodoignore#1{%
+ % #1 contains the command name as a string, e.g., `ifinfo'.
+ %
+ % Define a command to find the next `@end #1'.
+ \long\def\doignoretext##1^^M@end #1{%
+ \doignoretextyyy##1^^M@#1\_STOP_}%
+ %
+ % And this command to find another #1 command, at the beginning of a
+ % line. (Otherwise, we would consider a line `@c @ifset', for
+ % example, to count as an @ifset for nesting.)
+ \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
+ %
+ % And now expand that command.
+ \doignoretext ^^M%
+ }%
+}
+
+\def\doignoreyyy#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty % Nothing found.
+ \let\next\doignoretextzzz
+ \else % Found a nested condition, ...
+ \advance\doignorecount by 1
+ \let\next\doignoretextyyy % ..., look for another.
+ % If we're here, #1 ends with ^^M\ifinfo (for example).
+ \fi
+ \next #1% the token \_STOP_ is present just after this macro.
+}
+
+% We have to swallow the remaining "\_STOP_".
+%
+\def\doignoretextzzz#1{%
+ \ifnum\doignorecount = 0 % We have just found the outermost @end.
+ \let\next\enddoignore
+ \else % Still inside a nested condition.
+ \advance\doignorecount by -1
+ \let\next\doignoretext % Look for the next @end.
+ \fi
+ \next
+}
+
+% Finish off ignored text.
+{ \obeylines%
+ % Ignore anything after the last `@end #1'; this matters in verbatim
+ % environments, where otherwise the newline after an ignored conditional
+ % would result in a blank line in the output.
+ \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
+}
+
+
+% @set VAR sets the variable VAR to an empty value.
+% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
+%
+% Since we want to separate VAR from REST-OF-LINE (which might be
+% empty), we can't just use \parsearg; we have to insert a space of our
+% own to delimit the rest of the line, and then take it out again if we
+% didn't need it.
+% We rely on the fact that \parsearg sets \catcode`\ =10.
+%
+\parseargdef\set{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+ {%
+ \makevalueexpandable
+ \def\temp{#2}%
+ \edef\next{\gdef\makecsname{SET#1}}%
+ \ifx\temp\empty
+ \next{}%
+ \else
+ \setzzz#2\endsetzzz
+ \fi
+ }%
+}
+% Remove the trailing space \setxxx inserted.
+\def\setzzz#1 \endsetzzz{\next{#1}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\parseargdef\clear{%
+ {%
+ \makevalueexpandable
+ \global\expandafter\let\csname SET#1\endcsname=\relax
+ }%
+}
+
+% @value{foo} gets the text saved in variable foo.
+\def\value{\begingroup\makevalueexpandable\valuexxx}
+\def\valuexxx#1{\expandablevalue{#1}\endgroup}
+{
+ \catcode`\- = \active \catcode`\_ = \active
+ %
+ \gdef\makevalueexpandable{%
+ \let\value = \expandablevalue
+ % We don't want these characters active, ...
+ \catcode`\-=\other \catcode`\_=\other
+ % ..., but we might end up with active ones in the argument if
+ % we're called from @code, as @code{@value{foo-bar_}}, though.
+ % So \let them to their normal equivalents.
+ \let-\realdash \let_\normalunderscore
+ }
+}
+
+% We have this subroutine so that we can handle at least some @value's
+% properly in indexes (we call \makevalueexpandable in \indexdummies).
+% The command has to be fully expandable (if the variable is set), since
+% the result winds up in the index file. This means that if the
+% variable's value contains other Texinfo commands, it's almost certain
+% it will fail (although perhaps we could fix that with sufficient work
+% to do a one-level expansion on the result, instead of complete).
+%
+\def\expandablevalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {[No value for ``#1'']}%
+ \message{Variable `#1', used in @value, is not set.}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+% To get special treatment of `@end ifset,' call \makeond and the redefine.
+%
+\makecond{ifset}
+\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
+\def\doifset#1#2{%
+ {%
+ \makevalueexpandable
+ \let\next=\empty
+ \expandafter\ifx\csname SET#2\endcsname\relax
+ #1% If not set, redefine \next.
+ \fi
+ \expandafter
+ }\next
+}
+\def\ifsetfail{\doignore{ifset}}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+% The `\else' inside the `\doifset' parameter is a trick to reuse the
+% above code: if the variable is not set, do nothing, if it is set,
+% then redefine \next to \ifclearfail.
+%
+\makecond{ifclear}
+\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
+\def\ifclearfail{\doignore{ifclear}}
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory=\comment
+
+% @defininfoenclose.
+\let\definfoenclose=\comment
+
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within macros and \if's.
+\edef\newwrite{\makecsname{ptexnewwrite}}
+
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is foo.
+% The name of an index should be no more than 2 characters long
+% for the sake of vms.
+%
+\def\newindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
+ \noexpand\doindex{#1}}
+}
+
+% @defindex foo == \newindex{foo}
+%
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+%
+\def\defcodeindex{\parsearg\newcodeindex}
+%
+\def\newcodeindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{%
+ \noexpand\docodeindex{#1}}%
+}
+
+
+% @synindex foo bar makes index foo feed into index bar.
+% Do this instead of @defindex foo if you don't want it as a separate index.
+%
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+%
+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
+
+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
+% #3 the target index (bar).
+\def\dosynindex#1#2#3{%
+ % Only do \closeout if we haven't already done it, else we'll end up
+ % closing the target index.
+ \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+ % The \closeout helps reduce unnecessary open files; the limit on the
+ % Acorn RISC OS is a mere 16 files.
+ \expandafter\closeout\csname#2indfile\endcsname
+ \expandafter\let\csname\donesynindex#2\endcsname = 1
+ \fi
+ % redefine \fooindfile:
+ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
+ \expandafter\let\csname#2indfile\endcsname=\temp
+ % redefine \fooindex:
+ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
+}
+
+% Define \doindex, the driver for all \fooindex macros.
+% Argument #1 is generated by the calling \fooindex macro,
+% and it is "foo", the name of the index.
+
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
+
+% like the previous two, but they put @code around the argument.
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
+%
+\def\indexdummies{%
+ \escapechar = `\\ % use backslash in output files.
+ \def\@{@}% change to @@ when we switch to @ as escape char in index files.
+ \def\ {\realbackslash\space }%
+ % Need these in case \tex is in effect and \{ is a \delimiter again.
+ % But can't use \lbracecmd and \rbracecmd because texindex assumes
+ % braces and backslashes are used only as delimiters.
+ \let\{ = \mylbrace
+ \let\} = \myrbrace
+ %
+ % Do the redefinitions.
+ \commondummies
+}
+
+% For the aux and toc files, @ is the escape character. So we want to
+% redefine everything using @ as the escape character (instead of
+% \realbackslash, still used for index files). When everything uses @,
+% this will be simpler.
+%
+\def\atdummies{%
+ \def\@{@@}%
+ \def\ {@ }%
+ \let\{ = \lbraceatcmd
+ \let\} = \rbraceatcmd
+ %
+ % Do the redefinitions.
+ \commondummies
+ \otherbackslash
+}
+
+% Called from \indexdummies and \atdummies.
+%
+\def\commondummies{%
+ %
+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
+ % preventing its expansion. This is used only for control% words,
+ % not control letters, because the \space would be incorrect for
+ % control characters, but is needed to separate the control word
+ % from whatever follows.
+ %
+ % For control letters, we have \definedummyletter, which omits the
+ % space.
+ %
+ % These can be used both for control words that take an argument and
+ % those that do not. If it is followed by {arg} in the input, then
+ % that will dutifully get written to the index (or wherever).
+ %
+ \def\definedummyword ##1{\def##1{\string##1\space}}%
+ \def\definedummyletter##1{\def##1{\string##1}}%
+ \let\definedummyaccent\definedummyletter
+ %
+ \commondummiesnofonts
+ %
+ \definedummyletter\_%
+ %
+ % Non-English letters.
+ \definedummyword\AA
+ \definedummyword\AE
+ \definedummyword\L
+ \definedummyword\OE
+ \definedummyword\O
+ \definedummyword\aa
+ \definedummyword\ae
+ \definedummyword\l
+ \definedummyword\oe
+ \definedummyword\o
+ \definedummyword\ss
+ \definedummyword\exclamdown
+ \definedummyword\questiondown
+ \definedummyword\ordf
+ \definedummyword\ordm
+ %
+ % Although these internal commands shouldn't show up, sometimes they do.
+ \definedummyword\bf
+ \definedummyword\gtr
+ \definedummyword\hat
+ \definedummyword\less
+ \definedummyword\sf
+ \definedummyword\sl
+ \definedummyword\tclose
+ \definedummyword\tt
+ %
+ \definedummyword\LaTeX
+ \definedummyword\TeX
+ %
+ % Assorted special characters.
+ \definedummyword\bullet
+ \definedummyword\comma
+ \definedummyword\copyright
+ \definedummyword\registeredsymbol
+ \definedummyword\dots
+ \definedummyword\enddots
+ \definedummyword\equiv
+ \definedummyword\error
+ \definedummyword\euro
+ \definedummyword\expansion
+ \definedummyword\minus
+ \definedummyword\pounds
+ \definedummyword\point
+ \definedummyword\print
+ \definedummyword\result
+ %
+ % We want to disable all macros so that they are not expanded by \write.
+ \macrolist
+ %
+ \normalturnoffactive
+ %
+ % Handle some cases of @value -- where it does not contain any
+ % (non-fully-expandable) commands.
+ \makevalueexpandable
+}
+
+% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+%
+\def\commondummiesnofonts{%
+ % Control letters and accents.
+ \definedummyletter\!%
+ \definedummyaccent\"%
+ \definedummyaccent\'%
+ \definedummyletter\*%
+ \definedummyaccent\,%
+ \definedummyletter\.%
+ \definedummyletter\/%
+ \definedummyletter\:%
+ \definedummyaccent\=%
+ \definedummyletter\?%
+ \definedummyaccent\^%
+ \definedummyaccent\`%
+ \definedummyaccent\~%
+ \definedummyword\u
+ \definedummyword\v
+ \definedummyword\H
+ \definedummyword\dotaccent
+ \definedummyword\ringaccent
+ \definedummyword\tieaccent
+ \definedummyword\ubaraccent
+ \definedummyword\udotaccent
+ \definedummyword\dotless
+ %
+ % Texinfo font commands.
+ \definedummyword\b
+ \definedummyword\i
+ \definedummyword\r
+ \definedummyword\sc
+ \definedummyword\t
+ %
+ % Commands that take arguments.
+ \definedummyword\acronym
+ \definedummyword\cite
+ \definedummyword\code
+ \definedummyword\command
+ \definedummyword\dfn
+ \definedummyword\emph
+ \definedummyword\env
+ \definedummyword\file
+ \definedummyword\kbd
+ \definedummyword\key
+ \definedummyword\math
+ \definedummyword\option
+ \definedummyword\pxref
+ \definedummyword\ref
+ \definedummyword\samp
+ \definedummyword\strong
+ \definedummyword\tie
+ \definedummyword\uref
+ \definedummyword\url
+ \definedummyword\var
+ \definedummyword\verb
+ \definedummyword\w
+ \definedummyword\xref
+}
+
+% \indexnofonts is used when outputting the strings to sort the index
+% by, and when constructing control sequence names. It eliminates all
+% control sequences and just writes whatever the best ASCII sort string
+% would be for a given command (usually its argument).
+%
+\def\indexnofonts{%
+ % Accent commands should become @asis.
+ \def\definedummyaccent##1{\let##1\asis}%
+ % We can just ignore other control letters.
+ \def\definedummyletter##1{\let##1\empty}%
+ % Hopefully, all control words can become @asis.
+ \let\definedummyword\definedummyaccent
+ %
+ \commondummiesnofonts
+ %
+ % Don't no-op \tt, since it isn't a user-level command
+ % and is used in the definitions of the active chars like <, >, |, etc.
+ % Likewise with the other plain tex font commands.
+ %\let\tt=\asis
+ %
+ \def\ { }%
+ \def\@{@}%
+ % how to handle braces?
+ \def\_{\normalunderscore}%
+ %
+ % Non-English letters.
+ \def\AA{AA}%
+ \def\AE{AE}%
+ \def\L{L}%
+ \def\OE{OE}%
+ \def\O{O}%
+ \def\aa{aa}%
+ \def\ae{ae}%
+ \def\l{l}%
+ \def\oe{oe}%
+ \def\o{o}%
+ \def\ss{ss}%
+ \def\exclamdown{!}%
+ \def\questiondown{?}%
+ \def\ordf{a}%
+ \def\ordm{o}%
+ %
+ \def\LaTeX{LaTeX}%
+ \def\TeX{TeX}%
+ %
+ % Assorted special characters.
+ % (The following {} will end up in the sort string, but that's ok.)
+ \def\bullet{bullet}%
+ \def\comma{,}%
+ \def\copyright{copyright}%
+ \def\registeredsymbol{R}%
+ \def\dots{...}%
+ \def\enddots{...}%
+ \def\equiv{==}%
+ \def\error{error}%
+ \def\euro{euro}%
+ \def\expansion{==>}%
+ \def\minus{-}%
+ \def\pounds{pounds}%
+ \def\point{.}%
+ \def\print{-|}%
+ \def\result{=>}%
+ %
+ % We need to get rid of all macros, leaving only the arguments (if present).
+ % Of course this is not nearly correct, but it is the best we can do for now.
+ % makeinfo does not expand macros in the argument to @deffn, which ends up
+ % writing an index entry, and texindex isn't prepared for an index sort entry
+ % that starts with \.
+ %
+ % Since macro invocations are followed by braces, we can just redefine them
+ % to take a single TeX argument. The case of a macro invocation that
+ % goes to end-of-line is not handled.
+ %
+ \macrolist
+}
+
+\let\indexbackslash=0 %overridden during \printindex.
+\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
+
+% Most index entries go through here, but \dosubind is the general case.
+% #1 is the index name, #2 is the entry text.
+\def\doind#1#2{\dosubind{#1}{#2}{}}
+
+% Workhorse for all \fooindexes.
+% #1 is name of index, #2 is stuff to put there, #3 is subentry --
+% empty if called from \doind, as we usually are (the main exception
+% is with most defuns, which call us directly).
+%
+\def\dosubind#1#2#3{%
+ \iflinks
+ {%
+ % Store the main index entry text (including the third arg).
+ \toks0 = {#2}%
+ % If third arg is present, precede it with a space.
+ \def\thirdarg{#3}%
+ \ifx\thirdarg\empty \else
+ \toks0 = \expandafter{\the\toks0 \space #3}%
+ \fi
+ %
+ \edef\writeto{\csname#1indfile\endcsname}%
+ %
+ \ifvmode
+ \dosubindsanitize
+ \else
+ \dosubindwrite
+ \fi
+ }%
+ \fi
+}
+
+% Write the entry in \toks0 to the index file:
+%
+\def\dosubindwrite{%
+ % Put the index entry in the margin if desired.
+ \ifx\SETmarginindex\relax\else
+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
+ \fi
+ %
+ % Remember, we are within a group.
+ \indexdummies % Must do this here, since \bf, etc expand at this stage
+ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ % Process the index entry with all font commands turned off, to
+ % get the string to sort by.
+ {\indexnofonts
+ \edef\temp{\the\toks0}% need full expansion
+ \xdef\indexsorttmp{\temp}%
+ }%
+ %
+ % Set up the complete index entry, with both the sort key and
+ % the original text, including any font commands. We write
+ % three arguments to \entry to the .?? file (four in the
+ % subentry case), texindex reduces to two when writing the .??s
+ % sorted result.
+ \edef\temp{%
+ \write\writeto{%
+ \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+ }%
+ \temp
+}
+
+% Take care of unwanted page breaks:
+%
+% If a skip is the last thing on the list now, preserve it
+% by backing up by \lastskip, doing the \write, then inserting
+% the skip again. Otherwise, the whatsit generated by the
+% \write will make \lastskip zero. The result is that sequences
+% like this:
+% @end defun
+% @tindex whatever
+% @defun ...
+% will have extra space inserted, because the \medbreak in the
+% start of the @defun won't see the skip inserted by the @end of
+% the previous defun.
+%
+% But don't do any of this if we're not in vertical mode. We
+% don't want to do a \vskip and prematurely end a paragraph.
+%
+% Avoid page breaks due to these extra skips, too.
+%
+% But wait, there is a catch there:
+% We'll have to check whether \lastskip is zero skip. \ifdim is not
+% sufficient for this purpose, as it ignores stretch and shrink parts
+% of the skip. The only way seems to be to check the textual
+% representation of the skip.
+%
+% The following is almost like \def\zeroskipmacro{0.0pt} except that
+% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
+%
+\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
+%
+% ..., ready, GO:
+%
+\def\dosubindsanitize{%
+ % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
+ \skip0 = \lastskip
+ \edef\lastskipmacro{\the\lastskip}%
+ \count255 = \lastpenalty
+ %
+ % If \lastskip is nonzero, that means the last item was a
+ % skip. And since a skip is discardable, that means this
+ % -\skip0 glue we're inserting is preceded by a
+ % non-discardable item, therefore it is not a potential
+ % breakpoint, therefore no \nobreak needed.
+ \ifx\lastskipmacro\zeroskipmacro
+ \else
+ \vskip-\skip0
+ \fi
+ %
+ \dosubindwrite
+ %
+ \ifx\lastskipmacro\zeroskipmacro
+ % If \lastskip was zero, perhaps the last item was a penalty, and
+ % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
+ % to re-insert the same penalty (values >10000 are used for various
+ % signals); since we just inserted a non-discardable item, any
+ % following glue (such as a \parskip) would be a breakpoint. For example:
+ %
+ % @deffn deffn-whatever
+ % @vindex index-whatever
+ % Description.
+ % would allow a break between the index-whatever whatsit
+ % and the "Description." paragraph.
+ \ifnum\count255>9999 \penalty\count255 \fi
+ \else
+ % On the other hand, if we had a nonzero \lastskip,
+ % this make-up glue would be preceded by a non-discardable item
+ % (the whatsit from the \write), so we must insert a \nobreak.
+ \nobreak\vskip\skip0
+ \fi
+}
+
+% The index entry written in the file actually looks like
+% \entry {sortstring}{page}{topic}
+% or
+% \entry {sortstring}{page}{topic}{subtopic}
+% The texindex program reads in these files and writes files
+% containing these kinds of lines:
+% \initial {c}
+% before the first topic whose initial is c
+% \entry {topic}{pagelist}
+% for a topic that is used without subtopics
+% \primary {topic}
+% for the beginning of a topic that is used with subtopics
+% \secondary {subtopic}{pagelist}
+% for each subtopic.
+
+% Define the user-accessible indexing commands
+% @findex, @vindex, @kindex, @cindex.
+
+\def\findex {\fnindex}
+\def\kindex {\kyindex}
+\def\cindex {\cpindex}
+\def\vindex {\vrindex}
+\def\tindex {\tpindex}
+\def\pindex {\pgindex}
+
+\def\cindexsub {\begingroup\obeylines\cindexsub}
+{\obeylines %
+\gdef\cindexsub "#1" #2^^M{\endgroup %
+\dosubind{cp}{#2}{#1}}}
+
+% Define the macros used in formatting output of the sorted index material.
+
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
+\parseargdef\printindex{\begingroup
+ \dobreak \chapheadingskip{10000}%
+ %
+ \smallfonts \rm
+ \tolerance = 9500
+ \everypar = {}% don't want the \kern\-parindent from indentation suppression.
+ %
+ % See if the index file exists and is nonempty.
+ % Change catcode of @ here so that if the index file contains
+ % \initial {@}
+ % as its first line, TeX doesn't complain about mismatched braces
+ % (because it thinks @} is a control sequence).
+ \catcode`\@ = 11
+ \openin 1 \jobname.#1s
+ \ifeof 1
+ % \enddoublecolumns gets confused if there is no text in the index,
+ % and it loses the chapter title and the aux file entries for the
+ % index. The easiest way to prevent this problem is to make sure
+ % there is some text.
+ \putwordIndexNonexistent
+ \else
+ %
+ % If the index file exists but is empty, then \openin leaves \ifeof
+ % false. We have to make TeX try to read something from the file, so
+ % it can discover if there is anything in it.
+ \read 1 to \temp
+ \ifeof 1
+ \putwordIndexIsEmpty
+ \else
+ % Index files are almost Texinfo source, but we use \ as the escape
+ % character. It would be better to use @, but that's too big a change
+ % to make right now.
+ \def\indexbackslash{\backslashcurfont}%
+ \catcode`\\ = 0
+ \escapechar = `\\
+ \begindoublecolumns
+ \input \jobname.#1s
+ \enddoublecolumns
+ \fi
+ \fi
+ \closein 1
+\endgroup}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+\def\initial#1{{%
+ % Some minor font changes for the special characters.
+ \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+ %
+ % Remove any glue we may have, we'll be inserting our own.
+ \removelastskip
+ %
+ % We like breaks before the index initials, so insert a bonus.
+ \nobreak
+ \vskip 0pt plus 3\baselineskip
+ \penalty 0
+ \vskip 0pt plus -3\baselineskip
+ %
+ % Typeset the initial. Making this add up to a whole number of
+ % baselineskips increases the chance of the dots lining up from column
+ % to column. It still won't often be perfect, because of the stretch
+ % we need before each entry, but it's better.
+ %
+ % No shrink because it confuses \balancecolumns.
+ \vskip 1.67\baselineskip plus .5\baselineskip
+ \leftline{\secbf #1}%
+ % Do our best not to break after the initial.
+ \nobreak
+ \vskip .33\baselineskip plus .1\baselineskip
+}}
+
+% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
+% then page number (#2) flushed to the right margin. It is used for index
+% and table of contents entries. The paragraph is indented by \leftskip.
+%
+% A straightforward implementation would start like this:
+% \def\entry#1#2{...
+% But this frozes the catcodes in the argument, and can cause problems to
+% @code, which sets - active. This problem was fixed by a kludge---
+% ``-'' was active throughout whole index, but this isn't really right.
+%
+% The right solution is to prevent \entry from swallowing the whole text.
+% --kasal, 21nov03
+\def\entry{%
+ \begingroup
+ %
+ % Start a new paragraph if necessary, so our assignments below can't
+ % affect previous text.
+ \par
+ %
+ % Do not fill out the last line with white space.
+ \parfillskip = 0in
+ %
+ % No extra space above this paragraph.
+ \parskip = 0in
+ %
+ % Do not prefer a separate line ending with a hyphen to fewer lines.
+ \finalhyphendemerits = 0
+ %
+ % \hangindent is only relevant when the entry text and page number
+ % don't both fit on one line. In that case, bob suggests starting the
+ % dots pretty far over on the line. Unfortunately, a large
+ % indentation looks wrong when the entry text itself is broken across
+ % lines. So we use a small indentation and put up with long leaders.
+ %
+ % \hangafter is reset to 1 (which is the value we want) at the start
+ % of each paragraph, so we need not do anything with that.
+ \hangindent = 2em
+ %
+ % When the entry text needs to be broken, just fill out the first line
+ % with blank space.
+ \rightskip = 0pt plus1fil
+ %
+ % A bit of stretch before each entry for the benefit of balancing
+ % columns.
+ \vskip 0pt plus1pt
+ %
+ % Swallow the left brace of the text (first parameter):
+ \afterassignment\doentry
+ \let\temp =
+}
+\def\doentry{%
+ \bgroup % Instead of the swallowed brace.
+ \noindent
+ \aftergroup\finishentry
+ % And now comes the text of the entry.
+}
+\def\finishentry#1{%
+ % #1 is the page number.
+ %
+ % The following is kludged to not output a line of dots in the index if
+ % there are no page numbers. The next person who breaks this will be
+ % cursed by a Unix daemon.
+ \def\tempa{{\rm }}%
+ \def\tempb{#1}%
+ \edef\tempc{\tempa}%
+ \edef\tempd{\tempb}%
+ \ifx\tempc\tempd
+ \ %
+ \else
+ %
+ % If we must, put the page number on a line of its own, and fill out
+ % this line with blank space. (The \hfil is overwhelmed with the
+ % fill leaders glue in \indexdotfill if the page number does fit.)
+ \hfil\penalty50
+ \null\nobreak\indexdotfill % Have leaders before the page number.
+ %
+ % The `\ ' here is removed by the implicit \unskip that TeX does as
+ % part of (the primitive) \par. Without it, a spurious underfull
+ % \hbox ensues.
+ \ifpdf
+ \pdfgettoks#1.%
+ \ \the\toksA
+ \else
+ \ #1%
+ \fi
+ \fi
+ \par
+ \endgroup
+}
+
+% Like \dotfill except takes at least 1 em.
+\def\indexdotfill{\cleaders
+ \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
+
+\def\primary #1{\line{#1\hfil}}
+
+\newskip\secondaryindent \secondaryindent=0.5cm
+\def\secondary#1#2{{%
+ \parfillskip=0in
+ \parskip=0in
+ \hangindent=1in
+ \hangafter=1
+ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
+ \ifpdf
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \else
+ #2
+ \fi
+ \par
+}}
+
+% Define two-column mode, which we use to typeset indexes.
+% Adapted from the TeXbook, page 416, which is to say,
+% the manmac.tex format used to print the TeXbook itself.
+\catcode`\@=11
+
+\newbox\partialpage
+\newdimen\doublecolumnhsize
+
+\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+ % Grab any single-column material above us.
+ \output = {%
+ %
+ % Here is a possibility not foreseen in manmac: if we accumulate a
+ % whole lot of material, we might end up calling this \output
+ % routine twice in a row (see the doublecol-lose test, which is
+ % essentially a couple of indexes with @setchapternewpage off). In
+ % that case we just ship out what is in \partialpage with the normal
+ % output routine. Generally, \partialpage will be empty when this
+ % runs and this will be a no-op. See the indexspread.tex test case.
+ \ifvoid\partialpage \else
+ \onepageout{\pagecontents\partialpage}%
+ \fi
+ %
+ \global\setbox\partialpage = \vbox{%
+ % Unvbox the main output page.
+ \unvbox\PAGE
+ \kern-\topskip \kern\baselineskip
+ }%
+ }%
+ \eject % run that output routine to set \partialpage
+ %
+ % Use the double-column output routine for subsequent pages.
+ \output = {\doublecolumnout}%
+ %
+ % Change the page size parameters. We could do this once outside this
+ % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
+ % format, but then we repeat the same computation. Repeating a couple
+ % of assignments once per index is clearly meaningless for the
+ % execution time, so we may as well do it in one place.
+ %
+ % First we halve the line length, less a little for the gutter between
+ % the columns. We compute the gutter based on the line length, so it
+ % changes automatically with the paper format. The magic constant
+ % below is chosen so that the gutter has the same value (well, +-<1pt)
+ % as it did when we hard-coded it.
+ %
+ % We put the result in a separate register, \doublecolumhsize, so we
+ % can restore it in \pagesofar, after \hsize itself has (potentially)
+ % been clobbered.
+ %
+ \doublecolumnhsize = \hsize
+ \advance\doublecolumnhsize by -.04154\hsize
+ \divide\doublecolumnhsize by 2
+ \hsize = \doublecolumnhsize
+ %
+ % Double the \vsize as well. (We don't need a separate register here,
+ % since nobody clobbers \vsize.)
+ \vsize = 2\vsize
+}
+
+% The double-column output routine for all double-column pages except
+% the last.
+%
+\def\doublecolumnout{%
+ \splittopskip=\topskip \splitmaxdepth=\maxdepth
+ % Get the available space for the double columns -- the normal
+ % (undoubled) page height minus any material left over from the
+ % previous page.
+ \dimen@ = \vsize
+ \divide\dimen@ by 2
+ \advance\dimen@ by -\ht\partialpage
+ %
+ % box0 will be the left-hand column, box2 the right.
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar
+ \unvbox255
+ \penalty\outputpenalty
+}
+%
+% Re-output the contents of the output page -- any previous material,
+% followed by the two boxes we just split, in box0 and box2.
+\def\pagesofar{%
+ \unvbox\partialpage
+ %
+ \hsize = \doublecolumnhsize
+ \wd0=\hsize \wd2=\hsize
+ \hbox to\pagewidth{\box0\hfil\box2}%
+}
+%
+% All done with double columns.
+\def\enddoublecolumns{%
+ \output = {%
+ % Split the last of the double-column material. Leave it on the
+ % current page, no automatic page break.
+ \balancecolumns
+ %
+ % If we end up splitting too much material for the current page,
+ % though, there will be another page break right after this \output
+ % invocation ends. Having called \balancecolumns once, we do not
+ % want to call it again. Therefore, reset \output to its normal
+ % definition right away. (We hope \balancecolumns will never be
+ % called on to balance too much material, but if it is, this makes
+ % the output somewhat more palatable.)
+ \global\output = {\onepageout{\pagecontents\PAGE}}%
+ }%
+ \eject
+ \endgroup % started in \begindoublecolumns
+ %
+ % \pagegoal was set to the doubled \vsize above, since we restarted
+ % the current page. We're now back to normal single-column
+ % typesetting, so reset \pagegoal to the normal \vsize (after the
+ % \endgroup where \vsize got restored).
+ \pagegoal = \vsize
+}
+%
+% Called at the end of the double column material.
+\def\balancecolumns{%
+ \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+ \dimen@ = \ht0
+ \advance\dimen@ by \topskip
+ \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by 2 % target to split to
+ %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
+ \splittopskip = \topskip
+ % Loop until we get a decent breakpoint.
+ {%
+ \vbadness = 10000
+ \loop
+ \global\setbox3 = \copy0
+ \global\setbox1 = \vsplit3 to \dimen@
+ \ifdim\ht3>\dimen@
+ \global\advance\dimen@ by 1pt
+ \repeat
+ }%
+ %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
+ %
+ \pagesofar
+}
+\catcode`\@ = \other
+
+
+\message{sectioning,}
+% Chapters, sections, etc.
+
+% \unnumberedno is an oxymoron, of course. But we count the unnumbered
+% sections so that we can refer to them unambiguously in the pdf
+% outlines by their "section number". We avoid collisions with chapter
+% numbers by starting them at 10000. (If a document ever has 10000
+% chapters, we're in trouble anyway, I'm sure.)
+\newcount\unnumberedno \unnumberedno = 10000
+\newcount\chapno
+\newcount\secno \secno=0
+\newcount\subsecno \subsecno=0
+\newcount\subsubsecno \subsubsecno=0
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount\appendixno \appendixno = `\@
+%
+% \def\appendixletter{\char\the\appendixno}
+% We do the following ugly conditional instead of the above simple
+% construct for the sake of pdftex, which needs the actual
+% letter in the expansion, not just typeset.
+%
+\def\appendixletter{%
+ \ifnum\appendixno=`A A%
+ \else\ifnum\appendixno=`B B%
+ \else\ifnum\appendixno=`C C%
+ \else\ifnum\appendixno=`D D%
+ \else\ifnum\appendixno=`E E%
+ \else\ifnum\appendixno=`F F%
+ \else\ifnum\appendixno=`G G%
+ \else\ifnum\appendixno=`H H%
+ \else\ifnum\appendixno=`I I%
+ \else\ifnum\appendixno=`J J%
+ \else\ifnum\appendixno=`K K%
+ \else\ifnum\appendixno=`L L%
+ \else\ifnum\appendixno=`M M%
+ \else\ifnum\appendixno=`N N%
+ \else\ifnum\appendixno=`O O%
+ \else\ifnum\appendixno=`P P%
+ \else\ifnum\appendixno=`Q Q%
+ \else\ifnum\appendixno=`R R%
+ \else\ifnum\appendixno=`S S%
+ \else\ifnum\appendixno=`T T%
+ \else\ifnum\appendixno=`U U%
+ \else\ifnum\appendixno=`V V%
+ \else\ifnum\appendixno=`W W%
+ \else\ifnum\appendixno=`X X%
+ \else\ifnum\appendixno=`Y Y%
+ \else\ifnum\appendixno=`Z Z%
+ % The \the is necessary, despite appearances, because \appendixletter is
+ % expanded while writing the .toc file. \char\appendixno is not
+ % expandable, thus it is written literally, thus all appendixes come out
+ % with the same letter (or @) in the toc without it.
+ \else\char\the\appendixno
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+% Each @chapter defines this as the name of the chapter.
+% page headings and footings can use it. @section does likewise.
+% However, they are not reliable, because we don't use marks.
+\def\thischapter{}
+\def\thissection{}
+
+\newcount\absseclevel % used to calculate proper heading level
+\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
+
+% @raisesections: treat @section as chapter, @subsection as section, etc.
+\def\raisesections{\global\advance\secbase by -1}
+\let\up=\raisesections % original BFox name
+
+% @lowersections: treat @chapter as section, @section as subsection, etc.
+\def\lowersections{\global\advance\secbase by 1}
+\let\down=\lowersections % original BFox name
+
+% we only have subsub.
+\chardef\maxseclevel = 3
+%
+% A numbered section within an unnumbered changes to unnumbered too.
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unmlevel = \maxseclevel
+%
+% Trace whether the current chapter is an appendix or not:
+% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
+\def\chapheadtype{N}
+
+% Choose a heading macro
+% #1 is heading type
+% #2 is heading level
+% #3 is text for heading
+\def\genhead#1#2#3{%
+ % Compute the abs. sec. level:
+ \absseclevel=#2
+ \advance\absseclevel by \secbase
+ % Make sure \absseclevel doesn't fall outside the range:
+ \ifnum \absseclevel < 0
+ \absseclevel = 0
+ \else
+ \ifnum \absseclevel > 3
+ \absseclevel = 3
+ \fi
+ \fi
+ % The heading type:
+ \def\headtype{#1}%
+ \if \headtype U%
+ \ifnum \absseclevel < \unmlevel
+ \chardef\unmlevel = \absseclevel
+ \fi
+ \else
+ % Check for appendix sections:
+ \ifnum \absseclevel = 0
+ \edef\chapheadtype{\headtype}%
+ \else
+ \if \headtype A\if \chapheadtype N%
+ \errmessage{@appendix... within a non-appendix chapter}%
+ \fi\fi
+ \fi
+ % Check for numbered within unnumbered:
+ \ifnum \absseclevel > \unmlevel
+ \def\headtype{U}%
+ \else
+ \chardef\unmlevel = 3
+ \fi
+ \fi
+ % Now print the heading:
+ \if \headtype U%
+ \ifcase\absseclevel
+ \unnumberedzzz{#3}%
+ \or \unnumberedseczzz{#3}%
+ \or \unnumberedsubseczzz{#3}%
+ \or \unnumberedsubsubseczzz{#3}%
+ \fi
+ \else
+ \if \headtype A%
+ \ifcase\absseclevel
+ \appendixzzz{#3}%
+ \or \appendixsectionzzz{#3}%
+ \or \appendixsubseczzz{#3}%
+ \or \appendixsubsubseczzz{#3}%
+ \fi
+ \else
+ \ifcase\absseclevel
+ \chapterzzz{#3}%
+ \or \seczzz{#3}%
+ \or \numberedsubseczzz{#3}%
+ \or \numberedsubsubseczzz{#3}%
+ \fi
+ \fi
+ \fi
+ \suppressfirstparagraphindent
+}
+
+% an interface:
+\def\numhead{\genhead N}
+\def\apphead{\genhead A}
+\def\unnmhead{\genhead U}
+
+% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
+% all lower-level sectioning counters to zero.
+%
+% Also set \chaplevelprefix, which we prepend to @float sequence numbers
+% (e.g., figures), q.v. By default (before any chapter), that is empty.
+\let\chaplevelprefix = \empty
+%
+\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
+\def\chapterzzz#1{%
+ % section resetting is \global in case the chapter is in a group, such
+ % as an @include file.
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\chapno by 1
+ %
+ % Used for \float.
+ \gdef\chaplevelprefix{\the\chapno.}%
+ \resetallfloatnos
+ %
+ \message{\putwordChapter\space \the\chapno}%
+ %
+ % Write the actual heading.
+ \chapmacro{#1}{Ynumbered}{\the\chapno}%
+ %
+ % So @section and the like are numbered underneath this chapter.
+ \global\let\section = \numberedsec
+ \global\let\subsection = \numberedsubsec
+ \global\let\subsubsection = \numberedsubsubsec
+}
+
+\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\def\appendixzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\appendixno by 1
+ \gdef\chaplevelprefix{\appendixletter.}%
+ \resetallfloatnos
+ %
+ \def\appendixnum{\putwordAppendix\space \appendixletter}%
+ \message{\appendixnum}%
+ %
+ \chapmacro{#1}{Yappendix}{\appendixletter}%
+ %
+ \global\let\section = \appendixsec
+ \global\let\subsection = \appendixsubsec
+ \global\let\subsubsection = \appendixsubsubsec
+}
+
+\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+\def\unnumberedzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\unnumberedno by 1
+ %
+ % Since an unnumbered has no number, no prefix for figures.
+ \global\let\chaplevelprefix = \empty
+ \resetallfloatnos
+ %
+ % This used to be simply \message{#1}, but TeX fully expands the
+ % argument to \message. Therefore, if #1 contained @-commands, TeX
+ % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
+ % expanded @cite (which turns out to cause errors because \cite is meant
+ % to be executed, not expanded).
+ %
+ % Anyway, we don't want the fully-expanded definition of @cite to appear
+ % as a result of the \message, we just want `@cite' itself. We use
+ % \the<toks register> to achieve this: TeX expands \the<toks> only once,
+ % simply yielding the contents of <toks register>. (We also do this for
+ % the toc entries.)
+ \toks0 = {#1}%
+ \message{(\the\toks0)}%
+ %
+ \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
+ %
+ \global\let\section = \unnumberedsec
+ \global\let\subsection = \unnumberedsubsec
+ \global\let\subsubsection = \unnumberedsubsubsec
+}
+
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\parseargdef\centerchap{%
+ % Well, we could do the following in a group, but that would break
+ % an assumption that \chapmacro is called at the outermost level.
+ % Thus we are safer this way: --kasal, 24feb04
+ \let\centerparametersmaybe = \centerparameters
+ \unnmhead0{#1}%
+ \let\centerparametersmaybe = \relax
+}
+
+% @top is like @unnumbered.
+\let\top\unnumbered
+
+% Sections.
+\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
+\def\seczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
+}
+
+\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
+\def\appendixsectionzzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
+}
+\let\appendixsec\appendixsection
+
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
+\def\unnumberedseczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
+}
+
+% Subsections.
+\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
+\def\numberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
+\def\appendixsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+\def\unnumberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno}%
+}
+
+% Subsubsections.
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
+\def\numberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynumbered}%
+ {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
+\def\appendixsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+\def\unnumberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+% These macros control what the section commands do, according
+% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
+% Define them by default for a numbered chapter.
+\let\section = \numberedsec
+\let\subsection = \numberedsubsec
+\let\subsubsection = \numberedsubsubsec
+
+% Define @majorheading, @heading and @subheading
+
+% NOTE on use of \vbox for chapter headings, section headings, and such:
+% 1) We use \vbox rather than the earlier \line to permit
+% overlong headings to fold.
+% 2) \hyphenpenalty is set to 10000 because hyphenation in a
+% heading is obnoxious; this forbids it.
+% 3) Likewise, headings look best if no \parindent is used, and
+% if justification is not attempted. Hence \raggedright.
+
+
+\def\majorheading{%
+ {\advance\chapheadingskip by 10pt \chapbreak }%
+ \parsearg\chapheadingzzz
+}
+
+\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
+\def\chapheadingzzz#1{%
+ {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}%
+ \bigskip \par\penalty 200\relax
+ \suppressfirstparagraphindent
+}
+
+% @heading, @subheading, @subsubheading.
+\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+
+% These macros generate a chapter, section, etc. heading only
+% (including whitespace, linebreaking, etc. around it),
+% given all the information in convenient, parsed form.
+
+%%% Args are the skip and penalty (usually negative)
+\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+
+%%% Define plain chapter starts, and page on/off switching for it
+% Parameter controlling skip before chapter headings (if needed)
+
+\newskip\chapheadingskip
+
+\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+\def\chappager{\par\vfill\supereject}
+\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
+
+\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+
+\def\CHAPPAGoff{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager
+\global\def\HEADINGSon{\HEADINGSsingle}}
+
+\def\CHAPPAGodd{%
+\global\let\contentsalignmacro = \chapoddpage
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage
+\global\def\HEADINGSon{\HEADINGSdouble}}
+
+\CHAPPAGon
+
+% Chapter opening.
+%
+% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
+% Yappendix, Yomitfromtoc), #3 the chapter number.
+%
+% To test against our argument.
+\def\Ynothingkeyword{Ynothing}
+\def\Yomitfromtockeyword{Yomitfromtoc}
+\def\Yappendixkeyword{Yappendix}
+%
+\def\chapmacro#1#2#3{%
+ \pchapsepmacro
+ {%
+ \chapfonts \rm
+ %
+ % Have to define \thissection before calling \donoderef, because the
+ % xref code eventually uses it. On the other hand, it has to be called
+ % after \pchapsepmacro, or the headline will change too soon.
+ \gdef\thissection{#1}%
+ \gdef\thischaptername{#1}%
+ %
+ % Only insert the separating space if we have a chapter/appendix
+ % number, and don't print the unnumbered ``number''.
+ \def\temptype{#2}%
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unnchap}%
+ \gdef\thischapter{#1}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
+ \def\toctype{omit}%
+ \gdef\thischapter{}%
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
+ \def\toctype{app}%
+ % We don't substitute the actual chapter name into \thischapter
+ % because we don't want its macros evaluated now. And we don't
+ % use \thissection because that changes with each section.
+ %
+ \xdef\thischapter{\putwordAppendix{} \appendixletter:
+ \noexpand\thischaptername}%
+ \else
+ \setbox0 = \hbox{#3\enspace}%
+ \def\toctype{numchap}%
+ \xdef\thischapter{\putwordChapter{} \the\chapno:
+ \noexpand\thischaptername}%
+ \fi\fi\fi
+ %
+ % Write the toc entry for this chapter. Must come before the
+ % \donoderef, because we include the current node name in the toc
+ % entry, and \donoderef resets it to empty.
+ \writetocentry{\toctype}{#1}{#3}%
+ %
+ % For pdftex, we have to write out the node definition (aka, make
+ % the pdfdest) after any page break, but before the actual text has
+ % been typeset. If the destination for the pdf outline is after the
+ % text, then jumping from the outline may wind up with the text not
+ % being visible, for instance under high magnification.
+ \donoderef{#2}%
+ %
+ % Typeset the actual heading.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent=\wd0 \centerparametersmaybe
+ \unhbox0 #1\par}%
+ }%
+ \nobreak\bigskip % no page break after a chapter title
+ \nobreak
+}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerparameters{%
+ \advance\rightskip by 3\rightskip
+ \leftskip = \rightskip
+ \parfillskip = 0pt
+}
+
+
+% I don't think this chapter style is supported any more, so I'm not
+% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
+%
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+%
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\nobreak
+}
+\def\chfopen #1#2{\chapoddpage {\chapfonts
+\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
+\par\penalty 5000 %
+}
+\def\centerchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt
+ \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
+}
+\def\CHAPFopen{%
+ \global\let\chapmacro=\chfopen
+ \global\let\centerchapmacro=\centerchfopen}
+
+
+% Section titles. These macros combine the section number parts and
+% call the generic \sectionheading to do the printing.
+%
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
+
+% Subsection titles.
+\newskip\subsecheadingskip
+\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
+
+% Subsubsection titles.
+\def\subsubsecheadingskip{\subsecheadingskip}
+\def\subsubsecheadingbreak{\subsecheadingbreak}
+
+
+% Print any size, any type, section title.
+%
+% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
+% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
+% section number.
+%
+\def\sectionheading#1#2#3#4{%
+ {%
+ % Switch to the right set of fonts.
+ \csname #2fonts\endcsname \rm
+ %
+ % Insert space above the heading.
+ \csname #2headingbreak\endcsname
+ %
+ % Only insert the space after the number if we have a section number.
+ \def\sectionlevel{#2}%
+ \def\temptype{#3}%
+ %
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unn}%
+ \gdef\thissection{#1}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ % for @headings -- no section number, don't include in toc,
+ % and don't redefine \thissection.
+ \setbox0 = \hbox{}%
+ \def\toctype{omit}%
+ \let\sectionlevel=\empty
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{app}%
+ \gdef\thissection{#1}%
+ \else
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{num}%
+ \gdef\thissection{#1}%
+ \fi\fi\fi
+ %
+ % Write the toc entry (before \donoderef). See comments in \chapmacro.
+ \writetocentry{\toctype\sectionlevel}{#1}{#4}%
+ %
+ % Write the node reference (= pdf destination for pdftex).
+ % Again, see comments in \chapmacro.
+ \donoderef{#3}%
+ %
+ % Interline glue will be inserted when the vbox is completed.
+ % That glue will be a valid breakpoint for the page, since it'll be
+ % preceded by a whatsit (usually from the \donoderef, or from the
+ % \writetocentry if there was no node). We don't want to allow that
+ % break, since then the whatsits could end up on page n while the
+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
+ \nobreak
+ %
+ % Output the actual section heading.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent=\wd0 % zero if no section number
+ \unhbox0 #1}%
+ }%
+ % Add extra space after the heading -- half of whatever came above it.
+ % Don't allow stretch, though.
+ \kern .5 \csname #2headingskip\endcsname
+ %
+ % Do not let the kern be a potential breakpoint, as it would be if it
+ % was followed by glue.
+ \nobreak
+ %
+ % We'll almost certainly start a paragraph next, so don't let that
+ % glue accumulate. (Not a breakpoint because it's preceded by a
+ % discardable item.)
+ \vskip-\parskip
+ %
+ % This is purely so the last item on the list is a known \penalty >
+ % 10000. This is so \startdefun can avoid allowing breakpoints after
+ % section headings. Otherwise, it would insert a valid breakpoint between:
+ %
+ % @section sec-whatever
+ % @deffn def-whatever
+ \penalty 10001
+}
+
+
+\message{toc,}
+% Table of contents.
+\newwrite\tocfile
+
+% Write an entry to the toc file, opening it if necessary.
+% Called from @chapter, etc.
+%
+% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
+% We append the current node name (if any) and page number as additional
+% arguments for the \{chap,sec,...}entry macros which will eventually
+% read this. The node name is used in the pdf outlines as the
+% destination to jump to.
+%
+% We open the .toc file for writing here instead of at @setfilename (or
+% any other fixed time) so that @contents can be anywhere in the document.
+% But if #1 is `omit', then we don't do anything. This is used for the
+% table of contents chapter openings themselves.
+%
+\newif\iftocfileopened
+\def\omitkeyword{omit}%
+%
+\def\writetocentry#1#2#3{%
+ \edef\writetoctype{#1}%
+ \ifx\writetoctype\omitkeyword \else
+ \iftocfileopened\else
+ \immediate\openout\tocfile = \jobname.toc
+ \global\tocfileopenedtrue
+ \fi
+ %
+ \iflinks
+ {\atdummies
+ \edef\temp{%
+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
+ \temp
+ }%
+ \fi
+ \fi
+ %
+ % Tell \shipout to create a pdf destination on each page, if we're
+ % writing pdf. These are used in the table of contents. We can't
+ % just write one on every page because the title pages are numbered
+ % 1 and 2 (the page numbers aren't printed), and so are the first
+ % two pages of the document. Thus, we'd have two destinations named
+ % `1', and two named `2'.
+ \ifpdf \global\pdfmakepagedesttrue \fi
+}
+
+
+% These characters do not print properly in the Computer Modern roman
+% fonts, so we must take special care. This is more or less redundant
+% with the Texinfo input format setup at the end of this file.
+%
+\def\activecatcodes{%
+ \catcode`\"=\active
+ \catcode`\$=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \catcode`\\=\active
+ \catcode`\^=\active
+ \catcode`\_=\active
+ \catcode`\|=\active
+ \catcode`\~=\active
+}
+
+
+% Read the toc file, which is essentially Texinfo input.
+\def\readtocfile{%
+ \setupdatafile
+ \activecatcodes
+ \input \jobname.toc
+}
+
+\newskip\contentsrightmargin \contentsrightmargin=1in
+\newcount\savepageno
+\newcount\lastnegativepageno \lastnegativepageno = -1
+
+% Prepare to read what we've written to \tocfile.
+%
+\def\startcontents#1{%
+ % If @setchapternewpage on, and @headings double, the contents should
+ % start on an odd page, unlike chapters. Thus, we maintain
+ % \contentsalignmacro in parallel with \pagealignmacro.
+ % From: Torbjorn Granlund <tege@matematik.su.se>
+ \contentsalignmacro
+ \immediate\closeout\tocfile
+ %
+ % Don't need to put `Contents' or `Short Contents' in the headline.
+ % It is abundantly clear what they are.
+ \def\thischapter{}%
+ \chapmacro{#1}{Yomitfromtoc}{}%
+ %
+ \savepageno = \pageno
+ \begingroup % Set up to handle contents files properly.
+ \raggedbottom % Worry more about breakpoints than the bottom.
+ \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+ %
+ % Roman numerals for page numbers.
+ \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
+}
+
+
+% Normal (long) toc.
+\def\contents{%
+ \startcontents{\putwordTOC}%
+ \openin 1 \jobname.toc
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \ifeof 1 \else
+ \pdfmakeoutlines
+ \fi
+ \closein 1
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+
+% And just the chapters.
+\def\summarycontents{%
+ \startcontents{\putwordShortTOC}%
+ %
+ \let\numchapentry = \shortchapentry
+ \let\appentry = \shortchapentry
+ \let\unnchapentry = \shortunnchapentry
+ % We want a true roman here for the page numbers.
+ \secfonts
+ \let\rm=\shortcontrm \let\bf=\shortcontbf
+ \let\sl=\shortcontsl \let\tt=\shortconttt
+ \rm
+ \hyphenpenalty = 10000
+ \advance\baselineskip by 1pt % Open it up a little.
+ \def\numsecentry##1##2##3##4{}
+ \let\appsecentry = \numsecentry
+ \let\unnsecentry = \numsecentry
+ \let\numsubsecentry = \numsecentry
+ \let\appsubsecentry = \numsecentry
+ \let\unnsubsecentry = \numsecentry
+ \let\numsubsubsecentry = \numsecentry
+ \let\appsubsubsecentry = \numsecentry
+ \let\unnsubsubsecentry = \numsecentry
+ \openin 1 \jobname.toc
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \closein 1
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+\let\shortcontents = \summarycontents
+
+% Typeset the label for a chapter or appendix for the short contents.
+% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
+%
+\def\shortchaplabel#1{%
+ % This space should be enough, since a single number is .5em, and the
+ % widest letter (M) is 1em, at least in the Computer Modern fonts.
+ % But use \hss just in case.
+ % (This space doesn't include the extra space that gets added after
+ % the label; that gets put in by \shortchapentry above.)
+ %
+ % We'd like to right-justify chapter numbers, but that looks strange
+ % with appendix letters. And right-justifying numbers and
+ % left-justifying letters looks strange when there is less than 10
+ % chapters. Have to read the whole toc once to know how many chapters
+ % there are before deciding ...
+ \hbox to 1em{#1\hss}%
+}
+
+% These macros generate individual entries in the table of contents.
+% The first argument is the chapter or section name.
+% The last argument is the page number.
+% The arguments in between are the chapter number, section number, ...
+
+% Chapters, in the main contents.
+\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
+%
+% Chapters, in the short toc.
+% See comments in \dochapentry re vbox and related settings.
+\def\shortchapentry#1#2#3#4{%
+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
+}
+
+% Appendices, in the main contents.
+% Need the word Appendix, and a fixed-size box.
+%
+\def\appendixbox#1{%
+ % We use M since it's probably the widest letter.
+ \setbox0 = \hbox{\putwordAppendix{} M}%
+ \hbox to \wd0{\putwordAppendix{} #1\hss}}
+%
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+
+% Unnumbered chapters.
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
+
+% Sections.
+\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
+\let\appsecentry=\numsecentry
+\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
+
+% Subsections.
+\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsecentry=\numsubsecentry
+\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
+
+% And subsubsections.
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsubsecentry=\numsubsubsecentry
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
+
+% This parameter controls the indentation of the various levels.
+% Same as \defaultparindent.
+\newdimen\tocindent \tocindent = 15pt
+
+% Now for the actual typesetting. In all these, #1 is the text and #2 is the
+% page number.
+%
+% If the toc has to be broken over pages, we want it to be at chapters
+% if at all possible; hence the \penalty.
+\def\dochapentry#1#2{%
+ \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+ \begingroup
+ \chapentryfonts
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \endgroup
+ \nobreak\vskip .25\baselineskip plus.1\baselineskip
+}
+
+\def\dosecentry#1#2{\begingroup
+ \secentryfonts \leftskip=\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsecentry#1#2{\begingroup
+ \subsecentryfonts \leftskip=2\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsubsecentry#1#2{\begingroup
+ \subsubsecentryfonts \leftskip=3\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+% We use the same \entry macro as for the index entries.
+\let\tocentry = \entry
+
+% Space between chapter (or whatever) number and the title.
+\def\labelspace{\hskip1em \relax}
+
+\def\dopageno#1{{\rm #1}}
+\def\doshortpageno#1{{\rm #1}}
+
+\def\chapentryfonts{\secfonts \rm}
+\def\secentryfonts{\textfonts}
+\def\subsecentryfonts{\textfonts}
+\def\subsubsecentryfonts{\textfonts}
+
+
+\message{environments,}
+% @foo ... @end foo.
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, it should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{%
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
+% @tex ... @end tex escapes into raw Tex temporarily.
+% One exception: @ is still an escape character, so that @end tex works.
+% But \@ or @@ will get a plain tex @ character.
+
+\envdef\tex{%
+ \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+ \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
+ \catcode `\%=14
+ \catcode `\+=\other
+ \catcode `\"=\other
+ \catcode `\|=\other
+ \catcode `\<=\other
+ \catcode `\>=\other
+ \escapechar=`\\
+ %
+ \let\b=\ptexb
+ \let\bullet=\ptexbullet
+ \let\c=\ptexc
+ \let\,=\ptexcomma
+ \let\.=\ptexdot
+ \let\dots=\ptexdots
+ \let\equiv=\ptexequiv
+ \let\!=\ptexexclam
+ \let\i=\ptexi
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \let\{=\ptexlbrace
+ \let\+=\tabalign
+ \let\}=\ptexrbrace
+ \let\/=\ptexslash
+ \let\*=\ptexstar
+ \let\t=\ptext
+ \let\frenchspacing=\plainfrenchspacing
+ %
+ \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+ \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
+ \def\@{@}%
+}
+% There is no need to define \Etex.
+
+% Define @lisp ... @end lisp.
+% @lisp environment forms a group so it can rebind things,
+% including the definition of @end lisp (which normally is erroneous).
+
+% Amount to narrow the margins by for @lisp.
+\newskip\lispnarrowing \lispnarrowing=0.4in
+
+% This is the definition that ^^M gets inside @lisp, @example, and other
+% such environments. \null is better than a space, since it doesn't
+% have any width.
+\def\lisppar{\null\endgraf}
+
+% This space is always present above and below environments.
+\newskip\envskipamount \envskipamount = 0pt
+
+% Make spacing and below environment symmetrical. We use \parskip here
+% to help in doing that, since in @example-like environments \parskip
+% is reset to zero; thus the \afterenvbreak inserts no space -- but the
+% start of the next paragraph will insert \parskip.
+%
+\def\aboveenvbreak{{%
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
+ \ifnum \lastpenalty=10000 \else
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
+ % it's not a good place to break if the last penalty was \nobreak
+ % or better ...
+ \ifnum\lastpenalty<10000 \penalty-50 \fi
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
+
+\let\afterenvbreak = \aboveenvbreak
+
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
+% also clear it, so that its embedded environments do the narrowing again.
+\let\nonarrowing=\relax
+
+% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
+% environment contents.
+\font\circle=lcircle10
+\newdimen\circthick
+\newdimen\cartouter\newdimen\cartinner
+\newskip\normbskip\newskip\normpskip\newskip\normlskip
+\circthick=\fontdimen8\circle
+%
+\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
+\def\ctr{{\hskip 6pt\circle\char'010}}
+\def\cbl{{\circle\char'012\hskip -6pt}}
+\def\cbr{{\hskip 6pt\circle\char'011}}
+\def\carttop{\hbox to \cartouter{\hskip\lskip
+ \ctl\leaders\hrule height\circthick\hfil\ctr
+ \hskip\rskip}}
+\def\cartbot{\hbox to \cartouter{\hskip\lskip
+ \cbl\leaders\hrule height\circthick\hfil\cbr
+ \hskip\rskip}}
+%
+\newskip\lskip\newskip\rskip
+
+\envdef\cartouche{%
+ \ifhmode\par\fi % can't be in the midst of a paragraph.
+ \startsavinginserts
+ \lskip=\leftskip \rskip=\rightskip
+ \leftskip=0pt\rightskip=0pt % we want these *outside*.
+ \cartinner=\hsize \advance\cartinner by-\lskip
+ \advance\cartinner by-\rskip
+ \cartouter=\hsize
+ \advance\cartouter by 18.4pt % allow for 3pt kerns on either
+ % side, and for 6pt waste from
+ % each corner char, and rule thickness
+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+ % Flag to tell @lisp, etc., not to narrow margin.
+ \let\nonarrowing = t%
+ \vbox\bgroup
+ \baselineskip=0pt\parskip=0pt\lineskip=0pt
+ \carttop
+ \hbox\bgroup
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \kern3pt
+ \hsize=\cartinner
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
+ \comment % For explanation, see the end of \def\group.
+}
+\def\Ecartouche{%
+ \ifhmode\par\fi
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
+ \egroup
+ \cartbot
+ \egroup
+ \checkinserts
+}
+
+
+% This macro is called at the beginning of all the @example variants,
+% inside a group.
+\def\nonfillstart{%
+ \aboveenvbreak
+ \hfuzz = 12pt % Don't be fussy
+ \sepspaces % Make spaces be word-separators rather than space tokens.
+ \let\par = \lisppar % don't ignore blank lines
+ \obeylines % each line of input is a line of output
+ \parskip = 0pt
+ \parindent = 0pt
+ \emergencystretch = 0pt % don't try to avoid overfull boxes
+ \ifx\nonarrowing\relax
+ \advance \leftskip by \lispnarrowing
+ \exdentamount=\lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \let\exdent=\nofillexdent
+}
+
+% If you want all examples etc. small: @set dispenvsize small.
+% If you want even small examples the full size: @set dispenvsize nosmall.
+% This affects the following displayed environments:
+% @example, @display, @format, @lisp
+%
+\def\smallword{small}
+\def\nosmallword{nosmall}
+\let\SETdispenvsize\relax
+\def\setnormaldispenv{%
+ \ifx\SETdispenvsize\smallword
+ \smallexamplefonts \rm
+ \fi
+}
+\def\setsmalldispenv{%
+ \ifx\SETdispenvsize\nosmallword
+ \else
+ \smallexamplefonts \rm
+ \fi
+}
+
+% We often define two environments, @foo and @smallfoo.
+% Let's do it by one command:
+\def\makedispenv #1#2{
+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+ \expandafter\let\csname E#1\endcsname \afterenvbreak
+ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
+}
+
+% Define two synonyms:
+\def\maketwodispenvs #1#2#3{
+ \makedispenv{#1}{#3}
+ \makedispenv{#2}{#3}
+}
+
+% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @smallexample and @smalllisp: use smaller fonts.
+% Originally contributed by Pavel@xerox.
+%
+\maketwodispenvs {lisp}{example}{%
+ \nonfillstart
+ \tt
+ \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
+ \gobble % eat return
+}
+
+% @display/@smalldisplay: same as @lisp except keep current font.
+%
+\makedispenv {display}{%
+ \nonfillstart
+ \gobble
+}
+
+% @format/@smallformat: same as @display except don't narrow margins.
+%
+\makedispenv{format}{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+
+% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
+\envdef\flushleft{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+\let\Eflushleft = \afterenvbreak
+
+% @flushright.
+%
+\envdef\flushright{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \advance\leftskip by 0pt plus 1fill
+ \gobble
+}
+\let\Eflushright = \afterenvbreak
+
+
+% @quotation does normal linebreaking (hence we can't use \nonfillstart)
+% and narrows the margins. We keep \parskip nonzero in general, since
+% we're doing normal filling. So, when using \aboveenvbreak and
+% \afterenvbreak, temporarily make \parskip 0.
+%
+\envdef\quotation{%
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \parindent=0pt
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \advance\rightskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \parsearg\quotationlabel
+}
+
+% We have retained a nonzero parskip for the environment, since we're
+% doing normal filling.
+%
+\def\Equotation{%
+ \par
+ \ifx\quotationauthor\undefined\else
+ % indent a bit.
+ \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
+ \fi
+ {\parskip=0pt \afterenvbreak}%
+}
+
+% If we're given an argument, typeset it in bold with a colon after.
+\def\quotationlabel#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty \else
+ {\bf #1: }%
+ \fi
+}
+
+
+% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
+% If we want to allow any <char> as delimiter,
+% we need the curly braces so that makeinfo sees the @verb command, eg:
+% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
+%
+% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
+%
+% [Knuth] p.344; only we need to do the other characters Texinfo sets
+% active too. Otherwise, they get lost as the first character on a
+% verbatim line.
+\def\dospecials{%
+ \do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
+ \do\<\do\>\do\|\do\@\do+\do\"%
+}
+%
+% [Knuth] p. 380
+\def\uncatcodespecials{%
+ \def\do##1{\catcode`##1=\other}\dospecials}
+%
+% [Knuth] pp. 380,381,391
+% Disable Spanish ligatures ?` and !` of \tt font
+\begingroup
+ \catcode`\`=\active\gdef`{\relax\lq}
+\endgroup
+%
+% Setup for the @verb command.
+%
+% Eight spaces for a tab
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
+\endgroup
+%
+\def\setupverb{%
+ \tt % easiest (and conventionally used) font for verbatim
+ \def\par{\leavevmode\endgraf}%
+ \catcode`\`=\active
+ \tabeightspaces
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+}
+
+% Setup for the @verbatim environment
+%
+% Real tab expansion
+\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
+%
+\def\starttabbox{\setbox0=\hbox\bgroup}
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabexpand{%
+ \catcode`\^^I=\active
+ \def^^I{\leavevmode\egroup
+ \dimen0=\wd0 % the width so far, or since the previous tab
+ \divide\dimen0 by\tabw
+ \multiply\dimen0 by\tabw % compute previous multiple of \tabw
+ \advance\dimen0 by\tabw % advance to next multiple of \tabw
+ \wd0=\dimen0 \box0 \starttabbox
+ }%
+ }
+\endgroup
+\def\setupverbatim{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ % Easiest (and conventionally used) font for verbatim
+ \tt
+ \def\par{\leavevmode\egroup\box0\endgraf}%
+ \catcode`\`=\active
+ \tabexpand
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+ \everypar{\starttabbox}%
+}
+
+% Do the @verb magic: verbatim text is quoted by unique
+% delimiter characters. Before first delimiter expect a
+% right brace, after last delimiter expect closing brace:
+%
+% \def\doverb'{'<char>#1<char>'}'{#1}
+%
+% [Knuth] p. 382; only eat outer {}
+\begingroup
+ \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
+ \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
+\endgroup
+%
+\def\verb{\begingroup\setupverb\doverb}
+%
+%
+% Do the @verbatim magic: define the macro \doverbatim so that
+% the (first) argument ends when '@end verbatim' is reached, ie:
+%
+% \def\doverbatim#1@end verbatim{#1}
+%
+% For Texinfo it's a lot easier than for LaTeX,
+% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
+% we need not redefine '\', '{' and '}'.
+%
+% Inspired by LaTeX's verbatim command set [latex.ltx]
+%
+\begingroup
+ \catcode`\ =\active
+ \obeylines %
+ % ignore everything up to the first ^^M, that's the newline at the end
+ % of the @verbatim input line itself. Otherwise we get an extra blank
+ % line in the output.
+ \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
+ % We really want {...\end verbatim} in the body of the macro, but
+ % without the active space; thus we have to use \xdef and \gobble.
+\endgroup
+%
+\envdef\verbatim{%
+ \setupverbatim\doverbatim
+}
+\let\Everbatim = \afterenvbreak
+
+
+% @verbatiminclude FILE - insert text of file in verbatim environment.
+%
+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
+%
+\def\doverbatiminclude#1{%
+ {%
+ \makevalueexpandable
+ \setupverbatim
+ \input #1
+ \afterenvbreak
+ }%
+}
+
+% @copying ... @end copying.
+% Save the text away for @insertcopying later.
+%
+% We save the uninterpreted tokens, rather than creating a box.
+% Saving the text in a box would be much easier, but then all the
+% typesetting commands (@smallbook, font changes, etc.) have to be done
+% beforehand -- and a) we want @copying to be done first in the source
+% file; b) letting users define the frontmatter in as flexible order as
+% possible is very desirable.
+%
+\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
+\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
+%
+\def\insertcopying{%
+ \begingroup
+ \parindent = 0pt % paragraph indentation looks wrong on title page
+ \scanexp\copyingtext
+ \endgroup
+}
+
+\message{defuns,}
+% @defun etc.
+
+\newskip\defbodyindent \defbodyindent=.4in
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+
+% Start the processing of @deffn:
+\def\startdefun{%
+ \ifnum\lastpenalty<10000
+ \medbreak
+ \else
+ % If there are two @def commands in a row, we'll have a \nobreak,
+ % which is there to keep the function description together with its
+ % header. But if there's nothing but headers, we need to allow a
+ % break somewhere. Check specifically for penalty 10002, inserted
+ % by \defargscommonending, instead of 10000, since the sectioning
+ % commands also insert a nobreak penalty, and we don't want to allow
+ % a break between a section heading and a defun.
+ %
+ \ifnum\lastpenalty=10002 \penalty2000 \fi
+ %
+ % Similarly, after a section heading, do not allow a break.
+ % But do insert the glue.
+ \medskip % preceded by discardable penalty, so not a breakpoint
+ \fi
+ %
+ \parindent=0in
+ \advance\leftskip by \defbodyindent
+ \exdentamount=\defbodyindent
+}
+
+\def\dodefunx#1{%
+ % First, check whether we are in the right environment:
+ \checkenv#1%
+ %
+ % As above, allow line break if we have multiple x headers in a row.
+ % It's not a great place, though.
+ \ifnum\lastpenalty=10002 \penalty3000 \fi
+ %
+ % And now, it's time to reuse the body of the original defun:
+ \expandafter\gobbledefun#1%
+}
+\def\gobbledefun#1\startdefun{}
+
+% \printdefunline \deffnheader{text}
+%
+\def\printdefunline#1#2{%
+ \begingroup
+ % call \deffnheader:
+ #1#2 \endheader
+ % common ending:
+ \interlinepenalty = 10000
+ \advance\rightskip by 0pt plus 1fil
+ \endgraf
+ \nobreak\vskip -\parskip
+ \penalty 10002 % signal to \startdefun and \dodefunx
+ % Some of the @defun-type tags do not enable magic parentheses,
+ % rendering the following check redundant. But we don't optimize.
+ \checkparencounts
+ \endgroup
+}
+
+\def\Edefun{\endgraf\medbreak}
+
+% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
+% the only thing remainnig is to define \deffnheader.
+%
+\def\makedefun#1{%
+ \expandafter\let\csname E#1\endcsname = \Edefun
+ \edef\temp{\noexpand\domakedefun
+ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
+ \temp
+}
+
+% \domakedefun \deffn \deffnx \deffnheader
+%
+% Define \deffn and \deffnx, without parameters.
+% \deffnheader has to be defined explicitly.
+%
+\def\domakedefun#1#2#3{%
+ \envdef#1{%
+ \startdefun
+ \parseargusing\activeparens{\printdefunline#3}%
+ }%
+ \def#2{\dodefunx#1}%
+ \def#3%
+}
+
+%%% Untyped functions:
+
+% @deffn category name args
+\makedefun{deffn}{\deffngeneral{}}
+
+% @deffn category class name args
+\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
+
+% \defopon {category on}class name args
+\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deffngeneral {subind}category name args
+%
+\def\deffngeneral#1#2 #3 #4\endheader{%
+ % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
+ \dosubind{fn}{\code{#3}}{#1}%
+ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
+}
+
+%%% Typed functions:
+
+% @deftypefn category type name args
+\makedefun{deftypefn}{\deftypefngeneral{}}
+
+% @deftypeop category class type name args
+\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
+
+% \deftypeopon {category on}class type name args
+\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypefngeneral {subind}category type name args
+%
+\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{fn}{\code{#4}}{#1}%
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Typed variables:
+
+% @deftypevr category type var args
+\makedefun{deftypevr}{\deftypecvgeneral{}}
+
+% @deftypecv category class type var args
+\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
+
+% \deftypecvof {category of}class type var args
+\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypecvgeneral {subind}category type var args
+%
+\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{vr}{\code{#4}}{#1}%
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Untyped variables:
+
+% @defvr category var args
+\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
+
+% @defcv category class var args
+\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
+
+% \defcvof {category of}class var args
+\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
+
+%%% Type:
+% @deftp category name args
+\makedefun{deftp}#1 #2 #3\endheader{%
+ \doind{tp}{\code{#2}}%
+ \defname{#1}{}{#2}\defunargs{#3\unskip}%
+}
+
+% Remaining @defun-like shortcuts:
+\makedefun{defun}{\deffnheader{\putwordDeffunc} }
+\makedefun{defmac}{\deffnheader{\putwordDefmac} }
+\makedefun{defspec}{\deffnheader{\putwordDefspec} }
+\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
+\makedefun{defvar}{\defvrheader{\putwordDefvar} }
+\makedefun{defopt}{\defvrheader{\putwordDefopt} }
+\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
+\makedefun{defmethod}{\defopon\putwordMethodon}
+\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
+\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
+\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
+
+% \defname, which formats the name of the @def (not the args).
+% #1 is the category, such as "Function".
+% #2 is the return type, if any.
+% #3 is the function name.
+%
+% We are followed by (but not passed) the arguments, if any.
+%
+\def\defname#1#2#3{%
+ % Get the values of \leftskip and \rightskip as they were outside the @def...
+ \advance\leftskip by -\defbodyindent
+ %
+ % How we'll format the type name. Putting it in brackets helps
+ % distinguish it from the body text that may end up on the next line
+ % just below it.
+ \def\temp{#1}%
+ \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
+ %
+ % Figure out line sizes for the paragraph shape.
+ % The first line needs space for \box0; but if \rightskip is nonzero,
+ % we need only space for the part of \box0 which exceeds it:
+ \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
+ % The continuations:
+ \dimen2=\hsize \advance\dimen2 by -\defargsindent
+ % (plain.tex says that \dimen1 should be used only as global.)
+ \parshape 2 0in \dimen0 \defargsindent \dimen2
+ %
+ % Put the type name to the right margin.
+ \noindent
+ \hbox to 0pt{%
+ \hfil\box0 \kern-\hsize
+ % \hsize has to be shortened this way:
+ \kern\leftskip
+ % Intentionally do not respect \rightskip, since we need the space.
+ }%
+ %
+ % Allow all lines to be underfull without complaint:
+ \tolerance=10000 \hbadness=10000
+ \exdentamount=\defbodyindent
+ {%
+ % defun fonts. We use typewriter by default (used to be bold) because:
+ % . we're printing identifiers, they should be in tt in principle.
+ % . in languages with many accents, such as Czech or French, it's
+ % common to leave accents off identifiers. The result looks ok in
+ % tt, but exceedingly strange in rm.
+ % . we don't want -- and --- to be treated as ligatures.
+ % . this still does not fix the ?` and !` ligatures, but so far no
+ % one has made identifiers using them :).
+ \df \tt
+ \def\temp{#2}% return value type
+ \ifx\temp\empty\else \tclose{\temp} \fi
+ #3% output function name
+ }%
+ {\rm\enskip}% hskip 0.5 em of \tenrm
+ %
+ \boldbrax
+ % arguments will be output next, if any.
+}
+
+% Print arguments in slanted roman (not ttsl), inconsistently with using
+% tt for the name. This is because literal text is sometimes needed in
+% the argument list (groff manual), and ttsl and tt are not very
+% distinguishable. Prevent hyphenation at `-' chars.
+%
+\def\defunargs#1{%
+ % use sl by default (not ttsl),
+ % tt for the names.
+ \df \sl \hyphenchar\font=0
+ %
+ % On the other hand, if an argument has two dashes (for instance), we
+ % want a way to get ttsl. Let's try @var for that.
+ \let\var=\ttslanted
+ #1%
+ \sl\hyphenchar\font=45
+}
+
+% We want ()&[] to print specially on the defun line.
+%
+\def\activeparens{%
+ \catcode`\(=\active \catcode`\)=\active
+ \catcode`\[=\active \catcode`\]=\active
+ \catcode`\&=\active
+}
+
+% Make control sequences which act like normal parenthesis chars.
+\let\lparen = ( \let\rparen = )
+
+% Be sure that we always have a definition for `(', etc. For example,
+% if the fn name has parens in it, \boldbrax will not be in effect yet,
+% so TeX would otherwise complain about undefined control sequence.
+{
+ \activeparens
+ \global\let(=\lparen \global\let)=\rparen
+ \global\let[=\lbrack \global\let]=\rbrack
+ \global\let& = \&
+
+ \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+ \gdef\magicamp{\let&=\amprm}
+}
+
+\newcount\parencount
+
+% If we encounter &foo, then turn on ()-hacking afterwards
+\newif\ifampseen
+\def\amprm#1 {\ampseentrue{\bf\&#1 }}
+
+\def\parenfont{%
+ \ifampseen
+ % At the first level, print parens in roman,
+ % otherwise use the default font.
+ \ifnum \parencount=1 \rm \fi
+ \else
+ % The \sf parens (in \boldbrax) actually are a little bolder than
+ % the contained text. This is especially needed for [ and ] .
+ \sf
+ \fi
+}
+\def\infirstlevel#1{%
+ \ifampseen
+ \ifnum\parencount=1
+ #1%
+ \fi
+ \fi
+}
+\def\bfafterword#1 {#1 \bf}
+
+\def\opnr{%
+ \global\advance\parencount by 1
+ {\parenfont(}%
+ \infirstlevel \bfafterword
+}
+\def\clnr{%
+ {\parenfont)}%
+ \infirstlevel \sl
+ \global\advance\parencount by -1
+}
+
+\newcount\brackcount
+\def\lbrb{%
+ \global\advance\brackcount by 1
+ {\bf[}%
+}
+\def\rbrb{%
+ {\bf]}%
+ \global\advance\brackcount by -1
+}
+
+\def\checkparencounts{%
+ \ifnum\parencount=0 \else \badparencount \fi
+ \ifnum\brackcount=0 \else \badbrackcount \fi
+}
+\def\badparencount{%
+ \errmessage{Unbalanced parentheses in @def}%
+ \global\parencount=0
+}
+\def\badbrackcount{%
+ \errmessage{Unbalanced square braces in @def}%
+ \global\brackcount=0
+}
+
+
+\message{macros,}
+% @macro.
+
+% To do this right we need a feature of e-TeX, \scantokens,
+% which we arrange to emulate with a temporary file in ordinary TeX.
+\ifx\eTeXversion\undefined
+ \newwrite\macscribble
+ \def\scantokens#1{%
+ \toks0={#1}%
+ \immediate\openout\macscribble=\jobname.tmp
+ \immediate\write\macscribble{\the\toks0}%
+ \immediate\closeout\macscribble
+ \input \jobname.tmp
+ }
+\fi
+
+\def\scanmacro#1{%
+ \begingroup
+ \newlinechar`\^^M
+ \let\xeatspaces\eatspaces
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ % ... and \example
+ \spaceisspace
+ %
+ % Append \endinput to make sure that TeX does not see the ending newline.
+ %
+ % I've verified that it is necessary both for e-TeX and for ordinary TeX
+ % --kasal, 29nov03
+ \scantokens{#1\endinput}%
+ \endgroup
+}
+
+\def\scanexp#1{%
+ \edef\temp{\noexpand\scanmacro{#1}}%
+ \temp
+}
+
+\newcount\paramno % Count of parameters
+\newtoks\macname % Macro name
+\newif\ifrecursive % Is it recursive?
+
+% List of all defined macros in the form
+% \definedummyword\macro1\definedummyword\macro2...
+% Currently is also contains all @aliases; the list can be split
+% if there is a need.
+\def\macrolist{}
+
+% Add the macro to \macrolist
+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
+\def\addtomacrolistxxx#1{%
+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \xdef\macrolist{\the\toks0}%
+}
+
+% Utility routines.
+% This does \let #1 = #2, with \csnames; that is,
+% \let \csname#1\endcsname = \csname#2\endcsname
+% (except of course we have to play expansion games).
+%
+\def\cslet#1#2{%
+ \expandafter\let
+ \csname#1\expandafter\endcsname
+ \csname#2\endcsname
+}
+
+% Trim leading and trailing spaces off a string.
+% Concepts from aro-bend problem 15 (see CTAN).
+{\catcode`\@=11
+\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
+\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
+\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
+\def\unbrace#1{#1}
+\unbrace{\gdef\trim@@@ #1 } #2@{#1}
+}
+
+% Trim a single trailing ^^M off a string.
+{\catcode`\^^M=\other \catcode`\Q=3%
+\gdef\eatcr #1{\eatcra #1Q^^MQ}%
+\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
+\gdef\eatcrb#1Q#2Q{#1}%
+}
+
+% Macro bodies are absorbed as an argument in a context where
+% all characters are catcode 10, 11 or 12, except \ which is active
+% (as in normal texinfo). It is necessary to change the definition of \.
+
+% It's necessary to have hard CRs when the macro is executed. This is
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% body, and then making it the \newlinechar in \scanmacro.
+
+\def\scanctxt{%
+ \catcode`\"=\other
+ \catcode`\+=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\@=\other
+ \catcode`\^=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\~=\other
+}
+
+\def\scanargctxt{%
+ \scanctxt
+ \catcode`\\=\other
+ \catcode`\^^M=\other
+}
+
+\def\macrobodyctxt{%
+ \scanctxt
+ \catcode`\{=\other
+ \catcode`\}=\other
+ \catcode`\^^M=\other
+ \usembodybackslash
+}
+
+\def\macroargctxt{%
+ \scanctxt
+ \catcode`\\=\other
+}
+
+% \mbodybackslash is the definition of \ in @macro bodies.
+% It maps \foo\ => \csname macarg.foo\endcsname => #N
+% where N is the macro parameter number.
+% We define \csname macarg.\endcsname to be \realbackslash, so
+% \\ in macro replacement text gets you a backslash.
+
+{\catcode`@=0 @catcode`@\=@active
+ @gdef@usembodybackslash{@let\=@mbodybackslash}
+ @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
+}
+\expandafter\def\csname macarg.\endcsname{\realbackslash}
+
+\def\macro{\recursivefalse\parsearg\macroxxx}
+\def\rmacro{\recursivetrue\parsearg\macroxxx}
+
+\def\macroxxx#1{%
+ \getargs{#1}% now \macname is the macname and \argl the arglist
+ \ifx\argl\empty % no arguments
+ \paramno=0%
+ \else
+ \expandafter\parsemargdef \argl;%
+ \fi
+ \if1\csname ismacro.\the\macname\endcsname
+ \message{Warning: redefining \the\macname}%
+ \else
+ \expandafter\ifx\csname \the\macname\endcsname \relax
+ \else \errmessage{Macro name \the\macname\space already defined}\fi
+ \global\cslet{macsave.\the\macname}{\the\macname}%
+ \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
+ \addtomacrolist{\the\macname}%
+ \fi
+ \begingroup \macrobodyctxt
+ \ifrecursive \expandafter\parsermacbody
+ \else \expandafter\parsemacbody
+ \fi}
+
+\parseargdef\unmacro{%
+ \if1\csname ismacro.#1\endcsname
+ \global\cslet{#1}{macsave.#1}%
+ \global\expandafter\let \csname ismacro.#1\endcsname=0%
+ % Remove the macro name from \macrolist:
+ \begingroup
+ \expandafter\let\csname#1\endcsname \relax
+ \let\definedummyword\unmacrodo
+ \xdef\macrolist{\macrolist}%
+ \endgroup
+ \else
+ \errmessage{Macro #1 not defined}%
+ \fi
+}
+
+% Called by \do from \dounmacro on each macro. The idea is to omit any
+% macro definitions that have been changed to \relax.
+%
+\def\unmacrodo#1{%
+ \ifx #1\relax
+ % remove this
+ \else
+ \noexpand\definedummyword \noexpand#1%
+ \fi
+}
+
+% This makes use of the obscure feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
+\def\getargs#1{\getargsxxx#1{}}
+\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
+\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacargs#1{\def\argl{#1}}
+
+% Parse the optional {params} list. Set up \paramno and \paramlist
+% so \defmacro knows what to do. Define \macarg.blah for each blah
+% in the params list, to be ##N where N is the position in that list.
+% That gets used by \mbodybackslash (above).
+
+% We need to get `macro parameter char #' into several definitions.
+% The technique used is stolen from LaTeX: let \hash be something
+% unexpandable, insert that wherever you need a #, and then redefine
+% it to # just before using the token list produced.
+%
+% The same technique is used to protect \eatspaces till just before
+% the macro is used.
+
+\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
+ \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdefxxx#1,{%
+ \if#1;\let\next=\relax
+ \else \let\next=\parsemargdefxxx
+ \advance\paramno by 1%
+ \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+ {\xeatspaces{\hash\the\paramno}}%
+ \edef\paramlist{\paramlist\hash\the\paramno,}%
+ \fi\next}
+
+% These two commands read recursive and nonrecursive macro bodies.
+% (They're different since rec and nonrec macros end differently.)
+
+\long\def\parsemacbody#1@end macro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\long\def\parsermacbody#1@end rmacro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+
+% This defines the macro itself. There are six cases: recursive and
+% nonrecursive macros of zero, one, and many arguments.
+% Much magic with \expandafter here.
+% \xdef is used so that macro definitions will survive the file
+% they're defined in; @include reads the file inside a group.
+\def\defmacro{%
+ \let\hash=##% convert placeholders to macro parameter chars
+ \ifrecursive
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\scanmacro{\temp}}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup\noexpand\scanmacro{\temp}}%
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \fi
+ \else
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \fi
+ \fi}
+
+\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
+
+% \braceorline decides whether the next nonwhitespace character is a
+% {. If so it reads up to the closing }, if not, it reads the whole
+% line. Whatever was read is then fed to the next control sequence
+% as an argument (by \parsebrace or \parsearg)
+\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
+\def\braceorlinexxx{%
+ \ifx\nchar\bgroup\else
+ \expandafter\parsearg
+ \fi \next}
+
+
+% @alias.
+% We need some trickery to remove the optional spaces around the equal
+% sign. Just make them active and then expand them all to nothing.
+\def\alias{\parseargusing\obeyspaces\aliasxxx}
+\def\aliasxxx #1{\aliasyyy#1\relax}
+\def\aliasyyy #1=#2\relax{%
+ {%
+ \expandafter\let\obeyedspace=\empty
+ \addtomacrolist{#1}%
+ \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
+ }%
+ \next
+}
+
+
+\message{cross references,}
+
+\newwrite\auxfile
+
+\newif\ifhavexrefs % True if xref values are known.
+\newif\ifwarnedxrefs % True if we warned once that they aren't known.
+
+% @inforef is relatively simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+ node \samp{\ignorespaces#1{}}}
+
+% @node's only job in TeX is to define \lastnode, which is used in
+% cross-references. The @node line might or might not have commas, and
+% might or might not have spaces before the first comma, like:
+% @node foo , bar , ...
+% We don't want such trailing spaces in the node name.
+%
+\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
+%
+% also remove a trailing comma, in case of something like this:
+% @node Help-Cross, , , Cross-refs
+\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+
+\let\nwnode=\node
+\let\lastnode=\empty
+
+% Write a cross-reference definition for the current node. #1 is the
+% type (Ynumbered, Yappendix, Ynothing).
+%
+\def\donoderef#1{%
+ \ifx\lastnode\empty\else
+ \setref{\lastnode}{#1}%
+ \global\let\lastnode=\empty
+ \fi
+}
+
+% @anchor{NAME} -- define xref target at arbitrary point.
+%
+\newcount\savesfregister
+%
+\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
+\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
+\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
+
+% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
+% anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name taken from \thissection,
+% or the anchor name.
+% 2) NAME-snt - section number and type, passed as the SNT arg, or
+% empty for anchors.
+% 3) NAME-pg - the page number.
+%
+% This is called from \donoderef, \anchor, and \dofloat. In the case of
+% floats, there is an additional part, which is not written here:
+% 4) NAME-lof - the text as it should appear in a @listoffloats.
+%
+\def\setref#1#2{%
+ \pdfmkdest{#1}%
+ \iflinks
+ {%
+ \atdummies % preserve commands, but don't expand them
+ \edef\writexrdef##1##2{%
+ \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
+ ##1}{##2}}% these are parameters of \writexrdef
+ }%
+ \toks0 = \expandafter{\thissection}%
+ \immediate \writexrdef{title}{\the\toks0 }%
+ \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
+ \writexrdef{pg}{\folio}% will be written later, during \shipout
+ }%
+ \fi
+}
+
+% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
+% the node name, #2 the name of the Info cross-reference, #3 the printed
+% node name, #4 the name of the Info file, #5 the name of the printed
+% manual. All but the node name can be omitted.
+%
+\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
+\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
+\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
+ \unsepspaces
+ \def\printedmanual{\ignorespaces #5}%
+ \def\printedrefname{\ignorespaces #3}%
+ \setbox1=\hbox{\printedmanual\unskip}%
+ \setbox0=\hbox{\printedrefname\unskip}%
+ \ifdim \wd0 = 0pt
+ % No printed node name was explicitly given.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+ % Use the node name inside the square brackets.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ % Use the actual chapter/section title appear inside
+ % the square brackets. Use the real section title if we have it.
+ \ifdim \wd1 > 0pt
+ % It is in another manual, so we don't have it.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ \ifhavexrefs
+ % We know the real title if we have the xref values.
+ \def\printedrefname{\refx{#1-title}{}}%
+ \else
+ % Otherwise just copy the Info node name.
+ \def\printedrefname{\ignorespaces #1}%
+ \fi%
+ \fi
+ \fi
+ \fi
+ %
+ % Make link in pdf output.
+ \ifpdf
+ \leavevmode
+ \getfilename{#4}%
+ {\turnoffactive
+ % See comments at \activebackslashdouble.
+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
+ \backslashparens\pdfxrefdest}%
+ %
+ \ifnum\filenamelength>0
+ \startlink attr{/Border [0 0 0]}%
+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
+ \else
+ \startlink attr{/Border [0 0 0]}%
+ goto name{\pdfmkpgn{\pdfxrefdest}}%
+ \fi
+ }%
+ \linkcolor
+ \fi
+ %
+ % Float references are printed completely differently: "Figure 1.2"
+ % instead of "[somenode], p.3". We distinguish them by the
+ % LABEL-title being set to a magic string.
+ {%
+ % Have to otherify everything special to allow the \csname to
+ % include an _ in the xref name, etc.
+ \indexnofonts
+ \turnoffactive
+ \expandafter\global\expandafter\let\expandafter\Xthisreftitle
+ \csname XR#1-title\endcsname
+ }%
+ \iffloat\Xthisreftitle
+ % If the user specified the print name (third arg) to the ref,
+ % print it instead of our usual "Figure 1.2".
+ \ifdim\wd0 = 0pt
+ \refx{#1-snt}{}%
+ \else
+ \printedrefname
+ \fi
+ %
+ % if the user also gave the printed manual name (fifth arg), append
+ % "in MANUALNAME".
+ \ifdim \wd1 > 0pt
+ \space \putwordin{} \cite{\printedmanual}%
+ \fi
+ \else
+ % node/anchor (non-float) references.
+ %
+ % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
+ % insert empty discretionaries after hyphens, which means that it will
+ % not find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens, this
+ % is a loss. Therefore, we give the text of the node name again, so it
+ % is as if TeX is seeing it for the first time.
+ \ifdim \wd1 > 0pt
+ \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+ \else
+ % _ (for example) has to be the character _ for the purposes of the
+ % control sequence corresponding to the node, but it has to expand
+ % into the usual \leavevmode...\vrule stuff for purposes of
+ % printing. So we \turnoffactive for the \refx-snt, back on for the
+ % printing, back off for the \refx-pg.
+ {\turnoffactive
+ % Only output a following space if the -snt ref is nonempty; for
+ % @unnumbered and @anchor, it won't be.
+ \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
+ \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+ }%
+ % output the `[mynode]' via a macro so it can be overridden.
+ \xrefprintnodename\printedrefname
+ %
+ % But we always want a comma and a space:
+ ,\space
+ %
+ % output the `page 3'.
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% This macro is called from \xrefX for the `[nodename]' part of xref
+% output. It's a separate macro only so it can be changed more easily,
+% since square brackets don't work well in some documents. Particularly
+% one that Bob is working on :).
+%
+\def\xrefprintnodename#1{[#1]}
+
+% Things referred to by \setref.
+%
+\def\Ynothing{}
+\def\Yomitfromtoc{}
+\def\Ynumbered{%
+ \ifnum\secno=0
+ \putwordChapter@tie \the\chapno
+ \else \ifnum\subsecno=0
+ \putwordSection@tie \the\chapno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
+ \else
+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+\def\Yappendix{%
+ \ifnum\secno=0
+ \putwordAppendix@tie @char\the\appendixno{}%
+ \else \ifnum\subsecno=0
+ \putwordSection@tie @char\the\appendixno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
+ \else
+ \putwordSection@tie
+ @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+
+% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
+% If its value is nonempty, SUFFIX is output afterward.
+%
+\def\refx#1#2{%
+ {%
+ \indexnofonts
+ \otherbackslash
+ \expandafter\global\expandafter\let\expandafter\thisrefX
+ \csname XR#1\endcsname
+ }%
+ \ifx\thisrefX\relax
+ % If not defined, say something at least.
+ \angleleft un\-de\-fined\angleright
+ \iflinks
+ \ifhavexrefs
+ \message{\linenumber Undefined cross reference `#1'.}%
+ \else
+ \ifwarnedxrefs\else
+ \global\warnedxrefstrue
+ \message{Cross reference values unknown; you must run TeX again.}%
+ \fi
+ \fi
+ \fi
+ \else
+ % It's defined, so just use it.
+ \thisrefX
+ \fi
+ #2% Output the suffix in any case.
+}
+
+% This is the macro invoked by entries in the aux file. Usually it's
+% just a \def (we prepend XR to the control sequence name to avoid
+% collisions). But if this is a float type, we have more work to do.
+%
+\def\xrdef#1#2{%
+ \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value.
+ %
+ % Was that xref control sequence that we just defined for a float?
+ \expandafter\iffloat\csname XR#1\endcsname
+ % it was a float, and we have the (safe) float type in \iffloattype.
+ \expandafter\let\expandafter\floatlist
+ \csname floatlist\iffloattype\endcsname
+ %
+ % Is this the first time we've seen this float type?
+ \expandafter\ifx\floatlist\relax
+ \toks0 = {\do}% yes, so just \do
+ \else
+ % had it before, so preserve previous elements in list.
+ \toks0 = \expandafter{\floatlist\do}%
+ \fi
+ %
+ % Remember this xref in the control sequence \floatlistFLOATTYPE,
+ % for later use in \listoffloats.
+ \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}%
+ \fi
+}
+
+% Read the last existing aux file, if any. No error if none exists.
+%
+\def\tryauxfile{%
+ \openin 1 \jobname.aux
+ \ifeof 1 \else
+ \readdatafile{aux}%
+ \global\havexrefstrue
+ \fi
+ \closein 1
+}
+
+\def\setupdatafile{%
+ \catcode`\^^@=\other
+ \catcode`\^^A=\other
+ \catcode`\^^B=\other
+ \catcode`\^^C=\other
+ \catcode`\^^D=\other
+ \catcode`\^^E=\other
+ \catcode`\^^F=\other
+ \catcode`\^^G=\other
+ \catcode`\^^H=\other
+ \catcode`\^^K=\other
+ \catcode`\^^L=\other
+ \catcode`\^^N=\other
+ \catcode`\^^P=\other
+ \catcode`\^^Q=\other
+ \catcode`\^^R=\other
+ \catcode`\^^S=\other
+ \catcode`\^^T=\other
+ \catcode`\^^U=\other
+ \catcode`\^^V=\other
+ \catcode`\^^W=\other
+ \catcode`\^^X=\other
+ \catcode`\^^Z=\other
+ \catcode`\^^[=\other
+ \catcode`\^^\=\other
+ \catcode`\^^]=\other
+ \catcode`\^^^=\other
+ \catcode`\^^_=\other
+ % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
+ % in xref tags, i.e., node names. But since ^^e4 notation isn't
+ % supported in the main text, it doesn't seem desirable. Furthermore,
+ % that is not enough: for node names that actually contain a ^
+ % character, we would end up writing a line like this: 'xrdef {'hat
+ % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
+ % argument, and \hat is not an expandable control sequence. It could
+ % all be worked out, but why? Either we support ^^ or we don't.
+ %
+ % The other change necessary for this was to define \auxhat:
+ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
+ % and then to call \auxhat in \setq.
+ %
+ \catcode`\^=\other
+ %
+ % Special characters. Should be turned off anyway, but...
+ \catcode`\~=\other
+ \catcode`\[=\other
+ \catcode`\]=\other
+ \catcode`\"=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\$=\other
+ \catcode`\#=\other
+ \catcode`\&=\other
+ \catcode`\%=\other
+ \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
+ %
+ % This is to support \ in node names and titles, since the \
+ % characters end up in a \csname. It's easier than
+ % leaving it active and making its active definition an actual \
+ % character. What I don't understand is why it works in the *value*
+ % of the xrdef. Seems like it should be a catcode12 \, and that
+ % should not typeset properly. But it works, so I'm moving on for
+ % now. --karl, 15jan04.
+ \catcode`\\=\other
+ %
+ % Make the characters 128-255 be printing characters.
+ {%
+ \count1=128
+ \def\loop{%
+ \catcode\count1=\other
+ \advance\count1 by 1
+ \ifnum \count1<256 \loop \fi
+ }%
+ }%
+ %
+ % @ is our escape character in .aux files, and we need braces.
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\@=0
+}
+
+\def\readdatafile#1{%
+\begingroup
+ \setupdatafile
+ \input\jobname.#1
+\endgroup}
+
+\message{insertions,}
+% including footnotes.
+
+\newcount \footnoteno
+
+% The trailing space in the following definition for supereject is
+% vital for proper filling; pages come out unaligned when you do a
+% pagealignmacro call if that space before the closing brace is
+% removed. (Generally, numeric constants should always be followed by a
+% space to prevent strange expansion errors.)
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+% @footnotestyle is meaningful for info output only.
+\let\footnotestyle=\comment
+
+{\catcode `\@=11
+%
+% Auto-number footnotes. Otherwise like plain.
+\gdef\footnote{%
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \global\advance\footnoteno by \@ne
+ \edef\thisfootno{$^{\the\footnoteno}$}%
+ %
+ % In case the footnote comes at the end of a sentence, preserve the
+ % extra spacing after we do the footnote number.
+ \let\@sf\empty
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
+ %
+ % Remove inadvertent blank space before typesetting the footnote number.
+ \unskip
+ \thisfootno\@sf
+ \dofootnote
+}%
+
+% Don't bother with the trickery in plain.tex to not require the
+% footnote text as a parameter. Our footnotes don't need to be so general.
+%
+% Oh yes, they do; otherwise, @ifset (and anything else that uses
+% \parseargline) fails inside footnotes because the tokens are fixed when
+% the footnote is read. --karl, 16nov96.
+%
+\gdef\dofootnote{%
+ \insert\footins\bgroup
+ % We want to typeset this text as a normal paragraph, even if the
+ % footnote reference occurs in (for example) a display environment.
+ % So reset some parameters.
+ \hsize=\pagewidth
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % top baseline for broken footnotes
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty\@MM
+ \leftskip\z@skip
+ \rightskip\z@skip
+ \spaceskip\z@skip
+ \xspaceskip\z@skip
+ \parindent\defaultparindent
+ %
+ \smallfonts \rm
+ %
+ % Because we use hanging indentation in footnotes, a @noindent appears
+ % to exdent this text, so make it be a no-op. makeinfo does not use
+ % hanging indentation so @noindent can still be needed within footnote
+ % text after an @example or the like (not that this is good style).
+ \let\noindent = \relax
+ %
+ % Hang the footnote text off the number. Use \everypar in case the
+ % footnote extends for more than one paragraph.
+ \everypar = {\hang}%
+ \textindent{\thisfootno}%
+ %
+ % Don't crash into the line above the footnote text. Since this
+ % expands into a box, it must come within the paragraph, lest it
+ % provide a place where TeX can split the footnote.
+ \footstrut
+ \futurelet\next\fo@t
+}
+}%end \catcode `\@=11
+
+% In case a @footnote appears in a vbox, save the footnote text and create
+% the real \insert just after the vbox finished. Otherwise, the insertion
+% would be lost.
+% Similarly, if a @footnote appears inside an alignment, save the footnote
+% text to a box and make the \insert when a row of the table is finished.
+% And the same can be done for other insert classes. --kasal, 16nov03.
+
+% Replace the \insert primitive by a cheating macro.
+% Deeper inside, just make sure that the saved insertions are not spilled
+% out prematurely.
+%
+\def\startsavinginserts{%
+ \ifx \insert\ptexinsert
+ \let\insert\saveinsert
+ \else
+ \let\checkinserts\relax
+ \fi
+}
+
+% This \insert replacement works for both \insert\footins{foo} and
+% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
+%
+\def\saveinsert#1{%
+ \edef\next{\noexpand\savetobox \makeSAVEname#1}%
+ \afterassignment\next
+ % swallow the left brace
+ \let\temp =
+}
+\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
+\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
+
+\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
+
+\def\placesaveins#1{%
+ \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
+ {\box#1}%
+}
+
+% eat @SAVE -- beware, all of them have catcode \other:
+{
+ \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
+ \gdef\gobblesave @SAVE{}
+}
+
+% initialization:
+\def\newsaveins #1{%
+ \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
+ \next
+}
+\def\newsaveinsX #1{%
+ \csname newbox\endcsname #1%
+ \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
+ \checksaveins #1}%
+}
+
+% initialize:
+\let\checkinserts\empty
+\newsaveins\footins
+\newsaveins\margin
+
+
+% @image. We use the macros from epsf.tex to support this.
+% If epsf.tex is not installed and @image is used, we complain.
+%
+% Check for and read epsf.tex up front. If we read it only at @image
+% time, we might be inside a group, and then its definitions would get
+% undone and the next image would fail.
+\openin 1 = epsf.tex
+\ifeof 1 \else
+ % Do not bother showing banner with epsf.tex v2.7k (available in
+ % doc/epsf.tex and on ctan).
+ \def\epsfannounce{\toks0 = }%
+ \input epsf.tex
+\fi
+\closein 1
+%
+% We will only complain once about lack of epsf.tex.
+\newif\ifwarnednoepsf
+\newhelp\noepsfhelp{epsf.tex must be installed for images to
+ work. It is also included in the Texinfo distribution, or you can get
+ it from ftp://tug.org/tex/epsf.tex.}
+%
+\def\image#1{%
+ \ifx\epsfbox\undefined
+ \ifwarnednoepsf \else
+ \errhelp = \noepsfhelp
+ \errmessage{epsf.tex not found, images will be ignored}%
+ \global\warnednoepsftrue
+ \fi
+ \else
+ \imagexxx #1,,,,,\finish
+ \fi
+}
+%
+% Arguments to @image:
+% #1 is (mandatory) image filename; we tack on .eps extension.
+% #2 is (optional) width, #3 is (optional) height.
+% #4 is (ignored optional) html alt text.
+% #5 is (ignored optional) extension.
+% #6 is just the usual extra ignored arg for parsing this stuff.
+\newif\ifimagevmode
+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
+ \catcode`\^^M = 5 % in case we're inside an example
+ \normalturnoffactive % allow _ et al. in names
+ % If the image is by itself, center it.
+ \ifvmode
+ \imagevmodetrue
+ \nobreak\bigskip
+ % Usually we'll have text after the image which will insert
+ % \parskip glue, so insert it here too to equalize the space
+ % above and below.
+ \nobreak\vskip\parskip
+ \nobreak
+ \line\bgroup
+ \fi
+ %
+ % Output the image.
+ \ifpdf
+ \dopdfimage{#1}{#2}{#3}%
+ \else
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ \epsfbox{#1.eps}%
+ \fi
+ %
+ \ifimagevmode \egroup \bigbreak \fi % space after the image
+\endgroup}
+
+
+% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
+% etc. We don't actually implement floating yet, we always include the
+% float "here". But it seemed the best name for the future.
+%
+\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
+
+% There may be a space before second and/or third parameter; delete it.
+\def\eatcommaspace#1, {#1,}
+
+% #1 is the optional FLOATTYPE, the text label for this float, typically
+% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
+% this float will not be numbered and cannot be referred to.
+%
+% #2 is the optional xref label. Also must be present for the float to
+% be referable.
+%
+% #3 is the optional positioning argument; for now, it is ignored. It
+% will somehow specify the positions allowed to float to (here, top, bottom).
+%
+% We keep a separate counter for each FLOATTYPE, which we reset at each
+% chapter-level command.
+\let\resetallfloatnos=\empty
+%
+\def\dofloat#1,#2,#3,#4\finish{%
+ \let\thiscaption=\empty
+ \let\thisshortcaption=\empty
+ %
+ % don't lose footnotes inside @float.
+ %
+ % BEWARE: when the floats start float, we have to issue warning whenever an
+ % insert appears inside a float which could possibly float. --kasal, 26may04
+ %
+ \startsavinginserts
+ %
+ % We can't be used inside a paragraph.
+ \par
+ %
+ \vtop\bgroup
+ \def\floattype{#1}%
+ \def\floatlabel{#2}%
+ \def\floatloc{#3}% we do nothing with this yet.
+ %
+ \ifx\floattype\empty
+ \let\safefloattype=\empty
+ \else
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ \fi
+ %
+ % If label is given but no type, we handle that as the empty type.
+ \ifx\floatlabel\empty \else
+ % We want each FLOATTYPE to be numbered separately (Figure 1,
+ % Table 1, Figure 2, ...). (And if no label, no number.)
+ %
+ \expandafter\getfloatno\csname\safefloattype floatno\endcsname
+ \global\advance\floatno by 1
+ %
+ {%
+ % This magic value for \thissection is output by \setref as the
+ % XREFLABEL-title value. \xrefX uses it to distinguish float
+ % labels (which have a completely different output format) from
+ % node and anchor labels. And \xrdef uses it to construct the
+ % lists of floats.
+ %
+ \edef\thissection{\floatmagic=\safefloattype}%
+ \setref{\floatlabel}{Yfloat}%
+ }%
+ \fi
+ %
+ % start with \parskip glue, I guess.
+ \vskip\parskip
+ %
+ % Don't suppress indentation if a float happens to start a section.
+ \restorefirstparagraphindent
+}
+
+% we have these possibilities:
+% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
+% @float Foo,lbl & no caption: Foo 1.1
+% @float Foo & @caption{Cap}: Foo: Cap
+% @float Foo & no caption: Foo
+% @float ,lbl & Caption{Cap}: 1.1: Cap
+% @float ,lbl & no caption: 1.1
+% @float & @caption{Cap}: Cap
+% @float & no caption:
+%
+\def\Efloat{%
+ \let\floatident = \empty
+ %
+ % In all cases, if we have a float type, it comes first.
+ \ifx\floattype\empty \else \def\floatident{\floattype}\fi
+ %
+ % If we have an xref label, the number comes next.
+ \ifx\floatlabel\empty \else
+ \ifx\floattype\empty \else % if also had float type, need tie first.
+ \appendtomacro\floatident{\tie}%
+ \fi
+ % the number.
+ \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
+ \fi
+ %
+ % Start the printed caption with what we've constructed in
+ % \floatident, but keep it separate; we need \floatident again.
+ \let\captionline = \floatident
+ %
+ \ifx\thiscaption\empty \else
+ \ifx\floatident\empty \else
+ \appendtomacro\captionline{: }% had ident, so need a colon between
+ \fi
+ %
+ % caption text.
+ \appendtomacro\captionline{\scanexp\thiscaption}%
+ \fi
+ %
+ % If we have anything to print, print it, with space before.
+ % Eventually this needs to become an \insert.
+ \ifx\captionline\empty \else
+ \vskip.5\parskip
+ \captionline
+ %
+ % Space below caption.
+ \vskip\parskip
+ \fi
+ %
+ % If have an xref label, write the list of floats info. Do this
+ % after the caption, to avoid chance of it being a breakpoint.
+ \ifx\floatlabel\empty \else
+ % Write the text that goes in the lof to the aux file as
+ % \floatlabel-lof. Besides \floatident, we include the short
+ % caption if specified, else the full caption if specified, else nothing.
+ {%
+ \atdummies
+ %
+ % since we read the caption text in the macro world, where ^^M
+ % is turned into a normal character, we have to scan it back, so
+ % we don't write the literal three characters "^^M" into the aux file.
+ \scanexp{%
+ \xdef\noexpand\gtemp{%
+ \ifx\thisshortcaption\empty
+ \thiscaption
+ \else
+ \thisshortcaption
+ \fi
+ }%
+ }%
+ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
+ }%
+ \fi
+ \egroup % end of \vtop
+ %
+ % place the captured inserts
+ %
+ % BEWARE: when the floats start floating, we have to issue warning
+ % whenever an insert appears inside a float which could possibly
+ % float. --kasal, 26may04
+ %
+ \checkinserts
+}
+
+% Append the tokens #2 to the definition of macro #1, not expanding either.
+%
+\def\appendtomacro#1#2{%
+ \expandafter\def\expandafter#1\expandafter{#1#2}%
+}
+
+% @caption, @shortcaption
+%
+\def\caption{\docaption\thiscaption}
+\def\shortcaption{\docaption\thisshortcaption}
+\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
+\def\defcaption#1#2{\egroup \def#1{#2}}
+
+% The parameter is the control sequence identifying the counter we are
+% going to use. Create it if it doesn't exist and assign it to \floatno.
+\def\getfloatno#1{%
+ \ifx#1\relax
+ % Haven't seen this figure type before.
+ \csname newcount\endcsname #1%
+ %
+ % Remember to reset this floatno at the next chap.
+ \expandafter\gdef\expandafter\resetallfloatnos
+ \expandafter{\resetallfloatnos #1=0 }%
+ \fi
+ \let\floatno#1%
+}
+
+% \setref calls this to get the XREFLABEL-snt value. We want an @xref
+% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
+% first read the @float command.
+%
+\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
+
+% Magic string used for the XREFLABEL-title value, so \xrefX can
+% distinguish floats from other xref types.
+\def\floatmagic{!!float!!}
+
+% #1 is the control sequence we are passed; we expand into a conditional
+% which is true if #1 represents a float ref. That is, the magic
+% \thissection value which we \setref above.
+%
+\def\iffloat#1{\expandafter\doiffloat#1==\finish}
+%
+% #1 is (maybe) the \floatmagic string. If so, #2 will be the
+% (safe) float type for this float. We set \iffloattype to #2.
+%
+\def\doiffloat#1=#2=#3\finish{%
+ \def\temp{#1}%
+ \def\iffloattype{#2}%
+ \ifx\temp\floatmagic
+}
+
+% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
+%
+\parseargdef\listoffloats{%
+ \def\floattype{#1}% floattype
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ %
+ % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
+ \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
+ \ifhavexrefs
+ % if the user said @listoffloats foo but never @float foo.
+ \message{\linenumber No `\safefloattype' floats to list.}%
+ \fi
+ \else
+ \begingroup
+ \leftskip=\tocindent % indent these entries like a toc
+ \let\do=\listoffloatsdo
+ \csname floatlist\safefloattype\endcsname
+ \endgroup
+ \fi
+}
+
+% This is called on each entry in a list of floats. We're passed the
+% xref label, in the form LABEL-title, which is how we save it in the
+% aux file. We strip off the -title and look up \XRLABEL-lof, which
+% has the text we're supposed to typeset here.
+%
+% Figures without xref labels will not be included in the list (since
+% they won't appear in the aux file).
+%
+\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
+\def\listoffloatsdoentry#1-title\finish{{%
+ % Can't fully expand XR#1-lof because it can contain anything. Just
+ % pass the control sequence. On the other hand, XR#1-pg is just the
+ % page number, and we want to fully expand that so we can get a link
+ % in pdf output.
+ \toksA = \expandafter{\csname XR#1-lof\endcsname}%
+ %
+ % use the same \entry macro we use to generate the TOC and index.
+ \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
+ \writeentry
+}}
+
+\message{localization,}
+% and i18n.
+
+% @documentlanguage is usually given very early, just after
+% @setfilename. If done too late, it may not override everything
+% properly. Single argument is the language abbreviation.
+% It would be nice if we could set up a hyphenation file here.
+%
+\parseargdef\documentlanguage{%
+ \tex % read txi-??.tex file in plain TeX.
+ % Read the file if it exists.
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \else
+ \input txi-#1.tex
+ \fi
+ \closein 1
+ \endgroup
+}
+\newhelp\nolanghelp{The given language definition file cannot be found or
+is empty. Maybe you need to install it? In the current directory
+should work if nowhere else does.}
+
+
+% @documentencoding should change something in TeX eventually, most
+% likely, but for now just recognize it.
+\let\documentencoding = \comment
+
+
+% Page size parameters.
+%
+\newdimen\defaultparindent \defaultparindent = 15pt
+
+\chapheadingskip = 15pt plus 4pt minus 2pt
+\secheadingskip = 12pt plus 3pt minus 2pt
+\subsecheadingskip = 9pt plus 2pt minus 2pt
+
+% Prevent underfull vbox error messages.
+\vbadness = 10000
+
+% Don't be so finicky about underfull hboxes, either.
+\hbadness = 2000
+
+% Following George Bush, just get rid of widows and orphans.
+\widowpenalty=10000
+\clubpenalty=10000
+
+% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
+% using an old version of TeX, don't do anything. We want the amount of
+% stretch added to depend on the line length, hence the dependence on
+% \hsize. We call this whenever the paper size is set.
+%
+\def\setemergencystretch{%
+ \ifx\emergencystretch\thisisundefined
+ % Allow us to assign to \emergencystretch anyway.
+ \def\emergencystretch{\dimen0}%
+ \else
+ \emergencystretch = .15\hsize
+ \fi
+}
+
+% Parameters in order: 1) textheight; 2) textwidth;
+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+% 7) physical page height; 8) physical page width.
+%
+% We also call \setleading{\textleading}, so the caller should define
+% \textleading. The caller should also set \parskip.
+%
+\def\internalpagesizes#1#2#3#4#5#6#7#8{%
+ \voffset = #3\relax
+ \topskip = #6\relax
+ \splittopskip = \topskip
+ %
+ \vsize = #1\relax
+ \advance\vsize by \topskip
+ \outervsize = \vsize
+ \advance\outervsize by 2\topandbottommargin
+ \pageheight = \vsize
+ %
+ \hsize = #2\relax
+ \outerhsize = \hsize
+ \advance\outerhsize by 0.5in
+ \pagewidth = \hsize
+ %
+ \normaloffset = #4\relax
+ \bindingoffset = #5\relax
+ %
+ \ifpdf
+ \pdfpageheight #7\relax
+ \pdfpagewidth #8\relax
+ \fi
+ %
+ \setleading{\textleading}
+ %
+ \parindent = \defaultparindent
+ \setemergencystretch
+}
+
+% @letterpaper (the default).
+\def\letterpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % If page is nothing but text, make it come out even.
+ \internalpagesizes{46\baselineskip}{6in}%
+ {\voffset}{.25in}%
+ {\bindingoffset}{36pt}%
+ {11in}{8.5in}%
+}}
+
+% Use @smallbook to reset parameters for 7x9.25 trim size.
+\def\smallbook{{\globaldefs = 1
+ \parskip = 2pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.5in}{5in}%
+ {\voffset}{.25in}%
+ {\bindingoffset}{16pt}%
+ {9.25in}{7in}%
+ %
+ \lispnarrowing = 0.3in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .5cm
+}}
+
+% Use @smallerbook to reset parameters for 6x9 trim size.
+% (Just testing, parameters still in flux.)
+\def\smallerbook{{\globaldefs = 1
+ \parskip = 1.5pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.4in}{4.8in}%
+ {-.2in}{-.4in}%
+ {0pt}{14pt}%
+ {9in}{6in}%
+ %
+ \lispnarrowing = 0.25in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .4cm
+}}
+
+% Use @afourpaper to print on European A4 paper.
+\def\afourpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % Double-side printing via postscript on Laserjet 4050
+ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
+ % To change the settings for a different printer or situation, adjust
+ % \normaloffset until the front-side and back-side texts align. Then
+ % do the same for \bindingoffset. You can set these for testing in
+ % your texinfo source file like this:
+ % @tex
+ % \global\normaloffset = -6mm
+ % \global\bindingoffset = 10mm
+ % @end tex
+ \internalpagesizes{51\baselineskip}{160mm}
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{44pt}%
+ {297mm}{210mm}%
+ %
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 5mm
+}}
+
+% Use @afivepaper to print on European A5 paper.
+% From romildo@urano.iceb.ufop.br, 2 July 2000.
+% He also recommends making @example and @lisp be small.
+\def\afivepaper{{\globaldefs = 1
+ \parskip = 2pt plus 1pt minus 0.1pt
+ \textleading = 12.5pt
+ %
+ \internalpagesizes{160mm}{120mm}%
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{8pt}%
+ {210mm}{148mm}%
+ %
+ \lispnarrowing = 0.2in
+ \tolerance = 800
+ \hfuzz = 1.2pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 2mm
+ \tableindent = 12mm
+}}
+
+% A specific text layout, 24x15cm overall, intended for A4 paper.
+\def\afourlatex{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{237mm}{150mm}%
+ {\voffset}{4.6mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ %
+ % Must explicitly reset to 0 because we call \afourpaper.
+ \globaldefs = 0
+}}
+
+% Use @afourwide to print on A4 paper in landscape format.
+\def\afourwide{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{241mm}{165mm}%
+ {\voffset}{-2.95mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ \globaldefs = 0
+}}
+
+% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
+% Perhaps we should allow setting the margins, \topskip, \parskip,
+% and/or leading, also. Or perhaps we should compute them somehow.
+%
+\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
+\def\pagesizesyyy#1,#2,#3\finish{{%
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
+ \globaldefs = 1
+ %
+ \parskip = 3pt plus 2pt minus 1pt
+ \setleading{\textleading}%
+ %
+ \dimen0 = #1
+ \advance\dimen0 by \voffset
+ %
+ \dimen2 = \hsize
+ \advance\dimen2 by \normaloffset
+ %
+ \internalpagesizes{#1}{\hsize}%
+ {\voffset}{\normaloffset}%
+ {\bindingoffset}{44pt}%
+ {\dimen0}{\dimen2}%
+}}
+
+% Set default to letter.
+%
+\letterpaper
+
+
+\message{and turning on texinfo input format.}
+
+% Define macros to output various characters with catcode for normal text.
+\catcode`\"=\other
+\catcode`\~=\other
+\catcode`\^=\other
+\catcode`\_=\other
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode`\+=\other
+\catcode`\$=\other
+\def\normaldoublequote{"}
+\def\normaltilde{~}
+\def\normalcaret{^}
+\def\normalunderscore{_}
+\def\normalverticalbar{|}
+\def\normalless{<}
+\def\normalgreater{>}
+\def\normalplus{+}
+\def\normaldollar{$}%$ font-lock fix
+
+% This macro is used to make a character print one way in \tt
+% (where it can probably be output as-is), and another way in other fonts,
+% where something hairier probably needs to be done.
+%
+% #1 is what to print if we are indeed using \tt; #2 is what to print
+% otherwise. Since all the Computer Modern typewriter fonts have zero
+% interword stretch (and shrink), and it is reasonable to expect all
+% typewriter fonts to have this, we can check that font parameter.
+%
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font. Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts. But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary).
+% Most of these we simply print from the \tt font, but for some, we can
+% use math or other variants that look better in normal text.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt\char34}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt\char126}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+
+\catcode`\_=\active
+\def_{\ifusingtt\normalunderscore\_}
+\let\realunder=_
+% Subroutine for the previous macro.
+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+
+\catcode`\|=\active
+\def|{{\tt\char124}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+% Used sometimes to turn off (effectively) the active characters even after
+% parsing them.
+\def\turnoffactive{%
+ \normalturnoffactive
+ \otherbackslash
+}
+
+\catcode`\@=0
+
+% \backslashcurfont outputs one backslash character in current font,
+% as in \char`\\.
+\global\chardef\backslashcurfont=`\\
+\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
+
+% \realbackslash is an actual character `\' with catcode other, and
+% \doublebackslash is two of them (for the pdf outlines).
+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
+
+% In texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active
+@def@normalbackslash{{@tt@backslashcurfont}}
+% On startup, @fixbackslash assigns:
+% @let \ = @normalbackslash
+
+% \rawbackslash defines an active \ to do \backslashcurfont.
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other.
+@gdef@rawbackslash{@let\=@backslashcurfont}
+@gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+@def@normalturnoffactive{%
+ @let\=@normalbackslash
+ @let"=@normaldoublequote
+ @let~=@normaltilde
+ @let^=@normalcaret
+ @let_=@normalunderscore
+ @let|=@normalverticalbar
+ @let<=@normalless
+ @let>=@normalgreater
+ @let+=@normalplus
+ @let$=@normaldollar %$ font-lock fix
+ @unsepspaces
+}
+
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
+
+% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
+% That is what \eatinput is for; after that, the `\' should revert to printing
+% a backslash.
+%
+@gdef@eatinput input texinfo{@fixbackslash}
+@global@let\ = @eatinput
+
+% On the other hand, perhaps the file did not have a `\input texinfo'. Then
+% the first `\' in the file would cause an error. This macro tries to fix
+% that, assuming it is called before the first `\' could plausibly occur.
+% Also turn back on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
+@gdef@fixbackslash{%
+ @ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active
+ @catcode`@_=@active
+}
+
+% Say @foo, not \foo, in error messages.
+@escapechar = `@@
+
+% These look ok in all fonts, so just make them not special.
+@catcode`@& = @other
+@catcode`@# = @other
+@catcode`@% = @other
+
+
+@c Local variables:
+@c eval: (add-hook 'write-file-hooks 'time-stamp)
+@c page-delimiter: "^\\\\message"
+@c time-stamp-start: "def\\\\texinfoversion{"
+@c time-stamp-format: "%:y-%02m-%02d.%02H"
+@c time-stamp-end: "}"
+@c End:
+
+@c vim:sw=2:
+
+@ignore
+ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
+@end ignore
diff --git a/lib/et/vfprintf.c b/lib/et/vfprintf.c
new file mode 100644
index 0000000..e3fcd78
--- /dev/null
+++ b/lib/et/vfprintf.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)vfprintf.c 5.2 (Berkeley) 6/27/88";
+#endif /* LIBC_SCCS and not lint */
+
+#include "config.h"
+#if !HAVE_VPRINTF && HAVE_DOPRNT
+#include <stdio.h>
+#include <varargs.h>
+
+int
+vfprintf(iop, fmt, ap)
+ FILE *iop;
+ char *fmt;
+ va_list ap;
+{
+ int len;
+ char localbuf[BUFSIZ];
+
+ if (iop->_flag & _IONBF) {
+ iop->_flag &= ~_IONBF;
+ iop->_ptr = iop->_base = localbuf;
+ len = _doprnt(fmt, ap, iop);
+ (void) fflush(iop);
+ iop->_flag |= _IONBF;
+ iop->_base = NULL;
+ iop->_bufsiz = 0;
+ iop->_cnt = 0;
+ } else
+ len = _doprnt(fmt, ap, iop);
+
+ return (ferror(iop) ? EOF : len);
+}
+#endif /* !HAVE_VPRINTF */
diff --git a/lib/ext2fs/Android.bp b/lib/ext2fs/Android.bp
new file mode 100644
index 0000000..db8b3b7
--- /dev/null
+++ b/lib/ext2fs/Android.bp
@@ -0,0 +1,129 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-GPL-2.0
+ // SPDX-license-identifier-LGPL
+ // SPDX-license-identifier-LGPL-2.1
+ // SPDX-license-identifier-LGPL-3.0
+ // legacy_unencumbered
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library {
+ name: "libext2fs",
+ host_supported: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "ext2_err.c",
+ "alloc.c",
+ "alloc_sb.c",
+ "alloc_stats.c",
+ "alloc_tables.c",
+ "atexit.c",
+ "badblocks.c",
+ "bb_inode.c",
+ "bitmaps.c",
+ "bitops.c",
+ "blkmap64_ba.c",
+ "blkmap64_rb.c",
+ "blknum.c",
+ "block.c",
+ "bmap.c",
+ "check_desc.c",
+ "crc16.c",
+ "crc32c.c",
+ "csum.c",
+ "closefs.c",
+ "dblist.c",
+ "dblist_dir.c",
+ "digest_encode.c",
+ "dirblock.c",
+ "dirhash.c",
+ "dir_iterate.c",
+ "dupfs.c",
+ "expanddir.c",
+ "ext_attr.c",
+ "extent.c",
+ "fallocate.c",
+ "fileio.c",
+ "finddev.c",
+ "flushb.c",
+ "freefs.c",
+ "gen_bitmap.c",
+ "gen_bitmap64.c",
+ "get_num_dirs.c",
+ "get_pathname.c",
+ "getsize.c",
+ "getsectsize.c",
+ "hashmap.c",
+ "i_block.c",
+ "icount.c",
+ "imager.c",
+ "ind_block.c",
+ "initialize.c",
+ "inline.c",
+ "inline_data.c",
+ "inode.c",
+ "io_manager.c",
+ "ismounted.c",
+ "link.c",
+ "llseek.c",
+ "lookup.c",
+ "mmp.c",
+ "mkdir.c",
+ "mkjournal.c",
+ "namei.c",
+ "native.c",
+ "newdir.c",
+ "nls_utf8.c",
+ "openfs.c",
+ "progress.c",
+ "punch.c",
+ "qcow2.c",
+ "rbtree.c",
+ "read_bb.c",
+ "read_bb_file.c",
+ "res_gdt.c",
+ "rw_bitmaps.c",
+ "sha256.c",
+ "sha512.c",
+ "swapfs.c",
+ "symlink.c",
+ "undo_io.c",
+ "unix_io.c",
+ "sparse_io.c",
+ "unlink.c",
+ "valid_blk.c",
+ "version.c",
+ // get rid of this?!
+ "test_io.c",
+ ],
+ shared_libs: [
+ "libext2_com_err",
+ "libsparse",
+ "libz",
+ ],
+ target: {
+ android: {
+ shared_libs: ["libext2_uuid"],
+ },
+ windows: {
+ enabled: true,
+ srcs: ["windows_io.c"],
+ exclude_srcs: ["unix_io.c"],
+ },
+ },
+
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+}
diff --git a/lib/ext2fs/Makefile.in b/lib/ext2fs/Makefile.in
new file mode 100644
index 0000000..798ff60
--- /dev/null
+++ b/lib/ext2fs/Makefile.in
@@ -0,0 +1,1459 @@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/ext2fs
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+DEPEND_CFLAGS = -I$(top_srcdir)/debugfs -I$(srcdir)/../../e2fsck -DDEBUGFS
+# This nastiness is needed because of jfs_user.h hackery; when we finally
+# clean up this mess, we should be able to drop it
+DEBUGFS_CFLAGS = -I$(srcdir)/../../e2fsck $(ALL_CFLAGS) -DDEBUGFS
+
+@MCONFIG@
+
+@DEBUGFS_CMT@DEBUGFS_LIB_OBJS = bb_compat.o inode_io.o write_bb_file.o
+
+MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir)/../ss ../ss/mk_cmds
+COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
+
+@RESIZER_CMT@RESIZE_LIB_OBJS = dupfs.o
+@TEST_IO_CMT@TEST_IO_LIB_OBJS = test_io.o
+@IMAGER_CMT@E2IMAGE_LIB_OBJS = imager.o
+
+DEBUG_OBJS= debug_cmds.o extent_cmds.o tst_cmds.o debugfs.o util.o \
+ ncheck.o icheck.o ls.o lsdel.o dump.o set_fields.o logdump.o \
+ htree.o unused.o e2freefrag.o filefrag.o extent_inode.o zap.o \
+ xattrs.o quota.o tst_libext2fs.o create_inode.o journal.o \
+ revoke.o recovery.o do_journal.o
+
+DEBUG_SRCS= debug_cmds.c extent_cmds.c tst_cmds.c \
+ $(top_srcdir)/debugfs/debugfs.c \
+ $(top_srcdir)/debugfs/util.c \
+ $(top_srcdir)/debugfs/ncheck.c \
+ $(top_srcdir)/debugfs/icheck.c \
+ $(top_srcdir)/debugfs/ls.c \
+ $(top_srcdir)/debugfs/lsdel.c \
+ $(top_srcdir)/debugfs/dump.c \
+ $(top_srcdir)/debugfs/set_fields.c \
+ $(top_srcdir)/debugfs/logdump.c \
+ $(top_srcdir)/debugfs/htree.c \
+ $(top_srcdir)/debugfs/unused.c \
+ $(top_srcdir)/debugfs/filefrag.c \
+ $(top_srcdir)/debugfs/extent_inode.c \
+ $(top_srcdir)/debugfs/zap.c \
+ $(top_srcdir)/debugfs/quota.c \
+ $(top_srcdir)/debugfs/xattrs.c \
+ $(top_srcdir)/misc/e2freefrag.c \
+ $(top_srcdir)/misc/create_inode.c \
+ $(top_srcdir)/debugfs/journal.c \
+ $(top_srcdir)/e2fsck/revoke.c \
+ $(top_srcdir)/e2fsck/recovery.c \
+ $(top_srcdir)/debugfs/do_journal.c
+
+@TDB_CMT@TDB_OBJ= tdb.o
+
+OBJS= $(DEBUGFS_LIB_OBJS) $(RESIZE_LIB_OBJS) $(E2IMAGE_LIB_OBJS) \
+ $(TEST_IO_LIB_OBJS) \
+ ext2_err.o \
+ alloc.o \
+ alloc_sb.o \
+ alloc_stats.o \
+ alloc_tables.o \
+ atexit.o \
+ badblocks.o \
+ bb_inode.o \
+ bitmaps.o \
+ bitops.o \
+ blkmap64_ba.o \
+ blkmap64_rb.o \
+ blknum.o \
+ block.o \
+ bmap.o \
+ check_desc.o \
+ closefs.o \
+ crc16.o \
+ crc32c.o \
+ csum.o \
+ dblist.o \
+ dblist_dir.o \
+ dirblock.o \
+ dirhash.o \
+ dir_iterate.o \
+ expanddir.o \
+ ext_attr.o \
+ extent.o \
+ fallocate.o \
+ fileio.o \
+ finddev.o \
+ flushb.o \
+ freefs.o \
+ gen_bitmap.o \
+ gen_bitmap64.o \
+ get_num_dirs.o \
+ get_pathname.o \
+ getsize.o \
+ getsectsize.o \
+ hashmap.o \
+ i_block.o \
+ icount.o \
+ ind_block.o \
+ initialize.o \
+ inline.o \
+ inline_data.o \
+ inode.o \
+ io_manager.o \
+ ismounted.o \
+ link.o \
+ llseek.o \
+ lookup.o \
+ mkdir.o \
+ mkjournal.o \
+ mmp.o \
+ namei.o \
+ native.o \
+ newdir.o \
+ nls_utf8.o \
+ openfs.o \
+ orphan.o \
+ progress.o \
+ punch.o \
+ qcow2.o \
+ read_bb.o \
+ read_bb_file.o \
+ res_gdt.o \
+ rw_bitmaps.o \
+ sha512.o \
+ swapfs.o \
+ symlink.o \
+ $(TDB_OBJ) \
+ undo_io.o \
+ @OS_IO_FILE@.o \
+ sparse_io.o \
+ unlink.o \
+ valid_blk.o \
+ version.o \
+ rbtree.o
+
+SRCS= ext2_err.c \
+ $(srcdir)/alloc.c \
+ $(srcdir)/alloc_sb.c \
+ $(srcdir)/alloc_stats.c \
+ $(srcdir)/alloc_tables.c \
+ $(srcdir)/atexit.c \
+ $(srcdir)/badblocks.c \
+ $(srcdir)/bb_compat.c \
+ $(srcdir)/bb_inode.c \
+ $(srcdir)/bitmaps.c \
+ $(srcdir)/bitops.c \
+ $(srcdir)/blkmap64_ba.c \
+ $(srcdir)/blkmap64_rb.c \
+ $(srcdir)/block.c \
+ $(srcdir)/bmap.c \
+ $(srcdir)/check_desc.c \
+ $(srcdir)/closefs.c \
+ $(srcdir)/crc16.c \
+ $(srcdir)/crc32c.c \
+ $(srcdir)/gen_crc32ctable.c \
+ $(srcdir)/csum.c \
+ $(srcdir)/dblist.c \
+ $(srcdir)/dblist_dir.c \
+ $(srcdir)/digest_encode.c \
+ $(srcdir)/dirblock.c \
+ $(srcdir)/dirhash.c \
+ $(srcdir)/dir_iterate.c \
+ $(srcdir)/dupfs.c \
+ $(srcdir)/expanddir.c \
+ $(srcdir)/ext_attr.c \
+ $(srcdir)/extent.c \
+ $(srcdir)/fileio.c \
+ $(srcdir)/finddev.c \
+ $(srcdir)/flushb.c \
+ $(srcdir)/freefs.c \
+ $(srcdir)/gen_bitmap.c \
+ $(srcdir)/gen_bitmap64.c \
+ $(srcdir)/get_num_dirs.c \
+ $(srcdir)/get_pathname.c \
+ $(srcdir)/getsize.c \
+ $(srcdir)/getsectsize.c \
+ $(srcdir)/hashmap.c \
+ $(srcdir)/i_block.c \
+ $(srcdir)/icount.c \
+ $(srcdir)/ind_block.c \
+ $(srcdir)/initialize.c \
+ $(srcdir)/inline.c \
+ $(srcdir)/inline_data.c \
+ $(srcdir)/inode.c \
+ $(srcdir)/inode_io.c \
+ $(srcdir)/imager.c \
+ $(srcdir)/io_manager.c \
+ $(srcdir)/ismounted.c \
+ $(srcdir)/link.c \
+ $(srcdir)/llseek.c \
+ $(srcdir)/lookup.c \
+ $(srcdir)/mkdir.c \
+ $(srcdir)/mkjournal.c \
+ $(srcdir)/mmp.c \
+ $(srcdir)/namei.c \
+ $(srcdir)/native.c \
+ $(srcdir)/newdir.c \
+ $(srcdir)/nls_utf8.c \
+ $(srcdir)/openfs.c \
+ $(srcdir)/orphan.c \
+ $(srcdir)/progress.c \
+ $(srcdir)/punch.c \
+ $(srcdir)/qcow2.c \
+ $(srcdir)/read_bb.c \
+ $(srcdir)/read_bb_file.c \
+ $(srcdir)/res_gdt.c \
+ $(srcdir)/rw_bitmaps.c \
+ $(srcdir)/sha256.c \
+ $(srcdir)/sha512.c \
+ $(srcdir)/swapfs.c \
+ $(srcdir)/symlink.c \
+ $(srcdir)/tdb.c \
+ $(srcdir)/test_io.c \
+ $(srcdir)/tst_badblocks.c \
+ $(srcdir)/tst_bitops.c \
+ $(srcdir)/tst_byteswap.c \
+ $(srcdir)/tst_getsize.c \
+ $(srcdir)/tst_iscan.c \
+ $(srcdir)/undo_io.c \
+ $(srcdir)/@OS_IO_FILE@.c \
+ $(srcdir)/sparse_io.c \
+ $(srcdir)/unlink.c \
+ $(srcdir)/valid_blk.c \
+ $(srcdir)/version.c \
+ $(srcdir)/write_bb_file.c \
+ $(srcdir)/rbtree.c \
+ $(srcdir)/tst_libext2fs.c \
+ $(DEBUG_SRCS)
+
+HFILES= bitops.h ext2fs.h ext2_io.h ext2_fs.h ext2_ext_attr.h ext3_extents.h \
+ tdb.h qcow2.h hashmap.h
+HFILES_IN= ext2_err.h ext2_types.h
+
+LIBRARY= libext2fs
+LIBDIR= ext2fs
+
+ELF_VERSION = 2.4
+ELF_SO_VERSION = 2
+ELF_IMAGE = libext2fs
+ELF_MYDIR = ext2fs
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS = -lcom_err
+
+BSDLIB_VERSION = 2.1
+BSDLIB_IMAGE = libext2fs
+BSDLIB_MYDIR = ext2fs
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_ELF@
+@MAKEFILE_BSDLIB@
+@MAKEFILE_PROFILE@
+
+all:: ext2fs.pc
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
+@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+DISTFILES= Makefile *.c *.h image
+
+ext2_err.et: $(DEP_SUBSTITUTE) $(srcdir)/ext2_err.et.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE) $(srcdir)/ext2_err.et.in ext2_err.et
+
+ext2_err.c ext2_err.h: ext2_err.et
+ $(E) " COMPILE_ET ext2_err.et"
+ $(Q) $(COMPILE_ET) ext2_err.et
+
+ext2fs.pc: $(srcdir)/ext2fs.pc.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); CONFIG_FILES=lib/ext2fs/ext2fs.pc ./config.status
+
+tst_badblocks: tst_badblocks.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_badblocks tst_badblocks.o $(ALL_LDFLAGS) \
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_digest_encode: $(srcdir)/digest_encode.c $(srcdir)/ext2_fs.h
+ $(E) " CC $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) $(ALL_CFLAGS) -o tst_digest_encode \
+ $(srcdir)/digest_encode.c -DUNITTEST $(SYSLIBS)
+
+tst_icount: $(srcdir)/icount.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_icount $(srcdir)/icount.c -DDEBUG \
+ $(ALL_CFLAGS) $(ALL_LDFLAGS) \
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_iscan: tst_iscan.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_iscan tst_iscan.o $(ALL_LDFLAGS) \
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_getsize: tst_getsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_getsize tst_getsize.o $(ALL_LDFLAGS) \
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) \
+ $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_ismounted $(srcdir)/ismounted.c \
+ $(STATIC_LIBEXT2FS) -DDEBUG $(ALL_CFLAGS) $(ALL_LDFLAGS) \
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_byteswap: tst_byteswap.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_byteswap tst_byteswap.o $(ALL_LDFLAGS) \
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_bitops: tst_bitops.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_bitops tst_bitops.o $(ALL_CFLAGS) $(ALL_LDFLAGS) \
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_getsectsize: tst_getsectsize.o getsectsize.o $(STATIC_LIBEXT2FS) \
+ $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_getsectsize tst_getsectsize.o getsectsize.o \
+ $(ALL_LDFLAGS) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+ $(SYSLIBS)
+
+tst_types.o: $(srcdir)/tst_types.c ext2_types.h
+
+tst_types: tst_types.o ext2_types.h
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_types tst_types.o $(ALL_LDFLAGS) $(SYSLIBS)
+
+tst_super_size.o: $(srcdir)/tst_super_size.c $(srcdir)/ext2_fs.h
+
+tst_super_size: tst_super_size.o
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_super_size tst_super_size.o $(ALL_LDFLAGS) $(SYSLIBS)
+
+tst_fs_struct.o: $(srcdir)/tst_fs_struct.c $(srcdir)/ext2fs.h
+
+tst_fs_struct: tst_fs_struct.o
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_fs_struct tst_fs_struct.o $(ALL_LDFLAGS) $(SYSLIBS)
+
+tst_inode_size.o: $(srcdir)/tst_inode_size.c $(srcdir)/ext2_fs.h
+
+tst_inode_size: tst_inode_size.o
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_inode_size tst_inode_size.o $(ALL_LDFLAGS) $(SYSLIBS)
+
+tst_sha256: $(srcdir)/sha256.c $(srcdir)/ext2_fs.h
+ $(E) " CC $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) $(ALL_CFLAGS) -o tst_sha256 \
+ $(srcdir)/sha256.c -DUNITTEST $(SYSLIBS)
+
+tst_sha512: $(srcdir)/sha512.c $(srcdir)/ext2_fs.h
+ $(E) " CC $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) $(ALL_CFLAGS) -o tst_sha512 \
+ $(srcdir)/sha512.c -DUNITTEST $(SYSLIBS)
+
+ext2_tdbtool: tdbtool.o
+ $(E) " LD $@"
+ $(Q) $(CC) -o ext2_tdbtool tdbtool.o tdb.o $(ALL_LDFLAGS) $(SYSLIBS)
+
+tst_cmds.c tst_cmds.h: tst_cmds.ct
+ $(E) " MK_CMDS $@"
+ $(Q) $(MK_CMDS) $(srcdir)/tst_cmds.ct
+
+debug_cmds.c debug_cmds.h: $(top_srcdir)/debugfs/debug_cmds.ct
+ $(E) " MK_CMDS $<"
+ $(Q) $(MK_CMDS) $(top_srcdir)/debugfs/debug_cmds.ct
+
+extent_cmds.c extent_cmds.h: $(top_srcdir)/debugfs/extent_cmds.ct
+ $(E) " MK_CMDS $<"
+ $(Q) $(MK_CMDS) $(top_srcdir)/debugfs/extent_cmds.ct
+
+debugfs.o: $(top_srcdir)/debugfs/debugfs.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -DSKIP_GLOBDEFS -c $< -o $@
+
+extent_inode.o: $(top_srcdir)/debugfs/extent_inode.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+util.o: $(top_srcdir)/debugfs/util.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+ncheck.o: $(top_srcdir)/debugfs/ncheck.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+icheck.o: $(top_srcdir)/debugfs/icheck.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+ls.o: $(top_srcdir)/debugfs/ls.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+lsdel.o: $(top_srcdir)/debugfs/lsdel.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+dump.o: $(top_srcdir)/debugfs/dump.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+set_fields.o: $(top_srcdir)/debugfs/set_fields.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+logdump.o: $(top_srcdir)/debugfs/logdump.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+htree.o: $(top_srcdir)/debugfs/htree.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+unused.o: $(top_srcdir)/debugfs/unused.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+zap.o: $(top_srcdir)/debugfs/zap.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+quota.o: $(top_srcdir)/debugfs/quota.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+journal.o: $(top_srcdir)/debugfs/journal.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+revoke.o: $(top_srcdir)/e2fsck/revoke.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+recovery.o: $(top_srcdir)/e2fsck/recovery.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+do_journal.o: $(top_srcdir)/debugfs/do_journal.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+xattrs.o: $(top_srcdir)/debugfs/xattrs.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
+
+e2freefrag.o: $(top_srcdir)/misc/e2freefrag.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS) -DDEBUGFS -I$(top_srcdir)/debugfs -c $< -o $@
+
+create_inode.o: $(top_srcdir)/misc/create_inode.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS) -DDEBUGFS -c $< -o $@
+
+filefrag.o: $(top_srcdir)/debugfs/filefrag.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+tst_libext2fs.o: $(srcdir)/tst_libext2fs.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(DEPEND_CFLAGS) -c $< -o $@
+
+tst_bitmaps_cmd.c: tst_bitmaps_cmd.ct
+ $(E) " MK_CMDS $@"
+ $(Q) DIR=$(srcdir) $(MK_CMDS) $(srcdir)/tst_bitmaps_cmd.ct
+
+tst_bitmaps: tst_bitmaps.o tst_bitmaps_cmd.o $(srcdir)/blkmap64_rb.c \
+ $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBSS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o $@ tst_bitmaps.o tst_bitmaps_cmd.o \
+ -DDEBUG_RB $(srcdir)/blkmap64_rb.c $(ALL_CFLAGS) \
+ $(ALL_LDFLAGS) $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) \
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_extents: $(srcdir)/extent.c $(DEBUG_OBJS) $(DEPSTATIC_LIBSS) libext2fs.a \
+ $(STATIC_LIBE2P) $(DEPLIBUUID) $(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR) \
+ $(DEPLIBSUPPORT)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_extents $(srcdir)/extent.c \
+ $(ALL_CFLAGS) $(ALL_LDFLAGS) -DDEBUG $(DEBUG_OBJS) \
+ $(STATIC_LIBSS) $(STATIC_LIBE2P) $(LIBSUPPORT) \
+ $(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) \
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS) -I $(top_srcdir)/debugfs
+
+tst_libext2fs: $(DEBUG_OBJS) \
+ $(DEPSTATIC_LIBSS) $(STATIC_LIBE2P) $(DEPLIBUUID) libext2fs.a \
+ $(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR) $(DEPLIBSUPPORT)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_libext2fs $(ALL_LDFLAGS) -DDEBUG $(DEBUG_OBJS) \
+ $(STATIC_LIBSS) $(STATIC_LIBE2P) $(LIBSUPPORT) \
+ $(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) $(LIBMAGIC) \
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS) -I $(top_srcdir)/debugfs
+
+tst_inline: $(srcdir)/inline.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_inline $(srcdir)/inline.c $(ALL_CFLAGS) \
+ $(ALL_LDFLAGS) -DDEBUG $(STATIC_LIBEXT2FS) \
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_inline_data: inline_data.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_inline_data $(srcdir)/inline_data.c $(ALL_CFLAGS) \
+ $(ALL_LDFLAGS) -DDEBUG $(STATIC_LIBEXT2FS) \
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+
+tst_csum: csum.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(STATIC_LIBE2P) \
+ $(top_srcdir)/lib/e2p/e2p.h
+ $(E) " LD $@"
+ $(Q) $(CC) -o tst_csum $(srcdir)/csum.c -DDEBUG \
+ $(ALL_CFLAGS) $(ALL_LDFLAGS) $(STATIC_LIBEXT2FS) \
+ $(STATIC_LIBCOM_ERR) $(STATIC_LIBE2P) $(SYSLIBS)
+
+tst_crc32c: $(srcdir)/crc32c.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+ $(Q) $(CC) $(ALL_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32c $(srcdir)/crc32c.c \
+ -DUNITTEST $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+ $(SYSLIBS)
+
+mkjournal: mkjournal.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o mkjournal $(srcdir)/mkjournal.c -DDEBUG \
+ $(STATIC_LIBEXT2FS) $(LIBCOM_ERR) $(ALL_CFLAGS) $(SYSLIBS)
+
+fullcheck check:: tst_bitops tst_badblocks tst_iscan tst_types tst_icount \
+ tst_super_size tst_types tst_inode_size tst_csum tst_crc32c tst_bitmaps \
+ tst_inline tst_inline_data tst_libext2fs tst_sha256 tst_sha512 \
+ tst_digest_encode tst_getsize tst_getsectsize
+ $(TESTENV) ./tst_bitops
+ $(TESTENV) ./tst_badblocks
+ $(TESTENV) ./tst_iscan
+ $(TESTENV) ./tst_types
+ $(TESTENV) ./tst_icount
+ $(TESTENV) ./tst_super_size
+ $(TESTENV) ./tst_inode_size
+ $(TESTENV) ./tst_csum
+ $(TESTENV) ./tst_inline
+ $(TESTENV) ./tst_inline_data
+ $(TESTENV) ./tst_crc32c
+ $(TESTENV) ./tst_sha256
+ $(TESTENV) ./tst_sha512
+ $(TESTENV) ./tst_bitmaps -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+ diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+ $(TESTENV) ./tst_bitmaps -t 2 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+ diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+ $(TESTENV) ./tst_bitmaps -t 3 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+ diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+ $(TESTENV) ./tst_bitmaps -l -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+ diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+ $(TESTENV) ./tst_digest_encode
+
+installdirs::
+ $(E) " MKDIR_P $(libdir) $(includedir)/ext2fs"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/ext2fs $(DESTDIR)$(pkgconfigdir)
+
+install:: all $(HFILES) $(HFILES_IN) installdirs ext2fs.pc
+ $(E) " INSTALL_DATA $(libdir)/libext2fs.a"
+ $(Q) $(INSTALL_DATA) libext2fs.a $(DESTDIR)$(libdir)/libext2fs.a
+ -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libext2fs.a
+ $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libext2fs.a
+ $(Q) for i in $(HFILES); do \
+ echo " INSTALL_DATA $(includedir)/ext2fs/$$i"; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ext2fs/$$i; \
+ done
+ $(Q) for i in $(HFILES_IN); do \
+ echo " INSTALL_DATA $(includedir)/ext2fs/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir)/ext2fs/$$i; \
+ done
+ $(E) " INSTALL_DATA $(pkgconfigdir)/ext2fs.pc"
+ $(Q) $(INSTALL_DATA) ext2fs.pc $(DESTDIR)$(pkgconfigdir)/ext2fs.pc
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libext2fs.a \
+ $(DESTDIR)$(pkgconfigdir)/ext2fs.pc
+ $(RM) -rf $(DESTDIR)$(includedir)/ext2fs
+
+clean::
+ $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* \
+ tst_badblocks tst_iscan ext2_err.et ext2_err.c ext2_err.h \
+ tst_byteswap tst_ismounted tst_getsize tst_getsectsize \
+ tst_bitops tst_types tst_icount tst_super_size tst_csum \
+ tst_bitmaps tst_bitmaps_out tst_extents tst_inline \
+ tst_inline_data tst_inode_size tst_bitmaps_cmd.c \
+ tst_digest_encode tst_sha256 tst_sha512 \
+ ext2_tdbtool mkjournal debug_cmds.c tst_cmds.c extent_cmds.c \
+ ../libext2fs.a ../libext2fs_p.a ../libext2fs_chk.a \
+ crc32c_table.h gen_crc32ctable tst_crc32c tst_libext2fs \
+ ext2fs.pc ext2_types.h
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend ext2_err.c ext2_err.h Makefile ext2fs.pc \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+$(top_builddir)/lib/ext2fs/ext2_err.h: ext2_err.h
+
+$(OBJS): subdirs
+
+gen_crc32ctable: $(srcdir)/gen_crc32ctable.c
+ $(E) " CC $@"
+ $(Q) $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o gen_crc32ctable \
+ $(srcdir)/gen_crc32ctable.c
+
+crc32c_table.h: gen_crc32ctable
+ $(E) " GEN32CTABLE $@"
+ $(Q) ./gen_crc32ctable > crc32c_table.h
+
+$(top_builddir)/$(my_dir)/ext2_types.h: $(srcdir)/ext2_types.h.in \
+ $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=$(my_dir)/ext2_types.h ./config.status
+
+$(srcdir)/utf8data.h:
+ $(Q) $(MAKE) $(MKUTF8DATA)
+ $(E) "MKUTF8DATA $@"
+ $(Q) $(MKUTF8DATA) -a $(top_srcdir)/util/ucd/DerivedAge-11.0.0.txt \
+ -c $(top_srcdir)/util/ucd/DerivedCombiningClass-11.0.0.txt \
+ -p $(top_srcdir)/util/ucd/DerivedCoreProperties-11.0.0.txt \
+ -d $(top_srcdir)/util/ucd/UnicodeData-11.0.0.txt \
+ -f $(top_srcdir)/util/ucd/CaseFolding-11.0.0.txt \
+ -n $(top_srcdir)/util/ucd/NormalizationCorrections-11.0.0.txt \
+ -t $(top_srcdir)/util/ucd/NormalizationTest-11.0.0.txt \
+ -o $@
+
+#
+# This needs to be manually maintained since "make depend" on a
+# Linux system is going to blow up due to the lack of windows.h
+# header file. If someone on Windows tries to run "make depend",
+# they will need to comment this chunk below.
+#
+windows_io.o: $(srcdir)/windows_io.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/bitops.h $(srcdir)/ext2fsP.h
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+ext2_err.o: ext2_err.c
+alloc.o: $(srcdir)/alloc.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+alloc_sb.o: $(srcdir)/alloc_sb.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+alloc_stats.o: $(srcdir)/alloc_stats.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+alloc_tables.o: $(srcdir)/alloc_tables.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+atexit.o: $(srcdir)/atexit.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+badblocks.o: $(srcdir)/badblocks.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+bb_compat.o: $(srcdir)/bb_compat.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+bb_inode.o: $(srcdir)/bb_inode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+bitmaps.o: $(srcdir)/bitmaps.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h $(srcdir)/bmap64.h
+bitops.o: $(srcdir)/bitops.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+blkmap64_ba.o: $(srcdir)/blkmap64_ba.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/bmap64.h
+blkmap64_rb.o: $(srcdir)/blkmap64_rb.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/bmap64.h $(srcdir)/rbtree.h \
+ $(srcdir)/compiler.h
+block.o: $(srcdir)/block.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+bmap.o: $(srcdir)/bmap.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+check_desc.o: $(srcdir)/check_desc.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+closefs.o: $(srcdir)/closefs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+crc16.o: $(srcdir)/crc16.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/crc16.h
+crc32c.o: $(srcdir)/crc32c.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/crc32c_defs.h $(srcdir)/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h crc32c_table.h
+gen_crc32ctable.o: $(srcdir)/gen_crc32ctable.c $(srcdir)/crc32c_defs.h
+csum.o: $(srcdir)/csum.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/crc16.h
+dblist.o: $(srcdir)/dblist.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+dblist_dir.o: $(srcdir)/dblist_dir.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+digest_encode.o: $(srcdir)/digest_encode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+dirblock.o: $(srcdir)/dirblock.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+dirhash.o: $(srcdir)/dirhash.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+dir_iterate.o: $(srcdir)/dir_iterate.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+dupfs.o: $(srcdir)/dupfs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+expanddir.o: $(srcdir)/expanddir.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+ext_attr.o: $(srcdir)/ext_attr.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/ext4_acl.h $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+extent.o: $(srcdir)/extent.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/e2image.h
+fileio.o: $(srcdir)/fileio.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+finddev.o: $(srcdir)/finddev.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+flushb.o: $(srcdir)/flushb.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+freefs.o: $(srcdir)/freefs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+gen_bitmap.o: $(srcdir)/gen_bitmap.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+gen_bitmap64.o: $(srcdir)/gen_bitmap64.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/bmap64.h
+get_num_dirs.o: $(srcdir)/get_num_dirs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+get_pathname.o: $(srcdir)/get_pathname.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+getsize.o: $(srcdir)/getsize.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+getsectsize.o: $(srcdir)/getsectsize.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+hashmap.o: $(srcdir)/hashmap.c $(srcdir)/hashmap.h
+i_block.o: $(srcdir)/i_block.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+icount.o: $(srcdir)/icount.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/tdb.h
+ind_block.o: $(srcdir)/ind_block.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+initialize.o: $(srcdir)/initialize.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+inline.o: $(srcdir)/inline.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+inline_data.o: $(srcdir)/inline_data.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/ext2fsP.h
+inode.o: $(srcdir)/inode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/e2image.h
+inode_io.o: $(srcdir)/inode_io.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+imager.o: $(srcdir)/imager.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+io_manager.o: $(srcdir)/io_manager.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+ismounted.o: $(srcdir)/ismounted.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+link.o: $(srcdir)/link.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+llseek.o: $(srcdir)/llseek.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_types.h
+lookup.o: $(srcdir)/lookup.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+mkdir.o: $(srcdir)/mkdir.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+mkjournal.o: $(srcdir)/mkjournal.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext2fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/kernel-jbd.h \
+ $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.h $(srcdir)/compiler.h
+mmp.o: $(srcdir)/mmp.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+namei.o: $(srcdir)/namei.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+native.o: $(srcdir)/native.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+newdir.o: $(srcdir)/newdir.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+nls_utf8.o: $(srcdir)/nls_utf8.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h $(srcdir)/utf8data.h
+openfs.o: $(srcdir)/openfs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/e2image.h
+progress.o: $(srcdir)/progress.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/ext2fsP.h
+punch.o: $(srcdir)/punch.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+qcow2.o: $(srcdir)/qcow2.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/qcow2.h
+read_bb.o: $(srcdir)/read_bb.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+read_bb_file.o: $(srcdir)/read_bb_file.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+res_gdt.o: $(srcdir)/res_gdt.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+rw_bitmaps.o: $(srcdir)/rw_bitmaps.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/e2image.h
+sha256.o: $(srcdir)/sha256.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+sha512.o: $(srcdir)/sha512.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h
+swapfs.o: $(srcdir)/swapfs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+symlink.o: $(srcdir)/symlink.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+tdb.o: $(srcdir)/tdb.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/tdb.h
+test_io.o: $(srcdir)/test_io.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+tst_badblocks.o: $(srcdir)/tst_badblocks.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+tst_bitops.o: $(srcdir)/tst_bitops.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+tst_byteswap.o: $(srcdir)/tst_byteswap.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+tst_getsize.o: $(srcdir)/tst_getsize.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+tst_iscan.o: $(srcdir)/tst_iscan.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+undo_io.o: $(srcdir)/undo_io.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+unix_io.o: $(srcdir)/unix_io.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/ext2fsP.h
+sparse_io.o: $(srcdir)/sparse_io.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+unlink.o: $(srcdir)/unlink.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+valid_blk.o: $(srcdir)/valid_blk.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+version.o: $(srcdir)/version.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/version.h
+write_bb_file.o: $(srcdir)/write_bb_file.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h
+rbtree.o: $(srcdir)/rbtree.c $(srcdir)/rbtree.h $(srcdir)/compiler.h
+tst_libext2fs.o: $(srcdir)/tst_libext2fs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/debugfs/debugfs.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/debugfs/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+extent_cmds.o: extent_cmds.c $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+tst_cmds.o: tst_cmds.c $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+debugfs.o: $(top_srcdir)/debugfs/debugfs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(top_srcdir)/debugfs/../version.h \
+ $(srcdir)/../../e2fsck/jfs_user.h $(srcdir)/kernel-jbd.h \
+ $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.h $(srcdir)/compiler.h \
+ $(top_srcdir)/lib/support/plausible.h
+util.o: $(top_srcdir)/debugfs/util.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/debugfs/debugfs.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+ncheck.o: $(top_srcdir)/debugfs/ncheck.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+icheck.o: $(top_srcdir)/debugfs/icheck.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+ls.o: $(top_srcdir)/debugfs/ls.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+lsdel.o: $(top_srcdir)/debugfs/lsdel.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+dump.o: $(top_srcdir)/debugfs/dump.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+set_fields.o: $(top_srcdir)/debugfs/set_fields.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+logdump.o: $(top_srcdir)/debugfs/logdump.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(srcdir)/../../e2fsck/jfs_user.h \
+ $(srcdir)/kernel-jbd.h $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.h \
+ $(srcdir)/compiler.h $(srcdir)/fast_commit.h
+htree.o: $(top_srcdir)/debugfs/htree.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+unused.o: $(top_srcdir)/debugfs/unused.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+filefrag.o: $(top_srcdir)/debugfs/filefrag.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+extent_inode.o: $(top_srcdir)/debugfs/extent_inode.c \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(top_srcdir)/debugfs/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+zap.o: $(top_srcdir)/debugfs/zap.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+quota.o: $(top_srcdir)/debugfs/quota.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+xattrs.o: $(top_srcdir)/debugfs/xattrs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/support/cstring.h \
+ $(top_srcdir)/debugfs/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+e2freefrag.o: $(top_srcdir)/misc/e2freefrag.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(top_srcdir)/misc/e2freefrag.h \
+ $(top_srcdir)/debugfs/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/debugfs/../misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h
+create_inode.o: $(top_srcdir)/misc/create_inode.c \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(srcdir)/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/fiemap.h $(top_srcdir)/misc/create_inode.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/nls-enable.h
+journal.o: $(top_srcdir)/debugfs/journal.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/journal.h \
+ $(srcdir)/../../e2fsck/jfs_user.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/kernel-jbd.h \
+ $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.h $(srcdir)/compiler.h
+revoke.o: $(top_srcdir)/e2fsck/revoke.c $(top_srcdir)/e2fsck/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/kernel-jbd.h $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.h \
+ $(srcdir)/compiler.h
+recovery.o: $(top_srcdir)/e2fsck/recovery.c $(top_srcdir)/e2fsck/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(srcdir)/kernel-jbd.h $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.h \
+ $(srcdir)/compiler.h
+do_journal.o: $(top_srcdir)/debugfs/do_journal.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/hashmap.h $(srcdir)/bitops.h \
+ $(top_srcdir)/debugfs/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(srcdir)/kernel-jbd.h \
+ $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.h $(srcdir)/compiler.h \
+ $(top_srcdir)/debugfs/journal.h $(srcdir)/../../e2fsck/jfs_user.h
diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c
new file mode 100644
index 0000000..3fd9216
--- /dev/null
+++ b/lib/ext2fs/alloc.c
@@ -0,0 +1,554 @@
+/*
+ * alloc.c --- allocate new inodes, blocks for ext2fs
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <time.h>
+#include <string.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#define min(a, b) ((a) < (b) ? (a) : (b))
+
+#undef DEBUG
+
+#ifdef DEBUG
+# define dbg_printf(f, a...) do {printf(f, ## a); fflush(stdout); } while (0)
+#else
+# define dbg_printf(f, a...)
+#endif
+
+/*
+ * Clear the uninit block bitmap flag if necessary
+ */
+void ext2fs_clear_block_uninit(ext2_filsys fs, dgrp_t group)
+{
+ if (group >= fs->group_desc_count ||
+ !ext2fs_has_group_desc_csum(fs) ||
+ !(ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT)))
+ return;
+
+ /* uninit block bitmaps are now initialized in read_bitmaps() */
+
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_group_desc_csum_set(fs, group);
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+}
+
+/*
+ * Check for uninit inode bitmaps and deal with them appropriately
+ */
+static void check_inode_uninit(ext2_filsys fs, ext2fs_inode_bitmap map,
+ dgrp_t group)
+{
+ ext2_ino_t i, ino;
+
+ if (group >= fs->group_desc_count ||
+ !ext2fs_has_group_desc_csum(fs) ||
+ !(ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)))
+ return;
+
+ ino = (group * fs->super->s_inodes_per_group) + 1;
+ for (i=0; i < fs->super->s_inodes_per_group; i++, ino++)
+ ext2fs_fast_unmark_inode_bitmap2(map, ino);
+
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT);
+ /* Mimics what the kernel does */
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_group_desc_csum_set(fs, group);
+ ext2fs_mark_ib_dirty(fs);
+ ext2fs_mark_super_dirty(fs);
+}
+
+/*
+ * Right now, just search forward from the parent directory's block
+ * group to find the next free inode.
+ *
+ * Should have a special policy for directories.
+ */
+errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir,
+ int mode EXT2FS_ATTR((unused)),
+ ext2fs_inode_bitmap map, ext2_ino_t *ret)
+{
+ ext2_ino_t start_inode = 0;
+ ext2_ino_t i, ino_in_group, upto, first_zero;
+ errcode_t retval;
+ dgrp_t group;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!map)
+ map = fs->inode_map;
+ if (!map)
+ return EXT2_ET_NO_INODE_BITMAP;
+
+ if (dir > 0) {
+ group = (dir - 1) / EXT2_INODES_PER_GROUP(fs->super);
+ start_inode = (group * EXT2_INODES_PER_GROUP(fs->super)) + 1;
+ }
+ if (start_inode < EXT2_FIRST_INODE(fs->super))
+ start_inode = EXT2_FIRST_INODE(fs->super);
+ if (start_inode > fs->super->s_inodes_count)
+ return EXT2_ET_INODE_ALLOC_FAIL;
+ i = start_inode;
+ do {
+ ino_in_group = (i - 1) % EXT2_INODES_PER_GROUP(fs->super);
+ group = (i - 1) / EXT2_INODES_PER_GROUP(fs->super);
+
+ check_inode_uninit(fs, map, group);
+ upto = i + (EXT2_INODES_PER_GROUP(fs->super) - ino_in_group);
+ if (i < start_inode && upto >= start_inode)
+ upto = start_inode - 1;
+ if (upto > fs->super->s_inodes_count)
+ upto = fs->super->s_inodes_count;
+
+ retval = ext2fs_find_first_zero_inode_bitmap2(map, i, upto,
+ &first_zero);
+ if (retval == 0) {
+ i = first_zero;
+ break;
+ }
+ if (retval != ENOENT)
+ return EXT2_ET_INODE_ALLOC_FAIL;
+ i = upto + 1;
+ if (i > fs->super->s_inodes_count)
+ i = EXT2_FIRST_INODE(fs->super);
+ } while (i != start_inode);
+
+ if (ext2fs_test_inode_bitmap2(map, i))
+ return EXT2_ET_INODE_ALLOC_FAIL;
+ *ret = i;
+ return 0;
+}
+
+/*
+ * Stupid algorithm --- we now just search forward starting from the
+ * goal. Should put in a smarter one someday....
+ */
+errcode_t ext2fs_new_block3(ext2_filsys fs, blk64_t goal,
+ ext2fs_block_bitmap map, blk64_t *ret,
+ struct blk_alloc_ctx *ctx)
+{
+ errcode_t retval;
+ blk64_t b = 0;
+ errcode_t (*gab)(ext2_filsys fs, blk64_t goal, blk64_t *ret);
+ errcode_t (*gab2)(ext2_filsys, blk64_t, blk64_t *,
+ struct blk_alloc_ctx *);
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!map) {
+ /*
+ * In case there are clients out there whose get_alloc_block
+ * handlers call ext2fs_new_block2 with a NULL block map,
+ * temporarily swap out the function pointer so that we don't
+ * end up in an infinite loop.
+ */
+ if (fs->get_alloc_block2) {
+ gab2 = fs->get_alloc_block2;
+ fs->get_alloc_block2 = NULL;
+ retval = gab2(fs, goal, &b, ctx);
+ fs->get_alloc_block2 = gab2;
+ goto allocated;
+ } else if (fs->get_alloc_block) {
+ gab = fs->get_alloc_block;
+ fs->get_alloc_block = NULL;
+ retval = gab(fs, goal, &b);
+ fs->get_alloc_block = gab;
+ goto allocated;
+ }
+ }
+ if (!map)
+ map = fs->block_map;
+ if (!map)
+ return EXT2_ET_NO_BLOCK_BITMAP;
+ if (!goal || (goal >= ext2fs_blocks_count(fs->super)))
+ goal = fs->super->s_first_data_block;
+ goal &= ~EXT2FS_CLUSTER_MASK(fs);
+
+ retval = ext2fs_find_first_zero_block_bitmap2(map,
+ goal, ext2fs_blocks_count(fs->super) - 1, &b);
+ if ((retval == ENOENT) && (goal != fs->super->s_first_data_block))
+ retval = ext2fs_find_first_zero_block_bitmap2(map,
+ fs->super->s_first_data_block, goal - 1, &b);
+allocated:
+ if (retval == ENOENT)
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+ if (retval)
+ return retval;
+
+ ext2fs_clear_block_uninit(fs, ext2fs_group_of_blk2(fs, b));
+ *ret = b;
+ return 0;
+}
+
+errcode_t ext2fs_new_block2(ext2_filsys fs, blk64_t goal,
+ ext2fs_block_bitmap map, blk64_t *ret)
+{
+ return ext2fs_new_block3(fs, goal, map, ret, NULL);
+}
+
+errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal,
+ ext2fs_block_bitmap map, blk_t *ret)
+{
+ errcode_t retval;
+ blk64_t val;
+ retval = ext2fs_new_block2(fs, goal, map, &val);
+ if (!retval)
+ *ret = (blk_t) val;
+ return retval;
+}
+
+/*
+ * This function zeros out the allocated block, and updates all of the
+ * appropriate filesystem records.
+ */
+errcode_t ext2fs_alloc_block3(ext2_filsys fs, blk64_t goal, char *block_buf,
+ blk64_t *ret, struct blk_alloc_ctx *ctx)
+{
+ errcode_t retval;
+ blk64_t block;
+
+ if (fs->get_alloc_block2) {
+ retval = (fs->get_alloc_block2)(fs, goal, &block, ctx);
+ if (retval)
+ goto fail;
+ } else if (fs->get_alloc_block) {
+ retval = (fs->get_alloc_block)(fs, goal, &block);
+ if (retval)
+ goto fail;
+ } else {
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ goto fail;
+ }
+
+ retval = ext2fs_new_block3(fs, goal, 0, &block, ctx);
+ if (retval)
+ goto fail;
+ }
+
+ if (block_buf) {
+ memset(block_buf, 0, fs->blocksize);
+ retval = io_channel_write_blk64(fs->io, block, 1, block_buf);
+ } else
+ retval = ext2fs_zero_blocks2(fs, block, 1, NULL, NULL);
+ if (retval)
+ goto fail;
+
+ ext2fs_block_alloc_stats2(fs, block, +1);
+ *ret = block;
+
+fail:
+ return retval;
+}
+
+errcode_t ext2fs_alloc_block2(ext2_filsys fs, blk64_t goal,
+ char *block_buf, blk64_t *ret)
+{
+ return ext2fs_alloc_block3(fs, goal, block_buf, ret, NULL);
+}
+
+errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal,
+ char *block_buf, blk_t *ret)
+{
+ errcode_t retval;
+ blk64_t ret64, goal64 = goal;
+ retval = ext2fs_alloc_block3(fs, goal64, block_buf, &ret64, NULL);
+ if (!retval)
+ *ret = (blk_t)ret64;
+ return retval;
+}
+
+errcode_t ext2fs_get_free_blocks2(ext2_filsys fs, blk64_t start, blk64_t finish,
+ int num, ext2fs_block_bitmap map, blk64_t *ret)
+{
+ blk64_t b = start;
+ int c_ratio;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!map)
+ map = fs->block_map;
+ if (!map)
+ return EXT2_ET_NO_BLOCK_BITMAP;
+ if (!b)
+ b = fs->super->s_first_data_block;
+ if (!finish)
+ finish = start;
+ if (!num)
+ num = 1;
+ c_ratio = 1 << ext2fs_get_bitmap_granularity(map);
+ b &= ~(c_ratio - 1);
+ finish &= ~(c_ratio -1);
+ do {
+ if (b + num - 1 >= ext2fs_blocks_count(fs->super)) {
+ if (finish > start)
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+ b = fs->super->s_first_data_block;
+ }
+ if (ext2fs_fast_test_block_bitmap_range2(map, b, num)) {
+ *ret = b;
+ return 0;
+ }
+ b += c_ratio;
+ } while (b != finish);
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+}
+
+errcode_t ext2fs_get_free_blocks(ext2_filsys fs, blk_t start, blk_t finish,
+ int num, ext2fs_block_bitmap map, blk_t *ret)
+{
+ errcode_t retval;
+ blk64_t val;
+ retval = ext2fs_get_free_blocks2(fs, start, finish, num, map, &val);
+ if(!retval)
+ *ret = (blk_t) val;
+ return retval;
+}
+
+void ext2fs_set_alloc_block_callback(ext2_filsys fs,
+ errcode_t (*func)(ext2_filsys fs,
+ blk64_t goal,
+ blk64_t *ret),
+ errcode_t (**old)(ext2_filsys fs,
+ blk64_t goal,
+ blk64_t *ret))
+{
+ if (!fs || fs->magic != EXT2_ET_MAGIC_EXT2FS_FILSYS)
+ return;
+
+ if (old)
+ *old = fs->get_alloc_block;
+
+ fs->get_alloc_block = func;
+}
+
+blk64_t ext2fs_find_inode_goal(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t lblk)
+{
+ dgrp_t group;
+ __u8 log_flex;
+ struct ext2fs_extent extent;
+ ext2_extent_handle_t handle = NULL;
+ errcode_t err;
+
+ /* Make sure data stored in inode->i_block is neither fast symlink nor
+ * inline data.
+ */
+ if (inode == NULL || ext2fs_is_fast_symlink(inode) ||
+ inode->i_flags & EXT4_INLINE_DATA_FL)
+ goto no_blocks;
+
+ if (inode->i_flags & EXT4_EXTENTS_FL) {
+ err = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (err)
+ goto no_blocks;
+ err = ext2fs_extent_goto2(handle, 0, lblk);
+ if (err)
+ goto no_blocks;
+ err = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
+ if (err)
+ goto no_blocks;
+ ext2fs_extent_free(handle);
+ return extent.e_pblk + (lblk - extent.e_lblk);
+ }
+
+ /* block mapped file; see if block zero is mapped? */
+ if (inode->i_block[0])
+ return inode->i_block[0];
+
+no_blocks:
+ ext2fs_extent_free(handle);
+ log_flex = fs->super->s_log_groups_per_flex;
+ group = ext2fs_group_of_ino(fs, ino);
+ if (log_flex)
+ group = group & ~((1 << (log_flex)) - 1);
+ return ext2fs_group_first_block2(fs, group);
+}
+
+/*
+ * Starting at _goal_, scan around the filesystem to find a run of free blocks
+ * that's at least _len_ blocks long. Possible flags:
+ * - EXT2_NEWRANGE_EXACT_GOAL: The range of blocks must start at _goal_.
+ * - EXT2_NEWRANGE_MIN_LENGTH: do not return a allocation shorter than _len_.
+ * - EXT2_NEWRANGE_ZERO_BLOCKS: Zero blocks pblk to pblk+plen before returning.
+ *
+ * The starting block is returned in _pblk_ and the length is returned via
+ * _plen_. The blocks are not marked in the bitmap; the caller must mark
+ * however much of the returned run they actually use, hopefully via
+ * ext2fs_block_alloc_stats_range().
+ *
+ * This function can return a range that is longer than what was requested.
+ */
+errcode_t ext2fs_new_range(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, ext2fs_block_bitmap map, blk64_t *pblk,
+ blk64_t *plen)
+{
+ errcode_t retval;
+ blk64_t start, end, b;
+ int looped = 0;
+ blk64_t max_blocks = ext2fs_blocks_count(fs->super);
+ errcode_t (*nrf)(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, blk64_t *pblk, blk64_t *plen);
+
+ dbg_printf("%s: flags=0x%x goal=%llu len=%llu\n", __func__, flags,
+ goal, len);
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+ if (len == 0 || (flags & ~EXT2_NEWRANGE_ALL_FLAGS))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (!map && fs->new_range) {
+ /*
+ * In case there are clients out there whose new_range
+ * handlers call ext2fs_new_range with a NULL block map,
+ * temporarily swap out the function pointer so that we don't
+ * end up in an infinite loop.
+ */
+ nrf = fs->new_range;
+ fs->new_range = NULL;
+ retval = nrf(fs, flags, goal, len, pblk, plen);
+ fs->new_range = nrf;
+ if (retval)
+ return retval;
+ start = *pblk;
+ end = *pblk + *plen;
+ goto allocated;
+ }
+ if (!map)
+ map = fs->block_map;
+ if (!map)
+ return EXT2_ET_NO_BLOCK_BITMAP;
+ if (!goal || goal >= ext2fs_blocks_count(fs->super))
+ goal = fs->super->s_first_data_block;
+
+ start = goal;
+ while (!looped || start <= goal) {
+ retval = ext2fs_find_first_zero_block_bitmap2(map, start,
+ max_blocks - 1,
+ &start);
+ if (retval == ENOENT) {
+ /*
+ * If there are no free blocks beyond the starting
+ * point, try scanning the whole filesystem, unless the
+ * user told us only to allocate from _goal_, or if
+ * we're already scanning the whole filesystem.
+ */
+ if (flags & EXT2_NEWRANGE_FIXED_GOAL ||
+ start == fs->super->s_first_data_block)
+ goto fail;
+ start = fs->super->s_first_data_block;
+ continue;
+ } else if (retval)
+ goto errout;
+
+ if (flags & EXT2_NEWRANGE_FIXED_GOAL && start != goal)
+ goto fail;
+
+ b = min(start + len - 1, max_blocks - 1);
+ retval = ext2fs_find_first_set_block_bitmap2(map, start, b,
+ &end);
+ if (retval == ENOENT)
+ end = b + 1;
+ else if (retval)
+ goto errout;
+
+ if (!(flags & EXT2_NEWRANGE_MIN_LENGTH) ||
+ (end - start) >= len) {
+ /* Success! */
+ *pblk = start;
+ *plen = end - start;
+ dbg_printf("%s: new_range goal=%llu--%llu "
+ "blk=%llu--%llu %llu\n",
+ __func__, goal, goal + len - 1,
+ *pblk, *pblk + *plen - 1, *plen);
+allocated:
+ for (b = start; b < end;
+ b += fs->super->s_blocks_per_group)
+ ext2fs_clear_block_uninit(fs,
+ ext2fs_group_of_blk2(fs, b));
+ return 0;
+ }
+
+ if (flags & EXT2_NEWRANGE_FIXED_GOAL)
+ goto fail;
+ start = end;
+ if (start >= max_blocks) {
+ if (looped)
+ goto fail;
+ looped = 1;
+ start = fs->super->s_first_data_block;
+ }
+ }
+
+fail:
+ retval = EXT2_ET_BLOCK_ALLOC_FAIL;
+errout:
+ return retval;
+}
+
+void ext2fs_set_new_range_callback(ext2_filsys fs,
+ errcode_t (*func)(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, blk64_t *pblk, blk64_t *plen),
+ errcode_t (**old)(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, blk64_t *pblk, blk64_t *plen))
+{
+ if (!fs || fs->magic != EXT2_ET_MAGIC_EXT2FS_FILSYS)
+ return;
+
+ if (old)
+ *old = fs->new_range;
+
+ fs->new_range = func;
+}
+
+errcode_t ext2fs_alloc_range(ext2_filsys fs, int flags, blk64_t goal,
+ blk_t len, blk64_t *ret)
+{
+ int newr_flags = EXT2_NEWRANGE_MIN_LENGTH;
+ errcode_t retval;
+ blk64_t plen;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+ if (len == 0 || (flags & ~EXT2_ALLOCRANGE_ALL_FLAGS))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (flags & EXT2_ALLOCRANGE_FIXED_GOAL)
+ newr_flags |= EXT2_NEWRANGE_FIXED_GOAL;
+
+ retval = ext2fs_new_range(fs, newr_flags, goal, len, NULL, ret, &plen);
+ if (retval)
+ return retval;
+
+ if (plen < len)
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+
+ if (flags & EXT2_ALLOCRANGE_ZERO_BLOCKS) {
+ retval = ext2fs_zero_blocks2(fs, *ret, len, NULL, NULL);
+ if (retval)
+ return retval;
+ }
+
+ ext2fs_block_alloc_stats_range(fs, *ret, len, +1);
+ return retval;
+}
diff --git a/lib/ext2fs/alloc_sb.c b/lib/ext2fs/alloc_sb.c
new file mode 100644
index 0000000..8530b40
--- /dev/null
+++ b/lib/ext2fs/alloc_sb.c
@@ -0,0 +1,81 @@
+/*
+ * alloc_sb.c --- Allocate the superblock and block group descriptors for a
+ * newly initialized filesystem. Used by mke2fs when initializing a filesystem
+ *
+ * Copyright (C) 1994, 1995, 1996, 2003 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * This function reserves the superblock and block group descriptors
+ * for a given block group. It currently returns the number of free
+ * blocks assuming that inode table and allocation bitmaps will be in
+ * the group. This is not necessarily the case when the flex_bg
+ * feature is enabled, so callers should take care! It was only
+ * really intended for use by mke2fs, and even there it's not that
+ * useful. In the future, when we redo this function for 64-bit block
+ * numbers, we should probably return the number of blocks used by the
+ * super block and group descriptors instead.
+ *
+ * See also the comment for ext2fs_super_and_bgd_loc()
+ */
+int ext2fs_reserve_super_and_bgd(ext2_filsys fs,
+ dgrp_t group,
+ ext2fs_block_bitmap bmap)
+{
+ blk64_t super_blk, old_desc_blk, new_desc_blk;
+ blk_t used_blks;
+ int old_desc_blocks, num_blocks;
+
+ ext2fs_super_and_bgd_loc2(fs, group, &super_blk,
+ &old_desc_blk, &new_desc_blk, &used_blks);
+
+ if (ext2fs_has_feature_meta_bg(fs->super))
+ old_desc_blocks = fs->super->s_first_meta_bg;
+ else
+ old_desc_blocks =
+ fs->desc_blocks + fs->super->s_reserved_gdt_blocks;
+
+ if (super_blk || (group == 0))
+ ext2fs_mark_block_bitmap2(bmap, super_blk);
+ if ((group == 0) && (fs->blocksize == 1024) &&
+ EXT2FS_CLUSTER_RATIO(fs) > 1)
+ ext2fs_mark_block_bitmap2(bmap, 0);
+
+ if (old_desc_blk) {
+ num_blocks = old_desc_blocks;
+ if (old_desc_blk + num_blocks >= ext2fs_blocks_count(fs->super))
+ num_blocks = ext2fs_blocks_count(fs->super) -
+ old_desc_blk;
+ ext2fs_mark_block_bitmap_range2(bmap, old_desc_blk, num_blocks);
+ }
+ if (new_desc_blk)
+ ext2fs_mark_block_bitmap2(bmap, new_desc_blk);
+
+ num_blocks = ext2fs_group_blocks_count(fs, group);
+ num_blocks -= 2 + fs->inode_blocks_per_group + used_blks;
+
+ return num_blocks ;
+}
diff --git a/lib/ext2fs/alloc_stats.c b/lib/ext2fs/alloc_stats.c
new file mode 100644
index 0000000..6f98bcc
--- /dev/null
+++ b/lib/ext2fs/alloc_stats.c
@@ -0,0 +1,165 @@
+/*
+ * alloc_stats.c --- Update allocation statistics for ext2fs
+ *
+ * Copyright (C) 2001 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+void ext2fs_inode_alloc_stats2(ext2_filsys fs, ext2_ino_t ino,
+ int inuse, int isdir)
+{
+ int group = ext2fs_group_of_ino(fs, ino);
+
+ if (ino > fs->super->s_inodes_count) {
+#ifndef OMIT_COM_ERR
+ com_err("ext2fs_inode_alloc_stats2", 0,
+ "Illegal inode number: %lu", (unsigned long) ino);
+#endif
+ return;
+ }
+ if (inuse > 0)
+ ext2fs_mark_inode_bitmap2(fs->inode_map, ino);
+ else
+ ext2fs_unmark_inode_bitmap2(fs->inode_map, ino);
+ ext2fs_bg_free_inodes_count_set(fs, group, ext2fs_bg_free_inodes_count(fs, group) - inuse);
+ if (isdir)
+ ext2fs_bg_used_dirs_count_set(fs, group, ext2fs_bg_used_dirs_count(fs, group) + inuse);
+
+ /* We don't strictly need to be clearing the uninit flag if inuse < 0
+ * (i.e. freeing inodes) but it also means something is bad. */
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT);
+ if (ext2fs_has_group_desc_csum(fs)) {
+ ext2_ino_t first_unused_inode = fs->super->s_inodes_per_group -
+ ext2fs_bg_itable_unused(fs, group) +
+ group * fs->super->s_inodes_per_group + 1;
+
+ if (ino >= first_unused_inode)
+ ext2fs_bg_itable_unused_set(fs, group, group * fs->super->s_inodes_per_group + fs->super->s_inodes_per_group - ino);
+ ext2fs_group_desc_csum_set(fs, group);
+ }
+
+ fs->super->s_free_inodes_count -= inuse;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_ib_dirty(fs);
+}
+
+void ext2fs_inode_alloc_stats(ext2_filsys fs, ext2_ino_t ino, int inuse)
+{
+ ext2fs_inode_alloc_stats2(fs, ino, inuse, 0);
+}
+
+void ext2fs_block_alloc_stats2(ext2_filsys fs, blk64_t blk, int inuse)
+{
+ int group = ext2fs_group_of_blk2(fs, blk);
+
+ if (blk < fs->super->s_first_data_block ||
+ blk >= ext2fs_blocks_count(fs->super)) {
+#ifndef OMIT_COM_ERR
+ com_err("ext2fs_block_alloc_stats", 0,
+ "Illegal block number: %lu", (unsigned long) blk);
+#endif
+ return;
+ }
+ if (inuse > 0)
+ ext2fs_mark_block_bitmap2(fs->block_map, blk);
+ else
+ ext2fs_unmark_block_bitmap2(fs->block_map, blk);
+ ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group) - inuse);
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_group_desc_csum_set(fs, group);
+
+ ext2fs_free_blocks_count_add(fs->super,
+ -inuse * (blk64_t) EXT2FS_CLUSTER_RATIO(fs));
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ if (fs->block_alloc_stats)
+ (fs->block_alloc_stats)(fs, (blk64_t) blk, inuse);
+}
+
+void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse)
+{
+ ext2fs_block_alloc_stats2(fs, blk, inuse);
+}
+
+void ext2fs_set_block_alloc_stats_callback(ext2_filsys fs,
+ void (*func)(ext2_filsys fs,
+ blk64_t blk,
+ int inuse),
+ void (**old)(ext2_filsys fs,
+ blk64_t blk,
+ int inuse))
+{
+ if (!fs || fs->magic != EXT2_ET_MAGIC_EXT2FS_FILSYS)
+ return;
+ if (old)
+ *old = fs->block_alloc_stats;
+
+ fs->block_alloc_stats = func;
+}
+
+void ext2fs_block_alloc_stats_range(ext2_filsys fs, blk64_t blk,
+ blk_t num, int inuse)
+{
+#ifndef OMIT_COM_ERR
+ if (blk + num > ext2fs_blocks_count(fs->super)) {
+ com_err("ext2fs_block_alloc_stats_range", 0,
+ "Illegal block range: %llu (%u) ",
+ (unsigned long long) blk, num);
+ return;
+ }
+#endif
+ if (inuse == 0)
+ return;
+ if (inuse > 0) {
+ ext2fs_mark_block_bitmap_range2(fs->block_map, blk, num);
+ inuse = 1;
+ } else {
+ ext2fs_unmark_block_bitmap_range2(fs->block_map, blk, num);
+ inuse = -1;
+ }
+ while (num) {
+ int group = ext2fs_group_of_blk2(fs, blk);
+ blk64_t last_blk = ext2fs_group_last_block2(fs, group);
+ blk64_t n = num;
+
+ if (blk + num > last_blk)
+ n = last_blk - blk + 1;
+
+ ext2fs_bg_free_blocks_count_set(fs, group,
+ ext2fs_bg_free_blocks_count(fs, group) -
+ inuse*n/EXT2FS_CLUSTER_RATIO(fs));
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_group_desc_csum_set(fs, group);
+ ext2fs_free_blocks_count_add(fs->super, -inuse * (blk64_t) n);
+ blk += n;
+ num -= n;
+ }
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ if (fs->block_alloc_stats_range)
+ (fs->block_alloc_stats_range)(fs, blk, num, inuse);
+}
+
+void ext2fs_set_block_alloc_stats_range_callback(ext2_filsys fs,
+ void (*func)(ext2_filsys fs, blk64_t blk,
+ blk_t num, int inuse),
+ void (**old)(ext2_filsys fs, blk64_t blk,
+ blk_t num, int inuse))
+{
+ if (!fs || fs->magic != EXT2_ET_MAGIC_EXT2FS_FILSYS)
+ return;
+ if (old)
+ *old = fs->block_alloc_stats_range;
+
+ fs->block_alloc_stats_range = func;
+}
diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c
new file mode 100644
index 0000000..e8a1fef
--- /dev/null
+++ b/lib/ext2fs/alloc_tables.c
@@ -0,0 +1,278 @@
+/*
+ * alloc_tables.c --- Allocate tables for a newly initialized
+ * filesystem. Used by mke2fs when initializing a filesystem
+ *
+ * Copyright (C) 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+/*
+ * This routine searches for free blocks that can allocate a full
+ * group of bitmaps or inode tables for a flexbg group. Returns the
+ * block number with a correct offset were the bitmaps and inode
+ * tables can be allocated continuously and in order.
+ */
+static blk64_t flexbg_offset(ext2_filsys fs, dgrp_t group, blk64_t start_blk,
+ ext2fs_block_bitmap bmap, int rem_grp,
+ int elem_size)
+{
+ int flexbg, flexbg_size, size;
+ blk64_t last_blk, first_free = 0;
+ dgrp_t last_grp;
+
+ flexbg_size = 1U << fs->super->s_log_groups_per_flex;
+ flexbg = group / flexbg_size;
+ size = rem_grp * elem_size;
+
+ if (size > (int) (fs->super->s_blocks_per_group / 4))
+ size = (int) fs->super->s_blocks_per_group / 4;
+
+ /*
+ * Don't do a long search if the previous block search is still valid,
+ * but skip minor obstructions such as group descriptor backups.
+ */
+ if (start_blk && start_blk < ext2fs_blocks_count(fs->super) &&
+ ext2fs_get_free_blocks2(fs, start_blk, start_blk + size, elem_size,
+ bmap, &first_free) == 0)
+ return first_free;
+
+ start_blk = ext2fs_group_first_block2(fs, flexbg_size * flexbg);
+ last_grp = group | (flexbg_size - 1);
+ if (last_grp > fs->group_desc_count-1)
+ last_grp = fs->group_desc_count-1;
+ last_blk = ext2fs_group_last_block2(fs, last_grp);
+
+ /* Find the first available block */
+ if (ext2fs_get_free_blocks2(fs, start_blk, last_blk, size,
+ bmap, &first_free) == 0)
+ return first_free;
+
+ if (ext2fs_get_free_blocks2(fs, start_blk, last_blk, elem_size,
+ bmap, &first_free) == 0)
+ return first_free;
+
+ if (ext2fs_get_free_blocks2(fs, 0, last_blk, elem_size, bmap,
+ &first_free) == 0)
+ return first_free;
+
+ return first_free;
+}
+
+errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
+ ext2fs_block_bitmap bmap)
+{
+ errcode_t retval;
+ blk64_t group_blk, start_blk, last_blk, new_blk;
+ dgrp_t last_grp = 0;
+ int rem_grps = 0, flexbg_size = 0, table_offset = 0;
+
+ group_blk = ext2fs_group_first_block2(fs, group);
+ last_blk = ext2fs_group_last_block2(fs, group);
+
+ if (!bmap)
+ bmap = fs->block_map;
+
+ if (ext2fs_has_feature_flex_bg(fs->super) &&
+ fs->super->s_log_groups_per_flex) {
+ flexbg_size = 1U << fs->super->s_log_groups_per_flex;
+ last_grp = group | (flexbg_size - 1);
+ if (last_grp > fs->group_desc_count-1)
+ last_grp = fs->group_desc_count-1;
+ rem_grps = last_grp - group + 1;
+ }
+
+ /*
+ * Allocate the block and inode bitmaps, if necessary
+ */
+ if (fs->stride && !flexbg_size) {
+ retval = ext2fs_get_free_blocks2(fs, group_blk, last_blk,
+ 1, bmap, &start_blk);
+ if (retval)
+ return retval;
+ start_blk += fs->inode_blocks_per_group;
+ start_blk += ((fs->stride * group) %
+ (last_blk - start_blk + 1));
+ if (start_blk >= last_blk)
+ start_blk = group_blk;
+ } else
+ start_blk = group_blk;
+
+ if (flexbg_size) {
+ blk64_t prev_block = 0;
+
+ table_offset = flexbg_size;
+ if (group % flexbg_size)
+ prev_block = ext2fs_block_bitmap_loc(fs, group - 1) + 1;
+ else if (last_grp == fs->group_desc_count-1) {
+ /*
+ * If we are allocating for the last flex_bg
+ * keep the metadata tables contiguous
+ */
+ table_offset = last_grp & (flexbg_size - 1);
+ if (table_offset == 0)
+ table_offset = flexbg_size;
+ else
+ table_offset++;
+ }
+ /* FIXME: Take backup group descriptor blocks into account
+ * if the flexbg allocations will grow to overlap them... */
+ start_blk = flexbg_offset(fs, group, prev_block, bmap,
+ rem_grps, 1);
+ last_blk = ext2fs_group_last_block2(fs, last_grp);
+ }
+
+ if (!ext2fs_block_bitmap_loc(fs, group)) {
+ retval = ext2fs_get_free_blocks2(fs, start_blk, last_blk,
+ 1, bmap, &new_blk);
+ if (retval == EXT2_ET_BLOCK_ALLOC_FAIL)
+ retval = ext2fs_get_free_blocks2(fs, group_blk,
+ last_blk, 1, bmap, &new_blk);
+ if (retval)
+ return retval;
+ ext2fs_mark_block_bitmap2(bmap, new_blk);
+ ext2fs_block_bitmap_loc_set(fs, group, new_blk);
+ if (flexbg_size) {
+ dgrp_t gr = ext2fs_group_of_blk2(fs, new_blk);
+ ext2fs_bg_free_blocks_count_set(fs, gr, ext2fs_bg_free_blocks_count(fs, gr) - 1);
+ ext2fs_free_blocks_count_add(fs->super, -1);
+ ext2fs_bg_flags_clear(fs, gr, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_group_desc_csum_set(fs, gr);
+ }
+ }
+
+ if (flexbg_size) {
+ blk64_t prev_block = 0;
+ if (group % flexbg_size)
+ prev_block = ext2fs_inode_bitmap_loc(fs, group - 1) + 1;
+ else
+ prev_block = ext2fs_block_bitmap_loc(fs, group) +
+ table_offset;
+ /* FIXME: Take backup group descriptor blocks into account
+ * if the flexbg allocations will grow to overlap them... */
+ start_blk = flexbg_offset(fs, group, prev_block, bmap,
+ rem_grps, 1);
+ last_blk = ext2fs_group_last_block2(fs, last_grp);
+ }
+
+ if (!ext2fs_inode_bitmap_loc(fs, group)) {
+ retval = ext2fs_get_free_blocks2(fs, start_blk, last_blk,
+ 1, bmap, &new_blk);
+ if (retval == EXT2_ET_BLOCK_ALLOC_FAIL)
+ retval = ext2fs_get_free_blocks2(fs, group_blk,
+ last_blk, 1, bmap, &new_blk);
+ if (retval)
+ return retval;
+ ext2fs_mark_block_bitmap2(bmap, new_blk);
+ ext2fs_inode_bitmap_loc_set(fs, group, new_blk);
+ if (flexbg_size) {
+ dgrp_t gr = ext2fs_group_of_blk2(fs, new_blk);
+ ext2fs_bg_free_blocks_count_set(fs, gr, ext2fs_bg_free_blocks_count(fs, gr) - 1);
+ ext2fs_free_blocks_count_add(fs->super, -1);
+ ext2fs_bg_flags_clear(fs, gr, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_group_desc_csum_set(fs, gr);
+ }
+ }
+
+ /*
+ * Allocate the inode table
+ */
+ if (flexbg_size) {
+ blk64_t prev_block = 0;
+
+ if (group % flexbg_size)
+ prev_block = ext2fs_inode_table_loc(fs, group - 1) +
+ fs->inode_blocks_per_group;
+ else
+ prev_block = ext2fs_inode_bitmap_loc(fs, group) +
+ table_offset;
+
+ /* FIXME: Take backup group descriptor blocks into account
+ * if the flexbg allocations will grow to overlap them... */
+ group_blk = flexbg_offset(fs, group, prev_block, bmap,
+ rem_grps, fs->inode_blocks_per_group);
+ last_blk = ext2fs_group_last_block2(fs, last_grp);
+ }
+
+ if (!ext2fs_inode_table_loc(fs, group)) {
+ retval = ext2fs_get_free_blocks2(fs, group_blk, last_blk,
+ fs->inode_blocks_per_group,
+ bmap, &new_blk);
+ if (retval)
+ return retval;
+
+ ext2fs_mark_block_bitmap_range2(bmap,
+ new_blk, fs->inode_blocks_per_group);
+ if (flexbg_size) {
+ blk64_t num, blk;
+ num = fs->inode_blocks_per_group;
+ blk = new_blk;
+ while (num) {
+ int gr = ext2fs_group_of_blk2(fs, blk);
+ last_blk = ext2fs_group_last_block2(fs, gr);
+ blk64_t n = num;
+
+ if (blk + num > last_blk)
+ n = last_blk - blk + 1;
+
+ ext2fs_bg_free_blocks_count_set(fs, gr,
+ ext2fs_bg_free_blocks_count(fs, gr) -
+ n/EXT2FS_CLUSTER_RATIO(fs));
+ ext2fs_bg_flags_clear(fs, gr,
+ EXT2_BG_BLOCK_UNINIT);
+ ext2fs_group_desc_csum_set(fs, gr);
+ ext2fs_free_blocks_count_add(fs->super, -n);
+ blk += n;
+ num -= n;
+ }
+ }
+ ext2fs_inode_table_loc_set(fs, group, new_blk);
+ }
+ ext2fs_group_desc_csum_set(fs, group);
+ return 0;
+}
+
+errcode_t ext2fs_allocate_tables(ext2_filsys fs)
+{
+ errcode_t retval;
+ dgrp_t i;
+ struct ext2fs_numeric_progress_struct progress;
+
+ if (fs->progress_ops && fs->progress_ops->init)
+ (fs->progress_ops->init)(fs, &progress, NULL,
+ fs->group_desc_count);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (fs->progress_ops && fs->progress_ops->update)
+ (fs->progress_ops->update)(fs, &progress, i);
+ retval = ext2fs_allocate_group_table(fs, i, fs->block_map);
+ if (retval)
+ return retval;
+ }
+ if (fs->progress_ops && fs->progress_ops->close)
+ (fs->progress_ops->close)(fs, &progress, NULL);
+ return 0;
+}
+
diff --git a/lib/ext2fs/atexit.c b/lib/ext2fs/atexit.c
new file mode 100644
index 0000000..b3be1d5
--- /dev/null
+++ b/lib/ext2fs/atexit.c
@@ -0,0 +1,116 @@
+/*
+ * atexit.c --- Clean things up when we exit normally.
+ *
+ * Copyright Oracle, 2014
+ * Author Darrick J. Wong <darrick.wong@oracle.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include <stdlib.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+struct exit_data {
+ ext2_exit_fn func;
+ void *data;
+};
+
+static struct exit_data *items;
+static size_t nr_items;
+
+static void handle_exit(void)
+{
+ struct exit_data *ed;
+
+ for (ed = items + nr_items - 1; ed >= items; ed--) {
+ if (ed->func == NULL)
+ continue;
+ ed->func(ed->data);
+ }
+
+ ext2fs_free_mem(&items);
+ nr_items = 0;
+}
+
+/*
+ * Schedule a function to be called at (normal) program termination.
+ * If you want this to be called during a signal exit, you must capture
+ * the signal and call exit() yourself!
+ */
+errcode_t ext2fs_add_exit_fn(ext2_exit_fn func, void *data)
+{
+ struct exit_data *ed, *free_ed = NULL;
+ size_t x;
+ errcode_t ret;
+
+ if (func == NULL)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ for (x = 0, ed = items; x < nr_items; x++, ed++) {
+ if (ed->func == func && ed->data == data)
+ return EXT2_ET_FILE_EXISTS;
+ if (ed->func == NULL)
+ free_ed = ed;
+ }
+
+ if (free_ed) {
+ free_ed->func = func;
+ free_ed->data = data;
+ return 0;
+ }
+
+ if (nr_items == 0) {
+ ret = atexit(handle_exit);
+ if (ret)
+ return ret;
+ }
+
+ ret = ext2fs_resize_mem(0, (nr_items + 1) * sizeof(struct exit_data),
+ &items);
+ if (ret)
+ return ret;
+
+ items[nr_items].func = func;
+ items[nr_items].data = data;
+ nr_items++;
+
+ return 0;
+}
+
+/* Remove a function from the exit cleanup list. */
+errcode_t ext2fs_remove_exit_fn(ext2_exit_fn func, void *data)
+{
+ struct exit_data *ed;
+ size_t x;
+
+ if (func == NULL)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ for (x = 0, ed = items; x < nr_items; x++, ed++) {
+ if (ed->func == NULL)
+ return 0;
+ if (ed->func == func && ed->data == data) {
+ size_t sz = (nr_items - (x + 1)) *
+ sizeof(struct exit_data);
+ memmove(ed, ed + 1, sz);
+ memset(items + nr_items - 1, 0,
+ sizeof(struct exit_data));
+ }
+ }
+
+ return 0;
+}
diff --git a/lib/ext2fs/badblocks.c b/lib/ext2fs/badblocks.c
new file mode 100644
index 0000000..a306bc0
--- /dev/null
+++ b/lib/ext2fs/badblocks.c
@@ -0,0 +1,328 @@
+/*
+ * badblocks.c --- routines to manipulate the bad block structure
+ *
+ * Copyright (C) 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+/*
+ * Helper function for making a badblocks list
+ */
+static errcode_t make_u32_list(int size, int num, __u32 *list,
+ ext2_u32_list *ret)
+{
+ ext2_u32_list bb;
+ errcode_t retval;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_struct_u32_list), &bb);
+ if (retval)
+ return retval;
+ memset(bb, 0, sizeof(struct ext2_struct_u32_list));
+ bb->magic = EXT2_ET_MAGIC_BADBLOCKS_LIST;
+ bb->size = size ? size : 10;
+ bb->num = num;
+ retval = ext2fs_get_array(bb->size, sizeof(blk_t), &bb->list);
+ if (retval) {
+ ext2fs_free_mem(&bb);
+ return retval;
+ }
+ if (list)
+ memcpy(bb->list, list, bb->size * sizeof(blk_t));
+ else
+ memset(bb->list, 0, bb->size * sizeof(blk_t));
+ *ret = bb;
+ return 0;
+}
+
+
+/*
+ * This procedure creates an empty u32 list.
+ */
+errcode_t ext2fs_u32_list_create(ext2_u32_list *ret, int size)
+{
+ return make_u32_list(size, 0, 0, ret);
+}
+
+/*
+ * This procedure creates an empty badblocks list.
+ */
+errcode_t ext2fs_badblocks_list_create(ext2_badblocks_list *ret, int size)
+{
+ return make_u32_list(size, 0, 0, (ext2_badblocks_list *) ret);
+}
+
+
+/*
+ * This procedure copies a badblocks list
+ */
+errcode_t ext2fs_u32_copy(ext2_u32_list src, ext2_u32_list *dest)
+{
+ errcode_t retval;
+
+ retval = make_u32_list(src->size, src->num, src->list, dest);
+ if (retval)
+ return retval;
+ (*dest)->badblocks_flags = src->badblocks_flags;
+ return 0;
+}
+
+errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src,
+ ext2_badblocks_list *dest)
+{
+ return ext2fs_u32_copy((ext2_u32_list) src,
+ (ext2_u32_list *) dest);
+}
+
+/*
+ * This procedure frees a badblocks list.
+ *
+ * (note: moved to closefs.c)
+ */
+
+
+/*
+ * This procedure adds an item to a tracking list (e.g. badblocks or casefold).
+ */
+errcode_t ext2fs_u32_list_add(ext2_u32_list bb, __u32 blk)
+{
+ errcode_t retval;
+ int i, j;
+ unsigned long old_size;
+
+ EXT2_CHECK_MAGIC(bb, EXT2_ET_MAGIC_BADBLOCKS_LIST);
+
+ if (bb->num >= bb->size) {
+ old_size = bb->size * sizeof(__u32);
+ bb->size += 100;
+ retval = ext2fs_resize_mem(old_size, bb->size * sizeof(__u32),
+ &bb->list);
+ if (retval) {
+ bb->size -= 100;
+ return retval;
+ }
+ }
+
+ /*
+ * Add special case code for appending to the end of the list
+ */
+ i = bb->num-1;
+ if ((bb->num != 0) && (bb->list[i] == blk))
+ return 0;
+ if ((bb->num == 0) || (bb->list[i] < blk)) {
+ bb->list[bb->num++] = blk;
+ return 0;
+ }
+
+ j = bb->num;
+ for (i=0; i < bb->num; i++) {
+ if (bb->list[i] == blk)
+ return 0;
+ if (bb->list[i] > blk) {
+ j = i;
+ break;
+ }
+ }
+ for (i=bb->num; i > j; i--)
+ bb->list[i] = bb->list[i-1];
+ bb->list[j] = blk;
+ bb->num++;
+ return 0;
+}
+
+errcode_t ext2fs_badblocks_list_add(ext2_badblocks_list bb, blk_t blk)
+{
+ return ext2fs_u32_list_add((ext2_u32_list) bb, (__u32) blk);
+}
+
+/*
+ * This procedure finds a particular block is on a badblocks
+ * list.
+ */
+int ext2fs_u32_list_find(ext2_u32_list bb, __u32 blk)
+{
+ int low, high, mid;
+
+ if (bb->magic != EXT2_ET_MAGIC_BADBLOCKS_LIST)
+ return -1;
+
+ if (bb->num == 0)
+ return -1;
+
+ low = 0;
+ high = bb->num-1;
+ if (blk == bb->list[low])
+ return low;
+ if (blk == bb->list[high])
+ return high;
+
+ while (low < high) {
+ mid = ((unsigned)low + (unsigned)high)/2;
+ if (mid == low || mid == high)
+ break;
+ if (blk == bb->list[mid])
+ return mid;
+ if (blk < bb->list[mid])
+ high = mid;
+ else
+ low = mid;
+ }
+ return -1;
+}
+
+/*
+ * This procedure tests to see if a particular block is on a badblocks
+ * list.
+ */
+int ext2fs_u32_list_test(ext2_u32_list bb, __u32 blk)
+{
+ if (ext2fs_u32_list_find(bb, blk) < 0)
+ return 0;
+ else
+ return 1;
+}
+
+int ext2fs_badblocks_list_test(ext2_badblocks_list bb, blk_t blk)
+{
+ return ext2fs_u32_list_test((ext2_u32_list) bb, (__u32) blk);
+}
+
+
+/*
+ * Remove a block from the badblock list
+ */
+int ext2fs_u32_list_del(ext2_u32_list bb, __u32 blk)
+{
+ int remloc, i;
+
+ if (bb->num == 0)
+ return -1;
+
+ remloc = ext2fs_u32_list_find(bb, blk);
+ if (remloc < 0)
+ return -1;
+
+ for (i = remloc ; i < bb->num-1; i++)
+ bb->list[i] = bb->list[i+1];
+ bb->num--;
+ return 0;
+}
+
+void ext2fs_badblocks_list_del(ext2_u32_list bb, __u32 blk)
+{
+ ext2fs_u32_list_del(bb, blk);
+}
+
+errcode_t ext2fs_u32_list_iterate_begin(ext2_u32_list bb,
+ ext2_u32_iterate *ret)
+{
+ ext2_u32_iterate iter;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(bb, EXT2_ET_MAGIC_BADBLOCKS_LIST);
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_struct_u32_iterate), &iter);
+ if (retval)
+ return retval;
+
+ iter->magic = EXT2_ET_MAGIC_BADBLOCKS_ITERATE;
+ iter->bb = bb;
+ iter->ptr = 0;
+ *ret = iter;
+ return 0;
+}
+
+errcode_t ext2fs_badblocks_list_iterate_begin(ext2_badblocks_list bb,
+ ext2_badblocks_iterate *ret)
+{
+ return ext2fs_u32_list_iterate_begin((ext2_u32_list) bb,
+ (ext2_u32_iterate *) ret);
+}
+
+
+int ext2fs_u32_list_iterate(ext2_u32_iterate iter, __u32 *blk)
+{
+ ext2_u32_list bb;
+
+ if (iter->magic != EXT2_ET_MAGIC_BADBLOCKS_ITERATE)
+ return 0;
+
+ bb = iter->bb;
+
+ if (bb->magic != EXT2_ET_MAGIC_BADBLOCKS_LIST)
+ return 0;
+
+ if (iter->ptr < bb->num) {
+ *blk = bb->list[iter->ptr++];
+ return 1;
+ }
+ *blk = 0;
+ return 0;
+}
+
+int ext2fs_badblocks_list_iterate(ext2_badblocks_iterate iter, blk_t *blk)
+{
+ return ext2fs_u32_list_iterate((ext2_u32_iterate) iter,
+ (__u32 *) blk);
+}
+
+
+void ext2fs_u32_list_iterate_end(ext2_u32_iterate iter)
+{
+ if (!iter || (iter->magic != EXT2_ET_MAGIC_BADBLOCKS_ITERATE))
+ return;
+
+ iter->bb = 0;
+ ext2fs_free_mem(&iter);
+}
+
+void ext2fs_badblocks_list_iterate_end(ext2_badblocks_iterate iter)
+{
+ ext2fs_u32_list_iterate_end((ext2_u32_iterate) iter);
+}
+
+
+int ext2fs_u32_list_equal(ext2_u32_list bb1, ext2_u32_list bb2)
+{
+ EXT2_CHECK_MAGIC(bb1, EXT2_ET_MAGIC_BADBLOCKS_LIST);
+ EXT2_CHECK_MAGIC(bb2, EXT2_ET_MAGIC_BADBLOCKS_LIST);
+
+ if (bb1->num != bb2->num)
+ return 0;
+
+ if (memcmp(bb1->list, bb2->list, bb1->num * sizeof(blk_t)) != 0)
+ return 0;
+ return 1;
+}
+
+int ext2fs_badblocks_equal(ext2_badblocks_list bb1, ext2_badblocks_list bb2)
+{
+ return ext2fs_u32_list_equal((ext2_u32_list) bb1,
+ (ext2_u32_list) bb2);
+}
+
+int ext2fs_u32_list_count(ext2_u32_list bb)
+{
+ return bb->num;
+}
diff --git a/lib/ext2fs/bb_compat.c b/lib/ext2fs/bb_compat.c
new file mode 100644
index 0000000..373792a
--- /dev/null
+++ b/lib/ext2fs/bb_compat.c
@@ -0,0 +1,64 @@
+/*
+ * bb_compat.c --- compatibility badblocks routines
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+errcode_t badblocks_list_create(badblocks_list *ret, int size)
+{
+ return ext2fs_badblocks_list_create(ret, size);
+}
+
+void badblocks_list_free(badblocks_list bb)
+{
+ ext2fs_badblocks_list_free(bb);
+}
+
+errcode_t badblocks_list_add(badblocks_list bb, blk_t blk)
+{
+ return ext2fs_badblocks_list_add(bb, blk);
+}
+
+int badblocks_list_test(badblocks_list bb, blk_t blk)
+{
+ return ext2fs_badblocks_list_test(bb, blk);
+}
+
+errcode_t badblocks_list_iterate_begin(badblocks_list bb,
+ badblocks_iterate *ret)
+{
+ return ext2fs_badblocks_list_iterate_begin(bb, ret);
+}
+
+int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk)
+{
+ return ext2fs_badblocks_list_iterate(iter, blk);
+}
+
+void badblocks_list_iterate_end(badblocks_iterate iter)
+{
+ ext2fs_badblocks_list_iterate_end(iter);
+}
diff --git a/lib/ext2fs/bb_inode.c b/lib/ext2fs/bb_inode.c
new file mode 100644
index 0000000..11f10eb
--- /dev/null
+++ b/lib/ext2fs/bb_inode.c
@@ -0,0 +1,270 @@
+/*
+ * bb_inode.c --- routines to update the bad block inode.
+ *
+ * WARNING: This routine modifies a lot of state in the filesystem; if
+ * this routine returns an error, the bad block inode may be in an
+ * inconsistent state.
+ *
+ * Copyright (C) 1994, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct set_badblock_record {
+ ext2_badblocks_iterate bb_iter;
+ int bad_block_count;
+ blk_t *ind_blocks;
+ int max_ind_blocks;
+ int ind_blocks_size;
+ int ind_blocks_ptr;
+ char *block_buf;
+ errcode_t err;
+};
+
+static int set_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block, int ref_offset,
+ void *priv_data);
+static int clear_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block, int ref_offset,
+ void *priv_data);
+
+/*
+ * Given a bad blocks bitmap, update the bad blocks inode to reflect
+ * the map.
+ */
+errcode_t ext2fs_update_bb_inode(ext2_filsys fs, ext2_badblocks_list bb_list)
+{
+ errcode_t retval;
+ struct set_badblock_record rec;
+ struct ext2_inode inode;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!fs->block_map)
+ return EXT2_ET_NO_BLOCK_BITMAP;
+
+ memset(&rec, 0, sizeof(rec));
+ rec.max_ind_blocks = 10;
+ retval = ext2fs_get_array(rec.max_ind_blocks, sizeof(blk_t),
+ &rec.ind_blocks);
+ if (retval)
+ return retval;
+ memset(rec.ind_blocks, 0, rec.max_ind_blocks * sizeof(blk_t));
+ retval = ext2fs_get_mem(fs->blocksize, &rec.block_buf);
+ if (retval)
+ goto cleanup;
+ memset(rec.block_buf, 0, fs->blocksize);
+ rec.err = 0;
+
+ /*
+ * First clear the old bad blocks (while saving the indirect blocks)
+ */
+ retval = ext2fs_block_iterate2(fs, EXT2_BAD_INO,
+ BLOCK_FLAG_DEPTH_TRAVERSE, 0,
+ clear_bad_block_proc, &rec);
+ if (retval)
+ goto cleanup;
+ if (rec.err) {
+ retval = rec.err;
+ goto cleanup;
+ }
+
+ /*
+ * Now set the bad blocks!
+ *
+ * First, mark the bad blocks as used. This prevents a bad
+ * block from being used as an indirect block for the bad
+ * block inode (!).
+ */
+ if (bb_list) {
+ retval = ext2fs_badblocks_list_iterate_begin(bb_list,
+ &rec.bb_iter);
+ if (retval)
+ goto cleanup;
+ retval = ext2fs_block_iterate2(fs, EXT2_BAD_INO,
+ BLOCK_FLAG_APPEND, 0,
+ set_bad_block_proc, &rec);
+ ext2fs_badblocks_list_iterate_end(rec.bb_iter);
+ if (retval)
+ goto cleanup;
+ if (rec.err) {
+ retval = rec.err;
+ goto cleanup;
+ }
+ }
+
+ /*
+ * Update the bad block inode's mod time and block count
+ * field.
+ */
+ retval = ext2fs_read_inode(fs, EXT2_BAD_INO, &inode);
+ if (retval)
+ goto cleanup;
+
+ inode.i_atime = inode.i_mtime = fs->now ? fs->now : time(0);
+ if (!inode.i_ctime)
+ inode.i_ctime = fs->now ? fs->now : time(0);
+ ext2fs_iblk_set(fs, &inode, rec.bad_block_count);
+ retval = ext2fs_inode_size_set(fs, &inode,
+ rec.bad_block_count * fs->blocksize);
+ if (retval)
+ goto cleanup;
+
+ retval = ext2fs_write_inode(fs, EXT2_BAD_INO, &inode);
+ if (retval)
+ goto cleanup;
+
+cleanup:
+ ext2fs_free_mem(&rec.ind_blocks);
+ ext2fs_free_mem(&rec.block_buf);
+ return retval;
+}
+
+/*
+ * Helper function for update_bb_inode()
+ *
+ * Clear the bad blocks in the bad block inode, while saving the
+ * indirect blocks.
+ */
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int clear_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct set_badblock_record *rec = (struct set_badblock_record *)
+ priv_data;
+ errcode_t retval;
+ unsigned long old_size;
+
+ if (!*block_nr)
+ return 0;
+
+ /*
+ * If the block number is outrageous, clear it and ignore it.
+ */
+ if (*block_nr >= ext2fs_blocks_count(fs->super) ||
+ *block_nr < fs->super->s_first_data_block) {
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+ }
+
+ if (blockcnt < 0) {
+ if (rec->ind_blocks_size >= rec->max_ind_blocks) {
+ old_size = rec->max_ind_blocks * sizeof(blk_t);
+ rec->max_ind_blocks += 10;
+ retval = ext2fs_resize_mem(old_size,
+ rec->max_ind_blocks * sizeof(blk_t),
+ &rec->ind_blocks);
+ if (retval) {
+ rec->max_ind_blocks -= 10;
+ rec->err = retval;
+ return BLOCK_ABORT;
+ }
+ }
+ rec->ind_blocks[rec->ind_blocks_size++] = *block_nr;
+ }
+
+ /*
+ * Mark the block as unused, and update accounting information
+ */
+ ext2fs_block_alloc_stats2(fs, *block_nr, -1);
+
+ *block_nr = 0;
+ return BLOCK_CHANGED;
+}
+
+
+/*
+ * Helper function for update_bb_inode()
+ *
+ * Set the block list in the bad block inode, using the supplied bitmap.
+ */
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int set_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct set_badblock_record *rec = (struct set_badblock_record *)
+ priv_data;
+ errcode_t retval;
+ blk_t blk;
+
+ if (blockcnt >= 0) {
+ /*
+ * Get the next bad block.
+ */
+ if (!ext2fs_badblocks_list_iterate(rec->bb_iter, &blk))
+ return BLOCK_ABORT;
+ rec->bad_block_count++;
+ } else {
+ /*
+ * An indirect block; fetch a block from the
+ * previously used indirect block list. The block
+ * most be not marked as used; if so, get another one.
+ * If we run out of reserved indirect blocks, allocate
+ * a new one.
+ */
+ retry:
+ if (rec->ind_blocks_ptr < rec->ind_blocks_size) {
+ blk = rec->ind_blocks[rec->ind_blocks_ptr++];
+ if (ext2fs_test_block_bitmap2(fs->block_map, blk))
+ goto retry;
+ } else {
+ retval = ext2fs_new_block(fs, 0, 0, &blk);
+ if (retval) {
+ rec->err = retval;
+ return BLOCK_ABORT;
+ }
+ }
+ retval = io_channel_write_blk64(fs->io, blk, 1, rec->block_buf);
+ if (retval) {
+ rec->err = retval;
+ return BLOCK_ABORT;
+ }
+ }
+
+ /*
+ * Update block counts
+ */
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+
+ *block_nr = blk;
+ return BLOCK_CHANGED;
+}
+
+
+
+
+
+
diff --git a/lib/ext2fs/bitmaps.c b/lib/ext2fs/bitmaps.c
new file mode 100644
index 0000000..8bfa24b
--- /dev/null
+++ b/lib/ext2fs/bitmaps.c
@@ -0,0 +1,320 @@
+/*
+ * bitmaps.c --- routines to read, write, and manipulate the inode and
+ * block bitmaps.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+#include "bmap64.h"
+
+void ext2fs_free_inode_bitmap(ext2fs_inode_bitmap bitmap)
+{
+ ext2fs_free_generic_bmap(bitmap);
+}
+
+void ext2fs_free_block_bitmap(ext2fs_block_bitmap bitmap)
+{
+ ext2fs_free_generic_bmap(bitmap);
+}
+
+errcode_t ext2fs_copy_bitmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest)
+{
+ return (ext2fs_copy_generic_bmap(src, dest));
+}
+void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map)
+{
+ ext2fs_set_generic_bmap_padding(map);
+}
+
+errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_inode_bitmap *ret)
+{
+ __u64 start, end, real_end;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ return EXT2_ET_EXTERNAL_JOURNAL_NOSUPP;
+
+ fs->write_bitmaps = ext2fs_write_bitmaps;
+
+ start = 1;
+ end = fs->super->s_inodes_count;
+ real_end = (__u64)EXT2_INODES_PER_GROUP(fs->super) *
+ fs->group_desc_count;
+
+ /* Are we permitted to use new-style bitmaps? */
+ if (fs->flags & EXT2_FLAG_64BITS)
+ return (ext2fs_alloc_generic_bmap(fs,
+ EXT2_ET_MAGIC_INODE_BITMAP64,
+ fs->default_bitmap_type,
+ start, end, real_end, descr, ret));
+
+ /* Otherwise, check to see if the file system is small enough
+ * to use old-style 32-bit bitmaps */
+ if ((end > ~0U) || (real_end > ~0U))
+ return EXT2_ET_CANT_USE_LEGACY_BITMAPS;
+
+ return (ext2fs_make_generic_bitmap(EXT2_ET_MAGIC_INODE_BITMAP, fs,
+ start, end, real_end,
+ descr, 0,
+ (ext2fs_generic_bitmap *) ret));
+}
+
+errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_block_bitmap *ret)
+{
+ __u64 start, end, real_end;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ return EXT2_ET_EXTERNAL_JOURNAL_NOSUPP;
+
+ fs->write_bitmaps = ext2fs_write_bitmaps;
+
+ start = EXT2FS_B2C(fs, fs->super->s_first_data_block);
+ end = EXT2FS_B2C(fs, ext2fs_blocks_count(fs->super)-1);
+ real_end = ((__u64) EXT2_CLUSTERS_PER_GROUP(fs->super)
+ * (__u64) fs->group_desc_count)-1 + start;
+
+ if (fs->flags & EXT2_FLAG_64BITS)
+ return (ext2fs_alloc_generic_bmap(fs,
+ EXT2_ET_MAGIC_BLOCK_BITMAP64,
+ fs->default_bitmap_type,
+ start, end, real_end, descr, ret));
+
+ if ((end > ~0U) || (real_end > ~0U))
+ return EXT2_ET_CANT_USE_LEGACY_BITMAPS;
+
+ return (ext2fs_make_generic_bitmap(EXT2_ET_MAGIC_BLOCK_BITMAP, fs,
+ start, end, real_end,
+ descr, 0,
+ (ext2fs_generic_bitmap *) ret));
+}
+
+/*
+ * ext2fs_allocate_block_bitmap() really allocates a per-cluster
+ * bitmap for backwards compatibility. This function allocates a
+ * block bitmap which is truly per-block, even if clusters/bigalloc
+ * are enabled. mke2fs and e2fsck need this for tracking the
+ * allocation of the file system metadata blocks.
+ */
+errcode_t ext2fs_allocate_subcluster_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_block_bitmap *ret)
+{
+ __u64 start, end, real_end;
+ ext2fs_generic_bitmap bmap;
+ ext2fs_generic_bitmap_64 bmap64;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ return EXT2_ET_EXTERNAL_JOURNAL_NOSUPP;
+
+ fs->write_bitmaps = ext2fs_write_bitmaps;
+
+ if (!fs->cluster_ratio_bits)
+ return ext2fs_allocate_block_bitmap(fs, descr, ret);
+
+ if ((fs->flags & EXT2_FLAG_64BITS) == 0)
+ return EXT2_ET_CANT_USE_LEGACY_BITMAPS;
+
+ start = fs->super->s_first_data_block;
+ end = ext2fs_blocks_count(fs->super)-1;
+ real_end = ((__u64) EXT2_BLOCKS_PER_GROUP(fs->super)
+ * (__u64) fs->group_desc_count)-1 + start;
+
+ retval = ext2fs_alloc_generic_bmap(fs, EXT2_ET_MAGIC_BLOCK_BITMAP64,
+ fs->default_bitmap_type, start,
+ end, real_end, descr, &bmap);
+ if (retval)
+ return retval;
+ bmap64 = (ext2fs_generic_bitmap_64) bmap;
+ bmap64->cluster_bits = 0;
+ *ret = bmap;
+ return 0;
+}
+
+int ext2fs_get_bitmap_granularity(ext2fs_block_bitmap bitmap)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) bitmap;
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return 0;
+
+ return bmap->cluster_bits;
+}
+
+errcode_t ext2fs_fudge_inode_bitmap_end(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t end, ext2_ino_t *oend)
+{
+ __u64 tmp_oend;
+ int retval;
+
+ retval = ext2fs_fudge_generic_bmap_end((ext2fs_generic_bitmap) bitmap,
+ EXT2_ET_FUDGE_INODE_BITMAP_END,
+ end, &tmp_oend);
+ if (oend)
+ *oend = tmp_oend;
+ return retval;
+}
+
+errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap,
+ blk_t end, blk_t *oend)
+{
+ return (ext2fs_fudge_generic_bitmap_end(bitmap,
+ EXT2_ET_MAGIC_BLOCK_BITMAP,
+ EXT2_ET_FUDGE_BLOCK_BITMAP_END,
+ end, oend));
+}
+
+errcode_t ext2fs_fudge_block_bitmap_end2(ext2fs_block_bitmap bitmap,
+ blk64_t end, blk64_t *oend)
+{
+ return (ext2fs_fudge_generic_bmap_end(bitmap,
+ EXT2_ET_FUDGE_BLOCK_BITMAP_END,
+ end, oend));
+}
+
+void ext2fs_clear_inode_bitmap(ext2fs_inode_bitmap bitmap)
+{
+ ext2fs_clear_generic_bmap(bitmap);
+}
+
+void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap)
+{
+ ext2fs_clear_generic_bmap(bitmap);
+}
+
+errcode_t ext2fs_resize_inode_bitmap(__u32 new_end, __u32 new_real_end,
+ ext2fs_inode_bitmap bmap)
+{
+ return (ext2fs_resize_generic_bitmap(EXT2_ET_MAGIC_INODE_BITMAP,
+ new_end, new_real_end, bmap));
+}
+
+errcode_t ext2fs_resize_inode_bitmap2(__u64 new_end, __u64 new_real_end,
+ ext2fs_inode_bitmap bmap)
+{
+ return (ext2fs_resize_generic_bmap(bmap, new_end, new_real_end));
+}
+
+errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u32 new_real_end,
+ ext2fs_block_bitmap bmap)
+{
+ return (ext2fs_resize_generic_bitmap(EXT2_ET_MAGIC_BLOCK_BITMAP,
+ new_end, new_real_end, bmap));
+}
+
+errcode_t ext2fs_resize_block_bitmap2(__u64 new_end, __u64 new_real_end,
+ ext2fs_block_bitmap bmap)
+{
+ return (ext2fs_resize_generic_bmap(bmap, new_end, new_real_end));
+}
+
+errcode_t ext2fs_compare_block_bitmap(ext2fs_block_bitmap bm1,
+ ext2fs_block_bitmap bm2)
+{
+ return (ext2fs_compare_generic_bmap(EXT2_ET_NEQ_BLOCK_BITMAP,
+ bm1, bm2));
+}
+
+errcode_t ext2fs_compare_inode_bitmap(ext2fs_inode_bitmap bm1,
+ ext2fs_inode_bitmap bm2)
+{
+ return (ext2fs_compare_generic_bmap(EXT2_ET_NEQ_INODE_BITMAP,
+ bm1, bm2));
+}
+
+errcode_t ext2fs_set_inode_bitmap_range(ext2fs_inode_bitmap bmap,
+ ext2_ino_t start, unsigned int num,
+ void *in)
+{
+ return (ext2fs_set_generic_bitmap_range(bmap,
+ EXT2_ET_MAGIC_INODE_BITMAP,
+ start, num, in));
+}
+
+errcode_t ext2fs_set_inode_bitmap_range2(ext2fs_inode_bitmap bmap,
+ __u64 start, size_t num,
+ void *in)
+{
+ return (ext2fs_set_generic_bmap_range(bmap, start, num, in));
+}
+
+errcode_t ext2fs_get_inode_bitmap_range(ext2fs_inode_bitmap bmap,
+ ext2_ino_t start, unsigned int num,
+ void *out)
+{
+ return (ext2fs_get_generic_bitmap_range(bmap,
+ EXT2_ET_MAGIC_INODE_BITMAP,
+ start, num, out));
+}
+
+errcode_t ext2fs_get_inode_bitmap_range2(ext2fs_inode_bitmap bmap,
+ __u64 start, size_t num,
+ void *out)
+{
+ return (ext2fs_get_generic_bmap_range(bmap, start, num, out));
+}
+
+errcode_t ext2fs_set_block_bitmap_range(ext2fs_block_bitmap bmap,
+ blk_t start, unsigned int num,
+ void *in)
+{
+ return (ext2fs_set_generic_bitmap_range(bmap,
+ EXT2_ET_MAGIC_BLOCK_BITMAP,
+ start, num, in));
+}
+
+errcode_t ext2fs_set_block_bitmap_range2(ext2fs_block_bitmap bmap,
+ blk64_t start, size_t num,
+ void *in)
+{
+ return (ext2fs_set_generic_bmap_range(bmap, start, num, in));
+}
+
+errcode_t ext2fs_get_block_bitmap_range(ext2fs_block_bitmap bmap,
+ blk_t start, unsigned int num,
+ void *out)
+{
+ return (ext2fs_get_generic_bitmap_range(bmap,
+ EXT2_ET_MAGIC_BLOCK_BITMAP,
+ start, num, out));
+}
+
+errcode_t ext2fs_get_block_bitmap_range2(ext2fs_block_bitmap bmap,
+ blk64_t start, size_t num,
+ void *out)
+{
+ return (ext2fs_get_generic_bmap_range(bmap, start, num, out));
+}
diff --git a/lib/ext2fs/bitops.c b/lib/ext2fs/bitops.c
new file mode 100644
index 0000000..ce2acc4
--- /dev/null
+++ b/lib/ext2fs/bitops.c
@@ -0,0 +1,148 @@
+/*
+ * bitops.c --- Bitmap frobbing code. See bitops.h for the inlined
+ * routines.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * C language bitmap functions written by Theodore Ts'o, 9/26/92.
+ * Modified by Pete A. Zaitcev 7/14/95 to be portable to big endian
+ * systems, as well as non-32 bit systems.
+ */
+
+int ext2fs_set_bit(unsigned int nr,void * addr)
+{
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = mask & *ADDR;
+ *ADDR |= mask;
+ return retval;
+}
+
+int ext2fs_clear_bit(unsigned int nr, void * addr)
+{
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = mask & *ADDR;
+ *ADDR &= ~mask;
+ return retval;
+}
+
+int ext2fs_test_bit(unsigned int nr, const void * addr)
+{
+ int mask;
+ const unsigned char *ADDR = (const unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ return (mask & *ADDR);
+}
+
+void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg,
+ const char *description)
+{
+#ifndef OMIT_COM_ERR
+ if (description)
+ com_err(0, errcode, "#%lu for %s", arg, description);
+ else
+ com_err(0, errcode, "#%lu", arg);
+#endif
+}
+
+/* Bitmap functions that take a 64-bit offset */
+
+int ext2fs_set_bit64(__u64 nr, void * addr)
+{
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = mask & *ADDR;
+ *ADDR |= mask;
+ return retval;
+}
+
+int ext2fs_clear_bit64(__u64 nr, void * addr)
+{
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = mask & *ADDR;
+ *ADDR &= ~mask;
+ return retval;
+}
+
+int ext2fs_test_bit64(__u64 nr, const void * addr)
+{
+ int mask;
+ const unsigned char *ADDR = (const unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ return (mask & *ADDR);
+}
+
+static unsigned int popcount8(unsigned int w)
+{
+ unsigned int res = w - ((w >> 1) & 0x55);
+ res = (res & 0x33) + ((res >> 2) & 0x33);
+ return (res + (res >> 4)) & 0x0F;
+}
+
+static unsigned int popcount32(unsigned int w)
+{
+ unsigned int res = w - ((w >> 1) & 0x55555555);
+ res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
+ res = (res + (res >> 4)) & 0x0F0F0F0F;
+ res = res + (res >> 8);
+ return (res + (res >> 16)) & 0x000000FF;
+}
+
+unsigned int ext2fs_bitcount(const void *addr, unsigned int nbytes)
+{
+ const unsigned char *cp = addr;
+ const __u32 *p;
+ unsigned int res = 0;
+
+ while (((((uintptr_t) cp) & 3) != 0) && (nbytes > 0)) {
+ res += popcount8(*cp++);
+ nbytes--;
+ }
+ p = (const __u32 *) cp;
+
+ while (nbytes > 4) {
+ res += popcount32(*p++);
+ nbytes -= 4;
+ }
+ cp = (const unsigned char *) p;
+
+ while (nbytes > 0) {
+ res += popcount8(*cp++);
+ nbytes--;
+ }
+ return res;
+}
diff --git a/lib/ext2fs/bitops.h b/lib/ext2fs/bitops.h
new file mode 100644
index 0000000..9edf594
--- /dev/null
+++ b/lib/ext2fs/bitops.h
@@ -0,0 +1,606 @@
+/*
+ * bitops.h --- Bitmap frobbing code. The byte swapping routines are
+ * also included here.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifdef WORDS_BIGENDIAN
+#define ext2fs_cpu_to_le64(x) ((__force __le64)ext2fs_swab64((__u64)(x)))
+#define ext2fs_le64_to_cpu(x) ext2fs_swab64((__force __u64)(__le64)(x))
+#define ext2fs_cpu_to_le32(x) ((__force __le32)ext2fs_swab32((__u32)(x)))
+#define ext2fs_le32_to_cpu(x) ext2fs_swab32((__force __u32)(__le32)(x))
+#define ext2fs_cpu_to_le16(x) ((__force __le16)ext2fs_swab16((__u16)(x)))
+#define ext2fs_le16_to_cpu(x) ext2fs_swab16((__force __u16)(__le16)(x))
+
+#define ext2fs_cpu_to_be64(x) ((__force __be64)(__u64)(x))
+#define ext2fs_be64_to_cpu(x) ((__force __u64)(__be64)(x))
+#define ext2fs_cpu_to_be32(x) ((__force __be32)(__u32)(x))
+#define ext2fs_be32_to_cpu(x) ((__force __u32)(__be32)(x))
+#define ext2fs_cpu_to_be16(x) ((__force __be16)(__u16)(x))
+#define ext2fs_be16_to_cpu(x) ((__force __u16)(__be16)(x))
+#else
+#define ext2fs_cpu_to_le64(x) ((__force __le64)(__u64)(x))
+#define ext2fs_le64_to_cpu(x) ((__force __u64)(__le64)(x))
+#define ext2fs_cpu_to_le32(x) ((__force __le32)(__u32)(x))
+#define ext2fs_le32_to_cpu(x) ((__force __u32)(__le32)(x))
+#define ext2fs_cpu_to_le16(x) ((__force __le16)(__u16)(x))
+#define ext2fs_le16_to_cpu(x) ((__force __u16)(__le16)(x))
+
+#define ext2fs_cpu_to_be64(x) ((__force __be64)ext2fs_swab64((__u64)(x)))
+#define ext2fs_be64_to_cpu(x) ext2fs_swab64((__force __u64)(__be64)(x))
+#define ext2fs_cpu_to_be32(x) ((__force __be32)ext2fs_swab32((__u32)(x)))
+#define ext2fs_be32_to_cpu(x) ext2fs_swab32((__force __u32)(__be32)(x))
+#define ext2fs_cpu_to_be16(x) ((__force __be16)ext2fs_swab16((__u16)(x)))
+#define ext2fs_be16_to_cpu(x) ext2fs_swab16((__force __u16)(__be16)(x))
+#endif
+
+/*
+ * EXT2FS bitmap manipulation routines.
+ */
+
+/* Support for sending warning messages from the inline subroutines */
+extern const char *ext2fs_block_string;
+extern const char *ext2fs_inode_string;
+extern const char *ext2fs_mark_string;
+extern const char *ext2fs_unmark_string;
+extern const char *ext2fs_test_string;
+extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg,
+ const char *description);
+extern void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap,
+ int code, unsigned long arg);
+
+#ifdef NO_INLINE_FUNCS
+extern void ext2fs_fast_set_bit(unsigned int nr,void * addr);
+extern void ext2fs_fast_clear_bit(unsigned int nr, void * addr);
+extern void ext2fs_fast_set_bit64(__u64 nr,void * addr);
+extern void ext2fs_fast_clear_bit64(__u64 nr, void * addr);
+extern __u16 ext2fs_swab16(__u16 val);
+extern __u32 ext2fs_swab32(__u32 val);
+extern __u64 ext2fs_swab64(__u64 val);
+
+extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block);
+extern int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block);
+extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block);
+
+extern int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode);
+extern int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode);
+
+extern void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block);
+extern void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block);
+extern int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block);
+
+extern void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap);
+extern ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap);
+extern blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap);
+extern ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap);
+
+extern void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num);
+extern void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num);
+extern int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num);
+#endif
+
+/* These functions routines moved to gen_bitmap.c */
+extern void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num);
+extern void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num);
+extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num);
+extern int ext2fs_test_inode_bitmap_range(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode, int num);
+extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ __u32 bitno);
+extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno);
+extern int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno);
+extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num);
+extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
+extern __u32 ext2fs_get_generic_bitmap_start(ext2fs_generic_bitmap bitmap);
+extern __u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap bitmap);
+
+/* 64-bit versions */
+
+#ifdef NO_INLINE_FUNCS
+extern int ext2fs_mark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block);
+extern int ext2fs_unmark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block);
+extern int ext2fs_test_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block);
+
+extern int ext2fs_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern int ext2fs_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern int ext2fs_test_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+
+extern void ext2fs_fast_mark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block);
+extern void ext2fs_fast_unmark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block);
+extern int ext2fs_fast_test_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block);
+
+extern void ext2fs_fast_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern void ext2fs_fast_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern int ext2fs_fast_test_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode);
+extern errcode_t ext2fs_find_first_zero_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t start,
+ blk64_t end,
+ blk64_t *out);
+extern errcode_t ext2fs_find_first_zero_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t start,
+ ext2_ino_t end,
+ ext2_ino_t *out);
+extern errcode_t ext2fs_find_first_set_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t start,
+ blk64_t end,
+ blk64_t *out);
+extern errcode_t ext2fs_find_first_set_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t start,
+ ext2_ino_t end,
+ ext2_ino_t *out);
+extern blk64_t ext2fs_get_block_bitmap_start2(ext2fs_block_bitmap bitmap);
+extern ext2_ino_t ext2fs_get_inode_bitmap_start2(ext2fs_inode_bitmap bitmap);
+extern blk64_t ext2fs_get_block_bitmap_end2(ext2fs_block_bitmap bitmap);
+extern ext2_ino_t ext2fs_get_inode_bitmap_end2(ext2fs_inode_bitmap bitmap);
+
+extern int ext2fs_fast_test_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block,
+ unsigned int num);
+extern void ext2fs_fast_mark_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block,
+ unsigned int num);
+extern void ext2fs_fast_unmark_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block,
+ unsigned int num);
+#endif
+
+/* These routines moved to gen_bitmap64.c */
+extern void ext2fs_clear_generic_bmap(ext2fs_generic_bitmap bitmap);
+extern errcode_t ext2fs_compare_generic_bmap(errcode_t neq,
+ ext2fs_generic_bitmap bm1,
+ ext2fs_generic_bitmap bm2);
+extern void ext2fs_set_generic_bmap_padding(ext2fs_generic_bitmap bmap);
+extern int ext2fs_mark_generic_bmap(ext2fs_generic_bitmap bitmap,
+ blk64_t bitno);
+extern int ext2fs_unmark_generic_bmap(ext2fs_generic_bitmap bitmap,
+ blk64_t bitno);
+extern int ext2fs_test_generic_bmap(ext2fs_generic_bitmap bitmap,
+ blk64_t bitno);
+extern int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block, unsigned int num);
+extern __u64 ext2fs_get_generic_bmap_start(ext2fs_generic_bitmap bitmap);
+extern __u64 ext2fs_get_generic_bmap_end(ext2fs_generic_bitmap bitmap);
+extern int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block, unsigned int num);
+extern void ext2fs_mark_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block, unsigned int num);
+extern void ext2fs_unmark_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block, unsigned int num);
+extern errcode_t ext2fs_find_first_zero_generic_bmap(ext2fs_generic_bitmap bitmap,
+ __u64 start, __u64 end,
+ __u64 *out);
+extern errcode_t ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap,
+ __u64 start, __u64 end,
+ __u64 *out);
+
+/*
+ * The inline routines themselves...
+ *
+ * If NO_INLINE_FUNCS is defined, then we won't try to do inline
+ * functions at all; they will be included as normal functions in
+ * inline.c
+ */
+
+#if (defined(INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
+#ifdef INCLUDE_INLINE_FUNCS
+#if (__STDC_VERSION__ >= 199901L)
+#define _INLINE_ extern inline
+#else
+#define _INLINE_ inline
+#endif
+#else /* !INCLUDE_INLINE FUNCS */
+#if (__STDC_VERSION__ >= 199901L)
+#define _INLINE_ inline
+#else /* not C99 */
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif /* __GNUC__ */
+#endif /* __STDC_VERSION__ >= 199901L */
+#endif /* INCLUDE_INLINE_FUNCS */
+
+/*
+ * Fast bit set/clear functions that doesn't need to return the
+ * previous bit value.
+ */
+
+_INLINE_ void ext2fs_fast_set_bit(unsigned int nr,void * addr)
+{
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ *ADDR |= (unsigned char) (1 << (nr & 0x07));
+}
+
+_INLINE_ void ext2fs_fast_clear_bit(unsigned int nr, void * addr)
+{
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ *ADDR &= (unsigned char) ~(1 << (nr & 0x07));
+}
+
+
+_INLINE_ void ext2fs_fast_set_bit64(__u64 nr, void * addr)
+{
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ *ADDR |= (unsigned char) (1 << (nr & 0x07));
+}
+
+_INLINE_ void ext2fs_fast_clear_bit64(__u64 nr, void * addr)
+{
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ *ADDR &= (unsigned char) ~(1 << (nr & 0x07));
+}
+
+_INLINE_ __u16 ext2fs_swab16(__u16 val)
+{
+ return (val >> 8) | (__u16) (val << 8);
+}
+
+_INLINE_ __u32 ext2fs_swab32(__u32 val)
+{
+ return ((val>>24) | ((val>>8)&0xFF00) |
+ ((val<<8)&0xFF0000) | (val<<24));
+}
+
+_INLINE_ __u64 ext2fs_swab64(__u64 val)
+{
+ return (ext2fs_swab32((__u32) (val >> 32)) |
+ (((__u64)ext2fs_swab32(val & 0xFFFFFFFFUL)) << 32));
+}
+
+_INLINE_ int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+ return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ block);
+}
+
+_INLINE_ int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+ return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ block);
+}
+
+_INLINE_ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+ return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ block);
+}
+
+_INLINE_ int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+ ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, block);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+ ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, block);
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+ return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ block);
+}
+
+_INLINE_ void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, inode);
+}
+
+_INLINE_ void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, inode);
+}
+
+_INLINE_ int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap)
+{
+ return ext2fs_get_generic_bitmap_start((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap)
+{
+ return ext2fs_get_generic_bitmap_start((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap)
+{
+ return ext2fs_get_generic_bitmap_end((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap)
+{
+ return ext2fs_get_generic_bitmap_end((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ return ext2fs_test_block_bitmap_range(bitmap, block, num);
+}
+
+_INLINE_ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ ext2fs_mark_block_bitmap_range(bitmap, block, num);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ ext2fs_unmark_block_bitmap_range(bitmap, block, num);
+}
+
+/* 64-bit versions */
+
+_INLINE_ int ext2fs_mark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block)
+{
+ return ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ block);
+}
+
+_INLINE_ int ext2fs_unmark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block)
+{
+ return ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap, block);
+}
+
+_INLINE_ int ext2fs_test_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block)
+{
+ return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ block);
+}
+
+_INLINE_ int ext2fs_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ int ext2fs_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ int ext2fs_test_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ void ext2fs_fast_mark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block)
+{
+ ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap, block);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block)
+{
+ ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap, block);
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t block)
+{
+ return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ block);
+}
+
+_INLINE_ void ext2fs_fast_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap, inode);
+}
+
+_INLINE_ void ext2fs_fast_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap, inode);
+}
+
+_INLINE_ int ext2fs_fast_test_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+ return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ inode);
+}
+
+_INLINE_ errcode_t ext2fs_find_first_zero_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t start,
+ blk64_t end,
+ blk64_t *out)
+{
+ __u64 o;
+ errcode_t rv;
+
+ rv = ext2fs_find_first_zero_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ start, end, &o);
+ if (!rv)
+ *out = o;
+ return rv;
+}
+
+_INLINE_ errcode_t ext2fs_find_first_zero_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t start,
+ ext2_ino_t end,
+ ext2_ino_t *out)
+{
+ __u64 o;
+ errcode_t rv;
+
+ rv = ext2fs_find_first_zero_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ start, end, &o);
+ if (!rv)
+ *out = (ext2_ino_t) o;
+ return rv;
+}
+
+_INLINE_ errcode_t ext2fs_find_first_set_block_bitmap2(ext2fs_block_bitmap bitmap,
+ blk64_t start,
+ blk64_t end,
+ blk64_t *out)
+{
+ __u64 o;
+ errcode_t rv;
+
+ rv = ext2fs_find_first_set_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ start, end, &o);
+ if (!rv)
+ *out = o;
+ return rv;
+}
+
+_INLINE_ errcode_t ext2fs_find_first_set_inode_bitmap2(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t start,
+ ext2_ino_t end,
+ ext2_ino_t *out)
+{
+ __u64 o;
+ errcode_t rv;
+
+ rv = ext2fs_find_first_set_generic_bmap((ext2fs_generic_bitmap) bitmap,
+ start, end, &o);
+ if (!rv)
+ *out = (ext2_ino_t) o;
+ return rv;
+}
+
+_INLINE_ blk64_t ext2fs_get_block_bitmap_start2(ext2fs_block_bitmap bitmap)
+{
+ return ext2fs_get_generic_bmap_start((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_start2(ext2fs_inode_bitmap bitmap)
+{
+ return (ext2_ino_t) ext2fs_get_generic_bmap_start((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ blk64_t ext2fs_get_block_bitmap_end2(ext2fs_block_bitmap bitmap)
+{
+ return ext2fs_get_generic_bmap_end((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_end2(ext2fs_inode_bitmap bitmap)
+{
+ return (ext2_ino_t) ext2fs_get_generic_bmap_end((ext2fs_generic_bitmap) bitmap);
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block,
+ unsigned int num)
+{
+ return ext2fs_test_block_bitmap_range2(bitmap, block, num);
+}
+
+_INLINE_ void ext2fs_fast_mark_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block,
+ unsigned int num)
+{
+ ext2fs_mark_block_bitmap_range2(bitmap, block, num);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap_range2(ext2fs_block_bitmap bitmap,
+ blk64_t block,
+ unsigned int num)
+{
+ ext2fs_unmark_block_bitmap_range2(bitmap, block, num);
+}
+
+#undef _INLINE_
+#endif
+
+extern int ext2fs_set_bit(unsigned int nr,void * addr);
+extern int ext2fs_clear_bit(unsigned int nr, void * addr);
+extern int ext2fs_test_bit(unsigned int nr, const void * addr);
+extern int ext2fs_set_bit64(__u64 nr,void * addr);
+extern int ext2fs_clear_bit64(__u64 nr, void * addr);
+extern int ext2fs_test_bit64(__u64 nr, const void * addr);
+extern unsigned int ext2fs_bitcount(const void *addr, unsigned int nbytes);
diff --git a/lib/ext2fs/blkmap64_ba.c b/lib/ext2fs/blkmap64_ba.c
new file mode 100644
index 0000000..5d8f154
--- /dev/null
+++ b/lib/ext2fs/blkmap64_ba.c
@@ -0,0 +1,492 @@
+/*
+ * blkmap64_ba.c --- Simple bitarray implementation for bitmaps
+ *
+ * Copyright (C) 2008 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+#include "bmap64.h"
+
+/*
+ * Private data for bit array implementation of bitmap ops.
+ * Currently, this is just a pointer to our big flat hunk of memory,
+ * exactly equivalent to the old-skool char * bitmap member.
+ */
+
+struct ext2fs_ba_private_struct {
+ char *bitarray;
+};
+
+typedef struct ext2fs_ba_private_struct *ext2fs_ba_private;
+
+static errcode_t ba_alloc_private_data (ext2fs_generic_bitmap_64 bitmap)
+{
+ ext2fs_ba_private bp;
+ errcode_t retval;
+ size_t size;
+
+ /*
+ * Since we only have the one pointer, we could just shove our
+ * private data in the void *private field itself, but then
+ * we'd have to do a fair bit of rewriting if we ever added a
+ * field. I'm agnostic.
+ */
+ retval = ext2fs_get_mem(sizeof (ext2fs_ba_private), &bp);
+ if (retval)
+ return retval;
+
+ size = (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1);
+
+ retval = ext2fs_get_mem(size, &bp->bitarray);
+ if (retval) {
+ ext2fs_free_mem(&bp);
+ bp = 0;
+ return retval;
+ }
+ bitmap->private = (void *) bp;
+ return 0;
+}
+
+static errcode_t ba_new_bmap(ext2_filsys fs EXT2FS_ATTR((unused)),
+ ext2fs_generic_bitmap_64 bitmap)
+{
+ ext2fs_ba_private bp;
+ errcode_t retval;
+ size_t size;
+
+ retval = ba_alloc_private_data (bitmap);
+ if (retval)
+ return retval;
+
+ bp = (ext2fs_ba_private) bitmap->private;
+ size = (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1);
+ memset(bp->bitarray, 0, size);
+
+ return 0;
+}
+
+static void ba_free_bmap(ext2fs_generic_bitmap_64 bitmap)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+
+ if (!bp)
+ return;
+
+ if (bp->bitarray) {
+ ext2fs_free_mem (&bp->bitarray);
+ bp->bitarray = 0;
+ }
+ ext2fs_free_mem (&bp);
+ bp = 0;
+}
+
+static errcode_t ba_copy_bmap(ext2fs_generic_bitmap_64 src,
+ ext2fs_generic_bitmap_64 dest)
+{
+ ext2fs_ba_private src_bp = (ext2fs_ba_private) src->private;
+ ext2fs_ba_private dest_bp;
+ errcode_t retval;
+ size_t size;
+
+ retval = ba_alloc_private_data (dest);
+ if (retval)
+ return retval;
+
+ dest_bp = (ext2fs_ba_private) dest->private;
+
+ size = (size_t) (((src->real_end - src->start) / 8) + 1);
+ memcpy (dest_bp->bitarray, src_bp->bitarray, size);
+
+ return 0;
+}
+
+static errcode_t ba_resize_bmap(ext2fs_generic_bitmap_64 bmap,
+ __u64 new_end, __u64 new_real_end)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bmap->private;
+ errcode_t retval;
+ size_t size, new_size;
+ __u64 bitno;
+
+ /*
+ * If we're expanding the bitmap, make sure all of the new
+ * parts of the bitmap are zero.
+ */
+ if (new_end > bmap->end) {
+ bitno = bmap->real_end;
+ if (bitno > new_end)
+ bitno = new_end;
+ for (; bitno > bmap->end; bitno--)
+ ext2fs_clear_bit64(bitno - bmap->start, bp->bitarray);
+ }
+ if (new_real_end == bmap->real_end) {
+ bmap->end = new_end;
+ return 0;
+ }
+
+ size = ((bmap->real_end - bmap->start) / 8) + 1;
+ new_size = ((new_real_end - bmap->start) / 8) + 1;
+
+ if (size != new_size) {
+ retval = ext2fs_resize_mem(size, new_size, &bp->bitarray);
+ if (retval)
+ return retval;
+ }
+ if (new_size > size)
+ memset(bp->bitarray + size, 0, new_size - size);
+
+ bmap->end = new_end;
+ bmap->real_end = new_real_end;
+ return 0;
+
+}
+
+static int ba_mark_bmap(ext2fs_generic_bitmap_64 bitmap, __u64 arg)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+ blk64_t bitno = (blk64_t) arg;
+
+ return ext2fs_set_bit64(bitno - bitmap->start, bp->bitarray);
+}
+
+static int ba_unmark_bmap(ext2fs_generic_bitmap_64 bitmap, __u64 arg)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+ blk64_t bitno = (blk64_t) arg;
+
+ return ext2fs_clear_bit64(bitno - bitmap->start, bp->bitarray);
+}
+
+static int ba_test_bmap(ext2fs_generic_bitmap_64 bitmap, __u64 arg)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+ blk64_t bitno = (blk64_t) arg;
+
+ return ext2fs_test_bit64(bitno - bitmap->start, bp->bitarray);
+}
+
+static void ba_mark_bmap_extent(ext2fs_generic_bitmap_64 bitmap, __u64 arg,
+ unsigned int num)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+ blk64_t bitno = (blk64_t) arg;
+ unsigned int i;
+
+ for (i = 0; i < num; i++)
+ ext2fs_fast_set_bit64(bitno + i - bitmap->start, bp->bitarray);
+}
+
+static void ba_unmark_bmap_extent(ext2fs_generic_bitmap_64 bitmap, __u64 arg,
+ unsigned int num)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+ blk64_t bitno = (blk64_t) arg;
+ unsigned int i;
+
+ for (i = 0; i < num; i++)
+ ext2fs_fast_clear_bit64(bitno + i - bitmap->start, bp->bitarray);
+}
+
+static int ba_test_clear_bmap_extent(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, unsigned int len)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+ __u64 start_byte, len_byte = len >> 3;
+ unsigned int start_bit, len_bit = len % 8;
+ unsigned int first_bit = 0;
+ unsigned int last_bit = 0;
+ int mark_count = 0;
+ int mark_bit = 0;
+ int i;
+ const char *ADDR;
+
+ ADDR = bp->bitarray;
+ start -= bitmap->start;
+ start_byte = start >> 3;
+ start_bit = start % 8;
+
+ if (start_bit != 0) {
+ /*
+ * The compared start block number or start inode number
+ * is not the first bit in a byte.
+ */
+ mark_count = 8 - start_bit;
+ if (len < 8 - start_bit) {
+ mark_count = (int)len;
+ mark_bit = len + start_bit - 1;
+ } else
+ mark_bit = 7;
+
+ for (i = mark_count; i > 0; i--, mark_bit--)
+ first_bit |= 1 << mark_bit;
+
+ /*
+ * Compare blocks or inodes in the first byte.
+ * If there is any marked bit, this function returns 0.
+ */
+ if (first_bit & ADDR[start_byte])
+ return 0;
+ else if (len <= 8 - start_bit)
+ return 1;
+
+ start_byte++;
+ len_bit = (len - mark_count) % 8;
+ len_byte = (len - mark_count) >> 3;
+ }
+
+ /*
+ * The compared start block number or start inode number is
+ * the first bit in a byte.
+ */
+ if (len_bit != 0) {
+ /*
+ * The compared end block number or end inode number is
+ * not the last bit in a byte.
+ */
+ for (mark_bit = len_bit - 1; mark_bit >= 0; mark_bit--)
+ last_bit |= 1 << mark_bit;
+
+ /*
+ * Compare blocks or inodes in the last byte.
+ * If there is any marked bit, this function returns 0.
+ */
+ if (last_bit & ADDR[start_byte + len_byte])
+ return 0;
+ else if (len_byte == 0)
+ return 1;
+ }
+
+ /* Check whether all bytes are 0 */
+ return ext2fs_mem_is_zero(ADDR + start_byte, len_byte);
+}
+
+
+static errcode_t ba_set_bmap_range(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, size_t num, void *in)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+
+ memcpy (bp->bitarray + (start >> 3), in, (num + 7) >> 3);
+
+ return 0;
+}
+
+static errcode_t ba_get_bmap_range(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, size_t num, void *out)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+
+ memcpy (out, bp->bitarray + (start >> 3), (num + 7) >> 3);
+
+ return 0;
+}
+
+static void ba_clear_bmap(ext2fs_generic_bitmap_64 bitmap)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+
+ memset(bp->bitarray, 0,
+ (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
+}
+
+#ifdef ENABLE_BMAP_STATS
+static void ba_print_stats(ext2fs_generic_bitmap_64 bitmap)
+{
+ fprintf(stderr, "%16llu Bytes used by bitarray\n", (unsigned long long)
+ ((bitmap->real_end - bitmap->start) >> 3) + 1 +
+ sizeof(struct ext2fs_ba_private_struct));
+}
+#else
+static void ba_print_stats(ext2fs_generic_bitmap_64 bitmap EXT2FS_ATTR((unused)))
+{
+}
+#endif
+
+/* Find the first zero bit between start and end, inclusive. */
+static errcode_t ba_find_first_zero(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, __u64 end, __u64 *out)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private)bitmap->private;
+ unsigned long bitpos = start - bitmap->start;
+ unsigned long count = end - start + 1;
+ int byte_found = 0; /* whether a != 0xff byte has been found */
+ const unsigned char *pos;
+ unsigned long max_loop_count, i;
+
+ /* scan bits until we hit a byte boundary */
+ while ((bitpos & 0x7) != 0 && count > 0) {
+ if (!ext2fs_test_bit64(bitpos, bp->bitarray)) {
+ *out = bitpos + bitmap->start;
+ return 0;
+ }
+ bitpos++;
+ count--;
+ }
+
+ if (!count)
+ return ENOENT;
+
+ pos = ((unsigned char *)bp->bitarray) + (bitpos >> 3);
+ /* scan bytes until 8-byte (64-bit) aligned */
+ while (count >= 8 && (((uintptr_t)pos) & 0x07)) {
+ if (*pos != 0xff) {
+ byte_found = 1;
+ break;
+ }
+ pos++;
+ count -= 8;
+ bitpos += 8;
+ }
+
+ if (!byte_found) {
+ max_loop_count = count >> 6; /* 8-byte blocks */
+ i = max_loop_count;
+ while (i) {
+ if (*((const __u64 *)pos) != ((__u64)-1))
+ break;
+ pos += 8;
+ i--;
+ }
+ count -= 64 * (max_loop_count - i);
+ bitpos += 64 * (max_loop_count - i);
+
+ max_loop_count = count >> 3;
+ i = max_loop_count;
+ while (i) {
+ if (*pos != 0xff) {
+ byte_found = 1;
+ break;
+ }
+ pos++;
+ i--;
+ }
+ count -= 8 * (max_loop_count - i);
+ bitpos += 8 * (max_loop_count - i);
+ }
+
+ /* Here either count < 8 or byte_found == 1. */
+ while (count-- > 0) {
+ if (!ext2fs_test_bit64(bitpos, bp->bitarray)) {
+ *out = bitpos + bitmap->start;
+ return 0;
+ }
+ bitpos++;
+ }
+
+ return ENOENT;
+}
+
+/* Find the first one bit between start and end, inclusive. */
+static errcode_t ba_find_first_set(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, __u64 end, __u64 *out)
+{
+ ext2fs_ba_private bp = (ext2fs_ba_private)bitmap->private;
+ unsigned long bitpos = start - bitmap->start;
+ unsigned long count = end - start + 1;
+ int byte_found = 0; /* whether a != 0xff byte has been found */
+ const unsigned char *pos;
+ unsigned long max_loop_count, i;
+
+ /* scan bits until we hit a byte boundary */
+ while ((bitpos & 0x7) != 0 && count > 0) {
+ if (ext2fs_test_bit64(bitpos, bp->bitarray)) {
+ *out = bitpos + bitmap->start;
+ return 0;
+ }
+ bitpos++;
+ count--;
+ }
+
+ if (!count)
+ return ENOENT;
+
+ pos = ((unsigned char *)bp->bitarray) + (bitpos >> 3);
+ /* scan bytes until 8-byte (64-bit) aligned */
+ while (count >= 8 && (((uintptr_t)pos) & 0x07)) {
+ if (*pos != 0) {
+ byte_found = 1;
+ break;
+ }
+ pos++;
+ count -= 8;
+ bitpos += 8;
+ }
+
+ if (!byte_found) {
+ max_loop_count = count >> 6; /* 8-byte blocks */
+ i = max_loop_count;
+ while (i) {
+ if (*((const __u64 *)pos) != 0)
+ break;
+ pos += 8;
+ i--;
+ }
+ count -= 64 * (max_loop_count - i);
+ bitpos += 64 * (max_loop_count - i);
+
+ max_loop_count = count >> 3;
+ i = max_loop_count;
+ while (i) {
+ if (*pos != 0) {
+ byte_found = 1;
+ break;
+ }
+ pos++;
+ i--;
+ }
+ count -= 8 * (max_loop_count - i);
+ bitpos += 8 * (max_loop_count - i);
+ }
+
+ /* Here either count < 8 or byte_found == 1. */
+ while (count-- > 0) {
+ if (ext2fs_test_bit64(bitpos, bp->bitarray)) {
+ *out = bitpos + bitmap->start;
+ return 0;
+ }
+ bitpos++;
+ }
+
+ return ENOENT;
+}
+
+struct ext2_bitmap_ops ext2fs_blkmap64_bitarray = {
+ .type = EXT2FS_BMAP64_BITARRAY,
+ .new_bmap = ba_new_bmap,
+ .free_bmap = ba_free_bmap,
+ .copy_bmap = ba_copy_bmap,
+ .resize_bmap = ba_resize_bmap,
+ .mark_bmap = ba_mark_bmap,
+ .unmark_bmap = ba_unmark_bmap,
+ .test_bmap = ba_test_bmap,
+ .test_clear_bmap_extent = ba_test_clear_bmap_extent,
+ .mark_bmap_extent = ba_mark_bmap_extent,
+ .unmark_bmap_extent = ba_unmark_bmap_extent,
+ .set_bmap_range = ba_set_bmap_range,
+ .get_bmap_range = ba_get_bmap_range,
+ .clear_bmap = ba_clear_bmap,
+ .print_stats = ba_print_stats,
+ .find_first_zero = ba_find_first_zero,
+ .find_first_set = ba_find_first_set
+};
diff --git a/lib/ext2fs/blkmap64_rb.c b/lib/ext2fs/blkmap64_rb.c
new file mode 100644
index 0000000..0df58dc
--- /dev/null
+++ b/lib/ext2fs/blkmap64_rb.c
@@ -0,0 +1,998 @@
+/*
+ * blkmap64_rb.c --- Simple rb-tree implementation for bitmaps
+ *
+ * (C)2010 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+#include "bmap64.h"
+#include "rbtree.h"
+
+#include <limits.h>
+
+struct bmap_rb_extent {
+ struct rb_node node;
+ __u64 start;
+ __u64 count;
+};
+
+struct ext2fs_rb_private {
+ struct rb_root root;
+ struct bmap_rb_extent *wcursor;
+ struct bmap_rb_extent *rcursor;
+ struct bmap_rb_extent *rcursor_next;
+#ifdef ENABLE_BMAP_STATS_OPS
+ __u64 mark_hit;
+ __u64 test_hit;
+#endif
+};
+
+inline static struct bmap_rb_extent *node_to_extent(struct rb_node *node)
+{
+ /*
+ * This depends on the fact the struct rb_node is at the
+ * beginning of the bmap_rb_extent structure. We use this
+ * instead of the ext2fs_rb_entry macro because it causes gcc
+ * -Wall to generate a huge amount of noise.
+ */
+ return (struct bmap_rb_extent *) node;
+}
+
+static int rb_insert_extent(__u64 start, __u64 count,
+ struct ext2fs_rb_private *);
+static void rb_get_new_extent(struct bmap_rb_extent **, __u64, __u64);
+
+/* #define DEBUG_RB */
+
+#ifdef DEBUG_RB
+static void print_tree(struct rb_root *root)
+{
+ struct rb_node *node = NULL;
+ struct bmap_rb_extent *ext;
+
+ fprintf(stderr, "\t\t\t=================================\n");
+ node = ext2fs_rb_first(root);
+ for (node = ext2fs_rb_first(root); node != NULL;
+ node = ext2fs_rb_next(node)) {
+ ext = node_to_extent(node);
+ fprintf(stderr, "\t\t\t--> (%llu -> %llu)\n",
+ (unsigned long long) ext->start,
+ (unsigned long long) ext->start + ext->count);
+ }
+ fprintf(stderr, "\t\t\t=================================\n");
+}
+
+static void check_tree(struct rb_root *root, const char *msg)
+{
+ struct rb_node *node;
+ struct bmap_rb_extent *ext, *old = NULL;
+
+ for (node = ext2fs_rb_first(root); node;
+ node = ext2fs_rb_next(node)) {
+ ext = node_to_extent(node);
+ if (ext->count == 0) {
+ fprintf(stderr, "Tree Error: count is zero\n");
+ fprintf(stderr, "extent: %llu -> %llu (%llu)\n",
+ (unsigned long long) ext->start,
+ (unsigned long long) ext->start + ext->count,
+ (unsigned long long) ext->count);
+ goto err_out;
+ }
+ if (ext->start + ext->count < ext->start) {
+ fprintf(stderr,
+ "Tree Error: start or count is crazy\n");
+ fprintf(stderr, "extent: %llu -> %llu (%llu)\n",
+ (unsigned long long) ext->start,
+ (unsigned long long) ext->start + ext->count,
+ (unsigned long long) ext->count);
+ goto err_out;
+ }
+
+ if (old) {
+ if (old->start > ext->start) {
+ fprintf(stderr, "Tree Error: start is crazy\n");
+ fprintf(stderr, "extent: %llu -> %llu (%llu)\n",
+ (unsigned long long) old->start,
+ (unsigned long long) old->start + old->count,
+ (unsigned long long) old->count);
+ fprintf(stderr,
+ "extent next: %llu -> %llu (%llu)\n",
+ (unsigned long long) ext->start,
+ (unsigned long long) ext->start + ext->count,
+ (unsigned long long) ext->count);
+ goto err_out;
+ }
+ if ((old->start + old->count) >= ext->start) {
+ fprintf(stderr,
+ "Tree Error: extent is crazy\n");
+ fprintf(stderr, "extent: %llu -> %llu (%llu)\n",
+ (unsigned long long) old->start,
+ (unsigned long long) old->start + old->count,
+ (unsigned long long) old->count);
+ fprintf(stderr,
+ "extent next: %llu -> %llu (%llu)\n",
+ (unsigned long long) ext->start,
+ (unsigned long long) ext->start + ext->count,
+ (unsigned long long) ext->count);
+ goto err_out;
+ }
+ }
+ old = ext;
+ }
+ return;
+
+err_out:
+ fprintf(stderr, "%s\n", msg);
+ print_tree(root);
+ exit(1);
+}
+#else
+#define check_tree(root, msg) do {} while (0)
+#define print_tree(root) do {} while (0)
+#endif
+
+static void rb_get_new_extent(struct bmap_rb_extent **ext, __u64 start,
+ __u64 count)
+{
+ struct bmap_rb_extent *new_ext;
+ int retval;
+
+ retval = ext2fs_get_mem(sizeof (struct bmap_rb_extent),
+ &new_ext);
+ if (retval)
+ abort();
+
+ new_ext->start = start;
+ new_ext->count = count;
+ *ext = new_ext;
+}
+
+inline
+static void rb_free_extent(struct ext2fs_rb_private *bp,
+ struct bmap_rb_extent *ext)
+{
+ if (bp->wcursor == ext)
+ bp->wcursor = NULL;
+ if (bp->rcursor == ext)
+ bp->rcursor = NULL;
+ if (bp->rcursor_next == ext)
+ bp->rcursor_next = NULL;
+ ext2fs_free_mem(&ext);
+}
+
+static errcode_t rb_alloc_private_data (ext2fs_generic_bitmap_64 bitmap)
+{
+ struct ext2fs_rb_private *bp;
+ errcode_t retval;
+
+ retval = ext2fs_get_mem(sizeof (struct ext2fs_rb_private), &bp);
+ if (retval)
+ return retval;
+
+ bp->root = RB_ROOT;
+ bp->rcursor = NULL;
+ bp->rcursor_next = NULL;
+ bp->wcursor = NULL;
+
+#ifdef ENABLE_BMAP_STATS_OPS
+ bp->test_hit = 0;
+ bp->mark_hit = 0;
+#endif
+
+ bitmap->private = (void *) bp;
+ return 0;
+}
+
+static errcode_t rb_new_bmap(ext2_filsys fs EXT2FS_ATTR((unused)),
+ ext2fs_generic_bitmap_64 bitmap)
+{
+ errcode_t retval;
+
+ retval = rb_alloc_private_data (bitmap);
+ if (retval)
+ return retval;
+
+ return 0;
+}
+
+static void rb_free_tree(struct rb_root *root)
+{
+ struct bmap_rb_extent *ext;
+ struct rb_node *node, *next;
+
+ for (node = ext2fs_rb_first(root); node; node = next) {
+ next = ext2fs_rb_next(node);
+ ext = node_to_extent(node);
+ ext2fs_rb_erase(node, root);
+ ext2fs_free_mem(&ext);
+ }
+}
+
+static void rb_free_bmap(ext2fs_generic_bitmap_64 bitmap)
+{
+ struct ext2fs_rb_private *bp;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+
+ rb_free_tree(&bp->root);
+ ext2fs_free_mem(&bp);
+ bp = 0;
+}
+
+static errcode_t rb_copy_bmap(ext2fs_generic_bitmap_64 src,
+ ext2fs_generic_bitmap_64 dest)
+{
+ struct ext2fs_rb_private *src_bp, *dest_bp;
+ struct bmap_rb_extent *src_ext, *dest_ext;
+ struct rb_node *dest_node, *src_node, *dest_last, **n;
+ errcode_t retval = 0;
+
+ retval = rb_alloc_private_data (dest);
+ if (retval)
+ return retval;
+
+ src_bp = (struct ext2fs_rb_private *) src->private;
+ dest_bp = (struct ext2fs_rb_private *) dest->private;
+ src_bp->rcursor = NULL;
+ dest_bp->rcursor = NULL;
+
+ src_node = ext2fs_rb_first(&src_bp->root);
+ while (src_node) {
+ src_ext = node_to_extent(src_node);
+ retval = ext2fs_get_mem(sizeof (struct bmap_rb_extent),
+ &dest_ext);
+ if (retval)
+ break;
+
+ memcpy(dest_ext, src_ext, sizeof(struct bmap_rb_extent));
+
+ dest_node = &dest_ext->node;
+ n = &dest_bp->root.rb_node;
+
+ dest_last = NULL;
+ if (*n) {
+ dest_last = ext2fs_rb_last(&dest_bp->root);
+ n = &(dest_last)->rb_right;
+ }
+
+ ext2fs_rb_link_node(dest_node, dest_last, n);
+ ext2fs_rb_insert_color(dest_node, &dest_bp->root);
+
+ src_node = ext2fs_rb_next(src_node);
+ }
+
+ return retval;
+}
+
+static void rb_truncate(__u64 new_max, struct rb_root *root)
+{
+ struct bmap_rb_extent *ext;
+ struct rb_node *node;
+
+ node = ext2fs_rb_last(root);
+ while (node) {
+ ext = node_to_extent(node);
+
+ if ((ext->start + ext->count - 1) <= new_max)
+ break;
+ else if (ext->start > new_max) {
+ ext2fs_rb_erase(node, root);
+ ext2fs_free_mem(&ext);
+ node = ext2fs_rb_last(root);
+ continue;
+ } else
+ ext->count = new_max - ext->start + 1;
+ }
+}
+
+static errcode_t rb_resize_bmap(ext2fs_generic_bitmap_64 bmap,
+ __u64 new_end, __u64 new_real_end)
+{
+ struct ext2fs_rb_private *bp;
+
+ bp = (struct ext2fs_rb_private *) bmap->private;
+ bp->rcursor = NULL;
+ bp->wcursor = NULL;
+
+ rb_truncate(((new_end < bmap->end) ? new_end : bmap->end) - bmap->start,
+ &bp->root);
+
+ bmap->end = new_end;
+ bmap->real_end = new_real_end;
+
+ if (bmap->end < bmap->real_end)
+ rb_insert_extent(bmap->end + 1 - bmap->start,
+ bmap->real_end - bmap->end, bp);
+ return 0;
+
+}
+
+inline static int
+rb_test_bit(struct ext2fs_rb_private *bp, __u64 bit)
+{
+ struct bmap_rb_extent *rcursor, *next_ext = NULL;
+ struct rb_node *parent = NULL, *next;
+ struct rb_node **n = &bp->root.rb_node;
+ struct bmap_rb_extent *ext;
+
+ rcursor = bp->rcursor;
+ if (!rcursor)
+ goto search_tree;
+
+ if (bit >= rcursor->start && bit < rcursor->start + rcursor->count) {
+#ifdef ENABLE_BMAP_STATS_OPS
+ bp->test_hit++;
+#endif
+ return 1;
+ }
+
+ next_ext = bp->rcursor_next;
+ if (!next_ext) {
+ next = ext2fs_rb_next(&rcursor->node);
+ if (next)
+ next_ext = node_to_extent(next);
+ bp->rcursor_next = next_ext;
+ }
+ if (next_ext) {
+ if ((bit >= rcursor->start + rcursor->count) &&
+ (bit < next_ext->start)) {
+#ifdef BMAP_STATS_OPS
+ bp->test_hit++;
+#endif
+ return 0;
+ }
+ }
+ bp->rcursor = NULL;
+ bp->rcursor_next = NULL;
+
+ rcursor = bp->wcursor;
+ if (!rcursor)
+ goto search_tree;
+
+ if (bit >= rcursor->start && bit < rcursor->start + rcursor->count)
+ return 1;
+
+search_tree:
+
+ while (*n) {
+ parent = *n;
+ ext = node_to_extent(parent);
+ if (bit < ext->start)
+ n = &(*n)->rb_left;
+ else if (bit >= (ext->start + ext->count))
+ n = &(*n)->rb_right;
+ else {
+ bp->rcursor = ext;
+ bp->rcursor_next = NULL;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int rb_insert_extent(__u64 start, __u64 count,
+ struct ext2fs_rb_private *bp)
+{
+ struct rb_root *root = &bp->root;
+ struct rb_node *parent = NULL, **n = &root->rb_node;
+ struct rb_node *new_node, *node, *next;
+ struct bmap_rb_extent *new_ext;
+ struct bmap_rb_extent *ext;
+ int retval = 0;
+
+ if (count == 0)
+ return 0;
+
+ bp->rcursor_next = NULL;
+ ext = bp->wcursor;
+ if (ext) {
+ if (start >= ext->start &&
+ start <= (ext->start + ext->count)) {
+#ifdef ENABLE_BMAP_STATS_OPS
+ bp->mark_hit++;
+#endif
+ goto got_extent;
+ }
+ }
+
+ while (*n) {
+ parent = *n;
+ ext = node_to_extent(parent);
+
+ if (start < ext->start) {
+ n = &(*n)->rb_left;
+ } else if (start > (ext->start + ext->count)) {
+ n = &(*n)->rb_right;
+ } else {
+got_extent:
+ if ((start + count) <= (ext->start + ext->count))
+ return 1;
+
+ if ((ext->start + ext->count) == start)
+ retval = 0;
+ else
+ retval = 1;
+
+ count += (start - ext->start);
+ start = ext->start;
+ new_ext = ext;
+ new_node = &ext->node;
+
+ goto skip_insert;
+ }
+ }
+
+ rb_get_new_extent(&new_ext, start, count);
+
+ new_node = &new_ext->node;
+ ext2fs_rb_link_node(new_node, parent, n);
+ ext2fs_rb_insert_color(new_node, root);
+ bp->wcursor = new_ext;
+
+ node = ext2fs_rb_prev(new_node);
+ if (node) {
+ ext = node_to_extent(node);
+ if ((ext->start + ext->count) == start) {
+ start = ext->start;
+ count += ext->count;
+ ext2fs_rb_erase(node, root);
+ rb_free_extent(bp, ext);
+ }
+ }
+
+skip_insert:
+ /* See if we can merge extent to the right */
+ for (node = ext2fs_rb_next(new_node); node != NULL; node = next) {
+ next = ext2fs_rb_next(node);
+ ext = node_to_extent(node);
+
+ if ((ext->start + ext->count) <= start)
+ continue;
+
+ /* No more merging */
+ if ((start + count) < ext->start)
+ break;
+
+ /* ext is embedded in new_ext interval */
+ if ((start + count) >= (ext->start + ext->count)) {
+ ext2fs_rb_erase(node, root);
+ rb_free_extent(bp, ext);
+ continue;
+ } else {
+ /* merge ext with new_ext */
+ count += ((ext->start + ext->count) -
+ (start + count));
+ ext2fs_rb_erase(node, root);
+ rb_free_extent(bp, ext);
+ break;
+ }
+ }
+
+ new_ext->start = start;
+ new_ext->count = count;
+
+ return retval;
+}
+
+static int rb_remove_extent(__u64 start, __u64 count,
+ struct ext2fs_rb_private *bp)
+{
+ struct rb_root *root = &bp->root;
+ struct rb_node *parent = NULL, **n = &root->rb_node;
+ struct rb_node *node;
+ struct bmap_rb_extent *ext;
+ __u64 new_start, new_count;
+ int retval = 0;
+
+ if (ext2fs_rb_empty_root(root))
+ return 0;
+
+ while (*n) {
+ parent = *n;
+ ext = node_to_extent(parent);
+ if (start < ext->start) {
+ n = &(*n)->rb_left;
+ continue;
+ } else if (start >= (ext->start + ext->count)) {
+ n = &(*n)->rb_right;
+ continue;
+ }
+
+ if ((start > ext->start) &&
+ (start + count) < (ext->start + ext->count)) {
+ /* We have to split extent into two */
+ new_start = start + count;
+ new_count = (ext->start + ext->count) - new_start;
+
+ ext->count = start - ext->start;
+
+ rb_insert_extent(new_start, new_count, bp);
+ return 1;
+ }
+
+ if ((start + count) >= (ext->start + ext->count)) {
+ ext->count = start - ext->start;
+ retval = 1;
+ }
+
+ if (0 == ext->count) {
+ parent = ext2fs_rb_next(&ext->node);
+ ext2fs_rb_erase(&ext->node, root);
+ rb_free_extent(bp, ext);
+ break;
+ }
+
+ if (start == ext->start) {
+ ext->start += count;
+ ext->count -= count;
+ return 1;
+ }
+ }
+
+ /* See if we should delete or truncate extent on the right */
+ for (; parent != NULL; parent = node) {
+ node = ext2fs_rb_next(parent);
+ ext = node_to_extent(parent);
+ if ((ext->start + ext->count) <= start)
+ continue;
+
+ /* No more extents to be removed/truncated */
+ if ((start + count) < ext->start)
+ break;
+
+ /* The entire extent is within the region to be removed */
+ if ((start + count) >= (ext->start + ext->count)) {
+ ext2fs_rb_erase(parent, root);
+ rb_free_extent(bp, ext);
+ retval = 1;
+ continue;
+ } else {
+ /* modify the last extent in region to be removed */
+ ext->count -= ((start + count) - ext->start);
+ ext->start = start + count;
+ retval = 1;
+ break;
+ }
+ }
+
+ return retval;
+}
+
+static int rb_mark_bmap(ext2fs_generic_bitmap_64 bitmap, __u64 arg)
+{
+ struct ext2fs_rb_private *bp;
+ int retval;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ arg -= bitmap->start;
+
+ retval = rb_insert_extent(arg, 1, bp);
+ check_tree(&bp->root, __func__);
+ return retval;
+}
+
+static int rb_unmark_bmap(ext2fs_generic_bitmap_64 bitmap, __u64 arg)
+{
+ struct ext2fs_rb_private *bp;
+ int retval;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ arg -= bitmap->start;
+
+ retval = rb_remove_extent(arg, 1, bp);
+ check_tree(&bp->root, __func__);
+
+ return retval;
+}
+
+inline
+static int rb_test_bmap(ext2fs_generic_bitmap_64 bitmap, __u64 arg)
+{
+ struct ext2fs_rb_private *bp;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ arg -= bitmap->start;
+
+ return rb_test_bit(bp, arg);
+}
+
+static void rb_mark_bmap_extent(ext2fs_generic_bitmap_64 bitmap, __u64 arg,
+ unsigned int num)
+{
+ struct ext2fs_rb_private *bp;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ arg -= bitmap->start;
+
+ rb_insert_extent(arg, num, bp);
+ check_tree(&bp->root, __func__);
+}
+
+static void rb_unmark_bmap_extent(ext2fs_generic_bitmap_64 bitmap, __u64 arg,
+ unsigned int num)
+{
+ struct ext2fs_rb_private *bp;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ arg -= bitmap->start;
+
+ rb_remove_extent(arg, num, bp);
+ check_tree(&bp->root, __func__);
+}
+
+static int rb_test_clear_bmap_extent(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, unsigned int len)
+{
+ struct rb_node *parent = NULL, **n;
+ struct rb_node *node, *next;
+ struct ext2fs_rb_private *bp;
+ struct bmap_rb_extent *ext;
+ int retval = 1;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ n = &bp->root.rb_node;
+ start -= bitmap->start;
+
+ if (len == 0 || ext2fs_rb_empty_root(&bp->root))
+ return 1;
+
+ /*
+ * If we find nothing, we should examine whole extent, but
+ * when we find match, the extent is not clean, thus be return
+ * false.
+ */
+ while (*n) {
+ parent = *n;
+ ext = node_to_extent(parent);
+ if (start < ext->start) {
+ n = &(*n)->rb_left;
+ } else if (start >= (ext->start + ext->count)) {
+ n = &(*n)->rb_right;
+ } else {
+ /*
+ * We found extent int the tree -> extent is not
+ * clean
+ */
+ return 0;
+ }
+ }
+
+ node = parent;
+ while (node) {
+ next = ext2fs_rb_next(node);
+ ext = node_to_extent(node);
+ node = next;
+
+ if ((ext->start + ext->count) <= start)
+ continue;
+
+ /* No more merging */
+ if ((start + len) <= ext->start)
+ break;
+
+ retval = 0;
+ break;
+ }
+ return retval;
+}
+
+static errcode_t rb_set_bmap_range(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, size_t num, void *in)
+{
+ struct ext2fs_rb_private *bp;
+ unsigned char *cp = in;
+ size_t i;
+ int first_set = -1;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+
+ for (i = 0; i < num; i++) {
+ if ((i & 7) == 0) {
+ unsigned char c = cp[i/8];
+ if (c == 0xFF) {
+ if (first_set == -1)
+ first_set = i;
+ i += 7;
+ continue;
+ }
+ if ((c == 0x00) && (first_set == -1)) {
+ i += 7;
+ continue;
+ }
+ }
+ if (ext2fs_test_bit(i, in)) {
+ if (first_set == -1)
+ first_set = i;
+ continue;
+ }
+ if (first_set == -1)
+ continue;
+
+ rb_insert_extent(start + first_set - bitmap->start,
+ i - first_set, bp);
+ check_tree(&bp->root, __func__);
+ first_set = -1;
+ }
+ if (first_set != -1) {
+ rb_insert_extent(start + first_set - bitmap->start,
+ num - first_set, bp);
+ check_tree(&bp->root, __func__);
+ }
+
+ return 0;
+}
+
+static errcode_t rb_get_bmap_range(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, size_t num, void *out)
+{
+
+ struct rb_node *parent = NULL, *next, **n;
+ struct ext2fs_rb_private *bp;
+ struct bmap_rb_extent *ext;
+ __u64 count, pos;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ n = &bp->root.rb_node;
+ start -= bitmap->start;
+
+ if (ext2fs_rb_empty_root(&bp->root))
+ return 0;
+
+ while (*n) {
+ parent = *n;
+ ext = node_to_extent(parent);
+ if (start < ext->start) {
+ n = &(*n)->rb_left;
+ } else if (start >= (ext->start + ext->count)) {
+ n = &(*n)->rb_right;
+ } else
+ break;
+ }
+
+ memset(out, 0, (num + 7) >> 3);
+
+ for (; parent != NULL; parent = next) {
+ next = ext2fs_rb_next(parent);
+ ext = node_to_extent(parent);
+
+ pos = ext->start;
+ count = ext->count;
+ if (pos >= start + num)
+ break;
+ if (pos < start) {
+ if (pos + count < start)
+ continue;
+ count -= start - pos;
+ pos = start;
+ }
+ if (pos + count > start + num)
+ count = start + num - pos;
+
+ while (count > 0) {
+ if ((count >= 8) &&
+ ((pos - start) % 8) == 0) {
+ int nbytes = count >> 3;
+ int offset = (pos - start) >> 3;
+
+ memset(((char *) out) + offset, 0xFF, nbytes);
+ pos += nbytes << 3;
+ count -= nbytes << 3;
+ continue;
+ }
+ ext2fs_fast_set_bit64((pos - start), out);
+ pos++;
+ count--;
+ }
+ }
+ return 0;
+}
+
+static void rb_clear_bmap(ext2fs_generic_bitmap_64 bitmap)
+{
+ struct ext2fs_rb_private *bp;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+
+ rb_free_tree(&bp->root);
+ bp->rcursor = NULL;
+ bp->rcursor_next = NULL;
+ bp->wcursor = NULL;
+ check_tree(&bp->root, __func__);
+}
+
+static errcode_t rb_find_first_zero(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, __u64 end, __u64 *out)
+{
+ struct rb_node *parent = NULL, **n;
+ struct ext2fs_rb_private *bp;
+ struct bmap_rb_extent *ext;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ n = &bp->root.rb_node;
+ start -= bitmap->start;
+ end -= bitmap->start;
+
+ if (start > end)
+ return EINVAL;
+
+ if (ext2fs_rb_empty_root(&bp->root))
+ return ENOENT;
+
+ while (*n) {
+ parent = *n;
+ ext = node_to_extent(parent);
+ if (start < ext->start) {
+ n = &(*n)->rb_left;
+ } else if (start >= (ext->start + ext->count)) {
+ n = &(*n)->rb_right;
+ } else if (ext->start + ext->count <= end) {
+ *out = ext->start + ext->count + bitmap->start;
+ return 0;
+ } else
+ return ENOENT;
+ }
+
+ *out = start + bitmap->start;
+ return 0;
+}
+
+static errcode_t rb_find_first_set(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, __u64 end, __u64 *out)
+{
+ struct rb_node *parent = NULL, **n;
+ struct rb_node *node;
+ struct ext2fs_rb_private *bp;
+ struct bmap_rb_extent *ext;
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+ n = &bp->root.rb_node;
+ start -= bitmap->start;
+ end -= bitmap->start;
+
+ if (start > end)
+ return EINVAL;
+
+ if (ext2fs_rb_empty_root(&bp->root))
+ return ENOENT;
+
+ while (*n) {
+ parent = *n;
+ ext = node_to_extent(parent);
+ if (start < ext->start) {
+ n = &(*n)->rb_left;
+ } else if (start >= (ext->start + ext->count)) {
+ n = &(*n)->rb_right;
+ } else {
+ /* The start bit is set */
+ *out = start + bitmap->start;
+ return 0;
+ }
+ }
+
+ node = parent;
+ ext = node_to_extent(node);
+ if (ext->start < start) {
+ node = ext2fs_rb_next(node);
+ if (node == NULL)
+ return ENOENT;
+ ext = node_to_extent(node);
+ }
+ if (ext->start <= end) {
+ *out = ext->start + bitmap->start;
+ return 0;
+ }
+ return ENOENT;
+}
+
+#ifdef ENABLE_BMAP_STATS
+static void rb_print_stats(ext2fs_generic_bitmap_64 bitmap)
+{
+ struct ext2fs_rb_private *bp;
+ struct rb_node *node = NULL;
+ struct bmap_rb_extent *ext;
+ __u64 count = 0;
+ __u64 max_size = 0;
+ __u64 min_size = ULONG_MAX;
+ __u64 size = 0, avg_size = 0;
+ double eff;
+#ifdef ENABLE_BMAP_STATS_OPS
+ __u64 mark_all, test_all;
+ double m_hit = 0.0, t_hit = 0.0;
+#endif
+
+ bp = (struct ext2fs_rb_private *) bitmap->private;
+
+ for (node = ext2fs_rb_first(&bp->root); node != NULL;
+ node = ext2fs_rb_next(node)) {
+ ext = node_to_extent(node);
+ count++;
+ if (ext->count > max_size)
+ max_size = ext->count;
+ if (ext->count < min_size)
+ min_size = ext->count;
+ size += ext->count;
+ }
+
+ if (count)
+ avg_size = size / count;
+ if (min_size == ULONG_MAX)
+ min_size = 0;
+ eff = (double)((count * sizeof(struct bmap_rb_extent)) << 3) /
+ (bitmap->real_end - bitmap->start);
+#ifdef ENABLE_BMAP_STATS_OPS
+ mark_all = bitmap->stats.mark_count + bitmap->stats.mark_ext_count;
+ test_all = bitmap->stats.test_count + bitmap->stats.test_ext_count;
+ if (mark_all)
+ m_hit = ((double)bp->mark_hit / mark_all) * 100;
+ if (test_all)
+ t_hit = ((double)bp->test_hit / test_all) * 100;
+
+ fprintf(stderr, "%16llu cache hits on test (%.2f%%)\n"
+ "%16llu cache hits on mark (%.2f%%)\n",
+ bp->test_hit, t_hit, bp->mark_hit, m_hit);
+#endif
+ fprintf(stderr, "%16llu extents (%llu bytes)\n",
+ (unsigned long long) count, (unsigned long long)
+ ((count * sizeof(struct bmap_rb_extent)) +
+ sizeof(struct ext2fs_rb_private)));
+ fprintf(stderr, "%16llu bits minimum size\n",
+ (unsigned long long) min_size);
+ fprintf(stderr, "%16llu bits maximum size\n"
+ "%16llu bits average size\n",
+ (unsigned long long) max_size, (unsigned long long) avg_size);
+ fprintf(stderr, "%16llu bits set in bitmap (out of %llu)\n",
+ (unsigned long long) size,
+ (unsigned long long) bitmap->real_end - bitmap->start);
+ fprintf(stderr,
+ "%16.4lf memory / bitmap bit memory ratio (bitarray = 1)\n",
+ eff);
+}
+#else
+static void rb_print_stats(ext2fs_generic_bitmap_64 bitmap EXT2FS_ATTR((unused)))
+{
+}
+#endif
+
+struct ext2_bitmap_ops ext2fs_blkmap64_rbtree = {
+ .type = EXT2FS_BMAP64_RBTREE,
+ .new_bmap = rb_new_bmap,
+ .free_bmap = rb_free_bmap,
+ .copy_bmap = rb_copy_bmap,
+ .resize_bmap = rb_resize_bmap,
+ .mark_bmap = rb_mark_bmap,
+ .unmark_bmap = rb_unmark_bmap,
+ .test_bmap = rb_test_bmap,
+ .test_clear_bmap_extent = rb_test_clear_bmap_extent,
+ .mark_bmap_extent = rb_mark_bmap_extent,
+ .unmark_bmap_extent = rb_unmark_bmap_extent,
+ .set_bmap_range = rb_set_bmap_range,
+ .get_bmap_range = rb_get_bmap_range,
+ .clear_bmap = rb_clear_bmap,
+ .print_stats = rb_print_stats,
+ .find_first_zero = rb_find_first_zero,
+ .find_first_set = rb_find_first_set,
+};
diff --git a/lib/ext2fs/blknum.c b/lib/ext2fs/blknum.c
new file mode 100644
index 0000000..04839d8
--- /dev/null
+++ b/lib/ext2fs/blknum.c
@@ -0,0 +1,606 @@
+/*
+ * blknum.c --- Functions to handle blk64_t and high/low 64-bit block
+ * number.
+ *
+ * Copyright IBM Corporation, 2007
+ * Author Jose R. Santos <jrs@us.ibm.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "ext2fs.h"
+
+/*
+ * Return the group # of a block
+ */
+dgrp_t ext2fs_group_of_blk2(ext2_filsys fs, blk64_t blk)
+{
+ return (blk - fs->super->s_first_data_block) /
+ fs->super->s_blocks_per_group;
+}
+
+/*
+ * Return the first block (inclusive) in a group
+ */
+blk64_t ext2fs_group_first_block2(ext2_filsys fs, dgrp_t group)
+{
+ return fs->super->s_first_data_block +
+ EXT2_GROUPS_TO_BLOCKS(fs->super, group);
+}
+
+/*
+ * Return the last block (inclusive) in a group
+ */
+blk64_t ext2fs_group_last_block2(ext2_filsys fs, dgrp_t group)
+{
+ return (group == fs->group_desc_count - 1 ?
+ ext2fs_blocks_count(fs->super) - 1 :
+ ext2fs_group_first_block2(fs, group) +
+ (fs->super->s_blocks_per_group - 1));
+}
+
+/*
+ * Return the number of blocks in a group
+ */
+int ext2fs_group_blocks_count(ext2_filsys fs, dgrp_t group)
+{
+ int num_blocks;
+
+ if (group == fs->group_desc_count - 1) {
+ num_blocks = (ext2fs_blocks_count(fs->super) -
+ fs->super->s_first_data_block) %
+ fs->super->s_blocks_per_group;
+ if (!num_blocks)
+ num_blocks = fs->super->s_blocks_per_group;
+ } else
+ num_blocks = fs->super->s_blocks_per_group;
+
+ return num_blocks;
+}
+
+/*
+ * Return the inode data block count
+ */
+blk64_t ext2fs_inode_data_blocks2(ext2_filsys fs,
+ struct ext2_inode *inode)
+{
+ return (inode->i_blocks |
+ (ext2fs_has_feature_huge_file(fs->super) ?
+ (__u64) inode->osd2.linux2.l_i_blocks_hi << 32 : 0)) -
+ (inode->i_file_acl ? EXT2_CLUSTER_SIZE(fs->super) >> 9 : 0);
+}
+
+/*
+ * Return the inode i_blocks count
+ */
+blk64_t ext2fs_inode_i_blocks(ext2_filsys fs,
+ struct ext2_inode *inode)
+{
+ return (inode->i_blocks |
+ (ext2fs_has_feature_huge_file(fs->super) ?
+ (__u64)inode->osd2.linux2.l_i_blocks_hi << 32 : 0));
+}
+
+/*
+ * Return the inode i_blocks in stat (512 byte) units
+ */
+blk64_t ext2fs_get_stat_i_blocks(ext2_filsys fs,
+ struct ext2_inode *inode)
+{
+ blk64_t ret = inode->i_blocks;
+
+ if (ext2fs_has_feature_huge_file(fs->super)) {
+ ret += ((long long) inode->osd2.linux2.l_i_blocks_hi) << 32;
+ if (inode->i_flags & EXT4_HUGE_FILE_FL)
+ ret *= (fs->blocksize / 512);
+ }
+ return ret;
+}
+
+/*
+ * Return the fs block count
+ */
+blk64_t ext2fs_blocks_count(struct ext2_super_block *super)
+{
+ return super->s_blocks_count |
+ (ext2fs_has_feature_64bit(super) ?
+ (__u64) super->s_blocks_count_hi << 32 : 0);
+}
+
+/*
+ * Set the fs block count
+ */
+void ext2fs_blocks_count_set(struct ext2_super_block *super, blk64_t blk)
+{
+ super->s_blocks_count = blk;
+ if (ext2fs_has_feature_64bit(super))
+ super->s_blocks_count_hi = (__u64) blk >> 32;
+}
+
+/*
+ * Add to the current fs block count
+ */
+void ext2fs_blocks_count_add(struct ext2_super_block *super, blk64_t blk)
+{
+ blk64_t tmp;
+ tmp = ext2fs_blocks_count(super) + blk;
+ ext2fs_blocks_count_set(super, tmp);
+}
+
+/*
+ * Return the fs reserved block count
+ */
+blk64_t ext2fs_r_blocks_count(struct ext2_super_block *super)
+{
+ return super->s_r_blocks_count |
+ (ext2fs_has_feature_64bit(super) ?
+ (__u64) super->s_r_blocks_count_hi << 32 : 0);
+}
+
+/*
+ * Set the fs reserved block count
+ */
+void ext2fs_r_blocks_count_set(struct ext2_super_block *super, blk64_t blk)
+{
+ super->s_r_blocks_count = blk;
+ if (ext2fs_has_feature_64bit(super))
+ super->s_r_blocks_count_hi = (__u64) blk >> 32;
+}
+
+/*
+ * Add to the current reserved fs block count
+ */
+void ext2fs_r_blocks_count_add(struct ext2_super_block *super, blk64_t blk)
+{
+ blk64_t tmp;
+ tmp = ext2fs_r_blocks_count(super) + blk;
+ ext2fs_r_blocks_count_set(super, tmp);
+}
+
+/*
+ * Return the fs free block count
+ */
+blk64_t ext2fs_free_blocks_count(struct ext2_super_block *super)
+{
+ return super->s_free_blocks_count |
+ (ext2fs_has_feature_64bit(super) ?
+ (__u64) super->s_free_blocks_hi << 32 : 0);
+}
+
+/*
+ * Set the fs free block count
+ */
+void ext2fs_free_blocks_count_set(struct ext2_super_block *super, blk64_t blk)
+{
+ super->s_free_blocks_count = blk;
+ if (ext2fs_has_feature_64bit(super))
+ super->s_free_blocks_hi = (__u64) blk >> 32;
+}
+
+/*
+ * Add to the current free fs block count
+ */
+void ext2fs_free_blocks_count_add(struct ext2_super_block *super, blk64_t blk)
+{
+ blk64_t tmp;
+ tmp = ext2fs_free_blocks_count(super) + blk;
+ ext2fs_free_blocks_count_set(super, tmp);
+}
+
+/*
+ * Get a pointer to a block group descriptor. We need the explicit
+ * pointer to the group desc for code that swaps block group
+ * descriptors before writing them out, as it wants to make a copy and
+ * do the swap there.
+ */
+struct ext2_group_desc *ext2fs_group_desc(ext2_filsys fs,
+ struct opaque_ext2_group_desc *gdp,
+ dgrp_t group)
+{
+ struct ext2_group_desc *ret_gdp;
+ errcode_t retval;
+ static char *buf = 0;
+ static unsigned bufsize = 0;
+ blk64_t blk;
+ int desc_size = EXT2_DESC_SIZE(fs->super) & ~7;
+ int desc_per_blk = EXT2_DESC_PER_BLOCK(fs->super);
+
+ if (group > fs->group_desc_count)
+ return NULL;
+ if (gdp)
+ return (struct ext2_group_desc *)((char *)gdp +
+ group * desc_size);
+ /*
+ * If fs->group_desc wasn't read in when the file system was
+ * opened, then read it on demand here.
+ */
+ if (bufsize < fs->blocksize)
+ ext2fs_free_mem(&buf);
+ if (!buf) {
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return NULL;
+ bufsize = fs->blocksize;
+ }
+ blk = ext2fs_descriptor_block_loc2(fs, fs->super->s_first_data_block,
+ group / desc_per_blk);
+ retval = io_channel_read_blk(fs->io, blk, 1, buf);
+ if (retval)
+ return NULL;
+ ret_gdp = (struct ext2_group_desc *)
+ (buf + ((group % desc_per_blk) * desc_size));
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_group_desc2(fs, ret_gdp);
+#endif
+ return ret_gdp;
+}
+
+/* Do the same but as an ext4 group desc for internal use here */
+static struct ext4_group_desc *ext4fs_group_desc(ext2_filsys fs,
+ struct opaque_ext2_group_desc *gdp,
+ dgrp_t group)
+{
+ return (struct ext4_group_desc *)ext2fs_group_desc(fs, gdp, group);
+}
+
+/*
+ * Return the block bitmap checksum of a group
+ */
+__u32 ext2fs_block_bitmap_checksum(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+ __u32 csum;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ csum = gdp->bg_block_bitmap_csum_lo;
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
+ csum |= ((__u32)gdp->bg_block_bitmap_csum_hi << 16);
+ return csum;
+}
+
+/*
+ * Return the block bitmap block of a group
+ */
+blk64_t ext2fs_block_bitmap_loc(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_block_bitmap |
+ (ext2fs_has_feature_64bit(fs->super) ?
+ (__u64)gdp->bg_block_bitmap_hi << 32 : 0);
+}
+
+/*
+ * Set the block bitmap block of a group
+ */
+void ext2fs_block_bitmap_loc_set(ext2_filsys fs, dgrp_t group, blk64_t blk)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_block_bitmap = blk;
+ if (ext2fs_has_feature_64bit(fs->super))
+ gdp->bg_block_bitmap_hi = (__u64) blk >> 32;
+}
+
+/*
+ * Return the inode bitmap checksum of a group
+ */
+__u32 ext2fs_inode_bitmap_checksum(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+ __u32 csum;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ csum = gdp->bg_inode_bitmap_csum_lo;
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
+ csum |= ((__u32)gdp->bg_inode_bitmap_csum_hi << 16);
+ return csum;
+}
+
+/*
+ * Return the inode bitmap block of a group
+ */
+blk64_t ext2fs_inode_bitmap_loc(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_inode_bitmap |
+ (ext2fs_has_feature_64bit(fs->super) ?
+ (__u64) gdp->bg_inode_bitmap_hi << 32 : 0);
+}
+
+/*
+ * Set the inode bitmap block of a group
+ */
+void ext2fs_inode_bitmap_loc_set(ext2_filsys fs, dgrp_t group, blk64_t blk)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_inode_bitmap = blk;
+ if (ext2fs_has_feature_64bit(fs->super))
+ gdp->bg_inode_bitmap_hi = (__u64) blk >> 32;
+}
+
+/*
+ * Return the inode table block of a group
+ */
+blk64_t ext2fs_inode_table_loc(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_inode_table |
+ (ext2fs_has_feature_64bit(fs->super) ?
+ (__u64) gdp->bg_inode_table_hi << 32 : 0);
+}
+
+/*
+ * Set the inode table block of a group
+ */
+void ext2fs_inode_table_loc_set(ext2_filsys fs, dgrp_t group, blk64_t blk)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_inode_table = blk;
+ if (ext2fs_has_feature_64bit(fs->super))
+ gdp->bg_inode_table_hi = (__u64) blk >> 32;
+}
+
+/*
+ * Return the free blocks count of a group
+ */
+__u32 ext2fs_bg_free_blocks_count(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_free_blocks_count |
+ (ext2fs_has_feature_64bit(fs->super) ?
+ (__u32) gdp->bg_free_blocks_count_hi << 16 : 0);
+}
+
+/*
+ * Set the free blocks count of a group
+ */
+void ext2fs_bg_free_blocks_count_set(ext2_filsys fs, dgrp_t group, __u32 n)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_free_blocks_count = n;
+
+ if (ext2fs_has_feature_64bit(fs->super))
+ gdp->bg_free_blocks_count_hi = (__u32) n >> 16;
+}
+
+/*
+ * Return the free inodes count of a group
+ */
+__u32 ext2fs_bg_free_inodes_count(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_free_inodes_count |
+ (ext2fs_has_feature_64bit(fs->super) ?
+ (__u32) gdp->bg_free_inodes_count_hi << 16 : 0);
+}
+
+/*
+ * Set the free inodes count of a group
+ */
+void ext2fs_bg_free_inodes_count_set(ext2_filsys fs, dgrp_t group, __u32 n)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_free_inodes_count = n;
+ if (ext2fs_has_feature_64bit(fs->super))
+ gdp->bg_free_inodes_count_hi = (__u32) n >> 16;
+}
+
+/*
+ * Return the used dirs count of a group
+ */
+__u32 ext2fs_bg_used_dirs_count(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_used_dirs_count |
+ (ext2fs_has_feature_64bit(fs->super) ?
+ (__u32) gdp->bg_used_dirs_count_hi << 16 : 0);
+}
+
+/*
+ * Set the used dirs count of a group
+ */
+void ext2fs_bg_used_dirs_count_set(ext2_filsys fs, dgrp_t group, __u32 n)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_used_dirs_count = n;
+ if (ext2fs_has_feature_64bit(fs->super))
+ gdp->bg_used_dirs_count_hi = (__u32) n >> 16;
+}
+
+/*
+ * Return the unused inodes count of a group
+ */
+__u32 ext2fs_bg_itable_unused(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_itable_unused |
+ (ext2fs_has_feature_64bit(fs->super) ?
+ (__u32) gdp->bg_itable_unused_hi << 16 : 0);
+}
+
+/*
+ * Set the unused inodes count of a group
+ */
+void ext2fs_bg_itable_unused_set(ext2_filsys fs, dgrp_t group, __u32 n)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_itable_unused = n;
+ if (ext2fs_has_feature_64bit(fs->super))
+ gdp->bg_itable_unused_hi = (__u32) n >> 16;
+}
+
+/*
+ * Get the flags for this block group
+ */
+__u16 ext2fs_bg_flags(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_flags;
+}
+
+/*
+ * Zero out the flags for this block group
+ */
+void ext2fs_bg_flags_zap(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_flags = 0;
+ return;
+}
+
+/*
+ * Get the value of a particular flag for this block group
+ */
+int ext2fs_bg_flags_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_flags & bg_flag;
+}
+
+/*
+ * Set a flag or set of flags for this block group
+ */
+void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_flags |= bg_flags;
+ return;
+}
+
+/*
+ * Clear a flag or set of flags for this block group
+ */
+void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flags)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_flags &= ~bg_flags;
+ return;
+}
+
+/*
+ * Get the checksum for this block group
+ */
+__u16 ext2fs_bg_checksum(ext2_filsys fs, dgrp_t group)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ return gdp->bg_checksum;
+}
+
+/*
+ * Set the checksum for this block group to a previously calculated value
+ */
+void ext2fs_bg_checksum_set(ext2_filsys fs, dgrp_t group, __u16 checksum)
+{
+ struct ext4_group_desc *gdp;
+
+ gdp = ext4fs_group_desc(fs, fs->group_desc, group);
+ gdp->bg_checksum = checksum;
+ return;
+}
+
+/*
+ * Get the acl block of a file
+ */
+blk64_t ext2fs_file_acl_block(ext2_filsys fs, const struct ext2_inode *inode)
+{
+ blk64_t blk = inode->i_file_acl;
+
+ if (fs && ext2fs_has_feature_64bit(fs->super))
+ blk |= ((__u64) inode->osd2.linux2.l_i_file_acl_high) << 32;
+ return blk;
+}
+
+/*
+ * Set the acl block of a file
+ */
+void ext2fs_file_acl_block_set(ext2_filsys fs, struct ext2_inode *inode,
+ blk64_t blk)
+{
+ inode->i_file_acl = blk;
+ if (fs && ext2fs_has_feature_64bit(fs->super))
+ inode->osd2.linux2.l_i_file_acl_high = (__u64) blk >> 32;
+}
+
+/*
+ * Set the size of the inode
+ */
+errcode_t ext2fs_inode_size_set(ext2_filsys fs, struct ext2_inode *inode,
+ ext2_off64_t size)
+{
+ if (size < 0)
+ return EINVAL;
+
+ /* If writing a large inode, set the large_file or large_dir flag */
+ if (ext2fs_needs_large_file_feature(size)) {
+ int dirty_sb = 0;
+
+ if (LINUX_S_ISREG(inode->i_mode)) {
+ if (!ext2fs_has_feature_large_file(fs->super)) {
+ ext2fs_set_feature_large_file(fs->super);
+ dirty_sb = 1;
+ }
+ } else if (LINUX_S_ISDIR(inode->i_mode)) {
+ if (!ext2fs_has_feature_largedir(fs->super)) {
+ ext2fs_set_feature_largedir(fs->super);
+ dirty_sb = 1;
+ }
+ } else {
+ /* Only regular files get to be larger than 4GB */
+ return EXT2_ET_FILE_TOO_BIG;
+ }
+ if (dirty_sb) {
+ if (fs->super->s_rev_level == EXT2_GOOD_OLD_REV)
+ ext2fs_update_dynamic_rev(fs);
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+ inode->i_size = size & 0xffffffff;
+ inode->i_size_high = (size >> 32);
+
+ return 0;
+}
+
diff --git a/lib/ext2fs/block.c b/lib/ext2fs/block.c
new file mode 100644
index 0000000..06eed6e
--- /dev/null
+++ b/lib/ext2fs/block.c
@@ -0,0 +1,659 @@
+/*
+ * block.c --- iterate over all blocks in an inode
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct block_context {
+ ext2_filsys fs;
+ int (*func)(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t bcount,
+ blk64_t ref_blk,
+ int ref_offset,
+ void *priv_data);
+ e2_blkcnt_t bcount;
+ int bsize;
+ int flags;
+ errcode_t errcode;
+ char *ind_buf;
+ char *dind_buf;
+ char *tind_buf;
+ void *priv_data;
+};
+
+#define check_for_ro_violation_return(ctx, ret) \
+ do { \
+ if (((ctx)->flags & BLOCK_FLAG_READ_ONLY) && \
+ ((ret) & BLOCK_CHANGED)) { \
+ (ctx)->errcode = EXT2_ET_RO_BLOCK_ITERATE; \
+ ret |= BLOCK_ABORT | BLOCK_ERROR; \
+ return ret; \
+ } \
+ } while (0)
+
+#define check_for_ro_violation_goto(ctx, ret, label) \
+ do { \
+ if (((ctx)->flags & BLOCK_FLAG_READ_ONLY) && \
+ ((ret) & BLOCK_CHANGED)) { \
+ (ctx)->errcode = EXT2_ET_RO_BLOCK_ITERATE; \
+ ret |= BLOCK_ABORT | BLOCK_ERROR; \
+ goto label; \
+ } \
+ } while (0)
+
+static int block_iterate_ind(blk_t *ind_block, blk_t ref_block,
+ int ref_offset, struct block_context *ctx)
+{
+ int ret = 0, changed = 0;
+ int i, flags, limit, offset;
+ blk_t *block_nr;
+ blk64_t blk64;
+
+ limit = ctx->fs->blocksize >> 2;
+ if (!(ctx->flags & BLOCK_FLAG_DEPTH_TRAVERSE) &&
+ !(ctx->flags & BLOCK_FLAG_DATA_ONLY)) {
+ blk64 = *ind_block;
+ ret = (*ctx->func)(ctx->fs, &blk64,
+ BLOCK_COUNT_IND, ref_block,
+ ref_offset, ctx->priv_data);
+ *ind_block = blk64;
+ }
+ check_for_ro_violation_return(ctx, ret);
+ if (!*ind_block || (ret & BLOCK_ABORT)) {
+ ctx->bcount += limit;
+ return ret;
+ }
+ if (*ind_block >= ext2fs_blocks_count(ctx->fs->super) ||
+ *ind_block < ctx->fs->super->s_first_data_block) {
+ ctx->errcode = EXT2_ET_BAD_IND_BLOCK;
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+ ctx->errcode = ext2fs_read_ind_block(ctx->fs, *ind_block,
+ ctx->ind_buf);
+ if (ctx->errcode) {
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+
+ block_nr = (blk_t *) ctx->ind_buf;
+ offset = 0;
+ if (ctx->flags & BLOCK_FLAG_APPEND) {
+ for (i = 0; i < limit; i++, ctx->bcount++, block_nr++) {
+ blk64 = *block_nr;
+ flags = (*ctx->func)(ctx->fs, &blk64, ctx->bcount,
+ *ind_block, offset,
+ ctx->priv_data);
+ *block_nr = blk64;
+ changed |= flags;
+ if (flags & BLOCK_ABORT) {
+ ret |= BLOCK_ABORT;
+ break;
+ }
+ offset += sizeof(blk_t);
+ }
+ } else {
+ for (i = 0; i < limit; i++, ctx->bcount++, block_nr++) {
+ if (*block_nr == 0)
+ goto skip_sparse;
+ blk64 = *block_nr;
+ flags = (*ctx->func)(ctx->fs, &blk64, ctx->bcount,
+ *ind_block, offset,
+ ctx->priv_data);
+ *block_nr = blk64;
+ changed |= flags;
+ if (flags & BLOCK_ABORT) {
+ ret |= BLOCK_ABORT;
+ break;
+ }
+ skip_sparse:
+ offset += sizeof(blk_t);
+ }
+ }
+ check_for_ro_violation_return(ctx, changed);
+ if (changed & BLOCK_CHANGED) {
+ ctx->errcode = ext2fs_write_ind_block(ctx->fs, *ind_block,
+ ctx->ind_buf);
+ if (ctx->errcode)
+ ret |= BLOCK_ERROR | BLOCK_ABORT;
+ }
+ if ((ctx->flags & BLOCK_FLAG_DEPTH_TRAVERSE) &&
+ !(ctx->flags & BLOCK_FLAG_DATA_ONLY) &&
+ !(ret & BLOCK_ABORT)) {
+ blk64 = *ind_block;
+ ret |= (*ctx->func)(ctx->fs, &blk64,
+ BLOCK_COUNT_IND, ref_block,
+ ref_offset, ctx->priv_data);
+ *ind_block = blk64;
+ }
+ check_for_ro_violation_return(ctx, ret);
+ return ret;
+}
+
+static int block_iterate_dind(blk_t *dind_block, blk_t ref_block,
+ int ref_offset, struct block_context *ctx)
+{
+ int ret = 0, changed = 0;
+ int i, flags, limit, offset;
+ blk_t *block_nr;
+ blk64_t blk64;
+
+ limit = ctx->fs->blocksize >> 2;
+ if (!(ctx->flags & (BLOCK_FLAG_DEPTH_TRAVERSE |
+ BLOCK_FLAG_DATA_ONLY))) {
+ blk64 = *dind_block;
+ ret = (*ctx->func)(ctx->fs, &blk64,
+ BLOCK_COUNT_DIND, ref_block,
+ ref_offset, ctx->priv_data);
+ *dind_block = blk64;
+ }
+ check_for_ro_violation_return(ctx, ret);
+ if (!*dind_block || (ret & BLOCK_ABORT)) {
+ ctx->bcount += limit*limit;
+ return ret;
+ }
+ if (*dind_block >= ext2fs_blocks_count(ctx->fs->super) ||
+ *dind_block < ctx->fs->super->s_first_data_block) {
+ ctx->errcode = EXT2_ET_BAD_DIND_BLOCK;
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+ ctx->errcode = ext2fs_read_ind_block(ctx->fs, *dind_block,
+ ctx->dind_buf);
+ if (ctx->errcode) {
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+
+ block_nr = (blk_t *) ctx->dind_buf;
+ offset = 0;
+ if (ctx->flags & BLOCK_FLAG_APPEND) {
+ for (i = 0; i < limit; i++, block_nr++) {
+ flags = block_iterate_ind(block_nr,
+ *dind_block, offset,
+ ctx);
+ changed |= flags;
+ if (flags & (BLOCK_ABORT | BLOCK_ERROR)) {
+ ret |= flags & (BLOCK_ABORT | BLOCK_ERROR);
+ break;
+ }
+ offset += sizeof(blk_t);
+ }
+ } else {
+ for (i = 0; i < limit; i++, block_nr++) {
+ if (*block_nr == 0) {
+ ctx->bcount += limit;
+ continue;
+ }
+ flags = block_iterate_ind(block_nr,
+ *dind_block, offset,
+ ctx);
+ changed |= flags;
+ if (flags & (BLOCK_ABORT | BLOCK_ERROR)) {
+ ret |= flags & (BLOCK_ABORT | BLOCK_ERROR);
+ break;
+ }
+ offset += sizeof(blk_t);
+ }
+ }
+ check_for_ro_violation_return(ctx, changed);
+ if (changed & BLOCK_CHANGED) {
+ ctx->errcode = ext2fs_write_ind_block(ctx->fs, *dind_block,
+ ctx->dind_buf);
+ if (ctx->errcode)
+ ret |= BLOCK_ERROR | BLOCK_ABORT;
+ }
+ if ((ctx->flags & BLOCK_FLAG_DEPTH_TRAVERSE) &&
+ !(ctx->flags & BLOCK_FLAG_DATA_ONLY) &&
+ !(ret & BLOCK_ABORT)) {
+ blk64 = *dind_block;
+ ret |= (*ctx->func)(ctx->fs, &blk64,
+ BLOCK_COUNT_DIND, ref_block,
+ ref_offset, ctx->priv_data);
+ *dind_block = blk64;
+ }
+ check_for_ro_violation_return(ctx, ret);
+ return ret;
+}
+
+static int block_iterate_tind(blk_t *tind_block, blk_t ref_block,
+ int ref_offset, struct block_context *ctx)
+{
+ int ret = 0, changed = 0;
+ int i, flags, limit, offset;
+ blk_t *block_nr;
+ blk64_t blk64;
+
+ limit = ctx->fs->blocksize >> 2;
+ if (!(ctx->flags & (BLOCK_FLAG_DEPTH_TRAVERSE |
+ BLOCK_FLAG_DATA_ONLY))) {
+ blk64 = *tind_block;
+ ret = (*ctx->func)(ctx->fs, &blk64,
+ BLOCK_COUNT_TIND, ref_block,
+ ref_offset, ctx->priv_data);
+ *tind_block = blk64;
+ }
+ check_for_ro_violation_return(ctx, ret);
+ if (!*tind_block || (ret & BLOCK_ABORT)) {
+ ctx->bcount += ((unsigned long long) limit)*limit*limit;
+ return ret;
+ }
+ if (*tind_block >= ext2fs_blocks_count(ctx->fs->super) ||
+ *tind_block < ctx->fs->super->s_first_data_block) {
+ ctx->errcode = EXT2_ET_BAD_TIND_BLOCK;
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+ ctx->errcode = ext2fs_read_ind_block(ctx->fs, *tind_block,
+ ctx->tind_buf);
+ if (ctx->errcode) {
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+
+ block_nr = (blk_t *) ctx->tind_buf;
+ offset = 0;
+ if (ctx->flags & BLOCK_FLAG_APPEND) {
+ for (i = 0; i < limit; i++, block_nr++) {
+ flags = block_iterate_dind(block_nr,
+ *tind_block,
+ offset, ctx);
+ changed |= flags;
+ if (flags & (BLOCK_ABORT | BLOCK_ERROR)) {
+ ret |= flags & (BLOCK_ABORT | BLOCK_ERROR);
+ break;
+ }
+ offset += sizeof(blk_t);
+ }
+ } else {
+ for (i = 0; i < limit; i++, block_nr++) {
+ if (*block_nr == 0) {
+ ctx->bcount += limit*limit;
+ continue;
+ }
+ flags = block_iterate_dind(block_nr,
+ *tind_block,
+ offset, ctx);
+ changed |= flags;
+ if (flags & (BLOCK_ABORT | BLOCK_ERROR)) {
+ ret |= flags & (BLOCK_ABORT | BLOCK_ERROR);
+ break;
+ }
+ offset += sizeof(blk_t);
+ }
+ }
+ check_for_ro_violation_return(ctx, changed);
+ if (changed & BLOCK_CHANGED) {
+ ctx->errcode = ext2fs_write_ind_block(ctx->fs, *tind_block,
+ ctx->tind_buf);
+ if (ctx->errcode)
+ ret |= BLOCK_ERROR | BLOCK_ABORT;
+ }
+ if ((ctx->flags & BLOCK_FLAG_DEPTH_TRAVERSE) &&
+ !(ctx->flags & BLOCK_FLAG_DATA_ONLY) &&
+ !(ret & BLOCK_ABORT)) {
+ blk64 = *tind_block;
+ ret |= (*ctx->func)(ctx->fs, &blk64,
+ BLOCK_COUNT_TIND, ref_block,
+ ref_offset, ctx->priv_data);
+ *tind_block = blk64;
+ }
+ check_for_ro_violation_return(ctx, ret);
+ return ret;
+}
+
+errcode_t ext2fs_block_iterate3(ext2_filsys fs,
+ ext2_ino_t ino,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_blk,
+ int ref_offset,
+ void *priv_data),
+ void *priv_data)
+{
+ int i;
+ int r, ret = 0;
+ struct ext2_inode inode;
+ errcode_t retval;
+ struct block_context ctx;
+ int limit;
+ blk64_t blk64;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ ctx.errcode = ext2fs_read_inode(fs, ino, &inode);
+ if (ctx.errcode)
+ return ctx.errcode;
+
+ /*
+ * An inode with inline data has no blocks over which to
+ * iterate, so return an error code indicating this fact.
+ */
+ if (inode.i_flags & EXT4_INLINE_DATA_FL)
+ return EXT2_ET_INLINE_DATA_CANT_ITERATE;
+
+ /*
+ * Check to see if we need to limit large files
+ */
+ if (flags & BLOCK_FLAG_NO_LARGE) {
+ if (!LINUX_S_ISDIR(inode.i_mode) &&
+ (inode.i_size_high != 0))
+ return EXT2_ET_FILE_TOO_BIG;
+ }
+
+ limit = fs->blocksize >> 2;
+
+ ctx.fs = fs;
+ ctx.func = func;
+ ctx.priv_data = priv_data;
+ ctx.flags = flags;
+ ctx.bcount = 0;
+ if (block_buf) {
+ ctx.ind_buf = block_buf;
+ } else {
+ retval = ext2fs_get_array(3, fs->blocksize, &ctx.ind_buf);
+ if (retval)
+ return retval;
+ }
+ ctx.dind_buf = ctx.ind_buf + fs->blocksize;
+ ctx.tind_buf = ctx.dind_buf + fs->blocksize;
+
+ /*
+ * Iterate over the HURD translator block (if present)
+ */
+ if ((fs->super->s_creator_os == EXT2_OS_HURD) &&
+ !(flags & BLOCK_FLAG_DATA_ONLY)) {
+ if (inode.osd1.hurd1.h_i_translator) {
+ blk64 = inode.osd1.hurd1.h_i_translator;
+ ret |= (*ctx.func)(fs, &blk64,
+ BLOCK_COUNT_TRANSLATOR,
+ 0, 0, priv_data);
+ inode.osd1.hurd1.h_i_translator = (blk_t) blk64;
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ check_for_ro_violation_goto(&ctx, ret, abort_exit);
+ }
+ }
+
+ if (inode.i_flags & EXT4_EXTENTS_FL) {
+ ext2_extent_handle_t handle;
+ struct ext2fs_extent extent, next;
+ e2_blkcnt_t blockcnt = 0;
+ blk64_t blk, new_blk;
+ int op = EXT2_EXTENT_ROOT;
+ int uninit;
+ unsigned int j;
+
+ ctx.errcode = ext2fs_extent_open2(fs, ino, &inode, &handle);
+ if (ctx.errcode)
+ goto abort_exit;
+
+ while (1) {
+ if (op == EXT2_EXTENT_CURRENT)
+ ctx.errcode = 0;
+ else
+ ctx.errcode = ext2fs_extent_get(handle, op,
+ &extent);
+ if (ctx.errcode) {
+ if (ctx.errcode != EXT2_ET_EXTENT_NO_NEXT)
+ break;
+ ctx.errcode = 0;
+ if (!(flags & BLOCK_FLAG_APPEND))
+ break;
+ next_block_set:
+ blk = 0;
+ r = (*ctx.func)(fs, &blk, blockcnt,
+ 0, 0, priv_data);
+ ret |= r;
+ check_for_ro_violation_goto(&ctx, ret,
+ extent_done);
+ if (r & BLOCK_CHANGED) {
+ ctx.errcode =
+ ext2fs_extent_set_bmap(handle,
+ (blk64_t) blockcnt++,
+ (blk64_t) blk, 0);
+ if (ctx.errcode || (ret & BLOCK_ABORT))
+ break;
+ if (blk)
+ goto next_block_set;
+ }
+ break;
+ }
+
+ op = EXT2_EXTENT_NEXT;
+ blk = extent.e_pblk;
+ if (!(extent.e_flags & EXT2_EXTENT_FLAGS_LEAF)) {
+ if (ctx.flags & BLOCK_FLAG_DATA_ONLY)
+ continue;
+ if ((!(extent.e_flags &
+ EXT2_EXTENT_FLAGS_SECOND_VISIT) &&
+ !(ctx.flags & BLOCK_FLAG_DEPTH_TRAVERSE)) ||
+ ((extent.e_flags &
+ EXT2_EXTENT_FLAGS_SECOND_VISIT) &&
+ (ctx.flags & BLOCK_FLAG_DEPTH_TRAVERSE))) {
+ ret |= (*ctx.func)(fs, &blk,
+ -1, 0, 0, priv_data);
+ if (ret & BLOCK_CHANGED) {
+ extent.e_pblk = blk;
+ ctx.errcode =
+ ext2fs_extent_replace(handle, 0, &extent);
+ if (ctx.errcode)
+ break;
+ }
+ if (ret & BLOCK_ABORT)
+ break;
+ }
+ continue;
+ }
+ uninit = 0;
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ uninit = EXT2_EXTENT_SET_BMAP_UNINIT;
+
+ /*
+ * Get the next extent before we start messing
+ * with the current extent
+ */
+ retval = ext2fs_extent_get(handle, op, &next);
+
+#if 0
+ printf("lblk %llu pblk %llu len %d blockcnt %llu\n",
+ extent.e_lblk, extent.e_pblk,
+ extent.e_len, blockcnt);
+#endif
+ if (extent.e_lblk + extent.e_len <= (blk64_t) blockcnt)
+ continue;
+ if (extent.e_lblk > (blk64_t) blockcnt)
+ blockcnt = extent.e_lblk;
+ j = blockcnt - extent.e_lblk;
+ blk += j;
+ for (blockcnt = extent.e_lblk, j = 0;
+ j < extent.e_len;
+ blk++, blockcnt++, j++) {
+ new_blk = blk;
+ r = (*ctx.func)(fs, &new_blk, blockcnt,
+ 0, 0, priv_data);
+ ret |= r;
+ check_for_ro_violation_goto(&ctx, ret,
+ extent_done);
+ if (r & BLOCK_CHANGED) {
+ ctx.errcode =
+ ext2fs_extent_set_bmap(handle,
+ (blk64_t) blockcnt,
+ new_blk, uninit);
+ if (ctx.errcode)
+ goto extent_done;
+ }
+ if (ret & BLOCK_ABORT)
+ goto extent_done;
+ }
+ if (retval == 0) {
+ extent = next;
+ op = EXT2_EXTENT_CURRENT;
+ }
+ }
+
+ extent_done:
+ ext2fs_extent_free(handle);
+ ret |= BLOCK_ERROR; /* ctx.errcode is always valid here */
+ goto errout;
+ }
+
+ /*
+ * Iterate over normal data blocks
+ */
+ for (i = 0; i < EXT2_NDIR_BLOCKS ; i++, ctx.bcount++) {
+ if (inode.i_block[i] || (flags & BLOCK_FLAG_APPEND)) {
+ blk64 = inode.i_block[i];
+ ret |= (*ctx.func)(fs, &blk64, ctx.bcount, 0, i,
+ priv_data);
+ inode.i_block[i] = (blk_t) blk64;
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ }
+ }
+ check_for_ro_violation_goto(&ctx, ret, abort_exit);
+ if (inode.i_block[EXT2_IND_BLOCK] || (flags & BLOCK_FLAG_APPEND)) {
+ ret |= block_iterate_ind(&inode.i_block[EXT2_IND_BLOCK],
+ 0, EXT2_IND_BLOCK, &ctx);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ } else
+ ctx.bcount += limit;
+ if (inode.i_block[EXT2_DIND_BLOCK] || (flags & BLOCK_FLAG_APPEND)) {
+ ret |= block_iterate_dind(&inode.i_block[EXT2_DIND_BLOCK],
+ 0, EXT2_DIND_BLOCK, &ctx);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ } else
+ ctx.bcount += limit * limit;
+ if (inode.i_block[EXT2_TIND_BLOCK] || (flags & BLOCK_FLAG_APPEND)) {
+ ret |= block_iterate_tind(&inode.i_block[EXT2_TIND_BLOCK],
+ 0, EXT2_TIND_BLOCK, &ctx);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ }
+
+abort_exit:
+ if (ret & BLOCK_CHANGED) {
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval) {
+ ret |= BLOCK_ERROR;
+ ctx.errcode = retval;
+ }
+ }
+errout:
+ if (!block_buf)
+ ext2fs_free_mem(&ctx.ind_buf);
+
+ return (ret & BLOCK_ERROR) ? ctx.errcode : 0;
+}
+
+/*
+ * Emulate the old ext2fs_block_iterate function!
+ */
+
+struct xlate64 {
+ int (*func)(ext2_filsys fs,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_blk,
+ int ref_offset,
+ void *priv_data);
+ void *real_private;
+};
+
+static int xlate64_func(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt, blk64_t ref_blk,
+ int ref_offset, void *priv_data)
+{
+ struct xlate64 *xl = (struct xlate64 *) priv_data;
+ int ret;
+ blk_t block32 = *blocknr;
+
+ ret = (*xl->func)(fs, &block32, blockcnt, (blk_t) ref_blk, ref_offset,
+ xl->real_private);
+ *blocknr = block32;
+ return ret;
+}
+
+errcode_t ext2fs_block_iterate2(ext2_filsys fs,
+ ext2_ino_t ino,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_filsys fs,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_blk,
+ int ref_offset,
+ void *priv_data),
+ void *priv_data)
+{
+ struct xlate64 xl;
+
+ xl.real_private = priv_data;
+ xl.func = func;
+
+ return ext2fs_block_iterate3(fs, ino, flags, block_buf,
+ xlate64_func, &xl);
+}
+
+
+struct xlate {
+ int (*func)(ext2_filsys fs,
+ blk_t *blocknr,
+ int bcount,
+ void *priv_data);
+ void *real_private;
+};
+
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int xlate_func(ext2_filsys fs, blk_t *blocknr, e2_blkcnt_t blockcnt,
+ blk_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct xlate *xl = (struct xlate *) priv_data;
+
+ return (*xl->func)(fs, blocknr, (int) blockcnt, xl->real_private);
+}
+
+errcode_t ext2fs_block_iterate(ext2_filsys fs,
+ ext2_ino_t ino,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_filsys fs,
+ blk_t *blocknr,
+ int blockcnt,
+ void *priv_data),
+ void *priv_data)
+{
+ struct xlate xl;
+
+ xl.real_private = priv_data;
+ xl.func = func;
+
+ return ext2fs_block_iterate2(fs, ino, BLOCK_FLAG_NO_LARGE | flags,
+ block_buf, xlate_func, &xl);
+}
+
diff --git a/lib/ext2fs/bmap.c b/lib/ext2fs/bmap.c
new file mode 100644
index 0000000..65c45c5
--- /dev/null
+++ b/lib/ext2fs/bmap.c
@@ -0,0 +1,499 @@
+/*
+ * bmap.c --- logical to physical block mapping
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+#if defined(__GNUC__) && !defined(NO_INLINE_FUNCS)
+#define _BMAP_INLINE_ __inline__
+#else
+#define _BMAP_INLINE_
+#endif
+
+extern errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char *block_buf, int bmap_flags,
+ blk_t block, blk_t *phys_blk);
+
+#define inode_bmap(inode, nr) ((inode)->i_block[(nr)])
+
+static _BMAP_INLINE_ errcode_t block_ind_bmap(ext2_filsys fs, int flags,
+ blk_t ind, char *block_buf,
+ int *blocks_alloc,
+ blk_t nr, blk_t *ret_blk)
+{
+ errcode_t retval;
+ blk_t b;
+
+ if (!ind) {
+ if (flags & BMAP_SET)
+ return EXT2_ET_SET_BMAP_NO_IND;
+ *ret_blk = 0;
+ return 0;
+ }
+ retval = io_channel_read_blk(fs->io, ind, 1, block_buf);
+ if (retval)
+ return retval;
+
+ if (flags & BMAP_SET) {
+ b = *ret_blk;
+#ifdef WORDS_BIGENDIAN
+ b = ext2fs_swab32(b);
+#endif
+ ((blk_t *) block_buf)[nr] = b;
+ return io_channel_write_blk(fs->io, ind, 1, block_buf);
+ }
+
+ b = ((blk_t *) block_buf)[nr];
+
+#ifdef WORDS_BIGENDIAN
+ b = ext2fs_swab32(b);
+#endif
+
+ if (!b && (flags & BMAP_ALLOC)) {
+ b = nr ? ext2fs_le32_to_cpu(((blk_t *)block_buf)[nr - 1]) : ind;
+ retval = ext2fs_alloc_block(fs, b,
+ block_buf + fs->blocksize, &b);
+ if (retval)
+ return retval;
+
+#ifdef WORDS_BIGENDIAN
+ ((blk_t *) block_buf)[nr] = ext2fs_swab32(b);
+#else
+ ((blk_t *) block_buf)[nr] = b;
+#endif
+
+ retval = io_channel_write_blk(fs->io, ind, 1, block_buf);
+ if (retval)
+ return retval;
+
+ (*blocks_alloc)++;
+ }
+
+ *ret_blk = b;
+ return 0;
+}
+
+static _BMAP_INLINE_ errcode_t block_dind_bmap(ext2_filsys fs, int flags,
+ blk_t dind, char *block_buf,
+ int *blocks_alloc,
+ blk_t nr, blk_t *ret_blk)
+{
+ blk_t b = 0;
+ errcode_t retval;
+ blk_t addr_per_block;
+
+ addr_per_block = (blk_t) fs->blocksize >> 2;
+
+ retval = block_ind_bmap(fs, flags & ~BMAP_SET, dind, block_buf,
+ blocks_alloc, nr / addr_per_block, &b);
+ if (retval)
+ return retval;
+ retval = block_ind_bmap(fs, flags, b, block_buf, blocks_alloc,
+ nr % addr_per_block, ret_blk);
+ return retval;
+}
+
+static _BMAP_INLINE_ errcode_t block_tind_bmap(ext2_filsys fs, int flags,
+ blk_t tind, char *block_buf,
+ int *blocks_alloc,
+ blk_t nr, blk_t *ret_blk)
+{
+ blk_t b = 0;
+ errcode_t retval;
+ blk_t addr_per_block;
+
+ addr_per_block = (blk_t) fs->blocksize >> 2;
+
+ retval = block_dind_bmap(fs, flags & ~BMAP_SET, tind, block_buf,
+ blocks_alloc, nr / addr_per_block, &b);
+ if (retval)
+ return retval;
+ retval = block_ind_bmap(fs, flags, b, block_buf, blocks_alloc,
+ nr % addr_per_block, ret_blk);
+ return retval;
+}
+
+static errcode_t extent_bmap(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ ext2_extent_handle_t handle,
+ char *block_buf, int bmap_flags, blk64_t block,
+ int *ret_flags, int *blocks_alloc,
+ blk64_t *phys_blk);
+
+static errcode_t implied_cluster_alloc(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ ext2_extent_handle_t handle,
+ blk64_t lblk, blk64_t *phys_blk)
+{
+ blk64_t base_block, pblock = 0;
+ int i;
+
+ if (!ext2fs_has_feature_bigalloc(fs->super))
+ return 0;
+
+ base_block = lblk & ~EXT2FS_CLUSTER_MASK(fs);
+ /*
+ * Except for the logical block (lblk) that was passed in, search all
+ * blocks in this logical cluster for a mapping to a physical cluster.
+ * If any such map exists, calculate the physical block that maps to
+ * the logical block and return that.
+ *
+ * The old code wouldn't even look if (block % cluster_ratio) == 0;
+ * this is incorrect if we're allocating blocks in reverse order.
+ */
+ for (i = 0; i < EXT2FS_CLUSTER_RATIO(fs); i++) {
+ if (base_block + i == lblk)
+ continue;
+ extent_bmap(fs, ino, inode, handle, 0, 0,
+ base_block + i, 0, 0, &pblock);
+ if (pblock)
+ break;
+ }
+ if (pblock == 0)
+ return 0;
+ *phys_blk = pblock - i + (lblk - base_block);
+ return 0;
+}
+
+/* Try to map a logical block to an already-allocated physical cluster. */
+errcode_t ext2fs_map_cluster_block(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t lblk,
+ blk64_t *pblk)
+{
+ ext2_extent_handle_t handle;
+ errcode_t retval;
+
+ /* Need bigalloc and extents to be enabled */
+ *pblk = 0;
+ if (!ext2fs_has_feature_bigalloc(fs->super) ||
+ !(inode->i_flags & EXT4_EXTENTS_FL))
+ return 0;
+
+ retval = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (retval)
+ goto out;
+
+ retval = implied_cluster_alloc(fs, ino, inode, handle, lblk, pblk);
+ if (retval)
+ goto out2;
+
+out2:
+ ext2fs_extent_free(handle);
+out:
+ return retval;
+}
+
+static errcode_t extent_bmap(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ ext2_extent_handle_t handle,
+ char *block_buf, int bmap_flags, blk64_t block,
+ int *ret_flags, int *blocks_alloc,
+ blk64_t *phys_blk)
+{
+ struct blk_alloc_ctx alloc_ctx;
+ struct ext2fs_extent extent;
+ unsigned int offset;
+ errcode_t retval = 0;
+ blk64_t blk64 = 0;
+ int alloc = 0;
+ int set_flags;
+
+ set_flags = bmap_flags & BMAP_UNINIT ? EXT2_EXTENT_SET_BMAP_UNINIT : 0;
+
+ if (bmap_flags & BMAP_SET) {
+ retval = ext2fs_extent_set_bmap(handle, block,
+ *phys_blk, set_flags);
+ return retval;
+ }
+ retval = ext2fs_extent_goto(handle, block);
+ if (retval) {
+ /* If the extent is not found, return phys_blk = 0 */
+ if (retval == EXT2_ET_EXTENT_NOT_FOUND) {
+ extent.e_lblk = block;
+ goto got_block;
+ }
+ return retval;
+ }
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
+ if (retval)
+ return retval;
+ offset = block - extent.e_lblk;
+ if (block >= extent.e_lblk && (offset <= extent.e_len)) {
+ *phys_blk = extent.e_pblk + offset;
+ if (ret_flags && extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ *ret_flags |= BMAP_RET_UNINIT;
+ }
+got_block:
+ if ((*phys_blk == 0) && (bmap_flags & BMAP_ALLOC)) {
+ implied_cluster_alloc(fs, ino, inode, handle, block, &blk64);
+ if (blk64)
+ goto set_extent;
+ retval = extent_bmap(fs, ino, inode, handle, block_buf,
+ 0, block-1, 0, blocks_alloc, &blk64);
+ if (retval)
+ blk64 = ext2fs_find_inode_goal(fs, ino, inode, block);
+ alloc_ctx.ino = ino;
+ alloc_ctx.inode = inode;
+ alloc_ctx.lblk = extent.e_lblk;
+ alloc_ctx.flags = BLOCK_ALLOC_DATA;
+ retval = ext2fs_alloc_block3(fs, blk64, block_buf, &blk64,
+ &alloc_ctx);
+ if (retval)
+ return retval;
+ blk64 &= ~EXT2FS_CLUSTER_MASK(fs);
+ blk64 += EXT2FS_CLUSTER_MASK(fs) & block;
+ alloc++;
+ set_extent:
+ retval = ext2fs_extent_set_bmap(handle, block,
+ blk64, set_flags);
+ if (retval) {
+ ext2fs_block_alloc_stats2(fs, blk64, -1);
+ return retval;
+ }
+ /* Update inode after setting extent */
+ retval = ext2fs_read_inode(fs, ino, inode);
+ if (retval)
+ return retval;
+ *blocks_alloc += alloc;
+ *phys_blk = blk64;
+ }
+ return 0;
+}
+
+int ext2fs_file_block_offset_too_big(ext2_filsys fs,
+ struct ext2_inode *inode,
+ blk64_t offset)
+{
+ blk64_t addr_per_block, max_map_block;
+
+ /* Kernel seems to cut us off at 4294967294 blocks */
+ if (offset >= (1ULL << 32) - 1)
+ return 1;
+
+ if (inode->i_flags & EXT4_EXTENTS_FL)
+ return 0;
+
+ addr_per_block = fs->blocksize >> 2;
+ max_map_block = addr_per_block;
+ max_map_block += addr_per_block * addr_per_block;
+ max_map_block += addr_per_block * addr_per_block * addr_per_block;
+ max_map_block += 12;
+
+ return offset >= max_map_block;
+}
+
+errcode_t ext2fs_bmap2(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode,
+ char *block_buf, int bmap_flags, blk64_t block,
+ int *ret_flags, blk64_t *phys_blk)
+{
+ struct ext2_inode inode_buf;
+ ext2_extent_handle_t handle = 0;
+ blk_t addr_per_block;
+ blk_t b, blk32;
+ blk64_t b64;
+ char *buf = 0;
+ errcode_t retval = 0;
+ int blocks_alloc = 0, inode_dirty = 0;
+ struct blk_alloc_ctx alloc_ctx = {
+ .ino = ino,
+ .inode = inode,
+ .lblk = 0,
+ .flags = BLOCK_ALLOC_DATA,
+ };
+
+ if (!(bmap_flags & BMAP_SET))
+ *phys_blk = 0;
+
+ if (ret_flags)
+ *ret_flags = 0;
+
+ /* Read inode structure if necessary */
+ if (!inode) {
+ retval = ext2fs_read_inode(fs, ino, &inode_buf);
+ if (retval)
+ return retval;
+ inode = &inode_buf;
+ }
+ addr_per_block = (blk_t) fs->blocksize >> 2;
+
+ if (ext2fs_file_block_offset_too_big(fs, inode, block))
+ return EXT2_ET_FILE_TOO_BIG;
+
+ /*
+ * If an inode has inline data, that means that it doesn't have
+ * any blocks and we shouldn't map any blocks for it.
+ */
+ if (inode->i_flags & EXT4_INLINE_DATA_FL)
+ return EXT2_ET_INLINE_DATA_NO_BLOCK;
+
+ if (!block_buf) {
+ retval = ext2fs_get_array(2, fs->blocksize, &buf);
+ if (retval)
+ return retval;
+ block_buf = buf;
+ }
+
+ if (inode->i_flags & EXT4_EXTENTS_FL) {
+ retval = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (retval)
+ goto done;
+ retval = extent_bmap(fs, ino, inode, handle, block_buf,
+ bmap_flags, block, ret_flags,
+ &blocks_alloc, phys_blk);
+ goto done;
+ }
+
+ if (block < EXT2_NDIR_BLOCKS) {
+ if (bmap_flags & BMAP_SET) {
+ b = *phys_blk;
+ inode_bmap(inode, block) = b;
+ inode_dirty++;
+ goto done;
+ }
+
+ *phys_blk = inode_bmap(inode, block);
+ b = block ? inode_bmap(inode, block - 1) :
+ ext2fs_find_inode_goal(fs, ino, inode, block);
+
+ if ((*phys_blk == 0) && (bmap_flags & BMAP_ALLOC)) {
+ b64 = b;
+ retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
+ &alloc_ctx);
+ b = b64;
+ if (retval)
+ goto done;
+ inode_bmap(inode, block) = b;
+ blocks_alloc++;
+ *phys_blk = b;
+ }
+ goto done;
+ }
+
+ /* Indirect block */
+ block -= EXT2_NDIR_BLOCKS;
+ blk32 = *phys_blk;
+ if (block < addr_per_block) {
+ b = inode_bmap(inode, EXT2_IND_BLOCK);
+ if (!b) {
+ if (!(bmap_flags & BMAP_ALLOC)) {
+ if (bmap_flags & BMAP_SET)
+ retval = EXT2_ET_SET_BMAP_NO_IND;
+ goto done;
+ }
+
+ b = inode_bmap(inode, EXT2_IND_BLOCK-1);
+ b64 = b;
+ retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
+ &alloc_ctx);
+ b = b64;
+ if (retval)
+ goto done;
+ inode_bmap(inode, EXT2_IND_BLOCK) = b;
+ blocks_alloc++;
+ }
+ retval = block_ind_bmap(fs, bmap_flags, b, block_buf,
+ &blocks_alloc, block, &blk32);
+ if (retval == 0)
+ *phys_blk = blk32;
+ goto done;
+ }
+
+ /* Doubly indirect block */
+ block -= addr_per_block;
+ if (block < addr_per_block * addr_per_block) {
+ b = inode_bmap(inode, EXT2_DIND_BLOCK);
+ if (!b) {
+ if (!(bmap_flags & BMAP_ALLOC)) {
+ if (bmap_flags & BMAP_SET)
+ retval = EXT2_ET_SET_BMAP_NO_IND;
+ goto done;
+ }
+
+ b = inode_bmap(inode, EXT2_IND_BLOCK);
+ b64 = b;
+ retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
+ &alloc_ctx);
+ b = b64;
+ if (retval)
+ goto done;
+ inode_bmap(inode, EXT2_DIND_BLOCK) = b;
+ blocks_alloc++;
+ }
+ retval = block_dind_bmap(fs, bmap_flags, b, block_buf,
+ &blocks_alloc, block, &blk32);
+ if (retval == 0)
+ *phys_blk = blk32;
+ goto done;
+ }
+
+ /* Triply indirect block */
+ block -= addr_per_block * addr_per_block;
+ b = inode_bmap(inode, EXT2_TIND_BLOCK);
+ if (!b) {
+ if (!(bmap_flags & BMAP_ALLOC)) {
+ if (bmap_flags & BMAP_SET)
+ retval = EXT2_ET_SET_BMAP_NO_IND;
+ goto done;
+ }
+
+ b = inode_bmap(inode, EXT2_DIND_BLOCK);
+ b64 = b;
+ retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
+ &alloc_ctx);
+ b = b64;
+ if (retval)
+ goto done;
+ inode_bmap(inode, EXT2_TIND_BLOCK) = b;
+ blocks_alloc++;
+ }
+ retval = block_tind_bmap(fs, bmap_flags, b, block_buf,
+ &blocks_alloc, block, &blk32);
+ if (retval == 0)
+ *phys_blk = blk32;
+done:
+ if (*phys_blk && retval == 0 && (bmap_flags & BMAP_ZERO))
+ retval = ext2fs_zero_blocks2(fs, *phys_blk, 1, NULL, NULL);
+ if (buf)
+ ext2fs_free_mem(&buf);
+ if (handle)
+ ext2fs_extent_free(handle);
+ if ((retval == 0) && (blocks_alloc || inode_dirty)) {
+ ext2fs_iblk_add_blocks(fs, inode, blocks_alloc);
+ retval = ext2fs_write_inode(fs, ino, inode);
+ }
+ return retval;
+}
+
+errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode,
+ char *block_buf, int bmap_flags, blk_t block,
+ blk_t *phys_blk)
+{
+ errcode_t ret;
+ blk64_t ret_blk = *phys_blk;
+
+ ret = ext2fs_bmap2(fs, ino, inode, block_buf, bmap_flags, block,
+ 0, &ret_blk);
+ if (ret)
+ return ret;
+ if (ret_blk >= ((long long) 1 << 32))
+ return EOVERFLOW;
+ *phys_blk = ret_blk;
+ return 0;
+}
diff --git a/lib/ext2fs/bmap64.h b/lib/ext2fs/bmap64.h
new file mode 100644
index 0000000..de33454
--- /dev/null
+++ b/lib/ext2fs/bmap64.h
@@ -0,0 +1,106 @@
+/*
+ * bmap64.h --- 64-bit bitmap structure
+ *
+ * Copyright (C) 2007, 2008 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+struct ext2_bmap_statistics {
+ int type;
+ struct timeval created;
+
+#ifdef ENABLE_BMAP_STATS_OPS
+ unsigned long copy_count;
+ unsigned long resize_count;
+ unsigned long mark_count;
+ unsigned long unmark_count;
+ unsigned long test_count;
+ unsigned long mark_ext_count;
+ unsigned long unmark_ext_count;
+ unsigned long test_ext_count;
+ unsigned long set_range_count;
+ unsigned long get_range_count;
+ unsigned long clear_count;
+
+ blk64_t last_marked;
+ blk64_t last_tested;
+ blk64_t mark_back;
+ blk64_t test_back;
+
+ unsigned long mark_seq;
+ unsigned long test_seq;
+#endif /* ENABLE_BMAP_STATS_OPS */
+};
+
+
+struct ext2fs_struct_generic_bitmap_64 {
+ errcode_t magic;
+ ext2_filsys fs;
+ struct ext2_bitmap_ops *bitmap_ops;
+ int flags;
+ __u64 start, end;
+ __u64 real_end;
+ int cluster_bits;
+ char *description;
+ void *private;
+ errcode_t base_error_code;
+#ifdef ENABLE_BMAP_STATS
+ struct ext2_bmap_statistics stats;
+#endif
+};
+
+typedef struct ext2fs_struct_generic_bitmap_64 *ext2fs_generic_bitmap_64;
+
+#define EXT2FS_IS_32_BITMAP(bmap) \
+ (((bmap)->magic == EXT2_ET_MAGIC_GENERIC_BITMAP) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_BLOCK_BITMAP) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_INODE_BITMAP))
+
+#define EXT2FS_IS_64_BITMAP(bmap) \
+ (((bmap)->magic == EXT2_ET_MAGIC_GENERIC_BITMAP64) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_BLOCK_BITMAP64) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_INODE_BITMAP64))
+
+struct ext2_bitmap_ops {
+ int type;
+ /* Generic bmap operators */
+ errcode_t (*new_bmap)(ext2_filsys fs, ext2fs_generic_bitmap_64 bmap);
+ void (*free_bmap)(ext2fs_generic_bitmap_64 bitmap);
+ errcode_t (*copy_bmap)(ext2fs_generic_bitmap_64 src,
+ ext2fs_generic_bitmap_64 dest);
+ errcode_t (*resize_bmap)(ext2fs_generic_bitmap_64 bitmap,
+ __u64 new_end,
+ __u64 new_real_end);
+ /* bit set/test operators */
+ int (*mark_bmap)(ext2fs_generic_bitmap_64 bitmap, __u64 arg);
+ int (*unmark_bmap)(ext2fs_generic_bitmap_64 bitmap, __u64 arg);
+ int (*test_bmap)(ext2fs_generic_bitmap_64 bitmap, __u64 arg);
+ void (*mark_bmap_extent)(ext2fs_generic_bitmap_64 bitmap, __u64 arg,
+ unsigned int num);
+ void (*unmark_bmap_extent)(ext2fs_generic_bitmap_64 bitmap, __u64 arg,
+ unsigned int num);
+ int (*test_clear_bmap_extent)(ext2fs_generic_bitmap_64 bitmap,
+ __u64 arg, unsigned int num);
+ errcode_t (*set_bmap_range)(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, size_t num, void *in);
+ errcode_t (*get_bmap_range)(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, size_t num, void *out);
+ void (*clear_bmap)(ext2fs_generic_bitmap_64 bitmap);
+ void (*print_stats)(ext2fs_generic_bitmap_64);
+
+ /* Find the first zero bit between start and end, inclusive.
+ * May be NULL, in which case a generic function is used. */
+ errcode_t (*find_first_zero)(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, __u64 end, __u64 *out);
+ /* Find the first set bit between start and end, inclusive.
+ * May be NULL, in which case a generic function is used. */
+ errcode_t (*find_first_set)(ext2fs_generic_bitmap_64 bitmap,
+ __u64 start, __u64 end, __u64 *out);
+};
+
+extern struct ext2_bitmap_ops ext2fs_blkmap64_bitarray;
+extern struct ext2_bitmap_ops ext2fs_blkmap64_rbtree;
diff --git a/lib/ext2fs/bmove.c b/lib/ext2fs/bmove.c
new file mode 100644
index 0000000..e2ea405
--- /dev/null
+++ b/lib/ext2fs/bmove.c
@@ -0,0 +1,167 @@
+/*
+ * bmove.c --- Move blocks around to make way for a particular
+ * filesystem structure.
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+struct process_block_struct {
+ ext2_ino_t ino;
+ struct ext2_inode * inode;
+ ext2fs_block_bitmap reserve;
+ ext2fs_block_bitmap alloc_map;
+ errcode_t error;
+ char *buf;
+ int add_dir;
+ int flags;
+};
+
+static int process_block(ext2_filsys fs, blk64_t *block_nr,
+ e2_blkcnt_t blockcnt, blk64_t ref_block,
+ int ref_offset, void *priv_data)
+{
+ struct process_block_struct *pb;
+ errcode_t retval;
+ int ret;
+ blk64_t block, orig;
+
+ pb = (struct process_block_struct *) priv_data;
+ block = orig = *block_nr;
+ ret = 0;
+
+ /*
+ * Let's see if this is one which we need to relocate
+ */
+ if (ext2fs_test_block_bitmap2(pb->reserve, block)) {
+ do {
+ if (++block >= ext2fs_blocks_count(fs->super))
+ block = fs->super->s_first_data_block;
+ if (block == orig) {
+ pb->error = EXT2_ET_BLOCK_ALLOC_FAIL;
+ return BLOCK_ABORT;
+ }
+ } while (ext2fs_test_block_bitmap2(pb->reserve, block) ||
+ ext2fs_test_block_bitmap2(pb->alloc_map, block));
+
+ retval = io_channel_read_blk64(fs->io, orig, 1, pb->buf);
+ if (retval) {
+ pb->error = retval;
+ return BLOCK_ABORT;
+ }
+ retval = io_channel_write_blk64(fs->io, block, 1, pb->buf);
+ if (retval) {
+ pb->error = retval;
+ return BLOCK_ABORT;
+ }
+ *block_nr = block;
+ ext2fs_mark_block_bitmap2(pb->alloc_map, block);
+ ret = BLOCK_CHANGED;
+ if (pb->flags & EXT2_BMOVE_DEBUG)
+ printf("ino=%u, blockcnt=%lld, %llu->%llu\n",
+ (unsigned) pb->ino, blockcnt,
+ (unsigned long long) orig,
+ (unsigned long long) block);
+ }
+ if (pb->add_dir) {
+ retval = ext2fs_add_dir_block2(fs->dblist, pb->ino,
+ block, blockcnt);
+ if (retval) {
+ pb->error = retval;
+ ret |= BLOCK_ABORT;
+ }
+ }
+ return ret;
+}
+
+errcode_t ext2fs_move_blocks(ext2_filsys fs,
+ ext2fs_block_bitmap reserve,
+ ext2fs_block_bitmap alloc_map,
+ int flags)
+{
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ errcode_t retval;
+ struct process_block_struct pb;
+ ext2_inode_scan scan;
+ char *block_buf;
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval)
+ return retval;
+
+ pb.reserve = reserve;
+ pb.error = 0;
+ pb.alloc_map = alloc_map ? alloc_map : fs->block_map;
+ pb.flags = flags;
+
+ retval = ext2fs_get_array(4, fs->blocksize, &block_buf);
+ if (retval)
+ return retval;
+ pb.buf = block_buf + fs->blocksize * 3;
+
+ /*
+ * If GET_DBLIST is set in the flags field, then we should
+ * gather directory block information while we're doing the
+ * block move.
+ */
+ if (flags & EXT2_BMOVE_GET_DBLIST) {
+ if (fs->dblist) {
+ ext2fs_free_dblist(fs->dblist);
+ fs->dblist = NULL;
+ }
+ retval = ext2fs_init_dblist(fs, 0);
+ if (retval)
+ return retval;
+ }
+
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval)
+ return retval;
+
+ while (ino) {
+ if ((inode.i_links_count == 0) ||
+ !ext2fs_inode_has_valid_blocks2(fs, &inode))
+ goto next;
+
+ pb.ino = ino;
+ pb.inode = &inode;
+
+ pb.add_dir = (LINUX_S_ISDIR(inode.i_mode) &&
+ flags & EXT2_BMOVE_GET_DBLIST);
+
+ retval = ext2fs_block_iterate3(fs, ino, 0, block_buf,
+ process_block, &pb);
+ if (retval)
+ return retval;
+ if (pb.error)
+ return pb.error;
+
+ next:
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE)
+ goto next;
+ }
+ return 0;
+}
+
diff --git a/lib/ext2fs/brel.h b/lib/ext2fs/brel.h
new file mode 100644
index 0000000..9fdddd4
--- /dev/null
+++ b/lib/ext2fs/brel.h
@@ -0,0 +1,86 @@
+/*
+ * brel.h
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+struct ext2_block_relocate_entry {
+ blk64_t new;
+ __s16 offset;
+ __u16 flags;
+ union {
+ blk64_t block_ref;
+ ext2_ino_t inode_ref;
+ } owner;
+};
+
+#define RELOCATE_TYPE_REF 0x0007
+#define RELOCATE_BLOCK_REF 0x0001
+#define RELOCATE_INODE_REF 0x0002
+
+typedef struct ext2_block_relocation_table *ext2_brel;
+
+struct ext2_block_relocation_table {
+ __u32 magic;
+ char *name;
+ blk64_t current;
+ void *priv_data;
+
+ /*
+ * Add a block relocation entry.
+ */
+ errcode_t (*put)(ext2_brel brel, blk64_t old,
+ struct ext2_block_relocate_entry *ent);
+
+ /*
+ * Get a block relocation entry.
+ */
+ errcode_t (*get)(ext2_brel brel, blk64_t old,
+ struct ext2_block_relocate_entry *ent);
+
+ /*
+ * Initialize for iterating over the block relocation entries.
+ */
+ errcode_t (*start_iter)(ext2_brel brel);
+
+ /*
+ * The iterator function for the inode relocation entries.
+ * Returns an inode number of 0 when out of entries.
+ */
+ errcode_t (*next)(ext2_brel brel, blk64_t *old,
+ struct ext2_block_relocate_entry *ent);
+
+ /*
+ * Move the inode relocation table from one block number to
+ * another.
+ */
+ errcode_t (*move)(ext2_brel brel, blk64_t old, blk_t new);
+
+ /*
+ * Remove a block relocation entry.
+ */
+ errcode_t (*delete)(ext2_brel brel, blk64_t old);
+
+
+ /*
+ * Free the block relocation table.
+ */
+ errcode_t (*free)(ext2_brel brel);
+};
+
+errcode_t ext2fs_brel_memarray_create(char *name, blk64_t max_block,
+ ext2_brel *brel);
+
+#define ext2fs_brel_put(brel, old, ent) ((brel)->put((brel), old, ent))
+#define ext2fs_brel_get(brel, old, ent) ((brel)->get((brel), old, ent))
+#define ext2fs_brel_start_iter(brel) ((brel)->start_iter((brel)))
+#define ext2fs_brel_next(brel, old, ent) ((brel)->next((brel), old, ent))
+#define ext2fs_brel_move(brel, old, new) ((brel)->move((brel), old, new))
+#define ext2fs_brel_delete(brel, old) ((brel)->delete((brel), old))
+#define ext2fs_brel_free(brel) ((brel)->free((brel)))
+
diff --git a/lib/ext2fs/brel_ma.c b/lib/ext2fs/brel_ma.c
new file mode 100644
index 0000000..a12afae
--- /dev/null
+++ b/lib/ext2fs/brel_ma.c
@@ -0,0 +1,199 @@
+/*
+ * brel_ma.c
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * TODO: rewrite to not use a direct array!!! (Fortunately this
+ * module isn't really used yet.)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "brel.h"
+
+static errcode_t bma_put(ext2_brel brel, blk64_t old,
+ struct ext2_block_relocate_entry *ent);
+static errcode_t bma_get(ext2_brel brel, blk64_t old,
+ struct ext2_block_relocate_entry *ent);
+static errcode_t bma_start_iter(ext2_brel brel);
+static errcode_t bma_next(ext2_brel brel, blk64_t *old,
+ struct ext2_block_relocate_entry *ent);
+static errcode_t bma_move(ext2_brel brel, blk64_t old, blk64_t new);
+static errcode_t bma_delete(ext2_brel brel, blk64_t old);
+static errcode_t bma_free(ext2_brel brel);
+
+struct brel_ma {
+ __u32 magic;
+ blk64_t max_block;
+ struct ext2_block_relocate_entry *entries;
+};
+
+errcode_t ext2fs_brel_memarray_create(char *name, blk64_t max_block,
+ ext2_brel *new_brel)
+{
+ ext2_brel brel = 0;
+ errcode_t retval;
+ struct brel_ma *ma = 0;
+ size_t size;
+
+ *new_brel = 0;
+
+ /*
+ * Allocate memory structures
+ */
+ retval = ext2fs_get_mem(sizeof(struct ext2_block_relocation_table),
+ &brel);
+ if (retval)
+ goto errout;
+ memset(brel, 0, sizeof(struct ext2_block_relocation_table));
+
+ retval = ext2fs_get_mem(strlen(name)+1, &brel->name);
+ if (retval)
+ goto errout;
+ strcpy(brel->name, name);
+
+ retval = ext2fs_get_mem(sizeof(struct brel_ma), &ma);
+ if (retval)
+ goto errout;
+ memset(ma, 0, sizeof(struct brel_ma));
+ brel->priv_data = ma;
+
+ size = (size_t) (sizeof(struct ext2_block_relocate_entry) *
+ (max_block+1));
+ retval = ext2fs_get_array(max_block+1,
+ sizeof(struct ext2_block_relocate_entry), &ma->entries);
+ if (retval)
+ goto errout;
+ memset(ma->entries, 0, size);
+ ma->max_block = max_block;
+
+ /*
+ * Fill in the brel data structure
+ */
+ brel->put = bma_put;
+ brel->get = bma_get;
+ brel->start_iter = bma_start_iter;
+ brel->next = bma_next;
+ brel->move = bma_move;
+ brel->delete = bma_delete;
+ brel->free = bma_free;
+
+ *new_brel = brel;
+ return 0;
+
+errout:
+ bma_free(brel);
+ return retval;
+}
+
+static errcode_t bma_put(ext2_brel brel, blk64_t old,
+ struct ext2_block_relocate_entry *ent)
+{
+ struct brel_ma *ma;
+
+ ma = brel->priv_data;
+ if (old > ma->max_block)
+ return EXT2_ET_INVALID_ARGUMENT;
+ ma->entries[(unsigned)old] = *ent;
+ return 0;
+}
+
+static errcode_t bma_get(ext2_brel brel, blk64_t old,
+ struct ext2_block_relocate_entry *ent)
+{
+ struct brel_ma *ma;
+
+ ma = brel->priv_data;
+ if (old > ma->max_block)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (ma->entries[(unsigned)old].new == 0)
+ return ENOENT;
+ *ent = ma->entries[old];
+ return 0;
+}
+
+static errcode_t bma_start_iter(ext2_brel brel)
+{
+ brel->current = 0;
+ return 0;
+}
+
+static errcode_t bma_next(ext2_brel brel, blk64_t *old,
+ struct ext2_block_relocate_entry *ent)
+{
+ struct brel_ma *ma;
+
+ ma = brel->priv_data;
+ while (++brel->current < ma->max_block) {
+ if (ma->entries[(unsigned)brel->current].new == 0)
+ continue;
+ *old = brel->current;
+ *ent = ma->entries[(unsigned)brel->current];
+ return 0;
+ }
+ *old = 0;
+ return 0;
+}
+
+static errcode_t bma_move(ext2_brel brel, blk64_t old, blk64_t new)
+{
+ struct brel_ma *ma;
+
+ ma = brel->priv_data;
+ if ((old > ma->max_block) || (new > ma->max_block))
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (ma->entries[(unsigned)old].new == 0)
+ return ENOENT;
+ ma->entries[(unsigned)new] = ma->entries[old];
+ ma->entries[(unsigned)old].new = 0;
+ return 0;
+}
+
+static errcode_t bma_delete(ext2_brel brel, blk64_t old)
+{
+ struct brel_ma *ma;
+
+ ma = brel->priv_data;
+ if (old > ma->max_block)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (ma->entries[(unsigned)old].new == 0)
+ return ENOENT;
+ ma->entries[(unsigned)old].new = 0;
+ return 0;
+}
+
+static errcode_t bma_free(ext2_brel brel)
+{
+ struct brel_ma *ma;
+
+ if (!brel)
+ return 0;
+
+ ma = brel->priv_data;
+
+ if (ma) {
+ if (ma->entries)
+ ext2fs_free_mem(&ma->entries);
+ ext2fs_free_mem(&ma);
+ }
+ if (brel->name)
+ ext2fs_free_mem(&brel->name);
+ ext2fs_free_mem(&brel);
+ return 0;
+}
diff --git a/lib/ext2fs/check_desc.c b/lib/ext2fs/check_desc.c
new file mode 100644
index 0000000..3e3fa94
--- /dev/null
+++ b/lib/ext2fs/check_desc.c
@@ -0,0 +1,104 @@
+/*
+ * check_desc.c --- Check the group descriptors of an ext2 filesystem
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * This routine sanity checks the group descriptors
+ */
+errcode_t ext2fs_check_desc(ext2_filsys fs)
+{
+ ext2fs_block_bitmap bmap;
+ errcode_t retval;
+ dgrp_t i;
+ blk64_t first_block = fs->super->s_first_data_block;
+ blk64_t last_block = ext2fs_blocks_count(fs->super)-1;
+ blk64_t blk, b;
+ unsigned int j;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (EXT2_DESC_SIZE(fs->super) & (EXT2_DESC_SIZE(fs->super) - 1))
+ return EXT2_ET_BAD_DESC_SIZE;
+
+ retval = ext2fs_allocate_subcluster_bitmap(fs, "check_desc map", &bmap);
+ if (retval)
+ return retval;
+
+ for (i = 0; i < fs->group_desc_count; i++)
+ ext2fs_reserve_super_and_bgd(fs, i, bmap);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (!ext2fs_has_feature_flex_bg(fs->super)) {
+ first_block = ext2fs_group_first_block2(fs, i);
+ last_block = ext2fs_group_last_block2(fs, i);
+ }
+
+ /*
+ * Check to make sure the block bitmap for group is sane
+ */
+ blk = ext2fs_block_bitmap_loc(fs, i);
+ if (blk < first_block || blk > last_block ||
+ ext2fs_test_block_bitmap2(bmap, blk)) {
+ retval = EXT2_ET_GDESC_BAD_BLOCK_MAP;
+ goto errout;
+ }
+ ext2fs_mark_block_bitmap2(bmap, blk);
+
+ /*
+ * Check to make sure the inode bitmap for group is sane
+ */
+ blk = ext2fs_inode_bitmap_loc(fs, i);
+ if (blk < first_block || blk > last_block ||
+ ext2fs_test_block_bitmap2(bmap, blk)) {
+ retval = EXT2_ET_GDESC_BAD_INODE_MAP;
+ goto errout;
+ }
+ ext2fs_mark_block_bitmap2(bmap, blk);
+
+ /*
+ * Check to make sure the inode table for group is sane
+ */
+ blk = ext2fs_inode_table_loc(fs, i);
+ if (blk < first_block ||
+ ((blk + fs->inode_blocks_per_group - 1) > last_block)) {
+ retval = EXT2_ET_GDESC_BAD_INODE_TABLE;
+ goto errout;
+ }
+ for (j = 0, b = blk; j < fs->inode_blocks_per_group;
+ j++, b++) {
+ if (ext2fs_test_block_bitmap2(bmap, b)) {
+ retval = EXT2_ET_GDESC_BAD_INODE_TABLE;
+ goto errout;
+ }
+ ext2fs_mark_block_bitmap2(bmap, b);
+ }
+ }
+errout:
+ ext2fs_free_block_bitmap(bmap);
+ return retval;
+}
diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
new file mode 100644
index 0000000..69cbdd8
--- /dev/null
+++ b/lib/ext2fs/closefs.c
@@ -0,0 +1,521 @@
+/*
+ * closefs.c --- close an ext2 filesystem
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <time.h>
+#include <string.h>
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+static int test_root(unsigned int a, unsigned int b)
+{
+ while (1) {
+ if (a < b)
+ return 0;
+ if (a == b)
+ return 1;
+ if (a % b)
+ return 0;
+ a = a / b;
+ }
+}
+
+int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group)
+{
+ if (group == 0)
+ return 1;
+ if (ext2fs_has_feature_sparse_super2(fs->super)) {
+ if (group == fs->super->s_backup_bgs[0] ||
+ group == fs->super->s_backup_bgs[1])
+ return 1;
+ return 0;
+ }
+ if ((group <= 1) || !ext2fs_has_feature_sparse_super(fs->super))
+ return 1;
+ if (!(group & 1))
+ return 0;
+ if (test_root(group, 3) || (test_root(group, 5)) ||
+ test_root(group, 7))
+ return 1;
+
+ return 0;
+}
+
+/*
+ * ext2fs_super_and_bgd_loc2()
+ * @fs: ext2 fs pointer
+ * @group given block group
+ * @ret_super_blk: if !NULL, returns super block location
+ * @ret_old_desc_blk: if !NULL, returns location of the old block
+ * group descriptor
+ * @ret_new_desc_blk: if !NULL, returns location of meta_bg block
+ * group descriptor
+ * @ret_used_blks: if !NULL, returns number of blocks used by
+ * super block and group_descriptors.
+ *
+ * Returns errcode_t of 0
+ */
+errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs,
+ dgrp_t group,
+ blk64_t *ret_super_blk,
+ blk64_t *ret_old_desc_blk,
+ blk64_t *ret_new_desc_blk,
+ blk_t *ret_used_blks)
+{
+ blk64_t group_block, super_blk = 0, old_desc_blk = 0, new_desc_blk = 0;
+ unsigned int meta_bg, meta_bg_size;
+ blk_t numblocks = 0;
+ blk64_t old_desc_blocks;
+ int has_super;
+
+ group_block = ext2fs_group_first_block2(fs, group);
+ if (group_block == 0 && fs->blocksize == 1024)
+ group_block = 1; /* Deal with 1024 blocksize && bigalloc */
+
+ if (ext2fs_has_feature_meta_bg(fs->super))
+ old_desc_blocks = fs->super->s_first_meta_bg;
+ else
+ old_desc_blocks =
+ fs->desc_blocks + fs->super->s_reserved_gdt_blocks;
+
+ has_super = ext2fs_bg_has_super(fs, group);
+
+ if (has_super) {
+ super_blk = group_block;
+ numblocks++;
+ }
+ meta_bg_size = EXT2_DESC_PER_BLOCK(fs->super);
+ meta_bg = group / meta_bg_size;
+
+ if (!ext2fs_has_feature_meta_bg(fs->super) ||
+ (meta_bg < fs->super->s_first_meta_bg)) {
+ if (has_super) {
+ old_desc_blk = group_block + 1;
+ numblocks += old_desc_blocks;
+ }
+ } else {
+ if (((group % meta_bg_size) == 0) ||
+ ((group % meta_bg_size) == 1) ||
+ ((group % meta_bg_size) == (meta_bg_size-1))) {
+ if (has_super)
+ has_super = 1;
+ new_desc_blk = group_block + has_super;
+ numblocks++;
+ }
+ }
+
+ if (ret_super_blk)
+ *ret_super_blk = super_blk;
+ if (ret_old_desc_blk)
+ *ret_old_desc_blk = old_desc_blk;
+ if (ret_new_desc_blk)
+ *ret_new_desc_blk = new_desc_blk;
+ if (ret_used_blks)
+ *ret_used_blks = numblocks;
+
+ return 0;
+}
+
+/*
+ * This function returns the location of the superblock, block group
+ * descriptors for a given block group. It currently returns the
+ * number of free blocks assuming that inode table and allocation
+ * bitmaps will be in the group. This is not necessarily the case
+ * when the flex_bg feature is enabled, so callers should take care!
+ * It was only really intended for use by mke2fs, and even there it's
+ * not that useful.
+ *
+ * The ext2fs_super_and_bgd_loc2() function is 64-bit block number
+ * capable and returns the number of blocks used by super block and
+ * group descriptors.
+ */
+int ext2fs_super_and_bgd_loc(ext2_filsys fs,
+ dgrp_t group,
+ blk_t *ret_super_blk,
+ blk_t *ret_old_desc_blk,
+ blk_t *ret_new_desc_blk,
+ int *ret_meta_bg)
+{
+ blk64_t ret_super_blk2;
+ blk64_t ret_old_desc_blk2;
+ blk64_t ret_new_desc_blk2;
+ blk_t ret_used_blks;
+ blk_t numblocks;
+ unsigned int meta_bg_size;
+
+ ext2fs_super_and_bgd_loc2(fs, group, &ret_super_blk2,
+ &ret_old_desc_blk2,
+ &ret_new_desc_blk2,
+ &ret_used_blks);
+
+ numblocks = ext2fs_group_blocks_count(fs, group);
+
+ if (ret_super_blk)
+ *ret_super_blk = (blk_t)ret_super_blk2;
+ if (ret_old_desc_blk)
+ *ret_old_desc_blk = (blk_t)ret_old_desc_blk2;
+ if (ret_new_desc_blk)
+ *ret_new_desc_blk = (blk_t)ret_new_desc_blk2;
+ if (ret_meta_bg) {
+ meta_bg_size = EXT2_DESC_PER_BLOCK(fs->super);
+ *ret_meta_bg = group / meta_bg_size;
+ }
+
+ numblocks -= 2 + fs->inode_blocks_per_group + ret_used_blks;
+
+ return numblocks;
+}
+
+/*
+ * This function forces out the primary superblock. We need to only
+ * write out those fields which we have changed, since if the
+ * filesystem is mounted, it may have changed some of the other
+ * fields.
+ *
+ * It takes as input a superblock which has already been byte swapped
+ * (if necessary).
+ *
+ */
+static errcode_t write_primary_superblock(ext2_filsys fs,
+ struct ext2_super_block *super)
+{
+ __u16 *old_super, *new_super;
+ int check_idx, write_idx, size;
+ errcode_t retval;
+
+ if (!fs->io->manager->write_byte || !fs->orig_super) {
+ fallback:
+ io_channel_set_blksize(fs->io, SUPERBLOCK_OFFSET);
+ retval = io_channel_write_blk64(fs->io, 1, -SUPERBLOCK_SIZE,
+ super);
+ io_channel_set_blksize(fs->io, fs->blocksize);
+ return retval;
+ }
+
+ old_super = (__u16 *) fs->orig_super;
+ new_super = (__u16 *) super;
+
+ for (check_idx = 0; check_idx < SUPERBLOCK_SIZE/2; check_idx++) {
+ if (old_super[check_idx] == new_super[check_idx])
+ continue;
+ write_idx = check_idx;
+ for (check_idx++; check_idx < SUPERBLOCK_SIZE/2; check_idx++)
+ if (old_super[check_idx] == new_super[check_idx])
+ break;
+ size = 2 * (check_idx - write_idx);
+#if 0
+ printf("Writing %d bytes starting at %d\n",
+ size, write_idx*2);
+#endif
+ retval = io_channel_write_byte(fs->io,
+ SUPERBLOCK_OFFSET + (2 * write_idx), size,
+ new_super + write_idx);
+ if (retval == EXT2_ET_UNIMPLEMENTED)
+ goto fallback;
+ if (retval)
+ return retval;
+ }
+ memcpy(fs->orig_super, super, SUPERBLOCK_SIZE);
+ return 0;
+}
+
+
+/*
+ * Updates the revision to EXT2_DYNAMIC_REV
+ */
+void ext2fs_update_dynamic_rev(ext2_filsys fs)
+{
+ struct ext2_super_block *sb = fs->super;
+
+ if (sb->s_rev_level > EXT2_GOOD_OLD_REV)
+ return;
+
+ sb->s_rev_level = EXT2_DYNAMIC_REV;
+ sb->s_first_ino = EXT2_GOOD_OLD_FIRST_INO;
+ sb->s_inode_size = EXT2_GOOD_OLD_INODE_SIZE;
+ /* s_uuid is handled by e2fsck already */
+ /* other fields should be left alone */
+}
+
+static errcode_t write_backup_super(ext2_filsys fs, dgrp_t group,
+ blk64_t group_block,
+ struct ext2_super_block *super_shadow)
+{
+ errcode_t retval;
+ dgrp_t sgrp = group;
+
+ if (sgrp > ((1 << 16) - 1))
+ sgrp = (1 << 16) - 1;
+
+ super_shadow->s_block_group_nr = ext2fs_cpu_to_le16(sgrp);
+
+ retval = ext2fs_superblock_csum_set(fs, super_shadow);
+ if (retval)
+ return retval;
+
+ return io_channel_write_blk64(fs->io, group_block, -SUPERBLOCK_SIZE,
+ super_shadow);
+}
+
+errcode_t ext2fs_flush(ext2_filsys fs)
+{
+ return ext2fs_flush2(fs, 0);
+}
+
+errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
+{
+ dgrp_t i;
+ errcode_t retval;
+ unsigned long fs_state;
+ __u32 feature_incompat;
+ struct ext2_super_block *super_shadow = 0;
+ struct opaque_ext2_group_desc *group_shadow = 0;
+#ifdef WORDS_BIGENDIAN
+ struct ext2_group_desc *gdp;
+ dgrp_t j;
+#endif
+ char *group_ptr;
+ blk64_t old_desc_blocks;
+ struct ext2fs_numeric_progress_struct progress;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if ((fs->flags & EXT2_FLAG_SUPER_ONLY) == 0 &&
+ !ext2fs_has_feature_journal_dev(fs->super) &&
+ fs->group_desc == NULL)
+ return EXT2_ET_NO_GDESC;
+
+ fs_state = fs->super->s_state;
+ feature_incompat = fs->super->s_feature_incompat;
+
+ fs->super->s_wtime = fs->now ? fs->now : time(NULL);
+ fs->super->s_block_group_nr = 0;
+
+ /*
+ * If the write_bitmaps() function is present, call it to
+ * flush the bitmaps. This is done this way so that a simple
+ * program that doesn't mess with the bitmaps doesn't need to
+ * drag in the bitmaps.c code.
+ *
+ * Bitmap checksums live in the group descriptor, so the
+ * bitmaps need to be written before the descriptors.
+ */
+ if (fs->write_bitmaps) {
+ retval = fs->write_bitmaps(fs);
+ if (retval)
+ goto errout;
+ }
+
+ /*
+ * Set the state of the FS to be non-valid. (The state has
+ * already been backed up earlier, and will be restored after
+ * we write out the backup superblocks.)
+ */
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ ext2fs_clear_feature_journal_needs_recovery(fs->super);
+
+ /* Byte swap the superblock and the group descriptors if necessary */
+#ifdef WORDS_BIGENDIAN
+ retval = EXT2_ET_NO_MEMORY;
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, &super_shadow);
+ if (retval)
+ goto errout;
+ memcpy(super_shadow, fs->super, sizeof(struct ext2_super_block));
+ ext2fs_swap_super(super_shadow);
+
+ if (((fs->flags & EXT2_FLAG_SUPER_ONLY) == 0) &&
+ !ext2fs_has_feature_journal_dev(fs->super)) {
+ retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
+ &group_shadow);
+ if (retval)
+ goto errout;
+ memcpy(group_shadow, fs->group_desc, (size_t) fs->blocksize *
+ fs->desc_blocks);
+
+ for (j = 0; j < fs->group_desc_count; j++) {
+ gdp = ext2fs_group_desc(fs, group_shadow, j);
+ ext2fs_swap_group_desc2(fs, gdp);
+ }
+ }
+#else
+ super_shadow = fs->super;
+ group_shadow = fs->group_desc;
+#endif
+
+ /*
+ * If this is an external journal device, don't write out the
+ * block group descriptors or any of the backup superblocks
+ */
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ goto write_primary_superblock_only;
+
+ /*
+ * Write out the master group descriptors, and the backup
+ * superblocks and group descriptors.
+ */
+ group_ptr = (char *) group_shadow;
+ if (ext2fs_has_feature_meta_bg(fs->super)) {
+ old_desc_blocks = fs->super->s_first_meta_bg;
+ if (old_desc_blocks > fs->desc_blocks)
+ old_desc_blocks = fs->desc_blocks;
+ } else
+ old_desc_blocks = fs->desc_blocks;
+
+ if (fs->progress_ops && fs->progress_ops->init)
+ (fs->progress_ops->init)(fs, &progress, NULL,
+ fs->group_desc_count);
+
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ blk64_t super_blk, old_desc_blk, new_desc_blk;
+
+ if (fs->progress_ops && fs->progress_ops->update)
+ (fs->progress_ops->update)(fs, &progress, i);
+ ext2fs_super_and_bgd_loc2(fs, i, &super_blk, &old_desc_blk,
+ &new_desc_blk, 0);
+
+ if (!(fs->flags & EXT2_FLAG_MASTER_SB_ONLY) &&i && super_blk) {
+ retval = write_backup_super(fs, i, super_blk,
+ super_shadow);
+ if (retval)
+ goto errout;
+ }
+ if (fs->flags & EXT2_FLAG_SUPER_ONLY)
+ continue;
+ if ((old_desc_blk) &&
+ (!(fs->flags & EXT2_FLAG_MASTER_SB_ONLY) || (i == 0))) {
+ retval = io_channel_write_blk64(fs->io,
+ old_desc_blk, old_desc_blocks, group_ptr);
+ if (retval)
+ goto errout;
+ }
+ if (new_desc_blk) {
+ int meta_bg = i / EXT2_DESC_PER_BLOCK(fs->super);
+
+ retval = io_channel_write_blk64(fs->io, new_desc_blk,
+ 1, group_ptr + (meta_bg*fs->blocksize));
+ if (retval)
+ goto errout;
+ }
+ }
+
+ if (fs->progress_ops && fs->progress_ops->close)
+ (fs->progress_ops->close)(fs, &progress, NULL);
+
+write_primary_superblock_only:
+ /*
+ * Write out master superblock. This has to be done
+ * separately, since it is located at a fixed location
+ * (SUPERBLOCK_OFFSET). We flush all other pending changes
+ * out to disk first, just to avoid a race condition with an
+ * insy-tinsy window....
+ */
+
+ fs->super->s_block_group_nr = 0;
+ fs->super->s_state = fs_state;
+ fs->super->s_feature_incompat = feature_incompat;
+#ifdef WORDS_BIGENDIAN
+ *super_shadow = *fs->super;
+ ext2fs_swap_super(super_shadow);
+#endif
+
+ retval = ext2fs_superblock_csum_set(fs, super_shadow);
+ if (retval)
+ return retval;
+
+ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) {
+ retval = io_channel_flush(fs->io);
+ if (retval)
+ goto errout;
+ }
+ retval = write_primary_superblock(fs, super_shadow);
+ if (retval)
+ goto errout;
+
+ fs->flags &= ~EXT2_FLAG_DIRTY;
+
+ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) {
+ retval = io_channel_flush(fs->io);
+ if (retval)
+ goto errout;
+ }
+errout:
+ fs->super->s_state = fs_state;
+#ifdef WORDS_BIGENDIAN
+ if (super_shadow)
+ ext2fs_free_mem(&super_shadow);
+ if (group_shadow)
+ ext2fs_free_mem(&group_shadow);
+#endif
+ return retval;
+}
+
+errcode_t ext2fs_close_free(ext2_filsys *fs_ptr)
+{
+ errcode_t ret;
+ ext2_filsys fs = *fs_ptr;
+
+ ret = ext2fs_close2(fs, 0);
+ if (ret)
+ ext2fs_free(fs);
+ *fs_ptr = NULL;
+ return ret;
+}
+
+errcode_t ext2fs_close(ext2_filsys fs)
+{
+ return ext2fs_close2(fs, 0);
+}
+
+errcode_t ext2fs_close2(ext2_filsys fs, int flags)
+{
+ errcode_t retval;
+ int meta_blks;
+ io_stats stats = 0;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (fs->write_bitmaps) {
+ retval = fs->write_bitmaps(fs);
+ if (retval)
+ return retval;
+ }
+ if (fs->super->s_kbytes_written &&
+ fs->io->manager->get_stats)
+ fs->io->manager->get_stats(fs->io, &stats);
+ if (stats && stats->bytes_written && (fs->flags & EXT2_FLAG_RW)) {
+ fs->super->s_kbytes_written += stats->bytes_written >> 10;
+ meta_blks = fs->desc_blocks + 1;
+ if (!(fs->flags & EXT2_FLAG_SUPER_ONLY))
+ fs->super->s_kbytes_written += meta_blks /
+ (fs->blocksize / 1024);
+ if ((fs->flags & EXT2_FLAG_DIRTY) == 0)
+ fs->flags |= EXT2_FLAG_SUPER_ONLY | EXT2_FLAG_DIRTY;
+ }
+ if (fs->flags & EXT2_FLAG_DIRTY) {
+ retval = ext2fs_flush2(fs, flags);
+ if (retval)
+ return retval;
+ }
+
+ retval = ext2fs_mmp_stop(fs);
+ if (retval)
+ return retval;
+
+ ext2fs_free(fs);
+ return 0;
+}
+
diff --git a/lib/ext2fs/compiler.h b/lib/ext2fs/compiler.h
new file mode 100644
index 0000000..3bb3521
--- /dev/null
+++ b/lib/ext2fs/compiler.h
@@ -0,0 +1,26 @@
+#ifndef _EXT2FS_COMPILER_H
+#define _EXT2FS_COMPILER_H
+
+#include <stddef.h>
+
+#ifdef __GNUC__
+
+#ifndef __GNUC_PREREQ
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+#define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+#else
+#define __GNUC_PREREQ(maj, min) 0
+#endif
+#endif
+
+#define container_of(ptr, type, member) ({ \
+ __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
+ (type *)( (char *)__mptr - offsetof(type,member) );})
+#else
+#define container_of(ptr, type, member) \
+ ((type *)((char *)(ptr) - offsetof(type, member)))
+#endif
+
+
+#endif /* _EXT2FS_COMPILER_H */
diff --git a/lib/ext2fs/crc16.c b/lib/ext2fs/crc16.c
new file mode 100644
index 0000000..2fdeb24
--- /dev/null
+++ b/lib/ext2fs/crc16.c
@@ -0,0 +1,74 @@
+/*
+ * crc16.c
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+
+#include "config.h"
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <ext2fs/ext2_types.h>
+
+#include "crc16.h"
+
+/** CRC table for the CRC-16. The poly is 0x8005 (x16 + x15 + x2 + 1) */
+static __u16 const crc16_table[256] = {
+ 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
+ 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,
+ 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40,
+ 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841,
+ 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40,
+ 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41,
+ 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641,
+ 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040,
+ 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240,
+ 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441,
+ 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41,
+ 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840,
+ 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41,
+ 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40,
+ 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640,
+ 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041,
+ 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240,
+ 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441,
+ 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41,
+ 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840,
+ 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41,
+ 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40,
+ 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640,
+ 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041,
+ 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241,
+ 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440,
+ 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40,
+ 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841,
+ 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40,
+ 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41,
+ 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641,
+ 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
+};
+
+/**
+ * Compute the CRC-16 for the data buffer
+ *
+ * @param crc previous CRC value
+ * @param buffer data pointer
+ * @param len number of bytes in the buffer
+ * @return the updated CRC value
+ */
+crc16_t ext2fs_crc16(crc16_t crc, const void *buffer, unsigned int len)
+{
+ const unsigned char *cp = buffer;
+
+ while (len--)
+ /*
+ * for an unknown reason, PPC treats __u16 as signed
+ * and keeps doing sign extension on the value.
+ * Instead, use only the low 16 bits of an unsigned
+ * int for holding the CRC value to avoid this.
+ */
+ crc = (((crc >> 8) & 0xffU) ^
+ crc16_table[(crc ^ *cp++) & 0xffU]) & 0x0000ffffU;
+ return crc;
+}
diff --git a/lib/ext2fs/crc16.h b/lib/ext2fs/crc16.h
new file mode 100644
index 0000000..322e68d
--- /dev/null
+++ b/lib/ext2fs/crc16.h
@@ -0,0 +1,26 @@
+/*
+ * crc16.h - CRC-16 routine
+ *
+ * Implements the standard CRC-16:
+ * Width 16
+ * Poly 0x8005 (x16 + x15 + x2 + 1)
+ * Init 0
+ *
+ * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com>
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+
+#ifndef __CRC16_H
+#define __CRC16_H
+
+/* for an unknown reason, PPC treats __u16 as signed and keeps doing sign
+ * extension on the value. Instead, use only the low 16 bits of an
+ * unsigned int for holding the CRC value to avoid this.
+ */
+typedef unsigned int crc16_t;
+
+extern crc16_t ext2fs_crc16(crc16_t crc, const void *buffer, unsigned int len);
+
+#endif /* __CRC16_H */
diff --git a/lib/ext2fs/crc32c.c b/lib/ext2fs/crc32c.c
new file mode 100644
index 0000000..df5cf9b
--- /dev/null
+++ b/lib/ext2fs/crc32c.c
@@ -0,0 +1,938 @@
+/*
+ * crc32c.c
+ *
+ * August 26, 2011 Darrick J. Wong <djwong at us.ibm.com>
+ * Reuse Bob Pearson's slice-by-8 implementation for e2fsprogs.
+ *
+ * July 20, 2011 Bob Pearson <rpearson at systemfabricworks.com>
+ * added slice by 8 algorithm to the existing conventional and
+ * slice by 4 algorithms.
+ *
+ * Oct 15, 2000 Matt Domsch <Matt_Domsch@dell.com>
+ * Nicer crc32 functions/docs submitted by linux@horizon.com. Thanks!
+ * Code was from the public domain, copyright abandoned. Code was
+ * subsequently included in the kernel, thus was re-licensed under the
+ * GNU GPL v2.
+ *
+ * Oct 12, 2000 Matt Domsch <Matt_Domsch@dell.com>
+ * Same crc32 function was used in 5 other places in the kernel.
+ * I made one version, and deleted the others.
+ * There are various incantations of crc32(). Some use a seed of 0 or ~0.
+ * Some xor at the end with ~0. The generic crc32() function takes
+ * seed as an argument, and doesn't xor at the end. Then individual
+ * users can do whatever they need.
+ * drivers/net/smc9194.c uses seed ~0, doesn't xor with ~0.
+ * fs/jffs2 uses seed 0, doesn't xor with ~0.
+ * fs/partitions/efi.c uses seed ~0, xor's with ~0.
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+#include "config.h"
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#define min(x, y) ((x) > (y) ? (y) : (x))
+#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
+#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
+#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
+#define PTR_ALIGN(p, a) ((__typeof__(p))ALIGN((unsigned long)(p), (a)))
+#include "crc32c_defs.h"
+
+#include "ext2fs.h"
+#ifdef WORDS_BIGENDIAN
+#define __constant_cpu_to_le32(x) ___constant_swab32((x))
+#define __constant_cpu_to_be32(x) (x)
+#define __be32_to_cpu(x) (x)
+#define __cpu_to_be32(x) (x)
+#define __cpu_to_le32(x) (ext2fs_cpu_to_le32((x)))
+#define __le32_to_cpu(x) (ext2fs_le32_to_cpu((x)))
+#else
+#define __constant_cpu_to_le32(x) (x)
+#define __constant_cpu_to_be32(x) ___constant_swab32((x))
+#define __be32_to_cpu(x) (ext2fs_be32_to_cpu((x)))
+#define __cpu_to_be32(x) (ext2fs_cpu_to_be32((x)))
+#define __cpu_to_le32(x) (x)
+#define __le32_to_cpu(x) (x)
+#endif
+
+#if CRC_LE_BITS > 8
+# define tole(x) __constant_cpu_to_le32(x)
+#else
+# define tole(x) (x)
+#endif
+
+#if CRC_BE_BITS > 8
+# define tobe(x) __constant_cpu_to_be32(x)
+#else
+# define tobe(x) (x)
+#endif
+
+#include "crc32c_table.h"
+
+#if CRC_LE_BITS > 8 || CRC_BE_BITS > 8
+
+#if CRC_LE_BITS < 64 && CRC_BE_BITS < 64
+#define CRC_INLINE inline
+#else
+#define CRC_INLINE
+#endif
+
+/* implements slicing-by-4 or slicing-by-8 algorithm */
+static CRC_INLINE uint32_t
+crc32_body(uint32_t crc, unsigned char const *buf, size_t len,
+ const uint32_t (*tab)[256])
+{
+# ifndef WORDS_BIGENDIAN
+# define DO_CRC(x) (crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8))
+# define DO_CRC4 (t3[(q) & 255] ^ t2[(q >> 8) & 255] ^ \
+ t1[(q >> 16) & 255] ^ t0[(q >> 24) & 255])
+# define DO_CRC8 (t7[(q) & 255] ^ t6[(q >> 8) & 255] ^ \
+ t5[(q >> 16) & 255] ^ t4[(q >> 24) & 255])
+# else
+# define DO_CRC(x) (crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8))
+# define DO_CRC4 (t0[(q) & 255] ^ t1[(q >> 8) & 255] ^ \
+ t2[(q >> 16) & 255] ^ t3[(q >> 24) & 255])
+# define DO_CRC8 (t4[(q) & 255] ^ t5[(q >> 8) & 255] ^ \
+ t6[(q >> 16) & 255] ^ t7[(q >> 24) & 255])
+# endif
+ const uint32_t *b;
+ size_t rem_len;
+ const uint32_t *t0 = tab[0], *t1 = tab[1], *t2 = tab[2], *t3 = tab[3];
+ const uint32_t *t4 = tab[4], *t5 = tab[5], *t6 = tab[6], *t7 = tab[7];
+ uint32_t q;
+
+ /* Align it */
+ if (unlikely((uintptr_t)buf & 3 && len)) {
+ do {
+ DO_CRC(*buf++);
+ } while ((--len) && ((uintptr_t)buf)&3);
+ }
+
+# if CRC_LE_BITS == 32
+ rem_len = len & 3;
+ len = len >> 2;
+# else
+ rem_len = len & 7;
+ len = len >> 3;
+# endif
+
+ b = (const uint32_t *)buf;
+ for (--b; len; --len) {
+ q = crc ^ *++b; /* use pre increment for speed */
+# if CRC_LE_BITS == 32
+ crc = DO_CRC4;
+# else
+ crc = DO_CRC8;
+ q = *++b;
+ crc ^= DO_CRC4;
+# endif
+ }
+ len = rem_len;
+ /* And the last few bytes */
+ if (len) {
+ const uint8_t *p = (const uint8_t *)(b + 1) - 1;
+ do {
+ DO_CRC(*++p); /* use pre increment for speed */
+ } while (--len);
+ }
+ return crc;
+#undef DO_CRC
+#undef DO_CRC4
+#undef DO_CRC8
+}
+#endif
+
+/**
+ * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32
+ * @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for
+ * other uses, or the previous crc32 value if computing incrementally.
+ * @p: pointer to buffer over which CRC is run
+ * @len: length of buffer @p
+ */
+static inline uint32_t crc32_le_generic(uint32_t crc, unsigned char const *p,
+ size_t len, const uint32_t (*tab)[256],
+ uint32_t polynomial EXT2FS_ATTR((unused)))
+{
+#if CRC_LE_BITS == 1
+ int i;
+ while (len--) {
+ crc ^= *p++;
+ for (i = 0; i < 8; i++)
+ crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0);
+ }
+# elif CRC_LE_BITS == 2
+ while (len--) {
+ crc ^= *p++;
+ crc = (crc >> 2) ^ tab[0][crc & 3];
+ crc = (crc >> 2) ^ tab[0][crc & 3];
+ crc = (crc >> 2) ^ tab[0][crc & 3];
+ crc = (crc >> 2) ^ tab[0][crc & 3];
+ }
+# elif CRC_LE_BITS == 4
+ while (len--) {
+ crc ^= *p++;
+ crc = (crc >> 4) ^ tab[0][crc & 15];
+ crc = (crc >> 4) ^ tab[0][crc & 15];
+ }
+# elif CRC_LE_BITS == 8
+ /* aka Sarwate algorithm */
+ while (len--) {
+ crc ^= *p++;
+ crc = (crc >> 8) ^ tab[0][crc & 255];
+ }
+# else
+ crc = __cpu_to_le32(crc);
+ crc = crc32_body(crc, p, len, tab);
+ crc = __le32_to_cpu(crc);
+#endif
+ return crc;
+}
+
+uint32_t ext2fs_crc32c_le(uint32_t crc, unsigned char const *p, size_t len)
+{
+ return crc32_le_generic(crc, p, len, crc32ctable_le, CRC32C_POLY_LE);
+}
+
+/**
+ * crc32_be() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32
+ * @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for
+ * other uses, or the previous crc32 value if computing incrementally.
+ * @p: pointer to buffer over which CRC is run
+ * @len: length of buffer @p
+ */
+static inline uint32_t crc32_be_generic(uint32_t crc, unsigned char const *p,
+ size_t len, const uint32_t (*tab)[256],
+ uint32_t polynomial EXT2FS_ATTR((unused)))
+{
+#if CRC_BE_BITS == 1
+ int i;
+ while (len--) {
+ crc ^= *p++ << 24;
+ for (i = 0; i < 8; i++)
+ crc =
+ (crc << 1) ^ ((crc & 0x80000000) ? polynomial :
+ 0);
+ }
+# elif CRC_BE_BITS == 2
+ while (len--) {
+ crc ^= *p++ << 24;
+ crc = (crc << 2) ^ tab[0][crc >> 30];
+ crc = (crc << 2) ^ tab[0][crc >> 30];
+ crc = (crc << 2) ^ tab[0][crc >> 30];
+ crc = (crc << 2) ^ tab[0][crc >> 30];
+ }
+# elif CRC_BE_BITS == 4
+ while (len--) {
+ crc ^= *p++ << 24;
+ crc = (crc << 4) ^ tab[0][crc >> 28];
+ crc = (crc << 4) ^ tab[0][crc >> 28];
+ }
+# elif CRC_BE_BITS == 8
+ while (len--) {
+ crc ^= *p++ << 24;
+ crc = (crc << 8) ^ tab[0][crc >> 24];
+ }
+# else
+ crc = __cpu_to_be32(crc);
+ crc = crc32_body(crc, p, len, tab);
+ crc = __be32_to_cpu(crc);
+# endif
+ return crc;
+}
+
+uint32_t ext2fs_crc32_be(uint32_t crc, unsigned char const *p, size_t len)
+{
+ return crc32_be_generic(crc, p, len, crc32table_be, CRCPOLY_BE);
+}
+
+#ifdef UNITTEST
+static uint8_t test_buf[] = {
+ 0xd9, 0xd7, 0x6a, 0x13, 0x3a, 0xb1, 0x05, 0x48,
+ 0xda, 0xad, 0x14, 0xbd, 0x03, 0x3a, 0x58, 0x5e,
+ 0x6e, 0xd1, 0x56, 0xc9, 0x2e, 0xc4, 0xcb, 0x6b,
+ 0xe8, 0x77, 0x52, 0x37, 0x4e, 0x0f, 0x55, 0xd2,
+ 0x12, 0x65, 0x90, 0xc2, 0x41, 0x49, 0x81, 0x01,
+ 0xf5, 0x01, 0xeb, 0x2d, 0x78, 0x74, 0x23, 0x5d,
+ 0x84, 0x5c, 0x81, 0x92, 0x21, 0xe9, 0x8d, 0x1d,
+ 0x89, 0xf2, 0x4a, 0xac, 0xdd, 0xf9, 0xaf, 0xee,
+ 0x44, 0xe7, 0x6e, 0xed, 0xfb, 0xd8, 0x89, 0x0e,
+ 0x96, 0x62, 0xcd, 0xa4, 0x4b, 0xa9, 0xe5, 0x45,
+ 0xb1, 0x29, 0x9b, 0x0f, 0xfc, 0xbd, 0x83, 0xab,
+ 0xa8, 0x54, 0x96, 0x44, 0x2c, 0x7f, 0xbb, 0xe7,
+ 0x52, 0x29, 0x08, 0xee, 0x14, 0xc5, 0xc2, 0xec,
+ 0x5a, 0xeb, 0x40, 0x40, 0xea, 0xd1, 0x3d, 0x15,
+ 0x73, 0xaa, 0x8c, 0x73, 0xfc, 0xf2, 0x2b, 0x49,
+ 0x0b, 0x13, 0x96, 0xd9, 0x8e, 0x4b, 0xbc, 0xe0,
+ 0xf4, 0xd2, 0xe0, 0x2e, 0x7a, 0xf0, 0x5d, 0x1f,
+ 0xd2, 0x92, 0x97, 0xe0, 0xaa, 0x59, 0xab, 0xc9,
+ 0x5c, 0xa6, 0x51, 0x1a, 0xe3, 0xd6, 0x06, 0xb9,
+ 0xae, 0xb8, 0x76, 0x36, 0x79, 0x37, 0x52, 0xf6,
+ 0x34, 0xaf, 0x27, 0x19, 0xe1, 0xc0, 0x2b, 0xdd,
+ 0x01, 0x15, 0xcd, 0xce, 0x44, 0xf6, 0x4c, 0x18,
+ 0x92, 0x69, 0xbe, 0x8a, 0x76, 0x23, 0x52, 0x13,
+ 0x3f, 0xf9, 0xe0, 0xf5, 0x06, 0x28, 0x7c, 0xc7,
+ 0xf3, 0x42, 0x0f, 0xdd, 0x40, 0x33, 0xf7, 0x99,
+ 0xe2, 0xad, 0x26, 0xd9, 0x53, 0x10, 0x72, 0x0c,
+ 0x4e, 0x43, 0x4c, 0x61, 0xfe, 0xd9, 0xc1, 0x16,
+ 0xa1, 0x93, 0xca, 0x3c, 0x75, 0x7f, 0x07, 0x7a,
+ 0x65, 0xb3, 0x53, 0x2a, 0x52, 0x00, 0xa0, 0x62,
+ 0xe0, 0xa3, 0x1f, 0xad, 0xd7, 0xbb, 0xc0, 0x83,
+ 0x5d, 0x54, 0x87, 0x5f, 0xc8, 0x2f, 0xc8, 0xbf,
+ 0x69, 0x04, 0x91, 0xc8, 0xa6, 0x1d, 0x4d, 0x46,
+ 0x91, 0xfc, 0x26, 0xf4, 0x16, 0xd1, 0xa4, 0xbf,
+ 0x5c, 0xa2, 0x6c, 0xdd, 0xb4, 0x40, 0xf2, 0x2e,
+ 0xa2, 0xad, 0xf7, 0xf4, 0xa5, 0x8a, 0x3e, 0x23,
+ 0x64, 0x08, 0xc8, 0xa1, 0xa0, 0xf0, 0x5d, 0x70,
+ 0xd2, 0x77, 0xfd, 0xc8, 0x50, 0x83, 0x0f, 0xd6,
+ 0x2b, 0xe4, 0x1f, 0x52, 0x34, 0x33, 0x68, 0xfd,
+ 0x92, 0xbe, 0x9f, 0x97, 0x6b, 0x8d, 0x81, 0x91,
+ 0x0f, 0xef, 0x65, 0xc8, 0x0d, 0x15, 0x01, 0x77,
+ 0x58, 0xb2, 0xf4, 0x1b, 0x06, 0x7e, 0xf5, 0xca,
+ 0x15, 0x2e, 0x38, 0xd8, 0x81, 0x1c, 0x1c, 0xa0,
+ 0xb6, 0x13, 0x6a, 0x2b, 0x71, 0x34, 0x52, 0xd7,
+ 0x1d, 0xbd, 0x37, 0x59, 0xbc, 0x86, 0x25, 0x2b,
+ 0xa8, 0x93, 0xce, 0x1a, 0x03, 0x16, 0xfe, 0x01,
+ 0x57, 0x99, 0x24, 0x25, 0x2c, 0xb3, 0xab, 0x1e,
+ 0x2d, 0x65, 0x20, 0x89, 0x17, 0x02, 0x0e, 0x0a,
+ 0xf5, 0x1e, 0xc7, 0xff, 0x1f, 0x61, 0xa9, 0x54,
+ 0x18, 0xd4, 0xba, 0x50, 0x57, 0x02, 0xa1, 0xab,
+ 0x22, 0x2e, 0x07, 0xea, 0xa9, 0xa3, 0x83, 0x4f,
+ 0x27, 0xf5, 0xc5, 0xee, 0x3c, 0x3b, 0x10, 0xad,
+ 0x32, 0x2b, 0x1c, 0x03, 0xcb, 0xaf, 0x98, 0x83,
+ 0x54, 0xc3, 0x68, 0x63, 0xd4, 0xe0, 0x0e, 0x3c,
+ 0x1a, 0x4e, 0xc0, 0x81, 0xd0, 0xe8, 0x6a, 0x62,
+ 0x6b, 0x3e, 0x6f, 0xc4, 0xc6, 0x33, 0x4e, 0x26,
+ 0x21, 0xf5, 0x04, 0xdf, 0xfa, 0xce, 0x45, 0xaf,
+ 0xdc, 0x5e, 0x1b, 0xad, 0x93, 0xca, 0xf5, 0xcf,
+ 0xd7, 0xee, 0x0c, 0x5c, 0x5e, 0xb4, 0xf0, 0x92,
+ 0xd2, 0xf2, 0xf0, 0xa9, 0x1e, 0xab, 0x80, 0x68,
+ 0x46, 0xef, 0xcc, 0x26, 0x0c, 0x5c, 0xdd, 0x4e,
+ 0x83, 0xb8, 0xb9, 0x53, 0x6e, 0xf8, 0x93, 0x38,
+ 0x67, 0xa4, 0x41, 0x87, 0x72, 0xe7, 0x7e, 0x86,
+ 0xc9, 0x49, 0x00, 0x33, 0xb1, 0x38, 0x6c, 0x71,
+ 0xd7, 0x1d, 0x8e, 0x61, 0x01, 0xb6, 0x57, 0xa9,
+ 0xf1, 0xac, 0x15, 0xc2, 0x83, 0x77, 0xca, 0x64,
+ 0xca, 0x7b, 0x6c, 0xa1, 0x10, 0x1b, 0x13, 0xd0,
+ 0xd3, 0x9e, 0x9e, 0x10, 0x70, 0xc8, 0x1a, 0xbb,
+ 0x3f, 0x19, 0x86, 0xab, 0x01, 0x0e, 0xea, 0x34,
+ 0x22, 0xea, 0xe2, 0x15, 0xb7, 0xed, 0x21, 0x21,
+ 0x75, 0xa5, 0xe7, 0x08, 0xa1, 0x38, 0xe0, 0x91,
+ 0x05, 0x60, 0xea, 0xa7, 0x50, 0x27, 0x18, 0x07,
+ 0x9d, 0xe0, 0x18, 0x2b, 0xd4, 0x07, 0x59, 0x00,
+ 0xe6, 0x45, 0x18, 0x2a, 0x30, 0x6e, 0xf3, 0xb4,
+ 0xd0, 0xef, 0xa6, 0x5b, 0x71, 0xa2, 0x5a, 0x3b,
+ 0x89, 0x4c, 0xaf, 0x3f, 0xcb, 0x9f, 0x03, 0xfb,
+ 0x43, 0x7c, 0x6b, 0xd3, 0x6a, 0xea, 0xce, 0x4a,
+ 0x5f, 0x64, 0xb5, 0x62, 0xda, 0x5d, 0x27, 0xb7,
+ 0xb8, 0x11, 0xca, 0x33, 0x30, 0xec, 0x70, 0xf0,
+ 0x1b, 0x03, 0x50, 0xff, 0x5e, 0xa6, 0x08, 0xde,
+ 0x37, 0x70, 0xc0, 0x81, 0x55, 0x60, 0x17, 0xa1,
+ 0x85, 0xae, 0x26, 0x44, 0xe4, 0x67, 0x3c, 0x91,
+ 0xfd, 0xc4, 0x3d, 0x97, 0x72, 0x23, 0xf3, 0x3c,
+ 0x8f, 0xe0, 0xe2, 0xf2, 0x09, 0x96, 0x10, 0x67,
+ 0xb5, 0xfe, 0xff, 0x3d, 0x4a, 0xc8, 0x62, 0x11,
+ 0xa5, 0x98, 0xc1, 0x2d, 0x40, 0x82, 0x88, 0x8b,
+ 0xe5, 0xb0, 0x75, 0xbf, 0x2f, 0xa8, 0x6a, 0x55,
+ 0x49, 0x2e, 0x9c, 0x29, 0xd2, 0x7c, 0xbf, 0xf3,
+ 0xaa, 0x3a, 0x16, 0x4a, 0xa4, 0x15, 0xf3, 0x48,
+ 0xde, 0x38, 0x13, 0x44, 0x26, 0x02, 0xe6, 0xe9,
+ 0xa8, 0x24, 0x89, 0xb5, 0x43, 0x95, 0xe4, 0x4c,
+ 0xc3, 0xa0, 0xdf, 0xcc, 0x42, 0xf8, 0x8d, 0xb0,
+ 0x3b, 0xea, 0x10, 0xb7, 0xe1, 0x40, 0x54, 0xb9,
+ 0xa3, 0x2d, 0xfb, 0xb4, 0x91, 0xc0, 0x3e, 0x94,
+ 0xf1, 0xa1, 0x3c, 0xbe, 0xef, 0xb8, 0x70, 0x55,
+ 0x0a, 0x26, 0x93, 0xbf, 0xe6, 0x21, 0x92, 0x32,
+ 0x3c, 0x39, 0x27, 0x6a, 0x23, 0x48, 0x02, 0x35,
+ 0x3c, 0xd4, 0xcc, 0x04, 0xc0, 0x4e, 0xa7, 0x02,
+ 0x63, 0x37, 0xc2, 0xb8, 0x56, 0x1d, 0x57, 0x57,
+ 0x42, 0x04, 0x8d, 0xee, 0xcf, 0x8b, 0xc9, 0xc3,
+ 0xba, 0x3b, 0x15, 0xd7, 0xaf, 0xbf, 0x9e, 0xcd,
+ 0x44, 0xcf, 0xf0, 0x00, 0xb7, 0x3a, 0xfc, 0xa8,
+ 0x12, 0xab, 0x3a, 0x62, 0x01, 0x21, 0x46, 0xe9,
+ 0x1e, 0x48, 0x37, 0xfc, 0x13, 0x4d, 0xf6, 0x2a,
+ 0x72, 0x40, 0x75, 0x38, 0x71, 0xf2, 0x17, 0x20,
+ 0x2c, 0xdd, 0xc0, 0x49, 0xbc, 0x63, 0x33, 0xea,
+ 0x06, 0x75, 0x41, 0xe7, 0x5c, 0x1f, 0xfb, 0xf9,
+ 0x68, 0x83, 0xc2, 0x5a, 0x4a, 0x1e, 0x61, 0x08,
+ 0x57, 0xf3, 0x00, 0xba, 0x77, 0x92, 0x63, 0xa5,
+ 0xb7, 0xfe, 0x97, 0x22, 0xda, 0x5e, 0xd3, 0xaf,
+ 0xbc, 0x89, 0x0d, 0x4c, 0x37, 0xa9, 0x27, 0x4a,
+ 0x7f, 0xdb, 0x81, 0x39, 0x11, 0x86, 0x12, 0xf9,
+ 0x10, 0x50, 0xe4, 0xdb, 0x72, 0xf9, 0xae, 0x10,
+ 0x7c, 0xed, 0x50, 0x5c, 0x61, 0xeb, 0x42, 0x1e,
+ 0xa4, 0xf4, 0xf0, 0xfa, 0x45, 0x4d, 0x95, 0x2b,
+ 0xd4, 0x67, 0x4a, 0xe3, 0x8a, 0x15, 0x55, 0x92,
+ 0x77, 0x64, 0x8c, 0x51, 0x38, 0xf9, 0x26, 0x3e,
+ 0x68, 0xe2, 0xac, 0xbb, 0x64, 0x77, 0xe2, 0x82,
+ 0xa4, 0x42, 0x41, 0x38, 0xa0, 0xf0, 0xc9, 0xd8,
+ 0x6c, 0xe0, 0xef, 0x4c, 0xda, 0xb4, 0x92, 0xef,
+ 0x1b, 0xe3, 0x9b, 0xc1, 0x44, 0x3c, 0xb9, 0xb7,
+ 0x39, 0xac, 0x5c, 0x32, 0x39, 0xb4, 0x21, 0x85,
+ 0x93, 0xbc, 0xf2, 0x51, 0x43, 0xb7, 0xae, 0x1e,
+ 0x61, 0x9c, 0x38, 0x9c, 0xaa, 0xff, 0xde, 0xfc,
+ 0xbf, 0x85, 0xef, 0x17, 0x34, 0x36, 0x71, 0x5f,
+ 0x04, 0x16, 0xa6, 0x9e, 0xfd, 0x3a, 0x03, 0xd8,
+ 0xbf, 0x71, 0x70, 0x20, 0x8f, 0x7c, 0xfb, 0xff,
+ 0x61, 0xe0, 0xe2, 0x60, 0xa7, 0xb1, 0xc0, 0xe0,
+ 0xd9, 0x3f, 0xdc, 0x8d, 0x4a, 0xa4, 0x52, 0x61,
+ 0xaf, 0x9d, 0xdf, 0x8a, 0x0d, 0x41, 0xc0, 0x25,
+ 0x68, 0x12, 0x7b, 0xd5, 0xc7, 0xdb, 0x68, 0x70,
+ 0x2d, 0x7d, 0x95, 0x12, 0x03, 0x23, 0x0c, 0xe8,
+ 0x14, 0x41, 0x11, 0x28, 0xec, 0x9d, 0xd3, 0x28,
+ 0x77, 0x7a, 0x3c, 0x93, 0x8e, 0x5c, 0x7e, 0xb3,
+ 0x42, 0x9a, 0x18, 0x25, 0x93, 0xc8, 0xea, 0x43,
+ 0x1b, 0xbe, 0xd5, 0x27, 0xf1, 0xd4, 0xe0, 0x1e,
+ 0xce, 0xc7, 0xc7, 0x2c, 0x25, 0x35, 0x58, 0xb8,
+ 0x6c, 0xf3, 0xa2, 0xad, 0xe7, 0x58, 0x49, 0x47,
+ 0xf7, 0xca, 0xde, 0x8b, 0x81, 0xb7, 0x75, 0xf4,
+ 0x95, 0xa7, 0x5c, 0xc3, 0x2c, 0x0e, 0x1c, 0x52,
+ 0x9a, 0xc3, 0x2a, 0x00, 0x21, 0xa7, 0x51, 0x6b,
+ 0xf0, 0x05, 0x87, 0x8c, 0x42, 0x1b, 0xc3, 0x2e,
+ 0xa3, 0x76, 0x22, 0xd5, 0x7f, 0x56, 0x10, 0xef,
+ 0x98, 0x85, 0x65, 0x86, 0x71, 0x87, 0xd2, 0x8c,
+ 0xc0, 0x47, 0x20, 0xe8, 0xb5, 0x1c, 0xe3, 0xdd,
+ 0x3c, 0x5c, 0x03, 0xbb, 0x0e, 0x97, 0x3b, 0xe1,
+ 0x56, 0x9a, 0xd5, 0x0a, 0x63, 0xd5, 0x33, 0xaf,
+ 0x36, 0xca, 0xcf, 0x8f, 0x00, 0x28, 0xa3, 0x45,
+ 0xb8, 0xcd, 0xde, 0x73, 0xd4, 0xfa, 0x2d, 0x6f,
+ 0xdb, 0x93, 0xaa, 0xdd, 0x7f, 0xd2, 0x22, 0x9c,
+ 0x96, 0x48, 0x1e, 0xa8, 0x63, 0xbe, 0xbc, 0x0d,
+ 0x14, 0x3c, 0x2e, 0x11, 0x1f, 0xd2, 0xf4, 0x57,
+ 0xb3, 0x47, 0xf8, 0xa6, 0x1b, 0xc3, 0xa7, 0x95,
+ 0x2d, 0xd4, 0xca, 0xb8, 0x0d, 0xfb, 0x06, 0x85,
+ 0xda, 0x63, 0xf0, 0x3e, 0x9d, 0x5e, 0xee, 0xce,
+ 0xed, 0x74, 0x1d, 0x2c, 0x97, 0x3f, 0x71, 0x95,
+ 0x12, 0x03, 0xc5, 0x92, 0x46, 0x84, 0x1b, 0x07,
+ 0xe6, 0xb4, 0x1d, 0x3a, 0xf1, 0x89, 0x90, 0x50,
+ 0x10, 0x29, 0x34, 0xc0, 0x90, 0xbe, 0x4a, 0xa9,
+ 0x0d, 0xb0, 0x7b, 0xfb, 0x35, 0xee, 0x4e, 0x34,
+ 0xec, 0x5a, 0x58, 0xbc, 0xb8, 0xda, 0x38, 0x88,
+ 0x8c, 0x74, 0x1e, 0xc9, 0xab, 0x78, 0x2e, 0x2a,
+ 0x17, 0x8a, 0x43, 0x3d, 0xa1, 0x2a, 0x41, 0xb5,
+ 0xd6, 0xe8, 0x5b, 0xc5, 0x4a, 0x1c, 0x3c, 0x9f,
+ 0x8d, 0x3a, 0x69, 0x88, 0xf8, 0x80, 0xd2, 0x11,
+ 0xfc, 0x7e, 0x80, 0x8e, 0x7f, 0x85, 0x64, 0x9c,
+ 0x46, 0x58, 0xc8, 0x48, 0x98, 0x4b, 0xf5, 0x73,
+ 0x3f, 0x49, 0xce, 0x53, 0x2c, 0xd5, 0xfc, 0x33,
+ 0xf1, 0x6f, 0xd8, 0xe9, 0x2e, 0x70, 0x2e, 0xdc,
+ 0xe5, 0x43, 0x80, 0x38, 0xf2, 0x87, 0xed, 0x85,
+ 0xe4, 0x3e, 0x45, 0x14, 0x20, 0xcf, 0xa0, 0x61,
+ 0x4f, 0xe8, 0xd7, 0x5b, 0xb3, 0x0d, 0x0e, 0x4e,
+ 0x4d, 0xce, 0xbe, 0xba, 0xaa, 0x90, 0x09, 0xcb,
+ 0x4b, 0x5d, 0x08, 0xff, 0x52, 0xd5, 0x23, 0xbc,
+ 0xad, 0x8d, 0xd3, 0x06, 0x4a, 0xa0, 0x51, 0x56,
+ 0xa7, 0xd8, 0x33, 0xab, 0xbc, 0xd0, 0xdf, 0x92,
+ 0x87, 0x20, 0x2d, 0x7b, 0x5e, 0xfa, 0x30, 0xa7,
+ 0x06, 0x06, 0xe5, 0x4f, 0x2c, 0xb5, 0x61, 0xd7,
+ 0x54, 0xd3, 0xdf, 0xd0, 0x0a, 0xb0, 0x06, 0xce,
+ 0xf6, 0x86, 0xb7, 0x8e, 0xaa, 0x7b, 0x78, 0xd5,
+ 0xb9, 0xeb, 0x07, 0xac, 0x5f, 0xc5, 0xd2, 0x8c,
+ 0x40, 0xe0, 0x7f, 0x98, 0xd4, 0xe5, 0x4b, 0xca,
+ 0xfb, 0x47, 0xef, 0xef, 0xb9, 0x4d, 0x6d, 0x8f,
+ 0x82, 0x68, 0x74, 0x84, 0xe0, 0x0a, 0x93, 0x0f,
+ 0xb2, 0x01, 0xa9, 0x9f, 0x68, 0x6a, 0xe8, 0xf7,
+ 0xfb, 0x0b, 0xde, 0x17, 0xe0, 0x30, 0x38, 0x51,
+ 0xbc, 0x07, 0xb8, 0x2c, 0x91, 0x0f, 0xc1, 0x0e,
+ 0xa6, 0xf9, 0xf0, 0xd5, 0x48, 0x76, 0x8a, 0xde,
+ 0x74, 0xe3, 0x30, 0x65, 0x56, 0xb3, 0x5c, 0xe2,
+ 0x89, 0x8d, 0xda, 0x80, 0xad, 0x0f, 0x22, 0xfb,
+ 0x24, 0x1d, 0x16, 0xdd, 0x34, 0x4b, 0x90, 0x58,
+ 0x4e, 0x0c, 0x13, 0x28, 0xcf, 0x1d, 0xa4, 0xaa,
+ 0xb7, 0xf3, 0xb1, 0x66, 0xad, 0x3b, 0xcf, 0x79,
+ 0x12, 0x04, 0xd7, 0x79, 0xd9, 0x5f, 0xdf, 0x89,
+ 0xb2, 0x5b, 0xa7, 0x9a, 0x26, 0x1e, 0x67, 0x46,
+ 0x7c, 0x66, 0x95, 0x67, 0xe6, 0x45, 0x8b, 0x1f,
+ 0x65, 0x79, 0x9f, 0x6d, 0x11, 0x81, 0x17, 0x0d,
+ 0x11, 0xb0, 0x5c, 0xb4, 0xc7, 0x27, 0x87, 0xab,
+ 0x5d, 0x0a, 0x18, 0xae, 0x4e, 0x06, 0xa3, 0x3d,
+ 0xc7, 0xb0, 0x22, 0xba, 0x03, 0xa4, 0x0f, 0xe5,
+ 0x1c, 0x72, 0x2a, 0x04, 0xce, 0x83, 0xe9, 0xf3,
+ 0xd7, 0xc9, 0x67, 0x6c, 0x1e, 0x6b, 0x3c, 0x9b,
+ 0x0b, 0x5e, 0x6a, 0xa6, 0x79, 0x0a, 0xf1, 0xbe,
+ 0xd7, 0xb4, 0x6f, 0x45, 0x1e, 0xfb, 0x78, 0x97,
+ 0xaf, 0x34, 0x76, 0x95, 0x52, 0xf7, 0x3d, 0x5d,
+ 0x07, 0x28, 0x57, 0x9c, 0x4a, 0x0f, 0xcf, 0x0b,
+ 0x1b, 0xc4, 0xc2, 0x72, 0xd7, 0x72, 0x38, 0x9b,
+ 0xea, 0xeb, 0xee, 0xae, 0x34, 0xc8, 0x01, 0xd7,
+ 0xa5, 0xe3, 0xce, 0x41, 0xad, 0x02, 0x60, 0x23,
+ 0x18, 0x36, 0xba, 0x17, 0xfa, 0xcf, 0xe4, 0xda,
+ 0xdc, 0xfc, 0x82, 0xdc, 0x7c, 0x11, 0xf4, 0xb8,
+ 0x52, 0x5d, 0xf7, 0x2f, 0xc8, 0xfe, 0x4a, 0xe6,
+ 0xb9, 0xaf, 0x4b, 0x17, 0x18, 0x91, 0xc2, 0xfe,
+ 0xd7, 0x3a, 0x77, 0x0c, 0xa0, 0x43, 0x9c, 0x6f,
+ 0x13, 0x06, 0xbe, 0x6e, 0xe0, 0x1a, 0x3c, 0xf3,
+ 0xf5, 0xcc, 0x78, 0xfb, 0x5d, 0xd5, 0xda, 0xb7,
+ 0x58, 0xea, 0x86, 0x42, 0x6b, 0x32, 0xff, 0xb2,
+ 0xe2, 0xee, 0x03, 0x1f, 0xf4, 0xef, 0xdb, 0x53,
+ 0x79, 0xd5, 0x4e, 0xaf, 0x60, 0x8e, 0x02, 0xc2,
+ 0xcc, 0x39, 0x97, 0x7b, 0xfd, 0xa1, 0xf8, 0x7a,
+ 0x26, 0xe8, 0x55, 0xd6, 0xa4, 0x8b, 0xa0, 0x1b,
+ 0x2d, 0x63, 0xaa, 0x73, 0x71, 0x6e, 0xbf, 0x8b,
+ 0x3b, 0xe3, 0x1b, 0x0d, 0xbb, 0x2e, 0x44, 0x09,
+ 0x64, 0xac, 0xc7, 0x9e, 0xb5, 0xc6, 0x77, 0xb0,
+ 0x79, 0xb3, 0xaa, 0xfc, 0x67, 0x57, 0x9a, 0x50,
+ 0x81, 0x37, 0x14, 0x7c, 0xd7, 0xa0, 0xd4, 0x6a,
+ 0x79, 0x84, 0x51, 0x0e, 0x95, 0x0a, 0x30, 0xa3,
+ 0x60, 0x55, 0x48, 0x05, 0x16, 0xae, 0x43, 0x90,
+ 0xdc, 0x8e, 0x09, 0xbe, 0x79, 0xf6, 0x90, 0x74,
+ 0xf8, 0x20, 0x96, 0x4d, 0xa7, 0xf5, 0x1a, 0x2b,
+ 0xc7, 0x15, 0x9d, 0x18, 0xf7, 0x94, 0x87, 0xf7,
+ 0xf4, 0xfb, 0x0d, 0x61, 0xb6, 0xd7, 0xbe, 0x10,
+ 0x8e, 0x47, 0x3c, 0x10, 0x44, 0x90, 0x52, 0x21,
+ 0x83, 0xc0, 0xf5, 0x99, 0xaa, 0xbc, 0xf6, 0x55,
+ 0xae, 0xf5, 0xb2, 0xa4, 0xcd, 0x4d, 0xb9, 0x38,
+ 0x6c, 0xbc, 0x80, 0xc3, 0xad, 0xf4, 0x46, 0x31,
+ 0x01, 0x58, 0x2d, 0x88, 0x57, 0xc3, 0x23, 0xd1,
+ 0x64, 0xc9, 0xa3, 0x21, 0x6b, 0x8b, 0x8a, 0x23,
+ 0x2c, 0x4f, 0xa9, 0xcd, 0x67, 0xfa, 0x77, 0xad,
+ 0xa3, 0x16, 0xa2, 0xe5, 0x19, 0x14, 0x70, 0x41,
+ 0x5b, 0xda, 0x14, 0xde, 0xe3, 0xe5, 0xc1, 0x15,
+ 0xb4, 0x77, 0xa4, 0x9b, 0xb8, 0xb1, 0x28, 0x51,
+ 0x30, 0xb4, 0xf1, 0xf3, 0xf8, 0x6d, 0xd0, 0xc3,
+ 0x8c, 0x4c, 0x76, 0xb0, 0x9a, 0xdf, 0xc8, 0xbe,
+ 0xf8, 0x4a, 0x61, 0x6e, 0x3e, 0xd6, 0x3c, 0xe8,
+ 0xde, 0x56, 0xa0, 0x9c, 0x25, 0xbe, 0xce, 0x93,
+ 0x1f, 0x88, 0xfb, 0x9a, 0x1a, 0xe2, 0xff, 0x88,
+ 0xad, 0x10, 0xcb, 0x6c, 0xd6, 0xe7, 0x39, 0x0b,
+ 0xe5, 0x1a, 0x06, 0x05, 0x64, 0x5b, 0x0a, 0xdf,
+ 0x22, 0x58, 0xd7, 0xfb, 0x88, 0x12, 0xdd, 0xb7,
+ 0x52, 0x3a, 0xc9, 0xbf, 0x49, 0xdf, 0x8c, 0x87,
+ 0x9f, 0x84, 0xb5, 0x0a, 0xf6, 0x00, 0x52, 0xae,
+ 0x67, 0x12, 0x1a, 0x8c, 0x71, 0x15, 0xf5, 0xa1,
+ 0x13, 0x39, 0xf0, 0x91, 0x7e, 0x88, 0x7c, 0xb3,
+ 0x95, 0x50, 0x02, 0xa6, 0x63, 0xb5, 0x64, 0xfb,
+ 0x90, 0x87, 0x61, 0xe2, 0x27, 0xaf, 0x11, 0x0c,
+ 0x73, 0x83, 0xef, 0xa9, 0x28, 0xfe, 0xc8, 0x85,
+ 0x1a, 0x3a, 0xde, 0xf2, 0xe5, 0x25, 0x64, 0x6d,
+ 0xaa, 0x41, 0x4c, 0x80, 0x2e, 0x84, 0xff, 0xc1,
+ 0xc0, 0x54, 0x0c, 0x29, 0x1b, 0xa3, 0x07, 0x7c,
+ 0x33, 0x4c, 0x10, 0xf6, 0x6f, 0x79, 0xdf, 0xd3,
+ 0xf0, 0x24, 0x57, 0xf1, 0x60, 0xe1, 0xf0, 0xbd,
+ 0xc4, 0x1f, 0xf4, 0x67, 0xd2, 0xd3, 0xcc, 0x6a,
+ 0x07, 0x72, 0x44, 0x16, 0x85, 0x46, 0xd0, 0x73,
+ 0x87, 0xa9, 0xc7, 0x2f, 0xd1, 0xf5, 0xec, 0xe3,
+ 0x28, 0xa3, 0x93, 0x4f, 0xd7, 0x76, 0xc1, 0x3c,
+ 0x0d, 0x13, 0x33, 0xcf, 0x5b, 0xbd, 0x6a, 0x52,
+ 0x4e, 0xee, 0xc8, 0x5e, 0xa1, 0x58, 0x4a, 0x08,
+ 0x81, 0xd9, 0x23, 0xcc, 0xfb, 0x1c, 0xb2, 0xd8,
+ 0xa3, 0xe4, 0x53, 0xfe, 0xf4, 0x4b, 0x48, 0xc1,
+ 0x20, 0xa4, 0x97, 0xf8, 0x38, 0xa3, 0x69, 0xc1,
+ 0x11, 0xf0, 0xa1, 0x3b, 0xa9, 0x9a, 0x12, 0x61,
+ 0xe8, 0x8d, 0x99, 0x44, 0x3f, 0x94, 0x72, 0x82,
+ 0x19, 0x96, 0x62, 0xb0, 0xa6, 0x64, 0x05, 0x19,
+ 0x8f, 0xd6, 0x5d, 0x05, 0xbf, 0x79, 0x9e, 0x9d,
+ 0xe4, 0x93, 0x4c, 0xad, 0x61, 0x8c, 0x18, 0xda,
+ 0xb6, 0x2e, 0xb3, 0xca, 0x14, 0x4d, 0x53, 0xa4,
+ 0x97, 0x27, 0x10, 0x56, 0xa2, 0x67, 0x5a, 0x5a,
+ 0x5e, 0x13, 0xc0, 0xdb, 0xa7, 0x9f, 0x45, 0x5b,
+ 0xeb, 0x1a, 0x14, 0x0c, 0x8c, 0x38, 0x5e, 0x77,
+ 0x9a, 0xec, 0x75, 0x68, 0x93, 0x65, 0x02, 0x9c,
+ 0xfb, 0x62, 0x60, 0x49, 0xdd, 0xb2, 0x2a, 0x67,
+ 0x86, 0xe3, 0x8a, 0x7d, 0x8c, 0x46, 0x78, 0x81,
+ 0x60, 0x69, 0xf2, 0x3f, 0x74, 0x11, 0x35, 0xff,
+ 0x77, 0xa3, 0x66, 0x20, 0xfc, 0x98, 0x4a, 0x35,
+ 0x7a, 0x52, 0xe4, 0x90, 0x13, 0x80, 0xb9, 0xa6,
+ 0x73, 0x7a, 0x7d, 0x66, 0x6e, 0x6b, 0xb6, 0x43,
+ 0x10, 0xd5, 0x91, 0x2b, 0x66, 0xdd, 0x89, 0x87,
+ 0xe3, 0x8c, 0x58, 0x53, 0x2f, 0x40, 0x74, 0x45,
+ 0x1b, 0x77, 0x7a, 0xa4, 0x44, 0x19, 0x78, 0xba,
+ 0x87, 0x10, 0x41, 0x31, 0x32, 0x5f, 0x87, 0x68,
+ 0xde, 0x43, 0x4a, 0xef, 0x33, 0xb3, 0x11, 0x83,
+ 0xa9, 0xc2, 0x6f, 0x8d, 0x34, 0xe2, 0x95, 0x84,
+ 0x3a, 0x4f, 0x6f, 0x8c, 0x31, 0x1d, 0xb6, 0xf5,
+ 0x95, 0x0d, 0x01, 0x11, 0x20, 0xdf, 0x72, 0xf3,
+ 0x3f, 0x9a, 0x33, 0xaa, 0xb1, 0x06, 0x6a, 0x63,
+ 0x47, 0x91, 0x01, 0xdf, 0xb3, 0x54, 0x36, 0xfd,
+ 0x06, 0x2d, 0xb8, 0x08, 0xe3, 0xd3, 0x65, 0xac,
+ 0x66, 0x03, 0xee, 0xa4, 0x63, 0xbd, 0xd4, 0xce,
+ 0xbd, 0x79, 0xa7, 0x48, 0x38, 0xc5, 0x7d, 0xb5,
+ 0x71, 0x9a, 0x3c, 0x11, 0x7c, 0x6c, 0xe2, 0x54,
+ 0x02, 0x5d, 0x42, 0xab, 0x25, 0x93, 0x66, 0x01,
+ 0x37, 0x78, 0x35, 0x4a, 0x8c, 0x19, 0x4d, 0x00,
+ 0x75, 0x4f, 0xcc, 0xc0, 0x26, 0x82, 0xc1, 0x35,
+ 0x8c, 0xc7, 0xc2, 0x59, 0x01, 0x3e, 0x98, 0x22,
+ 0x88, 0x9c, 0x90, 0x75, 0x05, 0x33, 0x07, 0xb9,
+ 0x39, 0x81, 0x38, 0x58, 0x10, 0x29, 0xcf, 0xc8,
+ 0x98, 0xb2, 0x03, 0xd7, 0x5b, 0xb3, 0x18, 0xba,
+ 0x34, 0x0c, 0x9f, 0xab, 0xd7, 0xed, 0x29, 0x82,
+ 0x41, 0xe0, 0x20, 0x97, 0x57, 0x92, 0xb2, 0xb8,
+ 0x10, 0x2d, 0x0b, 0xa2, 0xc5, 0x8f, 0x90, 0x6f,
+ 0xed, 0x12, 0x56, 0x25, 0xbe, 0xfd, 0x75, 0xf7,
+ 0xb6, 0xf8, 0x40, 0x67, 0x39, 0x11, 0xfa, 0x15,
+ 0xae, 0x6a, 0x54, 0x5f, 0x32, 0x2b, 0xf8, 0x48,
+ 0x55, 0xbe, 0x86, 0x2f, 0x69, 0x48, 0x5b, 0x5d,
+ 0x4d, 0xb7, 0x35, 0xaa, 0xb6, 0x91, 0x88, 0x19,
+ 0x96, 0x1c, 0x68, 0xf6, 0x85, 0x9e, 0xb3, 0xb2,
+ 0xa3, 0x32, 0xd4, 0x52, 0x70, 0xb7, 0x62, 0xe3,
+ 0x14, 0xb6, 0x78, 0x5f, 0x1b, 0x1d, 0x04, 0x9c,
+ 0x26, 0x0c, 0x33, 0x94, 0xb1, 0x97, 0x08, 0xdb,
+ 0x0b, 0x39, 0x29, 0xd4, 0xbc, 0x6d, 0xdf, 0x02,
+ 0xc6, 0x99, 0xab, 0x99, 0x32, 0xe5, 0xce, 0x51,
+ 0x4f, 0xae, 0xb8, 0x8b, 0xe0, 0xaf, 0x07, 0xc4,
+ 0xf9, 0x41, 0x7c, 0x59, 0xa0, 0xac, 0x74, 0x4d,
+ 0x7e, 0x43, 0x77, 0x9c, 0x06, 0x49, 0x79, 0x8a,
+ 0x14, 0x73, 0x93, 0xa8, 0x5b, 0x1b, 0x34, 0x29,
+ 0x78, 0x04, 0x2f, 0xd7, 0x1f, 0x13, 0x90, 0xe0,
+ 0xdd, 0x3b, 0x42, 0x6b, 0x79, 0x6e, 0x52, 0xc7,
+ 0x0f, 0x38, 0xda, 0x01, 0x2c, 0x8d, 0xe6, 0x94,
+ 0x5d, 0x59, 0x27, 0x1d, 0x10, 0x4e, 0x11, 0x36,
+ 0xfb, 0x53, 0x16, 0x05, 0x25, 0xf2, 0x64, 0xd8,
+ 0xf9, 0xcd, 0x5c, 0xfe, 0xb4, 0x18, 0x44, 0x80,
+ 0x10, 0xbc, 0x3d, 0xf3, 0x1d, 0x5a, 0xf0, 0xc1,
+ 0xc3, 0x55, 0xff, 0x41, 0x3e, 0xe3, 0xef, 0x44,
+ 0xb2, 0xc0, 0x01, 0x18, 0xa2, 0x49, 0x88, 0x78,
+ 0x0d, 0x4c, 0xc8, 0x73, 0xcf, 0x30, 0x85, 0x3a,
+ 0x88, 0x90, 0x01, 0xcf, 0x69, 0x53, 0xa3, 0x18,
+ 0x3f, 0xd6, 0xe7, 0x94, 0x14, 0xa7, 0xae, 0xcd,
+ 0x6f, 0x11, 0x72, 0xfe, 0x2b, 0xb0, 0x81, 0x53,
+ 0xea, 0x67, 0xd6, 0xe4, 0xca, 0x42, 0xa0, 0xf9,
+ 0xb1, 0xd4, 0xb5, 0x3b, 0xc9, 0xf0, 0x36, 0xc1,
+ 0x1c, 0xf4, 0xb1, 0xf6, 0x84, 0xd0, 0x86, 0x6c,
+ 0x76, 0x9a, 0x03, 0xc2, 0xb6, 0x2e, 0x9a, 0x46,
+ 0xf5, 0x5f, 0x2c, 0x38, 0xac, 0xad, 0x6f, 0x2e,
+ 0x7a, 0x18, 0x2d, 0x22, 0x95, 0x5e, 0x5e, 0xc9,
+ 0x7a, 0x0a, 0x56, 0xe1, 0xc7, 0x15, 0xfd, 0xbf,
+ 0xff, 0xf7, 0x7e, 0x85, 0x20, 0xa9, 0x8a, 0x9c,
+ 0xa9, 0x7d, 0xe8, 0xed, 0xfc, 0x7f, 0xbb, 0xf0,
+ 0x05, 0x3f, 0xce, 0x4f, 0x4c, 0xee, 0xa4, 0xa0,
+ 0xcc, 0x9c, 0x62, 0x1e, 0xd6, 0xd0, 0x30, 0x37,
+ 0xb8, 0x98, 0x56, 0x1d, 0xaa, 0xd6, 0x5e, 0x73,
+ 0x12, 0xe4, 0x88, 0x82, 0x48, 0x64, 0x06, 0xd7,
+ 0x2a, 0x31, 0x50, 0x7b, 0x10, 0x17, 0xb8, 0x4c,
+ 0x5a, 0x8d, 0xf1, 0xfc, 0xf1, 0x33, 0x3b, 0x98,
+ 0x42, 0x18, 0x5b, 0x35, 0x78, 0xca, 0x8e, 0x41,
+ 0x52, 0xae, 0x6d, 0xe1, 0xa2, 0x9d, 0x5b, 0xbd,
+ 0xf3, 0x5f, 0x49, 0xc1, 0x27, 0x06, 0xc1, 0xaf,
+ 0xc0, 0xa3, 0x9d, 0xf3, 0x1c, 0x8e, 0x90, 0x8a,
+ 0xb0, 0x69, 0xb0, 0xc5, 0x11, 0x0c, 0x91, 0x14,
+ 0x1f, 0x5e, 0x10, 0xe1, 0x1d, 0x14, 0x30, 0x54,
+ 0x1e, 0x17, 0x3d, 0x31, 0x7b, 0xbf, 0x2f, 0x9d,
+ 0x6d, 0x63, 0x32, 0xf0, 0x9d, 0x9f, 0x95, 0x3d,
+ 0x0b, 0xd2, 0x4d, 0x10, 0xe2, 0x3f, 0x67, 0x69,
+ 0x43, 0x9a, 0x4a, 0x2c, 0x54, 0x71, 0xa8, 0xa0,
+ 0x9e, 0x9f, 0x10, 0xaf, 0x1b, 0xce, 0x99, 0xe3,
+ 0x25, 0x32, 0x10, 0x54, 0x80, 0xfe, 0xda, 0x57,
+ 0xd0, 0xb2, 0x92, 0x7f, 0xbb, 0x5f, 0xe7, 0x4d,
+ 0x1b, 0x3d, 0x46, 0x4d, 0xe4, 0x4c, 0xd6, 0xaf,
+ 0x1a, 0x32, 0x12, 0x40, 0xb8, 0x84, 0x8e, 0xe4,
+ 0x80, 0xce, 0x7e, 0xc1, 0x13, 0x8b, 0xb0, 0xb7,
+ 0x6f, 0x24, 0xba, 0x85, 0x50, 0x83, 0xc3, 0xcf,
+ 0x19, 0xb3, 0xf0, 0xc7, 0xee, 0x68, 0xbe, 0x9e,
+ 0x6d, 0xb9, 0xfb, 0xd5, 0x29, 0xce, 0x82, 0xcd,
+ 0x69, 0x16, 0x68, 0x6b, 0x6a, 0xf4, 0x02, 0x32,
+ 0xce, 0x60, 0x37, 0x0c, 0xb9, 0x38, 0x92, 0x9c,
+ 0x42, 0xa9, 0x0b, 0x53, 0x96, 0xfe, 0x39, 0xc1,
+ 0x24, 0x65, 0x9b, 0xcd, 0xe7, 0x8d, 0x36, 0x07,
+ 0x9f, 0x1d, 0x35, 0x8e, 0xdc, 0x4c, 0xb5, 0x68,
+ 0xc5, 0xfd, 0x44, 0x19, 0xf2, 0x6c, 0x59, 0x1c,
+ 0xb1, 0x0b, 0x35, 0x48, 0x86, 0x1a, 0x05, 0x22,
+ 0x03, 0x0c, 0x0c, 0xa2, 0x92, 0x90, 0x35, 0xfb,
+ 0x37, 0x94, 0xc7, 0x15, 0x84, 0xae, 0xe8, 0x05,
+ 0xa0, 0xf7, 0x30, 0x11, 0x5c, 0xe4, 0x5d, 0x3e,
+ 0x12, 0x54, 0x80, 0x54, 0x6b, 0x09, 0x8c, 0xce,
+ 0x80, 0x5e, 0xa7, 0xc8, 0x6a, 0x0c, 0x56, 0xe1,
+ 0x18, 0x7d, 0xc9, 0x39, 0xc1, 0xef, 0xe3, 0x25,
+ 0xa0, 0x8b, 0x2f, 0x60, 0x3a, 0x43, 0x39, 0xa6,
+ 0x28, 0x28, 0x7b, 0x4c, 0x77, 0xd4, 0x49, 0x61,
+ 0x46, 0xe9, 0x1b, 0x45, 0xd6, 0xb1, 0x56, 0xe1,
+ 0x7d, 0x34, 0xcd, 0x06, 0xb6, 0x67, 0x8d, 0x7d,
+ 0x7a, 0xe2, 0xbe, 0x68, 0x35, 0xa6, 0x78, 0xe5,
+ 0x47, 0x48, 0xb7, 0xc7, 0xde, 0xcd, 0xc9, 0x05,
+ 0xb4, 0xe7, 0x50, 0x48, 0xe1, 0x4b, 0xfe, 0x76,
+ 0x77, 0xc6, 0xf7, 0x5f, 0xcb, 0xc2, 0xa8, 0xd7,
+ 0xd6, 0x8a, 0xe5, 0x49, 0xd9, 0xca, 0x45, 0xf4,
+ 0xda, 0xcd, 0x33, 0xd1, 0x59, 0x2d, 0x9e, 0xc1,
+ 0x5c, 0xe6, 0x01, 0x18, 0xb8, 0xf0, 0x5e, 0xb1,
+ 0x69, 0x95, 0x2f, 0x02, 0x2a, 0xe7, 0x4a, 0xd7,
+ 0xd1, 0xc3, 0xd5, 0x6f, 0x15, 0xc8, 0xdc, 0x29,
+ 0xde, 0xb9, 0x3f, 0x8b, 0xa6, 0xbc, 0xdd, 0x25,
+ 0x84, 0x35, 0x3c, 0x90, 0x2d, 0xc2, 0x1e, 0x98,
+ 0x8a, 0x50, 0x09, 0x77, 0x42, 0xe9, 0x35, 0x8a,
+ 0x7c, 0x97, 0xbf, 0xe8, 0xbf, 0x56, 0xd0, 0x8b,
+ 0x65, 0xd3, 0xaf, 0x1e, 0x05, 0x94, 0xfa, 0xac,
+ 0xa8, 0x2b, 0x28, 0xcb, 0x37, 0x3e, 0xe8, 0xbb,
+ 0x66, 0x3a, 0xed, 0xb2, 0x48, 0x10, 0x0f, 0x3a,
+ 0x5a, 0xc5, 0xdb, 0x26, 0x0e, 0xaa, 0x5e, 0x69,
+ 0x15, 0xd6, 0x81, 0xae, 0xbd, 0xe6, 0x03, 0xf1,
+ 0xf6, 0x37, 0xc8, 0xde, 0x70, 0x1f, 0x64, 0xb9,
+ 0x5e, 0xbf, 0x2e, 0x4f, 0xb1, 0xea, 0xa0, 0x17,
+ 0xe6, 0x7c, 0xf9, 0x2f, 0x1e, 0xd8, 0x58, 0xde,
+ 0xa7, 0xf0, 0x46, 0x52, 0x95, 0xdf, 0xa4, 0x96,
+ 0xd0, 0xc4, 0x97, 0x2b, 0x95, 0xcd, 0x5e, 0x40,
+ 0x23, 0x5c, 0x10, 0xee, 0xba, 0x72, 0x9b, 0xcf,
+ 0x0b, 0xe8, 0x18, 0x3a, 0x70, 0xd2, 0x5e, 0x07,
+ 0x68, 0x93, 0xef, 0x4a, 0x5b, 0x8d, 0x72, 0x41,
+ 0x4e, 0xea, 0x33, 0x6a, 0x0a, 0x5e, 0xfb, 0x02,
+ 0x3f, 0xd4, 0xed, 0x5b, 0xe0, 0x42, 0x84, 0xd4,
+ 0xaa, 0x85, 0xdc, 0x5b, 0x67, 0xee, 0x71, 0x67,
+ 0xba, 0x8e, 0xd2, 0xbe, 0x61, 0xdf, 0x5a, 0x26,
+ 0xb9, 0xf0, 0x77, 0x81, 0x53, 0x24, 0x16, 0xcb,
+ 0x8c, 0xb8, 0x06, 0x6e, 0x68, 0xda, 0xc8, 0x2d,
+ 0x17, 0x54, 0xdb, 0x46, 0xcb, 0xfd, 0x1f, 0x3d,
+ 0x94, 0x81, 0x09, 0x4b, 0xfa, 0xb1, 0x46, 0xd9,
+ 0x11, 0xa3, 0xb7, 0x31, 0x9c, 0xd2, 0x38, 0xd6,
+ 0xba, 0x3d, 0xa3, 0x74, 0xd8, 0xf1, 0x24, 0xe8,
+ 0x9c, 0xcb, 0x1d, 0xf9, 0x4a, 0xf7, 0xc8, 0x4b,
+ 0xfe, 0x97, 0x7c, 0xa1, 0x02, 0xeb, 0x40, 0xc3,
+ 0x89, 0x71, 0x01, 0xcd, 0x33, 0x2a, 0xc2, 0x82,
+ 0xce, 0x62, 0x8d, 0x53, 0x7c, 0xdf, 0xce, 0xd7,
+ 0xf5, 0xa8, 0x4f, 0xf2, 0xf2, 0x2e, 0xc1, 0xeb,
+ 0x97, 0x99, 0x37, 0x3c, 0x53, 0xa6, 0xb4, 0x46,
+ 0x05, 0x64, 0x92, 0x87, 0x08, 0x3c, 0x23, 0x4b,
+ 0x9d, 0x67, 0x18, 0xf9, 0xe2, 0x0b, 0x1c, 0x39,
+ 0xd3, 0x87, 0x70, 0xc0, 0xb9, 0x1e, 0x52, 0x0a,
+ 0x0f, 0x48, 0xe2, 0xe7, 0x51, 0x72, 0x94, 0xf7,
+ 0xa3, 0xdc, 0xe5, 0x66, 0x33, 0x39, 0x54, 0x06,
+ 0x55, 0x93, 0x30, 0xf9, 0x5e, 0x76, 0x8f, 0xe0,
+ 0x59, 0x4d, 0x0d, 0xa7, 0xf5, 0xbe, 0xdb, 0x20,
+ 0xad, 0x0d, 0x76, 0x88, 0x5f, 0x9c, 0x7c, 0x75,
+ 0x2f, 0x2a, 0x0b, 0x79, 0x6e, 0xd3, 0xe2, 0x66,
+ 0xf5, 0x4a, 0x2d, 0x87, 0x87, 0x49, 0x84, 0x17,
+ 0xa2, 0x62, 0x4c, 0xbb, 0xe4, 0x6e, 0x98, 0x10,
+ 0xc9, 0xfb, 0x8a, 0x04, 0x68, 0x8d, 0x22, 0x66,
+ 0xad, 0xea, 0x2a, 0xc9, 0x97, 0x2d, 0x3c, 0xbc,
+ 0xd0, 0x77, 0x5f, 0xe6, 0xb8, 0x7f, 0xe6, 0xf6,
+ 0x39, 0xbf, 0x56, 0x0e, 0x26, 0x6d, 0xc5, 0x3e,
+ 0x53, 0x19, 0xd6, 0xb4, 0x57, 0x36, 0xa3, 0xc6,
+ 0xd3, 0x3d, 0x66, 0x79, 0x30, 0x5c, 0x14, 0x0c,
+ 0x0f, 0x3e, 0x96, 0xae, 0x90, 0x97, 0xab, 0x0d,
+ 0x9f, 0xc3, 0xe7, 0x66, 0x3e, 0xe0, 0x31, 0x43,
+ 0x4b, 0x01, 0xb3, 0x0e, 0x9e, 0x8c, 0x82, 0x4a,
+ 0x8c, 0xc7, 0x79, 0x85, 0xdf, 0x75, 0x0d, 0xb4,
+ 0x2b, 0x03, 0x14, 0xef, 0x72, 0x58, 0xfd, 0x64,
+ 0xc8, 0xe3, 0x0d, 0x9a, 0x14, 0x6f, 0x76, 0xf9,
+ 0x46, 0xd1, 0xd2, 0x81, 0xb3, 0x16, 0x6e, 0xc7,
+ 0x76, 0x82, 0xce, 0xf4, 0xee, 0x33, 0x00, 0xe6,
+ 0x77, 0xc4, 0xad, 0x4f, 0x06, 0xa7, 0x48, 0x80,
+ 0x9e, 0x21, 0x66, 0xca, 0x75, 0x69, 0x57, 0xcb,
+ 0xf0, 0x67, 0x6a, 0xaa, 0x8f, 0x88, 0x14, 0xbd,
+ 0x65, 0x62, 0xe2, 0xad, 0xcc, 0x22, 0x88, 0x7b,
+ 0x94, 0xbd, 0x0e, 0xcd, 0xb6, 0x69, 0xa2, 0xcb,
+ 0x7d, 0x57, 0x5c, 0xb4, 0x92, 0x80, 0x13, 0x99,
+ 0x84, 0xf3, 0x79, 0x0a, 0x2d, 0x70, 0xa4, 0xe0,
+ 0xde, 0xc6, 0x32, 0xb0, 0x8a, 0x62, 0xb5, 0xcf,
+ 0xfa, 0x5e, 0x5a, 0x92, 0x32, 0x7d, 0x34, 0x07,
+ 0xb5, 0x52, 0x3a, 0xb5, 0x7d, 0x0f, 0xa1, 0xba,
+ 0x56, 0xd0, 0x07, 0x76, 0x11, 0xf2, 0xc3, 0x33,
+ 0x9d, 0xbd, 0x12, 0x35, 0x5e, 0xf7, 0x05, 0x88,
+ 0x76, 0x94, 0xa6, 0xbf, 0xed, 0xb8, 0xa4, 0xa2,
+ 0x0c, 0xbe, 0x0f, 0x6a, 0xaf, 0xf3, 0x1b, 0x33,
+ 0x4a, 0xb7, 0x68, 0x3f, 0xbe, 0x95, 0x13, 0x97,
+ 0x0f, 0x15, 0x17, 0x1b, 0x23, 0xaa, 0x08, 0x78,
+ 0xa6, 0x5b, 0x08, 0xa2, 0x9d, 0x03, 0xa8, 0xa7,
+ 0x39, 0xdc, 0xbc, 0x9a, 0x85, 0xf5, 0xe5, 0x55,
+ 0x59, 0x3c, 0xef, 0xf9, 0x3f, 0x22, 0x8e, 0xf8,
+ 0xd8, 0x3e, 0x02, 0x0b, 0xd8, 0x78, 0x4b, 0x15,
+ 0x7f, 0xaa, 0x2c, 0xff, 0xbe, 0x77, 0x33, 0xc7,
+ 0x6a, 0x12, 0xaa, 0xa4, 0xbe, 0xc0, 0x3b, 0xcb,
+ 0x13, 0x9d, 0x9c, 0x5a, 0x9f, 0x8a, 0x57, 0x36,
+ 0x4f, 0x02, 0x5a, 0xf8, 0x1d, 0x97, 0x77, 0x43,
+ 0xc8, 0xa5, 0xb7, 0x9b, 0x10, 0x98, 0xfd, 0x58,
+ 0xbf, 0x42, 0xf6, 0xbf, 0xff, 0x6c, 0x40, 0x18,
+ 0x18, 0xdf, 0xac, 0x57, 0x71, 0xea, 0xcc, 0x8e,
+ 0xfd, 0xfe, 0x10, 0xfb, 0xb9, 0xfe, 0xbc, 0x9a,
+ 0x9c, 0x27, 0xe4, 0x10, 0x15, 0x94, 0x41, 0xa1,
+ 0xcc, 0xf6, 0x25, 0x49, 0x4f, 0x96, 0xc1, 0x8c,
+ 0x9e, 0x3e, 0x18, 0x29, 0x49, 0x92, 0xe7, 0xfe,
+ 0x22, 0xff, 0xed, 0x02, 0x16, 0x90, 0xef, 0xac,
+ 0xec, 0x95, 0x1d, 0x5b, 0x94, 0x9c, 0xf6, 0x7c,
+ 0x1b, 0x5a, 0x9d, 0xb0, 0x9b, 0x05, 0x36, 0xbf,
+ 0xef, 0xec, 0x63, 0x35, 0x40, 0x24, 0x45, 0x40,
+ 0x30, 0x1a, 0x9b, 0x90, 0xc3, 0xc2, 0xf7, 0x37,
+ 0xfb, 0x08, 0x8e, 0x48, 0x19, 0x48, 0xed, 0xa8,
+ 0xa8, 0x04, 0x6f, 0xd0, 0x33, 0xe9, 0xb8, 0x8d,
+ 0xe7, 0x1e, 0x5c, 0x47, 0x74, 0xc0, 0x66, 0x30,
+ 0x4e, 0xa7, 0x86, 0x73, 0xf1, 0xe5, 0x78, 0xa6,
+ 0xe0, 0xc1, 0xda, 0x13, 0x72, 0x07, 0x85, 0x34,
+ 0x63, 0x95, 0x49, 0x30, 0x4b, 0x9d, 0x03, 0xf1,
+ 0x7a, 0x6b, 0x91, 0xa2, 0x85, 0x41, 0xf9, 0x4a,
+ 0xd6, 0xff, 0xff, 0x86, 0xf7, 0xf0, 0xce, 0xb9,
+ 0x07, 0xf1, 0x88, 0x04, 0x33, 0xaa, 0xeb, 0x54,
+ 0xb2, 0x1c, 0x8e, 0x2e, 0x7b, 0x04, 0xa8, 0xcc,
+ 0x2c, 0x7a, 0xb3, 0xad, 0x1a, 0x89, 0x38, 0x89,
+ 0xd7, 0x11, 0x3a, 0x8c, 0xcf, 0xe3, 0xc5, 0xba,
+ 0xb0, 0xcc, 0xc4, 0xe3, 0x33, 0xf3, 0x18, 0xba,
+ 0xec, 0x56, 0xd9, 0x1c, 0x40, 0x70, 0x0d, 0x4e,
+ 0x97, 0x01, 0x23, 0xf3, 0x5a, 0xdc, 0xbf, 0x68,
+ 0x93, 0xc2, 0x1d, 0x8a, 0x96, 0xb7, 0xac, 0x18,
+ 0x6f, 0xf7, 0x84, 0x71, 0x0d, 0x3d, 0xf8, 0xba,
+ 0xdf, 0xb6, 0x89, 0x1d, 0x78, 0x19, 0xf2, 0x59,
+ 0xe9, 0x15, 0x55, 0x29, 0x73, 0x50, 0x59, 0x14,
+ 0x02, 0x21, 0x16, 0x8f, 0x0f, 0xdf, 0xa5, 0xf0,
+};
+
+static struct crc_test {
+ uint32_t crc; /* random starting crc */
+ uint32_t start; /* random offset in buf */
+ uint32_t length; /* random length of test */
+ uint32_t crc32c_le; /* expected crc32c_le result */
+ uint32_t crc32_be; /* expected crc32_be result */
+} test[] = {
+ {0xffffffff, 0x00000000, 0x00001000, 0x13934bef, 0xd8ddcdc3},
+ {0xfe7328ea, 0x00000763, 0x00000717, 0xed2c0d70, 0xc863aef8},
+ {0x4c40684e, 0x00000721, 0x0000011e, 0xd7f46ccc, 0x173a11c4},
+ {0x6b487f90, 0x00000264, 0x000007bc, 0x759e9939, 0xd6307c56},
+ {0x9f5810db, 0x00000afa, 0x00000255, 0x2685197f, 0x2e5c9201},
+ {0xb15c4755, 0x00000d5b, 0x000002a4, 0xd8fadcb5, 0xf682c4be},
+ {0x06518253, 0x00000ffb, 0x00000004, 0xabee2433, 0x3d8abdf9},
+ {0xd9e71c55, 0x00000a2a, 0x00000259, 0x96682af2, 0x47b4d26c},
+ {0x0c1ae843, 0x00000ce4, 0x0000031b, 0x7b637c43, 0x62b47e8b},
+ {0xec3cd517, 0x000002ff, 0x00000566, 0x5d719a77, 0xff5bc5b7},
+ {0x77828e95, 0x0000067f, 0x0000038f, 0x43ee5b6c, 0x1a0cfacd},
+ {0xec87b4e3, 0x00000d1c, 0x000002e3, 0x2ddd2eee, 0x275118a7},
+ {0x412158bb, 0x00000eee, 0x00000111, 0x67b38ba2, 0xa74ecff5},
+ {0x2e52de3e, 0x00000c4a, 0x000003b5, 0xbcc5d61d, 0xbd800707},
+ {0x6ddaae8b, 0x00000d99, 0x00000266, 0x8b535544, 0xecbde1a1},
+ {0x049b6cb1, 0x000009c5, 0x000000b0, 0xfc22cabc, 0xfb78eb9f},
+ {0x77d4b954, 0x0000028a, 0x000007fa, 0x71d00923, 0x8c116f85},
+ {0x5e192355, 0x00000ac1, 0x000001fa, 0xb966b81a, 0x5aa17bbe},
+ {0x7d80b71d, 0x00000213, 0x000001e0, 0x2bba371a, 0xb5906aa6},
+ {0x01f6f1e4, 0x000001d6, 0x00000395, 0xb7e8a647, 0x3ad112b1},
+ {0x1dfabb13, 0x00000e14, 0x000001eb, 0x53917fba, 0xbaee0339},
+ {0xb00a4449, 0x00000bf6, 0x00000409, 0xedecb577, 0x6f3a3979},
+ {0x7ecd3981, 0x0000083f, 0x0000016b, 0xefef62b9, 0xe3e52eed},
+ {0xf8f330d2, 0x000004be, 0x00000757, 0x9357c9f3, 0x0835bc1b},
+ {0x03c38af2, 0x00000d23, 0x000002dc, 0x360fa8c0, 0x2ca885e6},
+ {0x687bb79b, 0x00000f3d, 0x000000c2, 0x448d3be2, 0x79be2f78},
+ {0x6710f550, 0x000009e9, 0x00000603, 0xdbfd1998, 0x1d25f627},
+ {0x873171d1, 0x00000787, 0x000004d5, 0xab7f1b62, 0xa76a5656},
+ {0x373b1314, 0x00000f0f, 0x000000f0, 0x184098ab, 0xba273974},
+ {0x90fad9cd, 0x00000ead, 0x00000152, 0x23ce52ff, 0xb7bc958c},
+ {0x19676fe7, 0x0000007d, 0x0000070d, 0xf8a76f1e, 0xf882b644},
+ {0x89facd45, 0x000005f3, 0x00000473, 0x4331a006, 0xe9dc1396},
+ {0x6f173747, 0x00000fc3, 0x0000003c, 0xb012f08e, 0xc6b888ee},
+ {0x4b44a106, 0x0000075a, 0x0000008b, 0xf6f7ac38, 0x60cd2b74},
+ {0xb620ad06, 0x00000774, 0x0000017e, 0xd34558e6, 0x3a0a615b},
+ {0x976f21e9, 0x000008d7, 0x0000034a, 0xe533aa3a, 0xa99e60be},
+ {0x687628c0, 0x000006c5, 0x0000061b, 0x3a840b15, 0x9bfcaef2},
+ {0xe24ac108, 0x00000cd0, 0x0000032f, 0x51010ae8, 0x20958672},
+ {0x361c44a3, 0x00000304, 0x00000719, 0xfd7bd481, 0xd70ff2b2},
+ {0xd93ff95e, 0x00000db7, 0x0000008e, 0xcfbbc304, 0xad716acd},
+ {0xed752d12, 0x00000883, 0x00000091, 0x65a6c868, 0x95c71c7b},
+ {0xb4ff4b54, 0x000003d3, 0x000001c1, 0xf82597e7, 0x44b7f99b},
+ {0x111b520f, 0x00000708, 0x000000eb, 0xc3e109f3, 0x71bc01ee},
+ {0x62c806f2, 0x00000ba3, 0x0000045c, 0x874d3a72, 0xc539b753},
+ {0x40d97470, 0x000005e1, 0x0000058d, 0x87a9684f, 0xea6073a5},
+ {0x4312179c, 0x00000056, 0x0000070e, 0x809a00f5, 0x209aea3b},
+ {0x13d5f84c, 0x00000a2d, 0x00000104, 0xf3d27578, 0xe087a8b6},
+ {0x1f302cb2, 0x00000151, 0x00000014, 0x1e162693, 0x95e4b90e},
+ {0xe491db24, 0x00000600, 0x000006f6, 0x7ff09615, 0x77611523},
+ {0xf9a98069, 0x000002ba, 0x000002ad, 0x01af7387, 0xea925faa},
+ {0xe9c477ad, 0x0000015f, 0x00000778, 0x6facf9a0, 0x1130f736},
+ {0x353f32b2, 0x0000087c, 0x00000783, 0x6cc964ea, 0x32459994},
+ {0x78e1b24f, 0x00000650, 0x000006a8, 0xb3bb7c27, 0x5a632f78},
+ {0x61aa400e, 0x00000049, 0x00000254, 0xb8cd1681, 0xdf2652d5},
+ {0xb84b10b0, 0x00000f73, 0x0000008c, 0x406a6450, 0x3619d31b},
+ {0x9fa99c9c, 0x00000a7c, 0x000004d7, 0xfb3d21b4, 0xea31c743},
+ {0x3fc9ebe3, 0x00000cd9, 0x000000d6, 0x43803f9c, 0x1f76a809},
+ {0x529879cd, 0x000002f2, 0x00000595, 0x78b4c6a6, 0x63b9b93f},
+ {0x3a933019, 0x00000516, 0x00000266, 0xdcb45436, 0x8f99c98c},
+ {0x887b4977, 0x00000227, 0x0000038d, 0xc5f7c3d9, 0xaf5e3091},
+ {0x770745de, 0x000008c6, 0x00000739, 0xf69145e8, 0x53d0dce1},
+ {0x28be3b47, 0x00000c46, 0x0000032b, 0x764c028f, 0x106d0905},
+ {0x5013a050, 0x00000cf6, 0x00000309, 0xea8fe164, 0x62180b57},
+ {0x2ec4c9ba, 0x000006e8, 0x0000078d, 0xa35557a9, 0xf44430a4},
+ {0xa9f950c9, 0x00000d33, 0x000002cc, 0x41ea8618, 0x587b4eb3},
+ {0x5b520229, 0x000007b2, 0x00000484, 0x44569f1f, 0x92406c32},
+ {0xd8dcbbfc, 0x0000002f, 0x0000048c, 0xdb88ab8b, 0x13bfe70e},
+ {0x25529792, 0x00000d1d, 0x000002e2, 0x20cda404, 0x19d3b4e4},
+ {0x9f3f6d71, 0x00000238, 0x0000079a, 0x0720443e, 0x3c107021},
+ {0x64121215, 0x000007ff, 0x0000038f, 0x6aacff2c, 0xb82fdc3e},
+ {0xfb6cdde0, 0x00000ef8, 0x00000107, 0xbd43a0f1, 0xab0d3c1d},
+ {0x221c9d6f, 0x000007b6, 0x0000014f, 0xb67f834b, 0x1371ad05},
+ {0x030e1de4, 0x00000836, 0x000004b4, 0x0d67d26a, 0xe2e72df1},
+ {0xb56fa6cf, 0x00000c07, 0x000003f8, 0x60601ac1, 0x039de73e},
+ {0xb55c89f5, 0x0000098e, 0x000001d4, 0x2400efbe, 0xfe39a2bb},
+ {0x5e90b6d5, 0x0000070b, 0x000003ea, 0x3bb5d6ea, 0xf0f794a0},
+ {0x2a7045ae, 0x00000961, 0x00000633, 0xfca89e4b, 0xe66ce41c},
+ {0x8b374ea9, 0x000006ba, 0x00000780, 0xbce036ed, 0x4cb28ef7},
+ {0x8bd90bc9, 0x00000562, 0x00000369, 0xcb26a24b, 0x40236d1d},
+ {0x5b1b1762, 0x000000fd, 0x0000051a, 0x33cdda07, 0xc32e420a},
+ {0xa4153555, 0x0000058f, 0x000005c7, 0xbe50eeca, 0x83a67f35},
+ {0x0be1f931, 0x00000651, 0x00000672, 0x95a25753, 0x88f1aac1},
+ {0xb7e78618, 0x00000a7f, 0x000002bb, 0xe06bcc1c, 0x74274f66},
+ {0x4a9bc41b, 0x00000e51, 0x000001ae, 0x709e8d2c, 0x54eff534},
+ {0xfc359d13, 0x00000440, 0x000002f8, 0x0a58451f, 0x55e9363f},
+ {0x5aa48619, 0x000006d1, 0x00000284, 0x928ead83, 0x31041c06},
+ {0xa609afa8, 0x0000053e, 0x00000272, 0xb048c141, 0x4704efba},
+ {0x3f108afb, 0x00000949, 0x00000150, 0x9a6bb5bc, 0x4e4430c8},
+ {0x79bec2d3, 0x000008ed, 0x00000712, 0x32692d57, 0x11d52a7b},
+ {0x9429e067, 0x00000bc3, 0x0000043c, 0x5295ceff, 0x04640f4d},
+ {0xae58b96a, 0x0000082d, 0x000007d2, 0xc2a681ba, 0xf7ca4a2c},
+ {0x95df24be, 0x00000985, 0x000004c1, 0x3a287765, 0x2c4af003},
+ {0x5e94976f, 0x00000596, 0x000004ed, 0xff00c489, 0x5ae11687},
+ {0xf5e5f1de, 0x00000d31, 0x000002ce, 0x35f28e91, 0x30d47957},
+ {0xa2c219cf, 0x00000a3c, 0x00000374, 0x707d21eb, 0x2a14a255},
+ {0xf21b6ceb, 0x00000919, 0x00000135, 0x0847fb8b, 0xcb8d3b93},
+ {0xaa988728, 0x00000787, 0x00000771, 0x885aeaa4, 0x6531b509},
+ {0xaa5dfaac, 0x000003e5, 0x0000051b, 0x52c48ab7, 0xe43cc5e9},
+ {0x0a053968, 0x00000d2a, 0x000002d5, 0x7a90256d, 0x8004765c},
+ {0x1421dc20, 0x00000eef, 0x00000110, 0x97d6da24, 0x1378f6ff},
+ {0xb47c2166, 0x00000a6a, 0x00000209, 0xcfd6cc52, 0x676e14a5},
+ {0x77dd1955, 0x000000de, 0x00000266, 0xba74bcaa, 0xc71b429c},
+ {0x68a03cc2, 0x0000082f, 0x000007b0, 0x752bd5d8, 0x19ed14aa},
+ {0x0226b0a3, 0x00000a5f, 0x000005a0, 0x82de4970, 0xf654d3ed},
+ {0x637bf3b1, 0x00000d93, 0x0000026c, 0x5c7115cb, 0x3cccb57e},
+ {0x3b120edf, 0x00000c13, 0x000003ec, 0x80d7d20f, 0x92132798},
+ {0xe2456780, 0x000002eb, 0x00000641, 0xc0a5d289, 0x6160c87a},
+ {0x9b2e7125, 0x00000c0c, 0x000003f3, 0xcc15f57e, 0x6f00f637},
+ {0x153033ef, 0x00000787, 0x000006b6, 0x3cde443b, 0xb46caa6e},
+ {0x18458b3f, 0x0000066c, 0x00000561, 0x9a2bd8c6, 0xb6c29121},
+ {0x4ff9d4b9, 0x00000c8f, 0x0000033a, 0xd0ee6d6d, 0xc81cf380},
+ {0xdf84b5d9, 0x00000802, 0x0000029a, 0xdab0d74a, 0xb2464559},
+ {0x81ee15df, 0x000003ce, 0x00000725, 0x9942e2de, 0x4ccf571b},
+ {0x5c768e04, 0x00000afd, 0x00000160, 0x36110831, 0xae0b305a},
+ {0xe5e18094, 0x00000b4b, 0x000000a0, 0xffa3e4a7, 0x6c8a4f09},
+ {0xed7263b6, 0x00000d0d, 0x000002f2, 0xb0006a35, 0x7e04af8c},
+ {0x5bfde7d7, 0x000006fb, 0x00000554, 0xa4193b76, 0xb3a91d12},
+ {0x67f4a743, 0x00000b85, 0x0000047a, 0xf05c8d8f, 0xfb472fdf},
+ {0xf13bdf22, 0x00000ff7, 0x00000008, 0x816351eb, 0xf347f235},
+ {0x08ecc608, 0x00000d5d, 0x00000098, 0x90492772, 0x0b7f1521},
+ {0x296f52ba, 0x000004f9, 0x00000788, 0x5e5a4896, 0x1cc67088},
+ {0xbe4624c2, 0x00000427, 0x000004ef, 0xcd267b94, 0x550caefd},
+ {0x906f7c7c, 0x00000a05, 0x0000003f, 0x03fcfc33, 0x9ed82a02},
+ {0x8f7b323e, 0x00000458, 0x000004c7, 0xcd4969c8, 0x633c38a8},
+ {0x88d6593d, 0x00000597, 0x000005b5, 0xf199cd3b, 0x0491452f},
+ {0x978a7768, 0x00000268, 0x000001d3, 0xb28c95bd, 0x1a42fe61},
+ {0x857a621e, 0x000007a7, 0x000003a8, 0xf4bf84ab, 0xcd0694c6},
+ {0xb0e121ef, 0x000005be, 0x00000644, 0x28747c14, 0xf0510c72},
+ {0, 0, 0, 0, 0},
+};
+
+static int test_crc32c(void)
+{
+ struct crc_test *t = test;
+ int failures = 0;
+
+ while (t->length) {
+ uint32_t be, le;
+ le = ext2fs_crc32c_le(t->crc, test_buf + t->start, t->length);
+ be = ext2fs_crc32_be(t->crc, test_buf + t->start, t->length);
+ if (le != t->crc32c_le) {
+ printf("Test %d LE fails, %x != %x\n",
+ (int) (t - test), le, t->crc32c_le);
+ failures++;
+ }
+ if (be != t->crc32_be) {
+ printf("Test %d BE fails, %x != %x\n",
+ (int) (t - test), be, t->crc32_be);
+ failures++;
+ }
+ t++;
+ }
+
+ return failures;
+}
+
+int main(int argc, char *argv[])
+{
+ int ret;
+
+ ret = test_crc32c();
+ if (!ret)
+ printf("No failures.\n");
+
+ return ret;
+}
+#endif /* UNITTEST */
diff --git a/lib/ext2fs/crc32c_defs.h b/lib/ext2fs/crc32c_defs.h
new file mode 100644
index 0000000..3f9a09e
--- /dev/null
+++ b/lib/ext2fs/crc32c_defs.h
@@ -0,0 +1,59 @@
+/*
+ * There are multiple 16-bit CRC polynomials in common use, but this is
+ * *the* standard CRC-32 polynomial, first popularized by Ethernet.
+ * x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0
+ */
+#define CRCPOLY_LE 0xedb88320
+#define CRCPOLY_BE 0x04c11db7
+
+/*
+ * This is the CRC32c polynomial, as outlined by Castagnoli.
+ * x^32+x^28+x^27+x^26+x^25+x^23+x^22+x^20+x^19+x^18+x^14+x^13+x^11+x^10+x^9+
+ * x^8+x^6+x^0
+ */
+#define CRC32C_POLY_LE 0x82F63B78
+#define CRC32C_POLY_BE 0x1EDC6F41
+
+/* How many bits at a time to use. Valid values are 1, 2, 4, 8, 32 and 64. */
+/* For less performance-sensitive, use 4 */
+#ifndef CRC_LE_BITS
+# define CRC_LE_BITS 64
+#endif
+#ifndef CRC_BE_BITS
+# define CRC_BE_BITS 64
+#endif
+
+/*
+ * Little-endian CRC computation. Used with serial bit streams sent
+ * lsbit-first. Be sure to use cpu_to_le32() to append the computed CRC.
+ */
+#if CRC_LE_BITS > 64 || CRC_LE_BITS < 1 || CRC_LE_BITS == 16 || \
+ CRC_LE_BITS & CRC_LE_BITS-1
+# error "CRC_LE_BITS must be one of {1, 2, 4, 8, 32, 64}"
+#endif
+
+/*
+ * Big-endian CRC computation. Used with serial bit streams sent
+ * msbit-first. Be sure to use cpu_to_be32() to append the computed CRC.
+ */
+#if CRC_BE_BITS > 64 || CRC_BE_BITS < 1 || CRC_BE_BITS == 16 || \
+ CRC_BE_BITS & CRC_BE_BITS-1
+# error "CRC_BE_BITS must be one of {1, 2, 4, 8, 32, 64}"
+#endif
+
+
+#define ___constant_swab32(x) \
+ ((uint32_t)( \
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
+ (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24)))
+
+
+#if (__GNUC__ >= 3)
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#else
+#define likely(x) (x)
+#define unlikely(x) (x)
+#endif
diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c
new file mode 100644
index 0000000..da32d94
--- /dev/null
+++ b/lib/ext2fs/csum.c
@@ -0,0 +1,1011 @@
+/*
+ * csum.c --- checksumming of ext3 structures
+ *
+ * Copyright (C) 2006 Cluster File Systems, Inc.
+ * Copyright (C) 2006, 2007 by Andreas Dilger <adilger@clusterfs.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "crc16.h"
+#include <assert.h>
+
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
+#ifdef DEBUG
+#define STATIC
+#else
+#define STATIC static
+#endif
+
+void ext2fs_init_csum_seed(ext2_filsys fs)
+{
+ if (ext2fs_has_feature_csum_seed(fs->super))
+ fs->csum_seed = fs->super->s_checksum_seed;
+ else if (ext2fs_has_feature_metadata_csum(fs->super) ||
+ ext2fs_has_feature_ea_inode(fs->super))
+ fs->csum_seed = ext2fs_crc32c_le(~0, fs->super->s_uuid,
+ sizeof(fs->super->s_uuid));
+}
+
+static __u32 ext2fs_mmp_csum(ext2_filsys fs, struct mmp_struct *mmp)
+{
+ int offset = offsetof(struct mmp_struct, mmp_checksum);
+
+ return ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)mmp, offset);
+}
+
+int ext2fs_mmp_csum_verify(ext2_filsys fs, struct mmp_struct *mmp)
+{
+ __u32 calculated;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+
+ calculated = ext2fs_mmp_csum(fs, mmp);
+
+ return ext2fs_le32_to_cpu(mmp->mmp_checksum) == calculated;
+}
+
+errcode_t ext2fs_mmp_csum_set(ext2_filsys fs, struct mmp_struct *mmp)
+{
+ __u32 crc;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ crc = ext2fs_mmp_csum(fs, mmp);
+ mmp->mmp_checksum = ext2fs_cpu_to_le32(crc);
+
+ return 0;
+}
+
+int ext2fs_verify_csum_type(ext2_filsys fs, struct ext2_super_block *sb)
+{
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+
+ return sb->s_checksum_type == EXT2_CRC32C_CHKSUM;
+}
+
+static __u32 ext2fs_superblock_csum(ext2_filsys fs EXT2FS_ATTR((unused)),
+ struct ext2_super_block *sb)
+{
+ int offset = offsetof(struct ext2_super_block, s_checksum);
+
+ return ext2fs_crc32c_le(~0, (unsigned char *)sb, offset);
+}
+
+/* NOTE: The input to this function MUST be in LE order */
+int ext2fs_superblock_csum_verify(ext2_filsys fs, struct ext2_super_block *sb)
+{
+ __u32 flag, calculated;
+
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES)
+ flag = EXT4_FEATURE_RO_COMPAT_METADATA_CSUM;
+ else
+ flag = ext2fs_cpu_to_le32(EXT4_FEATURE_RO_COMPAT_METADATA_CSUM);
+
+ if (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super, flag))
+ return 1;
+
+ calculated = ext2fs_superblock_csum(fs, sb);
+
+ return ext2fs_le32_to_cpu(sb->s_checksum) == calculated;
+}
+
+/* NOTE: The input to this function MUST be in LE order */
+errcode_t ext2fs_superblock_csum_set(ext2_filsys fs,
+ struct ext2_super_block *sb)
+{
+ __u32 flag, crc;
+
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES)
+ flag = EXT4_FEATURE_RO_COMPAT_METADATA_CSUM;
+ else
+ flag = ext2fs_cpu_to_le32(EXT4_FEATURE_RO_COMPAT_METADATA_CSUM);
+
+ if (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super, flag))
+ return 0;
+
+ crc = ext2fs_superblock_csum(fs, sb);
+ sb->s_checksum = ext2fs_cpu_to_le32(crc);
+
+ return 0;
+}
+
+static errcode_t ext2fs_ext_attr_block_csum(ext2_filsys fs,
+ ext2_ino_t inum EXT2FS_ATTR((unused)),
+ blk64_t block,
+ struct ext2_ext_attr_header *hdr,
+ __u32 *crc)
+{
+ char *buf = (char *)hdr;
+ __u32 old_crc = hdr->h_checksum;
+
+ hdr->h_checksum = 0;
+ block = ext2fs_cpu_to_le64(block);
+ *crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&block,
+ sizeof(block));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)buf, fs->blocksize);
+ hdr->h_checksum = old_crc;
+
+ return 0;
+}
+
+int ext2fs_ext_attr_block_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ blk64_t block,
+ struct ext2_ext_attr_header *hdr)
+{
+ __u32 calculated;
+ errcode_t retval;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+
+ retval = ext2fs_ext_attr_block_csum(fs, inum, block, hdr, &calculated);
+ if (retval)
+ return 0;
+
+ return ext2fs_le32_to_cpu(hdr->h_checksum) == calculated;
+}
+
+errcode_t ext2fs_ext_attr_block_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ blk64_t block,
+ struct ext2_ext_attr_header *hdr)
+{
+ errcode_t retval;
+ __u32 crc;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ retval = ext2fs_ext_attr_block_csum(fs, inum, block, hdr, &crc);
+ if (retval)
+ return retval;
+ hdr->h_checksum = ext2fs_cpu_to_le32(crc);
+ return 0;
+}
+
+static __u16 do_nothing16(__u16 x)
+{
+ return x;
+}
+
+static __u16 disk_to_host16(__u16 x)
+{
+ return ext2fs_le16_to_cpu(x);
+}
+
+static errcode_t __get_dx_countlimit(ext2_filsys fs,
+ struct ext2_dir_entry *dirent,
+ struct ext2_dx_countlimit **cc,
+ int *offset,
+ int need_swab)
+{
+ struct ext2_dir_entry *dp;
+ struct ext2_dx_root_info *root;
+ struct ext2_dx_countlimit *c;
+ int count_offset, max_sane_entries;
+ unsigned int rec_len;
+ __u16 (*translate)(__u16) = (need_swab ? disk_to_host16 : do_nothing16);
+
+ rec_len = translate(dirent->rec_len);
+
+ if (rec_len == fs->blocksize && translate(dirent->name_len) == 0)
+ count_offset = 8;
+ else if (rec_len == 12) {
+ dp = (struct ext2_dir_entry *)(((char *)dirent) + rec_len);
+ rec_len = translate(dp->rec_len);
+ if (rec_len != fs->blocksize - 12)
+ return EXT2_ET_DB_NOT_FOUND;
+ root = (struct ext2_dx_root_info *)(((char *)dp + 12));
+ if (root->reserved_zero ||
+ root->info_length != sizeof(struct ext2_dx_root_info))
+ return EXT2_ET_DB_NOT_FOUND;
+ count_offset = 32;
+ } else
+ return EXT2_ET_DB_NOT_FOUND;
+
+ c = (struct ext2_dx_countlimit *)(((char *)dirent) + count_offset);
+ max_sane_entries = (fs->blocksize - count_offset) /
+ sizeof(struct ext2_dx_entry);
+ if (ext2fs_le16_to_cpu(c->limit) > max_sane_entries ||
+ ext2fs_le16_to_cpu(c->count) > max_sane_entries)
+ return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;
+
+ if (offset)
+ *offset = count_offset;
+ if (cc)
+ *cc = c;
+
+ return 0;
+}
+
+errcode_t ext2fs_get_dx_countlimit(ext2_filsys fs,
+ struct ext2_dir_entry *dirent,
+ struct ext2_dx_countlimit **cc,
+ int *offset)
+{
+ return __get_dx_countlimit(fs, dirent, cc, offset, 0);
+}
+
+void ext2fs_initialize_dirent_tail(ext2_filsys fs,
+ struct ext2_dir_entry_tail *t)
+{
+ memset(t, 0, sizeof(struct ext2_dir_entry_tail));
+ ext2fs_set_rec_len(fs, sizeof(struct ext2_dir_entry_tail),
+ (struct ext2_dir_entry *)t);
+ t->det_reserved_name_len = EXT2_DIR_NAME_LEN_CSUM;
+}
+
+static errcode_t __get_dirent_tail(ext2_filsys fs,
+ struct ext2_dir_entry *dirent,
+ struct ext2_dir_entry_tail **tt,
+ int need_swab)
+{
+ struct ext2_dir_entry *d;
+ void *top;
+ struct ext2_dir_entry_tail *t;
+ unsigned int rec_len;
+ errcode_t retval = 0;
+ __u16 (*translate)(__u16) = (need_swab ? disk_to_host16 : do_nothing16);
+
+ if (fs->blocksize < 1024)
+ return EXT2_FILSYS_CORRUPTED; /* Should never happen */
+
+ d = dirent;
+ top = EXT2_DIRENT_TAIL(dirent, fs->blocksize);
+
+ while ((void *) d < top) {
+ rec_len = translate(d->rec_len);
+ if ((rec_len < 8) || (rec_len & 0x03))
+ return EXT2_ET_DIR_CORRUPTED;
+ d = (struct ext2_dir_entry *)(((char *)d) + rec_len);
+ }
+
+ if ((char *)d > ((char *)dirent + fs->blocksize))
+ return EXT2_ET_DIR_CORRUPTED;
+ if (d != top)
+ return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;
+
+ t = (struct ext2_dir_entry_tail *)d;
+ if (t->det_reserved_zero1 ||
+ translate(t->det_rec_len) != sizeof(struct ext2_dir_entry_tail) ||
+ translate(t->det_reserved_name_len) != EXT2_DIR_NAME_LEN_CSUM)
+ return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;
+
+ if (tt)
+ *tt = t;
+ return retval;
+}
+
+int ext2fs_dirent_has_tail(ext2_filsys fs, struct ext2_dir_entry *dirent)
+{
+ return __get_dirent_tail(fs, dirent, NULL, 0) !=
+ EXT2_ET_DIR_NO_SPACE_FOR_CSUM;
+}
+
+static errcode_t ext2fs_dirent_csum(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent, __u32 *crc,
+ int size)
+{
+ errcode_t retval;
+ char *buf = (char *)dirent;
+ __u32 gen;
+ struct ext2_inode inode;
+
+ retval = ext2fs_read_inode(fs, inum, &inode);
+ if (retval)
+ return retval;
+
+ inum = ext2fs_cpu_to_le32(inum);
+ gen = ext2fs_cpu_to_le32(inode.i_generation);
+ *crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&inum,
+ sizeof(inum));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)&gen, sizeof(gen));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)buf, size);
+
+ return 0;
+}
+
+int ext2fs_dirent_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent)
+{
+ errcode_t retval;
+ __u32 calculated;
+ struct ext2_dir_entry_tail *t;
+
+ retval = __get_dirent_tail(fs, dirent, &t, 1);
+ if (retval)
+ return 1;
+
+ /*
+ * The checksum field is overlaid with the dirent->name field
+ * so the swapfs.c functions won't change the endianness.
+ */
+ retval = ext2fs_dirent_csum(fs, inum, dirent, &calculated,
+ (char *)t - (char *)dirent);
+ if (retval)
+ return 0;
+ return ext2fs_le32_to_cpu(t->det_checksum) == calculated;
+}
+
+static errcode_t ext2fs_dirent_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent)
+{
+ errcode_t retval;
+ __u32 crc;
+ struct ext2_dir_entry_tail *t;
+
+ retval = __get_dirent_tail(fs, dirent, &t, 1);
+ if (retval)
+ return retval;
+
+ /* swapfs.c functions don't change the checksum endianness */
+ retval = ext2fs_dirent_csum(fs, inum, dirent, &crc,
+ (char *)t - (char *)dirent);
+ if (retval)
+ return retval;
+ t->det_checksum = ext2fs_cpu_to_le32(crc);
+ return 0;
+}
+
+errcode_t ext2fs_dx_csum(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent,
+ __u32 *crc, struct ext2_dx_tail **ret_t)
+{
+ errcode_t retval;
+ char *buf = (char *)dirent;
+ int size;
+ __u32 gen, dummy_csum = 0;
+ struct ext2_inode inode;
+ struct ext2_dx_tail *t;
+ struct ext2_dx_countlimit *c;
+ int count_offset, limit, count;
+
+ retval = __get_dx_countlimit(fs, dirent, &c, &count_offset, 1);
+ if (retval)
+ return retval;
+ limit = ext2fs_le16_to_cpu(c->limit);
+ count = ext2fs_le16_to_cpu(c->count);
+ if (count_offset + (limit * sizeof(struct ext2_dx_entry)) >
+ fs->blocksize - sizeof(struct ext2_dx_tail))
+ return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;
+ /* htree structs are accessed in LE order */
+ t = (struct ext2_dx_tail *)(((struct ext2_dx_entry *)c) + limit);
+
+ size = count_offset + (count * sizeof(struct ext2_dx_entry));
+
+ retval = ext2fs_read_inode(fs, inum, &inode);
+ if (retval)
+ return retval;
+
+ inum = ext2fs_cpu_to_le32(inum);
+ gen = ext2fs_cpu_to_le32(inode.i_generation);
+ *crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&inum,
+ sizeof(inum));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)&gen, sizeof(gen));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)buf, size);
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)t, 4);
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)&dummy_csum, 4);
+
+ if (ret_t)
+ *ret_t = t;
+ return 0;
+}
+
+static int ext2fs_dx_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent)
+{
+ __u32 calculated;
+ errcode_t retval;
+ struct ext2_dx_tail *t;
+
+ retval = ext2fs_dx_csum(fs, inum, dirent, &calculated, &t);
+ if (retval)
+ return 0;
+
+ return ext2fs_le32_to_cpu(t->dt_checksum) == calculated;
+}
+
+static errcode_t ext2fs_dx_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent)
+{
+ __u32 crc;
+ errcode_t retval = 0;
+ struct ext2_dx_tail *t;
+
+ retval = ext2fs_dx_csum(fs, inum, dirent, &crc, &t);
+ if (retval)
+ return retval;
+ t->dt_checksum = ext2fs_cpu_to_le32(crc);
+ return retval;
+}
+
+int ext2fs_dir_block_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent)
+{
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+
+ if (__get_dirent_tail(fs, dirent, NULL, 1) == 0)
+ return ext2fs_dirent_csum_verify(fs, inum, dirent);
+ if (__get_dx_countlimit(fs, dirent, NULL, NULL, 1) == 0)
+ return ext2fs_dx_csum_verify(fs, inum, dirent);
+
+ return 0;
+}
+
+errcode_t ext2fs_dir_block_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent)
+{
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ if (__get_dirent_tail(fs, dirent, NULL, 1) == 0)
+ return ext2fs_dirent_csum_set(fs, inum, dirent);
+ if (__get_dx_countlimit(fs, dirent, NULL, NULL, 1) == 0)
+ return ext2fs_dx_csum_set(fs, inum, dirent);
+
+ if (fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS)
+ return 0;
+ return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;
+}
+
+#define EXT3_EXTENT_TAIL_OFFSET(hdr) (sizeof(struct ext3_extent_header) + \
+ (sizeof(struct ext3_extent) * ext2fs_le16_to_cpu((hdr)->eh_max)))
+
+static struct ext3_extent_tail *get_extent_tail(struct ext3_extent_header *h)
+{
+ return (struct ext3_extent_tail *)(((char *)h) +
+ EXT3_EXTENT_TAIL_OFFSET(h));
+}
+
+static errcode_t ext2fs_extent_block_csum(ext2_filsys fs, ext2_ino_t inum,
+ struct ext3_extent_header *eh,
+ __u32 *crc)
+{
+ int size;
+ __u32 gen;
+ errcode_t retval;
+ struct ext2_inode inode;
+
+ size = EXT3_EXTENT_TAIL_OFFSET(eh) + offsetof(struct ext3_extent_tail,
+ et_checksum);
+
+ retval = ext2fs_read_inode(fs, inum, &inode);
+ if (retval)
+ return retval;
+ inum = ext2fs_cpu_to_le32(inum);
+ gen = ext2fs_cpu_to_le32(inode.i_generation);
+ *crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&inum,
+ sizeof(inum));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)&gen, sizeof(gen));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)eh, size);
+
+ return 0;
+}
+
+int ext2fs_extent_block_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext3_extent_header *eh)
+{
+ errcode_t retval;
+ __u32 provided, calculated;
+ struct ext3_extent_tail *t = get_extent_tail(eh);
+
+ /*
+ * The extent tree structures are accessed in LE order, so we must
+ * swap the checksum bytes here.
+ */
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+
+ provided = ext2fs_le32_to_cpu(t->et_checksum);
+ retval = ext2fs_extent_block_csum(fs, inum, eh, &calculated);
+ if (retval)
+ return 0;
+
+ return provided == calculated;
+}
+
+errcode_t ext2fs_extent_block_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ struct ext3_extent_header *eh)
+{
+ errcode_t retval;
+ __u32 crc;
+ struct ext3_extent_tail *t = get_extent_tail(eh);
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ /*
+ * The extent tree structures are accessed in LE order, so we must
+ * swap the checksum bytes here.
+ */
+ retval = ext2fs_extent_block_csum(fs, inum, eh, &crc);
+ if (retval)
+ return retval;
+ t->et_checksum = ext2fs_cpu_to_le32(crc);
+ return retval;
+}
+
+int ext2fs_inode_bitmap_csum_verify(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size)
+{
+ struct ext4_group_desc *gdp = (struct ext4_group_desc *)
+ ext2fs_group_desc(fs, fs->group_desc, group);
+ __u32 provided, calculated;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+ provided = gdp->bg_inode_bitmap_csum_lo;
+ calculated = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap,
+ size);
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
+ provided |= (__u32)gdp->bg_inode_bitmap_csum_hi << 16;
+ else
+ calculated &= 0xFFFF;
+
+ return provided == calculated;
+}
+
+errcode_t ext2fs_inode_bitmap_csum_set(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size)
+{
+ __u32 crc;
+ struct ext4_group_desc *gdp = (struct ext4_group_desc *)
+ ext2fs_group_desc(fs, fs->group_desc, group);
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap, size);
+ gdp->bg_inode_bitmap_csum_lo = crc & 0xFFFF;
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
+ gdp->bg_inode_bitmap_csum_hi = crc >> 16;
+
+ return 0;
+}
+
+int ext2fs_block_bitmap_csum_verify(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size)
+{
+ struct ext4_group_desc *gdp = (struct ext4_group_desc *)
+ ext2fs_group_desc(fs, fs->group_desc, group);
+ __u32 provided, calculated;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+ provided = gdp->bg_block_bitmap_csum_lo;
+ calculated = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap,
+ size);
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
+ provided |= (__u32)gdp->bg_block_bitmap_csum_hi << 16;
+ else
+ calculated &= 0xFFFF;
+
+ return provided == calculated;
+}
+
+errcode_t ext2fs_block_bitmap_csum_set(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size)
+{
+ __u32 crc;
+ struct ext4_group_desc *gdp = (struct ext4_group_desc *)
+ ext2fs_group_desc(fs, fs->group_desc, group);
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap, size);
+ gdp->bg_block_bitmap_csum_lo = crc & 0xFFFF;
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
+ gdp->bg_block_bitmap_csum_hi = crc >> 16;
+
+ return 0;
+}
+
+static errcode_t ext2fs_inode_csum(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_inode_large *inode,
+ __u32 *crc, int has_hi)
+{
+ __u32 gen;
+ struct ext2_inode_large *desc = inode;
+ size_t size = EXT2_INODE_SIZE(fs->super);
+ __u16 old_lo;
+ __u16 old_hi = 0;
+
+ old_lo = inode->i_checksum_lo;
+ inode->i_checksum_lo = 0;
+ if (has_hi) {
+ old_hi = inode->i_checksum_hi;
+ inode->i_checksum_hi = 0;
+ }
+
+ inum = ext2fs_cpu_to_le32(inum);
+ gen = inode->i_generation;
+ *crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&inum,
+ sizeof(inum));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)&gen, sizeof(gen));
+ *crc = ext2fs_crc32c_le(*crc, (unsigned char *)desc, size);
+
+ inode->i_checksum_lo = old_lo;
+ if (has_hi)
+ inode->i_checksum_hi = old_hi;
+ return 0;
+}
+
+int ext2fs_inode_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_inode_large *inode)
+{
+ errcode_t retval;
+ __u32 provided, calculated;
+ unsigned int i, has_hi;
+ char *cp;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+
+ has_hi = (EXT2_INODE_SIZE(fs->super) > EXT2_GOOD_OLD_INODE_SIZE &&
+ inode->i_extra_isize >= EXT4_INODE_CSUM_HI_EXTRA_END);
+
+ provided = ext2fs_le16_to_cpu(inode->i_checksum_lo);
+ retval = ext2fs_inode_csum(fs, inum, inode, &calculated, has_hi);
+ if (retval)
+ return 0;
+ if (has_hi) {
+ __u32 hi = ext2fs_le16_to_cpu(inode->i_checksum_hi);
+ provided |= hi << 16;
+ } else
+ calculated &= 0xFFFF;
+
+ if (provided == calculated)
+ return 1;
+
+ /*
+ * If the checksum didn't match, it's possible it was due to
+ * the inode being all zero's. It's unlikely this is the
+ * case, but it can happen. So check for it here. (We only
+ * check the base inode since that's good enough, and it's not
+ * worth the bother to figure out how much of the extended
+ * inode, if any, is present.)
+ */
+ for (cp = (char *) inode, i = 0;
+ i < sizeof(struct ext2_inode);
+ cp++, i++)
+ if (*cp)
+ return 0;
+ return 1; /* Inode must have been all zero's */
+}
+
+errcode_t ext2fs_inode_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_inode_large *inode)
+{
+ errcode_t retval;
+ __u32 crc;
+ int has_hi;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ has_hi = (EXT2_INODE_SIZE(fs->super) > EXT2_GOOD_OLD_INODE_SIZE &&
+ inode->i_extra_isize >= EXT4_INODE_CSUM_HI_EXTRA_END);
+
+ retval = ext2fs_inode_csum(fs, inum, inode, &crc, has_hi);
+ if (retval)
+ return retval;
+ inode->i_checksum_lo = ext2fs_cpu_to_le16(crc & 0xFFFF);
+ if (has_hi)
+ inode->i_checksum_hi = ext2fs_cpu_to_le16(crc >> 16);
+ return 0;
+}
+
+__u16 ext2fs_group_desc_csum(ext2_filsys fs, dgrp_t group)
+{
+ struct ext2_group_desc *desc = ext2fs_group_desc(fs, fs->group_desc,
+ group);
+ size_t offset, size = EXT2_DESC_SIZE(fs->super);
+ __u16 crc = 0;
+#ifdef WORDS_BIGENDIAN
+ struct ext4_group_desc swabdesc;
+ size_t save_size = size;
+ const size_t ext4_bg_size = sizeof(struct ext4_group_desc);
+ struct ext2_group_desc *save_desc = desc;
+
+ /* Have to swab back to little-endian to do the checksum */
+ if (size > ext4_bg_size)
+ size = ext4_bg_size;
+ memcpy(&swabdesc, desc, size);
+ ext2fs_swap_group_desc2(fs, (struct ext2_group_desc *) &swabdesc);
+ desc = (struct ext2_group_desc *) &swabdesc;
+ group = ext2fs_swab32(group);
+#endif
+
+ if (ext2fs_has_feature_metadata_csum(fs->super)) {
+ /* new metadata csum code */
+ __u16 old_crc;
+ __u32 crc32;
+
+ old_crc = desc->bg_checksum;
+ desc->bg_checksum = 0;
+ crc32 = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&group,
+ sizeof(group));
+ crc32 = ext2fs_crc32c_le(crc32, (unsigned char *)desc,
+ size);
+ desc->bg_checksum = old_crc;
+#ifdef WORDS_BIGENDIAN
+ if (save_size > ext4_bg_size)
+ crc32 = ext2fs_crc32c_le(crc32,
+ (unsigned char *)save_desc + ext4_bg_size,
+ save_size - ext4_bg_size);
+#endif
+ crc = crc32 & 0xFFFF;
+ goto out;
+ }
+
+ /* old crc16 code */
+ offset = offsetof(struct ext2_group_desc, bg_checksum);
+ crc = ext2fs_crc16(~0, fs->super->s_uuid,
+ sizeof(fs->super->s_uuid));
+ crc = ext2fs_crc16(crc, &group, sizeof(group));
+ crc = ext2fs_crc16(crc, desc, offset);
+ offset += sizeof(desc->bg_checksum); /* skip checksum */
+ /* for checksum of struct ext4_group_desc do the rest...*/
+ if (offset < size) {
+ crc = ext2fs_crc16(crc, (char *)desc + offset,
+ size - offset);
+ }
+#ifdef WORDS_BIGENDIAN
+ /*
+ * If the size of the bg descriptor is greater than 64
+ * bytes, which is the size of the traditional ext4 bg
+ * descriptor, checksum the rest of the descriptor here
+ */
+ if (save_size > ext4_bg_size)
+ crc = ext2fs_crc16(crc, (char *)save_desc + ext4_bg_size,
+ save_size - ext4_bg_size);
+#endif
+
+out:
+ return crc;
+}
+
+int ext2fs_group_desc_csum_verify(ext2_filsys fs, dgrp_t group)
+{
+ if (ext2fs_has_group_desc_csum(fs) &&
+ (ext2fs_bg_checksum(fs, group) !=
+ ext2fs_group_desc_csum(fs, group)))
+ return 0;
+
+ return 1;
+}
+
+void ext2fs_group_desc_csum_set(ext2_filsys fs, dgrp_t group)
+{
+ if (!ext2fs_has_group_desc_csum(fs))
+ return;
+
+ /* ext2fs_bg_checksum_set() sets the actual checksum field but
+ * does not calculate the checksum itself. */
+ ext2fs_bg_checksum_set(fs, group, ext2fs_group_desc_csum(fs, group));
+}
+
+static __u32 find_last_inode_ingrp(ext2fs_inode_bitmap bitmap,
+ __u32 inodes_per_grp, dgrp_t grp_no)
+{
+ ext2_ino_t i, start_ino, end_ino;
+
+ start_ino = grp_no * inodes_per_grp + 1;
+ end_ino = start_ino + inodes_per_grp - 1;
+
+ for (i = end_ino; i >= start_ino; i--) {
+ if (ext2fs_fast_test_inode_bitmap2(bitmap, i))
+ return i - start_ino + 1;
+ }
+ return inodes_per_grp;
+}
+
+/* update the bitmap flags, set the itable high watermark, and calculate
+ * checksums for the group descriptors */
+errcode_t ext2fs_set_gdt_csum(ext2_filsys fs)
+{
+ struct ext2_super_block *sb = fs->super;
+ int dirty = 0;
+ dgrp_t i;
+
+ if (!fs->inode_map)
+ return EXT2_ET_NO_INODE_BITMAP;
+
+ if (!ext2fs_has_group_desc_csum(fs))
+ return 0;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ __u32 old_csum = ext2fs_bg_checksum(fs, i);
+ __u32 old_unused = ext2fs_bg_itable_unused(fs, i);
+ __u32 old_flags = ext2fs_bg_flags(fs, i);
+ __u32 old_free_inodes_count = ext2fs_bg_free_inodes_count(fs, i);
+ __u32 old_free_blocks_count = ext2fs_bg_free_blocks_count(fs, i);
+
+ if (old_free_blocks_count == sb->s_blocks_per_group &&
+ i != fs->group_desc_count - 1)
+ ext2fs_bg_flags_set(fs, i, EXT2_BG_BLOCK_UNINIT);
+
+ if (old_free_inodes_count == sb->s_inodes_per_group) {
+ ext2fs_bg_flags_set(fs, i, EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_itable_unused_set(fs, i, sb->s_inodes_per_group);
+ } else {
+ int unused =
+ sb->s_inodes_per_group -
+ find_last_inode_ingrp(fs->inode_map,
+ sb->s_inodes_per_group, i);
+
+ ext2fs_bg_flags_clear(fs, i, EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_itable_unused_set(fs, i, unused);
+ }
+
+ ext2fs_group_desc_csum_set(fs, i);
+ if (old_flags != ext2fs_bg_flags(fs, i))
+ dirty = 1;
+ if (old_unused != ext2fs_bg_itable_unused(fs, i))
+ dirty = 1;
+ if (old_csum != ext2fs_bg_checksum(fs, i))
+ dirty = 1;
+ }
+ if (dirty)
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
+
+#ifdef DEBUG
+#include "e2p/e2p.h"
+
+void print_csum(const char *msg, ext2_filsys fs, dgrp_t group)
+{
+ __u16 crc1, crc2, crc3;
+ dgrp_t swabgroup;
+ struct ext2_group_desc *desc = ext2fs_group_desc(fs, fs->group_desc,
+ group);
+ size_t size = EXT2_DESC_SIZE(fs->super);
+ struct ext2_super_block *sb = fs->super;
+ int offset = offsetof(struct ext2_group_desc, bg_checksum);
+#ifdef WORDS_BIGENDIAN
+ struct ext4_group_desc swabdesc;
+ struct ext2_group_desc *save_desc = desc;
+ const size_t ext4_bg_size = sizeof(struct ext4_group_desc);
+ size_t save_size = size;
+#endif
+
+#ifdef WORDS_BIGENDIAN
+ /* Have to swab back to little-endian to do the checksum */
+ if (size > ext4_bg_size)
+ size = ext4_bg_size;
+ memcpy(&swabdesc, desc, size);
+ ext2fs_swap_group_desc2(fs, (struct ext2_group_desc *) &swabdesc);
+ desc = (struct ext2_group_desc *) &swabdesc;
+
+ swabgroup = ext2fs_swab32(group);
+#else
+ swabgroup = group;
+#endif
+
+ crc1 = ext2fs_crc16(~0, sb->s_uuid, sizeof(fs->super->s_uuid));
+ crc2 = ext2fs_crc16(crc1, &swabgroup, sizeof(swabgroup));
+ crc3 = ext2fs_crc16(crc2, desc, offset);
+ offset += sizeof(desc->bg_checksum); /* skip checksum */
+ /* for checksum of struct ext4_group_desc do the rest...*/
+ if (offset < size)
+ crc3 = ext2fs_crc16(crc3, (char *)desc + offset, size - offset);
+#ifdef WORDS_BIGENDIAN
+ if (save_size > ext4_bg_size)
+ crc3 = ext2fs_crc16(crc3, (char *)save_desc + ext4_bg_size,
+ save_size - ext4_bg_size);
+#endif
+
+ printf("%s UUID %s=%04x, grp %u=%04x: %04x=%04x\n",
+ msg, e2p_uuid2str(sb->s_uuid), crc1, group, crc2, crc3,
+ ext2fs_group_desc_csum(fs, group));
+}
+
+unsigned char sb_uuid[16] = { 0x4f, 0x25, 0xe8, 0xcf, 0xe7, 0x97, 0x48, 0x23,
+ 0xbe, 0xfa, 0xa7, 0x88, 0x4b, 0xae, 0xec, 0xdb };
+
+int main(int argc, char **argv)
+{
+ struct ext2_super_block param;
+ errcode_t retval;
+ ext2_filsys fs;
+ int i;
+ __u16 csum1, csum2, csum_known = 0xd3a4;
+
+ memset(&param, 0, sizeof(param));
+ ext2fs_blocks_count_set(&param, 32768);
+#if 0
+ param.s_feature_incompat |= EXT4_FEATURE_INCOMPAT_64BIT;
+ param.s_desc_size = 128;
+ csum_known = 0x5b6e;
+#endif
+
+ retval = ext2fs_initialize("test fs", EXT2_FLAG_64BITS, &param,
+ test_io_manager, &fs);
+ if (retval) {
+ com_err("setup", retval,
+ "While initializing filesystem");
+ exit(1);
+ }
+ memcpy(fs->super->s_uuid, sb_uuid, 16);
+ fs->super->s_feature_ro_compat = EXT4_FEATURE_RO_COMPAT_GDT_CSUM;
+
+ for (i=0; i < fs->group_desc_count; i++) {
+ ext2fs_block_bitmap_loc_set(fs, i, 124);
+ ext2fs_inode_bitmap_loc_set(fs, i, 125);
+ ext2fs_inode_table_loc_set(fs, i, 126);
+ ext2fs_bg_free_blocks_count_set(fs, i, 31119);
+ ext2fs_bg_free_inodes_count_set(fs, i, 15701);
+ ext2fs_bg_used_dirs_count_set(fs, i, 2);
+ ext2fs_bg_flags_zap(fs, i);
+ };
+
+ csum1 = ext2fs_group_desc_csum(fs, 0);
+ print_csum("csum0000", fs, 0);
+
+ if (csum1 != csum_known) {
+ printf("checksum for group 0 should be %04x\n", csum_known);
+ exit(1);
+ }
+ csum2 = ext2fs_group_desc_csum(fs, 1);
+ print_csum("csum0001", fs, 1);
+ if (csum1 == csum2) {
+ printf("checksums for different groups shouldn't match\n");
+ exit(1);
+ }
+ csum2 = ext2fs_group_desc_csum(fs, 2);
+ print_csum("csumffff", fs, 2);
+ if (csum1 == csum2) {
+ printf("checksums for different groups shouldn't match\n");
+ exit(1);
+ }
+ ext2fs_bg_checksum_set(fs, 0, csum1);
+ csum2 = ext2fs_group_desc_csum(fs, 0);
+ print_csum("csum_set", fs, 0);
+ if (csum1 != csum2) {
+ printf("checksums should not depend on checksum field\n");
+ exit(1);
+ }
+ if (!ext2fs_group_desc_csum_verify(fs, 0)) {
+ printf("checksums should verify against gd_checksum\n");
+ exit(1);
+ }
+ memset(fs->super->s_uuid, 0x30, sizeof(fs->super->s_uuid));
+ print_csum("new_uuid", fs, 0);
+ if (ext2fs_group_desc_csum_verify(fs, 0) != 0) {
+ printf("checksums for different filesystems shouldn't match\n");
+ exit(1);
+ }
+ csum1 = ext2fs_group_desc_csum(fs, 0);
+ ext2fs_bg_checksum_set(fs, 0, csum1);
+ print_csum("csum_new", fs, 0);
+ ext2fs_bg_free_blocks_count_set(fs, 0, 1);
+ csum2 = ext2fs_group_desc_csum(fs, 0);
+ print_csum("csum_blk", fs, 0);
+ if (csum1 == csum2) {
+ printf("checksums for different data shouldn't match\n");
+ exit(1);
+ }
+ ext2fs_free(fs);
+
+ return 0;
+}
+#endif
diff --git a/lib/ext2fs/dblist.c b/lib/ext2fs/dblist.c
new file mode 100644
index 0000000..bbdb221
--- /dev/null
+++ b/lib/ext2fs/dblist.c
@@ -0,0 +1,403 @@
+/*
+ * dblist.c -- directory block list functions
+ *
+ * Copyright 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+static EXT2_QSORT_TYPE dir_block_cmp(const void *a, const void *b);
+static EXT2_QSORT_TYPE dir_block_cmp2(const void *a, const void *b);
+static EXT2_QSORT_TYPE (*sortfunc32)(const void *a, const void *b);
+
+/*
+ * helper function for making a new directory block list (for
+ * initialize and copy).
+ */
+static errcode_t make_dblist(ext2_filsys fs, ext2_ino_t size,
+ ext2_ino_t count,
+ struct ext2_db_entry2 *list,
+ ext2_dblist *ret_dblist)
+{
+ ext2_dblist dblist = NULL;
+ errcode_t retval;
+ ext2_ino_t num_dirs;
+ size_t len;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if ((ret_dblist == 0) && fs->dblist &&
+ (fs->dblist->magic == EXT2_ET_MAGIC_DBLIST))
+ return 0;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_struct_dblist), &dblist);
+ if (retval)
+ goto cleanup;
+ memset(dblist, 0, sizeof(struct ext2_struct_dblist));
+
+ dblist->magic = EXT2_ET_MAGIC_DBLIST;
+ dblist->fs = fs;
+ if (size)
+ dblist->size = size;
+ else {
+ retval = ext2fs_get_num_dirs(fs, &num_dirs);
+ if (retval)
+ goto cleanup;
+ dblist->size = (num_dirs * 2) + 12;
+ }
+ len = (size_t) sizeof(struct ext2_db_entry2) * dblist->size;
+ dblist->count = count;
+ retval = ext2fs_get_array(dblist->size, sizeof(struct ext2_db_entry2),
+ &dblist->list);
+ if (retval)
+ goto cleanup;
+
+ if (list)
+ memcpy(dblist->list, list, len);
+ else
+ memset(dblist->list, 0, len);
+ if (ret_dblist)
+ *ret_dblist = dblist;
+ else
+ fs->dblist = dblist;
+ return 0;
+cleanup:
+ if (dblist)
+ ext2fs_free_mem(&dblist);
+ return retval;
+}
+
+/*
+ * Initialize a directory block list
+ */
+errcode_t ext2fs_init_dblist(ext2_filsys fs, ext2_dblist *ret_dblist)
+{
+ ext2_dblist dblist;
+ errcode_t retval;
+
+ retval = make_dblist(fs, 0, 0, 0, &dblist);
+ if (retval)
+ return retval;
+
+ dblist->sorted = 1;
+ if (ret_dblist)
+ *ret_dblist = dblist;
+ else
+ fs->dblist = dblist;
+
+ return 0;
+}
+
+/*
+ * Copy a directory block list
+ */
+errcode_t ext2fs_copy_dblist(ext2_dblist src, ext2_dblist *dest)
+{
+ ext2_dblist dblist;
+ errcode_t retval;
+
+ retval = make_dblist(src->fs, src->size, src->count, src->list,
+ &dblist);
+ if (retval)
+ return retval;
+ dblist->sorted = src->sorted;
+ *dest = dblist;
+ return 0;
+}
+
+/*
+ * Close a directory block list
+ *
+ * (moved to closefs.c)
+ */
+
+
+/*
+ * Add a directory block to the directory block list
+ */
+errcode_t ext2fs_add_dir_block2(ext2_dblist dblist, ext2_ino_t ino,
+ blk64_t blk, e2_blkcnt_t blockcnt)
+{
+ struct ext2_db_entry2 *new_entry;
+ errcode_t retval;
+ unsigned long old_size;
+
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ if (dblist->count >= dblist->size) {
+ old_size = dblist->size * sizeof(struct ext2_db_entry2);
+ dblist->size += dblist->size > 200 ? dblist->size / 2 : 100;
+ retval = ext2fs_resize_mem(old_size, (size_t) dblist->size *
+ sizeof(struct ext2_db_entry2),
+ &dblist->list);
+ if (retval) {
+ dblist->size = old_size / sizeof(struct ext2_db_entry2);
+ return retval;
+ }
+ }
+ new_entry = dblist->list + ( dblist->count++);
+ new_entry->blk = blk;
+ new_entry->ino = ino;
+ new_entry->blockcnt = blockcnt;
+
+ dblist->sorted = 0;
+
+ return 0;
+}
+
+/*
+ * Change the directory block to the directory block list
+ */
+errcode_t ext2fs_set_dir_block2(ext2_dblist dblist, ext2_ino_t ino,
+ blk64_t blk, e2_blkcnt_t blockcnt)
+{
+ dgrp_t i;
+
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ for (i=0; i < dblist->count; i++) {
+ if ((dblist->list[i].ino != ino) ||
+ (dblist->list[i].blockcnt != blockcnt))
+ continue;
+ dblist->list[i].blk = blk;
+ dblist->sorted = 0;
+ return 0;
+ }
+ return EXT2_ET_DB_NOT_FOUND;
+}
+
+void ext2fs_dblist_sort2(ext2_dblist dblist,
+ EXT2_QSORT_TYPE (*sortfunc)(const void *,
+ const void *))
+{
+ if (!sortfunc)
+ sortfunc = dir_block_cmp2;
+ qsort(dblist->list, (size_t) dblist->count,
+ sizeof(struct ext2_db_entry2), sortfunc);
+ dblist->sorted = 1;
+}
+
+/*
+ * This function iterates over the directory block list
+ */
+errcode_t ext2fs_dblist_iterate3(ext2_dblist dblist,
+ int (*func)(ext2_filsys fs,
+ struct ext2_db_entry2 *db_info,
+ void *priv_data),
+ unsigned long long start,
+ unsigned long long count,
+ void *priv_data)
+{
+ unsigned long long i, end;
+ int ret;
+
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ end = start + count;
+ if (!dblist->sorted)
+ ext2fs_dblist_sort2(dblist, 0);
+ if (end > dblist->count)
+ end = dblist->count;
+ for (i = start; i < end; i++) {
+ ret = (*func)(dblist->fs, &dblist->list[i], priv_data);
+ if (ret & DBLIST_ABORT)
+ return 0;
+ }
+ return 0;
+}
+
+errcode_t ext2fs_dblist_iterate2(ext2_dblist dblist,
+ int (*func)(ext2_filsys fs,
+ struct ext2_db_entry2 *db_info,
+ void *priv_data),
+ void *priv_data)
+{
+ return ext2fs_dblist_iterate3(dblist, func, 0, dblist->count,
+ priv_data);
+}
+
+static EXT2_QSORT_TYPE dir_block_cmp2(const void *a, const void *b)
+{
+ const struct ext2_db_entry2 *db_a =
+ (const struct ext2_db_entry2 *) a;
+ const struct ext2_db_entry2 *db_b =
+ (const struct ext2_db_entry2 *) b;
+
+ if (db_a->blk != db_b->blk)
+ return (int) (db_a->blk - db_b->blk);
+
+ if (db_a->ino != db_b->ino)
+ return (int) (db_a->ino - db_b->ino);
+
+ return (db_a->blockcnt - db_b->blockcnt);
+}
+
+blk64_t ext2fs_dblist_count2(ext2_dblist dblist)
+{
+ return dblist->count;
+}
+
+errcode_t ext2fs_dblist_get_last2(ext2_dblist dblist,
+ struct ext2_db_entry2 **entry)
+{
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ if (dblist->count == 0)
+ return EXT2_ET_DBLIST_EMPTY;
+
+ if (entry)
+ *entry = dblist->list + ( dblist->count-1);
+ return 0;
+}
+
+errcode_t ext2fs_dblist_drop_last(ext2_dblist dblist)
+{
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ if (dblist->count == 0)
+ return EXT2_ET_DBLIST_EMPTY;
+
+ dblist->count--;
+ return 0;
+}
+
+/*
+ * Legacy 32-bit versions
+ */
+
+/*
+ * Add a directory block to the directory block list
+ */
+errcode_t ext2fs_add_dir_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk,
+ int blockcnt)
+{
+ return ext2fs_add_dir_block2(dblist, ino, blk, blockcnt);
+}
+
+/*
+ * Change the directory block to the directory block list
+ */
+errcode_t ext2fs_set_dir_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk,
+ int blockcnt)
+{
+ return ext2fs_set_dir_block2(dblist, ino, blk, blockcnt);
+}
+
+void ext2fs_dblist_sort(ext2_dblist dblist,
+ EXT2_QSORT_TYPE (*sortfunc)(const void *,
+ const void *))
+{
+ if (sortfunc) {
+ sortfunc32 = sortfunc;
+ sortfunc = dir_block_cmp;
+ } else
+ sortfunc = dir_block_cmp2;
+ qsort(dblist->list, (size_t) dblist->count,
+ sizeof(struct ext2_db_entry2), sortfunc);
+ dblist->sorted = 1;
+}
+
+/*
+ * This function iterates over the directory block list
+ */
+struct iterate_passthrough {
+ int (*func)(ext2_filsys fs,
+ struct ext2_db_entry *db_info,
+ void *priv_data);
+ void *priv_data;
+};
+
+static int passthrough_func(ext2_filsys fs,
+ struct ext2_db_entry2 *db_info,
+ void *priv_data)
+{
+ struct iterate_passthrough *p = priv_data;
+ struct ext2_db_entry db;
+ int ret;
+
+ db.ino = db_info->ino;
+ db.blk = (blk_t) db_info->blk;
+ db.blockcnt = (int) db_info->blockcnt;
+ ret = (p->func)(fs, &db, p->priv_data);
+ db_info->ino = db.ino;
+ db_info->blk = db.blk;
+ db_info->blockcnt = db.blockcnt;
+ return ret;
+}
+
+errcode_t ext2fs_dblist_iterate(ext2_dblist dblist,
+ int (*func)(ext2_filsys fs,
+ struct ext2_db_entry *db_info,
+ void *priv_data),
+ void *priv_data)
+{
+ struct iterate_passthrough pass;
+
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+ pass.func = func;
+ pass.priv_data = priv_data;
+
+ return ext2fs_dblist_iterate2(dblist, passthrough_func, &pass);
+}
+
+static EXT2_QSORT_TYPE dir_block_cmp(const void *a, const void *b)
+{
+ const struct ext2_db_entry2 *db_a =
+ (const struct ext2_db_entry2 *) a;
+ const struct ext2_db_entry2 *db_b =
+ (const struct ext2_db_entry2 *) b;
+
+ struct ext2_db_entry a32, b32;
+
+ a32.ino = db_a->ino; a32.blk = db_a->blk;
+ a32.blockcnt = db_a->blockcnt;
+
+ b32.ino = db_b->ino; b32.blk = db_b->blk;
+ b32.blockcnt = db_b->blockcnt;
+
+ return sortfunc32(&a32, &b32);
+}
+
+int ext2fs_dblist_count(ext2_dblist dblist)
+{
+ return dblist->count;
+}
+
+errcode_t ext2fs_dblist_get_last(ext2_dblist dblist,
+ struct ext2_db_entry **entry)
+{
+ static struct ext2_db_entry ret_entry;
+ struct ext2_db_entry2 *last;
+
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ if (dblist->count == 0)
+ return EXT2_ET_DBLIST_EMPTY;
+
+ if (!entry)
+ return 0;
+
+ last = dblist->list + dblist->count -1;
+
+ ret_entry.ino = last->ino;
+ ret_entry.blk = last->blk;
+ ret_entry.blockcnt = last->blockcnt;
+ *entry = &ret_entry;
+
+ return 0;
+}
+
diff --git a/lib/ext2fs/dblist_dir.c b/lib/ext2fs/dblist_dir.c
new file mode 100644
index 0000000..864a3ca
--- /dev/null
+++ b/lib/ext2fs/dblist_dir.c
@@ -0,0 +1,88 @@
+/*
+ * dblist_dir.c --- iterate by directory entry
+ *
+ * Copyright 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+static int db_dir_proc(ext2_filsys fs, struct ext2_db_entry2 *db_info,
+ void *priv_data);
+
+errcode_t ext2fs_dblist_dir_iterate(ext2_dblist dblist,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_ino_t dir,
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data),
+ void *priv_data)
+{
+ errcode_t retval;
+ struct dir_context ctx;
+
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ ctx.dir = 0;
+ ctx.flags = flags;
+ if (block_buf)
+ ctx.buf = block_buf;
+ else {
+ retval = ext2fs_get_mem(dblist->fs->blocksize, &ctx.buf);
+ if (retval)
+ return retval;
+ }
+ ctx.func = func;
+ ctx.priv_data = priv_data;
+ ctx.errcode = 0;
+
+ retval = ext2fs_dblist_iterate2(dblist, db_dir_proc, &ctx);
+
+ if (!block_buf)
+ ext2fs_free_mem(&ctx.buf);
+ if (retval)
+ return retval;
+ return ctx.errcode;
+}
+
+static int db_dir_proc(ext2_filsys fs, struct ext2_db_entry2 *db_info,
+ void *priv_data)
+{
+ struct ext2_inode inode;
+ struct dir_context *ctx;
+ int ret;
+
+ ctx = (struct dir_context *) priv_data;
+ ctx->dir = db_info->ino;
+ ctx->errcode = 0;
+
+ ctx->errcode = ext2fs_read_inode(fs, ctx->dir, &inode);
+ if (ctx->errcode)
+ return DBLIST_ABORT;
+ if (inode.i_flags & EXT4_INLINE_DATA_FL)
+ ret = ext2fs_inline_data_dir_iterate(fs, ctx->dir, ctx);
+ else
+ ret = ext2fs_process_dir_block(fs, &db_info->blk,
+ db_info->blockcnt, 0, 0,
+ priv_data);
+ if ((ret & BLOCK_ABORT) && !ctx->errcode)
+ return DBLIST_ABORT;
+ return 0;
+}
diff --git a/lib/ext2fs/digest_encode.c b/lib/ext2fs/digest_encode.c
new file mode 100644
index 0000000..075963f
--- /dev/null
+++ b/lib/ext2fs/digest_encode.c
@@ -0,0 +1,187 @@
+/*
+ * lib/ext2fs/digest_encode.c
+ *
+ * A function to encode a digest using 64 characters that are valid in a
+ * filename per ext2fs rules.
+ *
+ * Written by Uday Savagaonkar, 2014.
+ *
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include "ext2fs.h"
+
+static const char *lookup_table =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,";
+
+/**
+ * ext2fs_digest_encode() -
+ *
+ * Encodes the input digest using characters from the set [a-zA-Z0-9_+].
+ * The encoded string is roughly 4/3 times the size of the input string.
+ */
+int ext2fs_digest_encode(const char *src, int len, char *dst)
+{
+ int i = 0, bits = 0, ac = 0;
+ char *cp = dst;
+
+ while (i < len) {
+ ac += (((unsigned char) src[i]) << bits);
+ bits += 8;
+ do {
+ *cp++ = lookup_table[ac & 0x3f];
+ ac >>= 6;
+ bits -= 6;
+ } while (bits >= 6);
+ i++;
+ }
+ if (bits)
+ *cp++ = lookup_table[ac & 0x3f];
+ return cp - dst;
+}
+
+int ext2fs_digest_decode(const char *src, int len, char *dst)
+{
+ int i = 0, bits = 0, ac = 0;
+ const char *p;
+ char *cp = dst;
+
+ while (i < len) {
+ p = strchr(lookup_table, src[i]);
+ if (p == NULL || src[i] == 0)
+ return -1;
+ ac += (p - lookup_table) << bits;
+ bits += 6;
+ if (bits >= 8) {
+ *cp++ = ac & 0xff;
+ ac >>= 8;
+ bits -= 8;
+ }
+ i++;
+ }
+ if (ac)
+ return -1;
+ return cp - dst;
+}
+
+
+#ifdef UNITTEST
+static const struct {
+ unsigned char d[32];
+ unsigned int len;
+ const char *ed;
+} tests[] = {
+ { { 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14,
+ 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24,
+ 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c,
+ 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55 }, 32,
+ "jDLxChJ,cQhm7TPyZ+WukcirBROZbOJTkWZmbgnU4WF"
+ },
+ { { 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
+ 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
+ 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c,
+ 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad }, 32,
+ "6inF,+YAPreQBBk3d5qIjA7AhNqlXoHn0Cx,hJPAV0K"
+ },
+ { { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8,
+ 0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39,
+ 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67,
+ 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 }, 32,
+ "k0oahJtB4gb5AbykM4DY5MKPknFZ,HyZ2ze7Unx2GEM"
+ },
+ { { 0x00, }, 1,
+ "AA"
+ },
+ { { 0x01, }, 1,
+ "BA"
+ },
+ { { 0x01, 0x02 }, 2,
+ "BIA"
+ },
+ { { 0x01, 0x02, 0x03 }, 3,
+ "BIwA"
+ },
+ { { 0x01, 0x02, 0x03, 0x04 }, 4,
+ "BIwAEA"
+ },
+ { { 0x01, 0x02, 0x03, 0x04, 0xff }, 5,
+ "BIwAE8P"
+ },
+ { { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe }, 6,
+ "BIwAE8v,"
+ },
+ { { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe, 0xfd }, 7,
+ "BIwAE8v,9D"
+ },
+};
+
+int main(int argc, char **argv)
+{
+ int i, ret, len;
+ int errors = 0;
+ char tmp[1024], tmp2[1024];
+
+ if (argc == 3 && !strcmp(argv[1], "encode")) {
+ memset(tmp, 0, sizeof(tmp));
+ ext2fs_digest_encode(argv[2], strlen(argv[2]), tmp);
+ puts(tmp);
+ exit(0);
+ }
+ if (argc == 3 && !strcmp(argv[1], "decode")) {
+ memset(tmp, 0, sizeof(tmp));
+ ret = ext2fs_digest_decode(argv[2], strlen(argv[2]), tmp);
+ puts(tmp);
+ fprintf(stderr, "returned %d\n", ret);
+ exit(0);
+ }
+ for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) {
+ memset(tmp, 0, sizeof(tmp));
+ ret = ext2fs_digest_encode((const char *) tests[i].d,
+ tests[i].len, tmp);
+ len = strlen(tmp);
+ printf("Test Digest %d (returned %d): ", i, ret);
+ if (ret != len) {
+ printf("FAILED returned %d, string length was %d\n",
+ ret, len);
+ errors++;
+ continue;
+ } else if (strcmp(tmp, tests[i].ed) != 0) {
+ printf("FAILED: got %s, expected %s\n", tmp,
+ tests[i].ed);
+ errors++;
+ continue;
+ }
+ ret = ext2fs_digest_decode(tmp, len, tmp2);
+ if (ret != tests[i].len) {
+ printf("FAILED decode returned %d, expected %d\n",
+ ret, tests[i].len);
+ errors++;
+ continue;
+ }
+ if (memcmp(tmp2, tests[i].d, ret) != 0) {
+ puts("FAILED: decode mismatched");
+ errors++;
+ continue;
+ }
+ printf("OK\n");
+ }
+ for (i = 1; i < argc; i++) {
+ memset(tmp, 0, sizeof(tmp));
+ ret = ext2fs_digest_encode(argv[i], strlen(argv[i]), tmp);
+ len = strlen(tmp);
+ printf("Digest of '%s' is '%s' (returned %d, length %d)\n",
+ argv[i], tmp, ret, len);
+ }
+ return errors;
+}
+
+#endif /* UNITTEST */
diff --git a/lib/ext2fs/dir_iterate.c b/lib/ext2fs/dir_iterate.c
new file mode 100644
index 0000000..7798a48
--- /dev/null
+++ b/lib/ext2fs/dir_iterate.c
@@ -0,0 +1,315 @@
+/*
+ * dir_iterate.c --- ext2fs directory iteration operations
+ *
+ * Copyright (C) 1993, 1994, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+#define EXT4_MAX_REC_LEN ((1<<16)-1)
+
+errcode_t ext2fs_get_rec_len(ext2_filsys fs,
+ struct ext2_dir_entry *dirent,
+ unsigned int *rec_len)
+{
+ unsigned int len = dirent->rec_len;
+
+ if (fs->blocksize < 65536)
+ *rec_len = len;
+ else if (len == EXT4_MAX_REC_LEN || len == 0)
+ *rec_len = fs->blocksize;
+ else
+ *rec_len = (len & 65532) | ((len & 3) << 16);
+ return 0;
+}
+
+errcode_t ext2fs_set_rec_len(ext2_filsys fs,
+ unsigned int len,
+ struct ext2_dir_entry *dirent)
+{
+ if ((len > fs->blocksize) || (fs->blocksize > (1 << 18)) || (len & 3))
+ return EINVAL;
+ if (len < 65536) {
+ dirent->rec_len = len;
+ return 0;
+ }
+ if (len == fs->blocksize) {
+ if (fs->blocksize == 65536)
+ dirent->rec_len = EXT4_MAX_REC_LEN;
+ else
+ dirent->rec_len = 0;
+ } else
+ dirent->rec_len = (len & 65532) | ((len >> 16) & 3);
+ return 0;
+}
+
+/*
+ * This function checks to see whether or not a potential deleted
+ * directory entry looks valid. What we do is check the deleted entry
+ * and each successive entry to make sure that they all look valid and
+ * that the last deleted entry ends at the beginning of the next
+ * undeleted entry. Returns 1 if the deleted entry looks valid, zero
+ * if not valid.
+ */
+static int ext2fs_validate_entry(ext2_filsys fs, char *buf,
+ unsigned int offset,
+ unsigned int final_offset)
+{
+ struct ext2_dir_entry *dirent;
+ unsigned int rec_len;
+#define DIRENT_MIN_LENGTH 12
+
+ while ((offset < final_offset) &&
+ (offset <= fs->blocksize - DIRENT_MIN_LENGTH)) {
+ dirent = (struct ext2_dir_entry *)(buf + offset);
+ if (ext2fs_get_rec_len(fs, dirent, &rec_len))
+ return 0;
+ offset += rec_len;
+ if ((rec_len < 8) ||
+ ((rec_len % 4) != 0) ||
+ ((ext2fs_dirent_name_len(dirent)+8) > (int) rec_len))
+ return 0;
+ }
+ return (offset == final_offset);
+}
+
+errcode_t ext2fs_dir_iterate2(ext2_filsys fs,
+ ext2_ino_t dir,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_ino_t dir,
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data),
+ void *priv_data)
+{
+ struct dir_context ctx;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_check_directory(fs, dir);
+ if (retval)
+ return retval;
+
+ ctx.dir = dir;
+ ctx.flags = flags;
+ if (block_buf)
+ ctx.buf = block_buf;
+ else {
+ retval = ext2fs_get_mem(fs->blocksize, &ctx.buf);
+ if (retval)
+ return retval;
+ }
+ ctx.func = func;
+ ctx.priv_data = priv_data;
+ ctx.errcode = 0;
+ retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_READ_ONLY, 0,
+ ext2fs_process_dir_block, &ctx);
+ if (!block_buf)
+ ext2fs_free_mem(&ctx.buf);
+ if (retval == EXT2_ET_INLINE_DATA_CANT_ITERATE) {
+ (void) ext2fs_inline_data_dir_iterate(fs, dir, &ctx);
+ retval = 0;
+ }
+ if (retval)
+ return retval;
+ return ctx.errcode;
+}
+
+struct xlate {
+ int (*func)(struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data);
+ void *real_private;
+};
+
+static int xlate_func(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entry EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *dirent, int offset,
+ int blocksize, char *buf, void *priv_data)
+{
+ struct xlate *xl = (struct xlate *) priv_data;
+
+ return (*xl->func)(dirent, offset, blocksize, buf, xl->real_private);
+}
+
+errcode_t ext2fs_dir_iterate(ext2_filsys fs,
+ ext2_ino_t dir,
+ int flags,
+ char *block_buf,
+ int (*func)(struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data),
+ void *priv_data)
+{
+ struct xlate xl;
+
+ xl.real_private = priv_data;
+ xl.func = func;
+
+ return ext2fs_dir_iterate2(fs, dir, flags, block_buf,
+ xlate_func, &xl);
+}
+
+
+/*
+ * Helper function which is private to this module. Used by
+ * ext2fs_dir_iterate() and ext2fs_dblist_dir_iterate()
+ */
+int ext2fs_process_dir_block(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct dir_context *ctx = (struct dir_context *) priv_data;
+ unsigned int offset = 0;
+ unsigned int next_real_entry = 0;
+ int ret = 0;
+ int changed = 0;
+ int do_abort = 0;
+ unsigned int rec_len, size, buflen;
+ int entry;
+ struct ext2_dir_entry *dirent;
+ int csum_size = 0;
+ int inline_data;
+ errcode_t retval = 0;
+
+ if (blockcnt < 0)
+ return 0;
+
+ entry = blockcnt ? DIRENT_OTHER_FILE : DIRENT_DOT_FILE;
+
+ /* If a dir has inline data, we don't need to read block */
+ inline_data = !!(ctx->flags & DIRENT_FLAG_INCLUDE_INLINE_DATA);
+ if (!inline_data) {
+ ctx->errcode = ext2fs_read_dir_block4(fs, *blocknr, ctx->buf, 0,
+ ctx->dir);
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+ /* If we handle a normal dir, we traverse the entire block */
+ buflen = fs->blocksize;
+ } else {
+ buflen = ctx->buflen;
+ }
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dir_entry_tail);
+
+ if (buflen < 8) {
+ ctx->errcode = EXT2_ET_DIR_CORRUPTED;
+ return BLOCK_ABORT;
+ }
+ while (offset < buflen - 8) {
+ dirent = (struct ext2_dir_entry *) (ctx->buf + offset);
+ if (ext2fs_get_rec_len(fs, dirent, &rec_len))
+ return BLOCK_ABORT;
+ if (((offset + rec_len) > buflen) ||
+ (rec_len < 8) ||
+ ((rec_len % 4) != 0) ||
+ ((ext2fs_dirent_name_len(dirent)+8) > (int) rec_len)) {
+ ctx->errcode = EXT2_ET_DIR_CORRUPTED;
+ return BLOCK_ABORT;
+ }
+ if (!dirent->inode) {
+ /*
+ * We just need to check metadata_csum when this
+ * dir hasn't inline data. That means that 'buflen'
+ * should be blocksize.
+ */
+ if (!inline_data &&
+ (offset == buflen - csum_size) &&
+ (dirent->rec_len == csum_size) &&
+ (dirent->name_len == EXT2_DIR_NAME_LEN_CSUM)) {
+ if (!(ctx->flags & DIRENT_FLAG_INCLUDE_CSUM))
+ goto next;
+ entry = DIRENT_CHECKSUM;
+ } else if (!(ctx->flags & DIRENT_FLAG_INCLUDE_EMPTY))
+ goto next;
+ }
+
+ ret = (ctx->func)(ctx->dir,
+ (next_real_entry > offset) ?
+ DIRENT_DELETED_FILE : entry,
+ dirent, offset,
+ buflen, ctx->buf,
+ ctx->priv_data);
+ if (entry < DIRENT_OTHER_FILE)
+ entry++;
+
+ if (ret & DIRENT_CHANGED) {
+ if (ext2fs_get_rec_len(fs, dirent, &rec_len))
+ return BLOCK_ABORT;
+ changed++;
+ }
+ if (ret & DIRENT_ABORT) {
+ do_abort++;
+ break;
+ }
+next:
+ if (next_real_entry == offset)
+ next_real_entry += rec_len;
+
+ if (ctx->flags & DIRENT_FLAG_INCLUDE_REMOVED) {
+ size = (ext2fs_dirent_name_len(dirent) + 11) & ~3;
+
+ if (rec_len != size) {
+ unsigned int final_offset;
+
+ final_offset = offset + rec_len;
+ offset += size;
+ while (offset < final_offset &&
+ !ext2fs_validate_entry(fs, ctx->buf,
+ offset,
+ final_offset))
+ offset += 4;
+ continue;
+ }
+ }
+ offset += rec_len;
+ }
+
+ if (changed) {
+ if (!inline_data) {
+ ctx->errcode = ext2fs_write_dir_block4(fs, *blocknr,
+ ctx->buf,
+ 0, ctx->dir);
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+ } else {
+ /*
+ * return BLOCK_INLINE_DATA_CHANGED to notify caller
+ * that inline data has been changed.
+ */
+ retval = BLOCK_INLINE_DATA_CHANGED;
+ }
+ }
+ if (do_abort)
+ return retval | BLOCK_ABORT;
+ return retval;
+}
diff --git a/lib/ext2fs/dirblock.c b/lib/ext2fs/dirblock.c
new file mode 100644
index 0000000..54b2777
--- /dev/null
+++ b/lib/ext2fs/dirblock.c
@@ -0,0 +1,113 @@
+/*
+ * dirblock.c --- directory block routines.
+ *
+ * Copyright (C) 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+errcode_t ext2fs_read_dir_block4(ext2_filsys fs, blk64_t block,
+ void *buf, int flags EXT2FS_ATTR((unused)),
+ ext2_ino_t ino)
+{
+ errcode_t retval;
+ int corrupt = 0;
+
+ retval = io_channel_read_blk64(fs->io, block, 1, buf);
+ if (retval)
+ return retval;
+
+ if (!(fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_dir_block_csum_verify(fs, ino,
+ (struct ext2_dir_entry *)buf))
+ corrupt = 1;
+
+#ifdef WORDS_BIGENDIAN
+ retval = ext2fs_dirent_swab_in(fs, buf, flags);
+#endif
+ if (!retval && corrupt)
+ retval = EXT2_ET_DIR_CSUM_INVALID;
+ return retval;
+}
+
+errcode_t ext2fs_read_dir_block3(ext2_filsys fs, blk64_t block,
+ void *buf, int flags EXT2FS_ATTR((unused)))
+{
+ return ext2fs_read_dir_block4(fs, block, buf, flags, 0);
+}
+
+errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block,
+ void *buf, int flags EXT2FS_ATTR((unused)))
+{
+ return ext2fs_read_dir_block3(fs, block, buf, flags);
+}
+
+errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block,
+ void *buf)
+{
+ return ext2fs_read_dir_block3(fs, block, buf, 0);
+}
+
+
+errcode_t ext2fs_write_dir_block4(ext2_filsys fs, blk64_t block,
+ void *inbuf, int flags EXT2FS_ATTR((unused)),
+ ext2_ino_t ino)
+{
+ errcode_t retval;
+ char *buf = inbuf;
+
+#ifdef WORDS_BIGENDIAN
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+ memcpy(buf, inbuf, fs->blocksize);
+ retval = ext2fs_dirent_swab_out(fs, buf, flags);
+ if (retval)
+ return retval;
+#endif
+ retval = ext2fs_dir_block_csum_set(fs, ino,
+ (struct ext2_dir_entry *)buf);
+ if (retval)
+ goto out;
+
+ retval = io_channel_write_blk64(fs->io, block, 1, buf);
+
+out:
+#ifdef WORDS_BIGENDIAN
+ ext2fs_free_mem(&buf);
+#endif
+ return retval;
+}
+
+errcode_t ext2fs_write_dir_block3(ext2_filsys fs, blk64_t block,
+ void *inbuf, int flags EXT2FS_ATTR((unused)))
+{
+ return ext2fs_write_dir_block4(fs, block, inbuf, flags, 0);
+}
+
+errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block,
+ void *inbuf, int flags EXT2FS_ATTR((unused)))
+{
+ return ext2fs_write_dir_block3(fs, block, inbuf, flags);
+}
+
+errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block,
+ void *inbuf)
+{
+ return ext2fs_write_dir_block3(fs, block, inbuf, 0);
+}
+
diff --git a/lib/ext2fs/dirhash.c b/lib/ext2fs/dirhash.c
new file mode 100644
index 0000000..42fe98b
--- /dev/null
+++ b/lib/ext2fs/dirhash.c
@@ -0,0 +1,307 @@
+/*
+ * dirhash.c -- Calculate the hash of a directory entry
+ *
+ * Copyright (c) 2001 Daniel Phillips
+ *
+ * Copyright (c) 2002 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+/*
+ * Keyed 32-bit hash function using TEA in a Davis-Meyer function
+ * H0 = Key
+ * Hi = E Mi(Hi-1) + Hi-1
+ *
+ * (see Applied Cryptography, 2nd edition, p448).
+ *
+ * Jeremy Fitzhardinge <jeremy@zip.com.au> 1998
+ *
+ * This code is made available under the terms of the GPL
+ */
+#define DELTA 0x9E3779B9
+
+static void TEA_transform(__u32 buf[4], __u32 const in[])
+{
+ __u32 sum = 0;
+ __u32 b0 = buf[0], b1 = buf[1];
+ __u32 a = in[0], b = in[1], c = in[2], d = in[3];
+ int n = 16;
+
+ do {
+ sum += DELTA;
+ b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b);
+ b1 += ((b0 << 4)+c) ^ (b0+sum) ^ ((b0 >> 5)+d);
+ } while(--n);
+
+ buf[0] += b0;
+ buf[1] += b1;
+}
+
+/* F, G and H are basic MD4 functions: selection, majority, parity */
+#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z) (((x) & (y)) + (((x) ^ (y)) & (z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+
+/*
+ * The generic round function. The application is so specific that
+ * we don't bother protecting all the arguments with parens, as is generally
+ * good macro practice, in favor of extra legibility.
+ * Rotation is separate from addition to prevent recomputation
+ */
+#define ROUND(f, a, b, c, d, x, s) \
+ (a += f(b, c, d) + x, a = (a << s) | (a >> (32-s)))
+#define K1 0
+#define K2 013240474631UL
+#define K3 015666365641UL
+
+/*
+ * Basic cut-down MD4 transform. Returns only 32 bits of result.
+ */
+static void halfMD4Transform (__u32 buf[4], __u32 const in[])
+{
+ __u32 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
+
+ /* Round 1 */
+ ROUND(F, a, b, c, d, in[0] + K1, 3);
+ ROUND(F, d, a, b, c, in[1] + K1, 7);
+ ROUND(F, c, d, a, b, in[2] + K1, 11);
+ ROUND(F, b, c, d, a, in[3] + K1, 19);
+ ROUND(F, a, b, c, d, in[4] + K1, 3);
+ ROUND(F, d, a, b, c, in[5] + K1, 7);
+ ROUND(F, c, d, a, b, in[6] + K1, 11);
+ ROUND(F, b, c, d, a, in[7] + K1, 19);
+
+ /* Round 2 */
+ ROUND(G, a, b, c, d, in[1] + K2, 3);
+ ROUND(G, d, a, b, c, in[3] + K2, 5);
+ ROUND(G, c, d, a, b, in[5] + K2, 9);
+ ROUND(G, b, c, d, a, in[7] + K2, 13);
+ ROUND(G, a, b, c, d, in[0] + K2, 3);
+ ROUND(G, d, a, b, c, in[2] + K2, 5);
+ ROUND(G, c, d, a, b, in[4] + K2, 9);
+ ROUND(G, b, c, d, a, in[6] + K2, 13);
+
+ /* Round 3 */
+ ROUND(H, a, b, c, d, in[3] + K3, 3);
+ ROUND(H, d, a, b, c, in[7] + K3, 9);
+ ROUND(H, c, d, a, b, in[2] + K3, 11);
+ ROUND(H, b, c, d, a, in[6] + K3, 15);
+ ROUND(H, a, b, c, d, in[1] + K3, 3);
+ ROUND(H, d, a, b, c, in[5] + K3, 9);
+ ROUND(H, c, d, a, b, in[0] + K3, 11);
+ ROUND(H, b, c, d, a, in[4] + K3, 15);
+
+ buf[0] += a;
+ buf[1] += b;
+ buf[2] += c;
+ buf[3] += d;
+}
+
+#undef ROUND
+#undef F
+#undef G
+#undef H
+#undef K1
+#undef K2
+#undef K3
+
+/* The old legacy hash */
+static ext2_dirhash_t dx_hack_hash (const char *name, int len,
+ int unsigned_flag)
+{
+ __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
+ const unsigned char *ucp = (const unsigned char *) name;
+ const signed char *scp = (const signed char *) name;
+ int c;
+
+ while (len--) {
+ if (unsigned_flag)
+ c = (int) *ucp++;
+ else
+ c = (int) *scp++;
+ hash = hash1 + (hash0 ^ (c * 7152373));
+
+ if (hash & 0x80000000) hash -= 0x7fffffff;
+ hash1 = hash0;
+ hash0 = hash;
+ }
+ return (hash0 << 1);
+}
+
+static void str2hashbuf(const char *msg, int len, __u32 *buf, int num,
+ int unsigned_flag)
+{
+ __u32 pad, val;
+ int i, c;
+ const unsigned char *ucp = (const unsigned char *) msg;
+ const signed char *scp = (const signed char *) msg;
+
+ pad = (__u32)len | ((__u32)len << 8);
+ pad |= pad << 16;
+
+ val = pad;
+ if (len > num*4)
+ len = num * 4;
+ for (i=0; i < len; i++) {
+ if (unsigned_flag)
+ c = (int) ucp[i];
+ else
+ c = (int) scp[i];
+
+ val = c + (val << 8);
+ if ((i % 4) == 3) {
+ *buf++ = val;
+ val = pad;
+ num--;
+ }
+ }
+ if (--num >= 0)
+ *buf++ = val;
+ while (--num >= 0)
+ *buf++ = pad;
+}
+
+/*
+ * Returns the hash of a filename. If len is 0 and name is NULL, then
+ * this function can be used to test whether or not a hash version is
+ * supported.
+ *
+ * The seed is an 4 longword (32 bits) "secret" which can be used to
+ * uniquify a hash. If the seed is all zero's, then some default seed
+ * may be used.
+ *
+ * A particular hash version specifies whether or not the seed is
+ * represented, and whether or not the returned hash is 32 bits or 64
+ * bits. 32 bit hashes will return 0 for the minor hash.
+ *
+ * This function doesn't do any normalization or casefolding of the
+ * input string. To take charset encoding into account, use
+ * ext2fs_dirhash2.
+ *
+ */
+errcode_t ext2fs_dirhash(int version, const char *name, int len,
+ const __u32 *seed,
+ ext2_dirhash_t *ret_hash,
+ ext2_dirhash_t *ret_minor_hash)
+{
+ __u32 hash;
+ __u32 minor_hash = 0;
+ const char *p;
+ int i;
+ __u32 in[8], buf[4];
+ int unsigned_flag = 0;
+
+ /* Initialize the default seed for the hash checksum functions */
+ buf[0] = 0x67452301;
+ buf[1] = 0xefcdab89;
+ buf[2] = 0x98badcfe;
+ buf[3] = 0x10325476;
+
+ /* Check to see if the seed is all zero's */
+ if (seed) {
+ for (i=0; i < 4; i++) {
+ if (seed[i])
+ break;
+ }
+ if (i < 4)
+ memcpy(buf, seed, sizeof(buf));
+ }
+
+ switch (version) {
+ case EXT2_HASH_LEGACY_UNSIGNED:
+ unsigned_flag++;
+ /* fallthrough */
+ case EXT2_HASH_LEGACY:
+ hash = dx_hack_hash(name, len, unsigned_flag);
+ break;
+ case EXT2_HASH_HALF_MD4_UNSIGNED:
+ unsigned_flag++;
+ /* fallthrough */
+ case EXT2_HASH_HALF_MD4:
+ p = name;
+ while (len > 0) {
+ str2hashbuf(p, len, in, 8, unsigned_flag);
+ halfMD4Transform(buf, in);
+ len -= 32;
+ p += 32;
+ }
+ minor_hash = buf[2];
+ hash = buf[1];
+ break;
+ case EXT2_HASH_TEA_UNSIGNED:
+ unsigned_flag++;
+ /* fallthrough */
+ case EXT2_HASH_TEA:
+ p = name;
+ while (len > 0) {
+ str2hashbuf(p, len, in, 4, unsigned_flag);
+ TEA_transform(buf, in);
+ len -= 16;
+ p += 16;
+ }
+ hash = buf[0];
+ minor_hash = buf[1];
+ break;
+ default:
+ *ret_hash = 0;
+ return EXT2_ET_DIRHASH_UNSUPP;
+ }
+ *ret_hash = hash & ~1;
+ if (ret_minor_hash)
+ *ret_minor_hash = minor_hash;
+ return 0;
+}
+
+/*
+ * Returns the hash of a filename considering normalization and
+ * casefolding. This is a wrapper around ext2fs_dirhash with string
+ * encoding support based on the nls_table and the flags. Check
+ * ext2fs_dirhash for documentation on the input and output parameters.
+ */
+errcode_t ext2fs_dirhash2(int version, const char *name, int len,
+ const struct ext2fs_nls_table *charset,
+ int hash_flags, const __u32 *seed,
+ ext2_dirhash_t *ret_hash,
+ ext2_dirhash_t *ret_minor_hash)
+{
+ errcode_t r;
+ int dlen;
+
+ if (len && charset && (hash_flags & EXT4_CASEFOLD_FL)) {
+ char buff[PATH_MAX];
+
+ dlen = charset->ops->casefold(charset,
+ (const unsigned char *) name, len,
+ (unsigned char *) buff, sizeof(buff));
+ if (dlen < 0) {
+ if (dlen == -EINVAL)
+ goto opaque_seq;
+
+ return dlen;
+ }
+ r = ext2fs_dirhash(version, buff, dlen, seed, ret_hash,
+ ret_minor_hash);
+ return r;
+ }
+
+opaque_seq:
+ return ext2fs_dirhash(version, name, len, seed, ret_hash,
+ ret_minor_hash);
+}
diff --git a/lib/ext2fs/dosio.c b/lib/ext2fs/dosio.c
new file mode 100644
index 0000000..d0cf269
--- /dev/null
+++ b/lib/ext2fs/dosio.c
@@ -0,0 +1,459 @@
+/*
+ * dosio.c -- Disk I/O module for the ext2fs/DOS library.
+ *
+ * Copyright (c) 1997 by Theodore Ts'o.
+ *
+ * Copyright (c) 1997 Mark Habersack
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <bios.h>
+#include <string.h>
+#include <ctype.h>
+#include <io.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include <ext2fs/ext2_types.h>
+#include "utils.h"
+#include "dosio.h"
+#include "et/com_err.h"
+#include "ext2_err.h"
+#include "ext2fs/io.h"
+
+/*
+ * Some helper macros
+ */
+#define LINUX_EXT2FS 0x83
+#define LINUX_SWAP 0x82
+#define WRITE_ERR(_msg_) write(2, _msg_, strlen(_msg_))
+#define WRITE_ERR_S(_msg_) write(2, _msg_, sizeof(_msg_))
+
+/*
+ * Exported variables
+ */
+unsigned long _dio_error;
+unsigned long _dio_hw_error;
+
+/*
+ * Array of all opened partitions
+ */
+static PARTITION **partitions = NULL;
+static unsigned short npart = 0; /* Number of mapped partitions */
+static PARTITION *active = NULL;
+
+/*
+ * I/O Manager routine prototypes
+ */
+static errcode_t dos_open(const char *dev, int flags, io_channel *channel);
+static errcode_t dos_close(io_channel channel);
+static errcode_t dos_set_blksize(io_channel channel, int blksize);
+static errcode_t dos_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf);
+static errcode_t dos_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf);
+static errcode_t dos_flush(io_channel channel);
+
+static struct struct_io_manager struct_dos_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "DOS I/O Manager",
+ .open = dos_open,
+ .close = dos_close,
+ .set_blksize = dos_set_blksize,
+ .read_blk = dos_read_blk,
+ .write_blk = dos_write_blk,
+ .flush = dos_flush
+};
+
+io_manager dos_io_manager = &struct_dos_manager;
+
+/*
+ * Macro taken from unix_io.c
+ */
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+
+/*
+ * Calculates a CHS address of a sector from its LBA
+ * offset for the given partition.
+ */
+static void lba2chs(unsigned long lba_addr, CHS *chs, PARTITION *part)
+{
+ unsigned long abss;
+
+ chs->offset = lba_addr & 0x000001FF;
+ abss = (lba_addr >> 9) + part->start;
+ chs->cyl = abss / (part->sects * part->heads);
+ chs->head = (abss / part->sects) % part->heads;
+ chs->sector = (abss % part->sects) + 1;
+}
+
+#ifdef __TURBOC__
+#pragma argsused
+#endif
+/*
+ * Scans the passed partition table looking for *pno partition
+ * that has LINUX_EXT2FS type.
+ *
+ * TODO:
+ * For partition numbers >5 Linux uses DOS extended partitions -
+ * dive into them an return an appropriate entry. Also dive into
+ * extended partitions when scanning for a first Linux/ext2fs.
+ */
+static PTABLE_ENTRY *scan_partition_table(PTABLE_ENTRY *pentry,
+ unsigned short phys,
+ unsigned char *pno)
+{
+ unsigned i;
+
+ if(*pno != 0xFF && *pno >= 5)
+ return NULL; /* We don't support extended partitions for now */
+
+ if(*pno != 0xFF)
+ {
+ if(pentry[*pno].type == LINUX_EXT2FS)
+ return &pentry[*pno];
+ else
+ {
+ if(!pentry[*pno].type)
+ *pno = 0xFE;
+ else if(pentry[*pno].type == LINUX_SWAP)
+ *pno = 0xFD;
+ return NULL;
+ }
+ }
+
+ for(i = 0; i < 4; i++)
+ if(pentry[i].type == LINUX_EXT2FS)
+ {
+ *pno = i;
+ return &pentry[i];
+ }
+
+ return NULL;
+}
+
+/*
+ * Allocate libext2fs structures associated with I/O manager
+ */
+static io_channel alloc_io_channel(PARTITION *part)
+{
+ io_channel ioch;
+
+ ioch = (io_channel)malloc(sizeof(struct struct_io_channel));
+ if (!ioch)
+ return NULL;
+ memset(ioch, 0, sizeof(struct struct_io_channel));
+ ioch->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ ioch->manager = dos_io_manager;
+ ioch->name = (char *)malloc(strlen(part->dev)+1);
+ if (!ioch->name) {
+ free(ioch);
+ return NULL;
+ }
+ strcpy(ioch->name, part->dev);
+ ioch->private_data = part;
+ ioch->block_size = 1024; /* The smallest ext2fs block size */
+ ioch->read_error = 0;
+ ioch->write_error = 0;
+
+ return ioch;
+}
+
+#ifdef __TURBOC__
+#pragma argsused
+#endif
+/*
+ * Open the 'name' partition, initialize all information structures
+ * we need to keep and create libext2fs I/O manager.
+ */
+static errcode_t dos_open(const char *dev, int flags, io_channel *channel)
+{
+ unsigned char *tmp, sec[512];
+ PARTITION *part;
+ PTABLE_ENTRY *pent;
+ PARTITION **newparts;
+
+ if(!dev)
+ {
+ _dio_error = ERR_BADDEV;
+ return EXT2_ET_BAD_DEVICE_NAME;
+ }
+
+ /*
+ * First check whether the dev name is OK
+ */
+ tmp = (unsigned char*)strrchr(dev, '/');
+ if(!tmp)
+ {
+ _dio_error = ERR_BADDEV;
+ return EXT2_ET_BAD_DEVICE_NAME;
+ }
+ *tmp = 0;
+ if(strcmp(dev, "/dev"))
+ {
+ _dio_error = ERR_BADDEV;
+ return EXT2_ET_BAD_DEVICE_NAME;
+ }
+ *tmp++ = '/';
+
+ /*
+ * Check whether the partition data is already in cache
+ */
+
+ part = (PARTITION*)malloc(sizeof(PARTITION));
+ if (!part)
+ return ENOMEM;
+ {
+ int i = 0;
+
+ for(;i < npart; i++)
+ if(!strcmp(partitions[i]->dev, dev))
+ {
+ /* Found it! Make it the active one */
+ active = partitions[i];
+ *channel = alloc_io_channel(active);
+ if (!*channel)
+ return ENOMEM;
+ return 0;
+ }
+ }
+
+ /*
+ * Drive number & optionally partn number
+ */
+ switch(tmp[0])
+ {
+ case 'h':
+ case 's':
+ part->phys = 0x80;
+ part->phys += toupper(tmp[2]) - 'A';
+ /*
+ * Do we have the partition number?
+ */
+ if(tmp[3])
+ part->pno = isdigit((int)tmp[3]) ? tmp[3] - '0' - 1: 0;
+ else
+ part->pno = 0xFF;
+ break;
+
+ case 'f':
+ if(tmp[2])
+ part->phys = isdigit((int)tmp[2]) ? tmp[2] - '0' : 0;
+ else
+ part->phys = 0x00; /* We'll assume /dev/fd0 */
+ break;
+
+ default:
+ _dio_error = ERR_BADDEV;
+ return ENODEV;
+ }
+
+ if(part->phys < 0x80)
+ {
+ /* We don't support floppies for now */
+ _dio_error = ERR_NOTSUPP;
+ return EINVAL;
+ }
+
+ part->dev = strdup(dev);
+
+ /*
+ * Get drive's geometry
+ */
+ _dio_hw_error = biosdisk(DISK_GET_GEOMETRY,
+ part->phys,
+ 0, /* head */
+ 0, /* cylinder */
+ 1, /* sector */
+ 1, /* just one sector */
+ sec);
+
+ if(!HW_OK())
+ {
+ _dio_error = ERR_HARDWARE;
+ free(part->dev);
+ free(part);
+ return EFAULT;
+ }
+
+ /*
+ * Calculate the geometry
+ */
+ part->cyls = (unsigned short)(((sec[0] >> 6) << 8) + sec[1] + 1);
+ part->heads = sec[3] + 1;
+ part->sects = sec[0] & 0x3F;
+
+ /*
+ * Now that we know all we need, let's look for the partition
+ */
+ _dio_hw_error = biosdisk(DISK_READ, part->phys, 0, 0, 1, 1, sec);
+
+ if(!HW_OK())
+ {
+ _dio_error = ERR_HARDWARE;
+ free(part->dev);
+ free(part);
+ return EFAULT;
+ }
+
+ pent = (PTABLE_ENTRY*)&sec[0x1BE];
+ pent = scan_partition_table(pent, part->phys, &part->pno);
+
+ if(!pent)
+ {
+ _dio_error = part->pno == 0xFE ? ERR_EMPTYPART :
+ part->pno == 0xFD ? ERR_LINUXSWAP : ERR_NOTEXT2FS;
+ free(part->dev);
+ free(part);
+ return ENODEV;
+ }
+
+ /*
+ * Calculate the remaining figures
+ */
+ {
+ unsigned long fsec, fhead, fcyl;
+
+ fsec = (unsigned long)(pent->start_sec & 0x3F);
+ fhead = (unsigned long)pent->start_head;
+ fcyl = ((pent->start_sec >> 6) << 8) + pent->start_cyl;
+ part->start = fsec + fhead * part->sects + fcyl *
+ (part->heads * part->sects) - 1;
+ part->len = pent->size;
+ }
+
+ /*
+ * Add the partition to the table
+ */
+ newparts = (PARTITION**)realloc(partitions, sizeof(PARTITION) * npart);
+ if (!newparts) {
+ free(part);
+ return ENOMEM;
+ }
+ partitions = newparts;
+ partitions[npart++] = active = part;
+
+ /*
+ * Now alloc all libe2fs structures
+ */
+ *channel = alloc_io_channel(active);
+ if (!*channel)
+ return ENOMEM;
+
+ return 0;
+}
+
+static errcode_t dos_close(io_channel channel)
+{
+ free(channel->name);
+ free(channel);
+
+ return 0;
+}
+
+static errcode_t dos_set_blksize(io_channel channel, int blksize)
+{
+ channel->block_size = blksize;
+
+ return 0;
+}
+
+static errcode_t dos_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ PARTITION *part;
+ size_t size;
+ ext2_loff_t loc;
+ CHS chs;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ part = (PARTITION*)channel->private_data;
+
+ size = (size_t)((count < 0) ? -count : count * channel->block_size);
+ loc = (ext2_loff_t) block * channel->block_size;
+
+ lba2chs(loc, &chs, part);
+ /*
+ * Potential bug here:
+ * If DJGPP is used then reads of >18 sectors will fail!
+ * Have to rewrite biosdisk.
+ */
+ _dio_hw_error = biosdisk(DISK_READ,
+ part->phys,
+ chs.head,
+ chs.cyl,
+ chs.sector,
+ size < 512 ? 1 : size/512,
+ buf);
+
+ if(!HW_OK())
+ {
+ _dio_error = ERR_HARDWARE;
+ return EFAULT;
+ }
+
+ return 0;
+}
+
+static errcode_t dos_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ PARTITION *part;
+ size_t size;
+ ext2_loff_t loc;
+ CHS chs;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ part = (PARTITION*)channel->private_data;
+
+ if(count == 1)
+ size = (size_t)channel->block_size;
+ else
+ {
+ if (count < 0)
+ size = (size_t)-count;
+ else
+ size = (size_t)(count * channel->block_size);
+ }
+
+ loc = (ext2_loff_t)block * channel->block_size;
+ lba2chs(loc, &chs, part);
+ _dio_hw_error = biosdisk(DISK_WRITE,
+ part->phys,
+ chs.head,
+ chs.cyl,
+ chs.sector,
+ size < 512 ? 1 : size/512,
+ (void*)buf);
+
+ if(!HW_OK())
+ {
+ _dio_error = ERR_HARDWARE;
+ return EFAULT;
+ }
+
+ return 0;
+}
+
+#ifdef __TURBOC__
+#pragma argsused
+#endif
+static errcode_t dos_flush(io_channel channel)
+{
+ /*
+ * No buffers, no flush...
+ */
+ return 0;
+}
diff --git a/lib/ext2fs/dosio.h b/lib/ext2fs/dosio.h
new file mode 100644
index 0000000..d2a8f03
--- /dev/null
+++ b/lib/ext2fs/dosio.h
@@ -0,0 +1,157 @@
+/*
+ * v1.0
+ *
+ * Disk I/O include file for the ext2fs/DOS library.
+ *
+ * Copyright (c) 1997 Mark Habersack
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef __diskio_h
+#define __diskio_h
+#ifdef __TURBOC__
+#ifndef __LARGE__
+# error "ext2fs/DOS library requires LARGE model!"
+#endif
+#endif
+
+#ifdef __TURBOC__
+#include "msdos.h"
+#endif
+
+/*
+ * A helper structure used in LBA => CHS conversion
+ */
+typedef struct
+{
+ unsigned short cyl; /* Cylinder (or track) */
+ unsigned short head;
+ unsigned short sector;
+ unsigned short offset; /* Offset of byte within the sector */
+} CHS;
+
+/*
+ * All partition data we need is here
+ */
+typedef struct
+{
+ char *dev; /* _Linux_ device name (like "/dev/hda1") */
+ unsigned char phys; /* Physical DOS drive number */
+ unsigned long start; /* LBA address of partition start */
+ unsigned long len; /* length of partition in sectors */
+ unsigned char pno; /* Partition number (read from *dev) */
+
+ /* This partition's drive geometry */
+ unsigned short cyls;
+ unsigned short heads;
+ unsigned short sects;
+} PARTITION;
+
+/*
+ * PC partition table entry format
+ */
+#ifdef __DJGPP__
+#pragma pack(1)
+#endif
+typedef struct
+{
+ unsigned char active;
+ unsigned char start_head;
+ unsigned char start_sec;
+ unsigned char start_cyl;
+ unsigned char type;
+ unsigned char end_head;
+ unsigned char end_sec;
+ unsigned char end_cyl;
+ unsigned long first_sec_rel;
+ unsigned long size;
+} PTABLE_ENTRY;
+#ifdef __DJGPP__
+#pragma pack()
+#endif
+
+/*
+ * INT 0x13 operation codes
+ */
+#define DISK_READ 0x02
+#define DISK_WRITE 0x03
+#define DISK_GET_GEOMETRY 0x08
+#define DISK_READY 0x10
+
+/*
+ * Errors to put in _dio_error
+ */
+#define ERR_BADDEV 0x00000001L
+#define ERR_HARDWARE 0x00000002L
+#define ERR_NOTSUPP 0x00000003L
+#define ERR_NOTEXT2FS 0x00000004L
+#define ERR_EMPTYPART 0x00000005L
+#define ERR_LINUXSWAP 0x00000006L
+
+/*
+ * Functions in diskio.c
+ */
+
+/*
+ * Variable contains last module's error
+ */
+extern unsigned long _dio_error;
+
+/*
+ * This one contains last hardware error (if _dio_error == ERR_HARDWARE)
+ */
+extern unsigned long _dio_hw_error;
+
+/*
+ * Macros to check for disk hardware errors
+ */
+#define HW_OK() ((unsigned char)_dio_hw_error == 0x00)
+#define HW_BAD_CMD() ((unsigned char)_dio_hw_error == 0x01)
+#define HW_NO_ADDR_MARK() ((unsigned char)_dio_hw_error == 0x02)
+#define HW_WRITE_PROT() ((unsigned char)_dio_hw_error == 0x03)
+#define HW_NO_SECTOR() ((unsigned char)_dio_hw_error == 0x04)
+#define HW_RESET_FAIL() ((unsigned char)_dio_hw_error == 0x05)
+#define HW_DISK_CHANGED() ((unsigned char)_dio_hw_error == 0x06)
+#define HW_DRIVE_FAIL() ((unsigned char)_dio_hw_error == 0x07)
+#define HW_DMA_OVERRUN() ((unsigned char)_dio_hw_error == 0x08)
+#define HW_DMA_BOUNDARY() ((unsigned char)_dio_hw_error == 0x09)
+#define HW_BAD_SECTOR() ((unsigned char)_dio_hw_error == 0x0A)
+#define HW_BAD_TRACK() ((unsigned char)_dio_hw_error == 0x0B)
+#define HW_UNSUPP_TRACK() ((unsigned char)_dio_hw_error == 0x0C)
+#define HW_BAD_CRC_ECC() ((unsigned char)_dio_hw_error == 0x10)
+#define HW_CRC_ECC_CORR() ((unsigned char)_dio_hw_error == 0x11)
+#define HW_CONTR_FAIL() ((unsigned char)_dio_hw_error == 0x20)
+#define HW_SEEK_FAIL() ((unsigned char)_dio_hw_error == 0x40)
+#define HW_ATTACH_FAIL() ((unsigned char)_dio_hw_error == 0x80)
+#define HW_DRIVE_NREADY() ((unsigned char)_dio_hw_error == 0xAA)
+#define HW_UNDEF_ERROR() ((unsigned char)_dio_hw_error == 0xBB)
+#define HW_WRITE_FAULT() ((unsigned char)_dio_hw_error == 0xCC)
+#define HW_STATUS_ERROR() ((unsigned char)_dio_hw_error == 0xE0)
+#define HW_SENSE_FAIL() ((unsigned char)_dio_hw_error == 0xFF)
+
+
+/*
+ * Open the specified partition.
+ * String 'dev' must have a format:
+ *
+ * /dev/{sd|hd|fd}[X]
+ *
+ * where,
+ *
+ * only one of the option in curly braces can be used and X is an optional
+ * partition number for the given device. If X is not specified, function
+ * scans the drive's partition table in search for the first Linux ext2fs
+ * partition (signature 0x83). Along the way it dives into every extended
+ * partition encountered.
+ * Scan ends if either (a) there are no more used partition entries, or
+ * (b) there is no Xth partition.
+ *
+ * Routine returns 0 on success and !=0 otherwise.
+ */
+int open_partition(char *dev);
+
+#endif /* __diskio_h */
diff --git a/lib/ext2fs/dupfs.c b/lib/ext2fs/dupfs.c
new file mode 100644
index 0000000..02721e1
--- /dev/null
+++ b/lib/ext2fs/dupfs.c
@@ -0,0 +1,122 @@
+/*
+ * dupfs.c --- duplicate a ext2 filesystem handle
+ *
+ * Copyright (C) 1997, 1998, 2001, 2003, 2005 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <time.h>
+#include <string.h>
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+errcode_t ext2fs_dup_handle(ext2_filsys src, ext2_filsys *dest)
+{
+ ext2_filsys fs;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(src, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys), &fs);
+ if (retval)
+ return retval;
+
+ *fs = *src;
+ fs->device_name = 0;
+ fs->super = 0;
+ fs->orig_super = 0;
+ fs->group_desc = 0;
+ fs->inode_map = 0;
+ fs->block_map = 0;
+ fs->badblocks = 0;
+ fs->dblist = 0;
+ fs->mmp_buf = 0;
+ fs->mmp_cmp = 0;
+ fs->mmp_fd = -1;
+
+ io_channel_bumpcount(fs->io);
+ if (fs->icache)
+ fs->icache->refcount++;
+
+ retval = ext2fs_get_mem(strlen(src->device_name)+1, &fs->device_name);
+ if (retval)
+ goto errout;
+ strcpy(fs->device_name, src->device_name);
+
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, &fs->super);
+ if (retval)
+ goto errout;
+ memcpy(fs->super, src->super, SUPERBLOCK_SIZE);
+
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, &fs->orig_super);
+ if (retval)
+ goto errout;
+ memcpy(fs->orig_super, src->orig_super, SUPERBLOCK_SIZE);
+
+ retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
+ &fs->group_desc);
+ if (retval)
+ goto errout;
+ memcpy(fs->group_desc, src->group_desc,
+ (size_t) fs->desc_blocks * fs->blocksize);
+
+ if (src->inode_map) {
+ retval = ext2fs_copy_bitmap(src->inode_map, &fs->inode_map);
+ if (retval)
+ goto errout;
+ }
+ if (src->block_map) {
+ retval = ext2fs_copy_bitmap(src->block_map, &fs->block_map);
+ if (retval)
+ goto errout;
+ }
+ if (src->badblocks) {
+ retval = ext2fs_badblocks_copy(src->badblocks, &fs->badblocks);
+ if (retval)
+ goto errout;
+ }
+ if (src->dblist) {
+ retval = ext2fs_copy_dblist(src->dblist, &fs->dblist);
+ if (retval)
+ goto errout;
+ }
+ if (src->mmp_buf) {
+ retval = ext2fs_get_mem(src->blocksize, &fs->mmp_buf);
+ if (retval)
+ goto errout;
+ memcpy(fs->mmp_buf, src->mmp_buf, src->blocksize);
+ }
+ if (src->mmp_fd >= 0) {
+ fs->mmp_fd = dup(src->mmp_fd);
+ if (fs->mmp_fd < 0) {
+ retval = EXT2_ET_MMP_OPEN_DIRECT;
+ goto errout;
+ }
+ }
+ if (src->mmp_cmp) {
+ int align = ext2fs_get_dio_alignment(src->mmp_fd);
+
+ retval = ext2fs_get_memalign(src->blocksize, align,
+ &fs->mmp_cmp);
+ if (retval)
+ goto errout;
+ memcpy(fs->mmp_cmp, src->mmp_cmp, src->blocksize);
+ }
+ *dest = fs;
+ return 0;
+errout:
+ ext2fs_free(fs);
+ return retval;
+
+}
+
diff --git a/lib/ext2fs/e2image.h b/lib/ext2fs/e2image.h
new file mode 100644
index 0000000..53b20cc
--- /dev/null
+++ b/lib/ext2fs/e2image.h
@@ -0,0 +1,37 @@
+/*
+ * e2image.h --- header file describing the ext2 image format
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * Note: this uses the POSIX IO interfaces, unlike most of the other
+ * functions in this library. So sue me.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+struct ext2_image_hdr {
+ __u32 magic_number; /* This must be EXT2_ET_MAGIC_E2IMAGE */
+ char magic_descriptor[16]; /* "Ext2 Image 1.0", w/ null padding */
+ char fs_hostname[64];/* Hostname of machine of image */
+ char fs_netaddr[32]; /* Network address */
+ __u32 fs_netaddr_type;/* 0 = IPV4, 1 = IPV6, etc. */
+ __u32 fs_device; /* Device number of image */
+ char fs_device_name[64]; /* Device name */
+ char fs_uuid[16]; /* UUID of filesystem */
+ __u32 fs_blocksize; /* Block size of the filesystem */
+ __u32 fs_reserved[8];
+
+ __u32 image_device; /* Device number of image file */
+ __u32 image_inode; /* Inode number of image file */
+ __u32 image_time; /* Time of image creation */
+ __u32 image_reserved[8];
+
+ __u32 offset_super; /* Byte offset of the sb and descriptors */
+ __u32 offset_inode; /* Byte offset of the inode table */
+ __u32 offset_inodemap; /* Byte offset of the inode bitmaps */
+ __u32 offset_blockmap; /* Byte offset of the inode bitmaps */
+ __u32 offset_reserved[8];
+};
diff --git a/lib/ext2fs/expanddir.c b/lib/ext2fs/expanddir.c
new file mode 100644
index 0000000..b5d5abd
--- /dev/null
+++ b/lib/ext2fs/expanddir.c
@@ -0,0 +1,143 @@
+/*
+ * expand.c --- expand an ext2fs directory
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+struct expand_dir_struct {
+ int done;
+ int newblocks;
+ blk64_t goal;
+ errcode_t err;
+ ext2_ino_t dir;
+};
+
+static int expand_dir_proc(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct expand_dir_struct *es = (struct expand_dir_struct *) priv_data;
+ blk64_t new_blk;
+ char *block;
+ errcode_t retval;
+
+ if (*blocknr) {
+ if (blockcnt >= 0)
+ es->goal = *blocknr;
+ return 0;
+ }
+ if (blockcnt &&
+ (EXT2FS_B2C(fs, es->goal) == EXT2FS_B2C(fs, es->goal+1)))
+ new_blk = es->goal+1;
+ else {
+ es->goal &= ~EXT2FS_CLUSTER_MASK(fs);
+ retval = ext2fs_new_block2(fs, es->goal, 0, &new_blk);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ es->newblocks++;
+ ext2fs_block_alloc_stats2(fs, new_blk, +1);
+ }
+ if (blockcnt > 0) {
+ retval = ext2fs_new_dir_block(fs, 0, 0, &block);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ es->done = 1;
+ retval = ext2fs_write_dir_block4(fs, new_blk, block, 0,
+ es->dir);
+ ext2fs_free_mem(&block);
+ } else
+ retval = ext2fs_zero_blocks2(fs, new_blk, 1, NULL, NULL);
+ if (blockcnt >= 0)
+ es->goal = new_blk;
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ *blocknr = new_blk;
+
+ if (es->done)
+ return (BLOCK_CHANGED | BLOCK_ABORT);
+ else
+ return BLOCK_CHANGED;
+}
+
+errcode_t ext2fs_expand_dir(ext2_filsys fs, ext2_ino_t dir)
+{
+ errcode_t retval;
+ struct expand_dir_struct es;
+ struct ext2_inode inode;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if (!fs->block_map)
+ return EXT2_ET_NO_BLOCK_BITMAP;
+
+ retval = ext2fs_check_directory(fs, dir);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_read_inode(fs, dir, &inode);
+ if (retval)
+ return retval;
+
+ es.done = 0;
+ es.err = 0;
+ es.goal = ext2fs_find_inode_goal(fs, dir, &inode, 0);
+ es.newblocks = 0;
+ es.dir = dir;
+
+ retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_APPEND,
+ 0, expand_dir_proc, &es);
+ if (retval == EXT2_ET_INLINE_DATA_CANT_ITERATE)
+ return ext2fs_inline_data_expand(fs, dir);
+
+ if (es.err)
+ return es.err;
+ if (!es.done)
+ return EXT2_ET_EXPAND_DIR_ERR;
+
+ /*
+ * Update the size and block count fields in the inode.
+ */
+ retval = ext2fs_read_inode(fs, dir, &inode);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_inode_size_set(fs, &inode,
+ EXT2_I_SIZE(&inode) + fs->blocksize);
+ if (retval)
+ return retval;
+ ext2fs_iblk_add_blocks(fs, &inode, es.newblocks);
+
+ retval = ext2fs_write_inode(fs, dir, &inode);
+ if (retval)
+ return retval;
+
+ return 0;
+}
diff --git a/lib/ext2fs/ext2_err.et.in b/lib/ext2fs/ext2_err.et.in
new file mode 100644
index 0000000..de14019
--- /dev/null
+++ b/lib/ext2fs/ext2_err.et.in
@@ -0,0 +1,560 @@
+#
+# Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+#
+# %Begin-Header%
+# This file may be redistributed under the terms of the GNU Public
+# License.
+# %End-Header%
+#
+ error_table ext2
+
+ec EXT2_ET_BASE,
+ "EXT2FS Library version @E2FSPROGS_VERSION@"
+
+ec EXT2_ET_MAGIC_EXT2FS_FILSYS,
+ "Wrong magic number for ext2_filsys structure"
+
+ec EXT2_ET_MAGIC_BADBLOCKS_LIST,
+ "Wrong magic number for badblocks_list structure"
+
+ec EXT2_ET_MAGIC_BADBLOCKS_ITERATE,
+ "Wrong magic number for badblocks_iterate structure"
+
+ec EXT2_ET_MAGIC_INODE_SCAN,
+ "Wrong magic number for inode_scan structure"
+
+ec EXT2_ET_MAGIC_IO_CHANNEL,
+ "Wrong magic number for io_channel structure"
+
+ec EXT2_ET_MAGIC_UNIX_IO_CHANNEL,
+ "Wrong magic number for unix io_channel structure"
+
+ec EXT2_ET_MAGIC_IO_MANAGER,
+ "Wrong magic number for io_manager structure"
+
+ec EXT2_ET_MAGIC_BLOCK_BITMAP,
+ "Wrong magic number for block_bitmap structure"
+
+ec EXT2_ET_MAGIC_INODE_BITMAP,
+ "Wrong magic number for inode_bitmap structure"
+
+ec EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "Wrong magic number for generic_bitmap structure"
+
+ec EXT2_ET_MAGIC_TEST_IO_CHANNEL,
+ "Wrong magic number for test io_channel structure"
+
+ec EXT2_ET_MAGIC_DBLIST,
+ "Wrong magic number for directory block list structure"
+
+ec EXT2_ET_MAGIC_ICOUNT,
+ "Wrong magic number for icount structure"
+
+ec EXT2_ET_MAGIC_PQ_IO_CHANNEL,
+ "Wrong magic number for Powerquest io_channel structure"
+
+ec EXT2_ET_MAGIC_EXT2_FILE,
+ "Wrong magic number for ext2 file structure"
+
+ec EXT2_ET_MAGIC_E2IMAGE,
+ "Wrong magic number for Ext2 Image Header"
+
+ec EXT2_ET_MAGIC_INODE_IO_CHANNEL,
+ "Wrong magic number for inode io_channel structure"
+
+ec EXT2_ET_MAGIC_EXTENT_HANDLE,
+ "Wrong magic number for ext4 extent handle"
+
+ec EXT2_ET_BAD_MAGIC,
+ "Bad magic number in super-block"
+
+ec EXT2_ET_REV_TOO_HIGH,
+ "Filesystem revision too high"
+
+ec EXT2_ET_RO_FILSYS,
+ "Attempt to write to filesystem opened read-only"
+
+ec EXT2_ET_GDESC_READ,
+ "Can't read group descriptors"
+
+ec EXT2_ET_GDESC_WRITE,
+ "Can't write group descriptors"
+
+ec EXT2_ET_GDESC_BAD_BLOCK_MAP,
+ "Corrupt group descriptor: bad block for block bitmap"
+
+ec EXT2_ET_GDESC_BAD_INODE_MAP,
+ "Corrupt group descriptor: bad block for inode bitmap"
+
+ec EXT2_ET_GDESC_BAD_INODE_TABLE,
+ "Corrupt group descriptor: bad block for inode table"
+
+ec EXT2_ET_INODE_BITMAP_WRITE,
+ "Can't write an inode bitmap"
+
+ec EXT2_ET_INODE_BITMAP_READ,
+ "Can't read an inode bitmap"
+
+ec EXT2_ET_BLOCK_BITMAP_WRITE,
+ "Can't write a block bitmap"
+
+ec EXT2_ET_BLOCK_BITMAP_READ,
+ "Can't read a block bitmap"
+
+ec EXT2_ET_INODE_TABLE_WRITE,
+ "Can't write an inode table"
+
+ec EXT2_ET_INODE_TABLE_READ,
+ "Can't read an inode table"
+
+ec EXT2_ET_NEXT_INODE_READ,
+ "Can't read next inode"
+
+ec EXT2_ET_UNEXPECTED_BLOCK_SIZE,
+ "Filesystem has unexpected block size"
+
+ec EXT2_ET_DIR_CORRUPTED,
+ "EXT2 directory corrupted"
+
+ec EXT2_ET_SHORT_READ,
+ "Attempt to read block from filesystem resulted in short read"
+
+ec EXT2_ET_SHORT_WRITE,
+ "Attempt to write block to filesystem resulted in short write"
+
+ec EXT2_ET_DIR_NO_SPACE,
+ "No free space in the directory"
+
+ec EXT2_ET_NO_INODE_BITMAP,
+ "Inode bitmap not loaded"
+
+ec EXT2_ET_NO_BLOCK_BITMAP,
+ "Block bitmap not loaded"
+
+ec EXT2_ET_BAD_INODE_NUM,
+ "Illegal inode number"
+
+ec EXT2_ET_BAD_BLOCK_NUM,
+ "Illegal block number"
+
+ec EXT2_ET_EXPAND_DIR_ERR,
+ "Internal error in ext2fs_expand_dir"
+
+ec EXT2_ET_TOOSMALL,
+ "Not enough space to build proposed filesystem"
+
+ec EXT2_ET_BAD_BLOCK_MARK,
+ "Illegal block number passed to ext2fs_mark_block_bitmap"
+
+ec EXT2_ET_BAD_BLOCK_UNMARK,
+ "Illegal block number passed to ext2fs_unmark_block_bitmap"
+
+ec EXT2_ET_BAD_BLOCK_TEST,
+ "Illegal block number passed to ext2fs_test_block_bitmap"
+
+ec EXT2_ET_BAD_INODE_MARK,
+ "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+
+ec EXT2_ET_BAD_INODE_UNMARK,
+ "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+
+ec EXT2_ET_BAD_INODE_TEST,
+ "Illegal inode number passed to ext2fs_test_inode_bitmap"
+
+ec EXT2_ET_FUDGE_BLOCK_BITMAP_END,
+ "Attempt to fudge end of block bitmap past the real end"
+
+ec EXT2_ET_FUDGE_INODE_BITMAP_END,
+ "Attempt to fudge end of inode bitmap past the real end"
+
+ec EXT2_ET_BAD_IND_BLOCK,
+ "Illegal indirect block found"
+
+ec EXT2_ET_BAD_DIND_BLOCK,
+ "Illegal doubly indirect block found"
+
+ec EXT2_ET_BAD_TIND_BLOCK,
+ "Illegal triply indirect block found"
+
+ec EXT2_ET_NEQ_BLOCK_BITMAP,
+ "Block bitmaps are not the same"
+
+ec EXT2_ET_NEQ_INODE_BITMAP,
+ "Inode bitmaps are not the same"
+
+ec EXT2_ET_BAD_DEVICE_NAME,
+ "Illegal or malformed device name"
+
+ec EXT2_ET_MISSING_INODE_TABLE,
+ "A block group is missing an inode table"
+
+ec EXT2_ET_CORRUPT_SUPERBLOCK,
+ "The ext2 superblock is corrupt"
+
+ec EXT2_ET_BAD_GENERIC_MARK,
+ "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+
+ec EXT2_ET_BAD_GENERIC_UNMARK,
+ "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+
+ec EXT2_ET_BAD_GENERIC_TEST,
+ "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+
+ec EXT2_ET_SYMLINK_LOOP,
+ "Too many symbolic links encountered."
+
+ec EXT2_ET_CALLBACK_NOTHANDLED,
+ "The callback function will not handle this case"
+
+ec EXT2_ET_BAD_BLOCK_IN_INODE_TABLE,
+ "The inode is from a bad block in the inode table"
+
+ec EXT2_ET_UNSUPP_FEATURE,
+ "Filesystem has unsupported feature(s)"
+
+ec EXT2_ET_RO_UNSUPP_FEATURE,
+ "Filesystem has unsupported read-only feature(s)"
+
+ec EXT2_ET_LLSEEK_FAILED,
+ "IO Channel failed to seek on read or write"
+
+ec EXT2_ET_NO_MEMORY,
+ "Memory allocation failed"
+
+ec EXT2_ET_INVALID_ARGUMENT,
+ "Invalid argument passed to ext2 library"
+
+ec EXT2_ET_BLOCK_ALLOC_FAIL,
+ "Could not allocate block in ext2 filesystem"
+
+ec EXT2_ET_INODE_ALLOC_FAIL,
+ "Could not allocate inode in ext2 filesystem"
+
+ec EXT2_ET_NO_DIRECTORY,
+ "Ext2 inode is not a directory"
+
+ec EXT2_ET_TOO_MANY_REFS,
+ "Too many references in table"
+
+ec EXT2_ET_FILE_NOT_FOUND,
+ "File not found by ext2_lookup"
+
+ec EXT2_ET_FILE_RO,
+ "File open read-only"
+
+ec EXT2_ET_DB_NOT_FOUND,
+ "Ext2 directory block not found"
+
+ec EXT2_ET_DIR_EXISTS,
+ "Ext2 directory already exists"
+
+ec EXT2_ET_UNIMPLEMENTED,
+ "Unimplemented ext2 library function"
+
+ec EXT2_ET_CANCEL_REQUESTED,
+ "User cancel requested"
+
+ec EXT2_ET_FILE_TOO_BIG,
+ "Ext2 file too big"
+
+ec EXT2_ET_JOURNAL_NOT_BLOCK,
+ "Supplied journal device not a block device"
+
+ec EXT2_ET_NO_JOURNAL_SB,
+ "Journal superblock not found"
+
+ec EXT2_ET_JOURNAL_TOO_SMALL,
+ "Journal must be at least 1024 blocks"
+
+ec EXT2_ET_JOURNAL_UNSUPP_VERSION,
+ "Unsupported journal version"
+
+ec EXT2_ET_LOAD_EXT_JOURNAL,
+ "Error loading external journal"
+
+ec EXT2_ET_NO_JOURNAL,
+ "Journal not found"
+
+ec EXT2_ET_DIRHASH_UNSUPP,
+ "Directory hash unsupported"
+
+ec EXT2_ET_BAD_EA_BLOCK_NUM,
+ "Illegal extended attribute block number"
+
+ec EXT2_ET_TOO_MANY_INODES,
+ "Cannot create filesystem with requested number of inodes"
+
+ec EXT2_ET_NOT_IMAGE_FILE,
+ "E2image snapshot not in use"
+
+ec EXT2_ET_RES_GDT_BLOCKS,
+ "Too many reserved group descriptor blocks"
+
+ec EXT2_ET_RESIZE_INODE_CORRUPT,
+ "Resize inode is corrupt"
+
+ec EXT2_ET_SET_BMAP_NO_IND,
+ "Tried to set block bmap with missing indirect block"
+
+ec EXT2_ET_TDB_SUCCESS,
+ "TDB: Success"
+
+ec EXT2_ET_TDB_ERR_CORRUPT,
+ "TDB: Corrupt database"
+
+ec EXT2_ET_TDB_ERR_IO,
+ "TDB: IO Error"
+
+ec EXT2_ET_TDB_ERR_LOCK,
+ "TDB: Locking error"
+
+ec EXT2_ET_TDB_ERR_OOM,
+ "TDB: Out of memory"
+
+ec EXT2_ET_TDB_ERR_EXISTS,
+ "TDB: Record exists"
+
+ec EXT2_ET_TDB_ERR_NOLOCK,
+ "TDB: Lock exists on other keys"
+
+ec EXT2_ET_TDB_ERR_EINVAL,
+ "TDB: Invalid parameter"
+
+ec EXT2_ET_TDB_ERR_NOEXIST,
+ "TDB: Record does not exist"
+
+ec EXT2_ET_TDB_ERR_RDONLY,
+ "TDB: Write not permitted"
+
+ec EXT2_ET_DBLIST_EMPTY,
+ "Ext2fs directory block list is empty"
+
+ec EXT2_ET_RO_BLOCK_ITERATE,
+ "Attempt to modify a block mapping via a read-only block iterator"
+
+ec EXT2_ET_MAGIC_EXTENT_PATH,
+ "Wrong magic number for ext4 extent saved path"
+
+ec EXT2_ET_MAGIC_GENERIC_BITMAP64,
+ "Wrong magic number for 64-bit generic bitmap"
+
+ec EXT2_ET_MAGIC_BLOCK_BITMAP64,
+ "Wrong magic number for 64-bit block bitmap"
+
+ec EXT2_ET_MAGIC_INODE_BITMAP64,
+ "Wrong magic number for 64-bit inode bitmap"
+
+ec EXT2_ET_MAGIC_RESERVED_13,
+ "Wrong magic number --- RESERVED_13"
+
+ec EXT2_ET_MAGIC_RESERVED_14,
+ "Wrong magic number --- RESERVED_14"
+
+ec EXT2_ET_MAGIC_RESERVED_15,
+ "Wrong magic number --- RESERVED_15"
+
+ec EXT2_ET_MAGIC_RESERVED_16,
+ "Wrong magic number --- RESERVED_16"
+
+ec EXT2_ET_MAGIC_RESERVED_17,
+ "Wrong magic number --- RESERVED_17"
+
+ec EXT2_ET_MAGIC_RESERVED_18,
+ "Wrong magic number --- RESERVED_18"
+
+ec EXT2_ET_MAGIC_RESERVED_19,
+ "Wrong magic number --- RESERVED_19"
+
+ec EXT2_ET_EXTENT_HEADER_BAD,
+ "Corrupt extent header"
+
+ec EXT2_ET_EXTENT_INDEX_BAD,
+ "Corrupt extent index"
+
+ec EXT2_ET_EXTENT_LEAF_BAD,
+ "Corrupt extent"
+
+ec EXT2_ET_EXTENT_NO_SPACE,
+ "No free space in extent map"
+
+ec EXT2_ET_INODE_NOT_EXTENT,
+ "Inode does not use extents"
+
+ec EXT2_ET_EXTENT_NO_NEXT,
+ "No 'next' extent"
+
+ec EXT2_ET_EXTENT_NO_PREV,
+ "No 'previous' extent"
+
+ec EXT2_ET_EXTENT_NO_UP,
+ "No 'up' extent"
+
+ec EXT2_ET_EXTENT_NO_DOWN,
+ "No 'down' extent"
+
+ec EXT2_ET_NO_CURRENT_NODE,
+ "No current node"
+
+ec EXT2_ET_OP_NOT_SUPPORTED,
+ "Ext2fs operation not supported"
+
+ec EXT2_ET_CANT_INSERT_EXTENT,
+ "No room to insert extent in node"
+
+ec EXT2_ET_CANT_SPLIT_EXTENT,
+ "Splitting would result in empty node"
+
+ec EXT2_ET_EXTENT_NOT_FOUND,
+ "Extent not found"
+
+ec EXT2_ET_EXTENT_NOT_SUPPORTED,
+ "Operation not supported for inodes containing extents"
+
+ec EXT2_ET_EXTENT_INVALID_LENGTH,
+ "Extent length is invalid"
+
+ec EXT2_ET_IO_CHANNEL_NO_SUPPORT_64,
+ "I/O Channel does not support 64-bit block numbers"
+
+ec EXT2_ET_NO_MTAB_FILE,
+ "Can't check if filesystem is mounted due to missing mtab file"
+
+ec EXT2_ET_CANT_USE_LEGACY_BITMAPS,
+ "Filesystem too large to use legacy bitmaps"
+
+ec EXT2_ET_MMP_MAGIC_INVALID,
+ "MMP: invalid magic number"
+
+ec EXT2_ET_MMP_FAILED,
+ "MMP: device currently active"
+
+ec EXT2_ET_MMP_FSCK_ON,
+ "MMP: e2fsck being run"
+
+ec EXT2_ET_MMP_BAD_BLOCK,
+ "MMP: block number beyond filesystem range"
+
+ec EXT2_ET_MMP_UNKNOWN_SEQ,
+ "MMP: undergoing an unknown operation"
+
+ec EXT2_ET_MMP_CHANGE_ABORT,
+ "MMP: filesystem still in use"
+
+ec EXT2_ET_MMP_OPEN_DIRECT,
+ "MMP: open with O_DIRECT failed"
+
+ec EXT2_ET_BAD_DESC_SIZE,
+ "Block group descriptor size incorrect"
+
+ec EXT2_ET_INODE_CSUM_INVALID,
+ "Inode checksum does not match inode"
+
+ec EXT2_ET_INODE_BITMAP_CSUM_INVALID,
+ "Inode bitmap checksum does not match bitmap"
+
+ec EXT2_ET_EXTENT_CSUM_INVALID,
+ "Extent block checksum does not match extent block"
+
+ec EXT2_ET_DIR_NO_SPACE_FOR_CSUM,
+ "Directory block does not have space for checksum"
+
+ec EXT2_ET_DIR_CSUM_INVALID,
+ "Directory block checksum does not match directory block"
+
+ec EXT2_ET_EXT_ATTR_CSUM_INVALID,
+ "Extended attribute block checksum does not match block"
+
+ec EXT2_ET_SB_CSUM_INVALID,
+ "Superblock checksum does not match superblock"
+
+ec EXT2_ET_UNKNOWN_CSUM,
+ "Unknown checksum algorithm"
+
+ec EXT2_ET_MMP_CSUM_INVALID,
+ "MMP block checksum does not match"
+
+ec EXT2_ET_FILE_EXISTS,
+ "Ext2 file already exists"
+
+ec EXT2_ET_BLOCK_BITMAP_CSUM_INVALID,
+ "Block bitmap checksum does not match bitmap"
+
+ec EXT2_ET_INLINE_DATA_CANT_ITERATE,
+ "Cannot iterate data blocks of an inode containing inline data"
+
+ec EXT2_ET_EA_BAD_NAME_LEN,
+ "Extended attribute has an invalid name length"
+
+ec EXT2_ET_EA_BAD_VALUE_SIZE,
+ "Extended attribute has an invalid value length"
+
+ec EXT2_ET_BAD_EA_HASH,
+ "Extended attribute has an incorrect hash"
+
+ec EXT2_ET_BAD_EA_HEADER,
+ "Extended attribute block has a bad header"
+
+ec EXT2_ET_EA_KEY_NOT_FOUND,
+ "Extended attribute key not found"
+
+ec EXT2_ET_EA_NO_SPACE,
+ "Insufficient space to store extended attribute data"
+
+ec EXT2_ET_MISSING_EA_FEATURE,
+ "Filesystem is missing ext_attr or inline_data feature"
+
+ec EXT2_ET_NO_INLINE_DATA,
+ "Inode doesn't have inline data"
+
+ec EXT2_ET_INLINE_DATA_NO_BLOCK,
+ "No block for an inode with inline data"
+
+ec EXT2_ET_INLINE_DATA_NO_SPACE,
+ "No free space in inline data"
+
+ec EXT2_ET_MAGIC_EA_HANDLE,
+ "Wrong magic number for extended attribute structure"
+
+ec EXT2_ET_INODE_IS_GARBAGE,
+ "Inode seems to contain garbage"
+
+ec EXT2_ET_EA_BAD_VALUE_OFFSET,
+ "Extended attribute has an invalid value offset"
+
+ec EXT2_ET_JOURNAL_FLAGS_WRONG,
+ "Journal flags inconsistent"
+
+ec EXT2_ET_UNDO_FILE_CORRUPT,
+ "Undo file corrupt"
+
+ec EXT2_ET_UNDO_FILE_WRONG,
+ "Wrong undo file for this filesystem"
+
+ec EXT2_ET_FILESYSTEM_CORRUPTED,
+ "File system is corrupted"
+
+ec EXT2_ET_BAD_CRC,
+ "Bad CRC detected in file system"
+
+ec EXT2_ET_CORRUPT_JOURNAL_SB,
+ "The journal superblock is corrupt"
+
+ec EXT2_ET_INODE_CORRUPTED,
+ "Inode is corrupted"
+
+ec EXT2_ET_EA_INODE_CORRUPTED,
+ "Inode containing extended attribute value is corrupted"
+
+ec EXT2_ET_NO_GDESC,
+ "Group descriptors not loaded"
+
+ec EXT2_FILSYS_CORRUPTED,
+ "The internal ext2_filsys data structure appears to be corrupted"
+
+ec EXT2_ET_EXTENT_CYCLE,
+ "Found cyclic loop in extent tree"
+
+ec EXT2_ET_EXTERNAL_JOURNAL_NOSUPP,
+ "Operation not supported on an external journal"
+
+ end
diff --git a/lib/ext2fs/ext2_ext_attr.h b/lib/ext2fs/ext2_ext_attr.h
new file mode 100644
index 0000000..c6068c4
--- /dev/null
+++ b/lib/ext2fs/ext2_ext_attr.h
@@ -0,0 +1,84 @@
+/*
+ File: linux/ext2_ext_attr.h
+
+ On-disk format of extended attributes for the ext2 filesystem.
+
+ (C) 2000 Andreas Gruenbacher, <a.gruenbacher@computer.org>
+*/
+
+#ifndef _EXT2_EXT_ATTR_H
+#define _EXT2_EXT_ATTR_H
+/* Magic value in attribute blocks */
+#define EXT2_EXT_ATTR_MAGIC_v1 0xEA010000
+#define EXT2_EXT_ATTR_MAGIC 0xEA020000
+
+/* Maximum number of references to one attribute block */
+#define EXT2_EXT_ATTR_REFCOUNT_MAX 1024
+
+struct ext2_ext_attr_header {
+ __u32 h_magic; /* magic number for identification */
+ __u32 h_refcount; /* reference count */
+ __u32 h_blocks; /* number of disk blocks used */
+ __u32 h_hash; /* hash value of all attributes */
+ __u32 h_checksum; /* crc32c(uuid+id+xattrs) */
+ /* id = inum if refcount = 1, else blknum */
+ __u32 h_reserved[3]; /* zero right now */
+};
+
+struct ext2_ext_attr_entry {
+ __u8 e_name_len; /* length of name */
+ __u8 e_name_index; /* attribute name index */
+ __u16 e_value_offs; /* offset in disk block of value */
+ __u32 e_value_inum; /* inode in which the value is stored */
+ __u32 e_value_size; /* size of attribute value */
+ __u32 e_hash; /* hash value of name and value */
+#if 0
+ char e_name[0]; /* attribute name */
+#endif
+};
+
+#define EXT2_EXT_ATTR_PAD_BITS 2
+#define EXT2_EXT_ATTR_PAD ((unsigned) 1<<EXT2_EXT_ATTR_PAD_BITS)
+#define EXT2_EXT_ATTR_ROUND (EXT2_EXT_ATTR_PAD-1)
+#define EXT2_EXT_ATTR_LEN(name_len) \
+ (((name_len) + EXT2_EXT_ATTR_ROUND + \
+ sizeof(struct ext2_ext_attr_entry)) & ~EXT2_EXT_ATTR_ROUND)
+#define EXT2_EXT_ATTR_NEXT(entry) \
+ ( (struct ext2_ext_attr_entry *)( \
+ (char *)(entry) + EXT2_EXT_ATTR_LEN((entry)->e_name_len)) )
+#define EXT2_EXT_ATTR_SIZE(size) \
+ (((size) + EXT2_EXT_ATTR_ROUND) & ~EXT2_EXT_ATTR_ROUND)
+#define EXT2_EXT_IS_LAST_ENTRY(entry) (*((__u32 *)(entry)) == 0UL)
+#define EXT2_EXT_ATTR_NAME(entry) \
+ (((char *) (entry)) + sizeof(struct ext2_ext_attr_entry))
+#define EXT2_XATTR_LEN(name_len) \
+ (((name_len) + EXT2_EXT_ATTR_ROUND + \
+ sizeof(struct ext2_xattr_entry)) & ~EXT2_EXT_ATTR_ROUND)
+#define EXT2_XATTR_SIZE(size) \
+ (((size) + EXT2_EXT_ATTR_ROUND) & ~EXT2_EXT_ATTR_ROUND)
+
+/*
+ * XATTR_SIZE_MAX is currently 64k, but for the purposes of checking
+ * for file system consistency errors, we use a somewhat bigger value.
+ * This allows XATTR_SIZE_MAX to grow in the future, but by using this
+ * instead of INT_MAX for certain consistency checks, we don't need to
+ * worry about arithmetic overflows. (Actually XATTR_SIZE_MAX is
+ * defined in include/uapi/linux/limits.h, so changing it is going
+ * not going to be trivial....)
+ */
+#define EXT2_XATTR_SIZE_MAX (1 << 24)
+
+#ifdef __KERNEL__
+# ifdef CONFIG_EXT2_FS_EXT_ATTR
+extern int ext2_get_ext_attr(struct inode *, const char *, char *, size_t, int);
+extern int ext2_set_ext_attr(struct inode *, const char *, char *, size_t, int);
+extern void ext2_ext_attr_free_inode(struct inode *inode);
+extern void ext2_ext_attr_put_super(struct super_block *sb);
+extern int ext2_ext_attr_init(void);
+extern void ext2_ext_attr_done(void);
+# else
+# define ext2_get_ext_attr NULL
+# define ext2_set_ext_attr NULL
+# endif
+#endif /* __KERNEL__ */
+#endif /* _EXT2_EXT_ATTR_H */
diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
new file mode 100644
index 0000000..0fc9c09
--- /dev/null
+++ b/lib/ext2fs/ext2_fs.h
@@ -0,0 +1,1201 @@
+/*
+ * linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * from
+ *
+ * linux/include/linux/minix_fs.h
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+#ifndef _LINUX_EXT2_FS_H
+#define _LINUX_EXT2_FS_H
+
+#include <ext2fs/ext2_types.h> /* Changed from linux/types.h */
+
+#ifndef __GNUC_PREREQ
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+#define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+#else
+#define __GNUC_PREREQ(maj, min) 0
+#endif
+#endif
+
+#ifndef __nonstring
+#ifdef __has_attribute
+#if __has_attribute(__nonstring__)
+#define __nonstring __attribute__((__nonstring__))
+#else
+#define __nonstring
+#endif /* __has_attribute(__nonstring__) */
+#else
+# define __nonstring
+#endif /* __has_attribute */
+#endif /* __nonstring */
+
+/*
+ * The second extended filesystem constants/structures
+ */
+
+/*
+ * Define EXT2FS_DEBUG to produce debug messages
+ */
+#undef EXT2FS_DEBUG
+
+/*
+ * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
+ */
+#define EXT2_PREALLOCATE
+#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
+
+/*
+ * The second extended file system version
+ */
+#define EXT2FS_DATE "95/08/09"
+#define EXT2FS_VERSION "0.5b"
+
+/*
+ * Special inode numbers
+ */
+#define EXT2_BAD_INO 1 /* Bad blocks inode */
+#define EXT2_ROOT_INO 2 /* Root inode */
+#define EXT4_USR_QUOTA_INO 3 /* User quota inode */
+#define EXT4_GRP_QUOTA_INO 4 /* Group quota inode */
+#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
+#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
+#define EXT2_RESIZE_INO 7 /* Reserved group descriptors inode */
+#define EXT2_JOURNAL_INO 8 /* Journal inode */
+#define EXT2_EXCLUDE_INO 9 /* The "exclude" inode, for snapshots */
+#define EXT4_REPLICA_INO 10 /* Used by non-upstream feature */
+
+/* First non-reserved inode for old ext2 filesystems */
+#define EXT2_GOOD_OLD_FIRST_INO 11
+
+/*
+ * The second extended file system magic number
+ */
+#define EXT2_SUPER_MAGIC 0xEF53
+
+#ifdef __KERNEL__
+#define EXT2_SB(sb) (&((sb)->u.ext2_sb))
+#else
+/* Assume that user mode programs are passing in an ext2fs superblock, not
+ * a kernel struct super_block. This will allow us to call the feature-test
+ * macros from user land. */
+#define EXT2_SB(sb) (sb)
+#endif
+
+/*
+ * Maximal count of links to a file
+ */
+#define EXT2_LINK_MAX 65000
+
+/*
+ * Macro-instructions used to manage several block sizes
+ */
+#define EXT2_MIN_BLOCK_LOG_SIZE 10 /* 1024 */
+#define EXT2_MAX_BLOCK_LOG_SIZE 16 /* 65536 */
+#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE)
+#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE)
+#ifdef __KERNEL__
+#define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
+#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
+#define EXT2_ADDR_PER_BLOCK_BITS(s) (EXT2_SB(s)->addr_per_block_bits)
+#define EXT2_INODE_SIZE(s) (EXT2_SB(s)->s_inode_size)
+#define EXT2_FIRST_INO(s) (EXT2_SB(s)->s_first_ino)
+#else
+#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
+ EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
+#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
+ EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
+#endif
+#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(__u32))
+
+/*
+ * Macro-instructions used to manage allocation clusters
+ */
+#define EXT2_MIN_CLUSTER_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE
+#define EXT2_MAX_CLUSTER_LOG_SIZE 29 /* 512MB */
+#define EXT2_MIN_CLUSTER_SIZE EXT2_MIN_BLOCK_SIZE
+#define EXT2_MAX_CLUSTER_SIZE (1 << EXT2_MAX_CLUSTER_LOG_SIZE)
+#define EXT2_CLUSTER_SIZE(s) (EXT2_MIN_BLOCK_SIZE << \
+ (s)->s_log_cluster_size)
+#define EXT2_CLUSTER_SIZE_BITS(s) ((s)->s_log_cluster_size + 10)
+
+/*
+ * Macro-instructions used to manage fragments
+ *
+ * Note: for backwards compatibility only, for the dump program.
+ * Ext2/3/4 will never support fragments....
+ */
+#define EXT2_MIN_FRAG_SIZE EXT2_MIN_BLOCK_SIZE
+#define EXT2_MAX_FRAG_SIZE EXT2_MAX_BLOCK_SIZE
+#define EXT2_MIN_FRAG_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE
+#define EXT2_FRAG_SIZE(s) EXT2_BLOCK_SIZE(s)
+#define EXT2_FRAGS_PER_BLOCK(s) 1
+
+/*
+ * ACL structures
+ */
+struct ext2_acl_header /* Header of Access Control Lists */
+{
+ __u32 aclh_size;
+ __u32 aclh_file_count;
+ __u32 aclh_acle_count;
+ __u32 aclh_first_acle;
+};
+
+struct ext2_acl_entry /* Access Control List Entry */
+{
+ __u32 acle_size;
+ __u16 acle_perms; /* Access permissions */
+ __u16 acle_type; /* Type of entry */
+ __u16 acle_tag; /* User or group identity */
+ __u16 acle_pad1;
+ __u32 acle_next; /* Pointer on next entry for the */
+ /* same inode or on next free entry */
+};
+
+/*
+ * Structure of a blocks group descriptor
+ */
+struct ext2_group_desc
+{
+ __u32 bg_block_bitmap; /* Blocks bitmap block */
+ __u32 bg_inode_bitmap; /* Inodes bitmap block */
+ __u32 bg_inode_table; /* Inodes table block */
+ __u16 bg_free_blocks_count; /* Free blocks count */
+ __u16 bg_free_inodes_count; /* Free inodes count */
+ __u16 bg_used_dirs_count; /* Directories count */
+ __u16 bg_flags;
+ __u32 bg_exclude_bitmap_lo; /* Exclude bitmap for snapshots */
+ __u16 bg_block_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */
+ __u16 bg_inode_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */
+ __u16 bg_itable_unused; /* Unused inodes count */
+ __u16 bg_checksum; /* crc16(s_uuid+group_num+group_desc)*/
+};
+
+/*
+ * Structure of a blocks group descriptor
+ */
+struct ext4_group_desc
+{
+ __u32 bg_block_bitmap; /* Blocks bitmap block */
+ __u32 bg_inode_bitmap; /* Inodes bitmap block */
+ __u32 bg_inode_table; /* Inodes table block */
+ __u16 bg_free_blocks_count; /* Free blocks count */
+ __u16 bg_free_inodes_count; /* Free inodes count */
+ __u16 bg_used_dirs_count; /* Directories count */
+ __u16 bg_flags; /* EXT4_BG_flags (INODE_UNINIT, etc) */
+ __u32 bg_exclude_bitmap_lo; /* Exclude bitmap for snapshots */
+ __u16 bg_block_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */
+ __u16 bg_inode_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */
+ __u16 bg_itable_unused; /* Unused inodes count */
+ __u16 bg_checksum; /* crc16(sb_uuid+group+desc) */
+ __u32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */
+ __u32 bg_inode_bitmap_hi; /* Inodes bitmap block MSB */
+ __u32 bg_inode_table_hi; /* Inodes table block MSB */
+ __u16 bg_free_blocks_count_hi;/* Free blocks count MSB */
+ __u16 bg_free_inodes_count_hi;/* Free inodes count MSB */
+ __u16 bg_used_dirs_count_hi; /* Directories count MSB */
+ __u16 bg_itable_unused_hi; /* Unused inodes count MSB */
+ __u32 bg_exclude_bitmap_hi; /* Exclude bitmap block MSB */
+ __u16 bg_block_bitmap_csum_hi;/* crc32c(s_uuid+grp_num+bitmap) MSB */
+ __u16 bg_inode_bitmap_csum_hi;/* crc32c(s_uuid+grp_num+bitmap) MSB */
+ __u32 bg_reserved;
+};
+
+#define EXT4_BG_INODE_BITMAP_CSUM_HI_END \
+ (offsetof(struct ext4_group_desc, bg_inode_bitmap_csum_hi) + \
+ sizeof(__u16))
+#define EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION \
+ (offsetof(struct ext4_group_desc, bg_block_bitmap_csum_hi) + \
+ sizeof(__u16))
+
+#define EXT2_BG_INODE_UNINIT 0x0001 /* Inode table/bitmap not initialized */
+#define EXT2_BG_BLOCK_UNINIT 0x0002 /* Block bitmap not initialized */
+#define EXT2_BG_INODE_ZEROED 0x0004 /* On-disk itable initialized to zero */
+
+/*
+ * Data structures used by the directory indexing feature
+ *
+ * Note: all of the multibyte integer fields are little endian.
+ */
+
+/*
+ * Note: dx_root_info is laid out so that if it should somehow get
+ * overlaid by a dirent the two low bits of the hash version will be
+ * zero. Therefore, the hash version mod 4 should never be 0.
+ * Sincerely, the paranoia department.
+ */
+struct ext2_dx_root_info {
+ __u32 reserved_zero;
+ __u8 hash_version; /* 0 now, 1 at release */
+ __u8 info_length; /* 8 */
+ __u8 indirect_levels;
+ __u8 unused_flags;
+};
+
+#define EXT2_HASH_LEGACY 0
+#define EXT2_HASH_HALF_MD4 1
+#define EXT2_HASH_TEA 2
+#define EXT2_HASH_LEGACY_UNSIGNED 3 /* reserved for userspace lib */
+#define EXT2_HASH_HALF_MD4_UNSIGNED 4 /* reserved for userspace lib */
+#define EXT2_HASH_TEA_UNSIGNED 5 /* reserved for userspace lib */
+#define EXT2_HASH_SIPHASH 6
+
+#define EXT2_HASH_FLAG_INCOMPAT 0x1
+
+#define EXT4_DX_BLOCK_MASK 0x0fffffff
+
+struct ext2_dx_entry {
+ __le32 hash;
+ __le32 block;
+};
+
+struct ext2_dx_countlimit {
+ __le16 limit;
+ __le16 count;
+};
+
+/*
+ * This goes at the end of each htree block.
+ */
+struct ext2_dx_tail {
+ __le32 dt_reserved;
+ __le32 dt_checksum; /* crc32c(uuid+inum+dxblock) */
+};
+
+/*
+ * Macro-instructions used to manage group descriptors
+ */
+#define EXT2_MIN_DESC_SIZE 32
+#define EXT2_MIN_DESC_SIZE_64BIT 64
+#define EXT2_MAX_DESC_SIZE EXT2_MIN_BLOCK_SIZE
+#define EXT2_DESC_SIZE(s) \
+ (ext2fs_has_feature_64bit(s) ? (s)->s_desc_size : EXT2_MIN_DESC_SIZE)
+
+#define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group)
+#define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group)
+#define EXT2_CLUSTERS_PER_GROUP(s) (EXT2_SB(s)->s_clusters_per_group)
+#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
+/* limits imposed by 16-bit value gd_free_{blocks,inode}_count */
+#define EXT2_MAX_BLOCKS_PER_GROUP(s) ((((unsigned) 1 << 16) - 8) * \
+ (EXT2_CLUSTER_SIZE(s) / \
+ EXT2_BLOCK_SIZE(s)))
+#define EXT2_MAX_CLUSTERS_PER_GROUP(s) (((unsigned) 1 << 16) - 8)
+#define EXT2_MAX_INODES_PER_GROUP(s) (((unsigned) 1 << 16) - \
+ EXT2_INODES_PER_BLOCK(s))
+#ifdef __KERNEL__
+#define EXT2_DESC_PER_BLOCK(s) (EXT2_SB(s)->s_desc_per_block)
+#define EXT2_DESC_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_desc_per_block_bits)
+#else
+#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_DESC_SIZE(s))
+#endif
+
+#define EXT2_GROUPS_TO_BLOCKS(s, g) ((blk64_t) EXT2_BLOCKS_PER_GROUP(s) * \
+ (g))
+#define EXT2_GROUPS_TO_CLUSTERS(s, g) ((blk64_t) EXT2_CLUSTERS_PER_GROUP(s) * \
+ (g))
+
+/*
+ * Constants relative to the data blocks
+ */
+#define EXT2_NDIR_BLOCKS 12
+#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
+#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
+#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
+#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
+
+/*
+ * Inode flags
+ */
+#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */
+#define EXT2_UNRM_FL 0x00000002 /* Undelete */
+#define EXT2_COMPR_FL 0x00000004 /* Compress file */
+#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */
+#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */
+#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */
+#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */
+#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */
+/* Reserved for compression usage... */
+#define EXT2_DIRTY_FL 0x00000100
+#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
+#define EXT2_NOCOMPR_FL 0x00000400 /* Access raw compressed data */
+ /* nb: was previously EXT2_ECOMPR_FL */
+#define EXT4_ENCRYPT_FL 0x00000800 /* encrypted inode */
+/* End compression flags --- maybe not all used */
+#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
+#define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */
+#define EXT2_IMAGIC_FL 0x00002000
+#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
+#define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */
+#define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */
+#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
+#define EXT4_HUGE_FILE_FL 0x00040000 /* Set to each huge file */
+#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */
+#define EXT4_VERITY_FL 0x00100000 /* Verity protected inode */
+#define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */
+/* EXT4_EOFBLOCKS_FL 0x00400000 was here */
+#define FS_NOCOW_FL 0x00800000 /* Do not cow file */
+#define EXT4_SNAPFILE_FL 0x01000000 /* Inode is a snapshot */
+#define FS_DAX_FL 0x02000000 /* Inode is DAX */
+#define EXT4_SNAPFILE_DELETED_FL 0x04000000 /* Snapshot is being deleted */
+#define EXT4_SNAPFILE_SHRUNK_FL 0x08000000 /* Snapshot shrink has completed */
+#define EXT4_INLINE_DATA_FL 0x10000000 /* Inode has inline data */
+#define EXT4_PROJINHERIT_FL 0x20000000 /* Create with parents projid */
+#define EXT4_CASEFOLD_FL 0x40000000 /* Casefolded file */
+#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
+
+#define EXT2_FL_USER_VISIBLE 0x604BDFFF /* User visible flags */
+#define EXT2_FL_USER_MODIFIABLE 0x604B80FF /* User modifiable flags */
+
+/*
+ * ioctl commands
+ */
+
+/* Used for online resize */
+struct ext2_new_group_input {
+ __u32 group; /* Group number for this data */
+ __u32 block_bitmap; /* Absolute block number of block bitmap */
+ __u32 inode_bitmap; /* Absolute block number of inode bitmap */
+ __u32 inode_table; /* Absolute block number of inode table start */
+ __u32 blocks_count; /* Total number of blocks in this group */
+ __u16 reserved_blocks; /* Number of reserved blocks in this group */
+ __u16 unused; /* Number of reserved GDT blocks in group */
+};
+
+struct ext4_new_group_input {
+ __u32 group; /* Group number for this data */
+ __u64 block_bitmap; /* Absolute block number of block bitmap */
+ __u64 inode_bitmap; /* Absolute block number of inode bitmap */
+ __u64 inode_table; /* Absolute block number of inode table start */
+ __u32 blocks_count; /* Total number of blocks in this group */
+ __u16 reserved_blocks; /* Number of reserved blocks in this group */
+ __u16 unused;
+};
+
+#ifdef __GNU__ /* Needed for the Hurd */
+#define _IOT_ext2_new_group_input _IOT (_IOTS(__u32), 5, _IOTS(__u16), 2, 0, 0)
+#endif
+
+#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
+#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
+#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
+#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
+#define EXT2_IOC_GETVERSION_NEW _IOR('f', 3, long)
+#define EXT2_IOC_SETVERSION_NEW _IOW('f', 4, long)
+#define EXT2_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long)
+#define EXT2_IOC_GROUP_ADD _IOW('f', 8,struct ext2_new_group_input)
+#define EXT4_IOC_GROUP_ADD _IOW('f', 8,struct ext4_new_group_input)
+#define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64)
+
+/*
+ * Structure of an inode on the disk
+ */
+struct ext2_inode {
+/*00*/ __u16 i_mode; /* File mode */
+ __u16 i_uid; /* Low 16 bits of Owner Uid */
+ __u32 i_size; /* Size in bytes */
+ __u32 i_atime; /* Access time */
+ __u32 i_ctime; /* Inode change time */
+/*10*/ __u32 i_mtime; /* Modification time */
+ __u32 i_dtime; /* Deletion Time */
+ __u16 i_gid; /* Low 16 bits of Group Id */
+ __u16 i_links_count; /* Links count */
+ __u32 i_blocks; /* Blocks count */
+/*20*/ __u32 i_flags; /* File flags */
+ union {
+ struct {
+ __u32 l_i_version; /* was l_i_reserved1 */
+ } linux1;
+ struct {
+ __u32 h_i_translator;
+ } hurd1;
+ } osd1; /* OS dependent 1 */
+/*28*/ __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
+/*64*/ __u32 i_generation; /* File version (for NFS) */
+ __u32 i_file_acl; /* File ACL */
+ __u32 i_size_high;
+/*70*/ __u32 i_faddr; /* Fragment address */
+ union {
+ struct {
+ __u16 l_i_blocks_hi;
+ __u16 l_i_file_acl_high;
+ __u16 l_i_uid_high; /* these 2 fields */
+ __u16 l_i_gid_high; /* were reserved2[0] */
+ __u16 l_i_checksum_lo; /* crc32c(uuid+inum+inode) */
+ __u16 l_i_reserved;
+ } linux2;
+ struct {
+ __u8 h_i_frag; /* Fragment number */
+ __u8 h_i_fsize; /* Fragment size */
+ __u16 h_i_mode_high;
+ __u16 h_i_uid_high;
+ __u16 h_i_gid_high;
+ __u32 h_i_author;
+ } hurd2;
+ } osd2; /* OS dependent 2 */
+};
+
+/*
+ * Permanent part of an large inode on the disk
+ */
+struct ext2_inode_large {
+/*00*/ __u16 i_mode; /* File mode */
+ __u16 i_uid; /* Low 16 bits of Owner Uid */
+ __u32 i_size; /* Size in bytes */
+ __u32 i_atime; /* Access time */
+ __u32 i_ctime; /* Inode Change time */
+/*10*/ __u32 i_mtime; /* Modification time */
+ __u32 i_dtime; /* Deletion Time */
+ __u16 i_gid; /* Low 16 bits of Group Id */
+ __u16 i_links_count; /* Links count */
+ __u32 i_blocks; /* Blocks count */
+/*20*/ __u32 i_flags; /* File flags */
+ union {
+ struct {
+ __u32 l_i_version; /* was l_i_reserved1 */
+ } linux1;
+ struct {
+ __u32 h_i_translator;
+ } hurd1;
+ } osd1; /* OS dependent 1 */
+/*28*/ __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
+/*64*/ __u32 i_generation; /* File version (for NFS) */
+ __u32 i_file_acl; /* File ACL */
+ __u32 i_size_high;
+/*70*/ __u32 i_faddr; /* Fragment address */
+ union {
+ struct {
+ __u16 l_i_blocks_hi;
+ __u16 l_i_file_acl_high;
+ __u16 l_i_uid_high; /* these 2 fields */
+ __u16 l_i_gid_high; /* were reserved2[0] */
+ __u16 l_i_checksum_lo; /* crc32c(uuid+inum+inode) */
+ __u16 l_i_reserved;
+ } linux2;
+ struct {
+ __u8 h_i_frag; /* Fragment number */
+ __u8 h_i_fsize; /* Fragment size */
+ __u16 h_i_mode_high;
+ __u16 h_i_uid_high;
+ __u16 h_i_gid_high;
+ __u32 h_i_author;
+ } hurd2;
+ } osd2; /* OS dependent 2 */
+/*80*/ __u16 i_extra_isize;
+ __u16 i_checksum_hi; /* crc32c(uuid+inum+inode) */
+ __u32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */
+ __u32 i_mtime_extra; /* extra Modification time (nsec << 2 | epoch) */
+ __u32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */
+/*90*/ __u32 i_crtime; /* File creation time */
+ __u32 i_crtime_extra; /* extra File creation time (nsec << 2 | epoch)*/
+ __u32 i_version_hi; /* high 32 bits for 64-bit version */
+/*9c*/ __u32 i_projid; /* Project ID */
+};
+
+#define EXT4_INODE_CSUM_HI_EXTRA_END \
+ (offsetof(struct ext2_inode_large, i_checksum_hi) + sizeof(__u16) - \
+ EXT2_GOOD_OLD_INODE_SIZE)
+
+#define EXT4_EPOCH_BITS 2
+#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1)
+
+#define i_checksum_lo osd2.linux2.l_i_checksum_lo
+
+#define inode_includes(size, field) \
+ (size >= (sizeof(((struct ext2_inode_large *)0)->field) + \
+ offsetof(struct ext2_inode_large, field)))
+
+#if defined(__KERNEL__) || defined(__linux__)
+#define i_reserved1 osd1.linux1.l_i_reserved1
+#define i_frag osd2.linux2.l_i_frag
+#define i_fsize osd2.linux2.l_i_fsize
+#define i_uid_low i_uid
+#define i_gid_low i_gid
+#define i_uid_high osd2.linux2.l_i_uid_high
+#define i_gid_high osd2.linux2.l_i_gid_high
+#else
+#if defined(__GNU__)
+
+#define i_translator osd1.hurd1.h_i_translator
+#define i_frag osd2.hurd2.h_i_frag;
+#define i_fsize osd2.hurd2.h_i_fsize;
+#define i_uid_high osd2.hurd2.h_i_uid_high
+#define i_gid_high osd2.hurd2.h_i_gid_high
+#define i_author osd2.hurd2.h_i_author
+
+#endif /* __GNU__ */
+#endif /* defined(__KERNEL__) || defined(__linux__) */
+
+#define inode_uid(inode) ((inode).i_uid | (unsigned)(inode).osd2.linux2.l_i_uid_high << 16)
+#define inode_gid(inode) ((inode).i_gid | (unsigned)(inode).osd2.linux2.l_i_gid_high << 16)
+#define inode_projid(inode) ((inode).i_projid)
+#define ext2fs_set_i_uid_high(inode,x) ((inode).osd2.linux2.l_i_uid_high = (x))
+#define ext2fs_set_i_gid_high(inode,x) ((inode).osd2.linux2.l_i_gid_high = (x))
+
+static inline
+struct ext2_inode *EXT2_INODE(struct ext2_inode_large *large_inode)
+{
+ return (struct ext2_inode *) large_inode;
+}
+
+/*
+ * File system states
+ */
+#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
+#define EXT2_ERROR_FS 0x0002 /* Errors detected */
+#define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */
+#define EXT4_FC_REPLAY 0x0020 /* Ext4 fast commit replay ongoing */
+
+/*
+ * Misc. filesystem flags
+ */
+#define EXT2_FLAGS_SIGNED_HASH 0x0001 /* Signed dirhash in use */
+#define EXT2_FLAGS_UNSIGNED_HASH 0x0002 /* Unsigned dirhash in use */
+#define EXT2_FLAGS_TEST_FILESYS 0x0004 /* OK for use on development code */
+#define EXT2_FLAGS_IS_SNAPSHOT 0x0010 /* This is a snapshot image */
+#define EXT2_FLAGS_FIX_SNAPSHOT 0x0020 /* Snapshot inodes corrupted */
+#define EXT2_FLAGS_FIX_EXCLUDE 0x0040 /* Exclude bitmaps corrupted */
+
+/*
+ * Mount flags
+ */
+#define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */
+#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */
+#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */
+#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
+#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
+#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
+#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
+#define EXT2_MOUNT_NO_UID32 0x0200 /* Disable 32-bit UIDs */
+
+#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
+#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
+#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & \
+ EXT2_MOUNT_##opt)
+/*
+ * Maximal mount counts between two filesystem checks
+ */
+#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
+#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */
+
+/*
+ * Behaviour when detecting errors
+ */
+#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */
+#define EXT2_ERRORS_RO 2 /* Remount fs read-only */
+#define EXT2_ERRORS_PANIC 3 /* Panic */
+#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
+
+#if (__GNUC__ >= 4)
+#define ext4_offsetof(TYPE,MEMBER) __builtin_offsetof(TYPE,MEMBER)
+#else
+#define ext4_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
+/* Metadata checksum algorithms */
+#define EXT2_CRC32C_CHKSUM 1
+
+/* Encryption algorithms, key size and key reference len */
+#define EXT4_ENCRYPTION_MODE_INVALID 0
+#define EXT4_ENCRYPTION_MODE_AES_256_XTS 1
+#define EXT4_ENCRYPTION_MODE_AES_256_GCM 2
+#define EXT4_ENCRYPTION_MODE_AES_256_CBC 3
+#define EXT4_ENCRYPTION_MODE_AES_256_CTS 4
+
+#define EXT4_AES_256_XTS_KEY_SIZE 64
+#define EXT4_AES_256_GCM_KEY_SIZE 32
+#define EXT4_AES_256_CBC_KEY_SIZE 32
+#define EXT4_AES_256_CTS_KEY_SIZE 32
+#define EXT4_MAX_KEY_SIZE 64
+
+#define EXT4_KEY_DESCRIPTOR_SIZE 8
+#define EXT4_CRYPTO_BLOCK_SIZE 16
+
+/* Password derivation constants */
+#define EXT4_MAX_PASSPHRASE_SIZE 1024
+#define EXT4_MAX_SALT_SIZE 256
+#define EXT4_PBKDF2_ITERATIONS 0xFFFF
+
+#define EXT2_LABEL_LEN 16
+
+/*
+ * Policy provided via an ioctl on the topmost directory. This
+ * structure is also in the kernel.
+ */
+struct ext4_encryption_policy {
+ char version;
+ char contents_encryption_mode;
+ char filenames_encryption_mode;
+ char flags;
+ char master_key_descriptor[EXT4_KEY_DESCRIPTOR_SIZE];
+} __attribute__((__packed__));
+
+struct ext4_encryption_key {
+ __u32 mode;
+ char raw[EXT4_MAX_KEY_SIZE];
+ __u32 size;
+} __attribute__((__packed__));
+
+/*
+ * Structure of the super block
+ */
+struct ext2_super_block {
+/*000*/ __u32 s_inodes_count; /* Inodes count */
+ __u32 s_blocks_count; /* Blocks count */
+ __u32 s_r_blocks_count; /* Reserved blocks count */
+ __u32 s_free_blocks_count; /* Free blocks count */
+/*010*/ __u32 s_free_inodes_count; /* Free inodes count */
+ __u32 s_first_data_block; /* First Data Block */
+ __u32 s_log_block_size; /* Block size */
+ __u32 s_log_cluster_size; /* Allocation cluster size */
+/*020*/ __u32 s_blocks_per_group; /* # Blocks per group */
+ __u32 s_clusters_per_group; /* # Fragments per group */
+ __u32 s_inodes_per_group; /* # Inodes per group */
+ __u32 s_mtime; /* Mount time */
+/*030*/ __u32 s_wtime; /* Write time */
+ __u16 s_mnt_count; /* Mount count */
+ __s16 s_max_mnt_count; /* Maximal mount count */
+ __u16 s_magic; /* Magic signature */
+ __u16 s_state; /* File system state */
+ __u16 s_errors; /* Behaviour when detecting errors */
+ __u16 s_minor_rev_level; /* minor revision level */
+/*040*/ __u32 s_lastcheck; /* time of last check */
+ __u32 s_checkinterval; /* max. time between checks */
+ __u32 s_creator_os; /* OS */
+ __u32 s_rev_level; /* Revision level */
+/*050*/ __u16 s_def_resuid; /* Default uid for reserved blocks */
+ __u16 s_def_resgid; /* Default gid for reserved blocks */
+ /*
+ * These fields are for EXT2_DYNAMIC_REV superblocks only.
+ *
+ * Note: the difference between the compatible feature set and
+ * the incompatible feature set is that if there is a bit set
+ * in the incompatible feature set that the kernel doesn't
+ * know about, it should refuse to mount the filesystem.
+ *
+ * e2fsck's requirements are more strict; if it doesn't know
+ * about a feature in either the compatible or incompatible
+ * feature set, it must abort and not try to meddle with
+ * things it doesn't understand...
+ */
+ __u32 s_first_ino; /* First non-reserved inode */
+ __u16 s_inode_size; /* size of inode structure */
+ __u16 s_block_group_nr; /* block group # of this superblock */
+ __u32 s_feature_compat; /* compatible feature set */
+/*060*/ __u32 s_feature_incompat; /* incompatible feature set */
+ __u32 s_feature_ro_compat; /* readonly-compatible feature set */
+/*068*/ __u8 s_uuid[16] __nonstring; /* 128-bit uuid for volume */
+/*078*/ __u8 s_volume_name[EXT2_LABEL_LEN] __nonstring; /* volume name, no NUL? */
+/*088*/ __u8 s_last_mounted[64] __nonstring; /* directory last mounted on, no NUL? */
+/*0c8*/ __u32 s_algorithm_usage_bitmap; /* For compression */
+ /*
+ * Performance hints. Directory preallocation should only
+ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
+ */
+ __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
+ __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
+ __u16 s_reserved_gdt_blocks; /* Per group table for online growth */
+ /*
+ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
+ */
+/*0d0*/ __u8 s_journal_uuid[16] __nonstring; /* uuid of journal superblock */
+/*0e0*/ __u32 s_journal_inum; /* inode number of journal file */
+ __u32 s_journal_dev; /* device number of journal file */
+ __u32 s_last_orphan; /* start of list of inodes to delete */
+/*0ec*/ __u32 s_hash_seed[4]; /* HTREE hash seed */
+/*0fc*/ __u8 s_def_hash_version; /* Default hash version to use */
+ __u8 s_jnl_backup_type; /* Default type of journal backup */
+ __u16 s_desc_size; /* Group desc. size: INCOMPAT_64BIT */
+/*100*/ __u32 s_default_mount_opts; /* default EXT2_MOUNT_* flags used */
+ __u32 s_first_meta_bg; /* First metablock group */
+ __u32 s_mkfs_time; /* When the filesystem was created */
+/*10c*/ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
+/*150*/ __u32 s_blocks_count_hi; /* Blocks count high 32bits */
+ __u32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/
+ __u32 s_free_blocks_hi; /* Free blocks count */
+ __u16 s_min_extra_isize; /* All inodes have at least # bytes */
+ __u16 s_want_extra_isize; /* New inodes should reserve # bytes */
+/*160*/ __u32 s_flags; /* Miscellaneous flags */
+ __u16 s_raid_stride; /* RAID stride in blocks */
+ __u16 s_mmp_update_interval; /* # seconds to wait in MMP checking */
+ __u64 s_mmp_block; /* Block for multi-mount protection */
+/*170*/ __u32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/
+ __u8 s_log_groups_per_flex; /* FLEX_BG group size */
+ __u8 s_checksum_type; /* metadata checksum algorithm */
+ __u8 s_encryption_level; /* versioning level for encryption */
+ __u8 s_reserved_pad; /* Padding to next 32bits */
+ __u64 s_kbytes_written; /* nr of lifetime kilobytes written */
+/*180*/ __u32 s_snapshot_inum; /* Inode number of active snapshot */
+ __u32 s_snapshot_id; /* sequential ID of active snapshot */
+ __u64 s_snapshot_r_blocks_count; /* active snapshot reserved blocks */
+/*190*/ __u32 s_snapshot_list; /* inode number of disk snapshot list */
+#define EXT4_S_ERR_START ext4_offsetof(struct ext2_super_block, s_error_count)
+ __u32 s_error_count; /* number of fs errors */
+ __u32 s_first_error_time; /* first time an error happened */
+ __u32 s_first_error_ino; /* inode involved in first error */
+/*1a0*/ __u64 s_first_error_block; /* block involved in first error */
+ __u8 s_first_error_func[32] __nonstring; /* function where error hit, no NUL? */
+/*1c8*/ __u32 s_first_error_line; /* line number where error happened */
+ __u32 s_last_error_time; /* most recent time of an error */
+/*1d0*/ __u32 s_last_error_ino; /* inode involved in last error */
+ __u32 s_last_error_line; /* line number where error happened */
+ __u64 s_last_error_block; /* block involved of last error */
+/*1e0*/ __u8 s_last_error_func[32] __nonstring; /* function where error hit, no NUL? */
+#define EXT4_S_ERR_END ext4_offsetof(struct ext2_super_block, s_mount_opts)
+/*200*/ __u8 s_mount_opts[64] __nonstring; /* default mount options, no NUL? */
+/*240*/ __u32 s_usr_quota_inum; /* inode number of user quota file */
+ __u32 s_grp_quota_inum; /* inode number of group quota file */
+ __u32 s_overhead_clusters; /* overhead blocks/clusters in fs */
+/*24c*/ __u32 s_backup_bgs[2]; /* If sparse_super2 enabled */
+/*254*/ __u8 s_encrypt_algos[4]; /* Encryption algorithms in use */
+/*258*/ __u8 s_encrypt_pw_salt[16]; /* Salt used for string2key algorithm */
+/*268*/ __le32 s_lpf_ino; /* Location of the lost+found inode */
+ __le32 s_prj_quota_inum; /* inode for tracking project quota */
+/*270*/ __le32 s_checksum_seed; /* crc32c(orig_uuid) if csum_seed set */
+/*274*/ __u8 s_wtime_hi;
+ __u8 s_mtime_hi;
+ __u8 s_mkfs_time_hi;
+ __u8 s_lastcheck_hi;
+ __u8 s_first_error_time_hi;
+ __u8 s_last_error_time_hi;
+ __u8 s_first_error_errcode;
+ __u8 s_last_error_errcode;
+/*27c*/ __le16 s_encoding; /* Filename charset encoding */
+ __le16 s_encoding_flags; /* Filename charset encoding flags */
+ __le32 s_orphan_file_inum; /* Inode for tracking orphan inodes */
+ __le32 s_reserved[94]; /* Padding to the end of the block */
+/*3fc*/ __u32 s_checksum; /* crc32c(superblock) */
+};
+
+#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START)
+#define EXT2_LEN_STR(buf) (int)sizeof(buf), (char *)buf
+
+/*
+ * Codes for operating systems
+ */
+#define EXT2_OS_LINUX 0
+#define EXT2_OS_HURD 1
+#define EXT2_OBSO_OS_MASIX 2
+#define EXT2_OS_FREEBSD 3
+#define EXT2_OS_LITES 4
+
+/*
+ * Revision levels
+ */
+#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
+#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
+
+#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
+#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
+
+#define EXT2_GOOD_OLD_INODE_SIZE 128
+
+/*
+ * Journal inode backup types
+ */
+#define EXT3_JNL_BACKUP_BLOCKS 1
+
+/*
+ * Feature set definitions
+ */
+
+#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
+ ( EXT2_SB(sb)->s_feature_compat & (mask) )
+#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
+ ( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
+#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
+ ( EXT2_SB(sb)->s_feature_incompat & (mask) )
+
+#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
+#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
+#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
+#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010
+#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
+#define EXT2_FEATURE_COMPAT_LAZY_BG 0x0040
+/* #define EXT2_FEATURE_COMPAT_EXCLUDE_INODE 0x0080 not used, legacy */
+#define EXT2_FEATURE_COMPAT_EXCLUDE_BITMAP 0x0100
+#define EXT4_FEATURE_COMPAT_SPARSE_SUPER2 0x0200
+#define EXT4_FEATURE_COMPAT_FAST_COMMIT 0x0400
+#define EXT4_FEATURE_COMPAT_STABLE_INODES 0x0800
+#define EXT4_FEATURE_COMPAT_ORPHAN_FILE 0x1000
+
+#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+/* #define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 not used */
+#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008
+#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020
+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
+#define EXT4_FEATURE_RO_COMPAT_HAS_SNAPSHOT 0x0080
+#define EXT4_FEATURE_RO_COMPAT_QUOTA 0x0100
+#define EXT4_FEATURE_RO_COMPAT_BIGALLOC 0x0200
+/*
+ * METADATA_CSUM implies GDT_CSUM. When METADATA_CSUM is set, group
+ * descriptor checksums use the same algorithm as all other data
+ * structures' checksums.
+ */
+#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400
+#define EXT4_FEATURE_RO_COMPAT_REPLICA 0x0800
+#define EXT4_FEATURE_RO_COMPAT_READONLY 0x1000
+#define EXT4_FEATURE_RO_COMPAT_PROJECT 0x2000 /* Project quota */
+#define EXT4_FEATURE_RO_COMPAT_SHARED_BLOCKS 0x4000
+#define EXT4_FEATURE_RO_COMPAT_VERITY 0x8000
+#define EXT4_FEATURE_RO_COMPAT_ORPHAN_PRESENT 0x10000
+
+#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
+#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */
+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */
+#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040
+#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
+#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
+#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
+#define EXT4_FEATURE_INCOMPAT_EA_INODE 0x0400
+#define EXT4_FEATURE_INCOMPAT_DIRDATA 0x1000
+#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
+#define EXT4_FEATURE_INCOMPAT_LARGEDIR 0x4000 /* >2GB or 3-lvl htree */
+#define EXT4_FEATURE_INCOMPAT_INLINE_DATA 0x8000 /* data in inode */
+#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
+#define EXT4_FEATURE_INCOMPAT_CASEFOLD 0x20000
+
+#define EXT4_FEATURE_COMPAT_FUNCS(name, ver, flagname) \
+static inline int ext2fs_has_feature_##name(struct ext2_super_block *sb) \
+{ \
+ return ((EXT2_SB(sb)->s_feature_compat & \
+ EXT##ver##_FEATURE_COMPAT_##flagname) != 0); \
+} \
+static inline void ext2fs_set_feature_##name(struct ext2_super_block *sb) \
+{ \
+ EXT2_SB(sb)->s_feature_compat |= \
+ EXT##ver##_FEATURE_COMPAT_##flagname; \
+} \
+static inline void ext2fs_clear_feature_##name(struct ext2_super_block *sb) \
+{ \
+ EXT2_SB(sb)->s_feature_compat &= \
+ ~EXT##ver##_FEATURE_COMPAT_##flagname; \
+}
+
+#define EXT4_FEATURE_RO_COMPAT_FUNCS(name, ver, flagname) \
+static inline int ext2fs_has_feature_##name(struct ext2_super_block *sb) \
+{ \
+ return ((EXT2_SB(sb)->s_feature_ro_compat & \
+ EXT##ver##_FEATURE_RO_COMPAT_##flagname) != 0); \
+} \
+static inline void ext2fs_set_feature_##name(struct ext2_super_block *sb) \
+{ \
+ EXT2_SB(sb)->s_feature_ro_compat |= \
+ EXT##ver##_FEATURE_RO_COMPAT_##flagname; \
+} \
+static inline void ext2fs_clear_feature_##name(struct ext2_super_block *sb) \
+{ \
+ EXT2_SB(sb)->s_feature_ro_compat &= \
+ ~EXT##ver##_FEATURE_RO_COMPAT_##flagname; \
+}
+
+#define EXT4_FEATURE_INCOMPAT_FUNCS(name, ver, flagname) \
+static inline int ext2fs_has_feature_##name(struct ext2_super_block *sb) \
+{ \
+ return ((EXT2_SB(sb)->s_feature_incompat & \
+ EXT##ver##_FEATURE_INCOMPAT_##flagname) != 0); \
+} \
+static inline void ext2fs_set_feature_##name(struct ext2_super_block *sb) \
+{ \
+ EXT2_SB(sb)->s_feature_incompat |= \
+ EXT##ver##_FEATURE_INCOMPAT_##flagname; \
+} \
+static inline void ext2fs_clear_feature_##name(struct ext2_super_block *sb) \
+{ \
+ EXT2_SB(sb)->s_feature_incompat &= \
+ ~EXT##ver##_FEATURE_INCOMPAT_##flagname; \
+}
+
+EXT4_FEATURE_COMPAT_FUNCS(dir_prealloc, 2, DIR_PREALLOC)
+EXT4_FEATURE_COMPAT_FUNCS(imagic_inodes, 2, IMAGIC_INODES)
+EXT4_FEATURE_COMPAT_FUNCS(journal, 3, HAS_JOURNAL)
+EXT4_FEATURE_COMPAT_FUNCS(xattr, 2, EXT_ATTR)
+EXT4_FEATURE_COMPAT_FUNCS(resize_inode, 2, RESIZE_INODE)
+EXT4_FEATURE_COMPAT_FUNCS(dir_index, 2, DIR_INDEX)
+EXT4_FEATURE_COMPAT_FUNCS(lazy_bg, 2, LAZY_BG)
+EXT4_FEATURE_COMPAT_FUNCS(exclude_bitmap, 2, EXCLUDE_BITMAP)
+EXT4_FEATURE_COMPAT_FUNCS(sparse_super2, 4, SPARSE_SUPER2)
+EXT4_FEATURE_COMPAT_FUNCS(fast_commit, 4, FAST_COMMIT)
+EXT4_FEATURE_COMPAT_FUNCS(stable_inodes, 4, STABLE_INODES)
+EXT4_FEATURE_COMPAT_FUNCS(orphan_file, 4, ORPHAN_FILE)
+
+EXT4_FEATURE_RO_COMPAT_FUNCS(sparse_super, 2, SPARSE_SUPER)
+EXT4_FEATURE_RO_COMPAT_FUNCS(large_file, 2, LARGE_FILE)
+EXT4_FEATURE_RO_COMPAT_FUNCS(huge_file, 4, HUGE_FILE)
+EXT4_FEATURE_RO_COMPAT_FUNCS(gdt_csum, 4, GDT_CSUM)
+EXT4_FEATURE_RO_COMPAT_FUNCS(dir_nlink, 4, DIR_NLINK)
+EXT4_FEATURE_RO_COMPAT_FUNCS(extra_isize, 4, EXTRA_ISIZE)
+EXT4_FEATURE_RO_COMPAT_FUNCS(has_snapshot, 4, HAS_SNAPSHOT)
+EXT4_FEATURE_RO_COMPAT_FUNCS(quota, 4, QUOTA)
+EXT4_FEATURE_RO_COMPAT_FUNCS(bigalloc, 4, BIGALLOC)
+EXT4_FEATURE_RO_COMPAT_FUNCS(metadata_csum, 4, METADATA_CSUM)
+EXT4_FEATURE_RO_COMPAT_FUNCS(replica, 4, REPLICA)
+EXT4_FEATURE_RO_COMPAT_FUNCS(readonly, 4, READONLY)
+EXT4_FEATURE_RO_COMPAT_FUNCS(project, 4, PROJECT)
+EXT4_FEATURE_RO_COMPAT_FUNCS(shared_blocks, 4, SHARED_BLOCKS)
+EXT4_FEATURE_RO_COMPAT_FUNCS(verity, 4, VERITY)
+EXT4_FEATURE_RO_COMPAT_FUNCS(orphan_present, 4, ORPHAN_PRESENT)
+
+EXT4_FEATURE_INCOMPAT_FUNCS(compression, 2, COMPRESSION)
+EXT4_FEATURE_INCOMPAT_FUNCS(filetype, 2, FILETYPE)
+EXT4_FEATURE_INCOMPAT_FUNCS(journal_needs_recovery, 3, RECOVER)
+EXT4_FEATURE_INCOMPAT_FUNCS(journal_dev, 3, JOURNAL_DEV)
+EXT4_FEATURE_INCOMPAT_FUNCS(meta_bg, 2, META_BG)
+EXT4_FEATURE_INCOMPAT_FUNCS(extents, 3, EXTENTS)
+EXT4_FEATURE_INCOMPAT_FUNCS(64bit, 4, 64BIT)
+EXT4_FEATURE_INCOMPAT_FUNCS(mmp, 4, MMP)
+EXT4_FEATURE_INCOMPAT_FUNCS(flex_bg, 4, FLEX_BG)
+EXT4_FEATURE_INCOMPAT_FUNCS(ea_inode, 4, EA_INODE)
+EXT4_FEATURE_INCOMPAT_FUNCS(dirdata, 4, DIRDATA)
+EXT4_FEATURE_INCOMPAT_FUNCS(csum_seed, 4, CSUM_SEED)
+EXT4_FEATURE_INCOMPAT_FUNCS(largedir, 4, LARGEDIR)
+EXT4_FEATURE_INCOMPAT_FUNCS(inline_data, 4, INLINE_DATA)
+EXT4_FEATURE_INCOMPAT_FUNCS(encrypt, 4, ENCRYPT)
+EXT4_FEATURE_INCOMPAT_FUNCS(casefold, 4, CASEFOLD)
+
+#define EXT2_FEATURE_COMPAT_SUPP 0
+#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
+ EXT4_FEATURE_INCOMPAT_MMP| \
+ EXT4_FEATURE_INCOMPAT_LARGEDIR| \
+ EXT4_FEATURE_INCOMPAT_EA_INODE)
+#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
+ EXT2_FEATURE_RO_COMPAT_BTREE_DIR| \
+ EXT4_FEATURE_RO_COMPAT_VERITY)
+
+/*
+ * Default values for user and/or group using reserved blocks
+ */
+#define EXT2_DEF_RESUID 0
+#define EXT2_DEF_RESGID 0
+
+/*
+ * Default mount options
+ */
+#define EXT2_DEFM_DEBUG 0x0001
+#define EXT2_DEFM_BSDGROUPS 0x0002
+#define EXT2_DEFM_XATTR_USER 0x0004
+#define EXT2_DEFM_ACL 0x0008
+#define EXT2_DEFM_UID16 0x0010
+#define EXT3_DEFM_JMODE 0x0060
+#define EXT3_DEFM_JMODE_DATA 0x0020
+#define EXT3_DEFM_JMODE_ORDERED 0x0040
+#define EXT3_DEFM_JMODE_WBACK 0x0060
+#define EXT4_DEFM_NOBARRIER 0x0100
+#define EXT4_DEFM_BLOCK_VALIDITY 0x0200
+#define EXT4_DEFM_DISCARD 0x0400
+#define EXT4_DEFM_NODELALLOC 0x0800
+
+static inline int ext4_hash_in_dirent(const struct ext2_inode *inode)
+{
+ return (inode->i_flags & EXT4_ENCRYPT_FL) &&
+ (inode->i_flags & EXT4_CASEFOLD_FL);
+}
+
+/*
+ * Structure of a directory entry
+ */
+#define EXT2_NAME_LEN 255
+
+struct ext2_dir_entry {
+ __u32 inode; /* Inode number */
+ __u16 rec_len; /* Directory entry length */
+ __u16 name_len; /* Name length */
+ char name[EXT2_NAME_LEN]; /* File name */
+};
+
+/*
+ * The new version of the directory entry. Since EXT2 structures are
+ * stored in intel byte order, and the name_len field could never be
+ * bigger than 255 chars, it's safe to reclaim the extra byte for the
+ * file_type field.
+ *
+ * This structure is deprecated due to endian issues. Please use struct
+ * ext2_dir_entry and accessor functions
+ * ext2fs_dirent_name_len
+ * ext2fs_dirent_set_name_len
+ * ext2fs_dirent_file_type
+ * ext2fs_dirent_set_file_type
+ * to get and set name_len and file_type fields.
+ */
+struct ext2_dir_entry_2 {
+ __u32 inode; /* Inode number */
+ __u16 rec_len; /* Directory entry length */
+ __u8 name_len; /* Name length */
+ __u8 file_type;
+ char name[EXT2_NAME_LEN]; /* File name */
+};
+
+/*
+ * Hashes for ext4_dir_entry for casefolded and ecrypted directories.
+ * This is located at the first 4 bit aligned location after the name.
+ */
+
+struct ext2_dir_entry_hash {
+ __le32 hash;
+ __le32 minor_hash;
+};
+
+#define EXT2_DIRENT_HASHES(entry) \
+ ((struct ext2_dir_entry_hash *) &entry->name[\
+ (ext2fs_dirent_name_len(entry) + \
+ EXT2_DIR_ROUND) & ~EXT2_DIR_ROUND])
+#define EXT2_DIRENT_HASH(entry) \
+ ext2fs_le32_to_cpu(EXT2_DIRENT_HASHES(entry)->hash)
+#define EXT2_DIRENT_MINOR_HASH(entry) \
+ ext2fs_le32_to_cpu(EXT2_DIRENT_HASHES(entry)->minor_hash)
+
+/*
+ * This is a bogus directory entry at the end of each leaf block that
+ * records checksums.
+ */
+struct ext2_dir_entry_tail {
+ __u32 det_reserved_zero1; /* Pretend to be unused */
+ __u16 det_rec_len; /* 12 */
+ __u16 det_reserved_name_len; /* 0xDE00, fake namelen/filetype */
+ __u32 det_checksum; /* crc32c(uuid+inode+dirent) */
+};
+
+/*
+ * Ext2 directory file types. Only the low 3 bits are used. The
+ * other bits are reserved for now.
+ */
+#define EXT2_FT_UNKNOWN 0
+#define EXT2_FT_REG_FILE 1
+#define EXT2_FT_DIR 2
+#define EXT2_FT_CHRDEV 3
+#define EXT2_FT_BLKDEV 4
+#define EXT2_FT_FIFO 5
+#define EXT2_FT_SOCK 6
+#define EXT2_FT_SYMLINK 7
+
+#define EXT2_FT_MAX 8
+
+/*
+ * Annoyingly, e2fsprogs always swab16s ext2_dir_entry.name_len, so we
+ * have to build ext2_dir_entry_tail with that assumption too. This
+ * constant helps to build the dir_entry_tail to look like it has an
+ * "invalid" file type.
+ */
+#define EXT2_DIR_NAME_LEN_CSUM 0xDE00
+
+/*
+ * EXT2_DIR_PAD defines the directory entries boundaries
+ *
+ * NOTE: It must be a multiple of 4
+ */
+#define EXT2_DIR_ENTRY_HEADER_LEN 8
+#define EXT2_DIR_ENTRY_HASH_LEN 8
+#define EXT2_DIR_PAD 4
+#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
+#define EXT2_DIR_REC_LEN(name_len) ext2fs_dir_rec_len(name_len, 0)
+
+static inline unsigned int ext2fs_dir_rec_len(__u8 name_len,
+ int extended)
+{
+ int rec_len = (name_len + EXT2_DIR_ENTRY_HEADER_LEN + EXT2_DIR_ROUND);
+
+ rec_len &= ~EXT2_DIR_ROUND;
+ if (extended)
+ rec_len += EXT2_DIR_ENTRY_HASH_LEN;
+ return rec_len;
+}
+
+#define EXT4_ORPHAN_BLOCK_MAGIC 0x0b10ca04
+
+/* Structure at the tail of orphan block */
+struct ext4_orphan_block_tail {
+ __u32 ob_magic;
+ __u32 ob_checksum;
+};
+
+/*
+ * Constants for ext4's extended time encoding
+ */
+#define EXT4_EPOCH_BITS 2
+#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1)
+#define EXT4_NSEC_MASK (~0UL << EXT4_EPOCH_BITS)
+
+/*
+ * This structure is used for multiple mount protection. It is written
+ * into the block number saved in the s_mmp_block field in the superblock.
+ * Programs that check MMP should assume that if SEQ_FSCK (or any unknown
+ * code above SEQ_MAX) is present then it is NOT safe to use the filesystem,
+ * regardless of how old the timestamp is.
+ *
+ * The timestamp in the MMP structure will be updated by e2fsck at some
+ * arbitrary intervals (start of passes, after every few groups of inodes
+ * in pass1 and pass1b). There is no guarantee that e2fsck is updating
+ * the MMP block in a timely manner, and the updates it does are purely
+ * for the convenience of the sysadmin and not for automatic validation.
+ *
+ * Note: Only the mmp_seq value is used to determine whether the MMP block
+ * is being updated. The mmp_time, mmp_nodename, and mmp_bdevname
+ * fields are only for informational purposes for the administrator,
+ * due to clock skew between nodes and hostname HA service takeover.
+ */
+#define EXT4_MMP_MAGIC 0x004D4D50U /* ASCII for MMP */
+#define EXT4_MMP_SEQ_CLEAN 0xFF4D4D50U /* mmp_seq value for clean unmount */
+#define EXT4_MMP_SEQ_FSCK 0xE24D4D50U /* mmp_seq value when being fscked */
+#define EXT4_MMP_SEQ_MAX 0xE24D4D4FU /* maximum valid mmp_seq value */
+
+/* Not endian-annotated; it's swapped at read/write time */
+struct mmp_struct {
+ __u32 mmp_magic; /* Magic number for MMP */
+ __u32 mmp_seq; /* Sequence no. updated periodically */
+ __u64 mmp_time; /* Time last updated (seconds) */
+ __u8 mmp_nodename[64] __nonstring; /* Node updating MMP block, no NUL? */
+ __u8 mmp_bdevname[32] __nonstring; /* Bdev updating MMP block, no NUL? */
+ __u16 mmp_check_interval; /* Changed mmp_check_interval */
+ __u16 mmp_pad1;
+ __u32 mmp_pad2[226];
+ __u32 mmp_checksum; /* crc32c(uuid+mmp_block) */
+};
+
+/*
+ * Default interval for MMP update in seconds.
+ */
+#define EXT4_MMP_UPDATE_INTERVAL 5
+
+/*
+ * Maximum interval for MMP update in seconds.
+ */
+#define EXT4_MMP_MAX_UPDATE_INTERVAL 300
+
+/*
+ * Minimum interval for MMP checking in seconds.
+ */
+#define EXT4_MMP_MIN_CHECK_INTERVAL 5
+
+/*
+ * Minimum size of inline data.
+ */
+#define EXT4_MIN_INLINE_DATA_SIZE ((sizeof(__u32) * EXT2_N_BLOCKS))
+
+/*
+ * Size of a parent inode in inline data directory.
+ */
+#define EXT4_INLINE_DATA_DOTDOT_SIZE (4)
+
+#define EXT4_ENC_UTF8_12_1 1
+
+#define EXT4_ENC_STRICT_MODE_FL (1 << 0) /* Reject invalid sequences */
+
+#endif /* _LINUX_EXT2_FS_H */
diff --git a/lib/ext2fs/ext2_io.h b/lib/ext2fs/ext2_io.h
new file mode 100644
index 0000000..679184e
--- /dev/null
+++ b/lib/ext2fs/ext2_io.h
@@ -0,0 +1,179 @@
+/*
+ * io.h --- the I/O manager abstraction
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _EXT2FS_EXT2_IO_H
+#define _EXT2FS_EXT2_IO_H
+
+#include <ext2fs/ext2_types.h>
+
+/*
+ * ext2_loff_t is defined here since unix_io.c needs it.
+ */
+#if defined(__GNUC__) || defined(HAS_LONG_LONG)
+typedef long long ext2_loff_t;
+#else
+typedef long ext2_loff_t;
+#endif
+
+/* llseek.c */
+ext2_loff_t ext2fs_llseek (int, ext2_loff_t, int);
+
+typedef struct struct_io_manager *io_manager;
+typedef struct struct_io_channel *io_channel;
+typedef struct struct_io_stats *io_stats;
+
+#define CHANNEL_FLAGS_WRITETHROUGH 0x01
+#define CHANNEL_FLAGS_DISCARD_ZEROES 0x02
+#define CHANNEL_FLAGS_BLOCK_DEVICE 0x04
+#define CHANNEL_FLAGS_THREADS 0x08
+
+#define io_channel_discard_zeroes_data(i) (i->flags & CHANNEL_FLAGS_DISCARD_ZEROES)
+
+struct struct_io_channel {
+ errcode_t magic;
+ io_manager manager;
+ char *name;
+ int block_size;
+ errcode_t (*read_error)(io_channel channel,
+ unsigned long block,
+ int count,
+ void *data,
+ size_t size,
+ int actual_bytes_read,
+ errcode_t error);
+ errcode_t (*write_error)(io_channel channel,
+ unsigned long block,
+ int count,
+ const void *data,
+ size_t size,
+ int actual_bytes_written,
+ errcode_t error);
+ int refcount;
+ int flags;
+ long reserved[14];
+ void *private_data;
+ void *app_data;
+ int align;
+};
+
+struct struct_io_stats {
+ int num_fields;
+ int reserved;
+ unsigned long long bytes_read;
+ unsigned long long bytes_written;
+};
+
+struct struct_io_manager {
+ errcode_t magic;
+ const char *name;
+ errcode_t (*open)(const char *name, int flags, io_channel *channel);
+ errcode_t (*close)(io_channel channel);
+ errcode_t (*set_blksize)(io_channel channel, int blksize);
+ errcode_t (*read_blk)(io_channel channel, unsigned long block,
+ int count, void *data);
+ errcode_t (*write_blk)(io_channel channel, unsigned long block,
+ int count, const void *data);
+ errcode_t (*flush)(io_channel channel);
+ errcode_t (*write_byte)(io_channel channel, unsigned long offset,
+ int count, const void *data);
+ errcode_t (*set_option)(io_channel channel, const char *option,
+ const char *arg);
+ errcode_t (*get_stats)(io_channel channel, io_stats *io_stats);
+ errcode_t (*read_blk64)(io_channel channel, unsigned long long block,
+ int count, void *data);
+ errcode_t (*write_blk64)(io_channel channel, unsigned long long block,
+ int count, const void *data);
+ errcode_t (*discard)(io_channel channel, unsigned long long block,
+ unsigned long long count);
+ errcode_t (*cache_readahead)(io_channel channel,
+ unsigned long long block,
+ unsigned long long count);
+ errcode_t (*zeroout)(io_channel channel, unsigned long long block,
+ unsigned long long count);
+ long reserved[14];
+};
+
+#define IO_FLAG_RW 0x0001
+#define IO_FLAG_EXCLUSIVE 0x0002
+#define IO_FLAG_DIRECT_IO 0x0004
+#define IO_FLAG_FORCE_BOUNCE 0x0008
+#define IO_FLAG_THREADS 0x0010
+#define IO_FLAG_NOCACHE 0x0020
+
+/*
+ * Convenience functions....
+ */
+#define io_channel_close(c) ((c)->manager->close((c)))
+#define io_channel_set_blksize(c,s) ((c)->manager->set_blksize((c),s))
+#define io_channel_read_blk(c,b,n,d) ((c)->manager->read_blk((c),b,n,d))
+#define io_channel_write_blk(c,b,n,d) ((c)->manager->write_blk((c),b,n,d))
+#define io_channel_flush(c) ((c)->manager->flush((c)))
+#define io_channel_bumpcount(c) ((c)->refcount++)
+
+/* io_manager.c */
+extern errcode_t io_channel_set_options(io_channel channel,
+ const char *options);
+extern errcode_t io_channel_write_byte(io_channel channel,
+ unsigned long offset,
+ int count, const void *data);
+extern errcode_t io_channel_read_blk64(io_channel channel,
+ unsigned long long block,
+ int count, void *data);
+extern errcode_t io_channel_write_blk64(io_channel channel,
+ unsigned long long block,
+ int count, const void *data);
+extern errcode_t io_channel_discard(io_channel channel,
+ unsigned long long block,
+ unsigned long long count);
+extern errcode_t io_channel_zeroout(io_channel channel,
+ unsigned long long block,
+ unsigned long long count);
+extern errcode_t io_channel_alloc_buf(io_channel channel,
+ int count, void *ptr);
+extern errcode_t io_channel_cache_readahead(io_channel io,
+ unsigned long long block,
+ unsigned long long count);
+
+#ifdef _WIN32
+/* windows_io.c */
+extern io_manager windows_io_manager;
+#define default_io_manager windows_io_manager
+#else
+/* unix_io.c */
+extern io_manager unix_io_manager;
+extern io_manager unixfd_io_manager;
+#define default_io_manager unix_io_manager
+#endif
+
+/* sparse_io.c */
+extern io_manager sparse_io_manager;
+extern io_manager sparsefd_io_manager;
+
+/* undo_io.c */
+extern io_manager undo_io_manager;
+extern errcode_t set_undo_io_backing_manager(io_manager manager);
+extern errcode_t set_undo_io_backup_file(char *file_name);
+
+/* test_io.c */
+extern io_manager test_io_manager, test_io_backing_manager;
+extern void (*test_io_cb_read_blk)
+ (unsigned long block, int count, errcode_t err);
+extern void (*test_io_cb_write_blk)
+ (unsigned long block, int count, errcode_t err);
+extern void (*test_io_cb_read_blk64)
+ (unsigned long long block, int count, errcode_t err);
+extern void (*test_io_cb_write_blk64)
+ (unsigned long long block, int count, errcode_t err);
+extern void (*test_io_cb_set_blksize)
+ (int blksize, errcode_t err);
+
+#endif /* _EXT2FS_EXT2_IO_H */
+
diff --git a/lib/ext2fs/ext2_types.h.in b/lib/ext2fs/ext2_types.h.in
new file mode 100644
index 0000000..98cc65b
--- /dev/null
+++ b/lib/ext2fs/ext2_types.h.in
@@ -0,0 +1,196 @@
+/*
+ * If linux/types.h is already been included, assume it has defined
+ * everything we need. (cross fingers) Other header files may have
+ * also defined the types that we need.
+ */
+#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
+ !defined(_EXT2_TYPES_H))
+#define _EXT2_TYPES_H
+
+@ASM_TYPES_HEADER@
+
+#ifndef HAVE___U8
+#define HAVE___U8
+#ifdef __U8_TYPEDEF
+typedef __U8_TYPEDEF __u8;
+#else
+typedef unsigned char __u8;
+#endif
+#endif /* HAVE___U8 */
+
+#ifndef HAVE___S8
+#define HAVE___S8
+#ifdef __S8_TYPEDEF
+typedef __S8_TYPEDEF __s8;
+#else
+typedef signed char __s8;
+#endif
+#endif /* HAVE___S8 */
+
+#ifndef HAVE___U16
+#define HAVE___U16
+#ifdef __U16_TYPEDEF
+typedef __U16_TYPEDEF __u16;
+#else
+#if (@SIZEOF_INT@ == 2)
+typedef unsigned int __u16;
+#else
+#if (@SIZEOF_SHORT@ == 2)
+typedef unsigned short __u16;
+#else
+#undef HAVE___U16
+ ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __U16_TYPEDEF */
+#endif /* HAVE___U16 */
+
+#ifndef HAVE___S16
+#define HAVE___S16
+#ifdef __S16_TYPEDEF
+typedef __S16_TYPEDEF __s16;
+#else
+#if (@SIZEOF_INT@ == 2)
+typedef int __s16;
+#else
+#if (@SIZEOF_SHORT@ == 2)
+typedef short __s16;
+#else
+#undef HAVE___S16
+ ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __S16_TYPEDEF */
+#endif /* HAVE___S16 */
+
+#ifndef HAVE___U32
+#define HAVE___U32
+#ifdef __U32_TYPEDEF
+typedef __U32_TYPEDEF __u32;
+#else
+#if (@SIZEOF_INT@ == 4)
+typedef unsigned int __u32;
+#else
+#if (@SIZEOF_LONG@ == 4)
+typedef unsigned long __u32;
+#else
+#if (@SIZEOF_SHORT@ == 4)
+typedef unsigned short __u32;
+#else
+#undef HAVE___U32
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __U32_TYPEDEF */
+#endif /* HAVE___U32 */
+
+#ifndef HAVE___S32
+#define HAVE___S32
+#ifdef __S32_TYPEDEF
+typedef __S32_TYPEDEF __s32;
+#else
+#if (@SIZEOF_INT@ == 4)
+typedef int __s32;
+#else
+#if (@SIZEOF_LONG@ == 4)
+typedef long __s32;
+#else
+#if (@SIZEOF_SHORT@ == 4)
+typedef short __s32;
+#else
+#undef HAVE___S32
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __S32_TYPEDEF */
+#endif /* HAVE___S32 */
+
+#ifndef HAVE___U64
+#define HAVE___U64
+#ifdef __U64_TYPEDEF
+typedef __U64_TYPEDEF __u64;
+#else
+#if (@SIZEOF_INT@ == 8)
+typedef unsigned int __u64;
+#else
+#if (@SIZEOF_LONG_LONG@ == 8)
+typedef unsigned long long __u64;
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef unsigned long __u64;
+#else
+#undef HAVE___U64
+ ?== error: undefined 64 bit type
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __U64_TYPEDEF */
+#endif /* HAVE___U64 */
+
+#ifndef HAVE___S64
+#define HAVE___S64
+#ifdef __S64_TYPEDEF
+typedef __S64_TYPEDEF __s64;
+#else
+#if (@SIZEOF_INT@ == 8)
+typedef int __s64;
+#else
+#if (@SIZEOF_LONG_LONG@ == 8)
+#if defined(__GNUC__)
+typedef __signed__ long long __s64;
+#else
+typedef signed long long __s64;
+#endif /* __GNUC__ */
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef long __s64;
+#else
+#undef HAVE___S64
+ ?== error: undefined 64 bit type
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __S64_TYPEDEF */
+#endif /* HAVE___S64 */
+
+#undef __S8_TYPEDEF
+#undef __U8_TYPEDEF
+#undef __S16_TYPEDEF
+#undef __U16_TYPEDEF
+#undef __S32_TYPEDEF
+#undef __U32_TYPEDEF
+#undef __S64_TYPEDEF
+#undef __U64_TYPEDEF
+
+#endif /* _*_TYPES_H */
+
+#include <stdint.h>
+
+/* endian checking stuff */
+#ifndef EXT2_ENDIAN_H_
+#define EXT2_ENDIAN_H_
+
+#ifdef __CHECKER__
+# ifndef __bitwise
+# define __bitwise __attribute__((bitwise))
+# endif
+#define __force __attribute__((force))
+#else
+# ifndef __bitwise
+# define __bitwise
+# endif
+#define __force
+#endif
+
+typedef __u16 __bitwise __le16;
+typedef __u32 __bitwise __le32;
+typedef __u64 __bitwise __le64;
+typedef __u16 __bitwise __be16;
+typedef __u32 __bitwise __be32;
+typedef __u64 __bitwise __be64;
+
+#endif /* EXT2_ENDIAN_H_ */
+
+@PUBLIC_CONFIG_HEADER@
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
new file mode 100644
index 0000000..72c60d2
--- /dev/null
+++ b/lib/ext2fs/ext2fs.h
@@ -0,0 +1,2224 @@
+/*
+ * ext2fs.h --- ext2fs
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _EXT2FS_EXT2FS_H
+#define _EXT2FS_EXT2FS_H
+
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
+#ifndef __nonstring
+#ifdef __has_attribute
+#if __has_attribute(__nonstring__)
+#define __nonstring __attribute__((__nonstring__))
+#else
+#define __nonstring
+#endif /* __has_attribute(__nonstring__) */
+#else
+# define __nonstring
+#endif /* __has_attribute */
+#endif /* __nonstring */
+
+#ifdef CONFIG_TDB
+#define EXT2FS_NO_TDB_UNUSED
+#else
+#define EXT2FS_NO_TDB_UNUSED EXT2FS_ATTR((unused))
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Non-GNU C compilers won't necessarily understand inline
+ */
+#if (!defined(__GNUC__) && !defined(__WATCOMC__))
+#define NO_INLINE_FUNCS
+#endif
+
+/*
+ * Where the master copy of the superblock is located, and how big
+ * superblocks are supposed to be. We define SUPERBLOCK_SIZE because
+ * the size of the superblock structure is not necessarily trustworthy
+ * (some versions have the padding set up so that the superblock is
+ * 1032 bytes long).
+ */
+#define SUPERBLOCK_OFFSET 1024
+#define SUPERBLOCK_SIZE 1024
+
+#define UUID_STR_SIZE 37
+
+/*
+ * The last ext2fs revision level that this version of the library is
+ * able to support.
+ */
+#define EXT2_LIB_CURRENT_REV EXT2_DYNAMIC_REV
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+
+#if EXT2_FLAT_INCLUDES
+#include "e2_types.h"
+#include "ext2_fs.h"
+#include "ext3_extents.h"
+#else
+#include <ext2fs/ext2_types.h>
+#include <ext2fs/ext2_fs.h>
+#include <ext2fs/ext3_extents.h>
+#endif /* EXT2_FLAT_INCLUDES */
+
+typedef __u32 __bitwise ext2_ino_t;
+typedef __u32 __bitwise blk_t;
+typedef __u64 __bitwise blk64_t;
+typedef __u32 __bitwise dgrp_t;
+typedef __s32 __bitwise ext2_off_t;
+typedef __s64 __bitwise ext2_off64_t;
+typedef __s64 __bitwise e2_blkcnt_t;
+typedef __u32 __bitwise ext2_dirhash_t;
+
+#if EXT2_FLAT_INCLUDES
+#include "com_err.h"
+#include "ext2_io.h"
+#include "ext2_err.h"
+#include "ext2_ext_attr.h"
+#else
+#include <et/com_err.h>
+#include <ext2fs/ext2_io.h>
+#include <ext2fs/ext2_err.h>
+#include <ext2fs/ext2_ext_attr.h>
+#endif
+
+#include "hashmap.h"
+
+/*
+ * Portability help for Microsoft Visual C++
+ */
+#ifdef _MSC_VER
+#define EXT2_QSORT_TYPE int __cdecl
+#else
+#define EXT2_QSORT_TYPE int
+#endif
+
+typedef struct struct_ext2_filsys *ext2_filsys;
+
+#define EXT2FS_MARK_ERROR 0
+#define EXT2FS_UNMARK_ERROR 1
+#define EXT2FS_TEST_ERROR 2
+
+struct ext2fs_struct_generic_bitmap_base {
+ errcode_t magic;
+ ext2_filsys fs;
+};
+
+typedef struct ext2fs_struct_generic_bitmap_base *ext2fs_generic_bitmap;
+typedef struct ext2fs_struct_generic_bitmap_base *ext2fs_inode_bitmap;
+typedef struct ext2fs_struct_generic_bitmap_base *ext2fs_block_bitmap;
+
+#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO(s)
+
+
+/*
+ * Badblocks list definitions
+ */
+
+typedef struct ext2_struct_u32_list *ext2_badblocks_list;
+typedef struct ext2_struct_u32_iterate *ext2_badblocks_iterate;
+
+typedef struct ext2_struct_u32_list *ext2_u32_list;
+typedef struct ext2_struct_u32_iterate *ext2_u32_iterate;
+
+/* old */
+typedef struct ext2_struct_u32_list *badblocks_list;
+typedef struct ext2_struct_u32_iterate *badblocks_iterate;
+
+#define BADBLOCKS_FLAG_DIRTY 1
+
+/*
+ * ext2_dblist structure and abstractions (see dblist.c)
+ */
+struct ext2_db_entry2 {
+ ext2_ino_t ino;
+ blk64_t blk;
+ e2_blkcnt_t blockcnt;
+};
+
+/* Ye Olde 32-bit version */
+struct ext2_db_entry {
+ ext2_ino_t ino;
+ blk_t blk;
+ int blockcnt;
+};
+
+typedef struct ext2_struct_dblist *ext2_dblist;
+
+#define DBLIST_ABORT 1
+
+/*
+ * ext2_fileio definitions
+ */
+
+#define EXT2_FILE_WRITE 0x0001
+#define EXT2_FILE_CREATE 0x0002
+
+#define EXT2_FILE_MASK 0x00FF
+
+#define EXT2_FILE_BUF_DIRTY 0x4000
+#define EXT2_FILE_BUF_VALID 0x2000
+
+typedef struct ext2_file *ext2_file_t;
+
+#define EXT2_SEEK_SET 0
+#define EXT2_SEEK_CUR 1
+#define EXT2_SEEK_END 2
+
+/*
+ * Flags for the ext2_filsys structure and for ext2fs_open()
+ */
+#define EXT2_FLAG_RW 0x01
+#define EXT2_FLAG_CHANGED 0x02
+#define EXT2_FLAG_DIRTY 0x04
+#define EXT2_FLAG_VALID 0x08
+#define EXT2_FLAG_IB_DIRTY 0x10
+#define EXT2_FLAG_BB_DIRTY 0x20
+#define EXT2_FLAG_SWAP_BYTES 0x40
+#define EXT2_FLAG_SWAP_BYTES_READ 0x80
+#define EXT2_FLAG_SWAP_BYTES_WRITE 0x100
+#define EXT2_FLAG_MASTER_SB_ONLY 0x200
+#define EXT2_FLAG_FORCE 0x400
+#define EXT2_FLAG_SUPER_ONLY 0x800
+#define EXT2_FLAG_JOURNAL_DEV_OK 0x1000
+#define EXT2_FLAG_IMAGE_FILE 0x2000
+#define EXT2_FLAG_EXCLUSIVE 0x4000
+#define EXT2_FLAG_SOFTSUPP_FEATURES 0x8000
+#define EXT2_FLAG_NOFREE_ON_ERROR 0x10000
+#define EXT2_FLAG_64BITS 0x20000
+#define EXT2_FLAG_PRINT_PROGRESS 0x40000
+#define EXT2_FLAG_DIRECT_IO 0x80000
+#define EXT2_FLAG_SKIP_MMP 0x100000
+#define EXT2_FLAG_IGNORE_CSUM_ERRORS 0x200000
+#define EXT2_FLAG_SHARE_DUP 0x400000
+#define EXT2_FLAG_IGNORE_SB_ERRORS 0x800000
+#define EXT2_FLAG_BBITMAP_TAIL_PROBLEM 0x1000000
+#define EXT2_FLAG_IBITMAP_TAIL_PROBLEM 0x2000000
+#define EXT2_FLAG_THREADS 0x4000000
+#define EXT2_FLAG_IGNORE_SWAP_DIRENT 0x8000000
+
+/*
+ * Special flag in the ext2 inode i_flag field that means that this is
+ * a new inode. (So that ext2_write_inode() can clear extra fields.)
+ */
+#define EXT2_NEW_INODE_FL 0x80000000
+
+/*
+ * Flags for mkjournal
+ */
+#define EXT2_MKJOURNAL_V1_SUPER 0x0000001 /* create V1 superblock (deprecated) */
+#define EXT2_MKJOURNAL_LAZYINIT 0x0000002 /* don't zero journal inode before use*/
+#define EXT2_MKJOURNAL_NO_MNT_CHECK 0x0000004 /* don't check mount status */
+
+/*
+ * Normal journal area size to fast commit area size ratio. This is used to
+ * set default size of fast commit area.
+ */
+#define EXT2_JOURNAL_TO_FC_BLKS_RATIO 64
+
+struct blk_alloc_ctx;
+struct opaque_ext2_group_desc;
+
+struct struct_ext2_filsys {
+ errcode_t magic;
+ io_channel io;
+ int flags;
+ char * device_name;
+ struct ext2_super_block * super;
+ unsigned int blocksize;
+ int fragsize;
+ dgrp_t group_desc_count;
+ unsigned long desc_blocks;
+ struct opaque_ext2_group_desc * group_desc;
+ unsigned int inode_blocks_per_group;
+ ext2fs_inode_bitmap inode_map;
+ ext2fs_block_bitmap block_map;
+ /* XXX FIXME-64: not 64-bit safe, but not used? */
+ errcode_t (*get_blocks)(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks);
+ errcode_t (*check_directory)(ext2_filsys fs, ext2_ino_t ino);
+ errcode_t (*write_bitmaps)(ext2_filsys fs);
+ errcode_t (*read_inode)(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode);
+ errcode_t (*write_inode)(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode);
+ ext2_badblocks_list badblocks;
+ ext2_dblist dblist;
+ __u32 stride; /* for mke2fs */
+ struct ext2_super_block * orig_super;
+ struct ext2_image_hdr * image_header;
+ __u32 umask;
+ time_t now;
+ int cluster_ratio_bits;
+ __u16 default_bitmap_type;
+ __u16 pad;
+ /*
+ * Reserved for future expansion
+ */
+ __u32 reserved[5];
+
+ /*
+ * Reserved for the use of the calling application.
+ */
+ void * priv_data;
+
+ /*
+ * Inode cache
+ */
+ struct ext2_inode_cache *icache;
+ io_channel image_io;
+
+ /*
+ * More callback functions
+ */
+ errcode_t (*get_alloc_block)(ext2_filsys fs, blk64_t goal,
+ blk64_t *ret);
+ errcode_t (*get_alloc_block2)(ext2_filsys fs, blk64_t goal,
+ blk64_t *ret, struct blk_alloc_ctx *ctx);
+ void (*block_alloc_stats)(ext2_filsys fs, blk64_t blk, int inuse);
+
+ /*
+ * Buffers for Multiple mount protection(MMP) block.
+ */
+ void *mmp_buf;
+ void *mmp_cmp;
+ int mmp_fd;
+
+ /*
+ * Time at which e2fsck last updated the MMP block.
+ */
+ long mmp_last_written;
+
+ /* progress operation functions */
+ struct ext2fs_progress_ops *progress_ops;
+
+ /* Precomputed FS UUID checksum for seeding other checksums */
+ __u32 csum_seed;
+
+ io_channel journal_io;
+ char *journal_name;
+
+ /* New block range allocation hooks */
+ errcode_t (*new_range)(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, blk64_t *pblk, blk64_t *plen);
+ void (*block_alloc_stats_range)(ext2_filsys fs, blk64_t blk, blk_t num,
+ int inuse);
+
+ /* hashmap for SHA of data blocks */
+ struct ext2fs_hashmap* block_sha_map;
+
+ const struct ext2fs_nls_table *encoding;
+};
+
+#if EXT2_FLAT_INCLUDES
+#include "e2_bitops.h"
+#else
+#include <ext2fs/bitops.h>
+#endif
+
+/*
+ * 64-bit bitmap backend types
+ */
+#define EXT2FS_BMAP64_BITARRAY 1
+#define EXT2FS_BMAP64_RBTREE 2
+#define EXT2FS_BMAP64_AUTODIR 3
+
+/*
+ * Return flags for the block iterator functions
+ */
+#define BLOCK_CHANGED 1
+#define BLOCK_ABORT 2
+#define BLOCK_ERROR 4
+#define BLOCK_INLINE_DATA_CHANGED 8
+
+/*
+ * Block iterate flags
+ *
+ * BLOCK_FLAG_APPEND, or BLOCK_FLAG_HOLE, indicates that the iterator
+ * function should be called on blocks where the block number is zero.
+ * This is used by ext2fs_expand_dir() to be able to add a new block
+ * to an inode. It can also be used for programs that want to be able
+ * to deal with files that contain "holes".
+ *
+ * BLOCK_FLAG_DEPTH_TRAVERSE indicates that the iterator function for
+ * the indirect, doubly indirect, etc. blocks should be called after
+ * all of the blocks contained in the indirect blocks are processed.
+ * This is useful if you are going to be deallocating blocks from an
+ * inode.
+ *
+ * BLOCK_FLAG_DATA_ONLY indicates that the iterator function should be
+ * called for data blocks only.
+ *
+ * BLOCK_FLAG_READ_ONLY is a promise by the caller that it will not
+ * modify returned block number.
+ *
+ * BLOCK_FLAG_NO_LARGE is for internal use only. It informs
+ * ext2fs_block_iterate2 that large files won't be accepted.
+ */
+#define BLOCK_FLAG_APPEND 1
+#define BLOCK_FLAG_HOLE 1
+#define BLOCK_FLAG_DEPTH_TRAVERSE 2
+#define BLOCK_FLAG_DATA_ONLY 4
+#define BLOCK_FLAG_READ_ONLY 8
+
+#define BLOCK_FLAG_NO_LARGE 0x1000
+
+/*
+ * Magic "block count" return values for the block iterator function.
+ */
+#define BLOCK_COUNT_IND (-1)
+#define BLOCK_COUNT_DIND (-2)
+#define BLOCK_COUNT_TIND (-3)
+#define BLOCK_COUNT_TRANSLATOR (-4)
+
+#define BLOCK_ALLOC_UNKNOWN 0
+#define BLOCK_ALLOC_DATA 1
+#define BLOCK_ALLOC_METADATA 2
+
+struct blk_alloc_ctx {
+ ext2_ino_t ino;
+ struct ext2_inode *inode;
+ blk64_t lblk;
+ int flags;
+};
+
+#if 0
+/*
+ * Flags for ext2fs_move_blocks
+ */
+#define EXT2_BMOVE_GET_DBLIST 0x0001
+#define EXT2_BMOVE_DEBUG 0x0002
+#endif
+
+/*
+ * Generic (non-filesystem layout specific) extents structure
+ */
+
+#define EXT2_EXTENT_FLAGS_LEAF 0x0001
+#define EXT2_EXTENT_FLAGS_UNINIT 0x0002
+#define EXT2_EXTENT_FLAGS_SECOND_VISIT 0x0004
+
+struct ext2fs_extent {
+ blk64_t e_pblk; /* first physical block */
+ blk64_t e_lblk; /* first logical block extent covers */
+ __u32 e_len; /* number of blocks covered by extent */
+ __u32 e_flags; /* extent flags */
+};
+
+typedef struct ext2_extent_handle *ext2_extent_handle_t;
+typedef struct ext2_extent_path *ext2_extent_path_t;
+
+/*
+ * Flags used by ext2fs_extent_get()
+ */
+#define EXT2_EXTENT_CURRENT 0x0000
+#define EXT2_EXTENT_MOVE_MASK 0x000F
+#define EXT2_EXTENT_ROOT 0x0001
+#define EXT2_EXTENT_LAST_LEAF 0x0002
+#define EXT2_EXTENT_FIRST_SIB 0x0003
+#define EXT2_EXTENT_LAST_SIB 0x0004
+#define EXT2_EXTENT_NEXT_SIB 0x0005
+#define EXT2_EXTENT_PREV_SIB 0x0006
+#define EXT2_EXTENT_NEXT_LEAF 0x0007
+#define EXT2_EXTENT_PREV_LEAF 0x0008
+#define EXT2_EXTENT_NEXT 0x0009
+#define EXT2_EXTENT_PREV 0x000A
+#define EXT2_EXTENT_UP 0x000B
+#define EXT2_EXTENT_DOWN 0x000C
+#define EXT2_EXTENT_DOWN_AND_LAST 0x000D
+
+/*
+ * Flags used by ext2fs_extent_insert()
+ */
+#define EXT2_EXTENT_INSERT_AFTER 0x0001 /* insert after handle loc'n */
+#define EXT2_EXTENT_INSERT_NOSPLIT 0x0002 /* insert may not cause split */
+
+/*
+ * Flags used by ext2fs_extent_delete()
+ */
+#define EXT2_EXTENT_DELETE_KEEP_EMPTY 0x001 /* keep node if last extent gone */
+
+/*
+ * Flags used by ext2fs_extent_set_bmap()
+ */
+#define EXT2_EXTENT_SET_BMAP_UNINIT 0x0001
+
+/*
+ * Data structure returned by ext2fs_extent_get_info()
+ */
+struct ext2_extent_info {
+ int curr_entry;
+ int curr_level;
+ int num_entries;
+ int max_entries;
+ int max_depth;
+ int bytes_avail;
+ blk64_t max_lblk;
+ blk64_t max_pblk;
+ __u32 max_len;
+ __u32 max_uninit_len;
+};
+
+/*
+ * Flags for directory block reading and writing functions
+ */
+#define EXT2_DIRBLOCK_V2_STRUCT 0x0001
+
+/*
+ * Return flags for the directory iterator functions
+ */
+#define DIRENT_CHANGED 1
+#define DIRENT_ABORT 2
+#define DIRENT_ERROR 3
+
+/*
+ * Directory iterator flags
+ */
+
+#define DIRENT_FLAG_INCLUDE_EMPTY 1
+#define DIRENT_FLAG_INCLUDE_REMOVED 2
+#define DIRENT_FLAG_INCLUDE_CSUM 4
+#define DIRENT_FLAG_INCLUDE_INLINE_DATA 8
+
+#define DIRENT_DOT_FILE 1
+#define DIRENT_DOT_DOT_FILE 2
+#define DIRENT_OTHER_FILE 3
+#define DIRENT_DELETED_FILE 4
+#define DIRENT_CHECKSUM 5
+
+/*
+ * Inode scan definitions
+ */
+typedef struct ext2_struct_inode_scan *ext2_inode_scan;
+
+/*
+ * ext2fs_scan flags
+ */
+#define EXT2_SF_CHK_BADBLOCKS 0x0001
+#define EXT2_SF_BAD_INODE_BLK 0x0002
+#define EXT2_SF_BAD_EXTRA_BYTES 0x0004
+#define EXT2_SF_SKIP_MISSING_ITABLE 0x0008
+#define EXT2_SF_DO_LAZY 0x0010
+#define EXT2_SF_WARN_GARBAGE_INODES 0x0020
+
+/*
+ * ext2fs_check_if_mounted flags
+ */
+#define EXT2_MF_MOUNTED 1
+#define EXT2_MF_ISROOT 2
+#define EXT2_MF_READONLY 4
+#define EXT2_MF_SWAP 8
+#define EXT2_MF_BUSY 16
+#define EXT2_MF_EXTFS 32
+
+/*
+ * Ext2/linux mode flags. We define them here so that we don't need
+ * to depend on the OS's sys/stat.h, since we may be compiling on a
+ * non-Linux system.
+ */
+#define LINUX_S_IFMT 00170000
+#define LINUX_S_IFSOCK 0140000
+#define LINUX_S_IFLNK 0120000
+#define LINUX_S_IFREG 0100000
+#define LINUX_S_IFBLK 0060000
+#define LINUX_S_IFDIR 0040000
+#define LINUX_S_IFCHR 0020000
+#define LINUX_S_IFIFO 0010000
+#define LINUX_S_ISUID 0004000
+#define LINUX_S_ISGID 0002000
+#define LINUX_S_ISVTX 0001000
+
+#define LINUX_S_IRWXU 00700
+#define LINUX_S_IRUSR 00400
+#define LINUX_S_IWUSR 00200
+#define LINUX_S_IXUSR 00100
+
+#define LINUX_S_IRWXG 00070
+#define LINUX_S_IRGRP 00040
+#define LINUX_S_IWGRP 00020
+#define LINUX_S_IXGRP 00010
+
+#define LINUX_S_IRWXO 00007
+#define LINUX_S_IROTH 00004
+#define LINUX_S_IWOTH 00002
+#define LINUX_S_IXOTH 00001
+
+#define LINUX_S_ISLNK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFLNK)
+#define LINUX_S_ISREG(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFREG)
+#define LINUX_S_ISDIR(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFDIR)
+#define LINUX_S_ISCHR(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFCHR)
+#define LINUX_S_ISBLK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFBLK)
+#define LINUX_S_ISFIFO(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFIFO)
+#define LINUX_S_ISSOCK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFSOCK)
+
+/*
+ * ext2 size of an inode
+ */
+#define EXT2_I_SIZE(i) ((i)->i_size | ((__u64) (i)->i_size_high << 32))
+
+/*
+ * ext2_icount_t abstraction
+ */
+#define EXT2_ICOUNT_OPT_INCREMENT 0x01
+#define EXT2_ICOUNT_OPT_FULLMAP 0x02
+
+typedef struct ext2_icount *ext2_icount_t;
+
+/*
+ * Flags for ext2fs_bmap
+ */
+#define BMAP_ALLOC 0x0001
+#define BMAP_SET 0x0002
+#define BMAP_UNINIT 0x0004
+#define BMAP_ZERO 0x0008
+
+/*
+ * Returned flags from ext2fs_bmap
+ */
+#define BMAP_RET_UNINIT 0x0001
+
+/*
+ * Flags for ext2fs_read_inode2
+ */
+#define READ_INODE_NOCSUM 0x0001
+
+/*
+ * Flags for ext2fs_write_inode2
+ */
+#define WRITE_INODE_NOCSUM 0x0001
+
+/*
+ * Flags for imager.c functions
+ */
+#define IMAGER_FLAG_INODEMAP 1
+#define IMAGER_FLAG_SPARSEWRITE 2
+
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+
+/*
+ * Features supported by this version of the library
+ */
+#define EXT2_LIB_FEATURE_COMPAT_SUPP (EXT2_FEATURE_COMPAT_DIR_PREALLOC|\
+ EXT2_FEATURE_COMPAT_IMAGIC_INODES|\
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL|\
+ EXT2_FEATURE_COMPAT_RESIZE_INODE|\
+ EXT2_FEATURE_COMPAT_DIR_INDEX|\
+ EXT2_FEATURE_COMPAT_EXT_ATTR|\
+ EXT4_FEATURE_COMPAT_SPARSE_SUPER2|\
+ EXT4_FEATURE_COMPAT_FAST_COMMIT|\
+ EXT4_FEATURE_COMPAT_STABLE_INODES|\
+ EXT4_FEATURE_COMPAT_ORPHAN_FILE)
+
+#ifdef CONFIG_MMP
+#define EXT4_LIB_INCOMPAT_MMP EXT4_FEATURE_INCOMPAT_MMP
+#else
+#define EXT4_LIB_INCOMPAT_MMP (0)
+#endif
+
+#define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\
+ EXT2_FEATURE_INCOMPAT_META_BG|\
+ EXT3_FEATURE_INCOMPAT_RECOVER|\
+ EXT3_FEATURE_INCOMPAT_EXTENTS|\
+ EXT4_FEATURE_INCOMPAT_FLEX_BG|\
+ EXT4_FEATURE_INCOMPAT_EA_INODE|\
+ EXT4_LIB_INCOMPAT_MMP|\
+ EXT4_FEATURE_INCOMPAT_64BIT|\
+ EXT4_FEATURE_INCOMPAT_INLINE_DATA|\
+ EXT4_FEATURE_INCOMPAT_ENCRYPT|\
+ EXT4_FEATURE_INCOMPAT_CASEFOLD|\
+ EXT4_FEATURE_INCOMPAT_CSUM_SEED|\
+ EXT4_FEATURE_INCOMPAT_LARGEDIR)
+
+#define EXT2_LIB_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\
+ EXT4_FEATURE_RO_COMPAT_HUGE_FILE|\
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE|\
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK|\
+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|\
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM|\
+ EXT4_FEATURE_RO_COMPAT_BIGALLOC|\
+ EXT4_FEATURE_RO_COMPAT_QUOTA|\
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM|\
+ EXT4_FEATURE_RO_COMPAT_READONLY |\
+ EXT4_FEATURE_RO_COMPAT_PROJECT |\
+ EXT4_FEATURE_RO_COMPAT_SHARED_BLOCKS |\
+ EXT4_FEATURE_RO_COMPAT_VERITY |\
+ EXT4_FEATURE_RO_COMPAT_ORPHAN_PRESENT)
+
+/*
+ * These features are only allowed if EXT2_FLAG_SOFTSUPP_FEATURES is passed
+ * to ext2fs_openfs()
+ */
+#define EXT2_LIB_SOFTSUPP_INCOMPAT (0)
+#define EXT2_LIB_SOFTSUPP_RO_COMPAT (EXT4_FEATURE_RO_COMPAT_REPLICA)
+
+
+/* Translate a block number to a cluster number */
+#define EXT2FS_CLUSTER_RATIO(fs) (1 << (fs)->cluster_ratio_bits)
+#define EXT2FS_CLUSTER_MASK(fs) (EXT2FS_CLUSTER_RATIO(fs) - 1)
+#define EXT2FS_B2C(fs, blk) ((blk) >> (fs)->cluster_ratio_bits)
+/* Translate a cluster number to a block number */
+#define EXT2FS_C2B(fs, cluster) ((cluster) << (fs)->cluster_ratio_bits)
+/* Translate # of blks to # of clusters */
+#define EXT2FS_NUM_B2C(fs, blks) (((blks) + EXT2FS_CLUSTER_MASK(fs)) >> \
+ (fs)->cluster_ratio_bits)
+
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+typedef struct stat64 ext2fs_struct_stat;
+#else
+typedef struct stat ext2fs_struct_stat;
+#endif
+
+/*
+ * For ext2fs_close2() and ext2fs_flush2(), this flag allows you to
+ * avoid the fsync call.
+ */
+#define EXT2_FLAG_FLUSH_NO_SYNC 1
+
+/*
+ * Modify and iterate extended attributes
+ */
+struct ext2_xattr_handle;
+#define XATTR_ABORT 1
+#define XATTR_CHANGED 2
+
+/*
+ * flags for ext2fs_rw_bitmaps()
+ */
+#define EXT2FS_BITMAPS_WRITE 0x0001
+#define EXT2FS_BITMAPS_BLOCK 0x0002
+#define EXT2FS_BITMAPS_INODE 0x0004
+#define EXT2FS_BITMAPS_VALID_FLAGS 0x0007
+
+/*
+ * function prototypes
+ */
+static inline int ext2fs_has_group_desc_csum(ext2_filsys fs)
+{
+ return ext2fs_has_feature_metadata_csum(fs->super) ||
+ ext2fs_has_feature_gdt_csum(fs->super);
+}
+
+/* The LARGE_FILE feature should be set if we have stored files 2GB+ in size */
+static inline int ext2fs_needs_large_file_feature(unsigned long long file_size)
+{
+ return file_size >= 0x80000000ULL;
+}
+
+/* alloc.c */
+extern void ext2fs_clear_block_uninit(ext2_filsys fs, dgrp_t group);
+extern errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir, int mode,
+ ext2fs_inode_bitmap map, ext2_ino_t *ret);
+extern errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal,
+ ext2fs_block_bitmap map, blk_t *ret);
+extern errcode_t ext2fs_new_block2(ext2_filsys fs, blk64_t goal,
+ ext2fs_block_bitmap map, blk64_t *ret);
+extern errcode_t ext2fs_new_block3(ext2_filsys fs, blk64_t goal,
+ ext2fs_block_bitmap map, blk64_t *ret,
+ struct blk_alloc_ctx *ctx);
+extern errcode_t ext2fs_get_free_blocks(ext2_filsys fs, blk_t start,
+ blk_t finish, int num,
+ ext2fs_block_bitmap map,
+ blk_t *ret);
+extern errcode_t ext2fs_get_free_blocks2(ext2_filsys fs, blk64_t start,
+ blk64_t finish, int num,
+ ext2fs_block_bitmap map,
+ blk64_t *ret);
+extern errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal,
+ char *block_buf, blk_t *ret);
+extern errcode_t ext2fs_alloc_block2(ext2_filsys fs, blk64_t goal,
+ char *block_buf, blk64_t *ret);
+extern errcode_t ext2fs_alloc_block3(ext2_filsys fs, blk64_t goal,
+ char *block_buf, blk64_t *ret,
+ struct blk_alloc_ctx *ctx);
+
+extern void ext2fs_set_alloc_block_callback(ext2_filsys fs,
+ errcode_t (*func)(ext2_filsys fs,
+ blk64_t goal,
+ blk64_t *ret),
+ errcode_t (**old)(ext2_filsys fs,
+ blk64_t goal,
+ blk64_t *ret));
+blk64_t ext2fs_find_inode_goal(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t lblk);
+extern void ext2fs_set_new_range_callback(ext2_filsys fs,
+ errcode_t (*func)(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, blk64_t *pblk, blk64_t *plen),
+ errcode_t (**old)(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, blk64_t *pblk, blk64_t *plen));
+extern void ext2fs_set_block_alloc_stats_range_callback(ext2_filsys fs,
+ void (*func)(ext2_filsys fs, blk64_t blk,
+ blk_t num, int inuse),
+ void (**old)(ext2_filsys fs, blk64_t blk,
+ blk_t num, int inuse));
+#define EXT2_NEWRANGE_FIXED_GOAL (0x1)
+#define EXT2_NEWRANGE_MIN_LENGTH (0x2)
+#define EXT2_NEWRANGE_ALL_FLAGS (0x3)
+errcode_t ext2fs_new_range(ext2_filsys fs, int flags, blk64_t goal,
+ blk64_t len, ext2fs_block_bitmap map, blk64_t *pblk,
+ blk64_t *plen);
+#define EXT2_ALLOCRANGE_FIXED_GOAL (0x1)
+#define EXT2_ALLOCRANGE_ZERO_BLOCKS (0x2)
+#define EXT2_ALLOCRANGE_ALL_FLAGS (0x3)
+errcode_t ext2fs_alloc_range(ext2_filsys fs, int flags, blk64_t goal,
+ blk_t len, blk64_t *ret);
+
+/* alloc_sb.c */
+extern int ext2fs_reserve_super_and_bgd(ext2_filsys fs,
+ dgrp_t group,
+ ext2fs_block_bitmap bmap);
+extern void ext2fs_set_block_alloc_stats_callback(ext2_filsys fs,
+ void (*func)(ext2_filsys fs,
+ blk64_t blk,
+ int inuse),
+ void (**old)(ext2_filsys fs,
+ blk64_t blk,
+ int inuse));
+
+/* alloc_stats.c */
+void ext2fs_inode_alloc_stats(ext2_filsys fs, ext2_ino_t ino, int inuse);
+void ext2fs_inode_alloc_stats2(ext2_filsys fs, ext2_ino_t ino,
+ int inuse, int isdir);
+void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse);
+void ext2fs_block_alloc_stats2(ext2_filsys fs, blk64_t blk, int inuse);
+void ext2fs_block_alloc_stats_range(ext2_filsys fs, blk64_t blk,
+ blk_t num, int inuse);
+
+/* alloc_tables.c */
+extern errcode_t ext2fs_allocate_tables(ext2_filsys fs);
+extern errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
+ ext2fs_block_bitmap bmap);
+
+/* badblocks.c */
+extern errcode_t ext2fs_u32_list_create(ext2_u32_list *ret, int size);
+extern errcode_t ext2fs_u32_list_add(ext2_u32_list bb, __u32 blk);
+extern int ext2fs_u32_list_find(ext2_u32_list bb, __u32 blk);
+extern int ext2fs_u32_list_test(ext2_u32_list bb, blk_t blk);
+extern errcode_t ext2fs_u32_list_iterate_begin(ext2_u32_list bb,
+ ext2_u32_iterate *ret);
+extern int ext2fs_u32_list_iterate(ext2_u32_iterate iter, blk_t *blk);
+extern void ext2fs_u32_list_iterate_end(ext2_u32_iterate iter);
+extern errcode_t ext2fs_u32_copy(ext2_u32_list src, ext2_u32_list *dest);
+extern int ext2fs_u32_list_equal(ext2_u32_list bb1, ext2_u32_list bb2);
+
+extern errcode_t ext2fs_badblocks_list_create(ext2_badblocks_list *ret,
+ int size);
+extern errcode_t ext2fs_badblocks_list_add(ext2_badblocks_list bb,
+ blk_t blk);
+extern int ext2fs_badblocks_list_test(ext2_badblocks_list bb,
+ blk_t blk);
+extern int ext2fs_u32_list_del(ext2_u32_list bb, __u32 blk);
+extern void ext2fs_badblocks_list_del(ext2_u32_list bb, __u32 blk);
+extern errcode_t
+ ext2fs_badblocks_list_iterate_begin(ext2_badblocks_list bb,
+ ext2_badblocks_iterate *ret);
+extern int ext2fs_badblocks_list_iterate(ext2_badblocks_iterate iter,
+ blk_t *blk);
+extern void ext2fs_badblocks_list_iterate_end(ext2_badblocks_iterate iter);
+extern errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src,
+ ext2_badblocks_list *dest);
+extern int ext2fs_badblocks_equal(ext2_badblocks_list bb1,
+ ext2_badblocks_list bb2);
+extern int ext2fs_u32_list_count(ext2_u32_list bb);
+
+/* bb_compat */
+extern errcode_t badblocks_list_create(badblocks_list *ret, int size);
+extern errcode_t badblocks_list_add(badblocks_list bb, blk_t blk);
+extern int badblocks_list_test(badblocks_list bb, blk_t blk);
+extern errcode_t badblocks_list_iterate_begin(badblocks_list bb,
+ badblocks_iterate *ret);
+extern int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk);
+extern void badblocks_list_iterate_end(badblocks_iterate iter);
+extern void badblocks_list_free(badblocks_list bb);
+
+/* bb_inode.c */
+extern errcode_t ext2fs_update_bb_inode(ext2_filsys fs,
+ ext2_badblocks_list bb_list);
+
+/* bitmaps.c */
+extern void ext2fs_free_block_bitmap(ext2fs_block_bitmap bitmap);
+extern void ext2fs_free_inode_bitmap(ext2fs_inode_bitmap bitmap);
+extern errcode_t ext2fs_copy_bitmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest);
+extern errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_block_bitmap *ret);
+extern errcode_t ext2fs_allocate_subcluster_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_block_bitmap *ret);
+extern int ext2fs_get_bitmap_granularity(ext2fs_block_bitmap bitmap);
+extern errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_inode_bitmap *ret);
+extern errcode_t ext2fs_fudge_inode_bitmap_end(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t end, ext2_ino_t *oend);
+extern errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap,
+ blk_t end, blk_t *oend);
+extern errcode_t ext2fs_fudge_block_bitmap_end2(ext2fs_block_bitmap bitmap,
+ blk64_t end, blk64_t *oend);
+extern void ext2fs_clear_inode_bitmap(ext2fs_inode_bitmap bitmap);
+extern void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap);
+extern errcode_t ext2fs_resize_inode_bitmap(__u32 new_end, __u32 new_real_end,
+ ext2fs_inode_bitmap bmap);
+extern errcode_t ext2fs_resize_inode_bitmap2(__u64 new_end,
+ __u64 new_real_end,
+ ext2fs_inode_bitmap bmap);
+extern errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u32 new_real_end,
+ ext2fs_block_bitmap bmap);
+extern errcode_t ext2fs_resize_block_bitmap2(__u64 new_end,
+ __u64 new_real_end,
+ ext2fs_block_bitmap bmap);
+extern errcode_t ext2fs_compare_block_bitmap(ext2fs_block_bitmap bm1,
+ ext2fs_block_bitmap bm2);
+extern errcode_t ext2fs_compare_inode_bitmap(ext2fs_inode_bitmap bm1,
+ ext2fs_inode_bitmap bm2);
+extern errcode_t ext2fs_set_inode_bitmap_range(ext2fs_inode_bitmap bmap,
+ ext2_ino_t start, unsigned int num,
+ void *in);
+extern errcode_t ext2fs_set_inode_bitmap_range2(ext2fs_inode_bitmap bmap,
+ __u64 start, size_t num,
+ void *in);
+extern errcode_t ext2fs_get_inode_bitmap_range(ext2fs_inode_bitmap bmap,
+ ext2_ino_t start, unsigned int num,
+ void *out);
+extern errcode_t ext2fs_get_inode_bitmap_range2(ext2fs_inode_bitmap bmap,
+ __u64 start, size_t num,
+ void *out);
+extern errcode_t ext2fs_set_block_bitmap_range(ext2fs_block_bitmap bmap,
+ blk_t start, unsigned int num,
+ void *in);
+extern errcode_t ext2fs_set_block_bitmap_range2(ext2fs_block_bitmap bmap,
+ blk64_t start, size_t num,
+ void *in);
+extern errcode_t ext2fs_get_block_bitmap_range(ext2fs_block_bitmap bmap,
+ blk_t start, unsigned int num,
+ void *out);
+extern errcode_t ext2fs_get_block_bitmap_range2(ext2fs_block_bitmap bmap,
+ blk64_t start, size_t num,
+ void *out);
+
+/* blknum.c */
+extern __u32 ext2fs_inode_bitmap_checksum(ext2_filsys fs, dgrp_t group);
+extern __u32 ext2fs_block_bitmap_checksum(ext2_filsys fs, dgrp_t group);
+extern dgrp_t ext2fs_group_of_blk2(ext2_filsys fs, blk64_t);
+extern blk64_t ext2fs_group_first_block2(ext2_filsys fs, dgrp_t group);
+extern blk64_t ext2fs_group_last_block2(ext2_filsys fs, dgrp_t group);
+extern int ext2fs_group_blocks_count(ext2_filsys fs, dgrp_t group);
+extern blk64_t ext2fs_inode_data_blocks2(ext2_filsys fs,
+ struct ext2_inode *inode);
+extern blk64_t ext2fs_inode_i_blocks(ext2_filsys fs,
+ struct ext2_inode *inode);
+extern blk64_t ext2fs_get_stat_i_blocks(ext2_filsys fs,
+ struct ext2_inode *inode);
+extern blk64_t ext2fs_blocks_count(struct ext2_super_block *super);
+extern void ext2fs_blocks_count_set(struct ext2_super_block *super,
+ blk64_t blk);
+extern void ext2fs_blocks_count_add(struct ext2_super_block *super,
+ blk64_t blk);
+extern blk64_t ext2fs_r_blocks_count(struct ext2_super_block *super);
+extern void ext2fs_r_blocks_count_set(struct ext2_super_block *super,
+ blk64_t blk);
+extern void ext2fs_r_blocks_count_add(struct ext2_super_block *super,
+ blk64_t blk);
+extern blk64_t ext2fs_free_blocks_count(struct ext2_super_block *super);
+extern void ext2fs_free_blocks_count_set(struct ext2_super_block *super,
+ blk64_t blk);
+extern void ext2fs_free_blocks_count_add(struct ext2_super_block *super,
+ blk64_t blk);
+/* Block group descriptor accessor functions */
+extern struct ext2_group_desc *ext2fs_group_desc(ext2_filsys fs,
+ struct opaque_ext2_group_desc *gdp,
+ dgrp_t group);
+extern blk64_t ext2fs_block_bitmap_csum(ext2_filsys fs, dgrp_t group);
+extern blk64_t ext2fs_block_bitmap_loc(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_block_bitmap_loc_set(ext2_filsys fs, dgrp_t group,
+ blk64_t blk);
+extern __u32 ext2fs_inode_bitmap_csum(ext2_filsys fs, dgrp_t group);
+extern blk64_t ext2fs_inode_bitmap_loc(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_inode_bitmap_loc_set(ext2_filsys fs, dgrp_t group,
+ blk64_t blk);
+extern blk64_t ext2fs_inode_table_loc(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_inode_table_loc_set(ext2_filsys fs, dgrp_t group,
+ blk64_t blk);
+extern __u32 ext2fs_bg_free_blocks_count(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_bg_free_blocks_count_set(ext2_filsys fs, dgrp_t group,
+ __u32 n);
+extern __u32 ext2fs_bg_free_inodes_count(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_bg_free_inodes_count_set(ext2_filsys fs, dgrp_t group,
+ __u32 n);
+extern __u32 ext2fs_bg_used_dirs_count(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_bg_used_dirs_count_set(ext2_filsys fs, dgrp_t group,
+ __u32 n);
+extern __u32 ext2fs_bg_itable_unused(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_bg_itable_unused_set(ext2_filsys fs, dgrp_t group,
+ __u32 n);
+extern __u16 ext2fs_bg_flags(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_bg_flags_zap(ext2_filsys fs, dgrp_t group);
+extern int ext2fs_bg_flags_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
+extern void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
+extern void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
+extern __u16 ext2fs_bg_checksum(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_bg_checksum_set(ext2_filsys fs, dgrp_t group, __u16 checksum);
+extern blk64_t ext2fs_file_acl_block(ext2_filsys fs,
+ const struct ext2_inode *inode);
+extern void ext2fs_file_acl_block_set(ext2_filsys fs,
+ struct ext2_inode *inode, blk64_t blk);
+extern errcode_t ext2fs_inode_size_set(ext2_filsys fs, struct ext2_inode *inode,
+ ext2_off64_t size);
+
+/* block.c */
+extern errcode_t ext2fs_block_iterate(ext2_filsys fs,
+ ext2_ino_t ino,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_filsys fs,
+ blk_t *blocknr,
+ int blockcnt,
+ void *priv_data),
+ void *priv_data);
+errcode_t ext2fs_block_iterate2(ext2_filsys fs,
+ ext2_ino_t ino,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_filsys fs,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_blk,
+ int ref_offset,
+ void *priv_data),
+ void *priv_data);
+errcode_t ext2fs_block_iterate3(ext2_filsys fs,
+ ext2_ino_t ino,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_blk,
+ int ref_offset,
+ void *priv_data),
+ void *priv_data);
+
+/* bmap.c */
+extern errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char *block_buf, int bmap_flags,
+ blk_t block, blk_t *phys_blk);
+extern errcode_t ext2fs_bmap2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char *block_buf, int bmap_flags, blk64_t block,
+ int *ret_flags, blk64_t *phys_blk);
+errcode_t ext2fs_map_cluster_block(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t lblk,
+ blk64_t *pblk);
+
+#if 0
+/* bmove.c */
+extern errcode_t ext2fs_move_blocks(ext2_filsys fs,
+ ext2fs_block_bitmap reserve,
+ ext2fs_block_bitmap alloc_map,
+ int flags);
+#endif
+
+/* check_desc.c */
+extern errcode_t ext2fs_check_desc(ext2_filsys fs);
+
+/* closefs.c */
+extern errcode_t ext2fs_close(ext2_filsys fs);
+extern errcode_t ext2fs_close2(ext2_filsys fs, int flags);
+extern errcode_t ext2fs_close_free(ext2_filsys *fs);
+extern errcode_t ext2fs_flush(ext2_filsys fs);
+extern errcode_t ext2fs_flush2(ext2_filsys fs, int flags);
+extern int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group_block);
+extern errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs,
+ dgrp_t group,
+ blk64_t *ret_super_blk,
+ blk64_t *ret_old_desc_blk,
+ blk64_t *ret_new_desc_blk,
+ blk_t *ret_used_blks);
+extern int ext2fs_super_and_bgd_loc(ext2_filsys fs,
+ dgrp_t group,
+ blk_t *ret_super_blk,
+ blk_t *ret_old_desc_blk,
+ blk_t *ret_new_desc_blk,
+ int *ret_meta_bg);
+extern void ext2fs_update_dynamic_rev(ext2_filsys fs);
+
+/* crc32c.c */
+extern __u32 ext2fs_crc32_be(__u32 crc, unsigned char const *p, size_t len);
+extern __u32 ext2fs_crc32c_le(__u32 crc, unsigned char const *p, size_t len);
+
+/* csum.c */
+extern void ext2fs_init_csum_seed(ext2_filsys fs);
+extern errcode_t ext2fs_mmp_csum_set(ext2_filsys fs, struct mmp_struct *mmp);
+extern int ext2fs_mmp_csum_verify(ext2_filsys, struct mmp_struct *mmp);
+extern int ext2fs_verify_csum_type(ext2_filsys fs, struct ext2_super_block *sb);
+extern errcode_t ext2fs_superblock_csum_set(ext2_filsys fs,
+ struct ext2_super_block *sb);
+extern int ext2fs_superblock_csum_verify(ext2_filsys fs,
+ struct ext2_super_block *sb);
+extern errcode_t ext2fs_ext_attr_block_csum_set(ext2_filsys fs,
+ ext2_ino_t inum, blk64_t block,
+ struct ext2_ext_attr_header *hdr);
+extern int ext2fs_ext_attr_block_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ blk64_t block,
+ struct ext2_ext_attr_header *hdr);
+#define EXT2_DIRENT_TAIL(block, blocksize) \
+ ((struct ext2_dir_entry_tail *)(((char *)(block)) + \
+ (blocksize) - sizeof(struct ext2_dir_entry_tail)))
+
+extern void ext2fs_initialize_dirent_tail(ext2_filsys fs,
+ struct ext2_dir_entry_tail *t);
+extern int ext2fs_dirent_has_tail(ext2_filsys fs,
+ struct ext2_dir_entry *dirent);
+extern int ext2fs_dirent_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent);
+extern int ext2fs_dir_block_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent);
+extern errcode_t ext2fs_dir_block_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent);
+extern errcode_t ext2fs_get_dx_countlimit(ext2_filsys fs,
+ struct ext2_dir_entry *dirent,
+ struct ext2_dx_countlimit **cc,
+ int *offset);
+extern errcode_t ext2fs_dx_csum(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_dir_entry *dirent,
+ __u32 *crc, struct ext2_dx_tail **ret_t);
+extern errcode_t ext2fs_extent_block_csum_set(ext2_filsys fs,
+ ext2_ino_t inum,
+ struct ext3_extent_header *eh);
+extern int ext2fs_extent_block_csum_verify(ext2_filsys fs,
+ ext2_ino_t inum,
+ struct ext3_extent_header *eh);
+extern errcode_t ext2fs_block_bitmap_csum_set(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size);
+extern int ext2fs_block_bitmap_csum_verify(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size);
+extern errcode_t ext2fs_inode_bitmap_csum_set(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size);
+extern int ext2fs_inode_bitmap_csum_verify(ext2_filsys fs, dgrp_t group,
+ char *bitmap, int size);
+extern errcode_t ext2fs_inode_csum_set(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_inode_large *inode);
+extern int ext2fs_inode_csum_verify(ext2_filsys fs, ext2_ino_t inum,
+ struct ext2_inode_large *inode);
+extern void ext2fs_group_desc_csum_set(ext2_filsys fs, dgrp_t group);
+extern int ext2fs_group_desc_csum_verify(ext2_filsys fs, dgrp_t group);
+extern errcode_t ext2fs_set_gdt_csum(ext2_filsys fs);
+extern __u16 ext2fs_group_desc_csum(ext2_filsys fs, dgrp_t group);
+
+/* dblist.c */
+extern errcode_t ext2fs_init_dblist(ext2_filsys fs, ext2_dblist *ret_dblist);
+extern errcode_t ext2fs_add_dir_block(ext2_dblist dblist, ext2_ino_t ino,
+ blk_t blk, int blockcnt);
+extern errcode_t ext2fs_add_dir_block2(ext2_dblist dblist, ext2_ino_t ino,
+ blk64_t blk, e2_blkcnt_t blockcnt);
+extern void ext2fs_dblist_sort(ext2_dblist dblist,
+ EXT2_QSORT_TYPE (*sortfunc)(const void *,
+ const void *));
+extern void ext2fs_dblist_sort2(ext2_dblist dblist,
+ EXT2_QSORT_TYPE (*sortfunc)(const void *,
+ const void *));
+extern errcode_t ext2fs_dblist_iterate(ext2_dblist dblist,
+ int (*func)(ext2_filsys fs, struct ext2_db_entry *db_info,
+ void *priv_data),
+ void *priv_data);
+extern errcode_t ext2fs_dblist_iterate2(ext2_dblist dblist,
+ int (*func)(ext2_filsys fs, struct ext2_db_entry2 *db_info,
+ void *priv_data),
+ void *priv_data);
+extern errcode_t ext2fs_dblist_iterate3(ext2_dblist dblist,
+ int (*func)(ext2_filsys fs, struct ext2_db_entry2 *db_info,
+ void *priv_data),
+ unsigned long long start,
+ unsigned long long count,
+ void *priv_data);
+extern errcode_t ext2fs_set_dir_block(ext2_dblist dblist, ext2_ino_t ino,
+ blk_t blk, int blockcnt);
+extern errcode_t ext2fs_set_dir_block2(ext2_dblist dblist, ext2_ino_t ino,
+ blk64_t blk, e2_blkcnt_t blockcnt);
+extern errcode_t ext2fs_copy_dblist(ext2_dblist src,
+ ext2_dblist *dest);
+extern int ext2fs_dblist_count(ext2_dblist dblist);
+extern blk64_t ext2fs_dblist_count2(ext2_dblist dblist);
+extern errcode_t ext2fs_dblist_get_last(ext2_dblist dblist,
+ struct ext2_db_entry **entry);
+extern errcode_t ext2fs_dblist_get_last2(ext2_dblist dblist,
+ struct ext2_db_entry2 **entry);
+extern errcode_t ext2fs_dblist_drop_last(ext2_dblist dblist);
+
+/* dblist_dir.c */
+extern errcode_t
+ ext2fs_dblist_dir_iterate(ext2_dblist dblist,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_ino_t dir,
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data),
+ void *priv_data);
+
+#if 0
+/* digest_encode.c */
+#define EXT2FS_DIGEST_SIZE EXT2FS_SHA256_LENGTH
+extern int ext2fs_digest_encode(const char *src, int len, char *dst);
+extern int ext2fs_digest_decode(const char *src, int len, char *dst);
+#endif
+
+/* dirblock.c */
+extern errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block,
+ void *buf);
+extern errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block,
+ void *buf, int flags);
+extern errcode_t ext2fs_read_dir_block3(ext2_filsys fs, blk64_t block,
+ void *buf, int flags);
+extern errcode_t ext2fs_read_dir_block4(ext2_filsys fs, blk64_t block,
+ void *buf, int flags, ext2_ino_t ino);
+extern errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block,
+ void *buf);
+extern errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block,
+ void *buf, int flags);
+extern errcode_t ext2fs_write_dir_block3(ext2_filsys fs, blk64_t block,
+ void *buf, int flags);
+extern errcode_t ext2fs_write_dir_block4(ext2_filsys fs, blk64_t block,
+ void *buf, int flags, ext2_ino_t ino);
+
+/* dirhash.c */
+extern errcode_t ext2fs_dirhash(int version, const char *name, int len,
+ const __u32 *seed,
+ ext2_dirhash_t *ret_hash,
+ ext2_dirhash_t *ret_minor_hash);
+
+extern errcode_t ext2fs_dirhash2(int version, const char *name, int len,
+ const struct ext2fs_nls_table *charset,
+ int hash_flags,
+ const __u32 *seed,
+ ext2_dirhash_t *ret_hash,
+ ext2_dirhash_t *ret_minor_hash);
+
+/* dir_iterate.c */
+extern errcode_t ext2fs_get_rec_len(ext2_filsys fs,
+ struct ext2_dir_entry *dirent,
+ unsigned int *rec_len);
+extern errcode_t ext2fs_set_rec_len(ext2_filsys fs,
+ unsigned int len,
+ struct ext2_dir_entry *dirent);
+extern errcode_t ext2fs_dir_iterate(ext2_filsys fs,
+ ext2_ino_t dir,
+ int flags,
+ char *block_buf,
+ int (*func)(struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data),
+ void *priv_data);
+extern errcode_t ext2fs_dir_iterate2(ext2_filsys fs,
+ ext2_ino_t dir,
+ int flags,
+ char *block_buf,
+ int (*func)(ext2_ino_t dir,
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data),
+ void *priv_data);
+
+/* dupfs.c */
+extern errcode_t ext2fs_dup_handle(ext2_filsys src, ext2_filsys *dest);
+
+/* expanddir.c */
+extern errcode_t ext2fs_expand_dir(ext2_filsys fs, ext2_ino_t dir);
+
+/* ext_attr.c */
+extern __u32 ext2fs_ext_attr_hash_entry(struct ext2_ext_attr_entry *entry,
+ void *data);
+extern __u32 ext2fs_ext_attr_hash_entry_signed(struct ext2_ext_attr_entry *entry,
+ void *data);
+extern errcode_t ext2fs_ext_attr_hash_entry2(ext2_filsys fs,
+ struct ext2_ext_attr_entry *entry,
+ void *data, __u32 *hash);
+extern errcode_t ext2fs_ext_attr_hash_entry3(ext2_filsys fs,
+ struct ext2_ext_attr_entry *entry,
+ void *data, __u32 *hash,
+ __u32 *signed_hash);
+extern errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf);
+extern errcode_t ext2fs_read_ext_attr2(ext2_filsys fs, blk64_t block,
+ void *buf);
+extern errcode_t ext2fs_read_ext_attr3(ext2_filsys fs, blk64_t block,
+ void *buf, ext2_ino_t inum);
+extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block,
+ void *buf);
+extern errcode_t ext2fs_write_ext_attr2(ext2_filsys fs, blk64_t block,
+ void *buf);
+extern errcode_t ext2fs_write_ext_attr3(ext2_filsys fs, blk64_t block,
+ void *buf, ext2_ino_t inum);
+extern errcode_t ext2fs_adjust_ea_refcount(ext2_filsys fs, blk_t blk,
+ char *block_buf,
+ int adjust, __u32 *newcount);
+extern errcode_t ext2fs_adjust_ea_refcount2(ext2_filsys fs, blk64_t blk,
+ char *block_buf,
+ int adjust, __u32 *newcount);
+extern errcode_t ext2fs_adjust_ea_refcount3(ext2_filsys fs, blk64_t blk,
+ char *block_buf,
+ int adjust, __u32 *newcount,
+ ext2_ino_t inum);
+errcode_t ext2fs_xattrs_write(struct ext2_xattr_handle *handle);
+errcode_t ext2fs_xattrs_read(struct ext2_xattr_handle *handle);
+errcode_t ext2fs_xattrs_read_inode(struct ext2_xattr_handle *handle,
+ struct ext2_inode_large *inode);
+errcode_t ext2fs_xattrs_iterate(struct ext2_xattr_handle *h,
+ int (*func)(char *name, char *value,
+ size_t value_len, void *data),
+ void *data);
+errcode_t ext2fs_xattr_get(struct ext2_xattr_handle *h, const char *key,
+ void **value, size_t *value_len);
+errcode_t ext2fs_xattr_set(struct ext2_xattr_handle *handle,
+ const char *key,
+ const void *value,
+ size_t value_len);
+errcode_t ext2fs_xattr_remove(struct ext2_xattr_handle *handle,
+ const char *key);
+errcode_t ext2fs_xattrs_open(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_xattr_handle **handle);
+errcode_t ext2fs_xattrs_close(struct ext2_xattr_handle **handle);
+errcode_t ext2fs_free_ext_attr(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode_large *inode);
+errcode_t ext2fs_xattrs_count(struct ext2_xattr_handle *handle, size_t *count);
+errcode_t ext2fs_xattr_inode_max_size(ext2_filsys fs, ext2_ino_t ino,
+ size_t *size);
+#define XATTR_HANDLE_FLAG_RAW 0x0001
+errcode_t ext2fs_xattrs_flags(struct ext2_xattr_handle *handle,
+ unsigned int *new_flags, unsigned int *old_flags);
+extern void ext2fs_ext_attr_block_rehash(struct ext2_ext_attr_header *header,
+ struct ext2_ext_attr_entry *end);
+extern __u32 ext2fs_get_ea_inode_hash(struct ext2_inode *inode);
+extern void ext2fs_set_ea_inode_hash(struct ext2_inode *inode, __u32 hash);
+extern __u64 ext2fs_get_ea_inode_ref(struct ext2_inode *inode);
+extern void ext2fs_set_ea_inode_ref(struct ext2_inode *inode, __u64 ref_count);
+
+/* extent.c */
+extern errcode_t ext2fs_extent_header_verify(void *ptr, int size);
+extern errcode_t ext2fs_extent_open(ext2_filsys fs, ext2_ino_t ino,
+ ext2_extent_handle_t *handle);
+extern errcode_t ext2fs_extent_open2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ ext2_extent_handle_t *ret_handle);
+extern void ext2fs_extent_free(ext2_extent_handle_t handle);
+extern errcode_t ext2fs_extent_get(ext2_extent_handle_t handle,
+ int flags, struct ext2fs_extent *extent);
+extern errcode_t ext2fs_extent_node_split(ext2_extent_handle_t handle);
+extern errcode_t ext2fs_extent_replace(ext2_extent_handle_t handle, int flags,
+ struct ext2fs_extent *extent);
+extern errcode_t ext2fs_extent_insert(ext2_extent_handle_t handle, int flags,
+ struct ext2fs_extent *extent);
+extern errcode_t ext2fs_extent_set_bmap(ext2_extent_handle_t handle,
+ blk64_t logical, blk64_t physical,
+ int flags);
+extern errcode_t ext2fs_extent_delete(ext2_extent_handle_t handle, int flags);
+extern errcode_t ext2fs_extent_get_info(ext2_extent_handle_t handle,
+ struct ext2_extent_info *info);
+extern errcode_t ext2fs_extent_goto(ext2_extent_handle_t handle,
+ blk64_t blk);
+extern errcode_t ext2fs_extent_goto2(ext2_extent_handle_t handle,
+ int leaf_level, blk64_t blk);
+extern errcode_t ext2fs_extent_fix_parents(ext2_extent_handle_t handle);
+extern size_t ext2fs_max_extent_depth(ext2_extent_handle_t handle);
+extern errcode_t ext2fs_fix_extents_checksums(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode);
+extern errcode_t ext2fs_count_blocks(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t *ret_count);
+extern errcode_t ext2fs_decode_extent(struct ext2fs_extent *to, void *from,
+ int len);
+
+/* fallocate.c */
+#define EXT2_FALLOCATE_ZERO_BLOCKS (0x1)
+#define EXT2_FALLOCATE_FORCE_INIT (0x2)
+#define EXT2_FALLOCATE_FORCE_UNINIT (0x4)
+#define EXT2_FALLOCATE_INIT_BEYOND_EOF (0x8)
+#define EXT2_FALLOCATE_ALL_FLAGS (0xF)
+errcode_t ext2fs_fallocate(ext2_filsys fs, int flags, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t goal,
+ blk64_t start, blk64_t len);
+
+/* fileio.c */
+extern errcode_t ext2fs_file_open2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ int flags, ext2_file_t *ret);
+extern errcode_t ext2fs_file_open(ext2_filsys fs, ext2_ino_t ino,
+ int flags, ext2_file_t *ret);
+extern ext2_filsys ext2fs_file_get_fs(ext2_file_t file);
+struct ext2_inode *ext2fs_file_get_inode(ext2_file_t file);
+extern ext2_ino_t ext2fs_file_get_inode_num(ext2_file_t file);
+extern errcode_t ext2fs_file_close(ext2_file_t file);
+extern errcode_t ext2fs_file_flush(ext2_file_t file);
+extern errcode_t ext2fs_file_read(ext2_file_t file, void *buf,
+ unsigned int wanted, unsigned int *got);
+extern errcode_t ext2fs_file_write(ext2_file_t file, const void *buf,
+ unsigned int nbytes, unsigned int *written);
+extern errcode_t ext2fs_file_llseek(ext2_file_t file, __u64 offset,
+ int whence, __u64 *ret_pos);
+extern errcode_t ext2fs_file_lseek(ext2_file_t file, ext2_off_t offset,
+ int whence, ext2_off_t *ret_pos);
+errcode_t ext2fs_file_get_lsize(ext2_file_t file, __u64 *ret_size);
+extern ext2_off_t ext2fs_file_get_size(ext2_file_t file);
+extern errcode_t ext2fs_file_set_size(ext2_file_t file, ext2_off_t size);
+extern errcode_t ext2fs_file_set_size2(ext2_file_t file, ext2_off64_t size);
+
+/* finddev.c */
+extern char *ext2fs_find_block_device(dev_t device);
+
+/* flushb.c */
+extern errcode_t ext2fs_sync_device(int fd, int flushb);
+
+/* freefs.c */
+extern void ext2fs_free(ext2_filsys fs);
+extern void ext2fs_free_dblist(ext2_dblist dblist);
+extern void ext2fs_badblocks_list_free(ext2_badblocks_list bb);
+extern void ext2fs_u32_list_free(ext2_u32_list bb);
+
+/* gen_bitmap.c */
+extern void ext2fs_free_generic_bitmap(ext2fs_inode_bitmap bitmap);
+extern errcode_t ext2fs_make_generic_bitmap(errcode_t magic, ext2_filsys fs,
+ __u32 start, __u32 end,
+ __u32 real_end,
+ const char *descr, char *init_map,
+ ext2fs_generic_bitmap *ret);
+extern errcode_t ext2fs_allocate_generic_bitmap(__u32 start,
+ __u32 end,
+ __u32 real_end,
+ const char *descr,
+ ext2fs_generic_bitmap *ret);
+extern errcode_t ext2fs_copy_generic_bitmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest);
+extern void ext2fs_clear_generic_bitmap(ext2fs_generic_bitmap bitmap);
+extern errcode_t ext2fs_fudge_generic_bitmap_end(ext2fs_inode_bitmap bitmap,
+ errcode_t magic,
+ errcode_t neq,
+ ext2_ino_t end,
+ ext2_ino_t *oend);
+extern void ext2fs_set_generic_bitmap_padding(ext2fs_generic_bitmap map);
+extern errcode_t ext2fs_resize_generic_bitmap(errcode_t magic,
+ __u32 new_end,
+ __u32 new_real_end,
+ ext2fs_generic_bitmap bmap);
+extern errcode_t ext2fs_compare_generic_bitmap(errcode_t magic, errcode_t neq,
+ ext2fs_generic_bitmap bm1,
+ ext2fs_generic_bitmap bm2);
+extern errcode_t ext2fs_get_generic_bitmap_range(ext2fs_generic_bitmap bmap,
+ errcode_t magic,
+ __u32 start, __u32 num,
+ void *out);
+extern errcode_t ext2fs_set_generic_bitmap_range(ext2fs_generic_bitmap bmap,
+ errcode_t magic,
+ __u32 start, __u32 num,
+ void *in);
+extern errcode_t ext2fs_find_first_zero_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ __u32 start, __u32 end,
+ __u32 *out);
+extern errcode_t ext2fs_find_first_set_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ __u32 start, __u32 end,
+ __u32 *out);
+
+/* gen_bitmap64.c */
+void ext2fs_free_generic_bmap(ext2fs_generic_bitmap bmap);
+errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
+ int type, __u64 start, __u64 end,
+ __u64 real_end,
+ const char *descr,
+ ext2fs_generic_bitmap *ret);
+errcode_t ext2fs_copy_generic_bmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest);
+void ext2fs_clear_generic_bmap(ext2fs_generic_bitmap bitmap);
+errcode_t ext2fs_fudge_generic_bmap_end(ext2fs_generic_bitmap bitmap,
+ errcode_t neq,
+ __u64 end, __u64 *oend);
+void ext2fs_set_generic_bmap_padding(ext2fs_generic_bitmap bmap);
+errcode_t ext2fs_resize_generic_bmap(ext2fs_generic_bitmap bmap,
+ __u64 new_end,
+ __u64 new_real_end);
+errcode_t ext2fs_compare_generic_bmap(errcode_t neq,
+ ext2fs_generic_bitmap bm1,
+ ext2fs_generic_bitmap bm2);
+errcode_t ext2fs_get_generic_bmap_range(ext2fs_generic_bitmap bmap,
+ __u64 start, unsigned int num,
+ void *out);
+errcode_t ext2fs_set_generic_bmap_range(ext2fs_generic_bitmap bmap,
+ __u64 start, unsigned int num,
+ void *in);
+errcode_t ext2fs_convert_subcluster_bitmap(ext2_filsys fs,
+ ext2fs_block_bitmap *bitmap);
+errcode_t ext2fs_count_used_clusters(ext2_filsys fs, blk64_t start,
+ blk64_t end, blk64_t *out);
+
+/* get_num_dirs.c */
+extern errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs);
+
+/* getsize.c */
+extern errcode_t ext2fs_get_device_size(const char *file, int blocksize,
+ blk_t *retblocks);
+extern errcode_t ext2fs_get_device_size2(const char *file, int blocksize,
+ blk64_t *retblocks);
+
+/* getsectsize.c */
+extern int ext2fs_get_dio_alignment(int fd);
+errcode_t ext2fs_get_device_sectsize(const char *file, int *sectsize);
+errcode_t ext2fs_get_device_phys_sectsize(const char *file, int *sectsize);
+
+/* i_block.c */
+errcode_t ext2fs_iblk_add_blocks(ext2_filsys fs, struct ext2_inode *inode,
+ blk64_t num_blocks);
+errcode_t ext2fs_iblk_sub_blocks(ext2_filsys fs, struct ext2_inode *inode,
+ blk64_t num_blocks);
+errcode_t ext2fs_iblk_set(ext2_filsys fs, struct ext2_inode *inode, blk64_t b);
+
+/* imager.c */
+extern errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags);
+extern errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, int flags);
+extern errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd, int flags);
+extern errcode_t ext2fs_image_super_read(ext2_filsys fs, int fd, int flags);
+extern errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags);
+extern errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags);
+
+/* ind_block.c */
+errcode_t ext2fs_read_ind_block(ext2_filsys fs, blk_t blk, void *buf);
+errcode_t ext2fs_write_ind_block(ext2_filsys fs, blk_t blk, void *buf);
+
+/* initialize.c */
+extern errcode_t ext2fs_initialize(const char *name, int flags,
+ struct ext2_super_block *param,
+ io_manager manager, ext2_filsys *ret_fs);
+extern errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs, int super_only);
+
+/* icount.c */
+extern void ext2fs_free_icount(ext2_icount_t icount);
+extern errcode_t ext2fs_create_icount_tdb(ext2_filsys fs, char *tdb_dir,
+ int flags, ext2_icount_t *ret);
+extern errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags,
+ unsigned int size,
+ ext2_icount_t hint, ext2_icount_t *ret);
+extern errcode_t ext2fs_create_icount(ext2_filsys fs, int flags,
+ unsigned int size,
+ ext2_icount_t *ret);
+extern errcode_t ext2fs_icount_fetch(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 *ret);
+extern errcode_t ext2fs_icount_increment(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 *ret);
+extern errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 *ret);
+extern errcode_t ext2fs_icount_store(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 count);
+extern ext2_ino_t ext2fs_get_icount_size(ext2_icount_t icount);
+errcode_t ext2fs_icount_validate(ext2_icount_t icount, FILE *);
+
+/* inline.c */
+
+extern errcode_t ext2fs_get_memalign(unsigned long size,
+ unsigned long align, void *ptr);
+
+/* inline_data.c */
+extern errcode_t ext2fs_inline_data_init(ext2_filsys fs, ext2_ino_t ino);
+extern errcode_t ext2fs_inline_data_size(ext2_filsys fs, ext2_ino_t ino,
+ size_t *size);
+extern errcode_t ext2fs_inline_data_get(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ void *buf, size_t *size);
+extern errcode_t ext2fs_inline_data_set(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ void *buf, size_t size);
+
+/* inode.c */
+extern errcode_t ext2fs_create_inode_cache(ext2_filsys fs,
+ unsigned int cache_size);
+extern void ext2fs_free_inode_cache(struct ext2_inode_cache *icache);
+extern errcode_t ext2fs_flush_icache(ext2_filsys fs);
+extern errcode_t ext2fs_get_next_inode_full(ext2_inode_scan scan,
+ ext2_ino_t *ino,
+ struct ext2_inode *inode,
+ int bufsize);
+#define EXT2_INODE_SCAN_DEFAULT_BUFFER_BLOCKS 8
+extern errcode_t ext2fs_open_inode_scan(ext2_filsys fs, int buffer_blocks,
+ ext2_inode_scan *ret_scan);
+extern void ext2fs_close_inode_scan(ext2_inode_scan scan);
+extern errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ext2_ino_t *ino,
+ struct ext2_inode *inode);
+extern errcode_t ext2fs_inode_scan_goto_blockgroup(ext2_inode_scan scan,
+ int group);
+extern void ext2fs_set_inode_callback
+ (ext2_inode_scan scan,
+ errcode_t (*done_group)(ext2_filsys fs,
+ ext2_inode_scan scan,
+ dgrp_t group,
+ void * priv_data),
+ void *done_group_data);
+extern int ext2fs_inode_scan_flags(ext2_inode_scan scan, int set_flags,
+ int clear_flags);
+extern errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode,
+ int bufsize);
+extern errcode_t ext2fs_read_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode);
+extern errcode_t ext2fs_read_inode2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode,
+ int bufsize, int flags);
+extern errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode,
+ int bufsize);
+extern errcode_t ext2fs_write_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode);
+extern errcode_t ext2fs_write_inode2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode,
+ int bufsize, int flags);
+extern errcode_t ext2fs_write_new_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode);
+extern errcode_t ext2fs_get_blocks(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks);
+extern errcode_t ext2fs_check_directory(ext2_filsys fs, ext2_ino_t ino);
+
+/* inode_io.c */
+extern io_manager inode_io_manager;
+extern errcode_t ext2fs_inode_io_intern(ext2_filsys fs, ext2_ino_t ino,
+ char **name);
+extern errcode_t ext2fs_inode_io_intern2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char **name);
+
+/* ismounted.c */
+extern errcode_t ext2fs_check_if_mounted(const char *file, int *mount_flags);
+extern errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags,
+ char *mtpt, int mtlen);
+
+/* punch.c */
+/*
+ * NOTE: This function removes from an inode the blocks "start", "end", and
+ * every block in between.
+ */
+extern errcode_t ext2fs_punch(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char *block_buf, blk64_t start,
+ blk64_t end);
+
+/* namei.c */
+extern errcode_t ext2fs_lookup(ext2_filsys fs, ext2_ino_t dir, const char *name,
+ int namelen, char *buf, ext2_ino_t *inode);
+extern errcode_t ext2fs_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
+ const char *name, ext2_ino_t *inode);
+errcode_t ext2fs_namei_follow(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
+ const char *name, ext2_ino_t *inode);
+extern errcode_t ext2fs_follow_link(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
+ ext2_ino_t inode, ext2_ino_t *res_inode);
+
+/* native.c */
+int ext2fs_native_flag(void);
+
+/* newdir.c */
+extern errcode_t ext2fs_new_dir_block(ext2_filsys fs, ext2_ino_t dir_ino,
+ ext2_ino_t parent_ino, char **block);
+extern errcode_t ext2fs_new_dir_inline_data(ext2_filsys fs, ext2_ino_t dir_ino,
+ ext2_ino_t parent_ino, __u32 *iblock);
+
+/* nls_utf8.c */
+extern const struct ext2fs_nls_table *ext2fs_load_nls_table(int encoding);
+extern int ext2fs_check_encoded_name(const struct ext2fs_nls_table *table,
+ char *s, size_t len, char **pos);
+extern int ext2fs_casefold_cmp(const struct ext2fs_nls_table *table,
+ const unsigned char *str1, size_t len1,
+ const unsigned char *str2, size_t len2);
+
+/* mkdir.c */
+extern errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum,
+ const char *name);
+
+/* mkjournal.c */
+struct ext2fs_journal_params {
+ blk_t num_journal_blocks;
+ blk_t num_fc_blocks;
+};
+extern errcode_t ext2fs_get_journal_params(
+ struct ext2fs_journal_params *params, ext2_filsys fs);
+extern errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
+ blk_t *ret_blk, int *ret_count);
+extern errcode_t ext2fs_zero_blocks2(ext2_filsys fs, blk64_t blk, int num,
+ blk64_t *ret_blk, int *ret_count);
+extern errcode_t ext2fs_create_journal_superblock(ext2_filsys fs,
+ __u32 num_blocks, int flags,
+ char **ret_jsb);
+extern errcode_t ext2fs_create_journal_superblock2(ext2_filsys fs,
+ struct ext2fs_journal_params *params,
+ int flags, char **ret_jsb);
+extern errcode_t ext2fs_add_journal_device(ext2_filsys fs,
+ ext2_filsys journal_dev);
+extern errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks,
+ int flags);
+extern errcode_t ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks,
+ blk64_t goal, int flags);
+extern errcode_t ext2fs_add_journal_inode3(ext2_filsys fs,
+ struct ext2fs_journal_params *params,
+ blk64_t goal, int flags);
+extern int ext2fs_default_journal_size(__u64 num_blocks);
+extern int ext2fs_journal_sb_start(int blocksize);
+
+/* openfs.c */
+extern errcode_t ext2fs_open(const char *name, int flags, int superblock,
+ unsigned int block_size, io_manager manager,
+ ext2_filsys *ret_fs);
+extern errcode_t ext2fs_open2(const char *name, const char *io_options,
+ int flags, int superblock,
+ unsigned int block_size, io_manager manager,
+ ext2_filsys *ret_fs);
+/*
+ * The dgrp_t argument to these two functions is not actually a group number
+ * but a block number offset within a group table! Convert with the formula
+ * (group_number / groups_per_block).
+ */
+extern blk64_t ext2fs_descriptor_block_loc2(ext2_filsys fs,
+ blk64_t group_block, dgrp_t i);
+extern blk_t ext2fs_descriptor_block_loc(ext2_filsys fs, blk_t group_block,
+ dgrp_t i);
+errcode_t ext2fs_get_data_io(ext2_filsys fs, io_channel *old_io);
+errcode_t ext2fs_set_data_io(ext2_filsys fs, io_channel new_io);
+errcode_t ext2fs_rewrite_to_io(ext2_filsys fs, io_channel new_io);
+
+/* orphan.c */
+extern errcode_t ext2fs_create_orphan_file(ext2_filsys fs, blk_t num_blocks);
+extern errcode_t ext2fs_truncate_orphan_file(ext2_filsys fs);
+extern e2_blkcnt_t ext2fs_default_orphan_file_blocks(ext2_filsys fs);
+extern __u32 ext2fs_do_orphan_file_block_csum(ext2_filsys fs, ext2_ino_t ino,
+ __u32 gen, blk64_t blk,
+ char *buf);
+extern errcode_t ext2fs_orphan_file_block_csum_set(ext2_filsys fs,
+ ext2_ino_t ino, blk64_t blk,
+ char *buf);
+extern int ext2fs_orphan_file_block_csum_verify(ext2_filsys fs, ext2_ino_t ino,
+ blk64_t blk, char *buf);
+
+/* get_pathname.c */
+extern errcode_t ext2fs_get_pathname(ext2_filsys fs, ext2_ino_t dir, ext2_ino_t ino,
+ char **name);
+
+/* link.c */
+#define EXT2FS_UNLINK_FORCE 0x1 /* Forcefully unlink even if
+ * the inode number doesn't
+ * match the dirent
+ */
+errcode_t ext2fs_link(ext2_filsys fs, ext2_ino_t dir, const char *name,
+ ext2_ino_t ino, int flags);
+errcode_t ext2fs_unlink(ext2_filsys fs, ext2_ino_t dir, const char *name,
+ ext2_ino_t ino, int flags);
+
+/* symlink.c */
+errcode_t ext2fs_symlink(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t ino,
+ const char *name, const char *target);
+int ext2fs_is_fast_symlink(struct ext2_inode *inode);
+
+/* mmp.c */
+errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf);
+errcode_t ext2fs_mmp_write(ext2_filsys fs, blk64_t mmp_blk, void *buf);
+errcode_t ext2fs_mmp_clear(ext2_filsys fs);
+errcode_t ext2fs_mmp_init(ext2_filsys fs);
+errcode_t ext2fs_mmp_start(ext2_filsys fs);
+errcode_t ext2fs_mmp_update(ext2_filsys fs);
+errcode_t ext2fs_mmp_update2(ext2_filsys fs, int immediately);
+errcode_t ext2fs_mmp_stop(ext2_filsys fs);
+unsigned ext2fs_mmp_new_seq(void);
+
+/* read_bb.c */
+extern errcode_t ext2fs_read_bb_inode(ext2_filsys fs,
+ ext2_badblocks_list *bb_list);
+
+/* read_bb_file.c */
+extern errcode_t ext2fs_read_bb_FILE2(ext2_filsys fs, FILE *f,
+ ext2_badblocks_list *bb_list,
+ void *priv_data,
+ void (*invalid)(ext2_filsys fs,
+ blk_t blk,
+ char *badstr,
+ void *priv_data));
+extern errcode_t ext2fs_read_bb_FILE(ext2_filsys fs, FILE *f,
+ ext2_badblocks_list *bb_list,
+ void (*invalid)(ext2_filsys fs,
+ blk_t blk));
+
+/* res_gdt.c */
+extern errcode_t ext2fs_create_resize_inode(ext2_filsys fs);
+
+/* rw_bitmaps.c */
+extern errcode_t ext2fs_rw_bitmaps(ext2_filsys fs, int flags, int num_threads);
+extern errcode_t ext2fs_read_bitmaps(ext2_filsys fs);
+extern errcode_t ext2fs_read_inode_bitmap (ext2_filsys fs);
+extern errcode_t ext2fs_read_block_bitmap(ext2_filsys fs);
+extern errcode_t ext2fs_write_bitmaps(ext2_filsys fs);
+extern errcode_t ext2fs_write_inode_bitmap(ext2_filsys fs);
+extern errcode_t ext2fs_write_block_bitmap (ext2_filsys fs);
+
+/*sha256.c */
+#define EXT2FS_SHA256_LENGTH 32
+#if 0
+extern void ext2fs_sha256(const unsigned char *in, unsigned long in_size,
+ unsigned char out[EXT2FS_SHA256_LENGTH]);
+#endif
+
+/* sha512.c */
+#define EXT2FS_SHA512_LENGTH 64
+extern void ext2fs_sha512(const unsigned char *in, unsigned long in_size,
+ unsigned char out[EXT2FS_SHA512_LENGTH]);
+
+/* swapfs.c */
+extern errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char *buf, size_t size,
+ int flags);
+extern errcode_t ext2fs_dirent_swab_in(ext2_filsys fs, char *buf, int flags);
+extern errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char *buf, size_t size,
+ int flags);
+extern errcode_t ext2fs_dirent_swab_out(ext2_filsys fs, char *buf, int flags);
+extern void ext2fs_swap_ext_attr(char *to, char *from, int bufsize,
+ int has_header);
+extern void ext2fs_swap_ext_attr_header(struct ext2_ext_attr_header *to_header,
+ struct ext2_ext_attr_header *from_hdr);
+extern void ext2fs_swap_ext_attr_entry(struct ext2_ext_attr_entry *to_entry,
+ struct ext2_ext_attr_entry *from_entry);
+extern void ext2fs_swap_super(struct ext2_super_block * super);
+extern void ext2fs_swap_group_desc(struct ext2_group_desc *gdp);
+extern void ext2fs_swap_group_desc2(ext2_filsys, struct ext2_group_desc *gdp);
+extern void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
+ struct ext2_inode_large *f, int hostorder,
+ int bufsize);
+extern void ext2fs_swap_inode(ext2_filsys fs,struct ext2_inode *t,
+ struct ext2_inode *f, int hostorder);
+extern void ext2fs_swap_mmp(struct mmp_struct *mmp);
+
+/* unix_io.c */
+extern int ext2fs_open_file(const char *pathname, int flags, mode_t mode);
+extern int ext2fs_stat(const char *path, ext2fs_struct_stat *buf);
+extern int ext2fs_fstat(int fd, ext2fs_struct_stat *buf);
+
+/* valid_blk.c */
+extern int ext2fs_inode_has_valid_blocks(struct ext2_inode *inode);
+extern int ext2fs_inode_has_valid_blocks2(ext2_filsys fs,
+ struct ext2_inode *inode);
+
+/* version.c */
+extern int ext2fs_parse_version_string(const char *ver_string);
+extern int ext2fs_get_library_version(const char **ver_string,
+ const char **date_string);
+
+/* write_bb_file.c */
+extern errcode_t ext2fs_write_bb_FILE(ext2_badblocks_list bb_list,
+ unsigned int flags,
+ FILE *f);
+
+
+/* inline functions */
+#ifdef NO_INLINE_FUNCS
+extern errcode_t ext2fs_get_mem(unsigned long size, void *ptr);
+extern errcode_t ext2fs_get_memzero(unsigned long size, void *ptr);
+extern errcode_t ext2fs_get_array(unsigned long count,
+ unsigned long size, void *ptr);
+extern errcode_t ext2fs_get_arrayzero(unsigned long count,
+ unsigned long size, void *ptr);
+extern errcode_t ext2fs_free_mem(void *ptr);
+extern errcode_t ext2fs_resize_mem(unsigned long old_size,
+ unsigned long size, void *ptr);
+extern errcode_t ext2fs_resize_array(unsigned long old_count, unsigned long count,
+ unsigned long size, void *ptr);
+extern void ext2fs_mark_super_dirty(ext2_filsys fs);
+extern void ext2fs_mark_changed(ext2_filsys fs);
+extern int ext2fs_test_changed(ext2_filsys fs);
+extern void ext2fs_mark_valid(ext2_filsys fs);
+extern void ext2fs_unmark_valid(ext2_filsys fs);
+extern int ext2fs_test_valid(ext2_filsys fs);
+extern void ext2fs_mark_ib_dirty(ext2_filsys fs);
+extern void ext2fs_mark_bb_dirty(ext2_filsys fs);
+extern int ext2fs_test_ib_dirty(ext2_filsys fs);
+extern int ext2fs_test_bb_dirty(ext2_filsys fs);
+extern dgrp_t ext2fs_group_of_blk(ext2_filsys fs, blk_t blk);
+extern dgrp_t ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino);
+extern blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group);
+extern blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group);
+extern blk_t ext2fs_inode_data_blocks(ext2_filsys fs,
+ struct ext2_inode *inode);
+extern int ext2fs_htree_intnode_maxrecs(ext2_filsys fs, int blocks);
+extern unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b);
+extern __u64 ext2fs_div64_ceil(__u64 a, __u64 b);
+extern int ext2fs_dirent_name_len(const struct ext2_dir_entry *entry);
+extern void ext2fs_dirent_set_name_len(struct ext2_dir_entry *entry, int len);
+extern int ext2fs_dirent_file_type(const struct ext2_dir_entry *entry);
+extern void ext2fs_dirent_set_file_type(struct ext2_dir_entry *entry, int type);
+extern struct ext2_inode *ext2fs_inode(struct ext2_inode_large * large_inode);
+extern const struct ext2_inode *ext2fs_const_inode(const struct ext2_inode_large * large_inode);
+extern int ext2fs_inodes_per_orphan_block(ext2_filsys fs);
+extern struct ext4_orphan_block_tail *ext2fs_orphan_block_tail(ext2_filsys fs,
+ char *buf);
+#endif
+
+/*
+ * The actual inlined functions definitions themselves...
+ *
+ * If NO_INLINE_FUNCS is defined, then we won't try to do inline
+ * functions at all!
+ */
+#if (defined(INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
+#ifdef INCLUDE_INLINE_FUNCS
+#define _INLINE_ extern
+#else
+#if (__STDC_VERSION__ >= 199901L)
+#define _INLINE_ inline
+#else
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif /* __GNUC__ */
+#endif /* __STDC_VERSION__ >= 199901L */
+#endif
+
+#ifndef EXT2_CUSTOM_MEMORY_ROUTINES
+#include <string.h>
+/*
+ * Allocate memory. The 'ptr' arg must point to a pointer.
+ */
+_INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void *ptr)
+{
+ void *pp;
+
+ pp = malloc(size);
+ if (!pp)
+ return EXT2_ET_NO_MEMORY;
+ memcpy(ptr, &pp, sizeof (pp));
+ return 0;
+}
+
+_INLINE_ errcode_t ext2fs_get_memzero(unsigned long size, void *ptr)
+{
+ void *pp;
+
+ pp = malloc(size);
+ if (!pp)
+ return EXT2_ET_NO_MEMORY;
+ memset(pp, 0, size);
+ memcpy(ptr, &pp, sizeof(pp));
+ return 0;
+}
+
+_INLINE_ errcode_t ext2fs_get_array(unsigned long count, unsigned long size,
+ void *ptr)
+{
+ if (count && (~0UL)/count < size)
+ return EXT2_ET_NO_MEMORY;
+ return ext2fs_get_mem(count*size, ptr);
+}
+
+_INLINE_ errcode_t ext2fs_get_arrayzero(unsigned long count,
+ unsigned long size, void *ptr)
+{
+ if (count && (~0UL)/count < size)
+ return EXT2_ET_NO_MEMORY;
+
+ return ext2fs_get_memzero((size_t)count * size, ptr);
+}
+
+/*
+ * Free memory. The 'ptr' arg must point to a pointer.
+ */
+_INLINE_ errcode_t ext2fs_free_mem(void *ptr)
+{
+ void *p;
+
+ memcpy(&p, ptr, sizeof(p));
+ free(p);
+ p = 0;
+ memcpy(ptr, &p, sizeof(p));
+ return 0;
+}
+
+/*
+ * Resize memory. The 'ptr' arg must point to a pointer.
+ */
+_INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size,
+ unsigned long size, void *ptr)
+{
+ void *p;
+
+ /* Use "memcpy" for pointer assignments here to avoid problems
+ * with C99 strict type aliasing rules. */
+ memcpy(&p, ptr, sizeof(p));
+ p = realloc(p, size);
+ if (!p)
+ return EXT2_ET_NO_MEMORY;
+ memcpy(ptr, &p, sizeof(p));
+ return 0;
+}
+
+/*
+ * Resize array. The 'ptr' arg must point to a pointer.
+ */
+_INLINE_ errcode_t ext2fs_resize_array(unsigned long size,
+ unsigned long old_count,
+ unsigned long count, void *ptr)
+{
+ unsigned long old_size;
+ errcode_t retval;
+
+ if (count && (~0UL)/count < size)
+ return EXT2_ET_NO_MEMORY;
+
+ size *= count;
+ old_size = size * old_count;
+ retval = ext2fs_resize_mem(old_size, size, ptr);
+ if (retval)
+ return retval;
+
+ if (size > old_size) {
+ void *p;
+
+ memcpy(&p, ptr, sizeof(p));
+ memset((char *)p + old_size, 0, size - old_size);
+ memcpy(ptr, &p, sizeof(p));
+ }
+
+ return 0;
+}
+#endif /* Custom memory routines */
+
+/*
+ * Mark a filesystem superblock as dirty
+ */
+_INLINE_ void ext2fs_mark_super_dirty(ext2_filsys fs)
+{
+ fs->flags |= EXT2_FLAG_DIRTY | EXT2_FLAG_CHANGED;
+}
+
+/*
+ * Mark a filesystem as changed
+ */
+_INLINE_ void ext2fs_mark_changed(ext2_filsys fs)
+{
+ fs->flags |= EXT2_FLAG_CHANGED;
+}
+
+/*
+ * Check to see if a filesystem has changed
+ */
+_INLINE_ int ext2fs_test_changed(ext2_filsys fs)
+{
+ return (fs->flags & EXT2_FLAG_CHANGED);
+}
+
+/*
+ * Mark a filesystem as valid
+ */
+_INLINE_ void ext2fs_mark_valid(ext2_filsys fs)
+{
+ fs->flags |= EXT2_FLAG_VALID;
+}
+
+/*
+ * Mark a filesystem as NOT valid
+ */
+_INLINE_ void ext2fs_unmark_valid(ext2_filsys fs)
+{
+ fs->flags &= ~EXT2_FLAG_VALID;
+}
+
+/*
+ * Check to see if a filesystem is valid
+ */
+_INLINE_ int ext2fs_test_valid(ext2_filsys fs)
+{
+ return (fs->flags & EXT2_FLAG_VALID);
+}
+
+/*
+ * Mark the inode bitmap as dirty
+ */
+_INLINE_ void ext2fs_mark_ib_dirty(ext2_filsys fs)
+{
+ fs->flags |= EXT2_FLAG_IB_DIRTY | EXT2_FLAG_CHANGED;
+}
+
+/*
+ * Mark the block bitmap as dirty
+ */
+_INLINE_ void ext2fs_mark_bb_dirty(ext2_filsys fs)
+{
+ fs->flags |= EXT2_FLAG_BB_DIRTY | EXT2_FLAG_CHANGED;
+}
+
+/*
+ * Check to see if a filesystem's inode bitmap is dirty
+ */
+_INLINE_ int ext2fs_test_ib_dirty(ext2_filsys fs)
+{
+ return (fs->flags & EXT2_FLAG_IB_DIRTY);
+}
+
+/*
+ * Check to see if a filesystem's block bitmap is dirty
+ */
+_INLINE_ int ext2fs_test_bb_dirty(ext2_filsys fs)
+{
+ return (fs->flags & EXT2_FLAG_BB_DIRTY);
+}
+
+/*
+ * Return the group # of a block
+ */
+_INLINE_ dgrp_t ext2fs_group_of_blk(ext2_filsys fs, blk_t blk)
+{
+ return ext2fs_group_of_blk2(fs, blk);
+}
+/*
+ * Return the group # of an inode number
+ */
+_INLINE_ dgrp_t ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino)
+{
+ return (ino - 1) / fs->super->s_inodes_per_group;
+}
+
+/*
+ * Return the first block (inclusive) in a group
+ */
+_INLINE_ blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group)
+{
+ return (blk_t) ext2fs_group_first_block2(fs, group);
+}
+
+/*
+ * Return the last block (inclusive) in a group
+ */
+_INLINE_ blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group)
+{
+ return (blk_t) ext2fs_group_last_block2(fs, group);
+}
+
+_INLINE_ blk_t ext2fs_inode_data_blocks(ext2_filsys fs,
+ struct ext2_inode *inode)
+{
+ return (blk_t) ext2fs_inode_data_blocks2(fs, inode);
+}
+
+_INLINE_ int ext2fs_htree_intnode_maxrecs(ext2_filsys fs, int blocks)
+{
+ int csum_size = 0;
+
+ if ((EXT2_SB(fs->super)->s_feature_ro_compat &
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) != 0)
+ csum_size = sizeof(struct ext2_dx_tail);
+ return blocks * ((fs->blocksize - (8 + csum_size)) /
+ sizeof(struct ext2_dx_entry));
+}
+
+/*
+ * This is an efficient, overflow safe way of calculating ceil((1.0 * a) / b)
+ */
+_INLINE_ unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b)
+{
+ if (!a)
+ return 0;
+ return ((a - 1) / b) + 1;
+}
+
+_INLINE_ __u64 ext2fs_div64_ceil(__u64 a, __u64 b)
+{
+ if (!a)
+ return 0;
+ return ((a - 1) / b) + 1;
+}
+
+_INLINE_ int ext2fs_dirent_name_len(const struct ext2_dir_entry *entry)
+{
+ return entry->name_len & 0xff;
+}
+
+_INLINE_ void ext2fs_dirent_set_name_len(struct ext2_dir_entry *entry, int len)
+{
+ entry->name_len = (entry->name_len & 0xff00) | (len & 0xff);
+}
+
+_INLINE_ int ext2fs_dirent_file_type(const struct ext2_dir_entry *entry)
+{
+ return entry->name_len >> 8;
+}
+
+_INLINE_ void ext2fs_dirent_set_file_type(struct ext2_dir_entry *entry, int type)
+{
+ entry->name_len = (entry->name_len & 0xff) | (type << 8);
+}
+
+_INLINE_ struct ext2_inode *ext2fs_inode(struct ext2_inode_large * large_inode)
+{
+ /* It is always safe to convert large inode to a small inode */
+ return (struct ext2_inode *) large_inode;
+}
+
+_INLINE_ const struct ext2_inode *
+ext2fs_const_inode(const struct ext2_inode_large * large_inode)
+{
+ /* It is always safe to convert large inode to a small inode */
+ return (const struct ext2_inode *) large_inode;
+}
+
+_INLINE_ int ext2fs_inodes_per_orphan_block(ext2_filsys fs)
+{
+ return (fs->blocksize - sizeof(struct ext4_orphan_block_tail)) /
+ sizeof(__u32);
+}
+
+_INLINE_ struct ext4_orphan_block_tail *
+ext2fs_orphan_block_tail(ext2_filsys fs, char *buf)
+{
+ return (struct ext4_orphan_block_tail *)(buf + fs->blocksize -
+ sizeof(struct ext4_orphan_block_tail));
+}
+
+#undef _INLINE_
+#endif
+
+/* htree levels for ext4 */
+#define EXT4_HTREE_LEVEL_COMPAT 2
+#define EXT4_HTREE_LEVEL 3
+
+static inline unsigned int ext2_dir_htree_level(ext2_filsys fs)
+{
+ if (ext2fs_has_feature_largedir(fs->super))
+ return EXT4_HTREE_LEVEL;
+
+ return EXT4_HTREE_LEVEL_COMPAT;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _EXT2FS_EXT2FS_H */
diff --git a/lib/ext2fs/ext2fs.pc.in b/lib/ext2fs/ext2fs.pc.in
new file mode 100644
index 0000000..efac85e
--- /dev/null
+++ b/lib/ext2fs/ext2fs.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ext2fs
+Description: Ext2fs library
+Version: @E2FSPROGS_VERSION@
+Requires.private: com_err
+Cflags: -I${includedir}/ext2fs -I${includedir}
+Libs: -L${libdir} -lext2fs
diff --git a/lib/ext2fs/ext2fsP.h b/lib/ext2fs/ext2fsP.h
new file mode 100644
index 0000000..0687384
--- /dev/null
+++ b/lib/ext2fs/ext2fsP.h
@@ -0,0 +1,210 @@
+/*
+ * ext2fsP.h --- private header file for ext2 library
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#include "ext2fs.h"
+
+#define EXT2FS_MAX_NESTED_LINKS 8
+
+static inline int ext2fsP_is_disk_device(mode_t mode)
+{
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ return S_ISBLK(mode) || S_ISCHR(mode);
+#else
+ return S_ISBLK(mode);
+#endif
+}
+
+/*
+ * Badblocks list
+ */
+struct ext2_struct_u32_list {
+ int magic;
+ int num;
+ int size;
+ __u32 *list;
+ int badblocks_flags;
+};
+
+struct ext2_struct_u32_iterate {
+ int magic;
+ ext2_u32_list bb;
+ int ptr;
+};
+
+
+/*
+ * Directory block iterator definition
+ */
+struct ext2_struct_dblist {
+ int magic;
+ ext2_filsys fs;
+ unsigned long long size;
+ unsigned long long count;
+ int sorted;
+ struct ext2_db_entry2 * list;
+};
+
+/*
+ * For directory iterators
+ */
+struct dir_context {
+ ext2_ino_t dir;
+ int flags;
+ char *buf;
+ unsigned int buflen;
+ int (*func)(ext2_ino_t dir,
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data);
+ void *priv_data;
+ errcode_t errcode;
+};
+
+/*
+ * Inode cache structure
+ */
+struct ext2_inode_cache {
+ void * buffer;
+ blk64_t buffer_blk;
+ int cache_last;
+ unsigned int cache_size;
+ int refcount;
+ struct ext2_inode_cache_ent *cache;
+};
+
+struct ext2_inode_cache_ent {
+ ext2_ino_t ino;
+ struct ext2_inode *inode;
+};
+
+/*
+ * NLS definitions
+ */
+struct ext2fs_nls_table {
+ int version;
+ const struct ext2fs_nls_ops *ops;
+};
+
+struct ext2fs_nls_ops {
+ int (*casefold)(const struct ext2fs_nls_table *charset,
+ const unsigned char *str, size_t len,
+ unsigned char *dest, size_t dlen);
+ int (*validate)(const struct ext2fs_nls_table *table,
+ char *s, size_t len, char **pos);
+ int (*casefold_cmp)(const struct ext2fs_nls_table *table,
+ const unsigned char *str1, size_t len1,
+ const unsigned char *str2, size_t len2);
+};
+
+/* Function prototypes */
+
+extern int ext2fs_process_dir_block(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block,
+ int ref_offset,
+ void *priv_data);
+
+extern errcode_t ext2fs_inline_data_ea_remove(ext2_filsys fs, ext2_ino_t ino);
+extern errcode_t ext2fs_inline_data_expand(ext2_filsys fs, ext2_ino_t ino);
+extern int ext2fs_inline_data_dir_iterate(ext2_filsys fs,
+ ext2_ino_t ino,
+ void *priv_data);
+
+/* Generic numeric progress meter */
+
+struct ext2fs_numeric_progress_struct {
+ __u64 max;
+ int log_max;
+ int skip_progress;
+};
+
+/*
+ * progress callback functions
+ */
+struct ext2fs_progress_ops {
+ void (*init)(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ const char *label, __u64 max);
+ void (*update)(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ __u64 val);
+ void (*close)(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ const char *message);
+};
+
+extern struct ext2fs_progress_ops ext2fs_numeric_progress_ops;
+
+extern void ext2fs_numeric_progress_init(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ const char *label, __u64 max);
+extern void ext2fs_numeric_progress_update(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ __u64 val);
+extern void ext2fs_numeric_progress_close(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ const char *message);
+
+/*
+ * 64-bit bitmap support
+ */
+
+extern errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
+ int type, __u64 start, __u64 end,
+ __u64 real_end,
+ const char * description,
+ ext2fs_generic_bitmap *bmap);
+
+extern void ext2fs_free_generic_bmap(ext2fs_generic_bitmap bmap);
+
+extern errcode_t ext2fs_copy_generic_bmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest);
+
+extern errcode_t ext2fs_resize_generic_bmap(ext2fs_generic_bitmap bmap,
+ __u64 new_end,
+ __u64 new_real_end);
+extern errcode_t ext2fs_fudge_generic_bmap_end(ext2fs_generic_bitmap bitmap,
+ errcode_t neq,
+ __u64 end, __u64 *oend);
+extern int ext2fs_mark_generic_bmap(ext2fs_generic_bitmap bitmap,
+ __u64 arg);
+extern int ext2fs_unmark_generic_bmap(ext2fs_generic_bitmap bitmap,
+ __u64 arg);
+extern int ext2fs_test_generic_bmap(ext2fs_generic_bitmap bitmap,
+ __u64 arg);
+extern errcode_t ext2fs_set_generic_bmap_range(ext2fs_generic_bitmap bitmap,
+ __u64 start, unsigned int num,
+ void *in);
+extern errcode_t ext2fs_get_generic_bmap_range(ext2fs_generic_bitmap bitmap,
+ __u64 start, unsigned int num,
+ void *out);
+extern void ext2fs_warn_bitmap32(ext2fs_generic_bitmap bitmap,const char *func);
+
+extern int ext2fs_mem_is_zero(const char *mem, size_t len);
+
+extern int ext2fs_file_block_offset_too_big(ext2_filsys fs,
+ struct ext2_inode *inode,
+ blk64_t offset);
+
+/* atexit support */
+typedef void (*ext2_exit_fn)(void *);
+errcode_t ext2fs_add_exit_fn(ext2_exit_fn fn, void *data);
+errcode_t ext2fs_remove_exit_fn(ext2_exit_fn fn, void *data);
+
+#define EXT2FS_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2*!!(cond)]))
diff --git a/lib/ext2fs/ext3_extents.h b/lib/ext2fs/ext3_extents.h
new file mode 100644
index 0000000..309fbc8
--- /dev/null
+++ b/lib/ext2fs/ext3_extents.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2003,2004 Cluster File Systems, Inc, info@clusterfs.com
+ * Written by Alex Tomas <alex@clusterfs.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LINUX_EXT3_EXTENTS
+#define _LINUX_EXT3_EXTENTS
+
+/*
+ * ext3_inode has i_block array (total 60 bytes)
+ * first 4 bytes are used to store:
+ * - tree depth (0 mean there is no tree yet. all extents in the inode)
+ * - number of alive extents in the inode
+ */
+
+/*
+ * This is extent tail on-disk structure.
+ * All other extent structures are 12 bytes long. It turns out that
+ * block_size % 12 >= 4 for at least all powers of 2 greater than 512, which
+ * covers all valid ext4 block sizes. Therefore, this tail structure can be
+ * crammed into the end of the block without having to rebalance the tree.
+ */
+struct ext3_extent_tail {
+ __le32 et_checksum; /* crc32c(uuid+inum+extent_block) */
+};
+
+/*
+ * this is extent on-disk structure
+ * it's used at the bottom of the tree
+ */
+struct ext3_extent {
+ __le32 ee_block; /* first logical block extent covers */
+ __le16 ee_len; /* number of blocks covered by extent */
+ __le16 ee_start_hi; /* high 16 bits of physical block */
+ __le32 ee_start; /* low 32 bigs of physical block */
+};
+
+/*
+ * this is index on-disk structure
+ * it's used at all the levels, but the bottom
+ */
+struct ext3_extent_idx {
+ __le32 ei_block; /* index covers logical blocks from 'block' */
+ __le32 ei_leaf; /* pointer to the physical block of the next *
+ * level. leaf or next index could bet here */
+ __le16 ei_leaf_hi; /* high 16 bits of physical block */
+ __le16 ei_unused;
+};
+
+/*
+ * each block (leaves and indexes), even inode-stored has header
+ */
+struct ext3_extent_header {
+ __le16 eh_magic; /* probably will support different formats */
+ __le16 eh_entries; /* number of valid entries */
+ __le16 eh_max; /* capacity of store in entries */
+ __le16 eh_depth; /* has tree real underlying blocks? */
+ __le32 eh_generation; /* generation of the tree */
+};
+
+#define EXT3_EXT_MAGIC 0xf30a
+
+/*
+ * array of ext3_ext_path contains path to some extent
+ * creation/lookup routines use it for traversal/splitting/etc
+ * truncate uses it to simulate recursive walking
+ */
+struct ext3_ext_path {
+ __u32 p_block;
+ __u16 p_depth;
+ struct ext3_extent *p_ext;
+ struct ext3_extent_idx *p_idx;
+ struct ext3_extent_header *p_hdr;
+ struct buffer_head *p_bh;
+};
+
+/*
+ * EXT_INIT_MAX_LEN is the maximum number of blocks we can have in an
+ * initialized extent. This is 2^15 and not (2^16 - 1), since we use the
+ * MSB of ee_len field in the extent datastructure to signify if this
+ * particular extent is an initialized extent or an uninitialized (i.e.
+ * preallocated).
+ * EXT_UNINIT_MAX_LEN is the maximum number of blocks we can have in an
+ * uninitialized extent.
+ * If ee_len is <= 0x8000, it is an initialized extent. Otherwise, it is an
+ * uninitialized one. In other words, if MSB of ee_len is set, it is an
+ * uninitialized extent with only one special scenario when ee_len = 0x8000.
+ * In this case we can not have an uninitialized extent of zero length and
+ * thus we make it as a special case of initialized extent with 0x8000 length.
+ * This way we get better extent-to-group alignment for initialized extents.
+ * Hence, the maximum number of blocks we can have in an *initialized*
+ * extent is 2^15 (32768) and in an *uninitialized* extent is 2^15-1 (32767).
+ */
+#define EXT_INIT_MAX_LEN (1UL << 15)
+#define EXT_UNINIT_MAX_LEN (EXT_INIT_MAX_LEN - 1)
+#define EXT_MAX_EXTENT_LBLK (((__u64) 1 << 32) - 1)
+#define EXT_MAX_EXTENT_PBLK (((__u64) 1 << 48) - 1)
+
+#define EXT_FIRST_EXTENT(__hdr__) \
+ ((struct ext3_extent *) (((char *) (__hdr__)) + \
+ sizeof(struct ext3_extent_header)))
+#define EXT_FIRST_INDEX(__hdr__) \
+ ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \
+ sizeof(struct ext3_extent_header)))
+#define EXT_HAS_FREE_INDEX(__path__) \
+ (ext2fs_le16_to_cpu((__path__)->p_hdr->eh_entries) < \
+ ext2fs_le16_to_cpu((__path__)->p_hdr->eh_max))
+#define EXT_LAST_EXTENT(__hdr__) \
+ (EXT_FIRST_EXTENT((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1)
+#define EXT_LAST_INDEX(__hdr__) \
+ (EXT_FIRST_INDEX((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1)
+#define EXT_MAX_EXTENT(__hdr__) \
+ (EXT_FIRST_EXTENT((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1)
+#define EXT_MAX_INDEX(__hdr__) \
+ (EXT_FIRST_INDEX((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1)
+
+#endif /* _LINUX_EXT3_EXTENTS */
+
diff --git a/lib/ext2fs/ext4_acl.h b/lib/ext2fs/ext4_acl.h
new file mode 100644
index 0000000..8d4d974
--- /dev/null
+++ b/lib/ext2fs/ext4_acl.h
@@ -0,0 +1,62 @@
+/*
+ * Ext4's on-disk acl format. From linux/fs/ext4/acl.h
+ */
+
+#define EXT4_ACL_VERSION 0x0001
+
+/* 23.2.5 acl_tag_t values */
+
+#define ACL_UNDEFINED_TAG (0x00)
+#define ACL_USER_OBJ (0x01)
+#define ACL_USER (0x02)
+#define ACL_GROUP_OBJ (0x04)
+#define ACL_GROUP (0x08)
+#define ACL_MASK (0x10)
+#define ACL_OTHER (0x20)
+
+/* 23.3.6 acl_type_t values */
+
+#define ACL_TYPE_ACCESS (0x8000)
+#define ACL_TYPE_DEFAULT (0x4000)
+
+/* 23.2.7 ACL qualifier constants */
+
+#define ACL_UNDEFINED_ID ((id_t)-1)
+
+typedef struct {
+ __le16 e_tag;
+ __le16 e_perm;
+ __le32 e_id;
+ } ext4_acl_entry;
+
+typedef struct {
+ __le16 e_tag;
+ __le16 e_perm;
+} ext4_acl_entry_short;
+
+typedef struct {
+ __le32 a_version;
+} ext4_acl_header;
+
+
+/* Supported ACL a_version fields */
+ #define POSIX_ACL_XATTR_VERSION 0x0002
+
+typedef struct {
+ __le16 e_tag;
+ __le16 e_perm;
+ __le32 e_id;
+} posix_acl_xattr_entry;
+
+typedef struct {
+ __le32 a_version;
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+ posix_acl_xattr_entry a_entries[0];
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic pop
+#endif
+} posix_acl_xattr_header;
+
diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
new file mode 100644
index 0000000..3494046
--- /dev/null
+++ b/lib/ext2fs/ext_attr.c
@@ -0,0 +1,1784 @@
+/*
+ * ext_attr.c --- extended attribute blocks
+ *
+ * Copyright (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
+ *
+ * Copyright (C) 2002 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2_ext_attr.h"
+#include "ext4_acl.h"
+
+#include "ext2fs.h"
+
+static errcode_t read_ea_inode_hash(ext2_filsys fs, ext2_ino_t ino, __u32 *hash)
+{
+ struct ext2_inode inode;
+ errcode_t retval;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+ *hash = ext2fs_get_ea_inode_hash(&inode);
+ return 0;
+}
+
+#define NAME_HASH_SHIFT 5
+#define VALUE_HASH_SHIFT 16
+
+/*
+ * ext2_xattr_hash_entry()
+ *
+ * Compute the hash of an extended attribute.
+ */
+__u32 ext2fs_ext_attr_hash_entry(struct ext2_ext_attr_entry *entry, void *data)
+{
+ __u32 hash = 0;
+ unsigned char *name = (((unsigned char *) entry) +
+ sizeof(struct ext2_ext_attr_entry));
+ int n;
+
+ for (n = 0; n < entry->e_name_len; n++) {
+ hash = (hash << NAME_HASH_SHIFT) ^
+ (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^
+ *name++;
+ }
+
+ /* The hash needs to be calculated on the data in little-endian. */
+ if (entry->e_value_inum == 0 && entry->e_value_size != 0) {
+ __u32 *value = (__u32 *)data;
+ for (n = (entry->e_value_size + EXT2_EXT_ATTR_ROUND) >>
+ EXT2_EXT_ATTR_PAD_BITS; n; n--) {
+ hash = (hash << VALUE_HASH_SHIFT) ^
+ (hash >> (8*sizeof(hash) - VALUE_HASH_SHIFT)) ^
+ ext2fs_le32_to_cpu(*value++);
+ }
+ }
+
+ return hash;
+}
+
+__u32 ext2fs_ext_attr_hash_entry_signed(struct ext2_ext_attr_entry *entry,
+ void *data)
+{
+ __u32 hash = 0;
+ signed char *name = (((signed char *) entry) +
+ sizeof(struct ext2_ext_attr_entry));
+ int n;
+
+ for (n = 0; n < entry->e_name_len; n++) {
+ hash = (hash << NAME_HASH_SHIFT) ^
+ (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^
+ *name++;
+ }
+
+ /* The hash needs to be calculated on the data in little-endian. */
+ if (entry->e_value_inum == 0 && entry->e_value_size != 0) {
+ __u32 *value = (__u32 *)data;
+ for (n = (entry->e_value_size + EXT2_EXT_ATTR_ROUND) >>
+ EXT2_EXT_ATTR_PAD_BITS; n; n--) {
+ hash = (hash << VALUE_HASH_SHIFT) ^
+ (hash >> (8*sizeof(hash) - VALUE_HASH_SHIFT)) ^
+ ext2fs_le32_to_cpu(*value++);
+ }
+ }
+
+ return hash;
+}
+
+
+/*
+ * ext2fs_ext_attr_hash_entry3()
+ *
+ * Compute the hash of an extended attribute. This version of the
+ * function supports hashing entries that reference external inodes
+ * (ea_inode feature) as well as calculating the old legacy signed
+ * hash variant.
+ */
+errcode_t ext2fs_ext_attr_hash_entry3(ext2_filsys fs,
+ struct ext2_ext_attr_entry *entry,
+ void *data, __u32 *hash,
+ __u32 *signed_hash)
+{
+ *hash = ext2fs_ext_attr_hash_entry(entry, data);
+ if (signed_hash)
+ *signed_hash = ext2fs_ext_attr_hash_entry_signed(entry, data);
+
+ if (entry->e_value_inum) {
+ __u32 ea_inode_hash;
+ errcode_t retval;
+
+ retval = read_ea_inode_hash(fs, entry->e_value_inum,
+ &ea_inode_hash);
+ if (retval)
+ return retval;
+
+ *hash = (*hash << VALUE_HASH_SHIFT) ^
+ (*hash >> (8*sizeof(*hash) - VALUE_HASH_SHIFT)) ^
+ ea_inode_hash;
+ if (signed_hash)
+ *signed_hash = (*signed_hash << VALUE_HASH_SHIFT) ^
+ (*signed_hash >> (8*sizeof(*hash) -
+ VALUE_HASH_SHIFT)) ^
+ ea_inode_hash;
+ }
+ return 0;
+}
+
+/*
+ * ext2fs_ext_attr_hash_entry2()
+ *
+ * Compute the hash of an extended attribute.
+ * This version of the function supports hashing entries that reference
+ * external inodes (ea_inode feature).
+ */
+errcode_t ext2fs_ext_attr_hash_entry2(ext2_filsys fs,
+ struct ext2_ext_attr_entry *entry,
+ void *data, __u32 *hash)
+{
+ return ext2fs_ext_attr_hash_entry3(fs, entry, data, hash, NULL);
+}
+
+#undef NAME_HASH_SHIFT
+#undef VALUE_HASH_SHIFT
+
+#define BLOCK_HASH_SHIFT 16
+
+/* Mirrors ext4_xattr_rehash() implementation in kernel. */
+void ext2fs_ext_attr_block_rehash(struct ext2_ext_attr_header *header,
+ struct ext2_ext_attr_entry *end)
+{
+ struct ext2_ext_attr_entry *here;
+ __u32 hash = 0;
+
+ here = (struct ext2_ext_attr_entry *)(header+1);
+ while (here < end && !EXT2_EXT_IS_LAST_ENTRY(here)) {
+ if (!here->e_hash) {
+ /* Block is not shared if an entry's hash value == 0 */
+ hash = 0;
+ break;
+ }
+ hash = (hash << BLOCK_HASH_SHIFT) ^
+ (hash >> (8*sizeof(hash) - BLOCK_HASH_SHIFT)) ^
+ here->e_hash;
+ here = EXT2_EXT_ATTR_NEXT(here);
+ }
+ header->h_hash = hash;
+}
+
+#undef BLOCK_HASH_SHIFT
+
+__u32 ext2fs_get_ea_inode_hash(struct ext2_inode *inode)
+{
+ return inode->i_atime;
+}
+
+void ext2fs_set_ea_inode_hash(struct ext2_inode *inode, __u32 hash)
+{
+ inode->i_atime = hash;
+}
+
+__u64 ext2fs_get_ea_inode_ref(struct ext2_inode *inode)
+{
+ return ((__u64)inode->i_ctime << 32) | inode->osd1.linux1.l_i_version;
+}
+
+void ext2fs_set_ea_inode_ref(struct ext2_inode *inode, __u64 ref_count)
+{
+ inode->i_ctime = (__u32)(ref_count >> 32);
+ inode->osd1.linux1.l_i_version = (__u32)ref_count;
+}
+
+static errcode_t check_ext_attr_header(struct ext2_ext_attr_header *header)
+{
+ if ((header->h_magic != EXT2_EXT_ATTR_MAGIC_v1 &&
+ header->h_magic != EXT2_EXT_ATTR_MAGIC) ||
+ header->h_blocks != 1)
+ return EXT2_ET_BAD_EA_HEADER;
+
+ return 0;
+}
+
+errcode_t ext2fs_read_ext_attr3(ext2_filsys fs, blk64_t block, void *buf,
+ ext2_ino_t inum)
+{
+ int csum_failed = 0;
+ errcode_t retval;
+
+ retval = io_channel_read_blk64(fs->io, block, 1, buf);
+ if (retval)
+ return retval;
+
+ if (!(fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_ext_attr_block_csum_verify(fs, inum, block, buf))
+ csum_failed = 1;
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_ext_attr(buf, buf, fs->blocksize, 1);
+#endif
+
+ retval = check_ext_attr_header(buf);
+ if (retval == 0 && csum_failed)
+ retval = EXT2_ET_EXT_ATTR_CSUM_INVALID;
+
+ return retval;
+}
+
+errcode_t ext2fs_read_ext_attr2(ext2_filsys fs, blk64_t block, void *buf)
+{
+ return ext2fs_read_ext_attr3(fs, block, buf, 0);
+}
+
+errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf)
+{
+ return ext2fs_read_ext_attr2(fs, block, buf);
+}
+
+errcode_t ext2fs_write_ext_attr3(ext2_filsys fs, blk64_t block, void *inbuf,
+ ext2_ino_t inum)
+{
+ errcode_t retval;
+ char *write_buf;
+
+#ifdef WORDS_BIGENDIAN
+ retval = ext2fs_get_mem(fs->blocksize, &write_buf);
+ if (retval)
+ return retval;
+ ext2fs_swap_ext_attr(write_buf, inbuf, fs->blocksize, 1);
+#else
+ write_buf = (char *) inbuf;
+#endif
+
+ retval = ext2fs_ext_attr_block_csum_set(fs, inum, block,
+ (struct ext2_ext_attr_header *)write_buf);
+ if (retval)
+ return retval;
+
+ retval = io_channel_write_blk64(fs->io, block, 1, write_buf);
+#ifdef WORDS_BIGENDIAN
+ ext2fs_free_mem(&write_buf);
+#endif
+ if (!retval)
+ ext2fs_mark_changed(fs);
+ return retval;
+}
+
+errcode_t ext2fs_write_ext_attr2(ext2_filsys fs, blk64_t block, void *inbuf)
+{
+ return ext2fs_write_ext_attr3(fs, block, inbuf, 0);
+}
+
+errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *inbuf)
+{
+ return ext2fs_write_ext_attr2(fs, block, inbuf);
+}
+
+/*
+ * This function adjusts the reference count of the EA block.
+ */
+errcode_t ext2fs_adjust_ea_refcount3(ext2_filsys fs, blk64_t blk,
+ char *block_buf, int adjust,
+ __u32 *newcount, ext2_ino_t inum)
+{
+ errcode_t retval;
+ struct ext2_ext_attr_header *header;
+ char *buf = 0;
+
+ if ((blk >= ext2fs_blocks_count(fs->super)) ||
+ (blk < fs->super->s_first_data_block))
+ return EXT2_ET_BAD_EA_BLOCK_NUM;
+
+ if (!block_buf) {
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+ block_buf = buf;
+ }
+
+ retval = ext2fs_read_ext_attr3(fs, blk, block_buf, inum);
+ if (retval)
+ goto errout;
+
+ header = (struct ext2_ext_attr_header *) block_buf;
+ header->h_refcount += adjust;
+ if (newcount)
+ *newcount = header->h_refcount;
+
+ retval = ext2fs_write_ext_attr3(fs, blk, block_buf, inum);
+ if (retval)
+ goto errout;
+
+errout:
+ if (buf)
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+errcode_t ext2fs_adjust_ea_refcount2(ext2_filsys fs, blk64_t blk,
+ char *block_buf, int adjust,
+ __u32 *newcount)
+{
+ return ext2fs_adjust_ea_refcount3(fs, blk, block_buf, adjust,
+ newcount, 0);
+}
+
+errcode_t ext2fs_adjust_ea_refcount(ext2_filsys fs, blk_t blk,
+ char *block_buf, int adjust,
+ __u32 *newcount)
+{
+ return ext2fs_adjust_ea_refcount2(fs, blk, block_buf, adjust,
+ newcount);
+}
+
+/* Manipulate the contents of extended attribute regions */
+struct ext2_xattr {
+ int name_index;
+ char *name;
+ char *short_name;
+ void *value;
+ unsigned int value_len;
+ ext2_ino_t ea_ino;
+};
+
+struct ext2_xattr_handle {
+ errcode_t magic;
+ ext2_filsys fs;
+ struct ext2_xattr *attrs;
+ int capacity;
+ int count;
+ int ibody_count;
+ ext2_ino_t ino;
+ unsigned int flags;
+};
+
+static errcode_t ext2fs_xattrs_expand(struct ext2_xattr_handle *h,
+ unsigned int expandby)
+{
+ struct ext2_xattr *new_attrs;
+ errcode_t err;
+
+ err = ext2fs_get_arrayzero(h->capacity + expandby,
+ sizeof(struct ext2_xattr), &new_attrs);
+ if (err)
+ return err;
+
+ memcpy(new_attrs, h->attrs, h->capacity * sizeof(struct ext2_xattr));
+ ext2fs_free_mem(&h->attrs);
+ h->capacity += expandby;
+ h->attrs = new_attrs;
+
+ return 0;
+}
+
+struct ea_name_index {
+ int index;
+ const char *name;
+};
+
+/* Keep these names sorted in order of decreasing specificity. */
+static struct ea_name_index ea_names[] = {
+ {10, "gnu."},
+ {3, "system.posix_acl_default"},
+ {2, "system.posix_acl_access"},
+ {8, "system.richacl"},
+ {6, "security."},
+ {4, "trusted."},
+ {7, "system."},
+ {1, "user."},
+ {0, NULL},
+};
+
+static const char *find_ea_prefix(int index)
+{
+ struct ea_name_index *e;
+
+ for (e = ea_names; e->name; e++)
+ if (e->index == index)
+ return e->name;
+
+ return NULL;
+}
+
+static int find_ea_index(const char *fullname, const char **name, int *index)
+{
+ struct ea_name_index *e;
+
+ for (e = ea_names; e->name; e++) {
+ if (strncmp(fullname, e->name, strlen(e->name)) == 0) {
+ *name = fullname + strlen(e->name);
+ *index = e->index;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+errcode_t ext2fs_free_ext_attr(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode_large *inode)
+{
+ struct ext2_ext_attr_header *header;
+ void *block_buf = NULL;
+ blk64_t blk;
+ errcode_t err;
+ struct ext2_inode_large i;
+
+ /* Read inode? */
+ if (inode == NULL) {
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&i,
+ sizeof(struct ext2_inode_large));
+ if (err)
+ return err;
+ inode = &i;
+ }
+
+ /* Do we already have an EA block? */
+ blk = ext2fs_file_acl_block(fs, (struct ext2_inode *)inode);
+ if (blk == 0)
+ return 0;
+
+ /* Find block, zero it, write back */
+ if ((blk < fs->super->s_first_data_block) ||
+ (blk >= ext2fs_blocks_count(fs->super))) {
+ err = EXT2_ET_BAD_EA_BLOCK_NUM;
+ goto out;
+ }
+
+ err = ext2fs_get_mem(fs->blocksize, &block_buf);
+ if (err)
+ goto out;
+
+ err = ext2fs_read_ext_attr3(fs, blk, block_buf, ino);
+ if (err)
+ goto out2;
+
+ /* We only know how to deal with v2 EA blocks */
+ header = (struct ext2_ext_attr_header *) block_buf;
+ if (header->h_magic != EXT2_EXT_ATTR_MAGIC) {
+ err = EXT2_ET_BAD_EA_HEADER;
+ goto out2;
+ }
+
+ header->h_refcount--;
+ err = ext2fs_write_ext_attr3(fs, blk, block_buf, ino);
+ if (err)
+ goto out2;
+
+ /* Erase link to block */
+ ext2fs_file_acl_block_set(fs, (struct ext2_inode *)inode, 0);
+ if (header->h_refcount == 0)
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ err = ext2fs_iblk_sub_blocks(fs, (struct ext2_inode *)inode, 1);
+ if (err)
+ goto out2;
+
+ /* Write inode? */
+ if (inode == &i) {
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&i,
+ sizeof(struct ext2_inode_large));
+ if (err)
+ goto out2;
+ }
+
+out2:
+ ext2fs_free_mem(&block_buf);
+out:
+ return err;
+}
+
+static errcode_t prep_ea_block_for_write(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode_large *inode)
+{
+ struct ext2_ext_attr_header *header;
+ void *block_buf = NULL;
+ blk64_t blk, goal;
+ errcode_t err;
+
+ /* Do we already have an EA block? */
+ blk = ext2fs_file_acl_block(fs, (struct ext2_inode *)inode);
+ if (blk != 0) {
+ if ((blk < fs->super->s_first_data_block) ||
+ (blk >= ext2fs_blocks_count(fs->super))) {
+ err = EXT2_ET_BAD_EA_BLOCK_NUM;
+ goto out;
+ }
+
+ err = ext2fs_get_mem(fs->blocksize, &block_buf);
+ if (err)
+ goto out;
+
+ err = ext2fs_read_ext_attr3(fs, blk, block_buf, ino);
+ if (err)
+ goto out2;
+
+ /* We only know how to deal with v2 EA blocks */
+ header = (struct ext2_ext_attr_header *) block_buf;
+ if (header->h_magic != EXT2_EXT_ATTR_MAGIC) {
+ err = EXT2_ET_BAD_EA_HEADER;
+ goto out2;
+ }
+
+ /* Single-user block. We're done here. */
+ if (header->h_refcount == 1)
+ goto out2;
+
+ /* We need to CoW the block. */
+ header->h_refcount--;
+ err = ext2fs_write_ext_attr3(fs, blk, block_buf, ino);
+ if (err)
+ goto out2;
+ } else {
+ /* No block, we must increment i_blocks */
+ err = ext2fs_iblk_add_blocks(fs, (struct ext2_inode *)inode,
+ 1);
+ if (err)
+ goto out;
+ }
+
+ /* Allocate a block */
+ goal = ext2fs_find_inode_goal(fs, ino, (struct ext2_inode *)inode, 0);
+ err = ext2fs_alloc_block2(fs, goal, NULL, &blk);
+ if (err)
+ goto out2;
+ ext2fs_file_acl_block_set(fs, (struct ext2_inode *)inode, blk);
+out2:
+ if (block_buf)
+ ext2fs_free_mem(&block_buf);
+out:
+ return err;
+}
+
+
+static inline int
+posix_acl_xattr_count(size_t size)
+{
+ if (size < sizeof(posix_acl_xattr_header))
+ return -1;
+ size -= sizeof(posix_acl_xattr_header);
+ if (size % sizeof(posix_acl_xattr_entry))
+ return -1;
+ return size / sizeof(posix_acl_xattr_entry);
+}
+
+/*
+ * The lgetxattr function returns data formatted in the POSIX extended
+ * attribute format. The on-disk format uses a more compact encoding.
+ * See the ext4_acl_to_disk in fs/ext4/acl.c.
+ */
+static errcode_t convert_posix_acl_to_disk_buffer(const void *value, size_t size,
+ void *out_buf, size_t *size_out)
+{
+ const posix_acl_xattr_header *header =
+ (const posix_acl_xattr_header*) value;
+ const posix_acl_xattr_entry *end, *entry =
+ (const posix_acl_xattr_entry *)(header+1);
+ ext4_acl_header *ext_acl;
+ size_t s;
+ char *e;
+
+ int count;
+
+ if (!value)
+ return EINVAL;
+ if (size < sizeof(posix_acl_xattr_header))
+ return ENOMEM;
+ if (header->a_version != ext2fs_cpu_to_le32(POSIX_ACL_XATTR_VERSION))
+ return EINVAL;
+
+ count = posix_acl_xattr_count(size);
+ ext_acl = out_buf;
+ ext_acl->a_version = ext2fs_cpu_to_le32(EXT4_ACL_VERSION);
+
+ if (count <= 0)
+ return EINVAL;
+
+ e = (char *) out_buf + sizeof(ext4_acl_header);
+ s = sizeof(ext4_acl_header);
+ for (end = entry + count; entry != end;entry++) {
+ ext4_acl_entry *disk_entry = (ext4_acl_entry*) e;
+ disk_entry->e_tag = entry->e_tag;
+ disk_entry->e_perm = entry->e_perm;
+
+ switch(ext2fs_le16_to_cpu(entry->e_tag)) {
+ case ACL_USER_OBJ:
+ case ACL_GROUP_OBJ:
+ case ACL_MASK:
+ case ACL_OTHER:
+ e += sizeof(ext4_acl_entry_short);
+ s += sizeof(ext4_acl_entry_short);
+ break;
+ case ACL_USER:
+ case ACL_GROUP:
+ disk_entry->e_id = entry->e_id;
+ e += sizeof(ext4_acl_entry);
+ s += sizeof(ext4_acl_entry);
+ break;
+ default:
+ return EINVAL;
+ }
+ }
+ *size_out = s;
+ return 0;
+}
+
+static errcode_t convert_disk_buffer_to_posix_acl(const void *value, size_t size,
+ void **out_buf, size_t *size_out)
+{
+ posix_acl_xattr_header *header;
+ posix_acl_xattr_entry *entry;
+ const ext4_acl_header *ext_acl = (const ext4_acl_header *) value;
+ errcode_t err;
+ const char *cp;
+ char *out;
+
+ if ((!value) ||
+ (size < sizeof(ext4_acl_header)) ||
+ (ext_acl->a_version != ext2fs_cpu_to_le32(EXT4_ACL_VERSION)))
+ return EINVAL;
+
+ err = ext2fs_get_mem(size * 2, &out);
+ if (err)
+ return err;
+
+ header = (posix_acl_xattr_header *) out;
+ header->a_version = ext2fs_cpu_to_le32(POSIX_ACL_XATTR_VERSION);
+ entry = (posix_acl_xattr_entry *) (out + sizeof(posix_acl_xattr_header));
+
+ cp = (const char *) value + sizeof(ext4_acl_header);
+ size -= sizeof(ext4_acl_header);
+
+ while (size > 0) {
+ const ext4_acl_entry *disk_entry = (const ext4_acl_entry *) cp;
+
+ entry->e_tag = disk_entry->e_tag;
+ entry->e_perm = disk_entry->e_perm;
+
+ switch(ext2fs_le16_to_cpu(entry->e_tag)) {
+ case ACL_USER_OBJ:
+ case ACL_GROUP_OBJ:
+ case ACL_MASK:
+ case ACL_OTHER:
+ entry->e_id = 0;
+ cp += sizeof(ext4_acl_entry_short);
+ size -= sizeof(ext4_acl_entry_short);
+ break;
+ case ACL_USER:
+ case ACL_GROUP:
+ entry->e_id = disk_entry->e_id;
+ cp += sizeof(ext4_acl_entry);
+ size -= sizeof(ext4_acl_entry);
+ break;
+ default:
+ ext2fs_free_mem(&out);
+ return EINVAL;
+ }
+ entry++;
+ }
+ *out_buf = out;
+ *size_out = ((char *) entry - out);
+ return 0;
+}
+
+static errcode_t
+write_xattrs_to_buffer(ext2_filsys fs, struct ext2_xattr *attrs, int count,
+ void *entries_start, unsigned int storage_size,
+ unsigned int value_offset_correction, int write_hash)
+{
+ struct ext2_xattr *x;
+ struct ext2_ext_attr_entry *e = entries_start;
+ char *end = (char *) entries_start + storage_size;
+ unsigned int value_size;
+ errcode_t err;
+
+ memset(entries_start, 0, storage_size);
+ for (x = attrs; x < attrs + count; x++) {
+ value_size = ((x->value_len + EXT2_EXT_ATTR_PAD - 1) /
+ EXT2_EXT_ATTR_PAD) * EXT2_EXT_ATTR_PAD;
+
+ /* Fill out e appropriately */
+ e->e_name_len = strlen(x->short_name);
+ e->e_name_index = x->name_index;
+
+ e->e_value_size = x->value_len;
+ e->e_value_inum = x->ea_ino;
+
+ /* Store name */
+ memcpy((char *)e + sizeof(*e), x->short_name, e->e_name_len);
+ if (x->ea_ino) {
+ e->e_value_offs = 0;
+ } else {
+ end -= value_size;
+ e->e_value_offs = end - (char *) entries_start +
+ value_offset_correction;
+ memcpy(end, x->value, e->e_value_size);
+ }
+
+ if (write_hash || x->ea_ino) {
+ err = ext2fs_ext_attr_hash_entry2(fs, e,
+ x->ea_ino ? 0 : end,
+ &e->e_hash);
+ if (err)
+ return err;
+ } else
+ e->e_hash = 0;
+
+ e = EXT2_EXT_ATTR_NEXT(e);
+ *(__u32 *)e = 0;
+ }
+ return 0;
+}
+
+errcode_t ext2fs_xattrs_write(struct ext2_xattr_handle *handle)
+{
+ ext2_filsys fs = handle->fs;
+ const unsigned int inode_size = EXT2_INODE_SIZE(fs->super);
+ struct ext2_inode_large *inode;
+ char *start, *block_buf = NULL;
+ struct ext2_ext_attr_header *header;
+ __u32 ea_inode_magic;
+ blk64_t blk;
+ unsigned int storage_size;
+ unsigned int i;
+ errcode_t err;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
+ i = inode_size;
+ if (i < sizeof(*inode))
+ i = sizeof(*inode);
+ err = ext2fs_get_memzero(i, &inode);
+ if (err)
+ return err;
+
+ err = ext2fs_read_inode_full(fs, handle->ino, EXT2_INODE(inode),
+ inode_size);
+ if (err)
+ goto out;
+
+ /* If extra_isize isn't set, we need to set it now */
+ if (inode->i_extra_isize == 0 &&
+ inode_size > EXT2_GOOD_OLD_INODE_SIZE) {
+ char *p = (char *)inode;
+ size_t extra = fs->super->s_want_extra_isize;
+
+ if (extra == 0)
+ extra = sizeof(__u32);
+ memset(p + EXT2_GOOD_OLD_INODE_SIZE, 0, extra);
+ inode->i_extra_isize = extra;
+ }
+ if (inode->i_extra_isize & 3) {
+ err = EXT2_ET_INODE_CORRUPTED;
+ goto out;
+ }
+
+ /* Does the inode have space for EA? */
+ if (inode->i_extra_isize < sizeof(inode->i_extra_isize) ||
+ inode_size <= EXT2_GOOD_OLD_INODE_SIZE + inode->i_extra_isize +
+ sizeof(__u32))
+ goto write_ea_block;
+
+ /* Write the inode EA */
+ ea_inode_magic = EXT2_EXT_ATTR_MAGIC;
+ memcpy(((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize, &ea_inode_magic, sizeof(__u32));
+ storage_size = inode_size - EXT2_GOOD_OLD_INODE_SIZE -
+ inode->i_extra_isize - sizeof(__u32);
+ start = ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize + sizeof(__u32);
+
+ err = write_xattrs_to_buffer(fs, handle->attrs, handle->ibody_count,
+ start, storage_size, 0, 0);
+ if (err)
+ goto out;
+write_ea_block:
+ /* Are we done? */
+ if (handle->ibody_count == handle->count &&
+ !ext2fs_file_acl_block(fs, EXT2_INODE(inode)))
+ goto skip_ea_block;
+
+ /* Write the EA block */
+ err = ext2fs_get_memzero(fs->blocksize, &block_buf);
+ if (err)
+ goto out;
+
+ storage_size = fs->blocksize - sizeof(struct ext2_ext_attr_header);
+ start = block_buf + sizeof(struct ext2_ext_attr_header);
+
+ err = write_xattrs_to_buffer(fs, handle->attrs + handle->ibody_count,
+ handle->count - handle->ibody_count, start,
+ storage_size, start - block_buf, 1);
+ if (err)
+ goto out2;
+
+ /* Write a header on the EA block */
+ header = (struct ext2_ext_attr_header *) block_buf;
+ header->h_magic = EXT2_EXT_ATTR_MAGIC;
+ header->h_refcount = 1;
+ header->h_blocks = 1;
+
+ /* Get a new block for writing */
+ err = prep_ea_block_for_write(fs, handle->ino, inode);
+ if (err)
+ goto out2;
+
+ /* Finally, write the new EA block */
+ blk = ext2fs_file_acl_block(fs, EXT2_INODE(inode));
+ err = ext2fs_write_ext_attr3(fs, blk, block_buf, handle->ino);
+ if (err)
+ goto out2;
+
+skip_ea_block:
+ blk = ext2fs_file_acl_block(fs, (struct ext2_inode *)inode);
+ if (!block_buf && blk) {
+ /* xattrs shrunk, free the block */
+ err = ext2fs_free_ext_attr(fs, handle->ino, inode);
+ if (err)
+ goto out;
+ }
+
+ /* Write the inode */
+ err = ext2fs_write_inode_full(fs, handle->ino, EXT2_INODE(inode),
+ inode_size);
+ if (err)
+ goto out2;
+
+out2:
+ ext2fs_free_mem(&block_buf);
+out:
+ ext2fs_free_mem(&inode);
+ return err;
+}
+
+static errcode_t read_xattrs_from_buffer(struct ext2_xattr_handle *handle,
+ struct ext2_inode_large *inode,
+ struct ext2_ext_attr_entry *entries,
+ unsigned int storage_size,
+ char *value_start)
+{
+ struct ext2_xattr *x;
+ struct ext2_ext_attr_entry *entry, *end;
+ const char *prefix;
+ unsigned int remain, prefix_len;
+ errcode_t err;
+ unsigned int values_size = storage_size +
+ ((char *)entries - value_start);
+
+ /* find the end */
+ end = entries;
+ remain = storage_size;
+ while (remain >= sizeof(struct ext2_ext_attr_entry) &&
+ !EXT2_EXT_IS_LAST_ENTRY(end)) {
+
+ /* header eats this space */
+ remain -= sizeof(struct ext2_ext_attr_entry);
+
+ /* is attribute name valid? */
+ if (EXT2_EXT_ATTR_SIZE(end->e_name_len) > remain)
+ return EXT2_ET_EA_BAD_NAME_LEN;
+
+ /* attribute len eats this space */
+ remain -= EXT2_EXT_ATTR_SIZE(end->e_name_len);
+ end = EXT2_EXT_ATTR_NEXT(end);
+ }
+
+ entry = entries;
+ remain = storage_size;
+ while (remain >= sizeof(struct ext2_ext_attr_entry) &&
+ !EXT2_EXT_IS_LAST_ENTRY(entry)) {
+
+ /* Allocate space for more attrs? */
+ if (handle->count == handle->capacity) {
+ err = ext2fs_xattrs_expand(handle, 4);
+ if (err)
+ return err;
+ }
+
+ x = handle->attrs + handle->count;
+
+ /* header eats this space */
+ remain -= sizeof(struct ext2_ext_attr_entry);
+
+ /* attribute len eats this space */
+ remain -= EXT2_EXT_ATTR_SIZE(entry->e_name_len);
+
+ /* Extract name */
+ prefix = find_ea_prefix(entry->e_name_index);
+ prefix_len = (prefix ? strlen(prefix) : 0);
+ err = ext2fs_get_memzero(entry->e_name_len + prefix_len + 1,
+ &x->name);
+ if (err)
+ return err;
+ if (prefix)
+ memcpy(x->name, prefix, prefix_len);
+ if (entry->e_name_len)
+ memcpy(x->name + prefix_len,
+ (char *)entry + sizeof(*entry),
+ entry->e_name_len);
+ x->short_name = x->name + prefix_len;
+ x->name_index = entry->e_name_index;
+
+ /* Check & copy value */
+ if (!ext2fs_has_feature_ea_inode(handle->fs->super) &&
+ entry->e_value_inum != 0)
+ return EXT2_ET_BAD_EA_BLOCK_NUM;
+
+ if (entry->e_value_inum == 0) {
+ if (entry->e_value_size > remain)
+ return EXT2_ET_EA_BAD_VALUE_SIZE;
+
+ if (entry->e_value_offs + entry->e_value_size > values_size)
+ return EXT2_ET_EA_BAD_VALUE_OFFSET;
+
+ if (entry->e_value_size > 0 &&
+ value_start + entry->e_value_offs <
+ (char *)end + sizeof(__u32))
+ return EXT2_ET_EA_BAD_VALUE_OFFSET;
+
+ remain -= entry->e_value_size;
+
+ err = ext2fs_get_mem(entry->e_value_size, &x->value);
+ if (err)
+ return err;
+ memcpy(x->value, value_start + entry->e_value_offs,
+ entry->e_value_size);
+ } else {
+ struct ext2_inode *ea_inode;
+ ext2_file_t ea_file;
+
+ if (entry->e_value_offs != 0)
+ return EXT2_ET_EA_BAD_VALUE_OFFSET;
+
+ if (entry->e_value_size > (64 * 1024))
+ return EXT2_ET_EA_BAD_VALUE_SIZE;
+
+ err = ext2fs_get_mem(entry->e_value_size, &x->value);
+ if (err)
+ return err;
+
+ err = ext2fs_file_open(handle->fs, entry->e_value_inum,
+ 0, &ea_file);
+ if (err)
+ return err;
+
+ ea_inode = ext2fs_file_get_inode(ea_file);
+ if ((ea_inode->i_flags & EXT4_INLINE_DATA_FL) ||
+ !(ea_inode->i_flags & EXT4_EA_INODE_FL) ||
+ ea_inode->i_links_count == 0)
+ err = EXT2_ET_EA_INODE_CORRUPTED;
+ else if ((__u64) ext2fs_file_get_size(ea_file) !=
+ entry->e_value_size)
+ err = EXT2_ET_EA_BAD_VALUE_SIZE;
+ else
+ err = ext2fs_file_read(ea_file, x->value,
+ entry->e_value_size, 0);
+ ext2fs_file_close(ea_file);
+ if (err)
+ return err;
+ }
+
+ x->ea_ino = entry->e_value_inum;
+ x->value_len = entry->e_value_size;
+
+ /* e_hash may be 0 in older inode's ea */
+ if (entry->e_hash != 0) {
+ __u32 hash, signed_hash;
+
+ void *data = (entry->e_value_inum != 0) ?
+ 0 : value_start + entry->e_value_offs;
+
+ err = ext2fs_ext_attr_hash_entry3(handle->fs, entry,
+ data, &hash,
+ &signed_hash);
+ if (err)
+ return err;
+ if ((entry->e_hash != hash) &&
+ (entry->e_hash != signed_hash)) {
+ struct ext2_inode child;
+
+ /* Check whether this is an old Lustre-style
+ * ea_inode reference.
+ */
+ err = ext2fs_read_inode(handle->fs,
+ entry->e_value_inum,
+ &child);
+ if (err)
+ return err;
+ if (child.i_mtime != handle->ino ||
+ child.i_generation != inode->i_generation)
+ return EXT2_ET_BAD_EA_HASH;
+ }
+ }
+
+ handle->count++;
+ entry = EXT2_EXT_ATTR_NEXT(entry);
+ }
+
+ return 0;
+}
+
+static void xattrs_free_keys(struct ext2_xattr_handle *h)
+{
+ struct ext2_xattr *a = h->attrs;
+ int i;
+
+ for (i = 0; i < h->capacity; i++) {
+ if (a[i].name)
+ ext2fs_free_mem(&a[i].name);
+ if (a[i].value)
+ ext2fs_free_mem(&a[i].value);
+ }
+ h->count = 0;
+ h->ibody_count = 0;
+}
+
+/* fetch xattrs from an already-loaded inode */
+errcode_t ext2fs_xattrs_read_inode(struct ext2_xattr_handle *handle,
+ struct ext2_inode_large *inode)
+{
+ struct ext2_ext_attr_header *header;
+ __u32 ea_inode_magic;
+ unsigned int storage_size;
+ char *start, *block_buf = NULL;
+ blk64_t blk;
+ errcode_t err = 0;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
+
+ xattrs_free_keys(handle);
+
+ /* Does the inode have space for EA? */
+ if (inode->i_extra_isize < sizeof(inode->i_extra_isize) ||
+ EXT2_INODE_SIZE(handle->fs->super) <= EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize +
+ sizeof(__u32))
+ goto read_ea_block;
+ if (inode->i_extra_isize & 3) {
+ err = EXT2_ET_INODE_CORRUPTED;
+ goto out;
+ }
+
+ /* Look for EA in the inode */
+ memcpy(&ea_inode_magic, ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize, sizeof(__u32));
+ if (ea_inode_magic == EXT2_EXT_ATTR_MAGIC) {
+ storage_size = EXT2_INODE_SIZE(handle->fs->super) -
+ EXT2_GOOD_OLD_INODE_SIZE - inode->i_extra_isize -
+ sizeof(__u32);
+ start = ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize + sizeof(__u32);
+
+ err = read_xattrs_from_buffer(handle, inode,
+ (struct ext2_ext_attr_entry *) start,
+ storage_size, start);
+ if (err)
+ goto out;
+
+ handle->ibody_count = handle->count;
+ }
+
+read_ea_block:
+ /* Look for EA in a separate EA block */
+ blk = ext2fs_file_acl_block(handle->fs, EXT2_INODE(inode));
+ if (blk != 0) {
+ if ((blk < handle->fs->super->s_first_data_block) ||
+ (blk >= ext2fs_blocks_count(handle->fs->super))) {
+ err = EXT2_ET_BAD_EA_BLOCK_NUM;
+ goto out;
+ }
+
+ err = ext2fs_get_mem(handle->fs->blocksize, &block_buf);
+ if (err)
+ goto out;
+
+ err = ext2fs_read_ext_attr3(handle->fs, blk, block_buf,
+ handle->ino);
+ if (err)
+ goto out3;
+
+ /* We only know how to deal with v2 EA blocks */
+ header = (struct ext2_ext_attr_header *) block_buf;
+ if (header->h_magic != EXT2_EXT_ATTR_MAGIC) {
+ err = EXT2_ET_BAD_EA_HEADER;
+ goto out3;
+ }
+
+ /* Read EAs */
+ storage_size = handle->fs->blocksize -
+ sizeof(struct ext2_ext_attr_header);
+ start = block_buf + sizeof(struct ext2_ext_attr_header);
+ err = read_xattrs_from_buffer(handle, inode,
+ (struct ext2_ext_attr_entry *) start,
+ storage_size, block_buf);
+ }
+
+out3:
+ if (block_buf)
+ ext2fs_free_mem(&block_buf);
+out:
+ return err;
+}
+
+errcode_t ext2fs_xattrs_read(struct ext2_xattr_handle *handle)
+{
+ struct ext2_inode_large *inode;
+ size_t inode_size = EXT2_INODE_SIZE(handle->fs->super);
+ errcode_t err;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
+
+ if (inode_size < sizeof(*inode))
+ inode_size = sizeof(*inode);
+ err = ext2fs_get_memzero(inode_size, &inode);
+ if (err)
+ return err;
+
+ err = ext2fs_read_inode_full(handle->fs, handle->ino, EXT2_INODE(inode),
+ EXT2_INODE_SIZE(handle->fs->super));
+ if (err)
+ goto out;
+
+ err = ext2fs_xattrs_read_inode(handle, inode);
+
+out:
+ ext2fs_free_mem(&inode);
+
+ return err;
+}
+
+errcode_t ext2fs_xattrs_iterate(struct ext2_xattr_handle *h,
+ int (*func)(char *name, char *value,
+ size_t value_len, void *data),
+ void *data)
+{
+ struct ext2_xattr *x;
+ int dirty = 0;
+ int ret;
+
+ EXT2_CHECK_MAGIC(h, EXT2_ET_MAGIC_EA_HANDLE);
+ for (x = h->attrs; x < h->attrs + h->count; x++) {
+ ret = func(x->name, x->value, x->value_len, data);
+ if (ret & XATTR_CHANGED)
+ dirty = 1;
+ if (ret & XATTR_ABORT)
+ break;
+ }
+
+ if (dirty)
+ return ext2fs_xattrs_write(h);
+ return 0;
+}
+
+errcode_t ext2fs_xattr_get(struct ext2_xattr_handle *h, const char *key,
+ void **value, size_t *value_len)
+{
+ struct ext2_xattr *x;
+ char *val;
+ errcode_t err;
+
+ EXT2_CHECK_MAGIC(h, EXT2_ET_MAGIC_EA_HANDLE);
+ for (x = h->attrs; x < h->attrs + h->count; x++) {
+ if (strcmp(x->name, key))
+ continue;
+
+ if (!(h->flags & XATTR_HANDLE_FLAG_RAW) &&
+ ((strcmp(key, "system.posix_acl_default") == 0) ||
+ (strcmp(key, "system.posix_acl_access") == 0))) {
+ err = convert_disk_buffer_to_posix_acl(x->value, x->value_len,
+ value, value_len);
+ return err;
+ } else {
+ err = ext2fs_get_mem(x->value_len, &val);
+ if (err)
+ return err;
+ memcpy(val, x->value, x->value_len);
+ *value = val;
+ *value_len = x->value_len;
+ return 0;
+ }
+ }
+
+ return EXT2_ET_EA_KEY_NOT_FOUND;
+}
+
+errcode_t ext2fs_xattr_inode_max_size(ext2_filsys fs, ext2_ino_t ino,
+ size_t *size)
+{
+ struct ext2_ext_attr_entry *entry;
+ struct ext2_inode_large *inode;
+ __u32 ea_inode_magic;
+ unsigned int minoff;
+ char *start;
+ size_t i;
+ errcode_t err;
+
+ i = EXT2_INODE_SIZE(fs->super);
+ if (i < sizeof(*inode))
+ i = sizeof(*inode);
+ err = ext2fs_get_memzero(i, &inode);
+ if (err)
+ return err;
+
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)inode,
+ EXT2_INODE_SIZE(fs->super));
+ if (err)
+ goto out;
+
+ /* Does the inode have size for EA? */
+ if (EXT2_INODE_SIZE(fs->super) <= EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize +
+ sizeof(__u32)) {
+ err = EXT2_ET_INLINE_DATA_NO_SPACE;
+ goto out;
+ }
+
+ minoff = EXT2_INODE_SIZE(fs->super) - sizeof(*inode) - sizeof(__u32);
+ memcpy(&ea_inode_magic, ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize, sizeof(__u32));
+ if (ea_inode_magic == EXT2_EXT_ATTR_MAGIC) {
+ /* has xattrs. calculate the size */
+ start= ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize + sizeof(__u32);
+ entry = (struct ext2_ext_attr_entry *) start;
+ while (!EXT2_EXT_IS_LAST_ENTRY(entry)) {
+ if (!entry->e_value_inum && entry->e_value_size) {
+ unsigned int offs = entry->e_value_offs;
+ if (offs < minoff)
+ minoff = offs;
+ }
+ entry = EXT2_EXT_ATTR_NEXT(entry);
+ }
+ *size = minoff - ((char *)entry - (char *)start) - sizeof(__u32);
+ } else {
+ /* no xattr. return a maximum size */
+ *size = EXT2_EXT_ATTR_SIZE(minoff -
+ EXT2_EXT_ATTR_LEN(strlen("data")) -
+ EXT2_EXT_ATTR_ROUND - sizeof(__u32));
+ }
+
+out:
+ ext2fs_free_mem(&inode);
+ return err;
+}
+
+static errcode_t xattr_create_ea_inode(ext2_filsys fs, const void *value,
+ size_t value_len, ext2_ino_t *ea_ino)
+{
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+ ext2_file_t file;
+ __u32 hash;
+ errcode_t ret;
+
+ ret = ext2fs_new_inode(fs, 0, 0, 0, &ino);
+ if (ret)
+ return ret;
+
+ memset(&inode, 0, sizeof(inode));
+ inode.i_flags |= EXT4_EA_INODE_FL;
+ if (ext2fs_has_feature_extents(fs->super))
+ inode.i_flags |= EXT4_EXTENTS_FL;
+ inode.i_size = 0;
+ inode.i_mode = LINUX_S_IFREG | 0600;
+ inode.i_links_count = 1;
+ ret = ext2fs_write_new_inode(fs, ino, &inode);
+ if (ret)
+ return ret;
+ /*
+ * ref_count and hash utilize inode's i_*time fields.
+ * ext2fs_write_new_inode() call above initializes these fields with
+ * current time. That's why ref count and hash updates are done
+ * separately below.
+ */
+ ext2fs_set_ea_inode_ref(&inode, 1);
+ hash = ext2fs_crc32c_le(fs->csum_seed, value, value_len);
+ ext2fs_set_ea_inode_hash(&inode, hash);
+
+ ret = ext2fs_write_inode(fs, ino, &inode);
+ if (ret)
+ return ret;
+
+ ret = ext2fs_file_open(fs, ino, EXT2_FILE_WRITE, &file);
+ if (ret)
+ return ret;
+ ret = ext2fs_file_write(file, value, value_len, NULL);
+ ext2fs_file_close(file);
+ if (ret)
+ return ret;
+
+ ext2fs_inode_alloc_stats2(fs, ino, 1 /* inuse */, 0 /* isdir */);
+
+ *ea_ino = ino;
+ return 0;
+}
+
+static errcode_t xattr_inode_dec_ref(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inode_large inode;
+ __u64 ref_count;
+ errcode_t ret;
+
+ ret = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (ret)
+ goto out;
+
+ ref_count = ext2fs_get_ea_inode_ref(EXT2_INODE(&inode));
+ ref_count--;
+ ext2fs_set_ea_inode_ref(EXT2_INODE(&inode), ref_count);
+
+ if (ref_count)
+ goto write_out;
+
+ inode.i_links_count = 0;
+ inode.i_dtime = fs->now ? fs->now : time(0);
+
+ ret = ext2fs_free_ext_attr(fs, ino, &inode);
+ if (ret)
+ goto write_out;
+
+ if (ext2fs_inode_has_valid_blocks2(fs, (struct ext2_inode *)&inode)) {
+ ret = ext2fs_punch(fs, ino, (struct ext2_inode *)&inode, NULL,
+ 0, ~0ULL);
+ if (ret)
+ goto out;
+ }
+
+ ext2fs_inode_alloc_stats2(fs, ino, -1 /* inuse */, 0 /* is_dir */);
+
+write_out:
+ ret = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+out:
+ return ret;
+}
+
+static errcode_t xattr_update_entry(ext2_filsys fs, struct ext2_xattr *x,
+ const char *name, const char *short_name,
+ int index, const void *value,
+ size_t value_len, int in_inode)
+{
+ ext2_ino_t ea_ino = 0;
+ void *new_value = NULL;
+ char *new_name = NULL;
+ int name_len;
+ errcode_t ret;
+
+ if (!x->name) {
+ name_len = strlen(name);
+ ret = ext2fs_get_mem(name_len + 1, &new_name);
+ if (ret)
+ goto fail;
+ memcpy(new_name, name, name_len + 1);
+ }
+
+ ret = ext2fs_get_mem(value_len, &new_value);
+ if (ret)
+ goto fail;
+ memcpy(new_value, value, value_len);
+
+ if (in_inode) {
+ ret = xattr_create_ea_inode(fs, value, value_len, &ea_ino);
+ if (ret)
+ goto fail;
+ }
+
+ if (x->ea_ino) {
+ ret = xattr_inode_dec_ref(fs, x->ea_ino);
+ if (ret)
+ goto fail;
+ }
+
+ if (!x->name) {
+ x->name = new_name;
+ x->short_name = new_name + (short_name - name);
+ }
+ x->name_index = index;
+
+ if (x->value)
+ ext2fs_free_mem(&x->value);
+ x->value = new_value;
+ x->value_len = value_len;
+ x->ea_ino = ea_ino;
+ return 0;
+fail:
+ if (new_name)
+ ext2fs_free_mem(&new_name);
+ if (new_value)
+ ext2fs_free_mem(&new_value);
+ if (ea_ino)
+ xattr_inode_dec_ref(fs, ea_ino);
+ return ret;
+}
+
+static int xattr_find_position(struct ext2_xattr *attrs, int count,
+ const char *shortname, int name_idx)
+{
+ struct ext2_xattr *x;
+ int i;
+ int shortname_len, x_shortname_len;
+
+ shortname_len = strlen(shortname);
+
+ for (i = 0, x = attrs; i < count; i++, x++) {
+ if (name_idx < x->name_index)
+ break;
+ if (name_idx > x->name_index)
+ continue;
+
+ x_shortname_len = strlen(x->short_name);
+ if (shortname_len < x_shortname_len)
+ break;
+ if (shortname_len > x_shortname_len)
+ continue;
+
+ if (memcmp(shortname, x->short_name, shortname_len) <= 0)
+ break;
+ }
+ return i;
+}
+
+static errcode_t xattr_array_update(struct ext2_xattr_handle *h,
+ const char *name,
+ const void *value, size_t value_len,
+ int ibody_free, int block_free,
+ int old_idx, int in_inode)
+{
+ struct ext2_xattr tmp;
+ int add_to_ibody;
+ int needed;
+ int name_len, name_idx = 0;
+ const char *shortname = name;
+ int new_idx;
+ int ret;
+
+ find_ea_index(name, &shortname, &name_idx);
+ name_len = strlen(shortname);
+
+ needed = EXT2_EXT_ATTR_LEN(name_len);
+ if (!in_inode)
+ needed += EXT2_EXT_ATTR_SIZE(value_len);
+
+ if (old_idx >= 0 && old_idx < h->ibody_count) {
+ ibody_free += EXT2_EXT_ATTR_LEN(name_len);
+ if (!h->attrs[old_idx].ea_ino)
+ ibody_free += EXT2_EXT_ATTR_SIZE(
+ h->attrs[old_idx].value_len);
+ }
+
+ if (needed <= ibody_free) {
+ if (old_idx < 0) {
+ new_idx = h->ibody_count;
+ add_to_ibody = 1;
+ goto add_new;
+ }
+
+ /* Update the existing entry. */
+ ret = xattr_update_entry(h->fs, &h->attrs[old_idx], name,
+ shortname, name_idx, value,
+ value_len, in_inode);
+ if (ret)
+ return ret;
+ if (h->ibody_count <= old_idx) {
+ /* Move entry from block to the end of ibody. */
+ tmp = h->attrs[old_idx];
+ memmove(h->attrs + h->ibody_count + 1,
+ h->attrs + h->ibody_count,
+ (old_idx - h->ibody_count) * sizeof(*h->attrs));
+ h->attrs[h->ibody_count] = tmp;
+ h->ibody_count++;
+ }
+ return 0;
+ }
+
+ if (h->ibody_count <= old_idx) {
+ block_free += EXT2_EXT_ATTR_LEN(name_len);
+ if (!h->attrs[old_idx].ea_ino)
+ block_free +=
+ EXT2_EXT_ATTR_SIZE(h->attrs[old_idx].value_len);
+ }
+
+ if (needed > block_free)
+ return EXT2_ET_EA_NO_SPACE;
+
+ if (old_idx >= 0) {
+ /* Update the existing entry. */
+ ret = xattr_update_entry(h->fs, &h->attrs[old_idx], name,
+ shortname, name_idx, value,
+ value_len, in_inode);
+ if (ret)
+ return ret;
+ if (old_idx < h->ibody_count) {
+ /*
+ * Move entry from ibody to the block. Note that
+ * entries in the block are sorted.
+ */
+ new_idx = xattr_find_position(h->attrs + h->ibody_count,
+ h->count - h->ibody_count,
+ shortname, name_idx);
+ new_idx += h->ibody_count - 1;
+ tmp = h->attrs[old_idx];
+ memmove(h->attrs + old_idx, h->attrs + old_idx + 1,
+ (new_idx - old_idx) * sizeof(*h->attrs));
+ h->attrs[new_idx] = tmp;
+ h->ibody_count--;
+ }
+ return 0;
+ }
+
+ new_idx = xattr_find_position(h->attrs + h->ibody_count,
+ h->count - h->ibody_count,
+ shortname, name_idx);
+ new_idx += h->ibody_count;
+ add_to_ibody = 0;
+
+add_new:
+ if (h->count == h->capacity) {
+ ret = ext2fs_xattrs_expand(h, 4);
+ if (ret)
+ return ret;
+ }
+
+ ret = xattr_update_entry(h->fs, &h->attrs[h->count], name, shortname,
+ name_idx, value, value_len, in_inode);
+ if (ret)
+ return ret;
+
+ tmp = h->attrs[h->count];
+ memmove(h->attrs + new_idx + 1, h->attrs + new_idx,
+ (h->count - new_idx)*sizeof(*h->attrs));
+ h->attrs[new_idx] = tmp;
+ if (add_to_ibody)
+ h->ibody_count++;
+ h->count++;
+ return 0;
+}
+
+static int space_used(struct ext2_xattr *attrs, int count)
+{
+ int total = 0;
+ struct ext2_xattr *x;
+ int i, len;
+
+ for (i = 0, x = attrs; i < count; i++, x++) {
+ len = strlen(x->short_name);
+ total += EXT2_EXT_ATTR_LEN(len);
+ if (!x->ea_ino)
+ total += EXT2_EXT_ATTR_SIZE(x->value_len);
+ }
+ return total;
+}
+
+/*
+ * The minimum size of EA value when you start storing it in an external inode
+ * size of block - size of header - size of 1 entry - 4 null bytes
+ */
+#define EXT4_XATTR_MIN_LARGE_EA_SIZE(b) \
+ ((b) - EXT2_EXT_ATTR_LEN(3) - sizeof(struct ext2_ext_attr_header) - 4)
+
+errcode_t ext2fs_xattr_set(struct ext2_xattr_handle *h,
+ const char *name,
+ const void *value,
+ size_t value_len)
+{
+ ext2_filsys fs = h->fs;
+ const int inode_size = EXT2_INODE_SIZE(fs->super);
+ struct ext2_inode_large *inode = NULL;
+ struct ext2_xattr *x;
+ char *new_value;
+ int ibody_free, block_free;
+ int in_inode = 0;
+ int old_idx = -1;
+ int extra_isize;
+ errcode_t ret;
+
+ EXT2_CHECK_MAGIC(h, EXT2_ET_MAGIC_EA_HANDLE);
+
+ ret = ext2fs_get_mem(value_len, &new_value);
+ if (ret)
+ return ret;
+ if (!(h->flags & XATTR_HANDLE_FLAG_RAW) &&
+ ((strcmp(name, "system.posix_acl_default") == 0) ||
+ (strcmp(name, "system.posix_acl_access") == 0))) {
+ ret = convert_posix_acl_to_disk_buffer(value, value_len,
+ new_value, &value_len);
+ if (ret)
+ goto out;
+ } else if (value_len)
+ memcpy(new_value, value, value_len);
+
+ /* Imitate kernel behavior by skipping update if value is the same. */
+ for (x = h->attrs; x < h->attrs + h->count; x++) {
+ if (!strcmp(x->name, name)) {
+ if (!x->ea_ino && x->value_len == value_len &&
+ (!value_len ||
+ !memcmp(x->value, new_value, value_len))) {
+ ret = 0;
+ goto out;
+ }
+ old_idx = x - h->attrs;
+ break;
+ }
+ }
+
+ ret = ext2fs_get_memzero(inode_size, &inode);
+ if (ret)
+ goto out;
+ ret = ext2fs_read_inode_full(fs, h->ino,
+ (struct ext2_inode *)inode,
+ inode_size);
+ if (ret)
+ goto out;
+ if (inode_size > EXT2_GOOD_OLD_INODE_SIZE) {
+ extra_isize = inode->i_extra_isize;
+ if (extra_isize == 0) {
+ extra_isize = fs->super->s_want_extra_isize;
+ if (extra_isize == 0)
+ extra_isize = sizeof(__u32);
+ }
+ ibody_free = inode_size - EXT2_GOOD_OLD_INODE_SIZE;
+ ibody_free -= extra_isize;
+ /* Extended attribute magic and final null entry. */
+ ibody_free -= sizeof(__u32) * 2;
+ ibody_free -= space_used(h->attrs, h->ibody_count);
+ } else
+ ibody_free = 0;
+
+ /* Inline data can only go to ibody. */
+ if (strcmp(name, "system.data") == 0) {
+ if (h->ibody_count <= old_idx) {
+ ret = EXT2_ET_FILESYSTEM_CORRUPTED;
+ goto out;
+ }
+ ret = xattr_array_update(h, name, new_value, value_len,
+ ibody_free,
+ 0 /* block_free */, old_idx,
+ 0 /* in_inode */);
+ if (ret)
+ goto out;
+ goto write_out;
+ }
+
+ block_free = fs->blocksize;
+ block_free -= sizeof(struct ext2_ext_attr_header);
+ /* Final null entry. */
+ block_free -= sizeof(__u32);
+ block_free -= space_used(h->attrs + h->ibody_count,
+ h->count - h->ibody_count);
+
+ if (ext2fs_has_feature_ea_inode(fs->super) &&
+ value_len > EXT4_XATTR_MIN_LARGE_EA_SIZE(fs->blocksize))
+ in_inode = 1;
+
+ ret = xattr_array_update(h, name, new_value, value_len, ibody_free,
+ block_free, old_idx, in_inode);
+ if (ret == EXT2_ET_EA_NO_SPACE && !in_inode &&
+ ext2fs_has_feature_ea_inode(fs->super))
+ ret = xattr_array_update(h, name, new_value, value_len,
+ ibody_free, block_free, old_idx, 1 /* in_inode */);
+ if (ret)
+ goto out;
+
+write_out:
+ ret = ext2fs_xattrs_write(h);
+out:
+ if (inode)
+ ext2fs_free_mem(&inode);
+ ext2fs_free_mem(&new_value);
+ return ret;
+}
+
+errcode_t ext2fs_xattr_remove(struct ext2_xattr_handle *handle,
+ const char *key)
+{
+ struct ext2_xattr *x;
+ struct ext2_xattr *end = handle->attrs + handle->count;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
+ for (x = handle->attrs; x < end; x++) {
+ if (strcmp(x->name, key) == 0) {
+ ext2fs_free_mem(&x->name);
+ ext2fs_free_mem(&x->value);
+ if (x->ea_ino)
+ xattr_inode_dec_ref(handle->fs, x->ea_ino);
+ memmove(x, x + 1, (end - x - 1)*sizeof(*x));
+ memset(end - 1, 0, sizeof(*end));
+ if (x < handle->attrs + handle->ibody_count)
+ handle->ibody_count--;
+ handle->count--;
+ return ext2fs_xattrs_write(handle);
+ }
+ }
+
+ /* no key found, success! */
+ return 0;
+}
+
+errcode_t ext2fs_xattrs_open(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_xattr_handle **handle)
+{
+ struct ext2_xattr_handle *h;
+ errcode_t err;
+
+ if (!ext2fs_has_feature_xattr(fs->super) &&
+ !ext2fs_has_feature_inline_data(fs->super))
+ return EXT2_ET_MISSING_EA_FEATURE;
+
+ err = ext2fs_get_memzero(sizeof(*h), &h);
+ if (err)
+ return err;
+
+ h->magic = EXT2_ET_MAGIC_EA_HANDLE;
+ h->capacity = 4;
+ err = ext2fs_get_arrayzero(h->capacity, sizeof(struct ext2_xattr),
+ &h->attrs);
+ if (err) {
+ ext2fs_free_mem(&h);
+ return err;
+ }
+ h->count = 0;
+ h->ino = ino;
+ h->fs = fs;
+ *handle = h;
+ return 0;
+}
+
+errcode_t ext2fs_xattrs_close(struct ext2_xattr_handle **handle)
+{
+ struct ext2_xattr_handle *h = *handle;
+
+ EXT2_CHECK_MAGIC(h, EXT2_ET_MAGIC_EA_HANDLE);
+ xattrs_free_keys(h);
+ ext2fs_free_mem(&h->attrs);
+ ext2fs_free_mem(handle);
+ return 0;
+}
+
+errcode_t ext2fs_xattrs_count(struct ext2_xattr_handle *handle, size_t *count)
+{
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
+ *count = handle->count;
+ return 0;
+}
+
+errcode_t ext2fs_xattrs_flags(struct ext2_xattr_handle *handle,
+ unsigned int *new_flags, unsigned int *old_flags)
+{
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
+ if (old_flags)
+ *old_flags = handle->flags;
+ if (new_flags)
+ handle->flags = *new_flags;
+ return 0;
+}
diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c
new file mode 100644
index 0000000..82e75cc
--- /dev/null
+++ b/lib/ext2fs/extent.c
@@ -0,0 +1,1877 @@
+/*
+ * extent.c --- routines to implement extents support
+ *
+ * Copyright (C) 2007 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+#include "e2image.h"
+
+#undef DEBUG
+
+/*
+ * Definitions to be dropped in lib/ext2fs/ext2fs.h
+ */
+
+/*
+ * Private definitions
+ */
+
+struct extent_path {
+ char *buf;
+ int entries;
+ int max_entries;
+ int left;
+ int visit_num;
+ int flags;
+ blk64_t end_blk;
+ blk64_t blk;
+ void *curr;
+};
+
+
+struct ext2_extent_handle {
+ errcode_t magic;
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ struct ext2_inode *inode;
+ struct ext2_inode inodebuf;
+ int type;
+ int level;
+ int max_depth;
+ int max_paths;
+ struct extent_path *path;
+};
+
+struct ext2_extent_path {
+ errcode_t magic;
+ int leaf_height;
+ blk64_t lblk;
+};
+
+/*
+ * Useful Debugging stuff
+ */
+
+#ifdef DEBUG
+static void dbg_show_header(struct ext3_extent_header *eh)
+{
+ printf("header: magic=%x entries=%u max=%u depth=%u generation=%u\n",
+ ext2fs_le16_to_cpu(eh->eh_magic),
+ ext2fs_le16_to_cpu(eh->eh_entries),
+ ext2fs_le16_to_cpu(eh->eh_max),
+ ext2fs_le16_to_cpu(eh->eh_depth),
+ ext2fs_le32_to_cpu(eh->eh_generation));
+}
+
+static void dbg_show_index(struct ext3_extent_idx *ix)
+{
+ printf("index: block=%u leaf=%u leaf_hi=%u unused=%u\n",
+ ext2fs_le32_to_cpu(ix->ei_block),
+ ext2fs_le32_to_cpu(ix->ei_leaf),
+ ext2fs_le16_to_cpu(ix->ei_leaf_hi),
+ ext2fs_le16_to_cpu(ix->ei_unused));
+}
+
+static void dbg_show_extent(struct ext3_extent *ex)
+{
+ printf("extent: block=%u-%u len=%u start=%u start_hi=%u\n",
+ ext2fs_le32_to_cpu(ex->ee_block),
+ ext2fs_le32_to_cpu(ex->ee_block) +
+ ext2fs_le16_to_cpu(ex->ee_len) - 1,
+ ext2fs_le16_to_cpu(ex->ee_len),
+ ext2fs_le32_to_cpu(ex->ee_start),
+ ext2fs_le16_to_cpu(ex->ee_start_hi));
+}
+
+static void dbg_print_extent(char *desc, struct ext2fs_extent *extent)
+{
+ if (desc)
+ printf("%s: ", desc);
+ printf("extent: lblk %llu--%llu, len %u, pblk %llu, flags: ",
+ extent->e_lblk, extent->e_lblk + extent->e_len - 1,
+ extent->e_len, extent->e_pblk);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_LEAF)
+ fputs("LEAF ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fputs("UNINIT ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT)
+ fputs("2ND_VISIT ", stdout);
+ if (!extent->e_flags)
+ fputs("(none)", stdout);
+ fputc('\n', stdout);
+
+}
+
+static void dump_path(const char *tag, struct ext2_extent_handle *handle,
+ struct extent_path *path)
+{
+ struct extent_path *ppp = path;
+ printf("%s: level=%d\n", tag, handle->level);
+
+ do {
+ printf("%s: path=%ld buf=%p entries=%d max_entries=%d left=%d "
+ "visit_num=%d flags=0x%x end_blk=%llu curr=%p(%ld)\n",
+ tag, (ppp - handle->path), ppp->buf, ppp->entries,
+ ppp->max_entries, ppp->left, ppp->visit_num, ppp->flags,
+ ppp->end_blk, ppp->curr, ppp->curr - (void *)ppp->buf);
+ printf(" ");
+ dbg_show_header((struct ext3_extent_header *)ppp->buf);
+ if (ppp->curr) {
+ printf(" ");
+ dbg_show_index(ppp->curr);
+ printf(" ");
+ dbg_show_extent(ppp->curr);
+ }
+ ppp--;
+ } while (ppp >= handle->path);
+ fflush(stdout);
+
+ return;
+}
+
+#else
+#define dbg_show_header(eh) do { } while (0)
+#define dbg_show_index(ix) do { } while (0)
+#define dbg_show_extent(ex) do { } while (0)
+#define dbg_print_extent(desc, ex) do { } while (0)
+#define dump_path(tag, handle, path) do { } while (0)
+#endif
+
+/*
+ * Verify the extent header as being sane
+ */
+errcode_t ext2fs_extent_header_verify(void *ptr, int size)
+{
+ int eh_max, entry_size;
+ struct ext3_extent_header *eh = ptr;
+
+ dbg_show_header(eh);
+ if (ext2fs_le16_to_cpu(eh->eh_magic) != EXT3_EXT_MAGIC)
+ return EXT2_ET_EXTENT_HEADER_BAD;
+ if (ext2fs_le16_to_cpu(eh->eh_entries) > ext2fs_le16_to_cpu(eh->eh_max))
+ return EXT2_ET_EXTENT_HEADER_BAD;
+ if (eh->eh_depth == 0)
+ entry_size = sizeof(struct ext3_extent);
+ else
+ entry_size = sizeof(struct ext3_extent_idx);
+
+ eh_max = (size - sizeof(*eh)) / entry_size;
+ /* Allow two extent-sized items at the end of the block, for
+ * ext4_extent_tail with checksum in the future. */
+ if ((ext2fs_le16_to_cpu(eh->eh_max) > eh_max) ||
+ (ext2fs_le16_to_cpu(eh->eh_max) < (eh_max - 2)))
+ return EXT2_ET_EXTENT_HEADER_BAD;
+
+ return 0;
+}
+
+
+/*
+ * Begin functions to handle an inode's extent information
+ */
+void ext2fs_extent_free(ext2_extent_handle_t handle)
+{
+ int i;
+
+ if (!handle)
+ return;
+
+ if (handle->path) {
+ for (i = 1; i < handle->max_paths; i++) {
+ if (handle->path[i].buf)
+ ext2fs_free_mem(&handle->path[i].buf);
+ }
+ ext2fs_free_mem(&handle->path);
+ }
+ ext2fs_free_mem(&handle);
+}
+
+errcode_t ext2fs_extent_open(ext2_filsys fs, ext2_ino_t ino,
+ ext2_extent_handle_t *ret_handle)
+{
+ return ext2fs_extent_open2(fs, ino, NULL, ret_handle);
+}
+
+errcode_t ext2fs_extent_open2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ ext2_extent_handle_t *ret_handle)
+{
+ struct ext2_extent_handle *handle;
+ errcode_t retval;
+ int i;
+ struct ext3_extent_header *eh;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!inode)
+ if ((ino == 0) || (ino > fs->super->s_inodes_count))
+ return EXT2_ET_BAD_INODE_NUM;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_extent_handle), &handle);
+ if (retval)
+ return retval;
+ memset(handle, 0, sizeof(struct ext2_extent_handle));
+
+ handle->ino = ino;
+ handle->fs = fs;
+
+ if (inode) {
+ handle->inode = inode;
+ } else {
+ handle->inode = &handle->inodebuf;
+ retval = ext2fs_read_inode(fs, ino, handle->inode);
+ if (retval)
+ goto errout;
+ }
+
+ eh = (struct ext3_extent_header *) &handle->inode->i_block[0];
+
+ for (i=0; i < EXT2_N_BLOCKS; i++)
+ if (handle->inode->i_block[i])
+ break;
+ if (i >= EXT2_N_BLOCKS) {
+ eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC);
+ eh->eh_depth = 0;
+ eh->eh_entries = 0;
+ i = (sizeof(handle->inode->i_block) - sizeof(*eh)) /
+ sizeof(struct ext3_extent);
+ eh->eh_max = ext2fs_cpu_to_le16(i);
+ handle->inode->i_flags |= EXT4_EXTENTS_FL;
+ }
+
+ if (!(handle->inode->i_flags & EXT4_EXTENTS_FL)) {
+ retval = EXT2_ET_INODE_NOT_EXTENT;
+ goto errout;
+ }
+
+ retval = ext2fs_extent_header_verify(eh, sizeof(handle->inode->i_block));
+ if (retval)
+ goto errout;
+
+ handle->max_depth = ext2fs_le16_to_cpu(eh->eh_depth);
+ handle->type = ext2fs_le16_to_cpu(eh->eh_magic);
+
+ handle->max_paths = handle->max_depth + 1;
+ retval = ext2fs_get_memzero(handle->max_paths *
+ sizeof(struct extent_path),
+ &handle->path);
+ handle->path[0].buf = (char *) handle->inode->i_block;
+
+ handle->path[0].left = handle->path[0].entries =
+ ext2fs_le16_to_cpu(eh->eh_entries);
+ handle->path[0].max_entries = ext2fs_le16_to_cpu(eh->eh_max);
+ handle->path[0].curr = 0;
+ handle->path[0].end_blk =
+ (EXT2_I_SIZE(handle->inode) + fs->blocksize - 1) >>
+ EXT2_BLOCK_SIZE_BITS(fs->super);
+ handle->path[0].blk = 0;
+ handle->path[0].visit_num = 1;
+ handle->level = 0;
+ handle->magic = EXT2_ET_MAGIC_EXTENT_HANDLE;
+
+ *ret_handle = handle;
+ return 0;
+
+errout:
+ ext2fs_extent_free(handle);
+ return retval;
+}
+
+/*
+ * This function is responsible for (optionally) moving through the
+ * extent tree and then returning the current extent
+ */
+errcode_t ext2fs_extent_get(ext2_extent_handle_t handle,
+ int flags, struct ext2fs_extent *extent)
+{
+ struct extent_path *path, *newpath, *tp;
+ struct ext3_extent_header *eh;
+ struct ext3_extent_idx *ix = 0;
+ struct ext3_extent *ex;
+ errcode_t retval;
+ blk64_t blk;
+ blk64_t end_blk;
+ int orig_op, op, l;
+ int failed_csum = 0;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+ if (!handle->path)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ orig_op = op = flags & EXT2_EXTENT_MOVE_MASK;
+
+retry:
+ path = handle->path + handle->level;
+ if ((orig_op == EXT2_EXTENT_NEXT) ||
+ (orig_op == EXT2_EXTENT_NEXT_LEAF)) {
+ if (handle->level < handle->max_depth) {
+ /* interior node */
+ if (path->visit_num == 0) {
+ path->visit_num++;
+ op = EXT2_EXTENT_DOWN;
+ } else if (path->left > 0)
+ op = EXT2_EXTENT_NEXT_SIB;
+ else if (handle->level > 0)
+ op = EXT2_EXTENT_UP;
+ else
+ return EXT2_ET_EXTENT_NO_NEXT;
+ } else {
+ /* leaf node */
+ if (path->left > 0)
+ op = EXT2_EXTENT_NEXT_SIB;
+ else if (handle->level > 0)
+ op = EXT2_EXTENT_UP;
+ else
+ return EXT2_ET_EXTENT_NO_NEXT;
+ }
+ if (op != EXT2_EXTENT_NEXT_SIB) {
+#ifdef DEBUG_GET_EXTENT
+ printf("<<<< OP = %s\n",
+ (op == EXT2_EXTENT_DOWN) ? "down" :
+ ((op == EXT2_EXTENT_UP) ? "up" : "unknown"));
+#endif
+ }
+ }
+
+ if ((orig_op == EXT2_EXTENT_PREV) ||
+ (orig_op == EXT2_EXTENT_PREV_LEAF)) {
+ if (handle->level < handle->max_depth) {
+ /* interior node */
+ if (path->visit_num > 0 ) {
+ /* path->visit_num = 0; */
+ op = EXT2_EXTENT_DOWN_AND_LAST;
+ } else if (path->left < path->entries-1)
+ op = EXT2_EXTENT_PREV_SIB;
+ else if (handle->level > 0)
+ op = EXT2_EXTENT_UP;
+ else
+ return EXT2_ET_EXTENT_NO_PREV;
+ } else {
+ /* leaf node */
+ if (path->left < path->entries-1)
+ op = EXT2_EXTENT_PREV_SIB;
+ else if (handle->level > 0)
+ op = EXT2_EXTENT_UP;
+ else
+ return EXT2_ET_EXTENT_NO_PREV;
+ }
+ if (op != EXT2_EXTENT_PREV_SIB) {
+#ifdef DEBUG_GET_EXTENT
+ printf("<<<< OP = %s\n",
+ (op == EXT2_EXTENT_DOWN_AND_LAST) ? "down/last" :
+ ((op == EXT2_EXTENT_UP) ? "up" : "unknown"));
+#endif
+ }
+ }
+
+ if (orig_op == EXT2_EXTENT_LAST_LEAF) {
+ if ((handle->level < handle->max_depth) &&
+ (path->left == 0))
+ op = EXT2_EXTENT_DOWN;
+ else
+ op = EXT2_EXTENT_LAST_SIB;
+#ifdef DEBUG_GET_EXTENT
+ printf("<<<< OP = %s\n",
+ (op == EXT2_EXTENT_DOWN) ? "down" : "last_sib");
+#endif
+ }
+
+ switch (op) {
+ case EXT2_EXTENT_CURRENT:
+ ix = path->curr;
+ break;
+ case EXT2_EXTENT_ROOT:
+ handle->level = 0;
+ path = handle->path + handle->level;
+ /* fallthrough */
+ case EXT2_EXTENT_FIRST_SIB:
+ path->left = path->entries;
+ path->curr = 0;
+ /* fallthrough */
+ case EXT2_EXTENT_NEXT_SIB:
+ if (path->left <= 0)
+ return EXT2_ET_EXTENT_NO_NEXT;
+ if (path->curr) {
+ ix = path->curr;
+ ix++;
+ } else {
+ eh = (struct ext3_extent_header *) path->buf;
+ ix = EXT_FIRST_INDEX(eh);
+ }
+ path->left--;
+ path->curr = ix;
+ path->visit_num = 0;
+ break;
+ case EXT2_EXTENT_PREV_SIB:
+ if (!path->curr ||
+ path->left+1 >= path->entries)
+ return EXT2_ET_EXTENT_NO_PREV;
+ ix = path->curr;
+ ix--;
+ path->curr = ix;
+ path->left++;
+ if (handle->level < handle->max_depth)
+ path->visit_num = 1;
+ break;
+ case EXT2_EXTENT_LAST_SIB:
+ eh = (struct ext3_extent_header *) path->buf;
+ path->curr = EXT_LAST_EXTENT(eh);
+ ix = path->curr;
+ path->left = 0;
+ path->visit_num = 0;
+ break;
+ case EXT2_EXTENT_UP:
+ if (handle->level <= 0)
+ return EXT2_ET_EXTENT_NO_UP;
+ handle->level--;
+ path--;
+ ix = path->curr;
+ if ((orig_op == EXT2_EXTENT_PREV) ||
+ (orig_op == EXT2_EXTENT_PREV_LEAF))
+ path->visit_num = 0;
+ break;
+ case EXT2_EXTENT_DOWN:
+ case EXT2_EXTENT_DOWN_AND_LAST:
+ if (!path->curr ||(handle->level >= handle->max_depth))
+ return EXT2_ET_EXTENT_NO_DOWN;
+
+ ix = path->curr;
+ newpath = path + 1;
+ if (!newpath->buf) {
+ retval = ext2fs_get_mem(handle->fs->blocksize,
+ &newpath->buf);
+ if (retval)
+ return retval;
+ }
+ blk = ext2fs_le32_to_cpu(ix->ei_leaf) +
+ ((__u64) ext2fs_le16_to_cpu(ix->ei_leaf_hi) << 32);
+ for (l = handle->level, tp = path; l > 0; l--, tp--) {
+ if (blk == tp->blk)
+ return EXT2_ET_EXTENT_CYCLE;
+ }
+ newpath->blk = blk;
+ if ((handle->fs->flags & EXT2_FLAG_IMAGE_FILE) &&
+ (handle->fs->io != handle->fs->image_io))
+ memset(newpath->buf, 0, handle->fs->blocksize);
+ else {
+ retval = io_channel_read_blk64(handle->fs->io,
+ blk, 1, newpath->buf);
+ if (retval)
+ return retval;
+ }
+ handle->level++;
+
+ eh = (struct ext3_extent_header *) newpath->buf;
+
+ retval = ext2fs_extent_header_verify(eh, handle->fs->blocksize);
+ if (retval) {
+ handle->level--;
+ return retval;
+ }
+
+ if (!(handle->fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_extent_block_csum_verify(handle->fs, handle->ino,
+ eh))
+ failed_csum = 1;
+
+ newpath->left = newpath->entries =
+ ext2fs_le16_to_cpu(eh->eh_entries);
+ newpath->max_entries = ext2fs_le16_to_cpu(eh->eh_max);
+
+ /* Make sure there is at least one extent present */
+ if (newpath->left <= 0)
+ return EXT2_ET_EXTENT_NO_DOWN;
+
+ if (path->left > 0) {
+ ix++;
+ newpath->end_blk = ext2fs_le32_to_cpu(ix->ei_block);
+ } else
+ newpath->end_blk = path->end_blk;
+
+ path = newpath;
+ if (op == EXT2_EXTENT_DOWN) {
+ ix = EXT_FIRST_INDEX((struct ext3_extent_header *) eh);
+ path->curr = ix;
+ path->left = path->entries - 1;
+ path->visit_num = 0;
+ } else {
+ ix = EXT_LAST_INDEX((struct ext3_extent_header *) eh);
+ path->curr = ix;
+ path->left = 0;
+ if (handle->level < handle->max_depth)
+ path->visit_num = 1;
+ }
+#ifdef DEBUG_GET_EXTENT
+ printf("Down to level %d/%d, end_blk=%llu\n",
+ handle->level, handle->max_depth,
+ path->end_blk);
+#endif
+ break;
+ default:
+ return EXT2_ET_OP_NOT_SUPPORTED;
+ }
+
+ if (!ix)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ extent->e_flags = 0;
+#ifdef DEBUG_GET_EXTENT
+ printf("(Left %d)\n", path->left);
+#endif
+
+ if (handle->level == handle->max_depth) {
+ ex = (struct ext3_extent *) ix;
+
+ extent->e_pblk = ext2fs_le32_to_cpu(ex->ee_start) +
+ ((__u64) ext2fs_le16_to_cpu(ex->ee_start_hi) << 32);
+ extent->e_lblk = ext2fs_le32_to_cpu(ex->ee_block);
+ extent->e_len = ext2fs_le16_to_cpu(ex->ee_len);
+ extent->e_flags |= EXT2_EXTENT_FLAGS_LEAF;
+ if (extent->e_len > EXT_INIT_MAX_LEN) {
+ extent->e_len -= EXT_INIT_MAX_LEN;
+ extent->e_flags |= EXT2_EXTENT_FLAGS_UNINIT;
+ }
+ } else {
+ extent->e_pblk = ext2fs_le32_to_cpu(ix->ei_leaf) +
+ ((__u64) ext2fs_le16_to_cpu(ix->ei_leaf_hi) << 32);
+ extent->e_lblk = ext2fs_le32_to_cpu(ix->ei_block);
+ if (path->left > 0) {
+ ix++;
+ end_blk = ext2fs_le32_to_cpu(ix->ei_block);
+ } else
+ end_blk = path->end_blk;
+
+ extent->e_len = end_blk - extent->e_lblk;
+ }
+ if (path->visit_num)
+ extent->e_flags |= EXT2_EXTENT_FLAGS_SECOND_VISIT;
+
+ if (((orig_op == EXT2_EXTENT_NEXT_LEAF) ||
+ (orig_op == EXT2_EXTENT_PREV_LEAF)) &&
+ (handle->level != handle->max_depth))
+ goto retry;
+
+ if ((orig_op == EXT2_EXTENT_LAST_LEAF) &&
+ ((handle->level != handle->max_depth) ||
+ (path->left != 0)))
+ goto retry;
+
+ if (failed_csum)
+ return EXT2_ET_EXTENT_CSUM_INVALID;
+
+ return 0;
+}
+
+static errcode_t update_path(ext2_extent_handle_t handle)
+{
+ blk64_t blk;
+ errcode_t retval;
+ struct ext3_extent_idx *ix;
+ struct ext3_extent_header *eh;
+
+ if (handle->level == 0) {
+ retval = ext2fs_write_inode(handle->fs, handle->ino,
+ handle->inode);
+ } else {
+ ix = handle->path[handle->level - 1].curr;
+ blk = ext2fs_le32_to_cpu(ix->ei_leaf) +
+ ((__u64) ext2fs_le16_to_cpu(ix->ei_leaf_hi) << 32);
+
+ /* then update the checksum */
+ eh = (struct ext3_extent_header *)
+ handle->path[handle->level].buf;
+ retval = ext2fs_extent_block_csum_set(handle->fs, handle->ino,
+ eh);
+ if (retval)
+ return retval;
+
+ retval = io_channel_write_blk64(handle->fs->io,
+ blk, 1, handle->path[handle->level].buf);
+ }
+ return retval;
+}
+
+#if 0
+errcode_t ext2fs_extent_save_path(ext2_extent_handle_t handle,
+ ext2_extent_path_t *ret_path)
+{
+ ext2_extent_path_t save_path;
+ struct ext2fs_extent extent;
+ struct ext2_extent_info info;
+ errcode_t retval;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_extent_get_info(handle, &info);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_extent_path), &save_path);
+ if (retval)
+ return retval;
+ memset(save_path, 0, sizeof(struct ext2_extent_path));
+
+ save_path->magic = EXT2_ET_MAGIC_EXTENT_PATH;
+ save_path->leaf_height = info.max_depth - info.curr_level - 1;
+ save_path->lblk = extent.e_lblk;
+
+ *ret_path = save_path;
+ return 0;
+}
+
+errcode_t ext2fs_extent_free_path(ext2_extent_path_t path)
+{
+ EXT2_CHECK_MAGIC(path, EXT2_ET_MAGIC_EXTENT_PATH);
+
+ ext2fs_free_mem(&path);
+ return 0;
+}
+#endif
+
+/*
+ * Go to the node at leaf_level which contains logical block blk.
+ *
+ * leaf_level is height from the leaf node level, i.e.
+ * leaf_level 0 is at leaf node, leaf_level 1 is 1 above etc.
+ *
+ * If "blk" has no mapping (hole) then handle is left at last
+ * extent before blk.
+ */
+errcode_t ext2fs_extent_goto2(ext2_extent_handle_t handle,
+ int leaf_level, blk64_t blk)
+{
+ struct ext2fs_extent extent;
+ errcode_t retval;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_ROOT, &extent);
+ if (retval) {
+ if (retval == EXT2_ET_EXTENT_NO_NEXT)
+ retval = EXT2_ET_EXTENT_NOT_FOUND;
+ return retval;
+ }
+
+ if (leaf_level > handle->max_depth) {
+#ifdef DEBUG
+ printf("leaf level %d greater than tree depth %d\n",
+ leaf_level, handle->max_depth);
+#endif
+ return EXT2_ET_OP_NOT_SUPPORTED;
+ }
+
+#ifdef DEBUG
+ printf("goto extent ino %u, level %d, %llu\n", handle->ino,
+ leaf_level, blk);
+#endif
+
+#ifdef DEBUG_GOTO_EXTENTS
+ dbg_print_extent("root", &extent);
+#endif
+ while (1) {
+ if (handle->max_depth - handle->level == leaf_level) {
+ /* block is in this &extent */
+ if ((blk >= extent.e_lblk) &&
+ (blk < extent.e_lblk + extent.e_len))
+ return 0;
+ if (blk < extent.e_lblk) {
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_PREV_SIB,
+ &extent);
+ return EXT2_ET_EXTENT_NOT_FOUND;
+ }
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_NEXT_SIB,
+ &extent);
+ if (retval == EXT2_ET_EXTENT_NO_NEXT)
+ return EXT2_ET_EXTENT_NOT_FOUND;
+ if (retval)
+ return retval;
+ continue;
+ }
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT_SIB,
+ &extent);
+ if (retval == EXT2_ET_EXTENT_NO_NEXT)
+ goto go_down;
+ if (retval)
+ return retval;
+
+#ifdef DEBUG_GOTO_EXTENTS
+ dbg_print_extent("next", &extent);
+#endif
+ if (blk == extent.e_lblk)
+ goto go_down;
+ if (blk > extent.e_lblk)
+ continue;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_PREV_SIB,
+ &extent);
+ if (retval)
+ return retval;
+
+#ifdef DEBUG_GOTO_EXTENTS
+ dbg_print_extent("prev", &extent);
+#endif
+
+ go_down:
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_DOWN,
+ &extent);
+ if (retval)
+ return retval;
+
+#ifdef DEBUG_GOTO_EXTENTS
+ dbg_print_extent("down", &extent);
+#endif
+ }
+}
+
+errcode_t ext2fs_extent_goto(ext2_extent_handle_t handle,
+ blk64_t blk)
+{
+ return ext2fs_extent_goto2(handle, 0, blk);
+}
+
+/*
+ * Traverse back up to root fixing parents of current node as needed.
+ *
+ * If we changed start of first entry in a node, fix parent index start
+ * and so on.
+ *
+ * Safe to call for any position in node; if not at the first entry,
+ * it will simply return.
+ *
+ * Note a subtlety of this function -- if there happen to be two extents
+ * mapping the same lblk and someone calls fix_parents on the second of the two
+ * extents, the position of the extent handle after the call will be the second
+ * extent if nothing happened, or the first extent if something did. A caller
+ * in this situation must use ext2fs_extent_goto() after calling this function.
+ * Or simply don't map the same lblk with two extents, ever.
+ */
+errcode_t ext2fs_extent_fix_parents(ext2_extent_handle_t handle)
+{
+ int retval = 0;
+ int orig_height;
+ blk64_t start;
+ struct extent_path *path;
+ struct ext2fs_extent extent;
+ struct ext2_extent_info info;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+ if (!(handle->fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if (!handle->path)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ path = handle->path + handle->level;
+ if (!path->curr)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
+ if (retval)
+ goto done;
+
+ /* modified node's start block */
+ start = extent.e_lblk;
+
+ if ((retval = ext2fs_extent_get_info(handle, &info)))
+ return retval;
+ orig_height = info.max_depth - info.curr_level;
+
+ /* traverse up until index not first, or startblk matches, or top */
+ while (handle->level > 0 &&
+ (path->left == path->entries - 1)) {
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP, &extent);
+ if (retval)
+ goto done;
+ if (extent.e_lblk == start)
+ break;
+ path = handle->path + handle->level;
+ extent.e_len += (extent.e_lblk - start);
+ extent.e_lblk = start;
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ if (retval)
+ goto done;
+ update_path(handle);
+ }
+
+ /* put handle back to where we started */
+ retval = ext2fs_extent_goto2(handle, orig_height, start);
+done:
+ return retval;
+}
+
+errcode_t ext2fs_extent_replace(ext2_extent_handle_t handle,
+ int flags EXT2FS_ATTR((unused)),
+ struct ext2fs_extent *extent)
+{
+ struct extent_path *path;
+ struct ext3_extent_idx *ix;
+ struct ext3_extent *ex;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+ if (!(handle->fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if (!handle->path)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ path = handle->path + handle->level;
+ if (!path->curr)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+#ifdef DEBUG
+ printf("extent replace: %u ", handle->ino);
+ dbg_print_extent(0, extent);
+#endif
+
+ if (handle->level == handle->max_depth) {
+ ex = path->curr;
+
+ ex->ee_block = ext2fs_cpu_to_le32(extent->e_lblk);
+ ex->ee_start = ext2fs_cpu_to_le32(extent->e_pblk & 0xFFFFFFFF);
+ ex->ee_start_hi = ext2fs_cpu_to_le16(extent->e_pblk >> 32);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_UNINIT) {
+ if (extent->e_len > EXT_UNINIT_MAX_LEN)
+ return EXT2_ET_EXTENT_INVALID_LENGTH;
+ ex->ee_len = ext2fs_cpu_to_le16(extent->e_len +
+ EXT_INIT_MAX_LEN);
+ } else {
+ if (extent->e_len > EXT_INIT_MAX_LEN)
+ return EXT2_ET_EXTENT_INVALID_LENGTH;
+ ex->ee_len = ext2fs_cpu_to_le16(extent->e_len);
+ }
+ } else {
+ ix = path->curr;
+
+ ix->ei_leaf = ext2fs_cpu_to_le32(extent->e_pblk & 0xFFFFFFFF);
+ ix->ei_leaf_hi = ext2fs_cpu_to_le16(extent->e_pblk >> 32);
+ ix->ei_block = ext2fs_cpu_to_le32(extent->e_lblk);
+ ix->ei_unused = 0;
+ }
+ update_path(handle);
+ return 0;
+}
+
+static int splitting_at_eof(struct ext2_extent_handle *handle,
+ struct extent_path *path)
+{
+ struct extent_path *ppp = path;
+ dump_path(__func__, handle, path);
+
+ if (handle->level == 0)
+ return 0;
+
+ do {
+ if (ppp->left)
+ return 0;
+ ppp--;
+ } while (ppp >= handle->path);
+
+ return 1;
+}
+
+/*
+ * allocate a new block, move half the current node to it, and update parent
+ *
+ * handle will be left pointing at original record.
+ */
+static errcode_t extent_node_split(ext2_extent_handle_t handle,
+ int expand_allowed)
+{
+ errcode_t retval = 0;
+ blk64_t new_node_pblk;
+ blk64_t new_node_start;
+ blk64_t orig_lblk;
+ blk64_t goal_blk = 0;
+ int orig_height;
+ char *block_buf = NULL;
+ struct ext2fs_extent extent;
+ struct extent_path *path, *newpath = 0;
+ struct ext3_extent_header *eh, *neweh;
+ int tocopy;
+ int new_root = 0;
+ struct ext2_extent_info info;
+ int no_balance;
+
+ /* basic sanity */
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+ if (!(handle->fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if (!handle->path)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+#ifdef DEBUG
+ printf("splitting node at level %d\n", handle->level);
+#endif
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
+ if (retval)
+ goto done;
+
+ retval = ext2fs_extent_get_info(handle, &info);
+ if (retval)
+ goto done;
+
+ /* save the position we were originally splitting... */
+ orig_height = info.max_depth - info.curr_level;
+ orig_lblk = extent.e_lblk;
+
+ /* Try to put the index block before the first extent */
+ path = handle->path + handle->level;
+ eh = (struct ext3_extent_header *) path->buf;
+ if (handle->level == handle->max_depth) {
+ struct ext3_extent *ex;
+
+ ex = EXT_FIRST_EXTENT(eh);
+ goal_blk = ext2fs_le32_to_cpu(ex->ee_start) +
+ ((__u64) ext2fs_le16_to_cpu(ex->ee_start_hi) << 32);
+ } else {
+ struct ext3_extent_idx *ix;
+
+ ix = EXT_FIRST_INDEX(eh);
+ goal_blk = ext2fs_le32_to_cpu(ix->ei_leaf) +
+ ((__u64) ext2fs_le16_to_cpu(ix->ei_leaf_hi) << 32);
+ }
+ goal_blk -= EXT2FS_CLUSTER_RATIO(handle->fs);
+ goal_blk &= ~EXT2FS_CLUSTER_MASK(handle->fs);
+
+ /* Is there room in the parent for a new entry? */
+ if (handle->level &&
+ (handle->path[handle->level - 1].entries >=
+ handle->path[handle->level - 1].max_entries)) {
+
+#ifdef DEBUG
+ printf("parent level %d full; splitting it too\n",
+ handle->level - 1);
+#endif
+ /* split the parent */
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP, &extent);
+ if (retval)
+ goto done;
+
+ retval = extent_node_split(handle, expand_allowed);
+ if (retval)
+ goto done;
+
+ /* get handle back to our original split position */
+ retval = ext2fs_extent_goto2(handle, orig_height, orig_lblk);
+ if (retval)
+ goto done;
+ }
+
+ /* At this point, parent should have room for this split */
+ path = handle->path + handle->level;
+ if (!path->curr)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ /*
+ * Normally, we try to split a full node in half. This doesn't turn
+ * out so well if we're tacking extents on the end of the file because
+ * then we're stuck with a tree of half-full extent blocks. This of
+ * course doesn't apply to the root level.
+ */
+ no_balance = expand_allowed ? splitting_at_eof(handle, path) : 0;
+
+ /* extent header of the current node we'll split */
+ eh = (struct ext3_extent_header *)path->buf;
+
+ /* splitting root level means moving them all out */
+ if (handle->level == 0) {
+ new_root = 1;
+ tocopy = ext2fs_le16_to_cpu(eh->eh_entries);
+ retval = ext2fs_get_memzero((handle->max_paths + 1) *
+ sizeof(struct extent_path),
+ &newpath);
+ if (retval)
+ goto done;
+ } else {
+ if (no_balance)
+ tocopy = 1;
+ else
+ tocopy = ext2fs_le16_to_cpu(eh->eh_entries) / 2;
+ }
+
+#ifdef DEBUG
+ printf("will copy out %d of %d entries at level %d\n",
+ tocopy, ext2fs_le16_to_cpu(eh->eh_entries),
+ handle->level);
+#endif
+
+ if (!tocopy && !no_balance) {
+#ifdef DEBUG
+ printf("Nothing to copy to new block!\n");
+#endif
+ retval = EXT2_ET_CANT_SPLIT_EXTENT;
+ goto done;
+ }
+
+ /* first we need a new block, or can do nothing. */
+ block_buf = malloc(handle->fs->blocksize);
+ if (!block_buf) {
+ retval = ENOMEM;
+ goto done;
+ }
+
+ if (!goal_blk)
+ goal_blk = ext2fs_find_inode_goal(handle->fs, handle->ino,
+ handle->inode, 0);
+ retval = ext2fs_alloc_block2(handle->fs, goal_blk, block_buf,
+ &new_node_pblk);
+ if (retval)
+ goto done;
+
+#ifdef DEBUG
+ printf("will copy to new node at block %lu\n",
+ (unsigned long) new_node_pblk);
+#endif
+
+ /* Copy data into new block buffer */
+ /* First the header for the new block... */
+ neweh = (struct ext3_extent_header *) block_buf;
+ memcpy(neweh, eh, sizeof(struct ext3_extent_header));
+ neweh->eh_entries = ext2fs_cpu_to_le16(tocopy);
+ neweh->eh_max = ext2fs_cpu_to_le16((handle->fs->blocksize -
+ sizeof(struct ext3_extent_header)) /
+ sizeof(struct ext3_extent));
+
+ /* then the entries for the new block... */
+ memcpy(EXT_FIRST_INDEX(neweh),
+ EXT_FIRST_INDEX(eh) +
+ (ext2fs_le16_to_cpu(eh->eh_entries) - tocopy),
+ sizeof(struct ext3_extent_idx) * tocopy);
+
+ new_node_start = ext2fs_le32_to_cpu(EXT_FIRST_INDEX(neweh)->ei_block);
+
+ /* then update the checksum */
+ retval = ext2fs_extent_block_csum_set(handle->fs, handle->ino, neweh);
+ if (retval)
+ goto done;
+
+ /* ...and write the new node block out to disk. */
+ retval = io_channel_write_blk64(handle->fs->io, new_node_pblk, 1,
+ block_buf);
+
+ if (retval)
+ goto done;
+
+ /* OK! we've created the new node; now adjust the tree */
+
+ /* current path now has fewer active entries, we copied some out */
+ if (handle->level == 0) {
+ memcpy(newpath, path,
+ sizeof(struct extent_path) * handle->max_paths);
+ handle->path = newpath;
+ newpath = path;
+ path = handle->path;
+ path->entries = 1;
+ path->left = path->max_entries - 1;
+ handle->max_depth++;
+ handle->max_paths++;
+ eh->eh_depth = ext2fs_cpu_to_le16(handle->max_depth);
+ } else {
+ path->entries -= tocopy;
+ path->left -= tocopy;
+ }
+
+ eh->eh_entries = ext2fs_cpu_to_le16(path->entries);
+ /* this writes out the node, incl. the modified header */
+ retval = update_path(handle);
+ if (retval)
+ goto done;
+
+ /* now go up and insert/replace index for new node we created */
+ if (new_root) {
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_FIRST_SIB, &extent);
+ if (retval)
+ goto done;
+
+ extent.e_lblk = new_node_start;
+ extent.e_pblk = new_node_pblk;
+ extent.e_len = handle->path[0].end_blk - extent.e_lblk;
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ if (retval)
+ goto done;
+ } else {
+ __u32 new_node_length;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP, &extent);
+ /* will insert after this one; it's length is shorter now */
+ new_node_length = new_node_start - extent.e_lblk;
+ extent.e_len -= new_node_length;
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ if (retval)
+ goto done;
+
+ /* now set up the new extent and insert it */
+ extent.e_lblk = new_node_start;
+ extent.e_pblk = new_node_pblk;
+ extent.e_len = new_node_length;
+ retval = ext2fs_extent_insert(handle, EXT2_EXTENT_INSERT_AFTER, &extent);
+ if (retval)
+ goto done;
+ }
+
+ /* get handle back to our original position */
+ retval = ext2fs_extent_goto2(handle, orig_height, orig_lblk);
+ if (retval)
+ goto done;
+
+ /* new node hooked in, so update inode block count (do this here?) */
+ ext2fs_iblk_add_blocks(handle->fs, handle->inode, 1);
+ retval = ext2fs_write_inode(handle->fs, handle->ino,
+ handle->inode);
+ if (retval)
+ goto done;
+
+done:
+ if (newpath)
+ ext2fs_free_mem(&newpath);
+ free(block_buf);
+
+ return retval;
+}
+
+errcode_t ext2fs_extent_node_split(ext2_extent_handle_t handle)
+{
+ return extent_node_split(handle, 0);
+}
+
+errcode_t ext2fs_extent_insert(ext2_extent_handle_t handle, int flags,
+ struct ext2fs_extent *extent)
+{
+ struct extent_path *path;
+ struct ext3_extent_idx *ix;
+ struct ext3_extent_header *eh;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+ if (!(handle->fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if (!handle->path)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+#ifdef DEBUG
+ printf("extent insert: %u ", handle->ino);
+ dbg_print_extent(0, extent);
+#endif
+
+ path = handle->path + handle->level;
+
+ if (path->entries >= path->max_entries) {
+ if (flags & EXT2_EXTENT_INSERT_NOSPLIT) {
+ return EXT2_ET_CANT_INSERT_EXTENT;
+ } else {
+#ifdef DEBUG
+ printf("node full (level %d) - splitting\n",
+ handle->level);
+#endif
+ retval = extent_node_split(handle, 1);
+ if (retval)
+ return retval;
+ path = handle->path + handle->level;
+ }
+ }
+
+ eh = (struct ext3_extent_header *) path->buf;
+ if (path->curr) {
+ ix = path->curr;
+ if (flags & EXT2_EXTENT_INSERT_AFTER) {
+ ix++;
+ path->left--;
+ }
+ } else {
+ ix = EXT_FIRST_INDEX(eh);
+ path->left = -1;
+ }
+
+ path->curr = ix;
+
+ if (path->left >= 0)
+ memmove(ix + 1, ix,
+ (path->left+1) * sizeof(struct ext3_extent_idx));
+ path->left++;
+ path->entries++;
+
+ eh = (struct ext3_extent_header *) path->buf;
+ eh->eh_entries = ext2fs_cpu_to_le16(path->entries);
+
+ retval = ext2fs_extent_replace(handle, 0, extent);
+ if (retval)
+ goto errout;
+
+ retval = update_path(handle);
+ if (retval)
+ goto errout;
+
+ return 0;
+
+errout:
+ ext2fs_extent_delete(handle, 0);
+ return retval;
+}
+
+/*
+ * Sets the physical block for a logical file block in the extent tree.
+ *
+ * May: map unmapped, unmap mapped, or remap mapped blocks.
+ *
+ * Mapping an unmapped block adds a single-block extent.
+ *
+ * Unmapping first or last block modifies extent in-place
+ * - But may need to fix parent's starts too in first-block case
+ *
+ * Mapping any unmapped block requires adding a (single-block) extent
+ * and inserting into proper point in tree.
+ *
+ * Modifying (unmapping or remapping) a block in the middle
+ * of an extent requires splitting the extent.
+ * - Remapping case requires new single-block extent.
+ *
+ * Remapping first or last block adds an extent.
+ *
+ * We really need extent adding to be smart about merging.
+ */
+
+errcode_t ext2fs_extent_set_bmap(ext2_extent_handle_t handle,
+ blk64_t logical, blk64_t physical, int flags)
+{
+ errcode_t ec, retval = 0;
+ int mapped = 1; /* logical is mapped? */
+ int orig_height;
+ int extent_uninit = 0;
+ int prev_uninit = 0;
+ int next_uninit = 0;
+ int new_uninit = 0;
+ int max_len = EXT_INIT_MAX_LEN;
+ int has_prev, has_next;
+ blk64_t orig_lblk;
+ struct extent_path *path;
+ struct ext2fs_extent extent, next_extent, prev_extent;
+ struct ext2fs_extent newextent;
+ struct ext2_extent_info info;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+#ifdef DEBUG
+ printf("set_bmap ino %u log %lld phys %lld flags %d\n",
+ handle->ino, logical, physical, flags);
+#endif
+
+ if (!(handle->fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if (!handle->path)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ path = handle->path + handle->level;
+
+ if (flags & EXT2_EXTENT_SET_BMAP_UNINIT) {
+ new_uninit = 1;
+ max_len = EXT_UNINIT_MAX_LEN;
+ }
+
+ /* if (re)mapping, set up new extent to insert */
+ if (physical) {
+ newextent.e_len = 1;
+ newextent.e_pblk = physical;
+ newextent.e_lblk = logical;
+ newextent.e_flags = EXT2_EXTENT_FLAGS_LEAF;
+ if (new_uninit)
+ newextent.e_flags |= EXT2_EXTENT_FLAGS_UNINIT;
+ }
+
+ /* special case if the extent tree is completely empty */
+ if ((handle->max_depth == 0) && (path->entries == 0)) {
+ retval = ext2fs_extent_insert(handle, 0, &newextent);
+ return retval;
+ }
+
+ /* save our original location in the extent tree */
+ if ((retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT,
+ &extent))) {
+ if (retval != EXT2_ET_NO_CURRENT_NODE)
+ return retval;
+ memset(&extent, 0, sizeof(extent));
+ }
+ if ((retval = ext2fs_extent_get_info(handle, &info)))
+ return retval;
+ orig_height = info.max_depth - info.curr_level;
+ orig_lblk = extent.e_lblk;
+
+ /* go to the logical spot we want to (re/un)map */
+ retval = ext2fs_extent_goto(handle, logical);
+ if (retval) {
+ if (retval == EXT2_ET_EXTENT_NOT_FOUND) {
+ retval = 0;
+ mapped = 0;
+ if (!physical) {
+#ifdef DEBUG
+ printf("block %llu already unmapped\n",
+ logical);
+#endif
+ goto done;
+ }
+ } else
+ goto done;
+ }
+
+ /*
+ * This may be the extent *before* the requested logical,
+ * if it's currently unmapped.
+ *
+ * Get the previous and next leaf extents, if they are present.
+ */
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
+ if (retval)
+ goto done;
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ extent_uninit = 1;
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT_LEAF, &next_extent);
+ if (retval) {
+ has_next = 0;
+ if (retval != EXT2_ET_EXTENT_NO_NEXT)
+ goto done;
+ } else {
+ dbg_print_extent("set_bmap: next_extent",
+ &next_extent);
+ has_next = 1;
+ if (next_extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ next_uninit = 1;
+ }
+ retval = ext2fs_extent_goto(handle, logical);
+ if (retval && retval != EXT2_ET_EXTENT_NOT_FOUND)
+ goto done;
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_PREV_LEAF, &prev_extent);
+ if (retval) {
+ has_prev = 0;
+ if (retval != EXT2_ET_EXTENT_NO_PREV)
+ goto done;
+ } else {
+ has_prev = 1;
+ dbg_print_extent("set_bmap: prev_extent",
+ &prev_extent);
+ if (prev_extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ prev_uninit = 1;
+ }
+ retval = ext2fs_extent_goto(handle, logical);
+ if (retval && retval != EXT2_ET_EXTENT_NOT_FOUND)
+ goto done;
+
+ /* check if already pointing to the requested physical */
+ if (mapped && (new_uninit == extent_uninit) &&
+ (extent.e_pblk + (logical - extent.e_lblk) == physical)) {
+#ifdef DEBUG
+ printf("physical block (at %llu) unchanged\n", logical);
+#endif
+ goto done;
+ }
+
+ if (!mapped) {
+#ifdef DEBUG
+ printf("mapping unmapped logical block %llu\n", logical);
+#endif
+ if ((logical == extent.e_lblk + extent.e_len) &&
+ (physical == extent.e_pblk + extent.e_len) &&
+ (new_uninit == extent_uninit) &&
+ ((int) extent.e_len < max_len-1)) {
+ extent.e_len++;
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ } else if ((logical == extent.e_lblk - 1) &&
+ (physical == extent.e_pblk - 1) &&
+ (new_uninit == extent_uninit) &&
+ ((int) extent.e_len < max_len - 1)) {
+ extent.e_len++;
+ extent.e_lblk--;
+ extent.e_pblk--;
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ } else if (has_next &&
+ (logical == next_extent.e_lblk - 1) &&
+ (physical == next_extent.e_pblk - 1) &&
+ (new_uninit == next_uninit) &&
+ ((int) next_extent.e_len < max_len - 1)) {
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_NEXT_LEAF,
+ &next_extent);
+ if (retval)
+ goto done;
+ next_extent.e_len++;
+ next_extent.e_lblk--;
+ next_extent.e_pblk--;
+ retval = ext2fs_extent_replace(handle, 0, &next_extent);
+ } else if (logical < extent.e_lblk)
+ retval = ext2fs_extent_insert(handle, 0, &newextent);
+ else
+ retval = ext2fs_extent_insert(handle,
+ EXT2_EXTENT_INSERT_AFTER, &newextent);
+ if (retval)
+ goto done;
+ retval = ext2fs_extent_fix_parents(handle);
+ if (retval)
+ goto done;
+ } else if ((logical == extent.e_lblk) && (extent.e_len == 1)) {
+#ifdef DEBUG
+ printf("(re/un)mapping only block in extent\n");
+#endif
+ if (physical) {
+ retval = ext2fs_extent_replace(handle, 0, &newextent);
+ } else {
+ retval = ext2fs_extent_delete(handle, 0);
+ if (retval)
+ goto done;
+ ec = ext2fs_extent_fix_parents(handle);
+ if (ec != EXT2_ET_NO_CURRENT_NODE)
+ retval = ec;
+ }
+
+ if (retval)
+ goto done;
+ } else if (logical == extent.e_lblk + extent.e_len - 1) {
+#ifdef DEBUG
+ printf("(re/un)mapping last block in extent\n");
+#endif
+ if (physical) {
+ if (has_next &&
+ (logical == (next_extent.e_lblk - 1)) &&
+ (physical == (next_extent.e_pblk - 1)) &&
+ (new_uninit == next_uninit) &&
+ ((int) next_extent.e_len < max_len - 1)) {
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_NEXT_LEAF, &next_extent);
+ if (retval)
+ goto done;
+ next_extent.e_len++;
+ next_extent.e_lblk--;
+ next_extent.e_pblk--;
+ retval = ext2fs_extent_replace(handle, 0,
+ &next_extent);
+ if (retval)
+ goto done;
+ } else
+ retval = ext2fs_extent_insert(handle,
+ EXT2_EXTENT_INSERT_AFTER, &newextent);
+ if (retval)
+ goto done;
+ retval = ext2fs_extent_fix_parents(handle);
+ if (retval)
+ goto done;
+ /*
+ * Now pointing at inserted extent; move back to prev.
+ *
+ * We cannot use EXT2_EXTENT_PREV to go back; note the
+ * subtlety in the comment for fix_parents().
+ */
+ retval = ext2fs_extent_goto(handle, logical);
+ if (retval)
+ goto done;
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_CURRENT,
+ &extent);
+ if (retval)
+ goto done;
+ }
+ extent.e_len--;
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ if (retval)
+ goto done;
+ } else if (logical == extent.e_lblk) {
+#ifdef DEBUG
+ printf("(re/un)mapping first block in extent\n");
+#endif
+ if (physical) {
+ if (has_prev &&
+ (logical == (prev_extent.e_lblk +
+ prev_extent.e_len)) &&
+ (physical == (prev_extent.e_pblk +
+ prev_extent.e_len)) &&
+ (new_uninit == prev_uninit) &&
+ ((int) prev_extent.e_len < max_len-1)) {
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_PREV_LEAF, &prev_extent);
+ if (retval)
+ goto done;
+ prev_extent.e_len++;
+ retval = ext2fs_extent_replace(handle, 0,
+ &prev_extent);
+ } else
+ retval = ext2fs_extent_insert(handle,
+ 0, &newextent);
+ if (retval)
+ goto done;
+ retval = ext2fs_extent_fix_parents(handle);
+ if (retval)
+ goto done;
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_NEXT_LEAF,
+ &extent);
+ if (retval)
+ goto done;
+ }
+ extent.e_pblk++;
+ extent.e_lblk++;
+ extent.e_len--;
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ if (retval)
+ goto done;
+ retval = ext2fs_extent_fix_parents(handle);
+ if (retval)
+ goto done;
+ } else {
+ __u32 save_length;
+ blk64_t save_lblk;
+ struct ext2fs_extent save_extent;
+ errcode_t r2;
+
+#ifdef DEBUG
+ printf("(re/un)mapping in middle of extent\n");
+#endif
+ /* need to split this extent; later */
+ save_lblk = extent.e_lblk;
+ save_length = extent.e_len;
+ save_extent = extent;
+
+ /* shorten pre-split extent */
+ extent.e_len = (logical - extent.e_lblk);
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ if (retval)
+ goto done;
+ /* insert our new extent, if any */
+ if (physical) {
+ /* insert new extent after current */
+ retval = ext2fs_extent_insert(handle,
+ EXT2_EXTENT_INSERT_AFTER, &newextent);
+ if (retval) {
+ r2 = ext2fs_extent_goto(handle, save_lblk);
+ if (r2 == 0)
+ (void)ext2fs_extent_replace(handle, 0,
+ &save_extent);
+ goto done;
+ }
+ }
+ /* add post-split extent */
+ extent.e_pblk += extent.e_len + 1;
+ extent.e_lblk += extent.e_len + 1;
+ extent.e_len = save_length - extent.e_len - 1;
+ retval = ext2fs_extent_insert(handle,
+ EXT2_EXTENT_INSERT_AFTER, &extent);
+ if (retval) {
+ if (physical) {
+ r2 = ext2fs_extent_goto(handle,
+ newextent.e_lblk);
+ if (r2 == 0)
+ (void)ext2fs_extent_delete(handle, 0);
+ }
+ r2 = ext2fs_extent_goto(handle, save_lblk);
+ if (r2 == 0)
+ (void)ext2fs_extent_replace(handle, 0,
+ &save_extent);
+ goto done;
+ }
+ }
+
+done:
+ /* get handle back to its position */
+ if (orig_height > handle->max_depth)
+ orig_height = handle->max_depth; /* In case we shortened the tree */
+ ext2fs_extent_goto2(handle, orig_height, orig_lblk);
+ return retval;
+}
+
+errcode_t ext2fs_extent_delete(ext2_extent_handle_t handle, int flags)
+{
+ struct extent_path *path;
+ char *cp;
+ struct ext3_extent_header *eh;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+ if (!(handle->fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if (!handle->path)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+#ifdef DEBUG
+ {
+ struct ext2fs_extent extent;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT,
+ &extent);
+ if (retval == 0) {
+ printf("extent delete %u ", handle->ino);
+ dbg_print_extent(0, &extent);
+ }
+ }
+#endif
+
+ path = handle->path + handle->level;
+ if (!path->curr)
+ return EXT2_ET_NO_CURRENT_NODE;
+
+ cp = path->curr;
+
+ /* Sanity check before memmove() */
+ if (path->left < 0)
+ return EXT2_ET_EXTENT_LEAF_BAD;
+
+ if (path->left) {
+ memmove(cp, cp + sizeof(struct ext3_extent_idx),
+ path->left * sizeof(struct ext3_extent_idx));
+ path->left--;
+ } else {
+ struct ext3_extent_idx *ix = path->curr;
+ ix--;
+ path->curr = ix;
+ }
+ if (--path->entries == 0)
+ path->curr = 0;
+
+ /* if non-root node has no entries left, remove it & parent ptr to it */
+ if (path->entries == 0 && handle->level) {
+ if (!(flags & EXT2_EXTENT_DELETE_KEEP_EMPTY)) {
+ struct ext2fs_extent extent;
+
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP,
+ &extent);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_extent_delete(handle, flags);
+ handle->inode->i_blocks -=
+ (handle->fs->blocksize *
+ EXT2FS_CLUSTER_RATIO(handle->fs)) / 512;
+ retval = ext2fs_write_inode(handle->fs, handle->ino,
+ handle->inode);
+ ext2fs_block_alloc_stats2(handle->fs,
+ extent.e_pblk, -1);
+ }
+ } else {
+ eh = (struct ext3_extent_header *) path->buf;
+ eh->eh_entries = ext2fs_cpu_to_le16(path->entries);
+ if ((path->entries == 0) && (handle->level == 0)) {
+ eh->eh_depth = 0;
+ handle->max_depth = 0;
+ }
+ retval = update_path(handle);
+ }
+ return retval;
+}
+
+errcode_t ext2fs_extent_get_info(ext2_extent_handle_t handle,
+ struct ext2_extent_info *info)
+{
+ struct extent_path *path;
+
+ EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EXTENT_HANDLE);
+
+ memset(info, 0, sizeof(struct ext2_extent_info));
+
+ path = handle->path + handle->level;
+ if (path) {
+ if (path->curr)
+ info->curr_entry = ((char *) path->curr - path->buf) /
+ sizeof(struct ext3_extent_idx);
+ else
+ info->curr_entry = 0;
+ info->num_entries = path->entries;
+ info->max_entries = path->max_entries;
+ info->bytes_avail = (path->max_entries - path->entries) *
+ sizeof(struct ext3_extent);
+ }
+
+ info->curr_level = handle->level;
+ info->max_depth = handle->max_depth;
+ info->max_lblk = EXT_MAX_EXTENT_LBLK;
+ info->max_pblk = EXT_MAX_EXTENT_PBLK;
+ info->max_len = EXT_INIT_MAX_LEN;
+ info->max_uninit_len = EXT_UNINIT_MAX_LEN;
+
+ return 0;
+}
+
+static int ul_log2(unsigned long arg)
+{
+ int l = 0;
+
+ arg >>= 1;
+ while (arg) {
+ l++;
+ arg >>= 1;
+ }
+ return l;
+}
+
+size_t ext2fs_max_extent_depth(ext2_extent_handle_t handle)
+{
+ size_t iblock_sz = sizeof(((struct ext2_inode *)NULL)->i_block);
+ size_t iblock_extents = (iblock_sz - sizeof(struct ext3_extent_header)) /
+ sizeof(struct ext3_extent);
+ size_t extents_per_block = (handle->fs->blocksize -
+ sizeof(struct ext3_extent_header)) /
+ sizeof(struct ext3_extent);
+ static unsigned int last_blocksize = 0;
+ static size_t last_result = 0;
+
+ if (last_blocksize && last_blocksize == handle->fs->blocksize)
+ return last_result;
+
+ last_result = 1 + ((ul_log2(EXT_MAX_EXTENT_LBLK) - ul_log2(iblock_extents)) /
+ ul_log2(extents_per_block));
+ last_blocksize = handle->fs->blocksize;
+ return last_result;
+}
+
+errcode_t ext2fs_fix_extents_checksums(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ ext2_extent_handle_t handle;
+ struct ext2fs_extent extent;
+ errcode_t errcode;
+ int save_flags = fs->flags;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super) ||
+ (inode && !(inode->i_flags & EXT4_EXTENTS_FL)))
+ return 0;
+
+ errcode = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (errcode) {
+ if (errcode == EXT2_ET_INODE_NOT_EXTENT)
+ errcode = 0;
+ return errcode;
+ }
+
+ fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ errcode = ext2fs_extent_get(handle, EXT2_EXTENT_ROOT, &extent);
+ if (errcode)
+ goto out;
+
+ do {
+ /* Skip to the end of a block of leaf nodes */
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_LEAF) {
+ errcode = ext2fs_extent_get(handle,
+ EXT2_EXTENT_LAST_SIB,
+ &extent);
+ if (errcode)
+ break;
+ }
+
+ errcode = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT, &extent);
+ if (errcode == EXT2_ET_EXTENT_CSUM_INVALID)
+ errcode = update_path(handle);
+ } while (errcode == 0);
+
+out:
+ /* Ok if we run off the end */
+ if (errcode == EXT2_ET_EXTENT_NO_NEXT)
+ errcode = 0;
+ ext2fs_extent_free(handle);
+ fs->flags = save_flags;
+ return errcode;
+}
+
+errcode_t ext2fs_decode_extent(struct ext2fs_extent *to, void *addr, int len)
+{
+ struct ext3_extent *from = (struct ext3_extent *)addr;
+
+ if (len != sizeof(struct ext3_extent))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ to->e_pblk = ext2fs_le32_to_cpu(from->ee_start) +
+ ((__u64) ext2fs_le16_to_cpu(from->ee_start_hi)
+ << 32);
+ to->e_lblk = ext2fs_le32_to_cpu(from->ee_block);
+ to->e_len = ext2fs_le16_to_cpu(from->ee_len);
+ to->e_flags = EXT2_EXTENT_FLAGS_LEAF;
+ if (to->e_len > EXT_INIT_MAX_LEN) {
+ to->e_len -= EXT_INIT_MAX_LEN;
+ to->e_flags |= EXT2_EXTENT_FLAGS_UNINIT;
+ }
+
+ return 0;
+}
+
+errcode_t ext2fs_count_blocks(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t *ret_count)
+{
+ ext2_extent_handle_t handle = NULL;
+ struct ext2fs_extent extent;
+ errcode_t errcode;
+ int i;
+ blk64_t blkcount = 0;
+ blk64_t *intermediate_nodes;
+
+ errcode = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (errcode)
+ goto out;
+
+ errcode = ext2fs_extent_get(handle, EXT2_EXTENT_ROOT, &extent);
+ if (errcode)
+ goto out;
+
+ errcode = ext2fs_get_array(handle->max_depth, sizeof(blk64_t),
+ &intermediate_nodes);
+ if (errcode)
+ goto out;
+
+ blkcount = handle->level;
+ while (!errcode) {
+ if (extent.e_flags & EXT2_EXTENT_FLAGS_LEAF) {
+ blkcount += extent.e_len;
+ for (i = 0; i < handle->level; i++) {
+ if (intermediate_nodes[i] !=
+ handle->path[i].end_blk) {
+ blkcount++;
+ intermediate_nodes[i] =
+ handle->path[i].end_blk;
+ }
+ }
+ }
+ errcode = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT, &extent);
+ }
+ ext2fs_free_mem(&intermediate_nodes);
+out:
+ *ret_count = blkcount;
+ ext2fs_extent_free(handle);
+
+ return 0;
+}
+
+#ifdef DEBUG
+/*
+ * Override debugfs's prompt
+ */
+const char *debug_prog_name = "tst_extents";
+
+#endif
+
diff --git a/lib/ext2fs/fallocate.c b/lib/ext2fs/fallocate.c
new file mode 100644
index 0000000..5cde7d5
--- /dev/null
+++ b/lib/ext2fs/fallocate.c
@@ -0,0 +1,873 @@
+/*
+ * fallocate.c -- Allocate large chunks of file.
+ *
+ * Copyright (C) 2014 Oracle.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#define min(a, b) ((a) < (b) ? (a) : (b))
+
+#undef DEBUG
+
+#ifdef DEBUG
+# define dbg_printf(f, a...) do {printf(f, ## a); fflush(stdout); } while (0)
+#else
+# define dbg_printf(f, a...)
+#endif
+
+/*
+ * Extent-based fallocate code.
+ *
+ * Find runs of unmapped logical blocks by starting at start and walking the
+ * extents until we reach the end of the range we want.
+ *
+ * For each run of unmapped blocks, try to find the extents on either side of
+ * the range. If there's a left extent that can grow by at least a cluster and
+ * there are lblocks between start and the next lcluster after start, see if
+ * there's an implied cluster allocation; if so, zero the blocks (if the left
+ * extent is initialized) and adjust the extent. Ditto for the blocks between
+ * the end of the last full lcluster and end, if there's a right extent.
+ *
+ * Try to attach as much as we can to the left extent, then try to attach as
+ * much as we can to the right extent. For the remainder, try to allocate the
+ * whole range; map in whatever we get; and repeat until we're done.
+ *
+ * To attach to a left extent, figure out the maximum amount we can add to the
+ * extent and try to allocate that much, and append if successful. To attach
+ * to a right extent, figure out the max we can add to the extent, try to
+ * allocate that much, and prepend if successful.
+ *
+ * We need an alloc_range function that tells us how much we can allocate given
+ * a maximum length and one of a suggested start, a fixed start, or a fixed end
+ * point.
+ *
+ * Every time we modify the extent tree we also need to update the block stats.
+ *
+ * At the end, update i_blocks and i_size appropriately.
+ */
+
+static void dbg_print_extent(const char *desc EXT2FS_ATTR((unused)),
+ const struct ext2fs_extent *extent EXT2FS_ATTR((unused)))
+{
+#ifdef DEBUG
+ if (desc)
+ printf("%s: ", desc);
+ printf("extent: lblk %llu--%llu, len %u, pblk %llu, flags: ",
+ extent->e_lblk, extent->e_lblk + extent->e_len - 1,
+ extent->e_len, extent->e_pblk);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_LEAF)
+ fputs("LEAF ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fputs("UNINIT ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT)
+ fputs("2ND_VISIT ", stdout);
+ if (!extent->e_flags)
+ fputs("(none)", stdout);
+ fputc('\n', stdout);
+ fflush(stdout);
+#endif
+}
+
+static errcode_t claim_range(ext2_filsys fs, struct ext2_inode *inode,
+ blk64_t blk, blk64_t len)
+{
+ blk64_t clusters;
+
+ clusters = (len + EXT2FS_CLUSTER_RATIO(fs) - 1) /
+ EXT2FS_CLUSTER_RATIO(fs);
+ ext2fs_block_alloc_stats_range(fs, blk,
+ clusters * EXT2FS_CLUSTER_RATIO(fs), +1);
+ return ext2fs_iblk_add_blocks(fs, inode, clusters);
+}
+
+static errcode_t ext_falloc_helper(ext2_filsys fs,
+ int flags,
+ ext2_ino_t ino,
+ struct ext2_inode *inode,
+ ext2_extent_handle_t handle,
+ struct ext2fs_extent *left_ext,
+ struct ext2fs_extent *right_ext,
+ blk64_t range_start, blk64_t range_len,
+ blk64_t alloc_goal)
+{
+ struct ext2fs_extent newex, ex;
+ int op;
+ blk64_t fillable, pblk, plen, x, y;
+ blk64_t eof_blk = 0, cluster_fill = 0;
+ errcode_t err;
+ blk_t max_extent_len, max_uninit_len, max_init_len;
+
+#ifdef DEBUG
+ printf("%s: ", __func__);
+ if (left_ext)
+ printf("left_ext=%llu--%llu, ", left_ext->e_lblk,
+ left_ext->e_lblk + left_ext->e_len - 1);
+ if (right_ext)
+ printf("right_ext=%llu--%llu, ", right_ext->e_lblk,
+ right_ext->e_lblk + right_ext->e_len - 1);
+ printf("start=%llu len=%llu, goal=%llu\n", range_start, range_len,
+ alloc_goal);
+ fflush(stdout);
+#endif
+ /* Can't create initialized extents past EOF? */
+ if (!(flags & EXT2_FALLOCATE_INIT_BEYOND_EOF))
+ eof_blk = EXT2_I_SIZE(inode) / fs->blocksize;
+
+ /* The allocation goal must be as far into a cluster as range_start. */
+ alloc_goal = (alloc_goal & ~EXT2FS_CLUSTER_MASK(fs)) |
+ (range_start & EXT2FS_CLUSTER_MASK(fs));
+
+ max_uninit_len = EXT_UNINIT_MAX_LEN & ~EXT2FS_CLUSTER_MASK(fs);
+ max_init_len = EXT_INIT_MAX_LEN & ~EXT2FS_CLUSTER_MASK(fs);
+
+ /* We must lengthen the left extent to the end of the cluster */
+ if (left_ext && EXT2FS_CLUSTER_RATIO(fs) > 1) {
+ /* How many more blocks can be attached to left_ext? */
+ if (left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fillable = max_uninit_len - left_ext->e_len;
+ else
+ fillable = max_init_len - left_ext->e_len;
+
+ if (fillable > range_len)
+ fillable = range_len;
+ if (fillable == 0)
+ goto expand_right;
+
+ /*
+ * If range_start isn't on a cluster boundary, try an
+ * implied cluster allocation for left_ext.
+ */
+ cluster_fill = EXT2FS_CLUSTER_RATIO(fs) -
+ (range_start & EXT2FS_CLUSTER_MASK(fs));
+ cluster_fill &= EXT2FS_CLUSTER_MASK(fs);
+ if (cluster_fill == 0)
+ goto expand_right;
+
+ if (cluster_fill > fillable)
+ cluster_fill = fillable;
+
+ /* Don't expand an initialized left_ext beyond EOF */
+ if (!(flags & EXT2_FALLOCATE_INIT_BEYOND_EOF)) {
+ x = left_ext->e_lblk + left_ext->e_len - 1;
+ dbg_printf("%s: lend=%llu newlend=%llu eofblk=%llu\n",
+ __func__, x, x + cluster_fill, eof_blk);
+ if (eof_blk >= x && eof_blk <= x + cluster_fill)
+ cluster_fill = eof_blk - x;
+ if (cluster_fill == 0)
+ goto expand_right;
+ }
+
+ err = ext2fs_extent_goto(handle, left_ext->e_lblk);
+ if (err)
+ goto expand_right;
+ left_ext->e_len += cluster_fill;
+ range_start += cluster_fill;
+ range_len -= cluster_fill;
+ alloc_goal += cluster_fill;
+
+ dbg_print_extent("ext_falloc clus left+", left_ext);
+ err = ext2fs_extent_replace(handle, 0, left_ext);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+
+ /* Zero blocks */
+ if (!(left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)) {
+ err = ext2fs_zero_blocks2(fs, left_ext->e_pblk +
+ left_ext->e_len -
+ cluster_fill, cluster_fill,
+ NULL, NULL);
+ if (err)
+ goto out;
+ }
+ }
+
+expand_right:
+ /* We must lengthen the right extent to the beginning of the cluster */
+ if (right_ext && EXT2FS_CLUSTER_RATIO(fs) > 1) {
+ /* How much can we attach to right_ext? */
+ if (right_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fillable = max_uninit_len - right_ext->e_len;
+ else
+ fillable = max_init_len - right_ext->e_len;
+
+ if (fillable > range_len)
+ fillable = range_len;
+ if (fillable == 0)
+ goto try_merge;
+
+ /*
+ * If range_end isn't on a cluster boundary, try an implied
+ * cluster allocation for right_ext.
+ */
+ cluster_fill = right_ext->e_lblk & EXT2FS_CLUSTER_MASK(fs);
+ if (cluster_fill == 0)
+ goto try_merge;
+
+ err = ext2fs_extent_goto(handle, right_ext->e_lblk);
+ if (err)
+ goto out;
+
+ if (cluster_fill > fillable)
+ cluster_fill = fillable;
+ right_ext->e_lblk -= cluster_fill;
+ right_ext->e_pblk -= cluster_fill;
+ right_ext->e_len += cluster_fill;
+ range_len -= cluster_fill;
+
+ dbg_print_extent("ext_falloc clus right+", right_ext);
+ err = ext2fs_extent_replace(handle, 0, right_ext);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+
+ /* Zero blocks if necessary */
+ if (!(right_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)) {
+ err = ext2fs_zero_blocks2(fs, right_ext->e_pblk,
+ cluster_fill, NULL, NULL);
+ if (err)
+ goto out;
+ }
+ }
+
+try_merge:
+ /* Merge both extents together, perhaps? */
+ if (left_ext && right_ext) {
+ /* Are the two extents mergeable? */
+ if ((left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT) !=
+ (right_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT))
+ goto try_left;
+
+ /* User requires init/uninit but extent is uninit/init. */
+ if (((flags & EXT2_FALLOCATE_FORCE_INIT) &&
+ (left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)) ||
+ ((flags & EXT2_FALLOCATE_FORCE_UNINIT) &&
+ !(left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)))
+ goto try_left;
+
+ /*
+ * Skip initialized extent unless user wants to zero blocks
+ * or requires init extent.
+ */
+ if (!(left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ (!(flags & EXT2_FALLOCATE_ZERO_BLOCKS) ||
+ !(flags & EXT2_FALLOCATE_FORCE_INIT)))
+ goto try_left;
+
+ /* Will it even fit? */
+ x = left_ext->e_len + range_len + right_ext->e_len;
+ if (x > (left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT ?
+ max_uninit_len : max_init_len))
+ goto try_left;
+
+ err = ext2fs_extent_goto(handle, left_ext->e_lblk);
+ if (err)
+ goto try_left;
+
+ /* Allocate blocks */
+ y = left_ext->e_pblk + left_ext->e_len;
+ err = ext2fs_new_range(fs, EXT2_NEWRANGE_FIXED_GOAL |
+ EXT2_NEWRANGE_MIN_LENGTH, y,
+ right_ext->e_pblk - y + 1, NULL,
+ &pblk, &plen);
+ if (err)
+ goto try_left;
+ if (pblk + plen != right_ext->e_pblk)
+ goto try_left;
+ err = claim_range(fs, inode, pblk, plen);
+ if (err)
+ goto out;
+
+ /* Modify extents */
+ left_ext->e_len = x;
+ dbg_print_extent("ext_falloc merge", left_ext);
+ err = ext2fs_extent_replace(handle, 0, left_ext);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+ err = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT_LEAF, &newex);
+ if (err)
+ goto out;
+ err = ext2fs_extent_delete(handle, 0);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+ *right_ext = *left_ext;
+
+ /* Zero blocks */
+ if (!(left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ (flags & EXT2_FALLOCATE_ZERO_BLOCKS)) {
+ err = ext2fs_zero_blocks2(fs, range_start, range_len,
+ NULL, NULL);
+ if (err)
+ goto out;
+ }
+
+ return 0;
+ }
+
+try_left:
+ /* Extend the left extent */
+ if (left_ext) {
+ /* How many more blocks can be attached to left_ext? */
+ if (left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fillable = max_uninit_len - left_ext->e_len;
+ else if (flags & EXT2_FALLOCATE_ZERO_BLOCKS)
+ fillable = max_init_len - left_ext->e_len;
+ else
+ fillable = 0;
+
+ /* User requires init/uninit but extent is uninit/init. */
+ if (((flags & EXT2_FALLOCATE_FORCE_INIT) &&
+ (left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)) ||
+ ((flags & EXT2_FALLOCATE_FORCE_UNINIT) &&
+ !(left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)))
+ goto try_right;
+
+ if (fillable > range_len)
+ fillable = range_len;
+
+ /* Don't expand an initialized left_ext beyond EOF */
+ x = left_ext->e_lblk + left_ext->e_len - 1;
+ if (!(flags & EXT2_FALLOCATE_INIT_BEYOND_EOF)) {
+ dbg_printf("%s: lend=%llu newlend=%llu eofblk=%llu\n",
+ __func__, x, x + fillable, eof_blk);
+ if (eof_blk >= x && eof_blk <= x + fillable)
+ fillable = eof_blk - x;
+ }
+
+ if (fillable == 0)
+ goto try_right;
+
+ /* Test if the right edge of the range is already mapped? */
+ if (EXT2FS_CLUSTER_RATIO(fs) > 1) {
+ err = ext2fs_map_cluster_block(fs, ino, inode,
+ x + fillable, &pblk);
+ if (err)
+ goto out;
+ if (pblk)
+ fillable -= 1 + ((x + fillable)
+ & EXT2FS_CLUSTER_MASK(fs));
+ if (fillable == 0)
+ goto try_right;
+ }
+
+ /* Allocate range of blocks */
+ x = left_ext->e_pblk + left_ext->e_len;
+ err = ext2fs_new_range(fs, EXT2_NEWRANGE_FIXED_GOAL |
+ EXT2_NEWRANGE_MIN_LENGTH,
+ x, fillable, NULL, &pblk, &plen);
+ if (err)
+ goto try_right;
+ err = claim_range(fs, inode, pblk, plen);
+ if (err)
+ goto out;
+
+ /* Modify left_ext */
+ err = ext2fs_extent_goto(handle, left_ext->e_lblk);
+ if (err)
+ goto out;
+ range_start += plen;
+ range_len -= plen;
+ left_ext->e_len += plen;
+ dbg_print_extent("ext_falloc left+", left_ext);
+ err = ext2fs_extent_replace(handle, 0, left_ext);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+
+ /* Zero blocks if necessary */
+ if (!(left_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ (flags & EXT2_FALLOCATE_ZERO_BLOCKS)) {
+ err = ext2fs_zero_blocks2(fs, pblk, plen, NULL, NULL);
+ if (err)
+ goto out;
+ }
+ }
+
+try_right:
+ /* Extend the right extent */
+ if (right_ext) {
+ /* How much can we attach to right_ext? */
+ if (right_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fillable = max_uninit_len - right_ext->e_len;
+ else if (flags & EXT2_FALLOCATE_ZERO_BLOCKS)
+ fillable = max_init_len - right_ext->e_len;
+ else
+ fillable = 0;
+
+ /* User requires init/uninit but extent is uninit/init. */
+ if (((flags & EXT2_FALLOCATE_FORCE_INIT) &&
+ (right_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)) ||
+ ((flags & EXT2_FALLOCATE_FORCE_UNINIT) &&
+ !(right_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT)))
+ goto try_anywhere;
+
+ if (fillable > range_len)
+ fillable = range_len;
+ if (fillable == 0)
+ goto try_anywhere;
+
+ /* Test if the left edge of the range is already mapped? */
+ if (EXT2FS_CLUSTER_RATIO(fs) > 1) {
+ err = ext2fs_map_cluster_block(fs, ino, inode,
+ right_ext->e_lblk - fillable, &pblk);
+ if (err)
+ goto out;
+ if (pblk)
+ fillable -= EXT2FS_CLUSTER_RATIO(fs) -
+ ((right_ext->e_lblk - fillable)
+ & EXT2FS_CLUSTER_MASK(fs));
+ if (fillable == 0)
+ goto try_anywhere;
+ }
+
+ /*
+ * FIXME: It would be nice if we could handle allocating a
+ * variable range from a fixed end point instead of just
+ * skipping to the general allocator if the whole range is
+ * unavailable.
+ */
+ err = ext2fs_new_range(fs, EXT2_NEWRANGE_FIXED_GOAL |
+ EXT2_NEWRANGE_MIN_LENGTH,
+ right_ext->e_pblk - fillable,
+ fillable, NULL, &pblk, &plen);
+ if (err)
+ goto try_anywhere;
+ err = claim_range(fs, inode,
+ pblk & ~EXT2FS_CLUSTER_MASK(fs),
+ plen + (pblk & EXT2FS_CLUSTER_MASK(fs)));
+ if (err)
+ goto out;
+
+ /* Modify right_ext */
+ err = ext2fs_extent_goto(handle, right_ext->e_lblk);
+ if (err)
+ goto out;
+ range_len -= plen;
+ right_ext->e_lblk -= plen;
+ right_ext->e_pblk -= plen;
+ right_ext->e_len += plen;
+ dbg_print_extent("ext_falloc right+", right_ext);
+ err = ext2fs_extent_replace(handle, 0, right_ext);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+
+ /* Zero blocks if necessary */
+ if (!(right_ext->e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ (flags & EXT2_FALLOCATE_ZERO_BLOCKS)) {
+ err = ext2fs_zero_blocks2(fs, pblk,
+ plen + cluster_fill, NULL, NULL);
+ if (err)
+ goto out;
+ }
+ }
+
+try_anywhere:
+ /* Try implied cluster alloc on the left and right ends */
+ if (range_len > 0 && (range_start & EXT2FS_CLUSTER_MASK(fs))) {
+ cluster_fill = EXT2FS_CLUSTER_RATIO(fs) -
+ (range_start & EXT2FS_CLUSTER_MASK(fs));
+ cluster_fill &= EXT2FS_CLUSTER_MASK(fs);
+ if (cluster_fill > range_len)
+ cluster_fill = range_len;
+ newex.e_lblk = range_start;
+ err = ext2fs_map_cluster_block(fs, ino, inode, newex.e_lblk,
+ &pblk);
+ if (err)
+ goto out;
+ if (pblk == 0)
+ goto try_right_implied;
+ newex.e_pblk = pblk;
+ newex.e_len = cluster_fill;
+ newex.e_flags = (flags & EXT2_FALLOCATE_FORCE_INIT ? 0 :
+ EXT2_EXTENT_FLAGS_UNINIT);
+ dbg_print_extent("ext_falloc iclus left+", &newex);
+ ext2fs_extent_goto(handle, newex.e_lblk);
+ err = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT,
+ &ex);
+ if (err == EXT2_ET_NO_CURRENT_NODE)
+ ex.e_lblk = 0;
+ else if (err)
+ goto out;
+
+ if (ex.e_lblk > newex.e_lblk)
+ op = 0; /* insert before */
+ else
+ op = EXT2_EXTENT_INSERT_AFTER;
+ dbg_printf("%s: inserting %s lblk %llu newex=%llu\n",
+ __func__, op ? "after" : "before", ex.e_lblk,
+ newex.e_lblk);
+ err = ext2fs_extent_insert(handle, op, &newex);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+
+ if (!(newex.e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ (flags & EXT2_FALLOCATE_ZERO_BLOCKS)) {
+ err = ext2fs_zero_blocks2(fs, newex.e_pblk,
+ newex.e_len, NULL, NULL);
+ if (err)
+ goto out;
+ }
+
+ range_start += cluster_fill;
+ range_len -= cluster_fill;
+ }
+
+try_right_implied:
+ y = range_start + range_len;
+ if (range_len > 0 && (y & EXT2FS_CLUSTER_MASK(fs))) {
+ cluster_fill = y & EXT2FS_CLUSTER_MASK(fs);
+ if (cluster_fill > range_len)
+ cluster_fill = range_len;
+ newex.e_lblk = y & ~EXT2FS_CLUSTER_MASK(fs);
+ err = ext2fs_map_cluster_block(fs, ino, inode, newex.e_lblk,
+ &pblk);
+ if (err)
+ goto out;
+ if (pblk == 0)
+ goto no_implied;
+ newex.e_pblk = pblk;
+ newex.e_len = cluster_fill;
+ newex.e_flags = (flags & EXT2_FALLOCATE_FORCE_INIT ? 0 :
+ EXT2_EXTENT_FLAGS_UNINIT);
+ dbg_print_extent("ext_falloc iclus right+", &newex);
+ ext2fs_extent_goto(handle, newex.e_lblk);
+ err = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT,
+ &ex);
+ if (err == EXT2_ET_NO_CURRENT_NODE)
+ ex.e_lblk = 0;
+ else if (err)
+ goto out;
+
+ if (ex.e_lblk > newex.e_lblk)
+ op = 0; /* insert before */
+ else
+ op = EXT2_EXTENT_INSERT_AFTER;
+ dbg_printf("%s: inserting %s lblk %llu newex=%llu\n",
+ __func__, op ? "after" : "before", ex.e_lblk,
+ newex.e_lblk);
+ err = ext2fs_extent_insert(handle, op, &newex);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+
+ if (!(newex.e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ (flags & EXT2_FALLOCATE_ZERO_BLOCKS)) {
+ err = ext2fs_zero_blocks2(fs, newex.e_pblk,
+ newex.e_len, NULL, NULL);
+ if (err)
+ goto out;
+ }
+
+ range_len -= cluster_fill;
+ }
+
+no_implied:
+ if (range_len == 0)
+ return 0;
+
+ newex.e_lblk = range_start;
+ if (flags & EXT2_FALLOCATE_FORCE_INIT) {
+ max_extent_len = max_init_len;
+ newex.e_flags = 0;
+ } else {
+ max_extent_len = max_uninit_len;
+ newex.e_flags = EXT2_EXTENT_FLAGS_UNINIT;
+ }
+ pblk = alloc_goal;
+ y = range_len;
+ for (x = 0; x < y;) {
+ cluster_fill = newex.e_lblk & EXT2FS_CLUSTER_MASK(fs);
+ fillable = min(range_len + cluster_fill, max_extent_len);
+ err = ext2fs_new_range(fs, 0, pblk & ~EXT2FS_CLUSTER_MASK(fs),
+ fillable,
+ NULL, &pblk, &plen);
+ if (err)
+ goto out;
+ err = claim_range(fs, inode, pblk, plen);
+ if (err)
+ goto out;
+
+ /* Create extent */
+ newex.e_pblk = pblk + cluster_fill;
+ newex.e_len = plen - cluster_fill;
+ dbg_print_extent("ext_falloc create", &newex);
+ ext2fs_extent_goto(handle, newex.e_lblk);
+ err = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT,
+ &ex);
+ if (err == EXT2_ET_NO_CURRENT_NODE)
+ ex.e_lblk = 0;
+ else if (err)
+ goto out;
+
+ if (ex.e_lblk > newex.e_lblk)
+ op = 0; /* insert before */
+ else
+ op = EXT2_EXTENT_INSERT_AFTER;
+ dbg_printf("%s: inserting %s lblk %llu newex=%llu\n",
+ __func__, op ? "after" : "before", ex.e_lblk,
+ newex.e_lblk);
+ err = ext2fs_extent_insert(handle, op, &newex);
+ if (err)
+ goto out;
+ err = ext2fs_extent_fix_parents(handle);
+ if (err)
+ goto out;
+
+ if (!(newex.e_flags & EXT2_EXTENT_FLAGS_UNINIT) &&
+ (flags & EXT2_FALLOCATE_ZERO_BLOCKS)) {
+ err = ext2fs_zero_blocks2(fs, pblk, plen, NULL, NULL);
+ if (err)
+ goto out;
+ }
+
+ /* Update variables at end of loop */
+ x += plen - cluster_fill;
+ range_len -= plen - cluster_fill;
+ newex.e_lblk += plen - cluster_fill;
+ pblk += plen - cluster_fill;
+ if (pblk >= ext2fs_blocks_count(fs->super))
+ pblk = fs->super->s_first_data_block;
+ }
+
+out:
+ return err;
+}
+
+static errcode_t extent_fallocate(ext2_filsys fs, int flags, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t goal,
+ blk64_t start, blk64_t len)
+{
+ ext2_extent_handle_t handle;
+ struct ext2fs_extent left_extent, right_extent;
+ struct ext2fs_extent *left_adjacent, *right_adjacent;
+ errcode_t err;
+ blk64_t range_start, range_end = 0, end, next;
+ blk64_t count, goal_distance;
+
+ end = start + len - 1;
+ err = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (err)
+ return err;
+
+ /*
+ * Find the extent closest to the start of the alloc range. We don't
+ * check the return value because _goto() sets the current node to the
+ * next-lowest extent if 'start' is in a hole; or the next-highest
+ * extent if there aren't any lower ones; or doesn't set a current node
+ * if there was a real error reading the extent tree. In that case,
+ * _get() will error out.
+ */
+start_again:
+ ext2fs_extent_goto(handle, start);
+ err = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &left_extent);
+ if (err == EXT2_ET_NO_CURRENT_NODE) {
+ blk64_t max_blocks = ext2fs_blocks_count(fs->super);
+
+ if (goal == ~0ULL)
+ goal = ext2fs_find_inode_goal(fs, ino, inode, start);
+ err = ext2fs_find_first_zero_block_bitmap2(fs->block_map,
+ goal, max_blocks - 1, &goal);
+ goal += start;
+ err = ext_falloc_helper(fs, flags, ino, inode, handle, NULL,
+ NULL, start, len, goal);
+ goto errout;
+ } else if (err)
+ goto errout;
+
+ dbg_print_extent("ext_falloc initial", &left_extent);
+ next = left_extent.e_lblk + left_extent.e_len;
+ if (left_extent.e_lblk > start) {
+ /* The nearest extent we found was beyond start??? */
+ goal = left_extent.e_pblk - (left_extent.e_lblk - start);
+ err = ext_falloc_helper(fs, flags, ino, inode, handle, NULL,
+ &left_extent, start,
+ left_extent.e_lblk - start, goal);
+ if (err)
+ goto errout;
+
+ goto start_again;
+ } else if (next >= start) {
+ range_start = next;
+ left_adjacent = &left_extent;
+ } else {
+ range_start = start;
+ left_adjacent = NULL;
+ }
+ goal = left_extent.e_pblk + (range_start - left_extent.e_lblk);
+
+ do {
+ err = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT_LEAF,
+ &right_extent);
+ dbg_printf("%s: ino=%d get next =%d\n", __func__, ino,
+ (int)err);
+ dbg_print_extent("ext_falloc next", &right_extent);
+ /* Stop if we've seen this extent before */
+ if (!err && right_extent.e_lblk <= left_extent.e_lblk)
+ err = EXT2_ET_EXTENT_NO_NEXT;
+
+ if (err && err != EXT2_ET_EXTENT_NO_NEXT)
+ goto errout;
+ if (err == EXT2_ET_EXTENT_NO_NEXT ||
+ right_extent.e_lblk > end + 1) {
+ range_end = end;
+ right_adjacent = NULL;
+ } else {
+ /* Handle right_extent.e_lblk <= end */
+ range_end = right_extent.e_lblk - 1;
+ right_adjacent = &right_extent;
+ }
+ goal_distance = range_start - next;
+ if (err != EXT2_ET_EXTENT_NO_NEXT &&
+ goal_distance > (range_end - right_extent.e_lblk))
+ goal = right_extent.e_pblk -
+ (right_extent.e_lblk - range_start);
+
+ dbg_printf("%s: ino=%d rstart=%llu rend=%llu\n", __func__, ino,
+ range_start, range_end);
+ err = 0;
+ if (range_start <= range_end) {
+ count = range_end - range_start + 1;
+ err = ext_falloc_helper(fs, flags, ino, inode, handle,
+ left_adjacent, right_adjacent,
+ range_start, count, goal);
+ if (err)
+ goto errout;
+ }
+
+ if (range_end == end)
+ break;
+
+ err = ext2fs_extent_goto(handle, right_extent.e_lblk);
+ if (err)
+ goto errout;
+ next = right_extent.e_lblk + right_extent.e_len;
+ left_extent = right_extent;
+ left_adjacent = &left_extent;
+ range_start = next;
+ goal = left_extent.e_pblk + (range_start - left_extent.e_lblk);
+ } while (range_end < end);
+
+errout:
+ ext2fs_extent_free(handle);
+ return err;
+}
+
+/*
+ * Map physical blocks to a range of logical blocks within a file. The range
+ * of logical blocks are (start, start + len). If there are already extents,
+ * the mappings will try to extend the mappings; otherwise, it will try to map
+ * start as if logical block 0 points to goal. If goal is ~0ULL, then the goal
+ * is calculated based on the inode group.
+ *
+ * Flags:
+ * - EXT2_FALLOCATE_ZERO_BLOCKS: Zero the blocks that are allocated.
+ * - EXT2_FALLOCATE_FORCE_INIT: Create only initialized extents.
+ * - EXT2_FALLOCATE_FORCE_UNINIT: Create only uninitialized extents.
+ * - EXT2_FALLOCATE_INIT_BEYOND_EOF: Create extents beyond EOF.
+ *
+ * If neither FORCE_INIT nor FORCE_UNINIT are specified, this function will
+ * try to expand any extents it finds, zeroing blocks as necessary.
+ */
+errcode_t ext2fs_fallocate(ext2_filsys fs, int flags, ext2_ino_t ino,
+ struct ext2_inode *inode, blk64_t goal,
+ blk64_t start, blk64_t len)
+{
+ struct ext2_inode inode_buf;
+ blk64_t blk, x, zero_blk, last = 0;
+ int zero_len = 0;
+ errcode_t err;
+
+ if (((flags & EXT2_FALLOCATE_FORCE_INIT) &&
+ (flags & EXT2_FALLOCATE_FORCE_UNINIT)) ||
+ (flags & ~EXT2_FALLOCATE_ALL_FLAGS))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (len > ext2fs_blocks_count(fs->super))
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+ else if (len == 0)
+ return 0;
+
+ /* Read inode structure if necessary */
+ if (!inode) {
+ err = ext2fs_read_inode(fs, ino, &inode_buf);
+ if (err)
+ return err;
+ inode = &inode_buf;
+ }
+ dbg_printf("%s: ino=%d start=%llu len=%llu goal=%llu\n", __func__, ino,
+ start, len, goal);
+
+ if (inode->i_flags & EXT4_EXTENTS_FL) {
+ err = extent_fallocate(fs, flags, ino, inode, goal, start, len);
+ goto out;
+ }
+
+ /* XXX: Allocate a bunch of blocks the slow way */
+ for (blk = start; blk < start + len; blk++) {
+ err = ext2fs_bmap2(fs, ino, inode, NULL, 0, blk, 0, &x);
+ if (err)
+ return err;
+ if (x)
+ continue;
+
+ err = ext2fs_bmap2(fs, ino, inode, NULL, BMAP_ALLOC,
+ blk, 0, &x);
+ if (err)
+ goto errout;
+ if ((zero_len && (x != last+1)) ||
+ (zero_len >= 65536)) {
+ err = ext2fs_zero_blocks2(fs, zero_blk, zero_len,
+ NULL, NULL);
+ zero_len = 0;
+ if (err)
+ goto errout;
+ }
+ if (zero_len == 0) {
+ zero_blk = x;
+ zero_len = 1;
+ } else {
+ zero_len++;
+ }
+ last = x;
+ }
+
+out:
+ if (inode == &inode_buf)
+ ext2fs_write_inode(fs, ino, inode);
+errout:
+ if (zero_len)
+ ext2fs_zero_blocks2(fs, zero_blk, zero_len, NULL, NULL);
+ return err;
+}
diff --git a/lib/ext2fs/fast_commit.h b/lib/ext2fs/fast_commit.h
new file mode 100644
index 0000000..4ad38f1
--- /dev/null
+++ b/lib/ext2fs/fast_commit.h
@@ -0,0 +1,190 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __FAST_COMMIT_H__
+#define __FAST_COMMIT_H__
+
+#include "jfs_compat.h"
+
+/*
+ * Note this file is present in e2fsprogs/lib/ext2fs/fast_commit.h and
+ * linux/fs/ext4/fast_commit.h. These file should always be byte identical.
+ */
+
+/* Fast commit tags */
+#define EXT4_FC_TAG_ADD_RANGE 0x0001
+#define EXT4_FC_TAG_DEL_RANGE 0x0002
+#define EXT4_FC_TAG_CREAT 0x0003
+#define EXT4_FC_TAG_LINK 0x0004
+#define EXT4_FC_TAG_UNLINK 0x0005
+#define EXT4_FC_TAG_INODE 0x0006
+#define EXT4_FC_TAG_PAD 0x0007
+#define EXT4_FC_TAG_TAIL 0x0008
+#define EXT4_FC_TAG_HEAD 0x0009
+
+#define EXT4_FC_SUPPORTED_FEATURES 0x0
+
+/* On disk fast commit tlv value structures */
+
+/* Fast commit on disk tag length structure */
+struct ext4_fc_tl {
+ __le16 fc_tag;
+ __le16 fc_len;
+};
+
+/* Value structure for tag EXT4_FC_TAG_HEAD. */
+struct ext4_fc_head {
+ __le32 fc_features;
+ __le32 fc_tid;
+};
+
+/* Value structure for EXT4_FC_TAG_ADD_RANGE. */
+struct ext4_fc_add_range {
+ __le32 fc_ino;
+ __u8 fc_ex[12];
+};
+
+/* Value structure for tag EXT4_FC_TAG_DEL_RANGE. */
+struct ext4_fc_del_range {
+ __le32 fc_ino;
+ __le32 fc_lblk;
+ __le32 fc_len;
+};
+
+/*
+ * This is the value structure for tags EXT4_FC_TAG_CREAT, EXT4_FC_TAG_LINK
+ * and EXT4_FC_TAG_UNLINK.
+ */
+struct ext4_fc_dentry_info {
+ __le32 fc_parent_ino;
+ __le32 fc_ino;
+ __u8 fc_dname[0];
+};
+
+/* Value structure for EXT4_FC_TAG_INODE and EXT4_FC_TAG_INODE_PARTIAL. */
+struct ext4_fc_inode {
+ __le32 fc_ino;
+ __u8 fc_raw_inode[0];
+};
+
+/* Value structure for tag EXT4_FC_TAG_TAIL. */
+struct ext4_fc_tail {
+ __le32 fc_tid;
+ __le32 fc_crc;
+};
+
+/*
+ * Fast commit reason codes
+ */
+enum {
+ /*
+ * Commit status codes:
+ */
+ EXT4_FC_REASON_OK = 0,
+ EXT4_FC_REASON_INELIGIBLE,
+ EXT4_FC_REASON_ALREADY_COMMITTED,
+ EXT4_FC_REASON_FC_START_FAILED,
+ EXT4_FC_REASON_FC_FAILED,
+
+ /*
+ * Fast commit ineligiblity reasons:
+ */
+ EXT4_FC_REASON_XATTR = 0,
+ EXT4_FC_REASON_CROSS_RENAME,
+ EXT4_FC_REASON_JOURNAL_FLAG_CHANGE,
+ EXT4_FC_REASON_NOMEM,
+ EXT4_FC_REASON_SWAP_BOOT,
+ EXT4_FC_REASON_RESIZE,
+ EXT4_FC_REASON_RENAME_DIR,
+ EXT4_FC_REASON_FALLOC_RANGE,
+ EXT4_FC_REASON_INODE_JOURNAL_DATA,
+ EXT4_FC_COMMIT_FAILED,
+ EXT4_FC_REASON_MAX
+};
+
+#ifdef __KERNEL__
+/*
+ * In memory list of dentry updates that are performed on the file
+ * system used by fast commit code.
+ */
+struct ext4_fc_dentry_update {
+ int fcd_op; /* Type of update create / unlink / link */
+ int fcd_parent; /* Parent inode number */
+ int fcd_ino; /* Inode number */
+ struct qstr fcd_name; /* Dirent name */
+ unsigned char fcd_iname[DNAME_INLINE_LEN]; /* Dirent name string */
+ struct list_head fcd_list;
+};
+
+struct ext4_fc_stats {
+ unsigned int fc_ineligible_reason_count[EXT4_FC_REASON_MAX];
+ unsigned long fc_num_commits;
+ unsigned long fc_ineligible_commits;
+ unsigned long fc_numblks;
+};
+
+#define EXT4_FC_REPLAY_REALLOC_INCREMENT 4
+
+/*
+ * Physical block regions added to different inodes due to fast commit
+ * recovery. These are set during the SCAN phase. During the replay phase,
+ * our allocator excludes these from its allocation. This ensures that
+ * we don't accidentally allocating a block that is going to be used by
+ * another inode.
+ */
+struct ext4_fc_alloc_region {
+ ext4_lblk_t lblk;
+ ext4_fsblk_t pblk;
+ int ino, len;
+};
+
+/*
+ * Fast commit replay state.
+ */
+struct ext4_fc_replay_state {
+ int fc_replay_num_tags;
+ int fc_replay_expected_off;
+ int fc_current_pass;
+ int fc_cur_tag;
+ int fc_crc;
+ struct ext4_fc_alloc_region *fc_regions;
+ int fc_regions_size, fc_regions_used, fc_regions_valid;
+ int *fc_modified_inodes;
+ int fc_modified_inodes_used, fc_modified_inodes_size;
+};
+
+#define region_last(__region) (((__region)->lblk) + ((__region)->len) - 1)
+#endif
+
+static inline const char *tag2str(__u16 tag)
+{
+ switch (tag) {
+ case EXT4_FC_TAG_LINK:
+ return "ADD_ENTRY";
+ case EXT4_FC_TAG_UNLINK:
+ return "DEL_ENTRY";
+ case EXT4_FC_TAG_ADD_RANGE:
+ return "ADD_RANGE";
+ case EXT4_FC_TAG_CREAT:
+ return "CREAT_DENTRY";
+ case EXT4_FC_TAG_DEL_RANGE:
+ return "DEL_RANGE";
+ case EXT4_FC_TAG_INODE:
+ return "INODE";
+ case EXT4_FC_TAG_PAD:
+ return "PAD";
+ case EXT4_FC_TAG_TAIL:
+ return "TAIL";
+ case EXT4_FC_TAG_HEAD:
+ return "HEAD";
+ default:
+ return "ERROR";
+ }
+}
+
+/* Get length of a particular tlv */
+static inline int ext4_fc_tag_len(struct ext4_fc_tl *tl)
+{
+ return le16_to_cpu(tl->fc_len);
+}
+
+#endif /* __FAST_COMMIT_H__ */
diff --git a/lib/ext2fs/fiemap.h b/lib/ext2fs/fiemap.h
new file mode 100644
index 0000000..33ab8fb
--- /dev/null
+++ b/lib/ext2fs/fiemap.h
@@ -0,0 +1,93 @@
+/*
+ * FS_IOC_FIEMAP ioctl infrastructure.
+ *
+ * Some portions copyright (C) 2007 Cluster File Systems, Inc
+ *
+ * Authors: Mark Fasheh <mfasheh@suse.com>
+ * Kalpak Shah <kalpak.shah@sun.com>
+ * Andreas Dilger <adilger@sun.com>
+ */
+
+#ifndef _LINUX_FIEMAP_H
+#define _LINUX_FIEMAP_H
+
+struct fiemap_extent {
+ __u64 fe_logical; /* logical offset in bytes for the start of
+ * the extent from the beginning of the file */
+ __u64 fe_physical; /* physical offset in bytes for the start
+ * of the extent from the beginning of the disk */
+ __u64 fe_length; /* length in bytes for this extent */
+ __u64 fe_reserved64[2];
+ __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
+ __u32 fe_reserved[3];
+};
+
+struct fiemap {
+ __u64 fm_start; /* logical offset (inclusive) at
+ * which to start mapping (in) */
+ __u64 fm_length; /* logical length of mapping which
+ * userspace wants (in) */
+ __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
+ __u32 fm_mapped_extents;/* number of extents that were mapped (out) */
+ __u32 fm_extent_count; /* size of fm_extents array (in) */
+ __u32 fm_reserved;
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+ struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic pop
+#endif
+};
+
+#if defined(__linux__) && !defined(FS_IOC_FIEMAP)
+#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
+#endif
+
+#if defined(__linux__) && !defined(FS_IOC_GETSTATE)
+#define EXT4_IOC_GETSTATE _IOW('f', 41, __u32)
+#endif
+
+#if defined(__linux__) && !defined(EXT4_IOC_GET_ES_CACHE)
+#define EXT4_IOC_GET_ES_CACHE _IOWR('f', 42, struct fiemap)
+#endif
+
+#if defined(__linux__) && !defined(EXT4_STATE_FLAG_EXT_PRECACHED)
+#define EXT4_STATE_FLAG_EXT_PRECACHED 0x00000001
+#endif
+
+#define FIEMAP_MAX_OFFSET (~0ULL)
+
+#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
+#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
+#define FIEMAP_FLAG_CACHE 0x00000004 /* request caching of the extents */
+
+#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
+
+#define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
+#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */
+#define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending.
+ * Sets EXTENT_UNKNOWN. */
+#define FIEMAP_EXTENT_ENCODED 0x00000008 /* Data can not be read
+ * while fs is unmounted */
+#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted by fs.
+ * Sets EXTENT_NO_BYPASS. */
+#define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may not be
+ * block aligned. */
+#define FIEMAP_EXTENT_DATA_INLINE 0x00000200 /* Data mixed with metadata.
+ * Sets EXTENT_NOT_ALIGNED.*/
+#define FIEMAP_EXTENT_DATA_TAIL 0x00000400 /* Multiple files in block.
+ * Sets EXTENT_NOT_ALIGNED.*/
+#define FIEMAP_EXTENT_UNWRITTEN 0x00000800 /* Space allocated, but
+ * no data (i.e. zero). */
+#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively
+ * support extents. Result
+ * merged for efficiency. */
+#define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other
+ * files. */
+
+#define EXT4_FIEMAP_EXTENT_HOLE 0x08000000 /* Entry in extent status
+ cache for a hole*/
+
+#endif /* _LINUX_FIEMAP_H */
diff --git a/lib/ext2fs/fileio.c b/lib/ext2fs/fileio.c
new file mode 100644
index 0000000..818f7f0
--- /dev/null
+++ b/lib/ext2fs/fileio.c
@@ -0,0 +1,666 @@
+/*
+ * fileio.c --- Simple file I/O routines
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+struct ext2_file {
+ errcode_t magic;
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ int flags;
+ __u64 pos;
+ blk64_t blockno;
+ blk64_t physblock;
+ char *buf;
+};
+
+struct block_entry {
+ blk64_t physblock;
+ unsigned char sha[EXT2FS_SHA512_LENGTH];
+};
+typedef struct block_entry *block_entry_t;
+
+#define BMAP_BUFFER (file->buf + fs->blocksize)
+
+errcode_t ext2fs_file_open2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ int flags, ext2_file_t *ret)
+{
+ ext2_file_t file;
+ errcode_t retval;
+
+ /*
+ * Don't let caller create or open a file for writing if the
+ * filesystem is read-only.
+ */
+ if ((flags & (EXT2_FILE_WRITE | EXT2_FILE_CREATE)) &&
+ !(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_file), &file);
+ if (retval)
+ return retval;
+
+ memset(file, 0, sizeof(struct ext2_file));
+ file->magic = EXT2_ET_MAGIC_EXT2_FILE;
+ file->fs = fs;
+ file->ino = ino;
+ file->flags = flags & EXT2_FILE_MASK;
+
+ if (inode) {
+ memcpy(&file->inode, inode, sizeof(struct ext2_inode));
+ } else {
+ retval = ext2fs_read_inode(fs, ino, &file->inode);
+ if (retval)
+ goto fail;
+ }
+
+ retval = ext2fs_get_array(3, fs->blocksize, &file->buf);
+ if (retval)
+ goto fail;
+
+ *ret = file;
+ return 0;
+
+fail:
+ if (file->buf)
+ ext2fs_free_mem(&file->buf);
+ ext2fs_free_mem(&file);
+ return retval;
+}
+
+errcode_t ext2fs_file_open(ext2_filsys fs, ext2_ino_t ino,
+ int flags, ext2_file_t *ret)
+{
+ return ext2fs_file_open2(fs, ino, NULL, flags, ret);
+}
+
+/*
+ * This function returns the filesystem handle of a file from the structure
+ */
+ext2_filsys ext2fs_file_get_fs(ext2_file_t file)
+{
+ if (file->magic != EXT2_ET_MAGIC_EXT2_FILE)
+ return 0;
+ return file->fs;
+}
+
+/*
+ * This function returns the pointer to the inode of a file from the structure
+ */
+struct ext2_inode *ext2fs_file_get_inode(ext2_file_t file)
+{
+ if (file->magic != EXT2_ET_MAGIC_EXT2_FILE)
+ return NULL;
+ return &file->inode;
+}
+
+/* This function returns the inode number from the structure */
+ext2_ino_t ext2fs_file_get_inode_num(ext2_file_t file)
+{
+ if (file->magic != EXT2_ET_MAGIC_EXT2_FILE)
+ return 0;
+ return file->ino;
+}
+
+/*
+ * This function flushes the dirty block buffer out to disk if
+ * necessary.
+ */
+errcode_t ext2fs_file_flush(ext2_file_t file)
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ int ret_flags;
+ blk64_t dontcare;
+
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+ fs = file->fs;
+
+ if (!(file->flags & EXT2_FILE_BUF_VALID) ||
+ !(file->flags & EXT2_FILE_BUF_DIRTY))
+ return 0;
+
+ /* Is this an uninit block? */
+ if (file->physblock && file->inode.i_flags & EXT4_EXTENTS_FL) {
+ retval = ext2fs_bmap2(fs, file->ino, &file->inode, BMAP_BUFFER,
+ 0, file->blockno, &ret_flags, &dontcare);
+ if (retval)
+ return retval;
+ if (ret_flags & BMAP_RET_UNINIT) {
+ retval = ext2fs_bmap2(fs, file->ino, &file->inode,
+ BMAP_BUFFER, BMAP_SET,
+ file->blockno, 0,
+ &file->physblock);
+ if (retval)
+ return retval;
+ }
+ }
+
+ /*
+ * OK, the physical block hasn't been allocated yet.
+ * Allocate it.
+ */
+ if (!file->physblock) {
+ retval = ext2fs_bmap2(fs, file->ino, &file->inode,
+ BMAP_BUFFER, file->ino ? BMAP_ALLOC : 0,
+ file->blockno, 0, &file->physblock);
+ if (retval)
+ return retval;
+ }
+
+ retval = io_channel_write_blk64(fs->io, file->physblock, 1, file->buf);
+ if (retval)
+ return retval;
+
+ file->flags &= ~EXT2_FILE_BUF_DIRTY;
+
+ return retval;
+}
+
+/*
+ * This function synchronizes the file's block buffer and the current
+ * file position, possibly invalidating block buffer if necessary
+ */
+static errcode_t sync_buffer_position(ext2_file_t file)
+{
+ blk64_t b;
+ errcode_t retval;
+
+ b = file->pos / file->fs->blocksize;
+ if (b != file->blockno) {
+ retval = ext2fs_file_flush(file);
+ if (retval)
+ return retval;
+ file->flags &= ~EXT2_FILE_BUF_VALID;
+ }
+ file->blockno = b;
+ return 0;
+}
+
+/*
+ * This function loads the file's block buffer with valid data from
+ * the disk as necessary.
+ *
+ * If dontfill is true, then skip initializing the buffer since we're
+ * going to be replacing its entire contents anyway. If set, then the
+ * function basically only sets file->physblock and EXT2_FILE_BUF_VALID
+ */
+#define DONTFILL 1
+static errcode_t load_buffer(ext2_file_t file, int dontfill)
+{
+ ext2_filsys fs = file->fs;
+ errcode_t retval;
+ int ret_flags;
+
+ if (!(file->flags & EXT2_FILE_BUF_VALID)) {
+ retval = ext2fs_bmap2(fs, file->ino, &file->inode,
+ BMAP_BUFFER, 0, file->blockno, &ret_flags,
+ &file->physblock);
+ if (retval)
+ return retval;
+ if (!dontfill) {
+ if (file->physblock &&
+ !(ret_flags & BMAP_RET_UNINIT)) {
+ retval = io_channel_read_blk64(fs->io,
+ file->physblock,
+ 1, file->buf);
+ if (retval)
+ return retval;
+ } else
+ memset(file->buf, 0, fs->blocksize);
+ }
+ file->flags |= EXT2_FILE_BUF_VALID;
+ }
+ return 0;
+}
+
+
+errcode_t ext2fs_file_close(ext2_file_t file)
+{
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+
+ retval = ext2fs_file_flush(file);
+
+ if (file->buf)
+ ext2fs_free_mem(&file->buf);
+ ext2fs_free_mem(&file);
+
+ return retval;
+}
+
+
+static errcode_t
+ext2fs_file_read_inline_data(ext2_file_t file, void *buf,
+ unsigned int wanted, unsigned int *got)
+{
+ ext2_filsys fs;
+ errcode_t retval;
+ unsigned int count = 0;
+ size_t size;
+
+ fs = file->fs;
+ retval = ext2fs_inline_data_get(fs, file->ino, &file->inode,
+ file->buf, &size);
+ if (retval)
+ return retval;
+
+ if (file->pos >= size)
+ goto out;
+
+ count = size - file->pos;
+ if (count > wanted)
+ count = wanted;
+ memcpy(buf, file->buf + file->pos, count);
+ file->pos += count;
+ buf = (char *) buf + count;
+
+out:
+ if (got)
+ *got = count;
+ return retval;
+}
+
+
+errcode_t ext2fs_file_read(ext2_file_t file, void *buf,
+ unsigned int wanted, unsigned int *got)
+{
+ ext2_filsys fs;
+ errcode_t retval = 0;
+ unsigned int start, c, count = 0;
+ __u64 left;
+ char *ptr = (char *) buf;
+
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+ fs = file->fs;
+
+ /* If an inode has inline data, things get complicated. */
+ if (file->inode.i_flags & EXT4_INLINE_DATA_FL)
+ return ext2fs_file_read_inline_data(file, buf, wanted, got);
+
+ while ((file->pos < EXT2_I_SIZE(&file->inode)) && (wanted > 0)) {
+ retval = sync_buffer_position(file);
+ if (retval)
+ goto fail;
+ retval = load_buffer(file, 0);
+ if (retval)
+ goto fail;
+
+ start = file->pos % fs->blocksize;
+ c = fs->blocksize - start;
+ if (c > wanted)
+ c = wanted;
+ left = EXT2_I_SIZE(&file->inode) - file->pos ;
+ if (c > left)
+ c = left;
+
+ memcpy(ptr, file->buf+start, c);
+ file->pos += c;
+ ptr += c;
+ count += c;
+ wanted -= c;
+ }
+
+fail:
+ if (got)
+ *got = count;
+ return retval;
+}
+
+
+static errcode_t
+ext2fs_file_write_inline_data(ext2_file_t file, const void *buf,
+ unsigned int nbytes, unsigned int *written)
+{
+ ext2_filsys fs;
+ errcode_t retval;
+ unsigned int count = 0;
+ size_t size;
+
+ fs = file->fs;
+ retval = ext2fs_inline_data_get(fs, file->ino, &file->inode,
+ file->buf, &size);
+ if (retval)
+ return retval;
+
+ if (file->pos < size) {
+ count = nbytes - file->pos;
+ memcpy(file->buf + file->pos, buf, count);
+
+ retval = ext2fs_inline_data_set(fs, file->ino, &file->inode,
+ file->buf, count);
+ if (retval == EXT2_ET_INLINE_DATA_NO_SPACE)
+ goto expand;
+ if (retval)
+ return retval;
+
+ file->pos += count;
+
+ /* Update inode size */
+ if (count != 0 && EXT2_I_SIZE(&file->inode) < file->pos) {
+ errcode_t rc;
+
+ rc = ext2fs_file_set_size2(file, file->pos);
+ if (retval == 0)
+ retval = rc;
+ }
+
+ if (written)
+ *written = count;
+ return 0;
+ }
+
+expand:
+ retval = ext2fs_inline_data_expand(fs, file->ino);
+ if (retval)
+ return retval;
+ /*
+ * reload inode and return no space error
+ *
+ * XXX: file->inode could be copied from the outside
+ * in ext2fs_file_open2(). We have no way to modify
+ * the outside inode.
+ */
+ retval = ext2fs_read_inode(fs, file->ino, &file->inode);
+ if (retval)
+ return retval;
+ return EXT2_ET_INLINE_DATA_NO_SPACE;
+}
+
+
+errcode_t ext2fs_file_write(ext2_file_t file, const void *buf,
+ unsigned int nbytes, unsigned int *written)
+{
+ ext2_filsys fs;
+ errcode_t retval = 0;
+ unsigned int start, c, count = 0;
+ const char *ptr = (const char *) buf;
+ block_entry_t new_block = NULL, old_block = NULL;
+ int bmap_flags = 0;
+
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+ fs = file->fs;
+
+ if (!(file->flags & EXT2_FILE_WRITE))
+ return EXT2_ET_FILE_RO;
+
+ /* If an inode has inline data, things get complicated. */
+ if (file->inode.i_flags & EXT4_INLINE_DATA_FL) {
+ retval = ext2fs_file_write_inline_data(file, buf, nbytes,
+ written);
+ if (retval != EXT2_ET_INLINE_DATA_NO_SPACE)
+ return retval;
+ /* fall through to read data from the block */
+ retval = 0;
+ }
+
+ while (nbytes > 0) {
+ retval = sync_buffer_position(file);
+ if (retval)
+ goto fail;
+
+ start = file->pos % fs->blocksize;
+ c = fs->blocksize - start;
+ if (c > nbytes)
+ c = nbytes;
+
+ /*
+ * We only need to do a read-modify-update cycle if
+ * we're doing a partial write.
+ */
+ retval = load_buffer(file, (c == fs->blocksize));
+ if (retval)
+ goto fail;
+
+ file->flags |= EXT2_FILE_BUF_DIRTY;
+ memcpy(file->buf+start, ptr, c);
+
+ /*
+ * OK, the physical block hasn't been allocated yet.
+ * Allocate it.
+ */
+ if (!file->physblock) {
+ bmap_flags = (file->ino ? BMAP_ALLOC : 0);
+ if (fs->flags & EXT2_FLAG_SHARE_DUP) {
+ new_block = calloc(1, sizeof(*new_block));
+ if (!new_block) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto fail;
+ }
+ ext2fs_sha512((const unsigned char*)file->buf,
+ fs->blocksize, new_block->sha);
+ old_block = ext2fs_hashmap_lookup(
+ fs->block_sha_map,
+ new_block->sha,
+ sizeof(new_block->sha));
+ }
+
+ if (old_block) {
+ file->physblock = old_block->physblock;
+ bmap_flags |= BMAP_SET;
+ free(new_block);
+ new_block = NULL;
+ }
+
+ retval = ext2fs_bmap2(fs, file->ino, &file->inode,
+ BMAP_BUFFER,
+ bmap_flags,
+ file->blockno, 0,
+ &file->physblock);
+ if (retval) {
+ free(new_block);
+ new_block = NULL;
+ goto fail;
+ }
+
+ if (new_block) {
+ new_block->physblock = file->physblock;
+ int ret = ext2fs_hashmap_add(fs->block_sha_map,
+ new_block, new_block->sha,
+ sizeof(new_block->sha));
+ if (ret) {
+ retval = EXT2_ET_NO_MEMORY;
+ free(new_block);
+ goto fail;
+ }
+ }
+
+ if (bmap_flags & BMAP_SET) {
+ ext2fs_iblk_add_blocks(fs, &file->inode, 1);
+ ext2fs_write_inode(fs, file->ino, &file->inode);
+ }
+ }
+
+ file->pos += c;
+ ptr += c;
+ count += c;
+ nbytes -= c;
+ }
+
+fail:
+ /* Update inode size */
+ if (count != 0 && EXT2_I_SIZE(&file->inode) < file->pos) {
+ errcode_t rc;
+
+ rc = ext2fs_file_set_size2(file, file->pos);
+ if (retval == 0)
+ retval = rc;
+ }
+
+ if (written)
+ *written = count;
+ return retval;
+}
+
+errcode_t ext2fs_file_llseek(ext2_file_t file, __u64 offset,
+ int whence, __u64 *ret_pos)
+{
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+
+ if (whence == EXT2_SEEK_SET)
+ file->pos = offset;
+ else if (whence == EXT2_SEEK_CUR)
+ file->pos += offset;
+ else if (whence == EXT2_SEEK_END)
+ file->pos = EXT2_I_SIZE(&file->inode) + offset;
+ else
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (ret_pos)
+ *ret_pos = file->pos;
+
+ return 0;
+}
+
+errcode_t ext2fs_file_lseek(ext2_file_t file, ext2_off_t offset,
+ int whence, ext2_off_t *ret_pos)
+{
+ __u64 loffset, ret_loffset = 0;
+ errcode_t retval;
+
+ loffset = offset;
+ retval = ext2fs_file_llseek(file, loffset, whence, &ret_loffset);
+ if (ret_pos)
+ *ret_pos = (ext2_off_t) ret_loffset;
+ return retval;
+}
+
+
+/*
+ * This function returns the size of the file, according to the inode
+ */
+errcode_t ext2fs_file_get_lsize(ext2_file_t file, __u64 *ret_size)
+{
+ if (file->magic != EXT2_ET_MAGIC_EXT2_FILE)
+ return EXT2_ET_MAGIC_EXT2_FILE;
+ *ret_size = EXT2_I_SIZE(&file->inode);
+ return 0;
+}
+
+/*
+ * This function returns the size of the file, according to the inode
+ */
+ext2_off_t ext2fs_file_get_size(ext2_file_t file)
+{
+ __u64 size;
+
+ if (ext2fs_file_get_lsize(file, &size))
+ return 0;
+ if ((size >> 32) != 0)
+ return 0;
+ return size;
+}
+
+/* Zero the parts of the last block that are past EOF. */
+static errcode_t ext2fs_file_zero_past_offset(ext2_file_t file,
+ ext2_off64_t offset)
+{
+ ext2_filsys fs = file->fs;
+ char *b = NULL;
+ ext2_off64_t off = offset % fs->blocksize;
+ blk64_t blk;
+ int ret_flags;
+ errcode_t retval;
+
+ if (off == 0)
+ return 0;
+
+ retval = sync_buffer_position(file);
+ if (retval)
+ return retval;
+
+ /* Is there an initialized block at the end? */
+ retval = ext2fs_bmap2(fs, file->ino, NULL, NULL, 0,
+ offset / fs->blocksize, &ret_flags, &blk);
+ if (retval)
+ return retval;
+ if ((blk == 0) || (ret_flags & BMAP_RET_UNINIT))
+ return 0;
+
+ /* Zero to the end of the block */
+ retval = ext2fs_get_mem(fs->blocksize, &b);
+ if (retval)
+ return retval;
+
+ /* Read/zero/write block */
+ retval = io_channel_read_blk64(fs->io, blk, 1, b);
+ if (retval)
+ goto out;
+
+ memset(b + off, 0, fs->blocksize - off);
+
+ retval = io_channel_write_blk64(fs->io, blk, 1, b);
+ if (retval)
+ goto out;
+
+out:
+ ext2fs_free_mem(&b);
+ return retval;
+}
+
+/*
+ * This function sets the size of the file, truncating it if necessary
+ *
+ */
+errcode_t ext2fs_file_set_size2(ext2_file_t file, ext2_off64_t size)
+{
+ ext2_off64_t old_size;
+ errcode_t retval;
+ blk64_t old_truncate, truncate_block;
+
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+
+ if (size && ext2fs_file_block_offset_too_big(file->fs, &file->inode,
+ (size - 1) / file->fs->blocksize))
+ return EXT2_ET_FILE_TOO_BIG;
+ truncate_block = ((size + file->fs->blocksize - 1) >>
+ EXT2_BLOCK_SIZE_BITS(file->fs->super));
+ old_size = EXT2_I_SIZE(&file->inode);
+ old_truncate = ((old_size + file->fs->blocksize - 1) >>
+ EXT2_BLOCK_SIZE_BITS(file->fs->super));
+
+ retval = ext2fs_inode_size_set(file->fs, &file->inode, size);
+ if (retval)
+ return retval;
+
+ if (file->ino) {
+ retval = ext2fs_write_inode(file->fs, file->ino, &file->inode);
+ if (retval)
+ return retval;
+ }
+
+ retval = ext2fs_file_zero_past_offset(file, size);
+ if (retval)
+ return retval;
+
+ if (truncate_block >= old_truncate)
+ return 0;
+
+ return ext2fs_punch(file->fs, file->ino, &file->inode, 0,
+ truncate_block, ~0ULL);
+}
+
+errcode_t ext2fs_file_set_size(ext2_file_t file, ext2_off_t size)
+{
+ return ext2fs_file_set_size2(file, size);
+}
diff --git a/lib/ext2fs/finddev.c b/lib/ext2fs/finddev.c
new file mode 100644
index 0000000..cd85ef5
--- /dev/null
+++ b/lib/ext2fs/finddev.c
@@ -0,0 +1,218 @@
+/*
+ * finddev.c -- this routine attempts to find a particular device in
+ * /dev
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <dirent.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h>
+#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+struct dir_list {
+ char *name;
+ struct dir_list *next;
+};
+
+/*
+ * This function adds an entry to the directory list
+ */
+static void add_to_dirlist(const char *name, struct dir_list **list)
+{
+ struct dir_list *dp;
+
+ dp = malloc(sizeof(struct dir_list));
+ if (!dp)
+ return;
+ dp->name = malloc(strlen(name)+1);
+ if (!dp->name) {
+ free(dp);
+ return;
+ }
+ strcpy(dp->name, name);
+ dp->next = *list;
+ *list = dp;
+}
+
+/*
+ * This function frees a directory list
+ */
+static void free_dirlist(struct dir_list **list)
+{
+ struct dir_list *dp, *next;
+
+ for (dp = *list; dp; dp = next) {
+ next = dp->next;
+ free(dp->name);
+ free(dp);
+ }
+ *list = 0;
+}
+
+static int scan_dir(char *dirname, dev_t device, struct dir_list **list,
+ char **ret_path)
+{
+ DIR *dir;
+ struct dirent *dp;
+ char path[1024], *cp;
+ int dirlen;
+ struct stat st;
+
+ dirlen = strlen(dirname);
+ if ((dir = opendir(dirname)) == NULL)
+ return errno;
+ dp = readdir(dir);
+ while (dp) {
+ if (dirlen + strlen(dp->d_name) + 2 >= sizeof(path))
+ goto skip_to_next;
+ if (dp->d_name[0] == '.' &&
+ ((dp->d_name[1] == 0) ||
+ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0))))
+ goto skip_to_next;
+ sprintf(path, "%s/%s", dirname, dp->d_name);
+ if (stat(path, &st) < 0)
+ goto skip_to_next;
+ if (S_ISDIR(st.st_mode))
+ add_to_dirlist(path, list);
+ if (ext2fsP_is_disk_device(st.st_mode) &&
+ st.st_rdev == device) {
+ cp = malloc(strlen(path)+1);
+ if (!cp) {
+ closedir(dir);
+ return ENOMEM;
+ }
+ strcpy(cp, path);
+ *ret_path = cp;
+ goto success;
+ }
+ skip_to_next:
+ dp = readdir(dir);
+ }
+success:
+ closedir(dir);
+ return 0;
+}
+
+/*
+ * This function finds the pathname to a block device with a given
+ * device number. It returns a pointer to allocated memory to the
+ * pathname on success, and NULL on failure.
+ */
+char *ext2fs_find_block_device(dev_t device)
+{
+ struct dir_list *list = 0, *new_list = 0;
+ struct dir_list *current;
+ char *ret_path = 0;
+ int level = 0;
+
+ /*
+ * Add the starting directories to search...
+ */
+ add_to_dirlist("/devices", &list);
+ add_to_dirlist("/devfs", &list);
+ add_to_dirlist("/dev", &list);
+
+ while (list) {
+ current = list;
+ list = list->next;
+#ifdef DEBUG
+ printf("Scanning directory %s\n", current->name);
+#endif
+ scan_dir(current->name, device, &new_list, &ret_path);
+ free(current->name);
+ free(current);
+ if (ret_path)
+ break;
+ /*
+ * If we're done checking at this level, descend to
+ * the next level of subdirectories. (breadth-first)
+ */
+ if (list == 0) {
+ list = new_list;
+ new_list = 0;
+ /* Avoid infinite loop */
+ if (++level >= EXT2FS_MAX_NESTED_LINKS)
+ break;
+ }
+ }
+ free_dirlist(&list);
+ free_dirlist(&new_list);
+ return ret_path;
+}
+
+
+#ifdef DEBUG
+int main(int argc, char** argv)
+{
+ char *devname, *tmp;
+ int major, minor;
+ dev_t device;
+ const char *errmsg = "Couldn't parse %s: %s\n";
+
+ if ((argc != 2) && (argc != 3)) {
+ fprintf(stderr, "Usage: %s device_number\n", argv[0]);
+ fprintf(stderr, "\t: %s major minor\n", argv[0]);
+ exit(1);
+ }
+ if (argc == 2) {
+ device = strtoul(argv[1], &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, errmsg, "device number", argv[1]);
+ exit(1);
+ }
+ } else {
+ major = strtoul(argv[1], &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, errmsg, "major number", argv[1]);
+ exit(1);
+ }
+ minor = strtoul(argv[2], &tmp, 0);
+ if (*tmp) {
+ fprintf(stderr, errmsg, "minor number", argv[2]);
+ exit(1);
+ }
+ device = makedev(major, minor);
+ printf("Looking for device 0x%04x (%d:%d)\n", device,
+ major, minor);
+ }
+ devname = ext2fs_find_block_device(device);
+ if (devname) {
+ printf("Found device! %s\n", devname);
+ free(devname);
+ } else {
+ printf("Couldn't find device.\n");
+ }
+ return 0;
+}
+
+#endif
diff --git a/lib/ext2fs/flushb.c b/lib/ext2fs/flushb.c
new file mode 100644
index 0000000..bb7daf4
--- /dev/null
+++ b/lib/ext2fs/flushb.c
@@ -0,0 +1,88 @@
+/*
+ * flushb.c --- Hides system-dependent information for both syncing a
+ * device to disk and to flush any buffers from disk cache.
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#if HAVE_SYS_MOUNT_H
+#include <sys/param.h>
+#include <sys/mount.h> /* This may define BLKFLSBUF */
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * For Linux, define BLKFLSBUF and FDFLUSH if necessary, since
+ * not all portable header file does so for us. This really should be
+ * fixed in the glibc header files. (Recent glibcs appear to define
+ * BLKFLSBUF in sys/mount.h, but FDFLUSH still doesn't seem to be
+ * defined anywhere portable.) Until then....
+ */
+#ifdef __linux__
+#ifndef BLKFLSBUF
+#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
+#endif
+#ifndef FDFLUSH
+#define FDFLUSH _IO(2,0x4b) /* flush floppy disk */
+#endif
+#endif
+
+/*
+ * This function will sync a device/file, and optionally attempt to
+ * flush the buffer cache. The latter is basically only useful for
+ * system benchmarks and for torturing systems in burn-in tests. :)
+ */
+errcode_t ext2fs_sync_device(int fd, int flushb)
+{
+ /*
+ * We always sync the device in case we're running on old
+ * kernels for which we can lose data if we don't. (There
+ * still is a race condition for those kernels, but this
+ * reduces it greatly.)
+ */
+#if defined(HAVE_FSYNC)
+ if (fsync (fd) == -1)
+ return errno;
+#endif
+
+ if (flushb) {
+ errcode_t retval = 0;
+
+#ifdef BLKFLSBUF
+ if (ioctl (fd, BLKFLSBUF, 0) == 0)
+ return 0;
+ retval = errno;
+#elif defined(__linux__)
+#warning BLKFLSBUF not defined
+#endif
+#ifdef FDFLUSH
+ /* In case this is a floppy */
+ if (ioctl(fd, FDFLUSH, 0) == 0)
+ return 0;
+ if (retval == 0)
+ retval = errno;
+#elif defined(__linux__)
+#warning FDFLUSH not defined
+#endif
+ return retval;
+ }
+ return 0;
+}
diff --git a/lib/ext2fs/freefs.c b/lib/ext2fs/freefs.c
new file mode 100644
index 0000000..68b8e9a
--- /dev/null
+++ b/lib/ext2fs/freefs.c
@@ -0,0 +1,108 @@
+/*
+ * freefs.c --- free an ext2 filesystem
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+#include "hashmap.h"
+
+void ext2fs_free(ext2_filsys fs)
+{
+ if (!fs || (fs->magic != EXT2_ET_MAGIC_EXT2FS_FILSYS))
+ return;
+ if (fs->image_io != fs->io) {
+ if (fs->image_io)
+ io_channel_close(fs->image_io);
+ }
+ if (fs->io) {
+ io_channel_close(fs->io);
+ }
+ if (fs->device_name)
+ ext2fs_free_mem(&fs->device_name);
+ if (fs->super)
+ ext2fs_free_mem(&fs->super);
+ if (fs->orig_super)
+ ext2fs_free_mem(&fs->orig_super);
+ if (fs->group_desc)
+ ext2fs_free_mem(&fs->group_desc);
+ if (fs->block_map)
+ ext2fs_free_block_bitmap(fs->block_map);
+ if (fs->inode_map)
+ ext2fs_free_inode_bitmap(fs->inode_map);
+ if (fs->image_header)
+ ext2fs_free_mem(&fs->image_header);
+
+ if (fs->badblocks)
+ ext2fs_badblocks_list_free(fs->badblocks);
+ fs->badblocks = 0;
+
+ if (fs->dblist)
+ ext2fs_free_dblist(fs->dblist);
+
+ if (fs->icache)
+ ext2fs_free_inode_cache(fs->icache);
+
+ if (fs->mmp_buf)
+ ext2fs_free_mem(&fs->mmp_buf);
+ if (fs->mmp_cmp)
+ ext2fs_free_mem(&fs->mmp_cmp);
+
+ if (fs->block_sha_map)
+ ext2fs_hashmap_free(fs->block_sha_map);
+
+ fs->magic = 0;
+
+ ext2fs_zero_blocks2(NULL, 0, 0, NULL, NULL);
+ ext2fs_free_mem(&fs);
+}
+
+/*
+ * This procedure frees a badblocks list.
+ */
+void ext2fs_u32_list_free(ext2_u32_list bb)
+{
+ if (bb->magic != EXT2_ET_MAGIC_BADBLOCKS_LIST)
+ return;
+
+ if (bb->list)
+ ext2fs_free_mem(&bb->list);
+ bb->list = 0;
+ ext2fs_free_mem(&bb);
+}
+
+void ext2fs_badblocks_list_free(ext2_badblocks_list bb)
+{
+ ext2fs_u32_list_free((ext2_u32_list) bb);
+}
+
+
+/*
+ * Free a directory block list
+ */
+void ext2fs_free_dblist(ext2_dblist dblist)
+{
+ if (!dblist || (dblist->magic != EXT2_ET_MAGIC_DBLIST))
+ return;
+
+ if (dblist->list)
+ ext2fs_free_mem(&dblist->list);
+ dblist->list = 0;
+ if (dblist->fs && dblist->fs->dblist == dblist)
+ dblist->fs->dblist = 0;
+ dblist->magic = 0;
+ ext2fs_free_mem(&dblist);
+}
+
diff --git a/lib/ext2fs/gen_bitmap.c b/lib/ext2fs/gen_bitmap.c
new file mode 100644
index 0000000..1536d4b
--- /dev/null
+++ b/lib/ext2fs/gen_bitmap.c
@@ -0,0 +1,650 @@
+/*
+ * gen_bitmap.c --- Generic (32-bit) bitmap routines
+ *
+ * Copyright (C) 2001 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+struct ext2fs_struct_generic_bitmap_32 {
+ errcode_t magic;
+ ext2_filsys fs;
+ __u32 start, end;
+ __u32 real_end;
+ char * description;
+ char * bitmap;
+ errcode_t base_error_code;
+ __u32 reserved[7];
+};
+
+typedef struct ext2fs_struct_generic_bitmap_32 *ext2fs_generic_bitmap_32;
+
+#define EXT2FS_IS_32_BITMAP(bmap) \
+ (((bmap)->magic == EXT2_ET_MAGIC_GENERIC_BITMAP) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_BLOCK_BITMAP) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_INODE_BITMAP))
+
+#define EXT2FS_IS_64_BITMAP(bmap) \
+ (((bmap)->magic == EXT2_ET_MAGIC_GENERIC_BITMAP64) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_BLOCK_BITMAP64) || \
+ ((bmap)->magic == EXT2_ET_MAGIC_INODE_BITMAP64))
+
+/*
+ * Used by previously inlined function, so we have to export this and
+ * not change the function signature
+ */
+void ext2fs_warn_bitmap2(ext2fs_generic_bitmap gen_bitmap,
+ int code, unsigned long arg)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+
+#ifndef OMIT_COM_ERR
+ if (bitmap->description)
+ com_err(0, bitmap->base_error_code+code,
+ "#%lu for %s", arg, bitmap->description);
+ else
+ com_err(0, bitmap->base_error_code + code, "#%lu", arg);
+#endif
+}
+
+static errcode_t check_magic(ext2fs_generic_bitmap bitmap)
+{
+ if (!bitmap || !((bitmap->magic == EXT2_ET_MAGIC_GENERIC_BITMAP) ||
+ (bitmap->magic == EXT2_ET_MAGIC_INODE_BITMAP) ||
+ (bitmap->magic == EXT2_ET_MAGIC_BLOCK_BITMAP)))
+ return EXT2_ET_MAGIC_GENERIC_BITMAP;
+ return 0;
+}
+
+errcode_t ext2fs_make_generic_bitmap(errcode_t magic, ext2_filsys fs,
+ __u32 start, __u32 end, __u32 real_end,
+ const char *descr, char *init_map,
+ ext2fs_generic_bitmap *ret)
+{
+ ext2fs_generic_bitmap_32 bitmap;
+ errcode_t retval;
+ size_t size;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2fs_struct_generic_bitmap_32),
+ &bitmap);
+ if (retval)
+ return retval;
+
+ bitmap->magic = magic;
+ bitmap->fs = fs;
+ bitmap->start = start;
+ bitmap->end = end;
+ bitmap->real_end = real_end;
+ switch (magic) {
+ case EXT2_ET_MAGIC_INODE_BITMAP:
+ bitmap->base_error_code = EXT2_ET_BAD_INODE_MARK;
+ break;
+ case EXT2_ET_MAGIC_BLOCK_BITMAP:
+ bitmap->base_error_code = EXT2_ET_BAD_BLOCK_MARK;
+ break;
+ default:
+ bitmap->base_error_code = EXT2_ET_BAD_GENERIC_MARK;
+ }
+ if (descr) {
+ retval = ext2fs_get_mem(strlen(descr)+1, &bitmap->description);
+ if (retval) {
+ ext2fs_free_mem(&bitmap);
+ return retval;
+ }
+ strcpy(bitmap->description, descr);
+ } else
+ bitmap->description = 0;
+
+ size = (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1);
+ /* Round up to allow for the BT x86 instruction */
+ size = (size + 7) & ~3;
+ retval = ext2fs_get_mem(size, &bitmap->bitmap);
+ if (retval) {
+ ext2fs_free_mem(&bitmap->description);
+ ext2fs_free_mem(&bitmap);
+ return retval;
+ }
+
+ if (init_map)
+ memcpy(bitmap->bitmap, init_map, size);
+ else
+ memset(bitmap->bitmap, 0, size);
+ *ret = (ext2fs_generic_bitmap) bitmap;
+ return 0;
+}
+
+errcode_t ext2fs_allocate_generic_bitmap(__u32 start,
+ __u32 end,
+ __u32 real_end,
+ const char *descr,
+ ext2fs_generic_bitmap *ret)
+{
+ return ext2fs_make_generic_bitmap(EXT2_ET_MAGIC_GENERIC_BITMAP, 0,
+ start, end, real_end, descr, 0, ret);
+}
+
+errcode_t ext2fs_copy_generic_bitmap(ext2fs_generic_bitmap gen_src,
+ ext2fs_generic_bitmap *dest)
+{
+ ext2fs_generic_bitmap_32 src = (ext2fs_generic_bitmap_32) gen_src;
+
+ return (ext2fs_make_generic_bitmap(src->magic, src->fs,
+ src->start, src->end,
+ src->real_end,
+ src->description, src->bitmap,
+ dest));
+}
+
+void ext2fs_free_generic_bitmap(ext2fs_inode_bitmap gen_bitmap)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+
+ if (check_magic(gen_bitmap))
+ return;
+
+ bitmap->magic = 0;
+ if (bitmap->description) {
+ ext2fs_free_mem(&bitmap->description);
+ bitmap->description = 0;
+ }
+ if (bitmap->bitmap) {
+ ext2fs_free_mem(&bitmap->bitmap);
+ bitmap->bitmap = 0;
+ }
+ ext2fs_free_mem(&bitmap);
+}
+
+int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno)
+{
+ ext2fs_generic_bitmap_32 bitmap32 = (ext2fs_generic_bitmap_32) bitmap;
+
+ if (!EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (EXT2FS_IS_64_BITMAP(bitmap)) {
+ ext2fs_warn_bitmap32(bitmap, __func__);
+ return ext2fs_test_generic_bmap(bitmap, bitno);
+ }
+#ifndef OMIT_COM_ERR
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "test_bitmap(%lu)", (unsigned long) bitno);
+#endif
+ return 0;
+ }
+
+ if ((bitno < bitmap32->start) || (bitno > bitmap32->end)) {
+ ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, bitno);
+ return 0;
+ }
+ return ext2fs_test_bit(bitno - bitmap32->start, bitmap32->bitmap);
+}
+
+int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ __u32 bitno)
+{
+ ext2fs_generic_bitmap_32 bitmap32 = (ext2fs_generic_bitmap_32) bitmap;
+
+ if (!EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (EXT2FS_IS_64_BITMAP(bitmap)) {
+ ext2fs_warn_bitmap32(bitmap, __func__);
+ return ext2fs_mark_generic_bmap(bitmap, bitno);
+ }
+#ifndef OMIT_COM_ERR
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "mark_bitmap(%lu)", (unsigned long) bitno);
+#endif
+ return 0;
+ }
+
+ if ((bitno < bitmap32->start) || (bitno > bitmap32->end)) {
+ ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno);
+ return 0;
+ }
+ return ext2fs_set_bit(bitno - bitmap32->start, bitmap32->bitmap);
+}
+
+int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno)
+{
+ ext2fs_generic_bitmap_32 bitmap32 = (ext2fs_generic_bitmap_32) bitmap;
+
+ if (!EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (EXT2FS_IS_64_BITMAP(bitmap)) {
+ ext2fs_warn_bitmap32(bitmap, __func__);
+ return ext2fs_unmark_generic_bmap(bitmap, bitno);
+ }
+#ifndef OMIT_COM_ERR
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "mark_bitmap(%lu)", (unsigned long) bitno);
+#endif
+ return 0;
+ }
+
+ if ((bitno < bitmap32->start) || (bitno > bitmap32->end)) {
+ ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno);
+ return 0;
+ }
+ return ext2fs_clear_bit(bitno - bitmap32->start, bitmap32->bitmap);
+}
+
+__u32 ext2fs_get_generic_bitmap_start(ext2fs_generic_bitmap bitmap)
+{
+ ext2fs_generic_bitmap_32 bitmap32 = (ext2fs_generic_bitmap_32) bitmap;
+
+ if (!EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (EXT2FS_IS_64_BITMAP(bitmap)) {
+ ext2fs_warn_bitmap32(bitmap, __func__);
+ return ext2fs_get_generic_bmap_start(bitmap);
+ }
+#ifndef OMIT_COM_ERR
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "get_bitmap_start");
+#endif
+ return 0;
+ }
+
+ return bitmap32->start;
+}
+
+__u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap bitmap)
+{
+ ext2fs_generic_bitmap_32 bitmap32 = (ext2fs_generic_bitmap_32) bitmap;
+
+ if (!EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (EXT2FS_IS_64_BITMAP(bitmap)) {
+ ext2fs_warn_bitmap32(bitmap, __func__);
+ return ext2fs_get_generic_bmap_end(bitmap);
+ }
+#ifndef OMIT_COM_ERR
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "get_bitmap_end");
+#endif
+ return 0;
+ }
+ return bitmap32->end;
+}
+
+void ext2fs_clear_generic_bitmap(ext2fs_generic_bitmap bitmap)
+{
+ ext2fs_generic_bitmap_32 bitmap32 = (ext2fs_generic_bitmap_32) bitmap;
+
+ if (!EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (EXT2FS_IS_64_BITMAP(bitmap)) {
+ ext2fs_warn_bitmap32(bitmap, __func__);
+ ext2fs_clear_generic_bmap(bitmap);
+ return;
+ }
+#ifndef OMIT_COM_ERR
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "clear_generic_bitmap");
+#endif
+ return;
+ }
+
+ memset(bitmap32->bitmap, 0,
+ (size_t) (((bitmap32->real_end - bitmap32->start) / 8) + 1));
+}
+
+errcode_t ext2fs_fudge_generic_bitmap_end(ext2fs_inode_bitmap gen_bitmap,
+ errcode_t magic, errcode_t neq,
+ ext2_ino_t end, ext2_ino_t *oend)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+
+ EXT2_CHECK_MAGIC(bitmap, magic);
+
+ if (end > bitmap->real_end)
+ return neq;
+ if (oend)
+ *oend = bitmap->end;
+ bitmap->end = end;
+ return 0;
+}
+
+errcode_t ext2fs_resize_generic_bitmap(errcode_t magic,
+ __u32 new_end, __u32 new_real_end,
+ ext2fs_generic_bitmap gen_bmap)
+{
+ ext2fs_generic_bitmap_32 bmap = (ext2fs_generic_bitmap_32) gen_bmap;
+ errcode_t retval;
+ size_t size, new_size;
+ __u32 bitno;
+
+ if (!bmap || (bmap->magic != magic))
+ return magic;
+
+ /*
+ * If we're expanding the bitmap, make sure all of the new
+ * parts of the bitmap are zero.
+ */
+ if (new_end > bmap->end) {
+ bitno = bmap->real_end;
+ if (bitno > new_end)
+ bitno = new_end;
+ for (; bitno > bmap->end; bitno--)
+ ext2fs_clear_bit(bitno - bmap->start, bmap->bitmap);
+ }
+ if (new_real_end == bmap->real_end) {
+ bmap->end = new_end;
+ return 0;
+ }
+
+ size = ((bmap->real_end - bmap->start) / 8) + 1;
+ new_size = ((new_real_end - bmap->start) / 8) + 1;
+
+ if (size != new_size) {
+ retval = ext2fs_resize_mem(size, new_size, &bmap->bitmap);
+ if (retval)
+ return retval;
+ }
+ if (new_size > size)
+ memset(bmap->bitmap + size, 0, new_size - size);
+
+ bmap->end = new_end;
+ bmap->real_end = new_real_end;
+ return 0;
+}
+
+errcode_t ext2fs_compare_generic_bitmap(errcode_t magic, errcode_t neq,
+ ext2fs_generic_bitmap gen_bm1,
+ ext2fs_generic_bitmap gen_bm2)
+{
+ ext2fs_generic_bitmap_32 bm1 = (ext2fs_generic_bitmap_32) gen_bm1;
+ ext2fs_generic_bitmap_32 bm2 = (ext2fs_generic_bitmap_32) gen_bm2;
+ blk_t i;
+
+ if (!bm1 || bm1->magic != magic)
+ return magic;
+ if (!bm2 || bm2->magic != magic)
+ return magic;
+
+ if ((bm1->start != bm2->start) ||
+ (bm1->end != bm2->end) ||
+ (memcmp(bm1->bitmap, bm2->bitmap,
+ (size_t) (bm1->end - bm1->start)/8)))
+ return neq;
+
+ for (i = bm1->end - ((bm1->end - bm1->start) % 8); i <= bm1->end; i++)
+ if (ext2fs_fast_test_block_bitmap(gen_bm1, i) !=
+ ext2fs_fast_test_block_bitmap(gen_bm2, i))
+ return neq;
+
+ return 0;
+}
+
+void ext2fs_set_generic_bitmap_padding(ext2fs_generic_bitmap gen_map)
+{
+ ext2fs_generic_bitmap_32 map = (ext2fs_generic_bitmap_32) gen_map;
+ __u32 i, j;
+
+ /* Protect loop from wrap-around if map->real_end is maxed */
+ for (i=map->end+1, j = i - map->start;
+ i <= map->real_end && i > map->end;
+ i++, j++)
+ ext2fs_set_bit(j, map->bitmap);
+}
+
+errcode_t ext2fs_get_generic_bitmap_range(ext2fs_generic_bitmap gen_bmap,
+ errcode_t magic,
+ __u32 start, __u32 num,
+ void *out)
+{
+ ext2fs_generic_bitmap_32 bmap = (ext2fs_generic_bitmap_32) gen_bmap;
+
+ if (!bmap || (bmap->magic != magic))
+ return magic;
+
+ if ((start < bmap->start) || (start+num-1 > bmap->real_end))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ memcpy(out, bmap->bitmap + ((start - bmap->start) >> 3), (num+7) >> 3);
+ return 0;
+}
+
+errcode_t ext2fs_set_generic_bitmap_range(ext2fs_generic_bitmap gen_bmap,
+ errcode_t magic,
+ __u32 start, __u32 num,
+ void *in)
+{
+ ext2fs_generic_bitmap_32 bmap = (ext2fs_generic_bitmap_32) gen_bmap;
+
+ if (!bmap || (bmap->magic != magic))
+ return magic;
+
+ if ((start < bmap->start) || (start+num-1 > bmap->real_end))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ memcpy(bmap->bitmap + ((start - bmap->start) >> 3), in, (num+7) >> 3);
+ return 0;
+}
+
+/*
+ * Compare @mem to zero buffer by 256 bytes.
+ * Return 1 if @mem is zeroed memory, otherwise return 0.
+ */
+int ext2fs_mem_is_zero(const char *mem, size_t len)
+{
+ static const char zero_buf[256];
+
+ while (len >= sizeof(zero_buf)) {
+ if (memcmp(mem, zero_buf, sizeof(zero_buf)))
+ return 0;
+ len -= sizeof(zero_buf);
+ mem += sizeof(zero_buf);
+ }
+ /* Deal with leftover bytes. */
+ if (len)
+ return !memcmp(mem, zero_buf, len);
+ return 1;
+}
+
+/*
+ * Return true if all of the bits in a specified range are clear
+ */
+static int ext2fs_test_clear_generic_bitmap_range(ext2fs_generic_bitmap gen_bitmap,
+ unsigned int start,
+ unsigned int len)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+ size_t start_byte, len_byte = len >> 3;
+ unsigned int start_bit, len_bit = len % 8;
+ int first_bit = 0;
+ int last_bit = 0;
+ int mark_count = 0;
+ int mark_bit = 0;
+ int i;
+ const char *ADDR = bitmap->bitmap;
+
+ start -= bitmap->start;
+ start_byte = start >> 3;
+ start_bit = start % 8;
+
+ if (start_bit != 0) {
+ /*
+ * The compared start block number or start inode number
+ * is not the first bit in a byte.
+ */
+ mark_count = 8 - start_bit;
+ if (len < 8 - start_bit) {
+ mark_count = (int)len;
+ mark_bit = len + start_bit - 1;
+ } else
+ mark_bit = 7;
+
+ for (i = mark_count; i > 0; i--, mark_bit--)
+ first_bit |= 1 << mark_bit;
+
+ /*
+ * Compare blocks or inodes in the first byte.
+ * If there is any marked bit, this function returns 0.
+ */
+ if (first_bit & ADDR[start_byte])
+ return 0;
+ else if (len <= 8 - start_bit)
+ return 1;
+
+ start_byte++;
+ len_bit = (len - mark_count) % 8;
+ len_byte = (len - mark_count) >> 3;
+ }
+
+ /*
+ * The compared start block number or start inode number is
+ * the first bit in a byte.
+ */
+ if (len_bit != 0) {
+ /*
+ * The compared end block number or end inode number is
+ * not the last bit in a byte.
+ */
+ for (mark_bit = len_bit - 1; mark_bit >= 0; mark_bit--)
+ last_bit |= 1 << mark_bit;
+
+ /*
+ * Compare blocks or inodes in the last byte.
+ * If there is any marked bit, this function returns 0.
+ */
+ if (last_bit & ADDR[start_byte + len_byte])
+ return 0;
+ else if (len_byte == 0)
+ return 1;
+ }
+
+ /* Check whether all bytes are 0 */
+ return ext2fs_mem_is_zero(ADDR + start_byte, len_byte);
+}
+
+errcode_t ext2fs_find_first_zero_generic_bitmap(ext2fs_generic_bitmap gen_bitmap,
+ __u32 start, __u32 end,
+ __u32 *out)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+ blk_t b;
+
+ if (start < bitmap->start || end > bitmap->end || start > end) {
+ ext2fs_warn_bitmap2(gen_bitmap, EXT2FS_TEST_ERROR, start);
+ return EINVAL;
+ }
+
+ while (start <= end) {
+ b = ext2fs_test_bit(start - bitmap->start, bitmap->bitmap);
+ if (!b) {
+ *out = start;
+ return 0;
+ }
+ start++;
+ }
+
+ return ENOENT;
+}
+
+errcode_t ext2fs_find_first_set_generic_bitmap(ext2fs_generic_bitmap gen_bitmap,
+ __u32 start, __u32 end,
+ __u32 *out)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+ blk_t b;
+
+ if (start < bitmap->start || end > bitmap->end || start > end) {
+ ext2fs_warn_bitmap2(gen_bitmap, EXT2FS_TEST_ERROR, start);
+ return EINVAL;
+ }
+
+ while (start <= end) {
+ b = ext2fs_test_bit(start - bitmap->start, bitmap->bitmap);
+ if (b) {
+ *out = start;
+ return 0;
+ }
+ start++;
+ }
+
+ return ENOENT;
+}
+
+int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap gen_bitmap,
+ blk_t block, int num)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+
+ EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_BLOCK_BITMAP);
+ if ((block < bitmap->start) || (block > bitmap->real_end) ||
+ (block+num-1 > bitmap->real_end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST,
+ block, bitmap->description);
+ return 0;
+ }
+ return ext2fs_test_clear_generic_bitmap_range((ext2fs_generic_bitmap)
+ bitmap, block, num);
+}
+
+int ext2fs_test_inode_bitmap_range(ext2fs_inode_bitmap gen_bitmap,
+ ext2_ino_t inode, int num)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+
+ EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_INODE_BITMAP);
+ if ((inode < bitmap->start) || (inode > bitmap->real_end) ||
+ (inode+num-1 > bitmap->real_end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_INODE_TEST,
+ inode, bitmap->description);
+ return 0;
+ }
+ return ext2fs_test_clear_generic_bitmap_range((ext2fs_generic_bitmap)
+ bitmap, inode, num);
+}
+
+void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap gen_bitmap,
+ blk_t block, int num)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+ int i;
+
+ if ((block < bitmap->start) || (block > bitmap->end) ||
+ (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
+ bitmap->description);
+ return;
+ }
+ for (i=0; i < num; i++)
+ ext2fs_fast_set_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+
+void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap gen_bitmap,
+ blk_t block, int num)
+{
+ ext2fs_generic_bitmap_32 bitmap = (ext2fs_generic_bitmap_32) gen_bitmap;
+ int i;
+
+ if ((block < bitmap->start) || (block > bitmap->end) ||
+ (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
+ bitmap->description);
+ return;
+ }
+ for (i=0; i < num; i++)
+ ext2fs_fast_clear_bit(block + i - bitmap->start,
+ bitmap->bitmap);
+}
+
diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
new file mode 100644
index 0000000..4289e81
--- /dev/null
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -0,0 +1,981 @@
+/*
+ * gen_bitmap64.c --- routines to read, write, and manipulate the new qinode and
+ * block bitmaps.
+ *
+ * Copyright (C) 2007, 2008 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <errno.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+#include "bmap64.h"
+
+/*
+ * Design of 64-bit bitmaps
+ *
+ * In order maintain ABI compatibility with programs that don't
+ * understand about 64-bit blocks/inodes,
+ * ext2fs_allocate_inode_bitmap() and ext2fs_allocate_block_bitmap()
+ * will create old-style bitmaps unless the application passes the
+ * flag EXT2_FLAG_64BITS to ext2fs_open(). If this flag is
+ * passed, then we know the application has been recompiled, so we can
+ * use the new-style bitmaps. If it is not passed, we have to return
+ * an error if trying to open a filesystem which needs 64-bit bitmaps.
+ *
+ * The new bitmaps use a new set of structure magic numbers, so that
+ * both the old-style and new-style interfaces can identify which
+ * version of the data structure was used. Both the old-style and
+ * new-style interfaces will support either type of bitmap, although
+ * of course 64-bit operation will only be possible when both the
+ * new-style interface and the new-style bitmap are used.
+ *
+ * For example, the new bitmap interfaces will check the structure
+ * magic numbers and so will be able to detect old-stype bitmap. If
+ * they see an old-style bitmap, they will pass it to the gen_bitmap.c
+ * functions for handling. The same will be true for the old
+ * interfaces as well.
+ *
+ * The new-style interfaces will have several different back-end
+ * implementations, so we can support different encodings that are
+ * appropriate for different applications. In general the default
+ * should be whatever makes sense, and what the application/library
+ * will use. However, e2fsck may need specialized implementations for
+ * its own uses. For example, when doing parent directory pointer
+ * loop detections in pass 3, the bitmap will *always* be sparse, so
+ * e2fsck can request an encoding which is optimized for that.
+ */
+
+static void warn_bitmap(ext2fs_generic_bitmap_64 bitmap,
+ int code, __u64 arg)
+{
+#ifndef OMIT_COM_ERR
+ if (bitmap->description)
+ com_err(0, bitmap->base_error_code+code,
+ "#%llu for %s", (unsigned long long) arg,
+ bitmap->description);
+ else
+ com_err(0, bitmap->base_error_code + code, "#%llu",
+ (unsigned long long) arg);
+#endif
+}
+
+#ifdef ENABLE_BMAP_STATS_OPS
+#define INC_STAT(map, name) map->stats.name
+#else
+#define INC_STAT(map, name) ;;
+#endif
+
+
+errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
+ int type, __u64 start, __u64 end,
+ __u64 real_end,
+ const char *descr,
+ ext2fs_generic_bitmap *ret)
+{
+ ext2fs_generic_bitmap_64 bitmap;
+ struct ext2_bitmap_ops *ops;
+ ext2_ino_t num_dirs;
+ errcode_t retval;
+
+ if (!type)
+ type = EXT2FS_BMAP64_BITARRAY;
+
+ switch (type) {
+ case EXT2FS_BMAP64_BITARRAY:
+ ops = &ext2fs_blkmap64_bitarray;
+ break;
+ case EXT2FS_BMAP64_RBTREE:
+ ops = &ext2fs_blkmap64_rbtree;
+ break;
+ case EXT2FS_BMAP64_AUTODIR:
+ retval = ext2fs_get_num_dirs(fs, &num_dirs);
+ if (retval || num_dirs > (fs->super->s_inodes_count / 320))
+ ops = &ext2fs_blkmap64_bitarray;
+ else
+ ops = &ext2fs_blkmap64_rbtree;
+ break;
+ default:
+ return EINVAL;
+ }
+
+ retval = ext2fs_get_memzero(sizeof(struct ext2fs_struct_generic_bitmap_64),
+ &bitmap);
+ if (retval)
+ return retval;
+
+#ifdef ENABLE_BMAP_STATS
+ if (gettimeofday(&bitmap->stats.created,
+ (struct timezone *) NULL) == -1) {
+ perror("gettimeofday");
+ ext2fs_free_mem(&bitmap);
+ return 1;
+ }
+ bitmap->stats.type = type;
+#endif
+
+ /* XXX factor out, repeated in copy_bmap */
+ bitmap->magic = magic;
+ bitmap->fs = fs;
+ bitmap->start = start;
+ bitmap->end = end;
+ bitmap->real_end = real_end;
+ bitmap->bitmap_ops = ops;
+ bitmap->cluster_bits = 0;
+ switch (magic) {
+ case EXT2_ET_MAGIC_INODE_BITMAP64:
+ bitmap->base_error_code = EXT2_ET_BAD_INODE_MARK;
+ break;
+ case EXT2_ET_MAGIC_BLOCK_BITMAP64:
+ bitmap->base_error_code = EXT2_ET_BAD_BLOCK_MARK;
+ bitmap->cluster_bits = fs->cluster_ratio_bits;
+ break;
+ default:
+ bitmap->base_error_code = EXT2_ET_BAD_GENERIC_MARK;
+ }
+ if (descr) {
+ retval = ext2fs_get_mem(strlen(descr)+1, &bitmap->description);
+ if (retval) {
+ ext2fs_free_mem(&bitmap);
+ return retval;
+ }
+ strcpy(bitmap->description, descr);
+ } else
+ bitmap->description = 0;
+
+ retval = bitmap->bitmap_ops->new_bmap(fs, bitmap);
+ if (retval) {
+ ext2fs_free_mem(&bitmap->description);
+ ext2fs_free_mem(&bitmap);
+ return retval;
+ }
+
+ *ret = (ext2fs_generic_bitmap) bitmap;
+ return 0;
+}
+
+#ifdef ENABLE_BMAP_STATS
+static void ext2fs_print_bmap_statistics(ext2fs_generic_bitmap_64 bitmap)
+{
+ struct ext2_bmap_statistics *stats = &bitmap->stats;
+#ifdef ENABLE_BMAP_STATS_OPS
+ float mark_seq_perc = 0.0, test_seq_perc = 0.0;
+ float mark_back_perc = 0.0, test_back_perc = 0.0;
+ struct timeval now;
+ double inuse;
+
+ if (stats->test_count) {
+ test_seq_perc = ((float)stats->test_seq /
+ stats->test_count) * 100;
+ test_back_perc = ((float)stats->test_back /
+ stats->test_count) * 100;
+ }
+
+ if (stats->mark_count) {
+ mark_seq_perc = ((float)stats->mark_seq /
+ stats->mark_count) * 100;
+ mark_back_perc = ((float)stats->mark_back /
+ stats->mark_count) * 100;
+ }
+
+ if (gettimeofday(&now, (struct timezone *) NULL) == -1) {
+ perror("gettimeofday");
+ return;
+ }
+
+ inuse = (double) now.tv_sec + \
+ (((double) now.tv_usec) * 0.000001);
+ inuse -= (double) stats->created.tv_sec + \
+ (((double) stats->created.tv_usec) * 0.000001);
+#endif /* ENABLE_BMAP_STATS_OPS */
+
+ fprintf(stderr, "\n[+] %s bitmap (type %d)\n", bitmap->description,
+ stats->type);
+ fprintf(stderr, "=================================================\n");
+#ifdef ENABLE_BMAP_STATS_OPS
+ fprintf(stderr, "%16llu bits long\n",
+ bitmap->real_end - bitmap->start);
+ fprintf(stderr, "%16lu copy_bmap\n%16lu resize_bmap\n",
+ stats->copy_count, stats->resize_count);
+ fprintf(stderr, "%16lu mark bmap\n%16lu unmark_bmap\n",
+ stats->mark_count, stats->unmark_count);
+ fprintf(stderr, "%16lu test_bmap\n%16lu mark_bmap_extent\n",
+ stats->test_count, stats->mark_ext_count);
+ fprintf(stderr, "%16lu unmark_bmap_extent\n"
+ "%16lu test_clear_bmap_extent\n",
+ stats->unmark_ext_count, stats->test_ext_count);
+ fprintf(stderr, "%16lu set_bmap_range\n%16lu set_bmap_range\n",
+ stats->set_range_count, stats->get_range_count);
+ fprintf(stderr, "%16lu clear_bmap\n%16lu contiguous bit test (%.2f%%)\n",
+ stats->clear_count, stats->test_seq, test_seq_perc);
+ fprintf(stderr, "%16lu contiguous bit mark (%.2f%%)\n"
+ "%16llu bits tested backwards (%.2f%%)\n",
+ stats->mark_seq, mark_seq_perc,
+ stats->test_back, test_back_perc);
+ fprintf(stderr, "%16llu bits marked backwards (%.2f%%)\n"
+ "%16.2f seconds in use\n",
+ stats->mark_back, mark_back_perc, inuse);
+#endif /* ENABLE_BMAP_STATS_OPS */
+}
+#endif
+
+void ext2fs_free_generic_bmap(ext2fs_generic_bitmap gen_bmap)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+
+ if (!bmap)
+ return;
+
+ if (EXT2FS_IS_32_BITMAP(bmap)) {
+ ext2fs_free_generic_bitmap(gen_bmap);
+ return;
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return;
+
+#ifdef ENABLE_BMAP_STATS
+ if (getenv("E2FSPROGS_BITMAP_STATS")) {
+ ext2fs_print_bmap_statistics(bmap);
+ bmap->bitmap_ops->print_stats(bmap);
+ }
+#endif
+
+ bmap->bitmap_ops->free_bmap(bmap);
+
+ if (bmap->description) {
+ ext2fs_free_mem(&bmap->description);
+ bmap->description = 0;
+ }
+ bmap->magic = 0;
+ ext2fs_free_mem(&bmap);
+}
+
+errcode_t ext2fs_copy_generic_bmap(ext2fs_generic_bitmap gen_src,
+ ext2fs_generic_bitmap *dest)
+{
+ ext2fs_generic_bitmap_64 src = (ext2fs_generic_bitmap_64) gen_src;
+ char *descr, *new_descr;
+ ext2fs_generic_bitmap_64 new_bmap;
+ errcode_t retval;
+
+ if (!src)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(src))
+ return ext2fs_copy_generic_bitmap(gen_src, dest);
+
+ if (!EXT2FS_IS_64_BITMAP(src))
+ return EINVAL;
+
+ /* Allocate a new bitmap struct */
+ retval = ext2fs_get_memzero(sizeof(struct ext2fs_struct_generic_bitmap_64),
+ &new_bmap);
+ if (retval)
+ return retval;
+
+
+#ifdef ENABLE_BMAP_STATS_OPS
+ src->stats.copy_count++;
+#endif
+#ifdef ENABLE_BMAP_STATS
+ if (gettimeofday(&new_bmap->stats.created,
+ (struct timezone *) NULL) == -1) {
+ perror("gettimeofday");
+ ext2fs_free_mem(&new_bmap);
+ return 1;
+ }
+ new_bmap->stats.type = src->stats.type;
+#endif
+
+ /* Copy all the high-level parts over */
+ new_bmap->magic = src->magic;
+ new_bmap->fs = src->fs;
+ new_bmap->start = src->start;
+ new_bmap->end = src->end;
+ new_bmap->real_end = src->real_end;
+ new_bmap->bitmap_ops = src->bitmap_ops;
+ new_bmap->base_error_code = src->base_error_code;
+ new_bmap->cluster_bits = src->cluster_bits;
+
+ descr = src->description;
+ if (descr) {
+ retval = ext2fs_get_mem(strlen(descr)+10, &new_descr);
+ if (retval) {
+ ext2fs_free_mem(&new_bmap);
+ return retval;
+ }
+ strcpy(new_descr, "copy of ");
+ strcat(new_descr, descr);
+ new_bmap->description = new_descr;
+ }
+
+ retval = src->bitmap_ops->copy_bmap(src, new_bmap);
+ if (retval) {
+ ext2fs_free_mem(&new_bmap->description);
+ ext2fs_free_mem(&new_bmap);
+ return retval;
+ }
+
+ *dest = (ext2fs_generic_bitmap) new_bmap;
+
+ return 0;
+}
+
+errcode_t ext2fs_resize_generic_bmap(ext2fs_generic_bitmap gen_bmap,
+ __u64 new_end,
+ __u64 new_real_end)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+
+ if (!bmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bmap))
+ return ext2fs_resize_generic_bitmap(gen_bmap->magic, new_end,
+ new_real_end, gen_bmap);
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return EINVAL;
+
+ INC_STAT(bmap, resize_count);
+
+ return bmap->bitmap_ops->resize_bmap(bmap, new_end, new_real_end);
+}
+
+errcode_t ext2fs_fudge_generic_bmap_end(ext2fs_generic_bitmap gen_bitmap,
+ errcode_t neq,
+ __u64 end, __u64 *oend)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+
+ if (!bitmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap)) {
+ ext2_ino_t tmp_oend;
+ int retval;
+
+ retval = ext2fs_fudge_generic_bitmap_end(gen_bitmap,
+ bitmap->magic,
+ neq, end, &tmp_oend);
+ if (oend)
+ *oend = tmp_oend;
+ return retval;
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return EINVAL;
+
+ if (end > bitmap->real_end)
+ return neq;
+ if (oend)
+ *oend = bitmap->end;
+ bitmap->end = end;
+ return 0;
+}
+
+__u64 ext2fs_get_generic_bmap_start(ext2fs_generic_bitmap gen_bitmap)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+
+ if (!bitmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap))
+ return ext2fs_get_generic_bitmap_start(gen_bitmap);
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return EINVAL;
+
+ return bitmap->start;
+}
+
+__u64 ext2fs_get_generic_bmap_end(ext2fs_generic_bitmap gen_bitmap)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+
+ if (!bitmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap))
+ return ext2fs_get_generic_bitmap_end(gen_bitmap);
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return EINVAL;
+
+ return bitmap->end;
+}
+
+void ext2fs_clear_generic_bmap(ext2fs_generic_bitmap gen_bitmap)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap))
+ ext2fs_clear_generic_bitmap(gen_bitmap);
+ else
+ bitmap->bitmap_ops->clear_bmap(bitmap);
+}
+
+int ext2fs_mark_generic_bmap(ext2fs_generic_bitmap gen_bitmap,
+ __u64 arg)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+
+ if (!bitmap)
+ return 0;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (arg & ~0xffffffffULL) {
+ ext2fs_warn_bitmap2(gen_bitmap,
+ EXT2FS_MARK_ERROR, 0xffffffff);
+ return 0;
+ }
+ return ext2fs_mark_generic_bitmap(gen_bitmap, arg);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return 0;
+
+ arg >>= bitmap->cluster_bits;
+
+#ifdef ENABLE_BMAP_STATS_OPS
+ if (arg == bitmap->stats.last_marked + 1)
+ bitmap->stats.mark_seq++;
+ if (arg < bitmap->stats.last_marked)
+ bitmap->stats.mark_back++;
+ bitmap->stats.last_marked = arg;
+ bitmap->stats.mark_count++;
+#endif
+
+ if ((arg < bitmap->start) || (arg > bitmap->end)) {
+ warn_bitmap(bitmap, EXT2FS_MARK_ERROR, arg);
+ return 0;
+ }
+
+ return bitmap->bitmap_ops->mark_bmap(bitmap, arg);
+}
+
+int ext2fs_unmark_generic_bmap(ext2fs_generic_bitmap gen_bitmap,
+ __u64 arg)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+
+ if (!bitmap)
+ return 0;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (arg & ~0xffffffffULL) {
+ ext2fs_warn_bitmap2(gen_bitmap, EXT2FS_UNMARK_ERROR,
+ 0xffffffff);
+ return 0;
+ }
+ return ext2fs_unmark_generic_bitmap(gen_bitmap, arg);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return 0;
+
+ arg >>= bitmap->cluster_bits;
+
+ INC_STAT(bitmap, unmark_count);
+
+ if ((arg < bitmap->start) || (arg > bitmap->end)) {
+ warn_bitmap(bitmap, EXT2FS_UNMARK_ERROR, arg);
+ return 0;
+ }
+
+ return bitmap->bitmap_ops->unmark_bmap(bitmap, arg);
+}
+
+int ext2fs_test_generic_bmap(ext2fs_generic_bitmap gen_bitmap,
+ __u64 arg)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+ if (!bitmap)
+ return 0;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap)) {
+ if (arg & ~0xffffffffULL) {
+ ext2fs_warn_bitmap2(gen_bitmap, EXT2FS_TEST_ERROR,
+ 0xffffffff);
+ return 0;
+ }
+ return ext2fs_test_generic_bitmap(gen_bitmap, arg);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return 0;
+
+ arg >>= bitmap->cluster_bits;
+
+#ifdef ENABLE_BMAP_STATS_OPS
+ bitmap->stats.test_count++;
+ if (arg == bitmap->stats.last_tested + 1)
+ bitmap->stats.test_seq++;
+ if (arg < bitmap->stats.last_tested)
+ bitmap->stats.test_back++;
+ bitmap->stats.last_tested = arg;
+#endif
+
+ if ((arg < bitmap->start) || (arg > bitmap->end)) {
+ warn_bitmap(bitmap, EXT2FS_TEST_ERROR, arg);
+ return 0;
+ }
+
+ return bitmap->bitmap_ops->test_bmap(bitmap, arg);
+}
+
+errcode_t ext2fs_set_generic_bmap_range(ext2fs_generic_bitmap gen_bmap,
+ __u64 start, unsigned int num,
+ void *in)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+
+ if (!bmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bmap)) {
+ if ((start+num-1) & ~0xffffffffULL) {
+ ext2fs_warn_bitmap2(gen_bmap, EXT2FS_UNMARK_ERROR,
+ 0xffffffff);
+ return EINVAL;
+ }
+ return ext2fs_set_generic_bitmap_range(gen_bmap, bmap->magic,
+ start, num, in);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return EINVAL;
+
+ INC_STAT(bmap, set_range_count);
+
+ return bmap->bitmap_ops->set_bmap_range(bmap, start, num, in);
+}
+
+errcode_t ext2fs_get_generic_bmap_range(ext2fs_generic_bitmap gen_bmap,
+ __u64 start, unsigned int num,
+ void *out)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+
+ if (!bmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bmap)) {
+ if ((start+num-1) & ~0xffffffffULL) {
+ ext2fs_warn_bitmap2(gen_bmap,
+ EXT2FS_UNMARK_ERROR, 0xffffffff);
+ return EINVAL;
+ }
+ return ext2fs_get_generic_bitmap_range(gen_bmap, bmap->magic,
+ start, num, out);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return EINVAL;
+
+ INC_STAT(bmap, get_range_count);
+
+ return bmap->bitmap_ops->get_bmap_range(bmap, start, num, out);
+}
+
+errcode_t ext2fs_compare_generic_bmap(errcode_t neq,
+ ext2fs_generic_bitmap gen_bm1,
+ ext2fs_generic_bitmap gen_bm2)
+{
+ ext2fs_generic_bitmap_64 bm1 = (ext2fs_generic_bitmap_64) gen_bm1;
+ ext2fs_generic_bitmap_64 bm2 = (ext2fs_generic_bitmap_64) gen_bm2;
+ blk64_t i;
+
+ if (!bm1 || !bm2)
+ return EINVAL;
+ if (bm1->magic != bm2->magic)
+ return EINVAL;
+
+ /* Now we know both bitmaps have the same magic */
+ if (EXT2FS_IS_32_BITMAP(bm1))
+ return ext2fs_compare_generic_bitmap(bm1->magic, neq,
+ gen_bm1, gen_bm2);
+
+ if (!EXT2FS_IS_64_BITMAP(bm1))
+ return EINVAL;
+
+ if ((bm1->start != bm2->start) ||
+ (bm1->end != bm2->end))
+ return neq;
+
+ for (i = bm1->start; i < bm1->end; i++) {
+ int ret1, ret2;
+ ret1 = !!ext2fs_test_generic_bmap(gen_bm1, i);
+ ret2 = !!ext2fs_test_generic_bmap(gen_bm2, i);
+ if (ret1 != ret2) {
+ return neq;
+ }
+ }
+
+ return 0;
+}
+
+void ext2fs_set_generic_bmap_padding(ext2fs_generic_bitmap gen_bmap)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+ __u64 start, num;
+
+ if (EXT2FS_IS_32_BITMAP(bmap)) {
+ ext2fs_set_generic_bitmap_padding(gen_bmap);
+ return;
+ }
+
+ start = bmap->end + 1;
+ num = bmap->real_end - bmap->end;
+ bmap->bitmap_ops->mark_bmap_extent(bmap, start, num);
+ /* XXX ought to warn on error */
+}
+
+int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap gen_bmap,
+ blk64_t block, unsigned int num)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+ __u64 end = block + num;
+
+ if (!bmap)
+ return EINVAL;
+
+ if (num == 1)
+ return !ext2fs_test_generic_bmap((ext2fs_generic_bitmap)
+ bmap, block);
+
+ if (EXT2FS_IS_32_BITMAP(bmap)) {
+ if ((block & ~0xffffffffULL) ||
+ ((block+num-1) & ~0xffffffffULL)) {
+ ext2fs_warn_bitmap2((ext2fs_generic_bitmap) bmap,
+ EXT2FS_UNMARK_ERROR, 0xffffffff);
+ return EINVAL;
+ }
+ return ext2fs_test_block_bitmap_range(
+ (ext2fs_generic_bitmap) bmap, block, num);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return EINVAL;
+
+ INC_STAT(bmap, test_ext_count);
+
+ /* convert to clusters if necessary */
+ block >>= bmap->cluster_bits;
+ end += (1ULL << bmap->cluster_bits) - 1;
+ end >>= bmap->cluster_bits;
+ num = end - block;
+
+ if ((block < bmap->start) || (block > bmap->end) ||
+ (block+num-1 > bmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST, block,
+ bmap->description);
+ return EINVAL;
+ }
+
+ return bmap->bitmap_ops->test_clear_bmap_extent(bmap, block, num);
+}
+
+void ext2fs_mark_block_bitmap_range2(ext2fs_block_bitmap gen_bmap,
+ blk64_t block, unsigned int num)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+ __u64 end = block + num;
+
+ if (!bmap)
+ return;
+
+ if (EXT2FS_IS_32_BITMAP(bmap)) {
+ if ((block & ~0xffffffffULL) ||
+ ((block+num-1) & ~0xffffffffULL)) {
+ ext2fs_warn_bitmap2((ext2fs_generic_bitmap) bmap,
+ EXT2FS_UNMARK_ERROR, 0xffffffff);
+ return;
+ }
+ ext2fs_mark_block_bitmap_range((ext2fs_generic_bitmap) bmap,
+ block, num);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return;
+
+ INC_STAT(bmap, mark_ext_count);
+
+ /* convert to clusters if necessary */
+ block >>= bmap->cluster_bits;
+ end += (1ULL << bmap->cluster_bits) - 1;
+ end >>= bmap->cluster_bits;
+ num = end - block;
+
+ if ((block < bmap->start) || (block > bmap->end) ||
+ (block+num-1 > bmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
+ bmap->description);
+ return;
+ }
+
+ bmap->bitmap_ops->mark_bmap_extent(bmap, block, num);
+}
+
+void ext2fs_unmark_block_bitmap_range2(ext2fs_block_bitmap gen_bmap,
+ blk64_t block, unsigned int num)
+{
+ ext2fs_generic_bitmap_64 bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+ __u64 end = block + num;
+
+ if (!bmap)
+ return;
+
+ if (EXT2FS_IS_32_BITMAP(bmap)) {
+ if ((block & ~0xffffffffULL) ||
+ ((block+num-1) & ~0xffffffffULL)) {
+ ext2fs_warn_bitmap2((ext2fs_generic_bitmap) bmap,
+ EXT2FS_UNMARK_ERROR, 0xffffffff);
+ return;
+ }
+ ext2fs_unmark_block_bitmap_range((ext2fs_generic_bitmap) bmap,
+ block, num);
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bmap))
+ return;
+
+ INC_STAT(bmap, unmark_ext_count);
+
+ /* convert to clusters if necessary */
+ block >>= bmap->cluster_bits;
+ end += (1ULL << bmap->cluster_bits) - 1;
+ end >>= bmap->cluster_bits;
+ num = end - block;
+
+ if ((block < bmap->start) || (block > bmap->end) ||
+ (block+num-1 > bmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
+ bmap->description);
+ return;
+ }
+
+ bmap->bitmap_ops->unmark_bmap_extent(bmap, block, num);
+}
+
+void ext2fs_warn_bitmap32(ext2fs_generic_bitmap gen_bitmap, const char *func)
+{
+ ext2fs_generic_bitmap_64 bitmap = (ext2fs_generic_bitmap_64) gen_bitmap;
+
+#ifndef OMIT_COM_ERR
+ if (bitmap && bitmap->description)
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "called %s with 64-bit bitmap for %s", func,
+ bitmap->description);
+ else
+ com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
+ "called %s with 64-bit bitmap", func);
+#endif
+}
+
+errcode_t ext2fs_convert_subcluster_bitmap(ext2_filsys fs,
+ ext2fs_block_bitmap *bitmap)
+{
+ ext2fs_generic_bitmap_64 bmap, cmap;
+ ext2fs_block_bitmap gen_bmap = *bitmap, gen_cmap;
+ errcode_t retval;
+ blk64_t i, next, b_end, c_end;
+
+ bmap = (ext2fs_generic_bitmap_64) gen_bmap;
+ if (fs->cluster_ratio_bits == ext2fs_get_bitmap_granularity(gen_bmap))
+ return 0; /* Nothing to do */
+
+ retval = ext2fs_allocate_block_bitmap(fs, "converted cluster bitmap",
+ &gen_cmap);
+ if (retval)
+ return retval;
+
+ cmap = (ext2fs_generic_bitmap_64) gen_cmap;
+ i = bmap->start;
+ b_end = bmap->end;
+ bmap->end = bmap->real_end;
+ c_end = cmap->end;
+ cmap->end = cmap->real_end;
+ while (i < bmap->real_end) {
+ retval = ext2fs_find_first_set_block_bitmap2(gen_bmap,
+ i, bmap->real_end, &next);
+ if (retval)
+ break;
+ ext2fs_mark_block_bitmap2(gen_cmap, next);
+ i = EXT2FS_C2B(fs, EXT2FS_B2C(fs, next) + 1);
+ }
+ bmap->end = b_end;
+ cmap->end = c_end;
+ ext2fs_free_block_bitmap(gen_bmap);
+ *bitmap = (ext2fs_block_bitmap) cmap;
+ return 0;
+}
+
+errcode_t ext2fs_find_first_zero_generic_bmap(ext2fs_generic_bitmap bitmap,
+ __u64 start, __u64 end, __u64 *out)
+{
+ ext2fs_generic_bitmap_64 bmap64 = (ext2fs_generic_bitmap_64) bitmap;
+ __u64 cstart, cend, cout;
+ errcode_t retval;
+
+ if (!bitmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap)) {
+ blk_t blk = 0;
+
+ if (((start) & ~0xffffffffULL) ||
+ ((end) & ~0xffffffffULL)) {
+ ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, start);
+ return EINVAL;
+ }
+
+ retval = ext2fs_find_first_zero_generic_bitmap(bitmap, start,
+ end, &blk);
+ if (retval == 0)
+ *out = blk;
+ return retval;
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return EINVAL;
+
+ cstart = start >> bmap64->cluster_bits;
+ cend = end >> bmap64->cluster_bits;
+
+ if (cstart < bmap64->start || cend > bmap64->end || start > end) {
+ warn_bitmap(bmap64, EXT2FS_TEST_ERROR, start);
+ return EINVAL;
+ }
+
+ if (bmap64->bitmap_ops->find_first_zero) {
+ retval = bmap64->bitmap_ops->find_first_zero(bmap64, cstart,
+ cend, &cout);
+ if (retval)
+ return retval;
+ found:
+ cout <<= bmap64->cluster_bits;
+ *out = (cout >= start) ? cout : start;
+ return 0;
+ }
+
+ for (cout = cstart; cout <= cend; cout++)
+ if (!bmap64->bitmap_ops->test_bmap(bmap64, cout))
+ goto found;
+
+ return ENOENT;
+}
+
+errcode_t ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap,
+ __u64 start, __u64 end, __u64 *out)
+{
+ ext2fs_generic_bitmap_64 bmap64 = (ext2fs_generic_bitmap_64) bitmap;
+ __u64 cstart, cend, cout;
+ errcode_t retval;
+
+ if (!bitmap)
+ return EINVAL;
+
+ if (EXT2FS_IS_32_BITMAP(bitmap)) {
+ blk_t blk = 0;
+
+ if (((start) & ~0xffffffffULL) ||
+ ((end) & ~0xffffffffULL)) {
+ ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, start);
+ return EINVAL;
+ }
+
+ retval = ext2fs_find_first_set_generic_bitmap(bitmap, start,
+ end, &blk);
+ if (retval == 0)
+ *out = blk;
+ return retval;
+ }
+
+ if (!EXT2FS_IS_64_BITMAP(bitmap))
+ return EINVAL;
+
+ cstart = start >> bmap64->cluster_bits;
+ cend = end >> bmap64->cluster_bits;
+
+ if (cstart < bmap64->start || cend > bmap64->end || start > end) {
+ warn_bitmap(bmap64, EXT2FS_TEST_ERROR, start);
+ return EINVAL;
+ }
+
+ if (bmap64->bitmap_ops->find_first_set) {
+ retval = bmap64->bitmap_ops->find_first_set(bmap64, cstart,
+ cend, &cout);
+ if (retval)
+ return retval;
+ found:
+ cout <<= bmap64->cluster_bits;
+ *out = (cout >= start) ? cout : start;
+ return 0;
+ }
+
+ for (cout = cstart; cout <= cend; cout++)
+ if (bmap64->bitmap_ops->test_bmap(bmap64, cout))
+ goto found;
+
+ return ENOENT;
+}
+
+errcode_t ext2fs_count_used_clusters(ext2_filsys fs, blk64_t start,
+ blk64_t end, blk64_t *out)
+{
+ blk64_t next;
+ blk64_t tot_set = 0;
+ errcode_t retval = 0;
+
+ while (start < end) {
+ retval = ext2fs_find_first_set_block_bitmap2(fs->block_map,
+ start, end, &next);
+ if (retval) {
+ if (retval == ENOENT)
+ retval = 0;
+ break;
+ }
+ start = next;
+
+ retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map,
+ start, end, &next);
+ if (retval == 0) {
+ tot_set += next - start;
+ start = next + 1;
+ } else if (retval == ENOENT) {
+ retval = 0;
+ tot_set += end - start + 1;
+ break;
+ } else
+ break;
+ }
+
+ if (!retval)
+ *out = EXT2FS_NUM_B2C(fs, tot_set);
+ return retval;
+}
diff --git a/lib/ext2fs/gen_crc32ctable.c b/lib/ext2fs/gen_crc32ctable.c
new file mode 100644
index 0000000..a0742ee
--- /dev/null
+++ b/lib/ext2fs/gen_crc32ctable.c
@@ -0,0 +1,117 @@
+#include <stdio.h>
+#include "crc32c_defs.h"
+#include <inttypes.h>
+
+#define ENTRIES_PER_LINE 4
+
+#if CRC_LE_BITS > 8
+# define LE_TABLE_ROWS (CRC_LE_BITS/8)
+# define LE_TABLE_SIZE 256
+#else
+# define LE_TABLE_ROWS 1
+# define LE_TABLE_SIZE (1 << CRC_LE_BITS)
+#endif
+
+#if CRC_BE_BITS > 8
+# define BE_TABLE_ROWS (CRC_BE_BITS/8)
+# define BE_TABLE_SIZE 256
+#else
+# define BE_TABLE_ROWS 1
+# define BE_TABLE_SIZE (1 << CRC_BE_BITS)
+#endif
+
+static uint32_t crc32table_be[BE_TABLE_ROWS][256];
+static uint32_t crc32ctable_le[LE_TABLE_ROWS][256];
+
+/**
+ * crc32init_le() - allocate and initialize LE table data
+ *
+ * crc is the crc of the byte i; other entries are filled in based on the
+ * fact that crctable[i^j] = crctable[i] ^ crctable[j].
+ *
+ */
+static void crc32cinit_le(void)
+{
+ unsigned i, j;
+ uint32_t crc = 1;
+
+ crc32ctable_le[0][0] = 0;
+
+ for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) {
+ crc = (crc >> 1) ^ ((crc & 1) ? CRC32C_POLY_LE : 0);
+ for (j = 0; j < LE_TABLE_SIZE; j += 2 * i)
+ crc32ctable_le[0][i + j] = crc ^ crc32ctable_le[0][j];
+ }
+ for (i = 0; i < LE_TABLE_SIZE; i++) {
+ crc = crc32ctable_le[0][i];
+ for (j = 1; j < LE_TABLE_ROWS; j++) {
+ crc = crc32ctable_le[0][crc & 0xff] ^ (crc >> 8);
+ crc32ctable_le[j][i] = crc;
+ }
+ }
+}
+
+/**
+ * crc32init_be() - allocate and initialize BE table data
+ */
+static void crc32init_be(void)
+{
+ unsigned i, j;
+ uint32_t crc = 0x80000000;
+
+ crc32table_be[0][0] = 0;
+
+ for (i = 1; i < BE_TABLE_SIZE; i <<= 1) {
+ crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0);
+ for (j = 0; j < i; j++)
+ crc32table_be[0][i + j] = crc ^ crc32table_be[0][j];
+ }
+ for (i = 0; i < BE_TABLE_SIZE; i++) {
+ crc = crc32table_be[0][i];
+ for (j = 1; j < BE_TABLE_ROWS; j++) {
+ crc = crc32table_be[0][(crc >> 24) & 0xff] ^ (crc << 8);
+ crc32table_be[j][i] = crc;
+ }
+ }
+}
+
+static void output_table(uint32_t (*table)[256], int rows, int len, char *trans)
+{
+ int i, j;
+
+ for (j = 0 ; j < rows; j++) {
+ printf("{");
+ for (i = 0; i < len - 1; i++) {
+ if (i % ENTRIES_PER_LINE == 0)
+ printf("\n");
+ printf("%s(0x%8.8xL), ", trans, table[j][i]);
+ }
+ printf("%s(0x%8.8xL)},\n", trans, table[j][len - 1]);
+ }
+}
+
+int main(int argc, char **argv)
+{
+ printf("/* this file is generated - do not edit */\n\n");
+
+ if (CRC_BE_BITS > 1) {
+ crc32init_be();
+ printf("static const uint32_t "
+ "crc32table_be[%d][%d] = {",
+ BE_TABLE_ROWS, BE_TABLE_SIZE);
+ output_table(crc32table_be, LE_TABLE_ROWS,
+ BE_TABLE_SIZE, "tobe");
+ printf("};\n");
+ }
+ if (CRC_LE_BITS > 1) {
+ crc32cinit_le();
+ printf("static const uint32_t "
+ "crc32ctable_le[%d][%d] = {",
+ LE_TABLE_ROWS, LE_TABLE_SIZE);
+ output_table(crc32ctable_le, LE_TABLE_ROWS,
+ LE_TABLE_SIZE, "tole");
+ printf("};\n");
+ }
+
+ return 0;
+}
diff --git a/lib/ext2fs/get_num_dirs.c b/lib/ext2fs/get_num_dirs.c
new file mode 100644
index 0000000..f5644f8
--- /dev/null
+++ b/lib/ext2fs/get_num_dirs.c
@@ -0,0 +1,50 @@
+/*
+ * get_num_dirs.c -- calculate number of directories
+ *
+ * Copyright 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+/*
+ * Returns the number of directories in the filesystem as reported by
+ * the group descriptors. Of course, the group descriptors could be
+ * wrong!
+ */
+errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs)
+{
+ dgrp_t i;
+ ext2_ino_t num_dirs, max_dirs;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ num_dirs = 0;
+ max_dirs = fs->super->s_inodes_per_group;
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (ext2fs_bg_used_dirs_count(fs, i) > max_dirs)
+ num_dirs += max_dirs / 8;
+ else
+ num_dirs += ext2fs_bg_used_dirs_count(fs, i);
+ }
+ if (num_dirs > fs->super->s_inodes_count)
+ num_dirs = fs->super->s_inodes_count;
+
+ *ret_num_dirs = num_dirs;
+
+ return 0;
+}
+
diff --git a/lib/ext2fs/get_pathname.c b/lib/ext2fs/get_pathname.c
new file mode 100644
index 0000000..8cfaf6e
--- /dev/null
+++ b/lib/ext2fs/get_pathname.c
@@ -0,0 +1,171 @@
+/*
+ * get_pathname.c --- do directory/inode -> name translation
+ *
+ * Copyright (C) 1993, 1994, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/*
+ *
+ * ext2fs_get_pathname(fs, dir, ino, name)
+ *
+ * This function translates takes two inode numbers into a
+ * string, placing the result in <name>. <dir> is the containing
+ * directory inode, and <ino> is the inode number itself. If
+ * <ino> is zero, then ext2fs_get_pathname will return pathname
+ * of the the directory <dir>.
+ *
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct get_pathname_struct {
+ ext2_ino_t search_ino;
+ ext2_ino_t parent;
+ char *name;
+ errcode_t errcode;
+};
+
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int get_pathname_proc(struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct get_pathname_struct *gp;
+ errcode_t retval;
+ int name_len = ext2fs_dirent_name_len(dirent);
+
+ gp = (struct get_pathname_struct *) priv_data;
+
+ if ((name_len == 2) && !strncmp(dirent->name, "..", 2))
+ gp->parent = dirent->inode;
+ if (dirent->inode == gp->search_ino) {
+ retval = ext2fs_get_mem(name_len + 1, &gp->name);
+ if (retval) {
+ gp->errcode = retval;
+ return DIRENT_ABORT;
+ }
+ strncpy(gp->name, dirent->name, name_len);
+ gp->name[name_len] = '\0';
+ return DIRENT_ABORT;
+ }
+ return 0;
+}
+
+static errcode_t ext2fs_get_pathname_int(ext2_filsys fs, ext2_ino_t dir,
+ ext2_ino_t ino, int maxdepth,
+ char *buf, char **name)
+{
+ struct get_pathname_struct gp;
+ char *parent_name = 0, *ret;
+ errcode_t retval;
+
+ if (dir == ino) {
+ retval = ext2fs_get_mem(2, name);
+ if (retval)
+ return retval;
+ strcpy(*name, (dir == EXT2_ROOT_INO) ? "/" : ".");
+ return 0;
+ }
+
+ if (!dir || (maxdepth < 0)) {
+ retval = ext2fs_get_mem(4, name);
+ if (retval)
+ return retval;
+ strcpy(*name, "...");
+ return 0;
+ }
+
+ gp.search_ino = ino;
+ gp.parent = 0;
+ gp.name = 0;
+ gp.errcode = 0;
+
+ retval = ext2fs_dir_iterate(fs, dir, 0, buf, get_pathname_proc, &gp);
+ if (retval == EXT2_ET_NO_DIRECTORY) {
+ char tmp[32];
+
+ if (ino)
+ snprintf(tmp, sizeof(tmp), "<%u>/<%u>", dir, ino);
+ else
+ snprintf(tmp, sizeof(tmp), "<%u>", dir);
+ retval = ext2fs_get_mem(strlen(tmp)+1, name);
+ if (retval)
+ goto cleanup;
+ strcpy(*name, tmp);
+ return 0;
+ } else if (retval)
+ goto cleanup;
+ if (gp.errcode) {
+ retval = gp.errcode;
+ goto cleanup;
+ }
+
+ retval = ext2fs_get_pathname_int(fs, gp.parent, dir, maxdepth-1,
+ buf, &parent_name);
+ if (retval)
+ goto cleanup;
+ if (!ino) {
+ *name = parent_name;
+ return 0;
+ }
+
+ if (gp.name)
+ retval = ext2fs_get_mem(strlen(parent_name)+strlen(gp.name)+2,
+ &ret);
+ else
+ retval = ext2fs_get_mem(strlen(parent_name)+5, &ret);
+ if (retval)
+ goto cleanup;
+
+ ret[0] = 0;
+ if (parent_name[1])
+ strcat(ret, parent_name);
+ strcat(ret, "/");
+ if (gp.name)
+ strcat(ret, gp.name);
+ else
+ strcat(ret, "???");
+ *name = ret;
+ retval = 0;
+
+cleanup:
+ ext2fs_free_mem(&parent_name);
+ ext2fs_free_mem(&gp.name);
+ return retval;
+}
+
+errcode_t ext2fs_get_pathname(ext2_filsys fs, ext2_ino_t dir, ext2_ino_t ino,
+ char **name)
+{
+ char *buf;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+ if (dir == ino)
+ ino = 0;
+ retval = ext2fs_get_pathname_int(fs, dir, ino, 32, buf, name);
+ ext2fs_free_mem(&buf);
+ return retval;
+
+}
diff --git a/lib/ext2fs/getsectsize.c b/lib/ext2fs/getsectsize.c
new file mode 100644
index 0000000..bd978c5
--- /dev/null
+++ b/lib/ext2fs/getsectsize.c
@@ -0,0 +1,151 @@
+/*
+ * getsectsize.c --- get the sector size of a device.
+ *
+ * Copyright (C) 1995, 1995 Theodore Ts'o.
+ * Copyright (C) 2003 VMware, Inc.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#ifdef HAVE_SYS_DISK_H
+#include <sys/disk.h>
+#endif
+#ifdef HAVE_LINUX_FD_H
+#include <sys/ioctl.h>
+#include <linux/fd.h>
+#endif
+
+#if defined(__linux__) && defined(_IO)
+#if !defined(BLKSSZGET)
+#define BLKSSZGET _IO(0x12,104)/* get block device sector size */
+#endif
+#if !defined(BLKPBSZGET)
+#define BLKPBSZGET _IO(0x12,123)/* get block physical sector size */
+#endif
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * Returns the logical sector size of a device
+ */
+errcode_t ext2fs_get_device_sectsize(const char *file, int *sectsize)
+{
+#ifdef _WIN32
+ *sectsize = 512; // just guessing
+ return 0;
+#else // not _WIN32
+
+ int fd;
+
+ fd = ext2fs_open_file(file, O_RDONLY, 0);
+ if (fd < 0)
+ return errno;
+
+#ifdef BLKSSZGET
+ if (ioctl(fd, BLKSSZGET, sectsize) >= 0) {
+ close(fd);
+ return 0;
+ }
+#endif
+#ifdef DIOCGSECTORSIZE
+ if (ioctl(fd, DIOCGSECTORSIZE, sectsize) >= 0) {
+ close(fd);
+ return 0;
+ }
+#endif
+ *sectsize = 0;
+ close(fd);
+ return 0;
+
+#endif // ifdef _WIN32
+}
+
+/*
+ * Return desired alignment for direct I/O
+ */
+int ext2fs_get_dio_alignment(int fd)
+{
+ int align = 0;
+
+#ifdef BLKSSZGET
+ if (ioctl(fd, BLKSSZGET, &align) < 0)
+ align = 0;
+#endif
+#ifdef DIOCGSECTORSIZE
+ if (align <= 0 &&
+ ioctl(fd, DIOCGSECTORSIZE, &align) < 0)
+ align = 0;
+#endif
+
+#ifdef _SC_PAGESIZE
+ if (align <= 0)
+ align = sysconf(_SC_PAGESIZE);
+#endif
+#ifdef HAVE_GETPAGESIZE
+ if (align <= 0)
+ align = getpagesize();
+#endif
+ if (align <= 0)
+ align = 4096;
+
+ return align;
+}
+
+/*
+ * Returns the physical sector size of a device
+ */
+errcode_t ext2fs_get_device_phys_sectsize(const char *file, int *sectsize)
+{
+#ifdef _WIN32
+
+ return ext2fs_get_device_sectsize(file, sectsize);
+
+#else // not _WIN32
+
+ int fd;
+
+ fd = ext2fs_open_file(file, O_RDONLY, 0);
+ if (fd < 0)
+ return errno;
+
+#ifdef BLKPBSZGET
+ if (ioctl(fd, BLKPBSZGET, sectsize) >= 0) {
+ close(fd);
+ return 0;
+ }
+#endif
+#ifdef DIOCGSECTORSIZE
+ /* This isn't really the physical sector size, but FreeBSD
+ * doesn't seem to have this concept. */
+ if (ioctl(fd, DIOCGSECTORSIZE, sectsize) >= 0) {
+ close(fd);
+ return 0;
+ }
+#endif
+ *sectsize = 0;
+ close(fd);
+ return 0;
+
+#endif // ifdef _WIN32
+}
diff --git a/lib/ext2fs/getsize.c b/lib/ext2fs/getsize.c
new file mode 100644
index 0000000..bcf3020
--- /dev/null
+++ b/lib/ext2fs/getsize.c
@@ -0,0 +1,324 @@
+/*
+ * getsize.c --- get the size of a partition.
+ *
+ * Copyright (C) 1995, 1995 Theodore Ts'o.
+ * Copyright (C) 2003 VMware, Inc.
+ *
+ * Windows version of ext2fs_get_device_size by Chris Li, VMware.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_LINUX_FD_H
+#include <linux/fd.h>
+#endif
+#ifdef HAVE_SYS_DISKLABEL_H
+#include <sys/disklabel.h>
+#endif
+#ifdef HAVE_SYS_DISK_H
+#include <sys/disk.h>
+#endif
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <ctype.h>
+
+#if defined(__linux__) && defined(_IO) && !defined(BLKGETSIZE)
+#define BLKGETSIZE _IO(0x12,96) /* return device size */
+#endif
+
+#if defined(__linux__) && defined(_IOR) && !defined(BLKGETSIZE64)
+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */
+#endif
+
+#ifdef APPLE_DARWIN
+#define BLKGETSIZE DKIOCGETBLOCKCOUNT32
+#endif /* APPLE_DARWIN */
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#if defined(__CYGWIN__) || defined (WIN32)
+#include "windows.h"
+#include "winioctl.h"
+
+#if (_WIN32_WINNT >= 0x0500)
+#define HAVE_GET_FILE_SIZE_EX 1
+#endif
+
+HANDLE windows_get_handle(io_channel channel);
+
+errcode_t ext2fs_get_device_size2(const char *file, int blocksize,
+ blk64_t *retblocks)
+{
+ HANDLE dev;
+ PARTITION_INFORMATION pi;
+ DISK_GEOMETRY gi;
+ DWORD retbytes;
+#ifdef HAVE_GET_FILE_SIZE_EX
+ LARGE_INTEGER filesize;
+#else
+ DWORD filesize;
+#endif /* HAVE_GET_FILE_SIZE_EX */
+
+ io_channel data_io = 0;
+ int retval;
+
+ retval = windows_io_manager->open(file, 0, &data_io);
+ if (retval)
+ return retval;
+
+ dev = windows_get_handle(data_io);
+ if (dev == INVALID_HANDLE_VALUE)
+ return EBADF;
+
+ if (DeviceIoControl(dev, IOCTL_DISK_GET_PARTITION_INFO,
+ &pi, sizeof(PARTITION_INFORMATION),
+ &pi, sizeof(PARTITION_INFORMATION),
+ &retbytes, NULL)) {
+
+ *retblocks = pi.PartitionLength.QuadPart / blocksize;
+
+ } else if (DeviceIoControl(dev, IOCTL_DISK_GET_DRIVE_GEOMETRY,
+ &gi, sizeof(DISK_GEOMETRY),
+ &gi, sizeof(DISK_GEOMETRY),
+ &retbytes, NULL)) {
+
+ *retblocks = gi.BytesPerSector *
+ gi.SectorsPerTrack *
+ gi.TracksPerCylinder *
+ gi.Cylinders.QuadPart / blocksize;
+
+#ifdef HAVE_GET_FILE_SIZE_EX
+ } else if (GetFileSizeEx(dev, &filesize)) {
+ *retblocks = filesize.QuadPart / blocksize;
+ }
+#else
+ } else {
+ filesize = GetFileSize(dev, NULL);
+ if (INVALID_FILE_SIZE != filesize) {
+ *retblocks = filesize / blocksize;
+ }
+ }
+#endif /* HAVE_GET_FILE_SIZE_EX */
+
+ windows_io_manager->close(data_io);
+
+ return 0;
+}
+
+#else
+
+static int valid_offset (int fd, ext2_loff_t offset)
+{
+ char ch;
+
+ if (ext2fs_llseek (fd, offset, 0) < 0)
+ return 0;
+ if (read (fd, &ch, 1) < 1)
+ return 0;
+ return 1;
+}
+
+/*
+ * Returns the number of blocks in a partition
+ */
+errcode_t ext2fs_get_device_size2(const char *file, int blocksize,
+ blk64_t *retblocks)
+{
+ int fd, rc = 0;
+ unsigned long long size64;
+ ext2_loff_t high, low;
+
+ fd = ext2fs_open_file(file, O_RDONLY, 0);
+ if (fd < 0)
+ return errno;
+
+#if defined DKIOCGETBLOCKCOUNT && defined DKIOCGETBLOCKSIZE /* For Apple Darwin */
+ unsigned int size;
+
+ if (ioctl(fd, DKIOCGETBLOCKCOUNT, &size64) >= 0 &&
+ ioctl(fd, DKIOCGETBLOCKSIZE, &size) >= 0) {
+ *retblocks = size64 * size / blocksize;
+ goto out;
+ }
+#endif
+
+#ifdef BLKGETSIZE64
+ {
+ int valid_blkgetsize64 = 1;
+#ifdef __linux__
+ struct utsname ut;
+
+ if ((uname(&ut) == 0) &&
+ ((ut.release[0] == '2') && (ut.release[1] == '.') &&
+ (ut.release[2] < '6') && (ut.release[3] == '.')))
+ valid_blkgetsize64 = 0;
+#endif
+ if (valid_blkgetsize64 &&
+ ioctl(fd, BLKGETSIZE64, &size64) >= 0) {
+ *retblocks = size64 / blocksize;
+ goto out;
+ }
+ }
+#endif /* BLKGETSIZE64 */
+
+#ifdef BLKGETSIZE
+ {
+ unsigned long size;
+
+ if (ioctl(fd, BLKGETSIZE, &size) >= 0) {
+ *retblocks = size / (blocksize / 512);
+ goto out;
+ }
+ }
+#endif
+
+#ifdef FDGETPRM
+ {
+ struct floppy_struct this_floppy;
+
+ if (ioctl(fd, FDGETPRM, &this_floppy) >= 0) {
+ *retblocks = this_floppy.size / (blocksize / 512);
+ goto out;
+ }
+ }
+#endif
+
+#ifdef HAVE_SYS_DISKLABEL_H
+ {
+ int part;
+ struct disklabel lab;
+ struct partition *pp;
+ char ch;
+
+#if defined(DIOCGMEDIASIZE)
+ {
+ off_t ms;
+ u_int bs;
+ if (ioctl(fd, DIOCGMEDIASIZE, &ms) >= 0) {
+ *retblocks = ms / blocksize;
+ goto out;
+ }
+ }
+#elif defined(DIOCGDINFO)
+ /* old disklabel interface */
+ part = strlen(file) - 1;
+ if (part >= 0) {
+ ch = file[part];
+ if (isdigit(ch))
+ part = 0;
+ else if (ch >= 'a' && ch <= 'h')
+ part = ch - 'a';
+ else
+ part = -1;
+ }
+ if (part >= 0 && (ioctl(fd, DIOCGDINFO, (char *)&lab) >= 0)) {
+ pp = &lab.d_partitions[part];
+ if (pp->p_size) {
+ *retblocks = pp->p_size / (blocksize / 512);
+ goto out;
+ }
+ }
+#endif /* defined(DIOCG*) */
+ }
+#endif /* HAVE_SYS_DISKLABEL_H */
+
+ {
+ ext2fs_struct_stat st;
+
+ if (ext2fs_fstat(fd, &st) == 0)
+ if (S_ISREG(st.st_mode)) {
+ *retblocks = st.st_size / blocksize;
+ goto out;
+ }
+ }
+
+ /*
+ * OK, we couldn't figure it out by using a specialized ioctl,
+ * which is generally the best way. So do binary search to
+ * find the size of the partition.
+ */
+ low = 0;
+ for (high = 1024; valid_offset(fd, high); high *= 2)
+ low = high;
+ while (low < high - 1) {
+ const ext2_loff_t mid = (low + high) / 2;
+
+ if (valid_offset (fd, mid))
+ low = mid;
+ else
+ high = mid;
+ }
+ valid_offset(fd, 0);
+ size64 = low + 1;
+ *retblocks = size64 / blocksize;
+out:
+ close(fd);
+ return rc;
+}
+
+#endif /* WIN32 */
+
+errcode_t ext2fs_get_device_size(const char *file, int blocksize,
+ blk_t *retblocks)
+{
+ errcode_t retval;
+ blk64_t blocks;
+
+ retval = ext2fs_get_device_size2(file, blocksize, &blocks);
+ if (retval)
+ return retval;
+ if (blocks >= (1ULL << 32))
+ return EFBIG;
+ *retblocks = (blk_t) blocks;
+ return 0;
+}
+
+#ifdef DEBUG
+int main(int argc, char **argv)
+{
+ blk64_t blocks;
+ int retval;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: %s device\n", argv[0]);
+ exit(1);
+ }
+
+ retval = ext2fs_get_device_size2(argv[1], 1024, &blocks);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while calling ext2fs_get_device_size");
+ exit(1);
+ }
+ printf("Device %s has %llu 1k blocks.\n", argv[1],
+ (unsigned long long) locks);
+ exit(0);
+}
+#endif
diff --git a/lib/ext2fs/hashmap.c b/lib/ext2fs/hashmap.c
new file mode 100644
index 0000000..697b2bc
--- /dev/null
+++ b/lib/ext2fs/hashmap.c
@@ -0,0 +1,109 @@
+#include "hashmap.h"
+#include <string.h>
+
+struct ext2fs_hashmap {
+ uint32_t size;
+ uint32_t(*hash)(const void *key, size_t len);
+ void(*free)(void*);
+ struct ext2fs_hashmap_entry *first;
+ struct ext2fs_hashmap_entry *last;
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+ struct ext2fs_hashmap_entry *entries[0];
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic pop
+#endif
+};
+
+uint32_t ext2fs_djb2_hash(const void *str, size_t size)
+{
+ int c;
+ const char *s = str;
+ uint32_t hash = 5381;
+
+ while (size-- > 0) {
+ c = *s++;
+ hash = ((hash << 5) + hash) + c;
+ }
+ return hash;
+}
+
+struct ext2fs_hashmap *ext2fs_hashmap_create(
+ uint32_t(*hash_fct)(const void*, size_t),
+ void(*free_fct)(void*), size_t size)
+{
+ struct ext2fs_hashmap *h = calloc(sizeof(struct ext2fs_hashmap) +
+ sizeof(struct ext2fs_hashmap_entry) * size, 1);
+ if (!h)
+ return NULL;
+
+ h->size = size;
+ h->free = free_fct;
+ h->hash = hash_fct;
+ h->first = h->last = NULL;
+ return h;
+}
+
+int ext2fs_hashmap_add(struct ext2fs_hashmap *h,
+ void *data, const void *key, size_t key_len)
+{
+ uint32_t hash = h->hash(key, key_len) % h->size;
+ struct ext2fs_hashmap_entry *e = malloc(sizeof(*e));
+
+ if (!e)
+ return -1;
+
+ e->data = data;
+ e->key = key;
+ e->key_len = key_len;
+ e->next = h->entries[hash];
+ h->entries[hash] = e;
+
+ e->list_prev = NULL;
+ e->list_next = h->first;
+ if (h->first)
+ h->first->list_prev = e;
+ h->first = e;
+ if (!h->last)
+ h->last = e;
+
+ return 0;
+}
+
+void *ext2fs_hashmap_lookup(struct ext2fs_hashmap *h, const void *key,
+ size_t key_len)
+{
+ struct ext2fs_hashmap_entry *iter;
+ uint32_t hash = h->hash(key, key_len) % h->size;
+
+ for (iter = h->entries[hash]; iter; iter = iter->next)
+ if (iter->key_len == key_len && !memcmp(iter->key, key, key_len))
+ return iter->data;
+ return NULL;
+}
+
+void *ext2fs_hashmap_iter_in_order(struct ext2fs_hashmap *h,
+ struct ext2fs_hashmap_entry **it)
+{
+ *it = *it ? (*it)->list_next : h->first;
+ return *it ? (*it)->data : NULL;
+}
+
+void ext2fs_hashmap_free(struct ext2fs_hashmap *h)
+{
+ size_t i;
+
+ for (i = 0; i < h->size; ++i) {
+ struct ext2fs_hashmap_entry *it = h->entries[i];
+ while (it) {
+ struct ext2fs_hashmap_entry *tmp = it->next;
+ if (h->free)
+ h->free(it->data);
+ free(it);
+ it = tmp;
+ }
+ }
+ free(h);
+}
diff --git a/lib/ext2fs/hashmap.h b/lib/ext2fs/hashmap.h
new file mode 100644
index 0000000..0c09d2b
--- /dev/null
+++ b/lib/ext2fs/hashmap.h
@@ -0,0 +1,42 @@
+#ifndef HASHMAP_H
+# define HASHMAP_H
+
+# include <stdlib.h>
+# include <stdint.h>
+
+#ifndef __GNUC_PREREQ
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+#define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+#else
+#define __GNUC_PREREQ(maj, min) 0
+#endif
+#endif
+
+struct ext2fs_hashmap;
+
+struct ext2fs_hashmap_entry {
+ void *data;
+ const void *key;
+ size_t key_len;
+ struct ext2fs_hashmap_entry *next;
+ struct ext2fs_hashmap_entry *list_next;
+ struct ext2fs_hashmap_entry *list_prev;
+};
+
+struct ext2fs_hashmap *ext2fs_hashmap_create(
+ uint32_t(*hash_fct)(const void*, size_t),
+ void(*free_fct)(void*), size_t size);
+int ext2fs_hashmap_add(struct ext2fs_hashmap *h,
+ void *data, const void *key,size_t key_len);
+void *ext2fs_hashmap_lookup(struct ext2fs_hashmap *h, const void *key,
+ size_t key_len);
+void *ext2fs_hashmap_iter_in_order(struct ext2fs_hashmap *h,
+ struct ext2fs_hashmap_entry **it);
+void ext2fs_hashmap_del(struct ext2fs_hashmap *h,
+ struct ext2fs_hashmap_entry *e);
+void ext2fs_hashmap_free(struct ext2fs_hashmap *h);
+
+uint32_t ext2fs_djb2_hash(const void *str, size_t size);
+
+#endif /* !HASHMAP_H */
diff --git a/lib/ext2fs/i_block.c b/lib/ext2fs/i_block.c
new file mode 100644
index 0000000..2eecf02
--- /dev/null
+++ b/lib/ext2fs/i_block.c
@@ -0,0 +1,90 @@
+/*
+ * i_block.c --- Manage the i_block field for i_blocks
+ *
+ * Copyright (C) 2008 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <time.h>
+#include <string.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <errno.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+errcode_t ext2fs_iblk_add_blocks(ext2_filsys fs, struct ext2_inode *inode,
+ blk64_t num_blocks)
+{
+ unsigned long long b = inode->i_blocks;
+
+ if (ext2fs_has_feature_huge_file(fs->super))
+ b += ((long long) inode->osd2.linux2.l_i_blocks_hi) << 32;
+
+ if (!ext2fs_has_feature_huge_file(fs->super) ||
+ !(inode->i_flags & EXT4_HUGE_FILE_FL))
+ num_blocks *= fs->blocksize / 512;
+ num_blocks *= EXT2FS_CLUSTER_RATIO(fs);
+
+ b += num_blocks;
+
+ if (ext2fs_has_feature_huge_file(fs->super))
+ inode->osd2.linux2.l_i_blocks_hi = b >> 32;
+ else if (b > 0xFFFFFFFF)
+ return EOVERFLOW;
+ inode->i_blocks = b & 0xFFFFFFFF;
+ return 0;
+}
+
+errcode_t ext2fs_iblk_sub_blocks(ext2_filsys fs, struct ext2_inode *inode,
+ blk64_t num_blocks)
+{
+ unsigned long long b = inode->i_blocks;
+
+ if (ext2fs_has_feature_huge_file(fs->super))
+ b += ((long long) inode->osd2.linux2.l_i_blocks_hi) << 32;
+
+ if (!ext2fs_has_feature_huge_file(fs->super) ||
+ !(inode->i_flags & EXT4_HUGE_FILE_FL))
+ num_blocks *= fs->blocksize / 512;
+ num_blocks *= EXT2FS_CLUSTER_RATIO(fs);
+
+ if (num_blocks > b)
+ return EOVERFLOW;
+
+ b -= num_blocks;
+
+ if (ext2fs_has_feature_huge_file(fs->super))
+ inode->osd2.linux2.l_i_blocks_hi = b >> 32;
+ inode->i_blocks = b & 0xFFFFFFFF;
+ return 0;
+}
+
+errcode_t ext2fs_iblk_set(ext2_filsys fs, struct ext2_inode *inode, blk64_t b)
+{
+ if (!ext2fs_has_feature_huge_file(fs->super) ||
+ !(inode->i_flags & EXT4_HUGE_FILE_FL))
+ b *= fs->blocksize / 512;
+ b *= EXT2FS_CLUSTER_RATIO(fs);
+
+ inode->i_blocks = b & 0xFFFFFFFF;
+ if (ext2fs_has_feature_huge_file(fs->super))
+ inode->osd2.linux2.l_i_blocks_hi = b >> 32;
+ else if (b >> 32)
+ return EOVERFLOW;
+ return 0;
+}
diff --git a/lib/ext2fs/icount.c b/lib/ext2fs/icount.c
new file mode 100644
index 0000000..888a90b
--- /dev/null
+++ b/lib/ext2fs/icount.c
@@ -0,0 +1,921 @@
+/*
+ * icount.c --- an efficient inode count abstraction
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "tdb.h"
+
+/*
+ * The data storage strategy used by icount relies on the observation
+ * that most inode counts are either zero (for non-allocated inodes),
+ * one (for most files), and only a few that are two or more
+ * (directories and files that are linked to more than one directory).
+ *
+ * Also, e2fsck tends to load the icount data sequentially.
+ *
+ * So, we use an inode bitmap to indicate which inodes have a count of
+ * one, and then use a sorted list to store the counts for inodes
+ * which are greater than one.
+ *
+ * We also use an optional bitmap to indicate which inodes are already
+ * in the sorted list, to speed up the use of this abstraction by
+ * e2fsck's pass 2. Pass 2 increments inode counts as it finds them,
+ * so this extra bitmap avoids searching the sorted list to see if a
+ * particular inode is on the sorted list already.
+ */
+
+struct ext2_icount_el {
+ ext2_ino_t ino;
+ __u32 count;
+};
+
+struct ext2_icount {
+ errcode_t magic;
+ ext2fs_inode_bitmap single;
+ ext2fs_inode_bitmap multiple;
+ ext2_ino_t count;
+ ext2_ino_t size;
+ ext2_ino_t num_inodes;
+ ext2_ino_t cursor;
+ struct ext2_icount_el *list;
+ struct ext2_icount_el *last_lookup;
+#ifdef CONFIG_TDB
+ char *tdb_fn;
+ TDB_CONTEXT *tdb;
+#endif
+ __u16 *fullmap;
+};
+
+/*
+ * We now use a 32-bit counter field because it doesn't cost us
+ * anything extra for the in-memory data structure, due to alignment
+ * padding. But there's no point changing the interface if most of
+ * the time we only care if the number is bigger than 65,000 or not.
+ * So use the following translation function to return a 16-bit count.
+ */
+#define icount_16_xlate(x) (((x) > 65500) ? 65500 : (x))
+
+void ext2fs_free_icount(ext2_icount_t icount)
+{
+ if (!icount)
+ return;
+
+ icount->magic = 0;
+ if (icount->list)
+ ext2fs_free_mem(&icount->list);
+ if (icount->single)
+ ext2fs_free_inode_bitmap(icount->single);
+ if (icount->multiple)
+ ext2fs_free_inode_bitmap(icount->multiple);
+#ifdef CONFIG_TDB
+ if (icount->tdb)
+ tdb_close(icount->tdb);
+ if (icount->tdb_fn) {
+ (void) unlink(icount->tdb_fn);
+ free(icount->tdb_fn);
+ }
+#endif
+
+ if (icount->fullmap)
+ ext2fs_free_mem(&icount->fullmap);
+
+ ext2fs_free_mem(&icount);
+}
+
+static errcode_t alloc_icount(ext2_filsys fs, int flags, ext2_icount_t *ret)
+{
+ ext2_icount_t icount;
+ errcode_t retval;
+
+ *ret = 0;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_icount), &icount);
+ if (retval)
+ return retval;
+ memset(icount, 0, sizeof(struct ext2_icount));
+ icount->magic = EXT2_ET_MAGIC_ICOUNT;
+ icount->num_inodes = fs->super->s_inodes_count;
+
+ if ((flags & EXT2_ICOUNT_OPT_FULLMAP) &&
+ (flags & EXT2_ICOUNT_OPT_INCREMENT)) {
+ unsigned sz = sizeof(*icount->fullmap) * icount->num_inodes;
+
+ retval = ext2fs_get_mem(sz, &icount->fullmap);
+ /* If we can't allocate, fall back */
+ if (!retval) {
+ memset(icount->fullmap, 0, sz);
+ *ret = icount;
+ return 0;
+ }
+ }
+
+ retval = ext2fs_allocate_inode_bitmap(fs, "icount", &icount->single);
+ if (retval)
+ goto errout;
+
+ if (flags & EXT2_ICOUNT_OPT_INCREMENT) {
+ retval = ext2fs_allocate_inode_bitmap(fs, "icount_inc",
+ &icount->multiple);
+ if (retval)
+ goto errout;
+ } else
+ icount->multiple = 0;
+
+ *ret = icount;
+ return 0;
+
+errout:
+ ext2fs_free_icount(icount);
+ return(retval);
+}
+
+#ifdef CONFIG_TDB
+struct uuid {
+ __u32 time_low;
+ __u16 time_mid;
+ __u16 time_hi_and_version;
+ __u16 clock_seq;
+ __u8 node[6];
+};
+
+static void unpack_uuid(void *in, struct uuid *uu)
+{
+ __u8 *ptr = in;
+ __u32 tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_low = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_mid = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_hi_and_version = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->clock_seq = tmp;
+
+ memcpy(uu->node, ptr, 6);
+}
+
+static void uuid_unparse(void *uu, char *out)
+{
+ struct uuid uuid;
+
+ unpack_uuid(uu, &uuid);
+ sprintf(out,
+ "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
+ uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
+ uuid.node[0], uuid.node[1], uuid.node[2],
+ uuid.node[3], uuid.node[4], uuid.node[5]);
+}
+#endif
+
+errcode_t ext2fs_create_icount_tdb(ext2_filsys fs EXT2FS_NO_TDB_UNUSED,
+ char *tdb_dir EXT2FS_NO_TDB_UNUSED,
+ int flags EXT2FS_NO_TDB_UNUSED,
+ ext2_icount_t *ret EXT2FS_NO_TDB_UNUSED)
+{
+#ifdef CONFIG_TDB
+ ext2_icount_t icount;
+ errcode_t retval;
+ char *fn, uuid[40];
+ ext2_ino_t num_inodes;
+ mode_t save_umask;
+ int fd;
+
+ retval = alloc_icount(fs, flags, &icount);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_mem(strlen(tdb_dir) + 64, &fn);
+ if (retval)
+ goto errout;
+ uuid_unparse(fs->super->s_uuid, uuid);
+ sprintf(fn, "%s/%s-icount-XXXXXX", tdb_dir, uuid);
+ save_umask = umask(077);
+ fd = mkstemp(fn);
+ if (fd < 0) {
+ retval = errno;
+ ext2fs_free_mem(&fn);
+ goto errout;
+ }
+ icount->tdb_fn = fn;
+ umask(save_umask);
+ /*
+ * This is an overestimate of the size that we will need; the
+ * ideal value is the number of used inodes with a count
+ * greater than 1. OTOH the times when we really need this is
+ * with the backup programs that use lots of hard links, in
+ * which case the number of inodes in use approaches the ideal
+ * value.
+ */
+ num_inodes = fs->super->s_inodes_count - fs->super->s_free_inodes_count;
+
+ icount->tdb = tdb_open(fn, num_inodes, TDB_NOLOCK | TDB_NOSYNC,
+ O_RDWR | O_CREAT | O_TRUNC, 0600);
+ close(fd);
+ if (icount->tdb == NULL) {
+ retval = errno;
+ goto errout;
+ }
+ *ret = icount;
+ return 0;
+errout:
+ ext2fs_free_icount(icount);
+ return(retval);
+#else
+ return EXT2_ET_UNIMPLEMENTED;
+#endif
+}
+
+errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags, unsigned int size,
+ ext2_icount_t hint, ext2_icount_t *ret)
+{
+ ext2_icount_t icount;
+ errcode_t retval;
+ size_t bytes;
+ ext2_ino_t i;
+
+ if (hint) {
+ EXT2_CHECK_MAGIC(hint, EXT2_ET_MAGIC_ICOUNT);
+ if (hint->size > size)
+ size = (size_t) hint->size;
+ }
+
+ retval = alloc_icount(fs, flags, &icount);
+ if (retval)
+ return retval;
+
+ if (icount->fullmap)
+ goto successout;
+
+ if (size) {
+ icount->size = size;
+ } else {
+ /*
+ * Figure out how many special case inode counts we will
+ * have. We know we will need one for each directory;
+ * we also need to reserve some extra room for file links
+ */
+ retval = ext2fs_get_num_dirs(fs, &icount->size);
+ if (retval)
+ goto errout;
+ icount->size += fs->super->s_inodes_count / 50;
+ }
+
+ bytes = (size_t) (icount->size * sizeof(struct ext2_icount_el));
+#if 0
+ printf("Icount allocated %u entries, %d bytes.\n",
+ icount->size, bytes);
+#endif
+ retval = ext2fs_get_array(icount->size, sizeof(struct ext2_icount_el),
+ &icount->list);
+ if (retval)
+ goto errout;
+ memset(icount->list, 0, bytes);
+
+ icount->count = 0;
+ icount->cursor = 0;
+
+ /*
+ * Populate the sorted list with those entries which were
+ * found in the hint icount (since those are ones which will
+ * likely need to be in the sorted list this time around).
+ */
+ if (hint) {
+ for (i=0; i < hint->count; i++)
+ icount->list[i].ino = hint->list[i].ino;
+ icount->count = hint->count;
+ }
+
+successout:
+ *ret = icount;
+ return 0;
+
+errout:
+ ext2fs_free_icount(icount);
+ return(retval);
+}
+
+errcode_t ext2fs_create_icount(ext2_filsys fs, int flags,
+ unsigned int size,
+ ext2_icount_t *ret)
+{
+ return ext2fs_create_icount2(fs, flags, size, 0, ret);
+}
+
+/*
+ * insert_icount_el() --- Insert a new entry into the sorted list at a
+ * specified position.
+ */
+static struct ext2_icount_el *insert_icount_el(ext2_icount_t icount,
+ ext2_ino_t ino, int pos)
+{
+ struct ext2_icount_el *el;
+ errcode_t retval;
+ ext2_ino_t new_size = 0;
+ int num;
+
+ if (icount->last_lookup && icount->last_lookup->ino == ino)
+ return icount->last_lookup;
+
+ if (icount->count >= icount->size) {
+ if (icount->count) {
+ new_size = icount->list[(unsigned)icount->count-1].ino;
+ new_size = (ext2_ino_t) (icount->count *
+ ((float) icount->num_inodes / new_size));
+ }
+ if (new_size < (icount->size + 100))
+ new_size = icount->size + 100;
+#if 0
+ printf("Reallocating icount %u entries...\n", new_size);
+#endif
+ retval = ext2fs_resize_mem((size_t) icount->size *
+ sizeof(struct ext2_icount_el),
+ (size_t) new_size *
+ sizeof(struct ext2_icount_el),
+ &icount->list);
+ if (retval)
+ return 0;
+ icount->size = new_size;
+ }
+ num = (int) icount->count - pos;
+ if (num < 0)
+ return 0; /* should never happen */
+ if (num) {
+ memmove(&icount->list[pos+1], &icount->list[pos],
+ sizeof(struct ext2_icount_el) * num);
+ }
+ icount->count++;
+ el = &icount->list[pos];
+ el->count = 0;
+ el->ino = ino;
+ icount->last_lookup = el;
+ return el;
+}
+
+/*
+ * get_icount_el() --- given an inode number, try to find icount
+ * information in the sorted list. If the create flag is set,
+ * and we can't find an entry, create one in the sorted list.
+ */
+static struct ext2_icount_el *get_icount_el(ext2_icount_t icount,
+ ext2_ino_t ino, int create)
+{
+ int low, high, mid;
+
+ if (!icount || !icount->list)
+ return 0;
+
+ if (create && ((icount->count == 0) ||
+ (ino > icount->list[(unsigned)icount->count-1].ino))) {
+ return insert_icount_el(icount, ino, (unsigned) icount->count);
+ }
+ if (icount->count == 0)
+ return 0;
+
+ if (icount->cursor >= icount->count)
+ icount->cursor = 0;
+ if (ino == icount->list[icount->cursor].ino)
+ return &icount->list[icount->cursor++];
+#if 0
+ printf("Non-cursor get_icount_el: %u\n", ino);
+#endif
+ low = 0;
+ high = (int) icount->count-1;
+ while (low <= high) {
+ mid = ((unsigned)low + (unsigned)high) >> 1;
+ if (ino == icount->list[mid].ino) {
+ icount->cursor = mid+1;
+ return &icount->list[mid];
+ }
+ if (ino < icount->list[mid].ino)
+ high = mid-1;
+ else
+ low = mid+1;
+ }
+ /*
+ * If we need to create a new entry, it should be right at
+ * low (where high will be left at low-1).
+ */
+ if (create)
+ return insert_icount_el(icount, ino, low);
+ return 0;
+}
+
+static errcode_t set_inode_count(ext2_icount_t icount, ext2_ino_t ino,
+ __u32 count)
+{
+ struct ext2_icount_el *el;
+#ifdef CONFIG_TDB
+ TDB_DATA key, data;
+
+ if (icount->tdb) {
+ key.dptr = (unsigned char *) &ino;
+ key.dsize = sizeof(ext2_ino_t);
+ data.dptr = (unsigned char *) &count;
+ data.dsize = sizeof(__u32);
+ if (count) {
+ if (tdb_store(icount->tdb, key, data, TDB_REPLACE))
+ return tdb_error(icount->tdb) +
+ EXT2_ET_TDB_SUCCESS;
+ } else {
+ if (tdb_delete(icount->tdb, key))
+ return tdb_error(icount->tdb) +
+ EXT2_ET_TDB_SUCCESS;
+ }
+ return 0;
+ }
+#endif
+ if (icount->fullmap) {
+ icount->fullmap[ino] = icount_16_xlate(count);
+ return 0;
+ }
+
+ el = get_icount_el(icount, ino, 1);
+ if (!el)
+ return EXT2_ET_NO_MEMORY;
+
+ el->count = count;
+ return 0;
+}
+
+static errcode_t get_inode_count(ext2_icount_t icount, ext2_ino_t ino,
+ __u32 *count)
+{
+ struct ext2_icount_el *el;
+#ifdef CONFIG_TDB
+ TDB_DATA key, data;
+
+ if (icount->tdb) {
+ key.dptr = (unsigned char *) &ino;
+ key.dsize = sizeof(ext2_ino_t);
+
+ data = tdb_fetch(icount->tdb, key);
+ if (data.dptr == NULL) {
+ *count = 0;
+ return tdb_error(icount->tdb) + EXT2_ET_TDB_SUCCESS;
+ }
+
+ *count = *((__u32 *) data.dptr);
+ free(data.dptr);
+ return 0;
+ }
+#endif
+ if (icount->fullmap) {
+ *count = icount->fullmap[ino];
+ return 0;
+ }
+
+ el = get_icount_el(icount, ino, 0);
+ if (!el) {
+ *count = 0;
+ return ENOENT;
+ }
+
+ *count = el->count;
+ return 0;
+}
+
+errcode_t ext2fs_icount_validate(ext2_icount_t icount, FILE *out)
+{
+ errcode_t ret = 0;
+ unsigned int i;
+ const char *bad = "bad icount";
+
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (icount->count > icount->size) {
+ fprintf(out, "%s: count > size\n", bad);
+ return EXT2_ET_INVALID_ARGUMENT;
+ }
+ for (i=1; i < icount->count; i++) {
+ if (icount->list[i-1].ino >= icount->list[i].ino) {
+ fprintf(out, "%s: list[%d].ino=%u, list[%d].ino=%u\n",
+ bad, i-1, icount->list[i-1].ino,
+ i, icount->list[i].ino);
+ ret = EXT2_ET_INVALID_ARGUMENT;
+ }
+ }
+ return ret;
+}
+
+errcode_t ext2fs_icount_fetch(ext2_icount_t icount, ext2_ino_t ino, __u16 *ret)
+{
+ __u32 val;
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (!ino || (ino > icount->num_inodes))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (!icount->fullmap) {
+ if (ext2fs_test_inode_bitmap2(icount->single, ino)) {
+ *ret = 1;
+ return 0;
+ }
+ if (icount->multiple &&
+ !ext2fs_test_inode_bitmap2(icount->multiple, ino)) {
+ *ret = 0;
+ return 0;
+ }
+ }
+ get_inode_count(icount, ino, &val);
+ *ret = icount_16_xlate(val);
+ return 0;
+}
+
+errcode_t ext2fs_icount_increment(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 *ret)
+{
+ __u32 curr_value;
+
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (!ino || (ino > icount->num_inodes))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (icount->fullmap) {
+ curr_value = icount_16_xlate(icount->fullmap[ino] + 1);
+ icount->fullmap[ino] = curr_value;
+ } else if (ext2fs_test_inode_bitmap2(icount->single, ino)) {
+ /*
+ * If the existing count is 1, then we know there is
+ * no entry in the list.
+ */
+ if (set_inode_count(icount, ino, 2))
+ return EXT2_ET_NO_MEMORY;
+ curr_value = 2;
+ ext2fs_unmark_inode_bitmap2(icount->single, ino);
+ } else if (icount->multiple) {
+ /*
+ * The count is either zero or greater than 1; if the
+ * inode is set in icount->multiple, then there should
+ * be an entry in the list, so we need to fix it.
+ */
+ if (ext2fs_test_inode_bitmap2(icount->multiple, ino)) {
+ get_inode_count(icount, ino, &curr_value);
+ curr_value++;
+ if (set_inode_count(icount, ino, curr_value))
+ return EXT2_ET_NO_MEMORY;
+ } else {
+ /*
+ * The count was zero; mark the single bitmap
+ * and return.
+ */
+ ext2fs_mark_inode_bitmap2(icount->single, ino);
+ if (ret)
+ *ret = 1;
+ return 0;
+ }
+ } else {
+ /*
+ * The count is either zero or greater than 1; try to
+ * find an entry in the list to determine which.
+ */
+ get_inode_count(icount, ino, &curr_value);
+ curr_value++;
+ if (set_inode_count(icount, ino, curr_value))
+ return EXT2_ET_NO_MEMORY;
+ }
+ if (icount->multiple)
+ ext2fs_mark_inode_bitmap2(icount->multiple, ino);
+ if (ret)
+ *ret = icount_16_xlate(curr_value);
+ return 0;
+}
+
+errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 *ret)
+{
+ __u32 curr_value;
+
+ if (!ino || (ino > icount->num_inodes))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (icount->fullmap) {
+ if (!icount->fullmap[ino])
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ curr_value = --icount->fullmap[ino];
+ if (ret)
+ *ret = icount_16_xlate(curr_value);
+ return 0;
+ }
+
+ if (ext2fs_test_inode_bitmap2(icount->single, ino)) {
+ ext2fs_unmark_inode_bitmap2(icount->single, ino);
+ if (icount->multiple)
+ ext2fs_unmark_inode_bitmap2(icount->multiple, ino);
+ else {
+ set_inode_count(icount, ino, 0);
+ }
+ if (ret)
+ *ret = 0;
+ return 0;
+ }
+
+ if (icount->multiple &&
+ !ext2fs_test_inode_bitmap2(icount->multiple, ino))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ get_inode_count(icount, ino, &curr_value);
+ if (!curr_value)
+ return EXT2_ET_INVALID_ARGUMENT;
+ curr_value--;
+ if (set_inode_count(icount, ino, curr_value))
+ return EXT2_ET_NO_MEMORY;
+
+ if (curr_value == 1)
+ ext2fs_mark_inode_bitmap2(icount->single, ino);
+ if ((curr_value == 0) && icount->multiple)
+ ext2fs_unmark_inode_bitmap2(icount->multiple, ino);
+
+ if (ret)
+ *ret = icount_16_xlate(curr_value);
+ return 0;
+}
+
+errcode_t ext2fs_icount_store(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 count)
+{
+ if (!ino || (ino > icount->num_inodes))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (icount->fullmap)
+ return set_inode_count(icount, ino, count);
+
+ if (count == 1) {
+ ext2fs_mark_inode_bitmap2(icount->single, ino);
+ if (icount->multiple)
+ ext2fs_unmark_inode_bitmap2(icount->multiple, ino);
+ return 0;
+ }
+ if (count == 0) {
+ ext2fs_unmark_inode_bitmap2(icount->single, ino);
+ if (icount->multiple) {
+ /*
+ * If the icount->multiple bitmap is enabled,
+ * we can just clear both bitmaps and we're done
+ */
+ ext2fs_unmark_inode_bitmap2(icount->multiple, ino);
+ } else
+ set_inode_count(icount, ino, 0);
+ return 0;
+ }
+
+ if (set_inode_count(icount, ino, count))
+ return EXT2_ET_NO_MEMORY;
+ ext2fs_unmark_inode_bitmap2(icount->single, ino);
+ if (icount->multiple)
+ ext2fs_mark_inode_bitmap2(icount->multiple, ino);
+ return 0;
+}
+
+ext2_ino_t ext2fs_get_icount_size(ext2_icount_t icount)
+{
+ if (!icount || icount->magic != EXT2_ET_MAGIC_ICOUNT)
+ return 0;
+
+ return icount->size;
+}
+
+#ifdef DEBUG
+
+ext2_filsys test_fs;
+ext2_icount_t icount;
+
+#define EXIT 0x00
+#define FETCH 0x01
+#define STORE 0x02
+#define INCREMENT 0x03
+#define DECREMENT 0x04
+
+struct test_program {
+ int cmd;
+ ext2_ino_t ino;
+ __u16 arg;
+ __u16 expected;
+};
+
+struct test_program prog[] = {
+ { STORE, 42, 42, 42 },
+ { STORE, 1, 1, 1 },
+ { STORE, 2, 2, 2 },
+ { STORE, 3, 3, 3 },
+ { STORE, 10, 1, 1 },
+ { STORE, 42, 0, 0 },
+ { INCREMENT, 5, 0, 1 },
+ { INCREMENT, 5, 0, 2 },
+ { INCREMENT, 5, 0, 3 },
+ { INCREMENT, 5, 0, 4 },
+ { DECREMENT, 5, 0, 3 },
+ { DECREMENT, 5, 0, 2 },
+ { DECREMENT, 5, 0, 1 },
+ { DECREMENT, 5, 0, 0 },
+ { FETCH, 10, 0, 1 },
+ { FETCH, 1, 0, 1 },
+ { FETCH, 2, 0, 2 },
+ { FETCH, 3, 0, 3 },
+ { INCREMENT, 1, 0, 2 },
+ { DECREMENT, 2, 0, 1 },
+ { DECREMENT, 2, 0, 0 },
+ { FETCH, 12, 0, 0 },
+ { EXIT, 0, 0, 0 }
+};
+
+struct test_program extended[] = {
+ { STORE, 1, 1, 1 },
+ { STORE, 2, 2, 2 },
+ { STORE, 3, 3, 3 },
+ { STORE, 4, 4, 4 },
+ { STORE, 5, 5, 5 },
+ { STORE, 6, 1, 1 },
+ { STORE, 7, 2, 2 },
+ { STORE, 8, 3, 3 },
+ { STORE, 9, 4, 4 },
+ { STORE, 10, 5, 5 },
+ { STORE, 11, 1, 1 },
+ { STORE, 12, 2, 2 },
+ { STORE, 13, 3, 3 },
+ { STORE, 14, 4, 4 },
+ { STORE, 15, 5, 5 },
+ { STORE, 16, 1, 1 },
+ { STORE, 17, 2, 2 },
+ { STORE, 18, 3, 3 },
+ { STORE, 19, 4, 4 },
+ { STORE, 20, 5, 5 },
+ { STORE, 21, 1, 1 },
+ { STORE, 22, 2, 2 },
+ { STORE, 23, 3, 3 },
+ { STORE, 24, 4, 4 },
+ { STORE, 25, 5, 5 },
+ { STORE, 26, 1, 1 },
+ { STORE, 27, 2, 2 },
+ { STORE, 28, 3, 3 },
+ { STORE, 29, 4, 4 },
+ { STORE, 30, 5, 5 },
+ { EXIT, 0, 0, 0 }
+};
+
+/*
+ * Setup the variables for doing the inode scan test.
+ */
+static void setup(void)
+{
+ errcode_t retval;
+ struct ext2_super_block param;
+
+ initialize_ext2_error_table();
+
+ memset(&param, 0, sizeof(param));
+ ext2fs_blocks_count_set(&param, 12000);
+
+ retval = ext2fs_initialize("test fs", EXT2_FLAG_64BITS, &param,
+ test_io_manager, &test_fs);
+ if (retval) {
+ com_err("setup", retval,
+ "while initializing filesystem");
+ exit(1);
+ }
+ retval = ext2fs_allocate_tables(test_fs);
+ if (retval) {
+ com_err("setup", retval,
+ "while allocating tables for test filesystem");
+ exit(1);
+ }
+}
+
+int run_test(int flags, int size, char *dir, struct test_program *prog)
+{
+ errcode_t retval;
+ ext2_icount_t icount;
+ struct test_program *pc;
+ __u16 result;
+ int problem = 0;
+
+ if (dir) {
+#ifdef CONFIG_TDB
+ retval = ext2fs_create_icount_tdb(test_fs, dir,
+ flags, &icount);
+ if (retval) {
+ com_err("run_test", retval,
+ "while creating icount using tdb");
+ exit(1);
+ }
+#else
+ printf("Skipped\n");
+ return 0;
+#endif
+ } else {
+ retval = ext2fs_create_icount2(test_fs, flags, size, 0,
+ &icount);
+ if (retval) {
+ com_err("run_test", retval, "while creating icount");
+ exit(1);
+ }
+ }
+ for (pc = prog; pc->cmd != EXIT; pc++) {
+ switch (pc->cmd) {
+ case FETCH:
+ printf("icount_fetch(%u) = ", pc->ino);
+ break;
+ case STORE:
+ retval = ext2fs_icount_store(icount, pc->ino, pc->arg);
+ if (retval) {
+ com_err("run_test", retval,
+ "while calling icount_store");
+ exit(1);
+ }
+ printf("icount_store(%u, %u) = ", pc->ino, pc->arg);
+ break;
+ case INCREMENT:
+ retval = ext2fs_icount_increment(icount, pc->ino, 0);
+ if (retval) {
+ com_err("run_test", retval,
+ "while calling icount_increment");
+ exit(1);
+ }
+ printf("icount_increment(%u) = ", pc->ino);
+ break;
+ case DECREMENT:
+ retval = ext2fs_icount_decrement(icount, pc->ino, 0);
+ if (retval) {
+ com_err("run_test", retval,
+ "while calling icount_decrement");
+ exit(1);
+ }
+ printf("icount_decrement(%u) = ", pc->ino);
+ break;
+ }
+ retval = ext2fs_icount_fetch(icount, pc->ino, &result);
+ if (retval) {
+ com_err("run_test", retval,
+ "while calling icount_fetch");
+ exit(1);
+ }
+ printf("%u (%s)\n", result, (result == pc->expected) ?
+ "OK" : "NOT OK");
+ if (result != pc->expected)
+ problem++;
+ }
+ printf("icount size is %u\n", ext2fs_get_icount_size(icount));
+ retval = ext2fs_icount_validate(icount, stdout);
+ if (retval) {
+ com_err("run_test", retval, "while calling icount_validate");
+ exit(1);
+ }
+ ext2fs_free_icount(icount);
+ return problem;
+}
+
+
+int main(int argc, char **argv)
+{
+ int failed = 0;
+
+ setup();
+ printf("Standard icount run:\n");
+ failed += run_test(0, 0, 0, prog);
+ printf("\nMultiple bitmap test:\n");
+ failed += run_test(EXT2_ICOUNT_OPT_INCREMENT, 0, 0, prog);
+ printf("\nResizing icount:\n");
+ failed += run_test(0, 3, 0, extended);
+ printf("\nStandard icount run with tdb:\n");
+ failed += run_test(0, 0, ".", prog);
+ printf("\nMultiple bitmap test with tdb:\n");
+ failed += run_test(EXT2_ICOUNT_OPT_INCREMENT, 0, ".", prog);
+ if (failed)
+ printf("FAILED!\n");
+ return failed;
+}
+#endif
diff --git a/lib/ext2fs/imager.c b/lib/ext2fs/imager.c
new file mode 100644
index 0000000..23290a6
--- /dev/null
+++ b/lib/ext2fs/imager.c
@@ -0,0 +1,470 @@
+/*
+ * image.c --- writes out the critical parts of the filesystem as a
+ * flat file.
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * Note: this uses the POSIX IO interfaces, unlike most of the other
+ * functions in this library. So sue me.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifndef HAVE_TYPE_SSIZE_T
+typedef int ssize_t;
+#endif
+
+/*
+ * This function returns 1 if the specified block is all zeros
+ */
+static int check_zero_block(char *buf, int blocksize)
+{
+ char *cp = buf;
+ int left = blocksize;
+
+ while (left > 0) {
+ if (*cp++)
+ return 0;
+ left--;
+ }
+ return 1;
+}
+
+/*
+ * Write the inode table out as a single block.
+ */
+#define BUF_BLOCKS 32
+
+errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags)
+{
+ dgrp_t group;
+ ssize_t left, c, d;
+ char *buf, *cp;
+ blk64_t blk;
+ ssize_t actual;
+ errcode_t retval;
+ ext2_loff_t r;
+
+ buf = malloc(fs->blocksize * BUF_BLOCKS);
+ if (!buf)
+ return ENOMEM;
+
+ for (group = 0; group < fs->group_desc_count; group++) {
+ blk = ext2fs_inode_table_loc(fs, group);
+ if (!blk) {
+ retval = EXT2_ET_MISSING_INODE_TABLE;
+ goto errout;
+ }
+ left = fs->inode_blocks_per_group;
+ if ((blk < fs->super->s_first_data_block) ||
+ (blk + left - 1 >= ext2fs_blocks_count(fs->super))) {
+ retval = EXT2_ET_GDESC_BAD_INODE_TABLE;
+ goto errout;
+ }
+ while (left) {
+ c = BUF_BLOCKS;
+ if (c > left)
+ c = left;
+ retval = io_channel_read_blk64(fs->io, blk, c, buf);
+ if (retval)
+ goto errout;
+ cp = buf;
+ while (c) {
+ if (!(flags & IMAGER_FLAG_SPARSEWRITE)) {
+ d = c;
+ goto skip_sparse;
+ }
+ /* Skip zero blocks */
+ if (check_zero_block(cp, fs->blocksize)) {
+ c--;
+ blk++;
+ left--;
+ cp += fs->blocksize;
+ r = ext2fs_llseek(fd, fs->blocksize,
+ SEEK_CUR);
+ if (r < 0) {
+ retval = errno;
+ goto errout;
+ }
+ continue;
+ }
+ /* Find non-zero blocks */
+ for (d = 1; d < c; d++) {
+ if (check_zero_block(cp +
+ d * fs->blocksize,
+ fs->blocksize))
+ break;
+ }
+ skip_sparse:
+ actual = write(fd, cp, d * fs->blocksize);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != d * fs->blocksize) {
+ retval = EXT2_ET_SHORT_WRITE;
+ goto errout;
+ }
+ blk += d;
+ left -= d;
+ cp += d * fs->blocksize;
+ c -= d;
+ }
+ }
+ }
+ retval = 0;
+
+errout:
+ free(buf);
+ return retval;
+}
+
+/*
+ * Read in the inode table and stuff it into place
+ */
+errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd,
+ int flags EXT2FS_ATTR((unused)))
+{
+ dgrp_t group;
+ ssize_t c, left;
+ char *buf;
+ blk64_t blk;
+ ssize_t actual;
+ errcode_t retval;
+
+ buf = malloc(fs->blocksize * BUF_BLOCKS);
+ if (!buf)
+ return ENOMEM;
+
+ for (group = 0; group < fs->group_desc_count; group++) {
+ blk = ext2fs_inode_table_loc(fs, group);
+ if (!blk) {
+ retval = EXT2_ET_MISSING_INODE_TABLE;
+ goto errout;
+ }
+ left = fs->inode_blocks_per_group;
+ while (left) {
+ c = BUF_BLOCKS;
+ if (c > left)
+ c = left;
+ actual = read(fd, buf, fs->blocksize * c);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != fs->blocksize * c) {
+ retval = EXT2_ET_SHORT_READ;
+ goto errout;
+ }
+ retval = io_channel_write_blk64(fs->io, blk, c, buf);
+ if (retval)
+ goto errout;
+
+ blk += c;
+ left -= c;
+ }
+ }
+ retval = ext2fs_flush_icache(fs);
+
+errout:
+ free(buf);
+ return retval;
+}
+
+/*
+ * Write out superblock and group descriptors
+ */
+errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd,
+ int flags EXT2FS_ATTR((unused)))
+{
+ char *buf, *cp;
+ ssize_t actual;
+ errcode_t retval;
+#ifdef WORDS_BIGENDIAN
+ unsigned int groups_per_block;
+ struct ext2_group_desc *gdp;
+ int j;
+#endif
+
+ if (fs->group_desc == NULL)
+ return EXT2_ET_NO_GDESC;
+
+ buf = malloc(fs->blocksize);
+ if (!buf)
+ return ENOMEM;
+
+ /*
+ * Write out the superblock
+ */
+ memset(buf, 0, fs->blocksize);
+#ifdef WORDS_BIGENDIAN
+ /*
+ * We're writing out superblock so let's convert
+ * it to little endian and then back if needed
+ */
+ ext2fs_swap_super(fs->super);
+ memcpy(buf, fs->super, SUPERBLOCK_SIZE);
+ ext2fs_swap_super(fs->super);
+#else
+ memcpy(buf, fs->super, SUPERBLOCK_SIZE);
+#endif
+ actual = write(fd, buf, fs->blocksize);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != (ssize_t) fs->blocksize) {
+ retval = EXT2_ET_SHORT_WRITE;
+ goto errout;
+ }
+
+ /*
+ * Now write out the block group descriptors
+ */
+
+ cp = (char *) fs->group_desc;
+
+#ifdef WORDS_BIGENDIAN
+ /*
+ * Convert group descriptors to little endian and back
+ * if needed
+ */
+ groups_per_block = EXT2_DESC_PER_BLOCK(fs->super);
+ for (j=0; j < groups_per_block*fs->desc_blocks; j++) {
+ gdp = ext2fs_group_desc(fs, fs->group_desc, j);
+ if (gdp)
+ ext2fs_swap_group_desc2(fs, gdp);
+ }
+#endif
+
+ actual = write(fd, cp, (ssize_t)fs->blocksize * fs->desc_blocks);
+
+
+#ifdef WORDS_BIGENDIAN
+ groups_per_block = EXT2_DESC_PER_BLOCK(fs->super);
+ for (j=0; j < groups_per_block*fs->desc_blocks; j++) {
+ gdp = ext2fs_group_desc(fs, fs->group_desc, j);
+ if (gdp)
+ ext2fs_swap_group_desc2(fs, gdp);
+ }
+#endif
+
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != (ssize_t)(fs->blocksize * fs->desc_blocks)) {
+ retval = EXT2_ET_SHORT_WRITE;
+ goto errout;
+ }
+
+ retval = 0;
+
+errout:
+ free(buf);
+ return retval;
+}
+
+/*
+ * Read the superblock and group descriptors and overwrite them.
+ */
+errcode_t ext2fs_image_super_read(ext2_filsys fs, int fd,
+ int flags EXT2FS_ATTR((unused)))
+{
+ char *buf;
+ ssize_t actual, size;
+ errcode_t retval;
+
+ size = (ssize_t)fs->blocksize * (fs->group_desc_count + 1);
+ buf = malloc(size);
+ if (!buf)
+ return ENOMEM;
+
+ /*
+ * Read it all in.
+ */
+ actual = read(fd, buf, size);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != size) {
+ retval = EXT2_ET_SHORT_READ;
+ goto errout;
+ }
+
+ /*
+ * Now copy in the superblock and group descriptors
+ */
+ memcpy(fs->super, buf, SUPERBLOCK_SIZE);
+
+ memcpy(fs->group_desc, buf + fs->blocksize,
+ (ssize_t)fs->blocksize * fs->group_desc_count);
+
+ retval = 0;
+
+errout:
+ free(buf);
+ return retval;
+}
+
+/*
+ * Write the block/inode bitmaps.
+ */
+errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags)
+{
+ ext2fs_generic_bitmap bmap;
+ errcode_t retval;
+ ssize_t actual;
+ size_t c;
+ __u64 itr, cnt, size, total_size;
+ char buf[1024];
+
+ if (flags & IMAGER_FLAG_INODEMAP) {
+ if (!fs->inode_map) {
+ retval = ext2fs_read_inode_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ bmap = fs->inode_map;
+ itr = 1;
+ cnt = (__u64)EXT2_INODES_PER_GROUP(fs->super) *
+ fs->group_desc_count;
+ size = (EXT2_INODES_PER_GROUP(fs->super) / 8);
+ } else {
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ bmap = fs->block_map;
+ itr = fs->super->s_first_data_block;
+ cnt = EXT2_GROUPS_TO_CLUSTERS(fs->super, fs->group_desc_count);
+ size = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
+ }
+ total_size = size * fs->group_desc_count;
+
+ while (cnt > 0) {
+ size = sizeof(buf);
+ if (size > (cnt >> 3))
+ size = (cnt >> 3);
+ if (size == 0)
+ break;
+
+ retval = ext2fs_get_generic_bmap_range(bmap, itr,
+ size << 3, buf);
+ if (retval)
+ return retval;
+
+ actual = write(fd, buf, size);
+ if (actual == -1)
+ return errno;
+ if (actual != (int) size)
+ return EXT2_ET_SHORT_READ;
+
+ itr += size << 3;
+ cnt -= size << 3;
+ }
+
+ size = total_size % fs->blocksize;
+ memset(buf, 0, sizeof(buf));
+ if (size) {
+ size = fs->blocksize - size;
+ while (size) {
+ c = size;
+ if (c > (int) sizeof(buf))
+ c = sizeof(buf);
+ actual = write(fd, buf, c);
+ if (actual < 0)
+ return errno;
+ if ((size_t) actual != c)
+ return EXT2_ET_SHORT_WRITE;
+ size -= c;
+ }
+ }
+ return 0;
+}
+
+
+/*
+ * Read the block/inode bitmaps.
+ */
+errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags)
+{
+ ext2fs_generic_bitmap bmap;
+ errcode_t retval;
+ __u64 itr, cnt;
+ char buf[1024];
+ unsigned int size;
+ ssize_t actual;
+
+ if (flags & IMAGER_FLAG_INODEMAP) {
+ if (!fs->inode_map) {
+ retval = ext2fs_read_inode_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ bmap = fs->inode_map;
+ itr = 1;
+ cnt = (__u64)EXT2_INODES_PER_GROUP(fs->super) *
+ fs->group_desc_count;
+ size = (EXT2_INODES_PER_GROUP(fs->super) / 8);
+ } else {
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ bmap = fs->block_map;
+ itr = fs->super->s_first_data_block;
+ cnt = EXT2_GROUPS_TO_BLOCKS(fs->super, fs->group_desc_count);
+ size = EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
+ }
+
+ while (cnt > 0) {
+ size = sizeof(buf);
+ if (size > (cnt >> 3))
+ size = (cnt >> 3);
+ if (size == 0)
+ break;
+
+ actual = read(fd, buf, size);
+ if (actual == -1)
+ return errno;
+ if (actual != (int) size)
+ return EXT2_ET_SHORT_READ;
+
+ retval = ext2fs_set_generic_bmap_range(bmap, itr,
+ size << 3, buf);
+ if (retval)
+ return retval;
+
+ itr += size << 3;
+ cnt -= size << 3;
+ }
+ return 0;
+}
diff --git a/lib/ext2fs/ind_block.c b/lib/ext2fs/ind_block.c
new file mode 100644
index 0000000..aa82ae6
--- /dev/null
+++ b/lib/ext2fs/ind_block.c
@@ -0,0 +1,67 @@
+/*
+ * ind_block.c --- indirect block I/O routines
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ * 2001, 2002, 2003, 2004, 2005 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+errcode_t ext2fs_read_ind_block(ext2_filsys fs, blk_t blk, void *buf)
+{
+ errcode_t retval;
+#ifdef WORDS_BIGENDIAN
+ blk_t *block_nr;
+ int i;
+ int limit = fs->blocksize >> 2;
+#endif
+
+ if ((fs->flags & EXT2_FLAG_IMAGE_FILE) &&
+ (fs->io != fs->image_io))
+ memset(buf, 0, fs->blocksize);
+ else {
+ retval = io_channel_read_blk(fs->io, blk, 1, buf);
+ if (retval)
+ return retval;
+ }
+#ifdef WORDS_BIGENDIAN
+ block_nr = (blk_t *) buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+#endif
+ return 0;
+}
+
+errcode_t ext2fs_write_ind_block(ext2_filsys fs, blk_t blk, void *buf)
+{
+#ifdef WORDS_BIGENDIAN
+ blk_t *block_nr;
+ int i;
+ int limit = fs->blocksize >> 2;
+#endif
+
+ if (fs->flags & EXT2_FLAG_IMAGE_FILE)
+ return 0;
+
+#ifdef WORDS_BIGENDIAN
+ block_nr = (blk_t *) buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+#endif
+ return io_channel_write_blk(fs->io, blk, 1, buf);
+}
+
+
diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
new file mode 100644
index 0000000..edd692b
--- /dev/null
+++ b/lib/ext2fs/initialize.c
@@ -0,0 +1,671 @@
+/*
+ * initialize.c --- initialize a filesystem handle given superblock
+ * parameters. Used by mke2fs when initializing a filesystem.
+ *
+ * Copyright (C) 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#if defined(__linux__) && defined(EXT2_OS_LINUX)
+#define CREATOR_OS EXT2_OS_LINUX
+#else
+#if defined(__GNU__) && defined(EXT2_OS_HURD)
+#define CREATOR_OS EXT2_OS_HURD
+#else
+#if defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD)
+#define CREATOR_OS EXT2_OS_FREEBSD
+#else
+#if defined(LITES) && defined(EXT2_OS_LITES)
+#define CREATOR_OS EXT2_OS_LITES
+#else
+#define CREATOR_OS EXT2_OS_LINUX /* by default */
+#endif /* defined(LITES) && defined(EXT2_OS_LITES) */
+#endif /* defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD) */
+#endif /* defined(__GNU__) && defined(EXT2_OS_HURD) */
+#endif /* defined(__linux__) && defined(EXT2_OS_LINUX) */
+
+/*
+ * Calculate the number of GDT blocks to reserve for online filesystem growth.
+ * The absolute maximum number of GDT blocks we can reserve is determined by
+ * the number of block pointers that can fit into a single block.
+ */
+static unsigned int calc_reserved_gdt_blocks(ext2_filsys fs)
+{
+ struct ext2_super_block *sb = fs->super;
+ unsigned long bpg = sb->s_blocks_per_group;
+ unsigned int gdpb = EXT2_DESC_PER_BLOCK(sb);
+ unsigned long max_blocks = 0xffffffff;
+ unsigned long rsv_groups;
+ unsigned int rsv_gdb;
+
+ /* We set it at 1024x the current filesystem size, or
+ * the upper block count limit (2^32), whichever is lower.
+ */
+ if (ext2fs_blocks_count(sb) < max_blocks / 1024)
+ max_blocks = ext2fs_blocks_count(sb) * 1024;
+ /*
+ * ext2fs_div64_ceil() is unnecessary because max_blocks is
+ * max _GDT_ blocks, which is limited to 32 bits.
+ */
+ rsv_groups = ext2fs_div_ceil(max_blocks - sb->s_first_data_block, bpg);
+ rsv_gdb = ext2fs_div_ceil(rsv_groups, gdpb) - fs->desc_blocks;
+ if (rsv_gdb > EXT2_ADDR_PER_BLOCK(sb))
+ rsv_gdb = EXT2_ADDR_PER_BLOCK(sb);
+#ifdef RES_GDT_DEBUG
+ printf("max_blocks %lu, rsv_groups = %lu, rsv_gdb = %u\n",
+ max_blocks, rsv_groups, rsv_gdb);
+#endif
+
+ return rsv_gdb;
+}
+
+errcode_t ext2fs_initialize(const char *name, int flags,
+ struct ext2_super_block *param,
+ io_manager manager, ext2_filsys *ret_fs)
+{
+ ext2_filsys fs;
+ errcode_t retval;
+ struct ext2_super_block *super;
+ unsigned int rem;
+ unsigned int overhead = 0;
+ unsigned int ipg;
+ dgrp_t i;
+ blk64_t free_blocks;
+ blk_t numblocks;
+ int rsv_gdt;
+ int csum_flag;
+ int bigalloc_flag;
+ int io_flags;
+ int has_bg;
+ unsigned reserved_inos;
+ char *buf = 0;
+ char c;
+ double reserved_ratio;
+ char *time_env;
+
+ if (!param || !ext2fs_blocks_count(param))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys), &fs);
+ if (retval)
+ return retval;
+
+ memset(fs, 0, sizeof(struct struct_ext2_filsys));
+ fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS;
+ fs->flags = flags | EXT2_FLAG_RW;
+ fs->umask = 022;
+ fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+#ifdef WORDS_BIGENDIAN
+ fs->flags |= EXT2_FLAG_SWAP_BYTES;
+#endif
+
+ time_env = getenv("E2FSPROGS_FAKE_TIME");
+ if (time_env)
+ fs->now = strtoul(time_env, NULL, 0);
+
+ io_flags = IO_FLAG_RW;
+ if (flags & EXT2_FLAG_EXCLUSIVE)
+ io_flags |= IO_FLAG_EXCLUSIVE;
+ if (flags & EXT2_FLAG_DIRECT_IO)
+ io_flags |= IO_FLAG_DIRECT_IO;
+ io_flags |= O_BINARY;
+ retval = manager->open(name, io_flags, &fs->io);
+ if (retval)
+ goto cleanup;
+ fs->image_io = fs->io;
+ fs->io->app_data = fs;
+ retval = ext2fs_get_mem(strlen(name)+1, &fs->device_name);
+ if (retval)
+ goto cleanup;
+
+ strcpy(fs->device_name, name);
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, &super);
+ if (retval)
+ goto cleanup;
+ fs->super = super;
+
+ memset(super, 0, SUPERBLOCK_SIZE);
+
+#define set_field(field, default) (super->field = param->field ? \
+ param->field : (default))
+#define assign_field(field) (super->field = param->field)
+
+ super->s_magic = EXT2_SUPER_MAGIC;
+ super->s_state = EXT2_VALID_FS;
+
+ bigalloc_flag = ext2fs_has_feature_bigalloc(param);
+
+ assign_field(s_log_block_size);
+
+ if (bigalloc_flag) {
+ set_field(s_log_cluster_size, super->s_log_block_size+4);
+ if (super->s_log_block_size > super->s_log_cluster_size) {
+ retval = EXT2_ET_INVALID_ARGUMENT;
+ goto cleanup;
+ }
+ } else
+ super->s_log_cluster_size = super->s_log_block_size;
+
+ set_field(s_first_data_block, super->s_log_cluster_size ? 0 : 1);
+ set_field(s_max_mnt_count, 0);
+ set_field(s_errors, EXT2_ERRORS_DEFAULT);
+ set_field(s_feature_compat, 0);
+ set_field(s_feature_incompat, 0);
+ set_field(s_feature_ro_compat, 0);
+ set_field(s_default_mount_opts, 0);
+ set_field(s_first_meta_bg, 0);
+ set_field(s_raid_stride, 0); /* default stride size: 0 */
+ set_field(s_raid_stripe_width, 0); /* default stripe width: 0 */
+ set_field(s_log_groups_per_flex, 0);
+ set_field(s_flags, 0);
+ assign_field(s_backup_bgs[0]);
+ assign_field(s_backup_bgs[1]);
+
+ assign_field(s_encoding);
+ assign_field(s_encoding_flags);
+
+ if (ext2fs_has_feature_casefold(param))
+ fs->encoding = ext2fs_load_nls_table(param->s_encoding);
+
+ if (super->s_feature_incompat & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP) {
+ retval = EXT2_ET_UNSUPP_FEATURE;
+ goto cleanup;
+ }
+ if (super->s_feature_ro_compat & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP) {
+ retval = EXT2_ET_RO_UNSUPP_FEATURE;
+ goto cleanup;
+ }
+
+ set_field(s_rev_level, EXT2_GOOD_OLD_REV);
+ if (super->s_rev_level >= EXT2_DYNAMIC_REV) {
+ set_field(s_first_ino, EXT2_GOOD_OLD_FIRST_INO);
+ set_field(s_inode_size, EXT2_GOOD_OLD_INODE_SIZE);
+ if (super->s_inode_size >= sizeof(struct ext2_inode_large)) {
+ int extra_isize = sizeof(struct ext2_inode_large) -
+ EXT2_GOOD_OLD_INODE_SIZE;
+ set_field(s_min_extra_isize, extra_isize);
+ set_field(s_want_extra_isize, extra_isize);
+ }
+ } else {
+ super->s_first_ino = EXT2_GOOD_OLD_FIRST_INO;
+ super->s_inode_size = EXT2_GOOD_OLD_INODE_SIZE;
+ }
+
+ set_field(s_checkinterval, 0);
+ super->s_mkfs_time = super->s_lastcheck = fs->now ? fs->now : time(NULL);
+
+ super->s_creator_os = CREATOR_OS;
+
+ fs->fragsize = fs->blocksize = EXT2_BLOCK_SIZE(super);
+ fs->cluster_ratio_bits = super->s_log_cluster_size -
+ super->s_log_block_size;
+
+ if (bigalloc_flag) {
+ unsigned long long bpg;
+
+ if (param->s_blocks_per_group &&
+ param->s_clusters_per_group &&
+ ((param->s_clusters_per_group * EXT2FS_CLUSTER_RATIO(fs)) !=
+ param->s_blocks_per_group)) {
+ retval = EXT2_ET_INVALID_ARGUMENT;
+ goto cleanup;
+ }
+ if (param->s_clusters_per_group)
+ assign_field(s_clusters_per_group);
+ else if (param->s_blocks_per_group)
+ super->s_clusters_per_group =
+ param->s_blocks_per_group /
+ EXT2FS_CLUSTER_RATIO(fs);
+ else if (super->s_log_cluster_size + 15 < 32)
+ super->s_clusters_per_group = fs->blocksize * 8;
+ else
+ super->s_clusters_per_group = (fs->blocksize - 1) * 8;
+ if (super->s_clusters_per_group > EXT2_MAX_CLUSTERS_PER_GROUP(super))
+ super->s_clusters_per_group = EXT2_MAX_CLUSTERS_PER_GROUP(super);
+ bpg = EXT2FS_C2B(fs,
+ (unsigned long long) super->s_clusters_per_group);
+ if (bpg >= (((unsigned long long) 1) << 32)) {
+ retval = EXT2_ET_INVALID_ARGUMENT;
+ goto cleanup;
+ }
+ super->s_blocks_per_group = bpg;
+ } else {
+ set_field(s_blocks_per_group, fs->blocksize * 8);
+ if (super->s_blocks_per_group > EXT2_MAX_BLOCKS_PER_GROUP(super))
+ super->s_blocks_per_group = EXT2_MAX_BLOCKS_PER_GROUP(super);
+ super->s_clusters_per_group = super->s_blocks_per_group;
+ }
+
+ ext2fs_blocks_count_set(super, ext2fs_blocks_count(param) &
+ ~((blk64_t) EXT2FS_CLUSTER_MASK(fs)));
+ ext2fs_r_blocks_count_set(super, ext2fs_r_blocks_count(param));
+ if (ext2fs_r_blocks_count(super) >= ext2fs_blocks_count(param)) {
+ retval = EXT2_ET_INVALID_ARGUMENT;
+ goto cleanup;
+ }
+
+ set_field(s_mmp_update_interval, 0);
+
+ /*
+ * If we're creating an external journal device, we don't need
+ * to bother with the rest.
+ */
+ if (ext2fs_has_feature_journal_dev(super)) {
+ fs->group_desc_count = 0;
+ ext2fs_mark_super_dirty(fs);
+ *ret_fs = fs;
+ return 0;
+ }
+
+retry:
+ fs->group_desc_count = (dgrp_t) ext2fs_div64_ceil(
+ ext2fs_blocks_count(super) - super->s_first_data_block,
+ EXT2_BLOCKS_PER_GROUP(super));
+ if (fs->group_desc_count == 0) {
+ retval = EXT2_ET_TOOSMALL;
+ goto cleanup;
+ }
+
+ set_field(s_desc_size,
+ ext2fs_has_feature_64bit(super) ?
+ EXT2_MIN_DESC_SIZE_64BIT : 0);
+
+ fs->desc_blocks = ext2fs_div_ceil(fs->group_desc_count,
+ EXT2_DESC_PER_BLOCK(super));
+
+ i = fs->blocksize >= 4096 ? 1 : 4096 / fs->blocksize;
+
+ if (ext2fs_has_feature_64bit(super) &&
+ (ext2fs_blocks_count(super) / i) >= (1ULL << 32))
+ set_field(s_inodes_count, ~0U);
+ else
+ set_field(s_inodes_count, ext2fs_blocks_count(super) / i);
+
+ /*
+ * Make sure we have at least EXT2_FIRST_INO + 1 inodes, so
+ * that we have enough inodes for the filesystem(!)
+ */
+ if (super->s_inodes_count < EXT2_FIRST_INODE(super)+1)
+ super->s_inodes_count = EXT2_FIRST_INODE(super)+1;
+
+ /*
+ * There should be at least as many inodes as the user
+ * requested. Figure out how many inodes per group that
+ * should be. But make sure that we don't allocate more than
+ * one bitmap's worth of inodes each group.
+ */
+ ipg = ext2fs_div_ceil(super->s_inodes_count, fs->group_desc_count);
+ if (ipg > fs->blocksize * 8) {
+ if (!bigalloc_flag && super->s_blocks_per_group >= 256) {
+ /* Try again with slightly different parameters */
+ super->s_blocks_per_group -= 8;
+ ext2fs_blocks_count_set(super,
+ ext2fs_blocks_count(param));
+ super->s_clusters_per_group = super->s_blocks_per_group;
+ goto retry;
+ } else {
+ retval = EXT2_ET_TOO_MANY_INODES;
+ goto cleanup;
+ }
+ }
+
+ if (ipg > (unsigned) EXT2_MAX_INODES_PER_GROUP(super))
+ ipg = EXT2_MAX_INODES_PER_GROUP(super);
+
+ipg_retry:
+ super->s_inodes_per_group = ipg;
+
+ /*
+ * Make sure the number of inodes per group completely fills
+ * the inode table blocks in the descriptor. If not, add some
+ * additional inodes/group. Waste not, want not...
+ */
+ fs->inode_blocks_per_group = (((super->s_inodes_per_group *
+ EXT2_INODE_SIZE(super)) +
+ EXT2_BLOCK_SIZE(super) - 1) /
+ EXT2_BLOCK_SIZE(super));
+ super->s_inodes_per_group = ((fs->inode_blocks_per_group *
+ EXT2_BLOCK_SIZE(super)) /
+ EXT2_INODE_SIZE(super));
+ /*
+ * Finally, make sure the number of inodes per group is a
+ * multiple of 8. This is needed to simplify the bitmap
+ * splicing code.
+ */
+ if (super->s_inodes_per_group < 8)
+ super->s_inodes_per_group = 8;
+ super->s_inodes_per_group &= ~7;
+ fs->inode_blocks_per_group = (((super->s_inodes_per_group *
+ EXT2_INODE_SIZE(super)) +
+ EXT2_BLOCK_SIZE(super) - 1) /
+ EXT2_BLOCK_SIZE(super));
+
+ /*
+ * adjust inode count to reflect the adjusted inodes_per_group
+ */
+ if ((__u64)super->s_inodes_per_group * fs->group_desc_count > ~0U) {
+ ipg--;
+ goto ipg_retry;
+ }
+ super->s_inodes_count = super->s_inodes_per_group *
+ fs->group_desc_count;
+ super->s_free_inodes_count = super->s_inodes_count;
+
+ /*
+ * check the number of reserved group descriptor table blocks
+ */
+ if (ext2fs_has_feature_resize_inode(super))
+ rsv_gdt = calc_reserved_gdt_blocks(fs);
+ else
+ rsv_gdt = 0;
+ set_field(s_reserved_gdt_blocks, rsv_gdt);
+ if (super->s_reserved_gdt_blocks > EXT2_ADDR_PER_BLOCK(super)) {
+ retval = EXT2_ET_RES_GDT_BLOCKS;
+ goto cleanup;
+ }
+ /* Enable meta_bg if we'd lose more than 3/4 of a BG to GDT blocks. */
+ if (super->s_reserved_gdt_blocks + fs->desc_blocks >
+ super->s_blocks_per_group * 3 / 4) {
+ ext2fs_set_feature_meta_bg(fs->super);
+ ext2fs_clear_feature_resize_inode(fs->super);
+ set_field(s_reserved_gdt_blocks, 0);
+ }
+
+ /*
+ * Calculate the maximum number of bookkeeping blocks per
+ * group. It includes the superblock, the block group
+ * descriptors, the block bitmap, the inode bitmap, the inode
+ * table, and the reserved gdt blocks.
+ */
+ overhead = (int) (3 + fs->inode_blocks_per_group +
+ super->s_reserved_gdt_blocks);
+
+ if (ext2fs_has_feature_meta_bg(fs->super))
+ overhead++;
+ else
+ overhead += fs->desc_blocks;
+
+ /* This can only happen if the user requested too many inodes */
+ if (overhead > super->s_blocks_per_group) {
+ retval = EXT2_ET_TOO_MANY_INODES;
+ goto cleanup;
+ }
+
+ /*
+ * See if the last group is big enough to support the
+ * necessary data structures. If not, we need to get rid of
+ * it. We need to recalculate the overhead for the last block
+ * group, since it might or might not have a superblock
+ * backup.
+ */
+ overhead = (int) (2 + fs->inode_blocks_per_group);
+ has_bg = 0;
+ if (ext2fs_has_feature_sparse_super2(super)) {
+ /*
+ * We have to do this manually since
+ * super->s_backup_bgs hasn't been set up yet.
+ */
+ if (fs->group_desc_count == 2)
+ has_bg = param->s_backup_bgs[0] != 0;
+ else
+ has_bg = param->s_backup_bgs[1] != 0;
+ } else
+ has_bg = ext2fs_bg_has_super(fs, fs->group_desc_count - 1);
+ if (has_bg)
+ overhead += 1 + fs->desc_blocks + super->s_reserved_gdt_blocks;
+ rem = ((ext2fs_blocks_count(super) - super->s_first_data_block) %
+ super->s_blocks_per_group);
+ if ((fs->group_desc_count == 1) && rem && (rem < overhead)) {
+ retval = EXT2_ET_TOOSMALL;
+ goto cleanup;
+ }
+ if (rem && (rem < overhead+50)) {
+ ext2fs_blocks_count_set(super, ext2fs_blocks_count(super) -
+ rem);
+ /*
+ * If blocks count is changed, we need to recalculate
+ * reserved blocks count not to exceed 50%.
+ */
+ reserved_ratio = 100.0 * ext2fs_r_blocks_count(param) /
+ ext2fs_blocks_count(param);
+ ext2fs_r_blocks_count_set(super, reserved_ratio *
+ ext2fs_blocks_count(super) / 100.0);
+
+ goto retry;
+ }
+
+ /*
+ * At this point we know how big the filesystem will be. So
+ * we can do any and all allocations that depend on the block
+ * count.
+ */
+
+ /* Set up the locations of the backup superblocks */
+ if (ext2fs_has_feature_sparse_super2(super)) {
+ if (super->s_backup_bgs[0] >= fs->group_desc_count)
+ super->s_backup_bgs[0] = fs->group_desc_count - 1;
+ if (super->s_backup_bgs[1] >= fs->group_desc_count)
+ super->s_backup_bgs[1] = fs->group_desc_count - 1;
+ if (super->s_backup_bgs[0] == super->s_backup_bgs[1])
+ super->s_backup_bgs[1] = 0;
+ if (super->s_backup_bgs[0] > super->s_backup_bgs[1]) {
+ __u32 t = super->s_backup_bgs[0];
+ super->s_backup_bgs[0] = super->s_backup_bgs[1];
+ super->s_backup_bgs[1] = t;
+ }
+ }
+
+ retval = ext2fs_get_mem(strlen(fs->device_name) + 80, &buf);
+ if (retval)
+ goto cleanup;
+
+ strcpy(buf, "block bitmap for ");
+ strcat(buf, fs->device_name);
+ retval = ext2fs_allocate_subcluster_bitmap(fs, buf, &fs->block_map);
+ if (retval)
+ goto cleanup;
+
+ strcpy(buf, "inode bitmap for ");
+ strcat(buf, fs->device_name);
+ retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
+ if (retval)
+ goto cleanup;
+
+ ext2fs_free_mem(&buf);
+
+ retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
+ &fs->group_desc);
+ if (retval)
+ goto cleanup;
+
+ memset(fs->group_desc, 0, (size_t) fs->desc_blocks * fs->blocksize);
+
+ /*
+ * Reserve the superblock and group descriptors for each
+ * group, and fill in the correct group statistics for group.
+ * Note that although the block bitmap, inode bitmap, and
+ * inode table have not been allocated (and in fact won't be
+ * by this routine), they are accounted for nevertheless.
+ *
+ * If FLEX_BG meta-data grouping is used, only account for the
+ * superblock and group descriptors (the inode tables and
+ * bitmaps will be accounted for when allocated).
+ */
+ free_blocks = 0;
+ csum_flag = ext2fs_has_group_desc_csum(fs);
+ reserved_inos = super->s_first_ino;
+ for (i = 0; i < fs->group_desc_count; i++) {
+ /*
+ * Don't set the BLOCK_UNINIT group for the last group
+ * because the block bitmap needs to be padded.
+ */
+ if (csum_flag) {
+ if (i != fs->group_desc_count - 1)
+ ext2fs_bg_flags_set(fs, i,
+ EXT2_BG_BLOCK_UNINIT);
+ ext2fs_bg_flags_set(fs, i, EXT2_BG_INODE_UNINIT);
+ numblocks = super->s_inodes_per_group;
+ if (reserved_inos) {
+ if (numblocks > reserved_inos) {
+ numblocks -= reserved_inos;
+ reserved_inos = 0;
+ } else {
+ reserved_inos -= numblocks;
+ numblocks = 0;
+ }
+ }
+ ext2fs_bg_itable_unused_set(fs, i, numblocks);
+ }
+ numblocks = ext2fs_reserve_super_and_bgd(fs, i, fs->block_map);
+ if (fs->super->s_log_groups_per_flex)
+ numblocks += 2 + fs->inode_blocks_per_group;
+
+ free_blocks += numblocks;
+ ext2fs_bg_free_blocks_count_set(fs, i, numblocks);
+ ext2fs_bg_free_inodes_count_set(fs, i, fs->super->s_inodes_per_group);
+ ext2fs_bg_used_dirs_count_set(fs, i, 0);
+ ext2fs_group_desc_csum_set(fs, i);
+ }
+ free_blocks &= ~EXT2FS_CLUSTER_MASK(fs);
+ ext2fs_free_blocks_count_set(super, free_blocks);
+
+ c = (char) 255;
+ if (((int) c) == -1) {
+ super->s_flags |= EXT2_FLAGS_SIGNED_HASH;
+ } else {
+ super->s_flags |= EXT2_FLAGS_UNSIGNED_HASH;
+ }
+
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ ext2fs_mark_ib_dirty(fs);
+
+ io_channel_set_blksize(fs->io, fs->blocksize);
+
+ *ret_fs = fs;
+ return 0;
+cleanup:
+ free(buf);
+ ext2fs_free(fs);
+ return retval;
+}
+
+errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs, int super_only)
+{
+ blk64_t blk;
+ ext2_ino_t ino;
+ unsigned int group = 0;
+ unsigned int count = 0;
+ int total_free = 0;
+ int group_free = 0;
+ int last_allocated = 0;
+ int uninit;
+
+ /*
+ * First calculate the block statistics
+ */
+ uninit = 1;
+ for (blk = fs->super->s_first_data_block;
+ blk < ext2fs_blocks_count(fs->super); blk++) {
+ if (!ext2fs_fast_test_block_bitmap2(fs->block_map, blk)) {
+ group_free++;
+ total_free++;
+ } else {
+ uninit = 0;
+ }
+ count++;
+ if ((count == fs->super->s_blocks_per_group) ||
+ (blk == ext2fs_blocks_count(fs->super)-1)) {
+ ext2fs_bg_free_blocks_count_set(fs, group,
+ group_free);
+ if (!super_only) {
+ if (uninit && blk !=
+ ext2fs_blocks_count(fs->super) - 1)
+ ext2fs_bg_flags_set(fs, group,
+ EXT2_BG_BLOCK_UNINIT);
+ else
+ ext2fs_bg_flags_clear(fs, group,
+ EXT2_BG_BLOCK_UNINIT);
+ }
+ count = 0;
+ group_free = 0;
+ uninit = 1;
+ group++;
+ }
+ }
+ total_free = EXT2FS_C2B(fs, total_free);
+ ext2fs_free_blocks_count_set(fs->super, total_free);
+
+ /*
+ * Next, calculate the inode statistics
+ */
+ group_free = 0;
+ total_free = 0;
+ last_allocated = 0;
+ count = 0;
+ group = 0;
+
+ /* Protect loop from wrap-around if s_inodes_count maxed */
+ for (ino = 1; ino <= fs->super->s_inodes_count && ino > 0; ino++) {
+ if (!ext2fs_test_inode_bitmap2(fs->inode_map, ino)) {
+ group_free++;
+ total_free++;
+ } else {
+ last_allocated = ino;
+ }
+ count++;
+ if ((count == fs->super->s_inodes_per_group) ||
+ (ino == fs->super->s_inodes_count)) {
+ if (!super_only) {
+ if (last_allocated) {
+ ext2fs_bg_flags_clear(fs, group,
+ EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_itable_unused_set(fs, group,
+ fs->super->s_inodes_per_group -
+ (last_allocated %
+ fs->super->s_inodes_per_group));
+ } else {
+ ext2fs_bg_flags_set(fs, group,
+ EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_itable_unused_set(fs, group,
+ 0);
+ }
+ ext2fs_bg_free_inodes_count_set(fs, group,
+ group_free);
+ }
+ group++;
+ count = 0;
+ group_free = 0;
+ last_allocated = 0;
+ }
+ }
+ fs->super->s_free_inodes_count = total_free;
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
diff --git a/lib/ext2fs/inline.c b/lib/ext2fs/inline.c
new file mode 100644
index 0000000..ae2ae6e
--- /dev/null
+++ b/lib/ext2fs/inline.c
@@ -0,0 +1,118 @@
+/*
+ * inline.c --- Includes the inlined functions defined in the header
+ * files as standalone functions, in case the application program
+ * is compiled with inlining turned off.
+ *
+ * Copyright (C) 1993, 1994 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 /* for posix_memalign() */
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+#include "ext2_fs.h"
+#define INCLUDE_INLINE_FUNCS
+#include "ext2fs.h"
+
+/*
+ * We used to define this as an inline, but since we are now using
+ * autoconf-defined #ifdef's, we need to export this as a
+ * library-provided function exclusively.
+ */
+errcode_t ext2fs_get_memalign(unsigned long size,
+ unsigned long align, void *ptr)
+{
+ errcode_t retval = 0;
+ void **p = ptr;
+
+ if (align < 8)
+ align = 8;
+#ifdef HAVE_POSIX_MEMALIGN
+ retval = posix_memalign(p, align, size);
+ if (retval == ENOMEM)
+ return EXT2_ET_NO_MEMORY;
+#else /* !HAVE_POSIX_MEMALIGN */
+#ifdef HAVE_MEMALIGN
+ *p = memalign(align, size);
+ if (*p == NULL) {
+ if (errno)
+ return errno;
+ else
+ return EXT2_ET_NO_MEMORY;
+ }
+#else /* !HAVE_MEMALIGN */
+#ifdef HAVE_VALLOC
+ if (align > sizeof(long long))
+ *p = valloc(size);
+ else
+#endif
+ *p = malloc(size);
+ if ((uintptr_t) *p & (align - 1)) {
+ free(*p);
+ *p = 0;
+ }
+ if (*p == 0)
+ return EXT2_ET_NO_MEMORY;
+#endif /* HAVE_MEMALIGN */
+#endif /* HAVE_POSIX_MEMALIGN */
+ return retval;
+}
+
+#ifdef DEBUG
+static int isaligned(void *ptr, unsigned long align)
+{
+ return (((unsigned long) ptr & (align - 1)) == 0);
+}
+
+static errcode_t test_memalign(unsigned long align)
+{
+ void *ptr = 0;
+ errcode_t retval;
+
+ retval = ext2fs_get_memalign(32, align, &ptr);
+ if (!retval && !isaligned(ptr, align))
+ retval = EINVAL;
+ free(ptr);
+ printf("tst_memalign(%lu) is %s\n", align,
+ retval ? error_message(retval) : "OK");
+ return retval;
+}
+
+int main(int argc, char **argv)
+{
+ int err = 0;
+
+ if (test_memalign(4))
+ err++;
+ if (test_memalign(32))
+ err++;
+ if (test_memalign(1024))
+ err++;
+ if (test_memalign(4096))
+ err++;
+ return err;
+}
+#endif
diff --git a/lib/ext2fs/inline_data.c b/lib/ext2fs/inline_data.c
new file mode 100644
index 0000000..bd52e37
--- /dev/null
+++ b/lib/ext2fs/inline_data.c
@@ -0,0 +1,842 @@
+/*
+ * inline_data.c --- data in inode
+ *
+ * Copyright (C) 2012 Zheng Liu <wenqing.lz@taobao.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <time.h>
+#include <limits.h> /* for PATH_MAX */
+
+#include "ext2_fs.h"
+#include "ext2_ext_attr.h"
+
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+struct ext2_inline_data {
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ size_t ea_size; /* the size of inline data in ea area */
+ void *ea_data;
+};
+
+static errcode_t ext2fs_inline_data_ea_set(struct ext2_inline_data *data)
+{
+ struct ext2_xattr_handle *handle;
+ errcode_t retval;
+
+ retval = ext2fs_xattrs_open(data->fs, data->ino, &handle);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_xattrs_read(handle);
+ if (retval)
+ goto err;
+
+ retval = ext2fs_xattr_set(handle, "system.data",
+ data->ea_data, data->ea_size);
+err:
+ (void) ext2fs_xattrs_close(&handle);
+ return retval;
+}
+
+static errcode_t ext2fs_inline_data_ea_get(struct ext2_inline_data *data)
+{
+ struct ext2_xattr_handle *handle;
+ errcode_t retval;
+
+ data->ea_size = 0;
+ data->ea_data = 0;
+
+ retval = ext2fs_xattrs_open(data->fs, data->ino, &handle);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_xattrs_read(handle);
+ if (retval)
+ goto err;
+
+ retval = ext2fs_xattr_get(handle, "system.data",
+ (void **)&data->ea_data, &data->ea_size);
+ if (retval == EXT2_ET_EA_KEY_NOT_FOUND) {
+ data->ea_size = 0;
+ data->ea_data = NULL;
+ retval = 0;
+ } else if (retval)
+ goto err;
+
+err:
+ (void) ext2fs_xattrs_close(&handle);
+ return retval;
+}
+
+errcode_t ext2fs_inline_data_init(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inline_data data;
+ char empty[1] = { '\0' };
+
+ data.fs = fs;
+ data.ino = ino;
+ data.ea_size = 0;
+ data.ea_data = empty;
+ return ext2fs_inline_data_ea_set(&data);
+}
+
+errcode_t ext2fs_inline_data_size(ext2_filsys fs, ext2_ino_t ino, size_t *size)
+{
+ struct ext2_inode inode;
+ struct ext2_inline_data data;
+ errcode_t retval;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+
+ if (!(inode.i_flags & EXT4_INLINE_DATA_FL))
+ return EXT2_ET_NO_INLINE_DATA;
+
+ data.fs = fs;
+ data.ino = ino;
+ retval = ext2fs_inline_data_ea_get(&data);
+ if (retval)
+ return retval;
+
+ *size = EXT4_MIN_INLINE_DATA_SIZE + data.ea_size;
+ return ext2fs_free_mem(&data.ea_data);
+}
+
+int ext2fs_inline_data_dir_iterate(ext2_filsys fs, ext2_ino_t ino,
+ void *priv_data)
+{
+ struct dir_context *ctx;
+ struct ext2_inode inode;
+ struct ext2_dir_entry dirent;
+ struct ext2_inline_data data;
+ int ret = BLOCK_ABORT;
+ e2_blkcnt_t blockcnt = 0;
+ char *old_buf;
+ unsigned int old_buflen;
+ int old_flags;
+
+ ctx = (struct dir_context *)priv_data;
+ old_buf = ctx->buf;
+ old_buflen = ctx->buflen;
+ old_flags = ctx->flags;
+ ctx->flags |= DIRENT_FLAG_INCLUDE_INLINE_DATA;
+
+ ctx->errcode = ext2fs_read_inode(fs, ino, &inode);
+ if (ctx->errcode)
+ goto out;
+
+ if (!(inode.i_flags & EXT4_INLINE_DATA_FL)) {
+ ctx->errcode = EXT2_ET_NO_INLINE_DATA;
+ goto out;
+ }
+
+ if (!LINUX_S_ISDIR(inode.i_mode)) {
+ ctx->errcode = EXT2_ET_NO_DIRECTORY;
+ goto out;
+ }
+ ret = 0;
+
+ /* we first check '.' and '..' dir */
+ dirent.inode = ino;
+ dirent.name_len = 1;
+ ext2fs_set_rec_len(fs, EXT2_DIR_REC_LEN(2), &dirent);
+ dirent.name[0] = '.';
+ dirent.name[1] = '\0';
+ ctx->buf = (char *)&dirent;
+ ext2fs_get_rec_len(fs, &dirent, &ctx->buflen);
+ ret |= ext2fs_process_dir_block(fs, 0, blockcnt++, 0, 0, priv_data);
+ if (ret & BLOCK_ABORT)
+ goto out;
+
+ dirent.inode = ext2fs_le32_to_cpu(inode.i_block[0]);
+ dirent.name_len = 2;
+ ext2fs_set_rec_len(fs, EXT2_DIR_REC_LEN(3), &dirent);
+ dirent.name[0] = '.';
+ dirent.name[1] = '.';
+ dirent.name[2] = '\0';
+ ctx->buf = (char *)&dirent;
+ ext2fs_get_rec_len(fs, &dirent, &ctx->buflen);
+ ret |= ext2fs_process_dir_block(fs, 0, blockcnt++, 0, 0, priv_data);
+ if (ret & BLOCK_INLINE_DATA_CHANGED) {
+ errcode_t err;
+
+ inode.i_block[0] = ext2fs_cpu_to_le32(dirent.inode);
+ err = ext2fs_write_inode(fs, ino, &inode);
+ if (err)
+ goto out;
+ ret &= ~BLOCK_INLINE_DATA_CHANGED;
+ }
+ if (ret & BLOCK_ABORT)
+ goto out;
+
+ ctx->buf = (char *)inode.i_block + EXT4_INLINE_DATA_DOTDOT_SIZE;
+ ctx->buflen = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DATA_DOTDOT_SIZE;
+#ifdef WORDS_BIGENDIAN
+ ctx->errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
+ if (ctx->errcode) {
+ ret |= BLOCK_ABORT;
+ goto out;
+ }
+#endif
+ ret |= ext2fs_process_dir_block(fs, 0, blockcnt++, 0, 0, priv_data);
+ if (ret & BLOCK_INLINE_DATA_CHANGED) {
+#ifdef WORDS_BIGENDIAN
+ ctx->errcode = ext2fs_dirent_swab_out2(fs, ctx->buf,
+ ctx->buflen, 0);
+ if (ctx->errcode) {
+ ret |= BLOCK_ABORT;
+ goto out;
+ }
+#endif
+ ctx->errcode = ext2fs_write_inode(fs, ino, &inode);
+ if (ctx->errcode)
+ ret |= BLOCK_ABORT;
+ ret &= ~BLOCK_INLINE_DATA_CHANGED;
+ }
+ if (ret & BLOCK_ABORT)
+ goto out;
+
+ data.fs = fs;
+ data.ino = ino;
+ ctx->errcode = ext2fs_inline_data_ea_get(&data);
+ if (ctx->errcode) {
+ ret |= BLOCK_ABORT;
+ goto out;
+ }
+ if (data.ea_size <= 0)
+ goto out1;
+
+ ctx->buf = data.ea_data;
+ ctx->buflen = data.ea_size;
+#ifdef WORDS_BIGENDIAN
+ ctx->errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
+ if (ctx->errcode) {
+ ret |= BLOCK_ABORT;
+ goto out1;
+ }
+#endif
+
+ ret |= ext2fs_process_dir_block(fs, 0, blockcnt++, 0, 0, priv_data);
+ if (ret & BLOCK_INLINE_DATA_CHANGED) {
+#ifdef WORDS_BIGENDIAN
+ ctx->errcode = ext2fs_dirent_swab_out2(fs, ctx->buf,
+ ctx->buflen, 0);
+ if (ctx->errcode) {
+ ret |= BLOCK_ABORT;
+ goto out1;
+ }
+#endif
+ ctx->errcode = ext2fs_inline_data_ea_set(&data);
+ if (ctx->errcode)
+ ret |= BLOCK_ABORT;
+ }
+
+out1:
+ ext2fs_free_mem(&data.ea_data);
+out:
+ ctx->buf = old_buf;
+ ctx->buflen = old_buflen;
+ ctx->flags = old_flags;
+ ret &= ~(BLOCK_ABORT | BLOCK_INLINE_DATA_CHANGED);
+ return ret;
+}
+
+errcode_t ext2fs_inline_data_ea_remove(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_xattr_handle *handle;
+ errcode_t retval;
+
+ retval = ext2fs_xattrs_open(fs, ino, &handle);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_xattrs_read(handle);
+ if (retval)
+ goto err;
+
+ retval = ext2fs_xattr_remove(handle, "system.data");
+err:
+ (void) ext2fs_xattrs_close(&handle);
+ return retval;
+}
+
+static errcode_t ext2fs_inline_data_convert_dir(ext2_filsys fs, ext2_ino_t ino,
+ char *bbuf, char *ibuf, int size)
+{
+ struct ext2_dir_entry *dir, *dir2;
+ struct ext2_dir_entry_tail *t;
+ errcode_t retval;
+ int offset;
+ unsigned int rec_len;
+ int csum_size = 0;
+ int filetype = 0;
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dir_entry_tail);
+
+ /* Create '.' and '..' */
+ if (ext2fs_has_feature_filetype(fs->super))
+ filetype = EXT2_FT_DIR;
+
+ /*
+ * Set up entry for '.'
+ */
+ dir = (struct ext2_dir_entry *) bbuf;
+ dir->inode = ino;
+ ext2fs_dirent_set_name_len(dir, 1);
+ ext2fs_dirent_set_file_type(dir, filetype);
+ dir->name[0] = '.';
+ rec_len = (fs->blocksize - csum_size) - EXT2_DIR_REC_LEN(1);
+ dir->rec_len = EXT2_DIR_REC_LEN(1);
+
+ /*
+ * Set up entry for '..'
+ */
+ dir = (struct ext2_dir_entry *) (bbuf + dir->rec_len);
+ dir->rec_len = EXT2_DIR_REC_LEN(2);
+ dir->inode = ext2fs_le32_to_cpu(((__u32 *)ibuf)[0]);
+ ext2fs_dirent_set_name_len(dir, 2);
+ ext2fs_dirent_set_file_type(dir, filetype);
+ dir->name[0] = '.';
+ dir->name[1] = '.';
+
+ /*
+ * Adjust the last rec_len
+ */
+ offset = EXT2_DIR_REC_LEN(1) + EXT2_DIR_REC_LEN(2);
+ dir = (struct ext2_dir_entry *) (bbuf + offset);
+ memcpy(bbuf + offset, ibuf + EXT4_INLINE_DATA_DOTDOT_SIZE,
+ size - EXT4_INLINE_DATA_DOTDOT_SIZE);
+ size += EXT2_DIR_REC_LEN(1) + EXT2_DIR_REC_LEN(2) -
+ EXT4_INLINE_DATA_DOTDOT_SIZE;
+
+ do {
+ dir2 = dir;
+ retval = ext2fs_get_rec_len(fs, dir, &rec_len);
+ if (retval)
+ goto err;
+ offset += rec_len;
+ dir = (struct ext2_dir_entry *) (bbuf + offset);
+ } while (offset < size);
+ rec_len += fs->blocksize - csum_size - offset;
+ retval = ext2fs_set_rec_len(fs, rec_len, dir2);
+ if (retval)
+ goto err;
+
+ if (csum_size) {
+ t = EXT2_DIRENT_TAIL(bbuf, fs->blocksize);
+ ext2fs_initialize_dirent_tail(fs, t);
+ }
+
+err:
+ return retval;
+}
+
+static errcode_t
+ext2fs_inline_data_dir_expand(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, char *buf, size_t size)
+{
+ errcode_t retval;
+ blk64_t blk;
+ char *blk_buf;
+
+ retval = ext2fs_get_memzero(fs->blocksize, &blk_buf);
+ if (retval)
+ return retval;
+
+#ifdef WORDS_BIGENDIAN
+ retval = ext2fs_dirent_swab_in2(fs, buf + EXT4_INLINE_DATA_DOTDOT_SIZE,
+ size, 0);
+ if (retval)
+ goto errout;
+#endif
+
+ /* Adjust the rec_len */
+ retval = ext2fs_inline_data_convert_dir(fs, ino, blk_buf, buf, size);
+ if (retval)
+ goto errout;
+ /* Allocate a new block */
+ retval = ext2fs_new_block2(fs, 0, 0, &blk);
+ if (retval)
+ goto errout;
+ retval = ext2fs_write_dir_block4(fs, blk, blk_buf, 0, ino);
+ if (retval)
+ goto errout;
+
+ /* Update inode */
+ if (ext2fs_has_feature_extents(fs->super))
+ inode->i_flags |= EXT4_EXTENTS_FL;
+ inode->i_flags &= ~EXT4_INLINE_DATA_FL;
+ retval = ext2fs_iblk_add_blocks(fs, inode, 1);
+ if (retval)
+ goto errout;
+ inode->i_size = fs->blocksize;
+ retval = ext2fs_bmap2(fs, ino, inode, 0, BMAP_SET, 0, 0, &blk);
+ if (retval)
+ goto errout;
+ retval = ext2fs_write_inode(fs, ino, inode);
+ if (retval)
+ goto errout;
+ ext2fs_block_alloc_stats(fs, blk, +1);
+
+errout:
+ ext2fs_free_mem(&blk_buf);
+ return retval;
+}
+
+static errcode_t
+ext2fs_inline_data_file_expand(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode, char *buf, size_t size)
+{
+ ext2_file_t e2_file;
+ errcode_t retval;
+
+ /* Update inode */
+ memset(inode->i_block, 0, sizeof(inode->i_block));
+ if (ext2fs_has_feature_extents(fs->super)) {
+ ext2_extent_handle_t handle;
+
+ inode->i_flags &= ~EXT4_EXTENTS_FL;
+ retval = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (retval)
+ return retval;
+ ext2fs_extent_free(handle);
+ }
+ inode->i_flags &= ~EXT4_INLINE_DATA_FL;
+ inode->i_size = 0;
+ retval = ext2fs_write_inode(fs, ino, inode);
+ if (retval)
+ return retval;
+
+ /* Write out the block buffer */
+ retval = ext2fs_file_open(fs, ino, EXT2_FILE_WRITE, &e2_file);
+ if (retval)
+ return retval;
+ retval = ext2fs_file_write(e2_file, buf, size, 0);
+ ext2fs_file_close(e2_file);
+ return retval;
+}
+
+errcode_t ext2fs_inline_data_expand(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inode inode;
+ struct ext2_inline_data data;
+ errcode_t retval;
+ size_t inline_size;
+ char *inline_buf = 0;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+
+ if (!(inode.i_flags & EXT4_INLINE_DATA_FL))
+ return EXT2_ET_NO_INLINE_DATA;
+
+ data.fs = fs;
+ data.ino = ino;
+ retval = ext2fs_inline_data_ea_get(&data);
+ if (retval)
+ return retval;
+ inline_size = data.ea_size + EXT4_MIN_INLINE_DATA_SIZE;
+ retval = ext2fs_get_mem(inline_size, &inline_buf);
+ if (retval)
+ goto errout;
+
+ memcpy(inline_buf, (void *)inode.i_block, EXT4_MIN_INLINE_DATA_SIZE);
+ if (data.ea_size > 0) {
+ memcpy(inline_buf + EXT4_MIN_INLINE_DATA_SIZE,
+ data.ea_data, data.ea_size);
+ }
+
+ memset((void *)inode.i_block, 0, EXT4_MIN_INLINE_DATA_SIZE);
+ /*
+ * NOTE: We must do this write -> ea_remove -> read cycle here because
+ * removing the inline data EA can free the EA block, which is a change
+ * that our stack copy of the inode will never see. If that happens,
+ * we can end up with the EA block and lblk 0 pointing to the same
+ * pblk, which is bad news.
+ */
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ goto errout;
+ retval = ext2fs_inline_data_ea_remove(fs, ino);
+ if (retval)
+ goto errout;
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ goto errout;
+
+ if (LINUX_S_ISDIR(inode.i_mode)) {
+ retval = ext2fs_inline_data_dir_expand(fs, ino, &inode,
+ inline_buf, inline_size);
+ } else {
+ retval = ext2fs_inline_data_file_expand(fs, ino, &inode,
+ inline_buf, inline_size);
+ }
+
+errout:
+ if (inline_buf)
+ ext2fs_free_mem(&inline_buf);
+ ext2fs_free_mem(&data.ea_data);
+ return retval;
+}
+
+/*
+ * When caller uses this function to retrieve the inline data, it must
+ * allocate a buffer which has the size of inline data. The size of
+ * inline data can be know by ext2fs_inline_data_get_size().
+ */
+errcode_t ext2fs_inline_data_get(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ void *buf, size_t *size)
+{
+ struct ext2_inode inode_buf;
+ struct ext2_inline_data data;
+ errcode_t retval;
+
+ if (!inode) {
+ retval = ext2fs_read_inode(fs, ino, &inode_buf);
+ if (retval)
+ return retval;
+ inode = &inode_buf;
+ }
+
+ data.fs = fs;
+ data.ino = ino;
+ retval = ext2fs_inline_data_ea_get(&data);
+ if (retval)
+ return retval;
+
+ memcpy(buf, (void *)inode->i_block, EXT4_MIN_INLINE_DATA_SIZE);
+ if (data.ea_size > 0)
+ memcpy((char *) buf + EXT4_MIN_INLINE_DATA_SIZE,
+ data.ea_data, data.ea_size);
+
+ if (size)
+ *size = EXT4_MIN_INLINE_DATA_SIZE + data.ea_size;
+ ext2fs_free_mem(&data.ea_data);
+ return 0;
+}
+
+errcode_t ext2fs_inline_data_set(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ void *buf, size_t size)
+{
+ struct ext2_inode inode_buf;
+ struct ext2_inline_data data = {
+ .fs = fs,
+ .ino = ino,
+ };
+ errcode_t retval;
+ size_t free_ea_size, existing_size, free_inode_size;
+
+ if (!inode) {
+ retval = ext2fs_read_inode(fs, ino, &inode_buf);
+ if (retval)
+ return retval;
+ inode = &inode_buf;
+ }
+
+ if (size <= EXT4_MIN_INLINE_DATA_SIZE) {
+ memcpy((void *)inode->i_block, buf, size);
+ } else {
+ retval = ext2fs_xattr_inode_max_size(fs, ino, &free_ea_size);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_inline_data_size(fs, ino, &existing_size);
+ if (retval)
+ return retval;
+
+ if (existing_size < EXT4_MIN_INLINE_DATA_SIZE) {
+ free_inode_size = EXT4_MIN_INLINE_DATA_SIZE -
+ existing_size;
+ } else {
+ free_inode_size = 0;
+ }
+
+ if (size != existing_size &&
+ size > existing_size + free_ea_size + free_inode_size)
+ return EXT2_ET_INLINE_DATA_NO_SPACE;
+
+ memcpy((void *)inode->i_block, buf, EXT4_MIN_INLINE_DATA_SIZE);
+ if (size > EXT4_MIN_INLINE_DATA_SIZE)
+ data.ea_size = size - EXT4_MIN_INLINE_DATA_SIZE;
+ data.ea_data = (char *) buf + EXT4_MIN_INLINE_DATA_SIZE;
+ }
+ retval = ext2fs_write_inode(fs, ino, inode);
+ if (retval)
+ return retval;
+ return ext2fs_inline_data_ea_set(&data);
+}
+
+#ifdef DEBUG
+#include "e2p/e2p.h"
+
+/*
+ * The length of buffer is set to 64 because in inode's i_block member it only
+ * can save 60 bytes. Thus this value can let the data being saved in extra
+ * space.
+ */
+#define BUFF_SIZE (64)
+
+static errcode_t file_test(ext2_filsys fs)
+{
+ struct ext2_inode inode;
+ ext2_ino_t newfile;
+ errcode_t retval;
+ size_t size;
+ char *buf = 0, *cmpbuf = 0;
+
+ /* create a new file */
+ retval = ext2fs_new_inode(fs, 2, 010755, 0, &newfile);
+ if (retval) {
+ com_err("file_test", retval, "while allocating a new inode");
+ return 1;
+ }
+
+ memset(&inode, 0, sizeof(inode));
+ inode.i_flags |= EXT4_INLINE_DATA_FL;
+ inode.i_size = EXT4_MIN_INLINE_DATA_SIZE;
+ inode.i_mode = LINUX_S_IFREG;
+ retval = ext2fs_write_new_inode(fs, newfile, &inode);
+ if (retval) {
+ com_err("file_test", retval, "while writing a new inode");
+ return 1;
+ }
+
+ retval = ext2fs_inline_data_init(fs, newfile);
+ if (retval) {
+ com_err("file_test", retval, "while init 'system.data'");
+ return 1;
+ }
+
+ retval = ext2fs_inline_data_size(fs, newfile, &size);
+ if (retval) {
+ com_err("file_test", retval, "while getting size");
+ return 1;
+ }
+
+ if (size != EXT4_MIN_INLINE_DATA_SIZE) {
+ fprintf(stderr,
+ "tst_inline_data: size of inline data is wrong\n");
+ return 1;
+ }
+
+ ext2fs_get_mem(BUFF_SIZE, &buf);
+ memset(buf, 'a', BUFF_SIZE);
+ retval = ext2fs_inline_data_set(fs, newfile, 0, buf, BUFF_SIZE);
+ if (retval) {
+ com_err("file_test", retval,
+ "while setting inline data %s", buf);
+ goto err;
+ }
+
+ ext2fs_get_mem(BUFF_SIZE, &cmpbuf);
+ retval = ext2fs_inline_data_get(fs, newfile, 0, cmpbuf, &size);
+ if (retval) {
+ com_err("file_test", retval, "while getting inline data");
+ goto err;
+ }
+
+ if (size != BUFF_SIZE) {
+ fprintf(stderr,
+ "tst_inline_data: size %zu != buflen %u\n",
+ size, BUFF_SIZE);
+ retval = 1;
+ goto err;
+ }
+
+ if (memcmp(buf, cmpbuf, BUFF_SIZE)) {
+ fprintf(stderr, "tst_inline_data: buf != cmpbuf\n");
+ retval = 1;
+ goto err;
+ }
+
+ retval = ext2fs_punch(fs, newfile, 0, 0, 0, ~0ULL);
+ if (retval) {
+ com_err("file_test", retval, "while truncating inode");
+ goto err;
+ }
+
+ /* reload inode and check isize */
+ ext2fs_read_inode(fs, newfile, &inode);
+ if (inode.i_size != 0) {
+ fprintf(stderr, "tst_inline_data: i_size should be 0\n");
+ retval = 1;
+ }
+
+err:
+ if (cmpbuf)
+ ext2fs_free_mem(&cmpbuf);
+ if (buf)
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+static errcode_t dir_test(ext2_filsys fs)
+{
+ const char *dot_name = ".";
+ const char *stub_name = "stub";
+ const char *parent_name = "test";
+ ext2_ino_t parent, dir, tmp;
+ errcode_t retval;
+ char dirname[32];
+ int i;
+
+ retval = ext2fs_mkdir(fs, 11, 11, stub_name);
+ if (retval) {
+ com_err("dir_test", retval, "while creating %s dir", stub_name);
+ return retval;
+ }
+
+ retval = ext2fs_mkdir(fs, 11, 0, parent_name);
+ if (retval) {
+ com_err("dir_test", retval,
+ "while creating %s dir", parent_name);
+ return retval;
+ }
+
+ retval = ext2fs_lookup(fs, 11, parent_name, strlen(parent_name),
+ 0, &parent);
+ if (retval) {
+ com_err("dir_test", retval,
+ "while looking up %s dir", parent_name);
+ return retval;
+ }
+
+ retval = ext2fs_lookup(fs, parent, dot_name, strlen(dot_name),
+ 0, &tmp);
+ if (retval) {
+ com_err("dir_test", retval,
+ "while looking up %s dir", parent_name);
+ return retval;
+ }
+
+ if (parent != tmp) {
+ fprintf(stderr, "tst_inline_data: parent (%u) != tmp (%u)\n",
+ parent, tmp);
+ return 1;
+ }
+
+ for (i = 0, dir = 13; i < 4; i++, dir++) {
+ tmp = 0;
+ snprintf(dirname, sizeof(dirname), "%d", i);
+ retval = ext2fs_mkdir(fs, parent, 0, dirname);
+ if (retval) {
+ com_err("dir_test", retval,
+ "while creating %s dir", dirname);
+ return retval;
+ }
+
+ retval = ext2fs_lookup(fs, parent, dirname, strlen(dirname),
+ 0, &tmp);
+ if (retval) {
+ com_err("dir_test", retval,
+ "while looking up %s dir", parent_name);
+ return retval;
+ }
+
+ if (dir != tmp) {
+ fprintf(stderr,
+ "tst_inline_data: dir (%u) != tmp (%u)\n",
+ dir, tmp);
+ return 1;
+ }
+ }
+
+ snprintf(dirname, sizeof(dirname), "%d", i);
+ retval = ext2fs_mkdir(fs, parent, 0, dirname);
+ if (retval && retval != EXT2_ET_DIR_NO_SPACE) {
+ com_err("dir_test", retval, "while creating %s dir", dirname);
+ return retval;
+ }
+
+ retval = ext2fs_expand_dir(fs, parent);
+ if (retval) {
+ com_err("dir_test", retval, "while expanding %s dir", parent_name);
+ return retval;
+ }
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ ext2_filsys fs;
+ struct ext2_super_block param;
+ errcode_t retval;
+
+ /* setup */
+ initialize_ext2_error_table();
+
+ memset(&param, 0, sizeof(param));
+ ext2fs_blocks_count_set(&param, 32768);
+ param.s_inodes_count = 100;
+
+ param.s_feature_incompat |= EXT4_FEATURE_INCOMPAT_INLINE_DATA;
+ param.s_rev_level = EXT2_DYNAMIC_REV;
+ param.s_inode_size = 256;
+
+ retval = ext2fs_initialize("test fs", EXT2_FLAG_64BITS, &param,
+ test_io_manager, &fs);
+ if (retval) {
+ com_err("setup", retval,
+ "while initializing filesystem");
+ exit(1);
+ }
+
+ retval = ext2fs_allocate_tables(fs);
+ if (retval) {
+ com_err("setup", retval,
+ "while allocating tables for test filesystem");
+ exit(1);
+ }
+
+ /* initialize inode cache */
+ if (!fs->icache) {
+ ext2_ino_t first_ino = EXT2_FIRST_INO(fs->super);
+ int i;
+
+ /* we just want to init inode cache. So ignore error */
+ ext2fs_create_inode_cache(fs, 16);
+ if (!fs->icache) {
+ fprintf(stderr,
+ "tst_inline_data: init inode cache failed\n");
+ exit(1);
+ }
+
+ /* setup inode cache */
+ for (i = 0; i < fs->icache->cache_size; i++)
+ fs->icache->cache[i].ino = first_ino++;
+ }
+
+ /* test */
+ if (file_test(fs)) {
+ fprintf(stderr, "tst_inline_data(FILE): FAILED\n");
+ return 1;
+ }
+ printf("tst_inline_data(FILE): OK\n");
+
+ if (dir_test(fs)) {
+ fprintf(stderr, "tst_inline_data(DIR): FAILED\n");
+ return 1;
+ }
+ printf("tst_inline_data(DIR): OK\n");
+ ext2fs_free(fs);
+
+ return 0;
+}
+#endif
diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
new file mode 100644
index 0000000..957d5aa
--- /dev/null
+++ b/lib/ext2fs/inode.c
@@ -0,0 +1,1122 @@
+/*
+ * inode.c --- utility routines to read and write inodes
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+#include "e2image.h"
+
+#define IBLOCK_STATUS_CSUMS_OK 1
+#define IBLOCK_STATUS_INSANE 2
+#define SCAN_BLOCK_STATUS(scan) ((scan)->temp_buffer + (scan)->inode_size)
+
+struct ext2_struct_inode_scan {
+ errcode_t magic;
+ ext2_filsys fs;
+ ext2_ino_t current_inode;
+ blk64_t current_block;
+ dgrp_t current_group;
+ ext2_ino_t inodes_left;
+ blk_t blocks_left;
+ dgrp_t groups_left;
+ blk_t inode_buffer_blocks;
+ char * inode_buffer;
+ int inode_size;
+ char * ptr;
+ int bytes_left;
+ char *temp_buffer;
+ errcode_t (*done_group)(ext2_filsys fs,
+ ext2_inode_scan scan,
+ dgrp_t group,
+ void * priv_data);
+ void * done_group_data;
+ int bad_block_ptr;
+ int scan_flags;
+ int reserved[6];
+};
+
+/*
+ * This routine flushes the icache, if it exists.
+ */
+errcode_t ext2fs_flush_icache(ext2_filsys fs)
+{
+ unsigned i;
+
+ if (!fs->icache)
+ return 0;
+
+ for (i=0; i < fs->icache->cache_size; i++)
+ fs->icache->cache[i].ino = 0;
+
+ fs->icache->buffer_blk = 0;
+ return 0;
+}
+
+/*
+ * Free the inode cache structure
+ */
+void ext2fs_free_inode_cache(struct ext2_inode_cache *icache)
+{
+ unsigned i;
+
+ if (--icache->refcount)
+ return;
+ if (icache->buffer)
+ ext2fs_free_mem(&icache->buffer);
+ for (i = 0; i < icache->cache_size; i++)
+ ext2fs_free_mem(&icache->cache[i].inode);
+ if (icache->cache)
+ ext2fs_free_mem(&icache->cache);
+ icache->buffer_blk = 0;
+ ext2fs_free_mem(&icache);
+}
+
+errcode_t ext2fs_create_inode_cache(ext2_filsys fs, unsigned int cache_size)
+{
+ unsigned i;
+ errcode_t retval;
+
+ if (fs->icache)
+ return 0;
+ retval = ext2fs_get_mem(sizeof(struct ext2_inode_cache), &fs->icache);
+ if (retval)
+ return retval;
+
+ memset(fs->icache, 0, sizeof(struct ext2_inode_cache));
+ retval = ext2fs_get_mem(fs->blocksize, &fs->icache->buffer);
+ if (retval)
+ goto errout;
+
+ fs->icache->buffer_blk = 0;
+ fs->icache->cache_last = -1;
+ fs->icache->cache_size = cache_size;
+ fs->icache->refcount = 1;
+ retval = ext2fs_get_array(fs->icache->cache_size,
+ sizeof(struct ext2_inode_cache_ent),
+ &fs->icache->cache);
+ if (retval)
+ goto errout;
+
+ for (i = 0; i < fs->icache->cache_size; i++) {
+ retval = ext2fs_get_mem(EXT2_INODE_SIZE(fs->super),
+ &fs->icache->cache[i].inode);
+ if (retval)
+ goto errout;
+ }
+
+ ext2fs_flush_icache(fs);
+ return 0;
+errout:
+ ext2fs_free_inode_cache(fs->icache);
+ fs->icache = 0;
+ return retval;
+}
+
+errcode_t ext2fs_open_inode_scan(ext2_filsys fs, int buffer_blocks,
+ ext2_inode_scan *ret_scan)
+{
+ ext2_inode_scan scan;
+ errcode_t retval;
+ errcode_t (*save_get_blocks)(ext2_filsys f, ext2_ino_t ino, blk_t *blocks);
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ return EXT2_ET_EXTERNAL_JOURNAL_NOSUPP;
+
+ if (fs->blocksize < 1024)
+ return EXT2_FILSYS_CORRUPTED; /* Should never happen */
+
+ /*
+ * If fs->badblocks isn't set, then set it --- since the inode
+ * scanning functions require it.
+ */
+ if (fs->badblocks == 0) {
+ /*
+ * Temporarily save fs->get_blocks and set it to zero,
+ * for compatibility with old e2fsck's.
+ */
+ save_get_blocks = fs->get_blocks;
+ fs->get_blocks = 0;
+ retval = ext2fs_read_bb_inode(fs, &fs->badblocks);
+ if (retval && fs->badblocks) {
+ ext2fs_badblocks_list_free(fs->badblocks);
+ fs->badblocks = 0;
+ }
+ fs->get_blocks = save_get_blocks;
+ }
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_struct_inode_scan), &scan);
+ if (retval)
+ return retval;
+ memset(scan, 0, sizeof(struct ext2_struct_inode_scan));
+
+ scan->magic = EXT2_ET_MAGIC_INODE_SCAN;
+ scan->fs = fs;
+ scan->inode_size = EXT2_INODE_SIZE(fs->super);
+ scan->bytes_left = 0;
+ scan->current_group = 0;
+ scan->groups_left = fs->group_desc_count - 1;
+ scan->inode_buffer_blocks = buffer_blocks ? buffer_blocks :
+ EXT2_INODE_SCAN_DEFAULT_BUFFER_BLOCKS;
+ scan->current_block = ext2fs_inode_table_loc(scan->fs,
+ scan->current_group);
+ if (scan->current_block &&
+ ((scan->current_block < fs->super->s_first_data_block) ||
+ (scan->current_block + fs->inode_blocks_per_group - 1 >=
+ ext2fs_blocks_count(fs->super)))) {
+ ext2fs_free_mem(&scan);
+ return EXT2_ET_GDESC_BAD_INODE_TABLE;
+ }
+
+ scan->inodes_left = EXT2_INODES_PER_GROUP(scan->fs->super);
+ scan->blocks_left = scan->fs->inode_blocks_per_group;
+ if (ext2fs_has_group_desc_csum(fs)) {
+ __u32 unused = ext2fs_bg_itable_unused(fs, scan->current_group);
+ if (scan->inodes_left > unused)
+ scan->inodes_left -= unused;
+ else
+ scan->inodes_left = 0;
+ scan->blocks_left =
+ (scan->inodes_left +
+ (fs->blocksize / scan->inode_size - 1)) *
+ scan->inode_size / fs->blocksize;
+ }
+ retval = io_channel_alloc_buf(fs->io, scan->inode_buffer_blocks,
+ &scan->inode_buffer);
+ scan->done_group = 0;
+ scan->done_group_data = 0;
+ scan->bad_block_ptr = 0;
+ if (retval) {
+ ext2fs_free_mem(&scan);
+ return retval;
+ }
+ retval = ext2fs_get_mem(scan->inode_size + scan->inode_buffer_blocks,
+ &scan->temp_buffer);
+ if (retval) {
+ ext2fs_free_mem(&scan->inode_buffer);
+ ext2fs_free_mem(&scan);
+ return retval;
+ }
+ memset(SCAN_BLOCK_STATUS(scan), 0, scan->inode_buffer_blocks);
+ if (scan->fs->badblocks && scan->fs->badblocks->num)
+ scan->scan_flags |= EXT2_SF_CHK_BADBLOCKS;
+ if (ext2fs_has_group_desc_csum(fs))
+ scan->scan_flags |= EXT2_SF_DO_LAZY;
+ *ret_scan = scan;
+ return 0;
+}
+
+void ext2fs_close_inode_scan(ext2_inode_scan scan)
+{
+ if (!scan || (scan->magic != EXT2_ET_MAGIC_INODE_SCAN))
+ return;
+
+ ext2fs_free_mem(&scan->inode_buffer);
+ scan->inode_buffer = NULL;
+ ext2fs_free_mem(&scan->temp_buffer);
+ scan->temp_buffer = NULL;
+ ext2fs_free_mem(&scan);
+ return;
+}
+
+void ext2fs_set_inode_callback(ext2_inode_scan scan,
+ errcode_t (*done_group)(ext2_filsys fs,
+ ext2_inode_scan scan,
+ dgrp_t group,
+ void * priv_data),
+ void *done_group_data)
+{
+ if (!scan || (scan->magic != EXT2_ET_MAGIC_INODE_SCAN))
+ return;
+
+ scan->done_group = done_group;
+ scan->done_group_data = done_group_data;
+}
+
+int ext2fs_inode_scan_flags(ext2_inode_scan scan, int set_flags,
+ int clear_flags)
+{
+ int old_flags;
+
+ if (!scan || (scan->magic != EXT2_ET_MAGIC_INODE_SCAN))
+ return 0;
+
+ old_flags = scan->scan_flags;
+ scan->scan_flags &= ~clear_flags;
+ scan->scan_flags |= set_flags;
+ return old_flags;
+}
+
+/*
+ * This function is called by ext2fs_get_next_inode when it needs to
+ * get ready to read in a new blockgroup.
+ */
+static errcode_t get_next_blockgroup(ext2_inode_scan scan)
+{
+ ext2_filsys fs = scan->fs;
+
+ scan->current_group++;
+ scan->groups_left--;
+
+ scan->current_block = ext2fs_inode_table_loc(scan->fs,
+ scan->current_group);
+ scan->current_inode = scan->current_group *
+ EXT2_INODES_PER_GROUP(fs->super);
+
+ scan->bytes_left = 0;
+ scan->inodes_left = EXT2_INODES_PER_GROUP(fs->super);
+ scan->blocks_left = fs->inode_blocks_per_group;
+ if (ext2fs_has_group_desc_csum(fs)) {
+ __u32 unused = ext2fs_bg_itable_unused(fs, scan->current_group);
+ if (scan->inodes_left > unused)
+ scan->inodes_left -= unused;
+ else
+ scan->inodes_left = 0;
+ scan->blocks_left =
+ (scan->inodes_left +
+ (fs->blocksize / scan->inode_size - 1)) *
+ scan->inode_size / fs->blocksize;
+ }
+ if (scan->current_block &&
+ ((scan->current_block < fs->super->s_first_data_block) ||
+ (scan->current_block + fs->inode_blocks_per_group - 1 >=
+ ext2fs_blocks_count(fs->super))))
+ return EXT2_ET_GDESC_BAD_INODE_TABLE;
+ return 0;
+}
+
+errcode_t ext2fs_inode_scan_goto_blockgroup(ext2_inode_scan scan,
+ int group)
+{
+ scan->current_group = group - 1;
+ scan->groups_left = scan->fs->group_desc_count - group;
+ scan->bad_block_ptr = 0;
+ return get_next_blockgroup(scan);
+}
+
+/*
+ * This function is called by get_next_blocks() to check for bad
+ * blocks in the inode table.
+ *
+ * This function assumes that badblocks_list->list is sorted in
+ * increasing order.
+ */
+static errcode_t check_for_inode_bad_blocks(ext2_inode_scan scan,
+ blk64_t *num_blocks)
+{
+ blk64_t blk = scan->current_block;
+ badblocks_list bb = scan->fs->badblocks;
+
+ /*
+ * If the inode table is missing, then obviously there are no
+ * bad blocks. :-)
+ */
+ if (blk == 0)
+ return 0;
+
+ /* Make sure bad_block_ptr is still valid */
+ if (scan->bad_block_ptr >= bb->num) {
+ scan->scan_flags &= ~EXT2_SF_CHK_BADBLOCKS;
+ return 0;
+ }
+
+ /*
+ * If the current block is greater than the bad block listed
+ * in the bad block list, then advance the pointer until this
+ * is no longer the case. If we run out of bad blocks, then
+ * we don't need to do any more checking!
+ */
+ while (blk > bb->list[scan->bad_block_ptr]) {
+ if (++scan->bad_block_ptr >= bb->num) {
+ scan->scan_flags &= ~EXT2_SF_CHK_BADBLOCKS;
+ return 0;
+ }
+ }
+
+ /*
+ * If the current block is equal to the bad block listed in
+ * the bad block list, then handle that one block specially.
+ * (We could try to handle runs of bad blocks, but that
+ * only increases CPU efficiency by a small amount, at the
+ * expense of a huge expense of code complexity, and for an
+ * uncommon case at that.)
+ */
+ if (blk == bb->list[scan->bad_block_ptr]) {
+ scan->scan_flags |= EXT2_SF_BAD_INODE_BLK;
+ *num_blocks = 1;
+ if (++scan->bad_block_ptr >= bb->num)
+ scan->scan_flags &= ~EXT2_SF_CHK_BADBLOCKS;
+ return 0;
+ }
+
+ /*
+ * If there is a bad block in the range that we're about to
+ * read in, adjust the number of blocks to read so that we we
+ * don't read in the bad block. (Then the next block to read
+ * will be the bad block, which is handled in the above case.)
+ */
+ if ((blk + *num_blocks) > bb->list[scan->bad_block_ptr])
+ *num_blocks = (int) (bb->list[scan->bad_block_ptr] - blk);
+
+ return 0;
+}
+
+static int block_map_looks_insane(ext2_filsys fs,
+ struct ext2_inode_large *inode)
+{
+ unsigned int i, bad;
+
+ /* We're only interested in block mapped files, dirs, and symlinks */
+ if ((inode->i_flags & EXT4_INLINE_DATA_FL) ||
+ (inode->i_flags & EXT4_EXTENTS_FL))
+ return 0;
+ if (!LINUX_S_ISREG(inode->i_mode) &&
+ !LINUX_S_ISLNK(inode->i_mode) &&
+ !LINUX_S_ISDIR(inode->i_mode))
+ return 0;
+ if (LINUX_S_ISLNK(inode->i_mode) &&
+ EXT2_I_SIZE(inode) <= sizeof(inode->i_block))
+ return 0;
+
+ /* Unused inodes probably aren't insane */
+ if (inode->i_links_count == 0)
+ return 0;
+
+ /* See if more than half the block maps are insane */
+ for (i = 0, bad = 0; i < EXT2_N_BLOCKS; i++)
+ if (inode->i_block[i] != 0 &&
+ (inode->i_block[i] < fs->super->s_first_data_block ||
+ inode->i_block[i] >= ext2fs_blocks_count(fs->super)))
+ bad++;
+ return bad > EXT2_N_BLOCKS / 2;
+}
+
+static int extent_head_looks_insane(struct ext2_inode_large *inode)
+{
+ if (!(inode->i_flags & EXT4_EXTENTS_FL) ||
+ ext2fs_extent_header_verify(inode->i_block,
+ sizeof(inode->i_block)) == 0)
+ return 0;
+ return 1;
+}
+
+/*
+ * Check all the inodes that we just read into the buffer. Record what we
+ * find here -- currently, we can observe that all checksums are ok; more
+ * than half the inodes are insane; or no conclusions at all.
+ */
+static void check_inode_block_sanity(ext2_inode_scan scan, blk64_t num_blocks)
+{
+ ext2_ino_t ino, inodes_to_scan;
+ unsigned int badness, checksum_failures;
+ unsigned int inodes_in_buf, inodes_per_block;
+ char *p;
+ struct ext2_inode_large *inode;
+ char *block_status;
+ unsigned int blk, bad_csum;
+
+ if (!(scan->scan_flags & EXT2_SF_WARN_GARBAGE_INODES))
+ return;
+
+ inodes_to_scan = scan->inodes_left;
+ inodes_in_buf = num_blocks * scan->fs->blocksize / scan->inode_size;
+ if (inodes_to_scan > inodes_in_buf)
+ inodes_to_scan = inodes_in_buf;
+
+ p = (char *) scan->inode_buffer;
+ ino = scan->current_inode + 1;
+ checksum_failures = badness = 0;
+ block_status = SCAN_BLOCK_STATUS(scan);
+ memset(block_status, 0, scan->inode_buffer_blocks);
+ inodes_per_block = EXT2_INODES_PER_BLOCK(scan->fs->super);
+
+ if (inodes_per_block < 2)
+ return;
+
+#ifdef WORDS_BIGENDIAN
+ if (ext2fs_get_mem(EXT2_INODE_SIZE(scan->fs->super), &inode))
+ return;
+#endif
+
+ while (inodes_to_scan > 0) {
+ blk = (p - (char *)scan->inode_buffer) / scan->fs->blocksize;
+ bad_csum = ext2fs_inode_csum_verify(scan->fs, ino,
+ (struct ext2_inode_large *) p) == 0;
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_inode_full(scan->fs,
+ (struct ext2_inode_large *) inode,
+ (struct ext2_inode_large *) p,
+ 0, EXT2_INODE_SIZE(scan->fs->super));
+#else
+ inode = (struct ext2_inode_large *) p;
+#endif
+
+ /* Is this inode insane? */
+ if (bad_csum) {
+ checksum_failures++;
+ badness++;
+ } else if (extent_head_looks_insane(inode) ||
+ block_map_looks_insane(scan->fs, inode))
+ badness++;
+
+ /* If more than half are insane, declare the whole block bad */
+ if (badness > inodes_per_block / 2) {
+ unsigned int ino_adj;
+
+ block_status[blk] |= IBLOCK_STATUS_INSANE;
+ ino_adj = inodes_per_block -
+ ((ino - 1) % inodes_per_block);
+ if (ino_adj > inodes_to_scan)
+ ino_adj = inodes_to_scan;
+ inodes_to_scan -= ino_adj;
+ p += scan->inode_size * ino_adj;
+ ino += ino_adj;
+ checksum_failures = badness = 0;
+ continue;
+ }
+
+ if ((ino % inodes_per_block) == 0) {
+ if (checksum_failures == 0)
+ block_status[blk] |= IBLOCK_STATUS_CSUMS_OK;
+ checksum_failures = badness = 0;
+ }
+ inodes_to_scan--;
+ p += scan->inode_size;
+ ino++;
+ };
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_free_mem(&inode);
+#endif
+}
+
+/*
+ * This function is called by ext2fs_get_next_inode when it needs to
+ * read in more blocks from the current blockgroup's inode table.
+ */
+static errcode_t get_next_blocks(ext2_inode_scan scan)
+{
+ blk64_t num_blocks;
+ errcode_t retval;
+
+ /*
+ * Figure out how many blocks to read; we read at most
+ * inode_buffer_blocks, and perhaps less if there aren't that
+ * many blocks left to read.
+ */
+ num_blocks = scan->inode_buffer_blocks;
+ if (num_blocks > scan->blocks_left)
+ num_blocks = scan->blocks_left;
+
+ /*
+ * If the past block "read" was a bad block, then mark the
+ * left-over extra bytes as also being bad.
+ */
+ if (scan->scan_flags & EXT2_SF_BAD_INODE_BLK) {
+ if (scan->bytes_left)
+ scan->scan_flags |= EXT2_SF_BAD_EXTRA_BYTES;
+ scan->scan_flags &= ~EXT2_SF_BAD_INODE_BLK;
+ }
+
+ /*
+ * Do inode bad block processing, if necessary.
+ */
+ if (scan->scan_flags & EXT2_SF_CHK_BADBLOCKS) {
+ retval = check_for_inode_bad_blocks(scan, &num_blocks);
+ if (retval)
+ return retval;
+ }
+
+ if ((scan->scan_flags & EXT2_SF_BAD_INODE_BLK) ||
+ (scan->current_block == 0)) {
+ memset(scan->inode_buffer, 0,
+ (size_t) num_blocks * scan->fs->blocksize);
+ } else {
+ retval = io_channel_read_blk64(scan->fs->io,
+ scan->current_block,
+ (int) num_blocks,
+ scan->inode_buffer);
+ if (retval)
+ return EXT2_ET_NEXT_INODE_READ;
+ }
+ check_inode_block_sanity(scan, num_blocks);
+
+ scan->ptr = scan->inode_buffer;
+ scan->bytes_left = num_blocks * scan->fs->blocksize;
+
+ scan->blocks_left -= num_blocks;
+ if (scan->current_block)
+ scan->current_block += num_blocks;
+
+ return 0;
+}
+
+#if 0
+/*
+ * Returns 1 if the entire inode_buffer has a non-zero size and
+ * contains all zeros. (Not just deleted inodes, since that means
+ * that part of the inode table was used at one point; we want all
+ * zeros, which means that the inode table is pristine.)
+ */
+static inline int is_empty_scan(ext2_inode_scan scan)
+{
+ int i;
+
+ if (scan->bytes_left == 0)
+ return 0;
+
+ for (i=0; i < scan->bytes_left; i++)
+ if (scan->ptr[i])
+ return 0;
+ return 1;
+}
+#endif
+
+errcode_t ext2fs_get_next_inode_full(ext2_inode_scan scan, ext2_ino_t *ino,
+ struct ext2_inode *inode, int bufsize)
+{
+ errcode_t retval;
+ int extra_bytes = 0;
+ int length;
+ struct ext2_inode_large *iptr = (struct ext2_inode_large *)inode;
+ char *iblock_status;
+ unsigned int iblk;
+
+ EXT2_CHECK_MAGIC(scan, EXT2_ET_MAGIC_INODE_SCAN);
+ length = EXT2_INODE_SIZE(scan->fs->super);
+ iblock_status = SCAN_BLOCK_STATUS(scan);
+
+ /*
+ * Do we need to start reading a new block group?
+ */
+ if (scan->inodes_left <= 0) {
+ force_new_group:
+ if (scan->done_group) {
+ retval = (scan->done_group)
+ (scan->fs, scan, scan->current_group,
+ scan->done_group_data);
+ if (retval)
+ return retval;
+ }
+ if (scan->groups_left <= 0) {
+ *ino = 0;
+ return 0;
+ }
+ retval = get_next_blockgroup(scan);
+ if (retval)
+ return retval;
+ }
+ /*
+ * These checks are done outside the above if statement so
+ * they can be done for block group #0.
+ */
+ if ((scan->scan_flags & EXT2_SF_DO_LAZY) &&
+ (ext2fs_bg_flags_test(scan->fs, scan->current_group, EXT2_BG_INODE_UNINIT)
+ ))
+ goto force_new_group;
+ if (scan->inodes_left == 0)
+ goto force_new_group;
+ if (scan->current_block == 0) {
+ if (scan->scan_flags & EXT2_SF_SKIP_MISSING_ITABLE) {
+ goto force_new_group;
+ } else
+ return EXT2_ET_MISSING_INODE_TABLE;
+ }
+
+
+ /*
+ * Have we run out of space in the inode buffer? If so, we
+ * need to read in more blocks.
+ */
+ if (scan->bytes_left < scan->inode_size) {
+ if (scan->bytes_left)
+ memcpy(scan->temp_buffer, scan->ptr, scan->bytes_left);
+ extra_bytes = scan->bytes_left;
+
+ retval = get_next_blocks(scan);
+ if (retval)
+ return retval;
+#if 0
+ /*
+ * XXX test Need check for used inode somehow.
+ * (Note: this is hard.)
+ */
+ if (is_empty_scan(scan))
+ goto force_new_group;
+#endif
+ }
+
+ if (bufsize < length) {
+ retval = ext2fs_get_mem(length, &iptr);
+ if (retval)
+ return retval;
+ }
+
+ retval = 0;
+ iblk = scan->current_inode % EXT2_INODES_PER_GROUP(scan->fs->super) /
+ EXT2_INODES_PER_BLOCK(scan->fs->super) %
+ scan->inode_buffer_blocks;
+ if (extra_bytes) {
+ memcpy(scan->temp_buffer+extra_bytes, scan->ptr,
+ scan->inode_size - extra_bytes);
+ scan->ptr += scan->inode_size - extra_bytes;
+ scan->bytes_left -= scan->inode_size - extra_bytes;
+
+ /* Verify the inode checksum. */
+ if (!(iblock_status[iblk] & IBLOCK_STATUS_CSUMS_OK) &&
+ !(scan->fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_inode_csum_verify(scan->fs, scan->current_inode + 1,
+ (struct ext2_inode_large *)scan->temp_buffer))
+ retval = EXT2_ET_INODE_CSUM_INVALID;
+
+#ifdef WORDS_BIGENDIAN
+ memset(iptr, 0, length);
+ ext2fs_swap_inode_full(scan->fs,
+ (struct ext2_inode_large *) iptr,
+ (struct ext2_inode_large *) scan->temp_buffer,
+ 0, length);
+#else
+ memcpy(iptr, scan->temp_buffer, length);
+#endif
+ if (scan->scan_flags & EXT2_SF_BAD_EXTRA_BYTES)
+ retval = EXT2_ET_BAD_BLOCK_IN_INODE_TABLE;
+ scan->scan_flags &= ~EXT2_SF_BAD_EXTRA_BYTES;
+ } else {
+ /* Verify the inode checksum. */
+ if (!(iblock_status[iblk] & IBLOCK_STATUS_CSUMS_OK) &&
+ !(scan->fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_inode_csum_verify(scan->fs, scan->current_inode + 1,
+ (struct ext2_inode_large *)scan->ptr))
+ retval = EXT2_ET_INODE_CSUM_INVALID;
+
+#ifdef WORDS_BIGENDIAN
+ memset(iptr, 0, length);
+ ext2fs_swap_inode_full(scan->fs,
+ (struct ext2_inode_large *) iptr,
+ (struct ext2_inode_large *) scan->ptr,
+ 0, length);
+#else
+ memcpy(iptr, scan->ptr, length);
+#endif
+ scan->ptr += scan->inode_size;
+ scan->bytes_left -= scan->inode_size;
+ if (scan->scan_flags & EXT2_SF_BAD_INODE_BLK)
+ retval = EXT2_ET_BAD_BLOCK_IN_INODE_TABLE;
+ }
+ if ((iblock_status[iblk] & IBLOCK_STATUS_INSANE) &&
+ (retval == 0 || retval == EXT2_ET_INODE_CSUM_INVALID))
+ retval = EXT2_ET_INODE_IS_GARBAGE;
+
+ scan->inodes_left--;
+ scan->current_inode++;
+ *ino = scan->current_inode;
+ if (iptr != (struct ext2_inode_large *)inode) {
+ memcpy(inode, iptr, bufsize);
+ ext2fs_free_mem(&iptr);
+ }
+ return retval;
+}
+
+errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ext2_ino_t *ino,
+ struct ext2_inode *inode)
+{
+ return ext2fs_get_next_inode_full(scan, ino, inode,
+ sizeof(struct ext2_inode));
+}
+
+/*
+ * Functions to read and write a single inode.
+ */
+errcode_t ext2fs_read_inode2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode, int bufsize,
+ int flags)
+{
+ blk64_t block_nr;
+ dgrp_t group;
+ unsigned long block, offset;
+ char *ptr;
+ errcode_t retval;
+ unsigned i;
+ int clen, inodes_per_block;
+ io_channel io;
+ int length = EXT2_INODE_SIZE(fs->super);
+ struct ext2_inode_large *iptr;
+ int cache_slot, fail_csum;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ return EXT2_ET_EXTERNAL_JOURNAL_NOSUPP;
+
+ if (fs->blocksize < 1024)
+ return EXT2_FILSYS_CORRUPTED; /* Should never happen */
+
+ /* Check to see if user has an override function */
+ if (fs->read_inode &&
+ ((bufsize == sizeof(struct ext2_inode)) ||
+ (EXT2_INODE_SIZE(fs->super) == sizeof(struct ext2_inode)))) {
+ retval = (fs->read_inode)(fs, ino, inode);
+ if (retval != EXT2_ET_CALLBACK_NOTHANDLED)
+ return retval;
+ }
+ if ((ino == 0) || (ino > fs->super->s_inodes_count))
+ return EXT2_ET_BAD_INODE_NUM;
+ /* Create inode cache if not present */
+ if (!fs->icache) {
+ retval = ext2fs_create_inode_cache(fs, 4);
+ if (retval)
+ return retval;
+ }
+ /* Check to see if it's in the inode cache */
+ for (i = 0; i < fs->icache->cache_size; i++) {
+ if (fs->icache->cache[i].ino == ino) {
+ memcpy(inode, fs->icache->cache[i].inode,
+ (bufsize > length) ? length : bufsize);
+ return 0;
+ }
+ }
+ if (fs->flags & EXT2_FLAG_IMAGE_FILE) {
+ inodes_per_block = fs->blocksize / EXT2_INODE_SIZE(fs->super);
+ block_nr = ext2fs_le32_to_cpu(fs->image_header->offset_inode) / fs->blocksize;
+ block_nr += (ino - 1) / inodes_per_block;
+ offset = ((ino - 1) % inodes_per_block) *
+ EXT2_INODE_SIZE(fs->super);
+ io = fs->image_io;
+ } else {
+ group = (ino - 1) / EXT2_INODES_PER_GROUP(fs->super);
+ if (group > fs->group_desc_count)
+ return EXT2_ET_BAD_INODE_NUM;
+ offset = ((ino - 1) % EXT2_INODES_PER_GROUP(fs->super)) *
+ EXT2_INODE_SIZE(fs->super);
+ block = offset >> EXT2_BLOCK_SIZE_BITS(fs->super);
+ block_nr = ext2fs_inode_table_loc(fs, group);
+ if (!block_nr)
+ return EXT2_ET_MISSING_INODE_TABLE;
+ if ((block_nr < fs->super->s_first_data_block) ||
+ (block_nr + fs->inode_blocks_per_group - 1 >=
+ ext2fs_blocks_count(fs->super)))
+ return EXT2_ET_GDESC_BAD_INODE_TABLE;
+ block_nr += block;
+ io = fs->io;
+ }
+ offset &= (EXT2_BLOCK_SIZE(fs->super) - 1);
+
+ cache_slot = (fs->icache->cache_last + 1) % fs->icache->cache_size;
+ iptr = (struct ext2_inode_large *)fs->icache->cache[cache_slot].inode;
+
+ ptr = (char *) iptr;
+ while (length) {
+ clen = length;
+ if ((offset + length) > fs->blocksize)
+ clen = fs->blocksize - offset;
+
+ if (block_nr != fs->icache->buffer_blk) {
+ retval = io_channel_read_blk64(io, block_nr, 1,
+ fs->icache->buffer);
+ if (retval)
+ return retval;
+ fs->icache->buffer_blk = block_nr;
+ }
+
+ memcpy(ptr, ((char *) fs->icache->buffer) + (unsigned) offset,
+ clen);
+
+ offset = 0;
+ length -= clen;
+ ptr += clen;
+ block_nr++;
+ }
+ length = EXT2_INODE_SIZE(fs->super);
+
+ /* Verify the inode checksum. */
+ fail_csum = !ext2fs_inode_csum_verify(fs, ino, iptr);
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_inode_full(fs, (struct ext2_inode_large *) iptr,
+ (struct ext2_inode_large *) iptr,
+ 0, length);
+#endif
+
+ /* Update the inode cache bookkeeping */
+ if (!fail_csum) {
+ fs->icache->cache_last = cache_slot;
+ fs->icache->cache[cache_slot].ino = ino;
+ }
+ memcpy(inode, iptr, (bufsize > length) ? length : bufsize);
+
+ if (!(fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !(flags & READ_INODE_NOCSUM) && fail_csum)
+ return EXT2_ET_INODE_CSUM_INVALID;
+
+ return 0;
+}
+
+errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode, int bufsize)
+{
+ return ext2fs_read_inode2(fs, ino, inode, bufsize, 0);
+}
+
+errcode_t ext2fs_read_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode)
+{
+ return ext2fs_read_inode2(fs, ino, inode,
+ sizeof(struct ext2_inode), 0);
+}
+
+errcode_t ext2fs_write_inode2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode, int bufsize,
+ int flags)
+{
+ blk64_t block_nr;
+ dgrp_t group;
+ unsigned long block, offset;
+ errcode_t retval = 0;
+ struct ext2_inode_large *w_inode;
+ char *ptr;
+ unsigned i;
+ int clen;
+ int length = EXT2_INODE_SIZE(fs->super);
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ return EXT2_ET_EXTERNAL_JOURNAL_NOSUPP;
+
+ /* Check to see if user provided an override function */
+ if (fs->write_inode) {
+ retval = (fs->write_inode)(fs, ino, inode);
+ if (retval != EXT2_ET_CALLBACK_NOTHANDLED)
+ return retval;
+ }
+
+ if ((ino == 0) || (ino > fs->super->s_inodes_count))
+ return EXT2_ET_BAD_INODE_NUM;
+
+ /* Prepare our shadow buffer for read/modify/byteswap/write */
+ retval = ext2fs_get_mem(length, &w_inode);
+ if (retval)
+ return retval;
+
+ if (bufsize < length) {
+ retval = ext2fs_read_inode2(fs, ino,
+ (struct ext2_inode *)w_inode,
+ length, READ_INODE_NOCSUM);
+ if (retval)
+ goto errout;
+ }
+
+ /* Check to see if the inode cache needs to be updated */
+ if (fs->icache) {
+ for (i=0; i < fs->icache->cache_size; i++) {
+ if (fs->icache->cache[i].ino == ino) {
+ memcpy(fs->icache->cache[i].inode, inode,
+ (bufsize > length) ? length : bufsize);
+ break;
+ }
+ }
+ } else {
+ retval = ext2fs_create_inode_cache(fs, 4);
+ if (retval)
+ goto errout;
+ }
+ memcpy(w_inode, inode, (bufsize > length) ? length : bufsize);
+
+ if (!(fs->flags & EXT2_FLAG_RW)) {
+ retval = EXT2_ET_RO_FILSYS;
+ goto errout;
+ }
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_inode_full(fs, w_inode, w_inode, 1, length);
+#endif
+
+ if ((flags & WRITE_INODE_NOCSUM) == 0) {
+ retval = ext2fs_inode_csum_set(fs, ino, w_inode);
+ if (retval)
+ goto errout;
+ }
+
+ group = (ino - 1) / EXT2_INODES_PER_GROUP(fs->super);
+ offset = ((ino - 1) % EXT2_INODES_PER_GROUP(fs->super)) *
+ EXT2_INODE_SIZE(fs->super);
+ block = offset >> EXT2_BLOCK_SIZE_BITS(fs->super);
+ block_nr = ext2fs_inode_table_loc(fs, (unsigned) group);
+ if (!block_nr) {
+ retval = EXT2_ET_MISSING_INODE_TABLE;
+ goto errout;
+ }
+ if ((block_nr < fs->super->s_first_data_block) ||
+ (block_nr + fs->inode_blocks_per_group - 1 >=
+ ext2fs_blocks_count(fs->super))) {
+ retval = EXT2_ET_GDESC_BAD_INODE_TABLE;
+ goto errout;
+ }
+ block_nr += block;
+
+ offset &= (EXT2_BLOCK_SIZE(fs->super) - 1);
+
+ ptr = (char *) w_inode;
+
+ while (length) {
+ clen = length;
+ if ((offset + length) > fs->blocksize)
+ clen = fs->blocksize - offset;
+
+ if (fs->icache->buffer_blk != block_nr) {
+ retval = io_channel_read_blk64(fs->io, block_nr, 1,
+ fs->icache->buffer);
+ if (retval)
+ goto errout;
+ fs->icache->buffer_blk = block_nr;
+ }
+
+
+ memcpy((char *) fs->icache->buffer + (unsigned) offset,
+ ptr, clen);
+
+ retval = io_channel_write_blk64(fs->io, block_nr, 1,
+ fs->icache->buffer);
+ if (retval)
+ goto errout;
+
+ offset = 0;
+ ptr += clen;
+ length -= clen;
+ block_nr++;
+ }
+
+ fs->flags |= EXT2_FLAG_CHANGED;
+errout:
+ ext2fs_free_mem(&w_inode);
+ return retval;
+}
+
+errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode, int bufsize)
+{
+ return ext2fs_write_inode2(fs, ino, inode, bufsize, 0);
+}
+
+errcode_t ext2fs_write_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ return ext2fs_write_inode2(fs, ino, inode,
+ sizeof(struct ext2_inode), 0);
+}
+
+/*
+ * This function should be called when writing a new inode. It makes
+ * sure that extra part of large inodes is initialized properly.
+ */
+errcode_t ext2fs_write_new_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ struct ext2_inode *buf;
+ int size = EXT2_INODE_SIZE(fs->super);
+ struct ext2_inode_large *large_inode;
+ errcode_t retval;
+ __u32 t = fs->now ? fs->now : time(NULL);
+
+ if (!inode->i_ctime)
+ inode->i_ctime = t;
+ if (!inode->i_mtime)
+ inode->i_mtime = t;
+ if (!inode->i_atime)
+ inode->i_atime = t;
+
+ if (size == sizeof(struct ext2_inode))
+ return ext2fs_write_inode_full(fs, ino, inode,
+ sizeof(struct ext2_inode));
+
+ buf = malloc(size);
+ if (!buf)
+ return ENOMEM;
+
+ memset(buf, 0, size);
+ *buf = *inode;
+
+ large_inode = (struct ext2_inode_large *) buf;
+ large_inode->i_extra_isize = sizeof(struct ext2_inode_large) -
+ EXT2_GOOD_OLD_INODE_SIZE;
+ if (!large_inode->i_crtime)
+ large_inode->i_crtime = t;
+
+ retval = ext2fs_write_inode_full(fs, ino, buf, size);
+ free(buf);
+ return retval;
+}
+
+
+errcode_t ext2fs_get_blocks(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks)
+{
+ struct ext2_inode inode;
+ int i;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ino > fs->super->s_inodes_count)
+ return EXT2_ET_BAD_INODE_NUM;
+
+ if (fs->get_blocks) {
+ if (!(*fs->get_blocks)(fs, ino, blocks))
+ return 0;
+ }
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+ for (i=0; i < EXT2_N_BLOCKS; i++)
+ blocks[i] = inode.i_block[i];
+ return 0;
+}
+
+errcode_t ext2fs_check_directory(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inode inode;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (ino > fs->super->s_inodes_count)
+ return EXT2_ET_BAD_INODE_NUM;
+
+ if (fs->check_directory) {
+ retval = (fs->check_directory)(fs, ino);
+ if (retval != EXT2_ET_CALLBACK_NOTHANDLED)
+ return retval;
+ }
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+ if (!LINUX_S_ISDIR(inode.i_mode))
+ return EXT2_ET_NO_DIRECTORY;
+ return 0;
+}
+
diff --git a/lib/ext2fs/inode_io.c b/lib/ext2fs/inode_io.c
new file mode 100644
index 0000000..d7474a6
--- /dev/null
+++ b/lib/ext2fs/inode_io.c
@@ -0,0 +1,290 @@
+/*
+ * inode_io.c --- This is allows an inode in an ext2 filesystem image
+ * to be accessed via the I/O manager interface.
+ *
+ * Copyright (C) 2002 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+
+struct inode_private_data {
+ int magic;
+ char name[32];
+ ext2_file_t file;
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ int flags;
+ struct inode_private_data *next;
+};
+
+#define CHANNEL_HAS_INODE 0x8000
+
+static struct inode_private_data *top_intern;
+static int ino_unique = 0;
+
+static errcode_t inode_open(const char *name, int flags, io_channel *channel);
+static errcode_t inode_close(io_channel channel);
+static errcode_t inode_set_blksize(io_channel channel, int blksize);
+static errcode_t inode_read_blk(io_channel channel, unsigned long block,
+ int count, void *data);
+static errcode_t inode_write_blk(io_channel channel, unsigned long block,
+ int count, const void *data);
+static errcode_t inode_flush(io_channel channel);
+static errcode_t inode_write_byte(io_channel channel, unsigned long offset,
+ int size, const void *data);
+static errcode_t inode_read_blk64(io_channel channel,
+ unsigned long long block, int count, void *data);
+static errcode_t inode_write_blk64(io_channel channel,
+ unsigned long long block, int count, const void *data);
+
+static struct struct_io_manager struct_inode_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Inode I/O Manager",
+ .open = inode_open,
+ .close = inode_close,
+ .set_blksize = inode_set_blksize,
+ .read_blk = inode_read_blk,
+ .write_blk = inode_write_blk,
+ .flush = inode_flush,
+ .write_byte = inode_write_byte,
+ .read_blk64 = inode_read_blk64,
+ .write_blk64 = inode_write_blk64
+};
+
+io_manager inode_io_manager = &struct_inode_manager;
+
+errcode_t ext2fs_inode_io_intern2(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char **name)
+{
+ struct inode_private_data *data;
+ errcode_t retval;
+
+ if ((retval = ext2fs_get_mem(sizeof(struct inode_private_data),
+ &data)))
+ return retval;
+ data->magic = EXT2_ET_MAGIC_INODE_IO_CHANNEL;
+ sprintf(data->name, "%u:%d", ino, ino_unique++);
+ data->file = 0;
+ data->fs = fs;
+ data->ino = ino;
+ data->flags = 0;
+ if (inode) {
+ memcpy(&data->inode, inode, sizeof(struct ext2_inode));
+ data->flags |= CHANNEL_HAS_INODE;
+ }
+ data->next = top_intern;
+ top_intern = data;
+ *name = data->name;
+ return 0;
+}
+
+errcode_t ext2fs_inode_io_intern(ext2_filsys fs, ext2_ino_t ino,
+ char **name)
+{
+ return ext2fs_inode_io_intern2(fs, ino, NULL, name);
+}
+
+
+static errcode_t inode_open(const char *name, int flags, io_channel *channel)
+{
+ io_channel io = NULL;
+ struct inode_private_data *prev, *data = NULL;
+ errcode_t retval;
+ int open_flags;
+
+ if (name == 0)
+ return EXT2_ET_BAD_DEVICE_NAME;
+
+ for (data = top_intern, prev = NULL; data;
+ prev = data, data = data->next)
+ if (strcmp(name, data->name) == 0)
+ break;
+ if (!data)
+ return ENOENT;
+ if (prev)
+ prev->next = data->next;
+ else
+ top_intern = data->next;
+
+ retval = ext2fs_get_mem(sizeof(struct struct_io_channel), &io);
+ if (retval)
+ goto cleanup;
+ memset(io, 0, sizeof(struct struct_io_channel));
+
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ io->manager = inode_io_manager;
+ retval = ext2fs_get_mem(strlen(name)+1, &io->name);
+ if (retval)
+ goto cleanup;
+
+ strcpy(io->name, name);
+ io->private_data = data;
+ io->block_size = 1024;
+ io->read_error = 0;
+ io->write_error = 0;
+ io->refcount = 1;
+
+ open_flags = (flags & IO_FLAG_RW) ? EXT2_FILE_WRITE : 0;
+ retval = ext2fs_file_open2(data->fs, data->ino,
+ (data->flags & CHANNEL_HAS_INODE) ?
+ &data->inode : 0, open_flags,
+ &data->file);
+ if (retval)
+ goto cleanup;
+
+ *channel = io;
+ return 0;
+
+cleanup:
+ if (io && io->name)
+ ext2fs_free_mem(&io->name);
+ if (data)
+ ext2fs_free_mem(&data);
+ if (io)
+ ext2fs_free_mem(&io);
+ return retval;
+}
+
+static errcode_t inode_close(io_channel channel)
+{
+ struct inode_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct inode_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
+
+ if (--channel->refcount > 0)
+ return 0;
+
+ retval = ext2fs_file_close(data->file);
+
+ ext2fs_free_mem(&channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem(&channel->name);
+ ext2fs_free_mem(&channel);
+ return retval;
+}
+
+static errcode_t inode_set_blksize(io_channel channel, int blksize)
+{
+ struct inode_private_data *data;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct inode_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
+
+ channel->block_size = blksize;
+ return 0;
+}
+
+
+static errcode_t inode_read_blk64(io_channel channel,
+ unsigned long long block, int count, void *buf)
+{
+ struct inode_private_data *data;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct inode_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
+
+ if ((retval = ext2fs_file_llseek(data->file,
+ (ext2_off64_t)(block * channel->block_size),
+ EXT2_SEEK_SET, 0)))
+ return retval;
+
+ count = (count < 0) ? -count : (count * channel->block_size);
+
+ return ext2fs_file_read(data->file, buf, count, 0);
+}
+
+static errcode_t inode_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ return inode_read_blk64(channel, block, count, buf);
+}
+
+static errcode_t inode_write_blk64(io_channel channel,
+ unsigned long long block, int count, const void *buf)
+{
+ struct inode_private_data *data;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct inode_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
+
+ if ((retval = ext2fs_file_llseek(data->file,
+ (ext2_off64_t) (block * channel->block_size),
+ EXT2_SEEK_SET, 0)))
+ return retval;
+
+ count = (count < 0) ? -count : (count * channel->block_size);
+
+ return ext2fs_file_write(data->file, buf, count, 0);
+}
+
+static errcode_t inode_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ return inode_write_blk64(channel, block, count, buf);
+}
+
+static errcode_t inode_write_byte(io_channel channel, unsigned long offset,
+ int size, const void *buf)
+{
+ struct inode_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct inode_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
+
+ if ((retval = ext2fs_file_lseek(data->file, offset,
+ EXT2_SEEK_SET, 0)))
+ return retval;
+
+ return ext2fs_file_write(data->file, buf, size, 0);
+}
+
+/*
+ * Flush data buffers to disk.
+ */
+static errcode_t inode_flush(io_channel channel)
+{
+ struct inode_private_data *data;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct inode_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
+
+ return ext2fs_file_flush(data->file);
+}
+
diff --git a/lib/ext2fs/io_manager.c b/lib/ext2fs/io_manager.c
new file mode 100644
index 0000000..dca6af0
--- /dev/null
+++ b/lib/ext2fs/io_manager.c
@@ -0,0 +1,152 @@
+/*
+ * io_manager.c --- the I/O manager abstraction
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+errcode_t io_channel_set_options(io_channel channel, const char *opts)
+{
+ errcode_t retval = 0;
+ char *next, *ptr, *options, *arg;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+
+ if (!opts)
+ return 0;
+
+ if (!channel->manager->set_option)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ options = malloc(strlen(opts)+1);
+ if (!options)
+ return EXT2_ET_NO_MEMORY;
+ strcpy(options, opts);
+ ptr = options;
+
+ while (ptr && *ptr) {
+ next = strchr(ptr, '&');
+ if (next)
+ *next++ = 0;
+
+ arg = strchr(ptr, '=');
+ if (arg)
+ *arg++ = 0;
+
+ retval = (channel->manager->set_option)(channel, ptr, arg);
+ if (retval)
+ break;
+ ptr = next;
+ }
+ free(options);
+ return retval;
+}
+
+errcode_t io_channel_write_byte(io_channel channel, unsigned long offset,
+ int count, const void *data)
+{
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+
+ if (channel->manager->write_byte)
+ return channel->manager->write_byte(channel, offset,
+ count, data);
+
+ return EXT2_ET_UNIMPLEMENTED;
+}
+
+errcode_t io_channel_read_blk64(io_channel channel, unsigned long long block,
+ int count, void *data)
+{
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+
+ if (channel->manager->read_blk64)
+ return (channel->manager->read_blk64)(channel, block,
+ count, data);
+
+ if ((block >> 32) != 0)
+ return EXT2_ET_IO_CHANNEL_NO_SUPPORT_64;
+
+ return (channel->manager->read_blk)(channel, (unsigned long) block,
+ count, data);
+}
+
+errcode_t io_channel_write_blk64(io_channel channel, unsigned long long block,
+ int count, const void *data)
+{
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+
+ if (channel->manager->write_blk64)
+ return (channel->manager->write_blk64)(channel, block,
+ count, data);
+
+ if ((block >> 32) != 0)
+ return EXT2_ET_IO_CHANNEL_NO_SUPPORT_64;
+
+ return (channel->manager->write_blk)(channel, (unsigned long) block,
+ count, data);
+}
+
+errcode_t io_channel_discard(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+
+ if (channel->manager->discard)
+ return (channel->manager->discard)(channel, block, count);
+
+ return EXT2_ET_UNIMPLEMENTED;
+}
+
+errcode_t io_channel_zeroout(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+
+ if (channel->manager->zeroout)
+ return (channel->manager->zeroout)(channel, block, count);
+
+ return EXT2_ET_UNIMPLEMENTED;
+}
+
+errcode_t io_channel_alloc_buf(io_channel io, int count, void *ptr)
+{
+ size_t size;
+
+ if (count == 0)
+ size = io->block_size;
+ else if (count > 0)
+ size = io->block_size * count;
+ else
+ size = -count;
+
+ if (io->align > 0) {
+ if ((unsigned) io->align > size)
+ size = io->align;
+ return ext2fs_get_memalign(size, io->align, ptr);
+ } else
+ return ext2fs_get_mem(size, ptr);
+}
+
+errcode_t io_channel_cache_readahead(io_channel io, unsigned long long block,
+ unsigned long long count)
+{
+ if (!io->manager->cache_readahead)
+ return EXT2_ET_OP_NOT_SUPPORTED;
+
+ return io->manager->cache_readahead(io, block, count);
+}
diff --git a/lib/ext2fs/irel.h b/lib/ext2fs/irel.h
new file mode 100644
index 0000000..23741ba
--- /dev/null
+++ b/lib/ext2fs/irel.h
@@ -0,0 +1,114 @@
+/*
+ * irel.h
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+struct ext2_inode_reference {
+ blk64_t block;
+ __u16 offset;
+};
+
+struct ext2_inode_relocate_entry {
+ ext2_ino_t new;
+ ext2_ino_t orig;
+ __u16 flags;
+ __u16 max_refs;
+};
+
+typedef struct ext2_inode_relocation_table *ext2_irel;
+
+struct ext2_inode_relocation_table {
+ __u32 magic;
+ char *name;
+ ext2_ino_t current;
+ void *priv_data;
+
+ /*
+ * Add an inode relocation entry.
+ */
+ errcode_t (*put)(ext2_irel irel, ext2_ino_t old,
+ struct ext2_inode_relocate_entry *ent);
+ /*
+ * Get an inode relocation entry.
+ */
+ errcode_t (*get)(ext2_irel irel, ext2_ino_t old,
+ struct ext2_inode_relocate_entry *ent);
+
+ /*
+ * Get an inode relocation entry by its original inode number
+ */
+ errcode_t (*get_by_orig)(ext2_irel irel, ext2_ino_t orig, ext2_ino_t *old,
+ struct ext2_inode_relocate_entry *ent);
+
+ /*
+ * Initialize for iterating over the inode relocation entries.
+ */
+ errcode_t (*start_iter)(ext2_irel irel);
+
+ /*
+ * The iterator function for the inode relocation entries.
+ * Returns an inode number of 0 when out of entries.
+ */
+ errcode_t (*next)(ext2_irel irel, ext2_ino_t *old,
+ struct ext2_inode_relocate_entry *ent);
+
+ /*
+ * Add an inode reference (i.e., note the fact that a
+ * particular block/offset contains a reference to an inode)
+ */
+ errcode_t (*add_ref)(ext2_irel irel, ext2_ino_t ino,
+ struct ext2_inode_reference *ref);
+
+ /*
+ * Initialize for iterating over the inode references for a
+ * particular inode.
+ */
+ errcode_t (*start_iter_ref)(ext2_irel irel, ext2_ino_t ino);
+
+ /*
+ * The iterator function for the inode references for an
+ * inode. The references for only one inode can be iterator
+ * over at a time, as the iterator state is stored in ext2_irel.
+ */
+ errcode_t (*next_ref)(ext2_irel irel,
+ struct ext2_inode_reference *ref);
+
+ /*
+ * Move the inode relocation table from one inode number to
+ * another. Note that the inode references also must move.
+ */
+ errcode_t (*move)(ext2_irel irel, ext2_ino_t old, ext2_ino_t new);
+
+ /*
+ * Remove an inode relocation entry, along with all of the
+ * inode references.
+ */
+ errcode_t (*delete)(ext2_irel irel, ext2_ino_t old);
+
+ /*
+ * Free the inode relocation table.
+ */
+ errcode_t (*free)(ext2_irel irel);
+};
+
+errcode_t ext2fs_irel_memarray_create(char *name, ext2_ino_t max_inode,
+ ext2_irel *irel);
+
+#define ext2fs_irel_put(irel, old, ent) ((irel)->put((irel), old, ent))
+#define ext2fs_irel_get(irel, old, ent) ((irel)->get((irel), old, ent))
+#define ext2fs_irel_get_by_orig(irel, orig, old, ent) \
+ ((irel)->get_by_orig((irel), orig, old, ent))
+#define ext2fs_irel_start_iter(irel) ((irel)->start_iter((irel)))
+#define ext2fs_irel_next(irel, old, ent) ((irel)->next((irel), old, ent))
+#define ext2fs_irel_add_ref(irel, ino, ref) ((irel)->add_ref((irel), ino, ref))
+#define ext2fs_irel_start_iter_ref(irel, ino) ((irel)->start_iter_ref((irel), ino))
+#define ext2fs_irel_next_ref(irel, ref) ((irel)->next_ref((irel), ref))
+#define ext2fs_irel_move(irel, old, new) ((irel)->move((irel), old, new))
+#define ext2fs_irel_delete(irel, old) ((irel)->delete((irel), old))
+#define ext2fs_irel_free(irel) ((irel)->free((irel)))
diff --git a/lib/ext2fs/irel_ma.c b/lib/ext2fs/irel_ma.c
new file mode 100644
index 0000000..c64b7e7
--- /dev/null
+++ b/lib/ext2fs/irel_ma.c
@@ -0,0 +1,377 @@
+/*
+ * irel_ma.c
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "irel.h"
+
+static errcode_t ima_put(ext2_irel irel, ext2_ino_t old,
+ struct ext2_inode_relocate_entry *ent);
+static errcode_t ima_get(ext2_irel irel, ext2_ino_t old,
+ struct ext2_inode_relocate_entry *ent);
+static errcode_t ima_get_by_orig(ext2_irel irel, ext2_ino_t orig, ext2_ino_t *old,
+ struct ext2_inode_relocate_entry *ent);
+static errcode_t ima_start_iter(ext2_irel irel);
+static errcode_t ima_next(ext2_irel irel, ext2_ino_t *old,
+ struct ext2_inode_relocate_entry *ent);
+static errcode_t ima_add_ref(ext2_irel irel, ext2_ino_t ino,
+ struct ext2_inode_reference *ref);
+static errcode_t ima_start_iter_ref(ext2_irel irel, ext2_ino_t ino);
+static errcode_t ima_next_ref(ext2_irel irel, struct ext2_inode_reference *ref);
+static errcode_t ima_move(ext2_irel irel, ext2_ino_t old, ext2_ino_t new);
+static errcode_t ima_delete(ext2_irel irel, ext2_ino_t old);
+static errcode_t ima_free(ext2_irel irel);
+
+/*
+ * This data structure stores the array of inode references; there is
+ * a structure for each inode.
+ */
+struct inode_reference_entry {
+ __u16 num;
+ struct ext2_inode_reference *refs;
+};
+
+struct irel_ma {
+ __u32 magic;
+ ext2_ino_t max_inode;
+ ext2_ino_t ref_current;
+ int ref_iter;
+ ext2_ino_t *orig_map;
+ struct ext2_inode_relocate_entry *entries;
+ struct inode_reference_entry *ref_entries;
+};
+
+errcode_t ext2fs_irel_memarray_create(char *name, ext2_ino_t max_inode,
+ ext2_irel *new_irel)
+{
+ ext2_irel irel = 0;
+ errcode_t retval;
+ struct irel_ma *ma = 0;
+ size_t size;
+
+ *new_irel = 0;
+
+ /*
+ * Allocate memory structures
+ */
+ retval = ext2fs_get_mem(sizeof(struct ext2_inode_relocation_table),
+ &irel);
+ if (retval)
+ goto errout;
+ memset(irel, 0, sizeof(struct ext2_inode_relocation_table));
+
+ retval = ext2fs_get_mem(strlen(name)+1, &irel->name);
+ if (retval)
+ goto errout;
+ strcpy(irel->name, name);
+
+ retval = ext2fs_get_mem(sizeof(struct irel_ma), &ma);
+ if (retval)
+ goto errout;
+ memset(ma, 0, sizeof(struct irel_ma));
+ irel->priv_data = ma;
+
+ size = (size_t) (sizeof(ext2_ino_t) * (max_inode+1));
+ retval = ext2fs_get_array(max_inode+1, sizeof(ext2_ino_t),
+ &ma->orig_map);
+ if (retval)
+ goto errout;
+ memset(ma->orig_map, 0, size);
+
+ size = (size_t) (sizeof(struct ext2_inode_relocate_entry) *
+ (max_inode+1));
+ retval = ext2fs_get_array((max_inode+1,
+ sizeof(struct ext2_inode_relocate_entry), &ma->entries);
+ if (retval)
+ goto errout;
+ memset(ma->entries, 0, size);
+
+ size = (size_t) (sizeof(struct inode_reference_entry) *
+ (max_inode+1));
+ retval = ext2fs_get_mem(max_inode+1,
+ sizeof(struct inode_reference_entry), &ma->ref_entries);
+ if (retval)
+ goto errout;
+ memset(ma->ref_entries, 0, size);
+ ma->max_inode = max_inode;
+
+ /*
+ * Fill in the irel data structure
+ */
+ irel->put = ima_put;
+ irel->get = ima_get;
+ irel->get_by_orig = ima_get_by_orig;
+ irel->start_iter = ima_start_iter;
+ irel->next = ima_next;
+ irel->add_ref = ima_add_ref;
+ irel->start_iter_ref = ima_start_iter_ref;
+ irel->next_ref = ima_next_ref;
+ irel->move = ima_move;
+ irel->delete = ima_delete;
+ irel->free = ima_free;
+
+ *new_irel = irel;
+ return 0;
+
+errout:
+ ima_free(irel);
+ return retval;
+}
+
+static errcode_t ima_put(ext2_irel irel, ext2_ino_t old,
+ struct ext2_inode_relocate_entry *ent)
+{
+ struct inode_reference_entry *ref_ent;
+ struct irel_ma *ma;
+ errcode_t retval;
+ size_t size, old_size;
+
+ ma = irel->priv_data;
+ if (old > ma->max_inode)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ /*
+ * Force the orig field to the correct value; the application
+ * program shouldn't be messing with this field.
+ */
+ if (ma->entries[(unsigned) old].new == 0)
+ ent->orig = old;
+ else
+ ent->orig = ma->entries[(unsigned) old].orig;
+
+ /*
+ * If max_refs has changed, reallocate the refs array
+ */
+ ref_ent = ma->ref_entries + (unsigned) old;
+ if (ref_ent->refs && ent->max_refs !=
+ ma->entries[(unsigned) old].max_refs) {
+ size = (sizeof(struct ext2_inode_reference) * ent->max_refs);
+ old_size = (sizeof(struct ext2_inode_reference) *
+ ma->entries[(unsigned) old].max_refs);
+ retval = ext2fs_resize_mem(old_size, size, &ref_ent->refs);
+ if (retval)
+ return retval;
+ }
+
+ ma->entries[(unsigned) old] = *ent;
+ ma->orig_map[(unsigned) ent->orig] = old;
+ return 0;
+}
+
+static errcode_t ima_get(ext2_irel irel, ext2_ino_t old,
+ struct ext2_inode_relocate_entry *ent)
+{
+ struct irel_ma *ma;
+
+ ma = irel->priv_data;
+ if (old > ma->max_inode)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (ma->entries[(unsigned) old].new == 0)
+ return ENOENT;
+ *ent = ma->entries[(unsigned) old];
+ return 0;
+}
+
+static errcode_t ima_get_by_orig(ext2_irel irel, ext2_ino_t orig, ext2_ino_t *old,
+ struct ext2_inode_relocate_entry *ent)
+{
+ struct irel_ma *ma;
+ ext2_ino_t ino;
+
+ ma = irel->priv_data;
+ if (orig > ma->max_inode)
+ return EXT2_ET_INVALID_ARGUMENT;
+ ino = ma->orig_map[(unsigned) orig];
+ if (ino == 0)
+ return ENOENT;
+ *old = ino;
+ *ent = ma->entries[(unsigned) ino];
+ return 0;
+}
+
+static errcode_t ima_start_iter(ext2_irel irel)
+{
+ irel->current = 0;
+ return 0;
+}
+
+static errcode_t ima_next(ext2_irel irel, ext2_ino_t *old,
+ struct ext2_inode_relocate_entry *ent)
+{
+ struct irel_ma *ma;
+
+ ma = irel->priv_data;
+ while (++irel->current < ma->max_inode) {
+ if (ma->entries[(unsigned) irel->current].new == 0)
+ continue;
+ *old = irel->current;
+ *ent = ma->entries[(unsigned) irel->current];
+ return 0;
+ }
+ *old = 0;
+ return 0;
+}
+
+static errcode_t ima_add_ref(ext2_irel irel, ext2_ino_t ino,
+ struct ext2_inode_reference *ref)
+{
+ struct irel_ma *ma;
+ size_t size;
+ struct inode_reference_entry *ref_ent;
+ struct ext2_inode_relocate_entry *ent;
+ errcode_t retval;
+
+ ma = irel->priv_data;
+ if (ino > ma->max_inode)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ ref_ent = ma->ref_entries + (unsigned) ino;
+ ent = ma->entries + (unsigned) ino;
+
+ /*
+ * If the inode reference array doesn't exist, create it.
+ */
+ if (ref_ent->refs == 0) {
+ size = (size_t) ((sizeof(struct ext2_inode_reference) *
+ ent->max_refs));
+ retval = ext2fs_get_array(ent->max_refs,
+ sizeof(struct ext2_inode_reference), &ref_ent->refs);
+ if (retval)
+ return retval;
+ memset(ref_ent->refs, 0, size);
+ ref_ent->num = 0;
+ }
+
+ if (ref_ent->num >= ent->max_refs)
+ return EXT2_ET_TOO_MANY_REFS;
+
+ ref_ent->refs[(unsigned) ref_ent->num++] = *ref;
+ return 0;
+}
+
+static errcode_t ima_start_iter_ref(ext2_irel irel, ext2_ino_t ino)
+{
+ struct irel_ma *ma;
+
+ ma = irel->priv_data;
+ if (ino > ma->max_inode)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (ma->entries[(unsigned) ino].new == 0)
+ return ENOENT;
+ ma->ref_current = ino;
+ ma->ref_iter = 0;
+ return 0;
+}
+
+static errcode_t ima_next_ref(ext2_irel irel,
+ struct ext2_inode_reference *ref)
+{
+ struct irel_ma *ma;
+ struct inode_reference_entry *ref_ent;
+
+ ma = irel->priv_data;
+
+ ref_ent = ma->ref_entries + ma->ref_current;
+
+ if ((ref_ent->refs == NULL) ||
+ (ma->ref_iter >= ref_ent->num)) {
+ ref->block = 0;
+ ref->offset = 0;
+ return 0;
+ }
+ *ref = ref_ent->refs[ma->ref_iter++];
+ return 0;
+}
+
+
+static errcode_t ima_move(ext2_irel irel, ext2_ino_t old, ext2_ino_t new)
+{
+ struct irel_ma *ma;
+
+ ma = irel->priv_data;
+ if ((old > ma->max_inode) || (new > ma->max_inode))
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (ma->entries[(unsigned) old].new == 0)
+ return ENOENT;
+
+ ma->entries[(unsigned) new] = ma->entries[(unsigned) old];
+ if (ma->ref_entries[(unsigned) new].refs)
+ ext2fs_free_mem(&ma->ref_entries[(unsigned) new].refs);
+ ma->ref_entries[(unsigned) new] = ma->ref_entries[(unsigned) old];
+
+ ma->entries[(unsigned) old].new = 0;
+ ma->ref_entries[(unsigned) old].num = 0;
+ ma->ref_entries[(unsigned) old].refs = 0;
+
+ ma->orig_map[ma->entries[new].orig] = new;
+ return 0;
+}
+
+static errcode_t ima_delete(ext2_irel irel, ext2_ino_t old)
+{
+ struct irel_ma *ma;
+
+ ma = irel->priv_data;
+ if (old > ma->max_inode)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (ma->entries[(unsigned) old].new == 0)
+ return ENOENT;
+
+ ma->entries[old].new = 0;
+ if (ma->ref_entries[(unsigned) old].refs)
+ ext2fs_free_mem(&ma->ref_entries[(unsigned) old].refs);
+ ma->orig_map[ma->entries[(unsigned) old].orig] = 0;
+
+ ma->ref_entries[(unsigned) old].num = 0;
+ ma->ref_entries[(unsigned) old].refs = 0;
+ return 0;
+}
+
+static errcode_t ima_free(ext2_irel irel)
+{
+ struct irel_ma *ma;
+ ext2_ino_t ino;
+
+ if (!irel)
+ return 0;
+
+ ma = irel->priv_data;
+
+ if (ma) {
+ if (ma->orig_map)
+ ext2fs_free_mem(&ma->orig_map);
+ if (ma->entries)
+ ext2fs_free_mem(&ma->entries);
+ if (ma->ref_entries) {
+ for (ino = 0; ino <= ma->max_inode; ino++) {
+ if (ma->ref_entries[(unsigned) ino].refs)
+ ext2fs_free_mem(&ma->ref_entries[(unsigned) ino].refs);
+ }
+ ext2fs_free_mem(&ma->ref_entries);
+ }
+ ext2fs_free_mem(&ma);
+ }
+ if (irel->name)
+ ext2fs_free_mem(&irel->name);
+ ext2fs_free_mem(&irel);
+ return 0;
+}
diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c
new file mode 100644
index 0000000..a7db1a5
--- /dev/null
+++ b/lib/ext2fs/ismounted.c
@@ -0,0 +1,478 @@
+/*
+ * ismounted.c --- Check to see if the filesystem was mounted
+ *
+ * Copyright (C) 1995,1996,1997,1998,1999,2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+/* define BSD_SOURCE to make sure we get the major() macro */
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+#ifndef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE /* since glibc 2.20 _SVID_SOURCE is deprecated */
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#ifdef HAVE_LINUX_FD_H
+#include <linux/fd.h>
+#endif
+#ifdef HAVE_LINUX_LOOP_H
+#include <linux/loop.h>
+#include <sys/ioctl.h>
+#ifdef HAVE_LINUX_MAJOR_H
+#include <linux/major.h>
+#endif /* HAVE_LINUX_MAJOR_H */
+#endif /* HAVE_LINUX_LOOP_H */
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#endif
+#ifdef HAVE_GETMNTINFO
+#include <paths.h>
+#include <sys/param.h>
+#include <sys/mount.h>
+#endif /* HAVE_GETMNTINFO */
+#include <string.h>
+#include <sys/stat.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+#ifdef HAVE_SETMNTENT
+/*
+ * Check to see if a regular file is mounted.
+ * If /etc/mtab/ is a symlink of /proc/mounts, you will need the following check
+ * because the name in /proc/mounts is a loopback device not a regular file.
+ */
+static int check_loop_mounted(const char *mnt_fsname, dev_t mnt_rdev,
+ dev_t file_dev, ino_t file_ino)
+{
+#if defined(HAVE_LINUX_LOOP_H) && defined(HAVE_LINUX_MAJOR_H)
+ struct loop_info64 loopinfo = {0, };
+ int loop_fd, ret;
+
+ if (major(mnt_rdev) == LOOP_MAJOR) {
+ loop_fd = open(mnt_fsname, O_RDONLY);
+ if (loop_fd < 0)
+ return -1;
+
+ ret = ioctl(loop_fd, LOOP_GET_STATUS64, &loopinfo);
+ close(loop_fd);
+ if (ret < 0)
+ return -1;
+
+ if (file_dev == loopinfo.lo_device &&
+ file_ino == loopinfo.lo_inode)
+ return 1;
+ }
+#endif /* defined(HAVE_LINUX_LOOP_H) && defined(HAVE_LINUX_MAJOR_H) */
+ return 0;
+}
+
+/*
+ * Helper function which checks a file in /etc/mtab format to see if a
+ * filesystem is mounted. Returns an error if the file doesn't exist
+ * or can't be opened.
+ */
+static errcode_t check_mntent_file(const char *mtab_file, const char *file,
+ int *mount_flags, char *mtpt, int mtlen)
+{
+ struct mntent *mnt;
+ struct stat st_buf, dir_st_buf;
+ errcode_t retval = 0;
+ dev_t file_dev=0, file_rdev=0;
+ ino_t file_ino=0;
+ FILE *f;
+ int fd;
+
+ *mount_flags = 0;
+
+ if ((f = setmntent (mtab_file, "r")) == NULL) {
+ if (errno == ENOENT) {
+ if (getenv("EXT2FS_NO_MTAB_OK"))
+ return 0;
+ else
+ return EXT2_ET_NO_MTAB_FILE;
+ }
+ return errno;
+ }
+ if (stat(file, &st_buf) == 0) {
+ if (ext2fsP_is_disk_device(st_buf.st_mode)) {
+#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
+ file_rdev = st_buf.st_rdev;
+#endif /* __GNU__ */
+ } else {
+ file_dev = st_buf.st_dev;
+ file_ino = st_buf.st_ino;
+ }
+ }
+ while ((mnt = getmntent (f)) != NULL) {
+ if (mnt->mnt_fsname[0] != '/')
+ continue;
+ if (strcmp(file, mnt->mnt_fsname) == 0) {
+ if (stat(mnt->mnt_dir, &st_buf) != 0)
+ continue;
+ if (file_rdev && (file_rdev != st_buf.st_dev)) {
+#ifdef DEBUG
+ printf("Bogus entry in %s! "
+ "(%s is not mounted on %s)\n",
+ mtab_file, file, mnt->mnt_dir);
+#endif /* DEBUG */
+ continue;
+ }
+ break;
+ }
+ if (stat(mnt->mnt_fsname, &st_buf) == 0) {
+ if (ext2fsP_is_disk_device(st_buf.st_mode)) {
+#ifndef __GNU__
+ if (file_rdev &&
+ (file_rdev == st_buf.st_rdev)) {
+ if (stat(mnt->mnt_dir,
+ &dir_st_buf) != 0)
+ continue;
+ if (file_rdev == dir_st_buf.st_dev)
+ break;
+ }
+ if (check_loop_mounted(mnt->mnt_fsname,
+ st_buf.st_rdev, file_dev,
+ file_ino) == 1)
+ break;
+#endif /* __GNU__ */
+ } else {
+ if (file_dev && ((file_dev == st_buf.st_dev) &&
+ (file_ino == st_buf.st_ino)))
+ break;
+ }
+ }
+ }
+
+ if (mnt == 0) {
+#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
+ /*
+ * Do an extra check to see if this is the root device. We
+ * can't trust /etc/mtab, and /proc/mounts will only list
+ * /dev/root for the root filesystem. Argh. Instead we
+ * check if the given device has the same major/minor number
+ * as the device that the root directory is on.
+ */
+ if (file_rdev && stat("/", &st_buf) == 0) {
+ if (st_buf.st_dev == file_rdev) {
+ *mount_flags = EXT2_MF_MOUNTED;
+ if (mtpt)
+ strncpy(mtpt, "/", mtlen);
+ goto is_root;
+ }
+ }
+#endif /* __GNU__ */
+ goto errout;
+ }
+ *mount_flags = EXT2_MF_MOUNTED;
+
+#ifdef MNTOPT_RO
+ /* Check to see if the ro option is set */
+ if (hasmntopt(mnt, MNTOPT_RO))
+ *mount_flags |= EXT2_MF_READONLY;
+#endif
+
+ if (mtpt)
+ strncpy(mtpt, mnt->mnt_dir, mtlen);
+ /*
+ * Check to see if we're referring to the root filesystem.
+ * If so, do a manual check to see if we can open /etc/mtab
+ * read/write, since if the root is mounted read/only, the
+ * contents of /etc/mtab may not be accurate.
+ */
+ if (!strcmp(mnt->mnt_dir, "/")) {
+is_root:
+#define TEST_FILE "/.ismount-test-file"
+ *mount_flags |= EXT2_MF_ISROOT;
+ fd = open(TEST_FILE, O_RDWR|O_CREAT, 0600);
+ if (fd < 0) {
+ if (errno == EROFS)
+ *mount_flags |= EXT2_MF_READONLY;
+ } else
+ close(fd);
+ (void) unlink(TEST_FILE);
+ }
+
+ if (mnt && mnt->mnt_type &&
+ (!strcmp(mnt->mnt_type, "ext4") ||
+ !strcmp(mnt->mnt_type, "ext3") ||
+ !strcmp(mnt->mnt_type, "ext2")))
+ *mount_flags |= EXT2_MF_EXTFS;
+ retval = 0;
+errout:
+ endmntent (f);
+ return retval;
+}
+
+static errcode_t check_mntent(const char *file, int *mount_flags,
+ char *mtpt, int mtlen)
+{
+ errcode_t retval;
+
+#ifdef DEBUG
+ retval = check_mntent_file("/tmp/mtab", file, mount_flags,
+ mtpt, mtlen);
+ if (retval == 0)
+ return 0;
+#endif /* DEBUG */
+#ifdef __linux__
+ retval = check_mntent_file("/proc/mounts", file, mount_flags,
+ mtpt, mtlen);
+ if (retval == 0)
+ return 0;
+#endif /* __linux__ */
+#if defined(MOUNTED) || defined(_PATH_MOUNTED)
+#ifndef MOUNTED
+#define MOUNTED _PATH_MOUNTED
+#endif /* MOUNTED */
+ retval = check_mntent_file(MOUNTED, file, mount_flags, mtpt, mtlen);
+ return retval;
+#else
+ *mount_flags = 0;
+ return 0;
+#endif /* defined(MOUNTED) || defined(_PATH_MOUNTED) */
+}
+
+#else
+#if defined(HAVE_GETMNTINFO)
+
+static errcode_t check_getmntinfo(const char *file, int *mount_flags,
+ char *mtpt, int mtlen)
+{
+ struct statfs *mp;
+ int len, n;
+ const char *s1;
+ char *s2;
+
+ n = getmntinfo(&mp, MNT_NOWAIT);
+ if (n == 0)
+ return errno;
+
+ len = sizeof(_PATH_DEV) - 1;
+ s1 = file;
+ if (strncmp(_PATH_DEV, s1, len) == 0)
+ s1 += len;
+
+ *mount_flags = 0;
+ while (--n >= 0) {
+ s2 = mp->f_mntfromname;
+ if (strncmp(_PATH_DEV, s2, len) == 0) {
+ s2 += len - 1;
+ *s2 = 'r';
+ }
+ if (strcmp(s1, s2) == 0 || strcmp(s1, &s2[1]) == 0) {
+ *mount_flags = EXT2_MF_MOUNTED;
+ break;
+ }
+ ++mp;
+ }
+ if (mtpt)
+ strncpy(mtpt, mp->f_mntonname, mtlen);
+ return 0;
+}
+#endif /* HAVE_GETMNTINFO */
+#endif /* HAVE_SETMNTENT */
+
+/*
+ * Check to see if we're dealing with the swap device.
+ */
+static int is_swap_device(const char *file)
+{
+ FILE *f;
+ char buf[1024], *cp;
+ dev_t file_dev;
+ struct stat st_buf;
+ int ret = 0;
+
+ file_dev = 0;
+#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
+ if ((stat(file, &st_buf) == 0) &&
+ ext2fsP_is_disk_device(st_buf.st_mode))
+ file_dev = st_buf.st_rdev;
+#endif /* __GNU__ */
+
+ if (!(f = fopen("/proc/swaps", "r")))
+ return 0;
+ /* Skip the first line */
+ if (!fgets(buf, sizeof(buf), f))
+ goto leave;
+ if (*buf && strncmp(buf, "Filename\t", 9))
+ /* Linux <=2.6.19 contained a bug in the /proc/swaps
+ * code where the header would not be displayed
+ */
+ goto valid_first_line;
+
+ while (fgets(buf, sizeof(buf), f)) {
+valid_first_line:
+ if ((cp = strchr(buf, ' ')) != NULL)
+ *cp = 0;
+ if ((cp = strchr(buf, '\t')) != NULL)
+ *cp = 0;
+ if (strcmp(buf, file) == 0) {
+ ret++;
+ break;
+ }
+#ifndef __GNU__
+ if (file_dev && (stat(buf, &st_buf) == 0) &&
+ ext2fsP_is_disk_device(st_buf.st_mode) &&
+ file_dev == st_buf.st_rdev) {
+ ret++;
+ break;
+ }
+#endif /* __GNU__ */
+ }
+
+leave:
+ fclose(f);
+ return ret;
+}
+
+
+/*
+ * ext2fs_check_mount_point() fills determines if the device is
+ * mounted or otherwise busy, and fills in mount_flags with one or
+ * more of the following flags: EXT2_MF_MOUNTED, EXT2_MF_ISROOT,
+ * EXT2_MF_READONLY, EXT2_MF_SWAP, and EXT2_MF_BUSY. If mtpt is
+ * non-NULL, the directory where the device is mounted is copied to
+ * where mtpt is pointing, up to mtlen characters.
+ */
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags,
+ char *mtpt, int mtlen)
+{
+ errcode_t retval = 0;
+ int busy = 0;
+
+ if (getenv("EXT2FS_PRETEND_RO_MOUNT")) {
+ *mount_flags = EXT2_MF_MOUNTED | EXT2_MF_READONLY;
+ if (getenv("EXT2FS_PRETEND_ROOTFS"))
+ *mount_flags = EXT2_MF_ISROOT;
+ return 0;
+ }
+ if (getenv("EXT2FS_PRETEND_RW_MOUNT")) {
+ *mount_flags = EXT2_MF_MOUNTED;
+ if (getenv("EXT2FS_PRETEND_ROOTFS"))
+ *mount_flags = EXT2_MF_ISROOT;
+ return 0;
+ }
+
+#ifdef __linux__ /* This only works on Linux 2.6+ systems */
+ {
+ struct stat st_buf;
+
+ if (stat(device, &st_buf) == 0 &&
+ ext2fsP_is_disk_device(st_buf.st_mode)) {
+ int fd = open(device, O_RDONLY | O_EXCL);
+
+ if (fd >= 0) {
+ /*
+ * The device is not busy so it's
+ * definitelly not mounted. No need to
+ * to perform any more checks.
+ */
+ close(fd);
+ *mount_flags = 0;
+ return 0;
+ } else if (errno == EBUSY) {
+ busy = 1;
+ }
+ }
+ }
+#endif
+
+ if (is_swap_device(device)) {
+ *mount_flags = EXT2_MF_MOUNTED | EXT2_MF_SWAP;
+ if (mtpt)
+ strncpy(mtpt, "<swap>", mtlen);
+ } else {
+#ifdef HAVE_SETMNTENT
+ retval = check_mntent(device, mount_flags, mtpt, mtlen);
+#else
+#ifdef HAVE_GETMNTINFO
+ retval = check_getmntinfo(device, mount_flags, mtpt, mtlen);
+#else
+#if defined(__GNUC__) && !defined(_WIN32)
+ #warning "Can't use getmntent or getmntinfo to check for mounted filesystems!"
+#endif
+ *mount_flags = 0;
+#endif /* HAVE_GETMNTINFO */
+#endif /* HAVE_SETMNTENT */
+ }
+ if (retval)
+ return retval;
+
+ if (busy)
+ *mount_flags |= EXT2_MF_BUSY;
+
+ return 0;
+}
+
+/*
+ * ext2fs_check_if_mounted() sets the mount_flags EXT2_MF_MOUNTED,
+ * EXT2_MF_READONLY, and EXT2_MF_ROOT
+ *
+ */
+errcode_t ext2fs_check_if_mounted(const char *file, int *mount_flags)
+{
+ return ext2fs_check_mount_point(file, mount_flags, NULL, 0);
+}
+
+#ifdef DEBUG
+int main(int argc, char **argv)
+{
+ int retval, mount_flags;
+ char mntpt[80];
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: %s device\n", argv[0]);
+ exit(1);
+ }
+
+ add_error_table(&et_ext2_error_table);
+ mntpt[0] = 0;
+ retval = ext2fs_check_mount_point(argv[1], &mount_flags,
+ mntpt, sizeof(mntpt));
+ if (retval) {
+ com_err(argv[0], retval,
+ "while calling ext2fs_check_if_mounted");
+ exit(1);
+ }
+ printf("Device %s reports flags %02x\n", argv[1], mount_flags);
+ if (mount_flags & EXT2_MF_BUSY)
+ printf("\t%s is apparently in use.\n", argv[1]);
+ if (mount_flags & EXT2_MF_MOUNTED)
+ printf("\t%s is mounted.\n", argv[1]);
+ if (mount_flags & EXT2_MF_SWAP)
+ printf("\t%s is a swap device.\n", argv[1]);
+ if (mount_flags & EXT2_MF_READONLY)
+ printf("\t%s is read-only.\n", argv[1]);
+ if (mount_flags & EXT2_MF_ISROOT)
+ printf("\t%s is the root filesystem.\n", argv[1]);
+ if (mntpt[0])
+ printf("\t%s is mounted on %s.\n", argv[1], mntpt);
+ exit(0);
+}
+#endif /* DEBUG */
diff --git a/lib/ext2fs/jfs_compat.h b/lib/ext2fs/jfs_compat.h
new file mode 100644
index 0000000..0e96b56
--- /dev/null
+++ b/lib/ext2fs/jfs_compat.h
@@ -0,0 +1,113 @@
+
+#ifndef _JFS_COMPAT_H
+#define _JFS_COMPAT_H
+
+#include "kernel-list.h"
+#include <errno.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#include <arpa/inet.h>
+#include <stdbool.h>
+
+#define printk printf
+#define KERN_ERR ""
+#define KERN_DEBUG ""
+
+#define REQ_OP_READ 0
+#define REQ_OP_WRITE 1
+
+#define cpu_to_le16(x) ext2fs_cpu_to_le16(x)
+#define cpu_to_be16(x) ext2fs_cpu_to_be16(x)
+#define cpu_to_le32(x) ext2fs_cpu_to_le32(x)
+#define cpu_to_be32(x) ext2fs_cpu_to_be32(x)
+#define cpu_to_le64(x) ext2fs_cpu_to_le64(x)
+#define cpu_to_be64(x) ext2fs_cpu_to_be64(x)
+
+#define le16_to_cpu(x) ext2fs_le16_to_cpu(x)
+#define be16_to_cpu(x) ext2fs_be16_to_cpu(x)
+#define le32_to_cpu(x) ext2fs_le32_to_cpu(x)
+#define be32_to_cpu(x) ext2fs_be32_to_cpu(x)
+#define le64_to_cpu(x) ext2fs_le64_to_cpu(x)
+#define be64_to_cpu(x) ext2fs_be64_to_cpu(x)
+
+typedef unsigned int tid_t;
+typedef struct journal_s journal_t;
+typedef struct kdev_s *kdev_t;
+
+struct buffer_head;
+struct inode;
+
+typedef unsigned int gfp_t;
+#define GFP_KERNEL 0
+#define GFP_NOFS 0
+#define __GFP_NOFAIL 0
+#define JBD2_TAG_SIZE32 JBD_TAG_SIZE32
+#define JBD2_BARRIER 0
+typedef __u64 u64;
+#define put_bh(x) brelse(x)
+
+#define crc32_be(x, y, z) ext2fs_crc32_be((x), (y), (z))
+#define spin_lock_init(x)
+#define spin_lock(x)
+#define spin_unlock(x)
+#define SLAB_HWCACHE_ALIGN 0
+#define SLAB_TEMPORARY 0
+#define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\
+ sizeof(struct __struct), __alignof__(struct __struct),\
+ (__flags), NULL)
+
+#define blkdev_issue_flush(kdev) sync_blockdev(kdev)
+#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
+#define pr_emerg(fmt)
+#define pr_err(...)
+
+enum passtype {PASS_SCAN, PASS_REVOKE, PASS_REPLAY};
+
+#define JBD2_FC_REPLAY_STOP 0
+#define JBD2_FC_REPLAY_CONTINUE 1
+
+struct journal_s
+{
+ unsigned long j_flags;
+ int j_errno;
+ struct buffer_head * j_sb_buffer;
+ struct journal_superblock_s *j_superblock;
+ int j_format_version;
+ unsigned long j_head;
+ unsigned long j_tail;
+ unsigned long j_fc_first;
+ unsigned long j_fc_off;
+ unsigned long j_fc_last;
+ unsigned long j_free;
+ unsigned long j_first, j_last;
+ kdev_t j_dev;
+ kdev_t j_fs_dev;
+ int j_blocksize;
+ unsigned int j_blk_offset;
+ unsigned int j_total_len;
+ struct inode * j_inode;
+ tid_t j_tail_sequence;
+ tid_t j_transaction_sequence;
+ __u8 j_uuid[16];
+ struct jbd2_revoke_table_s *j_revoke;
+ struct jbd2_revoke_table_s *j_revoke_table[2];
+ tid_t j_failed_commit;
+ __u32 j_csum_seed;
+ int (*j_fc_replay_callback)(struct journal_s *journal,
+ struct buffer_head *bh,
+ enum passtype pass, int off,
+ tid_t expected_tid);
+
+};
+
+#define is_journal_abort(x) 0
+
+#define BUFFER_TRACE(bh, info) do {} while (0)
+
+/* Need this so we can compile with configure --enable-gcc-wall */
+#ifdef NO_INLINE_FUNCS
+#define inline
+#endif
+
+#endif /* _JFS_COMPAT_H */
diff --git a/lib/ext2fs/kernel-jbd.h b/lib/ext2fs/kernel-jbd.h
new file mode 100644
index 0000000..e569500
--- /dev/null
+++ b/lib/ext2fs/kernel-jbd.h
@@ -0,0 +1,456 @@
+/*
+ * linux/include/linux/jbd.h
+ *
+ * Written by Stephen C. Tweedie <sct@redhat.com>
+ *
+ * Copyright 1998-2000 Red Hat, Inc --- All Rights Reserved
+ *
+ * This file is part of the Linux kernel and is made available under
+ * the terms of the GNU General Public License, version 2, or at your
+ * option, any later version, incorporated herein by reference.
+ *
+ * Definitions for transaction data structures for the buffer cache
+ * filesystem journaling support.
+ */
+
+#ifndef _LINUX_JBD_H
+#define _LINUX_JBD_H
+
+#include "jfs_compat.h"
+#define JFS_DEBUG
+#define jfs_debug jbd_debug
+
+#ifndef __GNUC__
+#define __FUNCTION__ ""
+#endif
+
+#define journal_oom_retry 0
+
+#ifdef CONFIG_JBD_DEBUG
+/*
+ * Define JBD_EXPENSIVE_CHECKING to enable more expensive internal
+ * consistency checks. By default we don't do this unless
+ * CONFIG_JBD_DEBUG is on.
+ */
+#define JBD_EXPENSIVE_CHECKING
+extern int journal_enable_debug;
+#else
+#define journal_enable_debug (-1)
+#endif /* !CONFIG_JBD_DEBUG */
+
+#ifdef __STDC__
+#define jbd_debug(n, f, a...) \
+ do { \
+ if ((n) <= journal_enable_debug) { \
+ printk (KERN_DEBUG "(%s, %d): %s: ", \
+ __FILE__, __LINE__, __FUNCTION__); \
+ printk (f, ## a); \
+ } \
+ } while (0)
+#else
+#define jbd_debug(x) /* AIX doesn't do STDC */
+#endif /* !__STDC__ */
+
+extern void * __jbd_kmalloc (char *where, size_t size, int flags, int retry);
+#define jbd_kmalloc(size, flags) \
+ __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
+#define jbd_rep_kmalloc(size, flags) \
+ __jbd_kmalloc(__FUNCTION__, (size), (flags), 1)
+
+#define JBD2_MIN_JOURNAL_BLOCKS 1024
+#define JBD2_DEFAULT_FAST_COMMIT_BLOCKS 256
+
+/*
+ * Internal structures used by the logging mechanism:
+ */
+
+#define JBD2_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
+
+/*
+ * On-disk structures
+ */
+
+/*
+ * Descriptor block types:
+ */
+
+#define JBD2_DESCRIPTOR_BLOCK 1
+#define JBD2_COMMIT_BLOCK 2
+#define JBD2_SUPERBLOCK_V1 3
+#define JBD2_SUPERBLOCK_V2 4
+#define JBD2_REVOKE_BLOCK 5
+#define JBD2_FC_BLOCK 6
+
+/*
+ * Standard header for all descriptor blocks:
+ */
+typedef struct journal_header_s
+{
+ __be32 h_magic;
+ __be32 h_blocktype;
+ __be32 h_sequence;
+} journal_header_t;
+
+/*
+ * Checksum types.
+ */
+#define JBD2_CRC32_CHKSUM 1
+#define JBD2_MD5_CHKSUM 2
+#define JBD2_SHA1_CHKSUM 3
+#define JBD2_CRC32C_CHKSUM 4
+
+#define JBD2_CRC32_CHKSUM_SIZE 4
+
+#define JBD2_CHECKSUM_BYTES (32 / sizeof(__u32))
+/*
+ * Commit block header for storing transactional checksums:
+ *
+ * NOTE: If FEATURE_COMPAT_CHECKSUM (checksum v1) is set, the h_chksum*
+ * fields are used to store a checksum of the descriptor and data blocks.
+ *
+ * If FEATURE_INCOMPAT_CSUM_V2 (checksum v2) is set, then the h_chksum
+ * field is used to store crc32c(uuid+commit_block). Each journal metadata
+ * block gets its own checksum, and data block checksums are stored in
+ * journal_block_tag (in the descriptor). The other h_chksum* fields are
+ * not used.
+ *
+ * If FEATURE_INCOMPAT_CSUM_V3 is set, the descriptor block uses
+ * journal_block_tag3_t to store a full 32-bit checksum. Everything else
+ * is the same as v2.
+ *
+ * Checksum v1, v2, and v3 are mutually exclusive features.
+ */
+struct commit_header {
+ __be32 h_magic;
+ __be32 h_blocktype;
+ __be32 h_sequence;
+ unsigned char h_chksum_type;
+ unsigned char h_chksum_size;
+ unsigned char h_padding[2];
+ __be32 h_chksum[JBD2_CHECKSUM_BYTES];
+ __be64 h_commit_sec;
+ __be32 h_commit_nsec;
+};
+
+/*
+ * The block tag: used to describe a single buffer in the journal
+ */
+typedef struct journal_block_tag3_s
+{
+ __be32 t_blocknr; /* The on-disk block number */
+ __be32 t_flags; /* See below */
+ __be32 t_blocknr_high; /* most-significant high 32bits. */
+ __be32 t_checksum; /* crc32c(uuid+seq+block) */
+} journal_block_tag3_t;
+
+typedef struct journal_block_tag_s
+{
+ __be32 t_blocknr; /* The on-disk block number */
+ __be16 t_checksum; /* truncated crc32c(uuid+seq+block) */
+ __be16 t_flags; /* See below */
+ __be32 t_blocknr_high; /* most-significant high 32bits. */
+} journal_block_tag_t;
+
+/* Tail of descriptor or revoke block, for checksumming */
+struct jbd2_journal_block_tail {
+ __be32 t_checksum;
+};
+
+/*
+ * The revoke descriptor: used on disk to describe a series of blocks to
+ * be revoked from the log
+ */
+typedef struct journal_revoke_header_s
+{
+ journal_header_t r_header;
+ __be32 r_count; /* Count of bytes used in the block */
+} jbd2_journal_revoke_header_t;
+
+/* Definitions for the journal tag flags word: */
+#define JBD2_FLAG_ESCAPE 1 /* on-disk block is escaped */
+#define JBD2_FLAG_SAME_UUID 2 /* block has same uuid as previous */
+#define JBD2_FLAG_DELETED 4 /* block deleted by this transaction */
+#define JBD2_FLAG_LAST_TAG 8 /* last tag in this descriptor block */
+
+
+#define UUID_SIZE 16
+#define JBD2_USERS_MAX 48
+#define JBD2_USERS_SIZE (UUID_SIZE * JBD2_USERS_MAX)
+/*
+ * The journal superblock. All fields are in big-endian byte order.
+ */
+typedef struct journal_superblock_s
+{
+/* 0x0000 */
+ journal_header_t s_header;
+
+/* 0x000C */
+ /* Static information describing the journal */
+ __be32 s_blocksize; /* journal device blocksize */
+ __be32 s_maxlen; /* total blocks in journal file */
+ __be32 s_first; /* first block of log information */
+
+/* 0x0018 */
+ /* Dynamic information describing the current state of the log */
+ __be32 s_sequence; /* first commit ID expected in log */
+ __be32 s_start; /* blocknr of start of log */
+
+/* 0x0020 */
+ /* Error value, as set by journal_abort(). */
+ __s32 s_errno;
+
+/* 0x0024 */
+ /* Remaining fields are only valid in a version-2 superblock */
+ __be32 s_feature_compat; /* compatible feature set */
+ __be32 s_feature_incompat; /* incompatible feature set */
+ __be32 s_feature_ro_compat; /* readonly-compatible feature set */
+/* 0x0030 */
+ __u8 s_uuid[16]; /* 128-bit uuid for journal */
+
+/* 0x0040 */
+ __be32 s_nr_users; /* Nr of filesystems sharing log */
+
+ __be32 s_dynsuper; /* Blocknr of dynamic superblock copy*/
+
+/* 0x0048 */
+ __be32 s_max_transaction; /* Limit of journal blocks per trans.*/
+ __be32 s_max_trans_data; /* Limit of data blocks per trans. */
+
+/* 0x0050 */
+ __u8 s_checksum_type; /* checksum type */
+ __u8 s_padding2[3];
+/* 0x0054 */
+ __be32 s_num_fc_blks; /* Number of fast commit blocks */
+/* 0x0058 */
+ __be32 s_padding[41];
+ __be32 s_checksum; /* crc32c(superblock) */
+
+/* 0x0100 */
+ __u8 s_users[JBD2_USERS_SIZE]; /* ids of all fs'es sharing the log */
+
+/* 0x0400 */
+} journal_superblock_t;
+
+#define JBD2_HAS_COMPAT_FEATURE(j,mask) \
+ ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_compat & ext2fs_cpu_to_be32((mask))))
+#define JBD2_HAS_RO_COMPAT_FEATURE(j,mask) \
+ ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_ro_compat & ext2fs_cpu_to_be32((mask))))
+#define JBD2_HAS_INCOMPAT_FEATURE(j,mask) \
+ ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_incompat & ext2fs_cpu_to_be32((mask))))
+
+#define JBD2_FEATURE_COMPAT_CHECKSUM 0x00000001
+
+#define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001
+#define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002
+#define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004
+#define JBD2_FEATURE_INCOMPAT_CSUM_V2 0x00000008
+#define JBD2_FEATURE_INCOMPAT_CSUM_V3 0x00000010
+#define JBD2_FEATURE_INCOMPAT_FAST_COMMIT 0x00000020
+
+/* Features known to this kernel version: */
+#define JBD2_KNOWN_COMPAT_FEATURES 0
+#define JBD2_KNOWN_ROCOMPAT_FEATURES 0
+#define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE|\
+ JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT| \
+ JBD2_FEATURE_INCOMPAT_64BIT|\
+ JBD2_FEATURE_INCOMPAT_CSUM_V2| \
+ JBD2_FEATURE_INCOMPAT_CSUM_V3 | \
+ JBD2_FEATURE_INCOMPAT_FAST_COMMIT)
+
+#ifdef NO_INLINE_FUNCS
+extern size_t journal_tag_bytes(journal_t *journal);
+extern int jbd2_journal_has_csum_v2or3(journal_t *journal);
+extern int jbd2_journal_get_num_fc_blks(journal_superblock_t *jsb);
+extern int tid_gt(tid_t x, tid_t y) EXT2FS_ATTR((unused));
+extern int tid_geq(tid_t x, tid_t y) EXT2FS_ATTR((unused));
+#endif
+
+#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
+#ifdef E2FSCK_INCLUDE_INLINE_FUNCS
+#if (__STDC_VERSION__ >= 199901L)
+#define _INLINE_ extern inline
+#else
+#define _INLINE_ inline
+#endif
+#else /* !E2FSCK_INCLUDE_INLINE FUNCS */
+#if (__STDC_VERSION__ >= 199901L)
+#define _INLINE_ inline
+#else /* not C99 */
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif /* __GNUC__ */
+#endif /* __STDC_VERSION__ >= 199901L */
+#endif /* INCLUDE_INLINE_FUNCS */
+
+/* journal feature predicate functions */
+#define JBD2_FEATURE_COMPAT_FUNCS(name, flagname) \
+_INLINE_ int jbd2_has_feature_##name(journal_t *j); \
+_INLINE_ int jbd2_has_feature_##name(journal_t *j) \
+{ \
+ return ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_compat & \
+ ext2fs_cpu_to_be32(JBD2_FEATURE_COMPAT_##flagname)) != 0); \
+} \
+_INLINE_ void jbd2_set_feature_##name(journal_t *j); \
+_INLINE_ void jbd2_set_feature_##name(journal_t *j) \
+{ \
+ (j)->j_superblock->s_feature_compat |= \
+ ext2fs_cpu_to_be32(JBD2_FEATURE_COMPAT_##flagname); \
+} \
+_INLINE_ void jbd2_clear_feature_##name(journal_t *j); \
+_INLINE_ void jbd2_clear_feature_##name(journal_t *j) \
+{ \
+ (j)->j_superblock->s_feature_compat &= \
+ ~ext2fs_cpu_to_be32(JBD2_FEATURE_COMPAT_##flagname); \
+}
+
+#define JBD2_FEATURE_RO_COMPAT_FUNCS(name, flagname) \
+_INLINE_ int jbd2_has_feature_##name(journal_t *j); \
+_INLINE_ int jbd2_has_feature_##name(journal_t *j) \
+{ \
+ return ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_ro_compat & \
+ ext2fs_cpu_to_be32(JBD2_FEATURE_RO_COMPAT_##flagname)) != 0); \
+} \
+_INLINE_ void jbd2_set_feature_##name(journal_t *j); \
+_INLINE_ void jbd2_set_feature_##name(journal_t *j) \
+{ \
+ (j)->j_superblock->s_feature_ro_compat |= \
+ ext2fs_cpu_to_be32(JBD2_FEATURE_RO_COMPAT_##flagname); \
+} \
+_INLINE_ void jbd2_clear_feature_##name(journal_t *j); \
+_INLINE_ void jbd2_clear_feature_##name(journal_t *j) \
+{ \
+ (j)->j_superblock->s_feature_ro_compat &= \
+ ~ext2fs_cpu_to_be32(JBD2_FEATURE_RO_COMPAT_##flagname); \
+}
+
+#define JBD2_FEATURE_INCOMPAT_FUNCS(name, flagname) \
+_INLINE_ int jbd2_has_feature_##name(journal_t *j); \
+_INLINE_ int jbd2_has_feature_##name(journal_t *j) \
+{ \
+ return ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_incompat & \
+ ext2fs_cpu_to_be32(JBD2_FEATURE_INCOMPAT_##flagname)) != 0); \
+} \
+_INLINE_ void jbd2_set_feature_##name(journal_t *j); \
+_INLINE_ void jbd2_set_feature_##name(journal_t *j) \
+{ \
+ (j)->j_superblock->s_feature_incompat |= \
+ ext2fs_cpu_to_be32(JBD2_FEATURE_INCOMPAT_##flagname); \
+} \
+_INLINE_ void jbd2_clear_feature_##name(journal_t *j); \
+_INLINE_ void jbd2_clear_feature_##name(journal_t *j) \
+{ \
+ (j)->j_superblock->s_feature_incompat &= \
+ ~ext2fs_cpu_to_be32(JBD2_FEATURE_INCOMPAT_##flagname); \
+}
+
+#else
+#define JBD2_FEATURE_COMPAT_FUNCS(name, flagname) \
+extern int jbd2_has_feature_##name(journal_t *j); \
+extern void jbd2_set_feature_##name(journal_t *j); \
+extern void jbd2_clear_feature_##name(journal_t *j);
+
+#define JBD2_FEATURE_RO_COMPAT_FUNCS(name, flagname) \
+extern int jbd2_has_feature_##name(journal_t *j); \
+extern void jbd2_set_feature_##name(journal_t *j); \
+extern void jbd2_clear_feature_##name(journal_t *j);
+
+#define JBD2_FEATURE_INCOMPAT_FUNCS(name, flagname) \
+extern int jbd2_has_feature_##name(journal_t *j); \
+extern void jbd2_set_feature_##name(journal_t *j); \
+extern void jbd2_clear_feature_##name(journal_t *j);
+
+#endif /* (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS)) */
+
+JBD2_FEATURE_COMPAT_FUNCS(checksum, CHECKSUM)
+
+JBD2_FEATURE_INCOMPAT_FUNCS(revoke, REVOKE)
+JBD2_FEATURE_INCOMPAT_FUNCS(64bit, 64BIT)
+JBD2_FEATURE_INCOMPAT_FUNCS(async_commit, ASYNC_COMMIT)
+JBD2_FEATURE_INCOMPAT_FUNCS(csum2, CSUM_V2)
+JBD2_FEATURE_INCOMPAT_FUNCS(csum3, CSUM_V3)
+JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit, FAST_COMMIT)
+
+#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
+/*
+ * helper functions to deal with 32 or 64bit block numbers.
+ */
+_INLINE_ size_t journal_tag_bytes(journal_t *journal)
+{
+ size_t sz;
+
+ if (jbd2_has_feature_csum3(journal))
+ return sizeof(journal_block_tag3_t);
+
+ sz = sizeof(journal_block_tag_t);
+
+ if (jbd2_has_feature_csum2(journal))
+ sz += sizeof(__u16);
+
+ if (jbd2_has_feature_64bit(journal))
+ return sz;
+
+ return sz - sizeof(__u32);
+}
+
+_INLINE_ int jbd2_journal_has_csum_v2or3(journal_t *journal)
+{
+ if (jbd2_has_feature_csum2(journal) || jbd2_has_feature_csum3(journal))
+ return 1;
+
+ return 0;
+}
+
+_INLINE_ int jbd2_journal_get_num_fc_blks(journal_superblock_t *jsb)
+{
+ int num_fc_blocks = be32_to_cpu(jsb->s_num_fc_blks);
+
+ return num_fc_blocks ? num_fc_blocks : JBD2_DEFAULT_FAST_COMMIT_BLOCKS;
+}
+
+/* Comparison functions for transaction IDs: perform comparisons using
+ * modulo arithmetic so that they work over sequence number wraps. */
+
+_INLINE_ int tid_gt(tid_t x, tid_t y)
+{
+ int difference = (x - y);
+ return (difference > 0);
+}
+
+_INLINE_ int tid_geq(tid_t x, tid_t y)
+{
+ int difference = (x - y);
+ return (difference >= 0);
+}
+#endif /* (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS)) */
+
+#undef _INLINE_
+
+extern int journal_blocks_per_page(struct inode *inode);
+
+/*
+ * Definitions which augment the buffer_head layer
+ */
+
+/* journaling buffer types */
+#define BJ_None 0 /* Not journaled */
+#define BJ_SyncData 1 /* Normal data: flush before commit */
+#define BJ_AsyncData 2 /* writepage data: wait on it before commit */
+#define BJ_Metadata 3 /* Normal journaled metadata */
+#define BJ_Forget 4 /* Buffer superseded by this transaction */
+#define BJ_IO 5 /* Buffer is for temporary IO use */
+#define BJ_Shadow 6 /* Buffer contents being shadowed to the log */
+#define BJ_LogCtl 7 /* Buffer contains log descriptors */
+#define BJ_Reserved 8 /* Buffer is reserved for access by journal */
+#define BJ_Types 9
+
+extern int jbd_blocks_per_page(struct inode *inode);
+
+#endif /* _LINUX_JBD_H */
diff --git a/lib/ext2fs/kernel-list.h b/lib/ext2fs/kernel-list.h
new file mode 100644
index 0000000..dd7b8e0
--- /dev/null
+++ b/lib/ext2fs/kernel-list.h
@@ -0,0 +1,111 @@
+#ifndef _LINUX_LIST_H
+#define _LINUX_LIST_H
+
+#include "compiler.h"
+
+/*
+ * Simple doubly linked list implementation.
+ *
+ * Some of the internal functions ("__xxx") are useful when
+ * manipulating whole lists rather than single entries, as
+ * sometimes we already know the next/prev entries and we can
+ * generate better code by using them directly rather than
+ * using the generic single-entry routines.
+ */
+
+struct list_head {
+ struct list_head *next, *prev;
+};
+
+#define LIST_HEAD_INIT(name) { &(name), &(name) }
+
+#define INIT_LIST_HEAD(ptr) do { \
+ (ptr)->next = (ptr); (ptr)->prev = (ptr); \
+} while (0)
+
+#if (!defined(__GNUC__) && !defined(__WATCOMC__))
+#define __inline__
+#endif
+
+/*
+ * Insert a new entry between two known consecutive entries.
+ *
+ * This is only for internal list manipulation where we know
+ * the prev/next entries already!
+ */
+static __inline__ void __list_add(struct list_head * new,
+ struct list_head * prev,
+ struct list_head * next)
+{
+ next->prev = new;
+ new->next = next;
+ new->prev = prev;
+ prev->next = new;
+}
+
+/*
+ * Insert a new entry after the specified head..
+ */
+static __inline__ void list_add(struct list_head *new, struct list_head *head)
+{
+ __list_add(new, head, head->next);
+}
+
+/*
+ * Insert a new entry at the tail
+ */
+static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
+{
+ __list_add(new, head->prev, head);
+}
+
+/*
+ * Delete a list entry by making the prev/next entries
+ * point to each other.
+ *
+ * This is only for internal list manipulation where we know
+ * the prev/next entries already!
+ */
+static __inline__ void __list_del(struct list_head * prev,
+ struct list_head * next)
+{
+ next->prev = prev;
+ prev->next = next;
+}
+
+static __inline__ void list_del(struct list_head *entry)
+{
+ __list_del(entry->prev, entry->next);
+}
+
+static __inline__ int list_empty(struct list_head *head)
+{
+ return head->next == head;
+}
+
+/*
+ * Splice in "list" into "head"
+ */
+static __inline__ void list_splice(struct list_head *list, struct list_head *head)
+{
+ struct list_head *first = list->next;
+
+ if (first != list) {
+ struct list_head *last = list->prev;
+ struct list_head *at = head->next;
+
+ first->prev = head;
+ head->next = first;
+
+ last->next = at;
+ at->prev = last;
+ }
+}
+
+#define list_entry(ptr, type, member) \
+ container_of(ptr, type, member)
+
+#define list_for_each(pos, head) \
+ for (pos = (head)->next; pos != (head); pos = pos->next)
+
+#endif
diff --git a/lib/ext2fs/link.c b/lib/ext2fs/link.c
new file mode 100644
index 0000000..d69b1e3
--- /dev/null
+++ b/lib/ext2fs/link.c
@@ -0,0 +1,646 @@
+/*
+ * link.c --- create links in a ext2fs directory
+ *
+ * Copyright (C) 1993, 1994 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+#define EXT2_DX_ROOT_OFF 24
+
+struct dx_frame {
+ void *buf;
+ blk64_t pblock;
+ struct ext2_dx_countlimit *head;
+ struct ext2_dx_entry *entries;
+ struct ext2_dx_entry *at;
+};
+
+struct dx_lookup_info {
+ const char *name;
+ int namelen;
+ int hash_alg;
+ __u32 hash;
+ unsigned levels;
+ struct dx_frame frames[EXT4_HTREE_LEVEL];
+};
+
+static errcode_t alloc_dx_frame(ext2_filsys fs, struct dx_frame *frame)
+{
+ return ext2fs_get_mem(fs->blocksize, &frame->buf);
+}
+
+static void dx_release(struct dx_lookup_info *info)
+{
+ unsigned level;
+
+ for (level = 0; level < info->levels; level++) {
+ if (info->frames[level].buf == NULL)
+ break;
+ ext2fs_free_mem(&(info->frames[level].buf));
+ }
+ info->levels = 0;
+}
+
+static void dx_search_entry(struct dx_frame *frame, int count, __u32 hash)
+{
+ struct ext2_dx_entry *p, *q, *m;
+
+ p = frame->entries + 1;
+ q = frame->entries + count - 1;
+ while (p <= q) {
+ m = p + (q - p) / 2;
+ if (ext2fs_le32_to_cpu(m->hash) > hash)
+ q = m - 1;
+ else
+ p = m + 1;
+ }
+ frame->at = p - 1;
+}
+
+static errcode_t load_logical_dir_block(ext2_filsys fs, ext2_ino_t dir,
+ struct ext2_inode *diri, blk64_t block,
+ blk64_t *pblk, void *buf)
+{
+ errcode_t errcode;
+ int ret_flags;
+
+ errcode = ext2fs_bmap2(fs, dir, diri, NULL, 0, block, &ret_flags,
+ pblk);
+ if (errcode)
+ return errcode;
+ if (ret_flags & BMAP_RET_UNINIT)
+ return EXT2_ET_DIR_CORRUPTED;
+ return ext2fs_read_dir_block4(fs, *pblk, buf, 0, dir);
+}
+
+static errcode_t dx_lookup(ext2_filsys fs, ext2_ino_t dir,
+ struct ext2_inode *diri, struct dx_lookup_info *info)
+{
+ struct ext2_dx_root_info *root;
+ errcode_t errcode;
+ int level = 0;
+ int count, limit;
+ int hash_alg;
+ int hash_flags = diri->i_flags & EXT4_CASEFOLD_FL;
+ __u32 minor_hash;
+ struct dx_frame *frame;
+
+ errcode = alloc_dx_frame(fs, &(info->frames[0]));
+ if (errcode)
+ return errcode;
+ info->levels = 1;
+
+ errcode = load_logical_dir_block(fs, dir, diri, 0,
+ &(info->frames[0].pblock),
+ info->frames[0].buf);
+ if (errcode)
+ goto out_err;
+ root = (struct ext2_dx_root_info *) ((char *)info->frames[0].buf +
+ EXT2_DX_ROOT_OFF);
+ hash_alg = root->hash_version;
+ if (hash_alg != EXT2_HASH_TEA && hash_alg != EXT2_HASH_HALF_MD4 &&
+ hash_alg != EXT2_HASH_LEGACY) {
+ errcode = EXT2_ET_DIRHASH_UNSUPP;
+ goto out_err;
+ }
+ if (hash_alg <= EXT2_HASH_TEA &&
+ fs->super->s_flags & EXT2_FLAGS_UNSIGNED_HASH)
+ hash_alg += 3;
+ if (root->indirect_levels >= ext2_dir_htree_level(fs)) {
+ errcode = EXT2_ET_DIR_CORRUPTED;
+ goto out_err;
+ }
+ info->hash_alg = hash_alg;
+
+ errcode = ext2fs_dirhash2(hash_alg, info->name, info->namelen,
+ fs->encoding, hash_flags,
+ fs->super->s_hash_seed, &info->hash,
+ &minor_hash);
+ if (errcode)
+ goto out_err;
+
+ for (level = 0; level <= root->indirect_levels; level++) {
+ frame = &(info->frames[level]);
+ if (level > 0) {
+ errcode = alloc_dx_frame(fs, frame);
+ if (errcode)
+ goto out_err;
+ info->levels++;
+
+ errcode = load_logical_dir_block(fs, dir, diri,
+ ext2fs_le32_to_cpu(info->frames[level-1].at->block) & 0x0fffffff,
+ &(frame->pblock), frame->buf);
+ if (errcode)
+ goto out_err;
+ }
+ errcode = ext2fs_get_dx_countlimit(fs, frame->buf,
+ &(frame->head), NULL);
+ if (errcode)
+ goto out_err;
+ count = ext2fs_le16_to_cpu(frame->head->count);
+ limit = ext2fs_le16_to_cpu(frame->head->limit);
+ frame->entries = (struct ext2_dx_entry *)(frame->head);
+ if (!count || count > limit) {
+ errcode = EXT2_ET_DIR_CORRUPTED;
+ goto out_err;
+ }
+
+ dx_search_entry(frame, count, info->hash);
+ }
+ return 0;
+out_err:
+ dx_release(info);
+ return errcode;
+}
+
+struct link_struct {
+ ext2_filsys fs;
+ const char *name;
+ int namelen;
+ ext2_ino_t inode;
+ int flags;
+ int done;
+ unsigned int blocksize;
+ errcode_t err;
+ struct ext2_super_block *sb;
+};
+
+static int link_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entru EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data)
+{
+ struct link_struct *ls = (struct link_struct *) priv_data;
+ struct ext2_dir_entry *next;
+ unsigned int rec_len, min_rec_len, curr_rec_len;
+ int ret = 0;
+ int csum_size = 0;
+
+ if (ls->done)
+ return DIRENT_ABORT;
+
+ rec_len = EXT2_DIR_REC_LEN(ls->namelen);
+
+ ls->err = ext2fs_get_rec_len(ls->fs, dirent, &curr_rec_len);
+ if (ls->err)
+ return DIRENT_ABORT;
+
+ if (ext2fs_has_feature_metadata_csum(ls->fs->super))
+ csum_size = sizeof(struct ext2_dir_entry_tail);
+ /*
+ * See if the following directory entry (if any) is unused;
+ * if so, absorb it into this one.
+ */
+ next = (struct ext2_dir_entry *) (buf + offset + curr_rec_len);
+ if ((offset + (int) curr_rec_len < blocksize - (8 + csum_size)) &&
+ (next->inode == 0) &&
+ (offset + (int) curr_rec_len + (int) next->rec_len <= blocksize)) {
+ curr_rec_len += next->rec_len;
+ ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent);
+ if (ls->err)
+ return DIRENT_ABORT;
+ ret = DIRENT_CHANGED;
+ }
+
+ /*
+ * If the directory entry is used, see if we can split the
+ * directory entry to make room for the new name. If so,
+ * truncate it and return.
+ */
+ if (dirent->inode) {
+ min_rec_len = EXT2_DIR_REC_LEN(ext2fs_dirent_name_len(dirent));
+ if (curr_rec_len < (min_rec_len + rec_len))
+ return ret;
+ rec_len = curr_rec_len - min_rec_len;
+ ls->err = ext2fs_set_rec_len(ls->fs, min_rec_len, dirent);
+ if (ls->err)
+ return DIRENT_ABORT;
+ next = (struct ext2_dir_entry *) (buf + offset +
+ dirent->rec_len);
+ next->inode = 0;
+ ext2fs_dirent_set_name_len(next, 0);
+ ext2fs_dirent_set_file_type(next, 0);
+ ls->err = ext2fs_set_rec_len(ls->fs, rec_len, next);
+ if (ls->err)
+ return DIRENT_ABORT;
+ return DIRENT_CHANGED;
+ }
+
+ /*
+ * If we get this far, then the directory entry is not used.
+ * See if we can fit the request entry in. If so, do it.
+ */
+ if (curr_rec_len < rec_len)
+ return ret;
+ dirent->inode = ls->inode;
+ ext2fs_dirent_set_name_len(dirent, ls->namelen);
+ strncpy(dirent->name, ls->name, ls->namelen);
+ if (ext2fs_has_feature_filetype(ls->sb))
+ ext2fs_dirent_set_file_type(dirent, ls->flags & 0x7);
+
+ ls->done++;
+ return DIRENT_ABORT|DIRENT_CHANGED;
+}
+
+static errcode_t add_dirent_to_buf(ext2_filsys fs, e2_blkcnt_t blockcnt,
+ char *buf, ext2_ino_t dir,
+ struct ext2_inode *diri, const char *name,
+ ext2_ino_t ino, int flags, blk64_t *pblkp)
+{
+ struct dir_context ctx;
+ struct link_struct ls;
+ errcode_t retval;
+
+ retval = load_logical_dir_block(fs, dir, diri, blockcnt, pblkp, buf);
+ if (retval)
+ return retval;
+ ctx.errcode = 0;
+ ctx.func = link_proc;
+ ctx.dir = dir;
+ ctx.flags = DIRENT_FLAG_INCLUDE_EMPTY;
+ ctx.buf = buf;
+ ctx.priv_data = &ls;
+
+ ls.fs = fs;
+ ls.name = name;
+ ls.namelen = strlen(name);
+ ls.inode = ino;
+ ls.flags = flags;
+ ls.done = 0;
+ ls.sb = fs->super;
+ ls.blocksize = fs->blocksize;
+ ls.err = 0;
+
+ ext2fs_process_dir_block(fs, pblkp, blockcnt, 0, 0, &ctx);
+ if (ctx.errcode)
+ return ctx.errcode;
+ if (ls.err)
+ return ls.err;
+ if (!ls.done)
+ return EXT2_ET_DIR_NO_SPACE;
+ return 0;
+}
+
+struct dx_hash_map {
+ __u32 hash;
+ int size;
+ int off;
+};
+
+static EXT2_QSORT_TYPE dx_hash_map_cmp(const void *ap, const void *bp)
+{
+ const struct dx_hash_map *a = ap, *b = bp;
+
+ if (a->hash < b->hash)
+ return -1;
+ if (a->hash > b->hash)
+ return 1;
+ return 0;
+}
+
+static errcode_t dx_move_dirents(ext2_filsys fs, struct dx_hash_map *map,
+ int count, void *from, void *to)
+{
+ struct ext2_dir_entry *de;
+ int i;
+ int rec_len = 0;
+ errcode_t retval;
+ int csum_size = 0;
+ void *base = to;
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dir_entry_tail);
+
+ for (i = 0; i < count; i++) {
+ de = (struct ext2_dir_entry *) ((char *)from + map[i].off);
+ rec_len = EXT2_DIR_REC_LEN(ext2fs_dirent_name_len(de));
+ memcpy(to, de, rec_len);
+ retval = ext2fs_set_rec_len(fs, rec_len, to);
+ if (retval)
+ return retval;
+ to = (char *)to + rec_len;
+ }
+ /*
+ * Update rec_len of the last dir entry to stretch to the end of block
+ */
+ to = (char *)to - rec_len;
+ rec_len = fs->blocksize - ((char *)to - (char *)base) - csum_size;
+ retval = ext2fs_set_rec_len(fs, rec_len, to);
+ if (retval)
+ return retval;
+ if (csum_size)
+ ext2fs_initialize_dirent_tail(fs,
+ EXT2_DIRENT_TAIL(base, fs->blocksize));
+ return 0;
+}
+
+static errcode_t dx_insert_entry(ext2_filsys fs, ext2_ino_t dir,
+ struct dx_lookup_info *info, int level,
+ __u32 hash, blk64_t lblk)
+{
+ int pcount;
+ struct ext2_dx_entry *top, *new;
+
+ pcount = ext2fs_le16_to_cpu(info->frames[level].head->count);
+ top = info->frames[level].entries + pcount;
+ new = info->frames[level].at + 1;
+ memmove(new + 1, new, (char *)top - (char *)new);
+ new->hash = ext2fs_cpu_to_le32(hash);
+ new->block = ext2fs_cpu_to_le32(lblk);
+ info->frames[level].head->count = ext2fs_cpu_to_le16(pcount + 1);
+ return ext2fs_write_dir_block4(fs, info->frames[level].pblock,
+ info->frames[level].buf, 0, dir);
+}
+
+static errcode_t dx_split_leaf(ext2_filsys fs, ext2_ino_t dir,
+ struct ext2_inode *diri,
+ struct dx_lookup_info *info, void *buf,
+ blk64_t leaf_pblk, blk64_t new_lblk,
+ blk64_t new_pblk)
+{
+ int hash_flags = diri->i_flags & EXT4_CASEFOLD_FL;
+ struct ext2_dir_entry *de;
+ void *buf2;
+ errcode_t retval = 0;
+ unsigned int rec_len;
+ unsigned int offset, move_size;
+ int i, count = 0;
+ struct dx_hash_map *map;
+ int continued;
+ __u32 minor_hash;
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf2);
+ if (retval)
+ return retval;
+ retval = ext2fs_get_array(fs->blocksize / 12,
+ sizeof(struct dx_hash_map), &map);
+ if (retval) {
+ ext2fs_free_mem(&buf2);
+ return retval;
+ }
+ for (offset = 0; offset < fs->blocksize; offset += rec_len) {
+ de = (struct ext2_dir_entry *) ((char *)buf + offset);
+ retval = ext2fs_get_rec_len(fs, de, &rec_len);
+ if (retval)
+ goto out;
+ if (ext2fs_dirent_name_len(de) > 0 && de->inode) {
+ map[count].off = offset;
+ map[count].size = rec_len;
+ retval = ext2fs_dirhash2(info->hash_alg, de->name,
+ ext2fs_dirent_name_len(de),
+ fs->encoding, hash_flags,
+ fs->super->s_hash_seed,
+ &(map[count].hash),
+ &minor_hash);
+ if (retval)
+ goto out;
+ count++;
+ }
+ }
+ qsort(map, count, sizeof(struct dx_hash_map), dx_hash_map_cmp);
+ move_size = 0;
+ /* Find place to split block */
+ for (i = count - 1; i >= 0; i--) {
+ if (move_size + map[i].size / 2 > fs->blocksize / 2)
+ break;
+ move_size += map[i].size;
+ }
+ /* Let i be the first entry to move */
+ i++;
+ /* Move selected directory entries to new block */
+ retval = dx_move_dirents(fs, map + i, count - i, buf, buf2);
+ if (retval)
+ goto out;
+ retval = ext2fs_write_dir_block4(fs, new_pblk, buf2, 0, dir);
+ if (retval)
+ goto out;
+ /* Repack remaining entries in the old block */
+ retval = dx_move_dirents(fs, map, i, buf, buf2);
+ if (retval)
+ goto out;
+ retval = ext2fs_write_dir_block4(fs, leaf_pblk, buf2, 0, dir);
+ if (retval)
+ goto out;
+ /* Update parent node */
+ continued = map[i].hash == map[i-1].hash;
+ retval = dx_insert_entry(fs, dir, info, info->levels - 1,
+ map[i].hash + continued, new_lblk);
+out:
+ ext2fs_free_mem(&buf2);
+ ext2fs_free_mem(&map);
+ return retval;
+}
+
+static errcode_t dx_grow_tree(ext2_filsys fs, ext2_ino_t dir,
+ struct ext2_inode *diri,
+ struct dx_lookup_info *info, void *buf,
+ blk64_t leaf_pblk)
+{
+ int i;
+ errcode_t retval;
+ ext2_off64_t size = EXT2_I_SIZE(diri);
+ blk64_t lblk, pblk;
+ struct ext2_dir_entry *de;
+ struct ext2_dx_countlimit *head;
+ int csum_size = 0;
+ int count;
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dx_tail);
+
+ /* Find level which can accommodate new child */
+ for (i = info->levels - 1; i >= 0; i--)
+ if (ext2fs_le16_to_cpu(info->frames[i].head->count) <
+ ext2fs_le16_to_cpu(info->frames[i].head->limit))
+ break;
+ /* Need to grow tree depth? */
+ if (i < 0 && info->levels >= ext2_dir_htree_level(fs))
+ return EXT2_ET_DIR_NO_SPACE;
+ lblk = size / fs->blocksize;
+ size += fs->blocksize;
+ retval = ext2fs_inode_size_set(fs, diri, size);
+ if (retval)
+ return retval;
+ retval = ext2fs_fallocate(fs,
+ EXT2_FALLOCATE_FORCE_INIT | EXT2_FALLOCATE_ZERO_BLOCKS,
+ dir, diri, 0, lblk, 1);
+ if (retval)
+ return retval;
+ retval = ext2fs_write_inode(fs, dir, diri);
+ if (retval)
+ return retval;
+ retval = ext2fs_bmap2(fs, dir, diri, NULL, 0, lblk, NULL, &pblk);
+ if (retval)
+ return retval;
+ /* Only leaf addition needed? */
+ if (i == (int)info->levels - 1)
+ return dx_split_leaf(fs, dir, diri, info, buf, leaf_pblk,
+ lblk, pblk);
+
+ de = buf;
+ de->inode = 0;
+ ext2fs_dirent_set_name_len(de, 0);
+ ext2fs_dirent_set_file_type(de, 0);
+ retval = ext2fs_set_rec_len(fs, fs->blocksize, de);
+ if (retval)
+ return retval;
+ head = (struct ext2_dx_countlimit *) ((char *)buf + 8);
+ count = ext2fs_le16_to_cpu(info->frames[i+1].head->count);
+ /* Growing tree depth? */
+ if (i < 0) {
+ struct ext2_dx_root_info *root;
+
+ memcpy(head, info->frames[0].entries,
+ count * sizeof(struct ext2_dx_entry));
+ head->limit = ext2fs_cpu_to_le16(
+ (fs->blocksize - (8 + csum_size)) /
+ sizeof(struct ext2_dx_entry));
+ /* head->count gets set by memcpy above to correct value */
+
+ /* Now update tree root */
+ info->frames[0].head->count = ext2fs_cpu_to_le16(1);
+ info->frames[0].entries[0].block = ext2fs_cpu_to_le32(lblk);
+ root = (struct ext2_dx_root_info *)
+ ((char *)info->frames[0].buf + EXT2_DX_ROOT_OFF);
+ root->indirect_levels++;
+ } else {
+ /* Splitting internal node in two */
+ int count1 = count / 2;
+ int count2 = count - count1;
+ __u32 split_hash = ext2fs_le32_to_cpu(info->frames[i+1].entries[count1].hash);
+
+ memcpy(head, info->frames[i+1].entries + count1,
+ count2 * sizeof(struct ext2_dx_entry));
+ head->count = ext2fs_cpu_to_le16(count2);
+ head->limit = ext2fs_cpu_to_le16(
+ (fs->blocksize - (8 + csum_size)) /
+ sizeof(struct ext2_dx_entry));
+ info->frames[i+1].head->count = ext2fs_cpu_to_le16(count1);
+
+ /* Update parent node */
+ retval = dx_insert_entry(fs, dir, info, i, split_hash, lblk);
+ if (retval)
+ return retval;
+
+ }
+ /* Writeout split block / updated root */
+ retval = ext2fs_write_dir_block4(fs, info->frames[i+1].pblock,
+ info->frames[i+1].buf, 0, dir);
+ if (retval)
+ return retval;
+ /* Writeout new tree block */
+ retval = ext2fs_write_dir_block4(fs, pblk, buf, 0, dir);
+ if (retval)
+ return retval;
+ return 0;
+}
+
+static errcode_t dx_link(ext2_filsys fs, ext2_ino_t dir,
+ struct ext2_inode *diri, const char *name,
+ ext2_ino_t ino, int flags)
+{
+ struct dx_lookup_info dx_info;
+ errcode_t retval;
+ void *blockbuf;
+ unsigned restart = 0;
+ blk64_t leaf_pblk;
+
+ retval = ext2fs_get_mem(fs->blocksize, &blockbuf);
+ if (retval)
+ return retval;
+
+ dx_info.name = name;
+ dx_info.namelen = strlen(name);
+again:
+ retval = dx_lookup(fs, dir, diri, &dx_info);
+ if (retval)
+ goto free_buf;
+
+ retval = add_dirent_to_buf(fs,
+ ext2fs_le32_to_cpu(dx_info.frames[dx_info.levels-1].at->block) & 0x0fffffff,
+ blockbuf, dir, diri, name, ino, flags, &leaf_pblk);
+ /*
+ * Success or error other than ENOSPC...? We are done. We may need upto
+ * two tries to add entry. One to split htree node and another to add
+ * new leaf block.
+ */
+ if (restart >= dx_info.levels || retval != EXT2_ET_DIR_NO_SPACE)
+ goto free_frames;
+ retval = dx_grow_tree(fs, dir, diri, &dx_info, blockbuf, leaf_pblk);
+ if (retval)
+ goto free_frames;
+ /* Restart everything now that the tree is larger */
+ restart++;
+ dx_release(&dx_info);
+ goto again;
+free_frames:
+ dx_release(&dx_info);
+free_buf:
+ ext2fs_free_mem(&blockbuf);
+ return retval;
+}
+
+/*
+ * Note: the low 3 bits of the flags field are used as the directory
+ * entry filetype.
+ */
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+errcode_t ext2fs_link(ext2_filsys fs, ext2_ino_t dir, const char *name,
+ ext2_ino_t ino, int flags)
+{
+ errcode_t retval;
+ struct link_struct ls;
+ struct ext2_inode inode;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ if ((retval = ext2fs_read_inode(fs, dir, &inode)) != 0)
+ return retval;
+
+ if (inode.i_flags & EXT2_INDEX_FL)
+ return dx_link(fs, dir, &inode, name, ino, flags);
+
+ ls.fs = fs;
+ ls.name = name;
+ ls.namelen = name ? strlen(name) : 0;
+ ls.inode = ino;
+ ls.flags = flags;
+ ls.done = 0;
+ ls.sb = fs->super;
+ ls.blocksize = fs->blocksize;
+ ls.err = 0;
+
+ retval = ext2fs_dir_iterate2(fs, dir, DIRENT_FLAG_INCLUDE_EMPTY,
+ NULL, link_proc, &ls);
+ if (retval)
+ return retval;
+ if (ls.err)
+ return ls.err;
+
+ if (!ls.done)
+ return EXT2_ET_DIR_NO_SPACE;
+ return 0;
+}
diff --git a/lib/ext2fs/llseek.c b/lib/ext2fs/llseek.c
new file mode 100644
index 0000000..45f21d0
--- /dev/null
+++ b/lib/ext2fs/llseek.c
@@ -0,0 +1,145 @@
+/*
+ * llseek.c -- stub calling the llseek system call
+ *
+ * Copyright (C) 1994, 1995, 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef __MSDOS__
+#include <io.h>
+#endif
+#include "et/com_err.h"
+#include "ext2fs/ext2_io.h"
+
+#ifdef __linux__
+
+#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
+
+#define my_llseek lseek64
+
+#else
+#if defined(HAVE_LLSEEK)
+#include <sys/syscall.h>
+
+#ifndef HAVE_LLSEEK_PROTOTYPE
+extern long long llseek (int fd, long long offset, int origin);
+#endif
+
+#define my_llseek llseek
+
+#else /* ! HAVE_LLSEEK */
+
+#if SIZEOF_LONG == SIZEOF_LONG_LONG || _FILE_OFFSET_BITS+0 == 64
+
+#define my_llseek lseek
+
+#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
+
+#include <linux/unistd.h>
+
+#ifndef __NR__llseek
+#define __NR__llseek 140
+#endif
+
+#ifndef __i386__
+static int _llseek (unsigned int, unsigned long,
+ unsigned long, ext2_loff_t *, unsigned int);
+
+static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
+ unsigned long, offset_low,ext2_loff_t *,result,
+ unsigned int, origin);
+#endif
+
+static ext2_loff_t my_llseek (int fd, ext2_loff_t offset, int origin)
+{
+ ext2_loff_t result;
+ int retval;
+
+#ifndef __i386__
+ retval = _llseek(fd, ((unsigned long long) offset) >> 32,
+#else
+ retval = syscall(__NR__llseek, fd, (unsigned long long) (offset >> 32),
+#endif
+ ((unsigned long long) offset) & 0xffffffff,
+ &result, origin);
+ return (retval == -1 ? (ext2_loff_t) retval : result);
+}
+
+#endif /* SIZE_LONG == SIZEOF_LONG_LONG */
+
+#endif /* HAVE_LLSEEK */
+#endif /* defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE) */
+
+ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin)
+{
+#if SIZEOF_OFF_T >= SIZEOF_LONG_LONG
+ return my_llseek (fd, offset, origin);
+#else
+ ext2_loff_t result;
+ static int do_compat = 0;
+
+ if (do_compat)
+ goto fallback;
+
+ result = my_llseek (fd, offset, origin);
+ if (result == -1 && errno == ENOSYS) {
+ /*
+ * Just in case this code runs on top of an old kernel
+ * which does not support the llseek system call
+ */
+ do_compat++;
+ fallback:
+ if (offset < ((ext2_loff_t) 1 << ((sizeof(off_t)*8) -1)))
+ return lseek(fd, (off_t) offset, origin);
+ errno = EINVAL;
+ return -1;
+ }
+ return result;
+#endif
+}
+
+#else /* !linux */
+
+#ifndef EINVAL
+#define EINVAL EXT2_ET_INVALID_ARGUMENT
+#endif
+
+ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin)
+{
+#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
+ return lseek64 (fd, offset, origin);
+#else
+ if ((sizeof(off_t) < sizeof(ext2_loff_t)) &&
+ (offset >= ((ext2_loff_t) 1 << ((sizeof(off_t)*8) -1)))) {
+ errno = EINVAL;
+ return -1;
+ }
+ return lseek (fd, (off_t) offset, origin);
+#endif
+}
+
+#endif /* linux */
+
+
diff --git a/lib/ext2fs/lookup.c b/lib/ext2fs/lookup.c
new file mode 100644
index 0000000..c1d802c
--- /dev/null
+++ b/lib/ext2fs/lookup.c
@@ -0,0 +1,70 @@
+/*
+ * lookup.c --- ext2fs directory lookup operations
+ *
+ * Copyright (C) 1993, 1994, 1994, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct lookup_struct {
+ const char *name;
+ int len;
+ ext2_ino_t *inode;
+ int found;
+};
+
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int lookup_proc(struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct lookup_struct *ls = (struct lookup_struct *) priv_data;
+
+ if (ls->len != ext2fs_dirent_name_len(dirent))
+ return 0;
+ if (strncmp(ls->name, dirent->name, ext2fs_dirent_name_len(dirent)))
+ return 0;
+ *ls->inode = dirent->inode;
+ ls->found++;
+ return DIRENT_ABORT;
+}
+
+
+errcode_t ext2fs_lookup(ext2_filsys fs, ext2_ino_t dir, const char *name,
+ int namelen, char *buf, ext2_ino_t *inode)
+{
+ errcode_t retval;
+ struct lookup_struct ls;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ ls.name = name;
+ ls.len = namelen;
+ ls.inode = inode;
+ ls.found = 0;
+
+ retval = ext2fs_dir_iterate(fs, dir, 0, buf, lookup_proc, &ls);
+ if (retval)
+ return retval;
+
+ return (ls.found) ? 0 : EXT2_ET_FILE_NOT_FOUND;
+}
+
+
diff --git a/lib/ext2fs/mkdir.c b/lib/ext2fs/mkdir.c
new file mode 100644
index 0000000..437c8ff
--- /dev/null
+++ b/lib/ext2fs/mkdir.c
@@ -0,0 +1,200 @@
+/*
+ * mkdir.c --- make a directory in the filesystem
+ *
+ * Copyright (C) 1994, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+#ifndef EXT2_FT_DIR
+#define EXT2_FT_DIR 2
+#endif
+
+errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum,
+ const char *name)
+{
+ ext2_extent_handle_t handle;
+ errcode_t retval;
+ struct ext2_inode parent_inode, inode;
+ ext2_ino_t ino = inum;
+ ext2_ino_t scratch_ino;
+ blk64_t blk;
+ char *block = 0;
+ int inline_data = 0;
+ int drop_refcount = 0;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ /*
+ * Create a new dir with inline data iff this feature is enabled
+ * and ino >= EXT2_FIRST_INO.
+ */
+ if ((!ino || ino >= EXT2_FIRST_INO(fs->super)) &&
+ ext2fs_has_feature_inline_data(fs->super))
+ inline_data = 1;
+
+ /*
+ * Allocate an inode, if necessary
+ */
+ if (!ino) {
+ retval = ext2fs_new_inode(fs, parent, LINUX_S_IFDIR | 0755,
+ 0, &ino);
+ if (retval)
+ goto cleanup;
+ }
+
+ /*
+ * Allocate a data block for the directory
+ */
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ if (!inline_data) {
+ retval = ext2fs_new_block2(fs, ext2fs_find_inode_goal(fs, ino,
+ &inode,
+ 0),
+ NULL, &blk);
+ if (retval)
+ goto cleanup;
+ }
+
+ /*
+ * Create a scratch template for the directory
+ */
+ if (inline_data)
+ retval = ext2fs_new_dir_inline_data(fs, ino, parent,
+ inode.i_block);
+ else
+ retval = ext2fs_new_dir_block(fs, ino, parent, &block);
+ if (retval)
+ goto cleanup;
+
+ /*
+ * Get the parent's inode, if necessary
+ */
+ if (parent != ino) {
+ retval = ext2fs_read_inode(fs, parent, &parent_inode);
+ if (retval)
+ goto cleanup;
+ } else
+ memset(&parent_inode, 0, sizeof(parent_inode));
+
+ /*
+ * Create the inode structure....
+ */
+ inode.i_mode = LINUX_S_IFDIR | (0777 & ~fs->umask);
+ inode.i_uid = inode.i_gid = 0;
+ if (inline_data) {
+ inode.i_flags |= EXT4_INLINE_DATA_FL;
+ inode.i_size = EXT4_MIN_INLINE_DATA_SIZE;
+ } else {
+ if (ext2fs_has_feature_extents(fs->super))
+ inode.i_flags |= EXT4_EXTENTS_FL;
+ else
+ inode.i_block[0] = blk;
+ inode.i_size = fs->blocksize;
+ ext2fs_iblk_set(fs, &inode, 1);
+ }
+ inode.i_links_count = 2;
+
+ /*
+ * Write out the inode and inode data block. The inode generation
+ * number is assigned by write_new_inode, which means that the call
+ * to write_dir_block must come after that.
+ */
+ retval = ext2fs_write_new_inode(fs, ino, &inode);
+ if (retval)
+ goto cleanup;
+ if (inline_data) {
+ /* init "system.data" for new dir */
+ retval = ext2fs_inline_data_init(fs, ino);
+ } else {
+ retval = ext2fs_write_dir_block4(fs, blk, block, 0, ino);
+ if (retval)
+ goto cleanup;
+
+ if (ext2fs_has_feature_extents(fs->super)) {
+ retval = ext2fs_extent_open2(fs, ino, &inode, &handle);
+ if (retval)
+ goto cleanup;
+ retval = ext2fs_extent_set_bmap(handle, 0, blk, 0);
+ ext2fs_extent_free(handle);
+ if (retval)
+ goto cleanup;
+ }
+ }
+
+ /*
+ * Update accounting....
+ */
+ if (!inline_data)
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+ ext2fs_inode_alloc_stats2(fs, ino, +1, 1);
+ drop_refcount = 1;
+
+ /*
+ * Link the directory into the filesystem hierarchy
+ */
+ if (name) {
+ retval = ext2fs_lookup(fs, parent, name, strlen(name), 0,
+ &scratch_ino);
+ if (!retval) {
+ retval = EXT2_ET_DIR_EXISTS;
+ name = 0;
+ goto cleanup;
+ }
+ if (retval != EXT2_ET_FILE_NOT_FOUND)
+ goto cleanup;
+ retval = ext2fs_link(fs, parent, name, ino, EXT2_FT_DIR);
+ if (retval)
+ goto cleanup;
+ }
+
+ /*
+ * Update parent inode's counts
+ */
+ if (parent != ino) {
+ /* reload parent inode due to inline data */
+ retval = ext2fs_read_inode(fs, parent, &parent_inode);
+ if (retval)
+ goto cleanup;
+ parent_inode.i_links_count++;
+ retval = ext2fs_write_inode(fs, parent, &parent_inode);
+ if (retval)
+ goto cleanup;
+ }
+ drop_refcount = 0;
+
+cleanup:
+ if (block)
+ ext2fs_free_mem(&block);
+ if (drop_refcount) {
+ if (!inline_data)
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ ext2fs_inode_alloc_stats2(fs, ino, -1, 1);
+ }
+ return retval;
+
+}
+
+
diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c
new file mode 100644
index 0000000..54772dd
--- /dev/null
+++ b/lib/ext2fs/mkjournal.c
@@ -0,0 +1,654 @@
+/*
+ * mkjournal.c --- make a journal for a filesystem
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#include "ext2_fs.h"
+#include "e2p/e2p.h"
+#include "ext2fs.h"
+
+#include "kernel-jbd.h"
+
+/*
+ * This function automatically sets up the journal superblock and
+ * returns it as an allocated block.
+ */
+errcode_t ext2fs_create_journal_superblock2(ext2_filsys fs,
+ struct ext2fs_journal_params *jparams,
+ int flags, char **ret_jsb)
+{
+ errcode_t retval;
+ journal_superblock_t *jsb;
+
+ if (jparams->num_journal_blocks < JBD2_MIN_JOURNAL_BLOCKS)
+ return EXT2_ET_JOURNAL_TOO_SMALL;
+
+ if ((retval = ext2fs_get_mem(fs->blocksize, &jsb)))
+ return retval;
+
+ memset (jsb, 0, fs->blocksize);
+
+ jsb->s_header.h_magic = htonl(JBD2_MAGIC_NUMBER);
+ if (flags & EXT2_MKJOURNAL_V1_SUPER)
+ jsb->s_header.h_blocktype = htonl(JBD2_SUPERBLOCK_V1);
+ else
+ jsb->s_header.h_blocktype = htonl(JBD2_SUPERBLOCK_V2);
+ jsb->s_blocksize = htonl(fs->blocksize);
+ jsb->s_maxlen = htonl(jparams->num_journal_blocks + jparams->num_fc_blocks);
+ jsb->s_nr_users = htonl(1);
+ jsb->s_first = htonl(1);
+ jsb->s_sequence = htonl(1);
+ jsb->s_num_fc_blks = htonl(jparams->num_fc_blocks);
+ memcpy(jsb->s_uuid, fs->super->s_uuid, sizeof(fs->super->s_uuid));
+ /*
+ * If we're creating an external journal device, we need to
+ * adjust these fields.
+ */
+ if (ext2fs_has_feature_journal_dev(fs->super)) {
+ jsb->s_nr_users = 0;
+ jsb->s_first = htonl(ext2fs_journal_sb_start(fs->blocksize) + 1);
+ }
+
+ *ret_jsb = (char *) jsb;
+ return 0;
+}
+
+errcode_t ext2fs_create_journal_superblock(ext2_filsys fs, __u32 num_blocks,
+ int flags, char **ret_sb)
+{
+ struct ext2fs_journal_params jparams;
+
+ jparams.num_journal_blocks = num_blocks;
+ jparams.num_fc_blocks = 0;
+
+ return ext2fs_create_journal_superblock2(fs, &jparams, flags, ret_sb);
+}
+
+/*
+ * This function writes a journal using POSIX routines. It is used
+ * for creating external journals and creating journals on live
+ * filesystems.
+ */
+static errcode_t write_journal_file(ext2_filsys fs, char *filename,
+ struct ext2fs_journal_params *jparams,
+ int flags)
+{
+ errcode_t retval;
+ char *buf = 0;
+ int fd, ret_size;
+ blk_t i;
+
+ if ((retval = ext2fs_create_journal_superblock2(fs, jparams, flags,
+ &buf)))
+ return retval;
+
+ /* Open the device or journal file */
+ if ((fd = open(filename, O_WRONLY)) < 0) {
+ retval = errno;
+ goto errfree;
+ }
+
+ /* Write the superblock out */
+ retval = EXT2_ET_SHORT_WRITE;
+ ret_size = write(fd, buf, fs->blocksize);
+ if (ret_size < 0) {
+ retval = errno;
+ goto errout;
+ }
+ if (ret_size != (int) fs->blocksize)
+ goto errout;
+ memset(buf, 0, fs->blocksize);
+
+ if (flags & EXT2_MKJOURNAL_LAZYINIT)
+ goto success;
+
+ for (i = 1; i < jparams->num_journal_blocks + jparams->num_fc_blocks; i++) {
+ ret_size = write(fd, buf, fs->blocksize);
+ if (ret_size < 0) {
+ retval = errno;
+ goto errout;
+ }
+ if (ret_size != (int) fs->blocksize)
+ goto errout;
+ }
+
+success:
+ retval = 0;
+errout:
+ close(fd);
+errfree:
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+/*
+ * Convenience function which zeros out _num_ blocks starting at
+ * _blk_. In case of an error, the details of the error is returned
+ * via _ret_blk_ and _ret_count_ if they are non-NULL pointers.
+ * Returns 0 on success, and an error code on an error.
+ *
+ * As a special case, if the first argument is NULL, then it will
+ * attempt to free the static zeroizing buffer. (This is to keep
+ * programs that check for memory leaks happy.)
+ */
+#define MAX_STRIDE_LENGTH (4194304 / (int) fs->blocksize)
+errcode_t ext2fs_zero_blocks2(ext2_filsys fs, blk64_t blk, int num,
+ blk64_t *ret_blk, int *ret_count)
+{
+ int j, count;
+ static void *buf;
+ static int stride_length;
+ errcode_t retval;
+
+ /* If fs is null, clean up the static buffer and return */
+ if (!fs) {
+ if (buf) {
+ free(buf);
+ buf = 0;
+ stride_length = 0;
+ }
+ return 0;
+ }
+
+ /* Deal with zeroing less than 1 block */
+ if (num <= 0)
+ return 0;
+
+ /* Try a zero out command, if supported */
+ retval = io_channel_zeroout(fs->io, blk, num);
+ if (retval == 0)
+ return 0;
+
+ /* Allocate the zeroizing buffer if necessary */
+ if (num > stride_length && stride_length < MAX_STRIDE_LENGTH) {
+ void *p;
+ int new_stride = num;
+
+ if (new_stride > MAX_STRIDE_LENGTH)
+ new_stride = MAX_STRIDE_LENGTH;
+ p = realloc(buf, fs->blocksize * new_stride);
+ if (!p)
+ return EXT2_ET_NO_MEMORY;
+ buf = p;
+ stride_length = new_stride;
+ memset(buf, 0, fs->blocksize * stride_length);
+ }
+ /* OK, do the write loop */
+ j=0;
+ while (j < num) {
+ if (blk % stride_length) {
+ count = stride_length - (blk % stride_length);
+ if (count > (num - j))
+ count = num - j;
+ } else {
+ count = num - j;
+ if (count > stride_length)
+ count = stride_length;
+ }
+ retval = io_channel_write_blk64(fs->io, blk, count, buf);
+ if (retval) {
+ if (ret_count)
+ *ret_count = count;
+ if (ret_blk)
+ *ret_blk = blk;
+ return retval;
+ }
+ j += count; blk += count;
+ }
+ return 0;
+}
+
+errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
+ blk_t *ret_blk, int *ret_count)
+{
+ blk64_t ret_blk2;
+ errcode_t retval;
+
+ retval = ext2fs_zero_blocks2(fs, blk, num, &ret_blk2, ret_count);
+ if (retval)
+ *ret_blk = (blk_t) ret_blk2;
+ return retval;
+}
+
+/*
+ * Calculate the initial goal block to be roughly at the middle of the
+ * filesystem. Pick a group that has the largest number of free
+ * blocks.
+ */
+static blk64_t get_midpoint_journal_block(ext2_filsys fs)
+{
+ dgrp_t group, start, end, i, log_flex;
+
+ group = ext2fs_group_of_blk2(fs, (ext2fs_blocks_count(fs->super) -
+ fs->super->s_first_data_block) / 2);
+ log_flex = 1U << fs->super->s_log_groups_per_flex;
+ if (fs->super->s_log_groups_per_flex && (group > log_flex)) {
+ group = group & ~(log_flex - 1);
+ while ((group < fs->group_desc_count) &&
+ ext2fs_bg_free_blocks_count(fs, group) == 0)
+ group++;
+ if (group == fs->group_desc_count)
+ group = 0;
+ start = group;
+ } else
+ start = (group > 0) ? group-1 : group;
+ end = ((group+1) < fs->group_desc_count) ? group+1 : group;
+ group = start;
+ for (i = start + 1; i <= end; i++)
+ if (ext2fs_bg_free_blocks_count(fs, i) >
+ ext2fs_bg_free_blocks_count(fs, group))
+ group = i;
+ return ext2fs_group_first_block2(fs, group);
+}
+
+/*
+ * This function creates a journal using direct I/O routines.
+ */
+static errcode_t write_journal_inode(ext2_filsys fs, ext2_ino_t journal_ino,
+ struct ext2fs_journal_params *jparams,
+ blk64_t goal, int flags)
+{
+ char *buf;
+ errcode_t retval;
+ struct ext2_inode inode;
+ unsigned long long inode_size;
+ int falloc_flags = EXT2_FALLOCATE_FORCE_INIT;
+ blk64_t zblk;
+
+ if ((retval = ext2fs_create_journal_superblock2(fs, jparams, flags,
+ &buf)))
+ return retval;
+
+ if ((retval = ext2fs_read_bitmaps(fs)))
+ goto out2;
+
+ if ((retval = ext2fs_read_inode(fs, journal_ino, &inode)))
+ goto out2;
+
+ if (inode.i_blocks > 0) {
+ retval = EEXIST;
+ goto out2;
+ }
+
+ if (goal == ~0ULL)
+ goal = get_midpoint_journal_block(fs);
+
+ if (ext2fs_has_feature_extents(fs->super))
+ inode.i_flags |= EXT4_EXTENTS_FL;
+
+ if (!(flags & EXT2_MKJOURNAL_LAZYINIT))
+ falloc_flags |= EXT2_FALLOCATE_ZERO_BLOCKS;
+
+ inode_size = (unsigned long long)fs->blocksize *
+ (jparams->num_journal_blocks + jparams->num_fc_blocks);
+ inode.i_mtime = inode.i_ctime = fs->now ? fs->now : time(0);
+ inode.i_links_count = 1;
+ inode.i_mode = LINUX_S_IFREG | 0600;
+ retval = ext2fs_inode_size_set(fs, &inode, inode_size);
+ if (retval)
+ goto out2;
+
+ retval = ext2fs_fallocate(fs, falloc_flags, journal_ino,
+ &inode, goal, 0,
+ jparams->num_journal_blocks + jparams->num_fc_blocks);
+ if (retval)
+ goto out2;
+
+ if ((retval = ext2fs_write_new_inode(fs, journal_ino, &inode)))
+ goto out2;
+
+ retval = ext2fs_bmap2(fs, journal_ino, &inode, NULL, 0, 0, NULL, &zblk);
+ if (retval)
+ goto out2;
+
+ retval = io_channel_write_blk64(fs->io, zblk, 1, buf);
+ if (retval)
+ goto out2;
+
+ memcpy(fs->super->s_jnl_blocks, inode.i_block, EXT2_N_BLOCKS*4);
+ fs->super->s_jnl_blocks[15] = inode.i_size_high;
+ fs->super->s_jnl_blocks[16] = inode.i_size;
+ fs->super->s_jnl_backup_type = EXT3_JNL_BACKUP_BLOCKS;
+ ext2fs_mark_super_dirty(fs);
+
+out2:
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+/*
+ * Find a reasonable journal file size (in blocks) given the number of blocks
+ * in the filesystem. For very small filesystems, it is not reasonable to
+ * have a journal that fills more than half of the filesystem.
+ *
+ * n.b. comments assume 4k blocks
+ */
+int ext2fs_default_journal_size(__u64 num_blocks)
+{
+ if (num_blocks < 2048)
+ return -1;
+ if (num_blocks < 32768) /* 128 MB */
+ return (1024); /* 4 MB */
+ if (num_blocks < 256*1024) /* 1 GB */
+ return (4096); /* 16 MB */
+ if (num_blocks < 512*1024) /* 2 GB */
+ return (8192); /* 32 MB */
+ if (num_blocks < 4096*1024) /* 16 GB */
+ return (16384); /* 64 MB */
+ if (num_blocks < 8192*1024) /* 32 GB */
+ return (32768); /* 128 MB */
+ if (num_blocks < 16384*1024) /* 64 GB */
+ return (65536); /* 256 MB */
+ if (num_blocks < 32768*1024) /* 128 GB */
+ return (131072); /* 512 MB */
+ return 262144; /* 1 GB */
+}
+
+errcode_t ext2fs_get_journal_params(struct ext2fs_journal_params *params,
+ ext2_filsys fs)
+{
+ blk_t total_blks;
+ int ret;
+
+ memset(params, 0, sizeof(*params));
+ if (ext2fs_has_feature_journal_dev(fs->super)) {
+ total_blks = ext2fs_blocks_count(fs->super);
+ if (total_blks < JBD2_MIN_JOURNAL_BLOCKS)
+ return EXT2_ET_JOURNAL_TOO_SMALL;
+
+ if (!ext2fs_has_feature_fast_commit(fs->super)) {
+ params->num_journal_blocks = total_blks;
+ params->num_fc_blocks = 0;
+ return 0;
+ }
+ params->num_journal_blocks = ext2fs_blocks_count(fs->super) *
+ EXT2_JOURNAL_TO_FC_BLKS_RATIO /
+ (EXT2_JOURNAL_TO_FC_BLKS_RATIO + 1);
+ if (JBD2_MIN_JOURNAL_BLOCKS > params->num_journal_blocks)
+ params->num_journal_blocks = JBD2_MIN_JOURNAL_BLOCKS;
+ params->num_fc_blocks = total_blks - params->num_journal_blocks;
+ return 0;
+ }
+
+ ret = ext2fs_default_journal_size(ext2fs_blocks_count(fs->super));
+ if (ret < 0)
+ return EXT2_ET_JOURNAL_TOO_SMALL;
+
+ params->num_journal_blocks = ret;
+ if (ext2fs_has_feature_fast_commit(fs->super))
+ params->num_fc_blocks = params->num_journal_blocks /
+ EXT2_JOURNAL_TO_FC_BLKS_RATIO;
+ return 0;
+}
+
+int ext2fs_journal_sb_start(int blocksize)
+{
+ if (blocksize == EXT2_MIN_BLOCK_SIZE)
+ return 2;
+ return 1;
+}
+
+/*
+ * This function adds a journal device to a filesystem
+ */
+errcode_t ext2fs_add_journal_device(ext2_filsys fs, ext2_filsys journal_dev)
+{
+ struct stat st;
+ errcode_t retval;
+ char buf[SUPERBLOCK_SIZE];
+ journal_superblock_t *jsb;
+ int start;
+ __u32 i, nr_users;
+
+ /* Make sure the device exists and is a block device */
+ if (stat(journal_dev->device_name, &st) < 0)
+ return errno;
+
+ if (!S_ISBLK(st.st_mode))
+ return EXT2_ET_JOURNAL_NOT_BLOCK; /* Must be a block device */
+
+ /* Get the journal superblock */
+ start = ext2fs_journal_sb_start(journal_dev->blocksize);
+ if ((retval = io_channel_read_blk64(journal_dev->io, start,
+ -SUPERBLOCK_SIZE,
+ buf)))
+ return retval;
+
+ jsb = (journal_superblock_t *) buf;
+ if ((jsb->s_header.h_magic != (unsigned) ntohl(JBD2_MAGIC_NUMBER)) ||
+ (jsb->s_header.h_blocktype != (unsigned) ntohl(JBD2_SUPERBLOCK_V2)))
+ return EXT2_ET_NO_JOURNAL_SB;
+
+ if (ntohl(jsb->s_blocksize) != (unsigned long) fs->blocksize)
+ return EXT2_ET_UNEXPECTED_BLOCK_SIZE;
+
+ /* Check and see if this filesystem has already been added */
+ nr_users = ntohl(jsb->s_nr_users);
+ if (nr_users > JBD2_USERS_MAX)
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+ for (i=0; i < nr_users; i++) {
+ if (memcmp(fs->super->s_uuid,
+ &jsb->s_users[i*16], 16) == 0)
+ break;
+ }
+ if (i >= nr_users) {
+ memcpy(&jsb->s_users[nr_users*16],
+ fs->super->s_uuid, 16);
+ jsb->s_nr_users = htonl(nr_users+1);
+ }
+
+ /* Writeback the journal superblock */
+ if ((retval = io_channel_write_blk64(journal_dev->io, start,
+ -SUPERBLOCK_SIZE, buf)))
+ return retval;
+
+ fs->super->s_journal_inum = 0;
+ fs->super->s_journal_dev = st.st_rdev;
+ memcpy(fs->super->s_journal_uuid, jsb->s_uuid,
+ sizeof(fs->super->s_journal_uuid));
+ memset(fs->super->s_jnl_blocks, 0, sizeof(fs->super->s_jnl_blocks));
+ ext2fs_set_feature_journal(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
+
+/*
+ * This function adds a journal inode to a filesystem, using either
+ * POSIX routines if the filesystem is mounted, or using direct I/O
+ * functions if it is not.
+ */
+errcode_t ext2fs_add_journal_inode3(ext2_filsys fs, struct ext2fs_journal_params *jparams,
+ blk64_t goal, int flags)
+{
+ errcode_t retval;
+ ext2_ino_t journal_ino;
+ struct stat st;
+ char jfile[1024];
+ int mount_flags;
+ int fd = -1;
+
+ if (flags & EXT2_MKJOURNAL_NO_MNT_CHECK)
+ mount_flags = 0;
+ else if ((retval = ext2fs_check_mount_point(fs->device_name,
+ &mount_flags,
+ jfile, sizeof(jfile)-10)))
+ return retval;
+
+ if (mount_flags & EXT2_MF_MOUNTED) {
+#if HAVE_EXT2_IOCTLS
+ int f = 0;
+#endif
+ strcat(jfile, "/.journal");
+
+ /*
+ * If .../.journal already exists, make sure any
+ * immutable or append-only flags are cleared.
+ */
+#if defined(HAVE_CHFLAGS) && defined(UF_NODUMP)
+ (void) chflags (jfile, 0);
+#else
+#if HAVE_EXT2_IOCTLS
+ fd = open(jfile, O_RDONLY);
+ if (fd >= 0) {
+ retval = ioctl(fd, EXT2_IOC_SETFLAGS, &f);
+ close(fd);
+ if (retval)
+ return errno;
+ }
+#endif
+#endif
+
+ /* Create the journal file */
+ if ((fd = open(jfile, O_CREAT|O_WRONLY, 0600)) < 0)
+ return errno;
+
+ /* Note that we can't do lazy journal initialization for mounted
+ * filesystems, since the zero writing is also allocating the
+ * journal blocks. We could use fallocate, but not all kernels
+ * support that, and creating a journal on a mounted ext2
+ * filesystems is extremely rare these days... Ignore it. */
+ flags &= ~EXT2_MKJOURNAL_LAZYINIT;
+
+ if ((retval = write_journal_file(fs, jfile, jparams, flags)))
+ goto errout;
+
+ /* Get inode number of the journal file */
+ if (fstat(fd, &st) < 0) {
+ retval = errno;
+ goto errout;
+ }
+
+#if defined(HAVE_CHFLAGS) && defined(UF_NODUMP)
+ retval = fchflags (fd, UF_NODUMP|UF_IMMUTABLE);
+#else
+#if HAVE_EXT2_IOCTLS
+ if (ioctl(fd, EXT2_IOC_GETFLAGS, &f) < 0) {
+ retval = errno;
+ goto errout;
+ }
+ f |= EXT2_NODUMP_FL | EXT2_IMMUTABLE_FL;
+ retval = ioctl(fd, EXT2_IOC_SETFLAGS, &f);
+#endif
+#endif
+ if (retval) {
+ retval = errno;
+ goto errout;
+ }
+
+ if (close(fd) < 0) {
+ retval = errno;
+ fd = -1;
+ goto errout;
+ }
+ journal_ino = st.st_ino;
+ memset(fs->super->s_jnl_blocks, 0,
+ sizeof(fs->super->s_jnl_blocks));
+ } else {
+ if ((mount_flags & EXT2_MF_BUSY) &&
+ !(fs->flags & EXT2_FLAG_EXCLUSIVE)) {
+ retval = EBUSY;
+ goto errout;
+ }
+ journal_ino = EXT2_JOURNAL_INO;
+ if ((retval = write_journal_inode(fs, journal_ino,
+ jparams, goal, flags)))
+ return retval;
+ }
+
+ fs->super->s_journal_inum = journal_ino;
+ fs->super->s_journal_dev = 0;
+ memset(fs->super->s_journal_uuid, 0,
+ sizeof(fs->super->s_journal_uuid));
+ ext2fs_set_feature_journal(fs->super);
+
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+errout:
+ if (fd >= 0)
+ close(fd);
+ return retval;
+}
+
+errcode_t ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks,
+ blk64_t goal, int flags)
+{
+ struct ext2fs_journal_params jparams;
+
+ jparams.num_journal_blocks = num_blocks;
+ jparams.num_fc_blocks = 0;
+
+ return ext2fs_add_journal_inode3(fs, &jparams, goal, flags);
+}
+
+errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks, int flags)
+{
+ return ext2fs_add_journal_inode2(fs, num_blocks, ~0ULL, flags);
+}
+
+
+#ifdef DEBUG
+main(int argc, char **argv)
+{
+ errcode_t retval;
+ char *device_name;
+ ext2_filsys fs;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: %s filesystem\n", argv[0]);
+ exit(1);
+ }
+ device_name = argv[1];
+
+ retval = ext2fs_open (device_name, EXT2_FLAG_RW, 0, 0,
+ unix_io_manager, &fs);
+ if (retval) {
+ com_err(argv[0], retval, "while opening %s", device_name);
+ exit(1);
+ }
+
+ retval = ext2fs_add_journal_inode(fs, JBD2_MIN_JOURNAL_BLOCKS, 0);
+ if (retval) {
+ com_err(argv[0], retval, "while adding journal to %s",
+ device_name);
+ exit(1);
+ }
+ retval = ext2fs_flush(fs);
+ if (retval) {
+ printf("Warning, had trouble writing out superblocks.\n");
+ }
+ ext2fs_close_free(&fs);
+ exit(0);
+
+}
+#endif
diff --git a/lib/ext2fs/mmp.c b/lib/ext2fs/mmp.c
new file mode 100644
index 0000000..eb94170
--- /dev/null
+++ b/lib/ext2fs/mmp.c
@@ -0,0 +1,488 @@
+/*
+ * Helper functions for multiple mount protection (MMP).
+ *
+ * Copyright (C) 2011 Whamcloud, Inc.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#ifndef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE /* since glibc 2.20 _SVID_SOURCE is deprecated */
+#endif
+
+#include "config.h"
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/time.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+
+#ifndef O_DIRECT
+#define O_DIRECT 0
+#endif
+
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#ifndef CONFIG_MMP
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+#endif
+
+errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf)
+{
+#ifdef CONFIG_MMP
+ struct mmp_struct *mmp_cmp;
+ errcode_t retval = 0;
+
+ if ((mmp_blk <= fs->super->s_first_data_block) ||
+ (mmp_blk >= ext2fs_blocks_count(fs->super)))
+ return EXT2_ET_MMP_BAD_BLOCK;
+
+ /* ext2fs_open() reserves fd0,1,2 to avoid stdio collision, so checking
+ * mmp_fd <= 0 is OK to validate that the fd is valid. This opens its
+ * own fd to read the MMP block to ensure that it is using O_DIRECT,
+ * regardless of how the io_manager is doing reads, to avoid caching of
+ * the MMP block by the io_manager or the VM. It needs to be fresh. */
+ if (fs->mmp_fd <= 0) {
+ struct stat st;
+ int flags = O_RDONLY | O_DIRECT;
+
+ /*
+ * There is no reason for using O_DIRECT if we're working with
+ * regular file. Disabling it also avoids problems with
+ * alignment when the device of the host file system has sector
+ * size larger than blocksize of the fs we're working with.
+ */
+ if (stat(fs->device_name, &st) == 0 &&
+ S_ISREG(st.st_mode))
+ flags &= ~O_DIRECT;
+
+ fs->mmp_fd = open(fs->device_name, flags);
+ if (fs->mmp_fd < 0) {
+ retval = EXT2_ET_MMP_OPEN_DIRECT;
+ goto out;
+ }
+ }
+
+ if (fs->mmp_cmp == NULL) {
+ int align = ext2fs_get_dio_alignment(fs->mmp_fd);
+
+ retval = ext2fs_get_memalign(fs->blocksize, align,
+ &fs->mmp_cmp);
+ if (retval)
+ return retval;
+ }
+
+ if ((blk64_t) ext2fs_llseek(fs->mmp_fd, mmp_blk * fs->blocksize,
+ SEEK_SET) !=
+ mmp_blk * fs->blocksize) {
+ retval = EXT2_ET_LLSEEK_FAILED;
+ goto out;
+ }
+
+ if (read(fs->mmp_fd, fs->mmp_cmp, fs->blocksize) != fs->blocksize) {
+ retval = EXT2_ET_SHORT_READ;
+ goto out;
+ }
+
+ mmp_cmp = fs->mmp_cmp;
+
+ if (!(fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_mmp_csum_verify(fs, mmp_cmp))
+ retval = EXT2_ET_MMP_CSUM_INVALID;
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_mmp(mmp_cmp);
+#endif
+
+ if (buf != NULL && buf != fs->mmp_cmp)
+ memcpy(buf, fs->mmp_cmp, fs->blocksize);
+
+ if (mmp_cmp->mmp_magic != EXT4_MMP_MAGIC) {
+ retval = EXT2_ET_MMP_MAGIC_INVALID;
+ goto out;
+ }
+
+out:
+ return retval;
+#else
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+errcode_t ext2fs_mmp_write(ext2_filsys fs, blk64_t mmp_blk, void *buf)
+{
+#ifdef CONFIG_MMP
+ struct mmp_struct *mmp_s = buf;
+ struct timeval tv;
+ errcode_t retval = 0;
+
+ gettimeofday(&tv, 0);
+ mmp_s->mmp_time = tv.tv_sec;
+ fs->mmp_last_written = tv.tv_sec;
+
+ if (fs->super->s_mmp_block < fs->super->s_first_data_block ||
+ fs->super->s_mmp_block > ext2fs_blocks_count(fs->super))
+ return EXT2_ET_MMP_BAD_BLOCK;
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_mmp(mmp_s);
+#endif
+
+ retval = ext2fs_mmp_csum_set(fs, mmp_s);
+ if (retval)
+ return retval;
+
+ /* I was tempted to make this use O_DIRECT and the mmp_fd, but
+ * this caused no end of grief, while leaving it as-is works. */
+ retval = io_channel_write_blk64(fs->io, mmp_blk, -(int)sizeof(struct mmp_struct), buf);
+
+#ifdef WORDS_BIGENDIAN
+ ext2fs_swap_mmp(mmp_s);
+#endif
+
+ /* Make sure the block gets to disk quickly */
+ io_channel_flush(fs->io);
+ return retval;
+#else
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+#ifdef HAVE_SRANDOM
+#define srand(x) srandom(x)
+#define rand() random()
+#endif
+
+unsigned ext2fs_mmp_new_seq(void)
+{
+#ifdef CONFIG_MMP
+ unsigned new_seq;
+ struct timeval tv;
+ unsigned long pid = getpid();
+
+ gettimeofday(&tv, 0);
+ pid = (pid >> 16) | ((pid & 0xFFFF) << 16);
+ srand(pid ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
+
+ gettimeofday(&tv, 0);
+ /* Crank the random number generator a few times */
+ for (new_seq = (tv.tv_sec ^ tv.tv_usec) & 0x1F; new_seq > 0; new_seq--)
+ rand();
+
+ do {
+ new_seq = rand();
+ } while (new_seq > EXT4_MMP_SEQ_MAX);
+
+ return new_seq;
+#else
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+#ifdef CONFIG_MMP
+static errcode_t ext2fs_mmp_reset(ext2_filsys fs)
+{
+ struct mmp_struct *mmp_s = NULL;
+ errcode_t retval = 0;
+
+ if (fs->mmp_buf == NULL) {
+ retval = ext2fs_get_mem(fs->blocksize, &fs->mmp_buf);
+ if (retval)
+ goto out;
+ }
+
+ memset(fs->mmp_buf, 0, fs->blocksize);
+ mmp_s = fs->mmp_buf;
+
+ mmp_s->mmp_magic = EXT4_MMP_MAGIC;
+ mmp_s->mmp_seq = EXT4_MMP_SEQ_CLEAN;
+ mmp_s->mmp_time = 0;
+#ifdef HAVE_GETHOSTNAME
+ gethostname((char *) mmp_s->mmp_nodename, sizeof(mmp_s->mmp_nodename));
+#else
+ mmp_s->mmp_nodename[0] = '\0';
+#endif
+ strncpy((char *) mmp_s->mmp_bdevname, fs->device_name,
+ sizeof(mmp_s->mmp_bdevname));
+
+ mmp_s->mmp_check_interval = fs->super->s_mmp_update_interval;
+ if (mmp_s->mmp_check_interval < EXT4_MMP_MIN_CHECK_INTERVAL)
+ mmp_s->mmp_check_interval = EXT4_MMP_MIN_CHECK_INTERVAL;
+
+ retval = ext2fs_mmp_write(fs, fs->super->s_mmp_block, fs->mmp_buf);
+out:
+ return retval;
+}
+#endif
+
+errcode_t ext2fs_mmp_update(ext2_filsys fs)
+{
+ return ext2fs_mmp_update2(fs, 0);
+}
+
+errcode_t ext2fs_mmp_clear(ext2_filsys fs)
+{
+#ifdef CONFIG_MMP
+ errcode_t retval = 0;
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ retval = ext2fs_mmp_reset(fs);
+
+ return retval;
+#else
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+errcode_t ext2fs_mmp_init(ext2_filsys fs)
+{
+#ifdef CONFIG_MMP
+ struct ext2_super_block *sb = fs->super;
+ blk64_t mmp_block;
+ errcode_t retval;
+
+ if (sb->s_mmp_update_interval == 0)
+ sb->s_mmp_update_interval = EXT4_MMP_UPDATE_INTERVAL;
+ /* This is probably excessively large, but who knows? */
+ else if (sb->s_mmp_update_interval > EXT4_MMP_MAX_UPDATE_INTERVAL)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (fs->mmp_buf == NULL) {
+ retval = ext2fs_get_mem(fs->blocksize, &fs->mmp_buf);
+ if (retval)
+ goto out;
+ }
+
+ retval = ext2fs_alloc_block2(fs, 0, fs->mmp_buf, &mmp_block);
+ if (retval)
+ goto out;
+
+ sb->s_mmp_block = mmp_block;
+
+ retval = ext2fs_mmp_reset(fs);
+ if (retval)
+ goto out;
+
+out:
+ return retval;
+#else
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+#ifndef min
+#define min(x, y) ((x) < (y) ? (x) : (y))
+#endif
+
+/*
+ * Make sure that the fs is not mounted or being fsck'ed while opening the fs.
+ */
+errcode_t ext2fs_mmp_start(ext2_filsys fs)
+{
+#ifdef CONFIG_MMP
+ struct mmp_struct *mmp_s;
+ unsigned seq;
+ unsigned int mmp_check_interval;
+ errcode_t retval = 0;
+
+ if (fs->mmp_buf == NULL) {
+ retval = ext2fs_get_mem(fs->blocksize, &fs->mmp_buf);
+ if (retval)
+ goto mmp_error;
+ }
+
+ retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, fs->mmp_buf);
+ if (retval)
+ goto mmp_error;
+
+ mmp_s = fs->mmp_buf;
+
+ mmp_check_interval = fs->super->s_mmp_update_interval;
+ if (mmp_check_interval < EXT4_MMP_MIN_CHECK_INTERVAL)
+ mmp_check_interval = EXT4_MMP_MIN_CHECK_INTERVAL;
+
+ seq = mmp_s->mmp_seq;
+ if (seq == EXT4_MMP_SEQ_CLEAN)
+ goto clean_seq;
+ if (seq == EXT4_MMP_SEQ_FSCK) {
+ retval = EXT2_ET_MMP_FSCK_ON;
+ goto mmp_error;
+ }
+
+ if (seq > EXT4_MMP_SEQ_FSCK) {
+ retval = EXT2_ET_MMP_UNKNOWN_SEQ;
+ goto mmp_error;
+ }
+
+ /*
+ * If check_interval in MMP block is larger, use that instead of
+ * check_interval from the superblock.
+ */
+ if (mmp_s->mmp_check_interval > mmp_check_interval)
+ mmp_check_interval = mmp_s->mmp_check_interval;
+
+ sleep(min(mmp_check_interval * 2 + 1, mmp_check_interval + 60));
+
+ retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, fs->mmp_buf);
+ if (retval)
+ goto mmp_error;
+
+ if (seq != mmp_s->mmp_seq) {
+ retval = EXT2_ET_MMP_FAILED;
+ goto mmp_error;
+ }
+
+clean_seq:
+ if (!(fs->flags & EXT2_FLAG_RW))
+ goto mmp_error;
+
+ mmp_s->mmp_seq = seq = ext2fs_mmp_new_seq();
+#ifdef HAVE_GETHOSTNAME
+ gethostname((char *) mmp_s->mmp_nodename, sizeof(mmp_s->mmp_nodename));
+#else
+ strcpy((char *) mmp_s->mmp_nodename, "unknown host");
+#endif
+ strncpy((char *) mmp_s->mmp_bdevname, fs->device_name,
+ sizeof(mmp_s->mmp_bdevname));
+
+ retval = ext2fs_mmp_write(fs, fs->super->s_mmp_block, fs->mmp_buf);
+ if (retval)
+ goto mmp_error;
+
+ sleep(min(2 * mmp_check_interval + 1, mmp_check_interval + 60));
+
+ retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, fs->mmp_buf);
+ if (retval)
+ goto mmp_error;
+
+ if (seq != mmp_s->mmp_seq) {
+ retval = EXT2_ET_MMP_FAILED;
+ goto mmp_error;
+ }
+
+ mmp_s->mmp_seq = EXT4_MMP_SEQ_FSCK;
+ retval = ext2fs_mmp_write(fs, fs->super->s_mmp_block, fs->mmp_buf);
+ if (retval)
+ goto mmp_error;
+
+ return 0;
+
+mmp_error:
+ return retval;
+#else
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+/*
+ * Clear the MMP usage in the filesystem. If this function returns an
+ * error EXT2_ET_MMP_CHANGE_ABORT it means the filesystem was modified
+ * by some other process while in use, and changes should be dropped, or
+ * risk filesystem corruption.
+ */
+errcode_t ext2fs_mmp_stop(ext2_filsys fs)
+{
+#ifdef CONFIG_MMP
+ struct mmp_struct *mmp, *mmp_cmp;
+ errcode_t retval = 0;
+
+ if (!ext2fs_has_feature_mmp(fs->super) ||
+ !(fs->flags & EXT2_FLAG_RW) || (fs->flags & EXT2_FLAG_SKIP_MMP) ||
+ (fs->mmp_buf == NULL) || (fs->mmp_cmp == NULL))
+ goto mmp_error;
+
+ retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, NULL);
+ if (retval)
+ goto mmp_error;
+
+ /* Check if the MMP block is not changed. */
+ mmp = fs->mmp_buf;
+ mmp_cmp = fs->mmp_cmp;
+ if (memcmp(mmp, mmp_cmp, sizeof(*mmp_cmp))) {
+ retval = EXT2_ET_MMP_CHANGE_ABORT;
+ goto mmp_error;
+ }
+
+ mmp_cmp->mmp_seq = EXT4_MMP_SEQ_CLEAN;
+ retval = ext2fs_mmp_write(fs, fs->super->s_mmp_block, fs->mmp_cmp);
+
+mmp_error:
+ if (fs->mmp_fd > 0) {
+ close(fs->mmp_fd);
+ fs->mmp_fd = -1;
+ }
+
+ return retval;
+#else
+ if (!ext2fs_has_feature_mmp(fs->super) ||
+ !(fs->flags & EXT2_FLAG_RW) || (fs->flags & EXT2_FLAG_SKIP_MMP))
+ return 0;
+
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+#define EXT2_MIN_MMP_UPDATE_INTERVAL 60
+
+/*
+ * Update the on-disk mmp buffer, after checking that it hasn't been changed.
+ */
+errcode_t ext2fs_mmp_update2(ext2_filsys fs, int immediately)
+{
+#ifdef CONFIG_MMP
+ struct mmp_struct *mmp, *mmp_cmp;
+ struct timeval tv;
+ errcode_t retval = 0;
+
+ if (!ext2fs_has_feature_mmp(fs->super) ||
+ !(fs->flags & EXT2_FLAG_RW) || (fs->flags & EXT2_FLAG_SKIP_MMP))
+ return 0;
+
+ gettimeofday(&tv, 0);
+ if (!immediately &&
+ tv.tv_sec - fs->mmp_last_written < EXT2_MIN_MMP_UPDATE_INTERVAL)
+ return 0;
+
+ retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, NULL);
+ if (retval)
+ goto mmp_error;
+
+ mmp = fs->mmp_buf;
+ mmp_cmp = fs->mmp_cmp;
+
+ if (memcmp(mmp, mmp_cmp, sizeof(*mmp_cmp)))
+ return EXT2_ET_MMP_CHANGE_ABORT;
+
+ mmp->mmp_time = tv.tv_sec;
+ mmp->mmp_seq = EXT4_MMP_SEQ_FSCK;
+ retval = ext2fs_mmp_write(fs, fs->super->s_mmp_block, fs->mmp_buf);
+
+mmp_error:
+ return retval;
+#else
+ if (!ext2fs_has_feature_mmp(fs->super) ||
+ !(fs->flags & EXT2_FLAG_RW) || (fs->flags & EXT2_FLAG_SKIP_MMP))
+ return 0;
+
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
diff --git a/lib/ext2fs/namei.c b/lib/ext2fs/namei.c
new file mode 100644
index 0000000..1064ab5
--- /dev/null
+++ b/lib/ext2fs/namei.c
@@ -0,0 +1,227 @@
+/*
+ * namei.c --- ext2fs directory lookup operations
+ *
+ * Copyright (C) 1993, 1994, 1994, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* #define NAMEI_DEBUG */
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+static errcode_t open_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t base,
+ const char *pathname, size_t pathlen, int follow,
+ int link_count, char *buf, ext2_ino_t *res_inode);
+
+static errcode_t follow_link(ext2_filsys fs, ext2_ino_t root, ext2_ino_t dir,
+ ext2_ino_t inode, int link_count,
+ char *buf, ext2_ino_t *res_inode)
+{
+ char *pathname;
+ char *buffer = 0;
+ errcode_t retval;
+ struct ext2_inode ei;
+ blk64_t blk;
+
+#ifdef NAMEI_DEBUG
+ printf("follow_link: root=%lu, dir=%lu, inode=%lu, lc=%d\n",
+ root, dir, inode, link_count);
+
+#endif
+ retval = ext2fs_read_inode (fs, inode, &ei);
+ if (retval) return retval;
+ if (!LINUX_S_ISLNK (ei.i_mode)) {
+ *res_inode = inode;
+ return 0;
+ }
+ if (link_count++ >= EXT2FS_MAX_NESTED_LINKS)
+ return EXT2_ET_SYMLINK_LOOP;
+
+ if (ext2fs_is_fast_symlink(&ei))
+ pathname = (char *)&(ei.i_block[0]);
+ else if (ei.i_flags & EXT4_INLINE_DATA_FL) {
+ retval = ext2fs_get_memzero(ei.i_size, &buffer);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_inline_data_get(fs, inode,
+ &ei, buffer, NULL);
+ if (retval) {
+ ext2fs_free_mem(&buffer);
+ return retval;
+ }
+ pathname = buffer;
+ } else {
+ retval = ext2fs_bmap2(fs, inode, &ei, NULL, 0, 0, NULL, &blk);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_mem(fs->blocksize, &buffer);
+ if (retval)
+ return retval;
+
+ retval = io_channel_read_blk64(fs->io, blk, 1, buffer);
+ if (retval) {
+ ext2fs_free_mem(&buffer);
+ return retval;
+ }
+ pathname = buffer;
+ }
+
+ retval = open_namei(fs, root, dir, pathname, ei.i_size, 1,
+ link_count, buf, res_inode);
+ if (buffer)
+ ext2fs_free_mem(&buffer);
+ return retval;
+}
+
+/*
+ * This routine interprets a pathname in the context of the current
+ * directory and the root directory, and returns the inode of the
+ * containing directory, and a pointer to the filename of the file
+ * (pointing into the pathname) and the length of the filename.
+ */
+static errcode_t dir_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t dir,
+ const char *pathname, int pathlen,
+ int link_count, char *buf,
+ const char **name, int *namelen,
+ ext2_ino_t *res_inode)
+{
+ char c;
+ const char *thisname;
+ int len;
+ ext2_ino_t inode;
+ errcode_t retval;
+
+ if ((c = *pathname) == '/') {
+ dir = root;
+ pathname++;
+ pathlen--;
+ }
+ while (1) {
+ thisname = pathname;
+ for (len=0; --pathlen >= 0;len++) {
+ c = *(pathname++);
+ if (c == '/')
+ break;
+ }
+ if (pathlen < 0)
+ break;
+ retval = ext2fs_lookup (fs, dir, thisname, len, buf, &inode);
+ if (retval) return retval;
+ retval = follow_link (fs, root, dir, inode,
+ link_count, buf, &dir);
+ if (retval) return retval;
+ }
+ *name = thisname;
+ *namelen = len;
+ *res_inode = dir;
+ return 0;
+}
+
+static errcode_t open_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t base,
+ const char *pathname, size_t pathlen, int follow,
+ int link_count, char *buf, ext2_ino_t *res_inode)
+{
+ const char *base_name;
+ int namelen;
+ ext2_ino_t dir, inode;
+ errcode_t retval;
+
+#ifdef NAMEI_DEBUG
+ printf("open_namei: root=%lu, dir=%lu, path=%.*s, lc=%d\n",
+ root, base, pathlen, pathname, link_count);
+#endif
+ retval = dir_namei(fs, root, base, pathname, pathlen,
+ link_count, buf, &base_name, &namelen, &dir);
+ if (retval) return retval;
+ if (!namelen) { /* special case: '/usr/' etc */
+ *res_inode=dir;
+ return 0;
+ }
+ retval = ext2fs_lookup (fs, dir, base_name, namelen, buf, &inode);
+ if (retval)
+ return retval;
+ if (follow) {
+ retval = follow_link(fs, root, dir, inode, link_count,
+ buf, &inode);
+ if (retval)
+ return retval;
+ }
+#ifdef NAMEI_DEBUG
+ printf("open_namei: (link_count=%d) returns %lu\n",
+ link_count, inode);
+#endif
+ *res_inode = inode;
+ return 0;
+}
+
+errcode_t ext2fs_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
+ const char *name, ext2_ino_t *inode)
+{
+ char *buf;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+
+ retval = open_namei(fs, root, cwd, name, strlen(name), 0, 0,
+ buf, inode);
+
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+errcode_t ext2fs_namei_follow(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
+ const char *name, ext2_ino_t *inode)
+{
+ char *buf;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+
+ retval = open_namei(fs, root, cwd, name, strlen(name), 1, 0,
+ buf, inode);
+
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+errcode_t ext2fs_follow_link(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
+ ext2_ino_t inode, ext2_ino_t *res_inode)
+{
+ char *buf;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+
+ retval = follow_link(fs, root, cwd, inode, 0, buf, res_inode);
+
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
diff --git a/lib/ext2fs/native.c b/lib/ext2fs/native.c
new file mode 100644
index 0000000..ba3e0c8
--- /dev/null
+++ b/lib/ext2fs/native.c
@@ -0,0 +1,28 @@
+/*
+ * native.c --- returns the ext2_flag for a native byte order
+ *
+ * Copyright (C) 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+int ext2fs_native_flag(void)
+{
+#ifdef WORDS_BIGENDIAN
+ return EXT2_FLAG_SWAP_BYTES;
+#else
+ return 0;
+#endif
+}
+
+
+
diff --git a/lib/ext2fs/newdir.c b/lib/ext2fs/newdir.c
new file mode 100644
index 0000000..7f47285
--- /dev/null
+++ b/lib/ext2fs/newdir.c
@@ -0,0 +1,126 @@
+/*
+ * newdir.c --- create a new directory block
+ *
+ * Copyright (C) 1994, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifndef EXT2_FT_DIR
+#define EXT2_FT_DIR 2
+#endif
+
+/*
+ * Create new directory block
+ */
+errcode_t ext2fs_new_dir_block(ext2_filsys fs, ext2_ino_t dir_ino,
+ ext2_ino_t parent_ino, char **block)
+{
+ struct ext2_dir_entry *dir = NULL;
+ errcode_t retval;
+ char *buf;
+ int rec_len;
+ int filetype = 0;
+ struct ext2_dir_entry_tail *t;
+ int csum_size = 0;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+ memset(buf, 0, fs->blocksize);
+ dir = (struct ext2_dir_entry *) buf;
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ csum_size = sizeof(struct ext2_dir_entry_tail);
+
+ retval = ext2fs_set_rec_len(fs, fs->blocksize - csum_size, dir);
+ if (retval) {
+ ext2fs_free_mem(&buf);
+ return retval;
+ }
+
+ if (dir_ino) {
+ if (ext2fs_has_feature_filetype(fs->super))
+ filetype = EXT2_FT_DIR;
+ /*
+ * Set up entry for '.'
+ */
+ dir->inode = dir_ino;
+ ext2fs_dirent_set_name_len(dir, 1);
+ ext2fs_dirent_set_file_type(dir, filetype);
+ dir->name[0] = '.';
+ rec_len = (fs->blocksize - csum_size) - EXT2_DIR_REC_LEN(1);
+ dir->rec_len = EXT2_DIR_REC_LEN(1);
+
+ /*
+ * Set up entry for '..'
+ */
+ dir = (struct ext2_dir_entry *) (buf + dir->rec_len);
+ retval = ext2fs_set_rec_len(fs, rec_len, dir);
+ if (retval) {
+ ext2fs_free_mem(&buf);
+ return retval;
+ }
+ dir->inode = parent_ino;
+ ext2fs_dirent_set_name_len(dir, 2);
+ ext2fs_dirent_set_file_type(dir, filetype);
+ dir->name[0] = '.';
+ dir->name[1] = '.';
+
+ }
+
+ if (csum_size) {
+ t = EXT2_DIRENT_TAIL(buf, fs->blocksize);
+ ext2fs_initialize_dirent_tail(fs, t);
+ }
+ *block = buf;
+ return 0;
+}
+
+/*
+ * Create new directory on inline data
+ */
+errcode_t ext2fs_new_dir_inline_data(ext2_filsys fs,
+ ext2_ino_t dir_ino EXT2FS_ATTR((unused)),
+ ext2_ino_t parent_ino, __u32 *iblock)
+{
+ struct ext2_dir_entry *dir = NULL;
+ errcode_t retval;
+ int rec_len;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ iblock[0] = ext2fs_cpu_to_le32(parent_ino);
+
+ dir = (struct ext2_dir_entry *)((char *)iblock +
+ EXT4_INLINE_DATA_DOTDOT_SIZE);
+ dir->inode = 0;
+ rec_len = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DATA_DOTDOT_SIZE;
+ retval = ext2fs_set_rec_len(fs, rec_len, dir);
+ if (retval)
+ goto errout;
+
+#ifdef WORDS_BIGENDIAN
+ retval = ext2fs_dirent_swab_out2(fs, (char *)dir, rec_len, 0);
+ if (retval)
+ goto errout;
+#endif
+
+errout:
+ return retval;
+}
diff --git a/lib/ext2fs/nls_utf8.c b/lib/ext2fs/nls_utf8.c
new file mode 100644
index 0000000..b07e66e
--- /dev/null
+++ b/lib/ext2fs/nls_utf8.c
@@ -0,0 +1,1000 @@
+/*
+ * Copyright (c) 2014 SGI.
+ * Copyright (c) 2018 Collabora Ltd.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+/*
+ * This code is adapted from the Linux Kernel. We have a
+ * userspace version here such that the hashes will match that
+ * implementation.
+ */
+
+#include "config.h"
+#include <stdint.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <errno.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+/* Encoding a unicode version number as a single unsigned int. */
+#define UNICODE_MAJ_SHIFT (16)
+#define UNICODE_MIN_SHIFT (8)
+
+#define UNICODE_AGE(MAJ, MIN, REV) \
+ (((unsigned int)(MAJ) << UNICODE_MAJ_SHIFT) | \
+ ((unsigned int)(MIN) << UNICODE_MIN_SHIFT) | \
+ ((unsigned int)(REV)))
+
+/* Needed in struct utf8cursor below. */
+#define UTF8HANGULLEAF (12)
+
+/*
+ * Cursor structure used by the normalizer.
+ */
+struct utf8cursor {
+ const struct utf8data *data;
+ const char *s;
+ const char *p;
+ const char *ss;
+ const char *sp;
+ unsigned int len;
+ unsigned int slen;
+ short int ccc;
+ short int nccc;
+ unsigned char hangul[UTF8HANGULLEAF];
+};
+
+/*
+ * Initialize a utf8cursor to normalize a string.
+ * Returns 0 on success.
+ * Returns -1 on failure.
+ */
+// extern int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
+// const char *s);
+// extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
+// const char *s, size_t len);
+
+/*
+ * Get the next byte in the normalization.
+ * Returns a value > 0 && < 256 on success.
+ * Returns 0 when the end of the normalization is reached.
+ * Returns -1 if the string being normalized is not valid UTF-8.
+ */
+// extern int utf8byte(struct utf8cursor *u8c);
+
+
+struct utf8data {
+ unsigned int maxage;
+ unsigned int offset;
+};
+
+#define __INCLUDED_FROM_UTF8NORM_C__
+#include "utf8data.h"
+#undef __INCLUDED_FROM_UTF8NORM_C__
+
+#define ARRAY_SIZE(array) \
+ (sizeof(array) / sizeof(array[0]))
+
+#if 0
+/* Highest unicode version supported by the data tables. */
+static int utf8version_is_supported(uint8_t maj, uint8_t min, uint8_t rev)
+{
+ int i = ARRAY_SIZE(utf8agetab) - 1;
+ unsigned int sb_utf8version = UNICODE_AGE(maj, min, rev);
+
+ while (i >= 0 && utf8agetab[i] != 0) {
+ if (sb_utf8version == utf8agetab[i])
+ return 1;
+ i--;
+ }
+ return 0;
+}
+#endif
+
+#if 0
+static int utf8version_latest(void)
+{
+ return utf8vers;
+}
+#endif
+
+/*
+ * UTF-8 valid ranges.
+ *
+ * The UTF-8 encoding spreads the bits of a 32bit word over several
+ * bytes. This table gives the ranges that can be held and how they'd
+ * be represented.
+ *
+ * 0x00000000 0x0000007F: 0xxxxxxx
+ * 0x00000000 0x000007FF: 110xxxxx 10xxxxxx
+ * 0x00000000 0x0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
+ * 0x00000000 0x001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x00000000 0x03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x00000000 0x7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ *
+ * There is an additional requirement on UTF-8, in that only the
+ * shortest representation of a 32bit value is to be used. A decoder
+ * must not decode sequences that do not satisfy this requirement.
+ * Thus the allowed ranges have a lower bound.
+ *
+ * 0x00000000 0x0000007F: 0xxxxxxx
+ * 0x00000080 0x000007FF: 110xxxxx 10xxxxxx
+ * 0x00000800 0x0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
+ * 0x00010000 0x001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x00200000 0x03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x04000000 0x7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ *
+ * Actual unicode characters are limited to the range 0x0 - 0x10FFFF,
+ * 17 planes of 65536 values. This limits the sequences actually seen
+ * even more, to just the following.
+ *
+ * 0 - 0x7F: 0 - 0x7F
+ * 0x80 - 0x7FF: 0xC2 0x80 - 0xDF 0xBF
+ * 0x800 - 0xFFFF: 0xE0 0xA0 0x80 - 0xEF 0xBF 0xBF
+ * 0x10000 - 0x10FFFF: 0xF0 0x90 0x80 0x80 - 0xF4 0x8F 0xBF 0xBF
+ *
+ * Within those ranges the surrogates 0xD800 - 0xDFFF are not allowed.
+ *
+ * Note that the longest sequence seen with valid usage is 4 bytes,
+ * the same a single UTF-32 character. This makes the UTF-8
+ * representation of Unicode strictly smaller than UTF-32.
+ *
+ * The shortest sequence requirement was introduced by:
+ * Corrigendum #1: UTF-8 Shortest Form
+ * It can be found here:
+ * http://www.unicode.org/versions/corrigendum1.html
+ *
+ */
+
+/*
+ * Return the number of bytes used by the current UTF-8 sequence.
+ * Assumes the input points to the first byte of a valid UTF-8
+ * sequence.
+ */
+static inline int utf8clen(const char *s)
+{
+ unsigned char c = *s;
+
+ return 1 + (c >= 0xC0) + (c >= 0xE0) + (c >= 0xF0);
+}
+
+/*
+ * Decode a 3-byte UTF-8 sequence.
+ */
+static unsigned int
+utf8decode3(const char *str)
+{
+ unsigned int uc;
+
+ uc = *str++ & 0x0F;
+ uc <<= 6;
+ uc |= *str++ & 0x3F;
+ uc <<= 6;
+ uc |= *str++ & 0x3F;
+
+ return uc;
+}
+
+/*
+ * Encode a 3-byte UTF-8 sequence.
+ */
+static int
+utf8encode3(char *str, unsigned int val)
+{
+ str[2] = (val & 0x3F) | 0x80;
+ val >>= 6;
+ str[1] = (val & 0x3F) | 0x80;
+ val >>= 6;
+ str[0] = val | 0xE0;
+
+ return 3;
+}
+
+/*
+ * utf8trie_t
+ *
+ * A compact binary tree, used to decode UTF-8 characters.
+ *
+ * Internal nodes are one byte for the node itself, and up to three
+ * bytes for an offset into the tree. The first byte contains the
+ * following information:
+ * NEXTBYTE - flag - advance to next byte if set
+ * BITNUM - 3 bit field - the bit number to tested
+ * OFFLEN - 2 bit field - number of bytes in the offset
+ * if offlen == 0 (non-branching node)
+ * RIGHTPATH - 1 bit field - set if the following node is for the
+ * right-hand path (tested bit is set)
+ * TRIENODE - 1 bit field - set if the following node is an internal
+ * node, otherwise it is a leaf node
+ * if offlen != 0 (branching node)
+ * LEFTNODE - 1 bit field - set if the left-hand node is internal
+ * RIGHTNODE - 1 bit field - set if the right-hand node is internal
+ *
+ * Due to the way utf8 works, there cannot be branching nodes with
+ * NEXTBYTE set, and moreover those nodes always have a righthand
+ * descendant.
+ */
+typedef const unsigned char utf8trie_t;
+#define BITNUM 0x07
+#define NEXTBYTE 0x08
+#define OFFLEN 0x30
+#define OFFLEN_SHIFT 4
+#define RIGHTPATH 0x40
+#define TRIENODE 0x80
+#define RIGHTNODE 0x40
+#define LEFTNODE 0x80
+
+/*
+ * utf8leaf_t
+ *
+ * The leaves of the trie are embedded in the trie, and so the same
+ * underlying datatype: unsigned char.
+ *
+ * leaf[0]: The unicode version, stored as a generation number that is
+ * an index into utf8agetab[]. With this we can filter code
+ * points based on the unicode version in which they were
+ * defined. The CCC of a non-defined code point is 0.
+ * leaf[1]: Canonical Combining Class. During normalization, we need
+ * to do a stable sort into ascending order of all characters
+ * with a non-zero CCC that occur between two characters with
+ * a CCC of 0, or at the begin or end of a string.
+ * The unicode standard guarantees that all CCC values are
+ * between 0 and 254 inclusive, which leaves 255 available as
+ * a special value.
+ * Code points with CCC 0 are known as stoppers.
+ * leaf[2]: Decomposition. If leaf[1] == 255, then leaf[2] is the
+ * start of a NUL-terminated string that is the decomposition
+ * of the character.
+ * The CCC of a decomposable character is the same as the CCC
+ * of the first character of its decomposition.
+ * Some characters decompose as the empty string: these are
+ * characters with the Default_Ignorable_Code_Point property.
+ * These do affect normalization, as they all have CCC 0.
+ *
+ * The decompositions in the trie have been fully expanded, with the
+ * exception of Hangul syllables, which are decomposed algorithmically.
+ *
+ * Casefolding, if applicable, is also done using decompositions.
+ *
+ * The trie is constructed in such a way that leaves exist for all
+ * UTF-8 sequences that match the criteria from the "UTF-8 valid
+ * ranges" comment above, and only for those sequences. Therefore a
+ * lookup in the trie can be used to validate the UTF-8 input.
+ */
+typedef const unsigned char utf8leaf_t;
+
+#define LEAF_GEN(LEAF) ((LEAF)[0])
+#define LEAF_CCC(LEAF) ((LEAF)[1])
+#define LEAF_STR(LEAF) ((const char *)((LEAF) + 2))
+
+#define MINCCC (0)
+#define MAXCCC (254)
+#define STOPPER (0)
+#define DECOMPOSE (255)
+
+/* Marker for hangul syllable decomposition. */
+#define HANGUL ((char)(255))
+/* Size of the synthesized leaf used for Hangul syllable decomposition. */
+#define UTF8HANGULLEAF (12)
+
+/*
+ * Hangul decomposition (algorithm from Section 3.12 of Unicode 6.3.0)
+ *
+ * AC00;<Hangul Syllable, First>;Lo;0;L;;;;;N;;;;;
+ * D7A3;<Hangul Syllable, Last>;Lo;0;L;;;;;N;;;;;
+ *
+ * SBase = 0xAC00
+ * LBase = 0x1100
+ * VBase = 0x1161
+ * TBase = 0x11A7
+ * LCount = 19
+ * VCount = 21
+ * TCount = 28
+ * NCount = 588 (VCount * TCount)
+ * SCount = 11172 (LCount * NCount)
+ *
+ * Decomposition:
+ * SIndex = s - SBase
+ *
+ * LV (Canonical/Full)
+ * LIndex = SIndex / NCount
+ * VIndex = (Sindex % NCount) / TCount
+ * LPart = LBase + LIndex
+ * VPart = VBase + VIndex
+ *
+ * LVT (Canonical)
+ * LVIndex = (SIndex / TCount) * TCount
+ * TIndex = (Sindex % TCount)
+ * LVPart = SBase + LVIndex
+ * TPart = TBase + TIndex
+ *
+ * LVT (Full)
+ * LIndex = SIndex / NCount
+ * VIndex = (Sindex % NCount) / TCount
+ * TIndex = (Sindex % TCount)
+ * LPart = LBase + LIndex
+ * VPart = VBase + VIndex
+ * if (TIndex == 0) {
+ * d = <LPart, VPart>
+ * } else {
+ * TPart = TBase + TIndex
+ * d = <LPart, TPart, VPart>
+ * }
+ */
+
+/* Constants */
+#define SB (0xAC00)
+#define LB (0x1100)
+#define VB (0x1161)
+#define TB (0x11A7)
+#define LC (19)
+#define VC (21)
+#define TC (28)
+#define NC (VC * TC)
+#define SC (LC * NC)
+
+/* Algorithmic decomposition of hangul syllable. */
+static utf8leaf_t *
+utf8hangul(const char *str, unsigned char *hangul)
+{
+ unsigned int si;
+ unsigned int li;
+ unsigned int vi;
+ unsigned int ti;
+ unsigned char *h;
+
+ /* Calculate the SI, LI, VI, and TI values. */
+ si = utf8decode3(str) - SB;
+ li = si / NC;
+ vi = (si % NC) / TC;
+ ti = si % TC;
+
+ /* Fill in base of leaf. */
+ h = hangul;
+ LEAF_GEN(h) = 2;
+ LEAF_CCC(h) = DECOMPOSE;
+ h += 2;
+
+ /* Add LPart, a 3-byte UTF-8 sequence. */
+ h += utf8encode3((char *)h, li + LB);
+
+ /* Add VPart, a 3-byte UTF-8 sequence. */
+ h += utf8encode3((char *)h, vi + VB);
+
+ /* Add TPart if required, also a 3-byte UTF-8 sequence. */
+ if (ti)
+ h += utf8encode3((char *)h, ti + TB);
+
+ /* Terminate string. */
+ h[0] = '\0';
+
+ return hangul;
+}
+
+/*
+ * Use trie to scan s, touching at most len bytes.
+ * Returns the leaf if one exists, NULL otherwise.
+ *
+ * A non-NULL return guarantees that the UTF-8 sequence starting at s
+ * is well-formed and corresponds to a known unicode code point. The
+ * shorthand for this will be "is valid UTF-8 unicode".
+ */
+static utf8leaf_t *utf8nlookup(const struct utf8data *data,
+ unsigned char *hangul, const char *s, size_t len)
+{
+ utf8trie_t *trie;
+ int offlen;
+ int offset;
+ int mask;
+ int node;
+
+ if (!data)
+ return NULL;
+ if (len == 0)
+ return NULL;
+
+ trie = utf8data + data->offset;
+ node = 1;
+ while (node) {
+ offlen = (*trie & OFFLEN) >> OFFLEN_SHIFT;
+ if (*trie & NEXTBYTE) {
+ if (--len == 0)
+ return NULL;
+ s++;
+ }
+ mask = 1 << (*trie & BITNUM);
+ if (*s & mask) {
+ /* Right leg */
+ if (offlen) {
+ /* Right node at offset of trie */
+ node = (*trie & RIGHTNODE);
+ offset = trie[offlen];
+ while (--offlen) {
+ offset <<= 8;
+ offset |= trie[offlen];
+ }
+ trie += offset;
+ } else if (*trie & RIGHTPATH) {
+ /* Right node after this node */
+ node = (*trie & TRIENODE);
+ trie++;
+ } else {
+ /* No right node. */
+ return NULL;
+ }
+ } else {
+ /* Left leg */
+ if (offlen) {
+ /* Left node after this node. */
+ node = (*trie & LEFTNODE);
+ trie += offlen + 1;
+ } else if (*trie & RIGHTPATH) {
+ /* No left node. */
+ return NULL;
+ } else {
+ /* Left node after this node */
+ node = (*trie & TRIENODE);
+ trie++;
+ }
+ }
+ }
+ /*
+ * Hangul decomposition is done algorithmically. These are the
+ * codepoints >= 0xAC00 and <= 0xD7A3. Their UTF-8 encoding is
+ * always 3 bytes long, so s has been advanced twice, and the
+ * start of the sequence is at s-2.
+ */
+ if (LEAF_CCC(trie) == DECOMPOSE && LEAF_STR(trie)[0] == HANGUL)
+ trie = utf8hangul(s - 2, hangul);
+ return trie;
+}
+
+/*
+ * Use trie to scan s.
+ * Returns the leaf if one exists, NULL otherwise.
+ *
+ * Forwards to utf8nlookup().
+ */
+static utf8leaf_t *utf8lookup(const struct utf8data *data,
+ unsigned char *hangul, const char *s)
+{
+ return utf8nlookup(data, hangul, s, (size_t)-1);
+}
+
+#if 0
+/*
+ * Maximum age of any character in s.
+ * Return -1 if s is not valid UTF-8 unicode.
+ * Return 0 if only non-assigned code points are used.
+ */
+static int utf8agemax(const struct utf8data *data, const char *s)
+{
+ utf8leaf_t *leaf;
+ int age = 0;
+ int leaf_age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!data)
+ return -1;
+
+ while (*s) {
+ leaf = utf8lookup(data, hangul, s);
+ if (!leaf)
+ return -1;
+
+ leaf_age = utf8agetab[LEAF_GEN(leaf)];
+ if (leaf_age <= data->maxage && leaf_age > age)
+ age = leaf_age;
+ s += utf8clen(s);
+ }
+ return age;
+}
+#endif
+
+#if 0
+/*
+ * Minimum age of any character in s.
+ * Return -1 if s is not valid UTF-8 unicode.
+ * Return 0 if non-assigned code points are used.
+ */
+static int utf8agemin(const struct utf8data *data, const char *s)
+{
+ utf8leaf_t *leaf;
+ int age;
+ int leaf_age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!data)
+ return -1;
+ age = data->maxage;
+ while (*s) {
+ leaf = utf8lookup(data, hangul, s);
+ if (!leaf)
+ return -1;
+ leaf_age = utf8agetab[LEAF_GEN(leaf)];
+ if (leaf_age <= data->maxage && leaf_age < age)
+ age = leaf_age;
+ s += utf8clen(s);
+ }
+ return age;
+}
+#endif
+
+#if 0
+/*
+ * Maximum age of any character in s, touch at most len bytes.
+ * Return -1 if s is not valid UTF-8 unicode.
+ */
+static int utf8nagemax(const struct utf8data *data, const char *s, size_t len)
+{
+ utf8leaf_t *leaf;
+ int age = 0;
+ int leaf_age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!data)
+ return -1;
+
+ while (len && *s) {
+ leaf = utf8nlookup(data, hangul, s, len);
+ if (!leaf)
+ return -1;
+ leaf_age = utf8agetab[LEAF_GEN(leaf)];
+ if (leaf_age <= data->maxage && leaf_age > age)
+ age = leaf_age;
+ len -= utf8clen(s);
+ s += utf8clen(s);
+ }
+ return age;
+}
+#endif
+
+#if 0
+/*
+ * Maximum age of any character in s, touch at most len bytes.
+ * Return -1 if s is not valid UTF-8 unicode.
+ */
+static int utf8nagemin(const struct utf8data *data, const char *s, size_t len)
+{
+ utf8leaf_t *leaf;
+ int leaf_age;
+ int age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!data)
+ return -1;
+ age = data->maxage;
+ while (len && *s) {
+ leaf = utf8nlookup(data, hangul, s, len);
+ if (!leaf)
+ return -1;
+ leaf_age = utf8agetab[LEAF_GEN(leaf)];
+ if (leaf_age <= data->maxage && leaf_age < age)
+ age = leaf_age;
+ len -= utf8clen(s);
+ s += utf8clen(s);
+ }
+ return age;
+}
+#endif
+
+#if 0
+/*
+ * Length of the normalization of s.
+ * Return -1 if s is not valid UTF-8 unicode.
+ *
+ * A string of Default_Ignorable_Code_Point has length 0.
+ */
+static ssize_t utf8len(const struct utf8data *data, const char *s)
+{
+ utf8leaf_t *leaf;
+ size_t ret = 0;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!data)
+ return -1;
+ while (*s) {
+ leaf = utf8lookup(data, hangul, s);
+ if (!leaf)
+ return -1;
+ if (utf8agetab[LEAF_GEN(leaf)] > data->maxage)
+ ret += utf8clen(s);
+ else if (LEAF_CCC(leaf) == DECOMPOSE)
+ ret += strlen(LEAF_STR(leaf));
+ else
+ ret += utf8clen(s);
+ s += utf8clen(s);
+ }
+ return ret;
+}
+#endif
+
+#if 0
+/*
+ * Length of the normalization of s, touch at most len bytes.
+ * Return -1 if s is not valid UTF-8 unicode.
+ */
+static ssize_t utf8nlen(const struct utf8data *data, const char *s, size_t len)
+{
+ utf8leaf_t *leaf;
+ size_t ret = 0;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!data)
+ return -1;
+ while (len && *s) {
+ leaf = utf8nlookup(data, hangul, s, len);
+ if (!leaf)
+ return -1;
+ if (utf8agetab[LEAF_GEN(leaf)] > data->maxage)
+ ret += utf8clen(s);
+ else if (LEAF_CCC(leaf) == DECOMPOSE)
+ ret += strlen(LEAF_STR(leaf));
+ else
+ ret += utf8clen(s);
+ len -= utf8clen(s);
+ s += utf8clen(s);
+ }
+ return ret;
+}
+#endif
+
+/*
+ * Set up an utf8cursor for use by utf8byte().
+ *
+ * u8c : pointer to cursor.
+ * data : const struct utf8data to use for normalization.
+ * s : string.
+ * len : length of s.
+ *
+ * Returns -1 on error, 0 on success.
+ */
+static int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
+ const char *s, size_t len)
+{
+ if (!data)
+ return -1;
+ if (!s)
+ return -1;
+ u8c->data = data;
+ u8c->s = s;
+ u8c->p = NULL;
+ u8c->ss = NULL;
+ u8c->sp = NULL;
+ u8c->len = len;
+ u8c->slen = 0;
+ u8c->ccc = STOPPER;
+ u8c->nccc = STOPPER;
+ /* Check we didn't clobber the maximum length. */
+ if (u8c->len != len)
+ return -1;
+ /* The first byte of s may not be an utf8 continuation. */
+ if (len > 0 && (*s & 0xC0) == 0x80)
+ return -1;
+ return 0;
+}
+
+#if 0
+/*
+ * Set up an utf8cursor for use by utf8byte().
+ *
+ * u8c : pointer to cursor.
+ * data : const struct utf8data to use for normalization.
+ * s : NUL-terminated string.
+ *
+ * Returns -1 on error, 0 on success.
+ */
+static int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
+ const char *s)
+{
+ return utf8ncursor(u8c, data, s, (unsigned int)-1);
+}
+#endif
+
+/*
+ * Get one byte from the normalized form of the string described by u8c.
+ *
+ * Returns the byte cast to an unsigned char on success, and -1 on failure.
+ *
+ * The cursor keeps track of the location in the string in u8c->s.
+ * When a character is decomposed, the current location is stored in
+ * u8c->p, and u8c->s is set to the start of the decomposition. Note
+ * that bytes from a decomposition do not count against u8c->len.
+ *
+ * Characters are emitted if they match the current CCC in u8c->ccc.
+ * Hitting end-of-string while u8c->ccc == STOPPER means we're done,
+ * and the function returns 0 in that case.
+ *
+ * Sorting by CCC is done by repeatedly scanning the string. The
+ * values of u8c->s and u8c->p are stored in u8c->ss and u8c->sp at
+ * the start of the scan. The first pass finds the lowest CCC to be
+ * emitted and stores it in u8c->nccc, the second pass emits the
+ * characters with this CCC and finds the next lowest CCC. This limits
+ * the number of passes to 1 + the number of different CCCs in the
+ * sequence being scanned.
+ *
+ * Therefore:
+ * u8c->p != NULL -> a decomposition is being scanned.
+ * u8c->ss != NULL -> this is a repeating scan.
+ * u8c->ccc == -1 -> this is the first scan of a repeating scan.
+ */
+static int utf8byte(struct utf8cursor *u8c)
+{
+ utf8leaf_t *leaf;
+ int ccc;
+
+ for (;;) {
+ /* Check for the end of a decomposed character. */
+ if (u8c->p && *u8c->s == '\0') {
+ u8c->s = u8c->p;
+ u8c->p = NULL;
+ }
+
+ /* Check for end-of-string. */
+ if (!u8c->p && (u8c->len == 0 || *u8c->s == '\0')) {
+ /* There is no next byte. */
+ if (u8c->ccc == STOPPER)
+ return 0;
+ /* End-of-string during a scan counts as a stopper. */
+ ccc = STOPPER;
+ goto ccc_mismatch;
+ } else if ((*u8c->s & 0xC0) == 0x80) {
+ /* This is a continuation of the current character. */
+ if (!u8c->p)
+ u8c->len--;
+ return (unsigned char)*u8c->s++;
+ }
+
+ /* Look up the data for the current character. */
+ if (u8c->p) {
+ leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s);
+ } else {
+ leaf = utf8nlookup(u8c->data, u8c->hangul,
+ u8c->s, u8c->len);
+ }
+
+ /* No leaf found implies that the input is a binary blob. */
+ if (!leaf)
+ return -1;
+
+ ccc = LEAF_CCC(leaf);
+ /* Characters that are too new have CCC 0. */
+ if (utf8agetab[LEAF_GEN(leaf)] > u8c->data->maxage) {
+ ccc = STOPPER;
+ } else if (ccc == DECOMPOSE) {
+ u8c->len -= utf8clen(u8c->s);
+ u8c->p = u8c->s + utf8clen(u8c->s);
+ u8c->s = LEAF_STR(leaf);
+ /* Empty decomposition implies CCC 0. */
+ if (*u8c->s == '\0') {
+ if (u8c->ccc == STOPPER)
+ continue;
+ ccc = STOPPER;
+ goto ccc_mismatch;
+ }
+
+ leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s);
+ if (!leaf)
+ return -1;
+ ccc = LEAF_CCC(leaf);
+ }
+
+ /*
+ * If this is not a stopper, then see if it updates
+ * the next canonical class to be emitted.
+ */
+ if (ccc != STOPPER && u8c->ccc < ccc && ccc < u8c->nccc)
+ u8c->nccc = ccc;
+
+ /*
+ * Return the current byte if this is the current
+ * combining class.
+ */
+ if (ccc == u8c->ccc) {
+ if (!u8c->p)
+ u8c->len--;
+ return (unsigned char)*u8c->s++;
+ }
+
+ /* Current combining class mismatch. */
+ccc_mismatch:
+ if (u8c->nccc == STOPPER) {
+ /*
+ * Scan forward for the first canonical class
+ * to be emitted. Save the position from
+ * which to restart.
+ */
+ u8c->ccc = MINCCC - 1;
+ u8c->nccc = ccc;
+ u8c->sp = u8c->p;
+ u8c->ss = u8c->s;
+ u8c->slen = u8c->len;
+ if (!u8c->p)
+ u8c->len -= utf8clen(u8c->s);
+ u8c->s += utf8clen(u8c->s);
+ } else if (ccc != STOPPER) {
+ /* Not a stopper, and not the ccc we're emitting. */
+ if (!u8c->p)
+ u8c->len -= utf8clen(u8c->s);
+ u8c->s += utf8clen(u8c->s);
+ } else if (u8c->nccc != MAXCCC + 1) {
+ /* At a stopper, restart for next ccc. */
+ u8c->ccc = u8c->nccc;
+ u8c->nccc = MAXCCC + 1;
+ u8c->s = u8c->ss;
+ u8c->p = u8c->sp;
+ u8c->len = u8c->slen;
+ } else {
+ /* All done, proceed from here. */
+ u8c->ccc = STOPPER;
+ u8c->nccc = STOPPER;
+ u8c->sp = NULL;
+ u8c->ss = NULL;
+ u8c->slen = 0;
+ }
+ }
+}
+
+#if 0
+/*
+ * Look for the correct const struct utf8data for a unicode version.
+ * Returns NULL if the version requested is too new.
+ *
+ * Two normalization forms are supported: nfdi and nfdicf.
+ *
+ * nfdi:
+ * - Apply unicode normalization form NFD.
+ * - Remove any Default_Ignorable_Code_Point.
+ *
+ * nfdicf:
+ * - Apply unicode normalization form NFD.
+ * - Remove any Default_Ignorable_Code_Point.
+ * - Apply a full casefold (C + F).
+ */
+static const struct utf8data *utf8nfdi(unsigned int maxage)
+{
+ int i = ARRAY_SIZE(utf8nfdidata) - 1;
+
+ while (maxage < utf8nfdidata[i].maxage)
+ i--;
+ if (maxage > utf8nfdidata[i].maxage)
+ return NULL;
+ return &utf8nfdidata[i];
+}
+#endif
+
+static const struct utf8data *utf8nfdicf(unsigned int maxage)
+{
+ int i = ARRAY_SIZE(utf8nfdicfdata) - 1;
+
+ while (maxage < utf8nfdicfdata[i].maxage)
+ i--;
+ if (maxage > utf8nfdicfdata[i].maxage)
+ return NULL;
+ return &utf8nfdicfdata[i];
+}
+
+static int utf8_casefold(const struct ext2fs_nls_table *table,
+ const unsigned char *str, size_t len,
+ unsigned char *dest, size_t dlen)
+{
+ const struct utf8data *data = utf8nfdicf(table->version);
+ struct utf8cursor cur;
+ size_t nlen = 0;
+
+ if (utf8ncursor(&cur, data, (const char *) str, len) < 0)
+ goto invalid_seq;
+
+ for (nlen = 0; nlen < dlen; nlen++) {
+ int c = utf8byte(&cur);
+
+ dest[nlen] = c;
+ if (!c)
+ return nlen;
+ if (c == -1)
+ break;
+ }
+
+ return -ENAMETOOLONG;
+
+invalid_seq:
+ if (dlen < len)
+ return -ENAMETOOLONG;
+
+ /* Signal invalid sequence */
+ return -EINVAL;
+}
+
+static int utf8_validate(const struct ext2fs_nls_table *table,
+ char *s, size_t len, char **pos)
+{
+ const struct utf8data *data = utf8nfdicf(table->version);
+ utf8leaf_t *leaf;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!data)
+ return -1;
+ while (len && *s) {
+ leaf = utf8nlookup(data, hangul, s, len);
+ if (!leaf) {
+ *pos = s;
+ return 1;
+ }
+ len -= utf8clen(s);
+ s += utf8clen(s);
+ }
+ return 0;
+}
+
+static int utf8_casefold_cmp(const struct ext2fs_nls_table *table,
+ const unsigned char *str1, size_t len1,
+ const unsigned char *str2, size_t len2)
+{
+ const struct utf8data *data = utf8nfdicf(table->version);
+ int c1, c2;
+ struct utf8cursor cur1, cur2;
+
+ if (utf8ncursor(&cur1, data, (const char *) str1, len1) < 0)
+ return -1;
+ if (utf8ncursor(&cur2, data, (const char *) str2, len2) < 0)
+ return -1;
+
+ do {
+ c1 = utf8byte(&cur1);
+ c2 = utf8byte(&cur2);
+
+ if (c1 < 0 || c2 < 0)
+ return -1;
+ if (c1 != c2)
+ return c1 - c2;
+ } while (c1);
+
+ return 0;
+}
+
+static const struct ext2fs_nls_ops utf8_ops = {
+ .casefold = utf8_casefold,
+ .validate = utf8_validate,
+ .casefold_cmp = utf8_casefold_cmp,
+};
+
+static const struct ext2fs_nls_table nls_utf8 = {
+ .ops = &utf8_ops,
+ .version = UNICODE_AGE(12, 1, 0),
+};
+
+const struct ext2fs_nls_table *ext2fs_load_nls_table(int encoding)
+{
+ if (encoding == EXT4_ENC_UTF8_12_1)
+ return &nls_utf8;
+
+ return NULL;
+}
+
+int ext2fs_check_encoded_name(const struct ext2fs_nls_table *table,
+ char *name, size_t len, char **pos)
+{
+ return table->ops->validate(table, name, len, pos);
+}
+
+int ext2fs_casefold_cmp(const struct ext2fs_nls_table *table,
+ const unsigned char *str1, size_t len1,
+ const unsigned char *str2, size_t len2)
+{
+ return table->ops->casefold_cmp(table, str1, len1, str2, len2);
+}
diff --git a/lib/ext2fs/nt_io.c b/lib/ext2fs/nt_io.c
new file mode 100644
index 0000000..234f6b1
--- /dev/null
+++ b/lib/ext2fs/nt_io.c
@@ -0,0 +1,1494 @@
+/*
+ * nt_io.c --- This is the Nt I/O interface to the I/O manager.
+ *
+ * Implements a one-block write-through cache.
+ *
+ * Copyright (C) 1993, 1994, 1995 Theodore Ts'o.
+ * Copyright (C) 1998 Andrey Shedel (andreys@ns.cr.cyco.com)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+//
+// I need some warnings to disable...
+//
+
+
+#pragma warning(disable:4514) // unreferenced inline function has been removed
+#pragma warning(push,4)
+
+#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union)
+#pragma warning(disable:4214) // nonstandard extension used : bit field types other than int
+#pragma warning(disable:4115) // named type definition in parentheses
+
+#include <ntddk.h>
+#include <ntdddisk.h>
+#include <ntstatus.h>
+
+#pragma warning(pop)
+
+
+//
+// Some native APIs.
+//
+
+NTSYSAPI
+ULONG
+NTAPI
+RtlNtStatusToDosError(
+ IN NTSTATUS Status
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtClose(
+ IN HANDLE Handle
+ );
+
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtOpenFile(
+ OUT PHANDLE FileHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN ULONG ShareAccess,
+ IN ULONG OpenOptions
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtFlushBuffersFile(
+ IN HANDLE FileHandle,
+ OUT PIO_STATUS_BLOCK IoStatusBlock
+ );
+
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtReadFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ OUT PVOID Buffer,
+ IN ULONG Length,
+ IN PLARGE_INTEGER ByteOffset OPTIONAL,
+ IN PULONG Key OPTIONAL
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtWriteFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN PVOID Buffer,
+ IN ULONG Length,
+ IN PLARGE_INTEGER ByteOffset OPTIONAL,
+ IN PULONG Key OPTIONAL
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtDeviceIoControlFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN ULONG IoControlCode,
+ IN PVOID InputBuffer OPTIONAL,
+ IN ULONG InputBufferLength,
+ OUT PVOID OutputBuffer OPTIONAL,
+ IN ULONG OutputBufferLength
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtFsControlFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN ULONG IoControlCode,
+ IN PVOID InputBuffer OPTIONAL,
+ IN ULONG InputBufferLength,
+ OUT PVOID OutputBuffer OPTIONAL,
+ IN ULONG OutputBufferLength
+ );
+
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtDelayExecution(
+ IN BOOLEAN Alertable,
+ IN PLARGE_INTEGER Interval
+ );
+
+
+#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_IS_VOLUME_MOUNTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM,10, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+
+//
+// useful macros
+//
+
+#define BooleanFlagOn(Flags,SingleFlag) ((BOOLEAN)((((Flags) & (SingleFlag)) != 0)))
+
+
+//
+// Include Win32 error codes.
+//
+
+#include <winerror.h>
+
+//
+// standard stuff
+//
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <malloc.h>
+
+#include <linux/types.h>
+#include "ext2_fs.h"
+#include <errno.h>
+
+#include "et/com_err.h"
+#include "ext2fs/ext2fs.h"
+#include "ext2fs/ext2_err.h"
+
+
+
+
+//
+// For checking structure magic numbers...
+//
+
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+
+#define EXT2_ET_MAGIC_NT_IO_CHANNEL 0x10ed
+
+
+//
+// Private data block
+//
+
+typedef struct _NT_PRIVATE_DATA {
+ int magic;
+ HANDLE Handle;
+ int Flags;
+ PCHAR Buffer;
+ __u32 BufferBlockNumber;
+ ULONG BufferSize;
+ BOOLEAN OpenedReadonly;
+ BOOLEAN Written;
+}NT_PRIVATE_DATA, *PNT_PRIVATE_DATA;
+
+
+
+//
+// Standard interface prototypes
+//
+
+static errcode_t nt_open(const char *name, int flags, io_channel *channel);
+static errcode_t nt_close(io_channel channel);
+static errcode_t nt_set_blksize(io_channel channel, int blksize);
+static errcode_t nt_read_blk(io_channel channel, unsigned long block,
+ int count, void *data);
+static errcode_t nt_write_blk(io_channel channel, unsigned long block,
+ int count, const void *data);
+static errcode_t nt_flush(io_channel channel);
+
+static struct struct_io_manager struct_nt_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "NT I/O Manager",
+ .open = nt_open,
+ .close = nt_close,
+ .set_blksize = nt_set_blksize,
+ .read_blk = nt_read_blk,
+ .write_blk = nt_write_blk,
+ .flush = nt_flush
+};
+
+//
+// function to get API
+//
+
+io_manager nt_io_manager()
+{
+ return &struct_nt_manager;
+}
+
+
+
+
+
+//
+// This is a code to convert Win32 errors to unix errno
+//
+
+typedef struct {
+ ULONG WinError;
+ int errnocode;
+}ERROR_ENTRY;
+
+static ERROR_ENTRY ErrorTable[] = {
+ { ERROR_INVALID_FUNCTION, EINVAL },
+ { ERROR_FILE_NOT_FOUND, ENOENT },
+ { ERROR_PATH_NOT_FOUND, ENOENT },
+ { ERROR_TOO_MANY_OPEN_FILES, EMFILE },
+ { ERROR_ACCESS_DENIED, EACCES },
+ { ERROR_INVALID_HANDLE, EBADF },
+ { ERROR_ARENA_TRASHED, ENOMEM },
+ { ERROR_NOT_ENOUGH_MEMORY, ENOMEM },
+ { ERROR_INVALID_BLOCK, ENOMEM },
+ { ERROR_BAD_ENVIRONMENT, E2BIG },
+ { ERROR_BAD_FORMAT, ENOEXEC },
+ { ERROR_INVALID_ACCESS, EINVAL },
+ { ERROR_INVALID_DATA, EINVAL },
+ { ERROR_INVALID_DRIVE, ENOENT },
+ { ERROR_CURRENT_DIRECTORY, EACCES },
+ { ERROR_NOT_SAME_DEVICE, EXDEV },
+ { ERROR_NO_MORE_FILES, ENOENT },
+ { ERROR_LOCK_VIOLATION, EACCES },
+ { ERROR_BAD_NETPATH, ENOENT },
+ { ERROR_NETWORK_ACCESS_DENIED, EACCES },
+ { ERROR_BAD_NET_NAME, ENOENT },
+ { ERROR_FILE_EXISTS, EEXIST },
+ { ERROR_CANNOT_MAKE, EACCES },
+ { ERROR_FAIL_I24, EACCES },
+ { ERROR_INVALID_PARAMETER, EINVAL },
+ { ERROR_NO_PROC_SLOTS, EAGAIN },
+ { ERROR_DRIVE_LOCKED, EACCES },
+ { ERROR_BROKEN_PIPE, EPIPE },
+ { ERROR_DISK_FULL, ENOSPC },
+ { ERROR_INVALID_TARGET_HANDLE, EBADF },
+ { ERROR_INVALID_HANDLE, EINVAL },
+ { ERROR_WAIT_NO_CHILDREN, ECHILD },
+ { ERROR_CHILD_NOT_COMPLETE, ECHILD },
+ { ERROR_DIRECT_ACCESS_HANDLE, EBADF },
+ { ERROR_NEGATIVE_SEEK, EINVAL },
+ { ERROR_SEEK_ON_DEVICE, EACCES },
+ { ERROR_DIR_NOT_EMPTY, ENOTEMPTY },
+ { ERROR_NOT_LOCKED, EACCES },
+ { ERROR_BAD_PATHNAME, ENOENT },
+ { ERROR_MAX_THRDS_REACHED, EAGAIN },
+ { ERROR_LOCK_FAILED, EACCES },
+ { ERROR_ALREADY_EXISTS, EEXIST },
+ { ERROR_FILENAME_EXCED_RANGE, ENOENT },
+ { ERROR_NESTING_NOT_ALLOWED, EAGAIN },
+ { ERROR_NOT_ENOUGH_QUOTA, ENOMEM }
+};
+
+
+
+
+static
+unsigned
+_MapDosError (
+ IN ULONG WinError
+ )
+{
+ int i;
+
+ //
+ // Lookup
+ //
+
+ for (i = 0; i < (sizeof(ErrorTable)/sizeof(ErrorTable[0])); ++i)
+ {
+ if (WinError == ErrorTable[i].WinError)
+ {
+ return ErrorTable[i].errnocode;
+ }
+ }
+
+ //
+ // not in table. Check ranges
+ //
+
+ if ((WinError >= ERROR_WRITE_PROTECT) &&
+ (WinError <= ERROR_SHARING_BUFFER_EXCEEDED))
+ {
+ return EACCES;
+ }
+ else if ((WinError >= ERROR_INVALID_STARTING_CODESEG) &&
+ (WinError <= ERROR_INFLOOP_IN_RELOC_CHAIN))
+ {
+ return ENOEXEC;
+ }
+ else
+ {
+ return EINVAL;
+ }
+}
+
+
+
+
+
+
+
+//
+// Function to map NT status to dos error.
+//
+
+static
+__inline
+unsigned
+_MapNtStatus(
+ IN NTSTATUS Status
+ )
+{
+ return _MapDosError(RtlNtStatusToDosError(Status));
+}
+
+
+
+
+
+//
+// Helper functions to make things easier
+//
+
+static
+NTSTATUS
+_OpenNtName(
+ IN PCSTR Name,
+ IN BOOLEAN Readonly,
+ OUT PHANDLE Handle,
+ OUT PBOOLEAN OpenedReadonly OPTIONAL
+ )
+{
+ UNICODE_STRING UnicodeString;
+ ANSI_STRING AnsiString;
+ WCHAR Buffer[512];
+ NTSTATUS Status;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ IO_STATUS_BLOCK IoStatusBlock;
+
+ //
+ // Make Unicode name from input string
+ //
+
+ UnicodeString.Buffer = &Buffer[0];
+ UnicodeString.Length = 0;
+ UnicodeString.MaximumLength = sizeof(Buffer); // in bytes!!!
+
+ RtlInitAnsiString(&AnsiString, Name);
+
+ Status = RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, FALSE);
+
+ if(!NT_SUCCESS(Status))
+ {
+ return Status; // Unmappable character?
+ }
+
+ //
+ // Initialize object
+ //
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &UnicodeString,
+ OBJ_CASE_INSENSITIVE,
+ NULL,
+ NULL );
+
+ //
+ // Try to open it in initial mode
+ //
+
+ if(ARGUMENT_PRESENT(OpenedReadonly))
+ {
+ *OpenedReadonly = Readonly;
+ }
+
+
+ Status = NtOpenFile(Handle,
+ SYNCHRONIZE | FILE_READ_DATA | (Readonly ? 0 : FILE_WRITE_DATA),
+ &ObjectAttributes,
+ &IoStatusBlock,
+ FILE_SHARE_WRITE | FILE_SHARE_READ,
+ FILE_SYNCHRONOUS_IO_NONALERT);
+
+ if(!NT_SUCCESS(Status))
+ {
+ //
+ // Maybe was just mounted? wait 0.5 sec and retry.
+ //
+
+ LARGE_INTEGER Interval;
+ Interval.QuadPart = -5000000; // 0.5 sec. from now
+
+ NtDelayExecution(FALSE, &Interval);
+
+ Status = NtOpenFile(Handle,
+ SYNCHRONIZE | FILE_READ_DATA | (Readonly ? 0 : FILE_WRITE_DATA),
+ &ObjectAttributes,
+ &IoStatusBlock,
+ FILE_SHARE_WRITE | FILE_SHARE_READ,
+ FILE_SYNCHRONOUS_IO_NONALERT);
+
+ //
+ // Try to satisfy mode
+ //
+
+ if((STATUS_ACCESS_DENIED == Status) && !Readonly)
+ {
+ if(ARGUMENT_PRESENT(OpenedReadonly))
+ {
+ *OpenedReadonly = TRUE;
+ }
+
+ Status = NtOpenFile(Handle,
+ SYNCHRONIZE | FILE_READ_DATA,
+ &ObjectAttributes,
+ &IoStatusBlock,
+ FILE_SHARE_WRITE | FILE_SHARE_READ,
+ FILE_SYNCHRONOUS_IO_NONALERT);
+ }
+ }
+
+
+
+ //
+ // done
+ //
+
+ return Status;
+}
+
+
+static
+NTSTATUS
+_OpenDriveLetter(
+ IN CHAR Letter,
+ IN BOOLEAN ReadOnly,
+ OUT PHANDLE Handle,
+ OUT PBOOLEAN OpenedReadonly OPTIONAL
+ )
+{
+ CHAR Buffer[100];
+
+ sprintf(Buffer, "\\DosDevices\\%c:", Letter);
+
+ return _OpenNtName(Buffer, ReadOnly, Handle, OpenedReadonly);
+}
+
+
+//
+// Flush device
+//
+
+static
+__inline
+NTSTATUS
+_FlushDrive(
+ IN HANDLE Handle
+ )
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ return NtFlushBuffersFile(Handle, &IoStatusBlock);
+}
+
+
+//
+// lock drive
+//
+
+static
+__inline
+NTSTATUS
+_LockDrive(
+ IN HANDLE Handle
+ )
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ return NtFsControlFile(Handle, 0, 0, 0, &IoStatusBlock, FSCTL_LOCK_VOLUME, 0, 0, 0, 0);
+}
+
+
+//
+// unlock drive
+//
+
+static
+__inline
+NTSTATUS
+_UnlockDrive(
+ IN HANDLE Handle
+ )
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ return NtFsControlFile(Handle, 0, 0, 0, &IoStatusBlock, FSCTL_UNLOCK_VOLUME, 0, 0, 0, 0);
+}
+
+static
+__inline
+NTSTATUS
+_DismountDrive(
+ IN HANDLE Handle
+ )
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ return NtFsControlFile(Handle, 0, 0, 0, &IoStatusBlock, FSCTL_DISMOUNT_VOLUME, 0, 0, 0, 0);
+}
+
+
+//
+// is mounted
+//
+
+static
+__inline
+BOOLEAN
+_IsMounted(
+ IN HANDLE Handle
+ )
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ NTSTATUS Status;
+ Status = NtFsControlFile(Handle, 0, 0, 0, &IoStatusBlock, FSCTL_IS_VOLUME_MOUNTED, 0, 0, 0, 0);
+ return (BOOLEAN)(STATUS_SUCCESS == Status);
+}
+
+
+static
+__inline
+NTSTATUS
+_CloseDisk(
+ IN HANDLE Handle
+ )
+{
+ return NtClose(Handle);
+}
+
+
+
+
+//
+// Make NT name from any recognized name
+//
+
+static
+PCSTR
+_NormalizeDeviceName(
+ IN PCSTR Device,
+ IN PSTR NormalizedDeviceNameBuffer
+ )
+{
+ int PartitionNumber = -1;
+ UCHAR DiskNumber;
+ PSTR p;
+
+
+ //
+ // Do not try to parse NT name
+ //
+
+ if('\\' == *Device)
+ return Device;
+
+
+
+ //
+ // Strip leading '/dev/' if any
+ //
+
+ if(('/' == *(Device)) &&
+ ('d' == *(Device + 1)) &&
+ ('e' == *(Device + 2)) &&
+ ('v' == *(Device + 3)) &&
+ ('/' == *(Device + 4)))
+ {
+ Device += 5;
+ }
+
+ if('\0' == *Device)
+ {
+ return NULL;
+ }
+
+
+ //
+ // forms: hda[n], fd[n]
+ //
+
+ if('d' != *(Device + 1))
+ {
+ return NULL;
+ }
+
+ if('h' == *Device)
+ {
+ if((*(Device + 2) < 'a') || (*(Device + 2) > ('a' + 9)) ||
+ ((*(Device + 3) != '\0') &&
+ ((*(Device + 4) != '\0') ||
+ ((*(Device + 3) < '0') || (*(Device + 3) > '9'))
+ )
+ )
+ )
+ {
+ return NULL;
+ }
+
+ DiskNumber = (UCHAR)(*(Device + 2) - 'a');
+
+ if(*(Device + 3) != '\0')
+ {
+ PartitionNumber = (*(Device + 3) - '0');
+ }
+
+ }
+ else if('f' == *Device)
+ {
+ //
+ // 3-d letter should be a digit.
+ //
+
+ if((*(Device + 3) != '\0') ||
+ (*(Device + 2) < '0') || (*(Device + 2) > '9'))
+ {
+ return NULL;
+ }
+
+ DiskNumber = (UCHAR)(*(Device + 2) - '0');
+
+ }
+ else
+ {
+ //
+ // invalid prefix
+ //
+
+ return NULL;
+ }
+
+
+
+ //
+ // Prefix
+ //
+
+ strcpy(NormalizedDeviceNameBuffer, "\\Device\\");
+
+ //
+ // Media name
+ //
+
+ switch(*Device)
+ {
+
+ case 'f':
+ strcat(NormalizedDeviceNameBuffer, "Floppy0");
+ break;
+
+ case 'h':
+ strcat(NormalizedDeviceNameBuffer, "Harddisk0");
+ break;
+ }
+
+
+ p = NormalizedDeviceNameBuffer + strlen(NormalizedDeviceNameBuffer) - 1;
+ *p = (CHAR)(*p + DiskNumber);
+
+
+ //
+ // Partition nr.
+ //
+
+ if(PartitionNumber >= 0)
+ {
+ strcat(NormalizedDeviceNameBuffer, "\\Partition0");
+
+ p = NormalizedDeviceNameBuffer + strlen(NormalizedDeviceNameBuffer) - 1;
+ *p = (CHAR)(*p + PartitionNumber);
+ }
+
+
+ return NormalizedDeviceNameBuffer;
+}
+
+
+
+
+static
+VOID
+_GetDeviceSize(
+ IN HANDLE h,
+ OUT unsigned __int64 *FsSize
+ )
+{
+ PARTITION_INFORMATION pi;
+ DISK_GEOMETRY gi;
+ NTSTATUS Status;
+ IO_STATUS_BLOCK IoStatusBlock;
+
+ //
+ // Zero it
+ //
+
+ *FsSize = 0;
+
+ //
+ // Call driver
+ //
+
+ RtlZeroMemory(&pi, sizeof(PARTITION_INFORMATION));
+
+ Status = NtDeviceIoControlFile(
+ h, NULL, NULL, NULL, &IoStatusBlock, IOCTL_DISK_GET_PARTITION_INFO,
+ &pi, sizeof(PARTITION_INFORMATION),
+ &pi, sizeof(PARTITION_INFORMATION));
+
+
+ if(NT_SUCCESS(Status))
+ {
+ *FsSize = pi.PartitionLength.QuadPart;
+ }
+ else if(STATUS_INVALID_DEVICE_REQUEST == Status)
+ {
+ //
+ // No partitions: get device info.
+ //
+
+ RtlZeroMemory(&gi, sizeof(DISK_GEOMETRY));
+
+ Status = NtDeviceIoControlFile(
+ h, NULL, NULL, NULL, &IoStatusBlock, IOCTL_DISK_GET_DRIVE_GEOMETRY,
+ &gi, sizeof(DISK_GEOMETRY),
+ &gi, sizeof(DISK_GEOMETRY));
+
+
+ if(NT_SUCCESS(Status))
+ {
+ *FsSize =
+ gi.BytesPerSector *
+ gi.SectorsPerTrack *
+ gi.TracksPerCylinder *
+ gi.Cylinders.QuadPart;
+ }
+
+ }
+}
+
+
+
+//
+// Open device by name.
+//
+
+static
+BOOLEAN
+_Ext2OpenDevice(
+ IN PCSTR Name,
+ IN BOOLEAN ReadOnly,
+ OUT PHANDLE Handle,
+ OUT PBOOLEAN OpenedReadonly OPTIONAL,
+ OUT unsigned *Errno OPTIONAL
+ )
+{
+ CHAR NormalizedDeviceName[512];
+ NTSTATUS Status;
+
+ if(NULL == Name)
+ {
+ //
+ // Set not found
+ //
+
+ if(ARGUMENT_PRESENT(Errno))
+ *Errno = ENOENT;
+
+ return FALSE;
+ }
+
+
+ if((((*Name) | 0x20) >= 'a') && (((*Name) | 0x20) <= 'z') &&
+ (':' == *(Name + 1)) && ('\0' == *(Name + 2)))
+ {
+ Status = _OpenDriveLetter(*Name, ReadOnly, Handle, OpenedReadonly);
+ }
+ else
+ {
+ //
+ // Make name
+ //
+
+ Name = _NormalizeDeviceName(Name, NormalizedDeviceName);
+
+ if(NULL == Name)
+ {
+ //
+ // Set not found
+ //
+
+ if(ARGUMENT_PRESENT(Errno))
+ *Errno = ENOENT;
+
+ return FALSE;
+ }
+
+ //
+ // Try to open it
+ //
+
+ Status = _OpenNtName(Name, ReadOnly, Handle, OpenedReadonly);
+ }
+
+
+ if(!NT_SUCCESS(Status))
+ {
+ if(ARGUMENT_PRESENT(Errno))
+ *Errno = _MapNtStatus(Status);
+
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+//
+// Raw block io. Sets dos errno
+//
+
+static
+BOOLEAN
+_BlockIo(
+ IN HANDLE Handle,
+ IN LARGE_INTEGER Offset,
+ IN ULONG Bytes,
+ IN OUT PCHAR Buffer,
+ IN BOOLEAN Read,
+ OUT unsigned* Errno
+ )
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ NTSTATUS Status;
+
+ //
+ // Should be aligned
+ //
+
+ ASSERT(0 == (Bytes % 512));
+ ASSERT(0 == (Offset.LowPart % 512));
+
+
+ //
+ // perform io
+ //
+
+ if(Read)
+ {
+ Status = NtReadFile(Handle, NULL, NULL, NULL,
+ &IoStatusBlock, Buffer, Bytes, &Offset, NULL);
+ }
+ else
+ {
+ Status = NtWriteFile(Handle, NULL, NULL, NULL,
+ &IoStatusBlock, Buffer, Bytes, &Offset, NULL);
+ }
+
+
+ //
+ // translate error
+ //
+
+ if(NT_SUCCESS(Status))
+ {
+ *Errno = 0;
+ return TRUE;
+ }
+
+ *Errno = _MapNtStatus(Status);
+
+ return FALSE;
+}
+
+
+
+__inline
+BOOLEAN
+_RawWrite(
+ IN HANDLE Handle,
+ IN LARGE_INTEGER Offset,
+ IN ULONG Bytes,
+ OUT const CHAR* Buffer,
+ OUT unsigned* Errno
+ )
+{
+ return _BlockIo(Handle, Offset, Bytes, (PCHAR)Buffer, FALSE, Errno);
+}
+
+__inline
+BOOLEAN
+_RawRead(
+ IN HANDLE Handle,
+ IN LARGE_INTEGER Offset,
+ IN ULONG Bytes,
+ IN PCHAR Buffer,
+ OUT unsigned* Errno
+ )
+{
+ return _BlockIo(Handle, Offset, Bytes, Buffer, TRUE, Errno);
+}
+
+
+
+__inline
+BOOLEAN
+_SetPartType(
+ IN HANDLE Handle,
+ IN UCHAR Type
+ )
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ return STATUS_SUCCESS == NtDeviceIoControlFile(
+ Handle, NULL, NULL, NULL, &IoStatusBlock, IOCTL_DISK_SET_PARTITION_INFO,
+ &Type, sizeof(Type),
+ NULL, 0);
+}
+
+
+
+//--------------------- interface part
+
+//
+// Interface functions.
+// Is_mounted is set to 1 if the device is mounted, 0 otherwise
+//
+
+errcode_t
+ext2fs_check_if_mounted(const char *file, int *mount_flags)
+{
+ HANDLE h;
+ BOOLEAN Readonly;
+
+ *mount_flags = 0;
+
+ if(!_Ext2OpenDevice(file, TRUE, &h, &Readonly, NULL))
+ {
+ return 0;
+ }
+
+
+ __try{
+ *mount_flags &= _IsMounted(h) ? EXT2_MF_MOUNTED : 0;
+ }
+ __finally{
+ _CloseDisk(h);
+ }
+
+ return 0;
+}
+
+
+
+//
+// Returns the number of blocks in a partition
+//
+
+static __int64 FsSize = 0;
+static char knowndevice[1024] = "";
+
+
+errcode_t
+ext2fs_get_device_size(const char *file, int blocksize,
+ blk_t *retblocks)
+{
+ HANDLE h;
+ BOOLEAN Readonly;
+
+ if((0 == FsSize) || (0 != strcmp(knowndevice, file)))
+ {
+
+ if(!_Ext2OpenDevice(file, TRUE, &h, &Readonly, NULL))
+ {
+ return 0;
+ }
+
+
+ __try{
+
+ //
+ // Get size
+ //
+
+ _GetDeviceSize(h, &FsSize);
+ strcpy(knowndevice, file);
+ }
+ __finally{
+ _CloseDisk(h);
+ }
+
+ }
+
+ *retblocks = (blk_t)(unsigned __int64)(FsSize / blocksize);
+ UNREFERENCED_PARAMETER(file);
+ return 0;
+}
+
+
+
+
+
+
+//
+// Table elements
+//
+
+
+static
+errcode_t
+nt_open(const char *name, int flags, io_channel *channel)
+{
+ io_channel io = NULL;
+ PNT_PRIVATE_DATA NtData = NULL;
+ errcode_t Errno = 0;
+
+ //
+ // Check name
+ //
+
+ if (NULL == name)
+ {
+ return EXT2_ET_BAD_DEVICE_NAME;
+ }
+
+ __try{
+
+ //
+ // Allocate channel handle
+ //
+
+ io = (io_channel) malloc(sizeof(struct struct_io_channel));
+
+ if (NULL == io)
+ {
+ Errno = ENOMEM;
+ __leave;
+ }
+
+ RtlZeroMemory(io, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+
+ NtData = (PNT_PRIVATE_DATA)malloc(sizeof(NT_PRIVATE_DATA));
+
+ if (NULL == NtData)
+ {
+ Errno = ENOMEM;
+ __leave;
+ }
+
+
+ io->manager = nt_io_manager();
+ io->name = malloc(strlen(name) + 1);
+ if (NULL == io->name)
+ {
+ Errno = ENOMEM;
+ __leave;
+ }
+
+ strcpy(io->name, name);
+ io->private_data = NtData;
+ io->block_size = 1024;
+ io->read_error = 0;
+ io->write_error = 0;
+ io->refcount = 1;
+
+ //
+ // Initialize data
+ //
+
+ RtlZeroMemory(NtData, sizeof(NT_PRIVATE_DATA));
+
+ NtData->magic = EXT2_ET_MAGIC_NT_IO_CHANNEL;
+ NtData->BufferBlockNumber = 0xffffffff;
+ NtData->BufferSize = 1024;
+ NtData->Buffer = malloc(NtData->BufferSize);
+
+ if (NULL == NtData->Buffer)
+ {
+ Errno = ENOMEM;
+ __leave;
+ }
+
+ //
+ // Open it
+ //
+
+ if(!_Ext2OpenDevice(name, (BOOLEAN)!BooleanFlagOn(flags, EXT2_FLAG_RW), &NtData->Handle, &NtData->OpenedReadonly, &Errno))
+ {
+ __leave;
+ }
+
+
+ //
+ // get size
+ //
+
+ _GetDeviceSize(NtData->Handle, &FsSize);
+ strcpy(knowndevice, name);
+
+
+ //
+ // Lock/dismount
+ //
+
+ if(!NT_SUCCESS(_LockDrive(NtData->Handle)) /*|| !NT_SUCCESS(_DismountDrive(NtData->Handle))*/)
+ {
+ NtData->OpenedReadonly = TRUE;
+ }
+
+ //
+ // Done
+ //
+
+ *channel = io;
+
+
+ }
+ __finally{
+
+ if(0 != Errno)
+ {
+ //
+ // Cleanup
+ //
+
+ if (NULL != io)
+ {
+ free(io->name);
+ free(io);
+ }
+
+ if (NULL != NtData)
+ {
+ if(NULL != NtData->Handle)
+ {
+ _UnlockDrive(NtData->Handle);
+ _CloseDisk(NtData->Handle);
+ }
+
+ free(NtData->Buffer);
+ free(NtData);
+ }
+ }
+ }
+
+ return Errno;
+}
+
+
+//
+// Close api
+//
+
+static
+errcode_t
+nt_close(io_channel channel)
+{
+ PNT_PRIVATE_DATA NtData = NULL;
+
+ if(NULL == channel)
+ {
+ return 0;
+ }
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ NtData = (PNT_PRIVATE_DATA) channel->private_data;
+ EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL);
+
+ if (--channel->refcount > 0)
+ {
+ return 0;
+ }
+
+ free(channel->name);
+ free(channel);
+
+ if (NULL != NtData)
+ {
+ if(NULL != NtData->Handle)
+ {
+ _DismountDrive(NtData->Handle);
+ _UnlockDrive(NtData->Handle);
+ _CloseDisk(NtData->Handle);
+ }
+
+ free(NtData->Buffer);
+ free(NtData);
+ }
+
+ return 0;
+}
+
+
+
+//
+// set block size
+//
+
+static
+errcode_t
+nt_set_blksize(io_channel channel, int blksize)
+{
+ PNT_PRIVATE_DATA NtData = NULL;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ NtData = (PNT_PRIVATE_DATA) channel->private_data;
+ EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL);
+
+ if (channel->block_size != blksize)
+ {
+ channel->block_size = blksize;
+
+ free(NtData->Buffer);
+ NtData->BufferBlockNumber = 0xffffffff;
+ NtData->BufferSize = channel->block_size;
+ ASSERT(0 == (NtData->BufferSize % 512));
+
+ NtData->Buffer = malloc(NtData->BufferSize);
+
+ if (NULL == NtData->Buffer)
+ {
+ return ENOMEM;
+ }
+
+ }
+
+ return 0;
+}
+
+
+//
+// read block
+//
+
+static
+errcode_t
+nt_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ PVOID BufferToRead;
+ ULONG SizeToRead;
+ ULONG Size;
+ LARGE_INTEGER Offset;
+ PNT_PRIVATE_DATA NtData = NULL;
+ unsigned Errno = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ NtData = (PNT_PRIVATE_DATA) channel->private_data;
+ EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL);
+
+ //
+ // If it's in the cache, use it!
+ //
+
+ if ((1 == count) &&
+ (block == NtData->BufferBlockNumber) &&
+ (NtData->BufferBlockNumber != 0xffffffff))
+ {
+ memcpy(buf, NtData->Buffer, channel->block_size);
+ return 0;
+ }
+
+ Size = (count < 0) ? (ULONG)(-count) : (ULONG)(count * channel->block_size);
+
+ Offset.QuadPart = block * channel->block_size;
+
+ //
+ // If not fit to the block
+ //
+
+ if(Size <= NtData->BufferSize)
+ {
+ //
+ // Update the cache
+ //
+
+ NtData->BufferBlockNumber = block;
+ BufferToRead = NtData->Buffer;
+ SizeToRead = NtData->BufferSize;
+ }
+ else
+ {
+ SizeToRead = Size;
+ BufferToRead = buf;
+ ASSERT(0 == (SizeToRead % channel->block_size));
+ }
+
+ if(!_RawRead(NtData->Handle, Offset, SizeToRead, BufferToRead, &Errno))
+ {
+
+ if (channel->read_error)
+ {
+ return (channel->read_error)(channel, block, count, buf,
+ Size, 0, Errno);
+ }
+ else
+ {
+ return Errno;
+ }
+ }
+
+
+ if(BufferToRead != buf)
+ {
+ ASSERT(Size <= SizeToRead);
+ memcpy(buf, BufferToRead, Size);
+ }
+
+ return 0;
+}
+
+
+//
+// write block
+//
+
+static
+errcode_t
+nt_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ ULONG SizeToWrite;
+ LARGE_INTEGER Offset;
+ PNT_PRIVATE_DATA NtData = NULL;
+ unsigned Errno = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ NtData = (PNT_PRIVATE_DATA) channel->private_data;
+ EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL);
+
+ if(NtData->OpenedReadonly)
+ {
+ return EACCES;
+ }
+
+ if (count == 1)
+ {
+ SizeToWrite = channel->block_size;
+ }
+ else
+ {
+ NtData->BufferBlockNumber = 0xffffffff;
+
+ if (count < 0)
+ {
+ SizeToWrite = (ULONG)(-count);
+ }
+ else
+ {
+ SizeToWrite = (ULONG)(count * channel->block_size);
+ }
+ }
+
+
+ ASSERT(0 == (SizeToWrite % 512));
+ Offset.QuadPart = block * channel->block_size;
+
+ if(!_RawWrite(NtData->Handle, Offset, SizeToWrite, buf, &Errno))
+ {
+ if (channel->write_error)
+ {
+ return (channel->write_error)(channel, block, count, buf,
+ SizeToWrite, 0, Errno);
+ }
+ else
+ {
+ return Errno;
+ }
+ }
+
+
+ //
+ // Stash a copy.
+ //
+
+ if(SizeToWrite >= NtData->BufferSize)
+ {
+ NtData->BufferBlockNumber = block;
+ memcpy(NtData->Buffer, buf, NtData->BufferSize);
+ }
+
+ NtData->Written = TRUE;
+
+ return 0;
+
+}
+
+
+
+//
+// Flush data buffers to disk. Since we are currently using a
+// write-through cache, this is a no-op.
+//
+
+static
+errcode_t
+nt_flush(io_channel channel)
+{
+ PNT_PRIVATE_DATA NtData = NULL;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ NtData = (PNT_PRIVATE_DATA) channel->private_data;
+ EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL);
+
+ if(NtData->OpenedReadonly)
+ {
+ return 0; // EACCESS;
+ }
+
+
+ //
+ // Flush file buffers.
+ //
+
+ _FlushDrive(NtData->Handle);
+
+
+ //
+ // Test and correct partition type.
+ //
+
+ if(NtData->Written)
+ {
+ _SetPartType(NtData->Handle, 0x83);
+ }
+
+ return 0;
+}
+
+
diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
new file mode 100644
index 0000000..fd56a9a
--- /dev/null
+++ b/lib/ext2fs/openfs.c
@@ -0,0 +1,590 @@
+/*
+ * openfs.c --- open an ext2 filesystem
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+
+#include "ext2fs.h"
+#include "e2image.h"
+
+blk64_t ext2fs_descriptor_block_loc2(ext2_filsys fs, blk64_t group_block,
+ dgrp_t i)
+{
+ int bg;
+ int has_super = 0, group_zero_adjust = 0;
+ blk64_t ret_blk;
+
+ /*
+ * On a bigalloc FS with 1K blocks, block 0 is reserved for non-ext4
+ * stuff, so adjust for that if we're being asked for group 0.
+ */
+ if (i == 0 && fs->blocksize == 1024 && EXT2FS_CLUSTER_RATIO(fs) > 1)
+ group_zero_adjust = 1;
+
+ if (!ext2fs_has_feature_meta_bg(fs->super) ||
+ (i < fs->super->s_first_meta_bg))
+ return group_block + i + 1 + group_zero_adjust;
+
+ bg = EXT2_DESC_PER_BLOCK(fs->super) * i;
+ if (ext2fs_bg_has_super(fs, bg))
+ has_super = 1;
+ ret_blk = ext2fs_group_first_block2(fs, bg);
+ /*
+ * If group_block is not the normal value, we're trying to use
+ * the backup group descriptors and superblock --- so use the
+ * alternate location of the second block group in the
+ * metablock group. Ideally we should be testing each bg
+ * descriptor block individually for correctness, but we don't
+ * have the infrastructure in place to do that.
+ */
+ if (group_block != fs->super->s_first_data_block &&
+ ((ret_blk + has_super + fs->super->s_blocks_per_group) <
+ ext2fs_blocks_count(fs->super))) {
+ ret_blk += fs->super->s_blocks_per_group;
+
+ /*
+ * If we're going to jump forward a block group, make sure
+ * that we adjust has_super to account for the next group's
+ * backup superblock (or lack thereof).
+ */
+ if (ext2fs_bg_has_super(fs, bg + 1))
+ has_super = 1;
+ else
+ has_super = 0;
+ }
+ return ret_blk + has_super + group_zero_adjust;
+}
+
+blk_t ext2fs_descriptor_block_loc(ext2_filsys fs, blk_t group_block, dgrp_t i)
+{
+ return ext2fs_descriptor_block_loc2(fs, group_block, i);
+}
+
+errcode_t ext2fs_open(const char *name, int flags, int superblock,
+ unsigned int block_size, io_manager manager,
+ ext2_filsys *ret_fs)
+{
+ return ext2fs_open2(name, 0, flags, superblock, block_size,
+ manager, ret_fs);
+}
+
+static void block_sha_map_free_entry(void *data)
+{
+ free(data);
+ return;
+}
+
+/*
+ * Note: if superblock is non-zero, block-size must also be non-zero.
+ * Superblock and block_size can be zero to use the default size.
+ *
+ * Valid flags for ext2fs_open()
+ *
+ * EXT2_FLAG_RW - Open the filesystem for read/write.
+ * EXT2_FLAG_FORCE - Open the filesystem even if some of the
+ * features aren't supported.
+ * EXT2_FLAG_JOURNAL_DEV_OK - Open an ext3 journal device
+ * EXT2_FLAG_SKIP_MMP - Open without multi-mount protection check.
+ * EXT2_FLAG_64BITS - Allow 64-bit bitfields (needed for large
+ * filesystems)
+ */
+errcode_t ext2fs_open2(const char *name, const char *io_options,
+ int flags, int superblock,
+ unsigned int block_size, io_manager manager,
+ ext2_filsys *ret_fs)
+{
+ ext2_filsys fs;
+ errcode_t retval;
+ unsigned long i, first_meta_bg;
+ __u32 features;
+ unsigned int blocks_per_group, io_flags;
+ blk64_t group_block, blk;
+ char *dest, *cp;
+ int group_zero_adjust = 0;
+ unsigned int inode_size;
+ __u64 groups_cnt;
+#ifdef WORDS_BIGENDIAN
+ unsigned int groups_per_block;
+ struct ext2_group_desc *gdp;
+ int j;
+#endif
+ char *time_env;
+ int csum_retries = 0;
+
+ EXT2_CHECK_MAGIC(manager, EXT2_ET_MAGIC_IO_MANAGER);
+
+ retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys), &fs);
+ if (retval)
+ return retval;
+
+ memset(fs, 0, sizeof(struct struct_ext2_filsys));
+ fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS;
+ fs->flags = flags;
+ /* don't overwrite sb backups unless flag is explicitly cleared */
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+ fs->umask = 022;
+
+ time_env = getenv("E2FSPROGS_FAKE_TIME");
+ if (time_env)
+ fs->now = strtoul(time_env, NULL, 0);
+
+ retval = ext2fs_get_mem(strlen(name)+1, &fs->device_name);
+ if (retval)
+ goto cleanup;
+ strcpy(fs->device_name, name);
+ cp = strchr(fs->device_name, '?');
+ if (!io_options && cp) {
+ *cp++ = 0;
+ io_options = cp;
+ }
+
+ io_flags = 0;
+ if (flags & EXT2_FLAG_RW)
+ io_flags |= IO_FLAG_RW;
+ if (flags & EXT2_FLAG_EXCLUSIVE)
+ io_flags |= IO_FLAG_EXCLUSIVE;
+ if (flags & EXT2_FLAG_DIRECT_IO)
+ io_flags |= IO_FLAG_DIRECT_IO;
+ if (flags & EXT2_FLAG_THREADS)
+ io_flags |= IO_FLAG_THREADS;
+ retval = manager->open(fs->device_name, io_flags, &fs->io);
+ if (retval)
+ goto cleanup;
+ if (io_options &&
+ (retval = io_channel_set_options(fs->io, io_options)))
+ goto cleanup;
+ fs->image_io = fs->io;
+ fs->io->app_data = fs;
+ retval = io_channel_alloc_buf(fs->io, -SUPERBLOCK_SIZE, &fs->super);
+ if (retval)
+ goto cleanup;
+ if (flags & EXT2_FLAG_IMAGE_FILE) {
+ retval = ext2fs_get_mem(sizeof(struct ext2_image_hdr),
+ &fs->image_header);
+ if (retval)
+ goto cleanup;
+ retval = io_channel_read_blk(fs->io, 0,
+ -(int)sizeof(struct ext2_image_hdr),
+ fs->image_header);
+ if (retval)
+ goto cleanup;
+ if (ext2fs_le32_to_cpu(fs->image_header->magic_number) != EXT2_ET_MAGIC_E2IMAGE)
+ return EXT2_ET_MAGIC_E2IMAGE;
+ superblock = 1;
+ block_size = ext2fs_le32_to_cpu(fs->image_header->fs_blocksize);
+ }
+
+ /*
+ * If the user specifies a specific block # for the
+ * superblock, then he/she must also specify the block size!
+ * Otherwise, read the master superblock located at offset
+ * SUPERBLOCK_OFFSET from the start of the partition.
+ *
+ * Note: we only save a backup copy of the superblock if we
+ * are reading the superblock from the primary superblock location.
+ */
+ if (superblock) {
+ if (!block_size) {
+ retval = EXT2_ET_INVALID_ARGUMENT;
+ goto cleanup;
+ }
+ io_channel_set_blksize(fs->io, block_size);
+ group_block = superblock;
+ fs->orig_super = 0;
+ } else {
+ io_channel_set_blksize(fs->io, SUPERBLOCK_OFFSET);
+ superblock = 1;
+ group_block = 0;
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, &fs->orig_super);
+ if (retval)
+ goto cleanup;
+ }
+retry:
+ retval = io_channel_read_blk(fs->io, superblock, -SUPERBLOCK_SIZE,
+ fs->super);
+ if (retval)
+ goto cleanup;
+ if (fs->orig_super)
+ memcpy(fs->orig_super, fs->super, SUPERBLOCK_SIZE);
+
+ if (!(fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS)) {
+ retval = 0;
+ if (!ext2fs_verify_csum_type(fs, fs->super))
+ retval = EXT2_ET_UNKNOWN_CSUM;
+ if (!ext2fs_superblock_csum_verify(fs, fs->super)) {
+ if (csum_retries++ < 3)
+ goto retry;
+ retval = EXT2_ET_SB_CSUM_INVALID;
+ }
+ }
+
+#ifdef WORDS_BIGENDIAN
+ fs->flags |= EXT2_FLAG_SWAP_BYTES;
+ ext2fs_swap_super(fs->super);
+#else
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
+ retval = EXT2_ET_UNIMPLEMENTED;
+ goto cleanup;
+ }
+#endif
+
+ if (fs->super->s_magic != EXT2_SUPER_MAGIC)
+ retval = EXT2_ET_BAD_MAGIC;
+ if (retval)
+ goto cleanup;
+
+ if (fs->super->s_rev_level > EXT2_LIB_CURRENT_REV) {
+ retval = EXT2_ET_REV_TOO_HIGH;
+ goto cleanup;
+ }
+
+ /*
+ * Check for feature set incompatibility
+ */
+ if (!(flags & EXT2_FLAG_FORCE)) {
+ features = fs->super->s_feature_incompat;
+#ifdef EXT2_LIB_SOFTSUPP_INCOMPAT
+ if (flags & EXT2_FLAG_SOFTSUPP_FEATURES)
+ features &= ~EXT2_LIB_SOFTSUPP_INCOMPAT;
+#endif
+ if (features & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP) {
+ retval = EXT2_ET_UNSUPP_FEATURE;
+ goto cleanup;
+ }
+
+ features = fs->super->s_feature_ro_compat;
+#ifdef EXT2_LIB_SOFTSUPP_RO_COMPAT
+ if (flags & EXT2_FLAG_SOFTSUPP_FEATURES)
+ features &= ~EXT2_LIB_SOFTSUPP_RO_COMPAT;
+#endif
+ if ((flags & EXT2_FLAG_RW) &&
+ (features & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP)) {
+ retval = EXT2_ET_RO_UNSUPP_FEATURE;
+ goto cleanup;
+ }
+
+ if (!(flags & EXT2_FLAG_JOURNAL_DEV_OK) &&
+ ext2fs_has_feature_journal_dev(fs->super)) {
+ retval = EXT2_ET_UNSUPP_FEATURE;
+ goto cleanup;
+ }
+ }
+
+ if ((fs->super->s_log_block_size >
+ (unsigned) (EXT2_MAX_BLOCK_LOG_SIZE - EXT2_MIN_BLOCK_LOG_SIZE)) ||
+ (fs->super->s_log_cluster_size >
+ (unsigned) (EXT2_MAX_CLUSTER_LOG_SIZE - EXT2_MIN_CLUSTER_LOG_SIZE)) ||
+ (fs->super->s_log_block_size > fs->super->s_log_cluster_size) ||
+ (fs->super->s_log_groups_per_flex > 31)) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+
+ /*
+ * bigalloc requires cluster-aware bitfield operations, which at the
+ * moment means we need EXT2_FLAG_64BITS.
+ */
+ if (ext2fs_has_feature_bigalloc(fs->super) &&
+ !(flags & EXT2_FLAG_64BITS)) {
+ retval = EXT2_ET_CANT_USE_LEGACY_BITMAPS;
+ goto cleanup;
+ }
+
+ if (!ext2fs_has_feature_bigalloc(fs->super) &&
+ (fs->super->s_log_block_size != fs->super->s_log_cluster_size)) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ fs->fragsize = fs->blocksize = EXT2_BLOCK_SIZE(fs->super);
+ inode_size = EXT2_INODE_SIZE(fs->super);
+ if ((inode_size < EXT2_GOOD_OLD_INODE_SIZE) ||
+ (inode_size > fs->blocksize) ||
+ (inode_size & (inode_size - 1))) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+
+ /* Enforce the block group descriptor size */
+ if (!(flags & EXT2_FLAG_IGNORE_SB_ERRORS) &&
+ ext2fs_has_feature_64bit(fs->super)) {
+ unsigned desc_size = fs->super->s_desc_size;
+
+ if ((desc_size < EXT2_MIN_DESC_SIZE_64BIT) ||
+ (desc_size > EXT2_MAX_DESC_SIZE) ||
+ (desc_size & (desc_size - 1)) != 0) {
+ retval = EXT2_ET_BAD_DESC_SIZE;
+ goto cleanup;
+ }
+ }
+
+ fs->cluster_ratio_bits = fs->super->s_log_cluster_size -
+ fs->super->s_log_block_size;
+ if (EXT2_BLOCKS_PER_GROUP(fs->super) !=
+ EXT2_CLUSTERS_PER_GROUP(fs->super) << fs->cluster_ratio_bits) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ fs->inode_blocks_per_group = ((EXT2_INODES_PER_GROUP(fs->super) *
+ EXT2_INODE_SIZE(fs->super) +
+ EXT2_BLOCK_SIZE(fs->super) - 1) /
+ EXT2_BLOCK_SIZE(fs->super));
+ if (block_size) {
+ if (block_size != fs->blocksize) {
+ retval = EXT2_ET_UNEXPECTED_BLOCK_SIZE;
+ goto cleanup;
+ }
+ }
+ /*
+ * Set the blocksize to the filesystem's blocksize.
+ */
+ io_channel_set_blksize(fs->io, fs->blocksize);
+
+ /*
+ * If this is an external journal device, don't try to read
+ * the group descriptors, because they're not there.
+ */
+ if (ext2fs_has_feature_journal_dev(fs->super)) {
+ fs->group_desc_count = 0;
+ *ret_fs = fs;
+ return 0;
+ }
+
+ if (EXT2_INODES_PER_GROUP(fs->super) == 0) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ /* Precompute the FS UUID to seed other checksums */
+ ext2fs_init_csum_seed(fs);
+
+ /*
+ * Read group descriptors
+ */
+ blocks_per_group = EXT2_BLOCKS_PER_GROUP(fs->super);
+ if (blocks_per_group < 8 ||
+ blocks_per_group > EXT2_MAX_BLOCKS_PER_GROUP(fs->super) ||
+ fs->inode_blocks_per_group > EXT2_MAX_INODES_PER_GROUP(fs->super) ||
+ EXT2_DESC_PER_BLOCK(fs->super) == 0 ||
+ fs->super->s_first_data_block >= ext2fs_blocks_count(fs->super)) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ groups_cnt = ext2fs_div64_ceil(ext2fs_blocks_count(fs->super) -
+ fs->super->s_first_data_block,
+ blocks_per_group);
+ if (groups_cnt >> 32) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ fs->group_desc_count = groups_cnt;
+ if (!(flags & EXT2_FLAG_IGNORE_SB_ERRORS) &&
+ (__u64)fs->group_desc_count * EXT2_INODES_PER_GROUP(fs->super) !=
+ fs->super->s_inodes_count) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ fs->desc_blocks = ext2fs_div_ceil(fs->group_desc_count,
+ EXT2_DESC_PER_BLOCK(fs->super));
+ if (ext2fs_has_feature_meta_bg(fs->super) &&
+ (fs->super->s_first_meta_bg > fs->desc_blocks) &&
+ !(flags & EXT2_FLAG_IGNORE_SB_ERRORS)) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ if (flags & EXT2_FLAG_SUPER_ONLY)
+ goto skip_read_bg;
+ retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
+ &fs->group_desc);
+ if (retval)
+ goto cleanup;
+ if (!group_block)
+ group_block = fs->super->s_first_data_block;
+ /*
+ * On a FS with a 1K blocksize, block 0 is reserved for bootloaders
+ * so we must increment block numbers to any group 0 items.
+ *
+ * However, we cannot touch group_block directly because in the meta_bg
+ * case, the ext2fs_descriptor_block_loc2() function will interpret
+ * group_block != s_first_data_block to mean that we want to access the
+ * backup group descriptors. This is not what we want if the caller
+ * set superblock == 0 (i.e. auto-detect the superblock), which is
+ * what's going on here.
+ */
+ if (group_block == 0 && fs->blocksize == 1024)
+ group_zero_adjust = 1;
+ dest = (char *) fs->group_desc;
+#ifdef WORDS_BIGENDIAN
+ groups_per_block = EXT2_DESC_PER_BLOCK(fs->super);
+#endif
+ if (ext2fs_has_feature_meta_bg(fs->super) &&
+ !(flags & EXT2_FLAG_IMAGE_FILE)) {
+ first_meta_bg = fs->super->s_first_meta_bg;
+ if (first_meta_bg > fs->desc_blocks)
+ first_meta_bg = fs->desc_blocks;
+ } else
+ first_meta_bg = fs->desc_blocks;
+ if (first_meta_bg) {
+ retval = io_channel_read_blk(fs->io, group_block +
+ group_zero_adjust + 1,
+ first_meta_bg, dest);
+ if (retval)
+ goto cleanup;
+#ifdef WORDS_BIGENDIAN
+ gdp = (struct ext2_group_desc *) dest;
+ for (j=0; j < groups_per_block*first_meta_bg; j++) {
+ gdp = ext2fs_group_desc(fs, fs->group_desc, j);
+ if (gdp)
+ ext2fs_swap_group_desc2(fs, gdp);
+ }
+#endif
+ dest += fs->blocksize*first_meta_bg;
+ }
+
+ for (i = first_meta_bg ; i < fs->desc_blocks; i++) {
+ blk = ext2fs_descriptor_block_loc2(fs, group_block, i);
+ io_channel_cache_readahead(fs->io, blk, 1);
+ }
+
+ for (i=first_meta_bg ; i < fs->desc_blocks; i++) {
+ blk = ext2fs_descriptor_block_loc2(fs, group_block, i);
+ retval = io_channel_read_blk64(fs->io, blk, 1, dest);
+ if (retval)
+ goto cleanup;
+#ifdef WORDS_BIGENDIAN
+ for (j=0; j < groups_per_block; j++) {
+ gdp = ext2fs_group_desc(fs, fs->group_desc,
+ i * groups_per_block + j);
+ if (gdp)
+ ext2fs_swap_group_desc2(fs, gdp);
+ }
+#endif
+ dest += fs->blocksize;
+ }
+
+ fs->stride = fs->super->s_raid_stride;
+
+ /*
+ * If recovery is from backup superblock, Clear _UNININT flags &
+ * reset bg_itable_unused to zero
+ */
+ if (superblock > 1 && ext2fs_has_group_desc_csum(fs)) {
+ dgrp_t group;
+
+ for (group = 0; group < fs->group_desc_count; group++) {
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_itable_unused_set(fs, group, 0);
+ /* The checksum will be reset later, but fix it here
+ * anyway to avoid printing a lot of spurious errors. */
+ ext2fs_group_desc_csum_set(fs, group);
+ }
+ if (fs->flags & EXT2_FLAG_RW)
+ ext2fs_mark_super_dirty(fs);
+ }
+skip_read_bg:
+ if (ext2fs_has_feature_mmp(fs->super) &&
+ !(flags & EXT2_FLAG_SKIP_MMP) &&
+ (flags & (EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE))) {
+ retval = ext2fs_mmp_start(fs);
+ if (retval) {
+ fs->flags |= EXT2_FLAG_SKIP_MMP; /* just do cleanup */
+ ext2fs_mmp_stop(fs);
+ goto cleanup;
+ }
+ }
+
+ if (fs->flags & EXT2_FLAG_SHARE_DUP) {
+ fs->block_sha_map = ext2fs_hashmap_create(ext2fs_djb2_hash,
+ block_sha_map_free_entry, 4096);
+ if (!fs->block_sha_map) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto cleanup;
+ }
+ ext2fs_set_feature_shared_blocks(fs->super);
+ }
+
+ if (ext2fs_has_feature_casefold(fs->super))
+ fs->encoding = ext2fs_load_nls_table(fs->super->s_encoding);
+
+ fs->flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;
+ *ret_fs = fs;
+
+ return 0;
+cleanup:
+ if (!(flags & EXT2_FLAG_NOFREE_ON_ERROR)) {
+ ext2fs_free(fs);
+ fs = NULL;
+ }
+ *ret_fs = fs;
+ return retval;
+}
+
+/*
+ * Set/get the filesystem data I/O channel.
+ *
+ * These functions are only valid if EXT2_FLAG_IMAGE_FILE is true.
+ */
+errcode_t ext2fs_get_data_io(ext2_filsys fs, io_channel *old_io)
+{
+ if ((fs->flags & EXT2_FLAG_IMAGE_FILE) == 0)
+ return EXT2_ET_NOT_IMAGE_FILE;
+ if (old_io) {
+ *old_io = (fs->image_io == fs->io) ? 0 : fs->io;
+ }
+ return 0;
+}
+
+errcode_t ext2fs_set_data_io(ext2_filsys fs, io_channel new_io)
+{
+ if ((fs->flags & EXT2_FLAG_IMAGE_FILE) == 0)
+ return EXT2_ET_NOT_IMAGE_FILE;
+ fs->io = new_io ? new_io : fs->image_io;
+ return 0;
+}
+
+errcode_t ext2fs_rewrite_to_io(ext2_filsys fs, io_channel new_io)
+{
+ errcode_t err;
+
+ if ((fs->flags & EXT2_FLAG_IMAGE_FILE) == 0)
+ return EXT2_ET_NOT_IMAGE_FILE;
+ err = io_channel_set_blksize(new_io, fs->blocksize);
+ if (err)
+ return err;
+ if ((new_io == fs->image_io) || (new_io == fs->io))
+ return 0;
+ if ((fs->image_io != fs->io) &&
+ fs->image_io)
+ io_channel_close(fs->image_io);
+ if (fs->io)
+ io_channel_close(fs->io);
+ fs->io = fs->image_io = new_io;
+ fs->flags |= EXT2_FLAG_DIRTY | EXT2_FLAG_RW |
+ EXT2_FLAG_BB_DIRTY | EXT2_FLAG_IB_DIRTY;
+ fs->flags &= ~EXT2_FLAG_IMAGE_FILE;
+ return 0;
+}
diff --git a/lib/ext2fs/orphan.c b/lib/ext2fs/orphan.c
new file mode 100644
index 0000000..e25f20c
--- /dev/null
+++ b/lib/ext2fs/orphan.c
@@ -0,0 +1,273 @@
+/*
+ * orphan.c --- utility function to handle orphan file
+ *
+ * Copyright (C) 2015 Jan Kara.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <string.h>
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+errcode_t ext2fs_truncate_orphan_file(ext2_filsys fs)
+{
+ struct ext2_inode inode;
+ errcode_t err;
+ ext2_ino_t ino = fs->super->s_orphan_file_inum;
+
+ err = ext2fs_read_inode(fs, ino, &inode);
+ if (err)
+ return err;
+
+ err = ext2fs_punch(fs, ino, &inode, NULL, 0, ~0ULL);
+ if (err)
+ return err;
+
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ err = ext2fs_write_inode(fs, ino, &inode);
+
+ ext2fs_clear_feature_orphan_file(fs->super);
+ ext2fs_clear_feature_orphan_present(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ /* Need to update group descriptors as well */
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+
+ return err;
+}
+
+__u32 ext2fs_do_orphan_file_block_csum(ext2_filsys fs, ext2_ino_t ino,
+ __u32 gen, blk64_t blk, char *buf)
+{
+ int inodes_per_ob = ext2fs_inodes_per_orphan_block(fs);
+ __u32 crc;
+
+ ino = ext2fs_cpu_to_le32(ino);
+ gen = ext2fs_cpu_to_le32(gen);
+ blk = ext2fs_cpu_to_le64(blk);
+ crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&ino,
+ sizeof(ino));
+ crc = ext2fs_crc32c_le(crc, (unsigned char *)&gen, sizeof(gen));
+ crc = ext2fs_crc32c_le(crc, (unsigned char *)&blk, sizeof(blk));
+ crc = ext2fs_crc32c_le(crc, (unsigned char *)buf,
+ inodes_per_ob * sizeof(__u32));
+
+ return ext2fs_cpu_to_le32(crc);
+}
+
+struct mkorphan_info {
+ char *buf;
+ char *zerobuf;
+ blk_t num_blocks;
+ blk_t alloc_blocks;
+ blk64_t last_blk;
+ errcode_t err;
+ ext2_ino_t ino;
+ __u32 generation;
+};
+
+static int mkorphan_proc(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct mkorphan_info *oi = (struct mkorphan_info *)priv_data;
+ blk64_t new_blk;
+ errcode_t err;
+
+ /* Can we just continue in currently allocated cluster? */
+ if (blockcnt &&
+ EXT2FS_B2C(fs, oi->last_blk) == EXT2FS_B2C(fs, oi->last_blk + 1)) {
+ new_blk = oi->last_blk + 1;
+ } else {
+ err = ext2fs_new_block2(fs, oi->last_blk, 0, &new_blk);
+ if (err) {
+ oi->err = err;
+ return BLOCK_ABORT;
+ }
+ ext2fs_block_alloc_stats2(fs, new_blk, +1);
+ oi->alloc_blocks++;
+ }
+ if (blockcnt >= 0) {
+ if (ext2fs_has_feature_metadata_csum(fs->super)) {
+ struct ext4_orphan_block_tail *tail;
+
+ tail = ext2fs_orphan_block_tail(fs, oi->buf);
+ tail->ob_checksum = ext2fs_do_orphan_file_block_csum(fs,
+ oi->ino, oi->generation, new_blk, oi->buf);
+ }
+ err = io_channel_write_blk64(fs->io, new_blk, 1, oi->buf);
+ } else /* zerobuf is used to initialize new indirect blocks... */
+ err = io_channel_write_blk64(fs->io, new_blk, 1, oi->zerobuf);
+ if (err) {
+ oi->err = err;
+ return BLOCK_ABORT;
+ }
+ oi->last_blk = new_blk;
+ *blocknr = new_blk;
+ if (blockcnt >= 0 && --oi->num_blocks == 0)
+ return BLOCK_CHANGED | BLOCK_ABORT;
+ return BLOCK_CHANGED;
+}
+
+errcode_t ext2fs_create_orphan_file(ext2_filsys fs, blk_t num_blocks)
+{
+ struct ext2_inode inode;
+ ext2_ino_t ino = fs->super->s_orphan_file_inum;
+ errcode_t err;
+ char *buf = NULL, *zerobuf = NULL;
+ struct mkorphan_info oi;
+ struct ext4_orphan_block_tail *ob_tail;
+
+ if (!ino) {
+ err = ext2fs_new_inode(fs, EXT2_ROOT_INO, LINUX_S_IFREG | 0600,
+ 0, &ino);
+ if (err)
+ return err;
+ ext2fs_inode_alloc_stats2(fs, ino, +1, 0);
+ ext2fs_mark_ib_dirty(fs);
+ }
+
+ err = ext2fs_read_inode(fs, ino, &inode);
+ if (err)
+ return err;
+ if (EXT2_I_SIZE(&inode)) {
+ err = ext2fs_truncate_orphan_file(fs);
+ if (err)
+ return err;
+ }
+
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ if (ext2fs_has_feature_extents(fs->super)) {
+ inode.i_flags |= EXT4_EXTENTS_FL;
+ err = ext2fs_write_inode(fs, ino, &inode);
+ if (err)
+ return err;
+ }
+
+ err = ext2fs_get_mem(fs->blocksize, &buf);
+ if (err)
+ return err;
+ err = ext2fs_get_mem(fs->blocksize, &zerobuf);
+ if (err)
+ goto out;
+ memset(buf, 0, fs->blocksize);
+ memset(zerobuf, 0, fs->blocksize);
+ ob_tail = ext2fs_orphan_block_tail(fs, buf);
+ ob_tail->ob_magic = ext2fs_cpu_to_le32(EXT4_ORPHAN_BLOCK_MAGIC);
+ oi.num_blocks = num_blocks;
+ oi.alloc_blocks = 0;
+ oi.last_blk = 0;
+ oi.generation = inode.i_generation;
+ oi.ino = ino;
+ oi.buf = buf;
+ oi.zerobuf = zerobuf;
+ oi.err = 0;
+ err = ext2fs_block_iterate3(fs, ino, BLOCK_FLAG_APPEND,
+ 0, mkorphan_proc, &oi);
+ if (err)
+ goto out;
+ if (oi.err) {
+ err = oi.err;
+ goto out;
+ }
+
+ /* Reread inode after blocks were allocated */
+ err = ext2fs_read_inode(fs, ino, &inode);
+ if (err)
+ goto out;
+ ext2fs_iblk_set(fs, &inode, 0);
+ inode.i_atime = inode.i_mtime =
+ inode.i_ctime = fs->now ? fs->now : time(0);
+ inode.i_links_count = 1;
+ inode.i_mode = LINUX_S_IFREG | 0600;
+ ext2fs_iblk_add_blocks(fs, &inode, oi.alloc_blocks);
+ err = ext2fs_inode_size_set(fs, &inode,
+ (unsigned long long)fs->blocksize * num_blocks);
+ if (err)
+ goto out;
+ err = ext2fs_write_new_inode(fs, ino, &inode);
+ if (err)
+ goto out;
+
+ fs->super->s_orphan_file_inum = ino;
+ ext2fs_set_feature_orphan_file(fs->super);
+ ext2fs_mark_super_dirty(fs);
+ /* Need to update group descriptors as well */
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+out:
+ if (buf)
+ ext2fs_free_mem(&buf);
+ if (zerobuf)
+ ext2fs_free_mem(&zerobuf);
+ return err;
+}
+
+/*
+ * Find reasonable size for orphan file. We choose orphan file size to be
+ * between 32 and 512 filesystem blocks and not more than 1/4096 of the
+ * filesystem unless it is really small.
+ */
+e2_blkcnt_t ext2fs_default_orphan_file_blocks(ext2_filsys fs)
+{
+ __u64 num_blocks = ext2fs_blocks_count(fs->super);
+ e2_blkcnt_t blks = 512;
+
+ if (num_blocks < 128 * 1024)
+ blks = 32;
+ else if (num_blocks < 2 * 1024 * 1024)
+ blks = num_blocks / 4096;
+ return (blks + EXT2FS_CLUSTER_MASK(fs)) & ~EXT2FS_CLUSTER_MASK(fs);
+}
+
+static errcode_t ext2fs_orphan_file_block_csum(ext2_filsys fs, ext2_ino_t ino,
+ blk64_t blk, char *buf,
+ __u32 *crcp)
+{
+ struct ext2_inode inode;
+ errcode_t retval;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+ *crcp = ext2fs_do_orphan_file_block_csum(fs, ino, inode.i_generation,
+ blk, buf);
+ return 0;
+}
+
+errcode_t ext2fs_orphan_file_block_csum_set(ext2_filsys fs, ext2_ino_t ino,
+ blk64_t blk, char *buf)
+{
+ struct ext4_orphan_block_tail *tail;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 0;
+
+ tail = ext2fs_orphan_block_tail(fs, buf);
+ return ext2fs_orphan_file_block_csum(fs, ino, blk, buf,
+ &tail->ob_checksum);
+}
+
+int ext2fs_orphan_file_block_csum_verify(ext2_filsys fs, ext2_ino_t ino,
+ blk64_t blk, char *buf)
+{
+ struct ext4_orphan_block_tail *tail;
+ __u32 crc;
+ errcode_t retval;
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super))
+ return 1;
+ retval = ext2fs_orphan_file_block_csum(fs, ino, blk, buf, &crc);
+ if (retval)
+ return 0;
+ tail = ext2fs_orphan_block_tail(fs, buf);
+ return ext2fs_le32_to_cpu(tail->ob_checksum) == crc;
+}
diff --git a/lib/ext2fs/progress.c b/lib/ext2fs/progress.c
new file mode 100644
index 0000000..fe4292f
--- /dev/null
+++ b/lib/ext2fs/progress.c
@@ -0,0 +1,103 @@
+/*
+ * progress.c - Numeric progress meter
+ *
+ * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ * 2003, 2004, 2005 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+#include <time.h>
+
+static char spaces[80], backspaces[80];
+static time_t last_update;
+
+struct ext2fs_progress_ops ext2fs_numeric_progress_ops = {
+ .init = ext2fs_numeric_progress_init,
+ .update = ext2fs_numeric_progress_update,
+ .close = ext2fs_numeric_progress_close,
+};
+
+static int int_log10(unsigned int arg)
+{
+ int l;
+
+ for (l=0; arg ; l++)
+ arg = arg / 10;
+ return l;
+}
+
+void ext2fs_numeric_progress_init(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ const char *label, __u64 max)
+{
+ /*
+ * The PRINT_PROGRESS flag turns on or off ALL
+ * progress-related messages, whereas the SKIP_PROGRESS
+ * environment variable prints the start and end messages but
+ * not the numeric countdown in the middle.
+ */
+ if (!(fs->flags & EXT2_FLAG_PRINT_PROGRESS))
+ return;
+
+ memset(spaces, ' ', sizeof(spaces)-1);
+ spaces[sizeof(spaces)-1] = 0;
+ memset(backspaces, '\b', sizeof(backspaces)-1);
+ backspaces[sizeof(backspaces)-1] = 0;
+
+ memset(progress, 0, sizeof(*progress));
+ if (getenv("E2FSPROGS_SKIP_PROGRESS"))
+ progress->skip_progress++;
+
+
+ /*
+ * Figure out how many digits we need
+ */
+ progress->max = max;
+ progress->log_max = int_log10(max);
+
+ if (label) {
+ fputs(label, stdout);
+ fflush(stdout);
+ }
+ last_update = 0;
+}
+
+void ext2fs_numeric_progress_update(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ __u64 val)
+{
+ time_t now;
+
+ if (!(fs->flags & EXT2_FLAG_PRINT_PROGRESS))
+ return;
+ if (progress->skip_progress)
+ return;
+ now = time(0);
+ if (now == last_update)
+ return;
+ last_update = now;
+
+ printf("%*llu/%*llu", progress->log_max, (unsigned long long) val,
+ progress->log_max, (unsigned long long) progress->max);
+ fprintf(stdout, "%.*s", (2*progress->log_max)+1, backspaces);
+}
+
+void ext2fs_numeric_progress_close(ext2_filsys fs,
+ struct ext2fs_numeric_progress_struct * progress,
+ const char *message)
+{
+ if (!(fs->flags & EXT2_FLAG_PRINT_PROGRESS))
+ return;
+ fprintf(stdout, "%.*s", (2*progress->log_max)+1, spaces);
+ fprintf(stdout, "%.*s", (2*progress->log_max)+1, backspaces);
+ if (message)
+ fputs(message, stdout);
+}
diff --git a/lib/ext2fs/punch.c b/lib/ext2fs/punch.c
new file mode 100644
index 0000000..e2543e1
--- /dev/null
+++ b/lib/ext2fs/punch.c
@@ -0,0 +1,513 @@
+/*
+ * punch.c --- deallocate blocks allocated to an inode
+ *
+ * Copyright (C) 2010 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+#undef PUNCH_DEBUG
+
+/*
+ * This function returns 1 if the specified block is all zeros
+ */
+static int check_zero_block(char *buf, int blocksize)
+{
+ char *cp = buf;
+ int left = blocksize;
+
+ while (left > 0) {
+ if (*cp++)
+ return 0;
+ left--;
+ }
+ return 1;
+}
+
+/*
+ * This clever recursive function handles i_blocks[] as well as
+ * indirect, double indirect, and triple indirect blocks. It iterates
+ * over the entries in the i_blocks array or indirect blocks, and for
+ * each one, will recursively handle any indirect blocks and then
+ * frees and deallocates the blocks.
+ */
+static errcode_t ind_punch(ext2_filsys fs, struct ext2_inode *inode,
+ char *block_buf, blk_t *p, int level,
+ blk64_t start, blk64_t count, int max)
+{
+ errcode_t retval;
+ blk_t b;
+ int i;
+ blk64_t offset, incr;
+ int freed = 0;
+
+#ifdef PUNCH_DEBUG
+ printf("Entering ind_punch, level %d, start %llu, count %llu, "
+ "max %d\n", level, start, count, max);
+#endif
+ incr = 1ULL << ((EXT2_BLOCK_SIZE_BITS(fs->super) - 2) * level);
+ for (i = 0, offset = 0; i < max; i++, p++, offset += incr) {
+ if (offset >= start + count)
+ break;
+ if (*p == 0 || (offset+incr) <= start)
+ continue;
+ b = *p;
+ if (level > 0) {
+ blk_t start2;
+#ifdef PUNCH_DEBUG
+ printf("Reading indirect block %u\n", b);
+#endif
+ retval = ext2fs_read_ind_block(fs, b, block_buf);
+ if (retval)
+ return retval;
+ start2 = (start > offset) ? start - offset : 0;
+ retval = ind_punch(fs, inode, block_buf + fs->blocksize,
+ (blk_t *) block_buf, level - 1,
+ start2, count - offset,
+ fs->blocksize >> 2);
+ if (retval)
+ return retval;
+ retval = ext2fs_write_ind_block(fs, b, block_buf);
+ if (retval)
+ return retval;
+ if (!check_zero_block(block_buf, fs->blocksize))
+ continue;
+ }
+#ifdef PUNCH_DEBUG
+ printf("Freeing block %u (offset %llu)\n", b, offset);
+#endif
+ ext2fs_block_alloc_stats(fs, b, -1);
+ *p = 0;
+ freed++;
+ }
+#ifdef PUNCH_DEBUG
+ printf("Freed %d blocks\n", freed);
+#endif
+ return ext2fs_iblk_sub_blocks(fs, inode, freed);
+}
+
+#define BLK_T_MAX ((blk_t)~0ULL)
+static errcode_t ext2fs_punch_ind(ext2_filsys fs, struct ext2_inode *inode,
+ char *block_buf, blk64_t start, blk64_t end)
+{
+ errcode_t retval;
+ char *buf = 0;
+ int level;
+ int num = EXT2_NDIR_BLOCKS;
+ blk_t *bp = inode->i_block;
+ blk_t addr_per_block;
+ blk64_t max = EXT2_NDIR_BLOCKS;
+ blk_t count;
+
+ /* Check start/end don't overflow the 2^32-1 indirect block limit */
+ if (start > BLK_T_MAX)
+ return 0;
+ if (end >= BLK_T_MAX || end - start + 1 >= BLK_T_MAX)
+ count = BLK_T_MAX - start;
+ else
+ count = end - start + 1;
+
+ if (!block_buf) {
+ retval = ext2fs_get_array(3, fs->blocksize, &buf);
+ if (retval)
+ return retval;
+ block_buf = buf;
+ }
+
+ addr_per_block = (blk_t)fs->blocksize >> 2;
+
+ for (level = 0; level < 4; level++, max *= (blk64_t)addr_per_block) {
+#ifdef PUNCH_DEBUG
+ printf("Main loop level %d, start %llu count %u "
+ "max %llu num %d\n", level, start, count, max, num);
+#endif
+ if (start < max) {
+ retval = ind_punch(fs, inode, block_buf, bp, level,
+ start, count, num);
+ if (retval)
+ goto errout;
+ if (count > max)
+ count -= max - start;
+ else
+ break;
+ start = 0;
+ } else
+ start -= max;
+ bp += num;
+ if (level == 0) {
+ num = 1;
+ max = 1;
+ }
+ }
+ retval = 0;
+errout:
+ if (buf)
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+#undef BLK_T_MAX
+
+#ifdef PUNCH_DEBUG
+
+#define dbg_printf(f, a...) printf(f, ## a)
+
+static void dbg_print_extent(char *desc, struct ext2fs_extent *extent)
+{
+ if (desc)
+ printf("%s: ", desc);
+ printf("extent: lblk %llu--%llu, len %u, pblk %llu, flags: ",
+ extent->e_lblk, extent->e_lblk + extent->e_len - 1,
+ extent->e_len, extent->e_pblk);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_LEAF)
+ fputs("LEAF ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_UNINIT)
+ fputs("UNINIT ", stdout);
+ if (extent->e_flags & EXT2_EXTENT_FLAGS_SECOND_VISIT)
+ fputs("2ND_VISIT ", stdout);
+ if (!extent->e_flags)
+ fputs("(none)", stdout);
+ fputc('\n', stdout);
+
+}
+#else
+#define dbg_print_extent(desc, ex) do { } while (0)
+#define dbg_printf(f, a...) do { } while (0)
+#endif
+
+/* Free a range of blocks, respecting cluster boundaries */
+static errcode_t punch_extent_blocks(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ blk64_t lfree_start, blk64_t free_start,
+ __u32 free_count, int *freed)
+{
+ blk64_t pblk;
+ int freed_now = 0;
+ __u32 cluster_freed;
+ errcode_t retval = 0;
+
+ if (free_start < fs->super->s_first_data_block ||
+ (free_start + free_count) >= ext2fs_blocks_count(fs->super))
+ return EXT2_ET_BAD_BLOCK_NUM;
+
+ /* No bigalloc? Just free each block. */
+ if (EXT2FS_CLUSTER_RATIO(fs) == 1) {
+ *freed += free_count;
+ while (free_count-- > 0)
+ ext2fs_block_alloc_stats2(fs, free_start++, -1);
+ return retval;
+ }
+
+ /*
+ * Try to free up to the next cluster boundary. We assume that all
+ * blocks in a logical cluster map to blocks from the same physical
+ * cluster, and that the offsets within the [pl]clusters match.
+ */
+ if (free_start & EXT2FS_CLUSTER_MASK(fs)) {
+ retval = ext2fs_map_cluster_block(fs, ino, inode,
+ lfree_start, &pblk);
+ if (retval)
+ goto errout;
+ if (!pblk) {
+ ext2fs_block_alloc_stats2(fs, free_start, -1);
+ freed_now++;
+ }
+ cluster_freed = EXT2FS_CLUSTER_RATIO(fs) -
+ (free_start & EXT2FS_CLUSTER_MASK(fs));
+ if (cluster_freed > free_count)
+ cluster_freed = free_count;
+ free_count -= cluster_freed;
+ free_start += cluster_freed;
+ lfree_start += cluster_freed;
+ }
+
+ /* Free whole clusters from the middle of the range. */
+ while (free_count > 0 && free_count >= (unsigned) EXT2FS_CLUSTER_RATIO(fs)) {
+ ext2fs_block_alloc_stats2(fs, free_start, -1);
+ freed_now++;
+ cluster_freed = EXT2FS_CLUSTER_RATIO(fs);
+ free_count -= cluster_freed;
+ free_start += cluster_freed;
+ lfree_start += cluster_freed;
+ }
+
+ /* Try to free the last cluster. */
+ if (free_count > 0) {
+ retval = ext2fs_map_cluster_block(fs, ino, inode,
+ lfree_start, &pblk);
+ if (retval)
+ goto errout;
+ if (!pblk) {
+ ext2fs_block_alloc_stats2(fs, free_start, -1);
+ freed_now++;
+ }
+ }
+
+errout:
+ *freed += freed_now;
+ return retval;
+}
+
+static errcode_t ext2fs_punch_extent(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ blk64_t start, blk64_t end)
+{
+ ext2_extent_handle_t handle = 0;
+ struct ext2fs_extent extent;
+ errcode_t retval;
+ blk64_t free_start, next, lfree_start;
+ __u32 free_count, newlen;
+ int freed = 0;
+ int op;
+
+ retval = ext2fs_extent_open2(fs, ino, inode, &handle);
+ if (retval)
+ return retval;
+ /*
+ * Find the extent closest to the start of the punch range. We don't
+ * check the return value because _goto() sets the current node to the
+ * next-lowest extent if 'start' is in a hole, and doesn't set a
+ * current node if there was a real error reading the extent tree.
+ * In that case, _get() will error out.
+ *
+ * Note: If _get() returns 'no current node', that simply means that
+ * there aren't any blocks mapped past this point in the file, so we're
+ * done.
+ */
+ ext2fs_extent_goto(handle, start);
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
+ if (retval == EXT2_ET_NO_CURRENT_NODE) {
+ retval = 0;
+ goto errout;
+ } else if (retval)
+ goto errout;
+ while (1) {
+ op = EXT2_EXTENT_NEXT_LEAF;
+ dbg_print_extent("main loop", &extent);
+ next = extent.e_lblk + extent.e_len;
+ dbg_printf("start %llu, end %llu, next %llu\n",
+ (unsigned long long) start,
+ (unsigned long long) end,
+ (unsigned long long) next);
+ if (start <= extent.e_lblk) {
+ /*
+ * Have we iterated past the end of the punch region?
+ * If so, we can stop.
+ */
+ if (end < extent.e_lblk)
+ break;
+ dbg_printf("Case #%d\n", 1);
+ /* Start of deleted region before extent;
+ adjust beginning of extent */
+ free_start = extent.e_pblk;
+ lfree_start = extent.e_lblk;
+ if (next > end)
+ free_count = end - extent.e_lblk + 1;
+ else
+ free_count = extent.e_len;
+ extent.e_len -= free_count;
+ extent.e_lblk += free_count;
+ extent.e_pblk += free_count;
+ } else if (end >= next-1) {
+ /*
+ * Is the punch region beyond this extent? This can
+ * happen if start is already inside a hole. Try to
+ * advance to the next extent if this is the case.
+ */
+ if (start >= next)
+ goto next_extent;
+ /* End of deleted region after extent;
+ adjust end of extent */
+ dbg_printf("Case #%d\n", 2);
+ newlen = start - extent.e_lblk;
+ free_start = extent.e_pblk + newlen;
+ lfree_start = extent.e_lblk + newlen;
+ free_count = extent.e_len - newlen;
+ extent.e_len = newlen;
+ } else {
+ struct ext2fs_extent newex;
+
+ dbg_printf("Case #%d\n", 3);
+ /* The hard case; we need to split the extent */
+ newex.e_pblk = extent.e_pblk +
+ (end + 1 - extent.e_lblk);
+ newex.e_lblk = end + 1;
+ newex.e_len = next - end - 1;
+ newex.e_flags = extent.e_flags;
+
+ extent.e_len = start - extent.e_lblk;
+ free_start = extent.e_pblk + extent.e_len;
+ lfree_start = extent.e_lblk + extent.e_len;
+ free_count = end - start + 1;
+
+ dbg_print_extent("inserting", &newex);
+ retval = ext2fs_extent_insert(handle,
+ EXT2_EXTENT_INSERT_AFTER, &newex);
+ if (retval)
+ goto errout;
+ retval = ext2fs_extent_fix_parents(handle);
+ if (retval)
+ goto errout;
+ /*
+ * Now pointing at inserted extent; so go back.
+ *
+ * We cannot use EXT2_EXTENT_PREV to go back; note the
+ * subtlety in the comment for fix_parents().
+ */
+ retval = ext2fs_extent_goto(handle, extent.e_lblk);
+ if (retval)
+ goto errout;
+ }
+ if (extent.e_len) {
+ dbg_print_extent("replacing", &extent);
+ retval = ext2fs_extent_replace(handle, 0, &extent);
+ if (retval)
+ goto errout;
+ retval = ext2fs_extent_fix_parents(handle);
+ } else {
+ struct ext2fs_extent newex;
+ blk64_t old_lblk, next_lblk;
+ dbg_printf("deleting current extent%s\n", "");
+
+ /*
+ * Save the location of the next leaf, then slip
+ * back to the current extent.
+ */
+ retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT,
+ &newex);
+ if (retval)
+ goto errout;
+ old_lblk = newex.e_lblk;
+
+ retval = ext2fs_extent_get(handle,
+ EXT2_EXTENT_NEXT_LEAF,
+ &newex);
+ if (retval == EXT2_ET_EXTENT_NO_NEXT)
+ next_lblk = old_lblk;
+ else if (retval)
+ goto errout;
+ else
+ next_lblk = newex.e_lblk;
+
+ retval = ext2fs_extent_goto(handle, old_lblk);
+ if (retval)
+ goto errout;
+
+ /* Now delete the extent. */
+ retval = ext2fs_extent_delete(handle, 0);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_extent_fix_parents(handle);
+ if (retval && retval != EXT2_ET_NO_CURRENT_NODE)
+ goto errout;
+ retval = 0;
+
+ /*
+ * Jump forward to the next extent. If there are
+ * errors, the ext2fs_extent_get down below will
+ * capture them for us.
+ */
+ (void)ext2fs_extent_goto(handle, next_lblk);
+ op = EXT2_EXTENT_CURRENT;
+ }
+ if (retval)
+ goto errout;
+ dbg_printf("Free start %llu, free count = %u\n",
+ free_start, free_count);
+ retval = punch_extent_blocks(fs, ino, inode, lfree_start,
+ free_start, free_count, &freed);
+ if (retval)
+ goto errout;
+ next_extent:
+ retval = ext2fs_extent_get(handle, op,
+ &extent);
+ if (retval == EXT2_ET_EXTENT_NO_NEXT ||
+ retval == EXT2_ET_NO_CURRENT_NODE)
+ break;
+ if (retval)
+ goto errout;
+ }
+ dbg_printf("Freed %d blocks\n", freed);
+ retval = ext2fs_iblk_sub_blocks(fs, inode, freed);
+errout:
+ ext2fs_extent_free(handle);
+ return retval;
+}
+
+static errcode_t ext2fs_punch_inline_data(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ blk64_t start,
+ blk64_t end EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ /*
+ * In libext2fs ext2fs_punch is based on block unit. So that
+ * means that if start > 0 we don't need to do nothing. Due
+ * to this we will remove all inline data in ext2fs_punch()
+ * now.
+ */
+ if (start > 0)
+ return 0;
+
+ memset((char *)inode->i_block, 0, EXT4_MIN_INLINE_DATA_SIZE);
+ inode->i_size = 0;
+ retval = ext2fs_write_inode(fs, ino, inode);
+ if (retval)
+ return retval;
+
+ return ext2fs_inline_data_ea_remove(fs, ino);
+}
+
+/*
+ * Deallocate all logical _blocks_ starting at start to end, inclusive.
+ * If end is ~0ULL, then this is effectively truncate.
+ */
+errcode_t ext2fs_punch(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char *block_buf, blk64_t start,
+ blk64_t end)
+{
+ errcode_t retval;
+ struct ext2_inode inode_buf;
+
+ if (start > end)
+ return EINVAL;
+
+ /* Read inode structure if necessary */
+ if (!inode) {
+ retval = ext2fs_read_inode(fs, ino, &inode_buf);
+ if (retval)
+ return retval;
+ inode = &inode_buf;
+ }
+ if (inode->i_flags & EXT4_INLINE_DATA_FL)
+ return ext2fs_punch_inline_data(fs, ino, inode, start, end);
+ else if (inode->i_flags & EXT4_EXTENTS_FL)
+ retval = ext2fs_punch_extent(fs, ino, inode, start, end);
+ else
+ retval = ext2fs_punch_ind(fs, inode, block_buf, start, end);
+ if (retval)
+ return retval;
+
+#ifdef PUNCH_DEBUG
+ printf("%u: write inode size now %lu blocks %u\n",
+ ino, EXT2_I_SIZE(inode), inode->i_blocks);
+#endif
+ return ext2fs_write_inode(fs, ino, inode);
+}
diff --git a/lib/ext2fs/qcow2.c b/lib/ext2fs/qcow2.c
new file mode 100644
index 0000000..2082417
--- /dev/null
+++ b/lib/ext2fs/qcow2.c
@@ -0,0 +1,272 @@
+/*
+ * qcow2.c --- Functions to generate qcow2 formatted disk images. This
+ * format is used originally by QEMU for virtual machines, and stores the
+ * filesystem data on disk in a packed format to avoid creating sparse
+ * image files that need lots of seeking to read and write.
+ *
+ * The qcow2 format supports zlib compression, but that is not yet
+ * implemented.
+ *
+ * It is possible to directly mount a qcow2 image using qemu-nbd:
+ *
+ * [root]# modprobe nbd max_part=63
+ * [root]# qemu-nbd -c /dev/nbd0 image.img
+ * [root]# mount /dev/nbd0p1 /mnt/qemu
+ *
+ * Format details at http://people.gnome.org/~markmc/qcow-image-format.html
+ *
+ * Copyright (C) 2010 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <assert.h>
+
+#include "ext2fs/ext2fs.h"
+#include "qcow2.h"
+
+/* Functions for converting qcow2 image into raw image */
+
+struct ext2_qcow2_hdr *qcow2_read_header(int fd)
+{
+ void *buffer = NULL;
+ struct ext2_qcow2_hdr *hdr = NULL;
+ size_t size;
+ errcode_t ret;
+
+ ret = ext2fs_get_mem(sizeof(struct ext2_qcow2_hdr), &buffer);
+ if (ret)
+ return NULL;
+ memset(buffer, 0, sizeof(struct ext2_qcow2_hdr));
+
+ if (ext2fs_llseek(fd, 0, SEEK_SET < 0)) {
+ ext2fs_free_mem(&buffer);
+ return NULL;
+ }
+
+ size = read(fd, buffer, sizeof(struct ext2_qcow2_hdr));
+ if (size != sizeof(struct ext2_qcow2_hdr)) {
+ ext2fs_free_mem(&buffer);
+ return NULL;
+ }
+
+ hdr = (struct ext2_qcow2_hdr *)(buffer);
+
+ if ((ext2fs_be32_to_cpu(hdr->magic) != QCOW_MAGIC) ||
+ (ext2fs_be32_to_cpu(hdr->version) != 2)) {
+ ext2fs_free_mem(&hdr);
+ return NULL;
+ }
+
+ return hdr;
+}
+
+static int qcow2_read_l1_table(struct ext2_qcow2_image *img)
+{
+ int fd = img->fd;
+ size_t size, l1_size = img->l1_size * sizeof(blk64_t);
+ blk64_t *table;
+ errcode_t ret;
+
+ ret = ext2fs_get_memzero(l1_size, &table);
+ if (ret)
+ return ret;
+
+ if (ext2fs_llseek(fd, img->l1_offset, SEEK_SET) < 0) {
+ ext2fs_free_mem(&table);
+ return errno;
+ }
+
+ size = read(fd, table, l1_size);
+ if (size != l1_size) {
+ ext2fs_free_mem(&table);
+ return errno;
+ }
+
+ img->l1_table = table;
+
+ return 0;
+}
+
+static int qcow2_read_l2_table(struct ext2_qcow2_image *img,
+ __u64 offset, blk64_t **l2_table)
+{
+ int fd = img->fd;
+ size_t size;
+
+ assert(*l2_table);
+
+ if (ext2fs_llseek(fd, offset, SEEK_SET) < 0)
+ return errno;
+
+ size = read(fd, *l2_table, img->cluster_size);
+ if (size != img->cluster_size)
+ return errno;
+
+ return 0;
+}
+
+static int qcow2_copy_data(int fdin, int fdout, __u64 off_in,
+ __u64 off_out, void *buf, size_t count)
+{
+ size_t size;
+
+ assert(buf);
+
+ if (ext2fs_llseek(fdout, off_out, SEEK_SET) < 0)
+ return errno;
+
+ if (ext2fs_llseek(fdin, off_in, SEEK_SET) < 0)
+ return errno;
+
+ size = read(fdin, buf, count);
+ if (size != count)
+ return errno;
+
+ size = write(fdout, buf, count);
+ if (size != count)
+ return errno;
+
+ return 0;
+}
+
+
+int qcow2_write_raw_image(int qcow2_fd, int raw_fd,
+ struct ext2_qcow2_hdr *hdr)
+{
+ struct ext2_qcow2_image img;
+ errcode_t ret = 0;
+ unsigned int l1_index, l2_index;
+ __u64 offset;
+ blk64_t *l1_table, *l2_table = NULL;
+ void *copy_buf = NULL;
+ size_t size;
+ unsigned int max_l1_size;
+
+ if (hdr->crypt_method)
+ return -QCOW_ENCRYPTED;
+
+ img.fd = qcow2_fd;
+ img.hdr = hdr;
+ img.l2_cache = NULL;
+ img.l1_table = NULL;
+ img.cluster_bits = ext2fs_be32_to_cpu(hdr->cluster_bits);
+ if (img.cluster_bits < 9 || img.cluster_bits > 31)
+ return -QCOW_CORRUPTED;
+ img.cluster_size = 1 << img.cluster_bits;
+ img.l1_size = ext2fs_be32_to_cpu(hdr->l1_size);
+ img.l1_offset = ext2fs_be64_to_cpu(hdr->l1_table_offset);
+ img.l2_size = 1 << (img.cluster_bits - 3);
+ img.image_size = ext2fs_be64_to_cpu(hdr->size);
+
+ if (img.l1_offset & (img.cluster_size - 1))
+ return -QCOW_CORRUPTED;
+
+ max_l1_size = (img.image_size >> ((2 * img.cluster_bits) - 3)) +
+ img.cluster_size;
+ if (img.l1_size > max_l1_size)
+ return -QCOW_CORRUPTED;
+
+ ret = ext2fs_get_memzero(img.cluster_size, &l2_table);
+ if (ret)
+ goto out;
+
+ ret = ext2fs_get_memzero(1 << img.cluster_bits, &copy_buf);
+ if (ret)
+ goto out;
+
+ if (ext2fs_llseek(raw_fd, 0, SEEK_SET) < 0) {
+ ret = errno;
+ goto out;
+ }
+
+ ret = qcow2_read_l1_table(&img);
+ if (ret)
+ goto out;
+
+ l1_table = img.l1_table;
+ /* Walk through l1 table */
+ for (l1_index = 0; l1_index < img.l1_size; l1_index++) {
+ __u64 off_out;
+
+ offset = ext2fs_be64_to_cpu(l1_table[l1_index]) &
+ ~QCOW_OFLAG_COPIED;
+
+ if ((offset > img.image_size) ||
+ (offset <= 0))
+ continue;
+
+ if (offset & QCOW_OFLAG_COMPRESSED) {
+ ret = -QCOW_COMPRESSED;
+ goto out;
+ }
+
+ ret = qcow2_read_l2_table(&img, offset, &l2_table);
+ if (ret)
+ break;
+
+ /* Walk through l2 table and copy data blocks into raw image */
+ for (l2_index = 0; l2_index < img.l2_size; l2_index++) {
+ offset = ext2fs_be64_to_cpu(l2_table[l2_index]) &
+ ~QCOW_OFLAG_COPIED;
+
+ if (offset == 0)
+ continue;
+
+ off_out = ((__u64)l1_index * img.l2_size) +
+ l2_index;
+ off_out <<= img.cluster_bits;
+ ret = qcow2_copy_data(qcow2_fd, raw_fd, offset,
+ off_out, copy_buf, img.cluster_size);
+ if (ret)
+ goto out;
+ }
+ }
+
+ /* Resize the output image to the filesystem size */
+ if (ext2fs_llseek(raw_fd, img.image_size - 1, SEEK_SET) < 0) {
+ ret = errno;
+ goto out;
+ }
+
+ ((char *)copy_buf)[0] = 0;
+ size = write(raw_fd, copy_buf, 1);
+ if (size != 1) {
+ ret = errno;
+ goto out;
+ }
+
+out:
+ if (copy_buf)
+ ext2fs_free_mem(&copy_buf);
+ if (img.l1_table)
+ ext2fs_free_mem(&img.l1_table);
+ if (l2_table)
+ ext2fs_free_mem(&l2_table);
+ return ret;
+}
diff --git a/lib/ext2fs/qcow2.h b/lib/ext2fs/qcow2.h
new file mode 100644
index 0000000..b649c9c
--- /dev/null
+++ b/lib/ext2fs/qcow2.h
@@ -0,0 +1,114 @@
+/*
+ * qcow2.h --- structures and function prototypes for qcow2.c to generate
+ * qcow2 formatted disk images. This format is used originally by QEMU
+ * for virtual machines, and stores the filesystem data on disk in a
+ * packed format to avoid creating sparse image files that need lots of
+ * seeking to read and write.
+ *
+ * The qcow2 format supports zlib compression, but that is not yet
+ * implemented.
+ *
+ * It is possible to directly mount a qcow2 image using qemu-nbd:
+ *
+ * [root]# modprobe nbd max_part=63
+ * [root]# qemu-nbd -c /dev/nbd0 image.img
+ * [root]# mount /dev/nbd0p1 /mnt/qemu
+ *
+ * Format details at http://people.gnome.org/~markmc/qcow-image-format.html
+ *
+ * Copyright (C) 2010 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/* Number of l2 tables in memory before writeback */
+#define L2_CACHE_PREALLOC 512
+
+
+#define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb)
+#define QCOW_VERSION 2
+#define QCOW_OFLAG_COPIED (1ULL << 63)
+#define QCOW_OFLAG_COMPRESSED (1ULL << 62)
+
+#define QCOW_COMPRESSED 1
+#define QCOW_ENCRYPTED 2
+#define QCOW_CORRUPTED 3
+
+struct ext2_qcow2_hdr {
+ __u32 magic;
+ __u32 version;
+
+ __u64 backing_file_offset;
+ __u32 backing_file_size;
+
+ __u32 cluster_bits;
+ __u64 size;
+ __u32 crypt_method;
+
+ __u32 l1_size;
+ __u64 l1_table_offset;
+
+ __u64 refcount_table_offset;
+ __u32 refcount_table_clusters;
+
+ __u32 nb_snapshots;
+ __u64 snapshots_offset;
+};
+
+typedef struct ext2_qcow2_l2_table L2_CACHE_HEAD;
+
+struct ext2_qcow2_l2_table {
+ __u32 l1_index;
+ __u64 offset;
+ __u64 *data;
+ L2_CACHE_HEAD *next;
+};
+
+struct ext2_qcow2_l2_cache {
+ L2_CACHE_HEAD *used_head;
+ L2_CACHE_HEAD *used_tail;
+ L2_CACHE_HEAD *free_head;
+ __u32 free;
+ __u32 count;
+ __u64 next_offset;
+};
+
+struct ext2_qcow2_refcount {
+ __u64 *refcount_table;
+ __u64 refcount_table_offset;
+ __u64 refcount_block_offset;
+
+ __u32 refcount_table_clusters;
+ __u32 refcount_table_index;
+ __u32 refcount_block_index;
+
+ __u16 *refcount_block;
+};
+
+struct ext2_qcow2_image {
+ int fd;
+ struct ext2_qcow2_hdr *hdr;
+ struct ext2_qcow2_l2_cache *l2_cache;
+ struct ext2_qcow2_refcount refcount;
+ __u32 cluster_size;
+ __u32 cluster_bits;
+ __u32 l1_size;
+ __u32 l2_size;
+
+ __u64 *l1_table;
+ __u64 l2_offset;
+ __u64 l1_offset;
+ __u64 image_size;
+};
+
+/* Function prototypes */
+
+/* qcow2.c */
+
+/* Functions for converting qcow2 image into raw image */
+struct ext2_qcow2_hdr *qcow2_read_header(int);
+int qcow2_write_raw_image(int, int, struct ext2_qcow2_hdr *);
+
diff --git a/lib/ext2fs/rbtree.c b/lib/ext2fs/rbtree.c
new file mode 100644
index 0000000..74426fa
--- /dev/null
+++ b/lib/ext2fs/rbtree.c
@@ -0,0 +1,383 @@
+/*
+ Red Black Trees
+ (C) 1999 Andrea Arcangeli <andrea@suse.de>
+ (C) 2002 David Woodhouse <dwmw2@infradead.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+ linux/lib/rbtree.c
+*/
+
+#include "rbtree.h"
+
+static void __rb_rotate_left(struct rb_node *node, struct rb_root *root)
+{
+ struct rb_node *right = node->rb_right;
+ struct rb_node *parent = ext2fs_rb_parent(node);
+
+ if ((node->rb_right = right->rb_left))
+ ext2fs_rb_set_parent(right->rb_left, node);
+ right->rb_left = node;
+
+ ext2fs_rb_set_parent(right, parent);
+
+ if (parent)
+ {
+ if (node == parent->rb_left)
+ parent->rb_left = right;
+ else
+ parent->rb_right = right;
+ }
+ else
+ root->rb_node = right;
+ ext2fs_rb_set_parent(node, right);
+}
+
+static void __rb_rotate_right(struct rb_node *node, struct rb_root *root)
+{
+ struct rb_node *left = node->rb_left;
+ struct rb_node *parent = ext2fs_rb_parent(node);
+
+ if ((node->rb_left = left->rb_right))
+ ext2fs_rb_set_parent(left->rb_right, node);
+ left->rb_right = node;
+
+ ext2fs_rb_set_parent(left, parent);
+
+ if (parent)
+ {
+ if (node == parent->rb_right)
+ parent->rb_right = left;
+ else
+ parent->rb_left = left;
+ }
+ else
+ root->rb_node = left;
+ ext2fs_rb_set_parent(node, left);
+}
+
+void ext2fs_rb_insert_color(struct rb_node *node, struct rb_root *root)
+{
+ struct rb_node *parent, *gparent;
+
+ while ((parent = ext2fs_rb_parent(node)) && ext2fs_rb_is_red(parent))
+ {
+ gparent = ext2fs_rb_parent(parent);
+
+ if (parent == gparent->rb_left)
+ {
+ {
+ register struct rb_node *uncle = gparent->rb_right;
+ if (uncle && ext2fs_rb_is_red(uncle))
+ {
+ ext2fs_rb_set_black(uncle);
+ ext2fs_rb_set_black(parent);
+ ext2fs_rb_set_red(gparent);
+ node = gparent;
+ continue;
+ }
+ }
+
+ if (parent->rb_right == node)
+ {
+ register struct rb_node *tmp;
+ __rb_rotate_left(parent, root);
+ tmp = parent;
+ parent = node;
+ node = tmp;
+ }
+
+ ext2fs_rb_set_black(parent);
+ ext2fs_rb_set_red(gparent);
+ __rb_rotate_right(gparent, root);
+ } else {
+ {
+ register struct rb_node *uncle = gparent->rb_left;
+ if (uncle && ext2fs_rb_is_red(uncle))
+ {
+ ext2fs_rb_set_black(uncle);
+ ext2fs_rb_set_black(parent);
+ ext2fs_rb_set_red(gparent);
+ node = gparent;
+ continue;
+ }
+ }
+
+ if (parent->rb_left == node)
+ {
+ register struct rb_node *tmp;
+ __rb_rotate_right(parent, root);
+ tmp = parent;
+ parent = node;
+ node = tmp;
+ }
+
+ ext2fs_rb_set_black(parent);
+ ext2fs_rb_set_red(gparent);
+ __rb_rotate_left(gparent, root);
+ }
+ }
+
+ ext2fs_rb_set_black(root->rb_node);
+}
+
+static void __rb_erase_color(struct rb_node *node, struct rb_node *parent,
+ struct rb_root *root)
+{
+ struct rb_node *other;
+
+ while ((!node || ext2fs_rb_is_black(node)) && node != root->rb_node)
+ {
+ if (parent->rb_left == node)
+ {
+ other = parent->rb_right;
+ if (ext2fs_rb_is_red(other))
+ {
+ ext2fs_rb_set_black(other);
+ ext2fs_rb_set_red(parent);
+ __rb_rotate_left(parent, root);
+ other = parent->rb_right;
+ }
+ if ((!other->rb_left || ext2fs_rb_is_black(other->rb_left)) &&
+ (!other->rb_right || ext2fs_rb_is_black(other->rb_right)))
+ {
+ ext2fs_rb_set_red(other);
+ node = parent;
+ parent = ext2fs_rb_parent(node);
+ }
+ else
+ {
+ if (!other->rb_right || ext2fs_rb_is_black(other->rb_right))
+ {
+ ext2fs_rb_set_black(other->rb_left);
+ ext2fs_rb_set_red(other);
+ __rb_rotate_right(other, root);
+ other = parent->rb_right;
+ }
+ ext2fs_rb_set_color(other, ext2fs_rb_color(parent));
+ ext2fs_rb_set_black(parent);
+ ext2fs_rb_set_black(other->rb_right);
+ __rb_rotate_left(parent, root);
+ node = root->rb_node;
+ break;
+ }
+ }
+ else
+ {
+ other = parent->rb_left;
+ if (ext2fs_rb_is_red(other))
+ {
+ ext2fs_rb_set_black(other);
+ ext2fs_rb_set_red(parent);
+ __rb_rotate_right(parent, root);
+ other = parent->rb_left;
+ }
+ if ((!other->rb_left || ext2fs_rb_is_black(other->rb_left)) &&
+ (!other->rb_right || ext2fs_rb_is_black(other->rb_right)))
+ {
+ ext2fs_rb_set_red(other);
+ node = parent;
+ parent = ext2fs_rb_parent(node);
+ }
+ else
+ {
+ if (!other->rb_left || ext2fs_rb_is_black(other->rb_left))
+ {
+ ext2fs_rb_set_black(other->rb_right);
+ ext2fs_rb_set_red(other);
+ __rb_rotate_left(other, root);
+ other = parent->rb_left;
+ }
+ ext2fs_rb_set_color(other, ext2fs_rb_color(parent));
+ ext2fs_rb_set_black(parent);
+ ext2fs_rb_set_black(other->rb_left);
+ __rb_rotate_right(parent, root);
+ node = root->rb_node;
+ break;
+ }
+ }
+ }
+ if (node)
+ ext2fs_rb_set_black(node);
+}
+
+void ext2fs_rb_erase(struct rb_node *node, struct rb_root *root)
+{
+ struct rb_node *child, *parent;
+ int color;
+
+ if (!node->rb_left)
+ child = node->rb_right;
+ else if (!node->rb_right)
+ child = node->rb_left;
+ else
+ {
+ struct rb_node *old = node, *left;
+
+ node = node->rb_right;
+ while ((left = node->rb_left) != NULL)
+ node = left;
+
+ if (ext2fs_rb_parent(old)) {
+ if (ext2fs_rb_parent(old)->rb_left == old)
+ ext2fs_rb_parent(old)->rb_left = node;
+ else
+ ext2fs_rb_parent(old)->rb_right = node;
+ } else
+ root->rb_node = node;
+
+ child = node->rb_right;
+ parent = ext2fs_rb_parent(node);
+ color = ext2fs_rb_color(node);
+
+ if (parent == old) {
+ parent = node;
+ } else {
+ if (child)
+ ext2fs_rb_set_parent(child, parent);
+ parent->rb_left = child;
+
+ node->rb_right = old->rb_right;
+ ext2fs_rb_set_parent(old->rb_right, node);
+ }
+
+ node->rb_parent_color = old->rb_parent_color;
+ node->rb_left = old->rb_left;
+ ext2fs_rb_set_parent(old->rb_left, node);
+
+ goto color;
+ }
+
+ parent = ext2fs_rb_parent(node);
+ color = ext2fs_rb_color(node);
+
+ if (child)
+ ext2fs_rb_set_parent(child, parent);
+ if (parent)
+ {
+ if (parent->rb_left == node)
+ parent->rb_left = child;
+ else
+ parent->rb_right = child;
+ }
+ else
+ root->rb_node = child;
+
+ color:
+ if (color == RB_BLACK)
+ __rb_erase_color(child, parent, root);
+}
+
+/*
+ * This function returns the first node (in sort order) of the tree.
+ */
+struct rb_node *ext2fs_rb_first(const struct rb_root *root)
+{
+ struct rb_node *n;
+
+ n = root->rb_node;
+ if (!n)
+ return NULL;
+ while (n->rb_left)
+ n = n->rb_left;
+ return n;
+}
+
+struct rb_node *ext2fs_rb_last(const struct rb_root *root)
+{
+ struct rb_node *n;
+
+ n = root->rb_node;
+ if (!n)
+ return NULL;
+ while (n->rb_right)
+ n = n->rb_right;
+ return n;
+}
+
+struct rb_node *ext2fs_rb_next(struct rb_node *node)
+{
+ struct rb_node *parent;
+
+ if (ext2fs_rb_parent(node) == node)
+ return NULL;
+
+ /* If we have a right-hand child, go down and then left as far
+ as we can. */
+ if (node->rb_right) {
+ node = node->rb_right;
+ while (node->rb_left)
+ node=node->rb_left;
+ return (struct rb_node *)node;
+ }
+
+ /* No right-hand children. Everything down and left is
+ smaller than us, so any 'next' node must be in the general
+ direction of our parent. Go up the tree; any time the
+ ancestor is a right-hand child of its parent, keep going
+ up. First time it's a left-hand child of its parent, said
+ parent is our 'next' node. */
+ while ((parent = ext2fs_rb_parent(node)) && node == parent->rb_right)
+ node = parent;
+
+ return parent;
+}
+
+struct rb_node *ext2fs_rb_prev(struct rb_node *node)
+{
+ struct rb_node *parent;
+
+ if (ext2fs_rb_parent(node) == node)
+ return NULL;
+
+ /* If we have a left-hand child, go down and then right as far
+ as we can. */
+ if (node->rb_left) {
+ node = node->rb_left;
+ while (node->rb_right)
+ node=node->rb_right;
+ return (struct rb_node *)node;
+ }
+
+ /* No left-hand children. Go up till we find an ancestor which
+ is a right-hand child of its parent */
+ while ((parent = ext2fs_rb_parent(node)) && node == parent->rb_left)
+ node = parent;
+
+ return parent;
+}
+
+void ext2fs_rb_replace_node(struct rb_node *victim, struct rb_node *new,
+ struct rb_root *root)
+{
+ struct rb_node *parent = ext2fs_rb_parent(victim);
+
+ /* Set the surrounding nodes to point to the replacement */
+ if (parent) {
+ if (victim == parent->rb_left)
+ parent->rb_left = new;
+ else
+ parent->rb_right = new;
+ } else {
+ root->rb_node = new;
+ }
+ if (victim->rb_left)
+ ext2fs_rb_set_parent(victim->rb_left, new);
+ if (victim->rb_right)
+ ext2fs_rb_set_parent(victim->rb_right, new);
+
+ /* Copy the pointers/colour from the victim to the replacement */
+ *new = *victim;
+}
diff --git a/lib/ext2fs/rbtree.h b/lib/ext2fs/rbtree.h
new file mode 100644
index 0000000..790f5c1
--- /dev/null
+++ b/lib/ext2fs/rbtree.h
@@ -0,0 +1,183 @@
+/*
+ Red Black Trees
+ (C) 1999 Andrea Arcangeli <andrea@suse.de>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+ linux/include/linux/rbtree.h
+
+ To use rbtrees you'll have to implement your own insert and search cores.
+ This will avoid us to use callbacks and to drop dramatically performances.
+ I know it's not the cleaner way, but in C (not in C++) to get
+ performances and genericity...
+
+ Some example of insert and search follows here. The search is a plain
+ normal search over an ordered tree. The insert instead must be implemented
+ in two steps: First, the code must insert the element in order as a red leaf
+ in the tree, and then the support library function rb_insert_color() must
+ be called. Such function will do the not trivial work to rebalance the
+ rbtree, if necessary.
+
+-----------------------------------------------------------------------
+static inline struct page * rb_search_page_cache(struct inode * inode,
+ unsigned long offset)
+{
+ struct rb_node * n = inode->i_rb_page_cache.rb_node;
+ struct page * page;
+
+ while (n)
+ {
+ page = rb_entry(n, struct page, rb_page_cache);
+
+ if (offset < page->offset)
+ n = n->rb_left;
+ else if (offset > page->offset)
+ n = n->rb_right;
+ else
+ return page;
+ }
+ return NULL;
+}
+
+static inline struct page * __rb_insert_page_cache(struct inode * inode,
+ unsigned long offset,
+ struct rb_node * node)
+{
+ struct rb_node ** p = &inode->i_rb_page_cache.rb_node;
+ struct rb_node * parent = NULL;
+ struct page * page;
+
+ while (*p)
+ {
+ parent = *p;
+ page = rb_entry(parent, struct page, rb_page_cache);
+
+ if (offset < page->offset)
+ p = &(*p)->rb_left;
+ else if (offset > page->offset)
+ p = &(*p)->rb_right;
+ else
+ return page;
+ }
+
+ rb_link_node(node, parent, p);
+
+ return NULL;
+}
+
+static inline struct page * rb_insert_page_cache(struct inode * inode,
+ unsigned long offset,
+ struct rb_node * node)
+{
+ struct page * ret;
+ if ((ret = __rb_insert_page_cache(inode, offset, node)))
+ goto out;
+ rb_insert_color(node, &inode->i_rb_page_cache);
+ out:
+ return ret;
+}
+-----------------------------------------------------------------------
+*/
+
+#ifndef _LINUX_RBTREE_H
+#define _LINUX_RBTREE_H
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "compiler.h"
+
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
+struct rb_node
+{
+ uintptr_t rb_parent_color;
+#define RB_RED 0
+#define RB_BLACK 1
+ struct rb_node *rb_right;
+ struct rb_node *rb_left;
+} __attribute__((aligned(sizeof(long))));
+ /* The alignment might seem pointless, but allegedly CRIS needs it */
+
+struct rb_root
+{
+ struct rb_node *rb_node;
+};
+
+
+#define ext2fs_rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
+#define ext2fs_rb_color(r) ((r)->rb_parent_color & 1)
+#define ext2fs_rb_is_red(r) (!ext2fs_rb_color(r))
+#define ext2fs_rb_is_black(r) ext2fs_rb_color(r)
+#define ext2fs_rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
+#define ext2fs_rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
+
+static inline void ext2fs_rb_set_parent(struct rb_node *rb, struct rb_node *p)
+{
+ rb->rb_parent_color = (rb->rb_parent_color & 3) | (uintptr_t)p;
+}
+static inline void ext2fs_rb_set_color(struct rb_node *rb, int color)
+{
+ rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
+}
+
+#define RB_ROOT (struct rb_root) { NULL, }
+#define ext2fs_rb_entry(ptr, type, member) container_of(ptr, type, member)
+
+static inline int ext2fs_rb_empty_root(struct rb_root *root)
+{
+ return root->rb_node == NULL;
+}
+
+static inline int ext2fs_rb_empty_node(struct rb_node *node)
+{
+ return ext2fs_rb_parent(node) == node;
+}
+
+static inline void ext2fs_rb_clear_node(struct rb_node *node)
+{
+ ext2fs_rb_set_parent(node, node);
+}
+
+extern void ext2fs_rb_insert_color(struct rb_node *, struct rb_root *);
+extern void ext2fs_rb_erase(struct rb_node *, struct rb_root *);
+
+/* Find logical next and previous nodes in a tree */
+extern struct rb_node *ext2fs_rb_next(struct rb_node *);
+extern struct rb_node *ext2fs_rb_prev(struct rb_node *);
+extern struct rb_node *ext2fs_rb_first(const struct rb_root *);
+extern struct rb_node *ext2fs_rb_last(const struct rb_root *);
+
+/* Fast replacement of a single node without remove/rebalance/add/rebalance */
+extern void ext2fs_rb_replace_node(struct rb_node *victim, struct rb_node *new,
+ struct rb_root *root);
+
+static inline void ext2fs_rb_link_node(struct rb_node * node,
+ struct rb_node * parent,
+ struct rb_node ** rb_link)
+{
+ node->rb_parent_color = (uintptr_t)parent;
+ node->rb_left = node->rb_right = NULL;
+
+ *rb_link = node;
+}
+
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+
+#endif /* _LINUX_RBTREE_H */
diff --git a/lib/ext2fs/read_bb.c b/lib/ext2fs/read_bb.c
new file mode 100644
index 0000000..e58b7cb
--- /dev/null
+++ b/lib/ext2fs/read_bb.c
@@ -0,0 +1,102 @@
+/*
+ * read_bb --- read the bad blocks inode
+ *
+ * Copyright (C) 1994 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct read_bb_record {
+ ext2_badblocks_list bb_list;
+ errcode_t err;
+};
+
+/*
+ * Helper function for ext2fs_read_bb_inode()
+ */
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int mark_bad_block(ext2_filsys fs, blk_t *block_nr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct read_bb_record *rb = (struct read_bb_record *) priv_data;
+
+ if (blockcnt < 0)
+ return 0;
+
+ if ((*block_nr < fs->super->s_first_data_block) ||
+ (*block_nr >= ext2fs_blocks_count(fs->super)))
+ return 0; /* Ignore illegal blocks */
+
+ rb->err = ext2fs_badblocks_list_add(rb->bb_list, *block_nr);
+ if (rb->err)
+ return BLOCK_ABORT;
+ return 0;
+}
+
+/*
+ * Reads the current bad blocks from the bad blocks inode.
+ */
+errcode_t ext2fs_read_bb_inode(ext2_filsys fs, ext2_badblocks_list *bb_list)
+{
+ errcode_t retval;
+ struct read_bb_record rb;
+ struct ext2_inode inode;
+ blk_t numblocks;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!*bb_list) {
+ retval = ext2fs_read_inode(fs, EXT2_BAD_INO, &inode);
+ if (retval)
+ return retval;
+ numblocks = inode.i_blocks;
+ if (!(ext2fs_has_feature_huge_file(fs->super) &&
+ (inode.i_flags & EXT4_HUGE_FILE_FL)))
+ numblocks = numblocks / (fs->blocksize / 512);
+ numblocks += 20;
+ if (numblocks < 50)
+ numblocks = 50;
+ if (numblocks > 50000)
+ numblocks = 500;
+ retval = ext2fs_badblocks_list_create(bb_list, numblocks);
+ if (retval)
+ return retval;
+ }
+
+ rb.bb_list = *bb_list;
+ rb.err = 0;
+ retval = ext2fs_block_iterate2(fs, EXT2_BAD_INO, BLOCK_FLAG_READ_ONLY,
+ 0, mark_bad_block, &rb);
+ if (retval)
+ return retval;
+
+ return rb.err;
+}
+
+
diff --git a/lib/ext2fs/read_bb_file.c b/lib/ext2fs/read_bb_file.c
new file mode 100644
index 0000000..a6d3beb
--- /dev/null
+++ b/lib/ext2fs/read_bb_file.c
@@ -0,0 +1,109 @@
+/*
+ * read_bb_file.c --- read a list of bad blocks from a FILE *
+ *
+ * Copyright (C) 1994, 1995, 2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * Reads a list of bad blocks from a FILE *
+ */
+errcode_t ext2fs_read_bb_FILE2(ext2_filsys fs, FILE *f,
+ ext2_badblocks_list *bb_list,
+ void *priv_data,
+ void (*invalid)(ext2_filsys fs,
+ blk_t blk,
+ char *badstr,
+ void *priv_data))
+{
+ errcode_t retval;
+ unsigned long long blockno;
+ int count;
+ char buf[128];
+
+ if (fs)
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!*bb_list) {
+ retval = ext2fs_badblocks_list_create(bb_list, 10);
+ if (retval)
+ return retval;
+ }
+
+ while (!feof (f)) {
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ break;
+ count = sscanf(buf, "%llu", &blockno);
+ if (count <= 0)
+ continue;
+ /* Badblocks isn't going to be updated for 64bit */
+ if (blockno >> 32)
+ return EOVERFLOW;
+ if (fs &&
+ ((blockno < fs->super->s_first_data_block) ||
+ (blockno >= ext2fs_blocks_count(fs->super)))) {
+ if (invalid)
+ (invalid)(fs, (blk64_t) blockno, buf, priv_data);
+ continue;
+ }
+ retval = ext2fs_badblocks_list_add(*bb_list, (blk64_t) blockno);
+ if (retval)
+ return retval;
+ }
+ return 0;
+}
+
+struct compat_struct {
+ void (*invalid)(ext2_filsys, blk_t);
+};
+
+static void call_compat_invalid(ext2_filsys fs, blk_t blk,
+ char *badstr EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct compat_struct *st;
+
+ st = (struct compat_struct *) priv_data;
+ if (st->invalid)
+ (st->invalid)(fs, blk);
+}
+
+
+/*
+ * Reads a list of bad blocks from a FILE *
+ */
+errcode_t ext2fs_read_bb_FILE(ext2_filsys fs, FILE *f,
+ ext2_badblocks_list *bb_list,
+ void (*invalid)(ext2_filsys fs, blk_t blk))
+{
+ struct compat_struct st;
+
+ st.invalid = invalid;
+
+ return ext2fs_read_bb_FILE2(fs, f, bb_list, &st,
+ call_compat_invalid);
+}
+
+
diff --git a/lib/ext2fs/res_gdt.c b/lib/ext2fs/res_gdt.c
new file mode 100644
index 0000000..fa8d8d6
--- /dev/null
+++ b/lib/ext2fs/res_gdt.c
@@ -0,0 +1,239 @@
+/*
+ * res_gdt.c --- reserve blocks for growing the group descriptor table
+ * during online resizing.
+ *
+ * Copyright (C) 2002 Andreas Dilger
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * Iterate through the groups which hold BACKUP superblock/GDT copies in an
+ * ext3 filesystem. The counters should be initialized to 1, 5, and 7 before
+ * calling this for the first time. In a sparse filesystem it will be the
+ * sequence of powers of 3, 5, and 7: 1, 3, 5, 7, 9, 25, 27, 49, 81, ...
+ * For a non-sparse filesystem it will be every group: 1, 2, 3, 4, ...
+ */
+static unsigned int list_backups(ext2_filsys fs, unsigned int *three,
+ unsigned int *five, unsigned int *seven)
+{
+ unsigned int *min = three;
+ int mult = 3;
+ unsigned int ret;
+
+ if (ext2fs_has_feature_sparse_super2(fs->super)) {
+ if (*min == 1) {
+ *min += 1;
+ if (fs->super->s_backup_bgs[0])
+ return fs->super->s_backup_bgs[0];
+ }
+ if (*min == 2) {
+ *min += 1;
+ if (fs->super->s_backup_bgs[1])
+ return fs->super->s_backup_bgs[1];
+ }
+ return fs->group_desc_count;
+ }
+ if (!ext2fs_has_feature_sparse_super(fs->super)) {
+ ret = *min;
+ *min += 1;
+ return ret;
+ }
+
+ if (*five < *min) {
+ min = five;
+ mult = 5;
+ }
+ if (*seven < *min) {
+ min = seven;
+ mult = 7;
+ }
+
+ ret = *min;
+ *min *= mult;
+
+ return ret;
+}
+
+/*
+ * This code assumes that the reserved blocks have already been marked in-use
+ * during ext2fs_initialize(), so that they are not allocated for other
+ * uses before we can add them to the resize inode (which has to come
+ * after the creation of the inode table).
+ */
+errcode_t ext2fs_create_resize_inode(ext2_filsys fs)
+{
+ errcode_t retval, retval2;
+ struct ext2_super_block *sb;
+ struct ext2_inode inode;
+ __u32 *dindir_buf, *gdt_buf;
+ unsigned long long apb, inode_size;
+ /* FIXME-64 - can't deal with extents */
+ blk_t dindir_blk, rsv_off, gdt_off, gdt_blk;
+ int dindir_dirty = 0, inode_dirty = 0, sb_blk = 0;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ sb = fs->super;
+
+ retval = ext2fs_get_array(2, fs->blocksize, &dindir_buf);
+ if (retval)
+ return retval;
+ gdt_buf = (__u32 *)((char *)dindir_buf + fs->blocksize);
+
+ retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
+ if (retval)
+ goto out_free;
+
+ /*
+ * File systems with a blocksize of 1024 and bigalloc have
+ * sb->s_first_data_block of 0; yet the superblock is still at
+ * block #1. We compensate for it here.
+ */
+ sb_blk = sb->s_first_data_block;
+ if (fs->blocksize == 1024 && sb_blk == 0)
+ sb_blk = 1;
+
+ /* Maximum possible file size (we only use double indirect blocks) */
+ apb = EXT2_ADDR_PER_BLOCK(sb);
+ if ((dindir_blk = inode.i_block[EXT2_DIND_BLOCK])) {
+#ifdef RES_GDT_DEBUG
+ printf("reading GDT dindir %u\n", dindir_blk);
+#endif
+ retval = ext2fs_read_ind_block(fs, dindir_blk, dindir_buf);
+ if (retval)
+ goto out_inode;
+ } else {
+ blk_t goal = sb_blk + fs->desc_blocks +
+ sb->s_reserved_gdt_blocks + 2 +
+ fs->inode_blocks_per_group;
+
+ retval = ext2fs_alloc_block(fs, goal, 0, &dindir_blk);
+ if (retval)
+ goto out_free;
+ inode.i_mode = LINUX_S_IFREG | 0600;
+ inode.i_links_count = 1;
+ inode.i_block[EXT2_DIND_BLOCK] = dindir_blk;
+ ext2fs_iblk_set(fs, &inode, 1);
+ memset(dindir_buf, 0, fs->blocksize);
+#ifdef RES_GDT_DEBUG
+ printf("allocated GDT dindir %u\n", dindir_blk);
+#endif
+ dindir_dirty = inode_dirty = 1;
+ inode_size = apb*apb + apb + EXT2_NDIR_BLOCKS;
+ inode_size *= fs->blocksize;
+ retval = ext2fs_inode_size_set(fs, &inode, inode_size);
+ if (retval)
+ goto out_free;
+ inode.i_ctime = fs->now ? fs->now : time(0);
+ }
+
+ for (rsv_off = 0, gdt_off = fs->desc_blocks,
+ gdt_blk = sb_blk + 1 + fs->desc_blocks;
+ rsv_off < sb->s_reserved_gdt_blocks;
+ rsv_off++, gdt_off++, gdt_blk++) {
+ unsigned int three = 1, five = 5, seven = 7;
+ unsigned int grp, last = 0;
+ int gdt_dirty = 0;
+
+ gdt_off %= apb;
+ if (!dindir_buf[gdt_off]) {
+ /* FIXME XXX XXX
+ blk_t new_blk;
+
+ retval = ext2fs_new_block(fs, gdt_blk, 0, &new_blk);
+ if (retval)
+ goto out_free;
+ if (new_blk != gdt_blk) {
+ // XXX free block
+ retval = -1; // XXX
+ }
+ */
+ gdt_dirty = dindir_dirty = inode_dirty = 1;
+ memset(gdt_buf, 0, fs->blocksize);
+ dindir_buf[gdt_off] = gdt_blk;
+ ext2fs_iblk_add_blocks(fs, &inode, 1);
+#ifdef RES_GDT_DEBUG
+ printf("added primary GDT block %u at %u[%u]\n",
+ gdt_blk, dindir_blk, gdt_off);
+#endif
+ } else if (dindir_buf[gdt_off] == gdt_blk) {
+#ifdef RES_GDT_DEBUG
+ printf("reading primary GDT block %u\n", gdt_blk);
+#endif
+ retval = ext2fs_read_ind_block(fs, gdt_blk, gdt_buf);
+ if (retval)
+ goto out_dindir;
+ } else {
+#ifdef RES_GDT_DEBUG
+ printf("bad primary GDT %u != %u at %u[%u]\n",
+ dindir_buf[gdt_off], gdt_blk,dindir_blk,gdt_off);
+#endif
+ retval = EXT2_ET_RESIZE_INODE_CORRUPT;
+ goto out_dindir;
+ }
+
+ while ((grp = list_backups(fs, &three, &five, &seven)) <
+ fs->group_desc_count) {
+ blk_t expect = gdt_blk + grp * sb->s_blocks_per_group;
+
+ if (!gdt_buf[last]) {
+#ifdef RES_GDT_DEBUG
+ printf("added backup GDT %u grp %u@%u[%u]\n",
+ expect, grp, gdt_blk, last);
+#endif
+ gdt_buf[last] = expect;
+ ext2fs_iblk_add_blocks(fs, &inode, 1);
+ gdt_dirty = inode_dirty = 1;
+ } else if (gdt_buf[last] != expect) {
+#ifdef RES_GDT_DEBUG
+ printf("bad backup GDT %u != %u at %u[%u]\n",
+ gdt_buf[last], expect, gdt_blk, last);
+#endif
+ retval = EXT2_ET_RESIZE_INODE_CORRUPT;
+ goto out_dindir;
+ }
+ last++;
+ }
+ if (gdt_dirty) {
+#ifdef RES_GDT_DEBUG
+ printf("writing primary GDT block %u\n", gdt_blk);
+#endif
+ retval = ext2fs_write_ind_block(fs, gdt_blk, gdt_buf);
+ if (retval)
+ goto out_dindir;
+ }
+ }
+
+out_dindir:
+ if (dindir_dirty) {
+ retval2 = ext2fs_write_ind_block(fs, dindir_blk, dindir_buf);
+ if (!retval)
+ retval = retval2;
+ }
+out_inode:
+#ifdef RES_GDT_DEBUG
+ printf("inode.i_blocks = %u, i_size = %lu\n", inode.i_blocks,
+ EXT2_I_SIZE(&inode));
+#endif
+ if (inode_dirty) {
+ inode.i_atime = inode.i_mtime = fs->now ? fs->now : time(0);
+ retval2 = ext2fs_write_new_inode(fs, EXT2_RESIZE_INO, &inode);
+ if (!retval)
+ retval = retval2;
+ }
+out_free:
+ ext2fs_free_mem(&dindir_buf);
+ return retval;
+}
+
diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c
new file mode 100644
index 0000000..1fe65f7
--- /dev/null
+++ b/lib/ext2fs/rw_bitmaps.c
@@ -0,0 +1,682 @@
+/*
+ * rw_bitmaps.c --- routines to read and write the inode and block bitmaps.
+ *
+ * Copyright (C) 1993, 1994, 1994, 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "e2image.h"
+
+#ifdef HAVE_PTHREAD
+typedef pthread_mutex_t mutex_t;
+
+static void unix_pthread_mutex_lock(mutex_t *mutex)
+{
+ if (mutex)
+ pthread_mutex_lock(mutex);
+}
+static void unix_pthread_mutex_unlock(mutex_t *mutex)
+{
+ if (mutex)
+ pthread_mutex_unlock(mutex);
+}
+#else
+typedef int mutex_t;
+#define unix_pthread_mutex_lock(mutex_t) do {} while (0)
+#define unix_pthread_mutex_unlock(mutex_t) do {} while (0)
+#endif
+
+static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block)
+{
+ dgrp_t i;
+ unsigned int j;
+ int block_nbytes, inode_nbytes;
+ unsigned int nbits;
+ errcode_t retval;
+ char *block_buf = NULL, *inode_buf = NULL;
+ int csum_flag;
+ blk64_t blk;
+ blk64_t blk_itr = EXT2FS_B2C(fs, fs->super->s_first_data_block);
+ ext2_ino_t ino_itr = 1;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ csum_flag = ext2fs_has_group_desc_csum(fs);
+
+ inode_nbytes = block_nbytes = 0;
+ if (do_block) {
+ block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
+ retval = io_channel_alloc_buf(fs->io, 0, &block_buf);
+ if (retval)
+ goto errout;
+ memset(block_buf, 0xff, fs->blocksize);
+ }
+ if (do_inode) {
+ inode_nbytes = (size_t)
+ ((EXT2_INODES_PER_GROUP(fs->super)+7) / 8);
+ retval = io_channel_alloc_buf(fs->io, 0, &inode_buf);
+ if (retval)
+ goto errout;
+ memset(inode_buf, 0xff, fs->blocksize);
+ }
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (!do_block)
+ goto skip_block_bitmap;
+
+ if (csum_flag && ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT)
+ )
+ goto skip_this_block_bitmap;
+
+ retval = ext2fs_get_block_bitmap_range2(fs->block_map,
+ blk_itr, block_nbytes << 3, block_buf);
+ if (retval)
+ goto errout;
+
+ if (i == fs->group_desc_count - 1) {
+ /* Force bitmap padding for the last group */
+ nbits = EXT2FS_NUM_B2C(fs,
+ ((ext2fs_blocks_count(fs->super)
+ - (__u64) fs->super->s_first_data_block)
+ % (__u64) EXT2_BLOCKS_PER_GROUP(fs->super)));
+ if (nbits)
+ for (j = nbits; j < fs->blocksize * 8; j++)
+ ext2fs_set_bit(j, block_buf);
+ }
+
+ retval = ext2fs_block_bitmap_csum_set(fs, i, block_buf,
+ block_nbytes);
+ if (retval)
+ return retval;
+ ext2fs_group_desc_csum_set(fs, i);
+ fs->flags |= EXT2_FLAG_DIRTY;
+
+ blk = ext2fs_block_bitmap_loc(fs, i);
+ if (blk && blk < ext2fs_blocks_count(fs->super)) {
+ retval = io_channel_write_blk64(fs->io, blk, 1,
+ block_buf);
+ if (retval) {
+ retval = EXT2_ET_BLOCK_BITMAP_WRITE;
+ goto errout;
+ }
+ }
+ skip_this_block_bitmap:
+ blk_itr += block_nbytes << 3;
+ skip_block_bitmap:
+
+ if (!do_inode)
+ continue;
+
+ if (csum_flag && ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT)
+ )
+ goto skip_this_inode_bitmap;
+
+ retval = ext2fs_get_inode_bitmap_range2(fs->inode_map,
+ ino_itr, inode_nbytes << 3, inode_buf);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_inode_bitmap_csum_set(fs, i, inode_buf,
+ inode_nbytes);
+ if (retval)
+ goto errout;
+ ext2fs_group_desc_csum_set(fs, i);
+ fs->flags |= EXT2_FLAG_DIRTY;
+
+ blk = ext2fs_inode_bitmap_loc(fs, i);
+ if (blk && blk < ext2fs_blocks_count(fs->super)) {
+ retval = io_channel_write_blk64(fs->io, blk, 1,
+ inode_buf);
+ if (retval) {
+ retval = EXT2_ET_INODE_BITMAP_WRITE;
+ goto errout;
+ }
+ }
+ skip_this_inode_bitmap:
+ ino_itr += inode_nbytes << 3;
+
+ }
+ if (do_block) {
+ fs->flags &= ~EXT2_FLAG_BB_DIRTY;
+ ext2fs_free_mem(&block_buf);
+ }
+ if (do_inode) {
+ fs->flags &= ~EXT2_FLAG_IB_DIRTY;
+ ext2fs_free_mem(&inode_buf);
+ }
+ return 0;
+errout:
+ if (inode_buf)
+ ext2fs_free_mem(&inode_buf);
+ if (block_buf)
+ ext2fs_free_mem(&block_buf);
+ return retval;
+}
+
+static errcode_t mark_uninit_bg_group_blocks(ext2_filsys fs)
+{
+ dgrp_t i;
+ blk64_t blk;
+ ext2fs_block_bitmap bmap = fs->block_map;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (!ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT))
+ continue;
+
+ ext2fs_reserve_super_and_bgd(fs, i, bmap);
+
+ /*
+ * Mark the blocks used for the inode table
+ */
+ blk = ext2fs_inode_table_loc(fs, i);
+ if (blk)
+ ext2fs_mark_block_bitmap_range2(bmap, blk,
+ fs->inode_blocks_per_group);
+
+ /*
+ * Mark block used for the block bitmap
+ */
+ blk = ext2fs_block_bitmap_loc(fs, i);
+ if (blk && blk < ext2fs_blocks_count(fs->super))
+ ext2fs_mark_block_bitmap2(bmap, blk);
+
+ /*
+ * Mark block used for the inode bitmap
+ */
+ blk = ext2fs_inode_bitmap_loc(fs, i);
+ if (blk && blk < ext2fs_blocks_count(fs->super))
+ ext2fs_mark_block_bitmap2(bmap, blk);
+ }
+ return 0;
+}
+
+static int bitmap_tail_verify(unsigned char *bitmap, int first, int last)
+{
+ int i;
+
+ for (i = first; i <= last; i++)
+ if (bitmap[i] != 0xff)
+ return 0;
+ return 1;
+}
+
+static errcode_t read_bitmaps_range_prepare(ext2_filsys fs, int flags)
+{
+ errcode_t retval;
+ int block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
+ int inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8;
+ char *buf;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if ((block_nbytes > (int) fs->blocksize) ||
+ (inode_nbytes > (int) fs->blocksize))
+ return EXT2_ET_CORRUPT_SUPERBLOCK;
+
+ fs->write_bitmaps = ext2fs_write_bitmaps;
+
+ retval = ext2fs_get_mem(strlen(fs->device_name) + 80, &buf);
+ if (retval)
+ return retval;
+
+ if (flags & EXT2FS_BITMAPS_BLOCK) {
+ if (fs->block_map)
+ ext2fs_free_block_bitmap(fs->block_map);
+ strcpy(buf, "block bitmap for ");
+ strcat(buf, fs->device_name);
+ retval = ext2fs_allocate_block_bitmap(fs, buf, &fs->block_map);
+ if (retval)
+ goto cleanup;
+ }
+
+ if (flags & EXT2FS_BITMAPS_INODE) {
+ if (fs->inode_map)
+ ext2fs_free_inode_bitmap(fs->inode_map);
+ strcpy(buf, "inode bitmap for ");
+ strcat(buf, fs->device_name);
+ retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
+ if (retval)
+ goto cleanup;
+ }
+ ext2fs_free_mem(&buf);
+ return retval;
+
+cleanup:
+ if (flags & EXT2FS_BITMAPS_BLOCK) {
+ ext2fs_free_block_bitmap(fs->block_map);
+ fs->block_map = 0;
+ }
+ if (flags & EXT2FS_BITMAPS_INODE) {
+ ext2fs_free_inode_bitmap(fs->inode_map);
+ fs->inode_map = 0;
+ }
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+static errcode_t read_bitmaps_range_start(ext2_filsys fs, int flags,
+ dgrp_t start, dgrp_t end,
+ mutex_t *mutex,
+ int *tail_flags)
+{
+ dgrp_t i;
+ char *block_bitmap = 0, *inode_bitmap = 0;
+ errcode_t retval = 0;
+ int block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
+ int inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8;
+ int csum_flag;
+ unsigned int cnt;
+ blk64_t blk;
+ blk64_t blk_itr = EXT2FS_B2C(fs, fs->super->s_first_data_block);
+ blk64_t blk_cnt;
+ ext2_ino_t ino_itr = 1;
+ ext2_ino_t ino_cnt;
+
+ csum_flag = ext2fs_has_group_desc_csum(fs);
+
+ if (flags & EXT2FS_BITMAPS_BLOCK) {
+ retval = io_channel_alloc_buf(fs->io, 0, &block_bitmap);
+ if (retval)
+ goto cleanup;
+ } else {
+ block_nbytes = 0;
+ }
+
+ if (flags & EXT2FS_BITMAPS_INODE) {
+ retval = io_channel_alloc_buf(fs->io, 0, &inode_bitmap);
+ if (retval)
+ goto cleanup;
+ } else {
+ inode_nbytes = 0;
+ }
+
+ /* io should be null */
+ if (fs->flags & EXT2_FLAG_IMAGE_FILE) {
+ blk = (ext2fs_le32_to_cpu(fs->image_header->offset_inodemap) / fs->blocksize);
+ ino_cnt = fs->super->s_inodes_count;
+ while (inode_bitmap && ino_cnt > 0) {
+ retval = io_channel_read_blk64(fs->image_io, blk++,
+ 1, inode_bitmap);
+ if (retval)
+ goto cleanup;
+ cnt = fs->blocksize << 3;
+ if (cnt > ino_cnt)
+ cnt = ino_cnt;
+ retval = ext2fs_set_inode_bitmap_range2(fs->inode_map,
+ ino_itr, cnt, inode_bitmap);
+ if (retval)
+ goto cleanup;
+ ino_itr += cnt;
+ ino_cnt -= cnt;
+ }
+ blk = (ext2fs_le32_to_cpu(fs->image_header->offset_blockmap) /
+ fs->blocksize);
+ blk_cnt = EXT2_GROUPS_TO_CLUSTERS(fs->super,
+ fs->group_desc_count);
+ while (block_bitmap && blk_cnt > 0) {
+ retval = io_channel_read_blk64(fs->image_io, blk++,
+ 1, block_bitmap);
+ if (retval)
+ goto cleanup;
+ cnt = fs->blocksize << 3;
+ if (cnt > blk_cnt)
+ cnt = blk_cnt;
+ retval = ext2fs_set_block_bitmap_range2(fs->block_map,
+ blk_itr, cnt, block_bitmap);
+ if (retval)
+ goto cleanup;
+ blk_itr += cnt;
+ blk_cnt -= cnt;
+ }
+ goto cleanup;
+ }
+
+ blk_itr += ((blk64_t)start * (block_nbytes << 3));
+ ino_itr += ((blk64_t)start * (inode_nbytes << 3));
+ for (i = start; i <= end; i++) {
+ if (block_bitmap) {
+ blk = ext2fs_block_bitmap_loc(fs, i);
+ if ((csum_flag &&
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
+ ext2fs_group_desc_csum_verify(fs, i)) ||
+ (blk >= ext2fs_blocks_count(fs->super)))
+ blk = 0;
+ if (blk) {
+ retval = io_channel_read_blk64(fs->io, blk,
+ 1, block_bitmap);
+ if (retval) {
+ retval = EXT2_ET_BLOCK_BITMAP_READ;
+ goto cleanup;
+ }
+ /* verify block bitmap checksum */
+ if (!(fs->flags &
+ EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_block_bitmap_csum_verify(fs, i,
+ block_bitmap, block_nbytes)) {
+ retval =
+ EXT2_ET_BLOCK_BITMAP_CSUM_INVALID;
+ goto cleanup;
+ }
+ if (!bitmap_tail_verify((unsigned char *) block_bitmap,
+ block_nbytes, fs->blocksize - 1))
+ *tail_flags |= EXT2_FLAG_BBITMAP_TAIL_PROBLEM;
+ } else
+ memset(block_bitmap, 0, block_nbytes);
+ cnt = block_nbytes << 3;
+ unix_pthread_mutex_lock(mutex);
+ retval = ext2fs_set_block_bitmap_range2(fs->block_map,
+ blk_itr, cnt, block_bitmap);
+ unix_pthread_mutex_unlock(mutex);
+ if (retval)
+ goto cleanup;
+ blk_itr += block_nbytes << 3;
+ }
+ if (inode_bitmap) {
+ blk = ext2fs_inode_bitmap_loc(fs, i);
+ if ((csum_flag &&
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT) &&
+ ext2fs_group_desc_csum_verify(fs, i)) ||
+ (blk >= ext2fs_blocks_count(fs->super)))
+ blk = 0;
+ if (blk) {
+ retval = io_channel_read_blk64(fs->io, blk,
+ 1, inode_bitmap);
+ if (retval) {
+ retval = EXT2_ET_INODE_BITMAP_READ;
+ goto cleanup;
+ }
+
+ /* verify inode bitmap checksum */
+ if (!(fs->flags &
+ EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
+ !ext2fs_inode_bitmap_csum_verify(fs, i,
+ inode_bitmap, inode_nbytes)) {
+ retval =
+ EXT2_ET_INODE_BITMAP_CSUM_INVALID;
+ goto cleanup;
+ }
+ if (!bitmap_tail_verify((unsigned char *) inode_bitmap,
+ inode_nbytes, fs->blocksize - 1))
+ *tail_flags |= EXT2_FLAG_IBITMAP_TAIL_PROBLEM;
+ } else
+ memset(inode_bitmap, 0, inode_nbytes);
+ cnt = inode_nbytes << 3;
+ unix_pthread_mutex_lock(mutex);
+ retval = ext2fs_set_inode_bitmap_range2(fs->inode_map,
+ ino_itr, cnt, inode_bitmap);
+ unix_pthread_mutex_unlock(mutex);
+ if (retval)
+ goto cleanup;
+ ino_itr += inode_nbytes << 3;
+ }
+ }
+
+cleanup:
+ if (inode_bitmap)
+ ext2fs_free_mem(&inode_bitmap);
+ if (block_bitmap)
+ ext2fs_free_mem(&block_bitmap);
+ return retval;
+}
+
+static errcode_t read_bitmaps_range_end(ext2_filsys fs, int flags,
+ int tail_flags)
+{
+ errcode_t retval;
+
+ /* Mark group blocks for any BLOCK_UNINIT groups */
+ if (flags & EXT2FS_BITMAPS_BLOCK) {
+ retval = mark_uninit_bg_group_blocks(fs);
+ if (retval)
+ return retval;
+ fs->flags &= ~EXT2_FLAG_BBITMAP_TAIL_PROBLEM;
+ }
+ if (flags & EXT2FS_BITMAPS_INODE)
+ fs->flags &= ~EXT2_FLAG_IBITMAP_TAIL_PROBLEM;
+ fs->flags |= tail_flags;
+
+ return 0;
+}
+
+static void read_bitmaps_cleanup_on_error(ext2_filsys fs, int flags)
+{
+ if (flags & EXT2FS_BITMAPS_BLOCK) {
+ ext2fs_free_block_bitmap(fs->block_map);
+ fs->block_map = 0;
+ }
+ if (flags & EXT2FS_BITMAPS_INODE) {
+ ext2fs_free_inode_bitmap(fs->inode_map);
+ fs->inode_map = 0;
+ }
+}
+
+static errcode_t read_bitmaps_range(ext2_filsys fs, int flags,
+ dgrp_t start, dgrp_t end)
+{
+ errcode_t retval;
+ int tail_flags = 0;
+
+ retval = read_bitmaps_range_prepare(fs, flags);
+ if (retval)
+ return retval;
+
+ retval = read_bitmaps_range_start(fs, flags, start, end,
+ NULL, &tail_flags);
+ if (retval == 0)
+ retval = read_bitmaps_range_end(fs, flags, tail_flags);
+ if (retval)
+ read_bitmaps_cleanup_on_error(fs, flags);
+ return retval;
+}
+
+#ifdef HAVE_PTHREAD
+struct read_bitmaps_thread_info {
+ ext2_filsys rbt_fs;
+ int rbt_flags;
+ dgrp_t rbt_grp_start;
+ dgrp_t rbt_grp_end;
+ errcode_t rbt_retval;
+ pthread_mutex_t *rbt_mutex;
+ int rbt_tail_flags;
+};
+
+static void *read_bitmaps_thread(void *data)
+{
+ struct read_bitmaps_thread_info *rbt = data;
+
+ rbt->rbt_retval = read_bitmaps_range_start(rbt->rbt_fs, rbt->rbt_flags,
+ rbt->rbt_grp_start, rbt->rbt_grp_end,
+ rbt->rbt_mutex, &rbt->rbt_tail_flags);
+ return NULL;
+}
+#endif
+
+errcode_t ext2fs_rw_bitmaps(ext2_filsys fs, int flags, int num_threads)
+{
+#ifdef HAVE_PTHREAD
+ pthread_attr_t attr;
+ pthread_t *thread_ids = NULL;
+ struct read_bitmaps_thread_info *thread_infos = NULL;
+ pthread_mutex_t rbt_mutex = PTHREAD_MUTEX_INITIALIZER;
+ errcode_t retval;
+ errcode_t rc;
+ unsigned flexbg_size = 1U << fs->super->s_log_groups_per_flex;
+ dgrp_t average_group;
+ int i, tail_flags = 0;
+#endif
+
+ if (flags & ~EXT2FS_BITMAPS_VALID_FLAGS)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (ext2fs_has_feature_journal_dev(fs->super))
+ return EXT2_ET_EXTERNAL_JOURNAL_NOSUPP;
+
+ if (flags & EXT2FS_BITMAPS_WRITE)
+ return write_bitmaps(fs, flags & EXT2FS_BITMAPS_INODE,
+ flags & EXT2FS_BITMAPS_BLOCK);
+
+#ifdef HAVE_PTHREAD
+ if (((fs->io->flags & CHANNEL_FLAGS_THREADS) == 0) ||
+ (num_threads == 1) || (fs->flags & EXT2_FLAG_IMAGE_FILE))
+ goto fallback;
+
+#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF)
+ if (num_threads < 0)
+ num_threads = sysconf(_SC_NPROCESSORS_CONF);
+#endif
+ /*
+ * Guess for now; eventually we should probably define
+ * ext2fs_get_num_cpus() and teach it how to get this info on
+ * MacOS, FreeBSD, etc.
+ * ref: https://stackoverflow.com/questions/150355
+ */
+ if (num_threads < 0)
+ num_threads = 4;
+
+ if ((unsigned) num_threads > fs->group_desc_count)
+ num_threads = fs->group_desc_count;
+ average_group = fs->group_desc_count / num_threads;
+ if (ext2fs_has_feature_flex_bg(fs->super)) {
+ average_group = (average_group / flexbg_size) * flexbg_size;
+ }
+ if ((num_threads <= 1) || (average_group == 0))
+ goto fallback;
+
+ io_channel_set_options(fs->io, "cache=off");
+ retval = pthread_attr_init(&attr);
+ if (retval)
+ return retval;
+
+ thread_ids = calloc(sizeof(pthread_t), num_threads);
+ if (!thread_ids)
+ return ENOMEM;
+
+ thread_infos = calloc(sizeof(struct read_bitmaps_thread_info),
+ num_threads);
+ if (!thread_infos)
+ goto out;
+
+ retval = read_bitmaps_range_prepare(fs, flags);
+ if (retval)
+ goto out;
+
+// fprintf(stdout, "Multiple threads triggered to read bitmaps\n");
+ for (i = 0; i < num_threads; i++) {
+ thread_infos[i].rbt_fs = fs;
+ thread_infos[i].rbt_flags = flags;
+ thread_infos[i].rbt_mutex = &rbt_mutex;
+ thread_infos[i].rbt_tail_flags = 0;
+ if (i == 0)
+ thread_infos[i].rbt_grp_start = 0;
+ else
+ thread_infos[i].rbt_grp_start = average_group * i + 1;
+
+ if (i == num_threads - 1)
+ thread_infos[i].rbt_grp_end = fs->group_desc_count - 1;
+ else
+ thread_infos[i].rbt_grp_end = average_group * (i + 1);
+ retval = pthread_create(&thread_ids[i], &attr,
+ &read_bitmaps_thread, &thread_infos[i]);
+ if (retval)
+ break;
+ }
+ for (i = 0; i < num_threads; i++) {
+ if (!thread_ids[i])
+ break;
+ rc = pthread_join(thread_ids[i], NULL);
+ if (rc && !retval)
+ retval = rc;
+ rc = thread_infos[i].rbt_retval;
+ if (rc && !retval)
+ retval = rc;
+ tail_flags |= thread_infos[i].rbt_tail_flags;
+ }
+out:
+ rc = pthread_attr_destroy(&attr);
+ if (rc && !retval)
+ retval = rc;
+ free(thread_infos);
+ free(thread_ids);
+
+ if (retval == 0)
+ retval = read_bitmaps_range_end(fs, flags, tail_flags);
+ if (retval)
+ read_bitmaps_cleanup_on_error(fs, flags);
+ /* XXX should save and restore cache setting */
+ io_channel_set_options(fs->io, "cache=on");
+ return retval;
+fallback:
+#endif /* HAVE_PTHREAD */
+ return read_bitmaps_range(fs, flags, 0, fs->group_desc_count - 1);
+}
+
+errcode_t ext2fs_read_inode_bitmap(ext2_filsys fs)
+{
+ return ext2fs_rw_bitmaps(fs, EXT2FS_BITMAPS_INODE, -1);
+}
+
+errcode_t ext2fs_read_block_bitmap(ext2_filsys fs)
+{
+ return ext2fs_rw_bitmaps(fs, EXT2FS_BITMAPS_BLOCK, -1);
+}
+
+errcode_t ext2fs_write_inode_bitmap(ext2_filsys fs)
+{
+ return write_bitmaps(fs, 1, 0);
+}
+
+errcode_t ext2fs_write_block_bitmap (ext2_filsys fs)
+{
+ return write_bitmaps(fs, 0, 1);
+}
+
+errcode_t ext2fs_read_bitmaps(ext2_filsys fs)
+{
+ int flags = 0;
+
+ if (!fs->inode_map)
+ flags |= EXT2FS_BITMAPS_INODE;
+ if (!fs->block_map)
+ flags |= EXT2FS_BITMAPS_BLOCK;
+ if (flags == 0)
+ return 0;
+ return ext2fs_rw_bitmaps(fs, flags, -1);
+}
+
+errcode_t ext2fs_write_bitmaps(ext2_filsys fs)
+{
+ int do_inode = fs->inode_map && ext2fs_test_ib_dirty(fs);
+ int do_block = fs->block_map && ext2fs_test_bb_dirty(fs);
+
+ if (!do_inode && !do_block)
+ return 0;
+
+ return write_bitmaps(fs, do_inode, do_block);
+}
diff --git a/lib/ext2fs/sha256.c b/lib/ext2fs/sha256.c
new file mode 100644
index 0000000..b1506e2
--- /dev/null
+++ b/lib/ext2fs/sha256.c
@@ -0,0 +1,254 @@
+/*
+ * sha256.c --- The sh256 algorithm
+ *
+ * Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+ * (copied from libtomcrypt and then relicensed under GPLv2)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+
+#include "config.h"
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include "ext2fs.h"
+
+static const __u32 K[64] = {
+ 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL,
+ 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL,
+ 0x243185beUL, 0x550c7dc3UL, 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL,
+ 0xc19bf174UL, 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
+ 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, 0x983e5152UL,
+ 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, 0xc6e00bf3UL, 0xd5a79147UL,
+ 0x06ca6351UL, 0x14292967UL, 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL,
+ 0x53380d13UL, 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
+ 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, 0xd192e819UL,
+ 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, 0x19a4c116UL, 0x1e376c08UL,
+ 0x2748774cUL, 0x34b0bcb5UL, 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL,
+ 0x682e6ff3UL, 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
+ 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
+};
+
+/* Various logical functions */
+#define Ch(x,y,z) (z ^ (x & (y ^ z)))
+#define Maj(x,y,z) (((x | y) & z) | (x & y))
+#define S(x, n) RORc((x),(n))
+#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n))
+#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))
+#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25))
+#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3))
+#define Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10))
+#define RORc(x, y) ( ((((__u32)(x)&0xFFFFFFFFUL)>>(__u32)((y)&31)) | ((__u32)(x)<<(__u32)(32-((y)&31)))) & 0xFFFFFFFFUL)
+
+#define RND(a,b,c,d,e,f,g,h,i) \
+ t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \
+ t1 = Sigma0(a) + Maj(a, b, c); \
+ d += t0; \
+ h = t0 + t1;
+
+#define STORE64H(x, y) \
+ do { \
+ (y)[0] = (unsigned char)(((x)>>56)&255);\
+ (y)[1] = (unsigned char)(((x)>>48)&255);\
+ (y)[2] = (unsigned char)(((x)>>40)&255);\
+ (y)[3] = (unsigned char)(((x)>>32)&255);\
+ (y)[4] = (unsigned char)(((x)>>24)&255);\
+ (y)[5] = (unsigned char)(((x)>>16)&255);\
+ (y)[6] = (unsigned char)(((x)>>8)&255);\
+ (y)[7] = (unsigned char)((x)&255); } while(0)
+
+#define STORE32H(x, y) \
+ do { (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \
+ (y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); } while(0)
+
+#define LOAD32H(x, y) \
+ do { x = ((__u32)((y)[0] & 255)<<24) | \
+ ((__u32)((y)[1] & 255)<<16) | \
+ ((__u32)((y)[2] & 255)<<8) | \
+ ((__u32)((y)[3] & 255)); } while(0)
+
+struct sha256_state {
+ __u64 length;
+ __u32 state[8], curlen;
+ unsigned char buf[64];
+};
+
+/* This is a highly simplified version from libtomcrypt */
+struct hash_state {
+ struct sha256_state sha256;
+};
+
+static void sha256_compress(struct hash_state * md, const unsigned char *buf)
+{
+ __u32 S[8], W[64], t0, t1;
+ __u32 t;
+ int i;
+
+ /* copy state into S */
+ for (i = 0; i < 8; i++) {
+ S[i] = md->sha256.state[i];
+ }
+
+ /* copy the state into 512-bits into W[0..15] */
+ for (i = 0; i < 16; i++) {
+ LOAD32H(W[i], buf + (4*i));
+ }
+
+ /* fill W[16..63] */
+ for (i = 16; i < 64; i++) {
+ W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16];
+ }
+
+ /* Compress */
+ for (i = 0; i < 64; ++i) {
+ RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i);
+ t = S[7]; S[7] = S[6]; S[6] = S[5]; S[5] = S[4];
+ S[4] = S[3]; S[3] = S[2]; S[2] = S[1]; S[1] = S[0]; S[0] = t;
+ }
+
+ /* feedback */
+ for (i = 0; i < 8; i++) {
+ md->sha256.state[i] = md->sha256.state[i] + S[i];
+ }
+}
+
+static void sha256_init(struct hash_state * md)
+{
+ md->sha256.curlen = 0;
+ md->sha256.length = 0;
+ md->sha256.state[0] = 0x6A09E667UL;
+ md->sha256.state[1] = 0xBB67AE85UL;
+ md->sha256.state[2] = 0x3C6EF372UL;
+ md->sha256.state[3] = 0xA54FF53AUL;
+ md->sha256.state[4] = 0x510E527FUL;
+ md->sha256.state[5] = 0x9B05688CUL;
+ md->sha256.state[6] = 0x1F83D9ABUL;
+ md->sha256.state[7] = 0x5BE0CD19UL;
+}
+
+#define MIN(x, y) ( ((x)<(y))?(x):(y) )
+#define SHA256_BLOCKSIZE 64
+static void sha256_process(struct hash_state * md, const unsigned char *in, unsigned long inlen)
+{
+ unsigned long n;
+
+ while (inlen > 0) {
+ if (md->sha256.curlen == 0 && inlen >= SHA256_BLOCKSIZE) {
+ sha256_compress(md, in);
+ md->sha256.length += SHA256_BLOCKSIZE * 8;
+ in += SHA256_BLOCKSIZE;
+ inlen -= SHA256_BLOCKSIZE;
+ } else {
+ n = MIN(inlen, (SHA256_BLOCKSIZE - md->sha256.curlen));
+ memcpy(md->sha256.buf + md->sha256.curlen, in, (size_t)n);
+ md->sha256.curlen += n;
+ in += n;
+ inlen -= n;
+ if (md->sha256.curlen == SHA256_BLOCKSIZE) {
+ sha256_compress(md, md->sha256.buf);
+ md->sha256.length += 8*SHA256_BLOCKSIZE;
+ md->sha256.curlen = 0;
+ }
+ }
+ }
+}
+
+
+static void sha256_done(struct hash_state * md, unsigned char *out)
+{
+ int i;
+
+ /* increase the length of the message */
+ md->sha256.length += md->sha256.curlen * 8;
+
+ /* append the '1' bit */
+ md->sha256.buf[md->sha256.curlen++] = (unsigned char)0x80;
+
+ /* if the length is currently above 56 bytes we append zeros
+ * then compress. Then we can fall back to padding zeros and length
+ * encoding like normal.
+ */
+ if (md->sha256.curlen > 56) {
+ while (md->sha256.curlen < 64) {
+ md->sha256.buf[md->sha256.curlen++] = (unsigned char)0;
+ }
+ sha256_compress(md, md->sha256.buf);
+ md->sha256.curlen = 0;
+ }
+
+ /* pad up to 56 bytes of zeroes */
+ while (md->sha256.curlen < 56) {
+ md->sha256.buf[md->sha256.curlen++] = (unsigned char)0;
+ }
+
+ /* store length */
+ STORE64H(md->sha256.length, md->sha256.buf+56);
+ sha256_compress(md, md->sha256.buf);
+
+ /* copy output */
+ for (i = 0; i < 8; i++) {
+ STORE32H(md->sha256.state[i], out+(4*i));
+ }
+}
+
+void ext2fs_sha256(const unsigned char *in, unsigned long in_size,
+ unsigned char out[EXT2FS_SHA256_LENGTH])
+{
+ struct hash_state md;
+
+ sha256_init(&md);
+ sha256_process(&md, in, in_size);
+ sha256_done(&md, out);
+}
+
+#ifdef UNITTEST
+static const struct {
+ char *msg;
+ unsigned char hash[32];
+} tests[] = {
+ { "",
+ { 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14,
+ 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24,
+ 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c,
+ 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55 }
+ },
+ { "abc",
+ { 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
+ 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
+ 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c,
+ 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad }
+ },
+ { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+ { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8,
+ 0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39,
+ 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67,
+ 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 }
+ },
+};
+
+int main(int argc, char **argv)
+{
+ int i;
+ int errors = 0;
+ unsigned char tmp[32];
+
+ for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) {
+ unsigned char *msg = (unsigned char *) tests[i].msg;
+ int len = strlen(tests[i].msg);
+
+ ext2fs_sha256(msg, len, tmp);
+ printf("SHA256 test message %d: ", i);
+ if (memcmp(tmp, tests[i].hash, 32) != 0) {
+ printf("FAILED\n");
+ errors++;
+ } else
+ printf("OK\n");
+ }
+ return errors;
+}
+
+#endif /* UNITTEST */
diff --git a/lib/ext2fs/sha512.c b/lib/ext2fs/sha512.c
new file mode 100644
index 0000000..f246afb
--- /dev/null
+++ b/lib/ext2fs/sha512.c
@@ -0,0 +1,302 @@
+/*
+ * sha512.c --- The sha512 algorithm
+ *
+ * Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+ * (copied from libtomcrypt and then relicensed under GPLv2)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+
+#include "config.h"
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include "ext2fs.h"
+
+/* the K array */
+#define CONST64(n) n
+static const __u64 K[80] = {
+ CONST64(0x428a2f98d728ae22), CONST64(0x7137449123ef65cd),
+ CONST64(0xb5c0fbcfec4d3b2f), CONST64(0xe9b5dba58189dbbc),
+ CONST64(0x3956c25bf348b538), CONST64(0x59f111f1b605d019),
+ CONST64(0x923f82a4af194f9b), CONST64(0xab1c5ed5da6d8118),
+ CONST64(0xd807aa98a3030242), CONST64(0x12835b0145706fbe),
+ CONST64(0x243185be4ee4b28c), CONST64(0x550c7dc3d5ffb4e2),
+ CONST64(0x72be5d74f27b896f), CONST64(0x80deb1fe3b1696b1),
+ CONST64(0x9bdc06a725c71235), CONST64(0xc19bf174cf692694),
+ CONST64(0xe49b69c19ef14ad2), CONST64(0xefbe4786384f25e3),
+ CONST64(0x0fc19dc68b8cd5b5), CONST64(0x240ca1cc77ac9c65),
+ CONST64(0x2de92c6f592b0275), CONST64(0x4a7484aa6ea6e483),
+ CONST64(0x5cb0a9dcbd41fbd4), CONST64(0x76f988da831153b5),
+ CONST64(0x983e5152ee66dfab), CONST64(0xa831c66d2db43210),
+ CONST64(0xb00327c898fb213f), CONST64(0xbf597fc7beef0ee4),
+ CONST64(0xc6e00bf33da88fc2), CONST64(0xd5a79147930aa725),
+ CONST64(0x06ca6351e003826f), CONST64(0x142929670a0e6e70),
+ CONST64(0x27b70a8546d22ffc), CONST64(0x2e1b21385c26c926),
+ CONST64(0x4d2c6dfc5ac42aed), CONST64(0x53380d139d95b3df),
+ CONST64(0x650a73548baf63de), CONST64(0x766a0abb3c77b2a8),
+ CONST64(0x81c2c92e47edaee6), CONST64(0x92722c851482353b),
+ CONST64(0xa2bfe8a14cf10364), CONST64(0xa81a664bbc423001),
+ CONST64(0xc24b8b70d0f89791), CONST64(0xc76c51a30654be30),
+ CONST64(0xd192e819d6ef5218), CONST64(0xd69906245565a910),
+ CONST64(0xf40e35855771202a), CONST64(0x106aa07032bbd1b8),
+ CONST64(0x19a4c116b8d2d0c8), CONST64(0x1e376c085141ab53),
+ CONST64(0x2748774cdf8eeb99), CONST64(0x34b0bcb5e19b48a8),
+ CONST64(0x391c0cb3c5c95a63), CONST64(0x4ed8aa4ae3418acb),
+ CONST64(0x5b9cca4f7763e373), CONST64(0x682e6ff3d6b2b8a3),
+ CONST64(0x748f82ee5defb2fc), CONST64(0x78a5636f43172f60),
+ CONST64(0x84c87814a1f0ab72), CONST64(0x8cc702081a6439ec),
+ CONST64(0x90befffa23631e28), CONST64(0xa4506cebde82bde9),
+ CONST64(0xbef9a3f7b2c67915), CONST64(0xc67178f2e372532b),
+ CONST64(0xca273eceea26619c), CONST64(0xd186b8c721c0c207),
+ CONST64(0xeada7dd6cde0eb1e), CONST64(0xf57d4f7fee6ed178),
+ CONST64(0x06f067aa72176fba), CONST64(0x0a637dc5a2c898a6),
+ CONST64(0x113f9804bef90dae), CONST64(0x1b710b35131c471b),
+ CONST64(0x28db77f523047d84), CONST64(0x32caab7b40c72493),
+ CONST64(0x3c9ebe0a15c9bebc), CONST64(0x431d67c49c100d4c),
+ CONST64(0x4cc5d4becb3e42b6), CONST64(0x597f299cfc657e2a),
+ CONST64(0x5fcb6fab3ad6faec), CONST64(0x6c44198c4a475817)
+};
+#define Ch(x,y,z) (z ^ (x & (y ^ z)))
+#define Maj(x,y,z) (((x | y) & z) | (x & y))
+#define S(x, n) ROR64c(x, n)
+#define R(x, n) (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((__u64)n))
+#define Sigma0(x) (S(x, 28) ^ S(x, 34) ^ S(x, 39))
+#define Sigma1(x) (S(x, 14) ^ S(x, 18) ^ S(x, 41))
+#define Gamma0(x) (S(x, 1) ^ S(x, 8) ^ R(x, 7))
+#define Gamma1(x) (S(x, 19) ^ S(x, 61) ^ R(x, 6))
+#define RND(a,b,c,d,e,f,g,h,i)\
+ t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i];\
+ t1 = Sigma0(a) + Maj(a, b, c);\
+ d += t0;\
+ h = t0 + t1;
+#define STORE64H(x, y) \
+ do { \
+ (y)[0] = (unsigned char)(((x)>>56)&255);\
+ (y)[1] = (unsigned char)(((x)>>48)&255);\
+ (y)[2] = (unsigned char)(((x)>>40)&255);\
+ (y)[3] = (unsigned char)(((x)>>32)&255);\
+ (y)[4] = (unsigned char)(((x)>>24)&255);\
+ (y)[5] = (unsigned char)(((x)>>16)&255);\
+ (y)[6] = (unsigned char)(((x)>>8)&255);\
+ (y)[7] = (unsigned char)((x)&255); } while(0)
+
+#define LOAD64H(x, y)\
+ do {x = \
+ (((__u64)((y)[0] & 255)) << 56) |\
+ (((__u64)((y)[1] & 255)) << 48) |\
+ (((__u64)((y)[2] & 255)) << 40) |\
+ (((__u64)((y)[3] & 255)) << 32) |\
+ (((__u64)((y)[4] & 255)) << 24) |\
+ (((__u64)((y)[5] & 255)) << 16) |\
+ (((__u64)((y)[6] & 255)) << 8) |\
+ (((__u64)((y)[7] & 255)));\
+ } while(0)
+
+#define ROR64c(x, y) \
+ ( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((__u64)(y)&CONST64(63))) | \
+ ((x)<<((__u64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF))
+
+struct sha512_state {
+ __u64 length, state[8];
+ unsigned long curlen;
+ unsigned char buf[128];
+};
+
+/* This is a highly simplified version from libtomcrypt */
+struct hash_state {
+ struct sha512_state sha512;
+};
+
+static void sha512_compress(struct hash_state * md, const unsigned char *buf)
+{
+ __u64 S[8], W[80], t0, t1;
+ int i;
+
+ /* copy state into S */
+ for (i = 0; i < 8; i++) {
+ S[i] = md->sha512.state[i];
+ }
+
+ /* copy the state into 1024-bits into W[0..15] */
+ for (i = 0; i < 16; i++) {
+ LOAD64H(W[i], buf + (8*i));
+ }
+
+ /* fill W[16..79] */
+ for (i = 16; i < 80; i++) {
+ W[i] = Gamma1(W[i - 2]) + W[i - 7] +
+ Gamma0(W[i - 15]) + W[i - 16];
+ }
+
+ for (i = 0; i < 80; i += 8) {
+ RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i+0);
+ RND(S[7],S[0],S[1],S[2],S[3],S[4],S[5],S[6],i+1);
+ RND(S[6],S[7],S[0],S[1],S[2],S[3],S[4],S[5],i+2);
+ RND(S[5],S[6],S[7],S[0],S[1],S[2],S[3],S[4],i+3);
+ RND(S[4],S[5],S[6],S[7],S[0],S[1],S[2],S[3],i+4);
+ RND(S[3],S[4],S[5],S[6],S[7],S[0],S[1],S[2],i+5);
+ RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],i+6);
+ RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],i+7);
+ }
+
+ /* feedback */
+ for (i = 0; i < 8; i++) {
+ md->sha512.state[i] = md->sha512.state[i] + S[i];
+ }
+}
+
+static void sha512_init(struct hash_state * md)
+{
+ md->sha512.curlen = 0;
+ md->sha512.length = 0;
+ md->sha512.state[0] = CONST64(0x6a09e667f3bcc908);
+ md->sha512.state[1] = CONST64(0xbb67ae8584caa73b);
+ md->sha512.state[2] = CONST64(0x3c6ef372fe94f82b);
+ md->sha512.state[3] = CONST64(0xa54ff53a5f1d36f1);
+ md->sha512.state[4] = CONST64(0x510e527fade682d1);
+ md->sha512.state[5] = CONST64(0x9b05688c2b3e6c1f);
+ md->sha512.state[6] = CONST64(0x1f83d9abfb41bd6b);
+ md->sha512.state[7] = CONST64(0x5be0cd19137e2179);
+}
+
+static void sha512_done(struct hash_state * md, unsigned char *out)
+{
+ int i;
+
+ /* increase the length of the message */
+ md->sha512.length += md->sha512.curlen * CONST64(8);
+
+ /* append the '1' bit */
+ md->sha512.buf[md->sha512.curlen++] = (unsigned char)0x80;
+
+ /* if the length is currently above 112 bytes we append zeros then
+ * compress. Then we can fall back to padding zeros and length encoding
+ * like normal. */
+ if (md->sha512.curlen > 112) {
+ while (md->sha512.curlen < 128) {
+ md->sha512.buf[md->sha512.curlen++] = (unsigned char)0;
+ }
+ sha512_compress(md, md->sha512.buf);
+ md->sha512.curlen = 0;
+ }
+
+ /* pad up to 120 bytes of zeroes note: that from 112 to 120 is the 64 MSB
+ * of the length. We assume that you won't hash > 2^64 bits of data. */
+ while (md->sha512.curlen < 120) {
+ md->sha512.buf[md->sha512.curlen++] = (unsigned char)0;
+ }
+
+ /* store length */
+ STORE64H(md->sha512.length, md->sha512.buf + 120);
+ sha512_compress(md, md->sha512.buf);
+
+ /* copy output */
+ for (i = 0; i < 8; i++) {
+ STORE64H(md->sha512.state[i], out+(8 * i));
+ }
+}
+
+#define MIN(x, y) ( ((x)<(y))?(x):(y) )
+#define SHA512_BLOCKSIZE 128
+static void sha512_process(struct hash_state * md,
+ const unsigned char *in,
+ unsigned long inlen)
+{
+ unsigned long n;
+
+ while (inlen > 0) {
+ if (md->sha512.curlen == 0 && inlen >= SHA512_BLOCKSIZE) {
+ sha512_compress(md, in);
+ md->sha512.length += SHA512_BLOCKSIZE * 8;
+ in += SHA512_BLOCKSIZE;
+ inlen -= SHA512_BLOCKSIZE;
+ } else {
+ n = MIN(inlen, (SHA512_BLOCKSIZE - md->sha512.curlen));
+ memcpy(md->sha512.buf + md->sha512.curlen,
+ in, (size_t)n);
+ md->sha512.curlen += n;
+ in += n;
+ inlen -= n;
+ if (md->sha512.curlen == SHA512_BLOCKSIZE) {
+ sha512_compress(md, md->sha512.buf);
+ md->sha512.length += SHA512_BLOCKSIZE * 8;
+ md->sha512.curlen = 0;
+ }
+ }
+ }
+}
+
+void ext2fs_sha512(const unsigned char *in, unsigned long in_size,
+ unsigned char out[EXT2FS_SHA512_LENGTH])
+{
+ struct hash_state md;
+
+ sha512_init(&md);
+ sha512_process(&md, in, in_size);
+ sha512_done(&md, out);
+}
+
+#ifdef UNITTEST
+static const struct {
+ char *msg;
+ unsigned char hash[64];
+} tests[] = {
+ { "",
+ { 0xcf, 0x83, 0xe1, 0x35, 0x7e, 0xef, 0xb8, 0xbd,
+ 0xf1, 0x54, 0x28, 0x50, 0xd6, 0x6d, 0x80, 0x07,
+ 0xd6, 0x20, 0xe4, 0x05, 0x0b, 0x57, 0x15, 0xdc,
+ 0x83, 0xf4, 0xa9, 0x21, 0xd3, 0x6c, 0xe9, 0xce,
+ 0x47, 0xd0, 0xd1, 0x3c, 0x5d, 0x85, 0xf2, 0xb0,
+ 0xff, 0x83, 0x18, 0xd2, 0x87, 0x7e, 0xec, 0x2f,
+ 0x63, 0xb9, 0x31, 0xbd, 0x47, 0x41, 0x7a, 0x81,
+ 0xa5, 0x38, 0x32, 0x7a, 0xf9, 0x27, 0xda, 0x3e }
+ },
+ { "abc",
+ { 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba,
+ 0xcc, 0x41, 0x73, 0x49, 0xae, 0x20, 0x41, 0x31,
+ 0x12, 0xe6, 0xfa, 0x4e, 0x89, 0xa9, 0x7e, 0xa2,
+ 0x0a, 0x9e, 0xee, 0xe6, 0x4b, 0x55, 0xd3, 0x9a,
+ 0x21, 0x92, 0x99, 0x2a, 0x27, 0x4f, 0xc1, 0xa8,
+ 0x36, 0xba, 0x3c, 0x23, 0xa3, 0xfe, 0xeb, 0xbd,
+ 0x45, 0x4d, 0x44, 0x23, 0x64, 0x3c, 0xe8, 0x0e,
+ 0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f }
+ },
+ { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
+ { 0x8e, 0x95, 0x9b, 0x75, 0xda, 0xe3, 0x13, 0xda,
+ 0x8c, 0xf4, 0xf7, 0x28, 0x14, 0xfc, 0x14, 0x3f,
+ 0x8f, 0x77, 0x79, 0xc6, 0xeb, 0x9f, 0x7f, 0xa1,
+ 0x72, 0x99, 0xae, 0xad, 0xb6, 0x88, 0x90, 0x18,
+ 0x50, 0x1d, 0x28, 0x9e, 0x49, 0x00, 0xf7, 0xe4,
+ 0x33, 0x1b, 0x99, 0xde, 0xc4, 0xb5, 0x43, 0x3a,
+ 0xc7, 0xd3, 0x29, 0xee, 0xb6, 0xdd, 0x26, 0x54,
+ 0x5e, 0x96, 0xe5, 0x5b, 0x87, 0x4b, 0xe9, 0x09 }
+ },
+};
+
+int main(int argc, char **argv)
+{
+ int i;
+ int errors = 0;
+ unsigned char tmp[64];
+
+ for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) {
+ unsigned char *msg = (unsigned char *) tests[i].msg;
+ int len = strlen(tests[i].msg);
+
+ ext2fs_sha512(msg, len, tmp);
+ printf("SHA512 test message %d: ", i);
+ if (memcmp(tmp, tests[i].hash, 64) != 0) {
+ printf("FAILED\n");
+ errors++;
+ } else
+ printf("OK\n");
+ }
+ return errors;
+}
+
+#endif /* UNITTEST */
diff --git a/lib/ext2fs/sparse_io.c b/lib/ext2fs/sparse_io.c
new file mode 100644
index 0000000..f287e76
--- /dev/null
+++ b/lib/ext2fs/sparse_io.c
@@ -0,0 +1,554 @@
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdint.h>
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#if !defined(ENABLE_LIBSPARSE)
+static errcode_t sparse_open(const char *name EXT2FS_ATTR((unused)),
+ int flags EXT2FS_ATTR((unused)),
+ io_channel *channel EXT2FS_ATTR((unused)))
+{
+ return EXT2_ET_UNIMPLEMENTED;
+}
+static errcode_t sparse_close(io_channel channel EXT2FS_ATTR((unused)))
+{
+ return EXT2_ET_UNIMPLEMENTED;
+}
+static struct struct_io_manager struct_sparse_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Android sparse I/O Manager",
+ .open = sparse_open,
+ .close = sparse_close,
+};
+static struct struct_io_manager struct_sparsefd_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Android sparse fd I/O Manager",
+ .open = sparse_open,
+ .close = sparse_close,
+};
+#else
+#include <sparse/sparse.h>
+
+struct sparse_map {
+ int fd;
+ char **blocks;
+ int block_size;
+ uint64_t blocks_count;
+ char *file;
+ struct sparse_file *sparse_file;
+ io_channel channel;
+};
+
+struct sparse_io_params {
+ int fd;
+ char *file;
+ uint64_t blocks_count;
+ unsigned int block_size;
+};
+
+static errcode_t sparse_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf);
+
+static void free_sparse_blocks(struct sparse_map *sm)
+{
+ uint64_t i;
+
+ for (i = 0; i < sm->blocks_count; ++i)
+ free(sm->blocks[i]);
+ free(sm->blocks);
+ sm->blocks = NULL;
+}
+
+static int sparse_import_segment(void *priv, const void *data, size_t len,
+ unsigned int block, unsigned int nr_blocks)
+{
+ struct sparse_map *sm = priv;
+
+ /* Ignore chunk headers, only write the data */
+ if (!nr_blocks || len % sm->block_size)
+ return 0;
+
+ return sparse_write_blk(sm->channel, block, nr_blocks, data);
+}
+
+static errcode_t io_manager_import_sparse(struct sparse_io_params *params,
+ struct sparse_map *sm, io_channel io)
+{
+ int fd;
+ errcode_t retval;
+ struct sparse_file *sparse_file;
+
+ if (params->fd < 0) {
+ fd = open(params->file, O_RDONLY);
+ if (fd < 0) {
+ retval = -1;
+ goto err_open;
+ }
+ } else
+ fd = params->fd;
+ sparse_file = sparse_file_import(fd, false, false);
+ if (!sparse_file) {
+ retval = -1;
+ goto err_sparse;
+ }
+
+ sm->block_size = sparse_file_block_size(sparse_file);
+ sm->blocks_count = (sparse_file_len(sparse_file, 0, 0) - 1)
+ / sm->block_size + 1;
+ sm->blocks = calloc(sm->blocks_count, sizeof(char*));
+ if (!sm->blocks) {
+ retval = -1;
+ goto err_alloc;
+ }
+ io->block_size = sm->block_size;
+
+ retval = sparse_file_foreach_chunk(sparse_file, true, false,
+ sparse_import_segment, sm);
+
+ if (retval)
+ free_sparse_blocks(sm);
+err_alloc:
+ sparse_file_destroy(sparse_file);
+err_sparse:
+ close(fd);
+err_open:
+ return retval;
+}
+
+static errcode_t io_manager_configure(struct sparse_io_params *params,
+ int flags, io_channel io)
+{
+ errcode_t retval;
+ uint64_t img_size;
+ struct sparse_map *sm = calloc(1, sizeof(*sm));
+ if (!sm)
+ return EXT2_ET_NO_MEMORY;
+
+ sm->file = params->file;
+ sm->channel = io;
+ io->private_data = sm;
+ retval = io_manager_import_sparse(params, sm, io);
+ if (retval) {
+ if (!params->block_size || !params->blocks_count) {
+ retval = EINVAL;
+ goto err_params;
+ }
+ sm->block_size = params->block_size;
+ sm->blocks_count = params->blocks_count;
+ sm->blocks = calloc(params->blocks_count, sizeof(void*));
+ if (!sm->blocks) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto err_alloc;
+ }
+ }
+ io->block_size = sm->block_size;
+ img_size = (uint64_t)sm->block_size * sm->blocks_count;
+
+ if (flags & IO_FLAG_RW) {
+ sm->sparse_file = sparse_file_new(sm->block_size, img_size);
+ if (!sm->sparse_file) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto err_alloc;
+ }
+ if (params->fd < 0) {
+ sm->fd = open(params->file, O_CREAT | O_RDWR | O_TRUNC | O_BINARY,
+ 0644);
+ if (sm->fd < 0) {
+ retval = errno;
+ goto err_open;
+ }
+ } else
+ sm->fd = params->fd;
+ } else {
+ sm->fd = -1;
+ sm->sparse_file = NULL;
+ }
+ return 0;
+
+err_open:
+ sparse_file_destroy(sm->sparse_file);
+err_alloc:
+ free_sparse_blocks(sm);
+err_params:
+ free(sm);
+ return retval;
+}
+
+static errcode_t sparse_open_channel(struct sparse_io_params *sparse_params,
+ int flags, io_channel *channel)
+{
+ errcode_t retval;
+ io_channel io;
+
+ io = calloc(1, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ io->block_size = 0;
+ io->refcount = 1;
+
+ retval = io_manager_configure(sparse_params, flags, io);
+ if (retval) {
+ free(io);
+ return retval;
+ }
+
+ *channel = io;
+ return 0;
+}
+
+static errcode_t read_sparse_argv(const char *name, bool is_fd,
+ struct sparse_io_params *sparse_params)
+{
+ int ret;
+ sparse_params->fd = -1;
+ sparse_params->block_size = 0;
+ sparse_params->blocks_count = 0;
+
+ sparse_params->file = malloc(strlen(name) + 1);
+ if (!sparse_params->file) {
+ fprintf(stderr, "failed to alloc %zu\n", strlen(name) + 1);
+ return EXT2_ET_NO_MEMORY;
+ }
+
+ if (is_fd) {
+ ret = sscanf(name, "(%d):%llu:%u", &sparse_params->fd,
+ (unsigned long long *)&sparse_params->blocks_count,
+ &sparse_params->block_size);
+ } else {
+ ret = sscanf(name, "(%[^)])%*[:]%llu%*[:]%u", sparse_params->file,
+ (unsigned long long *)&sparse_params->blocks_count,
+ &sparse_params->block_size);
+ }
+
+ if (ret < 1) {
+ free(sparse_params->file);
+ return EINVAL;
+ }
+ return 0;
+}
+
+static errcode_t sparse_open(const char *name, int flags, io_channel *channel)
+{
+ errcode_t retval;
+ struct sparse_io_params sparse_params;
+
+ retval = read_sparse_argv(name, false, &sparse_params);
+ if (retval)
+ return EXT2_ET_BAD_DEVICE_NAME;
+
+ retval = sparse_open_channel(&sparse_params, flags, channel);
+ if (retval)
+ return retval;
+ (*channel)->manager = sparse_io_manager;
+
+ return retval;
+}
+
+static errcode_t sparsefd_open(const char *name, int flags, io_channel *channel)
+{
+ errcode_t retval;
+ struct sparse_io_params sparse_params;
+
+ retval = read_sparse_argv(name, true, &sparse_params);
+ if (retval)
+ return EXT2_ET_BAD_DEVICE_NAME;
+
+ retval = sparse_open_channel(&sparse_params, flags, channel);
+ if (retval)
+ return retval;
+ (*channel)->manager = sparsefd_io_manager;
+
+ return retval;
+}
+
+static errcode_t sparse_merge_blocks(struct sparse_map *sm, uint64_t start,
+ uint64_t num)
+{
+ char *buf;
+ uint64_t i;
+ unsigned int block_size = sm->block_size;
+ errcode_t retval = 0;
+
+ buf = calloc(num, block_size);
+ if (!buf) {
+ fprintf(stderr, "failed to alloc %llu\n",
+ (unsigned long long)num * block_size);
+ return EXT2_ET_NO_MEMORY;
+ }
+
+ for (i = 0; i < num; i++) {
+ memcpy(buf + i * block_size, sm->blocks[start + i] , block_size);
+ free(sm->blocks[start + i]);
+ sm->blocks[start + i] = NULL;
+ }
+
+ /* free_sparse_blocks will release this buf. */
+ sm->blocks[start] = buf;
+
+ retval = sparse_file_add_data(sm->sparse_file, sm->blocks[start],
+ block_size * num, start);
+
+ return retval;
+}
+
+static errcode_t sparse_close_channel(io_channel channel)
+{
+ uint64_t i;
+ errcode_t retval = 0;
+ struct sparse_map *sm = channel->private_data;
+
+ if (sm->sparse_file) {
+ int64_t chunk_start = (sm->blocks[0] == NULL) ? -1 : 0;
+ for (i = 0; i < sm->blocks_count; ++i) {
+ if (!sm->blocks[i] && chunk_start != -1) {
+ retval = sparse_merge_blocks(sm, chunk_start, i - chunk_start);
+ chunk_start = -1;
+ } else if (sm->blocks[i] && chunk_start == -1) {
+ chunk_start = i;
+ }
+ if (retval)
+ goto ret;
+ }
+ if (chunk_start != -1) {
+ retval = sparse_merge_blocks(sm, chunk_start,
+ sm->blocks_count - chunk_start);
+ if (retval)
+ goto ret;
+ }
+ retval = sparse_file_write(sm->sparse_file, sm->fd,
+ /*gzip*/0, /*sparse*/1, /*crc*/0);
+ }
+
+ret:
+ if (sm->sparse_file)
+ sparse_file_destroy(sm->sparse_file);
+ free_sparse_blocks(sm);
+ free(sm->file);
+ free(sm);
+ free(channel);
+ return retval;
+}
+
+static errcode_t sparse_close(io_channel channel)
+{
+ errcode_t retval;
+ struct sparse_map *sm = channel->private_data;
+ int fd = sm->fd;
+
+ retval = sparse_close_channel(channel);
+ if (fd >= 0)
+ close(fd);
+
+ return retval;
+}
+
+static errcode_t sparse_set_blksize(io_channel channel, int blksize)
+{
+ channel->block_size = blksize;
+ return 0;
+}
+
+static blk64_t block_to_sparse_block(blk64_t block, blk64_t *offset,
+ io_channel channel, struct sparse_map *sm)
+{
+ int ratio;
+ blk64_t ret = block;
+
+ ratio = sm->block_size / channel->block_size;
+ ret /= ratio;
+ *offset = (block % ratio) * channel->block_size;
+
+ return ret;
+}
+
+static errcode_t check_block_size(io_channel channel, struct sparse_map *sm)
+{
+ if (sm->block_size >= channel->block_size)
+ return 0;
+ return EXT2_ET_UNEXPECTED_BLOCK_SIZE;
+}
+
+static errcode_t sparse_read_blk64(io_channel channel, blk64_t block,
+ int count, void *buf)
+{
+ int i;
+ char *out = buf;
+ blk64_t offset = 0, cur_block;
+ struct sparse_map *sm = channel->private_data;
+
+ if (check_block_size(channel, sm))
+ return EXT2_ET_UNEXPECTED_BLOCK_SIZE;
+
+ if (count < 0) { //partial read
+ count = -count;
+ cur_block = block_to_sparse_block(block, &offset, channel, sm);
+ if (sm->blocks[cur_block])
+ memcpy(out, (sm->blocks[cur_block]) + offset, count);
+ else
+ memset(out, 0, count);
+ } else {
+ for (i = 0; i < count; ++i) {
+ cur_block = block_to_sparse_block(block + i, &offset,
+ channel, sm);
+ if (sm->blocks[cur_block])
+ memcpy(out + (i * channel->block_size),
+ sm->blocks[cur_block] + offset,
+ channel->block_size);
+ else if (sm->blocks)
+ memset(out + (i * channel->block_size), 0,
+ channel->block_size);
+ }
+ }
+ return 0;
+}
+
+static errcode_t sparse_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ return sparse_read_blk64(channel, block, count, buf);
+}
+
+static errcode_t sparse_write_blk64(io_channel channel, blk64_t block,
+ int count, const void *buf)
+{
+ int i;
+ blk64_t offset = 0, cur_block;
+ const char *in = buf;
+ struct sparse_map *sm = channel->private_data;
+
+ if (check_block_size(channel, sm))
+ return EXT2_ET_UNEXPECTED_BLOCK_SIZE;
+
+ if (count < 0) { //partial write
+ count = -count;
+ cur_block = block_to_sparse_block(block, &offset, channel,
+ sm);
+ if (!sm->blocks[cur_block]) {
+ sm->blocks[cur_block] = calloc(1, sm->block_size);
+ if (!sm->blocks[cur_block])
+ return EXT2_ET_NO_MEMORY;
+ }
+ memcpy(sm->blocks[cur_block] + offset, in, count);
+ } else {
+ for (i = 0; i < count; ++i) {
+ if (block + i >= sm->blocks_count)
+ return 0;
+ cur_block = block_to_sparse_block(block + i, &offset,
+ channel, sm);
+ if (!sm->blocks[cur_block]) {
+ sm->blocks[cur_block] =
+ calloc(1, sm->block_size);
+ if (!sm->blocks[cur_block])
+ return EXT2_ET_NO_MEMORY;
+ }
+ memcpy(sm->blocks[cur_block] + offset,
+ in + (i * channel->block_size),
+ channel->block_size);
+ }
+ }
+ return 0;
+}
+
+static errcode_t sparse_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ return sparse_write_blk64(channel, block, count, buf);
+}
+
+static errcode_t sparse_discard(io_channel channel __attribute__((unused)),
+ blk64_t blk, unsigned long long count)
+{
+ blk64_t cur_block, offset;
+ struct sparse_map *sm = channel->private_data;
+
+ if (check_block_size(channel, sm))
+ return EXT2_ET_UNEXPECTED_BLOCK_SIZE;
+
+ for (unsigned long long i = 0; i < count; ++i) {
+ if (blk + i >= sm->blocks_count)
+ return 0;
+ cur_block = block_to_sparse_block(blk + i, &offset, channel,
+ sm);
+ if (!sm->blocks[cur_block])
+ continue;
+ free(sm->blocks[cur_block]);
+ sm->blocks[cur_block] = NULL;
+ }
+ return 0;
+}
+
+static errcode_t sparse_zeroout(io_channel channel, blk64_t blk,
+ unsigned long long count)
+{
+ return sparse_discard(channel, blk, count);
+}
+
+static errcode_t sparse_flush(io_channel channel __attribute__((unused)))
+{
+ return 0;
+}
+
+static errcode_t sparse_set_option(io_channel channel __attribute__((unused)),
+ const char *option __attribute__((unused)),
+ const char *arg __attribute__((unused)))
+{
+ return 0;
+}
+
+static errcode_t sparse_cache_readahead(
+ io_channel channel __attribute__((unused)),
+ blk64_t blk __attribute__((unused)),
+ unsigned long long count __attribute__((unused)))
+{
+ return 0;
+}
+
+static struct struct_io_manager struct_sparse_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Android sparse I/O Manager",
+ .open = sparse_open,
+ .close = sparse_close,
+ .set_blksize = sparse_set_blksize,
+ .read_blk = sparse_read_blk,
+ .write_blk = sparse_write_blk,
+ .flush = sparse_flush,
+ .write_byte = NULL,
+ .set_option = sparse_set_option,
+ .get_stats = NULL,
+ .read_blk64 = sparse_read_blk64,
+ .write_blk64 = sparse_write_blk64,
+ .discard = sparse_discard,
+ .cache_readahead = sparse_cache_readahead,
+ .zeroout = sparse_zeroout,
+};
+
+static struct struct_io_manager struct_sparsefd_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Android sparse fd I/O Manager",
+ .open = sparsefd_open,
+ .close = sparse_close,
+ .set_blksize = sparse_set_blksize,
+ .read_blk = sparse_read_blk,
+ .write_blk = sparse_write_blk,
+ .flush = sparse_flush,
+ .write_byte = NULL,
+ .set_option = sparse_set_option,
+ .get_stats = NULL,
+ .read_blk64 = sparse_read_blk64,
+ .write_blk64 = sparse_write_blk64,
+ .discard = sparse_discard,
+ .cache_readahead = sparse_cache_readahead,
+ .zeroout = sparse_zeroout,
+};
+
+#endif
+
+io_manager sparse_io_manager = &struct_sparse_manager;
+io_manager sparsefd_io_manager = &struct_sparsefd_manager;
diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
new file mode 100644
index 0000000..fe764b9
--- /dev/null
+++ b/lib/ext2fs/swapfs.c
@@ -0,0 +1,491 @@
+/*
+ * swapfs.c --- swap ext2 filesystem data structures
+ *
+ * Copyright (C) 1995, 1996, 2002 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+#include <ext2fs/ext2_ext_attr.h>
+
+void ext2fs_swap_super(struct ext2_super_block * sb)
+{
+ int i;
+
+ sb->s_inodes_count = ext2fs_swab32(sb->s_inodes_count);
+ sb->s_blocks_count = ext2fs_swab32(sb->s_blocks_count);
+ sb->s_r_blocks_count = ext2fs_swab32(sb->s_r_blocks_count);
+ sb->s_free_blocks_count = ext2fs_swab32(sb->s_free_blocks_count);
+ sb->s_free_inodes_count = ext2fs_swab32(sb->s_free_inodes_count);
+ sb->s_first_data_block = ext2fs_swab32(sb->s_first_data_block);
+ sb->s_log_block_size = ext2fs_swab32(sb->s_log_block_size);
+ sb->s_log_cluster_size = ext2fs_swab32(sb->s_log_cluster_size);
+ sb->s_blocks_per_group = ext2fs_swab32(sb->s_blocks_per_group);
+ sb->s_clusters_per_group = ext2fs_swab32(sb->s_clusters_per_group);
+ sb->s_inodes_per_group = ext2fs_swab32(sb->s_inodes_per_group);
+ sb->s_mtime = ext2fs_swab32(sb->s_mtime);
+ sb->s_wtime = ext2fs_swab32(sb->s_wtime);
+ sb->s_mnt_count = ext2fs_swab16(sb->s_mnt_count);
+ sb->s_max_mnt_count = ext2fs_swab16(sb->s_max_mnt_count);
+ sb->s_magic = ext2fs_swab16(sb->s_magic);
+ sb->s_state = ext2fs_swab16(sb->s_state);
+ sb->s_errors = ext2fs_swab16(sb->s_errors);
+ sb->s_minor_rev_level = ext2fs_swab16(sb->s_minor_rev_level);
+ sb->s_lastcheck = ext2fs_swab32(sb->s_lastcheck);
+ sb->s_checkinterval = ext2fs_swab32(sb->s_checkinterval);
+ sb->s_creator_os = ext2fs_swab32(sb->s_creator_os);
+ sb->s_rev_level = ext2fs_swab32(sb->s_rev_level);
+ sb->s_def_resuid = ext2fs_swab16(sb->s_def_resuid);
+ sb->s_def_resgid = ext2fs_swab16(sb->s_def_resgid);
+ sb->s_first_ino = ext2fs_swab32(sb->s_first_ino);
+ sb->s_inode_size = ext2fs_swab16(sb->s_inode_size);
+ sb->s_block_group_nr = ext2fs_swab16(sb->s_block_group_nr);
+ sb->s_feature_compat = ext2fs_swab32(sb->s_feature_compat);
+ sb->s_feature_incompat = ext2fs_swab32(sb->s_feature_incompat);
+ sb->s_feature_ro_compat = ext2fs_swab32(sb->s_feature_ro_compat);
+ /* sb->s_uuid is __u8 and does not need swabbing */
+ /* sb->s_volume_name is char and does not need swabbing */
+ /* sb->s_last_mounted is char and does not need swabbing */
+ sb->s_algorithm_usage_bitmap = ext2fs_swab32(sb->s_algorithm_usage_bitmap);
+ /* sb->s_prealloc_blocks is __u8 and does not need swabbing */
+ /* sb->s_prealloc_dir_blocks is __u8 and does not need swabbing */
+ sb->s_reserved_gdt_blocks = ext2fs_swab16(sb->s_reserved_gdt_blocks);
+ /* sb->s_journal_uuid is __u8 and does not need swabbing */
+ sb->s_journal_inum = ext2fs_swab32(sb->s_journal_inum);
+ sb->s_journal_dev = ext2fs_swab32(sb->s_journal_dev);
+ sb->s_last_orphan = ext2fs_swab32(sb->s_last_orphan);
+ for (i = 0; i < 4; i++)
+ sb->s_hash_seed[i] = ext2fs_swab32(sb->s_hash_seed[i]);
+ /* sb->s_def_hash_version is __u8 and does not need swabbing */
+ /* sb->s_jnl_backup_type is __u8 and does not need swabbing */
+ sb->s_desc_size = ext2fs_swab16(sb->s_desc_size);
+ sb->s_default_mount_opts = ext2fs_swab32(sb->s_default_mount_opts);
+ sb->s_first_meta_bg = ext2fs_swab32(sb->s_first_meta_bg);
+ sb->s_mkfs_time = ext2fs_swab32(sb->s_mkfs_time);
+ /* if journal backup is for a valid extent-based journal... */
+ if (ext2fs_extent_header_verify(sb->s_jnl_blocks,
+ sizeof(sb->s_jnl_blocks)) == 0) {
+ /* ... swap only the journal i_size and i_size_high,
+ * and the extent data is not swapped on read */
+ i = 15;
+ } else {
+ /* direct/indirect journal: swap it all */
+ i = 0;
+ }
+ for (; i < 17; i++)
+ sb->s_jnl_blocks[i] = ext2fs_swab32(sb->s_jnl_blocks[i]);
+ sb->s_blocks_count_hi = ext2fs_swab32(sb->s_blocks_count_hi);
+ sb->s_r_blocks_count_hi = ext2fs_swab32(sb->s_r_blocks_count_hi);
+ sb->s_free_blocks_hi = ext2fs_swab32(sb->s_free_blocks_hi);
+ sb->s_min_extra_isize = ext2fs_swab16(sb->s_min_extra_isize);
+ sb->s_want_extra_isize = ext2fs_swab16(sb->s_want_extra_isize);
+ sb->s_flags = ext2fs_swab32(sb->s_flags);
+ sb->s_raid_stride = ext2fs_swab16(sb->s_raid_stride);
+ sb->s_mmp_update_interval = ext2fs_swab16(sb->s_mmp_update_interval);
+ sb->s_mmp_block = ext2fs_swab64(sb->s_mmp_block);
+ sb->s_raid_stripe_width = ext2fs_swab32(sb->s_raid_stripe_width);
+ /* sb->s_log_groups_per_flex is __u8 and does not need swabbing */
+ /* sb->s_checksum_type is __u8 and does not need swabbing */
+ /* sb->s_encryption_level is __u8 and does not need swabbing */
+ /* sb->s_reserved_pad is __u8 and does not need swabbing */
+ sb->s_kbytes_written = ext2fs_swab64(sb->s_kbytes_written);
+ sb->s_snapshot_inum = ext2fs_swab32(sb->s_snapshot_inum);
+ sb->s_snapshot_id = ext2fs_swab32(sb->s_snapshot_id);
+ sb->s_snapshot_r_blocks_count =
+ ext2fs_swab64(sb->s_snapshot_r_blocks_count);
+ sb->s_snapshot_list = ext2fs_swab32(sb->s_snapshot_list);
+ sb->s_error_count = ext2fs_swab32(sb->s_error_count);
+ sb->s_first_error_time = ext2fs_swab32(sb->s_first_error_time);
+ sb->s_first_error_ino = ext2fs_swab32(sb->s_first_error_ino);
+ sb->s_first_error_block = ext2fs_swab64(sb->s_first_error_block);
+ /* sb->s_first_error_func is __u8 and does not need swabbing */
+ sb->s_last_error_time = ext2fs_swab32(sb->s_last_error_time);
+ sb->s_last_error_ino = ext2fs_swab32(sb->s_last_error_ino);
+ sb->s_last_error_block = ext2fs_swab64(sb->s_last_error_block);
+ /* sb->s_last_error_func is __u8 and does not need swabbing */
+ /* sb->s_mount_opts is __u8 and does not need swabbing */
+ sb->s_usr_quota_inum = ext2fs_swab32(sb->s_usr_quota_inum);
+ sb->s_grp_quota_inum = ext2fs_swab32(sb->s_grp_quota_inum);
+ sb->s_overhead_clusters = ext2fs_swab32(sb->s_overhead_clusters);
+ sb->s_backup_bgs[0] = ext2fs_swab32(sb->s_backup_bgs[0]);
+ sb->s_backup_bgs[1] = ext2fs_swab32(sb->s_backup_bgs[1]);
+ /* sb->s_encrypt_algos is __u8 and does not need swabbing */
+ /* sb->s_encrypt_pw_salt is __u8 and does not need swabbing */
+ sb->s_lpf_ino = ext2fs_swab32(sb->s_lpf_ino);
+ sb->s_prj_quota_inum = ext2fs_swab32(sb->s_prj_quota_inum);
+ sb->s_checksum_seed = ext2fs_swab32(sb->s_checksum_seed);
+ /* s_*_time_hi are __u8 and does not need swabbing */
+ sb->s_encoding = ext2fs_swab16(sb->s_encoding);
+ sb->s_encoding_flags = ext2fs_swab16(sb->s_encoding_flags);
+ sb->s_orphan_file_inum = ext2fs_swab32(sb->s_orphan_file_inum);
+ /* catch when new fields are used from s_reserved */
+ EXT2FS_BUILD_BUG_ON(sizeof(sb->s_reserved) != 94 * sizeof(__le32));
+ sb->s_checksum = ext2fs_swab32(sb->s_checksum);
+}
+
+void ext2fs_swap_group_desc2(ext2_filsys fs, struct ext2_group_desc *gdp)
+{
+ struct ext4_group_desc *gdp4 = (struct ext4_group_desc *)gdp;
+
+ /* Do the 32-bit parts first */
+ gdp->bg_block_bitmap = ext2fs_swab32(gdp->bg_block_bitmap);
+ gdp->bg_inode_bitmap = ext2fs_swab32(gdp->bg_inode_bitmap);
+ gdp->bg_inode_table = ext2fs_swab32(gdp->bg_inode_table);
+ gdp->bg_free_blocks_count = ext2fs_swab16(gdp->bg_free_blocks_count);
+ gdp->bg_free_inodes_count = ext2fs_swab16(gdp->bg_free_inodes_count);
+ gdp->bg_used_dirs_count = ext2fs_swab16(gdp->bg_used_dirs_count);
+ gdp->bg_flags = ext2fs_swab16(gdp->bg_flags);
+ gdp->bg_exclude_bitmap_lo = ext2fs_swab32(gdp->bg_exclude_bitmap_lo);
+ gdp->bg_block_bitmap_csum_lo =
+ ext2fs_swab16(gdp->bg_block_bitmap_csum_lo);
+ gdp->bg_inode_bitmap_csum_lo =
+ ext2fs_swab16(gdp->bg_inode_bitmap_csum_lo);
+ gdp->bg_itable_unused = ext2fs_swab16(gdp->bg_itable_unused);
+ gdp->bg_checksum = ext2fs_swab16(gdp->bg_checksum);
+ /* If we're 32-bit, we're done */
+ if (fs == NULL || EXT2_DESC_SIZE(fs->super) < EXT2_MIN_DESC_SIZE_64BIT)
+ return;
+
+ /* Swap the 64-bit parts */
+ gdp4->bg_block_bitmap_hi = ext2fs_swab32(gdp4->bg_block_bitmap_hi);
+ gdp4->bg_inode_bitmap_hi = ext2fs_swab32(gdp4->bg_inode_bitmap_hi);
+ gdp4->bg_inode_table_hi = ext2fs_swab32(gdp4->bg_inode_table_hi);
+ gdp4->bg_free_blocks_count_hi =
+ ext2fs_swab16(gdp4->bg_free_blocks_count_hi);
+ gdp4->bg_free_inodes_count_hi =
+ ext2fs_swab16(gdp4->bg_free_inodes_count_hi);
+ gdp4->bg_used_dirs_count_hi =
+ ext2fs_swab16(gdp4->bg_used_dirs_count_hi);
+ gdp4->bg_itable_unused_hi = ext2fs_swab16(gdp4->bg_itable_unused_hi);
+ gdp4->bg_exclude_bitmap_hi = ext2fs_swab16(gdp4->bg_exclude_bitmap_hi);
+ gdp4->bg_block_bitmap_csum_hi =
+ ext2fs_swab16(gdp4->bg_block_bitmap_csum_hi);
+ gdp4->bg_inode_bitmap_csum_hi =
+ ext2fs_swab16(gdp4->bg_inode_bitmap_csum_hi);
+ EXT2FS_BUILD_BUG_ON(sizeof(gdp4->bg_reserved) != sizeof(__u32));
+}
+
+void ext2fs_swap_group_desc(struct ext2_group_desc *gdp)
+{
+ ext2fs_swap_group_desc2(0, gdp);
+}
+
+
+void ext2fs_swap_ext_attr_header(struct ext2_ext_attr_header *to_header,
+ struct ext2_ext_attr_header *from_header)
+{
+ int n;
+
+ to_header->h_magic = ext2fs_swab32(from_header->h_magic);
+ to_header->h_blocks = ext2fs_swab32(from_header->h_blocks);
+ to_header->h_refcount = ext2fs_swab32(from_header->h_refcount);
+ to_header->h_hash = ext2fs_swab32(from_header->h_hash);
+ to_header->h_checksum = ext2fs_swab32(from_header->h_checksum);
+ for (n = 0; n < 3; n++)
+ to_header->h_reserved[n] =
+ ext2fs_swab32(from_header->h_reserved[n]);
+}
+
+void ext2fs_swap_ext_attr_entry(struct ext2_ext_attr_entry *to_entry,
+ struct ext2_ext_attr_entry *from_entry)
+{
+ to_entry->e_value_offs = ext2fs_swab16(from_entry->e_value_offs);
+ to_entry->e_value_inum = ext2fs_swab32(from_entry->e_value_inum);
+ to_entry->e_value_size = ext2fs_swab32(from_entry->e_value_size);
+ to_entry->e_hash = ext2fs_swab32(from_entry->e_hash);
+}
+
+void ext2fs_swap_ext_attr(char *to, char *from, int bufsize, int has_header)
+{
+ struct ext2_ext_attr_header *from_header =
+ (struct ext2_ext_attr_header *)from;
+ struct ext2_ext_attr_header *to_header =
+ (struct ext2_ext_attr_header *)to;
+ struct ext2_ext_attr_entry *from_entry, *to_entry;
+ char *from_end = (char *)from_header + bufsize;
+
+ if (to_header != from_header)
+ memcpy(to_header, from_header, bufsize);
+
+ if (has_header) {
+ ext2fs_swap_ext_attr_header(to_header, from_header);
+
+ from_entry = (struct ext2_ext_attr_entry *)(from_header+1);
+ to_entry = (struct ext2_ext_attr_entry *)(to_header+1);
+ } else {
+ from_entry = (struct ext2_ext_attr_entry *)from_header;
+ to_entry = (struct ext2_ext_attr_entry *)to_header;
+ }
+
+ while ((char *)from_entry < from_end &&
+ (char *)EXT2_EXT_ATTR_NEXT(from_entry) <= from_end &&
+ *(__u32 *)from_entry) {
+ ext2fs_swap_ext_attr_entry(to_entry, from_entry);
+ from_entry = EXT2_EXT_ATTR_NEXT(from_entry);
+ to_entry = EXT2_EXT_ATTR_NEXT(to_entry);
+ }
+}
+
+void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
+ struct ext2_inode_large *f, int hostorder,
+ int bufsize)
+{
+ unsigned i, extra_isize, attr_magic;
+ int has_extents = 0, has_inline_data = 0, islnk = 0, fast_symlink = 0;
+ unsigned int inode_size;
+ __u32 *eaf, *eat;
+
+ /*
+ * Note that t and f may point to the same address. That's why
+ * if (hostorder) condition is executed before swab calls and
+ * if (!hostorder) afterwards.
+ */
+ if (hostorder) {
+ islnk = LINUX_S_ISLNK(f->i_mode);
+ fast_symlink = ext2fs_is_fast_symlink(EXT2_INODE(f));
+ has_extents = (f->i_flags & EXT4_EXTENTS_FL) != 0;
+ has_inline_data = (f->i_flags & EXT4_INLINE_DATA_FL) != 0;
+ }
+
+ t->i_mode = ext2fs_swab16(f->i_mode);
+ t->i_uid = ext2fs_swab16(f->i_uid);
+ t->i_size = ext2fs_swab32(f->i_size);
+ t->i_atime = ext2fs_swab32(f->i_atime);
+ t->i_ctime = ext2fs_swab32(f->i_ctime);
+ t->i_mtime = ext2fs_swab32(f->i_mtime);
+ t->i_dtime = ext2fs_swab32(f->i_dtime);
+ t->i_gid = ext2fs_swab16(f->i_gid);
+ t->i_links_count = ext2fs_swab16(f->i_links_count);
+ t->i_file_acl = ext2fs_swab32(f->i_file_acl);
+ t->i_blocks = ext2fs_swab32(f->i_blocks);
+ t->i_flags = ext2fs_swab32(f->i_flags);
+ t->i_size_high = ext2fs_swab32(f->i_size_high);
+
+ if (!hostorder) {
+ islnk = LINUX_S_ISLNK(t->i_mode);
+ fast_symlink = ext2fs_is_fast_symlink(EXT2_INODE(t));
+ has_extents = (t->i_flags & EXT4_EXTENTS_FL) != 0;
+ has_inline_data = (t->i_flags & EXT4_INLINE_DATA_FL) != 0;
+ }
+
+ /*
+ * Extent data and inline data are swapped on access, not here
+ */
+ if (!has_extents && !has_inline_data && (!islnk || !fast_symlink)) {
+ for (i = 0; i < EXT2_N_BLOCKS; i++)
+ t->i_block[i] = ext2fs_swab32(f->i_block[i]);
+ } else if (t != f) {
+ for (i = 0; i < EXT2_N_BLOCKS; i++)
+ t->i_block[i] = f->i_block[i];
+ }
+ t->i_generation = ext2fs_swab32(f->i_generation);
+ t->i_faddr = ext2fs_swab32(f->i_faddr);
+
+ switch (fs->super->s_creator_os) {
+ case EXT2_OS_LINUX:
+ t->osd1.linux1.l_i_version =
+ ext2fs_swab32(f->osd1.linux1.l_i_version);
+ t->osd2.linux2.l_i_blocks_hi =
+ ext2fs_swab16(f->osd2.linux2.l_i_blocks_hi);
+ t->osd2.linux2.l_i_file_acl_high =
+ ext2fs_swab16(f->osd2.linux2.l_i_file_acl_high);
+ t->osd2.linux2.l_i_uid_high =
+ ext2fs_swab16 (f->osd2.linux2.l_i_uid_high);
+ t->osd2.linux2.l_i_gid_high =
+ ext2fs_swab16 (f->osd2.linux2.l_i_gid_high);
+ t->osd2.linux2.l_i_checksum_lo =
+ ext2fs_swab16(f->osd2.linux2.l_i_checksum_lo);
+ break;
+ case EXT2_OS_HURD:
+ t->osd1.hurd1.h_i_translator =
+ ext2fs_swab32 (f->osd1.hurd1.h_i_translator);
+ t->osd2.hurd2.h_i_frag = f->osd2.hurd2.h_i_frag;
+ t->osd2.hurd2.h_i_fsize = f->osd2.hurd2.h_i_fsize;
+ t->osd2.hurd2.h_i_mode_high =
+ ext2fs_swab16 (f->osd2.hurd2.h_i_mode_high);
+ t->osd2.hurd2.h_i_uid_high =
+ ext2fs_swab16 (f->osd2.hurd2.h_i_uid_high);
+ t->osd2.hurd2.h_i_gid_high =
+ ext2fs_swab16 (f->osd2.hurd2.h_i_gid_high);
+ t->osd2.hurd2.h_i_author =
+ ext2fs_swab32 (f->osd2.hurd2.h_i_author);
+ break;
+ default:
+ break;
+ }
+
+ if (bufsize < (int) (sizeof(struct ext2_inode) + sizeof(__u16)))
+ return; /* no i_extra_isize field */
+
+ if (hostorder)
+ extra_isize = f->i_extra_isize;
+ t->i_extra_isize = ext2fs_swab16(f->i_extra_isize);
+ if (!hostorder)
+ extra_isize = t->i_extra_isize;
+ if (extra_isize > EXT2_INODE_SIZE(fs->super) -
+ sizeof(struct ext2_inode)) {
+ /* this is error case: i_extra_size is too large */
+ return;
+ }
+ if (extra_isize & 3)
+ return; /* Illegal inode extra_isize */
+
+ inode_size = EXT2_GOOD_OLD_INODE_SIZE + extra_isize;
+ if (inode_includes(inode_size, i_checksum_hi))
+ t->i_checksum_hi = ext2fs_swab16(f->i_checksum_hi);
+ if (inode_includes(inode_size, i_ctime_extra))
+ t->i_ctime_extra = ext2fs_swab32(f->i_ctime_extra);
+ if (inode_includes(inode_size, i_mtime_extra))
+ t->i_mtime_extra = ext2fs_swab32(f->i_mtime_extra);
+ if (inode_includes(inode_size, i_atime_extra))
+ t->i_atime_extra = ext2fs_swab32(f->i_atime_extra);
+ if (inode_includes(inode_size, i_crtime))
+ t->i_crtime = ext2fs_swab32(f->i_crtime);
+ if (inode_includes(inode_size, i_crtime_extra))
+ t->i_crtime_extra = ext2fs_swab32(f->i_crtime_extra);
+ if (inode_includes(inode_size, i_version_hi))
+ t->i_version_hi = ext2fs_swab32(f->i_version_hi);
+ if (inode_includes(inode_size, i_projid))
+ t->i_projid = ext2fs_swab32(f->i_projid);
+ /* catch new static fields added after i_projid */
+ EXT2FS_BUILD_BUG_ON(sizeof(struct ext2_inode_large) != 160);
+
+ i = sizeof(struct ext2_inode) + extra_isize + sizeof(__u32);
+ if (bufsize < (int) i)
+ return; /* no space for EA magic */
+
+ eaf = (__u32 *) (((char *) f) + sizeof(struct ext2_inode) +
+ extra_isize);
+
+ attr_magic = *eaf;
+ if (!hostorder)
+ attr_magic = ext2fs_swab32(attr_magic);
+
+ if (attr_magic != EXT2_EXT_ATTR_MAGIC)
+ return; /* it seems no magic here */
+
+ eat = (__u32 *) (((char *) t) + sizeof(struct ext2_inode) +
+ extra_isize);
+ *eat = ext2fs_swab32(*eaf);
+
+ /* convert EA(s) */
+ ext2fs_swap_ext_attr((char *) (eat + 1), (char *) (eaf + 1),
+ bufsize - sizeof(struct ext2_inode) -
+ extra_isize - sizeof(__u32), 0);
+
+}
+
+void ext2fs_swap_inode(ext2_filsys fs, struct ext2_inode *t,
+ struct ext2_inode *f, int hostorder)
+{
+ ext2fs_swap_inode_full(fs, (struct ext2_inode_large *) t,
+ (struct ext2_inode_large *) f, hostorder,
+ sizeof(struct ext2_inode));
+}
+
+void ext2fs_swap_mmp(struct mmp_struct *mmp)
+{
+ mmp->mmp_magic = ext2fs_swab32(mmp->mmp_magic);
+ mmp->mmp_seq = ext2fs_swab32(mmp->mmp_seq);
+ mmp->mmp_time = ext2fs_swab64(mmp->mmp_time);
+ mmp->mmp_check_interval = ext2fs_swab16(mmp->mmp_check_interval);
+ mmp->mmp_checksum = ext2fs_swab32(mmp->mmp_checksum);
+}
+
+errcode_t ext2fs_dirent_swab_in(ext2_filsys fs, char *buf, int flags)
+{
+ return ext2fs_dirent_swab_in2(fs, buf, fs->blocksize, flags);
+}
+
+errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char *buf,
+ size_t size, int flags)
+{
+ errcode_t retval;
+ char *p, *end;
+ struct ext2_dir_entry *dirent;
+ unsigned int name_len, rec_len, left;
+
+ p = (char *) buf;
+ end = (char *) buf + size;
+ left = size;
+ while (p < end-8) {
+ dirent = (struct ext2_dir_entry *) p;
+ dirent->inode = ext2fs_swab32(dirent->inode);
+ dirent->rec_len = ext2fs_swab16(dirent->rec_len);
+ dirent->name_len = ext2fs_swab16(dirent->name_len);
+ name_len = dirent->name_len;
+ if (flags & EXT2_DIRBLOCK_V2_STRUCT)
+ dirent->name_len = ext2fs_swab16(dirent->name_len);
+ retval = ext2fs_get_rec_len(fs, dirent, &rec_len);
+ if (retval)
+ return retval;
+ if ((rec_len < 8) || (rec_len % 4)) {
+ rec_len = 8;
+ if (!(fs->flags & EXT2_FLAG_IGNORE_SWAP_DIRENT))
+ return EXT2_ET_DIR_CORRUPTED;
+ } else if (((name_len & 0xFF) + 8) > rec_len)
+ if (!(fs->flags & EXT2_FLAG_IGNORE_SWAP_DIRENT))
+ return EXT2_ET_DIR_CORRUPTED;
+ if (rec_len > left)
+ if (!(fs->flags & EXT2_FLAG_IGNORE_SWAP_DIRENT))
+ return EXT2_ET_DIR_CORRUPTED;
+ left -= rec_len;
+ p += rec_len;
+ }
+
+ return 0;
+}
+
+errcode_t ext2fs_dirent_swab_out(ext2_filsys fs, char *buf, int flags)
+{
+ return ext2fs_dirent_swab_out2(fs, buf, fs->blocksize, flags);
+}
+
+errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char *buf,
+ size_t size, int flags)
+{
+ errcode_t retval;
+ char *p, *end;
+ unsigned int rec_len;
+ struct ext2_dir_entry *dirent;
+
+ p = buf;
+ end = buf + size;
+ while (p < end) {
+ dirent = (struct ext2_dir_entry *) p;
+ retval = ext2fs_get_rec_len(fs, dirent, &rec_len);
+ if (retval)
+ return retval;
+ if ((rec_len < 8) ||
+ (rec_len % 4)) {
+ ext2fs_free_mem(&buf);
+ return EXT2_ET_DIR_CORRUPTED;
+ }
+ p += rec_len;
+ dirent->inode = ext2fs_swab32(dirent->inode);
+ dirent->rec_len = ext2fs_swab16(dirent->rec_len);
+ dirent->name_len = ext2fs_swab16(dirent->name_len);
+ if (rec_len > size)
+ return EXT2_ET_DIR_CORRUPTED;
+ size -= rec_len;
+
+ if (flags & EXT2_DIRBLOCK_V2_STRUCT)
+ dirent->name_len = ext2fs_swab16(dirent->name_len);
+ }
+
+ return 0;
+}
diff --git a/lib/ext2fs/symlink.c b/lib/ext2fs/symlink.c
new file mode 100644
index 0000000..a66fb7e
--- /dev/null
+++ b/lib/ext2fs/symlink.c
@@ -0,0 +1,212 @@
+/*
+ * symlink.c --- make a symlink in the filesystem, based on mkdir.c
+ *
+ * Copyright (c) 2012, Intel Corporation.
+ * All Rights Reserved.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifndef HAVE_STRNLEN
+/*
+ * Incredibly, libc5 doesn't appear to have strnlen. So we have to
+ * provide our own.
+ */
+static int my_strnlen(const char * s, int count)
+{
+ const char *cp = s;
+
+ while (count-- && *cp)
+ cp++;
+ return cp - s;
+}
+#define strnlen(str, x) my_strnlen((str),(x))
+#endif
+
+errcode_t ext2fs_symlink(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t ino,
+ const char *name, const char *target)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+ ext2_ino_t scratch_ino;
+ blk64_t blk;
+ int fastlink, inlinelink;
+ unsigned int target_len;
+ char *block_buf = 0;
+ int drop_refcount = 0;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ /*
+ * The Linux kernel doesn't allow for links longer than a block
+ * (counting the NUL terminator)
+ */
+ target_len = strnlen(target, fs->blocksize + 1);
+ if (target_len >= fs->blocksize) {
+ retval = EXT2_ET_INVALID_ARGUMENT;
+ goto cleanup;
+ }
+
+ /*
+ * Allocate a data block for slow links
+ */
+ retval = ext2fs_get_mem(fs->blocksize, &block_buf);
+ if (retval)
+ goto cleanup;
+ memset(block_buf, 0, fs->blocksize);
+ strncpy(block_buf, target, fs->blocksize);
+
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ fastlink = (target_len < sizeof(inode.i_block));
+ if (!fastlink) {
+ retval = ext2fs_new_block2(fs, ext2fs_find_inode_goal(fs, ino,
+ &inode,
+ 0),
+ NULL, &blk);
+ if (retval)
+ goto cleanup;
+ }
+
+ /*
+ * Allocate an inode, if necessary
+ */
+ if (!ino) {
+ retval = ext2fs_new_inode(fs, parent, LINUX_S_IFLNK | 0755,
+ 0, &ino);
+ if (retval)
+ goto cleanup;
+ }
+
+ /*
+ * Create the inode structure....
+ */
+ inode.i_mode = LINUX_S_IFLNK | 0777;
+ inode.i_uid = inode.i_gid = 0;
+ inode.i_links_count = 1;
+ ext2fs_inode_size_set(fs, &inode, target_len);
+ /* The time fields are set by ext2fs_write_new_inode() */
+
+ inlinelink = !fastlink && ext2fs_has_feature_inline_data(fs->super);
+ if (fastlink) {
+ /* Fast symlinks, target stored in inode */
+ strcpy((char *)&inode.i_block, target);
+ } else if (inlinelink) {
+ /* Try inserting an inline data symlink */
+ inode.i_flags |= EXT4_INLINE_DATA_FL;
+ retval = ext2fs_write_new_inode(fs, ino, &inode);
+ if (retval)
+ goto cleanup;
+ retval = ext2fs_inline_data_set(fs, ino, &inode, block_buf,
+ target_len);
+ if (retval) {
+ inode.i_flags &= ~EXT4_INLINE_DATA_FL;
+ inlinelink = 0;
+ goto need_block;
+ }
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ goto cleanup;
+ } else {
+need_block:
+ /* Slow symlinks, target stored in the first block */
+ ext2fs_iblk_set(fs, &inode, 1);
+ if (ext2fs_has_feature_extents(fs->super)) {
+ /*
+ * The extent bmap is setup after the inode and block
+ * have been written out below.
+ */
+ inode.i_flags |= EXT4_EXTENTS_FL;
+ }
+ }
+
+ /*
+ * Write out the inode and inode data block. The inode generation
+ * number is assigned by write_new_inode, which means that the
+ * operations using ino must come after it.
+ */
+ if (inlinelink)
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ else
+ retval = ext2fs_write_new_inode(fs, ino, &inode);
+ if (retval)
+ goto cleanup;
+
+ if (!fastlink && !inlinelink) {
+ retval = ext2fs_bmap2(fs, ino, &inode, NULL, BMAP_SET, 0, NULL,
+ &blk);
+ if (retval)
+ goto cleanup;
+
+ retval = io_channel_write_blk64(fs->io, blk, 1, block_buf);
+ if (retval)
+ goto cleanup;
+ }
+
+ /*
+ * Update accounting....
+ */
+ if (!fastlink && !inlinelink)
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+ ext2fs_inode_alloc_stats2(fs, ino, +1, 0);
+ drop_refcount = 1;
+
+ /*
+ * Link the symlink into the filesystem hierarchy
+ */
+ if (name) {
+ retval = ext2fs_lookup(fs, parent, name, strlen(name), 0,
+ &scratch_ino);
+ if (!retval) {
+ retval = EXT2_ET_FILE_EXISTS;
+ goto cleanup;
+ }
+ if (retval != EXT2_ET_FILE_NOT_FOUND)
+ goto cleanup;
+ retval = ext2fs_link(fs, parent, name, ino, EXT2_FT_SYMLINK);
+ if (retval)
+ goto cleanup;
+ }
+ drop_refcount = 0;
+
+cleanup:
+ if (block_buf)
+ ext2fs_free_mem(&block_buf);
+ if (drop_refcount) {
+ if (!fastlink && !inlinelink)
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ ext2fs_inode_alloc_stats2(fs, ino, -1, 0);
+ }
+ return retval;
+}
+
+/*
+ * Test whether an inode is a fast symlink.
+ *
+ * A fast symlink has its symlink data stored in inode->i_block.
+ */
+int ext2fs_is_fast_symlink(struct ext2_inode *inode)
+{
+ return LINUX_S_ISLNK(inode->i_mode) && EXT2_I_SIZE(inode) &&
+ EXT2_I_SIZE(inode) < sizeof(inode->i_block);
+}
diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c
new file mode 100644
index 0000000..b07b291
--- /dev/null
+++ b/lib/ext2fs/tdb.c
@@ -0,0 +1,4174 @@
+/*
+URL: svn://svnanon.samba.org/samba/branches/SAMBA_4_0/source/lib/tdb/common
+Rev: 23590
+Last Changed Date: 2007-06-22 13:36:10 -0400 (Fri, 22 Jun 2007)
+*/
+ /*
+ trivial database library - standalone version
+
+ Copyright (C) Andrew Tridgell 1999-2005
+ Copyright (C) Jeremy Allison 2000-2006
+ Copyright (C) Paul `Rusty' Russell 2000
+
+ ** NOTE! The following LGPL license applies to the tdb
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifdef CONFIG_STAND_ALONE
+#define HAVE_MMAP
+#define HAVE_STRDUP
+#define HAVE_SYS_MMAN_H
+#define HAVE_UTIME_H
+#define HAVE_UTIME
+#endif
+#ifndef __FreeBSD__
+#define _XOPEN_SOURCE 600
+#endif
+
+#include "config.h"
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <errno.h>
+#include <string.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#include <sys/time.h>
+#include <sys/types.h>
+#include <time.h>
+#ifdef HAVE_UTIME_H
+#include <utime.h>
+#endif
+#include <sys/stat.h>
+#include <sys/file.h>
+#include <fcntl.h>
+
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
+#ifndef MAP_FILE
+#define MAP_FILE 0
+#endif
+
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
+#ifndef HAVE_STRDUP
+#define strdup rep_strdup
+static char *rep_strdup(const char *s)
+{
+ char *ret;
+ int length;
+
+ if (!s)
+ return NULL;
+ length = strlen(s);
+ ret = malloc(length + 1);
+ if (ret) {
+ strncpy(ret, s, length);
+ ret[length] = '\0';
+ }
+ return ret;
+}
+#endif
+
+#ifndef PRINTF_ATTRIBUTE
+#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+/** Use gcc attribute to check printf fns. a1 is the 1-based index of
+ * the parameter containing the format, and a2 the index of the first
+ * argument. Note that some gcc 2.x versions don't handle this
+ * properly **/
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
+#else
+#define PRINTF_ATTRIBUTE(a1, a2)
+#endif
+#endif
+
+typedef int bool;
+
+#include "tdb.h"
+
+static TDB_DATA tdb_null;
+
+#ifndef u32
+#define u32 unsigned
+#endif
+
+typedef u32 tdb_len_t;
+typedef u32 tdb_off_t;
+
+#ifndef offsetof
+#define offsetof(t,f) ((unsigned int)&((t *)0)->f)
+#endif
+
+#define TDB_MAGIC_FOOD "TDB file\n"
+#define TDB_VERSION (0x26011967 + 6)
+#define TDB_MAGIC (0x26011999U)
+#define TDB_FREE_MAGIC (~TDB_MAGIC)
+#define TDB_DEAD_MAGIC (0xFEE1DEAD)
+#define TDB_RECOVERY_MAGIC (0xf53bc0e7U)
+#define TDB_ALIGNMENT 4
+#define MIN_REC_SIZE (2*sizeof(struct list_struct) + TDB_ALIGNMENT)
+#define DEFAULT_HASH_SIZE 131
+#define FREELIST_TOP (sizeof(struct tdb_header))
+#define TDB_ALIGN(x,a) (((x) + (a)-1) & ~((a)-1))
+#define TDB_BYTEREV(x) (((((x)&0xff)<<24)|((x)&0xFF00)<<8)|(((x)>>8)&0xFF00)|((x)>>24))
+#define TDB_DEAD(r) ((r)->magic == TDB_DEAD_MAGIC)
+#define TDB_BAD_MAGIC(r) ((r)->magic != TDB_MAGIC && !TDB_DEAD(r))
+#define TDB_HASH_TOP(hash) (FREELIST_TOP + (BUCKET(hash)+1)*sizeof(tdb_off_t))
+#define TDB_HASHTABLE_SIZE(tdb) ((tdb->header.hash_size+1)*sizeof(tdb_off_t))
+#define TDB_DATA_START(hash_size) TDB_HASH_TOP(hash_size-1)
+#define TDB_RECOVERY_HEAD offsetof(struct tdb_header, recovery_start)
+#define TDB_SEQNUM_OFS offsetof(struct tdb_header, sequence_number)
+#define TDB_PAD_BYTE 0x42
+#define TDB_PAD_U32 0x42424242
+
+/* NB assumes there is a local variable called "tdb" that is the
+ * current context, also takes doubly-parenthesized print-style
+ * argument. */
+#define TDB_LOG(x) tdb->log.log_fn x
+
+/* lock offsets */
+#define GLOBAL_LOCK 0
+#define ACTIVE_LOCK 4
+#define TRANSACTION_LOCK 8
+
+/* free memory if the pointer is valid and zero the pointer */
+#ifndef SAFE_FREE
+#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); (x)=NULL;} } while(0)
+#endif
+
+#define BUCKET(hash) ((hash) % tdb->header.hash_size)
+
+#define DOCONV() (tdb->flags & TDB_CONVERT)
+#define CONVERT(x) (DOCONV() ? tdb_convert(&x, sizeof(x)) : &x)
+
+
+/* the body of the database is made of one list_struct for the free space
+ plus a separate data list for each hash value */
+struct list_struct {
+ tdb_off_t next; /* offset of the next record in the list */
+ tdb_len_t rec_len; /* total byte length of record */
+ tdb_len_t key_len; /* byte length of key */
+ tdb_len_t data_len; /* byte length of data */
+ u32 full_hash; /* the full 32 bit hash of the key */
+ u32 magic; /* try to catch errors */
+ /* the following union is implied:
+ union {
+ char record[rec_len];
+ struct {
+ char key[key_len];
+ char data[data_len];
+ }
+ u32 totalsize; (tailer)
+ }
+ */
+};
+
+
+/* this is stored at the front of every database */
+struct tdb_header {
+ char magic_food[32]; /* for /etc/magic */
+ u32 version; /* version of the code */
+ u32 hash_size; /* number of hash entries */
+ tdb_off_t rwlocks; /* obsolete - kept to detect old formats */
+ tdb_off_t recovery_start; /* offset of transaction recovery region */
+ tdb_off_t sequence_number; /* used when TDB_SEQNUM is set */
+ tdb_off_t reserved[29];
+};
+
+struct tdb_lock_type {
+ int list;
+ u32 count;
+ u32 ltype;
+};
+
+struct tdb_traverse_lock {
+ struct tdb_traverse_lock *next;
+ u32 off;
+ u32 hash;
+ int lock_rw;
+};
+
+
+struct tdb_methods {
+ int (*tdb_read)(struct tdb_context *, tdb_off_t , void *, tdb_len_t , int );
+ int (*tdb_write)(struct tdb_context *, tdb_off_t, const void *, tdb_len_t);
+ void (*next_hash_chain)(struct tdb_context *, u32 *);
+ int (*tdb_oob)(struct tdb_context *, tdb_off_t , int );
+ int (*tdb_expand_file)(struct tdb_context *, tdb_off_t , tdb_off_t );
+ int (*tdb_brlock)(struct tdb_context *, tdb_off_t , int, int, int, size_t);
+};
+
+struct tdb_context {
+ char *name; /* the name of the database */
+ void *map_ptr; /* where it is currently mapped */
+ int fd; /* open file descriptor for the database */
+ tdb_len_t map_size; /* how much space has been mapped */
+ int read_only; /* opened read-only */
+ int traverse_read; /* read-only traversal */
+ struct tdb_lock_type global_lock;
+ int num_lockrecs;
+ struct tdb_lock_type *lockrecs; /* only real locks, all with count>0 */
+ enum TDB_ERROR ecode; /* error code for last tdb error */
+ struct tdb_header header; /* a cached copy of the header */
+ u32 flags; /* the flags passed to tdb_open */
+ struct tdb_traverse_lock travlocks; /* current traversal locks */
+ struct tdb_context *next; /* all tdbs to avoid multiple opens */
+ dev_t device; /* uniquely identifies this tdb */
+ ino_t inode; /* uniquely identifies this tdb */
+ struct tdb_logging_context log;
+ unsigned int (*hash_fn)(TDB_DATA *key);
+ int open_flags; /* flags used in the open - needed by reopen */
+ unsigned int num_locks; /* number of chain locks held */
+ const struct tdb_methods *methods;
+ struct tdb_transaction *transaction;
+ int page_size;
+ int max_dead_records;
+ bool have_transaction_lock;
+ tdb_len_t real_map_size; /* how much space has been mapped */
+};
+
+
+/*
+ internal prototypes
+*/
+static int tdb_munmap(struct tdb_context *tdb);
+static void tdb_mmap(struct tdb_context *tdb);
+static int tdb_lock(struct tdb_context *tdb, int list, int ltype);
+int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype);
+static int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
+static int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len);
+static int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
+static int tdb_transaction_unlock(struct tdb_context *tdb);
+static int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len);
+static int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off);
+static int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off);
+static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+static void *tdb_convert(void *buf, u32 size);
+static int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
+static tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec);
+static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+static int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off);
+static int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off);
+static int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
+static int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
+static int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct *rec);
+static unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len);
+static int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
+ tdb_off_t offset, tdb_len_t len,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data);
+static tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype,
+ struct list_struct *rec);
+static void tdb_io_init(struct tdb_context *tdb);
+static int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
+static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
+ struct list_struct *rec);
+
+
+/* file: error.c */
+
+enum TDB_ERROR tdb_error(struct tdb_context *tdb)
+{
+ return tdb->ecode;
+}
+
+static struct tdb_errname {
+ enum TDB_ERROR ecode; const char *estring;
+} emap[] = { {TDB_SUCCESS, "Success"},
+ {TDB_ERR_CORRUPT, "Corrupt database"},
+ {TDB_ERR_IO, "IO Error"},
+ {TDB_ERR_LOCK, "Locking error"},
+ {TDB_ERR_OOM, "Out of memory"},
+ {TDB_ERR_EXISTS, "Record exists"},
+ {TDB_ERR_NOLOCK, "Lock exists on other keys"},
+ {TDB_ERR_EINVAL, "Invalid parameter"},
+ {TDB_ERR_NOEXIST, "Record does not exist"},
+ {TDB_ERR_RDONLY, "write not permitted"} };
+
+/* Error string for the last tdb error */
+const char *tdb_errorstr(struct tdb_context *tdb)
+{
+ u32 i;
+ for (i = 0; i < sizeof(emap) / sizeof(struct tdb_errname); i++)
+ if (tdb->ecode == emap[i].ecode)
+ return emap[i].estring;
+ return "Invalid error code";
+}
+
+/* file: lock.c */
+
+#define TDB_MARK_LOCK 0x80000000
+
+/* a byte range locking function - return 0 on success
+ this functions locks/unlocks 1 byte at the specified offset.
+
+ On error, errno is also set so that errors are passed back properly
+ through tdb_open().
+
+ note that a len of zero means lock to end of file
+*/
+int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset,
+ int rw_type, int lck_type, int probe, size_t len)
+{
+ struct flock fl;
+ int ret;
+
+ if (tdb->flags & TDB_NOLOCK) {
+ return 0;
+ }
+
+ if ((rw_type == F_WRLCK) && (tdb->read_only || tdb->traverse_read)) {
+ tdb->ecode = TDB_ERR_RDONLY;
+ return -1;
+ }
+
+ fl.l_type = rw_type;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = offset;
+ fl.l_len = len;
+ fl.l_pid = 0;
+
+ do {
+ ret = fcntl(tdb->fd,lck_type,&fl);
+ } while (ret == -1 && errno == EINTR);
+
+ if (ret == -1) {
+ /* Generic lock error. errno set by fcntl.
+ * EAGAIN is an expected return from non-blocking
+ * locks. */
+ if (!probe && lck_type != F_SETLK) {
+ /* Ensure error code is set for log fun to examine. */
+ tdb->ecode = TDB_ERR_LOCK;
+ TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d len=%d\n",
+ tdb->fd, offset, rw_type, lck_type, (int)len));
+ }
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+ return 0;
+}
+
+
+/*
+ upgrade a read lock to a write lock. This needs to be handled in a
+ special way as some OSes (such as solaris) have too conservative
+ deadlock detection and claim a deadlock when progress can be
+ made. For those OSes we may loop for a while.
+*/
+int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len)
+{
+ int count = 1000;
+ while (count--) {
+ struct timeval tv;
+ if (tdb_brlock(tdb, offset, F_WRLCK, F_SETLKW, 1, len) == 0) {
+ return 0;
+ }
+ if (errno != EDEADLK) {
+ break;
+ }
+ /* sleep for as short a time as we can - more portable than usleep() */
+ tv.tv_sec = 0;
+ tv.tv_usec = 1;
+ select(0, NULL, NULL, NULL, &tv);
+ }
+ TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock_upgrade failed at offset %d\n", offset));
+ return -1;
+}
+
+
+/* lock a list in the database. list -1 is the alloc list */
+static int _tdb_lock(struct tdb_context *tdb, int list, int ltype, int op)
+{
+ struct tdb_lock_type *new_lck;
+ int i;
+ bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
+
+ ltype &= ~TDB_MARK_LOCK;
+
+ /* a global lock allows us to avoid per chain locks */
+ if (tdb->global_lock.count &&
+ ((u32)ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
+ return 0;
+ }
+
+ if (tdb->global_lock.count) {
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+
+ if (list < -1 || list >= (int)tdb->header.hash_size) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR,"tdb_lock: invalid list %d for ltype=%d\n",
+ list, ltype));
+ return -1;
+ }
+ if (tdb->flags & TDB_NOLOCK)
+ return 0;
+
+ for (i=0; i<tdb->num_lockrecs; i++) {
+ if (tdb->lockrecs[i].list == list) {
+ if (tdb->lockrecs[i].count == 0) {
+ /*
+ * Can't happen, see tdb_unlock(). It should
+ * be an assert.
+ */
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_lock: "
+ "lck->count == 0 for list %d", list));
+ }
+ /*
+ * Just increment the in-memory struct, posix locks
+ * don't stack.
+ */
+ tdb->lockrecs[i].count++;
+ return 0;
+ }
+ }
+
+ new_lck = (struct tdb_lock_type *)realloc(
+ tdb->lockrecs,
+ sizeof(*tdb->lockrecs) * (tdb->num_lockrecs+1));
+ if (new_lck == NULL) {
+ errno = ENOMEM;
+ return -1;
+ }
+ tdb->lockrecs = new_lck;
+
+ /* Since fcntl locks don't nest, we do a lock for the first one,
+ and simply bump the count for future ones */
+ if (!mark_lock &&
+ tdb->methods->tdb_brlock(tdb,FREELIST_TOP+4*list, ltype, op,
+ 0, 1)) {
+ return -1;
+ }
+
+ tdb->num_locks++;
+
+ tdb->lockrecs[tdb->num_lockrecs].list = list;
+ tdb->lockrecs[tdb->num_lockrecs].count = 1;
+ tdb->lockrecs[tdb->num_lockrecs].ltype = ltype;
+ tdb->num_lockrecs += 1;
+
+ return 0;
+}
+
+/* lock a list in the database. list -1 is the alloc list */
+int tdb_lock(struct tdb_context *tdb, int list, int ltype)
+{
+ int ret;
+ ret = _tdb_lock(tdb, list, ltype, F_SETLKW);
+ if (ret) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_lock failed on list %d "
+ "ltype=%d (%s)\n", list, ltype, strerror(errno)));
+ }
+ return ret;
+}
+
+/* lock a list in the database. list -1 is the alloc list. non-blocking lock */
+int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
+{
+ return _tdb_lock(tdb, list, ltype, F_SETLK);
+}
+
+
+/* unlock the database: returns void because it's too late for errors. */
+ /* changed to return int it may be interesting to know there
+ has been an error --simo */
+int tdb_unlock(struct tdb_context *tdb, int list, int ltype)
+{
+ int ret = -1;
+ int i;
+ struct tdb_lock_type *lck = NULL;
+ bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
+
+ ltype &= ~TDB_MARK_LOCK;
+
+ /* a global lock allows us to avoid per chain locks */
+ if (tdb->global_lock.count &&
+ ((u32)ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
+ return 0;
+ }
+
+ if (tdb->global_lock.count) {
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+
+ if (tdb->flags & TDB_NOLOCK)
+ return 0;
+
+ /* Sanity checks */
+ if (list < -1 || list >= (int)tdb->header.hash_size) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlock: list %d invalid (%d)\n", list, tdb->header.hash_size));
+ return ret;
+ }
+
+ for (i=0; i<tdb->num_lockrecs; i++) {
+ if (tdb->lockrecs[i].list == list) {
+ lck = &tdb->lockrecs[i];
+ break;
+ }
+ }
+
+ if ((lck == NULL) || (lck->count == 0)) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlock: count is 0\n"));
+ return -1;
+ }
+
+ if (lck->count > 1) {
+ lck->count--;
+ return 0;
+ }
+
+ /*
+ * This lock has count==1 left, so we need to unlock it in the
+ * kernel. We don't bother with decrementing the in-memory array
+ * element, we're about to overwrite it with the last array element
+ * anyway.
+ */
+
+ if (mark_lock) {
+ ret = 0;
+ } else {
+ ret = tdb->methods->tdb_brlock(tdb, FREELIST_TOP+4*list, F_UNLCK,
+ F_SETLKW, 0, 1);
+ }
+ tdb->num_locks--;
+
+ /*
+ * Shrink the array by overwriting the element just unlocked with the
+ * last array element.
+ */
+
+ if (tdb->num_lockrecs > 1) {
+ *lck = tdb->lockrecs[tdb->num_lockrecs-1];
+ }
+ tdb->num_lockrecs -= 1;
+
+ /*
+ * We don't bother with realloc when the array shrinks, but if we have
+ * a completely idle tdb we should get rid of the locked array.
+ */
+
+ if (tdb->num_lockrecs == 0) {
+ SAFE_FREE(tdb->lockrecs);
+ }
+
+ if (ret)
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlock: An error occurred unlocking!\n"));
+ return ret;
+}
+
+/*
+ get the transaction lock
+ */
+int tdb_transaction_lock(struct tdb_context *tdb, int ltype)
+{
+ if (tdb->have_transaction_lock || tdb->global_lock.count) {
+ return 0;
+ }
+ if (tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, ltype,
+ F_SETLKW, 0, 1) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_lock: failed to get transaction lock\n"));
+ tdb->ecode = TDB_ERR_LOCK;
+ return -1;
+ }
+ tdb->have_transaction_lock = 1;
+ return 0;
+}
+
+/*
+ release the transaction lock
+ */
+int tdb_transaction_unlock(struct tdb_context *tdb)
+{
+ int ret;
+ if (!tdb->have_transaction_lock) {
+ return 0;
+ }
+ ret = tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+ if (ret == 0) {
+ tdb->have_transaction_lock = 0;
+ }
+ return ret;
+}
+
+
+
+
+/* lock/unlock entire database */
+static int _tdb_lockall(struct tdb_context *tdb, int ltype, int op)
+{
+ bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
+
+ ltype &= ~TDB_MARK_LOCK;
+
+ /* There are no locks on read-only dbs */
+ if (tdb->read_only || tdb->traverse_read)
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+
+ if (tdb->global_lock.count && tdb->global_lock.ltype == (u32)ltype) {
+ tdb->global_lock.count++;
+ return 0;
+ }
+
+ if (tdb->global_lock.count) {
+ /* a global lock of a different type exists */
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+
+ if (tdb->num_locks != 0) {
+ /* can't combine global and chain locks */
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+
+ if (!mark_lock &&
+ tdb->methods->tdb_brlock(tdb, FREELIST_TOP, ltype, op,
+ 0, 4*tdb->header.hash_size)) {
+ if (op == F_SETLKW) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_lockall failed (%s)\n", strerror(errno)));
+ }
+ return -1;
+ }
+
+ tdb->global_lock.count = 1;
+ tdb->global_lock.ltype = ltype;
+
+ return 0;
+}
+
+
+
+/* unlock entire db */
+static int _tdb_unlockall(struct tdb_context *tdb, int ltype)
+{
+ bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
+
+ ltype &= ~TDB_MARK_LOCK;
+
+ /* There are no locks on read-only dbs */
+ if (tdb->read_only || tdb->traverse_read) {
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+
+ if (tdb->global_lock.ltype != (u32)ltype ||
+ tdb->global_lock.count == 0) {
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+
+ if (tdb->global_lock.count > 1) {
+ tdb->global_lock.count--;
+ return 0;
+ }
+
+ if (!mark_lock &&
+ tdb->methods->tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW,
+ 0, 4*tdb->header.hash_size)) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlockall failed (%s)\n", strerror(errno)));
+ return -1;
+ }
+
+ tdb->global_lock.count = 0;
+ tdb->global_lock.ltype = 0;
+
+ return 0;
+}
+
+/* lock entire database with write lock */
+int tdb_lockall(struct tdb_context *tdb)
+{
+ return _tdb_lockall(tdb, F_WRLCK, F_SETLKW);
+}
+
+/* lock entire database with write lock - mark only */
+int tdb_lockall_mark(struct tdb_context *tdb)
+{
+ return _tdb_lockall(tdb, F_WRLCK | TDB_MARK_LOCK, F_SETLKW);
+}
+
+/* unlock entire database with write lock - unmark only */
+int tdb_lockall_unmark(struct tdb_context *tdb)
+{
+ return _tdb_unlockall(tdb, F_WRLCK | TDB_MARK_LOCK);
+}
+
+/* lock entire database with write lock - nonblocking variant */
+int tdb_lockall_nonblock(struct tdb_context *tdb)
+{
+ return _tdb_lockall(tdb, F_WRLCK, F_SETLK);
+}
+
+/* unlock entire database with write lock */
+int tdb_unlockall(struct tdb_context *tdb)
+{
+ return _tdb_unlockall(tdb, F_WRLCK);
+}
+
+/* lock entire database with read lock */
+int tdb_lockall_read(struct tdb_context *tdb)
+{
+ return _tdb_lockall(tdb, F_RDLCK, F_SETLKW);
+}
+
+/* lock entire database with read lock - nonblock variant */
+int tdb_lockall_read_nonblock(struct tdb_context *tdb)
+{
+ return _tdb_lockall(tdb, F_RDLCK, F_SETLK);
+}
+
+/* unlock entire database with read lock */
+int tdb_unlockall_read(struct tdb_context *tdb)
+{
+ return _tdb_unlockall(tdb, F_RDLCK);
+}
+
+/* lock/unlock one hash chain. This is meant to be used to reduce
+ contention - it cannot guarantee how many records will be locked */
+int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key)
+{
+ return tdb_lock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK);
+}
+
+/* lock/unlock one hash chain, non-blocking. This is meant to be used
+ to reduce contention - it cannot guarantee how many records will be
+ locked */
+int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key)
+{
+ return tdb_lock_nonblock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK);
+}
+
+/* mark a chain as locked without actually locking it. Warning! use with great caution! */
+int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key)
+{
+ return tdb_lock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK | TDB_MARK_LOCK);
+}
+
+/* unmark a chain as locked without actually locking it. Warning! use with great caution! */
+int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key)
+{
+ return tdb_unlock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK | TDB_MARK_LOCK);
+}
+
+int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key)
+{
+ return tdb_unlock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK);
+}
+
+int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key)
+{
+ return tdb_lock(tdb, BUCKET(tdb->hash_fn(&key)), F_RDLCK);
+}
+
+int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key)
+{
+ return tdb_unlock(tdb, BUCKET(tdb->hash_fn(&key)), F_RDLCK);
+}
+
+
+
+/* record lock stops delete underneath */
+int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off)
+{
+ return off ? tdb->methods->tdb_brlock(tdb, off, F_RDLCK, F_SETLKW, 0, 1) : 0;
+}
+
+/*
+ Write locks override our own fcntl readlocks, so check it here.
+ Note this is meant to be F_SETLK, *not* F_SETLKW, as it's not
+ an error to fail to get the lock here.
+*/
+int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off)
+{
+ struct tdb_traverse_lock *i;
+ for (i = &tdb->travlocks; i; i = i->next)
+ if (i->off == off)
+ return -1;
+ return tdb->methods->tdb_brlock(tdb, off, F_WRLCK, F_SETLK, 1, 1);
+}
+
+/*
+ Note this is meant to be F_SETLK, *not* F_SETLKW, as it's not
+ an error to fail to get the lock here.
+*/
+int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off)
+{
+ return tdb->methods->tdb_brlock(tdb, off, F_UNLCK, F_SETLK, 0, 1);
+}
+
+/* fcntl locks don't stack: avoid unlocking someone else's */
+int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off)
+{
+ struct tdb_traverse_lock *i;
+ u32 count = 0;
+
+ if (off == 0)
+ return 0;
+ for (i = &tdb->travlocks; i; i = i->next)
+ if (i->off == off)
+ count++;
+ return (count == 1 ? tdb->methods->tdb_brlock(tdb, off, F_UNLCK, F_SETLKW, 0, 1) : 0);
+}
+
+/* file: io.c */
+
+/* check for an out of bounds access - if it is out of bounds then
+ see if the database has been expanded by someone else and expand
+ if necessary
+ note that "len" is the minimum length needed for the db
+*/
+static int tdb_oob(struct tdb_context *tdb, tdb_off_t len, int probe)
+{
+ struct stat st;
+ if (len <= tdb->map_size)
+ return 0;
+ if (tdb->flags & TDB_INTERNAL) {
+ if (!probe) {
+ /* Ensure ecode is set for log fn. */
+ tdb->ecode = TDB_ERR_IO;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_oob len %d beyond internal malloc size %d\n",
+ (int)len, (int)tdb->map_size));
+ }
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+ }
+
+ if (fstat(tdb->fd, &st) == -1) {
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+ }
+
+ if (st.st_size < (off_t)len) {
+ if (!probe) {
+ /* Ensure ecode is set for log fn. */
+ tdb->ecode = TDB_ERR_IO;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_oob len %d beyond eof at %d\n",
+ (int)len, (int)st.st_size));
+ }
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+ }
+
+ /* Unmap, update size, remap */
+ if (tdb_munmap(tdb) == -1)
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+ tdb->map_size = st.st_size;
+ tdb_mmap(tdb);
+ return 0;
+}
+
+/* write a lump of data at a specified offset */
+static int tdb_write(struct tdb_context *tdb, tdb_off_t off,
+ const void *buf, tdb_len_t len)
+{
+ if (len == 0) {
+ return 0;
+ }
+
+ if (tdb->read_only || tdb->traverse_read) {
+ tdb->ecode = TDB_ERR_RDONLY;
+ return -1;
+ }
+
+ if (tdb->methods->tdb_oob(tdb, off + len, 0) != 0)
+ return -1;
+
+ if (tdb->map_ptr) {
+ memcpy(off + (char *)tdb->map_ptr, buf, len);
+ } else if (pwrite(tdb->fd, buf, len, off) != (ssize_t)len) {
+ /* Ensure ecode is set for log fn. */
+ tdb->ecode = TDB_ERR_IO;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_write failed at %d len=%d (%s)\n",
+ off, len, strerror(errno)));
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+ }
+ return 0;
+}
+
+/* Endian conversion: we only ever deal with 4 byte quantities */
+void *tdb_convert(void *buf, u32 size)
+{
+ u32 i, *p = (u32 *)buf;
+ for (i = 0; i < size / 4; i++)
+ p[i] = TDB_BYTEREV(p[i]);
+ return buf;
+}
+
+
+/* read a lump of data at a specified offset, maybe convert */
+static int tdb_read(struct tdb_context *tdb, tdb_off_t off, void *buf,
+ tdb_len_t len, int cv)
+{
+ if (tdb->methods->tdb_oob(tdb, off + len, 0) != 0) {
+ return -1;
+ }
+
+ if (tdb->map_ptr) {
+ memcpy(buf, off + (char *)tdb->map_ptr, len);
+ } else {
+ ssize_t ret = pread(tdb->fd, buf, len, off);
+ if (ret != (ssize_t)len) {
+ /* Ensure ecode is set for log fn. */
+ tdb->ecode = TDB_ERR_IO;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_read failed at %d "
+ "len=%d ret=%d (%s) map_size=%d\n",
+ (int)off, (int)len, (int)ret, strerror(errno),
+ (int)tdb->map_size));
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+ }
+ }
+ if (cv) {
+ tdb_convert(buf, len);
+ }
+ return 0;
+}
+
+
+
+/*
+ do an unlocked scan of the hash table heads to find the next non-zero head. The value
+ will then be confirmed with the lock held
+*/
+static void tdb_next_hash_chain(struct tdb_context *tdb, u32 *chain)
+{
+ u32 h = *chain;
+ if (tdb->map_ptr) {
+ for (;h < tdb->header.hash_size;h++) {
+ if (0 != *(u32 *)(TDB_HASH_TOP(h) + (unsigned char *)tdb->map_ptr)) {
+ break;
+ }
+ }
+ } else {
+ u32 off=0;
+ for (;h < tdb->header.hash_size;h++) {
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(h), &off) != 0 || off != 0) {
+ break;
+ }
+ }
+ }
+ (*chain) = h;
+}
+
+
+int tdb_munmap(struct tdb_context *tdb)
+{
+ if (tdb->flags & TDB_INTERNAL)
+ return 0;
+
+#ifdef HAVE_MMAP
+ if (tdb->map_ptr) {
+ int ret = munmap(tdb->map_ptr, tdb->real_map_size);
+ if (ret != 0)
+ return ret;
+ tdb->real_map_size = 0;
+ }
+#endif
+ tdb->map_ptr = NULL;
+ return 0;
+}
+
+void tdb_mmap(struct tdb_context *tdb)
+{
+ if (tdb->flags & TDB_INTERNAL)
+ return;
+
+#ifdef HAVE_MMAP
+ if (!(tdb->flags & TDB_NOMMAP)) {
+ tdb->map_ptr = mmap(NULL, tdb->map_size,
+ PROT_READ|(tdb->read_only? 0:PROT_WRITE),
+ MAP_SHARED|MAP_FILE, tdb->fd, 0);
+
+ /*
+ * NB. When mmap fails it returns MAP_FAILED *NOT* NULL !!!!
+ */
+
+ if (tdb->map_ptr == MAP_FAILED) {
+ tdb->real_map_size = 0;
+ tdb->map_ptr = NULL;
+ TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_mmap failed for size %d (%s)\n",
+ tdb->map_size, strerror(errno)));
+ }
+ tdb->real_map_size = tdb->map_size;
+ } else {
+ tdb->map_ptr = NULL;
+ }
+#else
+ tdb->map_ptr = NULL;
+#endif
+}
+
+/* expand a file. we prefer to use ftruncate, as that is what posix
+ says to use for mmap expansion */
+static int tdb_expand_file(struct tdb_context *tdb, tdb_off_t size, tdb_off_t addition)
+{
+ char buf[1024];
+
+ if (tdb->read_only || tdb->traverse_read) {
+ tdb->ecode = TDB_ERR_RDONLY;
+ return -1;
+ }
+
+ if (ftruncate(tdb->fd, size+addition) == -1) {
+ char b = 0;
+ if (pwrite(tdb->fd, &b, 1, (size+addition) - 1) != 1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "expand_file to %d failed (%s)\n",
+ size+addition, strerror(errno)));
+ return -1;
+ }
+ }
+
+ /* now fill the file with something. This ensures that the
+ file isn't sparse, which would be very bad if we ran out of
+ disk. This must be done with write, not via mmap */
+ memset(buf, TDB_PAD_BYTE, sizeof(buf));
+ while (addition) {
+ int n = addition>sizeof(buf)?sizeof(buf):addition;
+ int ret = pwrite(tdb->fd, buf, n, size);
+ if (ret != n) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "expand_file write of %d failed (%s)\n",
+ n, strerror(errno)));
+ return -1;
+ }
+ addition -= n;
+ size += n;
+ }
+ return 0;
+}
+
+
+/* expand the database at least size bytes by expanding the underlying
+ file and doing the mmap again if necessary */
+int tdb_expand(struct tdb_context *tdb, tdb_off_t size)
+{
+ struct list_struct rec;
+ tdb_off_t offset;
+
+ if (tdb_lock(tdb, -1, F_WRLCK) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "lock failed in tdb_expand\n"));
+ return -1;
+ }
+
+ /* must know about any previous expansions by another process */
+ tdb->methods->tdb_oob(tdb, tdb->map_size + 1, 1);
+
+ /* always make room for at least 10 more records, and round
+ the database up to a multiple of the page size */
+ size = TDB_ALIGN(tdb->map_size + size*10, tdb->page_size) - tdb->map_size;
+
+ if (!(tdb->flags & TDB_INTERNAL))
+ tdb_munmap(tdb);
+
+ /*
+ * We must ensure the file is unmapped before doing this
+ * to ensure consistency with systems like OpenBSD where
+ * writes and mmaps are not consistent.
+ */
+
+ /* expand the file itself */
+ if (!(tdb->flags & TDB_INTERNAL)) {
+ if (tdb->methods->tdb_expand_file(tdb, tdb->map_size, size) != 0)
+ goto fail;
+ }
+
+ tdb->map_size += size;
+
+ if (tdb->flags & TDB_INTERNAL) {
+ char *new_map_ptr = (char *)realloc(tdb->map_ptr,
+ tdb->map_size);
+ if (!new_map_ptr) {
+ tdb->map_size -= size;
+ goto fail;
+ }
+ tdb->map_ptr = new_map_ptr;
+ } else {
+ /*
+ * We must ensure the file is remapped before adding the space
+ * to ensure consistency with systems like OpenBSD where
+ * writes and mmaps are not consistent.
+ */
+
+ /* We're ok if the mmap fails as we'll fallback to read/write */
+ tdb_mmap(tdb);
+ }
+
+ /* form a new freelist record */
+ memset(&rec,'\0',sizeof(rec));
+ rec.rec_len = size - sizeof(rec);
+
+ /* link it into the free list */
+ offset = tdb->map_size - size;
+ if (tdb_free(tdb, offset, &rec) == -1)
+ goto fail;
+
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return 0;
+ fail:
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return -1;
+}
+
+/* read/write a tdb_off_t */
+int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d)
+{
+ return tdb->methods->tdb_read(tdb, offset, (char*)d, sizeof(*d), DOCONV());
+}
+
+int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d)
+{
+ tdb_off_t off = *d;
+ return tdb->methods->tdb_write(tdb, offset, CONVERT(off), sizeof(*d));
+}
+
+
+/* read a lump of data, allocating the space for it */
+unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len)
+{
+ unsigned char *buf;
+
+ /* some systems don't like zero length malloc */
+ if (len == 0) {
+ len = 1;
+ }
+
+ if (!(buf = (unsigned char *)malloc(len))) {
+ /* Ensure ecode is set for log fn. */
+ tdb->ecode = TDB_ERR_OOM;
+ TDB_LOG((tdb, TDB_DEBUG_ERROR,"tdb_alloc_read malloc failed len=%d (%s)\n",
+ len, strerror(errno)));
+ return TDB_ERRCODE(TDB_ERR_OOM, buf);
+ }
+ if (tdb->methods->tdb_read(tdb, offset, buf, len, 0) == -1) {
+ SAFE_FREE(buf);
+ return NULL;
+ }
+ return buf;
+}
+
+/* Give a piece of tdb data to a parser */
+
+int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
+ tdb_off_t offset, tdb_len_t len,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data)
+{
+ TDB_DATA data;
+ int result;
+
+ data.dsize = len;
+
+ if ((tdb->transaction == NULL) && (tdb->map_ptr != NULL)) {
+ /*
+ * Optimize by avoiding the malloc/memcpy/free, point the
+ * parser directly at the mmap area.
+ */
+ if (tdb->methods->tdb_oob(tdb, offset+len, 0) != 0) {
+ return -1;
+ }
+ data.dptr = offset + (unsigned char *)tdb->map_ptr;
+ return parser(key, data, private_data);
+ }
+
+ if (!(data.dptr = tdb_alloc_read(tdb, offset, len))) {
+ return -1;
+ }
+
+ result = parser(key, data, private_data);
+ free(data.dptr);
+ return result;
+}
+
+/* read/write a record */
+int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec)
+{
+ if (tdb->methods->tdb_read(tdb, offset, rec, sizeof(*rec),DOCONV()) == -1)
+ return -1;
+ if (TDB_BAD_MAGIC(rec)) {
+ /* Ensure ecode is set for log fn. */
+ tdb->ecode = TDB_ERR_CORRUPT;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_rec_read bad magic 0x%x at offset=%d\n", rec->magic, offset));
+ return TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+ }
+ return tdb->methods->tdb_oob(tdb, rec->next+sizeof(*rec), 0);
+}
+
+int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec)
+{
+ struct list_struct r = *rec;
+ return tdb->methods->tdb_write(tdb, offset, CONVERT(r), sizeof(r));
+}
+
+static const struct tdb_methods io_methods = {
+ tdb_read,
+ tdb_write,
+ tdb_next_hash_chain,
+ tdb_oob,
+ tdb_expand_file,
+ tdb_brlock
+};
+
+/*
+ initialise the default methods table
+*/
+void tdb_io_init(struct tdb_context *tdb)
+{
+ tdb->methods = &io_methods;
+}
+
+/* file: transaction.c */
+
+/*
+ transaction design:
+
+ - only allow a single transaction at a time per database. This makes
+ using the transaction API simpler, as otherwise the caller would
+ have to cope with temporary failures in transactions that conflict
+ with other current transactions
+
+ - keep the transaction recovery information in the same file as the
+ database, using a special 'transaction recovery' record pointed at
+ by the header. This removes the need for extra journal files as
+ used by some other databases
+
+ - dynamically allocated the transaction recover record, re-using it
+ for subsequent transactions. If a larger record is needed then
+ tdb_free() the old record to place it on the normal tdb freelist
+ before allocating the new record
+
+ - during transactions, keep a linked list of writes all that have
+ been performed by intercepting all tdb_write() calls. The hooked
+ transaction versions of tdb_read() and tdb_write() check this
+ linked list and try to use the elements of the list in preference
+ to the real database.
+
+ - don't allow any locks to be held when a transaction starts,
+ otherwise we can end up with deadlock (plus lack of lock nesting
+ in posix locks would mean the lock is lost)
+
+ - if the caller gains a lock during the transaction but doesn't
+ release it then fail the commit
+
+ - allow for nested calls to tdb_transaction_start(), re-using the
+ existing transaction record. If the inner transaction is cancelled
+ then a subsequent commit will fail
+
+ - keep a mirrored copy of the tdb hash chain heads to allow for the
+ fast hash heads scan on traverse, updating the mirrored copy in
+ the transaction version of tdb_write
+
+ - allow callers to mix transaction and non-transaction use of tdb,
+ although once a transaction is started then an exclusive lock is
+ gained until the transaction is committed or cancelled
+
+ - the commit strategy involves first saving away all modified data
+ into a linearised buffer in the transaction recovery area, then
+ marking the transaction recovery area with a magic value to
+ indicate a valid recovery record. In total 4 fsync/msync calls are
+ needed per commit to prevent race conditions. It might be possible
+ to reduce this to 3 or even 2 with some more work.
+
+ - check for a valid recovery record on open of the tdb, while the
+ global lock is held. Automatically recover from the transaction
+ recovery area if needed, then continue with the open as
+ usual. This allows for smooth crash recovery with no administrator
+ intervention.
+
+ - if TDB_NOSYNC is passed to flags in tdb_open then transactions are
+ still available, but no transaction recovery area is used and no
+ fsync/msync calls are made.
+
+*/
+
+struct tdb_transaction_el {
+ struct tdb_transaction_el *next, *prev;
+ tdb_off_t offset;
+ tdb_len_t length;
+ unsigned char *data;
+};
+
+/*
+ hold the context of any current transaction
+*/
+struct tdb_transaction {
+ /* we keep a mirrored copy of the tdb hash heads here so
+ tdb_next_hash_chain() can operate efficiently */
+ u32 *hash_heads;
+
+ /* the original io methods - used to do IOs to the real db */
+ const struct tdb_methods *io_methods;
+
+ /* the list of transaction elements. We use a doubly linked
+ list with a last pointer to allow us to keep the list
+ ordered, with first element at the front of the list. It
+ needs to be doubly linked as the read/write traversals need
+ to be backwards, while the commit needs to be forwards */
+ struct tdb_transaction_el *elements, *elements_last;
+
+ /* non-zero when an internal transaction error has
+ occurred. All write operations will then fail until the
+ transaction is ended */
+ int transaction_error;
+
+ /* when inside a transaction we need to keep track of any
+ nested tdb_transaction_start() calls, as these are allowed,
+ but don't create a new transaction */
+ int nesting;
+
+ /* old file size before transaction */
+ tdb_len_t old_map_size;
+};
+
+
+/*
+ read while in a transaction. We need to check first if the data is in our list
+ of transaction elements, then if not do a real read
+*/
+static int transaction_read(struct tdb_context *tdb, tdb_off_t off, void *buf,
+ tdb_len_t len, int cv)
+{
+ struct tdb_transaction_el *el;
+
+ /* we need to walk the list backwards to get the most recent data */
+ for (el=tdb->transaction->elements_last;el;el=el->prev) {
+ tdb_len_t partial;
+
+ if (off+len <= el->offset) {
+ continue;
+ }
+ if (off >= el->offset + el->length) {
+ continue;
+ }
+
+ /* an overlapping read - needs to be split into up to
+ 2 reads and a memcpy */
+ if (off < el->offset) {
+ partial = el->offset - off;
+ if (transaction_read(tdb, off, buf, partial, cv) != 0) {
+ goto fail;
+ }
+ len -= partial;
+ off += partial;
+ buf = (void *)(partial + (char *)buf);
+ }
+ if (off + len <= el->offset + el->length) {
+ partial = len;
+ } else {
+ partial = el->offset + el->length - off;
+ }
+ memcpy(buf, el->data + (off - el->offset), partial);
+ if (cv) {
+ tdb_convert(buf, len);
+ }
+ len -= partial;
+ off += partial;
+ buf = (void *)(partial + (char *)buf);
+
+ if (len != 0 && transaction_read(tdb, off, buf, len, cv) != 0) {
+ goto fail;
+ }
+
+ return 0;
+ }
+
+ /* its not in the transaction elements - do a real read */
+ return tdb->transaction->io_methods->tdb_read(tdb, off, buf, len, cv);
+
+fail:
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "transaction_read: failed at off=%d len=%d\n", off, len));
+ tdb->ecode = TDB_ERR_IO;
+ tdb->transaction->transaction_error = 1;
+ return -1;
+}
+
+
+/*
+ write while in a transaction
+*/
+static int transaction_write(struct tdb_context *tdb, tdb_off_t off,
+ const void *buf, tdb_len_t len)
+{
+ struct tdb_transaction_el *el, *best_el=NULL;
+
+ if (len == 0) {
+ return 0;
+ }
+
+ /* if the write is to a hash head, then update the transaction
+ hash heads */
+ if (len == sizeof(tdb_off_t) && off >= FREELIST_TOP &&
+ off < FREELIST_TOP+TDB_HASHTABLE_SIZE(tdb)) {
+ u32 chain = (off-FREELIST_TOP) / sizeof(tdb_off_t);
+ memcpy(&tdb->transaction->hash_heads[chain], buf, len);
+ }
+
+ /* first see if we can replace an existing entry */
+ for (el=tdb->transaction->elements_last;el;el=el->prev) {
+ tdb_len_t partial;
+
+ if (best_el == NULL && off == el->offset+el->length) {
+ best_el = el;
+ }
+
+ if (off+len <= el->offset) {
+ continue;
+ }
+ if (off >= el->offset + el->length) {
+ continue;
+ }
+
+ /* an overlapping write - needs to be split into up to
+ 2 writes and a memcpy */
+ if (off < el->offset) {
+ partial = el->offset - off;
+ if (transaction_write(tdb, off, buf, partial) != 0) {
+ goto fail;
+ }
+ len -= partial;
+ off += partial;
+ buf = (const void *)(partial + (const char *)buf);
+ }
+ if (off + len <= el->offset + el->length) {
+ partial = len;
+ } else {
+ partial = el->offset + el->length - off;
+ }
+ memcpy(el->data + (off - el->offset), buf, partial);
+ len -= partial;
+ off += partial;
+ buf = (const void *)(partial + (const char *)buf);
+
+ if (len != 0 && transaction_write(tdb, off, buf, len) != 0) {
+ goto fail;
+ }
+
+ return 0;
+ }
+
+ /* see if we can append the new entry to an existing entry */
+ if (best_el && best_el->offset + best_el->length == off &&
+ (off+len < tdb->transaction->old_map_size ||
+ off > tdb->transaction->old_map_size)) {
+ unsigned char *data = best_el->data;
+ el = best_el;
+ el->data = (unsigned char *)realloc(el->data,
+ el->length + len);
+ if (el->data == NULL) {
+ tdb->ecode = TDB_ERR_OOM;
+ tdb->transaction->transaction_error = 1;
+ el->data = data;
+ return -1;
+ }
+ if (buf) {
+ memcpy(el->data + el->length, buf, len);
+ } else {
+ memset(el->data + el->length, TDB_PAD_BYTE, len);
+ }
+ el->length += len;
+ return 0;
+ }
+
+ /* add a new entry at the end of the list */
+ el = (struct tdb_transaction_el *)malloc(sizeof(*el));
+ if (el == NULL) {
+ tdb->ecode = TDB_ERR_OOM;
+ tdb->transaction->transaction_error = 1;
+ return -1;
+ }
+ el->next = NULL;
+ el->prev = tdb->transaction->elements_last;
+ el->offset = off;
+ el->length = len;
+ el->data = (unsigned char *)malloc(len);
+ if (el->data == NULL) {
+ free(el);
+ tdb->ecode = TDB_ERR_OOM;
+ tdb->transaction->transaction_error = 1;
+ return -1;
+ }
+ if (buf) {
+ memcpy(el->data, buf, len);
+ } else {
+ memset(el->data, TDB_PAD_BYTE, len);
+ }
+ if (el->prev) {
+ el->prev->next = el;
+ } else {
+ tdb->transaction->elements = el;
+ }
+ tdb->transaction->elements_last = el;
+ return 0;
+
+fail:
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "transaction_write: failed at off=%d len=%d\n", off, len));
+ tdb->ecode = TDB_ERR_IO;
+ tdb->transaction->transaction_error = 1;
+ return -1;
+}
+
+/*
+ accelerated hash chain head search, using the cached hash heads
+*/
+static void transaction_next_hash_chain(struct tdb_context *tdb, u32 *chain)
+{
+ u32 h = *chain;
+ for (;h < tdb->header.hash_size;h++) {
+ /* the +1 takes account of the freelist */
+ if (0 != tdb->transaction->hash_heads[h+1]) {
+ break;
+ }
+ }
+ (*chain) = h;
+}
+
+/*
+ out of bounds check during a transaction
+*/
+static int transaction_oob(struct tdb_context *tdb, tdb_off_t len,
+ int probe EXT2FS_ATTR((unused)))
+{
+ if (len <= tdb->map_size) {
+ return 0;
+ }
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+}
+
+/*
+ transaction version of tdb_expand().
+*/
+static int transaction_expand_file(struct tdb_context *tdb, tdb_off_t size,
+ tdb_off_t addition)
+{
+ /* add a write to the transaction elements, so subsequent
+ reads see the zero data */
+ if (transaction_write(tdb, size, NULL, addition) != 0) {
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ brlock during a transaction - ignore them
+*/
+static int transaction_brlock(struct tdb_context *tdb EXT2FS_ATTR((unused)),
+ tdb_off_t offset EXT2FS_ATTR((unused)),
+ int rw_type EXT2FS_ATTR((unused)),
+ int lck_type EXT2FS_ATTR((unused)),
+ int probe EXT2FS_ATTR((unused)),
+ size_t len EXT2FS_ATTR((unused)))
+{
+ return 0;
+}
+
+static const struct tdb_methods transaction_methods = {
+ transaction_read,
+ transaction_write,
+ transaction_next_hash_chain,
+ transaction_oob,
+ transaction_expand_file,
+ transaction_brlock
+};
+
+
+/*
+ start a tdb transaction. No token is returned, as only a single
+ transaction is allowed to be pending per tdb_context
+*/
+int tdb_transaction_start(struct tdb_context *tdb)
+{
+ /* some sanity checks */
+ if (tdb->read_only || (tdb->flags & TDB_INTERNAL) || tdb->traverse_read) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: cannot start a transaction on a read-only or internal db\n"));
+ tdb->ecode = TDB_ERR_EINVAL;
+ return -1;
+ }
+
+ /* cope with nested tdb_transaction_start() calls */
+ if (tdb->transaction != NULL) {
+ tdb->transaction->nesting++;
+ TDB_LOG((tdb, TDB_DEBUG_TRACE, "tdb_transaction_start: nesting %d\n",
+ tdb->transaction->nesting));
+ return 0;
+ }
+
+ if (tdb->num_locks != 0 || tdb->global_lock.count) {
+ /* the caller must not have any locks when starting a
+ transaction as otherwise we'll be screwed by lack
+ of nested locks in posix */
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: cannot start a transaction with locks held\n"));
+ tdb->ecode = TDB_ERR_LOCK;
+ return -1;
+ }
+
+ if (tdb->travlocks.next != NULL) {
+ /* you cannot use transactions inside a traverse (although you can use
+ traverse inside a transaction) as otherwise you can end up with
+ deadlock */
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: cannot start a transaction within a traverse\n"));
+ tdb->ecode = TDB_ERR_LOCK;
+ return -1;
+ }
+
+ tdb->transaction = (struct tdb_transaction *)
+ calloc(sizeof(struct tdb_transaction), 1);
+ if (tdb->transaction == NULL) {
+ tdb->ecode = TDB_ERR_OOM;
+ return -1;
+ }
+
+ /* get the transaction write lock. This is a blocking lock. As
+ discussed with Volker, there are a number of ways we could
+ make this async, which we will probably do in the future */
+ if (tdb_transaction_lock(tdb, F_WRLCK) == -1) {
+ SAFE_FREE(tdb->transaction);
+ return -1;
+ }
+
+ /* get a read lock from the freelist to the end of file. This
+ is upgraded to a write lock during the commit */
+ if (tdb_brlock(tdb, FREELIST_TOP, F_RDLCK, F_SETLKW, 0, 0) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to get hash locks\n"));
+ tdb->ecode = TDB_ERR_LOCK;
+ goto fail;
+ }
+
+ /* setup a copy of the hash table heads so the hash scan in
+ traverse can be fast */
+ tdb->transaction->hash_heads = (u32 *)
+ calloc(tdb->header.hash_size+1, sizeof(u32));
+ if (tdb->transaction->hash_heads == NULL) {
+ tdb->ecode = TDB_ERR_OOM;
+ goto fail;
+ }
+ if (tdb->methods->tdb_read(tdb, FREELIST_TOP, tdb->transaction->hash_heads,
+ TDB_HASHTABLE_SIZE(tdb), 0) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_start: failed to read hash heads\n"));
+ tdb->ecode = TDB_ERR_IO;
+ goto fail;
+ }
+
+ /* make sure we know about any file expansions already done by
+ anyone else */
+ tdb->methods->tdb_oob(tdb, tdb->map_size + 1, 1);
+ tdb->transaction->old_map_size = tdb->map_size;
+
+ /* finally hook the io methods, replacing them with
+ transaction specific methods */
+ tdb->transaction->io_methods = tdb->methods;
+ tdb->methods = &transaction_methods;
+
+ /* by calling this transaction write here, we ensure that we don't grow the
+ transaction linked list due to hash table updates */
+ if (transaction_write(tdb, FREELIST_TOP, tdb->transaction->hash_heads,
+ TDB_HASHTABLE_SIZE(tdb)) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_start: failed to prime hash table\n"));
+ tdb->ecode = TDB_ERR_IO;
+ tdb->methods = tdb->transaction->io_methods;
+ goto fail;
+ }
+
+ return 0;
+
+fail:
+ tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0);
+ tdb_transaction_unlock(tdb);
+ SAFE_FREE(tdb->transaction->hash_heads);
+ SAFE_FREE(tdb->transaction);
+ return -1;
+}
+
+
+/*
+ cancel the current transaction
+*/
+int tdb_transaction_cancel(struct tdb_context *tdb)
+{
+ if (tdb->transaction == NULL) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_cancel: no transaction\n"));
+ return -1;
+ }
+
+ if (tdb->transaction->nesting != 0) {
+ tdb->transaction->transaction_error = 1;
+ tdb->transaction->nesting--;
+ return 0;
+ }
+
+ tdb->map_size = tdb->transaction->old_map_size;
+
+ /* free all the transaction elements */
+ while (tdb->transaction->elements) {
+ struct tdb_transaction_el *el = tdb->transaction->elements;
+ tdb->transaction->elements = el->next;
+ free(el->data);
+ free(el);
+ }
+
+ /* remove any global lock created during the transaction */
+ if (tdb->global_lock.count != 0) {
+ tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 4*tdb->header.hash_size);
+ tdb->global_lock.count = 0;
+ }
+
+ /* remove any locks created during the transaction */
+ if (tdb->num_locks != 0) {
+ int i;
+ for (i=0;i<tdb->num_lockrecs;i++) {
+ tdb_brlock(tdb,FREELIST_TOP+4*tdb->lockrecs[i].list,
+ F_UNLCK,F_SETLKW, 0, 1);
+ }
+ tdb->num_locks = 0;
+ tdb->num_lockrecs = 0;
+ SAFE_FREE(tdb->lockrecs);
+ }
+
+ /* restore the normal io methods */
+ tdb->methods = tdb->transaction->io_methods;
+
+ tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0);
+ tdb_transaction_unlock(tdb);
+ SAFE_FREE(tdb->transaction->hash_heads);
+ SAFE_FREE(tdb->transaction);
+
+ return 0;
+}
+
+/*
+ sync to disk
+*/
+static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t length)
+{
+ if (fsync(tdb->fd) != 0) {
+ tdb->ecode = TDB_ERR_IO;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction: fsync failed\n"));
+ return -1;
+ }
+#if defined(HAVE_MSYNC) && defined(MS_SYNC)
+ if (tdb->map_ptr) {
+ tdb_off_t moffset = offset & ~(tdb->page_size-1);
+ if (msync(moffset + (char *)tdb->map_ptr,
+ length + (offset - moffset), MS_SYNC) != 0) {
+ tdb->ecode = TDB_ERR_IO;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction: msync failed - %s\n",
+ strerror(errno)));
+ return -1;
+ }
+ }
+#endif
+ return 0;
+}
+
+
+/*
+ work out how much space the linearised recovery data will consume
+*/
+static tdb_len_t tdb_recovery_size(struct tdb_context *tdb)
+{
+ struct tdb_transaction_el *el;
+ tdb_len_t recovery_size = 0;
+
+ recovery_size = sizeof(u32);
+ for (el=tdb->transaction->elements;el;el=el->next) {
+ if (el->offset >= tdb->transaction->old_map_size) {
+ continue;
+ }
+ recovery_size += 2*sizeof(tdb_off_t) + el->length;
+ }
+
+ return recovery_size;
+}
+
+/*
+ allocate the recovery area, or use an existing recovery area if it is
+ large enough
+*/
+static int tdb_recovery_allocate(struct tdb_context *tdb,
+ tdb_len_t *recovery_size,
+ tdb_off_t *recovery_offset,
+ tdb_len_t *recovery_max_size)
+{
+ struct list_struct rec;
+ const struct tdb_methods *methods = tdb->transaction->io_methods;
+ tdb_off_t recovery_head;
+
+ if (tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, &recovery_head) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to read recovery head\n"));
+ return -1;
+ }
+
+ rec.rec_len = 0;
+
+ if (recovery_head != 0 &&
+ methods->tdb_read(tdb, recovery_head, &rec, sizeof(rec), DOCONV()) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to read recovery record\n"));
+ return -1;
+ }
+
+ *recovery_size = tdb_recovery_size(tdb);
+
+ if (recovery_head != 0 && *recovery_size <= rec.rec_len) {
+ /* it fits in the existing area */
+ *recovery_max_size = rec.rec_len;
+ *recovery_offset = recovery_head;
+ return 0;
+ }
+
+ /* we need to free up the old recovery area, then allocate a
+ new one at the end of the file. Note that we cannot use
+ tdb_allocate() to allocate the new one as that might return
+ us an area that is being currently used (as of the start of
+ the transaction) */
+ if (recovery_head != 0) {
+ if (tdb_free(tdb, recovery_head, &rec) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to free previous recovery area\n"));
+ return -1;
+ }
+ }
+
+ /* the tdb_free() call might have increased the recovery size */
+ *recovery_size = tdb_recovery_size(tdb);
+
+ /* round up to a multiple of page size */
+ *recovery_max_size = TDB_ALIGN(sizeof(rec) + *recovery_size, tdb->page_size) - sizeof(rec);
+ *recovery_offset = tdb->map_size;
+ recovery_head = *recovery_offset;
+
+ if (methods->tdb_expand_file(tdb, tdb->transaction->old_map_size,
+ (tdb->map_size - tdb->transaction->old_map_size) +
+ sizeof(rec) + *recovery_max_size) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to create recovery area\n"));
+ return -1;
+ }
+
+ /* remap the file (if using mmap) */
+ methods->tdb_oob(tdb, tdb->map_size + 1, 1);
+
+ /* we have to reset the old map size so that we don't try to expand the file
+ again in the transaction commit, which would destroy the recovery area */
+ tdb->transaction->old_map_size = tdb->map_size;
+
+ /* write the recovery header offset and sync - we can sync without a race here
+ as the magic ptr in the recovery record has not been set */
+ CONVERT(recovery_head);
+ if (methods->tdb_write(tdb, TDB_RECOVERY_HEAD,
+ &recovery_head, sizeof(tdb_off_t)) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to write recovery head\n"));
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/*
+ setup the recovery data that will be used on a crash during commit
+*/
+static int transaction_setup_recovery(struct tdb_context *tdb,
+ tdb_off_t *magic_offset)
+{
+ struct tdb_transaction_el *el;
+ tdb_len_t recovery_size;
+ unsigned char *data, *p;
+ const struct tdb_methods *methods = tdb->transaction->io_methods;
+ struct list_struct *rec;
+ tdb_off_t recovery_offset, recovery_max_size;
+ tdb_off_t old_map_size = tdb->transaction->old_map_size;
+ u32 magic, tailer;
+
+ /*
+ check that the recovery area has enough space
+ */
+ if (tdb_recovery_allocate(tdb, &recovery_size,
+ &recovery_offset, &recovery_max_size) == -1) {
+ return -1;
+ }
+
+ data = (unsigned char *)malloc(recovery_size + sizeof(*rec));
+ if (data == NULL) {
+ tdb->ecode = TDB_ERR_OOM;
+ return -1;
+ }
+
+ rec = (struct list_struct *)data;
+ memset(rec, 0, sizeof(*rec));
+
+ rec->magic = 0;
+ rec->data_len = recovery_size;
+ rec->rec_len = recovery_max_size;
+ rec->key_len = old_map_size;
+ CONVERT(rec);
+
+ /* build the recovery data into a single blob to allow us to do a single
+ large write, which should be more efficient */
+ p = data + sizeof(*rec);
+ for (el=tdb->transaction->elements;el;el=el->next) {
+ if (el->offset >= old_map_size) {
+ continue;
+ }
+ if (el->offset + el->length > tdb->transaction->old_map_size) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_setup_recovery: transaction data over new region boundary\n"));
+ free(data);
+ tdb->ecode = TDB_ERR_CORRUPT;
+ return -1;
+ }
+ memcpy(p, &el->offset, 4);
+ memcpy(p+4, &el->length, 4);
+ if (DOCONV()) {
+ tdb_convert(p, 8);
+ }
+ /* the recovery area contains the old data, not the
+ new data, so we have to call the original tdb_read
+ method to get it */
+ if (methods->tdb_read(tdb, el->offset, p + 8, el->length, 0) != 0) {
+ free(data);
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+ p += 8 + el->length;
+ }
+
+ /* and the tailer */
+ tailer = sizeof(*rec) + recovery_max_size;
+ memcpy(p, &tailer, 4);
+ CONVERT(p);
+
+ /* write the recovery data to the recovery area */
+ if (methods->tdb_write(tdb, recovery_offset, data, sizeof(*rec) + recovery_size) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_setup_recovery: failed to write recovery data\n"));
+ free(data);
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+
+ /* as we don't have ordered writes, we have to sync the recovery
+ data before we update the magic to indicate that the recovery
+ data is present */
+ if (transaction_sync(tdb, recovery_offset, sizeof(*rec) + recovery_size) == -1) {
+ free(data);
+ return -1;
+ }
+
+ free(data);
+
+ magic = TDB_RECOVERY_MAGIC;
+ CONVERT(magic);
+
+ *magic_offset = recovery_offset + offsetof(struct list_struct, magic);
+
+ if (methods->tdb_write(tdb, *magic_offset, &magic, sizeof(magic)) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_setup_recovery: failed to write recovery magic\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+
+ /* ensure the recovery magic marker is on disk */
+ if (transaction_sync(tdb, *magic_offset, sizeof(magic)) == -1) {
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ commit the current transaction
+*/
+int tdb_transaction_commit(struct tdb_context *tdb)
+{
+ const struct tdb_methods *methods;
+ tdb_off_t magic_offset = 0;
+ u32 zero = 0;
+
+ if (tdb->transaction == NULL) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_commit: no transaction\n"));
+ return -1;
+ }
+
+ if (tdb->transaction->transaction_error) {
+ tdb->ecode = TDB_ERR_IO;
+ tdb_transaction_cancel(tdb);
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_commit: transaction error pending\n"));
+ return -1;
+ }
+
+ if (tdb->transaction->nesting != 0) {
+ tdb->transaction->nesting--;
+ return 0;
+ }
+
+ /* check for a null transaction */
+ if (tdb->transaction->elements == NULL) {
+ tdb_transaction_cancel(tdb);
+ return 0;
+ }
+
+ methods = tdb->transaction->io_methods;
+
+ /* if there are any locks pending then the caller has not
+ nested their locks properly, so fail the transaction */
+ if (tdb->num_locks || tdb->global_lock.count) {
+ tdb->ecode = TDB_ERR_LOCK;
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_commit: locks pending on commit\n"));
+ tdb_transaction_cancel(tdb);
+ return -1;
+ }
+
+ /* upgrade the main transaction lock region to a write lock */
+ if (tdb_brlock_upgrade(tdb, FREELIST_TOP, 0) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to upgrade hash locks\n"));
+ tdb->ecode = TDB_ERR_LOCK;
+ tdb_transaction_cancel(tdb);
+ return -1;
+ }
+
+ /* get the global lock - this prevents new users attaching to the database
+ during the commit */
+ if (tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_commit: failed to get global lock\n"));
+ tdb->ecode = TDB_ERR_LOCK;
+ tdb_transaction_cancel(tdb);
+ return -1;
+ }
+
+ if (!(tdb->flags & TDB_NOSYNC)) {
+ /* write the recovery data to the end of the file */
+ if (transaction_setup_recovery(tdb, &magic_offset) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_commit: failed to setup recovery data\n"));
+ tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+ tdb_transaction_cancel(tdb);
+ return -1;
+ }
+ }
+
+ /* expand the file to the new size if needed */
+ if (tdb->map_size != tdb->transaction->old_map_size) {
+ if (methods->tdb_expand_file(tdb, tdb->transaction->old_map_size,
+ tdb->map_size -
+ tdb->transaction->old_map_size) == -1) {
+ tdb->ecode = TDB_ERR_IO;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_commit: expansion failed\n"));
+ tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+ tdb_transaction_cancel(tdb);
+ return -1;
+ }
+ tdb->map_size = tdb->transaction->old_map_size;
+ methods->tdb_oob(tdb, tdb->map_size + 1, 1);
+ }
+
+ /* perform all the writes */
+ while (tdb->transaction->elements) {
+ struct tdb_transaction_el *el = tdb->transaction->elements;
+
+ if (methods->tdb_write(tdb, el->offset, el->data, el->length) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_commit: write failed during commit\n"));
+
+ /* we've overwritten part of the data and
+ possibly expanded the file, so we need to
+ run the crash recovery code */
+ tdb->methods = methods;
+ tdb_transaction_recover(tdb);
+
+ tdb_transaction_cancel(tdb);
+ tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_commit: write failed\n"));
+ return -1;
+ }
+ tdb->transaction->elements = el->next;
+ free(el->data);
+ free(el);
+ }
+
+ if (!(tdb->flags & TDB_NOSYNC)) {
+ /* ensure the new data is on disk */
+ if (transaction_sync(tdb, 0, tdb->map_size) == -1) {
+ return -1;
+ }
+
+ /* remove the recovery marker */
+ if (methods->tdb_write(tdb, magic_offset, &zero, 4) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_commit: failed to remove recovery magic\n"));
+ return -1;
+ }
+
+ /* ensure the recovery marker has been removed on disk */
+ if (transaction_sync(tdb, magic_offset, 4) == -1) {
+ return -1;
+ }
+ }
+
+ tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+
+ /*
+ TODO: maybe write to some dummy hdr field, or write to magic
+ offset without mmap, before the last sync, instead of the
+ utime() call
+ */
+
+ /* on some systems (like Linux 2.6.x) changes via mmap/msync
+ don't change the mtime of the file, this means the file may
+ not be backed up (as tdb rounding to block sizes means that
+ file size changes are quite rare too). The following forces
+ mtime changes when a transaction completes */
+#ifdef HAVE_UTIME
+ utime(tdb->name, NULL);
+#endif
+
+ /* use a transaction cancel to free memory and remove the
+ transaction locks */
+ tdb_transaction_cancel(tdb);
+ return 0;
+}
+
+
+/*
+ recover from an aborted transaction. Must be called with exclusive
+ database write access already established (including the global
+ lock to prevent new processes attaching)
+*/
+int tdb_transaction_recover(struct tdb_context *tdb)
+{
+ tdb_off_t recovery_head, recovery_eof;
+ unsigned char *data, *p;
+ u32 zero = 0;
+ struct list_struct rec;
+
+ /* find the recovery area */
+ if (tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, &recovery_head) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery head\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+
+ if (recovery_head == 0) {
+ /* we have never allocated a recovery record */
+ return 0;
+ }
+
+ /* read the recovery record */
+ if (tdb->methods->tdb_read(tdb, recovery_head, &rec,
+ sizeof(rec), DOCONV()) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery record\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+
+ if (rec.magic != TDB_RECOVERY_MAGIC) {
+ /* there is no valid recovery data */
+ return 0;
+ }
+
+ if (tdb->read_only) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: attempt to recover read only database\n"));
+ tdb->ecode = TDB_ERR_CORRUPT;
+ return -1;
+ }
+
+ recovery_eof = rec.key_len;
+
+ data = (unsigned char *)malloc(rec.data_len);
+ if (data == NULL) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to allocate recovery data\n"));
+ tdb->ecode = TDB_ERR_OOM;
+ return -1;
+ }
+
+ /* read the full recovery data */
+ if (tdb->methods->tdb_read(tdb, recovery_head + sizeof(rec), data,
+ rec.data_len, 0) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery data\n"));
+ tdb->ecode = TDB_ERR_IO;
+ free(data);
+ return -1;
+ }
+
+ /* recover the file data */
+ p = data;
+ while (p+8 < data + rec.data_len) {
+ u32 ofs, len;
+ if (DOCONV()) {
+ tdb_convert(p, 8);
+ }
+ memcpy(&ofs, p, 4);
+ memcpy(&len, p+4, 4);
+
+ if (tdb->methods->tdb_write(tdb, ofs, p+8, len) == -1) {
+ free(data);
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to recover %d bytes at offset %d\n", len, ofs));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+ p += 8 + len;
+ }
+
+ free(data);
+
+ if (transaction_sync(tdb, 0, tdb->map_size) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to sync recovery\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+
+ /* if the recovery area is after the recovered eof then remove it */
+ if (recovery_eof <= recovery_head) {
+ if (tdb_ofs_write(tdb, TDB_RECOVERY_HEAD, &zero) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to remove recovery head\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+ }
+
+ /* remove the recovery magic */
+ if (tdb_ofs_write(tdb, recovery_head + offsetof(struct list_struct, magic),
+ &zero) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to remove recovery magic\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+
+ /* reduce the file size to the old size */
+ tdb_munmap(tdb);
+ if (ftruncate(tdb->fd, recovery_eof) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to reduce to recovery size\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+ tdb->map_size = recovery_eof;
+ tdb_mmap(tdb);
+
+ if (transaction_sync(tdb, 0, recovery_eof) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to sync2 recovery\n"));
+ tdb->ecode = TDB_ERR_IO;
+ return -1;
+ }
+
+ TDB_LOG((tdb, TDB_DEBUG_TRACE, "tdb_transaction_recover: recovered %d byte database\n",
+ recovery_eof));
+
+ /* all done */
+ return 0;
+}
+
+/* file: freelist.c */
+
+/* read a freelist record and check for simple errors */
+static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
+{
+ if (tdb->methods->tdb_read(tdb, off, rec, sizeof(*rec),DOCONV()) == -1)
+ return -1;
+
+ if (rec->magic == TDB_MAGIC) {
+ /* this happens when a app is showdown while deleting a record - we should
+ not completely fail when this happens */
+ TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_rec_free_read non-free magic 0x%x at offset=%d - fixing\n",
+ rec->magic, off));
+ rec->magic = TDB_FREE_MAGIC;
+ if (tdb->methods->tdb_write(tdb, off, rec, sizeof(*rec)) == -1)
+ return -1;
+ }
+
+ if (rec->magic != TDB_FREE_MAGIC) {
+ /* Ensure ecode is set for log fn. */
+ tdb->ecode = TDB_ERR_CORRUPT;
+ TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_rec_free_read bad magic 0x%x at offset=%d\n",
+ rec->magic, off));
+ return TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+ }
+ if (tdb->methods->tdb_oob(tdb, rec->next+sizeof(*rec), 0) != 0)
+ return -1;
+ return 0;
+}
+
+
+
+/* Remove an element from the freelist. Must have alloc lock. */
+static int remove_from_freelist(struct tdb_context *tdb, tdb_off_t off, tdb_off_t next)
+{
+ tdb_off_t last_ptr, i;
+
+ /* read in the freelist top */
+ last_ptr = FREELIST_TOP;
+ while (tdb_ofs_read(tdb, last_ptr, &i) != -1 && i != 0) {
+ if (i == off) {
+ /* We've found it! */
+ return tdb_ofs_write(tdb, last_ptr, &next);
+ }
+ /* Follow chain (next offset is at start of record) */
+ last_ptr = i;
+ }
+ TDB_LOG((tdb, TDB_DEBUG_FATAL,"remove_from_freelist: not on list at off=%d\n", off));
+ return TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+}
+
+
+/* update a record tailer (must hold allocation lock) */
+static int update_tailer(struct tdb_context *tdb, tdb_off_t offset,
+ const struct list_struct *rec)
+{
+ tdb_off_t totalsize;
+
+ /* Offset of tailer from record header */
+ totalsize = sizeof(*rec) + rec->rec_len;
+ return tdb_ofs_write(tdb, offset + totalsize - sizeof(tdb_off_t),
+ &totalsize);
+}
+
+/* Add an element into the freelist. Merge adjacent records if
+ necessary. */
+int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec)
+{
+ tdb_off_t right, left;
+
+ /* Allocation and tailer lock */
+ if (tdb_lock(tdb, -1, F_WRLCK) != 0)
+ return -1;
+
+ /* set an initial tailer, so if we fail we don't leave a bogus record */
+ if (update_tailer(tdb, offset, rec) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free: update_tailer failed!\n"));
+ goto fail;
+ }
+
+ /* Look right first (I'm an Australian, dammit) */
+ right = offset + sizeof(*rec) + rec->rec_len;
+ if (right + sizeof(*rec) <= tdb->map_size) {
+ struct list_struct r;
+
+ if (tdb->methods->tdb_read(tdb, right, &r, sizeof(r), DOCONV()) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free: right read failed at %u\n", right));
+ goto left;
+ }
+
+ /* If it's free, expand to include it. */
+ if (r.magic == TDB_FREE_MAGIC) {
+ if (remove_from_freelist(tdb, right, r.next) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free: right free failed at %u\n", right));
+ goto left;
+ }
+ rec->rec_len += sizeof(r) + r.rec_len;
+ }
+ }
+
+left:
+ /* Look left */
+ left = offset - sizeof(tdb_off_t);
+ if (left > TDB_DATA_START(tdb->header.hash_size)) {
+ struct list_struct l;
+ tdb_off_t leftsize;
+
+ /* Read in tailer and jump back to header */
+ if (tdb_ofs_read(tdb, left, &leftsize) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free: left offset read failed at %u\n", left));
+ goto update;
+ }
+
+ /* it could be uninitialised data */
+ if (leftsize == 0 || leftsize == TDB_PAD_U32) {
+ goto update;
+ }
+
+ left = offset - leftsize;
+
+ /* Now read in record */
+ if (tdb->methods->tdb_read(tdb, left, &l, sizeof(l), DOCONV()) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free: left read failed at %u (%u)\n", left, leftsize));
+ goto update;
+ }
+
+ /* If it's free, expand to include it. */
+ if (l.magic == TDB_FREE_MAGIC) {
+ if (remove_from_freelist(tdb, left, l.next) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free: left free failed at %u\n", left));
+ goto update;
+ } else {
+ offset = left;
+ rec->rec_len += leftsize;
+ }
+ }
+ }
+
+update:
+ if (update_tailer(tdb, offset, rec) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free: update_tailer failed at %u\n", offset));
+ goto fail;
+ }
+
+ /* Now, prepend to free list */
+ rec->magic = TDB_FREE_MAGIC;
+
+ if (tdb_ofs_read(tdb, FREELIST_TOP, &rec->next) == -1 ||
+ tdb_rec_write(tdb, offset, rec) == -1 ||
+ tdb_ofs_write(tdb, FREELIST_TOP, &offset) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free record write failed at offset=%d\n", offset));
+ goto fail;
+ }
+
+ /* And we're done. */
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return 0;
+
+ fail:
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return -1;
+}
+
+
+/*
+ the core of tdb_allocate - called when we have decided which
+ free list entry to use
+ */
+static tdb_off_t tdb_allocate_ofs(struct tdb_context *tdb, tdb_len_t length, tdb_off_t rec_ptr,
+ struct list_struct *rec, tdb_off_t last_ptr)
+{
+ struct list_struct newrec;
+ tdb_off_t newrec_ptr;
+
+ memset(&newrec, '\0', sizeof(newrec));
+
+ /* found it - now possibly split it up */
+ if (rec->rec_len > length + MIN_REC_SIZE) {
+ /* Length of left piece */
+ length = TDB_ALIGN(length, TDB_ALIGNMENT);
+
+ /* Right piece to go on free list */
+ newrec.rec_len = rec->rec_len - (sizeof(*rec) + length);
+ newrec_ptr = rec_ptr + sizeof(*rec) + length;
+
+ /* And left record is shortened */
+ rec->rec_len = length;
+ } else {
+ newrec_ptr = 0;
+ }
+
+ /* Remove allocated record from the free list */
+ if (tdb_ofs_write(tdb, last_ptr, &rec->next) == -1) {
+ return 0;
+ }
+
+ /* Update header: do this before we drop alloc
+ lock, otherwise tdb_free() might try to
+ merge with us, thinking we're free.
+ (Thanks Jeremy Allison). */
+ rec->magic = TDB_MAGIC;
+ if (tdb_rec_write(tdb, rec_ptr, rec) == -1) {
+ return 0;
+ }
+
+ /* Did we create new block? */
+ if (newrec_ptr) {
+ /* Update allocated record tailer (we
+ shortened it). */
+ if (update_tailer(tdb, rec_ptr, rec) == -1) {
+ return 0;
+ }
+
+ /* Free new record */
+ if (tdb_free(tdb, newrec_ptr, &newrec) == -1) {
+ return 0;
+ }
+ }
+
+ /* all done - return the new record offset */
+ return rec_ptr;
+}
+
+/* allocate some space from the free list. The offset returned points
+ to a unconnected list_struct within the database with room for at
+ least length bytes of total data
+
+ 0 is returned if the space could not be allocated
+ */
+tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec)
+{
+ tdb_off_t rec_ptr, last_ptr, newrec_ptr;
+ struct {
+ tdb_off_t rec_ptr, last_ptr;
+ tdb_len_t rec_len;
+ } bestfit;
+
+ if (tdb_lock(tdb, -1, F_WRLCK) == -1)
+ return 0;
+
+ /* Extra bytes required for tailer */
+ length += sizeof(tdb_off_t);
+
+ again:
+ last_ptr = FREELIST_TOP;
+
+ /* read in the freelist top */
+ if (tdb_ofs_read(tdb, FREELIST_TOP, &rec_ptr) == -1)
+ goto fail;
+
+ bestfit.rec_ptr = 0;
+ bestfit.last_ptr = 0;
+ bestfit.rec_len = 0;
+
+ /*
+ this is a best fit allocation strategy. Originally we used
+ a first fit strategy, but it suffered from massive fragmentation
+ issues when faced with a slowly increasing record size.
+ */
+ while (rec_ptr) {
+ if (tdb_rec_free_read(tdb, rec_ptr, rec) == -1) {
+ goto fail;
+ }
+
+ if (rec->rec_len >= length) {
+ if (bestfit.rec_ptr == 0 ||
+ rec->rec_len < bestfit.rec_len) {
+ bestfit.rec_len = rec->rec_len;
+ bestfit.rec_ptr = rec_ptr;
+ bestfit.last_ptr = last_ptr;
+ /* consider a fit to be good enough if
+ we aren't wasting more than half
+ the space */
+ if (bestfit.rec_len < 2*length) {
+ break;
+ }
+ }
+ }
+
+ /* move to the next record */
+ last_ptr = rec_ptr;
+ rec_ptr = rec->next;
+ }
+
+ if (bestfit.rec_ptr != 0) {
+ if (tdb_rec_free_read(tdb, bestfit.rec_ptr, rec) == -1) {
+ goto fail;
+ }
+
+ newrec_ptr = tdb_allocate_ofs(tdb, length, bestfit.rec_ptr, rec, bestfit.last_ptr);
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return newrec_ptr;
+ }
+
+ /* we didn't find enough space. See if we can expand the
+ database and if we can then try again */
+ if (tdb_expand(tdb, length + sizeof(*rec)) == 0)
+ goto again;
+ fail:
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return 0;
+}
+
+/* file: freelistcheck.c */
+
+/* Check the freelist is good and contains no loops.
+ Very memory intensive - only do this as a consistency
+ checker. Heh heh - uses an in memory tdb as the storage
+ for the "seen" record list. For some reason this strikes
+ me as extremely clever as I don't have to write another tree
+ data structure implementation :-).
+ */
+
+static int seen_insert(struct tdb_context *mem_tdb, tdb_off_t rec_ptr)
+{
+ TDB_DATA key, data;
+
+ memset(&data, '\0', sizeof(data));
+ key.dptr = (unsigned char *)&rec_ptr;
+ key.dsize = sizeof(rec_ptr);
+ return tdb_store(mem_tdb, key, data, TDB_INSERT);
+}
+
+int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries)
+{
+ struct tdb_context *mem_tdb = NULL;
+ struct list_struct rec;
+ tdb_off_t rec_ptr, last_ptr;
+ int ret = -1;
+
+ *pnum_entries = 0;
+
+ mem_tdb = tdb_open("flval", tdb->header.hash_size,
+ TDB_INTERNAL, O_RDWR, 0600);
+ if (!mem_tdb) {
+ return -1;
+ }
+
+ if (tdb_lock(tdb, -1, F_WRLCK) == -1) {
+ tdb_close(mem_tdb);
+ return 0;
+ }
+
+ last_ptr = FREELIST_TOP;
+
+ /* Store the FREELIST_TOP record. */
+ if (seen_insert(mem_tdb, last_ptr) == -1) {
+ ret = TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+ goto fail;
+ }
+
+ /* read in the freelist top */
+ if (tdb_ofs_read(tdb, FREELIST_TOP, &rec_ptr) == -1) {
+ goto fail;
+ }
+
+ while (rec_ptr) {
+
+ /* If we can't store this record (we've seen it
+ before) then the free list has a loop and must
+ be corrupt. */
+
+ if (seen_insert(mem_tdb, rec_ptr)) {
+ ret = TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+ goto fail;
+ }
+
+ if (tdb_rec_free_read(tdb, rec_ptr, &rec) == -1) {
+ goto fail;
+ }
+
+ /* move to the next record */
+ last_ptr = rec_ptr;
+ rec_ptr = rec.next;
+ *pnum_entries += 1;
+ }
+
+ ret = 0;
+
+ fail:
+
+ tdb_close(mem_tdb);
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return ret;
+}
+
+/* file: traverse.c */
+
+/* Uses traverse lock: 0 = finish, -1 = error, other = record offset */
+static int tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock *tlock,
+ struct list_struct *rec)
+{
+ int want_next = (tlock->off != 0);
+
+ /* Lock each chain from the start one. */
+ for (; tlock->hash < tdb->header.hash_size; tlock->hash++) {
+ if (!tlock->off && tlock->hash != 0) {
+ /* this is an optimisation for the common case where
+ the hash chain is empty, which is particularly
+ common for the use of tdb with ldb, where large
+ hashes are used. In that case we spend most of our
+ time in tdb_brlock(), locking empty hash chains.
+
+ To avoid this, we do an unlocked pre-check to see
+ if the hash chain is empty before starting to look
+ inside it. If it is empty then we can avoid that
+ hash chain. If it isn't empty then we can't believe
+ the value we get back, as we read it without a
+ lock, so instead we get the lock and re-fetch the
+ value below.
+
+ Notice that not doing this optimisation on the
+ first hash chain is critical. We must guarantee
+ that we have done at least one fcntl lock at the
+ start of a search to guarantee that memory is
+ coherent on SMP systems. If records are added by
+ others during the search then that's OK, and we
+ could possibly miss those with this trick, but we
+ could miss them anyway without this trick, so the
+ semantics don't change.
+
+ With a non-indexed ldb search this trick gains us a
+ factor of around 80 in speed on a linux 2.6.x
+ system (testing using ldbtest).
+ */
+ tdb->methods->next_hash_chain(tdb, &tlock->hash);
+ if (tlock->hash == tdb->header.hash_size) {
+ continue;
+ }
+ }
+
+ if (tdb_lock(tdb, tlock->hash, tlock->lock_rw) == -1)
+ return -1;
+
+ /* No previous record? Start at top of chain. */
+ if (!tlock->off) {
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(tlock->hash),
+ &tlock->off) == -1)
+ goto fail;
+ } else {
+ /* Otherwise unlock the previous record. */
+ if (tdb_unlock_record(tdb, tlock->off) != 0)
+ goto fail;
+ }
+
+ if (want_next) {
+ /* We have offset of old record: grab next */
+ if (tdb_rec_read(tdb, tlock->off, rec) == -1)
+ goto fail;
+ tlock->off = rec->next;
+ }
+
+ /* Iterate through chain */
+ while( tlock->off) {
+ tdb_off_t current;
+ if (tdb_rec_read(tdb, tlock->off, rec) == -1)
+ goto fail;
+
+ /* Detect infinite loops. From "Shlomi Yaakobovich" <Shlomi@exanet.com>. */
+ if (tlock->off == rec->next) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_next_lock: loop detected.\n"));
+ goto fail;
+ }
+
+ if (!TDB_DEAD(rec)) {
+ /* Woohoo: we found one! */
+ if (tdb_lock_record(tdb, tlock->off) != 0)
+ goto fail;
+ return tlock->off;
+ }
+
+ /* Try to clean dead ones from old traverses */
+ current = tlock->off;
+ tlock->off = rec->next;
+ if (!(tdb->read_only || tdb->traverse_read) &&
+ tdb_do_delete(tdb, current, rec) != 0)
+ goto fail;
+ }
+ tdb_unlock(tdb, tlock->hash, tlock->lock_rw);
+ want_next = 0;
+ }
+ /* We finished iteration without finding anything */
+ return TDB_ERRCODE(TDB_SUCCESS, 0);
+
+ fail:
+ tlock->off = 0;
+ if (tdb_unlock(tdb, tlock->hash, tlock->lock_rw) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_next_lock: On error unlock failed!\n"));
+ return -1;
+}
+
+/* traverse the entire database - calling fn(tdb, key, data) on each element.
+ return -1 on error or the record count traversed
+ if fn is NULL then it is not called
+ a non-zero return value from fn() indicates that the traversal should stop
+ */
+static int tdb_traverse_internal(struct tdb_context *tdb,
+ tdb_traverse_func fn, void *private_data,
+ struct tdb_traverse_lock *tl)
+{
+ TDB_DATA key, dbuf;
+ struct list_struct rec;
+ int ret, count = 0;
+
+ /* This was in the initialization, above, but the IRIX compiler
+ * did not like it. crh
+ */
+ tl->next = tdb->travlocks.next;
+
+ /* fcntl locks don't stack: beware traverse inside traverse */
+ tdb->travlocks.next = tl;
+
+ /* tdb_next_lock places locks on the record returned, and its chain */
+ while ((ret = tdb_next_lock(tdb, tl, &rec)) > 0) {
+ count++;
+ /* now read the full record */
+ key.dptr = tdb_alloc_read(tdb, tl->off + sizeof(rec),
+ rec.key_len + rec.data_len);
+ if (!key.dptr) {
+ ret = -1;
+ if (tdb_unlock(tdb, tl->hash, tl->lock_rw) != 0)
+ goto out;
+ if (tdb_unlock_record(tdb, tl->off) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_traverse: key.dptr == NULL and unlock_record failed!\n"));
+ goto out;
+ }
+ key.dsize = rec.key_len;
+ dbuf.dptr = key.dptr + rec.key_len;
+ dbuf.dsize = rec.data_len;
+
+ /* Drop chain lock, call out */
+ if (tdb_unlock(tdb, tl->hash, tl->lock_rw) != 0) {
+ ret = -1;
+ SAFE_FREE(key.dptr);
+ goto out;
+ }
+ if (fn && fn(tdb, key, dbuf, private_data)) {
+ /* They want us to terminate traversal */
+ ret = count;
+ if (tdb_unlock_record(tdb, tl->off) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_traverse: unlock_record failed!\n"));;
+ ret = -1;
+ }
+ SAFE_FREE(key.dptr);
+ goto out;
+ }
+ SAFE_FREE(key.dptr);
+ }
+out:
+ tdb->travlocks.next = tl->next;
+ if (ret < 0)
+ return -1;
+ else
+ return count;
+}
+
+
+/*
+ a write style traverse - temporarily marks the db read only
+*/
+int tdb_traverse_read(struct tdb_context *tdb,
+ tdb_traverse_func fn, void *private_data)
+{
+ struct tdb_traverse_lock tl = { NULL, 0, 0, F_RDLCK };
+ int ret;
+
+ /* we need to get a read lock on the transaction lock here to
+ cope with the lock ordering semantics of solaris10 */
+ if (tdb_transaction_lock(tdb, F_RDLCK)) {
+ return -1;
+ }
+
+ tdb->traverse_read++;
+ ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
+ tdb->traverse_read--;
+
+ tdb_transaction_unlock(tdb);
+
+ return ret;
+}
+
+/*
+ a write style traverse - needs to get the transaction lock to
+ prevent deadlocks
+*/
+int tdb_traverse(struct tdb_context *tdb,
+ tdb_traverse_func fn, void *private_data)
+{
+ struct tdb_traverse_lock tl = { NULL, 0, 0, F_WRLCK };
+ int ret;
+
+ if (tdb->read_only || tdb->traverse_read) {
+ return tdb_traverse_read(tdb, fn, private_data);
+ }
+
+ if (tdb_transaction_lock(tdb, F_WRLCK)) {
+ return -1;
+ }
+
+ ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
+
+ tdb_transaction_unlock(tdb);
+
+ return ret;
+}
+
+
+/* find the first entry in the database and return its key */
+TDB_DATA tdb_firstkey(struct tdb_context *tdb)
+{
+ TDB_DATA key;
+ struct list_struct rec;
+
+ /* release any old lock */
+ if (tdb_unlock_record(tdb, tdb->travlocks.off) != 0)
+ return tdb_null;
+ tdb->travlocks.off = tdb->travlocks.hash = 0;
+ tdb->travlocks.lock_rw = F_RDLCK;
+
+ /* Grab first record: locks chain and returned record. */
+ if (tdb_next_lock(tdb, &tdb->travlocks, &rec) <= 0)
+ return tdb_null;
+ /* now read the key */
+ key.dsize = rec.key_len;
+ key.dptr =tdb_alloc_read(tdb,tdb->travlocks.off+sizeof(rec),key.dsize);
+
+ /* Unlock the hash chain of the record we just read. */
+ if (tdb_unlock(tdb, tdb->travlocks.hash, tdb->travlocks.lock_rw) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_firstkey: error occurred while tdb_unlocking!\n"));
+ return key;
+}
+
+/* find the next entry in the database, returning its key */
+TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA oldkey)
+{
+ u32 oldhash;
+ TDB_DATA key = tdb_null;
+ struct list_struct rec;
+ unsigned char *k = NULL;
+
+ /* Is locked key the old key? If so, traverse will be reliable. */
+ if (tdb->travlocks.off) {
+ if (tdb_lock(tdb,tdb->travlocks.hash,tdb->travlocks.lock_rw))
+ return tdb_null;
+ if (tdb_rec_read(tdb, tdb->travlocks.off, &rec) == -1
+ || !(k = tdb_alloc_read(tdb,tdb->travlocks.off+sizeof(rec),
+ rec.key_len))
+ || memcmp(k, oldkey.dptr, oldkey.dsize) != 0) {
+ /* No, it wasn't: unlock it and start from scratch */
+ if (tdb_unlock_record(tdb, tdb->travlocks.off) != 0) {
+ SAFE_FREE(k);
+ return tdb_null;
+ }
+ if (tdb_unlock(tdb, tdb->travlocks.hash, tdb->travlocks.lock_rw) != 0) {
+ SAFE_FREE(k);
+ return tdb_null;
+ }
+ tdb->travlocks.off = 0;
+ }
+
+ SAFE_FREE(k);
+ }
+
+ if (!tdb->travlocks.off) {
+ /* No previous element: do normal find, and lock record */
+ tdb->travlocks.off = tdb_find_lock_hash(tdb, oldkey, tdb->hash_fn(&oldkey), tdb->travlocks.lock_rw, &rec);
+ if (!tdb->travlocks.off)
+ return tdb_null;
+ tdb->travlocks.hash = BUCKET(rec.full_hash);
+ if (tdb_lock_record(tdb, tdb->travlocks.off) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_nextkey: lock_record failed (%s)!\n", strerror(errno)));
+ return tdb_null;
+ }
+ }
+ oldhash = tdb->travlocks.hash;
+
+ /* Grab next record: locks chain and returned record,
+ unlocks old record */
+ if (tdb_next_lock(tdb, &tdb->travlocks, &rec) > 0) {
+ key.dsize = rec.key_len;
+ key.dptr = tdb_alloc_read(tdb, tdb->travlocks.off+sizeof(rec),
+ key.dsize);
+ /* Unlock the chain of this new record */
+ if (tdb_unlock(tdb, tdb->travlocks.hash, tdb->travlocks.lock_rw) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_nextkey: WARNING tdb_unlock failed!\n"));
+ }
+ /* Unlock the chain of old record */
+ if (tdb_unlock(tdb, BUCKET(oldhash), tdb->travlocks.lock_rw) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_nextkey: WARNING tdb_unlock failed!\n"));
+ return key;
+}
+
+/* file: dump.c */
+
+static tdb_off_t tdb_dump_record(struct tdb_context *tdb, int hash,
+ tdb_off_t offset)
+{
+ struct list_struct rec;
+ tdb_off_t tailer_ofs, tailer;
+
+ if (tdb->methods->tdb_read(tdb, offset, (char *)&rec,
+ sizeof(rec), DOCONV()) == -1) {
+ printf("ERROR: failed to read record at %u\n", offset);
+ return 0;
+ }
+
+ printf(" rec: hash=%d offset=0x%08x next=0x%08x rec_len=%d "
+ "key_len=%d data_len=%d full_hash=0x%x magic=0x%x\n",
+ hash, offset, rec.next, rec.rec_len, rec.key_len, rec.data_len,
+ rec.full_hash, rec.magic);
+
+ tailer_ofs = offset + sizeof(rec) + rec.rec_len - sizeof(tdb_off_t);
+
+ if (tdb_ofs_read(tdb, tailer_ofs, &tailer) == -1) {
+ printf("ERROR: failed to read tailer at %u\n", tailer_ofs);
+ return rec.next;
+ }
+
+ if (tailer != rec.rec_len + sizeof(rec)) {
+ printf("ERROR: tailer does not match record! tailer=%u totalsize=%u\n",
+ (unsigned int)tailer, (unsigned int)(rec.rec_len + sizeof(rec)));
+ }
+ return rec.next;
+}
+
+static int tdb_dump_chain(struct tdb_context *tdb, int i)
+{
+ tdb_off_t rec_ptr, top;
+
+ top = TDB_HASH_TOP(i);
+
+ if (tdb_lock(tdb, i, F_WRLCK) != 0)
+ return -1;
+
+ if (tdb_ofs_read(tdb, top, &rec_ptr) == -1)
+ return tdb_unlock(tdb, i, F_WRLCK);
+
+ if (rec_ptr)
+ printf("hash=%d\n", i);
+
+ while (rec_ptr) {
+ rec_ptr = tdb_dump_record(tdb, i, rec_ptr);
+ }
+
+ return tdb_unlock(tdb, i, F_WRLCK);
+}
+
+void tdb_dump_all(struct tdb_context *tdb)
+{
+ int i;
+ for (i = 0; i < (int)tdb->header.hash_size; i++) {
+ tdb_dump_chain(tdb, i);
+ }
+ printf("freelist:\n");
+ tdb_dump_chain(tdb, -1);
+}
+
+int tdb_printfreelist(struct tdb_context *tdb)
+{
+ int ret;
+ long total_free = 0;
+ tdb_off_t offset, rec_ptr;
+ struct list_struct rec;
+
+ if ((ret = tdb_lock(tdb, -1, F_WRLCK)) != 0)
+ return ret;
+
+ offset = FREELIST_TOP;
+
+ /* read in the freelist top */
+ if (tdb_ofs_read(tdb, offset, &rec_ptr) == -1) {
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return 0;
+ }
+
+ printf("freelist top=[0x%08x]\n", rec_ptr );
+ while (rec_ptr) {
+ if (tdb->methods->tdb_read(tdb, rec_ptr, (char *)&rec,
+ sizeof(rec), DOCONV()) == -1) {
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return -1;
+ }
+
+ if (rec.magic != TDB_FREE_MAGIC) {
+ printf("bad magic 0x%08x in free list\n", rec.magic);
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return -1;
+ }
+
+ printf("entry offset=[0x%08x], rec.rec_len = [0x%08x (%d)] (end = 0x%08x)\n",
+ rec_ptr, rec.rec_len, rec.rec_len, rec_ptr + rec.rec_len);
+ total_free += rec.rec_len;
+
+ /* move to the next record */
+ rec_ptr = rec.next;
+ }
+ printf("total rec_len = [0x%08x (%d)]\n", (int)total_free,
+ (int)total_free);
+
+ return tdb_unlock(tdb, -1, F_WRLCK);
+}
+
+/* file: tdb.c */
+
+/*
+ non-blocking increment of the tdb sequence number if the tdb has been opened using
+ the TDB_SEQNUM flag
+*/
+void tdb_increment_seqnum_nonblock(struct tdb_context *tdb)
+{
+ tdb_off_t seqnum=0;
+
+ if (!(tdb->flags & TDB_SEQNUM)) {
+ return;
+ }
+
+ /* we ignore errors from this, as we have no sane way of
+ dealing with them.
+ */
+ if (tdb_ofs_read(tdb, TDB_SEQNUM_OFS, &seqnum) == -1)
+ return;
+ seqnum++;
+ (void) tdb_ofs_write(tdb, TDB_SEQNUM_OFS, &seqnum);
+}
+
+/*
+ increment the tdb sequence number if the tdb has been opened using
+ the TDB_SEQNUM flag
+*/
+static void tdb_increment_seqnum(struct tdb_context *tdb)
+{
+ if (!(tdb->flags & TDB_SEQNUM)) {
+ return;
+ }
+
+ if (tdb_brlock(tdb, TDB_SEQNUM_OFS, F_WRLCK, F_SETLKW, 1, 1) != 0) {
+ return;
+ }
+
+ tdb_increment_seqnum_nonblock(tdb);
+
+ tdb_brlock(tdb, TDB_SEQNUM_OFS, F_UNLCK, F_SETLKW, 1, 1);
+}
+
+static int tdb_key_compare(TDB_DATA key, TDB_DATA data,
+ void *private_data EXT2FS_ATTR((unused)))
+{
+ return memcmp(data.dptr, key.dptr, data.dsize);
+}
+
+/* Returns 0 on fail. On success, return offset of record, and fills
+ in rec */
+static tdb_off_t tdb_find(struct tdb_context *tdb, TDB_DATA key, u32 hash,
+ struct list_struct *r)
+{
+ tdb_off_t rec_ptr;
+
+ /* read in the hash top */
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1)
+ return 0;
+
+ /* keep looking until we find the right record */
+ while (rec_ptr) {
+ if (tdb_rec_read(tdb, rec_ptr, r) == -1)
+ return 0;
+
+ if (!TDB_DEAD(r) && hash==r->full_hash
+ && key.dsize==r->key_len
+ && tdb_parse_data(tdb, key, rec_ptr + sizeof(*r),
+ r->key_len, tdb_key_compare,
+ NULL) == 0) {
+ return rec_ptr;
+ }
+ rec_ptr = r->next;
+ }
+ return TDB_ERRCODE(TDB_ERR_NOEXIST, 0);
+}
+
+/* As tdb_find, but if you succeed, keep the lock */
+tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype,
+ struct list_struct *rec)
+{
+ u32 rec_ptr;
+
+ if (tdb_lock(tdb, BUCKET(hash), locktype) == -1)
+ return 0;
+ if (!(rec_ptr = tdb_find(tdb, key, hash, rec)))
+ tdb_unlock(tdb, BUCKET(hash), locktype);
+ return rec_ptr;
+}
+
+
+/* update an entry in place - this only works if the new data size
+ is <= the old data size and the key exists.
+ on failure return -1.
+*/
+static int tdb_update_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, TDB_DATA dbuf)
+{
+ struct list_struct rec;
+ tdb_off_t rec_ptr;
+
+ /* find entry */
+ if (!(rec_ptr = tdb_find(tdb, key, hash, &rec)))
+ return -1;
+
+ /* must be long enough key, data and tailer */
+ if (rec.rec_len < key.dsize + dbuf.dsize + sizeof(tdb_off_t)) {
+ tdb->ecode = TDB_SUCCESS; /* Not really an error */
+ return -1;
+ }
+
+ if (tdb->methods->tdb_write(tdb, rec_ptr + sizeof(rec) + rec.key_len,
+ dbuf.dptr, dbuf.dsize) == -1)
+ return -1;
+
+ if (dbuf.dsize != rec.data_len) {
+ /* update size */
+ rec.data_len = dbuf.dsize;
+ return tdb_rec_write(tdb, rec_ptr, &rec);
+ }
+
+ return 0;
+}
+
+/* find an entry in the database given a key */
+/* If an entry doesn't exist tdb_err will be set to
+ * TDB_ERR_NOEXIST. If a key has no data attached
+ * then the TDB_DATA will have zero length but
+ * a non-zero pointer
+ */
+TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key)
+{
+ tdb_off_t rec_ptr;
+ struct list_struct rec;
+ TDB_DATA ret;
+ u32 hash;
+
+ /* find which hash bucket it is in */
+ hash = tdb->hash_fn(&key);
+ if (!(rec_ptr = tdb_find_lock_hash(tdb,key,hash,F_RDLCK,&rec)))
+ return tdb_null;
+
+ ret.dptr = tdb_alloc_read(tdb, rec_ptr + sizeof(rec) + rec.key_len,
+ rec.data_len);
+ ret.dsize = rec.data_len;
+ tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK);
+ return ret;
+}
+
+/*
+ * Find an entry in the database and hand the record's data to a parsing
+ * function. The parsing function is executed under the chain read lock, so it
+ * should be fast and should not block on other syscalls.
+ *
+ * DONT CALL OTHER TDB CALLS FROM THE PARSER, THIS MIGHT LEAD TO SEGFAULTS.
+ *
+ * For mmapped tdb's that do not have a transaction open it points the parsing
+ * function directly at the mmap area, it avoids the malloc/memcpy in this
+ * case. If a transaction is open or no mmap is available, it has to do
+ * malloc/read/parse/free.
+ *
+ * This is interesting for all readers of potentially large data structures in
+ * the tdb records, ldb indexes being one example.
+ */
+
+int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data)
+{
+ tdb_off_t rec_ptr;
+ struct list_struct rec;
+ int ret;
+ u32 hash;
+
+ /* find which hash bucket it is in */
+ hash = tdb->hash_fn(&key);
+
+ if (!(rec_ptr = tdb_find_lock_hash(tdb,key,hash,F_RDLCK,&rec))) {
+ return TDB_ERRCODE(TDB_ERR_NOEXIST, 0);
+ }
+
+ ret = tdb_parse_data(tdb, key, rec_ptr + sizeof(rec) + rec.key_len,
+ rec.data_len, parser, private_data);
+
+ tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK);
+
+ return ret;
+}
+
+/* check if an entry in the database exists
+
+ note that 1 is returned if the key is found and 0 is returned if not found
+ this doesn't match the conventions in the rest of this module, but is
+ compatible with gdbm
+*/
+static int tdb_exists_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash)
+{
+ struct list_struct rec;
+
+ if (tdb_find_lock_hash(tdb, key, hash, F_RDLCK, &rec) == 0)
+ return 0;
+ tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK);
+ return 1;
+}
+
+int tdb_exists(struct tdb_context *tdb, TDB_DATA key)
+{
+ u32 hash = tdb->hash_fn(&key);
+ return tdb_exists_hash(tdb, key, hash);
+}
+
+/* actually delete an entry in the database given the offset */
+int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct*rec)
+{
+ tdb_off_t last_ptr, i;
+ struct list_struct lastrec;
+
+ if (tdb->read_only || tdb->traverse_read) return -1;
+
+ if (tdb_write_lock_record(tdb, rec_ptr) == -1) {
+ /* Someone traversing here: mark it as dead */
+ rec->magic = TDB_DEAD_MAGIC;
+ return tdb_rec_write(tdb, rec_ptr, rec);
+ }
+ if (tdb_write_unlock_record(tdb, rec_ptr) != 0)
+ return -1;
+
+ /* find previous record in hash chain */
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(rec->full_hash), &i) == -1)
+ return -1;
+ for (last_ptr = 0; i != rec_ptr; last_ptr = i, i = lastrec.next)
+ if (tdb_rec_read(tdb, i, &lastrec) == -1)
+ return -1;
+
+ /* unlink it: next ptr is at start of record. */
+ if (last_ptr == 0)
+ last_ptr = TDB_HASH_TOP(rec->full_hash);
+ if (tdb_ofs_write(tdb, last_ptr, &rec->next) == -1)
+ return -1;
+
+ /* recover the space */
+ if (tdb_free(tdb, rec_ptr, rec) == -1)
+ return -1;
+ return 0;
+}
+
+static int tdb_count_dead(struct tdb_context *tdb, u32 hash)
+{
+ int res = 0;
+ tdb_off_t rec_ptr;
+ struct list_struct rec;
+
+ /* read in the hash top */
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1)
+ return 0;
+
+ while (rec_ptr) {
+ if (tdb_rec_read(tdb, rec_ptr, &rec) == -1)
+ return 0;
+
+ if (rec.magic == TDB_DEAD_MAGIC) {
+ res += 1;
+ }
+ rec_ptr = rec.next;
+ }
+ return res;
+}
+
+/*
+ * Purge all DEAD records from a hash chain
+ */
+static int tdb_purge_dead(struct tdb_context *tdb, u32 hash)
+{
+ int res = -1;
+ struct list_struct rec;
+ tdb_off_t rec_ptr;
+
+ if (tdb_lock(tdb, -1, F_WRLCK) == -1) {
+ return -1;
+ }
+
+ /* read in the hash top */
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1)
+ goto fail;
+
+ while (rec_ptr) {
+ tdb_off_t next;
+
+ if (tdb_rec_read(tdb, rec_ptr, &rec) == -1) {
+ goto fail;
+ }
+
+ next = rec.next;
+
+ if (rec.magic == TDB_DEAD_MAGIC
+ && tdb_do_delete(tdb, rec_ptr, &rec) == -1) {
+ goto fail;
+ }
+ rec_ptr = next;
+ }
+ res = 0;
+ fail:
+ tdb_unlock(tdb, -1, F_WRLCK);
+ return res;
+}
+
+/* delete an entry in the database given a key */
+static int tdb_delete_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash)
+{
+ tdb_off_t rec_ptr;
+ struct list_struct rec;
+ int ret;
+
+ if (tdb->max_dead_records != 0) {
+
+ /*
+ * Allow for some dead records per hash chain, mainly for
+ * tdb's with a very high create/delete rate like locking.tdb.
+ */
+
+ if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1)
+ return -1;
+
+ if (tdb_count_dead(tdb, hash) >= tdb->max_dead_records) {
+ /*
+ * Don't let the per-chain freelist grow too large,
+ * delete all existing dead records
+ */
+ tdb_purge_dead(tdb, hash);
+ }
+
+ if (!(rec_ptr = tdb_find(tdb, key, hash, &rec))) {
+ tdb_unlock(tdb, BUCKET(hash), F_WRLCK);
+ return -1;
+ }
+
+ /*
+ * Just mark the record as dead.
+ */
+ rec.magic = TDB_DEAD_MAGIC;
+ ret = tdb_rec_write(tdb, rec_ptr, &rec);
+ }
+ else {
+ if (!(rec_ptr = tdb_find_lock_hash(tdb, key, hash, F_WRLCK,
+ &rec)))
+ return -1;
+
+ ret = tdb_do_delete(tdb, rec_ptr, &rec);
+ }
+
+ if (ret == 0) {
+ tdb_increment_seqnum(tdb);
+ }
+
+ if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_delete: WARNING tdb_unlock failed!\n"));
+ return ret;
+}
+
+int tdb_delete(struct tdb_context *tdb, TDB_DATA key)
+{
+ u32 hash = tdb->hash_fn(&key);
+ return tdb_delete_hash(tdb, key, hash);
+}
+
+/*
+ * See if we have a dead record around with enough space
+ */
+static tdb_off_t tdb_find_dead(struct tdb_context *tdb, u32 hash,
+ struct list_struct *r, tdb_len_t length)
+{
+ tdb_off_t rec_ptr;
+
+ /* read in the hash top */
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1)
+ return 0;
+
+ /* keep looking until we find the right record */
+ while (rec_ptr) {
+ if (tdb_rec_read(tdb, rec_ptr, r) == -1)
+ return 0;
+
+ if (TDB_DEAD(r) && r->rec_len >= length) {
+ /*
+ * First fit for simple coding, TODO: change to best
+ * fit
+ */
+ return rec_ptr;
+ }
+ rec_ptr = r->next;
+ }
+ return 0;
+}
+
+/* store an element in the database, replacing any existing element
+ with the same key
+
+ return 0 on success, -1 on failure
+*/
+int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag)
+{
+ struct list_struct rec;
+ u32 hash;
+ tdb_off_t rec_ptr;
+ char *p = NULL;
+ int ret = -1;
+
+ if (tdb->read_only || tdb->traverse_read) {
+ tdb->ecode = TDB_ERR_RDONLY;
+ return -1;
+ }
+
+ /* find which hash bucket it is in */
+ hash = tdb->hash_fn(&key);
+ if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1)
+ return -1;
+
+ /* check for it existing, on insert. */
+ if (flag == TDB_INSERT) {
+ if (tdb_exists_hash(tdb, key, hash)) {
+ tdb->ecode = TDB_ERR_EXISTS;
+ goto fail;
+ }
+ } else {
+ /* first try in-place update, on modify or replace. */
+ if (tdb_update_hash(tdb, key, hash, dbuf) == 0) {
+ goto done;
+ }
+ if (tdb->ecode == TDB_ERR_NOEXIST &&
+ flag == TDB_MODIFY) {
+ /* if the record doesn't exist and we are in TDB_MODIFY mode then
+ we should fail the store */
+ goto fail;
+ }
+ }
+ /* reset the error code potentially set by the tdb_update() */
+ tdb->ecode = TDB_SUCCESS;
+
+ /* delete any existing record - if it doesn't exist we don't
+ care. Doing this first reduces fragmentation, and avoids
+ coalescing with `allocated' block before it's updated. */
+ if (flag != TDB_INSERT)
+ tdb_delete_hash(tdb, key, hash);
+
+ /* Copy key+value *before* allocating free space in case malloc
+ fails and we are left with a dead spot in the tdb. */
+
+ if (!(p = (char *)malloc(key.dsize + dbuf.dsize))) {
+ tdb->ecode = TDB_ERR_OOM;
+ goto fail;
+ }
+
+ memcpy(p, key.dptr, key.dsize);
+ if (dbuf.dsize)
+ memcpy(p+key.dsize, dbuf.dptr, dbuf.dsize);
+
+ if (tdb->max_dead_records != 0) {
+ /*
+ * Allow for some dead records per hash chain, look if we can
+ * find one that can hold the new record. We need enough space
+ * for key, data and tailer. If we find one, we don't have to
+ * consult the central freelist.
+ */
+ rec_ptr = tdb_find_dead(
+ tdb, hash, &rec,
+ key.dsize + dbuf.dsize + sizeof(tdb_off_t));
+
+ if (rec_ptr != 0) {
+ rec.key_len = key.dsize;
+ rec.data_len = dbuf.dsize;
+ rec.full_hash = hash;
+ rec.magic = TDB_MAGIC;
+ if (tdb_rec_write(tdb, rec_ptr, &rec) == -1
+ || tdb->methods->tdb_write(
+ tdb, rec_ptr + sizeof(rec),
+ p, key.dsize + dbuf.dsize) == -1) {
+ goto fail;
+ }
+ goto done;
+ }
+ }
+
+ /*
+ * We have to allocate some space from the freelist, so this means we
+ * have to lock it. Use the chance to purge all the DEAD records from
+ * the hash chain under the freelist lock.
+ */
+
+ if (tdb_lock(tdb, -1, F_WRLCK) == -1) {
+ goto fail;
+ }
+
+ if ((tdb->max_dead_records != 0)
+ && (tdb_purge_dead(tdb, hash) == -1)) {
+ tdb_unlock(tdb, -1, F_WRLCK);
+ goto fail;
+ }
+
+ /* we have to allocate some space */
+ rec_ptr = tdb_allocate(tdb, key.dsize + dbuf.dsize, &rec);
+
+ tdb_unlock(tdb, -1, F_WRLCK);
+
+ if (rec_ptr == 0) {
+ goto fail;
+ }
+
+ /* Read hash top into next ptr */
+ if (tdb_ofs_read(tdb, TDB_HASH_TOP(hash), &rec.next) == -1)
+ goto fail;
+
+ rec.key_len = key.dsize;
+ rec.data_len = dbuf.dsize;
+ rec.full_hash = hash;
+ rec.magic = TDB_MAGIC;
+
+ /* write out and point the top of the hash chain at it */
+ if (tdb_rec_write(tdb, rec_ptr, &rec) == -1
+ || tdb->methods->tdb_write(tdb, rec_ptr+sizeof(rec), p, key.dsize+dbuf.dsize)==-1
+ || tdb_ofs_write(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1) {
+ /* Need to tdb_unallocate() here */
+ goto fail;
+ }
+
+ done:
+ ret = 0;
+ fail:
+ if (ret == 0) {
+ tdb_increment_seqnum(tdb);
+ }
+
+ SAFE_FREE(p);
+ tdb_unlock(tdb, BUCKET(hash), F_WRLCK);
+ return ret;
+}
+
+
+/* Append to an entry. Create if not exist. */
+int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf)
+{
+ u32 hash;
+ TDB_DATA dbuf;
+ int ret = -1;
+
+ /* find which hash bucket it is in */
+ hash = tdb->hash_fn(&key);
+ if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1)
+ return -1;
+
+ dbuf = tdb_fetch(tdb, key);
+
+ if (dbuf.dptr == NULL) {
+ dbuf.dptr = (unsigned char *)malloc(new_dbuf.dsize);
+ } else {
+ unsigned char *new_dptr = (unsigned char *)realloc(dbuf.dptr,
+ dbuf.dsize + new_dbuf.dsize);
+ if (new_dptr == NULL) {
+ free(dbuf.dptr);
+ }
+ dbuf.dptr = new_dptr;
+ }
+
+ if (dbuf.dptr == NULL) {
+ tdb->ecode = TDB_ERR_OOM;
+ goto failed;
+ }
+
+ memcpy(dbuf.dptr + dbuf.dsize, new_dbuf.dptr, new_dbuf.dsize);
+ dbuf.dsize += new_dbuf.dsize;
+
+ ret = tdb_store(tdb, key, dbuf, 0);
+
+failed:
+ tdb_unlock(tdb, BUCKET(hash), F_WRLCK);
+ SAFE_FREE(dbuf.dptr);
+ return ret;
+}
+
+
+/*
+ return the name of the current tdb file
+ useful for external logging functions
+*/
+const char *tdb_name(struct tdb_context *tdb)
+{
+ return tdb->name;
+}
+
+/*
+ return the underlying file descriptor being used by tdb, or -1
+ useful for external routines that want to check the device/inode
+ of the fd
+*/
+int tdb_fd(struct tdb_context *tdb)
+{
+ return tdb->fd;
+}
+
+/*
+ return the current logging function
+ useful for external tdb routines that wish to log tdb errors
+*/
+tdb_log_func tdb_log_fn(struct tdb_context *tdb)
+{
+ return tdb->log.log_fn;
+}
+
+
+/*
+ get the tdb sequence number. Only makes sense if the writers opened
+ with TDB_SEQNUM set. Note that this sequence number will wrap quite
+ quickly, so it should only be used for a 'has something changed'
+ test, not for code that relies on the count of the number of changes
+ made. If you want a counter then use a tdb record.
+
+ The aim of this sequence number is to allow for a very lightweight
+ test of a possible tdb change.
+*/
+int tdb_get_seqnum(struct tdb_context *tdb)
+{
+ tdb_off_t seqnum=0;
+
+ if (tdb_ofs_read(tdb, TDB_SEQNUM_OFS, &seqnum) == -1)
+ return 0;
+ return seqnum;
+}
+
+int tdb_hash_size(struct tdb_context *tdb)
+{
+ return tdb->header.hash_size;
+}
+
+size_t tdb_map_size(struct tdb_context *tdb)
+{
+ return tdb->map_size;
+}
+
+int tdb_get_flags(struct tdb_context *tdb)
+{
+ return tdb->flags;
+}
+
+
+/*
+ enable sequence number handling on an open tdb
+*/
+void tdb_enable_seqnum(struct tdb_context *tdb)
+{
+ tdb->flags |= TDB_SEQNUM;
+}
+
+/* file: open.c */
+
+/* all contexts, to ensure no double-opens (fcntl locks don't nest!) */
+static struct tdb_context *tdbs = NULL;
+
+
+/* This is from a hash algorithm suggested by Rogier Wolff */
+static unsigned int default_tdb_hash(TDB_DATA *key)
+{
+ u32 value; /* Used to compute the hash value. */
+ u32 i; /* Used to cycle through random values. */
+
+ /* Set the initial value from the key size. */
+ for (value = 0, i=0; i < key->dsize; i++)
+ value = value * 256 + key->dptr[i] + (value >> 24) * 241;
+
+ return value;
+}
+
+
+/* initialise a new database with a specified hash size */
+static int tdb_new_database(struct tdb_context *tdb, int hash_size)
+{
+ struct tdb_header *newdb;
+ int size, ret = -1;
+
+ /* We make it up in memory, then write it out if not internal */
+ size = sizeof(struct tdb_header) + (hash_size+1)*sizeof(tdb_off_t);
+ if (!(newdb = (struct tdb_header *)calloc(size, 1)))
+ return TDB_ERRCODE(TDB_ERR_OOM, -1);
+
+ /* Fill in the header */
+ newdb->version = TDB_VERSION;
+ newdb->hash_size = hash_size;
+ if (tdb->flags & TDB_INTERNAL) {
+ tdb->map_size = size;
+ tdb->map_ptr = (char *)newdb;
+ memcpy(&tdb->header, newdb, sizeof(tdb->header));
+ /* Convert the `ondisk' version if asked. */
+ CONVERT(*newdb);
+ return 0;
+ }
+ if (lseek(tdb->fd, 0, SEEK_SET) == -1)
+ goto fail;
+
+ if (ftruncate(tdb->fd, 0) == -1)
+ goto fail;
+
+ /* This creates an endian-converted header, as if read from disk */
+ CONVERT(*newdb);
+ memcpy(&tdb->header, newdb, sizeof(tdb->header));
+ /* Don't endian-convert the magic food! */
+ memcpy(newdb->magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
+ if (write(tdb->fd, newdb, size) != size) {
+ ret = -1;
+ } else {
+ ret = 0;
+ }
+
+ fail:
+ SAFE_FREE(newdb);
+ return ret;
+}
+
+
+
+static int tdb_already_open(dev_t device,
+ ino_t ino)
+{
+ struct tdb_context *i;
+
+ for (i = tdbs; i; i = i->next) {
+ if (i->device == device && i->inode == ino) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+/* open the database, creating it if necessary
+
+ The open_flags and mode are passed straight to the open call on the
+ database file. A flags value of O_WRONLY is invalid. The hash size
+ is advisory, use zero for a default value.
+
+ Return is NULL on error, in which case errno is also set. Don't
+ try to call tdb_error or tdb_errname, just do strerror(errno).
+
+ @param name may be NULL for internal databases. */
+struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
+ int open_flags, mode_t mode)
+{
+ return tdb_open_ex(name, hash_size, tdb_flags, open_flags, mode, NULL, NULL);
+}
+
+/* a default logging function */
+static void null_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
+static void null_log_fn(struct tdb_context *tdb EXT2FS_ATTR((unused)),
+ enum tdb_debug_level level EXT2FS_ATTR((unused)),
+ const char *fmt EXT2FS_ATTR((unused)), ...)
+{
+}
+
+
+struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
+ int open_flags, mode_t mode,
+ const struct tdb_logging_context *log_ctx,
+ tdb_hash_func hash_fn)
+{
+ struct tdb_context *tdb;
+ struct stat st;
+ int rev = 0, locked = 0;
+ unsigned char *vp;
+ u32 vertest;
+
+ if (!(tdb = (struct tdb_context *)calloc(1, sizeof *tdb))) {
+ /* Can't log this */
+ errno = ENOMEM;
+ goto fail;
+ }
+ tdb_io_init(tdb);
+ tdb->fd = -1;
+ tdb->name = NULL;
+ tdb->map_ptr = NULL;
+ tdb->flags = tdb_flags;
+ tdb->open_flags = open_flags;
+ if (log_ctx) {
+ tdb->log = *log_ctx;
+ } else {
+ tdb->log.log_fn = null_log_fn;
+ tdb->log.log_private = NULL;
+ }
+ tdb->hash_fn = hash_fn ? hash_fn : default_tdb_hash;
+
+ /* cache the page size */
+ tdb->page_size = sysconf(_SC_PAGESIZE);
+ if (tdb->page_size <= 0) {
+ tdb->page_size = 0x2000;
+ }
+
+ if ((open_flags & O_ACCMODE) == O_WRONLY) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
+ name));
+ errno = EINVAL;
+ goto fail;
+ }
+
+ if (hash_size == 0)
+ hash_size = DEFAULT_HASH_SIZE;
+ if ((open_flags & O_ACCMODE) == O_RDONLY) {
+ tdb->read_only = 1;
+ /* read only databases don't do locking or clear if first */
+ tdb->flags |= TDB_NOLOCK;
+ tdb->flags &= ~TDB_CLEAR_IF_FIRST;
+ }
+
+ /* internal databases don't mmap or lock, and start off cleared */
+ if (tdb->flags & TDB_INTERNAL) {
+ tdb->flags |= (TDB_NOLOCK | TDB_NOMMAP);
+ tdb->flags &= ~TDB_CLEAR_IF_FIRST;
+ if (tdb_new_database(tdb, hash_size) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: tdb_new_database failed!"));
+ goto fail;
+ }
+ goto internal;
+ }
+
+ if ((tdb->fd = open(name, open_flags, mode)) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_open_ex: could not open file %s: %s\n",
+ name, strerror(errno)));
+ goto fail; /* errno set by open(2) */
+ }
+
+ /* ensure there is only one process initialising at once */
+ if (tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: failed to get global lock on %s: %s\n",
+ name, strerror(errno)));
+ goto fail; /* errno set by tdb_brlock */
+ }
+
+ /* we need to zero database if we are the only one with it open */
+ if ((tdb_flags & TDB_CLEAR_IF_FIRST) &&
+ (locked = (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_WRLCK, F_SETLK, 0, 1) == 0))) {
+ open_flags |= O_CREAT;
+ if (ftruncate(tdb->fd, 0) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
+ "failed to truncate %s: %s\n",
+ name, strerror(errno)));
+ goto fail; /* errno set by ftruncate */
+ }
+ }
+
+ if (read(tdb->fd, &tdb->header, sizeof(tdb->header)) != sizeof(tdb->header)
+ || memcmp(tdb->header.magic_food, TDB_MAGIC_FOOD,
+ sizeof(TDB_MAGIC_FOOD)) != 0
+ || (tdb->header.version != TDB_VERSION
+ && !(rev = (tdb->header.version==TDB_BYTEREV(TDB_VERSION))))) {
+ /* its not a valid database - possibly initialise it */
+ if (!(open_flags & O_CREAT) || tdb_new_database(tdb, hash_size) == -1) {
+ errno = EIO; /* ie bad format or something */
+ goto fail;
+ }
+ rev = (tdb->flags & TDB_CONVERT);
+ }
+ vp = (unsigned char *)&tdb->header.version;
+ vertest = (((u32)vp[0]) << 24) | (((u32)vp[1]) << 16) |
+ (((u32)vp[2]) << 8) | (u32)vp[3];
+ tdb->flags |= (vertest==TDB_VERSION) ? TDB_BIGENDIAN : 0;
+ if (!rev)
+ tdb->flags &= ~TDB_CONVERT;
+ else {
+ tdb->flags |= TDB_CONVERT;
+ tdb_convert(&tdb->header, sizeof(tdb->header));
+ }
+ if (fstat(tdb->fd, &st) == -1)
+ goto fail;
+
+ if (tdb->header.rwlocks != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: spinlocks no longer supported\n"));
+ goto fail;
+ }
+
+ /* Is it already in the open list? If so, fail. */
+ if (tdb_already_open(st.st_dev, st.st_ino)) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
+ "%s (%d,%d) is already open in this process\n",
+ name, (int)st.st_dev, (int)st.st_ino));
+ errno = EBUSY;
+ goto fail;
+ }
+
+ if (!(tdb->name = (char *)strdup(name))) {
+ errno = ENOMEM;
+ goto fail;
+ }
+
+ tdb->map_size = st.st_size;
+ tdb->device = st.st_dev;
+ tdb->inode = st.st_ino;
+ tdb->max_dead_records = 0;
+ tdb_mmap(tdb);
+ if (locked) {
+ if (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK, 0, 1) == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: "
+ "failed to take ACTIVE_LOCK on %s: %s\n",
+ name, strerror(errno)));
+ goto fail;
+ }
+
+ }
+
+ /* We always need to do this if the CLEAR_IF_FIRST flag is set, even if
+ we didn't get the initial exclusive lock as we need to let all other
+ users know we're using it. */
+
+ if (tdb_flags & TDB_CLEAR_IF_FIRST) {
+ /* leave this lock in place to indicate it's in use */
+ if (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_RDLCK, F_SETLKW, 0, 1) == -1)
+ goto fail;
+ }
+
+ /* if needed, run recovery */
+ if (tdb_transaction_recover(tdb) == -1) {
+ goto fail;
+ }
+
+ internal:
+ /* Internal (memory-only) databases skip all the code above to
+ * do with disk files, and resume here by releasing their
+ * global lock and hooking into the active list. */
+ if (tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1) == -1)
+ goto fail;
+ tdb->next = tdbs;
+ tdbs = tdb;
+ return tdb;
+
+ fail:
+ { int save_errno = errno;
+
+ if (!tdb)
+ return NULL;
+
+ if (tdb->map_ptr) {
+ if (tdb->flags & TDB_INTERNAL)
+ SAFE_FREE(tdb->map_ptr);
+ else
+ tdb_munmap(tdb);
+ }
+ SAFE_FREE(tdb->name);
+ if (tdb->fd != -1)
+ if (close(tdb->fd) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: failed to close tdb->fd on error!\n"));
+ SAFE_FREE(tdb);
+ errno = save_errno;
+ return NULL;
+ }
+}
+
+/*
+ * Set the maximum number of dead records per hash chain
+ */
+
+void tdb_set_max_dead(struct tdb_context *tdb, int max_dead)
+{
+ tdb->max_dead_records = max_dead;
+}
+
+/**
+ * Close a database.
+ *
+ * @returns -1 for error; 0 for success.
+ **/
+int tdb_close(struct tdb_context *tdb)
+{
+ struct tdb_context **i;
+ int ret = 0;
+
+ if (tdb->transaction) {
+ tdb_transaction_cancel(tdb);
+ }
+
+ if (tdb->map_ptr) {
+ if (tdb->flags & TDB_INTERNAL)
+ SAFE_FREE(tdb->map_ptr);
+ else
+ tdb_munmap(tdb);
+ }
+ SAFE_FREE(tdb->name);
+ if (tdb->fd != -1)
+ ret = close(tdb->fd);
+ SAFE_FREE(tdb->lockrecs);
+
+ /* Remove from contexts list */
+ for (i = &tdbs; *i; i = &(*i)->next) {
+ if (*i == tdb) {
+ *i = tdb->next;
+ break;
+ }
+ }
+
+ memset(tdb, 0, sizeof(*tdb));
+ SAFE_FREE(tdb);
+
+ return ret;
+}
+
+/* register a logging function */
+void tdb_set_logging_function(struct tdb_context *tdb,
+ const struct tdb_logging_context *log_ctx)
+{
+ tdb->log = *log_ctx;
+}
+
+void *tdb_get_logging_private(struct tdb_context *tdb)
+{
+ return tdb->log.log_private;
+}
+
+/* reopen a tdb - this can be used after a fork to ensure that we have an independent
+ seek pointer from our parent and to re-establish locks */
+int tdb_reopen(struct tdb_context *tdb)
+{
+ struct stat st;
+
+ if (tdb->flags & TDB_INTERNAL) {
+ return 0; /* Nothing to do. */
+ }
+
+ if (tdb->num_locks != 0 || tdb->global_lock.count) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_reopen: reopen not allowed with locks held\n"));
+ goto fail;
+ }
+
+ if (tdb->transaction != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_reopen: reopen not allowed inside a transaction\n"));
+ goto fail;
+ }
+
+ if (tdb_munmap(tdb) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_reopen: munmap failed (%s)\n", strerror(errno)));
+ goto fail;
+ }
+ if (close(tdb->fd) != 0)
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_reopen: WARNING closing tdb->fd failed!\n"));
+ tdb->fd = open(tdb->name, tdb->open_flags & ~(O_CREAT|O_TRUNC), 0);
+ if (tdb->fd == -1) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_reopen: open failed (%s)\n", strerror(errno)));
+ goto fail;
+ }
+ if ((tdb->flags & TDB_CLEAR_IF_FIRST) &&
+ (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_RDLCK, F_SETLKW, 0, 1) == -1)) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_reopen: failed to obtain active lock\n"));
+ goto fail;
+ }
+ if (fstat(tdb->fd, &st) != 0) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_reopen: fstat failed (%s)\n", strerror(errno)));
+ goto fail;
+ }
+ if (st.st_ino != tdb->inode || st.st_dev != tdb->device) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_reopen: file dev/inode has changed!\n"));
+ goto fail;
+ }
+ tdb_mmap(tdb);
+
+ return 0;
+
+fail:
+ tdb_close(tdb);
+ return -1;
+}
+
+/* reopen all tdb's */
+int tdb_reopen_all(int parent_longlived)
+{
+ struct tdb_context *tdb;
+
+ for (tdb=tdbs; tdb; tdb = tdb->next) {
+ /*
+ * If the parent is longlived (ie. a
+ * parent daemon architecture), we know
+ * it will keep it's active lock on a
+ * tdb opened with CLEAR_IF_FIRST. Thus
+ * for child processes we don't have to
+ * add an active lock. This is essential
+ * to improve performance on systems that
+ * keep POSIX locks as a non-scalable data
+ * structure in the kernel.
+ */
+ if (parent_longlived) {
+ /* Ensure no clear-if-first. */
+ tdb->flags &= ~TDB_CLEAR_IF_FIRST;
+ }
+
+ if (tdb_reopen(tdb) != 0)
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * Flush a database file from the page cache.
+ **/
+int tdb_flush(struct tdb_context *tdb)
+{
+ if (tdb->fd != -1)
+ return fsync(tdb->fd);
+ return 0;
+}
diff --git a/lib/ext2fs/tdb.h b/lib/ext2fs/tdb.h
new file mode 100644
index 0000000..de7aa33
--- /dev/null
+++ b/lib/ext2fs/tdb.h
@@ -0,0 +1,215 @@
+#ifndef __TDB_H__
+#define __TDB_H__
+
+/*
+ Unix SMB/CIFS implementation.
+
+ trivial database library
+
+ Copyright (C) Andrew Tridgell 1999-2004
+
+ ** NOTE! The following LGPL license applies to the tdb
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* flags to tdb_store() */
+#define TDB_REPLACE 1
+#define TDB_INSERT 2
+#define TDB_MODIFY 3
+
+/* flags for tdb_open() */
+#define TDB_DEFAULT 0 /* just a readability place holder */
+#define TDB_CLEAR_IF_FIRST 1
+#define TDB_INTERNAL 2 /* don't store on disk */
+#define TDB_NOLOCK 4 /* don't do any locking */
+#define TDB_NOMMAP 8 /* don't use mmap */
+#define TDB_CONVERT 16 /* convert endian (internal use) */
+#define TDB_BIGENDIAN 32 /* header is big-endian (internal use) */
+#define TDB_NOSYNC 64 /* don't use synchronous transactions */
+#define TDB_SEQNUM 128 /* maintain a sequence number */
+
+#define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret)
+
+/* error codes */
+enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK,
+ TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT,
+ TDB_ERR_NOEXIST, TDB_ERR_EINVAL, TDB_ERR_RDONLY};
+
+/* debugging uses one of the following levels */
+enum tdb_debug_level {TDB_DEBUG_FATAL = 0, TDB_DEBUG_ERROR,
+ TDB_DEBUG_WARNING, TDB_DEBUG_TRACE};
+
+typedef struct TDB_DATA {
+ unsigned char *dptr;
+ size_t dsize;
+} TDB_DATA;
+
+#ifndef PRINTF_ATTRIBUTE
+#if (__GNUC__ >= 3)
+/** Use gcc attribute to check printf fns. a1 is the 1-based index of
+ * the parameter containing the format, and a2 the index of the first
+ * argument. Note that some gcc 2.x versions don't handle this
+ * properly **/
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
+#else
+#define PRINTF_ATTRIBUTE(a1, a2)
+#endif
+#endif
+
+/* ext2fs tdb renames */
+#define tdb_open ext2fs_tdb_open
+#define tdb_open_ex ext2fs_tdb_open_ex
+#define tdb_set_max_dead ext2fs_tdb_set_max_dead
+#define tdb_reopen ext2fs_tdb_reopen
+#define tdb_reopen_all ext2fs_tdb_reopen_all
+#define tdb_set_logging_function ext2fs_tdb_set_logging_function
+#define tdb_error ext2fs_tdb_error
+#define tdb_errorstr ext2fs_tdb_errorstr
+#define tdb_fetch ext2fs_tdb_fetch
+#define tdb_parse_record ext2fs_tdb_parse_record
+#define tdb_delete ext2fs_tdb_delete
+#define tdb_store ext2fs_tdb_store
+#define tdb_append ext2fs_tdb_append
+#define tdb_close ext2fs_tdb_close
+#define tdb_firstkey ext2fs_tdb_firstkey
+#define tdb_nextkey ext2fs_tdb_nextkey
+#define tdb_traverse ext2fs_tdb_traverse
+#define tdb_traverse_read ext2fs_tdb_traverse_read
+#define tdb_exists ext2fs_tdb_exists
+#define tdb_lockall ext2fs_tdb_lockall
+#define tdb_unlockall ext2fs_tdb_unlockall
+#define tdb_lockall_read ext2fs_tdb_lockall_read
+#define tdb_unlockall_read ext2fs_tdb_unlockall_read
+#define tdb_name ext2fs_tdb_name
+#define tdb_fd ext2fs_tdb_fd
+#define tdb_log_fn ext2fs_tdb_log_fn
+#define tdb_get_logging_private ext2fs_tdb_get_logging_private
+#define tdb_transaction_start ext2fs_tdb_transaction_start
+#define tdb_transaction_commit ext2fs_tdb_transaction_commit
+#define tdb_transaction_cancel ext2fs_tdb_transaction_cancel
+#define tdb_transaction_recover ext2fs_tdb_transaction_recover
+#define tdb_get_seqnum ext2fs_tdb_get_seqnum
+#define tdb_hash_size ext2fs_tdb_hash_size
+#define tdb_map_size ext2fs_tdb_map_size
+#define tdb_get_flags ext2fs_tdb_get_flags
+#define tdb_chainlock ext2fs_tdb_chainlock
+#define tdb_chainunlock ext2fs_tdb_chainunlock
+#define tdb_chainlock_read ext2fs_tdb_chainlock_read
+#define tdb_chainunlock_read ext2fs_tdb_chainunlock_read
+#define tdb_dump_all ext2fs_tdb_dump_all
+#define tdb_printfreelist ext2fs_tdb_printfreelist
+#define tdb_validate_freelist ext2fs_tdb_validate_freelist
+#define tdb_chainlock_mark ext2fs_tdb_chainlock_mark
+#define tdb_chainlock_nonblock ext2fs_tdb_chainlock_nonblock
+#define tdb_chainlock_unmark ext2fs_tdb_chainlock_unmark
+#define tdb_enable_seqnum ext2fs_tdb_enable_seqnum
+#define tdb_increment_seqnum_nonblock ext2fs_tdb_increment_seqnum_nonblock
+#define tdb_lock_nonblock ext2fs_tdb_lock_nonblock
+#define tdb_lockall_mark ext2fs_tdb_lockall_mark
+#define tdb_lockall_nonblock ext2fs_tdb_lockall_nonblock
+#define tdb_lockall_read_nonblock ext2fs_tdb_lockall_read_nonblock
+#define tdb_lockall_unmark ext2fs_tdb_lockall_unmark
+#define tdb_flush ext2fs_tdb_flush
+
+/* this is the context structure that is returned from a db open */
+typedef struct tdb_context TDB_CONTEXT;
+
+typedef int (*tdb_traverse_func)(struct tdb_context *, TDB_DATA, TDB_DATA, void *);
+typedef void (*tdb_log_func)(struct tdb_context *, enum tdb_debug_level, const char *, ...) PRINTF_ATTRIBUTE(3, 4);
+typedef unsigned int (*tdb_hash_func)(TDB_DATA *key);
+
+struct tdb_logging_context {
+ tdb_log_func log_fn;
+ void *log_private;
+};
+
+struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
+ int open_flags, mode_t mode);
+struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
+ int open_flags, mode_t mode,
+ const struct tdb_logging_context *log_ctx,
+ tdb_hash_func hash_fn);
+void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
+
+int tdb_reopen(struct tdb_context *tdb);
+int tdb_reopen_all(int parent_longlived);
+void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx);
+enum TDB_ERROR tdb_error(struct tdb_context *tdb);
+const char *tdb_errorstr(struct tdb_context *tdb);
+TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
+int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data);
+int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
+int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
+int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf);
+int tdb_close(struct tdb_context *tdb);
+TDB_DATA tdb_firstkey(struct tdb_context *tdb);
+TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
+int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *);
+int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *);
+int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
+int tdb_lockall(struct tdb_context *tdb);
+int tdb_lockall_nonblock(struct tdb_context *tdb);
+int tdb_unlockall(struct tdb_context *tdb);
+int tdb_lockall_read(struct tdb_context *tdb);
+int tdb_lockall_read_nonblock(struct tdb_context *tdb);
+int tdb_unlockall_read(struct tdb_context *tdb);
+int tdb_lockall_mark(struct tdb_context *tdb);
+int tdb_lockall_unmark(struct tdb_context *tdb);
+const char *tdb_name(struct tdb_context *tdb);
+int tdb_fd(struct tdb_context *tdb);
+tdb_log_func tdb_log_fn(struct tdb_context *tdb);
+void *tdb_get_logging_private(struct tdb_context *tdb);
+int tdb_transaction_start(struct tdb_context *tdb);
+int tdb_transaction_commit(struct tdb_context *tdb);
+int tdb_transaction_cancel(struct tdb_context *tdb);
+int tdb_transaction_recover(struct tdb_context *tdb);
+int tdb_get_seqnum(struct tdb_context *tdb);
+int tdb_hash_size(struct tdb_context *tdb);
+size_t tdb_map_size(struct tdb_context *tdb);
+int tdb_get_flags(struct tdb_context *tdb);
+void tdb_enable_seqnum(struct tdb_context *tdb);
+void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
+int tdb_flush(struct tdb_context *tdb);
+
+/* Low level locking functions: use with care */
+int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
+int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
+int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
+int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
+int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
+int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
+int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key);
+
+/* Debug functions. Not used in production. */
+void tdb_dump_all(struct tdb_context *tdb);
+int tdb_printfreelist(struct tdb_context *tdb);
+int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* tdb.h */
diff --git a/lib/ext2fs/tdb/build-tdb b/lib/ext2fs/tdb/build-tdb
new file mode 100755
index 0000000..1cc18f7
--- /dev/null
+++ b/lib/ext2fs/tdb/build-tdb
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# This file creates a stand-alone TDB based on a set of sources from
+# Samba
+
+#BASE_DIR=/usr/projects/samba/samba-4.0.0tp4/source/lib/tdb
+BASE_DIR=/usr/projects/samba/tdb
+
+rm -rf .pc
+
+FILES="error.c lock.c io.c transaction.c freelist.c \
+ freelistcheck.c traverse.c dump.c tdb.c open.c"
+
+(cd $BASE_DIR/common; svn info ) > .svninfo
+echo "/*" > tdb.c
+grep ^URL .svninfo >> tdb.c
+grep "^Last Changed Rev" .svninfo | sed -e 's/Last Changed //' >> tdb.c
+grep "^Last Changed Date" .svninfo >> tdb.c
+echo "*/" >> tdb.c
+
+cat $BASE_DIR/common/tdb_private.h >> tdb.c
+for i in $FILES; do
+ if [ `tail -n 1 tdb.c | wc -c` -gt 1 ]; then
+ printf "\n" >> tdb.c
+ fi
+ echo "/* file: $i */" >> tdb.c
+ sed -e '1,/#include "tdb_private.h"/d' < $BASE_DIR/common/$i >> tdb.c
+done
+
+cp $BASE_DIR/include/tdb.h .
+cp $BASE_DIR/tools/tdbtool.c .
+
+quilt push -a
+
diff --git a/lib/ext2fs/tdb/patches/copyright b/lib/ext2fs/tdb/patches/copyright
new file mode 100644
index 0000000..d9d1d84
--- /dev/null
+++ b/lib/ext2fs/tdb/patches/copyright
@@ -0,0 +1,20 @@
+Index: tdbsa/tdb.c
+===================================================================
+--- tdbsa.orig/tdb.c
++++ tdbsa/tdb.c
+@@ -4,11 +4,11 @@ Rev: 23371
+ Last Changed Date: 2007-06-06 20:14:06 -0400 (Wed, 06 Jun 2007)
+ */
+ /*
+- Unix SMB/CIFS implementation.
++ trivial database library - standalone version
+
+- trivial database library - private includes
+-
+- Copyright (C) Andrew Tridgell 2005
++ Copyright (C) Andrew Tridgell 1999-2005
++ Copyright (C) Jeremy Allison 2000-2006
++ Copyright (C) Paul `Rusty' Russell 2000
+
+ ** NOTE! The following LGPL license applies to the tdb
+ ** library. This does NOT imply that all of Samba is released
diff --git a/lib/ext2fs/tdb/patches/ext2tdb-rename b/lib/ext2fs/tdb/patches/ext2tdb-rename
new file mode 100644
index 0000000..15bf085
--- /dev/null
+++ b/lib/ext2fs/tdb/patches/ext2tdb-rename
@@ -0,0 +1,65 @@
+Index: tdb/tdb.h
+===================================================================
+--- tdb.orig/tdb.h
++++ tdb/tdb.h
+@@ -76,6 +76,60 @@ typedef struct TDB_DATA {
+ #endif
+ #endif
+
++/* ext2fs tdb renames */
++#define tdb_open ext2fs_tdb_open
++#define tdb_open_ex ext2fs_tdb_open_ex
++#define tdb_set_max_dead ext2fs_tdb_set_max_dead
++#define tdb_reopen ext2fs_tdb_reopen
++#define tdb_reopen_all ext2fs_tdb_reopen_all
++#define tdb_set_logging_function ext2fs_tdb_set_logging_function
++#define tdb_error ext2fs_tdb_error
++#define tdb_errorstr ext2fs_tdb_errorstr
++#define tdb_fetch ext2fs_tdb_fetch
++#define tdb_parse_record ext2fs_tdb_parse_record
++#define tdb_delete ext2fs_tdb_delete
++#define tdb_store ext2fs_tdb_store
++#define tdb_append ext2fs_tdb_append
++#define tdb_close ext2fs_tdb_close
++#define tdb_firstkey ext2fs_tdb_firstkey
++#define tdb_nextkey ext2fs_tdb_nextkey
++#define tdb_traverse ext2fs_tdb_traverse
++#define tdb_traverse_read ext2fs_tdb_traverse_read
++#define tdb_exists ext2fs_tdb_exists
++#define tdb_lockall ext2fs_tdb_lockall
++#define tdb_unlockall ext2fs_tdb_unlockall
++#define tdb_lockall_read ext2fs_tdb_lockall_read
++#define tdb_unlockall_read ext2fs_tdb_unlockall_read
++#define tdb_name ext2fs_tdb_name
++#define tdb_fd ext2fs_tdb_fd
++#define tdb_log_fn ext2fs_tdb_log_fn
++#define tdb_get_logging_private ext2fs_tdb_get_logging_private
++#define tdb_transaction_start ext2fs_tdb_transaction_start
++#define tdb_transaction_commit ext2fs_tdb_transaction_commit
++#define tdb_transaction_cancel ext2fs_tdb_transaction_cancel
++#define tdb_transaction_recover ext2fs_tdb_transaction_recover
++#define tdb_get_seqnum ext2fs_tdb_get_seqnum
++#define tdb_hash_size ext2fs_tdb_hash_size
++#define tdb_map_size ext2fs_tdb_map_size
++#define tdb_get_flags ext2fs_tdb_get_flags
++#define tdb_chainlock ext2fs_tdb_chainlock
++#define tdb_chainunlock ext2fs_tdb_chainunlock
++#define tdb_chainlock_read ext2fs_tdb_chainlock_read
++#define tdb_chainunlock_read ext2fs_tdb_chainunlock_read
++#define tdb_dump_all ext2fs_tdb_dump_all
++#define tdb_printfreelist ext2fs_tdb_printfreelist
++#define tdb_validate_freelist ext2fs_tdb_validate_freelist
++#define tdb_chainlock_mark ext2fs_tdb_chainlock_mark
++#define tdb_chainlock_nonblock ext2fs_tdb_chainlock_nonblock
++#define tdb_chainlock_unmark ext2fs_tdb_chainlock_unmark
++#define tdb_enable_seqnum ext2fs_tdb_enable_seqnum
++#define tdb_increment_seqnum_nonblock ext2fs_tdb_increment_seqnum_nonblock
++#define tdb_lock_nonblock ext2fs_tdb_lock_nonblock
++#define tdb_lockall_mark ext2fs_tdb_lockall_mark
++#define tdb_lockall_nonblock ext2fs_tdb_lockall_nonblock
++#define tdb_lockall_read_nonblock ext2fs_tdb_lockall_read_nonblock
++#define tdb_lockall_unmark ext2fs_tdb_lockall_unmark
++
+ /* this is the context structure that is returned from a db open */
+ typedef struct tdb_context TDB_CONTEXT;
+
diff --git a/lib/ext2fs/tdb/patches/replace-includes b/lib/ext2fs/tdb/patches/replace-includes
new file mode 100644
index 0000000..f4181c1
--- /dev/null
+++ b/lib/ext2fs/tdb/patches/replace-includes
@@ -0,0 +1,92 @@
+Index: tdb/tdb.c
+===================================================================
+--- tdb.orig/tdb.c
++++ tdb/tdb.c
+@@ -29,11 +29,82 @@ Last Changed Date: 2007-06-22 13:36:10 -
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+-#include "replace.h"
+-#include "system/filesys.h"
+-#include "system/time.h"
+-#include "system/shmem.h"
+-#include "system/select.h"
++#ifdef CONFIG_STAND_ALONE
++#define HAVE_MMAP
++#define HAVE_STRDUP
++#define HAVE_SYS_MMAN_H
++#define HAVE_UTIME_H
++#define HAVE_UTIME
++#endif
++#define _XOPEN_SOURCE 500
++
++#include <unistd.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <stdarg.h>
++#include <stddef.h>
++#include <errno.h>
++#include <string.h>
++#ifdef HAVE_SYS_SELECT_H
++#include <sys/select.h>
++#endif
++#include <sys/time.h>
++#include <sys/types.h>
++#include <time.h>
++#ifdef HAVE_UTIME_H
++#include <utime.h>
++#endif
++#include <sys/stat.h>
++#include <sys/file.h>
++#include <fcntl.h>
++
++#ifdef HAVE_SYS_MMAN_H
++#include <sys/mman.h>
++#endif
++
++#ifndef MAP_FILE
++#define MAP_FILE 0
++#endif
++
++#ifndef MAP_FAILED
++#define MAP_FAILED ((void *)-1)
++#endif
++
++#ifndef HAVE_STRDUP
++#define strdup rep_strdup
++static char *rep_strdup(const char *s)
++{
++ char *ret;
++ int length;
++ if (!s)
++ return NULL;
++
++ if (!length)
++ length = strlen(s);
++
++ ret = malloc(length + 1);
++ if (ret) {
++ strncpy(ret, s, length);
++ ret[length] = '\0';
++ }
++ return ret;
++}
++#endif
++
++#ifndef PRINTF_ATTRIBUTE
++#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
++/** Use gcc attribute to check printf fns. a1 is the 1-based index of
++ * the parameter containing the format, and a2 the index of the first
++ * argument. Note that some gcc 2.x versions don't handle this
++ * properly **/
++#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
++#else
++#define PRINTF_ATTRIBUTE(a1, a2)
++#endif
++#endif
++
++typedef int bool;
++
+ #include "tdb.h"
+
+ #ifndef u32
diff --git a/lib/ext2fs/tdb/patches/series b/lib/ext2fs/tdb/patches/series
new file mode 100644
index 0000000..722b921
--- /dev/null
+++ b/lib/ext2fs/tdb/patches/series
@@ -0,0 +1,6 @@
+copyright
+replace-includes
+static-prototypes
+static-functions
+tdbtool-includes
+ext2tdb-rename
diff --git a/lib/ext2fs/tdb/patches/static-functions b/lib/ext2fs/tdb/patches/static-functions
new file mode 100644
index 0000000..ab0fbef
--- /dev/null
+++ b/lib/ext2fs/tdb/patches/static-functions
@@ -0,0 +1,13 @@
+Index: tdbsa/tdb.c
+===================================================================
+--- tdbsa.orig/tdb.c
++++ tdbsa/tdb.c
+@@ -2254,7 +2254,7 @@ int tdb_transaction_recover(struct tdb_c
+ /* file: freelist.c */
+
+ /* read a freelist record and check for simple errors */
+-int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
++static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
+ {
+ if (tdb->methods->tdb_read(tdb, off, rec, sizeof(*rec),DOCONV()) == -1)
+ return -1;
diff --git a/lib/ext2fs/tdb/patches/static-prototypes b/lib/ext2fs/tdb/patches/static-prototypes
new file mode 100644
index 0000000..cf8af61
--- /dev/null
+++ b/lib/ext2fs/tdb/patches/static-prototypes
@@ -0,0 +1,72 @@
+Index: tdbsa/tdb.c
+===================================================================
+--- tdbsa.orig/tdb.c
++++ tdbsa/tdb.c
+@@ -251,39 +251,39 @@ struct tdb_context {
+ /*
+ internal prototypes
+ */
+-int tdb_munmap(struct tdb_context *tdb);
+-void tdb_mmap(struct tdb_context *tdb);
+-int tdb_lock(struct tdb_context *tdb, int list, int ltype);
+-int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
+-int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len);
+-int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
+-int tdb_transaction_unlock(struct tdb_context *tdb);
+-int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len);
+-int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off);
+-int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off);
+-int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+-int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+-void *tdb_convert(void *buf, u32 size);
+-int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
+-tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec);
+-int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+-int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
+-int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off);
+-int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off);
+-int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
+-int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
+-int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct *rec);
+-unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len);
+-int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
++static int tdb_munmap(struct tdb_context *tdb);
++static void tdb_mmap(struct tdb_context *tdb);
++static int tdb_lock(struct tdb_context *tdb, int list, int ltype);
++static int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
++static int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len);
++static int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
++static int tdb_transaction_unlock(struct tdb_context *tdb);
++static int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len);
++static int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off);
++static int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off);
++static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
++static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
++static void *tdb_convert(void *buf, u32 size);
++static int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
++static tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec);
++static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
++static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
++static int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off);
++static int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off);
++static int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
++static int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
++static int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct *rec);
++static unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len);
++static int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
+ tdb_off_t offset, tdb_len_t len,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data);
+-tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype,
++static tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype,
+ struct list_struct *rec);
+-void tdb_io_init(struct tdb_context *tdb);
+-int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
+-int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
++static void tdb_io_init(struct tdb_context *tdb);
++static int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
++static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
+ struct list_struct *rec);
+
+
diff --git a/lib/ext2fs/tdb/patches/tdbtool-includes b/lib/ext2fs/tdb/patches/tdbtool-includes
new file mode 100644
index 0000000..c076c79
--- /dev/null
+++ b/lib/ext2fs/tdb/patches/tdbtool-includes
@@ -0,0 +1,30 @@
+Index: tdbsa/tdbtool.c
+===================================================================
+--- tdbsa.orig/tdbtool.c
++++ tdbsa/tdbtool.c
+@@ -21,10 +21,21 @@
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+-#include "replace.h"
+-#include "system/locale.h"
+-#include "system/time.h"
+-#include "system/filesys.h"
++#include <errno.h>
++#include <stdlib.h>
++#include <stdio.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <string.h>
++#include <fcntl.h>
++#include <time.h>
++#include <sys/mman.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <ctype.h>
++#include <signal.h>
++#include <stdarg.h>
++
+ #include "tdb.h"
+
+ static int do_command(void);
diff --git a/lib/ext2fs/tdbtool.c b/lib/ext2fs/tdbtool.c
new file mode 100644
index 0000000..eeac0c8
--- /dev/null
+++ b/lib/ext2fs/tdbtool.c
@@ -0,0 +1,621 @@
+/*
+ Unix SMB/CIFS implementation.
+ Samba database functions
+ Copyright (C) Andrew Tridgell 1999-2000
+ Copyright (C) Paul `Rusty' Russell 2000
+ Copyright (C) Jeremy Allison 2000
+ Copyright (C) Andrew Esh 2001
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <time.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stdarg.h>
+
+#include "tdb.h"
+
+static int do_command(void);
+const char *cmdname;
+char *arg1, *arg2;
+size_t arg1len, arg2len;
+int bIterate = 0;
+char *line;
+TDB_DATA iterate_kbuf;
+char cmdline[1024];
+
+enum commands {
+ CMD_CREATE_TDB,
+ CMD_OPEN_TDB,
+ CMD_ERASE,
+ CMD_DUMP,
+ CMD_INSERT,
+ CMD_MOVE,
+ CMD_STORE,
+ CMD_SHOW,
+ CMD_KEYS,
+ CMD_HEXKEYS,
+ CMD_DELETE,
+ CMD_LIST_HASH_FREE,
+ CMD_LIST_FREE,
+ CMD_INFO,
+ CMD_FIRST,
+ CMD_NEXT,
+ CMD_SYSTEM,
+ CMD_QUIT,
+ CMD_HELP
+};
+
+typedef struct {
+ const char *name;
+ enum commands cmd;
+} COMMAND_TABLE;
+
+COMMAND_TABLE cmd_table[] = {
+ {"create", CMD_CREATE_TDB},
+ {"open", CMD_OPEN_TDB},
+ {"erase", CMD_ERASE},
+ {"dump", CMD_DUMP},
+ {"insert", CMD_INSERT},
+ {"move", CMD_MOVE},
+ {"store", CMD_STORE},
+ {"show", CMD_SHOW},
+ {"keys", CMD_KEYS},
+ {"hexkeys", CMD_HEXKEYS},
+ {"delete", CMD_DELETE},
+ {"list", CMD_LIST_HASH_FREE},
+ {"free", CMD_LIST_FREE},
+ {"info", CMD_INFO},
+ {"first", CMD_FIRST},
+ {"1", CMD_FIRST},
+ {"next", CMD_NEXT},
+ {"n", CMD_NEXT},
+ {"quit", CMD_QUIT},
+ {"q", CMD_QUIT},
+ {"!", CMD_SYSTEM},
+ {NULL, CMD_HELP}
+};
+
+/* a tdb tool for manipulating a tdb database */
+
+static TDB_CONTEXT *tdb;
+
+static int print_rec(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state);
+static int print_key(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state);
+static int print_hexkey(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state);
+
+static void print_asc(const char *buf,int len)
+{
+ int i;
+
+ /* We're probably printing ASCII strings so don't try to display
+ the trailing NULL character. */
+
+ if (buf[len - 1] == 0)
+ len--;
+
+ for (i=0;i<len;i++)
+ printf("%c",isprint(buf[i])?buf[i]:'.');
+}
+
+static void print_data(const char *buf,int len)
+{
+ int i=0;
+ if (len<=0) return;
+ printf("[%03X] ",i);
+ for (i=0;i<len;) {
+ printf("%02X ",(int)buf[i]);
+ i++;
+ if (i%8 == 0) printf(" ");
+ if (i%16 == 0) {
+ print_asc(&buf[i-16],8); printf(" ");
+ print_asc(&buf[i-8],8); printf("\n");
+ if (i<len) printf("[%03X] ",i);
+ }
+ }
+ if (i%16) {
+ int n;
+
+ n = 16 - (i%16);
+ printf(" ");
+ if (n>8) printf(" ");
+ while (n--) printf(" ");
+
+ n = i%16;
+ if (n > 8) n = 8;
+ print_asc(&buf[i-(i%16)],n); printf(" ");
+ n = (i%16) - n;
+ if (n>0) print_asc(&buf[i-n],n);
+ printf("\n");
+ }
+}
+
+static void help(void)
+{
+ printf("\n"
+"tdbtool: \n"
+" create dbname : create a database\n"
+" open dbname : open an existing database\n"
+" erase : erase the database\n"
+" dump : dump the database as strings\n"
+" keys : dump the database keys as strings\n"
+" hexkeys : dump the database keys as hex values\n"
+" info : print summary info about the database\n"
+" insert key data : insert a record\n"
+" move key file : move a record to a destination tdb\n"
+" store key data : store a record (replace)\n"
+" show key : show a record by key\n"
+" delete key : delete a record by key\n"
+" list : print the database hash table and freelist\n"
+" free : print the database freelist\n"
+" ! command : execute system command\n"
+" 1 | first : print the first record\n"
+" n | next : print the next record\n"
+" q | quit : terminate\n"
+" \\n : repeat 'next' command\n"
+"\n");
+}
+
+static void terror(const char *why)
+{
+ printf("%s\n", why);
+}
+
+static void create_tdb(const char *tdbname)
+{
+ if (tdb) tdb_close(tdb);
+ tdb = tdb_open(tdbname, 0, TDB_CLEAR_IF_FIRST,
+ O_RDWR | O_CREAT | O_TRUNC, 0600);
+ if (!tdb) {
+ printf("Could not create %s: %s\n", tdbname, strerror(errno));
+ }
+}
+
+static void open_tdb(const char *tdbname)
+{
+ if (tdb) tdb_close(tdb);
+ tdb = tdb_open(tdbname, 0, 0, O_RDWR, 0600);
+ if (!tdb) {
+ printf("Could not open %s: %s\n", tdbname, strerror(errno));
+ }
+}
+
+static void insert_tdb(char *keyname, size_t keylen, char* data, size_t datalen)
+{
+ TDB_DATA key, dbuf;
+
+ if ((keyname == NULL) || (keylen == 0)) {
+ terror("need key");
+ return;
+ }
+
+ key.dptr = (unsigned char *)keyname;
+ key.dsize = keylen;
+ dbuf.dptr = (unsigned char *)data;
+ dbuf.dsize = datalen;
+
+ if (tdb_store(tdb, key, dbuf, TDB_INSERT) == -1) {
+ terror("insert failed");
+ }
+}
+
+static void store_tdb(char *keyname, size_t keylen, char* data, size_t datalen)
+{
+ TDB_DATA key, dbuf;
+
+ if ((keyname == NULL) || (keylen == 0)) {
+ terror("need key");
+ return;
+ }
+
+ if ((data == NULL) || (datalen == 0)) {
+ terror("need data");
+ return;
+ }
+
+ key.dptr = (unsigned char *)keyname;
+ key.dsize = keylen;
+ dbuf.dptr = (unsigned char *)data;
+ dbuf.dsize = datalen;
+
+ printf("Storing key:\n");
+ print_rec(tdb, key, dbuf, NULL);
+
+ if (tdb_store(tdb, key, dbuf, TDB_REPLACE) == -1) {
+ terror("store failed");
+ }
+}
+
+static void show_tdb(char *keyname, size_t keylen)
+{
+ TDB_DATA key, dbuf;
+
+ if ((keyname == NULL) || (keylen == 0)) {
+ terror("need key");
+ return;
+ }
+
+ key.dptr = (unsigned char *)keyname;
+ key.dsize = keylen;
+
+ dbuf = tdb_fetch(tdb, key);
+ if (!dbuf.dptr) {
+ terror("fetch failed");
+ return;
+ }
+
+ print_rec(tdb, key, dbuf, NULL);
+
+ free( dbuf.dptr );
+
+ return;
+}
+
+static void delete_tdb(char *keyname, size_t keylen)
+{
+ TDB_DATA key;
+
+ if ((keyname == NULL) || (keylen == 0)) {
+ terror("need key");
+ return;
+ }
+
+ key.dptr = (unsigned char *)keyname;
+ key.dsize = keylen;
+
+ if (tdb_delete(tdb, key) != 0) {
+ terror("delete failed");
+ }
+}
+
+static void move_rec(char *keyname, size_t keylen, char* tdbname)
+{
+ TDB_DATA key, dbuf;
+ TDB_CONTEXT *dst_tdb;
+
+ if ((keyname == NULL) || (keylen == 0)) {
+ terror("need key");
+ return;
+ }
+
+ if ( !tdbname ) {
+ terror("need destination tdb name");
+ return;
+ }
+
+ key.dptr = (unsigned char *)keyname;
+ key.dsize = keylen;
+
+ dbuf = tdb_fetch(tdb, key);
+ if (!dbuf.dptr) {
+ terror("fetch failed");
+ return;
+ }
+
+ print_rec(tdb, key, dbuf, NULL);
+
+ dst_tdb = tdb_open(tdbname, 0, 0, O_RDWR, 0600);
+ if ( !dst_tdb ) {
+ terror("unable to open destination tdb");
+ return;
+ }
+
+ if ( tdb_store( dst_tdb, key, dbuf, TDB_REPLACE ) == -1 ) {
+ terror("failed to move record");
+ }
+ else
+ printf("record moved\n");
+
+ tdb_close( dst_tdb );
+
+ return;
+}
+
+static int print_rec(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
+{
+ printf("\nkey %d bytes\n", (int)key.dsize);
+ print_asc((const char *)key.dptr, key.dsize);
+ printf("\ndata %d bytes\n", (int)dbuf.dsize);
+ print_data((const char *)dbuf.dptr, dbuf.dsize);
+ return 0;
+}
+
+static int print_key(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
+{
+ printf("key %d bytes: ", (int)key.dsize);
+ print_asc((const char *)key.dptr, key.dsize);
+ printf("\n");
+ return 0;
+}
+
+static int print_hexkey(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
+{
+ printf("key %d bytes\n", (int)key.dsize);
+ print_data((const char *)key.dptr, key.dsize);
+ printf("\n");
+ return 0;
+}
+
+static int total_bytes;
+
+static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
+{
+ total_bytes += dbuf.dsize;
+ return 0;
+}
+
+static void info_tdb(void)
+{
+ int count;
+ total_bytes = 0;
+ if ((count = tdb_traverse(tdb, traverse_fn, NULL)) == -1)
+ printf("Error = %s\n", tdb_errorstr(tdb));
+ else
+ printf("%d records totalling %d bytes\n", count, total_bytes);
+}
+
+static char *tdb_getline(const char *prompt)
+{
+ static char thisline[1024];
+ char *p;
+ fputs(prompt, stdout);
+ thisline[0] = 0;
+ p = fgets(thisline, sizeof(thisline)-1, stdin);
+ if (p) p = strchr(p, '\n');
+ if (p) *p = 0;
+ return p?thisline:NULL;
+}
+
+static int do_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf,
+ void *state)
+{
+ return tdb_delete(the_tdb, key);
+}
+
+static void first_record(TDB_CONTEXT *the_tdb, TDB_DATA *pkey)
+{
+ TDB_DATA dbuf;
+ *pkey = tdb_firstkey(the_tdb);
+
+ dbuf = tdb_fetch(the_tdb, *pkey);
+ if (!dbuf.dptr) terror("fetch failed");
+ else {
+ print_rec(the_tdb, *pkey, dbuf, NULL);
+ }
+}
+
+static void next_record(TDB_CONTEXT *the_tdb, TDB_DATA *pkey)
+{
+ TDB_DATA dbuf;
+ *pkey = tdb_nextkey(the_tdb, *pkey);
+
+ dbuf = tdb_fetch(the_tdb, *pkey);
+ if (!dbuf.dptr)
+ terror("fetch failed");
+ else
+ print_rec(the_tdb, *pkey, dbuf, NULL);
+}
+
+static int do_command(void)
+{
+ COMMAND_TABLE *ctp = cmd_table;
+ enum commands mycmd = CMD_HELP;
+ int cmd_len;
+
+ if (cmdname && strlen(cmdname) == 0) {
+ mycmd = CMD_NEXT;
+ } else {
+ while (ctp->name) {
+ cmd_len = strlen(ctp->name);
+ if (strncmp(ctp->name,cmdname,cmd_len) == 0) {
+ mycmd = ctp->cmd;
+ break;
+ }
+ ctp++;
+ }
+ }
+
+ switch (mycmd) {
+ case CMD_CREATE_TDB:
+ bIterate = 0;
+ create_tdb(arg1);
+ return 0;
+ case CMD_OPEN_TDB:
+ bIterate = 0;
+ open_tdb(arg1);
+ return 0;
+ case CMD_SYSTEM:
+ /* Shell command */
+ system(arg1);
+ return 0;
+ case CMD_QUIT:
+ return 1;
+ default:
+ /* all the rest require a open database */
+ if (!tdb) {
+ bIterate = 0;
+ terror("database not open");
+ help();
+ return 0;
+ }
+ switch (mycmd) {
+ case CMD_ERASE:
+ bIterate = 0;
+ tdb_traverse(tdb, do_delete_fn, NULL);
+ return 0;
+ case CMD_DUMP:
+ bIterate = 0;
+ tdb_traverse(tdb, print_rec, NULL);
+ return 0;
+ case CMD_INSERT:
+ bIterate = 0;
+ insert_tdb(arg1, arg1len,arg2,arg2len);
+ return 0;
+ case CMD_MOVE:
+ bIterate = 0;
+ move_rec(arg1,arg1len,arg2);
+ return 0;
+ case CMD_STORE:
+ bIterate = 0;
+ store_tdb(arg1,arg1len,arg2,arg2len);
+ return 0;
+ case CMD_SHOW:
+ bIterate = 0;
+ show_tdb(arg1, arg1len);
+ return 0;
+ case CMD_KEYS:
+ tdb_traverse(tdb, print_key, NULL);
+ return 0;
+ case CMD_HEXKEYS:
+ tdb_traverse(tdb, print_hexkey, NULL);
+ return 0;
+ case CMD_DELETE:
+ bIterate = 0;
+ delete_tdb(arg1,arg1len);
+ return 0;
+ case CMD_LIST_HASH_FREE:
+ tdb_dump_all(tdb);
+ return 0;
+ case CMD_LIST_FREE:
+ tdb_printfreelist(tdb);
+ return 0;
+ case CMD_INFO:
+ info_tdb();
+ return 0;
+ case CMD_FIRST:
+ bIterate = 1;
+ first_record(tdb, &iterate_kbuf);
+ return 0;
+ case CMD_NEXT:
+ if (bIterate)
+ next_record(tdb, &iterate_kbuf);
+ return 0;
+ case CMD_HELP:
+ help();
+ return 0;
+ case CMD_CREATE_TDB:
+ case CMD_OPEN_TDB:
+ case CMD_SYSTEM:
+ case CMD_QUIT:
+ /*
+ * unhandled commands. cases included here to avoid compiler
+ * warnings.
+ */
+ return 0;
+ }
+ }
+
+ return 0;
+}
+
+static char *convert_string(char *instring, size_t *sizep)
+{
+ size_t length = 0;
+ char *outp, *inp;
+ char temp[3];
+
+
+ outp = inp = instring;
+
+ while (*inp) {
+ if (*inp == '\\') {
+ inp++;
+ if (*inp && strchr("0123456789abcdefABCDEF",(int)*inp)) {
+ temp[0] = *inp++;
+ temp[1] = '\0';
+ if (*inp && strchr("0123456789abcdefABCDEF",(int)*inp)) {
+ temp[1] = *inp++;
+ temp[2] = '\0';
+ }
+ *outp++ = (char)strtol((const char *)temp,NULL,16);
+ } else {
+ *outp++ = *inp++;
+ }
+ } else {
+ *outp++ = *inp++;
+ }
+ length++;
+ }
+ *sizep = length;
+ return instring;
+}
+
+int main(int argc, char *argv[])
+{
+ cmdname = "";
+ arg1 = NULL;
+ arg1len = 0;
+ arg2 = NULL;
+ arg2len = 0;
+
+ if (argv[1]) {
+ cmdname = "open";
+ arg1 = argv[1];
+ do_command();
+ cmdname = "";
+ arg1 = NULL;
+ }
+
+ switch (argc) {
+ case 1:
+ case 2:
+ /* Interactive mode */
+ while ((cmdname = tdb_getline("tdb> "))) {
+ arg2 = arg1 = NULL;
+ if ((arg1 = strchr((const char *)cmdname,' ')) != NULL) {
+ arg1++;
+ arg2 = arg1;
+ while (*arg2) {
+ if (*arg2 == ' ') {
+ *arg2++ = '\0';
+ break;
+ }
+ if ((*arg2++ == '\\') && (*arg2 == ' ')) {
+ arg2++;
+ }
+ }
+ }
+ if (arg1) arg1 = convert_string(arg1,&arg1len);
+ if (arg2) arg2 = convert_string(arg2,&arg2len);
+ if (do_command()) break;
+ }
+ break;
+ case 5:
+ arg2 = convert_string(argv[4],&arg2len);
+ case 4:
+ arg1 = convert_string(argv[3],&arg1len);
+ case 3:
+ cmdname = argv[2];
+ default:
+ do_command();
+ break;
+ }
+
+ if (tdb) tdb_close(tdb);
+
+ return 0;
+}
diff --git a/lib/ext2fs/test_io.c b/lib/ext2fs/test_io.c
new file mode 100644
index 0000000..6843edb
--- /dev/null
+++ b/lib/ext2fs/test_io.c
@@ -0,0 +1,557 @@
+/*
+ * test_io.c --- This is the Test I/O interface.
+ *
+ * Copyright (C) 1996 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#else
+#define PR_GET_DUMPABLE 3
+#endif
+#if (!defined(HAVE_PRCTL) && defined(linux))
+#include <sys/syscall.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+
+struct test_private_data {
+ int magic;
+ io_channel real;
+ int flags;
+ FILE *outfile;
+ unsigned long block;
+ int read_abort_count, write_abort_count;
+ void (*read_blk)(unsigned long block, int count, errcode_t err);
+ void (*write_blk)(unsigned long block, int count, errcode_t err);
+ void (*set_blksize)(int blksize, errcode_t err);
+ void (*write_byte)(unsigned long block, int count, errcode_t err);
+ void (*read_blk64)(unsigned long long block, int count, errcode_t err);
+ void (*write_blk64)(unsigned long long block, int count, errcode_t err);
+};
+
+/*
+ * These global variable can be set by the test program as
+ * necessary *before* calling test_open
+ */
+io_manager test_io_backing_manager = 0;
+void (*test_io_cb_read_blk)
+ (unsigned long block, int count, errcode_t err) = 0;
+void (*test_io_cb_write_blk)
+ (unsigned long block, int count, errcode_t err) = 0;
+void (*test_io_cb_read_blk64)
+ (unsigned long long block, int count, errcode_t err) = 0;
+void (*test_io_cb_write_blk64)
+ (unsigned long long block, int count, errcode_t err) = 0;
+void (*test_io_cb_set_blksize)
+ (int blksize, errcode_t err) = 0;
+void (*test_io_cb_write_byte)
+ (unsigned long block, int count, errcode_t err) = 0;
+
+/*
+ * Test flags
+ */
+#define TEST_FLAG_READ 0x01
+#define TEST_FLAG_WRITE 0x02
+#define TEST_FLAG_SET_BLKSIZE 0x04
+#define TEST_FLAG_FLUSH 0x08
+#define TEST_FLAG_DUMP 0x10
+#define TEST_FLAG_SET_OPTION 0x20
+#define TEST_FLAG_DISCARD 0x40
+#define TEST_FLAG_READAHEAD 0x80
+#define TEST_FLAG_ZEROOUT 0x100
+
+static void test_dump_block(io_channel channel,
+ struct test_private_data *data,
+ unsigned long block, const void *buf)
+{
+ const unsigned char *cp;
+ FILE *f = data->outfile;
+ int i;
+ unsigned long cksum = 0;
+
+ for (i=0, cp = buf; i < channel->block_size; i++, cp++) {
+ cksum += *cp;
+ }
+ fprintf(f, "Contents of block %lu, checksum %08lu: \n", block, cksum);
+ for (i=0, cp = buf; i < channel->block_size; i++, cp++) {
+ if ((i % 16) == 0)
+ fprintf(f, "%04x: ", i);
+ fprintf(f, "%02x%c", *cp, ((i % 16) == 15) ? '\n' : ' ');
+ }
+}
+
+/*
+ * Flush data buffers to disk.
+ */
+static errcode_t test_flush(io_channel channel)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *)channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_flush(data->real);
+
+ if (data->flags & TEST_FLAG_FLUSH)
+ fprintf(data->outfile, "Test_io: flush() returned %s\n",
+ retval ? error_message(retval) : "OK");
+
+ return retval;
+}
+
+static void test_abort(io_channel channel, unsigned long block)
+{
+ struct test_private_data *data;
+ FILE *f;
+
+ data = (struct test_private_data *) channel->private_data;
+ f = data->outfile;
+ test_flush(channel);
+
+ fprintf(f, "Aborting due to I/O to block %lu\n", block);
+ fflush(f);
+ abort();
+}
+
+static char *safe_getenv(const char *arg)
+{
+#if !defined(_WIN32)
+ if ((getuid() != geteuid()) || (getgid() != getegid()))
+ return NULL;
+#endif
+#if HAVE_PRCTL
+ if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#else
+#if (defined(linux) && defined(SYS_prctl))
+ if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#endif
+#endif
+
+#if defined(HAVE_SECURE_GETENV)
+ return secure_getenv(arg);
+#elif defined(HAVE___SECURE_GETENV)
+ return __secure_getenv(arg);
+#else
+ return getenv(arg);
+#endif
+}
+
+static errcode_t test_open(const char *name, int flags, io_channel *channel)
+{
+ io_channel io = NULL;
+ struct test_private_data *data = NULL;
+ errcode_t retval;
+ char *value;
+
+ if (name == 0)
+ return EXT2_ET_BAD_DEVICE_NAME;
+ retval = ext2fs_get_mem(sizeof(struct struct_io_channel), &io);
+ if (retval)
+ goto cleanup;
+ memset(io, 0, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ retval = ext2fs_get_mem(sizeof(struct test_private_data), &data);
+ if (retval)
+ goto cleanup;
+ io->manager = test_io_manager;
+ retval = ext2fs_get_mem(strlen(name)+1, &io->name);
+ if (retval)
+ goto cleanup;
+
+ strcpy(io->name, name);
+ io->private_data = data;
+ io->block_size = 1024;
+ io->read_error = 0;
+ io->write_error = 0;
+ io->refcount = 1;
+ io->flags = 0;
+
+ memset(data, 0, sizeof(struct test_private_data));
+ data->magic = EXT2_ET_MAGIC_TEST_IO_CHANNEL;
+ if (test_io_backing_manager) {
+ retval = test_io_backing_manager->open(name, flags,
+ &data->real);
+ if (retval)
+ goto cleanup;
+ } else {
+ data->real = 0;
+ }
+ data->read_blk = test_io_cb_read_blk;
+ data->write_blk = test_io_cb_write_blk;
+ data->set_blksize = test_io_cb_set_blksize;
+ data->write_byte = test_io_cb_write_byte;
+ data->read_blk64 = test_io_cb_read_blk64;
+ data->write_blk64 = test_io_cb_write_blk64;
+
+ data->outfile = NULL;
+ if ((value = safe_getenv("TEST_IO_LOGFILE")) != NULL)
+ data->outfile = fopen(value, "w");
+ if (!data->outfile)
+ data->outfile = stderr;
+
+ data->flags = 0;
+ if ((value = safe_getenv("TEST_IO_FLAGS")) != NULL)
+ data->flags = strtoul(value, NULL, 0);
+
+ data->block = 0;
+ if ((value = safe_getenv("TEST_IO_BLOCK")) != NULL)
+ data->block = strtoul(value, NULL, 0);
+
+ data->read_abort_count = 0;
+ if ((value = safe_getenv("TEST_IO_READ_ABORT")) != NULL)
+ data->read_abort_count = strtoul(value, NULL, 0);
+
+ data->write_abort_count = 0;
+ if ((value = safe_getenv("TEST_IO_WRITE_ABORT")) != NULL)
+ data->write_abort_count = strtoul(value, NULL, 0);
+
+ if (data->real) {
+ io->align = data->real->align;
+ if (data->real->flags & CHANNEL_FLAGS_THREADS)
+ io->flags |= CHANNEL_FLAGS_THREADS;
+ }
+
+ *channel = io;
+ return 0;
+
+cleanup:
+ if (io && io->name)
+ ext2fs_free_mem(&io->name);
+ if (io)
+ ext2fs_free_mem(&io);
+ if (data)
+ ext2fs_free_mem(&data);
+ return retval;
+}
+
+static errcode_t test_close(io_channel channel)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (--channel->refcount > 0)
+ return 0;
+
+ if (data->real)
+ retval = io_channel_close(data->real);
+
+ if (data->outfile && data->outfile != stderr)
+ fclose(data->outfile);
+
+ ext2fs_free_mem(&channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem(&channel->name);
+ ext2fs_free_mem(&channel);
+ return retval;
+}
+
+static errcode_t test_set_blksize(io_channel channel, int blksize)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real) {
+ retval = io_channel_set_blksize(data->real, blksize);
+ channel->align = data->real->align;
+ }
+ if (data->set_blksize)
+ data->set_blksize(blksize, retval);
+ if (data->flags & TEST_FLAG_SET_BLKSIZE)
+ fprintf(data->outfile,
+ "Test_io: set_blksize(%d) returned %s\n",
+ blksize, retval ? error_message(retval) : "OK");
+ channel->block_size = blksize;
+ return retval;
+}
+
+
+static errcode_t test_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_read_blk(data->real, block, count, buf);
+ if (data->read_blk)
+ data->read_blk(block, count, retval);
+ if (data->flags & TEST_FLAG_READ)
+ fprintf(data->outfile,
+ "Test_io: read_blk(%lu, %d) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ if (data->block && data->block == block) {
+ if (data->flags & TEST_FLAG_DUMP)
+ test_dump_block(channel, data, block, buf);
+ if (--data->read_abort_count == 0)
+ test_abort(channel, block);
+ }
+ return retval;
+}
+
+static errcode_t test_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_write_blk(data->real, block, count, buf);
+ if (data->write_blk)
+ data->write_blk(block, count, retval);
+ if (data->flags & TEST_FLAG_WRITE)
+ fprintf(data->outfile,
+ "Test_io: write_blk(%lu, %d) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ if (data->block && data->block == block) {
+ if (data->flags & TEST_FLAG_DUMP)
+ test_dump_block(channel, data, block, buf);
+ if (--data->write_abort_count == 0)
+ test_abort(channel, block);
+ }
+ return retval;
+}
+
+static errcode_t test_read_blk64(io_channel channel, unsigned long long block,
+ int count, void *buf)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_read_blk64(data->real, block, count, buf);
+ if (data->read_blk64)
+ data->read_blk64(block, count, retval);
+ if (data->flags & TEST_FLAG_READ)
+ fprintf(data->outfile,
+ "Test_io: read_blk64(%llu, %d) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ if (data->block && data->block == block) {
+ if (data->flags & TEST_FLAG_DUMP)
+ test_dump_block(channel, data, block, buf);
+ if (--data->read_abort_count == 0)
+ test_abort(channel, block);
+ }
+ return retval;
+}
+
+static errcode_t test_write_blk64(io_channel channel, unsigned long long block,
+ int count, const void *buf)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_write_blk64(data->real, block, count, buf);
+ if (data->write_blk64)
+ data->write_blk64(block, count, retval);
+ if (data->flags & TEST_FLAG_WRITE)
+ fprintf(data->outfile,
+ "Test_io: write_blk64(%llu, %d) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ if (data->block && data->block == block) {
+ if (data->flags & TEST_FLAG_DUMP)
+ test_dump_block(channel, data, block, buf);
+ if (--data->write_abort_count == 0)
+ test_abort(channel, block);
+ }
+ return retval;
+}
+
+static errcode_t test_write_byte(io_channel channel, unsigned long offset,
+ int count, const void *buf)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real && data->real->manager->write_byte)
+ retval = io_channel_write_byte(data->real, offset, count, buf);
+ if (data->write_byte)
+ data->write_byte(offset, count, retval);
+ if (data->flags & TEST_FLAG_WRITE)
+ fprintf(data->outfile,
+ "Test_io: write_byte(%lu, %d) returned %s\n",
+ offset, count, retval ? error_message(retval) : "OK");
+ return retval;
+}
+
+static errcode_t test_set_option(io_channel channel, const char *option,
+ const char *arg)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+
+ if (data->flags & TEST_FLAG_SET_OPTION)
+ fprintf(data->outfile, "Test_io: set_option(%s, %s) ",
+ option, arg);
+ if (data->real && data->real->manager->set_option) {
+ retval = (data->real->manager->set_option)(data->real,
+ option, arg);
+ if (data->flags & TEST_FLAG_SET_OPTION)
+ fprintf(data->outfile, "returned %s\n",
+ retval ? error_message(retval) : "OK");
+ } else {
+ if (data->flags & TEST_FLAG_SET_OPTION)
+ fprintf(data->outfile, "not implemented\n");
+ }
+ return retval;
+}
+
+static errcode_t test_get_stats(io_channel channel, io_stats *stats)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real && data->real->manager->get_stats) {
+ retval = (data->real->manager->get_stats)(data->real, stats);
+ }
+ return retval;
+}
+
+static errcode_t test_discard(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_discard(data->real, block, count);
+ if (data->flags & TEST_FLAG_DISCARD)
+ fprintf(data->outfile,
+ "Test_io: discard(%llu, %llu) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ return retval;
+}
+
+static errcode_t test_cache_readahead(io_channel channel,
+ unsigned long long block,
+ unsigned long long count)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_cache_readahead(data->real, block, count);
+ if (data->flags & TEST_FLAG_READAHEAD)
+ fprintf(data->outfile,
+ "Test_io: readahead(%llu, %llu) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ return retval;
+}
+
+static errcode_t test_zeroout(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ struct test_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct test_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_zeroout(data->real, block, count);
+ if (data->flags & TEST_FLAG_ZEROOUT)
+ fprintf(data->outfile,
+ "Test_io: zeroout(%llu, %llu) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ return retval;
+}
+
+static struct struct_io_manager struct_test_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Test I/O Manager",
+ .open = test_open,
+ .close = test_close,
+ .set_blksize = test_set_blksize,
+ .read_blk = test_read_blk,
+ .write_blk = test_write_blk,
+ .flush = test_flush,
+ .write_byte = test_write_byte,
+ .set_option = test_set_option,
+ .get_stats = test_get_stats,
+ .read_blk64 = test_read_blk64,
+ .write_blk64 = test_write_blk64,
+ .discard = test_discard,
+ .cache_readahead = test_cache_readahead,
+ .zeroout = test_zeroout,
+};
+
+io_manager test_io_manager = &struct_test_manager;
diff --git a/lib/ext2fs/tst_badblocks.c b/lib/ext2fs/tst_badblocks.c
new file mode 100644
index 0000000..b6e766a
--- /dev/null
+++ b/lib/ext2fs/tst_badblocks.c
@@ -0,0 +1,369 @@
+/*
+ * This testing program makes sure the badblocks implementation works.
+ *
+ * Copyright (C) 1996 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#define ADD_BLK 0x0001
+#define DEL_BLK 0x0002
+
+blk_t test1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0 };
+blk_t test2[] = { 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2, 1, 0 };
+blk_t test3[] = { 3, 1, 4, 5, 9, 2, 7, 10, 5, 6, 10, 8, 0 };
+blk_t test4[] = { 20, 50, 12, 17, 13, 2, 66, 23, 56, 0 };
+blk_t test4a[] = {
+ 20, 1,
+ 50, 1,
+ 3, 0,
+ 17, 1,
+ 18, 0,
+ 16, 0,
+ 11, 0,
+ 12, 1,
+ 13, 1,
+ 14, 0,
+ 80, 0,
+ 45, 0,
+ 66, 1,
+ 0 };
+blk_t test5[] = { 31, 20, 17, 51, 23, 1, 56, 57, 0 };
+blk_t test5a[] = {
+ 50, ADD_BLK,
+ 51, DEL_BLK,
+ 57, DEL_BLK,
+ 66, ADD_BLK,
+ 31, DEL_BLK,
+ 12, ADD_BLK,
+ 2, ADD_BLK,
+ 13, ADD_BLK,
+ 1, DEL_BLK,
+ 0
+ };
+
+
+static int test_fail = 0;
+static int test_expected_fail = 0;
+
+static errcode_t create_test_list(blk_t *vec, badblocks_list *ret)
+{
+ errcode_t retval;
+ badblocks_list bb;
+ int i;
+
+ retval = ext2fs_badblocks_list_create(&bb, 5);
+ if (retval) {
+ com_err("create_test_list", retval, "while creating list");
+ return retval;
+ }
+ for (i=0; vec[i]; i++) {
+ retval = ext2fs_badblocks_list_add(bb, vec[i]);
+ if (retval) {
+ com_err("create_test_list", retval,
+ "while adding test vector %d", i);
+ ext2fs_badblocks_list_free(bb);
+ return retval;
+ }
+ }
+ *ret = bb;
+ return 0;
+}
+
+static void print_list(badblocks_list bb, int verify)
+{
+ errcode_t retval;
+ badblocks_iterate iter;
+ blk_t blk;
+ int i, ok;
+
+ retval = ext2fs_badblocks_list_iterate_begin(bb, &iter);
+ if (retval) {
+ com_err("print_list", retval, "while setting up iterator");
+ return;
+ }
+ ok = i = 1;
+ while (ext2fs_badblocks_list_iterate(iter, &blk)) {
+ printf("%u ", blk);
+ if (i++ != blk)
+ ok = 0;
+ }
+ ext2fs_badblocks_list_iterate_end(iter);
+ if (verify) {
+ if (ok)
+ printf("--- OK");
+ else {
+ printf("--- NOT OK");
+ test_fail++;
+ }
+ }
+}
+
+static void validate_test_seq(badblocks_list bb, blk_t *vec)
+{
+ int i, match, ok;
+
+ for (i = 0; vec[i]; i += 2) {
+ match = ext2fs_badblocks_list_test(bb, vec[i]);
+ if (match == vec[i+1])
+ ok = 1;
+ else {
+ ok = 0;
+ test_fail++;
+ }
+ printf("\tblock %u is %s --- %s\n", vec[i],
+ match ? "present" : "absent",
+ ok ? "OK" : "NOT OK");
+ }
+}
+
+static void do_test_seq(badblocks_list bb, blk_t *vec)
+{
+ int i, match;
+
+ for (i = 0; vec[i]; i += 2) {
+ switch (vec[i+1]) {
+ case ADD_BLK:
+ ext2fs_badblocks_list_add(bb, vec[i]);
+ match = ext2fs_badblocks_list_test(bb, vec[i]);
+ printf("Adding block %u --- now %s\n", vec[i],
+ match ? "present" : "absent");
+ if (!match) {
+ printf("FAILURE!\n");
+ test_fail++;
+ }
+ break;
+ case DEL_BLK:
+ ext2fs_badblocks_list_del(bb, vec[i]);
+ match = ext2fs_badblocks_list_test(bb, vec[i]);
+ printf("Removing block %u --- now %s\n", vec[i],
+ ext2fs_badblocks_list_test(bb, vec[i]) ?
+ "present" : "absent");
+ if (match) {
+ printf("FAILURE!\n");
+ test_fail++;
+ }
+ break;
+ }
+ }
+}
+
+
+int file_test(badblocks_list bb)
+{
+ badblocks_list new_bb = 0;
+ errcode_t retval;
+ FILE *f;
+
+ f = tmpfile();
+ if (!f) {
+ fprintf(stderr, "Error opening temp file: %s\n",
+ error_message(errno));
+ return 1;
+ }
+ retval = ext2fs_write_bb_FILE(bb, 0, f);
+ if (retval) {
+ com_err("file_test", retval, "while writing bad blocks");
+ return 1;
+ }
+
+ rewind(f);
+ retval = ext2fs_read_bb_FILE2(0, f, &new_bb, 0, 0);
+ if (retval) {
+ com_err("file_test", retval, "while reading bad blocks");
+ return 1;
+ }
+ fclose(f);
+
+ if (ext2fs_badblocks_equal(bb, new_bb)) {
+ printf("Block bitmap matched after reading and writing.\n");
+ } else {
+ printf("Block bitmap NOT matched.\n");
+ test_fail++;
+ }
+ ext2fs_badblocks_list_free(new_bb);
+ return 0;
+}
+
+static void invalid_proc(ext2_filsys fs, blk_t blk)
+{
+ if (blk == 34500) {
+ printf("Expected invalid block\n");
+ test_expected_fail++;
+ } else {
+ printf("Invalid block #: %u\n", blk);
+ test_fail++;
+ }
+}
+
+void file_test_invalid(badblocks_list bb)
+{
+ badblocks_list new_bb = 0;
+ errcode_t retval;
+ ext2_filsys fs;
+ FILE *f;
+
+ fs = malloc(sizeof(struct struct_ext2_filsys));
+ memset(fs, 0, sizeof(struct struct_ext2_filsys));
+ fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS;
+ fs->super = malloc(SUPERBLOCK_SIZE);
+ memset(fs->super, 0, SUPERBLOCK_SIZE);
+ fs->super->s_first_data_block = 1;
+ ext2fs_blocks_count_set(fs->super, 100);
+
+ f = tmpfile();
+ if (!f) {
+ fprintf(stderr, "Error opening temp file: %s\n",
+ error_message(errno));
+ test_fail++;
+ goto out;
+ }
+ retval = ext2fs_write_bb_FILE(bb, 0, f);
+ if (retval) {
+ com_err("file_test", retval, "while writing bad blocks");
+ test_fail++;
+ goto out;
+ }
+ fprintf(f, "34500\n");
+
+ rewind(f);
+ test_expected_fail = 0;
+ retval = ext2fs_read_bb_FILE(fs, f, &new_bb, invalid_proc);
+ if (retval) {
+ com_err("file_test", retval, "while reading bad blocks");
+ test_fail++;
+ goto out;
+ }
+ fclose(f);
+ if (!test_expected_fail) {
+ printf("Expected test failure didn't happen!\n");
+ test_fail++;
+ }
+
+
+ if (ext2fs_badblocks_equal(bb, new_bb)) {
+ printf("Block bitmap matched after reading and writing.\n");
+ } else {
+ printf("Block bitmap NOT matched.\n");
+ test_fail++;
+ }
+ ext2fs_badblocks_list_free(new_bb);
+out:
+ free(fs->super);
+ free(fs);
+}
+
+int main(int argc, char **argv)
+{
+ badblocks_list bb1, bb2, bb3, bb4, bb5;
+ int equal;
+ errcode_t retval;
+
+ add_error_table(&et_ext2_error_table);
+
+ bb1 = bb2 = bb3 = bb4 = bb5 = 0;
+
+ printf("test1: ");
+ retval = create_test_list(test1, &bb1);
+ if (retval == 0)
+ print_list(bb1, 1);
+ printf("\n");
+
+ printf("test2: ");
+ retval = create_test_list(test2, &bb2);
+ if (retval == 0)
+ print_list(bb2, 1);
+ printf("\n");
+
+ printf("test3: ");
+ retval = create_test_list(test3, &bb3);
+ if (retval == 0)
+ print_list(bb3, 1);
+ printf("\n");
+
+ printf("test4: ");
+ retval = create_test_list(test4, &bb4);
+ if (retval == 0) {
+ print_list(bb4, 0);
+ printf("\n");
+ validate_test_seq(bb4, test4a);
+ }
+ printf("\n");
+
+ printf("test5: ");
+ retval = create_test_list(test5, &bb5);
+ if (retval == 0) {
+ print_list(bb5, 0);
+ printf("\n");
+ do_test_seq(bb5, test5a);
+ printf("After test5 sequence: ");
+ print_list(bb5, 0);
+ printf("\n");
+ }
+ printf("\n");
+
+ if (bb1 && bb2 && bb3 && bb4 && bb5) {
+ printf("Comparison tests:\n");
+ equal = ext2fs_badblocks_equal(bb1, bb2);
+ printf("bb1 and bb2 are %sequal.\n", equal ? "" : "NOT ");
+ if (equal)
+ test_fail++;
+
+ equal = ext2fs_badblocks_equal(bb1, bb3);
+ printf("bb1 and bb3 are %sequal.\n", equal ? "" : "NOT ");
+ if (!equal)
+ test_fail++;
+
+ equal = ext2fs_badblocks_equal(bb1, bb4);
+ printf("bb1 and bb4 are %sequal.\n", equal ? "" : "NOT ");
+ if (equal)
+ test_fail++;
+
+ equal = ext2fs_badblocks_equal(bb4, bb5);
+ printf("bb4 and bb5 are %sequal.\n", equal ? "" : "NOT ");
+ if (!equal)
+ test_fail++;
+ printf("\n");
+ }
+
+ file_test(bb4);
+
+ file_test_invalid(bb4);
+
+ if (test_fail == 0)
+ printf("ext2fs library badblocks tests checks out OK!\n");
+
+ if (bb1)
+ ext2fs_badblocks_list_free(bb1);
+ if (bb2)
+ ext2fs_badblocks_list_free(bb2);
+ if (bb3)
+ ext2fs_badblocks_list_free(bb3);
+ if (bb4)
+ ext2fs_badblocks_list_free(bb4);
+ if (bb5)
+ ext2fs_badblocks_list_free(bb5);
+
+ return test_fail;
+
+}
diff --git a/lib/ext2fs/tst_bitmaps.c b/lib/ext2fs/tst_bitmaps.c
new file mode 100644
index 0000000..cb3c70d
--- /dev/null
+++ b/lib/ext2fs/tst_bitmaps.c
@@ -0,0 +1,732 @@
+/*
+ * tst_bitmaps.c
+ *
+ * Copyright (C) 2011 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <string.h>
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include "ss/ss.h"
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+extern ss_request_table tst_bitmaps_cmds;
+
+static char subsystem_name[] = "tst_bitmaps";
+static char version[] = "1.0";
+
+ext2_filsys test_fs;
+int exit_status = 0;
+
+static int source_file(const char *cmd_file, int sci_idx)
+{
+ FILE *f;
+ char buf[256];
+ char *cp;
+ int retval;
+ int noecho;
+
+ if (strcmp(cmd_file, "-") == 0)
+ f = stdin;
+ else {
+ f = fopen(cmd_file, "r");
+ if (!f) {
+ perror(cmd_file);
+ exit(1);
+ }
+ }
+ fflush(stdout);
+ fflush(stderr);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ while (!feof(f)) {
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ break;
+ if (buf[0] == '#')
+ continue;
+ noecho = 0;
+ if (buf[0] == '-') {
+ noecho = 1;
+ buf[0] = ' ';
+ }
+ cp = strchr(buf, '\n');
+ if (cp)
+ *cp = 0;
+ cp = strchr(buf, '\r');
+ if (cp)
+ *cp = 0;
+ if (!noecho)
+ printf("%s: %s\n", subsystem_name, buf);
+ retval = ss_execute_line(sci_idx, buf);
+ if (retval) {
+ ss_perror(sci_idx, retval, buf);
+ exit_status++;
+ }
+ }
+ return exit_status;
+}
+
+
+/*
+ * This function resets the libc getopt() function, which keeps
+ * internal state. Bad design! Stupid libc API designers! No
+ * biscuit!
+ *
+ * BSD-derived getopt() functions require that optind be reset to 1 in
+ * order to reset getopt() state. This used to be generally accepted
+ * way of resetting getopt(). However, glibc's getopt()
+ * has additional getopt() state beyond optind, and requires that
+ * optind be set zero to reset its state. So the unfortunate state of
+ * affairs is that BSD-derived versions of getopt() misbehave if
+ * optind is set to 0 in order to reset getopt(), and glibc's getopt()
+ * will core dump if optind is set 1 in order to reset getopt().
+ *
+ * More modern versions of BSD require that optreset be set to 1 in
+ * order to reset getopt(). Sigh. Standards, anyone?
+ *
+ * We hide the hair here.
+ */
+void reset_getopt(void)
+{
+#if defined(__GLIBC__) || defined(__linux__)
+ optind = 0;
+#else
+ optind = 1;
+#endif
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+}
+
+/*
+ * This function will convert a string to an unsigned long, printing
+ * an error message if it fails, and returning success or failure in err.
+ */
+unsigned long parse_ulong(const char *str, const char *cmd,
+ const char *descr, int *err)
+{
+ char *tmp;
+ unsigned long ret;
+
+ ret = strtoul(str, &tmp, 0);
+ if (*tmp == 0) {
+ if (err)
+ *err = 0;
+ return ret;
+ }
+ com_err(cmd, 0, "Bad %s - %s", descr, str);
+ if (err)
+ *err = 1;
+ else
+ exit(1);
+ return 0;
+}
+
+
+int check_fs_open(char *name)
+{
+ if (!test_fs) {
+ com_err(name, 0, "Filesystem not open");
+ return 1;
+ }
+ return 0;
+}
+
+static void setup_filesystem(const char *name,
+ unsigned int blocks, unsigned int inodes,
+ unsigned int type, int flags)
+{
+ struct ext2_super_block param;
+ errcode_t retval;
+
+ memset(&param, 0, sizeof(param));
+ ext2fs_blocks_count_set(&param, blocks);
+ param.s_inodes_count = inodes;
+
+ retval = ext2fs_initialize("test fs", flags, &param,
+ test_io_manager, &test_fs);
+
+ if (retval) {
+ com_err(name, retval, "while initializing filesystem");
+ return;
+ }
+ test_fs->default_bitmap_type = type;
+ ext2fs_free_block_bitmap(test_fs->block_map);
+ test_fs->block_map = 0;
+ ext2fs_free_inode_bitmap(test_fs->inode_map);
+ test_fs->inode_map = 0;
+ retval = ext2fs_allocate_block_bitmap(test_fs, "block bitmap",
+ &test_fs->block_map);
+ if (retval) {
+ com_err(name, retval, "while allocating block bitmap");
+ goto errout;
+ }
+ retval = ext2fs_allocate_inode_bitmap(test_fs, "inode bitmap",
+ &test_fs->inode_map);
+ if (retval) {
+ com_err(name, retval, "while allocating inode bitmap");
+ goto errout;
+ }
+ return;
+
+errout:
+ ext2fs_close_free(&test_fs);
+}
+
+void setup_cmd(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ int c, err;
+ unsigned int blocks = 128;
+ unsigned int inodes = 0;
+ unsigned int type = EXT2FS_BMAP64_BITARRAY;
+ int flags = EXT2_FLAG_64BITS;
+
+ if (test_fs)
+ ext2fs_close_free(&test_fs);
+
+ reset_getopt();
+ while ((c = getopt(argc, argv, "b:i:lt:")) != EOF) {
+ switch (c) {
+ case 'b':
+ blocks = parse_ulong(optarg, argv[0],
+ "number of blocks", &err);
+ if (err)
+ return;
+ break;
+ case 'i':
+ inodes = parse_ulong(optarg, argv[0],
+ "number of blocks", &err);
+ if (err)
+ return;
+ break;
+ case 'l': /* Legacy bitmaps */
+ flags = 0;
+ break;
+ case 't':
+ type = parse_ulong(optarg, argv[0],
+ "bitmap backend type", &err);
+ if (err)
+ return;
+ break;
+ default:
+ fprintf(stderr, "%s: usage: setup [-b blocks] "
+ "[-i inodes] [-t type]\n", argv[0]);
+ return;
+ }
+ }
+ setup_filesystem(argv[0], blocks, inodes, type, flags);
+}
+
+void close_cmd(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (check_fs_open(argv[0]))
+ return;
+
+ ext2fs_close_free(&test_fs);
+}
+
+
+void dump_bitmap(ext2fs_generic_bitmap bmap, unsigned int start, unsigned num)
+{
+ unsigned char *buf;
+ errcode_t retval;
+ int i, len = (num - start + 7) / 8;
+
+ buf = malloc(len);
+ if (!buf) {
+ com_err("dump_bitmap", 0, "couldn't allocate buffer");
+ return;
+ }
+ memset(buf, 0, len);
+ retval = ext2fs_get_generic_bmap_range(bmap, (__u64) start, num, buf);
+ if (retval) {
+ com_err("dump_bitmap", retval,
+ "while calling ext2fs_generic_bmap_range");
+ free(buf);
+ return;
+ }
+ for (i=0; i < len; i++)
+ printf("%02x", buf[i]);
+ printf("\n");
+ printf("bits set: %u\n", ext2fs_bitcount(buf, len));
+ free(buf);
+}
+
+void dump_inode_bitmap_cmd(int argc, char **argv,
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (check_fs_open(argv[0]))
+ return;
+
+ printf("inode bitmap: ");
+ dump_bitmap(test_fs->inode_map, 1, test_fs->super->s_inodes_count);
+}
+
+void dump_block_bitmap_cmd(int argc, char **argv,
+ int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (check_fs_open(argv[0]))
+ return;
+
+ printf("block bitmap: ");
+ dump_bitmap(test_fs->block_map, test_fs->super->s_first_data_block,
+ test_fs->super->s_blocks_count);
+}
+
+void do_setb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int block, num;
+ int err;
+ int test_result, op_result;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 2 && argc != 3) {
+ com_err(argv[0], 0, "Usage: setb <block> [num]");
+ return;
+ }
+
+ block = parse_ulong(argv[1], argv[0], "block", &err);
+ if (err)
+ return;
+
+ if (argc == 3) {
+ num = parse_ulong(argv[2], argv[0], "num", &err);
+ if (err)
+ return;
+
+ ext2fs_mark_block_bitmap_range2(test_fs->block_map,
+ block, num);
+ printf("Marking blocks %u to %u\n", block, block + num - 1);
+ return;
+ }
+
+ test_result = ext2fs_test_block_bitmap2(test_fs->block_map, block);
+ op_result = ext2fs_mark_block_bitmap2(test_fs->block_map, block);
+ printf("Setting block %u, was %s before\n", block, op_result ?
+ "set" : "clear");
+ if (!test_result != !op_result)
+ com_err(argv[0], 0, "*ERROR* test_result different! (%d, %d)",
+ test_result, op_result);
+}
+
+void do_clearb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int block, num;
+ int err;
+ int test_result, op_result;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 2 && argc != 3) {
+ com_err(argv[0], 0, "Usage: clearb <block> [num]");
+ return;
+ }
+
+ block = parse_ulong(argv[1], argv[0], "block", &err);
+ if (err)
+ return;
+
+ if (argc == 3) {
+ num = parse_ulong(argv[2], argv[0], "num", &err);
+ if (err)
+ return;
+
+ ext2fs_unmark_block_bitmap_range2(test_fs->block_map,
+ block, num);
+ printf("Clearing blocks %u to %u\n", block, block + num - 1);
+ return;
+ }
+
+ test_result = ext2fs_test_block_bitmap2(test_fs->block_map, block);
+ op_result = ext2fs_unmark_block_bitmap2(test_fs->block_map, block);
+ printf("Clearing block %u, was %s before\n", block, op_result ?
+ "set" : "clear");
+ if (!test_result != !op_result)
+ com_err(argv[0], 0, "*ERROR* test_result different! (%d, %d)",
+ test_result, op_result);
+}
+
+void do_testb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int block, num;
+ int err;
+ int test_result;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 2 && argc != 3) {
+ com_err(argv[0], 0, "Usage: testb <block> [num]");
+ return;
+ }
+
+ block = parse_ulong(argv[1], argv[0], "block", &err);
+ if (err)
+ return;
+
+ if (argc == 3) {
+ num = parse_ulong(argv[2], argv[0], "num", &err);
+ if (err)
+ return;
+
+ test_result =
+ ext2fs_test_block_bitmap_range2(test_fs->block_map,
+ block, num);
+ printf("Blocks %u to %u are %sall clear.\n",
+ block, block + num - 1, test_result ? "" : "NOT ");
+ return;
+ }
+
+ test_result = ext2fs_test_block_bitmap2(test_fs->block_map, block);
+ printf("Block %u is %s\n", block, test_result ? "set" : "clear");
+}
+
+void do_ffzb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int start, end;
+ int err;
+ errcode_t retval;
+ blk64_t out;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 3 && argc != 3) {
+ com_err(argv[0], 0, "Usage: ffzb <start> <end>");
+ return;
+ }
+
+ start = parse_ulong(argv[1], argv[0], "start", &err);
+ if (err)
+ return;
+
+ end = parse_ulong(argv[2], argv[0], "end", &err);
+ if (err)
+ return;
+
+ retval = ext2fs_find_first_zero_block_bitmap2(test_fs->block_map,
+ start, end, &out);
+ if (retval) {
+ printf("ext2fs_find_first_zero_block_bitmap2() returned %s\n",
+ error_message(retval));
+ return;
+ }
+ printf("First unmarked block is %llu\n", (unsigned long long) out);
+}
+
+void do_ffsb(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int start, end;
+ int err;
+ errcode_t retval;
+ blk64_t out;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 3 && argc != 3) {
+ com_err(argv[0], 0, "Usage: ffsb <start> <end>");
+ return;
+ }
+
+ start = parse_ulong(argv[1], argv[0], "start", &err);
+ if (err)
+ return;
+
+ end = parse_ulong(argv[2], argv[0], "end", &err);
+ if (err)
+ return;
+
+ retval = ext2fs_find_first_set_block_bitmap2(test_fs->block_map,
+ start, end, &out);
+ if (retval) {
+ printf("ext2fs_find_first_set_block_bitmap2() returned %s\n",
+ error_message(retval));
+ return;
+ }
+ printf("First marked block is %llu\n", (unsigned long long) out);
+}
+
+
+void do_zerob(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (check_fs_open(argv[0]))
+ return;
+
+ printf("Clearing block bitmap.\n");
+ ext2fs_clear_block_bitmap(test_fs->block_map);
+}
+
+void do_seti(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int inode;
+ int err;
+ int test_result, op_result;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 2) {
+ com_err(argv[0], 0, "Usage: seti <inode>");
+ return;
+ }
+
+ inode = parse_ulong(argv[1], argv[0], "inode", &err);
+ if (err)
+ return;
+
+ test_result = ext2fs_test_inode_bitmap2(test_fs->inode_map, inode);
+ op_result = ext2fs_mark_inode_bitmap2(test_fs->inode_map, inode);
+ printf("Setting inode %u, was %s before\n", inode, op_result ?
+ "set" : "clear");
+ if (!test_result != !op_result) {
+ com_err(argv[0], 0, "*ERROR* test_result different! (%d, %d)",
+ test_result, op_result);
+ exit_status++;
+ }
+}
+
+void do_cleari(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int inode;
+ int err;
+ int test_result, op_result;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 2) {
+ com_err(argv[0], 0, "Usage: clearb <inode>");
+ return;
+ }
+
+ inode = parse_ulong(argv[1], argv[0], "inode", &err);
+ if (err)
+ return;
+
+ test_result = ext2fs_test_inode_bitmap2(test_fs->inode_map, inode);
+ op_result = ext2fs_unmark_inode_bitmap2(test_fs->inode_map, inode);
+ printf("Clearing inode %u, was %s before\n", inode, op_result ?
+ "set" : "clear");
+ if (!test_result != !op_result) {
+ com_err(argv[0], 0, "*ERROR* test_result different! (%d, %d)",
+ test_result, op_result);
+ exit_status++;
+ }
+}
+
+void do_testi(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int inode;
+ int err;
+ int test_result;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 2) {
+ com_err(argv[0], 0, "Usage: testb <inode>");
+ return;
+ }
+
+ inode = parse_ulong(argv[1], argv[0], "inode", &err);
+ if (err)
+ return;
+
+ test_result = ext2fs_test_inode_bitmap2(test_fs->inode_map, inode);
+ printf("Inode %u is %s\n", inode, test_result ? "set" : "clear");
+}
+
+void do_ffzi(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int start, end;
+ int err;
+ errcode_t retval;
+ ext2_ino_t out;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 3 && argc != 3) {
+ com_err(argv[0], 0, "Usage: ffzi <start> <end>");
+ return;
+ }
+
+ start = parse_ulong(argv[1], argv[0], "start", &err);
+ if (err)
+ return;
+
+ end = parse_ulong(argv[2], argv[0], "end", &err);
+ if (err)
+ return;
+
+ retval = ext2fs_find_first_zero_inode_bitmap2(test_fs->inode_map,
+ start, end, &out);
+ if (retval) {
+ printf("ext2fs_find_first_zero_inode_bitmap2() returned %s\n",
+ error_message(retval));
+ return;
+ }
+ printf("First unmarked inode is %u\n", out);
+}
+
+void do_ffsi(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ unsigned int start, end;
+ int err;
+ errcode_t retval;
+ ext2_ino_t out;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ if (argc != 3 && argc != 3) {
+ com_err(argv[0], 0, "Usage: ffsi <start> <end>");
+ return;
+ }
+
+ start = parse_ulong(argv[1], argv[0], "start", &err);
+ if (err)
+ return;
+
+ end = parse_ulong(argv[2], argv[0], "end", &err);
+ if (err)
+ return;
+
+ retval = ext2fs_find_first_set_inode_bitmap2(test_fs->inode_map,
+ start, end, &out);
+ if (retval) {
+ printf("ext2fs_find_first_set_inode_bitmap2() returned %s\n",
+ error_message(retval));
+ return;
+ }
+ printf("First marked inode is %u\n", out);
+}
+
+void do_zeroi(int argc, char *argv[], int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (check_fs_open(argv[0]))
+ return;
+
+ printf("Clearing inode bitmap.\n");
+ ext2fs_clear_inode_bitmap(test_fs->inode_map);
+}
+
+int main(int argc, char **argv)
+{
+ unsigned int blocks = 128;
+ unsigned int inodes = 0;
+ unsigned int type = EXT2FS_BMAP64_BITARRAY;
+ int c, err, code;
+ char *request = (char *)NULL;
+ char *cmd_file = 0;
+ int sci_idx;
+ int flags = EXT2_FLAG_64BITS;
+
+ add_error_table(&et_ss_error_table);
+ add_error_table(&et_ext2_error_table);
+ while ((c = getopt (argc, argv, "b:i:lt:R:f:")) != EOF) {
+ switch (c) {
+ case 'b':
+ blocks = parse_ulong(optarg, argv[0],
+ "number of blocks", &err);
+ if (err)
+ exit(1);
+ break;
+ case 'i':
+ inodes = parse_ulong(optarg, argv[0],
+ "number of blocks", &err);
+ if (err)
+ exit(1);
+ break;
+ case 'l': /* Legacy bitmaps */
+ flags = 0;
+ break;
+ case 't':
+ type = parse_ulong(optarg, argv[0],
+ "bitmap backend type", &err);
+ if (err)
+ exit(1);
+ break;
+ case 'R':
+ request = optarg;
+ break;
+ case 'f':
+ cmd_file = optarg;
+ break;
+ default:
+ com_err(argv[0], 0, "Usage: %s [-R request] "
+ "[-f cmd_file]", subsystem_name);
+ exit(1);
+ }
+ }
+
+ sci_idx = ss_create_invocation(subsystem_name, version,
+ (char *)NULL, &tst_bitmaps_cmds, &code);
+ if (code) {
+ ss_perror(sci_idx, code, "creating invocation");
+ exit(1);
+ }
+
+ (void) ss_add_request_table (sci_idx, &ss_std_requests, 1, &code);
+ if (code) {
+ ss_perror(sci_idx, code, "adding standard requests");
+ exit (1);
+ }
+
+ printf("%s %s. Type '?' for a list of commands.\n\n",
+ subsystem_name, version);
+
+ setup_filesystem(argv[0], blocks, inodes, type, flags);
+
+ if (request) {
+ code = ss_execute_line(sci_idx, request);
+ if (code) {
+ ss_perror(sci_idx, code, request);
+ exit_status++;
+ }
+ } else if (cmd_file) {
+ exit_status = source_file(cmd_file, sci_idx);
+ } else {
+ ss_listen(sci_idx);
+ }
+
+ exit(exit_status);
+}
+
diff --git a/lib/ext2fs/tst_bitmaps_cmd.ct b/lib/ext2fs/tst_bitmaps_cmd.ct
new file mode 100644
index 0000000..13b7fa7
--- /dev/null
+++ b/lib/ext2fs/tst_bitmaps_cmd.ct
@@ -0,0 +1,51 @@
+command_table tst_bitmaps_cmds;
+
+request setup_cmd, "Setup file system",
+ setup;
+
+request close_cmd, "Close file system",
+ close;
+
+request dump_inode_bitmap_cmd, "Dump the inode bitmap",
+ dump_inode_bitmap, dump_ib;
+
+request dump_block_bitmap_cmd, "Dump the block bitmap",
+ dump_block_bitmap, dump_bb;
+
+request do_setb, "Set block",
+ set_block, setb;
+
+request do_clearb, "Clear block",
+ clear_block, clearb;
+
+request do_testb, "Test block",
+ test_block, testb;
+
+request do_ffzb, "Find first zero block",
+ find_first_zero_block, ffzb;
+
+request do_ffsb, "Find first set block",
+ find_first_set_block, ffsb;
+
+request do_zerob, "Clear block bitmap",
+ clear_block_bitmap, zerob;
+
+request do_seti, "Set inode",
+ set_inode, seti;
+
+request do_cleari, "Clear inode",
+ clear_inode, cleari;
+
+request do_testi, "Test inode",
+ test_inode, testi;
+
+request do_ffzi, "Find first zero inode",
+ find_first_zero_inode, ffzi;
+
+request do_ffsi, "Find first set inode",
+ find_first_set_inode, ffsi;
+
+request do_zeroi, "Clear inode bitmap",
+ clear_inode_bitmap, zeroi;
+
+end;
diff --git a/lib/ext2fs/tst_bitmaps_cmds b/lib/ext2fs/tst_bitmaps_cmds
new file mode 100644
index 0000000..dc116b1
--- /dev/null
+++ b/lib/ext2fs/tst_bitmaps_cmds
@@ -0,0 +1,150 @@
+setb 12 0
+setb 12
+setb 12
+clearb 12
+clearb 12
+setb 12
+setb 14
+setb 16
+testb 13
+testb 15
+testb 12
+testb 14
+setb 13
+setb 15
+testb 12
+testb 11
+testb 15
+testb 16
+dump_bb
+ffzb 11 16
+ffzb 12 16
+ffzb 12 20
+ffsb 0 127
+ffsb 1 128
+ffsb 1 127
+ffsb 1 10
+ffsb 1 11
+ffsb 12 12
+ffsb 13 12
+ffsb 12 15
+clearb 13
+ffzb 12 20
+ffsb 13 18
+setb 13
+clearb 12 7
+testb 12 7
+setb 15
+testb 12 7
+clearb 15
+testb 12 7
+setb 12 0
+setb 12 7
+dump_bb
+seti 2
+seti 5
+seti 4
+seti 3
+seti 4
+seti 5
+testi 6
+testi 1
+dump_ib
+ffzi 1 6
+ffzi 2 5
+ffzi 2 6
+ffsi 0 31
+ffsi 1 33
+ffsi 1 32
+ffsi 2 32
+ffsi 6 32
+cleari 4
+ffzi 2 6
+ffsi 4 32
+ffsi 5 32
+zeroi
+testi 5
+seti 5
+seti 5
+cleari 5
+cleari 5
+testi 17
+testi 6
+testi 4
+clearb 7 12
+dump_bb
+setb 1
+dump_bb
+setb 2
+dump_bb
+setb 3
+dump_bb
+setb 4
+dump_bb
+setb 5
+dump_bb
+setb 6
+dump_bb
+setb 7
+dump_bb
+setb 8
+dump_bb
+setb 10
+setb 12
+setb 14
+setb 17
+setb 19
+setb 24
+setb 26
+setb 27
+setb 30
+setb 31
+setb 32
+setb 35
+setb 39
+setb 40
+setb 44
+setb 46
+setb 47
+setb 49
+setb 51
+setb 52
+clearb 2
+clearb 3
+clearb 7
+dump_bb
+ffsb 14 127
+ffsb 15 127
+ffsb 36 127
+ffsb 32 127
+ffsb 52 127
+ffsb 53 127
+ffsb 46 127
+ffsb 45 127
+ffsb 41 127
+ffsb 20 127
+ffsb 1 127
+ffsb 2 127
+ffsb 3 127
+ffsb 4 127
+ffsb 5 127
+ffsb 6 127
+ffsb 7 127
+ffsb 8 127
+ffzb 1 127
+ffzb 2 127
+ffzb 3 127
+ffzb 4 127
+ffzb 5 127
+ffzb 6 127
+ffzb 7 127
+ffzb 8 127
+ffzb 45 127
+ffzb 46 127
+ffzb 47 127
+ffzb 48 127
+ffzb 49 127
+ffzb 50 127
+ffzb 51 127
+quit
+
diff --git a/lib/ext2fs/tst_bitmaps_exp b/lib/ext2fs/tst_bitmaps_exp
new file mode 100644
index 0000000..9cfea13
--- /dev/null
+++ b/lib/ext2fs/tst_bitmaps_exp
@@ -0,0 +1,313 @@
+tst_bitmaps 1.0. Type '?' for a list of commands.
+
+tst_bitmaps: setb 12 0
+Marking blocks 12 to 11
+tst_bitmaps: setb 12
+Setting block 12, was clear before
+tst_bitmaps: setb 12
+Setting block 12, was set before
+tst_bitmaps: clearb 12
+Clearing block 12, was set before
+tst_bitmaps: clearb 12
+Clearing block 12, was clear before
+tst_bitmaps: setb 12
+Setting block 12, was clear before
+tst_bitmaps: setb 14
+Setting block 14, was clear before
+tst_bitmaps: setb 16
+Setting block 16, was clear before
+tst_bitmaps: testb 13
+Block 13 is clear
+tst_bitmaps: testb 15
+Block 15 is clear
+tst_bitmaps: testb 12
+Block 12 is set
+tst_bitmaps: testb 14
+Block 14 is set
+tst_bitmaps: setb 13
+Setting block 13, was clear before
+tst_bitmaps: setb 15
+Setting block 15, was clear before
+tst_bitmaps: testb 12
+Block 12 is set
+tst_bitmaps: testb 11
+Block 11 is clear
+tst_bitmaps: testb 15
+Block 15 is set
+tst_bitmaps: testb 16
+Block 16 is set
+tst_bitmaps: dump_bb
+block bitmap: 00f80000000000000000000000000000
+bits set: 5
+tst_bitmaps: ffzb 11 16
+First unmarked block is 11
+tst_bitmaps: ffzb 12 16
+ext2fs_find_first_zero_block_bitmap2() returned No such file or directory
+tst_bitmaps: ffzb 12 20
+First unmarked block is 17
+tst_bitmaps: ffsb 0 127
+ext2fs_find_first_set_block_bitmap2() returned Invalid argument
+tst_bitmaps: ffsb 1 128
+ext2fs_find_first_set_block_bitmap2() returned Invalid argument
+tst_bitmaps: ffsb 1 127
+First marked block is 12
+tst_bitmaps: ffsb 1 10
+ext2fs_find_first_set_block_bitmap2() returned No such file or directory
+tst_bitmaps: ffsb 1 11
+ext2fs_find_first_set_block_bitmap2() returned No such file or directory
+tst_bitmaps: ffsb 12 12
+First marked block is 12
+tst_bitmaps: ffsb 13 12
+ext2fs_find_first_set_block_bitmap2() returned Invalid argument
+tst_bitmaps: ffsb 12 15
+First marked block is 12
+tst_bitmaps: clearb 13
+Clearing block 13, was set before
+tst_bitmaps: ffzb 12 20
+First unmarked block is 13
+tst_bitmaps: ffsb 13 18
+First marked block is 14
+tst_bitmaps: setb 13
+Setting block 13, was clear before
+tst_bitmaps: clearb 12 7
+Clearing blocks 12 to 18
+tst_bitmaps: testb 12 7
+Blocks 12 to 18 are all clear.
+tst_bitmaps: setb 15
+Setting block 15, was clear before
+tst_bitmaps: testb 12 7
+Blocks 12 to 18 are NOT all clear.
+tst_bitmaps: clearb 15
+Clearing block 15, was set before
+tst_bitmaps: testb 12 7
+Blocks 12 to 18 are all clear.
+tst_bitmaps: setb 12 0
+Marking blocks 12 to 11
+tst_bitmaps: setb 12 7
+Marking blocks 12 to 18
+tst_bitmaps: dump_bb
+block bitmap: 00f80300000000000000000000000000
+bits set: 7
+tst_bitmaps: seti 2
+Setting inode 2, was clear before
+tst_bitmaps: seti 5
+Setting inode 5, was clear before
+tst_bitmaps: seti 4
+Setting inode 4, was clear before
+tst_bitmaps: seti 3
+Setting inode 3, was clear before
+tst_bitmaps: seti 4
+Setting inode 4, was set before
+tst_bitmaps: seti 5
+Setting inode 5, was set before
+tst_bitmaps: testi 6
+Inode 6 is clear
+tst_bitmaps: testi 1
+Inode 1 is clear
+tst_bitmaps: dump_ib
+inode bitmap: 1e000000
+bits set: 4
+tst_bitmaps: ffzi 1 6
+First unmarked inode is 1
+tst_bitmaps: ffzi 2 5
+ext2fs_find_first_zero_inode_bitmap2() returned No such file or directory
+tst_bitmaps: ffzi 2 6
+First unmarked inode is 6
+tst_bitmaps: ffsi 0 31
+ext2fs_find_first_set_inode_bitmap2() returned Invalid argument
+tst_bitmaps: ffsi 1 33
+ext2fs_find_first_set_inode_bitmap2() returned Invalid argument
+tst_bitmaps: ffsi 1 32
+First marked inode is 2
+tst_bitmaps: ffsi 2 32
+First marked inode is 2
+tst_bitmaps: ffsi 6 32
+ext2fs_find_first_set_inode_bitmap2() returned No such file or directory
+tst_bitmaps: cleari 4
+Clearing inode 4, was set before
+tst_bitmaps: ffzi 2 6
+First unmarked inode is 4
+tst_bitmaps: ffsi 4 32
+First marked inode is 5
+tst_bitmaps: ffsi 5 32
+First marked inode is 5
+tst_bitmaps: zeroi
+Clearing inode bitmap.
+tst_bitmaps: testi 5
+Inode 5 is clear
+tst_bitmaps: seti 5
+Setting inode 5, was clear before
+tst_bitmaps: seti 5
+Setting inode 5, was set before
+tst_bitmaps: cleari 5
+Clearing inode 5, was set before
+tst_bitmaps: cleari 5
+Clearing inode 5, was clear before
+tst_bitmaps: testi 17
+Inode 17 is clear
+tst_bitmaps: testi 6
+Inode 6 is clear
+tst_bitmaps: testi 4
+Inode 4 is clear
+tst_bitmaps: clearb 7 12
+Clearing blocks 7 to 18
+tst_bitmaps: dump_bb
+block bitmap: 00000000000000000000000000000000
+bits set: 0
+tst_bitmaps: setb 1
+Setting block 1, was clear before
+tst_bitmaps: dump_bb
+block bitmap: 01000000000000000000000000000000
+bits set: 1
+tst_bitmaps: setb 2
+Setting block 2, was clear before
+tst_bitmaps: dump_bb
+block bitmap: 03000000000000000000000000000000
+bits set: 2
+tst_bitmaps: setb 3
+Setting block 3, was clear before
+tst_bitmaps: dump_bb
+block bitmap: 07000000000000000000000000000000
+bits set: 3
+tst_bitmaps: setb 4
+Setting block 4, was clear before
+tst_bitmaps: dump_bb
+block bitmap: 0f000000000000000000000000000000
+bits set: 4
+tst_bitmaps: setb 5
+Setting block 5, was clear before
+tst_bitmaps: dump_bb
+block bitmap: 1f000000000000000000000000000000
+bits set: 5
+tst_bitmaps: setb 6
+Setting block 6, was clear before
+tst_bitmaps: dump_bb
+block bitmap: 3f000000000000000000000000000000
+bits set: 6
+tst_bitmaps: setb 7
+Setting block 7, was clear before
+tst_bitmaps: dump_bb
+block bitmap: 7f000000000000000000000000000000
+bits set: 7
+tst_bitmaps: setb 8
+Setting block 8, was clear before
+tst_bitmaps: dump_bb
+block bitmap: ff000000000000000000000000000000
+bits set: 8
+tst_bitmaps: setb 10
+Setting block 10, was clear before
+tst_bitmaps: setb 12
+Setting block 12, was clear before
+tst_bitmaps: setb 14
+Setting block 14, was clear before
+tst_bitmaps: setb 17
+Setting block 17, was clear before
+tst_bitmaps: setb 19
+Setting block 19, was clear before
+tst_bitmaps: setb 24
+Setting block 24, was clear before
+tst_bitmaps: setb 26
+Setting block 26, was clear before
+tst_bitmaps: setb 27
+Setting block 27, was clear before
+tst_bitmaps: setb 30
+Setting block 30, was clear before
+tst_bitmaps: setb 31
+Setting block 31, was clear before
+tst_bitmaps: setb 32
+Setting block 32, was clear before
+tst_bitmaps: setb 35
+Setting block 35, was clear before
+tst_bitmaps: setb 39
+Setting block 39, was clear before
+tst_bitmaps: setb 40
+Setting block 40, was clear before
+tst_bitmaps: setb 44
+Setting block 44, was clear before
+tst_bitmaps: setb 46
+Setting block 46, was clear before
+tst_bitmaps: setb 47
+Setting block 47, was clear before
+tst_bitmaps: setb 49
+Setting block 49, was clear before
+tst_bitmaps: setb 51
+Setting block 51, was clear before
+tst_bitmaps: setb 52
+Setting block 52, was clear before
+tst_bitmaps: clearb 2
+Clearing block 2, was set before
+tst_bitmaps: clearb 3
+Clearing block 3, was set before
+tst_bitmaps: clearb 7
+Clearing block 7, was set before
+tst_bitmaps: dump_bb
+block bitmap: b92a85e6c4680d000000000000000000
+bits set: 25
+tst_bitmaps: ffsb 14 127
+First marked block is 14
+tst_bitmaps: ffsb 15 127
+First marked block is 17
+tst_bitmaps: ffsb 36 127
+First marked block is 39
+tst_bitmaps: ffsb 32 127
+First marked block is 32
+tst_bitmaps: ffsb 52 127
+First marked block is 52
+tst_bitmaps: ffsb 53 127
+ext2fs_find_first_set_block_bitmap2() returned No such file or directory
+tst_bitmaps: ffsb 46 127
+First marked block is 46
+tst_bitmaps: ffsb 45 127
+First marked block is 46
+tst_bitmaps: ffsb 41 127
+First marked block is 44
+tst_bitmaps: ffsb 20 127
+First marked block is 24
+tst_bitmaps: ffsb 1 127
+First marked block is 1
+tst_bitmaps: ffsb 2 127
+First marked block is 4
+tst_bitmaps: ffsb 3 127
+First marked block is 4
+tst_bitmaps: ffsb 4 127
+First marked block is 4
+tst_bitmaps: ffsb 5 127
+First marked block is 5
+tst_bitmaps: ffsb 6 127
+First marked block is 6
+tst_bitmaps: ffsb 7 127
+First marked block is 8
+tst_bitmaps: ffsb 8 127
+First marked block is 8
+tst_bitmaps: ffzb 1 127
+First unmarked block is 2
+tst_bitmaps: ffzb 2 127
+First unmarked block is 2
+tst_bitmaps: ffzb 3 127
+First unmarked block is 3
+tst_bitmaps: ffzb 4 127
+First unmarked block is 7
+tst_bitmaps: ffzb 5 127
+First unmarked block is 7
+tst_bitmaps: ffzb 6 127
+First unmarked block is 7
+tst_bitmaps: ffzb 7 127
+First unmarked block is 7
+tst_bitmaps: ffzb 8 127
+First unmarked block is 9
+tst_bitmaps: ffzb 45 127
+First unmarked block is 45
+tst_bitmaps: ffzb 46 127
+First unmarked block is 48
+tst_bitmaps: ffzb 47 127
+First unmarked block is 48
+tst_bitmaps: ffzb 48 127
+First unmarked block is 48
+tst_bitmaps: ffzb 49 127
+First unmarked block is 50
+tst_bitmaps: ffzb 50 127
+First unmarked block is 50
+tst_bitmaps: ffzb 51 127
+First unmarked block is 53
+tst_bitmaps: quit
+tst_bitmaps:
diff --git a/lib/ext2fs/tst_bitops.c b/lib/ext2fs/tst_bitops.c
new file mode 100644
index 0000000..adef12d
--- /dev/null
+++ b/lib/ext2fs/tst_bitops.c
@@ -0,0 +1,288 @@
+/*
+ * This testing program makes sure the bitops functions work
+ *
+ * Copyright (C) 2001 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+unsigned char bitarray[] = {
+ 0x80, 0xF0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x10, 0x20, 0x00, 0x00
+ };
+
+int bits_list[] = {
+ 7, 12, 13, 14,15, 22, 30, 68, 77, -1,
+};
+
+#define BIG_TEST_BIT (((unsigned) 1 << 31) + 42)
+
+
+int main(int argc, char **argv)
+{
+ int i, j, size;
+ unsigned char testarray[12];
+ unsigned char *bigarray;
+
+ size = sizeof(bitarray)*8;
+#if 0
+ i = ext2fs_find_first_bit_set(bitarray, size);
+ while (i < size) {
+ printf("Bit set: %d\n", i);
+ i = ext2fs_find_next_bit_set(bitarray, size, i+1);
+ }
+#endif
+
+ /* Test test_bit */
+ for (i=0,j=0; i < size; i++) {
+ if (ext2fs_test_bit(i, bitarray)) {
+ if (bits_list[j] == i) {
+ j++;
+ } else {
+ printf("Bit %d set, not expected\n", i);
+ exit(1);
+ }
+ } else {
+ if (bits_list[j] == i) {
+ printf("Expected bit %d to be clear.\n", i);
+ exit(1);
+ }
+ }
+ }
+ printf("ext2fs_test_bit appears to be correct\n");
+
+ /* Test ext2fs_set_bit */
+ memset(testarray, 0, sizeof(testarray));
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_set_bit(bits_list[i], testarray);
+ }
+ if (memcmp(testarray, bitarray, sizeof(testarray)) == 0) {
+ printf("ext2fs_set_bit test succeeded.\n");
+ } else {
+ printf("ext2fs_set_bit test failed.\n");
+ for (i=0; i < sizeof(testarray); i++) {
+ printf("%02x ", testarray[i]);
+ }
+ printf("\n");
+ exit(1);
+ }
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_clear_bit(bits_list[i], testarray);
+ }
+ for (i=0; i < sizeof(testarray); i++) {
+ if (testarray[i]) {
+ printf("ext2fs_clear_bit failed, "
+ "testarray[%d] is %d\n", i, testarray[i]);
+ exit(1);
+ }
+ }
+ printf("ext2fs_clear_bit test succeed.\n");
+
+
+ /* Do bigarray test */
+ bigarray = malloc(1 << 29);
+ if (!bigarray) {
+ fprintf(stderr, "Failed to allocate scratch memory!\n");
+ exit(0);
+ }
+
+ bigarray[BIG_TEST_BIT >> 3] = 0;
+
+ ext2fs_set_bit(BIG_TEST_BIT, bigarray);
+ printf("big bit number (%u) test: %d, expected %d\n", BIG_TEST_BIT,
+ bigarray[BIG_TEST_BIT >> 3], (1 << (BIG_TEST_BIT & 7)));
+ if (bigarray[BIG_TEST_BIT >> 3] != (1 << (BIG_TEST_BIT & 7)))
+ exit(1);
+
+ ext2fs_clear_bit(BIG_TEST_BIT, bigarray);
+
+ printf("big bit number (%u) test: %d, expected 0\n", BIG_TEST_BIT,
+ bigarray[BIG_TEST_BIT >> 3]);
+ if (bigarray[BIG_TEST_BIT >> 3] != 0)
+ exit(1);
+
+ printf("ext2fs_set_bit big_test successful\n");
+
+
+ /* Now test ext2fs_fast_set_bit */
+ memset(testarray, 0, sizeof(testarray));
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_fast_set_bit(bits_list[i], testarray);
+ }
+ if (memcmp(testarray, bitarray, sizeof(testarray)) == 0) {
+ printf("ext2fs_fast_set_bit test succeeded.\n");
+ } else {
+ printf("ext2fs_fast_set_bit test failed.\n");
+ for (i=0; i < sizeof(testarray); i++) {
+ printf("%02x ", testarray[i]);
+ }
+ printf("\n");
+ exit(1);
+ }
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_clear_bit(bits_list[i], testarray);
+ }
+ for (i=0; i < sizeof(testarray); i++) {
+ if (testarray[i]) {
+ printf("ext2fs_clear_bit failed, "
+ "testarray[%d] is %d\n", i, testarray[i]);
+ exit(1);
+ }
+ }
+ printf("ext2fs_clear_bit test succeed.\n");
+
+
+ bigarray[BIG_TEST_BIT >> 3] = 0;
+
+ ext2fs_fast_set_bit(BIG_TEST_BIT, bigarray);
+ printf("big bit number (%u) test: %d, expected %d\n", BIG_TEST_BIT,
+ bigarray[BIG_TEST_BIT >> 3], (1 << (BIG_TEST_BIT & 7)));
+ if (bigarray[BIG_TEST_BIT >> 3] != (1 << (BIG_TEST_BIT & 7)))
+ exit(1);
+
+ ext2fs_fast_clear_bit(BIG_TEST_BIT, bigarray);
+
+ printf("big bit number (%u) test: %d, expected 0\n", BIG_TEST_BIT,
+ bigarray[BIG_TEST_BIT >> 3]);
+ if (bigarray[BIG_TEST_BIT >> 3] != 0)
+ exit(1);
+
+ printf("ext2fs_fast_set_bit big_test successful\n");
+
+ /* Repeat foregoing tests for 64-bit bitops */
+
+ /* Test test_bit */
+ for (i=0,j=0; i < size; i++) {
+ if (ext2fs_test_bit64(i, bitarray)) {
+ if (bits_list[j] == i) {
+ j++;
+ } else {
+ printf("64-bit: Bit %d set, not expected\n",
+ i);
+ exit(1);
+ }
+ } else {
+ if (bits_list[j] == i) {
+ printf("64-bit: "
+ "Expected bit %d to be clear.\n", i);
+ exit(1);
+ }
+ }
+ }
+ printf("64-bit: ext2fs_test_bit appears to be correct\n");
+
+ /* Test ext2fs_set_bit */
+ memset(testarray, 0, sizeof(testarray));
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_set_bit64(bits_list[i], testarray);
+ }
+ if (memcmp(testarray, bitarray, sizeof(testarray)) == 0) {
+ printf("64-bit: ext2fs_set_bit test succeeded.\n");
+ } else {
+ printf("64-bit: ext2fs_set_bit test failed.\n");
+ for (i=0; i < sizeof(testarray); i++) {
+ printf("%02x ", testarray[i]);
+ }
+ printf("\n");
+ exit(1);
+ }
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_clear_bit64(bits_list[i], testarray);
+ }
+ for (i=0; i < sizeof(testarray); i++) {
+ if (testarray[i]) {
+ printf("64-bit: ext2fs_clear_bit failed, "
+ "testarray[%d] is %d\n", i, testarray[i]);
+ exit(1);
+ }
+ }
+ printf("64-bit: ext2fs_clear_bit test succeed.\n");
+
+ /* Do bigarray test */
+ bigarray[BIG_TEST_BIT >> 3] = 0;
+
+ ext2fs_set_bit64(BIG_TEST_BIT, bigarray);
+ printf("64-bit: big bit number (%u) test: %d, expected %d\n",
+ BIG_TEST_BIT, bigarray[BIG_TEST_BIT >> 3],
+ (1 << (BIG_TEST_BIT & 7)));
+ if (bigarray[BIG_TEST_BIT >> 3] != (1 << (BIG_TEST_BIT & 7)))
+ exit(1);
+
+ ext2fs_clear_bit64(BIG_TEST_BIT, bigarray);
+
+ printf("64-bit: big bit number (%u) test: %d, expected 0\n",
+ BIG_TEST_BIT,
+ bigarray[BIG_TEST_BIT >> 3]);
+ if (bigarray[BIG_TEST_BIT >> 3] != 0)
+ exit(1);
+
+ printf("64-bit: ext2fs_set_bit big_test successful\n");
+
+ /* Now test ext2fs_fast_set_bit */
+ memset(testarray, 0, sizeof(testarray));
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_fast_set_bit64(bits_list[i], testarray);
+ }
+ if (memcmp(testarray, bitarray, sizeof(testarray)) == 0) {
+ printf("64-bit: ext2fs_fast_set_bit test succeeded.\n");
+ } else {
+ printf("64-bit: ext2fs_fast_set_bit test failed.\n");
+ for (i=0; i < sizeof(testarray); i++) {
+ printf("%02x ", testarray[i]);
+ }
+ printf("\n");
+ exit(1);
+ }
+ for (i=0; bits_list[i] > 0; i++) {
+ ext2fs_clear_bit64(bits_list[i], testarray);
+ }
+ for (i=0; i < sizeof(testarray); i++) {
+ if (testarray[i]) {
+ printf("64-bit: ext2fs_clear_bit failed, "
+ "testarray[%d] is %d\n", i, testarray[i]);
+ exit(1);
+ }
+ }
+ printf("64-bit: ext2fs_clear_bit test succeed.\n");
+
+ bigarray[BIG_TEST_BIT >> 3] = 0;
+
+ ext2fs_fast_set_bit64(BIG_TEST_BIT, bigarray);
+ printf("64-bit: big bit number (%u) test: %d, expected %d\n",
+ BIG_TEST_BIT, bigarray[BIG_TEST_BIT >> 3],
+ (1 << (BIG_TEST_BIT & 7)));
+ if (bigarray[BIG_TEST_BIT >> 3] != (1 << (BIG_TEST_BIT & 7)))
+ exit(1);
+
+ ext2fs_fast_clear_bit64(BIG_TEST_BIT, bigarray);
+
+ printf("64-bit: big bit number (%u) test: %d, expected 0\n",
+ BIG_TEST_BIT, bigarray[BIG_TEST_BIT >> 3]);
+ if (bigarray[BIG_TEST_BIT >> 3] != 0)
+ exit(1);
+
+ printf("64-bit: ext2fs_fast_set_bit big_test successful\n");
+ free(bigarray);
+ exit(0);
+}
diff --git a/lib/ext2fs/tst_byteswap.c b/lib/ext2fs/tst_byteswap.c
new file mode 100644
index 0000000..c500cae
--- /dev/null
+++ b/lib/ext2fs/tst_byteswap.c
@@ -0,0 +1,93 @@
+/*
+ * This testing program makes sure the byteswap functions work
+ *
+ * Copyright (C) 2000 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+__u16 test1[] = {
+ 0x0001, 0x0100,
+ 0x1234, 0x3412,
+ 0xff00, 0x00ff,
+ 0x4000, 0x0040,
+ 0xfeff, 0xfffe,
+ 0x0000, 0x0000
+ };
+
+__u32 test2[] = {
+ 0x00000001, 0x01000000,
+ 0x80000000, 0x00000080,
+ 0x12345678, 0x78563412,
+ 0xffff0000, 0x0000ffff,
+ 0x00ff0000, 0x0000ff00,
+ 0xff000000, 0x000000ff,
+ 0x00000000, 0x00000000
+ };
+
+int main(int argc, char **argv)
+{
+ int i;
+ int errors = 0;
+
+ printf("Testing ext2fs_swab16\n");
+ i=0;
+ do {
+ printf("swab16(0x%04x) = 0x%04x\n", test1[i],
+ ext2fs_swab16(test1[i]));
+ if (ext2fs_swab16(test1[i]) != test1[i+1]) {
+ printf("Error!!! %04x != %04x\n",
+ ext2fs_swab16(test1[i]), test1[i+1]);
+ errors++;
+ }
+ if (ext2fs_swab16(test1[i+1]) != test1[i]) {
+ printf("Error!!! %04x != %04x\n",
+ ext2fs_swab16(test1[i+1]), test1[i]);
+ errors++;
+ }
+ i += 2;
+ } while (test1[i] != 0);
+
+ printf("Testing ext2fs_swab32\n");
+ i = 0;
+ do {
+ printf("swab32(0x%08x) = 0x%08x\n", test2[i],
+ ext2fs_swab32(test2[i]));
+ if (ext2fs_swab32(test2[i]) != test2[i+1]) {
+ printf("Error!!! %04x != %04x\n",
+ ext2fs_swab32(test2[i]), test2[i+1]);
+ errors++;
+ }
+ if (ext2fs_swab32(test2[i+1]) != test2[i]) {
+ printf("Error!!! %04x != %04x\n",
+ ext2fs_swab32(test2[i+1]), test2[i]);
+ errors++;
+ }
+ i += 2;
+ } while (test2[i] != 0);
+
+ if (!errors)
+ printf("No errors found in the byteswap implementation!\n");
+
+ return errors;
+}
diff --git a/lib/ext2fs/tst_cmds.ct b/lib/ext2fs/tst_cmds.ct
new file mode 100644
index 0000000..45a8594
--- /dev/null
+++ b/lib/ext2fs/tst_cmds.ct
@@ -0,0 +1,6 @@
+command_table libext2fs_cmds;
+
+request do_block_iterate, "block_iterate",
+ block_iterate;
+
+end;
diff --git a/lib/ext2fs/tst_fs_struct.c b/lib/ext2fs/tst_fs_struct.c
new file mode 100644
index 0000000..6f44df1
--- /dev/null
+++ b/lib/ext2fs/tst_fs_struct.c
@@ -0,0 +1,81 @@
+/*
+ * This testing program checks the offset of the ext2_filsys structure
+ *
+ * Copyright (C) 2007 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "ext2fs.h"
+
+struct struct_ext2_filsys fs;
+
+#ifndef offsetof
+#define offsetof(type, member) __builtin_offsetof (type, member)
+#endif
+#define check_field(x) cur_offset = do_field(#x, sizeof(fs.x), \
+ offsetof(struct struct_ext2_filsys, x), \
+ cur_offset)
+
+static int do_field(const char *field, size_t size, int offset, int cur_offset)
+{
+ if (offset != cur_offset) {
+ printf("\t(padding %d bytes?)\n", offset - cur_offset);
+ }
+ printf("%8d %-30s %3u\n", offset, field, (unsigned) size);
+ return offset + size;
+}
+
+int main(int argc, char **argv)
+{
+#if (__GNUC__ >= 4)
+ int cur_offset = 0;
+
+ printf("%8s %-30s %3s\n", "offset", "field", "size");
+ check_field(magic);
+ check_field(io);
+ check_field(flags);
+ check_field(device_name);
+ check_field(super);
+ check_field(blocksize);
+ check_field(fragsize);
+ check_field(group_desc_count);
+ check_field(desc_blocks);
+ check_field(group_desc);
+ check_field(inode_blocks_per_group);
+ check_field(inode_map);
+ check_field(block_map);
+ check_field(get_blocks);
+ check_field(check_directory);
+ check_field(write_bitmaps);
+ check_field(read_inode);
+ check_field(write_inode);
+ check_field(badblocks);
+ check_field(dblist);
+ check_field(stride);
+ check_field(orig_super);
+ check_field(image_header);
+ check_field(umask);
+ check_field(now);
+ check_field(cluster_ratio_bits);
+ check_field(reserved);
+ check_field(priv_data);
+ check_field(icache);
+ check_field(image_io);
+ check_field(get_alloc_block);
+ check_field(block_alloc_stats);
+ check_field(mmp_buf);
+ check_field(mmp_cmp);
+ check_field(mmp_fd);
+ check_field(mmp_last_written);
+ printf("Ending offset is %d\n\n", cur_offset);
+#endif
+ exit(0);
+}
diff --git a/lib/ext2fs/tst_getsectsize.c b/lib/ext2fs/tst_getsectsize.c
new file mode 100644
index 0000000..d616965
--- /dev/null
+++ b/lib/ext2fs/tst_getsectsize.c
@@ -0,0 +1,63 @@
+/*
+ * tst_getsize.c --- this function tests the getsize function
+ *
+ * Copyright (C) 1997 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+int main(int argc, char **argv)
+{
+ int lsectsize, psectsize;
+ int retval;
+ int fd;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: %s device\n", argv[0]);
+ exit(1);
+ }
+
+ retval = ext2fs_get_device_sectsize(argv[1], &lsectsize);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while calling ext2fs_get_device_sectsize");
+ exit(1);
+ }
+ retval = ext2fs_get_device_phys_sectsize(argv[1], &psectsize);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while calling ext2fs_get_device_phys_sectsize");
+ exit(1);
+ }
+ printf("Device %s has logical/physical sector size of %d/%d.\n",
+ argv[1], lsectsize, psectsize);
+ fd = open(argv[1], O_RDONLY);
+ if (fd < 0) {
+ perror("open");
+ exit(1);
+ }
+ printf("The device's DIO alignment is %d\n",
+ ext2fs_get_dio_alignment(fd));
+ close(fd);
+ exit(0);
+}
diff --git a/lib/ext2fs/tst_getsize.c b/lib/ext2fs/tst_getsize.c
new file mode 100644
index 0000000..ba869dc
--- /dev/null
+++ b/lib/ext2fs/tst_getsize.c
@@ -0,0 +1,47 @@
+/*
+ * tst_getsize.c --- this function tests the getsize function
+ *
+ * Copyright (C) 1997 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+int main(int argc, const char *argv[])
+{
+ errcode_t retval;
+ blk64_t blocks;
+
+ if (argc < 2) {
+ fprintf(stderr, "%s device\n", argv[0]);
+ exit(1);
+ }
+ add_error_table(&et_ext2_error_table);
+ retval = ext2fs_get_device_size2(argv[1], 1024, &blocks);
+ if (retval) {
+ com_err(argv[0], retval, "while getting device size");
+ exit(1);
+ }
+ printf("%s is device has %llu blocks.\n", argv[1],
+ (unsigned long long) blocks);
+ return 0;
+}
diff --git a/lib/ext2fs/tst_inode_size.c b/lib/ext2fs/tst_inode_size.c
new file mode 100644
index 0000000..cc5d165
--- /dev/null
+++ b/lib/ext2fs/tst_inode_size.c
@@ -0,0 +1,89 @@
+/*
+ * This testing program makes sure the ext2_inode structure is 1024 bytes long
+ *
+ * Copyright (C) 2007 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "ext2_fs.h"
+
+struct ext2_inode_large inode;
+
+#ifndef offsetof
+#define offsetof(type, member) __builtin_offsetof(type, member)
+#endif
+
+#define check_field(x, s) cur_offset = do_field(#x, s, sizeof(inode.x), \
+ offsetof(struct ext2_inode_large, x), \
+ cur_offset)
+
+static int do_field(const char *field, unsigned size, unsigned cur_size,
+ unsigned offset, unsigned cur_offset)
+{
+ if (size != cur_size) {
+ printf("error: %s size %u should be %u\n",
+ field, cur_size, size);
+ exit(1);
+ }
+ if (offset != cur_offset) {
+ printf("error: %s offset %u should be %u\n",
+ field, cur_offset, offset);
+ exit(1);
+ }
+ printf("%8d %-30s %3u\n", offset, field, (unsigned) size);
+ return offset + size;
+}
+
+int main(int argc, char **argv)
+{
+#if (__GNUC__ >= 4)
+ int cur_offset = 0;
+
+ printf("%8s %-30s %3s\n", "offset", "field", "size");
+ check_field(i_mode, 2);
+ check_field(i_uid, 2);
+ check_field(i_size, 4);
+ check_field(i_atime, 4);
+ check_field(i_ctime, 4);
+ check_field(i_mtime, 4);
+ check_field(i_dtime, 4);
+ check_field(i_gid, 2);
+ check_field(i_links_count, 2);
+ check_field(i_blocks, 4);
+ check_field(i_flags, 4);
+ check_field(osd1.linux1.l_i_version, 4);
+ check_field(i_block, 15 * 4);
+ check_field(i_generation, 4);
+ check_field(i_file_acl, 4);
+ check_field(i_size_high, 4);
+ check_field(i_faddr, 4);
+ check_field(osd2.linux2.l_i_blocks_hi, 2);
+ check_field(osd2.linux2.l_i_file_acl_high, 2);
+ check_field(osd2.linux2.l_i_uid_high, 2);
+ check_field(osd2.linux2.l_i_gid_high, 2);
+ check_field(osd2.linux2.l_i_checksum_lo, 2);
+ check_field(osd2.linux2.l_i_reserved, 2);
+ do_field("Small inode end", 0, 0, cur_offset, 128);
+ check_field(i_extra_isize, 2);
+ check_field(i_checksum_hi, 2);
+ check_field(i_ctime_extra, 4);
+ check_field(i_mtime_extra, 4);
+ check_field(i_atime_extra, 4);
+ check_field(i_crtime, 4);
+ check_field(i_crtime_extra, 4);
+ check_field(i_version_hi, 4);
+ check_field(i_projid, 4);
+ /* This size will change as new fields are added */
+ do_field("Large inode end", 0, 0, cur_offset, sizeof(inode));
+#endif
+ return 0;
+}
diff --git a/lib/ext2fs/tst_iscan.c b/lib/ext2fs/tst_iscan.c
new file mode 100644
index 0000000..76aaa9a
--- /dev/null
+++ b/lib/ext2fs/tst_iscan.c
@@ -0,0 +1,227 @@
+/*
+ * tst_inode.c --- this function tests the inode scan function
+ *
+ * Copyright (C) 1996 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+blk64_t test_vec[] = { 8, 12, 24, 34, 43, 44, 100, 0 };
+
+ext2_filsys test_fs;
+ext2fs_block_bitmap bad_block_map, touched_map;
+ext2fs_inode_bitmap bad_inode_map;
+badblocks_list test_badblocks;
+
+int first_no_comma = 1;
+int failed = 0;
+
+static void iscan_test_read_blk64(unsigned long long block, int count, errcode_t err)
+{
+ int i;
+
+ if (first_no_comma)
+ first_no_comma = 0;
+ else
+ printf(", ");
+
+ if (count > 1)
+ printf("%llu-%llu", block, block+count-1);
+ else
+ printf("%llu", block);
+
+ for (i=0; i < count; i++, block++) {
+ if (ext2fs_test_block_bitmap2(touched_map, block)) {
+ printf("\nDuplicate block?!? --- %llu\n", block);
+ failed++;
+ first_no_comma = 1;
+ }
+ ext2fs_mark_block_bitmap2(touched_map, block);
+ }
+}
+
+static void iscan_test_read_blk(unsigned long block, int count, errcode_t err)
+{
+ iscan_test_read_blk64(block, count, err);
+}
+
+/*
+ * Setup the variables for doing the inode scan test.
+ */
+static void setup(void)
+{
+ errcode_t retval;
+ int i;
+ struct ext2_super_block param;
+
+ initialize_ext2_error_table();
+
+ memset(&param, 0, sizeof(param));
+ ext2fs_blocks_count_set(&param, 12000);
+
+
+ test_io_cb_read_blk = iscan_test_read_blk;
+ test_io_cb_read_blk64 = iscan_test_read_blk64;
+
+ retval = ext2fs_initialize("test fs", EXT2_FLAG_64BITS, &param,
+ test_io_manager, &test_fs);
+ if (retval) {
+ com_err("setup", retval,
+ "While initializing filesystem");
+ exit(1);
+ }
+ retval = ext2fs_allocate_tables(test_fs);
+ if (retval) {
+ com_err("setup", retval,
+ "While allocating tables for test filesystem");
+ exit(1);
+ }
+ retval = ext2fs_allocate_block_bitmap(test_fs, "bad block map",
+ &bad_block_map);
+ if (retval) {
+ com_err("setup", retval,
+ "While allocating bad_block bitmap");
+ exit(1);
+ }
+ retval = ext2fs_allocate_block_bitmap(test_fs, "touched map",
+ &touched_map);
+ if (retval) {
+ com_err("setup", retval,
+ "While allocating touched block bitmap");
+ exit(1);
+ }
+ retval = ext2fs_allocate_inode_bitmap(test_fs, "bad inode map",
+ &bad_inode_map);
+ if (retval) {
+ com_err("setup", retval,
+ "While allocating bad inode bitmap");
+ exit(1);
+ }
+
+ retval = ext2fs_badblocks_list_create(&test_badblocks, 5);
+ if (retval) {
+ com_err("setup", retval, "while creating badblocks list");
+ exit(1);
+ }
+ for (i=0; test_vec[i]; i++) {
+ retval = ext2fs_badblocks_list_add(test_badblocks, test_vec[i]);
+ if (retval) {
+ com_err("setup", retval,
+ "while adding test vector %d", i);
+ exit(1);
+ }
+ ext2fs_mark_block_bitmap2(bad_block_map, test_vec[i]);
+ }
+ test_fs->badblocks = test_badblocks;
+}
+
+/*
+ * Iterate using inode_scan
+ */
+static void iterate(void)
+{
+ struct ext2_inode inode;
+ ext2_inode_scan scan;
+ errcode_t retval;
+ ext2_ino_t ino;
+
+ retval = ext2fs_open_inode_scan(test_fs, 8, &scan);
+ if (retval) {
+ com_err("iterate", retval, "While opening inode scan");
+ exit(1);
+ }
+ printf("Reading blocks: ");
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval) {
+ com_err("iterate", retval, "while reading first inode");
+ exit(1);
+ }
+ while (ino) {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE) {
+ ext2fs_mark_inode_bitmap2(bad_inode_map, ino);
+ continue;
+ }
+ if (retval) {
+ com_err("iterate", retval,
+ "while getting next inode");
+ exit(1);
+ }
+ }
+ printf("\n");
+ ext2fs_close_inode_scan(scan);
+}
+
+/*
+ * Verify the touched map
+ */
+static void check_map(void)
+{
+ int i, j, first=1;
+ blk64_t blk;
+
+ for (i=0; test_vec[i]; i++) {
+ if (ext2fs_test_block_bitmap2(touched_map, test_vec[i])) {
+ printf("Bad block was touched --- %llu\n",
+ (unsigned long long) test_vec[i]);
+ failed++;
+ first_no_comma = 1;
+ }
+ ext2fs_mark_block_bitmap2(touched_map, test_vec[i]);
+ }
+ for (i = 0; i < test_fs->group_desc_count; i++) {
+ for (j=0, blk = ext2fs_inode_table_loc(test_fs, i);
+ j < test_fs->inode_blocks_per_group;
+ j++, blk++) {
+ if (!ext2fs_test_block_bitmap2(touched_map, blk) &&
+ !ext2fs_test_block_bitmap2(bad_block_map, blk)) {
+ printf("Missing block --- %llu\n",
+ (unsigned long long) blk);
+ failed++;
+ }
+ }
+ }
+ printf("Bad inodes: ");
+ for (i=1; i <= test_fs->super->s_inodes_count; i++) {
+ if (ext2fs_test_inode_bitmap2(bad_inode_map, i)) {
+ if (first)
+ first = 0;
+ else
+ printf(", ");
+ printf("%u", i);
+ }
+ }
+ printf("\n");
+}
+
+
+int main(int argc, char **argv)
+{
+ setup();
+ iterate();
+ check_map();
+ if (!failed)
+ printf("Inode scan tested OK!\n");
+ return failed;
+}
+
diff --git a/lib/ext2fs/tst_libext2fs.c b/lib/ext2fs/tst_libext2fs.c
new file mode 100644
index 0000000..4c86464
--- /dev/null
+++ b/lib/ext2fs/tst_libext2fs.c
@@ -0,0 +1,72 @@
+/*
+ * tst_libext2fs.c
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+#include "ss/ss.h"
+#include "debugfs.h"
+
+/*
+ * Hook in new commands into debugfs
+ * Override debugfs's prompt
+ */
+const char *debug_prog_name = "tst_libext2fs";
+extern ss_request_table libext2fs_cmds;
+ss_request_table *extra_cmds = &libext2fs_cmds;
+
+static int print_blocks_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *blocknr, e2_blkcnt_t blockcnt,
+ blk64_t ref_block, int ref_offset,
+ void *private EXT2FS_ATTR((unused)))
+{
+ printf("%6lld %8llu (%d %llu)\n", (long long) blockcnt,
+ (unsigned long long) *blocknr, ref_offset,
+ (unsigned long long) ref_block);
+ return 0;
+}
+
+
+void do_block_iterate(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ const char *usage = "block_iterate <file> <flags";
+ ext2_ino_t ino;
+ int err = 0;
+ int flags = 0;
+
+ if (common_args_process(argc, argv, 2, 3, argv[0], usage, 0))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+
+ if (argc > 2) {
+ flags = parse_ulong(argv[2], argv[0], "flags", &err);
+ if (err)
+ return;
+ }
+ flags |= BLOCK_FLAG_READ_ONLY;
+
+ ext2fs_block_iterate3(current_fs, ino, flags, NULL,
+ print_blocks_proc, NULL);
+ putc('\n', stdout);
+}
diff --git a/lib/ext2fs/tst_super_size.c b/lib/ext2fs/tst_super_size.c
new file mode 100644
index 0000000..ad452de
--- /dev/null
+++ b/lib/ext2fs/tst_super_size.c
@@ -0,0 +1,161 @@
+/*
+ * This testing program makes sure superblock size is 1024 bytes long
+ *
+ * Copyright (C) 2007 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "ext2_fs.h"
+
+#define sb_struct ext2_super_block
+#define sb_struct_name "ext2_super_block"
+
+struct sb_struct sb;
+
+#ifndef offsetof
+#define offsetof(type, member) __builtin_offsetof (type, member)
+#endif
+
+#define check_field(x, s) cur_offset = do_field(#x, s, sizeof(sb.x), \
+ offsetof(struct sb_struct, x), \
+ cur_offset)
+
+static int do_field(const char *field, unsigned size, unsigned cur_size,
+ unsigned offset, unsigned cur_offset)
+{
+ if (size != cur_size) {
+ printf("error: %s size %u should be %u\n",
+ field, cur_size, size);
+ exit(1);
+ }
+ if (offset != cur_offset) {
+ printf("error: %s offset %u should be %u\n",
+ field, cur_offset, offset);
+ exit(1);
+ }
+ printf("%8d %-30s %3u\n", offset, field, size);
+ return offset + size;
+}
+
+int main(int argc, char **argv)
+{
+#if (__GNUC__ >= 4)
+ int cur_offset = 0;
+
+ printf("%8s %-30s %3s\n", "offset", "field", "size");
+ check_field(s_inodes_count, 4);
+ check_field(s_blocks_count, 4);
+ check_field(s_r_blocks_count, 4);
+ check_field(s_free_blocks_count, 4);
+ check_field(s_free_inodes_count, 4);
+ check_field(s_first_data_block, 4);
+ check_field(s_log_block_size, 4);
+ check_field(s_log_cluster_size, 4);
+ check_field(s_blocks_per_group, 4);
+ check_field(s_clusters_per_group, 4);
+ check_field(s_inodes_per_group, 4);
+ check_field(s_mtime, 4);
+ check_field(s_wtime, 4);
+ check_field(s_mnt_count, 2);
+ check_field(s_max_mnt_count, 2);
+ check_field(s_magic, 2);
+ check_field(s_state, 2);
+ check_field(s_errors, 2);
+ check_field(s_minor_rev_level, 2);
+ check_field(s_lastcheck, 4);
+ check_field(s_checkinterval, 4);
+ check_field(s_creator_os, 4);
+ check_field(s_rev_level, 4);
+ check_field(s_def_resuid, 2);
+ check_field(s_def_resgid, 2);
+ check_field(s_first_ino, 4);
+ check_field(s_inode_size, 2);
+ check_field(s_block_group_nr, 2);
+ check_field(s_feature_compat, 4);
+ check_field(s_feature_incompat, 4);
+ check_field(s_feature_ro_compat, 4);
+ check_field(s_uuid, 16);
+ check_field(s_volume_name, 16);
+ check_field(s_last_mounted, 64);
+ check_field(s_algorithm_usage_bitmap, 4);
+ check_field(s_prealloc_blocks, 1);
+ check_field(s_prealloc_dir_blocks, 1);
+ check_field(s_reserved_gdt_blocks, 2);
+ check_field(s_journal_uuid, 16);
+ check_field(s_journal_inum, 4);
+ check_field(s_journal_dev, 4);
+ check_field(s_last_orphan, 4);
+ check_field(s_hash_seed, 4 * 4);
+ check_field(s_def_hash_version, 1);
+ check_field(s_jnl_backup_type, 1);
+ check_field(s_desc_size, 2);
+ check_field(s_default_mount_opts, 4);
+ check_field(s_first_meta_bg, 4);
+ check_field(s_mkfs_time, 4);
+ check_field(s_jnl_blocks, 17 * 4);
+ check_field(s_blocks_count_hi, 4);
+ check_field(s_r_blocks_count_hi, 4);
+ check_field(s_free_blocks_hi, 4);
+ check_field(s_min_extra_isize, 2);
+ check_field(s_want_extra_isize, 2);
+ check_field(s_flags, 4);
+ check_field(s_raid_stride, 2);
+ check_field(s_mmp_update_interval, 2);
+ check_field(s_mmp_block, 8);
+ check_field(s_raid_stripe_width, 4);
+ check_field(s_log_groups_per_flex, 1);
+ check_field(s_checksum_type, 1);
+ check_field(s_encryption_level, 1);
+ check_field(s_reserved_pad, 1);
+ check_field(s_kbytes_written, 8);
+ check_field(s_snapshot_inum, 4);
+ check_field(s_snapshot_id, 4);
+ check_field(s_snapshot_r_blocks_count, 8);
+ check_field(s_snapshot_list, 4);
+ check_field(s_error_count, 4);
+ check_field(s_first_error_time, 4);
+ check_field(s_first_error_ino, 4);
+ check_field(s_first_error_block, 8);
+ check_field(s_first_error_func, 32);
+ check_field(s_first_error_line, 4);
+ check_field(s_last_error_time, 4);
+ check_field(s_last_error_ino, 4);
+ check_field(s_last_error_line, 4);
+ check_field(s_last_error_block, 8);
+ check_field(s_last_error_func, 32);
+ check_field(s_mount_opts, 64);
+ check_field(s_usr_quota_inum, 4);
+ check_field(s_grp_quota_inum, 4);
+ check_field(s_overhead_clusters, 4);
+ check_field(s_backup_bgs, 8);
+ check_field(s_encrypt_algos, 4);
+ check_field(s_encrypt_pw_salt, 16);
+ check_field(s_lpf_ino, 4);
+ check_field(s_prj_quota_inum, 4);
+ check_field(s_checksum_seed, 4);
+ check_field(s_wtime_hi, 1);
+ check_field(s_mtime_hi, 1);
+ check_field(s_mkfs_time_hi, 1);
+ check_field(s_lastcheck_hi, 1);
+ check_field(s_first_error_time_hi, 1);
+ check_field(s_last_error_time_hi, 1);
+ check_field(s_first_error_errcode, 1);
+ check_field(s_last_error_errcode, 1);
+ check_field(s_encoding, 2);
+ check_field(s_encoding_flags, 2);
+ check_field(s_orphan_file_inum, 4);
+ check_field(s_reserved, 94 * 4);
+ check_field(s_checksum, 4);
+ do_field("Superblock end", 0, 0, cur_offset, 1024);
+#endif
+ return 0;
+}
diff --git a/lib/ext2fs/tst_types.c b/lib/ext2fs/tst_types.c
new file mode 100644
index 0000000..3e41128
--- /dev/null
+++ b/lib/ext2fs/tst_types.c
@@ -0,0 +1,64 @@
+/*
+ * This testing program makes sure the ext2_types header file
+ *
+ * Copyright (C) 2006 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "ext2fs/ext2_types.h"
+
+int main(int argc, char **argv)
+{
+ if (sizeof(__u8) != 1) {
+ printf("Sizeof(__u8) is %d should be 1\n",
+ (int)sizeof(__u8));
+ exit(1);
+ }
+ if (sizeof(__s8) != 1) {
+ printf("Sizeof(_s8) is %d should be 1\n",
+ (int)sizeof(__s8));
+ exit(1);
+ }
+ if (sizeof(__u16) != 2) {
+ printf("Sizeof(__u16) is %d should be 2\n",
+ (int)sizeof(__u16));
+ exit(1);
+ }
+ if (sizeof(__s16) != 2) {
+ printf("Sizeof(__s16) is %d should be 2\n",
+ (int)sizeof(__s16));
+ exit(1);
+ }
+ if (sizeof(__u32) != 4) {
+ printf("Sizeof(__u32) is %d should be 4\n",
+ (int)sizeof(__u32));
+ exit(1);
+ }
+ if (sizeof(__s32) != 4) {
+ printf("Sizeof(__s32) is %d should be 4\n",
+ (int)sizeof(__s32));
+ exit(1);
+ }
+ if (sizeof(__u64) != 8) {
+ printf("Sizeof(__u64) is %d should be 8\n",
+ (int)sizeof(__u64));
+ exit(1);
+ }
+ if (sizeof(__s64) != 8) {
+ printf("Sizeof(__s64) is %d should be 8\n",
+ (int)sizeof(__s64));
+ exit(1);
+ }
+ printf("The ext2_types.h types are correct.\n");
+ exit(0);
+}
+
diff --git a/lib/ext2fs/undo_io.c b/lib/ext2fs/undo_io.c
new file mode 100644
index 0000000..f4a6d52
--- /dev/null
+++ b/lib/ext2fs/undo_io.c
@@ -0,0 +1,1108 @@
+/*
+ * undo_io.c --- This is the undo io manager that copies the old data that
+ * copies the old data being overwritten into a tdb database
+ *
+ * Copyright IBM Corporation, 2007
+ * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#include <limits.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+#ifdef __GNUC__
+#define ATTR(x) __attribute__(x)
+#else
+#define ATTR(x)
+#endif
+
+#undef DEBUG
+
+#ifdef DEBUG
+# define dbg_printf(f, a...) do {printf(f, ## a); fflush(stdout); } while (0)
+#else
+# define dbg_printf(f, a...)
+#endif
+
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+/*
+ * Undo file format: The file is cut up into undo_header.block_size blocks.
+ * The first block contains the header.
+ * The second block contains the superblock.
+ * There is then a repeating series of blocks as follows:
+ * A key block, which contains undo_keys to map the following data blocks.
+ * Data blocks
+ * (Note that there are pointers to the first key block and the sb, so this
+ * order isn't strictly necessary.)
+ */
+#define E2UNDO_MAGIC "E2UNDO02"
+#define KEYBLOCK_MAGIC 0xCADECADE
+
+#define E2UNDO_STATE_FINISHED 0x1 /* undo file is complete */
+
+#define E2UNDO_MIN_BLOCK_SIZE 1024 /* undo blocks are no less than 1KB */
+#define E2UNDO_MAX_BLOCK_SIZE 1048576 /* undo blocks are no more than 1MB */
+
+struct undo_header {
+ char magic[8]; /* "E2UNDO02" */
+ __le64 num_keys; /* how many keys? */
+ __le64 super_offset; /* where in the file is the superblock copy? */
+ __le64 key_offset; /* where do the key/data block chunks start? */
+ __le32 block_size; /* block size of the undo file */
+ __le32 fs_block_size; /* block size of the target device */
+ __le32 sb_crc; /* crc32c of the superblock */
+ __le32 state; /* e2undo state flags */
+ __le32 f_compat; /* compatible features */
+ __le32 f_incompat; /* incompatible features (none so far) */
+ __le32 f_rocompat; /* ro compatible features (none so far) */
+ __le32 pad32; /* padding for fs_offset */
+ __le64 fs_offset; /* filesystem offset */
+ __u8 padding[436]; /* padding */
+ __le32 header_crc; /* crc32c of this header (but not this field) */
+};
+
+#define E2UNDO_MAX_EXTENT_BLOCKS 512 /* max extent size, in blocks */
+
+struct undo_key {
+ __le64 fsblk; /* where in the fs does the block go */
+ __le32 blk_crc; /* crc32c of the block */
+ __le32 size; /* how many bytes in this block? */
+};
+
+struct undo_key_block {
+ __le32 magic; /* KEYBLOCK_MAGIC number */
+ __le32 crc; /* block checksum */
+ __le64 reserved; /* zero */
+
+#if __STDC_VERSION__ >= 199901L
+ struct undo_key keys[]; /* keys, which come immediately after */
+#else
+ struct undo_key keys[0]; /* keys, which come immediately after */
+#endif
+};
+
+struct undo_private_data {
+ int magic;
+
+ /* the undo file io channel */
+ io_channel undo_file;
+ blk64_t undo_blk_num; /* next free block */
+ blk64_t key_blk_num; /* current key block location */
+ blk64_t super_blk_num; /* superblock location */
+ blk64_t first_key_blk; /* first key block location */
+ struct undo_key_block *keyb;
+ size_t num_keys, keys_in_block;
+
+ /* The backing io channel */
+ io_channel real;
+
+ unsigned long long tdb_data_size;
+ int tdb_written;
+
+ /* to support offset in unix I/O manager */
+ ext2_loff_t offset;
+
+ ext2fs_block_bitmap written_block_map;
+ struct struct_ext2_filsys fake_fs;
+ char *tdb_file;
+ struct undo_header hdr;
+};
+#define KEYS_PER_BLOCK(d) (((d)->tdb_data_size / sizeof(struct undo_key)) - 1)
+
+#define E2UNDO_FEATURE_COMPAT_FS_OFFSET 0x1 /* the filesystem offset */
+
+static inline void e2undo_set_feature_fs_offset(struct undo_header *header) {
+ header->f_compat |= ext2fs_le32_to_cpu(E2UNDO_FEATURE_COMPAT_FS_OFFSET);
+}
+
+static inline void e2undo_clear_feature_fs_offset(struct undo_header *header) {
+ header->f_compat &= ~ext2fs_le32_to_cpu(E2UNDO_FEATURE_COMPAT_FS_OFFSET);
+}
+
+static io_manager undo_io_backing_manager;
+static char *tdb_file;
+static int actual_size;
+
+errcode_t set_undo_io_backing_manager(io_manager manager)
+{
+ /*
+ * We may want to do some validation later
+ */
+ undo_io_backing_manager = manager;
+ return 0;
+}
+
+errcode_t set_undo_io_backup_file(char *file_name)
+{
+ tdb_file = strdup(file_name);
+
+ if (tdb_file == NULL) {
+ return EXT2_ET_NO_MEMORY;
+ }
+
+ return 0;
+}
+
+static errcode_t write_undo_indexes(struct undo_private_data *data, int flush)
+{
+ errcode_t retval;
+ struct ext2_super_block super;
+ io_channel channel;
+ int block_size;
+ __u32 sb_crc, hdr_crc;
+
+ /* Spit out a key block, if there's any data */
+ if (data->keys_in_block) {
+ data->keyb->magic = ext2fs_cpu_to_le32(KEYBLOCK_MAGIC);
+ data->keyb->crc = 0;
+ data->keyb->crc = ext2fs_cpu_to_le32(
+ ext2fs_crc32c_le(~0,
+ (unsigned char *)data->keyb,
+ data->tdb_data_size));
+ dbg_printf("Writing keyblock to blk %llu\n", data->key_blk_num);
+ retval = io_channel_write_blk64(data->undo_file,
+ data->key_blk_num,
+ 1, data->keyb);
+ if (retval)
+ return retval;
+ /* Move on to the next key block if it's full. */
+ if (data->keys_in_block == KEYS_PER_BLOCK(data)) {
+ memset(data->keyb, 0, data->tdb_data_size);
+ data->keys_in_block = 0;
+ data->key_blk_num = data->undo_blk_num;
+ data->undo_blk_num++;
+ }
+ }
+
+ /* Prepare superblock for write */
+ channel = data->real;
+ block_size = channel->block_size;
+
+ io_channel_set_blksize(channel, SUPERBLOCK_OFFSET);
+ retval = io_channel_read_blk64(channel, 1, -SUPERBLOCK_SIZE, &super);
+ if (retval)
+ goto err_out;
+ sb_crc = ext2fs_crc32c_le(~0, (unsigned char *)&super, SUPERBLOCK_SIZE);
+ super.s_magic = ~super.s_magic;
+
+ /* Write the undo header to disk. */
+ memcpy(data->hdr.magic, E2UNDO_MAGIC, sizeof(data->hdr.magic));
+ data->hdr.num_keys = ext2fs_cpu_to_le64(data->num_keys);
+ data->hdr.super_offset = ext2fs_cpu_to_le64(data->super_blk_num);
+ data->hdr.key_offset = ext2fs_cpu_to_le64(data->first_key_blk);
+ data->hdr.fs_block_size = ext2fs_cpu_to_le32(block_size);
+ data->hdr.sb_crc = ext2fs_cpu_to_le32(sb_crc);
+ data->hdr.fs_offset = ext2fs_cpu_to_le64(data->offset);
+ if (data->offset)
+ e2undo_set_feature_fs_offset(&data->hdr);
+ else
+ e2undo_clear_feature_fs_offset(&data->hdr);
+ hdr_crc = ext2fs_crc32c_le(~0, (unsigned char *)&data->hdr,
+ sizeof(data->hdr) -
+ sizeof(data->hdr.header_crc));
+ data->hdr.header_crc = ext2fs_cpu_to_le32(hdr_crc);
+ retval = io_channel_write_blk64(data->undo_file, 0,
+ -(int)sizeof(data->hdr),
+ &data->hdr);
+ if (retval)
+ goto err_out;
+
+ /*
+ * Record the entire superblock (in FS byte order) so that we can't
+ * apply e2undo files to the wrong FS or out of order.
+ */
+ dbg_printf("Writing superblock to block %llu\n", data->super_blk_num);
+ retval = io_channel_write_blk64(data->undo_file, data->super_blk_num,
+ -SUPERBLOCK_SIZE, &super);
+ if (retval)
+ goto err_out;
+
+ if (flush)
+ retval = io_channel_flush(data->undo_file);
+err_out:
+ io_channel_set_blksize(channel, block_size);
+ return retval;
+}
+
+static errcode_t undo_setup_tdb(struct undo_private_data *data)
+{
+ int i;
+ errcode_t retval;
+
+ if (data->tdb_written == 1)
+ return 0;
+
+ data->tdb_written = 1;
+
+ /* Make a bitmap to track what we've written */
+ memset(&data->fake_fs, 0, sizeof(data->fake_fs));
+ data->fake_fs.blocksize = data->tdb_data_size;
+ retval = ext2fs_alloc_generic_bmap(&data->fake_fs,
+ EXT2_ET_MAGIC_BLOCK_BITMAP64,
+ EXT2FS_BMAP64_RBTREE,
+ 0, ~1ULL, ~1ULL,
+ "undo block map", &data->written_block_map);
+ if (retval)
+ return retval;
+
+ /* Allocate key block */
+ retval = ext2fs_get_mem(data->tdb_data_size, &data->keyb);
+ if (retval)
+ return retval;
+ data->key_blk_num = data->first_key_blk;
+
+ /* Record block size */
+ dbg_printf("Undo block size %llu\n", data->tdb_data_size);
+ dbg_printf("Keys per block %llu\n", KEYS_PER_BLOCK(data));
+ data->hdr.block_size = ext2fs_cpu_to_le32(data->tdb_data_size);
+ io_channel_set_blksize(data->undo_file, data->tdb_data_size);
+
+ /* Ensure that we have space for header blocks */
+ for (i = 0; i <= 2; i++) {
+ retval = io_channel_read_blk64(data->undo_file, i, 1,
+ data->keyb);
+ if (retval)
+ memset(data->keyb, 0, data->tdb_data_size);
+ retval = io_channel_write_blk64(data->undo_file, i, 1,
+ data->keyb);
+ if (retval)
+ return retval;
+ retval = io_channel_flush(data->undo_file);
+ if (retval)
+ return retval;
+ }
+ memset(data->keyb, 0, data->tdb_data_size);
+ return 0;
+}
+
+static errcode_t undo_write_tdb(io_channel channel,
+ unsigned long long block, int count)
+
+{
+ int size, sz;
+ unsigned long long block_num, backing_blk_num;
+ errcode_t retval = 0;
+ ext2_loff_t offset;
+ struct undo_private_data *data;
+ unsigned char *read_ptr;
+ unsigned long long end_block;
+ unsigned long long data_size;
+ struct undo_key *key;
+ __u32 blk_crc;
+
+ data = (struct undo_private_data *) channel->private_data;
+
+ if (data->undo_file == NULL) {
+ /*
+ * Transaction database not initialized
+ */
+ return 0;
+ }
+
+ if (count == 1)
+ size = channel->block_size;
+ else {
+ if (count < 0)
+ size = -count;
+ else
+ size = count * channel->block_size;
+ }
+
+ retval = undo_setup_tdb(data);
+ if (retval)
+ return retval;
+ /*
+ * Data is stored in tdb database as blocks of tdb_data_size size
+ * This helps in efficient lookup further.
+ *
+ * We divide the disk to blocks of tdb_data_size.
+ */
+ offset = (block * channel->block_size) + data->offset ;
+ block_num = offset / data->tdb_data_size;
+ end_block = (offset + size - 1) / data->tdb_data_size;
+
+ while (block_num <= end_block) {
+ __u32 keysz;
+
+ /*
+ * Check if we have the record already
+ */
+ if (ext2fs_test_block_bitmap2(data->written_block_map,
+ block_num)) {
+ /* Try the next block */
+ block_num++;
+ continue;
+ }
+ ext2fs_mark_block_bitmap2(data->written_block_map, block_num);
+
+ /*
+ * Read one block using the backing I/O manager
+ * The backing I/O manager block size may be
+ * different from the tdb_data_size.
+ * Also we need to recalculate the block number with respect
+ * to the backing I/O manager.
+ */
+ offset = block_num * data->tdb_data_size +
+ (data->offset % data->tdb_data_size);
+ backing_blk_num = (offset - data->offset) / channel->block_size;
+
+ retval = ext2fs_get_mem(data->tdb_data_size, &read_ptr);
+ if (retval) {
+ return retval;
+ }
+
+ memset(read_ptr, 0, data->tdb_data_size);
+ actual_size = 0;
+ if ((data->tdb_data_size % channel->block_size) == 0)
+ sz = data->tdb_data_size / channel->block_size;
+ else
+ sz = -data->tdb_data_size;
+ retval = io_channel_read_blk64(data->real, backing_blk_num,
+ sz, read_ptr);
+ if (retval) {
+ if (retval != EXT2_ET_SHORT_READ) {
+ free(read_ptr);
+ return retval;
+ }
+ /*
+ * short read so update the record size
+ * accordingly
+ */
+ data_size = actual_size;
+ } else {
+ data_size = data->tdb_data_size;
+ }
+ if (data_size == 0) {
+ free(read_ptr);
+ block_num++;
+ continue;
+ }
+ dbg_printf("Read %llu bytes from FS block %llu (blk=%llu cnt=%llu)\n",
+ data_size, backing_blk_num, block, data->tdb_data_size);
+ if ((data_size % data->undo_file->block_size) == 0)
+ sz = data_size / data->undo_file->block_size;
+ else
+ sz = -data_size;;
+ /* extend this key? */
+ if (data->keys_in_block) {
+ key = data->keyb->keys + data->keys_in_block - 1;
+ keysz = ext2fs_le32_to_cpu(key->size);
+ } else {
+ key = NULL;
+ keysz = 0;
+ }
+ if (key != NULL &&
+ (ext2fs_le64_to_cpu(key->fsblk) * channel->block_size +
+ channel->block_size - 1 +
+ keysz) / channel->block_size == backing_blk_num &&
+ E2UNDO_MAX_EXTENT_BLOCKS * data->tdb_data_size >
+ keysz + data_size) {
+ blk_crc = ext2fs_le32_to_cpu(key->blk_crc);
+ blk_crc = ext2fs_crc32c_le(blk_crc, read_ptr, data_size);
+ key->blk_crc = ext2fs_cpu_to_le32(blk_crc);
+ key->size = ext2fs_cpu_to_le32(keysz + data_size);
+ } else {
+ data->num_keys++;
+ key = data->keyb->keys + data->keys_in_block;
+ data->keys_in_block++;
+ key->fsblk = ext2fs_cpu_to_le64(backing_blk_num);
+ blk_crc = ext2fs_crc32c_le(~0, read_ptr, data_size);
+ key->blk_crc = ext2fs_cpu_to_le32(blk_crc);
+ key->size = ext2fs_cpu_to_le32(data_size);
+ }
+ dbg_printf("Writing block %llu to offset %llu size %d key %zu\n",
+ block_num,
+ data->undo_blk_num,
+ sz, data->num_keys - 1);
+ retval = io_channel_write_blk64(data->undo_file,
+ data->undo_blk_num, sz, read_ptr);
+ if (retval) {
+ free(read_ptr);
+ return retval;
+ }
+ data->undo_blk_num++;
+ free(read_ptr);
+
+ /* Write out the key block */
+ retval = write_undo_indexes(data, 0);
+ if (retval)
+ return retval;
+
+ /* Next block */
+ block_num++;
+ }
+
+ return retval;
+}
+
+static errcode_t undo_io_read_error(io_channel channel ATTR((unused)),
+ unsigned long block ATTR((unused)),
+ int count ATTR((unused)),
+ void *data ATTR((unused)),
+ size_t size ATTR((unused)),
+ int actual,
+ errcode_t error ATTR((unused)))
+{
+ actual_size = actual;
+ return error;
+}
+
+static void undo_err_handler_init(io_channel channel)
+{
+ channel->read_error = undo_io_read_error;
+}
+
+static int check_filesystem(struct undo_header *hdr, io_channel undo_file,
+ unsigned int blocksize, blk64_t super_block,
+ io_channel channel)
+{
+ struct ext2_super_block super, *sb;
+ char *buf;
+ __u32 sb_crc;
+ errcode_t retval;
+
+ io_channel_set_blksize(channel, SUPERBLOCK_OFFSET);
+ retval = io_channel_read_blk64(channel, 1, -SUPERBLOCK_SIZE, &super);
+ if (retval)
+ return retval;
+
+ /*
+ * Compare the FS and the undo file superblock so that we don't
+ * append to something that doesn't match this FS.
+ */
+ retval = ext2fs_get_mem(blocksize, &buf);
+ if (retval)
+ return retval;
+ retval = io_channel_read_blk64(undo_file, super_block,
+ -SUPERBLOCK_SIZE, buf);
+ if (retval)
+ goto out;
+ sb = (struct ext2_super_block *)buf;
+ sb->s_magic = ~sb->s_magic;
+ if (memcmp(&super, buf, sizeof(super))) {
+ retval = -1;
+ goto out;
+ }
+ sb_crc = ext2fs_crc32c_le(~0, (unsigned char *)buf, SUPERBLOCK_SIZE);
+ if (ext2fs_le32_to_cpu(hdr->sb_crc) != sb_crc) {
+ retval = -1;
+ goto out;
+ }
+
+out:
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+/*
+ * Try to re-open the undo file, so that we can resume where we left off.
+ * That way, the user can pass the same undo file to various programs as
+ * part of an FS upgrade instead of having to create multiple files and
+ * then apply them in correct order.
+ */
+static errcode_t try_reopen_undo_file(int undo_fd,
+ struct undo_private_data *data)
+{
+ struct undo_header hdr;
+ struct undo_key *dkey;
+ ext2fs_struct_stat statbuf;
+ unsigned int blocksize, fs_blocksize;
+ blk64_t super_block, lblk;
+ size_t num_keys, keys_per_block, i;
+ __u32 hdr_crc, key_crc;
+ errcode_t retval;
+
+ /* Zero size already? */
+ retval = ext2fs_fstat(undo_fd, &statbuf);
+ if (retval)
+ goto bad_file;
+ if (statbuf.st_size == 0)
+ goto out;
+
+ /* check the file header */
+ retval = io_channel_read_blk64(data->undo_file, 0, -(int)sizeof(hdr),
+ &hdr);
+ if (retval)
+ goto bad_file;
+
+ if (memcmp(hdr.magic, E2UNDO_MAGIC,
+ sizeof(hdr.magic)))
+ goto bad_file;
+ hdr_crc = ext2fs_crc32c_le(~0, (unsigned char *)&hdr,
+ sizeof(struct undo_header) -
+ sizeof(__u32));
+ if (ext2fs_le32_to_cpu(hdr.header_crc) != hdr_crc)
+ goto bad_file;
+ blocksize = ext2fs_le32_to_cpu(hdr.block_size);
+ fs_blocksize = ext2fs_le32_to_cpu(hdr.fs_block_size);
+ if (blocksize > E2UNDO_MAX_BLOCK_SIZE ||
+ blocksize < E2UNDO_MIN_BLOCK_SIZE ||
+ !blocksize || !fs_blocksize)
+ goto bad_file;
+ super_block = ext2fs_le64_to_cpu(hdr.super_offset);
+ num_keys = ext2fs_le64_to_cpu(hdr.num_keys);
+ io_channel_set_blksize(data->undo_file, blocksize);
+ /*
+ * Do not compare hdr.f_compat with the available compatible
+ * features set, because a "missing" compatible feature should
+ * not cause any problems.
+ */
+ if (hdr.f_incompat || hdr.f_rocompat)
+ goto bad_file;
+
+ /* Superblock matches this FS? */
+ if (check_filesystem(&hdr, data->undo_file, blocksize, super_block,
+ data->real) != 0) {
+ retval = EXT2_ET_UNDO_FILE_WRONG;
+ goto out;
+ }
+
+ /* Try to set ourselves up */
+ data->tdb_data_size = blocksize;
+ retval = undo_setup_tdb(data);
+ if (retval)
+ goto bad_file;
+ data->num_keys = num_keys;
+ data->super_blk_num = super_block;
+ data->first_key_blk = ext2fs_le64_to_cpu(hdr.key_offset);
+
+ /* load the written block map */
+ keys_per_block = KEYS_PER_BLOCK(data);
+ lblk = data->first_key_blk;
+ dbg_printf("nr_keys=%lu, kpb=%zu, blksz=%u\n",
+ num_keys, keys_per_block, blocksize);
+ for (i = 0; i < num_keys; i += keys_per_block) {
+ size_t j, max_j;
+ __le32 crc;
+
+ data->key_blk_num = lblk;
+ retval = io_channel_read_blk64(data->undo_file,
+ lblk, 1, data->keyb);
+ if (retval)
+ goto bad_key_replay;
+
+ /* check keys */
+ if (ext2fs_le32_to_cpu(data->keyb->magic) != KEYBLOCK_MAGIC) {
+ retval = EXT2_ET_UNDO_FILE_CORRUPT;
+ goto bad_key_replay;
+ }
+ crc = data->keyb->crc;
+ data->keyb->crc = 0;
+ key_crc = ext2fs_crc32c_le(~0, (unsigned char *)data->keyb,
+ blocksize);
+ if (ext2fs_le32_to_cpu(crc) != key_crc) {
+ retval = EXT2_ET_UNDO_FILE_CORRUPT;
+ goto bad_key_replay;
+ }
+
+ /* load keys from key block */
+ lblk++;
+ max_j = data->num_keys - i;
+ if (max_j > keys_per_block)
+ max_j = keys_per_block;
+ for (j = 0, dkey = data->keyb->keys;
+ j < max_j;
+ j++, dkey++) {
+ blk64_t fsblk = ext2fs_le64_to_cpu(dkey->fsblk);
+ blk64_t undo_blk = fsblk * fs_blocksize / blocksize;
+ size_t size = ext2fs_le32_to_cpu(dkey->size);
+
+ ext2fs_mark_block_bitmap_range2(data->written_block_map,
+ undo_blk,
+ (size + blocksize - 1) / blocksize);
+ lblk += (size + blocksize - 1) / blocksize;
+ data->undo_blk_num = lblk;
+ data->keys_in_block = j + 1;
+ }
+ }
+ dbg_printf("Reopen undo, keyblk=%llu undoblk=%llu nrkeys=%zu kib=%zu\n",
+ data->key_blk_num, data->undo_blk_num, data->num_keys,
+ data->keys_in_block);
+
+ data->hdr.state = hdr.state & ~E2UNDO_STATE_FINISHED;
+ data->hdr.f_compat = hdr.f_compat;
+ data->hdr.f_incompat = hdr.f_incompat;
+ data->hdr.f_rocompat = hdr.f_rocompat;
+ return retval;
+
+bad_key_replay:
+ data->key_blk_num = data->undo_blk_num = 0;
+ data->keys_in_block = 0;
+ ext2fs_free_mem(&data->keyb);
+ ext2fs_free_generic_bitmap(data->written_block_map);
+ data->tdb_written = 0;
+ goto out;
+bad_file:
+ retval = EXT2_ET_UNDO_FILE_CORRUPT;
+out:
+ return retval;
+}
+
+static void undo_atexit(void *p)
+{
+ struct undo_private_data *data = p;
+ errcode_t err;
+
+ err = write_undo_indexes(data, 1);
+ io_channel_close(data->undo_file);
+
+ com_err(data->tdb_file, err, "while force-closing undo file");
+}
+
+static errcode_t undo_open(const char *name, int flags, io_channel *channel)
+{
+ io_channel io = NULL;
+ struct undo_private_data *data = NULL;
+ int undo_fd = -1;
+ errcode_t retval;
+
+ /* We don't support multi-threading, at least for now */
+ flags &= ~IO_FLAG_THREADS;
+ if (name == 0)
+ return EXT2_ET_BAD_DEVICE_NAME;
+ retval = ext2fs_get_mem(sizeof(struct struct_io_channel), &io);
+ if (retval)
+ goto cleanup;
+ memset(io, 0, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ retval = ext2fs_get_mem(sizeof(struct undo_private_data), &data);
+ if (retval)
+ goto cleanup;
+
+ io->manager = undo_io_manager;
+ retval = ext2fs_get_mem(strlen(name)+1, &io->name);
+ if (retval)
+ goto cleanup;
+
+ strcpy(io->name, name);
+ io->private_data = data;
+ io->block_size = 1024;
+ io->read_error = 0;
+ io->write_error = 0;
+ io->refcount = 1;
+
+ memset(data, 0, sizeof(struct undo_private_data));
+ data->magic = EXT2_ET_MAGIC_UNIX_IO_CHANNEL;
+ data->super_blk_num = 1;
+ data->first_key_blk = 2;
+ data->undo_blk_num = 3;
+
+ if (undo_io_backing_manager) {
+ retval = undo_io_backing_manager->open(name, flags,
+ &data->real);
+ if (retval)
+ goto cleanup;
+
+ data->tdb_file = strdup(tdb_file);
+ if (data->tdb_file == NULL)
+ goto cleanup;
+ undo_fd = ext2fs_open_file(data->tdb_file, O_RDWR | O_CREAT,
+ 0600);
+ if (undo_fd < 0)
+ goto cleanup;
+
+ retval = undo_io_backing_manager->open(data->tdb_file,
+ IO_FLAG_RW,
+ &data->undo_file);
+ if (retval)
+ goto cleanup;
+ } else {
+ data->real = NULL;
+ data->undo_file = NULL;
+ }
+
+ if (data->real)
+ io->flags = (io->flags & ~CHANNEL_FLAGS_DISCARD_ZEROES) |
+ (data->real->flags & CHANNEL_FLAGS_DISCARD_ZEROES);
+
+ /*
+ * setup err handler for read so that we know
+ * when the backing manager fails do short read
+ */
+ if (data->real)
+ undo_err_handler_init(data->real);
+
+ if (data->undo_file) {
+ retval = try_reopen_undo_file(undo_fd, data);
+ if (retval)
+ goto cleanup;
+ }
+ retval = ext2fs_add_exit_fn(undo_atexit, data);
+ if (retval)
+ goto cleanup;
+
+ *channel = io;
+ if (undo_fd >= 0)
+ close(undo_fd);
+ return retval;
+
+cleanup:
+ ext2fs_remove_exit_fn(undo_atexit, data);
+ if (undo_fd >= 0)
+ close(undo_fd);
+ if (data && data->undo_file)
+ io_channel_close(data->undo_file);
+ if (data && data->tdb_file)
+ free(data->tdb_file);
+ if (data && data->real)
+ io_channel_close(data->real);
+ if (data)
+ ext2fs_free_mem(&data);
+ if (io && io->name)
+ ext2fs_free_mem(&io->name);
+ if (io)
+ ext2fs_free_mem(&io);
+ return retval;
+}
+
+static errcode_t undo_close(io_channel channel)
+{
+ struct undo_private_data *data;
+ errcode_t err, retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (--channel->refcount > 0)
+ return 0;
+ /* Before closing write the file system identity */
+ if (!getenv("UNDO_IO_SIMULATE_UNFINISHED"))
+ data->hdr.state = ext2fs_cpu_to_le32(E2UNDO_STATE_FINISHED);
+ err = write_undo_indexes(data, 1);
+ ext2fs_remove_exit_fn(undo_atexit, data);
+ if (data->real)
+ retval = io_channel_close(data->real);
+ if (data->tdb_file)
+ free(data->tdb_file);
+ if (data->undo_file)
+ io_channel_close(data->undo_file);
+ ext2fs_free_mem(&data->keyb);
+ if (data->written_block_map)
+ ext2fs_free_generic_bitmap(data->written_block_map);
+ ext2fs_free_mem(&channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem(&channel->name);
+ ext2fs_free_mem(&channel);
+
+ if (err)
+ return err;
+ return retval;
+}
+
+static errcode_t undo_set_blksize(io_channel channel, int blksize)
+{
+ struct undo_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (blksize > E2UNDO_MAX_BLOCK_SIZE || blksize < E2UNDO_MIN_BLOCK_SIZE)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (data->real)
+ retval = io_channel_set_blksize(data->real, blksize);
+ /*
+ * Set the block size used for tdb
+ */
+ if (!data->tdb_data_size || !data->tdb_written)
+ data->tdb_data_size = blksize;
+ channel->block_size = blksize;
+ return retval;
+}
+
+static errcode_t undo_read_blk64(io_channel channel, unsigned long long block,
+ int count, void *buf)
+{
+ errcode_t retval = 0;
+ struct undo_private_data *data;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_read_blk64(data->real, block, count, buf);
+
+ return retval;
+}
+
+static errcode_t undo_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ return undo_read_blk64(channel, block, count, buf);
+}
+
+static errcode_t undo_write_blk64(io_channel channel, unsigned long long block,
+ int count, const void *buf)
+{
+ struct undo_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+ /*
+ * First write the existing content into database
+ */
+ retval = undo_write_tdb(channel, block, count);
+ if (retval)
+ return retval;
+ if (data->real)
+ retval = io_channel_write_blk64(data->real, block, count, buf);
+
+ return retval;
+}
+
+static errcode_t undo_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ return undo_write_blk64(channel, block, count, buf);
+}
+
+static errcode_t undo_write_byte(io_channel channel, unsigned long offset,
+ int size, const void *buf)
+{
+ struct undo_private_data *data;
+ errcode_t retval = 0;
+ ext2_loff_t location;
+ unsigned long blk_num, count;;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ location = offset + data->offset;
+ blk_num = location/channel->block_size;
+ /*
+ * the size specified may spread across multiple blocks
+ * also make sure we account for the fact that block start
+ * offset for tdb is different from the backing I/O manager
+ * due to possible different block size
+ */
+ count = (size + (location % channel->block_size) +
+ channel->block_size -1)/channel->block_size;
+ retval = undo_write_tdb(channel, blk_num, count);
+ if (retval)
+ return retval;
+ if (data->real && data->real->manager->write_byte)
+ retval = io_channel_write_byte(data->real, offset, size, buf);
+
+ return retval;
+}
+
+static errcode_t undo_discard(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ struct undo_private_data *data;
+ errcode_t retval = 0;
+ int icount;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (count > INT_MAX)
+ return EXT2_ET_UNIMPLEMENTED;
+ icount = count;
+
+ /*
+ * First write the existing content into database
+ */
+ retval = undo_write_tdb(channel, block, icount);
+ if (retval)
+ return retval;
+ if (data->real)
+ retval = io_channel_discard(data->real, block, count);
+
+ return retval;
+}
+
+static errcode_t undo_zeroout(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ struct undo_private_data *data;
+ errcode_t retval = 0;
+ int icount;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (count > INT_MAX)
+ return EXT2_ET_UNIMPLEMENTED;
+ icount = count;
+
+ /*
+ * First write the existing content into database
+ */
+ retval = undo_write_tdb(channel, block, icount);
+ if (retval)
+ return retval;
+ if (data->real)
+ retval = io_channel_zeroout(data->real, block, count);
+
+ return retval;
+}
+
+static errcode_t undo_cache_readahead(io_channel channel,
+ unsigned long long block,
+ unsigned long long count)
+{
+ struct undo_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_cache_readahead(data->real, block, count);
+
+ return retval;
+}
+
+/*
+ * Flush data buffers to disk.
+ */
+static errcode_t undo_flush(io_channel channel)
+{
+ errcode_t retval = 0;
+ struct undo_private_data *data;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (data->real)
+ retval = io_channel_flush(data->real);
+
+ return retval;
+}
+
+static errcode_t undo_set_option(io_channel channel, const char *option,
+ const char *arg)
+{
+ errcode_t retval = 0;
+ struct undo_private_data *data;
+ unsigned long tmp;
+ char *end;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (!strcmp(option, "tdb_data_size")) {
+ if (!arg)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ tmp = strtoul(arg, &end, 0);
+ if (*end)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (tmp > E2UNDO_MAX_BLOCK_SIZE || tmp < E2UNDO_MIN_BLOCK_SIZE)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (!data->tdb_data_size || !data->tdb_written) {
+ data->tdb_written = -1;
+ data->tdb_data_size = tmp;
+ }
+ return 0;
+ }
+ /*
+ * Need to support offset option to work with
+ * Unix I/O manager
+ */
+ if (data->real && data->real->manager->set_option) {
+ retval = data->real->manager->set_option(data->real,
+ option, arg);
+ }
+ if (!retval && !strcmp(option, "offset")) {
+ if (!arg)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ tmp = strtoul(arg, &end, 0);
+ if (*end)
+ return EXT2_ET_INVALID_ARGUMENT;
+ data->offset = tmp;
+ }
+ return retval;
+}
+
+static errcode_t undo_get_stats(io_channel channel, io_stats *stats)
+{
+ errcode_t retval = 0;
+ struct undo_private_data *data;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct undo_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (data->real)
+ retval = (data->real->manager->get_stats)(data->real, stats);
+
+ return retval;
+}
+
+static struct struct_io_manager struct_undo_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Undo I/O Manager",
+ .open = undo_open,
+ .close = undo_close,
+ .set_blksize = undo_set_blksize,
+ .read_blk = undo_read_blk,
+ .write_blk = undo_write_blk,
+ .flush = undo_flush,
+ .write_byte = undo_write_byte,
+ .set_option = undo_set_option,
+ .get_stats = undo_get_stats,
+ .read_blk64 = undo_read_blk64,
+ .write_blk64 = undo_write_blk64,
+ .discard = undo_discard,
+ .zeroout = undo_zeroout,
+ .cache_readahead = undo_cache_readahead,
+};
+
+io_manager undo_io_manager = &struct_undo_manager;
diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
new file mode 100644
index 0000000..3171c73
--- /dev/null
+++ b/lib/ext2fs/unix_io.c
@@ -0,0 +1,1510 @@
+/*
+ * unix_io.c --- This is the Unix (well, really POSIX) implementation
+ * of the I/O manager.
+ *
+ * Implements a one-block write-through cache.
+ *
+ * Includes support for Windows NT support under Cygwin.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ * 2002 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+#define _XOPEN_SOURCE 600
+#define _DARWIN_C_SOURCE
+#define _FILE_OFFSET_BITS 64
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#else
+#define PR_GET_DUMPABLE 3
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#if HAVE_LINUX_FALLOC_H
+#include <linux/falloc.h>
+#endif
+#ifdef HAVE_PTHREAD
+#include <pthread.h>
+#endif
+
+#if defined(__linux__) && defined(_IO) && !defined(BLKROGET)
+#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
+#endif
+
+#undef ALIGN_DEBUG
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+
+struct unix_cache {
+ char *buf;
+ unsigned long long block;
+ int access_time;
+ unsigned dirty:1;
+ unsigned in_use:1;
+ unsigned write_err:1;
+};
+
+#define CACHE_SIZE 8
+#define WRITE_DIRECT_SIZE 4 /* Must be smaller than CACHE_SIZE */
+#define READ_DIRECT_SIZE 4 /* Should be smaller than CACHE_SIZE */
+
+struct unix_private_data {
+ int magic;
+ int dev;
+ int flags;
+ int align;
+ int access_time;
+ ext2_loff_t offset;
+ struct unix_cache cache[CACHE_SIZE];
+ void *bounce;
+ struct struct_io_stats io_stats;
+#ifdef HAVE_PTHREAD
+ pthread_mutex_t cache_mutex;
+ pthread_mutex_t bounce_mutex;
+ pthread_mutex_t stats_mutex;
+#endif
+};
+
+#define IS_ALIGNED(n, align) ((((uintptr_t) n) & \
+ ((uintptr_t) ((align)-1))) == 0)
+
+typedef enum lock_kind {
+ CACHE_MTX, BOUNCE_MTX, STATS_MTX
+} kind_t;
+
+#ifdef HAVE_PTHREAD
+static inline pthread_mutex_t *get_mutex(struct unix_private_data *data,
+ kind_t kind)
+{
+ if (data->flags & IO_FLAG_THREADS) {
+ switch (kind) {
+ case CACHE_MTX:
+ return &data->cache_mutex;
+ case BOUNCE_MTX:
+ return &data->bounce_mutex;
+ case STATS_MTX:
+ return &data->stats_mutex;
+ }
+ }
+ return NULL;
+}
+#endif
+
+static inline void mutex_lock(struct unix_private_data *data, kind_t kind)
+{
+#ifdef HAVE_PTHREAD
+ pthread_mutex_t *mtx = get_mutex(data,kind);
+
+ if (mtx)
+ pthread_mutex_lock(mtx);
+#endif
+}
+
+static inline void mutex_unlock(struct unix_private_data *data, kind_t kind)
+{
+#ifdef HAVE_PTHREAD
+ pthread_mutex_t *mtx = get_mutex(data,kind);
+
+ if (mtx)
+ pthread_mutex_unlock(mtx);
+#endif
+}
+
+static errcode_t unix_get_stats(io_channel channel, io_stats *stats)
+{
+ errcode_t retval = 0;
+
+ struct unix_private_data *data;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (stats) {
+ mutex_lock(data, STATS_MTX);
+ *stats = &data->io_stats;
+ mutex_unlock(data, STATS_MTX);
+ }
+
+ return retval;
+}
+
+static char *safe_getenv(const char *arg)
+{
+ if ((getuid() != geteuid()) || (getgid() != getegid()))
+ return NULL;
+#ifdef HAVE_PRCTL
+ if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#else
+#if (defined(linux) && defined(SYS_prctl))
+ if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#endif
+#endif
+
+#if defined(HAVE_SECURE_GETENV)
+ return secure_getenv(arg);
+#elif defined(HAVE___SECURE_GETENV)
+ return __secure_getenv(arg);
+#else
+ return getenv(arg);
+#endif
+}
+
+/*
+ * Here are the raw I/O functions
+ */
+static errcode_t raw_read_blk(io_channel channel,
+ struct unix_private_data *data,
+ unsigned long long block,
+ int count, void *bufv)
+{
+ errcode_t retval;
+ ssize_t size;
+ ext2_loff_t location;
+ int actual = 0;
+ unsigned char *buf = bufv;
+ ssize_t really_read = 0;
+ unsigned long long aligned_blk;
+ int align_size, offset;
+
+ size = (count < 0) ? -count : (ext2_loff_t) count * channel->block_size;
+ mutex_lock(data, STATS_MTX);
+ data->io_stats.bytes_read += size;
+ mutex_unlock(data, STATS_MTX);
+ location = ((ext2_loff_t) block * channel->block_size) + data->offset;
+
+ if (data->flags & IO_FLAG_FORCE_BOUNCE)
+ goto bounce_read;
+
+#ifdef HAVE_PREAD64
+ /* Try an aligned pread */
+ if ((channel->align == 0) ||
+ (IS_ALIGNED(buf, channel->align) &&
+ IS_ALIGNED(location, channel->align) &&
+ IS_ALIGNED(size, channel->align))) {
+ actual = pread64(data->dev, buf, size, location);
+ if (actual == size)
+ return 0;
+ actual = 0;
+ }
+#elif HAVE_PREAD
+ /* Try an aligned pread */
+ if ((sizeof(off_t) >= sizeof(ext2_loff_t)) &&
+ ((channel->align == 0) ||
+ (IS_ALIGNED(buf, channel->align) &&
+ IS_ALIGNED(location, channel->align) &&
+ IS_ALIGNED(size, channel->align)))) {
+ actual = pread(data->dev, buf, size, location);
+ if (actual == size)
+ return 0;
+ actual = 0;
+ }
+#endif /* HAVE_PREAD */
+
+ if ((channel->align == 0) ||
+ (IS_ALIGNED(buf, channel->align) &&
+ IS_ALIGNED(location, channel->align) &&
+ IS_ALIGNED(size, channel->align))) {
+ mutex_lock(data, BOUNCE_MTX);
+ if (ext2fs_llseek(data->dev, location, SEEK_SET) < 0) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+ goto error_unlock;
+ }
+ actual = read(data->dev, buf, size);
+ if (actual != size) {
+ short_read:
+ if (actual < 0) {
+ retval = errno;
+ actual = 0;
+ } else
+ retval = EXT2_ET_SHORT_READ;
+ goto error_unlock;
+ }
+ goto success_unlock;
+ }
+
+#ifdef ALIGN_DEBUG
+ printf("raw_read_blk: O_DIRECT fallback: %p %lu\n", buf,
+ (unsigned long) size);
+#endif
+
+ /*
+ * The buffer or size which we're trying to read isn't aligned
+ * to the O_DIRECT rules, so we need to do this the hard way...
+ */
+bounce_read:
+ if (channel->align == 0)
+ channel->align = 1;
+ if ((channel->block_size > channel->align) &&
+ (channel->block_size % channel->align) == 0)
+ align_size = channel->block_size;
+ else
+ align_size = channel->align;
+ aligned_blk = location / align_size;
+ offset = location % align_size;
+
+ mutex_lock(data, BOUNCE_MTX);
+ if (ext2fs_llseek(data->dev, aligned_blk * align_size, SEEK_SET) < 0) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+ goto error_unlock;
+ }
+ while (size > 0) {
+ actual = read(data->dev, data->bounce, align_size);
+ if (actual != align_size) {
+ actual = really_read;
+ buf -= really_read;
+ size += really_read;
+ goto short_read;
+ }
+ if ((actual + offset) > align_size)
+ actual = align_size - offset;
+ if (actual > size)
+ actual = size;
+ memcpy(buf, (char *)data->bounce + offset, actual);
+
+ really_read += actual;
+ size -= actual;
+ buf += actual;
+ offset = 0;
+ aligned_blk++;
+ }
+success_unlock:
+ mutex_unlock(data, BOUNCE_MTX);
+ return 0;
+
+error_unlock:
+ mutex_unlock(data, BOUNCE_MTX);
+ if (actual >= 0 && actual < size)
+ memset((char *) buf+actual, 0, size-actual);
+ if (channel->read_error)
+ retval = (channel->read_error)(channel, block, count, buf,
+ size, actual, retval);
+ return retval;
+}
+
+#define RAW_WRITE_NO_HANDLER 1
+
+static errcode_t raw_write_blk(io_channel channel,
+ struct unix_private_data *data,
+ unsigned long long block,
+ int count, const void *bufv,
+ int flags)
+{
+ ssize_t size;
+ ext2_loff_t location;
+ int actual = 0;
+ errcode_t retval;
+ const unsigned char *buf = bufv;
+ unsigned long long aligned_blk;
+ int align_size, offset;
+
+ if (count == 1)
+ size = channel->block_size;
+ else {
+ if (count < 0)
+ size = -count;
+ else
+ size = (ext2_loff_t) count * channel->block_size;
+ }
+ mutex_lock(data, STATS_MTX);
+ data->io_stats.bytes_written += size;
+ mutex_unlock(data, STATS_MTX);
+
+ location = ((ext2_loff_t) block * channel->block_size) + data->offset;
+
+ if (data->flags & IO_FLAG_FORCE_BOUNCE)
+ goto bounce_write;
+
+#ifdef HAVE_PWRITE64
+ /* Try an aligned pwrite */
+ if ((channel->align == 0) ||
+ (IS_ALIGNED(buf, channel->align) &&
+ IS_ALIGNED(location, channel->align) &&
+ IS_ALIGNED(size, channel->align))) {
+ actual = pwrite64(data->dev, buf, size, location);
+ if (actual == size)
+ return 0;
+ }
+#elif HAVE_PWRITE
+ /* Try an aligned pwrite */
+ if ((sizeof(off_t) >= sizeof(ext2_loff_t)) &&
+ ((channel->align == 0) ||
+ (IS_ALIGNED(buf, channel->align) &&
+ IS_ALIGNED(location, channel->align) &&
+ IS_ALIGNED(size, channel->align)))) {
+ actual = pwrite(data->dev, buf, size, location);
+ if (actual == size)
+ return 0;
+ }
+#endif /* HAVE_PWRITE */
+
+ if ((channel->align == 0) ||
+ (IS_ALIGNED(buf, channel->align) &&
+ IS_ALIGNED(location, channel->align) &&
+ IS_ALIGNED(size, channel->align))) {
+ mutex_lock(data, BOUNCE_MTX);
+ if (ext2fs_llseek(data->dev, location, SEEK_SET) < 0) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+ goto error_unlock;
+ }
+ actual = write(data->dev, buf, size);
+ mutex_unlock(data, BOUNCE_MTX);
+ if (actual < 0) {
+ retval = errno;
+ goto error_out;
+ }
+ if (actual != size) {
+ short_write:
+ retval = EXT2_ET_SHORT_WRITE;
+ goto error_out;
+ }
+ return 0;
+ }
+
+#ifdef ALIGN_DEBUG
+ printf("raw_write_blk: O_DIRECT fallback: %p %lu\n", buf,
+ (unsigned long) size);
+#endif
+ /*
+ * The buffer or size which we're trying to write isn't aligned
+ * to the O_DIRECT rules, so we need to do this the hard way...
+ */
+bounce_write:
+ if (channel->align == 0)
+ channel->align = 1;
+ if ((channel->block_size > channel->align) &&
+ (channel->block_size % channel->align) == 0)
+ align_size = channel->block_size;
+ else
+ align_size = channel->align;
+ aligned_blk = location / align_size;
+ offset = location % align_size;
+
+ while (size > 0) {
+ int actual_w;
+
+ mutex_lock(data, BOUNCE_MTX);
+ if (size < align_size || offset) {
+ if (ext2fs_llseek(data->dev, aligned_blk * align_size,
+ SEEK_SET) < 0) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+ goto error_unlock;
+ }
+ actual = read(data->dev, data->bounce,
+ align_size);
+ if (actual != align_size) {
+ if (actual < 0) {
+ retval = errno;
+ goto error_unlock;
+ }
+ memset((char *) data->bounce + actual, 0,
+ align_size - actual);
+ }
+ }
+ actual = size;
+ if ((actual + offset) > align_size)
+ actual = align_size - offset;
+ if (actual > size)
+ actual = size;
+ memcpy(((char *)data->bounce) + offset, buf, actual);
+ if (ext2fs_llseek(data->dev, aligned_blk * align_size, SEEK_SET) < 0) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+ goto error_unlock;
+ }
+ actual_w = write(data->dev, data->bounce, align_size);
+ mutex_unlock(data, BOUNCE_MTX);
+ if (actual_w < 0) {
+ retval = errno;
+ goto error_out;
+ }
+ if (actual_w != align_size)
+ goto short_write;
+ size -= actual;
+ buf += actual;
+ location += actual;
+ aligned_blk++;
+ offset = 0;
+ }
+ return 0;
+
+error_unlock:
+ mutex_unlock(data, BOUNCE_MTX);
+error_out:
+ if (((flags & RAW_WRITE_NO_HANDLER) == 0) && channel->write_error)
+ retval = (channel->write_error)(channel, block, count, buf,
+ size, actual, retval);
+ return retval;
+}
+
+
+/*
+ * Here we implement the cache functions
+ */
+
+/* Allocate the cache buffers */
+static errcode_t alloc_cache(io_channel channel,
+ struct unix_private_data *data)
+{
+ errcode_t retval;
+ struct unix_cache *cache;
+ int i;
+
+ data->access_time = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ cache->block = 0;
+ cache->access_time = 0;
+ cache->dirty = 0;
+ cache->in_use = 0;
+ if (cache->buf)
+ ext2fs_free_mem(&cache->buf);
+ retval = io_channel_alloc_buf(channel, 0, &cache->buf);
+ if (retval)
+ return retval;
+ }
+ if (channel->align || data->flags & IO_FLAG_FORCE_BOUNCE) {
+ if (data->bounce)
+ ext2fs_free_mem(&data->bounce);
+ retval = io_channel_alloc_buf(channel, 0, &data->bounce);
+ }
+ return retval;
+}
+
+/* Free the cache buffers */
+static void free_cache(struct unix_private_data *data)
+{
+ struct unix_cache *cache;
+ int i;
+
+ data->access_time = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ cache->block = 0;
+ cache->access_time = 0;
+ cache->dirty = 0;
+ cache->in_use = 0;
+ if (cache->buf)
+ ext2fs_free_mem(&cache->buf);
+ }
+ if (data->bounce)
+ ext2fs_free_mem(&data->bounce);
+}
+
+#ifndef NO_IO_CACHE
+/*
+ * Try to find a block in the cache. If the block is not found, and
+ * eldest is a non-zero pointer, then fill in eldest with the cache
+ * entry to that should be reused.
+ */
+static struct unix_cache *find_cached_block(struct unix_private_data *data,
+ unsigned long long block,
+ struct unix_cache **eldest)
+{
+ struct unix_cache *cache, *unused_cache, *oldest_cache;
+ int i;
+
+ unused_cache = oldest_cache = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ if (!cache->in_use) {
+ if (!unused_cache)
+ unused_cache = cache;
+ continue;
+ }
+ if (cache->block == block) {
+ cache->access_time = ++data->access_time;
+ return cache;
+ }
+ if (!oldest_cache ||
+ (cache->access_time < oldest_cache->access_time))
+ oldest_cache = cache;
+ }
+ if (eldest)
+ *eldest = (unused_cache) ? unused_cache : oldest_cache;
+ return 0;
+}
+
+/*
+ * Reuse a particular cache entry for another block.
+ */
+static errcode_t reuse_cache(io_channel channel,
+ struct unix_private_data *data, struct unix_cache *cache,
+ unsigned long long block)
+{
+ if (cache->dirty && cache->in_use) {
+ errcode_t retval;
+
+ retval = raw_write_blk(channel, data, cache->block, 1,
+ cache->buf, RAW_WRITE_NO_HANDLER);
+ if (retval) {
+ cache->write_err = 1;
+ return retval;
+ }
+ }
+
+ cache->in_use = 1;
+ cache->dirty = 0;
+ cache->write_err = 0;
+ cache->block = block;
+ cache->access_time = ++data->access_time;
+ return 0;
+}
+
+#define FLUSH_INVALIDATE 0x01
+#define FLUSH_NOLOCK 0x02
+
+/*
+ * Flush all of the blocks in the cache
+ */
+static errcode_t flush_cached_blocks(io_channel channel,
+ struct unix_private_data *data,
+ int flags)
+{
+ struct unix_cache *cache;
+ errcode_t retval, retval2 = 0;
+ int i;
+ int errors_found = 0;
+
+ if ((flags & FLUSH_NOLOCK) == 0)
+ mutex_lock(data, CACHE_MTX);
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ if (!cache->in_use || !cache->dirty)
+ continue;
+ retval = raw_write_blk(channel, data,
+ cache->block, 1, cache->buf,
+ RAW_WRITE_NO_HANDLER);
+ if (retval) {
+ cache->write_err = 1;
+ errors_found = 1;
+ retval2 = retval;
+ } else {
+ cache->dirty = 0;
+ cache->write_err = 0;
+ if (flags & FLUSH_INVALIDATE)
+ cache->in_use = 0;
+ }
+ }
+ if ((flags & FLUSH_NOLOCK) == 0)
+ mutex_unlock(data, CACHE_MTX);
+retry:
+ while (errors_found) {
+ if ((flags & FLUSH_NOLOCK) == 0)
+ mutex_lock(data, CACHE_MTX);
+ errors_found = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ if (!cache->in_use || !cache->write_err)
+ continue;
+ errors_found = 1;
+ if (cache->write_err && channel->write_error) {
+ char *err_buf = NULL;
+ unsigned long long err_block = cache->block;
+
+ cache->dirty = 0;
+ cache->in_use = 0;
+ cache->write_err = 0;
+ if (io_channel_alloc_buf(channel, 0,
+ &err_buf))
+ err_buf = NULL;
+ else
+ memcpy(err_buf, cache->buf,
+ channel->block_size);
+ mutex_unlock(data, CACHE_MTX);
+ (channel->write_error)(channel, err_block,
+ 1, err_buf, channel->block_size, -1,
+ retval2);
+ if (err_buf)
+ ext2fs_free_mem(&err_buf);
+ goto retry;
+ } else
+ cache->write_err = 0;
+ }
+ if ((flags & FLUSH_NOLOCK) == 0)
+ mutex_unlock(data, CACHE_MTX);
+ }
+ return retval2;
+}
+#endif /* NO_IO_CACHE */
+
+#ifdef __linux__
+#ifndef BLKDISCARDZEROES
+#define BLKDISCARDZEROES _IO(0x12,124)
+#endif
+#endif
+
+int ext2fs_open_file(const char *pathname, int flags, mode_t mode)
+{
+ if (mode)
+#if defined(HAVE_OPEN64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ return open64(pathname, flags, mode);
+ else
+ return open64(pathname, flags);
+#else
+ return open(pathname, flags, mode);
+ else
+ return open(pathname, flags);
+#endif
+}
+
+int ext2fs_stat(const char *path, ext2fs_struct_stat *buf)
+{
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ return stat64(path, buf);
+#else
+ return stat(path, buf);
+#endif
+}
+
+int ext2fs_fstat(int fd, ext2fs_struct_stat *buf)
+{
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ return fstat64(fd, buf);
+#else
+ return fstat(fd, buf);
+#endif
+}
+
+
+static errcode_t unix_open_channel(const char *name, int fd,
+ int flags, io_channel *channel,
+ io_manager io_mgr)
+{
+ io_channel io = NULL;
+ struct unix_private_data *data = NULL;
+ errcode_t retval;
+ ext2fs_struct_stat st;
+#ifdef __linux__
+ struct utsname ut;
+#endif
+
+ if (safe_getenv("UNIX_IO_FORCE_BOUNCE"))
+ flags |= IO_FLAG_FORCE_BOUNCE;
+
+#ifdef __linux__
+ /*
+ * We need to make sure any previous errors in the block
+ * device are thrown away, sigh.
+ */
+ (void) fsync(fd);
+#endif
+
+ retval = ext2fs_get_mem(sizeof(struct struct_io_channel), &io);
+ if (retval)
+ goto cleanup;
+ memset(io, 0, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ retval = ext2fs_get_mem(sizeof(struct unix_private_data), &data);
+ if (retval)
+ goto cleanup;
+
+ io->manager = io_mgr;
+ retval = ext2fs_get_mem(strlen(name)+1, &io->name);
+ if (retval)
+ goto cleanup;
+
+ strcpy(io->name, name);
+ io->private_data = data;
+ io->block_size = 1024;
+ io->read_error = 0;
+ io->write_error = 0;
+ io->refcount = 1;
+ io->flags = 0;
+
+ memset(data, 0, sizeof(struct unix_private_data));
+ data->magic = EXT2_ET_MAGIC_UNIX_IO_CHANNEL;
+ data->io_stats.num_fields = 2;
+ data->flags = flags;
+ data->dev = fd;
+
+#if defined(O_DIRECT)
+ if (flags & IO_FLAG_DIRECT_IO)
+ io->align = ext2fs_get_dio_alignment(data->dev);
+#elif defined(F_NOCACHE)
+ if (flags & IO_FLAG_DIRECT_IO)
+ io->align = 4096;
+#endif
+
+ /*
+ * If the device is really a block device, then set the
+ * appropriate flag, otherwise we can set DISCARD_ZEROES flag
+ * because we are going to use punch hole instead of discard
+ * and if it succeed, subsequent read from sparse area returns
+ * zero.
+ */
+ if (ext2fs_fstat(data->dev, &st) == 0) {
+ if (ext2fsP_is_disk_device(st.st_mode))
+ io->flags |= CHANNEL_FLAGS_BLOCK_DEVICE;
+ else
+ io->flags |= CHANNEL_FLAGS_DISCARD_ZEROES;
+ }
+
+#ifdef BLKDISCARDZEROES
+ {
+ int zeroes = 0;
+ if (ioctl(data->dev, BLKDISCARDZEROES, &zeroes) == 0 &&
+ zeroes)
+ io->flags |= CHANNEL_FLAGS_DISCARD_ZEROES;
+ }
+#endif
+
+#if defined(__CYGWIN__)
+ /*
+ * Some operating systems require that the buffers be aligned,
+ * regardless of O_DIRECT
+ */
+ if (!io->align)
+ io->align = 512;
+#endif
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ if (io->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
+ int dio_align = ext2fs_get_dio_alignment(fd);
+
+ if (io->align < dio_align)
+ io->align = dio_align;
+ }
+#endif
+
+ if ((retval = alloc_cache(io, data)))
+ goto cleanup;
+
+#ifdef BLKROGET
+ if (flags & IO_FLAG_RW) {
+ int error;
+ int readonly = 0;
+
+ /* Is the block device actually writable? */
+ error = ioctl(data->dev, BLKROGET, &readonly);
+ if (!error && readonly) {
+ retval = EPERM;
+ goto cleanup;
+ }
+ }
+#endif
+
+#ifdef __linux__
+#undef RLIM_INFINITY
+#if (defined(__alpha__) || ((defined(__sparc__) || defined(__mips__)) && (SIZEOF_LONG == 4)))
+#define RLIM_INFINITY ((unsigned long)(~0UL>>1))
+#else
+#define RLIM_INFINITY (~0UL)
+#endif
+ /*
+ * Work around a bug in 2.4.10-2.4.18 kernels where writes to
+ * block devices are wrongly getting hit by the filesize
+ * limit. This workaround isn't perfect, since it won't work
+ * if glibc wasn't built against 2.2 header files. (Sigh.)
+ *
+ */
+ if ((flags & IO_FLAG_RW) &&
+ (uname(&ut) == 0) &&
+ ((ut.release[0] == '2') && (ut.release[1] == '.') &&
+ (ut.release[2] == '4') && (ut.release[3] == '.') &&
+ (ut.release[4] == '1') && (ut.release[5] >= '0') &&
+ (ut.release[5] < '8')) &&
+ (ext2fs_fstat(data->dev, &st) == 0) &&
+ (ext2fsP_is_disk_device(st.st_mode))) {
+ struct rlimit rlim;
+
+ rlim.rlim_cur = rlim.rlim_max = (unsigned long) RLIM_INFINITY;
+ setrlimit(RLIMIT_FSIZE, &rlim);
+ getrlimit(RLIMIT_FSIZE, &rlim);
+ if (((unsigned long) rlim.rlim_cur) <
+ ((unsigned long) rlim.rlim_max)) {
+ rlim.rlim_cur = rlim.rlim_max;
+ setrlimit(RLIMIT_FSIZE, &rlim);
+ }
+ }
+#endif
+#ifdef HAVE_PTHREAD
+ if (flags & IO_FLAG_THREADS) {
+ io->flags |= CHANNEL_FLAGS_THREADS;
+ retval = pthread_mutex_init(&data->cache_mutex, NULL);
+ if (retval)
+ goto cleanup;
+ retval = pthread_mutex_init(&data->bounce_mutex, NULL);
+ if (retval) {
+ pthread_mutex_destroy(&data->cache_mutex);
+ goto cleanup;
+ }
+ retval = pthread_mutex_init(&data->stats_mutex, NULL);
+ if (retval) {
+ pthread_mutex_destroy(&data->cache_mutex);
+ pthread_mutex_destroy(&data->bounce_mutex);
+ goto cleanup;
+ }
+ }
+#endif
+ *channel = io;
+ return 0;
+
+cleanup:
+ if (data) {
+ if (data->dev >= 0)
+ close(data->dev);
+ free_cache(data);
+ ext2fs_free_mem(&data);
+ }
+ if (io) {
+ if (io->name) {
+ ext2fs_free_mem(&io->name);
+ }
+ ext2fs_free_mem(&io);
+ }
+ return retval;
+}
+
+static errcode_t unixfd_open(const char *str_fd, int flags,
+ io_channel *channel)
+{
+ int fd;
+ int fd_flags;
+
+ fd = atoi(str_fd);
+#if defined(HAVE_FCNTL)
+ fd_flags = fcntl(fd, F_GETFD);
+ if (fd_flags == -1)
+ return EBADF;
+
+ flags = 0;
+ if (fd_flags & O_RDWR)
+ flags |= IO_FLAG_RW;
+ if (fd_flags & O_EXCL)
+ flags |= IO_FLAG_EXCLUSIVE;
+#if defined(O_DIRECT)
+ if (fd_flags & O_DIRECT)
+ flags |= IO_FLAG_DIRECT_IO;
+#endif
+#endif /* HAVE_FCNTL */
+
+ return unix_open_channel(str_fd, fd, flags, channel, unixfd_io_manager);
+}
+
+static errcode_t unix_open(const char *name, int flags,
+ io_channel *channel)
+{
+ int fd = -1;
+ int open_flags;
+
+ if (name == 0)
+ return EXT2_ET_BAD_DEVICE_NAME;
+
+ open_flags = (flags & IO_FLAG_RW) ? O_RDWR : O_RDONLY;
+ if (flags & IO_FLAG_EXCLUSIVE)
+ open_flags |= O_EXCL;
+#if defined(O_DIRECT)
+ if (flags & IO_FLAG_DIRECT_IO)
+ open_flags |= O_DIRECT;
+#endif
+ fd = ext2fs_open_file(name, open_flags, 0);
+ if (fd < 0)
+ return errno;
+#if defined(F_NOCACHE) && !defined(IO_DIRECT)
+ if (flags & IO_FLAG_DIRECT_IO) {
+ if (fcntl(fd, F_NOCACHE, 1) < 0)
+ return errno;
+ }
+#endif
+ return unix_open_channel(name, fd, flags, channel, unix_io_manager);
+}
+
+static errcode_t unix_close(io_channel channel)
+{
+ struct unix_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (--channel->refcount > 0)
+ return 0;
+
+#ifndef NO_IO_CACHE
+ retval = flush_cached_blocks(channel, data, 0);
+#endif
+
+ if (close(data->dev) < 0)
+ retval = errno;
+ free_cache(data);
+#ifdef HAVE_PTHREAD
+ if (data->flags & IO_FLAG_THREADS) {
+ pthread_mutex_destroy(&data->cache_mutex);
+ pthread_mutex_destroy(&data->bounce_mutex);
+ pthread_mutex_destroy(&data->stats_mutex);
+ }
+#endif
+
+ ext2fs_free_mem(&channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem(&channel->name);
+ ext2fs_free_mem(&channel);
+ return retval;
+}
+
+static errcode_t unix_set_blksize(io_channel channel, int blksize)
+{
+ struct unix_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (channel->block_size != blksize) {
+ mutex_lock(data, CACHE_MTX);
+ mutex_lock(data, BOUNCE_MTX);
+#ifndef NO_IO_CACHE
+ if ((retval = flush_cached_blocks(channel, data, FLUSH_NOLOCK))){
+ mutex_unlock(data, BOUNCE_MTX);
+ mutex_unlock(data, CACHE_MTX);
+ return retval;
+ }
+#endif
+
+ channel->block_size = blksize;
+ free_cache(data);
+ retval = alloc_cache(channel, data);
+ mutex_unlock(data, BOUNCE_MTX);
+ mutex_unlock(data, CACHE_MTX);
+ }
+ return retval;
+}
+
+static errcode_t unix_read_blk64(io_channel channel, unsigned long long block,
+ int count, void *buf)
+{
+ struct unix_private_data *data;
+ struct unix_cache *cache;
+ errcode_t retval;
+ char *cp;
+ int i, j;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+#ifdef NO_IO_CACHE
+ return raw_read_blk(channel, data, block, count, buf);
+#else
+ if (data->flags & IO_FLAG_NOCACHE)
+ return raw_read_blk(channel, data, block, count, buf);
+ /*
+ * If we're doing an odd-sized read or a very large read,
+ * flush out the cache and then do a direct read.
+ */
+ if (count < 0 || count > WRITE_DIRECT_SIZE) {
+ if ((retval = flush_cached_blocks(channel, data, 0)))
+ return retval;
+ return raw_read_blk(channel, data, block, count, buf);
+ }
+
+ cp = buf;
+ mutex_lock(data, CACHE_MTX);
+ while (count > 0) {
+ /* If it's in the cache, use it! */
+ if ((cache = find_cached_block(data, block, NULL))) {
+#ifdef DEBUG
+ printf("Using cached block %lu\n", block);
+#endif
+ memcpy(cp, cache->buf, channel->block_size);
+ count--;
+ block++;
+ cp += channel->block_size;
+ continue;
+ }
+
+ /*
+ * Find the number of uncached blocks so we can do a
+ * single read request
+ */
+ for (i=1; i < count; i++)
+ if (find_cached_block(data, block+i, NULL))
+ break;
+#ifdef DEBUG
+ printf("Reading %d blocks starting at %lu\n", i, block);
+#endif
+ mutex_unlock(data, CACHE_MTX);
+ if ((retval = raw_read_blk(channel, data, block, i, cp)))
+ return retval;
+ mutex_lock(data, CACHE_MTX);
+
+ /* Save the results in the cache */
+ for (j=0; j < i; j++) {
+ if (!find_cached_block(data, block, &cache)) {
+ retval = reuse_cache(channel, data,
+ cache, block);
+ if (retval)
+ goto call_write_handler;
+ memcpy(cache->buf, cp, channel->block_size);
+ }
+ count--;
+ block++;
+ cp += channel->block_size;
+ }
+ }
+ mutex_unlock(data, CACHE_MTX);
+ return 0;
+
+call_write_handler:
+ if (cache->write_err && channel->write_error) {
+ char *err_buf = NULL;
+ unsigned long long err_block = cache->block;
+
+ cache->dirty = 0;
+ cache->in_use = 0;
+ cache->write_err = 0;
+ if (io_channel_alloc_buf(channel, 0, &err_buf))
+ err_buf = NULL;
+ else
+ memcpy(err_buf, cache->buf, channel->block_size);
+ mutex_unlock(data, CACHE_MTX);
+ (channel->write_error)(channel, err_block, 1, err_buf,
+ channel->block_size, -1,
+ retval);
+ if (err_buf)
+ ext2fs_free_mem(&err_buf);
+ } else
+ mutex_unlock(data, CACHE_MTX);
+ return retval;
+#endif /* NO_IO_CACHE */
+}
+
+static errcode_t unix_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ return unix_read_blk64(channel, block, count, buf);
+}
+
+static errcode_t unix_write_blk64(io_channel channel, unsigned long long block,
+ int count, const void *buf)
+{
+ struct unix_private_data *data;
+ struct unix_cache *cache, *reuse;
+ errcode_t retval = 0;
+ const char *cp;
+ int writethrough;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+#ifdef NO_IO_CACHE
+ return raw_write_blk(channel, data, block, count, buf, 0);
+#else
+ if (data->flags & IO_FLAG_NOCACHE)
+ return raw_write_blk(channel, data, block, count, buf, 0);
+ /*
+ * If we're doing an odd-sized write or a very large write,
+ * flush out the cache completely and then do a direct write.
+ */
+ if (count < 0 || count > WRITE_DIRECT_SIZE) {
+ if ((retval = flush_cached_blocks(channel, data,
+ FLUSH_INVALIDATE)))
+ return retval;
+ return raw_write_blk(channel, data, block, count, buf, 0);
+ }
+
+ /*
+ * For a moderate-sized multi-block write, first force a write
+ * if we're in write-through cache mode, and then fill the
+ * cache with the blocks.
+ */
+ writethrough = channel->flags & CHANNEL_FLAGS_WRITETHROUGH;
+ if (writethrough)
+ retval = raw_write_blk(channel, data, block, count, buf, 0);
+
+ cp = buf;
+ mutex_lock(data, CACHE_MTX);
+ while (count > 0) {
+ cache = find_cached_block(data, block, &reuse);
+ if (!cache) {
+ errcode_t err;
+
+ cache = reuse;
+ err = reuse_cache(channel, data, cache, block);
+ if (err)
+ goto call_write_handler;
+ }
+ if (cache->buf != cp)
+ memcpy(cache->buf, cp, channel->block_size);
+ cache->dirty = !writethrough;
+ count--;
+ block++;
+ cp += channel->block_size;
+ }
+ mutex_unlock(data, CACHE_MTX);
+ return retval;
+
+call_write_handler:
+ if (cache->write_err && channel->write_error) {
+ char *err_buf = NULL;
+ unsigned long long err_block = cache->block;
+
+ cache->dirty = 0;
+ cache->in_use = 0;
+ cache->write_err = 0;
+ if (io_channel_alloc_buf(channel, 0, &err_buf))
+ err_buf = NULL;
+ else
+ memcpy(err_buf, cache->buf, channel->block_size);
+ mutex_unlock(data, CACHE_MTX);
+ (channel->write_error)(channel, err_block, 1, err_buf,
+ channel->block_size, -1,
+ retval);
+ if (err_buf)
+ ext2fs_free_mem(&err_buf);
+ } else
+ mutex_unlock(data, CACHE_MTX);
+ return retval;
+#endif /* NO_IO_CACHE */
+}
+
+static errcode_t unix_cache_readahead(io_channel channel,
+ unsigned long long block,
+ unsigned long long count)
+{
+#ifdef POSIX_FADV_WILLNEED
+ struct unix_private_data *data;
+
+ data = (struct unix_private_data *)channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+ return posix_fadvise(data->dev,
+ (ext2_loff_t)block * channel->block_size + data->offset,
+ (ext2_loff_t)count * channel->block_size,
+ POSIX_FADV_WILLNEED);
+#else
+ return EXT2_ET_OP_NOT_SUPPORTED;
+#endif
+}
+
+static errcode_t unix_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ return unix_write_blk64(channel, block, count, buf);
+}
+
+static errcode_t unix_write_byte(io_channel channel, unsigned long offset,
+ int size, const void *buf)
+{
+ struct unix_private_data *data;
+ errcode_t retval = 0;
+ ssize_t actual;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (channel->align != 0) {
+#ifdef ALIGN_DEBUG
+ printf("unix_write_byte: O_DIRECT fallback\n");
+#endif
+ return EXT2_ET_UNIMPLEMENTED;
+ }
+
+#ifndef NO_IO_CACHE
+ /*
+ * Flush out the cache completely
+ */
+ if ((retval = flush_cached_blocks(channel, data, FLUSH_INVALIDATE)))
+ return retval;
+#endif
+
+ if (lseek(data->dev, offset + data->offset, SEEK_SET) < 0)
+ return errno;
+
+ actual = write(data->dev, buf, size);
+ if (actual < 0)
+ return errno;
+ if (actual != size)
+ return EXT2_ET_SHORT_WRITE;
+
+ return 0;
+}
+
+/*
+ * Flush data buffers to disk.
+ */
+static errcode_t unix_flush(io_channel channel)
+{
+ struct unix_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+#ifndef NO_IO_CACHE
+ retval = flush_cached_blocks(channel, data, 0);
+#endif
+#ifdef HAVE_FSYNC
+ if (!retval && fsync(data->dev) != 0)
+ return errno;
+#endif
+ return retval;
+}
+
+static errcode_t unix_set_option(io_channel channel, const char *option,
+ const char *arg)
+{
+ struct unix_private_data *data;
+ unsigned long long tmp;
+ errcode_t retval;
+ char *end;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (!strcmp(option, "offset")) {
+ if (!arg)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ tmp = strtoull(arg, &end, 0);
+ if (*end)
+ return EXT2_ET_INVALID_ARGUMENT;
+ data->offset = tmp;
+ if (data->offset < 0)
+ return EXT2_ET_INVALID_ARGUMENT;
+ return 0;
+ }
+ if (!strcmp(option, "cache")) {
+ if (!arg)
+ return EXT2_ET_INVALID_ARGUMENT;
+ if (!strcmp(arg, "on")) {
+ data->flags &= ~IO_FLAG_NOCACHE;
+ return 0;
+ }
+ if (!strcmp(arg, "off")) {
+ retval = flush_cached_blocks(channel, data, 0);
+ data->flags |= IO_FLAG_NOCACHE;
+ return retval;
+ }
+ return EXT2_ET_INVALID_ARGUMENT;
+ }
+ return EXT2_ET_INVALID_ARGUMENT;
+}
+
+#if defined(__linux__) && !defined(BLKDISCARD)
+#define BLKDISCARD _IO(0x12,119)
+#endif
+
+static errcode_t unix_discard(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ struct unix_private_data *data;
+ int ret;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
+#ifdef BLKDISCARD
+ __u64 range[2];
+
+ range[0] = (__u64)(block) * channel->block_size + data->offset;
+ range[1] = (__u64)(count) * channel->block_size;
+
+ ret = ioctl(data->dev, BLKDISCARD, &range);
+#else
+ goto unimplemented;
+#endif
+ } else {
+#if defined(HAVE_FALLOCATE) && defined(FALLOC_FL_PUNCH_HOLE)
+ /*
+ * If we are not on block device, try to use punch hole
+ * to reclaim free space.
+ */
+ ret = fallocate(data->dev,
+ FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
+ (off_t)(block) * channel->block_size + data->offset,
+ (off_t)(count) * channel->block_size);
+#else
+ goto unimplemented;
+#endif
+ }
+ if (ret < 0) {
+ if (errno == EOPNOTSUPP)
+ goto unimplemented;
+ return errno;
+ }
+ return 0;
+unimplemented:
+ return EXT2_ET_UNIMPLEMENTED;
+}
+
+/*
+ * If we know about ZERO_RANGE, try that before we try PUNCH_HOLE because
+ * ZERO_RANGE doesn't unmap preallocated blocks. We prefer fallocate because
+ * it always invalidates page cache, and libext2fs requires that reads after
+ * ZERO_RANGE return zeroes.
+ */
+static int __unix_zeroout(int fd, off_t offset, off_t len)
+{
+ int ret = -1;
+
+#if defined(HAVE_FALLOCATE) && defined(FALLOC_FL_ZERO_RANGE)
+ ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, offset, len);
+ if (ret == 0)
+ return 0;
+#endif
+#if defined(HAVE_FALLOCATE) && defined(FALLOC_FL_PUNCH_HOLE) && defined(FALLOC_FL_KEEP_SIZE)
+ ret = fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
+ offset, len);
+ if (ret == 0)
+ return 0;
+#endif
+ errno = EOPNOTSUPP;
+ return ret;
+}
+
+/* parameters might not be used if OS doesn't support zeroout */
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+static errcode_t unix_zeroout(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ struct unix_private_data *data;
+ int ret;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ if (safe_getenv("UNIX_IO_NOZEROOUT"))
+ goto unimplemented;
+
+ if (!(channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE)) {
+ /* Regular file, try to use truncate/punch/zero. */
+ struct stat statbuf;
+
+ if (count == 0)
+ return 0;
+ /*
+ * If we're trying to zero a range past the end of the file,
+ * extend the file size, then truncate everything.
+ */
+ ret = fstat(data->dev, &statbuf);
+ if (ret)
+ goto err;
+ if ((unsigned long long) statbuf.st_size <
+ (block + count) * channel->block_size + data->offset) {
+ ret = ftruncate(data->dev,
+ (block + count) * channel->block_size + data->offset);
+ if (ret)
+ goto err;
+ }
+ }
+
+ ret = __unix_zeroout(data->dev,
+ (off_t)(block) * channel->block_size + data->offset,
+ (off_t)(count) * channel->block_size);
+err:
+ if (ret < 0) {
+ if (errno == EOPNOTSUPP)
+ goto unimplemented;
+ return errno;
+ }
+ return 0;
+unimplemented:
+ return EXT2_ET_UNIMPLEMENTED;
+}
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+
+static struct struct_io_manager struct_unix_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Unix I/O Manager",
+ .open = unix_open,
+ .close = unix_close,
+ .set_blksize = unix_set_blksize,
+ .read_blk = unix_read_blk,
+ .write_blk = unix_write_blk,
+ .flush = unix_flush,
+ .write_byte = unix_write_byte,
+ .set_option = unix_set_option,
+ .get_stats = unix_get_stats,
+ .read_blk64 = unix_read_blk64,
+ .write_blk64 = unix_write_blk64,
+ .discard = unix_discard,
+ .cache_readahead = unix_cache_readahead,
+ .zeroout = unix_zeroout,
+};
+
+io_manager unix_io_manager = &struct_unix_manager;
+
+static struct struct_io_manager struct_unixfd_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Unix fd I/O Manager",
+ .open = unixfd_open,
+ .close = unix_close,
+ .set_blksize = unix_set_blksize,
+ .read_blk = unix_read_blk,
+ .write_blk = unix_write_blk,
+ .flush = unix_flush,
+ .write_byte = unix_write_byte,
+ .set_option = unix_set_option,
+ .get_stats = unix_get_stats,
+ .read_blk64 = unix_read_blk64,
+ .write_blk64 = unix_write_blk64,
+ .discard = unix_discard,
+ .cache_readahead = unix_cache_readahead,
+ .zeroout = unix_zeroout,
+};
+
+io_manager unixfd_io_manager = &struct_unixfd_manager;
diff --git a/lib/ext2fs/unlink.c b/lib/ext2fs/unlink.c
new file mode 100644
index 0000000..3ec04cf
--- /dev/null
+++ b/lib/ext2fs/unlink.c
@@ -0,0 +1,100 @@
+/*
+ * unlink.c --- delete links in a ext2fs directory
+ *
+ * Copyright (C) 1993, 1994, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct link_struct {
+ const char *name;
+ int namelen;
+ ext2_ino_t inode;
+ int flags;
+ struct ext2_dir_entry *prev;
+ int done;
+};
+
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int unlink_proc(struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct link_struct *ls = (struct link_struct *) priv_data;
+ struct ext2_dir_entry *prev;
+
+ prev = ls->prev;
+ ls->prev = dirent;
+
+ if (ls->name) {
+ if (ext2fs_dirent_name_len(dirent) != ls->namelen)
+ return 0;
+ if (strncmp(ls->name, dirent->name, ext2fs_dirent_name_len(dirent)))
+ return 0;
+ }
+ if (!(ls->flags & EXT2FS_UNLINK_FORCE) && ls->inode) {
+ if (dirent->inode != ls->inode)
+ return 0;
+ } else {
+ if (!dirent->inode)
+ return 0;
+ }
+
+ if (offset)
+ prev->rec_len += dirent->rec_len;
+ else
+ dirent->inode = 0;
+ ls->done++;
+ return DIRENT_ABORT|DIRENT_CHANGED;
+}
+
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+errcode_t ext2fs_unlink(ext2_filsys fs, ext2_ino_t dir,
+ const char *name, ext2_ino_t ino,
+ int flags)
+{
+ errcode_t retval;
+ struct link_struct ls;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!name && !ino)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ ls.name = name;
+ ls.namelen = name ? strlen(name) : 0;
+ ls.inode = ino;
+ ls.flags = flags;
+ ls.done = 0;
+ ls.prev = 0;
+
+ retval = ext2fs_dir_iterate(fs, dir, DIRENT_FLAG_INCLUDE_EMPTY,
+ 0, unlink_proc, &ls);
+ if (retval)
+ return retval;
+
+ return (ls.done) ? 0 : EXT2_ET_DIR_NO_SPACE;
+}
+
diff --git a/lib/ext2fs/utf8data.h b/lib/ext2fs/utf8data.h
new file mode 100644
index 0000000..76e4f0e
--- /dev/null
+++ b/lib/ext2fs/utf8data.h
@@ -0,0 +1,4109 @@
+/* This file is generated code, do not edit. */
+#ifndef __INCLUDED_FROM_UTF8NORM_C__
+#error Only nls_utf8-norm.c should include this file.
+#endif
+
+static const unsigned int utf8vers = 0xc0100;
+
+static const unsigned int utf8agetab[] = {
+ 0,
+ 0x10100,
+ 0x20000,
+ 0x20100,
+ 0x30000,
+ 0x30100,
+ 0x30200,
+ 0x40000,
+ 0x40100,
+ 0x50000,
+ 0x50100,
+ 0x50200,
+ 0x60000,
+ 0x60100,
+ 0x60200,
+ 0x60300,
+ 0x70000,
+ 0x80000,
+ 0x90000,
+ 0xa0000,
+ 0xb0000,
+ 0xc0000,
+ 0xc0100
+};
+
+static const struct utf8data utf8nfdicfdata[] = {
+ { 0, 0 },
+ { 0x10100, 0 },
+ { 0x20000, 0 },
+ { 0x20100, 0 },
+ { 0x30000, 0 },
+ { 0x30100, 0 },
+ { 0x30200, 1792 },
+ { 0x40000, 3200 },
+ { 0x40100, 3200 },
+ { 0x50000, 3200 },
+ { 0x50100, 3200 },
+ { 0x50200, 3200 },
+ { 0x60000, 3200 },
+ { 0x60100, 3200 },
+ { 0x60200, 3200 },
+ { 0x60300, 3200 },
+ { 0x70000, 3200 },
+ { 0x80000, 3200 },
+ { 0x90000, 3200 },
+ { 0xa0000, 3200 },
+ { 0xb0000, 3200 },
+ { 0xc0000, 3200 },
+ { 0xc0100, 3200 }
+};
+
+static const struct utf8data utf8nfdidata[] = {
+ { 0, 896 },
+ { 0x10100, 896 },
+ { 0x20000, 896 },
+ { 0x20100, 896 },
+ { 0x30000, 896 },
+ { 0x30100, 896 },
+ { 0x30200, 2496 },
+ { 0x40000, 20736 },
+ { 0x40100, 20736 },
+ { 0x50000, 20736 },
+ { 0x50100, 20736 },
+ { 0x50200, 20736 },
+ { 0x60000, 20736 },
+ { 0x60100, 20736 },
+ { 0x60200, 20736 },
+ { 0x60300, 20736 },
+ { 0x70000, 20736 },
+ { 0x80000, 20736 },
+ { 0x90000, 20736 },
+ { 0xa0000, 20736 },
+ { 0xb0000, 20736 },
+ { 0xc0000, 20736 },
+ { 0xc0100, 20736 }
+};
+
+static const unsigned char utf8data[64256] = {
+ /* nfdicf_30100 */
+ 0xd7,0x07,0x66,0x84,0x0c,0x01,0x00,0xc6,0xd5,0x16,0xe4,0x99,0x1a,0xe3,0x63,0x15,
+ 0xe2,0x4c,0x0e,0xc1,0xe0,0x4e,0x0d,0xcf,0x86,0x65,0x2d,0x0d,0x01,0x00,0xd4,0xb8,
+ 0xd3,0x27,0xe2,0x89,0xa3,0xe1,0xce,0x35,0xe0,0x2c,0x22,0xcf,0x86,0xc5,0xe4,0x15,
+ 0x6d,0xe3,0x60,0x68,0xe2,0xf6,0x65,0xe1,0x29,0x65,0xe0,0xee,0x64,0xcf,0x86,0xe5,
+ 0xb3,0x64,0x64,0x96,0x64,0x0b,0x00,0xd2,0x0e,0xe1,0xb5,0x3c,0xe0,0xba,0xa3,0xcf,
+ 0x86,0xcf,0x06,0x01,0x00,0xd1,0x0c,0xe0,0x1e,0xa9,0xcf,0x86,0xcf,0x06,0x02,0xff,
+ 0xff,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x01,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x01,
+ 0x00,0xe4,0xe1,0x45,0xe3,0x3b,0x45,0xd2,0x06,0xcf,0x06,0x01,0x00,0xe1,0x87,0xad,
+ 0xd0,0x21,0xcf,0x86,0xe5,0x81,0xaa,0xe4,0x00,0xaa,0xe3,0xbf,0xa9,0xe2,0x9e,0xa9,
+ 0xe1,0x8d,0xa9,0x10,0x08,0x01,0xff,0xe8,0xb1,0x88,0x00,0x01,0xff,0xe6,0x9b,0xb4,
+ 0x00,0xcf,0x86,0xe5,0x63,0xac,0xd4,0x19,0xe3,0xa2,0xab,0xe2,0x81,0xab,0xe1,0x70,
+ 0xab,0x10,0x08,0x01,0xff,0xe9,0xb9,0xbf,0x00,0x01,0xff,0xe8,0xab,0x96,0x00,0xe3,
+ 0x09,0xac,0xe2,0xe8,0xab,0xe1,0xd7,0xab,0x10,0x08,0x01,0xff,0xe7,0xb8,0xb7,0x00,
+ 0x01,0xff,0xe9,0x9b,0xbb,0x00,0x83,0xe2,0x19,0xfa,0xe1,0xf2,0xf6,0xe0,0x6f,0xf5,
+ 0xcf,0x86,0xd5,0x31,0xc4,0xe3,0x54,0x4e,0xe2,0xf5,0x4c,0xe1,0xa4,0xcc,0xe0,0x9c,
+ 0x4b,0xcf,0x86,0xe5,0x8e,0x49,0xe4,0xaf,0x46,0xe3,0x11,0xbd,0xe2,0x68,0xbc,0xe1,
+ 0x43,0xbc,0xe0,0x1c,0xbc,0xcf,0x86,0xe5,0xe9,0xbb,0x94,0x07,0x63,0xd4,0xbb,0x07,
+ 0x00,0x07,0x00,0xe4,0xdb,0xf4,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x05,0x00,0xd2,0x0b,
+ 0xe1,0xea,0xe1,0xcf,0x86,0xcf,0x06,0x05,0x00,0xd1,0x0e,0xe0,0xd9,0xe2,0xcf,0x86,
+ 0xe5,0x9e,0xe2,0xcf,0x06,0x11,0x00,0xd0,0x0b,0xcf,0x86,0xe5,0xd9,0xe2,0xcf,0x06,
+ 0x13,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xe4,0x74,0xf4,0xe3,0x5d,0xf3,
+ 0xd2,0xa0,0xe1,0x13,0xe7,0xd0,0x21,0xcf,0x86,0xe5,0x14,0xe4,0xe4,0x90,0xe3,0xe3,
+ 0x4e,0xe3,0xe2,0x2d,0xe3,0xe1,0x1b,0xe3,0x10,0x08,0x05,0xff,0xe4,0xb8,0xbd,0x00,
+ 0x05,0xff,0xe4,0xb8,0xb8,0x00,0xcf,0x86,0xd5,0x1c,0xe4,0x70,0xe5,0xe3,0x2f,0xe5,
+ 0xe2,0x0e,0xe5,0xe1,0xfd,0xe4,0x10,0x08,0x05,0xff,0xe5,0x92,0xa2,0x00,0x05,0xff,
+ 0xe5,0x93,0xb6,0x00,0xd4,0x34,0xd3,0x18,0xe2,0xf7,0xe5,0xe1,0xe6,0xe5,0x10,0x09,
+ 0x05,0xff,0xf0,0xa1,0x9a,0xa8,0x00,0x05,0xff,0xf0,0xa1,0x9b,0xaa,0x00,0xe2,0x17,
+ 0xe6,0x91,0x11,0x10,0x09,0x05,0xff,0xf0,0xa1,0x8d,0xaa,0x00,0x05,0xff,0xe5,0xac,
+ 0x88,0x00,0x05,0xff,0xe5,0xac,0xbe,0x00,0xe3,0x5d,0xe6,0xd2,0x14,0xe1,0x2c,0xe6,
+ 0x10,0x08,0x05,0xff,0xe5,0xaf,0xb3,0x00,0x05,0xff,0xf0,0xa1,0xac,0x98,0x00,0xe1,
+ 0x38,0xe6,0x10,0x08,0x05,0xff,0xe5,0xbc,0xb3,0x00,0x05,0xff,0xe5,0xb0,0xa2,0x00,
+ 0xd1,0xd5,0xd0,0x6a,0xcf,0x86,0xe5,0x8d,0xeb,0xd4,0x19,0xe3,0xc6,0xea,0xe2,0xa4,
+ 0xea,0xe1,0x93,0xea,0x10,0x08,0x05,0xff,0xe6,0xb4,0xbe,0x00,0x05,0xff,0xe6,0xb5,
+ 0xb7,0x00,0xd3,0x18,0xe2,0x10,0xeb,0xe1,0xff,0xea,0x10,0x09,0x05,0xff,0xf0,0xa3,
+ 0xbd,0x9e,0x00,0x05,0xff,0xf0,0xa3,0xbe,0x8e,0x00,0xd2,0x13,0xe1,0x28,0xeb,0x10,
+ 0x08,0x05,0xff,0xe7,0x81,0xbd,0x00,0x05,0xff,0xe7,0x81,0xb7,0x00,0xd1,0x11,0x10,
+ 0x08,0x05,0xff,0xe7,0x85,0x85,0x00,0x05,0xff,0xf0,0xa4,0x89,0xa3,0x00,0x10,0x08,
+ 0x05,0xff,0xe7,0x86,0x9c,0x00,0x05,0xff,0xe4,0x8e,0xab,0x00,0xcf,0x86,0xe5,0x2a,
+ 0xed,0xd4,0x1a,0xe3,0x62,0xec,0xe2,0x48,0xec,0xe1,0x35,0xec,0x10,0x08,0x05,0xff,
+ 0xe7,0x9b,0xb4,0x00,0x05,0xff,0xf0,0xa5,0x83,0xb3,0x00,0xd3,0x16,0xe2,0xaa,0xec,
+ 0xe1,0x98,0xec,0x10,0x08,0x05,0xff,0xe7,0xa3,0x8c,0x00,0x05,0xff,0xe4,0x83,0xa3,
+ 0x00,0xd2,0x13,0xe1,0xc6,0xec,0x10,0x08,0x05,0xff,0xe4,0x84,0xaf,0x00,0x05,0xff,
+ 0xe7,0xa9,0x80,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa5,0xa5,0xbc,0x00,0x05,
+ 0xff,0xf0,0xa5,0xaa,0xa7,0x00,0x10,0x09,0x05,0xff,0xf0,0xa5,0xaa,0xa7,0x00,0x05,
+ 0xff,0xe7,0xaa,0xae,0x00,0xe0,0xdc,0xef,0xcf,0x86,0xd5,0x1d,0xe4,0x51,0xee,0xe3,
+ 0x0d,0xee,0xe2,0xeb,0xed,0xe1,0xda,0xed,0x10,0x09,0x05,0xff,0xf0,0xa3,0x8d,0x9f,
+ 0x00,0x05,0xff,0xe4,0x8f,0x95,0x00,0xd4,0x19,0xe3,0xf8,0xee,0xe2,0xd4,0xee,0xe1,
+ 0xc3,0xee,0x10,0x08,0x05,0xff,0xe8,0x8d,0x93,0x00,0x05,0xff,0xe8,0x8f,0x8a,0x00,
+ 0xd3,0x18,0xe2,0x43,0xef,0xe1,0x32,0xef,0x10,0x09,0x05,0xff,0xf0,0xa6,0xbe,0xb1,
+ 0x00,0x05,0xff,0xf0,0xa7,0x83,0x92,0x00,0xd2,0x13,0xe1,0x5b,0xef,0x10,0x08,0x05,
+ 0xff,0xe8,0x9a,0x88,0x00,0x05,0xff,0xe8,0x9c,0x8e,0x00,0xd1,0x10,0x10,0x08,0x05,
+ 0xff,0xe8,0x9c,0xa8,0x00,0x05,0xff,0xe8,0x9d,0xab,0x00,0x10,0x08,0x05,0xff,0xe8,
+ 0x9e,0x86,0x00,0x05,0xff,0xe4,0xb5,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ /* nfdi_30100 */
+ 0x57,0x04,0x01,0x00,0xc6,0xd5,0x16,0xe4,0xc2,0x59,0xe3,0xfb,0x54,0xe2,0x74,0x4f,
+ 0xc1,0xe0,0xa0,0x4d,0xcf,0x86,0x65,0x84,0x4d,0x01,0x00,0xd4,0xb8,0xd3,0x27,0xe2,
+ 0x0c,0xa0,0xe1,0xdf,0x8d,0xe0,0x39,0x71,0xcf,0x86,0xc5,0xe4,0x98,0x69,0xe3,0xe3,
+ 0x64,0xe2,0x79,0x62,0xe1,0xac,0x61,0xe0,0x71,0x61,0xcf,0x86,0xe5,0x36,0x61,0x64,
+ 0x19,0x61,0x0b,0x00,0xd2,0x0e,0xe1,0xc2,0xa0,0xe0,0x3d,0xa0,0xcf,0x86,0xcf,0x06,
+ 0x01,0x00,0xd1,0x0c,0xe0,0xa1,0xa5,0xcf,0x86,0xcf,0x06,0x02,0xff,0xff,0xd0,0x08,
+ 0xcf,0x86,0xcf,0x06,0x01,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x01,0x00,0xe4,0x9e,
+ 0xb6,0xe3,0x18,0xae,0xd2,0x06,0xcf,0x06,0x01,0x00,0xe1,0x0a,0xaa,0xd0,0x21,0xcf,
+ 0x86,0xe5,0x04,0xa7,0xe4,0x83,0xa6,0xe3,0x42,0xa6,0xe2,0x21,0xa6,0xe1,0x10,0xa6,
+ 0x10,0x08,0x01,0xff,0xe8,0xb1,0x88,0x00,0x01,0xff,0xe6,0x9b,0xb4,0x00,0xcf,0x86,
+ 0xe5,0xe6,0xa8,0xd4,0x19,0xe3,0x25,0xa8,0xe2,0x04,0xa8,0xe1,0xf3,0xa7,0x10,0x08,
+ 0x01,0xff,0xe9,0xb9,0xbf,0x00,0x01,0xff,0xe8,0xab,0x96,0x00,0xe3,0x8c,0xa8,0xe2,
+ 0x6b,0xa8,0xe1,0x5a,0xa8,0x10,0x08,0x01,0xff,0xe7,0xb8,0xb7,0x00,0x01,0xff,0xe9,
+ 0x9b,0xbb,0x00,0x83,0xe2,0x9c,0xf6,0xe1,0x75,0xf3,0xe0,0xf2,0xf1,0xcf,0x86,0xd5,
+ 0x31,0xc4,0xe3,0x6d,0xcc,0xe2,0x46,0xca,0xe1,0x27,0xc9,0xe0,0xb7,0xbf,0xcf,0x86,
+ 0xe5,0xaa,0xbb,0xe4,0xa3,0xba,0xe3,0x94,0xb9,0xe2,0xeb,0xb8,0xe1,0xc6,0xb8,0xe0,
+ 0x9f,0xb8,0xcf,0x86,0xe5,0x6c,0xb8,0x94,0x07,0x63,0x57,0xb8,0x07,0x00,0x07,0x00,
+ 0xe4,0x5e,0xf1,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x05,0x00,0xd2,0x0b,0xe1,0x6d,0xde,
+ 0xcf,0x86,0xcf,0x06,0x05,0x00,0xd1,0x0e,0xe0,0x5c,0xdf,0xcf,0x86,0xe5,0x21,0xdf,
+ 0xcf,0x06,0x11,0x00,0xd0,0x0b,0xcf,0x86,0xe5,0x5c,0xdf,0xcf,0x06,0x13,0x00,0xcf,
+ 0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xe4,0xf7,0xf0,0xe3,0xe0,0xef,0xd2,0xa0,0xe1,
+ 0x96,0xe3,0xd0,0x21,0xcf,0x86,0xe5,0x97,0xe0,0xe4,0x13,0xe0,0xe3,0xd1,0xdf,0xe2,
+ 0xb0,0xdf,0xe1,0x9e,0xdf,0x10,0x08,0x05,0xff,0xe4,0xb8,0xbd,0x00,0x05,0xff,0xe4,
+ 0xb8,0xb8,0x00,0xcf,0x86,0xd5,0x1c,0xe4,0xf3,0xe1,0xe3,0xb2,0xe1,0xe2,0x91,0xe1,
+ 0xe1,0x80,0xe1,0x10,0x08,0x05,0xff,0xe5,0x92,0xa2,0x00,0x05,0xff,0xe5,0x93,0xb6,
+ 0x00,0xd4,0x34,0xd3,0x18,0xe2,0x7a,0xe2,0xe1,0x69,0xe2,0x10,0x09,0x05,0xff,0xf0,
+ 0xa1,0x9a,0xa8,0x00,0x05,0xff,0xf0,0xa1,0x9b,0xaa,0x00,0xe2,0x9a,0xe2,0x91,0x11,
+ 0x10,0x09,0x05,0xff,0xf0,0xa1,0x8d,0xaa,0x00,0x05,0xff,0xe5,0xac,0x88,0x00,0x05,
+ 0xff,0xe5,0xac,0xbe,0x00,0xe3,0xe0,0xe2,0xd2,0x14,0xe1,0xaf,0xe2,0x10,0x08,0x05,
+ 0xff,0xe5,0xaf,0xb3,0x00,0x05,0xff,0xf0,0xa1,0xac,0x98,0x00,0xe1,0xbb,0xe2,0x10,
+ 0x08,0x05,0xff,0xe5,0xbc,0xb3,0x00,0x05,0xff,0xe5,0xb0,0xa2,0x00,0xd1,0xd5,0xd0,
+ 0x6a,0xcf,0x86,0xe5,0x10,0xe8,0xd4,0x19,0xe3,0x49,0xe7,0xe2,0x27,0xe7,0xe1,0x16,
+ 0xe7,0x10,0x08,0x05,0xff,0xe6,0xb4,0xbe,0x00,0x05,0xff,0xe6,0xb5,0xb7,0x00,0xd3,
+ 0x18,0xe2,0x93,0xe7,0xe1,0x82,0xe7,0x10,0x09,0x05,0xff,0xf0,0xa3,0xbd,0x9e,0x00,
+ 0x05,0xff,0xf0,0xa3,0xbe,0x8e,0x00,0xd2,0x13,0xe1,0xab,0xe7,0x10,0x08,0x05,0xff,
+ 0xe7,0x81,0xbd,0x00,0x05,0xff,0xe7,0x81,0xb7,0x00,0xd1,0x11,0x10,0x08,0x05,0xff,
+ 0xe7,0x85,0x85,0x00,0x05,0xff,0xf0,0xa4,0x89,0xa3,0x00,0x10,0x08,0x05,0xff,0xe7,
+ 0x86,0x9c,0x00,0x05,0xff,0xe4,0x8e,0xab,0x00,0xcf,0x86,0xe5,0xad,0xe9,0xd4,0x1a,
+ 0xe3,0xe5,0xe8,0xe2,0xcb,0xe8,0xe1,0xb8,0xe8,0x10,0x08,0x05,0xff,0xe7,0x9b,0xb4,
+ 0x00,0x05,0xff,0xf0,0xa5,0x83,0xb3,0x00,0xd3,0x16,0xe2,0x2d,0xe9,0xe1,0x1b,0xe9,
+ 0x10,0x08,0x05,0xff,0xe7,0xa3,0x8c,0x00,0x05,0xff,0xe4,0x83,0xa3,0x00,0xd2,0x13,
+ 0xe1,0x49,0xe9,0x10,0x08,0x05,0xff,0xe4,0x84,0xaf,0x00,0x05,0xff,0xe7,0xa9,0x80,
+ 0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa5,0xa5,0xbc,0x00,0x05,0xff,0xf0,0xa5,
+ 0xaa,0xa7,0x00,0x10,0x09,0x05,0xff,0xf0,0xa5,0xaa,0xa7,0x00,0x05,0xff,0xe7,0xaa,
+ 0xae,0x00,0xe0,0x5f,0xec,0xcf,0x86,0xd5,0x1d,0xe4,0xd4,0xea,0xe3,0x90,0xea,0xe2,
+ 0x6e,0xea,0xe1,0x5d,0xea,0x10,0x09,0x05,0xff,0xf0,0xa3,0x8d,0x9f,0x00,0x05,0xff,
+ 0xe4,0x8f,0x95,0x00,0xd4,0x19,0xe3,0x7b,0xeb,0xe2,0x57,0xeb,0xe1,0x46,0xeb,0x10,
+ 0x08,0x05,0xff,0xe8,0x8d,0x93,0x00,0x05,0xff,0xe8,0x8f,0x8a,0x00,0xd3,0x18,0xe2,
+ 0xc6,0xeb,0xe1,0xb5,0xeb,0x10,0x09,0x05,0xff,0xf0,0xa6,0xbe,0xb1,0x00,0x05,0xff,
+ 0xf0,0xa7,0x83,0x92,0x00,0xd2,0x13,0xe1,0xde,0xeb,0x10,0x08,0x05,0xff,0xe8,0x9a,
+ 0x88,0x00,0x05,0xff,0xe8,0x9c,0x8e,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x9c,
+ 0xa8,0x00,0x05,0xff,0xe8,0x9d,0xab,0x00,0x10,0x08,0x05,0xff,0xe8,0x9e,0x86,0x00,
+ 0x05,0xff,0xe4,0xb5,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ /* nfdicf_30200 */
+ 0xd7,0x07,0x66,0x84,0x05,0x01,0x00,0xc6,0xd5,0x16,0xe4,0x99,0x13,0xe3,0x63,0x0e,
+ 0xe2,0x4c,0x07,0xc1,0xe0,0x4e,0x06,0xcf,0x86,0x65,0x2d,0x06,0x01,0x00,0xd4,0x2a,
+ 0xe3,0xd0,0x35,0xe2,0x88,0x9c,0xe1,0xcd,0x2e,0xe0,0x2b,0x1b,0xcf,0x86,0xc5,0xe4,
+ 0x14,0x66,0xe3,0x5f,0x61,0xe2,0xf5,0x5e,0xe1,0x28,0x5e,0xe0,0xed,0x5d,0xcf,0x86,
+ 0xe5,0xb2,0x5d,0x64,0x95,0x5d,0x0b,0x00,0x83,0xe2,0xa7,0xf3,0xe1,0x80,0xf0,0xe0,
+ 0xfd,0xee,0xcf,0x86,0xd5,0x31,0xc4,0xe3,0xe2,0x47,0xe2,0x83,0x46,0xe1,0x32,0xc6,
+ 0xe0,0x2a,0x45,0xcf,0x86,0xe5,0x1c,0x43,0xe4,0x3d,0x40,0xe3,0x9f,0xb6,0xe2,0xf6,
+ 0xb5,0xe1,0xd1,0xb5,0xe0,0xaa,0xb5,0xcf,0x86,0xe5,0x77,0xb5,0x94,0x07,0x63,0x62,
+ 0xb5,0x07,0x00,0x07,0x00,0xe4,0x69,0xee,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x05,0x00,
+ 0xd2,0x0b,0xe1,0x78,0xdb,0xcf,0x86,0xcf,0x06,0x05,0x00,0xd1,0x0e,0xe0,0x67,0xdc,
+ 0xcf,0x86,0xe5,0x2c,0xdc,0xcf,0x06,0x11,0x00,0xd0,0x0b,0xcf,0x86,0xe5,0x67,0xdc,
+ 0xcf,0x06,0x13,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xe4,0x02,0xee,0xe3,
+ 0xeb,0xec,0xd2,0xa0,0xe1,0xa1,0xe0,0xd0,0x21,0xcf,0x86,0xe5,0xa2,0xdd,0xe4,0x1e,
+ 0xdd,0xe3,0xdc,0xdc,0xe2,0xbb,0xdc,0xe1,0xa9,0xdc,0x10,0x08,0x05,0xff,0xe4,0xb8,
+ 0xbd,0x00,0x05,0xff,0xe4,0xb8,0xb8,0x00,0xcf,0x86,0xd5,0x1c,0xe4,0xfe,0xde,0xe3,
+ 0xbd,0xde,0xe2,0x9c,0xde,0xe1,0x8b,0xde,0x10,0x08,0x05,0xff,0xe5,0x92,0xa2,0x00,
+ 0x05,0xff,0xe5,0x93,0xb6,0x00,0xd4,0x34,0xd3,0x18,0xe2,0x85,0xdf,0xe1,0x74,0xdf,
+ 0x10,0x09,0x05,0xff,0xf0,0xa1,0x9a,0xa8,0x00,0x05,0xff,0xf0,0xa1,0x9b,0xaa,0x00,
+ 0xe2,0xa5,0xdf,0x91,0x11,0x10,0x09,0x05,0xff,0xf0,0xa1,0x8d,0xaa,0x00,0x05,0xff,
+ 0xe5,0xac,0x88,0x00,0x05,0xff,0xe5,0xac,0xbe,0x00,0xe3,0xeb,0xdf,0xd2,0x14,0xe1,
+ 0xba,0xdf,0x10,0x08,0x05,0xff,0xe5,0xaf,0xb3,0x00,0x05,0xff,0xf0,0xa1,0xac,0x98,
+ 0x00,0xe1,0xc6,0xdf,0x10,0x08,0x05,0xff,0xe5,0xbc,0xb3,0x00,0x05,0xff,0xe5,0xb0,
+ 0xa2,0x00,0xd1,0xd5,0xd0,0x6a,0xcf,0x86,0xe5,0x1b,0xe5,0xd4,0x19,0xe3,0x54,0xe4,
+ 0xe2,0x32,0xe4,0xe1,0x21,0xe4,0x10,0x08,0x05,0xff,0xe6,0xb4,0xbe,0x00,0x05,0xff,
+ 0xe6,0xb5,0xb7,0x00,0xd3,0x18,0xe2,0x9e,0xe4,0xe1,0x8d,0xe4,0x10,0x09,0x05,0xff,
+ 0xf0,0xa3,0xbd,0x9e,0x00,0x05,0xff,0xf0,0xa3,0xbe,0x8e,0x00,0xd2,0x13,0xe1,0xb6,
+ 0xe4,0x10,0x08,0x05,0xff,0xe7,0x81,0xbd,0x00,0x05,0xff,0xe7,0x81,0xb7,0x00,0xd1,
+ 0x11,0x10,0x08,0x05,0xff,0xe7,0x85,0x85,0x00,0x05,0xff,0xf0,0xa4,0x89,0xa3,0x00,
+ 0x10,0x08,0x05,0xff,0xe7,0x86,0x9c,0x00,0x05,0xff,0xe4,0x8e,0xab,0x00,0xcf,0x86,
+ 0xe5,0xb8,0xe6,0xd4,0x1a,0xe3,0xf0,0xe5,0xe2,0xd6,0xe5,0xe1,0xc3,0xe5,0x10,0x08,
+ 0x05,0xff,0xe7,0x9b,0xb4,0x00,0x05,0xff,0xf0,0xa5,0x83,0xb3,0x00,0xd3,0x16,0xe2,
+ 0x38,0xe6,0xe1,0x26,0xe6,0x10,0x08,0x05,0xff,0xe7,0xa3,0x8c,0x00,0x05,0xff,0xe4,
+ 0x83,0xa3,0x00,0xd2,0x13,0xe1,0x54,0xe6,0x10,0x08,0x05,0xff,0xe4,0x84,0xaf,0x00,
+ 0x05,0xff,0xe7,0xa9,0x80,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa5,0xa5,0xbc,
+ 0x00,0x05,0xff,0xf0,0xa5,0xaa,0xa7,0x00,0x10,0x09,0x05,0xff,0xf0,0xa5,0xaa,0xa7,
+ 0x00,0x05,0xff,0xe7,0xaa,0xae,0x00,0xe0,0x6a,0xe9,0xcf,0x86,0xd5,0x1d,0xe4,0xdf,
+ 0xe7,0xe3,0x9b,0xe7,0xe2,0x79,0xe7,0xe1,0x68,0xe7,0x10,0x09,0x05,0xff,0xf0,0xa3,
+ 0x8d,0x9f,0x00,0x05,0xff,0xe4,0x8f,0x95,0x00,0xd4,0x19,0xe3,0x86,0xe8,0xe2,0x62,
+ 0xe8,0xe1,0x51,0xe8,0x10,0x08,0x05,0xff,0xe8,0x8d,0x93,0x00,0x05,0xff,0xe8,0x8f,
+ 0x8a,0x00,0xd3,0x18,0xe2,0xd1,0xe8,0xe1,0xc0,0xe8,0x10,0x09,0x05,0xff,0xf0,0xa6,
+ 0xbe,0xb1,0x00,0x05,0xff,0xf0,0xa7,0x83,0x92,0x00,0xd2,0x13,0xe1,0xe9,0xe8,0x10,
+ 0x08,0x05,0xff,0xe8,0x9a,0x88,0x00,0x05,0xff,0xe8,0x9c,0x8e,0x00,0xd1,0x10,0x10,
+ 0x08,0x05,0xff,0xe8,0x9c,0xa8,0x00,0x05,0xff,0xe8,0x9d,0xab,0x00,0x10,0x08,0x05,
+ 0xff,0xe8,0x9e,0x86,0x00,0x05,0xff,0xe4,0xb5,0x97,0x00,0x00,0x00,0x00,0x00,0x00,
+ /* nfdi_30200 */
+ 0x57,0x04,0x01,0x00,0xc6,0xd5,0x16,0xe4,0x82,0x53,0xe3,0xbb,0x4e,0xe2,0x34,0x49,
+ 0xc1,0xe0,0x60,0x47,0xcf,0x86,0x65,0x44,0x47,0x01,0x00,0xd4,0x2a,0xe3,0x1c,0x9a,
+ 0xe2,0xcb,0x99,0xe1,0x9e,0x87,0xe0,0xf8,0x6a,0xcf,0x86,0xc5,0xe4,0x57,0x63,0xe3,
+ 0xa2,0x5e,0xe2,0x38,0x5c,0xe1,0x6b,0x5b,0xe0,0x30,0x5b,0xcf,0x86,0xe5,0xf5,0x5a,
+ 0x64,0xd8,0x5a,0x0b,0x00,0x83,0xe2,0xea,0xf0,0xe1,0xc3,0xed,0xe0,0x40,0xec,0xcf,
+ 0x86,0xd5,0x31,0xc4,0xe3,0xbb,0xc6,0xe2,0x94,0xc4,0xe1,0x75,0xc3,0xe0,0x05,0xba,
+ 0xcf,0x86,0xe5,0xf8,0xb5,0xe4,0xf1,0xb4,0xe3,0xe2,0xb3,0xe2,0x39,0xb3,0xe1,0x14,
+ 0xb3,0xe0,0xed,0xb2,0xcf,0x86,0xe5,0xba,0xb2,0x94,0x07,0x63,0xa5,0xb2,0x07,0x00,
+ 0x07,0x00,0xe4,0xac,0xeb,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x05,0x00,0xd2,0x0b,0xe1,
+ 0xbb,0xd8,0xcf,0x86,0xcf,0x06,0x05,0x00,0xd1,0x0e,0xe0,0xaa,0xd9,0xcf,0x86,0xe5,
+ 0x6f,0xd9,0xcf,0x06,0x11,0x00,0xd0,0x0b,0xcf,0x86,0xe5,0xaa,0xd9,0xcf,0x06,0x13,
+ 0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xe4,0x45,0xeb,0xe3,0x2e,0xea,0xd2,
+ 0xa0,0xe1,0xe4,0xdd,0xd0,0x21,0xcf,0x86,0xe5,0xe5,0xda,0xe4,0x61,0xda,0xe3,0x1f,
+ 0xda,0xe2,0xfe,0xd9,0xe1,0xec,0xd9,0x10,0x08,0x05,0xff,0xe4,0xb8,0xbd,0x00,0x05,
+ 0xff,0xe4,0xb8,0xb8,0x00,0xcf,0x86,0xd5,0x1c,0xe4,0x41,0xdc,0xe3,0x00,0xdc,0xe2,
+ 0xdf,0xdb,0xe1,0xce,0xdb,0x10,0x08,0x05,0xff,0xe5,0x92,0xa2,0x00,0x05,0xff,0xe5,
+ 0x93,0xb6,0x00,0xd4,0x34,0xd3,0x18,0xe2,0xc8,0xdc,0xe1,0xb7,0xdc,0x10,0x09,0x05,
+ 0xff,0xf0,0xa1,0x9a,0xa8,0x00,0x05,0xff,0xf0,0xa1,0x9b,0xaa,0x00,0xe2,0xe8,0xdc,
+ 0x91,0x11,0x10,0x09,0x05,0xff,0xf0,0xa1,0x8d,0xaa,0x00,0x05,0xff,0xe5,0xac,0x88,
+ 0x00,0x05,0xff,0xe5,0xac,0xbe,0x00,0xe3,0x2e,0xdd,0xd2,0x14,0xe1,0xfd,0xdc,0x10,
+ 0x08,0x05,0xff,0xe5,0xaf,0xb3,0x00,0x05,0xff,0xf0,0xa1,0xac,0x98,0x00,0xe1,0x09,
+ 0xdd,0x10,0x08,0x05,0xff,0xe5,0xbc,0xb3,0x00,0x05,0xff,0xe5,0xb0,0xa2,0x00,0xd1,
+ 0xd5,0xd0,0x6a,0xcf,0x86,0xe5,0x5e,0xe2,0xd4,0x19,0xe3,0x97,0xe1,0xe2,0x75,0xe1,
+ 0xe1,0x64,0xe1,0x10,0x08,0x05,0xff,0xe6,0xb4,0xbe,0x00,0x05,0xff,0xe6,0xb5,0xb7,
+ 0x00,0xd3,0x18,0xe2,0xe1,0xe1,0xe1,0xd0,0xe1,0x10,0x09,0x05,0xff,0xf0,0xa3,0xbd,
+ 0x9e,0x00,0x05,0xff,0xf0,0xa3,0xbe,0x8e,0x00,0xd2,0x13,0xe1,0xf9,0xe1,0x10,0x08,
+ 0x05,0xff,0xe7,0x81,0xbd,0x00,0x05,0xff,0xe7,0x81,0xb7,0x00,0xd1,0x11,0x10,0x08,
+ 0x05,0xff,0xe7,0x85,0x85,0x00,0x05,0xff,0xf0,0xa4,0x89,0xa3,0x00,0x10,0x08,0x05,
+ 0xff,0xe7,0x86,0x9c,0x00,0x05,0xff,0xe4,0x8e,0xab,0x00,0xcf,0x86,0xe5,0xfb,0xe3,
+ 0xd4,0x1a,0xe3,0x33,0xe3,0xe2,0x19,0xe3,0xe1,0x06,0xe3,0x10,0x08,0x05,0xff,0xe7,
+ 0x9b,0xb4,0x00,0x05,0xff,0xf0,0xa5,0x83,0xb3,0x00,0xd3,0x16,0xe2,0x7b,0xe3,0xe1,
+ 0x69,0xe3,0x10,0x08,0x05,0xff,0xe7,0xa3,0x8c,0x00,0x05,0xff,0xe4,0x83,0xa3,0x00,
+ 0xd2,0x13,0xe1,0x97,0xe3,0x10,0x08,0x05,0xff,0xe4,0x84,0xaf,0x00,0x05,0xff,0xe7,
+ 0xa9,0x80,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa5,0xa5,0xbc,0x00,0x05,0xff,
+ 0xf0,0xa5,0xaa,0xa7,0x00,0x10,0x09,0x05,0xff,0xf0,0xa5,0xaa,0xa7,0x00,0x05,0xff,
+ 0xe7,0xaa,0xae,0x00,0xe0,0xad,0xe6,0xcf,0x86,0xd5,0x1d,0xe4,0x22,0xe5,0xe3,0xde,
+ 0xe4,0xe2,0xbc,0xe4,0xe1,0xab,0xe4,0x10,0x09,0x05,0xff,0xf0,0xa3,0x8d,0x9f,0x00,
+ 0x05,0xff,0xe4,0x8f,0x95,0x00,0xd4,0x19,0xe3,0xc9,0xe5,0xe2,0xa5,0xe5,0xe1,0x94,
+ 0xe5,0x10,0x08,0x05,0xff,0xe8,0x8d,0x93,0x00,0x05,0xff,0xe8,0x8f,0x8a,0x00,0xd3,
+ 0x18,0xe2,0x14,0xe6,0xe1,0x03,0xe6,0x10,0x09,0x05,0xff,0xf0,0xa6,0xbe,0xb1,0x00,
+ 0x05,0xff,0xf0,0xa7,0x83,0x92,0x00,0xd2,0x13,0xe1,0x2c,0xe6,0x10,0x08,0x05,0xff,
+ 0xe8,0x9a,0x88,0x00,0x05,0xff,0xe8,0x9c,0x8e,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,
+ 0xe8,0x9c,0xa8,0x00,0x05,0xff,0xe8,0x9d,0xab,0x00,0x10,0x08,0x05,0xff,0xe8,0x9e,
+ 0x86,0x00,0x05,0xff,0xe4,0xb5,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ /* nfdicf_c0100 */
+ 0xd7,0xb0,0x56,0x04,0x01,0x00,0x95,0xa8,0xd4,0x5e,0xd3,0x2e,0xd2,0x16,0xd1,0x0a,
+ 0x10,0x04,0x01,0x00,0x01,0xff,0x61,0x00,0x10,0x06,0x01,0xff,0x62,0x00,0x01,0xff,
+ 0x63,0x00,0xd1,0x0c,0x10,0x06,0x01,0xff,0x64,0x00,0x01,0xff,0x65,0x00,0x10,0x06,
+ 0x01,0xff,0x66,0x00,0x01,0xff,0x67,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x06,0x01,0xff,
+ 0x68,0x00,0x01,0xff,0x69,0x00,0x10,0x06,0x01,0xff,0x6a,0x00,0x01,0xff,0x6b,0x00,
+ 0xd1,0x0c,0x10,0x06,0x01,0xff,0x6c,0x00,0x01,0xff,0x6d,0x00,0x10,0x06,0x01,0xff,
+ 0x6e,0x00,0x01,0xff,0x6f,0x00,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x06,0x01,0xff,
+ 0x70,0x00,0x01,0xff,0x71,0x00,0x10,0x06,0x01,0xff,0x72,0x00,0x01,0xff,0x73,0x00,
+ 0xd1,0x0c,0x10,0x06,0x01,0xff,0x74,0x00,0x01,0xff,0x75,0x00,0x10,0x06,0x01,0xff,
+ 0x76,0x00,0x01,0xff,0x77,0x00,0x92,0x16,0xd1,0x0c,0x10,0x06,0x01,0xff,0x78,0x00,
+ 0x01,0xff,0x79,0x00,0x10,0x06,0x01,0xff,0x7a,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0xc6,0xe5,0xf9,0x14,0xe4,0x6f,0x0d,0xe3,0x39,0x08,0xe2,0x22,0x01,0xc1,0xd0,0x24,
+ 0xcf,0x86,0x55,0x04,0x01,0x00,0xd4,0x07,0x63,0xd8,0x43,0x01,0x00,0x93,0x13,0x52,
+ 0x04,0x01,0x00,0x91,0x0b,0x10,0x04,0x01,0x00,0x01,0xff,0xce,0xbc,0x00,0x01,0x00,
+ 0x01,0x00,0xcf,0x86,0xe5,0xb3,0x44,0xd4,0x7f,0xd3,0x3f,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x61,0xcc,0x80,0x00,0x01,0xff,0x61,0xcc,0x81,0x00,0x10,0x08,0x01,
+ 0xff,0x61,0xcc,0x82,0x00,0x01,0xff,0x61,0xcc,0x83,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x61,0xcc,0x88,0x00,0x01,0xff,0x61,0xcc,0x8a,0x00,0x10,0x07,0x01,0xff,0xc3,
+ 0xa6,0x00,0x01,0xff,0x63,0xcc,0xa7,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0x65,0xcc,0x80,0x00,0x01,0xff,0x65,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x65,0xcc,
+ 0x82,0x00,0x01,0xff,0x65,0xcc,0x88,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x69,0xcc,
+ 0x80,0x00,0x01,0xff,0x69,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x69,0xcc,0x82,0x00,
+ 0x01,0xff,0x69,0xcc,0x88,0x00,0xd3,0x3b,0xd2,0x1f,0xd1,0x0f,0x10,0x07,0x01,0xff,
+ 0xc3,0xb0,0x00,0x01,0xff,0x6e,0xcc,0x83,0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x80,
+ 0x00,0x01,0xff,0x6f,0xcc,0x81,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6f,0xcc,0x82,
+ 0x00,0x01,0xff,0x6f,0xcc,0x83,0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x88,0x00,0x01,
+ 0x00,0xd2,0x1f,0xd1,0x0f,0x10,0x07,0x01,0xff,0xc3,0xb8,0x00,0x01,0xff,0x75,0xcc,
+ 0x80,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0x81,0x00,0x01,0xff,0x75,0xcc,0x82,0x00,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0x75,0xcc,0x88,0x00,0x01,0xff,0x79,0xcc,0x81,0x00,
+ 0x10,0x07,0x01,0xff,0xc3,0xbe,0x00,0x01,0xff,0x73,0x73,0x00,0xe1,0xd4,0x03,0xe0,
+ 0xeb,0x01,0xcf,0x86,0xd5,0xfb,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0x61,0xcc,0x84,0x00,0x01,0xff,0x61,0xcc,0x84,0x00,0x10,0x08,0x01,0xff,
+ 0x61,0xcc,0x86,0x00,0x01,0xff,0x61,0xcc,0x86,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0x61,0xcc,0xa8,0x00,0x01,0xff,0x61,0xcc,0xa8,0x00,0x10,0x08,0x01,0xff,0x63,0xcc,
+ 0x81,0x00,0x01,0xff,0x63,0xcc,0x81,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0x63,0xcc,0x82,0x00,0x01,0xff,0x63,0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x63,0xcc,
+ 0x87,0x00,0x01,0xff,0x63,0xcc,0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x63,0xcc,
+ 0x8c,0x00,0x01,0xff,0x63,0xcc,0x8c,0x00,0x10,0x08,0x01,0xff,0x64,0xcc,0x8c,0x00,
+ 0x01,0xff,0x64,0xcc,0x8c,0x00,0xd3,0x3b,0xd2,0x1b,0xd1,0x0b,0x10,0x07,0x01,0xff,
+ 0xc4,0x91,0x00,0x01,0x00,0x10,0x08,0x01,0xff,0x65,0xcc,0x84,0x00,0x01,0xff,0x65,
+ 0xcc,0x84,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x65,0xcc,0x86,0x00,0x01,0xff,0x65,
+ 0xcc,0x86,0x00,0x10,0x08,0x01,0xff,0x65,0xcc,0x87,0x00,0x01,0xff,0x65,0xcc,0x87,
+ 0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x65,0xcc,0xa8,0x00,0x01,0xff,0x65,
+ 0xcc,0xa8,0x00,0x10,0x08,0x01,0xff,0x65,0xcc,0x8c,0x00,0x01,0xff,0x65,0xcc,0x8c,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x67,0xcc,0x82,0x00,0x01,0xff,0x67,0xcc,0x82,
+ 0x00,0x10,0x08,0x01,0xff,0x67,0xcc,0x86,0x00,0x01,0xff,0x67,0xcc,0x86,0x00,0xd4,
+ 0x7b,0xd3,0x3b,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x67,0xcc,0x87,0x00,0x01,
+ 0xff,0x67,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x67,0xcc,0xa7,0x00,0x01,0xff,0x67,
+ 0xcc,0xa7,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x68,0xcc,0x82,0x00,0x01,0xff,0x68,
+ 0xcc,0x82,0x00,0x10,0x07,0x01,0xff,0xc4,0xa7,0x00,0x01,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0x69,0xcc,0x83,0x00,0x01,0xff,0x69,0xcc,0x83,0x00,0x10,0x08,
+ 0x01,0xff,0x69,0xcc,0x84,0x00,0x01,0xff,0x69,0xcc,0x84,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0x69,0xcc,0x86,0x00,0x01,0xff,0x69,0xcc,0x86,0x00,0x10,0x08,0x01,0xff,
+ 0x69,0xcc,0xa8,0x00,0x01,0xff,0x69,0xcc,0xa8,0x00,0xd3,0x37,0xd2,0x17,0xd1,0x0c,
+ 0x10,0x08,0x01,0xff,0x69,0xcc,0x87,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xc4,0xb3,
+ 0x00,0x01,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6a,0xcc,0x82,0x00,0x01,0xff,0x6a,
+ 0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x6b,0xcc,0xa7,0x00,0x01,0xff,0x6b,0xcc,0xa7,
+ 0x00,0xd2,0x1c,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0x6c,0xcc,0x81,0x00,0x10,
+ 0x08,0x01,0xff,0x6c,0xcc,0x81,0x00,0x01,0xff,0x6c,0xcc,0xa7,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x6c,0xcc,0xa7,0x00,0x01,0xff,0x6c,0xcc,0x8c,0x00,0x10,0x08,0x01,
+ 0xff,0x6c,0xcc,0x8c,0x00,0x01,0xff,0xc5,0x80,0x00,0xcf,0x86,0xd5,0xed,0xd4,0x72,
+ 0xd3,0x37,0xd2,0x17,0xd1,0x0b,0x10,0x04,0x01,0x00,0x01,0xff,0xc5,0x82,0x00,0x10,
+ 0x04,0x01,0x00,0x01,0xff,0x6e,0xcc,0x81,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6e,
+ 0xcc,0x81,0x00,0x01,0xff,0x6e,0xcc,0xa7,0x00,0x10,0x08,0x01,0xff,0x6e,0xcc,0xa7,
+ 0x00,0x01,0xff,0x6e,0xcc,0x8c,0x00,0xd2,0x1b,0xd1,0x10,0x10,0x08,0x01,0xff,0x6e,
+ 0xcc,0x8c,0x00,0x01,0xff,0xca,0xbc,0x6e,0x00,0x10,0x07,0x01,0xff,0xc5,0x8b,0x00,
+ 0x01,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6f,0xcc,0x84,0x00,0x01,0xff,0x6f,0xcc,
+ 0x84,0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x86,0x00,0x01,0xff,0x6f,0xcc,0x86,0x00,
+ 0xd3,0x3b,0xd2,0x1b,0xd1,0x10,0x10,0x08,0x01,0xff,0x6f,0xcc,0x8b,0x00,0x01,0xff,
+ 0x6f,0xcc,0x8b,0x00,0x10,0x07,0x01,0xff,0xc5,0x93,0x00,0x01,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x72,0xcc,0x81,0x00,0x01,0xff,0x72,0xcc,0x81,0x00,0x10,0x08,0x01,
+ 0xff,0x72,0xcc,0xa7,0x00,0x01,0xff,0x72,0xcc,0xa7,0x00,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x72,0xcc,0x8c,0x00,0x01,0xff,0x72,0xcc,0x8c,0x00,0x10,0x08,0x01,
+ 0xff,0x73,0xcc,0x81,0x00,0x01,0xff,0x73,0xcc,0x81,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x73,0xcc,0x82,0x00,0x01,0xff,0x73,0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x73,
+ 0xcc,0xa7,0x00,0x01,0xff,0x73,0xcc,0xa7,0x00,0xd4,0x7b,0xd3,0x3b,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x73,0xcc,0x8c,0x00,0x01,0xff,0x73,0xcc,0x8c,0x00,0x10,
+ 0x08,0x01,0xff,0x74,0xcc,0xa7,0x00,0x01,0xff,0x74,0xcc,0xa7,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x74,0xcc,0x8c,0x00,0x01,0xff,0x74,0xcc,0x8c,0x00,0x10,0x07,0x01,
+ 0xff,0xc5,0xa7,0x00,0x01,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x75,0xcc,
+ 0x83,0x00,0x01,0xff,0x75,0xcc,0x83,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0x84,0x00,
+ 0x01,0xff,0x75,0xcc,0x84,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x75,0xcc,0x86,0x00,
+ 0x01,0xff,0x75,0xcc,0x86,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0x8a,0x00,0x01,0xff,
+ 0x75,0xcc,0x8a,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x75,0xcc,
+ 0x8b,0x00,0x01,0xff,0x75,0xcc,0x8b,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0xa8,0x00,
+ 0x01,0xff,0x75,0xcc,0xa8,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x77,0xcc,0x82,0x00,
+ 0x01,0xff,0x77,0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x79,0xcc,0x82,0x00,0x01,0xff,
+ 0x79,0xcc,0x82,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x79,0xcc,0x88,0x00,
+ 0x01,0xff,0x7a,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x7a,0xcc,0x81,0x00,0x01,0xff,
+ 0x7a,0xcc,0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x7a,0xcc,0x87,0x00,0x01,0xff,
+ 0x7a,0xcc,0x8c,0x00,0x10,0x08,0x01,0xff,0x7a,0xcc,0x8c,0x00,0x01,0xff,0x73,0x00,
+ 0xe0,0x65,0x01,0xcf,0x86,0xd5,0xb4,0xd4,0x5a,0xd3,0x2f,0xd2,0x16,0xd1,0x0b,0x10,
+ 0x04,0x01,0x00,0x01,0xff,0xc9,0x93,0x00,0x10,0x07,0x01,0xff,0xc6,0x83,0x00,0x01,
+ 0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xc6,0x85,0x00,0x01,0x00,0x10,0x07,0x01,0xff,
+ 0xc9,0x94,0x00,0x01,0xff,0xc6,0x88,0x00,0xd2,0x19,0xd1,0x0b,0x10,0x04,0x01,0x00,
+ 0x01,0xff,0xc9,0x96,0x00,0x10,0x07,0x01,0xff,0xc9,0x97,0x00,0x01,0xff,0xc6,0x8c,
+ 0x00,0x51,0x04,0x01,0x00,0x10,0x07,0x01,0xff,0xc7,0x9d,0x00,0x01,0xff,0xc9,0x99,
+ 0x00,0xd3,0x32,0xd2,0x19,0xd1,0x0e,0x10,0x07,0x01,0xff,0xc9,0x9b,0x00,0x01,0xff,
+ 0xc6,0x92,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0xc9,0xa0,0x00,0xd1,0x0b,0x10,0x07,
+ 0x01,0xff,0xc9,0xa3,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xc9,0xa9,0x00,0x01,0xff,
+ 0xc9,0xa8,0x00,0xd2,0x0f,0x91,0x0b,0x10,0x07,0x01,0xff,0xc6,0x99,0x00,0x01,0x00,
+ 0x01,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xc9,0xaf,0x00,0x01,0xff,0xc9,0xb2,0x00,
+ 0x10,0x04,0x01,0x00,0x01,0xff,0xc9,0xb5,0x00,0xd4,0x5d,0xd3,0x34,0xd2,0x1b,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x6f,0xcc,0x9b,0x00,0x01,0xff,0x6f,0xcc,0x9b,0x00,0x10,
+ 0x07,0x01,0xff,0xc6,0xa3,0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xc6,0xa5,
+ 0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xca,0x80,0x00,0x01,0xff,0xc6,0xa8,0x00,0xd2,
+ 0x0f,0x91,0x0b,0x10,0x04,0x01,0x00,0x01,0xff,0xca,0x83,0x00,0x01,0x00,0xd1,0x0b,
+ 0x10,0x07,0x01,0xff,0xc6,0xad,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xca,0x88,0x00,
+ 0x01,0xff,0x75,0xcc,0x9b,0x00,0xd3,0x33,0xd2,0x1d,0xd1,0x0f,0x10,0x08,0x01,0xff,
+ 0x75,0xcc,0x9b,0x00,0x01,0xff,0xca,0x8a,0x00,0x10,0x07,0x01,0xff,0xca,0x8b,0x00,
+ 0x01,0xff,0xc6,0xb4,0x00,0xd1,0x0b,0x10,0x04,0x01,0x00,0x01,0xff,0xc6,0xb6,0x00,
+ 0x10,0x04,0x01,0x00,0x01,0xff,0xca,0x92,0x00,0xd2,0x0f,0x91,0x0b,0x10,0x07,0x01,
+ 0xff,0xc6,0xb9,0x00,0x01,0x00,0x01,0x00,0x91,0x0b,0x10,0x07,0x01,0xff,0xc6,0xbd,
+ 0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,0xd4,0xd4,0x44,0xd3,0x16,0x52,0x04,0x01,
+ 0x00,0x51,0x07,0x01,0xff,0xc7,0x86,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0xc7,0x89,
+ 0x00,0xd2,0x12,0x91,0x0b,0x10,0x07,0x01,0xff,0xc7,0x89,0x00,0x01,0x00,0x01,0xff,
+ 0xc7,0x8c,0x00,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0x61,0xcc,0x8c,0x00,0x10,
+ 0x08,0x01,0xff,0x61,0xcc,0x8c,0x00,0x01,0xff,0x69,0xcc,0x8c,0x00,0xd3,0x46,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x69,0xcc,0x8c,0x00,0x01,0xff,0x6f,0xcc,0x8c,
+ 0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x8c,0x00,0x01,0xff,0x75,0xcc,0x8c,0x00,0xd1,
+ 0x12,0x10,0x08,0x01,0xff,0x75,0xcc,0x8c,0x00,0x01,0xff,0x75,0xcc,0x88,0xcc,0x84,
+ 0x00,0x10,0x0a,0x01,0xff,0x75,0xcc,0x88,0xcc,0x84,0x00,0x01,0xff,0x75,0xcc,0x88,
+ 0xcc,0x81,0x00,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x75,0xcc,0x88,0xcc,0x81,
+ 0x00,0x01,0xff,0x75,0xcc,0x88,0xcc,0x8c,0x00,0x10,0x0a,0x01,0xff,0x75,0xcc,0x88,
+ 0xcc,0x8c,0x00,0x01,0xff,0x75,0xcc,0x88,0xcc,0x80,0x00,0xd1,0x0e,0x10,0x0a,0x01,
+ 0xff,0x75,0xcc,0x88,0xcc,0x80,0x00,0x01,0x00,0x10,0x0a,0x01,0xff,0x61,0xcc,0x88,
+ 0xcc,0x84,0x00,0x01,0xff,0x61,0xcc,0x88,0xcc,0x84,0x00,0xd4,0x87,0xd3,0x41,0xd2,
+ 0x26,0xd1,0x14,0x10,0x0a,0x01,0xff,0x61,0xcc,0x87,0xcc,0x84,0x00,0x01,0xff,0x61,
+ 0xcc,0x87,0xcc,0x84,0x00,0x10,0x09,0x01,0xff,0xc3,0xa6,0xcc,0x84,0x00,0x01,0xff,
+ 0xc3,0xa6,0xcc,0x84,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xc7,0xa5,0x00,0x01,0x00,
+ 0x10,0x08,0x01,0xff,0x67,0xcc,0x8c,0x00,0x01,0xff,0x67,0xcc,0x8c,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0x6b,0xcc,0x8c,0x00,0x01,0xff,0x6b,0xcc,0x8c,0x00,
+ 0x10,0x08,0x01,0xff,0x6f,0xcc,0xa8,0x00,0x01,0xff,0x6f,0xcc,0xa8,0x00,0xd1,0x14,
+ 0x10,0x0a,0x01,0xff,0x6f,0xcc,0xa8,0xcc,0x84,0x00,0x01,0xff,0x6f,0xcc,0xa8,0xcc,
+ 0x84,0x00,0x10,0x09,0x01,0xff,0xca,0x92,0xcc,0x8c,0x00,0x01,0xff,0xca,0x92,0xcc,
+ 0x8c,0x00,0xd3,0x38,0xd2,0x1a,0xd1,0x0f,0x10,0x08,0x01,0xff,0x6a,0xcc,0x8c,0x00,
+ 0x01,0xff,0xc7,0xb3,0x00,0x10,0x07,0x01,0xff,0xc7,0xb3,0x00,0x01,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0x67,0xcc,0x81,0x00,0x01,0xff,0x67,0xcc,0x81,0x00,0x10,0x07,
+ 0x04,0xff,0xc6,0x95,0x00,0x04,0xff,0xc6,0xbf,0x00,0xd2,0x24,0xd1,0x10,0x10,0x08,
+ 0x04,0xff,0x6e,0xcc,0x80,0x00,0x04,0xff,0x6e,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,
+ 0x61,0xcc,0x8a,0xcc,0x81,0x00,0x01,0xff,0x61,0xcc,0x8a,0xcc,0x81,0x00,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xc3,0xa6,0xcc,0x81,0x00,0x01,0xff,0xc3,0xa6,0xcc,0x81,0x00,
+ 0x10,0x09,0x01,0xff,0xc3,0xb8,0xcc,0x81,0x00,0x01,0xff,0xc3,0xb8,0xcc,0x81,0x00,
+ 0xe2,0x31,0x02,0xe1,0xc3,0x44,0xe0,0xc8,0x01,0xcf,0x86,0xd5,0xfb,0xd4,0x80,0xd3,
+ 0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x61,0xcc,0x8f,0x00,0x01,0xff,0x61,
+ 0xcc,0x8f,0x00,0x10,0x08,0x01,0xff,0x61,0xcc,0x91,0x00,0x01,0xff,0x61,0xcc,0x91,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x65,0xcc,0x8f,0x00,0x01,0xff,0x65,0xcc,0x8f,
+ 0x00,0x10,0x08,0x01,0xff,0x65,0xcc,0x91,0x00,0x01,0xff,0x65,0xcc,0x91,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x69,0xcc,0x8f,0x00,0x01,0xff,0x69,0xcc,0x8f,
+ 0x00,0x10,0x08,0x01,0xff,0x69,0xcc,0x91,0x00,0x01,0xff,0x69,0xcc,0x91,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x6f,0xcc,0x8f,0x00,0x01,0xff,0x6f,0xcc,0x8f,0x00,0x10,
+ 0x08,0x01,0xff,0x6f,0xcc,0x91,0x00,0x01,0xff,0x6f,0xcc,0x91,0x00,0xd3,0x40,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x72,0xcc,0x8f,0x00,0x01,0xff,0x72,0xcc,0x8f,
+ 0x00,0x10,0x08,0x01,0xff,0x72,0xcc,0x91,0x00,0x01,0xff,0x72,0xcc,0x91,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x75,0xcc,0x8f,0x00,0x01,0xff,0x75,0xcc,0x8f,0x00,0x10,
+ 0x08,0x01,0xff,0x75,0xcc,0x91,0x00,0x01,0xff,0x75,0xcc,0x91,0x00,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x04,0xff,0x73,0xcc,0xa6,0x00,0x04,0xff,0x73,0xcc,0xa6,0x00,0x10,
+ 0x08,0x04,0xff,0x74,0xcc,0xa6,0x00,0x04,0xff,0x74,0xcc,0xa6,0x00,0xd1,0x0b,0x10,
+ 0x07,0x04,0xff,0xc8,0x9d,0x00,0x04,0x00,0x10,0x08,0x04,0xff,0x68,0xcc,0x8c,0x00,
+ 0x04,0xff,0x68,0xcc,0x8c,0x00,0xd4,0x79,0xd3,0x31,0xd2,0x16,0xd1,0x0b,0x10,0x07,
+ 0x06,0xff,0xc6,0x9e,0x00,0x07,0x00,0x10,0x07,0x04,0xff,0xc8,0xa3,0x00,0x04,0x00,
+ 0xd1,0x0b,0x10,0x07,0x04,0xff,0xc8,0xa5,0x00,0x04,0x00,0x10,0x08,0x04,0xff,0x61,
+ 0xcc,0x87,0x00,0x04,0xff,0x61,0xcc,0x87,0x00,0xd2,0x24,0xd1,0x10,0x10,0x08,0x04,
+ 0xff,0x65,0xcc,0xa7,0x00,0x04,0xff,0x65,0xcc,0xa7,0x00,0x10,0x0a,0x04,0xff,0x6f,
+ 0xcc,0x88,0xcc,0x84,0x00,0x04,0xff,0x6f,0xcc,0x88,0xcc,0x84,0x00,0xd1,0x14,0x10,
+ 0x0a,0x04,0xff,0x6f,0xcc,0x83,0xcc,0x84,0x00,0x04,0xff,0x6f,0xcc,0x83,0xcc,0x84,
+ 0x00,0x10,0x08,0x04,0xff,0x6f,0xcc,0x87,0x00,0x04,0xff,0x6f,0xcc,0x87,0x00,0xd3,
+ 0x27,0xe2,0x21,0x43,0xd1,0x14,0x10,0x0a,0x04,0xff,0x6f,0xcc,0x87,0xcc,0x84,0x00,
+ 0x04,0xff,0x6f,0xcc,0x87,0xcc,0x84,0x00,0x10,0x08,0x04,0xff,0x79,0xcc,0x84,0x00,
+ 0x04,0xff,0x79,0xcc,0x84,0x00,0xd2,0x13,0x51,0x04,0x08,0x00,0x10,0x08,0x08,0xff,
+ 0xe2,0xb1,0xa5,0x00,0x08,0xff,0xc8,0xbc,0x00,0xd1,0x0b,0x10,0x04,0x08,0x00,0x08,
+ 0xff,0xc6,0x9a,0x00,0x10,0x08,0x08,0xff,0xe2,0xb1,0xa6,0x00,0x08,0x00,0xcf,0x86,
+ 0x95,0x5f,0x94,0x5b,0xd3,0x2f,0xd2,0x16,0xd1,0x0b,0x10,0x04,0x08,0x00,0x08,0xff,
+ 0xc9,0x82,0x00,0x10,0x04,0x09,0x00,0x09,0xff,0xc6,0x80,0x00,0xd1,0x0e,0x10,0x07,
+ 0x09,0xff,0xca,0x89,0x00,0x09,0xff,0xca,0x8c,0x00,0x10,0x07,0x09,0xff,0xc9,0x87,
+ 0x00,0x09,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x09,0xff,0xc9,0x89,0x00,0x09,0x00,
+ 0x10,0x07,0x09,0xff,0xc9,0x8b,0x00,0x09,0x00,0xd1,0x0b,0x10,0x07,0x09,0xff,0xc9,
+ 0x8d,0x00,0x09,0x00,0x10,0x07,0x09,0xff,0xc9,0x8f,0x00,0x09,0x00,0x01,0x00,0x01,
+ 0x00,0xd1,0x8b,0xd0,0x0c,0xcf,0x86,0xe5,0x10,0x43,0x64,0xef,0x42,0x01,0xe6,0xcf,
+ 0x86,0xd5,0x2a,0xe4,0x99,0x43,0xe3,0x7f,0x43,0xd2,0x11,0xe1,0x5e,0x43,0x10,0x07,
+ 0x01,0xff,0xcc,0x80,0x00,0x01,0xff,0xcc,0x81,0x00,0xe1,0x65,0x43,0x10,0x09,0x01,
+ 0xff,0xcc,0x88,0xcc,0x81,0x00,0x01,0xff,0xce,0xb9,0x00,0xd4,0x0f,0x93,0x0b,0x92,
+ 0x07,0x61,0xab,0x43,0x01,0xea,0x06,0xe6,0x06,0xe6,0xd3,0x2c,0xd2,0x16,0xd1,0x0b,
+ 0x10,0x07,0x0a,0xff,0xcd,0xb1,0x00,0x0a,0x00,0x10,0x07,0x0a,0xff,0xcd,0xb3,0x00,
+ 0x0a,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xca,0xb9,0x00,0x01,0x00,0x10,0x07,0x0a,
+ 0xff,0xcd,0xb7,0x00,0x0a,0x00,0xd2,0x07,0x61,0x97,0x43,0x00,0x00,0x51,0x04,0x09,
+ 0x00,0x10,0x06,0x01,0xff,0x3b,0x00,0x10,0xff,0xcf,0xb3,0x00,0xe0,0x31,0x01,0xcf,
+ 0x86,0xd5,0xd3,0xd4,0x5f,0xd3,0x21,0x52,0x04,0x00,0x00,0xd1,0x0d,0x10,0x04,0x01,
+ 0x00,0x01,0xff,0xc2,0xa8,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,0x81,
+ 0x00,0x01,0xff,0xc2,0xb7,0x00,0xd2,0x1f,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb5,
+ 0xcc,0x81,0x00,0x01,0xff,0xce,0xb7,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xce,0xb9,
+ 0xcc,0x81,0x00,0x00,0x00,0xd1,0x0d,0x10,0x09,0x01,0xff,0xce,0xbf,0xcc,0x81,0x00,
+ 0x00,0x00,0x10,0x09,0x01,0xff,0xcf,0x85,0xcc,0x81,0x00,0x01,0xff,0xcf,0x89,0xcc,
+ 0x81,0x00,0xd3,0x3c,0xd2,0x20,0xd1,0x12,0x10,0x0b,0x01,0xff,0xce,0xb9,0xcc,0x88,
+ 0xcc,0x81,0x00,0x01,0xff,0xce,0xb1,0x00,0x10,0x07,0x01,0xff,0xce,0xb2,0x00,0x01,
+ 0xff,0xce,0xb3,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xce,0xb4,0x00,0x01,0xff,0xce,
+ 0xb5,0x00,0x10,0x07,0x01,0xff,0xce,0xb6,0x00,0x01,0xff,0xce,0xb7,0x00,0xd2,0x1c,
+ 0xd1,0x0e,0x10,0x07,0x01,0xff,0xce,0xb8,0x00,0x01,0xff,0xce,0xb9,0x00,0x10,0x07,
+ 0x01,0xff,0xce,0xba,0x00,0x01,0xff,0xce,0xbb,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,
+ 0xce,0xbc,0x00,0x01,0xff,0xce,0xbd,0x00,0x10,0x07,0x01,0xff,0xce,0xbe,0x00,0x01,
+ 0xff,0xce,0xbf,0x00,0xe4,0x85,0x43,0xd3,0x35,0xd2,0x19,0xd1,0x0e,0x10,0x07,0x01,
+ 0xff,0xcf,0x80,0x00,0x01,0xff,0xcf,0x81,0x00,0x10,0x04,0x00,0x00,0x01,0xff,0xcf,
+ 0x83,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xcf,0x84,0x00,0x01,0xff,0xcf,0x85,0x00,
+ 0x10,0x07,0x01,0xff,0xcf,0x86,0x00,0x01,0xff,0xcf,0x87,0x00,0xe2,0x2b,0x43,0xd1,
+ 0x0e,0x10,0x07,0x01,0xff,0xcf,0x88,0x00,0x01,0xff,0xcf,0x89,0x00,0x10,0x09,0x01,
+ 0xff,0xce,0xb9,0xcc,0x88,0x00,0x01,0xff,0xcf,0x85,0xcc,0x88,0x00,0xcf,0x86,0xd5,
+ 0x94,0xd4,0x3c,0xd3,0x13,0x92,0x0f,0x51,0x04,0x01,0x00,0x10,0x07,0x01,0xff,0xcf,
+ 0x83,0x00,0x01,0x00,0x01,0x00,0xd2,0x07,0x61,0x3a,0x43,0x01,0x00,0xd1,0x12,0x10,
+ 0x09,0x01,0xff,0xce,0xbf,0xcc,0x81,0x00,0x01,0xff,0xcf,0x85,0xcc,0x81,0x00,0x10,
+ 0x09,0x01,0xff,0xcf,0x89,0xcc,0x81,0x00,0x0a,0xff,0xcf,0x97,0x00,0xd3,0x2c,0xd2,
+ 0x11,0xe1,0x46,0x43,0x10,0x07,0x01,0xff,0xce,0xb2,0x00,0x01,0xff,0xce,0xb8,0x00,
+ 0xd1,0x10,0x10,0x09,0x01,0xff,0xcf,0x92,0xcc,0x88,0x00,0x01,0xff,0xcf,0x86,0x00,
+ 0x10,0x07,0x01,0xff,0xcf,0x80,0x00,0x04,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x06,
+ 0xff,0xcf,0x99,0x00,0x06,0x00,0x10,0x07,0x01,0xff,0xcf,0x9b,0x00,0x04,0x00,0xd1,
+ 0x0b,0x10,0x07,0x01,0xff,0xcf,0x9d,0x00,0x04,0x00,0x10,0x07,0x01,0xff,0xcf,0x9f,
+ 0x00,0x04,0x00,0xd4,0x58,0xd3,0x2c,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xcf,
+ 0xa1,0x00,0x04,0x00,0x10,0x07,0x01,0xff,0xcf,0xa3,0x00,0x01,0x00,0xd1,0x0b,0x10,
+ 0x07,0x01,0xff,0xcf,0xa5,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xcf,0xa7,0x00,0x01,
+ 0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xcf,0xa9,0x00,0x01,0x00,0x10,0x07,
+ 0x01,0xff,0xcf,0xab,0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xcf,0xad,0x00,
+ 0x01,0x00,0x10,0x07,0x01,0xff,0xcf,0xaf,0x00,0x01,0x00,0xd3,0x2b,0xd2,0x12,0x91,
+ 0x0e,0x10,0x07,0x01,0xff,0xce,0xba,0x00,0x01,0xff,0xcf,0x81,0x00,0x01,0x00,0xd1,
+ 0x0e,0x10,0x07,0x05,0xff,0xce,0xb8,0x00,0x05,0xff,0xce,0xb5,0x00,0x10,0x04,0x06,
+ 0x00,0x07,0xff,0xcf,0xb8,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x04,0x07,0x00,0x07,0xff,
+ 0xcf,0xb2,0x00,0x10,0x07,0x07,0xff,0xcf,0xbb,0x00,0x07,0x00,0xd1,0x0b,0x10,0x04,
+ 0x08,0x00,0x08,0xff,0xcd,0xbb,0x00,0x10,0x07,0x08,0xff,0xcd,0xbc,0x00,0x08,0xff,
+ 0xcd,0xbd,0x00,0xe3,0xed,0x46,0xe2,0x3d,0x05,0xe1,0x27,0x02,0xe0,0x66,0x01,0xcf,
+ 0x86,0xd5,0xf0,0xd4,0x7e,0xd3,0x40,0xd2,0x22,0xd1,0x12,0x10,0x09,0x04,0xff,0xd0,
+ 0xb5,0xcc,0x80,0x00,0x01,0xff,0xd0,0xb5,0xcc,0x88,0x00,0x10,0x07,0x01,0xff,0xd1,
+ 0x92,0x00,0x01,0xff,0xd0,0xb3,0xcc,0x81,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd1,
+ 0x94,0x00,0x01,0xff,0xd1,0x95,0x00,0x10,0x07,0x01,0xff,0xd1,0x96,0x00,0x01,0xff,
+ 0xd1,0x96,0xcc,0x88,0x00,0xd2,0x1c,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd1,0x98,0x00,
+ 0x01,0xff,0xd1,0x99,0x00,0x10,0x07,0x01,0xff,0xd1,0x9a,0x00,0x01,0xff,0xd1,0x9b,
+ 0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xd0,0xba,0xcc,0x81,0x00,0x04,0xff,0xd0,0xb8,
+ 0xcc,0x80,0x00,0x10,0x09,0x01,0xff,0xd1,0x83,0xcc,0x86,0x00,0x01,0xff,0xd1,0x9f,
+ 0x00,0xd3,0x38,0xd2,0x1c,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd0,0xb0,0x00,0x01,0xff,
+ 0xd0,0xb1,0x00,0x10,0x07,0x01,0xff,0xd0,0xb2,0x00,0x01,0xff,0xd0,0xb3,0x00,0xd1,
+ 0x0e,0x10,0x07,0x01,0xff,0xd0,0xb4,0x00,0x01,0xff,0xd0,0xb5,0x00,0x10,0x07,0x01,
+ 0xff,0xd0,0xb6,0x00,0x01,0xff,0xd0,0xb7,0x00,0xd2,0x1e,0xd1,0x10,0x10,0x07,0x01,
+ 0xff,0xd0,0xb8,0x00,0x01,0xff,0xd0,0xb8,0xcc,0x86,0x00,0x10,0x07,0x01,0xff,0xd0,
+ 0xba,0x00,0x01,0xff,0xd0,0xbb,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd0,0xbc,0x00,
+ 0x01,0xff,0xd0,0xbd,0x00,0x10,0x07,0x01,0xff,0xd0,0xbe,0x00,0x01,0xff,0xd0,0xbf,
+ 0x00,0xe4,0x25,0x42,0xd3,0x38,0xd2,0x1c,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd1,0x80,
+ 0x00,0x01,0xff,0xd1,0x81,0x00,0x10,0x07,0x01,0xff,0xd1,0x82,0x00,0x01,0xff,0xd1,
+ 0x83,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd1,0x84,0x00,0x01,0xff,0xd1,0x85,0x00,
+ 0x10,0x07,0x01,0xff,0xd1,0x86,0x00,0x01,0xff,0xd1,0x87,0x00,0xd2,0x1c,0xd1,0x0e,
+ 0x10,0x07,0x01,0xff,0xd1,0x88,0x00,0x01,0xff,0xd1,0x89,0x00,0x10,0x07,0x01,0xff,
+ 0xd1,0x8a,0x00,0x01,0xff,0xd1,0x8b,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd1,0x8c,
+ 0x00,0x01,0xff,0xd1,0x8d,0x00,0x10,0x07,0x01,0xff,0xd1,0x8e,0x00,0x01,0xff,0xd1,
+ 0x8f,0x00,0xcf,0x86,0xd5,0x07,0x64,0xcf,0x41,0x01,0x00,0xd4,0x58,0xd3,0x2c,0xd2,
+ 0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd1,0xa1,0x00,0x01,0x00,0x10,0x07,0x01,0xff,
+ 0xd1,0xa3,0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd1,0xa5,0x00,0x01,0x00,
+ 0x10,0x07,0x01,0xff,0xd1,0xa7,0x00,0x01,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,
+ 0xff,0xd1,0xa9,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd1,0xab,0x00,0x01,0x00,0xd1,
+ 0x0b,0x10,0x07,0x01,0xff,0xd1,0xad,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd1,0xaf,
+ 0x00,0x01,0x00,0xd3,0x33,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd1,0xb1,0x00,
+ 0x01,0x00,0x10,0x07,0x01,0xff,0xd1,0xb3,0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,0x01,
+ 0xff,0xd1,0xb5,0x00,0x01,0x00,0x10,0x09,0x01,0xff,0xd1,0xb5,0xcc,0x8f,0x00,0x01,
+ 0xff,0xd1,0xb5,0xcc,0x8f,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd1,0xb9,
+ 0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd1,0xbb,0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,
+ 0x01,0xff,0xd1,0xbd,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd1,0xbf,0x00,0x01,0x00,
+ 0xe0,0x41,0x01,0xcf,0x86,0xd5,0x8e,0xd4,0x36,0xd3,0x11,0xe2,0x91,0x41,0xe1,0x88,
+ 0x41,0x10,0x07,0x01,0xff,0xd2,0x81,0x00,0x01,0x00,0xd2,0x0f,0x51,0x04,0x04,0x00,
+ 0x10,0x07,0x06,0xff,0xd2,0x8b,0x00,0x06,0x00,0xd1,0x0b,0x10,0x07,0x04,0xff,0xd2,
+ 0x8d,0x00,0x04,0x00,0x10,0x07,0x04,0xff,0xd2,0x8f,0x00,0x04,0x00,0xd3,0x2c,0xd2,
+ 0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd2,0x91,0x00,0x01,0x00,0x10,0x07,0x01,0xff,
+ 0xd2,0x93,0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd2,0x95,0x00,0x01,0x00,
+ 0x10,0x07,0x01,0xff,0xd2,0x97,0x00,0x01,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,
+ 0xff,0xd2,0x99,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0x9b,0x00,0x01,0x00,0xd1,
+ 0x0b,0x10,0x07,0x01,0xff,0xd2,0x9d,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0x9f,
+ 0x00,0x01,0x00,0xd4,0x58,0xd3,0x2c,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd2,
+ 0xa1,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0xa3,0x00,0x01,0x00,0xd1,0x0b,0x10,
+ 0x07,0x01,0xff,0xd2,0xa5,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0xa7,0x00,0x01,
+ 0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd2,0xa9,0x00,0x01,0x00,0x10,0x07,
+ 0x01,0xff,0xd2,0xab,0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd2,0xad,0x00,
+ 0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0xaf,0x00,0x01,0x00,0xd3,0x2c,0xd2,0x16,0xd1,
+ 0x0b,0x10,0x07,0x01,0xff,0xd2,0xb1,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0xb3,
+ 0x00,0x01,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd2,0xb5,0x00,0x01,0x00,0x10,0x07,
+ 0x01,0xff,0xd2,0xb7,0x00,0x01,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd2,
+ 0xb9,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0xbb,0x00,0x01,0x00,0xd1,0x0b,0x10,
+ 0x07,0x01,0xff,0xd2,0xbd,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xd2,0xbf,0x00,0x01,
+ 0x00,0xcf,0x86,0xd5,0xdc,0xd4,0x5a,0xd3,0x36,0xd2,0x20,0xd1,0x10,0x10,0x07,0x01,
+ 0xff,0xd3,0x8f,0x00,0x01,0xff,0xd0,0xb6,0xcc,0x86,0x00,0x10,0x09,0x01,0xff,0xd0,
+ 0xb6,0xcc,0x86,0x00,0x01,0xff,0xd3,0x84,0x00,0xd1,0x0b,0x10,0x04,0x01,0x00,0x06,
+ 0xff,0xd3,0x86,0x00,0x10,0x04,0x06,0x00,0x01,0xff,0xd3,0x88,0x00,0xd2,0x16,0xd1,
+ 0x0b,0x10,0x04,0x01,0x00,0x06,0xff,0xd3,0x8a,0x00,0x10,0x04,0x06,0x00,0x01,0xff,
+ 0xd3,0x8c,0x00,0xe1,0x69,0x40,0x10,0x04,0x01,0x00,0x06,0xff,0xd3,0x8e,0x00,0xd3,
+ 0x41,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xd0,0xb0,0xcc,0x86,0x00,0x01,0xff,
+ 0xd0,0xb0,0xcc,0x86,0x00,0x10,0x09,0x01,0xff,0xd0,0xb0,0xcc,0x88,0x00,0x01,0xff,
+ 0xd0,0xb0,0xcc,0x88,0x00,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd3,0x95,0x00,0x01,0x00,
+ 0x10,0x09,0x01,0xff,0xd0,0xb5,0xcc,0x86,0x00,0x01,0xff,0xd0,0xb5,0xcc,0x86,0x00,
+ 0xd2,0x1d,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd3,0x99,0x00,0x01,0x00,0x10,0x09,0x01,
+ 0xff,0xd3,0x99,0xcc,0x88,0x00,0x01,0xff,0xd3,0x99,0xcc,0x88,0x00,0xd1,0x12,0x10,
+ 0x09,0x01,0xff,0xd0,0xb6,0xcc,0x88,0x00,0x01,0xff,0xd0,0xb6,0xcc,0x88,0x00,0x10,
+ 0x09,0x01,0xff,0xd0,0xb7,0xcc,0x88,0x00,0x01,0xff,0xd0,0xb7,0xcc,0x88,0x00,0xd4,
+ 0x82,0xd3,0x41,0xd2,0x1d,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd3,0xa1,0x00,0x01,0x00,
+ 0x10,0x09,0x01,0xff,0xd0,0xb8,0xcc,0x84,0x00,0x01,0xff,0xd0,0xb8,0xcc,0x84,0x00,
+ 0xd1,0x12,0x10,0x09,0x01,0xff,0xd0,0xb8,0xcc,0x88,0x00,0x01,0xff,0xd0,0xb8,0xcc,
+ 0x88,0x00,0x10,0x09,0x01,0xff,0xd0,0xbe,0xcc,0x88,0x00,0x01,0xff,0xd0,0xbe,0xcc,
+ 0x88,0x00,0xd2,0x1d,0xd1,0x0b,0x10,0x07,0x01,0xff,0xd3,0xa9,0x00,0x01,0x00,0x10,
+ 0x09,0x01,0xff,0xd3,0xa9,0xcc,0x88,0x00,0x01,0xff,0xd3,0xa9,0xcc,0x88,0x00,0xd1,
+ 0x12,0x10,0x09,0x04,0xff,0xd1,0x8d,0xcc,0x88,0x00,0x04,0xff,0xd1,0x8d,0xcc,0x88,
+ 0x00,0x10,0x09,0x01,0xff,0xd1,0x83,0xcc,0x84,0x00,0x01,0xff,0xd1,0x83,0xcc,0x84,
+ 0x00,0xd3,0x41,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xd1,0x83,0xcc,0x88,0x00,
+ 0x01,0xff,0xd1,0x83,0xcc,0x88,0x00,0x10,0x09,0x01,0xff,0xd1,0x83,0xcc,0x8b,0x00,
+ 0x01,0xff,0xd1,0x83,0xcc,0x8b,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xd1,0x87,0xcc,
+ 0x88,0x00,0x01,0xff,0xd1,0x87,0xcc,0x88,0x00,0x10,0x07,0x08,0xff,0xd3,0xb7,0x00,
+ 0x08,0x00,0xd2,0x1d,0xd1,0x12,0x10,0x09,0x01,0xff,0xd1,0x8b,0xcc,0x88,0x00,0x01,
+ 0xff,0xd1,0x8b,0xcc,0x88,0x00,0x10,0x07,0x09,0xff,0xd3,0xbb,0x00,0x09,0x00,0xd1,
+ 0x0b,0x10,0x07,0x09,0xff,0xd3,0xbd,0x00,0x09,0x00,0x10,0x07,0x09,0xff,0xd3,0xbf,
+ 0x00,0x09,0x00,0xe1,0x26,0x02,0xe0,0x78,0x01,0xcf,0x86,0xd5,0xb0,0xd4,0x58,0xd3,
+ 0x2c,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x06,0xff,0xd4,0x81,0x00,0x06,0x00,0x10,0x07,
+ 0x06,0xff,0xd4,0x83,0x00,0x06,0x00,0xd1,0x0b,0x10,0x07,0x06,0xff,0xd4,0x85,0x00,
+ 0x06,0x00,0x10,0x07,0x06,0xff,0xd4,0x87,0x00,0x06,0x00,0xd2,0x16,0xd1,0x0b,0x10,
+ 0x07,0x06,0xff,0xd4,0x89,0x00,0x06,0x00,0x10,0x07,0x06,0xff,0xd4,0x8b,0x00,0x06,
+ 0x00,0xd1,0x0b,0x10,0x07,0x06,0xff,0xd4,0x8d,0x00,0x06,0x00,0x10,0x07,0x06,0xff,
+ 0xd4,0x8f,0x00,0x06,0x00,0xd3,0x2c,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x09,0xff,0xd4,
+ 0x91,0x00,0x09,0x00,0x10,0x07,0x09,0xff,0xd4,0x93,0x00,0x09,0x00,0xd1,0x0b,0x10,
+ 0x07,0x0a,0xff,0xd4,0x95,0x00,0x0a,0x00,0x10,0x07,0x0a,0xff,0xd4,0x97,0x00,0x0a,
+ 0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x0a,0xff,0xd4,0x99,0x00,0x0a,0x00,0x10,0x07,
+ 0x0a,0xff,0xd4,0x9b,0x00,0x0a,0x00,0xd1,0x0b,0x10,0x07,0x0a,0xff,0xd4,0x9d,0x00,
+ 0x0a,0x00,0x10,0x07,0x0a,0xff,0xd4,0x9f,0x00,0x0a,0x00,0xd4,0x58,0xd3,0x2c,0xd2,
+ 0x16,0xd1,0x0b,0x10,0x07,0x0a,0xff,0xd4,0xa1,0x00,0x0a,0x00,0x10,0x07,0x0a,0xff,
+ 0xd4,0xa3,0x00,0x0a,0x00,0xd1,0x0b,0x10,0x07,0x0b,0xff,0xd4,0xa5,0x00,0x0b,0x00,
+ 0x10,0x07,0x0c,0xff,0xd4,0xa7,0x00,0x0c,0x00,0xd2,0x16,0xd1,0x0b,0x10,0x07,0x10,
+ 0xff,0xd4,0xa9,0x00,0x10,0x00,0x10,0x07,0x10,0xff,0xd4,0xab,0x00,0x10,0x00,0xd1,
+ 0x0b,0x10,0x07,0x10,0xff,0xd4,0xad,0x00,0x10,0x00,0x10,0x07,0x10,0xff,0xd4,0xaf,
+ 0x00,0x10,0x00,0xd3,0x35,0xd2,0x19,0xd1,0x0b,0x10,0x04,0x00,0x00,0x01,0xff,0xd5,
+ 0xa1,0x00,0x10,0x07,0x01,0xff,0xd5,0xa2,0x00,0x01,0xff,0xd5,0xa3,0x00,0xd1,0x0e,
+ 0x10,0x07,0x01,0xff,0xd5,0xa4,0x00,0x01,0xff,0xd5,0xa5,0x00,0x10,0x07,0x01,0xff,
+ 0xd5,0xa6,0x00,0x01,0xff,0xd5,0xa7,0x00,0xd2,0x1c,0xd1,0x0e,0x10,0x07,0x01,0xff,
+ 0xd5,0xa8,0x00,0x01,0xff,0xd5,0xa9,0x00,0x10,0x07,0x01,0xff,0xd5,0xaa,0x00,0x01,
+ 0xff,0xd5,0xab,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd5,0xac,0x00,0x01,0xff,0xd5,
+ 0xad,0x00,0x10,0x07,0x01,0xff,0xd5,0xae,0x00,0x01,0xff,0xd5,0xaf,0x00,0xcf,0x86,
+ 0xe5,0x08,0x3f,0xd4,0x70,0xd3,0x38,0xd2,0x1c,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd5,
+ 0xb0,0x00,0x01,0xff,0xd5,0xb1,0x00,0x10,0x07,0x01,0xff,0xd5,0xb2,0x00,0x01,0xff,
+ 0xd5,0xb3,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd5,0xb4,0x00,0x01,0xff,0xd5,0xb5,
+ 0x00,0x10,0x07,0x01,0xff,0xd5,0xb6,0x00,0x01,0xff,0xd5,0xb7,0x00,0xd2,0x1c,0xd1,
+ 0x0e,0x10,0x07,0x01,0xff,0xd5,0xb8,0x00,0x01,0xff,0xd5,0xb9,0x00,0x10,0x07,0x01,
+ 0xff,0xd5,0xba,0x00,0x01,0xff,0xd5,0xbb,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd5,
+ 0xbc,0x00,0x01,0xff,0xd5,0xbd,0x00,0x10,0x07,0x01,0xff,0xd5,0xbe,0x00,0x01,0xff,
+ 0xd5,0xbf,0x00,0xe3,0x87,0x3e,0xd2,0x1c,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd6,0x80,
+ 0x00,0x01,0xff,0xd6,0x81,0x00,0x10,0x07,0x01,0xff,0xd6,0x82,0x00,0x01,0xff,0xd6,
+ 0x83,0x00,0xd1,0x0e,0x10,0x07,0x01,0xff,0xd6,0x84,0x00,0x01,0xff,0xd6,0x85,0x00,
+ 0x10,0x07,0x01,0xff,0xd6,0x86,0x00,0x00,0x00,0xe0,0x2f,0x3f,0xcf,0x86,0xe5,0xc0,
+ 0x3e,0xe4,0x97,0x3e,0xe3,0x76,0x3e,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,
+ 0x04,0x01,0x00,0x01,0xff,0xd5,0xa5,0xd6,0x82,0x00,0xe4,0x3e,0x25,0xe3,0xc3,0x1a,
+ 0xe2,0x7b,0x81,0xe1,0xc0,0x13,0xd0,0x1e,0xcf,0x86,0xc5,0xe4,0x08,0x4b,0xe3,0x53,
+ 0x46,0xe2,0xe9,0x43,0xe1,0x1c,0x43,0xe0,0xe1,0x42,0xcf,0x86,0xe5,0xa6,0x42,0x64,
+ 0x89,0x42,0x0b,0x00,0xcf,0x86,0xe5,0xfa,0x01,0xe4,0x03,0x56,0xe3,0x76,0x01,0xe2,
+ 0x8e,0x53,0xd1,0x0c,0xe0,0xef,0x52,0xcf,0x86,0x65,0x8d,0x52,0x04,0x00,0xe0,0x0d,
+ 0x01,0xcf,0x86,0xd5,0x0a,0xe4,0x10,0x53,0x63,0xff,0x52,0x0a,0x00,0xd4,0x80,0xd3,
+ 0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0x80,0x00,0x01,0xff,0xe2,
+ 0xb4,0x81,0x00,0x10,0x08,0x01,0xff,0xe2,0xb4,0x82,0x00,0x01,0xff,0xe2,0xb4,0x83,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0x84,0x00,0x01,0xff,0xe2,0xb4,0x85,
+ 0x00,0x10,0x08,0x01,0xff,0xe2,0xb4,0x86,0x00,0x01,0xff,0xe2,0xb4,0x87,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0x88,0x00,0x01,0xff,0xe2,0xb4,0x89,
+ 0x00,0x10,0x08,0x01,0xff,0xe2,0xb4,0x8a,0x00,0x01,0xff,0xe2,0xb4,0x8b,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0x8c,0x00,0x01,0xff,0xe2,0xb4,0x8d,0x00,0x10,
+ 0x08,0x01,0xff,0xe2,0xb4,0x8e,0x00,0x01,0xff,0xe2,0xb4,0x8f,0x00,0xd3,0x40,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0x90,0x00,0x01,0xff,0xe2,0xb4,0x91,
+ 0x00,0x10,0x08,0x01,0xff,0xe2,0xb4,0x92,0x00,0x01,0xff,0xe2,0xb4,0x93,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0x94,0x00,0x01,0xff,0xe2,0xb4,0x95,0x00,0x10,
+ 0x08,0x01,0xff,0xe2,0xb4,0x96,0x00,0x01,0xff,0xe2,0xb4,0x97,0x00,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0x98,0x00,0x01,0xff,0xe2,0xb4,0x99,0x00,0x10,
+ 0x08,0x01,0xff,0xe2,0xb4,0x9a,0x00,0x01,0xff,0xe2,0xb4,0x9b,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe2,0xb4,0x9c,0x00,0x01,0xff,0xe2,0xb4,0x9d,0x00,0x10,0x08,0x01,
+ 0xff,0xe2,0xb4,0x9e,0x00,0x01,0xff,0xe2,0xb4,0x9f,0x00,0xcf,0x86,0xe5,0x42,0x52,
+ 0x94,0x50,0xd3,0x3c,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0xa0,0x00,
+ 0x01,0xff,0xe2,0xb4,0xa1,0x00,0x10,0x08,0x01,0xff,0xe2,0xb4,0xa2,0x00,0x01,0xff,
+ 0xe2,0xb4,0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0xb4,0xa4,0x00,0x01,0xff,
+ 0xe2,0xb4,0xa5,0x00,0x10,0x04,0x00,0x00,0x0d,0xff,0xe2,0xb4,0xa7,0x00,0x52,0x04,
+ 0x00,0x00,0x91,0x0c,0x10,0x04,0x00,0x00,0x0d,0xff,0xe2,0xb4,0xad,0x00,0x00,0x00,
+ 0x01,0x00,0xd2,0x1b,0xe1,0xfc,0x52,0xe0,0xad,0x52,0xcf,0x86,0x95,0x0f,0x94,0x0b,
+ 0x93,0x07,0x62,0x92,0x52,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0xd1,0x13,0xe0,
+ 0xd3,0x53,0xcf,0x86,0x95,0x0a,0xe4,0xa8,0x53,0x63,0x97,0x53,0x04,0x00,0x04,0x00,
+ 0xd0,0x0d,0xcf,0x86,0x95,0x07,0x64,0x22,0x54,0x08,0x00,0x04,0x00,0xcf,0x86,0x55,
+ 0x04,0x04,0x00,0x54,0x04,0x04,0x00,0xd3,0x07,0x62,0x2f,0x54,0x04,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8f,0xb0,0x00,0x11,0xff,0xe1,0x8f,0xb1,0x00,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0xb2,0x00,0x11,0xff,0xe1,0x8f,0xb3,0x00,0x91,0x10,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0xb4,0x00,0x11,0xff,0xe1,0x8f,0xb5,0x00,0x00,0x00,
+ 0xd4,0x1c,0xe3,0xe0,0x56,0xe2,0x17,0x56,0xe1,0xda,0x55,0xe0,0xbb,0x55,0xcf,0x86,
+ 0x95,0x0a,0xe4,0xa4,0x55,0x63,0x88,0x55,0x04,0x00,0x04,0x00,0xe3,0xd2,0x01,0xe2,
+ 0x2b,0x5a,0xd1,0x0c,0xe0,0x4c,0x59,0xcf,0x86,0x65,0x25,0x59,0x0a,0x00,0xe0,0x9c,
+ 0x59,0xcf,0x86,0xd5,0xc5,0xd4,0x45,0xd3,0x31,0xd2,0x1c,0xd1,0x0e,0x10,0x07,0x12,
+ 0xff,0xd0,0xb2,0x00,0x12,0xff,0xd0,0xb4,0x00,0x10,0x07,0x12,0xff,0xd0,0xbe,0x00,
+ 0x12,0xff,0xd1,0x81,0x00,0x51,0x07,0x12,0xff,0xd1,0x82,0x00,0x10,0x07,0x12,0xff,
+ 0xd1,0x8a,0x00,0x12,0xff,0xd1,0xa3,0x00,0x92,0x10,0x91,0x0c,0x10,0x08,0x12,0xff,
+ 0xea,0x99,0x8b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x14,0xff,0xe1,0x83,0x90,0x00,0x14,0xff,0xe1,0x83,0x91,0x00,0x10,0x08,
+ 0x14,0xff,0xe1,0x83,0x92,0x00,0x14,0xff,0xe1,0x83,0x93,0x00,0xd1,0x10,0x10,0x08,
+ 0x14,0xff,0xe1,0x83,0x94,0x00,0x14,0xff,0xe1,0x83,0x95,0x00,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0x96,0x00,0x14,0xff,0xe1,0x83,0x97,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x14,0xff,0xe1,0x83,0x98,0x00,0x14,0xff,0xe1,0x83,0x99,0x00,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0x9a,0x00,0x14,0xff,0xe1,0x83,0x9b,0x00,0xd1,0x10,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0x9c,0x00,0x14,0xff,0xe1,0x83,0x9d,0x00,0x10,0x08,0x14,0xff,0xe1,0x83,
+ 0x9e,0x00,0x14,0xff,0xe1,0x83,0x9f,0x00,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x14,0xff,0xe1,0x83,0xa0,0x00,0x14,0xff,0xe1,0x83,0xa1,0x00,0x10,0x08,
+ 0x14,0xff,0xe1,0x83,0xa2,0x00,0x14,0xff,0xe1,0x83,0xa3,0x00,0xd1,0x10,0x10,0x08,
+ 0x14,0xff,0xe1,0x83,0xa4,0x00,0x14,0xff,0xe1,0x83,0xa5,0x00,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0xa6,0x00,0x14,0xff,0xe1,0x83,0xa7,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x14,0xff,0xe1,0x83,0xa8,0x00,0x14,0xff,0xe1,0x83,0xa9,0x00,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0xaa,0x00,0x14,0xff,0xe1,0x83,0xab,0x00,0xd1,0x10,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0xac,0x00,0x14,0xff,0xe1,0x83,0xad,0x00,0x10,0x08,0x14,0xff,0xe1,0x83,
+ 0xae,0x00,0x14,0xff,0xe1,0x83,0xaf,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x14,0xff,0xe1,0x83,0xb0,0x00,0x14,0xff,0xe1,0x83,0xb1,0x00,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0xb2,0x00,0x14,0xff,0xe1,0x83,0xb3,0x00,0xd1,0x10,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0xb4,0x00,0x14,0xff,0xe1,0x83,0xb5,0x00,0x10,0x08,0x14,0xff,0xe1,0x83,
+ 0xb6,0x00,0x14,0xff,0xe1,0x83,0xb7,0x00,0xd2,0x1c,0xd1,0x10,0x10,0x08,0x14,0xff,
+ 0xe1,0x83,0xb8,0x00,0x14,0xff,0xe1,0x83,0xb9,0x00,0x10,0x08,0x14,0xff,0xe1,0x83,
+ 0xba,0x00,0x00,0x00,0xd1,0x0c,0x10,0x04,0x00,0x00,0x14,0xff,0xe1,0x83,0xbd,0x00,
+ 0x10,0x08,0x14,0xff,0xe1,0x83,0xbe,0x00,0x14,0xff,0xe1,0x83,0xbf,0x00,0xe2,0x9d,
+ 0x08,0xe1,0x48,0x04,0xe0,0x1c,0x02,0xcf,0x86,0xe5,0x11,0x01,0xd4,0x84,0xd3,0x40,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x61,0xcc,0xa5,0x00,0x01,0xff,0x61,0xcc,
+ 0xa5,0x00,0x10,0x08,0x01,0xff,0x62,0xcc,0x87,0x00,0x01,0xff,0x62,0xcc,0x87,0x00,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0x62,0xcc,0xa3,0x00,0x01,0xff,0x62,0xcc,0xa3,0x00,
+ 0x10,0x08,0x01,0xff,0x62,0xcc,0xb1,0x00,0x01,0xff,0x62,0xcc,0xb1,0x00,0xd2,0x24,
+ 0xd1,0x14,0x10,0x0a,0x01,0xff,0x63,0xcc,0xa7,0xcc,0x81,0x00,0x01,0xff,0x63,0xcc,
+ 0xa7,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x64,0xcc,0x87,0x00,0x01,0xff,0x64,0xcc,
+ 0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x64,0xcc,0xa3,0x00,0x01,0xff,0x64,0xcc,
+ 0xa3,0x00,0x10,0x08,0x01,0xff,0x64,0xcc,0xb1,0x00,0x01,0xff,0x64,0xcc,0xb1,0x00,
+ 0xd3,0x48,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x64,0xcc,0xa7,0x00,0x01,0xff,
+ 0x64,0xcc,0xa7,0x00,0x10,0x08,0x01,0xff,0x64,0xcc,0xad,0x00,0x01,0xff,0x64,0xcc,
+ 0xad,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x65,0xcc,0x84,0xcc,0x80,0x00,0x01,0xff,
+ 0x65,0xcc,0x84,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0x65,0xcc,0x84,0xcc,0x81,0x00,
+ 0x01,0xff,0x65,0xcc,0x84,0xcc,0x81,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0x65,0xcc,0xad,0x00,0x01,0xff,0x65,0xcc,0xad,0x00,0x10,0x08,0x01,0xff,0x65,0xcc,
+ 0xb0,0x00,0x01,0xff,0x65,0xcc,0xb0,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x65,0xcc,
+ 0xa7,0xcc,0x86,0x00,0x01,0xff,0x65,0xcc,0xa7,0xcc,0x86,0x00,0x10,0x08,0x01,0xff,
+ 0x66,0xcc,0x87,0x00,0x01,0xff,0x66,0xcc,0x87,0x00,0xd4,0x84,0xd3,0x40,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0x67,0xcc,0x84,0x00,0x01,0xff,0x67,0xcc,0x84,0x00,
+ 0x10,0x08,0x01,0xff,0x68,0xcc,0x87,0x00,0x01,0xff,0x68,0xcc,0x87,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0x68,0xcc,0xa3,0x00,0x01,0xff,0x68,0xcc,0xa3,0x00,0x10,0x08,
+ 0x01,0xff,0x68,0xcc,0x88,0x00,0x01,0xff,0x68,0xcc,0x88,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0x68,0xcc,0xa7,0x00,0x01,0xff,0x68,0xcc,0xa7,0x00,0x10,0x08,
+ 0x01,0xff,0x68,0xcc,0xae,0x00,0x01,0xff,0x68,0xcc,0xae,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0x69,0xcc,0xb0,0x00,0x01,0xff,0x69,0xcc,0xb0,0x00,0x10,0x0a,0x01,0xff,
+ 0x69,0xcc,0x88,0xcc,0x81,0x00,0x01,0xff,0x69,0xcc,0x88,0xcc,0x81,0x00,0xd3,0x40,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x6b,0xcc,0x81,0x00,0x01,0xff,0x6b,0xcc,
+ 0x81,0x00,0x10,0x08,0x01,0xff,0x6b,0xcc,0xa3,0x00,0x01,0xff,0x6b,0xcc,0xa3,0x00,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0x6b,0xcc,0xb1,0x00,0x01,0xff,0x6b,0xcc,0xb1,0x00,
+ 0x10,0x08,0x01,0xff,0x6c,0xcc,0xa3,0x00,0x01,0xff,0x6c,0xcc,0xa3,0x00,0xd2,0x24,
+ 0xd1,0x14,0x10,0x0a,0x01,0xff,0x6c,0xcc,0xa3,0xcc,0x84,0x00,0x01,0xff,0x6c,0xcc,
+ 0xa3,0xcc,0x84,0x00,0x10,0x08,0x01,0xff,0x6c,0xcc,0xb1,0x00,0x01,0xff,0x6c,0xcc,
+ 0xb1,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6c,0xcc,0xad,0x00,0x01,0xff,0x6c,0xcc,
+ 0xad,0x00,0x10,0x08,0x01,0xff,0x6d,0xcc,0x81,0x00,0x01,0xff,0x6d,0xcc,0x81,0x00,
+ 0xcf,0x86,0xe5,0x15,0x01,0xd4,0x88,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x6d,0xcc,0x87,0x00,0x01,0xff,0x6d,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x6d,
+ 0xcc,0xa3,0x00,0x01,0xff,0x6d,0xcc,0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6e,
+ 0xcc,0x87,0x00,0x01,0xff,0x6e,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x6e,0xcc,0xa3,
+ 0x00,0x01,0xff,0x6e,0xcc,0xa3,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x6e,
+ 0xcc,0xb1,0x00,0x01,0xff,0x6e,0xcc,0xb1,0x00,0x10,0x08,0x01,0xff,0x6e,0xcc,0xad,
+ 0x00,0x01,0xff,0x6e,0xcc,0xad,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x83,
+ 0xcc,0x81,0x00,0x01,0xff,0x6f,0xcc,0x83,0xcc,0x81,0x00,0x10,0x0a,0x01,0xff,0x6f,
+ 0xcc,0x83,0xcc,0x88,0x00,0x01,0xff,0x6f,0xcc,0x83,0xcc,0x88,0x00,0xd3,0x48,0xd2,
+ 0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x84,0xcc,0x80,0x00,0x01,0xff,0x6f,
+ 0xcc,0x84,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x84,0xcc,0x81,0x00,0x01,
+ 0xff,0x6f,0xcc,0x84,0xcc,0x81,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x70,0xcc,0x81,
+ 0x00,0x01,0xff,0x70,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x70,0xcc,0x87,0x00,0x01,
+ 0xff,0x70,0xcc,0x87,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x72,0xcc,0x87,
+ 0x00,0x01,0xff,0x72,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x72,0xcc,0xa3,0x00,0x01,
+ 0xff,0x72,0xcc,0xa3,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x72,0xcc,0xa3,0xcc,0x84,
+ 0x00,0x01,0xff,0x72,0xcc,0xa3,0xcc,0x84,0x00,0x10,0x08,0x01,0xff,0x72,0xcc,0xb1,
+ 0x00,0x01,0xff,0x72,0xcc,0xb1,0x00,0xd4,0x8c,0xd3,0x48,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x73,0xcc,0x87,0x00,0x01,0xff,0x73,0xcc,0x87,0x00,0x10,0x08,0x01,
+ 0xff,0x73,0xcc,0xa3,0x00,0x01,0xff,0x73,0xcc,0xa3,0x00,0xd1,0x14,0x10,0x0a,0x01,
+ 0xff,0x73,0xcc,0x81,0xcc,0x87,0x00,0x01,0xff,0x73,0xcc,0x81,0xcc,0x87,0x00,0x10,
+ 0x0a,0x01,0xff,0x73,0xcc,0x8c,0xcc,0x87,0x00,0x01,0xff,0x73,0xcc,0x8c,0xcc,0x87,
+ 0x00,0xd2,0x24,0xd1,0x14,0x10,0x0a,0x01,0xff,0x73,0xcc,0xa3,0xcc,0x87,0x00,0x01,
+ 0xff,0x73,0xcc,0xa3,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x74,0xcc,0x87,0x00,0x01,
+ 0xff,0x74,0xcc,0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x74,0xcc,0xa3,0x00,0x01,
+ 0xff,0x74,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x74,0xcc,0xb1,0x00,0x01,0xff,0x74,
+ 0xcc,0xb1,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x74,0xcc,0xad,
+ 0x00,0x01,0xff,0x74,0xcc,0xad,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0xa4,0x00,0x01,
+ 0xff,0x75,0xcc,0xa4,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x75,0xcc,0xb0,0x00,0x01,
+ 0xff,0x75,0xcc,0xb0,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0xad,0x00,0x01,0xff,0x75,
+ 0xcc,0xad,0x00,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x75,0xcc,0x83,0xcc,0x81,
+ 0x00,0x01,0xff,0x75,0xcc,0x83,0xcc,0x81,0x00,0x10,0x0a,0x01,0xff,0x75,0xcc,0x84,
+ 0xcc,0x88,0x00,0x01,0xff,0x75,0xcc,0x84,0xcc,0x88,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x76,0xcc,0x83,0x00,0x01,0xff,0x76,0xcc,0x83,0x00,0x10,0x08,0x01,0xff,0x76,
+ 0xcc,0xa3,0x00,0x01,0xff,0x76,0xcc,0xa3,0x00,0xe0,0x11,0x02,0xcf,0x86,0xd5,0xe2,
+ 0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x77,0xcc,0x80,0x00,
+ 0x01,0xff,0x77,0xcc,0x80,0x00,0x10,0x08,0x01,0xff,0x77,0xcc,0x81,0x00,0x01,0xff,
+ 0x77,0xcc,0x81,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x77,0xcc,0x88,0x00,0x01,0xff,
+ 0x77,0xcc,0x88,0x00,0x10,0x08,0x01,0xff,0x77,0xcc,0x87,0x00,0x01,0xff,0x77,0xcc,
+ 0x87,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x77,0xcc,0xa3,0x00,0x01,0xff,
+ 0x77,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x78,0xcc,0x87,0x00,0x01,0xff,0x78,0xcc,
+ 0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x78,0xcc,0x88,0x00,0x01,0xff,0x78,0xcc,
+ 0x88,0x00,0x10,0x08,0x01,0xff,0x79,0xcc,0x87,0x00,0x01,0xff,0x79,0xcc,0x87,0x00,
+ 0xd3,0x33,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x7a,0xcc,0x82,0x00,0x01,0xff,
+ 0x7a,0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x7a,0xcc,0xa3,0x00,0x01,0xff,0x7a,0xcc,
+ 0xa3,0x00,0xe1,0x12,0x59,0x10,0x08,0x01,0xff,0x7a,0xcc,0xb1,0x00,0x01,0xff,0x7a,
+ 0xcc,0xb1,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x77,0xcc,0x8a,0x00,0x01,
+ 0xff,0x79,0xcc,0x8a,0x00,0x10,0x08,0x01,0xff,0x61,0xca,0xbe,0x00,0x02,0xff,0x73,
+ 0xcc,0x87,0x00,0x51,0x04,0x0a,0x00,0x10,0x07,0x0a,0xff,0x73,0x73,0x00,0x0a,0x00,
+ 0xd4,0x98,0xd3,0x48,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x61,0xcc,0xa3,0x00,
+ 0x01,0xff,0x61,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x61,0xcc,0x89,0x00,0x01,0xff,
+ 0x61,0xcc,0x89,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x61,0xcc,0x82,0xcc,0x81,0x00,
+ 0x01,0xff,0x61,0xcc,0x82,0xcc,0x81,0x00,0x10,0x0a,0x01,0xff,0x61,0xcc,0x82,0xcc,
+ 0x80,0x00,0x01,0xff,0x61,0xcc,0x82,0xcc,0x80,0x00,0xd2,0x28,0xd1,0x14,0x10,0x0a,
+ 0x01,0xff,0x61,0xcc,0x82,0xcc,0x89,0x00,0x01,0xff,0x61,0xcc,0x82,0xcc,0x89,0x00,
+ 0x10,0x0a,0x01,0xff,0x61,0xcc,0x82,0xcc,0x83,0x00,0x01,0xff,0x61,0xcc,0x82,0xcc,
+ 0x83,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x61,0xcc,0xa3,0xcc,0x82,0x00,0x01,0xff,
+ 0x61,0xcc,0xa3,0xcc,0x82,0x00,0x10,0x0a,0x01,0xff,0x61,0xcc,0x86,0xcc,0x81,0x00,
+ 0x01,0xff,0x61,0xcc,0x86,0xcc,0x81,0x00,0xd3,0x50,0xd2,0x28,0xd1,0x14,0x10,0x0a,
+ 0x01,0xff,0x61,0xcc,0x86,0xcc,0x80,0x00,0x01,0xff,0x61,0xcc,0x86,0xcc,0x80,0x00,
+ 0x10,0x0a,0x01,0xff,0x61,0xcc,0x86,0xcc,0x89,0x00,0x01,0xff,0x61,0xcc,0x86,0xcc,
+ 0x89,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x61,0xcc,0x86,0xcc,0x83,0x00,0x01,0xff,
+ 0x61,0xcc,0x86,0xcc,0x83,0x00,0x10,0x0a,0x01,0xff,0x61,0xcc,0xa3,0xcc,0x86,0x00,
+ 0x01,0xff,0x61,0xcc,0xa3,0xcc,0x86,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0x65,0xcc,0xa3,0x00,0x01,0xff,0x65,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x65,0xcc,
+ 0x89,0x00,0x01,0xff,0x65,0xcc,0x89,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x65,0xcc,
+ 0x83,0x00,0x01,0xff,0x65,0xcc,0x83,0x00,0x10,0x0a,0x01,0xff,0x65,0xcc,0x82,0xcc,
+ 0x81,0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x81,0x00,0xcf,0x86,0xe5,0x31,0x01,0xd4,
+ 0x90,0xd3,0x50,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x65,0xcc,0x82,0xcc,0x80,
+ 0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0x65,0xcc,0x82,
+ 0xcc,0x89,0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x89,0x00,0xd1,0x14,0x10,0x0a,0x01,
+ 0xff,0x65,0xcc,0x82,0xcc,0x83,0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x83,0x00,0x10,
+ 0x0a,0x01,0xff,0x65,0xcc,0xa3,0xcc,0x82,0x00,0x01,0xff,0x65,0xcc,0xa3,0xcc,0x82,
+ 0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x69,0xcc,0x89,0x00,0x01,0xff,0x69,
+ 0xcc,0x89,0x00,0x10,0x08,0x01,0xff,0x69,0xcc,0xa3,0x00,0x01,0xff,0x69,0xcc,0xa3,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6f,0xcc,0xa3,0x00,0x01,0xff,0x6f,0xcc,0xa3,
+ 0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x89,0x00,0x01,0xff,0x6f,0xcc,0x89,0x00,0xd3,
+ 0x50,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x81,0x00,0x01,
+ 0xff,0x6f,0xcc,0x82,0xcc,0x81,0x00,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x80,
+ 0x00,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x80,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x6f,
+ 0xcc,0x82,0xcc,0x89,0x00,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x89,0x00,0x10,0x0a,0x01,
+ 0xff,0x6f,0xcc,0x82,0xcc,0x83,0x00,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x83,0x00,0xd2,
+ 0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x6f,0xcc,0xa3,0xcc,0x82,0x00,0x01,0xff,0x6f,
+ 0xcc,0xa3,0xcc,0x82,0x00,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x81,0x00,0x01,
+ 0xff,0x6f,0xcc,0x9b,0xcc,0x81,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x9b,
+ 0xcc,0x80,0x00,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0x6f,
+ 0xcc,0x9b,0xcc,0x89,0x00,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x89,0x00,0xd4,0x98,0xd3,
+ 0x48,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x83,0x00,0x01,
+ 0xff,0x6f,0xcc,0x9b,0xcc,0x83,0x00,0x10,0x0a,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0xa3,
+ 0x00,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x75,
+ 0xcc,0xa3,0x00,0x01,0xff,0x75,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0x89,
+ 0x00,0x01,0xff,0x75,0xcc,0x89,0x00,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x75,
+ 0xcc,0x9b,0xcc,0x81,0x00,0x01,0xff,0x75,0xcc,0x9b,0xcc,0x81,0x00,0x10,0x0a,0x01,
+ 0xff,0x75,0xcc,0x9b,0xcc,0x80,0x00,0x01,0xff,0x75,0xcc,0x9b,0xcc,0x80,0x00,0xd1,
+ 0x14,0x10,0x0a,0x01,0xff,0x75,0xcc,0x9b,0xcc,0x89,0x00,0x01,0xff,0x75,0xcc,0x9b,
+ 0xcc,0x89,0x00,0x10,0x0a,0x01,0xff,0x75,0xcc,0x9b,0xcc,0x83,0x00,0x01,0xff,0x75,
+ 0xcc,0x9b,0xcc,0x83,0x00,0xd3,0x44,0xd2,0x24,0xd1,0x14,0x10,0x0a,0x01,0xff,0x75,
+ 0xcc,0x9b,0xcc,0xa3,0x00,0x01,0xff,0x75,0xcc,0x9b,0xcc,0xa3,0x00,0x10,0x08,0x01,
+ 0xff,0x79,0xcc,0x80,0x00,0x01,0xff,0x79,0xcc,0x80,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x79,0xcc,0xa3,0x00,0x01,0xff,0x79,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x79,
+ 0xcc,0x89,0x00,0x01,0xff,0x79,0xcc,0x89,0x00,0xd2,0x1c,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x79,0xcc,0x83,0x00,0x01,0xff,0x79,0xcc,0x83,0x00,0x10,0x08,0x0a,0xff,0xe1,
+ 0xbb,0xbb,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xe1,0xbb,0xbd,0x00,0x0a,
+ 0x00,0x10,0x08,0x0a,0xff,0xe1,0xbb,0xbf,0x00,0x0a,0x00,0xe1,0xbf,0x02,0xe0,0xa1,
+ 0x01,0xcf,0x86,0xd5,0xc6,0xd4,0x6c,0xd3,0x18,0xe2,0x0e,0x59,0xe1,0xf7,0x58,0x10,
+ 0x09,0x01,0xff,0xce,0xb1,0xcc,0x93,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0x00,0xd2,
+ 0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,0x93,0x00,0x01,0xff,0xce,0xb1,
+ 0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,
+ 0xce,0xb1,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,
+ 0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,
+ 0xff,0xce,0xb1,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcd,0x82,
+ 0x00,0xd3,0x18,0xe2,0x4a,0x59,0xe1,0x33,0x59,0x10,0x09,0x01,0xff,0xce,0xb5,0xcc,
+ 0x93,0x00,0x01,0xff,0xce,0xb5,0xcc,0x94,0x00,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,
+ 0xff,0xce,0xb5,0xcc,0x93,0x00,0x01,0xff,0xce,0xb5,0xcc,0x94,0x00,0x10,0x0b,0x01,
+ 0xff,0xce,0xb5,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0xb5,0xcc,0x94,0xcc,0x80,
+ 0x00,0x91,0x16,0x10,0x0b,0x01,0xff,0xce,0xb5,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,
+ 0xce,0xb5,0xcc,0x94,0xcc,0x81,0x00,0x00,0x00,0xd4,0x6c,0xd3,0x18,0xe2,0x74,0x59,
+ 0xe1,0x5d,0x59,0x10,0x09,0x01,0xff,0xce,0xb7,0xcc,0x93,0x00,0x01,0xff,0xce,0xb7,
+ 0xcc,0x94,0x00,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb7,0xcc,0x93,0x00,
+ 0x01,0xff,0xce,0xb7,0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcc,
+ 0x80,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,
+ 0xff,0xce,0xb7,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcc,0x81,
+ 0x00,0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0xb7,
+ 0xcc,0x94,0xcd,0x82,0x00,0xd3,0x18,0xe2,0xb0,0x59,0xe1,0x99,0x59,0x10,0x09,0x01,
+ 0xff,0xce,0xb9,0xcc,0x93,0x00,0x01,0xff,0xce,0xb9,0xcc,0x94,0x00,0xd2,0x28,0xd1,
+ 0x12,0x10,0x09,0x01,0xff,0xce,0xb9,0xcc,0x93,0x00,0x01,0xff,0xce,0xb9,0xcc,0x94,
+ 0x00,0x10,0x0b,0x01,0xff,0xce,0xb9,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0xb9,
+ 0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb9,0xcc,0x93,0xcc,
+ 0x81,0x00,0x01,0xff,0xce,0xb9,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,0xff,0xce,
+ 0xb9,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0xb9,0xcc,0x94,0xcd,0x82,0x00,0xcf,
+ 0x86,0xd5,0xac,0xd4,0x5a,0xd3,0x18,0xe2,0xed,0x59,0xe1,0xd6,0x59,0x10,0x09,0x01,
+ 0xff,0xce,0xbf,0xcc,0x93,0x00,0x01,0xff,0xce,0xbf,0xcc,0x94,0x00,0xd2,0x28,0xd1,
+ 0x12,0x10,0x09,0x01,0xff,0xce,0xbf,0xcc,0x93,0x00,0x01,0xff,0xce,0xbf,0xcc,0x94,
+ 0x00,0x10,0x0b,0x01,0xff,0xce,0xbf,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0xbf,
+ 0xcc,0x94,0xcc,0x80,0x00,0x91,0x16,0x10,0x0b,0x01,0xff,0xce,0xbf,0xcc,0x93,0xcc,
+ 0x81,0x00,0x01,0xff,0xce,0xbf,0xcc,0x94,0xcc,0x81,0x00,0x00,0x00,0xd3,0x18,0xe2,
+ 0x17,0x5a,0xe1,0x00,0x5a,0x10,0x09,0x01,0xff,0xcf,0x85,0xcc,0x93,0x00,0x01,0xff,
+ 0xcf,0x85,0xcc,0x94,0x00,0xd2,0x1c,0xd1,0x0d,0x10,0x04,0x00,0x00,0x01,0xff,0xcf,
+ 0x85,0xcc,0x94,0x00,0x10,0x04,0x00,0x00,0x01,0xff,0xcf,0x85,0xcc,0x94,0xcc,0x80,
+ 0x00,0xd1,0x0f,0x10,0x04,0x00,0x00,0x01,0xff,0xcf,0x85,0xcc,0x94,0xcc,0x81,0x00,
+ 0x10,0x04,0x00,0x00,0x01,0xff,0xcf,0x85,0xcc,0x94,0xcd,0x82,0x00,0xe4,0xd3,0x5a,
+ 0xd3,0x18,0xe2,0x52,0x5a,0xe1,0x3b,0x5a,0x10,0x09,0x01,0xff,0xcf,0x89,0xcc,0x93,
+ 0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0x00,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,0xff,
+ 0xcf,0x89,0xcc,0x93,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,
+ 0xcf,0x89,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcc,0x80,0x00,
+ 0xd1,0x16,0x10,0x0b,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,0xcf,
+ 0x89,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcd,0x82,
+ 0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcd,0x82,0x00,0xe0,0xd9,0x02,0xcf,0x86,0xe5,
+ 0x91,0x01,0xd4,0xc8,0xd3,0x64,0xd2,0x30,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb1,
+ 0xcc,0x93,0xce,0xb9,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xce,0xb9,0x00,0x10,0x0d,
+ 0x01,0xff,0xce,0xb1,0xcc,0x93,0xcc,0x80,0xce,0xb9,0x00,0x01,0xff,0xce,0xb1,0xcc,
+ 0x94,0xcc,0x80,0xce,0xb9,0x00,0xd1,0x1a,0x10,0x0d,0x01,0xff,0xce,0xb1,0xcc,0x93,
+ 0xcc,0x81,0xce,0xb9,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcc,0x81,0xce,0xb9,0x00,
+ 0x10,0x0d,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcd,0x82,0xce,0xb9,0x00,0x01,0xff,0xce,
+ 0xb1,0xcc,0x94,0xcd,0x82,0xce,0xb9,0x00,0xd2,0x30,0xd1,0x16,0x10,0x0b,0x01,0xff,
+ 0xce,0xb1,0xcc,0x93,0xce,0xb9,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xce,0xb9,0x00,
+ 0x10,0x0d,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcc,0x80,0xce,0xb9,0x00,0x01,0xff,0xce,
+ 0xb1,0xcc,0x94,0xcc,0x80,0xce,0xb9,0x00,0xd1,0x1a,0x10,0x0d,0x01,0xff,0xce,0xb1,
+ 0xcc,0x93,0xcc,0x81,0xce,0xb9,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcc,0x81,0xce,
+ 0xb9,0x00,0x10,0x0d,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcd,0x82,0xce,0xb9,0x00,0x01,
+ 0xff,0xce,0xb1,0xcc,0x94,0xcd,0x82,0xce,0xb9,0x00,0xd3,0x64,0xd2,0x30,0xd1,0x16,
+ 0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,0x93,0xce,0xb9,0x00,0x01,0xff,0xce,0xb7,0xcc,
+ 0x94,0xce,0xb9,0x00,0x10,0x0d,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcc,0x80,0xce,0xb9,
+ 0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcc,0x80,0xce,0xb9,0x00,0xd1,0x1a,0x10,0x0d,
+ 0x01,0xff,0xce,0xb7,0xcc,0x93,0xcc,0x81,0xce,0xb9,0x00,0x01,0xff,0xce,0xb7,0xcc,
+ 0x94,0xcc,0x81,0xce,0xb9,0x00,0x10,0x0d,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcd,0x82,
+ 0xce,0xb9,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcd,0x82,0xce,0xb9,0x00,0xd2,0x30,
+ 0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,0x93,0xce,0xb9,0x00,0x01,0xff,0xce,
+ 0xb7,0xcc,0x94,0xce,0xb9,0x00,0x10,0x0d,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcc,0x80,
+ 0xce,0xb9,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcc,0x80,0xce,0xb9,0x00,0xd1,0x1a,
+ 0x10,0x0d,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcc,0x81,0xce,0xb9,0x00,0x01,0xff,0xce,
+ 0xb7,0xcc,0x94,0xcc,0x81,0xce,0xb9,0x00,0x10,0x0d,0x01,0xff,0xce,0xb7,0xcc,0x93,
+ 0xcd,0x82,0xce,0xb9,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcd,0x82,0xce,0xb9,0x00,
+ 0xd4,0xc8,0xd3,0x64,0xd2,0x30,0xd1,0x16,0x10,0x0b,0x01,0xff,0xcf,0x89,0xcc,0x93,
+ 0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xce,0xb9,0x00,0x10,0x0d,0x01,0xff,
+ 0xcf,0x89,0xcc,0x93,0xcc,0x80,0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcc,
+ 0x80,0xce,0xb9,0x00,0xd1,0x1a,0x10,0x0d,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcc,0x81,
+ 0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcc,0x81,0xce,0xb9,0x00,0x10,0x0d,
+ 0x01,0xff,0xcf,0x89,0xcc,0x93,0xcd,0x82,0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xcc,
+ 0x94,0xcd,0x82,0xce,0xb9,0x00,0xd2,0x30,0xd1,0x16,0x10,0x0b,0x01,0xff,0xcf,0x89,
+ 0xcc,0x93,0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xce,0xb9,0x00,0x10,0x0d,
+ 0x01,0xff,0xcf,0x89,0xcc,0x93,0xcc,0x80,0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xcc,
+ 0x94,0xcc,0x80,0xce,0xb9,0x00,0xd1,0x1a,0x10,0x0d,0x01,0xff,0xcf,0x89,0xcc,0x93,
+ 0xcc,0x81,0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcc,0x81,0xce,0xb9,0x00,
+ 0x10,0x0d,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcd,0x82,0xce,0xb9,0x00,0x01,0xff,0xcf,
+ 0x89,0xcc,0x94,0xcd,0x82,0xce,0xb9,0x00,0xd3,0x49,0xd2,0x26,0xd1,0x12,0x10,0x09,
+ 0x01,0xff,0xce,0xb1,0xcc,0x86,0x00,0x01,0xff,0xce,0xb1,0xcc,0x84,0x00,0x10,0x0b,
+ 0x01,0xff,0xce,0xb1,0xcc,0x80,0xce,0xb9,0x00,0x01,0xff,0xce,0xb1,0xce,0xb9,0x00,
+ 0xd1,0x0f,0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,0x81,0xce,0xb9,0x00,0x00,0x00,0x10,
+ 0x09,0x01,0xff,0xce,0xb1,0xcd,0x82,0x00,0x01,0xff,0xce,0xb1,0xcd,0x82,0xce,0xb9,
+ 0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,0x86,0x00,0x01,0xff,
+ 0xce,0xb1,0xcc,0x84,0x00,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,0x80,0x00,0x01,0xff,
+ 0xce,0xb1,0xcc,0x81,0x00,0xe1,0xf3,0x5a,0x10,0x09,0x01,0xff,0xce,0xb1,0xce,0xb9,
+ 0x00,0x01,0x00,0xcf,0x86,0xd5,0xbd,0xd4,0x7e,0xd3,0x44,0xd2,0x21,0xd1,0x0d,0x10,
+ 0x04,0x01,0x00,0x01,0xff,0xc2,0xa8,0xcd,0x82,0x00,0x10,0x0b,0x01,0xff,0xce,0xb7,
+ 0xcc,0x80,0xce,0xb9,0x00,0x01,0xff,0xce,0xb7,0xce,0xb9,0x00,0xd1,0x0f,0x10,0x0b,
+ 0x01,0xff,0xce,0xb7,0xcc,0x81,0xce,0xb9,0x00,0x00,0x00,0x10,0x09,0x01,0xff,0xce,
+ 0xb7,0xcd,0x82,0x00,0x01,0xff,0xce,0xb7,0xcd,0x82,0xce,0xb9,0x00,0xd2,0x24,0xd1,
+ 0x12,0x10,0x09,0x01,0xff,0xce,0xb5,0xcc,0x80,0x00,0x01,0xff,0xce,0xb5,0xcc,0x81,
+ 0x00,0x10,0x09,0x01,0xff,0xce,0xb7,0xcc,0x80,0x00,0x01,0xff,0xce,0xb7,0xcc,0x81,
+ 0x00,0xe1,0x02,0x5b,0x10,0x09,0x01,0xff,0xce,0xb7,0xce,0xb9,0x00,0x01,0xff,0xe1,
+ 0xbe,0xbf,0xcc,0x80,0x00,0xd3,0x18,0xe2,0x28,0x5b,0xe1,0x11,0x5b,0x10,0x09,0x01,
+ 0xff,0xce,0xb9,0xcc,0x86,0x00,0x01,0xff,0xce,0xb9,0xcc,0x84,0x00,0xe2,0x4c,0x5b,
+ 0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb9,0xcc,0x86,0x00,0x01,0xff,0xce,0xb9,0xcc,
+ 0x84,0x00,0x10,0x09,0x01,0xff,0xce,0xb9,0xcc,0x80,0x00,0x01,0xff,0xce,0xb9,0xcc,
+ 0x81,0x00,0xd4,0x51,0xd3,0x18,0xe2,0x6f,0x5b,0xe1,0x58,0x5b,0x10,0x09,0x01,0xff,
+ 0xcf,0x85,0xcc,0x86,0x00,0x01,0xff,0xcf,0x85,0xcc,0x84,0x00,0xd2,0x24,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xcf,0x85,0xcc,0x86,0x00,0x01,0xff,0xcf,0x85,0xcc,0x84,0x00,
+ 0x10,0x09,0x01,0xff,0xcf,0x85,0xcc,0x80,0x00,0x01,0xff,0xcf,0x85,0xcc,0x81,0x00,
+ 0xe1,0x8f,0x5b,0x10,0x09,0x01,0xff,0xcf,0x81,0xcc,0x94,0x00,0x01,0xff,0xc2,0xa8,
+ 0xcc,0x80,0x00,0xd3,0x3b,0xd2,0x18,0x51,0x04,0x00,0x00,0x10,0x0b,0x01,0xff,0xcf,
+ 0x89,0xcc,0x80,0xce,0xb9,0x00,0x01,0xff,0xcf,0x89,0xce,0xb9,0x00,0xd1,0x0f,0x10,
+ 0x0b,0x01,0xff,0xcf,0x89,0xcc,0x81,0xce,0xb9,0x00,0x00,0x00,0x10,0x09,0x01,0xff,
+ 0xcf,0x89,0xcd,0x82,0x00,0x01,0xff,0xcf,0x89,0xcd,0x82,0xce,0xb9,0x00,0xd2,0x24,
+ 0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xbf,0xcc,0x80,0x00,0x01,0xff,0xce,0xbf,0xcc,
+ 0x81,0x00,0x10,0x09,0x01,0xff,0xcf,0x89,0xcc,0x80,0x00,0x01,0xff,0xcf,0x89,0xcc,
+ 0x81,0x00,0xe1,0x99,0x5b,0x10,0x09,0x01,0xff,0xcf,0x89,0xce,0xb9,0x00,0x01,0xff,
+ 0xc2,0xb4,0x00,0xe0,0x0c,0x68,0xcf,0x86,0xe5,0x23,0x02,0xe4,0x25,0x01,0xe3,0x85,
+ 0x5e,0xd2,0x2a,0xe1,0x5f,0x5c,0xe0,0xdd,0x5b,0xcf,0x86,0xe5,0xbb,0x5b,0x94,0x1b,
+ 0xe3,0xa4,0x5b,0x92,0x14,0x91,0x10,0x10,0x08,0x01,0xff,0xe2,0x80,0x82,0x00,0x01,
+ 0xff,0xe2,0x80,0x83,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd1,0xd6,0xd0,0x46,0xcf,
+ 0x86,0x55,0x04,0x01,0x00,0xd4,0x29,0xd3,0x13,0x52,0x04,0x01,0x00,0x51,0x04,0x01,
+ 0x00,0x10,0x07,0x01,0xff,0xcf,0x89,0x00,0x01,0x00,0x92,0x12,0x51,0x04,0x01,0x00,
+ 0x10,0x06,0x01,0xff,0x6b,0x00,0x01,0xff,0x61,0xcc,0x8a,0x00,0x01,0x00,0xe3,0x25,
+ 0x5d,0x92,0x10,0x51,0x04,0x01,0x00,0x10,0x08,0x01,0xff,0xe2,0x85,0x8e,0x00,0x01,
+ 0x00,0x01,0x00,0xcf,0x86,0xd5,0x0a,0xe4,0x42,0x5d,0x63,0x2d,0x5d,0x06,0x00,0x94,
+ 0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0x85,0xb0,0x00,0x01,
+ 0xff,0xe2,0x85,0xb1,0x00,0x10,0x08,0x01,0xff,0xe2,0x85,0xb2,0x00,0x01,0xff,0xe2,
+ 0x85,0xb3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0x85,0xb4,0x00,0x01,0xff,0xe2,
+ 0x85,0xb5,0x00,0x10,0x08,0x01,0xff,0xe2,0x85,0xb6,0x00,0x01,0xff,0xe2,0x85,0xb7,
+ 0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0x85,0xb8,0x00,0x01,0xff,0xe2,
+ 0x85,0xb9,0x00,0x10,0x08,0x01,0xff,0xe2,0x85,0xba,0x00,0x01,0xff,0xe2,0x85,0xbb,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0x85,0xbc,0x00,0x01,0xff,0xe2,0x85,0xbd,
+ 0x00,0x10,0x08,0x01,0xff,0xe2,0x85,0xbe,0x00,0x01,0xff,0xe2,0x85,0xbf,0x00,0x01,
+ 0x00,0xe0,0x34,0x5d,0xcf,0x86,0xe5,0x13,0x5d,0xe4,0xf2,0x5c,0xe3,0xe1,0x5c,0xe2,
+ 0xd4,0x5c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x04,0xff,0xe2,0x86,0x84,0x00,
+ 0xe3,0x23,0x61,0xe2,0xf0,0x60,0xd1,0x0c,0xe0,0x9d,0x60,0xcf,0x86,0x65,0x7e,0x60,
+ 0x01,0x00,0xd0,0x62,0xcf,0x86,0x55,0x04,0x01,0x00,0x54,0x04,0x01,0x00,0xd3,0x18,
+ 0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x08,0x01,0xff,0xe2,0x93,0x90,0x00,
+ 0x01,0xff,0xe2,0x93,0x91,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0x93,
+ 0x92,0x00,0x01,0xff,0xe2,0x93,0x93,0x00,0x10,0x08,0x01,0xff,0xe2,0x93,0x94,0x00,
+ 0x01,0xff,0xe2,0x93,0x95,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe2,0x93,0x96,0x00,
+ 0x01,0xff,0xe2,0x93,0x97,0x00,0x10,0x08,0x01,0xff,0xe2,0x93,0x98,0x00,0x01,0xff,
+ 0xe2,0x93,0x99,0x00,0xcf,0x86,0xe5,0x57,0x60,0x94,0x80,0xd3,0x40,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe2,0x93,0x9a,0x00,0x01,0xff,0xe2,0x93,0x9b,0x00,0x10,
+ 0x08,0x01,0xff,0xe2,0x93,0x9c,0x00,0x01,0xff,0xe2,0x93,0x9d,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe2,0x93,0x9e,0x00,0x01,0xff,0xe2,0x93,0x9f,0x00,0x10,0x08,0x01,
+ 0xff,0xe2,0x93,0xa0,0x00,0x01,0xff,0xe2,0x93,0xa1,0x00,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe2,0x93,0xa2,0x00,0x01,0xff,0xe2,0x93,0xa3,0x00,0x10,0x08,0x01,
+ 0xff,0xe2,0x93,0xa4,0x00,0x01,0xff,0xe2,0x93,0xa5,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0xe2,0x93,0xa6,0x00,0x01,0xff,0xe2,0x93,0xa7,0x00,0x10,0x08,0x01,0xff,0xe2,
+ 0x93,0xa8,0x00,0x01,0xff,0xe2,0x93,0xa9,0x00,0x01,0x00,0xd4,0x0c,0xe3,0x33,0x62,
+ 0xe2,0x2c,0x62,0xcf,0x06,0x04,0x00,0xe3,0x0c,0x65,0xe2,0xff,0x63,0xe1,0x2e,0x02,
+ 0xe0,0x84,0x01,0xcf,0x86,0xe5,0x01,0x01,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x08,0xff,0xe2,0xb0,0xb0,0x00,0x08,0xff,0xe2,0xb0,0xb1,0x00,0x10,0x08,
+ 0x08,0xff,0xe2,0xb0,0xb2,0x00,0x08,0xff,0xe2,0xb0,0xb3,0x00,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe2,0xb0,0xb4,0x00,0x08,0xff,0xe2,0xb0,0xb5,0x00,0x10,0x08,0x08,0xff,
+ 0xe2,0xb0,0xb6,0x00,0x08,0xff,0xe2,0xb0,0xb7,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe2,0xb0,0xb8,0x00,0x08,0xff,0xe2,0xb0,0xb9,0x00,0x10,0x08,0x08,0xff,
+ 0xe2,0xb0,0xba,0x00,0x08,0xff,0xe2,0xb0,0xbb,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe2,0xb0,0xbc,0x00,0x08,0xff,0xe2,0xb0,0xbd,0x00,0x10,0x08,0x08,0xff,0xe2,0xb0,
+ 0xbe,0x00,0x08,0xff,0xe2,0xb0,0xbf,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe2,0xb1,0x80,0x00,0x08,0xff,0xe2,0xb1,0x81,0x00,0x10,0x08,0x08,0xff,
+ 0xe2,0xb1,0x82,0x00,0x08,0xff,0xe2,0xb1,0x83,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe2,0xb1,0x84,0x00,0x08,0xff,0xe2,0xb1,0x85,0x00,0x10,0x08,0x08,0xff,0xe2,0xb1,
+ 0x86,0x00,0x08,0xff,0xe2,0xb1,0x87,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe2,0xb1,0x88,0x00,0x08,0xff,0xe2,0xb1,0x89,0x00,0x10,0x08,0x08,0xff,0xe2,0xb1,
+ 0x8a,0x00,0x08,0xff,0xe2,0xb1,0x8b,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe2,0xb1,
+ 0x8c,0x00,0x08,0xff,0xe2,0xb1,0x8d,0x00,0x10,0x08,0x08,0xff,0xe2,0xb1,0x8e,0x00,
+ 0x08,0xff,0xe2,0xb1,0x8f,0x00,0x94,0x7c,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe2,0xb1,0x90,0x00,0x08,0xff,0xe2,0xb1,0x91,0x00,0x10,0x08,0x08,0xff,
+ 0xe2,0xb1,0x92,0x00,0x08,0xff,0xe2,0xb1,0x93,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe2,0xb1,0x94,0x00,0x08,0xff,0xe2,0xb1,0x95,0x00,0x10,0x08,0x08,0xff,0xe2,0xb1,
+ 0x96,0x00,0x08,0xff,0xe2,0xb1,0x97,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe2,0xb1,0x98,0x00,0x08,0xff,0xe2,0xb1,0x99,0x00,0x10,0x08,0x08,0xff,0xe2,0xb1,
+ 0x9a,0x00,0x08,0xff,0xe2,0xb1,0x9b,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe2,0xb1,
+ 0x9c,0x00,0x08,0xff,0xe2,0xb1,0x9d,0x00,0x10,0x08,0x08,0xff,0xe2,0xb1,0x9e,0x00,
+ 0x00,0x00,0x08,0x00,0xcf,0x86,0xd5,0x07,0x64,0xef,0x61,0x08,0x00,0xd4,0x63,0xd3,
+ 0x32,0xd2,0x1b,0xd1,0x0c,0x10,0x08,0x09,0xff,0xe2,0xb1,0xa1,0x00,0x09,0x00,0x10,
+ 0x07,0x09,0xff,0xc9,0xab,0x00,0x09,0xff,0xe1,0xb5,0xbd,0x00,0xd1,0x0b,0x10,0x07,
+ 0x09,0xff,0xc9,0xbd,0x00,0x09,0x00,0x10,0x04,0x09,0x00,0x09,0xff,0xe2,0xb1,0xa8,
+ 0x00,0xd2,0x18,0xd1,0x0c,0x10,0x04,0x09,0x00,0x09,0xff,0xe2,0xb1,0xaa,0x00,0x10,
+ 0x04,0x09,0x00,0x09,0xff,0xe2,0xb1,0xac,0x00,0xd1,0x0b,0x10,0x04,0x09,0x00,0x0a,
+ 0xff,0xc9,0x91,0x00,0x10,0x07,0x0a,0xff,0xc9,0xb1,0x00,0x0a,0xff,0xc9,0x90,0x00,
+ 0xd3,0x27,0xd2,0x17,0xd1,0x0b,0x10,0x07,0x0b,0xff,0xc9,0x92,0x00,0x0a,0x00,0x10,
+ 0x08,0x0a,0xff,0xe2,0xb1,0xb3,0x00,0x0a,0x00,0x91,0x0c,0x10,0x04,0x09,0x00,0x09,
+ 0xff,0xe2,0xb1,0xb6,0x00,0x09,0x00,0x52,0x04,0x0a,0x00,0x51,0x04,0x0a,0x00,0x10,
+ 0x07,0x0b,0xff,0xc8,0xbf,0x00,0x0b,0xff,0xc9,0x80,0x00,0xe0,0x83,0x01,0xcf,0x86,
+ 0xd5,0xc0,0xd4,0x60,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,
+ 0x81,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0x83,0x00,0x08,0x00,0xd1,0x0c,
+ 0x10,0x08,0x08,0xff,0xe2,0xb2,0x85,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,
+ 0x87,0x00,0x08,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,0x89,0x00,
+ 0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0x8b,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,
+ 0x08,0xff,0xe2,0xb2,0x8d,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0x8f,0x00,
+ 0x08,0x00,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,0x91,0x00,
+ 0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0x93,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,
+ 0x08,0xff,0xe2,0xb2,0x95,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0x97,0x00,
+ 0x08,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,0x99,0x00,0x08,0x00,
+ 0x10,0x08,0x08,0xff,0xe2,0xb2,0x9b,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,0x08,0xff,
+ 0xe2,0xb2,0x9d,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0x9f,0x00,0x08,0x00,
+ 0xd4,0x60,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,0xa1,0x00,
+ 0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0xa3,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,
+ 0x08,0xff,0xe2,0xb2,0xa5,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0xa7,0x00,
+ 0x08,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,0xa9,0x00,0x08,0x00,
+ 0x10,0x08,0x08,0xff,0xe2,0xb2,0xab,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,0x08,0xff,
+ 0xe2,0xb2,0xad,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0xaf,0x00,0x08,0x00,
+ 0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,0xb1,0x00,0x08,0x00,
+ 0x10,0x08,0x08,0xff,0xe2,0xb2,0xb3,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,0x08,0xff,
+ 0xe2,0xb2,0xb5,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0xb7,0x00,0x08,0x00,
+ 0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,0xb9,0x00,0x08,0x00,0x10,0x08,
+ 0x08,0xff,0xe2,0xb2,0xbb,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb2,
+ 0xbd,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb2,0xbf,0x00,0x08,0x00,0xcf,0x86,
+ 0xd5,0xc0,0xd4,0x60,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb3,
+ 0x81,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,0x83,0x00,0x08,0x00,0xd1,0x0c,
+ 0x10,0x08,0x08,0xff,0xe2,0xb3,0x85,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,
+ 0x87,0x00,0x08,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb3,0x89,0x00,
+ 0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,0x8b,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,
+ 0x08,0xff,0xe2,0xb3,0x8d,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,0x8f,0x00,
+ 0x08,0x00,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb3,0x91,0x00,
+ 0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,0x93,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,
+ 0x08,0xff,0xe2,0xb3,0x95,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,0x97,0x00,
+ 0x08,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb3,0x99,0x00,0x08,0x00,
+ 0x10,0x08,0x08,0xff,0xe2,0xb3,0x9b,0x00,0x08,0x00,0xd1,0x0c,0x10,0x08,0x08,0xff,
+ 0xe2,0xb3,0x9d,0x00,0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,0x9f,0x00,0x08,0x00,
+ 0xd4,0x3b,0xd3,0x1c,0x92,0x18,0xd1,0x0c,0x10,0x08,0x08,0xff,0xe2,0xb3,0xa1,0x00,
+ 0x08,0x00,0x10,0x08,0x08,0xff,0xe2,0xb3,0xa3,0x00,0x08,0x00,0x08,0x00,0xd2,0x10,
+ 0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x0b,0xff,0xe2,0xb3,0xac,0x00,0xe1,0x3b,
+ 0x5f,0x10,0x04,0x0b,0x00,0x0b,0xff,0xe2,0xb3,0xae,0x00,0xe3,0x40,0x5f,0x92,0x10,
+ 0x51,0x04,0x0b,0xe6,0x10,0x08,0x0d,0xff,0xe2,0xb3,0xb3,0x00,0x0d,0x00,0x00,0x00,
+ 0xe2,0x98,0x08,0xd1,0x0b,0xe0,0x11,0x67,0xcf,0x86,0xcf,0x06,0x01,0x00,0xe0,0x65,
+ 0x6c,0xcf,0x86,0xe5,0xa7,0x05,0xd4,0x06,0xcf,0x06,0x04,0x00,0xd3,0x0c,0xe2,0xf8,
+ 0x67,0xe1,0x8f,0x67,0xcf,0x06,0x04,0x00,0xe2,0xdb,0x01,0xe1,0x26,0x01,0xd0,0x09,
+ 0xcf,0x86,0x65,0xf4,0x67,0x0a,0x00,0xcf,0x86,0xd5,0xc0,0xd4,0x60,0xd3,0x30,0xd2,
+ 0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0x81,0x00,0x0a,0x00,0x10,0x08,0x0a,
+ 0xff,0xea,0x99,0x83,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0x85,
+ 0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x99,0x87,0x00,0x0a,0x00,0xd2,0x18,0xd1,
+ 0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0x89,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,
+ 0x99,0x8b,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0x8d,0x00,0x0a,
+ 0x00,0x10,0x08,0x0a,0xff,0xea,0x99,0x8f,0x00,0x0a,0x00,0xd3,0x30,0xd2,0x18,0xd1,
+ 0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0x91,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,
+ 0x99,0x93,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0x95,0x00,0x0a,
+ 0x00,0x10,0x08,0x0a,0xff,0xea,0x99,0x97,0x00,0x0a,0x00,0xd2,0x18,0xd1,0x0c,0x10,
+ 0x08,0x0a,0xff,0xea,0x99,0x99,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x99,0x9b,
+ 0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0x9d,0x00,0x0a,0x00,0x10,
+ 0x08,0x0a,0xff,0xea,0x99,0x9f,0x00,0x0a,0x00,0xe4,0x5d,0x67,0xd3,0x30,0xd2,0x18,
+ 0xd1,0x0c,0x10,0x08,0x0c,0xff,0xea,0x99,0xa1,0x00,0x0c,0x00,0x10,0x08,0x0a,0xff,
+ 0xea,0x99,0xa3,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x99,0xa5,0x00,
+ 0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x99,0xa7,0x00,0x0a,0x00,0xd2,0x18,0xd1,0x0c,
+ 0x10,0x08,0x0a,0xff,0xea,0x99,0xa9,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x99,
+ 0xab,0x00,0x0a,0x00,0xe1,0x0c,0x67,0x10,0x08,0x0a,0xff,0xea,0x99,0xad,0x00,0x0a,
+ 0x00,0xe0,0x35,0x67,0xcf,0x86,0x95,0xab,0xd4,0x60,0xd3,0x30,0xd2,0x18,0xd1,0x0c,
+ 0x10,0x08,0x0a,0xff,0xea,0x9a,0x81,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9a,
+ 0x83,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9a,0x85,0x00,0x0a,0x00,
+ 0x10,0x08,0x0a,0xff,0xea,0x9a,0x87,0x00,0x0a,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,
+ 0x0a,0xff,0xea,0x9a,0x89,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9a,0x8b,0x00,
+ 0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9a,0x8d,0x00,0x0a,0x00,0x10,0x08,
+ 0x0a,0xff,0xea,0x9a,0x8f,0x00,0x0a,0x00,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,
+ 0x0a,0xff,0xea,0x9a,0x91,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9a,0x93,0x00,
+ 0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9a,0x95,0x00,0x0a,0x00,0x10,0x08,
+ 0x0a,0xff,0xea,0x9a,0x97,0x00,0x0a,0x00,0xe2,0x92,0x66,0xd1,0x0c,0x10,0x08,0x10,
+ 0xff,0xea,0x9a,0x99,0x00,0x10,0x00,0x10,0x08,0x10,0xff,0xea,0x9a,0x9b,0x00,0x10,
+ 0x00,0x0b,0x00,0xe1,0x10,0x02,0xd0,0xb9,0xcf,0x86,0xd5,0x07,0x64,0x9e,0x66,0x08,
+ 0x00,0xd4,0x58,0xd3,0x28,0xd2,0x10,0x51,0x04,0x09,0x00,0x10,0x08,0x0a,0xff,0xea,
+ 0x9c,0xa3,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9c,0xa5,0x00,0x0a,
+ 0x00,0x10,0x08,0x0a,0xff,0xea,0x9c,0xa7,0x00,0x0a,0x00,0xd2,0x18,0xd1,0x0c,0x10,
+ 0x08,0x0a,0xff,0xea,0x9c,0xa9,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9c,0xab,
+ 0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9c,0xad,0x00,0x0a,0x00,0x10,
+ 0x08,0x0a,0xff,0xea,0x9c,0xaf,0x00,0x0a,0x00,0xd3,0x28,0xd2,0x10,0x51,0x04,0x0a,
+ 0x00,0x10,0x08,0x0a,0xff,0xea,0x9c,0xb3,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,
+ 0xff,0xea,0x9c,0xb5,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9c,0xb7,0x00,0x0a,
+ 0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9c,0xb9,0x00,0x0a,0x00,0x10,
+ 0x08,0x0a,0xff,0xea,0x9c,0xbb,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,
+ 0x9c,0xbd,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9c,0xbf,0x00,0x0a,0x00,0xcf,
+ 0x86,0xd5,0xc0,0xd4,0x60,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,
+ 0x9d,0x81,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0x83,0x00,0x0a,0x00,0xd1,
+ 0x0c,0x10,0x08,0x0a,0xff,0xea,0x9d,0x85,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,
+ 0x9d,0x87,0x00,0x0a,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9d,0x89,
+ 0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0x8b,0x00,0x0a,0x00,0xd1,0x0c,0x10,
+ 0x08,0x0a,0xff,0xea,0x9d,0x8d,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0x8f,
+ 0x00,0x0a,0x00,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9d,0x91,
+ 0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0x93,0x00,0x0a,0x00,0xd1,0x0c,0x10,
+ 0x08,0x0a,0xff,0xea,0x9d,0x95,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0x97,
+ 0x00,0x0a,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9d,0x99,0x00,0x0a,
+ 0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0x9b,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,
+ 0xff,0xea,0x9d,0x9d,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0x9f,0x00,0x0a,
+ 0x00,0xd4,0x60,0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9d,0xa1,
+ 0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0xa3,0x00,0x0a,0x00,0xd1,0x0c,0x10,
+ 0x08,0x0a,0xff,0xea,0x9d,0xa5,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0xa7,
+ 0x00,0x0a,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9d,0xa9,0x00,0x0a,
+ 0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0xab,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,
+ 0xff,0xea,0x9d,0xad,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0xaf,0x00,0x0a,
+ 0x00,0x53,0x04,0x0a,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x04,0x0a,0x00,0x0a,0xff,0xea,
+ 0x9d,0xba,0x00,0x10,0x04,0x0a,0x00,0x0a,0xff,0xea,0x9d,0xbc,0x00,0xd1,0x0c,0x10,
+ 0x04,0x0a,0x00,0x0a,0xff,0xe1,0xb5,0xb9,0x00,0x10,0x08,0x0a,0xff,0xea,0x9d,0xbf,
+ 0x00,0x0a,0x00,0xe0,0x71,0x01,0xcf,0x86,0xd5,0xa6,0xd4,0x4e,0xd3,0x30,0xd2,0x18,
+ 0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9e,0x81,0x00,0x0a,0x00,0x10,0x08,0x0a,0xff,
+ 0xea,0x9e,0x83,0x00,0x0a,0x00,0xd1,0x0c,0x10,0x08,0x0a,0xff,0xea,0x9e,0x85,0x00,
+ 0x0a,0x00,0x10,0x08,0x0a,0xff,0xea,0x9e,0x87,0x00,0x0a,0x00,0xd2,0x10,0x51,0x04,
+ 0x0a,0x00,0x10,0x04,0x0a,0x00,0x0a,0xff,0xea,0x9e,0x8c,0x00,0xe1,0x9a,0x64,0x10,
+ 0x04,0x0a,0x00,0x0c,0xff,0xc9,0xa5,0x00,0xd3,0x28,0xd2,0x18,0xd1,0x0c,0x10,0x08,
+ 0x0c,0xff,0xea,0x9e,0x91,0x00,0x0c,0x00,0x10,0x08,0x0d,0xff,0xea,0x9e,0x93,0x00,
+ 0x0d,0x00,0x51,0x04,0x10,0x00,0x10,0x08,0x10,0xff,0xea,0x9e,0x97,0x00,0x10,0x00,
+ 0xd2,0x18,0xd1,0x0c,0x10,0x08,0x10,0xff,0xea,0x9e,0x99,0x00,0x10,0x00,0x10,0x08,
+ 0x10,0xff,0xea,0x9e,0x9b,0x00,0x10,0x00,0xd1,0x0c,0x10,0x08,0x10,0xff,0xea,0x9e,
+ 0x9d,0x00,0x10,0x00,0x10,0x08,0x10,0xff,0xea,0x9e,0x9f,0x00,0x10,0x00,0xd4,0x63,
+ 0xd3,0x30,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x0c,0xff,0xea,0x9e,0xa1,0x00,0x0c,0x00,
+ 0x10,0x08,0x0c,0xff,0xea,0x9e,0xa3,0x00,0x0c,0x00,0xd1,0x0c,0x10,0x08,0x0c,0xff,
+ 0xea,0x9e,0xa5,0x00,0x0c,0x00,0x10,0x08,0x0c,0xff,0xea,0x9e,0xa7,0x00,0x0c,0x00,
+ 0xd2,0x1a,0xd1,0x0c,0x10,0x08,0x0c,0xff,0xea,0x9e,0xa9,0x00,0x0c,0x00,0x10,0x07,
+ 0x0d,0xff,0xc9,0xa6,0x00,0x10,0xff,0xc9,0x9c,0x00,0xd1,0x0e,0x10,0x07,0x10,0xff,
+ 0xc9,0xa1,0x00,0x10,0xff,0xc9,0xac,0x00,0x10,0x07,0x12,0xff,0xc9,0xaa,0x00,0x14,
+ 0x00,0xd3,0x35,0xd2,0x1d,0xd1,0x0e,0x10,0x07,0x10,0xff,0xca,0x9e,0x00,0x10,0xff,
+ 0xca,0x87,0x00,0x10,0x07,0x11,0xff,0xca,0x9d,0x00,0x11,0xff,0xea,0xad,0x93,0x00,
+ 0xd1,0x0c,0x10,0x08,0x11,0xff,0xea,0x9e,0xb5,0x00,0x11,0x00,0x10,0x08,0x11,0xff,
+ 0xea,0x9e,0xb7,0x00,0x11,0x00,0xd2,0x18,0xd1,0x0c,0x10,0x08,0x14,0xff,0xea,0x9e,
+ 0xb9,0x00,0x14,0x00,0x10,0x08,0x15,0xff,0xea,0x9e,0xbb,0x00,0x15,0x00,0xd1,0x0c,
+ 0x10,0x08,0x15,0xff,0xea,0x9e,0xbd,0x00,0x15,0x00,0x10,0x08,0x15,0xff,0xea,0x9e,
+ 0xbf,0x00,0x15,0x00,0xcf,0x86,0xe5,0xd4,0x63,0x94,0x2f,0x93,0x2b,0xd2,0x10,0x51,
+ 0x04,0x00,0x00,0x10,0x08,0x15,0xff,0xea,0x9f,0x83,0x00,0x15,0x00,0xd1,0x0f,0x10,
+ 0x08,0x15,0xff,0xea,0x9e,0x94,0x00,0x15,0xff,0xca,0x82,0x00,0x10,0x08,0x15,0xff,
+ 0xe1,0xb6,0x8e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe4,0xb4,0x66,0xd3,0x1d,0xe2,
+ 0x5b,0x64,0xe1,0x0a,0x64,0xe0,0xf7,0x63,0xcf,0x86,0xe5,0xd8,0x63,0x94,0x0b,0x93,
+ 0x07,0x62,0xc3,0x63,0x08,0x00,0x08,0x00,0x08,0x00,0xd2,0x0f,0xe1,0x5a,0x65,0xe0,
+ 0x27,0x65,0xcf,0x86,0x65,0x0c,0x65,0x0a,0x00,0xd1,0xab,0xd0,0x1a,0xcf,0x86,0xe5,
+ 0x17,0x66,0xe4,0xfa,0x65,0xe3,0xe1,0x65,0xe2,0xd4,0x65,0x91,0x08,0x10,0x04,0x00,
+ 0x00,0x0c,0x00,0x0c,0x00,0xcf,0x86,0x55,0x04,0x10,0x00,0xd4,0x0b,0x93,0x07,0x62,
+ 0x27,0x66,0x11,0x00,0x00,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x11,0xff,
+ 0xe1,0x8e,0xa0,0x00,0x11,0xff,0xe1,0x8e,0xa1,0x00,0x10,0x08,0x11,0xff,0xe1,0x8e,
+ 0xa2,0x00,0x11,0xff,0xe1,0x8e,0xa3,0x00,0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8e,
+ 0xa4,0x00,0x11,0xff,0xe1,0x8e,0xa5,0x00,0x10,0x08,0x11,0xff,0xe1,0x8e,0xa6,0x00,
+ 0x11,0xff,0xe1,0x8e,0xa7,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8e,
+ 0xa8,0x00,0x11,0xff,0xe1,0x8e,0xa9,0x00,0x10,0x08,0x11,0xff,0xe1,0x8e,0xaa,0x00,
+ 0x11,0xff,0xe1,0x8e,0xab,0x00,0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8e,0xac,0x00,
+ 0x11,0xff,0xe1,0x8e,0xad,0x00,0x10,0x08,0x11,0xff,0xe1,0x8e,0xae,0x00,0x11,0xff,
+ 0xe1,0x8e,0xaf,0x00,0xe0,0xb2,0x65,0xcf,0x86,0xe5,0x01,0x01,0xd4,0x80,0xd3,0x40,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8e,0xb0,0x00,0x11,0xff,0xe1,0x8e,
+ 0xb1,0x00,0x10,0x08,0x11,0xff,0xe1,0x8e,0xb2,0x00,0x11,0xff,0xe1,0x8e,0xb3,0x00,
+ 0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8e,0xb4,0x00,0x11,0xff,0xe1,0x8e,0xb5,0x00,
+ 0x10,0x08,0x11,0xff,0xe1,0x8e,0xb6,0x00,0x11,0xff,0xe1,0x8e,0xb7,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8e,0xb8,0x00,0x11,0xff,0xe1,0x8e,0xb9,0x00,
+ 0x10,0x08,0x11,0xff,0xe1,0x8e,0xba,0x00,0x11,0xff,0xe1,0x8e,0xbb,0x00,0xd1,0x10,
+ 0x10,0x08,0x11,0xff,0xe1,0x8e,0xbc,0x00,0x11,0xff,0xe1,0x8e,0xbd,0x00,0x10,0x08,
+ 0x11,0xff,0xe1,0x8e,0xbe,0x00,0x11,0xff,0xe1,0x8e,0xbf,0x00,0xd3,0x40,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8f,0x80,0x00,0x11,0xff,0xe1,0x8f,0x81,0x00,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0x82,0x00,0x11,0xff,0xe1,0x8f,0x83,0x00,0xd1,0x10,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0x84,0x00,0x11,0xff,0xe1,0x8f,0x85,0x00,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0x86,0x00,0x11,0xff,0xe1,0x8f,0x87,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0x88,0x00,0x11,0xff,0xe1,0x8f,0x89,0x00,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0x8a,0x00,0x11,0xff,0xe1,0x8f,0x8b,0x00,0xd1,0x10,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0x8c,0x00,0x11,0xff,0xe1,0x8f,0x8d,0x00,0x10,0x08,0x11,0xff,
+ 0xe1,0x8f,0x8e,0x00,0x11,0xff,0xe1,0x8f,0x8f,0x00,0xd4,0x80,0xd3,0x40,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x11,0xff,0xe1,0x8f,0x90,0x00,0x11,0xff,0xe1,0x8f,0x91,0x00,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0x92,0x00,0x11,0xff,0xe1,0x8f,0x93,0x00,0xd1,0x10,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0x94,0x00,0x11,0xff,0xe1,0x8f,0x95,0x00,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0x96,0x00,0x11,0xff,0xe1,0x8f,0x97,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0x98,0x00,0x11,0xff,0xe1,0x8f,0x99,0x00,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0x9a,0x00,0x11,0xff,0xe1,0x8f,0x9b,0x00,0xd1,0x10,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0x9c,0x00,0x11,0xff,0xe1,0x8f,0x9d,0x00,0x10,0x08,0x11,0xff,
+ 0xe1,0x8f,0x9e,0x00,0x11,0xff,0xe1,0x8f,0x9f,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x11,0xff,0xe1,0x8f,0xa0,0x00,0x11,0xff,0xe1,0x8f,0xa1,0x00,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0xa2,0x00,0x11,0xff,0xe1,0x8f,0xa3,0x00,0xd1,0x10,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0xa4,0x00,0x11,0xff,0xe1,0x8f,0xa5,0x00,0x10,0x08,0x11,0xff,
+ 0xe1,0x8f,0xa6,0x00,0x11,0xff,0xe1,0x8f,0xa7,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x11,0xff,0xe1,0x8f,0xa8,0x00,0x11,0xff,0xe1,0x8f,0xa9,0x00,0x10,0x08,0x11,0xff,
+ 0xe1,0x8f,0xaa,0x00,0x11,0xff,0xe1,0x8f,0xab,0x00,0xd1,0x10,0x10,0x08,0x11,0xff,
+ 0xe1,0x8f,0xac,0x00,0x11,0xff,0xe1,0x8f,0xad,0x00,0x10,0x08,0x11,0xff,0xe1,0x8f,
+ 0xae,0x00,0x11,0xff,0xe1,0x8f,0xaf,0x00,0xd1,0x0c,0xe0,0xeb,0x63,0xcf,0x86,0xcf,
+ 0x06,0x02,0xff,0xff,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x01,0x00,0xcf,0x86,0xd5,0x06,
+ 0xcf,0x06,0x01,0x00,0xd4,0xae,0xd3,0x09,0xe2,0x54,0x64,0xcf,0x06,0x01,0x00,0xd2,
+ 0x27,0xe1,0x1f,0x70,0xe0,0x26,0x6e,0xcf,0x86,0xe5,0x3f,0x6d,0xe4,0xce,0x6c,0xe3,
+ 0x99,0x6c,0xe2,0x78,0x6c,0xe1,0x67,0x6c,0x10,0x08,0x01,0xff,0xe5,0x88,0x87,0x00,
+ 0x01,0xff,0xe5,0xba,0xa6,0x00,0xe1,0x74,0x74,0xe0,0xe8,0x73,0xcf,0x86,0xe5,0x22,
+ 0x73,0xd4,0x3b,0x93,0x37,0xd2,0x1d,0xd1,0x0e,0x10,0x07,0x01,0xff,0x66,0x66,0x00,
+ 0x01,0xff,0x66,0x69,0x00,0x10,0x07,0x01,0xff,0x66,0x6c,0x00,0x01,0xff,0x66,0x66,
+ 0x69,0x00,0xd1,0x0f,0x10,0x08,0x01,0xff,0x66,0x66,0x6c,0x00,0x01,0xff,0x73,0x74,
+ 0x00,0x10,0x07,0x01,0xff,0x73,0x74,0x00,0x00,0x00,0x00,0x00,0xe3,0xc8,0x72,0xd2,
+ 0x11,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0xff,0xd5,0xb4,0xd5,0xb6,0x00,
+ 0xd1,0x12,0x10,0x09,0x01,0xff,0xd5,0xb4,0xd5,0xa5,0x00,0x01,0xff,0xd5,0xb4,0xd5,
+ 0xab,0x00,0x10,0x09,0x01,0xff,0xd5,0xbe,0xd5,0xb6,0x00,0x01,0xff,0xd5,0xb4,0xd5,
+ 0xad,0x00,0xd3,0x09,0xe2,0x40,0x74,0xcf,0x06,0x01,0x00,0xd2,0x13,0xe1,0x30,0x75,
+ 0xe0,0xc1,0x74,0xcf,0x86,0xe5,0x9e,0x74,0x64,0x8d,0x74,0x06,0xff,0x00,0xe1,0x96,
+ 0x75,0xe0,0x63,0x75,0xcf,0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x7c,
+ 0xd3,0x3c,0xd2,0x1c,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0xef,0xbd,0x81,0x00,
+ 0x10,0x08,0x01,0xff,0xef,0xbd,0x82,0x00,0x01,0xff,0xef,0xbd,0x83,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xef,0xbd,0x84,0x00,0x01,0xff,0xef,0xbd,0x85,0x00,0x10,0x08,
+ 0x01,0xff,0xef,0xbd,0x86,0x00,0x01,0xff,0xef,0xbd,0x87,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xef,0xbd,0x88,0x00,0x01,0xff,0xef,0xbd,0x89,0x00,0x10,0x08,
+ 0x01,0xff,0xef,0xbd,0x8a,0x00,0x01,0xff,0xef,0xbd,0x8b,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xef,0xbd,0x8c,0x00,0x01,0xff,0xef,0xbd,0x8d,0x00,0x10,0x08,0x01,0xff,
+ 0xef,0xbd,0x8e,0x00,0x01,0xff,0xef,0xbd,0x8f,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xef,0xbd,0x90,0x00,0x01,0xff,0xef,0xbd,0x91,0x00,0x10,0x08,
+ 0x01,0xff,0xef,0xbd,0x92,0x00,0x01,0xff,0xef,0xbd,0x93,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xef,0xbd,0x94,0x00,0x01,0xff,0xef,0xbd,0x95,0x00,0x10,0x08,0x01,0xff,
+ 0xef,0xbd,0x96,0x00,0x01,0xff,0xef,0xbd,0x97,0x00,0x92,0x1c,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xef,0xbd,0x98,0x00,0x01,0xff,0xef,0xbd,0x99,0x00,0x10,0x08,0x01,0xff,
+ 0xef,0xbd,0x9a,0x00,0x01,0x00,0x01,0x00,0x83,0xe2,0x87,0xb3,0xe1,0x60,0xb0,0xe0,
+ 0xdd,0xae,0xcf,0x86,0xe5,0x81,0x9b,0xc4,0xe3,0xc1,0x07,0xe2,0x62,0x06,0xe1,0x11,
+ 0x86,0xe0,0x09,0x05,0xcf,0x86,0xe5,0xfb,0x02,0xd4,0x1c,0xe3,0x7f,0x76,0xe2,0xd6,
+ 0x75,0xe1,0xb1,0x75,0xe0,0x8a,0x75,0xcf,0x86,0xe5,0x57,0x75,0x94,0x07,0x63,0x42,
+ 0x75,0x07,0x00,0x07,0x00,0xe3,0x2b,0x78,0xe2,0xf0,0x77,0xe1,0x77,0x01,0xe0,0x88,
+ 0x77,0xcf,0x86,0xe5,0x21,0x01,0xd4,0x90,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,
+ 0x05,0xff,0xf0,0x90,0x90,0xa8,0x00,0x05,0xff,0xf0,0x90,0x90,0xa9,0x00,0x10,0x09,
+ 0x05,0xff,0xf0,0x90,0x90,0xaa,0x00,0x05,0xff,0xf0,0x90,0x90,0xab,0x00,0xd1,0x12,
+ 0x10,0x09,0x05,0xff,0xf0,0x90,0x90,0xac,0x00,0x05,0xff,0xf0,0x90,0x90,0xad,0x00,
+ 0x10,0x09,0x05,0xff,0xf0,0x90,0x90,0xae,0x00,0x05,0xff,0xf0,0x90,0x90,0xaf,0x00,
+ 0xd2,0x24,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0x90,0x90,0xb0,0x00,0x05,0xff,0xf0,
+ 0x90,0x90,0xb1,0x00,0x10,0x09,0x05,0xff,0xf0,0x90,0x90,0xb2,0x00,0x05,0xff,0xf0,
+ 0x90,0x90,0xb3,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0x90,0x90,0xb4,0x00,0x05,
+ 0xff,0xf0,0x90,0x90,0xb5,0x00,0x10,0x09,0x05,0xff,0xf0,0x90,0x90,0xb6,0x00,0x05,
+ 0xff,0xf0,0x90,0x90,0xb7,0x00,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x05,0xff,
+ 0xf0,0x90,0x90,0xb8,0x00,0x05,0xff,0xf0,0x90,0x90,0xb9,0x00,0x10,0x09,0x05,0xff,
+ 0xf0,0x90,0x90,0xba,0x00,0x05,0xff,0xf0,0x90,0x90,0xbb,0x00,0xd1,0x12,0x10,0x09,
+ 0x05,0xff,0xf0,0x90,0x90,0xbc,0x00,0x05,0xff,0xf0,0x90,0x90,0xbd,0x00,0x10,0x09,
+ 0x05,0xff,0xf0,0x90,0x90,0xbe,0x00,0x05,0xff,0xf0,0x90,0x90,0xbf,0x00,0xd2,0x24,
+ 0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0x90,0x91,0x80,0x00,0x05,0xff,0xf0,0x90,0x91,
+ 0x81,0x00,0x10,0x09,0x05,0xff,0xf0,0x90,0x91,0x82,0x00,0x05,0xff,0xf0,0x90,0x91,
+ 0x83,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0x90,0x91,0x84,0x00,0x05,0xff,0xf0,
+ 0x90,0x91,0x85,0x00,0x10,0x09,0x05,0xff,0xf0,0x90,0x91,0x86,0x00,0x05,0xff,0xf0,
+ 0x90,0x91,0x87,0x00,0x94,0x4c,0x93,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x05,0xff,
+ 0xf0,0x90,0x91,0x88,0x00,0x05,0xff,0xf0,0x90,0x91,0x89,0x00,0x10,0x09,0x05,0xff,
+ 0xf0,0x90,0x91,0x8a,0x00,0x05,0xff,0xf0,0x90,0x91,0x8b,0x00,0xd1,0x12,0x10,0x09,
+ 0x05,0xff,0xf0,0x90,0x91,0x8c,0x00,0x05,0xff,0xf0,0x90,0x91,0x8d,0x00,0x10,0x09,
+ 0x07,0xff,0xf0,0x90,0x91,0x8e,0x00,0x07,0xff,0xf0,0x90,0x91,0x8f,0x00,0x05,0x00,
+ 0x05,0x00,0xd0,0xa0,0xcf,0x86,0xd5,0x07,0x64,0x30,0x76,0x07,0x00,0xd4,0x07,0x63,
+ 0x3d,0x76,0x07,0x00,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x90,
+ 0x93,0x98,0x00,0x12,0xff,0xf0,0x90,0x93,0x99,0x00,0x10,0x09,0x12,0xff,0xf0,0x90,
+ 0x93,0x9a,0x00,0x12,0xff,0xf0,0x90,0x93,0x9b,0x00,0xd1,0x12,0x10,0x09,0x12,0xff,
+ 0xf0,0x90,0x93,0x9c,0x00,0x12,0xff,0xf0,0x90,0x93,0x9d,0x00,0x10,0x09,0x12,0xff,
+ 0xf0,0x90,0x93,0x9e,0x00,0x12,0xff,0xf0,0x90,0x93,0x9f,0x00,0xd2,0x24,0xd1,0x12,
+ 0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xa0,0x00,0x12,0xff,0xf0,0x90,0x93,0xa1,0x00,
+ 0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xa2,0x00,0x12,0xff,0xf0,0x90,0x93,0xa3,0x00,
+ 0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xa4,0x00,0x12,0xff,0xf0,0x90,0x93,
+ 0xa5,0x00,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xa6,0x00,0x12,0xff,0xf0,0x90,0x93,
+ 0xa7,0x00,0xcf,0x86,0xe5,0xc6,0x75,0xd4,0x90,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,
+ 0x09,0x12,0xff,0xf0,0x90,0x93,0xa8,0x00,0x12,0xff,0xf0,0x90,0x93,0xa9,0x00,0x10,
+ 0x09,0x12,0xff,0xf0,0x90,0x93,0xaa,0x00,0x12,0xff,0xf0,0x90,0x93,0xab,0x00,0xd1,
+ 0x12,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xac,0x00,0x12,0xff,0xf0,0x90,0x93,0xad,
+ 0x00,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xae,0x00,0x12,0xff,0xf0,0x90,0x93,0xaf,
+ 0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xb0,0x00,0x12,0xff,
+ 0xf0,0x90,0x93,0xb1,0x00,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xb2,0x00,0x12,0xff,
+ 0xf0,0x90,0x93,0xb3,0x00,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xb4,0x00,
+ 0x12,0xff,0xf0,0x90,0x93,0xb5,0x00,0x10,0x09,0x12,0xff,0xf0,0x90,0x93,0xb6,0x00,
+ 0x12,0xff,0xf0,0x90,0x93,0xb7,0x00,0x93,0x28,0x92,0x24,0xd1,0x12,0x10,0x09,0x12,
+ 0xff,0xf0,0x90,0x93,0xb8,0x00,0x12,0xff,0xf0,0x90,0x93,0xb9,0x00,0x10,0x09,0x12,
+ 0xff,0xf0,0x90,0x93,0xba,0x00,0x12,0xff,0xf0,0x90,0x93,0xbb,0x00,0x00,0x00,0x12,
+ 0x00,0xd4,0x1f,0xe3,0xdf,0x76,0xe2,0x6a,0x76,0xe1,0x09,0x76,0xe0,0xea,0x75,0xcf,
+ 0x86,0xe5,0xb7,0x75,0x94,0x0a,0xe3,0xa2,0x75,0x62,0x99,0x75,0x07,0x00,0x07,0x00,
+ 0xe3,0xde,0x78,0xe2,0xaf,0x78,0xd1,0x09,0xe0,0x4c,0x78,0xcf,0x06,0x0b,0x00,0xe0,
+ 0x7f,0x78,0xcf,0x86,0xe5,0x21,0x01,0xd4,0x90,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,
+ 0x09,0x11,0xff,0xf0,0x90,0xb3,0x80,0x00,0x11,0xff,0xf0,0x90,0xb3,0x81,0x00,0x10,
+ 0x09,0x11,0xff,0xf0,0x90,0xb3,0x82,0x00,0x11,0xff,0xf0,0x90,0xb3,0x83,0x00,0xd1,
+ 0x12,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x84,0x00,0x11,0xff,0xf0,0x90,0xb3,0x85,
+ 0x00,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x86,0x00,0x11,0xff,0xf0,0x90,0xb3,0x87,
+ 0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x88,0x00,0x11,0xff,
+ 0xf0,0x90,0xb3,0x89,0x00,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x8a,0x00,0x11,0xff,
+ 0xf0,0x90,0xb3,0x8b,0x00,0xd1,0x12,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x8c,0x00,
+ 0x11,0xff,0xf0,0x90,0xb3,0x8d,0x00,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x8e,0x00,
+ 0x11,0xff,0xf0,0x90,0xb3,0x8f,0x00,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x11,
+ 0xff,0xf0,0x90,0xb3,0x90,0x00,0x11,0xff,0xf0,0x90,0xb3,0x91,0x00,0x10,0x09,0x11,
+ 0xff,0xf0,0x90,0xb3,0x92,0x00,0x11,0xff,0xf0,0x90,0xb3,0x93,0x00,0xd1,0x12,0x10,
+ 0x09,0x11,0xff,0xf0,0x90,0xb3,0x94,0x00,0x11,0xff,0xf0,0x90,0xb3,0x95,0x00,0x10,
+ 0x09,0x11,0xff,0xf0,0x90,0xb3,0x96,0x00,0x11,0xff,0xf0,0x90,0xb3,0x97,0x00,0xd2,
+ 0x24,0xd1,0x12,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x98,0x00,0x11,0xff,0xf0,0x90,
+ 0xb3,0x99,0x00,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x9a,0x00,0x11,0xff,0xf0,0x90,
+ 0xb3,0x9b,0x00,0xd1,0x12,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x9c,0x00,0x11,0xff,
+ 0xf0,0x90,0xb3,0x9d,0x00,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0x9e,0x00,0x11,0xff,
+ 0xf0,0x90,0xb3,0x9f,0x00,0xd4,0x90,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x11,
+ 0xff,0xf0,0x90,0xb3,0xa0,0x00,0x11,0xff,0xf0,0x90,0xb3,0xa1,0x00,0x10,0x09,0x11,
+ 0xff,0xf0,0x90,0xb3,0xa2,0x00,0x11,0xff,0xf0,0x90,0xb3,0xa3,0x00,0xd1,0x12,0x10,
+ 0x09,0x11,0xff,0xf0,0x90,0xb3,0xa4,0x00,0x11,0xff,0xf0,0x90,0xb3,0xa5,0x00,0x10,
+ 0x09,0x11,0xff,0xf0,0x90,0xb3,0xa6,0x00,0x11,0xff,0xf0,0x90,0xb3,0xa7,0x00,0xd2,
+ 0x24,0xd1,0x12,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0xa8,0x00,0x11,0xff,0xf0,0x90,
+ 0xb3,0xa9,0x00,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0xaa,0x00,0x11,0xff,0xf0,0x90,
+ 0xb3,0xab,0x00,0xd1,0x12,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0xac,0x00,0x11,0xff,
+ 0xf0,0x90,0xb3,0xad,0x00,0x10,0x09,0x11,0xff,0xf0,0x90,0xb3,0xae,0x00,0x11,0xff,
+ 0xf0,0x90,0xb3,0xaf,0x00,0x93,0x23,0x92,0x1f,0xd1,0x12,0x10,0x09,0x11,0xff,0xf0,
+ 0x90,0xb3,0xb0,0x00,0x11,0xff,0xf0,0x90,0xb3,0xb1,0x00,0x10,0x09,0x11,0xff,0xf0,
+ 0x90,0xb3,0xb2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xd5,0x15,0xe4,0x91,
+ 0x7b,0xe3,0x9b,0x79,0xe2,0x94,0x78,0xe1,0xe4,0x77,0xe0,0x9d,0x77,0xcf,0x06,0x0c,
+ 0x00,0xe4,0xeb,0x7e,0xe3,0x44,0x7e,0xe2,0xed,0x7d,0xd1,0x0c,0xe0,0xb2,0x7d,0xcf,
+ 0x86,0x65,0x93,0x7d,0x14,0x00,0xe0,0xb6,0x7d,0xcf,0x86,0x55,0x04,0x00,0x00,0xd4,
+ 0x90,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,0x80,0x00,
+ 0x10,0xff,0xf0,0x91,0xa3,0x81,0x00,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,0x82,0x00,
+ 0x10,0xff,0xf0,0x91,0xa3,0x83,0x00,0xd1,0x12,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,
+ 0x84,0x00,0x10,0xff,0xf0,0x91,0xa3,0x85,0x00,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,
+ 0x86,0x00,0x10,0xff,0xf0,0x91,0xa3,0x87,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x10,
+ 0xff,0xf0,0x91,0xa3,0x88,0x00,0x10,0xff,0xf0,0x91,0xa3,0x89,0x00,0x10,0x09,0x10,
+ 0xff,0xf0,0x91,0xa3,0x8a,0x00,0x10,0xff,0xf0,0x91,0xa3,0x8b,0x00,0xd1,0x12,0x10,
+ 0x09,0x10,0xff,0xf0,0x91,0xa3,0x8c,0x00,0x10,0xff,0xf0,0x91,0xa3,0x8d,0x00,0x10,
+ 0x09,0x10,0xff,0xf0,0x91,0xa3,0x8e,0x00,0x10,0xff,0xf0,0x91,0xa3,0x8f,0x00,0xd3,
+ 0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,0x90,0x00,0x10,0xff,
+ 0xf0,0x91,0xa3,0x91,0x00,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,0x92,0x00,0x10,0xff,
+ 0xf0,0x91,0xa3,0x93,0x00,0xd1,0x12,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,0x94,0x00,
+ 0x10,0xff,0xf0,0x91,0xa3,0x95,0x00,0x10,0x09,0x10,0xff,0xf0,0x91,0xa3,0x96,0x00,
+ 0x10,0xff,0xf0,0x91,0xa3,0x97,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x10,0xff,0xf0,
+ 0x91,0xa3,0x98,0x00,0x10,0xff,0xf0,0x91,0xa3,0x99,0x00,0x10,0x09,0x10,0xff,0xf0,
+ 0x91,0xa3,0x9a,0x00,0x10,0xff,0xf0,0x91,0xa3,0x9b,0x00,0xd1,0x12,0x10,0x09,0x10,
+ 0xff,0xf0,0x91,0xa3,0x9c,0x00,0x10,0xff,0xf0,0x91,0xa3,0x9d,0x00,0x10,0x09,0x10,
+ 0xff,0xf0,0x91,0xa3,0x9e,0x00,0x10,0xff,0xf0,0x91,0xa3,0x9f,0x00,0xd1,0x11,0xe0,
+ 0x12,0x81,0xcf,0x86,0xe5,0x09,0x81,0xe4,0xd2,0x80,0xcf,0x06,0x00,0x00,0xe0,0xdb,
+ 0x82,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x09,0xe3,0x10,0x81,0xcf,0x06,
+ 0x0c,0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,0xe2,0x3b,0x82,0xe1,0x16,0x82,0xd0,0x06,
+ 0xcf,0x06,0x00,0x00,0xcf,0x86,0xa5,0x21,0x01,0xd4,0x90,0xd3,0x48,0xd2,0x24,0xd1,
+ 0x12,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xa0,0x00,0x14,0xff,0xf0,0x96,0xb9,0xa1,
+ 0x00,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xa2,0x00,0x14,0xff,0xf0,0x96,0xb9,0xa3,
+ 0x00,0xd1,0x12,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xa4,0x00,0x14,0xff,0xf0,0x96,
+ 0xb9,0xa5,0x00,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xa6,0x00,0x14,0xff,0xf0,0x96,
+ 0xb9,0xa7,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xa8,0x00,
+ 0x14,0xff,0xf0,0x96,0xb9,0xa9,0x00,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xaa,0x00,
+ 0x14,0xff,0xf0,0x96,0xb9,0xab,0x00,0xd1,0x12,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,
+ 0xac,0x00,0x14,0xff,0xf0,0x96,0xb9,0xad,0x00,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,
+ 0xae,0x00,0x14,0xff,0xf0,0x96,0xb9,0xaf,0x00,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,
+ 0x09,0x14,0xff,0xf0,0x96,0xb9,0xb0,0x00,0x14,0xff,0xf0,0x96,0xb9,0xb1,0x00,0x10,
+ 0x09,0x14,0xff,0xf0,0x96,0xb9,0xb2,0x00,0x14,0xff,0xf0,0x96,0xb9,0xb3,0x00,0xd1,
+ 0x12,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xb4,0x00,0x14,0xff,0xf0,0x96,0xb9,0xb5,
+ 0x00,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xb6,0x00,0x14,0xff,0xf0,0x96,0xb9,0xb7,
+ 0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xb8,0x00,0x14,0xff,
+ 0xf0,0x96,0xb9,0xb9,0x00,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xba,0x00,0x14,0xff,
+ 0xf0,0x96,0xb9,0xbb,0x00,0xd1,0x12,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xbc,0x00,
+ 0x14,0xff,0xf0,0x96,0xb9,0xbd,0x00,0x10,0x09,0x14,0xff,0xf0,0x96,0xb9,0xbe,0x00,
+ 0x14,0xff,0xf0,0x96,0xb9,0xbf,0x00,0x14,0x00,0xd2,0x14,0xe1,0x25,0x82,0xe0,0x1c,
+ 0x82,0xcf,0x86,0xe5,0xdd,0x81,0xe4,0x9a,0x81,0xcf,0x06,0x12,0x00,0xd1,0x0b,0xe0,
+ 0x51,0x83,0xcf,0x86,0xcf,0x06,0x00,0x00,0xe0,0x95,0x8b,0xcf,0x86,0xd5,0x22,0xe4,
+ 0xd0,0x88,0xe3,0x93,0x88,0xe2,0x38,0x88,0xe1,0x31,0x88,0xe0,0x2a,0x88,0xcf,0x86,
+ 0xe5,0xfb,0x87,0xe4,0xe2,0x87,0x93,0x07,0x62,0xd1,0x87,0x12,0xe6,0x12,0xe6,0xe4,
+ 0x36,0x89,0xe3,0x2f,0x89,0xd2,0x09,0xe1,0xb8,0x88,0xcf,0x06,0x10,0x00,0xe1,0x1f,
+ 0x89,0xe0,0xec,0x88,0xcf,0x86,0xe5,0x21,0x01,0xd4,0x90,0xd3,0x48,0xd2,0x24,0xd1,
+ 0x12,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xa2,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xa3,
+ 0x00,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xa4,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xa5,
+ 0x00,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xa6,0x00,0x12,0xff,0xf0,0x9e,
+ 0xa4,0xa7,0x00,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xa8,0x00,0x12,0xff,0xf0,0x9e,
+ 0xa4,0xa9,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xaa,0x00,
+ 0x12,0xff,0xf0,0x9e,0xa4,0xab,0x00,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xac,0x00,
+ 0x12,0xff,0xf0,0x9e,0xa4,0xad,0x00,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,
+ 0xae,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xaf,0x00,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,
+ 0xb0,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xb1,0x00,0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,
+ 0x09,0x12,0xff,0xf0,0x9e,0xa4,0xb2,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xb3,0x00,0x10,
+ 0x09,0x12,0xff,0xf0,0x9e,0xa4,0xb4,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xb5,0x00,0xd1,
+ 0x12,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xb6,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xb7,
+ 0x00,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xb8,0x00,0x12,0xff,0xf0,0x9e,0xa4,0xb9,
+ 0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xba,0x00,0x12,0xff,
+ 0xf0,0x9e,0xa4,0xbb,0x00,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xbc,0x00,0x12,0xff,
+ 0xf0,0x9e,0xa4,0xbd,0x00,0xd1,0x12,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa4,0xbe,0x00,
+ 0x12,0xff,0xf0,0x9e,0xa4,0xbf,0x00,0x10,0x09,0x12,0xff,0xf0,0x9e,0xa5,0x80,0x00,
+ 0x12,0xff,0xf0,0x9e,0xa5,0x81,0x00,0x94,0x1e,0x93,0x1a,0x92,0x16,0x91,0x12,0x10,
+ 0x09,0x12,0xff,0xf0,0x9e,0xa5,0x82,0x00,0x12,0xff,0xf0,0x9e,0xa5,0x83,0x00,0x12,
+ 0x00,0x12,0x00,0x12,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ /* nfdi_c0100 */
+ 0x57,0x04,0x01,0x00,0xc6,0xe5,0xac,0x13,0xe4,0x41,0x0c,0xe3,0x7a,0x07,0xe2,0xf3,
+ 0x01,0xc1,0xd0,0x1f,0xcf,0x86,0x55,0x04,0x01,0x00,0x94,0x15,0x53,0x04,0x01,0x00,
+ 0x52,0x04,0x01,0x00,0x91,0x09,0x10,0x04,0x01,0x00,0x01,0xff,0x00,0x01,0x00,0x01,
+ 0x00,0xcf,0x86,0xd5,0xe4,0xd4,0x7c,0xd3,0x3c,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x41,0xcc,0x80,0x00,0x01,0xff,0x41,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x41,
+ 0xcc,0x82,0x00,0x01,0xff,0x41,0xcc,0x83,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x41,
+ 0xcc,0x88,0x00,0x01,0xff,0x41,0xcc,0x8a,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0x43,
+ 0xcc,0xa7,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x45,0xcc,0x80,0x00,0x01,
+ 0xff,0x45,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x45,0xcc,0x82,0x00,0x01,0xff,0x45,
+ 0xcc,0x88,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x49,0xcc,0x80,0x00,0x01,0xff,0x49,
+ 0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x49,0xcc,0x82,0x00,0x01,0xff,0x49,0xcc,0x88,
+ 0x00,0xd3,0x38,0xd2,0x1c,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0x4e,0xcc,0x83,
+ 0x00,0x10,0x08,0x01,0xff,0x4f,0xcc,0x80,0x00,0x01,0xff,0x4f,0xcc,0x81,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x4f,0xcc,0x82,0x00,0x01,0xff,0x4f,0xcc,0x83,0x00,0x10,
+ 0x08,0x01,0xff,0x4f,0xcc,0x88,0x00,0x01,0x00,0xd2,0x1c,0xd1,0x0c,0x10,0x04,0x01,
+ 0x00,0x01,0xff,0x55,0xcc,0x80,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,0x81,0x00,0x01,
+ 0xff,0x55,0xcc,0x82,0x00,0x91,0x10,0x10,0x08,0x01,0xff,0x55,0xcc,0x88,0x00,0x01,
+ 0xff,0x59,0xcc,0x81,0x00,0x01,0x00,0xd4,0x7c,0xd3,0x3c,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x61,0xcc,0x80,0x00,0x01,0xff,0x61,0xcc,0x81,0x00,0x10,0x08,0x01,
+ 0xff,0x61,0xcc,0x82,0x00,0x01,0xff,0x61,0xcc,0x83,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x61,0xcc,0x88,0x00,0x01,0xff,0x61,0xcc,0x8a,0x00,0x10,0x04,0x01,0x00,0x01,
+ 0xff,0x63,0xcc,0xa7,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x65,0xcc,0x80,
+ 0x00,0x01,0xff,0x65,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x65,0xcc,0x82,0x00,0x01,
+ 0xff,0x65,0xcc,0x88,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x69,0xcc,0x80,0x00,0x01,
+ 0xff,0x69,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x69,0xcc,0x82,0x00,0x01,0xff,0x69,
+ 0xcc,0x88,0x00,0xd3,0x38,0xd2,0x1c,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0x6e,
+ 0xcc,0x83,0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x80,0x00,0x01,0xff,0x6f,0xcc,0x81,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x6f,0xcc,0x82,0x00,0x01,0xff,0x6f,0xcc,0x83,
+ 0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x88,0x00,0x01,0x00,0xd2,0x1c,0xd1,0x0c,0x10,
+ 0x04,0x01,0x00,0x01,0xff,0x75,0xcc,0x80,0x00,0x10,0x08,0x01,0xff,0x75,0xcc,0x81,
+ 0x00,0x01,0xff,0x75,0xcc,0x82,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x75,0xcc,0x88,
+ 0x00,0x01,0xff,0x79,0xcc,0x81,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0x79,0xcc,0x88,
+ 0x00,0xe1,0x9a,0x03,0xe0,0xd3,0x01,0xcf,0x86,0xd5,0xf4,0xd4,0x80,0xd3,0x40,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x41,0xcc,0x84,0x00,0x01,0xff,0x61,0xcc,0x84,
+ 0x00,0x10,0x08,0x01,0xff,0x41,0xcc,0x86,0x00,0x01,0xff,0x61,0xcc,0x86,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x41,0xcc,0xa8,0x00,0x01,0xff,0x61,0xcc,0xa8,0x00,0x10,
+ 0x08,0x01,0xff,0x43,0xcc,0x81,0x00,0x01,0xff,0x63,0xcc,0x81,0x00,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x43,0xcc,0x82,0x00,0x01,0xff,0x63,0xcc,0x82,0x00,0x10,
+ 0x08,0x01,0xff,0x43,0xcc,0x87,0x00,0x01,0xff,0x63,0xcc,0x87,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x43,0xcc,0x8c,0x00,0x01,0xff,0x63,0xcc,0x8c,0x00,0x10,0x08,0x01,
+ 0xff,0x44,0xcc,0x8c,0x00,0x01,0xff,0x64,0xcc,0x8c,0x00,0xd3,0x34,0xd2,0x14,0x51,
+ 0x04,0x01,0x00,0x10,0x08,0x01,0xff,0x45,0xcc,0x84,0x00,0x01,0xff,0x65,0xcc,0x84,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x45,0xcc,0x86,0x00,0x01,0xff,0x65,0xcc,0x86,
+ 0x00,0x10,0x08,0x01,0xff,0x45,0xcc,0x87,0x00,0x01,0xff,0x65,0xcc,0x87,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x45,0xcc,0xa8,0x00,0x01,0xff,0x65,0xcc,0xa8,
+ 0x00,0x10,0x08,0x01,0xff,0x45,0xcc,0x8c,0x00,0x01,0xff,0x65,0xcc,0x8c,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x47,0xcc,0x82,0x00,0x01,0xff,0x67,0xcc,0x82,0x00,0x10,
+ 0x08,0x01,0xff,0x47,0xcc,0x86,0x00,0x01,0xff,0x67,0xcc,0x86,0x00,0xd4,0x74,0xd3,
+ 0x34,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x47,0xcc,0x87,0x00,0x01,0xff,0x67,
+ 0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x47,0xcc,0xa7,0x00,0x01,0xff,0x67,0xcc,0xa7,
+ 0x00,0x91,0x10,0x10,0x08,0x01,0xff,0x48,0xcc,0x82,0x00,0x01,0xff,0x68,0xcc,0x82,
+ 0x00,0x01,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x49,0xcc,0x83,0x00,0x01,
+ 0xff,0x69,0xcc,0x83,0x00,0x10,0x08,0x01,0xff,0x49,0xcc,0x84,0x00,0x01,0xff,0x69,
+ 0xcc,0x84,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x49,0xcc,0x86,0x00,0x01,0xff,0x69,
+ 0xcc,0x86,0x00,0x10,0x08,0x01,0xff,0x49,0xcc,0xa8,0x00,0x01,0xff,0x69,0xcc,0xa8,
+ 0x00,0xd3,0x30,0xd2,0x10,0x91,0x0c,0x10,0x08,0x01,0xff,0x49,0xcc,0x87,0x00,0x01,
+ 0x00,0x01,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x4a,0xcc,0x82,0x00,0x01,0xff,0x6a,
+ 0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x4b,0xcc,0xa7,0x00,0x01,0xff,0x6b,0xcc,0xa7,
+ 0x00,0xd2,0x1c,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0x4c,0xcc,0x81,0x00,0x10,
+ 0x08,0x01,0xff,0x6c,0xcc,0x81,0x00,0x01,0xff,0x4c,0xcc,0xa7,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x6c,0xcc,0xa7,0x00,0x01,0xff,0x4c,0xcc,0x8c,0x00,0x10,0x08,0x01,
+ 0xff,0x6c,0xcc,0x8c,0x00,0x01,0x00,0xcf,0x86,0xd5,0xd4,0xd4,0x60,0xd3,0x30,0xd2,
+ 0x10,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0x4e,0xcc,0x81,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x6e,0xcc,0x81,0x00,0x01,0xff,0x4e,0xcc,0xa7,0x00,0x10,
+ 0x08,0x01,0xff,0x6e,0xcc,0xa7,0x00,0x01,0xff,0x4e,0xcc,0x8c,0x00,0xd2,0x10,0x91,
+ 0x0c,0x10,0x08,0x01,0xff,0x6e,0xcc,0x8c,0x00,0x01,0x00,0x01,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x4f,0xcc,0x84,0x00,0x01,0xff,0x6f,0xcc,0x84,0x00,0x10,0x08,0x01,
+ 0xff,0x4f,0xcc,0x86,0x00,0x01,0xff,0x6f,0xcc,0x86,0x00,0xd3,0x34,0xd2,0x14,0x91,
+ 0x10,0x10,0x08,0x01,0xff,0x4f,0xcc,0x8b,0x00,0x01,0xff,0x6f,0xcc,0x8b,0x00,0x01,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x52,0xcc,0x81,0x00,0x01,0xff,0x72,0xcc,0x81,
+ 0x00,0x10,0x08,0x01,0xff,0x52,0xcc,0xa7,0x00,0x01,0xff,0x72,0xcc,0xa7,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x52,0xcc,0x8c,0x00,0x01,0xff,0x72,0xcc,0x8c,
+ 0x00,0x10,0x08,0x01,0xff,0x53,0xcc,0x81,0x00,0x01,0xff,0x73,0xcc,0x81,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x53,0xcc,0x82,0x00,0x01,0xff,0x73,0xcc,0x82,0x00,0x10,
+ 0x08,0x01,0xff,0x53,0xcc,0xa7,0x00,0x01,0xff,0x73,0xcc,0xa7,0x00,0xd4,0x74,0xd3,
+ 0x34,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x53,0xcc,0x8c,0x00,0x01,0xff,0x73,
+ 0xcc,0x8c,0x00,0x10,0x08,0x01,0xff,0x54,0xcc,0xa7,0x00,0x01,0xff,0x74,0xcc,0xa7,
+ 0x00,0x91,0x10,0x10,0x08,0x01,0xff,0x54,0xcc,0x8c,0x00,0x01,0xff,0x74,0xcc,0x8c,
+ 0x00,0x01,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x55,0xcc,0x83,0x00,0x01,
+ 0xff,0x75,0xcc,0x83,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,0x84,0x00,0x01,0xff,0x75,
+ 0xcc,0x84,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x55,0xcc,0x86,0x00,0x01,0xff,0x75,
+ 0xcc,0x86,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,0x8a,0x00,0x01,0xff,0x75,0xcc,0x8a,
+ 0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x55,0xcc,0x8b,0x00,0x01,
+ 0xff,0x75,0xcc,0x8b,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,0xa8,0x00,0x01,0xff,0x75,
+ 0xcc,0xa8,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x57,0xcc,0x82,0x00,0x01,0xff,0x77,
+ 0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x59,0xcc,0x82,0x00,0x01,0xff,0x79,0xcc,0x82,
+ 0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x59,0xcc,0x88,0x00,0x01,0xff,0x5a,
+ 0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x7a,0xcc,0x81,0x00,0x01,0xff,0x5a,0xcc,0x87,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x7a,0xcc,0x87,0x00,0x01,0xff,0x5a,0xcc,0x8c,
+ 0x00,0x10,0x08,0x01,0xff,0x7a,0xcc,0x8c,0x00,0x01,0x00,0xd0,0x4a,0xcf,0x86,0x55,
+ 0x04,0x01,0x00,0xd4,0x2c,0xd3,0x18,0x92,0x14,0x91,0x10,0x10,0x08,0x01,0xff,0x4f,
+ 0xcc,0x9b,0x00,0x01,0xff,0x6f,0xcc,0x9b,0x00,0x01,0x00,0x01,0x00,0x52,0x04,0x01,
+ 0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0x55,0xcc,0x9b,0x00,0x93,
+ 0x14,0x92,0x10,0x91,0x0c,0x10,0x08,0x01,0xff,0x75,0xcc,0x9b,0x00,0x01,0x00,0x01,
+ 0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,0xb4,0xd4,0x24,0x53,0x04,0x01,0x00,0x52,
+ 0x04,0x01,0x00,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0x41,0xcc,0x8c,0x00,0x10,
+ 0x08,0x01,0xff,0x61,0xcc,0x8c,0x00,0x01,0xff,0x49,0xcc,0x8c,0x00,0xd3,0x46,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x69,0xcc,0x8c,0x00,0x01,0xff,0x4f,0xcc,0x8c,
+ 0x00,0x10,0x08,0x01,0xff,0x6f,0xcc,0x8c,0x00,0x01,0xff,0x55,0xcc,0x8c,0x00,0xd1,
+ 0x12,0x10,0x08,0x01,0xff,0x75,0xcc,0x8c,0x00,0x01,0xff,0x55,0xcc,0x88,0xcc,0x84,
+ 0x00,0x10,0x0a,0x01,0xff,0x75,0xcc,0x88,0xcc,0x84,0x00,0x01,0xff,0x55,0xcc,0x88,
+ 0xcc,0x81,0x00,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x75,0xcc,0x88,0xcc,0x81,
+ 0x00,0x01,0xff,0x55,0xcc,0x88,0xcc,0x8c,0x00,0x10,0x0a,0x01,0xff,0x75,0xcc,0x88,
+ 0xcc,0x8c,0x00,0x01,0xff,0x55,0xcc,0x88,0xcc,0x80,0x00,0xd1,0x0e,0x10,0x0a,0x01,
+ 0xff,0x75,0xcc,0x88,0xcc,0x80,0x00,0x01,0x00,0x10,0x0a,0x01,0xff,0x41,0xcc,0x88,
+ 0xcc,0x84,0x00,0x01,0xff,0x61,0xcc,0x88,0xcc,0x84,0x00,0xd4,0x80,0xd3,0x3a,0xd2,
+ 0x26,0xd1,0x14,0x10,0x0a,0x01,0xff,0x41,0xcc,0x87,0xcc,0x84,0x00,0x01,0xff,0x61,
+ 0xcc,0x87,0xcc,0x84,0x00,0x10,0x09,0x01,0xff,0xc3,0x86,0xcc,0x84,0x00,0x01,0xff,
+ 0xc3,0xa6,0xcc,0x84,0x00,0x51,0x04,0x01,0x00,0x10,0x08,0x01,0xff,0x47,0xcc,0x8c,
+ 0x00,0x01,0xff,0x67,0xcc,0x8c,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x4b,
+ 0xcc,0x8c,0x00,0x01,0xff,0x6b,0xcc,0x8c,0x00,0x10,0x08,0x01,0xff,0x4f,0xcc,0xa8,
+ 0x00,0x01,0xff,0x6f,0xcc,0xa8,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4f,0xcc,0xa8,
+ 0xcc,0x84,0x00,0x01,0xff,0x6f,0xcc,0xa8,0xcc,0x84,0x00,0x10,0x09,0x01,0xff,0xc6,
+ 0xb7,0xcc,0x8c,0x00,0x01,0xff,0xca,0x92,0xcc,0x8c,0x00,0xd3,0x24,0xd2,0x10,0x91,
+ 0x0c,0x10,0x08,0x01,0xff,0x6a,0xcc,0x8c,0x00,0x01,0x00,0x01,0x00,0x91,0x10,0x10,
+ 0x08,0x01,0xff,0x47,0xcc,0x81,0x00,0x01,0xff,0x67,0xcc,0x81,0x00,0x04,0x00,0xd2,
+ 0x24,0xd1,0x10,0x10,0x08,0x04,0xff,0x4e,0xcc,0x80,0x00,0x04,0xff,0x6e,0xcc,0x80,
+ 0x00,0x10,0x0a,0x01,0xff,0x41,0xcc,0x8a,0xcc,0x81,0x00,0x01,0xff,0x61,0xcc,0x8a,
+ 0xcc,0x81,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xc3,0x86,0xcc,0x81,0x00,0x01,0xff,
+ 0xc3,0xa6,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xc3,0x98,0xcc,0x81,0x00,0x01,0xff,
+ 0xc3,0xb8,0xcc,0x81,0x00,0xe2,0x07,0x02,0xe1,0xae,0x01,0xe0,0x93,0x01,0xcf,0x86,
+ 0xd5,0xf4,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x41,0xcc,
+ 0x8f,0x00,0x01,0xff,0x61,0xcc,0x8f,0x00,0x10,0x08,0x01,0xff,0x41,0xcc,0x91,0x00,
+ 0x01,0xff,0x61,0xcc,0x91,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x45,0xcc,0x8f,0x00,
+ 0x01,0xff,0x65,0xcc,0x8f,0x00,0x10,0x08,0x01,0xff,0x45,0xcc,0x91,0x00,0x01,0xff,
+ 0x65,0xcc,0x91,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x49,0xcc,0x8f,0x00,
+ 0x01,0xff,0x69,0xcc,0x8f,0x00,0x10,0x08,0x01,0xff,0x49,0xcc,0x91,0x00,0x01,0xff,
+ 0x69,0xcc,0x91,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x4f,0xcc,0x8f,0x00,0x01,0xff,
+ 0x6f,0xcc,0x8f,0x00,0x10,0x08,0x01,0xff,0x4f,0xcc,0x91,0x00,0x01,0xff,0x6f,0xcc,
+ 0x91,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x52,0xcc,0x8f,0x00,
+ 0x01,0xff,0x72,0xcc,0x8f,0x00,0x10,0x08,0x01,0xff,0x52,0xcc,0x91,0x00,0x01,0xff,
+ 0x72,0xcc,0x91,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x55,0xcc,0x8f,0x00,0x01,0xff,
+ 0x75,0xcc,0x8f,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,0x91,0x00,0x01,0xff,0x75,0xcc,
+ 0x91,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x04,0xff,0x53,0xcc,0xa6,0x00,0x04,0xff,
+ 0x73,0xcc,0xa6,0x00,0x10,0x08,0x04,0xff,0x54,0xcc,0xa6,0x00,0x04,0xff,0x74,0xcc,
+ 0xa6,0x00,0x51,0x04,0x04,0x00,0x10,0x08,0x04,0xff,0x48,0xcc,0x8c,0x00,0x04,0xff,
+ 0x68,0xcc,0x8c,0x00,0xd4,0x68,0xd3,0x20,0xd2,0x0c,0x91,0x08,0x10,0x04,0x06,0x00,
+ 0x07,0x00,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x08,0x04,0xff,0x41,0xcc,0x87,0x00,
+ 0x04,0xff,0x61,0xcc,0x87,0x00,0xd2,0x24,0xd1,0x10,0x10,0x08,0x04,0xff,0x45,0xcc,
+ 0xa7,0x00,0x04,0xff,0x65,0xcc,0xa7,0x00,0x10,0x0a,0x04,0xff,0x4f,0xcc,0x88,0xcc,
+ 0x84,0x00,0x04,0xff,0x6f,0xcc,0x88,0xcc,0x84,0x00,0xd1,0x14,0x10,0x0a,0x04,0xff,
+ 0x4f,0xcc,0x83,0xcc,0x84,0x00,0x04,0xff,0x6f,0xcc,0x83,0xcc,0x84,0x00,0x10,0x08,
+ 0x04,0xff,0x4f,0xcc,0x87,0x00,0x04,0xff,0x6f,0xcc,0x87,0x00,0x93,0x30,0xd2,0x24,
+ 0xd1,0x14,0x10,0x0a,0x04,0xff,0x4f,0xcc,0x87,0xcc,0x84,0x00,0x04,0xff,0x6f,0xcc,
+ 0x87,0xcc,0x84,0x00,0x10,0x08,0x04,0xff,0x59,0xcc,0x84,0x00,0x04,0xff,0x79,0xcc,
+ 0x84,0x00,0x51,0x04,0x07,0x00,0x10,0x04,0x07,0x00,0x08,0x00,0x08,0x00,0xcf,0x86,
+ 0x95,0x14,0x94,0x10,0x93,0x0c,0x92,0x08,0x11,0x04,0x08,0x00,0x09,0x00,0x09,0x00,
+ 0x09,0x00,0x01,0x00,0x01,0x00,0xd0,0x22,0xcf,0x86,0x55,0x04,0x01,0x00,0x94,0x18,
+ 0x53,0x04,0x01,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x04,0x00,0x04,0x00,
+ 0x11,0x04,0x04,0x00,0x07,0x00,0x01,0x00,0xcf,0x86,0xd5,0x18,0x54,0x04,0x01,0x00,
+ 0x53,0x04,0x01,0x00,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,
+ 0x04,0x00,0x94,0x18,0x53,0x04,0x01,0x00,0xd2,0x08,0x11,0x04,0x01,0x00,0x04,0x00,
+ 0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x07,0x00,0x07,0x00,0xe1,0x35,0x01,0xd0,
+ 0x72,0xcf,0x86,0xd5,0x24,0x54,0x04,0x01,0xe6,0xd3,0x10,0x52,0x04,0x01,0xe6,0x91,
+ 0x08,0x10,0x04,0x01,0xe6,0x01,0xe8,0x01,0xdc,0x92,0x0c,0x51,0x04,0x01,0xdc,0x10,
+ 0x04,0x01,0xe8,0x01,0xd8,0x01,0xdc,0xd4,0x2c,0xd3,0x1c,0xd2,0x10,0xd1,0x08,0x10,
+ 0x04,0x01,0xdc,0x01,0xca,0x10,0x04,0x01,0xca,0x01,0xdc,0x51,0x04,0x01,0xdc,0x10,
+ 0x04,0x01,0xdc,0x01,0xca,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0xca,0x01,0xdc,0x01,
+ 0xdc,0x01,0xdc,0xd3,0x08,0x12,0x04,0x01,0xdc,0x01,0x01,0xd2,0x0c,0x91,0x08,0x10,
+ 0x04,0x01,0x01,0x01,0xdc,0x01,0xdc,0x91,0x08,0x10,0x04,0x01,0xdc,0x01,0xe6,0x01,
+ 0xe6,0xcf,0x86,0xd5,0x7f,0xd4,0x47,0xd3,0x2e,0xd2,0x19,0xd1,0x0e,0x10,0x07,0x01,
+ 0xff,0xcc,0x80,0x00,0x01,0xff,0xcc,0x81,0x00,0x10,0x04,0x01,0xe6,0x01,0xff,0xcc,
+ 0x93,0x00,0xd1,0x0d,0x10,0x09,0x01,0xff,0xcc,0x88,0xcc,0x81,0x00,0x01,0xf0,0x10,
+ 0x04,0x04,0xe6,0x04,0xdc,0xd2,0x08,0x11,0x04,0x04,0xdc,0x04,0xe6,0xd1,0x08,0x10,
+ 0x04,0x04,0xe6,0x04,0xdc,0x10,0x04,0x04,0xdc,0x06,0xff,0x00,0xd3,0x18,0xd2,0x0c,
+ 0x51,0x04,0x07,0xe6,0x10,0x04,0x07,0xe6,0x07,0xdc,0x51,0x04,0x07,0xdc,0x10,0x04,
+ 0x07,0xdc,0x07,0xe6,0xd2,0x10,0xd1,0x08,0x10,0x04,0x08,0xe8,0x08,0xdc,0x10,0x04,
+ 0x08,0xdc,0x08,0xe6,0xd1,0x08,0x10,0x04,0x08,0xe9,0x07,0xea,0x10,0x04,0x07,0xea,
+ 0x07,0xe9,0xd4,0x14,0x93,0x10,0x92,0x0c,0x51,0x04,0x01,0xea,0x10,0x04,0x04,0xe9,
+ 0x06,0xe6,0x06,0xe6,0x06,0xe6,0xd3,0x13,0x52,0x04,0x0a,0x00,0x91,0x0b,0x10,0x07,
+ 0x01,0xff,0xca,0xb9,0x00,0x01,0x00,0x0a,0x00,0xd2,0x0c,0x51,0x04,0x00,0x00,0x10,
+ 0x04,0x01,0x00,0x09,0x00,0x51,0x04,0x09,0x00,0x10,0x06,0x01,0xff,0x3b,0x00,0x10,
+ 0x00,0xd0,0xe1,0xcf,0x86,0xd5,0x7a,0xd4,0x5f,0xd3,0x21,0x52,0x04,0x00,0x00,0xd1,
+ 0x0d,0x10,0x04,0x01,0x00,0x01,0xff,0xc2,0xa8,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,
+ 0xce,0x91,0xcc,0x81,0x00,0x01,0xff,0xc2,0xb7,0x00,0xd2,0x1f,0xd1,0x12,0x10,0x09,
+ 0x01,0xff,0xce,0x95,0xcc,0x81,0x00,0x01,0xff,0xce,0x97,0xcc,0x81,0x00,0x10,0x09,
+ 0x01,0xff,0xce,0x99,0xcc,0x81,0x00,0x00,0x00,0xd1,0x0d,0x10,0x09,0x01,0xff,0xce,
+ 0x9f,0xcc,0x81,0x00,0x00,0x00,0x10,0x09,0x01,0xff,0xce,0xa5,0xcc,0x81,0x00,0x01,
+ 0xff,0xce,0xa9,0xcc,0x81,0x00,0x93,0x17,0x92,0x13,0x91,0x0f,0x10,0x0b,0x01,0xff,
+ 0xce,0xb9,0xcc,0x88,0xcc,0x81,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,
+ 0x4a,0xd3,0x10,0x92,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0x01,
+ 0x00,0xd2,0x16,0x51,0x04,0x01,0x00,0x10,0x09,0x01,0xff,0xce,0x99,0xcc,0x88,0x00,
+ 0x01,0xff,0xce,0xa5,0xcc,0x88,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,
+ 0x81,0x00,0x01,0xff,0xce,0xb5,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xce,0xb7,0xcc,
+ 0x81,0x00,0x01,0xff,0xce,0xb9,0xcc,0x81,0x00,0x93,0x17,0x92,0x13,0x91,0x0f,0x10,
+ 0x0b,0x01,0xff,0xcf,0x85,0xcc,0x88,0xcc,0x81,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0x01,0x00,0xcf,0x86,0xd5,0x7b,0xd4,0x39,0x53,0x04,0x01,0x00,0xd2,0x16,0x51,0x04,
+ 0x01,0x00,0x10,0x09,0x01,0xff,0xce,0xb9,0xcc,0x88,0x00,0x01,0xff,0xcf,0x85,0xcc,
+ 0x88,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xbf,0xcc,0x81,0x00,0x01,0xff,0xcf,
+ 0x85,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xcf,0x89,0xcc,0x81,0x00,0x0a,0x00,0xd3,
+ 0x26,0xd2,0x11,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0xcf,0x92,0xcc,
+ 0x81,0x00,0xd1,0x0d,0x10,0x09,0x01,0xff,0xcf,0x92,0xcc,0x88,0x00,0x01,0x00,0x10,
+ 0x04,0x01,0x00,0x04,0x00,0xd2,0x0c,0x51,0x04,0x06,0x00,0x10,0x04,0x01,0x00,0x04,
+ 0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x04,0x00,0x10,0x04,0x01,0x00,0x04,0x00,0xd4,
+ 0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x04,0x00,0x01,0x00,0x01,
+ 0x00,0x01,0x00,0xd3,0x10,0x52,0x04,0x01,0x00,0x51,0x04,0x05,0x00,0x10,0x04,0x06,
+ 0x00,0x07,0x00,0x12,0x04,0x07,0x00,0x08,0x00,0xe3,0x47,0x04,0xe2,0xbe,0x02,0xe1,
+ 0x07,0x01,0xd0,0x8b,0xcf,0x86,0xd5,0x6c,0xd4,0x53,0xd3,0x30,0xd2,0x1f,0xd1,0x12,
+ 0x10,0x09,0x04,0xff,0xd0,0x95,0xcc,0x80,0x00,0x01,0xff,0xd0,0x95,0xcc,0x88,0x00,
+ 0x10,0x04,0x01,0x00,0x01,0xff,0xd0,0x93,0xcc,0x81,0x00,0x51,0x04,0x01,0x00,0x10,
+ 0x04,0x01,0x00,0x01,0xff,0xd0,0x86,0xcc,0x88,0x00,0x52,0x04,0x01,0x00,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xd0,0x9a,0xcc,0x81,0x00,0x04,0xff,0xd0,0x98,0xcc,0x80,0x00,
+ 0x10,0x09,0x01,0xff,0xd0,0xa3,0xcc,0x86,0x00,0x01,0x00,0x53,0x04,0x01,0x00,0x92,
+ 0x11,0x91,0x0d,0x10,0x04,0x01,0x00,0x01,0xff,0xd0,0x98,0xcc,0x86,0x00,0x01,0x00,
+ 0x01,0x00,0x54,0x04,0x01,0x00,0x53,0x04,0x01,0x00,0x92,0x11,0x91,0x0d,0x10,0x04,
+ 0x01,0x00,0x01,0xff,0xd0,0xb8,0xcc,0x86,0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,
+ 0x57,0x54,0x04,0x01,0x00,0xd3,0x30,0xd2,0x1f,0xd1,0x12,0x10,0x09,0x04,0xff,0xd0,
+ 0xb5,0xcc,0x80,0x00,0x01,0xff,0xd0,0xb5,0xcc,0x88,0x00,0x10,0x04,0x01,0x00,0x01,
+ 0xff,0xd0,0xb3,0xcc,0x81,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xff,
+ 0xd1,0x96,0xcc,0x88,0x00,0x52,0x04,0x01,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xd0,
+ 0xba,0xcc,0x81,0x00,0x04,0xff,0xd0,0xb8,0xcc,0x80,0x00,0x10,0x09,0x01,0xff,0xd1,
+ 0x83,0xcc,0x86,0x00,0x01,0x00,0x54,0x04,0x01,0x00,0x93,0x1a,0x52,0x04,0x01,0x00,
+ 0x51,0x04,0x01,0x00,0x10,0x09,0x01,0xff,0xd1,0xb4,0xcc,0x8f,0x00,0x01,0xff,0xd1,
+ 0xb5,0xcc,0x8f,0x00,0x01,0x00,0xd0,0x2e,0xcf,0x86,0x95,0x28,0x94,0x24,0xd3,0x18,
+ 0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xe6,0x51,0x04,0x01,0xe6,
+ 0x10,0x04,0x01,0xe6,0x0a,0xe6,0x92,0x08,0x11,0x04,0x04,0x00,0x06,0x00,0x04,0x00,
+ 0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,0xbe,0xd4,0x4a,0xd3,0x2a,0xd2,0x1a,0xd1,0x0d,
+ 0x10,0x04,0x01,0x00,0x01,0xff,0xd0,0x96,0xcc,0x86,0x00,0x10,0x09,0x01,0xff,0xd0,
+ 0xb6,0xcc,0x86,0x00,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x06,0x00,0x10,0x04,
+ 0x06,0x00,0x01,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x06,0x00,0x10,0x04,
+ 0x06,0x00,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x06,0x00,0x10,0x04,0x06,0x00,
+ 0x09,0x00,0xd3,0x3a,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xd0,0x90,0xcc,0x86,
+ 0x00,0x01,0xff,0xd0,0xb0,0xcc,0x86,0x00,0x10,0x09,0x01,0xff,0xd0,0x90,0xcc,0x88,
+ 0x00,0x01,0xff,0xd0,0xb0,0xcc,0x88,0x00,0x51,0x04,0x01,0x00,0x10,0x09,0x01,0xff,
+ 0xd0,0x95,0xcc,0x86,0x00,0x01,0xff,0xd0,0xb5,0xcc,0x86,0x00,0xd2,0x16,0x51,0x04,
+ 0x01,0x00,0x10,0x09,0x01,0xff,0xd3,0x98,0xcc,0x88,0x00,0x01,0xff,0xd3,0x99,0xcc,
+ 0x88,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xd0,0x96,0xcc,0x88,0x00,0x01,0xff,0xd0,
+ 0xb6,0xcc,0x88,0x00,0x10,0x09,0x01,0xff,0xd0,0x97,0xcc,0x88,0x00,0x01,0xff,0xd0,
+ 0xb7,0xcc,0x88,0x00,0xd4,0x74,0xd3,0x3a,0xd2,0x16,0x51,0x04,0x01,0x00,0x10,0x09,
+ 0x01,0xff,0xd0,0x98,0xcc,0x84,0x00,0x01,0xff,0xd0,0xb8,0xcc,0x84,0x00,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xd0,0x98,0xcc,0x88,0x00,0x01,0xff,0xd0,0xb8,0xcc,0x88,0x00,
+ 0x10,0x09,0x01,0xff,0xd0,0x9e,0xcc,0x88,0x00,0x01,0xff,0xd0,0xbe,0xcc,0x88,0x00,
+ 0xd2,0x16,0x51,0x04,0x01,0x00,0x10,0x09,0x01,0xff,0xd3,0xa8,0xcc,0x88,0x00,0x01,
+ 0xff,0xd3,0xa9,0xcc,0x88,0x00,0xd1,0x12,0x10,0x09,0x04,0xff,0xd0,0xad,0xcc,0x88,
+ 0x00,0x04,0xff,0xd1,0x8d,0xcc,0x88,0x00,0x10,0x09,0x01,0xff,0xd0,0xa3,0xcc,0x84,
+ 0x00,0x01,0xff,0xd1,0x83,0xcc,0x84,0x00,0xd3,0x3a,0xd2,0x24,0xd1,0x12,0x10,0x09,
+ 0x01,0xff,0xd0,0xa3,0xcc,0x88,0x00,0x01,0xff,0xd1,0x83,0xcc,0x88,0x00,0x10,0x09,
+ 0x01,0xff,0xd0,0xa3,0xcc,0x8b,0x00,0x01,0xff,0xd1,0x83,0xcc,0x8b,0x00,0x91,0x12,
+ 0x10,0x09,0x01,0xff,0xd0,0xa7,0xcc,0x88,0x00,0x01,0xff,0xd1,0x87,0xcc,0x88,0x00,
+ 0x08,0x00,0x92,0x16,0x91,0x12,0x10,0x09,0x01,0xff,0xd0,0xab,0xcc,0x88,0x00,0x01,
+ 0xff,0xd1,0x8b,0xcc,0x88,0x00,0x09,0x00,0x09,0x00,0xd1,0x74,0xd0,0x36,0xcf,0x86,
+ 0xd5,0x10,0x54,0x04,0x06,0x00,0x93,0x08,0x12,0x04,0x09,0x00,0x0a,0x00,0x0a,0x00,
+ 0xd4,0x10,0x93,0x0c,0x52,0x04,0x0a,0x00,0x11,0x04,0x0b,0x00,0x0c,0x00,0x10,0x00,
+ 0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0x01,0x00,0xcf,0x86,0xd5,0x24,0x54,0x04,0x01,0x00,0xd3,0x10,0x52,0x04,0x01,0x00,
+ 0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,
+ 0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x14,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd0,0xba,
+ 0xcf,0x86,0xd5,0x4c,0xd4,0x24,0x53,0x04,0x01,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,
+ 0x14,0x00,0x01,0x00,0x10,0x04,0x04,0x00,0x00,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,
+ 0x10,0x00,0x10,0x04,0x10,0x00,0x0d,0x00,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,
+ 0x00,0x00,0x02,0xdc,0x02,0xe6,0x51,0x04,0x02,0xe6,0x10,0x04,0x02,0xdc,0x02,0xe6,
+ 0x92,0x0c,0x51,0x04,0x02,0xe6,0x10,0x04,0x02,0xde,0x02,0xdc,0x02,0xe6,0xd4,0x2c,
+ 0xd3,0x10,0x92,0x0c,0x51,0x04,0x02,0xe6,0x10,0x04,0x08,0xdc,0x02,0xdc,0x02,0xdc,
+ 0xd2,0x0c,0x51,0x04,0x02,0xe6,0x10,0x04,0x02,0xdc,0x02,0xe6,0xd1,0x08,0x10,0x04,
+ 0x02,0xe6,0x02,0xde,0x10,0x04,0x02,0xe4,0x02,0xe6,0xd3,0x20,0xd2,0x10,0xd1,0x08,
+ 0x10,0x04,0x01,0x0a,0x01,0x0b,0x10,0x04,0x01,0x0c,0x01,0x0d,0xd1,0x08,0x10,0x04,
+ 0x01,0x0e,0x01,0x0f,0x10,0x04,0x01,0x10,0x01,0x11,0xd2,0x10,0xd1,0x08,0x10,0x04,
+ 0x01,0x12,0x01,0x13,0x10,0x04,0x09,0x13,0x01,0x14,0xd1,0x08,0x10,0x04,0x01,0x15,
+ 0x01,0x16,0x10,0x04,0x01,0x00,0x01,0x17,0xcf,0x86,0xd5,0x28,0x94,0x24,0x93,0x20,
+ 0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x01,0x18,0x10,0x04,0x01,0x19,0x01,0x00,
+ 0xd1,0x08,0x10,0x04,0x02,0xe6,0x08,0xdc,0x10,0x04,0x08,0x00,0x08,0x12,0x00,0x00,
+ 0x01,0x00,0xd4,0x1c,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,
+ 0x01,0x00,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x14,0x00,0x93,0x10,
+ 0x52,0x04,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xe2,0xfb,0x01,0xe1,0x2b,0x01,0xd0,0xa8,0xcf,0x86,0xd5,0x55,0xd4,0x28,0xd3,0x10,
+ 0x52,0x04,0x07,0x00,0x91,0x08,0x10,0x04,0x0d,0x00,0x10,0x00,0x0a,0x00,0xd2,0x0c,
+ 0x51,0x04,0x0a,0x00,0x10,0x04,0x0a,0x00,0x08,0x00,0x91,0x08,0x10,0x04,0x01,0x00,
+ 0x07,0x00,0x07,0x00,0xd3,0x0c,0x52,0x04,0x07,0xe6,0x11,0x04,0x07,0xe6,0x0a,0xe6,
+ 0xd2,0x10,0xd1,0x08,0x10,0x04,0x0a,0x1e,0x0a,0x1f,0x10,0x04,0x0a,0x20,0x01,0x00,
+ 0xd1,0x09,0x10,0x05,0x0f,0xff,0x00,0x00,0x00,0x10,0x04,0x08,0x00,0x01,0x00,0xd4,
+ 0x3d,0x93,0x39,0xd2,0x1a,0xd1,0x08,0x10,0x04,0x0c,0x00,0x01,0x00,0x10,0x09,0x01,
+ 0xff,0xd8,0xa7,0xd9,0x93,0x00,0x01,0xff,0xd8,0xa7,0xd9,0x94,0x00,0xd1,0x12,0x10,
+ 0x09,0x01,0xff,0xd9,0x88,0xd9,0x94,0x00,0x01,0xff,0xd8,0xa7,0xd9,0x95,0x00,0x10,
+ 0x09,0x01,0xff,0xd9,0x8a,0xd9,0x94,0x00,0x01,0x00,0x01,0x00,0x53,0x04,0x01,0x00,
+ 0x92,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x0a,0x00,0x0a,0x00,0xcf,0x86,
+ 0xd5,0x5c,0xd4,0x20,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,
+ 0x01,0x00,0x01,0x1b,0xd1,0x08,0x10,0x04,0x01,0x1c,0x01,0x1d,0x10,0x04,0x01,0x1e,
+ 0x01,0x1f,0xd3,0x20,0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,0x20,0x01,0x21,0x10,0x04,
+ 0x01,0x22,0x04,0xe6,0xd1,0x08,0x10,0x04,0x04,0xe6,0x04,0xdc,0x10,0x04,0x07,0xdc,
+ 0x07,0xe6,0xd2,0x0c,0x91,0x08,0x10,0x04,0x07,0xe6,0x08,0xe6,0x08,0xe6,0xd1,0x08,
+ 0x10,0x04,0x08,0xdc,0x08,0xe6,0x10,0x04,0x08,0xe6,0x0c,0xdc,0xd4,0x10,0x53,0x04,
+ 0x01,0x00,0x52,0x04,0x01,0x00,0x11,0x04,0x01,0x00,0x06,0x00,0x93,0x10,0x92,0x0c,
+ 0x91,0x08,0x10,0x04,0x01,0x23,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd0,0x22,
+ 0xcf,0x86,0x55,0x04,0x01,0x00,0x54,0x04,0x01,0x00,0x53,0x04,0x01,0x00,0xd2,0x08,
+ 0x11,0x04,0x04,0x00,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x04,0x00,
+ 0xcf,0x86,0xd5,0x5b,0xd4,0x2e,0xd3,0x1e,0x92,0x1a,0xd1,0x0d,0x10,0x09,0x01,0xff,
+ 0xdb,0x95,0xd9,0x94,0x00,0x01,0x00,0x10,0x09,0x01,0xff,0xdb,0x81,0xd9,0x94,0x00,
+ 0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,
+ 0x04,0x00,0xd3,0x19,0xd2,0x11,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xff,
+ 0xdb,0x92,0xd9,0x94,0x00,0x11,0x04,0x01,0x00,0x01,0xe6,0x52,0x04,0x01,0xe6,0xd1,
+ 0x08,0x10,0x04,0x01,0xe6,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xe6,0xd4,0x38,0xd3,
+ 0x1c,0xd2,0x0c,0x51,0x04,0x01,0xe6,0x10,0x04,0x01,0xe6,0x01,0xdc,0xd1,0x08,0x10,
+ 0x04,0x01,0xe6,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xe6,0xd2,0x10,0xd1,0x08,0x10,
+ 0x04,0x01,0xe6,0x01,0x00,0x10,0x04,0x01,0xdc,0x01,0xe6,0x91,0x08,0x10,0x04,0x01,
+ 0xe6,0x01,0xdc,0x07,0x00,0x53,0x04,0x01,0x00,0xd2,0x08,0x11,0x04,0x01,0x00,0x04,
+ 0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x07,0x00,0xd1,0xc8,0xd0,0x76,0xcf,
+ 0x86,0xd5,0x28,0xd4,0x14,0x53,0x04,0x04,0x00,0x52,0x04,0x04,0x00,0x51,0x04,0x04,
+ 0x00,0x10,0x04,0x00,0x00,0x04,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x04,
+ 0x00,0x04,0x24,0x04,0x00,0x04,0x00,0x04,0x00,0xd4,0x14,0x53,0x04,0x04,0x00,0x52,
+ 0x04,0x04,0x00,0x91,0x08,0x10,0x04,0x04,0x00,0x07,0x00,0x07,0x00,0xd3,0x1c,0xd2,
+ 0x0c,0x91,0x08,0x10,0x04,0x04,0xe6,0x04,0xdc,0x04,0xe6,0xd1,0x08,0x10,0x04,0x04,
+ 0xdc,0x04,0xe6,0x10,0x04,0x04,0xe6,0x04,0xdc,0xd2,0x0c,0x51,0x04,0x04,0xdc,0x10,
+ 0x04,0x04,0xe6,0x04,0xdc,0xd1,0x08,0x10,0x04,0x04,0xdc,0x04,0xe6,0x10,0x04,0x04,
+ 0xdc,0x04,0xe6,0xcf,0x86,0xd5,0x3c,0x94,0x38,0xd3,0x1c,0xd2,0x0c,0x51,0x04,0x04,
+ 0xe6,0x10,0x04,0x04,0xdc,0x04,0xe6,0xd1,0x08,0x10,0x04,0x04,0xdc,0x04,0xe6,0x10,
+ 0x04,0x04,0xdc,0x04,0xe6,0xd2,0x10,0xd1,0x08,0x10,0x04,0x04,0xdc,0x04,0xe6,0x10,
+ 0x04,0x04,0xe6,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x07,0x00,0x07,0x00,0x08,
+ 0x00,0x94,0x10,0x53,0x04,0x08,0x00,0x52,0x04,0x08,0x00,0x11,0x04,0x08,0x00,0x0a,
+ 0x00,0x0a,0x00,0xd0,0x1e,0xcf,0x86,0x55,0x04,0x04,0x00,0x54,0x04,0x04,0x00,0x93,
+ 0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x04,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xcf,0x86,0x55,0x04,0x09,0x00,0xd4,0x14,0x53,0x04,0x09,0x00,0x92,0x0c,0x51,
+ 0x04,0x09,0x00,0x10,0x04,0x09,0x00,0x09,0xe6,0x09,0xe6,0xd3,0x10,0x92,0x0c,0x51,
+ 0x04,0x09,0xe6,0x10,0x04,0x09,0xdc,0x09,0xe6,0x09,0x00,0xd2,0x0c,0x51,0x04,0x09,
+ 0x00,0x10,0x04,0x09,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x14,0xdc,0x14,
+ 0x00,0xe4,0xf8,0x57,0xe3,0x45,0x3f,0xe2,0xf4,0x3e,0xe1,0xc7,0x2c,0xe0,0x21,0x10,
+ 0xcf,0x86,0xc5,0xe4,0x80,0x08,0xe3,0xcb,0x03,0xe2,0x61,0x01,0xd1,0x94,0xd0,0x5a,
+ 0xcf,0x86,0xd5,0x20,0x54,0x04,0x0b,0x00,0xd3,0x0c,0x52,0x04,0x0b,0x00,0x11,0x04,
+ 0x0b,0x00,0x0b,0xe6,0x92,0x0c,0x51,0x04,0x0b,0xe6,0x10,0x04,0x0b,0x00,0x0b,0xe6,
+ 0x0b,0xe6,0xd4,0x24,0xd3,0x10,0x52,0x04,0x0b,0xe6,0x91,0x08,0x10,0x04,0x0b,0x00,
+ 0x0b,0xe6,0x0b,0xe6,0xd2,0x0c,0x91,0x08,0x10,0x04,0x0b,0x00,0x0b,0xe6,0x0b,0xe6,
+ 0x11,0x04,0x0b,0xe6,0x00,0x00,0x53,0x04,0x0b,0x00,0x52,0x04,0x0b,0x00,0x51,0x04,
+ 0x0b,0x00,0x10,0x04,0x0b,0x00,0x00,0x00,0xcf,0x86,0xd5,0x20,0x54,0x04,0x0c,0x00,
+ 0x53,0x04,0x0c,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x0c,0x00,0x0c,0xdc,0x0c,0xdc,
+ 0x51,0x04,0x00,0x00,0x10,0x04,0x0c,0x00,0x00,0x00,0x94,0x14,0x53,0x04,0x13,0x00,
+ 0x92,0x0c,0x51,0x04,0x13,0x00,0x10,0x04,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xd0,0x4a,0xcf,0x86,0x55,0x04,0x00,0x00,0xd4,0x20,0xd3,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x0d,0x00,0x10,0x00,0x0d,0x00,0x0d,0x00,0x52,0x04,0x0d,0x00,0x91,0x08,
+ 0x10,0x04,0x0d,0x00,0x10,0x00,0x10,0x00,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x10,0x00,
+ 0x10,0x04,0x10,0x00,0x11,0x00,0x91,0x08,0x10,0x04,0x11,0x00,0x00,0x00,0x12,0x00,
+ 0x52,0x04,0x12,0x00,0x11,0x04,0x12,0x00,0x00,0x00,0xcf,0x86,0xd5,0x18,0x54,0x04,
+ 0x00,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x14,0xdc,
+ 0x12,0xe6,0x12,0xe6,0xd4,0x30,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x12,0xe6,0x10,0x04,
+ 0x12,0x00,0x11,0xdc,0x51,0x04,0x0d,0xe6,0x10,0x04,0x0d,0xdc,0x0d,0xe6,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x0d,0xe6,0x0d,0xdc,0x0d,0xe6,0x91,0x08,0x10,0x04,0x0d,0xe6,
+ 0x0d,0xdc,0x0d,0xdc,0xd3,0x1c,0xd2,0x10,0xd1,0x08,0x10,0x04,0x0d,0x1b,0x0d,0x1c,
+ 0x10,0x04,0x0d,0x1d,0x0d,0xe6,0x51,0x04,0x0d,0xe6,0x10,0x04,0x0d,0xdc,0x0d,0xe6,
+ 0xd2,0x10,0xd1,0x08,0x10,0x04,0x0d,0xe6,0x0d,0xdc,0x10,0x04,0x0d,0xdc,0x0d,0xe6,
+ 0x51,0x04,0x0d,0xe6,0x10,0x04,0x0d,0xe6,0x10,0xe6,0xe1,0x3a,0x01,0xd0,0x77,0xcf,
+ 0x86,0xd5,0x20,0x94,0x1c,0x93,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x0b,0x00,0x01,
+ 0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x07,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
+ 0x00,0xd4,0x1b,0x53,0x04,0x01,0x00,0x92,0x13,0x91,0x0f,0x10,0x04,0x01,0x00,0x01,
+ 0xff,0xe0,0xa4,0xa8,0xe0,0xa4,0xbc,0x00,0x01,0x00,0x01,0x00,0xd3,0x26,0xd2,0x13,
+ 0x91,0x0f,0x10,0x04,0x01,0x00,0x01,0xff,0xe0,0xa4,0xb0,0xe0,0xa4,0xbc,0x00,0x01,
+ 0x00,0x91,0x0f,0x10,0x0b,0x01,0xff,0xe0,0xa4,0xb3,0xe0,0xa4,0xbc,0x00,0x01,0x00,
+ 0x01,0x00,0xd2,0x08,0x11,0x04,0x01,0x00,0x0c,0x00,0x91,0x08,0x10,0x04,0x01,0x07,
+ 0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,0x8c,0xd4,0x18,0x53,0x04,0x01,0x00,0x52,0x04,
+ 0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x01,0x09,0x10,0x04,0x0b,0x00,0x0c,0x00,
+ 0xd3,0x1c,0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x01,0xe6,0x10,0x04,0x01,0xdc,
+ 0x01,0xe6,0x91,0x08,0x10,0x04,0x01,0xe6,0x0b,0x00,0x0c,0x00,0xd2,0x2c,0xd1,0x16,
+ 0x10,0x0b,0x01,0xff,0xe0,0xa4,0x95,0xe0,0xa4,0xbc,0x00,0x01,0xff,0xe0,0xa4,0x96,
+ 0xe0,0xa4,0xbc,0x00,0x10,0x0b,0x01,0xff,0xe0,0xa4,0x97,0xe0,0xa4,0xbc,0x00,0x01,
+ 0xff,0xe0,0xa4,0x9c,0xe0,0xa4,0xbc,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xe0,0xa4,
+ 0xa1,0xe0,0xa4,0xbc,0x00,0x01,0xff,0xe0,0xa4,0xa2,0xe0,0xa4,0xbc,0x00,0x10,0x0b,
+ 0x01,0xff,0xe0,0xa4,0xab,0xe0,0xa4,0xbc,0x00,0x01,0xff,0xe0,0xa4,0xaf,0xe0,0xa4,
+ 0xbc,0x00,0x54,0x04,0x01,0x00,0xd3,0x14,0x92,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,
+ 0x0a,0x00,0x10,0x04,0x0a,0x00,0x0c,0x00,0x0c,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,
+ 0x10,0x00,0x0b,0x00,0x10,0x04,0x0b,0x00,0x09,0x00,0x91,0x08,0x10,0x04,0x09,0x00,
+ 0x08,0x00,0x09,0x00,0xd0,0x86,0xcf,0x86,0xd5,0x44,0xd4,0x2c,0xd3,0x18,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x10,0x00,0x01,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x00,0x00,
+ 0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,
+ 0x10,0x04,0x00,0x00,0x01,0x00,0x93,0x14,0x92,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x14,0x53,0x04,
+ 0x01,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,
+ 0xd3,0x18,0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0xd2,0x08,0x11,0x04,0x01,0x00,0x00,0x00,
+ 0x91,0x08,0x10,0x04,0x01,0x07,0x07,0x00,0x01,0x00,0xcf,0x86,0xd5,0x7b,0xd4,0x42,
+ 0xd3,0x14,0x52,0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,
+ 0x00,0x00,0x01,0x00,0xd2,0x17,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,
+ 0x00,0x00,0x01,0xff,0xe0,0xa7,0x87,0xe0,0xa6,0xbe,0x00,0xd1,0x0f,0x10,0x0b,0x01,
+ 0xff,0xe0,0xa7,0x87,0xe0,0xa7,0x97,0x00,0x01,0x09,0x10,0x04,0x08,0x00,0x00,0x00,
+ 0xd3,0x10,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,
+ 0x52,0x04,0x00,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xe0,0xa6,0xa1,0xe0,0xa6,0xbc,
+ 0x00,0x01,0xff,0xe0,0xa6,0xa2,0xe0,0xa6,0xbc,0x00,0x10,0x04,0x00,0x00,0x01,0xff,
+ 0xe0,0xa6,0xaf,0xe0,0xa6,0xbc,0x00,0xd4,0x10,0x93,0x0c,0x52,0x04,0x01,0x00,0x11,
+ 0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,
+ 0x00,0x10,0x04,0x01,0x00,0x0b,0x00,0x51,0x04,0x13,0x00,0x10,0x04,0x14,0xe6,0x00,
+ 0x00,0xe2,0x48,0x02,0xe1,0x4f,0x01,0xd0,0xa4,0xcf,0x86,0xd5,0x4c,0xd4,0x34,0xd3,
+ 0x1c,0xd2,0x10,0xd1,0x08,0x10,0x04,0x00,0x00,0x07,0x00,0x10,0x04,0x01,0x00,0x07,
+ 0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,
+ 0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x01,
+ 0x00,0x93,0x14,0x92,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x00,
+ 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x14,0x53,0x04,0x01,0x00,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0xd3,0x2e,0xd2,0x17,0xd1,
+ 0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0xe0,0xa8,0xb2,
+ 0xe0,0xa8,0xbc,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,
+ 0xe0,0xa8,0xb8,0xe0,0xa8,0xbc,0x00,0x00,0x00,0xd2,0x08,0x11,0x04,0x01,0x00,0x00,
+ 0x00,0x91,0x08,0x10,0x04,0x01,0x07,0x00,0x00,0x01,0x00,0xcf,0x86,0xd5,0x80,0xd4,
+ 0x34,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x51,
+ 0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,
+ 0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x01,
+ 0x09,0x00,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0a,0x00,0x00,
+ 0x00,0x00,0x00,0xd2,0x25,0xd1,0x0f,0x10,0x04,0x00,0x00,0x01,0xff,0xe0,0xa8,0x96,
+ 0xe0,0xa8,0xbc,0x00,0x10,0x0b,0x01,0xff,0xe0,0xa8,0x97,0xe0,0xa8,0xbc,0x00,0x01,
+ 0xff,0xe0,0xa8,0x9c,0xe0,0xa8,0xbc,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,
+ 0x10,0x0b,0x01,0xff,0xe0,0xa8,0xab,0xe0,0xa8,0xbc,0x00,0x00,0x00,0xd4,0x10,0x93,
+ 0x0c,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x93,0x14,0x52,
+ 0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x0a,0x00,0x10,0x04,0x14,0x00,0x00,
+ 0x00,0x00,0x00,0xd0,0x82,0xcf,0x86,0xd5,0x40,0xd4,0x2c,0xd3,0x18,0xd2,0x0c,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x01,
+ 0x00,0x01,0x00,0x52,0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x07,0x00,0x01,0x00,0x10,
+ 0x04,0x00,0x00,0x01,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x00,
+ 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x14,0x53,0x04,0x01,0x00,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0xd3,0x18,0xd2,0x0c,0x91,
+ 0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x01,
+ 0x00,0x01,0x00,0xd2,0x08,0x11,0x04,0x01,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x01,
+ 0x07,0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,0x3c,0xd4,0x28,0xd3,0x10,0x52,0x04,0x01,
+ 0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,
+ 0x00,0x10,0x04,0x00,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x01,0x09,0x00,
+ 0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xd4,0x18,0x93,0x14,0xd2,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x07,
+ 0x00,0x07,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0xd3,0x10,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x0d,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x92,0x0c,0x91,0x08,0x10,
+ 0x04,0x00,0x00,0x11,0x00,0x13,0x00,0x13,0x00,0xe1,0x24,0x01,0xd0,0x86,0xcf,0x86,
+ 0xd5,0x44,0xd4,0x2c,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,
+ 0x01,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,
+ 0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0x93,0x14,
+ 0x92,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,
+ 0x01,0x00,0x01,0x00,0xd4,0x14,0x53,0x04,0x01,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x07,0x00,0x01,0x00,
+ 0xd2,0x08,0x11,0x04,0x01,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x01,0x07,0x01,0x00,
+ 0x01,0x00,0xcf,0x86,0xd5,0x73,0xd4,0x45,0xd3,0x14,0x52,0x04,0x01,0x00,0xd1,0x08,
+ 0x10,0x04,0x0a,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0xd2,0x1e,0xd1,0x0f,
+ 0x10,0x0b,0x01,0xff,0xe0,0xad,0x87,0xe0,0xad,0x96,0x00,0x00,0x00,0x10,0x04,0x00,
+ 0x00,0x01,0xff,0xe0,0xad,0x87,0xe0,0xac,0xbe,0x00,0x91,0x0f,0x10,0x0b,0x01,0xff,
+ 0xe0,0xad,0x87,0xe0,0xad,0x97,0x00,0x01,0x09,0x00,0x00,0xd3,0x0c,0x52,0x04,0x00,
+ 0x00,0x11,0x04,0x00,0x00,0x01,0x00,0x52,0x04,0x00,0x00,0xd1,0x16,0x10,0x0b,0x01,
+ 0xff,0xe0,0xac,0xa1,0xe0,0xac,0xbc,0x00,0x01,0xff,0xe0,0xac,0xa2,0xe0,0xac,0xbc,
+ 0x00,0x10,0x04,0x00,0x00,0x01,0x00,0xd4,0x14,0x93,0x10,0xd2,0x08,0x11,0x04,0x01,
+ 0x00,0x0a,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x93,0x10,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x01,0x00,0x07,0x00,0x0c,0x00,0x0c,0x00,0x00,0x00,0xd0,0xb1,0xcf,
+ 0x86,0xd5,0x63,0xd4,0x28,0xd3,0x14,0xd2,0x08,0x11,0x04,0x00,0x00,0x01,0x00,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,
+ 0x04,0x01,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0xd3,0x1f,0xd2,0x0c,0x91,
+ 0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x91,0x0f,0x10,0x0b,0x01,0xff,0xe0,
+ 0xae,0x92,0xe0,0xaf,0x97,0x00,0x01,0x00,0x00,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,
+ 0x00,0x00,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x01,0x00,0xd4,0x2c,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,
+ 0x00,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0xd2,0x0c,
+ 0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x01,0x00,
+ 0xd3,0x10,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x08,0x00,0x01,0x00,
+ 0xd2,0x08,0x11,0x04,0x01,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0xcf,0x86,
+ 0xd5,0x61,0xd4,0x45,0xd3,0x14,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0xd2,0x1e,0xd1,0x08,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x10,0x0b,0x01,0xff,0xe0,0xaf,0x86,0xe0,0xae,0xbe,0x00,0x01,0xff,0xe0,
+ 0xaf,0x87,0xe0,0xae,0xbe,0x00,0x91,0x0f,0x10,0x0b,0x01,0xff,0xe0,0xaf,0x86,0xe0,
+ 0xaf,0x97,0x00,0x01,0x09,0x00,0x00,0x93,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x0a,
+ 0x00,0x00,0x00,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0xd4,0x14,0x93,0x10,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x08,
+ 0x00,0x01,0x00,0x01,0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,
+ 0x00,0x07,0x00,0x07,0x00,0x92,0x0c,0x51,0x04,0x07,0x00,0x10,0x04,0x07,0x00,0x00,
+ 0x00,0x00,0x00,0xe3,0x1c,0x04,0xe2,0x1a,0x02,0xd1,0xf3,0xd0,0x76,0xcf,0x86,0xd5,
+ 0x3c,0xd4,0x28,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x10,0x00,0x01,0x00,0x01,
+ 0x00,0x91,0x08,0x10,0x04,0x14,0x00,0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,0x91,
+ 0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,
+ 0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x14,0x53,0x04,0x01,
+ 0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0xd3,
+ 0x10,0x52,0x04,0x01,0x00,0x91,0x08,0x10,0x04,0x10,0x00,0x01,0x00,0x01,0x00,0xd2,
+ 0x08,0x11,0x04,0x01,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x0a,0x00,0x01,
+ 0x00,0xcf,0x86,0xd5,0x53,0xd4,0x2f,0xd3,0x10,0x52,0x04,0x01,0x00,0x91,0x08,0x10,
+ 0x04,0x01,0x00,0x00,0x00,0x01,0x00,0xd2,0x13,0x91,0x0f,0x10,0x0b,0x01,0xff,0xe0,
+ 0xb1,0x86,0xe0,0xb1,0x96,0x00,0x00,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,
+ 0x01,0x09,0x00,0x00,0xd3,0x14,0x52,0x04,0x00,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,
+ 0x01,0x54,0x10,0x04,0x01,0x5b,0x00,0x00,0x92,0x0c,0x51,0x04,0x0a,0x00,0x10,0x04,
+ 0x11,0x00,0x00,0x00,0x00,0x00,0xd4,0x14,0x93,0x10,0xd2,0x08,0x11,0x04,0x01,0x00,
+ 0x0a,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x93,0x10,0x52,0x04,0x00,0x00,
+ 0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x15,0x00,0x0a,0x00,0xd0,0x76,0xcf,0x86,
+ 0xd5,0x3c,0xd4,0x28,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x12,0x00,0x10,0x00,
+ 0x01,0x00,0x91,0x08,0x10,0x04,0x14,0x00,0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,
+ 0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x14,0x53,0x04,
+ 0x01,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,
+ 0xd3,0x10,0x52,0x04,0x01,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,
+ 0xd2,0x08,0x11,0x04,0x01,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x07,0x07,0x07,0x00,
+ 0x01,0x00,0xcf,0x86,0xd5,0x82,0xd4,0x5e,0xd3,0x2a,0xd2,0x13,0x91,0x0f,0x10,0x0b,
+ 0x01,0xff,0xe0,0xb2,0xbf,0xe0,0xb3,0x95,0x00,0x01,0x00,0x01,0x00,0xd1,0x08,0x10,
+ 0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0xe0,0xb3,0x86,0xe0,0xb3,
+ 0x95,0x00,0xd2,0x28,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe0,0xb3,0x86,0xe0,0xb3,0x96,
+ 0x00,0x00,0x00,0x10,0x0b,0x01,0xff,0xe0,0xb3,0x86,0xe0,0xb3,0x82,0x00,0x01,0xff,
+ 0xe0,0xb3,0x86,0xe0,0xb3,0x82,0xe0,0xb3,0x95,0x00,0x91,0x08,0x10,0x04,0x01,0x00,
+ 0x01,0x09,0x00,0x00,0xd3,0x14,0x52,0x04,0x00,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,
+ 0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,
+ 0x10,0x04,0x01,0x00,0x00,0x00,0xd4,0x14,0x93,0x10,0xd2,0x08,0x11,0x04,0x01,0x00,
+ 0x09,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x93,0x14,0x92,0x10,0xd1,0x08,
+ 0x10,0x04,0x00,0x00,0x09,0x00,0x10,0x04,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xe1,0x06,0x01,0xd0,0x6e,0xcf,0x86,0xd5,0x3c,0xd4,0x28,0xd3,0x18,0xd2,0x0c,0x91,
+ 0x08,0x10,0x04,0x13,0x00,0x10,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x01,
+ 0x00,0x01,0x00,0x52,0x04,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,
+ 0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,
+ 0x00,0x01,0x00,0xd4,0x14,0x53,0x04,0x01,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,
+ 0x00,0x0c,0x00,0x01,0x00,0x01,0x00,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,
+ 0x00,0x10,0x04,0x0c,0x00,0x13,0x09,0x91,0x08,0x10,0x04,0x13,0x09,0x0a,0x00,0x01,
+ 0x00,0xcf,0x86,0xd5,0x65,0xd4,0x45,0xd3,0x10,0x52,0x04,0x01,0x00,0x91,0x08,0x10,
+ 0x04,0x0a,0x00,0x00,0x00,0x01,0x00,0xd2,0x1e,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,
+ 0x00,0x10,0x0b,0x01,0xff,0xe0,0xb5,0x86,0xe0,0xb4,0xbe,0x00,0x01,0xff,0xe0,0xb5,
+ 0x87,0xe0,0xb4,0xbe,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe0,0xb5,0x86,0xe0,0xb5,
+ 0x97,0x00,0x01,0x09,0x10,0x04,0x0c,0x00,0x12,0x00,0xd3,0x10,0x52,0x04,0x00,0x00,
+ 0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x01,0x00,0x52,0x04,0x12,0x00,0x51,0x04,
+ 0x12,0x00,0x10,0x04,0x12,0x00,0x11,0x00,0xd4,0x14,0x93,0x10,0xd2,0x08,0x11,0x04,
+ 0x01,0x00,0x0a,0x00,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0xd3,0x0c,0x52,0x04,
+ 0x0a,0x00,0x11,0x04,0x0a,0x00,0x12,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x12,0x00,
+ 0x0a,0x00,0x0a,0x00,0x0a,0x00,0xd0,0x5a,0xcf,0x86,0xd5,0x34,0xd4,0x18,0x93,0x14,
+ 0xd2,0x08,0x11,0x04,0x00,0x00,0x04,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x04,0x00,
+ 0x04,0x00,0x04,0x00,0xd3,0x10,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,
+ 0x04,0x00,0x00,0x00,0x92,0x08,0x11,0x04,0x00,0x00,0x04,0x00,0x04,0x00,0x54,0x04,
+ 0x04,0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x04,0x00,0x10,0x04,0x00,0x00,0x04,0x00,
+ 0x04,0x00,0x52,0x04,0x04,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0xcf,0x86,0xd5,0x77,0xd4,0x28,0xd3,0x10,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,
+ 0x10,0x04,0x04,0x00,0x00,0x00,0xd2,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x04,0x09,
+ 0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x04,0x00,0xd3,0x14,0x52,0x04,
+ 0x04,0x00,0xd1,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x10,0x04,0x04,0x00,0x00,0x00,
+ 0xd2,0x13,0x51,0x04,0x04,0x00,0x10,0x0b,0x04,0xff,0xe0,0xb7,0x99,0xe0,0xb7,0x8a,
+ 0x00,0x04,0x00,0xd1,0x19,0x10,0x0b,0x04,0xff,0xe0,0xb7,0x99,0xe0,0xb7,0x8f,0x00,
+ 0x04,0xff,0xe0,0xb7,0x99,0xe0,0xb7,0x8f,0xe0,0xb7,0x8a,0x00,0x10,0x0b,0x04,0xff,
+ 0xe0,0xb7,0x99,0xe0,0xb7,0x9f,0x00,0x04,0x00,0xd4,0x10,0x93,0x0c,0x52,0x04,0x00,
+ 0x00,0x11,0x04,0x00,0x00,0x10,0x00,0x10,0x00,0x93,0x14,0xd2,0x08,0x11,0x04,0x00,
+ 0x00,0x04,0x00,0x91,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,
+ 0x31,0x01,0xd1,0x58,0xd0,0x3a,0xcf,0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x92,0x0c,
+ 0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0x54,0x04,0x01,0x00,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,0x67,0x10,0x04,
+ 0x01,0x09,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x01,0x00,0xcf,0x86,
+ 0x95,0x18,0xd4,0x0c,0x53,0x04,0x01,0x00,0x12,0x04,0x01,0x6b,0x01,0x00,0x53,0x04,
+ 0x01,0x00,0x12,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0xd0,0x9e,0xcf,0x86,0xd5,0x54,
+ 0xd4,0x3c,0xd3,0x20,0xd2,0x10,0xd1,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x10,0x04,
+ 0x01,0x00,0x00,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x15,0x00,
+ 0x01,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x15,0x00,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x91,0x08,0x10,0x04,0x15,0x00,0x01,0x00,0x15,0x00,0xd3,0x08,0x12,0x04,
+ 0x15,0x00,0x01,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x15,0x00,0x01,0x00,0x01,0x00,
+ 0x01,0x00,0xd4,0x30,0xd3,0x1c,0xd2,0x0c,0x91,0x08,0x10,0x04,0x15,0x00,0x01,0x00,
+ 0x01,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x10,0x04,0x00,0x00,0x01,0x00,
+ 0xd2,0x08,0x11,0x04,0x15,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x15,0x00,0x01,0x00,
+ 0x01,0x00,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,0x76,0x10,0x04,0x15,0x09,
+ 0x01,0x00,0x11,0x04,0x01,0x00,0x00,0x00,0xcf,0x86,0x95,0x34,0xd4,0x20,0xd3,0x14,
+ 0x52,0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x52,0x04,0x01,0x7a,0x11,0x04,0x01,0x00,0x00,0x00,0x53,0x04,0x01,0x00,
+ 0xd2,0x08,0x11,0x04,0x01,0x00,0x00,0x00,0x11,0x04,0x01,0x00,0x0d,0x00,0x00,0x00,
+ 0xe1,0x2b,0x01,0xd0,0x3e,0xcf,0x86,0xd5,0x14,0x54,0x04,0x02,0x00,0x53,0x04,0x02,
+ 0x00,0x92,0x08,0x11,0x04,0x02,0xdc,0x02,0x00,0x02,0x00,0x54,0x04,0x02,0x00,0xd3,
+ 0x14,0x52,0x04,0x02,0x00,0xd1,0x08,0x10,0x04,0x02,0x00,0x02,0xdc,0x10,0x04,0x02,
+ 0x00,0x02,0xdc,0x92,0x0c,0x91,0x08,0x10,0x04,0x02,0x00,0x02,0xd8,0x02,0x00,0x02,
+ 0x00,0xcf,0x86,0xd5,0x73,0xd4,0x36,0xd3,0x17,0x92,0x13,0x51,0x04,0x02,0x00,0x10,
+ 0x04,0x02,0x00,0x02,0xff,0xe0,0xbd,0x82,0xe0,0xbe,0xb7,0x00,0x02,0x00,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x00,0x00,0x02,0x00,0x02,0x00,0x91,0x0f,0x10,0x04,0x02,0x00,
+ 0x02,0xff,0xe0,0xbd,0x8c,0xe0,0xbe,0xb7,0x00,0x02,0x00,0xd3,0x26,0xd2,0x13,0x51,
+ 0x04,0x02,0x00,0x10,0x0b,0x02,0xff,0xe0,0xbd,0x91,0xe0,0xbe,0xb7,0x00,0x02,0x00,
+ 0x51,0x04,0x02,0x00,0x10,0x04,0x02,0x00,0x02,0xff,0xe0,0xbd,0x96,0xe0,0xbe,0xb7,
+ 0x00,0x52,0x04,0x02,0x00,0x91,0x0f,0x10,0x0b,0x02,0xff,0xe0,0xbd,0x9b,0xe0,0xbe,
+ 0xb7,0x00,0x02,0x00,0x02,0x00,0xd4,0x27,0x53,0x04,0x02,0x00,0xd2,0x17,0xd1,0x0f,
+ 0x10,0x04,0x02,0x00,0x02,0xff,0xe0,0xbd,0x80,0xe0,0xbe,0xb5,0x00,0x10,0x04,0x04,
+ 0x00,0x0a,0x00,0x91,0x08,0x10,0x04,0x0a,0x00,0x00,0x00,0x00,0x00,0xd3,0x35,0xd2,
+ 0x17,0xd1,0x08,0x10,0x04,0x00,0x00,0x02,0x81,0x10,0x04,0x02,0x82,0x02,0xff,0xe0,
+ 0xbd,0xb1,0xe0,0xbd,0xb2,0x00,0xd1,0x0f,0x10,0x04,0x02,0x84,0x02,0xff,0xe0,0xbd,
+ 0xb1,0xe0,0xbd,0xb4,0x00,0x10,0x0b,0x02,0xff,0xe0,0xbe,0xb2,0xe0,0xbe,0x80,0x00,
+ 0x02,0x00,0xd2,0x13,0x91,0x0f,0x10,0x0b,0x02,0xff,0xe0,0xbe,0xb3,0xe0,0xbe,0x80,
+ 0x00,0x02,0x00,0x02,0x82,0x11,0x04,0x02,0x82,0x02,0x00,0xd0,0xd3,0xcf,0x86,0xd5,
+ 0x65,0xd4,0x27,0xd3,0x1f,0xd2,0x13,0x91,0x0f,0x10,0x04,0x02,0x82,0x02,0xff,0xe0,
+ 0xbd,0xb1,0xe0,0xbe,0x80,0x00,0x02,0xe6,0x91,0x08,0x10,0x04,0x02,0x09,0x02,0x00,
+ 0x02,0xe6,0x12,0x04,0x02,0x00,0x0c,0x00,0xd3,0x1f,0xd2,0x13,0x51,0x04,0x02,0x00,
+ 0x10,0x04,0x02,0x00,0x02,0xff,0xe0,0xbe,0x92,0xe0,0xbe,0xb7,0x00,0x51,0x04,0x02,
+ 0x00,0x10,0x04,0x04,0x00,0x02,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x02,
+ 0x00,0x02,0x00,0x91,0x0f,0x10,0x04,0x02,0x00,0x02,0xff,0xe0,0xbe,0x9c,0xe0,0xbe,
+ 0xb7,0x00,0x02,0x00,0xd4,0x3d,0xd3,0x26,0xd2,0x13,0x51,0x04,0x02,0x00,0x10,0x0b,
+ 0x02,0xff,0xe0,0xbe,0xa1,0xe0,0xbe,0xb7,0x00,0x02,0x00,0x51,0x04,0x02,0x00,0x10,
+ 0x04,0x02,0x00,0x02,0xff,0xe0,0xbe,0xa6,0xe0,0xbe,0xb7,0x00,0x52,0x04,0x02,0x00,
+ 0x91,0x0f,0x10,0x0b,0x02,0xff,0xe0,0xbe,0xab,0xe0,0xbe,0xb7,0x00,0x02,0x00,0x04,
+ 0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x04,0x00,0x02,0x00,0x02,0x00,0x02,
+ 0x00,0xd2,0x13,0x91,0x0f,0x10,0x04,0x04,0x00,0x02,0xff,0xe0,0xbe,0x90,0xe0,0xbe,
+ 0xb5,0x00,0x04,0x00,0x91,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x04,0x00,0xcf,0x86,
+ 0x95,0x4c,0xd4,0x24,0xd3,0x10,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,
+ 0x04,0xdc,0x04,0x00,0x52,0x04,0x04,0x00,0xd1,0x08,0x10,0x04,0x04,0x00,0x00,0x00,
+ 0x10,0x04,0x0a,0x00,0x04,0x00,0xd3,0x14,0xd2,0x08,0x11,0x04,0x08,0x00,0x0a,0x00,
+ 0x91,0x08,0x10,0x04,0x0a,0x00,0x0b,0x00,0x0b,0x00,0x92,0x10,0xd1,0x08,0x10,0x04,
+ 0x0b,0x00,0x0c,0x00,0x10,0x04,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,
+ 0xe5,0xf7,0x04,0xe4,0x79,0x03,0xe3,0x7b,0x01,0xe2,0x04,0x01,0xd1,0x7f,0xd0,0x65,
+ 0xcf,0x86,0x55,0x04,0x04,0x00,0xd4,0x33,0xd3,0x1f,0xd2,0x0c,0x51,0x04,0x04,0x00,
+ 0x10,0x04,0x0a,0x00,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x0b,0x04,0xff,0xe1,0x80,
+ 0xa5,0xe1,0x80,0xae,0x00,0x04,0x00,0x92,0x10,0xd1,0x08,0x10,0x04,0x0a,0x00,0x04,
+ 0x00,0x10,0x04,0x04,0x00,0x0a,0x00,0x04,0x00,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x04,
+ 0x00,0x10,0x04,0x04,0x00,0x0a,0x00,0x51,0x04,0x0a,0x00,0x10,0x04,0x04,0x00,0x04,
+ 0x07,0x92,0x10,0xd1,0x08,0x10,0x04,0x04,0x00,0x04,0x09,0x10,0x04,0x0a,0x09,0x0a,
+ 0x00,0x0a,0x00,0xcf,0x86,0x95,0x14,0x54,0x04,0x04,0x00,0x53,0x04,0x04,0x00,0x92,
+ 0x08,0x11,0x04,0x04,0x00,0x0a,0x00,0x0a,0x00,0x0a,0x00,0xd0,0x2e,0xcf,0x86,0x95,
+ 0x28,0xd4,0x14,0x53,0x04,0x0a,0x00,0x52,0x04,0x0a,0x00,0x91,0x08,0x10,0x04,0x0a,
+ 0x00,0x0a,0xdc,0x0a,0x00,0x53,0x04,0x0a,0x00,0xd2,0x08,0x11,0x04,0x0a,0x00,0x0b,
+ 0x00,0x11,0x04,0x0b,0x00,0x0a,0x00,0x01,0x00,0xcf,0x86,0xd5,0x24,0x94,0x20,0xd3,
+ 0x10,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x00,0x00,0x0d,0x00,0x52,
+ 0x04,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x00,0x00,0x01,0x00,0x54,
+ 0x04,0x01,0x00,0xd3,0x10,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,
+ 0x00,0x06,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x06,0x00,0x08,0x00,0x10,0x04,0x08,
+ 0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x08,0x00,0x0d,0x00,0x0d,0x00,0xd1,0x3e,0xd0,
+ 0x06,0xcf,0x06,0x01,0x00,0xcf,0x86,0xd5,0x1d,0x54,0x04,0x01,0x00,0x53,0x04,0x01,
+ 0x00,0xd2,0x08,0x11,0x04,0x01,0x00,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,
+ 0x00,0x01,0xff,0x00,0x94,0x15,0x93,0x11,0x92,0x0d,0x91,0x09,0x10,0x05,0x01,0xff,
+ 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd0,0x1e,0xcf,0x86,0x55,
+ 0x04,0x01,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,
+ 0x00,0x0b,0x00,0x0b,0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,0x00,0x54,
+ 0x04,0x01,0x00,0x53,0x04,0x01,0x00,0x92,0x08,0x11,0x04,0x01,0x00,0x0b,0x00,0x0b,
+ 0x00,0xe2,0x21,0x01,0xd1,0x6c,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x94,0x14,0x93,0x10,
+ 0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,0x04,0x00,
+ 0x04,0x00,0x04,0x00,0xcf,0x86,0x95,0x48,0xd4,0x24,0xd3,0x10,0x52,0x04,0x04,0x00,
+ 0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,
+ 0x04,0x00,0x00,0x00,0x04,0x00,0x11,0x04,0x04,0x00,0x00,0x00,0xd3,0x10,0x52,0x04,
+ 0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x00,0x00,0xd2,0x0c,0x91,0x08,
+ 0x10,0x04,0x04,0x00,0x00,0x00,0x04,0x00,0x11,0x04,0x04,0x00,0x00,0x00,0x04,0x00,
+ 0xd0,0x62,0xcf,0x86,0xd5,0x28,0x94,0x24,0xd3,0x10,0x52,0x04,0x04,0x00,0x51,0x04,
+ 0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x04,0x00,
+ 0x00,0x00,0x04,0x00,0x11,0x04,0x04,0x00,0x00,0x00,0x04,0x00,0xd4,0x14,0x53,0x04,
+ 0x04,0x00,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,
+ 0xd3,0x14,0xd2,0x0c,0x91,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x04,0x00,0x11,0x04,
+ 0x04,0x00,0x00,0x00,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,
+ 0x00,0x00,0xcf,0x86,0xd5,0x38,0xd4,0x24,0xd3,0x14,0xd2,0x0c,0x91,0x08,0x10,0x04,
+ 0x04,0x00,0x00,0x00,0x04,0x00,0x11,0x04,0x04,0x00,0x00,0x00,0x52,0x04,0x04,0x00,
+ 0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,0x93,0x10,0x52,0x04,0x04,0x00,
+ 0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x00,0x00,0x04,0x00,0x94,0x14,0x53,0x04,
+ 0x04,0x00,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,
+ 0x04,0x00,0xd1,0x9c,0xd0,0x3e,0xcf,0x86,0x95,0x38,0xd4,0x14,0x53,0x04,0x04,0x00,
+ 0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,0xd3,0x14,
+ 0xd2,0x0c,0x91,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x04,0x00,0x11,0x04,0x04,0x00,
+ 0x00,0x00,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,
+ 0x04,0x00,0xcf,0x86,0xd5,0x34,0xd4,0x14,0x93,0x10,0x52,0x04,0x04,0x00,0x51,0x04,
+ 0x04,0x00,0x10,0x04,0x04,0x00,0x08,0x00,0x04,0x00,0x53,0x04,0x04,0x00,0xd2,0x0c,
+ 0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x00,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,
+ 0x0c,0xe6,0x10,0x04,0x0c,0xe6,0x08,0xe6,0xd4,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x08,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x53,0x04,0x04,0x00,
+ 0x52,0x04,0x04,0x00,0x91,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0xd0,0x1a,
+ 0xcf,0x86,0x95,0x14,0x54,0x04,0x08,0x00,0x53,0x04,0x08,0x00,0x92,0x08,0x11,0x04,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0xcf,0x86,0x55,0x04,0x04,0x00,0x54,0x04,
+ 0x04,0x00,0xd3,0x10,0x52,0x04,0x04,0x00,0x91,0x08,0x10,0x04,0x04,0x00,0x11,0x00,
+ 0x00,0x00,0x52,0x04,0x11,0x00,0x11,0x04,0x11,0x00,0x00,0x00,0xd3,0x30,0xd2,0x2a,
+ 0xd1,0x24,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x0b,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,
+ 0xcf,0x06,0x04,0x00,0xcf,0x06,0x04,0x00,0xcf,0x06,0x04,0x00,0xd2,0x6c,0xd1,0x24,
+ 0xd0,0x06,0xcf,0x06,0x04,0x00,0xcf,0x86,0x55,0x04,0x04,0x00,0x54,0x04,0x04,0x00,
+ 0x93,0x10,0x52,0x04,0x04,0x00,0x51,0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x0b,0x00,
+ 0x0b,0x00,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,0x04,0x00,0x53,0x04,0x04,0x00,
+ 0x52,0x04,0x04,0x00,0x91,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
+ 0xcf,0x86,0x55,0x04,0x04,0x00,0x54,0x04,0x04,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x04,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,0x80,0xd0,0x46,0xcf,0x86,0xd5,0x28,
+ 0xd4,0x14,0x53,0x04,0x06,0x00,0x52,0x04,0x06,0x00,0x91,0x08,0x10,0x04,0x06,0x00,
+ 0x00,0x00,0x06,0x00,0x93,0x10,0x52,0x04,0x06,0x00,0x91,0x08,0x10,0x04,0x06,0x09,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x04,0x06,0x00,0x93,0x14,0x52,0x04,0x06,0x00,
+ 0xd1,0x08,0x10,0x04,0x06,0x09,0x06,0x00,0x10,0x04,0x06,0x00,0x00,0x00,0x00,0x00,
+ 0xcf,0x86,0xd5,0x10,0x54,0x04,0x06,0x00,0x93,0x08,0x12,0x04,0x06,0x00,0x00,0x00,
+ 0x00,0x00,0xd4,0x14,0x53,0x04,0x06,0x00,0x52,0x04,0x06,0x00,0x91,0x08,0x10,0x04,
+ 0x06,0x00,0x00,0x00,0x06,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x06,0x00,
+ 0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0xd0,0x1b,0xcf,0x86,0x55,0x04,0x04,0x00,
+ 0x54,0x04,0x04,0x00,0x93,0x0d,0x52,0x04,0x04,0x00,0x11,0x05,0x04,0xff,0x00,0x04,
+ 0x00,0x04,0x00,0xcf,0x86,0xd5,0x24,0x54,0x04,0x04,0x00,0xd3,0x10,0x92,0x0c,0x51,
+ 0x04,0x04,0x00,0x10,0x04,0x04,0x09,0x04,0x00,0x04,0x00,0x52,0x04,0x04,0x00,0x91,
+ 0x08,0x10,0x04,0x04,0x00,0x07,0xe6,0x00,0x00,0xd4,0x10,0x53,0x04,0x04,0x00,0x92,
+ 0x08,0x11,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x07,0x00,0x92,0x08,0x11,
+ 0x04,0x07,0x00,0x00,0x00,0x00,0x00,0xe4,0xb7,0x03,0xe3,0x58,0x01,0xd2,0x8f,0xd1,
+ 0x53,0xd0,0x35,0xcf,0x86,0x95,0x2f,0xd4,0x1f,0x53,0x04,0x04,0x00,0xd2,0x0d,0x51,
+ 0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x04,0xff,0x00,0x51,0x05,0x04,0xff,0x00,0x10,
+ 0x05,0x04,0xff,0x00,0x00,0x00,0x53,0x04,0x04,0x00,0x92,0x08,0x11,0x04,0x04,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x00,0xcf,0x86,0x55,0x04,0x04,0x00,0x54,0x04,0x04,0x00,
+ 0x53,0x04,0x04,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x14,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xd0,0x22,0xcf,0x86,0x55,0x04,0x04,0x00,0x94,0x18,0x53,0x04,0x04,0x00,
+ 0x92,0x10,0xd1,0x08,0x10,0x04,0x04,0x00,0x04,0xe4,0x10,0x04,0x0a,0x00,0x00,0x00,
+ 0x00,0x00,0x0b,0x00,0xcf,0x86,0x55,0x04,0x0b,0x00,0x54,0x04,0x0b,0x00,0x93,0x0c,
+ 0x52,0x04,0x0b,0x00,0x11,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0xd1,0x80,0xd0,0x42,
+ 0xcf,0x86,0xd5,0x1c,0x54,0x04,0x07,0x00,0x53,0x04,0x07,0x00,0x52,0x04,0x07,0x00,
+ 0xd1,0x08,0x10,0x04,0x07,0x00,0x10,0x00,0x10,0x04,0x10,0x00,0x00,0x00,0xd4,0x0c,
+ 0x53,0x04,0x07,0x00,0x12,0x04,0x07,0x00,0x00,0x00,0x53,0x04,0x07,0x00,0x92,0x10,
+ 0xd1,0x08,0x10,0x04,0x07,0x00,0x07,0xde,0x10,0x04,0x07,0xe6,0x07,0xdc,0x00,0x00,
+ 0xcf,0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x07,0x00,
+ 0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0xd4,0x10,0x53,0x04,0x07,0x00,
+ 0x52,0x04,0x07,0x00,0x11,0x04,0x07,0x00,0x00,0x00,0x93,0x10,0x52,0x04,0x07,0x00,
+ 0x91,0x08,0x10,0x04,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x1a,0xcf,0x86,
+ 0x55,0x04,0x08,0x00,0x94,0x10,0x53,0x04,0x08,0x00,0x92,0x08,0x11,0x04,0x08,0x00,
+ 0x0b,0x00,0x00,0x00,0x08,0x00,0xcf,0x86,0x95,0x28,0xd4,0x10,0x53,0x04,0x08,0x00,
+ 0x92,0x08,0x11,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x08,0x00,0xd2,0x0c,
+ 0x51,0x04,0x08,0x00,0x10,0x04,0x0b,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x08,0x00,
+ 0x07,0x00,0xd2,0xe4,0xd1,0x80,0xd0,0x2e,0xcf,0x86,0x95,0x28,0x54,0x04,0x08,0x00,
+ 0xd3,0x10,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x08,0xe6,
+ 0xd2,0x0c,0x91,0x08,0x10,0x04,0x08,0xdc,0x08,0x00,0x08,0x00,0x11,0x04,0x00,0x00,
+ 0x08,0x00,0x0b,0x00,0xcf,0x86,0xd5,0x18,0x54,0x04,0x0b,0x00,0x53,0x04,0x0b,0x00,
+ 0x52,0x04,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,0x00,0x00,0x00,0xd4,0x14,
+ 0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0b,0x09,0x0b,0x00,0x0b,0x00,0x0b,0x00,
+ 0x0b,0x00,0xd3,0x10,0x52,0x04,0x0b,0x00,0x91,0x08,0x10,0x04,0x0b,0x00,0x0b,0xe6,
+ 0x0b,0xe6,0x52,0x04,0x0b,0xe6,0xd1,0x08,0x10,0x04,0x0b,0xe6,0x00,0x00,0x10,0x04,
+ 0x00,0x00,0x0b,0xdc,0xd0,0x5e,0xcf,0x86,0xd5,0x20,0xd4,0x10,0x53,0x04,0x0b,0x00,
+ 0x92,0x08,0x11,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x0b,0x00,0x92,0x08,
+ 0x11,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0xd4,0x10,0x53,0x04,0x0b,0x00,0x52,0x04,
+ 0x0b,0x00,0x11,0x04,0x0b,0x00,0x00,0x00,0xd3,0x10,0x52,0x04,0x10,0xe6,0x91,0x08,
+ 0x10,0x04,0x10,0xe6,0x10,0xdc,0x10,0xdc,0xd2,0x0c,0x51,0x04,0x10,0xdc,0x10,0x04,
+ 0x10,0xdc,0x10,0xe6,0xd1,0x08,0x10,0x04,0x10,0xe6,0x10,0xdc,0x10,0x04,0x10,0x00,
+ 0x00,0x00,0xcf,0x06,0x00,0x00,0xe1,0x1e,0x01,0xd0,0xaa,0xcf,0x86,0xd5,0x6e,0xd4,
+ 0x53,0xd3,0x17,0x52,0x04,0x09,0x00,0x51,0x04,0x09,0x00,0x10,0x0b,0x09,0xff,0xe1,
+ 0xac,0x85,0xe1,0xac,0xb5,0x00,0x09,0x00,0xd2,0x1e,0xd1,0x0f,0x10,0x0b,0x09,0xff,
+ 0xe1,0xac,0x87,0xe1,0xac,0xb5,0x00,0x09,0x00,0x10,0x0b,0x09,0xff,0xe1,0xac,0x89,
+ 0xe1,0xac,0xb5,0x00,0x09,0x00,0xd1,0x0f,0x10,0x0b,0x09,0xff,0xe1,0xac,0x8b,0xe1,
+ 0xac,0xb5,0x00,0x09,0x00,0x10,0x0b,0x09,0xff,0xe1,0xac,0x8d,0xe1,0xac,0xb5,0x00,
+ 0x09,0x00,0x93,0x17,0x92,0x13,0x51,0x04,0x09,0x00,0x10,0x0b,0x09,0xff,0xe1,0xac,
+ 0x91,0xe1,0xac,0xb5,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x54,0x04,0x09,0x00,0xd3,
+ 0x10,0x52,0x04,0x09,0x00,0x91,0x08,0x10,0x04,0x09,0x07,0x09,0x00,0x09,0x00,0xd2,
+ 0x13,0x51,0x04,0x09,0x00,0x10,0x04,0x09,0x00,0x09,0xff,0xe1,0xac,0xba,0xe1,0xac,
+ 0xb5,0x00,0x91,0x0f,0x10,0x04,0x09,0x00,0x09,0xff,0xe1,0xac,0xbc,0xe1,0xac,0xb5,
+ 0x00,0x09,0x00,0xcf,0x86,0xd5,0x3d,0x94,0x39,0xd3,0x31,0xd2,0x25,0xd1,0x16,0x10,
+ 0x0b,0x09,0xff,0xe1,0xac,0xbe,0xe1,0xac,0xb5,0x00,0x09,0xff,0xe1,0xac,0xbf,0xe1,
+ 0xac,0xb5,0x00,0x10,0x04,0x09,0x00,0x09,0xff,0xe1,0xad,0x82,0xe1,0xac,0xb5,0x00,
+ 0x91,0x08,0x10,0x04,0x09,0x09,0x09,0x00,0x09,0x00,0x12,0x04,0x09,0x00,0x00,0x00,
+ 0x09,0x00,0xd4,0x1c,0x53,0x04,0x09,0x00,0xd2,0x0c,0x51,0x04,0x09,0x00,0x10,0x04,
+ 0x09,0x00,0x09,0xe6,0x91,0x08,0x10,0x04,0x09,0xdc,0x09,0xe6,0x09,0xe6,0xd3,0x08,
+ 0x12,0x04,0x09,0xe6,0x09,0x00,0x52,0x04,0x09,0x00,0x91,0x08,0x10,0x04,0x09,0x00,
+ 0x00,0x00,0x00,0x00,0xd0,0x2e,0xcf,0x86,0x55,0x04,0x0a,0x00,0xd4,0x18,0x53,0x04,
+ 0x0a,0x00,0xd2,0x0c,0x51,0x04,0x0a,0x00,0x10,0x04,0x0a,0x09,0x0d,0x09,0x11,0x04,
+ 0x0d,0x00,0x0a,0x00,0x53,0x04,0x0a,0x00,0x92,0x08,0x11,0x04,0x0a,0x00,0x0d,0x00,
+ 0x0d,0x00,0xcf,0x86,0x55,0x04,0x0c,0x00,0xd4,0x14,0x93,0x10,0x52,0x04,0x0c,0x00,
+ 0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x07,0x0c,0x00,0x0c,0x00,0xd3,0x0c,0x92,0x08,
+ 0x11,0x04,0x0c,0x00,0x0c,0x09,0x00,0x00,0x12,0x04,0x00,0x00,0x0c,0x00,0xe3,0xb2,
+ 0x01,0xe2,0x09,0x01,0xd1,0x4c,0xd0,0x2a,0xcf,0x86,0x55,0x04,0x0a,0x00,0x54,0x04,
+ 0x0a,0x00,0xd3,0x10,0x52,0x04,0x0a,0x00,0x51,0x04,0x0a,0x00,0x10,0x04,0x0a,0x00,
+ 0x0a,0x07,0x92,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x0a,0x00,0x0a,0x00,
+ 0xcf,0x86,0x95,0x1c,0x94,0x18,0x53,0x04,0x0a,0x00,0xd2,0x08,0x11,0x04,0x0a,0x00,
+ 0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x0a,0x00,0x0a,0x00,0x0a,0x00,0x0a,0x00,
+ 0xd0,0x3a,0xcf,0x86,0xd5,0x18,0x94,0x14,0x53,0x04,0x12,0x00,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x54,0x04,0x14,0x00,
+ 0x53,0x04,0x14,0x00,0xd2,0x0c,0x51,0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x00,0x00,
+ 0x91,0x08,0x10,0x04,0x00,0x00,0x14,0x00,0x14,0x00,0xcf,0x86,0xd5,0x2c,0xd4,0x08,
+ 0x13,0x04,0x0d,0x00,0x00,0x00,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x0b,0xe6,0x10,0x04,
+ 0x0b,0xe6,0x0b,0x00,0x91,0x08,0x10,0x04,0x0b,0x01,0x0b,0xdc,0x0b,0xdc,0x92,0x08,
+ 0x11,0x04,0x0b,0xdc,0x0b,0xe6,0x0b,0xdc,0xd4,0x28,0xd3,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x0b,0xe6,0x0b,0x00,0x0b,0x01,0x0b,0x01,0xd2,0x0c,0x91,0x08,0x10,0x04,
+ 0x0b,0x01,0x0b,0x00,0x0b,0x00,0x91,0x08,0x10,0x04,0x0b,0x00,0x0b,0xdc,0x0b,0x00,
+ 0xd3,0x1c,0xd2,0x0c,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,0x00,0x0d,0x00,0xd1,0x08,
+ 0x10,0x04,0x0d,0xe6,0x0d,0x00,0x10,0x04,0x0d,0x00,0x13,0x00,0x92,0x0c,0x51,0x04,
+ 0x10,0xe6,0x10,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0xd1,0x1c,0xd0,0x06,0xcf,0x06,
+ 0x07,0x00,0xcf,0x86,0x55,0x04,0x07,0x00,0x94,0x0c,0x53,0x04,0x07,0x00,0x12,0x04,
+ 0x07,0x00,0x08,0x00,0x08,0x00,0xd0,0x06,0xcf,0x06,0x08,0x00,0xcf,0x86,0xd5,0x40,
+ 0xd4,0x2c,0xd3,0x10,0x92,0x0c,0x51,0x04,0x08,0xe6,0x10,0x04,0x08,0xdc,0x08,0xe6,
+ 0x09,0xe6,0xd2,0x0c,0x51,0x04,0x09,0xe6,0x10,0x04,0x09,0xdc,0x0a,0xe6,0xd1,0x08,
+ 0x10,0x04,0x0a,0xe6,0x0a,0xea,0x10,0x04,0x0a,0xd6,0x0a,0xdc,0x93,0x10,0x92,0x0c,
+ 0x91,0x08,0x10,0x04,0x0a,0xca,0x0a,0xe6,0x0a,0xe6,0x0a,0xe6,0x0a,0xe6,0xd4,0x14,
+ 0x93,0x10,0x52,0x04,0x0a,0xe6,0x51,0x04,0x0a,0xe6,0x10,0x04,0x0a,0xe6,0x10,0xe6,
+ 0x10,0xe6,0xd3,0x10,0x52,0x04,0x10,0xe6,0x51,0x04,0x10,0xe6,0x10,0x04,0x13,0xe8,
+ 0x13,0xe4,0xd2,0x10,0xd1,0x08,0x10,0x04,0x13,0xe4,0x13,0xdc,0x10,0x04,0x00,0x00,
+ 0x12,0xe6,0xd1,0x08,0x10,0x04,0x0c,0xe9,0x0b,0xdc,0x10,0x04,0x09,0xe6,0x09,0xdc,
+ 0xe2,0x80,0x08,0xe1,0x48,0x04,0xe0,0x1c,0x02,0xcf,0x86,0xe5,0x11,0x01,0xd4,0x84,
+ 0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x41,0xcc,0xa5,0x00,0x01,0xff,
+ 0x61,0xcc,0xa5,0x00,0x10,0x08,0x01,0xff,0x42,0xcc,0x87,0x00,0x01,0xff,0x62,0xcc,
+ 0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x42,0xcc,0xa3,0x00,0x01,0xff,0x62,0xcc,
+ 0xa3,0x00,0x10,0x08,0x01,0xff,0x42,0xcc,0xb1,0x00,0x01,0xff,0x62,0xcc,0xb1,0x00,
+ 0xd2,0x24,0xd1,0x14,0x10,0x0a,0x01,0xff,0x43,0xcc,0xa7,0xcc,0x81,0x00,0x01,0xff,
+ 0x63,0xcc,0xa7,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x44,0xcc,0x87,0x00,0x01,0xff,
+ 0x64,0xcc,0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x44,0xcc,0xa3,0x00,0x01,0xff,
+ 0x64,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x44,0xcc,0xb1,0x00,0x01,0xff,0x64,0xcc,
+ 0xb1,0x00,0xd3,0x48,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x44,0xcc,0xa7,0x00,
+ 0x01,0xff,0x64,0xcc,0xa7,0x00,0x10,0x08,0x01,0xff,0x44,0xcc,0xad,0x00,0x01,0xff,
+ 0x64,0xcc,0xad,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x45,0xcc,0x84,0xcc,0x80,0x00,
+ 0x01,0xff,0x65,0xcc,0x84,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0x45,0xcc,0x84,0xcc,
+ 0x81,0x00,0x01,0xff,0x65,0xcc,0x84,0xcc,0x81,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0x45,0xcc,0xad,0x00,0x01,0xff,0x65,0xcc,0xad,0x00,0x10,0x08,0x01,0xff,
+ 0x45,0xcc,0xb0,0x00,0x01,0xff,0x65,0xcc,0xb0,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,
+ 0x45,0xcc,0xa7,0xcc,0x86,0x00,0x01,0xff,0x65,0xcc,0xa7,0xcc,0x86,0x00,0x10,0x08,
+ 0x01,0xff,0x46,0xcc,0x87,0x00,0x01,0xff,0x66,0xcc,0x87,0x00,0xd4,0x84,0xd3,0x40,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x47,0xcc,0x84,0x00,0x01,0xff,0x67,0xcc,
+ 0x84,0x00,0x10,0x08,0x01,0xff,0x48,0xcc,0x87,0x00,0x01,0xff,0x68,0xcc,0x87,0x00,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0x48,0xcc,0xa3,0x00,0x01,0xff,0x68,0xcc,0xa3,0x00,
+ 0x10,0x08,0x01,0xff,0x48,0xcc,0x88,0x00,0x01,0xff,0x68,0xcc,0x88,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0x48,0xcc,0xa7,0x00,0x01,0xff,0x68,0xcc,0xa7,0x00,
+ 0x10,0x08,0x01,0xff,0x48,0xcc,0xae,0x00,0x01,0xff,0x68,0xcc,0xae,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0x49,0xcc,0xb0,0x00,0x01,0xff,0x69,0xcc,0xb0,0x00,0x10,0x0a,
+ 0x01,0xff,0x49,0xcc,0x88,0xcc,0x81,0x00,0x01,0xff,0x69,0xcc,0x88,0xcc,0x81,0x00,
+ 0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x4b,0xcc,0x81,0x00,0x01,0xff,
+ 0x6b,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x4b,0xcc,0xa3,0x00,0x01,0xff,0x6b,0xcc,
+ 0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x4b,0xcc,0xb1,0x00,0x01,0xff,0x6b,0xcc,
+ 0xb1,0x00,0x10,0x08,0x01,0xff,0x4c,0xcc,0xa3,0x00,0x01,0xff,0x6c,0xcc,0xa3,0x00,
+ 0xd2,0x24,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4c,0xcc,0xa3,0xcc,0x84,0x00,0x01,0xff,
+ 0x6c,0xcc,0xa3,0xcc,0x84,0x00,0x10,0x08,0x01,0xff,0x4c,0xcc,0xb1,0x00,0x01,0xff,
+ 0x6c,0xcc,0xb1,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x4c,0xcc,0xad,0x00,0x01,0xff,
+ 0x6c,0xcc,0xad,0x00,0x10,0x08,0x01,0xff,0x4d,0xcc,0x81,0x00,0x01,0xff,0x6d,0xcc,
+ 0x81,0x00,0xcf,0x86,0xe5,0x15,0x01,0xd4,0x88,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x4d,0xcc,0x87,0x00,0x01,0xff,0x6d,0xcc,0x87,0x00,0x10,0x08,0x01,
+ 0xff,0x4d,0xcc,0xa3,0x00,0x01,0xff,0x6d,0xcc,0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x4e,0xcc,0x87,0x00,0x01,0xff,0x6e,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x4e,
+ 0xcc,0xa3,0x00,0x01,0xff,0x6e,0xcc,0xa3,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x4e,0xcc,0xb1,0x00,0x01,0xff,0x6e,0xcc,0xb1,0x00,0x10,0x08,0x01,0xff,0x4e,
+ 0xcc,0xad,0x00,0x01,0xff,0x6e,0xcc,0xad,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4f,
+ 0xcc,0x83,0xcc,0x81,0x00,0x01,0xff,0x6f,0xcc,0x83,0xcc,0x81,0x00,0x10,0x0a,0x01,
+ 0xff,0x4f,0xcc,0x83,0xcc,0x88,0x00,0x01,0xff,0x6f,0xcc,0x83,0xcc,0x88,0x00,0xd3,
+ 0x48,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4f,0xcc,0x84,0xcc,0x80,0x00,0x01,
+ 0xff,0x6f,0xcc,0x84,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0x4f,0xcc,0x84,0xcc,0x81,
+ 0x00,0x01,0xff,0x6f,0xcc,0x84,0xcc,0x81,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x50,
+ 0xcc,0x81,0x00,0x01,0xff,0x70,0xcc,0x81,0x00,0x10,0x08,0x01,0xff,0x50,0xcc,0x87,
+ 0x00,0x01,0xff,0x70,0xcc,0x87,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x52,
+ 0xcc,0x87,0x00,0x01,0xff,0x72,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x52,0xcc,0xa3,
+ 0x00,0x01,0xff,0x72,0xcc,0xa3,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x52,0xcc,0xa3,
+ 0xcc,0x84,0x00,0x01,0xff,0x72,0xcc,0xa3,0xcc,0x84,0x00,0x10,0x08,0x01,0xff,0x52,
+ 0xcc,0xb1,0x00,0x01,0xff,0x72,0xcc,0xb1,0x00,0xd4,0x8c,0xd3,0x48,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0x53,0xcc,0x87,0x00,0x01,0xff,0x73,0xcc,0x87,0x00,0x10,
+ 0x08,0x01,0xff,0x53,0xcc,0xa3,0x00,0x01,0xff,0x73,0xcc,0xa3,0x00,0xd1,0x14,0x10,
+ 0x0a,0x01,0xff,0x53,0xcc,0x81,0xcc,0x87,0x00,0x01,0xff,0x73,0xcc,0x81,0xcc,0x87,
+ 0x00,0x10,0x0a,0x01,0xff,0x53,0xcc,0x8c,0xcc,0x87,0x00,0x01,0xff,0x73,0xcc,0x8c,
+ 0xcc,0x87,0x00,0xd2,0x24,0xd1,0x14,0x10,0x0a,0x01,0xff,0x53,0xcc,0xa3,0xcc,0x87,
+ 0x00,0x01,0xff,0x73,0xcc,0xa3,0xcc,0x87,0x00,0x10,0x08,0x01,0xff,0x54,0xcc,0x87,
+ 0x00,0x01,0xff,0x74,0xcc,0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x54,0xcc,0xa3,
+ 0x00,0x01,0xff,0x74,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x54,0xcc,0xb1,0x00,0x01,
+ 0xff,0x74,0xcc,0xb1,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x54,
+ 0xcc,0xad,0x00,0x01,0xff,0x74,0xcc,0xad,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,0xa4,
+ 0x00,0x01,0xff,0x75,0xcc,0xa4,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x55,0xcc,0xb0,
+ 0x00,0x01,0xff,0x75,0xcc,0xb0,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,0xad,0x00,0x01,
+ 0xff,0x75,0xcc,0xad,0x00,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x55,0xcc,0x83,
+ 0xcc,0x81,0x00,0x01,0xff,0x75,0xcc,0x83,0xcc,0x81,0x00,0x10,0x0a,0x01,0xff,0x55,
+ 0xcc,0x84,0xcc,0x88,0x00,0x01,0xff,0x75,0xcc,0x84,0xcc,0x88,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0x56,0xcc,0x83,0x00,0x01,0xff,0x76,0xcc,0x83,0x00,0x10,0x08,0x01,
+ 0xff,0x56,0xcc,0xa3,0x00,0x01,0xff,0x76,0xcc,0xa3,0x00,0xe0,0x10,0x02,0xcf,0x86,
+ 0xd5,0xe1,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x57,0xcc,
+ 0x80,0x00,0x01,0xff,0x77,0xcc,0x80,0x00,0x10,0x08,0x01,0xff,0x57,0xcc,0x81,0x00,
+ 0x01,0xff,0x77,0xcc,0x81,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x57,0xcc,0x88,0x00,
+ 0x01,0xff,0x77,0xcc,0x88,0x00,0x10,0x08,0x01,0xff,0x57,0xcc,0x87,0x00,0x01,0xff,
+ 0x77,0xcc,0x87,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x57,0xcc,0xa3,0x00,
+ 0x01,0xff,0x77,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x58,0xcc,0x87,0x00,0x01,0xff,
+ 0x78,0xcc,0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x58,0xcc,0x88,0x00,0x01,0xff,
+ 0x78,0xcc,0x88,0x00,0x10,0x08,0x01,0xff,0x59,0xcc,0x87,0x00,0x01,0xff,0x79,0xcc,
+ 0x87,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x5a,0xcc,0x82,0x00,
+ 0x01,0xff,0x7a,0xcc,0x82,0x00,0x10,0x08,0x01,0xff,0x5a,0xcc,0xa3,0x00,0x01,0xff,
+ 0x7a,0xcc,0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x5a,0xcc,0xb1,0x00,0x01,0xff,
+ 0x7a,0xcc,0xb1,0x00,0x10,0x08,0x01,0xff,0x68,0xcc,0xb1,0x00,0x01,0xff,0x74,0xcc,
+ 0x88,0x00,0x92,0x1d,0xd1,0x10,0x10,0x08,0x01,0xff,0x77,0xcc,0x8a,0x00,0x01,0xff,
+ 0x79,0xcc,0x8a,0x00,0x10,0x04,0x01,0x00,0x02,0xff,0xc5,0xbf,0xcc,0x87,0x00,0x0a,
+ 0x00,0xd4,0x98,0xd3,0x48,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x41,0xcc,0xa3,
+ 0x00,0x01,0xff,0x61,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x41,0xcc,0x89,0x00,0x01,
+ 0xff,0x61,0xcc,0x89,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x41,0xcc,0x82,0xcc,0x81,
+ 0x00,0x01,0xff,0x61,0xcc,0x82,0xcc,0x81,0x00,0x10,0x0a,0x01,0xff,0x41,0xcc,0x82,
+ 0xcc,0x80,0x00,0x01,0xff,0x61,0xcc,0x82,0xcc,0x80,0x00,0xd2,0x28,0xd1,0x14,0x10,
+ 0x0a,0x01,0xff,0x41,0xcc,0x82,0xcc,0x89,0x00,0x01,0xff,0x61,0xcc,0x82,0xcc,0x89,
+ 0x00,0x10,0x0a,0x01,0xff,0x41,0xcc,0x82,0xcc,0x83,0x00,0x01,0xff,0x61,0xcc,0x82,
+ 0xcc,0x83,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x41,0xcc,0xa3,0xcc,0x82,0x00,0x01,
+ 0xff,0x61,0xcc,0xa3,0xcc,0x82,0x00,0x10,0x0a,0x01,0xff,0x41,0xcc,0x86,0xcc,0x81,
+ 0x00,0x01,0xff,0x61,0xcc,0x86,0xcc,0x81,0x00,0xd3,0x50,0xd2,0x28,0xd1,0x14,0x10,
+ 0x0a,0x01,0xff,0x41,0xcc,0x86,0xcc,0x80,0x00,0x01,0xff,0x61,0xcc,0x86,0xcc,0x80,
+ 0x00,0x10,0x0a,0x01,0xff,0x41,0xcc,0x86,0xcc,0x89,0x00,0x01,0xff,0x61,0xcc,0x86,
+ 0xcc,0x89,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x41,0xcc,0x86,0xcc,0x83,0x00,0x01,
+ 0xff,0x61,0xcc,0x86,0xcc,0x83,0x00,0x10,0x0a,0x01,0xff,0x41,0xcc,0xa3,0xcc,0x86,
+ 0x00,0x01,0xff,0x61,0xcc,0xa3,0xcc,0x86,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0x45,0xcc,0xa3,0x00,0x01,0xff,0x65,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x45,
+ 0xcc,0x89,0x00,0x01,0xff,0x65,0xcc,0x89,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x45,
+ 0xcc,0x83,0x00,0x01,0xff,0x65,0xcc,0x83,0x00,0x10,0x0a,0x01,0xff,0x45,0xcc,0x82,
+ 0xcc,0x81,0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x81,0x00,0xcf,0x86,0xe5,0x31,0x01,
+ 0xd4,0x90,0xd3,0x50,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x45,0xcc,0x82,0xcc,
+ 0x80,0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0x45,0xcc,
+ 0x82,0xcc,0x89,0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x89,0x00,0xd1,0x14,0x10,0x0a,
+ 0x01,0xff,0x45,0xcc,0x82,0xcc,0x83,0x00,0x01,0xff,0x65,0xcc,0x82,0xcc,0x83,0x00,
+ 0x10,0x0a,0x01,0xff,0x45,0xcc,0xa3,0xcc,0x82,0x00,0x01,0xff,0x65,0xcc,0xa3,0xcc,
+ 0x82,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0x49,0xcc,0x89,0x00,0x01,0xff,
+ 0x69,0xcc,0x89,0x00,0x10,0x08,0x01,0xff,0x49,0xcc,0xa3,0x00,0x01,0xff,0x69,0xcc,
+ 0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0x4f,0xcc,0xa3,0x00,0x01,0xff,0x6f,0xcc,
+ 0xa3,0x00,0x10,0x08,0x01,0xff,0x4f,0xcc,0x89,0x00,0x01,0xff,0x6f,0xcc,0x89,0x00,
+ 0xd3,0x50,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4f,0xcc,0x82,0xcc,0x81,0x00,
+ 0x01,0xff,0x6f,0xcc,0x82,0xcc,0x81,0x00,0x10,0x0a,0x01,0xff,0x4f,0xcc,0x82,0xcc,
+ 0x80,0x00,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x80,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,
+ 0x4f,0xcc,0x82,0xcc,0x89,0x00,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x89,0x00,0x10,0x0a,
+ 0x01,0xff,0x4f,0xcc,0x82,0xcc,0x83,0x00,0x01,0xff,0x6f,0xcc,0x82,0xcc,0x83,0x00,
+ 0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4f,0xcc,0xa3,0xcc,0x82,0x00,0x01,0xff,
+ 0x6f,0xcc,0xa3,0xcc,0x82,0x00,0x10,0x0a,0x01,0xff,0x4f,0xcc,0x9b,0xcc,0x81,0x00,
+ 0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x81,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4f,0xcc,
+ 0x9b,0xcc,0x80,0x00,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,
+ 0x4f,0xcc,0x9b,0xcc,0x89,0x00,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x89,0x00,0xd4,0x98,
+ 0xd3,0x48,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0x4f,0xcc,0x9b,0xcc,0x83,0x00,
+ 0x01,0xff,0x6f,0xcc,0x9b,0xcc,0x83,0x00,0x10,0x0a,0x01,0xff,0x4f,0xcc,0x9b,0xcc,
+ 0xa3,0x00,0x01,0xff,0x6f,0xcc,0x9b,0xcc,0xa3,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0x55,0xcc,0xa3,0x00,0x01,0xff,0x75,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,0x55,0xcc,
+ 0x89,0x00,0x01,0xff,0x75,0xcc,0x89,0x00,0xd2,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,
+ 0x55,0xcc,0x9b,0xcc,0x81,0x00,0x01,0xff,0x75,0xcc,0x9b,0xcc,0x81,0x00,0x10,0x0a,
+ 0x01,0xff,0x55,0xcc,0x9b,0xcc,0x80,0x00,0x01,0xff,0x75,0xcc,0x9b,0xcc,0x80,0x00,
+ 0xd1,0x14,0x10,0x0a,0x01,0xff,0x55,0xcc,0x9b,0xcc,0x89,0x00,0x01,0xff,0x75,0xcc,
+ 0x9b,0xcc,0x89,0x00,0x10,0x0a,0x01,0xff,0x55,0xcc,0x9b,0xcc,0x83,0x00,0x01,0xff,
+ 0x75,0xcc,0x9b,0xcc,0x83,0x00,0xd3,0x44,0xd2,0x24,0xd1,0x14,0x10,0x0a,0x01,0xff,
+ 0x55,0xcc,0x9b,0xcc,0xa3,0x00,0x01,0xff,0x75,0xcc,0x9b,0xcc,0xa3,0x00,0x10,0x08,
+ 0x01,0xff,0x59,0xcc,0x80,0x00,0x01,0xff,0x79,0xcc,0x80,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0x59,0xcc,0xa3,0x00,0x01,0xff,0x79,0xcc,0xa3,0x00,0x10,0x08,0x01,0xff,
+ 0x59,0xcc,0x89,0x00,0x01,0xff,0x79,0xcc,0x89,0x00,0x92,0x14,0x91,0x10,0x10,0x08,
+ 0x01,0xff,0x59,0xcc,0x83,0x00,0x01,0xff,0x79,0xcc,0x83,0x00,0x0a,0x00,0x0a,0x00,
+ 0xe1,0xc0,0x04,0xe0,0x80,0x02,0xcf,0x86,0xe5,0x2d,0x01,0xd4,0xa8,0xd3,0x54,0xd2,
+ 0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,0x93,0x00,0x01,0xff,0xce,0xb1,
+ 0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,
+ 0xce,0xb1,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,
+ 0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,
+ 0xff,0xce,0xb1,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcd,0x82,
+ 0x00,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0x91,0xcc,0x93,0x00,0x01,0xff,
+ 0xce,0x91,0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0x91,0xcc,0x93,0xcc,0x80,0x00,
+ 0x01,0xff,0xce,0x91,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,
+ 0x91,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0x91,0xcc,0x94,0xcc,0x81,0x00,0x10,
+ 0x0b,0x01,0xff,0xce,0x91,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0x91,0xcc,0x94,
+ 0xcd,0x82,0x00,0xd3,0x42,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb5,0xcc,
+ 0x93,0x00,0x01,0xff,0xce,0xb5,0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0xb5,0xcc,
+ 0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0xb5,0xcc,0x94,0xcc,0x80,0x00,0x91,0x16,0x10,
+ 0x0b,0x01,0xff,0xce,0xb5,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0xb5,0xcc,0x94,
+ 0xcc,0x81,0x00,0x00,0x00,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0x95,0xcc,
+ 0x93,0x00,0x01,0xff,0xce,0x95,0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0x95,0xcc,
+ 0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0x95,0xcc,0x94,0xcc,0x80,0x00,0x91,0x16,0x10,
+ 0x0b,0x01,0xff,0xce,0x95,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0x95,0xcc,0x94,
+ 0xcc,0x81,0x00,0x00,0x00,0xd4,0xa8,0xd3,0x54,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,
+ 0xff,0xce,0xb7,0xcc,0x93,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0x00,0x10,0x0b,0x01,
+ 0xff,0xce,0xb7,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcc,0x80,
+ 0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,
+ 0xce,0xb7,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcd,
+ 0x82,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcd,0x82,0x00,0xd2,0x28,0xd1,0x12,0x10,
+ 0x09,0x01,0xff,0xce,0x97,0xcc,0x93,0x00,0x01,0xff,0xce,0x97,0xcc,0x94,0x00,0x10,
+ 0x0b,0x01,0xff,0xce,0x97,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0x97,0xcc,0x94,
+ 0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0x97,0xcc,0x93,0xcc,0x81,0x00,
+ 0x01,0xff,0xce,0x97,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,0xff,0xce,0x97,0xcc,
+ 0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0x97,0xcc,0x94,0xcd,0x82,0x00,0xd3,0x54,0xd2,
+ 0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb9,0xcc,0x93,0x00,0x01,0xff,0xce,0xb9,
+ 0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0xb9,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,
+ 0xce,0xb9,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb9,0xcc,
+ 0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0xb9,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,
+ 0xff,0xce,0xb9,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0xb9,0xcc,0x94,0xcd,0x82,
+ 0x00,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0x99,0xcc,0x93,0x00,0x01,0xff,
+ 0xce,0x99,0xcc,0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0x99,0xcc,0x93,0xcc,0x80,0x00,
+ 0x01,0xff,0xce,0x99,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,
+ 0x99,0xcc,0x93,0xcc,0x81,0x00,0x01,0xff,0xce,0x99,0xcc,0x94,0xcc,0x81,0x00,0x10,
+ 0x0b,0x01,0xff,0xce,0x99,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0x99,0xcc,0x94,
+ 0xcd,0x82,0x00,0xcf,0x86,0xe5,0x13,0x01,0xd4,0x84,0xd3,0x42,0xd2,0x28,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xce,0xbf,0xcc,0x93,0x00,0x01,0xff,0xce,0xbf,0xcc,0x94,0x00,
+ 0x10,0x0b,0x01,0xff,0xce,0xbf,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0xbf,0xcc,
+ 0x94,0xcc,0x80,0x00,0x91,0x16,0x10,0x0b,0x01,0xff,0xce,0xbf,0xcc,0x93,0xcc,0x81,
+ 0x00,0x01,0xff,0xce,0xbf,0xcc,0x94,0xcc,0x81,0x00,0x00,0x00,0xd2,0x28,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xce,0x9f,0xcc,0x93,0x00,0x01,0xff,0xce,0x9f,0xcc,0x94,0x00,
+ 0x10,0x0b,0x01,0xff,0xce,0x9f,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,0x9f,0xcc,
+ 0x94,0xcc,0x80,0x00,0x91,0x16,0x10,0x0b,0x01,0xff,0xce,0x9f,0xcc,0x93,0xcc,0x81,
+ 0x00,0x01,0xff,0xce,0x9f,0xcc,0x94,0xcc,0x81,0x00,0x00,0x00,0xd3,0x54,0xd2,0x28,
+ 0xd1,0x12,0x10,0x09,0x01,0xff,0xcf,0x85,0xcc,0x93,0x00,0x01,0xff,0xcf,0x85,0xcc,
+ 0x94,0x00,0x10,0x0b,0x01,0xff,0xcf,0x85,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xcf,
+ 0x85,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xcf,0x85,0xcc,0x93,
+ 0xcc,0x81,0x00,0x01,0xff,0xcf,0x85,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,0xff,
+ 0xcf,0x85,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xcf,0x85,0xcc,0x94,0xcd,0x82,0x00,
+ 0xd2,0x1c,0xd1,0x0d,0x10,0x04,0x00,0x00,0x01,0xff,0xce,0xa5,0xcc,0x94,0x00,0x10,
+ 0x04,0x00,0x00,0x01,0xff,0xce,0xa5,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x0f,0x10,0x04,
+ 0x00,0x00,0x01,0xff,0xce,0xa5,0xcc,0x94,0xcc,0x81,0x00,0x10,0x04,0x00,0x00,0x01,
+ 0xff,0xce,0xa5,0xcc,0x94,0xcd,0x82,0x00,0xd4,0xa8,0xd3,0x54,0xd2,0x28,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xcf,0x89,0xcc,0x93,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0x00,
+ 0x10,0x0b,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xcf,0x89,0xcc,
+ 0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcc,0x81,
+ 0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,0xff,0xcf,0x89,
+ 0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcd,0x82,0x00,0xd2,0x28,
+ 0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xa9,0xcc,0x93,0x00,0x01,0xff,0xce,0xa9,0xcc,
+ 0x94,0x00,0x10,0x0b,0x01,0xff,0xce,0xa9,0xcc,0x93,0xcc,0x80,0x00,0x01,0xff,0xce,
+ 0xa9,0xcc,0x94,0xcc,0x80,0x00,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xa9,0xcc,0x93,
+ 0xcc,0x81,0x00,0x01,0xff,0xce,0xa9,0xcc,0x94,0xcc,0x81,0x00,0x10,0x0b,0x01,0xff,
+ 0xce,0xa9,0xcc,0x93,0xcd,0x82,0x00,0x01,0xff,0xce,0xa9,0xcc,0x94,0xcd,0x82,0x00,
+ 0xd3,0x48,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,0x80,0x00,0x01,
+ 0xff,0xce,0xb1,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xce,0xb5,0xcc,0x80,0x00,0x01,
+ 0xff,0xce,0xb5,0xcc,0x81,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb7,0xcc,0x80,
+ 0x00,0x01,0xff,0xce,0xb7,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xce,0xb9,0xcc,0x80,
+ 0x00,0x01,0xff,0xce,0xb9,0xcc,0x81,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,
+ 0xce,0xbf,0xcc,0x80,0x00,0x01,0xff,0xce,0xbf,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,
+ 0xcf,0x85,0xcc,0x80,0x00,0x01,0xff,0xcf,0x85,0xcc,0x81,0x00,0x91,0x12,0x10,0x09,
+ 0x01,0xff,0xcf,0x89,0xcc,0x80,0x00,0x01,0xff,0xcf,0x89,0xcc,0x81,0x00,0x00,0x00,
+ 0xe0,0xe1,0x02,0xcf,0x86,0xe5,0x91,0x01,0xd4,0xc8,0xd3,0x64,0xd2,0x30,0xd1,0x16,
+ 0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcd,0x85,0x00,0x01,0xff,0xce,0xb1,0xcc,
+ 0x94,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcc,0x80,0xcd,0x85,
+ 0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcc,0x80,0xcd,0x85,0x00,0xd1,0x1a,0x10,0x0d,
+ 0x01,0xff,0xce,0xb1,0xcc,0x93,0xcc,0x81,0xcd,0x85,0x00,0x01,0xff,0xce,0xb1,0xcc,
+ 0x94,0xcc,0x81,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xce,0xb1,0xcc,0x93,0xcd,0x82,
+ 0xcd,0x85,0x00,0x01,0xff,0xce,0xb1,0xcc,0x94,0xcd,0x82,0xcd,0x85,0x00,0xd2,0x30,
+ 0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0x91,0xcc,0x93,0xcd,0x85,0x00,0x01,0xff,0xce,
+ 0x91,0xcc,0x94,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xce,0x91,0xcc,0x93,0xcc,0x80,
+ 0xcd,0x85,0x00,0x01,0xff,0xce,0x91,0xcc,0x94,0xcc,0x80,0xcd,0x85,0x00,0xd1,0x1a,
+ 0x10,0x0d,0x01,0xff,0xce,0x91,0xcc,0x93,0xcc,0x81,0xcd,0x85,0x00,0x01,0xff,0xce,
+ 0x91,0xcc,0x94,0xcc,0x81,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xce,0x91,0xcc,0x93,
+ 0xcd,0x82,0xcd,0x85,0x00,0x01,0xff,0xce,0x91,0xcc,0x94,0xcd,0x82,0xcd,0x85,0x00,
+ 0xd3,0x64,0xd2,0x30,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcd,0x85,
+ 0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xce,0xb7,
+ 0xcc,0x93,0xcc,0x80,0xcd,0x85,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcc,0x80,0xcd,
+ 0x85,0x00,0xd1,0x1a,0x10,0x0d,0x01,0xff,0xce,0xb7,0xcc,0x93,0xcc,0x81,0xcd,0x85,
+ 0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcc,0x81,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,
+ 0xce,0xb7,0xcc,0x93,0xcd,0x82,0xcd,0x85,0x00,0x01,0xff,0xce,0xb7,0xcc,0x94,0xcd,
+ 0x82,0xcd,0x85,0x00,0xd2,0x30,0xd1,0x16,0x10,0x0b,0x01,0xff,0xce,0x97,0xcc,0x93,
+ 0xcd,0x85,0x00,0x01,0xff,0xce,0x97,0xcc,0x94,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,
+ 0xce,0x97,0xcc,0x93,0xcc,0x80,0xcd,0x85,0x00,0x01,0xff,0xce,0x97,0xcc,0x94,0xcc,
+ 0x80,0xcd,0x85,0x00,0xd1,0x1a,0x10,0x0d,0x01,0xff,0xce,0x97,0xcc,0x93,0xcc,0x81,
+ 0xcd,0x85,0x00,0x01,0xff,0xce,0x97,0xcc,0x94,0xcc,0x81,0xcd,0x85,0x00,0x10,0x0d,
+ 0x01,0xff,0xce,0x97,0xcc,0x93,0xcd,0x82,0xcd,0x85,0x00,0x01,0xff,0xce,0x97,0xcc,
+ 0x94,0xcd,0x82,0xcd,0x85,0x00,0xd4,0xc8,0xd3,0x64,0xd2,0x30,0xd1,0x16,0x10,0x0b,
+ 0x01,0xff,0xcf,0x89,0xcc,0x93,0xcd,0x85,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcd,
+ 0x85,0x00,0x10,0x0d,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcc,0x80,0xcd,0x85,0x00,0x01,
+ 0xff,0xcf,0x89,0xcc,0x94,0xcc,0x80,0xcd,0x85,0x00,0xd1,0x1a,0x10,0x0d,0x01,0xff,
+ 0xcf,0x89,0xcc,0x93,0xcc,0x81,0xcd,0x85,0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcc,
+ 0x81,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xcf,0x89,0xcc,0x93,0xcd,0x82,0xcd,0x85,
+ 0x00,0x01,0xff,0xcf,0x89,0xcc,0x94,0xcd,0x82,0xcd,0x85,0x00,0xd2,0x30,0xd1,0x16,
+ 0x10,0x0b,0x01,0xff,0xce,0xa9,0xcc,0x93,0xcd,0x85,0x00,0x01,0xff,0xce,0xa9,0xcc,
+ 0x94,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xce,0xa9,0xcc,0x93,0xcc,0x80,0xcd,0x85,
+ 0x00,0x01,0xff,0xce,0xa9,0xcc,0x94,0xcc,0x80,0xcd,0x85,0x00,0xd1,0x1a,0x10,0x0d,
+ 0x01,0xff,0xce,0xa9,0xcc,0x93,0xcc,0x81,0xcd,0x85,0x00,0x01,0xff,0xce,0xa9,0xcc,
+ 0x94,0xcc,0x81,0xcd,0x85,0x00,0x10,0x0d,0x01,0xff,0xce,0xa9,0xcc,0x93,0xcd,0x82,
+ 0xcd,0x85,0x00,0x01,0xff,0xce,0xa9,0xcc,0x94,0xcd,0x82,0xcd,0x85,0x00,0xd3,0x49,
+ 0xd2,0x26,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0xb1,0xcc,0x86,0x00,0x01,0xff,0xce,
+ 0xb1,0xcc,0x84,0x00,0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,0x80,0xcd,0x85,0x00,0x01,
+ 0xff,0xce,0xb1,0xcd,0x85,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xce,0xb1,0xcc,0x81,
+ 0xcd,0x85,0x00,0x00,0x00,0x10,0x09,0x01,0xff,0xce,0xb1,0xcd,0x82,0x00,0x01,0xff,
+ 0xce,0xb1,0xcd,0x82,0xcd,0x85,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,
+ 0x91,0xcc,0x86,0x00,0x01,0xff,0xce,0x91,0xcc,0x84,0x00,0x10,0x09,0x01,0xff,0xce,
+ 0x91,0xcc,0x80,0x00,0x01,0xff,0xce,0x91,0xcc,0x81,0x00,0xd1,0x0d,0x10,0x09,0x01,
+ 0xff,0xce,0x91,0xcd,0x85,0x00,0x01,0x00,0x10,0x07,0x01,0xff,0xce,0xb9,0x00,0x01,
+ 0x00,0xcf,0x86,0xe5,0x16,0x01,0xd4,0x8f,0xd3,0x44,0xd2,0x21,0xd1,0x0d,0x10,0x04,
+ 0x01,0x00,0x01,0xff,0xc2,0xa8,0xcd,0x82,0x00,0x10,0x0b,0x01,0xff,0xce,0xb7,0xcc,
+ 0x80,0xcd,0x85,0x00,0x01,0xff,0xce,0xb7,0xcd,0x85,0x00,0xd1,0x0f,0x10,0x0b,0x01,
+ 0xff,0xce,0xb7,0xcc,0x81,0xcd,0x85,0x00,0x00,0x00,0x10,0x09,0x01,0xff,0xce,0xb7,
+ 0xcd,0x82,0x00,0x01,0xff,0xce,0xb7,0xcd,0x82,0xcd,0x85,0x00,0xd2,0x24,0xd1,0x12,
+ 0x10,0x09,0x01,0xff,0xce,0x95,0xcc,0x80,0x00,0x01,0xff,0xce,0x95,0xcc,0x81,0x00,
+ 0x10,0x09,0x01,0xff,0xce,0x97,0xcc,0x80,0x00,0x01,0xff,0xce,0x97,0xcc,0x81,0x00,
+ 0xd1,0x13,0x10,0x09,0x01,0xff,0xce,0x97,0xcd,0x85,0x00,0x01,0xff,0xe1,0xbe,0xbf,
+ 0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0xe1,0xbe,0xbf,0xcc,0x81,0x00,0x01,0xff,0xe1,
+ 0xbe,0xbf,0xcd,0x82,0x00,0xd3,0x40,0xd2,0x28,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,
+ 0xb9,0xcc,0x86,0x00,0x01,0xff,0xce,0xb9,0xcc,0x84,0x00,0x10,0x0b,0x01,0xff,0xce,
+ 0xb9,0xcc,0x88,0xcc,0x80,0x00,0x01,0xff,0xce,0xb9,0xcc,0x88,0xcc,0x81,0x00,0x51,
+ 0x04,0x00,0x00,0x10,0x09,0x01,0xff,0xce,0xb9,0xcd,0x82,0x00,0x01,0xff,0xce,0xb9,
+ 0xcc,0x88,0xcd,0x82,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,0x99,0xcc,
+ 0x86,0x00,0x01,0xff,0xce,0x99,0xcc,0x84,0x00,0x10,0x09,0x01,0xff,0xce,0x99,0xcc,
+ 0x80,0x00,0x01,0xff,0xce,0x99,0xcc,0x81,0x00,0xd1,0x0e,0x10,0x04,0x00,0x00,0x01,
+ 0xff,0xe1,0xbf,0xbe,0xcc,0x80,0x00,0x10,0x0a,0x01,0xff,0xe1,0xbf,0xbe,0xcc,0x81,
+ 0x00,0x01,0xff,0xe1,0xbf,0xbe,0xcd,0x82,0x00,0xd4,0x93,0xd3,0x4e,0xd2,0x28,0xd1,
+ 0x12,0x10,0x09,0x01,0xff,0xcf,0x85,0xcc,0x86,0x00,0x01,0xff,0xcf,0x85,0xcc,0x84,
+ 0x00,0x10,0x0b,0x01,0xff,0xcf,0x85,0xcc,0x88,0xcc,0x80,0x00,0x01,0xff,0xcf,0x85,
+ 0xcc,0x88,0xcc,0x81,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xcf,0x81,0xcc,0x93,0x00,
+ 0x01,0xff,0xcf,0x81,0xcc,0x94,0x00,0x10,0x09,0x01,0xff,0xcf,0x85,0xcd,0x82,0x00,
+ 0x01,0xff,0xcf,0x85,0xcc,0x88,0xcd,0x82,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,
+ 0xff,0xce,0xa5,0xcc,0x86,0x00,0x01,0xff,0xce,0xa5,0xcc,0x84,0x00,0x10,0x09,0x01,
+ 0xff,0xce,0xa5,0xcc,0x80,0x00,0x01,0xff,0xce,0xa5,0xcc,0x81,0x00,0xd1,0x12,0x10,
+ 0x09,0x01,0xff,0xce,0xa1,0xcc,0x94,0x00,0x01,0xff,0xc2,0xa8,0xcc,0x80,0x00,0x10,
+ 0x09,0x01,0xff,0xc2,0xa8,0xcc,0x81,0x00,0x01,0xff,0x60,0x00,0xd3,0x3b,0xd2,0x18,
+ 0x51,0x04,0x00,0x00,0x10,0x0b,0x01,0xff,0xcf,0x89,0xcc,0x80,0xcd,0x85,0x00,0x01,
+ 0xff,0xcf,0x89,0xcd,0x85,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xcf,0x89,0xcc,0x81,
+ 0xcd,0x85,0x00,0x00,0x00,0x10,0x09,0x01,0xff,0xcf,0x89,0xcd,0x82,0x00,0x01,0xff,
+ 0xcf,0x89,0xcd,0x82,0xcd,0x85,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xce,
+ 0x9f,0xcc,0x80,0x00,0x01,0xff,0xce,0x9f,0xcc,0x81,0x00,0x10,0x09,0x01,0xff,0xce,
+ 0xa9,0xcc,0x80,0x00,0x01,0xff,0xce,0xa9,0xcc,0x81,0x00,0xd1,0x10,0x10,0x09,0x01,
+ 0xff,0xce,0xa9,0xcd,0x85,0x00,0x01,0xff,0xc2,0xb4,0x00,0x10,0x04,0x01,0x00,0x00,
+ 0x00,0xe0,0x7e,0x0c,0xcf,0x86,0xe5,0xbb,0x08,0xe4,0x14,0x06,0xe3,0xf7,0x02,0xe2,
+ 0xbd,0x01,0xd1,0xd0,0xd0,0x4f,0xcf,0x86,0xd5,0x2e,0x94,0x2a,0xd3,0x18,0x92,0x14,
+ 0x91,0x10,0x10,0x08,0x01,0xff,0xe2,0x80,0x82,0x00,0x01,0xff,0xe2,0x80,0x83,0x00,
+ 0x01,0x00,0x01,0x00,0x92,0x0d,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xff,
+ 0x00,0x01,0xff,0x00,0x01,0x00,0x94,0x1b,0x53,0x04,0x01,0x00,0xd2,0x09,0x11,0x04,
+ 0x01,0x00,0x01,0xff,0x00,0x51,0x05,0x01,0xff,0x00,0x10,0x05,0x01,0xff,0x00,0x04,
+ 0x00,0x01,0x00,0xcf,0x86,0xd5,0x48,0xd4,0x1c,0xd3,0x10,0x52,0x04,0x01,0x00,0x51,
+ 0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x06,0x00,0x52,0x04,0x04,0x00,0x11,0x04,0x04,
+ 0x00,0x06,0x00,0xd3,0x1c,0xd2,0x0c,0x51,0x04,0x06,0x00,0x10,0x04,0x06,0x00,0x07,
+ 0x00,0xd1,0x08,0x10,0x04,0x07,0x00,0x08,0x00,0x10,0x04,0x08,0x00,0x06,0x00,0x52,
+ 0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x06,0x00,0xd4,0x23,0xd3,
+ 0x14,0x52,0x05,0x06,0xff,0x00,0x91,0x0a,0x10,0x05,0x0a,0xff,0x00,0x00,0xff,0x00,
+ 0x0f,0xff,0x00,0x92,0x0a,0x11,0x05,0x0f,0xff,0x00,0x01,0xff,0x00,0x01,0xff,0x00,
+ 0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x06,0x00,0x00,0x00,0x01,0x00,
+ 0x01,0x00,0xd0,0x7e,0xcf,0x86,0xd5,0x34,0xd4,0x14,0x53,0x04,0x01,0x00,0x52,0x04,
+ 0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0xd3,0x10,0x52,0x04,
+ 0x08,0x00,0x91,0x08,0x10,0x04,0x08,0x00,0x0c,0x00,0x0c,0x00,0x52,0x04,0x0c,0x00,
+ 0x91,0x08,0x10,0x04,0x0c,0x00,0x00,0x00,0x00,0x00,0xd4,0x1c,0x53,0x04,0x01,0x00,
+ 0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x02,0x00,0x91,0x08,0x10,0x04,
+ 0x03,0x00,0x04,0x00,0x04,0x00,0xd3,0x10,0xd2,0x08,0x11,0x04,0x06,0x00,0x08,0x00,
+ 0x11,0x04,0x08,0x00,0x0b,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x0b,0x00,0x0c,0x00,
+ 0x10,0x04,0x0e,0x00,0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,0x11,0x00,0x13,0x00,
+ 0xcf,0x86,0xd5,0x28,0x54,0x04,0x00,0x00,0xd3,0x0c,0x92,0x08,0x11,0x04,0x01,0xe6,
+ 0x01,0x01,0x01,0xe6,0xd2,0x0c,0x51,0x04,0x01,0x01,0x10,0x04,0x01,0x01,0x01,0xe6,
+ 0x91,0x08,0x10,0x04,0x01,0xe6,0x01,0x00,0x01,0x00,0xd4,0x30,0xd3,0x1c,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x01,0x00,0x01,0xe6,0x04,0x00,0xd1,0x08,0x10,0x04,0x06,0x00,
+ 0x06,0x01,0x10,0x04,0x06,0x01,0x06,0xe6,0x92,0x10,0xd1,0x08,0x10,0x04,0x06,0xdc,
+ 0x06,0xe6,0x10,0x04,0x06,0x01,0x08,0x01,0x09,0xdc,0x93,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x0a,0xe6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,0x81,0xd0,0x4f,
+ 0xcf,0x86,0x55,0x04,0x01,0x00,0xd4,0x29,0xd3,0x13,0x52,0x04,0x01,0x00,0x51,0x04,
+ 0x01,0x00,0x10,0x07,0x01,0xff,0xce,0xa9,0x00,0x01,0x00,0x92,0x12,0x51,0x04,0x01,
+ 0x00,0x10,0x06,0x01,0xff,0x4b,0x00,0x01,0xff,0x41,0xcc,0x8a,0x00,0x01,0x00,0x53,
+ 0x04,0x01,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x01,0x00,0x04,0x00,0x10,0x04,0x04,
+ 0x00,0x07,0x00,0x91,0x08,0x10,0x04,0x08,0x00,0x06,0x00,0x06,0x00,0xcf,0x86,0x95,
+ 0x2c,0xd4,0x18,0x53,0x04,0x06,0x00,0x52,0x04,0x06,0x00,0xd1,0x08,0x10,0x04,0x08,
+ 0x00,0x09,0x00,0x10,0x04,0x09,0x00,0x0a,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,0x0b,
+ 0x00,0x10,0x04,0x0b,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd0,0x68,0xcf,
+ 0x86,0xd5,0x48,0xd4,0x28,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,
+ 0x00,0x04,0x00,0x91,0x08,0x10,0x04,0x09,0x00,0x0a,0x00,0x0a,0x00,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x0a,0x00,0x0b,0x00,0x11,0x00,0x00,0x00,0x53,0x04,0x01,0x00,0x92,
+ 0x18,0x51,0x04,0x01,0x00,0x10,0x0a,0x01,0xff,0xe2,0x86,0x90,0xcc,0xb8,0x00,0x01,
+ 0xff,0xe2,0x86,0x92,0xcc,0xb8,0x00,0x01,0x00,0x94,0x1a,0x53,0x04,0x01,0x00,0x52,
+ 0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x0a,0x01,0xff,0xe2,0x86,0x94,0xcc,0xb8,
+ 0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,0x2e,0x94,0x2a,0x53,0x04,0x01,0x00,0x52,
+ 0x04,0x01,0x00,0xd1,0x0e,0x10,0x04,0x01,0x00,0x01,0xff,0xe2,0x87,0x90,0xcc,0xb8,
+ 0x00,0x10,0x0a,0x01,0xff,0xe2,0x87,0x94,0xcc,0xb8,0x00,0x01,0xff,0xe2,0x87,0x92,
+ 0xcc,0xb8,0x00,0x01,0x00,0xd4,0x14,0x53,0x04,0x01,0x00,0x92,0x0c,0x51,0x04,0x01,
+ 0x00,0x10,0x04,0x01,0x00,0x04,0x00,0x04,0x00,0x93,0x08,0x12,0x04,0x04,0x00,0x06,
+ 0x00,0x06,0x00,0xe2,0x38,0x02,0xe1,0x3f,0x01,0xd0,0x68,0xcf,0x86,0xd5,0x3e,0x94,
+ 0x3a,0xd3,0x16,0x52,0x04,0x01,0x00,0x91,0x0e,0x10,0x0a,0x01,0xff,0xe2,0x88,0x83,
+ 0xcc,0xb8,0x00,0x01,0x00,0x01,0x00,0xd2,0x12,0x91,0x0e,0x10,0x04,0x01,0x00,0x01,
+ 0xff,0xe2,0x88,0x88,0xcc,0xb8,0x00,0x01,0x00,0x91,0x0e,0x10,0x0a,0x01,0xff,0xe2,
+ 0x88,0x8b,0xcc,0xb8,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x94,0x24,0x93,0x20,0x52,
+ 0x04,0x01,0x00,0xd1,0x0e,0x10,0x0a,0x01,0xff,0xe2,0x88,0xa3,0xcc,0xb8,0x00,0x01,
+ 0x00,0x10,0x0a,0x01,0xff,0xe2,0x88,0xa5,0xcc,0xb8,0x00,0x01,0x00,0x01,0x00,0x01,
+ 0x00,0xcf,0x86,0xd5,0x48,0x94,0x44,0xd3,0x2e,0xd2,0x12,0x91,0x0e,0x10,0x04,0x01,
+ 0x00,0x01,0xff,0xe2,0x88,0xbc,0xcc,0xb8,0x00,0x01,0x00,0xd1,0x0e,0x10,0x0a,0x01,
+ 0xff,0xe2,0x89,0x83,0xcc,0xb8,0x00,0x01,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0xe2,
+ 0x89,0x85,0xcc,0xb8,0x00,0x92,0x12,0x91,0x0e,0x10,0x04,0x01,0x00,0x01,0xff,0xe2,
+ 0x89,0x88,0xcc,0xb8,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x40,0xd3,0x1e,0x92,
+ 0x1a,0xd1,0x0c,0x10,0x08,0x01,0xff,0x3d,0xcc,0xb8,0x00,0x01,0x00,0x10,0x0a,0x01,
+ 0xff,0xe2,0x89,0xa1,0xcc,0xb8,0x00,0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,0xd1,
+ 0x0e,0x10,0x04,0x01,0x00,0x01,0xff,0xe2,0x89,0x8d,0xcc,0xb8,0x00,0x10,0x08,0x01,
+ 0xff,0x3c,0xcc,0xb8,0x00,0x01,0xff,0x3e,0xcc,0xb8,0x00,0xd3,0x30,0xd2,0x18,0x91,
+ 0x14,0x10,0x0a,0x01,0xff,0xe2,0x89,0xa4,0xcc,0xb8,0x00,0x01,0xff,0xe2,0x89,0xa5,
+ 0xcc,0xb8,0x00,0x01,0x00,0x91,0x14,0x10,0x0a,0x01,0xff,0xe2,0x89,0xb2,0xcc,0xb8,
+ 0x00,0x01,0xff,0xe2,0x89,0xb3,0xcc,0xb8,0x00,0x01,0x00,0x92,0x18,0x91,0x14,0x10,
+ 0x0a,0x01,0xff,0xe2,0x89,0xb6,0xcc,0xb8,0x00,0x01,0xff,0xe2,0x89,0xb7,0xcc,0xb8,
+ 0x00,0x01,0x00,0x01,0x00,0xd0,0x86,0xcf,0x86,0xd5,0x50,0x94,0x4c,0xd3,0x30,0xd2,
+ 0x18,0x91,0x14,0x10,0x0a,0x01,0xff,0xe2,0x89,0xba,0xcc,0xb8,0x00,0x01,0xff,0xe2,
+ 0x89,0xbb,0xcc,0xb8,0x00,0x01,0x00,0x91,0x14,0x10,0x0a,0x01,0xff,0xe2,0x8a,0x82,
+ 0xcc,0xb8,0x00,0x01,0xff,0xe2,0x8a,0x83,0xcc,0xb8,0x00,0x01,0x00,0x92,0x18,0x91,
+ 0x14,0x10,0x0a,0x01,0xff,0xe2,0x8a,0x86,0xcc,0xb8,0x00,0x01,0xff,0xe2,0x8a,0x87,
+ 0xcc,0xb8,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x94,0x30,0x53,0x04,0x01,0x00,0x52,
+ 0x04,0x01,0x00,0xd1,0x14,0x10,0x0a,0x01,0xff,0xe2,0x8a,0xa2,0xcc,0xb8,0x00,0x01,
+ 0xff,0xe2,0x8a,0xa8,0xcc,0xb8,0x00,0x10,0x0a,0x01,0xff,0xe2,0x8a,0xa9,0xcc,0xb8,
+ 0x00,0x01,0xff,0xe2,0x8a,0xab,0xcc,0xb8,0x00,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,
+ 0x00,0xd4,0x5c,0xd3,0x2c,0x92,0x28,0xd1,0x14,0x10,0x0a,0x01,0xff,0xe2,0x89,0xbc,
+ 0xcc,0xb8,0x00,0x01,0xff,0xe2,0x89,0xbd,0xcc,0xb8,0x00,0x10,0x0a,0x01,0xff,0xe2,
+ 0x8a,0x91,0xcc,0xb8,0x00,0x01,0xff,0xe2,0x8a,0x92,0xcc,0xb8,0x00,0x01,0x00,0xd2,
+ 0x18,0x51,0x04,0x01,0x00,0x10,0x0a,0x01,0xff,0xe2,0x8a,0xb2,0xcc,0xb8,0x00,0x01,
+ 0xff,0xe2,0x8a,0xb3,0xcc,0xb8,0x00,0x91,0x14,0x10,0x0a,0x01,0xff,0xe2,0x8a,0xb4,
+ 0xcc,0xb8,0x00,0x01,0xff,0xe2,0x8a,0xb5,0xcc,0xb8,0x00,0x01,0x00,0x93,0x0c,0x92,
+ 0x08,0x11,0x04,0x01,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xd1,0x64,0xd0,0x3e,0xcf,
+ 0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,0x00,0x04,
+ 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x94,0x20,0x53,0x04,0x01,0x00,0x92,
+ 0x18,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0xe3,0x80,0x88,0x00,0x10,0x08,0x01,
+ 0xff,0xe3,0x80,0x89,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,
+ 0x00,0x54,0x04,0x01,0x00,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,
+ 0x04,0x01,0x00,0x04,0x00,0x91,0x08,0x10,0x04,0x06,0x00,0x04,0x00,0x04,0x00,0xd0,
+ 0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,0x04,0x00,0x53,0x04,0x04,0x00,0x92,0x0c,0x51,
+ 0x04,0x04,0x00,0x10,0x04,0x04,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xcf,0x86,0xd5,
+ 0x2c,0xd4,0x14,0x53,0x04,0x06,0x00,0x52,0x04,0x06,0x00,0x51,0x04,0x06,0x00,0x10,
+ 0x04,0x06,0x00,0x07,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x07,0x00,0x08,
+ 0x00,0x08,0x00,0x08,0x00,0x12,0x04,0x08,0x00,0x09,0x00,0xd4,0x14,0x53,0x04,0x09,
+ 0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x0b,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0xd3,
+ 0x08,0x12,0x04,0x0c,0x00,0x10,0x00,0xd2,0x0c,0x51,0x04,0x10,0x00,0x10,0x04,0x10,
+ 0x00,0x12,0x00,0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x13,0x00,0xd3,0xa6,0xd2,
+ 0x74,0xd1,0x40,0xd0,0x22,0xcf,0x86,0x55,0x04,0x01,0x00,0x94,0x18,0x93,0x14,0x52,
+ 0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x04,0x00,0x10,0x04,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0x95,0x18,0x94,0x14,0x53,0x04,0x01,0x00,0x92,
+ 0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0xd0,0x06,0xcf,0x06,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,0x00,0xd4,0x14,0x53,
+ 0x04,0x01,0x00,0x92,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x06,0x00,0x06,
+ 0x00,0x53,0x04,0x06,0x00,0x52,0x04,0x06,0x00,0x51,0x04,0x06,0x00,0x10,0x04,0x06,
+ 0x00,0x07,0x00,0xd1,0x06,0xcf,0x06,0x01,0x00,0xd0,0x1a,0xcf,0x86,0x95,0x14,0x54,
+ 0x04,0x01,0x00,0x93,0x0c,0x52,0x04,0x01,0x00,0x11,0x04,0x01,0x00,0x06,0x00,0x06,
+ 0x00,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,0x00,0x54,0x04,0x01,0x00,0x13,0x04,0x04,
+ 0x00,0x06,0x00,0xd2,0xdc,0xd1,0x48,0xd0,0x26,0xcf,0x86,0x95,0x20,0x54,0x04,0x01,
+ 0x00,0xd3,0x0c,0x52,0x04,0x01,0x00,0x11,0x04,0x07,0x00,0x06,0x00,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x08,0x00,0x04,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0x55,
+ 0x04,0x01,0x00,0x54,0x04,0x01,0x00,0xd3,0x0c,0x92,0x08,0x11,0x04,0x04,0x00,0x06,
+ 0x00,0x06,0x00,0x52,0x04,0x06,0x00,0x11,0x04,0x06,0x00,0x08,0x00,0xd0,0x5e,0xcf,
+ 0x86,0xd5,0x2c,0xd4,0x10,0x53,0x04,0x06,0x00,0x92,0x08,0x11,0x04,0x06,0x00,0x07,
+ 0x00,0x07,0x00,0xd3,0x0c,0x92,0x08,0x11,0x04,0x07,0x00,0x08,0x00,0x08,0x00,0x52,
+ 0x04,0x08,0x00,0x91,0x08,0x10,0x04,0x08,0x00,0x0a,0x00,0x0b,0x00,0xd4,0x10,0x93,
+ 0x0c,0x92,0x08,0x11,0x04,0x07,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0xd3,0x10,0x92,
+ 0x0c,0x51,0x04,0x08,0x00,0x10,0x04,0x09,0x00,0x0a,0x00,0x0a,0x00,0x52,0x04,0x0a,
+ 0x00,0x91,0x08,0x10,0x04,0x0a,0x00,0x0b,0x00,0x0b,0x00,0xcf,0x86,0xd5,0x1c,0x94,
+ 0x18,0xd3,0x08,0x12,0x04,0x0a,0x00,0x0b,0x00,0x52,0x04,0x0b,0x00,0x51,0x04,0x0b,
+ 0x00,0x10,0x04,0x0c,0x00,0x0b,0x00,0x0b,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x51,
+ 0x04,0x0b,0x00,0x10,0x04,0x0c,0x00,0x0b,0x00,0x0c,0x00,0x0b,0x00,0x0b,0x00,0xd1,
+ 0xa8,0xd0,0x42,0xcf,0x86,0xd5,0x28,0x94,0x24,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,
+ 0x04,0x10,0x00,0x01,0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x0c,0x00,0x01,
+ 0x00,0x92,0x08,0x11,0x04,0x01,0x00,0x0c,0x00,0x01,0x00,0x01,0x00,0x94,0x14,0x53,
+ 0x04,0x01,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x0c,0x00,0x01,0x00,0x01,0x00,0x01,
+ 0x00,0x01,0x00,0xcf,0x86,0xd5,0x40,0xd4,0x18,0x53,0x04,0x01,0x00,0x52,0x04,0x01,
+ 0x00,0xd1,0x08,0x10,0x04,0x0c,0x00,0x01,0x00,0x10,0x04,0x0c,0x00,0x01,0x00,0xd3,
+ 0x18,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x0c,0x00,0x51,0x04,0x0c,
+ 0x00,0x10,0x04,0x01,0x00,0x0b,0x00,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,
+ 0x04,0x01,0x00,0x0c,0x00,0xd4,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0c,
+ 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x06,0x00,0x93,0x0c,0x52,0x04,0x06,0x00,0x11,
+ 0x04,0x06,0x00,0x01,0x00,0x01,0x00,0xd0,0x3e,0xcf,0x86,0xd5,0x18,0x54,0x04,0x01,
+ 0x00,0x93,0x10,0x52,0x04,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x0c,0x00,0x0c,
+ 0x00,0x01,0x00,0x54,0x04,0x01,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0c,
+ 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,
+ 0x04,0x01,0x00,0x0c,0x00,0xcf,0x86,0xd5,0x2c,0x94,0x28,0xd3,0x10,0x52,0x04,0x08,
+ 0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x09,0x00,0xd2,0x0c,0x51,0x04,0x09,
+ 0x00,0x10,0x04,0x09,0x00,0x0d,0x00,0x91,0x08,0x10,0x04,0x0a,0x00,0x0d,0x00,0x0c,
+ 0x00,0x06,0x00,0x94,0x0c,0x53,0x04,0x06,0x00,0x12,0x04,0x06,0x00,0x0a,0x00,0x06,
+ 0x00,0xe4,0x39,0x01,0xd3,0x0c,0xd2,0x06,0xcf,0x06,0x04,0x00,0xcf,0x06,0x06,0x00,
+ 0xd2,0x30,0xd1,0x06,0xcf,0x06,0x06,0x00,0xd0,0x06,0xcf,0x06,0x06,0x00,0xcf,0x86,
+ 0x95,0x1e,0x54,0x04,0x06,0x00,0x53,0x04,0x06,0x00,0x52,0x04,0x06,0x00,0x91,0x0e,
+ 0x10,0x0a,0x06,0xff,0xe2,0xab,0x9d,0xcc,0xb8,0x00,0x06,0x00,0x06,0x00,0x06,0x00,
+ 0xd1,0x80,0xd0,0x3a,0xcf,0x86,0xd5,0x28,0xd4,0x10,0x53,0x04,0x07,0x00,0x52,0x04,
+ 0x07,0x00,0x11,0x04,0x07,0x00,0x08,0x00,0xd3,0x08,0x12,0x04,0x08,0x00,0x09,0x00,
+ 0x92,0x0c,0x51,0x04,0x09,0x00,0x10,0x04,0x09,0x00,0x0a,0x00,0x0a,0x00,0x94,0x0c,
+ 0x93,0x08,0x12,0x04,0x09,0x00,0x0a,0x00,0x0a,0x00,0x0a,0x00,0xcf,0x86,0xd5,0x30,
+ 0xd4,0x14,0x53,0x04,0x0a,0x00,0x52,0x04,0x0a,0x00,0x91,0x08,0x10,0x04,0x0a,0x00,
+ 0x10,0x00,0x10,0x00,0xd3,0x10,0x52,0x04,0x0a,0x00,0x91,0x08,0x10,0x04,0x0a,0x00,
+ 0x0b,0x00,0x0b,0x00,0x92,0x08,0x11,0x04,0x0b,0x00,0x10,0x00,0x10,0x00,0x54,0x04,
+ 0x10,0x00,0x93,0x0c,0x52,0x04,0x10,0x00,0x11,0x04,0x00,0x00,0x10,0x00,0x10,0x00,
+ 0xd0,0x32,0xcf,0x86,0xd5,0x14,0x54,0x04,0x10,0x00,0x93,0x0c,0x52,0x04,0x10,0x00,
+ 0x11,0x04,0x10,0x00,0x00,0x00,0x10,0x00,0x54,0x04,0x10,0x00,0x53,0x04,0x10,0x00,
+ 0xd2,0x08,0x11,0x04,0x10,0x00,0x14,0x00,0x91,0x08,0x10,0x04,0x14,0x00,0x10,0x00,
+ 0x10,0x00,0xcf,0x86,0xd5,0x28,0xd4,0x14,0x53,0x04,0x10,0x00,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x10,0x00,0x15,0x00,0x10,0x00,0x10,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,
+ 0x10,0x00,0x10,0x04,0x13,0x00,0x14,0x00,0x14,0x00,0x14,0x00,0xd4,0x0c,0x53,0x04,
+ 0x14,0x00,0x12,0x04,0x14,0x00,0x11,0x00,0x53,0x04,0x14,0x00,0x52,0x04,0x14,0x00,
+ 0x51,0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x15,0x00,0xe3,0xb9,0x01,0xd2,0xac,0xd1,
+ 0x68,0xd0,0x1e,0xcf,0x86,0x55,0x04,0x08,0x00,0x94,0x14,0x53,0x04,0x08,0x00,0x52,
+ 0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x00,0x00,0x08,0x00,0xcf,
+ 0x86,0xd5,0x18,0x54,0x04,0x08,0x00,0x53,0x04,0x08,0x00,0x52,0x04,0x08,0x00,0x51,
+ 0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x00,0x00,0xd4,0x14,0x53,0x04,0x09,0x00,0x52,
+ 0x04,0x09,0x00,0x91,0x08,0x10,0x04,0x09,0x00,0x0a,0x00,0x0a,0x00,0xd3,0x10,0x92,
+ 0x0c,0x91,0x08,0x10,0x04,0x0b,0x00,0x0a,0x00,0x0a,0x00,0x09,0x00,0x52,0x04,0x0a,
+ 0x00,0x11,0x04,0x0a,0x00,0x0b,0x00,0xd0,0x06,0xcf,0x06,0x08,0x00,0xcf,0x86,0x55,
+ 0x04,0x08,0x00,0xd4,0x1c,0x53,0x04,0x08,0x00,0xd2,0x0c,0x51,0x04,0x08,0x00,0x10,
+ 0x04,0x08,0x00,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,0x00,0x0b,0xe6,0xd3,
+ 0x0c,0x92,0x08,0x11,0x04,0x0b,0xe6,0x0d,0x00,0x00,0x00,0x92,0x0c,0x91,0x08,0x10,
+ 0x04,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0xd1,0x6c,0xd0,0x2a,0xcf,0x86,0x55,
+ 0x04,0x08,0x00,0x94,0x20,0xd3,0x10,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,
+ 0x04,0x00,0x00,0x0d,0x00,0x52,0x04,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x0d,
+ 0x00,0x00,0x00,0x08,0x00,0xcf,0x86,0x55,0x04,0x08,0x00,0xd4,0x1c,0xd3,0x0c,0x52,
+ 0x04,0x08,0x00,0x11,0x04,0x08,0x00,0x0d,0x00,0x52,0x04,0x00,0x00,0x51,0x04,0x00,
+ 0x00,0x10,0x04,0x00,0x00,0x08,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0c,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,
+ 0x04,0x00,0x00,0x0c,0x09,0xd0,0x5a,0xcf,0x86,0xd5,0x18,0x54,0x04,0x08,0x00,0x93,
+ 0x10,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x00,0x00,0x00,
+ 0x00,0xd4,0x20,0xd3,0x10,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,
+ 0x00,0x00,0x00,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x00,
+ 0x00,0xd3,0x10,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x00,
+ 0x00,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x00,0x00,0xcf,
+ 0x86,0x95,0x40,0xd4,0x20,0xd3,0x10,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,
+ 0x04,0x08,0x00,0x00,0x00,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,
+ 0x00,0x00,0x00,0xd3,0x10,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,
+ 0x00,0x00,0x00,0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x00,
+ 0x00,0x0a,0xe6,0xd2,0x9c,0xd1,0x68,0xd0,0x32,0xcf,0x86,0xd5,0x14,0x54,0x04,0x08,
+ 0x00,0x53,0x04,0x08,0x00,0x52,0x04,0x0a,0x00,0x11,0x04,0x08,0x00,0x0a,0x00,0x54,
+ 0x04,0x0a,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0a,0x00,0x0b,0x00,0x0d,
+ 0x00,0x0d,0x00,0x12,0x04,0x0d,0x00,0x10,0x00,0xcf,0x86,0x95,0x30,0x94,0x2c,0xd3,
+ 0x18,0xd2,0x0c,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x12,0x00,0x91,0x08,0x10,
+ 0x04,0x12,0x00,0x13,0x00,0x13,0x00,0xd2,0x08,0x11,0x04,0x13,0x00,0x14,0x00,0x51,
+ 0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x15,0x00,0x00,0x00,0x00,0x00,0xd0,0x1e,0xcf,
+ 0x86,0x95,0x18,0x54,0x04,0x04,0x00,0x53,0x04,0x04,0x00,0x92,0x0c,0x51,0x04,0x04,
+ 0x00,0x10,0x04,0x00,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0xcf,0x86,0x55,0x04,0x04,
+ 0x00,0x54,0x04,0x04,0x00,0x93,0x08,0x12,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0xd1,
+ 0x06,0xcf,0x06,0x04,0x00,0xd0,0x06,0xcf,0x06,0x04,0x00,0xcf,0x86,0xd5,0x14,0x54,
+ 0x04,0x04,0x00,0x93,0x0c,0x52,0x04,0x04,0x00,0x11,0x04,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x54,0x04,0x00,0x00,0x53,0x04,0x04,0x00,0x12,0x04,0x04,0x00,0x00,0x00,0xcf,
+ 0x86,0xe5,0xa6,0x05,0xe4,0x9f,0x05,0xe3,0x96,0x04,0xe2,0xe4,0x03,0xe1,0xc0,0x01,
+ 0xd0,0x3e,0xcf,0x86,0x55,0x04,0x01,0x00,0xd4,0x1c,0x53,0x04,0x01,0x00,0xd2,0x0c,
+ 0x51,0x04,0x01,0x00,0x10,0x04,0x01,0xda,0x01,0xe4,0x91,0x08,0x10,0x04,0x01,0xe8,
+ 0x01,0xde,0x01,0xe0,0x53,0x04,0x01,0x00,0xd2,0x0c,0x51,0x04,0x04,0x00,0x10,0x04,
+ 0x04,0x00,0x06,0x00,0x51,0x04,0x06,0x00,0x10,0x04,0x04,0x00,0x01,0x00,0xcf,0x86,
+ 0xd5,0xaa,0xd4,0x32,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,
+ 0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x81,
+ 0x8b,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x81,0x8d,0xe3,0x82,
+ 0x99,0x00,0x01,0x00,0xd3,0x3c,0xd2,0x1e,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x81,
+ 0x8f,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x81,0x91,0xe3,0x82,
+ 0x99,0x00,0x01,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x81,0x93,0xe3,0x82,0x99,
+ 0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x81,0x95,0xe3,0x82,0x99,0x00,0x01,0x00,
+ 0xd2,0x1e,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x81,0x97,0xe3,0x82,0x99,0x00,0x01,
+ 0x00,0x10,0x0b,0x01,0xff,0xe3,0x81,0x99,0xe3,0x82,0x99,0x00,0x01,0x00,0xd1,0x0f,
+ 0x10,0x0b,0x01,0xff,0xe3,0x81,0x9b,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,0x0b,0x01,
+ 0xff,0xe3,0x81,0x9d,0xe3,0x82,0x99,0x00,0x01,0x00,0xd4,0x53,0xd3,0x3c,0xd2,0x1e,
+ 0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x81,0x9f,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,
+ 0x0b,0x01,0xff,0xe3,0x81,0xa1,0xe3,0x82,0x99,0x00,0x01,0x00,0xd1,0x0f,0x10,0x04,
+ 0x01,0x00,0x01,0xff,0xe3,0x81,0xa4,0xe3,0x82,0x99,0x00,0x10,0x04,0x01,0x00,0x01,
+ 0xff,0xe3,0x81,0xa6,0xe3,0x82,0x99,0x00,0x92,0x13,0x91,0x0f,0x10,0x04,0x01,0x00,
+ 0x01,0xff,0xe3,0x81,0xa8,0xe3,0x82,0x99,0x00,0x01,0x00,0x01,0x00,0xd3,0x4a,0xd2,
+ 0x25,0xd1,0x16,0x10,0x0b,0x01,0xff,0xe3,0x81,0xaf,0xe3,0x82,0x99,0x00,0x01,0xff,
+ 0xe3,0x81,0xaf,0xe3,0x82,0x9a,0x00,0x10,0x04,0x01,0x00,0x01,0xff,0xe3,0x81,0xb2,
+ 0xe3,0x82,0x99,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x81,0xb2,0xe3,0x82,0x9a,
+ 0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x81,0xb5,0xe3,0x82,0x99,0x00,0x01,0xff,
+ 0xe3,0x81,0xb5,0xe3,0x82,0x9a,0x00,0xd2,0x1e,0xd1,0x0f,0x10,0x04,0x01,0x00,0x01,
+ 0xff,0xe3,0x81,0xb8,0xe3,0x82,0x99,0x00,0x10,0x0b,0x01,0xff,0xe3,0x81,0xb8,0xe3,
+ 0x82,0x9a,0x00,0x01,0x00,0x91,0x16,0x10,0x0b,0x01,0xff,0xe3,0x81,0xbb,0xe3,0x82,
+ 0x99,0x00,0x01,0xff,0xe3,0x81,0xbb,0xe3,0x82,0x9a,0x00,0x01,0x00,0xd0,0xee,0xcf,
+ 0x86,0xd5,0x42,0x54,0x04,0x01,0x00,0xd3,0x1b,0x52,0x04,0x01,0x00,0xd1,0x0f,0x10,
+ 0x0b,0x01,0xff,0xe3,0x81,0x86,0xe3,0x82,0x99,0x00,0x06,0x00,0x10,0x04,0x06,0x00,
+ 0x00,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x00,0x00,0x01,0x08,0x10,0x04,0x01,0x08,
+ 0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x82,0x9d,0xe3,0x82,0x99,
+ 0x00,0x06,0x00,0xd4,0x32,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x06,0x00,0x01,
+ 0x00,0x01,0x00,0x01,0x00,0x52,0x04,0x01,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,
+ 0x82,0xab,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x82,0xad,0xe3,
+ 0x82,0x99,0x00,0x01,0x00,0xd3,0x3c,0xd2,0x1e,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,
+ 0x82,0xaf,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x82,0xb1,0xe3,
+ 0x82,0x99,0x00,0x01,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x82,0xb3,0xe3,0x82,
+ 0x99,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x82,0xb5,0xe3,0x82,0x99,0x00,0x01,
+ 0x00,0xd2,0x1e,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x82,0xb7,0xe3,0x82,0x99,0x00,
+ 0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x82,0xb9,0xe3,0x82,0x99,0x00,0x01,0x00,0xd1,
+ 0x0f,0x10,0x0b,0x01,0xff,0xe3,0x82,0xbb,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,0x0b,
+ 0x01,0xff,0xe3,0x82,0xbd,0xe3,0x82,0x99,0x00,0x01,0x00,0xcf,0x86,0xd5,0xd5,0xd4,
+ 0x53,0xd3,0x3c,0xd2,0x1e,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,0x82,0xbf,0xe3,0x82,
+ 0x99,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x83,0x81,0xe3,0x82,0x99,0x00,0x01,
+ 0x00,0xd1,0x0f,0x10,0x04,0x01,0x00,0x01,0xff,0xe3,0x83,0x84,0xe3,0x82,0x99,0x00,
+ 0x10,0x04,0x01,0x00,0x01,0xff,0xe3,0x83,0x86,0xe3,0x82,0x99,0x00,0x92,0x13,0x91,
+ 0x0f,0x10,0x04,0x01,0x00,0x01,0xff,0xe3,0x83,0x88,0xe3,0x82,0x99,0x00,0x01,0x00,
+ 0x01,0x00,0xd3,0x4a,0xd2,0x25,0xd1,0x16,0x10,0x0b,0x01,0xff,0xe3,0x83,0x8f,0xe3,
+ 0x82,0x99,0x00,0x01,0xff,0xe3,0x83,0x8f,0xe3,0x82,0x9a,0x00,0x10,0x04,0x01,0x00,
+ 0x01,0xff,0xe3,0x83,0x92,0xe3,0x82,0x99,0x00,0xd1,0x0f,0x10,0x0b,0x01,0xff,0xe3,
+ 0x83,0x92,0xe3,0x82,0x9a,0x00,0x01,0x00,0x10,0x0b,0x01,0xff,0xe3,0x83,0x95,0xe3,
+ 0x82,0x99,0x00,0x01,0xff,0xe3,0x83,0x95,0xe3,0x82,0x9a,0x00,0xd2,0x1e,0xd1,0x0f,
+ 0x10,0x04,0x01,0x00,0x01,0xff,0xe3,0x83,0x98,0xe3,0x82,0x99,0x00,0x10,0x0b,0x01,
+ 0xff,0xe3,0x83,0x98,0xe3,0x82,0x9a,0x00,0x01,0x00,0x91,0x16,0x10,0x0b,0x01,0xff,
+ 0xe3,0x83,0x9b,0xe3,0x82,0x99,0x00,0x01,0xff,0xe3,0x83,0x9b,0xe3,0x82,0x9a,0x00,
+ 0x01,0x00,0x54,0x04,0x01,0x00,0xd3,0x22,0x52,0x04,0x01,0x00,0xd1,0x0f,0x10,0x0b,
+ 0x01,0xff,0xe3,0x82,0xa6,0xe3,0x82,0x99,0x00,0x01,0x00,0x10,0x04,0x01,0x00,0x01,
+ 0xff,0xe3,0x83,0xaf,0xe3,0x82,0x99,0x00,0xd2,0x25,0xd1,0x16,0x10,0x0b,0x01,0xff,
+ 0xe3,0x83,0xb0,0xe3,0x82,0x99,0x00,0x01,0xff,0xe3,0x83,0xb1,0xe3,0x82,0x99,0x00,
+ 0x10,0x0b,0x01,0xff,0xe3,0x83,0xb2,0xe3,0x82,0x99,0x00,0x01,0x00,0x51,0x04,0x01,
+ 0x00,0x10,0x0b,0x01,0xff,0xe3,0x83,0xbd,0xe3,0x82,0x99,0x00,0x06,0x00,0xd1,0x65,
+ 0xd0,0x46,0xcf,0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x52,0x04,0x00,0x00,0x91,0x08,
+ 0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd4,0x18,0x53,0x04,
+ 0x01,0x00,0x52,0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x0a,0x00,0x10,0x04,
+ 0x13,0x00,0x14,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,
+ 0x01,0x00,0x01,0x00,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,0x00,0x94,0x15,0x93,0x11,
+ 0x52,0x04,0x01,0x00,0x91,0x09,0x10,0x05,0x01,0xff,0x00,0x01,0x00,0x01,0x00,0x01,
+ 0x00,0x01,0x00,0xd0,0x32,0xcf,0x86,0xd5,0x18,0x94,0x14,0x53,0x04,0x01,0x00,0x52,
+ 0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x54,
+ 0x04,0x04,0x00,0x53,0x04,0x04,0x00,0x92,0x0c,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,
+ 0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xd5,0x08,0x14,0x04,0x08,0x00,0x0a,0x00,0x94,
+ 0x0c,0x93,0x08,0x12,0x04,0x0a,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xd2,0xa4,0xd1,
+ 0x5c,0xd0,0x22,0xcf,0x86,0x95,0x1c,0x54,0x04,0x01,0x00,0x53,0x04,0x01,0x00,0x52,
+ 0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x07,0x00,0x10,0x04,0x07,0x00,0x00,
+ 0x00,0x01,0x00,0xcf,0x86,0xd5,0x20,0xd4,0x0c,0x93,0x08,0x12,0x04,0x01,0x00,0x0b,
+ 0x00,0x0b,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x07,0x00,0x06,0x00,0x06,
+ 0x00,0x06,0x00,0x06,0x00,0x54,0x04,0x01,0x00,0x53,0x04,0x01,0x00,0x52,0x04,0x01,
+ 0x00,0x51,0x04,0x07,0x00,0x10,0x04,0x08,0x00,0x01,0x00,0xd0,0x1e,0xcf,0x86,0x55,
+ 0x04,0x01,0x00,0x54,0x04,0x01,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x01,
+ 0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xcf,0x86,0xd5,0x10,0x94,0x0c,0x53,
+ 0x04,0x01,0x00,0x12,0x04,0x01,0x00,0x07,0x00,0x01,0x00,0x54,0x04,0x01,0x00,0x53,
+ 0x04,0x01,0x00,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x16,
+ 0x00,0xd1,0x30,0xd0,0x06,0xcf,0x06,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,0x00,0x54,
+ 0x04,0x01,0x00,0xd3,0x10,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,
+ 0x00,0x07,0x00,0x92,0x0c,0x51,0x04,0x07,0x00,0x10,0x04,0x07,0x00,0x01,0x00,0x01,
+ 0x00,0xd0,0x06,0xcf,0x06,0x01,0x00,0xcf,0x86,0xd5,0x14,0x54,0x04,0x01,0x00,0x53,
+ 0x04,0x01,0x00,0x52,0x04,0x01,0x00,0x11,0x04,0x01,0x00,0x07,0x00,0x54,0x04,0x01,
+ 0x00,0x53,0x04,0x01,0x00,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,
+ 0x00,0x07,0x00,0xcf,0x06,0x04,0x00,0xcf,0x06,0x04,0x00,0xd1,0x48,0xd0,0x40,0xcf,
+ 0x86,0xd5,0x06,0xcf,0x06,0x04,0x00,0xd4,0x06,0xcf,0x06,0x04,0x00,0xd3,0x2c,0xd2,
+ 0x06,0xcf,0x06,0x04,0x00,0xd1,0x06,0xcf,0x06,0x04,0x00,0xd0,0x1a,0xcf,0x86,0x55,
+ 0x04,0x04,0x00,0x54,0x04,0x04,0x00,0x93,0x0c,0x52,0x04,0x04,0x00,0x11,0x04,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x07,0x00,0xcf,0x06,0x01,0x00,0xcf,0x86,0xcf,
+ 0x06,0x01,0x00,0xcf,0x86,0xcf,0x06,0x01,0x00,0xe2,0x71,0x05,0xd1,0x8c,0xd0,0x08,
+ 0xcf,0x86,0xcf,0x06,0x01,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x01,0x00,0xd4,0x06,
+ 0xcf,0x06,0x01,0x00,0xd3,0x06,0xcf,0x06,0x01,0x00,0xd2,0x06,0xcf,0x06,0x01,0x00,
+ 0xd1,0x06,0xcf,0x06,0x01,0x00,0xd0,0x22,0xcf,0x86,0x55,0x04,0x01,0x00,0xd4,0x10,
+ 0x93,0x0c,0x52,0x04,0x01,0x00,0x11,0x04,0x01,0x00,0x08,0x00,0x08,0x00,0x53,0x04,
+ 0x08,0x00,0x12,0x04,0x08,0x00,0x0a,0x00,0xcf,0x86,0xd5,0x28,0xd4,0x18,0xd3,0x08,
+ 0x12,0x04,0x0a,0x00,0x0b,0x00,0x52,0x04,0x0b,0x00,0x91,0x08,0x10,0x04,0x0d,0x00,
+ 0x11,0x00,0x11,0x00,0x93,0x0c,0x52,0x04,0x11,0x00,0x11,0x04,0x11,0x00,0x13,0x00,
+ 0x13,0x00,0x94,0x14,0x53,0x04,0x13,0x00,0x92,0x0c,0x51,0x04,0x13,0x00,0x10,0x04,
+ 0x13,0x00,0x14,0x00,0x14,0x00,0x00,0x00,0xe0,0xdb,0x04,0xcf,0x86,0xe5,0xdf,0x01,
+ 0xd4,0x06,0xcf,0x06,0x04,0x00,0xd3,0x74,0xd2,0x6e,0xd1,0x06,0xcf,0x06,0x04,0x00,
+ 0xd0,0x3e,0xcf,0x86,0xd5,0x18,0x94,0x14,0x53,0x04,0x04,0x00,0x52,0x04,0x04,0x00,
+ 0x91,0x08,0x10,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0xd4,0x10,0x93,0x0c,
+ 0x92,0x08,0x11,0x04,0x04,0x00,0x06,0x00,0x04,0x00,0x04,0x00,0x93,0x10,0x52,0x04,
+ 0x04,0x00,0x91,0x08,0x10,0x04,0x06,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0xcf,0x86,
+ 0x95,0x24,0x94,0x20,0x93,0x1c,0xd2,0x0c,0x91,0x08,0x10,0x04,0x04,0x00,0x06,0x00,
+ 0x04,0x00,0xd1,0x08,0x10,0x04,0x04,0x00,0x06,0x00,0x10,0x04,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x0b,0x00,0x0b,0x00,0xcf,0x06,0x0a,0x00,0xd2,0x84,0xd1,0x4c,0xd0,0x16,
+ 0xcf,0x86,0x55,0x04,0x0a,0x00,0x94,0x0c,0x53,0x04,0x0a,0x00,0x12,0x04,0x0a,0x00,
+ 0x00,0x00,0x00,0x00,0xcf,0x86,0x55,0x04,0x0a,0x00,0xd4,0x1c,0xd3,0x0c,0x92,0x08,
+ 0x11,0x04,0x0c,0x00,0x0a,0x00,0x0a,0x00,0x52,0x04,0x0a,0x00,0x51,0x04,0x0a,0x00,
+ 0x10,0x04,0x0a,0x00,0x0a,0xe6,0xd3,0x08,0x12,0x04,0x0a,0x00,0x0d,0xe6,0x52,0x04,
+ 0x0d,0xe6,0x11,0x04,0x0a,0xe6,0x0a,0x00,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,
+ 0x0a,0x00,0x53,0x04,0x0a,0x00,0x52,0x04,0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,
+ 0x11,0xe6,0x0d,0xe6,0x0b,0x00,0xcf,0x86,0x55,0x04,0x0b,0x00,0x54,0x04,0x0b,0x00,
+ 0x93,0x0c,0x92,0x08,0x11,0x04,0x0b,0xe6,0x0b,0x00,0x0b,0x00,0x00,0x00,0xd1,0x40,
+ 0xd0,0x3a,0xcf,0x86,0xd5,0x24,0x54,0x04,0x08,0x00,0xd3,0x10,0x52,0x04,0x08,0x00,
+ 0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x09,0x00,0x92,0x0c,0x51,0x04,0x09,0x00,
+ 0x10,0x04,0x09,0x00,0x0a,0x00,0x0a,0x00,0x94,0x10,0x93,0x0c,0x92,0x08,0x11,0x04,
+ 0x09,0x00,0x0a,0x00,0x0a,0x00,0x0a,0x00,0x0a,0x00,0xcf,0x06,0x0a,0x00,0xd0,0x5e,
+ 0xcf,0x86,0xd5,0x28,0xd4,0x18,0x53,0x04,0x0a,0x00,0x52,0x04,0x0a,0x00,0xd1,0x08,
+ 0x10,0x04,0x0a,0x00,0x0c,0x00,0x10,0x04,0x0c,0x00,0x11,0x00,0x93,0x0c,0x92,0x08,
+ 0x11,0x04,0x0c,0x00,0x0d,0x00,0x10,0x00,0x10,0x00,0xd4,0x1c,0x53,0x04,0x0c,0x00,
+ 0xd2,0x0c,0x51,0x04,0x0c,0x00,0x10,0x04,0x0d,0x00,0x10,0x00,0x51,0x04,0x10,0x00,
+ 0x10,0x04,0x12,0x00,0x14,0x00,0xd3,0x0c,0x92,0x08,0x11,0x04,0x10,0x00,0x11,0x00,
+ 0x11,0x00,0x92,0x08,0x11,0x04,0x14,0x00,0x15,0x00,0x15,0x00,0xcf,0x86,0xd5,0x1c,
+ 0x94,0x18,0x93,0x14,0xd2,0x08,0x11,0x04,0x00,0x00,0x15,0x00,0x51,0x04,0x15,0x00,
+ 0x10,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x04,0x00,0x00,0xd3,0x10,
+ 0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x92,0x0c,
+ 0x51,0x04,0x0d,0x00,0x10,0x04,0x0c,0x00,0x0a,0x00,0x0a,0x00,0xe4,0xf2,0x02,0xe3,
+ 0x65,0x01,0xd2,0x98,0xd1,0x48,0xd0,0x36,0xcf,0x86,0xd5,0x18,0x94,0x14,0x93,0x10,
+ 0x52,0x04,0x08,0x00,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x09,0x08,0x00,0x08,0x00,
+ 0x08,0x00,0xd4,0x0c,0x53,0x04,0x08,0x00,0x12,0x04,0x08,0x00,0x00,0x00,0x53,0x04,
+ 0x0b,0x00,0x92,0x08,0x11,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0x55,0x04,
+ 0x09,0x00,0x54,0x04,0x09,0x00,0x13,0x04,0x09,0x00,0x00,0x00,0xd0,0x06,0xcf,0x06,
+ 0x0a,0x00,0xcf,0x86,0xd5,0x2c,0xd4,0x1c,0xd3,0x10,0x52,0x04,0x0a,0x00,0x91,0x08,
+ 0x10,0x04,0x0a,0x09,0x12,0x00,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,
+ 0x0a,0x00,0x53,0x04,0x0a,0x00,0x92,0x08,0x11,0x04,0x0a,0x00,0x00,0x00,0x00,0x00,
+ 0x54,0x04,0x0b,0xe6,0xd3,0x0c,0x92,0x08,0x11,0x04,0x0b,0xe6,0x0b,0x00,0x0b,0x00,
+ 0x52,0x04,0x0b,0x00,0x11,0x04,0x11,0x00,0x14,0x00,0xd1,0x60,0xd0,0x22,0xcf,0x86,
+ 0x55,0x04,0x0a,0x00,0x94,0x18,0x53,0x04,0x0a,0x00,0xd2,0x0c,0x51,0x04,0x0a,0x00,
+ 0x10,0x04,0x0a,0x00,0x0a,0xdc,0x11,0x04,0x0a,0xdc,0x0a,0x00,0x0a,0x00,0xcf,0x86,
+ 0xd5,0x24,0x54,0x04,0x0a,0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x0a,0x00,0x10,0x04,
+ 0x0a,0x00,0x0a,0x09,0x00,0x00,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,
+ 0x00,0x00,0x0a,0x00,0x54,0x04,0x0b,0x00,0x53,0x04,0x0b,0x00,0x52,0x04,0x0b,0x00,
+ 0x91,0x08,0x10,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0xd0,0x1e,0xcf,0x86,0x55,0x04,
+ 0x0b,0x00,0x54,0x04,0x0b,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,0x0b,0x00,0x10,0x04,
+ 0x0b,0x00,0x0b,0x07,0x0b,0x00,0x0b,0x00,0xcf,0x86,0xd5,0x34,0xd4,0x20,0xd3,0x10,
+ 0x92,0x0c,0x91,0x08,0x10,0x04,0x0b,0x09,0x0b,0x00,0x0b,0x00,0x0b,0x00,0x52,0x04,
+ 0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,0x00,0x00,0x0b,0x00,0x53,0x04,0x0b,0x00,
+ 0xd2,0x08,0x11,0x04,0x0b,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x0b,0x00,0x54,0x04,
+ 0x10,0x00,0x53,0x04,0x10,0x00,0x52,0x04,0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,
+ 0x10,0x00,0x00,0x00,0xd2,0xd0,0xd1,0x50,0xd0,0x1e,0xcf,0x86,0x55,0x04,0x0a,0x00,
+ 0x54,0x04,0x0a,0x00,0x93,0x10,0x52,0x04,0x0a,0x00,0x51,0x04,0x0a,0x00,0x10,0x04,
+ 0x0a,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xd5,0x20,0xd4,0x10,0x53,0x04,0x0a,0x00,
+ 0x52,0x04,0x0a,0x00,0x11,0x04,0x0a,0x00,0x00,0x00,0x53,0x04,0x0a,0x00,0x92,0x08,
+ 0x11,0x04,0x0a,0x00,0x00,0x00,0x0a,0x00,0x54,0x04,0x0b,0x00,0x53,0x04,0x0b,0x00,
+ 0x12,0x04,0x0b,0x00,0x10,0x00,0xd0,0x3a,0xcf,0x86,0x55,0x04,0x0b,0x00,0x54,0x04,
+ 0x0b,0x00,0xd3,0x1c,0xd2,0x0c,0x91,0x08,0x10,0x04,0x0b,0xe6,0x0b,0x00,0x0b,0xe6,
+ 0xd1,0x08,0x10,0x04,0x0b,0xdc,0x0b,0x00,0x10,0x04,0x0b,0x00,0x0b,0xe6,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x0b,0xe6,0x0b,0x00,0x0b,0x00,0x11,0x04,0x0b,0x00,0x0b,0xe6,
+ 0xcf,0x86,0xd5,0x2c,0xd4,0x18,0x93,0x14,0x92,0x10,0xd1,0x08,0x10,0x04,0x0b,0x00,
+ 0x0b,0xe6,0x10,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x00,0x00,
+ 0x92,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x0b,0x00,0x0b,0x00,0x54,0x04,
+ 0x0d,0x00,0x93,0x10,0x52,0x04,0x0d,0x00,0x51,0x04,0x0d,0x00,0x10,0x04,0x0d,0x09,
+ 0x00,0x00,0x00,0x00,0xd1,0x8c,0xd0,0x72,0xcf,0x86,0xd5,0x4c,0xd4,0x30,0xd3,0x18,
+ 0xd2,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0c,0x00,0x0c,0x00,0x51,0x04,0x0c,0x00,
+ 0x10,0x04,0x0c,0x00,0x00,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0c,0x00,
+ 0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,0x00,0x00,0x93,0x18,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x00,0x00,0x0c,0x00,0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,
+ 0x0c,0x00,0x00,0x00,0x00,0x00,0x94,0x20,0xd3,0x10,0x52,0x04,0x0c,0x00,0x51,0x04,
+ 0x0c,0x00,0x10,0x04,0x0c,0x00,0x00,0x00,0x52,0x04,0x0c,0x00,0x51,0x04,0x0c,0x00,
+ 0x10,0x04,0x0c,0x00,0x00,0x00,0x10,0x00,0xcf,0x86,0x55,0x04,0x10,0x00,0x94,0x10,
+ 0x93,0x0c,0x52,0x04,0x11,0x00,0x11,0x04,0x10,0x00,0x15,0x00,0x00,0x00,0x11,0x00,
+ 0xd0,0x06,0xcf,0x06,0x11,0x00,0xcf,0x86,0x55,0x04,0x0b,0x00,0xd4,0x14,0x53,0x04,
+ 0x0b,0x00,0x52,0x04,0x0b,0x00,0x91,0x08,0x10,0x04,0x0b,0x00,0x0b,0x09,0x00,0x00,
+ 0x53,0x04,0x0b,0x00,0x92,0x08,0x11,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,
+ 0x02,0xff,0xff,0xcf,0x86,0xcf,0x06,0x02,0xff,0xff,0xd1,0x76,0xd0,0x09,0xcf,0x86,
+ 0xcf,0x06,0x02,0xff,0xff,0xcf,0x86,0x85,0xd4,0x07,0xcf,0x06,0x02,0xff,0xff,0xd3,
+ 0x07,0xcf,0x06,0x02,0xff,0xff,0xd2,0x07,0xcf,0x06,0x02,0xff,0xff,0xd1,0x07,0xcf,
+ 0x06,0x02,0xff,0xff,0xd0,0x18,0xcf,0x86,0x55,0x05,0x02,0xff,0xff,0x94,0x0d,0x93,
+ 0x09,0x12,0x05,0x02,0xff,0xff,0x00,0x00,0x00,0x00,0x0b,0x00,0xcf,0x86,0xd5,0x24,
+ 0x94,0x20,0xd3,0x10,0x52,0x04,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,0x00,
+ 0x00,0x00,0x92,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x0b,0x00,0x0b,0x00,
+ 0x0b,0x00,0x54,0x04,0x0b,0x00,0x53,0x04,0x0b,0x00,0x12,0x04,0x0b,0x00,0x00,0x00,
+ 0xd0,0x08,0xcf,0x86,0xcf,0x06,0x01,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x01,0x00,
+ 0xe4,0x9c,0x10,0xe3,0x16,0x08,0xd2,0x06,0xcf,0x06,0x01,0x00,0xe1,0x08,0x04,0xe0,
+ 0x04,0x02,0xcf,0x86,0xe5,0x01,0x01,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe8,0xb1,0x88,0x00,0x01,0xff,0xe6,0x9b,0xb4,0x00,0x10,0x08,0x01,
+ 0xff,0xe8,0xbb,0x8a,0x00,0x01,0xff,0xe8,0xb3,0x88,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0xe6,0xbb,0x91,0x00,0x01,0xff,0xe4,0xb8,0xb2,0x00,0x10,0x08,0x01,0xff,0xe5,
+ 0x8f,0xa5,0x00,0x01,0xff,0xe9,0xbe,0x9c,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0xe9,0xbe,0x9c,0x00,0x01,0xff,0xe5,0xa5,0x91,0x00,0x10,0x08,0x01,0xff,0xe9,
+ 0x87,0x91,0x00,0x01,0xff,0xe5,0x96,0x87,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe5,
+ 0xa5,0x88,0x00,0x01,0xff,0xe6,0x87,0xb6,0x00,0x10,0x08,0x01,0xff,0xe7,0x99,0xa9,
+ 0x00,0x01,0xff,0xe7,0xbe,0x85,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0xe8,0x98,0xbf,0x00,0x01,0xff,0xe8,0x9e,0xba,0x00,0x10,0x08,0x01,0xff,0xe8,
+ 0xa3,0xb8,0x00,0x01,0xff,0xe9,0x82,0x8f,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe6,
+ 0xa8,0x82,0x00,0x01,0xff,0xe6,0xb4,0x9b,0x00,0x10,0x08,0x01,0xff,0xe7,0x83,0x99,
+ 0x00,0x01,0xff,0xe7,0x8f,0x9e,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe8,
+ 0x90,0xbd,0x00,0x01,0xff,0xe9,0x85,0xaa,0x00,0x10,0x08,0x01,0xff,0xe9,0xa7,0xb1,
+ 0x00,0x01,0xff,0xe4,0xba,0x82,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe5,0x8d,0xb5,
+ 0x00,0x01,0xff,0xe6,0xac,0x84,0x00,0x10,0x08,0x01,0xff,0xe7,0x88,0x9b,0x00,0x01,
+ 0xff,0xe8,0x98,0xad,0x00,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0xe9,0xb8,0x9e,0x00,0x01,0xff,0xe5,0xb5,0x90,0x00,0x10,0x08,0x01,0xff,0xe6,
+ 0xbf,0xab,0x00,0x01,0xff,0xe8,0x97,0x8d,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe8,
+ 0xa5,0xa4,0x00,0x01,0xff,0xe6,0x8b,0x89,0x00,0x10,0x08,0x01,0xff,0xe8,0x87,0x98,
+ 0x00,0x01,0xff,0xe8,0xa0,0x9f,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe5,
+ 0xbb,0x8a,0x00,0x01,0xff,0xe6,0x9c,0x97,0x00,0x10,0x08,0x01,0xff,0xe6,0xb5,0xaa,
+ 0x00,0x01,0xff,0xe7,0x8b,0xbc,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe9,0x83,0x8e,
+ 0x00,0x01,0xff,0xe4,0xbe,0x86,0x00,0x10,0x08,0x01,0xff,0xe5,0x86,0xb7,0x00,0x01,
+ 0xff,0xe5,0x8b,0x9e,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe6,
+ 0x93,0x84,0x00,0x01,0xff,0xe6,0xab,0x93,0x00,0x10,0x08,0x01,0xff,0xe7,0x88,0x90,
+ 0x00,0x01,0xff,0xe7,0x9b,0xa7,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe8,0x80,0x81,
+ 0x00,0x01,0xff,0xe8,0x98,0x86,0x00,0x10,0x08,0x01,0xff,0xe8,0x99,0x9c,0x00,0x01,
+ 0xff,0xe8,0xb7,0xaf,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe9,0x9c,0xb2,
+ 0x00,0x01,0xff,0xe9,0xad,0xaf,0x00,0x10,0x08,0x01,0xff,0xe9,0xb7,0xba,0x00,0x01,
+ 0xff,0xe7,0xa2,0x8c,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe7,0xa5,0xbf,0x00,0x01,
+ 0xff,0xe7,0xb6,0xa0,0x00,0x10,0x08,0x01,0xff,0xe8,0x8f,0x89,0x00,0x01,0xff,0xe9,
+ 0x8c,0x84,0x00,0xcf,0x86,0xe5,0x01,0x01,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe9,0xb9,0xbf,0x00,0x01,0xff,0xe8,0xab,0x96,0x00,0x10,0x08,
+ 0x01,0xff,0xe5,0xa3,0x9f,0x00,0x01,0xff,0xe5,0xbc,0x84,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe7,0xb1,0xa0,0x00,0x01,0xff,0xe8,0x81,0xbe,0x00,0x10,0x08,0x01,0xff,
+ 0xe7,0x89,0xa2,0x00,0x01,0xff,0xe7,0xa3,0x8a,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe8,0xb3,0x82,0x00,0x01,0xff,0xe9,0x9b,0xb7,0x00,0x10,0x08,0x01,0xff,
+ 0xe5,0xa3,0x98,0x00,0x01,0xff,0xe5,0xb1,0xa2,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe6,0xa8,0x93,0x00,0x01,0xff,0xe6,0xb7,0x9a,0x00,0x10,0x08,0x01,0xff,0xe6,0xbc,
+ 0x8f,0x00,0x01,0xff,0xe7,0xb4,0xaf,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe7,0xb8,0xb7,0x00,0x01,0xff,0xe9,0x99,0x8b,0x00,0x10,0x08,0x01,0xff,
+ 0xe5,0x8b,0x92,0x00,0x01,0xff,0xe8,0x82,0x8b,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe5,0x87,0x9c,0x00,0x01,0xff,0xe5,0x87,0x8c,0x00,0x10,0x08,0x01,0xff,0xe7,0xa8,
+ 0x9c,0x00,0x01,0xff,0xe7,0xb6,0xbe,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe8,0x8f,0xb1,0x00,0x01,0xff,0xe9,0x99,0xb5,0x00,0x10,0x08,0x01,0xff,0xe8,0xae,
+ 0x80,0x00,0x01,0xff,0xe6,0x8b,0x8f,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe6,0xa8,
+ 0x82,0x00,0x01,0xff,0xe8,0xab,0xbe,0x00,0x10,0x08,0x01,0xff,0xe4,0xb8,0xb9,0x00,
+ 0x01,0xff,0xe5,0xaf,0xa7,0x00,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe6,0x80,0x92,0x00,0x01,0xff,0xe7,0x8e,0x87,0x00,0x10,0x08,0x01,0xff,
+ 0xe7,0x95,0xb0,0x00,0x01,0xff,0xe5,0x8c,0x97,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe7,0xa3,0xbb,0x00,0x01,0xff,0xe4,0xbe,0xbf,0x00,0x10,0x08,0x01,0xff,0xe5,0xbe,
+ 0xa9,0x00,0x01,0xff,0xe4,0xb8,0x8d,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe6,0xb3,0x8c,0x00,0x01,0xff,0xe6,0x95,0xb8,0x00,0x10,0x08,0x01,0xff,0xe7,0xb4,
+ 0xa2,0x00,0x01,0xff,0xe5,0x8f,0x83,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe5,0xa1,
+ 0x9e,0x00,0x01,0xff,0xe7,0x9c,0x81,0x00,0x10,0x08,0x01,0xff,0xe8,0x91,0x89,0x00,
+ 0x01,0xff,0xe8,0xaa,0xaa,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe6,0xae,0xba,0x00,0x01,0xff,0xe8,0xbe,0xb0,0x00,0x10,0x08,0x01,0xff,0xe6,0xb2,
+ 0x88,0x00,0x01,0xff,0xe6,0x8b,0xbe,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe8,0x8b,
+ 0xa5,0x00,0x01,0xff,0xe6,0x8e,0xa0,0x00,0x10,0x08,0x01,0xff,0xe7,0x95,0xa5,0x00,
+ 0x01,0xff,0xe4,0xba,0xae,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe5,0x85,
+ 0xa9,0x00,0x01,0xff,0xe5,0x87,0x89,0x00,0x10,0x08,0x01,0xff,0xe6,0xa2,0x81,0x00,
+ 0x01,0xff,0xe7,0xb3,0xa7,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe8,0x89,0xaf,0x00,
+ 0x01,0xff,0xe8,0xab,0x92,0x00,0x10,0x08,0x01,0xff,0xe9,0x87,0x8f,0x00,0x01,0xff,
+ 0xe5,0x8b,0xb5,0x00,0xe0,0x04,0x02,0xcf,0x86,0xe5,0x01,0x01,0xd4,0x80,0xd3,0x40,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe5,0x91,0x82,0x00,0x01,0xff,0xe5,0xa5,
+ 0xb3,0x00,0x10,0x08,0x01,0xff,0xe5,0xbb,0xac,0x00,0x01,0xff,0xe6,0x97,0x85,0x00,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0xe6,0xbf,0xbe,0x00,0x01,0xff,0xe7,0xa4,0xaa,0x00,
+ 0x10,0x08,0x01,0xff,0xe9,0x96,0xad,0x00,0x01,0xff,0xe9,0xa9,0xaa,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0xe9,0xba,0x97,0x00,0x01,0xff,0xe9,0xbb,0x8e,0x00,
+ 0x10,0x08,0x01,0xff,0xe5,0x8a,0x9b,0x00,0x01,0xff,0xe6,0x9b,0x86,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe6,0xad,0xb7,0x00,0x01,0xff,0xe8,0xbd,0xa2,0x00,0x10,0x08,
+ 0x01,0xff,0xe5,0xb9,0xb4,0x00,0x01,0xff,0xe6,0x86,0x90,0x00,0xd3,0x40,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0xe6,0x88,0x80,0x00,0x01,0xff,0xe6,0x92,0x9a,0x00,
+ 0x10,0x08,0x01,0xff,0xe6,0xbc,0xa3,0x00,0x01,0xff,0xe7,0x85,0x89,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe7,0x92,0x89,0x00,0x01,0xff,0xe7,0xa7,0x8a,0x00,0x10,0x08,
+ 0x01,0xff,0xe7,0xb7,0xb4,0x00,0x01,0xff,0xe8,0x81,0xaf,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe8,0xbc,0xa6,0x00,0x01,0xff,0xe8,0x93,0xae,0x00,0x10,0x08,
+ 0x01,0xff,0xe9,0x80,0xa3,0x00,0x01,0xff,0xe9,0x8d,0x8a,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe5,0x88,0x97,0x00,0x01,0xff,0xe5,0x8a,0xa3,0x00,0x10,0x08,0x01,0xff,
+ 0xe5,0x92,0xbd,0x00,0x01,0xff,0xe7,0x83,0x88,0x00,0xd4,0x80,0xd3,0x40,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0xe8,0xa3,0x82,0x00,0x01,0xff,0xe8,0xaa,0xaa,0x00,
+ 0x10,0x08,0x01,0xff,0xe5,0xbb,0x89,0x00,0x01,0xff,0xe5,0xbf,0xb5,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe6,0x8d,0xbb,0x00,0x01,0xff,0xe6,0xae,0xae,0x00,0x10,0x08,
+ 0x01,0xff,0xe7,0xb0,0xbe,0x00,0x01,0xff,0xe7,0x8d,0xb5,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe4,0xbb,0xa4,0x00,0x01,0xff,0xe5,0x9b,0xb9,0x00,0x10,0x08,
+ 0x01,0xff,0xe5,0xaf,0xa7,0x00,0x01,0xff,0xe5,0xb6,0xba,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe6,0x80,0x9c,0x00,0x01,0xff,0xe7,0x8e,0xb2,0x00,0x10,0x08,0x01,0xff,
+ 0xe7,0x91,0xa9,0x00,0x01,0xff,0xe7,0xbe,0x9a,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe8,0x81,0x86,0x00,0x01,0xff,0xe9,0x88,0xb4,0x00,0x10,0x08,
+ 0x01,0xff,0xe9,0x9b,0xb6,0x00,0x01,0xff,0xe9,0x9d,0x88,0x00,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe9,0xa0,0x98,0x00,0x01,0xff,0xe4,0xbe,0x8b,0x00,0x10,0x08,0x01,0xff,
+ 0xe7,0xa6,0xae,0x00,0x01,0xff,0xe9,0x86,0xb4,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe9,0x9a,0xb8,0x00,0x01,0xff,0xe6,0x83,0xa1,0x00,0x10,0x08,0x01,0xff,
+ 0xe4,0xba,0x86,0x00,0x01,0xff,0xe5,0x83,0x9a,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe5,0xaf,0xae,0x00,0x01,0xff,0xe5,0xb0,0xbf,0x00,0x10,0x08,0x01,0xff,0xe6,0x96,
+ 0x99,0x00,0x01,0xff,0xe6,0xa8,0x82,0x00,0xcf,0x86,0xe5,0x01,0x01,0xd4,0x80,0xd3,
+ 0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe7,0x87,0x8e,0x00,0x01,0xff,0xe7,
+ 0x99,0x82,0x00,0x10,0x08,0x01,0xff,0xe8,0x93,0xbc,0x00,0x01,0xff,0xe9,0x81,0xbc,
+ 0x00,0xd1,0x10,0x10,0x08,0x01,0xff,0xe9,0xbe,0x8d,0x00,0x01,0xff,0xe6,0x9a,0x88,
+ 0x00,0x10,0x08,0x01,0xff,0xe9,0x98,0xae,0x00,0x01,0xff,0xe5,0x8a,0x89,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe6,0x9d,0xbb,0x00,0x01,0xff,0xe6,0x9f,0xb3,
+ 0x00,0x10,0x08,0x01,0xff,0xe6,0xb5,0x81,0x00,0x01,0xff,0xe6,0xba,0x9c,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe7,0x90,0x89,0x00,0x01,0xff,0xe7,0x95,0x99,0x00,0x10,
+ 0x08,0x01,0xff,0xe7,0xa1,0xab,0x00,0x01,0xff,0xe7,0xb4,0x90,0x00,0xd3,0x40,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe9,0xa1,0x9e,0x00,0x01,0xff,0xe5,0x85,0xad,
+ 0x00,0x10,0x08,0x01,0xff,0xe6,0x88,0xae,0x00,0x01,0xff,0xe9,0x99,0xb8,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe5,0x80,0xab,0x00,0x01,0xff,0xe5,0xb4,0x99,0x00,0x10,
+ 0x08,0x01,0xff,0xe6,0xb7,0xaa,0x00,0x01,0xff,0xe8,0xbc,0xaa,0x00,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe5,0xbe,0x8b,0x00,0x01,0xff,0xe6,0x85,0x84,0x00,0x10,
+ 0x08,0x01,0xff,0xe6,0xa0,0x97,0x00,0x01,0xff,0xe7,0x8e,0x87,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe9,0x9a,0x86,0x00,0x01,0xff,0xe5,0x88,0xa9,0x00,0x10,0x08,0x01,
+ 0xff,0xe5,0x90,0x8f,0x00,0x01,0xff,0xe5,0xb1,0xa5,0x00,0xd4,0x80,0xd3,0x40,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x01,0xff,0xe6,0x98,0x93,0x00,0x01,0xff,0xe6,0x9d,0x8e,
+ 0x00,0x10,0x08,0x01,0xff,0xe6,0xa2,0xa8,0x00,0x01,0xff,0xe6,0xb3,0xa5,0x00,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe7,0x90,0x86,0x00,0x01,0xff,0xe7,0x97,0xa2,0x00,0x10,
+ 0x08,0x01,0xff,0xe7,0xbd,0xb9,0x00,0x01,0xff,0xe8,0xa3,0x8f,0x00,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe8,0xa3,0xa1,0x00,0x01,0xff,0xe9,0x87,0x8c,0x00,0x10,
+ 0x08,0x01,0xff,0xe9,0x9b,0xa2,0x00,0x01,0xff,0xe5,0x8c,0xbf,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe6,0xba,0xba,0x00,0x01,0xff,0xe5,0x90,0x9d,0x00,0x10,0x08,0x01,
+ 0xff,0xe7,0x87,0x90,0x00,0x01,0xff,0xe7,0x92,0x98,0x00,0xd3,0x40,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x01,0xff,0xe8,0x97,0xba,0x00,0x01,0xff,0xe9,0x9a,0xa3,0x00,0x10,
+ 0x08,0x01,0xff,0xe9,0xb1,0x97,0x00,0x01,0xff,0xe9,0xba,0x9f,0x00,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe6,0x9e,0x97,0x00,0x01,0xff,0xe6,0xb7,0x8b,0x00,0x10,0x08,0x01,
+ 0xff,0xe8,0x87,0xa8,0x00,0x01,0xff,0xe7,0xab,0x8b,0x00,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x01,0xff,0xe7,0xac,0xa0,0x00,0x01,0xff,0xe7,0xb2,0x92,0x00,0x10,0x08,0x01,
+ 0xff,0xe7,0x8b,0x80,0x00,0x01,0xff,0xe7,0x82,0x99,0x00,0xd1,0x10,0x10,0x08,0x01,
+ 0xff,0xe8,0xad,0x98,0x00,0x01,0xff,0xe4,0xbb,0x80,0x00,0x10,0x08,0x01,0xff,0xe8,
+ 0x8c,0xb6,0x00,0x01,0xff,0xe5,0x88,0xba,0x00,0xe2,0xad,0x06,0xe1,0xc4,0x03,0xe0,
+ 0xcb,0x01,0xcf,0x86,0xd5,0xe4,0xd4,0x74,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x01,0xff,0xe5,0x88,0x87,0x00,0x01,0xff,0xe5,0xba,0xa6,0x00,0x10,0x08,0x01,0xff,
+ 0xe6,0x8b,0x93,0x00,0x01,0xff,0xe7,0xb3,0x96,0x00,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe5,0xae,0x85,0x00,0x01,0xff,0xe6,0xb4,0x9e,0x00,0x10,0x08,0x01,0xff,0xe6,0x9a,
+ 0xb4,0x00,0x01,0xff,0xe8,0xbc,0xbb,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x01,0xff,
+ 0xe8,0xa1,0x8c,0x00,0x01,0xff,0xe9,0x99,0x8d,0x00,0x10,0x08,0x01,0xff,0xe8,0xa6,
+ 0x8b,0x00,0x01,0xff,0xe5,0xbb,0x93,0x00,0x91,0x10,0x10,0x08,0x01,0xff,0xe5,0x85,
+ 0x80,0x00,0x01,0xff,0xe5,0x97,0x80,0x00,0x01,0x00,0xd3,0x34,0xd2,0x18,0xd1,0x0c,
+ 0x10,0x08,0x01,0xff,0xe5,0xa1,0x9a,0x00,0x01,0x00,0x10,0x08,0x01,0xff,0xe6,0x99,
+ 0xb4,0x00,0x01,0x00,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0xe5,0x87,0x9e,0x00,
+ 0x10,0x08,0x01,0xff,0xe7,0x8c,0xaa,0x00,0x01,0xff,0xe7,0x9b,0x8a,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x01,0xff,0xe7,0xa4,0xbc,0x00,0x01,0xff,0xe7,0xa5,0x9e,0x00,
+ 0x10,0x08,0x01,0xff,0xe7,0xa5,0xa5,0x00,0x01,0xff,0xe7,0xa6,0x8f,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe9,0x9d,0x96,0x00,0x01,0xff,0xe7,0xb2,0xbe,0x00,0x10,0x08,
+ 0x01,0xff,0xe7,0xbe,0xbd,0x00,0x01,0x00,0xd4,0x64,0xd3,0x30,0xd2,0x18,0xd1,0x0c,
+ 0x10,0x08,0x01,0xff,0xe8,0x98,0x92,0x00,0x01,0x00,0x10,0x08,0x01,0xff,0xe8,0xab,
+ 0xb8,0x00,0x01,0x00,0xd1,0x0c,0x10,0x04,0x01,0x00,0x01,0xff,0xe9,0x80,0xb8,0x00,
+ 0x10,0x08,0x01,0xff,0xe9,0x83,0xbd,0x00,0x01,0x00,0xd2,0x14,0x51,0x04,0x01,0x00,
+ 0x10,0x08,0x01,0xff,0xe9,0xa3,0xaf,0x00,0x01,0xff,0xe9,0xa3,0xbc,0x00,0xd1,0x10,
+ 0x10,0x08,0x01,0xff,0xe9,0xa4,0xa8,0x00,0x01,0xff,0xe9,0xb6,0xb4,0x00,0x10,0x08,
+ 0x0d,0xff,0xe9,0x83,0x9e,0x00,0x0d,0xff,0xe9,0x9a,0xb7,0x00,0xd3,0x40,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x06,0xff,0xe4,0xbe,0xae,0x00,0x06,0xff,0xe5,0x83,0xa7,0x00,
+ 0x10,0x08,0x06,0xff,0xe5,0x85,0x8d,0x00,0x06,0xff,0xe5,0x8b,0x89,0x00,0xd1,0x10,
+ 0x10,0x08,0x06,0xff,0xe5,0x8b,0xa4,0x00,0x06,0xff,0xe5,0x8d,0x91,0x00,0x10,0x08,
+ 0x06,0xff,0xe5,0x96,0x9d,0x00,0x06,0xff,0xe5,0x98,0x86,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x06,0xff,0xe5,0x99,0xa8,0x00,0x06,0xff,0xe5,0xa1,0x80,0x00,0x10,0x08,
+ 0x06,0xff,0xe5,0xa2,0xa8,0x00,0x06,0xff,0xe5,0xb1,0xa4,0x00,0xd1,0x10,0x10,0x08,
+ 0x06,0xff,0xe5,0xb1,0xae,0x00,0x06,0xff,0xe6,0x82,0x94,0x00,0x10,0x08,0x06,0xff,
+ 0xe6,0x85,0xa8,0x00,0x06,0xff,0xe6,0x86,0x8e,0x00,0xcf,0x86,0xe5,0x01,0x01,0xd4,
+ 0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x06,0xff,0xe6,0x87,0xb2,0x00,0x06,
+ 0xff,0xe6,0x95,0x8f,0x00,0x10,0x08,0x06,0xff,0xe6,0x97,0xa2,0x00,0x06,0xff,0xe6,
+ 0x9a,0x91,0x00,0xd1,0x10,0x10,0x08,0x06,0xff,0xe6,0xa2,0x85,0x00,0x06,0xff,0xe6,
+ 0xb5,0xb7,0x00,0x10,0x08,0x06,0xff,0xe6,0xb8,0x9a,0x00,0x06,0xff,0xe6,0xbc,0xa2,
+ 0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x06,0xff,0xe7,0x85,0xae,0x00,0x06,0xff,0xe7,
+ 0x88,0xab,0x00,0x10,0x08,0x06,0xff,0xe7,0x90,0xa2,0x00,0x06,0xff,0xe7,0xa2,0x91,
+ 0x00,0xd1,0x10,0x10,0x08,0x06,0xff,0xe7,0xa4,0xbe,0x00,0x06,0xff,0xe7,0xa5,0x89,
+ 0x00,0x10,0x08,0x06,0xff,0xe7,0xa5,0x88,0x00,0x06,0xff,0xe7,0xa5,0x90,0x00,0xd3,
+ 0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x06,0xff,0xe7,0xa5,0x96,0x00,0x06,0xff,0xe7,
+ 0xa5,0x9d,0x00,0x10,0x08,0x06,0xff,0xe7,0xa6,0x8d,0x00,0x06,0xff,0xe7,0xa6,0x8e,
+ 0x00,0xd1,0x10,0x10,0x08,0x06,0xff,0xe7,0xa9,0x80,0x00,0x06,0xff,0xe7,0xaa,0x81,
+ 0x00,0x10,0x08,0x06,0xff,0xe7,0xaf,0x80,0x00,0x06,0xff,0xe7,0xb7,0xb4,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x06,0xff,0xe7,0xb8,0x89,0x00,0x06,0xff,0xe7,0xb9,0x81,
+ 0x00,0x10,0x08,0x06,0xff,0xe7,0xbd,0xb2,0x00,0x06,0xff,0xe8,0x80,0x85,0x00,0xd1,
+ 0x10,0x10,0x08,0x06,0xff,0xe8,0x87,0xad,0x00,0x06,0xff,0xe8,0x89,0xb9,0x00,0x10,
+ 0x08,0x06,0xff,0xe8,0x89,0xb9,0x00,0x06,0xff,0xe8,0x91,0x97,0x00,0xd4,0x75,0xd3,
+ 0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x06,0xff,0xe8,0xa4,0x90,0x00,0x06,0xff,0xe8,
+ 0xa6,0x96,0x00,0x10,0x08,0x06,0xff,0xe8,0xac,0x81,0x00,0x06,0xff,0xe8,0xac,0xb9,
+ 0x00,0xd1,0x10,0x10,0x08,0x06,0xff,0xe8,0xb3,0x93,0x00,0x06,0xff,0xe8,0xb4,0x88,
+ 0x00,0x10,0x08,0x06,0xff,0xe8,0xbe,0xb6,0x00,0x06,0xff,0xe9,0x80,0xb8,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x06,0xff,0xe9,0x9b,0xa3,0x00,0x06,0xff,0xe9,0x9f,0xbf,
+ 0x00,0x10,0x08,0x06,0xff,0xe9,0xa0,0xbb,0x00,0x0b,0xff,0xe6,0x81,0xb5,0x00,0x91,
+ 0x11,0x10,0x09,0x0b,0xff,0xf0,0xa4,0x8b,0xae,0x00,0x0b,0xff,0xe8,0x88,0x98,0x00,
+ 0x00,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,0xe4,0xb8,0xa6,0x00,
+ 0x08,0xff,0xe5,0x86,0xb5,0x00,0x10,0x08,0x08,0xff,0xe5,0x85,0xa8,0x00,0x08,0xff,
+ 0xe4,0xbe,0x80,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe5,0x85,0x85,0x00,0x08,0xff,
+ 0xe5,0x86,0x80,0x00,0x10,0x08,0x08,0xff,0xe5,0x8b,0x87,0x00,0x08,0xff,0xe5,0x8b,
+ 0xba,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,0xe5,0x96,0x9d,0x00,0x08,0xff,
+ 0xe5,0x95,0x95,0x00,0x10,0x08,0x08,0xff,0xe5,0x96,0x99,0x00,0x08,0xff,0xe5,0x97,
+ 0xa2,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe5,0xa1,0x9a,0x00,0x08,0xff,0xe5,0xa2,
+ 0xb3,0x00,0x10,0x08,0x08,0xff,0xe5,0xa5,0x84,0x00,0x08,0xff,0xe5,0xa5,0x94,0x00,
+ 0xe0,0x04,0x02,0xcf,0x86,0xe5,0x01,0x01,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x08,0xff,0xe5,0xa9,0xa2,0x00,0x08,0xff,0xe5,0xac,0xa8,0x00,0x10,0x08,
+ 0x08,0xff,0xe5,0xbb,0x92,0x00,0x08,0xff,0xe5,0xbb,0x99,0x00,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe5,0xbd,0xa9,0x00,0x08,0xff,0xe5,0xbe,0xad,0x00,0x10,0x08,0x08,0xff,
+ 0xe6,0x83,0x98,0x00,0x08,0xff,0xe6,0x85,0x8e,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe6,0x84,0x88,0x00,0x08,0xff,0xe6,0x86,0x8e,0x00,0x10,0x08,0x08,0xff,
+ 0xe6,0x85,0xa0,0x00,0x08,0xff,0xe6,0x87,0xb2,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe6,0x88,0xb4,0x00,0x08,0xff,0xe6,0x8f,0x84,0x00,0x10,0x08,0x08,0xff,0xe6,0x90,
+ 0x9c,0x00,0x08,0xff,0xe6,0x91,0x92,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe6,0x95,0x96,0x00,0x08,0xff,0xe6,0x99,0xb4,0x00,0x10,0x08,0x08,0xff,
+ 0xe6,0x9c,0x97,0x00,0x08,0xff,0xe6,0x9c,0x9b,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe6,0x9d,0x96,0x00,0x08,0xff,0xe6,0xad,0xb9,0x00,0x10,0x08,0x08,0xff,0xe6,0xae,
+ 0xba,0x00,0x08,0xff,0xe6,0xb5,0x81,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe6,0xbb,0x9b,0x00,0x08,0xff,0xe6,0xbb,0x8b,0x00,0x10,0x08,0x08,0xff,0xe6,0xbc,
+ 0xa2,0x00,0x08,0xff,0xe7,0x80,0x9e,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe7,0x85,
+ 0xae,0x00,0x08,0xff,0xe7,0x9e,0xa7,0x00,0x10,0x08,0x08,0xff,0xe7,0x88,0xb5,0x00,
+ 0x08,0xff,0xe7,0x8a,0xaf,0x00,0xd4,0x80,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe7,0x8c,0xaa,0x00,0x08,0xff,0xe7,0x91,0xb1,0x00,0x10,0x08,0x08,0xff,
+ 0xe7,0x94,0x86,0x00,0x08,0xff,0xe7,0x94,0xbb,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe7,0x98,0x9d,0x00,0x08,0xff,0xe7,0x98,0x9f,0x00,0x10,0x08,0x08,0xff,0xe7,0x9b,
+ 0x8a,0x00,0x08,0xff,0xe7,0x9b,0x9b,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe7,0x9b,0xb4,0x00,0x08,0xff,0xe7,0x9d,0x8a,0x00,0x10,0x08,0x08,0xff,0xe7,0x9d,
+ 0x80,0x00,0x08,0xff,0xe7,0xa3,0x8c,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe7,0xaa,
+ 0xb1,0x00,0x08,0xff,0xe7,0xaf,0x80,0x00,0x10,0x08,0x08,0xff,0xe7,0xb1,0xbb,0x00,
+ 0x08,0xff,0xe7,0xb5,0x9b,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe7,0xb7,0xb4,0x00,0x08,0xff,0xe7,0xbc,0xbe,0x00,0x10,0x08,0x08,0xff,0xe8,0x80,
+ 0x85,0x00,0x08,0xff,0xe8,0x8d,0x92,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe8,0x8f,
+ 0xaf,0x00,0x08,0xff,0xe8,0x9d,0xb9,0x00,0x10,0x08,0x08,0xff,0xe8,0xa5,0x81,0x00,
+ 0x08,0xff,0xe8,0xa6,0x86,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x08,0xff,0xe8,0xa6,
+ 0x96,0x00,0x08,0xff,0xe8,0xaa,0xbf,0x00,0x10,0x08,0x08,0xff,0xe8,0xab,0xb8,0x00,
+ 0x08,0xff,0xe8,0xab,0x8b,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,0xe8,0xac,0x81,0x00,
+ 0x08,0xff,0xe8,0xab,0xbe,0x00,0x10,0x08,0x08,0xff,0xe8,0xab,0xad,0x00,0x08,0xff,
+ 0xe8,0xac,0xb9,0x00,0xcf,0x86,0x95,0xde,0xd4,0x81,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x08,0xff,0xe8,0xae,0x8a,0x00,0x08,0xff,0xe8,0xb4,0x88,0x00,0x10,0x08,
+ 0x08,0xff,0xe8,0xbc,0xb8,0x00,0x08,0xff,0xe9,0x81,0xb2,0x00,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe9,0x86,0x99,0x00,0x08,0xff,0xe9,0x89,0xb6,0x00,0x10,0x08,0x08,0xff,
+ 0xe9,0x99,0xbc,0x00,0x08,0xff,0xe9,0x9b,0xa3,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x08,0xff,0xe9,0x9d,0x96,0x00,0x08,0xff,0xe9,0x9f,0x9b,0x00,0x10,0x08,0x08,0xff,
+ 0xe9,0x9f,0xbf,0x00,0x08,0xff,0xe9,0xa0,0x8b,0x00,0xd1,0x10,0x10,0x08,0x08,0xff,
+ 0xe9,0xa0,0xbb,0x00,0x08,0xff,0xe9,0xac,0x92,0x00,0x10,0x08,0x08,0xff,0xe9,0xbe,
+ 0x9c,0x00,0x08,0xff,0xf0,0xa2,0xa1,0x8a,0x00,0xd3,0x45,0xd2,0x22,0xd1,0x12,0x10,
+ 0x09,0x08,0xff,0xf0,0xa2,0xa1,0x84,0x00,0x08,0xff,0xf0,0xa3,0x8f,0x95,0x00,0x10,
+ 0x08,0x08,0xff,0xe3,0xae,0x9d,0x00,0x08,0xff,0xe4,0x80,0x98,0x00,0xd1,0x11,0x10,
+ 0x08,0x08,0xff,0xe4,0x80,0xb9,0x00,0x08,0xff,0xf0,0xa5,0x89,0x89,0x00,0x10,0x09,
+ 0x08,0xff,0xf0,0xa5,0xb3,0x90,0x00,0x08,0xff,0xf0,0xa7,0xbb,0x93,0x00,0x92,0x14,
+ 0x91,0x10,0x10,0x08,0x08,0xff,0xe9,0xbd,0x83,0x00,0x08,0xff,0xe9,0xbe,0x8e,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xe1,0x94,0x01,0xe0,0x08,0x01,0xcf,0x86,0xd5,0x42,
+ 0xd4,0x14,0x93,0x10,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,
+ 0x01,0x00,0x01,0x00,0x52,0x04,0x00,0x00,0xd1,0x0d,0x10,0x04,0x00,0x00,0x04,0xff,
+ 0xd7,0x99,0xd6,0xb4,0x00,0x10,0x04,0x01,0x1a,0x01,0xff,0xd7,0xb2,0xd6,0xb7,0x00,
+ 0xd4,0x42,0x53,0x04,0x01,0x00,0xd2,0x16,0x51,0x04,0x01,0x00,0x10,0x09,0x01,0xff,
+ 0xd7,0xa9,0xd7,0x81,0x00,0x01,0xff,0xd7,0xa9,0xd7,0x82,0x00,0xd1,0x16,0x10,0x0b,
+ 0x01,0xff,0xd7,0xa9,0xd6,0xbc,0xd7,0x81,0x00,0x01,0xff,0xd7,0xa9,0xd6,0xbc,0xd7,
+ 0x82,0x00,0x10,0x09,0x01,0xff,0xd7,0x90,0xd6,0xb7,0x00,0x01,0xff,0xd7,0x90,0xd6,
+ 0xb8,0x00,0xd3,0x43,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xd7,0x90,0xd6,0xbc,
+ 0x00,0x01,0xff,0xd7,0x91,0xd6,0xbc,0x00,0x10,0x09,0x01,0xff,0xd7,0x92,0xd6,0xbc,
+ 0x00,0x01,0xff,0xd7,0x93,0xd6,0xbc,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xd7,0x94,
+ 0xd6,0xbc,0x00,0x01,0xff,0xd7,0x95,0xd6,0xbc,0x00,0x10,0x09,0x01,0xff,0xd7,0x96,
+ 0xd6,0xbc,0x00,0x00,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xd7,0x98,0xd6,
+ 0xbc,0x00,0x01,0xff,0xd7,0x99,0xd6,0xbc,0x00,0x10,0x09,0x01,0xff,0xd7,0x9a,0xd6,
+ 0xbc,0x00,0x01,0xff,0xd7,0x9b,0xd6,0xbc,0x00,0xd1,0x0d,0x10,0x09,0x01,0xff,0xd7,
+ 0x9c,0xd6,0xbc,0x00,0x00,0x00,0x10,0x09,0x01,0xff,0xd7,0x9e,0xd6,0xbc,0x00,0x00,
+ 0x00,0xcf,0x86,0x95,0x85,0x94,0x81,0xd3,0x3e,0xd2,0x1f,0xd1,0x12,0x10,0x09,0x01,
+ 0xff,0xd7,0xa0,0xd6,0xbc,0x00,0x01,0xff,0xd7,0xa1,0xd6,0xbc,0x00,0x10,0x04,0x00,
+ 0x00,0x01,0xff,0xd7,0xa3,0xd6,0xbc,0x00,0xd1,0x0d,0x10,0x09,0x01,0xff,0xd7,0xa4,
+ 0xd6,0xbc,0x00,0x00,0x00,0x10,0x09,0x01,0xff,0xd7,0xa6,0xd6,0xbc,0x00,0x01,0xff,
+ 0xd7,0xa7,0xd6,0xbc,0x00,0xd2,0x24,0xd1,0x12,0x10,0x09,0x01,0xff,0xd7,0xa8,0xd6,
+ 0xbc,0x00,0x01,0xff,0xd7,0xa9,0xd6,0xbc,0x00,0x10,0x09,0x01,0xff,0xd7,0xaa,0xd6,
+ 0xbc,0x00,0x01,0xff,0xd7,0x95,0xd6,0xb9,0x00,0xd1,0x12,0x10,0x09,0x01,0xff,0xd7,
+ 0x91,0xd6,0xbf,0x00,0x01,0xff,0xd7,0x9b,0xd6,0xbf,0x00,0x10,0x09,0x01,0xff,0xd7,
+ 0xa4,0xd6,0xbf,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd0,0x1a,0xcf,0x86,0x55,0x04,
+ 0x01,0x00,0x54,0x04,0x01,0x00,0x93,0x0c,0x92,0x08,0x11,0x04,0x01,0x00,0x0c,0x00,
+ 0x0c,0x00,0x0c,0x00,0xcf,0x86,0x95,0x24,0xd4,0x10,0x93,0x0c,0x92,0x08,0x11,0x04,
+ 0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,0x00,0x00,
+ 0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xd3,0x5a,0xd2,0x06,
+ 0xcf,0x06,0x01,0x00,0xd1,0x14,0xd0,0x06,0xcf,0x06,0x01,0x00,0xcf,0x86,0x95,0x08,
+ 0x14,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0xd0,0x1a,0xcf,0x86,0x95,0x14,0x54,0x04,
+ 0x01,0x00,0x93,0x0c,0x92,0x08,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0x01,0x00,0xcf,0x86,0xd5,0x0c,0x94,0x08,0x13,0x04,0x01,0x00,0x00,0x00,0x05,0x00,
+ 0x54,0x04,0x05,0x00,0x53,0x04,0x01,0x00,0x52,0x04,0x01,0x00,0x91,0x08,0x10,0x04,
+ 0x06,0x00,0x07,0x00,0x00,0x00,0xd2,0xce,0xd1,0xa5,0xd0,0x37,0xcf,0x86,0xd5,0x15,
+ 0x54,0x05,0x06,0xff,0x00,0x53,0x04,0x08,0x00,0x92,0x08,0x11,0x04,0x08,0x00,0x00,
+ 0x00,0x00,0x00,0x94,0x1c,0xd3,0x10,0x52,0x04,0x01,0xe6,0x51,0x04,0x0a,0xe6,0x10,
+ 0x04,0x0a,0xe6,0x10,0xdc,0x52,0x04,0x10,0xdc,0x11,0x04,0x10,0xdc,0x11,0xe6,0x01,
+ 0x00,0xcf,0x86,0xd5,0x38,0xd4,0x24,0xd3,0x14,0x52,0x04,0x01,0x00,0xd1,0x08,0x10,
+ 0x04,0x01,0x00,0x06,0x00,0x10,0x04,0x06,0x00,0x07,0x00,0x92,0x0c,0x91,0x08,0x10,
+ 0x04,0x07,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,0x01,
+ 0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0xd4,0x18,0xd3,0x10,0x52,
+ 0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x12,0x04,0x01,
+ 0x00,0x00,0x00,0x93,0x18,0xd2,0x0c,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x06,
+ 0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0xd0,0x06,0xcf,
+ 0x06,0x01,0x00,0xcf,0x86,0x55,0x04,0x01,0x00,0x54,0x04,0x01,0x00,0x53,0x04,0x01,
+ 0x00,0x52,0x04,0x01,0x00,0xd1,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x10,0x04,0x00,
+ 0x00,0x01,0xff,0x00,0xd1,0x50,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x94,0x14,0x93,0x10,
+ 0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0x01,0x00,0x01,0x00,0xcf,0x86,0xd5,0x18,0x54,0x04,0x01,0x00,0x53,0x04,0x01,0x00,
+ 0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x06,0x00,0x94,0x14,
+ 0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x06,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
+ 0x01,0x00,0x01,0x00,0xd0,0x2f,0xcf,0x86,0x55,0x04,0x01,0x00,0xd4,0x15,0x93,0x11,
+ 0x92,0x0d,0x91,0x09,0x10,0x05,0x01,0xff,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
+ 0x00,0x53,0x04,0x01,0x00,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,
+ 0x00,0x00,0x00,0xcf,0x86,0xd5,0x38,0xd4,0x18,0xd3,0x0c,0x92,0x08,0x11,0x04,0x00,
+ 0x00,0x01,0x00,0x01,0x00,0x92,0x08,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0xd3,
+ 0x0c,0x92,0x08,0x11,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0xd2,0x08,0x11,0x04,0x00,
+ 0x00,0x01,0x00,0x91,0x08,0x10,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0xd4,0x20,0xd3,
+ 0x10,0x52,0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x52,
+ 0x04,0x01,0x00,0x51,0x04,0x01,0x00,0x10,0x04,0x01,0x00,0x00,0x00,0x53,0x05,0x00,
+ 0xff,0x00,0xd2,0x0d,0x91,0x09,0x10,0x05,0x00,0xff,0x00,0x04,0x00,0x04,0x00,0x91,
+ 0x08,0x10,0x04,0x03,0x00,0x01,0x00,0x01,0x00,0x83,0xe2,0x46,0x3e,0xe1,0x1f,0x3b,
+ 0xe0,0x9c,0x39,0xcf,0x86,0xe5,0x40,0x26,0xc4,0xe3,0x16,0x14,0xe2,0xef,0x11,0xe1,
+ 0xd0,0x10,0xe0,0x60,0x07,0xcf,0x86,0xe5,0x53,0x03,0xe4,0x4c,0x02,0xe3,0x3d,0x01,
+ 0xd2,0x94,0xd1,0x70,0xd0,0x4a,0xcf,0x86,0xd5,0x18,0x94,0x14,0x53,0x04,0x07,0x00,
+ 0x52,0x04,0x07,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,
+ 0xd4,0x14,0x93,0x10,0x52,0x04,0x07,0x00,0x51,0x04,0x07,0x00,0x10,0x04,0x07,0x00,
+ 0x00,0x00,0x07,0x00,0x53,0x04,0x07,0x00,0xd2,0x0c,0x51,0x04,0x07,0x00,0x10,0x04,
+ 0x07,0x00,0x00,0x00,0x51,0x04,0x07,0x00,0x10,0x04,0x00,0x00,0x07,0x00,0xcf,0x86,
+ 0x95,0x20,0xd4,0x10,0x53,0x04,0x07,0x00,0x52,0x04,0x07,0x00,0x11,0x04,0x07,0x00,
+ 0x00,0x00,0x53,0x04,0x07,0x00,0x52,0x04,0x07,0x00,0x11,0x04,0x07,0x00,0x00,0x00,
+ 0x00,0x00,0xd0,0x06,0xcf,0x06,0x07,0x00,0xcf,0x86,0x55,0x04,0x07,0x00,0x54,0x04,
+ 0x07,0x00,0x53,0x04,0x07,0x00,0x92,0x0c,0x51,0x04,0x07,0x00,0x10,0x04,0x07,0x00,
+ 0x00,0x00,0x00,0x00,0xd1,0x40,0xd0,0x3a,0xcf,0x86,0xd5,0x20,0x94,0x1c,0x93,0x18,
+ 0xd2,0x0c,0x51,0x04,0x07,0x00,0x10,0x04,0x07,0x00,0x00,0x00,0x51,0x04,0x00,0x00,
+ 0x10,0x04,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x54,0x04,0x07,0x00,0x93,0x10,
+ 0x52,0x04,0x07,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x07,0x00,0x07,0x00,
+ 0xcf,0x06,0x08,0x00,0xd0,0x46,0xcf,0x86,0xd5,0x2c,0xd4,0x20,0x53,0x04,0x08,0x00,
+ 0xd2,0x0c,0x51,0x04,0x08,0x00,0x10,0x04,0x08,0x00,0x10,0x00,0xd1,0x08,0x10,0x04,
+ 0x10,0x00,0x12,0x00,0x10,0x04,0x12,0x00,0x00,0x00,0x53,0x04,0x0a,0x00,0x12,0x04,
+ 0x0a,0x00,0x00,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xd5,0x08,0x14,0x04,
+ 0x00,0x00,0x0a,0x00,0x54,0x04,0x0a,0x00,0x53,0x04,0x0a,0x00,0x52,0x04,0x0a,0x00,
+ 0x91,0x08,0x10,0x04,0x0a,0x00,0x0a,0xdc,0x00,0x00,0xd2,0x5e,0xd1,0x06,0xcf,0x06,
+ 0x00,0x00,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,0x0a,0x00,0x53,0x04,0x0a,0x00,
+ 0x52,0x04,0x0a,0x00,0x91,0x08,0x10,0x04,0x0a,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,
+ 0xcf,0x86,0xd5,0x18,0x54,0x04,0x0a,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,
+ 0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd4,0x14,0x93,0x10,0x92,0x0c,
+ 0x91,0x08,0x10,0x04,0x10,0xdc,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x53,0x04,
+ 0x10,0x00,0x12,0x04,0x10,0x00,0x00,0x00,0xd1,0x70,0xd0,0x36,0xcf,0x86,0xd5,0x18,
+ 0x54,0x04,0x05,0x00,0x53,0x04,0x05,0x00,0x52,0x04,0x05,0x00,0x51,0x04,0x05,0x00,
+ 0x10,0x04,0x05,0x00,0x10,0x00,0x94,0x18,0xd3,0x08,0x12,0x04,0x05,0x00,0x00,0x00,
+ 0x52,0x04,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x13,0x00,0x13,0x00,0x05,0x00,
+ 0xcf,0x86,0xd5,0x18,0x94,0x14,0x53,0x04,0x05,0x00,0x92,0x0c,0x51,0x04,0x05,0x00,
+ 0x10,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x54,0x04,0x10,0x00,0xd3,0x0c,
+ 0x52,0x04,0x10,0x00,0x11,0x04,0x10,0x00,0x10,0xe6,0x92,0x0c,0x51,0x04,0x10,0xe6,
+ 0x10,0x04,0x10,0xe6,0x00,0x00,0x00,0x00,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,
+ 0x07,0x00,0x53,0x04,0x07,0x00,0x52,0x04,0x07,0x00,0x51,0x04,0x07,0x00,0x10,0x04,
+ 0x00,0x00,0x07,0x00,0x08,0x00,0xcf,0x86,0x95,0x1c,0xd4,0x0c,0x93,0x08,0x12,0x04,
+ 0x08,0x00,0x00,0x00,0x08,0x00,0x93,0x0c,0x52,0x04,0x08,0x00,0x11,0x04,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xd3,0xba,0xd2,0x80,0xd1,0x34,0xd0,0x1a,0xcf,0x86,
+ 0x55,0x04,0x05,0x00,0x94,0x10,0x93,0x0c,0x52,0x04,0x05,0x00,0x11,0x04,0x05,0x00,
+ 0x07,0x00,0x05,0x00,0x05,0x00,0xcf,0x86,0x95,0x14,0x94,0x10,0x53,0x04,0x05,0x00,
+ 0x52,0x04,0x05,0x00,0x11,0x04,0x05,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0xd0,0x2a,
+ 0xcf,0x86,0xd5,0x14,0x54,0x04,0x07,0x00,0x53,0x04,0x07,0x00,0x52,0x04,0x07,0x00,
+ 0x11,0x04,0x07,0x00,0x00,0x00,0x94,0x10,0x53,0x04,0x07,0x00,0x92,0x08,0x11,0x04,
+ 0x07,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0xcf,0x86,0xd5,0x10,0x54,0x04,0x12,0x00,
+ 0x93,0x08,0x12,0x04,0x12,0x00,0x00,0x00,0x12,0x00,0x54,0x04,0x12,0x00,0x53,0x04,
+ 0x12,0x00,0x12,0x04,0x12,0x00,0x00,0x00,0xd1,0x34,0xd0,0x12,0xcf,0x86,0x55,0x04,
+ 0x10,0x00,0x94,0x08,0x13,0x04,0x10,0x00,0x00,0x00,0x10,0x00,0xcf,0x86,0x55,0x04,
+ 0x10,0x00,0x94,0x18,0xd3,0x08,0x12,0x04,0x10,0x00,0x00,0x00,0x52,0x04,0x00,0x00,
+ 0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,
+ 0xd2,0x06,0xcf,0x06,0x10,0x00,0xd1,0x40,0xd0,0x1e,0xcf,0x86,0x55,0x04,0x10,0x00,
+ 0x54,0x04,0x10,0x00,0x93,0x10,0x52,0x04,0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xd5,0x14,0x54,0x04,0x10,0x00,0x93,0x0c,
+ 0x52,0x04,0x10,0x00,0x11,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x94,0x08,0x13,0x04,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xe4,0xce,0x02,0xe3,0x45,0x01,
+ 0xd2,0xd0,0xd1,0x70,0xd0,0x52,0xcf,0x86,0xd5,0x20,0x94,0x1c,0xd3,0x0c,0x52,0x04,
+ 0x07,0x00,0x11,0x04,0x07,0x00,0x00,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x07,0x00,
+ 0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x54,0x04,0x07,0x00,0xd3,0x10,0x52,0x04,
+ 0x07,0x00,0x51,0x04,0x07,0x00,0x10,0x04,0x00,0x00,0x07,0x00,0xd2,0x0c,0x91,0x08,
+ 0x10,0x04,0x07,0x00,0x00,0x00,0x00,0x00,0xd1,0x08,0x10,0x04,0x07,0x00,0x00,0x00,
+ 0x10,0x04,0x00,0x00,0x07,0x00,0xcf,0x86,0x95,0x18,0x54,0x04,0x0b,0x00,0x93,0x10,
+ 0x52,0x04,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,0x00,0x00,0x0b,0x00,0x0b,0x00,
+ 0x10,0x00,0xd0,0x32,0xcf,0x86,0xd5,0x18,0x54,0x04,0x10,0x00,0x53,0x04,0x10,0x00,
+ 0x52,0x04,0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x00,0x00,0x94,0x14,
+ 0x93,0x10,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,
+ 0x10,0x00,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x11,0x00,0xd3,0x14,
+ 0xd2,0x0c,0x51,0x04,0x11,0x00,0x10,0x04,0x11,0x00,0x00,0x00,0x11,0x04,0x11,0x00,
+ 0x00,0x00,0x92,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x11,0x00,0x11,0x00,
+ 0xd1,0x40,0xd0,0x3a,0xcf,0x86,0xd5,0x1c,0x54,0x04,0x09,0x00,0x53,0x04,0x09,0x00,
+ 0xd2,0x08,0x11,0x04,0x09,0x00,0x0b,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,
+ 0x09,0x00,0x54,0x04,0x0a,0x00,0x53,0x04,0x0a,0x00,0xd2,0x08,0x11,0x04,0x0a,0x00,
+ 0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x0a,0x00,0xcf,0x06,0x00,0x00,
+ 0xd0,0x1a,0xcf,0x86,0x55,0x04,0x0d,0x00,0x54,0x04,0x0d,0x00,0x53,0x04,0x0d,0x00,
+ 0x52,0x04,0x00,0x00,0x11,0x04,0x11,0x00,0x0d,0x00,0xcf,0x86,0x95,0x14,0x54,0x04,
+ 0x11,0x00,0x93,0x0c,0x92,0x08,0x11,0x04,0x00,0x00,0x11,0x00,0x11,0x00,0x11,0x00,
+ 0x11,0x00,0xd2,0xec,0xd1,0xa4,0xd0,0x76,0xcf,0x86,0xd5,0x48,0xd4,0x28,0xd3,0x14,
+ 0x52,0x04,0x08,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,0x08,0x00,0x10,0x04,0x08,0x00,
+ 0x00,0x00,0x52,0x04,0x00,0x00,0xd1,0x08,0x10,0x04,0x08,0x00,0x08,0xdc,0x10,0x04,
+ 0x08,0x00,0x08,0xe6,0xd3,0x10,0x52,0x04,0x08,0x00,0x91,0x08,0x10,0x04,0x00,0x00,
+ 0x08,0x00,0x08,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x08,0x00,0x08,0x00,
+ 0x08,0x00,0x54,0x04,0x08,0x00,0xd3,0x0c,0x52,0x04,0x08,0x00,0x11,0x04,0x14,0x00,
+ 0x00,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x08,0xe6,0x08,0x01,0x10,0x04,0x08,0xdc,
+ 0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x08,0x09,0xcf,0x86,0x95,0x28,
+ 0xd4,0x14,0x53,0x04,0x08,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x14,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x53,0x04,0x08,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x0b,0x00,0xd0,0x0a,0xcf,0x86,0x15,0x04,0x10,0x00,
+ 0x00,0x00,0xcf,0x86,0x55,0x04,0x10,0x00,0xd4,0x24,0xd3,0x14,0x52,0x04,0x10,0x00,
+ 0xd1,0x08,0x10,0x04,0x10,0x00,0x10,0xe6,0x10,0x04,0x10,0xdc,0x00,0x00,0x92,0x0c,
+ 0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x10,0x00,0x93,0x10,0x52,0x04,
+ 0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0xd1,0x54,
+ 0xd0,0x26,0xcf,0x86,0x55,0x04,0x0b,0x00,0x54,0x04,0x0b,0x00,0xd3,0x0c,0x52,0x04,
+ 0x0b,0x00,0x11,0x04,0x0b,0x00,0x00,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,
+ 0x0b,0x00,0x0b,0x00,0x0b,0x00,0xcf,0x86,0xd5,0x14,0x54,0x04,0x0b,0x00,0x93,0x0c,
+ 0x52,0x04,0x0b,0x00,0x11,0x04,0x0b,0x00,0x00,0x00,0x0b,0x00,0x54,0x04,0x0b,0x00,
+ 0x93,0x10,0x92,0x0c,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,
+ 0x0b,0x00,0xd0,0x42,0xcf,0x86,0xd5,0x28,0x54,0x04,0x10,0x00,0xd3,0x0c,0x92,0x08,
+ 0x11,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,
+ 0x10,0x00,0x10,0x00,0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x94,0x14,
+ 0x53,0x04,0x00,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x10,0x00,0x10,0x00,
+ 0x10,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xd3,0x96,0xd2,0x68,0xd1,0x24,0xd0,0x06,
+ 0xcf,0x06,0x0b,0x00,0xcf,0x86,0x95,0x18,0x94,0x14,0x53,0x04,0x0b,0x00,0x92,0x0c,
+ 0x91,0x08,0x10,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xd0,0x1e,0xcf,0x86,0x55,0x04,0x11,0x00,0x54,0x04,0x11,0x00,0x93,0x10,0x92,0x0c,
+ 0x51,0x04,0x11,0x00,0x10,0x04,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,
+ 0x55,0x04,0x11,0x00,0x54,0x04,0x11,0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x11,0x00,
+ 0x10,0x04,0x11,0x00,0x00,0x00,0x00,0x00,0x92,0x08,0x11,0x04,0x00,0x00,0x11,0x00,
+ 0x11,0x00,0xd1,0x28,0xd0,0x22,0xcf,0x86,0x55,0x04,0x14,0x00,0xd4,0x0c,0x93,0x08,
+ 0x12,0x04,0x14,0x00,0x14,0xe6,0x00,0x00,0x53,0x04,0x14,0x00,0x92,0x08,0x11,0x04,
+ 0x14,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xd2,0x2a,
+ 0xd1,0x24,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,
+ 0x0b,0x00,0x53,0x04,0x0b,0x00,0x52,0x04,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,
+ 0x0b,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xd1,0x58,0xd0,0x12,0xcf,0x86,0x55,0x04,
+ 0x14,0x00,0x94,0x08,0x13,0x04,0x14,0x00,0x00,0x00,0x14,0x00,0xcf,0x86,0x95,0x40,
+ 0xd4,0x24,0xd3,0x0c,0x52,0x04,0x14,0x00,0x11,0x04,0x14,0x00,0x14,0xdc,0xd2,0x0c,
+ 0x51,0x04,0x14,0xe6,0x10,0x04,0x14,0xe6,0x14,0xdc,0x91,0x08,0x10,0x04,0x14,0xe6,
+ 0x14,0xdc,0x14,0xdc,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x14,0xdc,0x14,0x00,
+ 0x14,0x00,0x14,0x00,0x92,0x08,0x11,0x04,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x15,0x00,
+ 0x93,0x10,0x52,0x04,0x15,0x00,0x51,0x04,0x15,0x00,0x10,0x04,0x15,0x00,0x00,0x00,
+ 0x00,0x00,0xcf,0x86,0xe5,0x0f,0x06,0xe4,0xf8,0x03,0xe3,0x02,0x02,0xd2,0xfb,0xd1,
+ 0x4c,0xd0,0x06,0xcf,0x06,0x0c,0x00,0xcf,0x86,0xd5,0x2c,0xd4,0x1c,0xd3,0x10,0x52,
+ 0x04,0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x09,0x0c,0x00,0x52,0x04,0x0c,
+ 0x00,0x11,0x04,0x0c,0x00,0x00,0x00,0x93,0x0c,0x92,0x08,0x11,0x04,0x00,0x00,0x0c,
+ 0x00,0x0c,0x00,0x0c,0x00,0x54,0x04,0x0c,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,
+ 0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x09,0xd0,0x69,0xcf,0x86,0xd5,
+ 0x32,0x54,0x04,0x0b,0x00,0x53,0x04,0x0b,0x00,0xd2,0x15,0x51,0x04,0x0b,0x00,0x10,
+ 0x0d,0x0b,0xff,0xf0,0x91,0x82,0x99,0xf0,0x91,0x82,0xba,0x00,0x0b,0x00,0x91,0x11,
+ 0x10,0x0d,0x0b,0xff,0xf0,0x91,0x82,0x9b,0xf0,0x91,0x82,0xba,0x00,0x0b,0x00,0x0b,
+ 0x00,0xd4,0x1d,0x53,0x04,0x0b,0x00,0x92,0x15,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,
+ 0x00,0x0b,0xff,0xf0,0x91,0x82,0xa5,0xf0,0x91,0x82,0xba,0x00,0x0b,0x00,0x53,0x04,
+ 0x0b,0x00,0x92,0x10,0xd1,0x08,0x10,0x04,0x0b,0x00,0x0b,0x09,0x10,0x04,0x0b,0x07,
+ 0x0b,0x00,0x0b,0x00,0xcf,0x86,0xd5,0x20,0x94,0x1c,0xd3,0x0c,0x92,0x08,0x11,0x04,
+ 0x0b,0x00,0x00,0x00,0x00,0x00,0x52,0x04,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,
+ 0x14,0x00,0x00,0x00,0x0d,0x00,0xd4,0x14,0x53,0x04,0x0d,0x00,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x0d,0x00,0x92,0x08,
+ 0x11,0x04,0x0d,0x00,0x00,0x00,0x00,0x00,0xd1,0x96,0xd0,0x5c,0xcf,0x86,0xd5,0x18,
+ 0x94,0x14,0x93,0x10,0x92,0x0c,0x51,0x04,0x0d,0xe6,0x10,0x04,0x0d,0xe6,0x0d,0x00,
+ 0x0d,0x00,0x0d,0x00,0x0d,0x00,0xd4,0x26,0x53,0x04,0x0d,0x00,0x52,0x04,0x0d,0x00,
+ 0x51,0x04,0x0d,0x00,0x10,0x0d,0x0d,0xff,0xf0,0x91,0x84,0xb1,0xf0,0x91,0x84,0xa7,
+ 0x00,0x0d,0xff,0xf0,0x91,0x84,0xb2,0xf0,0x91,0x84,0xa7,0x00,0x93,0x18,0xd2,0x0c,
+ 0x51,0x04,0x0d,0x00,0x10,0x04,0x0d,0x00,0x0d,0x09,0x91,0x08,0x10,0x04,0x0d,0x09,
+ 0x00,0x00,0x0d,0x00,0x0d,0x00,0xcf,0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x52,0x04,
+ 0x0d,0x00,0x51,0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x54,0x04,0x10,0x00,0x93,0x18,0xd2,0x0c,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,
+ 0x10,0x07,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0xd0,0x06,
+ 0xcf,0x06,0x0d,0x00,0xcf,0x86,0xd5,0x40,0xd4,0x2c,0xd3,0x10,0x92,0x0c,0x91,0x08,
+ 0x10,0x04,0x0d,0x09,0x0d,0x00,0x0d,0x00,0x0d,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,
+ 0x0d,0x00,0x11,0x00,0x10,0x04,0x11,0x07,0x11,0x00,0x91,0x08,0x10,0x04,0x11,0x00,
+ 0x10,0x00,0x00,0x00,0x53,0x04,0x0d,0x00,0x92,0x0c,0x51,0x04,0x0d,0x00,0x10,0x04,
+ 0x10,0x00,0x11,0x00,0x11,0x00,0xd4,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,
+ 0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x93,0x10,0x52,0x04,0x10,0x00,
+ 0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd2,0xc8,0xd1,0x48,
+ 0xd0,0x42,0xcf,0x86,0xd5,0x18,0x54,0x04,0x10,0x00,0x93,0x10,0x92,0x0c,0x51,0x04,
+ 0x10,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x54,0x04,0x10,0x00,
+ 0xd3,0x14,0x52,0x04,0x10,0x00,0xd1,0x08,0x10,0x04,0x10,0x00,0x10,0x09,0x10,0x04,
+ 0x10,0x07,0x10,0x00,0x52,0x04,0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,0x12,0x00,
+ 0x00,0x00,0xcf,0x06,0x00,0x00,0xd0,0x52,0xcf,0x86,0xd5,0x3c,0xd4,0x28,0xd3,0x10,
+ 0x52,0x04,0x11,0x00,0x51,0x04,0x11,0x00,0x10,0x04,0x11,0x00,0x00,0x00,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x11,0x00,0x00,0x00,0x11,0x00,0x51,0x04,0x11,0x00,0x10,0x04,
+ 0x00,0x00,0x11,0x00,0x53,0x04,0x11,0x00,0x52,0x04,0x11,0x00,0x51,0x04,0x11,0x00,
+ 0x10,0x04,0x00,0x00,0x11,0x00,0x94,0x10,0x53,0x04,0x11,0x00,0x92,0x08,0x11,0x04,
+ 0x11,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xcf,0x86,0x55,0x04,0x10,0x00,0xd4,0x18,
+ 0x53,0x04,0x10,0x00,0x92,0x10,0xd1,0x08,0x10,0x04,0x10,0x00,0x10,0x07,0x10,0x04,
+ 0x10,0x09,0x00,0x00,0x00,0x00,0x53,0x04,0x10,0x00,0x92,0x08,0x11,0x04,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0xe1,0x27,0x01,0xd0,0x8a,0xcf,0x86,0xd5,0x44,0xd4,0x2c,0xd3,
+ 0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x11,0x00,0x10,0x00,0x10,0x00,0x91,0x08,0x10,
+ 0x04,0x00,0x00,0x10,0x00,0x10,0x00,0x52,0x04,0x10,0x00,0xd1,0x08,0x10,0x04,0x10,
+ 0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x93,0x14,0x92,0x10,0xd1,0x08,0x10,
+ 0x04,0x10,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0xd4,
+ 0x14,0x53,0x04,0x10,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x10,0x00,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x10,0x00,0x10,0x00,0xd2,0x0c,0x51,0x04,0x10,
+ 0x00,0x10,0x04,0x00,0x00,0x14,0x07,0x91,0x08,0x10,0x04,0x10,0x07,0x10,0x00,0x10,
+ 0x00,0xcf,0x86,0xd5,0x6a,0xd4,0x42,0xd3,0x14,0x52,0x04,0x10,0x00,0xd1,0x08,0x10,
+ 0x04,0x10,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0xd2,0x19,0xd1,0x08,0x10,
+ 0x04,0x10,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0xff,0xf0,0x91,0x8d,0x87,0xf0,
+ 0x91,0x8c,0xbe,0x00,0x91,0x11,0x10,0x0d,0x10,0xff,0xf0,0x91,0x8d,0x87,0xf0,0x91,
+ 0x8d,0x97,0x00,0x10,0x09,0x00,0x00,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x11,
+ 0x00,0x00,0x00,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x52,
+ 0x04,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x10,0x00,0x10,0x00,0xd4,0x1c,0xd3,
+ 0x0c,0x52,0x04,0x10,0x00,0x11,0x04,0x00,0x00,0x10,0xe6,0x52,0x04,0x10,0xe6,0x91,
+ 0x08,0x10,0x04,0x10,0xe6,0x00,0x00,0x00,0x00,0x93,0x10,0x52,0x04,0x10,0xe6,0x91,
+ 0x08,0x10,0x04,0x10,0xe6,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xe3,
+ 0x30,0x01,0xd2,0xb7,0xd1,0x48,0xd0,0x06,0xcf,0x06,0x12,0x00,0xcf,0x86,0x95,0x3c,
+ 0xd4,0x1c,0x93,0x18,0xd2,0x0c,0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x09,0x12,0x00,
+ 0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x07,0x12,0x00,0x12,0x00,0x53,0x04,0x12,0x00,
+ 0xd2,0x0c,0x51,0x04,0x12,0x00,0x10,0x04,0x00,0x00,0x12,0x00,0xd1,0x08,0x10,0x04,
+ 0x00,0x00,0x12,0x00,0x10,0x04,0x14,0xe6,0x15,0x00,0x00,0x00,0xd0,0x45,0xcf,0x86,
+ 0x55,0x04,0x10,0x00,0x54,0x04,0x10,0x00,0x53,0x04,0x10,0x00,0xd2,0x15,0x51,0x04,
+ 0x10,0x00,0x10,0x04,0x10,0x00,0x10,0xff,0xf0,0x91,0x92,0xb9,0xf0,0x91,0x92,0xba,
+ 0x00,0xd1,0x11,0x10,0x0d,0x10,0xff,0xf0,0x91,0x92,0xb9,0xf0,0x91,0x92,0xb0,0x00,
+ 0x10,0x00,0x10,0x0d,0x10,0xff,0xf0,0x91,0x92,0xb9,0xf0,0x91,0x92,0xbd,0x00,0x10,
+ 0x00,0xcf,0x86,0x95,0x24,0xd4,0x14,0x93,0x10,0x92,0x0c,0x51,0x04,0x10,0x00,0x10,
+ 0x04,0x10,0x09,0x10,0x07,0x10,0x00,0x00,0x00,0x53,0x04,0x10,0x00,0x92,0x08,0x11,
+ 0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,
+ 0x40,0xcf,0x86,0x55,0x04,0x10,0x00,0x54,0x04,0x10,0x00,0xd3,0x0c,0x52,0x04,0x10,
+ 0x00,0x11,0x04,0x10,0x00,0x00,0x00,0xd2,0x1e,0x51,0x04,0x10,0x00,0x10,0x0d,0x10,
+ 0xff,0xf0,0x91,0x96,0xb8,0xf0,0x91,0x96,0xaf,0x00,0x10,0xff,0xf0,0x91,0x96,0xb9,
+ 0xf0,0x91,0x96,0xaf,0x00,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x10,0x09,0xcf,
+ 0x86,0x95,0x2c,0xd4,0x1c,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x10,0x07,0x10,
+ 0x00,0x10,0x00,0x10,0x00,0x92,0x08,0x11,0x04,0x10,0x00,0x11,0x00,0x11,0x00,0x53,
+ 0x04,0x11,0x00,0x52,0x04,0x11,0x00,0x11,0x04,0x11,0x00,0x00,0x00,0x00,0x00,0xd2,
+ 0xa0,0xd1,0x5c,0xd0,0x1e,0xcf,0x86,0x55,0x04,0x10,0x00,0x54,0x04,0x10,0x00,0x53,
+ 0x04,0x10,0x00,0x52,0x04,0x10,0x00,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x10,
+ 0x09,0xcf,0x86,0xd5,0x24,0xd4,0x14,0x93,0x10,0x52,0x04,0x10,0x00,0x91,0x08,0x10,
+ 0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x10,0x00,0x92,0x08,0x11,
+ 0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x94,0x14,0x53,0x04,0x12,0x00,0x52,0x04,0x12,
+ 0x00,0x91,0x08,0x10,0x04,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x2a,0xcf,
+ 0x86,0x55,0x04,0x0d,0x00,0x54,0x04,0x0d,0x00,0xd3,0x10,0x52,0x04,0x0d,0x00,0x51,
+ 0x04,0x0d,0x00,0x10,0x04,0x0d,0x09,0x0d,0x07,0x92,0x0c,0x91,0x08,0x10,0x04,0x15,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0x95,0x14,0x94,0x10,0x53,0x04,0x0d,
+ 0x00,0x92,0x08,0x11,0x04,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,
+ 0x40,0xd0,0x3a,0xcf,0x86,0xd5,0x20,0x54,0x04,0x11,0x00,0x53,0x04,0x11,0x00,0xd2,
+ 0x0c,0x51,0x04,0x11,0x00,0x10,0x04,0x14,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x00,
+ 0x00,0x11,0x00,0x11,0x00,0x94,0x14,0x53,0x04,0x11,0x00,0x92,0x0c,0x51,0x04,0x11,
+ 0x00,0x10,0x04,0x11,0x00,0x11,0x09,0x00,0x00,0x11,0x00,0xcf,0x06,0x00,0x00,0xcf,
+ 0x06,0x00,0x00,0xe4,0x59,0x01,0xd3,0xb2,0xd2,0x5c,0xd1,0x28,0xd0,0x22,0xcf,0x86,
+ 0x55,0x04,0x14,0x00,0x54,0x04,0x14,0x00,0x53,0x04,0x14,0x00,0x92,0x10,0xd1,0x08,
+ 0x10,0x04,0x14,0x00,0x14,0x09,0x10,0x04,0x14,0x07,0x14,0x00,0x00,0x00,0xcf,0x06,
+ 0x00,0x00,0xd0,0x0a,0xcf,0x86,0x15,0x04,0x00,0x00,0x10,0x00,0xcf,0x86,0x55,0x04,
+ 0x10,0x00,0x54,0x04,0x10,0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x10,0x00,0x10,0x04,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,
+ 0x00,0x00,0x10,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,0x1a,0xcf,0x86,0x55,0x04,
+ 0x00,0x00,0x94,0x10,0x53,0x04,0x15,0x00,0x92,0x08,0x11,0x04,0x00,0x00,0x15,0x00,
+ 0x15,0x00,0x15,0x00,0xcf,0x86,0xd5,0x14,0x54,0x04,0x15,0x00,0x53,0x04,0x15,0x00,
+ 0x92,0x08,0x11,0x04,0x00,0x00,0x15,0x00,0x15,0x00,0x94,0x1c,0x93,0x18,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x15,0x09,0x15,0x00,0x15,0x00,0x91,0x08,0x10,0x04,0x15,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd2,0xa0,0xd1,0x3c,0xd0,0x1e,0xcf,0x86,
+ 0x55,0x04,0x13,0x00,0x54,0x04,0x13,0x00,0x93,0x10,0x52,0x04,0x13,0x00,0x91,0x08,
+ 0x10,0x04,0x13,0x09,0x13,0x00,0x13,0x00,0x13,0x00,0xcf,0x86,0x95,0x18,0x94,0x14,
+ 0x93,0x10,0x52,0x04,0x13,0x00,0x51,0x04,0x13,0x00,0x10,0x04,0x13,0x00,0x13,0x09,
+ 0x00,0x00,0x13,0x00,0x13,0x00,0xd0,0x46,0xcf,0x86,0xd5,0x2c,0xd4,0x10,0x93,0x0c,
+ 0x52,0x04,0x13,0x00,0x11,0x04,0x15,0x00,0x13,0x00,0x13,0x00,0x53,0x04,0x13,0x00,
+ 0xd2,0x0c,0x91,0x08,0x10,0x04,0x13,0x00,0x13,0x09,0x13,0x00,0x91,0x08,0x10,0x04,
+ 0x13,0x00,0x14,0x00,0x13,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x51,0x04,0x13,0x00,
+ 0x10,0x04,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0x55,0x04,
+ 0x10,0x00,0x54,0x04,0x10,0x00,0x53,0x04,0x10,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xe3,0xa9,0x01,0xd2,
+ 0xb0,0xd1,0x6c,0xd0,0x3e,0xcf,0x86,0xd5,0x18,0x94,0x14,0x53,0x04,0x12,0x00,0x92,
+ 0x0c,0x91,0x08,0x10,0x04,0x12,0x00,0x00,0x00,0x12,0x00,0x12,0x00,0x12,0x00,0x54,
+ 0x04,0x12,0x00,0xd3,0x10,0x52,0x04,0x12,0x00,0x51,0x04,0x12,0x00,0x10,0x04,0x12,
+ 0x00,0x00,0x00,0x52,0x04,0x12,0x00,0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x12,
+ 0x09,0xcf,0x86,0xd5,0x14,0x94,0x10,0x93,0x0c,0x52,0x04,0x12,0x00,0x11,0x04,0x12,
+ 0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x94,0x14,0x53,0x04,0x12,0x00,0x52,0x04,0x12,
+ 0x00,0x91,0x08,0x10,0x04,0x12,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0xd0,0x3e,0xcf,
+ 0x86,0xd5,0x14,0x54,0x04,0x12,0x00,0x93,0x0c,0x92,0x08,0x11,0x04,0x00,0x00,0x12,
+ 0x00,0x12,0x00,0x12,0x00,0xd4,0x14,0x53,0x04,0x12,0x00,0x92,0x0c,0x91,0x08,0x10,
+ 0x04,0x00,0x00,0x12,0x00,0x12,0x00,0x12,0x00,0x93,0x10,0x52,0x04,0x12,0x00,0x51,
+ 0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xd1,
+ 0xa0,0xd0,0x52,0xcf,0x86,0xd5,0x24,0x94,0x20,0xd3,0x10,0x52,0x04,0x13,0x00,0x51,
+ 0x04,0x13,0x00,0x10,0x04,0x13,0x00,0x00,0x00,0x92,0x0c,0x51,0x04,0x13,0x00,0x10,
+ 0x04,0x00,0x00,0x13,0x00,0x13,0x00,0x13,0x00,0x54,0x04,0x13,0x00,0xd3,0x10,0x52,
+ 0x04,0x13,0x00,0x51,0x04,0x13,0x00,0x10,0x04,0x13,0x00,0x00,0x00,0xd2,0x0c,0x51,
+ 0x04,0x00,0x00,0x10,0x04,0x13,0x00,0x00,0x00,0x51,0x04,0x13,0x00,0x10,0x04,0x00,
+ 0x00,0x13,0x00,0xcf,0x86,0xd5,0x28,0xd4,0x18,0x93,0x14,0xd2,0x0c,0x51,0x04,0x13,
+ 0x00,0x10,0x04,0x13,0x07,0x13,0x00,0x11,0x04,0x13,0x09,0x13,0x00,0x00,0x00,0x53,
+ 0x04,0x13,0x00,0x92,0x08,0x11,0x04,0x13,0x00,0x00,0x00,0x00,0x00,0x94,0x20,0xd3,
+ 0x10,0x52,0x04,0x14,0x00,0x51,0x04,0x14,0x00,0x10,0x04,0x00,0x00,0x14,0x00,0x92,
+ 0x0c,0x91,0x08,0x10,0x04,0x14,0x00,0x00,0x00,0x14,0x00,0x14,0x00,0x14,0x00,0xd0,
+ 0x52,0xcf,0x86,0xd5,0x3c,0xd4,0x14,0x53,0x04,0x14,0x00,0x52,0x04,0x14,0x00,0x51,
+ 0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x00,0x00,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x14,
+ 0x00,0x10,0x04,0x00,0x00,0x14,0x00,0x51,0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x14,
+ 0x09,0x92,0x0c,0x91,0x08,0x10,0x04,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,
+ 0x10,0x53,0x04,0x14,0x00,0x92,0x08,0x11,0x04,0x14,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xcf,0x06,0x00,0x00,0xd2,0x2a,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,0xcf,
+ 0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x14,0x00,0x53,0x04,0x14,
+ 0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,
+ 0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x15,
+ 0x00,0x54,0x04,0x15,0x00,0xd3,0x0c,0x92,0x08,0x11,0x04,0x15,0x00,0x00,0x00,0x00,
+ 0x00,0x52,0x04,0x00,0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x15,0x00,0xd0,
+ 0xca,0xcf,0x86,0xd5,0xc2,0xd4,0x54,0xd3,0x06,0xcf,0x06,0x09,0x00,0xd2,0x06,0xcf,
+ 0x06,0x09,0x00,0xd1,0x24,0xd0,0x06,0xcf,0x06,0x09,0x00,0xcf,0x86,0x55,0x04,0x09,
+ 0x00,0x94,0x14,0x53,0x04,0x09,0x00,0x52,0x04,0x09,0x00,0x51,0x04,0x09,0x00,0x10,
+ 0x04,0x09,0x00,0x10,0x00,0x10,0x00,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,0x10,
+ 0x00,0x53,0x04,0x10,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x10,0x00,0x11,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xd3,0x68,0xd2,0x46,0xd1,0x40,0xd0,
+ 0x06,0xcf,0x06,0x09,0x00,0xcf,0x86,0x55,0x04,0x09,0x00,0xd4,0x20,0xd3,0x10,0x92,
+ 0x0c,0x51,0x04,0x09,0x00,0x10,0x04,0x09,0x00,0x10,0x00,0x10,0x00,0x52,0x04,0x10,
+ 0x00,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x00,0x00,0x93,0x10,0x52,0x04,0x09,
+ 0x00,0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x11,
+ 0x00,0xd1,0x1c,0xd0,0x06,0xcf,0x06,0x11,0x00,0xcf,0x86,0x95,0x10,0x94,0x0c,0x93,
+ 0x08,0x12,0x04,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,
+ 0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x86,0xd5,0x4c,0xd4,0x06,0xcf,
+ 0x06,0x0b,0x00,0xd3,0x40,0xd2,0x3a,0xd1,0x34,0xd0,0x2e,0xcf,0x86,0x55,0x04,0x0b,
+ 0x00,0xd4,0x14,0x53,0x04,0x0b,0x00,0x52,0x04,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,
+ 0x04,0x0b,0x00,0x00,0x00,0x53,0x04,0x15,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x15,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,
+ 0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xd1,0x4c,0xd0,0x44,0xcf,
+ 0x86,0xd5,0x3c,0xd4,0x06,0xcf,0x06,0x00,0x00,0xd3,0x06,0xcf,0x06,0x11,0x00,0xd2,
+ 0x2a,0xd1,0x24,0xd0,0x06,0xcf,0x06,0x11,0x00,0xcf,0x86,0x95,0x18,0x94,0x14,0x93,
+ 0x10,0x52,0x04,0x11,0x00,0x51,0x04,0x11,0x00,0x10,0x04,0x11,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,
+ 0x00,0xcf,0x86,0xcf,0x06,0x00,0x00,0xe0,0xd2,0x01,0xcf,0x86,0xd5,0x06,0xcf,0x06,
+ 0x00,0x00,0xe4,0x0b,0x01,0xd3,0x06,0xcf,0x06,0x0c,0x00,0xd2,0x84,0xd1,0x50,0xd0,
+ 0x1e,0xcf,0x86,0x55,0x04,0x0c,0x00,0x54,0x04,0x0c,0x00,0x53,0x04,0x0c,0x00,0x92,
+ 0x0c,0x91,0x08,0x10,0x04,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xd5,
+ 0x18,0x54,0x04,0x10,0x00,0x53,0x04,0x10,0x00,0x52,0x04,0x10,0x00,0x51,0x04,0x10,
+ 0x00,0x10,0x04,0x10,0x00,0x00,0x00,0x94,0x14,0x53,0x04,0x10,0x00,0xd2,0x08,0x11,
+ 0x04,0x10,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x10,0x00,0x00,0x00,0xd0,0x06,0xcf,
+ 0x06,0x00,0x00,0xcf,0x86,0xd5,0x08,0x14,0x04,0x00,0x00,0x10,0x00,0xd4,0x10,0x53,
+ 0x04,0x10,0x00,0x52,0x04,0x10,0x00,0x11,0x04,0x10,0x00,0x00,0x00,0x93,0x10,0x52,
+ 0x04,0x10,0x01,0x91,0x08,0x10,0x04,0x10,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0xd1,
+ 0x6c,0xd0,0x1e,0xcf,0x86,0x55,0x04,0x10,0x00,0x54,0x04,0x10,0x00,0x93,0x10,0x52,
+ 0x04,0x10,0xe6,0x51,0x04,0x10,0xe6,0x10,0x04,0x10,0xe6,0x10,0x00,0x10,0x00,0xcf,
+ 0x86,0xd5,0x24,0xd4,0x10,0x93,0x0c,0x52,0x04,0x10,0x00,0x11,0x04,0x10,0x00,0x00,
+ 0x00,0x00,0x00,0x53,0x04,0x10,0x00,0x92,0x0c,0x51,0x04,0x10,0x00,0x10,0x04,0x00,
+ 0x00,0x10,0x00,0x10,0x00,0xd4,0x14,0x93,0x10,0x92,0x0c,0x51,0x04,0x10,0x00,0x10,
+ 0x04,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x53,0x04,0x10,0x00,0x52,0x04,0x00,
+ 0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x10,0x00,0x10,0x00,0xd0,0x0e,0xcf,0x86,0x95,
+ 0x08,0x14,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xd3,0x06,0xcf,
+ 0x06,0x00,0x00,0xd2,0x30,0xd1,0x0c,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x06,0x14,
+ 0x00,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,0x14,0x00,0x53,0x04,0x14,0x00,0x92,
+ 0x0c,0x51,0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,
+ 0x06,0x00,0x00,0xd1,0x4c,0xd0,0x06,0xcf,0x06,0x0d,0x00,0xcf,0x86,0xd5,0x2c,0x94,
+ 0x28,0xd3,0x10,0x52,0x04,0x0d,0x00,0x91,0x08,0x10,0x04,0x0d,0x00,0x15,0x00,0x15,
+ 0x00,0xd2,0x0c,0x51,0x04,0x15,0x00,0x10,0x04,0x15,0x00,0x00,0x00,0x51,0x04,0x00,
+ 0x00,0x10,0x04,0x00,0x00,0x15,0x00,0x0d,0x00,0x54,0x04,0x0d,0x00,0x53,0x04,0x0d,
+ 0x00,0x52,0x04,0x0d,0x00,0x51,0x04,0x0d,0x00,0x10,0x04,0x0d,0x00,0x15,0x00,0xd0,
+ 0x1e,0xcf,0x86,0x95,0x18,0x94,0x14,0x53,0x04,0x15,0x00,0x52,0x04,0x00,0x00,0x51,
+ 0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x0d,0x00,0x0d,0x00,0x00,0x00,0xcf,0x86,0x55,
+ 0x04,0x00,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x12,0x00,0x13,
+ 0x00,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xcf,0x06,0x12,0x00,0xe2,
+ 0xc6,0x01,0xd1,0x8e,0xd0,0x86,0xcf,0x86,0xd5,0x48,0xd4,0x06,0xcf,0x06,0x12,0x00,
+ 0xd3,0x06,0xcf,0x06,0x12,0x00,0xd2,0x06,0xcf,0x06,0x12,0x00,0xd1,0x06,0xcf,0x06,
+ 0x12,0x00,0xd0,0x06,0xcf,0x06,0x12,0x00,0xcf,0x86,0x55,0x04,0x12,0x00,0xd4,0x14,
+ 0x53,0x04,0x12,0x00,0x52,0x04,0x12,0x00,0x91,0x08,0x10,0x04,0x12,0x00,0x14,0x00,
+ 0x14,0x00,0x93,0x0c,0x92,0x08,0x11,0x04,0x14,0x00,0x15,0x00,0x15,0x00,0x00,0x00,
+ 0xd4,0x36,0xd3,0x06,0xcf,0x06,0x12,0x00,0xd2,0x2a,0xd1,0x06,0xcf,0x06,0x12,0x00,
+ 0xd0,0x06,0xcf,0x06,0x12,0x00,0xcf,0x86,0x55,0x04,0x12,0x00,0x54,0x04,0x12,0x00,
+ 0x93,0x10,0x92,0x0c,0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x86,0xcf,0x06,0x00,0x00,
+ 0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,0xd5,0xa2,0xd4,0x9c,0xd3,0x74,
+ 0xd2,0x26,0xd1,0x20,0xd0,0x1a,0xcf,0x86,0x95,0x14,0x94,0x10,0x93,0x0c,0x92,0x08,
+ 0x11,0x04,0x0c,0x00,0x13,0x00,0x13,0x00,0x13,0x00,0x13,0x00,0x13,0x00,0xcf,0x06,
+ 0x13,0x00,0xcf,0x06,0x13,0x00,0xd1,0x48,0xd0,0x1e,0xcf,0x86,0x95,0x18,0x54,0x04,
+ 0x13,0x00,0x53,0x04,0x13,0x00,0x52,0x04,0x13,0x00,0x51,0x04,0x13,0x00,0x10,0x04,
+ 0x13,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0xd5,0x18,0x54,0x04,0x00,0x00,0x93,0x10,
+ 0x92,0x0c,0x51,0x04,0x15,0x00,0x10,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x94,0x0c,0x93,0x08,0x12,0x04,0x00,0x00,0x15,0x00,0x00,0x00,0x13,0x00,0xcf,0x06,
+ 0x13,0x00,0xd2,0x22,0xd1,0x06,0xcf,0x06,0x13,0x00,0xd0,0x06,0xcf,0x06,0x13,0x00,
+ 0xcf,0x86,0x55,0x04,0x13,0x00,0x54,0x04,0x13,0x00,0x53,0x04,0x13,0x00,0x12,0x04,
+ 0x13,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,
+ 0x00,0x00,0xd3,0x7f,0xd2,0x79,0xd1,0x34,0xd0,0x06,0xcf,0x06,0x10,0x00,0xcf,0x86,
+ 0x55,0x04,0x10,0x00,0xd4,0x14,0x53,0x04,0x10,0x00,0x92,0x0c,0x51,0x04,0x10,0x00,
+ 0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x10,0x00,0x52,0x04,0x10,0x00,
+ 0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f,0xcf,0x86,0xd5,0x2c,
+ 0xd4,0x14,0x53,0x04,0x10,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x53,0x04,0x10,0x00,0xd2,0x08,0x11,0x04,0x10,0x00,0x00,0x00,
+ 0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x01,0x10,0x00,0x94,0x0d,0x93,0x09,0x12,0x05,
+ 0x10,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,
+ 0x00,0xcf,0x06,0x00,0x00,0xe1,0x96,0x04,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,
+ 0xcf,0x86,0xe5,0x33,0x04,0xe4,0x83,0x02,0xe3,0xf8,0x01,0xd2,0x26,0xd1,0x06,0xcf,
+ 0x06,0x05,0x00,0xd0,0x06,0xcf,0x06,0x05,0x00,0xcf,0x86,0x55,0x04,0x05,0x00,0x54,
+ 0x04,0x05,0x00,0x93,0x0c,0x52,0x04,0x05,0x00,0x11,0x04,0x05,0x00,0x00,0x00,0x00,
+ 0x00,0xd1,0xef,0xd0,0x2a,0xcf,0x86,0x55,0x04,0x05,0x00,0x94,0x20,0xd3,0x10,0x52,
+ 0x04,0x05,0x00,0x51,0x04,0x05,0x00,0x10,0x04,0x05,0x00,0x00,0x00,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x0a,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0xcf,0x86,0xd5,
+ 0x2a,0x54,0x04,0x05,0x00,0x53,0x04,0x05,0x00,0x52,0x04,0x05,0x00,0x51,0x04,0x05,
+ 0x00,0x10,0x0d,0x05,0xff,0xf0,0x9d,0x85,0x97,0xf0,0x9d,0x85,0xa5,0x00,0x05,0xff,
+ 0xf0,0x9d,0x85,0x98,0xf0,0x9d,0x85,0xa5,0x00,0xd4,0x75,0xd3,0x61,0xd2,0x44,0xd1,
+ 0x22,0x10,0x11,0x05,0xff,0xf0,0x9d,0x85,0x98,0xf0,0x9d,0x85,0xa5,0xf0,0x9d,0x85,
+ 0xae,0x00,0x05,0xff,0xf0,0x9d,0x85,0x98,0xf0,0x9d,0x85,0xa5,0xf0,0x9d,0x85,0xaf,
+ 0x00,0x10,0x11,0x05,0xff,0xf0,0x9d,0x85,0x98,0xf0,0x9d,0x85,0xa5,0xf0,0x9d,0x85,
+ 0xb0,0x00,0x05,0xff,0xf0,0x9d,0x85,0x98,0xf0,0x9d,0x85,0xa5,0xf0,0x9d,0x85,0xb1,
+ 0x00,0xd1,0x15,0x10,0x11,0x05,0xff,0xf0,0x9d,0x85,0x98,0xf0,0x9d,0x85,0xa5,0xf0,
+ 0x9d,0x85,0xb2,0x00,0x05,0xd8,0x10,0x04,0x05,0xd8,0x05,0x01,0xd2,0x08,0x11,0x04,
+ 0x05,0x01,0x05,0x00,0x91,0x08,0x10,0x04,0x05,0x00,0x05,0xe2,0x05,0xd8,0xd3,0x12,
+ 0x92,0x0d,0x51,0x04,0x05,0xd8,0x10,0x04,0x05,0xd8,0x05,0xff,0x00,0x05,0xff,0x00,
+ 0x92,0x0e,0x51,0x05,0x05,0xff,0x00,0x10,0x05,0x05,0xff,0x00,0x05,0xdc,0x05,0xdc,
+ 0xd0,0x97,0xcf,0x86,0xd5,0x28,0x94,0x24,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x05,0xdc,
+ 0x10,0x04,0x05,0xdc,0x05,0x00,0x91,0x08,0x10,0x04,0x05,0x00,0x05,0xe6,0x05,0xe6,
+ 0x92,0x08,0x11,0x04,0x05,0xe6,0x05,0xdc,0x05,0x00,0x05,0x00,0xd4,0x14,0x53,0x04,
+ 0x05,0x00,0xd2,0x08,0x11,0x04,0x05,0x00,0x05,0xe6,0x11,0x04,0x05,0xe6,0x05,0x00,
+ 0x53,0x04,0x05,0x00,0xd2,0x15,0x51,0x04,0x05,0x00,0x10,0x04,0x05,0x00,0x05,0xff,
+ 0xf0,0x9d,0x86,0xb9,0xf0,0x9d,0x85,0xa5,0x00,0xd1,0x1e,0x10,0x0d,0x05,0xff,0xf0,
+ 0x9d,0x86,0xba,0xf0,0x9d,0x85,0xa5,0x00,0x05,0xff,0xf0,0x9d,0x86,0xb9,0xf0,0x9d,
+ 0x85,0xa5,0xf0,0x9d,0x85,0xae,0x00,0x10,0x11,0x05,0xff,0xf0,0x9d,0x86,0xba,0xf0,
+ 0x9d,0x85,0xa5,0xf0,0x9d,0x85,0xae,0x00,0x05,0xff,0xf0,0x9d,0x86,0xb9,0xf0,0x9d,
+ 0x85,0xa5,0xf0,0x9d,0x85,0xaf,0x00,0xcf,0x86,0xd5,0x31,0xd4,0x21,0x93,0x1d,0x92,
+ 0x19,0x91,0x15,0x10,0x11,0x05,0xff,0xf0,0x9d,0x86,0xba,0xf0,0x9d,0x85,0xa5,0xf0,
+ 0x9d,0x85,0xaf,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x53,0x04,0x05,0x00,
+ 0x52,0x04,0x05,0x00,0x11,0x04,0x05,0x00,0x11,0x00,0x94,0x14,0x53,0x04,0x11,0x00,
+ 0x92,0x0c,0x91,0x08,0x10,0x04,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xd2,0x44,0xd1,0x28,0xd0,0x06,0xcf,0x06,0x08,0x00,0xcf,0x86,0x95,0x1c,0x94,0x18,
+ 0x93,0x14,0xd2,0x08,0x11,0x04,0x08,0x00,0x08,0xe6,0x91,0x08,0x10,0x04,0x08,0xe6,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,
+ 0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x14,0x00,0x93,0x08,0x12,0x04,0x14,0x00,
+ 0x00,0x00,0x00,0x00,0xd1,0x40,0xd0,0x06,0xcf,0x06,0x07,0x00,0xcf,0x86,0xd5,0x18,
+ 0x54,0x04,0x07,0x00,0x93,0x10,0x52,0x04,0x07,0x00,0x51,0x04,0x07,0x00,0x10,0x04,
+ 0x07,0x00,0x00,0x00,0x00,0x00,0x54,0x04,0x09,0x00,0xd3,0x0c,0x92,0x08,0x11,0x04,
+ 0x09,0x00,0x14,0x00,0x14,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x14,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xe3,0x5f,0x01,0xd2,0xb4,0xd1,0x24,0xd0,
+ 0x06,0xcf,0x06,0x05,0x00,0xcf,0x86,0x95,0x18,0x54,0x04,0x05,0x00,0x93,0x10,0x52,
+ 0x04,0x05,0x00,0x91,0x08,0x10,0x04,0x05,0x00,0x00,0x00,0x05,0x00,0x05,0x00,0x05,
+ 0x00,0xd0,0x6a,0xcf,0x86,0xd5,0x18,0x54,0x04,0x05,0x00,0x53,0x04,0x05,0x00,0x52,
+ 0x04,0x05,0x00,0x91,0x08,0x10,0x04,0x05,0x00,0x00,0x00,0x05,0x00,0xd4,0x34,0xd3,
+ 0x1c,0xd2,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x05,0x00,0x00,0x00,0xd1,0x08,0x10,
+ 0x04,0x00,0x00,0x05,0x00,0x10,0x04,0x05,0x00,0x00,0x00,0xd2,0x0c,0x91,0x08,0x10,
+ 0x04,0x00,0x00,0x05,0x00,0x05,0x00,0x91,0x08,0x10,0x04,0x05,0x00,0x00,0x00,0x05,
+ 0x00,0x53,0x04,0x05,0x00,0xd2,0x0c,0x51,0x04,0x05,0x00,0x10,0x04,0x00,0x00,0x05,
+ 0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x05,0x00,0x05,0x00,0xcf,0x86,0x95,0x20,0x94,
+ 0x1c,0x93,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x05,0x00,0x07,0x00,0x05,0x00,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05,0x00,0xd1,
+ 0xa4,0xd0,0x6a,0xcf,0x86,0xd5,0x48,0xd4,0x28,0xd3,0x10,0x52,0x04,0x05,0x00,0x51,
+ 0x04,0x05,0x00,0x10,0x04,0x00,0x00,0x05,0x00,0xd2,0x0c,0x51,0x04,0x05,0x00,0x10,
+ 0x04,0x05,0x00,0x00,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x05,0x00,0x05,0x00,0xd3,
+ 0x10,0x52,0x04,0x05,0x00,0x91,0x08,0x10,0x04,0x05,0x00,0x00,0x00,0x05,0x00,0x52,
+ 0x04,0x05,0x00,0x91,0x08,0x10,0x04,0x05,0x00,0x00,0x00,0x05,0x00,0x54,0x04,0x05,
+ 0x00,0x53,0x04,0x05,0x00,0xd2,0x0c,0x51,0x04,0x05,0x00,0x10,0x04,0x00,0x00,0x05,
+ 0x00,0x51,0x04,0x05,0x00,0x10,0x04,0x05,0x00,0x00,0x00,0xcf,0x86,0x95,0x34,0xd4,
+ 0x20,0xd3,0x14,0x52,0x04,0x05,0x00,0xd1,0x08,0x10,0x04,0x05,0x00,0x00,0x00,0x10,
+ 0x04,0x05,0x00,0x00,0x00,0x92,0x08,0x11,0x04,0x00,0x00,0x05,0x00,0x05,0x00,0x93,
+ 0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x05,0x00,0x00,0x00,0x05,0x00,0x05,0x00,0x05,
+ 0x00,0x05,0x00,0xcf,0x06,0x05,0x00,0xd2,0x26,0xd1,0x06,0xcf,0x06,0x05,0x00,0xd0,
+ 0x1a,0xcf,0x86,0x55,0x04,0x05,0x00,0x94,0x10,0x93,0x0c,0x52,0x04,0x05,0x00,0x11,
+ 0x04,0x08,0x00,0x00,0x00,0x05,0x00,0x05,0x00,0xcf,0x06,0x05,0x00,0xd1,0x06,0xcf,
+ 0x06,0x05,0x00,0xd0,0x06,0xcf,0x06,0x05,0x00,0xcf,0x86,0x95,0x18,0x94,0x14,0x53,
+ 0x04,0x05,0x00,0xd2,0x08,0x11,0x04,0x05,0x00,0x09,0x00,0x11,0x04,0x00,0x00,0x05,
+ 0x00,0x05,0x00,0x05,0x00,0xd4,0x52,0xd3,0x06,0xcf,0x06,0x11,0x00,0xd2,0x46,0xd1,
+ 0x06,0xcf,0x06,0x11,0x00,0xd0,0x3a,0xcf,0x86,0xd5,0x20,0xd4,0x0c,0x53,0x04,0x11,
+ 0x00,0x12,0x04,0x11,0x00,0x00,0x00,0x53,0x04,0x00,0x00,0x92,0x0c,0x51,0x04,0x00,
+ 0x00,0x10,0x04,0x00,0x00,0x11,0x00,0x11,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x00,0x00,0xcf,
+ 0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xe0,0xc2,0x03,0xcf,0x86,
+ 0xe5,0x03,0x01,0xd4,0xfc,0xd3,0xc0,0xd2,0x66,0xd1,0x60,0xd0,0x5a,0xcf,0x86,0xd5,
+ 0x2c,0xd4,0x14,0x93,0x10,0x52,0x04,0x12,0xe6,0x51,0x04,0x12,0xe6,0x10,0x04,0x12,
+ 0xe6,0x00,0x00,0x12,0xe6,0x53,0x04,0x12,0xe6,0x92,0x10,0xd1,0x08,0x10,0x04,0x12,
+ 0xe6,0x00,0x00,0x10,0x04,0x00,0x00,0x12,0xe6,0x12,0xe6,0x94,0x28,0xd3,0x18,0xd2,
+ 0x0c,0x51,0x04,0x12,0xe6,0x10,0x04,0x00,0x00,0x12,0xe6,0x91,0x08,0x10,0x04,0x12,
+ 0xe6,0x00,0x00,0x12,0xe6,0x92,0x0c,0x51,0x04,0x12,0xe6,0x10,0x04,0x12,0xe6,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xd1,0x54,0xd0,
+ 0x36,0xcf,0x86,0x55,0x04,0x15,0x00,0xd4,0x14,0x53,0x04,0x15,0x00,0x52,0x04,0x15,
+ 0x00,0x91,0x08,0x10,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0xd3,0x10,0x52,0x04,0x15,
+ 0xe6,0x51,0x04,0x15,0xe6,0x10,0x04,0x15,0xe6,0x15,0x00,0x52,0x04,0x15,0x00,0x11,
+ 0x04,0x15,0x00,0x00,0x00,0xcf,0x86,0x95,0x18,0x94,0x14,0x53,0x04,0x15,0x00,0xd2,
+ 0x08,0x11,0x04,0x15,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x15,0x00,0x00,0x00,0x00,
+ 0x00,0xcf,0x06,0x00,0x00,0xd2,0x36,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,0xcf,
+ 0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x15,0x00,0xd4,0x0c,0x53,0x04,0x15,0x00,0x12,
+ 0x04,0x15,0x00,0x15,0xe6,0x53,0x04,0x15,0x00,0xd2,0x08,0x11,0x04,0x15,0x00,0x00,
+ 0x00,0x51,0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x15,0x00,0xcf,0x06,0x00,0x00,0xcf,
+ 0x06,0x00,0x00,0xd4,0x82,0xd3,0x7c,0xd2,0x3e,0xd1,0x06,0xcf,0x06,0x10,0x00,0xd0,
+ 0x06,0xcf,0x06,0x10,0x00,0xcf,0x86,0x95,0x2c,0xd4,0x18,0x93,0x14,0x52,0x04,0x10,
+ 0x00,0xd1,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x00,0x10,
+ 0x00,0x93,0x10,0x52,0x04,0x10,0xdc,0x51,0x04,0x10,0xdc,0x10,0x04,0x10,0xdc,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xd1,0x38,0xd0,0x06,0xcf,0x06,0x12,0x00,0xcf,0x86,0x95,
+ 0x2c,0xd4,0x18,0xd3,0x08,0x12,0x04,0x12,0x00,0x12,0xe6,0x92,0x0c,0x51,0x04,0x12,
+ 0xe6,0x10,0x04,0x12,0x07,0x15,0x00,0x00,0x00,0x53,0x04,0x12,0x00,0xd2,0x08,0x11,
+ 0x04,0x12,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x12,0x00,0x00,0x00,0xcf,0x06,0x00,
+ 0x00,0xcf,0x06,0x00,0x00,0xd3,0x82,0xd2,0x48,0xd1,0x24,0xd0,0x06,0xcf,0x06,0x00,
+ 0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,0x93,0x10,0x92,0x0c,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x14,0x00,0x14,0x00,0x14,0x00,0x14,0x00,0xd0,0x1e,0xcf,
+ 0x86,0x55,0x04,0x14,0x00,0x54,0x04,0x14,0x00,0x93,0x10,0x52,0x04,0x14,0x00,0x91,
+ 0x08,0x10,0x04,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xd1,
+ 0x34,0xd0,0x2e,0xcf,0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,
+ 0x04,0x00,0x00,0x15,0x00,0x15,0x00,0x15,0x00,0x15,0x00,0x15,0x00,0x54,0x04,0x15,
+ 0x00,0x53,0x04,0x15,0x00,0x52,0x04,0x15,0x00,0x11,0x04,0x15,0x00,0x00,0x00,0xcf,
+ 0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xe2,0xb2,0x01,0xe1,0x41,0x01,0xd0,0x6e,0xcf,
+ 0x86,0xd5,0x18,0x94,0x14,0x93,0x10,0x52,0x04,0x0d,0x00,0x91,0x08,0x10,0x04,0x00,
+ 0x00,0x0d,0x00,0x0d,0x00,0x0d,0x00,0x0d,0x00,0xd4,0x30,0xd3,0x20,0xd2,0x10,0xd1,
+ 0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x10,0x04,0x0d,0x00,0x00,0x00,0xd1,0x08,0x10,
+ 0x04,0x0d,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x0d,0x00,0x92,0x0c,0x91,0x08,0x10,
+ 0x04,0x00,0x00,0x0d,0x00,0x0d,0x00,0x0d,0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x0d,
+ 0x00,0x10,0x04,0x0d,0x00,0x00,0x00,0x0d,0x00,0x92,0x10,0xd1,0x08,0x10,0x04,0x00,
+ 0x00,0x0d,0x00,0x10,0x04,0x00,0x00,0x0d,0x00,0x00,0x00,0xcf,0x86,0xd5,0x74,0xd4,
+ 0x34,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x00,0x00,0x10,0x04,0x0d,0x00,0x00,0x00,0x51,
+ 0x04,0x00,0x00,0x10,0x04,0x00,0x00,0x0d,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x00,
+ 0x00,0x0d,0x00,0x10,0x04,0x00,0x00,0x0d,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x0d,
+ 0x00,0x0d,0x00,0xd3,0x20,0xd2,0x10,0xd1,0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x10,
+ 0x04,0x0d,0x00,0x00,0x00,0xd1,0x08,0x10,0x04,0x0d,0x00,0x00,0x00,0x10,0x04,0x00,
+ 0x00,0x0d,0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x10,0x04,0x00,
+ 0x00,0x0d,0x00,0xd1,0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x10,0x04,0x00,0x00,0x0d,
+ 0x00,0xd4,0x30,0xd3,0x20,0xd2,0x10,0xd1,0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x10,
+ 0x04,0x0d,0x00,0x00,0x00,0xd1,0x08,0x10,0x04,0x0d,0x00,0x00,0x00,0x10,0x04,0x00,
+ 0x00,0x0d,0x00,0x92,0x0c,0x51,0x04,0x0d,0x00,0x10,0x04,0x0d,0x00,0x00,0x00,0x0d,
+ 0x00,0xd3,0x10,0x92,0x0c,0x51,0x04,0x0d,0x00,0x10,0x04,0x0d,0x00,0x00,0x00,0x0d,
+ 0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x0d,0x00,0xd1,0x08,0x10,
+ 0x04,0x0d,0x00,0x00,0x00,0x10,0x04,0x0d,0x00,0x00,0x00,0xd0,0x56,0xcf,0x86,0xd5,
+ 0x20,0xd4,0x14,0x53,0x04,0x0d,0x00,0x92,0x0c,0x51,0x04,0x0d,0x00,0x10,0x04,0x00,
+ 0x00,0x0d,0x00,0x0d,0x00,0x53,0x04,0x0d,0x00,0x12,0x04,0x0d,0x00,0x00,0x00,0xd4,
+ 0x28,0xd3,0x18,0xd2,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x0d,0x00,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x0d,0x00,0x0d,0x00,0x92,0x0c,0x51,0x04,0x0d,0x00,0x10,
+ 0x04,0x00,0x00,0x0d,0x00,0x0d,0x00,0x53,0x04,0x0d,0x00,0x12,0x04,0x0d,0x00,0x00,
+ 0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,0x93,0x0c,0x92,0x08,0x11,
+ 0x04,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x86,0xe5,
+ 0x96,0x05,0xe4,0x28,0x03,0xe3,0xed,0x01,0xd2,0xa0,0xd1,0x1c,0xd0,0x16,0xcf,0x86,
+ 0x55,0x04,0x0a,0x00,0x94,0x0c,0x53,0x04,0x0a,0x00,0x12,0x04,0x0a,0x00,0x00,0x00,
+ 0x0a,0x00,0xcf,0x06,0x0a,0x00,0xd0,0x46,0xcf,0x86,0xd5,0x10,0x54,0x04,0x0a,0x00,
+ 0x93,0x08,0x12,0x04,0x0a,0x00,0x00,0x00,0x00,0x00,0xd4,0x14,0x53,0x04,0x0c,0x00,
+ 0x52,0x04,0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,0x00,0x00,0xd3,0x10,
+ 0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0x52,0x04,
+ 0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,0x10,0x00,0xcf,0x86,0xd5,0x28,
+ 0xd4,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0c,0x00,0x0c,0x00,
+ 0x0c,0x00,0x0c,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x00,0x00,0x0c,0x00,
+ 0x0c,0x00,0x0c,0x00,0x0c,0x00,0x54,0x04,0x10,0x00,0x93,0x0c,0x52,0x04,0x10,0x00,
+ 0x11,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0xd1,0xe4,0xd0,0x5a,0xcf,0x86,0xd5,0x20,
+ 0x94,0x1c,0x53,0x04,0x0b,0x00,0xd2,0x0c,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,0x00,
+ 0x10,0x00,0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x0b,0x00,0xd4,0x14,
+ 0x53,0x04,0x0b,0x00,0x52,0x04,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,0x0b,0x00,
+ 0x14,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0c,0x00,0x0b,0x00,0x0c,0x00,
+ 0x0c,0x00,0x52,0x04,0x0c,0x00,0xd1,0x08,0x10,0x04,0x0c,0x00,0x0b,0x00,0x10,0x04,
+ 0x0c,0x00,0x0b,0x00,0xcf,0x86,0xd5,0x4c,0xd4,0x2c,0xd3,0x18,0xd2,0x0c,0x51,0x04,
+ 0x0c,0x00,0x10,0x04,0x0b,0x00,0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0b,0x00,
+ 0x0c,0x00,0xd2,0x08,0x11,0x04,0x0c,0x00,0x0b,0x00,0x51,0x04,0x0b,0x00,0x10,0x04,
+ 0x0b,0x00,0x0c,0x00,0xd3,0x10,0x52,0x04,0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,
+ 0x0c,0x00,0x0b,0x00,0x52,0x04,0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,
+ 0x0b,0x00,0xd4,0x18,0x53,0x04,0x0c,0x00,0xd2,0x08,0x11,0x04,0x0c,0x00,0x0d,0x00,
+ 0x91,0x08,0x10,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0x53,0x04,0x0c,0x00,0xd2,0x10,
+ 0xd1,0x08,0x10,0x04,0x0c,0x00,0x0b,0x00,0x10,0x04,0x0c,0x00,0x0b,0x00,0xd1,0x08,
+ 0x10,0x04,0x0b,0x00,0x0c,0x00,0x10,0x04,0x0c,0x00,0x0b,0x00,0xd0,0x4e,0xcf,0x86,
+ 0xd5,0x34,0xd4,0x14,0x53,0x04,0x0c,0x00,0xd2,0x08,0x11,0x04,0x0c,0x00,0x0b,0x00,
+ 0x11,0x04,0x0b,0x00,0x0c,0x00,0xd3,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0b,0x00,
+ 0x0c,0x00,0x0c,0x00,0x0c,0x00,0x92,0x0c,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,
+ 0x12,0x00,0x12,0x00,0x94,0x14,0x53,0x04,0x12,0x00,0x52,0x04,0x12,0x00,0x91,0x08,
+ 0x10,0x04,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,
+ 0x94,0x10,0x93,0x0c,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x0c,0x00,0x0c,0x00,
+ 0x0c,0x00,0xd2,0x7e,0xd1,0x78,0xd0,0x3e,0xcf,0x86,0xd5,0x1c,0x94,0x18,0x93,0x14,
+ 0x92,0x10,0xd1,0x08,0x10,0x04,0x0b,0x00,0x0c,0x00,0x10,0x04,0x0c,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x0b,0x00,0x54,0x04,0x0b,0x00,0xd3,0x0c,0x92,0x08,0x11,0x04,
+ 0x0b,0x00,0x0c,0x00,0x0c,0x00,0x92,0x0c,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,
+ 0x12,0x00,0x00,0x00,0xcf,0x86,0xd5,0x24,0xd4,0x14,0x53,0x04,0x0b,0x00,0x92,0x0c,
+ 0x91,0x08,0x10,0x04,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x93,0x0c,0x92,0x08,
+ 0x11,0x04,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x10,0x93,0x0c,0x52,0x04,
+ 0x13,0x00,0x11,0x04,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,
+ 0xd1,0x58,0xd0,0x3a,0xcf,0x86,0x55,0x04,0x0c,0x00,0xd4,0x20,0xd3,0x10,0x92,0x0c,
+ 0x91,0x08,0x10,0x04,0x0c,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x52,0x04,0x10,0x00,
+ 0x91,0x08,0x10,0x04,0x10,0x00,0x11,0x00,0x11,0x00,0x93,0x10,0x52,0x04,0x0c,0x00,
+ 0x51,0x04,0x0c,0x00,0x10,0x04,0x10,0x00,0x0c,0x00,0x0c,0x00,0xcf,0x86,0x55,0x04,
+ 0x0c,0x00,0x54,0x04,0x0c,0x00,0x53,0x04,0x0c,0x00,0x52,0x04,0x0c,0x00,0x91,0x08,
+ 0x10,0x04,0x0c,0x00,0x10,0x00,0x11,0x00,0xd0,0x16,0xcf,0x86,0x95,0x10,0x54,0x04,
+ 0x0c,0x00,0x93,0x08,0x12,0x04,0x0c,0x00,0x10,0x00,0x10,0x00,0x0c,0x00,0xcf,0x86,
+ 0xd5,0x34,0xd4,0x28,0xd3,0x10,0x52,0x04,0x0c,0x00,0x91,0x08,0x10,0x04,0x0c,0x00,
+ 0x10,0x00,0x0c,0x00,0xd2,0x0c,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,0x10,0x00,
+ 0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x11,0x00,0x93,0x08,0x12,0x04,0x11,0x00,
+ 0x10,0x00,0x10,0x00,0x54,0x04,0x0c,0x00,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,
+ 0x0c,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x11,0x00,0xd3,0xfc,0xd2,0x6c,0xd1,0x3c,
+ 0xd0,0x1e,0xcf,0x86,0x55,0x04,0x0c,0x00,0x54,0x04,0x0c,0x00,0x53,0x04,0x0c,0x00,
+ 0x52,0x04,0x0c,0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,0x10,0x00,0xcf,0x86,
+ 0x95,0x18,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0c,0x00,0x10,0x00,
+ 0x0c,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0xd0,0x06,0xcf,0x06,0x0c,0x00,
+ 0xcf,0x86,0x55,0x04,0x0c,0x00,0x54,0x04,0x0c,0x00,0x53,0x04,0x0c,0x00,0xd2,0x0c,
+ 0x91,0x08,0x10,0x04,0x10,0x00,0x0c,0x00,0x0c,0x00,0xd1,0x08,0x10,0x04,0x0c,0x00,
+ 0x10,0x00,0x10,0x04,0x10,0x00,0x11,0x00,0xd1,0x54,0xd0,0x1a,0xcf,0x86,0x55,0x04,
+ 0x0c,0x00,0x54,0x04,0x0c,0x00,0x53,0x04,0x0c,0x00,0x52,0x04,0x0c,0x00,0x11,0x04,
+ 0x0c,0x00,0x10,0x00,0xcf,0x86,0xd5,0x1c,0x94,0x18,0xd3,0x08,0x12,0x04,0x0d,0x00,
+ 0x10,0x00,0x92,0x0c,0x51,0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x11,0x00,0x11,0x00,
+ 0x0c,0x00,0xd4,0x08,0x13,0x04,0x0c,0x00,0x10,0x00,0x53,0x04,0x10,0x00,0x92,0x0c,
+ 0x51,0x04,0x10,0x00,0x10,0x04,0x12,0x00,0x10,0x00,0x10,0x00,0xd0,0x1e,0xcf,0x86,
+ 0x55,0x04,0x10,0x00,0x94,0x14,0x93,0x10,0x52,0x04,0x10,0x00,0x91,0x08,0x10,0x04,
+ 0x12,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0xcf,0x86,0x55,0x04,0x10,0x00,
+ 0x54,0x04,0x10,0x00,0x53,0x04,0x10,0x00,0x92,0x0c,0x51,0x04,0x10,0x00,0x10,0x04,
+ 0x10,0x00,0x0c,0x00,0x0c,0x00,0xe2,0x19,0x01,0xd1,0xa8,0xd0,0x7e,0xcf,0x86,0xd5,
+ 0x4c,0xd4,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x0d,0x00,0x0c,0x00,0x0c,
+ 0x00,0x0c,0x00,0x0c,0x00,0xd3,0x1c,0xd2,0x0c,0x91,0x08,0x10,0x04,0x0c,0x00,0x0d,
+ 0x00,0x0c,0x00,0xd1,0x08,0x10,0x04,0x0c,0x00,0x0d,0x00,0x10,0x04,0x0c,0x00,0x0d,
+ 0x00,0xd2,0x10,0xd1,0x08,0x10,0x04,0x0c,0x00,0x0d,0x00,0x10,0x04,0x0c,0x00,0x0d,
+ 0x00,0x51,0x04,0x0c,0x00,0x10,0x04,0x0c,0x00,0x0d,0x00,0xd4,0x1c,0xd3,0x0c,0x52,
+ 0x04,0x0c,0x00,0x11,0x04,0x0c,0x00,0x0d,0x00,0x52,0x04,0x0c,0x00,0x91,0x08,0x10,
+ 0x04,0x0d,0x00,0x0c,0x00,0x0d,0x00,0x93,0x10,0x52,0x04,0x0c,0x00,0x91,0x08,0x10,
+ 0x04,0x0d,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0xcf,0x86,0x95,0x24,0x94,0x20,0x93,
+ 0x1c,0xd2,0x10,0xd1,0x08,0x10,0x04,0x0c,0x00,0x10,0x00,0x10,0x04,0x10,0x00,0x11,
+ 0x00,0x91,0x08,0x10,0x04,0x11,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00,0x10,0x00,0x10,
+ 0x00,0xd0,0x06,0xcf,0x06,0x0c,0x00,0xcf,0x86,0xd5,0x30,0xd4,0x10,0x93,0x0c,0x52,
+ 0x04,0x0c,0x00,0x11,0x04,0x0c,0x00,0x10,0x00,0x10,0x00,0x93,0x1c,0xd2,0x10,0xd1,
+ 0x08,0x10,0x04,0x11,0x00,0x12,0x00,0x10,0x04,0x12,0x00,0x13,0x00,0x91,0x08,0x10,
+ 0x04,0x13,0x00,0x15,0x00,0x00,0x00,0x00,0x00,0xd4,0x14,0x53,0x04,0x10,0x00,0x52,
+ 0x04,0x10,0x00,0x91,0x08,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0xd3,0x10,0x52,
+ 0x04,0x10,0x00,0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x13,0x00,0x92,0x10,0xd1,
+ 0x08,0x10,0x04,0x13,0x00,0x14,0x00,0x10,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0xd1,
+ 0x1c,0xd0,0x06,0xcf,0x06,0x0c,0x00,0xcf,0x86,0x55,0x04,0x0c,0x00,0x54,0x04,0x0c,
+ 0x00,0x93,0x08,0x12,0x04,0x0c,0x00,0x00,0x00,0x00,0x00,0xd0,0x06,0xcf,0x06,0x10,
+ 0x00,0xcf,0x86,0xd5,0x24,0x54,0x04,0x10,0x00,0xd3,0x10,0x52,0x04,0x10,0x00,0x91,
+ 0x08,0x10,0x04,0x10,0x00,0x14,0x00,0x14,0x00,0x92,0x0c,0x91,0x08,0x10,0x04,0x14,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x0c,0x53,0x04,0x15,0x00,0x12,0x04,0x15,
+ 0x00,0x00,0x00,0x00,0x00,0xe4,0x40,0x02,0xe3,0xc9,0x01,0xd2,0x5c,0xd1,0x34,0xd0,
+ 0x16,0xcf,0x86,0x95,0x10,0x94,0x0c,0x53,0x04,0x10,0x00,0x12,0x04,0x10,0x00,0x00,
+ 0x00,0x10,0x00,0x10,0x00,0xcf,0x86,0x95,0x18,0xd4,0x08,0x13,0x04,0x10,0x00,0x00,
+ 0x00,0x53,0x04,0x10,0x00,0x92,0x08,0x11,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0xd0,0x22,0xcf,0x86,0xd5,0x0c,0x94,0x08,0x13,0x04,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x94,0x10,0x53,0x04,0x10,0x00,0x52,0x04,0x10,0x00,0x11,0x04,0x10,0x00,0x00,
+ 0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xd1,0xc0,0xd0,0x5e,0xcf,0x86,0xd5,0x30,0xd4,
+ 0x14,0x53,0x04,0x13,0x00,0x52,0x04,0x13,0x00,0x91,0x08,0x10,0x04,0x00,0x00,0x15,
+ 0x00,0x15,0x00,0x53,0x04,0x11,0x00,0xd2,0x0c,0x91,0x08,0x10,0x04,0x11,0x00,0x12,
+ 0x00,0x12,0x00,0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x13,0x00,0xd4,0x08,0x13,
+ 0x04,0x12,0x00,0x13,0x00,0xd3,0x14,0x92,0x10,0xd1,0x08,0x10,0x04,0x12,0x00,0x13,
+ 0x00,0x10,0x04,0x13,0x00,0x12,0x00,0x12,0x00,0x52,0x04,0x12,0x00,0x51,0x04,0x12,
+ 0x00,0x10,0x04,0x12,0x00,0x15,0x00,0xcf,0x86,0xd5,0x28,0xd4,0x14,0x53,0x04,0x12,
+ 0x00,0x52,0x04,0x12,0x00,0x91,0x08,0x10,0x04,0x13,0x00,0x14,0x00,0x14,0x00,0x53,
+ 0x04,0x12,0x00,0x52,0x04,0x12,0x00,0x51,0x04,0x12,0x00,0x10,0x04,0x12,0x00,0x13,
+ 0x00,0xd4,0x0c,0x53,0x04,0x13,0x00,0x12,0x04,0x13,0x00,0x14,0x00,0xd3,0x1c,0xd2,
+ 0x10,0xd1,0x08,0x10,0x04,0x14,0x00,0x15,0x00,0x10,0x04,0x00,0x00,0x14,0x00,0x51,
+ 0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x00,0x00,0x92,0x0c,0x51,0x04,0x00,0x00,0x10,
+ 0x04,0x14,0x00,0x15,0x00,0x14,0x00,0xd0,0x62,0xcf,0x86,0xd5,0x24,0xd4,0x14,0x93,
+ 0x10,0x52,0x04,0x11,0x00,0x91,0x08,0x10,0x04,0x11,0x00,0x12,0x00,0x12,0x00,0x12,
+ 0x00,0x93,0x0c,0x92,0x08,0x11,0x04,0x12,0x00,0x13,0x00,0x13,0x00,0x14,0x00,0xd4,
+ 0x2c,0xd3,0x18,0xd2,0x0c,0x51,0x04,0x14,0x00,0x10,0x04,0x14,0x00,0x00,0x00,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x15,0x00,0x15,0x00,0xd2,0x0c,0x51,0x04,0x15,0x00,0x10,
+ 0x04,0x15,0x00,0x00,0x00,0x11,0x04,0x00,0x00,0x15,0x00,0x53,0x04,0x14,0x00,0x92,
+ 0x08,0x11,0x04,0x14,0x00,0x15,0x00,0x15,0x00,0xcf,0x86,0xd5,0x30,0x94,0x2c,0xd3,
+ 0x14,0x92,0x10,0xd1,0x08,0x10,0x04,0x11,0x00,0x14,0x00,0x10,0x04,0x14,0x00,0x15,
+ 0x00,0x15,0x00,0xd2,0x0c,0x51,0x04,0x15,0x00,0x10,0x04,0x15,0x00,0x00,0x00,0x91,
+ 0x08,0x10,0x04,0x00,0x00,0x15,0x00,0x15,0x00,0x13,0x00,0x94,0x14,0x93,0x10,0x52,
+ 0x04,0x13,0x00,0x51,0x04,0x13,0x00,0x10,0x04,0x13,0x00,0x14,0x00,0x14,0x00,0x14,
+ 0x00,0xd2,0x70,0xd1,0x40,0xd0,0x06,0xcf,0x06,0x15,0x00,0xcf,0x86,0xd5,0x10,0x54,
+ 0x04,0x15,0x00,0x93,0x08,0x12,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0xd4,0x10,0x53,
+ 0x04,0x14,0x00,0x52,0x04,0x14,0x00,0x11,0x04,0x14,0x00,0x00,0x00,0xd3,0x08,0x12,
+ 0x04,0x15,0x00,0x00,0x00,0x92,0x0c,0x51,0x04,0x15,0x00,0x10,0x04,0x15,0x00,0x00,
+ 0x00,0x00,0x00,0xd0,0x2a,0xcf,0x86,0x95,0x24,0xd4,0x14,0x93,0x10,0x92,0x0c,0x51,
+ 0x04,0x15,0x00,0x10,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x93,0x0c,0x52,
+ 0x04,0x15,0x00,0x11,0x04,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,
+ 0x00,0xcf,0x06,0x00,0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,
+ 0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,
+ 0x04,0x00,0x00,0x54,0x04,0x00,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,
+ 0x04,0x00,0x00,0x02,0x00,0xe4,0xf9,0x12,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x05,0x00,
+ 0xd2,0xc2,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x05,0x00,0xd0,0x44,0xcf,0x86,0xd5,0x3c,
+ 0xd4,0x06,0xcf,0x06,0x05,0x00,0xd3,0x06,0xcf,0x06,0x05,0x00,0xd2,0x2a,0xd1,0x06,
+ 0xcf,0x06,0x05,0x00,0xd0,0x06,0xcf,0x06,0x05,0x00,0xcf,0x86,0x95,0x18,0x54,0x04,
+ 0x05,0x00,0x93,0x10,0x52,0x04,0x05,0x00,0x51,0x04,0x05,0x00,0x10,0x04,0x05,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x0b,0x00,0xcf,0x06,0x0b,0x00,0xcf,0x86,
+ 0xd5,0x3c,0xd4,0x06,0xcf,0x06,0x0b,0x00,0xd3,0x06,0xcf,0x06,0x0b,0x00,0xd2,0x06,
+ 0xcf,0x06,0x0b,0x00,0xd1,0x24,0xd0,0x1e,0xcf,0x86,0x55,0x04,0x0b,0x00,0x54,0x04,
+ 0x0b,0x00,0x93,0x10,0x52,0x04,0x0b,0x00,0x91,0x08,0x10,0x04,0x0b,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xcf,0x06,0x0c,0x00,0xcf,0x06,0x0c,0x00,0xd4,0x32,0xd3,0x2c,
+ 0xd2,0x26,0xd1,0x20,0xd0,0x1a,0xcf,0x86,0x95,0x14,0x54,0x04,0x0c,0x00,0x53,0x04,
+ 0x0c,0x00,0x52,0x04,0x0c,0x00,0x11,0x04,0x0c,0x00,0x00,0x00,0x11,0x00,0xcf,0x06,
+ 0x11,0x00,0xcf,0x06,0x11,0x00,0xcf,0x06,0x11,0x00,0xcf,0x06,0x11,0x00,0xcf,0x06,
+ 0x11,0x00,0xd1,0x48,0xd0,0x40,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x11,0x00,0xd4,0x06,
+ 0xcf,0x06,0x11,0x00,0xd3,0x06,0xcf,0x06,0x11,0x00,0xd2,0x26,0xd1,0x06,0xcf,0x06,
+ 0x11,0x00,0xd0,0x1a,0xcf,0x86,0x55,0x04,0x11,0x00,0x94,0x10,0x93,0x0c,0x92,0x08,
+ 0x11,0x04,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x00,0xcf,0x06,0x13,0x00,
+ 0xcf,0x06,0x13,0x00,0xcf,0x86,0xcf,0x06,0x13,0x00,0xd0,0x44,0xcf,0x86,0xd5,0x06,
+ 0xcf,0x06,0x13,0x00,0xd4,0x36,0xd3,0x06,0xcf,0x06,0x13,0x00,0xd2,0x06,0xcf,0x06,
+ 0x13,0x00,0xd1,0x06,0xcf,0x06,0x13,0x00,0xd0,0x06,0xcf,0x06,0x13,0x00,0xcf,0x86,
+ 0x55,0x04,0x13,0x00,0x94,0x14,0x93,0x10,0x92,0x0c,0x91,0x08,0x10,0x04,0x13,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x86,
+ 0xd5,0x06,0xcf,0x06,0x00,0x00,0xe4,0x68,0x11,0xe3,0x51,0x10,0xe2,0x17,0x08,0xe1,
+ 0x06,0x04,0xe0,0x03,0x02,0xcf,0x86,0xe5,0x06,0x01,0xd4,0x82,0xd3,0x41,0xd2,0x21,
+ 0xd1,0x10,0x10,0x08,0x05,0xff,0xe4,0xb8,0xbd,0x00,0x05,0xff,0xe4,0xb8,0xb8,0x00,
+ 0x10,0x08,0x05,0xff,0xe4,0xb9,0x81,0x00,0x05,0xff,0xf0,0xa0,0x84,0xa2,0x00,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe4,0xbd,0xa0,0x00,0x05,0xff,0xe4,0xbe,0xae,0x00,0x10,
+ 0x08,0x05,0xff,0xe4,0xbe,0xbb,0x00,0x05,0xff,0xe5,0x80,0x82,0x00,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe5,0x81,0xba,0x00,0x05,0xff,0xe5,0x82,0x99,0x00,0x10,
+ 0x08,0x05,0xff,0xe5,0x83,0xa7,0x00,0x05,0xff,0xe5,0x83,0x8f,0x00,0xd1,0x11,0x10,
+ 0x08,0x05,0xff,0xe3,0x92,0x9e,0x00,0x05,0xff,0xf0,0xa0,0x98,0xba,0x00,0x10,0x08,
+ 0x05,0xff,0xe5,0x85,0x8d,0x00,0x05,0xff,0xe5,0x85,0x94,0x00,0xd3,0x42,0xd2,0x21,
+ 0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0x85,0xa4,0x00,0x05,0xff,0xe5,0x85,0xb7,0x00,
+ 0x10,0x09,0x05,0xff,0xf0,0xa0,0x94,0x9c,0x00,0x05,0xff,0xe3,0x92,0xb9,0x00,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe5,0x85,0xa7,0x00,0x05,0xff,0xe5,0x86,0x8d,0x00,0x10,
+ 0x09,0x05,0xff,0xf0,0xa0,0x95,0x8b,0x00,0x05,0xff,0xe5,0x86,0x97,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0x86,0xa4,0x00,0x05,0xff,0xe4,0xbb,0x8c,0x00,
+ 0x10,0x08,0x05,0xff,0xe5,0x86,0xac,0x00,0x05,0xff,0xe5,0x86,0xb5,0x00,0xd1,0x11,
+ 0x10,0x09,0x05,0xff,0xf0,0xa9,0x87,0x9f,0x00,0x05,0xff,0xe5,0x87,0xb5,0x00,0x10,
+ 0x08,0x05,0xff,0xe5,0x88,0x83,0x00,0x05,0xff,0xe3,0x93,0x9f,0x00,0xd4,0x80,0xd3,
+ 0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0x88,0xbb,0x00,0x05,0xff,0xe5,
+ 0x89,0x86,0x00,0x10,0x08,0x05,0xff,0xe5,0x89,0xb2,0x00,0x05,0xff,0xe5,0x89,0xb7,
+ 0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe3,0x94,0x95,0x00,0x05,0xff,0xe5,0x8b,0x87,
+ 0x00,0x10,0x08,0x05,0xff,0xe5,0x8b,0x89,0x00,0x05,0xff,0xe5,0x8b,0xa4,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0x8b,0xba,0x00,0x05,0xff,0xe5,0x8c,0x85,
+ 0x00,0x10,0x08,0x05,0xff,0xe5,0x8c,0x86,0x00,0x05,0xff,0xe5,0x8c,0x97,0x00,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe5,0x8d,0x89,0x00,0x05,0xff,0xe5,0x8d,0x91,0x00,0x10,
+ 0x08,0x05,0xff,0xe5,0x8d,0x9a,0x00,0x05,0xff,0xe5,0x8d,0xb3,0x00,0xd3,0x39,0xd2,
+ 0x18,0x91,0x10,0x10,0x08,0x05,0xff,0xe5,0x8d,0xbd,0x00,0x05,0xff,0xe5,0x8d,0xbf,
+ 0x00,0x05,0xff,0xe5,0x8d,0xbf,0x00,0xd1,0x11,0x10,0x09,0x05,0xff,0xf0,0xa0,0xa8,
+ 0xac,0x00,0x05,0xff,0xe7,0x81,0xb0,0x00,0x10,0x08,0x05,0xff,0xe5,0x8f,0x8a,0x00,
+ 0x05,0xff,0xe5,0x8f,0x9f,0x00,0xd2,0x21,0xd1,0x11,0x10,0x09,0x05,0xff,0xf0,0xa0,
+ 0xad,0xa3,0x00,0x05,0xff,0xe5,0x8f,0xab,0x00,0x10,0x08,0x05,0xff,0xe5,0x8f,0xb1,
+ 0x00,0x05,0xff,0xe5,0x90,0x86,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0x92,0x9e,
+ 0x00,0x05,0xff,0xe5,0x90,0xb8,0x00,0x10,0x08,0x05,0xff,0xe5,0x91,0x88,0x00,0x05,
+ 0xff,0xe5,0x91,0xa8,0x00,0xcf,0x86,0xe5,0x02,0x01,0xd4,0x80,0xd3,0x40,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0x92,0xa2,0x00,0x05,0xff,0xe5,0x93,0xb6,0x00,
+ 0x10,0x08,0x05,0xff,0xe5,0x94,0x90,0x00,0x05,0xff,0xe5,0x95,0x93,0x00,0xd1,0x10,
+ 0x10,0x08,0x05,0xff,0xe5,0x95,0xa3,0x00,0x05,0xff,0xe5,0x96,0x84,0x00,0x10,0x08,
+ 0x05,0xff,0xe5,0x96,0x84,0x00,0x05,0xff,0xe5,0x96,0x99,0x00,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x05,0xff,0xe5,0x96,0xab,0x00,0x05,0xff,0xe5,0x96,0xb3,0x00,0x10,0x08,
+ 0x05,0xff,0xe5,0x97,0x82,0x00,0x05,0xff,0xe5,0x9c,0x96,0x00,0xd1,0x10,0x10,0x08,
+ 0x05,0xff,0xe5,0x98,0x86,0x00,0x05,0xff,0xe5,0x9c,0x97,0x00,0x10,0x08,0x05,0xff,
+ 0xe5,0x99,0x91,0x00,0x05,0xff,0xe5,0x99,0xb4,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x05,0xff,0xe5,0x88,0x87,0x00,0x05,0xff,0xe5,0xa3,0xae,0x00,0x10,0x08,
+ 0x05,0xff,0xe5,0x9f,0x8e,0x00,0x05,0xff,0xe5,0x9f,0xb4,0x00,0xd1,0x10,0x10,0x08,
+ 0x05,0xff,0xe5,0xa0,0x8d,0x00,0x05,0xff,0xe5,0x9e,0x8b,0x00,0x10,0x08,0x05,0xff,
+ 0xe5,0xa0,0xb2,0x00,0x05,0xff,0xe5,0xa0,0xb1,0x00,0xd2,0x21,0xd1,0x11,0x10,0x08,
+ 0x05,0xff,0xe5,0xa2,0xac,0x00,0x05,0xff,0xf0,0xa1,0x93,0xa4,0x00,0x10,0x08,0x05,
+ 0xff,0xe5,0xa3,0xb2,0x00,0x05,0xff,0xe5,0xa3,0xb7,0x00,0xd1,0x10,0x10,0x08,0x05,
+ 0xff,0xe5,0xa4,0x86,0x00,0x05,0xff,0xe5,0xa4,0x9a,0x00,0x10,0x08,0x05,0xff,0xe5,
+ 0xa4,0xa2,0x00,0x05,0xff,0xe5,0xa5,0xa2,0x00,0xd4,0x7b,0xd3,0x42,0xd2,0x22,0xd1,
+ 0x12,0x10,0x09,0x05,0xff,0xf0,0xa1,0x9a,0xa8,0x00,0x05,0xff,0xf0,0xa1,0x9b,0xaa,
+ 0x00,0x10,0x08,0x05,0xff,0xe5,0xa7,0xac,0x00,0x05,0xff,0xe5,0xa8,0x9b,0x00,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe5,0xa8,0xa7,0x00,0x05,0xff,0xe5,0xa7,0x98,0x00,0x10,
+ 0x08,0x05,0xff,0xe5,0xa9,0xa6,0x00,0x05,0xff,0xe3,0x9b,0xae,0x00,0xd2,0x18,0x91,
+ 0x10,0x10,0x08,0x05,0xff,0xe3,0x9b,0xbc,0x00,0x05,0xff,0xe5,0xac,0x88,0x00,0x05,
+ 0xff,0xe5,0xac,0xbe,0x00,0xd1,0x11,0x10,0x09,0x05,0xff,0xf0,0xa1,0xa7,0x88,0x00,
+ 0x05,0xff,0xe5,0xaf,0x83,0x00,0x10,0x08,0x05,0xff,0xe5,0xaf,0x98,0x00,0x05,0xff,
+ 0xe5,0xaf,0xa7,0x00,0xd3,0x41,0xd2,0x21,0xd1,0x11,0x10,0x08,0x05,0xff,0xe5,0xaf,
+ 0xb3,0x00,0x05,0xff,0xf0,0xa1,0xac,0x98,0x00,0x10,0x08,0x05,0xff,0xe5,0xaf,0xbf,
+ 0x00,0x05,0xff,0xe5,0xb0,0x86,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0xbd,0x93,
+ 0x00,0x05,0xff,0xe5,0xb0,0xa2,0x00,0x10,0x08,0x05,0xff,0xe3,0x9e,0x81,0x00,0x05,
+ 0xff,0xe5,0xb1,0xa0,0x00,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0xb1,0xae,
+ 0x00,0x05,0xff,0xe5,0xb3,0x80,0x00,0x10,0x08,0x05,0xff,0xe5,0xb2,0x8d,0x00,0x05,
+ 0xff,0xf0,0xa1,0xb7,0xa4,0x00,0xd1,0x11,0x10,0x08,0x05,0xff,0xe5,0xb5,0x83,0x00,
+ 0x05,0xff,0xf0,0xa1,0xb7,0xa6,0x00,0x10,0x08,0x05,0xff,0xe5,0xb5,0xae,0x00,0x05,
+ 0xff,0xe5,0xb5,0xab,0x00,0xe0,0x04,0x02,0xcf,0x86,0xd5,0xfe,0xd4,0x82,0xd3,0x40,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0xb5,0xbc,0x00,0x05,0xff,0xe5,0xb7,
+ 0xa1,0x00,0x10,0x08,0x05,0xff,0xe5,0xb7,0xa2,0x00,0x05,0xff,0xe3,0xa0,0xaf,0x00,
+ 0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0xb7,0xbd,0x00,0x05,0xff,0xe5,0xb8,0xa8,0x00,
+ 0x10,0x08,0x05,0xff,0xe5,0xb8,0xbd,0x00,0x05,0xff,0xe5,0xb9,0xa9,0x00,0xd2,0x21,
+ 0xd1,0x11,0x10,0x08,0x05,0xff,0xe3,0xa1,0xa2,0x00,0x05,0xff,0xf0,0xa2,0x86,0x83,
+ 0x00,0x10,0x08,0x05,0xff,0xe3,0xa1,0xbc,0x00,0x05,0xff,0xe5,0xba,0xb0,0x00,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe5,0xba,0xb3,0x00,0x05,0xff,0xe5,0xba,0xb6,0x00,0x10,
+ 0x08,0x05,0xff,0xe5,0xbb,0x8a,0x00,0x05,0xff,0xf0,0xaa,0x8e,0x92,0x00,0xd3,0x3b,
+ 0xd2,0x22,0xd1,0x11,0x10,0x08,0x05,0xff,0xe5,0xbb,0xbe,0x00,0x05,0xff,0xf0,0xa2,
+ 0x8c,0xb1,0x00,0x10,0x09,0x05,0xff,0xf0,0xa2,0x8c,0xb1,0x00,0x05,0xff,0xe8,0x88,
+ 0x81,0x00,0x51,0x08,0x05,0xff,0xe5,0xbc,0xa2,0x00,0x10,0x08,0x05,0xff,0xe3,0xa3,
+ 0x87,0x00,0x05,0xff,0xf0,0xa3,0x8a,0xb8,0x00,0xd2,0x21,0xd1,0x11,0x10,0x09,0x05,
+ 0xff,0xf0,0xa6,0x87,0x9a,0x00,0x05,0xff,0xe5,0xbd,0xa2,0x00,0x10,0x08,0x05,0xff,
+ 0xe5,0xbd,0xab,0x00,0x05,0xff,0xe3,0xa3,0xa3,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,
+ 0xe5,0xbe,0x9a,0x00,0x05,0xff,0xe5,0xbf,0x8d,0x00,0x10,0x08,0x05,0xff,0xe5,0xbf,
+ 0x97,0x00,0x05,0xff,0xe5,0xbf,0xb9,0x00,0xd4,0x81,0xd3,0x41,0xd2,0x20,0xd1,0x10,
+ 0x10,0x08,0x05,0xff,0xe6,0x82,0x81,0x00,0x05,0xff,0xe3,0xa4,0xba,0x00,0x10,0x08,
+ 0x05,0xff,0xe3,0xa4,0x9c,0x00,0x05,0xff,0xe6,0x82,0x94,0x00,0xd1,0x11,0x10,0x09,
+ 0x05,0xff,0xf0,0xa2,0x9b,0x94,0x00,0x05,0xff,0xe6,0x83,0x87,0x00,0x10,0x08,0x05,
+ 0xff,0xe6,0x85,0x88,0x00,0x05,0xff,0xe6,0x85,0x8c,0x00,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x05,0xff,0xe6,0x85,0x8e,0x00,0x05,0xff,0xe6,0x85,0x8c,0x00,0x10,0x08,0x05,
+ 0xff,0xe6,0x85,0xba,0x00,0x05,0xff,0xe6,0x86,0x8e,0x00,0xd1,0x10,0x10,0x08,0x05,
+ 0xff,0xe6,0x86,0xb2,0x00,0x05,0xff,0xe6,0x86,0xa4,0x00,0x10,0x08,0x05,0xff,0xe6,
+ 0x86,0xaf,0x00,0x05,0xff,0xe6,0x87,0x9e,0x00,0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,
+ 0x08,0x05,0xff,0xe6,0x87,0xb2,0x00,0x05,0xff,0xe6,0x87,0xb6,0x00,0x10,0x08,0x05,
+ 0xff,0xe6,0x88,0x90,0x00,0x05,0xff,0xe6,0x88,0x9b,0x00,0xd1,0x10,0x10,0x08,0x05,
+ 0xff,0xe6,0x89,0x9d,0x00,0x05,0xff,0xe6,0x8a,0xb1,0x00,0x10,0x08,0x05,0xff,0xe6,
+ 0x8b,0x94,0x00,0x05,0xff,0xe6,0x8d,0x90,0x00,0xd2,0x21,0xd1,0x11,0x10,0x09,0x05,
+ 0xff,0xf0,0xa2,0xac,0x8c,0x00,0x05,0xff,0xe6,0x8c,0xbd,0x00,0x10,0x08,0x05,0xff,
+ 0xe6,0x8b,0xbc,0x00,0x05,0xff,0xe6,0x8d,0xa8,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,
+ 0xe6,0x8e,0x83,0x00,0x05,0xff,0xe6,0x8f,0xa4,0x00,0x10,0x09,0x05,0xff,0xf0,0xa2,
+ 0xaf,0xb1,0x00,0x05,0xff,0xe6,0x90,0xa2,0x00,0xcf,0x86,0xe5,0x03,0x01,0xd4,0x81,
+ 0xd3,0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0x8f,0x85,0x00,0x05,0xff,
+ 0xe6,0x8e,0xa9,0x00,0x10,0x08,0x05,0xff,0xe3,0xa8,0xae,0x00,0x05,0xff,0xe6,0x91,
+ 0xa9,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0x91,0xbe,0x00,0x05,0xff,0xe6,0x92,
+ 0x9d,0x00,0x10,0x08,0x05,0xff,0xe6,0x91,0xb7,0x00,0x05,0xff,0xe3,0xa9,0xac,0x00,
+ 0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0x95,0x8f,0x00,0x05,0xff,0xe6,0x95,
+ 0xac,0x00,0x10,0x09,0x05,0xff,0xf0,0xa3,0x80,0x8a,0x00,0x05,0xff,0xe6,0x97,0xa3,
+ 0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0x9b,0xb8,0x00,0x05,0xff,0xe6,0x99,0x89,
+ 0x00,0x10,0x08,0x05,0xff,0xe3,0xac,0x99,0x00,0x05,0xff,0xe6,0x9a,0x91,0x00,0xd3,
+ 0x40,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe3,0xac,0x88,0x00,0x05,0xff,0xe3,
+ 0xab,0xa4,0x00,0x10,0x08,0x05,0xff,0xe5,0x86,0x92,0x00,0x05,0xff,0xe5,0x86,0x95,
+ 0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0x9c,0x80,0x00,0x05,0xff,0xe6,0x9a,0x9c,
+ 0x00,0x10,0x08,0x05,0xff,0xe8,0x82,0xad,0x00,0x05,0xff,0xe4,0x8f,0x99,0x00,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0x9c,0x97,0x00,0x05,0xff,0xe6,0x9c,0x9b,
+ 0x00,0x10,0x08,0x05,0xff,0xe6,0x9c,0xa1,0x00,0x05,0xff,0xe6,0x9d,0x9e,0x00,0xd1,
+ 0x11,0x10,0x08,0x05,0xff,0xe6,0x9d,0x93,0x00,0x05,0xff,0xf0,0xa3,0x8f,0x83,0x00,
+ 0x10,0x08,0x05,0xff,0xe3,0xad,0x89,0x00,0x05,0xff,0xe6,0x9f,0xba,0x00,0xd4,0x82,
+ 0xd3,0x41,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0x9e,0x85,0x00,0x05,0xff,
+ 0xe6,0xa1,0x92,0x00,0x10,0x08,0x05,0xff,0xe6,0xa2,0x85,0x00,0x05,0xff,0xf0,0xa3,
+ 0x91,0xad,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0xa2,0x8e,0x00,0x05,0xff,0xe6,
+ 0xa0,0x9f,0x00,0x10,0x08,0x05,0xff,0xe6,0xa4,0x94,0x00,0x05,0xff,0xe3,0xae,0x9d,
+ 0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0xa5,0x82,0x00,0x05,0xff,0xe6,
+ 0xa6,0xa3,0x00,0x10,0x08,0x05,0xff,0xe6,0xa7,0xaa,0x00,0x05,0xff,0xe6,0xaa,0xa8,
+ 0x00,0xd1,0x11,0x10,0x09,0x05,0xff,0xf0,0xa3,0x9a,0xa3,0x00,0x05,0xff,0xe6,0xab,
+ 0x9b,0x00,0x10,0x08,0x05,0xff,0xe3,0xb0,0x98,0x00,0x05,0xff,0xe6,0xac,0xa1,0x00,
+ 0xd3,0x42,0xd2,0x21,0xd1,0x11,0x10,0x09,0x05,0xff,0xf0,0xa3,0xa2,0xa7,0x00,0x05,
+ 0xff,0xe6,0xad,0x94,0x00,0x10,0x08,0x05,0xff,0xe3,0xb1,0x8e,0x00,0x05,0xff,0xe6,
+ 0xad,0xb2,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0xae,0x9f,0x00,0x05,0xff,0xe6,
+ 0xae,0xba,0x00,0x10,0x08,0x05,0xff,0xe6,0xae,0xbb,0x00,0x05,0xff,0xf0,0xa3,0xaa,
+ 0x8d,0x00,0xd2,0x23,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa1,0xb4,0x8b,0x00,0x05,
+ 0xff,0xf0,0xa3,0xab,0xba,0x00,0x10,0x08,0x05,0xff,0xe6,0xb1,0x8e,0x00,0x05,0xff,
+ 0xf0,0xa3,0xb2,0xbc,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0xb2,0xbf,0x00,0x05,
+ 0xff,0xe6,0xb3,0x8d,0x00,0x10,0x08,0x05,0xff,0xe6,0xb1,0xa7,0x00,0x05,0xff,0xe6,
+ 0xb4,0x96,0x00,0xe1,0x1d,0x04,0xe0,0x0c,0x02,0xcf,0x86,0xe5,0x08,0x01,0xd4,0x82,
+ 0xd3,0x41,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0xb4,0xbe,0x00,0x05,0xff,
+ 0xe6,0xb5,0xb7,0x00,0x10,0x08,0x05,0xff,0xe6,0xb5,0x81,0x00,0x05,0xff,0xe6,0xb5,
+ 0xa9,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0xb5,0xb8,0x00,0x05,0xff,0xe6,0xb6,
+ 0x85,0x00,0x10,0x09,0x05,0xff,0xf0,0xa3,0xb4,0x9e,0x00,0x05,0xff,0xe6,0xb4,0xb4,
+ 0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe6,0xb8,0xaf,0x00,0x05,0xff,0xe6,
+ 0xb9,0xae,0x00,0x10,0x08,0x05,0xff,0xe3,0xb4,0xb3,0x00,0x05,0xff,0xe6,0xbb,0x8b,
+ 0x00,0xd1,0x11,0x10,0x08,0x05,0xff,0xe6,0xbb,0x87,0x00,0x05,0xff,0xf0,0xa3,0xbb,
+ 0x91,0x00,0x10,0x08,0x05,0xff,0xe6,0xb7,0xb9,0x00,0x05,0xff,0xe6,0xbd,0xae,0x00,
+ 0xd3,0x42,0xd2,0x22,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa3,0xbd,0x9e,0x00,0x05,
+ 0xff,0xf0,0xa3,0xbe,0x8e,0x00,0x10,0x08,0x05,0xff,0xe6,0xbf,0x86,0x00,0x05,0xff,
+ 0xe7,0x80,0xb9,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,0x80,0x9e,0x00,0x05,0xff,
+ 0xe7,0x80,0x9b,0x00,0x10,0x08,0x05,0xff,0xe3,0xb6,0x96,0x00,0x05,0xff,0xe7,0x81,
+ 0x8a,0x00,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,0x81,0xbd,0x00,0x05,0xff,
+ 0xe7,0x81,0xb7,0x00,0x10,0x08,0x05,0xff,0xe7,0x82,0xad,0x00,0x05,0xff,0xf0,0xa0,
+ 0x94,0xa5,0x00,0xd1,0x11,0x10,0x08,0x05,0xff,0xe7,0x85,0x85,0x00,0x05,0xff,0xf0,
+ 0xa4,0x89,0xa3,0x00,0x10,0x08,0x05,0xff,0xe7,0x86,0x9c,0x00,0x05,0xff,0xf0,0xa4,
+ 0x8e,0xab,0x00,0xd4,0x7b,0xd3,0x43,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,
+ 0x88,0xa8,0x00,0x05,0xff,0xe7,0x88,0xb5,0x00,0x10,0x08,0x05,0xff,0xe7,0x89,0x90,
+ 0x00,0x05,0xff,0xf0,0xa4,0x98,0x88,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,0x8a,
+ 0x80,0x00,0x05,0xff,0xe7,0x8a,0x95,0x00,0x10,0x09,0x05,0xff,0xf0,0xa4,0x9c,0xb5,
+ 0x00,0x05,0xff,0xf0,0xa4,0xa0,0x94,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,
+ 0xe7,0x8d,0xba,0x00,0x05,0xff,0xe7,0x8e,0x8b,0x00,0x10,0x08,0x05,0xff,0xe3,0xba,
+ 0xac,0x00,0x05,0xff,0xe7,0x8e,0xa5,0x00,0x51,0x08,0x05,0xff,0xe3,0xba,0xb8,0x00,
+ 0x10,0x08,0x05,0xff,0xe7,0x91,0x87,0x00,0x05,0xff,0xe7,0x91,0x9c,0x00,0xd3,0x42,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,0x91,0xb1,0x00,0x05,0xff,0xe7,0x92,
+ 0x85,0x00,0x10,0x08,0x05,0xff,0xe7,0x93,0x8a,0x00,0x05,0xff,0xe3,0xbc,0x9b,0x00,
+ 0xd1,0x11,0x10,0x08,0x05,0xff,0xe7,0x94,0xa4,0x00,0x05,0xff,0xf0,0xa4,0xb0,0xb6,
+ 0x00,0x10,0x08,0x05,0xff,0xe7,0x94,0xbe,0x00,0x05,0xff,0xf0,0xa4,0xb2,0x92,0x00,
+ 0xd2,0x22,0xd1,0x11,0x10,0x08,0x05,0xff,0xe7,0x95,0xb0,0x00,0x05,0xff,0xf0,0xa2,
+ 0x86,0x9f,0x00,0x10,0x08,0x05,0xff,0xe7,0x98,0x90,0x00,0x05,0xff,0xf0,0xa4,0xbe,
+ 0xa1,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa4,0xbe,0xb8,0x00,0x05,0xff,0xf0,
+ 0xa5,0x81,0x84,0x00,0x10,0x08,0x05,0xff,0xe3,0xbf,0xbc,0x00,0x05,0xff,0xe4,0x80,
+ 0x88,0x00,0xcf,0x86,0xe5,0x04,0x01,0xd4,0x7d,0xd3,0x3c,0xd2,0x23,0xd1,0x11,0x10,
+ 0x08,0x05,0xff,0xe7,0x9b,0xb4,0x00,0x05,0xff,0xf0,0xa5,0x83,0xb3,0x00,0x10,0x09,
+ 0x05,0xff,0xf0,0xa5,0x83,0xb2,0x00,0x05,0xff,0xf0,0xa5,0x84,0x99,0x00,0x91,0x11,
+ 0x10,0x09,0x05,0xff,0xf0,0xa5,0x84,0xb3,0x00,0x05,0xff,0xe7,0x9c,0x9e,0x00,0x05,
+ 0xff,0xe7,0x9c,0x9f,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,0x9d,0x8a,
+ 0x00,0x05,0xff,0xe4,0x80,0xb9,0x00,0x10,0x08,0x05,0xff,0xe7,0x9e,0x8b,0x00,0x05,
+ 0xff,0xe4,0x81,0x86,0x00,0xd1,0x11,0x10,0x08,0x05,0xff,0xe4,0x82,0x96,0x00,0x05,
+ 0xff,0xf0,0xa5,0x90,0x9d,0x00,0x10,0x08,0x05,0xff,0xe7,0xa1,0x8e,0x00,0x05,0xff,
+ 0xe7,0xa2,0x8c,0x00,0xd3,0x43,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,0xa3,
+ 0x8c,0x00,0x05,0xff,0xe4,0x83,0xa3,0x00,0x10,0x09,0x05,0xff,0xf0,0xa5,0x98,0xa6,
+ 0x00,0x05,0xff,0xe7,0xa5,0x96,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa5,0x9a,
+ 0x9a,0x00,0x05,0xff,0xf0,0xa5,0x9b,0x85,0x00,0x10,0x08,0x05,0xff,0xe7,0xa6,0x8f,
+ 0x00,0x05,0xff,0xe7,0xa7,0xab,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe4,
+ 0x84,0xaf,0x00,0x05,0xff,0xe7,0xa9,0x80,0x00,0x10,0x08,0x05,0xff,0xe7,0xa9,0x8a,
+ 0x00,0x05,0xff,0xe7,0xa9,0x8f,0x00,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa5,0xa5,
+ 0xbc,0x00,0x05,0xff,0xf0,0xa5,0xaa,0xa7,0x00,0x10,0x09,0x05,0xff,0xf0,0xa5,0xaa,
+ 0xa7,0x00,0x05,0xff,0xe7,0xab,0xae,0x00,0xd4,0x83,0xd3,0x42,0xd2,0x21,0xd1,0x11,
+ 0x10,0x08,0x05,0xff,0xe4,0x88,0x82,0x00,0x05,0xff,0xf0,0xa5,0xae,0xab,0x00,0x10,
+ 0x08,0x05,0xff,0xe7,0xaf,0x86,0x00,0x05,0xff,0xe7,0xaf,0x89,0x00,0xd1,0x11,0x10,
+ 0x08,0x05,0xff,0xe4,0x88,0xa7,0x00,0x05,0xff,0xf0,0xa5,0xb2,0x80,0x00,0x10,0x08,
+ 0x05,0xff,0xe7,0xb3,0x92,0x00,0x05,0xff,0xe4,0x8a,0xa0,0x00,0xd2,0x21,0xd1,0x10,
+ 0x10,0x08,0x05,0xff,0xe7,0xb3,0xa8,0x00,0x05,0xff,0xe7,0xb3,0xa3,0x00,0x10,0x08,
+ 0x05,0xff,0xe7,0xb4,0x80,0x00,0x05,0xff,0xf0,0xa5,0xbe,0x86,0x00,0xd1,0x10,0x10,
+ 0x08,0x05,0xff,0xe7,0xb5,0xa3,0x00,0x05,0xff,0xe4,0x8c,0x81,0x00,0x10,0x08,0x05,
+ 0xff,0xe7,0xb7,0x87,0x00,0x05,0xff,0xe7,0xb8,0x82,0x00,0xd3,0x44,0xd2,0x22,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe7,0xb9,0x85,0x00,0x05,0xff,0xe4,0x8c,0xb4,0x00,0x10,
+ 0x09,0x05,0xff,0xf0,0xa6,0x88,0xa8,0x00,0x05,0xff,0xf0,0xa6,0x89,0x87,0x00,0xd1,
+ 0x11,0x10,0x08,0x05,0xff,0xe4,0x8d,0x99,0x00,0x05,0xff,0xf0,0xa6,0x8b,0x99,0x00,
+ 0x10,0x08,0x05,0xff,0xe7,0xbd,0xba,0x00,0x05,0xff,0xf0,0xa6,0x8c,0xbe,0x00,0xd2,
+ 0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe7,0xbe,0x95,0x00,0x05,0xff,0xe7,0xbf,0xba,
+ 0x00,0x10,0x08,0x05,0xff,0xe8,0x80,0x85,0x00,0x05,0xff,0xf0,0xa6,0x93,0x9a,0x00,
+ 0xd1,0x11,0x10,0x09,0x05,0xff,0xf0,0xa6,0x94,0xa3,0x00,0x05,0xff,0xe8,0x81,0xa0,
+ 0x00,0x10,0x09,0x05,0xff,0xf0,0xa6,0x96,0xa8,0x00,0x05,0xff,0xe8,0x81,0xb0,0x00,
+ 0xe0,0x11,0x02,0xcf,0x86,0xe5,0x07,0x01,0xd4,0x85,0xd3,0x42,0xd2,0x21,0xd1,0x11,
+ 0x10,0x09,0x05,0xff,0xf0,0xa3,0x8d,0x9f,0x00,0x05,0xff,0xe4,0x8f,0x95,0x00,0x10,
+ 0x08,0x05,0xff,0xe8,0x82,0xb2,0x00,0x05,0xff,0xe8,0x84,0x83,0x00,0xd1,0x10,0x10,
+ 0x08,0x05,0xff,0xe4,0x90,0x8b,0x00,0x05,0xff,0xe8,0x84,0xbe,0x00,0x10,0x08,0x05,
+ 0xff,0xe5,0xaa,0xb5,0x00,0x05,0xff,0xf0,0xa6,0x9e,0xa7,0x00,0xd2,0x23,0xd1,0x12,
+ 0x10,0x09,0x05,0xff,0xf0,0xa6,0x9e,0xb5,0x00,0x05,0xff,0xf0,0xa3,0x8e,0x93,0x00,
+ 0x10,0x09,0x05,0xff,0xf0,0xa3,0x8e,0x9c,0x00,0x05,0xff,0xe8,0x88,0x81,0x00,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe8,0x88,0x84,0x00,0x05,0xff,0xe8,0xbe,0x9e,0x00,0x10,
+ 0x08,0x05,0xff,0xe4,0x91,0xab,0x00,0x05,0xff,0xe8,0x8a,0x91,0x00,0xd3,0x41,0xd2,
+ 0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x8a,0x8b,0x00,0x05,0xff,0xe8,0x8a,0x9d,
+ 0x00,0x10,0x08,0x05,0xff,0xe5,0x8a,0xb3,0x00,0x05,0xff,0xe8,0x8a,0xb1,0x00,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe8,0x8a,0xb3,0x00,0x05,0xff,0xe8,0x8a,0xbd,0x00,0x10,
+ 0x08,0x05,0xff,0xe8,0x8b,0xa6,0x00,0x05,0xff,0xf0,0xa6,0xac,0xbc,0x00,0xd2,0x20,
+ 0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x8b,0xa5,0x00,0x05,0xff,0xe8,0x8c,0x9d,0x00,
+ 0x10,0x08,0x05,0xff,0xe8,0x8d,0xa3,0x00,0x05,0xff,0xe8,0x8e,0xad,0x00,0xd1,0x10,
+ 0x10,0x08,0x05,0xff,0xe8,0x8c,0xa3,0x00,0x05,0xff,0xe8,0x8e,0xbd,0x00,0x10,0x08,
+ 0x05,0xff,0xe8,0x8f,0xa7,0x00,0x05,0xff,0xe8,0x91,0x97,0x00,0xd4,0x85,0xd3,0x43,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x8d,0x93,0x00,0x05,0xff,0xe8,0x8f,
+ 0x8a,0x00,0x10,0x08,0x05,0xff,0xe8,0x8f,0x8c,0x00,0x05,0xff,0xe8,0x8f,0x9c,0x00,
+ 0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa6,0xb0,0xb6,0x00,0x05,0xff,0xf0,0xa6,0xb5,
+ 0xab,0x00,0x10,0x09,0x05,0xff,0xf0,0xa6,0xb3,0x95,0x00,0x05,0xff,0xe4,0x94,0xab,
+ 0x00,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x93,0xb1,0x00,0x05,0xff,0xe8,
+ 0x93,0xb3,0x00,0x10,0x08,0x05,0xff,0xe8,0x94,0x96,0x00,0x05,0xff,0xf0,0xa7,0x8f,
+ 0x8a,0x00,0xd1,0x11,0x10,0x08,0x05,0xff,0xe8,0x95,0xa4,0x00,0x05,0xff,0xf0,0xa6,
+ 0xbc,0xac,0x00,0x10,0x08,0x05,0xff,0xe4,0x95,0x9d,0x00,0x05,0xff,0xe4,0x95,0xa1,
+ 0x00,0xd3,0x42,0xd2,0x22,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa6,0xbe,0xb1,0x00,
+ 0x05,0xff,0xf0,0xa7,0x83,0x92,0x00,0x10,0x08,0x05,0xff,0xe4,0x95,0xab,0x00,0x05,
+ 0xff,0xe8,0x99,0x90,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x99,0x9c,0x00,0x05,
+ 0xff,0xe8,0x99,0xa7,0x00,0x10,0x08,0x05,0xff,0xe8,0x99,0xa9,0x00,0x05,0xff,0xe8,
+ 0x9a,0xa9,0x00,0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x9a,0x88,0x00,0x05,
+ 0xff,0xe8,0x9c,0x8e,0x00,0x10,0x08,0x05,0xff,0xe8,0x9b,0xa2,0x00,0x05,0xff,0xe8,
+ 0x9d,0xb9,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe8,0x9c,0xa8,0x00,0x05,0xff,0xe8,
+ 0x9d,0xab,0x00,0x10,0x08,0x05,0xff,0xe8,0x9e,0x86,0x00,0x05,0xff,0xe4,0x97,0x97,
+ 0x00,0xcf,0x86,0xe5,0x08,0x01,0xd4,0x83,0xd3,0x41,0xd2,0x20,0xd1,0x10,0x10,0x08,
+ 0x05,0xff,0xe8,0x9f,0xa1,0x00,0x05,0xff,0xe8,0xa0,0x81,0x00,0x10,0x08,0x05,0xff,
+ 0xe4,0x97,0xb9,0x00,0x05,0xff,0xe8,0xa1,0xa0,0x00,0xd1,0x11,0x10,0x08,0x05,0xff,
+ 0xe8,0xa1,0xa3,0x00,0x05,0xff,0xf0,0xa7,0x99,0xa7,0x00,0x10,0x08,0x05,0xff,0xe8,
+ 0xa3,0x97,0x00,0x05,0xff,0xe8,0xa3,0x9e,0x00,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,
+ 0xff,0xe4,0x98,0xb5,0x00,0x05,0xff,0xe8,0xa3,0xba,0x00,0x10,0x08,0x05,0xff,0xe3,
+ 0x92,0xbb,0x00,0x05,0xff,0xf0,0xa7,0xa2,0xae,0x00,0xd1,0x11,0x10,0x09,0x05,0xff,
+ 0xf0,0xa7,0xa5,0xa6,0x00,0x05,0xff,0xe4,0x9a,0xbe,0x00,0x10,0x08,0x05,0xff,0xe4,
+ 0x9b,0x87,0x00,0x05,0xff,0xe8,0xaa,0xa0,0x00,0xd3,0x41,0xd2,0x21,0xd1,0x10,0x10,
+ 0x08,0x05,0xff,0xe8,0xab,0xad,0x00,0x05,0xff,0xe8,0xae,0x8a,0x00,0x10,0x08,0x05,
+ 0xff,0xe8,0xb1,0x95,0x00,0x05,0xff,0xf0,0xa7,0xb2,0xa8,0x00,0xd1,0x10,0x10,0x08,
+ 0x05,0xff,0xe8,0xb2,0xab,0x00,0x05,0xff,0xe8,0xb3,0x81,0x00,0x10,0x08,0x05,0xff,
+ 0xe8,0xb4,0x9b,0x00,0x05,0xff,0xe8,0xb5,0xb7,0x00,0xd2,0x22,0xd1,0x12,0x10,0x09,
+ 0x05,0xff,0xf0,0xa7,0xbc,0xaf,0x00,0x05,0xff,0xf0,0xa0,0xa0,0x84,0x00,0x10,0x08,
+ 0x05,0xff,0xe8,0xb7,0x8b,0x00,0x05,0xff,0xe8,0xb6,0xbc,0x00,0xd1,0x11,0x10,0x08,
+ 0x05,0xff,0xe8,0xb7,0xb0,0x00,0x05,0xff,0xf0,0xa0,0xa3,0x9e,0x00,0x10,0x08,0x05,
+ 0xff,0xe8,0xbb,0x94,0x00,0x05,0xff,0xe8,0xbc,0xb8,0x00,0xd4,0x84,0xd3,0x43,0xd2,
+ 0x22,0xd1,0x12,0x10,0x09,0x05,0xff,0xf0,0xa8,0x97,0x92,0x00,0x05,0xff,0xf0,0xa8,
+ 0x97,0xad,0x00,0x10,0x08,0x05,0xff,0xe9,0x82,0x94,0x00,0x05,0xff,0xe9,0x83,0xb1,
+ 0x00,0xd1,0x11,0x10,0x08,0x05,0xff,0xe9,0x84,0x91,0x00,0x05,0xff,0xf0,0xa8,0x9c,
+ 0xae,0x00,0x10,0x08,0x05,0xff,0xe9,0x84,0x9b,0x00,0x05,0xff,0xe9,0x88,0xb8,0x00,
+ 0xd2,0x20,0xd1,0x10,0x10,0x08,0x05,0xff,0xe9,0x8b,0x97,0x00,0x05,0xff,0xe9,0x8b,
+ 0x98,0x00,0x10,0x08,0x05,0xff,0xe9,0x89,0xbc,0x00,0x05,0xff,0xe9,0x8f,0xb9,0x00,
+ 0xd1,0x11,0x10,0x08,0x05,0xff,0xe9,0x90,0x95,0x00,0x05,0xff,0xf0,0xa8,0xaf,0xba,
+ 0x00,0x10,0x08,0x05,0xff,0xe9,0x96,0x8b,0x00,0x05,0xff,0xe4,0xa6,0x95,0x00,0xd3,
+ 0x43,0xd2,0x21,0xd1,0x11,0x10,0x08,0x05,0xff,0xe9,0x96,0xb7,0x00,0x05,0xff,0xf0,
+ 0xa8,0xb5,0xb7,0x00,0x10,0x08,0x05,0xff,0xe4,0xa7,0xa6,0x00,0x05,0xff,0xe9,0x9b,
+ 0x83,0x00,0xd1,0x10,0x10,0x08,0x05,0xff,0xe5,0xb6,0xb2,0x00,0x05,0xff,0xe9,0x9c,
+ 0xa3,0x00,0x10,0x09,0x05,0xff,0xf0,0xa9,0x85,0x85,0x00,0x05,0xff,0xf0,0xa9,0x88,
+ 0x9a,0x00,0xd2,0x21,0xd1,0x10,0x10,0x08,0x05,0xff,0xe4,0xa9,0xae,0x00,0x05,0xff,
+ 0xe4,0xa9,0xb6,0x00,0x10,0x08,0x05,0xff,0xe9,0x9f,0xa0,0x00,0x05,0xff,0xf0,0xa9,
+ 0x90,0x8a,0x00,0x91,0x11,0x10,0x08,0x05,0xff,0xe4,0xaa,0xb2,0x00,0x05,0xff,0xf0,
+ 0xa9,0x92,0x96,0x00,0x05,0xff,0xe9,0xa0,0x8b,0x00,0xe2,0x10,0x01,0xe1,0x09,0x01,
+ 0xe0,0x02,0x01,0xcf,0x86,0x95,0xfb,0xd4,0x82,0xd3,0x41,0xd2,0x21,0xd1,0x11,0x10,
+ 0x08,0x05,0xff,0xe9,0xa0,0xa9,0x00,0x05,0xff,0xf0,0xa9,0x96,0xb6,0x00,0x10,0x08,
+ 0x05,0xff,0xe9,0xa3,0xa2,0x00,0x05,0xff,0xe4,0xac,0xb3,0x00,0xd1,0x10,0x10,0x08,
+ 0x05,0xff,0xe9,0xa4,0xa9,0x00,0x05,0xff,0xe9,0xa6,0xa7,0x00,0x10,0x08,0x05,0xff,
+ 0xe9,0xa7,0x82,0x00,0x05,0xff,0xe9,0xa7,0xbe,0x00,0xd2,0x21,0xd1,0x11,0x10,0x08,
+ 0x05,0xff,0xe4,0xaf,0x8e,0x00,0x05,0xff,0xf0,0xa9,0xac,0xb0,0x00,0x10,0x08,0x05,
+ 0xff,0xe9,0xac,0x92,0x00,0x05,0xff,0xe9,0xb1,0x80,0x00,0xd1,0x10,0x10,0x08,0x05,
+ 0xff,0xe9,0xb3,0xbd,0x00,0x05,0xff,0xe4,0xb3,0x8e,0x00,0x10,0x08,0x05,0xff,0xe4,
+ 0xb3,0xad,0x00,0x05,0xff,0xe9,0xb5,0xa7,0x00,0xd3,0x44,0xd2,0x23,0xd1,0x11,0x10,
+ 0x09,0x05,0xff,0xf0,0xaa,0x83,0x8e,0x00,0x05,0xff,0xe4,0xb3,0xb8,0x00,0x10,0x09,
+ 0x05,0xff,0xf0,0xaa,0x84,0x85,0x00,0x05,0xff,0xf0,0xaa,0x88,0x8e,0x00,0xd1,0x11,
+ 0x10,0x09,0x05,0xff,0xf0,0xaa,0x8a,0x91,0x00,0x05,0xff,0xe9,0xba,0xbb,0x00,0x10,
+ 0x08,0x05,0xff,0xe4,0xb5,0x96,0x00,0x05,0xff,0xe9,0xbb,0xb9,0x00,0xd2,0x20,0xd1,
+ 0x10,0x10,0x08,0x05,0xff,0xe9,0xbb,0xbe,0x00,0x05,0xff,0xe9,0xbc,0x85,0x00,0x10,
+ 0x08,0x05,0xff,0xe9,0xbc,0x8f,0x00,0x05,0xff,0xe9,0xbc,0x96,0x00,0x91,0x11,0x10,
+ 0x08,0x05,0xff,0xe9,0xbc,0xbb,0x00,0x05,0xff,0xf0,0xaa,0x98,0x80,0x00,0x00,0x00,
+ 0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xcf,0x06,0x00,0x00,0xd3,0x06,
+ 0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,
+ 0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,
+ 0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,0xd3,0x08,
+ 0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd1,0x08,
+ 0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,
+ 0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,0x00,0xd3,0x06,0xcf,0x06,
+ 0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,
+ 0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,0x53,0x04,
+ 0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,0xcf,0x86,0xd5,0xc0,
+ 0xd4,0x60,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,0x06,
+ 0x00,0x00,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,0x06,
+ 0x00,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,0x00,
+ 0xd3,0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,
+ 0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,
+ 0x00,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,
+ 0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,
+ 0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,
+ 0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,0x00,0xd3,0x06,
+ 0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,
+ 0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,
+ 0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,0xd4,0x60,
+ 0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,
+ 0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,
+ 0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,0x00,0xd3,0x06,
+ 0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,
+ 0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,
+ 0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,0xd3,0x08,
+ 0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd1,0x08,
+ 0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,
+ 0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,0x00,0xd3,0x06,0xcf,0x06,
+ 0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,
+ 0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,0x53,0x04,
+ 0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,0xe0,0x83,0x01,0xcf,
+ 0x86,0xd5,0xc0,0xd4,0x60,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,
+ 0x86,0xcf,0x06,0x00,0x00,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,
+ 0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,
+ 0x06,0x00,0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,
+ 0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,
+ 0x00,0x54,0x04,0x00,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,
+ 0x00,0x02,0x00,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,
+ 0x06,0x00,0x00,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,
+ 0x06,0x00,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,
+ 0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,
+ 0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,
+ 0x04,0x00,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,
+ 0x00,0xd4,0x60,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,
+ 0x06,0x00,0x00,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,
+ 0x06,0x00,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,
+ 0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,
+ 0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,
+ 0x04,0x00,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,
+ 0x00,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,0x06,0x00,
+ 0x00,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,
+ 0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,0x00,0xd3,
+ 0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,
+ 0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,
+ 0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,0xcf,
+ 0x86,0xd5,0xc0,0xd4,0x60,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,
+ 0x86,0xcf,0x06,0x00,0x00,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,
+ 0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,
+ 0x06,0x00,0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,
+ 0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,
+ 0x00,0x54,0x04,0x00,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,
+ 0x00,0x02,0x00,0xd3,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,
+ 0x06,0x00,0x00,0xd1,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,
+ 0x06,0x00,0x00,0xcf,0x86,0xd5,0x06,0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,
+ 0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,
+ 0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,
+ 0x04,0x00,0x00,0x53,0x04,0x00,0x00,0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,
+ 0x00,0xd4,0xd9,0xd3,0x81,0xd2,0x79,0xd1,0x71,0xd0,0x69,0xcf,0x86,0xd5,0x60,0xd4,
+ 0x59,0xd3,0x52,0xd2,0x33,0xd1,0x2c,0xd0,0x25,0xcf,0x86,0x95,0x1e,0x94,0x19,0x93,
+ 0x14,0x92,0x0f,0x91,0x0a,0x10,0x05,0x00,0xff,0x00,0x05,0xff,0x00,0x00,0xff,0x00,
+ 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x05,0xff,0x00,0xcf,0x06,0x05,0xff,
+ 0x00,0xcf,0x06,0x00,0xff,0x00,0xd1,0x07,0xcf,0x06,0x07,0xff,0x00,0xd0,0x07,0xcf,
+ 0x06,0x07,0xff,0x00,0xcf,0x86,0x55,0x05,0x07,0xff,0x00,0x14,0x05,0x07,0xff,0x00,
+ 0x00,0xff,0x00,0xcf,0x06,0x00,0xff,0x00,0xcf,0x06,0x00,0xff,0x00,0xcf,0x06,0x00,
+ 0xff,0x00,0xcf,0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,
+ 0xcf,0x06,0x00,0x00,0xd2,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xd1,0x08,0xcf,0x86,
+ 0xcf,0x06,0x00,0x00,0xd0,0x08,0xcf,0x86,0xcf,0x06,0x00,0x00,0xcf,0x86,0xd5,0x06,
+ 0xcf,0x06,0x00,0x00,0xd4,0x06,0xcf,0x06,0x00,0x00,0xd3,0x06,0xcf,0x06,0x00,0x00,
+ 0xd2,0x06,0xcf,0x06,0x00,0x00,0xd1,0x06,0xcf,0x06,0x00,0x00,0xd0,0x06,0xcf,0x06,
+ 0x00,0x00,0xcf,0x86,0x55,0x04,0x00,0x00,0x54,0x04,0x00,0x00,0x53,0x04,0x00,0x00,
+ 0x52,0x04,0x00,0x00,0x11,0x04,0x00,0x00,0x02,0x00,0xcf,0x86,0xcf,0x06,0x02,0x00,
+ 0x81,0x80,0xcf,0x86,0x85,0x84,0xcf,0x86,0xcf,0x06,0x02,0x00,0x00,0x00,0x00,0x00
+};
diff --git a/lib/ext2fs/utf8n.h b/lib/ext2fs/utf8n.h
new file mode 100644
index 0000000..c214f58
--- /dev/null
+++ b/lib/ext2fs/utf8n.h
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2014 SGI.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+/* This code is copied from the linux kernel. We have a userspace
+ * version here to such that hashes will match that implementation.
+ */
+
+#ifndef UTF8NORM_H
+#define UTF8NORM_H
+
+#include <stdint.h>
+#include <unistd.h>
+#include <string.h>
+
+/* Encoding a unicode version number as a single unsigned int. */
+#define UNICODE_MAJ_SHIFT (16)
+#define UNICODE_MIN_SHIFT (8)
+
+#define UNICODE_AGE(MAJ, MIN, REV) \
+ (((unsigned int)(MAJ) << UNICODE_MAJ_SHIFT) | \
+ ((unsigned int)(MIN) << UNICODE_MIN_SHIFT) | \
+ ((unsigned int)(REV)))
+
+/* Highest unicode version supported by the data tables. */
+extern int utf8version_is_supported(uint8_t maj, uint8_t min, uint8_t rev);
+extern int utf8version_latest(void);
+
+/*
+ * Look for the correct const struct utf8data for a unicode version.
+ * Returns NULL if the version requested is too new.
+ *
+ * Two normalization forms are supported: nfdi and nfdicf.
+ *
+ * nfdi:
+ * - Apply unicode normalization form NFD.
+ * - Remove any Default_Ignorable_Code_Point.
+ *
+ * nfdicf:
+ * - Apply unicode normalization form NFD.
+ * - Remove any Default_Ignorable_Code_Point.
+ * - Apply a full casefold (C + F).
+ */
+extern const struct utf8data *utf8nfdi(unsigned int maxage);
+extern const struct utf8data *utf8nfdicf(unsigned int maxage);
+
+/*
+ * Determine the maximum age of any unicode character in the string.
+ * Returns 0 if only unassigned code points are present.
+ * Returns -1 if the input is not valid UTF-8.
+ */
+extern int utf8agemax(const struct utf8data *data, const char *s);
+extern int utf8nagemax(const struct utf8data *data, const char *s, size_t len);
+
+/*
+ * Determine the minimum age of any unicode character in the string.
+ * Returns 0 if any unassigned code points are present.
+ * Returns -1 if the input is not valid UTF-8.
+ */
+extern int utf8agemin(const struct utf8data *data, const char *s);
+extern int utf8nagemin(const struct utf8data *data, const char *s, size_t len);
+
+/*
+ * Determine the length of the normalized from of the string,
+ * excluding any terminating NULL byte.
+ * Returns 0 if only ignorable code points are present.
+ * Returns -1 if the input is not valid UTF-8.
+ */
+extern ssize_t utf8len(const struct utf8data *data, const char *s);
+extern ssize_t utf8nlen(const struct utf8data *data, const char *s, size_t len);
+
+/* Needed in struct utf8cursor below. */
+#define UTF8HANGULLEAF (12)
+
+/*
+ * Cursor structure used by the normalizer.
+ */
+struct utf8cursor {
+ const struct utf8data *data;
+ const char *s;
+ const char *p;
+ const char *ss;
+ const char *sp;
+ unsigned int len;
+ unsigned int slen;
+ short int ccc;
+ short int nccc;
+ unsigned char hangul[UTF8HANGULLEAF];
+};
+
+/*
+ * Initialize a utf8cursor to normalize a string.
+ * Returns 0 on success.
+ * Returns -1 on failure.
+ */
+extern int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
+ const char *s);
+extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
+ const char *s, size_t len);
+
+/*
+ * Get the next byte in the normalization.
+ * Returns a value > 0 && < 256 on success.
+ * Returns 0 when the end of the normalization is reached.
+ * Returns -1 if the string being normalized is not valid UTF-8.
+ */
+extern int utf8byte(struct utf8cursor *u8c);
+
+#endif /* UTF8NORM_H */
diff --git a/lib/ext2fs/valid_blk.c b/lib/ext2fs/valid_blk.c
new file mode 100644
index 0000000..db5d90a
--- /dev/null
+++ b/lib/ext2fs/valid_blk.c
@@ -0,0 +1,68 @@
+/*
+ * valid_blk.c --- does the inode have valid blocks?
+ *
+ * Copyright 1997 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * This function returns 1 if the inode's block entries actually
+ * contain block entries.
+ */
+int ext2fs_inode_has_valid_blocks2(ext2_filsys fs, struct ext2_inode *inode)
+{
+ /*
+ * Only directories, regular files, and some symbolic links
+ * have valid block entries.
+ */
+ if (!LINUX_S_ISDIR(inode->i_mode) && !LINUX_S_ISREG(inode->i_mode) &&
+ !LINUX_S_ISLNK(inode->i_mode))
+ return 0;
+
+ /*
+ * If the symbolic link is a "fast symlink", then the symlink
+ * target is stored in the block entries.
+ */
+ if (LINUX_S_ISLNK (inode->i_mode)) {
+ if (ext2fs_file_acl_block(fs, inode) == 0) {
+ /* With no EA block, we can rely on i_blocks */
+ if (inode->i_blocks == 0)
+ return 0;
+ } else {
+ /* With an EA block, life gets more tricky */
+ if (inode->i_size >= EXT2_N_BLOCKS*4)
+ return 1; /* definitely using i_block[] */
+ if (inode->i_size > 4 && inode->i_block[1] == 0)
+ return 1; /* definitely using i_block[] */
+ return 0; /* Probably a fast symlink */
+ }
+ }
+
+ /*
+ * If this inode has inline data, it shouldn't have valid block
+ * entries.
+ */
+ if (inode->i_flags & EXT4_INLINE_DATA_FL)
+ return 0;
+ return 1;
+}
+
+int ext2fs_inode_has_valid_blocks(struct ext2_inode *inode)
+{
+ return ext2fs_inode_has_valid_blocks2(NULL, inode);
+}
diff --git a/lib/ext2fs/version.c b/lib/ext2fs/version.c
new file mode 100644
index 0000000..f8c8acf
--- /dev/null
+++ b/lib/ext2fs/version.c
@@ -0,0 +1,57 @@
+/*
+ * version.c --- Return the version of the ext2 library
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#include "../../version.h"
+
+static const char *lib_version = E2FSPROGS_VERSION;
+static const char *lib_date = E2FSPROGS_DATE;
+
+int ext2fs_parse_version_string(const char *ver_string)
+{
+ const char *cp;
+ int version = 0, dot_count = 0;
+
+ for (cp = ver_string; *cp; cp++) {
+ if (*cp == '.') {
+ if (dot_count++)
+ break;
+ else
+ continue;
+ }
+ if (!isdigit(*cp))
+ break;
+ version = (version * 10) + (*cp - '0');
+ }
+ return version;
+}
+
+
+int ext2fs_get_library_version(const char **ver_string,
+ const char **date_string)
+{
+ if (ver_string)
+ *ver_string = lib_version;
+ if (date_string)
+ *date_string = lib_date;
+
+ return ext2fs_parse_version_string(lib_version);
+}
diff --git a/lib/ext2fs/windows_io.c b/lib/ext2fs/windows_io.c
new file mode 100644
index 0000000..83aea68
--- /dev/null
+++ b/lib/ext2fs/windows_io.c
@@ -0,0 +1,1031 @@
+/*
+ * windows_io.c --- This is the Windows implementation of the I/O manager.
+ *
+ * Implements a one-block write-through cache.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ * 2002 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include <windows.h>
+#include <winioctl.h>
+#include <io.h>
+
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+#define _XOPEN_SOURCE 600
+#define _DARWIN_C_SOURCE
+#define _FILE_OFFSET_BITS 64
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#define PR_GET_DUMPABLE 3
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <fcntl.h>
+
+#undef ALIGN_DEBUG
+
+//#define DEBUG
+#ifdef DEBUG
+#define TRACE(...) {\
+ char __log[256];\
+ snprintf(__log, sizeof(__log), __VA_ARGS__);\
+ __log[sizeof(__log)-1] = 0;\
+ OutputDebugString(__log);\
+ }
+#else
+#define TRACE(...) do { } while (0);
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "ext2fsP.h"
+
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+#define EXT2_CHECK_MAGIC_RETURN(struct, code, ret) \
+ if ((struct)->magic != (code)) return (ret)
+
+#define EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL 0x10ed
+
+struct windows_cache {
+ char *buf;
+ unsigned long long block;
+ int access_time;
+ unsigned dirty:1;
+ unsigned in_use:1;
+};
+
+#define CACHE_SIZE 8
+#define WRITE_DIRECT_SIZE 4 /* Must be smaller than CACHE_SIZE */
+#define READ_DIRECT_SIZE 4 /* Should be smaller than CACHE_SIZE */
+
+struct windows_private_data {
+ int magic;
+ char name[MAX_PATH];
+ HANDLE handle;
+ char dos_device[MAX_PATH];
+ char cf_device[MAX_PATH];
+ int dev;
+ int flags;
+ int align;
+ int access_time;
+ ext2_loff_t offset;
+ struct windows_cache cache[CACHE_SIZE];
+ void *bounce;
+ struct struct_io_stats io_stats;
+};
+
+#define IS_ALIGNED(n, align) ((((uintptr_t) n) & \
+ ((uintptr_t) ((align)-1))) == 0)
+
+static int fake_dos_name_for_device(struct windows_private_data *data)
+{
+ if (strncmp(data->name, "\\\\", 2) == 0) {
+ data->dos_device[0] = 0;
+ strcpy(data->cf_device, data->name);
+ return 0;
+ }
+
+ _snprintf(data->dos_device, MAX_PATH, "fakedevice%lu", GetCurrentProcessId());
+
+ if (!DefineDosDevice(DDD_RAW_TARGET_PATH, data->dos_device, data->name))
+ return 1;
+
+ _snprintf(data->cf_device, MAX_PATH, "\\\\.\\%s", data->dos_device);
+ TRACE("e2fsprogs::fake_dos_name_for_device::DefineDosDevice(\"%s\")", data->dos_device);
+
+ return 0;
+}
+
+static void remove_fake_dos_name(struct windows_private_data *data)
+{
+ if (*data->dos_device) {
+ TRACE("e2fsprogs::remove_fake_dos_name::DefineDosDevice(\"%s\")", data->dos_device);
+ DefineDosDevice(DDD_RAW_TARGET_PATH | DDD_EXACT_MATCH_ON_REMOVE | DDD_REMOVE_DEFINITION, data->dos_device, data->name);
+ }
+}
+
+static errcode_t windows_get_stats(io_channel channel, io_stats *stats)
+{
+ errcode_t retval = 0;
+
+ struct windows_private_data *data;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+ if (stats)
+ *stats = &data->io_stats;
+
+ return retval;
+}
+
+/*
+ * Here are the raw I/O functions
+ */
+static errcode_t raw_read_blk(io_channel channel,
+ struct windows_private_data *data,
+ unsigned long long block,
+ int count, void *bufv)
+{
+ errcode_t retval;
+ ssize_t size;
+ ext2_loff_t location;
+ DWORD actual = 0;
+ unsigned char *buf = bufv;
+ ssize_t really_read = 0;
+
+ size = (count < 0) ? -count : count * channel->block_size;
+ data->io_stats.bytes_read += size;
+ location = ((ext2_loff_t) block * channel->block_size) + data->offset;
+
+ if (data->flags & IO_FLAG_FORCE_BOUNCE) {
+ if (SetFilePointer(data->handle, location, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ goto bounce_read;
+ }
+
+ if (SetFilePointer(data->handle, location, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ if ((channel->align == 0) || (IS_ALIGNED(buf, channel->align) && IS_ALIGNED(size, channel->align))) {
+ if (!ReadFile(data->handle, buf, size, &actual, NULL)) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ if (actual != size) {
+ short_read:
+ if (actual < 0) {
+ retval = GetLastError();
+ actual = 0;
+ } else
+ retval = EXT2_ET_SHORT_READ;
+ goto error_out;
+ }
+ return 0;
+ }
+
+ /*
+ * The buffer or size which we're trying to read isn't aligned
+ * to the O_DIRECT rules, so we need to do this the hard way...
+ */
+bounce_read:
+ while (size > 0) {
+ if (!ReadFile(data->handle, data->bounce, channel->block_size, &actual, NULL)) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ if (actual != channel->block_size) {
+ actual = really_read;
+ buf -= really_read;
+ size += really_read;
+ goto short_read;
+ }
+ actual = size;
+ if (size > channel->block_size)
+ actual = channel->block_size;
+ memcpy(buf, data->bounce, actual);
+ really_read += actual;
+ size -= actual;
+ buf += actual;
+ }
+ return 0;
+
+error_out:
+ if (actual >= 0 && actual < size)
+ memset((char *) buf+actual, 0, size-actual);
+ if (channel->read_error)
+ retval = (channel->read_error)(channel, block, count, buf,
+ size, actual, retval);
+ return retval;
+}
+
+static errcode_t raw_write_blk(io_channel channel,
+ struct windows_private_data *data,
+ unsigned long long block,
+ int count, const void *bufv)
+{
+ ssize_t size;
+ ext2_loff_t location;
+ DWORD actual = 0;
+ errcode_t retval;
+ const unsigned char *buf = bufv;
+
+ if (count == 1)
+ size = channel->block_size;
+ else {
+ if (count < 0)
+ size = -count;
+ else
+ size = count * channel->block_size;
+ }
+ data->io_stats.bytes_written += size;
+
+ location = ((ext2_loff_t) block * channel->block_size) + data->offset;
+
+ if (data->flags & IO_FLAG_FORCE_BOUNCE) {
+ if (SetFilePointer(data->handle, location, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ goto bounce_write;
+ }
+
+ if (SetFilePointer(data->handle, location, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) {
+ retval = GetLastError();
+ goto error_out;
+ }
+
+ SetLastError(0);
+
+ if ((channel->align == 0) || (IS_ALIGNED(buf, channel->align) && IS_ALIGNED(size, channel->align))) {
+ if (!WriteFile(data->handle, buf, size, &actual, NULL)) {
+ retval = GetLastError();
+ goto error_out;
+ }
+
+ if (actual != size) {
+ short_write:
+ retval = EXT2_ET_SHORT_WRITE;
+ goto error_out;
+ }
+ return 0;
+ }
+
+ /*
+ * The buffer or size which we're trying to write isn't aligned
+ * to the O_DIRECT rules, so we need to do this the hard way...
+ */
+bounce_write:
+ while (size > 0) {
+ if (size < channel->block_size) {
+ if (!ReadFile(data->handle, data->bounce, channel->block_size, &actual, NULL)) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ if (actual != channel->block_size) {
+ if (actual < 0) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ memset((char *) data->bounce + actual, 0,
+ channel->block_size - actual);
+ }
+ }
+ actual = size;
+ if (size > channel->block_size)
+ actual = channel->block_size;
+ memcpy(data->bounce, buf, actual);
+ if (SetFilePointer(data->handle, location, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) {
+ retval = GetLastError();
+ goto error_out;
+ }
+ if (!WriteFile(data->handle, data->bounce, channel->block_size, &actual, NULL)) {
+ retval = GetLastError();
+ goto error_out;
+ }
+
+ if (actual != channel->block_size)
+ goto short_write;
+ size -= actual;
+ buf += actual;
+ location += actual;
+ }
+ return 0;
+
+error_out:
+ if (channel->write_error)
+ retval = (channel->write_error)(channel, block, count, buf,
+ size, actual, retval);
+ return retval;
+}
+
+
+/*
+ * Here we implement the cache functions
+ */
+
+/* Allocate the cache buffers */
+static errcode_t alloc_cache(io_channel channel,
+ struct windows_private_data *data)
+{
+ errcode_t retval;
+ struct windows_cache *cache;
+ int i;
+
+ data->access_time = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ cache->block = 0;
+ cache->access_time = 0;
+ cache->dirty = 0;
+ cache->in_use = 0;
+ if (cache->buf)
+ ext2fs_free_mem(&cache->buf);
+ retval = io_channel_alloc_buf(channel, 0, &cache->buf);
+ if (retval)
+ return retval;
+ }
+ if (channel->align || data->flags & IO_FLAG_FORCE_BOUNCE) {
+ if (data->bounce)
+ ext2fs_free_mem(&data->bounce);
+ retval = io_channel_alloc_buf(channel, 0, &data->bounce);
+ }
+ return retval;
+}
+
+/* Free the cache buffers */
+static void free_cache(struct windows_private_data *data)
+{
+ struct windows_cache *cache;
+ int i;
+
+ data->access_time = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ cache->block = 0;
+ cache->access_time = 0;
+ cache->dirty = 0;
+ cache->in_use = 0;
+ if (cache->buf)
+ ext2fs_free_mem(&cache->buf);
+ }
+ if (data->bounce)
+ ext2fs_free_mem(&data->bounce);
+}
+
+#ifndef NO_IO_CACHE
+/*
+ * Try to find a block in the cache. If the block is not found, and
+ * eldest is a non-zero pointer, then fill in eldest with the cache
+ * entry to that should be reused.
+ */
+static struct windows_cache *find_cached_block(struct windows_private_data *data,
+ unsigned long long block,
+ struct windows_cache **eldest)
+{
+ struct windows_cache *cache, *unused_cache, *oldest_cache;
+ int i;
+
+ unused_cache = oldest_cache = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ if (!cache->in_use) {
+ if (!unused_cache)
+ unused_cache = cache;
+ continue;
+ }
+ if (cache->block == block) {
+ cache->access_time = ++data->access_time;
+ return cache;
+ }
+ if (!oldest_cache ||
+ (cache->access_time < oldest_cache->access_time))
+ oldest_cache = cache;
+ }
+ if (eldest)
+ *eldest = (unused_cache) ? unused_cache : oldest_cache;
+ return 0;
+}
+
+/*
+ * Reuse a particular cache entry for another block.
+ */
+static void reuse_cache(io_channel channel, struct windows_private_data *data,
+ struct windows_cache *cache, unsigned long long block)
+{
+ if (cache->dirty && cache->in_use)
+ raw_write_blk(channel, data, cache->block, 1, cache->buf);
+
+ cache->in_use = 1;
+ cache->dirty = 0;
+ cache->block = block;
+ cache->access_time = ++data->access_time;
+}
+
+/*
+ * Flush all of the blocks in the cache
+ */
+static errcode_t flush_cached_blocks(io_channel channel,
+ struct windows_private_data *data,
+ int invalidate)
+{
+ struct windows_cache *cache;
+ errcode_t retval, retval2;
+ int i;
+
+ retval2 = 0;
+ for (i=0, cache = data->cache; i < CACHE_SIZE; i++, cache++) {
+ if (!cache->in_use)
+ continue;
+
+ if (invalidate)
+ cache->in_use = 0;
+
+ if (!cache->dirty)
+ continue;
+
+ retval = raw_write_blk(channel, data,
+ cache->block, 1, cache->buf);
+ if (retval)
+ retval2 = retval;
+ else
+ cache->dirty = 0;
+ }
+ return retval2;
+}
+#endif /* NO_IO_CACHE */
+
+static errcode_t windows_open_channel(struct windows_private_data *data,
+ int flags, io_channel *channel,
+ io_manager io_mgr)
+{
+ io_channel io = NULL;
+ errcode_t retval;
+ ext2fs_struct_stat st;
+
+ retval = ext2fs_get_mem(sizeof(struct struct_io_channel), &io);
+ if (retval)
+ goto cleanup;
+ memset(io, 0, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+
+ io->manager = io_mgr;
+ retval = ext2fs_get_mem(strlen(data->name)+1, &io->name);
+ if (retval)
+ goto cleanup;
+
+ strcpy(io->name, data->name);
+ io->private_data = data;
+ io->block_size = 1024;
+ io->read_error = 0;
+ io->write_error = 0;
+ io->refcount = 1;
+
+#if defined(O_DIRECT)
+ if (flags & IO_FLAG_DIRECT_IO)
+ io->align = ext2fs_get_dio_alignment(data->dev);
+#endif
+
+ /*
+ * If the device is really a block device, then set the
+ * appropriate flag, otherwise we can set DISCARD_ZEROES flag
+ * because we are going to use punch hole instead of discard
+ * and if it succeed, subsequent read from sparse area returns
+ * zero.
+ */
+ if (ext2fs_fstat(data->dev, &st) == 0) {
+ if (ext2fsP_is_disk_device(st.st_mode))
+ io->flags |= CHANNEL_FLAGS_BLOCK_DEVICE;
+ else
+ io->flags |= CHANNEL_FLAGS_DISCARD_ZEROES;
+ }
+
+ if ((retval = alloc_cache(io, data)))
+ goto cleanup;
+
+#ifdef BLKROGET
+ if (flags & IO_FLAG_RW) {
+ int error;
+ int readonly = 0;
+
+ /* Is the block device actually writable? */
+ error = ioctl(data->dev, BLKROGET, &readonly);
+ if (!error && readonly) {
+ retval = EPERM;
+ goto cleanup;
+ }
+ }
+#endif
+
+ *channel = io;
+ return 0;
+
+cleanup:
+ if (data) {
+ if (data->dev >= 0)
+ close(data->dev);
+ free_cache(data);
+ ext2fs_free_mem(&data);
+ }
+ if (io) {
+ if (io->name) {
+ ext2fs_free_mem(&io->name);
+ }
+ ext2fs_free_mem(&io);
+ }
+ return retval;
+}
+
+static DWORD windows_open_device(struct windows_private_data *data, int open_flags)
+{
+ DWORD ret = 0;
+
+ if (*data->name != '\\')
+ strcpy(data->cf_device, data->name);
+ else if (fake_dos_name_for_device(data))
+ return -1;
+
+ DWORD desired_access = GENERIC_READ | ((open_flags & O_RDWR) ? GENERIC_WRITE : 0);
+ DWORD share_mode = (open_flags & O_EXCL) ? 0 : FILE_SHARE_READ | ((open_flags & O_RDWR) ? FILE_SHARE_WRITE : 0);
+ DWORD flags_and_attributes =
+#if defined(O_DIRECT)
+ (open_flags & O_DIRECT) ? (FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH) : FILE_ATTRIBUTE_NORMAL;
+#else
+ FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH;
+#endif
+
+ data->handle = CreateFile(data->cf_device, desired_access, share_mode, NULL, OPEN_EXISTING,
+ flags_and_attributes, NULL);
+
+ if (data->handle == INVALID_HANDLE_VALUE) {
+ ret = GetLastError();
+ goto invalid_handle;
+ }
+
+ TRACE("e2fsprogs::windows_open_device::CreateFile(\"%s\") = %p", data->cf_device, data->handle);
+
+ data->dev = _open_osfhandle((intptr_t)data->handle, 0);
+ if (data->dev < 0) {
+ ret = GetLastError() ? GetLastError() : 9999;
+ goto osfhandle_error;
+ }
+
+ TRACE("e2fsprogs::windows_open_device::_open_osfhandle(%p) = %d", data->handle, data->dev);
+
+ return 0;
+
+osfhandle_error:
+ TRACE("e2fsprogs::windows_open_device::CloseHandle(%p)", data->handle);
+ CloseHandle(data->handle);
+invalid_handle:
+ remove_fake_dos_name(data);
+ TRACE("e2fsprogs::windows_open_device() = %lu, errno = %d", ret, errno);
+ return ret;
+}
+
+static struct windows_private_data *init_private_data(const char *name, int flags)
+{
+ struct windows_private_data *data = NULL;
+
+ if (ext2fs_get_mem(sizeof(struct windows_private_data), &data))
+ return NULL;
+
+ memset(data, 0, sizeof(struct windows_private_data));
+ strncpy(data->name, name, sizeof(data->name) - 1);
+ data->magic = EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL;
+ data->io_stats.num_fields = 2;
+ data->flags = flags;
+ data->handle = INVALID_HANDLE_VALUE;
+
+ return data;
+}
+
+static errcode_t windows_open(const char *name, int flags, io_channel *channel)
+{
+ int open_flags;
+ struct windows_private_data *data;
+
+ if (name == 0)
+ return EXT2_ET_BAD_DEVICE_NAME;
+
+ data = init_private_data(name, flags);
+ if (!data)
+ return EXT2_ET_NO_MEMORY;
+
+ open_flags = (flags & IO_FLAG_RW) ? O_RDWR : O_RDONLY;
+ if (flags & IO_FLAG_EXCLUSIVE)
+ open_flags |= O_EXCL;
+#if defined(O_DIRECT)
+ if (flags & IO_FLAG_DIRECT_IO)
+ open_flags |= O_DIRECT;
+#endif
+
+ if (windows_open_device(data, open_flags)) {
+ ext2fs_free_mem(&data);
+ return EXT2_ET_BAD_DEVICE_NAME;
+ }
+
+ return windows_open_channel(data, flags, channel, windows_io_manager);
+}
+
+static errcode_t windows_close(io_channel channel)
+{
+ struct windows_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+ if (--channel->refcount > 0)
+ return 0;
+
+#ifndef NO_IO_CACHE
+ retval = flush_cached_blocks(channel, data, 0);
+#endif
+
+ remove_fake_dos_name(data);
+
+ if (_close(data->dev) != 0)
+ retval = errno;
+
+ TRACE("e2fsprogs::windows_close::_close(%d)", data->dev);
+
+ free_cache(data);
+
+ ext2fs_free_mem(&channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem(&channel->name);
+ ext2fs_free_mem(&channel);
+ return retval;
+}
+
+static errcode_t windows_set_blksize(io_channel channel, int blksize)
+{
+ struct windows_private_data *data;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+ if (channel->block_size != blksize) {
+#ifndef NO_IO_CACHE
+ if ((retval = flush_cached_blocks(channel, data, 0)))
+ return retval;
+#endif
+
+ channel->block_size = blksize;
+ free_cache(data);
+ if ((retval = alloc_cache(channel, data)))
+ return retval;
+ }
+ return 0;
+}
+
+static errcode_t windows_read_blk64(io_channel channel, unsigned long long block, int count, void *buf)
+{
+ struct windows_private_data *data;
+ struct windows_cache *cache, *reuse[READ_DIRECT_SIZE];
+ errcode_t retval;
+ char *cp;
+ int i, j;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+#ifdef NO_IO_CACHE
+ return raw_read_blk(channel, data, block, count, buf);
+#else
+ /*
+ * If we're doing an odd-sized read or a very large read,
+ * flush out the cache and then do a direct read.
+ */
+ if (count < 0 || count > WRITE_DIRECT_SIZE) {
+ if ((retval = flush_cached_blocks(channel, data, 0)))
+ return retval;
+ return raw_read_blk(channel, data, block, count, buf);
+ }
+
+ cp = buf;
+ while (count > 0) {
+ /* If it's in the cache, use it! */
+ if ((cache = find_cached_block(data, block, &reuse[0]))) {
+#ifdef DEBUG
+ printf("Using cached block %lu\n", block);
+#endif
+ memcpy(cp, cache->buf, channel->block_size);
+ count--;
+ block++;
+ cp += channel->block_size;
+ continue;
+ }
+ if (count == 1) {
+ /*
+ * Special case where we read directly into the
+ * cache buffer; important in the O_DIRECT case
+ */
+ cache = reuse[0];
+ reuse_cache(channel, data, cache, block);
+ if ((retval = raw_read_blk(channel, data, block, 1,
+ cache->buf))) {
+ cache->in_use = 0;
+ return retval;
+ }
+ memcpy(cp, cache->buf, channel->block_size);
+ return 0;
+ }
+
+ /*
+ * Find the number of uncached blocks so we can do a
+ * single read request
+ */
+ for (i=1; i < count; i++)
+ if (find_cached_block(data, block+i, &reuse[i]))
+ break;
+#ifdef DEBUG
+ printf("Reading %d blocks starting at %lu\n", i, block);
+#endif
+ if ((retval = raw_read_blk(channel, data, block, i, cp)))
+ return retval;
+
+ /* Save the results in the cache */
+ for (j=0; j < i; j++) {
+ count--;
+ cache = reuse[j];
+ reuse_cache(channel, data, cache, block++);
+ memcpy(cache->buf, cp, channel->block_size);
+ cp += channel->block_size;
+ }
+ }
+ return 0;
+#endif /* NO_IO_CACHE */
+}
+
+static errcode_t windows_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ return windows_read_blk64(channel, block, count, buf);
+}
+
+static errcode_t windows_write_blk64(io_channel channel,
+ unsigned long long block,
+ int count, const void *buf)
+{
+ struct windows_private_data *data;
+ struct windows_cache *cache, *reuse;
+ errcode_t retval = 0;
+ const char *cp;
+ int writethrough;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+#ifdef NO_IO_CACHE
+ return raw_write_blk(channel, data, block, count, buf);
+#else
+ /*
+ * If we're doing an odd-sized write or a very large write,
+ * flush out the cache completely and then do a direct write.
+ */
+ if (count < 0 || count > WRITE_DIRECT_SIZE) {
+ if ((retval = flush_cached_blocks(channel, data, 1)))
+ return retval;
+ return raw_write_blk(channel, data, block, count, buf);
+ }
+
+ /*
+ * For a moderate-sized multi-block write, first force a write
+ * if we're in write-through cache mode, and then fill the
+ * cache with the blocks.
+ */
+ writethrough = channel->flags & CHANNEL_FLAGS_WRITETHROUGH;
+ if (writethrough)
+ retval = raw_write_blk(channel, data, block, count, buf);
+
+ cp = buf;
+ while (count > 0) {
+ cache = find_cached_block(data, block, &reuse);
+ if (!cache) {
+ cache = reuse;
+ reuse_cache(channel, data, cache, block);
+ }
+ if (cache->buf != cp)
+ memcpy(cache->buf, cp, channel->block_size);
+ cache->dirty = !writethrough;
+ count--;
+ block++;
+ cp += channel->block_size;
+ }
+ return retval;
+#endif /* NO_IO_CACHE */
+}
+
+static errcode_t windows_cache_readahead(io_channel channel,
+ unsigned long long block,
+ unsigned long long count)
+{
+ return EXT2_ET_OP_NOT_SUPPORTED;
+}
+
+static errcode_t windows_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ return windows_write_blk64(channel, block, count, buf);
+}
+
+static errcode_t windows_write_byte(io_channel channel, unsigned long offset,
+ int size, const void *buf)
+{
+ return EXT2_ET_UNIMPLEMENTED;
+}
+
+HANDLE windows_get_handle(io_channel channel)
+{
+ struct windows_private_data *data;
+
+ EXT2_CHECK_MAGIC_RETURN(channel, EXT2_ET_MAGIC_IO_CHANNEL, INVALID_HANDLE_VALUE);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC_RETURN(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL, INVALID_HANDLE_VALUE);
+
+ return data->handle;
+}
+
+/*
+ * Flush data buffers to disk.
+ */
+static errcode_t windows_flush(io_channel channel)
+{
+ struct windows_private_data *data;
+ errcode_t retval = 0;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+#ifndef NO_IO_CACHE
+ retval = flush_cached_blocks(channel, data, 0);
+#endif
+
+ return retval;
+}
+
+static errcode_t windows_set_option(io_channel channel, const char *option,
+ const char *arg)
+{
+ struct windows_private_data *data;
+ unsigned long long tmp;
+ char *end;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+ if (!strcmp(option, "offset")) {
+ if (!arg)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ tmp = strtoull(arg, &end, 0);
+ if (*end)
+ return EXT2_ET_INVALID_ARGUMENT;
+ data->offset = tmp;
+ if (data->offset < 0)
+ return EXT2_ET_INVALID_ARGUMENT;
+ return 0;
+ }
+ return EXT2_ET_INVALID_ARGUMENT;
+}
+
+static errcode_t windows_discard(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ TRACE("e2fsprogs::windows_discard::EXT2_ET_UNIMPLEMENTED");
+ return EXT2_ET_UNIMPLEMENTED;
+}
+
+/* parameters might not be used if OS doesn't support zeroout */
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+static errcode_t windows_zeroout(io_channel channel, unsigned long long block,
+ unsigned long long count)
+{
+ struct windows_private_data *data;
+ int ret;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct windows_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_WINDOWS_IO_CHANNEL);
+
+ if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
+ /* Not implemented until the BLKZEROOUT mess is fixed */
+ goto unimplemented;
+ } else {
+ /* Regular file, try to use truncate/punch/zero. */
+ struct stat statbuf;
+
+ if (count == 0)
+ return 0;
+ /*
+ * If we're trying to zero a range past the end of the file,
+ * extend the file size, then truncate everything.
+ */
+ ret = fstat(data->dev, &statbuf);
+ if (ret)
+ goto err;
+ if ((unsigned long long) statbuf.st_size <
+ (block + count) * channel->block_size + data->offset) {
+ ret = ftruncate(data->dev,
+ (block + count) * channel->block_size + data->offset);
+ if (ret)
+ goto err;
+ }
+ goto unimplemented;
+ }
+err:
+ if (ret < 0) {
+ if (errno == EOPNOTSUPP)
+ goto unimplemented;
+ return errno;
+ }
+ return 0;
+unimplemented:
+ return EXT2_ET_UNIMPLEMENTED;
+}
+
+int ext2fs_open_file(const char *pathname, int flags, mode_t mode)
+{
+ flags |= O_BINARY;
+
+ if (mode)
+#if defined(HAVE_OPEN64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ return open64(pathname, flags, mode);
+ else
+ return open64(pathname, flags);
+#else
+ return open(pathname, flags, mode);
+ else
+ return open(pathname, flags);
+#endif
+}
+
+int ext2fs_stat(const char *path, ext2fs_struct_stat *buf)
+{
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ return stat64(path, buf);
+#else
+ return stat(path, buf);
+#endif
+}
+
+int ext2fs_fstat(int fd, ext2fs_struct_stat *buf)
+{
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ return fstat64(fd, buf);
+#else
+ return fstat(fd, buf);
+#endif
+}
+
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+
+static struct struct_io_manager struct_windows_manager = {
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "Windows I/O Manager",
+ .open = windows_open,
+ .close = windows_close,
+ .set_blksize = windows_set_blksize,
+ .read_blk = windows_read_blk,
+ .write_blk = windows_write_blk,
+ .flush = windows_flush,
+ .write_byte = windows_write_byte,
+ .set_option = windows_set_option,
+ .get_stats = windows_get_stats,
+ .read_blk64 = windows_read_blk64,
+ .write_blk64 = windows_write_blk64,
+ .discard = windows_discard,
+ .cache_readahead = windows_cache_readahead,
+ .zeroout = windows_zeroout,
+};
+
+io_manager windows_io_manager = &struct_windows_manager;
diff --git a/lib/ext2fs/write_bb_file.c b/lib/ext2fs/write_bb_file.c
new file mode 100644
index 0000000..5834340
--- /dev/null
+++ b/lib/ext2fs/write_bb_file.c
@@ -0,0 +1,35 @@
+/*
+ * write_bb_file.c --- write a list of bad blocks to a FILE *
+ *
+ * Copyright (C) 1994, 1995 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+errcode_t ext2fs_write_bb_FILE(ext2_badblocks_list bb_list,
+ unsigned int flags EXT2FS_ATTR((unused)),
+ FILE *f)
+{
+ badblocks_iterate bb_iter;
+ blk_t blk;
+ errcode_t retval;
+
+ retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
+ if (retval)
+ return retval;
+
+ while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) {
+ fprintf(f, "%u\n", blk);
+ }
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+ return 0;
+}
diff --git a/lib/fpopen.c b/lib/fpopen.c
new file mode 100644
index 0000000..60af208
--- /dev/null
+++ b/lib/fpopen.c
@@ -0,0 +1,116 @@
+/*
+ * fpopen.c --- unlike the libc popen, it directly executes the
+ * command instead of call out to the shell.
+ *
+ * Copyright Theodore Ts'o, 1996-1999.
+ *
+ * Permission to use this file is granted for any purposes, as long as
+ * this copyright statement is kept intact and the author is not held
+ * liable for any damages resulting from the use of this program.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE.
+ */
+
+#include "config.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+
+#define MAX_ARGV 256
+
+extern FILE *fpopen(const char *cmd, const char *mode);
+
+FILE *fpopen(const char *cmd, const char *mode)
+{
+ char *argv[MAX_ARGV];
+ int i = 0;
+ char *buf, *prog = 0;
+ char *p;
+ int do_stdin, do_stderr = 0;
+ int fds[2];
+ pid_t pid;
+
+ if (!mode) {
+ errno = EFAULT;
+ return NULL;
+ }
+
+ switch (*mode) {
+ case 'r':
+ do_stdin = 0;
+ break;
+ case 'w':
+ do_stdin = 1;
+ break;
+ default:
+ errno = EINVAL;
+ return NULL;
+ }
+ switch (*(mode+1)) {
+ case '&':
+ do_stderr = 1;
+ }
+
+ /*
+ * Create the argv vector....
+ */
+ buf = malloc(strlen(cmd)+1);
+ if (!buf)
+ return NULL;
+ strcpy(buf, cmd);
+ p = buf;
+ while (p && *p) {
+ if (isspace(*p)) {
+ p++;
+ continue;
+ }
+ if (i == 0)
+ prog = p;
+ argv[i++] = p;
+ p = strchr(p, ' ');
+ if (p)
+ *p++ = 0;
+ }
+
+ argv[i] = 0;
+
+ /*
+ * Get the pipe
+ */
+ if (pipe(fds) < 0)
+ return NULL;
+
+ /* Fork and execute the correct program. */
+ if ((pid = fork()) < 0) {
+ perror("fork");
+ return NULL;
+ } else if (pid == 0) {
+ if (do_stdin) {
+ close(fds[1]);
+ dup2(fds[0], 0);
+ } else {
+ close(fds[0]);
+ dup2(fds[1], 1);
+ if (do_stderr)
+ dup2(fds[1], 2);
+ }
+ (void) execvp(prog, argv);
+ perror(prog);
+ exit(1);
+ }
+ return fdopen(do_stdin ? fds[1] : fds[0], mode);
+}
+
diff --git a/lib/ss/Android.bp b/lib/ss/Android.bp
new file mode 100644
index 0000000..ebc1e1a
--- /dev/null
+++ b/lib/ss/Android.bp
@@ -0,0 +1,39 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-0BSD
+ // SPDX-license-identifier-MIT
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library {
+ name: "libext2_ss",
+ host_supported: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "ss_err.c",
+ "std_rqs.c",
+ "invocation.c",
+ "help.c",
+ "execute_cmd.c",
+ "listen.c",
+ "parse.c",
+ "error.c",
+ "prompt.c",
+ "request_tbl.c",
+ "list_rqs.c",
+ "pager.c",
+ "requests.c",
+ "data.c",
+ "get_readline.c",
+ ],
+ shared_libs: ["libext2_com_err"],
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+}
diff --git a/lib/ss/Makefile.in b/lib/ss/Makefile.in
new file mode 100644
index 0000000..bb50418
--- /dev/null
+++ b/lib/ss/Makefile.in
@@ -0,0 +1,234 @@
+#
+# Makefile for lib/ss
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/ss
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+DLOPEN_LIB = @DLOPEN_LIB@
+
+@MCONFIG@
+
+LIBRARY= libss
+LIBDIR= ss
+
+ELF_VERSION = 2.0
+ELF_SO_VERSION = 2
+ELF_IMAGE = libss
+ELF_MYDIR = ss
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS = -lcom_err $(DLOPEN_LIB)
+
+BSDLIB_VERSION = 1.0
+BSDLIB_IMAGE = libss
+BSDLIB_MYDIR = ss
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+TAGS=etags
+MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir) ./mk_cmds
+COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $<
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -DSHARED_ELF_LIB -fPIC -shared -o elfshared/$*.o -c $<
+@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+# for the library
+
+# with ss_err.o first, ss_err.h should get rebuilt first too. should not
+# be relying on this, though.
+OBJS= ss_err.o \
+ std_rqs.o \
+ invocation.o help.o \
+ execute_cmd.o listen.o parse.o error.o prompt.o \
+ request_tbl.o list_rqs.o pager.o requests.o \
+ data.o get_readline.o
+
+SRCS= $(srcdir)/invocation.c $(srcdir)/help.c \
+ $(srcdir)/execute_cmd.c $(srcdir)/listen.c $(srcdir)/parse.c \
+ $(srcdir)/error.c $(srcdir)/prompt.c $(srcdir)/request_tbl.c \
+ $(srcdir)/list_rqs.c $(srcdir)/pager.c $(srcdir)/requests.c \
+ $(srcdir)/data.c $(srcdir)/get_readline.c
+
+all:: mk_cmds
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_ELF@
+@MAKEFILE_BSDLIB@
+@MAKEFILE_PROFILE@
+
+CODE= $(SRCS) $(MKCMDSFILES)
+
+MKCMDSOBJS= mk_cmds.o utils.o options.o ct.tab.o cmd_tbl.lex.o
+
+MKCMDSFILES= mk_cmds.c utils.c options.c ct.y cmd_tbl.lex.l
+
+MKCMDSCSRCS= mk_cmds.c utils.c options.c ct.tab.c cmd_tbl.lex.c
+
+
+HFILES= ss.h ss_internal.h
+SHARE_FILES= ct_c.awk ct_c.sed
+
+INSTALL_HFILES= ss.h
+
+# for 'tags' and dependencies
+
+CFILES= $(SRCS) $(MKCMDSCSRCS) test_ss.c
+
+# for building archives
+
+FILES= $(SRCS) $(MKCMDSFILES) $(HFILES) \
+ ss_err.et std_rqs.ct Makefile \
+ test_ss.c ss
+
+all:: libss.a ss.pc # libss_p.a lint
+
+std_rqs.c: std_rqs.ct mk_cmds
+ $(E) " MK_CMDS $@"
+ $(Q) DIR=$(srcdir) $(MK_CMDS) $(srcdir)/std_rqs.ct
+
+std_rqs.o: ss_err.h
+
+test_cmd.c: test_cmd.ct mk_cmds
+ $(E) " MK_CMDS $@"
+ $(Q) DIR=$(srcdir) $(MK_CMDS) $(srcdir)/test_cmd.ct
+
+ss_err.c ss_err.h: ss_err.et
+ $(E) " COMPILE_ET ss_err.et"
+ $(Q) $(COMPILE_ET) $(srcdir)/ss_err.et
+
+ct.tab.c ct.tab.h: ct.y
+ $(RM) -f ct.tab.* y.*
+ $(YACC) -d $(srcdir)/ct.y
+ $(MV) -f y.tab.c ct.tab.c
+ $(MV) -f y.tab.h ct.tab.h
+
+#libss.o: $(OBJS)
+# $(LD) -r -s -o $@ $(OBJS)
+# $(CHMOD) -x $@
+
+mk_cmds: $(DEP_SUBSTITUTE) $(srcdir)/mk_cmds.sh.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE) $(srcdir)/mk_cmds.sh.in mk_cmds
+ $(Q) $(CHMOD) +x mk_cmds
+
+ss.pc: $(srcdir)/ss.pc.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); CONFIG_FILES=lib/ss/ss.pc ./config.status
+
+installdirs::
+ $(E) " MKDIR_P $(libdir) $(includedir)/ss $(datadir)/ss $(bindir) $(pkgconfigdir) $(man1dir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss \
+ $(DESTDIR)$(bindir) $(DESTDIR)$(pkgconfigdir) \
+ $(DESTDIR)$(man1dir)
+
+install:: libss.a $(INSTALL_HFILES) installdirs ss_err.h mk_cmds ss.pc
+ $(E) " INSTALL_DATA $(DESTDIR)$(libdir)/libss.a"
+ $(Q) $(INSTALL_DATA) libss.a $(DESTDIR)$(libdir)/libss.a
+ -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libss.a
+ $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libss.a
+ $(Q) $(RM) -f $(DESTDIR)$(includedir)/ss/*
+ $(Q) for i in $(INSTALL_HFILES); do \
+ echo " INSTALL_DATA $(DESTDIR)$(includedir)/ss/$$i"; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ss/$$i; \
+ done
+ $(E) " INSTALL_DATA $(includedir)/ss/ss_err.h"
+ $(Q) $(INSTALL_DATA) ss_err.h $(DESTDIR)$(includedir)/ss/ss_err.h
+ $(Q) for i in $(SHARE_FILES); do \
+ echo " INSTALL_DATA $(DESTDIR)$(datadir)/ss/$$i"; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/ss/$$i; \
+ done
+ $(E) " INSTALL $(bindir)/mk_cmds"
+ $(Q) $(INSTALL) mk_cmds $(DESTDIR)$(bindir)/mk_cmds
+ $(E) " INSTALL_DATA $(man1dir)/mk_cmds.1"
+ $(Q) $(INSTALL_DATA) $(srcdir)/mk_cmds.1 $(DESTDIR)$(man1dir)/mk_cmds.1
+ $(E) " INSTALL_DATA $(pkgconfigdir)/ss.pc"
+ $(Q) $(INSTALL_DATA) ss.pc $(DESTDIR)$(pkgconfigdir)/ss.pc
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds \
+ $(DESTDIR)$(pkgconfigdir)/ss.pc \
+ $(DESTDIR)$(man1dir)/mk_cmds.1
+ $(RM) -rf $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss
+
+test_ss: test_ss.o test_cmd.o $(DEPLIBSS) $(DEPLIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o $@ test_ss.o test_cmd.o $(ALL_CFLAGS) $(ALL_LDFLAGS) \
+ $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS)
+
+fullcheck check:: all test_ss
+ $(E) " RUN TEST test_ss"
+ -@($(TESTENV) ./test_ss -f $(srcdir)/test_script > test_out 2>&1; exit 0)
+ $(Q) if diff test_out $(srcdir)/test_script_expected > test.diff; then \
+ true ; else echo "Regression test for ss library failed!"; exit 1 ; fi
+
+clean::
+ $(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c \
+ tst_cmds.c test_ss test_out test.diff *.o *~ \#* *.bak core \
+ test_cmd.c ss.pc
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile ss.pc \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+$(top_builddir)/lib/ss/ss_err.h: ss_err.h
+
+$(OBJS): subdirs
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+invocation.o: $(srcdir)/invocation.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+help.o: $(srcdir)/help.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+execute_cmd.o: $(srcdir)/execute_cmd.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+listen.o: $(srcdir)/listen.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+parse.o: $(srcdir)/parse.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+error.o: $(srcdir)/error.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ss_internal.h $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
+prompt.o: $(srcdir)/prompt.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+request_tbl.o: $(srcdir)/request_tbl.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+list_rqs.o: $(srcdir)/list_rqs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+pager.o: $(srcdir)/pager.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+requests.o: $(srcdir)/requests.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+data.o: $(srcdir)/data.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
+get_readline.o: $(srcdir)/get_readline.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
diff --git a/lib/ss/ct_c.awk b/lib/ss/ct_c.awk
new file mode 100644
index 0000000..a4424c8
--- /dev/null
+++ b/lib/ss/ct_c.awk
@@ -0,0 +1,75 @@
+/^command_table / {
+ cmdtbl = $2;
+ printf "/* %s.c - automatically generated from %s.ct */\n", \
+ rootname, rootname > outfile
+ print "#include <ss/ss.h>" > outfile
+ print "" >outfile
+}
+
+/^BOR$/ {
+ cmdnum++
+ options = 0
+ cmdtab = ""
+ printf "static char const * const ssu%05d[] = {\n", cmdnum > outfile
+}
+
+/^sub/ {
+ subr = substr($0, 6, length($0)-5)
+}
+
+/^hlp/ {
+ help = substr($0, 6, length($0)-5)
+}
+
+/^cmd/ {
+ cmd = substr($0, 6, length($0)-5)
+ printf "%s\"%s\",\n", cmdtab, cmd > outfile
+ cmdtab = " "
+}
+
+/^opt/ {
+ opt = substr($0, 6, length($0)-5)
+ if (opt == "dont_list") {
+ options += 1
+ }
+ if (opt == "dont_summarize") {
+ options += 2
+ }
+}
+
+/^EOR/ {
+ print " (char const *)0" > outfile
+ print "};" > outfile
+ printf "extern void %s __SS_PROTO;\n", subr > outfile
+ # Work around a bug in gawk 3.0.5
+ awk_bug = cmdnum
+ subr_tab[awk_bug] = subr
+ options_tab[awk_bug] = options
+ help_tab[awk_bug] = help
+}
+
+/^[0-9]/ {
+ linenum = $1;
+}
+
+/^ERROR/ {
+ error = substr($0, 8, length($0)-7)
+ printf "Error in line %d: %s\n", linenum, error
+ print "#__ERROR_IN_FILE__" > outfile
+}
+
+END {
+ printf "static ss_request_entry ssu%05d[] = {\n", cmdnum+1 > outfile
+ for (i=1; i <= cmdnum; i++) {
+ printf " { ssu%05d,\n", i > outfile
+ printf " %s,\n", subr_tab[i] > outfile
+ printf " \"%s\",\n", help_tab[i] > outfile
+ printf " %d },\n", options_tab[i] > outfile
+ }
+ print " { 0, 0, 0, 0 }" > outfile
+ print "};" > outfile
+ print "" > outfile
+ printf "ss_request_table %s = { 2, ssu%05d };\n", \
+ cmdtbl, cmdnum+1 > outfile
+}
+
diff --git a/lib/ss/ct_c.sed b/lib/ss/ct_c.sed
new file mode 100644
index 0000000..9e5eebb
--- /dev/null
+++ b/lib/ss/ct_c.sed
@@ -0,0 +1,160 @@
+#
+# This script parses a command_table file into something which is a bit
+# easier for an awk script to understand.
+#
+# Input syntax: a .ct file
+#
+# Output syntax:
+# (for the command_table line)
+# command_table <command_table>
+#
+#(for each request definition)
+# BOR
+# sub: <subroutine name>
+# hlp: <help text>
+# cmd: <command>
+# opt: <option>
+# EOR
+# (there may be more than one 'cmd' or 'opt' line
+#
+# A number sent to the output represents a parse error --- it will be
+# followed by the next line which will have the form:
+# ERROR: <error text>
+#
+# The design of this output syntax is such that it should be easy for
+# an awk script to parse.
+
+#
+# The first section of this script is just to canonicalize the file.
+# It removes comments, and puts each command_table request onto a single
+# line
+#
+:FIRST
+y/ / /
+s/^ *//
+s/#.*$//
+/; *$/!{
+N
+y/ / /
+s/\n */ /
+bFIRST
+}
+s/, */, /g
+#
+# Now we take care of some syntactic sugar.....
+#
+/^unimplemented/ {
+ s/^unimplemented [A-Za-z_0-9]*/request ss_unimplemented/
+ s/;/, (dont_list, dont_summarize);/
+}
+/^unknown/ {
+ s/^unknown /request ss_unknown, "", /
+}
+#
+# Dispatch based on the keyword.... illegal keywords are prefixed by ERROR:
+# and are handled by the awk script.
+#
+/^command_table /bCMD
+/^request /bREQUEST
+/^end;/bEND
+s/ .*//
+s/^/ERROR: unknown keyword: /
+=
+b
+#
+# Handle the command_table keyword
+#
+:CMD
+s/;$//
+p
+d
+b
+#
+# Handle the request keyword --- this is the heart of the sed script.
+#
+:REQUEST
+s/^request *//
+h
+i\
+BOR
+# First, parse out the subroutine name
+s/^/sub: /
+s/,.*//
+p
+# Next, parse out the help message, being careful to handle a quoted string
+g
+s/^[^,]*, *//
+h
+/^"/ {
+ s/^"//
+ s/".*//
+ x
+ s/^"[^"]*", *//
+ x
+ b EMITHLP
+}
+s/[^a-zA-Z0-9].*//
+x
+s/[a-zA-Z0-9]*, *//
+x
+:EMITHLP
+s/^/hlp: /
+p
+# Next take care of the command names
+:CMDLIST
+g
+/^(/b OPTIONS
+/^;/b EOR
+/^"/ {
+ s/^"//
+ s/".*//
+ x
+ s/^"[^"]*"//
+ s/, *//
+ x
+ b EMITREQ
+}
+s/[^A-Za-z_0-9].*//
+x
+s/[A-Za-z_0-9]*//
+s/, *//
+x
+:EMITREQ
+s/^/cmd: /
+p
+b CMDLIST
+#
+# Here we parse the list of options.
+#
+: OPTIONS
+g
+s/^(//
+h
+: OPTLIST
+/^)/ b EOR
+/^[^A-Za-z_0-9]/ {
+ =
+ c\
+ERROR: parse error in options list
+}
+s/[^A-Za-z_0-9].*//
+x
+s/[A-Za-z_0-9]*//
+s/, *//
+x
+s/^/opt: /
+p
+g
+b OPTLIST
+: EOR
+c\
+EOR\
+
+d
+b
+#
+# Handle the end keyword --- it's basically ignored.
+#
+:END
+d
+b
diff --git a/lib/ss/data.c b/lib/ss/data.c
new file mode 100644
index 0000000..e8245bd
--- /dev/null
+++ b/lib/ss/data.c
@@ -0,0 +1,20 @@
+/*
+ * Copyright 1987, 1988, 1989 Massachusetts Institute of Technology
+ * (Student Information Processing Board)
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include "ss_internal.h"
+
+ss_data **_ss_table = (ss_data **)NULL;
+char *_ss_pager_name = (char *)NULL;
diff --git a/lib/ss/error.c b/lib/ss/error.c
new file mode 100644
index 0000000..656b71b
--- /dev/null
+++ b/lib/ss/error.c
@@ -0,0 +1,77 @@
+/*
+ * Copyright 1987, 1988, 1989 by MIT Student Information Processing
+ * Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "et/com_err.h"
+#include "ss_internal.h"
+
+#include <stdarg.h>
+
+char *ss_name(int sci_idx)
+{
+ register char *ret_val;
+ register ss_data *infop;
+
+ infop = ss_info(sci_idx);
+ if (infop->current_request == (char const *)NULL) {
+ ret_val = malloc((unsigned)
+ (strlen(infop->subsystem_name)+1)
+ * sizeof(char));
+ if (ret_val == (char *)NULL)
+ return((char *)NULL);
+ strcpy(ret_val, infop->subsystem_name);
+ return(ret_val);
+ }
+ else {
+ register char *cp;
+ register char const *cp1;
+ ret_val = malloc((unsigned)sizeof(char) *
+ (strlen(infop->subsystem_name)+
+ strlen(infop->current_request)+
+ 4));
+ if (ret_val == (char *)NULL)
+ return ((char *)NULL);
+ cp = ret_val;
+ cp1 = infop->subsystem_name;
+ while (*cp1)
+ *cp++ = *cp1++;
+ *cp++ = ' ';
+ *cp++ = '(';
+ cp1 = infop->current_request;
+ while (*cp1)
+ *cp++ = *cp1++;
+ *cp++ = ')';
+ *cp = '\0';
+ return(ret_val);
+ }
+}
+
+void ss_error (int sci_idx, long code, const char * fmt, ...)
+{
+ register char *whoami;
+ va_list pvar;
+
+ va_start (pvar, fmt);
+ whoami = ss_name (sci_idx);
+ com_err_va (whoami, code, fmt, pvar);
+ free (whoami);
+ va_end(pvar);
+}
+
+void ss_perror(int sci_idx, long code, char const *msg) /* for compatibility */
+{
+ ss_error (sci_idx, code, "%s", msg);
+}
diff --git a/lib/ss/execute_cmd.c b/lib/ss/execute_cmd.c
new file mode 100644
index 0000000..d092134
--- /dev/null
+++ b/lib/ss/execute_cmd.c
@@ -0,0 +1,229 @@
+/*
+ * Copyright 1987, 1988, 1989 by Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include "ss_internal.h"
+#include <stdio.h>
+
+static int check_request_table PROTOTYPE((ss_request_table *rqtbl, int argc,
+ char *argv[], int sci_idx));
+static int really_execute_command PROTOTYPE((int sci_idx, int argc,
+ char **argv[]));
+
+/*
+ * get_request(tbl, idx)
+ *
+ * Function:
+ * Gets the idx'th request from the request table pointed to
+ * by tbl.
+ * Arguments:
+ * tbl (ss_request_table *)
+ * pointer to request table
+ * idx (int)
+ * index into table
+ * Returns:
+ * (ss_request_entry *)
+ * pointer to request table entry
+ * Notes:
+ * Has been replaced by a macro.
+ */
+
+#ifdef __SABER__
+/* sigh. saber won't deal with pointer-to-const-struct */
+static struct _ss_request_entry * get_request (tbl, idx)
+ ss_request_table * tbl;
+ int idx;
+{
+ struct _ss_request_table *tbl1 = (struct _ss_request_table *) tbl;
+ struct _ss_request_entry *e = (struct _ss_request_entry *) tbl1->requests;
+ return e + idx;
+}
+#else
+#define get_request(tbl,idx) ((tbl) -> requests + (idx))
+#endif
+
+/*
+ * check_request_table(rqtbl, argc, argv, sci_idx)
+ *
+ * Function:
+ * If the command string in argv[0] is in the request table, execute
+ * the commands and return error code 0. Otherwise, return error
+ * code ss_et_command_not_found.
+ * Arguments:
+ * rqtbl (ss_request_table *)
+ * pointer to request table
+ * argc (int)
+ * number of elements in argv[]
+ * argv (char *[])
+ * argument string array
+ * sci_idx (int)
+ * ss-internal index for subsystem control info structure
+ * Returns:
+ * (int)
+ * zero if command found, ss_et_command_not_found otherwise
+ * Notes:
+ */
+
+static int check_request_table(register ss_request_table *rqtbl, int argc,
+ char *argv[], int sci_idx)
+{
+#ifdef __SABER__
+ struct _ss_request_entry *request;
+#else
+ register ss_request_entry *request;
+#endif
+ register ss_data *info;
+ register char const * const * name;
+ char *string = argv[0];
+ int i;
+
+ info = ss_info(sci_idx);
+ info->argc = argc;
+ info->argv = argv;
+ for (i = 0; (request = get_request(rqtbl, i))->command_names; i++) {
+ for (name = request->command_names; *name; name++)
+ if (!strcmp(*name, string)) {
+ info->current_request = request->command_names[0];
+ (request->function)(argc, (const char *const *) argv,
+ sci_idx,info->info_ptr);
+ info->current_request = (char *)NULL;
+ return(0);
+ }
+ }
+ return(SS_ET_COMMAND_NOT_FOUND);
+}
+
+/*
+ * really_execute_command(sci_idx, argc, argv)
+ *
+ * Function:
+ * Fills in the argc, argv values in the subsystem entry and
+ * call the appropriate routine.
+ * Arguments:
+ * sci_idx (int)
+ * ss-internal index for subsystem control info structure
+ * argc (int)
+ * number of arguments in argument list
+ * argv (char **[])
+ * pointer to parsed argument list (may be reallocated
+ * on abbrev expansion)
+ *
+ * Returns:
+ * (int)
+ * Zero if successful, ss_et_command_not_found otherwise.
+ * Notes:
+ */
+
+static int really_execute_command(int sci_idx, int argc, char **argv[])
+{
+ register ss_request_table **rqtbl;
+ register ss_data *info;
+
+ info = ss_info(sci_idx);
+
+ for (rqtbl = info->rqt_tables; *rqtbl; rqtbl++) {
+ if (check_request_table (*rqtbl, argc, *argv, sci_idx) == 0)
+ return(0);
+ }
+ return(SS_ET_COMMAND_NOT_FOUND);
+}
+
+/*
+ * ss_execute_command(sci_idx, argv)
+ *
+ * Function:
+ * Executes a parsed command list within the subsystem.
+ * Arguments:
+ * sci_idx (int)
+ * ss-internal index for subsystem control info structure
+ * argv (char *[])
+ * parsed argument list
+ * Returns:
+ * (int)
+ * Zero if successful, ss_et_command_not_found otherwise.
+ * Notes:
+ */
+
+int ss_execute_command(int sci_idx, register char *argv[])
+{
+ register int i, argc;
+ char **argp;
+
+ argc = 0;
+ for (argp = argv; *argp; argp++)
+ argc++;
+ argp = (char **)malloc((argc+1)*sizeof(char *));
+ if (!argp)
+ return(ENOMEM);
+ for (i = 0; i <= argc; i++)
+ argp[i] = argv[i];
+ i = really_execute_command(sci_idx, argc, &argp);
+ free(argp);
+ return(i);
+}
+
+/*
+ * ss_execute_line(sci_idx, line_ptr)
+ *
+ * Function:
+ * Parses and executes a command line within a subsystem.
+ * Arguments:
+ * sci_idx (int)
+ * ss-internal index for subsystem control info structure
+ * line_ptr (char *)
+ * Pointer to command line to be parsed.
+ * Returns:
+ * (int)
+ * Error code.
+ * Notes:
+ */
+
+int ss_execute_line(int sci_idx, char *line_ptr)
+{
+ char **argv;
+ int argc, ret;
+
+ /* flush leading whitespace */
+ while (line_ptr[0] == ' ' || line_ptr[0] == '\t')
+ line_ptr++;
+
+ /* check if it should be sent to operating system for execution */
+ if (*line_ptr == '!') {
+ if (ss_info(sci_idx)->flags.escape_disabled)
+ return SS_ET_ESCAPE_DISABLED;
+ else {
+ line_ptr++;
+ return (system(line_ptr) < 0) ? errno : 0;
+ }
+ }
+
+ /* parse it */
+ argv = ss_parse(sci_idx, line_ptr, &argc);
+ if (argc == 0) {
+ free(argv);
+ return 0;
+ }
+
+ /* look it up in the request tables, execute if found */
+ ret = really_execute_command (sci_idx, argc, &argv);
+
+ free(argv);
+
+ return(ret);
+}
diff --git a/lib/ss/get_readline.c b/lib/ss/get_readline.c
new file mode 100644
index 0000000..aa16157
--- /dev/null
+++ b/lib/ss/get_readline.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2003 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#endif
+#include "ss_internal.h"
+#define size sizeof(ss_data *)
+#ifdef HAVE_DLOPEN
+#include <dlfcn.h>
+#endif
+
+#ifdef HAVE_DLOPEN
+static void ss_release_readline(ss_data *info)
+{
+ if (!info->readline_handle)
+ return;
+
+ info->readline = 0;
+ info->add_history = 0;
+ info->redisplay = 0;
+ info->rl_completion_matches = 0;
+ dlclose(info->readline_handle);
+ info->readline_handle = 0;
+}
+#endif
+
+/* Libraries we will try to use for readline/editline functionality */
+#define DEFAULT_LIBPATH "libreadline.so.8:libreadline.so.7:libreadline.so.6:libreadline.so.5:libreadline.so.4:libreadline.so:libedit.so.2:libedit.so:libeditline.so.0:libeditline.so"
+
+#ifdef HAVE_DLOPEN
+void ss_get_readline(int sci_idx)
+{
+ void *handle = NULL;
+ ss_data *info = ss_info(sci_idx);
+ const char **t, *libpath = 0;
+ char *tmp, *cp, *next;
+ char **(**completion_func)(const char *, int, int);
+
+ if (info->readline_handle)
+ return;
+
+ libpath = ss_safe_getenv("SS_READLINE_PATH");
+ if (!libpath)
+ libpath = DEFAULT_LIBPATH;
+ if (*libpath == 0 || !strcmp(libpath, "none"))
+ return;
+
+ tmp = malloc(strlen(libpath)+1);
+ if (!tmp)
+ return;
+ strcpy(tmp, libpath);
+ for (cp = tmp; cp; cp = next) {
+ next = strchr(cp, ':');
+ if (next)
+ *next++ = 0;
+ if (*cp == 0)
+ continue;
+ if ((handle = dlopen(cp, RTLD_NOW))) {
+ /* printf("Using %s for readline library\n", cp); */
+ break;
+ }
+ }
+ free(tmp);
+ if (!handle)
+ return;
+
+ info->readline_handle = handle;
+ info->readline = (char *(*)(const char *))
+ dlsym(handle, "readline");
+ info->add_history = (void (*)(const char *))
+ dlsym(handle, "add_history");
+ info->redisplay = (void (*)(void))
+ dlsym(handle, "rl_forced_update_display");
+ info->rl_completion_matches = (char **(*)(const char *,
+ char *(*)(const char *, int)))
+ dlsym(handle, "rl_completion_matches");
+ if ((t = dlsym(handle, "rl_readline_name")) != NULL)
+ *t = info->subsystem_name;
+ if ((completion_func =
+ dlsym(handle, "rl_attempted_completion_function")) != NULL)
+ *completion_func = ss_rl_completion;
+ info->readline_shutdown = ss_release_readline;
+}
+#else
+void ss_get_readline(int sci_idx __SS_ATTR((unused)))
+{
+}
+#endif
diff --git a/lib/ss/help.c b/lib/ss/help.c
new file mode 100644
index 0000000..54c78f2
--- /dev/null
+++ b/lib/ss/help.c
@@ -0,0 +1,185 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/file.h>
+#ifdef NEED_SYS_FCNTL_H
+/* just for O_* */
+#include <sys/fcntl.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#include "ss_internal.h"
+
+void ss_help(int argc, char const * const *argv, int sci_idx, pointer info_ptr)
+{
+ char *buffer;
+ char const *request_name;
+ int code;
+ int fd, child;
+ register int idx;
+ register ss_data *info;
+
+ request_name = ss_current_request(sci_idx, &code);
+ if (code != 0) {
+ ss_perror(sci_idx, code, "");
+ return; /* no ss_abort_line, if invalid invocation */
+ }
+ if (argc == 1) {
+ ss_list_requests(argc, argv, sci_idx, info_ptr);
+ return;
+ }
+ else if (argc != 2) {
+ /* should do something better than this */
+ buffer = malloc(80+2*strlen(request_name));
+ if (!buffer) {
+ ss_perror(sci_idx, 0,
+ "couldn't allocate memory to print usage message");
+ return;
+ }
+ sprintf(buffer, "usage:\n\t%s [topic|command]\nor\t%s\n",
+ request_name, request_name);
+ ss_perror(sci_idx, 0, buffer);
+ free(buffer);
+ return;
+ }
+ info = ss_info(sci_idx);
+ if (info->info_dirs == (char **)NULL) {
+ ss_perror(sci_idx, SS_ET_NO_INFO_DIR, (char *)NULL);
+ return;
+ }
+ if (info->info_dirs[0] == (char *)NULL) {
+ ss_perror(sci_idx, SS_ET_NO_INFO_DIR, (char *)NULL);
+ return;
+ }
+ for (fd = -1, idx = 0; info->info_dirs[idx] != (char *)NULL; idx++) {
+ buffer = malloc(strlen (info->info_dirs[idx]) + 1 +
+ strlen (argv[1]) + 6);
+ if (!buffer) {
+ ss_perror(sci_idx, 0,
+ "couldn't allocate memory for help filename");
+ return;
+ }
+ (void) strcpy(buffer, info->info_dirs[idx]);
+ (void) strcat(buffer, "/");
+ (void) strcat(buffer, argv[1]);
+ (void) strcat(buffer, ".info");
+ fd = open(buffer, O_RDONLY);
+ free(buffer);
+ if (fd >= 0)
+ break;
+ }
+ if (fd < 0) {
+#define MSG "No info found for "
+ char *buf = malloc(strlen (MSG) + strlen (argv[1]) + 1);
+ if (!buf) {
+ ss_perror(sci_idx, 0,
+ "couldn't allocate memory to print error message");
+ return;
+ }
+ strcpy(buf, MSG);
+ strcat(buf, argv[1]);
+ ss_perror(sci_idx, 0, buf);
+ free(buf);
+ return;
+ }
+ switch (child = fork()) {
+ case -1:
+ ss_perror(sci_idx, errno, "Can't fork for pager");
+ (void) close(fd);
+ return;
+ case 0:
+ (void) dup2(fd, 0); /* put file on stdin */
+ ss_page_stdin();
+ default:
+ (void) close(fd); /* what can we do if it fails? */
+ while (wait(NULL) != child) {
+ /* do nothing if wrong pid */
+ };
+ }
+}
+
+#ifndef HAVE_DIRENT_H
+#include <sys/dir.h>
+#else
+#include <dirent.h>
+#endif
+
+void ss_add_info_dir(int sci_idx, char *info_dir, int *code_ptr)
+{
+ register ss_data *info;
+ DIR *d;
+ int n_dirs;
+ register char **dirs;
+
+ info = ss_info(sci_idx);
+ if (info_dir == NULL || *info_dir == '\0') {
+ *code_ptr = SS_ET_NO_INFO_DIR;
+ return;
+ }
+ if ((d = opendir(info_dir)) == (DIR *)NULL) {
+ *code_ptr = errno;
+ return;
+ }
+ closedir(d);
+ dirs = info->info_dirs;
+ for (n_dirs = 0; dirs[n_dirs] != (char *)NULL; n_dirs++)
+ ; /* get number of non-NULL dir entries */
+ dirs = (char **)realloc((char *)dirs,
+ (unsigned)(n_dirs + 2)*sizeof(char *));
+ if (dirs == (char **)NULL) {
+ *code_ptr = ENOMEM;
+ return;
+ }
+ info->info_dirs = dirs;
+ dirs[n_dirs + 1] = (char *)NULL;
+ dirs[n_dirs] = malloc((unsigned)strlen(info_dir)+1);
+ if (dirs[n_dirs] == (char *)NULL) {
+ *code_ptr = ENOMEM;
+ return;
+ }
+ strcpy(dirs[n_dirs], info_dir);
+ *code_ptr = 0;
+}
+
+void ss_delete_info_dir(int sci_idx, char *info_dir, int *code_ptr)
+{
+ register char **i_d;
+ register char **info_dirs;
+
+ info_dirs = ss_info(sci_idx)->info_dirs;
+ for (i_d = info_dirs; *i_d; i_d++) {
+ if (!strcmp(*i_d, info_dir)) {
+ while (*i_d) {
+ *i_d = *(i_d+1);
+ i_d++;
+ }
+ *code_ptr = 0;
+ return;
+ }
+ }
+ *code_ptr = SS_ET_NO_INFO_DIR;
+}
diff --git a/lib/ss/invocation.c b/lib/ss/invocation.c
new file mode 100644
index 0000000..7d7458a
--- /dev/null
+++ b/lib/ss/invocation.c
@@ -0,0 +1,132 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#endif
+#include "ss_internal.h"
+#define size sizeof(ss_data *)
+#ifdef HAVE_DLOPEN
+#include <dlfcn.h>
+#endif
+#include <errno.h>
+
+int ss_create_invocation(const char *subsystem_name, const char *version_string,
+ void *info_ptr, ss_request_table *request_table_ptr,
+ int *code_ptr)
+{
+ int sci_idx;
+ ss_data *new_table = NULL;
+ ss_data **table = NULL;
+ ss_data **realloc_table = NULL;
+
+ *code_ptr = 0;
+ table = _ss_table;
+ new_table = (ss_data *) malloc(sizeof(ss_data));
+ if (!new_table)
+ goto out;
+ memset(new_table, 0, sizeof(ss_data));
+
+ if (table == (ss_data **) NULL) {
+ table = (ss_data **) malloc(2 * size);
+ if (!table)
+ goto out;
+ table[0] = table[1] = (ss_data *)NULL;
+ }
+ initialize_ss_error_table ();
+
+ for (sci_idx = 1; table[sci_idx] != (ss_data *)NULL; sci_idx++)
+ ;
+ realloc_table = (ss_data **) realloc((char *)table,
+ ((unsigned)sci_idx+2)*size);
+ if (realloc_table == NULL)
+ goto out;
+
+ table = realloc_table;
+ table[sci_idx+1] = (ss_data *) NULL;
+ table[sci_idx] = new_table;
+
+ new_table->subsystem_name = subsystem_name;
+ new_table->subsystem_version = version_string;
+ new_table->argv = (char **)NULL;
+ new_table->current_request = (char *)NULL;
+ new_table->info_dirs = (char **)malloc(sizeof(char *));
+ if (!new_table->info_dirs)
+ goto out;
+
+ *new_table->info_dirs = (char *)NULL;
+ new_table->info_ptr = info_ptr;
+ new_table->prompt = malloc((unsigned)strlen(subsystem_name)+4);
+ if (!new_table->prompt)
+ goto out;
+
+ strcpy(new_table->prompt, subsystem_name);
+ strcat(new_table->prompt, ": ");
+#ifdef silly
+ new_table->abbrev_info = ss_abbrev_initialize("/etc/passwd", code_ptr);
+#else
+ new_table->abbrev_info = NULL;
+#endif
+ new_table->flags.escape_disabled = 0;
+ new_table->flags.abbrevs_disabled = 0;
+ new_table->rqt_tables =
+ (ss_request_table **) calloc(2, sizeof(ss_request_table *));
+ if (!new_table->rqt_tables)
+ goto out;
+
+ *(new_table->rqt_tables) = request_table_ptr;
+ *(new_table->rqt_tables+1) = (ss_request_table *) NULL;
+
+ new_table->readline_handle = 0;
+ new_table->readline_shutdown = 0;
+ new_table->readline = 0;
+ new_table->add_history = 0;
+ new_table->redisplay = 0;
+ new_table->rl_completion_matches = 0;
+ _ss_table = table;
+#if defined(HAVE_DLOPEN) && defined(SHARED_ELF_LIB)
+ ss_get_readline(sci_idx);
+#endif
+ return(sci_idx);
+
+out:
+ if (new_table) {
+ free(new_table->prompt);
+ free(new_table->info_dirs);
+ }
+ free(new_table);
+ free(table);
+ *code_ptr = ENOMEM;
+ return 0;
+
+}
+
+void
+ss_delete_invocation(int sci_idx)
+{
+ register ss_data *t;
+ int ignored_code;
+
+ t = ss_info(sci_idx);
+ free(t->prompt);
+ free(t->rqt_tables);
+ while(t->info_dirs[0] != (char *)NULL)
+ ss_delete_info_dir(sci_idx, t->info_dirs[0], &ignored_code);
+ free(t->info_dirs);
+#if defined(HAVE_DLOPEN) && defined(SHARED_ELF_LIB)
+ if (t->readline_shutdown)
+ (*t->readline_shutdown)(t);
+#endif
+ free(t);
+}
diff --git a/lib/ss/list_rqs.c b/lib/ss/list_rqs.c
new file mode 100644
index 0000000..89e37bb
--- /dev/null
+++ b/lib/ss/list_rqs.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+#include "config.h"
+#include "ss_internal.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+#include <setjmp.h>
+#include <sys/wait.h>
+
+typedef void sigret_t;
+
+void ss_list_requests(int argc __SS_ATTR((unused)),
+ const char * const *argv __SS_ATTR((unused)),
+ int sci_idx, void *infop __SS_ATTR((unused)))
+{
+ ss_request_entry *entry;
+ char const * const *name;
+ int i, spacing;
+ ss_request_table **table;
+
+ FILE *output;
+ int fd;
+ sigset_t omask, igmask;
+ sigret_t (*func)(int);
+#ifndef NO_FORK
+ int waitb;
+#endif
+
+ sigemptyset(&igmask);
+ sigaddset(&igmask, SIGINT);
+ sigprocmask(SIG_BLOCK, &igmask, &omask);
+ func = signal(SIGINT, SIG_IGN);
+ fd = ss_pager_create();
+ if (fd < 0) {
+ perror("ss_pager_create");
+ (void) signal(SIGINT, func);
+ return;
+ }
+ output = fdopen(fd, "w");
+ if (!output) {
+ perror("fdopen");
+ close(fd);
+ (void) signal(SIGINT, func);
+ return;
+ }
+ sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0);
+
+ fprintf (output, "Available %s requests:\n\n",
+ ss_info (sci_idx) -> subsystem_name);
+
+ for (table = ss_info(sci_idx)->rqt_tables; *table; table++) {
+ entry = (*table)->requests;
+ for (; entry->command_names; entry++) {
+ spacing = -2;
+ if (entry->flags & SS_OPT_DONT_LIST)
+ continue;
+ for (name = entry->command_names; *name; name++) {
+ int len = strlen(*name);
+ fputs(*name, output);
+ spacing += len + 2;
+ if (name[1]) {
+ fputs(", ", output);
+ }
+ }
+ if (spacing > 23) {
+ fputc('\n', output);
+ spacing = 0;
+ }
+ for (i = 0; i < 25 - spacing; i++)
+ fputc(' ', output);
+ fputs(entry->info_string, output);
+ fputc('\n', output);
+ }
+ }
+ fclose(output);
+#ifndef NO_FORK
+ wait(&waitb);
+#endif
+ (void) signal(SIGINT, func);
+}
diff --git a/lib/ss/listen.c b/lib/ss/listen.c
new file mode 100644
index 0000000..9578c3e
--- /dev/null
+++ b/lib/ss/listen.c
@@ -0,0 +1,200 @@
+/*
+ * Listener loop for subsystem library libss.a.
+ *
+ * $Header$
+ * $Locker$
+ *
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include "ss_internal.h"
+#include <stdio.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <sys/param.h>
+
+typedef void sigret_t;
+
+static ss_data *current_info;
+static jmp_buf listen_jmpb;
+static sigret_t (*sig_cont)(int);
+
+static sigret_t print_prompt(int sig __SS_ATTR((unused)))
+{
+ if (current_info->redisplay)
+ (*current_info->redisplay)();
+ else {
+ (void) fputs(current_info->prompt, stdout);
+ (void) fflush(stdout);
+ }
+}
+
+static sigret_t listen_int_handler(int sig __SS_ATTR((unused)))
+{
+ putc('\n', stdout);
+ signal(SIGINT, listen_int_handler);
+ longjmp(listen_jmpb, 1);
+}
+
+int ss_listen (int sci_idx)
+{
+ char *cp;
+ ss_data *info;
+ sigret_t (*sig_int)(int), (*old_sig_cont)(int);
+ char input[BUFSIZ];
+ sigset_t omask, igmask;
+ int code;
+ jmp_buf old_jmpb;
+ ss_data *old_info = current_info;
+ char *line;
+
+ current_info = info = ss_info(sci_idx);
+ sig_cont = (sigret_t (*)(int)) 0;
+ info->abort = 0;
+ sigemptyset(&igmask);
+ sigaddset(&igmask, SIGINT);
+ sigprocmask(SIG_BLOCK, &igmask, &omask);
+ memcpy(old_jmpb, listen_jmpb, sizeof(jmp_buf));
+ sig_int = signal(SIGINT, listen_int_handler);
+ setjmp(listen_jmpb);
+ sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0);
+
+ while(!info->abort) {
+ old_sig_cont = sig_cont;
+ sig_cont = signal(SIGCONT, print_prompt);
+ if (sig_cont == print_prompt)
+ sig_cont = old_sig_cont;
+ if (info->readline) {
+ line = (*info->readline)(current_info->prompt);
+ } else {
+ print_prompt(0);
+ if (fgets(input, BUFSIZ, stdin) == input)
+ line = input;
+ else
+ line = NULL;
+
+ input[BUFSIZ-1] = 0;
+ }
+ if (line == NULL) {
+ code = SS_ET_EOF;
+ (void) signal(SIGCONT, sig_cont);
+ goto egress;
+ }
+
+ cp = strchr(line, '\n');
+ if (cp) {
+ *cp = '\0';
+ if (cp == line)
+ continue;
+ }
+ (void) signal(SIGCONT, sig_cont);
+ if (info->add_history)
+ (*info->add_history)(line);
+
+ code = ss_execute_line (sci_idx, line);
+ if (code == SS_ET_COMMAND_NOT_FOUND) {
+ register char *c = line;
+ while (*c == ' ' || *c == '\t')
+ c++;
+ cp = strchr (c, ' ');
+ if (cp)
+ *cp = '\0';
+ cp = strchr (c, '\t');
+ if (cp)
+ *cp = '\0';
+ ss_error (sci_idx, 0,
+ "Unknown request \"%s\". Type \"?\" for a request list.",
+ c);
+ }
+ if (info->readline)
+ free(line);
+ }
+ code = 0;
+egress:
+ (void) signal(SIGINT, sig_int);
+ memcpy(listen_jmpb, old_jmpb, sizeof(jmp_buf));
+ current_info = old_info;
+ return code;
+}
+
+void ss_abort_subsystem(int sci_idx, int code)
+{
+ ss_info(sci_idx)->abort = 1;
+ ss_info(sci_idx)->exit_status = code;
+
+}
+
+void ss_quit(int argc __SS_ATTR((unused)),
+ const char * const *argv __SS_ATTR((unused)),
+ int sci_idx, pointer infop __SS_ATTR((unused)))
+{
+ ss_abort_subsystem(sci_idx, 0);
+}
+
+#ifdef HAVE_DLOPEN
+#define get_request(tbl,idx) ((tbl) -> requests + (idx))
+
+static char *cmd_generator(const char *text, int state)
+{
+ static int len;
+ static ss_request_table **rqtbl;
+ static int curr_rqt;
+ static char const * const * name;
+ ss_request_entry *request;
+ char *ret;
+
+ if (state == 0) {
+ len = strlen(text);
+ rqtbl = current_info->rqt_tables;
+ if (!rqtbl || !*rqtbl)
+ return 0;
+ curr_rqt = 0;
+ name = 0;
+ }
+
+ while (1) {
+ if (!name || !*name) {
+ request = get_request(*rqtbl, curr_rqt++);
+ name = request->command_names;
+ if (!name) {
+ rqtbl++;
+ if (*rqtbl) {
+ curr_rqt = 0;
+ continue;
+ } else
+ break;
+ }
+ }
+ if (strncmp(*name, text, len) == 0) {
+ ret = malloc(strlen(*name)+1);
+ if (ret)
+ strcpy(ret, *name);
+ name++;
+ return ret;
+ }
+ name++;
+ }
+
+ return 0;
+}
+
+char **ss_rl_completion(const char *text, int start,
+ int end __SS_ATTR((unused)))
+{
+ if ((start == 0) && current_info->rl_completion_matches)
+ return (*current_info->rl_completion_matches)
+ (text, cmd_generator);
+ return 0;
+}
+#endif
+
diff --git a/lib/ss/mit-sipb-copyright.h b/lib/ss/mit-sipb-copyright.h
new file mode 100644
index 0000000..ffcfc38
--- /dev/null
+++ b/lib/ss/mit-sipb-copyright.h
@@ -0,0 +1,19 @@
+/*
+
+Copyright 1987 by the Student Information Processing Board
+ of the Massachusetts Institute of Technology
+
+Permission to use, copy, modify, and distribute this software
+and its documentation for any purpose and without fee is
+hereby granted, provided that the above copyright notice
+appear in all copies and that both that copyright notice and
+this permission notice appear in supporting documentation,
+and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
+used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+M.I.T. and the M.I.T. S.I.P.B. make no representations about
+the suitability of this software for any purpose. It is
+provided "as is" without express or implied warranty.
+
+*/
+
diff --git a/lib/ss/mk_cmds.1 b/lib/ss/mk_cmds.1
new file mode 100644
index 0000000..216e483
--- /dev/null
+++ b/lib/ss/mk_cmds.1
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2003 Theodore Ts'o
+.\"
+.TH MK_CMDS 1 "2003" E2FSPROGS
+.SH NAME
+mk_cmds \- error table compiler
+.SH SYNOPSIS
+.B mk_cmds
+file
+.SH DESCRIPTION
+.B Mk_cmds
+converts a table listing command names and associated help messages
+into a C source file suitable for use with the
+.IR ss (3)
+library.
+
+The source file name must end with a suffix of ``.ct''; the file
+consists of a declaration supplying the name of the command table:
+
+.B command_table
+.I name
+
+followed by entries of the form:
+
+[
+.B request
+|
+.B unimplemented
+]
+.I name,
+"
+.I string
+"[, abbrev]...;
+
+and a final
+
+.B end
+
+to indicate the end of the table.
+
+A C source file is generated which should be compiled and linked
+with the object files use the ss library.
+
+A ``#'' in the source file is treated as a comment character, and all
+remaining text to the end of the source line will be ignored.
+
+.SH BUGS
+
+Since the original
+.B mk_cmds
+uses a very simple parser based on
+.IR yacc (1),
+and this current version of
+.B mk_cmds
+uses an awk/sed combination of scripts,
+its error recovery leaves much to be desired.
+
+.SH "SEE ALSO"
+ss (3)
+
diff --git a/lib/ss/mk_cmds.sh.in b/lib/ss/mk_cmds.sh.in
new file mode 100644
index 0000000..53282f4
--- /dev/null
+++ b/lib/ss/mk_cmds.sh.in
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+#
+
+DIR=@datadir@/ss
+AWK=@AWK@
+SED=sed
+
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+if test "x$1" = x ; then
+ echo "Usage: mk_cmds file"
+ exit 1
+fi
+
+if test -n "$_SS_DIR_OVERRIDE" ; then
+ DIR="$_SS_DIR_OVERRIDE";
+fi
+
+if test ! -f $DIR/ct_c.sed || test ! -f $DIR/ct_c.awk ; then
+ echo "mk_cmds: Couldn't find mk_cmds's template files."
+ exit 1
+fi
+
+FILE="$1"
+ROOT=`echo $1 | sed -e s/.ct$//`
+BASE=`basename "$ROOT"`
+TMP="ct$$.c"
+
+if test ! -f "$FILE" ; then
+ echo "mk_cmds: $FILE: File not found"
+ exit 1;
+fi
+
+${SED} -f "${DIR}/ct_c.sed" "${FILE}" \
+ | ${AWK} -f "${DIR}/ct_c.awk" "rootname=${ROOT}" "outfile=${TMP}" -
+
+if grep "^#__ERROR_IN_FILE" "${TMP}" > /dev/null; then
+ rm "${TMP}"
+ exit 1
+else
+ rm -f "${BASE}.c"
+ mv -f "${TMP}" "${BASE}.c"
+ chmod a-w "${BASE}.c"
+ exit 0
+fi
diff --git a/lib/ss/pager.c b/lib/ss/pager.c
new file mode 100644
index 0000000..ba32b20
--- /dev/null
+++ b/lib/ss/pager.c
@@ -0,0 +1,152 @@
+/*
+ * Pager: Routines to create a "more" running out of a particular file
+ * descriptor.
+ *
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ss_internal.h"
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/file.h>
+#include <signal.h>
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#else
+#define PR_GET_DUMPABLE 3
+#endif
+#if (!defined(HAVE_PRCTL) && defined(linux))
+#include <sys/syscall.h>
+#endif
+
+static char MORE[] = "more";
+extern char *getenv PROTOTYPE((const char *));
+
+char *ss_safe_getenv(const char *arg)
+{
+ if ((getuid() != geteuid()) || (getgid() != getegid()))
+ return NULL;
+#if HAVE_PRCTL
+ if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#else
+#if (defined(linux) && defined(SYS_prctl))
+ if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+ return NULL;
+#endif
+#endif
+
+#if defined(HAVE_SECURE_GETENV)
+ return secure_getenv(arg);
+#elif defined(HAVE___SECURE_GETENV)
+ return __secure_getenv(arg);
+#else
+ return getenv(arg);
+#endif
+}
+
+/*
+ * this needs a *lot* of work....
+ *
+ * run in same process
+ * handle SIGINT sensibly
+ * allow finer control -- put-page-break-here
+ */
+
+#ifndef NO_FORK
+int ss_pager_create(void)
+{
+ int filedes[2];
+
+ if (pipe(filedes) != 0)
+ return(-1);
+
+ switch(fork()) {
+ case -1:
+ return(-1);
+ case 0:
+ /*
+ * Child; dup read half to 0, close all but 0, 1, and 2
+ */
+ if (dup2(filedes[0], 0) == -1)
+ exit(1);
+ ss_page_stdin();
+ default:
+ /*
+ * Parent: close "read" side of pipe, return
+ * "write" side.
+ */
+ (void) close(filedes[0]);
+ return(filedes[1]);
+ }
+}
+#else /* don't fork */
+int ss_pager_create()
+{
+ int fd;
+ fd = open("/dev/tty", O_WRONLY, 0);
+ return fd;
+}
+#endif
+
+static int write_all(int fd, char *buf, size_t count)
+{
+ ssize_t ret;
+ int c = 0;
+
+ while (count > 0) {
+ ret = write(fd, buf, count);
+ if (ret < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ return -1;
+ }
+ count -= ret;
+ buf += ret;
+ c += ret;
+ }
+ return c;
+}
+
+void ss_page_stdin(void)
+{
+ int i;
+ sigset_t mask;
+
+ for (i = 3; i < 32; i++)
+ (void) close(i);
+ (void) signal(SIGINT, SIG_DFL);
+ sigprocmask(SIG_BLOCK, 0, &mask);
+ sigdelset(&mask, SIGINT);
+ sigprocmask(SIG_SETMASK, &mask, 0);
+ if (_ss_pager_name == (char *)NULL) {
+ if ((_ss_pager_name = ss_safe_getenv("PAGER")) == (char *)NULL)
+ _ss_pager_name = MORE;
+ }
+ (void) execlp(_ss_pager_name, _ss_pager_name, (char *) NULL);
+ {
+ /* minimal recovery if pager program isn't found */
+ char buf[80];
+ register int n;
+ while ((n = read(0, buf, 80)) > 0)
+ write_all(1, buf, n);
+ }
+ exit(errno);
+}
diff --git a/lib/ss/parse.c b/lib/ss/parse.c
new file mode 100644
index 0000000..7c6c679
--- /dev/null
+++ b/lib/ss/parse.c
@@ -0,0 +1,158 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ss_internal.h"
+
+enum parse_mode { WHITESPACE, TOKEN, QUOTED_STRING };
+
+/*
+ * parse(line_ptr, argc_ptr)
+ *
+ * Function:
+ * Parses line, dividing at whitespace, into tokens, returns
+ * the "argc" and "argv" values.
+ * Arguments:
+ * line_ptr (char *)
+ * Pointer to text string to be parsed.
+ * argc_ptr (int *)
+ * Where to put the "argc" (number of tokens) value.
+ * Returns:
+ * argv (char **)
+ * Series of pointers to parsed tokens.
+ */
+
+#define NEW_ARGV(old,n) (char **)realloc((char *)old,\
+ (unsigned)(n+2)*sizeof(char*))
+
+char **ss_parse(int sci_idx, register char *line_ptr, int *argc_ptr)
+{
+ register char **argv, **new_argv, *cp;
+ register int argc;
+ register enum parse_mode parse_mode;
+
+ argv = (char **) malloc (sizeof(char *));
+ if (argv == (char **)NULL) {
+ ss_error(sci_idx, errno, "Can't allocate storage");
+ *argc_ptr = 0;
+ return(argv);
+ }
+ *argv = (char *)NULL;
+
+ argc = 0;
+
+ parse_mode = WHITESPACE; /* flushing whitespace */
+ cp = line_ptr; /* cp is for output */
+ while (1) {
+#ifdef DEBUG
+ {
+ printf ("character `%c', mode %d\n", *line_ptr, parse_mode);
+ }
+#endif
+ while (parse_mode == WHITESPACE) {
+ if (*line_ptr == '\0')
+ goto end_of_line;
+ if (*line_ptr == ' ' || *line_ptr == '\t') {
+ line_ptr++;
+ continue;
+ }
+ if (*line_ptr == '"') {
+ /* go to quoted-string mode */
+ parse_mode = QUOTED_STRING;
+ cp = line_ptr++;
+ new_argv = NEW_ARGV (argv, argc);
+ if (new_argv == NULL) {
+ free(argv);
+ *argc_ptr = 0;
+ return NULL;
+ }
+ argv = new_argv;
+ argv[argc++] = cp;
+ argv[argc] = NULL;
+ }
+ else {
+ /* random-token mode */
+ parse_mode = TOKEN;
+ cp = line_ptr;
+ new_argv = NEW_ARGV (argv, argc);
+ if (new_argv == NULL) {
+ free(argv);
+ *argc_ptr = 0;
+ return NULL;
+ }
+ argv = new_argv;
+ argv[argc++] = line_ptr;
+ argv[argc] = NULL;
+ }
+ }
+ while (parse_mode == TOKEN) {
+ if (*line_ptr == '\0') {
+ *cp++ = '\0';
+ goto end_of_line;
+ }
+ else if (*line_ptr == ' ' || *line_ptr == '\t') {
+ *cp++ = '\0';
+ line_ptr++;
+ parse_mode = WHITESPACE;
+ }
+ else if (*line_ptr == '"') {
+ line_ptr++;
+ parse_mode = QUOTED_STRING;
+ }
+ else {
+ *cp++ = *line_ptr++;
+ }
+ }
+ while (parse_mode == QUOTED_STRING) {
+ if (*line_ptr == '\0') {
+ ss_error (sci_idx, 0,
+ "Unbalanced quotes in command line");
+ free (argv);
+ *argc_ptr = 0;
+ return NULL;
+ }
+ else if (*line_ptr == '"') {
+ if (*++line_ptr == '"') {
+ *cp++ = '"';
+ line_ptr++;
+ }
+ else {
+ parse_mode = TOKEN;
+ }
+ }
+ else {
+ *cp++ = *line_ptr++;
+ }
+ }
+ }
+end_of_line:
+ *argc_ptr = argc;
+#ifdef DEBUG
+ {
+ int i;
+ printf ("argc = %d\n", argc);
+ for (i = 0; i <= argc; i++)
+ printf ("\targv[%2d] = `%s'\n", i,
+ argv[i] ? argv[i] : "<NULL>");
+ }
+#endif
+ return(argv);
+}
diff --git a/lib/ss/prompt.c b/lib/ss/prompt.c
new file mode 100644
index 0000000..c56c2a0
--- /dev/null
+++ b/lib/ss/prompt.c
@@ -0,0 +1,31 @@
+/*
+ * prompt.c: Routines for retrieving and setting a prompt.
+ *
+ * $Header$
+ * $Locker$
+ *
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include "ss_internal.h"
+
+void ss_set_prompt(int sci_idx, char *new_prompt)
+{
+ ss_info(sci_idx)->prompt = new_prompt;
+}
+
+char *ss_get_prompt(int sci_idx)
+{
+ return(ss_info(sci_idx)->prompt);
+}
diff --git a/lib/ss/request_tbl.c b/lib/ss/request_tbl.c
new file mode 100644
index 0000000..135cb28
--- /dev/null
+++ b/lib/ss/request_tbl.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ss_internal.h"
+
+#define ssrt ss_request_table /* for some readable code... */
+
+void ss_add_request_table(int sci_idx, ssrt *rqtbl_ptr, int position, int *code_ptr)
+{
+ register ss_data *info;
+ register int i, size;
+ ssrt **t;
+
+ info = ss_info(sci_idx);
+ for (size=0; info->rqt_tables[size] != (ssrt *)NULL; size++)
+ ;
+ /* size == C subscript of NULL == #elements */
+ size += 2; /* new element, and NULL */
+ t = (ssrt **)realloc(info->rqt_tables, (unsigned)size*sizeof(ssrt *));
+ if (t == (ssrt **)NULL) {
+ *code_ptr = errno;
+ return;
+ }
+ info->rqt_tables = t;
+ if (position > size - 2)
+ position = size - 2;
+
+ if (size > 1)
+ for (i = size - 2; i >= position; i--)
+ info->rqt_tables[i+1] = info->rqt_tables[i];
+
+ info->rqt_tables[position] = rqtbl_ptr;
+ info->rqt_tables[size-1] = (ssrt *)NULL;
+ *code_ptr = 0;
+}
+
+void ss_delete_request_table(int sci_idx, ssrt *rqtbl_ptr, int *code_ptr)
+{
+ register ss_data *info;
+ register ssrt **rt1, **rt2;
+
+ *code_ptr = SS_ET_TABLE_NOT_FOUND;
+ info = ss_info(sci_idx);
+ rt1 = info->rqt_tables;
+ for (rt2 = rt1; *rt1; rt1++) {
+ if (*rt1 != rqtbl_ptr) {
+ *rt2++ = *rt1;
+ *code_ptr = 0;
+ }
+ }
+ *rt2 = (ssrt *)NULL;
+ return;
+}
diff --git a/lib/ss/requests.c b/lib/ss/requests.c
new file mode 100644
index 0000000..33ce5d2
--- /dev/null
+++ b/lib/ss/requests.c
@@ -0,0 +1,66 @@
+/*
+ * Various minor routines...
+ *
+ * Copyright 1987, 1988, 1989 by MIT
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include "ss_internal.h"
+
+#define DECLARE(name) void name(int argc,const char * const *argv, \
+ int sci_idx, void *infop)
+
+/*
+ * ss_self_identify -- assigned by default to the "." request
+ */
+void ss_self_identify(int argc __SS_ATTR((unused)),
+ const char * const *argv __SS_ATTR((unused)),
+ int sci_idx, void *infop __SS_ATTR((unused)))
+{
+ register ss_data *info = ss_info(sci_idx);
+ printf("%s version %s\n", info->subsystem_name,
+ info->subsystem_version);
+}
+
+/*
+ * ss_subsystem_name -- print name of subsystem
+ */
+void ss_subsystem_name(int argc __SS_ATTR((unused)),
+ const char * const *argv __SS_ATTR((unused)),
+ int sci_idx,
+ void *infop __SS_ATTR((unused)))
+{
+ printf("%s\n", ss_info(sci_idx)->subsystem_name);
+}
+
+/*
+ * ss_subsystem_version -- print version of subsystem
+ */
+void ss_subsystem_version(int argc __SS_ATTR((unused)),
+ const char * const *argv __SS_ATTR((unused)),
+ int sci_idx,
+ void *infop __SS_ATTR((unused)))
+{
+ printf("%s\n", ss_info(sci_idx)->subsystem_version);
+}
+
+/*
+ * ss_unimplemented -- routine not implemented (should be
+ * set up as (dont_list,dont_summarize))
+ */
+void ss_unimplemented(int argc __SS_ATTR((unused)),
+ const char * const *argv __SS_ATTR((unused)),
+ int sci_idx, void *infop __SS_ATTR((unused)))
+{
+ ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
+}
diff --git a/lib/ss/ss.h b/lib/ss/ss.h
new file mode 100644
index 0000000..7333ffc
--- /dev/null
+++ b/lib/ss/ss.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ *
+ * This quote is just too good to not pass on:
+ *
+ * "BTW, I would have rejected the name Story Server because its
+ * initials are SS, the name of the secret police in Nazi
+ * Germany, probably the most despised pair of letters in western
+ * culture." --- http://scriptingnewsarchive.userland.com/1999/12/13
+ *
+ * Let no one say political correctness isn't dead....
+ */
+
+#ifndef _ss_h
+#define _ss_h __FILE__
+
+#include <ss/ss_err.h>
+
+#define __SS_CONST const
+#define __SS_PROTO (int, const char * const *, int, void *)
+
+#ifdef __GNUC__
+#define __SS_ATTR(x) __attribute__(x)
+#else
+#define __SS_ATTR(x)
+#endif
+
+
+typedef __SS_CONST struct _ss_request_entry {
+ __SS_CONST char * __SS_CONST *command_names; /* whatever */
+ void (* __SS_CONST function) __SS_PROTO; /* foo */
+ __SS_CONST char * __SS_CONST info_string; /* NULL */
+ int flags; /* 0 */
+} ss_request_entry;
+
+typedef __SS_CONST struct _ss_request_table {
+ int version;
+ ss_request_entry *requests;
+} ss_request_table;
+
+#define SS_RQT_TBL_V2 2
+
+typedef struct _ss_rp_options { /* DEFAULT VALUES */
+ int version; /* SS_RP_V1 */
+ void (*unknown) __SS_PROTO; /* call for unknown command */
+ int allow_suspend;
+ int catch_int;
+} ss_rp_options;
+
+#define SS_RP_V1 1
+
+#define SS_OPT_DONT_LIST 0x0001
+#define SS_OPT_DONT_SUMMARIZE 0x0002
+
+void ss_help __SS_PROTO;
+#if 0
+char *ss_current_request(); /* This is actually a macro */
+#endif
+
+char *ss_name(int sci_idx);
+void ss_error (int, long, char const *, ...)
+ __SS_ATTR((format(printf, 3, 4)));
+void ss_perror (int, long, char const *);
+
+int ss_create_invocation(const char *, const char *, void *,
+ ss_request_table *, int *);
+void ss_delete_invocation(int);
+int ss_listen(int);
+int ss_execute_line(int, char *);
+void ss_add_request_table(int, ss_request_table *, int, int *);
+void ss_delete_request_table(int, ss_request_table *, int *);
+void ss_abort_subsystem(int sci_idx, int code);
+void ss_quit(int argc, const char * const *argv, int sci_idx, void *infop);
+void ss_self_identify(int argc, const char * const *argv, int sci_idx, void *infop);
+void ss_subsystem_name(int argc, const char * const *argv,
+ int sci_idx, void *infop);
+void ss_subsystem_version(int argc, const char * const *argv,
+ int sci_idx, void *infop);
+void ss_unimplemented(int argc, const char * const *argv,
+ int sci_idx, void *infop);
+void ss_set_prompt(int sci_idx, char *new_prompt);
+char *ss_get_prompt(int sci_idx);
+void ss_get_readline(int sci_idx);
+char *ss_safe_getenv(const char *arg);
+
+extern ss_request_table ss_std_requests;
+#endif /* _ss_h */
diff --git a/lib/ss/ss.pc.in b/lib/ss/ss.pc.in
new file mode 100644
index 0000000..5c9eccb
--- /dev/null
+++ b/lib/ss/ss.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ss
+Description: Subsystem command parsing library
+Version: @E2FSPROGS_VERSION@
+Requires.private: com_err
+Cflags: -I${includedir}/ss -I${includedir}
+Libs: -L${libdir} -lss
+Libs.private: @DLOPEN_LIB@
diff --git a/lib/ss/ss_err.et b/lib/ss/ss_err.et
new file mode 100644
index 0000000..80e9dfa
--- /dev/null
+++ b/lib/ss/ss_err.et
@@ -0,0 +1,39 @@
+ error_table ss
+
+ec SS_ET_SUBSYSTEM_ABORTED,
+ "Subsystem aborted"
+
+ec SS_ET_VERSION_MISMATCH,
+ "Version mismatch"
+
+ec SS_ET_NULL_INV,
+ "No current invocation"
+
+ec SS_ET_NO_INFO_DIR,
+ "No info directory"
+
+ec SS_ET_COMMAND_NOT_FOUND,
+ "Command not found"
+
+ec SS_ET_LINE_ABORTED,
+ "Command line aborted"
+
+ec SS_ET_EOF,
+ "End-of-file reached"
+
+ec SS_ET_PERMISSION_DENIED,
+ "Permission denied"
+
+ec SS_ET_TABLE_NOT_FOUND,
+ "Request table not found"
+
+ec SS_ET_NO_HELP_FILE,
+ "No info available"
+
+ec SS_ET_ESCAPE_DISABLED,
+ "Shell escapes are disabled"
+
+ec SS_ET_UNIMPLEMENTED,
+ "Sorry, this request is not yet implemented"
+
+ end
diff --git a/lib/ss/ss_internal.h b/lib/ss/ss_internal.h
new file mode 100644
index 0000000..7b1d23b
--- /dev/null
+++ b/lib/ss/ss_internal.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#ifndef _ss_ss_internal_h
+#define _ss_ss_internal_h __FILE__
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define PROTOTYPE(p) p
+typedef void * pointer;
+
+#include "ss.h"
+
+typedef char BOOL;
+
+typedef struct _ss_abbrev_entry {
+ char *name; /* abbrev name */
+ char **abbrev; /* new tokens to insert */
+ unsigned int beginning_of_line : 1;
+} ss_abbrev_entry;
+
+typedef struct _ss_abbrev_list {
+ int n_abbrevs;
+ ss_abbrev_entry *first_abbrev;
+} ss_abbrev_list;
+
+typedef struct {
+/* char *path; */
+ ss_abbrev_list abbrevs[127];
+} ss_abbrev_info;
+
+typedef struct _ss_data { /* init values */
+ /* this subsystem */
+ const char *subsystem_name;
+ const char *subsystem_version;
+ /* current request info */
+ int argc;
+ char **argv; /* arg list */
+ char const *current_request; /* primary name */
+ /* info directory for 'help' */
+ char **info_dirs;
+ /* to be extracted by subroutines */
+ pointer info_ptr; /* (void *) NULL */
+ /* for ss_listen processing */
+ char *prompt;
+ ss_request_table **rqt_tables;
+ ss_abbrev_info *abbrev_info;
+ struct {
+ unsigned int escape_disabled : 1,
+ abbrevs_disabled : 1;
+ } flags;
+ /*
+ * Dynamic usage of readline library if present
+ */
+ void *readline_handle;
+ void (*readline_shutdown)(struct _ss_data *info);
+ char *(*readline)(const char *);
+ void (*add_history)(const char *);
+ void (*redisplay)(void);
+ char **(*rl_completion_matches)(const char *,
+ char *(*completer)(const char *, int));
+ /* to get out */
+ int abort; /* exit subsystem */
+ int exit_status;
+} ss_data;
+
+#define CURRENT_SS_VERSION 1
+
+#define ss_info(sci_idx) (_ss_table[sci_idx])
+#define ss_current_request(sci_idx,code_ptr) \
+ (*code_ptr=0,ss_info(sci_idx)->current_request)
+void ss_add_info_dir (int sci_idx, char *info_dir, int *code_ptr);
+void ss_delete_info_dir (int sci_idx, char *info_dir, int *code_ptr);
+int ss_execute_line(int sci_idx, char *line_ptr);
+char **ss_parse(int sci_idx, char *line_ptr, int *argc_ptr);
+ss_abbrev_info *ss_abbrev_initialize(char *, int *);
+void ss_page_stdin(void) __SS_ATTR((noreturn));
+void ss_list_requests(int, char const * const *, int, pointer);
+int ss_execute_command(int sci_idx, char *argv[]);
+int ss_pager_create(void);
+char *ss_safe_getenv(const char *arg);
+char **ss_rl_completion(const char *text, int start, int end);
+
+extern ss_data **_ss_table;
+extern char *ss_et_msgs[];
+extern char *_ss_pager_name;
+
+#ifdef USE_SIGPROCMASK
+/* fake sigmask, sigblock, sigsetmask */
+#include <signal.h>
+#define sigmask(x) (1L<<(x)-1)
+#define sigsetmask(x) sigprocmask(SIG_SETMASK,&x,NULL)
+static int _fake_sigstore;
+#define sigblock(x) (_fake_sigstore=x,sigprocmask(SIG_BLOCK,&_fake_sigstore,0))
+#endif
+#endif /* _ss_internal_h */
diff --git a/lib/ss/std_rqs.ct b/lib/ss/std_rqs.ct
new file mode 100644
index 0000000..500288a
--- /dev/null
+++ b/lib/ss/std_rqs.ct
@@ -0,0 +1,46 @@
+ command_table ss_std_requests;
+
+ request ss_self_identify, "Identify the subsystem.",
+ ".",
+ (dont_list, dont_summarize);
+
+ request ss_help, "Display info on command or topic.",
+ help;
+
+ unimplemented
+ ss_list_help,
+ "List topics for which help is available.",
+ list_help, lh;
+
+ request ss_list_requests, "List available commands.",
+ list_requests, lr, "?";
+
+ request ss_quit, "Leave the subsystem.",
+ quit, q;
+
+ unimplemented
+ ss_abbrev,
+ "Enable/disable abbreviation processing of request lines.",
+ abbrev, ab;
+
+ unimplemented
+ ss_execute,
+ "Execute a UNIX command line.",
+ execute, e;
+
+ unimplemented
+ ss_summarize_requests,
+ "Produce a list of the most commonly used requests.",
+ "?";
+
+ request ss_subsystem_name,
+ "Return the name of this subsystem.",
+ subsystem_name,
+ (dont_list);
+
+ request ss_subsystem_version,
+ "Return the version of this subsystem.",
+ subsystem_version,
+ (dont_list);
+
+ end;
diff --git a/lib/ss/test_cmd.ct b/lib/ss/test_cmd.ct
new file mode 100644
index 0000000..fb49f78
--- /dev/null
+++ b/lib/ss/test_cmd.ct
@@ -0,0 +1,6 @@
+command_table test_cmds;
+
+request test_cmd, "Test command",
+ test_cmd, test;
+
+end;
diff --git a/lib/ss/test_script b/lib/ss/test_script
new file mode 100644
index 0000000..8af7fdc
--- /dev/null
+++ b/lib/ss/test_script
@@ -0,0 +1,8 @@
+test
+test foo bar quux
+test bar quux
+quux bar
+quux
+test quux
+quit
+test foo bar
diff --git a/lib/ss/test_script_expected b/lib/ss/test_script_expected
new file mode 100644
index 0000000..543f828
--- /dev/null
+++ b/lib/ss/test_script_expected
@@ -0,0 +1,22 @@
+test_ss 1.0. Type '?' for a list of commands.
+
+test_icount: test
+Hello, world!
+Args:
+test_icount: test foo bar quux
+Hello, world!
+Args: 'foo', 'bar', 'quux'
+test_icount: test bar quux
+Hello, world!
+Args: 'bar', 'quux'
+test_icount: quux bar
+test_ss: Command not found quux
+test_icount: quux
+test_ss: Command not found quux
+test_icount: test quux
+Hello, world!
+Args: 'quux'
+test_icount: quit
+test_icount: test foo bar
+Hello, world!
+Args: 'foo', 'bar'
diff --git a/lib/ss/test_ss.c b/lib/ss/test_ss.c
new file mode 100644
index 0000000..53ca99f
--- /dev/null
+++ b/lib/ss/test_ss.c
@@ -0,0 +1,151 @@
+/*
+ * test_ss.c
+ *
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+
+ */
+
+#include "config.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <string.h>
+#include "ss.h"
+
+extern ss_request_table test_cmds;
+
+#define TRUE 1
+#define FALSE 0
+
+static char subsystem_name[] = "test_ss";
+static char version[] = "1.0";
+
+static int source_file(const char *cmd_file, int sci_idx)
+{
+ FILE *f;
+ char buf[256];
+ char *cp;
+ int exit_status = 0;
+ int retval;
+ int noecho;
+
+ if (strcmp(cmd_file, "-") == 0)
+ f = stdin;
+ else {
+ f = fopen(cmd_file, "r");
+ if (!f) {
+ perror(cmd_file);
+ exit(1);
+ }
+ }
+ fflush(stdout);
+ fflush(stderr);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ while (!feof(f)) {
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ break;
+ if (buf[0] == '#')
+ continue;
+ noecho = 0;
+ if (buf[0] == '-') {
+ noecho = 1;
+ buf[0] = ' ';
+ }
+ cp = strchr(buf, '\n');
+ if (cp)
+ *cp = 0;
+ cp = strchr(buf, '\r');
+ if (cp)
+ *cp = 0;
+ if (!noecho)
+ printf("test_icount: %s\n", buf);
+ retval = ss_execute_line(sci_idx, buf);
+ if (retval) {
+ ss_perror(sci_idx, retval, buf);
+ exit_status++;
+ }
+ }
+ return exit_status;
+}
+
+int main(int argc, char **argv)
+{
+ int c, code;
+ char *request = (char *)NULL;
+ char *cmd_file = 0;
+ int sci_idx;
+ int exit_status = 0;
+
+ while ((c = getopt (argc, argv, "wR:f:")) != EOF) {
+ switch (c) {
+ case 'R':
+ request = optarg;
+ break;
+ case 'f':
+ cmd_file = optarg;
+ break;
+ default:
+ com_err(argv[0], 0, "Usage: test_ss [-R request] "
+ "[-f cmd_file]");
+ exit(1);
+ }
+ }
+
+ sci_idx = ss_create_invocation(subsystem_name, version,
+ (char *)NULL, &test_cmds, &code);
+ if (code) {
+ ss_perror(sci_idx, code, "creating invocation");
+ exit(1);
+ }
+
+ (void) ss_add_request_table (sci_idx, &ss_std_requests, 1, &code);
+ if (code) {
+ ss_perror (sci_idx, code, "adding standard requests");
+ exit (1);
+ }
+
+ printf("test_ss %s. Type '?' for a list of commands.\n\n",
+ version);
+
+ if (request) {
+ code = ss_execute_line(sci_idx, request);
+ if (code) {
+ ss_perror(sci_idx, code, request);
+ exit_status++;
+ }
+ } else if (cmd_file) {
+ exit_status = source_file(cmd_file, sci_idx);
+ } else {
+ ss_listen(sci_idx);
+ }
+
+ exit(exit_status);
+}
+
+
+void test_cmd (argc, argv)
+ int argc;
+ char **argv;
+{
+ printf("Hello, world!\n");
+ printf("Args: ");
+ while (++argv, --argc) {
+ printf("'%s'", *argv);
+ if (argc > 1)
+ fputs(", ", stdout);
+ }
+ putchar ('\n');
+}
diff --git a/lib/support/Android.bp b/lib/support/Android.bp
new file mode 100644
index 0000000..af9b28d
--- /dev/null
+++ b/lib/support/Android.bp
@@ -0,0 +1,78 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-MIT
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library {
+ name: "libext2_quota",
+ host_supported: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "devname.c",
+ "dict.c",
+ "mkquota.c",
+ "parse_qtype.c",
+ "plausible.c",
+ "profile.c",
+ "profile_helpers.c",
+ "prof_err.c",
+ "quotaio.c",
+ "quotaio_tree.c",
+ "quotaio_v2.c",
+ ],
+ shared_libs: [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_com_err",
+ ],
+
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+}
+
+cc_library_shared {
+ name: "libext2_profile",
+ host_supported: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: [
+ "prof_err.c",
+ "profile.c",
+ ],
+ shared_libs: ["libext2_com_err"],
+
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+}
+
+cc_library {
+ name: "libext2_support",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: [
+ "cstring.c",
+ ],
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+}
diff --git a/lib/support/Makefile.in b/lib/support/Makefile.in
new file mode 100644
index 0000000..b622909
--- /dev/null
+++ b/lib/support/Makefile.in
@@ -0,0 +1,184 @@
+# Makefile for e2fsprog's internal support
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/support
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+all::
+
+OBJS= cstring.o \
+ mkquota.o \
+ plausible.o \
+ profile.o \
+ parse_qtype.o \
+ print_fs_flags.o \
+ profile_helpers.o \
+ prof_err.o \
+ quotaio.o \
+ quotaio_v2.o \
+ quotaio_tree.o \
+ dict.o \
+ devname.o
+
+SRCS= $(srcdir)/argv_parse.c \
+ $(srcdir)/cstring.c \
+ $(srcdir)/mkquota.c \
+ $(srcdir)/parse_qtype.c \
+ $(srcdir)/plausible.c \
+ $(srcdir)/print_fs_flags.c \
+ $(srcdir)/profile.c \
+ $(srcdir)/profile_helpers.c \
+ prof_err.c \
+ $(srcdir)/quotaio.c \
+ $(srcdir)/quotaio_tree.c \
+ $(srcdir)/quotaio_v2.c \
+ $(srcdir)/dict.c \
+ $(srcdir)/devname.c
+
+LIBRARY= libsupport
+LIBDIR= support
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_PROFILE@
+
+COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+installdirs::
+
+install:: all
+
+uninstall::
+
+prof_err.c prof_err.h: prof_err.et
+ $(E) " COMPILE_ET prof_err.et"
+ $(Q) $(COMPILE_ET) $(srcdir)/prof_err.et
+
+test_profile: $(srcdir)/profile.c profile_helpers.o argv_parse.o \
+ prof_err.o profile.h $(DEPSTATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) -o test_profile -DDEBUG_PROGRAM $(srcdir)/profile.c prof_err.o \
+ profile_helpers.o argv_parse.o $(STATIC_LIBCOM_ERR) \
+ $(ALL_CFLAGS)
+
+test_cstring: $(srcdir)/cstring.c
+ $(E) " CC $@"
+ $(Q) $(CC) -o test_cstring -DDEBUG_PROGRAM $(srcdir)/cstring.c \
+ $(ALL_CFLAGS)
+
+clean::
+ $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* \
+ ../libsupport.a ../libsupport_p.a $(SMANPAGES) \
+ prof_err.c prof_err.h test_profile test_cstring
+
+#fullcheck check:: tst_uuid
+# LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_uuid
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+../../lib/libsupport.a: libsupport.a
+../../lib/libsupport.so: image
+../../lib/libsupport.dylib: image
+
+$(OBJS):
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+argv_parse.o: $(srcdir)/argv_parse.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/argv_parse.h
+cstring.o: $(srcdir)/cstring.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/cstring.h
+mkquota.o: $(srcdir)/mkquota.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(srcdir)/quotaio.h $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h \
+ $(srcdir)/quotaio_v2.h $(srcdir)/common.h $(srcdir)/dict.h
+parse_qtype.o: $(srcdir)/parse_qtype.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/quotaio.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h \
+ $(srcdir)/quotaio_tree.h
+plausible.o: $(srcdir)/plausible.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/plausible.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/nls-enable.h
+print_fs_flags.o: $(srcdir)/print_fs_flags.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+profile.o: $(srcdir)/profile.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/profile.h prof_err.h
+profile_helpers.o: $(srcdir)/profile_helpers.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/profile.h $(srcdir)/profile_helpers.h prof_err.h
+prof_err.o: prof_err.c
+quotaio.o: $(srcdir)/quotaio.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h \
+ $(srcdir)/quotaio_tree.h
+quotaio_tree.o: $(srcdir)/quotaio_tree.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio_tree.h \
+ $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h
+quotaio_v2.o: $(srcdir)/quotaio_v2.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio_v2.h \
+ $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h \
+ $(srcdir)/quotaio_tree.h
+dict.o: $(srcdir)/dict.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/dict.h
+devname.o: $(srcdir)/devname.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/devname.h $(srcdir)/nls-enable.h
diff --git a/lib/support/argv_parse.c b/lib/support/argv_parse.c
new file mode 100644
index 0000000..1f50f9e
--- /dev/null
+++ b/lib/support/argv_parse.c
@@ -0,0 +1,168 @@
+/*
+ * argv_parse.c --- utility function for parsing a string into a
+ * argc, argv array.
+ *
+ * This file defines a function argv_parse() which parsing a
+ * passed-in string, handling double quotes and backslashes, and
+ * creates an allocated argv vector which can be freed using the
+ * argv_free() function.
+ *
+ * See argv_parse.h for the formal definition of the functions.
+ *
+ * Copyright 1999 by Theodore Ts'o.
+ *
+ * Permission to use, copy, modify, and distribute this software for
+ * any purpose with or without fee is hereby granted, provided that
+ * the above copyright notice and this permission notice appear in all
+ * copies. THE SOFTWARE IS PROVIDED "AS IS" AND THEODORE TS'O (THE
+ * AUTHOR) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. (Isn't
+ * it sick that the U.S. culture of lawsuit-happy lawyers requires
+ * this kind of disclaimer?)
+ *
+ * Version 1.1, modified 2/27/1999
+ */
+
+#include "config.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <ctype.h>
+#include <string.h>
+#include "argv_parse.h"
+
+#define STATE_WHITESPACE 1
+#define STATE_TOKEN 2
+#define STATE_QUOTED 3
+
+/*
+ * Returns 0 on success, -1 on failure.
+ */
+int argv_parse(char *in_buf, int *ret_argc, char ***ret_argv)
+{
+ int argc = 0, max_argc = 0;
+ char **argv, **new_argv, *buf, ch;
+ char *cp = 0, *outcp = 0;
+ int state = STATE_WHITESPACE;
+
+ buf = malloc(strlen(in_buf)+1);
+ if (!buf)
+ return -1;
+
+ max_argc = 0; argc = 0; argv = 0;
+ outcp = buf;
+ for (cp = in_buf; (ch = *cp); cp++) {
+ if (state == STATE_WHITESPACE) {
+ if (isspace((int) ch))
+ continue;
+ /* Not whitespace, so start a new token */
+ state = STATE_TOKEN;
+ if (argc >= max_argc) {
+ max_argc += 3;
+ new_argv = realloc(argv,
+ (max_argc+1)*sizeof(char *));
+ if (!new_argv) {
+ free(argv);
+ free(buf);
+ return -1;
+ }
+ argv = new_argv;
+ }
+ argv[argc++] = outcp;
+ }
+ if (state == STATE_QUOTED) {
+ if (ch == '"')
+ state = STATE_TOKEN;
+ else
+ *outcp++ = ch;
+ continue;
+ }
+ /* Must be processing characters in a word */
+ if (isspace((int) ch)) {
+ /*
+ * Terminate the current word and start
+ * looking for the beginning of the next word.
+ */
+ *outcp++ = 0;
+ state = STATE_WHITESPACE;
+ continue;
+ }
+ if (ch == '"') {
+ state = STATE_QUOTED;
+ continue;
+ }
+ if (ch == '\\') {
+ ch = *++cp;
+ switch (ch) {
+ case '\0':
+ ch = '\\'; cp--; break;
+ case 'n':
+ ch = '\n'; break;
+ case 't':
+ ch = '\t'; break;
+ case 'b':
+ ch = '\b'; break;
+ }
+ }
+ *outcp++ = ch;
+ }
+ if (state != STATE_WHITESPACE)
+ *outcp++ = '\0';
+ if (argv == 0) {
+ argv = malloc(sizeof(char *));
+ free(buf);
+ if (!argv)
+ return -1;
+ }
+ argv[argc] = 0;
+ if (ret_argc)
+ *ret_argc = argc;
+ if (ret_argv)
+ *ret_argv = argv;
+ return 0;
+}
+
+void argv_free(char **argv)
+{
+ free(*argv);
+ free(argv);
+}
+
+#ifdef DEBUG
+/*
+ * For debugging
+ */
+
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ int ac, ret;
+ char **av, **cpp;
+ char buf[256];
+
+ while (!feof(stdin)) {
+ if (fgets(buf, sizeof(buf), stdin) == NULL)
+ break;
+ ret = argv_parse(buf, &ac, &av);
+ if (ret != 0) {
+ printf("Argv_parse returned %d!\n", ret);
+ continue;
+ }
+ printf("Argv_parse returned %d arguments...\n", ac);
+ for (cpp = av; *cpp; cpp++) {
+ if (cpp != av)
+ printf(", ");
+ printf("'%s'", *cpp);
+ }
+ printf("\n");
+ argv_free(av);
+ }
+ exit(0);
+}
+#endif /* DEBUG */
diff --git a/lib/support/argv_parse.h b/lib/support/argv_parse.h
new file mode 100644
index 0000000..86f4564
--- /dev/null
+++ b/lib/support/argv_parse.h
@@ -0,0 +1,43 @@
+/*
+ * argv_parse.h --- header file for the argv parser.
+ *
+ * This file defines the interface for the functions argv_parse() and
+ * argv_free().
+ *
+ ***********************************************************************
+ * int argv_parse(char *in_buf, int *ret_argc, char ***ret_argv)
+ *
+ * This function takes as its first argument a string which it will
+ * parse into an argv argument vector, with each white-space separated
+ * word placed into its own slot in the argv. This function handles
+ * double quotes and backslashes so that the parsed words can contain
+ * special characters. The count of the number words found in the
+ * parsed string, as well as the argument vector, are returned into
+ * ret_argc and ret_argv, respectively.
+ ***********************************************************************
+ * extern void argv_free(char **argv);
+ *
+ * This function frees the argument vector created by argv_parse().
+ ***********************************************************************
+ *
+ * Copyright 1999 by Theodore Ts'o.
+ *
+ * Permission to use, copy, modify, and distribute this software for
+ * any purpose with or without fee is hereby granted, provided that
+ * the above copyright notice and this permission notice appear in all
+ * copies. THE SOFTWARE IS PROVIDED "AS IS" AND THEODORE TS'O (THE
+ * AUTHOR) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. (Isn't
+ * it sick that the U.S. culture of lawsuit-happy lawyers requires
+ * this kind of disclaimer?)
+ *
+ * Version 1.1, modified 2/27/1999
+ */
+
+extern int argv_parse(char *in_buf, int *ret_argc, char ***ret_argv);
+extern void argv_free(char **argv);
diff --git a/lib/support/common.h b/lib/support/common.h
new file mode 100644
index 0000000..00a9375
--- /dev/null
+++ b/lib/support/common.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * Various things common for all utilities
+ *
+ */
+
+#ifndef __QUOTA_COMMON_H__
+#define __QUOTA_COMMON_H__
+
+#if EXT2_FLAT_INCLUDES
+#include "e2_types.h"
+#else
+#include <ext2fs/ext2_types.h>
+#endif /* EXT2_FLAT_INCLUDES */
+
+/* #define DEBUG_QUOTA 1 */
+
+#ifndef __attribute__
+# if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+# define __attribute__(x)
+# endif
+#endif
+
+#define log_err(format, arg ...) \
+ fprintf(stderr, "[ERROR] %s:%d:%s: " format "\n", \
+ __FILE__, __LINE__, __func__, ## arg)
+
+#ifdef DEBUG_QUOTA
+# define log_debug(format, arg ...) \
+ fprintf(stderr, "[DEBUG] %s:%d:%s: " format "\n", \
+ __FILE__, __LINE__, __func__, ## arg)
+#else
+# define log_debug(...)
+#endif
+
+#endif /* __QUOTA_COMMON_H__ */
diff --git a/lib/support/cstring.c b/lib/support/cstring.c
new file mode 100644
index 0000000..57f4522
--- /dev/null
+++ b/lib/support/cstring.c
@@ -0,0 +1,162 @@
+/*
+ * cstring.c -- parse and print strings using the C escape sequences
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <string.h>
+
+#include "cstring.h"
+
+int parse_c_string(char *str)
+{
+ char *to, *from, ch;
+ int v;
+
+ to = from = str;
+
+ for (to = from = (char *) str;
+ *from && *from != '"'; to++, from++) {
+ if (*from == '\\') {
+ ch = *(++from);
+ switch (ch) {
+ case 'a':
+ *to = '\a';
+ break;
+ case 'b':
+ *to = '\b';
+ break;
+ case 'f':
+ *to = '\f';
+ break;
+ case 'n':
+ *to = '\n';
+ break;
+ case 't':
+ *to = '\t';
+ break;
+ case 'v':
+ *to = '\v';
+ break;
+ case 'x':
+ ch = *(from + 1);
+ if (ch >= 'a' && ch <= 'f')
+ ch = ch - 'a' + 'A';
+ if (ch >= '0' && ch <= '9')
+ v = ch - '0';
+ else if (ch >= 'A' && ch <= 'F')
+ v = ch + 10 - 'A';
+ else {
+ *to = 'x';
+ break;
+ }
+ from++;
+ ch = *(from + 1);
+ if (ch >= 'a' && ch <= 'f')
+ ch = ch - 'a' + 'A';
+ if (ch >= '0' && ch <= '9')
+ v = (v * 16) + (ch - '0');
+ else if (ch >= 'A' && ch <= 'F')
+ v = (v * 16) + (ch + 10 - 'A');
+ else {
+ *to = 'x';
+ from--;
+ break;
+ }
+ from++;
+ *to = v;
+ break;
+ default:
+ if (ch >= '0' && ch <= '9') {
+ v = ch - '0';
+ ch = *(from + 1);
+ if (ch >= '0' && ch <= '9') {
+ from++;
+ v = (8 * v) + (ch - '0');
+ ch = *(from + 1);
+ if (ch >= '0' && ch <= '9') {
+ from++;
+ v = (8 * v) + (ch - '0');
+ }
+ }
+ ch = v;
+ }
+ *to = ch;
+ }
+ continue;
+ }
+ *to = *from;
+ }
+ *to = '\0';
+ return to - (char *) str;
+}
+
+void print_c_string(FILE *f, const char *cp, int len)
+{
+ unsigned char ch;
+
+ if (len < 0)
+ len = strlen(cp);
+
+ while (len--) {
+ ch = *cp++;
+ if (ch == '\a')
+ fputs("\\a", f);
+ else if (ch == '\b')
+ fputs("\\b", f);
+ else if (ch == '\f')
+ fputs("\\f", f);
+ else if (ch == '\n')
+ fputs("\\n", f);
+ else if (ch == '\t')
+ fputs("\\t", f);
+ else if (ch == '\v')
+ fputs("\\v", f);
+ else if (ch == '\\')
+ fputs("\\\\", f);
+ else if (ch == '\'')
+ fputs("\\\'", f);
+ else if (ch == '\"')
+ fputs("\\\"", f);
+ else if ((ch < 32) || (ch > 126))
+ fprintf(f, "\\%03o", ch);
+ else
+ fputc(ch, f);
+ }
+}
+
+#ifdef DEBUG_PROGRAM
+int main(int argc, char **argv)
+{
+ char buf[4096];
+ int c, raw = 0;
+
+ while ((c = getopt(argc, argv, "r")) != EOF) {
+ switch (c) {
+ case 'r':
+ raw++;
+ break;
+ default:
+ fprintf(stderr, "Usage: %s [-r]\n", argv[0]);
+ exit(1);
+ }
+ }
+
+ while (!feof(stdin)) {
+ if (fgets(buf, sizeof(buf), stdin) == NULL)
+ break;
+ c = parse_c_string(buf);
+ if (raw)
+ fputs(buf, stdout);
+ else {
+ print_c_string(stdout, buf, c);
+ printf(" <%d>\n", c);
+ }
+ }
+}
+#endif
diff --git a/lib/support/cstring.h b/lib/support/cstring.h
new file mode 100644
index 0000000..7f80f41
--- /dev/null
+++ b/lib/support/cstring.h
@@ -0,0 +1,6 @@
+/*
+ * cstring.h -- header file for C string parse/print utilities
+ */
+
+extern int parse_c_string(char *str);
+extern void print_c_string(FILE *f, const char *cp, int len);
diff --git a/lib/support/devname.c b/lib/support/devname.c
new file mode 100644
index 0000000..e0306dd
--- /dev/null
+++ b/lib/support/devname.c
@@ -0,0 +1,65 @@
+/*
+ * devname.c --- Support function to translate a user provided string
+ * identifying a device to an actual device path
+ *
+ * Copyright (C) 2022 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "config.h"
+#include "devname.h"
+#include "nls-enable.h"
+
+/*
+ * blkid_get_devname() is primarily intended for parsing "NAME=value"
+ * tokens. It will return the device matching the specified token, NULL if
+ * nothing is found, or copy of the string if it's not in "NAME=value"
+ * format.
+ * get_devname() takes the same parameters and works the same way as
+ * blkid_get_devname() except it can handle '=' in the file name.
+ */
+char *get_devname(blkid_cache cache, const char *token, const char *value)
+{
+ int is_file = 0;
+ char *ret = NULL;
+
+ if (!token)
+ goto out;
+
+ if (value) {
+ ret = blkid_get_devname(cache, token, value);
+ goto out;
+ }
+
+ if (access(token, F_OK) == 0)
+ is_file = 1;
+
+ ret = blkid_get_devname(cache, token, NULL);
+ if (ret) {
+ /*
+ * In case of collision prefer the result from
+ * blkid_get_devname() to avoid a file masking file system with
+ * existing tag.
+ */
+ if (is_file && (strcmp(ret, token) != 0)) {
+ fprintf(stderr,
+ _("Collision found: '%s' refers to both '%s' "
+ "and a file '%s'. Using '%s'!\n"),
+ token, ret, token, ret);
+ }
+ goto out;
+ }
+
+ if (is_file)
+ ret = strdup(token);
+out:
+ return ret;
+}
diff --git a/lib/support/devname.h b/lib/support/devname.h
new file mode 100644
index 0000000..cc19561
--- /dev/null
+++ b/lib/support/devname.h
@@ -0,0 +1,19 @@
+/*
+ * devname.c --- Figure out if a pathname is ext* or something else.
+ *
+ * Copyright (C) 2022 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef DEVNAME_H_
+#define DEVNAME_H_
+
+#include "blkid/blkid.h"
+
+char *get_devname(blkid_cache cache, const char *token, const char *value);
+
+#endif /* DEVNAME_H_ */
diff --git a/lib/support/dict.c b/lib/support/dict.c
new file mode 100644
index 0000000..93fdd0b
--- /dev/null
+++ b/lib/support/dict.c
@@ -0,0 +1,1542 @@
+/*
+ * Dictionary Abstract Data Type
+ * Copyright (C) 1997 Kaz Kylheku <kaz@ashi.footprints.net>
+ *
+ * Free Software License:
+ *
+ * All rights are reserved by the author, with the following exceptions:
+ * Permission is granted to freely reproduce and distribute this software,
+ * possibly in exchange for a fee, provided that this copyright notice appears
+ * intact. Permission is also granted to adapt this software to produce
+ * derivative works, as long as the modified versions carry this copyright
+ * notice and additional notices stating that the work has been modified.
+ * This source code may be translated into executable form and incorporated
+ * into proprietary software; there is no requirement for such software to
+ * contain a copyright notice related to this source.
+ *
+ * $Id: dict.c,v 1.40.2.7 2000/11/13 01:36:44 kaz Exp $
+ * $Name: kazlib_1_20 $
+ * The work has been modified.
+ */
+
+#define DICT_NODEBUG
+
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
+#include "config.h"
+#include <stdlib.h>
+#include <stddef.h>
+#ifdef DICT_NODEBUG
+#define dict_assert(x)
+#else
+#include <assert.h>
+#define dict_assert(x) assert(x)
+#endif
+#define DICT_IMPLEMENTATION
+#include "dict.h"
+
+#ifdef KAZLIB_RCSID
+static const char rcsid[] = "$Id: dict.c,v 1.40.2.7 2000/11/13 01:36:44 kaz Exp $";
+#endif
+
+/*
+ * These macros provide short convenient names for structure members,
+ * which are embellished with dict_ prefixes so that they are
+ * properly confined to the documented namespace. It's legal for a
+ * program which uses dict to define, for instance, a macro called ``parent''.
+ * Such a macro would interfere with the dnode_t struct definition.
+ * In general, highly portable and reusable C modules which expose their
+ * structures need to confine structure member names to well-defined spaces.
+ * The resulting identifiers aren't necessarily convenient to use, nor
+ * readable, in the implementation, however!
+ */
+
+#define left dict_left
+#define right dict_right
+#define parent dict_parent
+#define color dict_color
+#define key dict_key
+#define data dict_data
+
+#define nilnode dict_nilnode
+#define nodecount dict_nodecount
+#define maxcount dict_maxcount
+#define compare dict_compare
+#define allocnode dict_allocnode
+#define freenode dict_freenode
+#define context dict_context
+#define dupes dict_dupes
+
+#define dictptr dict_dictptr
+
+#define dict_root(D) ((D)->nilnode.left)
+#define dict_nil(D) (&(D)->nilnode)
+#define DICT_DEPTH_MAX 64
+
+static dnode_t *dnode_alloc(void *context);
+static void dnode_free(dnode_t *node, void *context);
+
+/*
+ * Perform a ``left rotation'' adjustment on the tree. The given node P and
+ * its right child C are rearranged so that the P instead becomes the left
+ * child of C. The left subtree of C is inherited as the new right subtree
+ * for P. The ordering of the keys within the tree is thus preserved.
+ */
+
+static void rotate_left(dnode_t *upper)
+{
+ dnode_t *lower, *lowleft, *upparent;
+
+ lower = upper->right;
+ upper->right = lowleft = lower->left;
+ lowleft->parent = upper;
+
+ lower->parent = upparent = upper->parent;
+
+ /* don't need to check for root node here because root->parent is
+ the sentinel nil node, and root->parent->left points back to root */
+
+ if (upper == upparent->left) {
+ upparent->left = lower;
+ } else {
+ dict_assert (upper == upparent->right);
+ upparent->right = lower;
+ }
+
+ lower->left = upper;
+ upper->parent = lower;
+}
+
+/*
+ * This operation is the ``mirror'' image of rotate_left. It is
+ * the same procedure, but with left and right interchanged.
+ */
+
+static void rotate_right(dnode_t *upper)
+{
+ dnode_t *lower, *lowright, *upparent;
+
+ lower = upper->left;
+ upper->left = lowright = lower->right;
+ lowright->parent = upper;
+
+ lower->parent = upparent = upper->parent;
+
+ if (upper == upparent->right) {
+ upparent->right = lower;
+ } else {
+ dict_assert (upper == upparent->left);
+ upparent->left = lower;
+ }
+
+ lower->right = upper;
+ upper->parent = lower;
+}
+
+/*
+ * Do a postorder traversal of the tree rooted at the specified
+ * node and free everything under it. Used by dict_free().
+ */
+
+static void free_nodes(dict_t *dict, dnode_t *node, dnode_t *nil)
+{
+ if (node == nil)
+ return;
+ free_nodes(dict, node->left, nil);
+ free_nodes(dict, node->right, nil);
+ dict->freenode(node, dict->context);
+}
+
+/*
+ * This procedure performs a verification that the given subtree is a binary
+ * search tree. It performs an inorder traversal of the tree using the
+ * dict_next() successor function, verifying that the key of each node is
+ * strictly lower than that of its successor, if duplicates are not allowed,
+ * or lower or equal if duplicates are allowed. This function is used for
+ * debugging purposes.
+ */
+#ifndef DICT_NODEBUG
+static int verify_bintree(dict_t *dict)
+{
+ dnode_t *first, *next;
+
+ first = dict_first(dict);
+
+ if (dict->dupes) {
+ while (first && (next = dict_next(dict, first))) {
+ if (dict->compare(first->key, next->key) > 0)
+ return 0;
+ first = next;
+ }
+ } else {
+ while (first && (next = dict_next(dict, first))) {
+ if (dict->compare(first->key, next->key) >= 0)
+ return 0;
+ first = next;
+ }
+ }
+ return 1;
+}
+
+/*
+ * This function recursively verifies that the given binary subtree satisfies
+ * three of the red black properties. It checks that every red node has only
+ * black children. It makes sure that each node is either red or black. And it
+ * checks that every path has the same count of black nodes from root to leaf.
+ * It returns the blackheight of the given subtree; this allows blackheights to
+ * be computed recursively and compared for left and right siblings for
+ * mismatches. It does not check for every nil node being black, because there
+ * is only one sentinel nil node. The return value of this function is the
+ * black height of the subtree rooted at the node ``root'', or zero if the
+ * subtree is not red-black.
+ */
+
+static unsigned int verify_redblack(dnode_t *nil, dnode_t *root)
+{
+ unsigned height_left, height_right;
+
+ if (root != nil) {
+ height_left = verify_redblack(nil, root->left);
+ height_right = verify_redblack(nil, root->right);
+ if (height_left == 0 || height_right == 0)
+ return 0;
+ if (height_left != height_right)
+ return 0;
+ if (root->color == dnode_red) {
+ if (root->left->color != dnode_black)
+ return 0;
+ if (root->right->color != dnode_black)
+ return 0;
+ return height_left;
+ }
+ if (root->color != dnode_black)
+ return 0;
+ return height_left + 1;
+ }
+ return 1;
+}
+
+/*
+ * Compute the actual count of nodes by traversing the tree and
+ * return it. This could be compared against the stored count to
+ * detect a mismatch.
+ */
+
+static dictcount_t verify_node_count(dnode_t *nil, dnode_t *root)
+{
+ if (root == nil)
+ return 0;
+ else
+ return 1 + verify_node_count(nil, root->left)
+ + verify_node_count(nil, root->right);
+}
+#endif
+
+/*
+ * Verify that the tree contains the given node. This is done by
+ * traversing all of the nodes and comparing their pointers to the
+ * given pointer. Returns 1 if the node is found, otherwise
+ * returns zero. It is intended for debugging purposes.
+ */
+
+static int verify_dict_has_node(dnode_t *nil, dnode_t *root, dnode_t *node)
+{
+ if (root != nil) {
+ return root == node
+ || verify_dict_has_node(nil, root->left, node)
+ || verify_dict_has_node(nil, root->right, node);
+ }
+ return 0;
+}
+
+
+#ifdef E2FSCK_NOTUSED
+/*
+ * Dynamically allocate and initialize a dictionary object.
+ */
+
+dict_t *dict_create(dictcount_t maxcount, dict_comp_t comp)
+{
+ dict_t *new = malloc(sizeof *new);
+
+ if (new) {
+ new->compare = comp;
+ new->allocnode = dnode_alloc;
+ new->freenode = dnode_free;
+ new->context = NULL;
+ new->cmp_ctx = NULL;
+ new->nodecount = 0;
+ new->maxcount = maxcount;
+ new->nilnode.left = &new->nilnode;
+ new->nilnode.right = &new->nilnode;
+ new->nilnode.parent = &new->nilnode;
+ new->nilnode.color = dnode_black;
+ new->dupes = 0;
+ }
+ return new;
+}
+#endif /* E2FSCK_NOTUSED */
+
+/*
+ * Select a different set of node allocator routines.
+ */
+
+void dict_set_allocator(dict_t *dict, dnode_alloc_t al,
+ dnode_free_t fr, void *context)
+{
+ dict_assert (dict_count(dict) == 0);
+ dict_assert ((al == NULL && fr == NULL) || (al != NULL && fr != NULL));
+
+ dict->allocnode = al ? al : dnode_alloc;
+ dict->freenode = fr ? fr : dnode_free;
+ dict->context = context;
+}
+
+void dict_set_cmp_context(dict_t *dict, const void *cmp_ctx)
+{
+ dict_assert (!dict->cmp_ctx);
+ dict_assert (dict_count(dict) == 0);
+
+ dict->cmp_ctx = cmp_ctx;
+}
+
+#ifdef E2FSCK_NOTUSED
+/*
+ * Free a dynamically allocated dictionary object. Removing the nodes
+ * from the tree before deleting it is required.
+ */
+
+void dict_destroy(dict_t *dict)
+{
+ dict_assert (dict_isempty(dict));
+ free(dict);
+}
+#endif
+
+/*
+ * Free all the nodes in the dictionary by using the dictionary's
+ * installed free routine. The dictionary is emptied.
+ */
+
+void dict_free_nodes(dict_t *dict)
+{
+ dnode_t *nil = dict_nil(dict), *root = dict_root(dict);
+ free_nodes(dict, root, nil);
+ dict->nodecount = 0;
+ dict->nilnode.left = &dict->nilnode;
+ dict->nilnode.right = &dict->nilnode;
+}
+
+#ifdef E2FSCK_NOTUSED
+/*
+ * Obsolescent function, equivalent to dict_free_nodes
+ */
+void dict_free(dict_t *dict)
+{
+#ifdef KAZLIB_OBSOLESCENT_DEBUG
+ dict_assert ("call to obsolescent function dict_free()" && 0);
+#endif
+ dict_free_nodes(dict);
+}
+#endif
+
+/*
+ * Initialize a user-supplied dictionary object.
+ */
+
+dict_t *dict_init(dict_t *dict, dictcount_t maxcount, dict_comp_t comp)
+{
+ dict->compare = comp;
+ dict->allocnode = dnode_alloc;
+ dict->freenode = dnode_free;
+ dict->context = NULL;
+ dict->nodecount = 0;
+ dict->maxcount = maxcount;
+ dict->nilnode.left = &dict->nilnode;
+ dict->nilnode.right = &dict->nilnode;
+ dict->nilnode.parent = &dict->nilnode;
+ dict->nilnode.color = dnode_black;
+ dict->dupes = 0;
+ return dict;
+}
+
+#ifdef E2FSCK_NOTUSED
+/*
+ * Initialize a dictionary in the likeness of another dictionary
+ */
+
+void dict_init_like(dict_t *dict, const dict_t *template)
+{
+ dict->compare = template->compare;
+ dict->allocnode = template->allocnode;
+ dict->freenode = template->freenode;
+ dict->context = template->context;
+ dict->nodecount = 0;
+ dict->maxcount = template->maxcount;
+ dict->nilnode.left = &dict->nilnode;
+ dict->nilnode.right = &dict->nilnode;
+ dict->nilnode.parent = &dict->nilnode;
+ dict->nilnode.color = dnode_black;
+ dict->dupes = template->dupes;
+
+ dict_assert (dict_similar(dict, template));
+}
+
+/*
+ * Remove all nodes from the dictionary (without freeing them in any way).
+ */
+
+static void dict_clear(dict_t *dict)
+{
+ dict->nodecount = 0;
+ dict->nilnode.left = &dict->nilnode;
+ dict->nilnode.right = &dict->nilnode;
+ dict->nilnode.parent = &dict->nilnode;
+ dict_assert (dict->nilnode.color == dnode_black);
+}
+#endif /* E2FSCK_NOTUSED */
+
+
+/*
+ * Verify the integrity of the dictionary structure. This is provided for
+ * debugging purposes, and should be placed in assert statements. Just because
+ * this function succeeds doesn't mean that the tree is not corrupt. Certain
+ * corruptions in the tree may simply cause undefined behavior.
+ */
+#ifndef DICT_NODEBUG
+int dict_verify(dict_t *dict)
+{
+ dnode_t *nil = dict_nil(dict), *root = dict_root(dict);
+
+ /* check that the sentinel node and root node are black */
+ if (root->color != dnode_black)
+ return 0;
+ if (nil->color != dnode_black)
+ return 0;
+ if (nil->right != nil)
+ return 0;
+ /* nil->left is the root node; check that its parent pointer is nil */
+ if (nil->left->parent != nil)
+ return 0;
+ /* perform a weak test that the tree is a binary search tree */
+ if (!verify_bintree(dict))
+ return 0;
+ /* verify that the tree is a red-black tree */
+ if (!verify_redblack(nil, root))
+ return 0;
+ if (verify_node_count(nil, root) != dict_count(dict))
+ return 0;
+ return 1;
+}
+#endif /* DICT_NODEBUG */
+
+#ifdef E2FSCK_NOTUSED
+/*
+ * Determine whether two dictionaries are similar: have the same comparison and
+ * allocator functions, and same status as to whether duplicates are allowed.
+ */
+int dict_similar(const dict_t *left, const dict_t *right)
+{
+ if (left->compare != right->compare)
+ return 0;
+
+ if (left->allocnode != right->allocnode)
+ return 0;
+
+ if (left->freenode != right->freenode)
+ return 0;
+
+ if (left->context != right->context)
+ return 0;
+
+ if (left->dupes != right->dupes)
+ return 0;
+
+ return 1;
+}
+#endif /* E2FSCK_NOTUSED */
+
+/*
+ * Locate a node in the dictionary having the given key.
+ * If the node is not found, a null a pointer is returned (rather than
+ * a pointer that dictionary's nil sentinel node), otherwise a pointer to the
+ * located node is returned.
+ */
+
+dnode_t *dict_lookup(dict_t *dict, const void *key)
+{
+ dnode_t *root = dict_root(dict);
+ dnode_t *nil = dict_nil(dict);
+ dnode_t *saved;
+ int result;
+
+ /* simple binary search adapted for trees that contain duplicate keys */
+
+ while (root != nil) {
+ result = dict->compare(dict->cmp_ctx, key, root->key);
+ if (result < 0)
+ root = root->left;
+ else if (result > 0)
+ root = root->right;
+ else {
+ if (!dict->dupes) { /* no duplicates, return match */
+ return root;
+ } else { /* could be dupes, find leftmost one */
+ do {
+ saved = root;
+ root = root->left;
+ while (root != nil
+ && dict->compare(dict->cmp_ctx, key, root->key))
+ root = root->right;
+ } while (root != nil);
+ return saved;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+#ifdef E2FSCK_NOTUSED
+/*
+ * Look for the node corresponding to the lowest key that is equal to or
+ * greater than the given key. If there is no such node, return null.
+ */
+
+dnode_t *dict_lower_bound(dict_t *dict, const void *key)
+{
+ dnode_t *root = dict_root(dict);
+ dnode_t *nil = dict_nil(dict);
+ dnode_t *tentative = 0;
+
+ while (root != nil) {
+ int result = dict->compare(dict->cmp_ctx, key, root->key);
+
+ if (result > 0) {
+ root = root->right;
+ } else if (result < 0) {
+ tentative = root;
+ root = root->left;
+ } else {
+ if (!dict->dupes) {
+ return root;
+ } else {
+ tentative = root;
+ root = root->left;
+ }
+ }
+ }
+
+ return tentative;
+}
+
+/*
+ * Look for the node corresponding to the greatest key that is equal to or
+ * lower than the given key. If there is no such node, return null.
+ */
+
+dnode_t *dict_upper_bound(dict_t *dict, const void *key)
+{
+ dnode_t *root = dict_root(dict);
+ dnode_t *nil = dict_nil(dict);
+ dnode_t *tentative = 0;
+
+ while (root != nil) {
+ int result = dict->compare(dict->cmp_ctx, key, root->key);
+
+ if (result < 0) {
+ root = root->left;
+ } else if (result > 0) {
+ tentative = root;
+ root = root->right;
+ } else {
+ if (!dict->dupes) {
+ return root;
+ } else {
+ tentative = root;
+ root = root->right;
+ }
+ }
+ }
+
+ return tentative;
+}
+#endif
+
+/*
+ * Insert a node into the dictionary. The node should have been
+ * initialized with a data field. All other fields are ignored.
+ * The behavior is undefined if the user attempts to insert into
+ * a dictionary that is already full (for which the dict_isfull()
+ * function returns true).
+ */
+
+void dict_insert(dict_t *dict, dnode_t *node, const void *key)
+{
+ dnode_t *where = dict_root(dict), *nil = dict_nil(dict);
+ dnode_t *parent = nil, *uncle, *grandpa;
+ int result = -1;
+
+ node->key = key;
+
+ dict_assert (!dict_isfull(dict));
+ dict_assert (!dict_contains(dict, node));
+ dict_assert (!dnode_is_in_a_dict(node));
+
+ /* basic binary tree insert */
+
+ while (where != nil) {
+ parent = where;
+ result = dict->compare(dict->cmp_ctx, key, where->key);
+ /* trap attempts at duplicate key insertion unless it's explicitly allowed */
+ dict_assert (dict->dupes || result != 0);
+ if (result < 0)
+ where = where->left;
+ else
+ where = where->right;
+ }
+
+ dict_assert (where == nil);
+
+ if (result < 0)
+ parent->left = node;
+ else
+ parent->right = node;
+
+ node->parent = parent;
+ node->left = nil;
+ node->right = nil;
+
+ dict->nodecount++;
+
+ /* red black adjustments */
+
+ node->color = dnode_red;
+
+ while (parent->color == dnode_red) {
+ grandpa = parent->parent;
+ if (parent == grandpa->left) {
+ uncle = grandpa->right;
+ if (uncle->color == dnode_red) { /* red parent, red uncle */
+ parent->color = dnode_black;
+ uncle->color = dnode_black;
+ grandpa->color = dnode_red;
+ node = grandpa;
+ parent = grandpa->parent;
+ } else { /* red parent, black uncle */
+ if (node == parent->right) {
+ rotate_left(parent);
+ parent = node;
+ dict_assert (grandpa == parent->parent);
+ /* rotation between parent and child preserves grandpa */
+ }
+ parent->color = dnode_black;
+ grandpa->color = dnode_red;
+ rotate_right(grandpa);
+ break;
+ }
+ } else { /* symmetric cases: parent == parent->parent->right */
+ uncle = grandpa->left;
+ if (uncle->color == dnode_red) {
+ parent->color = dnode_black;
+ uncle->color = dnode_black;
+ grandpa->color = dnode_red;
+ node = grandpa;
+ parent = grandpa->parent;
+ } else {
+ if (node == parent->left) {
+ rotate_right(parent);
+ parent = node;
+ dict_assert (grandpa == parent->parent);
+ }
+ parent->color = dnode_black;
+ grandpa->color = dnode_red;
+ rotate_left(grandpa);
+ break;
+ }
+ }
+ }
+
+ dict_root(dict)->color = dnode_black;
+
+ dict_assert (dict_verify(dict));
+}
+
+#ifdef E2FSCK_NOTUSED
+/*
+ * Delete the given node from the dictionary. If the given node does not belong
+ * to the given dictionary, undefined behavior results. A pointer to the
+ * deleted node is returned.
+ */
+
+dnode_t *dict_delete(dict_t *dict, dnode_t *delete)
+{
+ dnode_t *nil = dict_nil(dict), *child, *delparent = delete->parent;
+
+ /* basic deletion */
+
+ dict_assert (!dict_isempty(dict));
+ dict_assert (dict_contains(dict, delete));
+
+ /*
+ * If the node being deleted has two children, then we replace it with its
+ * successor (i.e. the leftmost node in the right subtree.) By doing this,
+ * we avoid the traditional algorithm under which the successor's key and
+ * value *only* move to the deleted node and the successor is spliced out
+ * from the tree. We cannot use this approach because the user may hold
+ * pointers to the successor, or nodes may be inextricably tied to some
+ * other structures by way of embedding, etc. So we must splice out the
+ * node we are given, not some other node, and must not move contents from
+ * one node to another behind the user's back.
+ */
+
+ if (delete->left != nil && delete->right != nil) {
+ dnode_t *next = dict_next(dict, delete);
+ dnode_t *nextparent = next->parent;
+ dnode_color_t nextcolor = next->color;
+
+ dict_assert (next != nil);
+ dict_assert (next->parent != nil);
+ dict_assert (next->left == nil);
+
+ /*
+ * First, splice out the successor from the tree completely, by
+ * moving up its right child into its place.
+ */
+
+ child = next->right;
+ child->parent = nextparent;
+
+ if (nextparent->left == next) {
+ nextparent->left = child;
+ } else {
+ dict_assert (nextparent->right == next);
+ nextparent->right = child;
+ }
+
+ /*
+ * Now that the successor has been extricated from the tree, install it
+ * in place of the node that we want deleted.
+ */
+
+ next->parent = delparent;
+ next->left = delete->left;
+ next->right = delete->right;
+ next->left->parent = next;
+ next->right->parent = next;
+ next->color = delete->color;
+ delete->color = nextcolor;
+
+ if (delparent->left == delete) {
+ delparent->left = next;
+ } else {
+ dict_assert (delparent->right == delete);
+ delparent->right = next;
+ }
+
+ } else {
+ dict_assert (delete != nil);
+ dict_assert (delete->left == nil || delete->right == nil);
+
+ child = (delete->left != nil) ? delete->left : delete->right;
+
+ child->parent = delparent = delete->parent;
+
+ if (delete == delparent->left) {
+ delparent->left = child;
+ } else {
+ dict_assert (delete == delparent->right);
+ delparent->right = child;
+ }
+ }
+
+ delete->parent = NULL;
+ delete->right = NULL;
+ delete->left = NULL;
+
+ dict->nodecount--;
+
+ dict_assert (verify_bintree(dict));
+
+ /* red-black adjustments */
+
+ if (delete->color == dnode_black) {
+ dnode_t *parent, *sister;
+
+ dict_root(dict)->color = dnode_red;
+
+ while (child->color == dnode_black) {
+ parent = child->parent;
+ if (child == parent->left) {
+ sister = parent->right;
+ dict_assert (sister != nil);
+ if (sister->color == dnode_red) {
+ sister->color = dnode_black;
+ parent->color = dnode_red;
+ rotate_left(parent);
+ sister = parent->right;
+ dict_assert (sister != nil);
+ }
+ if (sister->left->color == dnode_black
+ && sister->right->color == dnode_black) {
+ sister->color = dnode_red;
+ child = parent;
+ } else {
+ if (sister->right->color == dnode_black) {
+ dict_assert (sister->left->color == dnode_red);
+ sister->left->color = dnode_black;
+ sister->color = dnode_red;
+ rotate_right(sister);
+ sister = parent->right;
+ dict_assert (sister != nil);
+ }
+ sister->color = parent->color;
+ sister->right->color = dnode_black;
+ parent->color = dnode_black;
+ rotate_left(parent);
+ break;
+ }
+ } else { /* symmetric case: child == child->parent->right */
+ dict_assert (child == parent->right);
+ sister = parent->left;
+ dict_assert (sister != nil);
+ if (sister->color == dnode_red) {
+ sister->color = dnode_black;
+ parent->color = dnode_red;
+ rotate_right(parent);
+ sister = parent->left;
+ dict_assert (sister != nil);
+ }
+ if (sister->right->color == dnode_black
+ && sister->left->color == dnode_black) {
+ sister->color = dnode_red;
+ child = parent;
+ } else {
+ if (sister->left->color == dnode_black) {
+ dict_assert (sister->right->color == dnode_red);
+ sister->right->color = dnode_black;
+ sister->color = dnode_red;
+ rotate_left(sister);
+ sister = parent->left;
+ dict_assert (sister != nil);
+ }
+ sister->color = parent->color;
+ sister->left->color = dnode_black;
+ parent->color = dnode_black;
+ rotate_right(parent);
+ break;
+ }
+ }
+ }
+
+ child->color = dnode_black;
+ dict_root(dict)->color = dnode_black;
+ }
+
+ dict_assert (dict_verify(dict));
+
+ return delete;
+}
+#endif /* E2FSCK_NOTUSED */
+
+/*
+ * Allocate a node using the dictionary's allocator routine, give it
+ * the data item.
+ */
+
+int dict_alloc_insert(dict_t *dict, const void *key, void *data)
+{
+ dnode_t *node = dict->allocnode(dict->context);
+
+ if (node) {
+ dnode_init(node, data);
+ dict_insert(dict, node, key);
+ return 1;
+ }
+ return 0;
+}
+
+#ifdef E2FSCK_NOTUSED
+void dict_delete_free(dict_t *dict, dnode_t *node)
+{
+ dict_delete(dict, node);
+ dict->freenode(node, dict->context);
+}
+#endif
+
+/*
+ * Return the node with the lowest (leftmost) key. If the dictionary is empty
+ * (that is, dict_isempty(dict) returns 1) a null pointer is returned.
+ */
+
+dnode_t *dict_first(dict_t *dict)
+{
+ dnode_t *nil = dict_nil(dict), *root = dict_root(dict), *left;
+
+ if (root != nil)
+ while ((left = root->left) != nil)
+ root = left;
+
+ return (root == nil) ? NULL : root;
+}
+
+/*
+ * Return the node with the highest (rightmost) key. If the dictionary is empty
+ * (that is, dict_isempty(dict) returns 1) a null pointer is returned.
+ */
+
+dnode_t *dict_last(dict_t *dict)
+{
+ dnode_t *nil = dict_nil(dict), *root = dict_root(dict), *right;
+
+ if (root != nil)
+ while ((right = root->right) != nil)
+ root = right;
+
+ return (root == nil) ? NULL : root;
+}
+
+/*
+ * Return the given node's successor node---the node which has the
+ * next key in the the left to right ordering. If the node has
+ * no successor, a null pointer is returned rather than a pointer to
+ * the nil node.
+ */
+
+dnode_t *dict_next(dict_t *dict, dnode_t *curr)
+{
+ dnode_t *nil = dict_nil(dict), *parent, *left;
+
+ if (curr->right != nil) {
+ curr = curr->right;
+ while ((left = curr->left) != nil)
+ curr = left;
+ return curr;
+ }
+
+ parent = curr->parent;
+
+ while (parent != nil && curr == parent->right) {
+ curr = parent;
+ parent = curr->parent;
+ }
+
+ return (parent == nil) ? NULL : parent;
+}
+
+/*
+ * Return the given node's predecessor, in the key order.
+ * The nil sentinel node is returned if there is no predecessor.
+ */
+
+dnode_t *dict_prev(dict_t *dict, dnode_t *curr)
+{
+ dnode_t *nil = dict_nil(dict), *parent, *right;
+
+ if (curr->left != nil) {
+ curr = curr->left;
+ while ((right = curr->right) != nil)
+ curr = right;
+ return curr;
+ }
+
+ parent = curr->parent;
+
+ while (parent != nil && curr == parent->left) {
+ curr = parent;
+ parent = curr->parent;
+ }
+
+ return (parent == nil) ? NULL : parent;
+}
+
+void dict_allow_dupes(dict_t *dict)
+{
+ dict->dupes = 1;
+}
+
+#undef dict_count
+#undef dict_isempty
+#undef dict_isfull
+#undef dnode_get
+#undef dnode_put
+#undef dnode_getkey
+
+dictcount_t dict_count(dict_t *dict)
+{
+ return dict->nodecount;
+}
+
+int dict_isempty(dict_t *dict)
+{
+ return dict->nodecount == 0;
+}
+
+int dict_isfull(dict_t *dict)
+{
+ return dict->nodecount == dict->maxcount;
+}
+
+int dict_contains(dict_t *dict, dnode_t *node)
+{
+ return verify_dict_has_node(dict_nil(dict), dict_root(dict), node);
+}
+
+static dnode_t *dnode_alloc(void *context EXT2FS_ATTR((unused)))
+{
+ return malloc(sizeof *dnode_alloc(NULL));
+}
+
+static void dnode_free(dnode_t *node, void *context EXT2FS_ATTR((unused)))
+{
+ free(node);
+}
+
+dnode_t *dnode_create(void *data)
+{
+ dnode_t *new = malloc(sizeof *new);
+ if (new) {
+ new->data = data;
+ new->parent = NULL;
+ new->left = NULL;
+ new->right = NULL;
+ }
+ return new;
+}
+
+dnode_t *dnode_init(dnode_t *dnode, void *data)
+{
+ dnode->data = data;
+ dnode->parent = NULL;
+ dnode->left = NULL;
+ dnode->right = NULL;
+ return dnode;
+}
+
+void dnode_destroy(dnode_t *dnode)
+{
+ dict_assert (!dnode_is_in_a_dict(dnode));
+ free(dnode);
+}
+
+void *dnode_get(dnode_t *dnode)
+{
+ return dnode->data;
+}
+
+const void *dnode_getkey(dnode_t *dnode)
+{
+ return dnode->key;
+}
+
+#ifdef E2FSCK_NOTUSED
+void dnode_put(dnode_t *dnode, void *data)
+{
+ dnode->data = data;
+}
+#endif
+
+#ifndef DICT_NODEBUG
+int dnode_is_in_a_dict(dnode_t *dnode)
+{
+ return (dnode->parent && dnode->left && dnode->right);
+}
+#endif
+
+#ifdef E2FSCK_NOTUSED
+void dict_process(dict_t *dict, void *context, dnode_process_t function)
+{
+ dnode_t *node = dict_first(dict), *next;
+
+ while (node != NULL) {
+ /* check for callback function deleting */
+ /* the next node from under us */
+ dict_assert (dict_contains(dict, node));
+ next = dict_next(dict, node);
+ function(dict, node, context);
+ node = next;
+ }
+}
+
+static void load_begin_internal(dict_load_t *load, dict_t *dict)
+{
+ load->dictptr = dict;
+ load->nilnode.left = &load->nilnode;
+ load->nilnode.right = &load->nilnode;
+}
+
+void dict_load_begin(dict_load_t *load, dict_t *dict)
+{
+ dict_assert (dict_isempty(dict));
+ load_begin_internal(load, dict);
+}
+
+void dict_load_next(dict_load_t *load, dnode_t *newnode, const void *key)
+{
+ dict_t *dict = load->dictptr;
+ dnode_t *nil = &load->nilnode;
+
+ dict_assert (!dnode_is_in_a_dict(newnode));
+ dict_assert (dict->nodecount < dict->maxcount);
+
+#ifndef DICT_NODEBUG
+ if (dict->nodecount > 0) {
+ if (dict->dupes)
+ dict_assert (dict->compare(nil->left->key, key) <= 0);
+ else
+ dict_assert (dict->compare(nil->left->key, key) < 0);
+ }
+#endif
+
+ newnode->key = key;
+ nil->right->left = newnode;
+ nil->right = newnode;
+ newnode->left = nil;
+ dict->nodecount++;
+}
+
+void dict_load_end(dict_load_t *load)
+{
+ dict_t *dict = load->dictptr;
+ dnode_t *tree[DICT_DEPTH_MAX] = { 0 };
+ dnode_t *curr, *dictnil = dict_nil(dict), *loadnil = &load->nilnode, *next;
+ dnode_t *complete = 0;
+ dictcount_t fullcount = DICTCOUNT_T_MAX, nodecount = dict->nodecount;
+ dictcount_t botrowcount;
+ unsigned baselevel = 0, level = 0, i;
+
+ dict_assert (dnode_red == 0 && dnode_black == 1);
+
+ while (fullcount >= nodecount && fullcount)
+ fullcount >>= 1;
+
+ botrowcount = nodecount - fullcount;
+
+ for (curr = loadnil->left; curr != loadnil; curr = next) {
+ next = curr->left;
+
+ if (complete == NULL && botrowcount-- == 0) {
+ dict_assert (baselevel == 0);
+ dict_assert (level == 0);
+ baselevel = level = 1;
+ complete = tree[0];
+
+ if (complete != 0) {
+ tree[0] = 0;
+ complete->right = dictnil;
+ while (tree[level] != 0) {
+ tree[level]->right = complete;
+ complete->parent = tree[level];
+ complete = tree[level];
+ tree[level++] = 0;
+ }
+ }
+ }
+
+ if (complete == NULL) {
+ curr->left = dictnil;
+ curr->right = dictnil;
+ curr->color = level % 2;
+ complete = curr;
+
+ dict_assert (level == baselevel);
+ while (tree[level] != 0) {
+ tree[level]->right = complete;
+ complete->parent = tree[level];
+ complete = tree[level];
+ tree[level++] = 0;
+ }
+ } else {
+ curr->left = complete;
+ curr->color = (level + 1) % 2;
+ complete->parent = curr;
+ tree[level] = curr;
+ complete = 0;
+ level = baselevel;
+ }
+ }
+
+ if (complete == NULL)
+ complete = dictnil;
+
+ for (i = 0; i < DICT_DEPTH_MAX; i++) {
+ if (tree[i] != 0) {
+ tree[i]->right = complete;
+ complete->parent = tree[i];
+ complete = tree[i];
+ }
+ }
+
+ dictnil->color = dnode_black;
+ dictnil->right = dictnil;
+ complete->parent = dictnil;
+ complete->color = dnode_black;
+ dict_root(dict) = complete;
+
+ dict_assert (dict_verify(dict));
+}
+
+void dict_merge(dict_t *dest, dict_t *source)
+{
+ dict_load_t load;
+ dnode_t *leftnode = dict_first(dest), *rightnode = dict_first(source);
+
+ dict_assert (dict_similar(dest, source));
+
+ if (source == dest)
+ return;
+
+ dest->nodecount = 0;
+ load_begin_internal(&load, dest);
+
+ for (;;) {
+ if (leftnode != NULL && rightnode != NULL) {
+ if (dest->compare(leftnode->key, rightnode->key) < 0)
+ goto copyleft;
+ else
+ goto copyright;
+ } else if (leftnode != NULL) {
+ goto copyleft;
+ } else if (rightnode != NULL) {
+ goto copyright;
+ } else {
+ dict_assert (leftnode == NULL && rightnode == NULL);
+ break;
+ }
+
+ copyleft:
+ {
+ dnode_t *next = dict_next(dest, leftnode);
+#ifndef DICT_NODEBUG
+ leftnode->left = NULL; /* suppress assertion in dict_load_next */
+#endif
+ dict_load_next(&load, leftnode, leftnode->key);
+ leftnode = next;
+ continue;
+ }
+
+ copyright:
+ {
+ dnode_t *next = dict_next(source, rightnode);
+#ifndef DICT_NODEBUG
+ rightnode->left = NULL;
+#endif
+ dict_load_next(&load, rightnode, rightnode->key);
+ rightnode = next;
+ continue;
+ }
+ }
+
+ dict_clear(source);
+ dict_load_end(&load);
+}
+#endif /* E2FSCK_NOTUSED */
+
+#ifdef KAZLIB_TEST_MAIN
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdarg.h>
+
+typedef char input_t[256];
+
+static int tokenize(char *string, ...)
+{
+ char **tokptr;
+ va_list arglist;
+ int tokcount = 0;
+
+ va_start(arglist, string);
+ tokptr = va_arg(arglist, char **);
+ while (tokptr) {
+ while (*string && isspace((unsigned char) *string))
+ string++;
+ if (!*string)
+ break;
+ *tokptr = string;
+ while (*string && !isspace((unsigned char) *string))
+ string++;
+ tokptr = va_arg(arglist, char **);
+ tokcount++;
+ if (!*string)
+ break;
+ *string++ = 0;
+ }
+ va_end(arglist);
+
+ return tokcount;
+}
+
+static int comparef(const void *cmp_ctx, const void *key1, const void *key2)
+{
+ return strcmp(key1, key2);
+}
+
+static char *dupstring(char *str)
+{
+ int sz = strlen(str) + 1;
+ char *new = malloc(sz);
+ if (new)
+ memcpy(new, str, sz);
+ return new;
+}
+
+static dnode_t *new_node(void *c)
+{
+ static dnode_t few[5];
+ static int count;
+
+ if (count < 5)
+ return few + count++;
+
+ return NULL;
+}
+
+static void del_node(dnode_t *n, void *c)
+{
+}
+
+static int prompt = 0;
+
+static void construct(dict_t *d)
+{
+ input_t in;
+ int done = 0;
+ dict_load_t dl;
+ dnode_t *dn;
+ char *tok1, *tok2, *val;
+ const char *key;
+ char *help =
+ "p turn prompt on\n"
+ "q finish construction\n"
+ "a <key> <val> add new entry\n";
+
+ if (!dict_isempty(d))
+ puts("warning: dictionary not empty!");
+
+ dict_load_begin(&dl, d);
+
+ while (!done) {
+ if (prompt)
+ putchar('>');
+ fflush(stdout);
+
+ if (!fgets(in, sizeof(input_t), stdin))
+ break;
+
+ switch (in[0]) {
+ case '?':
+ puts(help);
+ break;
+ case 'p':
+ prompt = 1;
+ break;
+ case 'q':
+ done = 1;
+ break;
+ case 'a':
+ if (tokenize(in+1, &tok1, &tok2, (char **) 0) != 2) {
+ puts("what?");
+ break;
+ }
+ key = dupstring(tok1);
+ val = dupstring(tok2);
+ dn = dnode_create(val);
+
+ if (!key || !val || !dn) {
+ puts("out of memory");
+ free((void *) key);
+ free(val);
+ if (dn)
+ dnode_destroy(dn);
+ }
+
+ dict_load_next(&dl, dn, key);
+ break;
+ default:
+ putchar('?');
+ putchar('\n');
+ break;
+ }
+ }
+
+ dict_load_end(&dl);
+}
+
+int main(void)
+{
+ input_t in;
+ dict_t darray[10];
+ dict_t *d = &darray[0];
+ dnode_t *dn;
+ int i;
+ char *tok1, *tok2, *val;
+ const char *key;
+
+ char *help =
+ "a <key> <val> add value to dictionary\n"
+ "d <key> delete value from dictionary\n"
+ "l <key> lookup value in dictionary\n"
+ "( <key> lookup lower bound\n"
+ ") <key> lookup upper bound\n"
+ "# <num> switch to alternate dictionary (0-9)\n"
+ "j <num> <num> merge two dictionaries\n"
+ "f free the whole dictionary\n"
+ "k allow duplicate keys\n"
+ "c show number of entries\n"
+ "t dump whole dictionary in sort order\n"
+ "m make dictionary out of sorted items\n"
+ "p turn prompt on\n"
+ "s switch to non-functioning allocator\n"
+ "q quit";
+
+ for (i = 0; i < sizeof darray / sizeof *darray; i++)
+ dict_init(&darray[i], DICTCOUNT_T_MAX, comparef);
+
+ for (;;) {
+ if (prompt)
+ putchar('>');
+ fflush(stdout);
+
+ if (!fgets(in, sizeof(input_t), stdin))
+ break;
+
+ switch(in[0]) {
+ case '?':
+ puts(help);
+ break;
+ case 'a':
+ if (tokenize(in+1, &tok1, &tok2, (char **) 0) != 2) {
+ puts("what?");
+ break;
+ }
+ key = dupstring(tok1);
+ val = dupstring(tok2);
+
+ if (!key || !val) {
+ puts("out of memory");
+ free((void *) key);
+ free(val);
+ }
+
+ if (!dict_alloc_insert(d, key, val)) {
+ puts("dict_alloc_insert failed");
+ free((void *) key);
+ free(val);
+ break;
+ }
+ break;
+ case 'd':
+ if (tokenize(in+1, &tok1, (char **) 0) != 1) {
+ puts("what?");
+ break;
+ }
+ dn = dict_lookup(d, tok1);
+ if (!dn) {
+ puts("dict_lookup failed");
+ break;
+ }
+ val = dnode_get(dn);
+ key = dnode_getkey(dn);
+ dict_delete_free(d, dn);
+
+ free(val);
+ free((void *) key);
+ break;
+ case 'f':
+ dict_free(d);
+ break;
+ case 'l':
+ case '(':
+ case ')':
+ if (tokenize(in+1, &tok1, (char **) 0) != 1) {
+ puts("what?");
+ break;
+ }
+ dn = 0;
+ switch (in[0]) {
+ case 'l':
+ dn = dict_lookup(d, tok1);
+ break;
+ case '(':
+ dn = dict_lower_bound(d, tok1);
+ break;
+ case ')':
+ dn = dict_upper_bound(d, tok1);
+ break;
+ }
+ if (!dn) {
+ puts("lookup failed");
+ break;
+ }
+ val = dnode_get(dn);
+ puts(val);
+ break;
+ case 'm':
+ construct(d);
+ break;
+ case 'k':
+ dict_allow_dupes(d);
+ break;
+ case 'c':
+ printf("%lu\n", (unsigned long) dict_count(d));
+ break;
+ case 't':
+ for (dn = dict_first(d); dn; dn = dict_next(d, dn)) {
+ printf("%s\t%s\n", (char *) dnode_getkey(dn),
+ (char *) dnode_get(dn));
+ }
+ break;
+ case 'q':
+ exit(0);
+ break;
+ case '\0':
+ break;
+ case 'p':
+ prompt = 1;
+ break;
+ case 's':
+ dict_set_allocator(d, new_node, del_node, NULL);
+ break;
+ case '#':
+ if (tokenize(in+1, &tok1, (char **) 0) != 1) {
+ puts("what?");
+ break;
+ } else {
+ int dictnum = atoi(tok1);
+ if (dictnum < 0 || dictnum > 9) {
+ puts("invalid number");
+ break;
+ }
+ d = &darray[dictnum];
+ }
+ break;
+ case 'j':
+ if (tokenize(in+1, &tok1, &tok2, (char **) 0) != 2) {
+ puts("what?");
+ break;
+ } else {
+ int dict1 = atoi(tok1), dict2 = atoi(tok2);
+ if (dict1 < 0 || dict1 > 9 || dict2 < 0 || dict2 > 9) {
+ puts("invalid number");
+ break;
+ }
+ dict_merge(&darray[dict1], &darray[dict2]);
+ }
+ break;
+ default:
+ putchar('?');
+ putchar('\n');
+ break;
+ }
+ }
+
+ return 0;
+}
+
+#endif
diff --git a/lib/support/dict.h b/lib/support/dict.h
new file mode 100644
index 0000000..2d87cc0
--- /dev/null
+++ b/lib/support/dict.h
@@ -0,0 +1,147 @@
+/*
+ * Dictionary Abstract Data Type
+ * Copyright (C) 1997 Kaz Kylheku <kaz@ashi.footprints.net>
+ *
+ * Free Software License:
+ *
+ * All rights are reserved by the author, with the following exceptions:
+ * Permission is granted to freely reproduce and distribute this software,
+ * possibly in exchange for a fee, provided that this copyright notice appears
+ * intact. Permission is also granted to adapt this software to produce
+ * derivative works, as long as the modified versions carry this copyright
+ * notice and additional notices stating that the work has been modified.
+ * This source code may be translated into executable form and incorporated
+ * into proprietary software; there is no requirement for such software to
+ * contain a copyright notice related to this source.
+ *
+ * $Id: dict.h,v 1.22.2.6 2000/11/13 01:36:44 kaz Exp $
+ * $Name: kazlib_1_20 $
+ * The work has been modified.
+ */
+
+#ifndef DICT_H
+#define DICT_H
+
+#include <limits.h>
+#ifdef KAZLIB_SIDEEFFECT_DEBUG
+#include "sfx.h"
+#endif
+
+/*
+ * Blurb for inclusion into C++ translation units
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef unsigned long dictcount_t;
+#define DICTCOUNT_T_MAX ULONG_MAX
+
+/*
+ * The dictionary is implemented as a red-black tree
+ */
+
+typedef enum { dnode_red, dnode_black } dnode_color_t;
+
+typedef struct dnode_t {
+#if defined(DICT_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
+ struct dnode_t *dict_left;
+ struct dnode_t *dict_right;
+ struct dnode_t *dict_parent;
+ dnode_color_t dict_color;
+ const void *dict_key;
+ void *dict_data;
+#else
+ int dict_dummy;
+#endif
+} dnode_t;
+
+typedef int (*dict_comp_t)(const void *, const void *, const void *);
+typedef dnode_t *(*dnode_alloc_t)(void *);
+typedef void (*dnode_free_t)(dnode_t *, void *);
+
+typedef struct dict_t {
+#if defined(DICT_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
+ dnode_t dict_nilnode;
+ dictcount_t dict_nodecount;
+ dictcount_t dict_maxcount;
+ dict_comp_t dict_compare;
+ dnode_alloc_t dict_allocnode;
+ dnode_free_t dict_freenode;
+ void *dict_context;
+ const void *cmp_ctx;
+ int dict_dupes;
+#else
+ int dict_dummmy;
+#endif
+} dict_t;
+
+typedef void (*dnode_process_t)(dict_t *, dnode_t *, void *);
+
+typedef struct dict_load_t {
+#if defined(DICT_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
+ dict_t *dict_dictptr;
+ dnode_t dict_nilnode;
+#else
+ int dict_dummmy;
+#endif
+} dict_load_t;
+
+extern dict_t *dict_create(dictcount_t, dict_comp_t);
+extern void dict_set_allocator(dict_t *, dnode_alloc_t, dnode_free_t, void *);
+extern void dict_set_cmp_context(dict_t *, const void *);
+extern void dict_destroy(dict_t *);
+extern void dict_free_nodes(dict_t *);
+extern void dict_free(dict_t *);
+extern dict_t *dict_init(dict_t *, dictcount_t, dict_comp_t);
+extern void dict_init_like(dict_t *, const dict_t *);
+extern int dict_verify(dict_t *);
+extern int dict_similar(const dict_t *, const dict_t *);
+extern dnode_t *dict_lookup(dict_t *, const void *);
+extern dnode_t *dict_lower_bound(dict_t *, const void *);
+extern dnode_t *dict_upper_bound(dict_t *, const void *);
+extern void dict_insert(dict_t *, dnode_t *, const void *);
+extern dnode_t *dict_delete(dict_t *, dnode_t *);
+extern int dict_alloc_insert(dict_t *, const void *, void *);
+extern void dict_delete_free(dict_t *, dnode_t *);
+extern dnode_t *dict_first(dict_t *);
+extern dnode_t *dict_last(dict_t *);
+extern dnode_t *dict_next(dict_t *, dnode_t *);
+extern dnode_t *dict_prev(dict_t *, dnode_t *);
+extern dictcount_t dict_count(dict_t *);
+extern int dict_isempty(dict_t *);
+extern int dict_isfull(dict_t *);
+extern int dict_contains(dict_t *, dnode_t *);
+extern void dict_allow_dupes(dict_t *);
+extern int dnode_is_in_a_dict(dnode_t *);
+extern dnode_t *dnode_create(void *);
+extern dnode_t *dnode_init(dnode_t *, void *);
+extern void dnode_destroy(dnode_t *);
+extern void *dnode_get(dnode_t *);
+extern const void *dnode_getkey(dnode_t *);
+extern void dnode_put(dnode_t *, void *);
+extern void dict_process(dict_t *, void *, dnode_process_t);
+extern void dict_load_begin(dict_load_t *, dict_t *);
+extern void dict_load_next(dict_load_t *, dnode_t *, const void *);
+extern void dict_load_end(dict_load_t *);
+extern void dict_merge(dict_t *, dict_t *);
+
+#if defined(DICT_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
+#ifdef KAZLIB_SIDEEFFECT_DEBUG
+#define dict_isfull(D) (SFX_CHECK(D)->dict_nodecount == (D)->dict_maxcount)
+#else
+#define dict_isfull(D) ((D)->dict_nodecount == (D)->dict_maxcount)
+#endif
+#define dict_count(D) ((D)->dict_nodecount)
+#define dict_isempty(D) ((D)->dict_nodecount == 0)
+#define dnode_get(N) ((N)->dict_data)
+#define dnode_getkey(N) ((N)->dict_key)
+#define dnode_put(N, X) ((N)->dict_data = (X))
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/support/dqblk_v2.h b/lib/support/dqblk_v2.h
new file mode 100644
index 0000000..d12512a
--- /dev/null
+++ b/lib/support/dqblk_v2.h
@@ -0,0 +1,31 @@
+/*
+ * Header file for disk format of new quotafile format
+ *
+ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
+ */
+
+#ifndef __QUOTA_DQBLK_V2_H__
+#define __QUOTA_DQBLK_V2_H__
+
+#include "quotaio_tree.h"
+
+/* Structure for format specific information */
+struct v2_mem_dqinfo {
+ struct qtree_mem_dqinfo dqi_qtree;
+ unsigned int dqi_flags; /* Flags set in quotafile */
+ unsigned int dqi_used_entries; /* Number of entries in file -
+ updated by scan_dquots */
+ unsigned int dqi_data_blocks; /* Number of data blocks in file -
+ updated by scan_dquots */
+};
+
+struct v2_mem_dqblk {
+ long long dqb_off; /* Offset of dquot in file */
+};
+
+struct quotafile_ops; /* Will be defined later in quotaio.h */
+
+/* Operations above this format */
+extern struct quotafile_ops quotafile_ops_2;
+
+#endif /* __QUOTA_DQBLK_V2_H__ */
diff --git a/lib/support/mkquota.c b/lib/support/mkquota.c
new file mode 100644
index 0000000..9339c99
--- /dev/null
+++ b/lib/support/mkquota.c
@@ -0,0 +1,707 @@
+/*
+ * mkquota.c --- create quota files for a filesystem
+ *
+ * Aditya Kali <adityakali@google.com>
+ */
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "e2p/e2p.h"
+
+#include "quotaio.h"
+#include "quotaio_v2.h"
+#include "quotaio_tree.h"
+#include "common.h"
+#include "dict.h"
+
+/* Needed for architectures where sizeof(int) != sizeof(void *) */
+#define UINT_TO_VOIDPTR(val) ((void *)(intptr_t)(val))
+#define VOIDPTR_TO_UINT(ptr) ((unsigned int)(intptr_t)(ptr))
+
+#if DEBUG_QUOTA
+static void print_inode(struct ext2_inode *inode)
+{
+ if (!inode)
+ return;
+
+ fprintf(stderr, " i_mode = %d\n", inode->i_mode);
+ fprintf(stderr, " i_uid = %d\n", inode->i_uid);
+ fprintf(stderr, " i_size = %d\n", inode->i_size);
+ fprintf(stderr, " i_atime = %d\n", inode->i_atime);
+ fprintf(stderr, " i_ctime = %d\n", inode->i_ctime);
+ fprintf(stderr, " i_mtime = %d\n", inode->i_mtime);
+ fprintf(stderr, " i_dtime = %d\n", inode->i_dtime);
+ fprintf(stderr, " i_gid = %d\n", inode->i_gid);
+ fprintf(stderr, " i_links_count = %d\n", inode->i_links_count);
+ fprintf(stderr, " i_blocks = %d\n", inode->i_blocks);
+ fprintf(stderr, " i_flags = %d\n", inode->i_flags);
+
+ return;
+}
+
+static void print_dquot(const char *desc, struct dquot *dq)
+{
+ if (desc)
+ fprintf(stderr, "%s: ", desc);
+ fprintf(stderr, "%u %lld:%lld:%lld %lld:%lld:%lld\n",
+ dq->dq_id, (long long) dq->dq_dqb.dqb_curspace,
+ (long long) dq->dq_dqb.dqb_bsoftlimit,
+ (long long) dq->dq_dqb.dqb_bhardlimit,
+ (long long) dq->dq_dqb.dqb_curinodes,
+ (long long) dq->dq_dqb.dqb_isoftlimit,
+ (long long) dq->dq_dqb.dqb_ihardlimit);
+}
+#else
+static void print_dquot(const char *desc EXT2FS_ATTR((unused)),
+ struct dquot *dq EXT2FS_ATTR((unused)))
+{
+}
+#endif
+
+/*
+ * Returns 0 if not able to find the quota file, otherwise returns its
+ * inode number.
+ */
+int quota_file_exists(ext2_filsys fs, enum quota_type qtype)
+{
+ char qf_name[256];
+ errcode_t ret;
+ ext2_ino_t ino;
+
+ if (qtype >= MAXQUOTAS)
+ return -EINVAL;
+
+ quota_get_qf_name(qtype, QFMT_VFS_V1, qf_name);
+
+ ret = ext2fs_lookup(fs, EXT2_ROOT_INO, qf_name, strlen(qf_name), 0,
+ &ino);
+ if (ret)
+ return 0;
+
+ return ino;
+}
+
+/*
+ * Set the value for reserved quota inode number field in superblock.
+ */
+void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, enum quota_type qtype)
+{
+ ext2_ino_t *inump;
+
+ inump = quota_sb_inump(fs->super, qtype);
+
+ log_debug("setting quota ino in superblock: ino=%u, type=%d", ino,
+ qtype);
+ if (inump == NULL)
+ return;
+ *inump = ino;
+ ext2fs_mark_super_dirty(fs);
+}
+
+errcode_t quota_remove_inode(ext2_filsys fs, enum quota_type qtype)
+{
+ ext2_ino_t qf_ino;
+ errcode_t retval;
+
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval) {
+ log_debug("Couldn't read bitmaps: %s", error_message(retval));
+ return retval;
+ }
+
+ qf_ino = *quota_sb_inump(fs->super, qtype);
+ if (qf_ino == 0)
+ return 0;
+ retval = quota_inode_truncate(fs, qf_ino);
+ if (retval)
+ return retval;
+ if (qf_ino >= EXT2_FIRST_INODE(fs->super)) {
+ struct ext2_inode inode;
+
+ retval = ext2fs_read_inode(fs, qf_ino, &inode);
+ if (!retval) {
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ ext2fs_write_inode(fs, qf_ino, &inode);
+ }
+ ext2fs_inode_alloc_stats2(fs, qf_ino, -1, 0);
+ ext2fs_mark_ib_dirty(fs);
+
+ }
+ quota_set_sb_inum(fs, 0, qtype);
+
+ ext2fs_mark_super_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ retval = ext2fs_write_bitmaps(fs);
+ if (retval) {
+ log_debug("Couldn't write bitmaps: %s", error_message(retval));
+ return retval;
+ }
+ return 0;
+}
+
+static void write_dquots(dict_t *dict, struct quota_handle *qh)
+{
+ dnode_t *n;
+ struct dquot *dq;
+
+ for (n = dict_first(dict); n; n = dict_next(dict, n)) {
+ dq = dnode_get(n);
+ if (dq) {
+ print_dquot("write", dq);
+ dq->dq_h = qh;
+ update_grace_times(dq);
+ qh->qh_ops->commit_dquot(dq);
+ }
+ }
+}
+
+errcode_t quota_write_inode(quota_ctx_t qctx, unsigned int qtype_bits)
+{
+ int retval = 0;
+ enum quota_type qtype;
+ dict_t *dict;
+ ext2_filsys fs;
+ struct quota_handle *h = NULL;
+ int fmt = QFMT_VFS_V1;
+
+ if (!qctx)
+ return 0;
+
+ fs = qctx->fs;
+ retval = ext2fs_get_mem(sizeof(struct quota_handle), &h);
+ if (retval) {
+ log_debug("Unable to allocate quota handle: %s",
+ error_message(retval));
+ goto out;
+ }
+
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval) {
+ log_debug("Couldn't read bitmaps: %s", error_message(retval));
+ goto out;
+ }
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (((1 << qtype) & qtype_bits) == 0)
+ continue;
+
+ dict = qctx->quota_dict[qtype];
+ if (!dict)
+ continue;
+
+ retval = quota_file_create(h, fs, qtype, fmt);
+ if (retval) {
+ log_debug("Cannot initialize io on quotafile: %s",
+ error_message(retval));
+ goto out;
+ }
+
+ write_dquots(dict, h);
+ retval = quota_file_close(qctx, h);
+ if (retval) {
+ log_debug("Cannot finish IO on new quotafile: %s",
+ strerror(errno));
+ if (h->qh_qf.e2_file)
+ ext2fs_file_close(h->qh_qf.e2_file);
+ (void) quota_inode_truncate(fs, h->qh_qf.ino);
+ goto out;
+ }
+
+ /* Set quota inode numbers in superblock. */
+ quota_set_sb_inum(fs, h->qh_qf.ino, qtype);
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ }
+
+ retval = ext2fs_write_bitmaps(fs);
+ if (retval) {
+ log_debug("Couldn't write bitmaps: %s", error_message(retval));
+ goto out;
+ }
+out:
+ if (h)
+ ext2fs_free_mem(&h);
+ return retval;
+}
+
+/******************************************************************/
+/* Helper functions for computing quota in memory. */
+/******************************************************************/
+
+static int dict_uint_cmp(const void *cmp_ctx EXT2FS_ATTR((unused)),
+ const void *a, const void *b)
+{
+ unsigned int c, d;
+
+ c = VOIDPTR_TO_UINT(a);
+ d = VOIDPTR_TO_UINT(b);
+
+ if (c == d)
+ return 0;
+ else if (c > d)
+ return 1;
+ else
+ return -1;
+}
+
+static inline int project_quota_valid(quota_ctx_t qctx)
+{
+ return (EXT2_INODE_SIZE(qctx->fs->super) > EXT2_GOOD_OLD_INODE_SIZE);
+}
+
+static inline qid_t get_qid(struct ext2_inode_large *inode, enum quota_type qtype)
+{
+ unsigned int inode_size;
+
+ switch (qtype) {
+ case USRQUOTA:
+ return inode_uid(*inode);
+ case GRPQUOTA:
+ return inode_gid(*inode);
+ case PRJQUOTA:
+ inode_size = EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize;
+ if (inode_includes(inode_size, i_projid))
+ return inode_projid(*inode);
+ return 0;
+ default:
+ return 0;
+ }
+
+ return 0;
+}
+
+static void quota_dnode_free(dnode_t *node,
+ void *context EXT2FS_ATTR((unused)))
+{
+ void *ptr = node ? dnode_get(node) : 0;
+
+ ext2fs_free_mem(&ptr);
+ free(node);
+}
+
+/*
+ * Set up the quota tracking data structures.
+ */
+errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs,
+ unsigned int qtype_bits)
+{
+ errcode_t err;
+ dict_t *dict;
+ quota_ctx_t ctx;
+ enum quota_type qtype;
+
+ err = ext2fs_get_mem(sizeof(struct quota_ctx), &ctx);
+ if (err) {
+ log_debug("Failed to allocate quota context");
+ return err;
+ }
+
+ memset(ctx, 0, sizeof(struct quota_ctx));
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ ctx->quota_file[qtype] = NULL;
+ if (qtype_bits) {
+ if (((1 << qtype) & qtype_bits) == 0)
+ continue;
+ } else {
+ if (*quota_sb_inump(fs->super, qtype) == 0)
+ continue;
+ }
+ err = ext2fs_get_mem(sizeof(dict_t), &dict);
+ if (err) {
+ log_debug("Failed to allocate dictionary");
+ quota_release_context(&ctx);
+ return err;
+ }
+ ctx->quota_dict[qtype] = dict;
+ dict_init(dict, DICTCOUNT_T_MAX, dict_uint_cmp);
+ dict_set_allocator(dict, NULL, quota_dnode_free, NULL);
+ }
+
+ ctx->fs = fs;
+ *qctx = ctx;
+ return 0;
+}
+
+void quota_release_context(quota_ctx_t *qctx)
+{
+ errcode_t err;
+ dict_t *dict;
+ enum quota_type qtype;
+ quota_ctx_t ctx;
+
+ if (!qctx)
+ return;
+
+ ctx = *qctx;
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ dict = ctx->quota_dict[qtype];
+ ctx->quota_dict[qtype] = 0;
+ if (dict) {
+ dict_free_nodes(dict);
+ free(dict);
+ }
+ if (ctx->quota_file[qtype]) {
+ err = quota_file_close(ctx, ctx->quota_file[qtype]);
+ if (err) {
+ log_err("Cannot close quotafile: %s",
+ strerror(errno));
+ ext2fs_free_mem(&ctx->quota_file[qtype]);
+ }
+ }
+ }
+ *qctx = NULL;
+ free(ctx);
+}
+
+static struct dquot *get_dq(dict_t *dict, __u32 key)
+{
+ struct dquot *dq;
+ dnode_t *n;
+
+ n = dict_lookup(dict, UINT_TO_VOIDPTR(key));
+ if (n)
+ dq = dnode_get(n);
+ else {
+ if (ext2fs_get_mem(sizeof(struct dquot), &dq)) {
+ log_err("Unable to allocate dquot");
+ return NULL;
+ }
+ memset(dq, 0, sizeof(struct dquot));
+ dict_alloc_insert(dict, UINT_TO_VOIDPTR(key), dq);
+ dq->dq_id = key;
+ }
+ return dq;
+}
+
+
+/*
+ * Called to update the blocks used by a particular inode
+ */
+void quota_data_add(quota_ctx_t qctx, struct ext2_inode_large *inode,
+ ext2_ino_t ino EXT2FS_ATTR((unused)),
+ qsize_t space)
+{
+ struct dquot *dq;
+ dict_t *dict;
+ enum quota_type qtype;
+
+ if (!qctx)
+ return;
+
+ log_debug("ADD_DATA: Inode: %u, UID/GID: %u/%u, space: %ld", ino,
+ inode_uid(*inode),
+ inode_gid(*inode), space);
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (qtype == PRJQUOTA && !project_quota_valid(qctx))
+ continue;
+ dict = qctx->quota_dict[qtype];
+ if (dict) {
+ dq = get_dq(dict, get_qid(inode, qtype));
+ if (dq)
+ dq->dq_dqb.dqb_curspace += space;
+ }
+ }
+}
+
+/*
+ * Called to remove some blocks used by a particular inode
+ */
+void quota_data_sub(quota_ctx_t qctx, struct ext2_inode_large *inode,
+ ext2_ino_t ino EXT2FS_ATTR((unused)),
+ qsize_t space)
+{
+ struct dquot *dq;
+ dict_t *dict;
+ enum quota_type qtype;
+
+ if (!qctx)
+ return;
+
+ log_debug("SUB_DATA: Inode: %u, UID/GID: %u/%u, space: %ld", ino,
+ inode_uid(*inode),
+ inode_gid(*inode), space);
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (qtype == PRJQUOTA && !project_quota_valid(qctx))
+ continue;
+ dict = qctx->quota_dict[qtype];
+ if (dict) {
+ dq = get_dq(dict, get_qid(inode, qtype));
+ if (dq)
+ dq->dq_dqb.dqb_curspace -= space;
+ }
+ }
+}
+
+/*
+ * Called to count the files used by an inode's user/group
+ */
+void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode_large *inode,
+ ext2_ino_t ino EXT2FS_ATTR((unused)), int adjust)
+{
+ struct dquot *dq;
+ dict_t *dict;
+ enum quota_type qtype;
+
+ if (!qctx)
+ return;
+
+ log_debug("ADJ_INODE: Inode: %u, UID/GID: %u/%u, adjust: %d", ino,
+ inode_uid(*inode),
+ inode_gid(*inode), adjust);
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (qtype == PRJQUOTA && !project_quota_valid(qctx))
+ continue;
+ dict = qctx->quota_dict[qtype];
+ if (dict) {
+ dq = get_dq(dict, get_qid(inode, qtype));
+ if (dq)
+ dq->dq_dqb.dqb_curinodes += adjust;
+ }
+ }
+}
+
+errcode_t quota_compute_usage(quota_ctx_t qctx)
+{
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ errcode_t ret;
+ struct ext2_inode_large *inode;
+ int inode_size;
+ qsize_t space;
+ ext2_inode_scan scan;
+
+ if (!qctx)
+ return 0;
+
+ fs = qctx->fs;
+ ret = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (ret) {
+ log_err("while opening inode scan. ret=%ld", ret);
+ return ret;
+ }
+ inode_size = fs->super->s_inode_size;
+ inode = malloc(inode_size);
+ if (!inode) {
+ ext2fs_close_inode_scan(scan);
+ return ENOMEM;
+ }
+ while (1) {
+ ret = ext2fs_get_next_inode_full(scan, &ino,
+ EXT2_INODE(inode), inode_size);
+ if (ret) {
+ log_err("while getting next inode. ret=%ld", ret);
+ ext2fs_close_inode_scan(scan);
+ free(inode);
+ return ret;
+ }
+ if (ino == 0)
+ break;
+ if (!inode->i_links_count)
+ continue;
+ if (ino == EXT2_ROOT_INO ||
+ (ino >= EXT2_FIRST_INODE(fs->super) &&
+ ino != quota_type2inum(PRJQUOTA, fs->super) &&
+ ino != fs->super->s_orphan_file_inum)) {
+ space = ext2fs_get_stat_i_blocks(fs,
+ EXT2_INODE(inode)) << 9;
+ quota_data_add(qctx, inode, ino, space);
+ quota_data_inodes(qctx, inode, ino, +1);
+ }
+ }
+
+ ext2fs_close_inode_scan(scan);
+ free(inode);
+ return 0;
+}
+
+struct scan_dquots_data {
+ dict_t *quota_dict;
+ int update_limits; /* update limits from disk */
+ int update_usage;
+ int check_consistency;
+ int usage_is_inconsistent;
+};
+
+static int scan_dquots_callback(struct dquot *dquot, void *cb_data)
+{
+ struct scan_dquots_data *scan_data = cb_data;
+ dict_t *quota_dict = scan_data->quota_dict;
+ struct dquot *dq;
+
+ dq = get_dq(quota_dict, dquot->dq_id);
+ if (!dq)
+ return -1;
+ dq->dq_id = dquot->dq_id;
+ dq->dq_flags |= DQF_SEEN;
+
+ print_dquot("mem", dq);
+ print_dquot("dsk", dquot);
+
+ /* Check if there is inconsistency */
+ if (scan_data->check_consistency &&
+ (dq->dq_dqb.dqb_curspace != dquot->dq_dqb.dqb_curspace ||
+ dq->dq_dqb.dqb_curinodes != dquot->dq_dqb.dqb_curinodes)) {
+ scan_data->usage_is_inconsistent = 1;
+ fprintf(stderr, "[QUOTA WARNING] Usage inconsistent for ID %u:"
+ "actual (%lld, %lld) != expected (%lld, %lld)\n",
+ dq->dq_id, (long long) dq->dq_dqb.dqb_curspace,
+ (long long) dq->dq_dqb.dqb_curinodes,
+ (long long) dquot->dq_dqb.dqb_curspace,
+ (long long) dquot->dq_dqb.dqb_curinodes);
+ }
+
+ if (scan_data->update_limits) {
+ dq->dq_dqb.dqb_ihardlimit = dquot->dq_dqb.dqb_ihardlimit;
+ dq->dq_dqb.dqb_isoftlimit = dquot->dq_dqb.dqb_isoftlimit;
+ dq->dq_dqb.dqb_bhardlimit = dquot->dq_dqb.dqb_bhardlimit;
+ dq->dq_dqb.dqb_bsoftlimit = dquot->dq_dqb.dqb_bsoftlimit;
+ }
+
+ if (scan_data->update_usage) {
+ dq->dq_dqb.dqb_curspace = dquot->dq_dqb.dqb_curspace;
+ dq->dq_dqb.dqb_curinodes = dquot->dq_dqb.dqb_curinodes;
+ }
+
+ return 0;
+}
+
+/*
+ * Read quotas from disk and updates the in-memory information determined by
+ * 'flags' from the on-disk data.
+ */
+errcode_t quota_read_all_dquots(quota_ctx_t qctx, ext2_ino_t qf_ino,
+ enum quota_type qtype, unsigned int flags)
+{
+ struct scan_dquots_data scan_data;
+ struct quota_handle *qh;
+ errcode_t err;
+
+ if (!qctx)
+ return 0;
+
+ err = ext2fs_get_mem(sizeof(struct quota_handle), &qh);
+ if (err) {
+ log_debug("Unable to allocate quota handle");
+ return err;
+ }
+
+ err = quota_file_open(qctx, qh, qf_ino, qtype, -1, 0);
+ if (err) {
+ log_debug("Open quota file failed");
+ goto out;
+ }
+
+ scan_data.quota_dict = qctx->quota_dict[qh->qh_type];
+ scan_data.check_consistency = 0;
+ scan_data.update_limits = !!(flags & QREAD_LIMITS);
+ scan_data.update_usage = !!(flags & QREAD_USAGE);
+ qh->qh_ops->scan_dquots(qh, scan_dquots_callback, &scan_data);
+
+ err = quota_file_close(qctx, qh);
+ if (err) {
+ log_debug("Cannot finish IO on new quotafile: %s",
+ strerror(errno));
+ if (qh->qh_qf.e2_file)
+ ext2fs_file_close(qh->qh_qf.e2_file);
+ }
+out:
+ ext2fs_free_mem(&qh);
+ return err;
+}
+
+/*
+ * Compares the measured quota in qctx->quota_dict with that in the quota inode
+ * on disk and updates the limits in qctx->quota_dict. 'usage_inconsistent' is
+ * set to 1 if the supplied and on-disk quota usage values are not identical.
+ */
+errcode_t quota_compare_and_update(quota_ctx_t qctx, enum quota_type qtype,
+ int *usage_inconsistent)
+{
+ struct quota_handle qh;
+ struct scan_dquots_data scan_data;
+ struct dquot *dq;
+ dnode_t *n;
+ dict_t *dict = qctx->quota_dict[qtype];
+ errcode_t err = 0;
+
+ if (!dict)
+ goto out;
+
+ err = quota_file_open(qctx, &qh, 0, qtype, -1, 0);
+ if (err) {
+ log_debug("Open quota file failed");
+ goto out;
+ }
+
+ scan_data.quota_dict = qctx->quota_dict[qtype];
+ scan_data.update_limits = 1;
+ scan_data.update_usage = 0;
+ scan_data.check_consistency = 1;
+ scan_data.usage_is_inconsistent = 0;
+ err = qh.qh_ops->scan_dquots(&qh, scan_dquots_callback, &scan_data);
+ if (err) {
+ log_debug("Error scanning dquots");
+ *usage_inconsistent = 1;
+ goto out_close_qh;
+ }
+
+ for (n = dict_first(dict); n; n = dict_next(dict, n)) {
+ dq = dnode_get(n);
+ if (!dq)
+ continue;
+ if ((dq->dq_flags & DQF_SEEN) == 0) {
+ fprintf(stderr, "[QUOTA WARNING] "
+ "Missing quota entry ID %d\n", dq->dq_id);
+ scan_data.usage_is_inconsistent = 1;
+ }
+ }
+ *usage_inconsistent = scan_data.usage_is_inconsistent;
+
+out_close_qh:
+ err = quota_file_close(qctx, &qh);
+ if (err) {
+ log_debug("Cannot close quotafile: %s", error_message(errno));
+ if (qh.qh_qf.e2_file)
+ ext2fs_file_close(qh.qh_qf.e2_file);
+ }
+out:
+ return err;
+}
+
+int parse_quota_opts(const char *opts, int (*func)(char *))
+{
+ char *buf, *token, *next, *p;
+ int len;
+ int ret = 0;
+
+ len = strlen(opts);
+ buf = malloc(len + 1);
+ if (!buf) {
+ fprintf(stderr,
+ "Couldn't allocate memory to parse quota options!\n");
+ return -ENOMEM;
+ }
+ strcpy(buf, opts);
+ for (token = buf; token && *token; token = next) {
+ p = strchr(token, ',');
+ next = 0;
+ if (p) {
+ *p = 0;
+ next = p + 1;
+ }
+ ret = func(token);
+ if (ret)
+ break;
+ }
+ free(buf);
+ return ret;
+}
diff --git a/lib/support/nls-enable.h b/lib/support/nls-enable.h
new file mode 100644
index 0000000..2f62c01
--- /dev/null
+++ b/lib/support/nls-enable.h
@@ -0,0 +1,21 @@
+#if defined(ENABLE_NLS) && !defined(DEBUGFS)
+#include <libintl.h>
+#include <locale.h>
+#define _(a) (gettext (a))
+#ifdef gettext_noop
+#define N_(a) gettext_noop (a)
+#else
+#define N_(a) (a)
+#endif
+#define P_(singular, plural, n) (ngettext (singular, plural, n))
+#ifndef NLS_CAT_NAME
+#define NLS_CAT_NAME "e2fsprogs"
+#endif
+#ifndef LOCALEDIR
+#define LOCALEDIR "/usr/share/locale"
+#endif
+#else
+#define _(a) (a)
+#define N_(a) a
+#define P_(singular, plural, n) ((n) == 1 ? (singular) : (plural))
+#endif
diff --git a/lib/support/parse_qtype.c b/lib/support/parse_qtype.c
new file mode 100644
index 0000000..d8df07d
--- /dev/null
+++ b/lib/support/parse_qtype.c
@@ -0,0 +1,90 @@
+/*
+ * parse_qtype.c
+ */
+
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+
+#include "quotaio.h"
+
+#define PARSE_DELIM ":,"
+
+int parse_quota_types(const char *in_str, unsigned int *qtype_bits,
+ char **err_token)
+{
+ char *buf, *token, *next, *tmp;
+ unsigned int qtype = *qtype_bits;
+ int len, ret = 0;
+
+ if (!in_str)
+ return 0;
+
+ len = strlen(in_str);
+ buf = malloc(len + 1);
+ if (!buf)
+ return ENOMEM;
+ strcpy(buf, in_str);
+
+ for (token = buf, next = strtok_r(buf, PARSE_DELIM, &tmp);
+ token && *token; token = next) {
+ int not = 0;
+ char *p = token;
+
+ if (*p == '^') {
+ not = 1;
+ p++;
+ }
+ if (!strcmp(p, "usr") || !strcmp(p, "usrquota")) {
+ if (not)
+ qtype &= ~QUOTA_USR_BIT;
+ else
+ qtype |= QUOTA_USR_BIT;
+ } else if (!strcmp(p, "grp") || !strcmp(p, "grpquota")) {
+ if (not)
+ qtype &= ~QUOTA_GRP_BIT;
+ else
+ qtype |= QUOTA_GRP_BIT;
+ } else if (!strcmp(p, "prj") || !strcmp(p, "prjquota")) {
+ if (not)
+ qtype &= ~QUOTA_PRJ_BIT;
+ else
+ qtype |= QUOTA_PRJ_BIT;
+ } else {
+ if (err_token) {
+ *err_token = malloc(strlen(token) + 1);
+ if (*err_token)
+ strcpy(*err_token, token);
+ }
+ ret = EINVAL;
+ goto errout;
+ }
+#ifdef DEBUG_PROGRAM
+ printf("word: %s\n", token);
+#endif
+ next = strtok_r(NULL, PARSE_DELIM, &tmp);
+ }
+ *qtype_bits = qtype;
+errout:
+ free(buf);
+ return ret;
+}
+
+#ifdef DEBUG_PROGRAM
+int main(int argc, char **argv)
+{
+ unsigned int qtype_bits = 0;
+ int ret;
+ char *err_token = 0;
+
+ ret = parse_quota_types(argv[1], &qtype_bits, &err_token);
+ printf("parse_quota_types returns %d, %d\n", ret, qtype_bits);
+ if (err_token)
+ printf("err_token is %s\n", err_token);
+ return 0;
+}
+#endif
diff --git a/lib/support/plausible.c b/lib/support/plausible.c
new file mode 100644
index 0000000..65a6b2e
--- /dev/null
+++ b/lib/support/plausible.c
@@ -0,0 +1,287 @@
+/*
+ * plausible.c --- Figure out if a pathname is ext* or something else.
+ *
+ * Copyright 2014, Oracle, Inc.
+ *
+ * Some parts are:
+ * Copyright 1995, 1996, 1997, 1998, 1999, 2000 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include <fcntl.h>
+#include <time.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_MAGIC_H
+#include <magic.h>
+#endif
+#include "plausible.h"
+#include "ext2fs/ext2fs.h"
+#include "nls-enable.h"
+#include "blkid/blkid.h"
+
+#ifdef HAVE_MAGIC_H
+static magic_t (*dl_magic_open)(int);
+static const char *(*dl_magic_file)(magic_t, const char *);
+static int (*dl_magic_load)(magic_t, const char *);
+static void (*dl_magic_close)(magic_t);
+
+/*
+ * NO_CHECK functionality was only added in file 4.20.
+ * Older systems like RHEL 5.x still have file 4.17
+ */
+#ifndef MAGIC_NO_CHECK_COMPRESS
+#define MAGIC_NO_CHECK_COMPRESS 0x0001000
+#endif
+#ifndef MAGIC_NO_CHECK_ELF
+#define MAGIC_NO_CHECK_ELF 0x0010000
+#endif
+
+#ifdef HAVE_DLOPEN
+#include <dlfcn.h>
+
+static void *magic_handle;
+
+static int magic_library_available(void)
+{
+ if (!magic_handle) {
+ magic_handle = dlopen("libmagic.so.1", RTLD_NOW);
+ if (!magic_handle)
+ return 0;
+
+ dl_magic_open = (magic_t (*)(int))
+ dlsym(magic_handle, "magic_open");
+ dl_magic_file = (const char *(*)(magic_t, const char *))
+ dlsym(magic_handle, "magic_file");
+ dl_magic_load = (int (*)(magic_t, const char *))
+ dlsym(magic_handle, "magic_load");
+ dl_magic_close = (void (*)(magic_t))
+ dlsym(magic_handle, "magic_close");
+ }
+
+ if (!dl_magic_open || !dl_magic_file ||
+ !dl_magic_load || !dl_magic_close)
+ return 0;
+ return 1;
+}
+#else
+static int magic_library_available(void)
+{
+ dl_magic_open = magic_open;
+ dl_magic_file = magic_file;
+ dl_magic_load = magic_load;
+ dl_magic_close = magic_close;
+
+ return 1;
+}
+#endif
+#endif
+
+static void print_ext2_info(const char *device)
+
+{
+ struct ext2_super_block *sb;
+ ext2_filsys fs;
+ errcode_t retval;
+ time_t tm;
+
+ retval = ext2fs_open2(device, 0, EXT2_FLAG_64BITS, 0, 0,
+ default_io_manager, &fs);
+ if (retval)
+ return;
+ sb = fs->super;
+
+ if (sb->s_mtime) {
+ tm = sb->s_mtime;
+ if (sb->s_last_mounted[0])
+ printf(_("\tlast mounted on %.*s on %s"),
+ EXT2_LEN_STR(sb->s_last_mounted), ctime(&tm));
+ else
+ printf(_("\tlast mounted on %s"), ctime(&tm));
+ } else if (sb->s_mkfs_time) {
+ tm = sb->s_mkfs_time;
+ printf(_("\tcreated on %s"), ctime(&tm));
+ } else if (sb->s_wtime) {
+ tm = sb->s_wtime;
+ printf(_("\tlast modified on %s"), ctime(&tm));
+ }
+ ext2fs_close_free(&fs);
+}
+
+/*
+ * return 1 if there is no partition table, 0 if a partition table is
+ * detected, and -1 on an error.
+ */
+#ifdef HAVE_BLKID_PROBE_ENABLE_PARTITIONS
+static int check_partition_table(const char *device)
+{
+ blkid_probe pr;
+ const char *value;
+ int ret;
+
+ pr = blkid_new_probe_from_filename(device);
+ if (!pr)
+ return -1;
+
+ ret = blkid_probe_enable_partitions(pr, 1);
+ if (ret < 0)
+ goto errout;
+
+ ret = blkid_probe_enable_superblocks(pr, 0);
+ if (ret < 0)
+ goto errout;
+
+ ret = blkid_do_fullprobe(pr);
+ if (ret < 0)
+ goto errout;
+
+ ret = blkid_probe_lookup_value(pr, "PTTYPE", &value, NULL);
+ if (ret == 0)
+ fprintf(stderr, _("Found a %s partition table in %s\n"),
+ value, device);
+ else
+ ret = 1;
+
+errout:
+ blkid_free_probe(pr);
+ return ret;
+}
+#else
+static int check_partition_table(const char *device EXT2FS_ATTR((unused)))
+{
+ return -1;
+}
+#endif
+
+/*
+ * return 1 if the device looks plausible, creating the file if necessary
+ */
+int check_plausibility(const char *device, int flags, int *ret_is_dev)
+{
+ int fd, ret, is_dev = 0;
+ ext2fs_struct_stat s;
+ int fl = O_RDONLY;
+ blkid_cache cache = NULL;
+ char *fs_type = NULL;
+ char *fs_label = NULL;
+
+ fd = ext2fs_open_file(device, fl, 0666);
+ if ((fd < 0) && (errno == ENOENT) && (flags & NO_SIZE)) {
+ fprintf(stderr, _("The file %s does not exist and no "
+ "size was specified.\n"), device);
+ exit(1);
+ }
+ if ((fd < 0) && (errno == ENOENT) && (flags & CREATE_FILE)) {
+ fl |= O_CREAT;
+ fd = ext2fs_open_file(device, fl, 0666);
+ if (fd >= 0 && (flags & VERBOSE_CREATE))
+ printf(_("Creating regular file %s\n"), device);
+ }
+ if (fd < 0) {
+ fprintf(stderr, _("Could not open %s: %s\n"),
+ device, error_message(errno));
+ if (errno == ENOENT)
+ fputs(_("\nThe device apparently does not exist; "
+ "did you specify it correctly?\n"), stderr);
+ exit(1);
+ }
+
+ if (ext2fs_fstat(fd, &s) < 0) {
+ perror("stat");
+ exit(1);
+ }
+ close(fd);
+
+ if (S_ISBLK(s.st_mode))
+ is_dev = 1;
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ /* On FreeBSD, all disk devices are character specials */
+ if (S_ISCHR(s.st_mode))
+ is_dev = 1;
+#endif
+ if (ret_is_dev)
+ *ret_is_dev = is_dev;
+
+ if ((flags & CHECK_BLOCK_DEV) && !is_dev) {
+ printf(_("%s is not a block special device.\n"), device);
+ return 0;
+ }
+
+ /*
+ * Note: we use the older-style blkid API's here because we
+ * want as much functionality to be available when using the
+ * internal blkid library, when e2fsprogs is compiled for
+ * non-Linux systems that will probably not have the libraries
+ * from util-linux available. We only use the newer
+ * blkid-probe interfaces to access functionality not
+ * available in the original blkid library.
+ */
+ if ((flags & CHECK_FS_EXIST) && blkid_get_cache(&cache, NULL) >= 0) {
+ fs_type = blkid_get_tag_value(cache, "TYPE", device);
+ if (fs_type)
+ fs_label = blkid_get_tag_value(cache, "LABEL", device);
+ blkid_put_cache(cache);
+ }
+
+ if (fs_type) {
+ if (fs_label)
+ printf(_("%s contains a %s file system labelled '%s'\n"),
+ device, fs_type, fs_label);
+ else
+ printf(_("%s contains a %s file system\n"), device,
+ fs_type);
+ if (strncmp(fs_type, "ext", 3) == 0)
+ print_ext2_info(device);
+ free(fs_type);
+ free(fs_label);
+ return 0;
+ }
+
+#ifdef HAVE_MAGIC_H
+ if ((flags & CHECK_FS_EXIST) &&
+ !getenv("E2FSPROGS_LIBMAGIC_SUPPRESS") &&
+ magic_library_available()) {
+ const char *msg;
+ magic_t mag;
+ int has_magic = 0;
+
+ mag = dl_magic_open(MAGIC_RAW | MAGIC_SYMLINK | MAGIC_DEVICES |
+ MAGIC_ERROR | MAGIC_NO_CHECK_ELF |
+ MAGIC_NO_CHECK_COMPRESS);
+ dl_magic_load(mag, NULL);
+
+ msg = dl_magic_file(mag, device);
+ if (msg && strcmp(msg, "data") && strcmp(msg, "empty")) {
+ printf(_("%s contains `%s' data\n"), device, msg);
+ has_magic = 1;
+ }
+
+ dl_magic_close(mag);
+ return !has_magic;
+ }
+#endif
+ if (flags & CHECK_FS_EXIST) {
+ ret = check_partition_table(device);
+ if (ret >= 0)
+ return ret;
+ }
+ return 1;
+}
+
diff --git a/lib/support/plausible.h b/lib/support/plausible.h
new file mode 100644
index 0000000..b85150c
--- /dev/null
+++ b/lib/support/plausible.h
@@ -0,0 +1,29 @@
+/*
+ * plausible.h --- header file defining prototypes for helper functions
+ * used by tune2fs and mke2fs
+ *
+ * Copyright 2014 by Oracle, Inc.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef PLAUSIBLE_H_
+#define PLAUSIBLE_H_
+
+/*
+ * Flags for check_plausibility()
+ */
+#define CHECK_BLOCK_DEV 0x0001
+#define CREATE_FILE 0x0002
+#define CHECK_FS_EXIST 0x0004
+#define VERBOSE_CREATE 0x0008
+#define NO_SIZE 0x0010
+#define QUIET_CHECK 0x0020
+
+extern int check_plausibility(const char *device, int flags,
+ int *ret_is_dev);
+
+#endif /* PLAUSIBLE_H_ */
diff --git a/lib/support/print_fs_flags.c b/lib/support/print_fs_flags.c
new file mode 100644
index 0000000..f47cd66
--- /dev/null
+++ b/lib/support/print_fs_flags.c
@@ -0,0 +1,75 @@
+/*
+ * print_flags.c - Print ext2_filsys flags
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "ext2fs/ext2fs.h"
+
+struct flags_name {
+ unsigned long flag;
+ const char *name;
+};
+
+static const struct flags_name flags_array[] = {
+ { EXT2_FLAG_RW, "EXT2_FLAG_RW" },
+ { EXT2_FLAG_CHANGED, "EXT2_FLAG_CHANGED" },
+ { EXT2_FLAG_DIRTY, "EXT2_FLAG_DIRTY" },
+ { EXT2_FLAG_VALID, "EXT2_FLAG_VALID" },
+ { EXT2_FLAG_IB_DIRTY, "EXT2_FLAG_IB_DIRTY" },
+ { EXT2_FLAG_BB_DIRTY, "EXT2_FLAG_BB_DIRTY" },
+ { EXT2_FLAG_SWAP_BYTES, "EXT2_FLAG_SWAP_BYTES" },
+ { EXT2_FLAG_SWAP_BYTES_READ, "EXT2_FLAG_SWAP_BYTES_READ" },
+ { EXT2_FLAG_SWAP_BYTES_WRITE, "EXT2_FLAG_SWAP_BYTES_WRITE" },
+ { EXT2_FLAG_MASTER_SB_ONLY, "EXT2_FLAG_MASTER_SB_ONLY" },
+ { EXT2_FLAG_FORCE, "EXT2_FLAG_FORCE" },
+ { EXT2_FLAG_SUPER_ONLY, "EXT2_FLAG_SUPER_ONLY" },
+ { EXT2_FLAG_JOURNAL_DEV_OK, "EXT2_FLAG_JOURNAL_DEV_OK" },
+ { EXT2_FLAG_IMAGE_FILE, "EXT2_FLAG_IMAGE_FILE" },
+ { EXT2_FLAG_EXCLUSIVE, "EXT2_FLAG_EXCLUSIVE" },
+ { EXT2_FLAG_SOFTSUPP_FEATURES, "EXT2_FLAG_SOFTSUPP_FEATURES" },
+ { EXT2_FLAG_NOFREE_ON_ERROR, "EXT2_FLAG_NOFREE_ON_ERROR" },
+ { EXT2_FLAG_64BITS, "EXT2_FLAG_64BITS" },
+ { EXT2_FLAG_PRINT_PROGRESS, "EXT2_FLAG_PRINT_PROGRESS" },
+ { EXT2_FLAG_DIRECT_IO, "EXT2_FLAG_DIRECT_IO" },
+ { EXT2_FLAG_SKIP_MMP, "EXT2_FLAG_SKIP_MMP" },
+ { EXT2_FLAG_IGNORE_CSUM_ERRORS, "EXT2_FLAG_IGNORE_CSUM_ERRORS" },
+ { EXT2_FLAG_SHARE_DUP, "EXT2_FLAG_SHARE_DUP" },
+ { EXT2_FLAG_IGNORE_SB_ERRORS, "EXT2_FLAG_IGNORE_SB_ERRORS" },
+ { EXT2_FLAG_BBITMAP_TAIL_PROBLEM, "EXT2_FLAG_BBITMAP_TAIL_PROBLEM" },
+ { EXT2_FLAG_IBITMAP_TAIL_PROBLEM, "EXT2_FLAG_IBITMAP_TAIL_PROBLEM" },
+ { EXT2_FLAG_THREADS, "EXT2_FLAG_THREADS" },
+ { 0, NULL },
+};
+
+void print_fs_flags(FILE * f, unsigned long flags)
+{
+ const struct flags_name *fp;
+ int first = 1, pos = 16;
+
+ for (fp = flags_array; fp->flag != 0; fp++) {
+ if ((flags & fp->flag) == 0)
+ continue;
+ pos += strlen(fp->name) + 1;
+ if (pos > 72) {
+ fputs("\n\t", f);
+ pos = 9 + strlen(fp->name);
+ }
+ if (first)
+ first = 0;
+ else
+ fputc(' ', f);
+ fputs(fp->name, f);
+ }
+ fputc('\n', f);
+}
diff --git a/lib/support/print_fs_flags.h b/lib/support/print_fs_flags.h
new file mode 100644
index 0000000..bdd58a0
--- /dev/null
+++ b/lib/support/print_fs_flags.h
@@ -0,0 +1,5 @@
+/*
+ * print_flags.h -- header file for printing the fs flags
+ */
+
+void print_fs_flags(FILE * f, unsigned long flags);
diff --git a/lib/support/prof_err.et b/lib/support/prof_err.et
new file mode 100644
index 0000000..c9316c7
--- /dev/null
+++ b/lib/support/prof_err.et
@@ -0,0 +1,66 @@
+error_table prof
+
+error_code PROF_VERSION, "Profile version 0.0"
+
+#
+# generated by prof_tree.c
+#
+error_code PROF_MAGIC_NODE, "Bad magic value in profile_node"
+error_code PROF_NO_SECTION, "Profile section not found"
+error_code PROF_NO_RELATION, "Profile relation not found"
+error_code PROF_ADD_NOT_SECTION,
+ "Attempt to add a relation to node which is not a section"
+error_code PROF_SECTION_WITH_VALUE,
+ "A profile section header has a non-zero value"
+error_code PROF_BAD_LINK_LIST, "Bad linked list in profile structures"
+error_code PROF_BAD_GROUP_LVL, "Bad group level in profile structures"
+error_code PROF_BAD_PARENT_PTR,
+ "Bad parent pointer in profile structures"
+error_code PROF_MAGIC_ITERATOR, "Bad magic value in profile iterator"
+error_code PROF_SET_SECTION_VALUE, "Can't set value on section node"
+error_code PROF_EINVAL, "Invalid argument passed to profile library"
+error_code PROF_READ_ONLY, "Attempt to modify read-only profile"
+
+#
+# generated by prof_parse.c
+#
+
+error_code PROF_SECTION_NOTOP, "Profile section header not at top level"
+error_code PROF_SECTION_SYNTAX, "Syntax error in profile section header"
+error_code PROF_RELATION_SYNTAX, "Syntax error in profile relation"
+error_code PROF_EXTRA_CBRACE, "Extra closing brace in profile"
+error_code PROF_MISSING_OBRACE, "Missing open brace in profile"
+
+#
+# generated by prof_init.c
+#
+error_code PROF_MAGIC_PROFILE, "Bad magic value in profile_t"
+error_code PROF_MAGIC_SECTION, "Bad magic value in profile_section_t"
+error_code PROF_TOPSECTION_ITER_NOSUPP,
+ "Iteration through all top level section not supported"
+error_code PROF_INVALID_SECTION, "Invalid profile_section object"
+error_code PROF_END_OF_SECTIONS, "No more sections"
+error_code PROF_BAD_NAMESET, "Bad nameset passed to query routine"
+error_code PROF_NO_PROFILE, "No profile file open"
+
+#
+# generated by prof_file.c
+#
+error_code PROF_MAGIC_FILE, "Bad magic value in profile_file_t"
+error_code PROF_FAIL_OPEN, "Couldn't open profile file"
+
+#
+# generated by prof_set.c
+#
+error_code PROF_EXISTS, "Section already exists"
+
+#
+# generated by prof_get.c
+#
+error_code PROF_BAD_BOOLEAN, "Invalid boolean value"
+error_code PROF_BAD_INTEGER, "Invalid integer value"
+
+error_code PROF_MAGIC_FILE_DATA, "Bad magic value in profile_file_data_t"
+
+
+end
diff --git a/lib/support/profile.c b/lib/support/profile.c
new file mode 100644
index 0000000..bdb14b1
--- /dev/null
+++ b/lib/support/profile.c
@@ -0,0 +1,1910 @@
+/*
+ * profile.c -- A simple configuration file parsing "library in a file"
+ *
+ * The profile library was originally written by Theodore Ts'o in 1995
+ * for use in the MIT Kerberos v5 library. It has been
+ * modified/enhanced/bug-fixed over time by other members of the MIT
+ * Kerberos team. This version was originally taken from the Kerberos
+ * v5 distribution, version 1.4.2, and radically simplified for use in
+ * e2fsprogs. (Support for locking for multi-threaded operations,
+ * being able to modify and update the configuration file
+ * programmatically, and Mac/Windows portability have been removed.
+ * It has been folded into a single C source file to make it easier to
+ * fold into an application program.)
+ *
+ * Copyright (C) 2005, 2006 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * Copyright (C) 1985-2005 by the Massachusetts Institute of Technology.
+ *
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government. It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original MIT software.
+ * M.I.T. makes no representations about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#include "config.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <time.h>
+#include <string.h>
+#include <strings.h>
+#include <errno.h>
+#include <ctype.h>
+#include <limits.h>
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+
+#include <et/com_err.h>
+#include "profile.h"
+#include "prof_err.h"
+
+#undef STAT_ONCE_PER_SECOND
+#undef HAVE_STAT
+
+/*
+ * prof_int.h
+ */
+
+typedef long prf_magic_t;
+
+/*
+ * This is the structure which stores the profile information for a
+ * particular configuration file.
+ */
+struct _prf_file_t {
+ prf_magic_t magic;
+ char *filespec;
+#ifdef STAT_ONCE_PER_SECOND
+ time_t last_stat;
+#endif
+ time_t timestamp; /* time tree was last updated from file */
+ int flags; /* r/w, dirty */
+ int upd_serial; /* incremented when data changes */
+ struct profile_node *root;
+ struct _prf_file_t *next;
+};
+
+typedef struct _prf_file_t *prf_file_t;
+
+/*
+ * The profile flags
+ */
+#define PROFILE_FILE_RW 0x0001
+#define PROFILE_FILE_DIRTY 0x0002
+#define PROFILE_FILE_NO_RELOAD 0x0004
+
+/*
+ * This structure defines the high-level, user visible profile_t
+ * object, which is used as a handle by users who need to query some
+ * configuration file(s)
+ */
+struct _profile_t {
+ prf_magic_t magic;
+ prf_file_t first_file;
+};
+
+/*
+ * Used by the profile iterator in prof_get.c
+ */
+#define PROFILE_ITER_LIST_SECTION 0x0001
+#define PROFILE_ITER_SECTIONS_ONLY 0x0002
+#define PROFILE_ITER_RELATIONS_ONLY 0x0004
+
+#define PROFILE_ITER_FINAL_SEEN 0x0100
+
+/*
+ * Check if a filespec is last in a list (NULL on UNIX, invalid FSSpec on MacOS
+ */
+
+#define PROFILE_LAST_FILESPEC(x) (((x) == NULL) || ((x)[0] == '\0'))
+
+struct profile_node {
+ errcode_t magic;
+ char *name;
+ char *value;
+ int group_level;
+ unsigned int final:1; /* Indicate don't search next file */
+ unsigned int deleted:1;
+ struct profile_node *first_child;
+ struct profile_node *parent;
+ struct profile_node *next, *prev;
+};
+
+#define CHECK_MAGIC(node) \
+ if ((node)->magic != PROF_MAGIC_NODE) \
+ return PROF_MAGIC_NODE;
+
+/* profile parser declarations */
+struct parse_state {
+ int state;
+ int group_level;
+ int line_num;
+ struct profile_node *root_section;
+ struct profile_node *current_section;
+};
+
+static const char *default_filename = "<default>";
+
+static profile_syntax_err_cb_t syntax_err_cb;
+
+static errcode_t parse_line(char *line, struct parse_state *state);
+
+#ifdef DEBUG_PROGRAM
+static errcode_t profile_write_tree_file
+ (struct profile_node *root, FILE *dstfile);
+
+static errcode_t profile_write_tree_to_buffer
+ (struct profile_node *root, char **buf);
+#endif
+
+
+static void profile_free_node
+ (struct profile_node *relation);
+
+static errcode_t profile_create_node
+ (const char *name, const char *value,
+ struct profile_node **ret_node);
+
+#ifdef DEBUG_PROGRAM
+static errcode_t profile_verify_node
+ (struct profile_node *node);
+#endif
+
+static errcode_t profile_add_node
+ (struct profile_node *section,
+ const char *name, const char *value,
+ struct profile_node **ret_node);
+
+static errcode_t profile_find_node
+ (struct profile_node *section,
+ const char *name, const char *value,
+ int section_flag, void **state,
+ struct profile_node **node);
+
+static errcode_t profile_node_iterator
+ (void **iter_p, struct profile_node **ret_node,
+ char **ret_name, char **ret_value);
+
+static errcode_t profile_open_file
+ (const char * file, prf_file_t *ret_prof);
+
+static errcode_t profile_update_file
+ (prf_file_t prf);
+
+static void profile_free_file
+ (prf_file_t profile);
+
+static errcode_t profile_get_value(profile_t profile, const char *name,
+ const char *subname, const char *subsubname,
+ const char **ret_value);
+
+
+/*
+ * prof_init.c --- routines that manipulate the user-visible profile_t
+ * object.
+ */
+
+static int compstr(const void *m1, const void *m2)
+{
+ const char *s1 = *((const char * const *) m1);
+ const char *s2 = *((const char * const *) m2);
+
+ return strcmp(s1, s2);
+}
+
+static void free_list(char **list)
+{
+ char **cp;
+
+ if (list == 0)
+ return;
+
+ for (cp = list; *cp; cp++)
+ free(*cp);
+ free(list);
+}
+
+static errcode_t get_dirlist(const char *dirname, char***ret_array)
+{
+ DIR *dir;
+ struct dirent *de;
+ struct stat st;
+ errcode_t retval;
+ char *fn, *cp;
+ char **array = 0, **new_array;
+ int max = 0, num = 0;
+
+ dir = opendir(dirname);
+ if (!dir)
+ return errno;
+
+ while ((de = readdir(dir)) != NULL) {
+ for (cp = de->d_name; *cp; cp++) {
+ if (!isalnum(*cp) &&
+ (*cp != '-') &&
+ (*cp != '_'))
+ break;
+ }
+ if (*cp)
+ continue;
+ fn = malloc(strlen(dirname) + strlen(de->d_name) + 2);
+ if (!fn) {
+ retval = ENOMEM;
+ goto errout;
+ }
+ sprintf(fn, "%s/%s", dirname, de->d_name);
+ if ((stat(fn, &st) < 0) || !S_ISREG(st.st_mode)) {
+ free(fn);
+ continue;
+ }
+ if (num >= max) {
+ max += 10;
+ new_array = realloc(array, sizeof(char *) * (max+1));
+ if (!new_array) {
+ retval = ENOMEM;
+ free(fn);
+ goto errout;
+ }
+ array = new_array;
+ }
+ array[num++] = fn;
+ }
+ if (array) {
+ qsort(array, num, sizeof(char *), compstr);
+ array[num++] = 0;
+ }
+ *ret_array = array;
+ closedir(dir);
+ return 0;
+errout:
+ if (array)
+ array[num] = 0;
+ closedir(dir);
+ free_list(array);
+ return retval;
+}
+
+errcode_t
+profile_init(const char * const *files, profile_t *ret_profile)
+{
+ const char * const *fs;
+ profile_t profile;
+ prf_file_t new_file, *last;
+ errcode_t retval = 0;
+ char **cpp, *cp, **array = 0;
+
+ profile = malloc(sizeof(struct _profile_t));
+ if (!profile)
+ return ENOMEM;
+ memset(profile, 0, sizeof(struct _profile_t));
+ profile->magic = PROF_MAGIC_PROFILE;
+ last = &profile->first_file;
+
+ /* if the filenames list is not specified return an empty profile */
+ if ( files ) {
+ for (fs = files; !PROFILE_LAST_FILESPEC(*fs); fs++) {
+ if (array)
+ free_list(array);
+ array = NULL;
+ retval = get_dirlist(*fs, &array);
+ if (retval == 0) {
+ if (!array)
+ continue;
+ for (cpp = array; (cp = *cpp); cpp++) {
+ retval = profile_open_file(cp, &new_file);
+ if (retval == EACCES)
+ continue;
+ if (retval)
+ goto errout;
+ *last = new_file;
+ last = &new_file->next;
+ }
+ } else if ((retval != ENOTDIR) &&
+ strcmp(*fs, default_filename))
+ goto errout;
+
+ retval = profile_open_file(*fs, &new_file);
+ /* if this file is missing, skip to the next */
+ if (retval == ENOENT || retval == EACCES) {
+ continue;
+ }
+ if (retval)
+ goto errout;
+ *last = new_file;
+ last = &new_file->next;
+ }
+ /*
+ * If all the files were not found, return the appropriate error.
+ */
+ if (!profile->first_file) {
+ retval = ENOENT;
+ goto errout;
+ }
+ }
+
+ free_list(array);
+ *ret_profile = profile;
+ return 0;
+errout:
+ free_list(array);
+ profile_release(profile);
+ return retval;
+}
+
+void
+profile_release(profile_t profile)
+{
+ prf_file_t p, next;
+
+ if (!profile || profile->magic != PROF_MAGIC_PROFILE)
+ return;
+
+ for (p = profile->first_file; p; p = next) {
+ next = p->next;
+ profile_free_file(p);
+ }
+ profile->magic = 0;
+ free(profile);
+}
+
+/*
+ * This function sets the value of the pseudo file "<default>". If
+ * the file "<default>" had previously been passed to profile_init(),
+ * then def_string parameter will be parsed and used as the profile
+ * information for the "<default>" file.
+ */
+errcode_t profile_set_default(profile_t profile, const char *def_string)
+{
+ struct parse_state state;
+ prf_file_t prf;
+ errcode_t retval;
+ const char *in;
+ char *line, *p, *end;
+ int line_size, len;
+
+ if (!def_string || !profile || profile->magic != PROF_MAGIC_PROFILE)
+ return PROF_MAGIC_PROFILE;
+
+ for (prf = profile->first_file; prf; prf = prf->next) {
+ if (strcmp(prf->filespec, default_filename) == 0)
+ break;
+ }
+ if (!prf)
+ return 0;
+
+ if (prf->root) {
+ profile_free_node(prf->root);
+ prf->root = 0;
+ }
+
+ memset(&state, 0, sizeof(struct parse_state));
+ retval = profile_create_node("(root)", 0, &state.root_section);
+ if (retval)
+ return retval;
+
+ line = 0;
+ line_size = 0;
+ in = def_string;
+ while (*in) {
+ end = strchr(in, '\n');
+ len = end ? (end - in) : (int) strlen(in);
+ if (len >= line_size) {
+ line_size = len+1;
+ p = realloc(line, line_size);
+ if (!p) {
+ retval = ENOMEM;
+ goto errout;
+ }
+ line = p;
+ }
+ memcpy(line, in, len);
+ line[len] = 0;
+ retval = parse_line(line, &state);
+ if (retval) {
+ errout:
+ if (syntax_err_cb)
+ (syntax_err_cb)(prf->filespec, retval,
+ state.line_num);
+ free(line);
+ if (prf->root)
+ profile_free_node(prf->root);
+ return retval;
+ }
+ if (!end)
+ break;
+ in = end+1;
+ }
+ prf->root = state.root_section;
+ free(line);
+
+ return 0;
+}
+
+/*
+ * prof_file.c ---- routines that manipulate an individual profile file.
+ */
+
+errcode_t profile_open_file(const char * filespec,
+ prf_file_t *ret_prof)
+{
+ prf_file_t prf;
+ errcode_t retval;
+ char *home_env = 0;
+ unsigned int len;
+ char *expanded_filename;
+
+ prf = malloc(sizeof(struct _prf_file_t));
+ if (!prf)
+ return ENOMEM;
+ memset(prf, 0, sizeof(struct _prf_file_t));
+ prf->magic = PROF_MAGIC_FILE;
+
+ len = strlen(filespec)+1;
+ if (filespec[0] == '~' && filespec[1] == '/') {
+ home_env = getenv("HOME");
+#ifdef HAVE_PWD_H
+ if (home_env == NULL) {
+#ifdef HAVE_GETWUID_R
+ struct passwd *pw, pwx;
+ uid_t uid;
+ char pwbuf[BUFSIZ];
+
+ uid = getuid();
+ if (!getpwuid_r(uid, &pwx, pwbuf, sizeof(pwbuf), &pw)
+ && pw != NULL && pw->pw_dir[0] != 0)
+ home_env = pw->pw_dir;
+#else
+ struct passwd *pw;
+
+ pw = getpwuid(getuid());
+ home_env = pw->pw_dir;
+#endif
+ }
+#endif
+ if (home_env)
+ len += strlen(home_env);
+ }
+ expanded_filename = malloc(len);
+ if (expanded_filename == 0) {
+ profile_free_file(prf);
+ return errno;
+ }
+ if (home_env) {
+ strcpy(expanded_filename, home_env);
+ strcat(expanded_filename, filespec+1);
+ } else
+ memcpy(expanded_filename, filespec, len);
+
+ prf->filespec = expanded_filename;
+
+ if (strcmp(prf->filespec, default_filename) != 0) {
+ retval = profile_update_file(prf);
+ if (retval) {
+ profile_free_file(prf);
+ return retval;
+ }
+ }
+
+ *ret_prof = prf;
+ return 0;
+}
+
+errcode_t profile_update_file(prf_file_t prf)
+{
+ errcode_t retval;
+#ifdef HAVE_STAT
+ struct stat st;
+#ifdef STAT_ONCE_PER_SECOND
+ time_t now;
+#endif
+#endif
+ FILE *f;
+ char buf[2048];
+ struct parse_state state;
+
+ if (prf->flags & PROFILE_FILE_NO_RELOAD)
+ return 0;
+
+#ifdef HAVE_STAT
+#ifdef STAT_ONCE_PER_SECOND
+ now = time(0);
+ if (now == prf->last_stat && prf->root != NULL) {
+ return 0;
+ }
+#endif
+ if (stat(prf->filespec, &st)) {
+ retval = errno;
+ return retval;
+ }
+#ifdef STAT_ONCE_PER_SECOND
+ prf->last_stat = now;
+#endif
+ if (st.st_mtime == prf->timestamp && prf->root != NULL) {
+ return 0;
+ }
+ if (prf->root) {
+ profile_free_node(prf->root);
+ prf->root = 0;
+ }
+#else
+ /*
+ * If we don't have the stat() call, assume that our in-core
+ * memory image is correct. That is, we won't reread the
+ * profile file if it changes.
+ */
+ if (prf->root) {
+ return 0;
+ }
+#endif
+ memset(&state, 0, sizeof(struct parse_state));
+ retval = profile_create_node("(root)", 0, &state.root_section);
+ if (retval)
+ return retval;
+ errno = 0;
+ f = fopen(prf->filespec, "r");
+ if (f == NULL) {
+ retval = errno;
+ if (retval == 0)
+ retval = ENOENT;
+ return retval;
+ }
+ prf->upd_serial++;
+ while (!feof(f)) {
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ break;
+ retval = parse_line(buf, &state);
+ if (retval) {
+ if (syntax_err_cb)
+ (syntax_err_cb)(prf->filespec, retval,
+ state.line_num);
+ fclose(f);
+ return retval;
+ }
+ }
+ prf->root = state.root_section;
+
+ fclose(f);
+
+#ifdef HAVE_STAT
+ prf->timestamp = st.st_mtime;
+#endif
+ return 0;
+}
+
+void profile_free_file(prf_file_t prf)
+{
+ if (prf->root)
+ profile_free_node(prf->root);
+ free(prf->filespec);
+ free(prf);
+}
+
+/* Begin the profile parser */
+
+profile_syntax_err_cb_t profile_set_syntax_err_cb(profile_syntax_err_cb_t hook)
+{
+ profile_syntax_err_cb_t old;
+
+ old = syntax_err_cb;
+ syntax_err_cb = hook;
+ return(old);
+}
+
+#define STATE_INIT_COMMENT 0
+#define STATE_STD_LINE 1
+#define STATE_GET_OBRACE 2
+
+static char *skip_over_blanks(char *cp)
+{
+ while (*cp && isspace((int) (*cp)))
+ cp++;
+ return cp;
+}
+
+static int end_or_comment(char ch)
+{
+ return (ch == 0 || ch == '#' || ch == ';');
+}
+
+static char *skip_over_nonblanks(char *cp)
+{
+ while (!end_or_comment(*cp) && !isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static void strip_line(char *line)
+{
+ char *p = line + strlen(line);
+ while (p > line && (p[-1] == '\n' || p[-1] == '\r'))
+ *p-- = 0;
+}
+
+static void parse_quoted_string(char *str)
+{
+ char *to, *from;
+
+ to = from = str;
+
+ for (to = from = str; *from && *from != '"'; to++, from++) {
+ if (*from == '\\') {
+ from++;
+ switch (*from) {
+ case 'n':
+ *to = '\n';
+ break;
+ case 't':
+ *to = '\t';
+ break;
+ case 'b':
+ *to = '\b';
+ break;
+ default:
+ *to = *from;
+ }
+ continue;
+ }
+ *to = *from;
+ }
+ *to = '\0';
+}
+
+static errcode_t parse_line(char *line, struct parse_state *state)
+{
+ char *cp, ch, *tag, *value;
+ char *p;
+ errcode_t retval;
+ struct profile_node *node;
+ int do_subsection = 0;
+ void *iter = 0;
+
+ state->line_num++;
+ if (state->state == STATE_GET_OBRACE) {
+ cp = skip_over_blanks(line);
+ if (*cp != '{')
+ return PROF_MISSING_OBRACE;
+ state->state = STATE_STD_LINE;
+ return 0;
+ }
+ if (state->state == STATE_INIT_COMMENT) {
+ if (line[0] != '[')
+ return 0;
+ state->state = STATE_STD_LINE;
+ }
+
+ if (*line == 0)
+ return 0;
+ strip_line(line);
+ cp = skip_over_blanks(line);
+ ch = *cp;
+ if (end_or_comment(ch))
+ return 0;
+ if (ch == '[') {
+ if (state->group_level > 0)
+ return PROF_SECTION_NOTOP;
+ cp++;
+ cp = skip_over_blanks(cp);
+ p = strchr(cp, ']');
+ if (p == NULL)
+ return PROF_SECTION_SYNTAX;
+ if (*cp == '"') {
+ cp++;
+ parse_quoted_string(cp);
+ } else {
+ *p-- = '\0';
+ while (isspace(*p) && (p > cp))
+ *p-- = '\0';
+ if (*cp == 0)
+ return PROF_SECTION_SYNTAX;
+ }
+ retval = profile_find_node(state->root_section, cp, 0, 1,
+ &iter, &state->current_section);
+ if (retval == PROF_NO_SECTION) {
+ retval = profile_add_node(state->root_section,
+ cp, 0,
+ &state->current_section);
+ if (retval)
+ return retval;
+ } else if (retval)
+ return retval;
+
+ /*
+ * Finish off the rest of the line.
+ */
+ cp = p+1;
+ if (*cp == '*') {
+ state->current_section->final = 1;
+ cp++;
+ }
+ /*
+ * Spaces or comments after ']' should not be fatal
+ */
+ cp = skip_over_blanks(cp);
+ if (!end_or_comment(*cp))
+ return PROF_SECTION_SYNTAX;
+ return 0;
+ }
+ if (ch == '}') {
+ if (state->group_level == 0)
+ return PROF_EXTRA_CBRACE;
+ if (*(cp+1) == '*')
+ state->current_section->final = 1;
+ state->current_section = state->current_section->parent;
+ state->group_level--;
+ return 0;
+ }
+ /*
+ * Parse the relations
+ */
+ tag = cp;
+ cp = strchr(cp, '=');
+ if (!cp)
+ return PROF_RELATION_SYNTAX;
+ if (cp == tag)
+ return PROF_RELATION_SYNTAX;
+ *cp = '\0';
+ if (*tag == '"') {
+ tag++;
+ parse_quoted_string(tag);
+ } else {
+ /* Look for whitespace on left-hand side. */
+ p = skip_over_nonblanks(tag);
+ if (*p)
+ *p++ = 0;
+ p = skip_over_blanks(p);
+ /* If we have more non-whitespace, it's an error. */
+ if (*p)
+ return PROF_RELATION_SYNTAX;
+ }
+
+ cp = skip_over_blanks(cp+1);
+ value = cp;
+ ch = value[0];
+ if (ch == '"') {
+ value++;
+ parse_quoted_string(value);
+ } else if (end_or_comment(ch)) {
+ do_subsection++;
+ state->state = STATE_GET_OBRACE;
+ } else if (value[0] == '{') {
+ cp = skip_over_blanks(value+1);
+ ch = *cp;
+ if (end_or_comment(ch))
+ do_subsection++;
+ else
+ return PROF_RELATION_SYNTAX;
+ } else {
+ cp = skip_over_nonblanks(value);
+ p = skip_over_blanks(cp);
+ ch = *p;
+ *cp = 0;
+ if (!end_or_comment(ch))
+ return PROF_RELATION_SYNTAX;
+ }
+ if (do_subsection) {
+ p = strchr(tag, '*');
+ if (p)
+ *p = '\0';
+ retval = profile_add_node(state->current_section,
+ tag, 0, &state->current_section);
+ if (retval)
+ return retval;
+ if (p)
+ state->current_section->final = 1;
+ state->group_level++;
+ return 0;
+ }
+ p = strchr(tag, '*');
+ if (p)
+ *p = '\0';
+ profile_add_node(state->current_section, tag, value, &node);
+ if (p)
+ node->final = 1;
+ return 0;
+}
+
+#ifdef DEBUG_PROGRAM
+/*
+ * Return TRUE if the string begins or ends with whitespace
+ */
+static int need_double_quotes(char *str)
+{
+ if (!str || !*str)
+ return 0;
+ if (isspace((int) (*str)) ||isspace((int) (*(str + strlen(str) - 1))))
+ return 1;
+ if (strchr(str, '\n') || strchr(str, '\t') || strchr(str, '\b') ||
+ strchr(str, ' ') || strchr(str, '#') || strchr(str, ';'))
+ return 1;
+ return 0;
+}
+
+/*
+ * Output a string with double quotes, doing appropriate backquoting
+ * of characters as necessary.
+ */
+static void output_quoted_string(char *str, void (*cb)(const char *,void *),
+ void *data)
+{
+ char ch;
+ char buf[2];
+
+ cb("\"", data);
+ if (!str) {
+ cb("\"", data);
+ return;
+ }
+ buf[1] = 0;
+ while ((ch = *str++)) {
+ switch (ch) {
+ case '\\':
+ cb("\\\\", data);
+ break;
+ case '\n':
+ cb("\\n", data);
+ break;
+ case '\t':
+ cb("\\t", data);
+ break;
+ case '\b':
+ cb("\\b", data);
+ break;
+ default:
+ /* This would be a lot faster if we scanned
+ forward for the next "interesting"
+ character. */
+ buf[0] = ch;
+ cb(buf, data);
+ break;
+ }
+ }
+ cb("\"", data);
+}
+
+#ifndef EOL
+#define EOL "\n"
+#endif
+
+/* Errors should be returned, not ignored! */
+static void dump_profile(struct profile_node *root, int level,
+ void (*cb)(const char *, void *), void *data)
+{
+ int i;
+ struct profile_node *p;
+ void *iter;
+ long retval;
+
+ iter = 0;
+ do {
+ retval = profile_find_node(root, 0, 0, 0, &iter, &p);
+ if (retval)
+ break;
+ for (i=0; i < level; i++)
+ cb("\t", data);
+ if (need_double_quotes(p->name))
+ output_quoted_string(p->name, cb, data);
+ else
+ cb(p->name, data);
+ cb(" = ", data);
+ if (need_double_quotes(p->value))
+ output_quoted_string(p->value, cb, data);
+ else
+ cb(p->value, data);
+ cb(EOL, data);
+ } while (iter != 0);
+
+ iter = 0;
+ do {
+ retval = profile_find_node(root, 0, 0, 1, &iter, &p);
+ if (retval)
+ break;
+ if (level == 0) { /* [xxx] */
+ cb("[", data);
+ if (need_double_quotes(p->name))
+ output_quoted_string(p->name, cb, data);
+ else
+ cb(p->name, data);
+ cb("]", data);
+ cb(p->final ? "*" : "", data);
+ cb(EOL, data);
+ dump_profile(p, level+1, cb, data);
+ cb(EOL, data);
+ } else { /* xxx = { ... } */
+ for (i=0; i < level; i++)
+ cb("\t", data);
+ if (need_double_quotes(p->name))
+ output_quoted_string(p->name, cb, data);
+ else
+ cb(p->name, data);
+ cb(" = {", data);
+ cb(EOL, data);
+ dump_profile(p, level+1, cb, data);
+ for (i=0; i < level; i++)
+ cb("\t", data);
+ cb("}", data);
+ cb(p->final ? "*" : "", data);
+ cb(EOL, data);
+ }
+ } while (iter != 0);
+}
+
+static void dump_profile_to_file_cb(const char *str, void *data)
+{
+ fputs(str, data);
+}
+
+errcode_t profile_write_tree_file(struct profile_node *root, FILE *dstfile)
+{
+ dump_profile(root, 0, dump_profile_to_file_cb, dstfile);
+ return 0;
+}
+
+struct prof_buf {
+ char *base;
+ size_t cur, max;
+ int err;
+};
+
+static void add_data_to_buffer(struct prof_buf *b, const void *d, size_t len)
+{
+ if (b->err)
+ return;
+ if (b->max - b->cur < len) {
+ size_t newsize;
+ char *newptr;
+
+ newsize = b->max + (b->max >> 1) + len + 1024;
+ newptr = realloc(b->base, newsize);
+ if (newptr == NULL) {
+ b->err = 1;
+ return;
+ }
+ b->base = newptr;
+ b->max = newsize;
+ }
+ memcpy(b->base + b->cur, d, len);
+ b->cur += len; /* ignore overflow */
+}
+
+static void dump_profile_to_buffer_cb(const char *str, void *data)
+{
+ add_data_to_buffer((struct prof_buf *)data, str, strlen(str));
+}
+
+errcode_t profile_write_tree_to_buffer(struct profile_node *root,
+ char **buf)
+{
+ struct prof_buf prof_buf = { 0, 0, 0, 0 };
+
+ dump_profile(root, 0, dump_profile_to_buffer_cb, &prof_buf);
+ if (prof_buf.err) {
+ *buf = NULL;
+ return ENOMEM;
+ }
+ add_data_to_buffer(&prof_buf, "", 1); /* append nul */
+ if (prof_buf.max - prof_buf.cur > (prof_buf.max >> 3)) {
+ char *newptr = realloc(prof_buf.base, prof_buf.cur);
+ if (newptr)
+ prof_buf.base = newptr;
+ }
+ *buf = prof_buf.base;
+ return 0;
+}
+#endif
+
+/*
+ * prof_tree.c --- these routines maintain the parse tree of the
+ * config file.
+ *
+ * All of the details of how the tree is stored is abstracted away in
+ * this file; all of the other profile routines build, access, and
+ * modify the tree via the accessor functions found in this file.
+ *
+ * Each node may represent either a relation or a section header.
+ *
+ * A section header must have its value field set to 0, and may a one
+ * or more child nodes, pointed to by first_child.
+ *
+ * A relation has as its value a pointer to allocated memory
+ * containing a string. Its first_child pointer must be null.
+ *
+ */
+
+/*
+ * Free a node, and any children
+ */
+void profile_free_node(struct profile_node *node)
+{
+ struct profile_node *child, *next;
+
+ if (node->magic != PROF_MAGIC_NODE)
+ return;
+
+ free(node->name);
+ free(node->value);
+
+ for (child=node->first_child; child; child = next) {
+ next = child->next;
+ profile_free_node(child);
+ }
+ node->magic = 0;
+
+ free(node);
+}
+
+#ifndef HAVE_STRDUP
+#undef strdup
+#define strdup MYstrdup
+static char *MYstrdup (const char *s)
+{
+ size_t sz = strlen(s) + 1;
+ char *p = malloc(sz);
+ if (p != 0)
+ memcpy(p, s, sz);
+ return p;
+}
+#endif
+
+/*
+ * Create a node
+ */
+errcode_t profile_create_node(const char *name, const char *value,
+ struct profile_node **ret_node)
+{
+ struct profile_node *new;
+
+ new = malloc(sizeof(struct profile_node));
+ if (!new)
+ return ENOMEM;
+ memset(new, 0, sizeof(struct profile_node));
+ new->magic = PROF_MAGIC_NODE;
+ new->name = strdup(name);
+ if (new->name == 0) {
+ profile_free_node(new);
+ return ENOMEM;
+ }
+ if (value) {
+ new->value = strdup(value);
+ if (new->value == 0) {
+ profile_free_node(new);
+ return ENOMEM;
+ }
+ }
+
+ *ret_node = new;
+ return 0;
+}
+
+/*
+ * This function verifies that all of the representation invariants of
+ * the profile are true. If not, we have a programming bug somewhere,
+ * probably in this file.
+ */
+#ifdef DEBUG_PROGRAM
+errcode_t profile_verify_node(struct profile_node *node)
+{
+ struct profile_node *p, *last;
+ errcode_t retval;
+
+ CHECK_MAGIC(node);
+
+ if (node->value && node->first_child)
+ return PROF_SECTION_WITH_VALUE;
+
+ last = 0;
+ for (p = node->first_child; p; last = p, p = p->next) {
+ if (p->prev != last)
+ return PROF_BAD_LINK_LIST;
+ if (last && (last->next != p))
+ return PROF_BAD_LINK_LIST;
+ if (node->group_level+1 != p->group_level)
+ return PROF_BAD_GROUP_LVL;
+ if (p->parent != node)
+ return PROF_BAD_PARENT_PTR;
+ retval = profile_verify_node(p);
+ if (retval)
+ return retval;
+ }
+ return 0;
+}
+#endif
+
+/*
+ * Add a node to a particular section
+ */
+errcode_t profile_add_node(struct profile_node *section, const char *name,
+ const char *value, struct profile_node **ret_node)
+{
+ errcode_t retval;
+ struct profile_node *p, *last, *new;
+
+ CHECK_MAGIC(section);
+
+ if (section->value)
+ return PROF_ADD_NOT_SECTION;
+
+ /*
+ * Find the place to insert the new node. We look for the
+ * place *after* the last match of the node name, since
+ * order matters.
+ */
+ for (p=section->first_child, last = 0; p; last = p, p = p->next) {
+ int cmp;
+ cmp = strcmp(p->name, name);
+ if (cmp > 0)
+ break;
+ }
+ retval = profile_create_node(name, value, &new);
+ if (retval)
+ return retval;
+ new->group_level = section->group_level+1;
+ new->deleted = 0;
+ new->parent = section;
+ new->prev = last;
+ new->next = p;
+ if (p)
+ p->prev = new;
+ if (last)
+ last->next = new;
+ else
+ section->first_child = new;
+ if (ret_node)
+ *ret_node = new;
+ return 0;
+}
+
+/*
+ * Iterate through the section, returning the nodes which match
+ * the given name. If name is NULL, then iterate through all the
+ * nodes in the section. If section_flag is non-zero, only return the
+ * section which matches the name; don't return relations. If value
+ * is non-NULL, then only return relations which match the requested
+ * value. (The value argument is ignored if section_flag is non-zero.)
+ *
+ * The first time this routine is called, the state pointer must be
+ * null. When this profile_find_node_relation() returns, if the state
+ * pointer is non-NULL, then this routine should be called again.
+ * (This won't happen if section_flag is non-zero, obviously.)
+ *
+ */
+errcode_t profile_find_node(struct profile_node *section, const char *name,
+ const char *value, int section_flag, void **state,
+ struct profile_node **node)
+{
+ struct profile_node *p;
+
+ CHECK_MAGIC(section);
+ p = *state;
+ if (p) {
+ CHECK_MAGIC(p);
+ } else
+ p = section->first_child;
+
+ for (; p; p = p->next) {
+ if (name && (strcmp(p->name, name)))
+ continue;
+ if (section_flag) {
+ if (p->value)
+ continue;
+ } else {
+ if (!p->value)
+ continue;
+ if (value && (strcmp(p->value, value)))
+ continue;
+ }
+ if (p->deleted)
+ continue;
+ /* A match! */
+ if (node)
+ *node = p;
+ break;
+ }
+ if (p == 0) {
+ *state = 0;
+ return section_flag ? PROF_NO_SECTION : PROF_NO_RELATION;
+ }
+ /*
+ * OK, we've found one match; now let's try to find another
+ * one. This way, if we return a non-zero state pointer,
+ * there's guaranteed to be another match that's returned.
+ */
+ for (p = p->next; p; p = p->next) {
+ if (name && (strcmp(p->name, name)))
+ continue;
+ if (section_flag) {
+ if (p->value)
+ continue;
+ } else {
+ if (!p->value)
+ continue;
+ if (value && (strcmp(p->value, value)))
+ continue;
+ }
+ /* A match! */
+ break;
+ }
+ *state = p;
+ return 0;
+}
+
+/*
+ * This is a general-purpose iterator for returning all nodes that
+ * match the specified name array.
+ */
+struct profile_iterator {
+ prf_magic_t magic;
+ profile_t profile;
+ int flags;
+ const char *const *names;
+ const char *name;
+ prf_file_t file;
+ int file_serial;
+ int done_idx;
+ struct profile_node *node;
+ int num;
+};
+
+errcode_t
+profile_iterator_create(profile_t profile, const char *const *names, int flags,
+ void **ret_iter)
+{
+ struct profile_iterator *iter;
+ int done_idx = 0;
+
+ if (profile == 0)
+ return PROF_NO_PROFILE;
+ if (profile->magic != PROF_MAGIC_PROFILE)
+ return PROF_MAGIC_PROFILE;
+ if (!names)
+ return PROF_BAD_NAMESET;
+ if (!(flags & PROFILE_ITER_LIST_SECTION)) {
+ if (!names[0])
+ return PROF_BAD_NAMESET;
+ done_idx = 1;
+ }
+
+ if ((iter = malloc(sizeof(struct profile_iterator))) == NULL)
+ return ENOMEM;
+
+ iter->magic = PROF_MAGIC_ITERATOR;
+ iter->profile = profile;
+ iter->names = names;
+ iter->flags = flags;
+ iter->file = profile->first_file;
+ iter->done_idx = done_idx;
+ iter->node = 0;
+ iter->num = 0;
+ *ret_iter = iter;
+ return 0;
+}
+
+void profile_iterator_free(void **iter_p)
+{
+ struct profile_iterator *iter;
+
+ if (!iter_p)
+ return;
+ iter = *iter_p;
+ if (!iter || iter->magic != PROF_MAGIC_ITERATOR)
+ return;
+ free(iter);
+ *iter_p = 0;
+}
+
+/*
+ * Note: the returned character strings in ret_name and ret_value
+ * points to the stored character string in the parse string. Before
+ * this string value is returned to a calling application
+ * (profile_node_iterator is not an exported interface), it should be
+ * strdup()'ed.
+ */
+errcode_t profile_node_iterator(void **iter_p, struct profile_node **ret_node,
+ char **ret_name, char **ret_value)
+{
+ struct profile_iterator *iter = *iter_p;
+ struct profile_node *section, *p;
+ const char *const *cpp;
+ errcode_t retval;
+ int skip_num = 0;
+
+ if (!iter || iter->magic != PROF_MAGIC_ITERATOR)
+ return PROF_MAGIC_ITERATOR;
+ if (iter->file && iter->file->magic != PROF_MAGIC_FILE)
+ return PROF_MAGIC_FILE;
+ /*
+ * If the file has changed, then the node pointer is invalid,
+ * so we'll have search the file again looking for it.
+ */
+ if (iter->node && (iter->file &&
+ iter->file->upd_serial != iter->file_serial)) {
+ iter->flags &= ~PROFILE_ITER_FINAL_SEEN;
+ skip_num = iter->num;
+ iter->node = 0;
+ }
+ if (iter->node && iter->node->magic != PROF_MAGIC_NODE) {
+ return PROF_MAGIC_NODE;
+ }
+get_new_file:
+ if (iter->node == 0) {
+ if (iter->file == NULL ||
+ (iter->flags & PROFILE_ITER_FINAL_SEEN)) {
+ profile_iterator_free(iter_p);
+ if (ret_node)
+ *ret_node = 0;
+ if (ret_name)
+ *ret_name = 0;
+ if (ret_value)
+ *ret_value =0;
+ return 0;
+ }
+ if ((retval = profile_update_file(iter->file))) {
+ if (retval == ENOENT || retval == EACCES) {
+ /* XXX memory leak? */
+ if (iter->file)
+ iter->file = iter->file->next;
+ skip_num = 0;
+ retval = 0;
+ goto get_new_file;
+ } else {
+ profile_iterator_free(iter_p);
+ return retval;
+ }
+ }
+ iter->file_serial = iter->file->upd_serial;
+ /*
+ * Find the section to list if we are a LIST_SECTION,
+ * or find the containing section if not.
+ */
+ section = iter->file->root;
+ for (cpp = iter->names; cpp[iter->done_idx]; cpp++) {
+ for (p=section->first_child; p; p = p->next) {
+ if (!strcmp(p->name, *cpp) && !p->value)
+ break;
+ }
+ if (!p) {
+ section = 0;
+ break;
+ }
+ section = p;
+ if (p->final)
+ iter->flags |= PROFILE_ITER_FINAL_SEEN;
+ }
+ if (!section) {
+ if (iter->file)
+ iter->file = iter->file->next;
+ skip_num = 0;
+ goto get_new_file;
+ }
+ iter->name = *cpp;
+ iter->node = section->first_child;
+ }
+ /*
+ * OK, now we know iter->node is set up correctly. Let's do
+ * the search.
+ */
+ for (p = iter->node; p; p = p->next) {
+ if (iter->name && strcmp(p->name, iter->name))
+ continue;
+ if ((iter->flags & PROFILE_ITER_SECTIONS_ONLY) &&
+ p->value)
+ continue;
+ if ((iter->flags & PROFILE_ITER_RELATIONS_ONLY) &&
+ !p->value)
+ continue;
+ if (skip_num > 0) {
+ skip_num--;
+ continue;
+ }
+ if (p->deleted)
+ continue;
+ break;
+ }
+ iter->num++;
+ if (!p) {
+ if (iter->file)
+ iter->file = iter->file->next;
+ iter->node = 0;
+ skip_num = 0;
+ goto get_new_file;
+ }
+ if ((iter->node = p->next) == NULL)
+ if (iter->file)
+ iter->file = iter->file->next;
+ if (ret_node)
+ *ret_node = p;
+ if (ret_name)
+ *ret_name = p->name;
+ if (ret_value)
+ *ret_value = p->value;
+ return 0;
+}
+
+
+/*
+ * prof_get.c --- routines that expose the public interfaces for
+ * querying items from the profile.
+ *
+ */
+
+/*
+ * This function only gets the first value from the file; it is a
+ * helper function for profile_get_string, profile_get_integer, etc.
+ */
+errcode_t profile_get_value(profile_t profile, const char *name,
+ const char *subname, const char *subsubname,
+ const char **ret_value)
+{
+ errcode_t retval;
+ void *state;
+ char *value;
+ const char *names[4];
+
+ names[0] = name;
+ names[1] = subname;
+ names[2] = subsubname;
+ names[3] = 0;
+
+ if ((retval = profile_iterator_create(profile, names,
+ PROFILE_ITER_RELATIONS_ONLY,
+ &state)))
+ return retval;
+
+ if ((retval = profile_node_iterator(&state, 0, 0, &value)))
+ goto cleanup;
+
+ if (value)
+ *ret_value = value;
+ else
+ retval = PROF_NO_RELATION;
+
+cleanup:
+ profile_iterator_free(&state);
+ return retval;
+}
+
+errcode_t
+profile_get_string(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, const char *def_val,
+ char **ret_string)
+{
+ const char *value;
+ errcode_t retval;
+
+ if (profile) {
+ retval = profile_get_value(profile, name, subname,
+ subsubname, &value);
+ if (retval == PROF_NO_SECTION || retval == PROF_NO_RELATION)
+ value = def_val;
+ else if (retval)
+ return retval;
+ } else
+ value = def_val;
+
+ if (value) {
+ *ret_string = malloc(strlen(value)+1);
+ if (*ret_string == 0)
+ return ENOMEM;
+ strcpy(*ret_string, value);
+ } else
+ *ret_string = 0;
+ return 0;
+}
+
+errcode_t
+profile_get_integer(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, int def_val, int *ret_int)
+{
+ const char *value;
+ errcode_t retval;
+ char *end_value;
+ long ret_long;
+
+ *ret_int = def_val;
+ if (profile == 0)
+ return 0;
+
+ retval = profile_get_value(profile, name, subname, subsubname, &value);
+ if (retval == PROF_NO_SECTION || retval == PROF_NO_RELATION) {
+ *ret_int = def_val;
+ return 0;
+ } else if (retval)
+ return retval;
+
+ if (value[0] == 0)
+ /* Empty string is no good. */
+ return PROF_BAD_INTEGER;
+ errno = 0;
+ ret_long = strtol(value, &end_value, 0);
+
+ /* Overflow or underflow. */
+ if ((ret_long == LONG_MIN || ret_long == LONG_MAX) && errno != 0)
+ return PROF_BAD_INTEGER;
+ /* Value outside "int" range. */
+ if ((long) (int) ret_long != ret_long)
+ return PROF_BAD_INTEGER;
+ /* Garbage in string. */
+ if (end_value != value + strlen (value))
+ return PROF_BAD_INTEGER;
+
+
+ *ret_int = ret_long;
+ return 0;
+}
+
+errcode_t
+profile_get_uint(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, unsigned int def_val,
+ unsigned int *ret_int)
+{
+ const char *value;
+ errcode_t retval;
+ char *end_value;
+ unsigned long ret_long;
+
+ *ret_int = def_val;
+ if (profile == 0)
+ return 0;
+
+ retval = profile_get_value(profile, name, subname, subsubname, &value);
+ if (retval == PROF_NO_SECTION || retval == PROF_NO_RELATION) {
+ *ret_int = def_val;
+ return 0;
+ } else if (retval)
+ return retval;
+
+ if (value[0] == 0)
+ /* Empty string is no good. */
+ return PROF_BAD_INTEGER;
+ errno = 0;
+ ret_long = strtoul(value, &end_value, 0);
+
+ /* Overflow or underflow. */
+ if ((ret_long == ULONG_MAX) && errno != 0)
+ return PROF_BAD_INTEGER;
+ /* Value outside "int" range. */
+ if ((unsigned long) (unsigned int) ret_long != ret_long)
+ return PROF_BAD_INTEGER;
+ /* Garbage in string. */
+ if (end_value != value + strlen (value))
+ return PROF_BAD_INTEGER;
+
+ *ret_int = ret_long;
+ return 0;
+}
+
+errcode_t
+profile_get_double(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, double def_val, double *ret_double)
+{
+ const char *value;
+ errcode_t retval;
+ char *end_value;
+ double double_val;
+
+ *ret_double = def_val;
+ if (profile == 0)
+ return 0;
+
+ retval = profile_get_value(profile, name, subname, subsubname, &value);
+ if (retval == PROF_NO_SECTION || retval == PROF_NO_RELATION) {
+ *ret_double = def_val;
+ return 0;
+ } else if (retval)
+ return retval;
+
+ if (value[0] == 0)
+ /* Empty string is no good. */
+ return PROF_BAD_INTEGER;
+ errno = 0;
+ double_val = strtod(value, &end_value);
+
+ /* Overflow or underflow. */
+ if (errno != 0)
+ return PROF_BAD_INTEGER;
+ /* Garbage in string. */
+ if (end_value != value + strlen(value))
+ return PROF_BAD_INTEGER;
+
+ *ret_double = double_val;
+ return 0;
+}
+
+static const char *const conf_yes[] = {
+ "y", "yes", "true", "t", "1", "on",
+ 0,
+};
+
+static const char *const conf_no[] = {
+ "n", "no", "false", "nil", "0", "off",
+ 0,
+};
+
+static errcode_t
+profile_parse_boolean(const char *s, int *ret_boolean)
+{
+ const char *const *p;
+
+ if (ret_boolean == NULL)
+ return PROF_EINVAL;
+
+ for(p=conf_yes; *p; p++) {
+ if (!strcasecmp(*p,s)) {
+ *ret_boolean = 1;
+ return 0;
+ }
+ }
+
+ for(p=conf_no; *p; p++) {
+ if (!strcasecmp(*p,s)) {
+ *ret_boolean = 0;
+ return 0;
+ }
+ }
+
+ return PROF_BAD_BOOLEAN;
+}
+
+errcode_t
+profile_get_boolean(profile_t profile, const char *name, const char *subname,
+ const char *subsubname, int def_val, int *ret_boolean)
+{
+ const char *value;
+ errcode_t retval;
+
+ if (profile == 0) {
+ *ret_boolean = def_val;
+ return 0;
+ }
+
+ retval = profile_get_value(profile, name, subname, subsubname, &value);
+ if (retval == PROF_NO_SECTION || retval == PROF_NO_RELATION) {
+ *ret_boolean = def_val;
+ return 0;
+ } else if (retval)
+ return retval;
+
+ return profile_parse_boolean (value, ret_boolean);
+}
+
+errcode_t
+profile_iterator(void **iter_p, char **ret_name, char **ret_value)
+{
+ char *name, *value;
+ errcode_t retval;
+
+ retval = profile_node_iterator(iter_p, 0, &name, &value);
+ if (retval)
+ return retval;
+
+ if (ret_name) {
+ if (name) {
+ *ret_name = malloc(strlen(name)+1);
+ if (!*ret_name)
+ return ENOMEM;
+ strcpy(*ret_name, name);
+ } else
+ *ret_name = 0;
+ }
+ if (ret_value) {
+ if (value) {
+ *ret_value = malloc(strlen(value)+1);
+ if (!*ret_value) {
+ if (ret_name) {
+ free(*ret_name);
+ *ret_name = 0;
+ }
+ return ENOMEM;
+ }
+ strcpy(*ret_value, value);
+ } else
+ *ret_value = 0;
+ }
+ return 0;
+}
+
+#ifdef DEBUG_PROGRAM
+
+/*
+ * test_profile.c --- testing program for the profile routine
+ */
+
+#include "argv_parse.h"
+#include "profile_helpers.h"
+
+const char *program_name = "test_profile";
+
+#define PRINT_VALUE 1
+#define PRINT_VALUES 2
+
+static void do_cmd(profile_t profile, char **argv)
+{
+ errcode_t retval;
+ const char **names, *value;
+ char **values, **cpp;
+ char *cmd;
+ int print_status;
+
+ cmd = *(argv);
+ names = (const char **) argv + 1;
+ print_status = 0;
+ retval = 0;
+ if (cmd == 0)
+ return;
+ if (!strcmp(cmd, "query")) {
+ retval = profile_get_values(profile, names, &values);
+ print_status = PRINT_VALUES;
+ } else if (!strcmp(cmd, "query1")) {
+ const char *name = 0;
+ const char *subname = 0;
+ const char *subsubname = 0;
+
+ name = names[0];
+ if (name)
+ subname = names[1];
+ if (subname)
+ subsubname = names[2];
+ if (subsubname && names[3]) {
+ fprintf(stderr,
+ "Only 3 levels are allowed with query1\n");
+ retval = EINVAL;
+ } else
+ retval = profile_get_value(profile, name, subname,
+ subsubname, &value);
+ print_status = PRINT_VALUE;
+ } else if (!strcmp(cmd, "list_sections")) {
+ retval = profile_get_subsection_names(profile, names,
+ &values);
+ print_status = PRINT_VALUES;
+ } else if (!strcmp(cmd, "list_relations")) {
+ retval = profile_get_relation_names(profile, names,
+ &values);
+ print_status = PRINT_VALUES;
+ } else if (!strcmp(cmd, "dump")) {
+ retval = profile_write_tree_file
+ (profile->first_file->root, stdout);
+#if 0
+ } else if (!strcmp(cmd, "clear")) {
+ retval = profile_clear_relation(profile, names);
+ } else if (!strcmp(cmd, "update")) {
+ retval = profile_update_relation(profile, names+2,
+ *names, *(names+1));
+#endif
+ } else if (!strcmp(cmd, "verify")) {
+ retval = profile_verify_node
+ (profile->first_file->root);
+#if 0
+ } else if (!strcmp(cmd, "rename_section")) {
+ retval = profile_rename_section(profile, names+1, *names);
+ } else if (!strcmp(cmd, "add")) {
+ value = *names;
+ if (strcmp(value, "NULL") == 0)
+ value = NULL;
+ retval = profile_add_relation(profile, names+1, value);
+ } else if (!strcmp(cmd, "flush")) {
+ retval = profile_flush(profile);
+#endif
+ } else {
+ printf("Invalid command.\n");
+ }
+ if (retval) {
+ com_err(cmd, retval, "");
+ print_status = 0;
+ }
+ switch (print_status) {
+ case PRINT_VALUE:
+ printf("%s\n", value);
+ break;
+ case PRINT_VALUES:
+ for (cpp = values; *cpp; cpp++)
+ printf("%s\n", *cpp);
+ profile_free_list(values);
+ break;
+ }
+}
+
+static void do_batchmode(profile_t profile)
+{
+ int argc, ret;
+ char **argv;
+ char buf[256];
+
+ while (!feof(stdin)) {
+ if (fgets(buf, sizeof(buf), stdin) == NULL)
+ break;
+ printf(">%s", buf);
+ ret = argv_parse(buf, &argc, &argv);
+ if (ret != 0) {
+ printf("Argv_parse returned %d!\n", ret);
+ continue;
+ }
+ do_cmd(profile, argv);
+ printf("\n");
+ argv_free(argv);
+ }
+ profile_release(profile);
+ exit(0);
+
+}
+
+void syntax_err_report(const char *filename, long err, int line_num)
+{
+ fprintf(stderr, "Syntax error in %s, line number %d: %s\n",
+ filename, line_num, error_message(err));
+ exit(1);
+}
+
+const char *default_str = "[foo]\n\tbar=quux\n\tsub = {\n\t\twin = true\n}\n";
+
+int main(int argc, char **argv)
+{
+ profile_t profile;
+ long retval;
+ char *cmd;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: %s filename [cmd argset]\n", program_name);
+ exit(1);
+ }
+
+ initialize_prof_error_table();
+
+ profile_set_syntax_err_cb(syntax_err_report);
+
+ retval = profile_init_path(argv[1], &profile);
+ if (retval) {
+ com_err(program_name, retval, "while initializing profile");
+ exit(1);
+ }
+ retval = profile_set_default(profile, default_str);
+ if (retval) {
+ com_err(program_name, retval, "while setting default");
+ exit(1);
+ }
+
+ cmd = *(argv+2);
+ if (!cmd || !strcmp(cmd, "batch"))
+ do_batchmode(profile);
+ else
+ do_cmd(profile, argv+2);
+ profile_release(profile);
+
+ return 0;
+}
+
+#endif
diff --git a/lib/support/profile.h b/lib/support/profile.h
new file mode 100644
index 0000000..aec870a
--- /dev/null
+++ b/lib/support/profile.h
@@ -0,0 +1,107 @@
+/*
+ * profile.h
+ *
+ * Copyright (C) 2005 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ *
+ * Copyright (C) 1985-2005 by the Massachusetts Institute of Technology.
+ *
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government. It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original MIT software.
+ * M.I.T. makes no representations about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef _PROFILE_H
+#define _PROFILE_H
+
+typedef struct _profile_t *profile_t;
+
+typedef void (*profile_syntax_err_cb_t)(const char *file, long err,
+ int line_num);
+
+/*
+ * Used by the profile iterator in prof_get.c
+ */
+#define PROFILE_ITER_LIST_SECTION 0x0001
+#define PROFILE_ITER_SECTIONS_ONLY 0x0002
+#define PROFILE_ITER_RELATIONS_ONLY 0x0004
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+long profile_init
+ (const char * const *files, profile_t *ret_profile);
+
+void profile_release
+ (profile_t profile);
+
+long profile_set_default
+ (profile_t profile, const char *def_string);
+
+long profile_get_string
+ (profile_t profile, const char *name, const char *subname,
+ const char *subsubname, const char *def_val,
+ char **ret_string);
+long profile_get_integer
+ (profile_t profile, const char *name, const char *subname,
+ const char *subsubname, int def_val,
+ int *ret_default);
+
+long profile_get_uint
+ (profile_t profile, const char *name, const char *subname,
+ const char *subsubname, unsigned int def_val,
+ unsigned int *ret_int);
+
+long profile_get_double
+ (profile_t profile, const char *name, const char *subname,
+ const char *subsubname, double def_val,
+ double *ret_float);
+
+long profile_get_boolean
+ (profile_t profile, const char *name, const char *subname,
+ const char *subsubname, int def_val,
+ int *ret_default);
+
+long profile_iterator_create
+ (profile_t profile, const char *const *names,
+ int flags, void **ret_iter);
+
+void profile_iterator_free
+ (void **iter_p);
+
+long profile_iterator
+ (void **iter_p, char **ret_name, char **ret_value);
+
+profile_syntax_err_cb_t profile_set_syntax_err_cb(profile_syntax_err_cb_t hook);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _KRB5_H */
diff --git a/lib/support/profile_helpers.c b/lib/support/profile_helpers.c
new file mode 100644
index 0000000..d7d6f15
--- /dev/null
+++ b/lib/support/profile_helpers.c
@@ -0,0 +1,317 @@
+/*
+ * profile_helpers.c -- Helper functions for the profile library
+ *
+ * These functions are not part of the "core" profile library, and do
+ * not require access to the internal functions and data structures of
+ * the profile library. They are mainly convenience functions for
+ * programs that want to do something unusual such as obtaining the
+ * list of sections or relations, or accessing multiple values from a
+ * relation that is listed more than once. This functionality can all
+ * be done using the profile_iterator abstraction, but it is less
+ * convenient.
+ *
+ * Copyright (C) 2006 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include <et/com_err.h>
+#include "profile.h"
+#include "profile_helpers.h"
+#include "prof_err.h"
+
+/*
+ * These functions --- init_list(), end_list(), and add_to_list() are
+ * internal functions used to build up a null-terminated char ** list
+ * of strings to be returned by functions like profile_get_values.
+ *
+ * The profile_string_list structure is used for internal booking
+ * purposes to build up the list, which is returned in *ret_list by
+ * the end_list() function.
+ *
+ * The publicly exported interface for freeing char** list is
+ * profile_free_list().
+ */
+
+struct profile_string_list {
+ char **list;
+ int num;
+ int max;
+};
+
+/*
+ * Initialize the string list abstraction.
+ */
+static errcode_t init_list(struct profile_string_list *list)
+{
+ list->num = 0;
+ list->max = 10;
+ list->list = malloc(list->max * sizeof(char *));
+ if (list->list == 0)
+ return ENOMEM;
+ list->list[0] = 0;
+ return 0;
+}
+
+/*
+ * Free any memory left over in the string abstraction, returning the
+ * built up list in *ret_list if it is non-null.
+ */
+static void end_list(struct profile_string_list *list, char ***ret_list)
+{
+ char **cp;
+
+ if (list == 0)
+ return;
+
+ if (ret_list) {
+ *ret_list = list->list;
+ return;
+ } else {
+ for (cp = list->list; *cp; cp++)
+ free(*cp);
+ free(list->list);
+ }
+ list->num = list->max = 0;
+ list->list = 0;
+}
+
+/*
+ * Add a string to the list.
+ */
+static errcode_t add_to_list(struct profile_string_list *list, char *str)
+{
+ char **newlist;
+ int newmax;
+
+ if (list->num+1 >= list->max) {
+ newmax = list->max + 10;
+ newlist = realloc(list->list, newmax * sizeof(char *));
+ if (newlist == 0)
+ return ENOMEM;
+ list->max = newmax;
+ list->list = newlist;
+ }
+
+ list->list[list->num++] = str;
+ list->list[list->num] = 0;
+ return 0;
+}
+
+/*
+ * Return TRUE if the string is already a member of the list.
+ */
+static int is_list_member(struct profile_string_list *list, const char *str)
+{
+ char **cpp;
+
+ if (!list->list)
+ return 0;
+
+ for (cpp = list->list; *cpp; cpp++) {
+ if (!strcmp(*cpp, str))
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * This function frees a null-terminated list as returned by
+ * profile_get_values.
+ */
+void profile_free_list(char **list)
+{
+ char **cp;
+
+ if (list == 0)
+ return;
+
+ for (cp = list; *cp; cp++)
+ free(*cp);
+ free(list);
+}
+
+errcode_t
+profile_get_values(profile_t profile, const char *const *names,
+ char ***ret_values)
+{
+ errcode_t retval;
+ void *state;
+ char *value;
+ struct profile_string_list values;
+
+ if ((retval = profile_iterator_create(profile, names,
+ PROFILE_ITER_RELATIONS_ONLY,
+ &state)))
+ return retval;
+
+ if ((retval = init_list(&values)))
+ goto cleanup_iterator;
+
+ do {
+ if ((retval = profile_iterator(&state, 0, &value)))
+ goto cleanup;
+ if (value)
+ add_to_list(&values, value);
+ } while (state);
+
+ if (values.num == 0) {
+ retval = PROF_NO_RELATION;
+ goto cleanup;
+ }
+
+ end_list(&values, ret_values);
+ return 0;
+
+cleanup:
+ end_list(&values, 0);
+cleanup_iterator:
+ profile_iterator_free(&state);
+ return retval;
+}
+
+/*
+ * This function will return the list of the names of subsections in the
+ * under the specified section name.
+ */
+errcode_t
+profile_get_subsection_names(profile_t profile, const char **names,
+ char ***ret_names)
+{
+ errcode_t retval;
+ void *state;
+ char *name;
+ struct profile_string_list values;
+
+ if ((retval = profile_iterator_create(profile, names,
+ PROFILE_ITER_LIST_SECTION | PROFILE_ITER_SECTIONS_ONLY,
+ &state)))
+ return retval;
+
+ if ((retval = init_list(&values)))
+ goto cleanup_iterator;
+
+ do {
+ if ((retval = profile_iterator(&state, &name, 0)))
+ goto cleanup;
+ if (name)
+ add_to_list(&values, name);
+ } while (state);
+
+ end_list(&values, ret_names);
+ return 0;
+
+cleanup:
+ end_list(&values, 0);
+cleanup_iterator:
+ profile_iterator_free(&state);
+ return retval;
+}
+
+/*
+ * This function will return the list of the names of relations in the
+ * under the specified section name.
+ */
+errcode_t
+profile_get_relation_names(profile_t profile, const char **names,
+ char ***ret_names)
+{
+ errcode_t retval;
+ void *state;
+ char *name;
+ struct profile_string_list values;
+
+ if ((retval = profile_iterator_create(profile, names,
+ PROFILE_ITER_LIST_SECTION | PROFILE_ITER_RELATIONS_ONLY,
+ &state)))
+ return retval;
+
+ if ((retval = init_list(&values)))
+ goto cleanup_iterator;
+
+ do {
+ if ((retval = profile_iterator(&state, &name, 0)))
+ goto cleanup;
+ if (name) {
+ if (is_list_member(&values, name))
+ free(name);
+ else
+ add_to_list(&values, name);
+ }
+ } while (state);
+
+ end_list(&values, ret_names);
+ return 0;
+
+cleanup:
+ end_list(&values, 0);
+cleanup_iterator:
+ profile_iterator_free(&state);
+ return retval;
+}
+
+
+void
+profile_release_string(char *str)
+{
+ free(str);
+}
+
+errcode_t
+profile_init_path(const char * filepath,
+ profile_t *ret_profile)
+{
+ int n_entries, i;
+ unsigned int ent_len;
+ const char *s, *t;
+ char **filenames;
+ errcode_t retval;
+
+ /* count the distinct filename components */
+ for(s = filepath, n_entries = 1; *s; s++) {
+ if (*s == ':')
+ n_entries++;
+ }
+
+ /* the array is NULL terminated */
+ filenames = (char **) malloc((n_entries+1) * sizeof(char*));
+ if (filenames == 0)
+ return ENOMEM;
+
+ /* measure, copy, and skip each one */
+ for(s = filepath, i=0; (t = strchr(s, ':')) || (t=s+strlen(s)); s=t+1, i++) {
+ ent_len = t-s;
+ filenames[i] = (char*) malloc(ent_len + 1);
+ if (filenames[i] == 0) {
+ /* if malloc fails, free the ones that worked */
+ while(--i >= 0) free(filenames[i]);
+ free(filenames);
+ return ENOMEM;
+ }
+ strncpy(filenames[i], s, ent_len);
+ filenames[i][ent_len] = 0;
+ if (*t == 0) {
+ i++;
+ break;
+ }
+ }
+ /* cap the array */
+ filenames[i] = 0;
+
+ retval = profile_init((const char * const *) filenames,
+ ret_profile);
+
+ /* count back down and free the entries */
+ while(--i >= 0) free(filenames[i]);
+ free(filenames);
+
+ return retval;
+}
diff --git a/lib/support/profile_helpers.h b/lib/support/profile_helpers.h
new file mode 100644
index 0000000..af63ca5
--- /dev/null
+++ b/lib/support/profile_helpers.h
@@ -0,0 +1,28 @@
+/*
+ * profile_helpers.h -- Function prototypes for profile helper functions
+ *
+ * Copyright (C) 2006 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+long profile_get_values
+ (profile_t profile, const char *const *names, char ***ret_values);
+
+void profile_free_list
+ (char **list);
+
+long profile_get_relation_names
+ (profile_t profile, const char **names, char ***ret_names);
+
+long profile_get_subsection_names
+ (profile_t profile, const char **names, char ***ret_names);
+
+void profile_release_string (char *str);
+
+long profile_init_path
+ (const char * filelist, profile_t *ret_profile);
+
diff --git a/lib/support/quotaio.c b/lib/support/quotaio.c
new file mode 100644
index 0000000..b41bb74
--- /dev/null
+++ b/lib/support/quotaio.c
@@ -0,0 +1,412 @@
+/** quotaio.c
+ *
+ * Generic IO operations on quotafiles
+ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
+ * Aditya Kali <adityakali@google.com> - Ported to e2fsprogs
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/file.h>
+#include <assert.h>
+
+#include "common.h"
+#include "quotaio.h"
+
+static const char * const extensions[MAXQUOTAS] = {
+ [USRQUOTA] = "user",
+ [GRPQUOTA] = "group",
+ [PRJQUOTA] = "project",
+};
+static const char * const basenames[] = {
+ "", /* undefined */
+ "quota", /* QFMT_VFS_OLD */
+ "aquota", /* QFMT_VFS_V0 */
+ "", /* QFMT_OCFS2 */
+ "aquota" /* QFMT_VFS_V1 */
+};
+
+/* Header in all newer quotafiles */
+struct disk_dqheader {
+ __le32 dqh_magic;
+ __le32 dqh_version;
+} __attribute__ ((packed));
+
+/**
+ * Convert type of quota to written representation
+ */
+const char *quota_type2name(enum quota_type qtype)
+{
+ if (qtype >= MAXQUOTAS)
+ return "unknown";
+ return extensions[qtype];
+}
+
+ext2_ino_t quota_type2inum(enum quota_type qtype,
+ struct ext2_super_block *sb)
+{
+ switch (qtype) {
+ case USRQUOTA:
+ return EXT4_USR_QUOTA_INO;
+ case GRPQUOTA:
+ return EXT4_GRP_QUOTA_INO;
+ case PRJQUOTA:
+ return sb->s_prj_quota_inum;
+ default:
+ return 0;
+ }
+ return 0;
+}
+
+/**
+ * Creates a quota file name for given type and format.
+ */
+const char *quota_get_qf_name(enum quota_type type, int fmt, char *buf)
+{
+ if (!buf)
+ return NULL;
+ snprintf(buf, QUOTA_NAME_LEN, "%s.%s",
+ basenames[fmt], extensions[type]);
+
+ return buf;
+}
+
+/*
+ * Set grace time if needed
+ */
+void update_grace_times(struct dquot *q)
+{
+ time_t now;
+
+ time(&now);
+ if (q->dq_dqb.dqb_bsoftlimit && toqb(q->dq_dqb.dqb_curspace) >
+ q->dq_dqb.dqb_bsoftlimit) {
+ if (!q->dq_dqb.dqb_btime)
+ q->dq_dqb.dqb_btime =
+ now + q->dq_h->qh_info.dqi_bgrace;
+ } else {
+ q->dq_dqb.dqb_btime = 0;
+ }
+
+ if (q->dq_dqb.dqb_isoftlimit && q->dq_dqb.dqb_curinodes >
+ q->dq_dqb.dqb_isoftlimit) {
+ if (!q->dq_dqb.dqb_itime)
+ q->dq_dqb.dqb_itime =
+ now + q->dq_h->qh_info.dqi_igrace;
+ } else {
+ q->dq_dqb.dqb_itime = 0;
+ }
+}
+
+errcode_t quota_inode_truncate(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inode inode;
+ errcode_t err;
+ enum quota_type qtype;
+
+ if ((err = ext2fs_read_inode(fs, ino, &inode)))
+ return err;
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++)
+ if (ino == quota_type2inum(qtype, fs->super))
+ break;
+
+ if (qtype != MAXQUOTAS) {
+ inode.i_dtime = fs->now ? fs->now : time(0);
+ if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
+ return 0;
+ err = ext2fs_punch(fs, ino, &inode, NULL, 0, ~0ULL);
+ if (err)
+ return err;
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ } else {
+ inode.i_flags &= ~EXT2_IMMUTABLE_FL;
+ }
+ err = ext2fs_write_inode(fs, ino, &inode);
+ return err;
+}
+
+/* Functions to read/write quota file. */
+static unsigned int quota_write_nomount(struct quota_file *qf,
+ ext2_loff_t offset,
+ void *buf, unsigned int size)
+{
+ ext2_file_t e2_file = qf->e2_file;
+ unsigned int bytes_written = 0;
+ errcode_t err;
+
+ err = ext2fs_file_llseek(e2_file, offset, EXT2_SEEK_SET, NULL);
+ if (err) {
+ log_err("ext2fs_file_llseek failed: %ld", err);
+ return 0;
+ }
+
+ err = ext2fs_file_write(e2_file, buf, size, &bytes_written);
+ if (err) {
+ log_err("ext2fs_file_write failed: %ld", err);
+ return 0;
+ }
+
+ /* Correct inode.i_size is set in end_io. */
+ return bytes_written;
+}
+
+static unsigned int quota_read_nomount(struct quota_file *qf,
+ ext2_loff_t offset,
+ void *buf, unsigned int size)
+{
+ ext2_file_t e2_file = qf->e2_file;
+ unsigned int bytes_read = 0;
+ errcode_t err;
+
+ err = ext2fs_file_llseek(e2_file, offset, EXT2_SEEK_SET, NULL);
+ if (err) {
+ log_err("ext2fs_file_llseek failed: %ld", err);
+ return 0;
+ }
+
+ err = ext2fs_file_read(e2_file, buf, size, &bytes_read);
+ if (err) {
+ log_err("ext2fs_file_read failed: %ld", err);
+ return 0;
+ }
+
+ return bytes_read;
+}
+
+/*
+ * Detect quota format and initialize quota IO
+ */
+errcode_t quota_file_open(quota_ctx_t qctx, struct quota_handle *h,
+ ext2_ino_t qf_ino, enum quota_type qtype,
+ int fmt, int flags)
+{
+ ext2_filsys fs = qctx->fs;
+ ext2_file_t e2_file;
+ errcode_t err;
+ int allocated_handle = 0;
+
+ if (qtype >= MAXQUOTAS)
+ return EINVAL;
+
+ if (fmt == -1)
+ fmt = QFMT_VFS_V1;
+
+ err = ext2fs_read_bitmaps(fs);
+ if (err)
+ return err;
+
+ if (qf_ino == 0)
+ qf_ino = *quota_sb_inump(fs->super, qtype);
+
+ log_debug("Opening quota ino=%u, type=%d", qf_ino, qtype);
+ err = ext2fs_file_open(fs, qf_ino, flags, &e2_file);
+ if (err) {
+ log_err("ext2fs_file_open failed: %s", error_message(err));
+ return err;
+ }
+
+ if (!h) {
+ if (qctx->quota_file[qtype]) {
+ h = qctx->quota_file[qtype];
+ if (((flags & EXT2_FILE_WRITE) == 0) ||
+ (h->qh_file_flags & EXT2_FILE_WRITE)) {
+ ext2fs_file_close(e2_file);
+ return 0;
+ }
+ (void) quota_file_close(qctx, h);
+ }
+ err = ext2fs_get_mem(sizeof(struct quota_handle), &h);
+ if (err) {
+ log_err("Unable to allocate quota handle");
+ ext2fs_file_close(e2_file);
+ return err;
+ }
+ allocated_handle = 1;
+ }
+
+ h->qh_qf.e2_file = e2_file;
+ h->qh_qf.fs = fs;
+ h->qh_qf.ino = qf_ino;
+ h->e2fs_write = quota_write_nomount;
+ h->e2fs_read = quota_read_nomount;
+ h->qh_file_flags = flags;
+ h->qh_io_flags = 0;
+ h->qh_type = qtype;
+ h->qh_fmt = fmt;
+ memset(&h->qh_info, 0, sizeof(h->qh_info));
+ h->qh_ops = &quotafile_ops_2;
+
+ if (h->qh_ops->check_file &&
+ (h->qh_ops->check_file(h, qtype, fmt) == 0)) {
+ log_err("qh_ops->check_file failed");
+ err = EIO;
+ goto errout;
+ }
+
+ if (h->qh_ops->init_io && (h->qh_ops->init_io(h) < 0)) {
+ log_err("qh_ops->init_io failed");
+ err = EIO;
+ goto errout;
+ }
+ if (allocated_handle)
+ qctx->quota_file[qtype] = h;
+
+ return 0;
+errout:
+ ext2fs_file_close(e2_file);
+ if (allocated_handle)
+ ext2fs_free_mem(&h);
+ return err;
+}
+
+static errcode_t quota_inode_init_new(ext2_filsys fs, ext2_ino_t ino)
+{
+ struct ext2_inode inode;
+ errcode_t err = 0;
+
+ err = ext2fs_read_inode(fs, ino, &inode);
+ if (err) {
+ log_err("ex2fs_read_inode failed");
+ return err;
+ }
+
+ if (EXT2_I_SIZE(&inode)) {
+ err = quota_inode_truncate(fs, ino);
+ if (err)
+ return err;
+ }
+
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ ext2fs_iblk_set(fs, &inode, 0);
+ inode.i_atime = inode.i_mtime =
+ inode.i_ctime = fs->now ? fs->now : time(0);
+ inode.i_links_count = 1;
+ inode.i_mode = LINUX_S_IFREG | 0600;
+ inode.i_flags |= EXT2_IMMUTABLE_FL;
+ if (ext2fs_has_feature_extents(fs->super))
+ inode.i_flags |= EXT4_EXTENTS_FL;
+
+ err = ext2fs_write_new_inode(fs, ino, &inode);
+ if (err) {
+ log_err("ext2fs_write_new_inode failed: %ld", err);
+ return err;
+ }
+ return err;
+}
+
+/*
+ * Create new quotafile of specified format on given filesystem
+ */
+errcode_t quota_file_create(struct quota_handle *h, ext2_filsys fs,
+ enum quota_type qtype, int fmt)
+{
+ ext2_file_t e2_file;
+ errcode_t err;
+ ext2_ino_t qf_inum = 0;
+
+ if (fmt == -1)
+ fmt = QFMT_VFS_V1;
+
+ h->qh_qf.fs = fs;
+ qf_inum = quota_type2inum(qtype, fs->super);
+ if (qf_inum == 0 && qtype == PRJQUOTA) {
+ err = ext2fs_new_inode(fs, EXT2_ROOT_INO, LINUX_S_IFREG | 0600,
+ 0, &qf_inum);
+ if (err)
+ return err;
+ ext2fs_inode_alloc_stats2(fs, qf_inum, +1, 0);
+ ext2fs_mark_ib_dirty(fs);
+ } else if (qf_inum == 0) {
+ return EXT2_ET_BAD_INODE_NUM;
+ }
+
+ err = ext2fs_read_bitmaps(fs);
+ if (err)
+ goto out_err;
+
+ err = quota_inode_init_new(fs, qf_inum);
+ if (err) {
+ log_err("init_new_quota_inode failed");
+ goto out_err;
+ }
+ h->qh_qf.ino = qf_inum;
+ h->qh_file_flags = EXT2_FILE_WRITE | EXT2_FILE_CREATE;
+ h->e2fs_write = quota_write_nomount;
+ h->e2fs_read = quota_read_nomount;
+
+ log_debug("Creating quota ino=%u, type=%d", qf_inum, qtype);
+ err = ext2fs_file_open(fs, qf_inum, h->qh_file_flags, &e2_file);
+ if (err) {
+ log_err("ext2fs_file_open failed: %ld", err);
+ goto out_err;
+ }
+ h->qh_qf.e2_file = e2_file;
+
+ h->qh_io_flags = 0;
+ h->qh_type = qtype;
+ h->qh_fmt = fmt;
+ memset(&h->qh_info, 0, sizeof(h->qh_info));
+ h->qh_ops = &quotafile_ops_2;
+
+ if (h->qh_ops->new_io && (h->qh_ops->new_io(h) < 0)) {
+ log_err("qh_ops->new_io failed");
+ err = EIO;
+ goto out_err1;
+ }
+
+ return 0;
+
+out_err1:
+ ext2fs_file_close(e2_file);
+out_err:
+
+ if (qf_inum)
+ quota_inode_truncate(fs, qf_inum);
+
+ return err;
+}
+
+/*
+ * Close quotafile and release handle
+ */
+errcode_t quota_file_close(quota_ctx_t qctx, struct quota_handle *h)
+{
+ if (h->qh_io_flags & IOFL_INFODIRTY) {
+ if (h->qh_ops->write_info && h->qh_ops->write_info(h) < 0)
+ return EIO;
+ h->qh_io_flags &= ~IOFL_INFODIRTY;
+ }
+
+ if (h->qh_ops->end_io && h->qh_ops->end_io(h) < 0)
+ return EIO;
+ if (h->qh_qf.e2_file)
+ ext2fs_file_close(h->qh_qf.e2_file);
+ if (qctx->quota_file[h->qh_type] == h)
+ ext2fs_free_mem(&qctx->quota_file[h->qh_type]);
+ return 0;
+}
+
+/*
+ * Create empty quota structure
+ */
+struct dquot *get_empty_dquot(void)
+{
+ struct dquot *dquot;
+
+ if (ext2fs_get_memzero(sizeof(struct dquot), &dquot)) {
+ log_err("Failed to allocate dquot");
+ return NULL;
+ }
+
+ dquot->dq_id = -1;
+ return dquot;
+}
diff --git a/lib/support/quotaio.h b/lib/support/quotaio.h
new file mode 100644
index 0000000..84fac35
--- /dev/null
+++ b/lib/support/quotaio.h
@@ -0,0 +1,268 @@
+/** quotaio.h
+ *
+ * Interface to the quota library.
+ *
+ * The quota library provides interface for creating and updating the quota
+ * files and the ext4 superblock fields. It supports the new VFS_V1 quota
+ * format. The quota library also provides support for keeping track of quotas
+ * in memory.
+ * The typical way to use the quota library is as follows:
+ * {
+ * quota_ctx_t qctx;
+ *
+ * quota_init_context(&qctx, fs, QUOTA_ALL_BIT);
+ * {
+ * quota_compute_usage(qctx);
+ * AND/OR
+ * quota_data_add/quota_data_sub/quota_data_inodes();
+ * }
+ * quota_write_inode(qctx, USRQUOTA);
+ * quota_write_inode(qctx, GRPQUOTA);
+ * quota_release_context(&qctx);
+ * }
+ *
+ * This initial version does not support reading the quota files. This support
+ * will be added in near future.
+ *
+ * Aditya Kali <adityakali@google.com>
+ * Header of IO operations for quota utilities
+ *
+ * Jan Kara <jack@suse.cz>
+ */
+
+#ifndef GUARD_QUOTAIO_H
+#define GUARD_QUOTAIO_H
+
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "dqblk_v2.h"
+
+typedef int64_t qsize_t; /* Type in which we store size limitations */
+
+enum quota_type {
+ USRQUOTA = 0,
+ GRPQUOTA = 1,
+ PRJQUOTA = 2,
+ MAXQUOTAS = 3,
+};
+
+#if MAXQUOTAS > 32
+#error "cannot have more than 32 quota types to fit in qtype_bits"
+#endif
+
+#define QUOTA_USR_BIT (1 << USRQUOTA)
+#define QUOTA_GRP_BIT (1 << GRPQUOTA)
+#define QUOTA_PRJ_BIT (1 << PRJQUOTA)
+#define QUOTA_ALL_BIT (QUOTA_USR_BIT | QUOTA_GRP_BIT | QUOTA_PRJ_BIT)
+
+typedef struct quota_ctx *quota_ctx_t;
+struct dict_t;
+
+struct quota_ctx {
+ ext2_filsys fs;
+ struct dict_t *quota_dict[MAXQUOTAS];
+ struct quota_handle *quota_file[MAXQUOTAS];
+};
+
+/*
+ * Definitions of magics and versions of current quota files
+ */
+#define INITQMAGICS {\
+ 0xd9c01f11, /* USRQUOTA */\
+ 0xd9c01927, /* GRPQUOTA */\
+ 0xd9c03f14 /* PRJQUOTA */\
+}
+
+/* Size of blocks in which are counted size limits in generic utility parts */
+#define QUOTABLOCK_BITS 10
+#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
+#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS)
+
+/* Quota format type IDs */
+#define QFMT_VFS_OLD 1
+#define QFMT_VFS_V0 2
+#define QFMT_VFS_V1 4
+
+/*
+ * The following constants define the default amount of time given a user
+ * before the soft limits are treated as hard limits (usually resulting
+ * in an allocation failure). The timer is started when the user crosses
+ * their soft limit, it is reset when they go below their soft limit.
+ */
+#define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */
+#define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */
+
+#define IOFL_INFODIRTY 0x01 /* Did info change? */
+
+struct quotafile_ops;
+
+/* Generic information about quotafile */
+struct util_dqinfo {
+ time_t dqi_bgrace; /* Block grace time for given quotafile */
+ time_t dqi_igrace; /* Inode grace time for given quotafile */
+ union {
+ struct v2_mem_dqinfo v2_mdqi;
+ } u; /* Format specific info about quotafile */
+};
+
+struct quota_file {
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ ext2_file_t e2_file;
+};
+
+/* Structure for one opened quota file */
+struct quota_handle {
+ enum quota_type qh_type; /* Type of quotafile */
+ int qh_fmt; /* Quotafile format */
+ int qh_file_flags;
+ int qh_io_flags; /* IO flags for file */
+ struct quota_file qh_qf;
+ unsigned int (*e2fs_read)(struct quota_file *qf, ext2_loff_t offset,
+ void *buf, unsigned int size);
+ unsigned int (*e2fs_write)(struct quota_file *qf, ext2_loff_t offset,
+ void *buf, unsigned int size);
+ struct quotafile_ops *qh_ops; /* Operations on quotafile */
+ struct util_dqinfo qh_info; /* Generic quotafile info */
+};
+
+/* Utility quota block */
+struct util_dqblk {
+ qsize_t dqb_ihardlimit;
+ qsize_t dqb_isoftlimit;
+ qsize_t dqb_curinodes;
+ qsize_t dqb_bhardlimit;
+ qsize_t dqb_bsoftlimit;
+ qsize_t dqb_curspace;
+ time_t dqb_btime;
+ time_t dqb_itime;
+ union {
+ struct v2_mem_dqblk v2_mdqb;
+ } u; /* Format specific dquot information */
+};
+
+/* Structure for one loaded quota */
+struct dquot {
+ struct dquot *dq_next; /* Pointer to next dquot in the list */
+ qid_t dq_id; /* ID dquot belongs to */
+ int dq_flags; /* Some flags for utils */
+ struct quota_handle *dq_h; /* Handle of quotafile for this dquot */
+ struct util_dqblk dq_dqb; /* Parsed data of dquot */
+};
+
+#define DQF_SEEN 0x0001
+
+/* Structure of quotafile operations */
+struct quotafile_ops {
+ /* Check whether quotafile is in our format */
+ int (*check_file) (struct quota_handle *h, int type, int fmt);
+ /* Open quotafile */
+ int (*init_io) (struct quota_handle *h);
+ /* Create new quotafile */
+ int (*new_io) (struct quota_handle *h);
+ /* Write all changes and close quotafile */
+ int (*end_io) (struct quota_handle *h);
+ /* Write info about quotafile */
+ int (*write_info) (struct quota_handle *h);
+ /* Read dquot into memory */
+ struct dquot *(*read_dquot) (struct quota_handle *h, qid_t id);
+ /* Write given dquot to disk */
+ int (*commit_dquot) (struct dquot *dquot);
+ /* Scan quotafile and call callback on every structure */
+ int (*scan_dquots) (struct quota_handle *h,
+ int (*process_dquot) (struct dquot *dquot,
+ void *data),
+ void *data);
+ /* Function to print format specific file information */
+ int (*report) (struct quota_handle *h, int verbose);
+};
+
+/* This might go into a special header file but that sounds a bit silly... */
+extern struct quotafile_ops quotafile_ops_meta;
+
+/* Open existing quotafile of given type (and verify its format) on given
+ * filesystem. */
+errcode_t quota_file_open(quota_ctx_t qctx, struct quota_handle *h,
+ ext2_ino_t qf_ino, enum quota_type type,
+ int fmt, int flags);
+
+
+/* Create new quotafile of specified format on given filesystem */
+errcode_t quota_file_create(struct quota_handle *h, ext2_filsys fs,
+ enum quota_type qtype, int fmt);
+
+/* Close quotafile */
+errcode_t quota_file_close(quota_ctx_t qctx, struct quota_handle *h);
+
+/* Get empty quota structure */
+struct dquot *get_empty_dquot(void);
+
+errcode_t quota_inode_truncate(ext2_filsys fs, ext2_ino_t ino);
+
+const char *quota_type2name(enum quota_type qtype);
+ext2_ino_t quota_type2inum(enum quota_type qtype, struct ext2_super_block *);
+
+void update_grace_times(struct dquot *q);
+
+/* size for the buffer returned by quota_get_qf_name(); must be greater
+ than maxlen of extensions[] and fmtnames[] (plus 2) found in quotaio.c */
+#define QUOTA_NAME_LEN 16
+
+const char *quota_get_qf_name(enum quota_type, int fmt, char *buf);
+
+/* In mkquota.c */
+errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs,
+ unsigned int qtype_bits);
+void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode_large *inode,
+ ext2_ino_t ino, int adjust);
+void quota_data_add(quota_ctx_t qctx, struct ext2_inode_large *inode,
+ ext2_ino_t ino, qsize_t space);
+void quota_data_sub(quota_ctx_t qctx, struct ext2_inode_large *inode,
+ ext2_ino_t ino, qsize_t space);
+errcode_t quota_write_inode(quota_ctx_t qctx, enum quota_type qtype);
+/* Flags for quota_read_all_dquots() */
+#define QREAD_USAGE 0x01
+#define QREAD_LIMITS 0x02
+errcode_t quota_read_all_dquots(quota_ctx_t qctx, ext2_ino_t qf_ino,
+ enum quota_type type, unsigned int flags);
+errcode_t quota_compute_usage(quota_ctx_t qctx);
+void quota_release_context(quota_ctx_t *qctx);
+errcode_t quota_remove_inode(ext2_filsys fs, enum quota_type qtype);
+int quota_file_exists(ext2_filsys fs, enum quota_type qtype);
+void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, enum quota_type qtype);
+errcode_t quota_compare_and_update(quota_ctx_t qctx, enum quota_type qtype,
+ int *usage_inconsistent);
+int parse_quota_opts(const char *opts, int (*func)(char *));
+
+/* parse_qtype.c */
+int parse_quota_types(const char *in_str, unsigned int *qtype_bits,
+ char **err_token);
+
+/*
+ * Return pointer to reserved inode field in superblock for given quota type.
+ *
+ * This allows the caller to get or set the quota inode by type without the
+ * need for the quota array to be contiguous in the superblock.
+ */
+static inline ext2_ino_t *quota_sb_inump(struct ext2_super_block *sb,
+ enum quota_type qtype)
+{
+ switch (qtype) {
+ case USRQUOTA:
+ return &sb->s_usr_quota_inum;
+ case GRPQUOTA:
+ return &sb->s_grp_quota_inum;
+ case PRJQUOTA:
+ return &sb->s_prj_quota_inum;
+ default:
+ return NULL;
+ }
+
+ return NULL;
+}
+
+#endif /* GUARD_QUOTAIO_H */
diff --git a/lib/support/quotaio_tree.c b/lib/support/quotaio_tree.c
new file mode 100644
index 0000000..5910e63
--- /dev/null
+++ b/lib/support/quotaio_tree.c
@@ -0,0 +1,687 @@
+/*
+ * Implementation of new quotafile format
+ *
+ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
+ */
+
+#include "config.h"
+#include <sys/types.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "common.h"
+#include "quotaio_tree.h"
+#include "quotaio.h"
+
+typedef char *dqbuf_t;
+
+#define freedqbuf(buf) ext2fs_free_mem(&buf)
+
+static inline dqbuf_t getdqbuf(void)
+{
+ dqbuf_t buf;
+ if (ext2fs_get_memzero(QT_BLKSIZE, &buf)) {
+ log_err("Failed to allocate dqbuf");
+ return NULL;
+ }
+
+ return buf;
+}
+
+/* Is given dquot empty? */
+int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk)
+{
+ unsigned int i;
+
+ for (i = 0; i < info->dqi_entry_size; i++)
+ if (disk[i])
+ return 0;
+ return 1;
+}
+
+int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info)
+{
+ return (QT_BLKSIZE - sizeof(struct qt_disk_dqdbheader)) /
+ info->dqi_entry_size;
+}
+
+static int get_index(qid_t id, int depth)
+{
+ return (id >> ((QT_TREEDEPTH - depth - 1) * 8)) & 0xff;
+}
+
+static inline void mark_quotafile_info_dirty(struct quota_handle *h)
+{
+ h->qh_io_flags |= IOFL_INFODIRTY;
+}
+
+/* Read given block */
+static void read_blk(struct quota_handle *h, unsigned int blk, dqbuf_t buf)
+{
+ int err;
+
+ err = h->e2fs_read(&h->qh_qf, blk << QT_BLKSIZE_BITS, buf,
+ QT_BLKSIZE);
+ if (err < 0)
+ log_err("Cannot read block %u: %s", blk, strerror(errno));
+ else if (err != QT_BLKSIZE)
+ memset(buf + err, 0, QT_BLKSIZE - err);
+}
+
+/* Write block */
+static int write_blk(struct quota_handle *h, unsigned int blk, dqbuf_t buf)
+{
+ int err;
+
+ err = h->e2fs_write(&h->qh_qf, blk << QT_BLKSIZE_BITS, buf,
+ QT_BLKSIZE);
+ if (err < 0 && errno != ENOSPC)
+ log_err("Cannot write block (%u): %s", blk, strerror(errno));
+ if (err != QT_BLKSIZE)
+ return -ENOSPC;
+ return 0;
+}
+
+/* Get free block in file (either from free list or create new one) */
+static int get_free_dqblk(struct quota_handle *h)
+{
+ dqbuf_t buf = getdqbuf();
+ struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf;
+ struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree;
+ int blk;
+
+ if (!buf)
+ return -ENOMEM;
+
+ if (info->dqi_free_blk) {
+ blk = info->dqi_free_blk;
+ read_blk(h, blk, buf);
+ info->dqi_free_blk = ext2fs_le32_to_cpu(dh->dqdh_next_free);
+ } else {
+ memset(buf, 0, QT_BLKSIZE);
+ /* Assure block allocation... */
+ if (write_blk(h, info->dqi_blocks, buf) < 0) {
+ freedqbuf(buf);
+ log_err("Cannot allocate new quota block "
+ "(out of disk space).");
+ return -ENOSPC;
+ }
+ blk = info->dqi_blocks++;
+ }
+ mark_quotafile_info_dirty(h);
+ freedqbuf(buf);
+ return blk;
+}
+
+/* Put given block to free list */
+static void put_free_dqblk(struct quota_handle *h, dqbuf_t buf,
+ unsigned int blk)
+{
+ struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf;
+ struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree;
+
+ dh->dqdh_next_free = ext2fs_cpu_to_le32(info->dqi_free_blk);
+ dh->dqdh_prev_free = ext2fs_cpu_to_le32(0);
+ dh->dqdh_entries = ext2fs_cpu_to_le16(0);
+ info->dqi_free_blk = blk;
+ mark_quotafile_info_dirty(h);
+ write_blk(h, blk, buf);
+}
+
+/* Remove given block from the list of blocks with free entries */
+static void remove_free_dqentry(struct quota_handle *h, dqbuf_t buf,
+ unsigned int blk)
+{
+ dqbuf_t tmpbuf = getdqbuf();
+ struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf;
+ unsigned int nextblk = ext2fs_le32_to_cpu(dh->dqdh_next_free), prevblk =
+
+ ext2fs_le32_to_cpu(dh->dqdh_prev_free);
+
+ if (!tmpbuf)
+ return;
+
+ if (nextblk) {
+ read_blk(h, nextblk, tmpbuf);
+ ((struct qt_disk_dqdbheader *)tmpbuf)->dqdh_prev_free =
+ dh->dqdh_prev_free;
+ write_blk(h, nextblk, tmpbuf);
+ }
+ if (prevblk) {
+ read_blk(h, prevblk, tmpbuf);
+ ((struct qt_disk_dqdbheader *)tmpbuf)->dqdh_next_free =
+ dh->dqdh_next_free;
+ write_blk(h, prevblk, tmpbuf);
+ } else {
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_entry = nextblk;
+ mark_quotafile_info_dirty(h);
+ }
+ freedqbuf(tmpbuf);
+ dh->dqdh_next_free = dh->dqdh_prev_free = ext2fs_cpu_to_le32(0);
+ write_blk(h, blk, buf); /* No matter whether write succeeds
+ * block is out of list */
+}
+
+/* Insert given block to the beginning of list with free entries */
+static void insert_free_dqentry(struct quota_handle *h, dqbuf_t buf,
+ unsigned int blk)
+{
+ dqbuf_t tmpbuf = getdqbuf();
+ struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf;
+ struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree;
+
+ if (!tmpbuf)
+ return;
+
+ dh->dqdh_next_free = ext2fs_cpu_to_le32(info->dqi_free_entry);
+ dh->dqdh_prev_free = ext2fs_cpu_to_le32(0);
+ write_blk(h, blk, buf);
+ if (info->dqi_free_entry) {
+ read_blk(h, info->dqi_free_entry, tmpbuf);
+ ((struct qt_disk_dqdbheader *)tmpbuf)->dqdh_prev_free =
+ ext2fs_cpu_to_le32(blk);
+ write_blk(h, info->dqi_free_entry, tmpbuf);
+ }
+ freedqbuf(tmpbuf);
+ info->dqi_free_entry = blk;
+ mark_quotafile_info_dirty(h);
+}
+
+/* Find space for dquot */
+static unsigned int find_free_dqentry(struct quota_handle *h,
+ struct dquot *dquot, int *err)
+{
+ int blk, i;
+ struct qt_disk_dqdbheader *dh;
+ struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree;
+ char *ddquot;
+ dqbuf_t buf;
+
+ *err = 0;
+ buf = getdqbuf();
+ if (!buf) {
+ *err = -ENOMEM;
+ return 0;
+ }
+
+ dh = (struct qt_disk_dqdbheader *)buf;
+ if (info->dqi_free_entry) {
+ blk = info->dqi_free_entry;
+ read_blk(h, blk, buf);
+ } else {
+ blk = get_free_dqblk(h);
+ if (blk < 0) {
+ freedqbuf(buf);
+ *err = blk;
+ return 0;
+ }
+ memset(buf, 0, QT_BLKSIZE);
+ info->dqi_free_entry = blk;
+ mark_quotafile_info_dirty(h);
+ }
+
+ /* Block will be full? */
+ if (ext2fs_le16_to_cpu(dh->dqdh_entries) + 1 >=
+ qtree_dqstr_in_blk(info))
+ remove_free_dqentry(h, buf, blk);
+
+ dh->dqdh_entries =
+ ext2fs_cpu_to_le16(ext2fs_le16_to_cpu(dh->dqdh_entries) + 1);
+ /* Find free structure in block */
+ ddquot = buf + sizeof(struct qt_disk_dqdbheader);
+ for (i = 0;
+ i < qtree_dqstr_in_blk(info) && !qtree_entry_unused(info, ddquot);
+ i++)
+ ddquot += info->dqi_entry_size;
+
+ if (i == qtree_dqstr_in_blk(info))
+ log_err("find_free_dqentry(): Data block full unexpectedly.");
+
+ write_blk(h, blk, buf);
+ dquot->dq_dqb.u.v2_mdqb.dqb_off =
+ (blk << QT_BLKSIZE_BITS) + sizeof(struct qt_disk_dqdbheader) +
+ i * info->dqi_entry_size;
+ freedqbuf(buf);
+ return blk;
+}
+
+/* Insert reference to structure into the trie */
+static int do_insert_tree(struct quota_handle *h, struct dquot *dquot,
+ unsigned int * treeblk, int depth)
+{
+ dqbuf_t buf;
+ int newson = 0, newact = 0;
+ __le32 *ref;
+ unsigned int newblk;
+ int ret = 0;
+
+ log_debug("inserting in tree: treeblk=%u, depth=%d", *treeblk, depth);
+ buf = getdqbuf();
+ if (!buf)
+ return -ENOMEM;
+
+ if (!*treeblk) {
+ ret = get_free_dqblk(h);
+ if (ret < 0)
+ goto out_buf;
+ *treeblk = ret;
+ memset(buf, 0, QT_BLKSIZE);
+ newact = 1;
+ } else {
+ read_blk(h, *treeblk, buf);
+ }
+
+ ref = (__le32 *) buf;
+ newblk = ext2fs_le32_to_cpu(ref[get_index(dquot->dq_id, depth)]);
+ if (!newblk)
+ newson = 1;
+ if (depth == QT_TREEDEPTH - 1) {
+ if (newblk)
+ log_err("Inserting already present quota entry "
+ "(block %u).",
+ ref[get_index(dquot->dq_id, depth)]);
+ newblk = find_free_dqentry(h, dquot, &ret);
+ } else {
+ ret = do_insert_tree(h, dquot, &newblk, depth + 1);
+ }
+
+ if (newson && ret >= 0) {
+ ref[get_index(dquot->dq_id, depth)] =
+ ext2fs_cpu_to_le32(newblk);
+ write_blk(h, *treeblk, buf);
+ } else if (newact && ret < 0) {
+ put_free_dqblk(h, buf, *treeblk);
+ }
+
+out_buf:
+ freedqbuf(buf);
+ return ret;
+}
+
+/* Wrapper for inserting quota structure into tree */
+static void dq_insert_tree(struct quota_handle *h, struct dquot *dquot)
+{
+ unsigned int tmp = QT_TREEOFF;
+
+ if (do_insert_tree(h, dquot, &tmp, 0) < 0)
+ log_err("Cannot write quota (id %u): %s",
+ (unsigned int) dquot->dq_id, strerror(errno));
+}
+
+/* Write dquot to file */
+void qtree_write_dquot(struct dquot *dquot)
+{
+ errcode_t retval;
+ unsigned int ret;
+ char *ddquot;
+ struct quota_handle *h = dquot->dq_h;
+ struct qtree_mem_dqinfo *info =
+ &dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree;
+ log_debug("writing ddquot 1: off=%llu, info->dqi_entry_size=%u",
+ dquot->dq_dqb.u.v2_mdqb.dqb_off,
+ info->dqi_entry_size);
+ retval = ext2fs_get_mem(info->dqi_entry_size, &ddquot);
+ if (retval) {
+ errno = ENOMEM;
+ log_err("Quota write failed (id %u): %s",
+ (unsigned int)dquot->dq_id, strerror(errno));
+ return;
+ }
+ memset(ddquot, 0, info->dqi_entry_size);
+
+ if (!dquot->dq_dqb.u.v2_mdqb.dqb_off)
+ dq_insert_tree(dquot->dq_h, dquot);
+ info->dqi_ops->mem2disk_dqblk(ddquot, dquot);
+ log_debug("writing ddquot 2: off=%llu, info->dqi_entry_size=%u",
+ dquot->dq_dqb.u.v2_mdqb.dqb_off,
+ info->dqi_entry_size);
+ ret = h->e2fs_write(&h->qh_qf, dquot->dq_dqb.u.v2_mdqb.dqb_off, ddquot,
+ info->dqi_entry_size);
+
+ if (ret != info->dqi_entry_size) {
+ if (ret > 0)
+ errno = ENOSPC;
+ log_err("Quota write failed (id %u): %s",
+ (unsigned int)dquot->dq_id, strerror(errno));
+ }
+ ext2fs_free_mem(&ddquot);
+}
+
+/* Free dquot entry in data block */
+static void free_dqentry(struct quota_handle *h, struct dquot *dquot,
+ unsigned int blk)
+{
+ struct qt_disk_dqdbheader *dh;
+ struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree;
+ dqbuf_t buf = getdqbuf();
+
+ if (!buf)
+ return;
+
+ if (dquot->dq_dqb.u.v2_mdqb.dqb_off >> QT_BLKSIZE_BITS != blk)
+ log_err("Quota structure has offset to other block (%u) "
+ "than it should (%u).", blk,
+ (unsigned int) (dquot->dq_dqb.u.v2_mdqb.dqb_off >>
+ QT_BLKSIZE_BITS));
+
+ read_blk(h, blk, buf);
+ dh = (struct qt_disk_dqdbheader *)buf;
+ dh->dqdh_entries =
+ ext2fs_cpu_to_le16(ext2fs_le16_to_cpu(dh->dqdh_entries) - 1);
+
+ if (!ext2fs_le16_to_cpu(dh->dqdh_entries)) { /* Block got free? */
+ remove_free_dqentry(h, buf, blk);
+ put_free_dqblk(h, buf, blk);
+ } else {
+ memset(buf + (dquot->dq_dqb.u.v2_mdqb.dqb_off &
+ ((1 << QT_BLKSIZE_BITS) - 1)),
+ 0, info->dqi_entry_size);
+
+ /* First free entry? */
+ if (ext2fs_le16_to_cpu(dh->dqdh_entries) ==
+ qtree_dqstr_in_blk(info) - 1)
+ /* This will also write data block */
+ insert_free_dqentry(h, buf, blk);
+ else
+ write_blk(h, blk, buf);
+ }
+ dquot->dq_dqb.u.v2_mdqb.dqb_off = 0;
+ freedqbuf(buf);
+}
+
+/* Remove reference to dquot from tree */
+static void remove_tree(struct quota_handle *h, struct dquot *dquot,
+ unsigned int * blk, int depth)
+{
+ dqbuf_t buf = getdqbuf();
+ unsigned int newblk;
+ __le32 *ref = (__le32 *) buf;
+
+ if (!buf)
+ return;
+
+ read_blk(h, *blk, buf);
+ newblk = ext2fs_le32_to_cpu(ref[get_index(dquot->dq_id, depth)]);
+ if (depth == QT_TREEDEPTH - 1) {
+ free_dqentry(h, dquot, newblk);
+ newblk = 0;
+ } else {
+ remove_tree(h, dquot, &newblk, depth + 1);
+ }
+
+ if (!newblk) {
+ int i;
+
+ ref[get_index(dquot->dq_id, depth)] = ext2fs_cpu_to_le32(0);
+
+ /* Block got empty? */
+ for (i = 0; i < QT_BLKSIZE && !buf[i]; i++);
+
+ /* Don't put the root block into the free block list */
+ if (i == QT_BLKSIZE && *blk != QT_TREEOFF) {
+ put_free_dqblk(h, buf, *blk);
+ *blk = 0;
+ } else {
+ write_blk(h, *blk, buf);
+ }
+ }
+ freedqbuf(buf);
+}
+
+/* Delete dquot from tree */
+void qtree_delete_dquot(struct dquot *dquot)
+{
+ unsigned int tmp = QT_TREEOFF;
+
+ if (!dquot->dq_dqb.u.v2_mdqb.dqb_off) /* Even not allocated? */
+ return;
+ remove_tree(dquot->dq_h, dquot, &tmp, 0);
+}
+
+/* Find entry in block */
+static ext2_loff_t find_block_dqentry(struct quota_handle *h,
+ struct dquot *dquot, unsigned int blk)
+{
+ struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree;
+ dqbuf_t buf = getdqbuf();
+ int i;
+ char *ddquot = buf + sizeof(struct qt_disk_dqdbheader);
+
+ if (!buf)
+ return -ENOMEM;
+
+ read_blk(h, blk, buf);
+ for (i = 0;
+ i < qtree_dqstr_in_blk(info) && !info->dqi_ops->is_id(ddquot, dquot);
+ i++)
+ ddquot += info->dqi_entry_size;
+
+ if (i == qtree_dqstr_in_blk(info))
+ log_err("Quota for id %u referenced but not present.",
+ dquot->dq_id);
+ freedqbuf(buf);
+ return (blk << QT_BLKSIZE_BITS) + sizeof(struct qt_disk_dqdbheader) +
+ i * info->dqi_entry_size;
+}
+
+/* Find entry for given id in the tree */
+static ext2_loff_t find_tree_dqentry(struct quota_handle *h,
+ struct dquot *dquot,
+ unsigned int blk, int depth)
+{
+ dqbuf_t buf = getdqbuf();
+ ext2_loff_t ret = 0;
+ __le32 *ref = (__le32 *) buf;
+
+ if (!buf)
+ return -ENOMEM;
+
+ read_blk(h, blk, buf);
+ ret = 0;
+ blk = ext2fs_le32_to_cpu(ref[get_index(dquot->dq_id, depth)]);
+ if (!blk) /* No reference? */
+ goto out_buf;
+ if (depth < QT_TREEDEPTH - 1)
+ ret = find_tree_dqentry(h, dquot, blk, depth + 1);
+ else
+ ret = find_block_dqentry(h, dquot, blk);
+out_buf:
+ freedqbuf(buf);
+ return ret;
+}
+
+/* Find entry for given id in the tree - wrapper function */
+static inline ext2_loff_t find_dqentry(struct quota_handle *h,
+ struct dquot *dquot)
+{
+ return find_tree_dqentry(h, dquot, QT_TREEOFF, 0);
+}
+
+/*
+ * Read dquot from disk.
+ */
+struct dquot *qtree_read_dquot(struct quota_handle *h, qid_t id)
+{
+ struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree;
+ ext2_loff_t offset;
+ unsigned int ret;
+ char *ddquot;
+ struct dquot *dquot = get_empty_dquot();
+
+ if (!dquot)
+ return NULL;
+ if (ext2fs_get_mem(info->dqi_entry_size, &ddquot)) {
+ ext2fs_free_mem(&dquot);
+ return NULL;
+ }
+
+ dquot->dq_id = id;
+ dquot->dq_h = h;
+ dquot->dq_dqb.u.v2_mdqb.dqb_off = 0;
+ memset(&dquot->dq_dqb, 0, sizeof(struct util_dqblk));
+
+ offset = find_dqentry(h, dquot);
+ if (offset > 0) {
+ dquot->dq_dqb.u.v2_mdqb.dqb_off = offset;
+ ret = h->e2fs_read(&h->qh_qf, offset, ddquot,
+ info->dqi_entry_size);
+ if (ret != info->dqi_entry_size) {
+ if (ret > 0)
+ errno = EIO;
+ log_err("Cannot read quota structure for id %u: %s",
+ dquot->dq_id, strerror(errno));
+ }
+ info->dqi_ops->disk2mem_dqblk(dquot, ddquot);
+ }
+ ext2fs_free_mem(&ddquot);
+ return dquot;
+}
+
+static int check_reference(struct quota_handle *h, unsigned int blk)
+{
+ if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks) {
+ log_err("Illegal reference (%u >= %u) in %s quota file",
+ blk, h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
+ quota_type2name(h->qh_type));
+ return -1;
+ }
+ return 0;
+}
+
+/*
+ * Scan all dquots in file and call callback on each
+ */
+#define set_bit(bmp, ind) ((bmp)[(ind) >> 3] |= (1 << ((ind) & 7)))
+#define get_bit(bmp, ind) ((bmp)[(ind) >> 3] & (1 << ((ind) & 7)))
+
+static int report_block(struct dquot *dquot, unsigned int blk, char *bitmap,
+ int (*process_dquot) (struct dquot *, void *),
+ void *data)
+{
+ struct qtree_mem_dqinfo *info =
+ &dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree;
+ dqbuf_t buf = getdqbuf();
+ struct qt_disk_dqdbheader *dh;
+ char *ddata;
+ int entries, i;
+
+ if (!buf)
+ return -1;
+
+ set_bit(bitmap, blk);
+ read_blk(dquot->dq_h, blk, buf);
+ dh = (struct qt_disk_dqdbheader *)buf;
+ ddata = buf + sizeof(struct qt_disk_dqdbheader);
+ entries = ext2fs_le16_to_cpu(dh->dqdh_entries);
+ for (i = 0; i < qtree_dqstr_in_blk(info);
+ i++, ddata += info->dqi_entry_size)
+ if (!qtree_entry_unused(info, ddata)) {
+ dquot->dq_dqb.u.v2_mdqb.dqb_off =
+ (blk << QT_BLKSIZE_BITS) +
+ sizeof(struct qt_disk_dqdbheader) +
+ i * info->dqi_entry_size;
+ info->dqi_ops->disk2mem_dqblk(dquot, ddata);
+ if (process_dquot(dquot, data) < 0)
+ break;
+ }
+ freedqbuf(buf);
+ return entries;
+}
+
+static int report_tree(struct dquot *dquot, unsigned int blk, int depth,
+ char *bitmap,
+ int (*process_dquot) (struct dquot *, void *),
+ void *data)
+{
+ int entries = 0, ret, i;
+ dqbuf_t buf = getdqbuf();
+ __le32 *ref = (__le32 *) buf;
+
+ if (!buf)
+ return -1;
+
+ read_blk(dquot->dq_h, blk, buf);
+ if (depth == QT_TREEDEPTH - 1) {
+ for (i = 0; i < QT_BLKSIZE >> 2; i++) {
+ blk = ext2fs_le32_to_cpu(ref[i]);
+ if (check_reference(dquot->dq_h, blk)) {
+ entries = -1;
+ goto errout;
+ }
+ if (blk && !get_bit(bitmap, blk)) {
+ ret = report_block(dquot, blk, bitmap,
+ process_dquot, data);
+ if (ret < 0) {
+ entries = ret;
+ goto errout;
+ }
+ entries += ret;
+ }
+ }
+ } else {
+ for (i = 0; i < QT_BLKSIZE >> 2; i++) {
+ blk = ext2fs_le32_to_cpu(ref[i]);
+ if (blk) {
+ if (check_reference(dquot->dq_h, blk)) {
+ entries = -1;
+ goto errout;
+ }
+ ret = report_tree(dquot, blk, depth + 1,
+ bitmap, process_dquot,
+ data);
+ if (ret < 0) {
+ entries = ret;
+ goto errout;
+ }
+ entries += ret;
+ }
+ }
+ }
+errout:
+ freedqbuf(buf);
+ return entries;
+}
+
+static unsigned int find_set_bits(char *bmp, int blocks)
+{
+ unsigned int used = 0;
+ int i;
+
+ for (i = 0; i < blocks; i++)
+ if (get_bit(bmp, i))
+ used++;
+ return used;
+}
+
+int qtree_scan_dquots(struct quota_handle *h,
+ int (*process_dquot) (struct dquot *, void *),
+ void *data)
+{
+ int ret;
+ char *bitmap;
+ struct v2_mem_dqinfo *v2info = &h->qh_info.u.v2_mdqi;
+ struct qtree_mem_dqinfo *info = &v2info->dqi_qtree;
+ struct dquot *dquot = get_empty_dquot();
+
+ if (!dquot)
+ return -1;
+
+ dquot->dq_h = h;
+ if (ext2fs_get_memzero((info->dqi_blocks + 7) >> 3, &bitmap)) {
+ ext2fs_free_mem(&dquot);
+ return -1;
+ }
+ ret = report_tree(dquot, QT_TREEOFF, 0, bitmap, process_dquot, data);
+ if (ret < 0)
+ goto errout;
+ v2info->dqi_used_entries = ret;
+ v2info->dqi_data_blocks = find_set_bits(bitmap, info->dqi_blocks);
+ ret = 0;
+errout:
+ ext2fs_free_mem(&bitmap);
+ ext2fs_free_mem(&dquot);
+ return ret;
+}
diff --git a/lib/support/quotaio_tree.h b/lib/support/quotaio_tree.h
new file mode 100644
index 0000000..b0b7257
--- /dev/null
+++ b/lib/support/quotaio_tree.h
@@ -0,0 +1,64 @@
+/*
+ * Definitions of structures for vfsv0 quota format
+ */
+
+#ifndef _LINUX_QUOTA_TREE_H
+#define _LINUX_QUOTA_TREE_H
+
+#include <sys/types.h>
+
+typedef __u32 qid_t; /* Type in which we store ids in memory */
+
+#define QT_TREEOFF 1 /* Offset of tree in file in blocks */
+#define QT_TREEDEPTH 4 /* Depth of quota tree */
+#define QT_BLKSIZE_BITS 10
+#define QT_BLKSIZE (1 << QT_BLKSIZE_BITS) /* Size of block with quota
+ * structures */
+
+/*
+ * Structure of header of block with quota structures. It is padded to 16 bytes
+ * so there will be space for exactly 21 quota-entries in a block
+ */
+struct qt_disk_dqdbheader {
+ __le32 dqdh_next_free; /* Number of next block with free
+ * entry */
+ __le32 dqdh_prev_free; /* Number of previous block with free
+ * entry */
+ __le16 dqdh_entries; /* Number of valid entries in block */
+ __le16 dqdh_pad1;
+ __le32 dqdh_pad2;
+} __attribute__ ((packed));
+
+struct dquot;
+struct quota_handle;
+
+/* Operations */
+struct qtree_fmt_operations {
+ /* Convert given entry from in memory format to disk one */
+ void (*mem2disk_dqblk)(void *disk, struct dquot *dquot);
+ /* Convert given entry from disk format to in memory one */
+ void (*disk2mem_dqblk)(struct dquot *dquot, void *disk);
+ /* Is this structure for given id? */
+ int (*is_id)(void *disk, struct dquot *dquot);
+};
+
+/* In-memory copy of version specific information */
+struct qtree_mem_dqinfo {
+ unsigned int dqi_blocks; /* # of blocks in quota file */
+ unsigned int dqi_free_blk; /* First block in list of free blocks */
+ unsigned int dqi_free_entry; /* First block with free entry */
+ unsigned int dqi_entry_size; /* Size of quota entry in quota file */
+ struct qtree_fmt_operations *dqi_ops; /* Operations for entry
+ * manipulation */
+};
+
+void qtree_write_dquot(struct dquot *dquot);
+struct dquot *qtree_read_dquot(struct quota_handle *h, qid_t id);
+void qtree_delete_dquot(struct dquot *dquot);
+int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk);
+int qtree_scan_dquots(struct quota_handle *h,
+ int (*process_dquot) (struct dquot *, void *), void *data);
+
+int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info);
+
+#endif /* _LINUX_QUOTAIO_TREE_H */
diff --git a/lib/support/quotaio_v2.c b/lib/support/quotaio_v2.c
new file mode 100644
index 0000000..d09294b
--- /dev/null
+++ b/lib/support/quotaio_v2.c
@@ -0,0 +1,389 @@
+/*
+ * Implementation of new quotafile format
+ *
+ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
+ */
+
+#include "config.h"
+#include <sys/types.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "common.h"
+#include "quotaio_v2.h"
+#include "dqblk_v2.h"
+#include "quotaio.h"
+#include "quotaio_tree.h"
+
+static int v2_check_file(struct quota_handle *h, int type, int fmt);
+static int v2_init_io(struct quota_handle *h);
+static int v2_new_io(struct quota_handle *h);
+static int v2_write_info(struct quota_handle *h);
+static struct dquot *v2_read_dquot(struct quota_handle *h, qid_t id);
+static int v2_commit_dquot(struct dquot *dquot);
+static int v2_scan_dquots(struct quota_handle *h,
+ int (*process_dquot) (struct dquot *dquot,
+ void *data),
+ void *data);
+static int v2_report(struct quota_handle *h, int verbose);
+
+struct quotafile_ops quotafile_ops_2 = {
+ .check_file = v2_check_file,
+ .init_io = v2_init_io,
+ .new_io = v2_new_io,
+ .write_info = v2_write_info,
+ .read_dquot = v2_read_dquot,
+ .commit_dquot = v2_commit_dquot,
+ .scan_dquots = v2_scan_dquots,
+ .report = v2_report,
+};
+
+/*
+ * Copy dquot from disk to memory
+ */
+static void v2r0_disk2memdqblk(struct dquot *dquot, void *dp)
+{
+ struct util_dqblk *m = &dquot->dq_dqb;
+ struct v2r0_disk_dqblk *d = dp, empty;
+
+ dquot->dq_id = ext2fs_le32_to_cpu(d->dqb_id);
+ m->dqb_ihardlimit = ext2fs_le32_to_cpu(d->dqb_ihardlimit);
+ m->dqb_isoftlimit = ext2fs_le32_to_cpu(d->dqb_isoftlimit);
+ m->dqb_bhardlimit = ext2fs_le32_to_cpu(d->dqb_bhardlimit);
+ m->dqb_bsoftlimit = ext2fs_le32_to_cpu(d->dqb_bsoftlimit);
+ m->dqb_curinodes = ext2fs_le32_to_cpu(d->dqb_curinodes);
+ m->dqb_curspace = ext2fs_le64_to_cpu(d->dqb_curspace);
+ m->dqb_itime = ext2fs_le64_to_cpu(d->dqb_itime);
+ m->dqb_btime = ext2fs_le64_to_cpu(d->dqb_btime);
+
+ memset(&empty, 0, sizeof(struct v2r0_disk_dqblk));
+ empty.dqb_itime = ext2fs_cpu_to_le64(1);
+ if (!memcmp(&empty, dp, sizeof(struct v2r0_disk_dqblk)))
+ m->dqb_itime = 0;
+}
+
+/*
+ * Copy dquot from memory to disk
+ */
+static void v2r0_mem2diskdqblk(void *dp, struct dquot *dquot)
+{
+ struct util_dqblk *m = &dquot->dq_dqb;
+ struct v2r0_disk_dqblk *d = dp;
+
+ d->dqb_ihardlimit = ext2fs_cpu_to_le32(m->dqb_ihardlimit);
+ d->dqb_isoftlimit = ext2fs_cpu_to_le32(m->dqb_isoftlimit);
+ d->dqb_bhardlimit = ext2fs_cpu_to_le32(m->dqb_bhardlimit);
+ d->dqb_bsoftlimit = ext2fs_cpu_to_le32(m->dqb_bsoftlimit);
+ d->dqb_curinodes = ext2fs_cpu_to_le32(m->dqb_curinodes);
+ d->dqb_curspace = ext2fs_cpu_to_le64(m->dqb_curspace);
+ d->dqb_itime = ext2fs_cpu_to_le64(m->dqb_itime);
+ d->dqb_btime = ext2fs_cpu_to_le64(m->dqb_btime);
+ d->dqb_id = ext2fs_cpu_to_le32(dquot->dq_id);
+ if (qtree_entry_unused(&dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree, dp))
+ d->dqb_itime = ext2fs_cpu_to_le64(1);
+}
+
+static int v2r0_is_id(void *dp, struct dquot *dquot)
+{
+ struct v2r0_disk_dqblk *d = dp;
+ struct qtree_mem_dqinfo *info =
+ &dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree;
+
+ if (qtree_entry_unused(info, dp))
+ return 0;
+ return ext2fs_le32_to_cpu(d->dqb_id) == dquot->dq_id;
+}
+
+static struct qtree_fmt_operations v2r0_fmt_ops = {
+ .mem2disk_dqblk = v2r0_mem2diskdqblk,
+ .disk2mem_dqblk = v2r0_disk2memdqblk,
+ .is_id = v2r0_is_id,
+};
+
+/*
+ * Copy dquot from disk to memory
+ */
+static void v2r1_disk2memdqblk(struct dquot *dquot, void *dp)
+{
+ struct util_dqblk *m = &dquot->dq_dqb;
+ struct v2r1_disk_dqblk *d = dp, empty;
+
+ dquot->dq_id = ext2fs_le32_to_cpu(d->dqb_id);
+ m->dqb_ihardlimit = ext2fs_le64_to_cpu(d->dqb_ihardlimit);
+ m->dqb_isoftlimit = ext2fs_le64_to_cpu(d->dqb_isoftlimit);
+ m->dqb_bhardlimit = ext2fs_le64_to_cpu(d->dqb_bhardlimit);
+ m->dqb_bsoftlimit = ext2fs_le64_to_cpu(d->dqb_bsoftlimit);
+ m->dqb_curinodes = ext2fs_le64_to_cpu(d->dqb_curinodes);
+ m->dqb_curspace = ext2fs_le64_to_cpu(d->dqb_curspace);
+ m->dqb_itime = ext2fs_le64_to_cpu(d->dqb_itime);
+ m->dqb_btime = ext2fs_le64_to_cpu(d->dqb_btime);
+
+ memset(&empty, 0, sizeof(struct v2r1_disk_dqblk));
+ empty.dqb_itime = ext2fs_cpu_to_le64(1);
+ if (!memcmp(&empty, dp, sizeof(struct v2r1_disk_dqblk)))
+ m->dqb_itime = 0;
+}
+
+/*
+ * Copy dquot from memory to disk
+ */
+static void v2r1_mem2diskdqblk(void *dp, struct dquot *dquot)
+{
+ struct util_dqblk *m = &dquot->dq_dqb;
+ struct v2r1_disk_dqblk *d = dp;
+
+ d->dqb_ihardlimit = ext2fs_cpu_to_le64(m->dqb_ihardlimit);
+ d->dqb_isoftlimit = ext2fs_cpu_to_le64(m->dqb_isoftlimit);
+ d->dqb_bhardlimit = ext2fs_cpu_to_le64(m->dqb_bhardlimit);
+ d->dqb_bsoftlimit = ext2fs_cpu_to_le64(m->dqb_bsoftlimit);
+ d->dqb_curinodes = ext2fs_cpu_to_le64(m->dqb_curinodes);
+ d->dqb_curspace = ext2fs_cpu_to_le64(m->dqb_curspace);
+ d->dqb_itime = ext2fs_cpu_to_le64(m->dqb_itime);
+ d->dqb_btime = ext2fs_cpu_to_le64(m->dqb_btime);
+ d->dqb_id = ext2fs_cpu_to_le32(dquot->dq_id);
+ if (qtree_entry_unused(&dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree, dp))
+ d->dqb_itime = ext2fs_cpu_to_le64(1);
+}
+
+static int v2r1_is_id(void *dp, struct dquot *dquot)
+{
+ struct v2r1_disk_dqblk *d = dp;
+ struct qtree_mem_dqinfo *info =
+ &dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree;
+
+ if (qtree_entry_unused(info, dp))
+ return 0;
+ return ext2fs_le32_to_cpu(d->dqb_id) == dquot->dq_id;
+}
+
+static struct qtree_fmt_operations v2r1_fmt_ops = {
+ .mem2disk_dqblk = v2r1_mem2diskdqblk,
+ .disk2mem_dqblk = v2r1_disk2memdqblk,
+ .is_id = v2r1_is_id,
+};
+
+/*
+ * Copy dqinfo from disk to memory
+ */
+static inline void v2_disk2memdqinfo(struct util_dqinfo *m,
+ struct v2_disk_dqinfo *d)
+{
+ m->dqi_bgrace = ext2fs_le32_to_cpu(d->dqi_bgrace);
+ m->dqi_igrace = ext2fs_le32_to_cpu(d->dqi_igrace);
+ m->u.v2_mdqi.dqi_flags = ext2fs_le32_to_cpu(d->dqi_flags) & V2_DQF_MASK;
+ m->u.v2_mdqi.dqi_qtree.dqi_blocks = ext2fs_le32_to_cpu(d->dqi_blocks);
+ m->u.v2_mdqi.dqi_qtree.dqi_free_blk =
+ ext2fs_le32_to_cpu(d->dqi_free_blk);
+ m->u.v2_mdqi.dqi_qtree.dqi_free_entry =
+ ext2fs_le32_to_cpu(d->dqi_free_entry);
+}
+
+/*
+ * Copy dqinfo from memory to disk
+ */
+static inline void v2_mem2diskdqinfo(struct v2_disk_dqinfo *d,
+ struct util_dqinfo *m)
+{
+ d->dqi_bgrace = ext2fs_cpu_to_le32(m->dqi_bgrace);
+ d->dqi_igrace = ext2fs_cpu_to_le32(m->dqi_igrace);
+ d->dqi_flags = ext2fs_cpu_to_le32(m->u.v2_mdqi.dqi_flags & V2_DQF_MASK);
+ d->dqi_blocks = ext2fs_cpu_to_le32(m->u.v2_mdqi.dqi_qtree.dqi_blocks);
+ d->dqi_free_blk =
+ ext2fs_cpu_to_le32(m->u.v2_mdqi.dqi_qtree.dqi_free_blk);
+ d->dqi_free_entry =
+ ext2fs_cpu_to_le32(m->u.v2_mdqi.dqi_qtree.dqi_free_entry);
+}
+
+static int v2_read_header(struct quota_handle *h, struct v2_disk_dqheader *dqh)
+{
+ if (h->e2fs_read(&h->qh_qf, 0, dqh, sizeof(struct v2_disk_dqheader)) !=
+ sizeof(struct v2_disk_dqheader))
+ return 0;
+
+ return 1;
+}
+
+/*
+ * Check whether given quota file is in our format
+ */
+static int v2_check_file(struct quota_handle *h, int type, int fmt)
+{
+ struct v2_disk_dqheader dqh;
+ int file_magics[] = INITQMAGICS;
+ int be_magic;
+
+ if (fmt != QFMT_VFS_V1)
+ return 0;
+
+ if (!v2_read_header(h, &dqh))
+ return 0;
+
+ be_magic = ext2fs_be32_to_cpu((__force __be32)dqh.dqh_magic);
+ if (be_magic == file_magics[type]) {
+ log_err("Your quota file is stored in wrong endianness");
+ return 0;
+ }
+ if (V2_VERSION_R0 != ext2fs_le32_to_cpu(dqh.dqh_version) &&
+ V2_VERSION_R1 != ext2fs_le32_to_cpu(dqh.dqh_version))
+ return 0;
+ return 1;
+}
+
+/*
+ * Open quotafile
+ */
+static int v2_init_io(struct quota_handle *h)
+{
+ struct v2_disk_dqheader dqh;
+ struct v2_disk_dqinfo ddqinfo;
+ struct v2_mem_dqinfo *info;
+ __u64 filesize;
+ int version;
+
+ if (!v2_read_header(h, &dqh))
+ return -1;
+ version = ext2fs_le32_to_cpu(dqh.dqh_version);
+
+ if (version == V2_VERSION_R0) {
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size =
+ sizeof(struct v2r0_disk_dqblk);
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_ops = &v2r0_fmt_ops;
+ } else {
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size =
+ sizeof(struct v2r1_disk_dqblk);
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_ops = &v2r1_fmt_ops;
+ }
+
+ /* Read information about quotafile */
+ if (h->e2fs_read(&h->qh_qf, V2_DQINFOOFF, &ddqinfo,
+ sizeof(ddqinfo)) != sizeof(ddqinfo))
+ return -1;
+ v2_disk2memdqinfo(&h->qh_info, &ddqinfo);
+
+ /* Check to make sure quota file info is sane */
+ info = &h->qh_info.u.v2_mdqi;
+ if (ext2fs_file_get_lsize(h->qh_qf.e2_file, &filesize))
+ return -1;
+ if ((filesize > (1U << 31)) ||
+ (info->dqi_qtree.dqi_blocks >
+ (filesize + QT_BLKSIZE - 1) >> QT_BLKSIZE_BITS)) {
+ log_err("Quota inode %u corrupted: file size %llu; "
+ "dqi_blocks %u", h->qh_qf.ino,
+ (unsigned long long) filesize,
+ info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
+ if (info->dqi_qtree.dqi_free_blk >= info->dqi_qtree.dqi_blocks) {
+ log_err("Quota inode %u corrupted: free_blk %u; dqi_blocks %u",
+ h->qh_qf.ino, info->dqi_qtree.dqi_free_blk,
+ info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
+ if (info->dqi_qtree.dqi_free_entry >= info->dqi_qtree.dqi_blocks) {
+ log_err("Quota inode %u corrupted: free_entry %u; "
+ "dqi_blocks %u", h->qh_qf.ino,
+ info->dqi_qtree.dqi_free_entry,
+ info->dqi_qtree.dqi_blocks);
+ return -1;
+ }
+ return 0;
+}
+
+/*
+ * Initialize new quotafile
+ */
+static int v2_new_io(struct quota_handle *h)
+{
+ int file_magics[] = INITQMAGICS;
+ struct v2_disk_dqheader ddqheader;
+ struct v2_disk_dqinfo ddqinfo;
+
+ if (h->qh_fmt != QFMT_VFS_V1)
+ return -1;
+
+ /* Write basic quota header */
+ ddqheader.dqh_magic = ext2fs_cpu_to_le32(file_magics[h->qh_type]);
+ ddqheader.dqh_version = ext2fs_cpu_to_le32(V2_VERSION_R1);
+ if (h->e2fs_write(&h->qh_qf, 0, &ddqheader, sizeof(ddqheader)) !=
+ sizeof(ddqheader))
+ return -1;
+
+ /* Write information about quotafile */
+ h->qh_info.dqi_bgrace = MAX_DQ_TIME;
+ h->qh_info.dqi_igrace = MAX_IQ_TIME;
+ h->qh_info.u.v2_mdqi.dqi_flags = 0;
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks = QT_TREEOFF + 1;
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_blk = 0;
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_entry = 0;
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size =
+ sizeof(struct v2r1_disk_dqblk);
+ h->qh_info.u.v2_mdqi.dqi_qtree.dqi_ops = &v2r1_fmt_ops;
+ v2_mem2diskdqinfo(&ddqinfo, &h->qh_info);
+ if (h->e2fs_write(&h->qh_qf, V2_DQINFOOFF, &ddqinfo,
+ sizeof(ddqinfo)) !=
+ sizeof(ddqinfo))
+ return -1;
+
+ return 0;
+}
+
+/*
+ * Write information (grace times to file)
+ */
+static int v2_write_info(struct quota_handle *h)
+{
+ struct v2_disk_dqinfo ddqinfo;
+
+ v2_mem2diskdqinfo(&ddqinfo, &h->qh_info);
+ if (h->e2fs_write(&h->qh_qf, V2_DQINFOOFF, &ddqinfo, sizeof(ddqinfo)) !=
+ sizeof(ddqinfo))
+ return -1;
+
+ return 0;
+}
+
+/*
+ * Read dquot from disk
+ */
+static struct dquot *v2_read_dquot(struct quota_handle *h, qid_t id)
+{
+ return qtree_read_dquot(h, id);
+}
+
+/*
+ * Commit changes of dquot to disk - it might also mean deleting it when quota
+ * became fake one and user has no blocks.
+ * User can process use 'errno' to detect errstr.
+ */
+static int v2_commit_dquot(struct dquot *dquot)
+{
+ struct util_dqblk *b = &dquot->dq_dqb;
+
+ if (!b->dqb_curspace && !b->dqb_curinodes && !b->dqb_bsoftlimit &&
+ !b->dqb_isoftlimit && !b->dqb_bhardlimit && !b->dqb_ihardlimit)
+ qtree_delete_dquot(dquot);
+ else
+ qtree_write_dquot(dquot);
+ return 0;
+}
+
+static int v2_scan_dquots(struct quota_handle *h,
+ int (*process_dquot) (struct dquot *, void *),
+ void *data)
+{
+ return qtree_scan_dquots(h, process_dquot, data);
+}
+
+/* Report information about quotafile.
+ * TODO: Not used right now, but we should be able to use this when we add
+ * support to debugfs to read quota files.
+ */
+static int v2_report(struct quota_handle *h EXT2FS_ATTR((unused)),
+ int verbose EXT2FS_ATTR((unused)))
+{
+ log_err("Not Implemented.");
+ return -1;
+}
diff --git a/lib/support/quotaio_v2.h b/lib/support/quotaio_v2.h
new file mode 100644
index 0000000..35054ca
--- /dev/null
+++ b/lib/support/quotaio_v2.h
@@ -0,0 +1,69 @@
+/*
+ *
+ * Header file for disk format of new quotafile format
+ *
+ */
+
+#ifndef GUARD_QUOTAIO_V2_H
+#define GUARD_QUOTAIO_V2_H
+
+#include <sys/types.h>
+#include "quotaio.h"
+
+/* Offset of info header in file */
+#define V2_DQINFOOFF sizeof(struct v2_disk_dqheader)
+/* Supported version of quota-tree format */
+#define V2_VERSION_R1 1
+#define V2_VERSION_R0 0
+
+struct v2_disk_dqheader {
+ __le32 dqh_magic; /* Magic number identifying file */
+ __le32 dqh_version; /* File version */
+} __attribute__ ((packed));
+
+/* Flags for version specific files */
+#define V2_DQF_MASK 0x0000 /* Mask for all valid ondisk flags */
+
+/* Header with type and version specific information */
+struct v2_disk_dqinfo {
+ __le32 dqi_bgrace; /* Time before block soft limit becomes
+ * hard limit */
+ __le32 dqi_igrace; /* Time before inode soft limit becomes
+ * hard limit */
+ __le32 dqi_flags; /* Flags for quotafile (DQF_*) */
+ __le32 dqi_blocks; /* Number of blocks in file */
+ __le32 dqi_free_blk; /* Number of first free block in the list */
+ __le32 dqi_free_entry; /* Number of block with at least one
+ * free entry */
+} __attribute__ ((packed));
+
+struct v2r0_disk_dqblk {
+ __le32 dqb_id; /* id this quota applies to */
+ __le32 dqb_ihardlimit; /* absolute limit on allocated inodes */
+ __le32 dqb_isoftlimit; /* preferred inode limit */
+ __le32 dqb_curinodes; /* current # allocated inodes */
+ __le32 dqb_bhardlimit; /* absolute limit on disk space
+ * (in QUOTABLOCK_SIZE) */
+ __le32 dqb_bsoftlimit; /* preferred limit on disk space
+ * (in QUOTABLOCK_SIZE) */
+ __le64 dqb_curspace; /* current space occupied (in bytes) */
+ __le64 dqb_btime; /* time limit for excessive disk use */
+ __le64 dqb_itime; /* time limit for excessive inode use */
+} __attribute__ ((packed));
+
+struct v2r1_disk_dqblk {
+ __le32 dqb_id; /* id this quota applies to */
+ __le32 dqb_pad;
+ __le64 dqb_ihardlimit; /* absolute limit on allocated inodes */
+ __le64 dqb_isoftlimit; /* preferred inode limit */
+ __le64 dqb_curinodes; /* current # allocated inodes */
+ __le64 dqb_bhardlimit; /* absolute limit on disk space
+ * (in QUOTABLOCK_SIZE) */
+ __le64 dqb_bsoftlimit; /* preferred limit on disk space
+ * (in QUOTABLOCK_SIZE) */
+ __le64 dqb_curspace; /* current space occupied (in bytes) */
+ __le64 dqb_btime; /* time limit for excessive disk use */
+ __le64 dqb_itime; /* time limit for excessive inode use */
+} __attribute__ ((packed));
+
+#endif
diff --git a/lib/support/sort_r.h b/lib/support/sort_r.h
new file mode 100644
index 0000000..8473ca8
--- /dev/null
+++ b/lib/support/sort_r.h
@@ -0,0 +1,325 @@
+/* Isaac Turner 29 April 2014 Public Domain */
+#ifndef SORT_R_H_
+#define SORT_R_H_
+
+#include <stdlib.h>
+#include <string.h>
+
+/*
+
+sort_r function to be exported.
+
+Parameters:
+ base is the array to be sorted
+ nel is the number of elements in the array
+ width is the size in bytes of each element of the array
+ compar is the comparison function
+ arg is a pointer to be passed to the comparison function
+
+void sort_r(void *base, size_t nel, size_t width,
+ int (*compar)(const void *_a, const void *_b, void *_arg),
+ void *arg);
+
+*/
+
+#define _SORT_R_INLINE inline
+
+#if (defined HAVE_GNU_QSORT_R)
+# define _SORT_R_GNU
+#elif (defined HAVE_BSD_QSORT_R)
+# define _SORT_R_BSD
+#elif (defined __gnu_hurd__ || defined __GNU__ || \
+ defined __MINGW32__ || defined __GLIBC__)
+# define _SORT_R_GNU
+#elif (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \
+ defined __FreeBSD__ || defined __DragonFly__)
+# define _SORT_R_BSD
+#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
+# define _SORT_R_WINDOWS
+# undef _SORT_R_INLINE
+# define _SORT_R_INLINE __inline
+#else
+ /* Using our own recursive quicksort sort_r_simple() */
+#endif
+
+#if (defined NESTED_QSORT && NESTED_QSORT == 0)
+# undef NESTED_QSORT
+#endif
+
+#define SORT_R_SWAP(a,b,tmp) ((tmp) = (a), (a) = (b), (b) = (tmp))
+
+/* swap a and b */
+/* a and b must not be equal! */
+static _SORT_R_INLINE void sort_r_swap(char *__restrict a, char *__restrict b,
+ size_t w)
+{
+ char tmp, *end = a+w;
+ for(; a < end; a++, b++) { SORT_R_SWAP(*a, *b, tmp); }
+}
+
+/* swap a, b iff a>b */
+/* a and b must not be equal! */
+/* __restrict is same as restrict but better support on old machines */
+static _SORT_R_INLINE int sort_r_cmpswap(char *__restrict a,
+ char *__restrict b, size_t w,
+ int (*compar)(const void *_a,
+ const void *_b,
+ void *_arg),
+ void *arg)
+{
+ if(compar(a, b, arg) > 0) {
+ sort_r_swap(a, b, w);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+Swap consecutive blocks of bytes of size na and nb starting at memory addr ptr,
+with the smallest swap so that the blocks are in the opposite order. Blocks may
+be internally re-ordered e.g.
+
+ 12345ab -> ab34512
+ 123abc -> abc123
+ 12abcde -> deabc12
+*/
+static _SORT_R_INLINE void sort_r_swap_blocks(char *ptr, size_t na, size_t nb)
+{
+ if(na > 0 && nb > 0) {
+ if(na > nb) { sort_r_swap(ptr, ptr+na, nb); }
+ else { sort_r_swap(ptr, ptr+nb, na); }
+ }
+}
+
+/* Implement recursive quicksort ourselves */
+/* Note: quicksort is not stable, equivalent values may be swapped */
+static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w,
+ int (*compar)(const void *_a,
+ const void *_b,
+ void *_arg),
+ void *arg)
+{
+ char *b = (char *)base, *end = b + nel*w;
+
+ /* for(size_t i=0; i<nel; i++) {printf("%4i", *(int*)(b + i*sizeof(int)));}
+ printf("\n"); */
+
+ if(nel < 10) {
+ /* Insertion sort for arbitrarily small inputs */
+ char *pi, *pj;
+ for(pi = b+w; pi < end; pi += w) {
+ for(pj = pi; pj > b && sort_r_cmpswap(pj-w,pj,w,compar,arg); pj -= w) {}
+ }
+ }
+ else
+ {
+ /* nel > 6; Quicksort */
+
+ int cmp;
+ char *pl, *ple, *pr, *pre, *pivot;
+ char *last = b+w*(nel-1), *tmp;
+
+ /*
+ Use median of second, middle and second-last items as pivot.
+ First and last may have been swapped with pivot and therefore be extreme
+ */
+ char *l[3];
+ l[0] = b + w;
+ l[1] = b+w*(nel/2);
+ l[2] = last - w;
+
+ /* printf("pivots: %i, %i, %i\n", *(int*)l[0], *(int*)l[1], *(int*)l[2]); */
+
+ if(compar(l[0],l[1],arg) > 0) { SORT_R_SWAP(l[0], l[1], tmp); }
+ if(compar(l[1],l[2],arg) > 0) {
+ SORT_R_SWAP(l[1], l[2], tmp);
+ if(compar(l[0],l[1],arg) > 0) { SORT_R_SWAP(l[0], l[1], tmp); }
+ }
+
+ /* swap mid value (l[1]), and last element to put pivot as last element */
+ if(l[1] != last) { sort_r_swap(l[1], last, w); }
+
+ /*
+ pl is the next item on the left to be compared to the pivot
+ pr is the last item on the right that was compared to the pivot
+ ple is the left position to put the next item that equals the pivot
+ ple is the last right position where we put an item that equals the pivot
+
+ v- end (beyond the array)
+ EEEEEELLLLLLLLuuuuuuuuGGGGGGGEEEEEEEE.
+ ^- b ^- ple ^- pl ^- pr ^- pre ^- last (where the pivot is)
+
+ Pivot comparison key:
+ E = equal, L = less than, u = unknown, G = greater than, E = equal
+ */
+ pivot = last;
+ ple = pl = b;
+ pre = pr = last;
+
+ /*
+ Strategy:
+ Loop into the list from the left and right at the same time to find:
+ - an item on the left that is greater than the pivot
+ - an item on the right that is less than the pivot
+ Once found, they are swapped and the loop continues.
+ Meanwhile items that are equal to the pivot are moved to the edges of the
+ array.
+ */
+ while(pl < pr) {
+ /* Move left hand items which are equal to the pivot to the far left.
+ break when we find an item that is greater than the pivot */
+ for(; pl < pr; pl += w) {
+ cmp = compar(pl, pivot, arg);
+ if(cmp > 0) { break; }
+ else if(cmp == 0) {
+ if(ple < pl) { sort_r_swap(ple, pl, w); }
+ ple += w;
+ }
+ }
+ /* break if last batch of left hand items were equal to pivot */
+ if(pl >= pr) { break; }
+ /* Move right hand items which are equal to the pivot to the far right.
+ break when we find an item that is less than the pivot */
+ for(; pl < pr; ) {
+ pr -= w; /* Move right pointer onto an unprocessed item */
+ cmp = compar(pr, pivot, arg);
+ if(cmp == 0) {
+ pre -= w;
+ if(pr < pre) { sort_r_swap(pr, pre, w); }
+ }
+ else if(cmp < 0) {
+ if(pl < pr) { sort_r_swap(pl, pr, w); }
+ pl += w;
+ break;
+ }
+ }
+ }
+
+ pl = pr; /* pr may have gone below pl */
+
+ /*
+ Now we need to go from: EEELLLGGGGEEEE
+ to: LLLEEEEEEEGGGG
+
+ Pivot comparison key:
+ E = equal, L = less than, u = unknown, G = greater than, E = equal
+ */
+ sort_r_swap_blocks(b, ple-b, pl-ple);
+ sort_r_swap_blocks(pr, pre-pr, end-pre);
+
+ /*for(size_t i=0; i<nel; i++) {printf("%4i", *(int*)(b + i*sizeof(int)));}
+ printf("\n");*/
+
+ sort_r_simple(b, (pl-ple)/w, w, compar, arg);
+ sort_r_simple(end-(pre-pr), (pre-pr)/w, w, compar, arg);
+ }
+}
+
+
+#if defined NESTED_QSORT
+
+ static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
+ int (*compar)(const void *_a,
+ const void *_b,
+ void *aarg),
+ void *arg)
+ {
+ int nested_cmp(const void *a, const void *b)
+ {
+ return compar(a, b, arg);
+ }
+
+ qsort(base, nel, width, nested_cmp);
+ }
+
+#else /* !NESTED_QSORT */
+
+ /* Declare structs and functions */
+
+ #if defined _SORT_R_BSD
+
+ /* Ensure qsort_r is defined */
+ extern void qsort_r(void *base, size_t nel, size_t width, void *thunk,
+ int (*compar)(void *_thunk,
+ const void *_a, const void *_b));
+
+ #endif
+
+ #if defined _SORT_R_BSD || defined _SORT_R_WINDOWS
+
+ /* BSD (qsort_r), Windows (qsort_s) require argument swap */
+
+ struct sort_r_data
+ {
+ void *arg;
+ int (*compar)(const void *_a, const void *_b, void *_arg);
+ };
+
+ static _SORT_R_INLINE int sort_r_arg_swap(void *s,
+ const void *a, const void *b)
+ {
+ struct sort_r_data *ss = (struct sort_r_data*)s;
+ return (ss->compar)(a, b, ss->arg);
+ }
+
+ #endif
+
+ #if defined _SORT_R_GNU
+
+ typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
+ extern void qsort_r(void *base, size_t nel, size_t width,
+ __compar_d_fn_t __compar, void *arg)
+ __attribute__((nonnull (1, 4)));
+
+ #endif
+
+ /* implementation */
+
+ static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
+ int (*compar)(const void *_a,
+ const void *_b, void *_arg),
+ void *arg)
+ {
+ #if defined _SORT_R_GNU
+
+ #if defined __GLIBC__ && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8))
+
+ /* no qsort_r in glibc before 2.8, need to use nested qsort */
+ sort_r_simple(base, nel, width, compar, arg);
+
+ #else
+
+ qsort_r(base, nel, width, compar, arg);
+
+ #endif
+
+ #elif defined _SORT_R_BSD
+
+ struct sort_r_data tmp;
+ tmp.arg = arg;
+ tmp.compar = compar;
+ qsort_r(base, nel, width, &tmp, sort_r_arg_swap);
+
+ #elif defined _SORT_R_WINDOWS
+
+ struct sort_r_data tmp;
+ tmp.arg = arg;
+ tmp.compar = compar;
+ qsort_s(base, nel, width, sort_r_arg_swap, &tmp);
+
+ #else
+
+ /* Fall back to our own quicksort implementation */
+ sort_r_simple(base, nel, width, compar, arg);
+
+ #endif
+ }
+
+#endif /* !NESTED_QSORT */
+
+#undef _SORT_R_INLINE
+#undef _SORT_R_WINDOWS
+#undef _SORT_R_GNU
+#undef _SORT_R_BSD
+
+#endif /* SORT_R_H_ */
diff --git a/lib/uuid/Android.bp b/lib/uuid/Android.bp
new file mode 100644
index 0000000..3e6048d
--- /dev/null
+++ b/lib/uuid/Android.bp
@@ -0,0 +1,54 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ default_applicable_licenses: ["external_e2fsprogs_lib_uuid_license"],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "external_e2fsprogs_lib_uuid_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "COPYING",
+ ],
+}
+
+cc_library {
+ name: "libext2_uuid",
+ host_supported: true,
+ ramdisk_available: true,
+ vendor_ramdisk_available: true,
+ recovery_available: true,
+ vendor_available: true,
+ product_available: true,
+ unique_host_soname: true,
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "clear.c",
+ "compare.c",
+ "copy.c",
+ "gen_uuid.c",
+ "isnull.c",
+ "pack.c",
+ "parse.c",
+ "unpack.c",
+ "unparse.c",
+ "uuid_time.c",
+ ],
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+ header_libs: ["libext2-headers"],
+ export_include_dirs: ["."],
+ export_header_lib_headers: ["libext2-headers"],
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.virt",
+ ],
+}
diff --git a/lib/uuid/COPYING b/lib/uuid/COPYING
new file mode 100644
index 0000000..2f17068
--- /dev/null
+++ b/lib/uuid/COPYING
@@ -0,0 +1,25 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, and the entire permission notice in its entirety,
+ including the disclaimer of warranties.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
diff --git a/lib/uuid/Makefile.in b/lib/uuid/Makefile.in
new file mode 100644
index 0000000..5f69779
--- /dev/null
+++ b/lib/uuid/Makefile.in
@@ -0,0 +1,216 @@
+# Makefile for the UUID library
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/uuid
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+all::
+
+SMANPAGES= uuid.3 uuid_clear.3 uuid_compare.3 uuid_copy.3 \
+ uuid_generate.3 uuid_is_null.3 uuid_parse.3 \
+ uuid_time.3 uuid_unparse.3
+
+OBJS= clear.o \
+ compare.o \
+ copy.o \
+ gen_uuid.o \
+ isnull.o \
+ pack.o \
+ parse.o \
+ unpack.o \
+ unparse.o \
+ uuid_time.o
+
+SRCS= $(srcdir)/clear.c \
+ $(srcdir)/compare.c \
+ $(srcdir)/copy.c \
+ $(srcdir)/gen_uuid.c \
+ $(srcdir)/isnull.c \
+ $(srcdir)/pack.c \
+ $(srcdir)/parse.c \
+ $(srcdir)/unpack.c \
+ $(srcdir)/unparse.c \
+ $(srcdir)/uuid_time.c
+
+LIBRARY= libuuid
+LIBDIR= uuid
+
+ELF_VERSION = 1.2
+ELF_SO_VERSION = 1
+ELF_IMAGE = libuuid
+ELF_MYDIR = uuid
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS =
+
+BSDLIB_VERSION = 1.1
+BSDLIB_IMAGE = libuuid
+BSDLIB_MYDIR = uuid
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_ELF@
+@MAKEFILE_BSDLIB@
+@MAKEFILE_PROFILE@
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
+@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+all:: tst_uuid uuid_time $(SMANPAGES) uuid.pc
+
+uuid.h: $(srcdir)/uuid.h.in
+ $(E) " CP $@"
+ $(Q) cp $(srcdir)/uuid.h.in uuid.h
+
+$(top_builddir)/lib/uuid/uuid_types.h: $(srcdir)/uuid_types.h.in $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=$(my_dir)/uuid_types.h ./config.status
+
+tst_uuid.o: $(srcdir)/tst_uuid.c uuid.h
+ $(E) " CC $@"
+ $(Q) $(CC) $(ALL_CFLAGS) -c $(srcdir)/tst_uuid.c -o tst_uuid.o
+
+tst_uuid: tst_uuid.o $(DEPSTATIC_LIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o tst_uuid tst_uuid.o $(STATIC_LIBUUID)
+
+uuid_time: $(srcdir)/uuid_time.c $(DEPLIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -DDEBUG -o uuid_time \
+ $(srcdir)/uuid_time.c $(LIBUUID)
+
+uuid.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid.3.in uuid.3
+
+uuid_clear.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_clear.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_clear.3.in uuid_clear.3
+
+uuid_compare.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_compare.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_compare.3.in uuid_compare.3
+
+uuid_copy.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_copy.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_copy.3.in uuid_copy.3
+
+uuid_generate.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_generate.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_generate.3.in uuid_generate.3
+
+uuid_is_null.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_is_null.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_is_null.3.in uuid_is_null.3
+
+uuid_parse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_parse.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_parse.3.in uuid_parse.3
+
+uuid_time.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_time.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_time.3.in uuid_time.3
+
+uuid_unparse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_unparse.3.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_unparse.3.in uuid_unparse.3
+
+uuid.pc: $(srcdir)/uuid.pc.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); CONFIG_FILES=lib/uuid/uuid.pc ./config.status
+
+installdirs::
+ $(E) " MKDIR_P $(libdir) $(includedir)/uuid $(man3dir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir) \
+ $(DESTDIR)$(pkgconfigdir)
+
+install:: all installdirs
+ $(E) " INSTALL_DATA $(libdir)/libuuid.a"
+ $(Q) $(INSTALL_DATA) libuuid.a $(DESTDIR)$(libdir)/libuuid.a
+ -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libuuid.a
+ $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libuuid.a
+ $(E) " INSTALL_DATA $(includedir)/uuid/uuid.h"
+ $(Q) $(INSTALL_DATA) uuid.h $(DESTDIR)$(includedir)/uuid/uuid.h
+ $(Q) for i in $(SMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man3dir)/$$i.gz; \
+ echo " INSTALL_DATA $(man3dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
+ done
+ $(Q) $(RM) -f $(DESTDIR)$(man3dir)/uuid_generate_random.3.gz \
+ $(DESTDIR)$(man3dir)/uuid_generate_time.3.gz
+ $(E) " LINK $(man3dir)/uuid_generate_random.3"
+ $(Q) (cd $(DESTDIR)$(man3dir); \
+ $(LN) $(LINK_INSTALL_FLAGS) uuid_generate.3 uuid_generate_random.3)
+ $(E) " LINK $(man3dir)/uuid_generate_time.3"
+ $(Q) (cd $(DESTDIR)$(man3dir); \
+ $(LN) $(LINK_INSTALL_FLAGS) uuid_generate.3 uuid_generate_time.3)
+ $(E) " INSTALL_DATA $(pkgconfigdir)/uuid.pc"
+ $(Q) $(INSTALL_DATA) uuid.pc $(DESTDIR)$(pkgconfigdir)/uuid.pc
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libuuid.a \
+ $(DESTDIR)$(pkgconfigdir)/uuid.pc
+ for i in $(SMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man3dir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(man3dir)/uuid_generate_random.3 $(DESTDIR)$(man3dir)/uuid_generate_time.3
+
+clean::
+ $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* uuid.h \
+ ../libuuid.a ../libuuid_p.a tst_uuid uuid_time \
+ uuid.pc uuid_types.h $(SMANPAGES)
+
+fullcheck check:: tst_uuid
+ LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_uuid
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile uuid.pc \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+../../lib/libuuid.a: libuuid.a
+../../lib/libuuid.so: image
+../../lib/libuuid.dylib: image
+
+$(OBJS): subdirs uuid.h
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+clear.o: $(srcdir)/clear.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+compare.o: $(srcdir)/compare.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+copy.o: $(srcdir)/copy.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+gen_uuid.o: $(srcdir)/gen_uuid.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h $(srcdir)/uuidd.h
+isnull.o: $(srcdir)/isnull.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+pack.o: $(srcdir)/pack.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+parse.o: $(srcdir)/parse.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+unpack.o: $(srcdir)/unpack.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+unparse.o: $(srcdir)/unparse.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
+uuid_time.o: $(srcdir)/uuid_time.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/uuidP.h
diff --git a/lib/uuid/clear.c b/lib/uuid/clear.c
new file mode 100644
index 0000000..436f8f7
--- /dev/null
+++ b/lib/uuid/clear.c
@@ -0,0 +1,44 @@
+/*
+ * clear.c -- Clear a UUID
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "string.h"
+
+#include "uuidP.h"
+
+void uuid_clear(uuid_t uu)
+{
+ memset(uu, 0, 16);
+}
+
diff --git a/lib/uuid/compare.c b/lib/uuid/compare.c
new file mode 100644
index 0000000..d5fc503
--- /dev/null
+++ b/lib/uuid/compare.c
@@ -0,0 +1,56 @@
+/*
+ * compare.c --- compare whether or not two UUID's are the same
+ *
+ * Returns 0 if the two UUID's are different, and 1 if they are the same.
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "uuidP.h"
+#include <string.h>
+
+#define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1);
+
+int uuid_compare(const uuid_t uu1, const uuid_t uu2)
+{
+ struct uuid uuid1, uuid2;
+
+ uuid_unpack(uu1, &uuid1);
+ uuid_unpack(uu2, &uuid2);
+
+ UUCMP(uuid1.time_low, uuid2.time_low);
+ UUCMP(uuid1.time_mid, uuid2.time_mid);
+ UUCMP(uuid1.time_hi_and_version, uuid2.time_hi_and_version);
+ UUCMP(uuid1.clock_seq, uuid2.clock_seq);
+ return memcmp(uuid1.node, uuid2.node, 6);
+}
+
diff --git a/lib/uuid/configure.in b/lib/uuid/configure.in
new file mode 100644
index 0000000..bf9509f
--- /dev/null
+++ b/lib/uuid/configure.in
@@ -0,0 +1,10 @@
+dnl
+dnl Not used now, for the future when uuid is separated out into its
+dnl own package.
+dnl
+AC_INIT(gen_uuid.c)
+AC_PREREQ(2.12)
+
+AC_CHECK_HEADERS(stdlib.h unistd.h sys/sockio.h net/if.h netinet/in.h)
+AC_CHECK_FUNCS(srandom)
+AC_OUTPUT(Makefile)
diff --git a/lib/uuid/copy.c b/lib/uuid/copy.c
new file mode 100644
index 0000000..32e6f50
--- /dev/null
+++ b/lib/uuid/copy.c
@@ -0,0 +1,46 @@
+/*
+ * copy.c --- copy UUIDs
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "uuidP.h"
+
+void uuid_copy(uuid_t dst, const uuid_t src)
+{
+ unsigned char *cp1;
+ const unsigned char *cp2;
+ int i;
+
+ for (i=0, cp1 = dst, cp2 = src; i < 16; i++)
+ *cp1++ = *cp2++;
+}
diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c
new file mode 100644
index 0000000..2f02886
--- /dev/null
+++ b/lib/uuid/gen_uuid.c
@@ -0,0 +1,682 @@
+/*
+ * gen_uuid.c --- generate a DCE-compatible uuid
+ *
+ * Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+/*
+ * Force inclusion of SVID stuff since we need it if we're compiling in
+ * gcc-wall wall mode
+ */
+#define _SVID_SOURCE
+#define _DEFAULT_SOURCE /* since glibc 2.20 _SVID_SOURCE is deprecated */
+
+#include "config.h"
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#include <sys/stat.h>
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SYS_RANDOM_H
+#include <sys/random.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+#ifdef HAVE_SYS_SOCKIO_H
+#include <sys/sockio.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NET_IF_DL_H
+#include <net/if_dl.h>
+#endif
+#if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
+#include <sys/syscall.h>
+#endif
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+#include "uuidP.h"
+#include "uuidd.h"
+
+#ifdef HAVE_SRANDOM
+#define srand(x) srandom(x)
+#define rand() random()
+#endif
+
+#ifdef TLS
+#define THREAD_LOCAL static TLS
+#else
+#define THREAD_LOCAL static
+#endif
+
+#if defined(__linux__) && defined(__NR_gettid) && defined(HAVE_JRAND48)
+#define DO_JRAND_MIX
+THREAD_LOCAL unsigned short jrand_seed[3];
+#endif
+
+static int get_random_fd(void)
+{
+ struct timeval tv;
+ static int fd = -2;
+ int i;
+
+ if (fd == -2) {
+ gettimeofday(&tv, 0);
+#ifndef _WIN32
+ fd = open("/dev/urandom", O_RDONLY);
+ if (fd == -1)
+ fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
+ if (fd >= 0) {
+ i = fcntl(fd, F_GETFD);
+ if (i >= 0)
+ fcntl(fd, F_SETFD, i | FD_CLOEXEC);
+ }
+#endif
+ srand(((unsigned)getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
+#ifdef DO_JRAND_MIX
+ jrand_seed[0] = getpid() ^ (tv.tv_sec & 0xFFFF);
+ jrand_seed[1] = getppid() ^ (tv.tv_usec & 0xFFFF);
+ jrand_seed[2] = (tv.tv_sec ^ tv.tv_usec) >> 16;
+#endif
+ }
+ /* Crank the random number generator a few times */
+ gettimeofday(&tv, 0);
+ for (i = (tv.tv_sec ^ tv.tv_usec) & 0x1F; i > 0; i--)
+ rand();
+ return fd;
+}
+
+
+/*
+ * Generate a series of random bytes. Use /dev/urandom if possible,
+ * and if not, use srandom/random.
+ */
+static void get_random_bytes(void *buf, int nbytes)
+{
+ int i, n = nbytes, fd;
+ int lose_counter = 0;
+ unsigned char *cp = buf;
+
+#ifdef HAVE_GETRANDOM
+ i = getrandom(buf, nbytes, 0);
+ if (i == nbytes)
+ return;
+#endif
+#ifdef HAVE_GETENTROPY
+ if (getentropy(buf, nbytes) == 0)
+ return;
+#endif
+
+ fd = get_random_fd();
+ if (fd >= 0) {
+ while (n > 0) {
+ i = read(fd, cp, n);
+ if (i <= 0) {
+ if (lose_counter++ > 16)
+ break;
+ continue;
+ }
+ n -= i;
+ cp += i;
+ lose_counter = 0;
+ }
+ }
+
+ /*
+ * We do this all the time, but this is the only source of
+ * randomness if /dev/random/urandom is out to lunch.
+ */
+ for (cp = buf, i = 0; i < nbytes; i++)
+ *cp++ ^= (rand() >> 7) & 0xFF;
+#ifdef DO_JRAND_MIX
+ {
+ unsigned short tmp_seed[3];
+
+ memcpy(tmp_seed, jrand_seed, sizeof(tmp_seed));
+ jrand_seed[2] = jrand_seed[2] ^ syscall(__NR_gettid);
+ for (cp = buf, i = 0; i < nbytes; i++)
+ *cp++ ^= (jrand48(tmp_seed) >> 7) & 0xFF;
+ memcpy(jrand_seed, tmp_seed,
+ sizeof(jrand_seed) - sizeof(unsigned short));
+ }
+#endif
+
+ return;
+}
+
+/*
+ * Get the ethernet hardware address, if we can find it...
+ *
+ * XXX for a windows version, probably should use GetAdaptersInfo:
+ * http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c5451
+ * commenting out get_node_id just to get gen_uuid to compile under windows
+ * is not the right way to go!
+ */
+static int get_node_id(unsigned char *node_id)
+{
+#ifdef HAVE_NET_IF_H
+ int sd;
+ struct ifreq ifr, *ifrp;
+ struct ifconf ifc;
+ char buf[1024];
+ int n, i;
+ unsigned char *a;
+#ifdef HAVE_NET_IF_DL_H
+ struct sockaddr_dl *sdlp;
+#endif
+
+/*
+ * BSD 4.4 defines the size of an ifreq to be
+ * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
+ * However, under earlier systems, sa_len isn't present, so the size is
+ * just sizeof(struct ifreq)
+ */
+#ifdef HAVE_SA_LEN
+#ifndef max
+#define max(a,b) ((a) > (b) ? (a) : (b))
+#endif
+#define ifreq_size(i) max(sizeof(struct ifreq),\
+ sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
+#else
+#define ifreq_size(i) sizeof(struct ifreq)
+#endif /* HAVE_SA_LEN*/
+
+ sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
+ if (sd < 0) {
+ return -1;
+ }
+ memset(buf, 0, sizeof(buf));
+ ifc.ifc_len = sizeof(buf);
+ ifc.ifc_buf = buf;
+ if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0) {
+ close(sd);
+ return -1;
+ }
+ n = ifc.ifc_len;
+ for (i = 0; i < n; i+= ifreq_size(*ifrp) ) {
+ ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i);
+ strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ);
+#ifdef SIOCGIFHWADDR
+ if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
+ continue;
+ a = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
+#else
+#ifdef SIOCGENADDR
+ if (ioctl(sd, SIOCGENADDR, &ifr) < 0)
+ continue;
+ a = (unsigned char *) ifr.ifr_enaddr;
+#else
+#ifdef HAVE_NET_IF_DL_H
+ sdlp = (struct sockaddr_dl *) &ifrp->ifr_addr;
+ if ((sdlp->sdl_family != AF_LINK) || (sdlp->sdl_alen != 6))
+ continue;
+ a = (unsigned char *) &sdlp->sdl_data[sdlp->sdl_nlen];
+#else
+ /*
+ * XXX we don't have a way of getting the hardware
+ * address
+ */
+ close(sd);
+ return 0;
+#endif /* HAVE_NET_IF_DL_H */
+#endif /* SIOCGENADDR */
+#endif /* SIOCGIFHWADDR */
+ if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5])
+ continue;
+ if (node_id) {
+ memcpy(node_id, a, 6);
+ close(sd);
+ return 1;
+ }
+ }
+ close(sd);
+#endif
+ return 0;
+}
+
+/* Assume that the gettimeofday() has microsecond granularity */
+#define MAX_ADJUSTMENT 10
+
+static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
+ uint16_t *ret_clock_seq, int *num)
+{
+ THREAD_LOCAL int adjustment = 0;
+ THREAD_LOCAL struct timeval last = {0, 0};
+ THREAD_LOCAL int state_fd = -2;
+ THREAD_LOCAL FILE *state_f;
+ THREAD_LOCAL uint16_t clock_seq;
+ struct timeval tv;
+#ifndef _WIN32
+ struct flock fl;
+#endif
+ uint64_t clock_reg;
+ mode_t save_umask;
+ int len;
+
+ if (state_fd == -2) {
+ save_umask = umask(0);
+ state_fd = open("/var/lib/libuuid/clock.txt",
+ O_RDWR|O_CREAT, 0660);
+ (void) umask(save_umask);
+ if (state_fd >= 0) {
+ state_f = fdopen(state_fd, "r+");
+ if (!state_f) {
+ close(state_fd);
+ state_fd = -1;
+ }
+ }
+ }
+#ifndef _WIN32
+ fl.l_type = F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ fl.l_pid = 0;
+ if (state_fd >= 0) {
+ rewind(state_f);
+ while (fcntl(state_fd, F_SETLKW, &fl) < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ fclose(state_f);
+ state_fd = -1;
+ break;
+ }
+ }
+#endif
+ if (state_fd >= 0) {
+ unsigned int cl;
+ unsigned long tv1, tv2;
+ int a;
+
+ if (fscanf(state_f, "clock: %04x tv: %lu %lu adj: %d\n",
+ &cl, &tv1, &tv2, &a) == 4) {
+ clock_seq = cl & 0x3FFF;
+ last.tv_sec = tv1;
+ last.tv_usec = tv2;
+ adjustment = a;
+ }
+ }
+
+ if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
+ get_random_bytes(&clock_seq, sizeof(clock_seq));
+ clock_seq &= 0x3FFF;
+ gettimeofday(&last, 0);
+ last.tv_sec--;
+ }
+
+try_again:
+ gettimeofday(&tv, 0);
+ if ((tv.tv_sec < last.tv_sec) ||
+ ((tv.tv_sec == last.tv_sec) &&
+ (tv.tv_usec < last.tv_usec))) {
+ clock_seq = (clock_seq+1) & 0x3FFF;
+ adjustment = 0;
+ last = tv;
+ } else if ((tv.tv_sec == last.tv_sec) &&
+ (tv.tv_usec == last.tv_usec)) {
+ if (adjustment >= MAX_ADJUSTMENT)
+ goto try_again;
+ adjustment++;
+ } else {
+ adjustment = 0;
+ last = tv;
+ }
+
+ clock_reg = tv.tv_usec*10 + adjustment;
+ clock_reg += ((uint64_t) tv.tv_sec)*10000000;
+ clock_reg += (((uint64_t) 0x01B21DD2) << 32) + 0x13814000;
+
+ if (num && (*num > 1)) {
+ adjustment += *num - 1;
+ last.tv_usec += adjustment / 10;
+ adjustment = adjustment % 10;
+ last.tv_sec += last.tv_usec / 1000000;
+ last.tv_usec = last.tv_usec % 1000000;
+ }
+
+ if (state_fd > 0) {
+ rewind(state_f);
+ len = fprintf(state_f,
+ "clock: %04x tv: %016lu %08lu adj: %08d\n",
+ clock_seq, (unsigned long)last.tv_sec,
+ (unsigned long)last.tv_usec, adjustment);
+ fflush(state_f);
+ if (ftruncate(state_fd, len) < 0) {
+ fprintf(state_f, " \n");
+ fflush(state_f);
+ }
+ rewind(state_f);
+#ifndef _WIN32
+ fl.l_type = F_UNLCK;
+ if (fcntl(state_fd, F_SETLK, &fl) < 0) {
+ fclose(state_f);
+ state_fd = -1;
+ }
+#endif
+ }
+
+ *clock_high = clock_reg >> 32;
+ *clock_low = clock_reg;
+ *ret_clock_seq = clock_seq;
+ return 0;
+}
+
+#if defined(USE_UUIDD) && defined(HAVE_SYS_UN_H)
+static ssize_t read_all(int fd, char *buf, size_t count)
+{
+ ssize_t ret;
+ ssize_t c = 0;
+ int tries = 0;
+
+ memset(buf, 0, count);
+ while (count > 0) {
+ ret = read(fd, buf, count);
+ if (ret <= 0) {
+ if ((errno == EAGAIN || errno == EINTR || ret == 0) &&
+ (tries++ < 5))
+ continue;
+ return c ? c : -1;
+ }
+ if (ret > 0)
+ tries = 0;
+ count -= ret;
+ buf += ret;
+ c += ret;
+ }
+ return c;
+}
+
+/*
+ * Close all file descriptors
+ */
+static void close_all_fds(void)
+{
+ int i, max;
+
+#if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
+ max = sysconf(_SC_OPEN_MAX);
+#elif defined(HAVE_GETDTABLESIZE)
+ max = getdtablesize();
+#elif defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE)
+ struct rlimit rl;
+
+ getrlimit(RLIMIT_NOFILE, &rl);
+ max = rl.rlim_cur;
+#else
+ max = OPEN_MAX;
+#endif
+
+ for (i=0; i < max; i++) {
+ close(i);
+ if (i <= 2)
+ open("/dev/null", O_RDWR);
+ }
+}
+#endif /* defined(USE_UUIDD) && defined(HAVE_SYS_UN_H) */
+
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic push
+#if !defined(USE_UUIDD) || !defined(HAVE_SYS_UN_H)
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+#endif
+/*
+ * Try using the uuidd daemon to generate the UUID
+ *
+ * Returns 0 on success, non-zero on failure.
+ */
+static int get_uuid_via_daemon(int op, uuid_t out, int *num)
+{
+#if defined(USE_UUIDD) && defined(HAVE_SYS_UN_H)
+ char op_buf[64];
+ int op_len;
+ int s;
+ ssize_t ret;
+ int32_t reply_len = 0, expected = 16;
+ struct sockaddr_un srv_addr;
+ struct stat st;
+ pid_t pid;
+ static const char *uuidd_path = UUIDD_PATH;
+ static int access_ret = -2;
+ static int start_attempts = 0;
+
+ if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
+ return -1;
+
+ srv_addr.sun_family = AF_UNIX;
+ strcpy(srv_addr.sun_path, UUIDD_SOCKET_PATH);
+
+ if (connect(s, (const struct sockaddr *) &srv_addr,
+ sizeof(struct sockaddr_un)) < 0) {
+ if (access_ret == -2)
+ access_ret = access(uuidd_path, X_OK);
+ if (access_ret == 0)
+ access_ret = stat(uuidd_path, &st);
+ if (access_ret == 0 && (st.st_mode & (S_ISUID | S_ISGID)) == 0)
+ access_ret = access(UUIDD_DIR, W_OK);
+ if (access_ret == 0 && start_attempts++ < 5) {
+ if ((pid = fork()) == 0) {
+ close_all_fds();
+ execl(uuidd_path, "uuidd", "-qT", "300",
+ (char *) NULL);
+ exit(1);
+ }
+ (void) waitpid(pid, 0, 0);
+ if (connect(s, (const struct sockaddr *) &srv_addr,
+ sizeof(struct sockaddr_un)) < 0)
+ goto fail;
+ } else
+ goto fail;
+ }
+ op_buf[0] = op;
+ op_len = 1;
+ if (op == UUIDD_OP_BULK_TIME_UUID) {
+ memcpy(op_buf+1, num, sizeof(*num));
+ op_len += sizeof(*num);
+ expected += sizeof(*num);
+ }
+
+ ret = write(s, op_buf, op_len);
+ if (ret < 1)
+ goto fail;
+
+ ret = read_all(s, (char *) &reply_len, sizeof(reply_len));
+ if (ret < 0)
+ goto fail;
+
+ if (reply_len != expected)
+ goto fail;
+
+ ret = read_all(s, op_buf, reply_len);
+
+ if (op == UUIDD_OP_BULK_TIME_UUID)
+ memcpy(op_buf+16, num, sizeof(int));
+
+ memcpy(out, op_buf, 16);
+
+ close(s);
+ return ((ret == expected) ? 0 : -1);
+
+fail:
+ close(s);
+#endif
+ return -1;
+}
+#if __GNUC_PREREQ (4, 6)
+#pragma GCC diagnostic pop
+#endif
+
+void uuid__generate_time(uuid_t out, int *num)
+{
+ static unsigned char node_id[6];
+ static int has_init = 0;
+ struct uuid uu;
+ uint32_t clock_mid;
+
+ if (!has_init) {
+ if (get_node_id(node_id) <= 0) {
+ get_random_bytes(node_id, 6);
+ /*
+ * Set multicast bit, to prevent conflicts
+ * with IEEE 802 addresses obtained from
+ * network cards
+ */
+ node_id[0] |= 0x01;
+ }
+ has_init = 1;
+ }
+ get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num);
+ uu.clock_seq |= 0x8000;
+ uu.time_mid = (uint16_t) clock_mid;
+ uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000;
+ memcpy(uu.node, node_id, 6);
+ uuid_pack(&uu, out);
+}
+
+void uuid_generate_time(uuid_t out)
+{
+#ifdef TLS
+ THREAD_LOCAL int num = 0;
+ THREAD_LOCAL struct uuid uu;
+ THREAD_LOCAL time_t last_time = 0;
+ time_t now;
+
+ if (num > 0) {
+ now = time(0);
+ if (now > last_time+1)
+ num = 0;
+ }
+ if (num <= 0) {
+ num = 1000;
+ if (get_uuid_via_daemon(UUIDD_OP_BULK_TIME_UUID,
+ out, &num) == 0) {
+ last_time = time(0);
+ uuid_unpack(out, &uu);
+ num--;
+ return;
+ }
+ num = 0;
+ }
+ if (num > 0) {
+ uu.time_low++;
+ if (uu.time_low == 0) {
+ uu.time_mid++;
+ if (uu.time_mid == 0)
+ uu.time_hi_and_version++;
+ }
+ num--;
+ uuid_pack(&uu, out);
+ return;
+ }
+#else
+ if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, 0) == 0)
+ return;
+#endif
+
+ uuid__generate_time(out, 0);
+}
+
+
+void uuid__generate_random(uuid_t out, int *num)
+{
+ uuid_t buf;
+ struct uuid uu;
+ int i, n;
+
+ if (!num || !*num)
+ n = 1;
+ else
+ n = *num;
+
+ for (i = 0; i < n; i++) {
+ get_random_bytes(buf, sizeof(buf));
+ uuid_unpack(buf, &uu);
+
+ uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000;
+ uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF)
+ | 0x4000;
+ uuid_pack(&uu, out);
+ out += sizeof(uuid_t);
+ }
+}
+
+void uuid_generate_random(uuid_t out)
+{
+ int num = 1;
+ /* No real reason to use the daemon for random uuid's -- yet */
+
+ uuid__generate_random(out, &num);
+}
+
+
+/*
+ * This is the generic front-end to uuid_generate_random and
+ * uuid_generate_time. It uses uuid_generate_random only if
+ * /dev/urandom is available, since otherwise we won't have
+ * high-quality randomness.
+ */
+void uuid_generate(uuid_t out)
+{
+ if (get_random_fd() >= 0)
+ uuid_generate_random(out);
+ else
+ uuid_generate_time(out);
+}
diff --git a/lib/uuid/gen_uuid_nt.c b/lib/uuid/gen_uuid_nt.c
new file mode 100644
index 0000000..9a9a977
--- /dev/null
+++ b/lib/uuid/gen_uuid_nt.c
@@ -0,0 +1,93 @@
+/*
+ * gen_uuid_nt.c -- Use NT api to generate uuid
+ *
+ * Written by Andrey Shedel (andreys@ns.cr.cyco.com)
+ */
+
+
+#include "config.h"
+#include "uuidP.h"
+
+#pragma warning(push,4)
+
+#pragma comment(lib, "ntdll.lib")
+
+//
+// Here is a nice example why it's not a good idea
+// to use native API in ordinary applications.
+// Number of parameters in function below was changed from 3 to 4
+// for NT5.
+//
+//
+// NTSYSAPI
+// NTSTATUS
+// NTAPI
+// NtAllocateUuids(
+// OUT PULONG p1,
+// OUT PULONG p2,
+// OUT PULONG p3,
+// OUT PUCHAR Seed // 6 bytes
+// );
+//
+//
+
+unsigned long
+__stdcall
+NtAllocateUuids(
+ void* p1, // 8 bytes
+ void* p2, // 4 bytes
+ void* p3 // 4 bytes
+ );
+
+typedef
+unsigned long
+(__stdcall*
+NtAllocateUuids_2000)(
+ void* p1, // 8 bytes
+ void* p2, // 4 bytes
+ void* p3, // 4 bytes
+ void* seed // 6 bytes
+ );
+
+
+
+//
+// Nice, but instead of including ntddk.h ot winnt.h
+// I should define it here because they MISSED __stdcall in those headers.
+//
+
+__declspec(dllimport)
+struct _TEB*
+__stdcall
+NtCurrentTeb(void);
+
+
+//
+// The only way to get version information from the system is to examine
+// one stored in PEB. But it's pretty dangerous because this value could
+// be altered in image header.
+//
+
+static
+int
+Nt5(void)
+{
+ //return NtCuttentTeb()->Peb->OSMajorVersion >= 5;
+ return (int)*(int*)((char*)(int)(*(int*)((char*)NtCurrentTeb() + 0x30)) + 0xA4) >= 5;
+}
+
+
+
+
+void uuid_generate(uuid_t out)
+{
+ if(Nt5())
+ {
+ unsigned char seed[6];
+ ((NtAllocateUuids_2000)NtAllocateUuids)(out, ((char*)out)+8, ((char*)out)+12, &seed[0] );
+ }
+ else
+ {
+ NtAllocateUuids(out, ((char*)out)+8, ((char*)out)+12);
+ }
+}
diff --git a/lib/uuid/isnull.c b/lib/uuid/isnull.c
new file mode 100644
index 0000000..170c9a2
--- /dev/null
+++ b/lib/uuid/isnull.c
@@ -0,0 +1,49 @@
+/*
+ * isnull.c --- Check whether or not the UUID is null
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "uuidP.h"
+
+/* Returns 1 if the uuid is the NULL uuid */
+int uuid_is_null(const uuid_t uu)
+{
+ const unsigned char *cp;
+ int i;
+
+ for (i=0, cp = uu; i < 16; i++)
+ if (*cp++)
+ return 0;
+ return 1;
+}
+
diff --git a/lib/uuid/pack.c b/lib/uuid/pack.c
new file mode 100644
index 0000000..3db21ae
--- /dev/null
+++ b/lib/uuid/pack.c
@@ -0,0 +1,70 @@
+/*
+ * Internal routine for packing UUID's
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <string.h>
+#include "uuidP.h"
+
+void uuid_pack(const struct uuid *uu, uuid_t ptr)
+{
+ uint32_t tmp;
+ unsigned char *out = ptr;
+
+ tmp = uu->time_low;
+ out[3] = (unsigned char) tmp;
+ tmp >>= 8;
+ out[2] = (unsigned char) tmp;
+ tmp >>= 8;
+ out[1] = (unsigned char) tmp;
+ tmp >>= 8;
+ out[0] = (unsigned char) tmp;
+
+ tmp = uu->time_mid;
+ out[5] = (unsigned char) tmp;
+ tmp >>= 8;
+ out[4] = (unsigned char) tmp;
+
+ tmp = uu->time_hi_and_version;
+ out[7] = (unsigned char) tmp;
+ tmp >>= 8;
+ out[6] = (unsigned char) tmp;
+
+ tmp = uu->clock_seq;
+ out[9] = (unsigned char) tmp;
+ tmp >>= 8;
+ out[8] = (unsigned char) tmp;
+
+ memcpy(out+10, uu->node, 6);
+}
+
diff --git a/lib/uuid/parse.c b/lib/uuid/parse.c
new file mode 100644
index 0000000..4c0857d
--- /dev/null
+++ b/lib/uuid/parse.c
@@ -0,0 +1,80 @@
+/*
+ * parse.c --- UUID parsing
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "uuidP.h"
+
+int uuid_parse(const char *in, uuid_t uu)
+{
+ struct uuid uuid;
+ int i;
+ const char *cp;
+ char buf[3];
+
+ if (strlen(in) != 36)
+ return -1;
+ for (i=0, cp = in; i <= 36; i++,cp++) {
+ if ((i == 8) || (i == 13) || (i == 18) ||
+ (i == 23)) {
+ if (*cp == '-')
+ continue;
+ else
+ return -1;
+ }
+ if (i== 36)
+ if (*cp == 0)
+ continue;
+ if (!isxdigit(*cp))
+ return -1;
+ }
+ uuid.time_low = strtoul(in, NULL, 16);
+ uuid.time_mid = strtoul(in+9, NULL, 16);
+ uuid.time_hi_and_version = strtoul(in+14, NULL, 16);
+ uuid.clock_seq = strtoul(in+19, NULL, 16);
+ cp = in+24;
+ buf[2] = 0;
+ for (i=0; i < 6; i++) {
+ buf[0] = *cp++;
+ buf[1] = *cp++;
+ uuid.node[i] = strtoul(buf, NULL, 16);
+ }
+
+ uuid_pack(&uuid, uu);
+ return 0;
+}
diff --git a/lib/uuid/tst_uuid.c b/lib/uuid/tst_uuid.c
new file mode 100644
index 0000000..c1c2901
--- /dev/null
+++ b/lib/uuid/tst_uuid.c
@@ -0,0 +1,194 @@
+/*
+ * tst_uuid.c --- test program from the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <uuid/uuid.h>
+
+static int test_uuid(const char * uuid, int isValid)
+{
+ static const char * validStr[2] = {"invalid", "valid"};
+ uuid_t uuidBits;
+ int parsedOk;
+
+ parsedOk = uuid_parse(uuid, uuidBits) == 0;
+
+ printf("%s is %s", uuid, validStr[isValid]);
+ if (parsedOk != isValid) {
+ printf(" but uuid_parse says %s\n", validStr[parsedOk]);
+ return 1;
+ }
+ printf(", OK\n");
+ return 0;
+}
+
+#ifdef __GNUC__
+#define ATTR(x) __attribute__(x)
+#else
+#define ATTR(x)
+#endif
+
+int
+main(int argc ATTR((unused)) , char **argv ATTR((unused)))
+{
+ uuid_t buf, tst;
+ char str[100];
+ struct timeval tv;
+ time_t time_reg, time_gen;
+ unsigned char *cp;
+ int i;
+ int failed = 0;
+ int type, variant;
+
+ uuid_generate(buf);
+ uuid_unparse(buf, str);
+ printf("UUID generate = %s\n", str);
+ printf("UUID: ");
+ for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
+ printf("%02x", *cp++);
+ }
+ printf("\n");
+ type = uuid_type(buf); variant = uuid_variant(buf);
+ printf("UUID type = %d, UUID variant = %d\n", type, variant);
+ if (variant != UUID_VARIANT_DCE) {
+ printf("Incorrect UUID Variant; was expecting DCE!\n");
+ failed++;
+ }
+ printf("\n");
+
+ uuid_generate_random(buf);
+ uuid_unparse(buf, str);
+ printf("UUID random string = %s\n", str);
+ printf("UUID: ");
+ for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
+ printf("%02x", *cp++);
+ }
+ printf("\n");
+ type = uuid_type(buf);
+ variant = uuid_variant(buf);
+ printf("UUID type = %d, UUID variant = %d\n", type, variant);
+ if (variant != UUID_VARIANT_DCE) {
+ printf("Incorrect UUID Variant; was expecting DCE!\n");
+ failed++;
+ }
+ if (type != 4) {
+ printf("Incorrect UUID type; was expecting "
+ "4 (random type)!\n");
+ failed++;
+ }
+ printf("\n");
+
+ time_gen = time(0);
+ uuid_generate_time(buf);
+ uuid_unparse(buf, str);
+ printf("UUID string = %s\n", str);
+ printf("UUID time: ");
+ for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
+ printf("%02x", *cp++);
+ }
+ printf("\n");
+ type = uuid_type(buf);
+ variant = uuid_variant(buf);
+ printf("UUID type = %d, UUID variant = %d\n", type, variant);
+ if (variant != UUID_VARIANT_DCE) {
+ printf("Incorrect UUID Variant; was expecting DCE!\n");
+ failed++;
+ }
+ if (type != 1) {
+ printf("Incorrect UUID type; was expecting "
+ "1 (time-based type)!\\n");
+ failed++;
+ }
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ time_reg = uuid_time(buf, &tv);
+ printf("UUID generated at %lu reports %lu (%ld.%ld)\n",
+ (unsigned long)time_gen, (unsigned long)time_reg,
+ (long)tv.tv_sec, (long)tv.tv_usec);
+ /* allow 1s margin in case of rollover between sampling
+ * the current time and when the UUID is generated. */
+ if (time_reg > time_gen + 1) {
+ printf("UUID time comparison failed!\n");
+ failed++;
+ } else {
+ printf("UUID time comparison succeeded.\n");
+ }
+
+ if (uuid_parse(str, tst) < 0) {
+ printf("UUID parse failed\n");
+ failed++;
+ }
+ if (!uuid_compare(buf, tst)) {
+ printf("UUID parse and compare succeeded.\n");
+ } else {
+ printf("UUID parse and compare failed!\n");
+ failed++;
+ }
+ uuid_clear(tst);
+ if (uuid_is_null(tst))
+ printf("UUID clear and is null succeeded.\n");
+ else {
+ printf("UUID clear and is null failed!\n");
+ failed++;
+ }
+ uuid_copy(buf, tst);
+ if (!uuid_compare(buf, tst))
+ printf("UUID copy and compare succeeded.\n");
+ else {
+ printf("UUID copy and compare failed!\n");
+ failed++;
+ }
+
+ failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981b", 1);
+ failed += test_uuid("84949CC5-4701-4A84-895B-354C584A981B", 1);
+ failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981bc", 0);
+ failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981", 0);
+ failed += test_uuid("84949cc5x4701-4a84-895b-354c584a981b", 0);
+ failed += test_uuid("84949cc504701-4a84-895b-354c584a981b", 0);
+ failed += test_uuid("84949cc5-470104a84-895b-354c584a981b", 0);
+ failed += test_uuid("84949cc5-4701-4a840895b-354c584a981b", 0);
+ failed += test_uuid("84949cc5-4701-4a84-895b0354c584a981b", 0);
+ failed += test_uuid("g4949cc5-4701-4a84-895b-354c584a981b", 0);
+ failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981g", 0);
+
+ if (failed) {
+ printf("%d failures.\n", failed);
+ exit(1);
+ }
+ return 0;
+}
diff --git a/lib/uuid/unpack.c b/lib/uuid/unpack.c
new file mode 100644
index 0000000..2c8043d
--- /dev/null
+++ b/lib/uuid/unpack.c
@@ -0,0 +1,64 @@
+/*
+ * Internal routine for unpacking UUID
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <string.h>
+#include "uuidP.h"
+
+void uuid_unpack(const uuid_t in, struct uuid *uu)
+{
+ const uint8_t *ptr = in;
+ uint32_t tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_low = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_mid = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->time_hi_and_version = tmp;
+
+ tmp = *ptr++;
+ tmp = (tmp << 8) | *ptr++;
+ uu->clock_seq = tmp;
+
+ memcpy(uu->node, ptr, 6);
+}
+
diff --git a/lib/uuid/unparse.c b/lib/uuid/unparse.c
new file mode 100644
index 0000000..c556ae6
--- /dev/null
+++ b/lib/uuid/unparse.c
@@ -0,0 +1,77 @@
+/*
+ * unparse.c -- convert a UUID to string
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "uuidP.h"
+
+static const char *fmt_lower =
+ "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
+
+static const char *fmt_upper =
+ "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X";
+
+#ifdef UUID_UNPARSE_DEFAULT_UPPER
+#define FMT_DEFAULT fmt_upper
+#else
+#define FMT_DEFAULT fmt_lower
+#endif
+
+static void uuid_unparse_x(const uuid_t uu, char *out, const char *fmt)
+{
+ struct uuid uuid;
+
+ uuid_unpack(uu, &uuid);
+ sprintf(out, fmt,
+ uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
+ uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
+ uuid.node[0], uuid.node[1], uuid.node[2],
+ uuid.node[3], uuid.node[4], uuid.node[5]);
+}
+
+void uuid_unparse_lower(const uuid_t uu, char *out)
+{
+ uuid_unparse_x(uu, out, fmt_lower);
+}
+
+void uuid_unparse_upper(const uuid_t uu, char *out)
+{
+ uuid_unparse_x(uu, out, fmt_upper);
+}
+
+void uuid_unparse(const uuid_t uu, char *out)
+{
+ uuid_unparse_x(uu, out, FMT_DEFAULT);
+}
diff --git a/lib/uuid/uuid.3.in b/lib/uuid/uuid.3.in
new file mode 100644
index 0000000..1c51bd0
--- /dev/null
+++ b/lib/uuid/uuid.3.in
@@ -0,0 +1,66 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid \- DCE compatible Universally Unique Identifier library
+.SH SYNOPSIS
+.B #include <uuid/uuid.h>
+.SH DESCRIPTION
+The UUID library is used to generate unique identifiers for objects
+that may be accessible beyond the local system. This library
+generates UUIDs compatible with those created by the Open Software
+Foundation (OSF) Distributed Computing Environment (DCE) utility
+.BR uuidgen .
+.sp
+The UUIDs generated by this library can be reasonably expected to be
+unique within a system, and unique across all systems. They could
+be used, for instance, to generate unique HTTP cookies across multiple
+web servers without communication between the servers, and without fear
+of a name clash.
+.SH "CONFORMING TO"
+OSF DCE 1.1
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+The UUID library is part of the e2fsprogs package and is available from
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3),
+.BR uuid_parse (3),
+.BR uuid_time (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid.h.in b/lib/uuid/uuid.h.in
new file mode 100644
index 0000000..ca846da
--- /dev/null
+++ b/lib/uuid/uuid.h.in
@@ -0,0 +1,103 @@
+/*
+ * Public include file for the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUID_H
+#define _UUID_UUID_H
+
+#include <sys/types.h>
+#ifndef _WIN32
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+typedef unsigned char uuid_t[16];
+
+/* UUID Variant definitions */
+#define UUID_VARIANT_NCS 0
+#define UUID_VARIANT_DCE 1
+#define UUID_VARIANT_MICROSOFT 2
+#define UUID_VARIANT_OTHER 3
+
+/* UUID Type definitions */
+#define UUID_TYPE_DCE_TIME 1
+#define UUID_TYPE_DCE_RANDOM 4
+
+/* Allow UUID constants to be defined */
+#ifdef __GNUC__
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+ static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#else
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+ static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* clear.c */
+void uuid_clear(uuid_t uu);
+
+/* compare.c */
+int uuid_compare(const uuid_t uu1, const uuid_t uu2);
+
+/* copy.c */
+void uuid_copy(uuid_t dst, const uuid_t src);
+
+/* gen_uuid.c */
+void uuid_generate(uuid_t out);
+void uuid_generate_random(uuid_t out);
+void uuid_generate_time(uuid_t out);
+
+/* isnull.c */
+int uuid_is_null(const uuid_t uu);
+
+/* parse.c */
+int uuid_parse(const char *in, uuid_t uu);
+
+/* unparse.c */
+void uuid_unparse(const uuid_t uu, char *out);
+void uuid_unparse_lower(const uuid_t uu, char *out);
+void uuid_unparse_upper(const uuid_t uu, char *out);
+
+/* uuid_time.c */
+time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
+int uuid_type(const uuid_t uu);
+int uuid_variant(const uuid_t uu);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UUID_UUID_H */
diff --git a/lib/uuid/uuid.pc.in b/lib/uuid/uuid.pc.in
new file mode 100644
index 0000000..eaa4e4d
--- /dev/null
+++ b/lib/uuid/uuid.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: uuid
+Description: Universally unique id library
+Version: @E2FSPROGS_VERSION@
+Requires:
+Cflags: -I${includedir}/uuid -I${includedir}
+Libs: -L${libdir} -luuid
diff --git a/lib/uuid/uuidP.h b/lib/uuid/uuidP.h
new file mode 100644
index 0000000..6c0fd80
--- /dev/null
+++ b/lib/uuid/uuidP.h
@@ -0,0 +1,71 @@
+/*
+ * uuid.h -- private header file for uuids
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#include <uuid/uuid_types.h>
+#endif
+#include <sys/types.h>
+
+#include <uuid/uuid.h>
+
+/*
+ * Offset between 15-Oct-1582 and 1-Jan-70
+ */
+#define TIME_OFFSET_HIGH 0x01B21DD2
+#define TIME_OFFSET_LOW 0x13814000
+
+struct uuid {
+ uint32_t time_low;
+ uint16_t time_mid;
+ uint16_t time_hi_and_version;
+ uint16_t clock_seq;
+ uint8_t node[6];
+};
+
+#ifndef __GNUC_PREREQ
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+#define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+#else
+#define __GNUC_PREREQ(maj, min) 0
+#endif
+#endif
+
+/*
+ * prototypes
+ */
+void uuid_pack(const struct uuid *uu, uuid_t ptr);
+void uuid_unpack(const uuid_t in, struct uuid *uu);
diff --git a/lib/uuid/uuid_clear.3.in b/lib/uuid/uuid_clear.3.in
new file mode 100644
index 0000000..92d2bf2
--- /dev/null
+++ b/lib/uuid/uuid_clear.3.in
@@ -0,0 +1,60 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_CLEAR 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_clear \- reset value of UUID variable to the NULL value
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "void uuid_clear(uuid_t " uu );
+.fi
+.SH DESCRIPTION
+The
+.B uuid_clear
+function sets the value of the supplied uuid variable
+.I uu
+to the NULL value.
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3),
+.BR uuid_parse (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid_compare.3.in b/lib/uuid/uuid_compare.3.in
new file mode 100644
index 0000000..67bc9b9
--- /dev/null
+++ b/lib/uuid/uuid_compare.3.in
@@ -0,0 +1,66 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_COMPARE 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_compare \- compare whether two UUIDs are the same
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "int uuid_compare(uuid_t " uu1 ", uuid_t " uu2)
+.fi
+.SH DESCRIPTION
+The
+.B uuid_compare
+function compares the two supplied uuid variables
+.IR uu1 " and " uu2
+to each other.
+.SH RETURN VALUE
+Returns an integer less than, equal to, or greater than zero if
+.I uu1
+is found, respectively, to be lexicographical less than, equal, or
+greater than
+.IR uu2 .
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuid_clear (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3),
+.BR uuid_parse (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid_copy.3.in b/lib/uuid/uuid_copy.3.in
new file mode 100644
index 0000000..5f5e8c6
--- /dev/null
+++ b/lib/uuid/uuid_copy.3.in
@@ -0,0 +1,62 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_COPY 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_copy \- copy a UUID value
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "void uuid_copy(uuid_t " dst ", uuid_t " src);
+.fi
+.SH DESCRIPTION
+The
+.B uuid_copy
+function copies the UUID variable
+.IR src " to " dst .
+.SH RETURN VALUE
+The copied UUID is returned in the location pointed to by
+.IR dst .
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3),
+.BR uuid_parse (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid_generate.3.in b/lib/uuid/uuid_generate.3.in
new file mode 100644
index 0000000..e6be968
--- /dev/null
+++ b/lib/uuid/uuid_generate.3.in
@@ -0,0 +1,104 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_GENERATE 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_generate, uuid_generate_random, uuid_generate_time \- create a new unique UUID value
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "void uuid_generate(uuid_t " out );
+.BI "void uuid_generate_random(uuid_t " out );
+.BI "void uuid_generate_time(uuid_t " out );
+.fi
+.SH DESCRIPTION
+The
+.B uuid_generate
+function creates a new universally unique identifier (UUID). The uuid will
+be generated based on high-quality randomness from
+.IR /dev/urandom ,
+if available. If it is not available, then
+.B uuid_generate
+will use an alternative algorithm which uses the current time, the
+local ethernet MAC address (if available), and random data generated
+using a pseudo-random generator.
+.sp
+The
+.B uuid_generate_random
+function forces the use of the all-random UUID format, even if
+a high-quality random number generator (i.e.,
+.IR /dev/urandom )
+is not available, in which case a pseudo-random
+generator will be substituted. Note that the use of a pseudo-random
+generator may compromise the uniqueness of UUID's
+generated in this fashion.
+.sp
+The
+.B uuid_generate_time
+function forces the use of the alternative algorithm which uses the
+current time and the local ethernet MAC address (if available).
+This algorithm used to be the default one used to generate UUID, but
+because of the use of the ethernet MAC address, it can leak
+information about when and where the UUID was generated. This can cause
+privacy problems in some applications, so the
+.B uuid_generate
+function only uses this algorithm if a high-quality source of
+randomness is not available.
+.sp
+The UUID is 16 bytes (128 bits) long, which gives approximately 3.4x10^38
+unique values (there are approximately 10^80 elementary particles in
+the universe according to Carl Sagan's
+.IR Cosmos ).
+The new UUID can reasonably be considered unique among all UUIDs created
+on the local system, and among UUIDs created on other systems in the past
+and in the future.
+.SH RETURN VALUE
+The newly created UUID is returned in the memory location pointed to by
+.IR out .
+.SH "CONFORMING TO"
+OSF DCE 1.1
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuidgen (1),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_is_null (3),
+.BR uuid_parse (3),
+.BR uuid_time (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid_is_null.3.in b/lib/uuid/uuid_is_null.3.in
new file mode 100644
index 0000000..e14288d
--- /dev/null
+++ b/lib/uuid/uuid_is_null.3.in
@@ -0,0 +1,62 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_IS_NULL 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_is_null \- compare the value of the UUID to the NULL value
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "int uuid_is_null(uuid_t " uu );
+.fi
+.SH DESCRIPTION
+The
+.B uuid_is_null
+function compares the value of the supplied UUID variable
+.I uu
+to the NULL value. If the value is equal to the NULL UUID, 1 is returned,
+otherwise 0 is returned.
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_time (3),
+.BR uuid_parse (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid_parse.3.in b/lib/uuid/uuid_parse.3.in
new file mode 100644
index 0000000..f85acfa
--- /dev/null
+++ b/lib/uuid/uuid_parse.3.in
@@ -0,0 +1,71 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_PARSE 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_parse \- convert an input UUID string into binary representation
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "int uuid_parse( char *" in ", uuid_t " uu );
+.fi
+.SH DESCRIPTION
+The
+.B uuid_parse
+function converts the UUID string given by
+.I in
+into the binary representation. The input UUID is a string of the form
+1b4e28ba\-2fa1\-11d2\-883f\-b9a761bde3fb (in
+.BR printf (3)
+format "%08x\-%04x\-%04x\-%04x\-%012x", 36 bytes plus the trailing '\\0').
+.SH RETURN VALUE
+Upon successfully parsing the input string, 0 is returned, and the UUID is
+stored in the location pointed to by
+.IR uu ,
+otherwise \-1 is returned.
+.SH "CONFORMING TO"
+OSF DCE 1.1
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3),
+.BR uuid_time (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid_time.3.in b/lib/uuid/uuid_time.3.in
new file mode 100644
index 0000000..2c8ef5b
--- /dev/null
+++ b/lib/uuid/uuid_time.3.in
@@ -0,0 +1,74 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_TIME 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_time \- extract the time at which the UUID was created
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "time_t uuid_time(uuid_t " uu ", struct timeval *" ret_tv )
+.fi
+.SH DESCRIPTION
+The
+.B uuid_time
+function extracts the time at which the supplied time-based UUID
+.I uu
+was created. Note that the UUID creation time is only encoded within
+certain types of UUIDs. This function can only reasonably expect to
+extract the creation time for UUIDs created with the
+.BR uuid_generate_time (3)
+function. It may or may not work with UUIDs created by other mechanisms.
+.SH "RETURN VALUES"
+The time at which the UUID was created, in seconds since January 1, 1970 GMT
+(the epoch), is returned (see
+.BR time "(2))."
+The time at which the UUID was created, in seconds and microseconds since
+the epoch, is also stored in the location pointed to by
+.I ret_tv
+(see
+.BR gettimeofday "(2))."
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3),
+.BR uuid_parse (3),
+.BR uuid_unparse (3)
diff --git a/lib/uuid/uuid_time.c b/lib/uuid/uuid_time.c
new file mode 100644
index 0000000..b519d3c
--- /dev/null
+++ b/lib/uuid/uuid_time.c
@@ -0,0 +1,167 @@
+/*
+ * uuid_time.c --- Interpret the time field from a uuid. This program
+ * violates the UUID abstraction barrier by reaching into the guts
+ * of a UUID and interpreting it.
+ *
+ * Copyright (C) 1998, 1999 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+#include "uuidP.h"
+
+time_t uuid_time(const uuid_t uu, struct timeval *ret_tv)
+{
+ struct timeval tv;
+ struct uuid uuid;
+ uint32_t high;
+ uint64_t clock_reg;
+
+ uuid_unpack(uu, &uuid);
+
+ high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16);
+ clock_reg = uuid.time_low | ((uint64_t) high << 32);
+
+ clock_reg -= (((uint64_t) 0x01B21DD2) << 32) + 0x13814000;
+ tv.tv_sec = clock_reg / 10000000;
+ tv.tv_usec = (clock_reg % 10000000) / 10;
+
+ if (ret_tv)
+ *ret_tv = tv;
+
+ return tv.tv_sec;
+}
+
+int uuid_type(const uuid_t uu)
+{
+ struct uuid uuid;
+
+ uuid_unpack(uu, &uuid);
+ return ((uuid.time_hi_and_version >> 12) & 0xF);
+}
+
+int uuid_variant(const uuid_t uu)
+{
+ struct uuid uuid;
+ int var;
+
+ uuid_unpack(uu, &uuid);
+ var = uuid.clock_seq;
+
+ if ((var & 0x8000) == 0)
+ return UUID_VARIANT_NCS;
+ if ((var & 0x4000) == 0)
+ return UUID_VARIANT_DCE;
+ if ((var & 0x2000) == 0)
+ return UUID_VARIANT_MICROSOFT;
+ return UUID_VARIANT_OTHER;
+}
+
+#ifdef DEBUG
+static const char *variant_string(int variant)
+{
+ switch (variant) {
+ case UUID_VARIANT_NCS:
+ return "NCS";
+ case UUID_VARIANT_DCE:
+ return "DCE";
+ case UUID_VARIANT_MICROSOFT:
+ return "Microsoft";
+ default:
+ return "Other";
+ }
+}
+
+
+int
+main(int argc, char **argv)
+{
+ uuid_t buf;
+ time_t time_reg;
+ struct timeval tv;
+ int type, variant;
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s uuid\n", argv[0]);
+ exit(1);
+ }
+ if (uuid_parse(argv[1], buf)) {
+ fprintf(stderr, "Invalid UUID: %s\n", argv[1]);
+ exit(1);
+ }
+ variant = uuid_variant(buf);
+ type = uuid_type(buf);
+ time_reg = uuid_time(buf, &tv);
+
+ printf("UUID variant is %d (%s)\n", variant, variant_string(variant));
+ if (variant != UUID_VARIANT_DCE) {
+ printf("Warning: This program only knows how to interpret "
+ "DCE UUIDs.\n\tThe rest of the output is likely "
+ "to be incorrect!!\n");
+ }
+ printf("UUID type is %d", type);
+ switch (type) {
+ case 1:
+ printf(" (time based)\n");
+ break;
+ case 2:
+ printf(" (DCE)\n");
+ break;
+ case 3:
+ printf(" (name-based)\n");
+ break;
+ case 4:
+ printf(" (random)\n");
+ break;
+ default:
+ printf("\n");
+ }
+ if (type != 1) {
+ printf("Warning: not a time-based UUID, so UUID time "
+ "decoding will likely not work!\n");
+ }
+ printf("UUID time is: (%ld, %ld): %s\n", (long)tv.tv_sec, (long)tv.tv_usec,
+ ctime(&time_reg));
+
+ return 0;
+}
+#endif
diff --git a/lib/uuid/uuid_types.h.in b/lib/uuid/uuid_types.h.in
new file mode 100644
index 0000000..f21ff4e
--- /dev/null
+++ b/lib/uuid/uuid_types.h.in
@@ -0,0 +1,50 @@
+/*
+ * If linux/types.h is already been included, assume it has defined
+ * everything we need. (cross fingers) Other header files may have
+ * also defined the types that we need.
+ */
+#if (!defined(_STDINT_H) && !defined(_UUID_STDINT_H))
+#define _UUID_STDINT_H
+
+typedef unsigned char uint8_t;
+typedef signed char int8_t;
+
+#if (@SIZEOF_INT@ == 8)
+typedef int int64_t;
+typedef unsigned int uint64_t;
+#elif (@SIZEOF_LONG@ == 8)
+typedef long int64_t;
+typedef unsigned long uint64_t;
+#elif (@SIZEOF_LONG_LONG@ == 8)
+#if defined(__GNUC__)
+typedef __signed__ long long int64_t;
+#else
+typedef signed long long int64_t;
+#endif
+typedef unsigned long long uint64_t;
+#endif
+
+#if (@SIZEOF_INT@ == 2)
+typedef int int16_t;
+typedef unsigned int uint16_t;
+#elif (@SIZEOF_SHORT@ == 2)
+typedef short int16_t;
+typedef unsigned short uint16_t;
+#else
+ ?==error: undefined 16 bit type
+#endif
+
+#if (@SIZEOF_INT@ == 4)
+typedef int int32_t;
+typedef unsigned int uint32_t;
+#elif (@SIZEOF_LONG@ == 4)
+typedef long int32_t;
+typedef unsigned long uint32_t;
+#elif (@SIZEOF_SHORT@ == 4)
+typedef short int32_t;
+typedef unsigned short uint32_t;
+#else
+ ?== error: undefined 32 bit type
+#endif
+
+#endif
diff --git a/lib/uuid/uuid_unparse.3.in b/lib/uuid/uuid_unparse.3.in
new file mode 100644
index 0000000..e8ca9de
--- /dev/null
+++ b/lib/uuid/uuid_unparse.3.in
@@ -0,0 +1,79 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" %Begin-Header%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, and the entire permission notice in its entirety,
+.\" including the disclaimer of warranties.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+.\" WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+.\" USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\" %End-Header%
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUID_UNPARSE 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_unparse \- convert an UUID from binary representation to a string
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "void uuid_unparse(uuid_t " uu ", char *" out );
+.BI "void uuid_unparse_upper(uuid_t " uu ", char *" out );
+.BI "void uuid_unparse_lower(uuid_t " uu ", char *" out );
+.fi
+.SH DESCRIPTION
+The
+.B uuid_unparse
+function converts the supplied UUID
+.I uu
+from the binary representation into a 36\-byte string (plus tailing '\\0')
+of the form 1b4e28ba\-2fa1\-11d2\-883f\-0016d3cca427 and stores this
+value in the character string pointed to by
+.IR out .
+The case of the hex digits returned by
+.B uuid_unparse
+may be upper or lower case, and is
+dependent on the system-dependent local default.
+.PP
+If the case of the
+hex digits is important then the functions
+.B uuid_unparse_upper
+and
+.B uuid_unparse_lower
+may be used.
+.SH "CONFORMING TO"
+OSF DCE 1.1
+.SH AUTHOR
+Theodore Y. Ts'o
+.SH AVAILABILITY
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH "SEE ALSO"
+.BR uuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_time (3),
+.BR uuid_is_null (3),
+.BR uuid_parse (3)
diff --git a/lib/uuid/uuidd.h b/lib/uuid/uuidd.h
new file mode 100644
index 0000000..c71f4b7
--- /dev/null
+++ b/lib/uuid/uuidd.h
@@ -0,0 +1,54 @@
+/*
+ * Definitions used by the uuidd daemon
+ *
+ * Copyright (C) 2007 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUIDD_H
+#define _UUID_UUIDD_H
+
+#define UUIDD_DIR "/var/lib/libuuid"
+#define UUIDD_SOCKET_PATH UUIDD_DIR "/request"
+#define UUIDD_PIDFILE_PATH UUIDD_DIR "/uuidd.pid"
+#define UUIDD_PATH "/usr/sbin/uuidd"
+
+#define UUIDD_OP_GETPID 0
+#define UUIDD_OP_GET_MAXOP 1
+#define UUIDD_OP_TIME_UUID 2
+#define UUIDD_OP_RANDOM_UUID 3
+#define UUIDD_OP_BULK_TIME_UUID 4
+#define UUIDD_OP_BULK_RANDOM_UUID 5
+#define UUIDD_MAX_OP UUIDD_OP_BULK_RANDOM_UUID
+
+extern void uuid__generate_time(uuid_t out, int *num);
+extern void uuid__generate_random(uuid_t out, int *num);
+
+#endif /* _UUID_UUID_H */
diff --git a/misc/Android.bp b/misc/Android.bp
new file mode 100644
index 0000000..0656bf4
--- /dev/null
+++ b/misc/Android.bp
@@ -0,0 +1,355 @@
+// Copyright 2017 The Android Open Source Project
+
+// Library used to export files from this directory to other programs in this
+// project.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ // SPDX-license-identifier-LGPL
+ // SPDX-license-identifier-LGPL-2.1
+ // SPDX-license-identifier-LGPL-3.0
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+cc_library {
+ name: "libext2_misc",
+ host_supported: true,
+ recovery_available: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+
+ srcs: [
+ "create_inode.c",
+ ],
+ shared_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ "libext2_quota",
+ ],
+ export_include_dirs: ["."],
+}
+
+//########################################################################
+// Build mke2fs
+
+cc_defaults {
+ name: "mke2fs_defaults",
+ recovery_available: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: [
+ "mke2fs.c",
+ "util.c",
+ "mk_hugefiles.c",
+ "default_profile.c",
+ ],
+ stl: "libc++_static",
+ include_dirs: ["external/e2fsprogs/e2fsck"],
+}
+
+cc_binary {
+ name: "mke2fs",
+ host_supported: true,
+ defaults: ["mke2fs_defaults"],
+ target: {
+ host: {
+ static_libs: [
+ "libext2_blkid",
+ "libext2_misc",
+ "libext2_uuid",
+ "libext2_quota",
+ "libext2_com_err",
+ "libext2_e2p",
+ "libext2fs",
+ "libsparse",
+ "libbase",
+ "libz",
+ ],
+ },
+ not_windows: {
+ required: [
+ "mke2fs.conf",
+ ],
+ },
+ windows: {
+ ldflags: ["-static"],
+ enabled: true,
+ },
+ android: {
+ required: [
+ "mke2fs.conf",
+ ],
+ shared_libs: [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_misc",
+ "libext2_uuid",
+ "libext2_quota",
+ "libext2_com_err",
+ "libext2_e2p",
+ ],
+ symlinks: [
+ "mkfs.ext2",
+ "mkfs.ext3",
+ "mkfs.ext4",
+ ],
+ },
+ },
+}
+
+cc_binary {
+ name: "mke2fs.microdroid",
+ defaults: ["mke2fs_defaults"],
+ bootstrap: true,
+ target: {
+ android: {
+ required: [
+ "mke2fs.conf",
+ ],
+ shared_libs: [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_misc",
+ "libext2_uuid",
+ "libext2_quota",
+ "libext2_com_err",
+ "libext2_e2p",
+ ],
+ symlinks: ["mkfs.ext4.microdroid"],
+ },
+ },
+ installable: false,
+ stem: "mke2fs",
+ visibility: ["//packages/modules/Virtualization/microdroid"],
+}
+
+//##########################################################################
+// Build tune2fs
+
+cc_defaults {
+ name: "tune2fs-defaults",
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "tune2fs.c",
+ "util.c",
+ ],
+ cflags: ["-DNO_RECOVERY"],
+ include_dirs: ["external/e2fsprogs/e2fsck"],
+}
+
+tune2fs_libs = [
+ "libext2_blkid",
+ "libext2_com_err",
+ "libext2_quota",
+ "libext2_uuid",
+ "libext2_e2p",
+ "libext2fs",
+]
+
+cc_binary {
+ name: "tune2fs",
+ host_supported: true,
+ vendor_ramdisk_available: true,
+ defaults: ["tune2fs-defaults"],
+
+ shared_libs: tune2fs_libs,
+}
+
+cc_binary {
+ name: "tune2fs_static",
+ static_executable: true,
+ defaults: ["tune2fs-defaults"],
+
+ static_libs: tune2fs_libs,
+}
+
+cc_binary {
+ name: "tune2fs_ramdisk",
+ stem: "tune2fs",
+ static_executable: true,
+ ramdisk: true,
+ defaults: ["tune2fs-defaults"],
+ static_libs: tune2fs_libs,
+}
+
+cc_library_static {
+ name: "libtune2fs",
+ defaults: ["tune2fs-defaults"],
+
+ cflags: ["-DBUILD_AS_LIB"],
+ static_libs: tune2fs_libs,
+}
+
+//########################################################################
+// Build badblocks
+
+cc_binary {
+ name: "badblocks",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["badblocks.c"],
+ shared_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ "libext2_uuid",
+ "libext2_blkid",
+ "libext2_e2p",
+ ],
+}
+
+//########################################################################
+// Build chattr
+
+cc_binary {
+ name: "chattr-e2fsprogs",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["chattr.c"],
+ shared_libs: [
+ "libext2_com_err",
+ "libext2_e2p",
+ ],
+}
+
+//########################################################################
+// Build lsattr
+
+cc_defaults {
+ name: "lsattr-defaults",
+ srcs: ["lsattr.c"],
+ defaults: ["e2fsprogs-defaults"],
+}
+
+lsattr_libs = [
+ "libext2_com_err",
+ "libext2_e2p",
+]
+
+cc_binary {
+ name: "lsattr-e2fsprogs",
+ host_supported: true,
+ defaults: ["lsattr-defaults"],
+
+ shared_libs: lsattr_libs,
+}
+
+cc_binary {
+ name: "lsattr_static",
+ static_executable: true,
+ defaults: ["lsattr-defaults"],
+
+ static_libs: lsattr_libs,
+}
+
+//########################################################################
+// Build blkid
+
+cc_binary {
+ name: "blkid",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["blkid.c"],
+ shared_libs: [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_com_err",
+ "libext2_e2p",
+ ],
+}
+
+cc_binary {
+ name: "blkid_static",
+ host_supported: true,
+ static_executable: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["blkid.c"],
+ static_libs: [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_com_err",
+ "libext2_e2p",
+ "libext2_uuid",
+ ],
+}
+
+//########################################################################
+// Build e4crypt
+
+cc_binary {
+ name: "e4crypt",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["e4crypt.c"],
+ shared_libs: [
+ "libext2fs",
+ "libext2_uuid",
+ ],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+//##########################################################################
+// Build e2image
+
+cc_binary {
+ name: "e2image",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["e2image.c"],
+ shared_libs: [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_com_err",
+ "libext2_quota",
+ ],
+}
+
+//##########################################################################
+// Build filefrag
+
+cc_binary {
+ name: "filefrag",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: ["filefrag.c"],
+ shared_libs: [
+ "libext2fs",
+ ],
+}
+
+//##########################################################################
+// Build e2freefrag
+
+cc_binary {
+ name: "e2freefrag",
+ host_supported: true,
+ defaults: ["e2fsprogs-defaults"],
+
+ srcs: [
+ "e2freefrag.c",
+ ],
+ header_libs: ["libext2-headers"],
+ shared_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ ],
+}
diff --git a/misc/Makefile.in b/misc/Makefile.in
new file mode 100644
index 0000000..e5420bb
--- /dev/null
+++ b/misc/Makefile.in
@@ -0,0 +1,922 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = misc
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_PROG= e4defrag
+@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_MAN= e4defrag.8
+
+@LINUX_CMT@E4CRYPT_PROG = e4crypt
+@LINUX_CMT@E4CRYPT_MAN= e4crypt.8
+
+@IMAGER_CMT@E2IMAGE_PROG= e2image
+@IMAGER_CMT@E2IMAGE_STATIC= e2image.static
+@IMAGER_CMT@E2IMAGE_MAN= e2image.8
+
+@UUIDD_CMT@UUIDD_PROG= uuidd
+@UUIDD_CMT@UUIDD_STATIC= uuidd.static
+@UUIDD_CMT@UUIDD_MAN= uuidd.8
+@UUIDD_CMT@UUIDD_PROFILED= uuidd.profiled
+
+@BLKID_CMT@BLKID_PROG= blkid
+@BLKID_CMT@BLKID_STATIC= blkid.static
+@BLKID_CMT@BLKID_MAN= blkid.8
+
+@BLKID_CMT@FINDFS_LINK= findfs
+@BLKID_CMT@FINDFS_MAN= findfs.8
+
+@FUSE_CMT@FUSE_PROG= fuse2fs
+
+SPROGS= mke2fs badblocks tune2fs dumpe2fs $(BLKID_PROG) logsave \
+ $(E2IMAGE_PROG) @FSCK_PROG@ e2undo
+USPROGS= mklost+found filefrag e2freefrag $(UUIDD_PROG) \
+ $(E4DEFRAG_PROG) $(E4CRYPT_PROG)
+SMANPAGES= tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
+ e2label.8 $(FINDFS_MAN) $(BLKID_MAN) $(E2IMAGE_MAN) \
+ logsave.8 filefrag.8 e2freefrag.8 e2undo.8 \
+ $(UUIDD_MAN) $(E4DEFRAG_MAN) $(E4CRYPT_MAN) @FSCK_MAN@ \
+ e2mmpstatus.8
+FMANPAGES= mke2fs.conf.5 ext4.5
+
+UPROGS= chattr lsattr $(FUSE_PROG) @UUID_CMT@ uuidgen
+UMANPAGES= chattr.1 lsattr.1 @UUID_CMT@ uuidgen.1
+UMANPAGES+= @FUSE_CMT@ fuse2fs.1
+
+LPROGS= @E2INITRD_PROG@
+
+TUNE2FS_OBJS= tune2fs.o util.o journal.o recovery.o revoke.o
+MKLPF_OBJS= mklost+found.o
+MKE2FS_OBJS= mke2fs.o util.o default_profile.o mk_hugefiles.o \
+ create_inode.o
+CHATTR_OBJS= chattr.o
+LSATTR_OBJS= lsattr.o
+UUIDGEN_OBJS= uuidgen.o
+UUIDD_OBJS= uuidd.o
+DUMPE2FS_OBJS= dumpe2fs.o
+BADBLOCKS_OBJS= badblocks.o
+E2IMAGE_OBJS= e2image.o
+FSCK_OBJS= fsck.o base_device.o ismounted.o
+BLKID_OBJS= blkid.o
+FILEFRAG_OBJS= filefrag.o
+E2UNDO_OBJS= e2undo.o
+E4DEFRAG_OBJS= e4defrag.o
+E4CRYPT_OBJS= e4crypt.o
+E2FREEFRAG_OBJS= e2freefrag.o
+E2FUZZ_OBJS= e2fuzz.o
+FUSE2FS_OBJS= fuse2fs.o journal.o recovery.o revoke.o
+
+PROFILED_TUNE2FS_OBJS= profiled/tune2fs.o profiled/util.o profiled/journal.o \
+ profiled/recovery.o profiled/revoke.o
+PROFILED_MKLPF_OBJS= profiled/mklost+found.o
+PROFILED_MKE2FS_OBJS= profiled/mke2fs.o profiled/util.o \
+ profiled/default_profile.o \
+ profiled/mk_hugefiles.o \
+ profiled/create_inode.o
+PROFILED_CHATTR_OBJS= profiled/chattr.o
+PROFILED_LSATTR_OBJS= profiled/lsattr.o
+PROFILED_UUIDGEN_OBJS= profiled/uuidgen.o
+PROFILED_UUIDD_OBJS= profiled/uuidd.o
+PROFILED_DUMPE2FS_OBJS= profiled/dumpe2fs.o
+PROFILED_BADBLOCKS_OBJS= profiled/badblocks.o
+PROFILED_E2IMAGE_OBJS= profiled/e2image.o
+PROFILED_FSCK_OBJS= profiled/fsck.o profiled/base_device.o \
+ profiled/ismounted.o
+PROFILED_BLKID_OBJS= profiled/blkid.o
+PROFILED_FILEFRAG_OBJS= profiled/filefrag.o
+PROFILED_E2FREEFRAG_OBJS= profiled/e2freefrag.o
+PROFILED_E2UNDO_OBJS= profiled/e2undo.o
+PROFILED_E4DEFRAG_OBJS= profiled/e4defrag.o
+PROFILED_E4CRYPT_OBJS= profiled/e4crypt.o
+PROFILED_FUSE2FS_OJBS= profiled/fuse2fs.o profiled/journal.o \
+ profiled/recovery.o profiled/revoke.o
+
+SRCS= $(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c $(srcdir)/mk_hugefiles.c \
+ $(srcdir)/chattr.c $(srcdir)/lsattr.c $(srcdir)/dumpe2fs.c \
+ $(srcdir)/badblocks.c $(srcdir)/fsck.c $(srcdir)/util.c \
+ $(srcdir)/uuidgen.c $(srcdir)/blkid.c $(srcdir)/logsave.c \
+ $(srcdir)/filefrag.c $(srcdir)/base_device.c \
+ $(srcdir)/ismounted.c $(srcdir)/e2undo.c \
+ $(srcdir)/e2freefrag.c $(srcdir)/create_inode.c \
+ $(srcdir)/fuse2fs.c $(srcdir)/e2fuzz.c \
+ $(srcdir)/check_fuzzer.c \
+ $(srcdir)/../debugfs/journal.c $(srcdir)/../e2fsck/revoke.c \
+ $(srcdir)/../e2fsck/recovery.c
+
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBSUPPORT)
+DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(DEPLIBSUPPORT)
+PROFILED_LIBS= $(LIBSUPPORT) $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR)
+PROFILED_DEPLIBS= $(DEPLIBSUPPORT) $(PROFILED_LIBEXT2FS) $(DEPPROFILED_LIBCOM_ERR)
+
+STATIC_LIBS= $(LIBSUPPORT) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+STATIC_DEPLIBS= $(DEPLIBSUPPORT) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+
+LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
+DEPLIBS_E2P= $(LIBE2P) $(DEPLIBCOM_ERR)
+
+COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../lib/et/et ../lib/et/compile_et
+
+# This nastiness is needed because of jfs_user.h hackery; when we finally
+# clean up this mess, we should be able to drop it
+JOURNAL_CFLAGS = -I$(srcdir)/../e2fsck $(ALL_CFLAGS) -DDEBUGFS
+DEPEND_CFLAGS = -I$(top_srcdir)/e2fsck
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+all:: profiled $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES) \
+ $(FMANPAGES) $(LPROGS) $(E4DEFRAG_PROG) $(E4CRYPT_PROGS) e2fuzz
+
+all-static:: $(E2IMAGE_STATIC) $(UUIDD_STATIC) $(BLKID_STATIC) \
+ dumpe2fs.static mke2fs.static tune2fs.static lsattr.static chattr.static
+
+@PROFILE_CMT@all:: tune2fs.profiled blkid.profiled e2image.profiled \
+ e2undo.profiled mke2fs.profiled dumpe2fs.profiled fsck.profiled \
+ logsave.profiled filefrag.profiled uuidgen.profiled $(UUIDD_PROFILED) \
+ e2image.profiled e4defrag.profiled e4crypt.profiled \
+ e2freefrag.profiled
+
+profiled:
+@PROFILE_CMT@ $(E) " MKDIR $@"
+@PROFILE_CMT@ $(Q) mkdir profiled
+
+mke2fs.conf: $(srcdir)/mke2fs.conf.in
+ if test -f $(srcdir)/mke2fs.conf.custom.in ; then \
+ cp $(srcdir)/mke2fs.conf.custom.in mke2fs.conf; \
+ else \
+ cp $(srcdir)/mke2fs.conf.in mke2fs.conf; \
+ fi
+
+default_profile.c: mke2fs.conf $(srcdir)/profile-to-c.awk
+ $(E) " PROFILE_TO_C mke2fs.conf"
+ $(Q) $(AWK) -f $(srcdir)/profile-to-c.awk < mke2fs.conf \
+ > default_profile.c
+findsuper: findsuper.o
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o $(LIBS) $(SYSLIBS)
+
+partinfo: partinfo.o $(DEPLIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o partinfo partinfo.o $(LIBCOM_ERR)
+
+e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBBLKID) $(LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2initrd_helper e2initrd_helper.o $(LIBS) \
+ $(LIBBLKID) $(LIBEXT2FS) $(LIBINTL) $(SYSLIBS)
+
+tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBBLKID) \
+ $(DEPLIBUUID) $(LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS) \
+ $(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) $(LIBS_E2P) \
+ $(LIBINTL) $(SYSLIBS) $(LIBBLKID) $(LIBMAGIC)
+
+tune2fs.static: $(TUNE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(LDFLAGS_STATIC) -o tune2fs.static $(TUNE2FS_OBJS) \
+ $(STATIC_LIBS) $(STATIC_LIBBLKID) $(STATIC_LIBUUID) \
+ $(STATIC_LIBE2P) $(LIBINTL) $(SYSLIBS) \
+ $(STATIC_LIBBLKID) $(LIBMAGIC)
+
+tune2fs.profiled: $(TUNE2FS_OBJS) $(PROFILED_DEPLIBS) \
+ $(PROFILED_E2P) $(DEPPROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o tune2fs.profiled \
+ $(PROFILED_TUNE2FS_OBJS) $(PROFILED_LIBS) \
+ $(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) $(PROFILED_LIBE2P) \
+ $(LIBINTL) $(SYSLIBS) $(PROFILED_LIBUUID) $(LIBMAGIC)
+
+blkid: $(BLKID_OBJS) $(DEPLIBBLKID) $(LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o blkid $(BLKID_OBJS) $(LIBBLKID) $(LIBINTL) \
+ $(LIBEXT2FS) $(SYSLIBS)
+
+blkid.static: $(BLKID_OBJS) $(STATIC_DEPLIBS) $(DEPSTATIC_LIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o blkid.static $(BLKID_OBJS) $(STATIC_LIBS) \
+ $(STATIC_LIBBLKID) $(LIBINTL) $(SYSLIBS)
+
+blkid.profiled: $(BLKID_OBJS) $(DEPPROFILED_LIBBLKID) \
+ $(PROFILED_LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o blkid.profiled $(PROFILED_BLKID_OBJS) \
+ $(PROFILED_LIBBLKID) $(LIBINTL) $(PROFILED_LIBEXT2FS) $(SYSLIBS)
+
+e2image: $(E2IMAGE_OBJS) $(DEPLIBS) $(DEPLIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS) \
+ $(LIBINTL) $(SYSLIBS) $(LIBBLKID) $(LIBMAGIC)
+
+e2image.profiled: $(E2IMAGE_OBJS) $(PROFILED_DEPLIBS) $(DEPLIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2image.profiled \
+ $(PROFILED_E2IMAGE_OBJS) $(PROFILED_LIBS) $(LIBINTL) $(SYSLIBS) \
+ $(LIBBLKID) $(LIBMAGIC)
+
+e2image.static: $(E2IMAGE_OBJS) $(PROFILED_DEPLIBS) $(DEPLIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(LDFLAGS_STATIC) -g -pg -o e2image.static \
+ $(E2IMAGE_OBJS) $(STATIC_LIBS) $(LIBINTL) $(SYSLIBS) \
+ $(STATIC_LIBBLKID) $(LIBMAGIC)
+
+e2undo: $(E2UNDO_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2undo $(E2UNDO_OBJS) $(LIBS) \
+ $(LIBINTL) $(SYSLIBS)
+
+e2undo.profiled: $(E2UNDO_OBJS) $(PROFILED_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2undo.profiled \
+ $(PROFILED_E2UNDO_OBJS) $(PROFILED_LIBS) $(LIBINTL) $(SYSLIBS)
+
+e4defrag: $(E4DEFRAG_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e4defrag $(E4DEFRAG_OBJS) $(LIBS) \
+ $(SYSLIBS)
+
+e4crypt: $(E4CRYPT_OBJS) $(DEPLIBS) $(DEPSTATIC_LIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e4crypt $(E4CRYPT_OBJS) \
+ $(LIBUUID) $(LIBS) $(SYSLIBS)
+
+e4defrag.profiled: $(E4DEFRAG_OBJS) $(PROFILED_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e4defrag.profiled \
+ $(PROFILED_E4DEFRAG_OBJS) $(PROFILED_LIBS) $(SYSLIBS)
+
+e4crypt.profiled: $(E4CRYPT_OBJS) $(DEPPROFILED_LIBUUID) $(PROFILED_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e4crypt.profiled \
+ $(PROFILED_E4CRYPT_OBJS) $(PROFILED_LIBUUID) $(PROFILED_LIBS) \
+ $(SYSLIBS)
+
+base_device: base_device.c
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
+ -DDEBUG -o base_device $(SYSLIBS)
+
+fullcheck check:: base_device
+ ./base_device < $(srcdir)/base_device.tst > base_device.out
+ cmp $(srcdir)/base_device.tst base_device.out
+
+mklost+found: $(MKLPF_OBJS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) \
+ $(LIBINTL) $(SYSLIBS)
+
+mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBBLKID) $(DEPLIBUUID) \
+ $(LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBBLKID) \
+ $(LIBUUID) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL) \
+ $(SYSLIBS) $(LIBMAGIC)
+
+mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID) \
+ $(DEPSTATIC_LIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(LDFLAGS_STATIC) -o mke2fs.static $(MKE2FS_OBJS) \
+ $(STATIC_LIBS) $(STATIC_LIBE2P) \
+ $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(SYSLIBS) \
+ $(LIBMAGIC)
+
+mke2fs.profiled: $(MKE2FS_OBJS) $(PROFILED_DEPLIBS) \
+ $(PROFILED_LIBE2P) $(PROFILED_DEPLIBBLKID) $(PROFILED_DEPLIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o mke2fs.profiled \
+ $(PROFILED_MKE2FS_OBJS) $(PROFILED_LIBBLKID) \
+ $(PROFILED_LIBUUID) $(PROFILED_LIBE2P) \
+ $(LIBINTL) $(PROFILED_LIBS) $(SYSLIBS) $(LIBMAGIC)
+
+chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P) \
+ $(LIBINTL) $(SYSLIBS)
+
+chattr.static: $(CHATTR_OBJS) $(STATIC_LIBE2P) $(STATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o chattr.static $(CHATTR_OBJS) $(STATIC_LIBE2P) \
+ $(STATIC_LIBCOM_ERR) $(LIBINTL) $(SYSLIBS)
+
+lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P) \
+ $(LIBINTL) $(SYSLIBS)
+
+lsattr.static: $(LSATTR_OBJS) $(STATIC_LIBE2P) $(STATIC_LIBCOM_ERR)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o lsattr.static $(LSATTR_OBJS) $(STATIC_LIBE2P) \
+ $(STATIC_LIBCOM_ERR) $(LIBINTL) $(SYSLIBS)
+
+uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID) \
+ $(LIBINTL) $(SYSLIBS)
+
+uuidgen.profiled: $(UUIDGEN_OBJS) $(PROFILED_DEPLIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidgen.profiled \
+ $(PROFILED_UUIDGEN_OBJS) $(PROFILED_LIBUUID) $(LIBINTL) \
+ $(SYSLIBS)
+
+uuidd: $(UUIDD_OBJS) $(DEPLIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o uuidd $(UUIDD_OBJS) $(LIBUUID) \
+ $(LIBINTL) $(SYSLIBS)
+
+uuidd.profiled: $(UUIDD_OBJS) $(PROFILED_DEPLIBUUID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidd.profiled $(PROFILED_UUIDD_OBJS) \
+ $(PROFILED_LIBUUID) $(LIBINTL) $(SYSLIBS)
+
+dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID) $(DEPLIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS) \
+ $(LIBS_E2P) $(LIBUUID) $(LIBINTL) $(SYSLIBS) $(LIBBLKID) \
+ $(LIBMAGIC)
+
+dumpe2fs.profiled: $(DUMPE2FS_OBJS) $(PROFILED_DEPLIBS) \
+ $(PROFILED_LIBE2P) $(PROFILED_DEPLIBUUID) $(PROFILED_DEPLIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o dumpe2fs.profiled \
+ $(PROFILED_DUMPE2FS_OBJS) $(PROFILED_LIBS) \
+ $(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL) $(SYSLIBS) \
+ $(PROFILED_LIBBLKID) $(LIBMAGIC)
+
+dumpe2fs.static: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID) $(DEPLIBBLKID)
+ $(E) " LD $@"
+ $(Q) $(CC) $(LDFLAGS_STATIC) -o dumpe2fs.static $(DUMPE2FS_OBJS) \
+ $(STATIC_LIBS) $(STATIC_LIBE2P) $(STATIC_LIBUUID) \
+ $(LIBINTL) $(SYSLIBS) $(STATIC_LIBBLKID) $(LIBMAGIC)
+
+fsck: $(FSCK_OBJS) $(DEPLIBBLKID) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) \
+ $(LIBINTL) $(SYSLIBS) $(LIBS)
+
+fsck.profiled: $(FSCK_OBJS) $(PROFILED_DEPLIBBLKID) $(PROFILED_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o fsck.profiled $(PROFILED_FSCK_OBJS) \
+ $(PROFILED_LIBBLKID) $(LIBINTL) $(SYSLIBS) $(PROFILED_LIBS)
+
+badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS) \
+ $(LIBINTL) $(SYSLIBS)
+
+badblocks.profiled: $(BADBLOCKS_OBJS) $(PROFILED_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o badblocks.profiled \
+ $(PROFILED_BADBLOCKS_OBJS) $(PROFILED_LIBS) $(LIBINTL) \
+ $(SYSLIBS)
+
+logsave: logsave.o
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o logsave logsave.o $(SYSLIBS)
+
+logsave.profiled: logsave.o
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled \
+ profiled/logsave.o $(SYSLIBS)
+
+e2freefrag: $(E2FREEFRAG_OBJS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) \
+ $(LIBS) $(SYSLIBS)
+
+e2freefrag.profiled: $(E2FREEFRAG_OBJS) $(PROFILED_DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2freefrag.profiled \
+ $(PROFILED_E2FREEFRAG_OBJS) $(PROFILED_LIBS) $(SYSLIBS)
+
+e2fuzz: $(E2FUZZ_OBJS) $(DEPLIBS) $(DEPLIBBLKID) $(DEPLIBUUID) \
+ $(LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2fuzz $(E2FUZZ_OBJS) $(LIBS) \
+ $(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) $(SYSLIBS)
+
+check_fuzzer: check_fuzzer.o $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o check_fuzzer check_fuzzer.o $(LIBS)
+
+filefrag: $(FILEFRAG_OBJS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS) $(SYSLIBS)
+
+filefrag.profiled: $(FILEFRAG_OBJS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o filefrag.profiled \
+ $(PROFILED_FILEFRAG_OBJS)
+
+fuse2fs: $(FUSE2FS_OBJS) $(DEPLIBS) $(DEPLIBBLKID) $(DEPLIBUUID) \
+ $(LIBEXT2FS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o fuse2fs $(FUSE2FS_OBJS) $(LIBS) \
+ $(LIBFUSE) $(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) $(LIBINTL) \
+ $(CLOCK_GETTIME_LIB) $(SYSLIBS)
+
+journal.o: $(srcdir)/../debugfs/journal.c
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(JOURNAL_CFLAGS) -I$(srcdir) \
+ $(srcdir)/../debugfs/journal.c -o $@
+@PROFILE_CMT@ $(Q) $(CC) $(JOURNAL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+recovery.o: $(srcdir)/../e2fsck/recovery.c
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(JOURNAL_CFLAGS) -I$(srcdir) \
+ $(srcdir)/../e2fsck/recovery.c -o $@
+@PROFILE_CMT@ $(Q) $(CC) $(JOURNAL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+revoke.o: $(srcdir)/../e2fsck/revoke.c
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(JOURNAL_CFLAGS) -I$(srcdir) \
+ $(srcdir)/../e2fsck/revoke.c -o $@
+@PROFILE_CMT@ $(Q) $(CC) $(JOURNAL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
+ $(E) " LD $@"
+ $(CC) -o tst_ismounted $(srcdir)/ismounted.c -DDEBUG $(ALL_CFLAGS) \
+ $(LIBCOM_ERR) $(SYSLIBS)
+@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/tune2fs.8.in tune2fs.8
+
+mklost+found.8: $(DEP_SUBSTITUTE) $(srcdir)/mklost+found.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/mklost+found.8.in mklost+found.8
+
+mke2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/mke2fs.8.in mke2fs.8
+
+mke2fs.conf.5: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.conf.5.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/mke2fs.conf.5.in mke2fs.conf.5
+
+ext4.5: $(DEP_SUBSTITUTE) $(srcdir)/ext4.5.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/$@.in $@
+
+e2label.8: $(DEP_SUBSTITUTE) $(srcdir)/e2label.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2label.8.in e2label.8
+
+e2undo.8: $(DEP_SUBSTITUTE) $(srcdir)/e2undo.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2undo.8.in e2undo.8
+
+findfs.8: $(DEP_SUBSTITUTE) $(srcdir)/findfs.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/findfs.8.in findfs.8
+
+e2image.8: $(DEP_SUBSTITUTE) $(srcdir)/e2image.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2image.8.in e2image.8
+
+e4defrag.8: $(DEP_SUBSTITUTE) $(srcdir)/e4defrag.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e4defrag.8.in e4defrag.8
+
+e4crypt.8: $(DEP_SUBSTITUTE) $(srcdir)/e4crypt.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e4crypt.8.in e4crypt.8
+
+dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/dumpe2fs.8.in dumpe2fs.8
+
+e2mmpstatus.8: $(DEP_SUBSTITUTE) $(srcdir)/e2mmpstatus.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2mmpstatus.8.in e2mmpstatus.8
+
+badblocks.8: $(DEP_SUBSTITUTE) $(srcdir)/badblocks.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/badblocks.8.in badblocks.8
+
+fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/fsck.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/fsck.8.in fsck.8
+
+blkid.8: $(DEP_SUBSTITUTE) $(srcdir)/blkid.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/blkid.8.in blkid.8
+
+logsave.8: $(DEP_SUBSTITUTE) $(srcdir)/logsave.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/logsave.8.in logsave.8
+
+uuidd.8: $(DEP_SUBSTITUTE) $(srcdir)/uuidd.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuidd.8.in uuidd.8
+
+chattr.1: $(DEP_SUBSTITUTE) $(srcdir)/chattr.1.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/chattr.1.in chattr.1
+
+fuse2fs.1: $(DEP_SUBSTITUTE) $(srcdir)/fuse2fs.1.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/fuse2fs.1.in fuse2fs.1
+
+lsattr.1: $(DEP_SUBSTITUTE) $(srcdir)/lsattr.1.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/lsattr.1.in lsattr.1
+
+uuidgen.1: $(DEP_SUBSTITUTE) $(srcdir)/uuidgen.1.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuidgen.1.in uuidgen.1
+
+blkid.1: $(DEP_SUBSTITUTE) $(srcdir)/blkid.1.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/blkid.1.in blkid.1
+
+e2freefrag.8: $(DEP_SUBSTITUTE) $(srcdir)/e2freefrag.8.in
+ $(E) " SUBST $@"
+ @$(SUBSTITUTE_UPTIME) $(srcdir)/e2freefrag.8.in e2freefrag.8
+
+filefrag.8: $(DEP_SUBSTITUTE) $(srcdir)/filefrag.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/filefrag.8.in filefrag.8
+
+installdirs:
+ $(E) " MKDIR_P $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir) $(root_sysconfdir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(sbindir) \
+ $(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) \
+ $(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) \
+ $(DESTDIR)$(libdir) $(DESTDIR)/$(root_sysconfdir)
+
+install: all $(SMANPAGES) $(UMANPAGES) installdirs
+ $(Q) for i in $(SPROGS); do \
+ $(ES) " INSTALL $(root_sbindir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(Q) for i in $(USPROGS); do \
+ $(ES) " INSTALL $(sbindir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
+ done
+ $(Q) for i in ext2 ext3 ext4; do \
+ $(ES) " LINK $(root_sbindir)/mkfs.$$i"; \
+ (cd $(DESTDIR)$(root_sbindir); \
+ $(LN) $(LINK_INSTALL_FLAGS) mke2fs mkfs.$$i); \
+ done
+ $(Q) (cd $(DESTDIR)$(root_sbindir); \
+ $(LN) $(LINK_INSTALL_FLAGS) dumpe2fs e2mmpstatus)
+ $(Q) (cd $(DESTDIR)$(root_sbindir); \
+ $(LN) $(LINK_INSTALL_FLAGS) tune2fs e2label)
+ $(Q) if test -n "$(FINDFS_LINK)"; then \
+ $(ES) " LINK $(root_sbindir)/findfs"; \
+ (cd $(DESTDIR)$(root_sbindir); \
+ $(LN) $(LINK_INSTALL_FLAGS) tune2fs $(FINDFS_LINK)); \
+ fi
+ $(Q) for i in $(UPROGS); do \
+ $(ES) " INSTALL $(bindir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$i; \
+ done
+ $(Q) for i in $(LPROGS); do \
+ $(ES) " INSTALL $(libdir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(libdir)/$$i; \
+ done
+ $(Q) for i in $(SMANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
+ done; \
+ $(ES) " INSTALL_DATA $(man8dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+ done
+ $(Q) $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8.gz \
+ $(DESTDIR)$(man8dir)/mkfs.ext3.8.gz
+ $(Q) for i in ext2 ext3 ext4; do \
+ $(ES) " LINK mkfs.$$i.8"; \
+ (cd $(DESTDIR)$(man8dir); \
+ $(LN) $(LINK_INSTALL_FLAGS) mke2fs.8 mkfs.$$i.8); \
+ done
+ $(Q) for i in $(UMANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man1dir)/$$i.$$j; \
+ done; \
+ $(ES) " INSTALL_DATA $(man1dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$i; \
+ done
+ $(Q) for i in $(FMANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man5dir)/$$i.$$j; \
+ done; \
+ $(ES) " INSTALL_DATA $(man5dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man5dir)/$$i; \
+ done
+ $(Q) for i in ext2 ext3; do \
+ $(ES) " LINK $$i.5"; \
+ (cd $(DESTDIR)$(man5dir); \
+ $(LN) $(LINK_INSTALL_FLAGS) ext4.5 $$i.5); \
+ done
+ $(Q) if test -f $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; then \
+ if cmp -s $(DESTDIR)$(root_sysconfdir)/mke2fs.conf \
+ mke2fs.conf; then \
+ true; \
+ else \
+ if grep -q ext4dev $(DESTDIR)$(root_sysconfdir)/mke2fs.conf ; then \
+ $(ES) " INSTALL_DATA $(root_sysconfdir)/mke2fs.conf.e2fsprogs-new"; \
+ $(INSTALL_DATA) mke2fs.conf \
+ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-new; \
+ echo "Warning: installing mke2fs.conf in $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-new"; \
+ echo "Check to see if you need to update your $(root_sysconfdir)/mke2fs.conf"; \
+ else \
+ $(ES) " INSTALL_DATA $(root_sysconfdir)/mke2fs.conf"; \
+ mv $(DESTDIR)$(root_sysconfdir)/mke2fs.conf \
+ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-old; \
+ $(INSTALL_DATA) mke2fs.conf \
+ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \
+ echo "Your mke2fs.conf is too old. Backing up old version in"; \
+ echo "$(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-old. Please check to see"; \
+ echo "if you have any local customizations that you wish to preserve."; \
+ fi; \
+ echo " "; \
+ fi; \
+ else \
+ $(ES) " INSTALL_DATA $(root_sysconfdir)/mke2fs.conf"; \
+ $(INSTALL_DATA) mke2fs.conf \
+ $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \
+ fi
+
+install-strip: install
+ $(Q) for i in $(SPROGS); do \
+ $(E) " STRIP $(root_sbindir)/$$i"; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(Q) for i in $(USPROGS); do \
+ $(E) " STRIP $(sbindir)/$$i"; \
+ $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
+ done
+
+uninstall:
+ for i in $(SPROGS); do \
+ $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(USPROGS); do \
+ $(RM) -f $(DESTDIR)$(sbindir)/$$i; \
+ done
+ for i in $(LPROGS); do \
+ $(RM) -f $(DESTDIR)$(libdir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(root_sbindir)/mkfs.ext2 \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext3 \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext4
+ for i in $(UPROGS); do \
+ $(RM) -f $(DESTDIR)$(bindir)/$$i; \
+ done
+ for i in $(SMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8 \
+ $(DESTDIR)$(man8dir)/mkfs.ext3.8 \
+ $(DESTDIR)$(man8dir)/mkfs.ext4.8 \
+ $(DESTDIR)$(man8dir)/fsck.ext2.8 \
+ $(DESTDIR)$(man8dir)/fsck.ext3.8 \
+ $(DESTDIR)$(man8dir)/fsck.ext4.8
+
+ for i in $(UMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man1dir)/$$i; \
+ done
+ for i in $(FINDFS_LINK) e2label e2mmpstatus ; do \
+ $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(FMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man5dir)/$$i; \
+ done
+ $(Q) for i in ext2 ext3; do \
+ $(ES) " LINK $$i.5"; \
+ $(RM) -f $(DESTDIR)$(man5dir)/$$i.5; \
+ done
+ if cmp -s mke2fs.conf $(DESTDIR)/$(root_sysconfdir)/mke2fs.conf; then \
+ $(RM) $(DESTDIR)/$(root_sysconfdir)/mke2fs.conf; \
+ fi
+
+clean::
+ $(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
+ $(FMANPAGES) profile.h \
+ base_device base_device.out mke2fs.static filefrag e2freefrag \
+ e2initrd_helper partinfo prof_err.[ch] default_profile.c \
+ uuidd e2image tune2fs.static tst_ismounted fsck.profiled \
+ blkid.profiled tune2fs.profiled e2image.profiled \
+ e2undo.profiled mke2fs.profiled dumpe2fs.profiled \
+ dumpe2fs.static e2image.static \
+ logsave.profiled filefrag.profiled uuidgen.profiled \
+ uuidd.profiled e2image.profiled e2fuzz mke2fs.conf \
+ profiled/*.o \#* *.s *.o *.a *~ core gmon.out
+
+mostlyclean: clean
+distclean: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+tune2fs.o: $(srcdir)/tune2fs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
+ $(top_srcdir)/lib/ext2fs/compiler.h $(top_srcdir)/lib/support/plausible.h \
+ $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(top_srcdir)/lib/support/devname.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/util.h $(top_srcdir)/version.h \
+ $(top_srcdir)/lib/support/nls-enable.h
+mklost+found.o: $(srcdir)/mklost+found.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/version.h \
+ $(top_srcdir)/lib/support/nls-enable.h
+mke2fs.o: $(srcdir)/mke2fs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fsP.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/util.h \
+ $(top_srcdir)/lib/support/nls-enable.h $(top_srcdir)/lib/support/plausible.h \
+ $(top_srcdir)/lib/support/profile.h $(top_builddir)/lib/support/prof_err.h \
+ $(top_srcdir)/version.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h $(srcdir)/mke2fs.h \
+ $(srcdir)/create_inode.h $(top_srcdir)/lib/e2p/e2p.h
+mk_hugefiles.o: $(srcdir)/mk_hugefiles.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fsP.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(srcdir)/util.h \
+ $(top_srcdir)/lib/support/profile.h $(top_builddir)/lib/support/prof_err.h \
+ $(top_srcdir)/lib/support/nls-enable.h $(srcdir)/mke2fs.h
+chattr.o: $(srcdir)/chattr.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/nls-enable.h \
+ $(top_srcdir)/version.h
+lsattr.o: $(srcdir)/lsattr.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/nls-enable.h \
+ $(top_srcdir)/version.h
+dumpe2fs.o: $(srcdir)/dumpe2fs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/support/nls-enable.h $(top_srcdir)/lib/support/plausible.h \
+ $(top_srcdir)/version.h
+badblocks.o: $(srcdir)/badblocks.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/nls-enable.h
+fsck.o: $(srcdir)/fsck.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/version.h \
+ $(top_srcdir)/lib/support/devname.h $(top_srcdir)/lib/support/nls-enable.h \
+ $(srcdir)/fsck.h
+util.o: $(srcdir)/util.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/nls-enable.h \
+ $(top_srcdir)/lib/support/devname.h $(srcdir)/util.h
+uuidgen.o: $(srcdir)/uuidgen.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/support/nls-enable.h
+blkid.o: $(srcdir)/blkid.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+logsave.o: $(srcdir)/logsave.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h
+filefrag.o: $(srcdir)/filefrag.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/fiemap.h \
+ $(top_srcdir)/version.h
+base_device.o: $(srcdir)/base_device.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/fsck.h
+ismounted.o: $(srcdir)/ismounted.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/fsck.h \
+ $(top_srcdir)/lib/et/com_err.h
+e2undo.o: $(srcdir)/e2undo.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/nls-enable.h
+e2freefrag.o: $(srcdir)/e2freefrag.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/e2freefrag.h $(srcdir)/fsmap.h
+create_inode.o: $(srcdir)/create_inode.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/fiemap.h \
+ $(srcdir)/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/nls-enable.h
+fuse2fs.o: $(srcdir)/fuse2fs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/version.h
+e2fuzz.o: $(srcdir)/e2fuzz.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+check_fuzzer.o: $(srcdir)/check_fuzzer.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+journal.o: $(srcdir)/../debugfs/journal.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/../debugfs/journal.h \
+ $(top_srcdir)/e2fsck/jfs_user.h $(top_srcdir)/e2fsck/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h
+revoke.o: $(srcdir)/../e2fsck/revoke.c $(srcdir)/../e2fsck/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(srcdir)/../e2fsck/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h
+recovery.o: $(srcdir)/../e2fsck/recovery.c $(srcdir)/../e2fsck/jfs_user.h \
+ $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
+ $(srcdir)/../e2fsck/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/support/profile.h \
+ $(top_builddir)/lib/support/prof_err.h $(top_srcdir)/lib/support/quotaio.h \
+ $(top_srcdir)/lib/support/dqblk_v2.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
+ $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/ext2fs/compiler.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h
diff --git a/misc/badblocks.8.in b/misc/badblocks.8.in
new file mode 100644
index 0000000..6c96cdc
--- /dev/null
+++ b/misc/badblocks.8.in
@@ -0,0 +1,234 @@
+.\" -*- nroff -*-
+.TH BADBLOCKS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+badblocks \- search a device for bad blocks
+.SH SYNOPSIS
+.B badblocks
+[
+.B \-svwnfBX
+]
+[
+.B \-b
+.I block_size
+]
+[
+.B \-c
+.I blocks_at_once
+]
+[
+.B \-d
+.I read_delay_factor
+]
+[
+.B \-e
+.I max_bad_blocks
+]
+[
+.B \-i
+.I input_file
+]
+[
+.B \-o
+.I output_file
+]
+[
+.B \-p
+.I num_passes
+]
+[
+.B \-t
+.I test_pattern
+]
+.I device
+[
+.I last_block
+] [
+.I first_block
+]
+.SH DESCRIPTION
+.B badblocks
+is used to search for bad blocks on a device (usually a disk partition).
+.I device
+is the special file corresponding to the device (e.g
+.IR /dev/hdc1 ).
+.I last_block
+is the last block to be checked; if it is not specified, the last block
+on the device is used as a default.
+.I first_block
+is an optional parameter specifying the starting block number
+for the test, which allows the testing to start in the middle of the
+disk. If it is not specified the first block on the disk is used as a default.
+.PP
+.B Important note:
+If the output of
+.B badblocks
+is going to be fed to the
+.B e2fsck
+or
+.B mke2fs
+programs, it is important that the block size is properly specified,
+since the block numbers which are generated are very dependent on the
+block size in use by the file system.
+For this reason, it is strongly recommended that
+users
+.B not
+run
+.B badblocks
+directly, but rather use the
+.B \-c
+option of the
+.B e2fsck
+and
+.B mke2fs
+programs.
+.SH OPTIONS
+.TP
+.BI \-b " block_size"
+Specify the size of blocks in bytes. The default is 1024.
+.TP
+.BI \-c " number of blocks"
+is the number of blocks which are tested at a time. The default is 64.
+.TP
+.BI \-d " read delay factor"
+This parameter, if passed and non-zero, will cause bad blocks to sleep
+between reads if there were no errors encountered in the read
+operation; the delay will be calculated as a percentage of the time it
+took for the read operation to be performed. In other words, a value of
+100 will cause each read to be delayed by the amount the previous read
+took, and a value of 200 by twice the amount.
+.TP
+.BI \-e " max bad block count"
+Specify a maximum number of bad blocks before aborting the test. The
+default is 0, meaning the test will continue until the end of the test
+range is reached.
+.TP
+.B \-f
+Normally, badblocks will refuse to do a read/write or a non-destructive
+test on a device which is mounted, since either can cause the system to
+potentially crash and/or damage the file system even if it is mounted
+read-only. This can be overridden using the
+.B \-f
+flag, but should almost never be used --- if you think you're smarter
+than the
+.B badblocks
+program, you almost certainly aren't. The only time when this option
+might be safe to use is if the /etc/mtab file is incorrect, and the device
+really isn't mounted.
+.TP
+.BI \-i " input_file"
+Read a list of already existing known bad blocks.
+.B Badblocks
+will skip testing these blocks since they are known to be bad. If
+.I input_file
+is specified as "-", the list will be read from the standard input.
+Blocks listed in this list will be omitted from the list of
+.I new
+bad blocks produced on the standard output or in the output file.
+The
+.B \-b
+option of
+.BR dumpe2fs (8)
+can be used to retrieve the list of blocks currently marked bad on
+an existing file system, in a format suitable for use with this option.
+.TP
+.B \-n
+Use non-destructive read-write mode. By default only a non-destructive
+read-only test is done. This option must not be combined with the
+.B \-w
+option, as they are mutually exclusive.
+.TP
+.BI \-o " output_file"
+Write the list of bad blocks to the specified file. Without this option,
+.B badblocks
+displays the list on its standard output. The format of this file is suitable
+for use by the
+.
+.B \-l
+option in
+.BR e2fsck (8)
+or
+.BR mke2fs (8).
+.TP
+.BI \-p " num_passes"
+Repeat scanning the disk until there are no new blocks discovered in
+num_passes consecutive scans of the disk.
+Default is 0, meaning
+.B badblocks
+will exit after the first pass.
+.TP
+.B \-s
+Show the progress of the scan by writing out rough percentage completion
+of the current badblocks pass over the disk. Note that badblocks may do
+multiple test passes over the disk, in particular if the
+.B \-p
+or
+.B \-w
+option is requested by the user.
+.TP
+.BI \-t " test_pattern"
+Specify a test pattern to be read (and written) to disk blocks. The
+.I test_pattern
+may either be a numeric value between 0 and ULONG_MAX-1 inclusive, or the word
+"random", which specifies that the block should be filled with a random
+bit pattern.
+For read/write (\fB-w\fR) and non-destructive (\fB-n\fR) modes,
+one or more test patterns may be specified by specifying the
+.B -t
+option for each test pattern desired. For
+read-only mode only a single pattern may be specified and it may not be
+"random". Read-only testing with a pattern assumes that the
+specified pattern has previously been written to the disk - if not, large
+numbers of blocks will fail verification.
+If multiple patterns
+are specified then all blocks will be tested with one pattern
+before proceeding to the next pattern.
+.TP
+.B \-v
+Verbose mode. Will write the number of read errors, write errors and data-
+corruptions to stderr.
+.TP
+.B \-w
+Use write-mode test. With this option,
+.B badblocks
+scans for bad blocks by writing some patterns (0xaa, 0x55, 0xff, 0x00) on
+every block of the device, reading every block and comparing the contents.
+This option may not be combined with the
+.B \-n
+option, as they are mutually exclusive.
+.TP
+.B \-B
+Use buffered I/O and do not use Direct I/O, even if it is available.
+.TP
+.B \-X
+Internal flag only to be used by
+.BR e2fsck (8)
+and
+.BR mke2fs (8).
+It bypasses the exclusive mode in-use device safety check.
+.SH WARNING
+Never use the
+.B \-w
+option on a device containing an existing file system.
+This option erases data! If you want to do write-mode testing on
+an existing file system, use the
+.B \-n
+option instead. It is slower, but it will preserve your data.
+.PP
+The
+.B \-e
+option will cause badblocks to output a possibly incomplete list of
+bad blocks. Therefore it is recommended to use it only when one wants
+to know if there are any bad blocks at all on the device, and not when
+the list of bad blocks is wanted.
+.SH AUTHOR
+.B badblocks
+was written by Remy Card <Remy.Card@linux.org>. Current maintainer is
+Theodore Ts'o <tytso@alum.mit.edu>. Non-destructive read/write test
+implemented by David Beattie <dbeattie@softhome.net>.
+.SH AVAILABILITY
+.B badblocks
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR e2fsck (8),
+.BR mke2fs (8)
diff --git a/misc/badblocks.c b/misc/badblocks.c
new file mode 100644
index 0000000..2b5ff6d
--- /dev/null
+++ b/misc/badblocks.c
@@ -0,0 +1,1379 @@
+/*
+ * badblocks.c - Bad blocks checker
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * Copyright 1995, 1996, 1997, 1998, 1999 by Theodore Ts'o
+ * Copyright 1999 by David Beattie
+ *
+ * This file is based on the minix file system programs fsck and mkfs
+ * written and copyrighted by Linus Torvalds <Linus.Torvalds@cs.helsinki.fi>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/05/26 - Creation from e2fsck
+ * 94/02/27 - Made a separate bad blocks checker
+ * 99/06/30...99/07/26 - Added non-destructive write-testing,
+ * configurable blocks-at-once parameter,
+ * loading of badblocks list to avoid testing
+ * blocks known to be bad, multiple passes to
+ * make sure that no new blocks are added to the
+ * list. (Work done by David Beattie)
+ */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* for O_DIRECT */
+#endif
+
+#include "config.h"
+#include <errno.h>
+#include <fcntl.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <setjmp.h>
+#include <time.h>
+#include <limits.h>
+#ifdef HAVE_MBSTOWCS
+#include <wchar.h>
+#endif
+
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+
+#include "et/com_err.h"
+#include "ext2fs/ext2_io.h"
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "support/nls-enable.h"
+
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+/* Maximum number of bad blocks we support */
+#define MAX_BAD_BLOCKS (INT_MAX/2)
+
+static const char * program_name = "badblocks";
+static const char * done_string = N_("done \n");
+
+static int v_flag; /* verbose */
+static int w_flag; /* do r/w test: 0=no, 1=yes,
+ * 2=non-destructive */
+static int s_flag; /* show progress of test */
+static int force; /* force check of mounted device */
+static int t_flag; /* number of test patterns */
+static int t_max; /* allocated test patterns */
+static unsigned int *t_patts; /* test patterns */
+static int use_buffered_io;
+static int exclusive_ok;
+static unsigned int max_bb = MAX_BAD_BLOCKS; /* Abort test if more than this
+ * number of bad blocks has been
+ * encountered */
+static unsigned int d_flag; /* delay factor between reads */
+static struct timeval time_start;
+
+#define T_INC 32
+
+static unsigned int sys_page_size = 4096;
+
+static void usage(void)
+{
+ fprintf(stderr, _(
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"),
+ program_name);
+ exit (1);
+}
+
+static void exclusive_usage(void)
+{
+ fprintf(stderr,
+ _("%s: The -n and -w options are mutually exclusive.\n\n"),
+ program_name);
+ exit(1);
+}
+
+static blk_t currently_testing = 0;
+static blk_t num_blocks = 0;
+static blk_t num_read_errors = 0;
+static blk_t num_write_errors = 0;
+static blk_t num_corruption_errors = 0;
+static ext2_badblocks_list bb_list = NULL;
+static FILE *out;
+static blk_t next_bad = 0;
+static ext2_badblocks_iterate bb_iter = NULL;
+
+enum error_types { READ_ERROR, WRITE_ERROR, CORRUPTION_ERROR };
+
+static void *allocate_buffer(size_t size)
+{
+ void *ret = 0;
+
+#ifdef HAVE_POSIX_MEMALIGN
+ if (posix_memalign(&ret, sys_page_size, size) != 0)
+ ret = 0;
+#else
+#ifdef HAVE_MEMALIGN
+ ret = memalign(sys_page_size, size);
+#else
+#ifdef HAVE_VALLOC
+ ret = valloc(size);
+#endif /* HAVE_VALLOC */
+#endif /* HAVE_MEMALIGN */
+#endif /* HAVE_POSIX_MEMALIGN */
+
+ if (!ret)
+ ret = malloc(size);
+
+ return ret;
+}
+
+/*
+ * This routine reports a new bad block. If the bad block has already
+ * been seen before, then it returns 0; otherwise it returns 1.
+ */
+static int bb_output (blk_t bad, enum error_types error_type)
+{
+ errcode_t errcode;
+
+ if (ext2fs_badblocks_list_test(bb_list, bad))
+ return 0;
+
+ fprintf(out, "%lu\n", (unsigned long) bad);
+ fflush(out);
+
+ errcode = ext2fs_badblocks_list_add (bb_list, bad);
+ if (errcode) {
+ com_err (program_name, errcode, "adding to in-memory bad block list");
+ exit (1);
+ }
+
+ /* kludge:
+ increment the iteration through the bb_list if
+ an element was just added before the current iteration
+ position. This should not cause next_bad to change. */
+ if (bb_iter && bad < next_bad)
+ ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
+
+ if (error_type == READ_ERROR) {
+ num_read_errors++;
+ } else if (error_type == WRITE_ERROR) {
+ num_write_errors++;
+ } else if (error_type == CORRUPTION_ERROR) {
+ num_corruption_errors++;
+ }
+ return 1;
+}
+
+static char *time_diff_format(struct timeval *tv1,
+ struct timeval *tv2, char *buf)
+{
+ time_t diff = (tv1->tv_sec - tv2->tv_sec);
+ int hr,min,sec;
+
+ sec = diff % 60;
+ diff /= 60;
+ min = diff % 60;
+ hr = diff / 60;
+
+ if (hr)
+ sprintf(buf, "%d:%02d:%02d", hr, min, sec);
+ else
+ sprintf(buf, "%d:%02d", min, sec);
+ return buf;
+}
+
+static float calc_percent(unsigned long current, unsigned long total) {
+ float percent = 0.0;
+ if (total <= 0)
+ return percent;
+ if (current >= total) {
+ percent = 100.0;
+ } else {
+ percent=(100.0*(float)current/(float)total);
+ }
+ return percent;
+}
+
+static void print_status(void)
+{
+ struct timeval time_end;
+ char diff_buf[32], line_buf[128];
+#ifdef HAVE_MBSTOWCS
+ wchar_t wline_buf[128];
+#endif
+ int len;
+
+ gettimeofday(&time_end, 0);
+ len = snprintf(line_buf, sizeof(line_buf),
+ _("%6.2f%% done, %s elapsed. "
+ "(%d/%d/%d errors)"),
+ calc_percent((unsigned long) currently_testing,
+ (unsigned long) num_blocks),
+ time_diff_format(&time_end, &time_start, diff_buf),
+ num_read_errors,
+ num_write_errors,
+ num_corruption_errors);
+#ifdef HAVE_MBSTOWCS
+ mbstowcs(wline_buf, line_buf, sizeof(line_buf));
+ len = wcswidth(wline_buf, sizeof(line_buf));
+ if (len < 0)
+ len = strlen(line_buf); /* Should never happen... */
+#endif
+ fputs(line_buf, stderr);
+ memset(line_buf, '\b', len);
+ line_buf[len] = 0;
+ fputs(line_buf, stderr);
+ fflush (stderr);
+}
+
+static void alarm_intr(int alnum EXT2FS_ATTR((unused)))
+{
+ signal (SIGALRM, alarm_intr);
+ alarm(1);
+ if (!num_blocks)
+ return;
+ print_status();
+}
+
+static void *terminate_addr = NULL;
+
+static void terminate_intr(int signo EXT2FS_ATTR((unused)))
+{
+ fflush(out);
+ fprintf(stderr, "\n\nInterrupted at block %llu\n",
+ (unsigned long long) currently_testing);
+ fflush(stderr);
+ if (terminate_addr)
+ longjmp(terminate_addr,1);
+ exit(1);
+}
+
+static void capture_terminate(jmp_buf term_addr)
+{
+ terminate_addr = term_addr;
+ signal (SIGHUP, terminate_intr);
+ signal (SIGINT, terminate_intr);
+ signal (SIGPIPE, terminate_intr);
+ signal (SIGTERM, terminate_intr);
+ signal (SIGUSR1, terminate_intr);
+ signal (SIGUSR2, terminate_intr);
+}
+
+static void uncapture_terminate(void)
+{
+ terminate_addr = NULL;
+ signal (SIGHUP, SIG_DFL);
+ signal (SIGINT, SIG_DFL);
+ signal (SIGPIPE, SIG_DFL);
+ signal (SIGTERM, SIG_DFL);
+ signal (SIGUSR1, SIG_DFL);
+ signal (SIGUSR2, SIG_DFL);
+}
+
+/* Linux requires that O_DIRECT I/Os be 512-byte sector aligned */
+
+#define O_DIRECT_SIZE 512
+
+static void set_o_direct(int dev, unsigned char *buffer, size_t size,
+ ext2_loff_t offset)
+{
+#ifdef O_DIRECT
+ static int current_O_DIRECT; /* Current status of O_DIRECT flag */
+ int new_flag = O_DIRECT;
+ int flag;
+
+ if ((use_buffered_io != 0) ||
+ (((unsigned long) buffer & (sys_page_size - 1)) != 0) ||
+ ((size & (sys_page_size - 1)) != 0) ||
+ ((offset & (O_DIRECT_SIZE - 1)) != 0))
+ new_flag = 0;
+
+ if (new_flag != current_O_DIRECT) {
+ /* printf("%s O_DIRECT\n", new_flag ? "Setting" : "Clearing"); */
+ flag = fcntl(dev, F_GETFL);
+ if (flag > 0) {
+ flag = (flag & ~O_DIRECT) | new_flag;
+ if (fcntl(dev, F_SETFL, flag) < 0)
+ perror("set_o_direct");
+ }
+ current_O_DIRECT = new_flag;
+ }
+#endif
+}
+
+
+static void pattern_fill(unsigned char *buffer, unsigned int pattern,
+ size_t n)
+{
+ unsigned int i, nb;
+ unsigned char bpattern[sizeof(pattern)], *ptr;
+
+ if (pattern == (unsigned int) ~0) {
+ for (ptr = buffer; ptr < buffer + n; ptr++) {
+ (*ptr) = random() % (1 << (8 * sizeof(char)));
+ }
+ if (s_flag | v_flag)
+ fputs(_("Testing with random pattern: "), stderr);
+ } else {
+ bpattern[0] = 0;
+ for (i = 0; i < sizeof(bpattern); i++) {
+ if (pattern == 0)
+ break;
+ bpattern[i] = pattern & 0xFF;
+ pattern = pattern >> 8;
+ }
+ nb = i ? (i-1) : 0;
+ for (ptr = buffer, i = nb; ptr < buffer + n; ptr++) {
+ *ptr = bpattern[i];
+ if (i == 0)
+ i = nb;
+ else
+ i--;
+ }
+ if (s_flag | v_flag) {
+ fputs(_("Testing with pattern 0x"), stderr);
+ for (i = 0; i <= nb; i++)
+ fprintf(stderr, "%02x", buffer[i]);
+ fputs(": ", stderr);
+ }
+ }
+}
+
+/*
+ * Perform a read of a sequence of blocks; return the number of blocks
+ * successfully sequentially read.
+ */
+static int do_read (int dev, unsigned char * buffer, int try, int block_size,
+ blk_t current_block)
+{
+ long got;
+ struct timeval tv1, tv2;
+#define NANOSEC (1000000000L)
+#define MILISEC (1000L)
+
+#if 0
+ printf("do_read: block %d, try %d\n", current_block, try);
+#endif
+ set_o_direct(dev, buffer, try * block_size,
+ ((ext2_loff_t) current_block) * block_size);
+
+ if (v_flag > 1)
+ print_status();
+
+ /* Seek to the correct loc. */
+ if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
+ SEEK_SET) != (ext2_loff_t) current_block * block_size)
+ com_err (program_name, errno, "%s", _("during seek"));
+
+ /* Try the read */
+ if (d_flag)
+ gettimeofday(&tv1, NULL);
+ got = read (dev, buffer, (size_t) try * block_size);
+ if (d_flag)
+ gettimeofday(&tv2, NULL);
+ if (got < 0)
+ got = 0;
+ if (got & 511)
+ fprintf(stderr, _("Weird value (%ld) in do_read\n"), got);
+ got /= block_size;
+ if (d_flag && got == try) {
+#ifdef HAVE_NANOSLEEP
+ struct timespec ts;
+ ts.tv_sec = tv2.tv_sec - tv1.tv_sec;
+ ts.tv_nsec = (tv2.tv_usec - tv1.tv_usec) * MILISEC;
+ if (ts.tv_nsec < 0) {
+ ts.tv_nsec += NANOSEC;
+ ts.tv_sec -= 1;
+ }
+ /* increase/decrease the sleep time based on d_flag value */
+ ts.tv_sec = ts.tv_sec * d_flag / 100;
+ ts.tv_nsec = ts.tv_nsec * d_flag / 100;
+ if (ts.tv_nsec > NANOSEC) {
+ ts.tv_sec += ts.tv_nsec / NANOSEC;
+ ts.tv_nsec %= NANOSEC;
+ }
+ if (ts.tv_sec || ts.tv_nsec)
+ nanosleep(&ts, NULL);
+#else
+#ifdef HAVE_USLEEP
+ struct timeval tv;
+ tv.tv_sec = tv2.tv_sec - tv1.tv_sec;
+ tv.tv_usec = tv2.tv_usec - tv1.tv_usec;
+ tv.tv_sec = tv.tv_sec * d_flag / 100;
+ tv.tv_usec = tv.tv_usec * d_flag / 100;
+ if (tv.tv_usec > 1000000) {
+ tv.tv_sec += tv.tv_usec / 1000000;
+ tv.tv_usec %= 1000000;
+ }
+ if (tv.tv_sec)
+ sleep(tv.tv_sec);
+ if (tv.tv_usec)
+ usleep(tv.tv_usec);
+#endif
+#endif
+ }
+ return got;
+}
+
+/*
+ * Perform a write of a sequence of blocks; return the number of blocks
+ * successfully sequentially written.
+ */
+static int do_write(int dev, unsigned char * buffer, int try, int block_size,
+ unsigned long current_block)
+{
+ long got;
+
+#if 0
+ printf("do_write: block %lu, try %d\n", current_block, try);
+#endif
+ set_o_direct(dev, buffer, try * block_size,
+ ((ext2_loff_t) current_block) * block_size);
+
+ if (v_flag > 1)
+ print_status();
+
+ /* Seek to the correct loc. */
+ if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
+ SEEK_SET) != (ext2_loff_t) current_block * block_size)
+ com_err (program_name, errno, "%s", _("during seek"));
+
+ /* Try the write */
+ got = write (dev, buffer, (size_t) try * block_size);
+ if (got < 0)
+ got = 0;
+ if (got & 511)
+ fprintf(stderr, "Weird value (%ld) in do_write\n", got);
+ got /= block_size;
+ return got;
+}
+
+static int host_dev;
+
+static void flush_bufs(void)
+{
+ errcode_t retval;
+
+#ifdef O_DIRECT
+ if (!use_buffered_io)
+ return;
+#endif
+ retval = ext2fs_sync_device(host_dev, 1);
+ if (retval)
+ com_err(program_name, retval, "%s",
+ _("during ext2fs_sync_device"));
+}
+
+static unsigned int test_ro (int dev, blk_t last_block,
+ int block_size, blk_t first_block,
+ unsigned int blocks_at_once)
+{
+ unsigned char * blkbuf;
+ int try;
+ int got;
+ unsigned int bb_count = 0;
+ errcode_t errcode;
+ blk_t recover_block = ~0;
+
+ /* set up abend handler */
+ capture_terminate(NULL);
+
+ errcode = ext2fs_badblocks_list_iterate_begin(bb_list,&bb_iter);
+ if (errcode) {
+ com_err(program_name, errcode, "%s",
+ _("while beginning bad block list iteration"));
+ exit (1);
+ }
+ do {
+ ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
+ } while (next_bad && next_bad < first_block);
+
+ if (t_flag) {
+ blkbuf = allocate_buffer(((size_t) blocks_at_once + 1) * block_size);
+ } else {
+ blkbuf = allocate_buffer((size_t) blocks_at_once * block_size);
+ }
+ if (!blkbuf)
+ {
+ com_err(program_name, ENOMEM, "%s",
+ _("while allocating buffers"));
+ exit (1);
+ }
+ if (v_flag) {
+ fprintf(stderr, _("Checking blocks %lu to %lu\n"),
+ (unsigned long)first_block,
+ (unsigned long)last_block - 1);
+ }
+ if (t_flag) {
+ fputs(_("Checking for bad blocks in read-only mode\n"), stderr);
+ pattern_fill(blkbuf + blocks_at_once * block_size,
+ t_patts[0], block_size);
+ }
+ flush_bufs();
+ try = blocks_at_once;
+ currently_testing = first_block;
+ num_blocks = last_block - 1;
+ if (!t_flag && (s_flag || v_flag))
+ fputs(_("Checking for bad blocks (read-only test): "), stderr);
+ if (s_flag && v_flag <= 1)
+ alarm_intr(SIGALRM);
+ while (currently_testing < last_block)
+ {
+ if (bb_count >= max_bb) {
+ if (s_flag || v_flag) {
+ fputs(_("Too many bad blocks, aborting test\n"), stderr);
+ }
+ break;
+ }
+ if (next_bad) {
+ if (currently_testing == next_bad) {
+ /* fprintf (out, "%lu\n", nextbad); */
+ ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
+ currently_testing++;
+ continue;
+ }
+ else if (currently_testing + try > next_bad)
+ try = next_bad - currently_testing;
+ }
+ if (currently_testing + try > last_block)
+ try = last_block - currently_testing;
+ got = do_read (dev, blkbuf, try, block_size, currently_testing);
+ if (t_flag) {
+ /* test the comparison between all the
+ blocks successfully read */
+ int i;
+ for (i = 0; i < got; ++i)
+ if (memcmp (blkbuf+i*block_size,
+ blkbuf+blocks_at_once*block_size,
+ block_size))
+ bb_count += bb_output(currently_testing + i, CORRUPTION_ERROR);
+ }
+ if (got == 0 && try == 1)
+ bb_count += bb_output(currently_testing++, READ_ERROR);
+ currently_testing += got;
+ if (got != try) {
+ try = 1;
+ if (recover_block == ~0U)
+ recover_block = currently_testing - got +
+ blocks_at_once;
+ continue;
+ } else if (currently_testing == recover_block) {
+ try = blocks_at_once;
+ recover_block = ~0;
+ }
+ }
+ num_blocks = 0;
+ alarm(0);
+ if (s_flag || v_flag)
+ fputs(_(done_string), stderr);
+
+ fflush (stderr);
+ free (blkbuf);
+
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+
+ uncapture_terminate();
+
+ return bb_count;
+}
+
+static unsigned int test_rw (int dev, blk_t last_block,
+ int block_size, blk_t first_block,
+ unsigned int blocks_at_once)
+{
+ unsigned char *buffer, *read_buffer;
+ const unsigned int patterns[] = {0xaa, 0x55, 0xff, 0x00};
+ const unsigned int *pattern;
+ int i, try, got, nr_pattern, pat_idx;
+ unsigned int bb_count = 0;
+ blk_t recover_block = ~0;
+
+ /* set up abend handler */
+ capture_terminate(NULL);
+
+ buffer = allocate_buffer((size_t) 2 * blocks_at_once * block_size);
+ read_buffer = buffer + blocks_at_once * block_size;
+
+ if (!buffer) {
+ com_err(program_name, ENOMEM, "%s",
+ _("while allocating buffers"));
+ exit (1);
+ }
+
+ flush_bufs();
+
+ if (v_flag) {
+ fputs(_("Checking for bad blocks in read-write mode\n"),
+ stderr);
+ fprintf(stderr, _("From block %lu to %lu\n"),
+ (unsigned long) first_block,
+ (unsigned long) last_block - 1);
+ }
+ if (t_flag) {
+ pattern = t_patts;
+ nr_pattern = t_flag;
+ } else {
+ pattern = patterns;
+ nr_pattern = sizeof(patterns) / sizeof(patterns[0]);
+ }
+ for (pat_idx = 0; pat_idx < nr_pattern; pat_idx++) {
+ pattern_fill(buffer, pattern[pat_idx],
+ blocks_at_once * block_size);
+ num_blocks = last_block - 1;
+ currently_testing = first_block;
+ if (s_flag && v_flag <= 1)
+ alarm_intr(SIGALRM);
+
+ try = blocks_at_once;
+ while (currently_testing < last_block) {
+ if (bb_count >= max_bb) {
+ if (s_flag || v_flag) {
+ fputs(_("Too many bad blocks, aborting test\n"), stderr);
+ }
+ break;
+ }
+ if (currently_testing + try > last_block)
+ try = last_block - currently_testing;
+ got = do_write(dev, buffer, try, block_size,
+ currently_testing);
+ if (v_flag > 1)
+ print_status();
+
+ if (got == 0 && try == 1)
+ bb_count += bb_output(currently_testing++, WRITE_ERROR);
+ currently_testing += got;
+ if (got != try) {
+ try = 1;
+ if (recover_block == ~0U)
+ recover_block = currently_testing -
+ got + blocks_at_once;
+ continue;
+ } else if (currently_testing == recover_block) {
+ try = blocks_at_once;
+ recover_block = ~0;
+ }
+ }
+
+ num_blocks = 0;
+ alarm (0);
+ if (s_flag | v_flag)
+ fputs(_(done_string), stderr);
+ flush_bufs();
+ if (s_flag | v_flag)
+ fputs(_("Reading and comparing: "), stderr);
+ num_blocks = last_block;
+ currently_testing = first_block;
+ if (s_flag && v_flag <= 1)
+ alarm_intr(SIGALRM);
+
+ try = blocks_at_once;
+ while (currently_testing < last_block) {
+ if (bb_count >= max_bb) {
+ if (s_flag || v_flag) {
+ fputs(_("Too many bad blocks, aborting test\n"), stderr);
+ }
+ break;
+ }
+ if (currently_testing + try > last_block)
+ try = last_block - currently_testing;
+ got = do_read (dev, read_buffer, try, block_size,
+ currently_testing);
+ if (got == 0 && try == 1)
+ bb_count += bb_output(currently_testing++, READ_ERROR);
+ currently_testing += got;
+ if (got != try) {
+ try = 1;
+ if (recover_block == ~0U)
+ recover_block = currently_testing -
+ got + blocks_at_once;
+ continue;
+ } else if (currently_testing == recover_block) {
+ try = blocks_at_once;
+ recover_block = ~0U;
+ }
+ for (i=0; i < got; i++) {
+ if (memcmp(read_buffer + i * block_size,
+ buffer + i * block_size,
+ block_size))
+ bb_count += bb_output(currently_testing+i, CORRUPTION_ERROR);
+ }
+ if (v_flag > 1)
+ print_status();
+ }
+
+ num_blocks = 0;
+ alarm (0);
+ if (s_flag | v_flag)
+ fputs(_(done_string), stderr);
+ flush_bufs();
+ }
+ uncapture_terminate();
+ free(buffer);
+ return bb_count;
+}
+
+struct saved_blk_record {
+ blk_t block;
+ int num;
+};
+
+static unsigned int test_nd (int dev, blk_t last_block,
+ int block_size, blk_t first_block,
+ unsigned int blocks_at_once)
+{
+ unsigned char *blkbuf, *save_ptr, *test_ptr, *read_ptr;
+ unsigned char *test_base, *save_base, *read_base;
+ int try, i;
+ const unsigned int patterns[] = { ~0 };
+ const unsigned int *pattern;
+ int nr_pattern, pat_idx;
+ int got, used2, written;
+ blk_t save_currently_testing;
+ struct saved_blk_record *test_record;
+ /* This is static to prevent being clobbered by the longjmp */
+ static int num_saved;
+ jmp_buf terminate_env;
+ errcode_t errcode;
+ unsigned long buf_used;
+ static unsigned int bb_count;
+ unsigned int granularity = blocks_at_once;
+ blk_t recover_block = ~0U;
+
+ bb_count = 0;
+ errcode = ext2fs_badblocks_list_iterate_begin(bb_list,&bb_iter);
+ if (errcode) {
+ com_err(program_name, errcode, "%s",
+ _("while beginning bad block list iteration"));
+ exit (1);
+ }
+ do {
+ ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
+ } while (next_bad && next_bad < first_block);
+
+ blkbuf = allocate_buffer((size_t) 3 * blocks_at_once * block_size);
+ test_record = malloc(blocks_at_once * sizeof(struct saved_blk_record));
+ if (!blkbuf || !test_record) {
+ com_err(program_name, ENOMEM, "%s",
+ _("while allocating buffers"));
+ exit (1);
+ }
+
+ save_base = blkbuf;
+ test_base = blkbuf + (blocks_at_once * block_size);
+ read_base = blkbuf + (2 * blocks_at_once * block_size);
+
+ num_saved = 0;
+
+ flush_bufs();
+ if (v_flag) {
+ fputs(_("Checking for bad blocks in non-destructive read-write mode\n"), stderr);
+ fprintf (stderr, _("From block %lu to %lu\n"),
+ (unsigned long) first_block,
+ (unsigned long) last_block - 1);
+ }
+ if (s_flag || v_flag > 1) {
+ fputs(_("Checking for bad blocks (non-destructive read-write test)\n"), stderr);
+ }
+ if (setjmp(terminate_env)) {
+ /*
+ * Abnormal termination by a signal is handled here.
+ */
+ signal (SIGALRM, SIG_IGN);
+ fputs(_("\nInterrupt caught, cleaning up\n"), stderr);
+
+ save_ptr = save_base;
+ for (i=0; i < num_saved; i++) {
+ do_write(dev, save_ptr, test_record[i].num,
+ block_size, test_record[i].block);
+ save_ptr += test_record[i].num * block_size;
+ }
+ fflush (out);
+ exit(1);
+ }
+
+ /* set up abend handler */
+ capture_terminate(terminate_env);
+
+ if (t_flag) {
+ pattern = t_patts;
+ nr_pattern = t_flag;
+ } else {
+ pattern = patterns;
+ nr_pattern = sizeof(patterns) / sizeof(patterns[0]);
+ }
+ for (pat_idx = 0; pat_idx < nr_pattern; pat_idx++) {
+ pattern_fill(test_base, pattern[pat_idx],
+ blocks_at_once * block_size);
+
+ buf_used = 0;
+ bb_count = 0;
+ save_ptr = save_base;
+ test_ptr = test_base;
+ currently_testing = first_block;
+ num_blocks = last_block - 1;
+ if (s_flag && v_flag <= 1)
+ alarm_intr(SIGALRM);
+
+ while (currently_testing < last_block) {
+ if (bb_count >= max_bb) {
+ if (s_flag || v_flag) {
+ fputs(_("Too many bad blocks, aborting test\n"), stderr);
+ }
+ break;
+ }
+ got = try = granularity - buf_used;
+ if (next_bad) {
+ if (currently_testing == next_bad) {
+ /* fprintf (out, "%lu\n", nextbad); */
+ ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
+ currently_testing++;
+ goto check_for_more;
+ }
+ else if (currently_testing + try > next_bad)
+ try = next_bad - currently_testing;
+ }
+ if (currently_testing + try > last_block)
+ try = last_block - currently_testing;
+ got = do_read (dev, save_ptr, try, block_size,
+ currently_testing);
+ if (got == 0) {
+ if (recover_block == ~0U)
+ recover_block = currently_testing +
+ blocks_at_once;
+ if (granularity != 1) {
+ granularity = 1;
+ continue;
+ }
+ /* First block must have been bad. */
+ bb_count += bb_output(currently_testing++, READ_ERROR);
+ goto check_for_more;
+ }
+
+ /*
+ * Note the fact that we've saved this much data
+ * *before* we overwrite it with test data
+ */
+ test_record[num_saved].block = currently_testing;
+ test_record[num_saved].num = got;
+ num_saved++;
+
+ /* Write the test data */
+ written = do_write (dev, test_ptr, got, block_size,
+ currently_testing);
+ if (written != got)
+ com_err (program_name, errno,
+ _("during test data write, block %lu"),
+ (unsigned long) currently_testing +
+ written);
+
+ buf_used += got;
+ save_ptr += got * block_size;
+ test_ptr += got * block_size;
+ currently_testing += got;
+ if (got != try) {
+ if (recover_block == ~0U)
+ recover_block = currently_testing -
+ got + blocks_at_once;
+ continue;
+ }
+
+ check_for_more:
+ /*
+ * If there's room for more blocks to be tested this
+ * around, and we're not done yet testing the disk, go
+ * back and get some more blocks.
+ */
+ if ((buf_used != granularity) &&
+ (currently_testing < last_block))
+ continue;
+
+ if (currently_testing >= recover_block) {
+ granularity = blocks_at_once;
+ recover_block = ~0;
+ }
+
+ flush_bufs();
+ save_currently_testing = currently_testing;
+
+ /*
+ * for each contiguous block that we read into the
+ * buffer (and wrote test data into afterwards), read
+ * it back (looping if necessary, to get past newly
+ * discovered unreadable blocks, of which there should
+ * be none, but with a hard drive which is unreliable,
+ * it has happened), and compare with the test data
+ * that was written; output to the bad block list if
+ * it doesn't match.
+ */
+ used2 = 0;
+ save_ptr = save_base;
+ test_ptr = test_base;
+ read_ptr = read_base;
+ try = 0;
+
+ while (1) {
+ if (try == 0) {
+ if (used2 >= num_saved)
+ break;
+ currently_testing = test_record[used2].block;
+ try = test_record[used2].num;
+ used2++;
+ }
+
+ got = do_read (dev, read_ptr, try,
+ block_size, currently_testing);
+
+ /* test the comparison between all the
+ blocks successfully read */
+ for (i = 0; i < got; ++i)
+ if (memcmp (test_ptr+i*block_size,
+ read_ptr+i*block_size, block_size))
+ bb_count += bb_output(currently_testing + i, CORRUPTION_ERROR);
+ if (got < try) {
+ bb_count += bb_output(currently_testing + got, READ_ERROR);
+ got++;
+ }
+
+ /* write back original data */
+ do_write (dev, save_ptr, got,
+ block_size, currently_testing);
+ save_ptr += got * block_size;
+
+ currently_testing += got;
+ test_ptr += got * block_size;
+ read_ptr += got * block_size;
+ try -= got;
+ }
+
+ /* empty the buffer so it can be reused */
+ num_saved = 0;
+ buf_used = 0;
+ save_ptr = save_base;
+ test_ptr = test_base;
+ currently_testing = save_currently_testing;
+ }
+ num_blocks = 0;
+ alarm(0);
+ if (s_flag || v_flag > 1)
+ fputs(_(done_string), stderr);
+
+ flush_bufs();
+ }
+ uncapture_terminate();
+ fflush(stderr);
+ free(blkbuf);
+ free(test_record);
+
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+
+ return bb_count;
+}
+
+static void check_mount(char *device_name)
+{
+ errcode_t retval;
+ int mount_flags;
+
+ retval = ext2fs_check_if_mounted(device_name, &mount_flags);
+ if (retval) {
+ com_err("ext2fs_check_if_mount", retval,
+ _("while determining whether %s is mounted."),
+ device_name);
+ return;
+ }
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fprintf(stderr, _("%s is mounted; "), device_name);
+ if (force) {
+ fputs(_("badblocks forced anyway. "
+ "Hope /etc/mtab is incorrect.\n"), stderr);
+ return;
+ }
+ abort_badblocks:
+ fputs(_("it's not safe to run badblocks!\n"), stderr);
+ exit(1);
+ }
+
+ if ((mount_flags & EXT2_MF_BUSY) && !exclusive_ok) {
+ fprintf(stderr, _("%s is apparently in use by the system; "),
+ device_name);
+ if (force)
+ fputs(_("badblocks forced anyway.\n"), stderr);
+ else
+ goto abort_badblocks;
+ }
+
+}
+
+/*
+ * This function will convert a string to an unsigned long, printing
+ * an error message if it fails, and returning success or failure in err.
+ */
+static unsigned int parse_uint(const char *str, const char *descr)
+{
+ char *tmp;
+ unsigned long ret;
+
+ errno = 0;
+ ret = strtoul(str, &tmp, 0);
+ if (*tmp || errno) {
+ com_err (program_name, 0, _("invalid %s - %s"), descr, str);
+ exit (1);
+ } else if ((ret > UINT_MAX) ||
+ (ret == ULONG_MAX && errno == ERANGE)) {
+ com_err (program_name, 0, _("%s too large - %lu"), descr, ret);
+ exit (1);
+ }
+ return ret;
+}
+
+int main (int argc, char ** argv)
+{
+ int c;
+ char * device_name;
+ char * host_device_name = NULL;
+ char * input_file = NULL;
+ char * output_file = NULL;
+ FILE * in = NULL;
+ unsigned int block_size = 1024;
+ unsigned int blocks_at_once = 64;
+ blk64_t last_block, first_block;
+ int num_passes = 0;
+ int passes_clean = 0;
+ int dev;
+ errcode_t errcode;
+ unsigned int pattern;
+ unsigned int (*test_func)(int, blk_t,
+ int, blk_t,
+ unsigned int);
+ int open_flag;
+ long sysval;
+ unsigned long long inblk;
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ srandom((unsigned int)time(NULL)); /* simple randomness is enough */
+ test_func = test_ro;
+
+ /* Determine the system page size if possible */
+#ifdef HAVE_SYSCONF
+#if (!defined(_SC_PAGESIZE) && defined(_SC_PAGE_SIZE))
+#define _SC_PAGESIZE _SC_PAGE_SIZE
+#endif
+#ifdef _SC_PAGESIZE
+ sysval = sysconf(_SC_PAGESIZE);
+ if (sysval > 0)
+ sys_page_size = sysval;
+#endif /* _SC_PAGESIZE */
+#endif /* HAVE_SYSCONF */
+
+ if (argc && *argv)
+ program_name = *argv;
+ else
+ usage();
+ while ((c = getopt (argc, argv, "b:d:e:fi:o:svwnc:p:h:t:BX")) != EOF) {
+ switch (c) {
+ case 'b':
+ block_size = parse_uint(optarg, "block size");
+ break;
+ case 'f':
+ force++;
+ break;
+ case 'i':
+ input_file = optarg;
+ break;
+ case 'o':
+ output_file = optarg;
+ break;
+ case 's':
+ s_flag = 1;
+ break;
+ case 'v':
+ v_flag++;
+ break;
+ case 'w':
+ if (w_flag)
+ exclusive_usage();
+ test_func = test_rw;
+ w_flag = 1;
+ break;
+ case 'n':
+ if (w_flag)
+ exclusive_usage();
+ test_func = test_nd;
+ w_flag = 2;
+ break;
+ case 'c':
+ blocks_at_once = parse_uint(optarg, "blocks at once");
+ break;
+ case 'e':
+ max_bb = parse_uint(optarg, "max bad block count");
+ if (max_bb > MAX_BAD_BLOCKS) {
+ com_err (program_name, 0,
+ _("Too big max bad blocks count %u - "
+ "maximum is %u"), max_bb,
+ MAX_BAD_BLOCKS);
+ exit (1);
+ }
+ /* 0 really means unlimited but we cannot do that much... */
+ if (max_bb == 0)
+ max_bb = MAX_BAD_BLOCKS;
+ break;
+ case 'd':
+ d_flag = parse_uint(optarg, "read delay factor");
+ break;
+ case 'p':
+ num_passes = parse_uint(optarg,
+ "number of clean passes");
+ break;
+ case 'h':
+ host_device_name = optarg;
+ break;
+ case 't':
+ if (t_flag + 1 > t_max) {
+ unsigned int *t_patts_new;
+
+ t_patts_new = realloc(t_patts, sizeof(int) *
+ (t_max + T_INC));
+ if (!t_patts_new) {
+ com_err(program_name, ENOMEM,
+ _("can't allocate memory for "
+ "test_pattern - %s"),
+ optarg);
+ exit(1);
+ }
+ t_patts = t_patts_new;
+ t_max += T_INC;
+ }
+ if (!strcmp(optarg, "r") || !strcmp(optarg,"random")) {
+ t_patts[t_flag++] = ~0;
+ } else {
+ pattern = parse_uint(optarg, "test pattern");
+ if (pattern == (unsigned int) ~0)
+ pattern = 0xffff;
+ t_patts[t_flag++] = pattern;
+ }
+ break;
+ case 'B':
+ use_buffered_io = 1;
+ break;
+ case 'X':
+ exclusive_ok++;
+ break;
+ default:
+ usage();
+ }
+ }
+ if (!w_flag) {
+ if (t_flag > 1) {
+ com_err(program_name, 0, "%s",
+ _("Maximum of one test_pattern may be "
+ "specified in read-only mode"));
+ exit(1);
+ }
+ if (t_patts && (t_patts[0] == (unsigned int) ~0)) {
+ com_err(program_name, 0, "%s",
+ _("Random test_pattern is not allowed "
+ "in read-only mode"));
+ exit(1);
+ }
+ }
+ if ((block_size == 0) || (block_size > (1 << 24)) ||
+ (block_size & (block_size - 1))) {
+ com_err(program_name, 0, _("Invalid block size: %u\n"),
+ block_size);
+ exit(1);
+ }
+ if (blocks_at_once == 0) {
+ com_err(program_name, 0, _("Invalid number of blocks: %d\n"),
+ blocks_at_once);
+ exit(1);
+ } else if (((size_t) block_size * blocks_at_once) > SIZE_MAX / 3) {
+ /* maximum usage is in test_nd() */
+ com_err(program_name, 0, _("For block size %d, number of blocks too large: %d\n"),
+ block_size, blocks_at_once);
+ exit(1);
+ }
+
+ if (optind > argc - 1)
+ usage();
+ device_name = argv[optind++];
+ if (optind > argc - 1) {
+ errcode = ext2fs_get_device_size2(device_name,
+ (int) block_size,
+ &last_block);
+ if (errcode == EXT2_ET_UNIMPLEMENTED) {
+ com_err(program_name, 0, "%s",
+ _("Couldn't determine device size; you "
+ "must specify\nthe size manually\n"));
+ exit(1);
+ }
+ if (errcode) {
+ com_err(program_name, errcode, "%s",
+ _("while trying to determine device size"));
+ exit(1);
+ }
+ } else {
+ errno = 0;
+ last_block = parse_uint(argv[optind], _("last block"));
+ last_block++;
+ optind++;
+ }
+ if (optind <= argc-1) {
+ errno = 0;
+ first_block = parse_uint(argv[optind], _("first block"));
+ } else first_block = 0;
+ if (first_block >= last_block) {
+ com_err (program_name, 0, _("invalid starting block (%llu): must be less than %llu"),
+ (unsigned long long) first_block,
+ (unsigned long long) last_block);
+ exit (1);
+ }
+ /* ext2 badblocks file can't handle large values */
+ if (last_block >> 32) {
+ com_err(program_name, EOVERFLOW,
+ _("invalid end block (%llu): must be 32-bit value"),
+ (unsigned long long) last_block);
+ exit(1);
+ }
+ if (w_flag)
+ check_mount(device_name);
+
+ gettimeofday(&time_start, 0);
+ open_flag = O_LARGEFILE | (w_flag ? O_RDWR : O_RDONLY);
+ dev = open (device_name, open_flag);
+ if (dev == -1) {
+ com_err (program_name, errno, _("while trying to open %s"),
+ device_name);
+ exit (1);
+ }
+ if (host_device_name) {
+ host_dev = open (host_device_name, open_flag);
+ if (host_dev == -1) {
+ com_err (program_name, errno,
+ _("while trying to open %s"),
+ host_device_name);
+ exit (1);
+ }
+ } else
+ host_dev = dev;
+ if (input_file) {
+ if (strcmp (input_file, "-") == 0)
+ in = stdin;
+ else {
+ in = fopen (input_file, "r");
+ if (in == NULL)
+ {
+ com_err (program_name, errno,
+ _("while trying to open %s"),
+ input_file);
+ exit (1);
+ }
+ }
+ }
+ if (output_file && strcmp (output_file, "-") != 0)
+ {
+ out = fopen (output_file, "w");
+ if (out == NULL)
+ {
+ com_err (program_name, errno,
+ _("while trying to open %s"),
+ output_file);
+ exit (1);
+ }
+ }
+ else
+ out = stdout;
+
+ errcode = ext2fs_badblocks_list_create(&bb_list,0);
+ if (errcode) {
+ com_err(program_name, errcode, "%s",
+ _("while creating in-memory bad blocks list"));
+ exit (1);
+ }
+
+ if (in) {
+ for(;;) {
+ switch (fscanf(in, "%llu\n", &inblk)) {
+ case 0:
+ com_err(program_name, 0, "%s",
+ _("input file - bad format"));
+ exit (1);
+ case EOF:
+ break;
+ default:
+ if (inblk >> 32) {
+ com_err(program_name,
+ EOVERFLOW, "%s",
+ _("while adding to in-memory "
+ "bad block list"));
+ exit(1);
+ }
+ next_bad = inblk;
+ errcode = ext2fs_badblocks_list_add(bb_list,next_bad);
+ if (errcode) {
+ com_err(program_name, errcode,
+ "%s",
+ _("while adding to in-memory "
+ "bad block list"));
+ exit (1);
+ }
+ continue;
+ }
+ break;
+ }
+
+ if (in != stdin)
+ fclose (in);
+ }
+
+ do {
+ unsigned int bb_count;
+
+ bb_count = test_func(dev, last_block, (int) block_size,
+ first_block, blocks_at_once);
+ if (bb_count)
+ passes_clean = 0;
+ else
+ ++passes_clean;
+
+ if (v_flag)
+ fprintf(stderr,
+ _("Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"),
+ bb_count, num_read_errors, num_write_errors, num_corruption_errors);
+
+ } while (passes_clean < num_passes);
+
+ close (dev);
+ if (out != stdout)
+ fclose (out);
+ free(t_patts);
+ return 0;
+}
diff --git a/misc/base_device.c b/misc/base_device.c
new file mode 100644
index 0000000..814a479
--- /dev/null
+++ b/misc/base_device.c
@@ -0,0 +1,171 @@
+/*
+ * base_device.c
+ *
+ * Return the "base device" given a particular device; this is used to
+ * assure that we only fsck one partition on a particular drive at any
+ * one time. Otherwise, the disk heads will be seeking all over the
+ * place. If the base device can not be determined, return NULL.
+ *
+ * The base_device() function returns an allocated string which must
+ * be freed.
+ *
+ * Written by Theodore Ts'o, <tytso@mit.edu>
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <ctype.h>
+#include <string.h>
+
+#include "fsck.h"
+
+/*
+ * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3
+ * pathnames.
+ */
+static const char *devfs_hier[] = {
+ "host", "bus", "target", "lun", 0
+};
+
+char *base_device(const char *device)
+{
+ char *str, *cp;
+ const char **hier, *disk;
+ int len;
+
+ str = malloc(strlen(device)+1);
+ if (!str)
+ return NULL;
+ strcpy(str, device);
+ cp = str;
+
+ /* Skip over /dev/; if it's not present, give up. */
+ if (strncmp(cp, "/dev/", 5) != 0)
+ goto errout;
+ cp += 5;
+
+ /* Skip over /dev/dsk/... */
+ if (strncmp(cp, "dsk/", 4) == 0)
+ cp += 4;
+
+ /*
+ * For md devices, we treat them all as if they were all
+ * on one disk, since we don't know how to parallelize them.
+ */
+ if (cp[0] == 'm' && cp[1] == 'd') {
+ *(cp+2) = 0;
+ return str;
+ }
+
+ /* Handle DAC 960 devices */
+ if (strncmp(cp, "rd/", 3) == 0) {
+ cp += 3;
+ if (cp[0] != 'c' || cp[2] != 'd' ||
+ !isdigit(cp[1]) || !isdigit(cp[3]))
+ goto errout;
+ *(cp+4) = 0;
+ return str;
+ }
+
+ /* Now let's handle /dev/hd* and /dev/sd* devices.... */
+ if ((cp[0] == 'h' || cp[0] == 's') && (cp[1] == 'd')) {
+ cp += 2;
+ /* If there's a single number after /dev/hd, skip it */
+ if (isdigit(*cp))
+ cp++;
+ /* What follows must be an alpha char, or give up */
+ if (!isalpha(*cp))
+ goto errout;
+ *(cp + 1) = 0;
+ return str;
+ }
+
+ /* Now let's handle devfs (ugh) names */
+ len = 0;
+ if (strncmp(cp, "ide/", 4) == 0)
+ len = 4;
+ if (strncmp(cp, "scsi/", 5) == 0)
+ len = 5;
+ if (len) {
+ cp += len;
+ /*
+ * Now we proceed down the expected devfs hierarchy.
+ * i.e., .../host1/bus2/target3/lun4/...
+ * If we don't find the expected token, followed by
+ * some number of digits at each level, abort.
+ */
+ for (hier = devfs_hier; *hier; hier++) {
+ len = strlen(*hier);
+ if (strncmp(cp, *hier, len) != 0)
+ goto errout;
+ cp += len;
+ while (*cp != '/' && *cp != 0) {
+ if (!isdigit(*cp))
+ goto errout;
+ cp++;
+ }
+ cp++;
+ }
+ *(cp - 1) = 0;
+ return str;
+ }
+
+ /* Now handle devfs /dev/disc or /dev/disk names */
+ disk = 0;
+ if (strncmp(cp, "discs/", 6) == 0)
+ disk = "disc";
+ else if (strncmp(cp, "disks/", 6) == 0)
+ disk = "disk";
+ if (disk) {
+ cp += 6;
+ if (strncmp(cp, disk, 4) != 0)
+ goto errout;
+ cp += 4;
+ while (*cp != '/' && *cp != 0) {
+ if (!isdigit(*cp))
+ goto errout;
+ cp++;
+ }
+ *cp = 0;
+ return str;
+ }
+
+errout:
+ free(str);
+ return NULL;
+}
+
+#ifdef DEBUG
+int main(int argc, char** argv)
+{
+ char *base;
+ char buf[256], *cp;
+
+ while (1) {
+ if (fgets(buf, sizeof(buf), stdin) == NULL)
+ break;
+ cp = strchr(buf, '\n');
+ if (cp)
+ *cp = 0;
+ cp = strchr(buf, '\t');
+ if (cp)
+ *cp = 0;
+ base = base_device(buf);
+ printf("%s\t%s\n", buf, base ? base : "NONE");
+ free(base);
+ }
+ exit(0);
+}
+#endif
diff --git a/misc/base_device.tst b/misc/base_device.tst
new file mode 100644
index 0000000..609a58d
--- /dev/null
+++ b/misc/base_device.tst
@@ -0,0 +1,16 @@
+/dev/hda7 /dev/hda
+/dev/sda1 /dev/sda
+/dev/hda /dev/hda
+/dev/sda /dev/sda
+/dev/dsk/hda6 /dev/dsk/hda
+/dev/dsk/sda5 /dev/dsk/sda
+/dev/md4 /dev/md
+/dev/md/4 /dev/md
+/dev/ide/host0/bus1/target2/lun3 /dev/ide/host0/bus1/target2/lun3
+/dev/ide/host0/bus1/target2/lun3/part10 /dev/ide/host0/bus1/target2/lun3
+/dev/ide/host0/bus1/target2/lun3/ /dev/ide/host0/bus1/target2/lun3
+/dev/disks/disk2/part2 /dev/disks/disk2
+/dev/disks/disk2/ /dev/disks/disk2
+/dev/disks/disk2 /dev/disks/disk2
+/dev/discs/disc1/part10 /dev/discs/disc1
+/dev/discs/disc1/ /dev/discs/disc1
diff --git a/misc/blkid.8.in b/misc/blkid.8.in
new file mode 100644
index 0000000..79be1c0
--- /dev/null
+++ b/misc/blkid.8.in
@@ -0,0 +1,164 @@
+.\" Copyright 2000 Andreas Dilger (adilger@turbolinux.com)
+.\"
+.\" This man page was created for blkid from e2fsprogs-1.25.
+.\"
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.\" Based on uuidgen, Mon Sep 17 10:42:12 2000, Andreas Dilger
+.TH BLKID 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+blkid \- command\-line utility to locate/print block device attributes
+.SH SYNOPSIS
+.B blkid
+[
+.B \-ghlLv
+]
+[
+[
+.B \-c
+.I cachefile
+]
+.B \-w
+.I writecachefile
+]
+[
+.B \-o
+.I format
+]
+[
+.B \-s
+.I tag
+]
+[
+.B \-t
+.IR NAME = value
+]
+[
+.I device ...
+]
+.SH DESCRIPTION
+The
+.B blkid
+program is the command-line interface to working with
+.BR libblkid (3)
+library. It can determine the type of content (e.g. file system, swap)
+a block device holds, and also attributes (tokens, NAME=value pairs)
+from the content metadata (e.g. LABEL or UUID fields).
+.PP
+.B blkid
+has two main forms of operation: either searching for a device with a
+specific NAME=value pair, or displaying NAME=value pairs for one or
+more devices.
+.SH OPTIONS
+.TP
+.BI \-c " cachefile"
+Read from
+.I cachefile
+instead of reading from the default cache file
+.IR /etc/blkid.tab .
+If you want to start with a clean cache (i.e. don't report devices previously
+scanned but not necessarily available at this time), specify
+.IR /dev/null .
+.TP
+.B \-g
+Perform a garbage collection pass on the blkid cache to remove
+devices which no longer exist.
+.TP
+.B \-h
+Display a usage message and exit.
+.TP
+.B \-l
+Look up one device that matches the search parameter specified using
+the
+.B \-t
+option. If there are multiple devices that match the specified search
+parameter, then the device with the highest priority is returned, and/or
+the first device found at a given priority. Device types in order of
+decreasing priority are Device Mapper, EVMS, LVM, MD, and finally regular
+block devices. If this option is not specified,
+.B blkid
+will print all of the devices that match the search parameter.
+.TP
+.BI \-o " format"
+Display
+.BR blkid 's
+output using the specified format. The
+.I format
+parameter may be
+.I full
+(the default),
+.I value
+(only print the value of the tags),
+.I list
+(print the devices in a user-friendly format),
+or
+.I device
+(only print the device name).
+.TP
+.B \-L
+Print the devices in a user-friendly list format. This is the
+equivalent of using the option \fB-o list\fR.
+.TP
+.BI \-s " tag"
+For each (specified) device, show only the tags that match
+.IR tag .
+It is possible to specify multiple
+.B \-s
+options. If no tag is specified, then all tokens are shown for all
+(specified) devices.
+In order to just refresh the cache without showing any tokens, use
+.B "-s none"
+with no other options.
+.TP
+.BI \-t " NAME" = "value"
+Search for block devices with tokens named
+.I NAME
+that have the value
+.IR value ,
+and display any devices which are found.
+Common values for
+.I NAME
+include
+.BR TYPE ,
+.BR LABEL ,
+and
+.BR UUID .
+If there are no devices specified on the command line, all block devices
+will be searched; otherwise only the specified devices are searched.
+.TP
+.B \-v
+Display version number and exit.
+.TP
+.BI \-w " writecachefile"
+Write the device cache to
+.I writecachefile
+instead of writing it to the default cache file
+.IR /etc/blkid.tab .
+If you don't want to save the cache to the default file, specify
+.IR /dev/null.
+If not specified it will be the same file as that given by the
+.B \-c
+option.
+.TP
+.I device
+Display tokens from only the specified device. It is possible to
+give multiple
+.I device
+options on the command line. If none is given, all devices which
+appear in
+.I /proc/partitions
+are shown, if they are recognized.
+.SH "RETURN CODE"
+If the specified token was found, or if any tags were shown from (specified)
+devices, 0 is returned. If the specified token was not found, or no
+(specified) devices could be identified, an exit code of 2 is returned.
+For usage or other errors, an exit code of 4 is returned.
+.SH AUTHOR
+.B blkid
+was written by Andreas Dilger for libblkid.
+.SH AVAILABILITY
+.B blkid
+is part the e2fsprogs package since version 1.26 and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libblkid (3)
diff --git a/misc/blkid.c b/misc/blkid.c
new file mode 100644
index 0000000..472f017
--- /dev/null
+++ b/misc/blkid.c
@@ -0,0 +1,433 @@
+/*
+ * blkid.c - User command-line interface for libblkid
+ *
+ * Copyright (C) 2001 Andreas Dilger
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int getopt(int argc, char * const argv[], const char *optstring);
+extern char *optarg;
+extern int optind;
+#endif
+
+#define OUTPUT_VALUE_ONLY 0x0001
+#define OUTPUT_DEVICE_ONLY 0x0002
+#define OUTPUT_PRETTY_LIST 0x0004
+
+#include "ext2fs/ext2fs.h"
+#include "blkid/blkid.h"
+
+static const char *progname = "blkid";
+
+static void print_version(FILE *out)
+{
+ fprintf(out, "%s %s (%s)\n", progname, BLKID_VERSION, BLKID_DATE);
+}
+
+static void usage(int error)
+{
+ FILE *out = error ? stderr : stdout;
+
+ print_version(out);
+ fprintf(out,
+ "usage:\t%s [-c <file>] [-ghlLv] [-o format] "
+ "[-s <tag>] [-t <token>]\n [-w <file>] [dev ...]\n"
+ "\t-c\tcache file (default: /etc/blkid.tab, /dev/null = none)\n"
+ "\t-h\tprint this usage message and exit\n"
+ "\t-g\tgarbage collect the blkid cache\n"
+ "\t-s\tshow specified tag(s) (default show all tags)\n"
+ "\t-t\tfind device with a specific token (NAME=value pair)\n"
+ "\t-l\tlookup the the first device with arguments specified by -t\n"
+ "\t-v\tprint version and exit\n"
+ "\t-w\twrite cache to different file (/dev/null = no write)\n"
+ "\tdev\tspecify device(s) to probe (default: all devices)\n",
+ progname);
+ exit(error);
+}
+
+/*
+ * This function does "safe" printing. It will convert non-printable
+ * ASCII characters using '^' and M- notation.
+ */
+static void safe_print(const char *cp, int len)
+{
+ unsigned char ch;
+
+ if (len < 0)
+ len = strlen(cp);
+
+ while (len--) {
+ ch = *cp++;
+ if (ch > 128) {
+ fputs("M-", stdout);
+ ch -= 128;
+ }
+ if ((ch < 32) || (ch == 0x7f)) {
+ fputc('^', stdout);
+ ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
+ }
+ if (ch != '"') {
+ fputc(ch, stdout);
+ }
+ }
+}
+
+static int get_terminal_width(void)
+{
+#ifdef TIOCGSIZE
+ struct ttysize t_win;
+#endif
+#ifdef TIOCGWINSZ
+ struct winsize w_win;
+#endif
+ const char *cp;
+ int width = 80;
+
+#ifdef TIOCGSIZE
+ if (ioctl (0, TIOCGSIZE, &t_win) == 0) {
+ width = t_win.ts_cols;
+ goto got_it;
+ }
+#endif
+#ifdef TIOCGWINSZ
+ if (ioctl (0, TIOCGWINSZ, &w_win) == 0) {
+ width = w_win.ws_col;
+ goto got_it;
+ }
+#endif
+ cp = getenv("COLUMNS");
+ if (cp)
+ width = atoi(cp);
+got_it:
+ if (width > 4096)
+ return 4096; /* sanity check */
+ return width;
+}
+
+static int pretty_print_word(const char *str, int max_len,
+ int left_len, int overflow_nl)
+{
+ int len = strlen(str) + left_len;
+ int ret = 0;
+
+ fputs(str, stdout);
+ if (overflow_nl && len > max_len) {
+ fputc('\n', stdout);
+ len = 0;
+ } else if (len > max_len)
+ ret = len - max_len;
+ do {
+ fputc(' ', stdout);
+ } while (len++ < max_len);
+ return ret;
+}
+
+static void pretty_print_line(const char *device, const char *fs_type,
+ const char *label, const char *mtpt,
+ const char *uuid)
+{
+ static int device_len = 10, fs_type_len = 7;
+ static int label_len = 8, mtpt_len = 14;
+ static int term_width = -1;
+ int len, w;
+
+ if (term_width < 0) {
+ term_width = get_terminal_width();
+
+ if (term_width > 80) {
+ term_width -= 80;
+ w = term_width / 10;
+ if (w > 8)
+ w = 8;
+ term_width -= 2*w;
+ label_len += w;
+ fs_type_len += w;
+ w = term_width/2;
+ device_len += w;
+ mtpt_len +=w;
+ }
+ }
+
+ len = pretty_print_word(device, device_len, 0, 1);
+ len = pretty_print_word(fs_type, fs_type_len, len, 0);
+ len = pretty_print_word(label, label_len, len, 0);
+ len = pretty_print_word(mtpt, mtpt_len, len, 0);
+ fputs(uuid, stdout);
+ fputc('\n', stdout);
+}
+
+static void pretty_print_dev(blkid_dev dev)
+{
+ blkid_tag_iterate iter;
+ const char *type, *value, *devname;
+ const char *uuid = "", *fs_type = "", *label = "";
+ int len, mount_flags;
+ char mtpt[80];
+ errcode_t retval;
+
+ if (dev == NULL) {
+ pretty_print_line("device", "fs_type", "label",
+ "mount point", "UUID");
+ for (len=get_terminal_width()-1; len > 0; len--)
+ fputc('-', stdout);
+ fputc('\n', stdout);
+ return;
+ }
+
+ devname = blkid_dev_devname(dev);
+ if (access(devname, F_OK))
+ return;
+
+ /* Get the uuid, label, type */
+ iter = blkid_tag_iterate_begin(dev);
+ while (blkid_tag_next(iter, &type, &value) == 0) {
+ if (!strcmp(type, "UUID"))
+ uuid = value;
+ if (!strcmp(type, "TYPE"))
+ fs_type = value;
+ if (!strcmp(type, "LABEL"))
+ label = value;
+ }
+ blkid_tag_iterate_end(iter);
+
+ /* Get the mount point */
+ mtpt[0] = 0;
+ retval = ext2fs_check_mount_point(devname, &mount_flags,
+ mtpt, sizeof(mtpt));
+ if (retval == 0) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ if (!mtpt[0])
+ strcpy(mtpt, "(mounted, mtpt unknown)");
+ } else if (mount_flags & EXT2_MF_BUSY)
+ strcpy(mtpt, "(in use)");
+ else
+ strcpy(mtpt, "(not mounted)");
+ }
+
+ pretty_print_line(devname, fs_type, label, mtpt, uuid);
+}
+
+static void print_tags(blkid_dev dev, char *show[], int numtag, int output)
+{
+ blkid_tag_iterate iter;
+ const char *type, *value;
+ int i, first = 1;
+
+ if (!dev)
+ return;
+
+ if (output & OUTPUT_PRETTY_LIST) {
+ pretty_print_dev(dev);
+ return;
+ }
+
+ if (output & OUTPUT_DEVICE_ONLY) {
+ printf("%s\n", blkid_dev_devname(dev));
+ return;
+ }
+
+ iter = blkid_tag_iterate_begin(dev);
+ while (blkid_tag_next(iter, &type, &value) == 0) {
+ if (numtag && show) {
+ for (i=0; i < numtag; i++)
+ if (!strcmp(type, show[i]))
+ break;
+ if (i >= numtag)
+ continue;
+ }
+ if (output & OUTPUT_VALUE_ONLY) {
+ fputs(value, stdout);
+ fputc('\n', stdout);
+ } else {
+ if (first) {
+ printf("%s: ", blkid_dev_devname(dev));
+ first = 0;
+ }
+ fputs(type, stdout);
+ fputs("=\"", stdout);
+ safe_print(value, -1);
+ fputs("\" ", stdout);
+ }
+ }
+ blkid_tag_iterate_end(iter);
+
+ if (!first && !(output & OUTPUT_VALUE_ONLY))
+ printf("\n");
+}
+
+int main(int argc, char **argv)
+{
+ blkid_cache cache = NULL;
+ char *devices[128] = { NULL, };
+ char *show[128] = { NULL, };
+ char *search_type = NULL, *search_value = NULL;
+ char *read = NULL;
+ char *write = NULL;
+ unsigned int numdev = 0, numtag = 0;
+ int version = 0;
+ int err = 4;
+ unsigned int i;
+ int output_format = 0;
+ int lookup = 0, gc = 0;
+ int c;
+
+ while ((c = getopt (argc, argv, "c:f:ghlLo:s:t:w:v")) != EOF)
+ switch (c) {
+ case 'c':
+ read = optarg;
+ if (!write)
+ write = read;
+ break;
+ case 'l':
+ lookup++;
+ break;
+ case 'L':
+ output_format = OUTPUT_PRETTY_LIST;
+ break;
+ case 'g':
+ gc = 1;
+ break;
+ case 'o':
+ if (!strcmp(optarg, "value"))
+ output_format = OUTPUT_VALUE_ONLY;
+ else if (!strcmp(optarg, "device"))
+ output_format = OUTPUT_DEVICE_ONLY;
+ else if (!strcmp(optarg, "list"))
+ output_format = OUTPUT_PRETTY_LIST;
+ else if (!strcmp(optarg, "full"))
+ output_format = 0;
+ else {
+ fprintf(stderr, "Invalid output format %s. "
+ "Choose from value,\n\t"
+ "device, list, or full\n", optarg);
+ exit(1);
+ }
+ break;
+ case 's':
+ if (numtag >= sizeof(show) / sizeof(*show)) {
+ fprintf(stderr, "Too many tags specified\n");
+ usage(err);
+ }
+ show[numtag++] = optarg;
+ break;
+ case 't':
+ if (search_type) {
+ fprintf(stderr, "Can only search for "
+ "one NAME=value pair\n");
+ usage(err);
+ }
+ if (blkid_parse_tag_string(optarg,
+ &search_type,
+ &search_value)) {
+ fprintf(stderr, "-t needs NAME=value pair\n");
+ usage(err);
+ }
+ break;
+ case 'v':
+ version = 1;
+ break;
+ case 'w':
+ write = optarg;
+ break;
+ case 'h':
+ err = 0;
+ /* fallthrough */
+ default:
+ usage(err);
+ }
+
+ while (optind < argc)
+ devices[numdev++] = argv[optind++];
+
+ if (version) {
+ print_version(stdout);
+ goto exit;
+ }
+
+ if (blkid_get_cache(&cache, read) < 0)
+ goto exit;
+
+ err = 2;
+ if (gc) {
+ blkid_gc_cache(cache);
+ goto exit;
+ }
+ if (output_format & OUTPUT_PRETTY_LIST)
+ pretty_print_dev(NULL);
+
+ if (lookup) {
+ blkid_dev dev;
+
+ if (!search_type) {
+ fprintf(stderr, "The lookup option requires a "
+ "search type specified using -t\n");
+ exit(1);
+ }
+ /* Load any additional devices not in the cache */
+ for (i = 0; i < numdev; i++)
+ blkid_get_dev(cache, devices[i], BLKID_DEV_NORMAL);
+
+ if ((dev = blkid_find_dev_with_tag(cache, search_type,
+ search_value))) {
+ print_tags(dev, show, numtag, output_format);
+ err = 0;
+ }
+ /* If we didn't specify a single device, show all available devices */
+ } else if (!numdev) {
+ blkid_dev_iterate iter;
+ blkid_dev dev;
+
+ blkid_probe_all(cache);
+
+ iter = blkid_dev_iterate_begin(cache);
+ blkid_dev_set_search(iter, search_type, search_value);
+ while (blkid_dev_next(iter, &dev) == 0) {
+ dev = blkid_verify(cache, dev);
+ if (!dev)
+ continue;
+ print_tags(dev, show, numtag, output_format);
+ err = 0;
+ }
+ blkid_dev_iterate_end(iter);
+ /* Add all specified devices to cache (optionally display tags) */
+ } else for (i = 0; i < numdev; i++) {
+ blkid_dev dev = blkid_get_dev(cache, devices[i],
+ BLKID_DEV_NORMAL);
+
+ if (dev) {
+ if (search_type &&
+ !blkid_dev_has_tag(dev, search_type,
+ search_value))
+ continue;
+ print_tags(dev, show, numtag, output_format);
+ err = 0;
+ }
+ }
+
+exit:
+ free(search_type);
+ free(search_value);
+ blkid_put_cache(cache);
+ return err;
+}
diff --git a/misc/chattr.1.in b/misc/chattr.1.in
new file mode 100644
index 0000000..50c54e7
--- /dev/null
+++ b/misc/chattr.1.in
@@ -0,0 +1,299 @@
+.\" -*- nroff -*-
+.TH CHATTR 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+chattr \- change file attributes on a Linux file system
+.SH SYNOPSIS
+.B chattr
+[
+.B \-RVf
+]
+[
+.B \-v
+.I version
+]
+[
+.B \-p
+.I project
+]
+[
+.I mode
+]
+.I files...
+.SH DESCRIPTION
+.B chattr
+changes the file attributes on a Linux file system.
+.PP
+The format of a symbolic
+.I mode
+is
+.BR +-= [ aAcCdDeFijmPsStTux ].
+.PP
+The operator
+.RB ' + '
+causes the selected attributes to be added to the
+existing attributes of the files;
+.RB ' - '
+causes them to be removed; and
+.RB ' = '
+causes them to be the only attributes that the files have.
+.PP
+The letters
+.RB ' aAcCdDeFijmPsStTux '
+select the new attributes for the files:
+append only
+.RB ( a ),
+no atime updates
+.RB ( A ),
+compressed
+.RB ( c ),
+no copy on write
+.RB ( C ),
+no dump
+.RB ( d ),
+synchronous directory updates
+.RB ( D ),
+extent format
+.RB ( e ),
+case-insensitive directory lookups
+.RB ( F ),
+immutable
+.RB ( i ),
+data journaling
+.RB ( j ),
+don't compress
+.RB ( m ),
+project hierarchy
+.RB ( P ),
+secure deletion
+.RB ( s ),
+synchronous updates
+.RB ( S ),
+no tail-merging
+.RB ( t ),
+top of directory hierarchy
+.RB ( T ),
+undeletable
+.RB ( u ),
+and direct access for files
+.RB ( x ).
+.PP
+The following attributes are read-only, and may be listed by
+.BR lsattr (1)
+but not modified by chattr:
+encrypted
+.RB ( E ),
+indexed directory
+.RB ( I ),
+inline data
+.RB ( N ),
+and verity
+.RB ( V ).
+.PP
+Not all flags are supported or utilized by all file systems; refer to
+file system-specific man pages such as
+.BR btrfs (5),
+.BR ext4 (5),
+.BR mkfs.f2fs (8),
+and
+.BR xfs (5)
+for more file system-specific details.
+.SH OPTIONS
+.TP
+.B \-R
+Recursively change attributes of directories and their contents.
+.TP
+.B \-V
+Be verbose with chattr's output and print the program version.
+.TP
+.B \-f
+Suppress most error messages.
+.TP
+.BI \-v " version"
+Set the file's version/generation number.
+.TP
+.BI \-p " project"
+Set the file's project number.
+.SH ATTRIBUTES
+.TP
+.B a
+A file with the 'a' attribute set can only be opened in append mode for
+writing. Only the superuser or a process possessing the
+CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
+.TP
+.B A
+When a file with the 'A' attribute set is accessed, its atime record is
+not modified. This avoids a certain amount of disk I/O for laptop
+systems.
+.TP
+.B c
+A file with the 'c' attribute set is automatically compressed on the disk
+by the kernel. A read from this file returns uncompressed data. A write to
+this file compresses data before storing them on the disk. Note: please
+make sure to read the bugs and limitations section at the end of this
+document. (Note: For btrfs, If the 'c' flag is set, then the 'C' flag
+cannot be set. Also conflicts with btrfs mount option 'nodatasum')
+.TP
+.B C
+A file with the 'C' attribute set will not be subject to copy-on-write
+updates. This flag is only supported on file systems which perform
+copy-on-write. (Note: For btrfs, the 'C' flag should be
+set on new or empty files. If it is set on a file which already has
+data blocks, it is undefined when the blocks assigned to the file will
+be fully stable. If the 'C' flag is set on a directory, it will have no
+effect on the directory, but new files created in that directory will
+have the No_COW attribute set. If the 'C' flag is set, then the 'c' flag
+cannot be set.)
+.TP
+.B d
+A file with the 'd' attribute set is not a candidate for backup when the
+.BR dump (8)
+program is run.
+.TP
+.B D
+When a directory with the 'D' attribute set is modified,
+the changes are written synchronously to the disk; this is equivalent to
+the 'dirsync' mount option applied to a subset of the files.
+.TP
+.B e
+The 'e' attribute indicates that the file is using extents for mapping
+the blocks on disk. It may not be removed using
+.BR chattr (1).
+.TP
+.B E
+A file, directory, or symlink with the 'E' attribute set is encrypted by the
+file system. This attribute may not be set or cleared using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.TP
+.B F
+A directory with the 'F' attribute set indicates that all the path
+lookups inside that directory are made in a case-insensitive fashion.
+This attribute can only be changed in empty directories on file systems
+with the casefold feature enabled.
+.TP
+.B i
+A file with the 'i' attribute cannot be modified: it cannot be deleted or
+renamed, no link can be created to this file, most of the file's
+metadata can not be modified, and the file can not be opened in write mode.
+Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE
+capability can set or clear this attribute.
+.TP
+.B I
+The 'I' attribute is used by the htree code to indicate that a directory
+is being indexed using hashed trees. It may not be set or cleared using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.TP
+.B j
+A file with the 'j' attribute has all of its data written to the ext3 or
+ext4 journal before being written to the file itself, if the file system
+is mounted with the "data=ordered" or "data=writeback" options and the
+file system has a journal. When the file system is mounted with the
+"data=journal" option all file data is already journalled and this
+attribute has no effect. Only the superuser or a process possessing the
+CAP_SYS_RESOURCE capability can set or clear this attribute.
+.TP
+.B m
+A file with the 'm' attribute is excluded from compression on file
+systems that support per-file compression.
+.TP
+.B N
+A file with the 'N' attribute set indicates that the file has data
+stored inline, within the inode itself. It may not be set or cleared
+using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.TP
+.B P
+A directory with the 'P' attribute set will enforce a hierarchical
+structure for project id's. This means that files and directories created
+in the directory will inherit the project id of the directory, rename
+operations are constrained so when a file or directory is moved into
+another directory, that the project ids must match. In addition, a
+hard link to file can only be created when the project id for the file
+and the destination directory match.
+.TP
+.B s
+When a file with the 's' attribute set is deleted, its blocks are zeroed
+and written back to the disk. Note: please make sure to read the bugs
+and limitations section at the end of this document.
+.TP
+.B S
+When a file with the 'S' attribute set is modified,
+the changes are written synchronously to the disk; this is equivalent to
+the 'sync' mount option applied to a subset of the files.
+.TP
+.B t
+A file with the 't' attribute will not have a partial block fragment at
+the end of the file merged with other files (for those file systems which
+support tail-merging). This is necessary for applications such as LILO
+which read the file system directly, and which don't understand tail-merged
+files. Note: As of this writing, the ext2, ext3, and ext4 file systems do
+not support tail-merging.
+.TP
+.B T
+A directory with the 'T' attribute will be deemed to be the top of
+directory hierarchies for the purposes of the Orlov block allocator.
+This is a hint to the block allocator used by ext3 and ext4 that the
+subdirectories under this directory are not related, and thus should be
+spread apart for allocation purposes. For example it is a very good
+idea to set the 'T' attribute on the /home directory, so that /home/john
+and /home/mary are placed into separate block groups. For directories
+where this attribute is not set, the Orlov block allocator will try to
+group subdirectories closer together where possible.
+.TP
+.B u
+When a file with the 'u' attribute set is deleted, its contents are
+saved. This allows the user to ask for its undeletion. Note: please
+make sure to read the bugs and limitations section at the end of this
+document.
+.TP
+.B x
+A file with the 'x' requests the use of direct access (dax) mode, if the
+kernel supports DAX. This can be overridden by the 'dax=never' mount
+option. For more information see the kernel documentation for dax:
+<https://www.kernel.org/doc/html/latest/filesystems/dax.html>.
+.IP
+If the attribute is set on an existing directory, it will be inherited
+by all files and subdirectories that are subsequently created in the
+directory. If an existing directory has contained some files and
+subdirectories, modifying the attribute on the parent directory doesn't
+change the attributes on these files and subdirectories.
+.TP
+.B V
+A file with the 'V' attribute set has fs-verity enabled. It cannot be
+written to, and the file system will automatically verify all data read
+from it against a cryptographic hash that covers the entire file's
+contents, e.g. via a Merkle tree. This makes it possible to efficiently
+authenticate the file. This attribute may not be set or cleared using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.PP
+.SH AUTHOR
+.B chattr
+was written by Remy Card <Remy.Card@linux.org>. It is currently being
+maintained by Theodore Ts'o <tytso@alum.mit.edu>.
+.SH BUGS AND LIMITATIONS
+The 'c', 's', and 'u' attributes are not honored
+by the ext2, ext3, and ext4 file systems as implemented in the current
+mainline Linux kernels.
+Setting 'a' and 'i' attributes will not affect the ability to write
+to already existing file descriptors.
+.PP
+The 'j' option is only useful for ext3 and ext4 file systems.
+.PP
+The 'D' option is only useful on Linux kernel 2.5.19 and later.
+.SH AVAILABILITY
+.B chattr
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR lsattr (1),
+.BR btrfs (5),
+.BR ext4 (5),
+.BR mkfs.f2fs (8),
+.BR xfs (5).
diff --git a/misc/chattr.c b/misc/chattr.c
new file mode 100644
index 0000000..c7382a3
--- /dev/null
+++ b/misc/chattr.c
@@ -0,0 +1,359 @@
+/*
+ * chattr.c - Change file attributes on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * This file can be redistributed under the terms of the GNU General
+ * Public License
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ * 93/11/13 - Replace stat() calls by lstat() to avoid loops
+ * 94/02/27 - Integrated in Ted's distribution
+ * 98/12/29 - Ignore symlinks when working recursively (G M Sipe)
+ * 98/12/29 - Display version info only when -V specified (G M Sipe)
+ */
+
+#define _LARGEFILE64_SOURCE
+
+#include "config.h"
+#include <sys/types.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/param.h>
+#include <sys/stat.h>
+#include "ext2fs/ext2_fs.h"
+
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
+#ifndef S_ISLNK /* So we can compile even with gcc-warn */
+# ifdef __S_IFLNK
+# define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
+# else
+# define S_ISLNK(mode) 0
+# endif
+#endif
+
+#include "et/com_err.h"
+#include "e2p/e2p.h"
+#include "support/nls-enable.h"
+
+#include "../version.h"
+
+static const char * program_name = "chattr";
+
+static int add;
+static int rem;
+static int set;
+static int set_version;
+
+static unsigned long version;
+
+static int set_project;
+static unsigned long project;
+
+static int recursive;
+static int verbose;
+static int silent;
+
+static unsigned long af;
+static unsigned long rf;
+static unsigned long sf;
+
+#ifdef _LFS64_LARGEFILE
+#define LSTAT lstat64
+#define STRUCT_STAT struct stat64
+#else
+#define LSTAT lstat
+#define STRUCT_STAT struct stat
+#endif
+
+static void usage(void)
+{
+ fprintf(stderr,
+ _("Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"),
+ program_name);
+ exit(1);
+}
+
+struct flags_char {
+ unsigned long flag;
+ char optchar;
+};
+
+static const struct flags_char flags_array[] = {
+ { EXT2_NOATIME_FL, 'A' },
+ { EXT2_SYNC_FL, 'S' },
+ { EXT2_DIRSYNC_FL, 'D' },
+ { EXT2_APPEND_FL, 'a' },
+ { EXT2_COMPR_FL, 'c' },
+ { EXT2_NOCOMPR_FL, 'm' },
+ { EXT2_NODUMP_FL, 'd' },
+ { EXT4_EXTENTS_FL, 'e'},
+ { EXT2_IMMUTABLE_FL, 'i' },
+ { EXT3_JOURNAL_DATA_FL, 'j' },
+ { EXT4_PROJINHERIT_FL, 'P' },
+ { EXT2_SECRM_FL, 's' },
+ { EXT2_UNRM_FL, 'u' },
+ { EXT2_NOTAIL_FL, 't' },
+ { EXT2_TOPDIR_FL, 'T' },
+ { FS_NOCOW_FL, 'C' },
+ { FS_DAX_FL, 'x' },
+ { EXT4_CASEFOLD_FL, 'F' },
+ { 0, 0 }
+};
+
+static unsigned long get_flag(char c)
+{
+ const struct flags_char *fp;
+
+ for (fp = flags_array; fp->flag != 0; fp++) {
+ if (fp->optchar == c)
+ return fp->flag;
+ }
+ return 0;
+}
+
+
+static int decode_arg (int * i, int argc, char ** argv)
+{
+ char * p;
+ char * tmp;
+ unsigned long fl;
+
+ switch (argv[*i][0])
+ {
+ case '-':
+ for (p = &argv[*i][1]; *p; p++) {
+ if (*p == 'R') {
+ recursive = 1;
+ continue;
+ }
+ if (*p == 'V') {
+ verbose = 1;
+ continue;
+ }
+ if (*p == 'f') {
+ silent = 1;
+ continue;
+ }
+ if (*p == 'p') {
+ (*i)++;
+ if (*i >= argc)
+ usage ();
+ project = strtol (argv[*i], &tmp, 0);
+ if (*tmp) {
+ com_err (program_name, 0,
+ _("bad project - %s\n"),
+ argv[*i]);
+ usage ();
+ }
+ set_project = 1;
+ continue;
+ }
+ if (*p == 'v') {
+ (*i)++;
+ if (*i >= argc)
+ usage ();
+ version = strtol (argv[*i], &tmp, 0);
+ if (*tmp) {
+ com_err (program_name, 0,
+ _("bad version - %s\n"),
+ argv[*i]);
+ usage ();
+ }
+ set_version = 1;
+ continue;
+ }
+ if ((fl = get_flag(*p)) == 0)
+ usage();
+ rf |= fl;
+ rem = 1;
+ }
+ break;
+ case '+':
+ add = 1;
+ for (p = &argv[*i][1]; *p; p++) {
+ if ((fl = get_flag(*p)) == 0)
+ usage();
+ af |= fl;
+ }
+ break;
+ case '=':
+ set = 1;
+ for (p = &argv[*i][1]; *p; p++) {
+ if ((fl = get_flag(*p)) == 0)
+ usage();
+ sf |= fl;
+ }
+ break;
+ default:
+ return EOF;
+ }
+ return 1;
+}
+
+static int chattr_dir_proc(const char *, struct dirent *, void *);
+
+static int change_attributes(const char * name)
+{
+ unsigned long flags;
+ STRUCT_STAT st;
+
+ if (LSTAT (name, &st) == -1) {
+ if (!silent)
+ com_err (program_name, errno,
+ _("while trying to stat %s"), name);
+ return -1;
+ }
+
+ if (fgetflags(name, &flags) == -1) {
+ if (!silent)
+ com_err(program_name, errno,
+ _("while reading flags on %s"), name);
+ return -1;
+ }
+ if (set) {
+ if (verbose) {
+ printf (_("Flags of %s set as "), name);
+ print_flags (stdout, sf, 0);
+ printf ("\n");
+ }
+ if (fsetflags (name, sf) == -1)
+ perror (name);
+ } else {
+ if (rem)
+ flags &= ~rf;
+ if (add)
+ flags |= af;
+ if (verbose) {
+ printf(_("Flags of %s set as "), name);
+ print_flags(stdout, flags, 0);
+ printf("\n");
+ }
+ if (!S_ISDIR(st.st_mode))
+ flags &= ~EXT2_DIRSYNC_FL;
+ if (fsetflags(name, flags) == -1) {
+ if (!silent) {
+ com_err(program_name, errno,
+ _("while setting flags on %s"),
+ name);
+ }
+ return -1;
+ }
+ }
+ if (set_version) {
+ if (verbose)
+ printf (_("Version of %s set as %lu\n"), name, version);
+ if (fsetversion (name, version) == -1) {
+ if (!silent)
+ com_err (program_name, errno,
+ _("while setting version on %s"),
+ name);
+ return -1;
+ }
+ }
+ if (set_project) {
+ if (verbose)
+ printf (_("Project of %s set as %lu\n"), name, project);
+ if (fsetproject (name, project) == -1) {
+ if (!silent)
+ com_err (program_name, errno,
+ _("while setting project on %s"),
+ name);
+ return -1;
+ }
+
+ }
+ if (S_ISDIR(st.st_mode) && recursive)
+ return iterate_on_dir (name, chattr_dir_proc, NULL);
+ return 0;
+}
+
+static int chattr_dir_proc (const char * dir_name, struct dirent * de,
+ void * private EXT2FS_ATTR((unused)))
+{
+ int ret = 0;
+
+ if (strcmp (de->d_name, ".") && strcmp (de->d_name, "..")) {
+ char *path;
+
+ path = malloc(strlen (dir_name) + 1 + strlen (de->d_name) + 1);
+ if (!path) {
+ fprintf(stderr, "%s",
+ _("Couldn't allocate path variable "
+ "in chattr_dir_proc"));
+ return -1;
+ }
+ sprintf(path, "%s/%s", dir_name, de->d_name);
+ ret = change_attributes(path);
+ free(path);
+ }
+ return ret;
+}
+
+int main (int argc, char ** argv)
+{
+ int i, j;
+ int end_arg = 0;
+ int err, retval = 0;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ if (argc && *argv)
+ program_name = *argv;
+ i = 1;
+ while (i < argc && !end_arg) {
+ /* '--' arg should end option processing */
+ if (strcmp(argv[i], "--") == 0) {
+ i++;
+ end_arg = 1;
+ } else if (decode_arg (&i, argc, argv) == EOF)
+ end_arg = 1;
+ else
+ i++;
+ }
+ if (i >= argc)
+ usage ();
+ if (set && (add || rem)) {
+ fputs(_("= is incompatible with - and +\n"), stderr);
+ exit (1);
+ }
+ if ((rf & af) != 0) {
+ fputs("Can't both set and unset same flag.\n", stderr);
+ exit (1);
+ }
+ if (!(add || rem || set || set_version || set_project )) {
+ fputs(_("Must use '-v', =, - or +\n"), stderr);
+ exit (1);
+ }
+ if (verbose)
+ fprintf (stderr, "chattr %s (%s)\n",
+ E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ for (j = i; j < argc; j++) {
+ err = change_attributes (argv[j]);
+ if (err)
+ retval = 1;
+ }
+ exit(retval);
+}
diff --git a/misc/check_fuzzer.c b/misc/check_fuzzer.c
new file mode 100644
index 0000000..cee21bf
--- /dev/null
+++ b/misc/check_fuzzer.c
@@ -0,0 +1,61 @@
+/*
+ * Play with a file system image quickly to find UBSAN problems
+ *
+ * Run a file system through some of the libext2fs functions used by
+ * some fuzzer reports.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include <ext2fs/ext2_fs.h>
+#include <ext2fs/ext2fs.h>
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0;
+ ext2_filsys fs;
+ int exit_status = 1;
+
+ initialize_ext2_error_table();
+
+ if (argc != 2) {
+ fprintf(stderr, "%s: Usage <device|filesystem>\n", argv[0]);
+ exit(1);
+ }
+
+ retval = ext2fs_open(argv[1], 0, 0, 0,
+ unix_io_manager, &fs);
+ if (retval) {
+ com_err(argv[0], retval, "while trying to open '%s'",
+ argv[1]);
+ exit(1);
+ }
+
+ retval = ext2fs_read_inode_bitmap(fs);
+ if (retval) {
+ com_err(argv[0], retval, "while trying to read inode bitmaps");
+ goto errout;
+ }
+
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval) {
+ com_err(argv[0], retval, "while trying to read inode bitmaps");
+ goto errout;
+ }
+
+ retval = ext2fs_check_directory(fs, EXT2_ROOT_INO);
+ if (retval) {
+ com_err(argv[0], retval, "while trying to read inode bitmaps");
+ goto errout;
+ }
+ exit_status = 0;
+errout:
+ ext2fs_close(fs);
+ return exit_status;
+}
diff --git a/misc/create_inode.c b/misc/create_inode.c
new file mode 100644
index 0000000..a3a34cd
--- /dev/null
+++ b/misc/create_inode.c
@@ -0,0 +1,1092 @@
+/*
+ * create_inode.c --- create an inode
+ *
+ * Copyright (C) 2014 Robert Yang <liezhi.yang@windriver.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
+#define _FILE_OFFSET_BITS 64
+#define _LARGEFILE64_SOURCE 1
+#define _GNU_SOURCE 1
+
+#include "config.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <limits.h> /* for PATH_MAX */
+#include <dirent.h> /* for scandir() and alphasort() */
+#if defined HAVE_SYS_XATTR_H
+#include <sys/xattr.h>
+#elif defined HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+
+#include <ext2fs/ext2fs.h>
+#include <ext2fs/ext2_types.h>
+#include <ext2fs/fiemap.h>
+
+#include "create_inode.h"
+#include "support/nls-enable.h"
+
+/* 64KiB is the minimum blksize to best minimize system call overhead. */
+#define COPY_FILE_BUFLEN 65536
+
+static int ext2_file_type(unsigned int mode)
+{
+ if (LINUX_S_ISREG(mode))
+ return EXT2_FT_REG_FILE;
+
+ if (LINUX_S_ISDIR(mode))
+ return EXT2_FT_DIR;
+
+ if (LINUX_S_ISCHR(mode))
+ return EXT2_FT_CHRDEV;
+
+ if (LINUX_S_ISBLK(mode))
+ return EXT2_FT_BLKDEV;
+
+ if (LINUX_S_ISLNK(mode))
+ return EXT2_FT_SYMLINK;
+
+ if (LINUX_S_ISFIFO(mode))
+ return EXT2_FT_FIFO;
+
+ if (LINUX_S_ISSOCK(mode))
+ return EXT2_FT_SOCK;
+
+ return 0;
+}
+
+/* Link an inode number to a directory */
+static errcode_t add_link(ext2_filsys fs, ext2_ino_t parent_ino,
+ ext2_ino_t ino, const char *name)
+{
+ struct ext2_inode inode;
+ errcode_t retval;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(__func__, retval, _("while reading inode %u"), ino);
+ return retval;
+ }
+
+ retval = ext2fs_link(fs, parent_ino, name, ino,
+ ext2_file_type(inode.i_mode));
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ retval = ext2fs_expand_dir(fs, parent_ino);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while expanding directory"));
+ return retval;
+ }
+ retval = ext2fs_link(fs, parent_ino, name, ino,
+ ext2_file_type(inode.i_mode));
+ }
+ if (retval) {
+ com_err(__func__, retval, _("while linking \"%s\""), name);
+ return retval;
+ }
+
+ inode.i_links_count++;
+
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ com_err(__func__, retval, _("while writing inode %u"), ino);
+
+ return retval;
+}
+
+/* Set the uid, gid, mode and time for the inode */
+static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t ino,
+ struct stat *st)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(__func__, retval, _("while reading inode %u"), ino);
+ return retval;
+ }
+
+ inode.i_uid = st->st_uid;
+ ext2fs_set_i_uid_high(inode, st->st_uid >> 16);
+ inode.i_gid = st->st_gid;
+ ext2fs_set_i_gid_high(inode, st->st_gid >> 16);
+ inode.i_mode = (LINUX_S_IFMT & inode.i_mode) | (~S_IFMT & st->st_mode);
+ inode.i_atime = st->st_atime;
+ inode.i_mtime = st->st_mtime;
+ inode.i_ctime = st->st_ctime;
+
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ com_err(__func__, retval, _("while writing inode %u"), ino);
+ return retval;
+}
+
+#ifdef HAVE_LLISTXATTR
+static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
+ const char *filename)
+{
+ errcode_t retval, close_retval;
+ struct ext2_xattr_handle *handle;
+ ssize_t size, value_size;
+ char *list = NULL;
+ int i;
+
+ if (no_copy_xattrs)
+ return 0;
+
+ size = llistxattr(filename, NULL, 0);
+ if (size == -1) {
+ if (errno == ENOTSUP)
+ return 0;
+ retval = errno;
+ com_err(__func__, retval, _("while listing attributes of \"%s\""),
+ filename);
+ return retval;
+ } else if (size == 0) {
+ return 0;
+ }
+
+ retval = ext2fs_xattrs_open(fs, ino, &handle);
+ if (retval) {
+ if (retval == EXT2_ET_MISSING_EA_FEATURE)
+ return 0;
+ com_err(__func__, retval, _("while opening inode %u"), ino);
+ return retval;
+ }
+
+ retval = ext2fs_xattrs_read(handle);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while reading xattrs for inode %u"), ino);
+ goto out;
+ }
+
+ retval = ext2fs_get_mem(size, &list);
+ if (retval) {
+ com_err(__func__, retval, _("while allocating memory"));
+ goto out;
+ }
+
+ size = llistxattr(filename, list, size);
+ if (size == -1) {
+ retval = errno;
+ com_err(__func__, retval, _("while listing attributes of \"%s\""),
+ filename);
+ goto out;
+ }
+
+ for (i = 0; i < size; i += strlen(&list[i]) + 1) {
+ const char *name = &list[i];
+ char *value;
+
+ value_size = lgetxattr(filename, name, NULL, 0);
+ if (value_size == -1) {
+ retval = errno;
+ com_err(__func__, retval,
+ _("while reading attribute \"%s\" of \"%s\""),
+ name, filename);
+ break;
+ }
+
+ retval = ext2fs_get_mem(value_size, &value);
+ if (retval) {
+ com_err(__func__, retval, _("while allocating memory"));
+ break;
+ }
+
+ value_size = lgetxattr(filename, name, value, value_size);
+ if (value_size == -1) {
+ ext2fs_free_mem(&value);
+ retval = errno;
+ com_err(__func__, retval,
+ _("while reading attribute \"%s\" of \"%s\""),
+ name, filename);
+ break;
+ }
+
+ retval = ext2fs_xattr_set(handle, name, value, value_size);
+ ext2fs_free_mem(&value);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while writing attribute \"%s\" to inode %u"),
+ name, ino);
+ break;
+ }
+
+ }
+ out:
+ ext2fs_free_mem(&list);
+ close_retval = ext2fs_xattrs_close(&handle);
+ if (close_retval) {
+ com_err(__func__, retval, _("while closing inode %u"), ino);
+ retval = retval ? retval : close_retval;
+ }
+ return retval;
+}
+#else /* HAVE_LLISTXATTR */
+static errcode_t set_inode_xattr(ext2_filsys fs EXT2FS_ATTR((unused)),
+ ext2_ino_t ino EXT2FS_ATTR((unused)),
+ const char *filename EXT2FS_ATTR((unused)))
+{
+ return 0;
+}
+#endif /* HAVE_LLISTXATTR */
+
+#ifndef _WIN32
+/* Make a special files (block and character devices), fifo's, and sockets */
+errcode_t do_mknod_internal(ext2_filsys fs, ext2_ino_t cwd, const char *name,
+ unsigned int st_mode, unsigned int st_rdev)
+{
+ ext2_ino_t ino;
+ errcode_t retval;
+ struct ext2_inode inode;
+ unsigned long devmajor, devminor, mode;
+ int filetype;
+
+ switch(st_mode & S_IFMT) {
+ case S_IFCHR:
+ mode = LINUX_S_IFCHR;
+ filetype = EXT2_FT_CHRDEV;
+ break;
+ case S_IFBLK:
+ mode = LINUX_S_IFBLK;
+ filetype = EXT2_FT_BLKDEV;
+ break;
+ case S_IFIFO:
+ mode = LINUX_S_IFIFO;
+ filetype = EXT2_FT_FIFO;
+ break;
+#ifndef _WIN32
+ case S_IFSOCK:
+ mode = LINUX_S_IFSOCK;
+ filetype = EXT2_FT_SOCK;
+ break;
+#endif
+ default:
+ return EXT2_ET_INVALID_ARGUMENT;
+ }
+
+ retval = ext2fs_new_inode(fs, cwd, 010755, 0, &ino);
+ if (retval) {
+ com_err(__func__, retval, _("while allocating inode \"%s\""),
+ name);
+ return retval;
+ }
+
+#ifdef DEBUGFS
+ printf("Allocated inode: %u\n", ino);
+#endif
+ retval = ext2fs_link(fs, cwd, name, ino, filetype);
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ retval = ext2fs_expand_dir(fs, cwd);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while expanding directory"));
+ return retval;
+ }
+ retval = ext2fs_link(fs, cwd, name, ino, filetype);
+ }
+ if (retval) {
+ com_err(name, retval, _("while creating inode \"%s\""), name);
+ return retval;
+ }
+ if (ext2fs_test_inode_bitmap2(fs->inode_map, ino))
+ com_err(__func__, 0, "Warning: inode already set");
+ ext2fs_inode_alloc_stats2(fs, ino, +1, 0);
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = mode;
+ inode.i_atime = inode.i_ctime = inode.i_mtime =
+ fs->now ? fs->now : time(0);
+
+ if (filetype != S_IFIFO) {
+ devmajor = major(st_rdev);
+ devminor = minor(st_rdev);
+
+ if ((devmajor < 256) && (devminor < 256)) {
+ inode.i_block[0] = devmajor * 256 + devminor;
+ inode.i_block[1] = 0;
+ } else {
+ inode.i_block[0] = 0;
+ inode.i_block[1] = (devminor & 0xff) | (devmajor << 8) |
+ ((devminor & ~0xff) << 12);
+ }
+ }
+ inode.i_links_count = 1;
+
+ retval = ext2fs_write_new_inode(fs, ino, &inode);
+ if (retval)
+ com_err(__func__, retval, _("while writing inode %u"), ino);
+
+ return retval;
+}
+#endif
+
+/* Make a symlink name -> target */
+errcode_t do_symlink_internal(ext2_filsys fs, ext2_ino_t cwd, const char *name,
+ char *target, ext2_ino_t root)
+{
+ char *cp;
+ ext2_ino_t parent_ino;
+ errcode_t retval;
+
+ cp = strrchr(name, '/');
+ if (cp) {
+ *cp = 0;
+ retval = ext2fs_namei(fs, root, cwd, name, &parent_ino);
+ if (retval) {
+ com_err(name, retval, 0);
+ return retval;
+ }
+ name = cp+1;
+ } else
+ parent_ino = cwd;
+
+ retval = ext2fs_symlink(fs, parent_ino, 0, name, target);
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ retval = ext2fs_expand_dir(fs, parent_ino);
+ if (retval) {
+ com_err("do_symlink_internal", retval,
+ _("while expanding directory"));
+ return retval;
+ }
+ retval = ext2fs_symlink(fs, parent_ino, 0, name, target);
+ }
+ if (retval)
+ com_err("ext2fs_symlink", retval,
+ _("while creating symlink \"%s\""), name);
+ return retval;
+}
+
+/* Make a directory in the fs */
+errcode_t do_mkdir_internal(ext2_filsys fs, ext2_ino_t cwd, const char *name,
+ ext2_ino_t root)
+{
+ char *cp;
+ ext2_ino_t parent_ino;
+ errcode_t retval;
+
+
+ cp = strrchr(name, '/');
+ if (cp) {
+ *cp = 0;
+ retval = ext2fs_namei(fs, root, cwd, name, &parent_ino);
+ if (retval) {
+ com_err(name, retval, _("while looking up \"%s\""),
+ name);
+ return retval;
+ }
+ name = cp+1;
+ } else
+ parent_ino = cwd;
+
+ retval = ext2fs_mkdir(fs, parent_ino, 0, name);
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ retval = ext2fs_expand_dir(fs, parent_ino);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while expanding directory"));
+ return retval;
+ }
+ retval = ext2fs_mkdir(fs, parent_ino, 0, name);
+ }
+ if (retval)
+ com_err("ext2fs_mkdir", retval,
+ _("while creating directory \"%s\""), name);
+ return retval;
+}
+
+#if !defined HAVE_PREAD64 && !defined HAVE_PREAD
+static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
+{
+ if (lseek(fd, offset, SEEK_SET) < 0)
+ return 0;
+
+ return read(fd, buf, count);
+}
+#endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
+
+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file,
+ off_t start, off_t end, char *buf,
+ char *zerobuf)
+{
+ off_t off, bpos;
+ ssize_t got, blen;
+ unsigned int written;
+ char *ptr;
+ errcode_t err = 0;
+
+ for (off = start; off < end; off += COPY_FILE_BUFLEN) {
+#ifdef HAVE_PREAD64
+ got = pread64(fd, buf, COPY_FILE_BUFLEN, off);
+#elif HAVE_PREAD
+ got = pread(fd, buf, COPY_FILE_BUFLEN, off);
+#else
+ got = my_pread(fd, buf, COPY_FILE_BUFLEN, off);
+#endif
+ if (got < 0) {
+ err = errno;
+ goto fail;
+ }
+ for (bpos = 0, ptr = buf; bpos < got; bpos += fs->blocksize) {
+ blen = fs->blocksize;
+ if (blen > got - bpos)
+ blen = got - bpos;
+ if (memcmp(ptr, zerobuf, blen) == 0) {
+ ptr += blen;
+ continue;
+ }
+ err = ext2fs_file_llseek(e2_file, off + bpos,
+ EXT2_SEEK_SET, NULL);
+ if (err)
+ goto fail;
+ while (blen > 0) {
+ err = ext2fs_file_write(e2_file, ptr, blen,
+ &written);
+ if (err)
+ goto fail;
+ if (written == 0) {
+ err = EIO;
+ goto fail;
+ }
+ blen -= written;
+ ptr += written;
+ }
+ }
+ }
+fail:
+ return err;
+}
+
+#if defined(SEEK_DATA) && defined(SEEK_HOLE)
+static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf,
+ ext2_file_t e2_file, char *buf, char *zerobuf)
+{
+ off_t data = 0, hole;
+ off_t data_blk, hole_blk;
+ errcode_t err = 0;
+
+ /* Try to use SEEK_DATA and SEEK_HOLE */
+ while (data < statbuf->st_size) {
+ data = lseek(fd, data, SEEK_DATA);
+ if (data < 0) {
+ if (errno == ENXIO)
+ break;
+ return EXT2_ET_UNIMPLEMENTED;
+ }
+ hole = lseek(fd, data, SEEK_HOLE);
+ if (hole < 0)
+ return EXT2_ET_UNIMPLEMENTED;
+
+ data_blk = data & ~(off_t)(fs->blocksize - 1);
+ hole_blk = ((hole + (off_t)(fs->blocksize - 1)) &
+ ~(off_t)(fs->blocksize - 1));
+ err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf,
+ zerobuf);
+ if (err)
+ return err;
+
+ data = hole;
+ }
+
+ return err;
+}
+#endif /* SEEK_DATA and SEEK_HOLE */
+
+#if defined(FS_IOC_FIEMAP)
+static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file,
+ char *buf, char *zerobuf)
+{
+#define EXTENT_MAX_COUNT 512
+ struct fiemap *fiemap_buf;
+ struct fiemap_extent *ext_buf, *ext;
+ int ext_buf_size, fie_buf_size;
+ off_t pos = 0;
+ unsigned int i;
+ errcode_t err;
+
+ ext_buf_size = EXTENT_MAX_COUNT * sizeof(struct fiemap_extent);
+ fie_buf_size = sizeof(struct fiemap) + ext_buf_size;
+
+ err = ext2fs_get_memzero(fie_buf_size, &fiemap_buf);
+ if (err)
+ return err;
+
+ ext_buf = fiemap_buf->fm_extents;
+ memset(fiemap_buf, 0, fie_buf_size);
+ fiemap_buf->fm_length = FIEMAP_MAX_OFFSET;
+ fiemap_buf->fm_flags |= FIEMAP_FLAG_SYNC;
+ fiemap_buf->fm_extent_count = EXTENT_MAX_COUNT;
+
+ do {
+ fiemap_buf->fm_start = pos;
+ memset(ext_buf, 0, ext_buf_size);
+ err = ioctl(fd, FS_IOC_FIEMAP, fiemap_buf);
+ if (err < 0 && (errno == EOPNOTSUPP || errno == ENOTTY)) {
+ err = EXT2_ET_UNIMPLEMENTED;
+ goto out;
+ } else if (err < 0) {
+ err = errno;
+ goto out;
+ } else if (fiemap_buf->fm_mapped_extents == 0)
+ goto out;
+ for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
+ i++, ext++) {
+ err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical,
+ ext->fe_logical + ext->fe_length,
+ buf, zerobuf);
+ if (err)
+ goto out;
+ }
+
+ ext--;
+ /* Record file's logical offset this time */
+ pos = ext->fe_logical + ext->fe_length;
+ /*
+ * If fm_extents array has been filled and
+ * there are extents left, continue to cycle.
+ */
+ } while (fiemap_buf->fm_mapped_extents == EXTENT_MAX_COUNT &&
+ !(ext->fe_flags & FIEMAP_EXTENT_LAST));
+out:
+ ext2fs_free_mem(&fiemap_buf);
+ return err;
+}
+#endif /* FS_IOC_FIEMAP */
+
+static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
+ ext2_ino_t ino)
+{
+ ext2_file_t e2_file;
+ char *buf = NULL, *zerobuf = NULL;
+ errcode_t err, close_err;
+
+ err = ext2fs_file_open(fs, ino, EXT2_FILE_WRITE, &e2_file);
+ if (err)
+ return err;
+
+ err = ext2fs_get_mem(COPY_FILE_BUFLEN, &buf);
+ if (err)
+ goto out;
+
+ err = ext2fs_get_memzero(fs->blocksize, &zerobuf);
+ if (err)
+ goto out;
+
+#if defined(SEEK_DATA) && defined(SEEK_HOLE)
+ err = try_lseek_copy(fs, fd, statbuf, e2_file, buf, zerobuf);
+ if (err != EXT2_ET_UNIMPLEMENTED)
+ goto out;
+#endif
+
+#if defined(FS_IOC_FIEMAP)
+ err = try_fiemap_copy(fs, fd, e2_file, buf, zerobuf);
+ if (err != EXT2_ET_UNIMPLEMENTED)
+ goto out;
+#endif
+
+ err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf,
+ zerobuf);
+out:
+ ext2fs_free_mem(&zerobuf);
+ ext2fs_free_mem(&buf);
+ close_err = ext2fs_file_close(e2_file);
+ if (err == 0)
+ err = close_err;
+ return err;
+}
+
+static int is_hardlink(struct hdlinks_s *hdlinks, dev_t dev, ino_t ino)
+{
+ int i;
+
+ for (i = 0; i < hdlinks->count; i++) {
+ if (hdlinks->hdl[i].src_dev == dev &&
+ hdlinks->hdl[i].src_ino == ino)
+ return i;
+ }
+ return -1;
+}
+
+/* Copy the native file to the fs */
+errcode_t do_write_internal(ext2_filsys fs, ext2_ino_t cwd, const char *src,
+ const char *dest, ext2_ino_t root)
+{
+ int fd;
+ struct stat statbuf;
+ ext2_ino_t newfile, parent_ino;
+ errcode_t retval;
+ struct ext2_inode inode;
+ char *cp;
+
+ fd = ext2fs_open_file(src, O_RDONLY, 0);
+ if (fd < 0) {
+ retval = errno;
+ com_err(__func__, retval, _("while opening \"%s\" to copy"),
+ src);
+ return retval;
+ }
+ if (fstat(fd, &statbuf) < 0) {
+ retval = errno;
+ goto out;
+ }
+
+ cp = strrchr(dest, '/');
+ if (cp) {
+ *cp = 0;
+ retval = ext2fs_namei(fs, root, cwd, dest, &parent_ino);
+ if (retval) {
+ com_err(dest, retval, _("while looking up \"%s\""),
+ dest);
+ goto out;
+ }
+ dest = cp+1;
+ } else
+ parent_ino = cwd;
+
+ retval = ext2fs_namei(fs, root, parent_ino, dest, &newfile);
+ if (retval == 0) {
+ retval = EXT2_ET_FILE_EXISTS;
+ goto out;
+ }
+
+ retval = ext2fs_new_inode(fs, parent_ino, 010755, 0, &newfile);
+ if (retval)
+ goto out;
+#ifdef DEBUGFS
+ printf("Allocated inode: %u\n", newfile);
+#endif
+ retval = ext2fs_link(fs, parent_ino, dest, newfile, EXT2_FT_REG_FILE);
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ retval = ext2fs_expand_dir(fs, parent_ino);
+ if (retval)
+ goto out;
+ retval = ext2fs_link(fs, parent_ino, dest, newfile,
+ EXT2_FT_REG_FILE);
+ }
+ if (retval)
+ goto out;
+ if (ext2fs_test_inode_bitmap2(fs->inode_map, newfile))
+ com_err(__func__, 0, "Warning: inode already set");
+ ext2fs_inode_alloc_stats2(fs, newfile, +1, 0);
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = (statbuf.st_mode & ~S_IFMT) | LINUX_S_IFREG;
+ inode.i_atime = inode.i_ctime = inode.i_mtime =
+ fs->now ? fs->now : time(0);
+ inode.i_links_count = 1;
+ retval = ext2fs_inode_size_set(fs, &inode, statbuf.st_size);
+ if (retval)
+ goto out;
+ if (ext2fs_has_feature_inline_data(fs->super)) {
+ inode.i_flags |= EXT4_INLINE_DATA_FL;
+ } else if (ext2fs_has_feature_extents(fs->super)) {
+ ext2_extent_handle_t handle;
+
+ inode.i_flags &= ~EXT4_EXTENTS_FL;
+ retval = ext2fs_extent_open2(fs, newfile, &inode, &handle);
+ if (retval)
+ goto out;
+ ext2fs_extent_free(handle);
+ }
+
+ retval = ext2fs_write_new_inode(fs, newfile, &inode);
+ if (retval)
+ goto out;
+ if (inode.i_flags & EXT4_INLINE_DATA_FL) {
+ retval = ext2fs_inline_data_init(fs, newfile);
+ if (retval)
+ goto out;
+ }
+ if (LINUX_S_ISREG(inode.i_mode)) {
+ retval = copy_file(fs, fd, &statbuf, newfile);
+ if (retval)
+ goto out;
+ }
+out:
+ close(fd);
+ return retval;
+}
+
+struct file_info {
+ char *path;
+ size_t path_len;
+ size_t path_max_len;
+};
+
+static errcode_t path_append(struct file_info *target, const char *file)
+{
+ if (strlen(file) + target->path_len + 1 > target->path_max_len) {
+ void *p;
+ target->path_max_len *= 2;
+ p = realloc(target->path, target->path_max_len);
+ if (p == NULL)
+ return EXT2_ET_NO_MEMORY;
+ target->path = p;
+ }
+ target->path_len += sprintf(target->path + target->path_len, "/%s",
+ file);
+ return 0;
+}
+
+#ifdef _WIN32
+static int scandir(const char *dir_name, struct dirent ***name_list,
+ int (*filter)(const struct dirent*),
+ int (*compar)(const struct dirent**, const struct dirent**)) {
+ DIR *dir;
+ struct dirent *dent;
+ struct dirent **temp_list = NULL;
+ size_t temp_list_size = 0; // unit: num of dirent
+ size_t num_dent = 0;
+
+ dir = opendir(dir_name);
+ if (dir == NULL) {
+ return -1;
+ }
+
+ while ((dent = readdir(dir))) {
+ if (filter != NULL && !(*filter)(dent))
+ continue;
+
+ // re-allocate the list
+ if (num_dent == temp_list_size) {
+ size_t new_list_size = temp_list_size + 32;
+ struct dirent **new_list = (struct dirent**)realloc(
+ temp_list, new_list_size * sizeof(struct dirent*));
+ if (new_list == NULL)
+ goto out_err;
+ temp_list_size = new_list_size;
+ temp_list = new_list;
+ }
+ // add the copy of dirent to the list
+ temp_list[num_dent] = (struct dirent*)malloc((dent->d_reclen + 3) & ~3);
+ if (!temp_list[num_dent])
+ goto out_err;
+ memcpy(temp_list[num_dent], dent, dent->d_reclen);
+ num_dent++;
+ }
+ closedir(dir);
+
+ if (compar != NULL) {
+ qsort(temp_list, num_dent, sizeof(struct dirent*),
+ (int (*)(const void*, const void*))compar);
+ }
+ *name_list = temp_list;
+ return num_dent;
+
+out_err:
+ closedir(dir);
+ while (num_dent > 0)
+ free(temp_list[--num_dent]);
+ free(temp_list);
+ return -1;
+}
+
+static int alphasort(const struct dirent **a, const struct dirent **b) {
+ return strcoll((*a)->d_name, (*b)->d_name);
+}
+#endif
+
+/* Copy files from source_dir to fs in alphabetical order */
+static errcode_t __populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
+ const char *source_dir, ext2_ino_t root,
+ struct hdlinks_s *hdlinks,
+ struct file_info *target,
+ struct fs_ops_callbacks *fs_callbacks)
+{
+ const char *name;
+ struct dirent **dent;
+ struct stat st;
+ unsigned int save_inode;
+ ext2_ino_t ino;
+ errcode_t retval = 0;
+ int hdlink;
+ size_t cur_dir_path_len;
+ int i, num_dents;
+
+ if (chdir(source_dir) < 0) {
+ retval = errno;
+ com_err(__func__, retval,
+ _("while changing working directory to \"%s\""),
+ source_dir);
+ return retval;
+ }
+
+ num_dents = scandir(".", &dent, NULL, alphasort);
+
+ if (num_dents < 0) {
+ retval = errno;
+ com_err(__func__, retval,
+ _("while scanning directory \"%s\""), source_dir);
+ return retval;
+ }
+
+ for (i = 0; i < num_dents; free(dent[i]), i++) {
+ name = dent[i]->d_name;
+ if ((!strcmp(name, ".")) || (!strcmp(name, "..")))
+ continue;
+ if (lstat(name, &st)) {
+ retval = errno;
+ com_err(__func__, retval, _("while lstat \"%s\""),
+ name);
+ goto out;
+ }
+
+ /* Check for hardlinks */
+ save_inode = 0;
+ if (!S_ISDIR(st.st_mode) && !S_ISLNK(st.st_mode) &&
+ st.st_nlink > 1) {
+ hdlink = is_hardlink(hdlinks, st.st_dev, st.st_ino);
+ if (hdlink >= 0) {
+ retval = add_link(fs, parent_ino,
+ hdlinks->hdl[hdlink].dst_ino,
+ name);
+ if (retval) {
+ com_err(__func__, retval,
+ "while linking %s", name);
+ goto out;
+ }
+ continue;
+ } else
+ save_inode = 1;
+ }
+
+ cur_dir_path_len = target->path_len;
+ retval = path_append(target, name);
+ if (retval) {
+ com_err(__func__, retval,
+ "while appending %s", name);
+ goto out;
+ }
+
+ if (fs_callbacks && fs_callbacks->create_new_inode) {
+ retval = fs_callbacks->create_new_inode(fs,
+ target->path, name, parent_ino, root,
+ st.st_mode & S_IFMT);
+ if (retval)
+ goto out;
+ }
+
+ switch(st.st_mode & S_IFMT) {
+ case S_IFCHR:
+ case S_IFBLK:
+ case S_IFIFO:
+#ifndef _WIN32
+ case S_IFSOCK:
+ retval = do_mknod_internal(fs, parent_ino, name,
+ st.st_mode, st.st_rdev);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while creating special file "
+ "\"%s\""), name);
+ goto out;
+ }
+ break;
+ case S_IFLNK: {
+ char *ln_target;
+ int read_cnt;
+
+ ln_target = malloc(st.st_size + 1);
+ if (ln_target == NULL) {
+ com_err(__func__, retval,
+ _("malloc failed"));
+ goto out;
+ }
+ read_cnt = readlink(name, ln_target,
+ st.st_size + 1);
+ if (read_cnt == -1) {
+ retval = errno;
+ com_err(__func__, retval,
+ _("while trying to read link \"%s\""),
+ name);
+ free(ln_target);
+ goto out;
+ }
+ if (read_cnt > st.st_size) {
+ com_err(__func__, retval,
+ _("symlink increased in size "
+ "between lstat() and readlink()"));
+ free(ln_target);
+ goto out;
+ }
+ ln_target[read_cnt] = '\0';
+ retval = do_symlink_internal(fs, parent_ino, name,
+ ln_target, root);
+ free(ln_target);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while writing symlink\"%s\""),
+ name);
+ goto out;
+ }
+ break;
+ }
+#endif /* !_WIN32 */
+ case S_IFREG:
+ retval = do_write_internal(fs, parent_ino, name, name,
+ root);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while writing file \"%s\""), name);
+ goto out;
+ }
+ break;
+ case S_IFDIR:
+ /* Don't choke on /lost+found */
+ if (parent_ino == EXT2_ROOT_INO &&
+ strcmp(name, "lost+found") == 0)
+ goto find_lnf;
+ retval = do_mkdir_internal(fs, parent_ino, name,
+ root);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while making dir \"%s\""), name);
+ goto out;
+ }
+find_lnf:
+ retval = ext2fs_namei(fs, root, parent_ino,
+ name, &ino);
+ if (retval) {
+ com_err(name, retval, 0);
+ goto out;
+ }
+ /* Populate the dir recursively*/
+ retval = __populate_fs(fs, ino, name, root, hdlinks,
+ target, fs_callbacks);
+ if (retval)
+ goto out;
+ if (chdir("..")) {
+ retval = errno;
+ com_err(__func__, retval,
+ _("while changing directory"));
+ goto out;
+ }
+ break;
+ default:
+ com_err(__func__, 0,
+ _("ignoring entry \"%s\""), name);
+ }
+
+ retval = ext2fs_namei(fs, root, parent_ino, name, &ino);
+ if (retval) {
+ com_err(name, retval, _("while looking up \"%s\""),
+ name);
+ goto out;
+ }
+
+ retval = set_inode_extra(fs, ino, &st);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while setting inode for \"%s\""), name);
+ goto out;
+ }
+
+ retval = set_inode_xattr(fs, ino, name);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while setting xattrs for \"%s\""), name);
+ goto out;
+ }
+
+ if (fs_callbacks && fs_callbacks->end_create_new_inode) {
+ retval = fs_callbacks->end_create_new_inode(fs,
+ target->path, name, parent_ino, root,
+ st.st_mode & S_IFMT);
+ if (retval)
+ goto out;
+ }
+
+ /* Save the hardlink ino */
+ if (save_inode) {
+ /*
+ * Check whether need more memory, and we don't need
+ * free() since the lifespan will be over after the fs
+ * populated.
+ */
+ if (hdlinks->count == hdlinks->size) {
+ void *p = realloc(hdlinks->hdl,
+ (hdlinks->size + HDLINK_CNT) *
+ sizeof(struct hdlink_s));
+ if (p == NULL) {
+ retval = EXT2_ET_NO_MEMORY;
+ com_err(name, retval,
+ _("while saving inode data"));
+ goto out;
+ }
+ hdlinks->hdl = p;
+ hdlinks->size += HDLINK_CNT;
+ }
+ hdlinks->hdl[hdlinks->count].src_dev = st.st_dev;
+ hdlinks->hdl[hdlinks->count].src_ino = st.st_ino;
+ hdlinks->hdl[hdlinks->count].dst_ino = ino;
+ hdlinks->count++;
+ }
+ target->path_len = cur_dir_path_len;
+ target->path[target->path_len] = 0;
+ }
+
+out:
+ for (; i < num_dents; free(dent[i]), i++);
+ free(dent);
+ return retval;
+}
+
+errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t parent_ino,
+ const char *source_dir, ext2_ino_t root,
+ struct fs_ops_callbacks *fs_callbacks)
+{
+ struct file_info file_info;
+ struct hdlinks_s hdlinks;
+ errcode_t retval;
+
+ if (!(fs->flags & EXT2_FLAG_RW)) {
+ com_err(__func__, 0, "Filesystem opened readonly");
+ return EROFS;
+ }
+
+ hdlinks.count = 0;
+ hdlinks.size = HDLINK_CNT;
+ hdlinks.hdl = realloc(NULL, hdlinks.size * sizeof(struct hdlink_s));
+ if (hdlinks.hdl == NULL) {
+ retval = errno;
+ com_err(__func__, retval, _("while allocating memory"));
+ return retval;
+ }
+
+ file_info.path_len = 0;
+ file_info.path_max_len = 255;
+ file_info.path = calloc(file_info.path_max_len, 1);
+
+ retval = set_inode_xattr(fs, root, source_dir);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while copying xattrs on root directory"));
+ goto out;
+ }
+
+ retval = __populate_fs(fs, parent_ino, source_dir, root, &hdlinks,
+ &file_info, fs_callbacks);
+
+out:
+ free(file_info.path);
+ free(hdlinks.hdl);
+ return retval;
+}
+
+errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
+ const char *source_dir, ext2_ino_t root)
+{
+ return populate_fs2(fs, parent_ino, source_dir, root, NULL);
+}
diff --git a/misc/create_inode.h b/misc/create_inode.h
new file mode 100644
index 0000000..b5eeb42
--- /dev/null
+++ b/misc/create_inode.h
@@ -0,0 +1,57 @@
+#ifndef _CREATE_INODE_H
+#define _CREATE_INODE_H
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include "et/com_err.h"
+#include "e2p/e2p.h"
+#include "ext2fs/ext2fs.h"
+
+struct hdlink_s
+{
+ dev_t src_dev;
+ ino_t src_ino;
+ ext2_ino_t dst_ino;
+};
+
+struct hdlinks_s
+{
+ int count;
+ int size;
+ struct hdlink_s *hdl;
+};
+
+#define HDLINK_CNT (4)
+
+struct fs_ops_callbacks {
+ errcode_t (* create_new_inode)(ext2_filsys fs, const char *target_path,
+ const char *name, ext2_ino_t parent_ino, ext2_ino_t root,
+ mode_t mode);
+ errcode_t (* end_create_new_inode)(ext2_filsys fs,
+ const char *target_path, const char *name,
+ ext2_ino_t parent_ino, ext2_ino_t root, mode_t mode);
+};
+
+extern int no_copy_xattrs; /* this should eventually be a flag
+ passed to populate_fs3() */
+
+/* For populating the filesystem */
+extern errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
+ const char *source_dir, ext2_ino_t root);
+extern errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t parent_ino,
+ const char *source_dir, ext2_ino_t root,
+ struct fs_ops_callbacks *fs_callbacks);
+extern errcode_t do_mknod_internal(ext2_filsys fs, ext2_ino_t cwd,
+ const char *name, unsigned int st_mode,
+ unsigned int st_rdev);
+extern errcode_t do_symlink_internal(ext2_filsys fs, ext2_ino_t cwd,
+ const char *name, char *target,
+ ext2_ino_t root);
+extern errcode_t do_mkdir_internal(ext2_filsys fs, ext2_ino_t cwd,
+ const char *name, ext2_ino_t root);
+extern errcode_t do_write_internal(ext2_filsys fs, ext2_ino_t cwd,
+ const char *src, const char *dest,
+ ext2_ino_t root);
+
+#endif /* _CREATE_INODE_H */
diff --git a/misc/dumpe2fs.8.in b/misc/dumpe2fs.8.in
new file mode 100644
index 0000000..dd27804
--- /dev/null
+++ b/misc/dumpe2fs.8.in
@@ -0,0 +1,115 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH DUMPE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+dumpe2fs \- dump ext2/ext3/ext4 file system information
+.SH SYNOPSIS
+.B dumpe2fs
+[
+.B \-bfghixV
+]
+[
+.B \-o superblock=\fIsuperblock
+]
+[
+.B \-o blocksize=\fIblocksize
+]
+.I device
+.SH DESCRIPTION
+.B dumpe2fs
+prints the super block and blocks group information for the file system
+present on
+.I device.
+.PP
+.B Note:
+When used with a mounted file system, the printed
+information may be old or inconsistent.
+.SH OPTIONS
+.TP
+.B \-b
+print the blocks which are reserved as bad in the file system.
+.TP
+.B \-o superblock=\fIsuperblock
+use the block
+.I superblock
+when examining the file system.
+This option is not usually needed except by a file system wizard who
+is examining the remains of a very badly corrupted file system.
+.TP
+.B \-o blocksize=\fIblocksize
+use blocks of
+.I blocksize
+bytes when examining the file system.
+This option is not usually needed except by a file system wizard who
+is examining the remains of a very badly corrupted file system.
+.TP
+.B \-f
+force dumpe2fs to display a file system even though it may have some
+file system feature flags which dumpe2fs may not understand (and which
+can cause some of dumpe2fs's display to be suspect).
+.TP
+.B \-g
+display the group descriptor information in a machine readable colon-separated
+value format. The fields displayed are the group number; the number of the
+first block in the group; the superblock location (or -1 if not present); the
+range of blocks used by the group descriptors (or -1 if not present); the block
+bitmap location; the inode bitmap location; and the range of blocks used by the
+inode table.
+.TP
+.B \-h
+only display the superblock information and not any of the block
+group descriptor detail information.
+.TP
+.B \-i
+display the file system data from an image file created by
+.BR e2image ,
+using
+.I device
+as the pathname to the image file.
+.TP
+.B \-m
+If the
+.B mmp
+feature is enabled on the file system, check if
+.I device
+is in use by another node, see
+.BR e2mmpstatus (8)
+for full details. If used together with the
+.B \-i
+option, only the MMP block information is printed.
+.TP
+.B \-x
+print the detailed group information block numbers in hexadecimal format
+.TP
+.B \-V
+print the version number of
+.B dumpe2fs
+and exit.
+.SH EXIT CODE
+.B dumpe2fs
+exits with a return code of 0 if the operation completed without errors.
+It will exit with a non-zero return code if there are any errors, such
+as problems reading a valid superblock, bad checksums, or if the device
+is in use by another node and
+.B -m
+is specified.
+.SH BUGS
+You may need to know the physical file system structure to understand the
+output.
+.SH AUTHOR
+.B dumpe2fs
+was written by Remy Card <Remy.Card@linux.org>. It is currently being
+maintained by Theodore Ts'o <tytso@alum.mit.edu>.
+.SH AVAILABILITY
+.B dumpe2fs
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR e2fsck (8),
+.BR e2mmpstatus (8),
+.BR mke2fs (8),
+.BR tune2fs (8).
+.BR ext4 (5)
+
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
new file mode 100644
index 0000000..7c080ed
--- /dev/null
+++ b/misc/dumpe2fs.c
@@ -0,0 +1,780 @@
+/*
+ * dumpe2fs.c - List the control structures of a second
+ * extended filesystem
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * Copyright 1995, 1996, 1997 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 94/01/09 - Creation
+ * 94/02/27 - Ported to use the ext2fs library
+ */
+
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "ext2fs/ext2_fs.h"
+
+#include "ext2fs/ext2fs.h"
+#include "e2p/e2p.h"
+#include "ext2fs/kernel-jbd.h"
+#include <uuid/uuid.h>
+
+#include "support/nls-enable.h"
+#include "support/plausible.h"
+#include "../version.h"
+
+#define in_use(m, x) (ext2fs_test_bit ((x), (m)))
+
+static const char * program_name = "dumpe2fs";
+static char * device_name = NULL;
+static int hex_format = 0;
+static int blocks64 = 0;
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s [-bfghimxV] [-o superblock=<num>] "
+ "[-o blocksize=<num>] device\n"), program_name);
+ exit(1);
+}
+
+static void print_number(unsigned long long num)
+{
+ if (hex_format) {
+ if (blocks64)
+ printf("0x%08llx", num);
+ else
+ printf("0x%04llx", num);
+ } else
+ printf("%llu", num);
+}
+
+static void print_range(unsigned long long a, unsigned long long b)
+{
+ if (hex_format) {
+ if (blocks64)
+ printf("0x%08llx-0x%08llx", a, b);
+ else
+ printf("0x%04llx-0x%04llx", a, b);
+ } else
+ printf("%llu-%llu", a, b);
+}
+
+static void print_free(unsigned long group, char * bitmap,
+ unsigned long num, unsigned long offset, int ratio)
+{
+ int p = 0;
+ unsigned long i;
+ unsigned long j;
+
+ offset /= ratio;
+ offset += group * num;
+ for (i = 0; i < num; i++)
+ if (!in_use (bitmap, i))
+ {
+ if (p)
+ printf (", ");
+ print_number((i + offset) * ratio);
+ for (j = i; j < num && !in_use (bitmap, j); j++)
+ ;
+ if (--j != i) {
+ fputc('-', stdout);
+ print_number((j + offset) * ratio);
+ i = j;
+ }
+ p = 1;
+ }
+}
+
+static void print_bg_opt(int bg_flags, int mask,
+ const char *str, int *first)
+{
+ if (bg_flags & mask) {
+ if (*first) {
+ fputs(" [", stdout);
+ *first = 0;
+ } else
+ fputs(", ", stdout);
+ fputs(str, stdout);
+ }
+}
+static void print_bg_opts(ext2_filsys fs, dgrp_t i)
+{
+ int first = 1, bg_flags = 0;
+
+ if (ext2fs_has_group_desc_csum(fs))
+ bg_flags = ext2fs_bg_flags(fs, i);
+
+ print_bg_opt(bg_flags, EXT2_BG_INODE_UNINIT, "INODE_UNINIT",
+ &first);
+ print_bg_opt(bg_flags, EXT2_BG_BLOCK_UNINIT, "BLOCK_UNINIT",
+ &first);
+ print_bg_opt(bg_flags, EXT2_BG_INODE_ZEROED, "ITABLE_ZEROED",
+ &first);
+ if (!first)
+ fputc(']', stdout);
+ fputc('\n', stdout);
+}
+
+static void print_bg_rel_offset(ext2_filsys fs, blk64_t block, int itable,
+ blk64_t first_block, blk64_t last_block)
+{
+ if ((block >= first_block) && (block <= last_block)) {
+ if (itable && block == first_block)
+ return;
+ printf(" (+%u)", (unsigned)(block - first_block));
+ } else if (ext2fs_has_feature_flex_bg(fs->super)) {
+ dgrp_t flex_grp = ext2fs_group_of_blk2(fs, block);
+ printf(" (bg #%u + %u)", flex_grp,
+ (unsigned)(block-ext2fs_group_first_block2(fs,flex_grp)));
+ }
+}
+
+static void list_desc(ext2_filsys fs, int grp_only)
+{
+ unsigned long i;
+ blk64_t first_block, last_block;
+ blk64_t super_blk, old_desc_blk, new_desc_blk;
+ char *block_bitmap=NULL, *inode_bitmap=NULL;
+ const char *units = _("blocks");
+ int inode_blocks_per_group, old_desc_blocks, reserved_gdt;
+ int block_nbytes, inode_nbytes;
+ int has_super;
+ blk64_t blk_itr = EXT2FS_B2C(fs, fs->super->s_first_data_block);
+ ext2_ino_t ino_itr = 1;
+ errcode_t retval;
+
+ if (ext2fs_has_feature_bigalloc(fs->super))
+ units = _("clusters");
+
+ block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
+ inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8;
+
+ if (fs->block_map)
+ block_bitmap = malloc(block_nbytes);
+ if (fs->inode_map)
+ inode_bitmap = malloc(inode_nbytes);
+
+ inode_blocks_per_group = ((fs->super->s_inodes_per_group *
+ EXT2_INODE_SIZE(fs->super)) +
+ EXT2_BLOCK_SIZE(fs->super) - 1) /
+ EXT2_BLOCK_SIZE(fs->super);
+ reserved_gdt = fs->super->s_reserved_gdt_blocks;
+ fputc('\n', stdout);
+ first_block = fs->super->s_first_data_block;
+ if (ext2fs_has_feature_meta_bg(fs->super))
+ old_desc_blocks = fs->super->s_first_meta_bg;
+ else
+ old_desc_blocks = fs->desc_blocks;
+ if (grp_only)
+ printf("group:block:super:gdt:bbitmap:ibitmap:itable\n");
+ for (i = 0; i < fs->group_desc_count; i++) {
+ first_block = ext2fs_group_first_block2(fs, i);
+ last_block = ext2fs_group_last_block2(fs, i);
+
+ ext2fs_super_and_bgd_loc2(fs, i, &super_blk,
+ &old_desc_blk, &new_desc_blk, 0);
+
+ if (grp_only) {
+ printf("%lu:%llu:", i, (unsigned long long) first_block);
+ if (i == 0 || super_blk)
+ printf("%llu:", (unsigned long long) super_blk);
+ else
+ printf("-1:");
+ if (old_desc_blk) {
+ print_range(old_desc_blk,
+ old_desc_blk + old_desc_blocks - 1);
+ printf(":");
+ } else if (new_desc_blk)
+ printf("%llu:", (unsigned long long) new_desc_blk);
+ else
+ printf("-1:");
+ printf("%llu:%llu:%llu\n",
+ (unsigned long long) ext2fs_block_bitmap_loc(fs, i),
+ (unsigned long long) ext2fs_inode_bitmap_loc(fs, i),
+ (unsigned long long) ext2fs_inode_table_loc(fs, i));
+ continue;
+ }
+
+ printf(_("Group %lu: (Blocks "), i);
+ print_range(first_block, last_block);
+ fputs(")", stdout);
+ if (ext2fs_has_group_desc_csum(fs)) {
+ unsigned csum = ext2fs_bg_checksum(fs, i);
+ unsigned exp_csum = ext2fs_group_desc_csum(fs, i);
+
+ printf(_(" csum 0x%04x"), csum);
+ if (csum != exp_csum)
+ printf(_(" (EXPECTED 0x%04x)"), exp_csum);
+ }
+ print_bg_opts(fs, i);
+ has_super = ((i==0) || super_blk);
+ if (has_super) {
+ printf (_(" %s superblock at "),
+ i == 0 ? _("Primary") : _("Backup"));
+ print_number(super_blk);
+ }
+ if (old_desc_blk) {
+ printf("%s", _(", Group descriptors at "));
+ print_range(old_desc_blk,
+ old_desc_blk + old_desc_blocks - 1);
+ if (reserved_gdt) {
+ printf("%s", _("\n Reserved GDT blocks at "));
+ print_range(old_desc_blk + old_desc_blocks,
+ old_desc_blk + old_desc_blocks +
+ reserved_gdt - 1);
+ }
+ } else if (new_desc_blk) {
+ fputc(has_super ? ',' : ' ', stdout);
+ printf("%s", _(" Group descriptor at "));
+ print_number(new_desc_blk);
+ has_super++;
+ }
+ if (has_super)
+ fputc('\n', stdout);
+ fputs(_(" Block bitmap at "), stdout);
+ print_number(ext2fs_block_bitmap_loc(fs, i));
+ print_bg_rel_offset(fs, ext2fs_block_bitmap_loc(fs, i), 0,
+ first_block, last_block);
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ printf(_(", csum 0x%08x"),
+ ext2fs_block_bitmap_checksum(fs, i));
+ 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);
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ printf(_(", csum 0x%08x"),
+ ext2fs_inode_bitmap_checksum(fs, i));
+ fputs(_("\n Inode table at "), stdout);
+ print_range(ext2fs_inode_table_loc(fs, i),
+ ext2fs_inode_table_loc(fs, i) +
+ inode_blocks_per_group - 1);
+ print_bg_rel_offset(fs, ext2fs_inode_table_loc(fs, i), 1,
+ first_block, last_block);
+ printf (_("\n %u free %s, %u free inodes, "
+ "%u directories%s"),
+ ext2fs_bg_free_blocks_count(fs, i), units,
+ ext2fs_bg_free_inodes_count(fs, i),
+ ext2fs_bg_used_dirs_count(fs, i),
+ ext2fs_bg_itable_unused(fs, i) ? "" : "\n");
+ if (ext2fs_bg_itable_unused(fs, i))
+ printf (_(", %u unused inodes\n"),
+ ext2fs_bg_itable_unused(fs, i));
+ if (block_bitmap) {
+ fputs(_(" Free blocks: "), stdout);
+ retval = ext2fs_get_block_bitmap_range2(fs->block_map,
+ blk_itr, block_nbytes << 3, block_bitmap);
+ if (retval)
+ com_err("list_desc", retval,
+ "while reading block bitmap");
+ else
+ print_free(i, block_bitmap,
+ fs->super->s_clusters_per_group,
+ fs->super->s_first_data_block,
+ EXT2FS_CLUSTER_RATIO(fs));
+ fputc('\n', stdout);
+ blk_itr += fs->super->s_clusters_per_group;
+ }
+ if (inode_bitmap) {
+ fputs(_(" Free inodes: "), stdout);
+ retval = ext2fs_get_inode_bitmap_range2(fs->inode_map,
+ ino_itr, inode_nbytes << 3, inode_bitmap);
+ if (retval)
+ com_err("list_desc", retval,
+ "while reading inode bitmap");
+ else
+ print_free(i, inode_bitmap,
+ fs->super->s_inodes_per_group,
+ 1, 1);
+ fputc('\n', stdout);
+ ino_itr += fs->super->s_inodes_per_group;
+ }
+ }
+ if (block_bitmap)
+ free(block_bitmap);
+ if (inode_bitmap)
+ free(inode_bitmap);
+}
+
+static void list_bad_blocks(ext2_filsys fs, int dump)
+{
+ badblocks_list bb_list = 0;
+ badblocks_iterate bb_iter;
+ blk_t blk;
+ errcode_t retval;
+ const char *header, *fmt;
+
+ retval = ext2fs_read_bb_inode(fs, &bb_list);
+ if (retval) {
+ com_err("ext2fs_read_bb_inode", retval, 0);
+ return;
+ }
+ retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
+ if (retval) {
+ com_err("ext2fs_badblocks_list_iterate_begin", retval,
+ "%s", _("while printing bad block list"));
+ ext2fs_badblocks_list_free(bb_list);
+ return;
+ }
+ if (dump) {
+ header = fmt = "%u\n";
+ } else {
+ header = _("Bad blocks: %u");
+ fmt = ", %u";
+ }
+ while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) {
+ printf(header ? header : fmt, blk);
+ header = 0;
+ }
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+ if (!dump)
+ fputc('\n', stdout);
+ ext2fs_badblocks_list_free(bb_list);
+}
+
+static void print_inline_journal_information(ext2_filsys fs)
+{
+ journal_superblock_t *jsb;
+ struct ext2_inode inode;
+ ext2_file_t journal_file;
+ errcode_t retval;
+ ext2_ino_t ino = fs->super->s_journal_inum;
+ char buf[1024];
+ int flags;
+
+ if (fs->flags & EXT2_FLAG_IMAGE_FILE)
+ return;
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while reading journal inode"));
+ exit(1);
+ }
+ retval = ext2fs_file_open2(fs, ino, &inode, 0, &journal_file);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while opening journal inode"));
+ exit(1);
+ }
+ retval = ext2fs_file_read(journal_file, buf, sizeof(buf), 0);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while reading journal super block"));
+ exit(1);
+ }
+ ext2fs_file_close(journal_file);
+ jsb = (journal_superblock_t *) buf;
+ if (be32_to_cpu(jsb->s_header.h_magic) != JBD2_MAGIC_NUMBER) {
+ fprintf(stderr, "%s",
+ _("Journal superblock magic number invalid!\n"));
+ exit(1);
+ }
+ flags = ext2fs_has_feature_fast_commit(fs->super) ?
+ E2P_LIST_JOURNAL_FLAG_FC : 0;
+ e2p_list_journal_super(stdout, buf, fs->blocksize, flags);
+}
+
+static void print_journal_information(ext2_filsys fs)
+{
+ errcode_t retval;
+ char buf[1024];
+ journal_superblock_t *jsb;
+ int flags;
+
+ /* Get the journal superblock */
+ if ((retval = io_channel_read_blk64(fs->io,
+ fs->super->s_first_data_block + 1,
+ -1024, buf))) {
+ com_err(program_name, retval, "%s",
+ _("while reading journal superblock"));
+ exit(1);
+ }
+ jsb = (journal_superblock_t *) buf;
+ if ((jsb->s_header.h_magic != (unsigned) ntohl(JBD2_MAGIC_NUMBER)) ||
+ (jsb->s_header.h_blocktype !=
+ (unsigned) ntohl(JBD2_SUPERBLOCK_V2))) {
+ com_err(program_name, 0, "%s",
+ _("Couldn't find journal superblock magic numbers"));
+ exit(1);
+ }
+ flags = ext2fs_has_feature_fast_commit(fs->super) ?
+ E2P_LIST_JOURNAL_FLAG_FC : 0;
+ e2p_list_journal_super(stdout, buf, fs->blocksize, flags);
+}
+
+static int check_mmp(ext2_filsys fs)
+{
+ int retval;
+
+ /* This won't actually start MMP on the filesystem, since fs is opened
+ * readonly, but it will do the proper activity checking for us. */
+ retval = ext2fs_mmp_start(fs);
+ if (retval) {
+ com_err(program_name, retval, _("while trying to open %s"),
+ fs->device_name);
+ if (retval == EXT2_ET_MMP_FAILED ||
+ retval == EXT2_ET_MMP_FSCK_ON ||
+ retval == EXT2_ET_MMP_CSUM_INVALID ||
+ retval == EXT2_ET_MMP_UNKNOWN_SEQ) {
+ if (fs->mmp_buf) {
+ struct mmp_struct *mmp = fs->mmp_buf;
+ time_t mmp_time = mmp->mmp_time;
+
+ fprintf(stderr,
+ "%s: MMP update by '%.*s%.*s' at %s",
+ program_name,
+ EXT2_LEN_STR(mmp->mmp_nodename),
+ EXT2_LEN_STR(mmp->mmp_bdevname),
+ ctime(&mmp_time));
+ }
+ retval = 1;
+ } else {
+ retval = 2;
+ }
+ } else {
+ printf("%s: it is safe to mount '%s', MMP is clean\n",
+ program_name, fs->device_name);
+ }
+
+ return retval;
+}
+
+static void print_mmp_block(ext2_filsys fs)
+{
+ struct mmp_struct *mmp;
+ time_t mmp_time;
+ errcode_t retval;
+
+ if (fs->mmp_buf == NULL) {
+ retval = ext2fs_get_mem(fs->blocksize, &fs->mmp_buf);
+ if (retval) {
+ com_err(program_name, retval,
+ _("failed to alloc MMP buffer\n"));
+ return;
+ }
+ }
+
+ retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, fs->mmp_buf);
+ /* this is only dumping, not checking status, so OK to skip this */
+ if (retval == EXT2_ET_OP_NOT_SUPPORTED)
+ return;
+ if (retval) {
+ com_err(program_name, retval,
+ _("reading MMP block %llu from '%s'\n"),
+ (unsigned long long) fs->super->s_mmp_block,
+ fs->device_name);
+ return;
+ }
+
+ mmp = fs->mmp_buf;
+ mmp_time = mmp->mmp_time;
+ printf("MMP_block:\n");
+ printf(" mmp_magic: 0x%x\n", mmp->mmp_magic);
+ printf(" mmp_check_interval: %d\n", mmp->mmp_check_interval);
+ printf(" mmp_sequence: %#08x\n", mmp->mmp_seq);
+ printf(" mmp_update_date: %s", ctime(&mmp_time));
+ printf(" mmp_update_time: %llu\n",
+ (unsigned long long) mmp->mmp_time);
+ printf(" mmp_node_name: %.*s\n",
+ EXT2_LEN_STR(mmp->mmp_nodename));
+ printf(" mmp_device_name: %.*s\n",
+ EXT2_LEN_STR(mmp->mmp_bdevname));
+}
+
+static void parse_extended_opts(const char *opts, blk64_t *superblock,
+ int *blocksize)
+{
+ char *buf, *token, *next, *p, *arg, *badopt = 0;
+ int len;
+ int do_usage = 0;
+
+ len = strlen(opts);
+ buf = malloc(len+1);
+ if (!buf) {
+ fprintf(stderr, "%s",
+ _("Couldn't allocate memory to parse options!\n"));
+ exit(1);
+ }
+ strcpy(buf, opts);
+ for (token = buf; token && *token; token = next) {
+ p = strchr(token, ',');
+ next = 0;
+ if (p) {
+ *p = 0;
+ next = p+1;
+ }
+ arg = strchr(token, '=');
+ if (arg) {
+ *arg = 0;
+ arg++;
+ }
+ if (strcmp(token, "superblock") == 0 ||
+ strcmp(token, "sb") == 0) {
+ if (!arg) {
+ do_usage++;
+ badopt = token;
+ continue;
+ }
+ *superblock = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid superblock parameter: %s\n"),
+ arg);
+ do_usage++;
+ continue;
+ }
+ } else if (strcmp(token, "blocksize") == 0 ||
+ strcmp(token, "bs") == 0) {
+ if (!arg) {
+ do_usage++;
+ badopt = token;
+ continue;
+ }
+ *blocksize = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid blocksize parameter: %s\n"),
+ arg);
+ do_usage++;
+ continue;
+ }
+ } else {
+ do_usage++;
+ badopt = token;
+ }
+ }
+ if (do_usage) {
+ fprintf(stderr, _("\nBad extended option(s) specified: %s\n\n"
+ "Extended options are separated by commas, "
+ "and may take an argument which\n"
+ "\tis set off by an equals ('=') sign.\n\n"
+ "Valid extended options are:\n"
+ "\tsuperblock=<superblock number>\n"
+ "\tblocksize=<blocksize>\n"),
+ badopt ? badopt : "");
+ free(buf);
+ exit(1);
+ }
+ free(buf);
+}
+
+int main (int argc, char ** argv)
+{
+ errcode_t retval;
+ errcode_t retval_csum = 0;
+ const char *error_csum = NULL;
+ ext2_filsys fs;
+ int print_badblocks = 0;
+ blk64_t use_superblock = 0;
+ int use_blocksize = 0;
+ int image_dump = 0;
+ int mmp_check = 0;
+ int mmp_info = 0;
+ int force = 0;
+ int flags;
+ int header_only = 0;
+ int c;
+ int grp_only = 0;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ add_error_table(&et_ext2_error_table);
+ if (argc && *argv) {
+ if (strrchr(*argv, '/'))
+ program_name = strrchr(*argv, '/') + 1;
+ else
+ program_name = *argv;
+
+ if (strstr(program_name, "mmpstatus") != NULL) {
+ mmp_check = 1;
+ header_only = 1;
+ }
+ } else
+ usage();
+
+ if (!mmp_check)
+ fprintf(stderr, "dumpe2fs %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
+
+ while ((c = getopt(argc, argv, "bfghimxVo:")) != EOF) {
+ switch (c) {
+ case 'b':
+ print_badblocks++;
+ break;
+ case 'f':
+ force++;
+ break;
+ case 'g':
+ grp_only++;
+ break;
+ case 'h':
+ header_only++;
+ break;
+ case 'i':
+ if (mmp_check)
+ mmp_info++;
+ else
+ image_dump++;
+ break;
+ case 'm':
+ mmp_check++;
+ header_only++;
+ if (image_dump) {
+ mmp_info = image_dump;
+ image_dump = 0;
+ }
+ break;
+ case 'o':
+ parse_extended_opts(optarg, &use_superblock,
+ &use_blocksize);
+ break;
+ case 'V':
+ /* Print version number and exit */
+ fprintf(stderr, _("\tUsing %s\n"),
+ error_message(EXT2_ET_BASE));
+ exit(0);
+ case 'x':
+ hex_format++;
+ break;
+ default:
+ usage();
+ }
+ }
+ if (optind != argc - 1)
+ usage();
+
+ device_name = argv[optind++];
+ flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES |
+ EXT2_FLAG_64BITS | EXT2_FLAG_THREADS;
+ if (force)
+ flags |= EXT2_FLAG_FORCE;
+ if (image_dump)
+ flags |= EXT2_FLAG_IMAGE_FILE;
+ if (header_only)
+ flags |= EXT2_FLAG_SUPER_ONLY;
+try_open_again:
+ if (use_superblock && !use_blocksize) {
+ for (use_blocksize = EXT2_MIN_BLOCK_SIZE;
+ use_blocksize <= EXT2_MAX_BLOCK_SIZE;
+ use_blocksize *= 2) {
+ retval = ext2fs_open (device_name, flags,
+ use_superblock,
+ use_blocksize, unix_io_manager,
+ &fs);
+ if (!retval)
+ break;
+ }
+ } else {
+ retval = ext2fs_open(device_name, flags, use_superblock,
+ use_blocksize, unix_io_manager, &fs);
+ }
+ flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ if (retval && !retval_csum) {
+ retval_csum = retval;
+ error_csum = _("while trying to open %s");
+ goto try_open_again;
+ }
+ if (retval) {
+ com_err(program_name, retval, _("while trying to open %s"),
+ device_name);
+ printf("%s", _("Couldn't find valid filesystem superblock.\n"));
+ if (retval == EXT2_ET_BAD_MAGIC)
+ check_plausibility(device_name, CHECK_FS_EXIST, NULL);
+ goto out;
+ }
+ fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+ if (ext2fs_has_feature_64bit(fs->super))
+ blocks64 = 1;
+ if (mmp_check) {
+ if (ext2fs_has_feature_mmp(fs->super) &&
+ fs->super->s_mmp_block != 0) {
+ if (mmp_info) {
+ print_mmp_block(fs);
+ printf(" mmp_block_number: ");
+ print_number(fs->super->s_mmp_block);
+ printf("\n");
+ } else {
+ retval = check_mmp(fs);
+ }
+ if (!retval && retval_csum)
+ retval = 2;
+ } else {
+ fprintf(stderr, _("%s: MMP feature not enabled.\n"),
+ program_name);
+ retval = 2;
+ }
+ } else if (print_badblocks) {
+ list_bad_blocks(fs, 1);
+ } else {
+ if (grp_only)
+ goto just_descriptors;
+ list_super(fs->super);
+ if (ext2fs_has_feature_journal_dev(fs->super)) {
+ print_journal_information(fs);
+
+ goto out_close;
+ }
+ if (ext2fs_has_feature_journal(fs->super) &&
+ (fs->super->s_journal_inum != 0))
+ print_inline_journal_information(fs);
+ if (ext2fs_has_feature_mmp(fs->super) &&
+ fs->super->s_mmp_block != 0)
+ print_mmp_block(fs);
+ list_bad_blocks(fs, 0);
+ if (header_only)
+ goto out_close;
+
+ fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
+try_bitmaps_again:
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval && !retval_csum) {
+ fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ retval_csum = retval;
+ error_csum = _("while trying to read '%s' bitmaps\n");
+ goto try_bitmaps_again;
+ }
+just_descriptors:
+ list_desc(fs, grp_only);
+ }
+out_close:
+ if (retval_csum) {
+ com_err(program_name, retval_csum, error_csum, device_name);
+ printf("%s", _("*** Run e2fsck now!\n\n"));
+ if (!retval)
+ retval = retval_csum;
+ }
+ ext2fs_close_free(&fs);
+ remove_error_table(&et_ext2_error_table);
+out:
+ return retval;
+}
diff --git a/misc/e2freefrag.8.in b/misc/e2freefrag.8.in
new file mode 100644
index 0000000..e77bcdb
--- /dev/null
+++ b/misc/e2freefrag.8.in
@@ -0,0 +1,96 @@
+.\" -*- nroff -*-
+.TH E2FREEFRAG 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2freefrag \- report free space fragmentation information
+.SH SYNOPSIS
+.B e2freefrag
+[
+.B \-c chunk_kb
+]
+[
+.B \-h
+]
+.B filesys
+
+.SH DESCRIPTION
+.B e2freefrag
+is used to report free space fragmentation on ext2/3/4 file systems.
+.I filesys
+is the file system device name (e.g.
+.IR /dev/hdc1 ", " /dev/md0 ).
+The
+.B e2freefrag
+program will scan the block bitmap information to check how many free blocks
+are present as contiguous and aligned free space. The percentage of contiguous
+free blocks of size and of alignment
+.I chunk_kb
+is reported. It also displays the minimum/maximum/average free chunk size in
+the file system, along with a histogram of all free chunks. This information
+can be used to gauge the level of free space fragmentation in the file system.
+.SH OPTIONS
+.TP
+.BI \-c " chunk_kb"
+If a chunk size is specified, then
+.B e2freefrag
+will print how many free chunks of size
+.I chunk_kb
+are available in units of kilobytes (Kb). The chunk size must be a
+power of two and be larger than file system block size.
+.TP
+.B \-h
+Print the usage of the program.
+.SH EXAMPLE
+# e2freefrag /dev/vgroot/lvhome
+.br
+Device: /dev/vgroot/lvhome
+.br
+Blocksize: 4096 bytes
+.br
+Total blocks: 1504085
+.br
+Free blocks: 292995 (19.5%)
+.br
+
+Min. free extent: 4 KB
+.br
+Max. free extent: 24008 KB
+.br
+Avg. free extent: 252 KB
+.br
+
+HISTOGRAM OF FREE EXTENT SIZES:
+.br
+Extent Size Range : Free extents Free Blocks Percent
+.br
+ 4K... 8K- : 704 704 0.2%
+.br
+ 8K... 16K- : 810 1979 0.7%
+.br
+ 16K... 32K- : 843 4467 1.5%
+.br
+ 32K... 64K- : 579 6263 2.1%
+.br
+ 64K... 128K- : 493 11067 3.8%
+.br
+ 128K... 256K- : 394 18097 6.2%
+.br
+ 256K... 512K- : 281 25477 8.7%
+.br
+ 512K... 1024K- : 253 44914 15.3%
+.br
+ 1M... 2M- : 143 51897 17.7%
+.br
+ 2M... 4M- : 73 50683 17.3%
+.br
+ 4M... 8M- : 37 52417 17.9%
+.br
+ 8M... 16M- : 7 19028 6.5%
+.br
+ 16M... 32M- : 1 6002 2.0%
+.SH AUTHOR
+This version of e2freefrag was written by Rupesh Thakare, and modified by
+Andreas Dilger <adilger@sun.com>, and Kalpak Shah.
+.SH SEE ALSO
+.IR debugfs (8),
+.IR dumpe2fs (8),
+.IR e2fsck (8)
diff --git a/misc/e2freefrag.c b/misc/e2freefrag.c
new file mode 100644
index 0000000..49b6346
--- /dev/null
+++ b/misc/e2freefrag.c
@@ -0,0 +1,452 @@
+/*
+ * e2freefrag - report filesystem free-space fragmentation
+ *
+ * Copyright (C) 2009 Sun Microsystems, Inc.
+ *
+ * Author: Rupesh Thakare <rupesh@sun.com>
+ * Andreas Dilger <adilger@sun.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License version 2.
+ * %End-Header%
+ */
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#if defined(HAVE_EXT2_IOCTLS) && !defined(DEBUGFS)
+# include <sys/ioctl.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+# include <limits.h>
+#endif
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "e2freefrag.h"
+
+#if defined(HAVE_EXT2_IOCTLS) && !defined(DEBUGFS)
+# ifdef HAVE_LINUX_FSMAP_H
+# include <linux/fsmap.h>
+# endif
+# include "fsmap.h"
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+static void usage(const char *prog)
+{
+ fprintf(stderr, "usage: %s [-c chunksize in kb] [-h] "
+ "device_name\n", prog);
+#ifndef DEBUGFS
+ exit(1);
+#endif
+}
+
+static int ul_log2(unsigned long arg)
+{
+ int l = 0;
+
+ arg >>= 1;
+ while (arg) {
+ l++;
+ arg >>= 1;
+ }
+ return l;
+}
+
+static void init_chunk_info(ext2_filsys fs, struct chunk_info *info)
+{
+ int i;
+
+ info->blocksize_bits = ul_log2((unsigned long)fs->blocksize);
+ if (info->chunkbytes) {
+ info->chunkbits = ul_log2(info->chunkbytes);
+ info->blks_in_chunk = info->chunkbytes >> info->blocksize_bits;
+ } else {
+ info->chunkbits = ul_log2(DEFAULT_CHUNKSIZE);
+ info->blks_in_chunk = DEFAULT_CHUNKSIZE >> info->blocksize_bits;
+ }
+
+ info->min = ~0UL;
+ info->max = info->avg = 0;
+ info->real_free_chunks = 0;
+
+ for (i = 0; i < MAX_HIST; i++) {
+ info->histogram.fc_chunks[i] = 0;
+ info->histogram.fc_blocks[i] = 0;
+ }
+}
+
+static void update_chunk_stats(struct chunk_info *info,
+ unsigned long chunk_size)
+{
+ unsigned long idx;
+
+ idx = ul_log2(chunk_size) + 1;
+ if (idx >= MAX_HIST)
+ idx = MAX_HIST-1;
+ info->histogram.fc_chunks[idx]++;
+ info->histogram.fc_blocks[idx] += chunk_size;
+
+ if (chunk_size > info->max)
+ info->max = chunk_size;
+ if (chunk_size < info->min)
+ info->min = chunk_size;
+ info->avg += chunk_size;
+ info->real_free_chunks++;
+}
+
+static void scan_block_bitmap(ext2_filsys fs, struct chunk_info *info)
+{
+ unsigned long long blocks_count = ext2fs_blocks_count(fs->super);
+ unsigned long long chunks = (blocks_count + info->blks_in_chunk) >>
+ (info->chunkbits - info->blocksize_bits);
+ unsigned long long chunk_num;
+ unsigned long last_chunk_size = 0;
+ unsigned long long chunk_start_blk = 0;
+ int used;
+
+ for (chunk_num = 0; chunk_num < chunks; chunk_num++) {
+ unsigned long long blk, num_blks;
+ int chunk_free;
+
+ /* Last chunk may be smaller */
+ if (chunk_start_blk + info->blks_in_chunk > blocks_count)
+ num_blks = blocks_count - chunk_start_blk;
+ else
+ num_blks = info->blks_in_chunk;
+
+ chunk_free = 0;
+
+ /* Initialize starting block for first chunk correctly else
+ * there is a segfault when blocksize = 1024 in which case
+ * block_map->start = 1 */
+ for (blk = 0; blk < num_blks; blk++, chunk_start_blk++) {
+ if (chunk_num == 0 && blk == 0) {
+ blk = fs->super->s_first_data_block;
+ chunk_start_blk = blk;
+ }
+ used = ext2fs_fast_test_block_bitmap2(fs->block_map,
+ chunk_start_blk >> fs->cluster_ratio_bits);
+ if (!used) {
+ last_chunk_size++;
+ chunk_free++;
+ }
+
+ if (used && last_chunk_size != 0) {
+ update_chunk_stats(info, last_chunk_size);
+ last_chunk_size = 0;
+ }
+ }
+
+ if (chunk_free == info->blks_in_chunk)
+ info->free_chunks++;
+ }
+ if (last_chunk_size != 0)
+ update_chunk_stats(info, last_chunk_size);
+}
+
+#if defined(HAVE_EXT2_IOCTLS) && !defined(DEBUGFS)
+# define FSMAP_EXTENTS 1024
+static int scan_online(ext2_filsys fs, struct chunk_info *info,
+ blk64_t *free_blks)
+{
+ struct fsmap_head *fsmap;
+ struct fsmap *extent;
+ struct fsmap *p;
+ char mntpoint[PATH_MAX + 1];
+ errcode_t retval;
+ int mount_flags;
+ int fd;
+ int ret;
+ unsigned int i;
+
+ /* Try to open the mountpoint for a live query. */
+ retval = ext2fs_check_mount_point(fs->device_name, &mount_flags,
+ mntpoint, PATH_MAX);
+ if (retval) {
+ com_err(fs->device_name, retval, "while checking mount status");
+ return 0;
+ }
+ if (!(mount_flags & EXT2_MF_MOUNTED))
+ return 0;
+ fd = open(mntpoint, O_RDONLY);
+ if (fd < 0) {
+ com_err(mntpoint, errno, "while opening mount point");
+ return 0;
+ }
+
+ fsmap = malloc(fsmap_sizeof(FSMAP_EXTENTS));
+ if (!fsmap) {
+ com_err(fs->device_name, errno, "while allocating memory");
+ return 0;
+ }
+
+ memset(fsmap, 0, sizeof(*fsmap));
+ fsmap->fmh_count = FSMAP_EXTENTS;
+ fsmap->fmh_keys[1].fmr_device = UINT_MAX;
+ fsmap->fmh_keys[1].fmr_physical = ULLONG_MAX;
+ fsmap->fmh_keys[1].fmr_owner = ULLONG_MAX;
+ fsmap->fmh_keys[1].fmr_offset = ULLONG_MAX;
+ fsmap->fmh_keys[1].fmr_flags = UINT_MAX;
+
+ *free_blks = 0;
+ /* Fill the extent histogram with live data */
+ while (1) {
+ ret = ioctl(fd, FS_IOC_GETFSMAP, fsmap);
+ if (ret < 0) {
+ com_err(fs->device_name, errno, "while calling fsmap");
+ free(fsmap);
+ return 0;
+ }
+
+ /* No more extents to map, exit */
+ if (!fsmap->fmh_entries)
+ break;
+
+ for (i = 0, extent = fsmap->fmh_recs;
+ i < fsmap->fmh_entries;
+ i++, extent++) {
+ if (!(extent->fmr_flags & FMR_OF_SPECIAL_OWNER) ||
+ extent->fmr_owner != FMR_OWN_FREE)
+ continue;
+ update_chunk_stats(info,
+ extent->fmr_length / fs->blocksize);
+ *free_blks += (extent->fmr_length / fs->blocksize);
+ }
+
+ p = &fsmap->fmh_recs[fsmap->fmh_entries - 1];
+ if (p->fmr_flags & FMR_OF_LAST)
+ break;
+ fsmap_advance(fsmap);
+ }
+ free(fsmap);
+ return 1;
+}
+#else
+# define scan_online(fs, info, free_blks) (0)
+#endif /* HAVE_EXT2_IOCTLS */
+
+static errcode_t scan_offline(ext2_filsys fs, struct chunk_info *info,
+ blk64_t *free_blks)
+{
+ errcode_t retval;
+
+ *free_blks = ext2fs_free_blocks_count(fs->super);
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ return retval;
+ scan_block_bitmap(fs, info);
+ return 0;
+}
+
+static errcode_t dump_chunk_info(ext2_filsys fs, struct chunk_info *info,
+ FILE *f, blk64_t free_blks)
+{
+ unsigned long total_chunks;
+ const char *unitp = "KMGTPEZY";
+ int units = 10;
+ unsigned long start = 0, end;
+ int i, retval = 0;
+
+ fprintf(f, "Total blocks: %llu\nFree blocks: %llu (%0.1f%%)\n",
+ (unsigned long long) ext2fs_blocks_count(fs->super),
+ (unsigned long long) free_blks,
+ (double)free_blks * 100 /
+ ext2fs_blocks_count(fs->super));
+
+ if (info->chunkbytes) {
+ fprintf(f, "\nChunksize: %lu bytes (%u blocks)\n",
+ info->chunkbytes, info->blks_in_chunk);
+ total_chunks = (ext2fs_blocks_count(fs->super) +
+ info->blks_in_chunk) >>
+ (info->chunkbits - info->blocksize_bits);
+ fprintf(f, "Total chunks: %lu\nFree chunks: %lu (%0.1f%%)\n",
+ total_chunks, info->free_chunks,
+ (double)info->free_chunks * 100 / total_chunks);
+ }
+
+ /* Display chunk information in KB */
+ if (info->real_free_chunks) {
+ unsigned int scale = fs->blocksize >> 10;
+ info->min = info->min * scale;
+ info->max = info->max * scale;
+ info->avg = info->avg / info->real_free_chunks * scale;
+ } else {
+ info->min = 0;
+ }
+
+ fprintf(f, "\nMin. free extent: %lu KB \nMax. free extent: %lu KB\n"
+ "Avg. free extent: %lu KB\n", info->min, info->max, info->avg);
+ fprintf(f, "Num. free extent: %lu\n", info->real_free_chunks);
+
+ fprintf(f, "\nHISTOGRAM OF FREE EXTENT SIZES:\n");
+ fprintf(f, "%s : %12s %12s %7s\n", "Extent Size Range",
+ "Free extents", "Free Blocks", "Percent");
+ for (i = 0; i < MAX_HIST; i++) {
+ end = 1 << (i + info->blocksize_bits - units);
+ if (info->histogram.fc_chunks[i] != 0) {
+ char end_str[32];
+
+ sprintf(end_str, "%5lu%c-", end, *unitp);
+ if (i == MAX_HIST-1)
+ strcpy(end_str, "max ");
+ fprintf(f, "%5lu%c...%7s : %12lu %12lu %6.2f%%\n",
+ start, *unitp, end_str,
+ info->histogram.fc_chunks[i],
+ info->histogram.fc_blocks[i],
+ (double)info->histogram.fc_blocks[i] * 100 /
+ free_blks);
+ }
+ start = end;
+ if (start == 1<<10) {
+ start = 1;
+ units += 10;
+ unitp++;
+ }
+ }
+
+ return retval;
+}
+
+static void close_device(char *device_name, ext2_filsys fs)
+{
+ int retval = ext2fs_close_free(&fs);
+
+ if (retval)
+ com_err(device_name, retval, "while closing the filesystem.\n");
+}
+
+static void collect_info(ext2_filsys fs, struct chunk_info *chunk_info, FILE *f)
+{
+ unsigned int retval = 0;
+ blk64_t free_blks = 0;
+
+ fprintf(f, "Device: %s\n", fs->device_name);
+ fprintf(f, "Blocksize: %u bytes\n", fs->blocksize);
+
+ init_chunk_info(fs, chunk_info);
+ if (!scan_online(fs, chunk_info, &free_blks)) {
+ init_chunk_info(fs, chunk_info);
+ retval = scan_offline(fs, chunk_info, &free_blks);
+ }
+ if (retval) {
+ com_err(fs->device_name, retval, "while reading block bitmap");
+ close_device(fs->device_name, fs);
+ exit(1);
+ }
+
+ retval = dump_chunk_info(fs, chunk_info, f, free_blks);
+ if (retval) {
+ com_err(fs->device_name, retval, "while dumping chunk info");
+ close_device(fs->device_name, fs);
+ exit(1);
+ }
+}
+
+#ifndef DEBUGFS
+static void open_device(char *device_name, ext2_filsys *fs)
+{
+ int retval;
+ int flag = EXT2_FLAG_FORCE | EXT2_FLAG_64BITS | EXT2_FLAG_THREADS;
+
+ retval = ext2fs_open(device_name, flag, 0, 0, unix_io_manager, fs);
+ if (retval) {
+ com_err(device_name, retval, "while opening filesystem");
+ exit(1);
+ }
+ (*fs)->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+}
+#endif
+
+#ifdef DEBUGFS
+#include "debugfs.h"
+
+void do_freefrag(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+#else
+int main(int argc, char *argv[])
+#endif
+{
+ struct chunk_info chunk_info;
+ ext2_filsys fs = NULL;
+ char *progname;
+ char *end;
+ int c;
+
+#ifdef DEBUGFS
+ if (check_fs_open(argv[0]))
+ return;
+ reset_getopt();
+#else
+ char *device_name;
+
+ add_error_table(&et_ext2_error_table);
+#endif
+ progname = argv[0];
+ memset(&chunk_info, 0, sizeof(chunk_info));
+
+ while ((c = getopt(argc, argv, "c:h")) != EOF) {
+ switch (c) {
+ case 'c':
+ chunk_info.chunkbytes = strtoull(optarg, &end, 0);
+ if (*end != '\0') {
+ fprintf(stderr, "%s: bad chunk size '%s'\n",
+ progname, optarg);
+ usage(progname);
+ }
+ if (chunk_info.chunkbytes &
+ (chunk_info.chunkbytes - 1)) {
+ fprintf(stderr, "%s: chunk size must be a "
+ "power of 2.\n", argv[0]);
+ usage(progname);
+ }
+ chunk_info.chunkbytes *= 1024;
+ break;
+ case 'h':
+ default:
+ usage(progname);
+ break;
+ }
+ }
+
+#ifndef DEBUGFS
+ if (optind == argc) {
+ fprintf(stderr, "%s: missing device name.\n", progname);
+ usage(progname);
+ }
+
+ device_name = argv[optind];
+
+ open_device(device_name, &fs);
+#else
+ fs = current_fs;
+#endif
+
+ if (chunk_info.chunkbytes && (chunk_info.chunkbytes < fs->blocksize)) {
+ fprintf(stderr, "%s: chunksize must be greater than or equal "
+ "to filesystem blocksize.\n", progname);
+ exit(1);
+ }
+ collect_info(fs, &chunk_info, stdout);
+#ifndef DEBUGFS
+ close_device(device_name, fs);
+
+ return 0;
+#endif
+}
diff --git a/misc/e2freefrag.h b/misc/e2freefrag.h
new file mode 100644
index 0000000..80d1eef
--- /dev/null
+++ b/misc/e2freefrag.h
@@ -0,0 +1,20 @@
+#include <sys/types.h>
+
+#define DEFAULT_CHUNKSIZE (1024*1024)
+
+#define MAX_HIST 32
+struct free_chunk_histogram {
+ unsigned long fc_chunks[MAX_HIST];
+ unsigned long fc_blocks[MAX_HIST];
+};
+
+struct chunk_info {
+ unsigned long chunkbytes; /* chunk size in bytes */
+ int chunkbits; /* chunk size in bits */
+ unsigned long free_chunks; /* total free chunks of given size */
+ unsigned long real_free_chunks; /* free chunks of any size */
+ int blocksize_bits; /* fs blocksize in bits */
+ int blks_in_chunk; /* number of blocks in a chunk */
+ unsigned long min, max, avg; /* chunk size stats */
+ struct free_chunk_histogram histogram; /* histogram of all chunk sizes*/
+};
diff --git a/misc/e2fuzz.c b/misc/e2fuzz.c
new file mode 100644
index 0000000..0ceece9
--- /dev/null
+++ b/misc/e2fuzz.c
@@ -0,0 +1,372 @@
+/*
+ * e2fuzz.c -- Fuzz an ext4 image, for testing purposes.
+ *
+ * Copyright (C) 2014 Oracle.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+#define _XOPEN_SOURCE 600
+#define _FILE_OFFSET_BITS 64
+#define _LARGEFILE64_SOURCE 1
+#define _GNU_SOURCE 1
+
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <unistd.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+
+static int dryrun = 0;
+static int verbose = 0;
+static int metadata_only = 1;
+static unsigned long long user_corrupt_bytes = 0;
+static double user_corrupt_pct = 0.0;
+
+#if !defined HAVE_PWRITE64 && !defined HAVE_PWRITE
+static ssize_t my_pwrite(int fd, const void *buf, size_t count,
+ ext2_loff_t offset)
+{
+ if (ext2fs_llseek(fd, offset, SEEK_SET) < 0)
+ return 0;
+
+ return write(fd, buf, count);
+}
+#endif /* !defined HAVE_PWRITE64 && !defined HAVE_PWRITE */
+
+static int getseed(void)
+{
+ int r;
+ int fd;
+
+ fd = open("/dev/urandom", O_RDONLY);
+ if (fd < 0) {
+ perror("open");
+ exit(0);
+ }
+ if (read(fd, &r, sizeof(r)) != sizeof(r))
+ printf("Unable to read random seed!\n");
+ close(fd);
+ return r;
+}
+
+struct find_block {
+ ext2_ino_t ino;
+ ext2fs_block_bitmap bmap;
+ struct ext2_inode *inode;
+ blk64_t corrupt_blocks;
+};
+
+static int find_block_helper(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *blocknr, e2_blkcnt_t blockcnt,
+ blk64_t ref_blk EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct find_block *fb = (struct find_block *)priv_data;
+
+ if (S_ISDIR(fb->inode->i_mode) || !metadata_only || blockcnt < 0) {
+ ext2fs_mark_block_bitmap2(fb->bmap, *blocknr);
+ fb->corrupt_blocks++;
+ }
+
+ return 0;
+}
+
+static errcode_t find_metadata_blocks(ext2_filsys fs, ext2fs_block_bitmap bmap,
+ ext2_loff_t *corrupt_bytes)
+{
+ dgrp_t i;
+ blk64_t b, c;
+ ext2_inode_scan scan;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ struct find_block fb;
+ errcode_t retval;
+
+ *corrupt_bytes = 0;
+ fb.corrupt_blocks = 0;
+
+ /* Construct bitmaps of super/descriptor blocks */
+ for (i = 0; i < fs->group_desc_count; i++) {
+ ext2fs_reserve_super_and_bgd(fs, i, bmap);
+
+ /* bitmaps and inode table */
+ b = ext2fs_block_bitmap_loc(fs, i);
+ ext2fs_mark_block_bitmap2(bmap, b);
+ fb.corrupt_blocks++;
+
+ b = ext2fs_inode_bitmap_loc(fs, i);
+ ext2fs_mark_block_bitmap2(bmap, b);
+ fb.corrupt_blocks++;
+
+ c = ext2fs_inode_table_loc(fs, i);
+ ext2fs_mark_block_bitmap_range2(bmap, c,
+ fs->inode_blocks_per_group);
+ fb.corrupt_blocks += fs->inode_blocks_per_group;
+ }
+
+ /* Scan inodes */
+ fb.bmap = bmap;
+ fb.inode = &inode;
+ memset(&inode, 0, sizeof(inode));
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval)
+ goto out;
+
+ retval = ext2fs_get_next_inode_full(scan, &ino, &inode, sizeof(inode));
+ if (retval)
+ goto out2;
+ while (ino) {
+ if (inode.i_links_count == 0)
+ goto next_loop;
+
+ b = ext2fs_file_acl_block(fs, &inode);
+ if (b) {
+ ext2fs_mark_block_bitmap2(bmap, b);
+ fb.corrupt_blocks++;
+ }
+
+ /*
+ * Inline data, sockets, devices, and symlinks have
+ * no blocks to iterate.
+ */
+ if ((inode.i_flags & EXT4_INLINE_DATA_FL) ||
+ S_ISLNK(inode.i_mode) || S_ISFIFO(inode.i_mode) ||
+ S_ISCHR(inode.i_mode) || S_ISBLK(inode.i_mode) ||
+ S_ISSOCK(inode.i_mode))
+ goto next_loop;
+ fb.ino = ino;
+ retval = ext2fs_block_iterate3(fs, ino, BLOCK_FLAG_READ_ONLY,
+ NULL, find_block_helper, &fb);
+ if (retval)
+ goto out2;
+next_loop:
+ retval = ext2fs_get_next_inode_full(scan, &ino, &inode,
+ sizeof(inode));
+ if (retval)
+ goto out2;
+ }
+out2:
+ ext2fs_close_inode_scan(scan);
+out:
+ if (!retval)
+ *corrupt_bytes = fb.corrupt_blocks * fs->blocksize;
+ return retval;
+}
+
+static uint64_t rand_num(uint64_t min, uint64_t max)
+{
+ uint64_t x;
+ unsigned int i;
+ uint8_t *px = (uint8_t *)&x;
+
+ for (i = 0; i < sizeof(x); i++)
+ px[i] = random();
+
+ return min + (uint64_t)((double)(max - min) *
+ (x / ((double) UINT64_MAX + 1.0)));
+}
+
+static int process_fs(const char *fsname)
+{
+ errcode_t ret;
+ int flags, fd;
+ ext2_filsys fs = NULL;
+ ext2fs_block_bitmap corrupt_map;
+ ext2_loff_t hsize, count, off, offset, corrupt_bytes, i;
+ unsigned char c;
+
+ /* If mounted rw, force dryrun mode */
+ ret = ext2fs_check_if_mounted(fsname, &flags);
+ if (ret) {
+ fprintf(stderr, "%s: failed to determine filesystem mount "
+ "state.\n", fsname);
+ return 1;
+ }
+
+ if (!dryrun && (flags & EXT2_MF_MOUNTED) &&
+ !(flags & EXT2_MF_READONLY)) {
+ fprintf(stderr, "%s: is mounted rw, performing dry run.\n",
+ fsname);
+ dryrun = 1;
+ }
+
+ /* Ensure the fs is clean and does not have errors */
+ ret = ext2fs_open(fsname, EXT2_FLAG_64BITS | EXT2_FLAG_THREADS,
+ 0, 0, unix_io_manager, &fs);
+ if (ret) {
+ fprintf(stderr, "%s: failed to open filesystem.\n",
+ fsname);
+ return 1;
+ }
+
+ if ((fs->super->s_state & EXT2_ERROR_FS)) {
+ fprintf(stderr, "%s: errors detected, run fsck.\n",
+ fsname);
+ goto fail;
+ }
+
+ if (!dryrun && (fs->super->s_state & EXT2_VALID_FS) == 0) {
+ fprintf(stderr, "%s: unclean shutdown, performing dry run.\n",
+ fsname);
+ dryrun = 1;
+ }
+
+ /* Construct a bitmap of whatever we're corrupting */
+ if (!metadata_only) {
+ /* Load block bitmap */
+ ret = ext2fs_read_block_bitmap(fs);
+ if (ret) {
+ fprintf(stderr, "%s: error while reading block bitmap\n",
+ fsname);
+ goto fail;
+ }
+ corrupt_map = fs->block_map;
+ corrupt_bytes = (ext2fs_blocks_count(fs->super) -
+ ext2fs_free_blocks_count(fs->super)) *
+ fs->blocksize;
+ } else {
+ ret = ext2fs_allocate_block_bitmap(fs, "metadata block map",
+ &corrupt_map);
+ if (ret) {
+ fprintf(stderr, "%s: unable to create block bitmap\n",
+ fsname);
+ goto fail;
+ }
+
+ /* Iterate everything... */
+ ret = find_metadata_blocks(fs, corrupt_map, &corrupt_bytes);
+ if (ret) {
+ fprintf(stderr, "%s: while finding metadata\n",
+ fsname);
+ goto fail;
+ }
+ }
+
+ /* Run around corrupting things */
+ fd = open(fsname, O_RDWR);
+ if (fd < 0) {
+ perror(fsname);
+ goto fail;
+ }
+ srandom(getseed());
+ hsize = fs->blocksize * ext2fs_blocks_count(fs->super);
+ if (user_corrupt_bytes > 0)
+ count = user_corrupt_bytes;
+ else if (user_corrupt_pct > 0.0)
+ count = user_corrupt_pct * corrupt_bytes / 100;
+ else
+ count = rand_num(0, corrupt_bytes / 100);
+ offset = 4096; /* never corrupt superblock */
+ for (i = 0; i < count; i++) {
+ do
+ off = rand_num(offset, hsize);
+ while (!ext2fs_test_block_bitmap2(corrupt_map,
+ off / fs->blocksize));
+ c = rand() % 256;
+ if ((rand() % 2) && c < 128)
+ c |= 0x80;
+ if (verbose)
+ printf("Corrupting byte %lld in block %lld to 0x%x\n",
+ off % fs->blocksize,
+ off / fs->blocksize, c);
+ if (dryrun)
+ continue;
+#ifdef HAVE_PWRITE64
+ if (pwrite64(fd, &c, sizeof(c), off) != sizeof(c)) {
+ perror(fsname);
+ goto fail3;
+ }
+#elif HAVE_PWRITE
+ if (pwrite(fd, &c, sizeof(c), off) != sizeof(c)) {
+ perror(fsname);
+ goto fail3;
+ }
+#else
+ if (my_pwrite(fd, &c, sizeof(c), off) != sizeof(c)) {
+ perror(fsname);
+ goto fail3;
+ }
+#endif
+ }
+ close(fd);
+
+ /* Clean up */
+ ret = ext2fs_close_free(&fs);
+ if (ret) {
+ fprintf(stderr, "%s: error while closing filesystem\n",
+ fsname);
+ return 1;
+ }
+
+ return 0;
+fail3:
+ close(fd);
+ if (corrupt_map != fs->block_map)
+ ext2fs_free_block_bitmap(corrupt_map);
+fail:
+ ext2fs_close_free(&fs);
+ return 1;
+}
+
+static void print_help(const char *progname)
+{
+ printf("Usage: %s OPTIONS device\n", progname);
+ printf("-b: Corrupt this many bytes.\n");
+ printf("-d: Fuzz data blocks too.\n");
+ printf("-n: Dry run only.\n");
+ printf("-v: Verbose output.\n");
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ int c;
+
+ while ((c = getopt(argc, argv, "b:dnv")) != -1) {
+ switch (c) {
+ case 'b':
+ if (optarg[strlen(optarg) - 1] == '%') {
+ user_corrupt_pct = strtod(optarg, NULL);
+ if (user_corrupt_pct > 100 ||
+ user_corrupt_pct < 0) {
+ fprintf(stderr, "%s: Invalid percentage.\n",
+ optarg);
+ return 1;
+ }
+ } else
+ user_corrupt_bytes = strtoull(optarg, NULL, 0);
+ if (errno) {
+ perror(optarg);
+ return 1;
+ }
+ break;
+ case 'd':
+ metadata_only = 0;
+ break;
+ case 'n':
+ dryrun = 1;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ default:
+ print_help(argv[0]);
+ }
+ }
+
+ for (c = optind; c < argc; c++)
+ if (process_fs(argv[c]))
+ return 1;
+ return 0;
+}
diff --git a/misc/e2fuzz.sh b/misc/e2fuzz.sh
new file mode 100755
index 0000000..389f2ca
--- /dev/null
+++ b/misc/e2fuzz.sh
@@ -0,0 +1,327 @@
+#!/bin/bash
+
+# Test harness to fuzz a filesystem over and over...
+# Copyright (C) 2014 Oracle.
+
+DIR=/tmp
+PASSES=10000
+SZ=32m
+SCRIPT_DIR="$(dirname "$0")"
+FEATURES="has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit,metadata_csum,bigalloc,sparse_super2,inline_data"
+BLK_SZ=4096
+INODE_SZ=256
+EXTENDED_OPTS="discard"
+EXTENDED_FSCK_OPTIONS=""
+RUN_FSCK=1
+OVERRIDE_PATH=1
+HAS_FUSE2FS=0
+USE_FUSE2FS=0
+MAX_FSCK=10
+SRCDIR=/etc
+test -x "${SCRIPT_DIR}/fuse2fs" && HAS_FUSE2FS=1
+
+print_help() {
+ echo "Usage: $0 OPTIONS"
+ echo "-b: FS block size is this. (${BLK_SZ})"
+ echo "-B: Corrupt this many bytes per run."
+ echo "-d: Create test files in this directory. (${DIR})"
+ echo "-E: Extended mke2fs options."
+ echo "-f: Do not run e2fsck after each pass."
+ echo "-F: Extended e2fsck options."
+ echo "-I: Create inodes of this size. (${INODE_SZ})"
+ echo "-n: Run this many passes. (${PASSES})"
+ echo "-O: Create FS with these features."
+ echo "-p: Use system's mke2fs/e2fsck/tune2fs tools."
+ echo "-s: Create FS images of this size. (${SZ})"
+ echo "-S: Copy files from this dir. (${SRCDIR})"
+ echo "-x: Run e2fsck at most this many times. (${MAX_FSCK})"
+ test "${HAS_FUSE2FS}" -gt 0 && echo "-u: Use fuse2fs instead of the kernel."
+ exit 0
+}
+
+GETOPT="d:n:s:O:I:b:B:E:F:fpx:S:"
+test "${HAS_FUSE2FS}" && GETOPT="${GETOPT}u"
+
+while getopts "${GETOPT}" opt; do
+ case "${opt}" in
+ "B")
+ E2FUZZ_ARGS="${E2FUZZ_ARGS} -b ${OPTARG}"
+ ;;
+ "d")
+ DIR="${OPTARG}"
+ ;;
+ "n")
+ PASSES="${OPTARG}"
+ ;;
+ "s")
+ SZ="${OPTARG}"
+ ;;
+ "O")
+ FEATURES="${FEATURES},${OPTARG}"
+ ;;
+ "I")
+ INODE_SZ="${OPTARG}"
+ ;;
+ "b")
+ BLK_SZ="${OPTARG}"
+ ;;
+ "E")
+ EXTENDED_OPTS="${OPTARG}"
+ ;;
+ "F")
+ EXTENDED_FSCK_OPTS="-E ${OPTARG}"
+ ;;
+ "f")
+ RUN_FSCK=0
+ ;;
+ "p")
+ OVERRIDE_PATH=0
+ ;;
+ "u")
+ USE_FUSE2FS=1
+ ;;
+ "x")
+ MAX_FSCK="${OPTARG}"
+ ;;
+ "S")
+ SRCDIR="${OPTARG}"
+ ;;
+ *)
+ print_help
+ ;;
+ esac
+done
+
+if [ "${OVERRIDE_PATH}" -gt 0 ]; then
+ PATH="${SCRIPT_DIR}:${SCRIPT_DIR}/../e2fsck/:${PATH}"
+ export PATH
+fi
+
+TESTDIR="${DIR}/tests/"
+TESTMNT="${DIR}/mnt/"
+BASE_IMG="${DIR}/e2fuzz.img"
+
+cat > /tmp/mke2fs.conf << ENDL
+[defaults]
+ base_features = ${FEATURES}
+ default_mntopts = acl,user_xattr,block_validity
+ enable_periodic_fsck = 0
+ blocksize = ${BLK_SZ}
+ inode_size = ${INODE_SZ}
+ inode_ratio = 4096
+ cluster_size = $((BLK_SZ * 2))
+ options = ${EXTENDED_OPTS}
+ENDL
+MKE2FS_CONFIG=/tmp/mke2fs.conf
+export MKE2FS_CONFIG
+
+# Set up FS image
+echo "+ create fs image"
+umount "${TESTDIR}"
+umount "${TESTMNT}"
+rm -rf "${TESTDIR}"
+rm -rf "${TESTMNT}"
+mkdir -p "${TESTDIR}"
+mkdir -p "${TESTMNT}"
+rm -rf "${BASE_IMG}"
+truncate -s "${SZ}" "${BASE_IMG}"
+mke2fs -F -v "${BASE_IMG}"
+if [ $? -ne 0 ]; then
+ exit $?
+fi
+
+# Populate FS image
+echo "+ populate fs image"
+modprobe loop
+mount "${BASE_IMG}" "${TESTMNT}" -o loop
+if [ $? -ne 0 ]; then
+ exit $?
+fi
+SRC_SZ="$(du -ks "${SRCDIR}" | awk '{print $1}')"
+FS_SZ="$(( $(stat -f "${TESTMNT}" -c '%a * %S') / 1024 ))"
+NR="$(( (FS_SZ * 4 / 10) / SRC_SZ ))"
+if [ "${NR}" -lt 1 ]; then
+ NR=1
+fi
+echo "+ make ${NR} copies"
+seq 1 "${NR}" | while read nr; do
+ cp -pRdu "${SRCDIR}" "${TESTMNT}/test.${nr}" 2> /dev/null
+done
+umount "${TESTMNT}"
+e2fsck -fn "${BASE_IMG}"
+if [ $? -ne 0 ]; then
+ echo "fsck failed??"
+ exit 1
+fi
+
+# Run tests
+echo "+ run test"
+ret=0
+seq 1 "${PASSES}" | while read pass; do
+ echo "+ pass ${pass}"
+ PASS_IMG="${TESTDIR}/e2fuzz-${pass}.img"
+ FSCK_IMG="${TESTDIR}/e2fuzz-${pass}.fsck"
+ FUZZ_LOG="${TESTDIR}/e2fuzz-${pass}.fuzz.log"
+ OPS_LOG="${TESTDIR}/e2fuzz-${pass}.ops.log"
+
+ echo "++ corrupt image"
+ cp "${BASE_IMG}" "${PASS_IMG}"
+ if [ $? -ne 0 ]; then
+ exit $?
+ fi
+ tune2fs -L "e2fuzz-${pass}" "${PASS_IMG}"
+ e2fuzz -v "${PASS_IMG}" ${E2FUZZ_ARGS} > "${FUZZ_LOG}"
+ if [ $? -ne 0 ]; then
+ exit $?
+ fi
+
+ echo "++ mount image"
+ if [ "${USE_FUSE2FS}" -gt 0 ]; then
+ "${SCRIPT_DIR}/fuse2fs" "${PASS_IMG}" "${TESTMNT}"
+ res=$?
+ else
+ mount "${PASS_IMG}" "${TESTMNT}" -o loop
+ res=$?
+ fi
+
+ if [ "${res}" -eq 0 ]; then
+ echo "+++ ls -laR"
+ ls -laR "${TESTMNT}/test.1/" > /dev/null 2> "${OPS_LOG}"
+
+ echo "+++ cat files"
+ find "${TESTMNT}/test.1/" -type f -size -1048576k -print0 | xargs -0 cat > /dev/null 2>> "${OPS_LOG}"
+
+ echo "+++ expand"
+ find "${TESTMNT}/" -type f 2> /dev/null | head -n 50000 | while read f; do
+ attr -l "$f" > /dev/null 2>> "${OPS_LOG}"
+ if [ -f "$f" -a -w "$f" ]; then
+ dd if=/dev/zero bs="${BLK_SZ}" count=1 >> "$f" 2>> "${OPS_LOG}"
+ fi
+ mv "$f" "$f.longer" > /dev/null 2>> "${OPS_LOG}"
+ done
+ sync
+
+ echo "+++ create files"
+ cp -pRdu "${SRCDIR}" "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
+ sync
+
+ echo "+++ remove files"
+ rm -rf "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
+
+ umount "${TESTMNT}"
+ res=$?
+ if [ "${res}" -ne 0 ]; then
+ ret=1
+ break
+ fi
+ sync
+ test "${USE_FUSE2FS}" -gt 0 && sleep 2
+ fi
+ if [ "${RUN_FSCK}" -gt 0 ]; then
+ cp "${PASS_IMG}" "${FSCK_IMG}"
+ pass_img_sz="$(stat -c '%s' "${PASS_IMG}")"
+
+ seq 1 "${MAX_FSCK}" | while read fsck_pass; do
+ echo "++ fsck pass ${fsck_pass}: $(which e2fsck) -fy ${FSCK_IMG} ${EXTENDED_FSCK_OPTS}"
+ FSCK_LOG="${TESTDIR}/e2fuzz-${pass}-${fsck_pass}.log"
+ e2fsck -fy "${FSCK_IMG}" ${EXTENDED_FSCK_OPTS} > "${FSCK_LOG}" 2>&1
+ res=$?
+ echo "++ fsck returns ${res}"
+ if [ "${res}" -eq 0 ]; then
+ exit 0
+ elif [ "${fsck_pass}" -eq "${MAX_FSCK}" ]; then
+ echo "++ fsck did not fix in ${MAX_FSCK} passes."
+ exit 1
+ fi
+ if [ "${res}" -gt 0 -a \
+ "$(grep 'Memory allocation failed' "${FSCK_LOG}" | wc -l)" -gt 0 ]; then
+ echo "++ Ran out of memory, get more RAM"
+ exit 0
+ fi
+ if [ "${res}" -gt 0 -a \
+ "$(grep 'Could not allocate block' "${FSCK_LOG}" | wc -l)" -gt 0 -a \
+ "$(dumpe2fs -h "${FSCK_IMG}" | grep '^Free blocks:' | awk '{print $3}')0" -eq 0 ]; then
+ echo "++ Ran out of space, get a bigger image"
+ exit 0
+ fi
+ if [ "${fsck_pass}" -gt 1 ]; then
+ diff -u "${TESTDIR}/e2fuzz-${pass}-$((fsck_pass - 1)).log" "${FSCK_LOG}"
+ if [ $? -eq 0 ]; then
+ echo "++ fsck makes no progress"
+ exit 2
+ fi
+ fi
+
+ fsck_img_sz="$(stat -c '%s' "${FSCK_IMG}")"
+ if [ "${fsck_img_sz}" -ne "${pass_img_sz}" ]; then
+ echo "++ fsck image size changed"
+ exit 3
+ fi
+ done
+ fsck_loop_ret=$?
+ if [ "${fsck_loop_ret}" -gt 0 ]; then
+ break;
+ fi
+ fi
+
+ echo "+++ check fs for round 2"
+ FSCK_LOG="${TESTDIR}/e2fuzz-${pass}-round2.log"
+ e2fsck -fn "${FSCK_IMG}" ${EXTENDED_FSCK_OPTS} >> "${FSCK_LOG}" 2>&1
+ res=$?
+ if [ "${res}" -ne 0 ]; then
+ echo "++++ fsck failed."
+ exit 1
+ fi
+
+ echo "++ mount image (2)"
+ mount "${FSCK_IMG}" "${TESTMNT}" -o loop
+ res=$?
+
+ if [ "${res}" -eq 0 ]; then
+ echo "+++ ls -laR (2)"
+ ls -laR "${TESTMNT}/test.1/" > /dev/null 2> "${OPS_LOG}"
+
+ echo "+++ cat files (2)"
+ find "${TESTMNT}/test.1/" -type f -size -1048576k -print0 | xargs -0 cat > /dev/null 2>> "${OPS_LOG}"
+
+ echo "+++ expand (2)"
+ find "${TESTMNT}/" -type f 2> /dev/null | head -n 50000 | while read f; do
+ attr -l "$f" > /dev/null 2>> "${OPS_LOG}"
+ if [ -f "$f" -a -w "$f" ]; then
+ dd if=/dev/zero bs="${BLK_SZ}" count=1 >> "$f" 2>> "${OPS_LOG}"
+ fi
+ mv "$f" "$f.longer" > /dev/null 2>> "${OPS_LOG}"
+ done
+ sync
+
+ echo "+++ create files (2)"
+ cp -pRdu "${SRCDIR}" "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
+ sync
+
+ echo "+++ remove files (2)"
+ rm -rf "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
+
+ umount "${TESTMNT}"
+ res=$?
+ if [ "${res}" -ne 0 ]; then
+ ret=1
+ break
+ fi
+ sync
+ test "${USE_FUSE2FS}" -gt 0 && sleep 2
+
+ echo "+++ check fs (2)"
+ e2fsck -fn "${FSCK_IMG}" >> "${FSCK_LOG}" 2>&1
+ res=$?
+ if [ "${res}" -ne 0 ]; then
+ echo "++ fsck failed."
+ exit 1
+ fi
+ else
+ echo "++ mount(2) failed with ${res}"
+ exit 1
+ fi
+ rm -rf "${FSCK_IMG}" "${PASS_IMG}" "${FUZZ_LOG}" "${TESTDIR}"/e2fuzz*.log
+done
+
+exit $ret
diff --git a/misc/e2image.8.in b/misc/e2image.8.in
new file mode 100644
index 0000000..90ea0c2
--- /dev/null
+++ b/misc/e2image.8.in
@@ -0,0 +1,335 @@
+.\" -*- nroff -*-
+.\" Copyright 2001 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH E2IMAGE 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2image \- Save critical ext2/ext3/ext4 file system metadata to a file
+
+.SH SYNOPSIS
+.B e2image
+.RB [ \-r | \-Q " [" \-af ]]
+[
+.B \-b
+.I superblock
+]
+[
+.B \-B
+.I blocksize
+]
+[
+.B \-cnps
+]
+[
+.B \-o
+.I src_offset
+]
+[
+.B \-O
+.I dest_offset
+]
+.I device
+.I image-file
+.br
+.B e2image
+.B \-I
+.I device
+.I image-file
+
+.SH DESCRIPTION
+The
+.B e2image
+program will save critical ext2, ext3, or ext4 file system metadata located on
+.I device
+to a file specified by
+.IR image-file .
+The image file may be examined by
+.B dumpe2fs
+and
+.BR debugfs ,
+by using the
+.B \-i
+option to those programs. This can assist an expert in recovering
+catastrophically corrupted file systems.
+.PP
+It is a very good idea to create image files for all file systems on a
+system and save the partition layout (which can be generated using the
+.B fdisk \-l
+command) at regular intervals --- at boot time, and/or every week or so.
+The image file should be stored on some file system other than
+the file system whose data it contains, to ensure that this data is
+accessible in the case where the file system has been badly damaged.
+.PP
+To save disk space,
+.B e2image
+creates the image file as a sparse file, or in QCOW2 format. Hence, if
+the sparse image file needs to be copied to another location, it should
+either be compressed first or copied using the
+.B \-\-sparse=always
+option to the GNU version of
+.BR cp (1).
+This does not apply to the QCOW2 image, which is not sparse.
+.PP
+The size of an ext2 image file depends primarily on the size of the
+file systems and how many inodes are in use. For a typical 10 Gigabyte
+file system, with 200,000 inodes in use out of 1.2 million inodes, the image
+file will be approximately 35 Megabytes; a 4 Gigabyte file system with 15,000
+inodes in use out of 550,000 inodes will result in a 3 Megabyte image file.
+Image files tend to be quite compressible; an image file taking up 32 Megabytes
+of space on disk will generally compress down to 3 or 4 Megabytes.
+.PP
+If
+.I image-file
+is
+.BR \- ,
+then the output of
+.B e2image
+will be sent to standard output, so that the output can be piped to
+another program, such as
+.BR gzip (1).
+(Note that this is currently only supported when
+creating a raw image file using the
+.B \-r
+option, since the process of creating a normal image file, or QCOW2
+image currently
+requires random access to the file, which cannot be done using a
+pipe.
+
+.SH OPTIONS
+.TP
+.B \-a
+Include file data in the image file. Normally
+.B e2image
+only includes fs metadata, not regular file data. This option will
+produce an image that is suitable to use to clone the entire FS or
+for backup purposes. Note that this option only works with the
+raw
+.RI ( \-r )
+or QCOW2
+.RI ( \-Q )
+formats. In conjunction with the
+.B \-r
+option it is possible to clone all and only the used blocks of one
+file system to another device/image file.
+.TP
+.BI \-b " superblock"
+Get image from partition with broken primary superblock by using
+the superblock located at file system block number
+.IR superblock .
+The partition is copied as-is including broken primary superblock.
+.TP
+.BI \-B " blocksize"
+Set the file system blocksize in bytes. Normally,
+.B e2image
+will search for the superblock at various different block sizes in an
+attempt to find the appropriate blocksize. This search can be fooled in
+some cases. This option forces e2fsck to only try locating the superblock
+with a particular blocksize. If the superblock is not found, e2image will
+terminate with a fatal error.
+.TP
+.BI \-c
+Compare each block to be copied from the source
+.I device
+to the corresponding block in the target
+.IR image-file .
+If both are already the same, the write will be skipped. This is
+useful if the file system is being cloned to a flash-based storage device
+(where reads are very fast and where it is desirable to avoid unnecessary
+writes to reduce write wear on the device).
+.TP
+.B \-f
+Override the read-only requirement for the source file system when saving
+the image file using the
+.B \-r
+and
+.B \-Q
+options. Normally, if the source file system is in use, the resulting image
+file is very likely not going to be useful. In some cases where the source
+file system is in constant use this may be better than no image at all.
+.TP
+.B \-I
+install the metadata stored in the image file back to the device.
+It can be used to restore the file system metadata back to the device
+in emergency situations.
+.PP
+.B WARNING!!!!
+The
+.B \-I
+option should only be used as a desperation measure when other
+alternatives have failed. If the file system has changed since the image
+file was created, data
+.B will
+be lost. In general, you should make another full image backup of the
+file system first, in case you wish to try other recovery strategies afterward.
+.TP
+.B \-n
+Cause all image writes to be skipped, and instead only print the block
+numbers that would have been written.
+.TP
+.BI \-o " src_offset"
+Specify offset of the image to be read from the start of the source
+.I device
+in bytes. See
+.B OFFSETS
+for more details.
+.TP
+.BI \-O " tgt_offset"
+Specify offset of the image to be written from the start of the target
+.I image-file
+in bytes. See
+.B OFFSETS
+for more details.
+.TP
+.B \-p
+Show progress of image-file creation.
+.TP
+.B \-Q
+Create a QCOW2-format image file instead of a normal image file, suitable
+for use by virtual machine images, and other tools that can use the
+.B .qcow
+image format. See
+.B QCOW2 IMAGE FILES
+below for details.
+.TP
+.B \-r
+Create a raw image file instead of a normal image file. See
+.B RAW IMAGE FILES
+below for details.
+.TP
+.B \-s
+Scramble directory entries and zero out unused portions of the directory
+blocks in the written image file to avoid revealing information about
+the contents of the file system. However, this will prevent analysis of
+problems related to hash-tree indexed directories.
+
+.SH RAW IMAGE FILES
+The
+.B \-r
+option will create a raw image file, which differs
+from a normal image file in two ways. First, the file system metadata is
+placed in the same relative offset within
+.I image-file
+as it is in the
+.I device
+so that
+.BR debugfs (8),
+.BR dumpe2fs (8),
+.BR e2fsck (8),
+.BR losetup (8),
+etc. and can be run directly on the raw image file. In order to minimize
+the amount of disk space consumed by the raw image file, it is
+created as a sparse file. (Beware of copying or
+compressing/decompressing this file with utilities that don't understand
+how to create sparse files; the file will become as large as the
+file system itself!) Secondly, the raw image file also includes indirect
+blocks and directory blocks, which the standard image file does not have.
+.PP
+Raw image files are sometimes used when sending file systems to the maintainer
+as part of bug reports to e2fsprogs. When used in this capacity, the
+recommended command is as follows (replace
+.B hda1
+with the appropriate device for your system):
+.PP
+.br
+ \fBe2image \-r /dev/hda1 \- | bzip2 > hda1.e2i.bz2\fR
+.PP
+This will only send the metadata information, without any data blocks.
+However, the filenames in the directory blocks can still reveal
+information about the contents of the file system that the bug reporter
+may wish to keep confidential. To address this concern, the
+.B \-s
+option can be specified to scramble the filenames in the image.
+.PP
+Note that this will work even if you substitute
+.B /dev/hda1
+for another raw
+disk image, or QCOW2 image previously created by
+.BR e2image .
+
+.SH QCOW2 IMAGE FILES
+The
+.B \-Q
+option will create a QCOW2 image file instead of a normal, or raw image file.
+A QCOW2 image contains all the information the raw image does, however unlike
+the raw image it is not sparse. The QCOW2 image minimize the amount of space
+used by the image by storing it in special format which packs data closely
+together, hence avoiding holes while still minimizing size.
+.PP
+In order to send file system to the maintainer as a part of bug report to
+e2fsprogs, use following commands (replace
+.B hda1
+with the appropriate device for your system):
+.PP
+.br
+\ \fBe2image \-Q /dev/hda1 hda1.qcow2\fR
+.br
+\ \fBbzip2 -z hda1.qcow2\fR
+.PP
+This will only send the metadata information, without any data blocks.
+As described for
+.B RAW IMAGE FILES
+the
+.B \-s
+option can be specified to scramble the file system names in the image.
+.PP
+Note that the QCOW2 image created by
+.B e2image
+is a regular QCOW2 image and can be processed by tools aware of QCOW2 format
+such as for example
+.BR qemu-img .
+.PP
+You can convert a .qcow2 image into a raw image with:
+.PP
+.br
+\ \fBe2image \-r hda1.qcow2 hda1.raw\fR
+.br
+.PP
+This can be useful to write a QCOW2 image containing all data to a
+sparse image file where it can be loop mounted, or to a disk partition.
+Note that this may not work with QCOW2 images not generated by e2image.
+
+.SH OFFSETS
+Normally a file system starts at the beginning of a partition, and
+.B e2image
+is run on the partition. When working with image files, you don't
+have the option of using the partition device, so you can specify
+the offset where the file system starts directly with the
+.B \-o
+option. Similarly the
+.B \-O
+option specifies the offset that should be seeked to in the destination
+before writing the file system.
+.PP
+For example, if you have a
+.B dd
+image of a whole hard drive that contains an ext2 fs in a partition
+starting at 1 MiB, you can clone that image to a block device with:
+.PP
+.br
+\ \fBe2image \-aro 1048576 img /dev/sda1\fR
+.br
+.PP
+Or you can clone a file system from a block device into an image file,
+leaving room in the first MiB for a partition table with:
+.PP
+.br
+\ \fBe2image -arO 1048576 /dev/sda1 img\fR
+.br
+.PP
+If you specify at least one offset, and only one file, an in-place
+move will be performed, allowing you to safely move the file system
+from one offset to another.
+
+.SH AUTHOR
+.B e2image
+was written by Theodore Ts'o (tytso@mit.edu).
+
+.SH AVAILABILITY
+.B e2image
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+
+.SH SEE ALSO
+.BR dumpe2fs (8),
+.BR debugfs (8)
+.BR e2fsck (8)
diff --git a/misc/e2image.c b/misc/e2image.c
new file mode 100644
index 0000000..1ae0300
--- /dev/null
+++ b/misc/e2image.c
@@ -0,0 +1,1745 @@
+/*
+ * e2image.c --- Program which writes an image file backing up
+ * critical metadata for the filesystem.
+ *
+ * Copyright 2000, 2001 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#include <fcntl.h>
+#include <grp.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <pwd.h>
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <assert.h>
+#include <signal.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "ext2fs/ext2fsP.h"
+#include "et/com_err.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+#include "ext2fs/e2image.h"
+#include "ext2fs/qcow2.h"
+
+#include "support/nls-enable.h"
+#include "support/plausible.h"
+#include "support/quotaio.h"
+#include "../version.h"
+
+#define QCOW_OFLAG_COPIED (1ULL << 63)
+#define NO_BLK ((blk64_t) -1)
+
+/* Image types */
+#define E2IMAGE_RAW 1
+#define E2IMAGE_QCOW2 2
+
+/* Image flags */
+#define E2IMAGE_INSTALL_FLAG 1
+#define E2IMAGE_SCRAMBLE_FLAG 2
+#define E2IMAGE_IS_QCOW2_FLAG 4
+#define E2IMAGE_CHECK_ZERO_FLAG 8
+
+static const char * program_name = "e2image";
+static char * device_name = NULL;
+static char all_data;
+static char output_is_blk;
+static char nop_flag;
+/* writing to blk device: don't skip zeroed blocks */
+static blk64_t source_offset, dest_offset;
+static char move_mode;
+static char show_progress;
+static char *check_buf;
+static int skipped_blocks;
+
+static blk64_t align_offset(blk64_t offset, unsigned int n)
+{
+ return (offset + n - 1) & ~((blk64_t) n - 1);
+}
+
+static int get_bits_from_size(size_t size)
+{
+ int res = 0;
+
+ if (size == 0)
+ return -1;
+
+ while (size != 1) {
+ /* Not a power of two */
+ if (size & 1)
+ return -1;
+
+ size >>= 1;
+ res++;
+ }
+ return res;
+}
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] "
+ "device image-file\n"),
+ program_name);
+ fprintf(stderr, _(" %s -I device image-file\n"), program_name);
+ fprintf(stderr, _(" %s -ra [ -cfnp ] [ -o src_offset ] "
+ "[ -O dest_offset ] src_fs [ dest_fs ]\n"),
+ program_name);
+ exit (1);
+}
+
+static ext2_loff_t seek_relative(int fd, int offset)
+{
+ ext2_loff_t ret = ext2fs_llseek(fd, offset, SEEK_CUR);
+ if (ret < 0) {
+ perror("seek_relative");
+ exit(1);
+ }
+ return ret;
+}
+
+static ext2_loff_t seek_set(int fd, ext2_loff_t offset)
+{
+ ext2_loff_t ret = ext2fs_llseek(fd, offset, SEEK_SET);
+ if (ret < 0) {
+ perror("seek_set");
+ exit(1);
+ }
+ return ret;
+}
+
+/*
+ * Returns true if the block we are about to write is identical to
+ * what is already on the disk.
+ */
+static int check_block(int fd, void *buf, void *cbuf, int blocksize)
+{
+ char *cp = cbuf;
+ int count = blocksize, ret;
+
+ if (cbuf == NULL)
+ return 0;
+
+ while (count > 0) {
+ ret = read(fd, cp, count);
+ if (ret < 0) {
+ perror("check_block");
+ exit(1);
+ }
+ count -= ret;
+ cp += ret;
+ }
+ ret = memcmp(buf, cbuf, blocksize);
+ seek_relative(fd, -blocksize);
+ return (ret == 0) ? 1 : 0;
+}
+
+static void generic_write(int fd, void *buf, int blocksize, blk64_t block)
+{
+ int count, free_buf = 0;
+ errcode_t err;
+
+ if (!blocksize)
+ return;
+
+ if (!buf) {
+ free_buf = 1;
+ err = ext2fs_get_arrayzero(1, blocksize, &buf);
+ if (err) {
+ com_err(program_name, err, "%s",
+ _("while allocating buffer"));
+ exit(1);
+ }
+ }
+ if (nop_flag) {
+ printf(_("Writing block %llu\n"), (unsigned long long) block);
+ if (fd != 1)
+ seek_relative(fd, blocksize);
+ goto free_and_return;
+ }
+ count = write(fd, buf, blocksize);
+ if (count != blocksize) {
+ if (count == -1)
+ err = errno;
+ else
+ err = 0;
+
+ if (block)
+ com_err(program_name, err,
+ _("error writing block %llu"),
+ (unsigned long long) block);
+ else
+ com_err(program_name, err, "%s",
+ _("error in generic_write()"));
+
+ exit(1);
+ }
+free_and_return:
+ if (free_buf)
+ ext2fs_free_mem(&buf);
+}
+
+static void write_header(int fd, void *hdr, int hdr_size, int wrt_size)
+{
+ char *header_buf;
+ int ret;
+
+ /* Sanity check */
+ if (hdr_size > wrt_size) {
+ fprintf(stderr, "%s",
+ _("Error: header size is bigger than wrt_size\n"));
+ }
+
+ ret = ext2fs_get_mem(wrt_size, &header_buf);
+ if (ret) {
+ fputs(_("Couldn't allocate header buffer\n"), stderr);
+ exit(1);
+ }
+
+ seek_set(fd, 0);
+ memset(header_buf, 0, wrt_size);
+
+ if (hdr)
+ memcpy(header_buf, hdr, hdr_size);
+
+ generic_write(fd, header_buf, wrt_size, NO_BLK);
+
+ ext2fs_free_mem(&header_buf);
+}
+
+static void write_image_file(ext2_filsys fs, int fd)
+{
+ struct ext2_image_hdr hdr;
+ struct stat st;
+ errcode_t retval;
+
+ write_header(fd, NULL, sizeof(struct ext2_image_hdr), fs->blocksize);
+ memset(&hdr, 0, sizeof(struct ext2_image_hdr));
+
+ hdr.offset_super = ext2fs_cpu_to_le32(seek_relative(fd, 0));
+ retval = ext2fs_image_super_write(fs, fd, 0);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while writing superblock"));
+ exit(1);
+ }
+
+ hdr.offset_inode = ext2fs_cpu_to_le32(seek_relative(fd, 0));
+ retval = ext2fs_image_inode_write(fs, fd,
+ (fd != 1) ? IMAGER_FLAG_SPARSEWRITE : 0);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while writing inode table"));
+ exit(1);
+ }
+
+ hdr.offset_blockmap = ext2fs_cpu_to_le32(seek_relative(fd, 0));
+ retval = ext2fs_image_bitmap_write(fs, fd, 0);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while writing block bitmap"));
+ exit(1);
+ }
+
+ hdr.offset_inodemap = ext2fs_cpu_to_le32(seek_relative(fd, 0));
+ retval = ext2fs_image_bitmap_write(fs, fd, IMAGER_FLAG_INODEMAP);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while writing inode bitmap"));
+ exit(1);
+ }
+
+ hdr.magic_number = ext2fs_cpu_to_le32(EXT2_ET_MAGIC_E2IMAGE);
+ strcpy(hdr.magic_descriptor, "Ext2 Image 1.0");
+ gethostname(hdr.fs_hostname, sizeof(hdr.fs_hostname));
+ strncpy(hdr.fs_device_name, device_name, sizeof(hdr.fs_device_name)-1);
+ hdr.fs_device_name[sizeof(hdr.fs_device_name) - 1] = 0;
+ hdr.fs_blocksize = ext2fs_cpu_to_le32(fs->blocksize);
+
+ if (stat(device_name, &st) == 0)
+ hdr.fs_device = ext2fs_cpu_to_le32(st.st_rdev);
+
+ if (fstat(fd, &st) == 0) {
+ hdr.image_device = ext2fs_cpu_to_le32(st.st_dev);
+ hdr.image_inode = ext2fs_cpu_to_le32(st.st_ino);
+ }
+ memcpy(hdr.fs_uuid, fs->super->s_uuid, sizeof(hdr.fs_uuid));
+
+ hdr.image_time = ext2fs_cpu_to_le32(time(0));
+ write_header(fd, &hdr, sizeof(struct ext2_image_hdr), fs->blocksize);
+}
+
+/*
+ * These set of functions are used to write a RAW image file.
+ */
+static ext2fs_block_bitmap meta_block_map;
+static ext2fs_block_bitmap scramble_block_map; /* Directory blocks to be scrambled */
+static blk64_t meta_blocks_count;
+
+struct process_block_struct {
+ ext2_ino_t ino;
+ int is_dir;
+};
+
+/*
+ * These subroutines short circuits ext2fs_get_blocks and
+ * ext2fs_check_directory; we use them since we already have the inode
+ * structure, so there's no point in letting the ext2fs library read
+ * the inode again.
+ */
+static ext2_ino_t stashed_ino = 0;
+static struct ext2_inode *stashed_inode;
+
+static errcode_t meta_get_blocks(ext2_filsys fs EXT2FS_ATTR((unused)),
+ ext2_ino_t ino,
+ blk_t *blocks)
+{
+ int i;
+
+ if ((ino != stashed_ino) || !stashed_inode)
+ return EXT2_ET_CALLBACK_NOTHANDLED;
+
+ for (i=0; i < EXT2_N_BLOCKS; i++)
+ blocks[i] = stashed_inode->i_block[i];
+ return 0;
+}
+
+static errcode_t meta_check_directory(ext2_filsys fs EXT2FS_ATTR((unused)),
+ ext2_ino_t ino)
+{
+ if ((ino != stashed_ino) || !stashed_inode)
+ return EXT2_ET_CALLBACK_NOTHANDLED;
+
+ if (!LINUX_S_ISDIR(stashed_inode->i_mode))
+ return EXT2_ET_NO_DIRECTORY;
+ return 0;
+}
+
+static errcode_t meta_read_inode(ext2_filsys fs EXT2FS_ATTR((unused)),
+ ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ if ((ino != stashed_ino) || !stashed_inode)
+ return EXT2_ET_CALLBACK_NOTHANDLED;
+ *inode = *stashed_inode;
+ return 0;
+}
+
+static void use_inode_shortcuts(ext2_filsys fs, int use_shortcuts)
+{
+ if (use_shortcuts) {
+ fs->get_blocks = meta_get_blocks;
+ fs->check_directory = meta_check_directory;
+ fs->read_inode = meta_read_inode;
+ stashed_ino = 0;
+ } else {
+ fs->get_blocks = 0;
+ fs->check_directory = 0;
+ fs->read_inode = 0;
+ }
+}
+
+static int process_dir_block(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data EXT2FS_ATTR((unused)))
+{
+ struct process_block_struct *p;
+
+ p = (struct process_block_struct *) priv_data;
+
+ ext2fs_mark_block_bitmap2(meta_block_map, *block_nr);
+ meta_blocks_count++;
+ if (scramble_block_map && p->is_dir && blockcnt >= 0)
+ ext2fs_mark_block_bitmap2(scramble_block_map, *block_nr);
+ return 0;
+}
+
+static int process_file_block(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data EXT2FS_ATTR((unused)))
+{
+ if (blockcnt < 0 || all_data) {
+ ext2fs_mark_block_bitmap2(meta_block_map, *block_nr);
+ meta_blocks_count++;
+ }
+ return 0;
+}
+
+static void mark_table_blocks(ext2_filsys fs)
+{
+ blk64_t first_block, b;
+ unsigned int i,j;
+
+ first_block = fs->super->s_first_data_block;
+ /*
+ * Mark primary superblock
+ */
+ ext2fs_mark_block_bitmap2(meta_block_map, first_block);
+ meta_blocks_count++;
+
+ /*
+ * Mark the primary superblock descriptors
+ */
+ for (j = 0; j < fs->desc_blocks; j++) {
+ ext2fs_mark_block_bitmap2(meta_block_map,
+ ext2fs_descriptor_block_loc2(fs, first_block, j));
+ }
+ meta_blocks_count += fs->desc_blocks;
+
+ /*
+ * Mark MMP block
+ */
+ if (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) {
+ ext2fs_mark_block_bitmap2(meta_block_map, fs->super->s_mmp_block);
+ meta_blocks_count++;
+ }
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ /*
+ * Mark the blocks used for the inode table
+ */
+ if ((output_is_blk ||
+ !ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT)) &&
+ ext2fs_inode_table_loc(fs, i)) {
+ unsigned int end = (unsigned) fs->inode_blocks_per_group;
+ /* skip unused blocks */
+ if (!output_is_blk && ext2fs_has_group_desc_csum(fs))
+ end -= (ext2fs_bg_itable_unused(fs, i) /
+ EXT2_INODES_PER_BLOCK(fs->super));
+ for (j = 0, b = ext2fs_inode_table_loc(fs, i);
+ j < end;
+ j++, b++) {
+ ext2fs_mark_block_bitmap2(meta_block_map, b);
+ meta_blocks_count++;
+ }
+ }
+
+ /*
+ * Mark block used for the block bitmap
+ */
+ if (!ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
+ ext2fs_block_bitmap_loc(fs, i)) {
+ ext2fs_mark_block_bitmap2(meta_block_map,
+ ext2fs_block_bitmap_loc(fs, i));
+ meta_blocks_count++;
+ }
+
+ /*
+ * Mark block used for the inode bitmap
+ */
+ if (!ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT) &&
+ ext2fs_inode_bitmap_loc(fs, i)) {
+ ext2fs_mark_block_bitmap2(meta_block_map,
+ ext2fs_inode_bitmap_loc(fs, i));
+ meta_blocks_count++;
+ }
+ }
+}
+
+/*
+ * This function returns 1 if the specified block is all zeros
+ */
+static int check_zero_block(char *buf, int blocksize)
+{
+ char *cp = buf;
+ int left = blocksize;
+
+ if (output_is_blk)
+ return 0;
+ while (left > 0) {
+ if (*cp++)
+ return 0;
+ left--;
+ }
+ return 1;
+}
+
+static int name_id[256];
+
+#define EXT4_MAX_REC_LEN ((1<<16)-1)
+
+static void scramble_dir_block(ext2_filsys fs, blk64_t blk, char *buf)
+{
+ char *p, *end, *cp;
+ struct ext2_dir_entry_2 *dirent;
+ unsigned int rec_len;
+ int id, len;
+
+ end = buf + fs->blocksize;
+ for (p = buf; p < end-8; p += rec_len) {
+ dirent = (struct ext2_dir_entry_2 *) p;
+ rec_len = dirent->rec_len;
+#ifdef WORDS_BIGENDIAN
+ rec_len = ext2fs_swab16(rec_len);
+#endif
+ if (rec_len == EXT4_MAX_REC_LEN || rec_len == 0)
+ rec_len = fs->blocksize;
+ else
+ rec_len = (rec_len & 65532) | ((rec_len & 3) << 16);
+#if 0
+ printf("rec_len = %d, name_len = %d\n", rec_len, dirent->name_len);
+#endif
+ if (rec_len < 8 || (rec_len % 4) ||
+ (p+rec_len > end)) {
+ printf(_("Corrupt directory block %llu: "
+ "bad rec_len (%d)\n"),
+ (unsigned long long) blk, rec_len);
+ rec_len = end - p;
+ (void) ext2fs_set_rec_len(fs, rec_len,
+ (struct ext2_dir_entry *) dirent);
+#ifdef WORDS_BIGENDIAN
+ dirent->rec_len = ext2fs_swab16(dirent->rec_len);
+#endif
+ continue;
+ }
+ if (dirent->name_len + 8U > rec_len) {
+ printf(_("Corrupt directory block %llu: "
+ "bad name_len (%d)\n"),
+ (unsigned long long) blk, dirent->name_len);
+ dirent->name_len = rec_len - 8;
+ continue;
+ }
+ cp = p+8;
+ len = rec_len - dirent->name_len - 8;
+ if (len > 0)
+ memset(cp+dirent->name_len, 0, len);
+ if (dirent->name_len==1 && cp[0] == '.')
+ continue;
+ if (dirent->name_len==2 && cp[0] == '.' && cp[1] == '.')
+ continue;
+
+ memset(cp, 'A', dirent->name_len);
+ len = dirent->name_len;
+ id = name_id[len]++;
+ while ((len > 0) && (id > 0)) {
+ *cp += id % 26;
+ id = id / 26;
+ cp++;
+ len--;
+ }
+ }
+}
+
+static char got_sigint;
+
+static void sigint_handler(int unused EXT2FS_ATTR((unused)))
+{
+ got_sigint = 1;
+ signal (SIGINT, SIG_DFL);
+}
+
+#define calc_percent(a, b) ((int) ((100.0 * (((float) (a)) / \
+ ((float) (b)))) + 0.5))
+#define calc_rate(t, b, d) (((float)(t) / ((float)(1024 * 1024) / (b))) / (d))
+
+static int print_progress(blk64_t num, blk64_t total)
+{
+ return fprintf(stderr, _("%llu / %llu blocks (%d%%)"),
+ (unsigned long long) num,
+ (unsigned long long) total,
+ calc_percent(num, total));
+}
+
+static void output_meta_data_blocks(ext2_filsys fs, int fd, int flags)
+{
+ errcode_t retval;
+ blk64_t blk;
+ char *buf, *zero_buf;
+ int sparse = 0;
+ blk64_t start = 0;
+ blk64_t distance = 0;
+ blk64_t end = ext2fs_blocks_count(fs->super);
+ time_t last_update = 0;
+ time_t start_time = 0;
+ blk64_t total_written = 0;
+ int bscount = 0;
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while allocating buffer"));
+ exit(1);
+ }
+ retval = ext2fs_get_memzero(fs->blocksize, &zero_buf);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while allocating buffer"));
+ exit(1);
+ }
+ if (show_progress) {
+ fprintf(stderr, "%s", _("Copying "));
+ bscount = print_progress(total_written, meta_blocks_count);
+ fflush(stderr);
+ last_update = time(NULL);
+ start_time = time(NULL);
+ }
+ /* when doing an in place move to the right, you can't start
+ at the beginning or you will overwrite data, so instead
+ divide the fs up into distance size chunks and write them
+ in reverse. */
+ if (move_mode && dest_offset > source_offset) {
+ distance = (dest_offset - source_offset) / fs->blocksize;
+ if (distance < ext2fs_blocks_count(fs->super))
+ start = ext2fs_blocks_count(fs->super) - distance;
+ }
+ if (move_mode)
+ signal (SIGINT, sigint_handler);
+more_blocks:
+ if (distance)
+ seek_set(fd, (start * fs->blocksize) + dest_offset);
+ for (blk = start; blk < end; blk++) {
+ if (got_sigint) {
+ if (distance) {
+ /* moving to the right */
+ if (distance >= ext2fs_blocks_count(fs->super)||
+ start == ext2fs_blocks_count(fs->super) -
+ distance)
+ kill(getpid(), SIGINT);
+ } else {
+ /* moving to the left */
+ if (blk < (source_offset - dest_offset) /
+ fs->blocksize)
+ kill(getpid(), SIGINT);
+ }
+ if (show_progress)
+ fputc('\r', stderr);
+ fprintf(stderr, "%s",
+ _("Stopping now will destroy the filesystem, "
+ "interrupt again if you are sure\n"));
+ if (show_progress) {
+ fprintf(stderr, "%s", _("Copying "));
+ bscount = print_progress(total_written,
+ meta_blocks_count);
+ fflush(stderr);
+ }
+
+ got_sigint = 0;
+ }
+ if (show_progress && last_update != time(NULL)) {
+ time_t duration;
+ last_update = time(NULL);
+ while (bscount--)
+ fputc('\b', stderr);
+ bscount = print_progress(total_written,
+ meta_blocks_count);
+ duration = time(NULL) - start_time;
+ if (duration > 5 && total_written) {
+ time_t est = (duration * meta_blocks_count /
+ total_written) - duration;
+ char buff[30];
+ strftime(buff, 30, "%T", gmtime(&est));
+ bscount +=
+ fprintf(stderr,
+ _(" %s remaining at %.2f MB/s"),
+ buff, calc_rate(total_written,
+ fs->blocksize,
+ duration));
+ }
+ fflush (stderr);
+ }
+ if ((blk >= fs->super->s_first_data_block) &&
+ ext2fs_test_block_bitmap2(meta_block_map, blk)) {
+ retval = io_channel_read_blk64(fs->io, blk, 1, buf);
+ if (retval) {
+ com_err(program_name, retval,
+ _("error reading block %llu"),
+ (unsigned long long) blk);
+ }
+ total_written++;
+ if (scramble_block_map &&
+ ext2fs_test_block_bitmap2(scramble_block_map, blk))
+ scramble_dir_block(fs, blk, buf);
+ if ((flags & E2IMAGE_CHECK_ZERO_FLAG) &&
+ check_zero_block(buf, fs->blocksize))
+ goto sparse_write;
+ if (sparse)
+ seek_relative(fd, sparse);
+ sparse = 0;
+ if (check_block(fd, buf, check_buf, fs->blocksize)) {
+ seek_relative(fd, fs->blocksize);
+ skipped_blocks++;
+ } else
+ generic_write(fd, buf, fs->blocksize, blk);
+ } else {
+ sparse_write:
+ if (fd == 1) {
+ if (!nop_flag)
+ generic_write(fd, zero_buf,
+ fs->blocksize, blk);
+ continue;
+ }
+ sparse += fs->blocksize;
+ if (sparse > 1024*1024) {
+ seek_relative(fd, 1024*1024);
+ sparse -= 1024*1024;
+ }
+ }
+ }
+ if (distance && start) {
+ if (start < distance) {
+ end = start;
+ start = 0;
+ } else {
+ end -= distance;
+ start -= distance;
+ if (end < distance) {
+ /* past overlap, do rest in one go */
+ end = start;
+ start = 0;
+ }
+ }
+ sparse = 0;
+ goto more_blocks;
+ }
+ signal (SIGINT, SIG_DFL);
+ if (show_progress) {
+ time_t duration = time(NULL) - start_time;
+ char buff[30];
+ fputc('\r', stderr);
+ strftime(buff, 30, "%T", gmtime(&duration));
+ fprintf(stderr, _("Copied %llu / %llu blocks (%d%%) in %s "),
+ (unsigned long long) total_written,
+ (unsigned long long) meta_blocks_count,
+ calc_percent(total_written, meta_blocks_count), buff);
+ if (duration)
+ fprintf(stderr, _("at %.2f MB/s"),
+ calc_rate(total_written, fs->blocksize, duration));
+ fputs(" \n", stderr);
+ }
+#ifdef HAVE_FTRUNCATE64
+ if (sparse) {
+ ext2_loff_t offset;
+ if (distance)
+ offset = seek_set(fd,
+ fs->blocksize * ext2fs_blocks_count(fs->super) + dest_offset);
+ else
+ offset = seek_relative(fd, sparse);
+
+ if (ftruncate64(fd, offset) < 0) {
+ seek_relative(fd, -1);
+ generic_write(fd, zero_buf, 1, NO_BLK);
+ }
+ }
+#else
+ if (sparse && !distance) {
+ seek_relative(fd, sparse-1);
+ generic_write(fd, zero_buf, 1, NO_BLK);
+ }
+#endif
+ ext2fs_free_mem(&zero_buf);
+ ext2fs_free_mem(&buf);
+}
+
+static void init_l1_table(struct ext2_qcow2_image *image)
+{
+ __u64 *l1_table;
+ errcode_t ret;
+
+ ret = ext2fs_get_arrayzero(image->l1_size, sizeof(__u64), &l1_table);
+ if (ret) {
+ com_err(program_name, ret, "%s",
+ _("while allocating l1 table"));
+ exit(1);
+ }
+
+ image->l1_table = l1_table;
+}
+
+static void init_l2_cache(struct ext2_qcow2_image *image)
+{
+ unsigned int count, i;
+ struct ext2_qcow2_l2_cache *cache;
+ struct ext2_qcow2_l2_table *table;
+ errcode_t ret;
+
+ ret = ext2fs_get_arrayzero(1, sizeof(struct ext2_qcow2_l2_cache),
+ &cache);
+ if (ret)
+ goto alloc_err;
+
+ count = (image->l1_size > L2_CACHE_PREALLOC) ? L2_CACHE_PREALLOC :
+ image->l1_size;
+
+ cache->count = count;
+ cache->free = count;
+ cache->next_offset = image->l2_offset;
+
+ for (i = 0; i < count; i++) {
+ ret = ext2fs_get_arrayzero(1,
+ sizeof(struct ext2_qcow2_l2_table), &table);
+ if (ret)
+ goto alloc_err;
+
+ ret = ext2fs_get_arrayzero(image->l2_size,
+ sizeof(__u64), &table->data);
+ if (ret)
+ goto alloc_err;
+
+ table->next = cache->free_head;
+ cache->free_head = table;
+ }
+
+ image->l2_cache = cache;
+ return;
+
+alloc_err:
+ com_err(program_name, ret, "%s", _("while allocating l2 cache"));
+ exit(1);
+}
+
+static void put_l2_cache(struct ext2_qcow2_image *image)
+{
+ struct ext2_qcow2_l2_cache *cache = image->l2_cache;
+ struct ext2_qcow2_l2_table *tmp, *table;
+
+ if (!cache)
+ return;
+
+ table = cache->free_head;
+ cache->free_head = NULL;
+again:
+ while (table) {
+ tmp = table;
+ table = table->next;
+ ext2fs_free_mem(&tmp->data);
+ ext2fs_free_mem(&tmp);
+ }
+
+ if (cache->free != cache->count) {
+ fprintf(stderr, "%s", _("Warning: There are still tables in "
+ "the cache while putting the cache, "
+ "data will be lost so the image may "
+ "not be valid.\n"));
+ table = cache->used_head;
+ cache->used_head = NULL;
+ goto again;
+ }
+
+ ext2fs_free_mem(&cache);
+}
+
+static int init_refcount(struct ext2_qcow2_image *img, blk64_t table_offset)
+{
+ struct ext2_qcow2_refcount *ref;
+ blk64_t table_clusters;
+ errcode_t ret;
+
+ ref = &(img->refcount);
+
+ /*
+ * One refcount block addresses 2048 clusters, one refcount table
+ * addresses cluster/sizeof(__u64) refcount blocks, and we need
+ * to address meta_blocks_count clusters + qcow2 metadata clusters
+ * in the worst case.
+ */
+ table_clusters = meta_blocks_count + (table_offset >>
+ img->cluster_bits);
+ table_clusters >>= (img->cluster_bits + 6 - 1);
+ table_clusters = (table_clusters == 0) ? 1 : table_clusters;
+
+ ref->refcount_table_offset = table_offset;
+ ref->refcount_table_clusters = table_clusters;
+ ref->refcount_table_index = 0;
+ ref->refcount_block_index = 0;
+
+ /* Allocate refcount table */
+ ret = ext2fs_get_arrayzero(ref->refcount_table_clusters,
+ img->cluster_size, &ref->refcount_table);
+ if (ret)
+ return ret;
+
+ /* Allocate refcount block */
+ ret = ext2fs_get_arrayzero(1, img->cluster_size, &ref->refcount_block);
+ if (ret)
+ ext2fs_free_mem(&ref->refcount_table);
+
+ return ret;
+}
+
+static errcode_t initialize_qcow2_image(int fd, ext2_filsys fs,
+ struct ext2_qcow2_image *image)
+{
+ struct ext2_qcow2_hdr *header;
+ blk64_t total_size, offset;
+ int shift, l2_bits, header_size, l1_size, ret;
+ int cluster_bits = get_bits_from_size(fs->blocksize);
+ struct ext2_super_block *sb = fs->super;
+
+ /* Sbould never happen, but just in case... */
+ if (cluster_bits < 0)
+ return EXT2_FILSYS_CORRUPTED;
+
+ /* Allocate header */
+ ret = ext2fs_get_memzero(sizeof(struct ext2_qcow2_hdr), &header);
+ if (ret)
+ return ret;
+
+ total_size = ext2fs_blocks_count(sb) << cluster_bits;
+ image->cluster_size = fs->blocksize;
+ image->l2_size = 1 << (cluster_bits - 3);
+ image->cluster_bits = cluster_bits;
+ image->fd = fd;
+
+ header->magic = ext2fs_cpu_to_be32(QCOW_MAGIC);
+ header->version = ext2fs_cpu_to_be32(QCOW_VERSION);
+ header->size = ext2fs_cpu_to_be64(total_size);
+ header->cluster_bits = ext2fs_cpu_to_be32(cluster_bits);
+
+ header_size = (sizeof(struct ext2_qcow2_hdr) + 7) & ~7;
+ offset = align_offset(header_size, image->cluster_size);
+
+ header->l1_table_offset = ext2fs_cpu_to_be64(offset);
+ image->l1_offset = offset;
+
+ l2_bits = cluster_bits - 3;
+ shift = cluster_bits + l2_bits;
+ l1_size = ((total_size + (1LL << shift) - 1) >> shift);
+ header->l1_size = ext2fs_cpu_to_be32(l1_size);
+ image->l1_size = l1_size;
+
+ /* Make space for L1 table */
+ offset += align_offset(l1_size * sizeof(blk64_t), image->cluster_size);
+
+ /* Initialize refcounting */
+ ret = init_refcount(image, offset);
+ if (ret) {
+ ext2fs_free_mem(&header);
+ return ret;
+ }
+ header->refcount_table_offset = ext2fs_cpu_to_be64(offset);
+ header->refcount_table_clusters =
+ ext2fs_cpu_to_be32(image->refcount.refcount_table_clusters);
+ offset += image->cluster_size;
+ offset += (blk64_t) image->refcount.refcount_table_clusters <<
+ image->cluster_bits;
+
+ /* Make space for L2 tables */
+ image->l2_offset = offset;
+ offset += image->cluster_size;
+
+ /* Make space for first refcount block */
+ image->refcount.refcount_block_offset = offset;
+
+ image->hdr = header;
+ /* Initialize l1 and l2 tables */
+ init_l1_table(image);
+ init_l2_cache(image);
+
+ return 0;
+}
+
+static void free_qcow2_image(struct ext2_qcow2_image *img)
+{
+ if (!img)
+ return;
+
+ if (img->hdr)
+ ext2fs_free_mem(&img->hdr);
+
+ if (img->l1_table)
+ ext2fs_free_mem(&img->l1_table);
+
+ if (img->refcount.refcount_table)
+ ext2fs_free_mem(&img->refcount.refcount_table);
+ if (img->refcount.refcount_block)
+ ext2fs_free_mem(&img->refcount.refcount_block);
+
+ put_l2_cache(img);
+
+ ext2fs_free_mem(&img);
+}
+
+/**
+ * Put table from used list (used_head) into free list (free_head).
+ * l2_table is used to return pointer to the next used table (used_head).
+ */
+static void put_used_table(struct ext2_qcow2_image *img,
+ struct ext2_qcow2_l2_table **l2_table)
+{
+ struct ext2_qcow2_l2_cache *cache = img->l2_cache;
+ struct ext2_qcow2_l2_table *table;
+
+ table = cache->used_head;
+ cache->used_head = table->next;
+
+ assert(table);
+ if (!table->next)
+ cache->used_tail = NULL;
+
+ /* Clean the table for case we will need to use it again */
+ memset(table->data, 0, img->cluster_size);
+ table->next = cache->free_head;
+ cache->free_head = table;
+
+ cache->free++;
+
+ *l2_table = cache->used_head;
+}
+
+static void flush_l2_cache(struct ext2_qcow2_image *image)
+{
+ blk64_t seek = 0;
+ ext2_loff_t offset;
+ struct ext2_qcow2_l2_cache *cache = image->l2_cache;
+ struct ext2_qcow2_l2_table *table = cache->used_head;
+ int fd = image->fd;
+
+ /* Store current position */
+ offset = seek_relative(fd, 0);
+
+ assert(table);
+ while (cache->free < cache->count) {
+ if (seek != table->offset) {
+ seek_set(fd, table->offset);
+ seek = table->offset;
+ }
+
+ generic_write(fd, (char *)table->data, image->cluster_size,
+ NO_BLK);
+ put_used_table(image, &table);
+ seek += image->cluster_size;
+ }
+
+ /* Restore previous position */
+ seek_set(fd, offset);
+}
+
+/**
+ * Get first free table (from free_head) and put it into tail of used list
+ * (to used_tail).
+ * l2_table is used to return pointer to moved table.
+ * Returns 1 if the cache is full, 0 otherwise.
+ */
+static void get_free_table(struct ext2_qcow2_image *image,
+ struct ext2_qcow2_l2_table **l2_table)
+{
+ struct ext2_qcow2_l2_table *table;
+ struct ext2_qcow2_l2_cache *cache = image->l2_cache;
+
+ if (0 == cache->free)
+ flush_l2_cache(image);
+
+ table = cache->free_head;
+ assert(table);
+ cache->free_head = table->next;
+
+ if (cache->used_tail)
+ cache->used_tail->next = table;
+ else
+ /* First item in the used list */
+ cache->used_head = table;
+
+ cache->used_tail = table;
+ cache->free--;
+
+ *l2_table = table;
+}
+
+static int add_l2_item(struct ext2_qcow2_image *img, blk64_t blk,
+ blk64_t data, blk64_t next)
+{
+ struct ext2_qcow2_l2_cache *cache = img->l2_cache;
+ struct ext2_qcow2_l2_table *table = cache->used_tail;
+ blk64_t l1_index = blk / img->l2_size;
+ blk64_t l2_index = blk & (img->l2_size - 1);
+ int ret = 0;
+
+ /*
+ * Need to create new table if it does not exist,
+ * or if it is full
+ */
+ if (!table || (table->l1_index != l1_index)) {
+ get_free_table(img, &table);
+ table->l1_index = l1_index;
+ table->offset = cache->next_offset;
+ cache->next_offset = next;
+ img->l1_table[l1_index] =
+ ext2fs_cpu_to_be64(table->offset | QCOW_OFLAG_COPIED);
+ ret++;
+ }
+
+ table->data[l2_index] = ext2fs_cpu_to_be64(data | QCOW_OFLAG_COPIED);
+ return ret;
+}
+
+static int update_refcount(int fd, struct ext2_qcow2_image *img,
+ blk64_t offset, blk64_t rfblk_pos)
+{
+ struct ext2_qcow2_refcount *ref;
+ __u32 table_index;
+ int ret = 0;
+
+ ref = &(img->refcount);
+ table_index = offset >> (2 * img->cluster_bits - 1);
+
+ /*
+ * Need to create new refcount block when the offset addresses
+ * another item in the refcount table
+ */
+ if (table_index != ref->refcount_table_index) {
+
+ seek_set(fd, ref->refcount_block_offset);
+
+ generic_write(fd, (char *)ref->refcount_block,
+ img->cluster_size, NO_BLK);
+ memset(ref->refcount_block, 0, img->cluster_size);
+
+ ref->refcount_table[ref->refcount_table_index] =
+ ext2fs_cpu_to_be64(ref->refcount_block_offset);
+ ref->refcount_block_offset = rfblk_pos;
+ ref->refcount_block_index = 0;
+ ref->refcount_table_index = table_index;
+ ret++;
+ }
+
+ /*
+ * We are relying on the fact that we are creating the qcow2
+ * image sequentially, hence we will always allocate refcount
+ * block items sequentially.
+ */
+ ref->refcount_block[ref->refcount_block_index] = ext2fs_cpu_to_be16(1);
+ ref->refcount_block_index++;
+ return ret;
+}
+
+static int sync_refcount(int fd, struct ext2_qcow2_image *img)
+{
+ struct ext2_qcow2_refcount *ref;
+
+ ref = &(img->refcount);
+
+ ref->refcount_table[ref->refcount_table_index] =
+ ext2fs_cpu_to_be64(ref->refcount_block_offset);
+ seek_set(fd, ref->refcount_table_offset);
+ generic_write(fd, (char *)ref->refcount_table,
+ ref->refcount_table_clusters << img->cluster_bits, NO_BLK);
+
+ seek_set(fd, ref->refcount_block_offset);
+ generic_write(fd, (char *)ref->refcount_block, img->cluster_size,
+ NO_BLK);
+ return 0;
+}
+
+static void output_qcow2_meta_data_blocks(ext2_filsys fs, int fd)
+{
+ errcode_t retval;
+ blk64_t blk, offset, size, end;
+ char *buf;
+ struct ext2_qcow2_image *img;
+ unsigned int header_size;
+
+ /* allocate struct ext2_qcow2_image */
+ retval = ext2fs_get_mem(sizeof(struct ext2_qcow2_image), &img);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while allocating ext2_qcow2_image"));
+ exit(1);
+ }
+
+ retval = initialize_qcow2_image(fd, fs, img);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while initializing ext2_qcow2_image"));
+ exit(1);
+ }
+ header_size = align_offset(sizeof(struct ext2_qcow2_hdr),
+ img->cluster_size);
+ write_header(fd, img->hdr, sizeof(struct ext2_qcow2_hdr), header_size);
+
+ /* Refcount all qcow2 related metadata up to refcount_block_offset */
+ end = img->refcount.refcount_block_offset;
+ seek_set(fd, end);
+ blk = end + img->cluster_size;
+ for (offset = 0; offset <= end; offset += img->cluster_size) {
+ if (update_refcount(fd, img, offset, blk)) {
+ blk += img->cluster_size;
+ /*
+ * If we create new refcount block, we need to refcount
+ * it as well.
+ */
+ end += img->cluster_size;
+ }
+ }
+ seek_set(fd, offset);
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while allocating buffer"));
+ exit(1);
+ }
+ /* Write qcow2 data blocks */
+ for (blk = 0; blk < ext2fs_blocks_count(fs->super); blk++) {
+ if ((blk >= fs->super->s_first_data_block) &&
+ ext2fs_test_block_bitmap2(meta_block_map, blk)) {
+ retval = io_channel_read_blk64(fs->io, blk, 1, buf);
+ if (retval) {
+ com_err(program_name, retval,
+ _("error reading block %llu"),
+ (unsigned long long) blk);
+ continue;
+ }
+ if (scramble_block_map &&
+ ext2fs_test_block_bitmap2(scramble_block_map, blk))
+ scramble_dir_block(fs, blk, buf);
+ if (check_zero_block(buf, fs->blocksize))
+ continue;
+
+ if (update_refcount(fd, img, offset, offset)) {
+ /* Make space for another refcount block */
+ offset += img->cluster_size;
+ seek_set(fd, offset);
+ /*
+ * We have created the new refcount block, this
+ * means that we need to refcount it as well.
+ * So the previous update_refcount refcounted
+ * the block itself and now we are going to
+ * create refcount for data. New refcount
+ * block should not be created!
+ */
+ if (update_refcount(fd, img, offset, offset)) {
+ fprintf(stderr, "%s",
+ _("Programming error: multiple "
+ "sequential refcount blocks "
+ "created!\n"));
+ exit(1);
+ }
+ }
+
+ generic_write(fd, buf, fs->blocksize, blk);
+
+ if (add_l2_item(img, blk, offset,
+ offset + img->cluster_size)) {
+ offset += img->cluster_size;
+ if (update_refcount(fd, img, offset,
+ offset + img->cluster_size)) {
+ offset += img->cluster_size;
+ if (update_refcount(fd, img, offset,
+ offset)) {
+ fprintf(stderr, "%s",
+ _("Programming error: multiple sequential refcount "
+ "blocks created!\n"));
+ exit(1);
+ }
+ }
+ offset += img->cluster_size;
+ seek_set(fd, offset);
+ continue;
+ }
+
+ offset += img->cluster_size;
+ }
+ }
+ (void) update_refcount(fd, img, offset, offset);
+ flush_l2_cache(img);
+ sync_refcount(fd, img);
+
+ /* Write l1_table*/
+ seek_set(fd, img->l1_offset);
+ size = img->l1_size * sizeof(__u64);
+ generic_write(fd, (char *)img->l1_table, size, NO_BLK);
+
+ ext2fs_free_mem(&buf);
+ free_qcow2_image(img);
+}
+
+static void write_raw_image_file(ext2_filsys fs, int fd, int type, int flags,
+ blk64_t superblock)
+{
+ struct process_block_struct pb;
+ struct ext2_inode inode;
+ ext2_inode_scan scan;
+ ext2_ino_t ino;
+ errcode_t retval;
+ char * block_buf;
+
+ meta_blocks_count = 0;
+ retval = ext2fs_allocate_block_bitmap(fs, _("in-use block map"),
+ &meta_block_map);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while allocating block bitmap"));
+ exit(1);
+ }
+
+ if (flags & E2IMAGE_SCRAMBLE_FLAG) {
+ retval = ext2fs_allocate_block_bitmap(fs, "scramble block map",
+ &scramble_block_map);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while allocating scramble block bitmap"));
+ exit(1);
+ }
+ }
+
+ if (superblock) {
+ unsigned int j;
+
+ ext2fs_mark_block_bitmap2(meta_block_map, superblock);
+ meta_blocks_count++;
+
+ /*
+ * Mark the backup superblock descriptors
+ */
+ for (j = 0; j < fs->desc_blocks; j++) {
+ ext2fs_mark_block_bitmap2(meta_block_map,
+ ext2fs_descriptor_block_loc2(fs, superblock, j));
+ }
+ meta_blocks_count += fs->desc_blocks;
+ }
+
+ mark_table_blocks(fs);
+ if (show_progress)
+ fprintf(stderr, "%s", _("Scanning inodes...\n"));
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while opening inode scan"));
+ exit(1);
+ }
+
+ retval = ext2fs_get_mem(fs->blocksize * 3, &block_buf);
+ if (retval) {
+ com_err(program_name, 0, "%s",
+ _("Can't allocate block buffer"));
+ exit(1);
+ }
+
+ use_inode_shortcuts(fs, 1);
+ stashed_inode = &inode;
+ while (1) {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE)
+ continue;
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while getting next inode"));
+ exit(1);
+ }
+ if (ino == 0)
+ break;
+ if (!inode.i_links_count)
+ continue;
+ if (ext2fs_file_acl_block(fs, &inode)) {
+ ext2fs_mark_block_bitmap2(meta_block_map,
+ ext2fs_file_acl_block(fs, &inode));
+ meta_blocks_count++;
+ }
+ if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
+ continue;
+
+ stashed_ino = ino;
+ pb.ino = ino;
+ pb.is_dir = LINUX_S_ISDIR(inode.i_mode);
+ if (LINUX_S_ISDIR(inode.i_mode) ||
+ LINUX_S_ISLNK(inode.i_mode) ||
+ ino == fs->super->s_journal_inum ||
+ ino == quota_type2inum(USRQUOTA, fs->super) ||
+ ino == quota_type2inum(GRPQUOTA, fs->super) ||
+ ino == quota_type2inum(PRJQUOTA, fs->super) ||
+ ino == fs->super->s_orphan_file_inum) {
+ retval = ext2fs_block_iterate3(fs, ino,
+ BLOCK_FLAG_READ_ONLY, block_buf,
+ process_dir_block, &pb);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while iterating over inode %u"),
+ ino);
+ exit(1);
+ }
+ } else {
+ if ((inode.i_flags & EXT4_EXTENTS_FL) ||
+ inode.i_block[EXT2_IND_BLOCK] ||
+ inode.i_block[EXT2_DIND_BLOCK] ||
+ inode.i_block[EXT2_TIND_BLOCK] || all_data) {
+ retval = ext2fs_block_iterate3(fs,
+ ino, BLOCK_FLAG_READ_ONLY, block_buf,
+ process_file_block, &pb);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while iterating over inode %u"), ino);
+ exit(1);
+ }
+ }
+ }
+ }
+ use_inode_shortcuts(fs, 0);
+
+ if (type & E2IMAGE_QCOW2)
+ output_qcow2_meta_data_blocks(fs, fd);
+ else
+ output_meta_data_blocks(fs, fd, flags);
+
+ ext2fs_free_mem(&block_buf);
+ ext2fs_close_inode_scan(scan);
+ ext2fs_free_block_bitmap(meta_block_map);
+ if (type & E2IMAGE_SCRAMBLE_FLAG)
+ ext2fs_free_block_bitmap(scramble_block_map);
+}
+
+static void install_image(char *device, char *image_fn, int type)
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ int open_flag = EXT2_FLAG_IMAGE_FILE | EXT2_FLAG_64BITS |
+ EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ int fd = 0;
+ io_manager io_ptr;
+ io_channel io;
+
+ if (type) {
+ com_err(program_name, 0, "%s",
+ _("Raw and qcow2 images cannot be installed"));
+ exit(1);
+ }
+
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+#endif
+ io_ptr = unix_io_manager;
+
+ retval = ext2fs_open (image_fn, open_flag, 0, 0,
+ io_ptr, &fs);
+ if (retval) {
+ com_err(program_name, retval, _("while trying to open %s"),
+ image_fn);
+ exit(1);
+ }
+
+ retval = ext2fs_read_bitmaps (fs);
+ if (retval) {
+ com_err(program_name, retval, "%s", _("error reading bitmaps"));
+ exit(1);
+ }
+
+ fd = ext2fs_open_file(image_fn, O_RDONLY, 0);
+ if (fd < 0) {
+ perror(image_fn);
+ exit(1);
+ }
+
+ retval = io_ptr->open(device, IO_FLAG_RW, &io);
+ if (retval) {
+ com_err(device, 0, "%s", _("while opening device file"));
+ exit(1);
+ }
+
+ ext2fs_rewrite_to_io(fs, io);
+
+ seek_set(fd, ext2fs_le32_to_cpu(fs->image_header->offset_inode));
+
+ retval = ext2fs_image_inode_read(fs, fd, 0);
+ if (retval) {
+ com_err(image_fn, 0, "%s",
+ _("while restoring the image table"));
+ exit(1);
+ }
+
+ close(fd);
+ ext2fs_close_free(&fs);
+}
+
+static struct ext2_qcow2_hdr *check_qcow2_image(int *fd, char *name)
+{
+
+ *fd = ext2fs_open_file(name, O_RDONLY, 0600);
+ if (*fd < 0)
+ return NULL;
+
+ return qcow2_read_header(*fd);
+}
+
+int main (int argc, char ** argv)
+{
+ int c;
+ errcode_t retval;
+ ext2_filsys fs;
+ char *image_fn, offset_opt[64];
+ struct ext2_qcow2_hdr *header = NULL;
+ int open_flag = EXT2_FLAG_64BITS | EXT2_FLAG_THREADS |
+ EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ int img_type = 0;
+ int flags = 0;
+ int mount_flags = 0;
+ int qcow2_fd = 0;
+ int fd = 0;
+ int ret = 0;
+ int ignore_rw_mount = 0;
+ int check = 0;
+ struct stat st;
+ blk64_t superblock = 0;
+ int blocksize = 0;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ fprintf (stderr, "e2image %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
+ if (argc && *argv)
+ program_name = *argv;
+ else
+ usage();
+ add_error_table(&et_ext2_error_table);
+ while ((c = getopt(argc, argv, "b:B:nrsIQafo:O:pc")) != EOF)
+ switch (c) {
+ case 'b':
+ superblock = strtoull(optarg, NULL, 0);
+ break;
+ case 'B':
+ blocksize = strtoul(optarg, NULL, 0);
+ break;
+ case 'I':
+ flags |= E2IMAGE_INSTALL_FLAG;
+ break;
+ case 'Q':
+ if (img_type)
+ usage();
+ img_type |= E2IMAGE_QCOW2;
+ break;
+ case 'r':
+ if (img_type)
+ usage();
+ img_type |= E2IMAGE_RAW;
+ break;
+ case 's':
+ flags |= E2IMAGE_SCRAMBLE_FLAG;
+ break;
+ case 'a':
+ all_data = 1;
+ break;
+ case 'f':
+ ignore_rw_mount = 1;
+ break;
+ case 'n':
+ nop_flag = 1;
+ break;
+ case 'o':
+ source_offset = strtoull(optarg, NULL, 0);
+ break;
+ case 'O':
+ dest_offset = strtoull(optarg, NULL, 0);
+ break;
+ case 'p':
+ show_progress = 1;
+ break;
+ case 'c':
+ check = 1;
+ break;
+ default:
+ usage();
+ }
+ if (optind == argc - 1 &&
+ (source_offset || dest_offset))
+ move_mode = 1;
+ else if (optind != argc - 2 )
+ usage();
+
+ if (all_data && !img_type) {
+ com_err(program_name, 0, "%s", _("-a option can only be used "
+ "with raw or QCOW2 images."));
+ exit(1);
+ }
+ if (superblock && !img_type) {
+ com_err(program_name, 0, "%s", _("-b option can only be used "
+ "with raw or QCOW2 images."));
+ exit(1);
+ }
+ if ((source_offset || dest_offset) && img_type != E2IMAGE_RAW) {
+ com_err(program_name, 0, "%s",
+ _("Offsets are only allowed with raw images."));
+ exit(1);
+ }
+ if (move_mode && img_type != E2IMAGE_RAW) {
+ com_err(program_name, 0, "%s",
+ _("Move mode is only allowed with raw images."));
+ exit(1);
+ }
+ if (move_mode && !all_data) {
+ com_err(program_name, 0, "%s",
+ _("Move mode requires all data mode."));
+ exit(1);
+ }
+ device_name = argv[optind];
+ if (move_mode)
+ image_fn = device_name;
+ else image_fn = argv[optind+1];
+
+ retval = ext2fs_check_if_mounted(device_name, &mount_flags);
+ if (retval) {
+ com_err(program_name, retval, "%s", _("checking if mounted"));
+ exit(1);
+ }
+
+ if (img_type && !ignore_rw_mount &&
+ (mount_flags & EXT2_MF_MOUNTED) &&
+ !(mount_flags & EXT2_MF_READONLY)) {
+ fprintf(stderr, "%s", _("\nRunning e2image on a R/W mounted "
+ "filesystem can result in an\n"
+ "inconsistent image which will not be useful "
+ "for debugging purposes.\n"
+ "Use -f option if you really want to do that.\n"));
+ exit(1);
+ }
+
+ if (flags & E2IMAGE_INSTALL_FLAG) {
+ install_image(device_name, image_fn, img_type);
+ exit (0);
+ }
+
+ if (img_type & E2IMAGE_RAW) {
+ header = check_qcow2_image(&qcow2_fd, device_name);
+ if (header) {
+ flags |= E2IMAGE_IS_QCOW2_FLAG;
+ goto skip_device;
+ }
+ }
+ sprintf(offset_opt, "offset=%llu", (unsigned long long) source_offset);
+ retval = ext2fs_open2(device_name, offset_opt, open_flag,
+ superblock, blocksize, unix_io_manager, &fs);
+ if (retval) {
+ com_err (program_name, retval, _("while trying to open %s"),
+ device_name);
+ fputs(_("Couldn't find valid filesystem superblock.\n"), stdout);
+ if (retval == EXT2_ET_BAD_MAGIC)
+ check_plausibility(device_name, CHECK_FS_EXIST, NULL);
+ exit(1);
+ }
+
+skip_device:
+ if (strcmp(image_fn, "-") == 0)
+ fd = 1;
+ else {
+ int o_flags = O_CREAT|O_RDWR;
+
+ if (img_type != E2IMAGE_RAW)
+ o_flags |= O_TRUNC;
+ if (access(image_fn, F_OK) != 0)
+ flags |= E2IMAGE_CHECK_ZERO_FLAG;
+ fd = ext2fs_open_file(image_fn, o_flags, 0600);
+ if (fd < 0) {
+ com_err(program_name, errno,
+ _("while trying to open %s"), image_fn);
+ exit(1);
+ }
+ }
+ if (dest_offset)
+ seek_set(fd, dest_offset);
+
+ if ((img_type & E2IMAGE_QCOW2) && (fd == 1)) {
+ com_err(program_name, 0, "%s",
+ _("QCOW2 image can not be written to the stdout!\n"));
+ exit(1);
+ }
+ if (fd != 1) {
+ if (fstat(fd, &st)) {
+ com_err(program_name, 0, "%s",
+ _("Can not stat output\n"));
+ exit(1);
+ }
+ if (ext2fsP_is_disk_device(st.st_mode))
+ output_is_blk = 1;
+ }
+ if (flags & E2IMAGE_IS_QCOW2_FLAG) {
+ ret = qcow2_write_raw_image(qcow2_fd, fd, header);
+ if (ret) {
+ if (ret == -QCOW_COMPRESSED)
+ fprintf(stderr, _("Image (%s) is compressed\n"),
+ image_fn);
+ else if (ret == -QCOW_ENCRYPTED)
+ fprintf(stderr, _("Image (%s) is encrypted\n"),
+ image_fn);
+ else if (ret == -QCOW_CORRUPTED)
+ fprintf(stderr, _("Image (%s) is corrupted\n"),
+ image_fn);
+ else
+ com_err(program_name, ret,
+ _("while trying to convert qcow2 image"
+ " (%s) into raw image (%s)"),
+ image_fn, device_name);
+ ret = 1;
+ }
+ goto out;
+ }
+
+ if (check) {
+ if (img_type != E2IMAGE_RAW) {
+ fprintf(stderr, "%s", _("The -c option only supported "
+ "in raw mode\n"));
+ exit(1);
+ }
+ if (fd == 1) {
+ fprintf(stderr, "%s", _("The -c option not supported "
+ "when writing to stdout\n"));
+ exit(1);
+ }
+ retval = ext2fs_get_mem(fs->blocksize, &check_buf);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while allocating check_buf"));
+ exit(1);
+ }
+ }
+ if (show_progress && (img_type != E2IMAGE_RAW)) {
+ fprintf(stderr, "%s",
+ _("The -p option only supported in raw mode\n"));
+ exit(1);
+ }
+ if (img_type)
+ write_raw_image_file(fs, fd, img_type, flags, superblock);
+ else
+ write_image_file(fs, fd);
+
+ ext2fs_close_free(&fs);
+ if (check)
+ printf(_("%d blocks already contained the data to be copied\n"),
+ skipped_blocks);
+
+out:
+ if (header)
+ free(header);
+ if (qcow2_fd)
+ close(qcow2_fd);
+ remove_error_table(&et_ext2_error_table);
+ return ret;
+}
diff --git a/misc/e2initrd_helper.c b/misc/e2initrd_helper.c
new file mode 100644
index 0000000..b39fe15
--- /dev/null
+++ b/misc/e2initrd_helper.c
@@ -0,0 +1,398 @@
+/*
+ * e2initrd_helper.c - Get the filesystem table
+ *
+ * Copyright 2004 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <utime.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "blkid/blkid.h"
+#include "support/nls-enable.h"
+#include "support/devname.h"
+
+#include "../version.h"
+
+static const char * program_name = "e2initrd_helper";
+static char * device_name;
+static int open_flag;
+static int root_type;
+static blkid_cache cache = NULL;
+
+struct mem_file {
+ char *buf;
+ int size;
+ int ptr;
+};
+
+struct fs_info {
+ char *device;
+ char *mountpt;
+ char *type;
+ char *opts;
+ int freq;
+ int passno;
+ int flags;
+ struct fs_info *next;
+};
+
+static void usage(void)
+{
+ fprintf(stderr,
+ _("Usage: %s -r device\n"), program_name);
+ exit (1);
+}
+
+static errcode_t get_file(ext2_filsys fs, const char * filename,
+ struct mem_file *ret_file)
+{
+ errcode_t retval;
+ char *buf;
+ ext2_file_t e2_file = NULL;
+ unsigned int got;
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+
+ ret_file->buf = 0;
+ ret_file->size = 0;
+ ret_file->ptr = 0;
+
+ retval = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO,
+ filename, &ino);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+
+ if (inode.i_size_high || (inode.i_size > 65536))
+ return EFBIG;
+
+ buf = malloc(inode.i_size + 1);
+ if (!buf)
+ return ENOMEM;
+ memset(buf, 0, inode.i_size+1);
+
+ retval = ext2fs_file_open(fs, ino, 0, &e2_file);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_file_read(e2_file, buf, inode.i_size, &got);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_file_close(e2_file);
+ if (retval)
+ goto errout;
+
+ ret_file->buf = buf;
+ ret_file->size = (int) got;
+ return 0;
+
+errout:
+ free(buf);
+ if (e2_file)
+ ext2fs_file_close(e2_file);
+ return retval;
+}
+
+static char *get_line(struct mem_file *file)
+{
+ char *cp, *ret;
+ int s = 0;
+
+ cp = file->buf + file->ptr;
+ while (*cp && *cp != '\n') {
+ cp++;
+ s++;
+ }
+ ret = malloc(s+1);
+ if (!ret)
+ return 0;
+ ret[s]=0;
+ memcpy(ret, file->buf + file->ptr, s);
+ while (*cp && (*cp == '\n' || *cp == '\r')) {
+ cp++;
+ s++;
+ }
+ file->ptr += s;
+ return ret;
+}
+
+static int mem_file_eof(struct mem_file *file)
+{
+ return (file->ptr >= file->size);
+}
+
+/*
+ * fstab parsing code
+ */
+static char *string_copy(const char *s)
+{
+ char *ret;
+
+ if (!s)
+ return 0;
+ ret = malloc(strlen(s)+1);
+ if (ret)
+ strcpy(ret, s);
+ return ret;
+}
+
+static char *skip_over_blank(char *cp)
+{
+ while (*cp && isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *skip_over_word(char *cp)
+{
+ while (*cp && !isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *parse_word(char **buf)
+{
+ char *word, *next;
+
+ word = *buf;
+ if (*word == 0)
+ return 0;
+
+ word = skip_over_blank(word);
+ next = skip_over_word(word);
+ if (*next)
+ *next++ = 0;
+ *buf = next;
+ return word;
+}
+
+static void parse_escape(char *word)
+{
+ char *p, *q;
+ int ac, i;
+
+ if (!word)
+ return;
+
+ for (p = word, q = word; *p; p++, q++) {
+ *q = *p;
+ if (*p != '\\')
+ continue;
+ if (*++p == 0)
+ break;
+ if (*p == 't') {
+ *q = '\t';
+ continue;
+ }
+ if (*p == 'n') {
+ *q = '\n';
+ continue;
+ }
+ if (!isdigit(*p)) {
+ *q = *p;
+ continue;
+ }
+ ac = 0;
+ for (i = 0; i < 3; i++, p++) {
+ if (!isdigit(*p))
+ break;
+ ac = (ac * 8) + (*p - '0');
+ }
+ *q = ac;
+ p--;
+ }
+ *q = 0;
+}
+
+static int parse_fstab_line(char *line, struct fs_info *fs)
+{
+ char *dev, *device, *mntpnt, *type, *opts, *freq, *passno, *cp;
+
+ if ((cp = strchr(line, '#')))
+ *cp = 0; /* Ignore everything after the comment char */
+ cp = line;
+
+ device = parse_word(&cp);
+ mntpnt = parse_word(&cp);
+ type = parse_word(&cp);
+ opts = parse_word(&cp);
+ freq = parse_word(&cp);
+ passno = parse_word(&cp);
+
+ if (!device)
+ return -1; /* Allow blank lines */
+
+ if (!mntpnt || !type)
+ return -1;
+
+ parse_escape(device);
+ parse_escape(mntpnt);
+ parse_escape(type);
+ parse_escape(opts);
+ parse_escape(freq);
+ parse_escape(passno);
+
+ dev = get_devname(cache, device, NULL);
+ if (dev)
+ device = dev;
+
+ if (strchr(type, ','))
+ type = 0;
+
+ fs->device = string_copy(device);
+ fs->mountpt = string_copy(mntpnt);
+ fs->type = string_copy(type);
+ fs->opts = string_copy(opts ? opts : "");
+ fs->freq = freq ? atoi(freq) : -1;
+ fs->passno = passno ? atoi(passno) : -1;
+ fs->flags = 0;
+ fs->next = NULL;
+
+ free(dev);
+
+ return 0;
+}
+
+static void free_fstab_line(struct fs_info *fs)
+{
+ if (fs->device)
+ fs->device = 0;
+ if (fs->mountpt)
+ fs->mountpt = 0;
+ if (fs->type)
+ fs->type = 0;
+ if (fs->opts)
+ fs->opts = 0;
+ memset(fs, 0, sizeof(struct fs_info));
+}
+
+
+static void PRS(int argc, char **argv)
+{
+ int c;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+
+ while ((c = getopt(argc, argv, "rv")) != EOF) {
+ switch (c) {
+ case 'r':
+ root_type++;
+ break;
+
+ case 'v':
+ printf("%s %s (%s)\n", program_name,
+ E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ break;
+ default:
+ usage();
+ }
+ }
+ if (optind < argc - 1 || optind == argc)
+ usage();
+ device_name = get_devname(NULL, argv[optind], NULL);
+ if (!device_name) {
+ com_err(program_name, 0, _("Unable to resolve '%s'"),
+ argv[optind]);
+ exit(1);
+ }
+}
+
+static void get_root_type(ext2_filsys fs)
+{
+ errcode_t retval;
+ struct mem_file file;
+ char *buf;
+ struct fs_info fs_info;
+ int ret;
+
+ retval = get_file(fs, "/etc/fstab", &file);
+ if (retval) {
+ com_err(program_name, retval, "couldn't open /etc/fstab");
+ exit(1);
+ }
+
+ while (!mem_file_eof(&file)) {
+ buf = get_line(&file);
+ if (!buf)
+ continue;
+
+ ret = parse_fstab_line(buf, &fs_info);
+ if (ret < 0)
+ goto next_line;
+
+ if (!strcmp(fs_info.mountpt, "/"))
+ printf("%s\n", fs_info.type);
+
+ free_fstab_line(&fs_info);
+
+ next_line:
+ free(buf);
+ }
+}
+
+
+int main (int argc, char ** argv)
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ io_manager io_ptr;
+
+ add_error_table(&et_ext2_error_table);
+
+ blkid_get_cache(&cache, NULL);
+ PRS(argc, argv);
+
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+#endif
+ io_ptr = unix_io_manager;
+ retval = ext2fs_open (device_name, open_flag, 0, 0, io_ptr, &fs);
+ if (retval)
+ exit(1);
+
+ if (root_type)
+ get_root_type(fs);
+
+ remove_error_table(&et_ext2_error_table);
+ return (ext2fs_close (fs) ? 1 : 0);
+}
diff --git a/misc/e2label.8.in b/misc/e2label.8.in
new file mode 100644
index 0000000..fa5294c
--- /dev/null
+++ b/misc/e2label.8.in
@@ -0,0 +1,58 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH E2LABEL 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2label \- Change the label on an ext2/ext3/ext4 file system
+.SH SYNOPSIS
+.B e2label
+.I device
+[
+.I volume-label
+]
+.SH DESCRIPTION
+.B e2label
+will display or change the volume label on the ext2, ext3, or ext4
+file system located on
+.I device.
+.PP
+If the optional argument
+.I volume-label
+is not present,
+.B e2label
+will simply display the current volume label.
+.PP
+If the optional argument
+.I volume-label
+is present, then
+.B e2label
+will set the volume label to be
+.IR volume-label .
+Ext2 volume labels can be at most 16 characters long; if
+.I volume-label
+is longer than 16 characters,
+.B e2label
+will truncate it and print a warning message. For other file systems that
+support online label manipulation and are mounted
+.B e2label
+will work as well, but it will not attempt to truncate the
+.I volume-label
+at all.
+.PP
+It is also possible to set the volume label using the
+.B \-L
+option of
+.BR tune2fs (8).
+.PP
+.SH AUTHOR
+.B e2label
+was written by Theodore Ts'o (tytso@mit.edu).
+.SH AVAILABILITY
+.B e2label
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR mke2fs (8),
+.BR tune2fs (8)
+
diff --git a/misc/e2label.c b/misc/e2label.c
new file mode 100644
index 0000000..910ccc7
--- /dev/null
+++ b/misc/e2label.c
@@ -0,0 +1,121 @@
+/*
+ * e2label.c - Print or change the volume label on an ext2 fs
+ *
+ * Written by Andries Brouwer (aeb@cwi.nl), 970714
+ *
+ * Copyright 1997, 1998 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <termios.h>
+#include <time.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include "support/nls-enable.h"
+
+#define EXT2_SUPER_MAGIC 0xEF53
+
+#define VOLNAMSZ 16
+
+struct ext2_super_block {
+ char s_dummy0[56];
+ unsigned char s_magic[2];
+ char s_dummy1[62];
+ char s_volume_name[VOLNAMSZ];
+ char s_last_mounted[64];
+ char s_dummy2[824];
+} sb;
+
+static int open_e2fs (char *dev, int mode)
+{
+ int fd;
+
+ fd = open(dev, mode);
+ if (fd < 0) {
+ perror(dev);
+ fprintf (stderr, _("e2label: cannot open %s\n"), dev);
+ exit(1);
+ }
+ if (lseek(fd, 1024, SEEK_SET) != 1024) {
+ perror(dev);
+ fprintf (stderr, _("e2label: cannot seek to superblock\n"));
+ exit(1);
+ }
+ if (read(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) {
+ perror(dev);
+ fprintf (stderr, _("e2label: error reading superblock\n"));
+ exit(1);
+ }
+ if (sb.s_magic[0] + 256*sb.s_magic[1] != EXT2_SUPER_MAGIC) {
+ fprintf (stderr, _("e2label: not an ext2 filesystem\n"));
+ exit(1);
+ }
+
+ return fd;
+}
+
+static void print_label (char *dev)
+{
+ char label[VOLNAMSZ+1];
+
+ open_e2fs (dev, O_RDONLY);
+ snprintf(label, sizeof(label), "%.*s", EXT2_LEN_STR(sb.s_volume_name));
+ label[VOLNAMSZ] = 0;
+ printf("%s\n", label);
+}
+
+static void change_label (char *dev, char *label)
+{
+ int fd;
+
+ fd = open_e2fs(dev, O_RDWR);
+ memset(sb.s_volume_name, 0, VOLNAMSZ);
+ strncpy(sb.s_volume_name, label, VOLNAMSZ);
+ if (strlen(label) > VOLNAMSZ)
+ fprintf(stderr, _("Warning: label too long, truncating.\n"));
+ if (lseek(fd, 1024, SEEK_SET) != 1024) {
+ perror(dev);
+ fprintf (stderr, _("e2label: cannot seek to superblock again\n"));
+ exit(1);
+ }
+ if (write(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) {
+ perror(dev);
+ fprintf (stderr, _("e2label: error writing superblock\n"));
+ exit(1);
+ }
+}
+
+int main (int argc, char ** argv)
+{
+ if (argc == 2)
+ print_label(argv[1]);
+ else if (argc == 3)
+ change_label(argv[1], argv[2]);
+ else {
+ fprintf(stderr, _("Usage: e2label device [newlabel]\n"));
+ exit(1);
+ }
+ return 0;
+}
diff --git a/misc/e2mmpstatus.8.in b/misc/e2mmpstatus.8.in
new file mode 100644
index 0000000..c7ed929
--- /dev/null
+++ b/misc/e2mmpstatus.8.in
@@ -0,0 +1,59 @@
+.\" -*- nroff -*-
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH E2MMPSTATUS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2mmpstatus \- Check MMP status of an ext4 file system
+.SH SYNOPSIS
+.BR e2mmpstatus " [" \-i ]
+.RI < file system >
+.SH OPTIONS
+.TP
+.B \-i
+prints out the MMP information rather than check it.
+.SH DESCRIPTION
+.B e2mmpstatus
+is used to check Multiple-Mount Protection (MMP) status of an ext4
+file system with the
+.B mmp
+feature enabled. The specified
+.I file system
+can be a device name (e.g.
+.IR /dev/hdc1 ", " /dev/sdb2 ),
+or an ext4 file system label or UUID, for example
+.B UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd
+or
+.BR LABEL=root .
+By default, the
+.B e2mmpstatus
+program checks whether it is safe to mount the file system without taking
+the risk of mounting it more than once.
+.PP
+MMP (multiple-mount protection) is a feature that adds protection against
+the file system being modified simultaneously by more than one node.
+It is NOT safe to mount a file system when one of the following conditions
+is true:
+.br
+ 1. e2fsck is running on the file system.
+.br
+ 2. the file system is in use by another node.
+.br
+ 3. The MMP block is corrupted or cannot be read for some reason.
+.br
+The
+.B e2mmpstatus
+program might wait for some time to see whether the MMP block is being
+updated by any node during this period. The time taken depends on how
+frequently the MMP block is being written by the other node.
+.SH EXIT CODE
+The exit code returned by
+.B e2mmpstatus
+is 0 when it is safe to mount the file system, 1 when the MMP block shows
+the file system is in use on another node and it is NOT safe to mount
+the file system, and 2 if some other failure occurred that prevents the
+check from properly detecting the current MMP status.
+.SH SEE ALSO
+.BR dumpe2fs (8),
+.BR e2fsck (8),
+.BR fstab (5),
+.BR fsck (8),
diff --git a/misc/e2undo.8.in b/misc/e2undo.8.in
new file mode 100644
index 0000000..30253a4
--- /dev/null
+++ b/misc/e2undo.8.in
@@ -0,0 +1,84 @@
+.\" -*- nroff -*-
+.\" Copyright 2008 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH E2UNDO 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2undo \- Replay an undo log for an ext2/ext3/ext4 file system
+.SH SYNOPSIS
+.B e2undo
+[
+.B \-f
+]
+[
+.B \-h
+]
+[
+.B \-n
+]
+[
+.B \-o
+.I offset
+]
+[
+.B \-v
+]
+[
+.B \-z
+.I undo_file
+]
+.I undo_log device
+.SH DESCRIPTION
+.B e2undo
+will replay the undo log
+.I undo_log
+for an ext2/ext3/ext4 file system found on
+.IR device .
+This can be
+used to undo a failed operation by an e2fsprogs program.
+.SH OPTIONS
+.TP
+.B \-f
+Normally,
+.B e2undo
+will check the file system superblock to make sure the undo log matches
+with the file system on the device. If they do not match,
+.B e2undo
+will refuse to apply the undo log as a safety mechanism. The
+.B \-f
+option disables this safety mechanism.
+.TP
+.B \-h
+Display a usage message.
+.TP
+.B \-n
+Dry-run; do not actually write blocks back to the file system.
+.TP
+.BI \-o " offset"
+Specify the file system's
+.I offset
+(in bytes) from the beginning of the device or file.
+.TP
+.B \-v
+Report which block we're currently replaying.
+.TP
+.BI \-z " undo_file"
+Before overwriting a file system block, write the old contents of the block to
+an undo file. This undo file can be used with e2undo(8) to restore the old
+contents of the file system should something go wrong. If the empty string is
+passed as the undo_file argument, the undo file will be written to a file named
+e2undo-\fIdevice\fR.e2undo in the directory specified via the
+\fIE2FSPROGS_UNDO_DIR\fR environment variable.
+
+WARNING: The undo file cannot be used to recover from a power or system crash.
+.SH AUTHOR
+.B e2undo
+was written by Aneesh Kumar K.V. (aneesh.kumar@linux.vnet.ibm.com)
+.SH AVAILABILITY
+.B e2undo
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR mke2fs (8),
+.BR tune2fs (8)
+
diff --git a/misc/e2undo.c b/misc/e2undo.c
new file mode 100644
index 0000000..bc78fb2
--- /dev/null
+++ b/misc/e2undo.c
@@ -0,0 +1,658 @@
+/*
+ * e2undo.c - Replay an undo log onto an ext2/3/4 filesystem
+ *
+ * Copyright IBM Corporation, 2007
+ * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <fcntl.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <unistd.h>
+#include <libgen.h>
+#include "ext2fs/ext2fs.h"
+#include "support/nls-enable.h"
+
+#undef DEBUG
+
+#ifdef DEBUG
+# define dbg_printf(f, a...) do {printf(f, ## a); fflush(stdout); } while (0)
+#else
+# define dbg_printf(f, a...)
+#endif
+
+/*
+ * Undo file format: The file is cut up into undo_header.block_size blocks.
+ * The first block contains the header.
+ * The second block contains the superblock.
+ * There is then a repeating series of blocks as follows:
+ * A key block, which contains undo_keys to map the following data blocks.
+ * Data blocks
+ * (Note that there are pointers to the first key block and the sb, so this
+ * order isn't strictly necessary.)
+ */
+#define E2UNDO_MAGIC "E2UNDO02"
+#define KEYBLOCK_MAGIC 0xCADECADE
+
+#define E2UNDO_STATE_FINISHED 0x1 /* undo file is complete */
+
+#define E2UNDO_MIN_BLOCK_SIZE 1024 /* undo blocks are no less than 1KB */
+#define E2UNDO_MAX_BLOCK_SIZE 1048576 /* undo blocks are no more than 1MB */
+
+struct undo_header {
+ char magic[8]; /* "E2UNDO02" */
+ __le64 num_keys; /* how many keys? */
+ __le64 super_offset; /* where in the file is the superblock copy? */
+ __le64 key_offset; /* where do the key/data block chunks start? */
+ __le32 block_size; /* block size of the undo file */
+ __le32 fs_block_size; /* block size of the target device */
+ __le32 sb_crc; /* crc32c of the superblock */
+ __le32 state; /* e2undo state flags */
+ __le32 f_compat; /* compatible features (none so far) */
+ __le32 f_incompat; /* incompatible features (none so far) */
+ __le32 f_rocompat; /* ro compatible features (none so far) */
+ __le32 pad32; /* padding for fs_offset */
+ __le64 fs_offset; /* filesystem offset */
+ __u8 padding[436]; /* padding */
+ __le32 header_crc; /* crc32c of the header (but not this field) */
+};
+
+#define E2UNDO_MAX_EXTENT_BLOCKS 512 /* max extent size, in blocks */
+
+struct undo_key {
+ __le64 fsblk; /* where in the fs does the block go */
+ __le32 blk_crc; /* crc32c of the block */
+ __le32 size; /* how many bytes in this block? */
+};
+
+struct undo_key_block {
+ __le32 magic; /* KEYBLOCK_MAGIC number */
+ __le32 crc; /* block checksum */
+ __le64 reserved; /* zero */
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+ struct undo_key keys[0]; /* keys, which come immediately after */
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic pop
+#endif
+};
+
+struct undo_key_info {
+ blk64_t fsblk;
+ blk64_t fileblk;
+ __u32 blk_crc;
+ unsigned int size;
+};
+
+struct undo_context {
+ struct undo_header hdr;
+ io_channel undo_file;
+ unsigned int blocksize, fs_blocksize;
+ blk64_t super_block;
+ size_t num_keys;
+ struct undo_key_info *keys;
+};
+#define KEYS_PER_BLOCK(d) (((d)->blocksize / sizeof(struct undo_key)) - 1)
+
+#define E2UNDO_FEATURE_COMPAT_FS_OFFSET 0x1 /* the filesystem offset */
+
+static inline int e2undo_has_feature_fs_offset(struct undo_header *header) {
+ return ext2fs_le32_to_cpu(header->f_compat) &
+ E2UNDO_FEATURE_COMPAT_FS_OFFSET;
+}
+
+static char *prg_name;
+static char *undo_file;
+
+static void usage(void)
+{
+ fprintf(stderr,
+ _("Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"), prg_name);
+ exit(1);
+}
+
+static void dump_header(struct undo_header *hdr)
+{
+ printf("nr keys:\t%llu\n",
+ (unsigned long long) ext2fs_le64_to_cpu(hdr->num_keys));
+ printf("super block:\t%llu\n",
+ (unsigned long long) ext2fs_le64_to_cpu(hdr->super_offset));
+ printf("key block:\t%llu\n",
+ (unsigned long long) ext2fs_le64_to_cpu(hdr->key_offset));
+ printf("block size:\t%u\n", ext2fs_le32_to_cpu(hdr->block_size));
+ printf("fs block size:\t%u\n", ext2fs_le32_to_cpu(hdr->fs_block_size));
+ printf("super crc:\t0x%x\n", ext2fs_le32_to_cpu(hdr->sb_crc));
+ printf("state:\t\t0x%x\n", ext2fs_le32_to_cpu(hdr->state));
+ printf("compat:\t\t0x%x\n", ext2fs_le32_to_cpu(hdr->f_compat));
+ printf("incompat:\t0x%x\n", ext2fs_le32_to_cpu(hdr->f_incompat));
+ printf("rocompat:\t0x%x\n", ext2fs_le32_to_cpu(hdr->f_rocompat));
+ if (e2undo_has_feature_fs_offset(hdr))
+ printf("fs offset:\t%llu\n",
+ (unsigned long long) ext2fs_le64_to_cpu(hdr->fs_offset));
+ printf("header crc:\t0x%x\n", ext2fs_le32_to_cpu(hdr->header_crc));
+}
+
+static void print_undo_mismatch(struct ext2_super_block *fs_super,
+ struct ext2_super_block *undo_super)
+{
+ printf("%s",
+ _("The file system superblock doesn't match the undo file.\n"));
+ if (memcmp(fs_super->s_uuid, undo_super->s_uuid,
+ sizeof(fs_super->s_uuid)))
+ printf("%s", _("UUID does not match.\n"));
+ if (fs_super->s_mtime != undo_super->s_mtime)
+ printf("%s", _("Last mount time does not match.\n"));
+ if (fs_super->s_wtime != undo_super->s_wtime)
+ printf("%s", _("Last write time does not match.\n"));
+ if (fs_super->s_kbytes_written != undo_super->s_kbytes_written)
+ printf("%s", _("Lifetime write counter does not match.\n"));
+}
+
+static int check_filesystem(struct undo_context *ctx, io_channel channel)
+{
+ struct ext2_super_block super, *sb;
+ char *buf;
+ __u32 sb_crc;
+ errcode_t retval;
+
+ io_channel_set_blksize(channel, SUPERBLOCK_OFFSET);
+ retval = io_channel_read_blk64(channel, 1, -SUPERBLOCK_SIZE, &super);
+ if (retval) {
+ com_err(prg_name, retval,
+ "%s", _("while reading filesystem superblock."));
+ return retval;
+ }
+
+ /*
+ * Compare the FS and the undo file superblock so that we can't apply
+ * e2undo "patches" out of order.
+ */
+ retval = ext2fs_get_mem(ctx->blocksize, &buf);
+ if (retval) {
+ com_err(prg_name, retval, "%s", _("while allocating memory"));
+ return retval;
+ }
+ retval = io_channel_read_blk64(ctx->undo_file, ctx->super_block,
+ -SUPERBLOCK_SIZE, buf);
+ if (retval) {
+ com_err(prg_name, retval, "%s", _("while fetching superblock"));
+ goto out;
+ }
+ sb = (struct ext2_super_block *)buf;
+ sb->s_magic = ~sb->s_magic;
+ if (memcmp(&super, buf, sizeof(super))) {
+ print_undo_mismatch(&super, (struct ext2_super_block *)buf);
+ retval = -1;
+ goto out;
+ }
+ sb_crc = ext2fs_crc32c_le(~0, (unsigned char *)buf, SUPERBLOCK_SIZE);
+ if (ext2fs_le32_to_cpu(ctx->hdr.sb_crc) != sb_crc) {
+ fprintf(stderr,
+ _("Undo file superblock checksum doesn't match.\n"));
+ retval = -1;
+ goto out;
+ }
+
+out:
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+static int key_compare(const void *a, const void *b)
+{
+ const struct undo_key_info *ka, *kb;
+
+ ka = a;
+ kb = b;
+ return ka->fsblk - kb->fsblk;
+}
+
+static int e2undo_setup_tdb(const char *name, io_manager *io_ptr)
+{
+ errcode_t retval = 0;
+ const char *tdb_dir;
+ char *tdb_file = NULL;
+ char *dev_name, *tmp_name;
+
+ /* (re)open a specific undo file */
+ if (undo_file && undo_file[0] != 0) {
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto err;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(undo_file);
+ if (retval)
+ goto err;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"),
+ undo_file, name);
+ return retval;
+ }
+
+ /*
+ * Configuration via a conf file would be
+ * nice
+ */
+ tdb_dir = getenv("E2FSPROGS_UNDO_DIR");
+ if (!tdb_dir)
+ tdb_dir = "/var/lib/e2fsprogs";
+
+ if (!strcmp(tdb_dir, "none") || (tdb_dir[0] == 0) ||
+ access(tdb_dir, W_OK))
+ return 0;
+
+ tmp_name = strdup(name);
+ if (!tmp_name)
+ goto errout;
+ dev_name = basename(tmp_name);
+ tdb_file = malloc(strlen(tdb_dir) + 8 + strlen(dev_name) + 7 + 1);
+ if (!tdb_file) {
+ free(tmp_name);
+ goto errout;
+ }
+ sprintf(tdb_file, "%s/e2undo-%s.e2undo", tdb_dir, dev_name);
+ free(tmp_name);
+
+ if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
+ retval = errno;
+ com_err(prg_name, retval,
+ _("while trying to delete %s"), tdb_file);
+ goto errout;
+ }
+
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto errout;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(tdb_file);
+ if (retval)
+ goto errout;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"),
+ tdb_file, name);
+
+ free(tdb_file);
+ return 0;
+errout:
+ free(tdb_file);
+err:
+ com_err(prg_name, retval, "while trying to setup undo file\n");
+ return retval;
+}
+
+int main(int argc, char *argv[])
+{
+ int c, force = 0, dry_run = 0, verbose = 0, dump = 0;
+ io_channel channel;
+ errcode_t retval;
+ int mount_flags, csum_error = 0, io_error = 0;
+ size_t i, keys_per_block;
+ char *device_name, *tdb_file;
+ io_manager manager = unix_io_manager;
+ struct undo_context undo_ctx;
+ char *buf;
+ struct undo_key_block *keyb;
+ struct undo_key *dkey;
+ struct undo_key_info *ikey;
+ __u32 key_crc, blk_crc, hdr_crc;
+ blk64_t lblk;
+ ext2_filsys fs;
+ __u64 offset = 0;
+ char opt_offset_string[40] = { 0 };
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ add_error_table(&et_ext2_error_table);
+
+ prg_name = argv[0];
+ while ((c = getopt(argc, argv, "fhno:vz:")) != EOF) {
+ switch (c) {
+ case 'f':
+ force = 1;
+ break;
+ case 'h':
+ dump = 1;
+ break;
+ case 'n':
+ dry_run = 1;
+ break;
+ case 'o':
+ offset = strtoull(optarg, &buf, 0);
+ if (*buf) {
+ com_err(prg_name, 0,
+ _("illegal offset - %s"), optarg);
+ exit(1);
+ }
+ /* used to indicate that an offset was specified */
+ opt_offset_string[0] = 1;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'z':
+ undo_file = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ if (argc != optind + 2)
+ usage();
+
+ tdb_file = argv[optind];
+ device_name = argv[optind+1];
+
+ if (undo_file && strcmp(tdb_file, undo_file) == 0) {
+ printf(_("Will not write to an undo file while replaying it.\n"));
+ exit(1);
+ }
+
+ /* Interpret the undo file */
+ retval = manager->open(tdb_file, IO_FLAG_EXCLUSIVE,
+ &undo_ctx.undo_file);
+ if (retval) {
+ com_err(prg_name, errno,
+ _("while opening undo file `%s'\n"), tdb_file);
+ exit(1);
+ }
+ retval = io_channel_read_blk64(undo_ctx.undo_file, 0,
+ -(int)sizeof(undo_ctx.hdr),
+ &undo_ctx.hdr);
+ if (retval) {
+ com_err(prg_name, retval, _("while reading undo file"));
+ exit(1);
+ }
+ if (memcmp(undo_ctx.hdr.magic, E2UNDO_MAGIC,
+ sizeof(undo_ctx.hdr.magic))) {
+ fprintf(stderr, _("%s: Not an undo file.\n"), tdb_file);
+ exit(1);
+ }
+ if (dump) {
+ dump_header(&undo_ctx.hdr);
+ exit(1);
+ }
+ hdr_crc = ext2fs_crc32c_le(~0, (unsigned char *)&undo_ctx.hdr,
+ sizeof(struct undo_header) -
+ sizeof(__u32));
+ if (!force && ext2fs_le32_to_cpu(undo_ctx.hdr.header_crc) != hdr_crc) {
+ fprintf(stderr, _("%s: Header checksum doesn't match.\n"),
+ tdb_file);
+ exit(1);
+ }
+ undo_ctx.blocksize = ext2fs_le32_to_cpu(undo_ctx.hdr.block_size);
+ undo_ctx.fs_blocksize = ext2fs_le32_to_cpu(undo_ctx.hdr.fs_block_size);
+ if (undo_ctx.blocksize == 0 || undo_ctx.fs_blocksize == 0) {
+ fprintf(stderr, _("%s: Corrupt undo file header.\n"), tdb_file);
+ exit(1);
+ }
+ if (!force && undo_ctx.blocksize > E2UNDO_MAX_BLOCK_SIZE) {
+ fprintf(stderr, _("%s: Undo block size too large.\n"),
+ tdb_file);
+ exit(1);
+ }
+ if (!force && undo_ctx.blocksize < E2UNDO_MIN_BLOCK_SIZE) {
+ fprintf(stderr, _("%s: Undo block size too small.\n"),
+ tdb_file);
+ exit(1);
+ }
+ undo_ctx.super_block = ext2fs_le64_to_cpu(undo_ctx.hdr.super_offset);
+ undo_ctx.num_keys = ext2fs_le64_to_cpu(undo_ctx.hdr.num_keys);
+ io_channel_set_blksize(undo_ctx.undo_file, undo_ctx.blocksize);
+ /*
+ * Do not compare undo_ctx.hdr.f_compat with the available compatible
+ * features set, because a "missing" compatible feature should
+ * not cause any problems.
+ */
+ if (!force && (undo_ctx.hdr.f_incompat || undo_ctx.hdr.f_rocompat)) {
+ fprintf(stderr, _("%s: Unknown undo file feature set.\n"),
+ tdb_file);
+ exit(1);
+ }
+
+ /* open the fs */
+ retval = ext2fs_check_if_mounted(device_name, &mount_flags);
+ if (retval) {
+ com_err(prg_name, retval, _("Error while determining whether "
+ "%s is mounted."), device_name);
+ exit(1);
+ }
+
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ com_err(prg_name, retval, "%s", _("e2undo should only be run "
+ "on unmounted filesystems"));
+ exit(1);
+ }
+
+ if (undo_file) {
+ retval = e2undo_setup_tdb(device_name, &manager);
+ if (retval)
+ exit(1);
+ }
+
+ retval = manager->open(device_name,
+ IO_FLAG_EXCLUSIVE | (dry_run ? 0 : IO_FLAG_RW),
+ &channel);
+ if (retval) {
+ com_err(prg_name, retval,
+ _("while opening `%s'"), device_name);
+ exit(1);
+ }
+
+ if (*opt_offset_string || e2undo_has_feature_fs_offset(&undo_ctx.hdr)) {
+ if (!*opt_offset_string)
+ offset = ext2fs_le64_to_cpu(undo_ctx.hdr.fs_offset);
+ retval = snprintf(opt_offset_string, sizeof(opt_offset_string),
+ "offset=%llu", (unsigned long long) offset);
+ if ((size_t) retval >= sizeof(opt_offset_string)) {
+ /* should not happen... */
+ com_err(prg_name, 0, _("specified offset is too large"));
+ exit(1);
+ }
+ io_channel_set_options(channel, opt_offset_string);
+ }
+
+ if (!force && check_filesystem(&undo_ctx, channel))
+ exit(1);
+
+ /* prepare to read keys */
+ retval = ext2fs_get_mem(sizeof(struct undo_key_info) * undo_ctx.num_keys,
+ &undo_ctx.keys);
+ if (retval) {
+ com_err(prg_name, retval, "%s", _("while allocating memory"));
+ exit(1);
+ }
+ ikey = undo_ctx.keys;
+ retval = ext2fs_get_mem(undo_ctx.blocksize, &keyb);
+ if (retval) {
+ com_err(prg_name, retval, "%s", _("while allocating memory"));
+ exit(1);
+ }
+ retval = ext2fs_get_mem(E2UNDO_MAX_EXTENT_BLOCKS * undo_ctx.blocksize,
+ &buf);
+ if (retval) {
+ com_err(prg_name, retval, "%s", _("while allocating memory"));
+ exit(1);
+ }
+
+ /* load keys */
+ keys_per_block = KEYS_PER_BLOCK(&undo_ctx);
+ lblk = ext2fs_le64_to_cpu(undo_ctx.hdr.key_offset);
+ dbg_printf("nr_keys=%lu, kpb=%zu, blksz=%u\n",
+ undo_ctx.num_keys, keys_per_block, undo_ctx.blocksize);
+ for (i = 0; i < undo_ctx.num_keys; i += keys_per_block) {
+ size_t j, max_j;
+ __le32 crc;
+
+ retval = io_channel_read_blk64(undo_ctx.undo_file,
+ lblk, 1, keyb);
+ if (retval) {
+ com_err(prg_name, retval, "%s", _("while reading keys"));
+ if (force) {
+ io_error = 1;
+ undo_ctx.num_keys = i - 1;
+ break;
+ }
+ exit(1);
+ }
+
+ /* check keys */
+ if (!force &&
+ ext2fs_le32_to_cpu(keyb->magic) != KEYBLOCK_MAGIC) {
+ fprintf(stderr, _("%s: wrong key magic at %llu\n"),
+ tdb_file, (unsigned long long) lblk);
+ exit(1);
+ }
+ crc = keyb->crc;
+ keyb->crc = 0;
+ key_crc = ext2fs_crc32c_le(~0, (unsigned char *)keyb,
+ undo_ctx.blocksize);
+ if (!force && ext2fs_le32_to_cpu(crc) != key_crc) {
+ fprintf(stderr,
+ _("%s: key block checksum error at %llu.\n"),
+ tdb_file, (unsigned long long) lblk);
+ exit(1);
+ }
+
+ /* load keys from key block */
+ lblk++;
+ max_j = undo_ctx.num_keys - i;
+ if (max_j > keys_per_block)
+ max_j = keys_per_block;
+ for (j = 0, dkey = keyb->keys;
+ j < max_j;
+ j++, ikey++, dkey++) {
+ ikey->fsblk = ext2fs_le64_to_cpu(dkey->fsblk);
+ ikey->fileblk = lblk;
+ ikey->blk_crc = ext2fs_le32_to_cpu(dkey->blk_crc);
+ ikey->size = ext2fs_le32_to_cpu(dkey->size);
+ lblk += (ikey->size + undo_ctx.blocksize - 1) /
+ undo_ctx.blocksize;
+
+ if (E2UNDO_MAX_EXTENT_BLOCKS * undo_ctx.blocksize <
+ ikey->size) {
+ com_err(prg_name, retval,
+ _("%s: block %llu is too long."),
+ tdb_file,
+ (unsigned long long) ikey->fsblk);
+ exit(1);
+ }
+
+ /* check each block's crc */
+ retval = io_channel_read_blk64(undo_ctx.undo_file,
+ ikey->fileblk,
+ -(int)ikey->size,
+ buf);
+ if (retval) {
+ com_err(prg_name, retval,
+ _("while fetching block %llu."),
+ (unsigned long long) ikey->fileblk);
+ if (!force)
+ exit(1);
+ io_error = 1;
+ continue;
+ }
+
+ blk_crc = ext2fs_crc32c_le(~0, (unsigned char *)buf,
+ ikey->size);
+ if (blk_crc != ikey->blk_crc) {
+ fprintf(stderr,
+ _("checksum error in filesystem block "
+ "%llu (undo blk %llu)\n"),
+ (unsigned long long) ikey->fsblk,
+ (unsigned long long) ikey->fileblk);
+ if (!force)
+ exit(1);
+ csum_error = 1;
+ }
+ }
+ }
+ ext2fs_free_mem(&keyb);
+
+ /* sort keys in fs block order */
+ qsort(undo_ctx.keys, undo_ctx.num_keys, sizeof(struct undo_key_info),
+ key_compare);
+
+ /* replay */
+ io_channel_set_blksize(channel, undo_ctx.fs_blocksize);
+ for (i = 0, ikey = undo_ctx.keys; i < undo_ctx.num_keys; i++, ikey++) {
+ retval = io_channel_read_blk64(undo_ctx.undo_file,
+ ikey->fileblk,
+ -(int)ikey->size,
+ buf);
+ if (retval) {
+ com_err(prg_name, retval,
+ _("while fetching block %llu."),
+ (unsigned long long) ikey->fileblk);
+ io_error = 1;
+ continue;
+ }
+
+ if (verbose)
+ printf("Replayed block of size %u from %llu to %llu\n",
+ ikey->size, (unsigned long long) ikey->fileblk,
+ (unsigned long long) ikey->fsblk);
+ if (dry_run)
+ continue;
+ retval = io_channel_write_blk64(channel, ikey->fsblk,
+ -(int)ikey->size, buf);
+ if (retval) {
+ com_err(prg_name, retval,
+ _("while writing block %llu."),
+ (unsigned long long) ikey->fsblk);
+ io_error = 1;
+ }
+ }
+
+ if (csum_error)
+ fprintf(stderr, _("Undo file corruption; run e2fsck NOW!\n"));
+ if (io_error)
+ fprintf(stderr, _("IO error during replay; run e2fsck NOW!\n"));
+ if (!(ext2fs_le32_to_cpu(undo_ctx.hdr.state) & E2UNDO_STATE_FINISHED)) {
+ force = 1;
+ fprintf(stderr, _("Incomplete undo record; run e2fsck.\n"));
+ }
+ ext2fs_free_mem(&buf);
+ ext2fs_free_mem(&undo_ctx.keys);
+ io_channel_close(channel);
+
+ /* If there were problems, try to force a fsck */
+ if (!dry_run && (force || csum_error || io_error)) {
+ retval = ext2fs_open2(device_name, NULL,
+ EXT2_FLAG_RW | EXT2_FLAG_64BITS, 0, 0,
+ manager, &fs);
+ if (retval)
+ goto out;
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ if (csum_error || io_error)
+ fs->super->s_state |= EXT2_ERROR_FS;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_close_free(&fs);
+ }
+
+out:
+ io_channel_close(undo_ctx.undo_file);
+
+ return csum_error;
+}
diff --git a/misc/e4crypt.8.in b/misc/e4crypt.8.in
new file mode 100644
index 0000000..97bbcc9
--- /dev/null
+++ b/misc/e4crypt.8.in
@@ -0,0 +1,74 @@
+.TH E4CRYPT 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e4crypt \- ext4 file system encryption utility
+.SH SYNOPSIS
+.B e4crypt add_key -S \fR[\fB -k \fIkeyring\fR ] [\fB-v\fR] [\fB-q\fR] \fR[\fB -p \fIpad\fR ] [ \fIpath\fR ... ]
+.br
+.B e4crypt new_session
+.br
+.B e4crypt get_policy \fIpath\fR ...
+.br
+.B e4crypt set_policy \fR[\fB -p \fIpad\fR ] \fIpolicy path\fR ...
+.SH DESCRIPTION
+.B e4crypt
+performs encryption management for ext4 file systems.
+.SH COMMANDS
+.TP
+.B e4crypt add_key \fR[\fB-vq\fR] [\fB-S\fI salt\fR ] [\fB-k \fIkeyring\fR ] [\fB -p \fIpad\fR ] [ \fIpath\fR ... ]
+Prompts the user for a passphrase and inserts it into the specified
+keyring. If no keyring is specified, e4crypt will use the session
+keyring if it exists or the user session keyring if it does not.
+.IP
+The
+.I salt
+argument is interpreted in a number of different ways, depending on how
+its prefix value. If the first two characters are "s:", then the rest
+of the argument will be used as an text string and used as the salt
+value. If the first two characters are "0x", then the rest of the
+argument will be parsed as a hex string as used as the salt. If the
+first characters are "f:" then the rest of the argument will be
+interpreted as a filename from which the salt value will be read. If
+the string begins with a '/' character, it will similarly be treated as
+filename. Finally, if the
+.I salt
+argument can be parsed as a valid UUID, then the UUID value will be used
+as a salt value.
+.IP
+The
+.I keyring
+argument specifies the keyring to which the key should be added.
+.IP
+The
+.I pad
+value specifies the number of bytes of padding will be added to
+directory names for obfuscation purposes. Valid
+.I pad
+values are 4, 8, 16, and 32.
+.IP
+If one or more directory paths are specified, e4crypt will try to
+set the policy of those directories to use the key just added by the
+.B add_key
+command. If a salt was explicitly specified, then it will be used
+to derive the encryption key of those directories. Otherwise a
+directory-specific default salt will be used.
+.TP
+.B e4crypt get_policy \fIpath\fR ...
+Print the policy for the directories specified on the command line.
+.TP
+.B e4crypt new_session
+Give the invoking process (typically a shell) a new session keyring,
+discarding its old session keyring.
+.TP
+.B e4crypt set_policy \fR[\fB -p \fIpad\fR ] \fIpolicy path\fR ...
+Sets the policy for the directories specified on the command line.
+All directories must be empty to set the policy; if the directory
+already has a policy established, e4crypt will validate that the
+policy matches what was specified. A policy is an encryption key
+identifier consisting of 16 hexadecimal characters.
+.SH AUTHOR
+Written by Michael Halcrow <mhalcrow@google.com>, Ildar Muslukhov
+<muslukhovi@gmail.com>, and Theodore Ts'o <tytso@mit.edu>
+.SH SEE ALSO
+.BR keyctl (1),
+.BR mke2fs (8),
+.BR mount (8).
diff --git a/misc/e4crypt.c b/misc/e4crypt.c
new file mode 100644
index 0000000..67d25d8
--- /dev/null
+++ b/misc/e4crypt.c
@@ -0,0 +1,893 @@
+/*
+ * e4crypt.c - ext4 encryption management utility
+ *
+ * Copyright (c) 2014 Google, Inc.
+ * SHA512 implementation from libtomcrypt.
+ *
+ * Authors: Michael Halcrow <mhalcrow@google.com>,
+ * Ildar Muslukhov <ildarm@google.com>
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include "config.h"
+#include <assert.h>
+#include <errno.h>
+#include <getopt.h>
+#include <dirent.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mntent.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <termios.h>
+#include <unistd.h>
+#include <signal.h>
+#if !defined(HAVE_ADD_KEY) || !defined(HAVE_KEYCTL)
+#include <sys/syscall.h>
+#endif
+#ifdef HAVE_SYS_KEY_H
+#include <sys/key.h>
+#endif
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "uuid/uuid.h"
+
+/* special process keyring shortcut IDs */
+#define KEY_SPEC_THREAD_KEYRING -1
+#define KEY_SPEC_PROCESS_KEYRING -2
+#define KEY_SPEC_SESSION_KEYRING -3
+#define KEY_SPEC_USER_KEYRING -4
+#define KEY_SPEC_USER_SESSION_KEYRING -5
+#define KEY_SPEC_GROUP_KEYRING -6
+
+#define KEYCTL_GET_KEYRING_ID 0
+#define KEYCTL_JOIN_SESSION_KEYRING 1
+#define KEYCTL_DESCRIBE 6
+#define KEYCTL_SEARCH 10
+#define KEYCTL_SESSION_TO_PARENT 18
+
+typedef __s32 key_serial_t;
+
+#define EXT4_KEY_REF_STR_BUF_SIZE ((EXT4_KEY_DESCRIPTOR_SIZE * 2) + 1)
+
+#ifndef EXT4_IOC_GET_ENCRYPTION_PWSALT
+#define EXT4_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16])
+#endif
+
+#define OPT_VERBOSE 0x0001
+#define OPT_QUIET 0x0002
+
+int options;
+
+#ifndef HAVE_KEYCTL
+static long keyctl(int cmd, ...)
+{
+ va_list va;
+ unsigned long arg2, arg3, arg4, arg5;
+
+ va_start(va, cmd);
+ arg2 = va_arg(va, unsigned long);
+ arg3 = va_arg(va, unsigned long);
+ arg4 = va_arg(va, unsigned long);
+ arg5 = va_arg(va, unsigned long);
+ va_end(va);
+ return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
+}
+#endif
+
+#ifndef HAVE_ADD_KEY
+static key_serial_t add_key(const char *type, const char *description,
+ const void *payload, size_t plen,
+ key_serial_t keyring)
+{
+ return syscall(__NR_add_key, type, description, payload,
+ plen, keyring);
+}
+#endif
+
+static const unsigned char *hexchars = (const unsigned char *) "0123456789abcdef";
+static const size_t hexchars_size = 16;
+
+#define SHA512_LENGTH 64
+#define EXT2FS_KEY_TYPE_LOGON "logon"
+#define EXT2FS_KEY_DESC_PREFIX "ext4:"
+#define EXT2FS_KEY_DESC_PREFIX_SIZE 5
+
+#define EXT4_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct ext4_encryption_policy)
+#define EXT4_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct ext4_encryption_policy)
+
+static int int_log2(int arg)
+{
+ int l = 0;
+
+ arg >>= 1;
+ while (arg) {
+ l++;
+ arg >>= 1;
+ }
+ return l;
+}
+
+static void validate_paths(int argc, char *argv[], int path_start_index)
+{
+ int x;
+ int valid = 1;
+ struct stat st;
+
+ for (x = path_start_index; x < argc; x++) {
+ int ret = access(argv[x], W_OK);
+ if (ret) {
+ invalid:
+ perror(argv[x]);
+ valid = 0;
+ continue;
+ }
+ ret = stat(argv[x], &st);
+ if (ret < 0)
+ goto invalid;
+ if (!S_ISDIR(st.st_mode)) {
+ fprintf(stderr, "%s is not a directory\n", argv[x]);
+ goto invalid;
+ }
+ }
+ if (!valid)
+ exit(1);
+}
+
+static int hex2byte(const char *hex, size_t hex_size, unsigned char *bytes,
+ size_t bytes_size)
+{
+ size_t x;
+ unsigned char *h, *l;
+
+ if (hex_size % 2)
+ return -EINVAL;
+ for (x = 0; x < hex_size; x += 2) {
+ h = memchr(hexchars, hex[x], hexchars_size);
+ if (!h)
+ return -EINVAL;
+ l = memchr(hexchars, hex[x + 1], hexchars_size);
+ if (!l)
+ return -EINVAL;
+ if ((x >> 1) >= bytes_size)
+ return -EINVAL;
+ bytes[x >> 1] = (((unsigned char)(h - hexchars) << 4) +
+ (unsigned char)(l - hexchars));
+ }
+ return 0;
+}
+
+/*
+ * Salt handling
+ */
+struct salt {
+ unsigned char *salt;
+ char key_ref_str[EXT4_KEY_REF_STR_BUF_SIZE];
+ unsigned char key_desc[EXT4_KEY_DESCRIPTOR_SIZE];
+ unsigned char key[EXT4_MAX_KEY_SIZE];
+ size_t salt_len;
+};
+struct salt *salt_list;
+unsigned num_salt;
+unsigned max_salt;
+char in_passphrase[EXT4_MAX_PASSPHRASE_SIZE];
+
+static struct salt *find_by_salt(unsigned char *salt, size_t salt_len)
+{
+ unsigned int i;
+ struct salt *p;
+
+ for (i = 0, p = salt_list; i < num_salt; i++, p++)
+ if ((p->salt_len == salt_len) &&
+ !memcmp(p->salt, salt, salt_len))
+ return p;
+ return NULL;
+}
+
+static void add_salt(unsigned char *salt, size_t salt_len)
+{
+ if (find_by_salt(salt, salt_len))
+ return;
+ if (num_salt >= max_salt) {
+ max_salt = num_salt + 10;
+ salt_list = realloc(salt_list, max_salt * sizeof(struct salt));
+ if (!salt_list) {
+ fprintf(stderr, "Couldn't allocate salt list\n");
+ exit(1);
+ }
+ }
+ salt_list[num_salt].salt = salt;
+ salt_list[num_salt].salt_len = salt_len;
+ num_salt++;
+}
+
+static void clear_secrets(void)
+{
+ if (salt_list) {
+ memset(salt_list, 0, sizeof(struct salt) * max_salt);
+ free(salt_list);
+ salt_list = NULL;
+ }
+ memset(in_passphrase, 0, sizeof(in_passphrase));
+}
+
+static void die_signal_handler(int signum EXT2FS_ATTR((unused)),
+ siginfo_t *siginfo EXT2FS_ATTR((unused)),
+ void *context EXT2FS_ATTR((unused)))
+{
+ clear_secrets();
+ exit(-1);
+}
+
+static void sigcatcher_setup(void)
+{
+ struct sigaction sa;
+
+ memset(&sa, 0, sizeof(struct sigaction));
+ sa.sa_sigaction = die_signal_handler;
+ sa.sa_flags = SA_SIGINFO;
+
+ sigaction(SIGHUP, &sa, 0);
+ sigaction(SIGINT, &sa, 0);
+ sigaction(SIGQUIT, &sa, 0);
+ sigaction(SIGFPE, &sa, 0);
+ sigaction(SIGILL, &sa, 0);
+ sigaction(SIGBUS, &sa, 0);
+ sigaction(SIGSEGV, &sa, 0);
+ sigaction(SIGABRT, &sa, 0);
+ sigaction(SIGPIPE, &sa, 0);
+ sigaction(SIGALRM, &sa, 0);
+ sigaction(SIGTERM, &sa, 0);
+ sigaction(SIGUSR1, &sa, 0);
+ sigaction(SIGUSR2, &sa, 0);
+ sigaction(SIGPOLL, &sa, 0);
+ sigaction(SIGPROF, &sa, 0);
+ sigaction(SIGSYS, &sa, 0);
+ sigaction(SIGTRAP, &sa, 0);
+ sigaction(SIGVTALRM, &sa, 0);
+ sigaction(SIGXCPU, &sa, 0);
+ sigaction(SIGXFSZ, &sa, 0);
+}
+
+
+#define PARSE_FLAGS_NOTSUPP_OK 0x0001
+#define PARSE_FLAGS_FORCE_FN 0x0002
+
+static void parse_salt(char *salt_str, int flags)
+{
+ unsigned char buf[EXT4_MAX_SALT_SIZE];
+ char *cp = salt_str;
+ unsigned char *salt_buf;
+ int fd, ret, salt_len = 0;
+
+ if (flags & PARSE_FLAGS_FORCE_FN)
+ goto salt_from_filename;
+ if (strncmp(cp, "s:", 2) == 0) {
+ cp += 2;
+ salt_len = strlen(cp);
+ if (salt_len >= EXT4_MAX_SALT_SIZE)
+ goto invalid_salt;
+ strncpy((char *) buf, cp, sizeof(buf));
+ } else if (cp[0] == '/') {
+ salt_from_filename:
+ fd = open(cp, O_RDONLY | O_DIRECTORY);
+ if (fd == -1 && errno == ENOTDIR)
+ fd = open(cp, O_RDONLY);
+ if (fd == -1) {
+ perror(cp);
+ exit(1);
+ }
+ ret = ioctl(fd, EXT4_IOC_GET_ENCRYPTION_PWSALT, &buf);
+ close(fd);
+ if (ret < 0) {
+ if (flags & PARSE_FLAGS_NOTSUPP_OK)
+ return;
+ perror("EXT4_IOC_GET_ENCRYPTION_PWSALT");
+ exit(1);
+ }
+ if (options & OPT_VERBOSE) {
+ char tmp[80];
+ uuid_unparse(buf, tmp);
+ printf("%s has pw salt %s\n", cp, tmp);
+ }
+ salt_len = 16;
+ } else if (strncmp(cp, "f:", 2) == 0) {
+ cp += 2;
+ goto salt_from_filename;
+ } else if (strncmp(cp, "0x", 2) == 0) {
+ unsigned char *h, *l;
+
+ cp += 2;
+ if (strlen(cp) & 1)
+ goto invalid_salt;
+ while (*cp) {
+ if (salt_len >= EXT4_MAX_SALT_SIZE)
+ goto invalid_salt;
+ h = memchr(hexchars, *cp++, hexchars_size);
+ l = memchr(hexchars, *cp++, hexchars_size);
+ if (!h || !l)
+ goto invalid_salt;
+ buf[salt_len++] =
+ (((unsigned char)(h - hexchars) << 4) +
+ (unsigned char)(l - hexchars));
+ }
+ } else if (uuid_parse(cp, buf) == 0) {
+ salt_len = 16;
+ } else {
+ invalid_salt:
+ fprintf(stderr, "Invalid salt: %s\n", salt_str);
+ exit(1);
+ }
+ salt_buf = malloc(salt_len);
+ if (!salt_buf) {
+ fprintf(stderr, "Couldn't allocate salt\n");
+ exit(1);
+ }
+ memcpy(salt_buf, buf, salt_len);
+ add_salt(salt_buf, salt_len);
+}
+
+static void set_policy(struct salt *set_salt, int pad,
+ int argc, char *argv[], int path_start_index)
+{
+ struct salt *salt;
+ struct ext4_encryption_policy policy;
+ uuid_t uu;
+ int fd;
+ int x;
+ int rc;
+
+ if ((pad != 4) && (pad != 8) &&
+ (pad != 16) && (pad != 32)) {
+ fprintf(stderr, "Invalid padding %d\n", pad);
+ exit(1);
+ }
+
+ for (x = path_start_index; x < argc; x++) {
+ fd = open(argv[x], O_DIRECTORY);
+ if (fd == -1) {
+ perror(argv[x]);
+ exit(1);
+ }
+ if (set_salt)
+ salt = set_salt;
+ else {
+ if (ioctl(fd, EXT4_IOC_GET_ENCRYPTION_PWSALT,
+ &uu) < 0) {
+ perror("EXT4_IOC_GET_ENCRYPTION_PWSALT");
+ exit(1);
+ }
+ salt = find_by_salt(uu, sizeof(uu));
+ if (!salt) {
+ fprintf(stderr, "Couldn't find salt!?!\n");
+ exit(1);
+ }
+ }
+ policy.version = 0;
+ policy.contents_encryption_mode =
+ EXT4_ENCRYPTION_MODE_AES_256_XTS;
+ policy.filenames_encryption_mode =
+ EXT4_ENCRYPTION_MODE_AES_256_CTS;
+ policy.flags = int_log2(pad >> 2);
+ memcpy(policy.master_key_descriptor, salt->key_desc,
+ EXT4_KEY_DESCRIPTOR_SIZE);
+ rc = ioctl(fd, EXT4_IOC_SET_ENCRYPTION_POLICY, &policy);
+ close(fd);
+ if (rc) {
+ printf("Error [%s] setting policy.\nThe key descriptor "
+ "[%s] may not match the existing encryption "
+ "context for directory [%s].\n",
+ strerror(errno), salt->key_ref_str, argv[x]);
+ continue;
+ }
+ printf("Key with descriptor [%s] applied to %s.\n",
+ salt->key_ref_str, argv[x]);
+ }
+}
+
+static void pbkdf2_sha512(const char *passphrase, struct salt *salt,
+ unsigned int count,
+ unsigned char derived_key[EXT4_MAX_KEY_SIZE])
+{
+ size_t passphrase_size = strlen(passphrase);
+ unsigned char buf[SHA512_LENGTH + EXT4_MAX_PASSPHRASE_SIZE] = {0};
+ unsigned char tempbuf[SHA512_LENGTH] = {0};
+ char final[SHA512_LENGTH] = {0};
+ unsigned char saltbuf[EXT4_MAX_SALT_SIZE + EXT4_MAX_PASSPHRASE_SIZE] = {0};
+ int actual_buf_len = SHA512_LENGTH + passphrase_size;
+ int actual_saltbuf_len = EXT4_MAX_SALT_SIZE + passphrase_size;
+ unsigned int x, y;
+ __u32 *final_u32 = (__u32 *)final;
+ __u32 *temp_u32 = (__u32 *)tempbuf;
+
+ if (passphrase_size > EXT4_MAX_PASSPHRASE_SIZE) {
+ printf("Passphrase size is %zd; max is %d.\n", passphrase_size,
+ EXT4_MAX_PASSPHRASE_SIZE);
+ exit(1);
+ }
+ if (salt->salt_len > EXT4_MAX_SALT_SIZE) {
+ printf("Salt size is %zd; max is %d.\n", salt->salt_len,
+ EXT4_MAX_SALT_SIZE);
+ exit(1);
+ }
+ assert(EXT4_MAX_KEY_SIZE <= SHA512_LENGTH);
+
+ memcpy(saltbuf, salt->salt, salt->salt_len);
+ memcpy(&saltbuf[EXT4_MAX_SALT_SIZE], passphrase, passphrase_size);
+
+ memcpy(&buf[SHA512_LENGTH], passphrase, passphrase_size);
+
+ for (x = 0; x < count; ++x) {
+ if (x == 0) {
+ ext2fs_sha512(saltbuf, actual_saltbuf_len, tempbuf);
+ } else {
+ /*
+ * buf: [previous hash || passphrase]
+ */
+ memcpy(buf, tempbuf, SHA512_LENGTH);
+ ext2fs_sha512(buf, actual_buf_len, tempbuf);
+ }
+ for (y = 0; y < (sizeof(final) / sizeof(*final_u32)); ++y)
+ final_u32[y] = final_u32[y] ^ temp_u32[y];
+ }
+ memcpy(derived_key, final, EXT4_MAX_KEY_SIZE);
+}
+
+static int disable_echo(struct termios *saved_settings)
+{
+ struct termios current_settings;
+ int rc = 0;
+
+ rc = tcgetattr(0, &current_settings);
+ if (rc)
+ return rc;
+ *saved_settings = current_settings;
+ current_settings.c_lflag &= ~ECHO;
+ rc = tcsetattr(0, TCSANOW, &current_settings);
+
+ return rc;
+}
+
+static void get_passphrase(char *passphrase, int len)
+{
+ char *p;
+ struct termios current_settings;
+
+ assert(len > 0);
+ disable_echo(&current_settings);
+ p = fgets(passphrase, len, stdin);
+ tcsetattr(0, TCSANOW, &current_settings);
+ printf("\n");
+ if (!p) {
+ printf("Aborting.\n");
+ exit(1);
+ }
+ p = strrchr(passphrase, '\n');
+ if (!p)
+ p = passphrase + len - 1;
+ *p = '\0';
+}
+
+struct keyring_map {
+ char name[4];
+ size_t name_len;
+ int code;
+};
+
+static const struct keyring_map keyrings[] = {
+ {"@us", 3, KEY_SPEC_USER_SESSION_KEYRING},
+ {"@u", 2, KEY_SPEC_USER_KEYRING},
+ {"@s", 2, KEY_SPEC_SESSION_KEYRING},
+ {"@g", 2, KEY_SPEC_GROUP_KEYRING},
+ {"@p", 2, KEY_SPEC_PROCESS_KEYRING},
+ {"@t", 2, KEY_SPEC_THREAD_KEYRING},
+};
+
+static int get_keyring_id(const char *keyring)
+{
+ unsigned int x;
+ char *end;
+
+ /*
+ * If no keyring is specified, by default use either the user
+ * session keyring or the session keyring. Fetching the
+ * session keyring will return the user session keyring if no
+ * session keyring has been set.
+ */
+ if (keyring == NULL)
+ return KEY_SPEC_SESSION_KEYRING;
+ for (x = 0; x < (sizeof(keyrings) / sizeof(keyrings[0])); ++x) {
+ if (strcmp(keyring, keyrings[x].name) == 0) {
+ return keyrings[x].code;
+ }
+ }
+ x = strtoul(keyring, &end, 10);
+ if (*end == '\0') {
+ if (keyctl(KEYCTL_DESCRIBE, x, NULL, 0) < 0)
+ return 0;
+ return x;
+ }
+ return 0;
+}
+
+static void generate_key_ref_str(struct salt *salt)
+{
+ unsigned char key_ref1[SHA512_LENGTH];
+ unsigned char key_ref2[SHA512_LENGTH];
+ int x;
+
+ ext2fs_sha512(salt->key, EXT4_MAX_KEY_SIZE, key_ref1);
+ ext2fs_sha512(key_ref1, SHA512_LENGTH, key_ref2);
+ memcpy(salt->key_desc, key_ref2, EXT4_KEY_DESCRIPTOR_SIZE);
+ for (x = 0; x < EXT4_KEY_DESCRIPTOR_SIZE; ++x) {
+ sprintf(&salt->key_ref_str[x * 2], "%02x",
+ salt->key_desc[x]);
+ }
+ salt->key_ref_str[EXT4_KEY_REF_STR_BUF_SIZE - 1] = '\0';
+}
+
+static void insert_key_into_keyring(const char *keyring, struct salt *salt)
+{
+ int keyring_id = get_keyring_id(keyring);
+ struct ext4_encryption_key key;
+ char key_ref_full[EXT2FS_KEY_DESC_PREFIX_SIZE +
+ EXT4_KEY_REF_STR_BUF_SIZE];
+ int rc;
+
+ if (keyring_id == 0) {
+ printf("Invalid keyring [%s].\n", keyring);
+ exit(1);
+ }
+ sprintf(key_ref_full, "%s%s", EXT2FS_KEY_DESC_PREFIX,
+ salt->key_ref_str);
+ rc = keyctl(KEYCTL_SEARCH, keyring_id, EXT2FS_KEY_TYPE_LOGON,
+ key_ref_full, 0);
+ if (rc != -1) {
+ if ((options & OPT_QUIET) == 0)
+ printf("Key with descriptor [%s] already exists\n",
+ salt->key_ref_str);
+ return;
+ } else if ((rc == -1) && (errno != ENOKEY)) {
+ printf("keyctl_search failed: %s\n", strerror(errno));
+ if (errno == EINVAL)
+ printf("Keyring [%s] is not available.\n", keyring);
+ exit(1);
+ }
+ key.mode = EXT4_ENCRYPTION_MODE_AES_256_XTS;
+ memcpy(key.raw, salt->key, EXT4_MAX_KEY_SIZE);
+ key.size = EXT4_MAX_KEY_SIZE;
+
+ /*
+ * We need to do this instead of simply adding the key to
+ * KEY_SPEC_SESSION_KEYRING since trying to add a key to a
+ * session keyring that does not yet exist will cause the
+ * kernel to create a session keyring --- which will then get
+ * garbage collected as soon as e4crypt exits.
+ *
+ * The fact that the keyctl system call and the add_key system
+ * call treats KEY_SPEC_SESSION_KEYRING differently when a
+ * session keyring does not exist is very unfortunate and
+ * confusing, but so it goes...
+ */
+ if (keyring_id == KEY_SPEC_SESSION_KEYRING) {
+ keyring_id = keyctl(KEYCTL_GET_KEYRING_ID, keyring_id, 0);
+ if (keyring_id < 0) {
+ printf("Error getting session keyring ID: %s\n",
+ strerror(errno));
+ exit(1);
+ }
+ }
+ rc = add_key(EXT2FS_KEY_TYPE_LOGON, key_ref_full, (void *)&key,
+ sizeof(key), keyring_id);
+ if (rc == -1) {
+ if (errno == EDQUOT) {
+ printf("Error adding key to keyring; quota exceeded\n");
+ } else {
+ printf("Error adding key with key descriptor [%s]: "
+ "%s\n", salt->key_ref_str, strerror(errno));
+ }
+ exit(1);
+ } else {
+ if ((options & OPT_QUIET) == 0)
+ printf("Added key with descriptor [%s]\n",
+ salt->key_ref_str);
+ }
+}
+
+static void get_default_salts(void)
+{
+ FILE *f = setmntent("/etc/mtab", "r");
+ struct mntent *mnt;
+
+ while (f && ((mnt = getmntent(f)) != NULL)) {
+ if (strcmp(mnt->mnt_type, "ext4") ||
+ access(mnt->mnt_dir, R_OK))
+ continue;
+ parse_salt(mnt->mnt_dir, PARSE_FLAGS_NOTSUPP_OK);
+ }
+ endmntent(f);
+}
+
+/* Functions which implement user commands */
+
+struct cmd_desc {
+ const char *cmd_name;
+ void (*cmd_func)(int, char **, const struct cmd_desc *);
+ const char *cmd_desc;
+ const char *cmd_help;
+ int cmd_flags;
+};
+
+#define CMD_HIDDEN 0x0001
+
+static void do_help(int argc, char **argv, const struct cmd_desc *cmd);
+
+#define add_key_desc "adds a key to the user's keyring"
+#define add_key_help \
+"e4crypt add_key -S salt [ -k keyring ] [-v] [-q] [ -p pad ] [ path ... ]\n\n" \
+"Prompts the user for a passphrase and inserts it into the specified\n" \
+"keyring. If no keyring is specified, e4crypt will use the session\n" \
+"keyring if it exists or the user session keyring if it does not.\n\n" \
+"If one or more directory paths are specified, e4crypt will try to\n" \
+"set the policy of those directories to use the key just entered by\n" \
+"the user.\n"
+
+static void do_add_key(int argc, char **argv, const struct cmd_desc *cmd)
+{
+ struct salt *salt;
+ bool explicit_salt = false;
+ char *keyring = NULL;
+ int i, opt, pad = 4;
+ unsigned j;
+
+ while ((opt = getopt(argc, argv, "k:S:p:vq")) != -1) {
+ switch (opt) {
+ case 'k':
+ /* Specify a keyring. */
+ keyring = optarg;
+ break;
+ case 'p':
+ pad = atoi(optarg);
+ break;
+ case 'S':
+ if (explicit_salt) {
+ fputs("May only provide -S once\n", stderr);
+ exit(1);
+ }
+ /* Salt value for passphrase. */
+ parse_salt(optarg, 0);
+ explicit_salt = true;
+ break;
+ case 'v':
+ options |= OPT_VERBOSE;
+ break;
+ case 'q':
+ options |= OPT_QUIET;
+ break;
+ default:
+ case '?':
+ if (opt != '?')
+ fprintf(stderr, "Unrecognized option: %c\n",
+ opt);
+ fputs("USAGE:\n ", stderr);
+ fputs(cmd->cmd_help, stderr);
+ exit(1);
+ }
+ }
+ if (num_salt == 0)
+ get_default_salts();
+ if (num_salt == 0) {
+ fprintf(stderr, "No salt values available\n");
+ exit(1);
+ }
+ validate_paths(argc, argv, optind);
+ if (!explicit_salt)
+ for (i = optind; i < argc; i++)
+ parse_salt(argv[i], PARSE_FLAGS_FORCE_FN);
+ printf("Enter passphrase (echo disabled): ");
+ get_passphrase(in_passphrase, sizeof(in_passphrase));
+ for (j = 0, salt = salt_list; j < num_salt; j++, salt++) {
+ pbkdf2_sha512(in_passphrase, salt,
+ EXT4_PBKDF2_ITERATIONS, salt->key);
+ generate_key_ref_str(salt);
+ insert_key_into_keyring(keyring, salt);
+ }
+ if (optind != argc) {
+ salt = explicit_salt ? salt_list : NULL;
+ set_policy(salt, pad, argc, argv, optind);
+ }
+ clear_secrets();
+ exit(0);
+}
+
+#define set_policy_desc "sets a policy for directories"
+#define set_policy_help \
+"e4crypt set_policy [ -p pad ] policy path ... \n\n" \
+"Sets the policy for the directories specified on the command line.\n" \
+"All directories must be empty to set the policy; if the directory\n" \
+"already has a policy established, e4crypt will validate that it the\n" \
+"policy matches what was specified. A policy is an encryption key\n" \
+"identifier consisting of 16 hexadecimal characters.\n"
+
+static void do_set_policy(int argc, char **argv, const struct cmd_desc *cmd)
+{
+ struct salt saltbuf;
+ int c, pad = 4;
+
+ while ((c = getopt (argc, argv, "p:")) != EOF) {
+ switch (c) {
+ case 'p':
+ pad = atoi(optarg);
+ break;
+ }
+ }
+
+ if (argc < optind + 2) {
+ fprintf(stderr, "Missing required argument(s).\n\n");
+ fputs("USAGE:\n ", stderr);
+ fputs(cmd->cmd_help, stderr);
+ exit(1);
+ }
+
+ if ((strlen(argv[optind]) != (EXT4_KEY_DESCRIPTOR_SIZE * 2)) ||
+ hex2byte(argv[optind], (EXT4_KEY_DESCRIPTOR_SIZE * 2),
+ saltbuf.key_desc, EXT4_KEY_DESCRIPTOR_SIZE)) {
+ printf("Invalid key descriptor [%s]. Valid characters "
+ "are 0-9 and a-f, lower case. "
+ "Length must be %d.\n",
+ argv[optind], (EXT4_KEY_DESCRIPTOR_SIZE * 2));
+ exit(1);
+ }
+ validate_paths(argc, argv, optind+1);
+ strcpy(saltbuf.key_ref_str, argv[optind]);
+ set_policy(&saltbuf, pad, argc, argv, optind+1);
+ exit(0);
+}
+
+#define get_policy_desc "get the encryption for directories"
+#define get_policy_help \
+"e4crypt get_policy path ... \n\n" \
+"Gets the policy for the directories specified on the command line.\n"
+
+static void do_get_policy(int argc, char **argv, const struct cmd_desc *cmd)
+{
+ struct ext4_encryption_policy policy;
+ int i, j, fd, rc;
+
+ if (argc < 2) {
+ fprintf(stderr, "Missing required argument(s).\n\n");
+ fputs("USAGE:\n ", stderr);
+ fputs(cmd->cmd_help, stderr);
+ exit(1);
+ }
+
+ for (i = 1; i < argc; i++) {
+ fd = open(argv[i], O_RDONLY);
+ if (fd == -1) {
+ perror(argv[i]);
+ exit(1);
+ }
+ rc = ioctl(fd, EXT4_IOC_GET_ENCRYPTION_POLICY, &policy);
+ close(fd);
+ if (rc) {
+ printf("Error getting policy for %s: %s\n",
+ argv[i], strerror(errno));
+ continue;
+ }
+ printf("%s: ", argv[i]);
+ for (j = 0; j < EXT4_KEY_DESCRIPTOR_SIZE; j++) {
+ printf("%02x", (unsigned char) policy.master_key_descriptor[j]);
+ }
+ fputc('\n', stdout);
+ }
+ exit(0);
+}
+
+#define new_session_desc "give the invoking process a new session keyring"
+#define new_session_help \
+"e4crypt new_session\n\n" \
+"Give the invoking process (typically a shell) a new session keyring,\n" \
+"discarding its old session keyring.\n"
+
+static void do_new_session(int argc, char **argv EXT2FS_ATTR((unused)),
+ const struct cmd_desc *cmd)
+{
+ long keyid, ret;
+
+ if (argc > 1) {
+ fputs("Excess arguments\n\n", stderr);
+ fputs(cmd->cmd_help, stderr);
+ exit(1);
+ }
+ keyid = keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL);
+ if (keyid < 0) {
+ perror("KEYCTL_JOIN_SESSION_KEYRING");
+ exit(1);
+ }
+ ret = keyctl(KEYCTL_SESSION_TO_PARENT, NULL);
+ if (ret < 0) {
+ perror("KEYCTL_SESSION_TO_PARENT");
+ exit(1);
+ }
+ printf("Switched invoking process to new session keyring %ld\n", keyid);
+ exit(0);
+}
+
+#define CMD(name) { #name, do_##name, name##_desc, name##_help, 0 }
+#define _CMD(name) { #name, do_##name, NULL, NULL, CMD_HIDDEN }
+
+const struct cmd_desc cmd_list[] = {
+ _CMD(help),
+ CMD(add_key),
+ CMD(get_policy),
+ CMD(new_session),
+ CMD(set_policy),
+ { NULL, NULL, NULL, NULL, 0 }
+};
+
+static void do_help(int argc, char **argv,
+ const struct cmd_desc *cmd EXT2FS_ATTR((unused)))
+{
+ const struct cmd_desc *p;
+
+ if (argc > 1) {
+ for (p = cmd_list; p->cmd_name; p++) {
+ if (p->cmd_flags & CMD_HIDDEN)
+ continue;
+ if (strcmp(p->cmd_name, argv[1]) == 0) {
+ putc('\n', stdout);
+ fputs("USAGE:\n ", stdout);
+ fputs(p->cmd_help, stdout);
+ exit(0);
+ }
+ }
+ printf("Unknown command: %s\n\n", argv[1]);
+ }
+
+ fputs("Available commands:\n", stdout);
+ for (p = cmd_list; p->cmd_name; p++) {
+ if (p->cmd_flags & CMD_HIDDEN)
+ continue;
+ printf(" %-20s %s\n", p->cmd_name, p->cmd_desc);
+ }
+ printf("\nTo get more information on a command, "
+ "type 'e4crypt help cmd'\n");
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ const struct cmd_desc *cmd;
+
+ if (argc < 2)
+ do_help(argc, argv, cmd_list);
+
+ sigcatcher_setup();
+ for (cmd = cmd_list; cmd->cmd_name; cmd++) {
+ if (strcmp(cmd->cmd_name, argv[1]) == 0) {
+ cmd->cmd_func(argc-1, argv+1, cmd);
+ exit(0);
+ }
+ }
+ printf("Unknown command: %s\n\n", argv[1]);
+ do_help(1, argv, cmd_list);
+ return 0;
+}
diff --git a/misc/e4defrag.8.in b/misc/e4defrag.8.in
new file mode 100644
index 0000000..53d7f17
--- /dev/null
+++ b/misc/e4defrag.8.in
@@ -0,0 +1,90 @@
+.TH E4DEFRAG 8 "May 2009" "e4defrag version 2.0"
+.SH NAME
+e4defrag \- online defragmenter for ext4 file system
+.SH SYNOPSIS
+.B e4defrag
+[
+.B \-c
+]
+[
+.B \-v
+]
+.I target
+\&...
+.SH DESCRIPTION
+.B e4defrag
+reduces fragmentation of extent based file. The file targeted by
+.B e4defrag
+is created on ext4 file system made with "-O extent" option (see
+.BR mke2fs (8)).
+The targeted file gets more contiguous blocks and improves the file access
+speed.
+.PP
+.I target
+is a regular file, a directory, or a device that is mounted as ext4 file system.
+If
+.I target
+is a directory,
+.B e4defrag
+reduces fragmentation of all files in it. If
+.I target
+is a device,
+.B e4defrag
+gets the mount point of it and reduces fragmentation of all files in this mount
+point.
+.SH OPTIONS
+.TP
+.B \-c
+Get a current fragmentation count and an ideal fragmentation count, and
+calculate fragmentation score based on them. By seeing this score, we can
+determine whether we should execute
+.B e4defrag
+to
+.IR target .
+When used with
+.B \-v
+option, the current fragmentation count and the ideal fragmentation count are
+printed for each file.
+.IP
+Also this option outputs the average data size in one extent. If you see it,
+you'll find the file has ideal extents or not. Note that the maximum extent
+size is 131072KB in ext4 file system (if block size is 4KB).
+.IP
+If this option is specified,
+.I target
+is never defragmented.
+.TP
+.B \-v
+Print error messages and the fragmentation count before and after defrag for
+each file.
+.SH NOTES
+.B e4defrag
+does not support swap file, files in lost+found directory, and files allocated
+in indirect blocks. When
+.I target
+is a device or a mount point,
+.B e4defrag
+doesn't defragment files in mount point of other device.
+.PP
+It is safe to run e4defrag on a file while it is actively in use by another
+application. Since the contents of file blocks are copied using the
+page cache, this can result in a performance slowdown to both e4defrag
+and the application due to contention over the system's memory and disk
+bandwidth.
+.PP
+If the file system's free space is fragmented, or if there is
+insufficient free space available, e4defrag may not be able
+to improve the file's fragmentation.
+.PP
+Non-privileged users can execute
+.B e4defrag
+to their own file, but the score is not printed if
+.B \-c
+option is specified. Therefore, it is desirable to be executed by root user.
+.SH AUTHOR
+Written by Akira Fujita <a-fujita@rs.jp.nec.com> and Takashi Sato
+<t-sato@yk.jp.nec.com>.
+.SH SEE ALSO
+.BR mke2fs (8),
+.BR mount (8).
+
diff --git a/misc/e4defrag.c b/misc/e4defrag.c
new file mode 100644
index 0000000..e3011d7
--- /dev/null
+++ b/misc/e4defrag.c
@@ -0,0 +1,2035 @@
+/*
+ * e4defrag.c - ext4 filesystem defragmenter
+ *
+ * Copyright (C) 2009 NEC Software Tohoku, Ltd.
+ *
+ * Author: Akira Fujita <a-fujita@rs.jp.nec.com>
+ * Takashi Sato <t-sato@yk.jp.nec.com>
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include "config.h"
+#include <ctype.h>
+#include <dirent.h>
+#include <endian.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ftw.h>
+#include <limits.h>
+#include <mntent.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <ext2fs/ext2_types.h>
+#include <ext2fs/ext2fs.h>
+#include <sys/ioctl.h>
+#include <ext2fs/fiemap.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <sys/vfs.h>
+
+#include "../version.h"
+
+/* A relatively new ioctl interface ... */
+#ifndef EXT4_IOC_MOVE_EXT
+#define EXT4_IOC_MOVE_EXT _IOWR('f', 15, struct move_extent)
+#endif
+
+/* Macro functions */
+#define PRINT_ERR_MSG(msg) fprintf(stderr, "%s\n", (msg))
+#define IN_FTW_PRINT_ERR_MSG(msg) \
+ fprintf(stderr, "\t%s\t\t[ NG ]\n", (msg))
+#define PRINT_FILE_NAME(file) fprintf(stderr, " \"%s\"\n", (file))
+#define PRINT_ERR_MSG_WITH_ERRNO(msg) \
+ fprintf(stderr, "\t%s:%s\t[ NG ]\n", (msg), strerror(errno))
+#define STATISTIC_ERR_MSG(msg) \
+ fprintf(stderr, "\t%s\n", (msg))
+#define STATISTIC_ERR_MSG_WITH_ERRNO(msg) \
+ fprintf(stderr, "\t%s:%s\n", (msg), strerror(errno))
+#define min(x, y) (((x) > (y)) ? (y) : (x))
+#define CALC_SCORE(ratio) \
+ ((ratio) > 10 ? (80 + 20 * (ratio) / 100) : (8 * (ratio)))
+/* Wrap up the free function */
+#define FREE(tmp) \
+ do { \
+ if ((tmp) != NULL) \
+ free(tmp); \
+ } while (0) \
+/* Insert list2 after list1 */
+#define insert(list1, list2) \
+ do { \
+ list2->next = list1->next; \
+ list1->next->prev = list2; \
+ list2->prev = list1; \
+ list1->next = list2; \
+ } while (0)
+
+/* To delete unused warning */
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
+/* The mode of defrag */
+#define DETAIL 0x01
+#define STATISTIC 0x02
+
+#define DEVNAME 0
+#define DIRNAME 1
+#define FILENAME 2
+
+#define FTW_OPEN_FD 2000
+
+#define FS_EXT4 "ext4"
+#define ROOT_UID 0
+
+#define BOUND_SCORE 55
+#define SHOW_FRAG_FILES 5
+
+/* Magic number for ext4 */
+#define EXT4_SUPER_MAGIC 0xEF53
+
+/* Definition of flex_bg */
+#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
+
+/* The following macro is used for ioctl FS_IOC_FIEMAP
+ * EXTENT_MAX_COUNT: the maximum number of extents for exchanging between
+ * kernel-space and user-space per ioctl
+ */
+#define EXTENT_MAX_COUNT 512
+
+/* The following macros are error message */
+#define MSG_USAGE \
+"Usage : e4defrag [-v] file...| directory...| device...\n\
+ : e4defrag -c file...| directory...| device...\n"
+
+#define NGMSG_EXT4 "Filesystem is not ext4 filesystem"
+#define NGMSG_FILE_EXTENT "Failed to get file extents"
+#define NGMSG_FILE_INFO "Failed to get file information"
+#define NGMSG_FILE_OPEN "Failed to open"
+#define NGMSG_FILE_UNREG "File is not regular file"
+#define NGMSG_LOST_FOUND "Can not process \"lost+found\""
+
+/* Data type for filesystem-wide blocks number */
+typedef unsigned long long ext4_fsblk_t;
+
+struct fiemap_extent_data {
+ __u64 len; /* blocks count */
+ __u64 logical; /* start logical block number */
+ ext4_fsblk_t physical; /* start physical block number */
+};
+
+struct fiemap_extent_list {
+ struct fiemap_extent_list *prev;
+ struct fiemap_extent_list *next;
+ struct fiemap_extent_data data; /* extent belong to file */
+};
+
+struct fiemap_extent_group {
+ struct fiemap_extent_group *prev;
+ struct fiemap_extent_group *next;
+ __u64 len; /* length of this continuous region */
+ struct fiemap_extent_list *start; /* start ext */
+ struct fiemap_extent_list *end; /* end ext */
+};
+
+struct move_extent {
+ __s32 reserved; /* original file descriptor */
+ __u32 donor_fd; /* donor file descriptor */
+ __u64 orig_start; /* logical start offset in block for orig */
+ __u64 donor_start; /* logical start offset in block for donor */
+ __u64 len; /* block length to be moved */
+ __u64 moved_len; /* moved block length */
+};
+
+struct frag_statistic_ino {
+ int now_count; /* the file's extents count of before defrag */
+ int best_count; /* the best file's extents count */
+ __u64 size_per_ext; /* size(KB) per extent */
+ float ratio; /* the ratio of fragmentation */
+ char msg_buffer[PATH_MAX + 1]; /* pathname of the file */
+};
+
+static char lost_found_dir[PATH_MAX + 1];
+static int block_size;
+static int extents_before_defrag;
+static int extents_after_defrag;
+static int mode_flag;
+static unsigned int current_uid;
+static unsigned int defraged_file_count;
+static unsigned int frag_files_before_defrag;
+static unsigned int frag_files_after_defrag;
+static unsigned int regular_count;
+static unsigned int succeed_cnt;
+static unsigned int total_count;
+static __u8 log_groups_per_flex;
+static __u32 blocks_per_group;
+static __u32 feature_incompat;
+static ext4_fsblk_t files_block_count;
+static struct frag_statistic_ino frag_rank[SHOW_FRAG_FILES];
+
+
+/*
+ * We prefer posix_fadvise64 when available, as it allows 64bit offset on
+ * 32bit systems
+ */
+#if defined(HAVE_POSIX_FADVISE64)
+#define posix_fadvise posix_fadvise64
+#elif defined(HAVE_FADVISE64)
+#define posix_fadvise fadvise64
+#elif !defined(HAVE_POSIX_FADVISE)
+#error posix_fadvise not available!
+#endif
+
+/*
+ * get_mount_point() - Get device's mount point.
+ *
+ * @devname: the device's name.
+ * @mount_point: the mount point.
+ * @dir_path_len: the length of directory.
+ */
+static int get_mount_point(const char *devname, char *mount_point,
+ int dir_path_len)
+{
+ /* Refer to /etc/mtab */
+ const char *mtab = MOUNTED;
+ FILE *fp = NULL;
+ struct mntent *mnt = NULL;
+ struct stat64 sb;
+
+ if (stat64(devname, &sb) < 0) {
+ perror(NGMSG_FILE_INFO);
+ PRINT_FILE_NAME(devname);
+ return -1;
+ }
+
+ fp = setmntent(mtab, "r");
+ if (fp == NULL) {
+ perror("Couldn't access /etc/mtab");
+ return -1;
+ }
+
+ while ((mnt = getmntent(fp)) != NULL) {
+ struct stat64 ms;
+
+ /*
+ * To handle device symlinks, we see if the
+ * device number matches, not the name
+ */
+ if (stat64(mnt->mnt_fsname, &ms) < 0)
+ continue;
+ if (sb.st_rdev != ms.st_rdev)
+ continue;
+
+ endmntent(fp);
+ if (strcmp(mnt->mnt_type, FS_EXT4) == 0) {
+ strncpy(mount_point, mnt->mnt_dir,
+ dir_path_len);
+ return 0;
+ }
+ PRINT_ERR_MSG(NGMSG_EXT4);
+ return -1;
+ }
+ endmntent(fp);
+ PRINT_ERR_MSG("Filesystem is not mounted");
+ return -1;
+}
+
+/*
+ * is_ext4() - Whether on an ext4 filesystem.
+ *
+ * @file: the file's name.
+ */
+static int is_ext4(const char *file, char devname[PATH_MAX + 1])
+{
+ int maxlen = 0;
+ int len, ret;
+ int type_is_ext4 = 0;
+ FILE *fp = NULL;
+ /* Refer to /etc/mtab */
+ const char *mtab = MOUNTED;
+ char file_path[PATH_MAX + 1];
+ struct mntent *mnt = NULL;
+ struct statfs64 fsbuf;
+
+ /* Get full path */
+ if (realpath(file, file_path) == NULL) {
+ perror("Couldn't get full path");
+ PRINT_FILE_NAME(file);
+ return -1;
+ }
+
+ if (statfs64(file_path, &fsbuf) < 0) {
+ perror("Failed to get filesystem information");
+ PRINT_FILE_NAME(file);
+ return -1;
+ }
+
+ if (fsbuf.f_type != EXT4_SUPER_MAGIC) {
+ PRINT_ERR_MSG(NGMSG_EXT4);
+ return -1;
+ }
+
+ fp = setmntent(mtab, "r");
+ if (fp == NULL) {
+ perror("Couldn't access /etc/mtab");
+ return -1;
+ }
+
+ while ((mnt = getmntent(fp)) != NULL) {
+ if (mnt->mnt_fsname[0] != '/')
+ continue;
+ len = strlen(mnt->mnt_dir);
+ ret = memcmp(file_path, mnt->mnt_dir, len);
+ if (ret != 0)
+ continue;
+
+ if (maxlen >= len)
+ continue;
+
+ maxlen = len;
+
+ type_is_ext4 = !strcmp(mnt->mnt_type, FS_EXT4);
+ strncpy(lost_found_dir, mnt->mnt_dir, PATH_MAX);
+ strncpy(devname, mnt->mnt_fsname, PATH_MAX);
+ }
+
+ endmntent(fp);
+ if (type_is_ext4)
+ return 0;
+ PRINT_ERR_MSG(NGMSG_EXT4);
+ return -1;
+}
+
+/*
+ * calc_entry_counts() - Calculate file counts.
+ *
+ * @file: file name.
+ * @buf: file info.
+ * @flag: file type.
+ * @ftwbuf: the pointer of a struct FTW.
+ */
+static int calc_entry_counts(const char *file EXT2FS_ATTR((unused)),
+ const struct stat64 *buf, int flag EXT2FS_ATTR((unused)),
+ struct FTW *ftwbuf EXT2FS_ATTR((unused)))
+{
+ if (S_ISREG(buf->st_mode))
+ regular_count++;
+
+ total_count++;
+
+ return 0;
+}
+
+/*
+ * page_in_core() - Get information on whether pages are in core.
+ *
+ * @fd: defrag target file's descriptor.
+ * @defrag_data: data used for defrag.
+ * @vec: page state array.
+ * @page_num: page number.
+ */
+static int page_in_core(int fd, struct move_extent defrag_data,
+ unsigned char **vec, unsigned int *page_num)
+{
+ long pagesize;
+ void *page = NULL;
+ ext2_loff_t offset, end_offset, length;
+
+ if (vec == NULL || *vec != NULL)
+ return -1;
+
+ pagesize = sysconf(_SC_PAGESIZE);
+ if (pagesize < 0)
+ return -1;
+ /* In mmap, offset should be a multiple of the page size */
+ offset = (ext2_loff_t)defrag_data.orig_start * block_size;
+ length = (ext2_loff_t)defrag_data.len * block_size;
+ end_offset = offset + length;
+ /* Round the offset down to the nearest multiple of pagesize */
+ offset = (offset / pagesize) * pagesize;
+ length = end_offset - offset;
+
+ page = mmap(NULL, length, PROT_READ, MAP_SHARED, fd, offset);
+ if (page == MAP_FAILED)
+ return -1;
+
+ *page_num = 0;
+ *page_num = (length + pagesize - 1) / pagesize;
+ *vec = (unsigned char *)calloc(*page_num, 1);
+ if (*vec == NULL) {
+ munmap(page, length);
+ return -1;
+ }
+
+ /* Get information on whether pages are in core */
+ if (mincore(page, (size_t)length, *vec) == -1 ||
+ munmap(page, length) == -1) {
+ FREE(*vec);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ * defrag_fadvise() - Predeclare an access pattern for file data.
+ *
+ * @fd: defrag target file's descriptor.
+ * @defrag_data: data used for defrag.
+ * @vec: page state array.
+ * @page_num: page number.
+ */
+static int defrag_fadvise(int fd, struct move_extent defrag_data,
+ unsigned char *vec, unsigned int page_num)
+{
+ int flag = 1;
+ long pagesize = sysconf(_SC_PAGESIZE);
+ int fadvise_flag = POSIX_FADV_DONTNEED;
+ int sync_flag = SYNC_FILE_RANGE_WAIT_BEFORE |
+ SYNC_FILE_RANGE_WRITE |
+ SYNC_FILE_RANGE_WAIT_AFTER;
+ unsigned int i;
+ ext2_loff_t offset;
+
+ if (pagesize < 1)
+ return -1;
+
+ offset = (ext2_loff_t)defrag_data.orig_start * block_size;
+ offset = (offset / pagesize) * pagesize;
+
+#ifdef HAVE_SYNC_FILE_RANGE
+ /* Sync file for fadvise process */
+ if (sync_file_range(fd, offset,
+ (ext2_loff_t)pagesize * page_num, sync_flag) < 0)
+ return -1;
+#endif
+
+ /* Try to release buffer cache which this process used,
+ * then other process can use the released buffer
+ */
+ for (i = 0; i < page_num; i++) {
+ if ((vec[i] & 0x1) == 0) {
+ offset += pagesize;
+ continue;
+ }
+ if ((errno = posix_fadvise(fd, offset,
+ pagesize, fadvise_flag)) != 0) {
+ if ((mode_flag & DETAIL) && flag) {
+ perror("\tFailed to fadvise");
+ flag = 0;
+ }
+ }
+ offset += pagesize;
+ }
+
+ return 0;
+}
+
+/*
+ * check_free_size() - Check if there's enough disk space.
+ *
+ * @fd: defrag target file's descriptor.
+ * @file: file name.
+ * @blk_count: file blocks.
+ */
+static int check_free_size(int fd, const char *file, ext4_fsblk_t blk_count)
+{
+ ext4_fsblk_t free_blk_count;
+ struct statfs64 fsbuf;
+
+ if (fstatfs64(fd, &fsbuf) < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(
+ "Failed to get filesystem information");
+ }
+ return -1;
+ }
+
+ /* Compute free space for root and normal user separately */
+ if (current_uid == ROOT_UID)
+ free_blk_count = fsbuf.f_bfree;
+ else
+ free_blk_count = fsbuf.f_bavail;
+
+ if (free_blk_count >= blk_count)
+ return 0;
+
+ return -ENOSPC;
+}
+
+/*
+ * file_frag_count() - Get file fragment count.
+ *
+ * @fd: defrag target file's descriptor.
+ */
+static int file_frag_count(int fd)
+{
+ int ret;
+ struct fiemap fiemap_buf;
+
+ /* When fm_extent_count is 0,
+ * ioctl just get file fragment count.
+ */
+ memset(&fiemap_buf, 0, sizeof(struct fiemap));
+ fiemap_buf.fm_start = 0;
+ fiemap_buf.fm_length = FIEMAP_MAX_OFFSET;
+ fiemap_buf.fm_flags |= FIEMAP_FLAG_SYNC;
+
+ ret = ioctl(fd, FS_IOC_FIEMAP, &fiemap_buf);
+ if (ret < 0)
+ return ret;
+
+ return fiemap_buf.fm_mapped_extents;
+}
+
+/*
+ * file_check() - Check file's attributes.
+ *
+ * @fd: defrag target file's descriptor.
+ * @buf: a pointer of the struct stat64.
+ * @file: file name.
+ * @extents: file extents.
+ * @blk_count: file blocks.
+ */
+static int file_check(int fd, const struct stat64 *buf, const char *file,
+ int extents, ext4_fsblk_t blk_count)
+{
+ int ret;
+ struct flock lock;
+
+ /* Write-lock check is more reliable */
+ lock.l_type = F_WRLCK;
+ lock.l_start = 0;
+ lock.l_whence = SEEK_SET;
+ lock.l_len = 0;
+
+ /* Free space */
+ ret = check_free_size(fd, file, blk_count);
+ if (ret < 0) {
+ if ((mode_flag & DETAIL) && ret == -ENOSPC) {
+ printf("\033[79;0H\033[K[%u/%u] \"%s\"\t\t"
+ " extents: %d -> %d\n", defraged_file_count,
+ total_count, file, extents, extents);
+ IN_FTW_PRINT_ERR_MSG(
+ "Defrag size is larger than filesystem's free space");
+ }
+ return -1;
+ }
+
+ /* Access authority */
+ if (current_uid != ROOT_UID &&
+ buf->st_uid != current_uid) {
+ if (mode_flag & DETAIL) {
+ printf("\033[79;0H\033[K[%u/%u] \"%s\"\t\t"
+ " extents: %d -> %d\n", defraged_file_count,
+ total_count, file, extents, extents);
+ IN_FTW_PRINT_ERR_MSG(
+ "File is not current user's file"
+ " or current user is not root");
+ }
+ return -1;
+ }
+
+ /* Lock status */
+ if (fcntl(fd, F_GETLK, &lock) < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(
+ "Failed to get lock information");
+ }
+ return -1;
+ } else if (lock.l_type != F_UNLCK) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ IN_FTW_PRINT_ERR_MSG("File has been locked");
+ }
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ * insert_extent_by_logical() - Sequentially insert extent by logical.
+ *
+ * @ext_list_head: the head of logical extent list.
+ * @ext: the extent element which will be inserted.
+ */
+static int insert_extent_by_logical(struct fiemap_extent_list **ext_list_head,
+ struct fiemap_extent_list *ext)
+{
+ struct fiemap_extent_list *ext_list_tmp = *ext_list_head;
+
+ if (ext == NULL)
+ goto out;
+
+ /* First element */
+ if (*ext_list_head == NULL) {
+ (*ext_list_head) = ext;
+ (*ext_list_head)->prev = *ext_list_head;
+ (*ext_list_head)->next = *ext_list_head;
+ return 0;
+ }
+
+ if (ext->data.logical <= ext_list_tmp->data.logical) {
+ /* Insert before head */
+ if (ext_list_tmp->data.logical <
+ ext->data.logical + ext->data.len)
+ /* Overlap */
+ goto out;
+ /* Adjust head */
+ *ext_list_head = ext;
+ } else {
+ /* Insert into the middle or last of the list */
+ do {
+ if (ext->data.logical < ext_list_tmp->data.logical)
+ break;
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != (*ext_list_head));
+ if (ext->data.logical <
+ ext_list_tmp->prev->data.logical +
+ ext_list_tmp->prev->data.len)
+ /* Overlap */
+ goto out;
+
+ if (ext_list_tmp != *ext_list_head &&
+ ext_list_tmp->data.logical <
+ ext->data.logical + ext->data.len)
+ /* Overlap */
+ goto out;
+ }
+ ext_list_tmp = ext_list_tmp->prev;
+ /* Insert "ext" after "ext_list_tmp" */
+ insert(ext_list_tmp, ext);
+ return 0;
+out:
+ errno = EINVAL;
+ return -1;
+}
+
+/*
+ * insert_extent_by_physical() - Sequentially insert extent by physical.
+ *
+ * @ext_list_head: the head of physical extent list.
+ * @ext: the extent element which will be inserted.
+ */
+static int insert_extent_by_physical(struct fiemap_extent_list **ext_list_head,
+ struct fiemap_extent_list *ext)
+{
+ struct fiemap_extent_list *ext_list_tmp = *ext_list_head;
+
+ if (ext == NULL)
+ goto out;
+
+ /* First element */
+ if (*ext_list_head == NULL) {
+ (*ext_list_head) = ext;
+ (*ext_list_head)->prev = *ext_list_head;
+ (*ext_list_head)->next = *ext_list_head;
+ return 0;
+ }
+
+ if (ext->data.physical <= ext_list_tmp->data.physical) {
+ /* Insert before head */
+ if (ext_list_tmp->data.physical <
+ ext->data.physical + ext->data.len)
+ /* Overlap */
+ goto out;
+ /* Adjust head */
+ *ext_list_head = ext;
+ } else {
+ /* Insert into the middle or last of the list */
+ do {
+ if (ext->data.physical < ext_list_tmp->data.physical)
+ break;
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != (*ext_list_head));
+ if (ext->data.physical <
+ ext_list_tmp->prev->data.physical +
+ ext_list_tmp->prev->data.len)
+ /* Overlap */
+ goto out;
+
+ if (ext_list_tmp != *ext_list_head &&
+ ext_list_tmp->data.physical <
+ ext->data.physical + ext->data.len)
+ /* Overlap */
+ goto out;
+ }
+ ext_list_tmp = ext_list_tmp->prev;
+ /* Insert "ext" after "ext_list_tmp" */
+ insert(ext_list_tmp, ext);
+ return 0;
+out:
+ errno = EINVAL;
+ return -1;
+}
+
+/*
+ * insert_exts_group() - Insert a exts_group.
+ *
+ * @ext_group_head: the head of a exts_group list.
+ * @exts_group: the exts_group element which will be inserted.
+ */
+static int insert_exts_group(struct fiemap_extent_group **ext_group_head,
+ struct fiemap_extent_group *exts_group)
+{
+ struct fiemap_extent_group *ext_group_tmp = NULL;
+
+ if (exts_group == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* Initialize list */
+ if (*ext_group_head == NULL) {
+ (*ext_group_head) = exts_group;
+ (*ext_group_head)->prev = *ext_group_head;
+ (*ext_group_head)->next = *ext_group_head;
+ return 0;
+ }
+
+ ext_group_tmp = (*ext_group_head)->prev;
+ insert(ext_group_tmp, exts_group);
+
+ return 0;
+}
+
+/*
+ * join_extents() - Find continuous region(exts_group).
+ *
+ * @ext_list_head: the head of the extent list.
+ * @ext_group_head: the head of the target exts_group list.
+ */
+static int join_extents(struct fiemap_extent_list *ext_list_head,
+ struct fiemap_extent_group **ext_group_head)
+{
+ __u64 len = ext_list_head->data.len;
+ struct fiemap_extent_list *ext_list_start = ext_list_head;
+ struct fiemap_extent_list *ext_list_tmp = ext_list_head->next;
+
+ do {
+ struct fiemap_extent_group *ext_group_tmp = NULL;
+
+ /* This extent and previous extent are not continuous,
+ * so, all previous extents are treated as an extent group.
+ */
+ if ((ext_list_tmp->prev->data.logical +
+ ext_list_tmp->prev->data.len)
+ != ext_list_tmp->data.logical) {
+ ext_group_tmp =
+ malloc(sizeof(struct fiemap_extent_group));
+ if (ext_group_tmp == NULL)
+ return -1;
+
+ memset(ext_group_tmp, 0,
+ sizeof(struct fiemap_extent_group));
+ ext_group_tmp->len = len;
+ ext_group_tmp->start = ext_list_start;
+ ext_group_tmp->end = ext_list_tmp->prev;
+
+ if (insert_exts_group(ext_group_head,
+ ext_group_tmp) < 0) {
+ FREE(ext_group_tmp);
+ return -1;
+ }
+ ext_list_start = ext_list_tmp;
+ len = ext_list_tmp->data.len;
+ ext_list_tmp = ext_list_tmp->next;
+ continue;
+ }
+
+ /* This extent and previous extent are continuous,
+ * so, they belong to the same extent group, and we check
+ * if the next extent belongs to the same extent group.
+ */
+ len += ext_list_tmp->data.len;
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != ext_list_head->next);
+
+ return 0;
+}
+
+/*
+ * get_file_extents() - Get file's extent list.
+ *
+ * @fd: defrag target file's descriptor.
+ * @ext_list_head: the head of the extent list.
+ */
+static int get_file_extents(int fd, struct fiemap_extent_list **ext_list_head)
+{
+ __u32 i;
+ int ret;
+ int ext_buf_size, fie_buf_size;
+ __u64 pos = 0;
+ struct fiemap *fiemap_buf = NULL;
+ struct fiemap_extent *ext_buf = NULL;
+ struct fiemap_extent_list *ext_list = NULL;
+
+ /* Convert units, in bytes.
+ * Be careful : now, physical block number in extent is 48bit,
+ * and the maximum blocksize for ext4 is 4K(12bit),
+ * so there is no overflow, but in future it may be changed.
+ */
+
+ /* Alloc space for fiemap */
+ ext_buf_size = EXTENT_MAX_COUNT * sizeof(struct fiemap_extent);
+ fie_buf_size = sizeof(struct fiemap) + ext_buf_size;
+
+ fiemap_buf = malloc(fie_buf_size);
+ if (fiemap_buf == NULL)
+ return -1;
+
+ ext_buf = fiemap_buf->fm_extents;
+ memset(fiemap_buf, 0, fie_buf_size);
+ fiemap_buf->fm_length = FIEMAP_MAX_OFFSET;
+ fiemap_buf->fm_flags |= FIEMAP_FLAG_SYNC;
+ fiemap_buf->fm_extent_count = EXTENT_MAX_COUNT;
+
+ do {
+ fiemap_buf->fm_start = pos;
+ memset(ext_buf, 0, ext_buf_size);
+ ret = ioctl(fd, FS_IOC_FIEMAP, fiemap_buf);
+ if (ret < 0 || fiemap_buf->fm_mapped_extents == 0)
+ goto out;
+ for (i = 0; i < fiemap_buf->fm_mapped_extents; i++) {
+ ext_list = NULL;
+ ext_list = malloc(sizeof(struct fiemap_extent_list));
+ if (ext_list == NULL)
+ goto out;
+
+ ext_list->data.physical = ext_buf[i].fe_physical
+ / block_size;
+ ext_list->data.logical = ext_buf[i].fe_logical
+ / block_size;
+ ext_list->data.len = ext_buf[i].fe_length
+ / block_size;
+
+ ret = insert_extent_by_physical(
+ ext_list_head, ext_list);
+ if (ret < 0) {
+ FREE(ext_list);
+ goto out;
+ }
+ }
+ /* Record file's logical offset this time */
+ pos = ext_buf[EXTENT_MAX_COUNT-1].fe_logical +
+ ext_buf[EXTENT_MAX_COUNT-1].fe_length;
+ /*
+ * If fm_extents array has been filled and
+ * there are extents left, continue to cycle.
+ */
+ } while (fiemap_buf->fm_mapped_extents
+ == EXTENT_MAX_COUNT &&
+ !(ext_buf[EXTENT_MAX_COUNT-1].fe_flags
+ & FIEMAP_EXTENT_LAST));
+
+ FREE(fiemap_buf);
+ return 0;
+out:
+ FREE(fiemap_buf);
+ return -1;
+}
+
+/*
+ * get_logical_count() - Get the file logical extents count.
+ *
+ * @logical_list_head: the head of the logical extent list.
+ */
+static int get_logical_count(struct fiemap_extent_list *logical_list_head)
+{
+ int ret = 0;
+ struct fiemap_extent_list *ext_list_tmp = logical_list_head;
+
+ do {
+ ret++;
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != logical_list_head);
+
+ return ret;
+}
+
+/*
+ * get_physical_count() - Get the file physical extents count.
+ *
+ * @physical_list_head: the head of the physical extent list.
+ */
+static int get_physical_count(struct fiemap_extent_list *physical_list_head)
+{
+ int ret = 0;
+ struct fiemap_extent_list *ext_list_tmp = physical_list_head;
+
+ do {
+ if ((ext_list_tmp->data.physical + ext_list_tmp->data.len)
+ != ext_list_tmp->next->data.physical ||
+ (ext_list_tmp->data.logical + ext_list_tmp->data.len)
+ != ext_list_tmp->next->data.logical) {
+ /* This extent and next extent are not continuous. */
+ ret++;
+ }
+
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != physical_list_head);
+
+ return ret;
+}
+
+/*
+ * change_physical_to_logical() - Change list from physical to logical.
+ *
+ * @physical_list_head: the head of physical extent list.
+ * @logical_list_head: the head of logical extent list.
+ */
+static int change_physical_to_logical(
+ struct fiemap_extent_list **physical_list_head,
+ struct fiemap_extent_list **logical_list_head)
+{
+ int ret;
+ struct fiemap_extent_list *ext_list_tmp = *physical_list_head;
+ struct fiemap_extent_list *ext_list_next = ext_list_tmp->next;
+
+ while (1) {
+ if (ext_list_tmp == ext_list_next) {
+ ret = insert_extent_by_logical(
+ logical_list_head, ext_list_tmp);
+ if (ret < 0)
+ return -1;
+
+ *physical_list_head = NULL;
+ break;
+ }
+
+ ext_list_tmp->prev->next = ext_list_tmp->next;
+ ext_list_tmp->next->prev = ext_list_tmp->prev;
+ *physical_list_head = ext_list_next;
+
+ ret = insert_extent_by_logical(
+ logical_list_head, ext_list_tmp);
+ if (ret < 0) {
+ FREE(ext_list_tmp);
+ return -1;
+ }
+ ext_list_tmp = ext_list_next;
+ ext_list_next = ext_list_next->next;
+ }
+
+ return 0;
+}
+
+/* get_file_blocks() - Get total file blocks.
+ *
+ * @ext_list_head: the extent list head of the target file
+ */
+static ext4_fsblk_t get_file_blocks(struct fiemap_extent_list *ext_list_head)
+{
+ ext4_fsblk_t blk_count = 0;
+ struct fiemap_extent_list *ext_list_tmp = ext_list_head;
+
+ do {
+ blk_count += ext_list_tmp->data.len;
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != ext_list_head);
+
+ return blk_count;
+}
+
+/*
+ * free_ext() - Free the extent list.
+ *
+ * @ext_list_head: the extent list head of which will be free.
+ */
+static void free_ext(struct fiemap_extent_list *ext_list_head)
+{
+ struct fiemap_extent_list *ext_list_tmp = NULL;
+
+ if (ext_list_head == NULL)
+ return;
+
+ while (ext_list_head->next != ext_list_head) {
+ ext_list_tmp = ext_list_head;
+ ext_list_head->prev->next = ext_list_head->next;
+ ext_list_head->next->prev = ext_list_head->prev;
+ ext_list_head = ext_list_head->next;
+ free(ext_list_tmp);
+ }
+ free(ext_list_head);
+}
+
+/*
+ * free_exts_group() - Free the exts_group.
+ *
+ * @*ext_group_head: the exts_group list head which will be free.
+ */
+static void free_exts_group(struct fiemap_extent_group *ext_group_head)
+{
+ struct fiemap_extent_group *ext_group_tmp = NULL;
+
+ if (ext_group_head == NULL)
+ return;
+
+ while (ext_group_head->next != ext_group_head) {
+ ext_group_tmp = ext_group_head;
+ ext_group_head->prev->next = ext_group_head->next;
+ ext_group_head->next->prev = ext_group_head->prev;
+ ext_group_head = ext_group_head->next;
+ free(ext_group_tmp);
+ }
+ free(ext_group_head);
+}
+
+/*
+ * get_best_count() - Get the file best extents count.
+ *
+ * @block_count: the file's physical block count.
+ */
+static int get_best_count(ext4_fsblk_t block_count)
+{
+ int ret;
+ unsigned int flex_bg_num;
+
+ if (blocks_per_group == 0)
+ return 1;
+
+ if (feature_incompat & EXT4_FEATURE_INCOMPAT_FLEX_BG) {
+ flex_bg_num = 1U << log_groups_per_flex;
+ ret = ((block_count - 1) /
+ ((ext4_fsblk_t)blocks_per_group *
+ flex_bg_num)) + 1;
+ } else
+ ret = ((block_count - 1) / blocks_per_group) + 1;
+
+ return ret;
+}
+
+
+/*
+ * file_statistic() - Get statistic info of the file's fragments.
+ *
+ * @file: the file's name.
+ * @buf: the pointer of the struct stat64.
+ * @flag: file type.
+ * @ftwbuf: the pointer of a struct FTW.
+ */
+static int file_statistic(const char *file, const struct stat64 *buf,
+ int flag EXT2FS_ATTR((unused)),
+ struct FTW *ftwbuf EXT2FS_ATTR((unused)))
+{
+ int fd;
+ int ret;
+ int now_ext_count, best_ext_count = 0, physical_ext_count;
+ int i, j;
+ __u64 size_per_ext = 0;
+ float ratio = 0.0;
+ ext4_fsblk_t blk_count = 0;
+ char msg_buffer[PATH_MAX + 48];
+ struct fiemap_extent_list *physical_list_head = NULL;
+ struct fiemap_extent_list *logical_list_head = NULL;
+
+ defraged_file_count++;
+ if (defraged_file_count > total_count)
+ total_count = defraged_file_count;
+
+ if (mode_flag & DETAIL) {
+ if (total_count == 1 && regular_count == 1)
+ printf("<File>\n");
+ else {
+ printf("[%u/%u]", defraged_file_count, total_count);
+ fflush(stdout);
+ }
+ }
+ if (lost_found_dir[0] != '\0' &&
+ !memcmp(file, lost_found_dir, strnlen(lost_found_dir, PATH_MAX))) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG(NGMSG_LOST_FOUND);
+ }
+ return 0;
+ }
+
+ if (!S_ISREG(buf->st_mode)) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG(NGMSG_FILE_UNREG);
+ }
+ return 0;
+ }
+
+ /* Access authority */
+ if (current_uid != ROOT_UID &&
+ buf->st_uid != current_uid) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG(
+ "File is not current user's file"
+ " or current user is not root");
+ }
+ return 0;
+ }
+
+ /* Empty file */
+ if (buf->st_size == 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG("File size is 0");
+ }
+ return 0;
+ }
+
+ /* Has no blocks */
+ if (buf->st_blocks == 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG("File has no blocks");
+ }
+ return 0;
+ }
+
+ fd = open64(file, O_RDONLY);
+ if (fd < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG_WITH_ERRNO(NGMSG_FILE_OPEN);
+ }
+ return 0;
+ }
+
+ /* Get file's physical extents */
+ ret = get_file_extents(fd, &physical_list_head);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG_WITH_ERRNO(NGMSG_FILE_EXTENT);
+ }
+ goto out;
+ }
+
+ /* Get the count of file's continuous physical region */
+ physical_ext_count = get_physical_count(physical_list_head);
+
+ /* Change list from physical to logical */
+ ret = change_physical_to_logical(&physical_list_head,
+ &logical_list_head);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG_WITH_ERRNO(NGMSG_FILE_EXTENT);
+ }
+ goto out;
+ }
+
+ /* Count file fragments before defrag */
+ now_ext_count = get_logical_count(logical_list_head);
+
+ if (current_uid == ROOT_UID) {
+ /* Calculate the size per extent */
+ blk_count = get_file_blocks(logical_list_head);
+
+ best_ext_count = get_best_count(blk_count);
+
+ /* e4defrag rounds size_per_ext up to a block size boundary */
+ size_per_ext = blk_count * (buf->st_blksize / 1024) /
+ now_ext_count;
+
+ ratio = (float)(physical_ext_count - best_ext_count) * 100 /
+ blk_count;
+
+ extents_before_defrag += now_ext_count;
+ extents_after_defrag += best_ext_count;
+ files_block_count += blk_count;
+ }
+
+ if (total_count == 1 && regular_count == 1) {
+ /* File only */
+ if (mode_flag & DETAIL) {
+ int count = 0;
+ struct fiemap_extent_list *ext_list_tmp =
+ logical_list_head;
+
+ /* Print extents info */
+ do {
+ count++;
+ printf("[ext %d]:\tstart %llu:\tlogical "
+ "%llu:\tlen %llu\n", count,
+ (unsigned long long)
+ ext_list_tmp->data.physical,
+ (unsigned long long)
+ ext_list_tmp->data.logical,
+ (unsigned long long)
+ ext_list_tmp->data.len);
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != logical_list_head);
+
+ } else {
+ printf("%-40s%10s/%-10s%9s\n",
+ "<File>", "now", "best", "size/ext");
+ if (current_uid == ROOT_UID) {
+ if (strlen(file) > 40)
+ printf("%s\n%50d/%-10d%6llu KB\n",
+ file, now_ext_count,
+ best_ext_count,
+ (unsigned long long) size_per_ext);
+ else
+ printf("%-40s%10d/%-10d%6llu KB\n",
+ file, now_ext_count,
+ best_ext_count,
+ (unsigned long long) size_per_ext);
+ } else {
+ if (strlen(file) > 40)
+ printf("%s\n%50d/%-10s%7s\n",
+ file, now_ext_count,
+ "-", "-");
+ else
+ printf("%-40s%10d/%-10s%7s\n",
+ file, now_ext_count,
+ "-", "-");
+ }
+ }
+ succeed_cnt++;
+ goto out;
+ }
+
+ if (mode_flag & DETAIL) {
+ /* Print statistic info */
+ sprintf(msg_buffer, "[%u/%u]%.*s",
+ defraged_file_count, total_count,
+ PATH_MAX, file);
+ if (current_uid == ROOT_UID) {
+ if (strlen(msg_buffer) > 40)
+ printf("\033[79;0H\033[K%s\n"
+ "%50d/%-10d%6llu KB\n",
+ msg_buffer, now_ext_count,
+ best_ext_count,
+ (unsigned long long) size_per_ext);
+ else
+ printf("\033[79;0H\033[K%-40s"
+ "%10d/%-10d%6llu KB\n",
+ msg_buffer, now_ext_count,
+ best_ext_count,
+ (unsigned long long) size_per_ext);
+ } else {
+ if (strlen(msg_buffer) > 40)
+ printf("\033[79;0H\033[K%s\n%50d/%-10s%7s\n",
+ msg_buffer, now_ext_count,
+ "-", "-");
+ else
+ printf("\033[79;0H\033[K%-40s%10d/%-10s%7s\n",
+ msg_buffer, now_ext_count,
+ "-", "-");
+ }
+ }
+
+ for (i = 0; i < SHOW_FRAG_FILES; i++) {
+ if (ratio >= frag_rank[i].ratio) {
+ for (j = SHOW_FRAG_FILES - 1; j > i; j--) {
+ memset(&frag_rank[j], 0,
+ sizeof(struct frag_statistic_ino));
+ strncpy(frag_rank[j].msg_buffer,
+ frag_rank[j - 1].msg_buffer,
+ strnlen(frag_rank[j - 1].msg_buffer,
+ PATH_MAX));
+ frag_rank[j].now_count =
+ frag_rank[j - 1].now_count;
+ frag_rank[j].best_count =
+ frag_rank[j - 1].best_count;
+ frag_rank[j].size_per_ext =
+ frag_rank[j - 1].size_per_ext;
+ frag_rank[j].ratio =
+ frag_rank[j - 1].ratio;
+ }
+ memset(&frag_rank[i], 0,
+ sizeof(struct frag_statistic_ino));
+ strncpy(frag_rank[i].msg_buffer, file,
+ strnlen(file, PATH_MAX));
+ frag_rank[i].now_count = now_ext_count;
+ frag_rank[i].best_count = best_ext_count;
+ frag_rank[i].size_per_ext = size_per_ext;
+ frag_rank[i].ratio = ratio;
+ break;
+ }
+ }
+
+ succeed_cnt++;
+
+out:
+ close(fd);
+ free_ext(physical_list_head);
+ free_ext(logical_list_head);
+ return 0;
+}
+
+/*
+ * print_progress - Print defrag progress
+ *
+ * @file: file name.
+ * @start: logical offset for defrag target file
+ * @file_size: defrag target filesize
+ */
+static void print_progress(const char *file, ext2_loff_t start,
+ ext2_loff_t file_size)
+{
+ int percent = (start * 100) / file_size;
+ printf("\033[79;0H\033[K[%u/%u]%s:\t%3d%%",
+ defraged_file_count, total_count, file, min(percent, 100));
+ fflush(stdout);
+
+ return;
+}
+
+/*
+ * call_defrag() - Execute the defrag program.
+ *
+ * @fd: target file descriptor.
+ * @donor_fd: donor file descriptor.
+ * @file: target file name.
+ * @buf: pointer of the struct stat64.
+ * @ext_list_head: head of the extent list.
+ */
+static int call_defrag(int fd, int donor_fd, const char *file,
+ const struct stat64 *buf, struct fiemap_extent_list *ext_list_head)
+{
+ ext2_loff_t start = 0;
+ unsigned int page_num;
+ unsigned char *vec = NULL;
+ int defraged_ret = 0;
+ int ret;
+ struct move_extent move_data;
+ struct fiemap_extent_list *ext_list_tmp = NULL;
+
+ memset(&move_data, 0, sizeof(struct move_extent));
+ move_data.donor_fd = donor_fd;
+
+ /* Print defrag progress */
+ print_progress(file, start, buf->st_size);
+
+ ext_list_tmp = ext_list_head;
+ do {
+ move_data.orig_start = ext_list_tmp->data.logical;
+ /* Logical offset of orig and donor should be same */
+ move_data.donor_start = move_data.orig_start;
+ move_data.len = ext_list_tmp->data.len;
+ move_data.moved_len = 0;
+
+ ret = page_in_core(fd, move_data, &vec, &page_num);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ printf("\n");
+ PRINT_ERR_MSG_WITH_ERRNO(
+ "Failed to get file map");
+ } else {
+ printf("\t[ NG ]\n");
+ }
+ return -1;
+ }
+
+ /* EXT4_IOC_MOVE_EXT */
+ defraged_ret =
+ ioctl(fd, EXT4_IOC_MOVE_EXT, &move_data);
+
+ /* Free pages */
+ ret = defrag_fadvise(fd, move_data, vec, page_num);
+ if (vec) {
+ free(vec);
+ vec = NULL;
+ }
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ printf("\n");
+ PRINT_ERR_MSG_WITH_ERRNO(
+ "Failed to free page");
+ } else {
+ printf("\t[ NG ]\n");
+ }
+ return -1;
+ }
+
+ if (defraged_ret < 0) {
+ if (mode_flag & DETAIL) {
+ printf("\n");
+ PRINT_ERR_MSG_WITH_ERRNO(
+ "Failed to defrag with "
+ "EXT4_IOC_MOVE_EXT ioctl");
+ if (errno == ENOTTY)
+ printf("\tAt least 2.6.31-rc1 of "
+ "vanilla kernel is required\n");
+ } else {
+ printf("\t[ NG ]\n");
+ }
+ return -1;
+ }
+ /* Adjust logical offset for next ioctl */
+ move_data.orig_start += move_data.moved_len;
+ move_data.donor_start = move_data.orig_start;
+
+ start = move_data.orig_start * buf->st_blksize;
+
+ /* Print defrag progress */
+ print_progress(file, start, buf->st_size);
+
+ /* End of file */
+ if (start >= buf->st_size)
+ break;
+
+ ext_list_tmp = ext_list_tmp->next;
+ } while (ext_list_tmp != ext_list_head);
+
+ return 0;
+}
+
+/*
+ * file_defrag() - Check file attributes and call ioctl to defrag.
+ *
+ * @file: the file's name.
+ * @buf: the pointer of the struct stat64.
+ * @flag: file type.
+ * @ftwbuf: the pointer of a struct FTW.
+ */
+static int file_defrag(const char *file, const struct stat64 *buf,
+ int flag EXT2FS_ATTR((unused)),
+ struct FTW *ftwbuf EXT2FS_ATTR((unused)))
+{
+ int fd;
+ int donor_fd = -1;
+ int ret;
+ int best;
+ int file_frags_start, file_frags_end;
+ int orig_physical_cnt, donor_physical_cnt = 0;
+ char tmp_inode_name[PATH_MAX + 8];
+ ext4_fsblk_t blk_count = 0;
+ struct fiemap_extent_list *orig_list_physical = NULL;
+ struct fiemap_extent_list *orig_list_logical = NULL;
+ struct fiemap_extent_list *donor_list_physical = NULL;
+ struct fiemap_extent_list *donor_list_logical = NULL;
+ struct fiemap_extent_group *orig_group_head = NULL;
+ struct fiemap_extent_group *orig_group_tmp = NULL;
+
+ defraged_file_count++;
+ if (defraged_file_count > total_count)
+ total_count = defraged_file_count;
+
+ if (mode_flag & DETAIL) {
+ printf("[%u/%u]", defraged_file_count, total_count);
+ fflush(stdout);
+ }
+
+ if (lost_found_dir[0] != '\0' &&
+ !memcmp(file, lost_found_dir, strnlen(lost_found_dir, PATH_MAX))) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ IN_FTW_PRINT_ERR_MSG(NGMSG_LOST_FOUND);
+ }
+ return 0;
+ }
+
+ if (!S_ISREG(buf->st_mode)) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ IN_FTW_PRINT_ERR_MSG(NGMSG_FILE_UNREG);
+ }
+ return 0;
+ }
+
+ /* Empty file */
+ if (buf->st_size == 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ IN_FTW_PRINT_ERR_MSG("File size is 0");
+ }
+ return 0;
+ }
+
+ /* Has no blocks */
+ if (buf->st_blocks == 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ STATISTIC_ERR_MSG("File has no blocks");
+ }
+ return 0;
+ }
+
+ fd = open64(file, O_RDWR);
+ if (fd < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_OPEN);
+ }
+ return 0;
+ }
+
+ /* Get file's extents */
+ ret = get_file_extents(fd, &orig_list_physical);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_EXTENT);
+ }
+ goto out;
+ }
+
+ /* Get the count of file's continuous physical region */
+ orig_physical_cnt = get_physical_count(orig_list_physical);
+
+ /* Change list from physical to logical */
+ ret = change_physical_to_logical(&orig_list_physical,
+ &orig_list_logical);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_EXTENT);
+ }
+ goto out;
+ }
+
+ /* Count file fragments before defrag */
+ file_frags_start = get_logical_count(orig_list_logical);
+
+ blk_count = get_file_blocks(orig_list_logical);
+ if (file_check(fd, buf, file, file_frags_start, blk_count) < 0)
+ goto out;
+
+ if (fsync(fd) < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO("Failed to sync(fsync)");
+ }
+ goto out;
+ }
+
+ best = get_best_count(blk_count);
+
+ if (file_frags_start <= best)
+ goto check_improvement;
+
+ /* Combine extents to group */
+ ret = join_extents(orig_list_logical, &orig_group_head);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_EXTENT);
+ }
+ goto out;
+ }
+
+ /* Create donor inode */
+ memset(tmp_inode_name, 0, PATH_MAX + 8);
+ sprintf(tmp_inode_name, "%.*s.defrag",
+ (int)strnlen(file, PATH_MAX), file);
+ donor_fd = open64(tmp_inode_name, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR);
+ if (donor_fd < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ if (errno == EEXIST)
+ PRINT_ERR_MSG_WITH_ERRNO(
+ "File is being defraged by other program");
+ else
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_OPEN);
+ }
+ goto out;
+ }
+
+ /* Unlink donor inode */
+ ret = unlink(tmp_inode_name);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO("Failed to unlink");
+ }
+ goto out;
+ }
+
+ /* Allocate space for donor inode */
+ orig_group_tmp = orig_group_head;
+ do {
+ ret = fallocate(donor_fd, 0,
+ (ext2_loff_t)orig_group_tmp->start->data.logical * block_size,
+ (ext2_loff_t)orig_group_tmp->len * block_size);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO("Failed to fallocate");
+ }
+ goto out;
+ }
+
+ orig_group_tmp = orig_group_tmp->next;
+ } while (orig_group_tmp != orig_group_head);
+
+ /* Get donor inode's extents */
+ ret = get_file_extents(donor_fd, &donor_list_physical);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_EXTENT);
+ }
+ goto out;
+ }
+
+ /* Calculate donor inode's continuous physical region */
+ donor_physical_cnt = get_physical_count(donor_list_physical);
+
+ /* Change donor extent list from physical to logical */
+ ret = change_physical_to_logical(&donor_list_physical,
+ &donor_list_logical);
+ if (ret < 0) {
+ if (mode_flag & DETAIL) {
+ PRINT_FILE_NAME(file);
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_EXTENT);
+ }
+ goto out;
+ }
+
+check_improvement:
+ if (mode_flag & DETAIL) {
+ if (file_frags_start != 1)
+ frag_files_before_defrag++;
+
+ extents_before_defrag += file_frags_start;
+ }
+
+ if (file_frags_start <= best ||
+ orig_physical_cnt <= donor_physical_cnt) {
+ printf("\033[79;0H\033[K[%u/%u]%s:\t%3d%%",
+ defraged_file_count, total_count, file, 100);
+ if (mode_flag & DETAIL)
+ printf(" extents: %d -> %d",
+ file_frags_start, file_frags_start);
+
+ printf("\t[ OK ]\n");
+ succeed_cnt++;
+
+ if (file_frags_start != 1)
+ frag_files_after_defrag++;
+
+ extents_after_defrag += file_frags_start;
+ goto out;
+ }
+
+ /* Defrag the file */
+ ret = call_defrag(fd, donor_fd, file, buf, donor_list_logical);
+
+ /* Count file fragments after defrag and print extents info */
+ if (mode_flag & DETAIL) {
+ file_frags_end = file_frag_count(fd);
+ if (file_frags_end < 0) {
+ printf("\n");
+ PRINT_ERR_MSG_WITH_ERRNO(NGMSG_FILE_INFO);
+ goto out;
+ }
+
+ if (file_frags_end != 1)
+ frag_files_after_defrag++;
+
+ extents_after_defrag += file_frags_end;
+
+ if (ret < 0)
+ goto out;
+
+ printf(" extents: %d -> %d",
+ file_frags_start, file_frags_end);
+ fflush(stdout);
+ }
+
+ if (ret < 0)
+ goto out;
+
+ printf("\t[ OK ]\n");
+ fflush(stdout);
+ succeed_cnt++;
+
+out:
+ close(fd);
+ if (donor_fd != -1)
+ close(donor_fd);
+ free_ext(orig_list_physical);
+ free_ext(orig_list_logical);
+ free_ext(donor_list_physical);
+ free_exts_group(orig_group_head);
+ return 0;
+}
+
+/*
+ * main() - Ext4 online defrag.
+ *
+ * @argc: the number of parameter.
+ * @argv[]: the pointer array of parameter.
+ */
+int main(int argc, char *argv[])
+{
+ int opt;
+ int i, j, ret = 0;
+ int flags = FTW_PHYS | FTW_MOUNT;
+ int arg_type = -1;
+ int mount_dir_len = 0;
+ int success_flag = 0;
+ char dir_name[PATH_MAX + 1];
+ char dev_name[PATH_MAX + 1];
+ struct stat64 buf;
+ ext2_filsys fs = NULL;
+
+ printf("e4defrag %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+
+ /* Parse arguments */
+ if (argc == 1)
+ goto out;
+
+ while ((opt = getopt(argc, argv, "vc")) != EOF) {
+ switch (opt) {
+ case 'v':
+ mode_flag |= DETAIL;
+ break;
+ case 'c':
+ mode_flag |= STATISTIC;
+ break;
+ default:
+ goto out;
+ }
+ }
+
+ if (argc == optind)
+ goto out;
+
+ current_uid = getuid();
+
+ /* Main process */
+ for (i = optind; i < argc; i++) {
+ succeed_cnt = 0;
+ regular_count = 0;
+ total_count = 0;
+ frag_files_before_defrag = 0;
+ frag_files_after_defrag = 0;
+ extents_before_defrag = 0;
+ extents_after_defrag = 0;
+ defraged_file_count = 0;
+ files_block_count = 0;
+ blocks_per_group = 0;
+ feature_incompat = 0;
+ log_groups_per_flex = 0;
+
+ memset(dir_name, 0, PATH_MAX + 1);
+ memset(dev_name, 0, PATH_MAX + 1);
+ memset(lost_found_dir, 0, PATH_MAX + 1);
+ memset(frag_rank, 0,
+ sizeof(struct frag_statistic_ino) * SHOW_FRAG_FILES);
+
+ if ((mode_flag & STATISTIC) && i > optind)
+ printf("\n");
+
+#if BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN
+ PRINT_ERR_MSG("Endian's type is not big/little endian");
+ PRINT_FILE_NAME(argv[i]);
+ continue;
+#endif
+
+ if (lstat64(argv[i], &buf) < 0) {
+ perror(NGMSG_FILE_INFO);
+ PRINT_FILE_NAME(argv[i]);
+ continue;
+ }
+
+ /* Handle i.e. lvm device symlinks */
+ if (S_ISLNK(buf.st_mode)) {
+ struct stat64 buf2;
+
+ if (stat64(argv[i], &buf2) == 0 &&
+ S_ISBLK(buf2.st_mode))
+ buf = buf2;
+ }
+
+ if (S_ISBLK(buf.st_mode)) {
+ /* Block device */
+ strncpy(dev_name, argv[i], strnlen(argv[i], PATH_MAX));
+ if (get_mount_point(argv[i], dir_name, PATH_MAX) < 0)
+ continue;
+ if (lstat64(dir_name, &buf) < 0) {
+ perror(NGMSG_FILE_INFO);
+ PRINT_FILE_NAME(argv[i]);
+ continue;
+ }
+ arg_type = DEVNAME;
+ if (!(mode_flag & STATISTIC))
+ printf("ext4 defragmentation for device(%s)\n",
+ argv[i]);
+ } else if (S_ISDIR(buf.st_mode)) {
+ /* Directory */
+ if (access(argv[i], R_OK) < 0) {
+ perror(argv[i]);
+ continue;
+ }
+ arg_type = DIRNAME;
+ strncpy(dir_name, argv[i], strnlen(argv[i], PATH_MAX));
+ } else if (S_ISREG(buf.st_mode)) {
+ /* Regular file */
+ arg_type = FILENAME;
+ } else {
+ /* Irregular file */
+ PRINT_ERR_MSG(NGMSG_FILE_UNREG);
+ PRINT_FILE_NAME(argv[i]);
+ continue;
+ }
+
+ /* Set blocksize */
+ block_size = buf.st_blksize;
+
+ /* For device case,
+ * filesystem type checked in get_mount_point()
+ */
+ if (arg_type == FILENAME || arg_type == DIRNAME) {
+ if (is_ext4(argv[i], dev_name) < 0)
+ continue;
+ if (realpath(argv[i], dir_name) == NULL) {
+ perror("Couldn't get full path");
+ PRINT_FILE_NAME(argv[i]);
+ continue;
+ }
+ }
+
+ if (current_uid == ROOT_UID) {
+ /* Get super block info */
+ ret = ext2fs_open(dev_name, EXT2_FLAG_64BITS, 0,
+ block_size, unix_io_manager, &fs);
+ if (ret) {
+ if (mode_flag & DETAIL)
+ fprintf(stderr,
+ "Warning: couldn't get file "
+ "system details for %s: %s\n",
+ dev_name, error_message(ret));
+ } else {
+ blocks_per_group = fs->super->s_blocks_per_group;
+ feature_incompat = fs->super->s_feature_incompat;
+ log_groups_per_flex = fs->super->s_log_groups_per_flex;
+ ext2fs_close_free(&fs);
+ }
+ }
+
+ switch (arg_type) {
+
+ case DIRNAME:
+ if (!(mode_flag & STATISTIC))
+ printf("ext4 defragmentation "
+ "for directory(%s)\n", argv[i]);
+
+ mount_dir_len = strnlen(lost_found_dir, PATH_MAX);
+
+ strncat(lost_found_dir, "/lost+found",
+ PATH_MAX - strnlen(lost_found_dir, PATH_MAX));
+
+ /* Not the case("e4defrag mount_point_dir") */
+ if (dir_name[mount_dir_len] != '\0') {
+ /*
+ * "e4defrag mount_point_dir/lost+found"
+ * or "e4defrag mount_point_dir/lost+found/"
+ */
+ if (strncmp(lost_found_dir, dir_name,
+ strnlen(lost_found_dir,
+ PATH_MAX)) == 0 &&
+ (dir_name[strnlen(lost_found_dir,
+ PATH_MAX)] == '\0' ||
+ dir_name[strnlen(lost_found_dir,
+ PATH_MAX)] == '/')) {
+ PRINT_ERR_MSG(NGMSG_LOST_FOUND);
+ PRINT_FILE_NAME(argv[i]);
+ continue;
+ }
+
+ /* "e4defrag mount_point_dir/else_dir" */
+ memset(lost_found_dir, 0, PATH_MAX + 1);
+ }
+ /* fall through */
+ case DEVNAME:
+ if (arg_type == DEVNAME) {
+ strcpy(lost_found_dir, dir_name);
+ strncat(lost_found_dir, "/lost+found/",
+ PATH_MAX - strlen(lost_found_dir));
+ }
+
+ nftw64(dir_name, calc_entry_counts, FTW_OPEN_FD, flags);
+
+ if (mode_flag & STATISTIC) {
+ if (mode_flag & DETAIL)
+ printf("%-40s%10s/%-10s%9s\n",
+ "<File>", "now", "best", "size/ext");
+
+ if (!(mode_flag & DETAIL) &&
+ current_uid != ROOT_UID) {
+ printf(" Done.\n");
+ success_flag = 1;
+ continue;
+ }
+
+ nftw64(dir_name, file_statistic,
+ FTW_OPEN_FD, flags);
+
+ if (succeed_cnt != 0 &&
+ current_uid == ROOT_UID) {
+ if (mode_flag & DETAIL)
+ printf("\n");
+ printf("%-40s%10s/%-10s%9s\n",
+ "<Fragmented files>", "now",
+ "best", "size/ext");
+ for (j = 0; j < SHOW_FRAG_FILES; j++) {
+ if (strlen(frag_rank[j].
+ msg_buffer) > 37) {
+ printf("%d. %s\n%50d/"
+ "%-10d%6llu KB\n",
+ j + 1,
+ frag_rank[j].msg_buffer,
+ frag_rank[j].now_count,
+ frag_rank[j].best_count,
+ (unsigned long long)
+ frag_rank[j].
+ size_per_ext);
+ } else if (strlen(frag_rank[j].
+ msg_buffer) > 0) {
+ printf("%d. %-37s%10d/"
+ "%-10d%6llu KB\n",
+ j + 1,
+ frag_rank[j].msg_buffer,
+ frag_rank[j].now_count,
+ frag_rank[j].best_count,
+ (unsigned long long)
+ frag_rank[j].
+ size_per_ext);
+ } else
+ break;
+ }
+ }
+ break;
+ }
+ /* File tree walk */
+ nftw64(dir_name, file_defrag, FTW_OPEN_FD, flags);
+ printf("\n\tSuccess:\t\t\t[ %u/%u ]\n", succeed_cnt,
+ total_count);
+ printf("\tFailure:\t\t\t[ %u/%u ]\n",
+ total_count - succeed_cnt, total_count);
+ if (mode_flag & DETAIL) {
+ printf("\tTotal extents:\t\t\t%4d->%d\n",
+ extents_before_defrag,
+ extents_after_defrag);
+ printf("\tFragmented percentage:\t\t"
+ "%3llu%%->%llu%%\n",
+ !regular_count ? 0 :
+ ((unsigned long long)
+ frag_files_before_defrag * 100) /
+ regular_count,
+ !regular_count ? 0 :
+ ((unsigned long long)
+ frag_files_after_defrag * 100) /
+ regular_count);
+ }
+ break;
+ case FILENAME:
+ total_count = 1;
+ regular_count = 1;
+ strncat(lost_found_dir, "/lost+found/",
+ PATH_MAX - strnlen(lost_found_dir,
+ PATH_MAX));
+ if (strncmp(lost_found_dir, dir_name,
+ strnlen(lost_found_dir,
+ PATH_MAX)) == 0) {
+ PRINT_ERR_MSG(NGMSG_LOST_FOUND);
+ PRINT_FILE_NAME(argv[i]);
+ continue;
+ }
+
+ if (mode_flag & STATISTIC) {
+ file_statistic(argv[i], &buf, FTW_F, NULL);
+ break;
+ } else
+ printf("ext4 defragmentation for %s\n",
+ argv[i]);
+ /* Defrag single file process */
+ file_defrag(argv[i], &buf, FTW_F, NULL);
+ if (succeed_cnt != 0)
+ printf(" Success:\t\t\t[1/1]\n");
+ else
+ printf(" Success:\t\t\t[0/1]\n");
+
+ break;
+ }
+
+ if (succeed_cnt != 0)
+ success_flag = 1;
+ if (mode_flag & STATISTIC) {
+ if (current_uid != ROOT_UID) {
+ printf(" Done.\n");
+ continue;
+ }
+
+ if (!succeed_cnt) {
+ if (mode_flag & DETAIL)
+ printf("\n");
+
+ if (arg_type == DEVNAME)
+ printf(" In this device(%s), "
+ "none can be defragmented.\n", argv[i]);
+ else if (arg_type == DIRNAME)
+ printf(" In this directory(%s), "
+ "none can be defragmented.\n", argv[i]);
+ else
+ printf(" This file(%s) "
+ "can't be defragmented.\n", argv[i]);
+ } else {
+ float files_ratio = 0.0;
+ float score = 0.0;
+ __u64 size_per_ext = files_block_count *
+ (buf.st_blksize / 1024) /
+ extents_before_defrag;
+ files_ratio = (float)(extents_before_defrag -
+ extents_after_defrag) *
+ 100 / files_block_count;
+ score = CALC_SCORE(files_ratio);
+ printf("\n Total/best extents\t\t\t\t%d/%d\n"
+ " Average size per extent"
+ "\t\t\t%llu KB\n"
+ " Fragmentation score\t\t\t\t%.0f\n",
+ extents_before_defrag,
+ extents_after_defrag,
+ (unsigned long long) size_per_ext, score);
+ printf(" [0-30 no problem:"
+ " 31-55 a little bit fragmented:"
+ " 56- needs defrag]\n");
+
+ if (arg_type == DEVNAME)
+ printf(" This device (%s) ", argv[i]);
+ else if (arg_type == DIRNAME)
+ printf(" This directory (%s) ",
+ argv[i]);
+ else
+ printf(" This file (%s) ", argv[i]);
+
+ if (score > BOUND_SCORE)
+ printf("needs defragmentation.\n");
+ else
+ printf("does not need "
+ "defragmentation.\n");
+ }
+ printf(" Done.\n");
+ }
+
+ }
+
+ if (success_flag)
+ return 0;
+
+ exit(1);
+
+out:
+ printf(MSG_USAGE);
+ exit(1);
+}
+
diff --git a/misc/ext4.5.in b/misc/ext4.5.in
new file mode 100644
index 0000000..c835a34
--- /dev/null
+++ b/misc/ext4.5.in
@@ -0,0 +1,815 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH EXT4 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+ext2 \- the second extended file system
+.br
+ext3 \- the third extended file system
+.br
+ext4 \- the fourth extended file system
+.SH DESCRIPTION
+The second, third, and fourth extended file systems, or ext2, ext3, and
+ext4 as they are commonly known, are Linux file systems that have
+historically been the default file system for many Linux distributions.
+They are general purpose file systems that have been designed for
+extensibility and backwards compatibility. In particular, file systems
+previously intended for use with the ext2 and ext3 file systems can be
+mounted using the ext4 file system driver, and indeed in many modern
+Linux distributions, the ext4 file system driver has been configured
+to handle mount requests for ext2 and ext3 file systems.
+.SH FILE SYSTEM FEATURES
+A file system formatted for ext2, ext3, or ext4 can have some
+collection of the following file system feature flags enabled. Some of
+these features are not supported by all implementations of the ext2,
+ext3, and ext4 file system drivers, depending on Linux kernel version in
+use. On other operating systems, such as the GNU/HURD or FreeBSD, only
+a very restrictive set of file system features may be supported in their
+implementations of ext2.
+.TP
+.B 64bit
+.br
+Enables the file system to be larger than 2^32 blocks. This feature is set
+automatically, as needed, but it can be useful to specify this feature
+explicitly if the file system might need to be resized larger than 2^32
+blocks, even if it was smaller than that threshold when it was
+originally created. Note that some older kernels and older versions
+of e2fsprogs will not support file systems with this ext4 feature enabled.
+.TP
+.B bigalloc
+.br
+This ext4 feature enables clustered block allocation, so that the unit of
+allocation is a power of two number of blocks. That is, each bit in the
+what had traditionally been known as the block allocation bitmap now
+indicates whether a cluster is in use or not, where a cluster is by
+default composed of 16 blocks. This feature can decrease the time
+spent on doing block allocation and brings smaller fragmentation, especially
+for large files. The size can be specified using the
+.B mke2fs \-C
+option.
+.IP
+.B Warning:
+The bigalloc feature is still under development, and may not be fully
+supported with your kernel or may have various bugs. Please see the web
+page http://ext4.wiki.kernel.org/index.php/Bigalloc for details.
+May clash with delayed allocation (see
+.B nodelalloc
+mount option).
+.IP
+This feature requires that the
+.B extent
+feature be enabled.
+.TP
+.B casefold
+.br
+This ext4 feature provides file system level character encoding support
+for directories with the casefold (+F) flag enabled. This feature is
+name-preserving on the disk, but it allows applications to lookup for a
+file in the file system using an encoding equivalent version of the file
+name.
+.TP
+.B dir_index
+.br
+Use hashed b-trees to speed up name lookups in large directories. This
+feature is supported by ext3 and ext4 file systems, and is ignored by
+ext2 file systems.
+.TP
+.B dir_nlink
+.br
+Normally, ext4 allows an inode to have no more than 65,000 hard links.
+This applies to regular files as well as directories, which means that
+there can be no more than 64,998 subdirectories in a directory (because
+each of the '.' and '..' entries, as well as the directory entry for the
+directory in its parent directory counts as a hard link). This feature
+lifts this limit by causing ext4 to use a link count of 1 to indicate
+that the number of hard links to a directory is not known when the link
+count might exceed the maximum count limit.
+.TP
+.B ea_inode
+.br
+Normally, a file's extended attributes and associated metadata must fit within
+the inode or the inode's associated extended attribute block. This feature
+allows the value of each extended attribute to be placed in the data blocks of a
+separate inode if necessary, increasing the limit on the size and number of
+extended attributes per file.
+.TP
+.B encrypt
+.br
+Enables support for file-system level encryption of data blocks and file
+names. The inode metadata (timestamps, file size, user/group ownership,
+etc.) is
+.I not
+encrypted.
+.IP
+This feature is most useful on file systems with multiple users, or
+where not all files should be encrypted. In many use cases, especially
+on single-user systems, encryption at the block device layer using
+dm-crypt may provide much better security.
+.TP
+.B ext_attr
+.br
+This feature enables the use of extended attributes. This feature is
+supported by ext2, ext3, and ext4.
+.TP
+.B extent
+.br
+This ext4 feature allows the mapping of logical block numbers for a
+particular inode to physical blocks on the storage device to be stored
+using an extent tree, which is a more efficient data structure than the
+traditional indirect block scheme used by the ext2 and ext3 file
+systems. The use of the extent tree decreases metadata block overhead,
+improves file system performance, and decreases the needed to run
+.BR e2fsck (8)
+on the file system.
+(Note: both
+.B extent
+and
+.B extents
+are accepted as valid names for this feature for
+historical/backwards compatibility reasons.)
+.TP
+.B extra_isize
+.br
+This ext4 feature reserves a specific amount of space in each inode for
+extended metadata such as nanosecond timestamps and file creation time,
+even if the current kernel does not currently need to reserve this much
+space. Without this feature, the kernel will reserve the amount of
+space for features it currently needs, and the rest may be
+consumed by extended attributes.
+
+For this feature to be useful the inode size must be 256 bytes in size
+or larger.
+.TP
+.B filetype
+.br
+This feature enables the storage of file type information in directory
+entries. This feature is supported by ext2, ext3, and ext4.
+.TP
+.B flex_bg
+.br
+This ext4 feature allows the per-block group metadata (allocation
+bitmaps
+and inode tables)
+to be placed anywhere on the storage media. In addition,
+.B mke2fs
+will place the per-block group metadata together starting at the first
+block group of each "flex_bg group". The size of the flex_bg group
+can be specified using the
+.B \-G
+option.
+.TP
+.B has_journal
+.br
+Create a journal to ensure file system consistency even across unclean
+shutdowns. Setting the file system feature is equivalent to using the
+.B \-j
+option with
+.BR mke2fs " or " tune2fs.
+This feature is supported by ext3 and ext4, and ignored by the
+ext2 file system driver.
+.TP
+.B huge_file
+.br
+This ext4 feature allows files to be larger than 2 terabytes in size.
+.TP
+.B inline_data
+Allow data to be stored in the inode and extended attribute area.
+.TP
+.B journal_dev
+.br
+This feature is enabled on the superblock found on an external journal
+device. The block size for the external journal must be the same as the
+file system which uses it.
+.IP
+The external journal device can be used by a file system by specifying
+the
+.B \-J
+.BR device= <external-device>
+option to
+.BR mke2fs (8)
+or
+.BR tune2fs(8) .
+.TP
+.B large_dir
+.br
+This feature increases the limit on the number of files per directory by
+raising the maximum size of directories and, for hashed b-tree directories (see
+.BR dir_index ),
+the maximum height of the hashed b-tree used to store the directory entries.
+.TP
+.B large_file
+.br
+This feature flag is set automatically by modern kernels when a file
+larger than 2 gigabytes is created. Very old kernels could not
+handle large files, so this feature flag was used to prohibit those
+kernels from mounting file systems that they could not understand.
+.TP
+.B metadata_csum
+.br
+This ext4 feature enables metadata checksumming. This feature stores
+checksums for all of the file system metadata (superblock, group
+descriptor blocks, inode and block bitmaps, directories, and
+extent tree blocks). The checksum algorithm used for the metadata
+blocks is different than the one used for group descriptors with the
+.B uninit_bg
+feature. These two features are incompatible and
+.B metadata_csum
+will be used preferentially instead of
+.BR uninit_bg .
+.TP
+.B metadata_csum_seed
+.br
+This feature allows the file system to store the metadata checksum seed in the
+superblock, which allows the administrator to change the UUID of a file system
+using the
+.B metadata_csum
+feature while it is mounted.
+.TP
+.B meta_bg
+.br
+This ext4 feature allows file systems to be resized on-line without explicitly
+needing to reserve space for growth in the size of the block group
+descriptors. This scheme is also used to resize file systems which are
+larger than 2^32 blocks. It is not recommended that this feature be set
+when a file system is created, since this alternate method of storing
+the block group descriptors will slow down the time needed to mount the
+file system, and newer kernels can automatically set this feature as
+necessary when doing an online resize and no more reserved space is
+available in the resize inode.
+.TP
+.B mmp
+.br
+This ext4 feature provides multiple mount protection (MMP). MMP helps to
+protect the file system from being multiply mounted and is useful in
+shared storage environments.
+.TP
+.B project
+.br
+This ext4 feature provides project quota support. With this feature,
+the project ID of inode will be managed when the file system is mounted.
+.TP
+.B quota
+.br
+Create quota inodes (inode #3 for userquota and inode
+#4 for group quota) and set them in the superblock.
+With this feature, the quotas will be enabled
+automatically when the file system is mounted.
+.IP
+Causes the quota files (i.e., user.quota and
+group.quota which existed
+in the older quota design) to be hidden inodes.
+.TP
+.B resize_inode
+.br
+This file system feature indicates that space has been reserved so that
+the block group descriptor table can be extended while resizing a mounted
+file system. The online resize operation
+is carried out by the kernel, triggered by
+.BR resize2fs (8).
+By default
+.B mke2fs
+will attempt to reserve enough space so that the
+file system may grow to 1024 times its initial size. This can be changed
+using the
+.B resize
+extended option.
+.IP
+This feature requires that the
+.B sparse_super
+or
+.B sparse_super2
+feature be enabled.
+.TP
+.B sparse_super
+.br
+This file system feature is set on all modern ext2, ext3, and ext4 file
+systems. It indicates that backup copies of the superblock and block
+group descriptors are present only in a few block groups, not all of
+them.
+.TP
+.B sparse_super2
+.br
+This feature indicates that there will only be at most two backup
+superblocks and block group descriptors. The block groups used to store
+the backup superblock(s) and blockgroup descriptor(s) are stored in the
+superblock, but typically, one will be located at the beginning of block
+group #1, and one in the last block group in the file system. This
+feature is essentially a more extreme version of sparse_super and is
+designed to allow a much larger percentage of the disk to have
+contiguous blocks available for data files.
+.TP
+.B stable_inodes
+.br
+Marks the file system's inode numbers and UUID as stable.
+.BR resize2fs (8)
+will not allow shrinking a file system with this feature, nor
+will
+.BR tune2fs (8)
+allow changing its UUID. This feature allows the use of specialized encryption
+settings that make use of the inode numbers and UUID. Note that the
+.B encrypt
+feature still needs to be enabled separately.
+.B stable_inodes
+is a "compat" feature, so old kernels will allow it.
+.TP
+.B uninit_bg
+.br
+This ext4 file system feature indicates that the block group descriptors
+will be protected using checksums, making it safe for
+.BR mke2fs (8)
+to create a file system without initializing all of the block groups.
+The kernel will keep a high watermark of unused inodes, and initialize
+inode tables and blocks lazily. This feature speeds up the time to check
+the file system using
+.BR e2fsck (8),
+and it also speeds up the time required for
+.BR mke2fs (8)
+to create the file system.
+.TP
+.B verity
+.br
+Enables support for verity protected files. Verity files are readonly,
+and their data is transparently verified against a Merkle tree hidden
+past the end of the file. Using the Merkle tree's root hash, a verity
+file can be efficiently authenticated, independent of the file's size.
+.IP
+This feature is most useful for authenticating important read-only files
+on read-write file systems. If the file system itself is read-only,
+then using dm-verity to authenticate the entire block device may provide
+much better security.
+.SH MOUNT OPTIONS
+This section describes mount options which are specific to ext2, ext3,
+and ext4. Other generic mount options may be used as well; see
+.BR mount (8)
+for details.
+.SH "Mount options for ext2"
+The `ext2' file system is the standard Linux file system.
+Since Linux 2.5.46, for most mount options the default
+is determined by the file system superblock. Set them with
+.BR tune2fs (8).
+.TP
+.BR acl | noacl
+Support POSIX Access Control Lists (or not). See the
+.BR acl (5)
+manual page.
+.TP
+.BR bsddf | minixdf
+Set the behavior for the
+.I statfs
+system call. The
+.B minixdf
+behavior is to return in the
+.I f_blocks
+field the total number of blocks of the file system, while the
+.B bsddf
+behavior (which is the default) is to subtract the overhead blocks
+used by the ext2 file system and not available for file storage. Thus
+.sp 1
+% mount /k \-o minixdf; df /k; umount /k
+.TS
+tab(#);
+l2 l2 r2 l2 l2 l
+l c r c c l.
+File System#1024-blocks#Used#Available#Capacity#Mounted on
+/dev/sda6#2630655#86954#2412169#3%#/k
+.TE
+.sp 1
+% mount /k \-o bsddf; df /k; umount /k
+.TS
+tab(#);
+l2 l2 r2 l2 l2 l
+l c r c c l.
+File System#1024-blocks#Used#Available#Capacity#Mounted on
+/dev/sda6#2543714#13#2412169#0%#/k
+.TE
+.sp 1
+(Note that this example shows that one can add command line options
+to the options given in
+.IR /etc/fstab .)
+.TP
+.BR check=none " or " nocheck
+No checking is done at mount time. This is the default. This is fast.
+It is wise to invoke
+.BR e2fsck (8)
+every now and then, e.g.\& at boot time. The non-default behavior is unsupported
+(check=normal and check=strict options have been removed). Note that these mount options
+don't have to be supported if ext4 kernel driver is used for ext2 and ext3 file systems.
+.TP
+.B debug
+Print debugging info upon each (re)mount.
+.TP
+.BR errors= { continue | remount-ro | panic }
+Define the behavior when an error is encountered.
+(Either ignore errors and just mark the file system erroneous and continue,
+or remount the file system read-only, or panic and halt the system.)
+The default is set in the file system superblock, and can be
+changed using
+.BR tune2fs (8).
+.TP
+.BR grpid | bsdgroups " and " nogrpid | sysvgroups
+These options define what group id a newly created file gets.
+When
+.B grpid
+is set, it takes the group id of the directory in which it is created;
+otherwise (the default) it takes the fsgid of the current process, unless
+the directory has the setgid bit set, in which case it takes the gid
+from the parent directory, and also gets the setgid bit set
+if it is a directory itself.
+.TP
+.BR grpquota | noquota | quota | usrquota
+The usrquota (same as quota) mount option enables user quota support on the
+file system. grpquota enables group quotas support. You need the quota utilities
+to actually enable and manage the quota system.
+.TP
+.B nouid32
+Disables 32-bit UIDs and GIDs. This is for interoperability with older
+kernels which only store and expect 16-bit values.
+.TP
+.BR oldalloc " or " orlov
+Use old allocator or Orlov allocator for new inodes. Orlov is default.
+.TP
+\fBresgid=\fP\,\fIn\fP and \fBresuid=\fP\,\fIn\fP
+The ext2 file system reserves a certain percentage of the available
+space (by default 5%, see
+.BR mke2fs (8)
+and
+.BR tune2fs (8)).
+These options determine who can use the reserved blocks.
+(Roughly: whoever has the specified uid, or belongs to the specified group.)
+.TP
+.BI sb= n
+Instead of using the normal superblock, use an alternative superblock
+specified by
+.IR n .
+This option is normally used when the primary superblock has been
+corrupted. The location of backup superblocks is dependent on the
+file system's blocksize, the number of blocks per group, and features
+such as
+.BR sparse_super .
+.IP
+Additional backup superblocks can be determined by using the
+.B mke2fs
+program using the
+.B \-n
+option to print out where the superblocks exist, supposing
+.B mke2fs
+is supplied with arguments that are consistent with the file system's layout
+(e.g. blocksize, blocks per group,
+.BR sparse_super ,
+etc.).
+.IP
+The block number here uses 1\ k units. Thus, if you want to use logical
+block 32768 on a file system with 4\ k blocks, use "sb=131072".
+.TP
+.BR user_xattr | nouser_xattr
+Support "user." extended attributes (or not).
+
+
+.SH "Mount options for ext3"
+The ext3 file system is a version of the ext2 file system which has been
+enhanced with journaling. It supports the same options as ext2 as
+well as the following additions:
+.TP
+.BR journal_dev=devnum / journal_path=path
+When the external journal device's major/minor numbers
+have changed, these options allow the user to specify
+the new journal location. The journal device is
+identified either through its new major/minor numbers encoded
+in devnum, or via a path to the device.
+.TP
+.BR norecovery / noload
+Don't load the journal on mounting. Note that
+if the file system was not unmounted cleanly,
+skipping the journal replay will lead to the
+file system containing inconsistencies that can
+lead to any number of problems.
+.TP
+.BR data= { journal | ordered | writeback }
+Specifies the journaling mode for file data. Metadata is always journaled.
+To use modes other than
+.B ordered
+on the root file system, pass the mode to the kernel as boot parameter, e.g.\&
+.IR rootflags=data=journal .
+.RS
+.TP
+.B journal
+All data is committed into the journal prior to being written into the
+main file system.
+.TP
+.B ordered
+This is the default mode. All data is forced directly out to the main file
+system prior to its metadata being committed to the journal.
+.TP
+.B writeback
+Data ordering is not preserved \(en data may be written into the main
+file system after its metadata has been committed to the journal.
+This is rumoured to be the highest-throughput option. It guarantees
+internal file system integrity, however it can allow old data to appear
+in files after a crash and journal recovery.
+.RE
+.TP
+.B data_err=ignore
+Just print an error message if an error occurs in a file data buffer in
+ordered mode.
+.TP
+.B data_err=abort
+Abort the journal if an error occurs in a file data buffer in ordered mode.
+.TP
+.BR barrier=0 " / " barrier=1 "
+This disables / enables the use of write barriers in the jbd code. barrier=0
+disables, barrier=1 enables (default). This also requires an IO stack which can
+support barriers, and if jbd gets an error on a barrier write, it will disable
+barriers again with a warning. Write barriers enforce proper on-disk ordering
+of journal commits, making volatile disk write caches safe to use, at some
+performance penalty. If your disks are battery-backed in one way or another,
+disabling barriers may safely improve performance.
+.TP
+.BI commit= nrsec
+Start a journal commit every
+.I nrsec
+seconds. The default value is 5 seconds. Zero means default.
+.TP
+.B user_xattr
+Enable Extended User Attributes. See the
+.BR attr (5)
+manual page.
+.TP
+.BR jqfmt= { vfsold | vfsv0 | vfsv1 }
+Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota)
+ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0 or
+jqfmt=vfsv1 enables journaled quotas. Journaled quotas have the advantage that
+even after a crash no quota check is required. When the
+.B quota
+file system feature is enabled, journaled quotas are used automatically, and
+this mount option is ignored.
+.TP
+.BR usrjquota=aquota.user | grpjquota=aquota.group
+For journaled quotas (jqfmt=vfsv0 or jqfmt=vfsv1), the mount options
+usrjquota=aquota.user and grpjquota=aquota.group are required to tell the
+quota system which quota database files to use. When the
+.B quota
+file system feature is enabled, journaled quotas are used automatically, and
+this mount option is ignored.
+
+.SH "Mount options for ext4"
+The ext4 file system is an advanced level of the ext3 file system which
+incorporates scalability and reliability enhancements for supporting large
+file system.
+
+The options
+.B journal_dev, journal_path, norecovery, noload, data, commit, orlov,
+.B oldalloc, [no]user_xattr, [no]acl, bsddf, minixdf, debug, errors,
+.B data_err, grpid, bsdgroups, nogrpid, sysvgroups, resgid, resuid, sb,
+.B quota, noquota, nouid32, grpquota, usrquota, usrjquota, grpjquota,
+.B and jqfmt are backwardly compatible with ext3 or ext2.
+.TP
+.B journal_checksum | nojournal_checksum
+The journal_checksum option enables checksumming of the journal transactions.
+This will allow the recovery code in e2fsck and the kernel to detect corruption
+in the kernel. It is a compatible change and will be ignored by older kernels.
+.TP
+.B journal_async_commit
+Commit block can be written to disk without waiting for descriptor blocks. If
+enabled older kernels cannot mount the device.
+This will enable 'journal_checksum' internally.
+.TP
+.BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier
+These mount options have the same effect as in ext3. The mount options
+"barrier" and "nobarrier" are added for consistency with other ext4 mount
+options.
+
+The ext4 file system enables write barriers by default.
+.TP
+.BI inode_readahead_blks= n
+This tuning parameter controls the maximum number of inode table blocks that
+ext4's inode table readahead algorithm will pre-read into the buffer cache.
+The value must be a power of 2. The default value is 32 blocks.
+.TP
+.BI stripe= n
+Number of file system blocks that mballoc will try to use for allocation size
+and alignment. For RAID5/6 systems this should be the number of data disks *
+RAID chunk size in file system blocks.
+.TP
+.B delalloc
+Deferring block allocation until write-out time.
+.TP
+.B nodelalloc
+Disable delayed allocation. Blocks are allocated when data is copied from user
+to page cache.
+.TP
+.BI max_batch_time= usec
+Maximum amount of time ext4 should wait for additional file system operations to
+be batch together with a synchronous write operation. Since a synchronous
+write operation is going to force a commit and then a wait for the I/O
+complete, it doesn't cost much, and can be a huge throughput win, we wait for a
+small amount of time to see if any other transactions can piggyback on the
+synchronous write. The algorithm used is designed to automatically tune for
+the speed of the disk, by measuring the amount of time (on average) that it
+takes to finish committing a transaction. Call this time the "commit time".
+If the time that the transaction has been running is less than the commit time,
+ext4 will try sleeping for the commit time to see if other operations will join
+the transaction. The commit time is capped by the max_batch_time, which
+defaults to 15000\ \[mc]s (15\ ms). This optimization can be turned off entirely by
+setting max_batch_time to 0.
+.TP
+.BI min_batch_time= usec
+This parameter sets the commit time (as described above) to be at least
+min_batch_time. It defaults to zero microseconds. Increasing this parameter
+may improve the throughput of multi-threaded, synchronous workloads on very
+fast disks, at the cost of increasing latency.
+.TP
+.BI journal_ioprio= prio
+The I/O priority (from 0 to 7, where 0 is the highest priority) which should be
+used for I/O operations submitted by kjournald2 during a commit operation.
+This defaults to 3, which is a slightly higher priority than the default I/O
+priority.
+.TP
+.B abort
+Simulate the effects of calling ext4_abort() for
+debugging purposes. This is normally used while
+remounting a file system which is already mounted.
+.TP
+.BR auto_da_alloc | noauto_da_alloc
+Many broken applications don't use fsync() when
+replacing existing files via patterns such as
+
+fd = open("foo.new")/write(fd,...)/close(fd)/ rename("foo.new", "foo")
+
+or worse yet
+
+fd = open("foo", O_TRUNC)/write(fd,...)/close(fd).
+
+If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and
+replace-via-truncate patterns and force that any delayed allocation blocks are
+allocated such that at the next journal commit, in the default data=ordered
+mode, the data blocks of the new file are forced to disk before the rename()
+operation is committed. This provides roughly the same level of guarantees as
+ext3, and avoids the "zero-length" problem that can happen when a system
+crashes before the delayed allocation blocks are forced to disk.
+.TP
+.B noinit_itable
+Do not initialize any uninitialized inode table blocks in the background. This
+feature may be used by installation CD's so that the install process can
+complete as quickly as possible; the inode table initialization process would
+then be deferred until the next time the file system is mounted.
+.TP
+.B init_itable=n
+The lazy itable init code will wait n times the number of milliseconds it took
+to zero out the previous block group's inode table. This minimizes the impact on
+system performance while the file system's inode table is being initialized.
+.TP
+.BR discard / nodiscard
+Controls whether ext4 should issue discard/TRIM commands to the underlying
+block device when blocks are freed. This is useful for SSD devices and
+sparse/thinly-provisioned LUNs, but it is off by default until sufficient
+testing has been done.
+.TP
+.BR block_validity / noblock_validity
+This option enables/disables the in-kernel facility for tracking
+file system metadata blocks within internal data structures. This allows multi-\c
+block allocator and other routines to quickly locate extents which might
+overlap with file system metadata blocks. This option is intended for debugging
+purposes and since it negatively affects the performance, it is off by default.
+.TP
+.BR dioread_lock / dioread_nolock
+Controls whether or not ext4 should use the DIO read locking. If the
+dioread_nolock option is specified ext4 will allocate uninitialized extent
+before buffer write and convert the extent to initialized after IO completes.
+This approach allows ext4 code to avoid using inode mutex, which improves
+scalability on high speed storages. However this does not work with data
+journaling and dioread_nolock option will be ignored with kernel warning.
+Note that dioread_nolock code path is only used for extent-based files.
+Because of the restrictions this options comprises it is off by default
+(e.g.\& dioread_lock).
+.TP
+.B max_dir_size_kb=n
+This limits the size of the directories so that any attempt to expand them
+beyond the specified limit in kilobytes will cause an ENOSPC error. This is
+useful in memory-constrained environments, where a very large directory can
+cause severe performance problems or even provoke the Out Of Memory killer. (For
+example, if there is only 512\ MB memory available, a 176\ MB directory may
+seriously cramp the system's style.)
+.TP
+.B i_version
+Enable 64-bit inode version support. This option is off by default.
+.TP
+.B nombcache
+This option disables use of mbcache for extended attribute deduplication. On
+systems where extended attributes are rarely or never shared between files,
+use of mbcache for deduplication adds unnecessary computational overhead.
+.TP
+.B prjquota
+The prjquota mount option enables project quota support on the file system.
+You need the quota utilities to actually enable and manage the quota system.
+This mount option requires the
+.B project
+file system feature.
+
+.SH FILE ATTRIBUTES
+The ext2, ext3, and ext4 file systems support setting the following file
+attributes on Linux systems using the
+.BR chattr (1)
+utility:
+.sp
+.BR a " - append only"
+.sp
+.BR A " - no atime updates"
+.sp
+.BR d " - no dump"
+.sp
+.BR D " - synchronous directory updates"
+.sp
+.BR i " - immutable"
+.sp
+.BR S " - synchronous updates"
+.sp
+.BR u " - undeletable"
+.sp
+In addition, the ext3 and ext4 file systems support the following flag:
+.sp
+.BR j " - data journaling"
+.sp
+Finally, the ext4 file system also supports the following flag:
+.sp
+.BR e " - extents format"
+.sp
+For descriptions of these attribute flags, please refer to the
+.BR chattr (1)
+man page.
+.SH KERNEL SUPPORT
+This section lists the file system driver (e.g., ext2, ext3, ext4) and
+upstream kernel version where a particular file system feature was
+supported. Note that in some cases the feature was present in earlier
+kernel versions, but there were known, serious bugs. In other cases the
+feature may still be considered in an experimental state. Finally, note
+that some distributions may have backported features into older kernels;
+in particular the kernel versions in certain "enterprise distributions"
+can be extremely misleading.
+.IP "\fBfiletype\fR" 2in
+ext2, 2.2.0
+.IP "\fBsparse_super\fR" 2in
+ext2, 2.2.0
+.IP "\fBlarge_file\fR" 2in
+ext2, 2.2.0
+.IP "\fBhas_journal\fR" 2in
+ext3, 2.4.15
+.IP "\fBext_attr\fR" 2in
+ext2/ext3, 2.6.0
+.IP "\fBdir_index\fR" 2in
+ext3, 2.6.0
+.IP "\fBresize_inode\fR" 2in
+ext3, 2.6.10 (online resizing)
+.IP "\fB64bit\fR" 2in
+ext4, 2.6.28
+.IP "\fBdir_nlink\fR" 2in
+ext4, 2.6.28
+.IP "\fBextent\fR" 2in
+ext4, 2.6.28
+.IP "\fBextra_isize\fR" 2in
+ext4, 2.6.28
+.IP "\fBflex_bg\fR" 2in
+ext4, 2.6.28
+.IP "\fBhuge_file\fR" 2in
+ext4, 2.6.28
+.IP "\fBmeta_bg\fR" 2in
+ext4, 2.6.28
+.IP "\fBuninit_bg\fR" 2in
+ext4, 2.6.28
+.IP "\fBmmp\fR" 2in
+ext4, 3.0
+.IP "\fBbigalloc\fR" 2in
+ext4, 3.2
+.IP "\fBquota\fR" 2in
+ext4, 3.6
+.IP "\fBinline_data\fR" 2in
+ext4, 3.8
+.IP "\fBsparse_super2\fR" 2in
+ext4, 3.16
+.IP "\fBmetadata_csum\fR" 2in
+ext4, 3.18
+.IP "\fBencrypt\fR" 2in
+ext4, 4.1
+.IP "\fBmetadata_csum_seed\fR" 2i
+ext4, 4.4
+.IP "\fBproject\fR" 2i
+ext4, 4.5
+.IP "\fBea_inode\fR" 2i
+ext4, 4.13
+.IP "\fBlarge_dir\fR" 2i
+ext4, 4.13
+.IP "\fBcasefold\fR" 2i
+ext4, 5.2
+.IP "\fBverity\fR" 2i
+ext4, 5.4
+.IP "\fBstable_inodes\fR" 2i
+ext4, 5.5
+.SH SEE ALSO
+.BR mke2fs (8),
+.BR mke2fs.conf (5),
+.BR e2fsck (8),
+.BR dumpe2fs (8),
+.BR tune2fs (8),
+.BR debugfs (8),
+.BR mount (8),
+.BR chattr (1)
diff --git a/misc/filefrag.8.in b/misc/filefrag.8.in
new file mode 100644
index 0000000..6d56c13
--- /dev/null
+++ b/misc/filefrag.8.in
@@ -0,0 +1,77 @@
+.\" -*- nroff -*-
+.TH FILEFRAG 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+filefrag \- report on file fragmentation
+.SH SYNOPSIS
+.B filefrag
+[
+.BI \-b blocksize
+]
+[
+.B \-BeEkPsvVxX
+]
+[
+.I files...
+]
+.SH DESCRIPTION
+.B filefrag
+reports on how badly fragmented a particular file might be. It makes
+allowances for indirect blocks for ext2 and ext3 file systems, but can be
+used on files for any file system.
+.PP
+The
+.B filefrag
+program initially attempts to get the
+extent information using FIEMAP ioctl which is more efficient and faster.
+If FIEMAP is not supported then filefrag will fall back to using FIBMAP.
+.SH OPTIONS
+.TP
+.B \-B
+Force the use of the older FIBMAP ioctl instead of the FIEMAP ioctl for
+testing purposes.
+.TP
+.BI \-b blocksize
+Use
+.I blocksize
+in bytes, or with [KMG] suffix, up to 1GB for output instead of the
+file system blocksize. For compatibility with earlier versions of
+.BR filefrag ,
+if
+.I blocksize
+is unspecified it defaults to 1024 bytes. Since
+.I blocksize
+is an optional argument, it must be added without any space after
+.BR -b .
+.TP
+.B \-e
+Print output in extent format, even for block-mapped files.
+.TP
+.B \-E
+Display the contents of ext4's extent status cache. This feature is not
+supported on all kernels, and is only supported on ext4 file systems.
+.TP
+.B \-k
+Use 1024\-byte blocksize for output (identical to '\-b1024').
+.TP
+.B -P
+Pre-load the ext4 extent status cache for the file. This is not
+supported on all kernels, and is only supported on ext4 file systems.
+.TP
+.B \-s
+Sync the file before requesting the mapping.
+.TP
+.B \-v
+Be verbose when checking for file fragmentation.
+.TP
+.B \-V
+Print version number of program and library. If given twice, also
+print the FIEMAP flags that are understood by the current version.
+.TP
+.B \-x
+Display mapping of extended attributes.
+.TP
+.B \-X
+Display extent block numbers in hexadecimal format.
+.SH AUTHOR
+.B filefrag
+was written by Theodore Ts'o <tytso@mit.edu>.
diff --git a/misc/filefrag.c b/misc/filefrag.c
new file mode 100644
index 0000000..eaaa90a
--- /dev/null
+++ b/misc/filefrag.c
@@ -0,0 +1,695 @@
+/*
+ * filefrag.c -- report if a particular file is fragmented
+ *
+ * Copyright 2003 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#ifndef __linux__
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int main(void) {
+ fputs("This program is only supported on Linux!\n", stderr);
+ exit(EXIT_FAILURE);
+}
+#else
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <time.h>
+#include <fcntl.h>
+#include <errno.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/vfs.h>
+#include <sys/ioctl.h>
+#ifdef HAVE_LINUX_FD_H
+#include <linux/fd.h>
+#endif
+#include <ext2fs/ext2fs.h>
+#include <ext2fs/ext2_types.h>
+#include <ext2fs/fiemap.h>
+#include "../version.h"
+
+int verbose = 0;
+unsigned int blocksize; /* Use specified blocksize (default 1kB) */
+int sync_file = 0; /* fsync file before getting the mapping */
+int precache_file = 0; /* precache the file before getting the mapping */
+int xattr_map = 0; /* get xattr mapping */
+int force_bmap; /* force use of FIBMAP instead of FIEMAP */
+int force_extent; /* print output in extent format always */
+int use_extent_cache; /* Use extent cache */
+int logical_width = 8;
+int physical_width = 10;
+const char *ext_fmt = "%4d: %*llu..%*llu: %*llu..%*llu: %6llu: %s\n";
+const char *hex_fmt = "%4d: %*llx..%*llx: %*llx..%*llx: %6llx: %s\n";
+
+#define FILEFRAG_FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
+
+#define FIBMAP _IO(0x00, 1) /* bmap access */
+#define FIGETBSZ _IO(0x00, 2) /* get the block size used for bmap */
+
+#define LUSTRE_SUPER_MAGIC 0x0BD00BD0
+
+#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */
+#define EXT3_IOC_GETFLAGS _IOR('f', 1, long)
+
+static int ulong_log2(unsigned long arg)
+{
+ int l = 0;
+
+ arg >>= 1;
+ while (arg) {
+ l++;
+ arg >>= 1;
+ }
+ return l;
+}
+
+static int ulong_log10(unsigned long long arg)
+{
+ int l = 0;
+
+ arg = arg / 10;
+ while (arg) {
+ l++;
+ arg = arg / 10;
+ }
+ return l;
+}
+
+static unsigned int div_ceil(unsigned int a, unsigned int b)
+{
+ if (!a)
+ return 0;
+ return ((a - 1) / b) + 1;
+}
+
+static int get_bmap(int fd, unsigned long block, unsigned long *phy_blk)
+{
+ int ret;
+ unsigned int b;
+
+ b = block;
+ ret = ioctl(fd, FIBMAP, &b); /* FIBMAP takes pointer to integer */
+ if (ret < 0)
+ return -errno;
+ *phy_blk = b;
+
+ return ret;
+}
+
+static void print_extent_header(void)
+{
+ printf(" ext: %*s %*s length: %*s flags:\n",
+ logical_width * 2 + 3,
+ "logical_offset:",
+ physical_width * 2 + 3, "physical_offset:",
+ physical_width + 1,
+ "expected:");
+}
+
+static void print_flag(__u32 *flags, __u32 mask, char *buf, const char *name)
+{
+ char hex[sizeof(mask) * 2 + 4]; /* 2 chars/byte + 0x, + NUL */
+
+ if ((*flags & mask) == 0)
+ return;
+
+ if (name == NULL) {
+ sprintf(hex, "%#04x,", mask);
+ name = hex;
+ }
+ strcat(buf, name);
+ *flags &= ~mask;
+}
+
+static void print_flags(__u32 fe_flags, char *flags, int len, int print_unknown)
+{
+ __u32 mask;
+
+ print_flag(&fe_flags, FIEMAP_EXTENT_LAST, flags, "last,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_UNKNOWN, flags, "unknown_loc,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_DELALLOC, flags, "delalloc,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_ENCODED, flags, "encoded,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_DATA_ENCRYPTED, flags,"encrypted,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_NOT_ALIGNED, flags, "not_aligned,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_DATA_INLINE, flags, "inline,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_DATA_TAIL, flags, "tail_packed,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_UNWRITTEN, flags, "unwritten,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_MERGED, flags, "merged,");
+ print_flag(&fe_flags, FIEMAP_EXTENT_SHARED, flags, "shared,");
+ print_flag(&fe_flags, EXT4_FIEMAP_EXTENT_HOLE, flags, "hole,");
+
+ if (!print_unknown)
+ goto out;
+
+ /* print any unknown flags as hex values */
+ for (mask = 1; fe_flags != 0 && mask != 0; mask <<= 1)
+ print_flag(&fe_flags, mask, flags, NULL);
+out:
+ /* Remove trailing comma, if any */
+ if (flags[0])
+ flags[strnlen(flags, len) - 1] = '\0';
+
+}
+
+static void print_extent_info(struct fiemap_extent *fm_extent, int cur_ex,
+ unsigned long long expected, int blk_shift,
+ ext2fs_struct_stat *st)
+{
+ unsigned long long physical_blk;
+ unsigned long long logical_blk;
+ unsigned long long ext_len;
+ unsigned long long ext_blks;
+ unsigned long long ext_blks_phys;
+ char flags[256] = "";
+
+ /* For inline data all offsets should be in bytes, not blocks */
+ if (fm_extent->fe_flags & FIEMAP_EXTENT_DATA_INLINE)
+ blk_shift = 0;
+
+ ext_len = fm_extent->fe_length >> blk_shift;
+ ext_blks = (fm_extent->fe_length - 1) >> blk_shift;
+ logical_blk = fm_extent->fe_logical >> blk_shift;
+ if (fm_extent->fe_flags & FIEMAP_EXTENT_UNKNOWN) {
+ physical_blk = 0;
+ } else {
+ physical_blk = fm_extent->fe_physical >> blk_shift;
+ }
+
+ if (expected &&
+ !(fm_extent->fe_flags & FIEMAP_EXTENT_UNKNOWN) &&
+ !(fm_extent->fe_flags & EXT4_FIEMAP_EXTENT_HOLE))
+ sprintf(flags, ext_fmt == hex_fmt ? "%*llx: " : "%*llu: ",
+ physical_width, expected >> blk_shift);
+ else
+ sprintf(flags, "%.*s ", physical_width, " ");
+
+ print_flags(fm_extent->fe_flags, flags, sizeof(flags), 1);
+
+ if (fm_extent->fe_logical + fm_extent->fe_length >=
+ (unsigned long long)st->st_size)
+ strcat(flags, flags[0] ? ",eof" : "eof");
+
+ if ((fm_extent->fe_flags & FIEMAP_EXTENT_UNKNOWN) ||
+ (fm_extent->fe_flags & EXT4_FIEMAP_EXTENT_HOLE)) {
+ ext_len = 0;
+ ext_blks_phys = 0;
+ } else
+ ext_blks_phys = ext_blks;
+
+ printf(ext_fmt, cur_ex, logical_width, logical_blk,
+ logical_width, logical_blk + ext_blks,
+ physical_width, physical_blk,
+ physical_width, physical_blk + ext_blks_phys,
+ ext_len, flags);
+}
+
+static int filefrag_fiemap(int fd, int blk_shift, int *num_extents,
+ ext2fs_struct_stat *st)
+{
+ __u64 buf[2048]; /* __u64 for proper field alignment */
+ struct fiemap *fiemap = (struct fiemap *)buf;
+ struct fiemap_extent *fm_ext = &fiemap->fm_extents[0];
+ struct fiemap_extent fm_last;
+ int count = (sizeof(buf) - sizeof(*fiemap)) /
+ sizeof(struct fiemap_extent);
+ unsigned long long expected = 0;
+ unsigned long long expected_dense = 0;
+ unsigned long flags = 0;
+ unsigned int i;
+ unsigned long cmd = FS_IOC_FIEMAP;
+ int fiemap_header_printed = 0;
+ int tot_extents = 0, n = 0;
+ int last = 0;
+ int rc;
+
+ memset(fiemap, 0, sizeof(struct fiemap));
+ memset(&fm_last, 0, sizeof(fm_last));
+
+ if (sync_file)
+ flags |= FIEMAP_FLAG_SYNC;
+
+ if (precache_file)
+ flags |= FIEMAP_FLAG_CACHE;
+
+ if (xattr_map)
+ flags |= FIEMAP_FLAG_XATTR;
+
+ if (use_extent_cache)
+ cmd = EXT4_IOC_GET_ES_CACHE;
+
+ do {
+ fiemap->fm_length = ~0ULL;
+ fiemap->fm_flags = flags;
+ fiemap->fm_extent_count = count;
+ rc = ioctl(fd, cmd, (unsigned long) fiemap);
+ if (rc < 0) {
+ static int fiemap_incompat_printed;
+
+ rc = -errno;
+ if (rc == -EBADR && !fiemap_incompat_printed) {
+ fprintf(stderr, "FIEMAP failed with unknown "
+ "flags %x\n",
+ fiemap->fm_flags);
+ fiemap_incompat_printed = 1;
+ }
+ return rc;
+ }
+
+ /* If 0 extents are returned, then more ioctls are not needed */
+ if (fiemap->fm_mapped_extents == 0)
+ break;
+
+ if (verbose && !fiemap_header_printed) {
+ print_extent_header();
+ fiemap_header_printed = 1;
+ }
+
+ for (i = 0; i < fiemap->fm_mapped_extents; i++) {
+ expected_dense = fm_last.fe_physical +
+ fm_last.fe_length;
+ expected = fm_last.fe_physical +
+ fm_ext[i].fe_logical - fm_last.fe_logical;
+ if (fm_ext[i].fe_logical != 0 &&
+ fm_ext[i].fe_physical != expected &&
+ fm_ext[i].fe_physical != expected_dense) {
+ tot_extents++;
+ } else {
+ expected = 0;
+ if (!tot_extents)
+ tot_extents = 1;
+ }
+ if (verbose)
+ print_extent_info(&fm_ext[i], n, expected,
+ blk_shift, st);
+ if (fm_ext[i].fe_flags & FIEMAP_EXTENT_LAST)
+ last = 1;
+ fm_last = fm_ext[i];
+ n++;
+ }
+
+ fiemap->fm_start = (fm_ext[i - 1].fe_logical +
+ fm_ext[i - 1].fe_length);
+ } while (last == 0);
+
+ *num_extents = tot_extents;
+
+ return 0;
+}
+
+#define EXT2_DIRECT 12
+
+static int filefrag_fibmap(int fd, int blk_shift, int *num_extents,
+ ext2fs_struct_stat *st,
+ unsigned long numblocks, int is_ext2)
+{
+ struct fiemap_extent fm_ext, fm_last;
+ unsigned long i, last_block;
+ unsigned long long logical, expected = 0;
+ /* Blocks per indirect block */
+ const long bpib = st->st_blksize / 4;
+ int count;
+
+ memset(&fm_ext, 0, sizeof(fm_ext));
+ memset(&fm_last, 0, sizeof(fm_last));
+ if (force_extent) {
+ fm_ext.fe_flags = FIEMAP_EXTENT_MERGED;
+ }
+
+ if (sync_file && fsync(fd) != 0)
+ return -errno;
+
+ for (i = 0, logical = 0, *num_extents = 0, count = last_block = 0;
+ i < numblocks;
+ i++, logical += st->st_blksize) {
+ unsigned long block = 0;
+ int rc;
+
+ if (is_ext2 && last_block) {
+ if (((i - EXT2_DIRECT) % bpib) == 0)
+ last_block++;
+ if (((i - EXT2_DIRECT - bpib) % (bpib * bpib)) == 0)
+ last_block++;
+ if (((i - EXT2_DIRECT - bpib - bpib * bpib) %
+ (((unsigned long long)bpib) * bpib * bpib)) == 0)
+ last_block++;
+ }
+ rc = get_bmap(fd, i, &block);
+ if (rc < 0)
+ return rc;
+ if (block == 0)
+ continue;
+
+ if (*num_extents == 0 || block != last_block + 1 ||
+ fm_ext.fe_logical + fm_ext.fe_length != logical) {
+ /*
+ * This is the start of a new extent; figure out where
+ * we expected it to be and report the extent.
+ */
+ if (*num_extents != 0 && fm_last.fe_length) {
+ expected = fm_last.fe_physical +
+ (fm_ext.fe_logical - fm_last.fe_logical);
+ if (expected == fm_ext.fe_physical)
+ expected = 0;
+ }
+ if (force_extent && *num_extents == 0)
+ print_extent_header();
+ if (force_extent && *num_extents != 0) {
+ print_extent_info(&fm_ext, *num_extents - 1,
+ expected, blk_shift, st);
+ }
+ if (verbose && expected != 0) {
+ printf("Discontinuity: Block %llu is at %llu "
+ "(was %llu)\n",
+ (unsigned long long) (fm_ext.fe_logical / st->st_blksize),
+ (unsigned long long) (fm_ext.fe_physical / st->st_blksize),
+ (unsigned long long) (expected / st->st_blksize));
+ }
+ /* create the new extent */
+ fm_last = fm_ext;
+ (*num_extents)++;
+ fm_ext.fe_physical = block * st->st_blksize;
+ fm_ext.fe_logical = logical;
+ fm_ext.fe_length = 0;
+ }
+ fm_ext.fe_length += st->st_blksize;
+ last_block = block;
+ }
+ if (force_extent && *num_extents != 0) {
+ if (fm_last.fe_length) {
+ expected = fm_last.fe_physical +
+ (fm_ext.fe_logical - fm_last.fe_logical);
+ if (expected == fm_ext.fe_physical)
+ expected = 0;
+ }
+ print_extent_info(&fm_ext, *num_extents - 1, expected,
+ blk_shift, st);
+ }
+
+ return count;
+}
+
+static int frag_report(const char *filename)
+{
+ static struct statfs fsinfo;
+ static unsigned int blksize;
+ ext2fs_struct_stat st;
+ int blk_shift;
+ long fd;
+ unsigned long long numblocks;
+ int data_blocks_per_cyl = 1;
+ int num_extents = 1, expected = ~0;
+ int is_ext2 = 0;
+ static dev_t last_device;
+ int width;
+ int rc = 0;
+
+#if defined(HAVE_OPEN64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ fd = open64(filename, O_RDONLY);
+#else
+ fd = open(filename, O_RDONLY);
+#endif
+ if (fd < 0) {
+ rc = -errno;
+ perror("open");
+ return rc;
+ }
+
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+ if (fstat64(fd, &st) < 0) {
+#else
+ if (fstat(fd, &st) < 0) {
+#endif
+ rc = -errno;
+ perror("stat");
+ goto out_close;
+ }
+
+ if ((last_device != st.st_dev) || !st.st_dev) {
+ if (fstatfs(fd, &fsinfo) < 0) {
+ rc = -errno;
+ perror("fstatfs");
+ goto out_close;
+ }
+ if ((ioctl(fd, FIGETBSZ, &blksize) < 0) || !blksize)
+ blksize = fsinfo.f_bsize;
+ if (verbose)
+ printf("Filesystem type is: %lx\n",
+ (unsigned long)fsinfo.f_type);
+ }
+ st.st_blksize = blksize;
+ if (fsinfo.f_type == 0xef51 || fsinfo.f_type == 0xef52 ||
+ fsinfo.f_type == 0xef53) {
+ unsigned int flags;
+
+ if (ioctl(fd, EXT3_IOC_GETFLAGS, &flags) == 0 &&
+ !(flags & EXT4_EXTENTS_FL))
+ is_ext2 = 1;
+ }
+
+ if (is_ext2) {
+ long cylgroups = div_ceil(fsinfo.f_blocks, blksize * 8);
+
+ if (verbose && last_device != st.st_dev)
+ printf("Filesystem cylinder groups approximately %ld\n",
+ cylgroups);
+
+ data_blocks_per_cyl = blksize * 8 -
+ (fsinfo.f_files / 8 / cylgroups) - 3;
+ }
+ last_device = st.st_dev;
+
+ width = ulong_log10(fsinfo.f_blocks);
+ if (width > physical_width)
+ physical_width = width;
+
+ numblocks = (st.st_size + blksize - 1) / blksize;
+ if (blocksize != 0)
+ blk_shift = ulong_log2(blocksize);
+ else
+ blk_shift = ulong_log2(blksize);
+
+ if (use_extent_cache)
+ width = 10;
+ else
+ width = ulong_log10(numblocks);
+ if (width > logical_width)
+ logical_width = width;
+ if (verbose) {
+ __u32 state;
+
+ printf("File size of %s is %llu (%llu block%s of %d bytes)",
+ filename, (unsigned long long) st.st_size,
+ (unsigned long long) (numblocks * blksize >> blk_shift),
+ numblocks == 1 ? "" : "s", 1 << blk_shift);
+ if (use_extent_cache &&
+ ioctl(fd, EXT4_IOC_GETSTATE, &state) == 0 &&
+ (state & EXT4_STATE_FLAG_EXT_PRECACHED))
+ fputs(" -- pre-cached", stdout);
+ fputc('\n', stdout);
+ }
+
+ if (!force_bmap) {
+ rc = filefrag_fiemap(fd, blk_shift, &num_extents, &st);
+ expected = 0;
+ if (rc < 0 &&
+ (use_extent_cache || precache_file || xattr_map)) {
+ if (rc != -EBADR)
+ fprintf(stderr, "%s: %s: %s\n ",
+ filename,
+ use_extent_cache ?
+ "EXT4_IOC_GET_ES_CACHE" :
+ "FS_IOC_FIEMAP", strerror(-rc));
+ goto out_close;
+ }
+ }
+
+ if (force_bmap || rc < 0) { /* FIEMAP failed, try FIBMAP instead */
+ expected = filefrag_fibmap(fd, blk_shift, &num_extents,
+ &st, numblocks, is_ext2);
+ if (expected < 0) {
+ if (expected == -EINVAL || expected == -ENOTTY) {
+ fprintf(stderr, "%s: FIBMAP%s unsupported\n",
+ filename, force_bmap ? "" : "/FIEMAP");
+ } else if (expected == -EPERM) {
+ fprintf(stderr,
+ "%s: FIBMAP requires root privileges\n",
+ filename);
+ } else {
+ fprintf(stderr, "%s: FIBMAP error: %s",
+ filename, strerror(expected));
+ }
+ rc = expected;
+ goto out_close;
+ } else {
+ rc = 0;
+ }
+ expected = expected / data_blocks_per_cyl + 1;
+ }
+
+ if (num_extents == 1)
+ printf("%s: 1 extent found", filename);
+ else
+ printf("%s: %d extents found", filename, num_extents);
+ /* count, and thus expected, only set for indirect FIBMAP'd files */
+ if (is_ext2 && expected && expected < num_extents)
+ printf(", perfection would be %d extent%s\n", expected,
+ (expected > 1) ? "s" : "");
+ else
+ fputc('\n', stdout);
+out_close:
+ close(fd);
+
+ return rc;
+}
+
+static void usage(const char *progname)
+{
+ fprintf(stderr, "Usage: %s [-b{blocksize}[KMG]] [-BeEksvxX] file ...\n",
+ progname);
+ exit(1);
+}
+
+int main(int argc, char**argv)
+{
+ char **cpp;
+ int rc = 0, c;
+ int version = 0;
+
+ while ((c = getopt(argc, argv, "Bb::eEkPsvVxX")) != EOF) {
+ switch (c) {
+ case 'B':
+ force_bmap++;
+ break;
+ case 'b':
+ if (optarg) {
+ char *end;
+ unsigned long val;
+
+ val = strtoul(optarg, &end, 0);
+ if (end) {
+#if __GNUC_PREREQ (7, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
+ switch (end[0]) {
+ case 'g':
+ case 'G':
+ val *= 1024;
+ /* fall through */
+ case 'm':
+ case 'M':
+ val *= 1024;
+ /* fall through */
+ case 'k':
+ case 'K':
+ val *= 1024;
+ break;
+ default:
+ break;
+ }
+#if __GNUC_PREREQ (7, 0)
+#pragma GCC diagnostic pop
+#endif
+ }
+ /* Specifying too large a blocksize will just
+ * shift all extents down to zero length. Even
+ * 1GB is questionable, but caveat emptor. */
+ if (val > 1024 * 1024 * 1024) {
+ fprintf(stderr,
+ "%s: blocksize %lu over 1GB\n",
+ argv[0], val);
+ usage(argv[0]);
+ }
+ blocksize = val;
+ } else { /* Allow -b without argument for compat. Remove
+ * this eventually so "-b {blocksize}" works */
+ fprintf(stderr, "%s: -b needs a blocksize "
+ "option, assuming 1024-byte blocks.\n",
+ argv[0]);
+ blocksize = 1024;
+ }
+ break;
+ case 'E':
+ use_extent_cache++;
+ /* fallthrough */
+ case 'e':
+ force_extent++;
+ if (!verbose)
+ verbose++;
+ break;
+ case 'k':
+ blocksize = 1024;
+ break;
+ case 'P':
+ precache_file++;
+ break;
+ case 's':
+ sync_file++;
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'V':
+ version++;
+ break;
+ case 'x':
+ xattr_map++;
+ break;
+ case 'X':
+ ext_fmt = hex_fmt;
+ break;
+ default:
+ usage(argv[0]);
+ break;
+ }
+ }
+ if (version) {
+ /* Print version number and exit */
+ printf("filefrag %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ if (version + verbose > 1) {
+ char flags[256] = "";
+
+ print_flags(0xffffffff, flags, sizeof(flags), 0);
+ printf("supported: %s\n", flags);
+ }
+ exit(0);
+ }
+
+ if (optind == argc)
+ usage(argv[0]);
+
+ for (cpp = argv + optind; *cpp != NULL; cpp++) {
+ int rc2 = frag_report(*cpp);
+
+ if (rc2 < 0 && rc == 0)
+ rc = rc2;
+ }
+
+ return -rc;
+}
+#endif
diff --git a/misc/findfs.8.in b/misc/findfs.8.in
new file mode 100644
index 0000000..00c33ab
--- /dev/null
+++ b/misc/findfs.8.in
@@ -0,0 +1,33 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH FINDFS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+findfs \- Find a file system by label or UUID
+.SH SYNOPSIS
+.B findfs
+.BI LABEL= label
+.sp
+.B findfs
+.BI UUID= uuid
+.SH DESCRIPTION
+.B findfs
+will search the disks in the system looking for a file system which has
+a label matching
+.I label
+or a UUID equal to
+.IR uuid .
+If the file system is found, the device name for the file system will
+be printed on stdout.
+.PP
+.SH AUTHOR
+.B findfs
+was written by Theodore Ts'o (tytso@mit.edu).
+.SH AVAILABILITY
+.B findfs
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR fsck (8)
+
diff --git a/misc/findsuper.c b/misc/findsuper.c
new file mode 100644
index 0000000..7e78c1f
--- /dev/null
+++ b/misc/findsuper.c
@@ -0,0 +1,269 @@
+/*
+ * findsuper --- quick hacked up program to find ext2 superblocks.
+ *
+ * This is a hack, and really shouldn't be installed anywhere. If you
+ * need a program which does this sort of functionality, please try
+ * using gpart program.
+ *
+ * Portions Copyright 1998-2000, Theodore Ts'o.
+ *
+ * Well, here's my linux version of findsuper.
+ * I'm sure you coulda done it faster. :)
+ * IMHO there isn't as much interesting data to print in the
+ * linux superblock as there is in the SunOS superblock--disk geometry is
+ * not there...and linux seems to update the dates in all the superblocks.
+ * SunOS doesn't ever touch the backup superblocks after the fs is created,
+ * as far as I can tell, so the date is more interesting IMHO and certainly
+ * marks which superblocks are backup ones.
+ *
+ * I wanted to add msdos support, but I couldn't make heads or tails
+ * of the kernel include files to find anything I could look for in msdos.
+ *
+ * Reading every block of a Sun partition is fairly quick. Doing the
+ * same under linux (slower hardware I suppose) just isn't the same.
+ * It might be more useful to default to reading the first (second?) block
+ * on each cyl; however, if the disk geometry is wrong, this is useless.
+ * But ya could still get the cyl size to print the numbers as cyls instead
+ * of blocks...
+ *
+ * run this as (for example)
+ * findsuper /dev/hda
+ * findsuper /dev/hda 437760 1024 (my disk has cyls of 855*512)
+ *
+ * I suppose the next step is to figure out a way to determine if
+ * the block found is the first superblock somehow, and if so, build
+ * a partition table from the superblocks found... but this is still
+ * useful as is.
+ *
+ * Steve
+ * ssd@nevets.oau.org
+ * ssd@mae.engr.ucf.edu
+ *
+ * Additional notes by Andreas Dilger <adilger@turbolinux.com>:
+ * - fixed to support > 2G devices by using lseek64
+ * - add reliability checking for the superblock to avoid random garbage
+ * - add adaptive progress meter
+ *
+ * It _should_ also handle signals and tell you the ending block, so
+ * that you can resume at a later time, but it doesn't yet...
+ *
+ * Note that gpart does not appear to find all superblocks that aren't aligned
+ * with the start of a possible partition, so it is not useful in systems
+ * with LVM or similar setups which don't use fat partition alignment.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/*
+ * Documentation addendum added by Andreas dwguest@win.tue.nl/aeb@cwi.nl
+ *
+ * The program findsuper is a utility that scans a disk and finds
+ * copies of ext2 superblocks (by checking for the ext2 signature).
+ *
+ * For each superblock found, it prints the offset in bytes, the
+ * offset in 1024-byte blocks, the size of the ext2 partition in fs
+ * blocks, the filesystem blocksize (in bytes), the block group number
+ * (always 0 for older ext2 systems), and a timestamp (s_mtime).
+ *
+ * This program can be used to retrieve partitions that have been
+ * lost. The superblock for block group 0 is found 1 block (2
+ * sectors) after the partition start.
+ *
+ * For new systems that have a block group number in the superblock it
+ * is immediately clear which superblock is the first of a partition.
+ * For old systems where no group numbers are given, the first
+ * superblock can be recognized by the timestamp: all superblock
+ * copies have the creation time in s_mtime, except the first, which
+ * has the last time e2fsck or tune2fs wrote to the filesystem.
+ *
+ */
+
+#define _FILE_OFFSET_BITS 64
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <time.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "support/nls-enable.h"
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define WHY(fmt, arg...) { printf("\r%Ld: " fmt, sk, ##arg) ; continue; }
+#else
+#define WHY(fmt, arg...) { continue; }
+#endif
+
+static void usage(void)
+{
+ fprintf(stderr,
+ _("Usage: findsuper device [skipbytes [startkb]]\n"));
+ exit(1);
+}
+
+
+int main(int argc, char *argv[])
+{
+ int skiprate=512; /* one sector */
+ ext2_loff_t sk=0, skl=0;
+ int fd;
+ char *s;
+ time_t tm, last = time(0);
+ ext2_loff_t interval = 1024 * 1024;
+ int c, print_jnl_copies = 0;
+ const char * device_name;
+ struct ext2_super_block ext2;
+ /* interesting fields: EXT2_SUPER_MAGIC
+ * s_blocks_count s_log_block_size s_mtime s_magic s_lastcheck */
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+
+ while ((c = getopt (argc, argv, "j")) != EOF) {
+ switch (c) {
+ case 'j':
+ print_jnl_copies++;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ if (optind == argc)
+ usage();
+
+ device_name = argv[optind++];
+
+ if (optind < argc) {
+ skiprate = strtol(argv[optind], &s, 0);
+ if (s == argv[optind]) {
+ fprintf(stderr,_("skipbytes should be a number, not %s\n"), s);
+ exit(1);
+ }
+ optind++;
+ }
+ if (skiprate & 0x1ff) {
+ fprintf(stderr,
+ _("skipbytes must be a multiple of the sector size\n"));
+ exit(2);
+ }
+ if (optind < argc) {
+ sk = skl = strtoll(argv[optind], &s, 0) << 10;
+ if (s == argv[optind]) {
+ fprintf(stderr,
+ _("startkb should be a number, not %s\n"), s);
+ exit(1);
+ }
+ optind++;
+ }
+ if (sk < 0) {
+ fprintf(stderr, _("startkb should be positive, not %llu\n"),sk);
+ exit(1);
+ }
+
+ fd = open(device_name, O_RDONLY);
+ if (fd < 0) {
+ perror(device_name);
+ exit(1);
+ }
+
+ /* Now, go looking for the superblock! */
+ printf(_("starting at %llu, with %u byte increments\n"), sk, skiprate);
+ if (print_jnl_copies)
+ printf(_("[*] probably superblock written in the ext3 "
+ "journal superblock,\n\tso start/end/grp wrong\n"));
+ printf(_("byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"));
+ for (; lseek64(fd, sk, SEEK_SET) != -1 &&
+ read(fd, &ext2, 512) == 512; sk += skiprate) {
+ static unsigned char last_uuid[16] = "blah";
+ unsigned long long bsize, grpsize;
+ int jnl_copy, sb_offset;
+
+ if (sk && !(sk & (interval - 1))) {
+ time_t now, diff;
+
+ now = time(0);
+ diff = now - last;
+
+ if (diff > 0) {
+ s = ctime(&now);
+ s[24] = 0;
+ printf("\r%11Lu: %8LukB/s @ %s", sk,
+ (((sk - skl)) / diff) >> 10, s);
+ fflush(stdout);
+ }
+ if (diff < 5)
+ interval <<= 1;
+ else if (diff > 20)
+ interval >>= 1;
+ last = now;
+ skl = sk;
+ }
+ if (ext2.s_magic != EXT2_SUPER_MAGIC)
+ continue;
+ if (ext2.s_log_block_size > 6)
+ WHY("log block size > 6 (%u)\n", ext2.s_log_block_size);
+ if (ext2fs_r_blocks_count(&ext2) > ext2fs_blocks_count(&ext2))
+ WHY("r_blocks_count > blocks_count (%u > %u)\n",
+ ext2fs_r_blocks_count(&ext2),
+ ext2fs_blocks_count(&ext2));
+ if (ext2fs_free_blocks_count(&ext2) > ext2fs_blocks_count(&ext2))
+ WHY("free_blocks_count > blocks_count\n (%u > %u)\n",
+ ext2fs_free_blocks_count(&ext2),
+ ext2fs_blocks_count(&ext2));
+ if (ext2.s_free_inodes_count > ext2.s_inodes_count)
+ WHY("free_inodes_count > inodes_count (%u > %u)\n",
+ ext2.s_free_inodes_count, ext2.s_inodes_count);
+
+ if (ext2.s_mkfs_time != 0)
+ tm = ext2.s_mkfs_time;
+ else
+ tm = ext2.s_mtime;
+ s = ctime(&tm);
+ s[24] = 0;
+ bsize = 1 << (ext2.s_log_block_size + 10);
+ grpsize = bsize * ext2.s_blocks_per_group;
+ if (memcmp(ext2.s_uuid, last_uuid, sizeof(last_uuid)) == 0 &&
+ ext2.s_rev_level > 0 && ext2.s_block_group_nr == 0) {
+ jnl_copy = 1;
+ } else {
+ jnl_copy = 0;
+ memcpy(last_uuid, ext2.s_uuid, sizeof(last_uuid));
+ }
+ if (ext2.s_block_group_nr == 0 || bsize == 1024)
+ sb_offset = 1024;
+ else
+ sb_offset = 0;
+ if (jnl_copy && !print_jnl_copies)
+ continue;
+ printf("\r%11Lu %11Lu%s %11Lu%s %9u %5Lu %4u%s %s %02x%02x%02x%02x %.*s\n",
+ sk, sk - ext2.s_block_group_nr * grpsize - sb_offset,
+ jnl_copy ? "*":" ",
+ sk + ext2fs_blocks_count(&ext2) * bsize -
+ ext2.s_block_group_nr * grpsize - sb_offset,
+ jnl_copy ? "*" : " ", ext2fs_blocks_count(&ext2), bsize,
+ ext2.s_block_group_nr, jnl_copy ? "*" : " ", s,
+ ext2.s_uuid[0], ext2.s_uuid[1],
+ ext2.s_uuid[2], ext2.s_uuid[3],
+ EXT2_LEN_STR(ext2.s_volume_name));
+ }
+ printf(_("\n%11Lu: finished with errno %d\n"), sk, errno);
+ close(fd);
+
+ return errno;
+}
diff --git a/misc/fsck.8.in b/misc/fsck.8.in
new file mode 100644
index 0000000..c1890df
--- /dev/null
+++ b/misc/fsck.8.in
@@ -0,0 +1,414 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+fsck \- check and repair a Linux file system
+.SH SYNOPSIS
+.B fsck
+[
+.B \-sAVRTMNP
+]
+[
+.B \-C
+[
+.I fd
+]
+]
+[
+.B \-t
+.I fstype
+]
+.I [filesys ... ]
+[\-\-] [
+.B fs-specific-options
+]
+.SH DESCRIPTION
+.B fsck
+is used to check and optionally repair one or more Linux file systems.
+.I filesys
+can be a device name (e.g.
+.IR /dev/hdc1 ", " /dev/sdb2 ),
+a mount point (e.g.
+.IR / ", " /usr ", " /home ),
+or an ext2 label or UUID specifier (e.g.
+UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).
+Normally, the
+.B fsck
+program will try to handle file systems on different physical disk drives
+in parallel to reduce the total amount of time needed to check all of the
+file systems.
+.PP
+If no file systems are specified on the command line, and the
+.B \-A
+option is not specified,
+.B fsck
+will default to checking file systems in
+.B /etc/fstab
+serially. This is equivalent to the
+.B \-As
+options.
+.PP
+The exit code returned by
+.B fsck
+is the sum of the following conditions:
+.br
+\ 0\ \-\ No errors
+.br
+\ 1\ \-\ File system errors corrected
+.br
+\ 2\ \-\ System should be rebooted
+.br
+\ 4\ \-\ File system errors left uncorrected
+.br
+\ 8\ \-\ Operational error
+.br
+\ 16\ \-\ Usage or syntax error
+.br
+\ 32\ \-\ Fsck canceled by user request
+.br
+\ 128\ \-\ Shared library error
+.br
+The exit code returned when multiple file systems are checked
+is the bit-wise OR of the exit codes for each
+file system that is checked.
+.PP
+In actuality,
+.B fsck
+is simply a front-end for the various file system checkers
+(\fBfsck\fR.\fIfstype\fR) available under Linux. The file
+system-specific checker is searched for in
+.I /sbin
+first, then in
+.I /etc/fs
+and
+.IR /etc ,
+and finally in the directories listed in the PATH environment
+variable. Please see the file system-specific checker manual pages for
+further details.
+.SH OPTIONS
+.TP
+.B \-s
+Serialize
+.B fsck
+operations. This is a good idea if you are checking multiple
+file systems and the checkers are in an interactive mode. (Note:
+.BR e2fsck (8)
+runs in an interactive mode by default. To make
+.BR e2fsck (8)
+run in a non-interactive mode, you must either specify the
+.B \-p
+or
+.B \-a
+option, if you wish for errors to be corrected automatically, or the
+.B \-n
+option if you do not.)
+.TP
+.BI \-t " fslist"
+Specifies the type(s) of file system to be checked. When the
+.B \-A
+flag is specified, only file systems that match
+.I fslist
+are checked. The
+.I fslist
+parameter is a comma-separated list of file systems and options
+specifiers. All of the file systems in this comma-separated list may be
+prefixed by a negation operator
+.RB ' no '
+or
+.RB ' ! ',
+which requests that only those file systems not listed in
+.I fslist
+will be checked. If all of the file systems in
+.I fslist
+are not prefixed by a negation operator, then only those file systems
+listed
+in
+.I fslist
+will be checked.
+.sp
+Options specifiers may be included in the comma-separated
+.IR fslist .
+They must have the format
+.BI opts= fs-option\fR.
+If an options specifier is present, then only file systems which contain
+.I fs-option
+in their mount options field of
+.B /etc/fstab
+will be checked. If the options specifier is prefixed by a negation
+operator, then only
+those file systems that do not have
+.I fs-option
+in their mount options field of
+.B /etc/fstab
+will be checked.
+.sp
+For example, if
+.B opts=ro
+appears in
+.IR fslist ,
+then only file systems listed in
+.B /etc/fstab
+with the
+.B ro
+option will be checked.
+.sp
+For compatibility with Mandrake distributions whose boot scripts
+depend upon an unauthorized UI change to the
+.B fsck
+program, if a file system type of
+.B loop
+is found in
+.IR fslist ,
+it is treated as if
+.B opts=loop
+were specified as an argument to the
+.B \-t
+option.
+.sp
+Normally, the file system type is deduced by searching for
+.I filesys
+in the
+.I /etc/fstab
+file and using the corresponding entry.
+If the type can not be deduced, and there is only a single file system
+given as an argument to the
+.B \-t
+option,
+.B fsck
+will use the specified file system type. If this type is not
+available, then the default file system type (currently ext2) is used.
+.TP
+.B \-A
+Walk through the
+.I /etc/fstab
+file and try to check all file systems in one run. This option is
+typically used from the
+.I /etc/rc
+system initialization file, instead of multiple commands for checking
+a single file system.
+.sp
+The root file system will be checked first unless the
+.B \-P
+option is specified (see below). After that,
+file systems will be checked in the order specified by the
+.I fs_passno
+(the sixth) field in the
+.I /etc/fstab
+file.
+File Systems with a
+.I fs_passno
+value of 0 are skipped and are not checked at all. File Systems with a
+.I fs_passno
+value of greater than zero will be checked in order,
+with file systems with the lowest
+.I fs_passno
+number being checked first.
+If there are multiple file systems with the same pass number,
+fsck will attempt to check them in parallel, although it will avoid running
+multiple file system checks on the same physical disk.
+.sp
+Hence, a very common configuration in
+.I /etc/fstab
+files is to set the root file system to have a
+.I fs_passno
+value of 1
+and to set all other file systems to have a
+.I fs_passno
+value of 2. This will allow
+.B fsck
+to automatically run file system checkers in parallel if it is advantageous
+to do so. System administrators might choose
+not to use this configuration if they need to avoid multiple file system
+checks running in parallel for some reason --- for example, if the
+machine in question is short on memory so that
+excessive paging is a concern.
+.TP
+.B \-C\fR [ \fI "fd" \fR ]
+Display completion/progress bars for those file system checkers (currently
+only for ext2 and ext3) which support them. Fsck will manage the
+file system checkers so that only one of them will display
+a progress bar at a time. GUI front-ends may specify a file descriptor
+.IR fd ,
+in which case the progress bar information will be sent to that file descriptor.
+.TP
+.B \-M
+Do not check mounted file systems and return an exit code of 0
+for mounted file systems.
+.TP
+.B \-N
+Don't execute, just show what would be done.
+.TP
+.B \-P
+When the
+.B \-A
+flag is set, check the root file system in parallel with the other file systems.
+This is not the safest thing in the world to do,
+since if the root file system is in doubt things like the
+.BR e2fsck (8)
+executable might be corrupted! This option is mainly provided
+for those sysadmins who don't want to repartition the root
+file system to be small and compact (which is really the right solution).
+.TP
+.B \-R
+When checking all file systems with the
+.B \-A
+flag, skip the root file system (in case it's already mounted read-write).
+.TP
+.B \-T
+Don't show the title on startup.
+.TP
+.B \-V
+Produce verbose output, including all file system-specific commands
+that are executed.
+.TP
+.B fs-specific-options
+Options which are not understood by
+.B fsck
+are passed to the file system-specific checker. These arguments
+.B must
+not take arguments, as there is no
+way for
+.B fsck
+to be able to properly guess which arguments take options and which
+don't.
+.IP
+Options and arguments which follow the
+.B \-\-
+are treated as file system-specific options to be passed to the
+file system-specific checker.
+.IP
+Please note that fsck is not
+designed to pass arbitrarily complicated options to file system-specific
+checkers. If you're doing something complicated, please just
+execute the file system-specific checker directly. If you pass
+.B fsck
+some horribly complicated option and arguments, and it doesn't do
+what you expect,
+.B don't bother reporting it as a bug.
+You're almost certainly doing something that you shouldn't be doing
+with
+.BR fsck.
+.PP
+Options to different file system-specific fsck's are not standardized.
+If in doubt, please consult the man pages of the file system-specific
+checker. Although not guaranteed, the following options are supported
+by most file system checkers:
+.TP
+.B \-a
+Automatically repair the file system without any questions (use
+this option with caution). Note that
+.BR e2fsck (8)
+supports
+.B \-a
+for backwards compatibility only. This option is mapped to
+.BR e2fsck 's
+.B \-p
+option which is safe to use, unlike the
+.B \-a
+option that some file system checkers support.
+.TP
+.B \-n
+For some file system-specific checkers, the
+.B \-n
+option will cause the fs-specific fsck to avoid attempting to repair any
+problems, but simply report such problems to stdout. This is however
+not true for all file system-specific checkers. In particular,
+.BR fsck.reiserfs (8)
+will not report any corruption if given this option.
+.BR fsck.minix (8)
+does not support the
+.B \-n
+option at all.
+.TP
+.B \-r
+Interactively repair the file system (ask for confirmations). Note: It
+is generally a bad idea to use this option if multiple fsck's are being
+run in parallel. Also note that this is
+.BR e2fsck 's
+default behavior; it supports this option for backwards compatibility
+reasons only.
+.TP
+.B \-y
+For some file system-specific checkers, the
+.B \-y
+option will cause the fs-specific fsck to always attempt to fix any
+detected file system corruption automatically. Sometimes an expert may
+be able to do better driving the fsck manually. Note that
+.B not
+all file system-specific checkers implement this option. In particular
+.BR fsck.minix (8)
+and
+.BR fsck.cramfs (8)
+does not support the
+.B -y
+option as of this writing.
+.SH AUTHOR
+Theodore Ts'o (tytso@mit.edu)
+.SH FILES
+.IR /etc/fstab .
+.SH ENVIRONMENT VARIABLES
+The
+.B fsck
+program's behavior is affected by the following environment variables:
+.TP
+.B FSCK_FORCE_ALL_PARALLEL
+If this environment variable is set,
+.B fsck
+will attempt to run all of the specified file systems in parallel,
+regardless of whether the file systems appear to be on the same
+device. (This is useful for RAID systems or high-end storage systems
+such as those sold by companies such as IBM or EMC.)
+.TP
+.B FSCK_MAX_INST
+This environment variable will limit the maximum number of file system
+checkers that can be running at one time. This allows configurations
+which have a large number of disks to avoid
+.B fsck
+starting too many file system checkers at once, which might overload
+CPU and memory resources available on the system. If this value is
+zero, then an unlimited number of processes can be spawned. This is
+currently the default, but future versions of
+.B fsck
+may attempt to automatically determine how many file system checks can
+be run based on gathering accounting data from the operating system.
+.TP
+.B PATH
+The
+.B PATH
+environment variable is used to find file system checkers. A set of
+system directories are searched first:
+.BR /sbin ,
+.BR /sbin/fs.d ,
+.BR /sbin/fs ,
+.BR /etc/fs ,
+and
+.BR /etc .
+Then the set of directories found in the
+.B PATH
+environment are searched.
+.TP
+.B FSTAB_FILE
+This environment variable allows the system administrator
+to override the standard location of the
+.B /etc/fstab
+file. It is also useful for developers who are testing
+.BR fsck .
+.SH SEE ALSO
+.BR fstab (5),
+.BR mkfs (8),
+.BR fsck.ext2 (8)
+or
+.BR fsck.ext3 (8)
+or
+.BR e2fsck (8),
+.BR cramfsck (8),
+.BR fsck.minix (8),
+.BR fsck.msdos (8),
+.BR fsck.jfs (8),
+.BR fsck.nfs (8),
+.BR fsck.vfat (8),
+.BR fsck.xfs (8),
+.BR fsck.xiafs (8),
+.BR reiserfsck (8).
diff --git a/misc/fsck.c b/misc/fsck.c
new file mode 100644
index 0000000..1769a10
--- /dev/null
+++ b/misc/fsck.c
@@ -0,0 +1,1353 @@
+/*
+ * pfsck --- A generic, parallelizing front-end for the fsck program.
+ * It will automatically try to run fsck programs in parallel if the
+ * devices are on separate spindles. It is based on the same ideas as
+ * the generic front end for fsck by David Engel and Fred van Kempen,
+ * but it has been completely rewritten from scratch to support
+ * parallel execution.
+ *
+ * Written by Theodore Ts'o, <tytso@mit.edu>
+ *
+ * Miquel van Smoorenburg (miquels@drinkel.ow.org) 20-Oct-1994:
+ * o Changed -t fstype to behave like with mount when -A (all file
+ * systems) or -M (like mount) is specified.
+ * o fsck looks if it can find the fsck.type program to decide
+ * if it should ignore the fs type. This way more fsck programs
+ * can be added without changing this front-end.
+ * o -R flag skip root file system.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ * 2001, 2002, 2003, 2004, 2005 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
+
+#include "config.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <limits.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_PATHS_H
+#include <paths.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#include "../version.h"
+#include "support/devname.h"
+#include "support/nls-enable.h"
+#include "fsck.h"
+#include "blkid/blkid.h"
+
+#ifndef _PATH_MNTTAB
+#define _PATH_MNTTAB "/etc/fstab"
+#endif
+
+static const char *ignored_types[] = {
+ "ignore",
+ "iso9660",
+ "nfs",
+ "proc",
+ "sw",
+ "swap",
+ "tmpfs",
+ "devpts",
+ NULL
+};
+
+static const char *really_wanted[] = {
+ "minix",
+ "ext2",
+ "ext3",
+ "ext4",
+ "ext4dev",
+ "jfs",
+ "reiserfs",
+ "xiafs",
+ "xfs",
+ NULL
+};
+
+#define BASE_MD "/dev/md"
+
+/*
+ * Global variables for options
+ */
+static char *devices[MAX_DEVICES];
+static char *args[MAX_ARGS];
+static int num_devices, num_args;
+
+static int verbose = 0;
+static int doall = 0;
+static int noexecute = 0;
+static int serialize = 0;
+static int skip_root = 0;
+static int ignore_mounted = 0;
+static int notitle = 0;
+static int parallel_root = 0;
+static int progress = 0;
+static int progress_fd = 0;
+static int force_all_parallel = 0;
+static int num_running = 0;
+static int max_running = 0;
+static volatile int cancel_requested = 0;
+static int kill_sent = 0;
+static char *progname;
+static char *fstype = NULL;
+static struct fs_info *filesys_info = NULL, *filesys_last = NULL;
+static struct fsck_instance *instance_list;
+static const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
+static char *fsck_path = 0;
+static blkid_cache cache = NULL;
+
+static char *string_copy(const char *s)
+{
+ char *ret;
+
+ if (!s)
+ return 0;
+ ret = malloc(strlen(s)+1);
+ if (ret)
+ strcpy(ret, s);
+ return ret;
+}
+
+static int string_to_int(const char *s)
+{
+ long l;
+ char *p;
+
+ l = strtol(s, &p, 0);
+ if (*p || l == LONG_MIN || l == LONG_MAX || l < 0 || l > INT_MAX)
+ return -1;
+ else
+ return (int) l;
+}
+
+static int ignore(struct fs_info *);
+
+static char *skip_over_blank(char *cp)
+{
+ while (*cp && isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *skip_over_word(char *cp)
+{
+ while (*cp && !isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static void strip_line(char *line)
+{
+ char *p;
+
+ while (*line) {
+ p = line + strlen(line) - 1;
+ if ((*p == '\n') || (*p == '\r'))
+ *p = 0;
+ else
+ break;
+ }
+}
+
+static char *parse_word(char **buf)
+{
+ char *word, *next;
+
+ word = *buf;
+ if (*word == 0)
+ return 0;
+
+ word = skip_over_blank(word);
+ next = skip_over_word(word);
+ if (*next)
+ *next++ = 0;
+ *buf = next;
+ return word;
+}
+
+static void parse_escape(char *word)
+{
+ char *p, *q;
+ int ac, i;
+
+ if (!word)
+ return;
+
+ for (p = word, q = word; *p; p++, q++) {
+ *q = *p;
+ if (*p != '\\')
+ continue;
+ if (*++p == 0)
+ break;
+ if (*p == 't') {
+ *q = '\t';
+ continue;
+ }
+ if (*p == 'n') {
+ *q = '\n';
+ continue;
+ }
+ if (!isdigit(*p)) {
+ *q = *p;
+ continue;
+ }
+ ac = 0;
+ for (i = 0; i < 3; i++, p++) {
+ if (!isdigit(*p))
+ break;
+ ac = (ac * 8) + (*p - '0');
+ }
+ *q = ac;
+ p--;
+ }
+ *q = 0;
+}
+
+static void free_instance(struct fsck_instance *i)
+{
+ free(i->prog);
+ free(i->device);
+ free(i->base_device);
+ free(i);
+ return;
+}
+
+static struct fs_info *create_fs_device(const char *device, const char *mntpnt,
+ const char *type, const char *opts,
+ int freq, int passno)
+{
+ struct fs_info *fs;
+
+ if (!(fs = malloc(sizeof(struct fs_info))))
+ return NULL;
+
+ fs->device = string_copy(device);
+ fs->mountpt = string_copy(mntpnt);
+ fs->type = string_copy(type);
+ fs->opts = string_copy(opts ? opts : "");
+ fs->freq = freq;
+ fs->passno = passno;
+ fs->flags = 0;
+ fs->next = NULL;
+
+ if (!filesys_info)
+ filesys_info = fs;
+ else
+ filesys_last->next = fs;
+ filesys_last = fs;
+
+ return fs;
+}
+
+
+
+static int parse_fstab_line(char *line, struct fs_info **ret_fs)
+{
+ char *dev, *device, *mntpnt, *type, *opts, *freq, *passno, *cp;
+ struct fs_info *fs;
+
+ *ret_fs = 0;
+ strip_line(line);
+ cp = line;
+
+ device = parse_word(&cp);
+ if (!device || *device == '#')
+ return 0; /* Ignore blank lines and comments */
+ mntpnt = parse_word(&cp);
+ type = parse_word(&cp);
+ opts = parse_word(&cp);
+ freq = parse_word(&cp);
+ passno = parse_word(&cp);
+
+ if (!mntpnt || !type)
+ return -1;
+
+ parse_escape(device);
+ parse_escape(mntpnt);
+ parse_escape(type);
+ parse_escape(opts);
+ parse_escape(freq);
+ parse_escape(passno);
+
+ dev = get_devname(cache, device, NULL);
+ if (dev)
+ device = dev;
+
+ if (strchr(type, ','))
+ type = 0;
+
+ fs = create_fs_device(device, mntpnt, type ? type : "auto", opts,
+ freq ? atoi(freq) : -1,
+ passno ? atoi(passno) : -1);
+ free(dev);
+
+ if (!fs)
+ return -1;
+ *ret_fs = fs;
+ return 0;
+}
+
+static void interpret_type(struct fs_info *fs)
+{
+ char *t;
+
+ if (strcmp(fs->type, "auto") != 0)
+ return;
+ t = blkid_get_tag_value(cache, "TYPE", fs->device);
+ if (t) {
+ free(fs->type);
+ fs->type = t;
+ }
+}
+
+/*
+ * Load the filesystem database from /etc/fstab
+ */
+static void load_fs_info(const char *filename)
+{
+ FILE *f;
+ char buf[1024];
+ int lineno = 0;
+ int old_fstab = 1;
+ struct fs_info *fs;
+
+ if ((f = fopen(filename, "r")) == NULL) {
+ fprintf(stderr, _("WARNING: couldn't open %s: %s\n"),
+ filename, strerror(errno));
+ return;
+ }
+ while (!feof(f)) {
+ lineno++;
+ if (!fgets(buf, sizeof(buf), f))
+ break;
+ buf[sizeof(buf)-1] = 0;
+ if (parse_fstab_line(buf, &fs) < 0) {
+ fprintf(stderr, _("WARNING: bad format "
+ "on line %d of %s\n"), lineno, filename);
+ continue;
+ }
+ if (!fs)
+ continue;
+ if (fs->passno < 0)
+ fs->passno = 0;
+ else
+ old_fstab = 0;
+ }
+
+ fclose(f);
+
+ if (old_fstab && filesys_info) {
+ fputs("\007\007\007", stderr);
+ fputs(_(
+ "WARNING: Your /etc/fstab does not contain the fsck passno\n"
+ " field. I will kludge around things for you, but you\n"
+ " should fix your /etc/fstab file as soon as you can.\n\n"), stderr);
+
+ for (fs = filesys_info; fs; fs = fs->next) {
+ fs->passno = 1;
+ }
+ }
+}
+
+/* Lookup filesys in /etc/fstab and return the corresponding entry. */
+static struct fs_info *lookup(char *filesys)
+{
+ struct fs_info *fs;
+
+ /* No filesys name given. */
+ if (filesys == NULL)
+ return NULL;
+
+ for (fs = filesys_info; fs; fs = fs->next) {
+ if (!strcmp(filesys, fs->device) ||
+ (fs->mountpt && !strcmp(filesys, fs->mountpt)))
+ break;
+ }
+
+ return fs;
+}
+
+/* Find fsck program for a given fs type. */
+static char *find_fsck(char *type)
+{
+ char *s;
+ const char *tpl;
+ static char prog[256];
+ char *p = string_copy(fsck_path);
+ struct stat st;
+
+ /* Are we looking for a program or just a type? */
+ tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s");
+
+ for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) {
+ int len = snprintf(prog, sizeof(prog), tpl, s, type);
+
+ if ((len < 0) || (len >= (int) sizeof(prog)))
+ continue;
+ if (stat(prog, &st) == 0)
+ break;
+ }
+ free(p);
+ return(s ? prog : NULL);
+}
+
+static int progress_active(NOARGS)
+{
+ struct fsck_instance *inst;
+
+ for (inst = instance_list; inst; inst = inst->next) {
+ if (inst->flags & FLAG_DONE)
+ continue;
+ if (inst->flags & FLAG_PROGRESS)
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Execute a particular fsck program, and link it into the list of
+ * child processes we are waiting for.
+ */
+static int execute(const char *type, const char *device, const char *mntpt,
+ int interactive)
+{
+ char *s, *argv[80], prog[256];
+ int argc, i, len;
+ struct fsck_instance *inst, *p;
+ pid_t pid;
+
+ len = snprintf(prog, sizeof(prog), "fsck.%s", type);
+ if ((len < 0) || (len >= (int) sizeof(prog)))
+ return EINVAL;
+
+ inst = malloc(sizeof(struct fsck_instance));
+ if (!inst)
+ return ENOMEM;
+ memset(inst, 0, sizeof(struct fsck_instance));
+
+ argv[0] = string_copy(prog);
+ argc = 1;
+
+ for (i=0; i <num_args; i++)
+ argv[argc++] = string_copy(args[i]);
+
+ if (progress) {
+ if ((strcmp(type, "ext2") == 0) ||
+ (strcmp(type, "ext3") == 0) ||
+ (strcmp(type, "ext4") == 0) ||
+ (strcmp(type, "ext4dev") == 0)) {
+ char tmp[80];
+
+ tmp[0] = 0;
+ if (!progress_active()) {
+ snprintf(tmp, 80, "-C%d", progress_fd);
+ inst->flags |= FLAG_PROGRESS;
+ } else if (progress_fd)
+ snprintf(tmp, 80, "-C%d", progress_fd * -1);
+ if (tmp[0])
+ argv[argc++] = string_copy(tmp);
+ }
+ }
+
+ argv[argc++] = string_copy(device);
+ argv[argc] = 0;
+
+ s = find_fsck(prog);
+ if (s == NULL) {
+ fprintf(stderr, _("fsck: %s: not found\n"), prog);
+ free(inst);
+ return ENOENT;
+ }
+
+ if (verbose || noexecute) {
+ printf("[%s (%d) -- %s] ", s, num_running,
+ mntpt ? mntpt : device);
+ for (i=0; i < argc; i++)
+ printf("%s ", argv[i]);
+ printf("\n");
+ }
+
+ /* Fork and execute the correct program. */
+ if (noexecute)
+ pid = -1;
+ else if ((pid = fork()) < 0) {
+ perror("fork");
+ free(inst);
+ return errno;
+ } else if (pid == 0) {
+ if (!interactive)
+ close(0);
+ (void) execv(s, argv);
+ perror(argv[0]);
+ free(inst);
+ exit(EXIT_ERROR);
+ }
+
+ for (i=0; i < argc; i++)
+ free(argv[i]);
+
+ inst->pid = pid;
+ inst->prog = string_copy(prog);
+ inst->type = string_copy(type);
+ inst->device = string_copy(device);
+ inst->base_device = base_device(device);
+ inst->start_time = time(0);
+ inst->next = NULL;
+
+ /*
+ * Find the end of the list, so we add the instance on at the end.
+ */
+ for (p = instance_list; p && p->next; p = p->next);
+
+ if (p)
+ p->next = inst;
+ else
+ instance_list = inst;
+
+ return 0;
+}
+
+/*
+ * Send a signal to all outstanding fsck child processes
+ */
+static int kill_all(int signum)
+{
+ struct fsck_instance *inst;
+ int n = 0;
+
+ for (inst = instance_list; inst; inst = inst->next) {
+ if (inst->flags & FLAG_DONE)
+ continue;
+ if (inst->pid <= 0)
+ continue;
+ kill(inst->pid, signum);
+ n++;
+ }
+ return n;
+}
+
+/*
+ * Wait for one child process to exit; when it does, unlink it from
+ * the list of executing child processes, and return it.
+ */
+static struct fsck_instance *wait_one(int flags)
+{
+ int status;
+ int sig;
+ struct fsck_instance *inst, *inst2, *prev;
+ pid_t pid;
+
+ if (!instance_list)
+ return NULL;
+
+ if (noexecute) {
+ inst = instance_list;
+ prev = 0;
+#ifdef RANDOM_DEBUG
+ while (inst->next && (random() & 1)) {
+ prev = inst;
+ inst = inst->next;
+ }
+#endif
+ inst->exit_status = 0;
+ goto ret_inst;
+ }
+
+ /*
+ * gcc -Wall fails saving throw against stupidity
+ * (inst and prev are thought to be uninitialized variables)
+ */
+ inst = prev = NULL;
+
+ do {
+ pid = waitpid(-1, &status, flags);
+ if (cancel_requested && !kill_sent) {
+ kill_all(SIGTERM);
+ kill_sent++;
+ }
+ if ((pid == 0) && (flags & WNOHANG))
+ return NULL;
+ if (pid < 0) {
+ if ((errno == EINTR) || (errno == EAGAIN))
+ continue;
+ if (errno == ECHILD) {
+ fprintf(stderr,
+ _("%s: wait: No more child process?!?\n"),
+ progname);
+ return NULL;
+ }
+ perror("wait");
+ continue;
+ }
+ for (prev = 0, inst = instance_list;
+ inst;
+ prev = inst, inst = inst->next) {
+ if (inst->pid == pid)
+ break;
+ }
+ } while (!inst);
+
+ if (WIFEXITED(status))
+ status = WEXITSTATUS(status);
+ else if (WIFSIGNALED(status)) {
+ sig = WTERMSIG(status);
+ if (sig == SIGINT) {
+ status = EXIT_UNCORRECTED;
+ } else {
+ printf(_("Warning... %s for device %s exited "
+ "with signal %d.\n"),
+ inst->prog, inst->device, sig);
+ status = EXIT_ERROR;
+ }
+ } else {
+ printf(_("%s %s: status is %x, should never happen.\n"),
+ inst->prog, inst->device, status);
+ status = EXIT_ERROR;
+ }
+ inst->exit_status = status;
+ inst->flags |= FLAG_DONE;
+ if (progress && (inst->flags & FLAG_PROGRESS) &&
+ !progress_active()) {
+ for (inst2 = instance_list; inst2; inst2 = inst2->next) {
+ if (inst2->flags & FLAG_DONE)
+ continue;
+ if (strcmp(inst2->type, "ext2") &&
+ strcmp(inst2->type, "ext3") &&
+ strcmp(inst2->type, "ext4") &&
+ strcmp(inst2->type, "ext4dev"))
+ continue;
+ /*
+ * If we've just started the fsck, wait a tiny
+ * bit before sending the kill, to give it
+ * time to set up the signal handler
+ */
+ if (inst2->start_time < time(0)+2) {
+ if (fork() == 0) {
+ sleep(1);
+ kill(inst2->pid, SIGUSR1);
+ exit(0);
+ }
+ } else
+ kill(inst2->pid, SIGUSR1);
+ inst2->flags |= FLAG_PROGRESS;
+ break;
+ }
+ }
+ret_inst:
+ if (prev)
+ prev->next = inst->next;
+ else
+ instance_list = inst->next;
+ if (verbose > 1)
+ printf(_("Finished with %s (exit status %d)\n"),
+ inst->device, inst->exit_status);
+ num_running--;
+ return inst;
+}
+
+#define FLAG_WAIT_ALL 0
+#define FLAG_WAIT_ATLEAST_ONE 1
+/*
+ * Wait until all executing child processes have exited; return the
+ * logical OR of all of their exit code values.
+ */
+static int wait_many(int flags)
+{
+ struct fsck_instance *inst;
+ int global_status = 0;
+ int wait_flags = 0;
+
+ while ((inst = wait_one(wait_flags))) {
+ global_status |= inst->exit_status;
+ free_instance(inst);
+#ifdef RANDOM_DEBUG
+ if (noexecute && (flags & WNOHANG) && !(random() % 3))
+ break;
+#endif
+ if (flags & FLAG_WAIT_ATLEAST_ONE)
+ wait_flags = WNOHANG;
+ }
+ return global_status;
+}
+
+/*
+ * Run the fsck program on a particular device
+ *
+ * If the type is specified using -t, and it isn't prefixed with "no"
+ * (as in "noext2") and only one filesystem type is specified, then
+ * use that type regardless of what is specified in /etc/fstab.
+ *
+ * If the type isn't specified by the user, then use either the type
+ * specified in /etc/fstab, or DEFAULT_FSTYPE.
+ */
+static void fsck_device(struct fs_info *fs, int interactive)
+{
+ const char *type;
+ int retval;
+
+ interpret_type(fs);
+
+ if (strcmp(fs->type, "auto") != 0)
+ type = fs->type;
+ else if (fstype && strncmp(fstype, "no", 2) &&
+ strncmp(fstype, "opts=", 5) && strncmp(fstype, "loop", 4) &&
+ !strchr(fstype, ','))
+ type = fstype;
+ else
+ type = DEFAULT_FSTYPE;
+
+ num_running++;
+ retval = execute(type, fs->device, fs->mountpt, interactive);
+ if (retval) {
+ fprintf(stderr, _("%s: Error %d while executing fsck.%s "
+ "for %s\n"), progname, retval, type, fs->device);
+ num_running--;
+ }
+}
+
+
+/*
+ * Deal with the fsck -t argument.
+ */
+static struct fs_type_compile {
+ char **list;
+ int *type;
+ int negate;
+} fs_type_compiled;
+
+#define FS_TYPE_NORMAL 0
+#define FS_TYPE_OPT 1
+#define FS_TYPE_NEGOPT 2
+
+static const char *fs_type_syntax_error =
+N_("Either all or none of the filesystem types passed to -t must be prefixed\n"
+ "with 'no' or '!'.\n");
+
+static void compile_fs_type(char *fs_type, struct fs_type_compile *cmp)
+{
+ char *cp, *list, *s;
+ int num = 2;
+ int negate, first_negate = 1;
+
+ if (fs_type) {
+ for (cp=fs_type; *cp; cp++) {
+ if (*cp == ',')
+ num++;
+ }
+ }
+
+ cmp->list = malloc(num * sizeof(char *));
+ cmp->type = malloc(num * sizeof(int));
+ if (!cmp->list || !cmp->type) {
+ fputs(_("Couldn't allocate memory for filesystem types\n"),
+ stderr);
+ exit(EXIT_ERROR);
+ }
+ memset(cmp->list, 0, num * sizeof(char *));
+ memset(cmp->type, 0, num * sizeof(int));
+ cmp->negate = 0;
+
+ if (!fs_type)
+ return;
+
+ list = string_copy(fs_type);
+ num = 0;
+ s = strtok(list, ",");
+ while(s) {
+ negate = 0;
+ if (strncmp(s, "no", 2) == 0) {
+ s += 2;
+ negate = 1;
+ } else if (*s == '!') {
+ s++;
+ negate = 1;
+ }
+ if (strcmp(s, "loop") == 0)
+ /* loop is really short-hand for opts=loop */
+ goto loop_special_case;
+ else if (strncmp(s, "opts=", 5) == 0) {
+ s += 5;
+ loop_special_case:
+ cmp->type[num] = negate ? FS_TYPE_NEGOPT : FS_TYPE_OPT;
+ } else {
+ if (first_negate) {
+ cmp->negate = negate;
+ first_negate = 0;
+ }
+ if ((negate && !cmp->negate) ||
+ (!negate && cmp->negate)) {
+ fputs(_(fs_type_syntax_error), stderr);
+ exit(EXIT_USAGE);
+ }
+ }
+#if 0
+ printf("Adding %s to list (type %d).\n", s, cmp->type[num]);
+#endif
+ cmp->list[num++] = string_copy(s);
+ s = strtok(NULL, ",");
+ }
+ free(list);
+}
+
+/*
+ * This function returns true if a particular option appears in a
+ * comma-delimited options list
+ */
+static int opt_in_list(const char *opt, char *optlist)
+{
+ char *list, *s;
+
+ if (!optlist)
+ return 0;
+ list = string_copy(optlist);
+
+ s = strtok(list, ",");
+ while(s) {
+ if (strcmp(s, opt) == 0) {
+ free(list);
+ return 1;
+ }
+ s = strtok(NULL, ",");
+ }
+ free(list);
+ return 0;
+}
+
+/* See if the filesystem matches the criteria given by the -t option */
+static int fs_match(struct fs_info *fs, struct fs_type_compile *cmp)
+{
+ int n, ret = 0, checked_type = 0;
+ char *cp;
+
+ if (cmp->list == 0 || cmp->list[0] == 0)
+ return 1;
+
+ for (n=0; (cp = cmp->list[n]); n++) {
+ switch (cmp->type[n]) {
+ case FS_TYPE_NORMAL:
+ checked_type++;
+ if (strcmp(cp, fs->type) == 0) {
+ ret = 1;
+ }
+ break;
+ case FS_TYPE_NEGOPT:
+ if (opt_in_list(cp, fs->opts))
+ return 0;
+ break;
+ case FS_TYPE_OPT:
+ if (!opt_in_list(cp, fs->opts))
+ return 0;
+ break;
+ }
+ }
+ if (checked_type == 0)
+ return 1;
+ return (cmp->negate ? !ret : ret);
+}
+
+/* Check if we should ignore this filesystem. */
+static int ignore(struct fs_info *fs)
+{
+ const char **ip;
+ int wanted = 0;
+
+ /*
+ * If the pass number is 0, ignore it.
+ */
+ if (fs->passno == 0)
+ return 1;
+
+ /*
+ * If this is a bind mount, ignore it.
+ */
+ if (opt_in_list("bind", fs->opts)) {
+ fprintf(stderr,
+ _("%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"),
+ fs->mountpt);
+ return 1;
+ }
+
+ interpret_type(fs);
+
+ /*
+ * If a specific fstype is specified, and it doesn't match,
+ * ignore it.
+ */
+ if (!fs_match(fs, &fs_type_compiled)) return 1;
+
+ /* Are we ignoring this type? */
+ for(ip = ignored_types; *ip; ip++)
+ if (strcmp(fs->type, *ip) == 0) return 1;
+
+ /* Do we really really want to check this fs? */
+ for(ip = really_wanted; *ip; ip++)
+ if (strcmp(fs->type, *ip) == 0) {
+ wanted = 1;
+ break;
+ }
+
+ /* See if the <fsck.fs> program is available. */
+ if (find_fsck(fs->type) == NULL) {
+ if (wanted)
+ fprintf(stderr, _("fsck: cannot check %s: fsck.%s not found\n"),
+ fs->device, fs->type);
+ return 1;
+ }
+
+ /* We can and want to check this file system type. */
+ return 0;
+}
+
+/*
+ * Returns TRUE if a partition on the same disk is already being
+ * checked.
+ */
+static int device_already_active(char *device)
+{
+ struct fsck_instance *inst;
+ char *base;
+
+ if (force_all_parallel)
+ return 0;
+
+#ifdef BASE_MD
+ /* Don't check a soft raid disk with any other disk */
+ if (instance_list &&
+ (!strncmp(instance_list->device, BASE_MD, sizeof(BASE_MD)-1) ||
+ !strncmp(device, BASE_MD, sizeof(BASE_MD)-1)))
+ return 1;
+#endif
+
+ base = base_device(device);
+ /*
+ * If we don't know the base device, assume that the device is
+ * already active if there are any fsck instances running.
+ */
+ if (!base)
+ return (instance_list != 0);
+ for (inst = instance_list; inst; inst = inst->next) {
+ if (!inst->base_device || !strcmp(base, inst->base_device)) {
+ free(base);
+ return 1;
+ }
+ }
+ free(base);
+ return 0;
+}
+
+/* Check all file systems, using the /etc/fstab table. */
+static int check_all(NOARGS)
+{
+ struct fs_info *fs = NULL;
+ int status = EXIT_OK;
+ int not_done_yet = 1;
+ int passno = 1;
+ int pass_done;
+
+ if (verbose)
+ fputs(_("Checking all file systems.\n"), stdout);
+
+ /*
+ * Do an initial scan over the filesystem; mark filesystems
+ * which should be ignored as done, and resolve any "auto"
+ * filesystem types (done as a side-effect of calling ignore()).
+ */
+ for (fs = filesys_info; fs; fs = fs->next) {
+ if (ignore(fs))
+ fs->flags |= FLAG_DONE;
+ }
+
+ /*
+ * Find and check the root filesystem.
+ */
+ if (!parallel_root) {
+ for (fs = filesys_info; fs; fs = fs->next) {
+ if (!strcmp(fs->mountpt, "/"))
+ break;
+ }
+ if (fs) {
+ if (!skip_root && !ignore(fs) &&
+ !(ignore_mounted && is_mounted(fs->device))) {
+ fsck_device(fs, 1);
+ status |= wait_many(FLAG_WAIT_ALL);
+ if (status > EXIT_NONDESTRUCT)
+ return status;
+ }
+ fs->flags |= FLAG_DONE;
+ }
+ }
+ /*
+ * This is for the bone-headed user who enters the root
+ * filesystem twice. Skip root will skip all root entries.
+ */
+ if (skip_root)
+ for (fs = filesys_info; fs; fs = fs->next)
+ if (!strcmp(fs->mountpt, "/"))
+ fs->flags |= FLAG_DONE;
+
+ while (not_done_yet) {
+ not_done_yet = 0;
+ pass_done = 1;
+
+ for (fs = filesys_info; fs; fs = fs->next) {
+ if (cancel_requested)
+ break;
+ if (fs->flags & FLAG_DONE)
+ continue;
+ /*
+ * If the filesystem's pass number is higher
+ * than the current pass number, then we don't
+ * do it yet.
+ */
+ if (fs->passno > passno) {
+ not_done_yet++;
+ continue;
+ }
+ if (ignore_mounted && is_mounted(fs->device)) {
+ fs->flags |= FLAG_DONE;
+ continue;
+ }
+ /*
+ * If a filesystem on a particular device has
+ * already been spawned, then we need to defer
+ * this to another pass.
+ */
+ if (device_already_active(fs->device)) {
+ pass_done = 0;
+ continue;
+ }
+ /*
+ * Spawn off the fsck process
+ */
+ fsck_device(fs, serialize);
+ fs->flags |= FLAG_DONE;
+
+ /*
+ * Only do one filesystem at a time, or if we
+ * have a limit on the number of fsck's extant
+ * at one time, apply that limit.
+ */
+ if (serialize ||
+ (max_running && (num_running >= max_running))) {
+ pass_done = 0;
+ break;
+ }
+ }
+ if (cancel_requested)
+ break;
+ if (verbose > 1)
+ printf(_("--waiting-- (pass %d)\n"), passno);
+ status |= wait_many(pass_done ? FLAG_WAIT_ALL :
+ FLAG_WAIT_ATLEAST_ONE);
+ if (pass_done) {
+ if (verbose > 1)
+ printf("----------------------------------\n");
+ passno++;
+ } else
+ not_done_yet++;
+ }
+ if (cancel_requested && !kill_sent) {
+ kill_all(SIGTERM);
+ kill_sent++;
+ }
+ status |= wait_many(FLAG_WAIT_ATLEAST_ONE);
+ return status;
+}
+
+static void usage(NOARGS)
+{
+ fputs(_("Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"), stderr);
+ exit(EXIT_USAGE);
+}
+
+#ifdef HAVE_SIGNAL_H
+static void signal_cancel(int sig FSCK_ATTR((unused)))
+{
+ cancel_requested++;
+}
+#endif
+
+static void PRS(int argc, char *argv[])
+{
+ int i, j;
+ char *arg, *dev, *tmp = 0;
+ char options[128];
+ int opt = 0;
+ int opts_for_fsck = 0;
+#ifdef HAVE_SIGNAL_H
+ struct sigaction sa;
+
+ /*
+ * Set up signal action
+ */
+ memset(&sa, 0, sizeof(struct sigaction));
+ sa.sa_handler = signal_cancel;
+ sigaction(SIGINT, &sa, 0);
+ sigaction(SIGTERM, &sa, 0);
+#endif
+
+ num_devices = 0;
+ num_args = 0;
+ instance_list = 0;
+
+ progname = argv[0];
+
+ for (i=1; i < argc; i++) {
+ arg = argv[i];
+ if (!arg)
+ continue;
+ if ((arg[0] == '/' && !opts_for_fsck) || strchr(arg, '=')) {
+ if (num_devices >= MAX_DEVICES) {
+ fprintf(stderr, _("%s: too many devices\n"),
+ progname);
+ exit(EXIT_ERROR);
+ }
+ dev = get_devname(cache, arg, NULL);
+ if (!dev && strchr(arg, '=')) {
+ /*
+ * Check to see if we failed because
+ * /proc/partitions isn't found.
+ */
+ if (access("/proc/partitions", R_OK) < 0) {
+ fprintf(stderr, "Couldn't open /proc/partitions: %s\n",
+ strerror(errno));
+ fprintf(stderr, "Is /proc mounted?\n");
+ exit(EXIT_ERROR);
+ }
+ /*
+ * Check to see if this is because
+ * we're not running as root
+ */
+ if (geteuid())
+ fprintf(stderr,
+ "Must be root to scan for matching filesystems: %s\n", arg);
+ else
+ fprintf(stderr,
+ "Couldn't find matching filesystem: %s\n", arg);
+ exit(EXIT_ERROR);
+ }
+ devices[num_devices++] = dev ? dev : string_copy(arg);
+ continue;
+ }
+ if (arg[0] != '-' || opts_for_fsck) {
+ if (num_args >= MAX_ARGS) {
+ fprintf(stderr, _("%s: too many arguments\n"),
+ progname);
+ exit(EXIT_ERROR);
+ }
+ args[num_args++] = string_copy(arg);
+ continue;
+ }
+ for (j=1; arg[j]; j++) {
+ if (opts_for_fsck) {
+ options[++opt] = arg[j];
+ continue;
+ }
+ switch (arg[j]) {
+ case 'A':
+ doall++;
+ break;
+ case 'C':
+ progress++;
+ if (arg[j+1]) {
+ progress_fd = string_to_int(arg+j+1);
+ if (progress_fd < 0)
+ progress_fd = 0;
+ else
+ goto next_arg;
+ } else if (argc > i + 1 &&
+ argv[i + 1][0] != '-') {
+ progress_fd = string_to_int(argv[i]);
+ if (progress_fd < 0)
+ progress_fd = 0;
+ else {
+ ++i;
+ goto next_arg;
+ }
+ }
+ break;
+ case 'V':
+ verbose++;
+ break;
+ case 'N':
+ noexecute++;
+ break;
+ case 'R':
+ skip_root++;
+ break;
+ case 'T':
+ notitle++;
+ break;
+ case 'M':
+ ignore_mounted++;
+ break;
+ case 'P':
+ parallel_root++;
+ break;
+ case 's':
+ serialize++;
+ break;
+ case 't':
+ tmp = 0;
+ if (fstype)
+ usage();
+ if (arg[j+1])
+ tmp = arg+j+1;
+ else if ((i+1) < argc)
+ tmp = argv[++i];
+ else
+ usage();
+ fstype = string_copy(tmp);
+ compile_fs_type(fstype, &fs_type_compiled);
+ goto next_arg;
+ case '-':
+ opts_for_fsck++;
+ break;
+ case '?':
+ usage();
+ break;
+ default:
+ options[++opt] = arg[j];
+ break;
+ }
+ }
+ next_arg:
+ if (opt) {
+ options[0] = '-';
+ options[++opt] = '\0';
+ if (num_args >= MAX_ARGS) {
+ fprintf(stderr,
+ _("%s: too many arguments\n"),
+ progname);
+ exit(EXIT_ERROR);
+ }
+ args[num_args++] = string_copy(options);
+ opt = 0;
+ }
+ }
+ if (getenv("FSCK_FORCE_ALL_PARALLEL"))
+ force_all_parallel++;
+ if ((tmp = getenv("FSCK_MAX_INST")))
+ max_running = atoi(tmp);
+}
+
+int main(int argc, char *argv[])
+{
+ int i, status = 0;
+ int interactive = 0;
+ char *oldpath = getenv("PATH");
+ const char *fstab;
+ struct fs_info *fs;
+
+ setvbuf(stdout, NULL, _IONBF, BUFSIZ);
+ setvbuf(stderr, NULL, _IONBF, BUFSIZ);
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ blkid_get_cache(&cache, NULL);
+ PRS(argc, argv);
+
+ if (!notitle)
+ printf("fsck %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+
+ fstab = getenv("FSTAB_FILE");
+ if (!fstab)
+ fstab = _PATH_MNTTAB;
+ load_fs_info(fstab);
+
+ /* Update our search path to include uncommon directories. */
+ if (oldpath) {
+ fsck_path = malloc (strlen (fsck_prefix_path) + 1 +
+ strlen (oldpath) + 1);
+ if (!fsck_path) {
+ fprintf(stderr, "%s: Unable to allocate memory for fsck_path\n", progname);
+ exit(EXIT_ERROR);
+ }
+ strcpy (fsck_path, fsck_prefix_path);
+ strcat (fsck_path, ":");
+ strcat (fsck_path, oldpath);
+ } else {
+ fsck_path = string_copy(fsck_prefix_path);
+ }
+
+ if ((num_devices == 1) || (serialize))
+ interactive = 1;
+
+ /* If -A was specified ("check all"), do that! */
+ if (doall)
+ return check_all();
+
+ if (num_devices == 0) {
+ serialize++;
+ interactive++;
+ return check_all();
+ }
+ for (i = 0 ; i < num_devices; i++) {
+ if (cancel_requested) {
+ if (!kill_sent) {
+ kill_all(SIGTERM);
+ kill_sent++;
+ }
+ break;
+ }
+ fs = lookup(devices[i]);
+ if (!fs) {
+ fs = create_fs_device(devices[i], 0, "auto",
+ 0, -1, -1);
+ if (!fs)
+ continue;
+ }
+ if (ignore_mounted && is_mounted(fs->device))
+ continue;
+ fsck_device(fs, interactive);
+ if (serialize ||
+ (max_running && (num_running >= max_running))) {
+ struct fsck_instance *inst;
+
+ inst = wait_one(0);
+ if (inst) {
+ status |= inst->exit_status;
+ free_instance(inst);
+ }
+ if (verbose > 1)
+ printf("----------------------------------\n");
+ }
+ }
+ status |= wait_many(FLAG_WAIT_ALL);
+ free(fsck_path);
+ blkid_put_cache(cache);
+ return status;
+}
diff --git a/misc/fsck.h b/misc/fsck.h
new file mode 100644
index 0000000..8a55fbd
--- /dev/null
+++ b/misc/fsck.h
@@ -0,0 +1,73 @@
+/*
+ * fsck.h
+ */
+
+#include <time.h>
+
+#ifdef __STDC__
+#define NOARGS void
+#else
+#define NOARGS
+#define const
+#endif
+
+#ifdef __GNUC__
+#define FSCK_ATTR(x) __attribute__(x)
+#else
+#define FSCK_ATTR(x)
+#endif
+
+
+#ifndef DEFAULT_FSTYPE
+#define DEFAULT_FSTYPE "ext2"
+#endif
+
+#define MAX_DEVICES 32
+#define MAX_ARGS 32
+
+#define EXIT_OK 0
+#define EXIT_NONDESTRUCT 1
+#define EXIT_DESTRUCT 2
+#define EXIT_UNCORRECTED 4
+#define EXIT_ERROR 8
+#define EXIT_USAGE 16
+#define EXIT_LIBRARY 128
+
+/*
+ * Internal structure for mount table entries.
+ */
+
+struct fs_info {
+ char *device;
+ char *mountpt;
+ char *type;
+ char *opts;
+ int freq;
+ int passno;
+ int flags;
+ struct fs_info *next;
+};
+
+#define FLAG_DONE 1
+#define FLAG_PROGRESS 2
+
+/*
+ * Structure to allow exit codes to be stored
+ */
+struct fsck_instance {
+ int pid;
+ int flags;
+ int exit_status;
+ time_t start_time;
+ char * prog;
+ char * type;
+ char * device;
+ char * base_device;
+ struct fsck_instance *next;
+};
+
+extern char *base_device(const char *device);
+extern const char *identify_fs(const char *fs_name, const char *fs_types);
+
+/* ismounted.h */
+extern int is_mounted(const char *file);
diff --git a/misc/fsmap.h b/misc/fsmap.h
new file mode 100644
index 0000000..e9590aa
--- /dev/null
+++ b/misc/fsmap.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2017 Oracle.
+ * All Rights Reserved.
+ *
+ * Author: Darrick J. Wong <darrick.wong@oracle.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef FSMAP_H_
+#define FSMAP_H_
+
+/* FS_IOC_GETFSMAP ioctl definitions */
+#ifndef FS_IOC_GETFSMAP
+struct fsmap {
+ __u32 fmr_device; /* device id */
+ __u32 fmr_flags; /* mapping flags */
+ __u64 fmr_physical; /* device offset of segment */
+ __u64 fmr_owner; /* owner id */
+ __u64 fmr_offset; /* file offset of segment */
+ __u64 fmr_length; /* length of segment */
+ __u64 fmr_reserved[3]; /* must be zero */
+};
+
+struct fsmap_head {
+ __u32 fmh_iflags; /* control flags */
+ __u32 fmh_oflags; /* output flags */
+ __u32 fmh_count; /* # of entries in array incl. input */
+ __u32 fmh_entries; /* # of entries filled in (output). */
+ __u64 fmh_reserved[6]; /* must be zero */
+
+ struct fsmap fmh_keys[2]; /* low and high keys for the mapping search */
+ struct fsmap fmh_recs[]; /* returned records */
+};
+
+/* Size of an fsmap_head with room for nr records. */
+static inline size_t
+fsmap_sizeof(
+ unsigned int nr)
+{
+ return sizeof(struct fsmap_head) + nr * sizeof(struct fsmap);
+}
+
+/* Start the next fsmap query at the end of the current query results. */
+static inline void
+fsmap_advance(
+ struct fsmap_head *head)
+{
+ head->fmh_keys[0] = head->fmh_recs[head->fmh_entries - 1];
+}
+
+/* fmh_iflags values - set by FS_IOC_GETFSMAP caller in the header. */
+/* no flags defined yet */
+#define FMH_IF_VALID 0
+
+/* fmh_oflags values - returned in the header segment only. */
+#define FMH_OF_DEV_T 0x1 /* fmr_device values will be dev_t */
+
+/* fmr_flags values - returned for each non-header segment */
+#define FMR_OF_PREALLOC 0x1 /* segment = unwritten pre-allocation */
+#define FMR_OF_ATTR_FORK 0x2 /* segment = attribute fork */
+#define FMR_OF_EXTENT_MAP 0x4 /* segment = extent map */
+#define FMR_OF_SHARED 0x8 /* segment = shared with another file */
+#define FMR_OF_SPECIAL_OWNER 0x10 /* owner is a special value */
+#define FMR_OF_LAST 0x20 /* segment is the last in the FS */
+
+/* Each FS gets to define its own special owner codes. */
+#define FMR_OWNER(type, code) (((__u64)type << 32) | \
+ ((__u64)code & 0xFFFFFFFFULL))
+#define FMR_OWNER_TYPE(owner) ((__u32)((__u64)owner >> 32))
+#define FMR_OWNER_CODE(owner) ((__u32)(((__u64)owner & 0xFFFFFFFFULL)))
+#define FMR_OWN_FREE FMR_OWNER(0, 1) /* free space */
+#define FMR_OWN_UNKNOWN FMR_OWNER(0, 2) /* unknown owner */
+#define FMR_OWN_METADATA FMR_OWNER(0, 3) /* metadata */
+
+#define FS_IOC_GETFSMAP _IOWR('X', 59, struct fsmap_head)
+#endif /* FS_IOC_GETFSMAP */
+
+#endif
diff --git a/misc/fuse2fs.1.in b/misc/fuse2fs.1.in
new file mode 100644
index 0000000..1a0c9d5
--- /dev/null
+++ b/misc/fuse2fs.1.in
@@ -0,0 +1,79 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH FUSE2FS 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+fuse2fs \- FUSE file system client for ext2/ext3/ext4 file systems
+.SH SYNOPSIS
+.B fuse2fs
+[
+.B device/image
+]
+[
+.B mountpoint
+]
+[
+.I options
+]
+.SH DESCRIPTION
+.B fuse2fs
+is a FUSE file system client that supports reading and writing from
+devices or image files containing ext2, ext3, and ext4 file systems.
+.SH OPTIONS
+.SS "general options:"
+.TP
+\fB\-o\fR opt,[opt...]
+mount options
+.TP
+\fB\-h\fR \fB\-\-help\fR
+print help
+.TP
+\fB\-V\fR \fB\-\-version\fR
+print version
+.SS "fuse2fs options:"
+.TP
+\fB-o\fR ro
+read-only mount
+.TP
+\fB-o\fR errors=panic
+dump core on error
+.TP
+\fB-o\fR minixdf
+minix-style df
+.TP
+\fB-o\fR fakeroot
+pretend to be root for permission checks
+.TP
+\fB-o\fR no_default_opts
+do not include default fuse options
+.TP
+\fB-o\fR norecovery
+do not replay the journal and mount the file system read-only
+.TP
+\fB-o\fR fuse2fs_debug
+enable fuse2fs debugging
+.SS "FUSE options:"
+.TP
+\fB-d -o\fR debug
+enable debug output (implies -f)
+.TP
+\fB-f\fR
+foreground operation
+.TP
+\fB-s\fR
+disable multi-threaded operation
+.P
+For other FUSE options please see
+.BR mount.fuse (8)
+or see the output of
+.I fuse2fs \-\-helpfull
+.SH AVAILABILITY
+.B fuse2fs
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR ext4 (5)
+.BR e2fsck (8),
+.BR mount.fuse (8)
+
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
new file mode 100644
index 0000000..0dc77ea
--- /dev/null
+++ b/misc/fuse2fs.c
@@ -0,0 +1,4009 @@
+/*
+ * fuse2fs.c - FUSE server for e2fsprogs.
+ *
+ * Copyright (C) 2014 Oracle.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+#define _FILE_OFFSET_BITS 64
+#define FUSE_USE_VERSION 29
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include "config.h"
+#include <pthread.h>
+#ifdef __linux__
+# include <linux/fs.h>
+# include <linux/falloc.h>
+# include <linux/xattr.h>
+# define FUSE_PLATFORM_OPTS ",big_writes"
+# ifdef HAVE_SYS_ACL_H
+# define TRANSLATE_LINUX_ACLS
+# endif
+#else
+# define FUSE_PLATFORM_OPTS ""
+#endif
+#ifdef TRANSLATE_LINUX_ACLS
+# include <sys/acl.h>
+#endif
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <fuse.h>
+#include <inttypes.h>
+#include "ext2fs/ext2fs.h"
+#include "ext2fs/ext2_fs.h"
+
+#include "../version.h"
+
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#include <locale.h>
+#define _(a) (gettext(a))
+#ifdef gettext_noop
+#define N_(a) gettext_noop(a)
+#else
+#define N_(a) (a)
+#endif
+#define P_(singular, plural, n) (ngettext(singular, plural, n))
+#ifndef NLS_CAT_NAME
+#define NLS_CAT_NAME "e2fsprogs"
+#endif
+#ifndef LOCALEDIR
+#define LOCALEDIR "/usr/share/locale"
+#endif
+#else
+#define _(a) (a)
+#define N_(a) a
+#define P_(singular, plural, n) ((n) == 1 ? (singular) : (plural))
+#endif
+
+static ext2_filsys global_fs; /* Try not to use this directly */
+
+#undef DEBUG
+
+#ifdef DEBUG
+# define dbg_printf(f, a...) do {printf("FUSE2FS-" f, ## a); \
+ fflush(stdout); \
+} while (0)
+#else
+# define dbg_printf(f, a...)
+#endif
+
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8)
+# ifdef _IOR
+# ifdef _IOW
+# define SUPPORT_I_FLAGS
+# endif
+# endif
+#endif
+
+#ifdef FALLOC_FL_KEEP_SIZE
+# define FL_KEEP_SIZE_FLAG FALLOC_FL_KEEP_SIZE
+# define SUPPORT_FALLOCATE
+#else
+# define FL_KEEP_SIZE_FLAG (0)
+#endif
+
+#ifdef FALLOC_FL_PUNCH_HOLE
+# define FL_PUNCH_HOLE_FLAG FALLOC_FL_PUNCH_HOLE
+#else
+# define FL_PUNCH_HOLE_FLAG (0)
+#endif
+
+errcode_t ext2fs_run_ext3_journal(ext2_filsys *fs);
+
+#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jbd-debug */
+int journal_enable_debug = -1;
+#endif
+
+/* ACL translation stuff */
+#ifdef TRANSLATE_LINUX_ACLS
+/*
+ * Copied from acl_ea.h in libacl source; ACLs have to be sent to and from fuse
+ * in this format... at least on Linux.
+ */
+#define ACL_EA_ACCESS "system.posix_acl_access"
+#define ACL_EA_DEFAULT "system.posix_acl_default"
+
+#define ACL_EA_VERSION 0x0002
+
+typedef struct {
+ u_int16_t e_tag;
+ u_int16_t e_perm;
+ u_int32_t e_id;
+} acl_ea_entry;
+
+typedef struct {
+ u_int32_t a_version;
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+ acl_ea_entry a_entries[0];
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic pop
+#endif
+} acl_ea_header;
+
+static inline size_t acl_ea_size(int count)
+{
+ return sizeof(acl_ea_header) + count * sizeof(acl_ea_entry);
+}
+
+static inline int acl_ea_count(size_t size)
+{
+ if (size < sizeof(acl_ea_header))
+ return -1;
+ size -= sizeof(acl_ea_header);
+ if (size % sizeof(acl_ea_entry))
+ return -1;
+ return size / sizeof(acl_ea_entry);
+}
+
+/*
+ * ext4 ACL structures, copied from fs/ext4/acl.h.
+ */
+#define EXT4_ACL_VERSION 0x0001
+
+typedef struct {
+ __u16 e_tag;
+ __u16 e_perm;
+ __u32 e_id;
+} ext4_acl_entry;
+
+typedef struct {
+ __u16 e_tag;
+ __u16 e_perm;
+} ext4_acl_entry_short;
+
+typedef struct {
+ __u32 a_version;
+} ext4_acl_header;
+
+static inline size_t ext4_acl_size(int count)
+{
+ if (count <= 4) {
+ return sizeof(ext4_acl_header) +
+ count * sizeof(ext4_acl_entry_short);
+ } else {
+ return sizeof(ext4_acl_header) +
+ 4 * sizeof(ext4_acl_entry_short) +
+ (count - 4) * sizeof(ext4_acl_entry);
+ }
+}
+
+static inline int ext4_acl_count(size_t size)
+{
+ ssize_t s;
+
+ size -= sizeof(ext4_acl_header);
+ s = size - 4 * sizeof(ext4_acl_entry_short);
+ if (s < 0) {
+ if (size % sizeof(ext4_acl_entry_short))
+ return -1;
+ return size / sizeof(ext4_acl_entry_short);
+ }
+ if (s % sizeof(ext4_acl_entry))
+ return -1;
+ return s / sizeof(ext4_acl_entry) + 4;
+}
+
+static errcode_t fuse_to_ext4_acl(acl_ea_header *facl, size_t facl_sz,
+ ext4_acl_header **eacl, size_t *eacl_sz)
+{
+ int i, facl_count;
+ ext4_acl_header *h;
+ size_t h_sz;
+ ext4_acl_entry *e;
+ acl_ea_entry *a;
+ unsigned char *hptr;
+ errcode_t err;
+
+ facl_count = acl_ea_count(facl_sz);
+ h_sz = ext4_acl_size(facl_count);
+ if (facl_count < 0 || facl->a_version != ACL_EA_VERSION)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ err = ext2fs_get_mem(h_sz, &h);
+ if (err)
+ return err;
+
+ h->a_version = ext2fs_cpu_to_le32(EXT4_ACL_VERSION);
+ hptr = (unsigned char *) (h + 1);
+ for (i = 0, a = facl->a_entries; i < facl_count; i++, a++) {
+ e = (ext4_acl_entry *) hptr;
+ e->e_tag = ext2fs_cpu_to_le16(a->e_tag);
+ e->e_perm = ext2fs_cpu_to_le16(a->e_perm);
+
+ switch (a->e_tag) {
+ case ACL_USER:
+ case ACL_GROUP:
+ e->e_id = ext2fs_cpu_to_le32(a->e_id);
+ hptr += sizeof(ext4_acl_entry);
+ break;
+ case ACL_USER_OBJ:
+ case ACL_GROUP_OBJ:
+ case ACL_MASK:
+ case ACL_OTHER:
+ hptr += sizeof(ext4_acl_entry_short);
+ break;
+ default:
+ err = EXT2_ET_INVALID_ARGUMENT;
+ goto out;
+ }
+ }
+
+ *eacl = h;
+ *eacl_sz = h_sz;
+ return err;
+out:
+ ext2fs_free_mem(&h);
+ return err;
+}
+
+static errcode_t ext4_to_fuse_acl(acl_ea_header **facl, size_t *facl_sz,
+ ext4_acl_header *eacl, size_t eacl_sz)
+{
+ int i, eacl_count;
+ acl_ea_header *f;
+ ext4_acl_entry *e;
+ acl_ea_entry *a;
+ size_t f_sz;
+ unsigned char *hptr;
+ errcode_t err;
+
+ eacl_count = ext4_acl_count(eacl_sz);
+ f_sz = acl_ea_size(eacl_count);
+ if (eacl_count < 0 ||
+ eacl->a_version != ext2fs_cpu_to_le32(EXT4_ACL_VERSION))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ err = ext2fs_get_mem(f_sz, &f);
+ if (err)
+ return err;
+
+ f->a_version = ACL_EA_VERSION;
+ hptr = (unsigned char *) (eacl + 1);
+ for (i = 0, a = f->a_entries; i < eacl_count; i++, a++) {
+ e = (ext4_acl_entry *) hptr;
+ a->e_tag = ext2fs_le16_to_cpu(e->e_tag);
+ a->e_perm = ext2fs_le16_to_cpu(e->e_perm);
+
+ switch (a->e_tag) {
+ case ACL_USER:
+ case ACL_GROUP:
+ a->e_id = ext2fs_le32_to_cpu(e->e_id);
+ hptr += sizeof(ext4_acl_entry);
+ break;
+ case ACL_USER_OBJ:
+ case ACL_GROUP_OBJ:
+ case ACL_MASK:
+ case ACL_OTHER:
+ hptr += sizeof(ext4_acl_entry_short);
+ break;
+ default:
+ err = EXT2_ET_INVALID_ARGUMENT;
+ goto out;
+ }
+ }
+
+ *facl = f;
+ *facl_sz = f_sz;
+ return err;
+out:
+ ext2fs_free_mem(&f);
+ return err;
+}
+#endif /* TRANSLATE_LINUX_ACLS */
+
+/*
+ * ext2_file_t contains a struct inode, so we can't leave files open.
+ * Use this as a proxy instead.
+ */
+#define FUSE2FS_FILE_MAGIC (0xEF53DEAFUL)
+struct fuse2fs_file_handle {
+ unsigned long magic;
+ ext2_ino_t ino;
+ int open_flags;
+};
+
+/* Main program context */
+#define FUSE2FS_MAGIC (0xEF53DEADUL)
+struct fuse2fs {
+ unsigned long magic;
+ ext2_filsys fs;
+ pthread_mutex_t bfl;
+ char *device;
+ int ro;
+ int debug;
+ int no_default_opts;
+ int panic_on_error;
+ int minixdf;
+ int fakeroot;
+ int alloc_all_blocks;
+ int norecovery;
+ unsigned long offset;
+ FILE *err_fp;
+ unsigned int next_generation;
+};
+
+#define FUSE2FS_CHECK_MAGIC(fs, ptr, num) do {if ((ptr)->magic != (num)) \
+ return translate_error((fs), 0, EXT2_ET_MAGIC_EXT2_FILE); \
+} while (0)
+
+#define FUSE2FS_CHECK_CONTEXT(ptr) do {if ((ptr)->magic != FUSE2FS_MAGIC) \
+ return translate_error(global_fs, 0, EXT2_ET_BAD_MAGIC); \
+} while (0)
+
+static int __translate_error(ext2_filsys fs, errcode_t err, ext2_ino_t ino,
+ const char *file, int line);
+#define translate_error(fs, ino, err) __translate_error((fs), (err), (ino), \
+ __FILE__, __LINE__)
+
+/* for macosx */
+#ifndef W_OK
+# define W_OK 2
+#endif
+
+#ifndef R_OK
+# define R_OK 4
+#endif
+
+#define EXT4_EPOCH_BITS 2
+#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1)
+#define EXT4_NSEC_MASK (~0UL << EXT4_EPOCH_BITS)
+
+/*
+ * Extended fields will fit into an inode if the filesystem was formatted
+ * with large inodes (-I 256 or larger) and there are not currently any EAs
+ * consuming all of the available space. For new inodes we always reserve
+ * enough space for the kernel's known extended fields, but for inodes
+ * created with an old kernel this might not have been the case. None of
+ * the extended inode fields is critical for correct filesystem operation.
+ * This macro checks if a certain field fits in the inode. Note that
+ * inode-size = GOOD_OLD_INODE_SIZE + i_extra_isize
+ */
+#define EXT4_FITS_IN_INODE(ext4_inode, field) \
+ ((offsetof(typeof(*ext4_inode), field) + \
+ sizeof((ext4_inode)->field)) \
+ <= ((size_t) EXT2_GOOD_OLD_INODE_SIZE + \
+ (ext4_inode)->i_extra_isize)) \
+
+static inline __u32 ext4_encode_extra_time(const struct timespec *time)
+{
+ __u32 extra = sizeof(time->tv_sec) > 4 ?
+ ((time->tv_sec - (__s32)time->tv_sec) >> 32) &
+ EXT4_EPOCH_MASK : 0;
+ return extra | (time->tv_nsec << EXT4_EPOCH_BITS);
+}
+
+static inline void ext4_decode_extra_time(struct timespec *time, __u32 extra)
+{
+ if (sizeof(time->tv_sec) > 4 && (extra & EXT4_EPOCH_MASK)) {
+ __u64 extra_bits = extra & EXT4_EPOCH_MASK;
+ /*
+ * Prior to kernel 3.14?, we had a broken decode function,
+ * wherein we effectively did this:
+ * if (extra_bits == 3)
+ * extra_bits = 0;
+ */
+ time->tv_sec += extra_bits << 32;
+ }
+ time->tv_nsec = ((extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS;
+}
+
+#define EXT4_INODE_SET_XTIME(xtime, timespec, raw_inode) \
+do { \
+ (raw_inode)->xtime = (timespec)->tv_sec; \
+ if (EXT4_FITS_IN_INODE(raw_inode, xtime ## _extra)) \
+ (raw_inode)->xtime ## _extra = \
+ ext4_encode_extra_time(timespec); \
+} while (0)
+
+#define EXT4_EINODE_SET_XTIME(xtime, timespec, raw_inode) \
+do { \
+ if (EXT4_FITS_IN_INODE(raw_inode, xtime)) \
+ (raw_inode)->xtime = (timespec)->tv_sec; \
+ if (EXT4_FITS_IN_INODE(raw_inode, xtime ## _extra)) \
+ (raw_inode)->xtime ## _extra = \
+ ext4_encode_extra_time(timespec); \
+} while (0)
+
+#define EXT4_INODE_GET_XTIME(xtime, timespec, raw_inode) \
+do { \
+ (timespec)->tv_sec = (signed)((raw_inode)->xtime); \
+ if (EXT4_FITS_IN_INODE(raw_inode, xtime ## _extra)) \
+ ext4_decode_extra_time((timespec), \
+ (raw_inode)->xtime ## _extra); \
+ else \
+ (timespec)->tv_nsec = 0; \
+} while (0)
+
+#define EXT4_EINODE_GET_XTIME(xtime, timespec, raw_inode) \
+do { \
+ if (EXT4_FITS_IN_INODE(raw_inode, xtime)) \
+ (timespec)->tv_sec = \
+ (signed)((raw_inode)->xtime); \
+ if (EXT4_FITS_IN_INODE(raw_inode, xtime ## _extra)) \
+ ext4_decode_extra_time((timespec), \
+ raw_inode->xtime ## _extra); \
+ else \
+ (timespec)->tv_nsec = 0; \
+} while (0)
+
+static void get_now(struct timespec *now)
+{
+#ifdef CLOCK_REALTIME
+ if (!clock_gettime(CLOCK_REALTIME, now))
+ return;
+#endif
+
+ now->tv_sec = time(NULL);
+ now->tv_nsec = 0;
+}
+
+static void increment_version(struct ext2_inode_large *inode)
+{
+ __u64 ver;
+
+ ver = inode->osd1.linux1.l_i_version;
+ if (EXT4_FITS_IN_INODE(inode, i_version_hi))
+ ver |= (__u64)inode->i_version_hi << 32;
+ ver++;
+ inode->osd1.linux1.l_i_version = ver;
+ if (EXT4_FITS_IN_INODE(inode, i_version_hi))
+ inode->i_version_hi = ver >> 32;
+}
+
+static void init_times(struct ext2_inode_large *inode)
+{
+ struct timespec now;
+
+ get_now(&now);
+ EXT4_INODE_SET_XTIME(i_atime, &now, inode);
+ EXT4_INODE_SET_XTIME(i_ctime, &now, inode);
+ EXT4_INODE_SET_XTIME(i_mtime, &now, inode);
+ EXT4_EINODE_SET_XTIME(i_crtime, &now, inode);
+ increment_version(inode);
+}
+
+static int update_ctime(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode_large *pinode)
+{
+ errcode_t err;
+ struct timespec now;
+ struct ext2_inode_large inode;
+
+ get_now(&now);
+
+ /* If user already has a inode buffer, just update that */
+ if (pinode) {
+ increment_version(pinode);
+ EXT4_INODE_SET_XTIME(i_ctime, &now, pinode);
+ return 0;
+ }
+
+ /* Otherwise we have to read-modify-write the inode */
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, ino, err);
+
+ increment_version(&inode);
+ EXT4_INODE_SET_XTIME(i_ctime, &now, &inode);
+
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, ino, err);
+
+ return 0;
+}
+
+static int update_atime(ext2_filsys fs, ext2_ino_t ino)
+{
+ errcode_t err;
+ struct ext2_inode_large inode, *pinode;
+ struct timespec atime, mtime, now;
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return 0;
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, ino, err);
+
+ pinode = &inode;
+ EXT4_INODE_GET_XTIME(i_atime, &atime, pinode);
+ EXT4_INODE_GET_XTIME(i_mtime, &mtime, pinode);
+ get_now(&now);
+ /*
+ * If atime is newer than mtime and atime hasn't been updated in thirty
+ * seconds, skip the atime update. Same idea as Linux "relatime".
+ */
+ if (atime.tv_sec >= mtime.tv_sec && atime.tv_sec >= now.tv_sec - 30)
+ return 0;
+ EXT4_INODE_SET_XTIME(i_atime, &now, &inode);
+
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, ino, err);
+
+ return 0;
+}
+
+static int update_mtime(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode_large *pinode)
+{
+ errcode_t err;
+ struct ext2_inode_large inode;
+ struct timespec now;
+
+ if (pinode) {
+ get_now(&now);
+ EXT4_INODE_SET_XTIME(i_mtime, &now, pinode);
+ EXT4_INODE_SET_XTIME(i_ctime, &now, pinode);
+ increment_version(pinode);
+ return 0;
+ }
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, ino, err);
+
+ get_now(&now);
+ EXT4_INODE_SET_XTIME(i_mtime, &now, &inode);
+ EXT4_INODE_SET_XTIME(i_ctime, &now, &inode);
+ increment_version(&inode);
+
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, ino, err);
+
+ return 0;
+}
+
+static int ext2_file_type(unsigned int mode)
+{
+ if (LINUX_S_ISREG(mode))
+ return EXT2_FT_REG_FILE;
+
+ if (LINUX_S_ISDIR(mode))
+ return EXT2_FT_DIR;
+
+ if (LINUX_S_ISCHR(mode))
+ return EXT2_FT_CHRDEV;
+
+ if (LINUX_S_ISBLK(mode))
+ return EXT2_FT_BLKDEV;
+
+ if (LINUX_S_ISLNK(mode))
+ return EXT2_FT_SYMLINK;
+
+ if (LINUX_S_ISFIFO(mode))
+ return EXT2_FT_FIFO;
+
+ if (LINUX_S_ISSOCK(mode))
+ return EXT2_FT_SOCK;
+
+ return 0;
+}
+
+static int fs_can_allocate(struct fuse2fs *ff, blk64_t num)
+{
+ ext2_filsys fs = ff->fs;
+ blk64_t reserved;
+
+ dbg_printf("%s: Asking for %llu; alloc_all=%d total=%llu free=%llu "
+ "rsvd=%llu\n", __func__, num, ff->alloc_all_blocks,
+ ext2fs_blocks_count(fs->super),
+ ext2fs_free_blocks_count(fs->super),
+ ext2fs_r_blocks_count(fs->super));
+ if (num > ext2fs_blocks_count(fs->super))
+ return 0;
+
+ if (ff->alloc_all_blocks)
+ return 1;
+
+ /*
+ * Different meaning for r_blocks -- libext2fs has bugs where the FS
+ * can get corrupted if it totally runs out of blocks. Avoid this
+ * by refusing to allocate any of the reserve blocks to anybody.
+ */
+ reserved = ext2fs_r_blocks_count(fs->super);
+ if (reserved == 0)
+ reserved = ext2fs_blocks_count(fs->super) / 10;
+ return ext2fs_free_blocks_count(fs->super) > reserved + num;
+}
+
+static int fs_writeable(ext2_filsys fs)
+{
+ return (fs->flags & EXT2_FLAG_RW) && (fs->super->s_error_count == 0);
+}
+
+static int check_inum_access(ext2_filsys fs, ext2_ino_t ino, mode_t mask)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct ext2_inode inode;
+ mode_t perms;
+ errcode_t err;
+
+ /* no writing to read-only or broken fs */
+ if ((mask & W_OK) && !fs_writeable(fs))
+ return -EROFS;
+
+ err = ext2fs_read_inode(fs, ino, &inode);
+ if (err)
+ return translate_error(fs, ino, err);
+ perms = inode.i_mode & 0777;
+
+ dbg_printf("access ino=%d mask=e%s%s%s perms=0%o fuid=%d fgid=%d "
+ "uid=%d gid=%d\n", ino,
+ (mask & R_OK ? "r" : ""), (mask & W_OK ? "w" : ""),
+ (mask & X_OK ? "x" : ""), perms, inode_uid(inode),
+ inode_gid(inode), ctxt->uid, ctxt->gid);
+
+ /* existence check */
+ if (mask == 0)
+ return 0;
+
+ /* is immutable? */
+ if ((mask & W_OK) &&
+ (inode.i_flags & EXT2_IMMUTABLE_FL))
+ return -EACCES;
+
+ /* Figure out what root's allowed to do */
+ if (ff->fakeroot || ctxt->uid == 0) {
+ /* Non-file access always ok */
+ if (!LINUX_S_ISREG(inode.i_mode))
+ return 0;
+
+ /* R/W access to a file always ok */
+ if (!(mask & X_OK))
+ return 0;
+
+ /* X access to a file ok if a user/group/other can X */
+ if (perms & 0111)
+ return 0;
+
+ /* Trying to execute a file that's not executable. BZZT! */
+ return -EACCES;
+ }
+
+ /* allow owner, if perms match */
+ if (inode_uid(inode) == ctxt->uid) {
+ if ((mask & (perms >> 6)) == mask)
+ return 0;
+ return -EACCES;
+ }
+
+ /* allow group, if perms match */
+ if (inode_gid(inode) == ctxt->gid) {
+ if ((mask & (perms >> 3)) == mask)
+ return 0;
+ return -EACCES;
+ }
+
+ /* otherwise check other */
+ if ((mask & perms) == mask)
+ return 0;
+ return -EACCES;
+}
+
+static void op_destroy(void *p EXT2FS_ATTR((unused)))
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+
+ if (ff->magic != FUSE2FS_MAGIC) {
+ translate_error(global_fs, 0, EXT2_ET_BAD_MAGIC);
+ return;
+ }
+ fs = ff->fs;
+ dbg_printf("%s: dev=%s\n", __func__, fs->device_name);
+ if (fs->flags & EXT2_FLAG_RW) {
+ fs->super->s_state |= EXT2_VALID_FS;
+ if (fs->super->s_error_count)
+ fs->super->s_state |= EXT2_ERROR_FS;
+ ext2fs_mark_super_dirty(fs);
+ err = ext2fs_set_gdt_csum(fs);
+ if (err)
+ translate_error(fs, 0, err);
+
+ err = ext2fs_flush2(fs, 0);
+ if (err)
+ translate_error(fs, 0, err);
+ }
+}
+
+static void *op_init(struct fuse_conn_info *conn)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+
+ if (ff->magic != FUSE2FS_MAGIC) {
+ translate_error(global_fs, 0, EXT2_ET_BAD_MAGIC);
+ return NULL;
+ }
+ fs = ff->fs;
+ dbg_printf("%s: dev=%s\n", __func__, fs->device_name);
+#ifdef FUSE_CAP_IOCTL_DIR
+ conn->want |= FUSE_CAP_IOCTL_DIR;
+#endif
+ if (fs->flags & EXT2_FLAG_RW) {
+ fs->super->s_mnt_count++;
+ fs->super->s_mtime = time(NULL);
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(fs);
+ err = ext2fs_flush2(fs, 0);
+ if (err)
+ translate_error(fs, 0, err);
+ }
+ return ff;
+}
+
+static int stat_inode(ext2_filsys fs, ext2_ino_t ino, struct stat *statbuf)
+{
+ struct ext2_inode_large inode;
+ dev_t fakedev = 0;
+ errcode_t err;
+ int ret = 0;
+ struct timespec tv;
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, ino, err);
+
+ memcpy(&fakedev, fs->super->s_uuid, sizeof(fakedev));
+ statbuf->st_dev = fakedev;
+ statbuf->st_ino = ino;
+ statbuf->st_mode = inode.i_mode;
+ statbuf->st_nlink = inode.i_links_count;
+ statbuf->st_uid = inode_uid(inode);
+ statbuf->st_gid = inode_gid(inode);
+ statbuf->st_size = EXT2_I_SIZE(&inode);
+ statbuf->st_blksize = fs->blocksize;
+ statbuf->st_blocks = ext2fs_get_stat_i_blocks(fs,
+ (struct ext2_inode *)&inode);
+ EXT4_INODE_GET_XTIME(i_atime, &tv, &inode);
+ statbuf->st_atime = tv.tv_sec;
+ EXT4_INODE_GET_XTIME(i_mtime, &tv, &inode);
+ statbuf->st_mtime = tv.tv_sec;
+ EXT4_INODE_GET_XTIME(i_ctime, &tv, &inode);
+ statbuf->st_ctime = tv.tv_sec;
+ if (LINUX_S_ISCHR(inode.i_mode) ||
+ LINUX_S_ISBLK(inode.i_mode)) {
+ if (inode.i_block[0])
+ statbuf->st_rdev = inode.i_block[0];
+ else
+ statbuf->st_rdev = inode.i_block[1];
+ }
+
+ return ret;
+}
+
+static int op_getattr(const char *path, struct stat *statbuf)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: path=%s\n", __func__, path);
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ ret = stat_inode(fs, ino, statbuf);
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_readlink(const char *path, char *buf, size_t len)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ unsigned int got;
+ ext2_file_t file;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: path=%s\n", __func__, path);
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+
+ err = ext2fs_read_inode(fs, ino, &inode);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ if (!LINUX_S_ISLNK(inode.i_mode)) {
+ ret = -EINVAL;
+ goto out;
+ }
+
+ len--;
+ if (inode.i_size < len)
+ len = inode.i_size;
+ if (ext2fs_is_fast_symlink(&inode))
+ memcpy(buf, (char *)inode.i_block, len);
+ else {
+ /* big/inline symlink */
+
+ err = ext2fs_file_open(fs, ino, 0, &file);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ err = ext2fs_file_read(file, buf, len, &got);
+ if (err || got != len) {
+ ext2fs_file_close(file);
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+out2:
+ err = ext2fs_file_close(file);
+ if (ret)
+ goto out;
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+ }
+ buf[len] = 0;
+
+ if (fs_writeable(fs)) {
+ ret = update_atime(fs, ino);
+ if (ret)
+ goto out;
+ }
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_mknod(const char *path, mode_t mode, dev_t dev)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ ext2_ino_t parent, child;
+ char *temp_path;
+ errcode_t err;
+ char *node_name, a;
+ int filetype;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: path=%s mode=0%o dev=0x%x\n", __func__, path, mode,
+ (unsigned int)dev);
+ temp_path = strdup(path);
+ if (!temp_path) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name = strrchr(temp_path, '/');
+ if (!node_name) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name++;
+ a = *node_name;
+ *node_name = 0;
+
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_can_allocate(ff, 2)) {
+ ret = -ENOSPC;
+ goto out2;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_path,
+ &parent);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+
+ ret = check_inum_access(fs, parent, W_OK);
+ if (ret)
+ goto out2;
+
+ *node_name = a;
+
+ if (LINUX_S_ISCHR(mode))
+ filetype = EXT2_FT_CHRDEV;
+ else if (LINUX_S_ISBLK(mode))
+ filetype = EXT2_FT_BLKDEV;
+ else if (LINUX_S_ISFIFO(mode))
+ filetype = EXT2_FT_FIFO;
+ else if (LINUX_S_ISSOCK(mode))
+ filetype = EXT2_FT_SOCK;
+ else {
+ ret = -EINVAL;
+ goto out2;
+ }
+
+ err = ext2fs_new_inode(fs, parent, mode, 0, &child);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+
+ dbg_printf("%s: create ino=%d/name=%s in dir=%d\n", __func__, child,
+ node_name, parent);
+ err = ext2fs_link(fs, parent, node_name, child, filetype);
+ if (err == EXT2_ET_DIR_NO_SPACE) {
+ err = ext2fs_expand_dir(fs, parent);
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ err = ext2fs_link(fs, parent, node_name, child,
+ filetype);
+ }
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ ret = update_mtime(fs, parent, NULL);
+ if (ret)
+ goto out2;
+
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = mode;
+
+ if (dev & ~0xFFFF)
+ inode.i_block[1] = dev;
+ else
+ inode.i_block[0] = dev;
+ inode.i_links_count = 1;
+ inode.i_extra_isize = sizeof(struct ext2_inode_large) -
+ EXT2_GOOD_OLD_INODE_SIZE;
+ inode.i_uid = ctxt->uid;
+ ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
+ inode.i_gid = ctxt->gid;
+ ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
+
+ err = ext2fs_write_new_inode(fs, child, (struct ext2_inode *)&inode);
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+
+ inode.i_generation = ff->next_generation++;
+ init_times(&inode);
+ err = ext2fs_write_inode_full(fs, child, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+
+ ext2fs_inode_alloc_stats2(fs, child, 1, 0);
+
+out2:
+ pthread_mutex_unlock(&ff->bfl);
+out:
+ free(temp_path);
+ return ret;
+}
+
+static int op_mkdir(const char *path, mode_t mode)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ ext2_ino_t parent, child;
+ char *temp_path;
+ errcode_t err;
+ char *node_name, a;
+ struct ext2_inode_large inode;
+ char *block;
+ blk64_t blk;
+ int ret = 0;
+ mode_t parent_sgid;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: path=%s mode=0%o\n", __func__, path, mode);
+ temp_path = strdup(path);
+ if (!temp_path) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name = strrchr(temp_path, '/');
+ if (!node_name) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name++;
+ a = *node_name;
+ *node_name = 0;
+
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_can_allocate(ff, 1)) {
+ ret = -ENOSPC;
+ goto out2;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_path,
+ &parent);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+
+ ret = check_inum_access(fs, parent, W_OK);
+ if (ret)
+ goto out2;
+
+ /* Is the parent dir sgid? */
+ err = ext2fs_read_inode_full(fs, parent, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+ parent_sgid = inode.i_mode & S_ISGID;
+
+ *node_name = a;
+
+ err = ext2fs_mkdir(fs, parent, 0, node_name);
+ if (err == EXT2_ET_DIR_NO_SPACE) {
+ err = ext2fs_expand_dir(fs, parent);
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ err = ext2fs_mkdir(fs, parent, 0, node_name);
+ }
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ ret = update_mtime(fs, parent, NULL);
+ if (ret)
+ goto out2;
+
+ /* Still have to update the uid/gid of the dir */
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_path,
+ &child);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+ dbg_printf("%s: created ino=%d/path=%s in dir=%d\n", __func__, child,
+ node_name, parent);
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, child, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+
+ inode.i_uid = ctxt->uid;
+ ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
+ inode.i_gid = ctxt->gid;
+ ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
+ inode.i_mode = LINUX_S_IFDIR | (mode & ~(S_ISUID | fs->umask)) |
+ parent_sgid;
+ inode.i_generation = ff->next_generation++;
+
+ err = ext2fs_write_inode_full(fs, child, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+
+ /* Rewrite the directory block checksum, having set i_generation */
+ if ((inode.i_flags & EXT4_INLINE_DATA_FL) ||
+ !ext2fs_has_feature_metadata_csum(fs->super))
+ goto out2;
+ err = ext2fs_new_dir_block(fs, child, parent, &block);
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+ err = ext2fs_bmap2(fs, child, (struct ext2_inode *)&inode, NULL, 0, 0,
+ NULL, &blk);
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out3;
+ }
+ err = ext2fs_write_dir_block4(fs, blk, block, 0, child);
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out3;
+ }
+
+out3:
+ ext2fs_free_mem(&block);
+out2:
+ pthread_mutex_unlock(&ff->bfl);
+out:
+ free(temp_path);
+ return ret;
+}
+
+static int unlink_file_by_name(ext2_filsys fs, const char *path)
+{
+ errcode_t err;
+ ext2_ino_t dir;
+ char *filename = strdup(path);
+ char *base_name;
+ int ret;
+
+ base_name = strrchr(filename, '/');
+ if (base_name) {
+ *base_name++ = '\0';
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, filename,
+ &dir);
+ if (err) {
+ free(filename);
+ return translate_error(fs, 0, err);
+ }
+ } else {
+ dir = EXT2_ROOT_INO;
+ base_name = filename;
+ }
+
+ ret = check_inum_access(fs, dir, W_OK);
+ if (ret) {
+ free(filename);
+ return ret;
+ }
+
+ dbg_printf("%s: unlinking name=%s from dir=%d\n", __func__,
+ base_name, dir);
+ err = ext2fs_unlink(fs, dir, base_name, 0, 0);
+ free(filename);
+ if (err)
+ return translate_error(fs, dir, err);
+
+ return update_mtime(fs, dir, NULL);
+}
+
+static int remove_inode(struct fuse2fs *ff, ext2_ino_t ino)
+{
+ ext2_filsys fs = ff->fs;
+ errcode_t err;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+ dbg_printf("%s: put ino=%d links=%d\n", __func__, ino,
+ inode.i_links_count);
+
+ switch (inode.i_links_count) {
+ case 0:
+ return 0; /* XXX: already done? */
+ case 1:
+ inode.i_links_count--;
+ inode.i_dtime = fs->now ? fs->now : time(0);
+ break;
+ default:
+ inode.i_links_count--;
+ }
+
+ ret = update_ctime(fs, ino, &inode);
+ if (ret)
+ goto out;
+
+ if (inode.i_links_count)
+ goto write_out;
+
+ /* Nobody holds this file; free its blocks! */
+ err = ext2fs_free_ext_attr(fs, ino, &inode);
+ if (err)
+ goto write_out;
+
+ if (ext2fs_inode_has_valid_blocks2(fs, (struct ext2_inode *)&inode)) {
+ err = ext2fs_punch(fs, ino, (struct ext2_inode *)&inode, NULL,
+ 0, ~0ULL);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto write_out;
+ }
+ }
+
+ ext2fs_inode_alloc_stats2(fs, ino, -1,
+ LINUX_S_ISDIR(inode.i_mode));
+
+write_out:
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+out:
+ return ret;
+}
+
+static int __op_unlink(struct fuse2fs *ff, const char *path)
+{
+ ext2_filsys fs = ff->fs;
+ ext2_ino_t ino;
+ errcode_t err;
+ int ret = 0;
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+
+ ret = unlink_file_by_name(fs, path);
+ if (ret)
+ goto out;
+
+ ret = remove_inode(ff, ino);
+ if (ret)
+ goto out;
+out:
+ return ret;
+}
+
+static int op_unlink(const char *path)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ int ret;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ pthread_mutex_lock(&ff->bfl);
+ ret = __op_unlink(ff, path);
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+struct rd_struct {
+ ext2_ino_t parent;
+ int empty;
+};
+
+static int rmdir_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entry EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *private)
+{
+ struct rd_struct *rds = (struct rd_struct *) private;
+
+ if (dirent->inode == 0)
+ return 0;
+ if (((dirent->name_len & 0xFF) == 1) && (dirent->name[0] == '.'))
+ return 0;
+ if (((dirent->name_len & 0xFF) == 2) && (dirent->name[0] == '.') &&
+ (dirent->name[1] == '.')) {
+ rds->parent = dirent->inode;
+ return 0;
+ }
+ rds->empty = 0;
+ return 0;
+}
+
+static int __op_rmdir(struct fuse2fs *ff, const char *path)
+{
+ ext2_filsys fs = ff->fs;
+ ext2_ino_t child;
+ errcode_t err;
+ struct ext2_inode_large inode;
+ struct rd_struct rds;
+ int ret = 0;
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &child);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: rmdir path=%s ino=%d\n", __func__, path, child);
+
+ rds.parent = 0;
+ rds.empty = 1;
+
+ err = ext2fs_dir_iterate2(fs, child, 0, 0, rmdir_proc, &rds);
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out;
+ }
+
+ if (rds.empty == 0) {
+ ret = -ENOTEMPTY;
+ goto out;
+ }
+
+ ret = unlink_file_by_name(fs, path);
+ if (ret)
+ goto out;
+ /* Directories have to be "removed" twice. */
+ ret = remove_inode(ff, child);
+ if (ret)
+ goto out;
+ ret = remove_inode(ff, child);
+ if (ret)
+ goto out;
+
+ if (rds.parent) {
+ dbg_printf("%s: decr dir=%d link count\n", __func__,
+ rds.parent);
+ err = ext2fs_read_inode_full(fs, rds.parent,
+ (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, rds.parent, err);
+ goto out;
+ }
+ if (inode.i_links_count > 1)
+ inode.i_links_count--;
+ ret = update_mtime(fs, rds.parent, &inode);
+ if (ret)
+ goto out;
+ err = ext2fs_write_inode_full(fs, rds.parent,
+ (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, rds.parent, err);
+ goto out;
+ }
+ }
+
+out:
+ return ret;
+}
+
+static int op_rmdir(const char *path)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ int ret;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ pthread_mutex_lock(&ff->bfl);
+ ret = __op_rmdir(ff, path);
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_symlink(const char *src, const char *dest)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ ext2_ino_t parent, child;
+ char *temp_path;
+ errcode_t err;
+ char *node_name, a;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: symlink %s to %s\n", __func__, src, dest);
+ temp_path = strdup(dest);
+ if (!temp_path) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name = strrchr(temp_path, '/');
+ if (!node_name) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name++;
+ a = *node_name;
+ *node_name = 0;
+
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_path,
+ &parent);
+ *node_name = a;
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+
+ ret = check_inum_access(fs, parent, W_OK);
+ if (ret)
+ goto out2;
+
+
+ /* Create symlink */
+ err = ext2fs_symlink(fs, parent, 0, node_name, src);
+ if (err == EXT2_ET_DIR_NO_SPACE) {
+ err = ext2fs_expand_dir(fs, parent);
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ err = ext2fs_symlink(fs, parent, 0, node_name, src);
+ }
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ /* Update parent dir's mtime */
+ ret = update_mtime(fs, parent, NULL);
+ if (ret)
+ goto out2;
+
+ /* Still have to update the uid/gid of the symlink */
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_path,
+ &child);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+ dbg_printf("%s: symlinking ino=%d/name=%s to dir=%d\n", __func__,
+ child, node_name, parent);
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, child, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+
+ inode.i_uid = ctxt->uid;
+ ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
+ inode.i_gid = ctxt->gid;
+ ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
+ inode.i_generation = ff->next_generation++;
+
+ err = ext2fs_write_inode_full(fs, child, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+out2:
+ pthread_mutex_unlock(&ff->bfl);
+out:
+ free(temp_path);
+ return ret;
+}
+
+struct update_dotdot {
+ ext2_ino_t new_dotdot;
+};
+
+static int update_dotdot_helper(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entry EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct update_dotdot *ud = priv_data;
+
+ if (ext2fs_dirent_name_len(dirent) == 2 &&
+ dirent->name[0] == '.' && dirent->name[1] == '.') {
+ dirent->inode = ud->new_dotdot;
+ return DIRENT_CHANGED | DIRENT_ABORT;
+ }
+
+ return 0;
+}
+
+static int op_rename(const char *from, const char *to)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+ ext2_ino_t from_ino, to_ino, to_dir_ino, from_dir_ino;
+ char *temp_to = NULL, *temp_from = NULL;
+ char *cp, a;
+ struct ext2_inode inode;
+ struct update_dotdot ud;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: renaming %s to %s\n", __func__, from, to);
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_can_allocate(ff, 5)) {
+ ret = -ENOSPC;
+ goto out;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, from, &from_ino);
+ if (err || from_ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, to, &to_ino);
+ if (err && err != EXT2_ET_FILE_NOT_FOUND) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+
+ if (err == EXT2_ET_FILE_NOT_FOUND)
+ to_ino = 0;
+
+ /* Already the same file? */
+ if (to_ino != 0 && to_ino == from_ino) {
+ ret = 0;
+ goto out;
+ }
+
+ temp_to = strdup(to);
+ if (!temp_to) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ temp_from = strdup(from);
+ if (!temp_from) {
+ ret = -ENOMEM;
+ goto out2;
+ }
+
+ /* Find parent dir of the source and check write access */
+ cp = strrchr(temp_from, '/');
+ if (!cp) {
+ ret = -EINVAL;
+ goto out2;
+ }
+
+ a = *(cp + 1);
+ *(cp + 1) = 0;
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_from,
+ &from_dir_ino);
+ *(cp + 1) = a;
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+ if (from_dir_ino == 0) {
+ ret = -ENOENT;
+ goto out2;
+ }
+
+ ret = check_inum_access(fs, from_dir_ino, W_OK);
+ if (ret)
+ goto out2;
+
+ /* Find parent dir of the destination and check write access */
+ cp = strrchr(temp_to, '/');
+ if (!cp) {
+ ret = -EINVAL;
+ goto out2;
+ }
+
+ a = *(cp + 1);
+ *(cp + 1) = 0;
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_to,
+ &to_dir_ino);
+ *(cp + 1) = a;
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+ if (to_dir_ino == 0) {
+ ret = -ENOENT;
+ goto out2;
+ }
+
+ ret = check_inum_access(fs, to_dir_ino, W_OK);
+ if (ret)
+ goto out2;
+
+ /* If the target exists, unlink it first */
+ if (to_ino != 0) {
+ err = ext2fs_read_inode(fs, to_ino, &inode);
+ if (err) {
+ ret = translate_error(fs, to_ino, err);
+ goto out2;
+ }
+
+ dbg_printf("%s: unlinking %s ino=%d\n", __func__,
+ LINUX_S_ISDIR(inode.i_mode) ? "dir" : "file",
+ to_ino);
+ if (LINUX_S_ISDIR(inode.i_mode))
+ ret = __op_rmdir(ff, to);
+ else
+ ret = __op_unlink(ff, to);
+ if (ret)
+ goto out2;
+ }
+
+ /* Get ready to do the move */
+ err = ext2fs_read_inode(fs, from_ino, &inode);
+ if (err) {
+ ret = translate_error(fs, from_ino, err);
+ goto out2;
+ }
+
+ /* Link in the new file */
+ dbg_printf("%s: linking ino=%d/path=%s to dir=%d\n", __func__,
+ from_ino, cp + 1, to_dir_ino);
+ err = ext2fs_link(fs, to_dir_ino, cp + 1, from_ino,
+ ext2_file_type(inode.i_mode));
+ if (err == EXT2_ET_DIR_NO_SPACE) {
+ err = ext2fs_expand_dir(fs, to_dir_ino);
+ if (err) {
+ ret = translate_error(fs, to_dir_ino, err);
+ goto out2;
+ }
+
+ err = ext2fs_link(fs, to_dir_ino, cp + 1, from_ino,
+ ext2_file_type(inode.i_mode));
+ }
+ if (err) {
+ ret = translate_error(fs, to_dir_ino, err);
+ goto out2;
+ }
+
+ /* Update '..' pointer if dir */
+ err = ext2fs_read_inode(fs, from_ino, &inode);
+ if (err) {
+ ret = translate_error(fs, from_ino, err);
+ goto out2;
+ }
+
+ if (LINUX_S_ISDIR(inode.i_mode)) {
+ ud.new_dotdot = to_dir_ino;
+ dbg_printf("%s: updating .. entry for dir=%d\n", __func__,
+ to_dir_ino);
+ err = ext2fs_dir_iterate2(fs, from_ino, 0, NULL,
+ update_dotdot_helper, &ud);
+ if (err) {
+ ret = translate_error(fs, from_ino, err);
+ goto out2;
+ }
+
+ /* Decrease from_dir_ino's links_count */
+ dbg_printf("%s: moving linkcount from dir=%d to dir=%d\n",
+ __func__, from_dir_ino, to_dir_ino);
+ err = ext2fs_read_inode(fs, from_dir_ino, &inode);
+ if (err) {
+ ret = translate_error(fs, from_dir_ino, err);
+ goto out2;
+ }
+ inode.i_links_count--;
+ err = ext2fs_write_inode(fs, from_dir_ino, &inode);
+ if (err) {
+ ret = translate_error(fs, from_dir_ino, err);
+ goto out2;
+ }
+
+ /* Increase to_dir_ino's links_count */
+ err = ext2fs_read_inode(fs, to_dir_ino, &inode);
+ if (err) {
+ ret = translate_error(fs, to_dir_ino, err);
+ goto out2;
+ }
+ inode.i_links_count++;
+ err = ext2fs_write_inode(fs, to_dir_ino, &inode);
+ if (err) {
+ ret = translate_error(fs, to_dir_ino, err);
+ goto out2;
+ }
+ }
+
+ /* Update timestamps */
+ ret = update_ctime(fs, from_ino, NULL);
+ if (ret)
+ goto out2;
+
+ ret = update_mtime(fs, to_dir_ino, NULL);
+ if (ret)
+ goto out2;
+
+ /* Remove the old file */
+ ret = unlink_file_by_name(fs, from);
+ if (ret)
+ goto out2;
+
+ /* Flush the whole mess out */
+ err = ext2fs_flush2(fs, 0);
+ if (err)
+ ret = translate_error(fs, 0, err);
+
+out2:
+ free(temp_from);
+ free(temp_to);
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_link(const char *src, const char *dest)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ char *temp_path;
+ errcode_t err;
+ char *node_name, a;
+ ext2_ino_t parent, ino;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: src=%s dest=%s\n", __func__, src, dest);
+ temp_path = strdup(dest);
+ if (!temp_path) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name = strrchr(temp_path, '/');
+ if (!node_name) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name++;
+ a = *node_name;
+ *node_name = 0;
+
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_can_allocate(ff, 2)) {
+ ret = -ENOSPC;
+ goto out2;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_path,
+ &parent);
+ *node_name = a;
+ if (err) {
+ err = -ENOENT;
+ goto out2;
+ }
+
+ ret = check_inum_access(fs, parent, W_OK);
+ if (ret)
+ goto out2;
+
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, src, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ inode.i_links_count++;
+ ret = update_ctime(fs, ino, &inode);
+ if (ret)
+ goto out2;
+
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ dbg_printf("%s: linking ino=%d/name=%s to dir=%d\n", __func__, ino,
+ node_name, parent);
+ err = ext2fs_link(fs, parent, node_name, ino,
+ ext2_file_type(inode.i_mode));
+ if (err == EXT2_ET_DIR_NO_SPACE) {
+ err = ext2fs_expand_dir(fs, parent);
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ err = ext2fs_link(fs, parent, node_name, ino,
+ ext2_file_type(inode.i_mode));
+ }
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ ret = update_mtime(fs, parent, NULL);
+ if (ret)
+ goto out2;
+
+out2:
+ pthread_mutex_unlock(&ff->bfl);
+out:
+ free(temp_path);
+ return ret;
+}
+
+static int op_chmod(const char *path, mode_t mode)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+ ext2_ino_t ino;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: path=%s mode=0%o ino=%d\n", __func__, path, mode, ino);
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ if (!ff->fakeroot && ctxt->uid != 0 && ctxt->uid != inode_uid(inode)) {
+ ret = -EPERM;
+ goto out;
+ }
+
+ /*
+ * XXX: We should really check that the inode gid is not in /any/
+ * of the user's groups, but FUSE only tells us about the primary
+ * group.
+ */
+ if (!ff->fakeroot && ctxt->uid != 0 && ctxt->gid != inode_gid(inode))
+ mode &= ~S_ISGID;
+
+ inode.i_mode &= ~0xFFF;
+ inode.i_mode |= mode & 0xFFF;
+ ret = update_ctime(fs, ino, &inode);
+ if (ret)
+ goto out;
+
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_chown(const char *path, uid_t owner, gid_t group)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+ ext2_ino_t ino;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: path=%s owner=%d group=%d ino=%d\n", __func__,
+ path, owner, group, ino);
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ /* FUSE seems to feed us ~0 to mean "don't change" */
+ if (owner != (uid_t) ~0) {
+ /* Only root gets to change UID. */
+ if (!ff->fakeroot && ctxt->uid != 0 &&
+ !(inode_uid(inode) == ctxt->uid && owner == ctxt->uid)) {
+ ret = -EPERM;
+ goto out;
+ }
+ inode.i_uid = owner;
+ ext2fs_set_i_uid_high(inode, owner >> 16);
+ }
+
+ if (group != (gid_t) ~0) {
+ /* Only root or the owner get to change GID. */
+ if (!ff->fakeroot && ctxt->uid != 0 &&
+ inode_uid(inode) != ctxt->uid) {
+ ret = -EPERM;
+ goto out;
+ }
+
+ /* XXX: We /should/ check group membership but FUSE */
+ inode.i_gid = group;
+ ext2fs_set_i_gid_high(inode, group >> 16);
+ }
+
+ ret = update_ctime(fs, ino, &inode);
+ if (ret)
+ goto out;
+
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_truncate(const char *path, off_t len)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+ ext2_ino_t ino;
+ ext2_file_t file;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d len=%jd\n", __func__, ino, len);
+
+ ret = check_inum_access(fs, ino, W_OK);
+ if (ret)
+ goto out;
+
+ err = ext2fs_file_open(fs, ino, EXT2_FILE_WRITE, &file);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ err = ext2fs_file_set_size2(file, len);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+out2:
+ err = ext2fs_file_close(file);
+ if (ret)
+ goto out;
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ ret = update_mtime(fs, ino, NULL);
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return err;
+}
+
+#ifdef __linux__
+static void detect_linux_executable_open(int kernel_flags, int *access_check,
+ int *e2fs_open_flags)
+{
+ /*
+ * On Linux, execve will bleed __FMODE_EXEC into the file mode flags,
+ * and FUSE is more than happy to let that slip through.
+ */
+ if (kernel_flags & 0x20) {
+ *access_check = X_OK;
+ *e2fs_open_flags &= ~EXT2_FILE_WRITE;
+ }
+}
+#else
+static void detect_linux_executable_open(int kernel_flags, int *access_check,
+ int *e2fs_open_flags)
+{
+ /* empty */
+}
+#endif /* __linux__ */
+
+static int __op_open(struct fuse2fs *ff, const char *path,
+ struct fuse_file_info *fp)
+{
+ ext2_filsys fs = ff->fs;
+ errcode_t err;
+ struct fuse2fs_file_handle *file;
+ int check = 0, ret = 0;
+
+ dbg_printf("%s: path=%s\n", __func__, path);
+ err = ext2fs_get_mem(sizeof(*file), &file);
+ if (err)
+ return translate_error(fs, 0, err);
+ file->magic = FUSE2FS_FILE_MAGIC;
+
+ file->open_flags = 0;
+ switch (fp->flags & O_ACCMODE) {
+ case O_RDONLY:
+ check = R_OK;
+ break;
+ case O_WRONLY:
+ check = W_OK;
+ file->open_flags |= EXT2_FILE_WRITE;
+ break;
+ case O_RDWR:
+ check = R_OK | W_OK;
+ file->open_flags |= EXT2_FILE_WRITE;
+ break;
+ }
+
+ detect_linux_executable_open(fp->flags, &check, &file->open_flags);
+
+ if (fp->flags & O_CREAT)
+ file->open_flags |= EXT2_FILE_CREATE;
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &file->ino);
+ if (err || file->ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d\n", __func__, file->ino);
+
+ ret = check_inum_access(fs, file->ino, check);
+ if (ret) {
+ /*
+ * In a regular (Linux) fs driver, the kernel will open
+ * binaries for reading if the user has --x privileges (i.e.
+ * execute without read). Since the kernel doesn't have any
+ * way to tell us if it's opening a file via execve, we'll
+ * just assume that allowing access is ok if asking for ro mode
+ * fails but asking for x mode succeeds. Of course we can
+ * also employ undocumented hacks (see above).
+ */
+ if (check == R_OK) {
+ ret = check_inum_access(fs, file->ino, X_OK);
+ if (ret)
+ goto out;
+ } else
+ goto out;
+ }
+ fp->fh = (uintptr_t)file;
+
+out:
+ if (ret)
+ ext2fs_free_mem(&file);
+ return ret;
+}
+
+static int op_open(const char *path, struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ int ret;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ pthread_mutex_lock(&ff->bfl);
+ ret = __op_open(ff, path, fp);
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_read(const char *path EXT2FS_ATTR((unused)), char *buf,
+ size_t len, off_t offset,
+ struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ ext2_file_t efp;
+ errcode_t err;
+ unsigned int got = 0;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d off=%jd len=%jd\n", __func__, fh->ino, offset,
+ len);
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_file_open(fs, fh->ino, fh->open_flags, &efp);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out;
+ }
+
+ err = ext2fs_file_llseek(efp, offset, SEEK_SET, NULL);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out2;
+ }
+
+ err = ext2fs_file_read(efp, buf, len, &got);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out2;
+ }
+
+out2:
+ err = ext2fs_file_close(efp);
+ if (ret)
+ goto out;
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out;
+ }
+
+ if (fs_writeable(fs)) {
+ ret = update_atime(fs, fh->ino);
+ if (ret)
+ goto out;
+ }
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return got ? (int) got : ret;
+}
+
+static int op_write(const char *path EXT2FS_ATTR((unused)),
+ const char *buf, size_t len, off_t offset,
+ struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ ext2_file_t efp;
+ errcode_t err;
+ unsigned int got = 0;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d off=%jd len=%jd\n", __func__, fh->ino, offset,
+ len);
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_writeable(fs)) {
+ ret = -EROFS;
+ goto out;
+ }
+
+ if (!fs_can_allocate(ff, len / fs->blocksize)) {
+ ret = -ENOSPC;
+ goto out;
+ }
+
+ err = ext2fs_file_open(fs, fh->ino, fh->open_flags, &efp);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out;
+ }
+
+ err = ext2fs_file_llseek(efp, offset, SEEK_SET, NULL);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out2;
+ }
+
+ err = ext2fs_file_write(efp, buf, len, &got);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out2;
+ }
+
+ err = ext2fs_file_flush(efp);
+ if (err) {
+ got = 0;
+ ret = translate_error(fs, fh->ino, err);
+ goto out2;
+ }
+
+out2:
+ err = ext2fs_file_close(efp);
+ if (ret)
+ goto out;
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out;
+ }
+
+ ret = update_mtime(fs, fh->ino, NULL);
+ if (ret)
+ goto out;
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return got ? (int) got : ret;
+}
+
+static int op_release(const char *path EXT2FS_ATTR((unused)),
+ struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ pthread_mutex_lock(&ff->bfl);
+ if (fs_writeable(fs) && fh->open_flags & EXT2_FILE_WRITE) {
+ err = ext2fs_flush2(fs, EXT2_FLAG_FLUSH_NO_SYNC);
+ if (err)
+ ret = translate_error(fs, fh->ino, err);
+ }
+ fp->fh = 0;
+ pthread_mutex_unlock(&ff->bfl);
+
+ ext2fs_free_mem(&fh);
+
+ return ret;
+}
+
+static int op_fsync(const char *path EXT2FS_ATTR((unused)),
+ int datasync EXT2FS_ATTR((unused)),
+ struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ /* For now, flush everything, even if it's slow */
+ pthread_mutex_lock(&ff->bfl);
+ if (fs_writeable(fs) && fh->open_flags & EXT2_FILE_WRITE) {
+ err = ext2fs_flush2(fs, 0);
+ if (err)
+ ret = translate_error(fs, fh->ino, err);
+ }
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+
+static int op_statfs(const char *path EXT2FS_ATTR((unused)),
+ struct statvfs *buf)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ uint64_t fsid, *f;
+ blk64_t overhead, reserved, free;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: path=%s\n", __func__, path);
+ buf->f_bsize = fs->blocksize;
+ buf->f_frsize = 0;
+
+ if (ff->minixdf)
+ overhead = 0;
+ else
+ overhead = fs->desc_blocks +
+ (blk64_t)fs->group_desc_count *
+ (fs->inode_blocks_per_group + 2);
+ reserved = ext2fs_r_blocks_count(fs->super);
+ if (!reserved)
+ reserved = ext2fs_blocks_count(fs->super) / 10;
+ free = ext2fs_free_blocks_count(fs->super);
+
+ buf->f_blocks = ext2fs_blocks_count(fs->super) - overhead;
+ buf->f_bfree = free;
+ if (free < reserved)
+ buf->f_bavail = 0;
+ else
+ buf->f_bavail = free - reserved;
+ buf->f_files = fs->super->s_inodes_count;
+ buf->f_ffree = fs->super->s_free_inodes_count;
+ buf->f_favail = fs->super->s_free_inodes_count;
+ f = (uint64_t *)fs->super->s_uuid;
+ fsid = *f;
+ f++;
+ fsid ^= *f;
+ buf->f_fsid = fsid;
+ buf->f_flag = 0;
+ if (fs->flags & EXT2_FLAG_RW)
+ buf->f_flag |= ST_RDONLY;
+ buf->f_namemax = EXT2_NAME_LEN;
+
+ return 0;
+}
+
+typedef errcode_t (*xattr_xlate_get)(void **cooked_buf, size_t *cooked_sz,
+ const void *raw_buf, size_t raw_sz);
+typedef errcode_t (*xattr_xlate_set)(const void *cooked_buf, size_t cooked_sz,
+ const void **raw_buf, size_t *raw_sz);
+struct xattr_translate {
+ const char *prefix;
+ xattr_xlate_get get;
+ xattr_xlate_set set;
+};
+
+#define XATTR_TRANSLATOR(p, g, s) \
+ {.prefix = (p), \
+ .get = (xattr_xlate_get)(g), \
+ .set = (xattr_xlate_set)(s)}
+
+static struct xattr_translate xattr_translators[] = {
+#ifdef TRANSLATE_LINUX_ACLS
+ XATTR_TRANSLATOR(ACL_EA_ACCESS, ext4_to_fuse_acl, fuse_to_ext4_acl),
+ XATTR_TRANSLATOR(ACL_EA_DEFAULT, ext4_to_fuse_acl, fuse_to_ext4_acl),
+#endif
+ XATTR_TRANSLATOR(NULL, NULL, NULL),
+};
+#undef XATTR_TRANSLATOR
+
+static int op_getxattr(const char *path, const char *key, char *value,
+ size_t len)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ struct ext2_xattr_handle *h;
+ struct xattr_translate *xt;
+ void *ptr, *cptr;
+ size_t plen, clen;
+ ext2_ino_t ino;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ if (!ext2fs_has_feature_xattr(fs->super)) {
+ ret = -ENOTSUP;
+ goto out;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d\n", __func__, ino);
+
+ ret = check_inum_access(fs, ino, R_OK);
+ if (ret)
+ goto out;
+
+ err = ext2fs_xattrs_open(fs, ino, &h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ err = ext2fs_xattrs_read(h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ err = ext2fs_xattr_get(h, key, &ptr, &plen);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ for (xt = xattr_translators; xt->prefix != NULL; xt++) {
+ if (strncmp(key, xt->prefix, strlen(xt->prefix)) == 0) {
+ err = xt->get(&cptr, &clen, ptr, plen);
+ if (err)
+ goto out3;
+ ext2fs_free_mem(&ptr);
+ ptr = cptr;
+ plen = clen;
+ }
+ }
+
+ if (!len) {
+ ret = plen;
+ } else if (len < plen) {
+ ret = -ERANGE;
+ } else {
+ memcpy(value, ptr, plen);
+ ret = plen;
+ }
+
+out3:
+ ext2fs_free_mem(&ptr);
+out2:
+ err = ext2fs_xattrs_close(&h);
+ if (err)
+ ret = translate_error(fs, ino, err);
+out:
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+
+static int count_buffer_space(char *name, char *value EXT2FS_ATTR((unused)),
+ size_t value_len EXT2FS_ATTR((unused)),
+ void *data)
+{
+ unsigned int *x = data;
+
+ *x = *x + strlen(name) + 1;
+ return 0;
+}
+
+static int copy_names(char *name, char *value EXT2FS_ATTR((unused)),
+ size_t value_len EXT2FS_ATTR((unused)), void *data)
+{
+ char **b = data;
+ size_t name_len = strlen(name);
+
+ memcpy(*b, name, name_len + 1);
+ *b = *b + name_len + 1;
+
+ return 0;
+}
+
+static int op_listxattr(const char *path, char *names, size_t len)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ struct ext2_xattr_handle *h;
+ unsigned int bufsz;
+ ext2_ino_t ino;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ if (!ext2fs_has_feature_xattr(fs->super)) {
+ ret = -ENOTSUP;
+ goto out;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d\n", __func__, ino);
+
+ ret = check_inum_access(fs, ino, R_OK);
+ if (ret)
+ goto out;
+
+ err = ext2fs_xattrs_open(fs, ino, &h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ err = ext2fs_xattrs_read(h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ /* Count buffer space needed for names */
+ bufsz = 0;
+ err = ext2fs_xattrs_iterate(h, count_buffer_space, &bufsz);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ if (len == 0) {
+ ret = bufsz;
+ goto out2;
+ } else if (len < bufsz) {
+ ret = -ERANGE;
+ goto out2;
+ }
+
+ /* Copy names out */
+ memset(names, 0, len);
+ err = ext2fs_xattrs_iterate(h, copy_names, &names);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+ ret = bufsz;
+out2:
+ err = ext2fs_xattrs_close(&h);
+ if (err)
+ ret = translate_error(fs, ino, err);
+out:
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+
+static int op_setxattr(const char *path EXT2FS_ATTR((unused)),
+ const char *key, const char *value,
+ size_t len, int flags EXT2FS_ATTR((unused)))
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ struct ext2_xattr_handle *h;
+ struct xattr_translate *xt;
+ const void *cvalue;
+ size_t clen;
+ ext2_ino_t ino;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ if (!ext2fs_has_feature_xattr(fs->super)) {
+ ret = -ENOTSUP;
+ goto out;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d\n", __func__, ino);
+
+ ret = check_inum_access(fs, ino, W_OK);
+ if (ret == -EACCES) {
+ ret = -EPERM;
+ goto out;
+ } else if (ret)
+ goto out;
+
+ err = ext2fs_xattrs_open(fs, ino, &h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ err = ext2fs_xattrs_read(h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ cvalue = value;
+ clen = len;
+ for (xt = xattr_translators; xt->prefix != NULL; xt++) {
+ if (strncmp(key, xt->prefix, strlen(xt->prefix)) == 0) {
+ err = xt->set(value, len, &cvalue, &clen);
+ if (err)
+ goto out3;
+ }
+ }
+
+ err = ext2fs_xattr_set(h, key, cvalue, clen);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out3;
+ }
+
+ ret = update_ctime(fs, ino, NULL);
+out3:
+ if (cvalue != value)
+ ext2fs_free_mem(&cvalue);
+out2:
+ err = ext2fs_xattrs_close(&h);
+ if (!ret && err)
+ ret = translate_error(fs, ino, err);
+out:
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+
+static int op_removexattr(const char *path, const char *key)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ struct ext2_xattr_handle *h;
+ ext2_ino_t ino;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ if (!ext2fs_has_feature_xattr(fs->super)) {
+ ret = -ENOTSUP;
+ goto out;
+ }
+
+ if (!fs_can_allocate(ff, 1)) {
+ ret = -ENOSPC;
+ goto out;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d\n", __func__, ino);
+
+ ret = check_inum_access(fs, ino, W_OK);
+ if (ret)
+ goto out;
+
+ err = ext2fs_xattrs_open(fs, ino, &h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ err = ext2fs_xattrs_read(h);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ err = ext2fs_xattr_remove(h, key);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out2;
+ }
+
+ ret = update_ctime(fs, ino, NULL);
+out2:
+ err = ext2fs_xattrs_close(&h);
+ if (err)
+ ret = translate_error(fs, ino, err);
+out:
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+
+struct readdir_iter {
+ void *buf;
+ fuse_fill_dir_t func;
+};
+
+static int op_readdir_iter(ext2_ino_t dir EXT2FS_ATTR((unused)),
+ int entry EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *dirent,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)), void *data)
+{
+ struct readdir_iter *i = data;
+ char namebuf[EXT2_NAME_LEN + 1];
+ int ret;
+
+ memcpy(namebuf, dirent->name, dirent->name_len & 0xFF);
+ namebuf[dirent->name_len & 0xFF] = 0;
+ ret = i->func(i->buf, namebuf, NULL, 0);
+ if (ret)
+ return DIRENT_ABORT;
+
+ return 0;
+}
+
+static int op_readdir(const char *path EXT2FS_ATTR((unused)),
+ void *buf, fuse_fill_dir_t fill_func,
+ off_t offset EXT2FS_ATTR((unused)),
+ struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ errcode_t err;
+ struct readdir_iter i;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ pthread_mutex_lock(&ff->bfl);
+ i.buf = buf;
+ i.func = fill_func;
+ err = ext2fs_dir_iterate2(fs, fh->ino, 0, NULL, op_readdir_iter, &i);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out;
+ }
+
+ if (fs_writeable(fs)) {
+ ret = update_atime(fs, fh->ino);
+ if (ret)
+ goto out;
+ }
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_access(const char *path, int mask)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ errcode_t err;
+ ext2_ino_t ino;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: path=%s mask=0x%x\n", __func__, path, mask);
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err || ino == 0) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+
+ ret = check_inum_access(fs, ino, mask);
+ if (ret)
+ goto out;
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+static int op_create(const char *path, mode_t mode, struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ ext2_ino_t parent, child;
+ char *temp_path;
+ errcode_t err;
+ char *node_name, a;
+ int filetype;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ dbg_printf("%s: path=%s mode=0%o\n", __func__, path, mode);
+ temp_path = strdup(path);
+ if (!temp_path) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name = strrchr(temp_path, '/');
+ if (!node_name) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ node_name++;
+ a = *node_name;
+ *node_name = 0;
+
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_can_allocate(ff, 1)) {
+ ret = -ENOSPC;
+ goto out2;
+ }
+
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, temp_path,
+ &parent);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out2;
+ }
+
+ ret = check_inum_access(fs, parent, W_OK);
+ if (ret)
+ goto out2;
+
+ *node_name = a;
+
+ filetype = ext2_file_type(mode);
+
+ err = ext2fs_new_inode(fs, parent, mode, 0, &child);
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ dbg_printf("%s: creating ino=%d/name=%s in dir=%d\n", __func__, child,
+ node_name, parent);
+ err = ext2fs_link(fs, parent, node_name, child, filetype);
+ if (err == EXT2_ET_DIR_NO_SPACE) {
+ err = ext2fs_expand_dir(fs, parent);
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ err = ext2fs_link(fs, parent, node_name, child,
+ filetype);
+ }
+ if (err) {
+ ret = translate_error(fs, parent, err);
+ goto out2;
+ }
+
+ ret = update_mtime(fs, parent, NULL);
+ if (ret)
+ goto out2;
+
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = mode;
+ inode.i_links_count = 1;
+ inode.i_extra_isize = sizeof(struct ext2_inode_large) -
+ EXT2_GOOD_OLD_INODE_SIZE;
+ inode.i_uid = ctxt->uid;
+ ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
+ inode.i_gid = ctxt->gid;
+ ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
+ if (ext2fs_has_feature_extents(fs->super)) {
+ ext2_extent_handle_t handle;
+
+ inode.i_flags &= ~EXT4_EXTENTS_FL;
+ ret = ext2fs_extent_open2(fs, child,
+ (struct ext2_inode *)&inode, &handle);
+ if (ret)
+ return ret;
+ ext2fs_extent_free(handle);
+ }
+
+ err = ext2fs_write_new_inode(fs, child, (struct ext2_inode *)&inode);
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+
+ inode.i_generation = ff->next_generation++;
+ init_times(&inode);
+ err = ext2fs_write_inode_full(fs, child, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, child, err);
+ goto out2;
+ }
+
+ ext2fs_inode_alloc_stats2(fs, child, 1, 0);
+
+ ret = __op_open(ff, path, fp);
+ if (ret)
+ goto out2;
+out2:
+ pthread_mutex_unlock(&ff->bfl);
+out:
+ free(temp_path);
+ return ret;
+}
+
+static int op_ftruncate(const char *path EXT2FS_ATTR((unused)),
+ off_t len, struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ ext2_file_t efp;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d len=%jd\n", __func__, fh->ino, len);
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_writeable(fs)) {
+ ret = -EROFS;
+ goto out;
+ }
+
+ err = ext2fs_file_open(fs, fh->ino, fh->open_flags, &efp);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out;
+ }
+
+ err = ext2fs_file_set_size2(efp, len);
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out2;
+ }
+
+out2:
+ err = ext2fs_file_close(efp);
+ if (ret)
+ goto out;
+ if (err) {
+ ret = translate_error(fs, fh->ino, err);
+ goto out;
+ }
+
+ ret = update_mtime(fs, fh->ino, NULL);
+ if (ret)
+ goto out;
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return 0;
+}
+
+static int op_fgetattr(const char *path EXT2FS_ATTR((unused)),
+ struct stat *statbuf,
+ struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ pthread_mutex_lock(&ff->bfl);
+ ret = stat_inode(fs, fh->ino, statbuf);
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+
+static int op_utimens(const char *path, const struct timespec ctv[2])
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct timespec tv[2];
+ ext2_filsys fs;
+ errcode_t err;
+ ext2_ino_t ino;
+ struct ext2_inode_large inode;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d\n", __func__, ino);
+
+ ret = check_inum_access(fs, ino, W_OK);
+ if (ret)
+ goto out;
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+ tv[0] = ctv[0];
+ tv[1] = ctv[1];
+#ifdef UTIME_NOW
+ if (tv[0].tv_nsec == UTIME_NOW)
+ get_now(tv);
+ if (tv[1].tv_nsec == UTIME_NOW)
+ get_now(tv + 1);
+#endif /* UTIME_NOW */
+#ifdef UTIME_OMIT
+ if (tv[0].tv_nsec != UTIME_OMIT)
+ EXT4_INODE_SET_XTIME(i_atime, tv, &inode);
+ if (tv[1].tv_nsec != UTIME_OMIT)
+ EXT4_INODE_SET_XTIME(i_mtime, tv + 1, &inode);
+#endif /* UTIME_OMIT */
+ ret = update_ctime(fs, ino, &inode);
+ if (ret)
+ goto out;
+
+ err = ext2fs_write_inode_full(fs, ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+#ifdef SUPPORT_I_FLAGS
+static int ioctl_getflags(ext2_filsys fs, struct fuse2fs_file_handle *fh,
+ void *data)
+{
+ errcode_t err;
+ struct ext2_inode_large inode;
+
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ *(__u32 *)data = inode.i_flags & EXT2_FL_USER_VISIBLE;
+ return 0;
+}
+
+#define FUSE2FS_MODIFIABLE_IFLAGS \
+ (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL | EXT2_NODUMP_FL | \
+ EXT2_NOATIME_FL | EXT3_JOURNAL_DATA_FL | EXT2_DIRSYNC_FL | \
+ EXT2_TOPDIR_FL)
+
+static int ioctl_setflags(ext2_filsys fs, struct fuse2fs_file_handle *fh,
+ void *data)
+{
+ errcode_t err;
+ struct ext2_inode_large inode;
+ int ret;
+ __u32 flags = *(__u32 *)data;
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ if (!ff->fakeroot && ctxt->uid != 0 && inode_uid(inode) != ctxt->uid)
+ return -EPERM;
+
+ if ((inode.i_flags ^ flags) & ~FUSE2FS_MODIFIABLE_IFLAGS)
+ return -EINVAL;
+
+ inode.i_flags = (inode.i_flags & ~FUSE2FS_MODIFIABLE_IFLAGS) |
+ (flags & FUSE2FS_MODIFIABLE_IFLAGS);
+
+ ret = update_ctime(fs, fh->ino, &inode);
+ if (ret)
+ return ret;
+
+ err = ext2fs_write_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ return 0;
+}
+
+static int ioctl_getversion(ext2_filsys fs, struct fuse2fs_file_handle *fh,
+ void *data)
+{
+ errcode_t err;
+ struct ext2_inode_large inode;
+
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ *(__u32 *)data = inode.i_generation;
+ return 0;
+}
+
+static int ioctl_setversion(ext2_filsys fs, struct fuse2fs_file_handle *fh,
+ void *data)
+{
+ errcode_t err;
+ struct ext2_inode_large inode;
+ int ret;
+ __u32 generation = *(__u32 *)data;
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: ino=%d\n", __func__, fh->ino);
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ if (!ff->fakeroot && ctxt->uid != 0 && inode_uid(inode) != ctxt->uid)
+ return -EPERM;
+
+ inode.i_generation = generation;
+
+ ret = update_ctime(fs, fh->ino, &inode);
+ if (ret)
+ return ret;
+
+ err = ext2fs_write_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ return 0;
+}
+#endif /* SUPPORT_I_FLAGS */
+
+#ifdef FITRIM
+static int ioctl_fitrim(ext2_filsys fs, struct fuse2fs_file_handle *fh,
+ void *data)
+{
+ struct fstrim_range *fr = data;
+ blk64_t start, end, max_blocks, b, cleared;
+ errcode_t err = 0;
+
+ start = fr->start / fs->blocksize;
+ end = (fr->start + fr->len - 1) / fs->blocksize;
+ dbg_printf("%s: start=%llu end=%llu\n", __func__, start, end);
+
+ if (start < fs->super->s_first_data_block)
+ start = fs->super->s_first_data_block;
+ if (start >= ext2fs_blocks_count(fs->super))
+ start = ext2fs_blocks_count(fs->super) - 1;
+
+ if (end < fs->super->s_first_data_block)
+ end = fs->super->s_first_data_block;
+ if (end >= ext2fs_blocks_count(fs->super))
+ end = ext2fs_blocks_count(fs->super) - 1;
+
+ cleared = 0;
+ max_blocks = 2048ULL * 1024 * 1024 / fs->blocksize;
+
+ fr->len = 0;
+ while (start <= end) {
+ err = ext2fs_find_first_zero_block_bitmap2(fs->block_map,
+ start, end, &start);
+ if (err == ENOENT)
+ return 0;
+ else if (err)
+ return translate_error(fs, fh->ino, err);
+
+ b = start + max_blocks < end ? start + max_blocks : end;
+ err = ext2fs_find_first_set_block_bitmap2(fs->block_map,
+ start, b, &b);
+ if (err && err != ENOENT)
+ return translate_error(fs, fh->ino, err);
+ if (b - start >= fr->minlen) {
+ err = io_channel_discard(fs->io, start, b - start);
+ if (err)
+ return translate_error(fs, fh->ino, err);
+ cleared += b - start;
+ fr->len = cleared * fs->blocksize;
+ }
+ start = b + 1;
+ }
+
+ return err;
+}
+#endif /* FITRIM */
+
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8)
+static int op_ioctl(const char *path EXT2FS_ATTR((unused)), int cmd,
+ void *arg EXT2FS_ATTR((unused)),
+ struct fuse_file_info *fp,
+ unsigned int flags EXT2FS_ATTR((unused)), void *data)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ switch ((unsigned long) cmd) {
+#ifdef SUPPORT_I_FLAGS
+ case EXT2_IOC_GETFLAGS:
+ ret = ioctl_getflags(fs, fh, data);
+ break;
+ case EXT2_IOC_SETFLAGS:
+ ret = ioctl_setflags(fs, fh, data);
+ break;
+ case EXT2_IOC_GETVERSION:
+ ret = ioctl_getversion(fs, fh, data);
+ break;
+ case EXT2_IOC_SETVERSION:
+ ret = ioctl_setversion(fs, fh, data);
+ break;
+#endif
+#ifdef FITRIM
+ case FITRIM:
+ ret = ioctl_fitrim(fs, fh, data);
+ break;
+#endif
+ default:
+ dbg_printf("%s: Unknown ioctl %d\n", __func__, cmd);
+ ret = -ENOTTY;
+ }
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+#endif /* FUSE 28 */
+
+static int op_bmap(const char *path, size_t blocksize EXT2FS_ATTR((unused)),
+ uint64_t *idx)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ errcode_t err;
+ int ret = 0;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ pthread_mutex_lock(&ff->bfl);
+ err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, path, &ino);
+ if (err) {
+ ret = translate_error(fs, 0, err);
+ goto out;
+ }
+ dbg_printf("%s: ino=%d blk=%"PRIu64"\n", __func__, ino, *idx);
+
+ err = ext2fs_bmap2(fs, ino, NULL, NULL, 0, *idx, 0, (blk64_t *)idx);
+ if (err) {
+ ret = translate_error(fs, ino, err);
+ goto out;
+ }
+
+out:
+ pthread_mutex_unlock(&ff->bfl);
+ return ret;
+}
+
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 9)
+# ifdef SUPPORT_FALLOCATE
+static int fallocate_helper(struct fuse_file_info *fp, int mode, off_t offset,
+ off_t len)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ struct ext2_inode_large inode;
+ blk64_t start, end;
+ __u64 fsize;
+ errcode_t err;
+ int flags;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ start = offset / fs->blocksize;
+ end = (offset + len - 1) / fs->blocksize;
+ dbg_printf("%s: ino=%d mode=0x%x start=%jd end=%llu\n", __func__,
+ fh->ino, mode, offset / fs->blocksize, end);
+ if (!fs_can_allocate(ff, len / fs->blocksize))
+ return -ENOSPC;
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return err;
+ fsize = EXT2_I_SIZE(&inode);
+
+ /* Allocate a bunch of blocks */
+ flags = (mode & FL_KEEP_SIZE_FLAG ? 0 :
+ EXT2_FALLOCATE_INIT_BEYOND_EOF);
+ err = ext2fs_fallocate(fs, flags, fh->ino,
+ (struct ext2_inode *)&inode,
+ ~0ULL, start, end - start + 1);
+ if (err && err != EXT2_ET_BLOCK_ALLOC_FAIL)
+ return translate_error(fs, fh->ino, err);
+
+ /* Update i_size */
+ if (!(mode & FL_KEEP_SIZE_FLAG)) {
+ if ((__u64) offset + len > fsize) {
+ err = ext2fs_inode_size_set(fs,
+ (struct ext2_inode *)&inode,
+ offset + len);
+ if (err)
+ return translate_error(fs, fh->ino, err);
+ }
+ }
+
+ err = update_mtime(fs, fh->ino, &inode);
+ if (err)
+ return err;
+
+ err = ext2fs_write_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ return err;
+}
+
+static errcode_t clean_block_middle(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode_large *inode, off_t offset,
+ off_t len, char **buf)
+{
+ blk64_t blk;
+ off_t residue;
+ int retflags;
+ errcode_t err;
+
+ residue = offset % fs->blocksize;
+ if (residue == 0)
+ return 0;
+
+ if (!*buf) {
+ err = ext2fs_get_mem(fs->blocksize, buf);
+ if (err)
+ return err;
+ }
+
+ err = ext2fs_bmap2(fs, ino, (struct ext2_inode *)inode, *buf, 0,
+ offset / fs->blocksize, &retflags, &blk);
+ if (err)
+ return err;
+ if (!blk || (retflags & BMAP_RET_UNINIT))
+ return 0;
+
+ err = io_channel_read_blk(fs->io, blk, 1, *buf);
+ if (err)
+ return err;
+
+ memset(*buf + residue, 0, len);
+
+ return io_channel_write_blk(fs->io, blk, 1, *buf);
+}
+
+static errcode_t clean_block_edge(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode_large *inode, off_t offset,
+ int clean_before, char **buf)
+{
+ blk64_t blk;
+ int retflags;
+ off_t residue;
+ errcode_t err;
+
+ residue = offset % fs->blocksize;
+ if (residue == 0)
+ return 0;
+
+ if (!*buf) {
+ err = ext2fs_get_mem(fs->blocksize, buf);
+ if (err)
+ return err;
+ }
+
+ err = ext2fs_bmap2(fs, ino, (struct ext2_inode *)inode, *buf, 0,
+ offset / fs->blocksize, &retflags, &blk);
+ if (err)
+ return err;
+
+ err = io_channel_read_blk(fs->io, blk, 1, *buf);
+ if (err)
+ return err;
+ if (!blk || (retflags & BMAP_RET_UNINIT))
+ return 0;
+
+ if (clean_before)
+ memset(*buf, 0, residue);
+ else
+ memset(*buf + residue, 0, fs->blocksize - residue);
+
+ return io_channel_write_blk(fs->io, blk, 1, *buf);
+}
+
+static int punch_helper(struct fuse_file_info *fp, int mode, off_t offset,
+ off_t len)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ struct fuse2fs_file_handle *fh =
+ (struct fuse2fs_file_handle *)(uintptr_t)fp->fh;
+ ext2_filsys fs;
+ struct ext2_inode_large inode;
+ blk64_t start, end;
+ errcode_t err;
+ char *buf = NULL;
+
+ FUSE2FS_CHECK_CONTEXT(ff);
+ fs = ff->fs;
+ FUSE2FS_CHECK_MAGIC(fs, fh, FUSE2FS_FILE_MAGIC);
+ dbg_printf("%s: offset=%jd len=%jd\n", __func__, offset, len);
+
+ /* kernel ext4 punch requires this flag to be set */
+ if (!(mode & FL_KEEP_SIZE_FLAG))
+ return -EINVAL;
+
+ /* Punch out a bunch of blocks */
+ start = (offset + fs->blocksize - 1) / fs->blocksize;
+ end = (offset + len - fs->blocksize) / fs->blocksize;
+ dbg_printf("%s: ino=%d mode=0x%x start=%llu end=%llu\n", __func__,
+ fh->ino, mode, start, end);
+
+ memset(&inode, 0, sizeof(inode));
+ err = ext2fs_read_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ /* Zero everything before the first block and after the last block */
+ if ((offset / fs->blocksize) == ((offset + len) / fs->blocksize))
+ err = clean_block_middle(fs, fh->ino, &inode, offset,
+ len, &buf);
+ else {
+ err = clean_block_edge(fs, fh->ino, &inode, offset, 0, &buf);
+ if (!err)
+ err = clean_block_edge(fs, fh->ino, &inode,
+ offset + len, 1, &buf);
+ }
+ if (buf)
+ ext2fs_free_mem(&buf);
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ /* Unmap full blocks in the middle */
+ if (start <= end) {
+ err = ext2fs_punch(fs, fh->ino, (struct ext2_inode *)&inode,
+ NULL, start, end);
+ if (err)
+ return translate_error(fs, fh->ino, err);
+ }
+
+ err = update_mtime(fs, fh->ino, &inode);
+ if (err)
+ return err;
+
+ err = ext2fs_write_inode_full(fs, fh->ino, (struct ext2_inode *)&inode,
+ sizeof(inode));
+ if (err)
+ return translate_error(fs, fh->ino, err);
+
+ return 0;
+}
+
+static int op_fallocate(const char *path EXT2FS_ATTR((unused)), int mode,
+ off_t offset, off_t len,
+ struct fuse_file_info *fp)
+{
+ struct fuse_context *ctxt = fuse_get_context();
+ struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data;
+ ext2_filsys fs = ff->fs;
+ int ret;
+
+ /* Catch unknown flags */
+ if (mode & ~(FL_PUNCH_HOLE_FLAG | FL_KEEP_SIZE_FLAG))
+ return -EINVAL;
+
+ pthread_mutex_lock(&ff->bfl);
+ if (!fs_writeable(fs)) {
+ ret = -EROFS;
+ goto out;
+ }
+ if (mode & FL_PUNCH_HOLE_FLAG)
+ ret = punch_helper(fp, mode, offset, len);
+ else
+ ret = fallocate_helper(fp, mode, offset, len);
+out:
+ pthread_mutex_unlock(&ff->bfl);
+
+ return ret;
+}
+# endif /* SUPPORT_FALLOCATE */
+#endif /* FUSE 29 */
+
+static struct fuse_operations fs_ops = {
+ .init = op_init,
+ .destroy = op_destroy,
+ .getattr = op_getattr,
+ .readlink = op_readlink,
+ .mknod = op_mknod,
+ .mkdir = op_mkdir,
+ .unlink = op_unlink,
+ .rmdir = op_rmdir,
+ .symlink = op_symlink,
+ .rename = op_rename,
+ .link = op_link,
+ .chmod = op_chmod,
+ .chown = op_chown,
+ .truncate = op_truncate,
+ .open = op_open,
+ .read = op_read,
+ .write = op_write,
+ .statfs = op_statfs,
+ .release = op_release,
+ .fsync = op_fsync,
+ .setxattr = op_setxattr,
+ .getxattr = op_getxattr,
+ .listxattr = op_listxattr,
+ .removexattr = op_removexattr,
+ .opendir = op_open,
+ .readdir = op_readdir,
+ .releasedir = op_release,
+ .fsyncdir = op_fsync,
+ .access = op_access,
+ .create = op_create,
+ .ftruncate = op_ftruncate,
+ .fgetattr = op_fgetattr,
+ .utimens = op_utimens,
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 9)
+# if defined(UTIME_NOW) || defined(UTIME_OMIT)
+ .flag_utime_omit_ok = 1,
+# endif
+#endif
+ .bmap = op_bmap,
+#ifdef SUPERFLUOUS
+ .lock = op_lock,
+ .poll = op_poll,
+#endif
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8)
+ .ioctl = op_ioctl,
+ .flag_nullpath_ok = 1,
+#endif
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 9)
+ .flag_nopath = 1,
+# ifdef SUPPORT_FALLOCATE
+ .fallocate = op_fallocate,
+# endif
+#endif
+};
+
+static int get_random_bytes(void *p, size_t sz)
+{
+ int fd;
+ ssize_t r;
+
+ fd = open("/dev/urandom", O_RDONLY);
+ if (fd < 0) {
+ perror("/dev/urandom");
+ return 0;
+ }
+
+ r = read(fd, p, sz);
+
+ close(fd);
+ return (size_t) r == sz;
+}
+
+enum {
+ FUSE2FS_VERSION,
+ FUSE2FS_HELP,
+ FUSE2FS_HELPFULL,
+};
+
+#define FUSE2FS_OPT(t, p, v) { t, offsetof(struct fuse2fs, p), v }
+
+static struct fuse_opt fuse2fs_opts[] = {
+ FUSE2FS_OPT("ro", ro, 1),
+ FUSE2FS_OPT("errors=panic", panic_on_error, 1),
+ FUSE2FS_OPT("minixdf", minixdf, 1),
+ FUSE2FS_OPT("fakeroot", fakeroot, 1),
+ FUSE2FS_OPT("fuse2fs_debug", debug, 1),
+ FUSE2FS_OPT("no_default_opts", no_default_opts, 1),
+ FUSE2FS_OPT("norecovery", norecovery, 1),
+ FUSE2FS_OPT("offset=%lu", offset, 0),
+
+ FUSE_OPT_KEY("-V", FUSE2FS_VERSION),
+ FUSE_OPT_KEY("--version", FUSE2FS_VERSION),
+ FUSE_OPT_KEY("-h", FUSE2FS_HELP),
+ FUSE_OPT_KEY("--help", FUSE2FS_HELP),
+ FUSE_OPT_KEY("--helpfull", FUSE2FS_HELPFULL),
+ FUSE_OPT_END
+};
+
+
+static int fuse2fs_opt_proc(void *data, const char *arg,
+ int key, struct fuse_args *outargs)
+{
+ struct fuse2fs *ff = data;
+
+ switch (key) {
+ case FUSE_OPT_KEY_NONOPT:
+ if (!ff->device) {
+ ff->device = strdup(arg);
+ return 0;
+ }
+ return 1;
+ case FUSE2FS_HELP:
+ case FUSE2FS_HELPFULL:
+ fprintf(stderr,
+ "usage: %s device/image mountpoint [options]\n"
+ "\n"
+ "general options:\n"
+ " -o opt,[opt...] mount options\n"
+ " -h --help print help\n"
+ " -V --version print version\n"
+ "\n"
+ "fuse2fs options:\n"
+ " -o ro read-only mount\n"
+ " -o errors=panic dump core on error\n"
+ " -o minixdf minix-style df\n"
+ " -o fakeroot pretend to be root for permission checks\n"
+ " -o no_default_opts do not include default fuse options\n"
+ " -o offset=<bytes> similar to mount -o offset=<bytes>, mount the partition starting at <bytes>\n"
+ " -o norecovery don't replay the journal (implies ro)\n"
+ " -o fuse2fs_debug enable fuse2fs debugging\n"
+ "\n",
+ outargs->argv[0]);
+ if (key == FUSE2FS_HELPFULL) {
+ fuse_opt_add_arg(outargs, "-ho");
+ fuse_main(outargs->argc, outargs->argv, &fs_ops, NULL);
+ } else {
+ fprintf(stderr, "Try --helpfull to get a list of "
+ "all flags, including the FUSE options.\n");
+ }
+ exit(1);
+
+ case FUSE2FS_VERSION:
+ fprintf(stderr, "fuse2fs %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
+ fuse_opt_add_arg(outargs, "--version");
+ fuse_main(outargs->argc, outargs->argv, &fs_ops, NULL);
+ exit(0);
+ }
+ return 1;
+}
+
+int main(int argc, char *argv[])
+{
+ struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
+ struct fuse2fs fctx;
+ errcode_t err;
+ char *logfile;
+ char extra_args[BUFSIZ];
+ int ret = 0;
+ int flags = EXT2_FLAG_64BITS | EXT2_FLAG_THREADS | EXT2_FLAG_EXCLUSIVE;
+
+ memset(&fctx, 0, sizeof(fctx));
+ fctx.magic = FUSE2FS_MAGIC;
+
+ fuse_opt_parse(&args, &fctx, fuse2fs_opts, fuse2fs_opt_proc);
+ if (fctx.device == NULL) {
+ fprintf(stderr, "Missing ext4 device/image\n");
+ fprintf(stderr, "See '%s -h' for usage\n", argv[0]);
+ exit(1);
+ }
+
+ if (fctx.norecovery)
+ fctx.ro = 1;
+ if (fctx.ro)
+ printf("%s", _("Mounting read-only.\n"));
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ add_error_table(&et_ext2_error_table);
+
+ /* Set up error logging */
+ logfile = getenv("FUSE2FS_LOGFILE");
+ if (logfile) {
+ fctx.err_fp = fopen(logfile, "a");
+ if (!fctx.err_fp) {
+ perror(logfile);
+ goto out;
+ }
+ } else
+ fctx.err_fp = stderr;
+
+ /* Will we allow users to allocate every last block? */
+ if (getenv("FUSE2FS_ALLOC_ALL_BLOCKS")) {
+ printf(_("%s: Allowing users to allocate all blocks. "
+ "This is dangerous!\n"), fctx.device);
+ fctx.alloc_all_blocks = 1;
+ }
+
+ /* Start up the fs (while we still can use stdout) */
+ ret = 2;
+ if (!fctx.ro)
+ flags |= EXT2_FLAG_RW;
+ char options[50];
+ sprintf(options, "offset=%lu", fctx.offset);
+ err = ext2fs_open2(fctx.device, options, flags, 0, 0, unix_io_manager,
+ &global_fs);
+ if (err) {
+ printf(_("%s: %s.\n"), fctx.device, error_message(err));
+ printf(_("Please run e2fsck -fy %s.\n"), fctx.device);
+ goto out;
+ }
+ fctx.fs = global_fs;
+ global_fs->priv_data = &fctx;
+
+ ret = 3;
+
+ if (ext2fs_has_feature_journal_needs_recovery(global_fs->super)) {
+ if (fctx.norecovery) {
+ printf(_("%s: mounting read-only without "
+ "recovering journal\n"),
+ fctx.device);
+ } else if (!fctx.ro) {
+ printf(_("%s: recovering journal\n"), fctx.device);
+ err = ext2fs_run_ext3_journal(&global_fs);
+ if (err) {
+ printf(_("%s: %s.\n"), fctx.device,
+ error_message(err));
+ printf(_("Please run e2fsck -fy %s.\n"),
+ fctx.device);
+ goto out;
+ }
+ ext2fs_clear_feature_journal_needs_recovery(global_fs->super);
+ ext2fs_mark_super_dirty(global_fs);
+ } else {
+ printf("%s", _("Journal needs recovery; running "
+ "`e2fsck -E journal_only' is required.\n"));
+ goto out;
+ }
+ }
+
+ if (!fctx.ro) {
+ if (ext2fs_has_feature_journal(global_fs->super))
+ printf(_("%s: Writing to the journal is not supported.\n"),
+ fctx.device);
+ err = ext2fs_read_inode_bitmap(global_fs);
+ if (err) {
+ translate_error(global_fs, 0, err);
+ goto out;
+ }
+ err = ext2fs_read_block_bitmap(global_fs);
+ if (err) {
+ translate_error(global_fs, 0, err);
+ goto out;
+ }
+ }
+
+ if (!(global_fs->super->s_state & EXT2_VALID_FS))
+ printf("%s", _("Warning: Mounting unchecked fs, running e2fsck "
+ "is recommended.\n"));
+ if (global_fs->super->s_max_mnt_count > 0 &&
+ global_fs->super->s_mnt_count >= global_fs->super->s_max_mnt_count)
+ printf("%s", _("Warning: Maximal mount count reached, running "
+ "e2fsck is recommended.\n"));
+ if (global_fs->super->s_checkinterval > 0 &&
+ (time_t) (global_fs->super->s_lastcheck +
+ global_fs->super->s_checkinterval) <= time(0))
+ printf("%s", _("Warning: Check time reached; running e2fsck "
+ "is recommended.\n"));
+ if (global_fs->super->s_last_orphan)
+ printf("%s",
+ _("Orphans detected; running e2fsck is recommended.\n"));
+
+ if (global_fs->super->s_state & EXT2_ERROR_FS) {
+ printf("%s",
+ _("Errors detected; running e2fsck is required.\n"));
+ goto out;
+ }
+
+ /* Initialize generation counter */
+ get_random_bytes(&fctx.next_generation, sizeof(unsigned int));
+
+ /* Set up default fuse parameters */
+ snprintf(extra_args, BUFSIZ, "-okernel_cache,subtype=ext4,use_ino,"
+ "fsname=%s,attr_timeout=0" FUSE_PLATFORM_OPTS,
+ fctx.device);
+ if (fctx.no_default_opts == 0)
+ fuse_opt_add_arg(&args, extra_args);
+
+ if (fctx.fakeroot) {
+#ifdef HAVE_MOUNT_NODEV
+ fuse_opt_add_arg(&args,"-onodev");
+#endif
+#ifdef HAVE_MOUNT_NOSUID
+ fuse_opt_add_arg(&args,"-onosuid");
+#endif
+ }
+
+ if (fctx.debug) {
+ int i;
+
+ printf("fuse arguments:");
+ for (i = 0; i < args.argc; i++)
+ printf(" '%s'", args.argv[i]);
+ printf("\n");
+ }
+
+ pthread_mutex_init(&fctx.bfl, NULL);
+ fuse_main(args.argc, args.argv, &fs_ops, &fctx);
+ pthread_mutex_destroy(&fctx.bfl);
+
+ ret = 0;
+out:
+ if (global_fs) {
+ err = ext2fs_close(global_fs);
+ if (err)
+ com_err(argv[0], err, "while closing fs");
+ global_fs = NULL;
+ }
+ return ret;
+}
+
+static int __translate_error(ext2_filsys fs, errcode_t err, ext2_ino_t ino,
+ const char *file, int line)
+{
+ struct timespec now;
+ int ret = err;
+ struct fuse2fs *ff = fs->priv_data;
+ int is_err = 0;
+
+ /* Translate ext2 error to unix error code */
+ if (err < EXT2_ET_BASE)
+ goto no_translation;
+ switch (err) {
+ case EXT2_ET_NO_MEMORY:
+ case EXT2_ET_TDB_ERR_OOM:
+ ret = -ENOMEM;
+ break;
+ case EXT2_ET_INVALID_ARGUMENT:
+ case EXT2_ET_LLSEEK_FAILED:
+ ret = -EINVAL;
+ break;
+ case EXT2_ET_NO_DIRECTORY:
+ ret = -ENOTDIR;
+ break;
+ case EXT2_ET_FILE_NOT_FOUND:
+ ret = -ENOENT;
+ break;
+ case EXT2_ET_DIR_NO_SPACE:
+ is_err = 1;
+ /* fallthrough */
+ case EXT2_ET_TOOSMALL:
+ case EXT2_ET_BLOCK_ALLOC_FAIL:
+ case EXT2_ET_INODE_ALLOC_FAIL:
+ case EXT2_ET_EA_NO_SPACE:
+ ret = -ENOSPC;
+ break;
+ case EXT2_ET_SYMLINK_LOOP:
+ ret = -EMLINK;
+ break;
+ case EXT2_ET_FILE_TOO_BIG:
+ ret = -EFBIG;
+ break;
+ case EXT2_ET_TDB_ERR_EXISTS:
+ case EXT2_ET_FILE_EXISTS:
+ ret = -EEXIST;
+ break;
+ case EXT2_ET_MMP_FAILED:
+ case EXT2_ET_MMP_FSCK_ON:
+ ret = -EBUSY;
+ break;
+ case EXT2_ET_EA_KEY_NOT_FOUND:
+#ifdef ENODATA
+ ret = -ENODATA;
+#else
+ ret = -ENOENT;
+#endif
+ break;
+ /* Sometimes fuse returns a garbage file handle pointer to us... */
+ case EXT2_ET_MAGIC_EXT2_FILE:
+ ret = -EFAULT;
+ break;
+ case EXT2_ET_UNIMPLEMENTED:
+ ret = -EOPNOTSUPP;
+ break;
+ default:
+ is_err = 1;
+ ret = -EIO;
+ break;
+ }
+
+no_translation:
+ if (!is_err)
+ return ret;
+
+ if (ino)
+ fprintf(ff->err_fp, "FUSE2FS (%s): %s (inode #%d) at %s:%d.\n",
+ fs->device_name ? fs->device_name : "???",
+ error_message(err), ino, file, line);
+ else
+ fprintf(ff->err_fp, "FUSE2FS (%s): %s at %s:%d.\n",
+ fs->device_name ? fs->device_name : "???",
+ error_message(err), file, line);
+ fflush(ff->err_fp);
+
+ /* Make a note in the error log */
+ get_now(&now);
+ fs->super->s_last_error_time = now.tv_sec;
+ fs->super->s_last_error_ino = ino;
+ fs->super->s_last_error_line = line;
+ fs->super->s_last_error_block = err; /* Yeah... */
+ strncpy((char *)fs->super->s_last_error_func, file,
+ sizeof(fs->super->s_last_error_func));
+ if (fs->super->s_first_error_time == 0) {
+ fs->super->s_first_error_time = now.tv_sec;
+ fs->super->s_first_error_ino = ino;
+ fs->super->s_first_error_line = line;
+ fs->super->s_first_error_block = err;
+ strncpy((char *)fs->super->s_first_error_func, file,
+ sizeof(fs->super->s_first_error_func));
+ }
+
+ fs->super->s_error_count++;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_flush(fs);
+ if (ff->panic_on_error)
+ abort();
+
+ return ret;
+}
diff --git a/misc/ismounted.c b/misc/ismounted.c
new file mode 100644
index 0000000..6aa0e04
--- /dev/null
+++ b/misc/ismounted.c
@@ -0,0 +1,218 @@
+/*
+ * ismounted.c --- Check to see if the filesystem was mounted
+ *
+ * Copyright (C) 1995,1996,1997,1998,1999,2000,2008 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#ifdef HAVE_LINUX_FD_H
+#include <linux/fd.h>
+#endif
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#endif
+#include <string.h>
+#include <sys/stat.h>
+#include <ctype.h>
+
+#include "fsck.h"
+
+/*
+ * ext2fs_check_if_mounted flags
+ */
+#define MF_MOUNTED 1
+
+#include "et/com_err.h"
+
+#ifdef HAVE_SETMNTENT
+static char *skip_over_blank(char *cp)
+{
+ while (*cp && isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *skip_over_word(char *cp)
+{
+ while (*cp && !isspace(*cp))
+ cp++;
+ return cp;
+}
+
+static char *parse_word(char **buf)
+{
+ char *word, *next;
+
+ word = *buf;
+ if (*word == 0)
+ return 0;
+
+ word = skip_over_blank(word);
+ next = skip_over_word(word);
+ if (*next)
+ *next++ = 0;
+ *buf = next;
+ return word;
+}
+#endif
+
+/*
+ * Helper function which checks a file in /etc/mtab format to see if a
+ * filesystem is mounted. Returns an error if the file doesn't exist
+ * or can't be opened.
+ */
+static errcode_t check_mntent_file(const char *mtab_file, const char *file,
+ int *mount_flags)
+{
+#ifdef HAVE_SETMNTENT
+ struct stat st_buf;
+ errcode_t retval = 0;
+ dev_t file_dev=0, file_rdev=0;
+ ino_t file_ino=0;
+ FILE *f;
+ char buf[1024], *device = 0, *mnt_dir = 0, *cp;
+
+ *mount_flags = 0;
+ if ((f = setmntent (mtab_file, "r")) == NULL)
+ return errno;
+ if (stat(file, &st_buf) == 0) {
+ if (S_ISBLK(st_buf.st_mode)) {
+#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
+ file_rdev = st_buf.st_rdev;
+#endif /* __GNU__ */
+ } else {
+ file_dev = st_buf.st_dev;
+ file_ino = st_buf.st_ino;
+ }
+ }
+ while (1) {
+ if (!fgets(buf, sizeof(buf), f)) {
+ device = mnt_dir = 0;
+ break;
+ }
+ buf[sizeof(buf)-1] = 0;
+
+ cp = buf;
+ device = parse_word(&cp);
+ if (!device || *device == '#')
+ return 0; /* Ignore blank lines and comments */
+ mnt_dir = parse_word(&cp);
+
+ if (device[0] != '/')
+ continue;
+
+ if (strcmp(file, device) == 0)
+ break;
+ if (stat(device, &st_buf) == 0) {
+ if (S_ISBLK(st_buf.st_mode)) {
+#ifndef __GNU__
+ if (file_rdev && (file_rdev == st_buf.st_rdev))
+ break;
+#endif /* __GNU__ */
+ } else {
+ if (file_dev && ((file_dev == st_buf.st_dev) &&
+ (file_ino == st_buf.st_ino)))
+ break;
+ }
+ }
+ }
+
+ if (mnt_dir == 0) {
+#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
+ /*
+ * Do an extra check to see if this is the root device. We
+ * can't trust /etc/mtab, and /proc/mounts will only list
+ * /dev/root for the root filesystem. Argh. Instead we
+ * check if the given device has the same major/minor number
+ * as the device that the root directory is on.
+ */
+ if (file_rdev && (stat("/", &st_buf) == 0) &&
+ (st_buf.st_dev == file_rdev))
+ *mount_flags = MF_MOUNTED;
+#endif /* __GNU__ */
+ goto errout;
+ }
+#ifndef __GNU__ /* The GNU hurd is deficient; what else is new? */
+ /* Validate the entry in case /etc/mtab is out of date */
+ /*
+ * We need to be paranoid, because some broken distributions
+ * (read: Slackware) don't initialize /etc/mtab before checking
+ * all of the non-root filesystems on the disk.
+ */
+ if (stat(mnt_dir, &st_buf) < 0) {
+ retval = errno;
+ if (retval == ENOENT) {
+#ifdef DEBUG
+ printf("Bogus entry in %s! (%s does not exist)\n",
+ mtab_file, mnt_dir);
+#endif /* DEBUG */
+ retval = 0;
+ }
+ goto errout;
+ }
+ if (file_rdev && (st_buf.st_dev != file_rdev)) {
+#ifdef DEBUG
+ printf("Bogus entry in %s! (%s not mounted on %s)\n",
+ mtab_file, file, mnt_dir);
+#endif /* DEBUG */
+ goto errout;
+ }
+#endif /* __GNU__ */
+ *mount_flags = MF_MOUNTED;
+
+ retval = 0;
+errout:
+ endmntent (f);
+ return retval;
+#else /* !HAVE_SETMNTENT */
+ return 0;
+#endif /* HAVE_MNTENT_H */
+}
+
+int is_mounted(const char *file)
+{
+ errcode_t retval;
+ int mount_flags = 0;
+
+#ifdef __linux__
+ retval = check_mntent_file("/proc/mounts", file, &mount_flags);
+ if (retval)
+ return 0;
+ if (mount_flags)
+ return 1;
+#endif /* __linux__ */
+ retval = check_mntent_file("/etc/mtab", file, &mount_flags);
+ if (retval)
+ return 0;
+ return (mount_flags);
+}
+
+#ifdef DEBUG
+int main(int argc, char **argv)
+{
+ if (argc < 2) {
+ fprintf(stderr, "Usage: %s device\n", argv[0]);
+ exit(1);
+ }
+
+ if (is_mounted(argv[1]))
+ printf("\t%s is mounted.\n", argv[1]);
+ exit(0);
+}
+#endif /* DEBUG */
diff --git a/misc/logsave.8.in b/misc/logsave.8.in
new file mode 100644
index 0000000..cc3ffde
--- /dev/null
+++ b/misc/logsave.8.in
@@ -0,0 +1,61 @@
+.\" -*- nroff -*-
+.\" Copyright 2003 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH LOGSAVE 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+logsave \- save the output of a command in a logfile
+.SH SYNOPSIS
+.B logsave
+[
+.B \-asv
+]
+.I logfile cmd_prog [ ... ]
+.SH DESCRIPTION
+The
+.B logsave
+program will execute
+.I cmd_prog
+with the specified argument(s), and save a copy of its output to
+.IR logfile .
+If the containing directory for
+.I logfile
+does not exist,
+.B logsave
+will accumulate the output in memory until it can be written out.
+A copy of the output will also be written to standard output.
+.PP
+If
+.I cmd_prog
+is a single hyphen ('-'), then instead of executing a program,
+.B logsave
+will take its input from standard input and save it in
+.I logfile
+.PP
+.B logsave
+is useful for saving the output of initial boot scripts
+until the /var partition is mounted, so the output can be written to
+/var/log.
+.SH OPTIONS
+.TP
+.B \-a
+This option will cause the output to be appended to
+.IR logfile ,
+instead of replacing its current contents.
+.TP
+.B \-s
+This option will cause
+.B logsave
+to skip writing to the log file text which is bracketed with a control-A
+(ASCII 001 or Start of Header) and control-B (ASCII 002 or Start of
+Text). This allows progress bar information to be visible to the user
+on the console, while not being written to the log file.
+.TP
+.B \-v
+This option will make
+.B logsave
+to be more verbose in its output to the user.
+.SH AUTHOR
+Theodore Ts'o (tytso@mit.edu)
+.SH SEE ALSO
+.BR fsck (8)
diff --git a/misc/logsave.c b/misc/logsave.c
new file mode 100644
index 0000000..96b6d8e
--- /dev/null
+++ b/misc/logsave.c
@@ -0,0 +1,334 @@
+/*
+ * logsave.c --- A program which saves the output of a program until
+ * /var/log is mounted.
+ *
+ * Copyright (C) 2003 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <time.h>
+#include <errno.h>
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+
+static int outfd = -1;
+static int outbufsize = 0;
+static void *outbuf = 0;
+static int verbose = 0;
+static int do_skip = 0;
+static int skip_mode = 0;
+static pid_t child_pid = -1;
+
+static void usage(char *progname)
+{
+ printf("Usage: %s [-asv] logfile program\n", progname);
+ exit(1);
+}
+
+#define SEND_LOG 0x01
+#define SEND_CONSOLE 0x02
+#define SEND_BOTH 0x03
+
+/*
+ * Helper function that does the right thing if write returns a
+ * partial write, or an EAGAIN/EINTR error.
+ */
+static int write_all(int fd, const char *buf, size_t count)
+{
+ ssize_t ret;
+ int c = 0;
+
+ while (count > 0) {
+ ret = write(fd, buf, count);
+ if (ret < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ return -1;
+ }
+ count -= ret;
+ buf += ret;
+ c += ret;
+ }
+ return c;
+}
+
+static void send_output(const char *buffer, int c, int flag)
+{
+ const char *cp;
+ char *n;
+ int cnt, d, del;
+
+ if (c == 0)
+ c = strlen(buffer);
+
+ if (flag & SEND_CONSOLE) {
+ cnt = c;
+ cp = buffer;
+ while (cnt) {
+ del = 0;
+ for (d=0; d < cnt; d++) {
+ if (skip_mode &&
+ (cp[d] == '\001' || cp[d] == '\002')) {
+ del = 1;
+ break;
+ }
+ }
+ write_all(1, cp, d);
+ if (del)
+ d++;
+ cnt -= d;
+ cp += d;
+ }
+ }
+ if (!(flag & SEND_LOG))
+ return;
+ if (outfd > 0)
+ write_all(outfd, buffer, c);
+ else {
+ n = realloc(outbuf, outbufsize + c);
+ if (n) {
+ outbuf = n;
+ memcpy(((char *)outbuf)+outbufsize, buffer, c);
+ outbufsize += c;
+ }
+ }
+}
+
+static int do_read(int fd)
+{
+ int c;
+ char buffer[4096], *cp, *sep;
+
+ c = read(fd, buffer, sizeof(buffer)-1);
+ if (c <= 0)
+ return c;
+ if (do_skip) {
+ send_output(buffer, c, SEND_CONSOLE);
+ buffer[c] = 0;
+ cp = buffer;
+ while (*cp) {
+ if (skip_mode) {
+ cp = strchr(cp, '\002');
+ if (!cp)
+ return 0;
+ cp++;
+ skip_mode = 0;
+ continue;
+ }
+ sep = strchr(cp, '\001');
+ if (sep)
+ *sep = 0;
+ send_output(cp, 0, SEND_LOG);
+ if (sep) {
+ cp = sep + 1;
+ skip_mode = 1;
+ } else
+ break;
+ }
+ } else
+ send_output(buffer, c, SEND_BOTH);
+ return c;
+}
+
+static void signal_term(int sig)
+{
+ if (child_pid > 0)
+ kill(child_pid, sig);
+}
+
+static int run_program(char **argv)
+{
+ int fds[2];
+ int status, rc, pid;
+ char buffer[80];
+#ifdef HAVE_SIGNAL_H
+ struct sigaction sa;
+#endif
+
+ if (pipe(fds) < 0) {
+ perror("pipe");
+ exit(1);
+ }
+
+#ifdef HAVE_SIGNAL_H
+ memset(&sa, 0, sizeof(struct sigaction));
+ sa.sa_handler = signal_term;
+ sigaction(SIGINT, &sa, 0);
+ sigaction(SIGTERM, &sa, 0);
+#ifdef SA_RESTART
+ sa.sa_flags = SA_RESTART;
+#endif
+#endif
+
+ pid = fork();
+ if (pid < 0) {
+ perror("vfork");
+ exit(1);
+ }
+ if (pid == 0) {
+ dup2(fds[1],1); /* fds[1] replaces stdout */
+ dup2(fds[1],2); /* fds[1] replaces stderr */
+ close(fds[0]); /* don't need this here */
+ close(fds[1]);
+
+ execvp(argv[0], argv);
+ perror(argv[0]);
+ exit(1);
+ }
+ child_pid = pid;
+ close(fds[1]);
+
+ while (!(waitpid(pid, &status, WNOHANG ))) {
+ do_read(fds[0]);
+ }
+ child_pid = -1;
+ do_read(fds[0]);
+ close(fds[0]);
+
+ if ( WIFEXITED(status) ) {
+ rc = WEXITSTATUS(status);
+ if (rc) {
+ send_output(argv[0], 0, SEND_BOTH);
+ sprintf(buffer, " exited with status code %d\n", rc);
+ send_output(buffer, 0, SEND_BOTH);
+ }
+ } else {
+ if (WIFSIGNALED(status)) {
+ send_output(argv[0], 0, SEND_BOTH);
+ sprintf(buffer, "died with signal %d\n",
+ WTERMSIG(status));
+ send_output(buffer, 0, SEND_BOTH);
+ return 1;
+ }
+ rc = 0;
+ }
+ return rc;
+}
+
+static int copy_from_stdin(void)
+{
+ int c, bad_read = 0;
+
+ while (1) {
+ c = do_read(0);
+ if ((c == 0 ) ||
+ ((c < 0) && ((errno == EAGAIN) || (errno == EINTR)))) {
+ if (bad_read++ > 3)
+ break;
+ continue;
+ }
+ if (c < 0) {
+ perror("read");
+ exit(1);
+ }
+ bad_read = 0;
+ }
+ return 0;
+}
+
+
+
+int main(int argc, char **argv)
+{
+ int c, pid, rc;
+ char *outfn, **cpp;
+ int openflags = O_CREAT|O_WRONLY|O_TRUNC;
+ int send_flag = SEND_LOG;
+ int do_stdin;
+ time_t t;
+
+ while ((c = getopt(argc, argv, "+asv")) != EOF) {
+ switch (c) {
+ case 'a':
+ openflags &= ~O_TRUNC;
+ openflags |= O_APPEND;
+ break;
+ case 's':
+ do_skip = 1;
+ break;
+ case 'v':
+ verbose++;
+ send_flag |= SEND_CONSOLE;
+ break;
+ }
+ }
+ if (optind == argc || optind+1 == argc)
+ usage(argv[0]);
+ outfn = argv[optind];
+ optind++;
+ argv += optind;
+ argc -= optind;
+
+ outfd = open(outfn, openflags, 0644);
+ do_stdin = !strcmp(argv[0], "-");
+
+ send_output("Log of ", 0, send_flag);
+ if (do_stdin)
+ send_output("stdin", 0, send_flag);
+ else {
+ for (cpp = argv; *cpp; cpp++) {
+ send_output(*cpp, 0, send_flag);
+ send_output(" ", 0, send_flag);
+ }
+ }
+ send_output("\n", 0, send_flag);
+ t = time(0);
+ send_output(ctime(&t), 0, send_flag);
+ send_output("\n", 0, send_flag);
+
+ if (do_stdin)
+ rc = copy_from_stdin();
+ else
+ rc = run_program(argv);
+
+ send_output("\n", 0, send_flag);
+ t = time(0);
+ send_output(ctime(&t), 0, send_flag);
+ send_output("----------------\n", 0, send_flag);
+
+ if (outbuf) {
+ pid = fork();
+ if (pid < 0) {
+ perror("fork");
+ exit(1);
+ }
+ if (pid) {
+ if (verbose)
+ printf("Backgrounding to save %s later\n",
+ outfn);
+ exit(rc);
+ }
+ setsid(); /* To avoid getting killed by init */
+ while (outfd < 0) {
+ outfd = open(outfn, openflags, 0644);
+ sleep(1);
+ }
+ write_all(outfd, outbuf, outbufsize);
+ free(outbuf);
+ }
+ if (outfd >= 0)
+ close(outfd);
+
+ exit(rc);
+}
diff --git a/misc/lsattr.1.in b/misc/lsattr.1.in
new file mode 100644
index 0000000..4d02a95
--- /dev/null
+++ b/misc/lsattr.1.in
@@ -0,0 +1,52 @@
+.\" -*- nroff -*-
+.TH LSATTR 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+lsattr \- list file attributes on a Linux second extended file system
+.SH SYNOPSIS
+.B lsattr
+[
+.B \-RVadlpv
+]
+[
+.I files...
+]
+.SH DESCRIPTION
+.B lsattr
+lists the file attributes on a second extended file system. See
+.BR chattr (1)
+for a description of the attributes and what they mean.
+.SH OPTIONS
+.TP
+.B \-R
+Recursively list attributes of directories and their contents.
+.TP
+.B \-V
+Display the program version.
+.TP
+.B \-a
+List all files in directories, including files that start with `.'.
+.TP
+.B \-d
+List directories like other files, rather than listing their contents.
+.TP
+.B \-l
+Print the options using long names instead of single
+character abbreviations.
+.TP
+.B \-p
+List the file's project number.
+.TP
+.B \-v
+List the file's version/generation number.
+.SH AUTHOR
+.B lsattr
+was written by Remy Card <Remy.Card@linux.org>. It is currently being
+maintained by Theodore Ts'o <tytso@alum.mit.edu>.
+.SH BUGS
+There are none :-).
+.SH AVAILABILITY
+.B lsattr
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR chattr (1)
diff --git a/misc/lsattr.c b/misc/lsattr.c
new file mode 100644
index 0000000..72f4c68
--- /dev/null
+++ b/misc/lsattr.c
@@ -0,0 +1,234 @@
+/*
+ * lsattr.c - List file attributes on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * This file can be redistributed under the terms of the GNU General
+ * Public License
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ * 93/11/13 - Replace stat() calls by lstat() to avoid loops
+ * 94/02/27 - Integrated in Ted's distribution
+ * 98/12/29 - Display version info only when -V specified (G M Sipe)
+ */
+
+#define _LARGEFILE64_SOURCE
+
+#include "config.h"
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "et/com_err.h"
+#include "e2p/e2p.h"
+
+#include "support/nls-enable.h"
+#include "../version.h"
+
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
+static const char * program_name = "lsattr";
+
+static int all;
+static int dirs_opt;
+static unsigned pf_options;
+static int recursive;
+static int verbose;
+static int generation_opt;
+static int project_opt;
+
+#ifdef _LFS64_LARGEFILE
+#define LSTAT lstat64
+#define STRUCT_STAT struct stat64
+#else
+#define LSTAT lstat
+#define STRUCT_STAT struct stat
+#endif
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s [-RVadlpv] [files...]\n"), program_name);
+ exit(1);
+}
+
+static int list_attributes (const char * name)
+{
+ unsigned long flags;
+ unsigned long generation;
+ unsigned long project;
+
+ if (fgetflags (name, &flags) == -1) {
+ com_err (program_name, errno, _("While reading flags on %s"),
+ name);
+ return -1;
+ }
+ if (project_opt) {
+ if (fgetproject(name, &project) == -1) {
+ com_err (program_name, errno,
+ _("While reading project on %s"),
+ name);
+ return -1;
+ }
+ printf ("%5lu ", project);
+ }
+ if (generation_opt) {
+ if (fgetversion (name, &generation) == -1) {
+ com_err (program_name, errno,
+ _("While reading version on %s"),
+ name);
+ return -1;
+ }
+ printf ("%-10lu ", generation);
+ }
+ if (pf_options & PFOPT_LONG) {
+ printf("%-28s ", name);
+ print_flags(stdout, flags, pf_options);
+ fputc('\n', stdout);
+ } else {
+ print_flags(stdout, flags, pf_options);
+ printf(" %s\n", name);
+ }
+ return 0;
+}
+
+static int lsattr_dir_proc (const char *, struct dirent *, void *);
+
+static int lsattr_args (const char * name)
+{
+ STRUCT_STAT st;
+ int retval = 0;
+
+ if (LSTAT (name, &st) == -1) {
+ com_err (program_name, errno, _("while trying to stat %s"),
+ name);
+ retval = -1;
+ } else {
+ if (S_ISDIR(st.st_mode) && !dirs_opt)
+ retval = iterate_on_dir (name, lsattr_dir_proc, NULL);
+ else
+ retval = list_attributes (name);
+ }
+ return retval;
+}
+
+static int lsattr_dir_proc (const char * dir_name, struct dirent * de,
+ void * private EXT2FS_ATTR((unused)))
+{
+ STRUCT_STAT st;
+ char *path;
+ int dir_len = strlen(dir_name);
+
+ path = malloc(dir_len + strlen (de->d_name) + 2);
+ if (!path) {
+ fputs(_("Couldn't allocate path variable in lsattr_dir_proc\n"),
+ stderr);
+ return -1;
+ }
+
+ if (dir_len && dir_name[dir_len-1] == '/')
+ sprintf (path, "%s%s", dir_name, de->d_name);
+ else
+ sprintf (path, "%s/%s", dir_name, de->d_name);
+ if (LSTAT (path, &st) == -1)
+ perror (path);
+ else {
+ if (de->d_name[0] != '.' || all) {
+ list_attributes (path);
+ if (S_ISDIR(st.st_mode) && recursive &&
+ strcmp(de->d_name, ".") &&
+ strcmp(de->d_name, "..")) {
+ printf ("\n%s:\n", path);
+ iterate_on_dir (path, lsattr_dir_proc, NULL);
+ printf ("\n");
+ }
+ }
+ }
+ free(path);
+ return 0;
+}
+
+int main (int argc, char ** argv)
+{
+ int c;
+ int i;
+ int err, retval = 0;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ if (argc && *argv)
+ program_name = *argv;
+ else
+ usage();
+ while ((c = getopt (argc, argv, "RVadlvp")) != EOF)
+ switch (c)
+ {
+ case 'R':
+ recursive = 1;
+ break;
+ case 'V':
+ verbose = 1;
+ break;
+ case 'a':
+ all = 1;
+ break;
+ case 'd':
+ dirs_opt = 1;
+ break;
+ case 'l':
+ pf_options = PFOPT_LONG;
+ break;
+ case 'v':
+ generation_opt = 1;
+ break;
+ case 'p':
+ project_opt = 1;
+ break;
+ default:
+ usage();
+ }
+
+ if (verbose)
+ fprintf (stderr, "lsattr %s (%s)\n",
+ E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ if (optind > argc - 1) {
+ if (lsattr_args (".") == -1)
+ retval = 1;
+ } else {
+ for (i = optind; i < argc; i++) {
+ err = lsattr_args (argv[i]);
+ if (err)
+ retval = 1;
+ }
+ }
+ exit(retval);
+}
diff --git a/misc/mk_hugefiles.c b/misc/mk_hugefiles.c
new file mode 100644
index 0000000..3caaf1b
--- /dev/null
+++ b/misc/mk_hugefiles.c
@@ -0,0 +1,491 @@
+/*
+ * mk_hugefiles.c -- create huge files
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+#include <libgen.h>
+#include <limits.h>
+#include <blkid/blkid.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fsP.h"
+#include "et/com_err.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+#include "ext2fs/ext2fs.h"
+#include "util.h"
+#include "support/profile.h"
+#include "support/prof_err.h"
+#include "support/nls-enable.h"
+#include "mke2fs.h"
+
+static int uid;
+static int gid;
+static blk64_t num_blocks;
+static blk64_t num_slack;
+static unsigned long num_files;
+static blk64_t goal;
+static char *fn_prefix;
+static int idx_digits;
+static char *fn_buf;
+static char *fn_numbuf;
+int zero_hugefile = 1;
+
+static blk64_t
+get_partition_start(const char *device_name EXT2FS_ATTR((unused)))
+{
+#ifdef __linux__
+ unsigned long long start;
+ char path[128];
+ struct stat st;
+ FILE *f;
+ int n;
+
+ if ((stat(device_name, &st) < 0) || !S_ISBLK(st.st_mode))
+ return 0;
+
+ sprintf(path, "/sys/dev/block/%d:%d/start",
+ major(st.st_rdev), minor(st.st_rdev));
+ f = fopen(path, "r");
+ if (!f)
+ return 0;
+ n = fscanf(f, "%llu", &start);
+ fclose(f);
+ return (n == 1) ? start : 0;
+#else
+ return 0;
+#endif
+}
+
+static errcode_t create_directory(ext2_filsys fs, char *dir,
+ ext2_ino_t *ret_ino)
+
+{
+ struct ext2_inode inode;
+ ext2_ino_t ino = EXT2_ROOT_INO;
+ ext2_ino_t newdir;
+ errcode_t retval = 0;
+ char *fn, *cp, *next;
+
+ fn = malloc(strlen(dir) + 1);
+ if (fn == NULL)
+ return ENOMEM;
+
+ strcpy(fn, dir);
+ cp = fn;
+ while(1) {
+ next = strchr(cp, '/');
+ if (next)
+ *next++ = 0;
+ if (*cp) {
+ retval = ext2fs_new_inode(fs, ino, LINUX_S_IFDIR,
+ NULL, &newdir);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_mkdir(fs, ino, newdir, cp);
+ if (retval)
+ goto errout;
+
+ ino = newdir;
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ goto errout;
+
+ inode.i_uid = uid & 0xFFFF;
+ ext2fs_set_i_uid_high(inode, (uid >> 16) & 0xffff);
+ inode.i_gid = gid & 0xFFFF;
+ ext2fs_set_i_gid_high(inode, (gid >> 16) & 0xffff);
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ goto errout;
+ }
+ if (next == NULL || *next == '\0')
+ break;
+ cp = next;
+ }
+errout:
+ free(fn);
+ if (retval == 0)
+ *ret_ino = ino;
+ return retval;
+}
+
+static errcode_t mk_hugefile(ext2_filsys fs, blk64_t num,
+ ext2_ino_t dir, unsigned long idx, ext2_ino_t *ino)
+
+{
+ errcode_t retval;
+ blk64_t lblk, bend = 0;
+ __u64 size;
+ blk64_t left;
+ blk64_t count = 0;
+ struct ext2_inode inode;
+ ext2_extent_handle_t handle;
+
+ retval = ext2fs_new_inode(fs, 0, LINUX_S_IFREG, NULL, ino);
+ if (retval)
+ return retval;
+
+ memset(&inode, 0, sizeof(struct ext2_inode));
+ inode.i_mode = LINUX_S_IFREG | (0666 & ~fs->umask);
+ inode.i_links_count = 1;
+ inode.i_uid = uid & 0xFFFF;
+ ext2fs_set_i_uid_high(inode, (uid >> 16) & 0xffff);
+ inode.i_gid = gid & 0xFFFF;
+ ext2fs_set_i_gid_high(inode, (gid >> 16) & 0xffff);
+
+ retval = ext2fs_write_new_inode(fs, *ino, &inode);
+ if (retval)
+ return retval;
+
+ ext2fs_inode_alloc_stats2(fs, *ino, +1, 0);
+
+ retval = ext2fs_extent_open2(fs, *ino, &inode, &handle);
+ if (retval)
+ return retval;
+
+ /*
+ * We don't use ext2fs_fallocate() here because hugefiles are
+ * designed to be physically contiguous (if the block group
+ * descriptors are configured to be in a single block at the
+ * beginning of the file system, by using the
+ * packed_meta_blocks layout), with the extent tree blocks
+ * allocated near the beginning of the file system.
+ */
+ lblk = 0;
+ left = num ? num : 1;
+ while (left) {
+ blk64_t pblk, end;
+ blk64_t n = left;
+
+ retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map,
+ goal, ext2fs_blocks_count(fs->super) - 1, &end);
+ if (retval)
+ goto errout;
+ goal = end;
+
+ retval = ext2fs_find_first_set_block_bitmap2(fs->block_map, goal,
+ ext2fs_blocks_count(fs->super) - 1, &bend);
+ if (retval == ENOENT) {
+ bend = ext2fs_blocks_count(fs->super);
+ if (num == 0)
+ left = 0;
+ }
+ if (!num || bend - goal < left)
+ n = bend - goal;
+ pblk = goal;
+ if (num)
+ left -= n;
+ goal += n;
+ count += n;
+ ext2fs_block_alloc_stats_range(fs, pblk, n, +1);
+
+ if (zero_hugefile) {
+ blk64_t ret_blk;
+ retval = ext2fs_zero_blocks2(fs, pblk, n,
+ &ret_blk, NULL);
+
+ if (retval)
+ com_err(program_name, retval,
+ _("while zeroing block %llu "
+ "for hugefile"),
+ (unsigned long long) ret_blk);
+ }
+
+ while (n) {
+ blk64_t l = n;
+ struct ext2fs_extent newextent;
+
+ if (l > EXT_INIT_MAX_LEN)
+ l = EXT_INIT_MAX_LEN;
+
+ newextent.e_len = l;
+ newextent.e_pblk = pblk;
+ newextent.e_lblk = lblk;
+ newextent.e_flags = 0;
+
+ retval = ext2fs_extent_insert(handle,
+ EXT2_EXTENT_INSERT_AFTER, &newextent);
+ if (retval)
+ return retval;
+ pblk += l;
+ lblk += l;
+ n -= l;
+ }
+ }
+
+ retval = ext2fs_read_inode(fs, *ino, &inode);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_iblk_add_blocks(fs, &inode,
+ count / EXT2FS_CLUSTER_RATIO(fs));
+ if (retval)
+ goto errout;
+ size = (__u64) count * fs->blocksize;
+ retval = ext2fs_inode_size_set(fs, &inode, size);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_write_new_inode(fs, *ino, &inode);
+ if (retval)
+ goto errout;
+
+ if (idx_digits)
+ sprintf(fn_numbuf, "%0*lu", idx_digits, idx);
+ else if (num_files > 1)
+ sprintf(fn_numbuf, "%lu", idx);
+
+retry:
+ retval = ext2fs_link(fs, dir, fn_buf, *ino, EXT2_FT_REG_FILE);
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ retval = ext2fs_expand_dir(fs, dir);
+ if (retval)
+ goto errout;
+ goto retry;
+ }
+
+ if (retval)
+ goto errout;
+
+errout:
+ if (handle)
+ ext2fs_extent_free(handle);
+
+ return retval;
+}
+
+static blk64_t calc_overhead(ext2_filsys fs, blk64_t num)
+{
+ blk64_t e_blocks, e_blocks2, e_blocks3, e_blocks4;
+ int extents_per_block;
+ int extents = (num + EXT_INIT_MAX_LEN - 1) / EXT_INIT_MAX_LEN;
+
+ if (extents <= 4)
+ return 0;
+
+ /*
+ * This calculation is due to the fact that we are inefficient
+ * in how handle extent splits when appending to the end of
+ * the extent tree. Sigh. We should fix this so that we can
+ * actually store 340 extents per 4k block, instead of only 170.
+ */
+ extents_per_block = ((fs->blocksize -
+ sizeof(struct ext3_extent_header)) /
+ sizeof(struct ext3_extent));
+ extents_per_block = (extents_per_block/ 2) - 1;
+
+ e_blocks = (extents + extents_per_block - 1) / extents_per_block;
+ e_blocks2 = (e_blocks + extents_per_block - 1) / extents_per_block;
+ e_blocks3 = (e_blocks2 + extents_per_block - 1) / extents_per_block;
+ e_blocks4 = (e_blocks3 + extents_per_block - 1) / extents_per_block;
+ return (e_blocks + e_blocks2 + e_blocks3 + e_blocks4) *
+ EXT2FS_CLUSTER_RATIO(fs);
+}
+
+/*
+ * Find the place where we should start allocating blocks for the huge
+ * files. Leave <slack> free blocks at the beginning of the file
+ * system for things like metadata blocks.
+ */
+static blk64_t get_start_block(ext2_filsys fs, blk64_t slack)
+{
+ errcode_t retval;
+ blk64_t blk = fs->super->s_first_data_block, next;
+ blk64_t last_blk = ext2fs_blocks_count(fs->super) - 1;
+
+ while (slack) {
+ retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map,
+ blk, last_blk, &blk);
+ if (retval)
+ break;
+
+ retval = ext2fs_find_first_set_block_bitmap2(fs->block_map,
+ blk, last_blk, &next);
+ if (retval)
+ next = last_blk;
+
+ if (next - blk > slack) {
+ blk += slack;
+ break;
+ }
+
+ slack -= (next - blk);
+ blk = next;
+ }
+ return blk;
+}
+
+static blk64_t round_up_align(blk64_t b, unsigned long align,
+ blk64_t part_offset)
+{
+ unsigned long m;
+
+ if (align == 0)
+ return b;
+ part_offset = part_offset % align;
+ m = (b + part_offset) % align;
+ if (m)
+ b += align - m;
+ return b;
+}
+
+errcode_t mk_hugefiles(ext2_filsys fs, const char *device_name)
+{
+ unsigned long i;
+ ext2_ino_t dir;
+ errcode_t retval;
+ blk64_t fs_blocks, part_offset = 0;
+ unsigned long align;
+ int d, dsize;
+ char *t;
+
+ if (!get_bool_from_profile(fs_types, "make_hugefiles", 0))
+ return 0;
+
+ if (!ext2fs_has_feature_extents(fs->super))
+ return EXT2_ET_EXTENT_NOT_SUPPORTED;
+
+ uid = get_int_from_profile(fs_types, "hugefiles_uid", 0);
+ gid = get_int_from_profile(fs_types, "hugefiles_gid", 0);
+ fs->umask = get_int_from_profile(fs_types, "hugefiles_umask", 077);
+ num_files = get_int_from_profile(fs_types, "num_hugefiles", 0);
+ t = get_string_from_profile(fs_types, "hugefiles_slack", "1M");
+ num_slack = parse_num_blocks2(t, fs->super->s_log_block_size);
+ free(t);
+ t = get_string_from_profile(fs_types, "hugefiles_size", "0");
+ num_blocks = parse_num_blocks2(t, fs->super->s_log_block_size);
+ free(t);
+ t = get_string_from_profile(fs_types, "hugefiles_align", "0");
+ align = parse_num_blocks2(t, fs->super->s_log_block_size);
+ free(t);
+ if (get_bool_from_profile(fs_types, "hugefiles_align_disk", 0)) {
+ part_offset = get_partition_start(device_name) /
+ (fs->blocksize / 512);
+ if (part_offset % EXT2FS_CLUSTER_RATIO(fs)) {
+ fprintf(stderr,
+ _("Partition offset of %llu (%uk) blocks "
+ "not compatible with cluster size %u.\n"),
+ (unsigned long long) part_offset, fs->blocksize,
+ EXT2_CLUSTER_SIZE(fs->super));
+ exit(1);
+ }
+ }
+ num_blocks = round_up_align(num_blocks, align, 0);
+ zero_hugefile = get_bool_from_profile(fs_types, "zero_hugefiles",
+ zero_hugefile);
+
+ t = get_string_from_profile(fs_types, "hugefiles_dir", "/");
+ retval = create_directory(fs, t, &dir);
+ free(t);
+ if (retval)
+ return retval;
+
+ fn_prefix = get_string_from_profile(fs_types, "hugefiles_name",
+ "hugefile");
+ idx_digits = get_int_from_profile(fs_types, "hugefiles_digits", 5);
+ d = int_log10(num_files) + 1;
+ if (idx_digits > d)
+ d = idx_digits;
+ dsize = strlen(fn_prefix) + d + 16;
+ fn_buf = malloc(dsize);
+ if (!fn_buf) {
+ free(fn_prefix);
+ return ENOMEM;
+ }
+ strcpy(fn_buf, fn_prefix);
+ fn_numbuf = fn_buf + strlen(fn_prefix);
+ free(fn_prefix);
+
+ fs_blocks = ext2fs_free_blocks_count(fs->super);
+ if (fs_blocks < num_slack + align)
+ return ENOSPC;
+ fs_blocks -= num_slack + align;
+ if (num_blocks && num_blocks > fs_blocks)
+ return ENOSPC;
+ if (num_blocks == 0 && num_files == 0)
+ num_files = 1;
+
+ if (num_files == 0 && num_blocks) {
+ num_files = fs_blocks / num_blocks;
+ fs_blocks -= (num_files / 16) + 1;
+ fs_blocks -= calc_overhead(fs, num_blocks) * num_files;
+ num_files = fs_blocks / num_blocks;
+ }
+
+ if (num_blocks == 0 && num_files > 1) {
+ num_blocks = fs_blocks / num_files;
+ fs_blocks -= (num_files / 16) + 1;
+ fs_blocks -= calc_overhead(fs, num_blocks) * num_files;
+ num_blocks = fs_blocks / num_files;
+ }
+
+ num_slack += (calc_overhead(fs, num_blocks ? num_blocks : fs_blocks) *
+ num_files);
+ num_slack += (num_files / 16) + 1; /* space for dir entries */
+ goal = get_start_block(fs, num_slack);
+ goal = round_up_align(goal, align, part_offset);
+
+ if ((num_blocks ? num_blocks : fs_blocks) >
+ (0x80000000UL / fs->blocksize))
+ ext2fs_set_feature_large_file(fs->super);
+
+ if (!quiet) {
+ if (zero_hugefile && verbose)
+ printf("%s", _("Huge files will be zero'ed\n"));
+ printf(_("Creating %lu huge file(s) "), num_files);
+ if (num_blocks)
+ printf(_("with %llu blocks each"),
+ (unsigned long long) num_blocks);
+ fputs(": ", stdout);
+ }
+ for (i=0; i < num_files; i++) {
+ ext2_ino_t ino;
+
+ retval = mk_hugefile(fs, num_blocks, dir, i, &ino);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while creating huge file %lu"), i);
+ goto errout;
+ }
+ }
+ if (!quiet)
+ fputs(_("done\n"), stdout);
+
+errout:
+ free(fn_buf);
+ return retval;
+}
diff --git a/misc/mke2fs-hurd.conf b/misc/mke2fs-hurd.conf
new file mode 100644
index 0000000..4f0527d
--- /dev/null
+++ b/misc/mke2fs-hurd.conf
@@ -0,0 +1,42 @@
+[defaults]
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
+ default_mntopts = acl,user_xattr
+ enable_periodic_fsck = 0
+ blocksize = 4096
+ inode_size = 128
+ inode_ratio = 16384
+
+[fs_types]
+ ext3 = {
+ features = has_journal
+ }
+ ext4 = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+ auto_64-bit_support = 1
+ inode_size = 256
+ }
+ small = {
+ inode_ratio = 4096
+ }
+ floppy = {
+ inode_ratio = 8192
+ }
+ big = {
+ inode_ratio = 32768
+ }
+ huge = {
+ inode_ratio = 65536
+ }
+ news = {
+ inode_ratio = 4096
+ }
+ largefile = {
+ inode_ratio = 1048576
+ }
+ largefile4 = {
+ inode_ratio = 4194304
+ }
+ hurd = {
+ blocksize = 4096
+ inode_size = 128
+ }
diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
new file mode 100644
index 0000000..30f97bb
--- /dev/null
+++ b/misc/mke2fs.8.in
@@ -0,0 +1,891 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+mke2fs \- create an ext2/ext3/ext4 file system
+.SH SYNOPSIS
+.B mke2fs
+[
+.B \-c
+|
+.B \-l
+.I filename
+]
+[
+.B \-b
+.I block-size
+]
+[
+.B \-C
+.I cluster-size
+]
+[
+.B \-d
+.I root-directory
+]
+[
+.B \-D
+]
+[
+.B \-g
+.I blocks-per-group
+]
+[
+.B \-G
+.I number-of-groups
+]
+[
+.B \-i
+.I bytes-per-inode
+]
+[
+.B \-I
+.I inode-size
+]
+[
+.B \-j
+]
+[
+.B \-J
+.I journal-options
+]
+[
+.B \-N
+.I number-of-inodes
+]
+[
+.B \-n
+]
+[
+.B \-m
+.I reserved-blocks-percentage
+]
+[
+.B \-o
+.I creator-os
+]
+[
+.B \-O
+[^]\fIfeature\fR[,...]
+]
+[
+.B \-q
+]
+[
+.B \-r
+.I fs-revision-level
+]
+[
+.B \-E
+.I extended-options
+]
+[
+.B \-v
+]
+[
+.B \-F
+]
+[
+.B \-L
+.I volume-label
+]
+[
+.B \-M
+.I last-mounted-directory
+]
+[
+.B \-S
+]
+[
+.B \-t
+.I fs-type
+]
+[
+.B \-T
+.I usage-type
+]
+[
+.B \-U
+.I UUID
+]
+[
+.B \-V
+]
+[
+.B \-e
+.I errors-behavior
+]
+[
+.B \-z
+.I undo_file
+]
+.I device
+[
+.I fs-size
+]
+@JDEV@.sp
+@JDEV@.B "mke2fs \-O journal_dev"
+@JDEV@[
+@JDEV@.B \-b
+@JDEV@.I block-size
+@JDEV@]
+.\" No external-journal specific journal options yet (size is ignored)
+.\" @JDEV@[
+.\" @JDEV@.B \-J
+.\" @JDEV@.I journal-options
+.\" @JDEV@]
+@JDEV@[
+@JDEV@.B \-L
+@JDEV@.I volume-label
+@JDEV@]
+@JDEV@[
+@JDEV@.B \-n
+@JDEV@]
+@JDEV@[
+@JDEV@.B \-q
+@JDEV@]
+@JDEV@[
+@JDEV@.B \-v
+@JDEV@]
+@JDEV@.I external-journal
+@JDEV@[
+@JDEV@.I fs-size
+@JDEV@]
+.SH DESCRIPTION
+.B mke2fs
+is used to create an ext2, ext3, or ext4 file system, usually in a disk
+partition (or file) named by
+.IR device .
+.PP
+The file system size is specified by
+.IR fs-size .
+If
+.I fs-size
+does not have a suffix, it is interpreted as power-of-two kilobytes,
+unless the
+.B \-b
+.I blocksize
+option is specified, in which case
+.I fs-size
+is interpreted as the number of
+.I blocksize
+blocks. If the fs-size is suffixed by 'k', 'm', 'g', 't'
+(either upper-case or lower-case), then it is interpreted in
+power-of-two kilobytes, megabytes, gigabytes, terabytes, etc.
+If
+.I fs-size
+is omitted,
+.B mke2fs
+will create the file system based on the device size.
+.PP
+If
+.B mke2fs
+is run as
+.B mkfs.XXX
+(i.e.,
+.BR mkfs.ext2 ,
+.BR mkfs.ext3 ,
+or
+.BR mkfs.ext4 )
+the option
+.B \-t
+.I XXX
+is implied; so
+.B mkfs.ext3
+will create a file system for use with ext3,
+.B mkfs.ext4
+will create a file system for use with ext4, and so on.
+.PP
+The defaults of the parameters for the newly created file system, if not
+overridden by the options listed below, are controlled by the
+.B /etc/mke2fs.conf
+configuration file. See the
+.BR mke2fs.conf (5)
+manual page for more details.
+.SH OPTIONS
+.TP
+.BI \-b " block-size"
+Specify the size of blocks in bytes. Valid block-size values are powers of two
+from 1024 up to 65536 (however note that the kernel is able to mount only
+file systems with block-size smaller or equal to the system page size - 4k on
+x86 systems, up to 64k on ppc64 or aarch64 depending on kernel configuration).
+If omitted, block-size is heuristically determined by the file system size and
+the expected usage of the file system (see the
+.B \-T
+option). In most common cases, the default block size is 4k. If
+.I block-size
+is preceded by a negative sign ('-'), then
+.B mke2fs
+will use heuristics to determine the
+appropriate block size, with the constraint that the block size will be
+at least
+.I block-size
+bytes. This is useful for certain hardware devices which require that
+the blocksize be a multiple of 2k.
+.TP
+.B \-c
+Check the device for bad blocks before creating the file system. If
+this option is specified twice, then a slower read-write
+test is used instead of a fast read-only test.
+.TP
+.B \-C " cluster-size"
+Specify the size of cluster in bytes for file systems using the bigalloc
+feature. Valid cluster-size values are from 2048 to 256M bytes per
+cluster. This can only be specified if the bigalloc feature is
+enabled. (See the
+.B ext4 (5)
+man page for more details about bigalloc.) The default cluster size if
+bigalloc is enabled is 16 times the block size.
+.TP
+.BI \-d " root-directory"
+Copy the contents of the given directory into the root directory of the
+file system.
+.TP
+.B \-D
+Use direct I/O when writing to the disk. This avoids mke2fs dirtying a
+lot of buffer cache memory, which may impact other applications running
+on a busy server. This option will cause mke2fs to run much more
+slowly, however, so there is a tradeoff to using direct I/O.
+.TP
+.BI \-e " error-behavior"
+Change the behavior of the kernel code when errors are detected.
+In all cases, a file system error will cause
+.BR e2fsck (8)
+to check the file system on the next boot.
+.I error-behavior
+can be one of the following:
+.RS 1.2i
+.TP 1.2i
+.B continue
+Continue normal execution.
+.TP
+.B remount-ro
+Remount file system read-only.
+.TP
+.B panic
+Cause a kernel panic.
+.RE
+.TP
+.BI \-E " extended-options"
+Set extended options for the file system. Extended options are comma
+separated, and may take an argument using the equals ('=') sign. The
+.B \-E
+option used to be
+.B \-R
+in earlier versions of
+.BR mke2fs .
+The
+.B \-R
+option is still accepted for backwards compatibility, but is deprecated.
+The following extended options are supported:
+.RS 1.2i
+.TP
+.BI encoding= encoding-name
+Enable the
+.I casefold
+feature in the super block and set
+.I encoding-name
+as the encoding to be used. If
+.I encoding-name
+is not specified, the encoding defined in
+.BR mke2fs.conf (5)
+is used.
+.TP
+.BI encoding_flags= encoding-flags
+Define parameters for file name character encoding operations. If a
+flag is not changed using this parameter, its default value is used.
+.I encoding-flags
+should be a comma-separated lists of flags to be enabled. To disable a
+flag, add it to the list with the prefix "no".
+
+The only flag that can be set right now is
+.I strict
+which means that invalid strings should be rejected by the file system.
+In the default configuration, the
+.I strict
+flag is disabled.
+.TP
+.BI mmp_update_interval= interval
+Adjust the initial MMP update interval to
+.I interval
+seconds. Specifying an
+.I interval
+of 0 means to use the default interval. The specified interval must
+be less than 300 seconds. Requires that the
+.B mmp
+feature be enabled.
+.TP
+.BI stride= stride-size
+Configure the file system for a RAID array with
+.I stride-size
+file system blocks. This is the number of blocks read or written to disk
+before moving to the next disk, which is sometimes referred to as the
+.I chunk size.
+This mostly affects placement of file system metadata like bitmaps at
+.B mke2fs
+time to avoid placing them on a single disk, which can hurt performance.
+It may also be used by the block allocator.
+.TP
+.BI stripe_width= stripe-width
+Configure the file system for a RAID array with
+.I stripe-width
+file system blocks per stripe. This is typically stride-size * N, where
+N is the number of data-bearing disks in the RAID (e.g. for RAID 5 there is one
+parity disk, so N will be the number of disks in the array minus 1).
+This allows the block allocator to prevent read-modify-write of the
+parity in a RAID stripe if possible when the data is written.
+.TP
+.BI offset= offset
+Create the file system at an offset from the beginning of the device or
+file. This can be useful when creating disk images for virtual machines.
+.TP
+.BI resize= max-online-resize
+Reserve enough space so that the block group descriptor table can grow
+to support a file system that has
+.I max-online-resize
+blocks.
+.TP
+.B lazy_itable_init\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
+If enabled and the uninit_bg feature is enabled, the inode table will
+not be fully initialized by
+.BR mke2fs .
+This speeds up file system
+initialization noticeably, but it requires the kernel to finish
+initializing the file system in the background when the file system is
+first mounted. If the option value is omitted, it defaults to 1 to
+enable lazy inode table zeroing.
+.TP
+.B lazy_journal_init\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
+If enabled, the journal inode will not be fully zeroed out by
+.BR mke2fs .
+This speeds up file system initialization noticeably, but carries some
+small risk if the system crashes before the journal has been overwritten
+entirely one time. If the option value is omitted, it defaults to 1 to
+enable lazy journal inode zeroing.
+.TP
+.B assume_storage_prezeroed\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
+If enabled,
+.BR mke2fs
+assumes that the storage device has been prezeroed, skips zeroing the journal
+and inode tables, and annotates the block group flags to signal that the inode
+table has been zeroed.
+.TP
+.B no_copy_xattrs
+Normally
+.B mke2fs
+will copy the extended attributes of the files in the directory
+hierarchy specified via the (optional)
+.B \-d
+option. This will disable the copy and leaves the files in the newly
+created file system without any extended attributes.
+.TP
+.BI num_backup_sb= <0|1|2>
+If the
+.B sparse_super2
+file system feature is enabled this option controls whether there will
+be 0, 1, or 2 backup superblocks created in the file system.
+.TP
+.B packed_meta_blocks\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
+Place the allocation bitmaps and the inode table at the beginning of the
+disk. This option requires that the flex_bg file system feature to be
+enabled in order for it to have effect, and will also create the journal
+at the beginning of the file system. This option is useful for flash
+devices that use SLC flash at the beginning of the disk.
+It also maximizes the range of contiguous data blocks, which
+can be useful for certain specialized use cases, such as supported
+Shingled Drives.
+.TP
+.BI root_owner [=uid:gid]
+Specify the numeric user and group ID of the root directory. If no UID:GID
+is specified, use the user and group ID of the user running \fBmke2fs\fR.
+In \fBmke2fs\fR 1.42 and earlier the UID and GID of the root directory were
+set by default to the UID and GID of the user running the mke2fs command.
+The \fBroot_owner=\fR option allows explicitly specifying these values,
+and avoid side-effects for users that do not expect the contents of the
+file system to change based on the user running \fBmke2fs\fR.
+.TP
+.B test_fs
+Set a flag in the file system superblock indicating that it may be
+mounted using experimental kernel code, such as the ext4dev file system.
+.TP
+.BI orphan_file_size= size
+Set size of the file for tracking unlinked but still open inodes and inodes
+with truncate in progress. Larger file allows for better scalability, reserving
+a few blocks per cpu is ideal.
+.TP
+.B discard
+Attempt to discard blocks at mkfs time (discarding blocks initially is useful
+on solid state devices and sparse / thin-provisioned storage). When the device
+advertises that discard also zeroes data (any subsequent read after the discard
+and before write returns zero), then mark all not-yet-zeroed inode tables as
+zeroed. This significantly speeds up file system initialization. This is set
+as default.
+.TP
+.B nodiscard
+Do not attempt to discard blocks at mkfs time.
+.TP
+.B quotatype
+Specify the which quota types (usrquota, grpquota, prjquota) which
+should be enabled in the created file system. The argument of this
+extended option should be a colon separated list. This option has
+effect only if the
+.B quota
+feature is set. The default quota types to be initialized if this
+option is not specified is both user and group quotas. If the project
+feature is enabled that project quotas will be initialized as well.
+.RE
+.TP
+.B \-F
+Force
+.B mke2fs
+to create a file system, even if the specified device is not a partition
+on a block special device, or if other parameters do not make sense.
+In order to force
+.B mke2fs
+to create a file system even if the file system appears to be in use
+or is mounted (a truly dangerous thing to do), this option must be
+specified twice.
+.TP
+.BI \-g " blocks-per-group"
+Specify the number of blocks in a block group. There is generally no
+reason for the user to ever set this parameter, as the default is optimal
+for the file system. (For administrators who are creating
+file systems on RAID arrays, it is preferable to use the
+.I stride
+RAID parameter as part of the
+.B \-E
+option rather than manipulating the number of blocks per group.)
+This option is generally used by developers who
+are developing test cases.
+.IP
+If the bigalloc feature is enabled, the
+.B \-g
+option will specify the number of clusters in a block group.
+.TP
+.BI \-G " number-of-groups"
+Specify the number of block groups that will be packed together to
+create a larger virtual block group (or "flex_bg group") in an
+ext4 file system. This improves meta-data locality and performance
+on meta-data heavy workloads. The number of groups must be a power
+of 2 and may only be specified if the
+.B flex_bg
+file system feature is enabled.
+.TP
+.BI \-i " bytes-per-inode"
+Specify the bytes/inode ratio.
+.B mke2fs
+creates an inode for every
+.I bytes-per-inode
+bytes of space on the disk. The larger the
+.I bytes-per-inode
+ratio, the fewer inodes will be created. This value generally shouldn't
+be smaller than the blocksize of the file system, since in that case more
+inodes would be made than can ever be used. Be warned that it is not
+possible to change this ratio on a file system after it is created, so be
+careful deciding the correct value for this parameter. Note that resizing
+a file system changes the number of inodes to maintain this ratio.
+.TP
+.BI \-I " inode-size"
+Specify the size of each inode in bytes.
+The
+.I inode-size
+value must be a power of 2 larger or equal to 128. The larger the
+.I inode-size
+the more space the inode table will consume, and this reduces the usable
+space in the file system and can also negatively impact performance.
+It is not
+possible to change this value after the file system is created.
+.IP
+File systems with an inode size of 128 bytes do not support timestamps
+beyond January 19, 2038. Inodes which are 256 bytes or larger will
+support extended timestamps, project id's, and the ability to store some
+extended attributes in the inode table for improved performance.
+.IP
+The default inode size is controlled by the
+.BR mke2fs.conf (5)
+file. In the
+.B mke2fs.conf
+file shipped with e2fsprogs, the default inode size is 256 bytes for
+most file systems, except for small file systems where the inode size
+will be 128 bytes.
+.TP
+.B \-j
+Create the file system with an ext3 journal. If the
+.B \-J
+option is not specified, the default journal parameters will be used to
+create an appropriately sized journal (given the size of the file system)
+stored within the file system. Note that you must be using a kernel
+which has ext3 support in order to actually make use of the journal.
+.TP
+.BI \-J " journal-options"
+Create the ext3 journal using options specified on the command-line.
+Journal options are comma
+separated, and may take an argument using the equals ('=') sign.
+The following journal options are supported:
+.RS 1.2i
+.TP
+.BI size= journal-size
+Create an internal journal (i.e., stored inside the file system) of size
+.I journal-size
+megabytes.
+The size of the journal must be at least 1024 file system blocks
+(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
+and may be no more than 10,240,000 file system blocks or half the total
+file system size (whichever is smaller)
+.TP
+.BI fast_commit_size= fast-commit-size
+Create an additional fast commit journal area of size
+.I fast-commit-size
+kilobytes.
+This option is only valid if
+.B fast_commit
+feature is enabled
+on the file system. If this option is not specified and if
+.B fast_commit
+feature is turned on, fast commit area size defaults to
+.I journal-size
+/ 64 megabytes. The total size of the journal with
+.B fast_commit
+feature set is
+.I journal-size
++ (
+.I fast-commit-size
+* 1024) megabytes. The total journal size may be no more than
+10,240,000 file system blocks or half the total file system size
+(whichever is smaller).
+.TP
+.BI location =journal-location
+Specify the location of the journal. The argument
+.I journal-location
+can either be specified as a block number, or if the number has a units
+suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the
+beginning of the file system.
+@JDEV@.TP
+@JDEV@.BI device= external-journal
+@JDEV@Attach the file system to the journal block device located on
+@JDEV@.IR external-journal .
+@JDEV@The external
+@JDEV@journal must already have been created using the command
+@JDEV@.IP
+@JDEV@.B mke2fs -O journal_dev
+@JDEV@.I external-journal
+@JDEV@.IP
+@JDEV@Note that
+@JDEV@.I external-journal
+@JDEV@must have been created with the
+@JDEV@same block size as the new file system.
+@JDEV@In addition, while there is support for attaching
+@JDEV@multiple file systems to a single external journal,
+@JDEV@the Linux kernel and
+@JDEV@.BR e2fsck (8)
+@JDEV@do not currently support shared external journals yet.
+@JDEV@.IP
+@JDEV@Instead of specifying a device name directly,
+@JDEV@.I external-journal
+@JDEV@can also be specified by either
+@JDEV@.BI LABEL= label
+@JDEV@or
+@JDEV@.BI UUID= UUID
+@JDEV@to locate the external journal by either the volume label or UUID
+@JDEV@stored in the ext2 superblock at the start of the journal. Use
+@JDEV@.BR dumpe2fs (8)
+@JDEV@to display a journal device's volume label and UUID. See also the
+@JDEV@.B -L
+@JDEV@option of
+@JDEV@.BR tune2fs (8).
+.RE
+@JDEV@.IP
+@JDEV@Only one of the
+@JDEV@.BR size " or " device
+@JDEV@options can be given for a file system.
+.TP
+.BI \-l " filename"
+Read the bad blocks list from
+.IR filename .
+Note that the block numbers in the bad block list must be generated
+using the same block size as used by
+.BR mke2fs .
+As a result, the
+.B \-c
+option to
+.B mke2fs
+is a much simpler and less error-prone method of checking a disk for bad
+blocks before formatting it, as
+.B mke2fs
+will automatically pass the correct parameters to the
+.B badblocks
+program.
+.TP
+.BI \-L " new-volume-label"
+Set the volume label for the file system to
+.IR new-volume-label .
+The maximum length of the
+volume label is 16 bytes.
+.TP
+.BI \-m " reserved-blocks-percentage"
+Specify the percentage of the file system blocks reserved for
+the super-user. This avoids fragmentation, and allows root-owned
+daemons, such as
+.BR syslogd (8),
+to continue to function correctly after non-privileged processes are
+prevented from writing to the file system. The default percentage
+is 5%.
+.TP
+.BI \-M " last-mounted-directory"
+Set the last mounted directory for the file system. This might be useful
+for the sake of utilities that key off of the last mounted directory to
+determine where the file system should be mounted.
+.TP
+.B \-n
+Causes
+.B mke2fs
+to not actually create a file system, but display what it
+would do if it were to create a file system. This can be used to
+determine the location of the backup superblocks for a particular
+file system, so long as the
+.B mke2fs
+parameters that were passed when the
+file system was originally created are used again. (With the
+.B \-n
+option added, of course!)
+.TP
+.BI \-N " number-of-inodes"
+Overrides the default calculation of the number of inodes that should be
+reserved for the file system (which is based on the number of blocks and
+the
+.I bytes-per-inode
+ratio). This allows the user to specify the number
+of desired inodes directly.
+.TP
+.BI \-o " creator-os"
+Overrides the default value of the "creator operating system" field of the
+file system. The creator field is set by default to the name of the OS the
+.B mke2fs
+executable was compiled for.
+.TP
+.B "\-O \fR[^]\fIfeature\fR[,...]"
+Create a file system with the given features (file system options),
+overriding the default file system options. The features that are
+enabled by default are specified by the
+.I base_features
+relation, either in the
+.I [defaults]
+section in the
+.B /etc/mke2fs.conf
+configuration file,
+or in the
+.I [fs_types]
+subsections for the usage types as specified by the
+.B \-T
+option, further modified by the
+.I features
+relation found in the
+.I [fs_types]
+subsections for the file system and usage types. See the
+.BR mke2fs.conf (5)
+manual page for more details.
+The file system type-specific configuration setting found in the
+.I [fs_types]
+section will override the global default found in
+.IR [defaults] .
+.sp
+The file system feature set will be further edited
+using either the feature set specified by this option,
+or if this option is not given, by the
+.I default_features
+relation for the file system type being created, or in the
+.I [defaults]
+section of the configuration file.
+.sp
+The file system feature set is comprised of a list of features, separated
+by commas, that are to be enabled. To disable a feature, simply
+prefix the feature name with a caret ('^') character.
+Features with dependencies will not be removed successfully.
+The pseudo-file system feature "none" will clear all file system features.
+.TP
+For more information about the features which can be set, please see
+the manual page
+.BR ext4 (5).
+.TP
+.B \-q
+Quiet execution. Useful if
+.B mke2fs
+is run in a script.
+.TP
+.BI \-r " revision"
+Set the file system revision for the new file system. Note that 1.2
+kernels only support revision 0 file systems. The default is to
+create revision 1 file systems.
+.TP
+.B \-S
+Write superblock and group descriptors only. This is an extreme
+measure to be taken only in the very unlikely case that all of
+the superblock and backup superblocks are corrupted, and a last-ditch
+recovery method is desired by experienced users. It causes
+.B mke2fs
+to reinitialize the superblock and group descriptors, while not
+touching the inode table and the block and inode bitmaps. The
+.B e2fsck
+program should be run immediately after this option is used, and there
+is no guarantee that any data will be salvageable. Due to the wide
+variety of possible options to
+.B mke2fs
+that affect the on-disk layout, it is critical to specify exactly
+the same format options, such as blocksize, fs-type, feature flags, and
+other tunables when using this option, or the file system will be further
+corrupted. In some cases, such as file systems that have been resized,
+or have had features enabled after format time, it is impossible to
+overwrite all of the superblocks correctly, and at least some file system
+corruption will occur. It is best to run this on a full copy of the
+file system so other options can be tried if this doesn't work.
+.\" .TP
+.\" .BI \-t " test"
+.\" Check the device for bad blocks before creating the file system
+.\" using the specified test.
+.TP
+.BI \-t " fs-type"
+Specify the file system type (i.e., ext2, ext3, ext4, etc.) that is
+to be created.
+If this option is not specified,
+.B mke2fs
+will pick a default either via how
+the command was run (for example, using a name of the form mkfs.ext2,
+mkfs.ext3, etc.) or via a default as defined by the
+.B /etc/mke2fs.conf
+file. This option controls which file system options are used by
+default, based on the
+.B fstypes
+configuration stanza in
+.BR /etc/mke2fs.conf .
+.sp
+If the
+.B \-O
+option is used to explicitly add or remove file system options that
+should be set in the newly created file system, the
+resulting file system may not be supported by the requested
+.IR fs-type .
+(e.g., "\fBmke2fs \-t ext3 \-O extent /dev/sdXX\fR" will create a
+file system that is not supported by the ext3 implementation as found in
+the Linux kernel; and "\fBmke2fs \-t ext3 \-O ^has_journal /dev/hdXX\fR"
+will create a file system that does not have a journal and hence will not
+be supported by the ext3 file system code in the Linux kernel.)
+.TP
+.BI \-T " usage-type[,...]"
+Specify how the file system is going to be used, so that
+.B mke2fs
+can choose optimal file system parameters for that use. The usage
+types that are supported are defined in the configuration file
+.BR /etc/mke2fs.conf .
+The user may specify one or more usage types
+using a comma separated list.
+.sp
+If this option is is not specified,
+.B mke2fs
+will pick a single default usage type based on the size of the file system to
+be created. If the file system size is less than 3 megabytes,
+.B mke2fs
+will use the file system type
+.IR floppy .
+If the file system size is greater than or equal to 3 but less than
+512 megabytes,
+.BR mke2fs (8)
+will use the file system type
+.IR small .
+If the file system size is greater than or equal to 4 terabytes but less than
+16 terabytes,
+.BR mke2fs (8)
+will use the file system type
+.IR big .
+If the file system size is greater than or equal to 16 terabytes,
+.BR mke2fs (8)
+will use the file system type
+.IR huge .
+Otherwise,
+.BR mke2fs (8)
+will use the default file system type
+.IR default .
+.TP
+.BI \-U " UUID"
+Set the universally unique identifier (UUID) of the file system to
+.IR UUID .
+The format of the UUID is a series of hex digits separated by hyphens,
+like this:
+"c1b9d5a2-f162-11cf-9ece-0020afc76f16".
+The
+.I UUID
+parameter may also be one of the following:
+.RS 1.2i
+.TP
+.I clear
+clear the file system UUID
+.TP
+.I random
+generate a new randomly-generated UUID
+.TP
+.I time
+generate a new time-based UUID
+.RE
+.TP
+.B \-v
+Verbose execution.
+.TP
+.B \-V
+Print the version number of
+.B mke2fs
+and exit.
+.TP
+.BI \-z " undo_file"
+Before overwriting a file system block, write the old contents of the block to
+an undo file. This undo file can be used with e2undo(8) to restore the old
+contents of the file system should something go wrong. If the empty string is
+passed as the undo_file argument, the undo file will be written to a file named
+mke2fs-\fIdevice\fR.e2undo in the directory specified via the
+\fIE2FSPROGS_UNDO_DIR\fR environment variable or the \fIundo_dir\fR directive
+in the configuration file.
+
+WARNING: The undo file cannot be used to recover from a power or system crash.
+.SH ENVIRONMENT
+.TP
+.B MKE2FS_SYNC
+If set to non-zero integer value, its value is used to determine how often
+.BR sync (2)
+is called during inode table initialization.
+.TP
+.B MKE2FS_CONFIG
+Determines the location of the configuration file (see
+.BR mke2fs.conf (5)).
+.TP
+.B MKE2FS_FIRST_META_BG
+If set to non-zero integer value, its value is used to determine first meta
+block group. This is mostly for debugging purposes.
+.TP
+.B MKE2FS_DEVICE_SECTSIZE
+If set to non-zero integer value, its value is used to determine logical
+sector size of the
+.IR device .
+.TP
+.B MKE2FS_DEVICE_PHYS_SECTSIZE
+If set to non-zero integer value, its value is used to determine physical
+sector size of the
+.IR device .
+.TP
+.B MKE2FS_SKIP_CHECK_MSG
+If set, do not show the message of file system automatic check caused by
+mount count or check interval.
+.SH AUTHOR
+This version of
+.B mke2fs
+has been written by Theodore Ts'o <tytso@mit.edu>.
+.SH AVAILABILITY
+.B mke2fs
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR mke2fs.conf (5),
+.BR badblocks (8),
+.BR dumpe2fs (8),
+.BR e2fsck (8),
+.BR tune2fs (8),
+.BR ext4 (5)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
new file mode 100644
index 0000000..4a9c1b0
--- /dev/null
+++ b/misc/mke2fs.c
@@ -0,0 +1,3592 @@
+/*
+ * mke2fs.c - Make a ext2fs filesystem.
+ *
+ * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ * 2003, 2004, 2005 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/* Usage: mke2fs [options] device
+ *
+ * The device may be a block device or a image of one, but this isn't
+ * enforced (but it's not much fun on a character device :-).
+ */
+
+#define _XOPEN_SOURCE 600
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <ctype.h>
+#include <time.h>
+#ifdef __linux__
+#include <sys/utsname.h>
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#include <libgen.h>
+#include <limits.h>
+#include <blkid/blkid.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fsP.h"
+#include "uuid/uuid.h"
+#include "util.h"
+#include "support/nls-enable.h"
+#include "support/plausible.h"
+#include "support/profile.h"
+#include "support/prof_err.h"
+#include "../version.h"
+#include "support/quotaio.h"
+#include "mke2fs.h"
+#include "create_inode.h"
+
+#define STRIDE_LENGTH 8
+
+#define MAX_32_NUM ((((unsigned long long) 1) << 32) - 1)
+
+#ifndef __sparc__
+#define ZAP_BOOTBLOCK
+#endif
+
+#define DISCARD_STEP_MB (2048)
+
+extern int isatty(int);
+extern FILE *fpopen(const char *cmd, const char *mode);
+
+const char * program_name = "mke2fs";
+static const char * device_name /* = NULL */;
+
+/* Command line options */
+static int cflag;
+int verbose;
+int quiet;
+static int super_only;
+static int discard = 1; /* attempt to discard device before fs creation */
+static int direct_io;
+static int force;
+static int noaction;
+static int num_backups = 2; /* number of backup bg's for sparse_super2 */
+static uid_t root_uid;
+static gid_t root_gid;
+int journal_size;
+int journal_flags;
+int journal_fc_size;
+static e2_blkcnt_t orphan_file_blocks;
+static int lazy_itable_init;
+static int assume_storage_prezeroed;
+static int packed_meta_blocks;
+int no_copy_xattrs;
+static char *bad_blocks_filename = NULL;
+static __u32 fs_stride;
+/* Initialize usr/grp quotas by default */
+static unsigned int quotatype_bits = (QUOTA_USR_BIT | QUOTA_GRP_BIT);
+static __u64 offset;
+static blk64_t journal_location = ~0LL;
+static int proceed_delay = -1;
+static blk64_t dev_size;
+
+static struct ext2_super_block fs_param;
+static __u32 zero_buf[4];
+static char *fs_uuid = NULL;
+static char *creator_os;
+static char *volume_label;
+static char *mount_dir;
+char *journal_device;
+static int sync_kludge; /* Set using the MKE2FS_SYNC env. option */
+char **fs_types;
+const char *src_root_dir; /* Copy files from the specified directory */
+static char *undo_file;
+
+static int android_sparse_file; /* -E android_sparse */
+
+static profile_t profile;
+
+static int sys_page_size = 4096;
+
+static int errors_behavior = 0;
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s [-c|-l filename] [-b block-size] "
+ "[-C cluster-size]\n\t[-i bytes-per-inode] [-I inode-size] "
+ "[-J journal-options]\n"
+ "\t[-G flex-group-size] [-N number-of-inodes] "
+ "[-d root-directory]\n"
+ "\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+ "\t[-g blocks-per-group] [-L volume-label] "
+ "[-M last-mounted-directory]\n\t[-O feature[,...]] "
+ "[-r fs-revision] [-E extended-option[,...]]\n"
+ "\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior]"
+ "[-z undo_file]\n"
+ "\t[-jnqvDFSV] device [blocks-count]\n"),
+ program_name);
+ exit(1);
+}
+
+static int int_log2(unsigned long long arg)
+{
+ int l = 0;
+
+ arg >>= 1;
+ while (arg) {
+ l++;
+ arg >>= 1;
+ }
+ return l;
+}
+
+int int_log10(unsigned long long arg)
+{
+ int l;
+
+ for (l=0; arg ; l++)
+ arg = arg / 10;
+ return l;
+}
+
+#ifdef __linux__
+static int parse_version_number(const char *s)
+{
+ int major, minor, rev;
+ char *endptr;
+ const char *cp = s;
+
+ if (!s)
+ return 0;
+ major = strtol(cp, &endptr, 10);
+ if (cp == endptr || *endptr != '.')
+ return 0;
+ cp = endptr + 1;
+ minor = strtol(cp, &endptr, 10);
+ if (cp == endptr || *endptr != '.')
+ return 0;
+ cp = endptr + 1;
+ rev = strtol(cp, &endptr, 10);
+ if (cp == endptr)
+ return 0;
+ return KERNEL_VERSION(major, minor, rev);
+}
+
+static int is_before_linux_ver(unsigned int major, unsigned int minor,
+ unsigned int rev)
+{
+ struct utsname ut;
+ static int linux_version_code = -1;
+
+ if (uname(&ut)) {
+ perror("uname");
+ exit(1);
+ }
+ if (linux_version_code < 0)
+ linux_version_code = parse_version_number(ut.release);
+ if (linux_version_code == 0)
+ return 0;
+
+ return linux_version_code < (int) KERNEL_VERSION(major, minor, rev);
+}
+#else
+static int is_before_linux_ver(unsigned int major, unsigned int minor,
+ unsigned int rev)
+{
+ return 0;
+}
+#endif
+
+/*
+ * Helper function for read_bb_file and test_disk
+ */
+static void invalid_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk_t blk)
+{
+ fprintf(stderr, _("Bad block %u out of range; ignored.\n"), blk);
+ return;
+}
+
+/*
+ * Reads the bad blocks list from a file
+ */
+static void read_bb_file(ext2_filsys fs, badblocks_list *bb_list,
+ const char *bad_blocks_file)
+{
+ FILE *f;
+ errcode_t retval;
+
+ f = fopen(bad_blocks_file, "r");
+ if (!f) {
+ com_err("read_bad_blocks_file", errno,
+ _("while trying to open %s"), bad_blocks_file);
+ exit(1);
+ }
+ retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
+ fclose (f);
+ if (retval) {
+ com_err("ext2fs_read_bb_FILE", retval, "%s",
+ _("while reading in list of bad blocks from file"));
+ exit(1);
+ }
+}
+
+/*
+ * Runs the badblocks program to test the disk
+ */
+static void test_disk(ext2_filsys fs, badblocks_list *bb_list)
+{
+ FILE *f;
+ errcode_t retval;
+ char buf[1024];
+
+ sprintf(buf, "badblocks -b %d -X %s%s%s %llu", fs->blocksize,
+ quiet ? "" : "-s ", (cflag > 1) ? "-w " : "",
+ fs->device_name,
+ (unsigned long long) ext2fs_blocks_count(fs->super)-1);
+ if (verbose)
+ printf(_("Running command: %s\n"), buf);
+ f = popen(buf, "r");
+ if (!f) {
+ com_err("popen", errno,
+ _("while trying to run '%s'"), buf);
+ exit(1);
+ }
+ retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
+ pclose(f);
+ if (retval) {
+ com_err("ext2fs_read_bb_FILE", retval, "%s",
+ _("while processing list of bad blocks from program"));
+ exit(1);
+ }
+}
+
+static void handle_bad_blocks(ext2_filsys fs, badblocks_list bb_list)
+{
+ dgrp_t i;
+ blk_t j;
+ unsigned must_be_good;
+ blk_t blk;
+ badblocks_iterate bb_iter;
+ errcode_t retval;
+ blk_t group_block;
+ int group;
+ int group_bad;
+
+ if (!bb_list)
+ return;
+
+ /*
+ * The primary superblock and group descriptors *must* be
+ * good; if not, abort.
+ */
+ must_be_good = fs->super->s_first_data_block + 1 + fs->desc_blocks;
+ for (i = fs->super->s_first_data_block; i <= must_be_good; i++) {
+ if (ext2fs_badblocks_list_test(bb_list, i)) {
+ fprintf(stderr, _("Block %d in primary "
+ "superblock/group descriptor area bad.\n"), i);
+ fprintf(stderr, _("Blocks %u through %u must be good "
+ "in order to build a filesystem.\n"),
+ fs->super->s_first_data_block, must_be_good);
+ fputs(_("Aborting....\n"), stderr);
+ exit(1);
+ }
+ }
+
+ /*
+ * See if any of the bad blocks are showing up in the backup
+ * superblocks and/or group descriptors. If so, issue a
+ * warning and adjust the block counts appropriately.
+ */
+ group_block = fs->super->s_first_data_block +
+ fs->super->s_blocks_per_group;
+
+ for (i = 1; i < fs->group_desc_count; i++) {
+ group_bad = 0;
+ for (j=0; j < fs->desc_blocks+1; j++) {
+ if (ext2fs_badblocks_list_test(bb_list,
+ group_block + j)) {
+ if (!group_bad)
+ fprintf(stderr,
+_("Warning: the backup superblock/group descriptors at block %u contain\n"
+" bad blocks.\n\n"),
+ group_block);
+ group_bad++;
+ group = ext2fs_group_of_blk2(fs, group_block+j);
+ ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group) + 1);
+ ext2fs_group_desc_csum_set(fs, group);
+ ext2fs_free_blocks_count_add(fs->super, 1);
+ }
+ }
+ group_block += fs->super->s_blocks_per_group;
+ }
+
+ /*
+ * Mark all the bad blocks as used...
+ */
+ retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
+ if (retval) {
+ com_err("ext2fs_badblocks_list_iterate_begin", retval, "%s",
+ _("while marking bad blocks as used"));
+ exit(1);
+ }
+ while (ext2fs_badblocks_list_iterate(bb_iter, &blk))
+ ext2fs_mark_block_bitmap2(fs->block_map, blk);
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+}
+
+static void write_reserved_inodes(ext2_filsys fs)
+{
+ errcode_t retval;
+ ext2_ino_t ino;
+ struct ext2_inode *inode;
+
+ retval = ext2fs_get_memzero(EXT2_INODE_SIZE(fs->super), &inode);
+ if (retval) {
+ com_err("inode_init", retval, _("while allocating memory"));
+ exit(1);
+ }
+
+ for (ino = 1; ino < EXT2_FIRST_INO(fs->super); ino++) {
+ retval = ext2fs_write_inode_full(fs, ino, inode,
+ EXT2_INODE_SIZE(fs->super));
+ if (retval) {
+ com_err("ext2fs_write_inode_full", retval,
+ _("while writing reserved inodes"));
+ exit(1);
+ }
+ }
+
+ ext2fs_free_mem(&inode);
+}
+
+static errcode_t packed_allocate_tables(ext2_filsys fs)
+{
+ errcode_t retval;
+ dgrp_t i;
+ blk64_t goal = 0;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ retval = ext2fs_new_block2(fs, goal, NULL, &goal);
+ if (retval)
+ return retval;
+ ext2fs_block_alloc_stats2(fs, goal, +1);
+ ext2fs_block_bitmap_loc_set(fs, i, goal);
+ }
+ for (i = 0; i < fs->group_desc_count; i++) {
+ retval = ext2fs_new_block2(fs, goal, NULL, &goal);
+ if (retval)
+ return retval;
+ ext2fs_block_alloc_stats2(fs, goal, +1);
+ ext2fs_inode_bitmap_loc_set(fs, i, goal);
+ }
+ for (i = 0; i < fs->group_desc_count; i++) {
+ blk64_t end = ext2fs_blocks_count(fs->super) - 1;
+ retval = ext2fs_get_free_blocks2(fs, goal, end,
+ fs->inode_blocks_per_group,
+ fs->block_map, &goal);
+ if (retval)
+ return retval;
+ ext2fs_block_alloc_stats_range(fs, goal,
+ fs->inode_blocks_per_group, +1);
+ ext2fs_inode_table_loc_set(fs, i, goal);
+ ext2fs_group_desc_csum_set(fs, i);
+ }
+ return 0;
+}
+
+static void write_inode_tables(ext2_filsys fs, int lazy_flag, int itable_zeroed)
+{
+ errcode_t retval;
+ blk64_t blk;
+ dgrp_t i;
+ int num;
+ struct ext2fs_numeric_progress_struct progress;
+
+ ext2fs_numeric_progress_init(fs, &progress,
+ _("Writing inode tables: "),
+ fs->group_desc_count);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ ext2fs_numeric_progress_update(fs, &progress, i);
+
+ blk = ext2fs_inode_table_loc(fs, i);
+ num = fs->inode_blocks_per_group;
+
+ if (lazy_flag)
+ num = ext2fs_div_ceil((fs->super->s_inodes_per_group -
+ ext2fs_bg_itable_unused(fs, i)) *
+ EXT2_INODE_SIZE(fs->super),
+ EXT2_BLOCK_SIZE(fs->super));
+ if (!lazy_flag || itable_zeroed) {
+ /* The kernel doesn't need to zero the itable blocks */
+ ext2fs_bg_flags_set(fs, i, EXT2_BG_INODE_ZEROED);
+ ext2fs_group_desc_csum_set(fs, i);
+ }
+ if (!itable_zeroed) {
+ retval = ext2fs_zero_blocks2(fs, blk, num, &blk, &num);
+ if (retval) {
+ fprintf(stderr, _("\nCould not write %d "
+ "blocks in inode table starting at %llu: %s\n"),
+ num, (unsigned long long) blk,
+ error_message(retval));
+ exit(1);
+ }
+ }
+ if (sync_kludge) {
+ if (sync_kludge == 1)
+ io_channel_flush(fs->io);
+ else if ((i % sync_kludge) == 0)
+ io_channel_flush(fs->io);
+ }
+ }
+ ext2fs_numeric_progress_close(fs, &progress,
+ _("done \n"));
+
+ /* Reserved inodes must always have correct checksums */
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ write_reserved_inodes(fs);
+}
+
+static void create_root_dir(ext2_filsys fs)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+
+ retval = ext2fs_mkdir(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, 0);
+ if (retval) {
+ com_err("ext2fs_mkdir", retval, "%s",
+ _("while creating root dir"));
+ exit(1);
+ }
+ if (root_uid != 0 || root_gid != 0) {
+ retval = ext2fs_read_inode(fs, EXT2_ROOT_INO, &inode);
+ if (retval) {
+ com_err("ext2fs_read_inode", retval, "%s",
+ _("while reading root inode"));
+ exit(1);
+ }
+
+ inode.i_uid = root_uid;
+ ext2fs_set_i_uid_high(inode, root_uid >> 16);
+ inode.i_gid = root_gid;
+ ext2fs_set_i_gid_high(inode, root_gid >> 16);
+
+ retval = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
+ if (retval) {
+ com_err("ext2fs_write_inode", retval, "%s",
+ _("while setting root inode ownership"));
+ exit(1);
+ }
+ }
+}
+
+static void create_lost_and_found(ext2_filsys fs)
+{
+ unsigned int lpf_size = 0;
+ errcode_t retval;
+ ext2_ino_t ino;
+ const char *name = "lost+found";
+ int i;
+
+ fs->umask = 077;
+ retval = ext2fs_mkdir(fs, EXT2_ROOT_INO, 0, name);
+ if (retval) {
+ com_err("ext2fs_mkdir", retval, "%s",
+ _("while creating /lost+found"));
+ exit(1);
+ }
+
+ retval = ext2fs_lookup(fs, EXT2_ROOT_INO, name, strlen(name), 0, &ino);
+ if (retval) {
+ com_err("ext2_lookup", retval, "%s",
+ _("while looking up /lost+found"));
+ exit(1);
+ }
+
+ for (i=1; i < EXT2_NDIR_BLOCKS; i++) {
+ /* Ensure that lost+found is at least 2 blocks, so we always
+ * test large empty blocks for big-block filesystems. */
+ if ((lpf_size += fs->blocksize) >= 16*1024 &&
+ lpf_size >= 2 * fs->blocksize)
+ break;
+ retval = ext2fs_expand_dir(fs, ino);
+ if (retval) {
+ com_err("ext2fs_expand_dir", retval, "%s",
+ _("while expanding /lost+found"));
+ exit(1);
+ }
+ }
+}
+
+static void create_bad_block_inode(ext2_filsys fs, badblocks_list bb_list)
+{
+ errcode_t retval;
+
+ ext2fs_mark_inode_bitmap2(fs->inode_map, EXT2_BAD_INO);
+ ext2fs_inode_alloc_stats2(fs, EXT2_BAD_INO, +1, 0);
+ retval = ext2fs_update_bb_inode(fs, bb_list);
+ if (retval) {
+ com_err("ext2fs_update_bb_inode", retval, "%s",
+ _("while setting bad block inode"));
+ exit(1);
+ }
+
+}
+
+static void reserve_inodes(ext2_filsys fs)
+{
+ ext2_ino_t i;
+
+ for (i = EXT2_ROOT_INO + 1; i < EXT2_FIRST_INODE(fs->super); i++)
+ ext2fs_inode_alloc_stats2(fs, i, +1, 0);
+ ext2fs_mark_ib_dirty(fs);
+}
+
+#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */
+#define BSD_MAGICDISK (0x57455682UL) /* The disk magic number reversed */
+#define BSD_LABEL_OFFSET 64
+
+static void zap_sector(ext2_filsys fs, int sect, int nsect)
+{
+ char *buf;
+ int retval;
+ unsigned int *magic;
+
+ buf = calloc(512, nsect);
+ if (!buf) {
+ printf(_("Out of memory erasing sectors %d-%d\n"),
+ sect, sect + nsect - 1);
+ exit(1);
+ }
+
+ if (sect == 0) {
+ /* Check for a BSD disklabel, and don't erase it if so */
+ retval = io_channel_read_blk64(fs->io, 0, -512, buf);
+ if (retval)
+ fprintf(stderr,
+ _("Warning: could not read block 0: %s\n"),
+ error_message(retval));
+ else {
+ magic = (unsigned int *) (buf + BSD_LABEL_OFFSET);
+ if ((*magic == BSD_DISKMAGIC) ||
+ (*magic == BSD_MAGICDISK)) {
+ free(buf);
+ return;
+ }
+ }
+ }
+
+ memset(buf, 0, 512*nsect);
+ io_channel_set_blksize(fs->io, 512);
+ retval = io_channel_write_blk64(fs->io, sect, -512*nsect, buf);
+ io_channel_set_blksize(fs->io, fs->blocksize);
+ free(buf);
+ if (retval)
+ fprintf(stderr, _("Warning: could not erase sector %d: %s\n"),
+ sect, error_message(retval));
+}
+
+static void create_journal_dev(ext2_filsys fs)
+{
+ struct ext2fs_numeric_progress_struct progress;
+ errcode_t retval;
+ char *buf;
+ blk64_t blk, err_blk;
+ int c, count, err_count;
+ struct ext2fs_journal_params jparams;
+
+ retval = ext2fs_get_journal_params(&jparams, fs);
+ if (retval) {
+ com_err("create_journal_dev", retval, "%s",
+ _("while splitting the journal size"));
+ exit(1);
+ }
+
+ retval = ext2fs_create_journal_superblock2(fs, &jparams, 0, &buf);
+ if (retval) {
+ com_err("create_journal_dev", retval, "%s",
+ _("while initializing journal superblock"));
+ exit(1);
+ }
+
+ if (journal_flags & EXT2_MKJOURNAL_LAZYINIT)
+ goto write_superblock;
+
+ ext2fs_numeric_progress_init(fs, &progress,
+ _("Zeroing journal device: "),
+ ext2fs_blocks_count(fs->super));
+ blk = 0;
+ count = ext2fs_blocks_count(fs->super);
+ while (count > 0) {
+ if (count > 1024)
+ c = 1024;
+ else
+ c = count;
+ retval = ext2fs_zero_blocks2(fs, blk, c, &err_blk, &err_count);
+ if (retval) {
+ com_err("create_journal_dev", retval,
+ _("while zeroing journal device "
+ "(block %llu, count %d)"),
+ (unsigned long long) err_blk, err_count);
+ exit(1);
+ }
+ blk += c;
+ count -= c;
+ ext2fs_numeric_progress_update(fs, &progress, blk);
+ }
+
+ ext2fs_numeric_progress_close(fs, &progress, NULL);
+write_superblock:
+ retval = io_channel_write_blk64(fs->io,
+ fs->super->s_first_data_block+1,
+ 1, buf);
+ (void) ext2fs_free_mem(&buf);
+ if (retval) {
+ com_err("create_journal_dev", retval, "%s",
+ _("while writing journal superblock"));
+ exit(1);
+ }
+}
+
+static void show_stats(ext2_filsys fs)
+{
+ struct ext2_super_block *s = fs->super;
+ char *os;
+ blk64_t group_block;
+ dgrp_t i;
+ int need, col_left;
+
+ if (!verbose) {
+ printf(_("Creating filesystem with %llu %dk blocks and "
+ "%u inodes\n"),
+ (unsigned long long) ext2fs_blocks_count(s),
+ fs->blocksize >> 10, s->s_inodes_count);
+ goto skip_details;
+ }
+
+ if (ext2fs_blocks_count(&fs_param) != ext2fs_blocks_count(s))
+ fprintf(stderr, _("warning: %llu blocks unused.\n\n"),
+ (unsigned long long) (ext2fs_blocks_count(&fs_param) -
+ ext2fs_blocks_count(s)));
+
+ printf(_("Filesystem label=%.*s\n"), EXT2_LEN_STR(s->s_volume_name));
+
+ os = e2p_os2string(fs->super->s_creator_os);
+ if (os)
+ printf(_("OS type: %s\n"), os);
+ free(os);
+ printf(_("Block size=%u (log=%u)\n"), fs->blocksize,
+ s->s_log_block_size);
+ if (ext2fs_has_feature_bigalloc(fs->super))
+ printf(_("Cluster size=%u (log=%u)\n"),
+ fs->blocksize << fs->cluster_ratio_bits,
+ s->s_log_cluster_size);
+ else
+ printf(_("Fragment size=%u (log=%u)\n"), EXT2_CLUSTER_SIZE(s),
+ s->s_log_cluster_size);
+ printf(_("Stride=%u blocks, Stripe width=%u blocks\n"),
+ s->s_raid_stride, s->s_raid_stripe_width);
+ printf(_("%u inodes, %llu blocks\n"), s->s_inodes_count,
+ (unsigned long long) ext2fs_blocks_count(s));
+ printf(_("%llu blocks (%2.2f%%) reserved for the super user\n"),
+ (unsigned long long) ext2fs_r_blocks_count(s),
+ 100.0 * ext2fs_r_blocks_count(s) / ext2fs_blocks_count(s));
+ printf(_("First data block=%u\n"), s->s_first_data_block);
+ if (root_uid != 0 || root_gid != 0)
+ printf(_("Root directory owner=%u:%u\n"), root_uid, root_gid);
+ if (s->s_reserved_gdt_blocks)
+ printf(_("Maximum filesystem blocks=%lu\n"),
+ (s->s_reserved_gdt_blocks + fs->desc_blocks) *
+ EXT2_DESC_PER_BLOCK(s) * s->s_blocks_per_group);
+ if (fs->group_desc_count > 1)
+ printf(_("%u block groups\n"), fs->group_desc_count);
+ else
+ printf(_("%u block group\n"), fs->group_desc_count);
+ if (ext2fs_has_feature_bigalloc(fs->super))
+ printf(_("%u blocks per group, %u clusters per group\n"),
+ s->s_blocks_per_group, s->s_clusters_per_group);
+ else
+ printf(_("%u blocks per group, %u fragments per group\n"),
+ s->s_blocks_per_group, s->s_clusters_per_group);
+ printf(_("%u inodes per group\n"), s->s_inodes_per_group);
+
+skip_details:
+ if (fs->group_desc_count == 1) {
+ printf("\n");
+ return;
+ }
+
+ if (!e2p_is_null_uuid(s->s_uuid))
+ printf(_("Filesystem UUID: %s\n"), e2p_uuid2str(s->s_uuid));
+ printf("%s", _("Superblock backups stored on blocks: "));
+ group_block = s->s_first_data_block;
+ col_left = 0;
+ for (i = 1; i < fs->group_desc_count; i++) {
+ group_block += s->s_blocks_per_group;
+ if (!ext2fs_bg_has_super(fs, i))
+ continue;
+ if (i != 1)
+ printf(", ");
+ need = int_log10(group_block) + 2;
+ if (need > col_left) {
+ printf("\n\t");
+ col_left = 72;
+ }
+ col_left -= need;
+ printf("%llu", (unsigned long long) group_block);
+ }
+ printf("\n\n");
+}
+
+/*
+ * Returns true if making a file system for the Hurd, else 0
+ */
+static int for_hurd(const char *os)
+{
+ if (!os) {
+#ifdef __GNU__
+ return 1;
+#else
+ return 0;
+#endif
+ }
+ if (isdigit(*os))
+ return (atoi(os) == EXT2_OS_HURD);
+ return (strcasecmp(os, "GNU") == 0 || strcasecmp(os, "hurd") == 0);
+}
+
+/*
+ * Set the S_CREATOR_OS field. Return true if OS is known,
+ * otherwise, 0.
+ */
+static int set_os(struct ext2_super_block *sb, char *os)
+{
+ if (isdigit (*os))
+ sb->s_creator_os = atoi (os);
+ else if (strcasecmp(os, "linux") == 0)
+ sb->s_creator_os = EXT2_OS_LINUX;
+ else if (strcasecmp(os, "GNU") == 0 || strcasecmp(os, "hurd") == 0)
+ sb->s_creator_os = EXT2_OS_HURD;
+ else if (strcasecmp(os, "freebsd") == 0)
+ sb->s_creator_os = EXT2_OS_FREEBSD;
+ else if (strcasecmp(os, "lites") == 0)
+ sb->s_creator_os = EXT2_OS_LITES;
+ else
+ return 0;
+ return 1;
+}
+
+#define PATH_SET "PATH=/sbin"
+
+static void parse_extended_opts(struct ext2_super_block *param,
+ const char *opts)
+{
+ char *buf, *token, *next, *p, *arg, *badopt = 0;
+ int len;
+ int r_usage = 0;
+ int ret;
+ int encoding = -1;
+ char *encoding_flags = NULL;
+
+ len = strlen(opts);
+ buf = malloc(len+1);
+ if (!buf) {
+ fprintf(stderr, "%s",
+ _("Couldn't allocate memory to parse options!\n"));
+ exit(1);
+ }
+ strcpy(buf, opts);
+ for (token = buf; token && *token; token = next) {
+ p = strchr(token, ',');
+ next = 0;
+ if (p) {
+ *p = 0;
+ next = p+1;
+ }
+ arg = strchr(token, '=');
+ if (arg) {
+ *arg = 0;
+ arg++;
+ }
+ if (strcmp(token, "desc-size") == 0 ||
+ strcmp(token, "desc_size") == 0) {
+ int desc_size;
+
+ if (!ext2fs_has_feature_64bit(&fs_param)) {
+ fprintf(stderr,
+ _("%s requires '-O 64bit'\n"), token);
+ r_usage++;
+ continue;
+ }
+ if (param->s_reserved_gdt_blocks != 0) {
+ fprintf(stderr,
+ _("'%s' must be before 'resize=%u'\n"),
+ token, param->s_reserved_gdt_blocks);
+ r_usage++;
+ continue;
+ }
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ desc_size = strtoul(arg, &p, 0);
+ if (*p || (desc_size & (desc_size - 1))) {
+ fprintf(stderr,
+ _("Invalid desc_size: '%s'\n"), arg);
+ r_usage++;
+ continue;
+ }
+ param->s_desc_size = desc_size;
+ } else if (strcmp(token, "hash_seed") == 0) {
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ if (uuid_parse(arg,
+ (unsigned char *)param->s_hash_seed) != 0) {
+ fprintf(stderr,
+ _("Invalid hash seed: %s\n"), arg);
+ r_usage++;
+ continue;
+ }
+ } else if (strcmp(token, "offset") == 0) {
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ offset = strtoull(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr, _("Invalid offset: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else if (strcmp(token, "mmp_update_interval") == 0) {
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ param->s_mmp_update_interval = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid mmp_update_interval: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else if (strcmp(token, "no_copy_xattrs") == 0) {
+ no_copy_xattrs = 1;
+ continue;
+ } else if (strcmp(token, "num_backup_sb") == 0) {
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ num_backups = strtoul(arg, &p, 0);
+ if (*p || num_backups > 2) {
+ fprintf(stderr,
+ _("Invalid # of backup "
+ "superblocks: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else if (strcmp(token, "packed_meta_blocks") == 0) {
+ if (arg)
+ packed_meta_blocks = strtoul(arg, &p, 0);
+ else
+ packed_meta_blocks = 1;
+ if (packed_meta_blocks)
+ journal_location = 0;
+ } else if (strcmp(token, "stride") == 0) {
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ param->s_raid_stride = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid stride parameter: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else if (strcmp(token, "stripe-width") == 0 ||
+ strcmp(token, "stripe_width") == 0) {
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ param->s_raid_stripe_width = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid stripe-width parameter: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else if (!strcmp(token, "resize")) {
+ blk64_t resize;
+ unsigned long bpg, rsv_groups;
+ unsigned long group_desc_count, desc_blocks;
+ unsigned int gdpb, blocksize;
+ int rsv_gdb;
+
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+
+ resize = parse_num_blocks2(arg,
+ param->s_log_block_size);
+
+ if (resize == 0) {
+ fprintf(stderr,
+ _("Invalid resize parameter: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ if (resize <= ext2fs_blocks_count(param)) {
+ fprintf(stderr, "%s",
+ _("The resize maximum must be greater "
+ "than the filesystem size.\n"));
+ r_usage++;
+ continue;
+ }
+
+ blocksize = EXT2_BLOCK_SIZE(param);
+ bpg = param->s_blocks_per_group;
+ if (!bpg)
+ bpg = blocksize * 8;
+ gdpb = EXT2_DESC_PER_BLOCK(param);
+ group_desc_count = (__u32) ext2fs_div64_ceil(
+ ext2fs_blocks_count(param), bpg);
+ desc_blocks = (group_desc_count +
+ gdpb - 1) / gdpb;
+ rsv_groups = ext2fs_div64_ceil(resize, bpg);
+ rsv_gdb = ext2fs_div_ceil(rsv_groups, gdpb) -
+ desc_blocks;
+ if (rsv_gdb > (int) EXT2_ADDR_PER_BLOCK(param))
+ rsv_gdb = EXT2_ADDR_PER_BLOCK(param);
+
+ if (rsv_gdb > 0) {
+ if (param->s_rev_level == EXT2_GOOD_OLD_REV) {
+ fprintf(stderr, "%s",
+ _("On-line resizing not supported with revision 0 filesystems\n"));
+ free(buf);
+ exit(1);
+ }
+ ext2fs_set_feature_resize_inode(param);
+
+ param->s_reserved_gdt_blocks = rsv_gdb;
+ }
+ } else if (!strcmp(token, "test_fs")) {
+ param->s_flags |= EXT2_FLAGS_TEST_FILESYS;
+ } else if (!strcmp(token, "lazy_itable_init")) {
+ if (arg)
+ lazy_itable_init = strtoul(arg, &p, 0);
+ else
+ lazy_itable_init = 1;
+ } else if (!strcmp(token, "assume_storage_prezeroed")) {
+ if (arg)
+ assume_storage_prezeroed = strtoul(arg, &p, 0);
+ else
+ assume_storage_prezeroed = 1;
+ } else if (!strcmp(token, "lazy_journal_init")) {
+ if (arg)
+ journal_flags |= strtoul(arg, &p, 0) ?
+ EXT2_MKJOURNAL_LAZYINIT : 0;
+ else
+ journal_flags |= EXT2_MKJOURNAL_LAZYINIT;
+ } else if (!strcmp(token, "root_owner")) {
+ if (arg) {
+ root_uid = strtoul(arg, &p, 0);
+ if (*p != ':') {
+ fprintf(stderr,
+ _("Invalid root_owner: '%s'\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ p++;
+ root_gid = strtoul(p, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid root_owner: '%s'\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else {
+ root_uid = getuid();
+ root_gid = getgid();
+ }
+ } else if (!strcmp(token, "discard")) {
+ discard = 1;
+ } else if (!strcmp(token, "nodiscard")) {
+ discard = 0;
+ } else if (!strcmp(token, "quotatype")) {
+ char *errtok = NULL;
+
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ quotatype_bits = 0;
+ ret = parse_quota_types(arg, &quotatype_bits, &errtok);
+ if (ret) {
+ if (errtok) {
+ fprintf(stderr,
+ "Failed to parse quota type at %s", errtok);
+ free(errtok);
+ } else
+ com_err(program_name, ret,
+ "while parsing quota type");
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ } else if (!strcmp(token, "android_sparse")) {
+ android_sparse_file = 1;
+ } else if (!strcmp(token, "encoding")) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+
+ encoding = e2p_str2encoding(arg);
+ if (encoding < 0) {
+ fprintf(stderr, _("Invalid encoding: %s"), arg);
+ r_usage++;
+ continue;
+ }
+ param->s_encoding = encoding;
+ ext2fs_set_feature_casefold(param);
+ } else if (!strcmp(token, "encoding_flags")) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ encoding_flags = arg;
+ } else if (!strcmp(token, "orphan_file_size")) {
+ if (!arg) {
+ r_usage++;
+ badopt = token;
+ continue;
+ }
+ orphan_file_blocks = parse_num_blocks2(arg,
+ fs_param.s_log_block_size);
+ if (orphan_file_blocks == 0) {
+ fprintf(stderr,
+ _("Invalid size of orphan file %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else {
+ r_usage++;
+ badopt = token;
+ }
+ }
+ if (r_usage) {
+ fprintf(stderr, _("\nBad option(s) specified: %s\n\n"
+ "Extended options are separated by commas, "
+ "and may take an argument which\n"
+ "\tis set off by an equals ('=') sign.\n\n"
+ "Valid extended options are:\n"
+ "\tmmp_update_interval=<interval>\n"
+ "\tnum_backup_sb=<0|1|2>\n"
+ "\tstride=<RAID per-disk data chunk in blocks>\n"
+ "\tstripe-width=<RAID stride * data disks in blocks>\n"
+ "\toffset=<offset to create the file system>\n"
+ "\tresize=<resize maximum size in blocks>\n"
+ "\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+ "\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+ "\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+ "\troot_owner=<uid of root dir>:<gid of root dir>\n"
+ "\ttest_fs\n"
+ "\tdiscard\n"
+ "\tnodiscard\n"
+ "\tencoding=<encoding>\n"
+ "\tencoding_flags=<flags>\n"
+ "\tquotatype=<quota type(s) to be enabled>\n"
+ "\tassume_storage_prezeroed=<0 to disable, 1 to enable>\n\n"),
+ badopt ? badopt : "");
+ free(buf);
+ exit(1);
+ }
+ if (param->s_raid_stride &&
+ (param->s_raid_stripe_width % param->s_raid_stride) != 0)
+ fprintf(stderr, _("\nWarning: RAID stripe-width %u not an even "
+ "multiple of stride %u.\n\n"),
+ param->s_raid_stripe_width, param->s_raid_stride);
+
+ if (ext2fs_has_feature_casefold(param)) {
+ param->s_encoding_flags =
+ e2p_get_encoding_flags(param->s_encoding);
+
+ if (encoding_flags &&
+ e2p_str2encoding_flags(param->s_encoding, encoding_flags,
+ &param->s_encoding_flags)) {
+ fprintf(stderr, _("error: Invalid encoding flag: %s\n"),
+ encoding_flags);
+ free(buf);
+ exit(1);
+ }
+ } else if (encoding_flags) {
+ fprintf(stderr, _("error: An encoding must be explicitly "
+ "specified when passing encoding-flags\n"));
+ free(buf);
+ exit(1);
+ }
+
+ free(buf);
+}
+
+static __u32 ok_features[3] = {
+ /* Compat */
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL |
+ EXT2_FEATURE_COMPAT_RESIZE_INODE |
+ EXT2_FEATURE_COMPAT_DIR_INDEX |
+ EXT2_FEATURE_COMPAT_EXT_ATTR |
+ EXT4_FEATURE_COMPAT_SPARSE_SUPER2 |
+ EXT4_FEATURE_COMPAT_FAST_COMMIT |
+ EXT4_FEATURE_COMPAT_STABLE_INODES |
+ EXT4_FEATURE_COMPAT_ORPHAN_FILE,
+ /* Incompat */
+ EXT2_FEATURE_INCOMPAT_FILETYPE|
+ EXT3_FEATURE_INCOMPAT_EXTENTS|
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|
+ EXT2_FEATURE_INCOMPAT_META_BG|
+ EXT4_FEATURE_INCOMPAT_FLEX_BG|
+ EXT4_FEATURE_INCOMPAT_EA_INODE|
+ EXT4_FEATURE_INCOMPAT_MMP |
+ EXT4_FEATURE_INCOMPAT_64BIT|
+ EXT4_FEATURE_INCOMPAT_INLINE_DATA|
+ EXT4_FEATURE_INCOMPAT_ENCRYPT |
+ EXT4_FEATURE_INCOMPAT_CASEFOLD |
+ EXT4_FEATURE_INCOMPAT_CSUM_SEED |
+ EXT4_FEATURE_INCOMPAT_LARGEDIR,
+ /* R/O compat */
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE|
+ EXT4_FEATURE_RO_COMPAT_HUGE_FILE|
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK|
+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM|
+ EXT4_FEATURE_RO_COMPAT_BIGALLOC|
+ EXT4_FEATURE_RO_COMPAT_QUOTA|
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM|
+ EXT4_FEATURE_RO_COMPAT_PROJECT|
+ EXT4_FEATURE_RO_COMPAT_VERITY
+};
+
+
+static void syntax_err_report(const char *filename, long err, int line_num)
+{
+ fprintf(stderr,
+ _("Syntax error in mke2fs config file (%s, line #%d)\n\t%s\n"),
+ filename, line_num, error_message(err));
+ exit(1);
+}
+
+static const char *config_fn[] = { ROOT_SYSCONFDIR "/mke2fs.conf", 0 };
+
+static void edit_feature(const char *str, __u32 *compat_array)
+{
+ if (!str)
+ return;
+
+ if (e2p_edit_feature(str, compat_array, ok_features)) {
+ fprintf(stderr, _("Invalid filesystem option set: %s\n"),
+ str);
+ exit(1);
+ }
+}
+
+static void edit_mntopts(const char *str, __u32 *mntopts)
+{
+ if (!str)
+ return;
+
+ if (e2p_edit_mntopts(str, mntopts, ~0)) {
+ fprintf(stderr, _("Invalid mount option set: %s\n"),
+ str);
+ exit(1);
+ }
+}
+
+struct str_list {
+ char **list;
+ int num;
+ int max;
+};
+
+static errcode_t init_list(struct str_list *sl)
+{
+ sl->num = 0;
+ sl->max = 1;
+ sl->list = malloc((sl->max+1) * sizeof(char *));
+ if (!sl->list)
+ return ENOMEM;
+ sl->list[0] = 0;
+ return 0;
+}
+
+static errcode_t push_string(struct str_list *sl, const char *str)
+{
+ char **new_list;
+
+ if (sl->num >= sl->max) {
+ sl->max += 2;
+ new_list = realloc(sl->list, (sl->max+1) * sizeof(char *));
+ if (!new_list)
+ return ENOMEM;
+ sl->list = new_list;
+ }
+ sl->list[sl->num] = malloc(strlen(str)+1);
+ if (sl->list[sl->num] == 0)
+ return ENOMEM;
+ strcpy(sl->list[sl->num], str);
+ sl->num++;
+ sl->list[sl->num] = 0;
+ return 0;
+}
+
+static void print_str_list(char **list)
+{
+ char **cpp;
+
+ for (cpp = list; *cpp; cpp++) {
+ printf("'%s'", *cpp);
+ if (cpp[1])
+ fputs(", ", stdout);
+ }
+ fputc('\n', stdout);
+}
+
+/*
+ * Return TRUE if the profile has the given subsection
+ */
+static int profile_has_subsection(profile_t prof, const char *section,
+ const char *subsection)
+{
+ void *state;
+ const char *names[4];
+ char *name;
+ int ret = 0;
+
+ names[0] = section;
+ names[1] = subsection;
+ names[2] = 0;
+
+ if (profile_iterator_create(prof, names,
+ PROFILE_ITER_LIST_SECTION |
+ PROFILE_ITER_RELATIONS_ONLY, &state))
+ return 0;
+
+ if ((profile_iterator(&state, &name, 0) == 0) && name) {
+ free(name);
+ ret = 1;
+ }
+
+ profile_iterator_free(&state);
+ return ret;
+}
+
+static char **parse_fs_type(const char *fs_type,
+ const char *usage_types,
+ struct ext2_super_block *sb,
+ blk64_t fs_blocks_count,
+ char *progname)
+{
+ const char *ext_type = 0;
+ char *parse_str;
+ char *profile_type = 0;
+ char *cp, *t;
+ const char *size_type;
+ struct str_list list;
+ unsigned long long meg;
+ int is_hurd = for_hurd(creator_os);
+
+ if (init_list(&list))
+ return 0;
+
+ if (fs_type)
+ ext_type = fs_type;
+ else if (is_hurd)
+ ext_type = "ext2";
+ else if (!strcmp(program_name, "mke3fs"))
+ ext_type = "ext3";
+ else if (!strcmp(program_name, "mke4fs"))
+ ext_type = "ext4";
+ else if (progname) {
+ ext_type = strrchr(progname, '/');
+ if (ext_type)
+ ext_type++;
+ else
+ ext_type = progname;
+
+ if (!strncmp(ext_type, "mkfs.", 5)) {
+ ext_type += 5;
+ if (ext_type[0] == 0)
+ ext_type = 0;
+ } else
+ ext_type = 0;
+ }
+
+ if (!ext_type) {
+ profile_get_string(profile, "defaults", "fs_type", 0,
+ "ext2", &profile_type);
+ ext_type = profile_type;
+ if (!strcmp(ext_type, "ext2") && (journal_size != 0))
+ ext_type = "ext3";
+ }
+
+
+ if (!profile_has_subsection(profile, "fs_types", ext_type) &&
+ strcmp(ext_type, "ext2")) {
+ printf(_("\nYour mke2fs.conf file does not define the "
+ "%s filesystem type.\n"), ext_type);
+ if (!strcmp(ext_type, "ext3") || !strcmp(ext_type, "ext4") ||
+ !strcmp(ext_type, "ext4dev")) {
+ printf("%s", _("You probably need to install an "
+ "updated mke2fs.conf file.\n\n"));
+ }
+ if (!force) {
+ printf("%s", _("Aborting...\n"));
+ exit(1);
+ }
+ }
+
+ meg = (1024 * 1024) / EXT2_BLOCK_SIZE(sb);
+ if (fs_blocks_count < 3 * meg)
+ size_type = "floppy";
+ else if (fs_blocks_count < 512 * meg)
+ size_type = "small";
+ else if (fs_blocks_count < 4 * 1024 * 1024 * meg)
+ size_type = "default";
+ else if (fs_blocks_count < 16 * 1024 * 1024 * meg)
+ size_type = "big";
+ else
+ size_type = "huge";
+
+ if (!usage_types)
+ usage_types = size_type;
+
+ parse_str = malloc(strlen(usage_types)+1);
+ if (!parse_str) {
+ free(profile_type);
+ free(list.list);
+ return 0;
+ }
+ strcpy(parse_str, usage_types);
+
+ if (ext_type)
+ push_string(&list, ext_type);
+ cp = parse_str;
+ while (1) {
+ t = strchr(cp, ',');
+ if (t)
+ *t = '\0';
+
+ if (*cp) {
+ if (profile_has_subsection(profile, "fs_types", cp))
+ push_string(&list, cp);
+ else if (strcmp(cp, "default") != 0)
+ fprintf(stderr,
+ _("\nWarning: the fs_type %s is not "
+ "defined in mke2fs.conf\n\n"),
+ cp);
+ }
+ if (t)
+ cp = t+1;
+ else
+ break;
+ }
+ free(parse_str);
+ free(profile_type);
+ if (is_hurd)
+ push_string(&list, "hurd");
+ return (list.list);
+}
+
+char *get_string_from_profile(char **types, const char *opt,
+ const char *def_val)
+{
+ char *ret = 0;
+ int i;
+
+ for (i=0; types[i]; i++);
+ for (i-=1; i >=0 ; i--) {
+ profile_get_string(profile, "fs_types", types[i],
+ opt, 0, &ret);
+ if (ret)
+ return ret;
+ }
+ profile_get_string(profile, "defaults", opt, 0, def_val, &ret);
+ return (ret);
+}
+
+int get_int_from_profile(char **types, const char *opt, int def_val)
+{
+ int ret;
+ char **cpp;
+
+ profile_get_integer(profile, "defaults", opt, 0, def_val, &ret);
+ for (cpp = types; *cpp; cpp++)
+ profile_get_integer(profile, "fs_types", *cpp, opt, ret, &ret);
+ return ret;
+}
+
+static unsigned int get_uint_from_profile(char **types, const char *opt,
+ unsigned int def_val)
+{
+ unsigned int ret;
+ char **cpp;
+
+ profile_get_uint(profile, "defaults", opt, 0, def_val, &ret);
+ for (cpp = types; *cpp; cpp++)
+ profile_get_uint(profile, "fs_types", *cpp, opt, ret, &ret);
+ return ret;
+}
+
+static double get_double_from_profile(char **types, const char *opt,
+ double def_val)
+{
+ double ret;
+ char **cpp;
+
+ profile_get_double(profile, "defaults", opt, 0, def_val, &ret);
+ for (cpp = types; *cpp; cpp++)
+ profile_get_double(profile, "fs_types", *cpp, opt, ret, &ret);
+ return ret;
+}
+
+int get_bool_from_profile(char **types, const char *opt, int def_val)
+{
+ int ret;
+ char **cpp;
+
+ profile_get_boolean(profile, "defaults", opt, 0, def_val, &ret);
+ for (cpp = types; *cpp; cpp++)
+ profile_get_boolean(profile, "fs_types", *cpp, opt, ret, &ret);
+ return ret;
+}
+
+extern const char *mke2fs_default_profile;
+static const char *default_files[] = { "<default>", 0 };
+
+struct device_param {
+ unsigned long min_io; /* preferred minimum IO size */
+ unsigned long opt_io; /* optimal IO size */
+ unsigned long alignment_offset; /* alignment offset wrt physical block size */
+ unsigned int dax:1; /* supports dax? */
+};
+
+#ifdef HAVE_BLKID_PROBE_GET_TOPOLOGY
+/*
+ * Sets the geometry of a device (stripe/stride), and returns the
+ * device's alignment offset, if any, or a negative error.
+ */
+static int get_device_geometry(const char *file,
+ unsigned int blocksize,
+ unsigned int psector_size,
+ struct device_param *dev_param)
+{
+ int rc = -1;
+ blkid_probe pr;
+ blkid_topology tp;
+ struct stat statbuf;
+
+ memset(dev_param, 0, sizeof(*dev_param));
+
+ /* Nothing to do for a regular file */
+ if (!stat(file, &statbuf) && S_ISREG(statbuf.st_mode))
+ return 0;
+
+ pr = blkid_new_probe_from_filename(file);
+ if (!pr)
+ goto out;
+
+ tp = blkid_probe_get_topology(pr);
+ if (!tp)
+ goto out;
+
+ dev_param->min_io = blkid_topology_get_minimum_io_size(tp);
+ dev_param->opt_io = blkid_topology_get_optimal_io_size(tp);
+ if ((dev_param->min_io == 0) && (psector_size > blocksize))
+ dev_param->min_io = psector_size;
+ if ((dev_param->opt_io == 0) && dev_param->min_io > 0)
+ dev_param->opt_io = dev_param->min_io;
+ if ((dev_param->opt_io == 0) && (psector_size > blocksize))
+ dev_param->opt_io = psector_size;
+
+ dev_param->alignment_offset = blkid_topology_get_alignment_offset(tp);
+#ifdef HAVE_BLKID_TOPOLOGY_GET_DAX
+ dev_param->dax = blkid_topology_get_dax(tp);
+#endif
+ rc = 0;
+out:
+ blkid_free_probe(pr);
+ return rc;
+}
+#endif
+
+static void PRS(int argc, char *argv[])
+{
+ int b, c, flags;
+ int cluster_size = 0;
+ char *tmp, **cpp;
+ int explicit_fssize = 0;
+ int blocksize = 0;
+ int inode_ratio = 0;
+ int inode_size = 0;
+ unsigned long flex_bg_size = 0;
+ double reserved_ratio = -1.0;
+ int lsector_size = 0, psector_size = 0;
+ int show_version_only = 0, is_device = 0;
+ unsigned long long num_inodes = 0; /* unsigned long long to catch too-large input */
+ int default_orphan_file = 0;
+ int default_csum_seed = 0;
+ errcode_t retval;
+ char * oldpath = getenv("PATH");
+ char * extended_opts = 0;
+ char * fs_type = 0;
+ char * usage_types = 0;
+ /*
+ * NOTE: A few words about fs_blocks_count and blocksize:
+ *
+ * Initially, blocksize is set to zero, which implies 1024.
+ * If -b is specified, blocksize is updated to the user's value.
+ *
+ * Next, the device size or the user's "blocks" command line argument
+ * is used to set fs_blocks_count; the units are blocksize.
+ *
+ * Later, if blocksize hasn't been set and the profile specifies a
+ * blocksize, then blocksize is updated and fs_blocks_count is scaled
+ * appropriately. Note the change in units!
+ *
+ * Finally, we complain about fs_blocks_count > 2^32 on a non-64bit fs.
+ */
+ blk64_t fs_blocks_count = 0;
+ int s_opt = -1, r_opt = -1;
+ char *fs_features = 0;
+ int fs_features_size = 0;
+ int use_bsize;
+ char *newpath;
+ int pathlen = sizeof(PATH_SET) + 1;
+#ifdef HAVE_BLKID_PROBE_GET_TOPOLOGY
+ struct device_param dev_param;
+#endif
+
+ if (oldpath)
+ pathlen += strlen(oldpath);
+ newpath = malloc(pathlen);
+ if (!newpath) {
+ fprintf(stderr, "%s",
+ _("Couldn't allocate memory for new PATH.\n"));
+ exit(1);
+ }
+ strcpy(newpath, PATH_SET);
+
+ /* Update our PATH to include /sbin */
+ if (oldpath) {
+ strcat (newpath, ":");
+ strcat (newpath, oldpath);
+ }
+ putenv (newpath);
+
+ /* Determine the system page size if possible */
+#ifdef HAVE_SYSCONF
+#if (!defined(_SC_PAGESIZE) && defined(_SC_PAGE_SIZE))
+#define _SC_PAGESIZE _SC_PAGE_SIZE
+#endif
+#ifdef _SC_PAGESIZE
+ {
+ long sysval = sysconf(_SC_PAGESIZE);
+
+ if (sysval > 0)
+ sys_page_size = sysval;
+ }
+#endif /* _SC_PAGESIZE */
+#endif /* HAVE_SYSCONF */
+
+ if ((tmp = getenv("MKE2FS_CONFIG")) != NULL)
+ config_fn[0] = tmp;
+ profile_set_syntax_err_cb(syntax_err_report);
+ retval = profile_init(config_fn, &profile);
+ if (retval == ENOENT) {
+ retval = profile_init(default_files, &profile);
+ if (retval)
+ goto profile_error;
+ retval = profile_set_default(profile, mke2fs_default_profile);
+ if (retval)
+ goto profile_error;
+ } else if (retval) {
+profile_error:
+ fprintf(stderr, _("Couldn't init profile successfully"
+ " (error: %ld).\n"), retval);
+ exit(1);
+ }
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ add_error_table(&et_ext2_error_table);
+ add_error_table(&et_prof_error_table);
+ memset(&fs_param, 0, sizeof(struct ext2_super_block));
+ fs_param.s_rev_level = 1; /* Create revision 1 filesystems now */
+
+ if (is_before_linux_ver(2, 2, 0))
+ fs_param.s_rev_level = 0;
+
+ if (argc && *argv) {
+ program_name = get_progname(*argv);
+
+ /* If called as mkfs.ext3, create a journal inode */
+ if (!strcmp(program_name, "mkfs.ext3") ||
+ !strcmp(program_name, "mke3fs"))
+ journal_size = -1;
+ }
+
+ while ((c = getopt (argc, argv,
+ "b:cd:e:g:i:jl:m:no:qr:s:t:vC:DE:FG:I:J:KL:M:N:O:R:ST:U:Vz:")) != EOF) {
+ switch (c) {
+ case 'b':
+ blocksize = parse_num_blocks2(optarg, -1);
+ b = (blocksize > 0) ? blocksize : -blocksize;
+ if (b < EXT2_MIN_BLOCK_SIZE ||
+ b > EXT2_MAX_BLOCK_SIZE) {
+ com_err(program_name, 0,
+ _("invalid block size - %s"), optarg);
+ exit(1);
+ }
+ if (blocksize > 4096)
+ fprintf(stderr, _("Warning: blocksize %d not "
+ "usable on most systems.\n"),
+ blocksize);
+ if (blocksize > 0)
+ fs_param.s_log_block_size =
+ int_log2(blocksize >>
+ EXT2_MIN_BLOCK_LOG_SIZE);
+ break;
+ case 'c': /* Check for bad blocks */
+ cflag++;
+ break;
+ case 'C':
+ cluster_size = parse_num_blocks2(optarg, -1);
+ if (cluster_size <= EXT2_MIN_CLUSTER_SIZE ||
+ cluster_size > EXT2_MAX_CLUSTER_SIZE) {
+ com_err(program_name, 0,
+ _("invalid cluster size - %s"),
+ optarg);
+ exit(1);
+ }
+ break;
+ case 'd':
+ src_root_dir = optarg;
+ break;
+ case 'D':
+ direct_io = 1;
+ break;
+ case 'R':
+ com_err(program_name, 0, "%s",
+ _("'-R' is deprecated, use '-E' instead"));
+ /* fallthrough */
+ case 'E':
+ extended_opts = optarg;
+ break;
+ case 'e':
+ if (strcmp(optarg, "continue") == 0)
+ errors_behavior = EXT2_ERRORS_CONTINUE;
+ else if (strcmp(optarg, "remount-ro") == 0)
+ errors_behavior = EXT2_ERRORS_RO;
+ else if (strcmp(optarg, "panic") == 0)
+ errors_behavior = EXT2_ERRORS_PANIC;
+ else {
+ com_err(program_name, 0,
+ _("bad error behavior - %s"),
+ optarg);
+ usage();
+ }
+ break;
+ case 'F':
+ force++;
+ break;
+ case 'g':
+ fs_param.s_blocks_per_group = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0, "%s",
+ _("Illegal number for blocks per group"));
+ exit(1);
+ }
+ if ((fs_param.s_blocks_per_group % 8) != 0) {
+ com_err(program_name, 0, "%s",
+ _("blocks per group must be multiple of 8"));
+ exit(1);
+ }
+ break;
+ case 'G':
+ flex_bg_size = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0, "%s",
+ _("Illegal number for flex_bg size"));
+ exit(1);
+ }
+ if (flex_bg_size < 1 ||
+ (flex_bg_size & (flex_bg_size-1)) != 0) {
+ com_err(program_name, 0, "%s",
+ _("flex_bg size must be a power of 2"));
+ exit(1);
+ }
+ if (flex_bg_size > MAX_32_NUM) {
+ com_err(program_name, 0,
+ _("flex_bg size (%lu) must be less than"
+ " or equal to 2^31"), flex_bg_size);
+ exit(1);
+ }
+ break;
+ case 'i':
+ inode_ratio = parse_num_blocks(optarg, -1);
+ if (inode_ratio < EXT2_MIN_BLOCK_SIZE ||
+ inode_ratio > EXT2_MAX_BLOCK_SIZE * 1024) {
+ com_err(program_name, 0,
+ _("invalid inode ratio %s (min %d/max %d)"),
+ optarg, EXT2_MIN_BLOCK_SIZE,
+ EXT2_MAX_BLOCK_SIZE * 1024);
+ exit(1);
+ }
+ break;
+ case 'I':
+ inode_size = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("invalid inode size - %s"), optarg);
+ exit(1);
+ }
+ break;
+ case 'j':
+ if (!journal_size)
+ journal_size = -1;
+ if (!journal_fc_size)
+ journal_fc_size = -1;
+ break;
+ case 'J':
+ parse_journal_opts(optarg);
+ break;
+ case 'K':
+ fprintf(stderr, "%s",
+ _("Warning: -K option is deprecated and "
+ "should not be used anymore. Use "
+ "\'-E nodiscard\' extended option "
+ "instead!\n"));
+ discard = 0;
+ break;
+ case 'l':
+ bad_blocks_filename = realloc(bad_blocks_filename,
+ strlen(optarg) + 1);
+ if (!bad_blocks_filename) {
+ com_err(program_name, ENOMEM, "%s",
+ _("in malloc for bad_blocks_filename"));
+ exit(1);
+ }
+ strcpy(bad_blocks_filename, optarg);
+ break;
+ case 'L':
+ volume_label = optarg;
+ if (strlen(volume_label) > EXT2_LABEL_LEN) {
+ volume_label[EXT2_LABEL_LEN] = '\0';
+ fprintf(stderr, _("Warning: label too long; will be truncated to '%s'\n\n"),
+ volume_label);
+ }
+ break;
+ case 'm':
+ reserved_ratio = strtod(optarg, &tmp);
+ if ( *tmp || reserved_ratio > 50 ||
+ reserved_ratio < 0) {
+ com_err(program_name, 0,
+ _("invalid reserved blocks percent - %s"),
+ optarg);
+ exit(1);
+ }
+ break;
+ case 'M':
+ mount_dir = optarg;
+ break;
+ case 'n':
+ noaction++;
+ break;
+ case 'N':
+ num_inodes = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("bad num inodes - %s"), optarg);
+ exit(1);
+ }
+ break;
+ case 'o':
+ creator_os = optarg;
+ break;
+ case 'O':
+ retval = ext2fs_resize_mem(fs_features_size,
+ fs_features_size + 1 + strlen(optarg),
+ &fs_features);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while allocating fs_feature string"));
+ exit(1);
+ }
+ if (fs_features_size)
+ strcat(fs_features, ",");
+ else
+ fs_features[0] = 0;
+ strcat(fs_features, optarg);
+ fs_features_size += 1 + strlen(optarg);
+ break;
+ case 'q':
+ quiet = 1;
+ break;
+ case 'r':
+ r_opt = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("bad revision level - %s"), optarg);
+ exit(1);
+ }
+ if (r_opt > EXT2_MAX_SUPP_REV) {
+ com_err(program_name, EXT2_ET_REV_TOO_HIGH,
+ _("while trying to create revision %d"), r_opt);
+ exit(1);
+ }
+ fs_param.s_rev_level = r_opt;
+ break;
+ case 's': /* deprecated */
+ s_opt = atoi(optarg);
+ break;
+ case 'S':
+ super_only = 1;
+ break;
+ case 't':
+ if (fs_type) {
+ com_err(program_name, 0, "%s",
+ _("The -t option may only be used once"));
+ exit(1);
+ }
+ fs_type = strdup(optarg);
+ break;
+ case 'T':
+ if (usage_types) {
+ com_err(program_name, 0, "%s",
+ _("The -T option may only be used once"));
+ exit(1);
+ }
+ usage_types = strdup(optarg);
+ break;
+ case 'U':
+ fs_uuid = optarg;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'V':
+ /* Print version number and exit */
+ show_version_only++;
+ break;
+ case 'z':
+ undo_file = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+ if ((optind == argc) && !show_version_only)
+ usage();
+ device_name = argv[optind++];
+
+ if (!quiet || show_version_only)
+ fprintf (stderr, "mke2fs %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
+
+ if (show_version_only) {
+ fprintf(stderr, _("\tUsing %s\n"),
+ error_message(EXT2_ET_BASE));
+ exit(0);
+ }
+
+ /*
+ * If there's no blocksize specified and there is a journal
+ * device, use it to figure out the blocksize
+ */
+ if (blocksize <= 0 && journal_device) {
+ ext2_filsys jfs;
+ io_manager io_ptr;
+
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = default_io_manager;
+ } else
+#endif
+ io_ptr = default_io_manager;
+ retval = ext2fs_open(journal_device,
+ EXT2_FLAG_JOURNAL_DEV_OK, 0,
+ 0, io_ptr, &jfs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while trying to open journal device %s\n"),
+ journal_device);
+ exit(1);
+ }
+ if ((blocksize < 0) && (jfs->blocksize < (unsigned) (-blocksize))) {
+ com_err(program_name, 0,
+ _("Journal dev blocksize (%d) smaller than "
+ "minimum blocksize %d\n"), jfs->blocksize,
+ -blocksize);
+ exit(1);
+ }
+ blocksize = jfs->blocksize;
+ printf(_("Using journal device's blocksize: %d\n"), blocksize);
+ fs_param.s_log_block_size =
+ int_log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE);
+ ext2fs_close_free(&jfs);
+ }
+
+ if (optind < argc) {
+ fs_blocks_count = parse_num_blocks2(argv[optind++],
+ fs_param.s_log_block_size);
+ if (!fs_blocks_count) {
+ com_err(program_name, 0,
+ _("invalid blocks '%s' on device '%s'"),
+ argv[optind - 1], device_name);
+ exit(1);
+ }
+ }
+ if (optind < argc)
+ usage();
+
+ profile_get_integer(profile, "options", "sync_kludge", 0, 0,
+ &sync_kludge);
+ tmp = getenv("MKE2FS_SYNC");
+ if (tmp)
+ sync_kludge = atoi(tmp);
+
+ profile_get_integer(profile, "options", "proceed_delay", 0, 0,
+ &proceed_delay);
+
+ if (fs_blocks_count)
+ explicit_fssize = 1;
+
+ check_mount(device_name, force, _("filesystem"));
+
+ /* Determine the size of the device (if possible) */
+ if (noaction && fs_blocks_count) {
+ dev_size = fs_blocks_count;
+ retval = 0;
+ } else
+ retval = ext2fs_get_device_size2(device_name,
+ EXT2_BLOCK_SIZE(&fs_param),
+ &dev_size);
+ if (retval == ENOENT) {
+ int fd;
+
+ if (!explicit_fssize) {
+ fprintf(stderr,
+ _("The file %s does not exist and no "
+ "size was specified.\n"), device_name);
+ exit(1);
+ }
+ fd = ext2fs_open_file(device_name,
+ O_CREAT | O_WRONLY, 0666);
+ if (fd < 0) {
+ retval = errno;
+ } else {
+ dev_size = 0;
+ retval = 0;
+ close(fd);
+ printf(_("Creating regular file %s\n"), device_name);
+ }
+ }
+ if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
+ com_err(program_name, retval, "%s",
+ _("while trying to determine filesystem size"));
+ exit(1);
+ }
+ if (!fs_blocks_count) {
+ if (retval == EXT2_ET_UNIMPLEMENTED) {
+ com_err(program_name, 0, "%s",
+ _("Couldn't determine device size; you "
+ "must specify\nthe size of the "
+ "filesystem\n"));
+ exit(1);
+ } else {
+ if (dev_size == 0) {
+ com_err(program_name, 0, "%s",
+ _("Device size reported to be zero. "
+ "Invalid partition specified, or\n\t"
+ "partition table wasn't reread "
+ "after running fdisk, due to\n\t"
+ "a modified partition being busy "
+ "and in use. You may need to reboot\n\t"
+ "to re-read your partition table.\n"
+ ));
+ exit(1);
+ }
+ fs_blocks_count = dev_size;
+ if (sys_page_size > EXT2_BLOCK_SIZE(&fs_param))
+ fs_blocks_count &= ~((blk64_t) ((sys_page_size /
+ EXT2_BLOCK_SIZE(&fs_param))-1));
+ }
+ } else if (!force && is_device && (fs_blocks_count > dev_size)) {
+ com_err(program_name, 0, "%s",
+ _("Filesystem larger than apparent device size."));
+ proceed_question(proceed_delay);
+ }
+
+ if (!fs_type)
+ profile_get_string(profile, "devices", device_name,
+ "fs_type", 0, &fs_type);
+ if (!usage_types)
+ profile_get_string(profile, "devices", device_name,
+ "usage_types", 0, &usage_types);
+ if (!creator_os)
+ profile_get_string(profile, "defaults", "creator_os", 0,
+ 0, &creator_os);
+
+ /*
+ * We have the file system (or device) size, so we can now
+ * determine the appropriate file system types so the fs can
+ * be appropriately configured.
+ */
+ fs_types = parse_fs_type(fs_type, usage_types, &fs_param,
+ fs_blocks_count ? fs_blocks_count : dev_size,
+ argv[0]);
+ if (!fs_types) {
+ fprintf(stderr, "%s", _("Failed to parse fs types list\n"));
+ exit(1);
+ }
+
+ /* Figure out what features should be enabled */
+
+ tmp = NULL;
+ if (fs_param.s_rev_level != EXT2_GOOD_OLD_REV) {
+ tmp = get_string_from_profile(fs_types, "base_features",
+ "sparse_super,large_file,filetype,resize_inode,dir_index");
+ edit_feature(tmp, &fs_param.s_feature_compat);
+ free(tmp);
+
+ /* And which mount options as well */
+ tmp = get_string_from_profile(fs_types, "default_mntopts",
+ "acl,user_xattr");
+ edit_mntopts(tmp, &fs_param.s_default_mount_opts);
+ if (tmp)
+ free(tmp);
+
+ for (cpp = fs_types; *cpp; cpp++) {
+ tmp = NULL;
+ profile_get_string(profile, "fs_types", *cpp,
+ "features", "", &tmp);
+ if (tmp && *tmp)
+ edit_feature(tmp, &fs_param.s_feature_compat);
+ if (tmp)
+ free(tmp);
+ }
+ tmp = get_string_from_profile(fs_types, "default_features",
+ "");
+ }
+ /* Mask off features which aren't supported by the Hurd */
+ if (for_hurd(creator_os)) {
+ ext2fs_clear_feature_filetype(&fs_param);
+ ext2fs_clear_feature_huge_file(&fs_param);
+ ext2fs_clear_feature_metadata_csum(&fs_param);
+ ext2fs_clear_feature_ea_inode(&fs_param);
+ ext2fs_clear_feature_casefold(&fs_param);
+ }
+ if (!fs_features && tmp)
+ edit_feature(tmp, &fs_param.s_feature_compat);
+ /*
+ * Now all the defaults are incorporated in fs_param. Check the state
+ * of orphan_file feature so that we know whether we should silently
+ * disabled in case journal gets disabled.
+ */
+ if (ext2fs_has_feature_orphan_file(&fs_param))
+ default_orphan_file = 1;
+ if (ext2fs_has_feature_csum_seed(&fs_param))
+ default_csum_seed = 1;
+ if (fs_features)
+ edit_feature(fs_features, &fs_param.s_feature_compat);
+ /* Silently disable orphan_file if user chose fs without journal */
+ if (default_orphan_file && !ext2fs_has_feature_journal(&fs_param))
+ ext2fs_clear_feature_orphan_file(&fs_param);
+ if (default_csum_seed && !ext2fs_has_feature_metadata_csum(&fs_param))
+ ext2fs_clear_feature_csum_seed(&fs_param);
+ if (tmp)
+ free(tmp);
+ (void) ext2fs_free_mem(&fs_features);
+ /*
+ * If the user specified features incompatible with the Hurd, complain
+ */
+ if (for_hurd(creator_os)) {
+ if (ext2fs_has_feature_filetype(&fs_param)) {
+ fprintf(stderr, "%s", _("The HURD does not support the "
+ "filetype feature.\n"));
+ exit(1);
+ }
+ if (ext2fs_has_feature_huge_file(&fs_param)) {
+ fprintf(stderr, "%s", _("The HURD does not support the "
+ "huge_file feature.\n"));
+ exit(1);
+ }
+ if (ext2fs_has_feature_metadata_csum(&fs_param)) {
+ fprintf(stderr, "%s", _("The HURD does not support the "
+ "metadata_csum feature.\n"));
+ exit(1);
+ }
+ if (ext2fs_has_feature_ea_inode(&fs_param)) {
+ fprintf(stderr, "%s", _("The HURD does not support the "
+ "ea_inode feature.\n"));
+ exit(1);
+ }
+ }
+
+ /* Get the hardware sector sizes, if available */
+ retval = ext2fs_get_device_sectsize(device_name, &lsector_size);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while trying to determine hardware sector size"));
+ exit(1);
+ }
+ retval = ext2fs_get_device_phys_sectsize(device_name, &psector_size);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while trying to determine physical sector size"));
+ exit(1);
+ }
+
+ tmp = getenv("MKE2FS_DEVICE_SECTSIZE");
+ if (tmp != NULL)
+ lsector_size = atoi(tmp);
+ tmp = getenv("MKE2FS_DEVICE_PHYS_SECTSIZE");
+ if (tmp != NULL)
+ psector_size = atoi(tmp);
+
+ /* Older kernels may not have physical/logical distinction */
+ if (!psector_size)
+ psector_size = lsector_size;
+
+ if (blocksize <= 0) {
+ use_bsize = get_int_from_profile(fs_types, "blocksize", 4096);
+
+ if (use_bsize == -1) {
+ use_bsize = sys_page_size;
+ if (is_before_linux_ver(2, 6, 0) && use_bsize > 4096)
+ use_bsize = 4096;
+ }
+ if (lsector_size && use_bsize < lsector_size)
+ use_bsize = lsector_size;
+ if ((blocksize < 0) && (use_bsize < (-blocksize)))
+ use_bsize = -blocksize;
+ blocksize = use_bsize;
+ fs_blocks_count /= (blocksize / 1024);
+ } else {
+ if (blocksize < lsector_size) { /* Impossible */
+ com_err(program_name, EINVAL, "%s",
+ _("while setting blocksize; too small "
+ "for device\n"));
+ exit(1);
+ } else if ((blocksize < psector_size) &&
+ (psector_size <= sys_page_size)) { /* Suboptimal */
+ fprintf(stderr, _("Warning: specified blocksize %d is "
+ "less than device physical sectorsize %d\n"),
+ blocksize, psector_size);
+ }
+ }
+
+ fs_param.s_log_block_size =
+ int_log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE);
+
+ /*
+ * We now need to do a sanity check of fs_blocks_count for
+ * 32-bit vs 64-bit block number support.
+ */
+ if ((fs_blocks_count > MAX_32_NUM) &&
+ ext2fs_has_feature_64bit(&fs_param))
+ ext2fs_clear_feature_resize_inode(&fs_param);
+ if ((fs_blocks_count > MAX_32_NUM) &&
+ !ext2fs_has_feature_64bit(&fs_param) &&
+ get_bool_from_profile(fs_types, "auto_64-bit_support", 0)) {
+ ext2fs_set_feature_64bit(&fs_param);
+ ext2fs_clear_feature_resize_inode(&fs_param);
+ }
+ if ((fs_blocks_count > MAX_32_NUM) &&
+ !ext2fs_has_feature_64bit(&fs_param)) {
+ fprintf(stderr, _("%s: Size of device (0x%llx blocks) %s "
+ "too big to be expressed\n\t"
+ "in 32 bits using a blocksize of %d.\n"),
+ program_name, (unsigned long long) fs_blocks_count,
+ device_name, EXT2_BLOCK_SIZE(&fs_param));
+ exit(1);
+ }
+ /*
+ * Guard against group descriptor count overflowing... Mostly to avoid
+ * strange results for absurdly large devices. This is in log2:
+ * (blocksize) * (bits per byte) * (maximum number of block groups)
+ */
+ if (fs_blocks_count >
+ (1ULL << (EXT2_BLOCK_SIZE_BITS(&fs_param) + 3 + 32)) - 1) {
+ fprintf(stderr, _("%s: Size of device (0x%llx blocks) %s "
+ "too big to create\n\t"
+ "a filesystem using a blocksize of %d.\n"),
+ program_name, (unsigned long long) fs_blocks_count,
+ device_name, EXT2_BLOCK_SIZE(&fs_param));
+ exit(1);
+ }
+
+ ext2fs_blocks_count_set(&fs_param, fs_blocks_count);
+
+ if (ext2fs_has_feature_journal_dev(&fs_param)) {
+ int i;
+
+ for (i=0; fs_types[i]; i++) {
+ free(fs_types[i]);
+ fs_types[i] = 0;
+ }
+ fs_types[0] = strdup("journal");
+ fs_types[1] = 0;
+ }
+
+ if (verbose) {
+ fputs(_("fs_types for mke2fs.conf resolution: "), stdout);
+ print_str_list(fs_types);
+ }
+
+ if (r_opt == EXT2_GOOD_OLD_REV &&
+ (fs_param.s_feature_compat || fs_param.s_feature_incompat ||
+ fs_param.s_feature_ro_compat)) {
+ fprintf(stderr, "%s", _("Filesystem features not supported "
+ "with revision 0 filesystems\n"));
+ exit(1);
+ }
+
+ if (s_opt > 0) {
+ if (r_opt == EXT2_GOOD_OLD_REV) {
+ fprintf(stderr, "%s",
+ _("Sparse superblocks not supported "
+ "with revision 0 filesystems\n"));
+ exit(1);
+ }
+ ext2fs_set_feature_sparse_super(&fs_param);
+ } else if (s_opt == 0)
+ ext2fs_clear_feature_sparse_super(&fs_param);
+
+ if (journal_size != 0) {
+ if (r_opt == EXT2_GOOD_OLD_REV) {
+ fprintf(stderr, "%s", _("Journals not supported with "
+ "revision 0 filesystems\n"));
+ exit(1);
+ }
+ ext2fs_set_feature_journal(&fs_param);
+ }
+
+ /* Get reserved_ratio from profile if not specified on cmd line. */
+ if (reserved_ratio < 0.0) {
+ reserved_ratio = get_double_from_profile(
+ fs_types, "reserved_ratio", 5.0);
+ if (reserved_ratio > 50 || reserved_ratio < 0) {
+ com_err(program_name, 0,
+ _("invalid reserved blocks percent - %lf"),
+ reserved_ratio);
+ exit(1);
+ }
+ }
+
+ if (ext2fs_has_feature_journal_dev(&fs_param)) {
+ reserved_ratio = 0;
+ fs_param.s_feature_incompat = EXT3_FEATURE_INCOMPAT_JOURNAL_DEV;
+ fs_param.s_feature_compat = 0;
+ fs_param.s_feature_ro_compat &=
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM;
+ }
+
+ /* Check the user's mkfs options for 64bit */
+ if (ext2fs_has_feature_64bit(&fs_param) &&
+ !ext2fs_has_feature_extents(&fs_param)) {
+ printf("%s", _("Extents MUST be enabled for a 64-bit "
+ "filesystem. Pass -O extents to rectify.\n"));
+ exit(1);
+ }
+
+ /* Set first meta blockgroup via an environment variable */
+ /* (this is mostly for debugging purposes) */
+ if (ext2fs_has_feature_meta_bg(&fs_param) &&
+ (tmp = getenv("MKE2FS_FIRST_META_BG")))
+ fs_param.s_first_meta_bg = atoi(tmp);
+ if (ext2fs_has_feature_bigalloc(&fs_param)) {
+ if (!cluster_size)
+ cluster_size = get_int_from_profile(fs_types,
+ "cluster_size",
+ blocksize*16);
+ fs_param.s_log_cluster_size =
+ int_log2(cluster_size >> EXT2_MIN_CLUSTER_LOG_SIZE);
+ if (fs_param.s_log_cluster_size &&
+ fs_param.s_log_cluster_size < fs_param.s_log_block_size) {
+ com_err(program_name, 0, "%s",
+ _("The cluster size may not be "
+ "smaller than the block size.\n"));
+ exit(1);
+ }
+ } else if (cluster_size) {
+ com_err(program_name, 0, "%s",
+ _("specifying a cluster size requires the "
+ "bigalloc feature"));
+ exit(1);
+ } else
+ fs_param.s_log_cluster_size = fs_param.s_log_block_size;
+
+ if (inode_ratio == 0) {
+ inode_ratio = get_int_from_profile(fs_types, "inode_ratio",
+ 8192);
+ if (inode_ratio < blocksize)
+ inode_ratio = blocksize;
+ if (inode_ratio < EXT2_CLUSTER_SIZE(&fs_param))
+ inode_ratio = EXT2_CLUSTER_SIZE(&fs_param);
+ }
+
+#ifdef HAVE_BLKID_PROBE_GET_TOPOLOGY
+ retval = get_device_geometry(device_name, blocksize,
+ psector_size, &dev_param);
+ if (retval < 0) {
+ fprintf(stderr,
+ _("warning: Unable to get device geometry for %s\n"),
+ device_name);
+ } else {
+ /* setting stripe/stride to blocksize is pointless */
+ if (dev_param.min_io > (unsigned) blocksize)
+ fs_param.s_raid_stride = dev_param.min_io / blocksize;
+ if (dev_param.opt_io > (unsigned) blocksize) {
+ fs_param.s_raid_stripe_width =
+ dev_param.opt_io / blocksize;
+ }
+
+ if (dev_param.alignment_offset) {
+ printf(_("%s alignment is offset by %lu bytes.\n"),
+ device_name, dev_param.alignment_offset);
+ printf(_("This may result in very poor performance, "
+ "(re)-partitioning suggested.\n"));
+ }
+
+ if (dev_param.dax && blocksize != sys_page_size) {
+ fprintf(stderr,
+ _("%s is capable of DAX but current block size "
+ "%u is different from system page size %u so "
+ "filesystem will not support DAX.\n"),
+ device_name, blocksize, sys_page_size);
+ }
+ }
+#endif
+
+ num_backups = get_int_from_profile(fs_types, "num_backup_sb", 2);
+
+ blocksize = EXT2_BLOCK_SIZE(&fs_param);
+
+ /*
+ * Initialize s_desc_size so that the parse_extended_opts()
+ * can correctly handle "-E resize=NNN" if the 64-bit option
+ * is set.
+ */
+ if (ext2fs_has_feature_64bit(&fs_param))
+ fs_param.s_desc_size = EXT2_MIN_DESC_SIZE_64BIT;
+
+ /* This check should happen beyond the last assignment to blocksize */
+ if (blocksize > sys_page_size) {
+ if (!force) {
+ com_err(program_name, 0,
+ _("%d-byte blocks too big for system (max %d)"),
+ blocksize, sys_page_size);
+ proceed_question(proceed_delay);
+ }
+ fprintf(stderr, _("Warning: %d-byte blocks too big for system "
+ "(max %d), forced to continue\n"),
+ blocksize, sys_page_size);
+ }
+
+ /* Metadata checksumming wasn't totally stable before 3.18. */
+ if (is_before_linux_ver(3, 18, 0) &&
+ ext2fs_has_feature_metadata_csum(&fs_param))
+ fprintf(stderr, _("Suggestion: Use Linux kernel >= 3.18 for "
+ "improved stability of the metadata and journal "
+ "checksum features.\n"));
+
+ /*
+ * On newer kernels we do have lazy_itable_init support. So pick the
+ * right default in case ext4 module is not loaded.
+ */
+ if (is_before_linux_ver(2, 6, 37))
+ lazy_itable_init = 0;
+ else
+ lazy_itable_init = 1;
+
+ if (access("/sys/fs/ext4/features/lazy_itable_init", R_OK) == 0)
+ lazy_itable_init = 1;
+
+ lazy_itable_init = get_bool_from_profile(fs_types,
+ "lazy_itable_init",
+ lazy_itable_init);
+ discard = get_bool_from_profile(fs_types, "discard" , discard);
+ journal_flags |= get_bool_from_profile(fs_types,
+ "lazy_journal_init", 0) ?
+ EXT2_MKJOURNAL_LAZYINIT : 0;
+ journal_flags |= EXT2_MKJOURNAL_NO_MNT_CHECK;
+
+ if (!journal_location_string)
+ journal_location_string = get_string_from_profile(fs_types,
+ "journal_location", "");
+ if ((journal_location == ~0ULL) && journal_location_string &&
+ *journal_location_string)
+ journal_location = parse_num_blocks2(journal_location_string,
+ fs_param.s_log_block_size);
+ free(journal_location_string);
+
+ packed_meta_blocks = get_bool_from_profile(fs_types,
+ "packed_meta_blocks", 0);
+ if (packed_meta_blocks)
+ journal_location = 0;
+
+ if (ext2fs_has_feature_casefold(&fs_param)) {
+ char *ef, *en = get_string_from_profile(fs_types,
+ "encoding", "utf8");
+ int encoding = e2p_str2encoding(en);
+
+ if (encoding < 0) {
+ com_err(program_name, 0,
+ _("Unknown filename encoding from profile: %s"),
+ en);
+ exit(1);
+ }
+ free(en);
+ fs_param.s_encoding = encoding;
+ ef = get_string_from_profile(fs_types, "encoding_flags", NULL);
+ if (ef) {
+ if (e2p_str2encoding_flags(encoding, ef,
+ &fs_param.s_encoding_flags) < 0) {
+ com_err(program_name, 0,
+ _("Unknown encoding flags from profile: %s"), ef);
+ exit(1);
+ }
+ free(ef);
+ } else
+ fs_param.s_encoding_flags =
+ e2p_get_encoding_flags(encoding);
+ }
+
+ /* Get options from profile */
+ for (cpp = fs_types; *cpp; cpp++) {
+ tmp = NULL;
+ profile_get_string(profile, "fs_types", *cpp, "options", "", &tmp);
+ if (tmp && *tmp)
+ parse_extended_opts(&fs_param, tmp);
+ free(tmp);
+ }
+
+ if (extended_opts)
+ parse_extended_opts(&fs_param, extended_opts);
+
+ if (explicit_fssize == 0 && offset > 0) {
+ fs_blocks_count -= offset / EXT2_BLOCK_SIZE(&fs_param);
+ ext2fs_blocks_count_set(&fs_param, fs_blocks_count);
+ fprintf(stderr,
+ _("\nWarning: offset specified without an "
+ "explicit file system size.\n"
+ "Creating a file system with %llu blocks "
+ "but this might\n"
+ "not be what you want.\n\n"),
+ (unsigned long long) fs_blocks_count);
+ }
+
+ if (quotatype_bits & QUOTA_PRJ_BIT)
+ ext2fs_set_feature_project(&fs_param);
+
+ if (ext2fs_has_feature_project(&fs_param)) {
+ quotatype_bits |= QUOTA_PRJ_BIT;
+ if (inode_size == EXT2_GOOD_OLD_INODE_SIZE) {
+ com_err(program_name, 0,
+ _("%d byte inodes are too small for "
+ "project quota"),
+ inode_size);
+ exit(1);
+ }
+ if (inode_size == 0) {
+ inode_size = get_int_from_profile(fs_types,
+ "inode_size", 0);
+ if (inode_size <= EXT2_GOOD_OLD_INODE_SIZE*2)
+ inode_size = EXT2_GOOD_OLD_INODE_SIZE*2;
+ }
+ }
+
+ /* Don't allow user to set both metadata_csum and uninit_bg bits. */
+ if (ext2fs_has_feature_metadata_csum(&fs_param) &&
+ ext2fs_has_feature_gdt_csum(&fs_param))
+ ext2fs_clear_feature_gdt_csum(&fs_param);
+
+ /* Can't support bigalloc feature without extents feature */
+ if (ext2fs_has_feature_bigalloc(&fs_param) &&
+ !ext2fs_has_feature_extents(&fs_param)) {
+ com_err(program_name, 0, "%s",
+ _("Can't support bigalloc feature without "
+ "extents feature"));
+ exit(1);
+ }
+
+ if (ext2fs_has_feature_meta_bg(&fs_param) &&
+ ext2fs_has_feature_resize_inode(&fs_param)) {
+ fprintf(stderr, "%s", _("The resize_inode and meta_bg "
+ "features are not compatible.\n"
+ "They can not be both enabled "
+ "simultaneously.\n"));
+ exit(1);
+ }
+
+ if (!quiet && ext2fs_has_feature_bigalloc(&fs_param) &&
+ EXT2_CLUSTER_SIZE(&fs_param) > 16 * EXT2_BLOCK_SIZE(&fs_param))
+ fprintf(stderr, "%s", _("\nWarning: bigalloc file systems "
+ "with a cluster size greater than\n"
+ "16 times the block size is considered "
+ "experimental\n"));
+
+ /*
+ * Since sparse_super is the default, we would only have a problem
+ * here if it was explicitly disabled.
+ */
+ if (ext2fs_has_feature_resize_inode(&fs_param) &&
+ !ext2fs_has_feature_sparse_super(&fs_param)) {
+ com_err(program_name, 0, "%s",
+ _("reserved online resize blocks not supported "
+ "on non-sparse filesystem"));
+ exit(1);
+ }
+
+ if (fs_param.s_blocks_per_group) {
+ if (fs_param.s_blocks_per_group < 256 ||
+ fs_param.s_blocks_per_group > 8 * (unsigned) blocksize) {
+ com_err(program_name, 0, "%s",
+ _("blocks per group count out of range"));
+ exit(1);
+ }
+ }
+
+ /*
+ * If the bigalloc feature is enabled, then the -g option will
+ * specify the number of clusters per group.
+ */
+ if (ext2fs_has_feature_bigalloc(&fs_param)) {
+ fs_param.s_clusters_per_group = fs_param.s_blocks_per_group;
+ fs_param.s_blocks_per_group = 0;
+ }
+
+ if (inode_size == 0)
+ inode_size = get_int_from_profile(fs_types, "inode_size", 0);
+ if (!flex_bg_size && ext2fs_has_feature_flex_bg(&fs_param))
+ flex_bg_size = get_uint_from_profile(fs_types,
+ "flex_bg_size", 16);
+ if (flex_bg_size) {
+ if (!ext2fs_has_feature_flex_bg(&fs_param)) {
+ com_err(program_name, 0, "%s",
+ _("Flex_bg feature not enabled, so "
+ "flex_bg size may not be specified"));
+ exit(1);
+ }
+ fs_param.s_log_groups_per_flex = int_log2(flex_bg_size);
+ }
+
+ if (inode_size && fs_param.s_rev_level >= EXT2_DYNAMIC_REV) {
+ if (inode_size < EXT2_GOOD_OLD_INODE_SIZE ||
+ inode_size > EXT2_BLOCK_SIZE(&fs_param) ||
+ inode_size & (inode_size - 1)) {
+ com_err(program_name, 0,
+ _("invalid inode size %d (min %d/max %d)"),
+ inode_size, EXT2_GOOD_OLD_INODE_SIZE,
+ blocksize);
+ exit(1);
+ }
+ fs_param.s_inode_size = inode_size;
+ }
+
+ /*
+ * If inode size is 128 and inline data is enabled, we need
+ * to notify users that inline data will never be useful.
+ */
+ if (ext2fs_has_feature_inline_data(&fs_param) &&
+ fs_param.s_inode_size == EXT2_GOOD_OLD_INODE_SIZE) {
+ com_err(program_name, 0,
+ _("%d byte inodes are too small for inline data; "
+ "specify larger size"),
+ fs_param.s_inode_size);
+ exit(1);
+ }
+
+ /*
+ * Warn the user that filesystems with 128-byte inodes will
+ * not work properly beyond 2038. This can be suppressed via
+ * a boolean in the mke2fs.conf file, and we will disable this
+ * warning for file systems created for the GNU Hurd.
+ */
+ if (inode_size == EXT2_GOOD_OLD_INODE_SIZE &&
+ get_bool_from_profile(fs_types, "warn_y2038_dates", 1))
+ printf(
+_("128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"));
+
+ /* Make sure number of inodes specified will fit in 32 bits */
+ if (num_inodes == 0) {
+ unsigned long long n;
+ n = ext2fs_blocks_count(&fs_param) * blocksize / inode_ratio;
+ if (n > MAX_32_NUM) {
+ if (ext2fs_has_feature_64bit(&fs_param))
+ num_inodes = MAX_32_NUM;
+ else {
+ com_err(program_name, 0,
+ _("too many inodes (%llu), raise "
+ "inode ratio?"),
+ (unsigned long long) n);
+ exit(1);
+ }
+ }
+ } else if (num_inodes > MAX_32_NUM) {
+ com_err(program_name, 0,
+ _("too many inodes (%llu), specify < 2^32 inodes"),
+ (unsigned long long) num_inodes);
+ exit(1);
+ }
+ /*
+ * Calculate number of inodes based on the inode ratio
+ */
+ fs_param.s_inodes_count = num_inodes ? num_inodes :
+ (ext2fs_blocks_count(&fs_param) * blocksize) / inode_ratio;
+
+ if ((((unsigned long long)fs_param.s_inodes_count) *
+ (inode_size ? inode_size : EXT2_GOOD_OLD_INODE_SIZE)) >=
+ ((ext2fs_blocks_count(&fs_param)) *
+ EXT2_BLOCK_SIZE(&fs_param))) {
+ com_err(program_name, 0, _("inode_size (%u) * inodes_count "
+ "(%u) too big for a\n\t"
+ "filesystem with %llu blocks, "
+ "specify higher inode_ratio (-i)\n\t"
+ "or lower inode count (-N).\n"),
+ inode_size ? inode_size : EXT2_GOOD_OLD_INODE_SIZE,
+ fs_param.s_inodes_count,
+ (unsigned long long) ext2fs_blocks_count(&fs_param));
+ exit(1);
+ }
+
+ /*
+ * Calculate number of blocks to reserve
+ */
+ ext2fs_r_blocks_count_set(&fs_param, reserved_ratio *
+ ext2fs_blocks_count(&fs_param) / 100.0);
+
+ if (ext2fs_has_feature_sparse_super2(&fs_param)) {
+ if (num_backups >= 1)
+ fs_param.s_backup_bgs[0] = 1;
+ if (num_backups >= 2)
+ fs_param.s_backup_bgs[1] = ~0;
+ }
+
+ free(fs_type);
+ free(usage_types);
+
+ /* The isatty() test is so we don't break existing scripts */
+ flags = CREATE_FILE;
+ if (isatty(0) && isatty(1) && !offset)
+ flags |= CHECK_FS_EXIST;
+ if (!quiet)
+ flags |= VERBOSE_CREATE;
+ if (!explicit_fssize)
+ flags |= NO_SIZE;
+ if (!check_plausibility(device_name, flags, &is_device) && !force)
+ proceed_question(proceed_delay);
+}
+
+static int should_do_undo(const char *name)
+{
+ errcode_t retval;
+ io_channel channel;
+ __u16 s_magic;
+ struct ext2_super_block super;
+ io_manager manager = default_io_manager;
+ int csum_flag, force_undo;
+
+ csum_flag = ext2fs_has_feature_metadata_csum(&fs_param) ||
+ ext2fs_has_feature_gdt_csum(&fs_param);
+ force_undo = get_int_from_profile(fs_types, "force_undo", 0);
+ if (!force_undo && (!csum_flag || !lazy_itable_init))
+ return 0;
+
+ retval = manager->open(name, IO_FLAG_EXCLUSIVE, &channel);
+ if (retval) {
+ /*
+ * We don't handle error cases instead we
+ * declare that the file system doesn't exist
+ * and let the rest of mke2fs take care of
+ * error
+ */
+ retval = 0;
+ goto open_err_out;
+ }
+
+ io_channel_set_blksize(channel, SUPERBLOCK_OFFSET);
+ retval = io_channel_read_blk64(channel, 1, -SUPERBLOCK_SIZE, &super);
+ if (retval) {
+ retval = 0;
+ goto err_out;
+ }
+
+#if defined(WORDS_BIGENDIAN)
+ s_magic = ext2fs_swab16(super.s_magic);
+#else
+ s_magic = super.s_magic;
+#endif
+
+ if (s_magic == EXT2_SUPER_MAGIC)
+ retval = 1;
+
+err_out:
+ io_channel_close(channel);
+
+open_err_out:
+
+ return retval;
+}
+
+static int mke2fs_setup_tdb(const char *name, io_manager *io_ptr)
+{
+ errcode_t retval = ENOMEM;
+ char *tdb_dir = NULL, *tdb_file = NULL;
+ char *dev_name, *tmp_name;
+ int free_tdb_dir = 0;
+
+ /* (re)open a specific undo file */
+ if (undo_file && undo_file[0] != 0) {
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto err;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(undo_file);
+ if (retval)
+ goto err;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"), undo_file, name);
+ return retval;
+ }
+
+ /*
+ * Configuration via a conf file would be
+ * nice
+ */
+ tdb_dir = getenv("E2FSPROGS_UNDO_DIR");
+ if (!tdb_dir) {
+ profile_get_string(profile, "defaults",
+ "undo_dir", 0, "/var/lib/e2fsprogs",
+ &tdb_dir);
+ free_tdb_dir = 1;
+ }
+
+ if (!strcmp(tdb_dir, "none") || (tdb_dir[0] == 0) ||
+ access(tdb_dir, W_OK)) {
+ if (free_tdb_dir)
+ free(tdb_dir);
+ return 0;
+ }
+
+ tmp_name = strdup(name);
+ if (!tmp_name)
+ goto errout;
+ dev_name = basename(tmp_name);
+ tdb_file = malloc(strlen(tdb_dir) + 8 + strlen(dev_name) + 7 + 1);
+ if (!tdb_file) {
+ free(tmp_name);
+ goto errout;
+ }
+ sprintf(tdb_file, "%s/mke2fs-%s.e2undo", tdb_dir, dev_name);
+ free(tmp_name);
+
+ if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
+ retval = errno;
+ com_err(program_name, retval,
+ _("while trying to delete %s"), tdb_file);
+ goto errout;
+ }
+
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto errout;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(tdb_file);
+ if (retval)
+ goto errout;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"), tdb_file, name);
+
+ if (free_tdb_dir)
+ free(tdb_dir);
+ free(tdb_file);
+ return 0;
+
+errout:
+ if (free_tdb_dir)
+ free(tdb_dir);
+ free(tdb_file);
+err:
+ com_err(program_name, retval, "%s",
+ _("while trying to setup undo file\n"));
+ return retval;
+}
+
+static int mke2fs_discard_device(ext2_filsys fs)
+{
+ struct ext2fs_numeric_progress_struct progress;
+ blk64_t blocks = ext2fs_blocks_count(fs->super);
+ blk64_t count = DISCARD_STEP_MB;
+ blk64_t cur = 0;
+ int retval = 0;
+
+ /*
+ * Let's try if discard really works on the device, so
+ * we do not print numeric progress resulting in failure
+ * afterwards.
+ */
+ retval = io_channel_discard(fs->io, 0, 1);
+ if (retval)
+ return retval;
+
+ count *= (1024 * 1024);
+ count /= fs->blocksize;
+
+ ext2fs_numeric_progress_init(fs, &progress,
+ _("Discarding device blocks: "),
+ blocks);
+ while (cur < blocks) {
+ ext2fs_numeric_progress_update(fs, &progress, cur);
+
+ if (cur + count > blocks)
+ count = blocks - cur;
+
+ retval = io_channel_discard(fs->io, cur, count);
+ if (retval)
+ break;
+ cur += count;
+ }
+
+ if (retval) {
+ ext2fs_numeric_progress_close(fs, &progress,
+ _("failed - "));
+ if (!quiet)
+ printf("%s\n",error_message(retval));
+ } else
+ ext2fs_numeric_progress_close(fs, &progress,
+ _("done \n"));
+
+ return retval;
+}
+
+static void fix_cluster_bg_counts(ext2_filsys fs)
+{
+ blk64_t block, num_blocks, last_block, next;
+ blk64_t tot_free = 0;
+ errcode_t retval;
+ dgrp_t group = 0;
+ int grp_free = 0;
+
+ num_blocks = ext2fs_blocks_count(fs->super);
+ last_block = ext2fs_group_last_block2(fs, group);
+ block = fs->super->s_first_data_block;
+ while (block < num_blocks) {
+ retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map,
+ block, last_block, &next);
+ if (retval == 0)
+ block = next;
+ else {
+ block = last_block + 1;
+ goto next_bg;
+ }
+
+ retval = ext2fs_find_first_set_block_bitmap2(fs->block_map,
+ block, last_block, &next);
+ if (retval)
+ next = last_block + 1;
+ grp_free += EXT2FS_NUM_B2C(fs, next - block);
+ tot_free += next - block;
+ block = next;
+
+ if (block > last_block) {
+ next_bg:
+ ext2fs_bg_free_blocks_count_set(fs, group, grp_free);
+ ext2fs_group_desc_csum_set(fs, group);
+ grp_free = 0;
+ group++;
+ last_block = ext2fs_group_last_block2(fs, group);
+ }
+ }
+ ext2fs_free_blocks_count_set(fs->super, tot_free);
+}
+
+static int create_quota_inodes(ext2_filsys fs)
+{
+ quota_ctx_t qctx;
+ errcode_t retval;
+
+ retval = quota_init_context(&qctx, fs, quotatype_bits);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while initializing quota context"));
+ exit(1);
+ }
+ quota_compute_usage(qctx);
+ retval = quota_write_inode(qctx, quotatype_bits);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while writing quota inodes"));
+ exit(1);
+ }
+ quota_release_context(&qctx);
+
+ return 0;
+}
+
+static errcode_t set_error_behavior(ext2_filsys fs)
+{
+ char *arg = NULL;
+ short errors = fs->super->s_errors;
+
+ arg = get_string_from_profile(fs_types, "errors", NULL);
+ if (arg == NULL)
+ goto try_user;
+
+ if (strcmp(arg, "continue") == 0)
+ errors = EXT2_ERRORS_CONTINUE;
+ else if (strcmp(arg, "remount-ro") == 0)
+ errors = EXT2_ERRORS_RO;
+ else if (strcmp(arg, "panic") == 0)
+ errors = EXT2_ERRORS_PANIC;
+ else {
+ com_err(program_name, 0,
+ _("bad error behavior in profile - %s"),
+ arg);
+ free(arg);
+ return EXT2_ET_INVALID_ARGUMENT;
+ }
+ free(arg);
+
+try_user:
+ if (errors_behavior)
+ errors = errors_behavior;
+
+ fs->super->s_errors = errors;
+ return 0;
+}
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0;
+ ext2_filsys fs;
+ badblocks_list bb_list = 0;
+ badblocks_iterate bb_iter;
+ blk_t blk;
+ struct ext2fs_journal_params jparams = {0};
+ unsigned int i, checkinterval;
+ int max_mnt_count;
+ int val, hash_alg;
+ int flags;
+ int old_bitmaps;
+ io_manager io_ptr;
+ char opt_string[40];
+ char *hash_alg_str;
+ int itable_zeroed = 0;
+ blk64_t overhead;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ PRS(argc, argv);
+
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = default_io_manager;
+ } else
+#endif
+ io_ptr = default_io_manager;
+
+ if (undo_file != NULL || should_do_undo(device_name)) {
+ retval = mke2fs_setup_tdb(device_name, &io_ptr);
+ if (retval)
+ exit(1);
+ }
+
+ /*
+ * Initialize the superblock....
+ */
+ flags = EXT2_FLAG_EXCLUSIVE;
+ if (direct_io)
+ flags |= EXT2_FLAG_DIRECT_IO;
+ profile_get_boolean(profile, "options", "old_bitmaps", 0, 0,
+ &old_bitmaps);
+ if (!old_bitmaps)
+ flags |= EXT2_FLAG_64BITS;
+ /*
+ * By default, we print how many inode tables or block groups
+ * or whatever we've written so far. The quiet flag disables
+ * this, along with a lot of other output.
+ */
+ if (!quiet)
+ flags |= EXT2_FLAG_PRINT_PROGRESS;
+ if (android_sparse_file) {
+ char *android_sparse_params = malloc(strlen(device_name) + 48);
+
+ if (!android_sparse_params) {
+ com_err(program_name, ENOMEM, "%s",
+ _("in malloc for android_sparse_params"));
+ exit(1);
+ }
+ sprintf(android_sparse_params, "(%s):%u:%u",
+ device_name, fs_param.s_blocks_count,
+ 1024 << fs_param.s_log_block_size);
+ retval = ext2fs_initialize(android_sparse_params, flags,
+ &fs_param, sparse_io_manager, &fs);
+ free(android_sparse_params);
+ } else
+ retval = ext2fs_initialize(device_name, flags, &fs_param,
+ io_ptr, &fs);
+ if (retval) {
+ com_err(device_name, retval, "%s",
+ _("while setting up superblock"));
+ exit(1);
+ }
+ fs->progress_ops = &ext2fs_numeric_progress_ops;
+
+ /* Set the error behavior */
+ retval = set_error_behavior(fs);
+ if (retval)
+ usage();
+
+ /* Check the user's mkfs options for metadata checksumming */
+ if (!quiet &&
+ !ext2fs_has_feature_journal_dev(fs->super) &&
+ ext2fs_has_feature_metadata_csum(fs->super)) {
+ if (!ext2fs_has_feature_extents(fs->super))
+ printf("%s",
+ _("Extents are not enabled. The file extent "
+ "tree can be checksummed, whereas block maps "
+ "cannot. Not enabling extents reduces the "
+ "coverage of metadata checksumming. "
+ "Pass -O extents to rectify.\n"));
+ if (!ext2fs_has_feature_64bit(fs->super))
+ printf("%s",
+ _("64-bit filesystem support is not enabled. "
+ "The larger fields afforded by this feature "
+ "enable full-strength checksumming. "
+ "Pass -O 64bit to rectify.\n"));
+ }
+
+ if (ext2fs_has_feature_csum_seed(fs->super) &&
+ !ext2fs_has_feature_metadata_csum(fs->super)) {
+ printf("%s", _("The metadata_csum_seed feature "
+ "requires the metadata_csum feature.\n"));
+ exit(1);
+ }
+
+ /* Calculate journal blocks */
+ if (!journal_device && ((journal_size) ||
+ ext2fs_has_feature_journal(&fs_param)))
+ figure_journal_size(&jparams, journal_size, journal_fc_size, fs);
+
+ sprintf(opt_string, "tdb_data_size=%d", fs->blocksize <= 4096 ?
+ 32768 : fs->blocksize * 8);
+ io_channel_set_options(fs->io, opt_string);
+ if (offset) {
+ sprintf(opt_string, "offset=%llu", (unsigned long long) offset);
+ io_channel_set_options(fs->io, opt_string);
+ }
+
+ if (assume_storage_prezeroed) {
+ if (verbose)
+ printf("%s",
+ _("Assuming the storage device is prezeroed "
+ "- skipping inode table and journal wipe\n"));
+
+ lazy_itable_init = 1;
+ itable_zeroed = 1;
+ zero_hugefile = 0;
+ journal_flags |= EXT2_MKJOURNAL_LAZYINIT;
+ }
+
+ /* Can't undo discard ... */
+ if (!noaction && discard && dev_size && (io_ptr != undo_io_manager)) {
+ retval = mke2fs_discard_device(fs);
+ if (!retval && io_channel_discard_zeroes_data(fs->io)) {
+ if (verbose)
+ printf("%s",
+ _("Discard succeeded and will return "
+ "0s - skipping inode table wipe\n"));
+ lazy_itable_init = 1;
+ itable_zeroed = 1;
+ zero_hugefile = 0;
+ }
+ }
+
+ if (fs_param.s_flags & EXT2_FLAGS_TEST_FILESYS)
+ fs->super->s_flags |= EXT2_FLAGS_TEST_FILESYS;
+
+ if (ext2fs_has_feature_flex_bg(&fs_param) ||
+ ext2fs_has_feature_huge_file(&fs_param) ||
+ ext2fs_has_feature_gdt_csum(&fs_param) ||
+ ext2fs_has_feature_dir_nlink(&fs_param) ||
+ ext2fs_has_feature_metadata_csum(&fs_param) ||
+ ext2fs_has_feature_extra_isize(&fs_param))
+ fs->super->s_kbytes_written = 1;
+
+ /*
+ * Wipe out the old on-disk superblock
+ */
+ if (!noaction)
+ zap_sector(fs, 2, 6);
+
+ /*
+ * Parse or generate a UUID for the filesystem
+ */
+ if (fs_uuid) {
+ if ((strcasecmp(fs_uuid, "null") == 0) ||
+ (strcasecmp(fs_uuid, "clear") == 0)) {
+ uuid_clear(fs->super->s_uuid);
+ } else if (strcasecmp(fs_uuid, "time") == 0) {
+ uuid_generate_time(fs->super->s_uuid);
+ } else if (strcasecmp(fs_uuid, "random") == 0) {
+ uuid_generate(fs->super->s_uuid);
+ } else if (uuid_parse(fs_uuid, fs->super->s_uuid) != 0) {
+ com_err(device_name, 0, "could not parse UUID: %s\n",
+ fs_uuid);
+ exit(1);
+ }
+ } else
+ uuid_generate(fs->super->s_uuid);
+
+ if (ext2fs_has_feature_csum_seed(fs->super))
+ fs->super->s_checksum_seed = ext2fs_crc32c_le(~0,
+ fs->super->s_uuid, sizeof(fs->super->s_uuid));
+
+ ext2fs_init_csum_seed(fs);
+
+ /*
+ * Initialize the directory index variables
+ */
+ hash_alg_str = get_string_from_profile(fs_types, "hash_alg",
+ "half_md4");
+ hash_alg = e2p_string2hash(hash_alg_str);
+ free(hash_alg_str);
+ fs->super->s_def_hash_version = (hash_alg >= 0) ? hash_alg :
+ EXT2_HASH_HALF_MD4;
+
+ if (memcmp(fs_param.s_hash_seed, zero_buf,
+ sizeof(fs_param.s_hash_seed)) != 0) {
+ memcpy(fs->super->s_hash_seed, fs_param.s_hash_seed,
+ sizeof(fs->super->s_hash_seed));
+ } else
+ uuid_generate((unsigned char *) fs->super->s_hash_seed);
+
+ /*
+ * Periodic checks can be enabled/disabled via config file.
+ * Note we override the kernel include file's idea of what the default
+ * check interval (never) should be. It's a good idea to check at
+ * least *occasionally*, specially since servers will never rarely get
+ * to reboot, since Linux is so robust these days. :-)
+ *
+ * 180 days (six months) seems like a good value.
+ */
+#ifdef EXT2_DFL_CHECKINTERVAL
+#undef EXT2_DFL_CHECKINTERVAL
+#endif
+#define EXT2_DFL_CHECKINTERVAL (86400L * 180L)
+
+ if (get_bool_from_profile(fs_types, "enable_periodic_fsck", 0)) {
+ fs->super->s_checkinterval = EXT2_DFL_CHECKINTERVAL;
+ fs->super->s_max_mnt_count = EXT2_DFL_MAX_MNT_COUNT;
+ /*
+ * Add "jitter" to the superblock's check interval so that we
+ * don't check all the filesystems at the same time. We use a
+ * kludgy hack of using the UUID to derive a random jitter value
+ */
+ for (i = 0, val = 0 ; i < sizeof(fs->super->s_uuid); i++)
+ val += fs->super->s_uuid[i];
+ fs->super->s_max_mnt_count += val % EXT2_DFL_MAX_MNT_COUNT;
+ } else
+ fs->super->s_max_mnt_count = -1;
+
+ /*
+ * Override the creator OS, if applicable
+ */
+ if (creator_os && !set_os(fs->super, creator_os)) {
+ com_err (program_name, 0, _("unknown os - %s"), creator_os);
+ exit(1);
+ }
+
+ /*
+ * For the Hurd, we will turn off filetype since it doesn't
+ * support it.
+ */
+ if (fs->super->s_creator_os == EXT2_OS_HURD)
+ ext2fs_clear_feature_filetype(fs->super);
+
+ /*
+ * Set the volume label...
+ */
+ if (volume_label) {
+ memset(fs->super->s_volume_name, 0,
+ sizeof(fs->super->s_volume_name));
+ strncpy((char *) fs->super->s_volume_name, volume_label,
+ sizeof(fs->super->s_volume_name));
+ }
+
+ /*
+ * Set the last mount directory
+ */
+ if (mount_dir) {
+ memset(fs->super->s_last_mounted, 0,
+ sizeof(fs->super->s_last_mounted));
+ strncpy((char *) fs->super->s_last_mounted, mount_dir,
+ sizeof(fs->super->s_last_mounted));
+ }
+
+ /* Set current default encryption algorithms for data and
+ * filename encryption */
+ if (ext2fs_has_feature_encrypt(fs->super)) {
+ fs->super->s_encrypt_algos[0] =
+ EXT4_ENCRYPTION_MODE_AES_256_XTS;
+ fs->super->s_encrypt_algos[1] =
+ EXT4_ENCRYPTION_MODE_AES_256_CTS;
+ }
+
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ fs->super->s_checksum_type = EXT2_CRC32C_CHKSUM;
+
+ if (!quiet || noaction)
+ show_stats(fs);
+
+ if (noaction)
+ exit(0);
+
+ if (ext2fs_has_feature_journal_dev(fs->super)) {
+ create_journal_dev(fs);
+ printf("\n");
+ exit(ext2fs_close_free(&fs) ? 1 : 0);
+ }
+
+ if (bad_blocks_filename)
+ read_bb_file(fs, &bb_list, bad_blocks_filename);
+ if (cflag)
+ test_disk(fs, &bb_list);
+ handle_bad_blocks(fs, bb_list);
+
+ fs->stride = fs_stride = fs->super->s_raid_stride;
+ if (!quiet)
+ printf("%s", _("Allocating group tables: "));
+ if (ext2fs_has_feature_flex_bg(fs->super) &&
+ packed_meta_blocks)
+ retval = packed_allocate_tables(fs);
+ else
+ retval = ext2fs_allocate_tables(fs);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while trying to allocate filesystem tables"));
+ exit(1);
+ }
+ if (!quiet)
+ printf("%s", _("done \n"));
+
+ /*
+ * Unmark bad blocks to calculate overhead, because metadata
+ * blocks and bad blocks can land on the same allocation cluster.
+ */
+ if (bb_list) {
+ retval = ext2fs_badblocks_list_iterate_begin(bb_list,
+ &bb_iter);
+ if (retval) {
+ com_err("ext2fs_badblocks_list_iterate_begin", retval,
+ "%s", _("while unmarking bad blocks"));
+ exit(1);
+ }
+ while (ext2fs_badblocks_list_iterate(bb_iter, &blk))
+ ext2fs_unmark_block_bitmap2(fs->block_map, blk);
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+ }
+
+ retval = ext2fs_convert_subcluster_bitmap(fs, &fs->block_map);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("\n\twhile converting subcluster bitmap"));
+ exit(1);
+ }
+
+ retval = ext2fs_count_used_clusters(fs, fs->super->s_first_data_block,
+ ext2fs_blocks_count(fs->super) - 1,
+ &overhead);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while calculating overhead"));
+ exit(1);
+ }
+
+ if (bb_list) {
+ retval = ext2fs_badblocks_list_iterate_begin(bb_list,
+ &bb_iter);
+ if (retval) {
+ com_err("ext2fs_badblocks_list_iterate_begin", retval,
+ "%s", _("while marking bad blocks as used"));
+ exit(1);
+ }
+ while (ext2fs_badblocks_list_iterate(bb_iter, &blk))
+ ext2fs_mark_block_bitmap2(fs->block_map, blk);
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+ }
+
+ if (super_only) {
+ check_plausibility(device_name, CHECK_FS_EXIST, NULL);
+ printf(_("%s may be further corrupted by superblock rewrite\n"),
+ device_name);
+ if (!force)
+ proceed_question(proceed_delay);
+ fs->super->s_state |= EXT2_ERROR_FS;
+ fs->flags &= ~(EXT2_FLAG_IB_DIRTY|EXT2_FLAG_BB_DIRTY);
+ /*
+ * The command "mke2fs -S" is used to recover
+ * corrupted file systems, so do not mark any of the
+ * inodes as unused; we want e2fsck to consider all
+ * inodes as potentially containing recoverable data.
+ */
+ if (ext2fs_has_group_desc_csum(fs)) {
+ for (i = 0; i < fs->group_desc_count; i++)
+ ext2fs_bg_itable_unused_set(fs, i, 0);
+ }
+ } else {
+ /* rsv must be a power of two (64kB is MD RAID sb alignment) */
+ blk64_t rsv = 65536 / fs->blocksize;
+ blk64_t blocks = ext2fs_blocks_count(fs->super);
+ blk64_t start;
+ blk64_t ret_blk;
+
+#ifdef ZAP_BOOTBLOCK
+ zap_sector(fs, 0, 2);
+#endif
+
+ /*
+ * Wipe out any old MD RAID (or other) metadata at the end
+ * of the device. This will also verify that the device is
+ * as large as we think. Be careful with very small devices.
+ */
+ start = (blocks & ~(rsv - 1));
+ if (start > rsv)
+ start -= rsv;
+ if (start > 0)
+ retval = ext2fs_zero_blocks2(fs, start, blocks - start,
+ &ret_blk, NULL);
+
+ if (retval) {
+ com_err(program_name, retval,
+ _("while zeroing block %llu at end of filesystem"),
+ (unsigned long long) ret_blk);
+ }
+ write_inode_tables(fs, lazy_itable_init, itable_zeroed);
+ create_root_dir(fs);
+ create_lost_and_found(fs);
+ reserve_inodes(fs);
+ create_bad_block_inode(fs, bb_list);
+ if (ext2fs_has_feature_resize_inode(fs->super)) {
+ retval = ext2fs_create_resize_inode(fs);
+ if (retval) {
+ com_err("ext2fs_create_resize_inode", retval,
+ "%s",
+ _("while reserving blocks for online resize"));
+ exit(1);
+ }
+ }
+ }
+
+ if (journal_device) {
+ ext2_filsys jfs;
+
+ if (!check_plausibility(journal_device, CHECK_BLOCK_DEV,
+ NULL) && !force)
+ proceed_question(proceed_delay);
+ check_mount(journal_device, force, _("journal"));
+
+ retval = ext2fs_open(journal_device, EXT2_FLAG_RW|
+ EXT2_FLAG_JOURNAL_DEV_OK, 0,
+ fs->blocksize, default_io_manager, &jfs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while trying to open journal device %s\n"),
+ journal_device);
+ exit(1);
+ }
+ if (!quiet) {
+ printf(_("Adding journal to device %s: "),
+ journal_device);
+ fflush(stdout);
+ }
+ retval = ext2fs_add_journal_device(fs, jfs);
+ if(retval) {
+ com_err (program_name, retval,
+ _("\n\twhile trying to add journal to device %s"),
+ journal_device);
+ exit(1);
+ }
+ if (!quiet)
+ printf("%s", _("done\n"));
+ ext2fs_close_free(&jfs);
+ free(journal_device);
+ } else if ((journal_size) ||
+ ext2fs_has_feature_journal(&fs_param)) {
+ overhead += EXT2FS_NUM_B2C(fs, jparams.num_journal_blocks + jparams.num_fc_blocks);
+ if (super_only) {
+ printf("%s", _("Skipping journal creation in super-only mode\n"));
+ fs->super->s_journal_inum = EXT2_JOURNAL_INO;
+ goto no_journal;
+ }
+
+ if (!jparams.num_journal_blocks) {
+ ext2fs_clear_feature_journal(fs->super);
+ ext2fs_clear_feature_orphan_file(fs->super);
+ ext2fs_clear_feature_journal(&fs_param);
+ ext2fs_clear_feature_orphan_file(&fs_param);
+ goto no_journal;
+ }
+ if (!quiet) {
+ printf(_("Creating journal (%u blocks): "),
+ jparams.num_journal_blocks + jparams.num_fc_blocks);
+ fflush(stdout);
+ }
+ retval = ext2fs_add_journal_inode3(fs, &jparams,
+ journal_location,
+ journal_flags);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("\n\twhile trying to create journal"));
+ exit(1);
+ }
+ if (!quiet)
+ printf("%s", _("done\n"));
+ }
+no_journal:
+ if (!super_only &&
+ ext2fs_has_feature_mmp(fs->super)) {
+ retval = ext2fs_mmp_init(fs);
+ if (retval) {
+ fprintf(stderr, "%s",
+ _("\nError while enabling multiple "
+ "mount protection feature."));
+ exit(1);
+ }
+ if (!quiet)
+ printf(_("Multiple mount protection is enabled "
+ "with update interval %d seconds.\n"),
+ fs->super->s_mmp_update_interval);
+ }
+
+ overhead += fs->super->s_first_data_block;
+ if (!super_only)
+ fs->super->s_overhead_clusters = overhead;
+
+ if (ext2fs_has_feature_bigalloc(&fs_param))
+ fix_cluster_bg_counts(fs);
+ if (ext2fs_has_feature_quota(&fs_param))
+ create_quota_inodes(fs);
+ if (ext2fs_has_feature_orphan_file(&fs_param)) {
+ if (!ext2fs_has_feature_journal(&fs_param)) {
+ com_err(program_name, 0, _("cannot set orphan_file "
+ "feature without a journal."));
+ exit(1);
+ }
+ if (!orphan_file_blocks) {
+ orphan_file_blocks =
+ ext2fs_default_orphan_file_blocks(fs);
+ }
+ retval = ext2fs_create_orphan_file(fs, orphan_file_blocks);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while creating orphan file"));
+ exit(1);
+ }
+ }
+
+ retval = mk_hugefiles(fs, device_name);
+ if (retval)
+ com_err(program_name, retval, "while creating huge files");
+ /* Copy files from the specified directory */
+ if (src_root_dir) {
+ if (!quiet)
+ printf("%s", _("Copying files into the device: "));
+
+ retval = populate_fs(fs, EXT2_ROOT_INO, src_root_dir,
+ EXT2_ROOT_INO);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while populating file system"));
+ exit(1);
+ } else if (!quiet)
+ printf("%s", _("done\n"));
+ }
+
+ if (!quiet)
+ printf("%s", _("Writing superblocks and "
+ "filesystem accounting information: "));
+ checkinterval = fs->super->s_checkinterval;
+ max_mnt_count = fs->super->s_max_mnt_count;
+ retval = ext2fs_close_free(&fs);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while writing out and closing file system"));
+ retval = 1;
+ } else if (!quiet) {
+ printf("%s", _("done\n\n"));
+ if (!getenv("MKE2FS_SKIP_CHECK_MSG"))
+ print_check_message(max_mnt_count, checkinterval);
+ }
+
+ remove_error_table(&et_ext2_error_table);
+ remove_error_table(&et_prof_error_table);
+ profile_release(profile);
+ for (i=0; fs_types[i]; i++)
+ free(fs_types[i]);
+ free(fs_types);
+ return retval;
+}
diff --git a/misc/mke2fs.conf.5.in b/misc/mke2fs.conf.5.in
new file mode 100644
index 0000000..96dbfcb
--- /dev/null
+++ b/misc/mke2fs.conf.5.in
@@ -0,0 +1,566 @@
+.\" -*- nroff -*-
+.\" Copyright 2006 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH mke2fs.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+mke2fs.conf \- Configuration file for mke2fs
+.SH DESCRIPTION
+.I mke2fs.conf
+is the configuration file for
+.BR mke2fs (8).
+It controls the default parameters used by
+.BR mke2fs (8)
+when it is creating ext2, ext3, or ext4 file systems.
+.PP
+The
+.I mke2fs.conf
+file uses an INI-style format. Stanzas, or top-level sections, are
+delimited by square braces: [ ]. Within each section, each line
+defines a relation, which assigns tags to values, or to a subsection,
+which contains further relations or subsections.
+.\" Tags can be assigned multiple values
+An example of the INI-style format used by this configuration file
+follows below:
+.P
+ [section1]
+.br
+ tag1 = value_a
+.br
+ tag1 = value_b
+.br
+ tag2 = value_c
+.P
+ [section 2]
+.br
+ tag3 = {
+.br
+ subtag1 = subtag_value_a
+.br
+ subtag1 = subtag_value_b
+.br
+ subtag2 = subtag_value_c
+.br
+ }
+.br
+ tag1 = value_d
+.br
+ tag2 = value_e
+.br
+ }
+.P
+Comments are delimited by a semicolon (';') or a hash ('#') character
+at the beginning of the comment, and are terminated by the end of
+line character.
+.P
+Tags and values must be quoted using double quotes if they contain
+spaces. Within a quoted string, the standard backslash interpretations
+apply: "\en" (for the newline character),
+"\et" (for the tab character), "\eb" (for the backspace character),
+and "\e\e" (for the backslash character).
+.P
+Some relations expect a boolean value. The parser is quite liberal on
+recognizing ``yes'', '`y'', ``true'', ``t'', ``1'', ``on'', etc. as a
+boolean true value, and ``no'', ``n'', ``false'', ``nil'', ``0'',
+``off'' as a boolean false value.
+.P
+The following stanzas are used in the
+.I mke2fs.conf
+file. They will be described in more detail in future sections of this
+document.
+.TP
+.I [options]
+Contains relations which influence how mke2fs behaves.
+.TP
+.I [defaults]
+Contains relations which define the default parameters
+used by
+.BR mke2fs (8).
+In general, these defaults may be overridden by a definition in the
+.B fs_types
+stanza, or by a command-line option provided by the user.
+.TP
+.I [fs_types]
+Contains relations which define defaults that should be used for specific
+file system and usage types. The file system type and usage type can be
+specified explicitly using
+the
+.BR \-t and \-T
+options to
+.BR mke2fs (8),
+respectively.
+.TP
+.I [devices]
+Contains relations which define defaults for specific devices.
+.SH THE [options] STANZA
+The following relations are defined in the
+.I [options]
+stanza.
+.TP
+.I proceed_delay
+If this relation is set to a positive integer, then mke2fs will
+wait
+.I proceed_delay
+seconds after asking the user for permission to proceed and
+then continue, even if the
+user has not answered the question. Defaults to 0, which means to wait
+until the user answers the question one way or another.
+.TP
+.I sync_kludge
+If this relation is set to a positive integer, then while writing the
+inode table, mke2fs will request the operating system flush out pending
+writes to initialize the inode table every
+.I sync_kludge
+block groups. This is needed to work around buggy kernels that don't
+handle writeback throttling correctly.
+.SH THE [defaults] STANZA
+The following relations are defined in the
+.I [defaults]
+stanza.
+.TP
+.I creator_os
+This relation specifies the "creator operating system" for the
+file system unless it is overridden on the command line.
+The default value is the OS for which the
+.B mke2fs
+executable was compiled.
+.TP
+.I fs_type
+This relation specifies the default file system type if the user does not
+specify it via the
+.B \-t
+option, or if
+.B mke2fs
+is not started using a program name of the form
+.BI mkfs. fs-type\fR.
+If both the user and the
+.B mke2fs.conf
+file do not specify a default file system type, mke2fs will use a
+default file system type of
+.I ext3
+if a journal was requested via a command-line option, or
+.I ext2
+if not.
+.TP
+.I undo_dir
+This relation specifies the directory where the undo file should be
+stored. It can be overridden via the
+.B E2FSPROGS_UNDO_DIR
+environment variable. If the directory location is set to the value
+.IR none ,
+.B mke2fs
+will not create an undo file.
+.PP
+In addition, any tags that can be specified in a per-file system tags
+subsection as defined below (e.g.,
+.IR blocksize ,
+.IR hash_alg ,
+.IR inode_ratio ,
+.IR inode_size ,
+.IR reserved_ratio ,
+etc.) can also be specified in the
+.I defaults
+stanza to specify the default value to be used if the user does not
+specify one on the command line, and the file system-type
+specific section of the configuration file does not specify a default value.
+.SH THE [fs_types] STANZA
+Each tag in the
+.I [fs_types]
+stanza names a file system type or usage type which can be specified via the
+.B \-t
+or
+.B \-T
+options to
+.BR mke2fs (8),
+respectively.
+.P
+The
+.B mke2fs
+program constructs a list of fs_types by concatenating the file system
+type (i.e., ext2, ext3, etc.) with the usage type list. For most
+configuration options,
+.B mke2fs
+will look for a subsection in the
+.I [fs_types]
+stanza corresponding with each entry in the constructed list, with later
+entries overriding earlier file system or usage types.
+For
+example, consider the following
+.B mke2fs.conf
+fragment:
+.P
+[defaults]
+.br
+ base_features = sparse_super,filetype,resize_inode,dir_index
+.br
+ blocksize = 4096
+.br
+ inode_size = 256
+.br
+ inode_ratio = 16384
+.br
+
+.br
+[fs_types]
+.br
+ ext3 = {
+.br
+ features = has_journal
+.br
+ }
+.br
+ ext4 = {
+.br
+ features = extents,flex_bg
+.br
+ inode_size = 256
+.br
+ }
+.br
+ small = {
+.br
+ blocksize = 1024
+.br
+ inode_ratio = 4096
+.br
+ }
+.br
+ floppy = {
+.br
+ features = ^resize_inode
+.br
+ blocksize = 1024
+.br
+ inode_size = 128
+.br
+ }
+.P
+If mke2fs started with a program name of
+.BR mke2fs.ext4 ,
+then the file system type of ext4 will be used. If the file system is
+smaller than 3 megabytes, and no usage type is specified, then
+.B mke2fs
+will use a default
+usage type of
+.IR floppy .
+This results in an fs_types list of "ext4, floppy". Both the ext4
+subsection and the floppy subsection define an
+.I inode_size
+relation, but since the later entries in the fs_types list supersede
+earlier ones, the configuration parameter for fs_types.floppy.inode_size
+will be used, so the file system will have an inode size of 128.
+.P
+The exception to this resolution is the
+.I features
+tag, which specifies a set of changes to the features used by the
+file system, and which is cumulative. So in the above example, first
+the configuration relation defaults.base_features would enable an
+initial feature set with the sparse_super, filetype, resize_inode, and
+dir_index features enabled. Then configuration relation
+fs_types.ext4.features would enable the extents and flex_bg
+features, and finally the configuration relation
+fs_types.floppy.features would remove
+the resize_inode feature, resulting in a file system feature set
+consisting of the sparse_super, filetype, dir_index,
+extents_and flex_bg features.
+.P
+For each file system type, the following tags may be used in that
+fs_type's subsection. These tags may also be used in the
+.I default
+section:
+.TP
+.I base_features
+This relation specifies the features which are initially enabled for this
+file system type. Only one
+.I base_features
+will be used, so if there are multiple entries in the fs_types list
+whose subsections define the
+.I base_features
+relation, only the last will be used by
+.BR mke2fs (8).
+.TP
+.I enable_periodic_fsck
+This boolean relation specifies whether periodic file system checks should be
+enforced at boot time. If set to true, checks will be forced every
+180 days, or after a random number of mounts. These values may
+be changed later via the
+.B -i
+and
+.B -c
+command-line options to
+.BR tune2fs (8).
+.TP
+.I errors
+Change the behavior of the kernel code when errors are detected.
+In all cases, a file system error will cause
+.BR e2fsck (8)
+to check the file system on the next boot.
+.I errors
+can be one of the following:
+.RS 1.2i
+.TP 1.2i
+.B continue
+Continue normal execution.
+.TP
+.B remount-ro
+Remount file system read-only.
+.TP
+.B panic
+Cause a kernel panic.
+.RE
+.TP
+.I features
+This relation specifies a comma-separated list of features edit
+requests which modify the feature set
+used by the newly constructed file system. The syntax is the same as the
+.B -O
+command-line option to
+.BR mke2fs (8);
+that is, a feature can be prefixed by a caret ('^') symbol to disable
+a named feature. Each
+.I feature
+relation specified in the fs_types list will be applied in the order
+found in the fs_types list.
+.TP
+.I force_undo
+This boolean relation, if set to a value of true, forces
+.B mke2fs
+to always try to create an undo file, even if the undo file might be
+huge and it might extend the time to create the file system image
+because the inode table isn't being initialized lazily.
+.TP
+.I default_features
+This relation specifies set of features which should be enabled or
+disabled after applying the features listed in the
+.I base_features
+and
+.I features
+relations. It may be overridden by the
+.B -O
+command-line option to
+.BR mke2fs (8).
+.TP
+.I auto_64-bit_support
+This relation is a boolean which specifies whether
+.BR mke2fs (8)
+should automatically add the 64bit feature if the number of blocks for
+the file system requires this feature to be enabled. The resize_inode
+feature is also automatically disabled since it doesn't support 64-bit
+block numbers.
+.TP
+.I default_mntopts
+This relation specifies the set of mount options which should be enabled
+by default. These may be changed at a later time with the
+.B -o
+command-line option to
+.BR tune2fs (8).
+.TP
+.I blocksize
+This relation specifies the default blocksize if the user does not
+specify a blocksize on the command line.
+.TP
+.I lazy_itable_init
+This boolean relation specifies whether the inode table should
+be lazily initialized. It only has meaning if the uninit_bg feature is
+enabled. If lazy_itable_init is true and the uninit_bg feature is
+enabled, the inode table will
+not be fully initialized by
+.BR mke2fs (8).
+This speeds up file system
+initialization noticeably, but it requires the kernel to finish
+initializing the file system in the background when the file system is
+first mounted.
+.TP
+.I lazy_journal_init
+This boolean relation specifies whether the journal inode should be
+lazily initialized. It only has meaning if the has_journal feature is
+enabled. If lazy_journal_init is true, the journal inode will not be
+fully zeroed out by
+.BR mke2fs .
+This speeds up file system initialization noticeably, but carries some
+small risk if the system crashes before the journal has been overwritten
+entirely one time.
+.TP
+.I journal_location
+This relation specifies the location of the journal.
+.TP
+.I num_backup_sb
+This relation indicates whether file systems with the
+.B sparse_super2
+feature enabled should be created with 0, 1, or 2 backup superblocks.
+.TP
+.I packed_meta_blocks
+This boolean relation specifies whether the allocation bitmaps, inode
+table, and journal should be located at the beginning of the file system.
+.TP
+.I inode_ratio
+This relation specifies the default inode ratio if the user does not
+specify one on the command line.
+.TP
+.I inode_size
+This relation specifies the default inode size if the user does not
+specify one on the command line.
+.TP
+.I reserved_ratio
+This relation specifies the default percentage of file system blocks
+reserved for the super-user, if the user does not specify one on the command
+line.
+.TP
+.I hash_alg
+This relation specifies the default hash algorithm used for the
+new file systems with hashed b-tree directories. Valid algorithms
+accepted are:
+.IR legacy ,
+.IR half_md4 ,
+and
+.IR tea .
+.TP
+.I flex_bg_size
+This relation specifies the number of block groups that will be packed
+together to create one large virtual block group on an ext4 file system.
+This improves meta-data locality and performance on meta-data heavy
+workloads. The number of groups must be a power of 2 and may only be
+specified if the flex_bg file system feature is enabled.
+.TP
+.I options
+This relation specifies additional extended options which should be
+treated by
+.BR mke2fs (8)
+as if they were prepended to the argument of the
+.B -E
+option. This can be used to configure the default extended options used
+by
+.BR mke2fs (8)
+on a per-file system type basis.
+.TP
+.I discard
+This boolean relation specifies whether the
+.BR mke2fs (8)
+should attempt to discard device prior to file system creation.
+.TP
+.I cluster_size
+This relation specifies the default cluster size if the bigalloc file
+system feature is enabled. It can be overridden via the
+.B \-C
+command line option to
+.BR mke2fs (8)
+.TP
+.I make_hugefiles
+This boolean relation enables the creation of pre-allocated files as
+part of formatting the file system. The extent tree blocks for these
+pre-allocated files will be placed near the beginning of the file
+system, so that if all of the other metadata blocks are also configured
+to be placed near the beginning of the file system (by disabling the
+backup superblocks, using the packed_meta_blocks option, etc.), the data
+blocks of the pre-allocated files will be contiguous.
+.TP
+.I hugefiles_dir
+This relation specifies the directory where huge files are created,
+relative to the file system root.
+.TP
+.I hugefiles_uid
+This relation controls the user ownership for all of the files and
+directories created by the
+.I make_hugefiles
+feature.
+.TP
+.I hugefiles_gid
+This relation controls the group ownership for all of the files and
+directories created by the
+.I make_hugefiles
+feature.
+.TP
+.I hugefiles_umask
+This relation specifies the umask used when creating the files and
+directories by the
+.I make_hugefiles
+feature.
+.TP
+.I num_hugefiles
+This relation specifies the number of huge files to be created. If this
+relation is not specified, or is set to zero, and the
+.I hugefiles_size
+relation is non-zero, then
+.I make_hugefiles
+will create as many huge files as can fit to fill the entire file system.
+.TP
+.I hugefiles_slack
+This relation specifies how much space should be reserved for other
+files.
+.TP
+.I hugefiles_size
+This relation specifies the size of the huge files. If this relation is
+not specified, the default is to fill the entire file system.
+.TP
+.I hugefiles_align
+This relation specifies the alignment for the start block of the huge
+files. It also forces the size of huge files to be a multiple of the
+requested alignment. If this relation is not specified, no alignment
+requirement will be imposed on the huge files.
+.TP
+.I hugefiles_align_disk
+This relations specifies whether the alignment should be relative to the
+beginning of the hard drive (assuming that the starting offset of the
+partition is available to mke2fs). The default value is false, which
+will cause hugefile alignment to be relative to the beginning of the
+file system.
+.TP
+.I hugefiles_name
+This relation specifies the base file name for the huge files.
+.TP
+.I hugefiles_digits
+This relation specifies the (zero-padded) width of the field for the
+huge file number.
+.TP
+.I warn_y2038_dates
+This boolean relation specifies whether mke2fs will issue a warning
+when creating a file system with 128 byte inodes (and so therefore will
+not support dates after January 19th, 2038). The default value is true,
+except for file systems created for the GNU Hurd since it only supports
+128-byte inodes.
+.TP
+.I zero_hugefiles
+This boolean relation specifies whether or not zero blocks will be
+written to the hugefiles while
+.BR mke2fs (8)
+is creating them. By default, zero blocks will be written to the huge
+files to avoid stale data from being made available to potentially
+untrusted user programs, unless the device supports a discard/trim
+operation which will take care of zeroing the device blocks. By setting
+.I zero_hugefiles
+to false, this step will always be skipped, which can be useful if it is
+known that the disk has been previously erased, or if the user programs
+that will have access to the huge files are trusted to not reveal stale
+data.
+.TP
+.I encoding
+This relation defines the file name encoding to be used if the casefold
+feature is enabled. Currently the only valid encoding is utf8-12.1 or
+utf8, which requests the most recent Unicode version; since 12.1 is the only
+available Unicode version, utf8 and utf8-12.1 have the same result.
+.I encoding_flags
+This relation defines encoding-specific flags. For utf8 encodings, the
+only available flag is strict, which will cause attempts to create file
+names containing invalid Unicode characters to be rejected by the
+kernel. Strict mode is not enabled by default.
+.SH THE [devices] STANZA
+Each tag in the
+.I [devices]
+stanza names device name so that per-device defaults can be specified.
+.TP
+.I fs_type
+This relation specifies the default parameter for the
+.B \-t
+option, if this option isn't specified on the command line.
+.TP
+.I usage_types
+This relation specifies the default parameter for the
+.B \-T
+option, if this option isn't specified on the command line.
+.SH FILES
+.TP
+.I /etc/mke2fs.conf
+The configuration file for
+.BR mke2fs (8).
+.SH SEE ALSO
+.BR mke2fs (8)
diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
new file mode 100644
index 0000000..b7fc95d
--- /dev/null
+++ b/misc/mke2fs.conf.in
@@ -0,0 +1,45 @@
+[defaults]
+ base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
+ default_mntopts = acl,user_xattr
+ enable_periodic_fsck = 0
+ blocksize = 4096
+ inode_size = 256
+ inode_ratio = 16384
+
+[fs_types]
+ ext3 = {
+ features = has_journal
+ }
+ ext4 = {
+ features = has_journal,extent,huge_file,flex_bg,metadata_csum,metadata_csum_seed,64bit,dir_nlink,extra_isize,orphan_file
+ }
+ small = {
+ blocksize = 1024
+ inode_ratio = 4096
+ }
+ floppy = {
+ blocksize = 1024
+ inode_ratio = 8192
+ }
+ big = {
+ inode_ratio = 32768
+ }
+ huge = {
+ inode_ratio = 65536
+ }
+ news = {
+ inode_ratio = 4096
+ }
+ largefile = {
+ inode_ratio = 1048576
+ blocksize = -1
+ }
+ largefile4 = {
+ inode_ratio = 4194304
+ blocksize = -1
+ }
+ hurd = {
+ blocksize = 4096
+ inode_size = 128
+ warn_y2038_dates = 0
+ }
diff --git a/misc/mke2fs.h b/misc/mke2fs.h
new file mode 100644
index 0000000..ce72cb3
--- /dev/null
+++ b/misc/mke2fs.h
@@ -0,0 +1,30 @@
+/*
+ * mke2fs.h
+ *
+ * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ * 2003, 2004, 2005 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/* mke2fs.c */
+extern const char * program_name;
+extern int quiet;
+extern int verbose;
+extern int zero_hugefile;
+extern char **fs_types;
+
+extern char *get_string_from_profile(char **types, const char *opt,
+ const char *def_val);
+extern int get_int_from_profile(char **types, const char *opt, int def_val);
+extern int get_bool_from_profile(char **types, const char *opt, int def_val);
+extern int int_log10(unsigned long long arg);
+
+/* mk_hugefiles.c */
+extern errcode_t mk_hugefiles(ext2_filsys fs, const char *device_name);
+
+
+
diff --git a/misc/mklost+found.8.in b/misc/mklost+found.8.in
new file mode 100644
index 0000000..d338239
--- /dev/null
+++ b/misc/mklost+found.8.in
@@ -0,0 +1,43 @@
+.\" -*- nroff -*-
+.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH MKLOST+FOUND 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+mklost+found \- create a lost+found directory on a mounted Linux
+second extended file system
+.SH SYNOPSIS
+.B mklost+found
+.SH DESCRIPTION
+.B mklost+found
+is used to create a
+.I lost+found
+directory in the current working directory on a Linux second extended
+file system. There is normally a
+.I lost+found
+directory in the root directory of each file system.
+.PP
+.B mklost+found
+pre-allocates disk blocks to the
+.I lost+found
+directory so that when
+.BR e2fsck (8)
+is being run to recover a file system, it does not need to allocate blocks in
+the file system to store a large number of unlinked files. This ensures that
+.B e2fsck
+will not have to allocate data blocks in the file system during recovery.
+.SH OPTIONS
+There are none.
+.SH AUTHOR
+.B mklost+found
+has been written by Remy Card <Remy.Card@linux.org>. It is currently being
+maintained by Theodore Ts'o <tytso@alum.mit.edu>.
+.SH BUGS
+There are none :-)
+.SH AVAILABILITY
+.B mklost+found
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR e2fsck (8),
+.BR mke2fs (8)
diff --git a/misc/mklost+found.c b/misc/mklost+found.c
new file mode 100644
index 0000000..1431187
--- /dev/null
+++ b/misc/mklost+found.c
@@ -0,0 +1,87 @@
+/*
+ * mklost+found.c - Creates a directory lost+found on a mounted second
+ * extended file system
+ *
+ * Copyright (C) 1992, 1993 Remy Card <card@masi.ibp.fr>
+ *
+ * This file can be redistributed under the terms of the GNU General
+ * Public License
+ */
+
+/*
+ * History:
+ * 93/04/22 - Creation
+ */
+
+#include "config.h"
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "../version.h"
+#include "support/nls-enable.h"
+
+#define LPF "lost+found"
+
+int main (int argc, char ** argv)
+{
+ char name[EXT2_NAME_LEN + 2];
+ char path[sizeof (LPF) + 1 + 256];
+ struct stat st;
+ int i, j;
+ int d;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ fprintf (stderr, "mklost+found %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
+ if (argc != 1) {
+ (void)argv; /* avoid unused argument warning */
+ fprintf (stderr, "%s", _("Usage: mklost+found\n"));
+ exit(1);
+ }
+ if (mkdir (LPF, 0700) == -1) {
+ perror ("mkdir");
+ exit(1);
+ }
+
+ i = 0;
+ memset (name, 'x', 246);
+ do {
+ sprintf (name + 246, "%08d", i);
+ strcpy (path, LPF);
+ strcat (path, "/");
+ strcat (path, name);
+ if ((d = creat (path, 0644)) == -1) {
+ perror ("creat");
+ exit (1);
+ }
+ i++;
+ close (d);
+ if (stat (LPF, &st) == -1) {
+ perror ("stat");
+ exit (1);
+ }
+ } while (st.st_size <= (EXT2_NDIR_BLOCKS - 1) * st.st_blksize);
+ for (j = 0; j < i; j++) {
+ sprintf (name + 246, "%08d", j);
+ strcpy (path, LPF);
+ strcat (path, "/");
+ strcat (path, name);
+ if (unlink (path) == -1) {
+ perror ("unlink");
+ exit (1);
+ }
+ }
+ exit (0);
+}
diff --git a/misc/partinfo.c b/misc/partinfo.c
new file mode 100644
index 0000000..b79d183
--- /dev/null
+++ b/misc/partinfo.c
@@ -0,0 +1,80 @@
+/*
+ * partinfo.c
+ *
+ * Originally written by Alain Knaff, <alknaff@innet.lu>.
+ *
+ * Cleaned up by Theodore Ts'o, <tytso@mit.edu>.
+ *
+ */
+
+#include "config.h"
+#include <sys/types.h>
+#include <fcntl.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#include <stdio.h>
+#include <linux/hdreg.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include "support/nls-enable.h"
+#include "et/com_err.h"
+
+#if defined(__linux__) && defined(_IO) && !defined(BLKGETSIZE)
+#define BLKGETSIZE _IO(0x12,96) /* return device size */
+#endif
+
+int main(int argc, char **argv)
+{
+ struct hd_geometry loc;
+ int fd, i;
+ unsigned long size;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ if (argc == 1) {
+ fprintf(stderr, _("Usage: %s device...\n\nPrints out the "
+ "partition information for each given device.\n"
+ "For example: %s /dev/hda\n\n"), argv[0], argv[0]);
+ exit(1);
+ }
+
+ for (i=1; i < argc; i++) {
+ fd = open(argv[i], O_RDONLY);
+
+ if (fd < 0) {
+ fprintf(stderr, _("Cannot open %s: %s"),
+ argv[i], strerror(errno));
+ continue;
+ }
+
+ if (ioctl(fd, HDIO_GETGEO, &loc) < 0) {
+ fprintf(stderr, _("Cannot get geometry of %s: %s"),
+ argv[i], strerror(errno));
+ close(fd);
+ continue;
+ }
+
+
+ if (ioctl(fd, BLKGETSIZE, &size) < 0) {
+ fprintf(stderr, _("Cannot get size of %s: %s"),
+ argv[i], strerror(errno));
+ close(fd);
+ continue;
+ }
+
+ printf(_("%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"),
+ argv[i],
+ loc.heads, (int)loc.sectors, loc.cylinders,
+ (int)loc.start, size, (int) loc.start + size -1);
+ close(fd);
+ }
+ exit(0);
+}
diff --git a/misc/profile-to-c.awk b/misc/profile-to-c.awk
new file mode 100644
index 0000000..814f723
--- /dev/null
+++ b/misc/profile-to-c.awk
@@ -0,0 +1,13 @@
+#!/bin/awk
+BEGIN {
+ printf("const char *mke2fs_default_profile = \n");
+}
+
+{
+ gsub("\"","\\\"",$0);
+ printf(" \"%s\\n\"\n", $0);
+}
+
+END {
+ printf(";\n", str)
+}
diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in
new file mode 100644
index 0000000..dcf108c
--- /dev/null
+++ b/misc/tune2fs.8.in
@@ -0,0 +1,849 @@
+.\" Revision 1.0 93/06/3 23:00 chk
+.\" Initial revision
+.\"
+.\"
+.TH TUNE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+tune2fs \- adjust tunable file system parameters on ext2/ext3/ext4 file systems
+.SH SYNOPSIS
+.B tune2fs
+[
+.B \-l
+]
+[
+.B \-c
+.I max-mount-counts
+]
+[
+.B \-e
+.I errors-behavior
+]
+[
+.B \-f
+]
+[
+.B \-i
+.I interval-between-checks
+]
+[
+.B \-I
+.I new_inode_size
+]
+[
+.B \-j
+]
+[
+.B \-J
+.I journal-options
+]
+[
+.B \-m
+.I reserved-blocks-percentage
+]
+[
+.B \-o
+.RI [^]mount-options [,...]
+]
+[
+.B \-r
+.I reserved-blocks-count
+]
+[
+.B \-u
+.I user
+]
+[
+.B \-g
+.I group
+]
+[
+.B \-C
+.I mount-count
+]
+[
+.B \-E
+.I extended-options
+]
+[
+.B \-L
+.I volume-label
+]
+[
+.B \-M
+.I last-mounted-directory
+]
+[
+.B \-O
+.RI [^] feature [,...]
+]
+[
+.B \-Q
+.I quota-options
+]
+[
+.B \-T
+.I time-last-checked
+]
+[
+.B \-U
+.I UUID
+]
+[
+.B \-z
+.I undo_file
+]
+device
+.SH DESCRIPTION
+.B tune2fs
+allows the system administrator to adjust various tunable file system
+parameters on Linux ext2, ext3, or ext4 file systems. The current values
+of these options can be displayed by using the
+.B -l
+option to
+.BR tune2fs (8)
+program, or by using the
+.BR dumpe2fs (8)
+program.
+.PP
+The
+.I device
+specifier can either be a filename (i.e., /dev/sda1), or a LABEL or UUID
+specifier: "\fBLABEL=\fIvolume-label\fR" or "\fBUUID=\fIuuid\fR". (i.e.,
+LABEL=home or UUID=e40486c6-84d5-4f2f-b99c-032281799c9d).
+.SH OPTIONS
+.TP
+.BI \-c " max-mount-counts"
+Adjust the number of mounts after which the file system will be checked by
+.BR e2fsck (8).
+If
+.I max-mount-counts
+is the string "random", tune2fs will use a random value between 20 and 40.
+If
+.I max-mount-counts
+is 0 or \-1, the number of times the file system is mounted will be disregarded
+by
+.BR e2fsck (8)
+and the kernel.
+.sp
+Staggering the mount-counts at which file systems are forcibly
+checked will avoid all file systems being checked at one time
+when using journaled file systems.
+.sp
+Mount-count-dependent checking is disabled by default to avoid
+unanticipated long reboots while e2fsck does its work. If you
+are concerned about file system corruptions caused by potential hardware
+problems of kernel bugs, a better solution than mount-count-dependent
+checking is to use the
+.BR e2scrub (8)
+program. This does require placing the file system on an LVM volume,
+however.
+.TP
+.BI \-C " mount-count"
+Set the number of times the file system has been mounted.
+If set to a greater value than the max-mount-counts parameter
+set by the
+.B \-c
+option,
+.BR e2fsck (8)
+will check the file system at the next reboot.
+.TP
+.BI \-e " error-behavior"
+Change the behavior of the kernel code when errors are detected.
+In all cases, a file system error will cause
+.BR e2fsck (8)
+to check the file system on the next boot.
+.I error-behavior
+can be one of the following:
+.RS 1.2i
+.TP 1.2i
+.B continue
+Continue normal execution.
+.TP
+.B remount-ro
+Remount file system read-only.
+.TP
+.B panic
+Cause a kernel panic.
+.RE
+.TP
+.BI \-E " extended-options"
+Set extended options for the file system. Extended options are comma
+separated, and may take an argument using the equals ('=') sign.
+The following extended options are supported:
+.RS 1.2i
+.TP
+.B clear_mmp
+Reset the MMP block (if any) back to the clean state. Use only if
+absolutely certain the device is not currently mounted or being
+fscked, or major file system corruption can result. Needs '-f'.
+.TP
+.BI mmp_update_interval= interval
+Adjust the initial MMP update interval to
+.I interval
+seconds. Specifying an
+.I interval
+of 0 means to use the default interval. The specified interval must
+be less than 300 seconds. Requires that the
+.B mmp
+feature be enabled.
+.TP
+.BI stride= stride-size
+Configure the file system for a RAID array with
+.I stride-size
+file system blocks. This is the number of blocks read or written to disk
+before moving to next disk. This mostly affects placement of file system
+metadata like bitmaps at
+.BR mke2fs (2)
+time to avoid placing them on a single disk, which can hurt the performance.
+It may also be used by block allocator.
+.TP
+.BI stripe_width= stripe-width
+Configure the file system for a RAID array with
+.I stripe-width
+file system blocks per stripe. This is typically be stride-size * N, where
+N is the number of data disks in the RAID (e.g. RAID 5 N+1, RAID 6 N+2).
+This allows the block allocator to prevent read-modify-write of the
+parity in a RAID stripe if possible when the data is written.
+.TP
+.BI hash_alg= hash-alg
+Set the default hash algorithm used for file systems with hashed b-tree
+directories. Valid algorithms accepted are:
+.IR legacy ,
+.IR half_md4 ,
+and
+.IR tea .
+.TP
+.BI encoding= encoding-name
+Enable the
+.I casefold
+feature in the super block and set
+.I encoding-name
+as the encoding to be used. If
+.I encoding-name
+is not specified, utf8 is used. The encoding cannot be altered if casefold
+was previously enabled.
+.TP
+.BI encoding_flags= encoding-flags
+Define parameters for file name character encoding operations. If a
+flag is not changed using this parameter, its default value is used.
+.I encoding-flags
+should be a comma-separated lists of flags to be enabled. The flags cannot be
+altered if casefold was previously enabled.
+
+The only flag that can be set right now is
+.I strict
+which means that invalid strings should be rejected by the file system.
+In the default configuration, the
+.I strict
+flag is disabled.
+.TP
+.BI mount_opts= mount_option_string
+Set a set of default mount options which will be used when the file
+system is mounted. Unlike the bitmask-based default mount options which
+can be specified with the
+.B -o
+option,
+.I mount_option_string
+is an arbitrary string with a maximum length of 63 bytes, which is
+stored in the superblock.
+.IP
+The ext4 file system driver will first apply
+the bitmask-based default options, and then parse the
+.IR mount_option_string ,
+before parsing the mount options passed from the
+.BR mount (8)
+program.
+.IP
+This superblock setting is only honored in 2.6.35+ kernels;
+and not at all by the ext2 and ext3 file system drivers.
+.TP
+.BI orphan_file_size= size
+Set size of the file for tracking unlinked but still open inodes and inodes
+with truncate in progress. Larger file allows for better scalability, reserving
+a few blocks per cpu is ideal.
+.TP
+.B force_fsck
+Set a flag in the file system superblock indicating that errors have been found.
+This will force fsck to run at the next mount.
+.TP
+.B test_fs
+Set a flag in the file system superblock indicating that it may be
+mounted using experimental kernel code, such as the ext4dev file system.
+.TP
+.B ^test_fs
+Clear the test_fs flag, indicating the file system should only be mounted
+using production-level file system code.
+.RE
+.TP
+.B \-f
+Force the tune2fs operation to complete even in the face of errors. This
+option is useful when removing the
+.B has_journal
+file system feature from a file system which has
+an external journal (or is corrupted
+such that it appears to have an external journal), but that
+external journal is not available. If the file system appears to require
+journal replay, the
+.B \-f
+flag must be specified twice to proceed.
+.sp
+.B WARNING:
+Removing an external journal from a file system which was not cleanly unmounted
+without first replaying the external journal can result in
+severe data loss and file system corruption.
+.TP
+.BI \-g " group"
+Set the group which can use the reserved file system blocks.
+The
+.I group
+parameter can be a numerical gid or a group name. If a group name is given,
+it is converted to a numerical gid before it is stored in the superblock.
+.TP
+.B \-i " \fIinterval-between-checks\fR[\fBd\fR|\fBm\fR|\fBw\fR]"
+Adjust the maximal time between two file system checks.
+No suffix or
+.B d
+will interpret the number
+.I interval-between-checks
+as days,
+.B m
+as months, and
+.B w
+as weeks. A value of zero will disable the time-dependent checking.
+.sp
+There are pros and cons to disabling these periodic checks; see the
+discussion under the
+.B \-c
+(mount-count-dependent check) option for details.
+.TP
+.B \-I
+Change the inode size used by the file system. This requires rewriting
+the inode table, so it requires that the file system is checked for
+consistency first using
+.BR e2fsck (8).
+This operation can also take a while and the file system can be
+corrupted and data lost if it is interrupted while in the middle of
+converting the file system. Backing up the file system before changing
+inode size is recommended.
+.IP
+File systems with an inode size of 128 bytes do not support timestamps
+beyond January 19, 2038. Inodes which are 256 bytes or larger will
+support extended timestamps, project id's, and the ability to store some
+extended attributes in the inode table for improved performance.
+.TP
+.B \-j
+Add an ext3 journal to the file system. If the
+.B \-J
+option is not specified, the default journal parameters will be used to create
+an appropriately sized journal (given the size of the file system)
+stored within the file system. Note that you must be using a kernel
+which has ext3 support in order to actually make use of the journal.
+.IP
+If this option is used to create a journal on a mounted file system, an
+immutable file,
+.BR .journal ,
+will be created in the top-level directory of the file system, as it is
+the only safe way to create the journal inode while the file system is
+mounted. While the ext3 journal is visible, it is not safe to
+delete it, or modify it while the file system is mounted; for this
+reason the file is marked immutable.
+While checking unmounted file systems,
+.BR e2fsck (8)
+will automatically move
+.B .journal
+files to the invisible, reserved journal inode. For all file systems
+except for the root file system, this should happen automatically and
+naturally during the next reboot cycle. Since the root file system is
+mounted read-only,
+.BR e2fsck (8)
+must be run from a rescue floppy in order to effect this transition.
+.IP
+On some distributions, such as Debian, if an initial ramdisk is used,
+the initrd scripts will automatically convert an ext2 root file system
+to ext3 if the
+.B /etc/fstab
+file specifies the ext3 file system for the root file system in order to
+avoid requiring the use of a rescue floppy to add an ext3 journal to
+the root file system.
+.TP
+.BR \-J " journal-options"
+Override the default ext3 journal parameters. Journal options are comma
+separated, and may take an argument using the equals ('=') sign.
+The following journal options are supported:
+.RS 1.2i
+.TP
+.BI size= journal-size
+Create a journal stored in the file system of size
+.I journal-size
+megabytes. The size of the journal must be at least 1024 file system blocks
+(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
+and may be no more than 10,240,000 file system blocks.
+There must be enough free space in the file system to create a journal of
+that size.
+.TP
+.BI fast_commit_size= fast-commit-size
+Create an additional fast commit journal area of size
+.I fast-commit-size
+kilobytes.
+This option is only valid if
+.B fast_commit
+feature is enabled
+on the file system. If this option is not specified and if
+.B fast_commit
+feature is turned on, fast commit area size defaults to
+.I journal-size
+/ 64 megabytes. The total size of the journal with
+.B fast_commit
+feature set is
+.I journal-size
++ (
+.I fast-commit-size
+* 1024) megabytes. The total journal size may be no more than
+10,240,000 file system blocks or half the total file system size
+(whichever is smaller).
+.TP
+.BI location =journal-location
+Specify the location of the journal. The argument
+.I journal-location
+can either be specified as a block number, or if the number has a units
+suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the
+beginning of the file system.
+@JDEV@.TP
+@JDEV@.BI device= external-journal
+@JDEV@Attach the file system to the journal block device located on
+@JDEV@.IR external-journal .
+@JDEV@The external
+@JDEV@journal must have been already created using the command
+@JDEV@.IP
+@JDEV@.B mke2fs -O journal_dev
+@JDEV@.I external-journal
+@JDEV@.IP
+@JDEV@Note that
+@JDEV@.I external-journal
+@JDEV@must be formatted with the same block
+@JDEV@size as file systems which will be using it.
+@JDEV@In addition, while there is support for attaching
+@JDEV@multiple file systems to a single external journal,
+@JDEV@the Linux kernel and
+@JDEV@.BR e2fsck (8)
+@JDEV@do not currently support shared external journals yet.
+@JDEV@.IP
+@JDEV@Instead of specifying a device name directly,
+@JDEV@.I external-journal
+@JDEV@can also be specified by either
+@JDEV@.BI LABEL= label
+@JDEV@or
+@JDEV@.BI UUID= UUID
+@JDEV@to locate the external journal by either the volume label or UUID
+@JDEV@stored in the ext2 superblock at the start of the journal. Use
+@JDEV@.BR dumpe2fs (8)
+@JDEV@to display a journal device's volume label and UUID. See also the
+@JDEV@.B -L
+@JDEV@option of
+@JDEV@.BR tune2fs (8).
+.RE
+@JDEV@.IP
+@JDEV@Only one of the
+@JDEV@.BR size " or " device
+@JDEV@options can be given for a file system.
+.TP
+.B \-l
+List the contents of the file system superblock, including the current
+values of the parameters that can be set via this program.
+.TP
+.BI \-L " volume-label"
+Set the volume label of the file system.
+Ext2 file system labels can be at most 16 characters long; if
+.I volume-label
+is longer than 16 characters,
+.B tune2fs
+will truncate it and print a warning. For other file systems that
+support online label manipulation and are mounted
+.B tune2fs
+will work as well, but it will not attempt to truncate the
+.I volume-label
+at all. The volume label can be used by
+.BR mount (8),
+.BR fsck (8),
+and
+.BR /etc/fstab (5)
+(and possibly others) by specifying
+.BI LABEL= volume-label
+instead of a block special device name like
+.BR /dev/hda5 .
+.TP
+.BI \-m " reserved-blocks-percentage"
+Set the percentage of the file system which may only be allocated
+by privileged processes. Reserving some number of file system blocks
+for use by privileged processes is done
+to avoid file system fragmentation, and to allow system
+daemons, such as
+.BR syslogd (8),
+to continue to function correctly after non-privileged processes are
+prevented from writing to the file system. Normally, the default percentage
+of reserved blocks is 5%.
+.TP
+.BI \-M " last-mounted-directory"
+Set the last-mounted directory for the file system.
+.TP
+.BR \-o " [^]\fImount-option\fR[,...]"
+Set or clear the indicated default mount options in the file system.
+Default mount options can be overridden by mount options specified
+either in
+.BR /etc/fstab (5)
+or on the command line arguments to
+.BR mount (8).
+Older kernels may not support this feature; in particular,
+kernels which predate 2.4.20 will almost certainly ignore the
+default mount options field in the superblock.
+.IP
+More than one mount option can be cleared or set by separating
+features with commas. Mount options prefixed with a
+caret character ('^') will be cleared in the file system's superblock;
+mount options without a prefix character or prefixed with a plus
+character ('+') will be added to the file system.
+.IP
+The following mount options can be set or cleared using
+.BR tune2fs :
+.RS 1.2i
+.TP
+.B debug
+Enable debugging code for this file system.
+.TP
+.B bsdgroups
+Emulate BSD behavior when creating new files: they will take the group-id
+of the directory in which they were created. The standard System V behavior
+is the default, where newly created files take on the fsgid of the current
+process, unless the directory has the setgid bit set, in which case it takes
+the gid from the parent directory, and also gets the setgid bit set if it is
+a directory itself.
+.TP
+.B user_xattr
+Enable user-specified extended attributes.
+.TP
+.B acl
+Enable Posix Access Control Lists.
+.TP
+.B uid16
+Disables 32-bit UIDs and GIDs. This is for interoperability with
+older kernels which only store and expect 16-bit values.
+.TP
+.B journal_data
+When the file system is mounted with journaling enabled, all data
+(not just metadata) is committed into the journal prior to being written
+into the main file system.
+.TP
+.B journal_data_ordered
+When the file system is mounted with journaling enabled, all data is forced
+directly out to the main file system prior to its metadata being committed
+to the journal.
+.TP
+.B journal_data_writeback
+When the file system is mounted with journaling enabled, data may be
+written into the main file system after its metadata has been committed
+to the journal. This may increase throughput, however, it may allow old
+data to appear in files after a crash and journal recovery.
+.TP
+.B nobarrier
+The file system will be mounted with barrier operations in the journal
+disabled. (This option is currently only supported by the ext4 file
+system driver in 2.6.35+ kernels.)
+.TP
+.B block_validity
+The file system will be mounted with the block_validity option enabled,
+which causes extra checks to be performed after reading or writing from
+the file system. This prevents corrupted metadata blocks from causing
+file system damage by overwriting parts of the inode table or block
+group descriptors. This comes at the cost of increased memory and CPU
+overhead, so it is enabled only for debugging purposes. (This option is
+currently only supported by the ext4 file system driver in 2.6.35+
+kernels.)
+.TP
+.B discard
+The file system will be mounted with the discard mount option. This will
+cause the file system driver to attempt to use the trim/discard feature
+of some storage devices (such as SSD's and thin-provisioned drives
+available in some enterprise storage arrays) to inform the storage
+device that blocks belonging to deleted files can be reused for other
+purposes. (This option is currently only supported by the ext4 file
+system driver in 2.6.35+ kernels.)
+.TP
+.B nodelalloc
+The file system will be mounted with the nodelalloc mount option. This
+will disable the delayed allocation feature. (This option is currently
+only supported by the ext4 file system driver in 2.6.35+ kernels.)
+.RE
+.TP
+.BR \-O " [^]\fIfeature\fR[,...]"
+Set or clear the indicated file system features (options) in the file system.
+More than one file system feature can be cleared or set by separating
+features with commas. File System features prefixed with a
+caret character ('^') will be cleared in the file system's superblock;
+file system features without a prefix character or prefixed with a plus
+character ('+') will be added to the file system. For a detailed
+description of the file system features, please see the man page
+.BR ext4 (5).
+.IP
+The following file system features can be set or cleared using
+.BR tune2fs :
+.RS 1.2i
+.TP
+.B 64bit
+Enable the file system to be larger than 2^32 blocks.
+.TP
+.B casefold
+Enable support for file system level casefolding.
+The option can be cleared only if filesystem has no
+directories with
+.B F
+attribute.
+.TP
+.B dir_index
+Use hashed b-trees to speed up lookups for large directories.
+.TP
+.B dir_nlink
+Allow more than 65000 subdirectories per directory.
+.TP
+.B ea_inode
+Allow the value of each extended attribute to be placed in the data blocks of a
+separate inode if necessary, increasing the limit on the size and number of
+extended attributes per file.
+.B Tune2fs
+currently only supports setting this file system feature.
+.TP
+.B encrypt
+Enable support for file system level encryption.
+.B Tune2fs
+currently only supports setting this file system feature.
+.TP
+.B extent
+Enable the use of extent trees to store the location of data blocks in inodes.
+.B Tune2fs
+currently only supports setting this file system feature.
+.TP
+.B extra_isize
+Enable the extended inode fields used by ext4.
+.TP
+.B filetype
+Store file type information in directory entries.
+.TP
+.B flex_bg
+Allow bitmaps and inode tables for a block group to be placed
+anywhere on the storage media. \fBTune2fs\fR will not reorganize
+the location of the inode tables and allocation bitmaps, as
+.BR mke2fs (8)
+will do when it creates a freshly formatted file system with
+.B flex_bg
+enabled.
+.TP
+.B has_journal
+Use a journal to ensure file system consistency even across unclean shutdowns.
+Setting the file system feature is equivalent to using the
+.B \-j
+option.
+.TP
+.TP
+.B fast_commit
+Enable fast commit journaling feature to improve fsync latency.
+.TP
+.B large_dir
+Increase the limit on the number of files per directory.
+.B Tune2fs
+currently only supports setting this file system feature.
+.TP
+.B huge_file
+Support files larger than 2 terabytes in size.
+.TP
+.B large_file
+File System can contain files that are greater than 2GB.
+.TP
+.B metadata_csum
+Store a checksum to protect the contents in each metadata block.
+.TP
+.B metadata_csum_seed
+Allow the file system to store the metadata checksum seed in the
+superblock, enabling the administrator to change the UUID of a file system
+using the
+.B metadata_csum
+feature while it is mounted.
+.TP
+.B mmp
+Enable or disable multiple mount protection (MMP) feature.
+.TP
+.B project
+Enable project ID tracking. This is used for project quota tracking.
+.TP
+.B quota
+Enable internal file system quota inodes.
+.TP
+.B read-only
+Force the kernel to mount the file system read-only.
+.TP
+.B resize_inode
+Reserve space so the block group descriptor table may grow in the
+future.
+.B Tune2fs
+only supports clearing this file system feature.
+.TP
+.B sparse_super
+Limit the number of backup superblocks to save space on large file systems.
+.B Tune2fs
+currently only supports setting this file system feature.
+.TP
+.B stable_inodes
+Prevent the file system from being shrunk or having its UUID changed, in order to
+allow the use of specialized encryption settings that make use of the inode
+numbers and UUID.
+.B Tune2fs
+currently only supports setting this file system feature.
+.TP
+.B uninit_bg
+Allow the kernel to initialize bitmaps and inode tables lazily, and to
+keep a high watermark for the unused inodes in a file system, to reduce
+.BR e2fsck (8)
+time. The first e2fsck run after enabling this feature will take the
+full time, but subsequent e2fsck runs will take only a fraction of the
+original time, depending on how full the file system is.
+.TP
+.B verity
+Enable support for verity protected files.
+.B Tune2fs
+currently only supports setting this file system feature.
+.RE
+.IP
+After setting or clearing
+.BR sparse_super ,
+.BR uninit_bg ,
+.BR filetype ,
+or
+.B resize_inode
+file system features,
+the file system may require being checked using
+.BR e2fsck (8)
+to return the file system to a consistent state.
+.B Tune2fs
+will print a message requesting that the system administrator run
+.BR e2fsck (8)
+if necessary. After setting the
+.B dir_index
+feature,
+.B e2fsck -D
+can be run to convert existing directories to the hashed B-tree format.
+Enabling certain file system features may prevent the file system from being
+mounted by kernels which do not support those features. In particular, the
+.B uninit_bg
+and
+.B flex_bg
+features are only supported by the ext4 file system.
+.TP
+.BI \-r " reserved-blocks-count"
+Set the number of reserved file system blocks.
+.TP
+.BI \-Q " quota-options"
+Sets 'quota' feature on the superblock and works on the quota files for the
+given quota type. Quota options could be one or more of the following:
+.RS 1.2i
+.TP
+.B [^]usrquota
+Sets/clears user quota inode in the superblock.
+.TP
+.B [^]grpquota
+Sets/clears group quota inode in the superblock.
+.TP
+.B [^]prjquota
+Sets/clears project quota inode in the superblock.
+.RE
+.TP
+.BI \-T " time-last-checked"
+Set the time the file system was last checked using
+.BR e2fsck .
+The time is interpreted using the current (local) timezone.
+This can be useful in scripts which use a Logical Volume Manager to make
+a consistent snapshot of a file system, and then check the file system
+during off hours to make sure it hasn't been corrupted due to
+hardware problems, etc. If the file system was clean, then this option can
+be used to set the last checked time on the original file system. The format
+of
+.I time-last-checked
+is the international date format, with an optional time specifier, i.e.
+YYYYMMDD[HH[MM[SS]]]. The keyword
+.B now
+is also accepted, in which case the last checked time will be set to the
+current time.
+.TP
+.BI \-u " user"
+Set the user who can use the reserved file system blocks.
+.I user
+can be a numerical uid or a user name. If a user name is given, it
+is converted to a numerical uid before it is stored in the superblock.
+.TP
+.BI \-U " UUID"
+Set the universally unique identifier (UUID) of the file system to
+.IR UUID .
+The format of the UUID is a series of hex digits separated by hyphens,
+like this:
+"c1b9d5a2-f162-11cf-9ece-0020afc76f16".
+The
+.I UUID
+parameter may also be one of the following:
+.RS 1.2i
+.TP
+.I clear
+clear the file system UUID
+.TP
+.I random
+generate a new randomly-generated UUID
+.TP
+.I time
+generate a new time-based UUID
+.RE
+.IP
+The UUID may be used by
+.BR mount (8),
+.BR fsck (8),
+and
+.BR /etc/fstab (5)
+(and possibly others) by specifying
+.BI UUID= uuid
+instead of a block special device name like
+.BR /dev/hda1 .
+.IP
+See
+.BR uuidgen (8)
+for more information.
+If the system does not have a good random number generator such as
+.I /dev/random
+or
+.IR /dev/urandom ,
+.B tune2fs
+will automatically use a time-based UUID instead of a randomly-generated UUID.
+.TP
+.BI \-z " undo_file"
+Before overwriting a file system block, write the old contents of the block to
+an undo file. This undo file can be used with e2undo(8) to restore the old
+contents of the file system should something go wrong. If the empty string is
+passed as the undo_file argument, the undo file will be written to a file named
+tune2fs-\fIdevice\fR.e2undo in the directory specified via the
+\fIE2FSPROGS_UNDO_DIR\fR environment variable.
+
+WARNING: The undo file cannot be used to recover from a power or system crash.
+.SH BUGS
+We haven't found any bugs yet. That doesn't mean there aren't any...
+.SH AUTHOR
+.B tune2fs
+was written by Remy Card <Remy.Card@linux.org>. It is currently being
+maintained by Theodore Ts'o <tytso@alum.mit.edu>.
+.B tune2fs
+uses the ext2fs library written by Theodore Ts'o <tytso@mit.edu>.
+This manual page was written by Christian Kuhtz <chk@data-hh.Hanse.DE>.
+Time-dependent checking was added by Uwe Ohse <uwe@tirka.gun.de>.
+.SH AVAILABILITY
+.B tune2fs
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR debugfs (8),
+.BR dumpe2fs (8),
+.BR e2fsck (8),
+.BR mke2fs (8),
+.BR ext4 (5)
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
new file mode 100644
index 0000000..458f7cf
--- /dev/null
+++ b/misc/tune2fs.c
@@ -0,0 +1,3769 @@
+/*
+ * tune2fs.c - Change the file system parameters on an ext2 file system
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * Copyright 1995, 1996, 1997, 1998, 1999, 2000 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/*
+ * History:
+ * 93/06/01 - Creation
+ * 93/10/31 - Added the -c option to change the maximal mount counts
+ * 93/12/14 - Added -l flag to list contents of superblock
+ * M.J.E. Mol (marcel@duteca.et.tudelft.nl)
+ * F.W. ten Wolde (franky@duteca.et.tudelft.nl)
+ * 93/12/29 - Added the -e option to change errors behavior
+ * 94/02/27 - Ported to use the ext2fs library
+ * 94/03/06 - Added the checks interval from Uwe Ohse (uwe@tirka.gun.de)
+ */
+
+#define _XOPEN_SOURCE 600 /* for inclusion of strptime() */
+#include "config.h"
+#include <fcntl.h>
+#include <grp.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <pwd.h>
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h> /* for strcasecmp() */
+#else
+#define _BSD_SOURCE /* for inclusion of strcasecmp() via <string.h> */
+#define _DEFAULT_SOURCE /* since glibc 2.20 _BSD_SOURCE is deprecated */
+#endif
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <libgen.h>
+#include <limits.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "ext2fs/kernel-jbd.h"
+#include "et/com_err.h"
+#include "support/plausible.h"
+#include "support/quotaio.h"
+#include "support/devname.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+#include "util.h"
+#include "blkid/blkid.h"
+
+#include "../version.h"
+#include "support/nls-enable.h"
+
+#define QOPT_ENABLE (1)
+#define QOPT_DISABLE (-1)
+
+#ifndef FS_IOC_SETFSLABEL
+#define FSLABEL_MAX 256
+#define FS_IOC_SETFSLABEL _IOW(0x94, 50, char[FSLABEL_MAX])
+#endif
+
+#ifndef FS_IOC_GETFSLABEL
+#define FS_IOC_GETFSLABEL _IOR(0x94, 49, char[FSLABEL_MAX])
+#endif
+
+struct fsuuid {
+ __u32 fsu_len;
+ __u32 fsu_flags;
+ __u8 fsu_uuid[];
+};
+
+#ifndef EXT4_IOC_GETFSUUID
+#define EXT4_IOC_GETFSUUID _IOR('f', 44, struct fsuuid)
+#endif
+
+#ifndef EXT4_IOC_SETFSUUID
+#define EXT4_IOC_SETFSUUID _IOW('f', 44, struct fsuuid)
+#endif
+
+extern int ask_yn(const char *string, int def);
+
+const char *program_name = "tune2fs";
+char *device_name;
+char *new_label, *new_last_mounted, *requested_uuid;
+char *io_options;
+static int c_flag, C_flag, e_flag, f_flag, g_flag, i_flag, l_flag, L_flag;
+static int m_flag, M_flag, Q_flag, r_flag, s_flag = -1, u_flag, U_flag, T_flag;
+static int I_flag;
+static int clear_mmp;
+static time_t last_check_time;
+static int print_label;
+static int max_mount_count, mount_count, mount_flags;
+static unsigned long interval;
+static blk64_t reserved_blocks;
+static double reserved_ratio;
+static unsigned long resgid, resuid;
+static unsigned short errors;
+static int open_flag;
+static char *features_cmd;
+static char *mntopts_cmd;
+static int stride, stripe_width;
+static int stride_set, stripe_width_set;
+static char *extended_cmd;
+static unsigned long new_inode_size;
+static char *ext_mount_opts;
+static int quota_enable[MAXQUOTAS];
+static int rewrite_checksums;
+static int feature_64bit;
+static int fsck_requested;
+static char *undo_file;
+int enabling_casefold;
+
+int journal_size, journal_fc_size, journal_flags;
+char *journal_device;
+static blk64_t journal_location = ~0LL;
+static e2_blkcnt_t orphan_file_blocks;
+
+static struct list_head blk_move_list;
+
+struct blk_move {
+ struct list_head list;
+ blk64_t old_loc;
+ blk64_t new_loc;
+};
+
+errcode_t ext2fs_run_ext3_journal(ext2_filsys *fs);
+
+static const char *fsck_explain = N_("\nThis operation requires a freshly checked filesystem.\n");
+
+static const char *please_fsck = N_("Please run e2fsck -f on the filesystem.\n");
+static const char *please_dir_fsck =
+ N_("Please run e2fsck -fD on the filesystem.\n");
+
+#ifdef CONFIG_BUILD_FINDFS
+void do_findfs(int argc, char **argv);
+#endif
+
+#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jbd-debug */
+int journal_enable_debug = -1;
+#endif
+
+static void usage(void)
+{
+ fprintf(stderr,
+ _("Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] "
+ "[-g group]\n"
+ "\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+ "\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+ "\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+ "\t[-L volume_label] [-M last_mounted_dir]\n"
+ "\t[-O [^]feature[,...]] [-Q quota_options]\n"
+ "\t[-E extended-option[,...]] [-T last_check_time] "
+ "[-U UUID]\n\t[-I new_inode_size] [-z undo_file] device\n"),
+ program_name);
+ exit(1);
+}
+
+static __u32 ok_features[3] = {
+ /* Compat */
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL |
+ EXT2_FEATURE_COMPAT_DIR_INDEX |
+ EXT4_FEATURE_COMPAT_FAST_COMMIT |
+ EXT4_FEATURE_COMPAT_STABLE_INODES |
+ EXT4_FEATURE_COMPAT_ORPHAN_FILE,
+ /* Incompat */
+ EXT2_FEATURE_INCOMPAT_FILETYPE |
+ EXT3_FEATURE_INCOMPAT_EXTENTS |
+ EXT4_FEATURE_INCOMPAT_FLEX_BG |
+ EXT4_FEATURE_INCOMPAT_EA_INODE|
+ EXT4_FEATURE_INCOMPAT_MMP |
+ EXT4_FEATURE_INCOMPAT_64BIT |
+ EXT4_FEATURE_INCOMPAT_ENCRYPT |
+ EXT4_FEATURE_INCOMPAT_CSUM_SEED |
+ EXT4_FEATURE_INCOMPAT_LARGEDIR |
+ EXT4_FEATURE_INCOMPAT_CASEFOLD,
+ /* R/O compat */
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE |
+ EXT4_FEATURE_RO_COMPAT_HUGE_FILE|
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK|
+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM |
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER |
+ EXT4_FEATURE_RO_COMPAT_QUOTA |
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM |
+ EXT4_FEATURE_RO_COMPAT_READONLY |
+ EXT4_FEATURE_RO_COMPAT_PROJECT |
+ EXT4_FEATURE_RO_COMPAT_VERITY
+};
+
+static __u32 clear_ok_features[3] = {
+ /* Compat */
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL |
+ EXT2_FEATURE_COMPAT_RESIZE_INODE |
+ EXT2_FEATURE_COMPAT_DIR_INDEX |
+ EXT4_FEATURE_COMPAT_FAST_COMMIT |
+ EXT4_FEATURE_COMPAT_ORPHAN_FILE,
+ /* Incompat */
+ EXT2_FEATURE_INCOMPAT_FILETYPE |
+ EXT4_FEATURE_INCOMPAT_FLEX_BG |
+ EXT4_FEATURE_INCOMPAT_MMP |
+ EXT4_FEATURE_INCOMPAT_64BIT |
+ EXT4_FEATURE_INCOMPAT_CSUM_SEED |
+ EXT4_FEATURE_INCOMPAT_CASEFOLD,
+ /* R/O compat */
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE |
+ EXT4_FEATURE_RO_COMPAT_HUGE_FILE|
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK|
+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM |
+ EXT4_FEATURE_RO_COMPAT_QUOTA |
+ EXT4_FEATURE_RO_COMPAT_PROJECT |
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM |
+ EXT4_FEATURE_RO_COMPAT_READONLY
+};
+
+/**
+ * Try to get journal super block if any
+ */
+static int get_journal_sb(ext2_filsys jfs, char buf[SUPERBLOCK_SIZE])
+{
+ int retval;
+ journal_superblock_t *jsb;
+
+ if (!ext2fs_has_feature_journal_dev(jfs->super)) {
+ return EXT2_ET_UNSUPP_FEATURE;
+ }
+
+ /* Get the journal superblock */
+ if ((retval = io_channel_read_blk64(jfs->io,
+ ext2fs_journal_sb_start(jfs->blocksize), -SUPERBLOCK_SIZE, buf))) {
+ com_err(program_name, retval, "%s",
+ _("while reading journal superblock"));
+ return retval;
+ }
+
+ jsb = (journal_superblock_t *) buf;
+ if ((jsb->s_header.h_magic != (unsigned)ntohl(JBD2_MAGIC_NUMBER)) ||
+ (jsb->s_header.h_blocktype != (unsigned)ntohl(JBD2_SUPERBLOCK_V2))) {
+ fputs(_("Journal superblock not found!\n"), stderr);
+ return EXT2_ET_BAD_MAGIC;
+ }
+
+ return 0;
+}
+
+static __u8 *journal_user(__u8 uuid[UUID_SIZE], __u8 s_users[JBD2_USERS_SIZE],
+ int nr_users)
+{
+ int i;
+ for (i = 0; i < nr_users; i++) {
+ if (memcmp(uuid, &s_users[i * UUID_SIZE], UUID_SIZE) == 0)
+ return &s_users[i * UUID_SIZE];
+ }
+
+ return NULL;
+}
+
+/*
+ * Remove an external journal from the filesystem
+ */
+static int remove_journal_device(ext2_filsys fs)
+{
+ char *journal_path;
+ ext2_filsys jfs;
+ char buf[SUPERBLOCK_SIZE] __attribute__ ((aligned(8)));
+ journal_superblock_t *jsb;
+ int i, nr_users;
+ errcode_t retval;
+ int commit_remove_journal = 0;
+ io_manager io_ptr;
+
+ if (f_flag)
+ commit_remove_journal = 1; /* force removal even if error */
+
+ uuid_unparse(fs->super->s_journal_uuid, buf);
+ journal_path = blkid_get_devname(NULL, "UUID", buf);
+
+ if (!journal_path) {
+ journal_path =
+ ext2fs_find_block_device(fs->super->s_journal_dev);
+ if (!journal_path)
+ goto no_valid_journal;
+ }
+
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+#endif
+ io_ptr = unix_io_manager;
+ retval = ext2fs_open(journal_path, EXT2_FLAG_RW|
+ EXT2_FLAG_JOURNAL_DEV_OK, 0,
+ fs->blocksize, io_ptr, &jfs);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while trying to open external journal"));
+ goto no_valid_journal;
+ }
+
+ if ((retval = get_journal_sb(jfs, buf))) {
+ if (retval == EXT2_ET_UNSUPP_FEATURE)
+ fprintf(stderr, _("%s is not a journal device.\n"),
+ journal_path);
+ goto no_valid_journal;
+ }
+
+ jsb = (journal_superblock_t *) buf;
+ /* Find the filesystem UUID */
+ nr_users = ntohl(jsb->s_nr_users);
+ if (nr_users > JBD2_USERS_MAX) {
+ fprintf(stderr, _("Journal superblock is corrupted, nr_users\n"
+ "is too high (%d).\n"), nr_users);
+ commit_remove_journal = 1;
+ goto no_valid_journal;
+ }
+
+ if (!journal_user(fs->super->s_uuid, jsb->s_users, nr_users)) {
+ fputs(_("Filesystem's UUID not found on journal device.\n"),
+ stderr);
+ commit_remove_journal = 1;
+ goto no_valid_journal;
+ }
+ nr_users--;
+ for (i = 0; i < nr_users; i++)
+ memcpy(&jsb->s_users[i * 16], &jsb->s_users[(i + 1) * 16], 16);
+ jsb->s_nr_users = htonl(nr_users);
+
+ /* Write back the journal superblock */
+ retval = io_channel_write_blk64(jfs->io,
+ ext2fs_journal_sb_start(fs->blocksize),
+ -SUPERBLOCK_SIZE, buf);
+ if (retval) {
+ com_err(program_name, retval,
+ "while writing journal superblock.");
+ goto no_valid_journal;
+ }
+
+ commit_remove_journal = 1;
+
+no_valid_journal:
+ if (commit_remove_journal == 0) {
+ fputs(_("Cannot locate journal device. It was NOT removed\n"
+ "Use -f option to remove missing journal device.\n"),
+ stderr);
+ return 1;
+ }
+ fs->super->s_journal_dev = 0;
+ memset(fs->super->s_jnl_blocks, 0, sizeof(fs->super->s_jnl_blocks));
+ uuid_clear(fs->super->s_journal_uuid);
+ ext2fs_mark_super_dirty(fs);
+ fputs(_("Journal removed\n"), stdout);
+ free(journal_path);
+
+ return 0;
+}
+
+/* Helper function for remove_journal_inode */
+static int release_blocks_proc(ext2_filsys fs, blk64_t *blocknr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *private EXT2FS_ATTR((unused)))
+{
+ blk64_t block;
+ int group;
+
+ block = *blocknr;
+ ext2fs_unmark_block_bitmap2(fs->block_map, block);
+ group = ext2fs_group_of_blk2(fs, block);
+ ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group) + 1);
+ ext2fs_group_desc_csum_set(fs, group);
+ ext2fs_free_blocks_count_add(fs->super, EXT2FS_CLUSTER_RATIO(fs));
+ return 0;
+}
+
+/*
+ * Remove the journal inode from the filesystem
+ */
+static errcode_t remove_journal_inode(ext2_filsys fs)
+{
+ struct ext2_inode inode;
+ errcode_t retval;
+ ext2_ino_t ino = fs->super->s_journal_inum;
+
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while reading journal inode"));
+ return retval;
+ }
+ if (ino == EXT2_JOURNAL_INO) {
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while reading bitmaps"));
+ return retval;
+ }
+ retval = ext2fs_block_iterate3(fs, ino,
+ BLOCK_FLAG_READ_ONLY, NULL,
+ release_blocks_proc, NULL);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while clearing journal inode"));
+ return retval;
+ }
+ fs->super->s_overhead_clusters -=
+ EXT2FS_NUM_B2C(fs, EXT2_I_SIZE(&inode) / fs->blocksize);
+ memset(&inode, 0, sizeof(inode));
+ ext2fs_mark_bb_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ } else
+ inode.i_flags &= ~EXT2_IMMUTABLE_FL;
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while writing journal inode"));
+ return retval;
+ }
+ fs->super->s_journal_inum = 0;
+ memset(fs->super->s_jnl_blocks, 0, sizeof(fs->super->s_jnl_blocks));
+ ext2fs_mark_super_dirty(fs);
+
+ return 0;
+}
+
+/*
+ * Update the default mount options
+ */
+static int update_mntopts(ext2_filsys fs, char *mntopts)
+{
+ struct ext2_super_block *sb = fs->super;
+
+ if (e2p_edit_mntopts(mntopts, &sb->s_default_mount_opts, ~0)) {
+ fprintf(stderr, _("Invalid mount option set: %s\n"),
+ mntopts);
+ return 1;
+ }
+ ext2fs_mark_super_dirty(fs);
+
+ return 0;
+}
+
+static int check_fsck_needed(ext2_filsys fs, const char *prompt)
+{
+ /* Refuse to modify anything but a freshly checked valid filesystem. */
+ if (!(fs->super->s_state & EXT2_VALID_FS) ||
+ (fs->super->s_state & EXT2_ERROR_FS) ||
+ (fs->super->s_lastcheck < fs->super->s_mtime)) {
+ puts(_(fsck_explain));
+ puts(_(please_fsck));
+ if (mount_flags & EXT2_MF_READONLY)
+ printf("%s", _("(and reboot afterwards!)\n"));
+ return 1;
+ }
+
+ /* Give the admin a few seconds to bail out of a dangerous op. */
+ if (!getenv("TUNE2FS_FORCE_PROMPT") && (!isatty(0) || !isatty(1)))
+ return 0;
+
+ puts(prompt);
+ proceed_question(5);
+
+ return 0;
+}
+
+static void request_dir_fsck_afterwards(ext2_filsys fs)
+{
+ static int requested;
+
+ if (requested++)
+ return;
+ fsck_requested++;
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ puts(_(fsck_explain));
+ puts(_(please_dir_fsck));
+ if (mount_flags & EXT2_MF_READONLY)
+ printf("%s", _("(and reboot afterwards!)\n"));
+}
+
+static void request_fsck_afterwards(ext2_filsys fs)
+{
+ static int requested = 0;
+
+ if (requested++)
+ return;
+ fsck_requested++;
+ fs->super->s_state &= ~EXT2_VALID_FS;
+ printf("\n%s\n", _(please_fsck));
+ if (mount_flags & EXT2_MF_READONLY)
+ printf("%s", _("(and reboot afterwards!)\n"));
+}
+
+static void convert_64bit(ext2_filsys fs, int direction)
+{
+ /*
+ * Is resize2fs going to demand a fsck run? Might as well tell the
+ * user now.
+ */
+ if (!fsck_requested &&
+ ((fs->super->s_state & EXT2_ERROR_FS) ||
+ !(fs->super->s_state & EXT2_VALID_FS) ||
+ fs->super->s_lastcheck < fs->super->s_mtime))
+ request_fsck_afterwards(fs);
+ if (fsck_requested)
+ fprintf(stderr, _("After running e2fsck, please run `resize2fs %s %s"),
+ direction > 0 ? "-b" : "-s", fs->device_name);
+ else
+ fprintf(stderr, _("Please run `resize2fs %s %s"),
+ direction > 0 ? "-b" : "-s", fs->device_name);
+
+ if (undo_file)
+ fprintf(stderr, _(" -z \"%s\""), undo_file);
+ if (direction > 0)
+ fprintf(stderr, _("' to enable 64-bit mode.\n"));
+ else
+ fprintf(stderr, _("' to disable 64-bit mode.\n"));
+}
+
+/*
+ * Rewrite directory blocks with checksums
+ */
+struct rewrite_dir_context {
+ char *buf;
+ errcode_t errcode;
+ ext2_ino_t dir;
+ int is_htree:1;
+ int clear_htree:1;
+};
+
+static int rewrite_dir_block(ext2_filsys fs,
+ blk64_t *blocknr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct ext2_dx_countlimit *dcl = NULL;
+ struct rewrite_dir_context *ctx = priv_data;
+ int dcl_offset, changed = 0;
+
+ ctx->errcode = ext2fs_read_dir_block4(fs, *blocknr, ctx->buf, 0,
+ ctx->dir);
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+
+ /*
+ * if htree node... Note that if we are clearing htree structures from
+ * the directory, we treat the htree internal block as an ordinary leaf.
+ * The code below will do the right thing and make space for checksum
+ * there.
+ */
+ if (ctx->is_htree && !ctx->clear_htree)
+ ext2fs_get_dx_countlimit(fs, (struct ext2_dir_entry *)ctx->buf,
+ &dcl, &dcl_offset);
+ if (dcl) {
+ if (!ext2fs_has_feature_metadata_csum(fs->super)) {
+ /* Ensure limit is the max size */
+ int max_entries = (fs->blocksize - dcl_offset) /
+ sizeof(struct ext2_dx_entry);
+ if (ext2fs_le16_to_cpu(dcl->limit) != max_entries) {
+ changed = 1;
+ dcl->limit = ext2fs_cpu_to_le16(max_entries);
+ }
+ } else {
+ /* If htree block is full then rebuild the dir */
+ if (ext2fs_le16_to_cpu(dcl->count) ==
+ ext2fs_le16_to_cpu(dcl->limit)) {
+ request_dir_fsck_afterwards(fs);
+ return 0;
+ }
+ /*
+ * Ensure dcl->limit is small enough to leave room for
+ * the checksum tail.
+ */
+ int max_entries = (fs->blocksize - (dcl_offset +
+ sizeof(struct ext2_dx_tail))) /
+ sizeof(struct ext2_dx_entry);
+ if (ext2fs_le16_to_cpu(dcl->limit) != max_entries)
+ dcl->limit = ext2fs_cpu_to_le16(max_entries);
+ /* Always rewrite checksum */
+ changed = 1;
+ }
+ } else {
+ unsigned int rec_len, name_size;
+ char *top = ctx->buf + fs->blocksize;
+ struct ext2_dir_entry *de = (struct ext2_dir_entry *)ctx->buf;
+ struct ext2_dir_entry *last_de = NULL, *penultimate_de = NULL;
+
+ /* Find last and penultimate dirent */
+ while ((char *)de < top) {
+ penultimate_de = last_de;
+ last_de = de;
+ ctx->errcode = ext2fs_get_rec_len(fs, de, &rec_len);
+ if (!ctx->errcode && !rec_len)
+ ctx->errcode = EXT2_ET_DIR_CORRUPTED;
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+ de = (struct ext2_dir_entry *)(((char *)de) + rec_len);
+ }
+ ctx->errcode = ext2fs_get_rec_len(fs, last_de, &rec_len);
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+ name_size = ext2fs_dirent_name_len(last_de);
+
+ if (!ext2fs_has_feature_metadata_csum(fs->super)) {
+ if (!penultimate_de)
+ return 0;
+ if (last_de->inode ||
+ name_size ||
+ rec_len != sizeof(struct ext2_dir_entry_tail))
+ return 0;
+ /*
+ * The last dirent is unused and the right length to
+ * have stored a checksum. Erase it.
+ */
+ ctx->errcode = ext2fs_get_rec_len(fs, penultimate_de,
+ &rec_len);
+ if (!rec_len)
+ ctx->errcode = EXT2_ET_DIR_CORRUPTED;
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+ ext2fs_set_rec_len(fs, rec_len +
+ sizeof(struct ext2_dir_entry_tail),
+ penultimate_de);
+ changed = 1;
+ } else {
+ unsigned csum_size = sizeof(struct ext2_dir_entry_tail);
+ struct ext2_dir_entry_tail *t;
+
+ /*
+ * If the last dirent looks like the tail, just update
+ * the checksum.
+ */
+ if (!last_de->inode &&
+ rec_len == csum_size) {
+ t = (struct ext2_dir_entry_tail *)last_de;
+ t->det_reserved_name_len =
+ EXT2_DIR_NAME_LEN_CSUM;
+ changed = 1;
+ goto out;
+ }
+ if (name_size & 3)
+ name_size = (name_size & ~3) + 4;
+ /* If there's not enough space for the tail, e2fsck */
+ if (rec_len <= (8 + name_size + csum_size)) {
+ request_dir_fsck_afterwards(fs);
+ return 0;
+ }
+ /* Shorten that last de and insert the tail */
+ ext2fs_set_rec_len(fs, rec_len - csum_size, last_de);
+ t = EXT2_DIRENT_TAIL(ctx->buf, fs->blocksize);
+ ext2fs_initialize_dirent_tail(fs, t);
+
+ /* Always update checksum */
+ changed = 1;
+ }
+ }
+
+out:
+ if (!changed)
+ return 0;
+
+ ctx->errcode = ext2fs_write_dir_block4(fs, *blocknr, ctx->buf,
+ 0, ctx->dir);
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+
+ return 0;
+}
+
+static errcode_t rewrite_directory(ext2_filsys fs, ext2_ino_t dir,
+ struct ext2_inode *inode)
+{
+ errcode_t retval;
+ struct rewrite_dir_context ctx;
+
+ retval = ext2fs_get_mem(fs->blocksize, &ctx.buf);
+ if (retval)
+ return retval;
+
+ ctx.is_htree = !!(inode->i_flags & EXT2_INDEX_FL);
+ ctx.clear_htree = !ext2fs_has_feature_dir_index(fs->super);
+ ctx.dir = dir;
+ ctx.errcode = 0;
+ retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_READ_ONLY |
+ BLOCK_FLAG_DATA_ONLY,
+ 0, rewrite_dir_block, &ctx);
+
+ ext2fs_free_mem(&ctx.buf);
+ if (retval)
+ return retval;
+
+ if (ctx.is_htree && ctx.clear_htree) {
+ inode->i_flags &= ~EXT2_INDEX_FL;
+ retval = ext2fs_write_inode(fs, dir, inode);
+ if (retval)
+ return retval;
+ }
+
+ return ctx.errcode;
+}
+
+/*
+ * Context information that does not change across rewrite_one_inode()
+ * invocations.
+ */
+struct rewrite_context {
+ ext2_filsys fs;
+ struct ext2_inode *zero_inode;
+ char *ea_buf;
+ int inode_size;
+};
+
+#define fatal_err(code, args...) \
+ do { \
+ com_err(__func__, code, args); \
+ exit(1); \
+ } while (0);
+
+static void update_ea_inode_hash(struct rewrite_context *ctx, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ errcode_t retval;
+ ext2_file_t file;
+ __u32 hash;
+
+ retval = ext2fs_file_open(ctx->fs, ino, 0, &file);
+ if (retval)
+ fatal_err(retval, "open ea_inode");
+ retval = ext2fs_file_read(file, ctx->ea_buf, inode->i_size,
+ NULL);
+ if (retval)
+ fatal_err(retval, "read ea_inode");
+ retval = ext2fs_file_close(file);
+ if (retval)
+ fatal_err(retval, "close ea_inode");
+
+ hash = ext2fs_crc32c_le(ctx->fs->csum_seed,
+ (unsigned char *) ctx->ea_buf, inode->i_size);
+ ext2fs_set_ea_inode_hash(inode, hash);
+}
+
+static int update_xattr_entry_hashes(ext2_filsys fs,
+ struct ext2_ext_attr_entry *entry,
+ struct ext2_ext_attr_entry *end)
+{
+ int modified = 0;
+ errcode_t retval;
+
+ while (entry < end && !EXT2_EXT_IS_LAST_ENTRY(entry)) {
+ if (entry->e_value_inum) {
+ retval = ext2fs_ext_attr_hash_entry2(fs, entry, NULL,
+ &entry->e_hash);
+ if (retval)
+ fatal_err(retval, "hash ea_inode entry");
+ modified = 1;
+ }
+ entry = EXT2_EXT_ATTR_NEXT(entry);
+ }
+ return modified;
+}
+
+static void update_inline_xattr_hashes(struct rewrite_context *ctx,
+ struct ext2_inode_large *inode)
+{
+ struct ext2_ext_attr_entry *start, *end;
+ __u32 *ea_magic;
+
+ if (inode->i_extra_isize == 0)
+ return;
+
+ if (inode->i_extra_isize & 3 ||
+ inode->i_extra_isize > ctx->inode_size - EXT2_GOOD_OLD_INODE_SIZE)
+ fatal_err(EXT2_ET_INODE_CORRUPTED, "bad i_extra_isize")
+
+ ea_magic = (__u32 *)((char *)inode + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize);
+ if (*ea_magic != EXT2_EXT_ATTR_MAGIC)
+ return;
+
+ start = (struct ext2_ext_attr_entry *)(ea_magic + 1);
+ end = (struct ext2_ext_attr_entry *)((char *)inode + ctx->inode_size);
+
+ update_xattr_entry_hashes(ctx->fs, start, end);
+}
+
+static void update_block_xattr_hashes(struct rewrite_context *ctx,
+ char *block_buf)
+{
+ struct ext2_ext_attr_header *header;
+ struct ext2_ext_attr_entry *start, *end;
+
+ header = (struct ext2_ext_attr_header *)block_buf;
+ if (header->h_magic != EXT2_EXT_ATTR_MAGIC)
+ return;
+
+ start = (struct ext2_ext_attr_entry *)(header+1);
+ end = (struct ext2_ext_attr_entry *)(block_buf + ctx->fs->blocksize);
+
+ if (update_xattr_entry_hashes(ctx->fs, start, end))
+ ext2fs_ext_attr_block_rehash(header, end);
+}
+
+static void rewrite_one_inode(struct rewrite_context *ctx, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ blk64_t file_acl_block;
+ errcode_t retval;
+
+ if (!ext2fs_test_inode_bitmap2(ctx->fs->inode_map, ino)) {
+ if (!memcmp(inode, ctx->zero_inode, ctx->inode_size))
+ return;
+ memset(inode, 0, ctx->inode_size);
+ }
+
+ if (inode->i_flags & EXT4_EA_INODE_FL)
+ update_ea_inode_hash(ctx, ino, inode);
+
+ if (ctx->inode_size != EXT2_GOOD_OLD_INODE_SIZE)
+ update_inline_xattr_hashes(ctx,
+ (struct ext2_inode_large *)inode);
+
+ retval = ext2fs_write_inode_full(ctx->fs, ino, inode, ctx->inode_size);
+ if (retval)
+ fatal_err(retval, "while writing inode");
+
+ retval = ext2fs_fix_extents_checksums(ctx->fs, ino, inode);
+ if (retval)
+ fatal_err(retval, "while rewriting extents");
+
+ if (LINUX_S_ISDIR(inode->i_mode) &&
+ ext2fs_inode_has_valid_blocks2(ctx->fs, inode)) {
+ retval = rewrite_directory(ctx->fs, ino, inode);
+ if (retval)
+ fatal_err(retval, "while rewriting directories");
+ }
+
+ file_acl_block = ext2fs_file_acl_block(ctx->fs, inode);
+ if (!file_acl_block)
+ return;
+
+ retval = ext2fs_read_ext_attr3(ctx->fs, file_acl_block, ctx->ea_buf,
+ ino);
+ if (retval)
+ fatal_err(retval, "while rewriting extended attribute");
+
+ update_block_xattr_hashes(ctx, ctx->ea_buf);
+ retval = ext2fs_write_ext_attr3(ctx->fs, file_acl_block, ctx->ea_buf,
+ ino);
+ if (retval)
+ fatal_err(retval, "while rewriting extended attribute");
+}
+
+#define REWRITE_EA_FL 0x01 /* Rewrite EA inodes */
+#define REWRITE_DIR_FL 0x02 /* Rewrite directories */
+#define REWRITE_NONDIR_FL 0x04 /* Rewrite other inodes */
+#define REWRITE_ALL (REWRITE_EA_FL | REWRITE_DIR_FL | REWRITE_NONDIR_FL)
+
+static void rewrite_inodes_pass(struct rewrite_context *ctx, unsigned int flags)
+{
+ ext2_inode_scan scan;
+ errcode_t retval;
+ ext2_ino_t ino;
+ struct ext2_inode *inode;
+ int rewrite;
+
+ retval = ext2fs_get_mem(ctx->inode_size, &inode);
+ if (retval)
+ fatal_err(retval, "while allocating memory");
+
+ retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);
+ if (retval)
+ fatal_err(retval, "while opening inode scan");
+
+ do {
+ retval = ext2fs_get_next_inode_full(scan, &ino, inode,
+ ctx->inode_size);
+ if (retval)
+ fatal_err(retval, "while getting next inode");
+ if (!ino)
+ break;
+
+ rewrite = 0;
+ if (inode->i_flags & EXT4_EA_INODE_FL) {
+ if (flags & REWRITE_EA_FL)
+ rewrite = 1;
+ } else if (LINUX_S_ISDIR(inode->i_mode)) {
+ if (flags & REWRITE_DIR_FL)
+ rewrite = 1;
+ } else {
+ if (flags & REWRITE_NONDIR_FL)
+ rewrite = 1;
+ }
+ if (rewrite)
+ rewrite_one_inode(ctx, ino, inode);
+ } while (ino);
+ ext2fs_close_inode_scan(scan);
+ ext2fs_free_mem(&inode);
+}
+
+/*
+ * Forcibly rewrite checksums in inodes specified by 'flags'
+ */
+static void rewrite_inodes(ext2_filsys fs, unsigned int flags)
+{
+ struct rewrite_context ctx = {
+ .fs = fs,
+ .inode_size = EXT2_INODE_SIZE(fs->super),
+ };
+ errcode_t retval;
+
+ if (fs->super->s_creator_os == EXT2_OS_HURD)
+ return;
+
+ retval = ext2fs_get_memzero(ctx.inode_size, &ctx.zero_inode);
+ if (retval)
+ fatal_err(retval, "while allocating memory");
+
+ retval = ext2fs_get_mem(64 * 1024, &ctx.ea_buf);
+ if (retval)
+ fatal_err(retval, "while allocating memory");
+
+ /*
+ * Extended attribute inodes have a lookup hash that needs to be
+ * recalculated with the new csum_seed. Other inodes referencing xattr
+ * inodes need this value to be up to date. That's why we do two passes:
+ *
+ * pass 1: update xattr inodes to update their lookup hash as well as
+ * other checksums.
+ *
+ * pass 2: go over other inodes to update their checksums.
+ */
+ if (ext2fs_has_feature_ea_inode(fs->super) && (flags & REWRITE_EA_FL))
+ rewrite_inodes_pass(&ctx, REWRITE_EA_FL);
+ flags &= ~REWRITE_EA_FL;
+ rewrite_inodes_pass(&ctx, flags);
+
+ ext2fs_free_mem(&ctx.zero_inode);
+ ext2fs_free_mem(&ctx.ea_buf);
+}
+
+static errcode_t rewrite_metadata_checksums(ext2_filsys fs, unsigned int flags)
+{
+ errcode_t retval;
+ dgrp_t i;
+
+ fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ ext2fs_init_csum_seed(fs);
+ for (i = 0; i < fs->group_desc_count; i++)
+ ext2fs_group_desc_csum_set(fs, i);
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval)
+ fatal_err(retval, "while reading bitmaps");
+ rewrite_inodes(fs, flags);
+ ext2fs_mark_ib_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ retval = ext2fs_mmp_update2(fs, 1);
+ if (retval)
+ return retval;
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ fs->super->s_checksum_type = EXT2_CRC32C_CHKSUM;
+ else
+ fs->super->s_checksum_type = 0;
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
+
+static void enable_uninit_bg(ext2_filsys fs)
+{
+ struct ext2_group_desc *gd;
+ dgrp_t i;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ gd = ext2fs_group_desc(fs, fs->group_desc, i);
+ gd->bg_itable_unused = 0;
+ gd->bg_flags = EXT2_BG_INODE_ZEROED;
+ ext2fs_group_desc_csum_set(fs, i);
+ }
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+}
+
+static errcode_t zero_empty_inodes(ext2_filsys fs)
+{
+ int length = EXT2_INODE_SIZE(fs->super);
+ struct ext2_inode *inode = NULL;
+ ext2_inode_scan scan;
+ errcode_t retval;
+ ext2_ino_t ino;
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval)
+ goto out;
+
+ retval = ext2fs_get_mem(length, &inode);
+ if (retval)
+ goto out;
+
+ do {
+ retval = ext2fs_get_next_inode_full(scan, &ino, inode, length);
+ if (retval)
+ goto out;
+ if (!ino)
+ break;
+ if (!ext2fs_test_inode_bitmap2(fs->inode_map, ino)) {
+ memset(inode, 0, length);
+ retval = ext2fs_write_inode_full(fs, ino, inode,
+ length);
+ if (retval)
+ goto out;
+ }
+ } while (1);
+
+out:
+ ext2fs_free_mem(&inode);
+ ext2fs_close_inode_scan(scan);
+ return retval;
+}
+
+static int has_casefold_inode(ext2_filsys fs)
+{
+ int length = EXT2_INODE_SIZE(fs->super);
+ struct ext2_inode *inode = NULL;
+ ext2_inode_scan scan;
+ errcode_t retval;
+ ext2_ino_t ino;
+ int found_casefold = 0;
+
+ retval = ext2fs_get_mem(length, &inode);
+ if (retval)
+ fatal_err(retval, "while allocating memory");
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval)
+ fatal_err(retval, "while opening inode scan");
+
+ do {
+ retval = ext2fs_get_next_inode_full(scan, &ino, inode, length);
+ if (retval)
+ fatal_err(retval, "while getting next inode");
+ if (!ino)
+ break;
+
+ if(inode->i_flags & EXT4_CASEFOLD_FL) {
+ found_casefold = 1;
+ break;
+ }
+ } while(1);
+
+ ext2fs_free_mem(&inode);
+ ext2fs_close_inode_scan(scan);
+ return found_casefold;
+}
+
+static errcode_t disable_uninit_bg(ext2_filsys fs, __u32 csum_feature_flag)
+{
+ struct ext2_group_desc *gd;
+ dgrp_t i;
+ errcode_t retval;
+ blk64_t b, c, d;
+
+ /* Load bitmaps to ensure that the uninit ones get written out */
+ fs->super->s_feature_ro_compat |= csum_feature_flag;
+ retval = ext2fs_read_bitmaps(fs);
+ fs->super->s_feature_ro_compat &= ~csum_feature_flag;
+ if (retval) {
+ com_err("disable_uninit_bg", retval,
+ "while reading bitmaps");
+ request_fsck_afterwards(fs);
+ return retval;
+ }
+ ext2fs_mark_ib_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+
+ /* If we're only turning off uninit_bg, zero the inodes */
+ if (csum_feature_flag == EXT4_FEATURE_RO_COMPAT_GDT_CSUM) {
+ retval = zero_empty_inodes(fs);
+ if (retval) {
+ com_err("disable_uninit_bg", retval,
+ "while zeroing unused inodes");
+ request_fsck_afterwards(fs);
+ return retval;
+ }
+ }
+
+ /* The bbitmap is zeroed; we must mark group metadata blocks in use */
+ for (i = 0; i < fs->group_desc_count; i++) {
+ b = ext2fs_block_bitmap_loc(fs, i);
+ ext2fs_mark_block_bitmap2(fs->block_map, b);
+ b = ext2fs_inode_bitmap_loc(fs, i);
+ ext2fs_mark_block_bitmap2(fs->block_map, b);
+
+ retval = ext2fs_super_and_bgd_loc2(fs, i, &b, &c, &d, NULL);
+ if (retval == 0 && b)
+ ext2fs_mark_block_bitmap2(fs->block_map, b);
+ if (retval == 0 && c)
+ ext2fs_mark_block_bitmap2(fs->block_map, c);
+ if (retval == 0 && d)
+ ext2fs_mark_block_bitmap2(fs->block_map, d);
+ if (retval) {
+ com_err("disable_uninit_bg", retval,
+ "while initializing block bitmaps");
+ request_fsck_afterwards(fs);
+ }
+
+ gd = ext2fs_group_desc(fs, fs->group_desc, i);
+ gd->bg_itable_unused = 0;
+ gd->bg_flags = 0;
+ ext2fs_group_desc_csum_set(fs, i);
+ }
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ ext2fs_mark_super_dirty(fs);
+
+ return 0;
+}
+
+static void
+try_confirm_csum_seed_support(void)
+{
+ if (access("/sys/fs/ext4/features/metadata_csum_seed", R_OK))
+ fputs(_("WARNING: Could not confirm kernel support for "
+ "metadata_csum_seed.\n This requires Linux >= "
+ "v4.4.\n"), stderr);
+}
+
+/*
+ * Update the feature set as provided by the user.
+ */
+static int update_feature_set(ext2_filsys fs, char *features)
+{
+ struct ext2_super_block *sb = fs->super;
+ __u32 old_features[3];
+ int type_err;
+ unsigned int mask_err;
+ errcode_t err;
+ enum quota_type qtype;
+
+#define FEATURE_ON(type, mask) (!(old_features[(type)] & (mask)) && \
+ ((&sb->s_feature_compat)[(type)] & (mask)))
+#define FEATURE_OFF(type, mask) ((old_features[(type)] & (mask)) && \
+ !((&sb->s_feature_compat)[(type)] & (mask)))
+#define FEATURE_CHANGED(type, mask) ((mask) & \
+ (old_features[(type)] ^ (&sb->s_feature_compat)[(type)]))
+
+ old_features[E2P_FEATURE_COMPAT] = sb->s_feature_compat;
+ old_features[E2P_FEATURE_INCOMPAT] = sb->s_feature_incompat;
+ old_features[E2P_FEATURE_RO_INCOMPAT] = sb->s_feature_ro_compat;
+
+ if (e2p_edit_feature2(features, &sb->s_feature_compat,
+ ok_features, clear_ok_features,
+ &type_err, &mask_err)) {
+ if (!mask_err)
+ fprintf(stderr,
+ _("Invalid filesystem option set: %s\n"),
+ features);
+ else if (type_err & E2P_FEATURE_NEGATE_FLAG)
+ fprintf(stderr, _("Clearing filesystem feature '%s' "
+ "not supported.\n"),
+ e2p_feature2string(type_err &
+ E2P_FEATURE_TYPE_MASK,
+ mask_err));
+ else
+ fprintf(stderr, _("Setting filesystem feature '%s' "
+ "not supported.\n"),
+ e2p_feature2string(type_err, mask_err));
+ return 1;
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_COMPAT, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
+ if ((mount_flags & EXT2_MF_MOUNTED) &&
+ !(mount_flags & EXT2_MF_READONLY)) {
+ fputs(_("The has_journal feature may only be "
+ "cleared when the filesystem is\n"
+ "unmounted or mounted "
+ "read-only.\n"), stderr);
+ return 1;
+ }
+ if (ext2fs_has_feature_journal_needs_recovery(sb) &&
+ f_flag < 2) {
+ fputs(_("The needs_recovery flag is set. "
+ "Please run e2fsck before clearing\n"
+ "the has_journal flag.\n"), stderr);
+ return 1;
+ }
+ if (sb->s_journal_inum) {
+ if (remove_journal_inode(fs))
+ return 1;
+ }
+ if (sb->s_journal_dev) {
+ if (remove_journal_device(fs))
+ return 1;
+ }
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_COMPAT, EXT4_FEATURE_COMPAT_ORPHAN_FILE)) {
+ ext2_ino_t ino;
+
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("The orphan_file feature may only be cleared "
+ "when the filesystem is unmounted.\n"), stderr);
+ return 1;
+ }
+ if (ext2fs_has_feature_orphan_present(sb) && f_flag < 2) {
+ fputs(_("The orphan_present feature is set. Please "
+ "run e2fsck before clearing orphan_file "
+ "feature.\n"),
+ stderr);
+ return 1;
+ }
+ err = ext2fs_read_bitmaps(fs);
+ if (err) {
+ com_err(program_name, err, "%s",
+ _("while loading bitmaps"));
+ return 1;
+ }
+ err = ext2fs_truncate_orphan_file(fs);
+ if (err) {
+ com_err(program_name, err,
+ _("\n\twhile trying to delete orphan file\n"));
+ return 1;
+ }
+ ino = sb->s_orphan_file_inum;
+ sb->s_orphan_file_inum = 0;
+ ext2fs_inode_alloc_stats2(fs, ino, -1, 0);
+ ext2fs_clear_feature_orphan_file(sb);
+ ext2fs_clear_feature_orphan_present(sb);
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_COMPAT, EXT4_FEATURE_COMPAT_ORPHAN_FILE)) {
+ if (!ext2fs_has_feature_journal(sb)) {
+ fputs(_("orphan_file feature can be set only for "
+ "filesystems with journal.\n"), stderr);
+ return 1;
+ }
+ /*
+ * If adding an orphan file, let the create orphan file
+ * code below handle setting the flag and creating it.
+ * We supply a default size if necessary.
+ */
+ orphan_file_blocks = ext2fs_default_orphan_file_blocks(fs);
+ ext2fs_set_feature_orphan_file(sb);
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_RO_INCOMPAT,
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
+ if (ext2fs_has_feature_meta_bg(sb)) {
+ fputs(_("Setting filesystem feature 'sparse_super' "
+ "not supported\nfor filesystems with "
+ "the meta_bg feature enabled.\n"),
+ stderr);
+ return 1;
+ }
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_MMP)) {
+ int error;
+
+ if ((mount_flags & EXT2_MF_MOUNTED) ||
+ (mount_flags & EXT2_MF_READONLY)) {
+ fputs(_("The multiple mount protection feature can't\n"
+ "be set if the filesystem is mounted or\n"
+ "read-only.\n"), stderr);
+ return 1;
+ }
+
+ error = ext2fs_mmp_init(fs);
+ if (error) {
+ fputs(_("\nError while enabling multiple mount "
+ "protection feature."), stderr);
+ return 1;
+ }
+
+ /*
+ * We want to update group desc with the new free blocks count
+ */
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+
+ printf(_("Multiple mount protection has been enabled "
+ "with update interval %ds.\n"),
+ sb->s_mmp_update_interval);
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_MMP)) {
+ int error;
+
+ if (mount_flags & EXT2_MF_READONLY) {
+ fputs(_("The multiple mount protection feature cannot\n"
+ "be disabled if the filesystem is readonly.\n"),
+ stderr);
+ return 1;
+ }
+
+ error = ext2fs_read_bitmaps(fs);
+ if (error) {
+ fputs(_("Error while reading bitmaps\n"), stderr);
+ return 1;
+ }
+
+ error = ext2fs_mmp_read(fs, sb->s_mmp_block, NULL);
+ if (error) {
+ struct mmp_struct *mmp_cmp = fs->mmp_cmp;
+
+ if (error == EXT2_ET_MMP_MAGIC_INVALID)
+ printf(_("Magic number in MMP block does not "
+ "match. expected: %x, actual: %x\n"),
+ EXT4_MMP_MAGIC, mmp_cmp->mmp_magic);
+ else
+ com_err(program_name, error, "%s",
+ _("while reading MMP block."));
+ goto mmp_error;
+ }
+
+ /* We need to force out the group descriptors as well */
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ ext2fs_block_alloc_stats2(fs, sb->s_mmp_block, -1);
+mmp_error:
+ sb->s_mmp_block = 0;
+ sb->s_mmp_update_interval = 0;
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_COMPAT, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
+ /*
+ * If adding a journal flag, let the create journal
+ * code below handle setting the flag and creating the
+ * journal. We supply a default size if necessary.
+ */
+ if (!journal_size)
+ journal_size = -1;
+ ext2fs_clear_feature_journal(sb);
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_DIR_INDEX)) {
+ if (!sb->s_def_hash_version)
+ sb->s_def_hash_version = EXT2_HASH_HALF_MD4;
+ if (uuid_is_null((unsigned char *) sb->s_hash_seed))
+ uuid_generate((unsigned char *) sb->s_hash_seed);
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_DIR_INDEX) &&
+ ext2fs_has_feature_metadata_csum(sb)) {
+ if (check_fsck_needed(fs,
+ _("Disabling directory index on filesystem with "
+ "checksums could take some time.")))
+ return 1;
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("Cannot disable dir_index on a mounted "
+ "filesystem!\n"), stderr);
+ exit(1);
+ }
+ /*
+ * Clearing dir_index on checksummed filesystem requires
+ * rewriting all directories to update checksums.
+ */
+ rewrite_checksums |= REWRITE_DIR_FL;
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
+ if (ext2fs_check_desc(fs)) {
+ fputs(_("Clearing the flex_bg flag would "
+ "cause the the filesystem to be\n"
+ "inconsistent.\n"), stderr);
+ return 1;
+ }
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) {
+ if ((mount_flags & EXT2_MF_MOUNTED) &&
+ !(mount_flags & EXT2_MF_READONLY)) {
+ fputs(_("The huge_file feature may only be "
+ "cleared when the filesystem is\n"
+ "unmounted or mounted "
+ "read-only.\n"), stderr);
+ return 1;
+ }
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) {
+ if (check_fsck_needed(fs,
+ _("Enabling checksums could take some time.")))
+ return 1;
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("Cannot enable metadata_csum on a mounted "
+ "filesystem!\n"), stderr);
+ return 1;
+ }
+ if (!ext2fs_has_feature_extents(fs->super))
+ printf("%s",
+ _("Extents are not enabled. The file extent "
+ "tree can be checksummed, whereas block maps "
+ "cannot. Not enabling extents reduces the "
+ "coverage of metadata checksumming. "
+ "Re-run with -O extent to rectify.\n"));
+ if (!ext2fs_has_feature_64bit(fs->super))
+ printf("%s",
+ _("64-bit filesystem support is not enabled. "
+ "The larger fields afforded by this feature "
+ "enable full-strength checksumming. "
+ "Run resize2fs -b to rectify.\n"));
+ rewrite_checksums = REWRITE_ALL;
+ /* metadata_csum supersedes uninit_bg */
+ ext2fs_clear_feature_gdt_csum(fs->super);
+
+ /* if uninit_bg was previously off, rewrite group desc */
+ if (!(old_features[E2P_FEATURE_RO_INCOMPAT] &
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+ enable_uninit_bg(fs);
+
+ /*
+ * Since metadata_csum supersedes uninit_bg, pretend like
+ * uninit_bg has been off all along.
+ */
+ old_features[E2P_FEATURE_RO_INCOMPAT] &=
+ ~EXT4_FEATURE_RO_COMPAT_GDT_CSUM;
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) {
+ __u32 test_features[3];
+
+ if (check_fsck_needed(fs,
+ _("Disabling checksums could take some time.")))
+ return 1;
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("Cannot disable metadata_csum on a mounted "
+ "filesystem!\n"), stderr);
+ return 1;
+ }
+ rewrite_checksums = REWRITE_ALL;
+
+ /* Enable uninit_bg unless the user expressly turned it off */
+ memcpy(test_features, old_features, sizeof(test_features));
+ test_features[E2P_FEATURE_RO_INCOMPAT] |=
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM;
+ e2p_edit_feature2(features, test_features, ok_features,
+ clear_ok_features, NULL, NULL);
+ if (test_features[E2P_FEATURE_RO_INCOMPAT] &
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM)
+ ext2fs_set_feature_gdt_csum(fs->super);
+
+ /*
+ * If we're turning off metadata_csum and not turning on
+ * uninit_bg, rewrite group desc.
+ */
+ if (!ext2fs_has_feature_gdt_csum(fs->super)) {
+ err = disable_uninit_bg(fs,
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM);
+ if (err)
+ return 1;
+ } else
+ /*
+ * metadata_csum previously provided uninit_bg, so if
+ * we're also setting the uninit_bg feature bit,
+ * pretend like it was previously enabled. Checksums
+ * will be rewritten with crc16 later.
+ */
+ old_features[E2P_FEATURE_RO_INCOMPAT] |=
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM;
+ fs->super->s_checksum_seed = 0;
+ ext2fs_clear_feature_csum_seed(fs->super);
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("Cannot enable uninit_bg on a mounted "
+ "filesystem!\n"), stderr);
+ return 1;
+ }
+
+ /* Do not enable uninit_bg when metadata_csum enabled */
+ if (ext2fs_has_feature_metadata_csum(fs->super))
+ ext2fs_clear_feature_gdt_csum(fs->super);
+ else
+ enable_uninit_bg(fs);
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("Cannot disable uninit_bg on a mounted "
+ "filesystem!\n"), stderr);
+ return 1;
+ }
+
+ err = disable_uninit_bg(fs,
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+ if (err)
+ return 1;
+ }
+
+ /*
+ * We don't actually toggle 64bit; resize2fs does that. But this
+ * must come after the metadata_csum feature_on so that it won't
+ * complain about the lack of 64bit.
+ */
+ if (FEATURE_ON(E2P_FEATURE_INCOMPAT,
+ EXT4_FEATURE_INCOMPAT_64BIT)) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fprintf(stderr, _("Cannot enable 64-bit mode "
+ "while mounted!\n"));
+ return 1;
+ }
+ ext2fs_clear_feature_64bit(sb);
+ feature_64bit = 1;
+ }
+ if (FEATURE_OFF(E2P_FEATURE_INCOMPAT,
+ EXT4_FEATURE_INCOMPAT_64BIT)) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fprintf(stderr, _("Cannot disable 64-bit mode "
+ "while mounted!\n"));
+ return 1;
+ }
+ ext2fs_set_feature_64bit(sb);
+ feature_64bit = -1;
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_QUOTA)) {
+ /*
+ * Set the Q_flag here and handle the quota options in the code
+ * below.
+ */
+ if (!Q_flag) {
+ Q_flag = 1;
+ /* Enable usr/grp quota by default */
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (qtype != PRJQUOTA)
+ quota_enable[qtype] = QOPT_ENABLE;
+ else
+ quota_enable[qtype] = QOPT_DISABLE;
+ }
+ }
+ ext2fs_clear_feature_quota(sb);
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_PROJECT)) {
+ if (fs->super->s_inode_size == EXT2_GOOD_OLD_INODE_SIZE) {
+ fprintf(stderr, _("Cannot enable project feature; "
+ "inode size too small.\n"));
+ return 1;
+ }
+ Q_flag = 1;
+ quota_enable[PRJQUOTA] = QOPT_ENABLE;
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_PROJECT)) {
+ Q_flag = 1;
+ quota_enable[PRJQUOTA] = QOPT_DISABLE;
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_QUOTA)) {
+ /*
+ * Set the Q_flag here and handle the quota options in the code
+ * below.
+ */
+ if (Q_flag)
+ fputs(_("\nWarning: '^quota' option overrides '-Q'"
+ "arguments.\n"), stderr);
+ Q_flag = 1;
+ /* Disable all quota by default */
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++)
+ quota_enable[qtype] = QOPT_DISABLE;
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_ENCRYPT)) {
+ fs->super->s_encrypt_algos[0] =
+ EXT4_ENCRYPTION_MODE_AES_256_XTS;
+ fs->super->s_encrypt_algos[1] =
+ EXT4_ENCRYPTION_MODE_AES_256_CTS;
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CASEFOLD)) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("The casefold feature may only be enabled when "
+ "the filesystem is unmounted.\n"), stderr);
+ return 1;
+ }
+ fs->super->s_encoding = EXT4_ENC_UTF8_12_1;
+ fs->super->s_encoding_flags = e2p_get_encoding_flags(EXT4_ENC_UTF8_12_1);
+ enabling_casefold = 1;
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CASEFOLD)) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("The casefold feature may only be disabled when "
+ "the filesystem is unmounted.\n"), stderr);
+ return 1;
+ }
+ if (has_casefold_inode(fs)) {
+ fputs(_("The casefold feature can't be cleared when "
+ "there are inodes with +F flag.\n"), stderr);
+ return 1;
+ }
+ fs->super->s_encoding = 0;
+ fs->super->s_encoding_flags = 0;
+ enabling_casefold = 0;
+ }
+
+ if (FEATURE_ON(E2P_FEATURE_INCOMPAT,
+ EXT4_FEATURE_INCOMPAT_CSUM_SEED)) {
+ if (!ext2fs_has_feature_metadata_csum(sb)) {
+ fputs(_("Setting feature 'metadata_csum_seed' "
+ "is only supported\non filesystems with "
+ "the metadata_csum feature enabled.\n"),
+ stderr);
+ return 1;
+ }
+ try_confirm_csum_seed_support();
+ fs->super->s_checksum_seed = fs->csum_seed;
+ }
+
+ if (FEATURE_OFF(E2P_FEATURE_INCOMPAT,
+ EXT4_FEATURE_INCOMPAT_CSUM_SEED)) {
+ __le32 uuid_seed;
+
+ uuid_seed = ext2fs_crc32c_le(~0, fs->super->s_uuid,
+ sizeof(fs->super->s_uuid));
+ if (fs->super->s_checksum_seed != uuid_seed) {
+ if (mount_flags & (EXT2_MF_BUSY|EXT2_MF_MOUNTED)) {
+ fputs(_("UUID has changed since enabling "
+ "metadata_csum. Filesystem must be unmounted "
+ "\nto safely rewrite all metadata to match the new UUID.\n"),
+ stderr);
+ return 1;
+ }
+ if (check_fsck_needed(fs, _("Recalculating checksums "
+ "could take some time.")))
+ return 1;
+ rewrite_checksums = REWRITE_ALL;
+ }
+ }
+
+ if (sb->s_rev_level == EXT2_GOOD_OLD_REV &&
+ (sb->s_feature_compat || sb->s_feature_ro_compat ||
+ sb->s_feature_incompat))
+ ext2fs_update_dynamic_rev(fs);
+
+ if (FEATURE_CHANGED(E2P_FEATURE_RO_INCOMPAT,
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) ||
+ FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+ EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ||
+ FEATURE_CHANGED(E2P_FEATURE_INCOMPAT,
+ EXT2_FEATURE_INCOMPAT_FILETYPE) ||
+ FEATURE_CHANGED(E2P_FEATURE_COMPAT,
+ EXT2_FEATURE_COMPAT_RESIZE_INODE) ||
+ FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE))
+ request_fsck_afterwards(fs);
+
+ if ((old_features[E2P_FEATURE_COMPAT] != sb->s_feature_compat) ||
+ (old_features[E2P_FEATURE_INCOMPAT] != sb->s_feature_incompat) ||
+ (old_features[E2P_FEATURE_RO_INCOMPAT] != sb->s_feature_ro_compat))
+ ext2fs_mark_super_dirty(fs);
+
+ return 0;
+}
+
+/*
+ * Add a journal to the filesystem.
+ */
+static int add_journal(ext2_filsys fs)
+{
+ struct ext2fs_journal_params jparams;
+ errcode_t retval;
+ ext2_filsys jfs;
+ io_manager io_ptr;
+
+ if (ext2fs_has_feature_journal(fs->super)) {
+ fputs(_("The filesystem already has a journal.\n"), stderr);
+ goto err;
+ }
+ if (journal_device) {
+ if (!check_plausibility(journal_device, CHECK_BLOCK_DEV,
+ NULL))
+ proceed_question(-1);
+ check_mount(journal_device, 0, _("journal"));
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+#endif
+ io_ptr = unix_io_manager;
+ retval = ext2fs_open(journal_device, EXT2_FLAG_RW|
+ EXT2_FLAG_JOURNAL_DEV_OK, 0,
+ fs->blocksize, io_ptr, &jfs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("\n\twhile trying to open journal on %s\n"),
+ journal_device);
+ goto err;
+ }
+ printf(_("Creating journal on device %s: "),
+ journal_device);
+ fflush(stdout);
+
+ retval = ext2fs_add_journal_device(fs, jfs);
+ ext2fs_close_free(&jfs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while adding filesystem to journal on %s"),
+ journal_device);
+ goto err;
+ }
+ fputs(_("done\n"), stdout);
+ } else if (journal_size) {
+ fputs(_("Creating journal inode: "), stdout);
+ fflush(stdout);
+ figure_journal_size(&jparams, journal_size, journal_fc_size, fs);
+
+ if (journal_location_string)
+ journal_location =
+ parse_num_blocks2(journal_location_string,
+ fs->super->s_log_block_size);
+ retval = ext2fs_add_journal_inode3(fs, &jparams,
+ journal_location,
+ journal_flags);
+ if (retval) {
+ fprintf(stderr, "\n");
+ com_err(program_name, retval, "%s",
+ _("\n\twhile trying to create journal file"));
+ return retval;
+ }
+ fs->super->s_overhead_clusters += EXT2FS_NUM_B2C(fs,
+ jparams.num_journal_blocks + jparams.num_fc_blocks);
+ ext2fs_mark_super_dirty(fs);
+ fputs(_("done\n"), stdout);
+
+ /*
+ * If the filesystem wasn't mounted, we need to force
+ * the block group descriptors out.
+ */
+ if ((mount_flags & EXT2_MF_MOUNTED) == 0)
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ }
+ print_check_message(fs->super->s_max_mnt_count,
+ fs->super->s_checkinterval);
+ return 0;
+
+err:
+ free(journal_device);
+ return 1;
+}
+
+static int handle_quota_options(ext2_filsys fs)
+{
+ errcode_t retval;
+ quota_ctx_t qctx;
+ ext2_ino_t qf_ino;
+ enum quota_type qtype;
+ unsigned int qtype_bits = 0;
+ int need_dirty = 0;
+
+ for (qtype = 0 ; qtype < MAXQUOTAS; qtype++)
+ if (quota_enable[qtype] != 0)
+ break;
+ if (qtype == MAXQUOTAS)
+ /* Nothing to do. */
+ return 0;
+
+ if (quota_enable[PRJQUOTA] == QOPT_ENABLE &&
+ fs->super->s_inode_size == EXT2_GOOD_OLD_INODE_SIZE) {
+ fprintf(stderr, _("Cannot enable project quota; "
+ "inode size too small.\n"));
+ return 1;
+ }
+
+ for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+ if (quota_enable[qtype] == QOPT_ENABLE)
+ qtype_bits |= 1 << qtype;
+ }
+
+ retval = quota_init_context(&qctx, fs, qtype_bits);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while initializing quota context in support library"));
+ return 1;
+ }
+
+ if (qtype_bits)
+ quota_compute_usage(qctx);
+
+ for (qtype = 0 ; qtype < MAXQUOTAS; qtype++) {
+ if (quota_enable[qtype] == QOPT_ENABLE &&
+ *quota_sb_inump(fs->super, qtype) == 0) {
+ if ((qf_ino = quota_file_exists(fs, qtype)) > 0) {
+ retval = quota_read_all_dquots(qctx, qf_ino,
+ qtype,
+ QREAD_LIMITS);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while updating quota limits (%d)"),
+ qtype);
+ quota_errout:
+ quota_release_context(&qctx);
+ return 1;
+ }
+ }
+ retval = quota_write_inode(qctx, 1 << qtype);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while writing quota file (%d)"),
+ qtype);
+ goto quota_errout;
+ }
+ /* Enable Quota feature if one of quota enabled */
+ if (!ext2fs_has_feature_quota(fs->super)) {
+ ext2fs_set_feature_quota(fs->super);
+ need_dirty = 1;
+ }
+ if (qtype == PRJQUOTA &&
+ !ext2fs_has_feature_project(fs->super)) {
+ ext2fs_set_feature_project(fs->super);
+ need_dirty = 1;
+ }
+ } else if (quota_enable[qtype] == QOPT_DISABLE) {
+ retval = quota_remove_inode(fs, qtype);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while removing quota file (%d)"),
+ qtype);
+ goto quota_errout;
+ }
+ if (qtype == PRJQUOTA) {
+ ext2fs_clear_feature_project(fs->super);
+ need_dirty = 1;
+ }
+ }
+ }
+
+ quota_release_context(&qctx);
+ /* Clear Quota feature if all quota types disabled. */
+ if (!qtype_bits) {
+ for (qtype = 0 ; qtype < MAXQUOTAS; qtype++)
+ if (*quota_sb_inump(fs->super, qtype))
+ break;
+ if (qtype == MAXQUOTAS) {
+ ext2fs_clear_feature_quota(fs->super);
+ need_dirty = 1;
+ }
+
+ }
+ if (need_dirty)
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
+
+static int option_handle_function(char *token)
+{
+ if (strncmp(token, "usr", 3) == 0) {
+ quota_enable[USRQUOTA] = QOPT_ENABLE;
+ } else if (strncmp(token, "^usr", 4) == 0) {
+ quota_enable[USRQUOTA] = QOPT_DISABLE;
+ } else if (strncmp(token, "grp", 3) == 0) {
+ quota_enable[GRPQUOTA] = QOPT_ENABLE;
+ } else if (strncmp(token, "^grp", 4) == 0) {
+ quota_enable[GRPQUOTA] = QOPT_DISABLE;
+ } else if (strncmp(token, "prj", 3) == 0) {
+ quota_enable[PRJQUOTA] = QOPT_ENABLE;
+ } else if (strncmp(token, "^prj", 4) == 0) {
+ quota_enable[PRJQUOTA] = QOPT_DISABLE;
+ } else {
+ fputs(_("\nBad quota options specified.\n\n"
+ "Following valid quota options are available "
+ "(pass by separating with comma):\n"
+ "\t[^]usr[quota]\n"
+ "\t[^]grp[quota]\n"
+ "\t[^]prj[quota]\n"
+ "\n\n"), stderr);
+ return 1;
+ }
+ return 0;
+}
+
+static void parse_e2label_options(int argc, char ** argv)
+{
+ if ((argc < 2) || (argc > 3)) {
+ fputs(_("Usage: e2label device [newlabel]\n"), stderr);
+ exit(1);
+ }
+ io_options = strchr(argv[1], '?');
+ if (io_options)
+ *io_options++ = 0;
+ device_name = get_devname(NULL, argv[1], NULL);
+ if (!device_name) {
+ com_err("e2label", 0, _("Unable to resolve '%s'"),
+ argv[1]);
+ exit(1);
+ }
+ open_flag = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SUPER_ONLY;
+ if (argc == 3) {
+ open_flag |= EXT2_FLAG_RW;
+ L_flag = 1;
+ new_label = argv[2];
+ } else
+ print_label++;
+}
+
+static time_t parse_time(char *str)
+{
+ struct tm ts;
+
+ if (strcmp(str, "now") == 0) {
+ return (time(0));
+ }
+ memset(&ts, 0, sizeof(ts));
+#ifdef HAVE_STRPTIME
+ strptime(str, "%Y%m%d%H%M%S", &ts);
+#else
+ sscanf(str, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon,
+ &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec);
+ ts.tm_year -= 1900;
+ ts.tm_mon -= 1;
+ if (ts.tm_year < 0 || ts.tm_mon < 0 || ts.tm_mon > 11 ||
+ ts.tm_mday < 0 || ts.tm_mday > 31 || ts.tm_hour > 23 ||
+ ts.tm_min > 59 || ts.tm_sec > 61)
+ ts.tm_mday = 0;
+#endif
+ if (ts.tm_mday == 0) {
+ com_err(program_name, 0,
+ _("Couldn't parse date/time specifier: %s"),
+ str);
+ usage();
+ }
+ ts.tm_isdst = -1;
+ return (mktime(&ts));
+}
+
+static void parse_tune2fs_options(int argc, char **argv)
+{
+ int c;
+ char *tmp;
+ struct group *gr;
+ struct passwd *pw;
+ int ret;
+ char optstring[100] = "c:e:fg:i:jlm:o:r:s:u:C:E:I:J:L:M:O:T:U:z:Q:";
+
+ open_flag = 0;
+ printf("tune2fs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ while ((c = getopt(argc, argv, optstring)) != EOF)
+ switch (c) {
+ case 'c':
+ open_flag = EXT2_FLAG_RW;
+ c_flag = 1;
+ if (strcmp(optarg, "random") == 0) {
+ max_mount_count = 65536;
+ break;
+ }
+ max_mount_count = strtol(optarg, &tmp, 0);
+ if (*tmp || max_mount_count > 16000 ||
+ max_mount_count < -16000) {
+ com_err(program_name, 0,
+ _("bad mounts count - %s"),
+ optarg);
+ usage();
+ }
+ if (max_mount_count == 0)
+ max_mount_count = -1;
+ break;
+ case 'C':
+ mount_count = strtoul(optarg, &tmp, 0);
+ if (*tmp || mount_count > 16000) {
+ com_err(program_name, 0,
+ _("bad mounts count - %s"),
+ optarg);
+ usage();
+ }
+ C_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'e':
+ if (strcmp(optarg, "continue") == 0)
+ errors = EXT2_ERRORS_CONTINUE;
+ else if (strcmp(optarg, "remount-ro") == 0)
+ errors = EXT2_ERRORS_RO;
+ else if (strcmp(optarg, "panic") == 0)
+ errors = EXT2_ERRORS_PANIC;
+ else {
+ com_err(program_name, 0,
+ _("bad error behavior - %s"),
+ optarg);
+ usage();
+ }
+ e_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'E':
+ extended_cmd = optarg;
+ open_flag |= EXT2_FLAG_RW;
+ break;
+ case 'f': /* Force */
+ f_flag++;
+ break;
+ case 'g':
+ resgid = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ gr = getgrnam(optarg);
+ if (gr == NULL)
+ tmp = optarg;
+ else {
+ resgid = gr->gr_gid;
+ *tmp = 0;
+ }
+ }
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("bad gid/group name - %s"),
+ optarg);
+ usage();
+ }
+ g_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'i':
+ interval = strtoul(optarg, &tmp, 0);
+ switch (*tmp) {
+ case 's':
+ tmp++;
+ break;
+ case '\0':
+ case 'd':
+ case 'D': /* days */
+ interval *= 86400;
+ if (*tmp != '\0')
+ tmp++;
+ break;
+ case 'm':
+ case 'M': /* months! */
+ interval *= 86400 * 30;
+ tmp++;
+ break;
+ case 'w':
+ case 'W': /* weeks */
+ interval *= 86400 * 7;
+ tmp++;
+ break;
+ }
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("bad interval - %s"), optarg);
+ usage();
+ }
+ i_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'j':
+ if (!journal_size)
+ journal_size = -1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'J':
+ parse_journal_opts(optarg);
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'l':
+ l_flag = 1;
+ break;
+ case 'L':
+ new_label = optarg;
+ L_flag = 1;
+ open_flag |= EXT2_FLAG_RW |
+ EXT2_FLAG_JOURNAL_DEV_OK;
+ break;
+ case 'm':
+ reserved_ratio = strtod(optarg, &tmp);
+ if (*tmp || reserved_ratio > 50 ||
+ reserved_ratio < 0) {
+ com_err(program_name, 0,
+ _("bad reserved block ratio - %s"),
+ optarg);
+ usage();
+ }
+ m_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'M':
+ new_last_mounted = optarg;
+ M_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'o':
+ if (mntopts_cmd) {
+ com_err(program_name, 0, "%s",
+ _("-o may only be specified once"));
+ usage();
+ }
+ mntopts_cmd = optarg;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'O':
+ if (features_cmd) {
+ com_err(program_name, 0, "%s",
+ _("-O may only be specified once"));
+ usage();
+ }
+ features_cmd = optarg;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'Q':
+ Q_flag = 1;
+ ret = parse_quota_opts(optarg, option_handle_function);
+ if (ret)
+ exit(1);
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'r':
+ reserved_blocks = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("bad reserved blocks count - %s"),
+ optarg);
+ usage();
+ }
+ r_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 's': /* Deprecated */
+ s_flag = atoi(optarg);
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'T':
+ T_flag = 1;
+ last_check_time = parse_time(optarg);
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'u':
+ resuid = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ pw = getpwnam(optarg);
+ if (pw == NULL)
+ tmp = optarg;
+ else {
+ resuid = pw->pw_uid;
+ *tmp = 0;
+ }
+ }
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("bad uid/user name - %s"),
+ optarg);
+ usage();
+ }
+ u_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'U':
+ requested_uuid = optarg;
+ U_flag = 1;
+ open_flag = EXT2_FLAG_RW |
+ EXT2_FLAG_JOURNAL_DEV_OK;
+ break;
+ case 'I':
+ new_inode_size = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("bad inode size - %s"),
+ optarg);
+ usage();
+ }
+ if (!((new_inode_size &
+ (new_inode_size - 1)) == 0)) {
+ com_err(program_name, 0,
+ _("Inode size must be a "
+ "power of two- %s"),
+ optarg);
+ usage();
+ }
+ open_flag = EXT2_FLAG_RW;
+ I_flag = 1;
+ break;
+ case 'z':
+ undo_file = optarg;
+ break;
+ default:
+ usage();
+ }
+ if (optind < argc - 1 || optind == argc)
+ usage();
+ if (!open_flag && !l_flag)
+ usage();
+ io_options = strchr(argv[optind], '?');
+ if (io_options)
+ *io_options++ = 0;
+ device_name = get_devname(NULL, argv[optind], NULL);
+ if (!device_name) {
+ com_err(program_name, 0, _("Unable to resolve '%s'"),
+ argv[optind]);
+ exit(1);
+ }
+}
+
+#ifdef CONFIG_BUILD_FINDFS
+void do_findfs(int argc, char **argv)
+{
+ char *dev;
+
+ if ((argc != 2) ||
+ (strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5))) {
+ fprintf(stderr, "Usage: findfs LABEL=<label>|UUID=<uuid>\n");
+ exit(2);
+ }
+ dev = blkid_get_devname(NULL, argv[1], NULL);
+ if (!dev) {
+ com_err("findfs", 0, _("Unable to resolve '%s'"),
+ argv[1]);
+ exit(1);
+ }
+ puts(dev);
+ exit(0);
+}
+#endif
+
+static int parse_extended_opts(ext2_filsys fs, const char *opts)
+{
+ struct ext2_super_block *sb = fs->super;
+ char *buf, *token, *next, *p, *arg;
+ int len, hash_alg;
+ int r_usage = 0;
+ int encoding = 0;
+ char *encoding_flags = NULL;
+
+ len = strlen(opts);
+ buf = malloc(len+1);
+ if (!buf) {
+ fprintf(stderr, "%s",
+ _("Couldn't allocate memory to parse options!\n"));
+ return 1;
+ }
+ strcpy(buf, opts);
+ for (token = buf; token && *token; token = next) {
+ p = strchr(token, ',');
+ next = 0;
+ if (p) {
+ *p = 0;
+ next = p+1;
+ }
+ arg = strchr(token, '=');
+ if (arg) {
+ *arg = 0;
+ arg++;
+ }
+ if (strcmp(token, "clear-mmp") == 0 ||
+ strcmp(token, "clear_mmp") == 0) {
+ clear_mmp = 1;
+ } else if (strcmp(token, "mmp_update_interval") == 0) {
+ unsigned long intv;
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ intv = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid mmp_update_interval: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ if (intv == 0) {
+ intv = EXT4_MMP_UPDATE_INTERVAL;
+ } else if (intv > EXT4_MMP_MAX_UPDATE_INTERVAL) {
+ fprintf(stderr,
+ _("mmp_update_interval too big: %lu\n"),
+ intv);
+ r_usage++;
+ continue;
+ }
+ printf(P_("Setting multiple mount protection update "
+ "interval to %lu second\n",
+ "Setting multiple mount protection update "
+ "interval to %lu seconds\n", intv),
+ intv);
+ sb->s_mmp_update_interval = intv;
+ ext2fs_mark_super_dirty(fs);
+ } else if (!strcmp(token, "force_fsck")) {
+ sb->s_state |= EXT2_ERROR_FS;
+ printf(_("Setting filesystem error flag to force fsck.\n"));
+ ext2fs_mark_super_dirty(fs);
+ } else if (!strcmp(token, "test_fs")) {
+ sb->s_flags |= EXT2_FLAGS_TEST_FILESYS;
+ printf("Setting test filesystem flag\n");
+ ext2fs_mark_super_dirty(fs);
+ } else if (!strcmp(token, "^test_fs")) {
+ sb->s_flags &= ~EXT2_FLAGS_TEST_FILESYS;
+ printf("Clearing test filesystem flag\n");
+ ext2fs_mark_super_dirty(fs);
+ } else if (strcmp(token, "stride") == 0) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ stride = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid RAID stride: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ stride_set = 1;
+ } else if (strcmp(token, "stripe-width") == 0 ||
+ strcmp(token, "stripe_width") == 0) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ stripe_width = strtoul(arg, &p, 0);
+ if (*p) {
+ fprintf(stderr,
+ _("Invalid RAID stripe-width: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ stripe_width_set = 1;
+ } else if (strcmp(token, "hash_alg") == 0 ||
+ strcmp(token, "hash-alg") == 0) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ hash_alg = e2p_string2hash(arg);
+ if (hash_alg < 0) {
+ fprintf(stderr,
+ _("Invalid hash algorithm: %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ sb->s_def_hash_version = hash_alg;
+ printf(_("Setting default hash algorithm "
+ "to %s (%d)\n"),
+ arg, hash_alg);
+ ext2fs_mark_super_dirty(fs);
+ } else if (!strcmp(token, "mount_opts")) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ if (strlen(arg) >= sizeof(fs->super->s_mount_opts)) {
+ fprintf(stderr,
+ "Extended mount options too long\n");
+ continue;
+ }
+ ext_mount_opts = strdup(arg);
+ } else if (!strcmp(token, "encoding")) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("The casefold feature may only be enabled when "
+ "the filesystem is unmounted.\n"), stderr);
+ r_usage++;
+ continue;
+ }
+ if (ext2fs_has_feature_casefold(sb) && !enabling_casefold) {
+ fprintf(stderr, _("Cannot alter existing encoding\n"));
+ r_usage++;
+ continue;
+ }
+ encoding = e2p_str2encoding(arg);
+ if (encoding < 0) {
+ fprintf(stderr, _("Invalid encoding: %s\n"), arg);
+ r_usage++;
+ continue;
+ }
+ enabling_casefold = 1;
+ sb->s_encoding = encoding;
+ printf(_("Setting encoding to '%s'\n"), arg);
+ sb->s_encoding_flags =
+ e2p_get_encoding_flags(sb->s_encoding);
+ } else if (!strcmp(token, "encoding_flags")) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ encoding_flags = arg;
+ } else if (!strcmp(token, "orphan_file_size")) {
+ if (!arg) {
+ r_usage++;
+ continue;
+ }
+ orphan_file_blocks = parse_num_blocks2(arg,
+ fs->super->s_log_block_size);
+
+ if (orphan_file_blocks < 1) {
+ fprintf(stderr,
+ _("Invalid size of orphan file %s\n"),
+ arg);
+ r_usage++;
+ continue;
+ }
+ } else
+ r_usage++;
+ }
+
+ if (encoding > 0 && !r_usage) {
+ sb->s_encoding_flags =
+ e2p_get_encoding_flags(sb->s_encoding);
+
+ if (encoding_flags &&
+ e2p_str2encoding_flags(sb->s_encoding, encoding_flags,
+ &sb->s_encoding_flags)) {
+ fprintf(stderr, _("error: Invalid encoding flag: %s\n"),
+ encoding_flags);
+ r_usage++;
+ } else if (encoding_flags)
+ printf(_("Setting encoding_flags to '%s'\n"),
+ encoding_flags);
+ ext2fs_set_feature_casefold(sb);
+ ext2fs_mark_super_dirty(fs);
+ } else if (encoding_flags && !r_usage) {
+ fprintf(stderr, _("error: An encoding must be explicitly "
+ "specified when passing encoding-flags\n"));
+ r_usage++;
+ }
+ if (r_usage) {
+ fprintf(stderr, "%s", _("\nBad options specified.\n\n"
+ "Extended options are separated by commas, "
+ "and may take an argument which\n"
+ "\tis set off by an equals ('=') sign.\n\n"
+ "Valid extended options are:\n"
+ "\tclear_mmp\n"
+ "\thash_alg=<hash algorithm>\n"
+ "\tmount_opts=<extended default mount options>\n"
+ "\tmmp_update_interval=<mmp update interval in seconds>\n"
+ "\tstride=<RAID per-disk chunk size in blocks>\n"
+ "\tstripe_width=<RAID stride*data disks in blocks>\n"
+ "\tforce_fsck\n"
+ "\ttest_fs\n"
+ "\t^test_fs\n"
+ "\tencoding=<encoding>\n"
+ "\tencoding_flags=<flags>\n"));
+ free(buf);
+ return 1;
+ }
+ free(buf);
+
+ return 0;
+}
+
+/*
+ * Fill in the block bitmap bmap with the information regarding the
+ * blocks to be moved
+ */
+static int get_move_bitmaps(ext2_filsys fs, int new_ino_blks_per_grp,
+ ext2fs_block_bitmap bmap)
+{
+ dgrp_t i;
+ int retval;
+ ext2_badblocks_list bb_list = 0;
+ blk64_t j, needed_blocks = 0;
+ blk64_t start_blk, end_blk;
+
+ retval = ext2fs_read_bb_inode(fs, &bb_list);
+ if (retval)
+ return retval;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ start_blk = ext2fs_inode_table_loc(fs, i) +
+ fs->inode_blocks_per_group;
+
+ end_blk = ext2fs_inode_table_loc(fs, i) +
+ new_ino_blks_per_grp;
+
+ for (j = start_blk; j < end_blk; j++) {
+ if (ext2fs_test_block_bitmap2(fs->block_map, j)) {
+ /*
+ * IF the block is a bad block we fail
+ */
+ if (ext2fs_badblocks_list_test(bb_list, j)) {
+ ext2fs_badblocks_list_free(bb_list);
+ return ENOSPC;
+ }
+
+ ext2fs_mark_block_bitmap2(bmap, j);
+ } else {
+ /*
+ * We are going to use this block for
+ * inode table. So mark them used.
+ */
+ ext2fs_mark_block_bitmap2(fs->block_map, j);
+ }
+ }
+ needed_blocks += end_blk - start_blk;
+ }
+
+ ext2fs_badblocks_list_free(bb_list);
+ if (needed_blocks > ext2fs_free_blocks_count(fs->super))
+ return ENOSPC;
+
+ return 0;
+}
+
+static int ext2fs_is_meta_block(ext2_filsys fs, blk64_t blk)
+{
+ dgrp_t group;
+ group = ext2fs_group_of_blk2(fs, blk);
+ if (ext2fs_block_bitmap_loc(fs, group) == blk)
+ return 1;
+ if (ext2fs_inode_bitmap_loc(fs, group) == blk)
+ return 1;
+ return 0;
+}
+
+static int ext2fs_is_block_in_group(ext2_filsys fs, dgrp_t group, blk64_t blk)
+{
+ blk64_t start_blk, end_blk;
+ start_blk = fs->super->s_first_data_block +
+ EXT2_GROUPS_TO_BLOCKS(fs->super, group);
+ /*
+ * We cannot get new block beyond end_blk for for the last block group
+ * so we can check with EXT2_BLOCKS_PER_GROUP even for last block group
+ */
+ end_blk = start_blk + EXT2_BLOCKS_PER_GROUP(fs->super);
+ if (blk >= start_blk && blk <= end_blk)
+ return 1;
+ return 0;
+}
+
+static int move_block(ext2_filsys fs, ext2fs_block_bitmap bmap)
+{
+
+ char *buf;
+ dgrp_t group = 0;
+ errcode_t retval;
+ int meta_data = 0;
+ blk64_t blk, new_blk, goal;
+ struct blk_move *bmv;
+
+ retval = ext2fs_get_mem(fs->blocksize, &buf);
+ if (retval)
+ return retval;
+
+ for (new_blk = blk = fs->super->s_first_data_block;
+ blk < ext2fs_blocks_count(fs->super); blk++) {
+ if (!ext2fs_test_block_bitmap2(bmap, blk))
+ continue;
+
+ if (ext2fs_is_meta_block(fs, blk)) {
+ /*
+ * If the block is mapping a fs meta data block
+ * like group desc/block bitmap/inode bitmap. We
+ * should find a block in the same group and fix
+ * the respective fs metadata pointers. Otherwise
+ * fail
+ */
+ group = ext2fs_group_of_blk2(fs, blk);
+ goal = ext2fs_group_first_block2(fs, group);
+ meta_data = 1;
+
+ } else {
+ goal = new_blk;
+ }
+ retval = ext2fs_new_block2(fs, goal, NULL, &new_blk);
+ if (retval)
+ goto err_out;
+
+ /* new fs meta data block should be in the same group */
+ if (meta_data && !ext2fs_is_block_in_group(fs, group, new_blk)) {
+ retval = ENOSPC;
+ goto err_out;
+ }
+
+ /* Mark this block as allocated */
+ ext2fs_mark_block_bitmap2(fs->block_map, new_blk);
+
+ /* Add it to block move list */
+ retval = ext2fs_get_mem(sizeof(struct blk_move), &bmv);
+ if (retval)
+ goto err_out;
+
+ bmv->old_loc = blk;
+ bmv->new_loc = new_blk;
+
+ list_add(&(bmv->list), &blk_move_list);
+
+ retval = io_channel_read_blk64(fs->io, blk, 1, buf);
+ if (retval)
+ goto err_out;
+
+ retval = io_channel_write_blk64(fs->io, new_blk, 1, buf);
+ if (retval)
+ goto err_out;
+ }
+
+err_out:
+ ext2fs_free_mem(&buf);
+ return retval;
+}
+
+static blk64_t translate_block(blk64_t blk)
+{
+ struct list_head *entry;
+ struct blk_move *bmv;
+
+ list_for_each(entry, &blk_move_list) {
+ bmv = list_entry(entry, struct blk_move, list);
+ if (bmv->old_loc == blk)
+ return bmv->new_loc;
+ }
+
+ return 0;
+}
+
+static int process_block(ext2_filsys fs EXT2FS_ATTR((unused)),
+ blk64_t *block_nr,
+ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ int ret = 0;
+ blk64_t new_blk;
+ ext2fs_block_bitmap bmap = (ext2fs_block_bitmap) priv_data;
+
+ if (!ext2fs_test_block_bitmap2(bmap, *block_nr))
+ return 0;
+ new_blk = translate_block(*block_nr);
+ if (new_blk) {
+ *block_nr = new_blk;
+ /*
+ * This will force the ext2fs_write_inode in the iterator
+ */
+ ret |= BLOCK_CHANGED;
+ }
+
+ return ret;
+}
+
+static int inode_scan_and_fix(ext2_filsys fs, ext2fs_block_bitmap bmap)
+{
+ errcode_t retval = 0;
+ ext2_ino_t ino;
+ blk64_t blk;
+ char *block_buf = 0;
+ struct ext2_inode inode;
+ ext2_inode_scan scan = NULL;
+
+ retval = ext2fs_get_mem(fs->blocksize * 3, &block_buf);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval)
+ goto err_out;
+
+ while (1) {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval)
+ goto err_out;
+
+ if (!ino)
+ break;
+
+ if (inode.i_links_count == 0)
+ continue; /* inode not in use */
+
+ /* FIXME!!
+ * If we end up modifying the journal inode
+ * the sb->s_jnl_blocks will differ. But a
+ * subsequent e2fsck fixes that.
+ * Do we need to fix this ??
+ */
+
+ if (ext2fs_file_acl_block(fs, &inode) &&
+ ext2fs_test_block_bitmap2(bmap,
+ ext2fs_file_acl_block(fs, &inode))) {
+ blk = translate_block(ext2fs_file_acl_block(fs,
+ &inode));
+ if (!blk)
+ continue;
+
+ ext2fs_file_acl_block_set(fs, &inode, blk);
+
+ /*
+ * Write the inode to disk so that inode table
+ * resizing can work
+ */
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ goto err_out;
+ }
+
+ if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
+ continue;
+
+ retval = ext2fs_block_iterate3(fs, ino, 0, block_buf,
+ process_block, bmap);
+ if (retval)
+ goto err_out;
+
+ }
+
+err_out:
+ ext2fs_free_mem(&block_buf);
+ ext2fs_close_inode_scan(scan);
+
+ return retval;
+}
+
+/*
+ * We need to scan for inode and block bitmaps that may need to be
+ * moved. This can take place if the filesystem was formatted for
+ * RAID arrays using the mke2fs's extended option "stride".
+ */
+static int group_desc_scan_and_fix(ext2_filsys fs, ext2fs_block_bitmap bmap)
+{
+ dgrp_t i;
+ blk64_t blk, new_blk;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ blk = ext2fs_block_bitmap_loc(fs, i);
+ if (ext2fs_test_block_bitmap2(bmap, blk)) {
+ new_blk = translate_block(blk);
+ if (!new_blk)
+ continue;
+ ext2fs_block_bitmap_loc_set(fs, i, new_blk);
+ }
+
+ blk = ext2fs_inode_bitmap_loc(fs, i);
+ if (ext2fs_test_block_bitmap2(bmap, blk)) {
+ new_blk = translate_block(blk);
+ if (!new_blk)
+ continue;
+ ext2fs_inode_bitmap_loc_set(fs, i, new_blk);
+ }
+ }
+ return 0;
+}
+
+static int expand_inode_table(ext2_filsys fs, unsigned long new_ino_size)
+{
+ dgrp_t i;
+ blk64_t blk;
+ errcode_t retval;
+ int new_ino_blks_per_grp;
+ unsigned int j;
+ char *old_itable = NULL, *new_itable = NULL;
+ char *tmp_old_itable = NULL, *tmp_new_itable = NULL;
+ unsigned long old_ino_size;
+ int old_itable_size, new_itable_size;
+
+ old_itable_size = fs->inode_blocks_per_group * fs->blocksize;
+ old_ino_size = EXT2_INODE_SIZE(fs->super);
+
+ new_ino_blks_per_grp = ext2fs_div_ceil(
+ EXT2_INODES_PER_GROUP(fs->super) *
+ new_ino_size,
+ fs->blocksize);
+
+ new_itable_size = new_ino_blks_per_grp * fs->blocksize;
+
+ retval = ext2fs_get_mem(old_itable_size, &old_itable);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_mem(new_itable_size, &new_itable);
+ if (retval)
+ goto err_out;
+
+ tmp_old_itable = old_itable;
+ tmp_new_itable = new_itable;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ blk = ext2fs_inode_table_loc(fs, i);
+ retval = io_channel_read_blk64(fs->io, blk,
+ fs->inode_blocks_per_group, old_itable);
+ if (retval)
+ goto err_out;
+
+ for (j = 0; j < EXT2_INODES_PER_GROUP(fs->super); j++) {
+ memcpy(new_itable, old_itable, old_ino_size);
+
+ memset(new_itable+old_ino_size, 0,
+ new_ino_size - old_ino_size);
+
+ new_itable += new_ino_size;
+ old_itable += old_ino_size;
+ }
+
+ /* reset the pointer */
+ old_itable = tmp_old_itable;
+ new_itable = tmp_new_itable;
+
+ retval = io_channel_write_blk64(fs->io, blk,
+ new_ino_blks_per_grp, new_itable);
+ if (retval)
+ goto err_out;
+ }
+
+ /* Update the meta data */
+ fs->inode_blocks_per_group = new_ino_blks_per_grp;
+ ext2fs_free_inode_cache(fs->icache);
+ fs->icache = 0;
+ fs->super->s_inode_size = new_ino_size;
+
+err_out:
+ if (old_itable)
+ ext2fs_free_mem(&old_itable);
+
+ if (new_itable)
+ ext2fs_free_mem(&new_itable);
+
+ return retval;
+}
+
+
+#define list_for_each_safe(pos, pnext, head) \
+ for (pos = (head)->next, pnext = pos->next; pos != (head); \
+ pos = pnext, pnext = pos->next)
+
+static void free_blk_move_list(void)
+{
+ struct list_head *entry, *tmp;
+ struct blk_move *bmv;
+
+ list_for_each_safe(entry, tmp, &blk_move_list) {
+ bmv = list_entry(entry, struct blk_move, list);
+ list_del(entry);
+ ext2fs_free_mem(&bmv);
+ }
+ return;
+}
+
+static int resize_inode(ext2_filsys fs, unsigned long new_size)
+{
+ errcode_t retval;
+ int new_ino_blks_per_grp;
+ ext2fs_block_bitmap bmap;
+
+ retval = ext2fs_read_inode_bitmap(fs);
+ if (retval) {
+ fputs(_("Failed to read inode bitmap\n"), stderr);
+ return retval;
+ }
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval) {
+ fputs(_("Failed to read block bitmap\n"), stderr);
+ return retval;
+ }
+ INIT_LIST_HEAD(&blk_move_list);
+
+
+ new_ino_blks_per_grp = ext2fs_div_ceil(
+ EXT2_INODES_PER_GROUP(fs->super)*
+ new_size,
+ fs->blocksize);
+
+ /* We may change the file system.
+ * Mark the file system as invalid so that
+ * the user is prompted to run fsck.
+ */
+ fs->super->s_state &= ~EXT2_VALID_FS;
+
+ retval = ext2fs_allocate_block_bitmap(fs, _("blocks to be moved"),
+ &bmap);
+ if (retval) {
+ fputs(_("Failed to allocate block bitmap when "
+ "increasing inode size\n"), stderr);
+ return retval;
+ }
+ retval = get_move_bitmaps(fs, new_ino_blks_per_grp, bmap);
+ if (retval) {
+ fputs(_("Not enough space to increase inode size \n"), stderr);
+ goto err_out;
+ }
+ retval = move_block(fs, bmap);
+ if (retval) {
+ fputs(_("Failed to relocate blocks during inode resize \n"),
+ stderr);
+ goto err_out;
+ }
+ retval = inode_scan_and_fix(fs, bmap);
+ if (retval)
+ goto err_out_undo;
+
+ retval = group_desc_scan_and_fix(fs, bmap);
+ if (retval)
+ goto err_out_undo;
+
+ retval = expand_inode_table(fs, new_size);
+ if (retval)
+ goto err_out_undo;
+
+ ext2fs_calculate_summary_stats(fs, 1 /* super only */);
+
+ fs->super->s_state |= EXT2_VALID_FS;
+ /* mark super block and block bitmap as dirty */
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+
+err_out:
+ free_blk_move_list();
+ ext2fs_free_block_bitmap(bmap);
+
+ return retval;
+
+err_out_undo:
+ free_blk_move_list();
+ ext2fs_free_block_bitmap(bmap);
+ fputs(_("Error in resizing the inode size.\n"
+ "Run e2undo to undo the "
+ "file system changes. \n"), stderr);
+
+ return retval;
+}
+
+static int tune2fs_setup_tdb(const char *name, io_manager *io_ptr)
+{
+ errcode_t retval = 0;
+ const char *tdb_dir;
+ char *tdb_file = NULL;
+ char *dev_name, *tmp_name;
+
+ /* (re)open a specific undo file */
+ if (undo_file && undo_file[0] != 0) {
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto err;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(undo_file);
+ if (retval)
+ goto err;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"),
+ undo_file, name);
+ return retval;
+ }
+
+ /*
+ * Configuration via a conf file would be
+ * nice
+ */
+ tdb_dir = getenv("E2FSPROGS_UNDO_DIR");
+ if (!tdb_dir)
+ tdb_dir = "/var/lib/e2fsprogs";
+
+ if (!strcmp(tdb_dir, "none") || (tdb_dir[0] == 0) ||
+ access(tdb_dir, W_OK))
+ return 0;
+
+ tmp_name = strdup(name);
+ if (!tmp_name)
+ goto errout;
+ dev_name = basename(tmp_name);
+ tdb_file = malloc(strlen(tdb_dir) + 9 + strlen(dev_name) + 7 + 1);
+ if (!tdb_file) {
+ free(tmp_name);
+ goto errout;
+ }
+ sprintf(tdb_file, "%s/tune2fs-%s.e2undo", tdb_dir, dev_name);
+ free(tmp_name);
+
+ if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
+ retval = errno;
+ com_err(program_name, retval,
+ _("while trying to delete %s"), tdb_file);
+ goto errout;
+ }
+
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto errout;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(tdb_file);
+ if (retval)
+ goto errout;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"),
+ tdb_file, name);
+
+ free(tdb_file);
+ return 0;
+errout:
+ free(tdb_file);
+err:
+ com_err("tune2fs", retval, "while trying to setup undo file\n");
+ return retval;
+}
+
+static int
+fs_update_journal_user(struct ext2_super_block *sb, __u8 old_uuid[UUID_SIZE])
+{
+ int retval, nr_users, start;
+ journal_superblock_t *jsb;
+ ext2_filsys jfs;
+ __u8 *j_uuid;
+ char *journal_path;
+ char uuid[UUID_STR_SIZE];
+ char buf[SUPERBLOCK_SIZE] __attribute__ ((aligned(8)));
+
+ if (!ext2fs_has_feature_journal(sb) || uuid_is_null(sb->s_journal_uuid))
+ return 0;
+
+ uuid_unparse(sb->s_journal_uuid, uuid);
+ journal_path = blkid_get_devname(NULL, "UUID", uuid);
+ if (!journal_path)
+ return 0;
+
+ retval = ext2fs_open2(journal_path, io_options,
+ EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_RW,
+ 0, 0, unix_io_manager, &jfs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while trying to open %s"),
+ journal_path);
+ return retval;
+ }
+
+ retval = get_journal_sb(jfs, buf);
+ if (retval != 0) {
+ if (retval == EXT2_ET_UNSUPP_FEATURE)
+ fprintf(stderr, _("%s is not a journal device.\n"),
+ journal_path);
+ return retval;
+ }
+
+ jsb = (journal_superblock_t *) buf;
+ /* Find the filesystem UUID */
+ nr_users = ntohl(jsb->s_nr_users);
+ if (nr_users > JBD2_USERS_MAX) {
+ fprintf(stderr, _("Journal superblock is corrupted, nr_users\n"
+ "is too high (%d).\n"), nr_users);
+ return EXT2_ET_CORRUPT_JOURNAL_SB;
+ }
+
+ j_uuid = journal_user(old_uuid, jsb->s_users, nr_users);
+ if (j_uuid == NULL) {
+ fputs(_("Filesystem's UUID not found on journal device.\n"),
+ stderr);
+ return EXT2_ET_LOAD_EXT_JOURNAL;
+ }
+
+ memcpy(j_uuid, sb->s_uuid, UUID_SIZE);
+
+ start = ext2fs_journal_sb_start(jfs->blocksize);
+ /* Write back the journal superblock */
+ retval = io_channel_write_blk64(jfs->io, start, -SUPERBLOCK_SIZE, buf);
+ if (retval != 0) {
+ com_err(program_name, retval,
+ "while writing journal superblock.");
+ return retval;
+ }
+
+ ext2fs_close(jfs);
+
+ return 0;
+}
+
+/*
+ * Use FS_IOC_SETFSLABEL or FS_IOC_GETFSLABEL to set/get file system label
+ * Return: 0 on success
+ * 1 on error
+ * -1 when the old method should be used
+ */
+static int handle_fslabel(int setlabel)
+{
+#ifdef __linux__
+ errcode_t ret;
+ int mnt_flags, fd;
+ char label[FSLABEL_MAX];
+ int maxlen = FSLABEL_MAX - 1;
+ char mntpt[PATH_MAX + 1];
+
+ ret = ext2fs_check_mount_point(device_name, &mnt_flags,
+ mntpt, sizeof(mntpt));
+ if (ret) {
+ com_err(device_name, ret, _("while checking mount status"));
+ return 1;
+ }
+ if (!(mnt_flags & EXT2_MF_MOUNTED) ||
+ (setlabel && (mnt_flags & EXT2_MF_READONLY)))
+ return -1;
+
+ if (!mntpt[0]) {
+ fprintf(stderr,_("Unknown mount point for %s\n"), device_name);
+ return 1;
+ }
+
+ fd = open(mntpt, O_RDONLY);
+ if (fd < 0) {
+ com_err(mntpt, errno, _("while opening mount point"));
+ return 1;
+ }
+
+ /* Get fs label */
+ if (!setlabel) {
+ if (ioctl(fd, FS_IOC_GETFSLABEL, &label)) {
+ close(fd);
+ if (errno == ENOTTY)
+ return -1;
+ com_err(mntpt, errno, _("while trying to get fs label"));
+ return 1;
+ }
+ close(fd);
+ printf("%.*s\n", EXT2_LEN_STR(label));
+ return 0;
+ }
+
+ /* If it's extN file system, truncate the label to appropriate size */
+ if (mnt_flags & EXT2_MF_EXTFS)
+ maxlen = EXT2_LABEL_LEN;
+ if (strlen(new_label) > maxlen) {
+ fputs(_("Warning: label too long, truncating.\n"),
+ stderr);
+ new_label[maxlen] = '\0';
+ }
+
+ /* Set fs label */
+ if (ioctl(fd, FS_IOC_SETFSLABEL, new_label)) {
+ close(fd);
+ if (errno == ENOTTY)
+ return -1;
+ com_err(mntpt, errno, _("while trying to set fs label"));
+ return 1;
+ }
+ close(fd);
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+#ifndef BUILD_AS_LIB
+int main(int argc, char **argv)
+#else
+int tune2fs_main(int argc, char **argv)
+#endif /* BUILD_AS_LIB */
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ struct ext2_super_block *sb;
+ io_manager io_ptr, io_ptr_orig = NULL;
+ int rc = 0;
+ char default_undo_file[1] = { 0 };
+ char mntpt[PATH_MAX + 1] = { 0 };
+ int fd = -1;
+ struct fsuuid *fsuuid = NULL;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+ if (argc && *argv)
+ program_name = *argv;
+ else
+ usage();
+ add_error_table(&et_ext2_error_table);
+
+#ifdef CONFIG_BUILD_FINDFS
+ if (strcmp(get_progname(argv[0]), "findfs") == 0)
+ do_findfs(argc, argv);
+#endif
+ if (strcmp(get_progname(argv[0]), "e2label") == 0)
+ parse_e2label_options(argc, argv);
+ else
+ parse_tune2fs_options(argc, argv);
+
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_DEBUG")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+#endif
+ io_ptr = unix_io_manager;
+
+ /*
+ * Try the get/set fs label using ioctls before we even attempt
+ * to open the file system.
+ */
+ if (L_flag || print_label) {
+ rc = handle_fslabel(L_flag);
+ if (rc != -1) {
+#ifndef BUILD_AS_LIB
+ exit(rc);
+#endif
+ return rc;
+ }
+ rc = 0;
+ }
+
+retry_open:
+ if ((open_flag & EXT2_FLAG_RW) == 0 || f_flag)
+ open_flag |= EXT2_FLAG_SKIP_MMP;
+
+ open_flag |= EXT2_FLAG_64BITS | EXT2_FLAG_THREADS |
+ EXT2_FLAG_JOURNAL_DEV_OK;
+
+ /* keep the filesystem struct around to dump MMP data */
+ open_flag |= EXT2_FLAG_NOFREE_ON_ERROR;
+
+ retval = ext2fs_open2(device_name, io_options, open_flag,
+ 0, 0, io_ptr, &fs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while trying to open %s"),
+ device_name);
+ if (retval == EXT2_ET_MMP_FSCK_ON ||
+ retval == EXT2_ET_MMP_UNKNOWN_SEQ)
+ dump_mmp_msg(fs->mmp_buf,
+ _("If you are sure the filesystem "
+ "is not in use on any node, run:\n"
+ "'tune2fs -f -E clear_mmp {device}'\n"));
+ else if (retval == EXT2_ET_MMP_FAILED)
+ dump_mmp_msg(fs->mmp_buf, NULL);
+ else if (retval == EXT2_ET_MMP_MAGIC_INVALID)
+ fprintf(stderr,
+ _("MMP block magic is bad. Try to fix it by "
+ "running:\n'e2fsck -f %s'\n"), device_name);
+ else if (retval == EXT2_ET_BAD_MAGIC)
+ check_plausibility(device_name, CHECK_FS_EXIST, NULL);
+ else if (retval != EXT2_ET_MMP_FAILED)
+ fprintf(stderr, "%s",
+ _("Couldn't find valid filesystem superblock.\n"));
+
+ ext2fs_free(fs);
+ exit(1);
+ }
+ if (ext2fs_has_feature_journal_dev(fs->super)) {
+ fprintf(stderr, "%s", _("Cannot modify a journal device.\n"));
+ ext2fs_free(fs);
+ exit(1);
+ }
+ fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+
+ if (I_flag) {
+ /*
+ * Check the inode size is right so we can issue an
+ * error message and bail before setting up the tdb
+ * file.
+ */
+ if (new_inode_size == EXT2_INODE_SIZE(fs->super)) {
+ fprintf(stderr, _("The inode size is already %lu\n"),
+ new_inode_size);
+ rc = 1;
+ goto closefs;
+ }
+ if (new_inode_size < EXT2_INODE_SIZE(fs->super)) {
+ fprintf(stderr, "%s",
+ _("Shrinking inode size is not supported\n"));
+ rc = 1;
+ goto closefs;
+ }
+ if (new_inode_size > fs->blocksize) {
+ fprintf(stderr, _("Invalid inode size %lu (max %d)\n"),
+ new_inode_size, fs->blocksize);
+ rc = 1;
+ goto closefs;
+ }
+ rc = check_fsck_needed(fs,
+ _("Resizing inodes could take some time."));
+ if (rc)
+ goto closefs;
+ /*
+ * If inode resize is requested use the
+ * Undo I/O manager
+ */
+ undo_file = default_undo_file;
+ }
+
+ /* Set up an undo file */
+ if (undo_file && io_ptr_orig == NULL) {
+ io_ptr_orig = io_ptr;
+ retval = tune2fs_setup_tdb(device_name, &io_ptr);
+ if (retval) {
+ rc = 1;
+ goto closefs;
+ }
+ if (io_ptr != io_ptr_orig) {
+ ext2fs_close_free(&fs);
+ goto retry_open;
+ }
+ }
+
+ sb = fs->super;
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+
+ if (print_label) {
+ /* For e2label emulation */
+ printf("%.*s\n", EXT2_LEN_STR(sb->s_volume_name));
+ remove_error_table(&et_ext2_error_table);
+ goto closefs;
+ }
+
+ retval = ext2fs_check_mount_point(device_name, &mount_flags,
+ mntpt, sizeof(mntpt));
+ if (retval) {
+ com_err("ext2fs_check_mount_point", retval,
+ _("while determining whether %s is mounted."),
+ device_name);
+ rc = 1;
+ goto closefs;
+ }
+
+#ifdef NO_RECOVERY
+ /* Warn if file system needs recovery and it is opened for writing. */
+ if ((open_flag & EXT2_FLAG_RW) && !(mount_flags & EXT2_MF_MOUNTED) &&
+ (sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+ (sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER)) {
+ fprintf(stderr,
+_("Warning: The journal is dirty. You may wish to replay the journal like:\n\n"
+ "\te2fsck -E journal_only %s\n\n"
+ "then rerun this command. Otherwise, any changes made may be overwritten\n"
+ "by journal recovery.\n"), device_name);
+ }
+#else
+ /* Recover the journal if possible. */
+ if ((open_flag & EXT2_FLAG_RW) && !(mount_flags & (EXT2_MF_BUSY | EXT2_MF_MOUNTED)) &&
+ ext2fs_has_feature_journal_needs_recovery(fs->super)) {
+ printf(_("Recovering journal.\n"));
+ retval = ext2fs_run_ext3_journal(&fs);
+ if (retval) {
+ com_err("tune2fs", retval,
+ "while recovering journal.\n");
+ printf(_("Please run e2fsck -fy %s.\n"), device_name);
+ if (!fs)
+ exit(1);
+ rc = 1;
+ goto closefs;
+ }
+ sb = fs->super;
+ }
+#endif
+
+ /* Normally we only need to write out the superblock */
+ fs->flags |= EXT2_FLAG_SUPER_ONLY;
+
+ if (c_flag) {
+ if (max_mount_count == 65536)
+ max_mount_count = EXT2_DFL_MAX_MNT_COUNT +
+ (random() % EXT2_DFL_MAX_MNT_COUNT);
+ sb->s_max_mnt_count = max_mount_count;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting maximal mount count to %d\n"),
+ max_mount_count);
+ }
+ if (C_flag) {
+ sb->s_mnt_count = mount_count;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting current mount count to %d\n"), mount_count);
+ }
+ if (e_flag) {
+ sb->s_errors = errors;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting error behavior to %d\n"), errors);
+ }
+ if (g_flag) {
+ sb->s_def_resgid = resgid;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting reserved blocks gid to %lu\n"), resgid);
+ }
+ if (i_flag) {
+ if ((unsigned long long)interval >= (1ULL << 32)) {
+ com_err(program_name, 0,
+ _("interval between checks is too big (%lu)"),
+ interval);
+ rc = 1;
+ goto closefs;
+ }
+ sb->s_checkinterval = interval;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting interval between checks to %lu seconds\n"),
+ interval);
+ }
+ if (m_flag) {
+ ext2fs_r_blocks_count_set(sb, reserved_ratio *
+ ext2fs_blocks_count(sb) / 100.0);
+ ext2fs_mark_super_dirty(fs);
+ printf (_("Setting reserved blocks percentage to %g%% (%llu blocks)\n"),
+ reserved_ratio,
+ (unsigned long long) ext2fs_r_blocks_count(sb));
+ }
+ if (r_flag) {
+ if (reserved_blocks > ext2fs_blocks_count(sb)/2) {
+ com_err(program_name, 0,
+ _("reserved blocks count is too big (%llu)"),
+ (unsigned long long) reserved_blocks);
+ rc = 1;
+ goto closefs;
+ }
+ ext2fs_r_blocks_count_set(sb, reserved_blocks);
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting reserved blocks count to %llu\n"),
+ (unsigned long long) reserved_blocks);
+ }
+ if (s_flag == 1) {
+ if (ext2fs_has_feature_sparse_super(sb)) {
+ fputs(_("\nThe filesystem already has sparse "
+ "superblocks.\n"), stderr);
+ } else if (ext2fs_has_feature_meta_bg(sb)) {
+ fputs(_("\nSetting the sparse superblock flag not "
+ "supported\nfor filesystems with "
+ "the meta_bg feature enabled.\n"),
+ stderr);
+ rc = 1;
+ goto closefs;
+ } else {
+ ext2fs_set_feature_sparse_super(sb);
+ sb->s_state &= ~EXT2_VALID_FS;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("\nSparse superblock flag set. %s"),
+ _(please_fsck));
+ }
+ }
+ if (s_flag == 0) {
+ fputs(_("\nClearing the sparse superblock flag not supported.\n"),
+ stderr);
+ rc = 1;
+ goto closefs;
+ }
+ if (T_flag) {
+ sb->s_lastcheck = last_check_time;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting time filesystem last checked to %s\n"),
+ ctime(&last_check_time));
+ }
+ if (u_flag) {
+ sb->s_def_resuid = resuid;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting reserved blocks uid to %lu\n"), resuid);
+ }
+ if (L_flag) {
+ if (strlen(new_label) > sizeof(sb->s_volume_name))
+ fputs(_("Warning: label too long, truncating.\n"),
+ stderr);
+ memset(sb->s_volume_name, 0, sizeof(sb->s_volume_name));
+ strncpy((char *)sb->s_volume_name, new_label,
+ sizeof(sb->s_volume_name));
+ ext2fs_mark_super_dirty(fs);
+ }
+ if (M_flag) {
+ memset(sb->s_last_mounted, 0, sizeof(sb->s_last_mounted));
+ strncpy((char *)sb->s_last_mounted, new_last_mounted,
+ sizeof(sb->s_last_mounted));
+ ext2fs_mark_super_dirty(fs);
+ }
+ if (mntopts_cmd) {
+ rc = update_mntopts(fs, mntopts_cmd);
+ if (rc)
+ goto closefs;
+ }
+ if (features_cmd) {
+ rc = update_feature_set(fs, features_cmd);
+ if (rc)
+ goto closefs;
+ }
+ if (extended_cmd) {
+ rc = parse_extended_opts(fs, extended_cmd);
+ if (rc)
+ goto closefs;
+ if (clear_mmp && !f_flag) {
+ fputs(_("Error in using clear_mmp. "
+ "It must be used with -f\n"),
+ stderr);
+ rc = 1;
+ goto closefs;
+ }
+ }
+ if (clear_mmp) {
+ rc = ext2fs_mmp_clear(fs);
+ goto closefs;
+ }
+ if (journal_size || journal_device) {
+ rc = add_journal(fs);
+ if (rc)
+ goto closefs;
+ }
+ if (orphan_file_blocks) {
+ errcode_t err;
+
+ err = ext2fs_read_bitmaps(fs);
+ if (err) {
+ com_err(program_name, err, "%s",
+ _("while loading bitmaps"));
+ rc = 1;
+ goto closefs;
+ }
+ err = ext2fs_create_orphan_file(fs, orphan_file_blocks);
+ if (err) {
+ com_err(program_name, err, "%s",
+ _("while creating orphan file"));
+ rc = 1;
+ goto closefs;
+ }
+ }
+
+ if (Q_flag) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("The quota feature may only be changed when "
+ "the filesystem is unmounted.\n"), stderr);
+ rc = 1;
+ goto closefs;
+ }
+ rc = handle_quota_options(fs);
+ if (rc)
+ goto closefs;
+ }
+
+ if (U_flag) {
+ int set_csum = 0;
+ dgrp_t i;
+ char buf[SUPERBLOCK_SIZE] __attribute__ ((aligned(8)));
+ __u8 old_uuid[UUID_SIZE];
+ uuid_t new_uuid;
+ errcode_t ret = -1;
+
+ if (ext2fs_has_feature_stable_inodes(fs->super)) {
+ fputs(_("Cannot change the UUID of this filesystem "
+ "because it has the stable_inodes feature "
+ "flag.\n"), stderr);
+ exit(1);
+ }
+
+ if (!ext2fs_has_feature_csum_seed(fs->super) &&
+ (ext2fs_has_feature_metadata_csum(fs->super) ||
+ ext2fs_has_feature_ea_inode(fs->super))) {
+ rc = check_fsck_needed(fs,
+ _("Setting the UUID on this "
+ "filesystem could take some time."));
+ if (rc)
+ goto closefs;
+ rewrite_checksums = REWRITE_ALL;
+ }
+
+ if (ext2fs_has_group_desc_csum(fs)) {
+ /*
+ * Changing the UUID on a metadata_csum FS requires
+ * rewriting all metadata, which can race with a
+ * mounted fs. Don't allow that unless we're saving
+ * the checksum seed.
+ */
+ if ((mount_flags & EXT2_MF_MOUNTED) &&
+ !ext2fs_has_feature_csum_seed(fs->super) &&
+ ext2fs_has_feature_metadata_csum(fs->super)) {
+ fputs(_("The UUID may only be "
+ "changed when the filesystem is "
+ "unmounted.\n"), stderr);
+ fputs(_("If you only use kernels newer than "
+ "v4.4, run 'tune2fs -O "
+ "metadata_csum_seed' and re-run this "
+ "command.\n"), stderr);
+ try_confirm_csum_seed_support();
+ rc = 1;
+ goto closefs;
+ }
+
+ /*
+ * Determine if the block group checksums are
+ * correct so we know whether or not to set
+ * them later on.
+ */
+ for (i = 0; i < fs->group_desc_count; i++)
+ if (!ext2fs_group_desc_csum_verify(fs, i))
+ break;
+ if (i >= fs->group_desc_count)
+ set_csum = 1;
+ }
+
+#ifdef __linux__
+ if ((mount_flags & EXT2_MF_MOUNTED) &&
+ !(mount_flags & EXT2_MF_READONLY) && mntpt[0]) {
+ fd = open(mntpt, O_RDONLY);
+ if (fd >= 0)
+ fsuuid = malloc(sizeof(*fsuuid) + UUID_SIZE);
+ if (fsuuid) {
+ fsuuid->fsu_len = UUID_SIZE;
+ fsuuid->fsu_flags = 0;
+ ret = ioctl(fd, EXT4_IOC_GETFSUUID, fsuuid);
+ if (ret || fsuuid->fsu_len != UUID_SIZE) {
+ free(fsuuid);
+ fsuuid = NULL;
+ }
+ }
+ }
+#endif
+
+ memcpy(old_uuid, fsuuid ? fsuuid->fsu_uuid : sb->s_uuid,
+ UUID_SIZE);
+ if ((strcasecmp(requested_uuid, "null") == 0) ||
+ (strcasecmp(requested_uuid, "clear") == 0)) {
+ uuid_clear(new_uuid);
+ } else if (strcasecmp(requested_uuid, "time") == 0) {
+ uuid_generate_time(new_uuid);
+ } else if (strcasecmp(requested_uuid, "random") == 0) {
+ uuid_generate(new_uuid);
+ } else if (uuid_parse(requested_uuid, new_uuid)) {
+ com_err(program_name, 0, "%s",
+ _("Invalid UUID format\n"));
+ rc = 1;
+ goto closefs;
+ }
+
+ ret = -1;
+#ifdef __linux__
+ if (fsuuid) {
+ fsuuid->fsu_len = UUID_SIZE;
+ fsuuid->fsu_flags = 0;
+ memcpy(&fsuuid->fsu_uuid, new_uuid, UUID_SIZE);
+ ret = ioctl(fd, EXT4_IOC_SETFSUUID, fsuuid);
+ }
+#endif
+ /*
+ * If we can't set the UUID via the ioctl, fall
+ * back to directly modifying the superblock
+ .*/
+ if (ret) {
+ memcpy(sb->s_uuid, new_uuid, UUID_SIZE);
+ ext2fs_init_csum_seed(fs);
+ if (set_csum) {
+ for (i = 0; i < fs->group_desc_count; i++)
+ ext2fs_group_desc_csum_set(fs, i);
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ }
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ /* If this is a journal dev, we need to copy UUID into jsb */
+ if (!(rc = get_journal_sb(fs, buf))) {
+ journal_superblock_t *jsb;
+
+ jsb = (journal_superblock_t *) buf;
+ fputs(_("Need to update journal superblock.\n"), stdout);
+ memcpy(jsb->s_uuid, sb->s_uuid, sizeof(sb->s_uuid));
+
+ /* Writeback the journal superblock */
+ if ((rc = io_channel_write_blk64(fs->io,
+ ext2fs_journal_sb_start(fs->blocksize),
+ -SUPERBLOCK_SIZE, buf)))
+ goto closefs;
+ } else if (rc != EXT2_ET_UNSUPP_FEATURE)
+ goto closefs;
+ else {
+ rc = 0; /** Reset rc to avoid ext2fs_mmp_stop() */
+
+ if ((rc = fs_update_journal_user(sb, old_uuid)))
+ goto closefs;
+ }
+ }
+
+ if (I_flag) {
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fputs(_("The inode size may only be "
+ "changed when the filesystem is "
+ "unmounted.\n"), stderr);
+ rc = 1;
+ goto closefs;
+ }
+ if (ext2fs_has_feature_flex_bg(fs->super)) {
+ fputs(_("Changing the inode size not supported for "
+ "filesystems with the flex_bg\n"
+ "feature enabled.\n"),
+ stderr);
+ rc = 1;
+ goto closefs;
+ }
+ /*
+ * We want to update group descriptor also
+ * with the new free inode count
+ */
+ if (rewrite_checksums)
+ fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+ retval = resize_inode(fs, new_inode_size);
+ if (rewrite_checksums)
+ fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ if (retval == 0) {
+ printf(_("Setting inode size %lu\n"),
+ new_inode_size);
+ rewrite_checksums = REWRITE_ALL;
+ } else {
+ printf("%s", _("Failed to change inode size\n"));
+ rc = 1;
+ goto closefs;
+ }
+ }
+
+ if (rewrite_checksums) {
+ retval = rewrite_metadata_checksums(fs, rewrite_checksums);
+ if (retval != 0) {
+ printf("Failed to rewrite metadata checksums\n");
+ rc = 1;
+ goto closefs;
+ }
+ }
+
+ if (l_flag)
+ list_super(sb);
+ if (stride_set) {
+ sb->s_raid_stride = stride;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting stride size to %d\n"), stride);
+ }
+ if (stripe_width_set) {
+ sb->s_raid_stripe_width = stripe_width;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting stripe width to %d\n"), stripe_width);
+ }
+ if (ext_mount_opts) {
+ strncpy((char *)(fs->super->s_mount_opts), ext_mount_opts,
+ sizeof(fs->super->s_mount_opts));
+ fs->super->s_mount_opts[sizeof(fs->super->s_mount_opts)-1] = 0;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Setting extended default mount options to '%s'\n"),
+ ext_mount_opts);
+ free(ext_mount_opts);
+ }
+
+ free(device_name);
+ remove_error_table(&et_ext2_error_table);
+
+closefs:
+ if (fd >= 0)
+ close(fd);
+ if (fsuuid)
+ free(fsuuid);
+ if (rc) {
+ ext2fs_mmp_stop(fs);
+#ifndef BUILD_AS_LIB
+ exit(1);
+#endif
+ }
+
+ if (feature_64bit)
+ convert_64bit(fs, feature_64bit);
+
+ retval = ext2fs_close_free(&fs);
+ if (retval) {
+ com_err("tune2fs", retval,
+ _("while writing out and closing file system"));
+ rc = 1;
+ }
+
+ return rc;
+}
diff --git a/misc/tune2fs.h b/misc/tune2fs.h
new file mode 100644
index 0000000..f31c832
--- /dev/null
+++ b/misc/tune2fs.h
@@ -0,0 +1,26 @@
+/*
+ * tune2fs.h - Change the file system parameters on an ext2 file system
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _TUNE2FS_H_
+#define _TUNE2FS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Takes exactly the same args as the tune2fs executable.
+ * Is the entry point for libtune2fs.
+ */
+int tune2fs_main(int argc, char **argv);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/misc/util.c b/misc/util.c
new file mode 100644
index 0000000..3e83169
--- /dev/null
+++ b/misc/util.c
@@ -0,0 +1,330 @@
+/*
+ * util.c --- helper functions used by tune2fs and mke2fs
+ *
+ * Copyright 1995, 1996, 1997, 1998, 1999, 2000 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#ifdef _WIN32
+#define _POSIX
+#define __USE_MINGW_ALARM
+#endif
+
+#include "config.h"
+#include <fcntl.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_LINUX_MAJOR_H
+#include <linux/major.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <time.h>
+
+#include "et/com_err.h"
+#include "e2p/e2p.h"
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "support/nls-enable.h"
+#include "support/devname.h"
+#include "blkid/blkid.h"
+#include "util.h"
+
+char *journal_location_string = NULL;
+
+#ifndef HAVE_STRCASECMP
+int strcasecmp (char *s1, char *s2)
+{
+ while (*s1 && *s2) {
+ int ch1 = *s1++, ch2 = *s2++;
+ if (isupper (ch1))
+ ch1 = tolower (ch1);
+ if (isupper (ch2))
+ ch2 = tolower (ch2);
+ if (ch1 != ch2)
+ return ch1 - ch2;
+ }
+ return *s1 ? 1 : *s2 ? -1 : 0;
+}
+#endif
+
+/*
+ * Given argv[0], return the program name.
+ */
+char *get_progname(char *argv_zero)
+{
+ char *cp;
+
+ cp = strrchr(argv_zero, '/');
+ if (!cp )
+ return argv_zero;
+ else
+ return cp+1;
+}
+
+static jmp_buf alarm_env;
+
+static void alarm_signal(int signal EXT2FS_ATTR((unused)))
+{
+ longjmp(alarm_env, 1);
+}
+
+void proceed_question(int delay)
+{
+ char buf[256];
+ const char *short_yes = _("yY");
+ const char *english_yes = "yY";
+
+ fflush(stdout);
+ fflush(stderr);
+ if (delay > 0) {
+ if (setjmp(alarm_env)) {
+ signal(SIGALRM, SIG_IGN);
+ printf("%s", _("<proceeding>\n"));
+ return;
+ }
+ signal(SIGALRM, alarm_signal);
+ printf(_("Proceed anyway (or wait %d seconds to proceed) ? (y,N) "),
+ delay);
+ alarm(delay);
+ } else
+ fputs(_("Proceed anyway? (y,N) "), stdout);
+ buf[0] = 0;
+ if (!fgets(buf, sizeof(buf), stdin) ||
+ strchr(_("nN"), buf[0]) ||
+ !(strchr(short_yes, buf[0]) ||
+ strchr(english_yes, buf[0]))) {
+ putc('\n', stdout);
+ exit(1);
+ }
+ signal(SIGALRM, SIG_IGN);
+}
+
+void check_mount(const char *device, int force, const char *type)
+{
+ errcode_t retval;
+ int mount_flags;
+
+ retval = ext2fs_check_if_mounted(device, &mount_flags);
+ if (retval) {
+ com_err("ext2fs_check_if_mount", retval,
+ _("while determining whether %s is mounted."),
+ device);
+ return;
+ }
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fprintf(stderr, _("%s is mounted; "), device);
+ if (force >= 2) {
+ fputs(_("mke2fs forced anyway. Hope /etc/mtab is "
+ "incorrect.\n"), stderr);
+ return;
+ }
+ abort_mke2fs:
+ fprintf(stderr, _("will not make a %s here!\n"), type);
+ exit(1);
+ }
+ if (mount_flags & EXT2_MF_BUSY) {
+ fprintf(stderr, _("%s is apparently in use by the system; "),
+ device);
+ if (force >= 2) {
+ fputs(_("mke2fs forced anyway.\n"), stderr);
+ return;
+ }
+ goto abort_mke2fs;
+ }
+}
+
+void parse_journal_opts(const char *opts)
+{
+ char *buf, *token, *next, *p, *arg;
+ int len;
+ int journal_usage = 0;
+
+ len = strlen(opts);
+ buf = malloc(len+1);
+ if (!buf) {
+ fputs(_("Couldn't allocate memory to parse journal "
+ "options!\n"), stderr);
+ exit(1);
+ }
+ strcpy(buf, opts);
+ for (token = buf; token && *token; token = next) {
+ p = strchr(token, ',');
+ next = 0;
+ if (p) {
+ *p = 0;
+ next = p+1;
+ }
+ arg = strchr(token, '=');
+ if (arg) {
+ *arg = 0;
+ arg++;
+ }
+#if 0
+ printf("Journal option=%s, argument=%s\n", token,
+ arg ? arg : "NONE");
+#endif
+ if (strcmp(token, "device") == 0) {
+ journal_device = get_devname(NULL, arg, NULL);
+ if (!journal_device) {
+ if (arg)
+ fprintf(stderr, _("\nCould not find "
+ "journal device matching %s\n"),
+ arg);
+ journal_usage++;
+ continue;
+ }
+ } else if (strcmp(token, "size") == 0) {
+ if (!arg) {
+ journal_usage++;
+ continue;
+ }
+ journal_size = strtoul(arg, &p, 0);
+ if (*p)
+ journal_usage++;
+ } else if (strcmp(token, "fast_commit_size") == 0) {
+ if (!arg) {
+ journal_usage++;
+ continue;
+ }
+ journal_fc_size = strtoul(arg, &p, 0);
+ if (*p)
+ journal_usage++;
+ } else if (!strcmp(token, "location")) {
+ if (!arg) {
+ journal_usage++;
+ continue;
+ }
+ journal_location_string = strdup(arg);
+ } else if (strcmp(token, "v1_superblock") == 0) {
+ journal_flags |= EXT2_MKJOURNAL_V1_SUPER;
+ continue;
+ } else
+ journal_usage++;
+ }
+ if (journal_usage) {
+ fputs(_("\nBad journal options specified.\n\n"
+ "Journal options are separated by commas, "
+ "and may take an argument which\n"
+ "\tis set off by an equals ('=') sign.\n\n"
+ "Valid journal options are:\n"
+ "\tsize=<journal size in megabytes>\n"
+ "\tdevice=<journal device>\n"
+ "\tlocation=<journal location>\n\n"
+ "The journal size must be between "
+ "1024 and 10240000 filesystem blocks.\n\n"), stderr);
+ free(buf);
+ exit(1);
+ }
+ free(buf);
+}
+
+static inline int jsize_to_blks(ext2_filsys fs, int size)
+{
+ return (size * 1024) / (fs->blocksize / 1024);
+}
+
+/* Fast commit size is in KBs */
+static inline int fcsize_to_blks(ext2_filsys fs, int size)
+{
+ return (size * 1024) / (fs->blocksize);
+}
+
+/*
+ * Determine the number of journal blocks to use, either via
+ * user-specified # of megabytes, or via some intelligently selected
+ * defaults.
+ *
+ * Find a reasonable journal file size (in blocks) given the number of blocks in
+ * the filesystem. For very small filesystems, it is not reasonable to have a
+ * journal that fills more than half of the filesystem.
+ */
+void figure_journal_size(struct ext2fs_journal_params *jparams,
+ int requested_j_size, int requested_fc_size, ext2_filsys fs)
+{
+ int total_blocks, ret;
+
+ ret = ext2fs_get_journal_params(jparams, fs);
+ if (ret) {
+ fputs(_("\nFilesystem too small for a journal\n"), stderr);
+ return;
+ }
+
+ if (requested_j_size > 0 ||
+ (ext2fs_has_feature_fast_commit(fs->super) && requested_fc_size > 0)) {
+ if (requested_j_size > 0)
+ jparams->num_journal_blocks =
+ jsize_to_blks(fs, requested_j_size);
+ if (ext2fs_has_feature_fast_commit(fs->super) &&
+ requested_fc_size > 0)
+ jparams->num_fc_blocks =
+ fcsize_to_blks(fs, requested_fc_size);
+ else if (!ext2fs_has_feature_fast_commit(fs->super))
+ jparams->num_fc_blocks = 0;
+ total_blocks = jparams->num_journal_blocks + jparams->num_fc_blocks;
+ if (total_blocks < 1024 || total_blocks > 10240000) {
+ fprintf(stderr, _("\nThe total requested journal "
+ "size is %d blocks; it must be\n"
+ "between 1024 and 10240000 blocks. "
+ "Aborting.\n"),
+ total_blocks);
+ exit(1);
+ }
+ if ((unsigned int) total_blocks > ext2fs_free_blocks_count(fs->super) / 2) {
+ fputs(_("\nTotal journal size too big for filesystem.\n"),
+ stderr);
+ exit(1);
+ }
+ }
+}
+
+void print_check_message(int mnt, unsigned int check)
+{
+ if (mnt < 0)
+ mnt = 0;
+ if (!mnt && !check)
+ return;
+ printf(_("This filesystem will be automatically "
+ "checked every %d mounts or\n"
+ "%g days, whichever comes first. "
+ "Use tune2fs -c or -i to override.\n"),
+ mnt, ((double) check) / (3600 * 24));
+}
+
+void dump_mmp_msg(struct mmp_struct *mmp, const char *msg)
+{
+
+ if (msg)
+ printf("MMP check failed: %s\n", msg);
+ if (mmp) {
+ time_t t = mmp->mmp_time;
+
+ printf("MMP error info: node: %.*s, device: %.*s, updated: %s",
+ EXT2_LEN_STR(mmp->mmp_nodename),
+ EXT2_LEN_STR(mmp->mmp_bdevname), ctime(&t));
+ }
+}
diff --git a/misc/util.h b/misc/util.h
new file mode 100644
index 0000000..ccdc7fb
--- /dev/null
+++ b/misc/util.h
@@ -0,0 +1,29 @@
+/*
+ * util.h --- header file defining prototypes for helper functions
+ * used by tune2fs and mke2fs
+ *
+ * Copyright 2000 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+extern int journal_size;
+extern int journal_fc_size;
+extern int journal_flags;
+extern char *journal_device;
+extern char *journal_location_string;
+
+#ifndef HAVE_STRCASECMP
+extern int strcasecmp (char *s1, char *s2);
+#endif
+extern char *get_progname(char *argv_zero);
+extern void proceed_question(int delay);
+extern void parse_journal_opts(const char *opts);
+extern void check_mount(const char *device, int force, const char *type);
+extern void figure_journal_size(struct ext2fs_journal_params *jparams,
+ int requested_j_size, int requested_fc_size, ext2_filsys fs);
+extern void print_check_message(int, unsigned int);
+extern void dump_mmp_msg(struct mmp_struct *mmp, const char *msg);
diff --git a/misc/uuidd.8.in b/misc/uuidd.8.in
new file mode 100644
index 0000000..e65e391
--- /dev/null
+++ b/misc/uuidd.8.in
@@ -0,0 +1,97 @@
+.\" -*- nroff -*-
+.\" Copyright 2007 by Theodore Ts'o. All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH UUIDD 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuidd \- UUID generation daemon
+.SH SYNOPSIS
+.B uuidd
+[
+.B \-d
+]
+[
+.B \-p
+.I pidfile
+]
+[
+.B \-s
+.I socketpath
+]
+[
+.B \-T
+.I timeout
+]
+
+.B uuidd
+[
+.B \-r
+|
+.B \-t
+]
+[
+.B \-n
+.I number
+]
+[
+.B \-s
+.I socketpath
+]
+
+.B uuidd \-k
+.SH DESCRIPTION
+The
+.B uuidd
+daemon is used by the UUID library to generate
+universally unique identifiers (UUIDs), especially time-based UUID's
+in a secure and guaranteed-unique fashion, even in the face of large
+numbers of threads trying to grab UUID's running on different CPU's.
+.SH OPTIONS
+.TP
+.B \-d
+Run
+.B uuidd
+in debugging mode. This prevents uuidd from running as a daemon.
+.TP
+.B \-k
+If a currently uuidd daemon is running, kill it.
+.TP
+.BI \-n " number"
+When issuing a test request to a running uuidd, request a bulk response
+of
+.I number
+UUID's.
+.TP
+.BI \-p " pidfile"
+Specify the pathname where the pid file should be written. By default,
+the pid file is written to /var/lib/libuuid/uuidd.pid.
+.TP
+.BI \-s " socketpath"
+Specify the pathname used for the unix-domain socket used by uuidd. By
+default, the pathname used is /var/lib/libuuid/request. This is primarily
+for debugging purposes, since the pathname is hard-coded in the libuuid
+library.
+.TP
+.B \-r
+Test uuidd by trying to connect to a running uuidd daemon and
+request it to return a random-based UUID.
+.TP
+.B \-t
+Test uuidd by trying to connect to a running uuidd daemon and
+request it to return a time-based UUID.
+.TP
+.BI \-T " timeout"
+Specify a timeout for uuidd. If specified, then uuidd will exit after
+.I timeout
+seconds of inactivity.
+.SH AUTHOR
+The
+.B uuidd
+daemon was written by Theodore Ts'o <tytso@mit.edu>.
+.SH AVAILABILITY
+.B uuidd
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3),
+.BR uuidgen (1)
diff --git a/misc/uuidd.c b/misc/uuidd.c
new file mode 100644
index 0000000..4db3fa9
--- /dev/null
+++ b/misc/uuidd.c
@@ -0,0 +1,600 @@
+/*
+ * uuidd.c --- UUID-generation daemon
+ *
+ * Copyright (C) 2007 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#define _GNU_SOURCE /* for setres[ug]id() */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <unistd.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <string.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int getopt(int argc, char * const argv[], const char *optstring);
+extern char *optarg;
+extern int optind;
+#endif
+#include "uuid/uuid.h"
+#include "uuid/uuidd.h"
+#include "support/nls-enable.h"
+#include "ext2fs/ext2fs.h"
+
+#ifdef __GNUC__
+#define CODE_ATTR(x) __attribute__(x)
+#else
+#define CODE_ATTR(x)
+#endif
+
+static void usage(const char *progname)
+{
+ fprintf(stderr, _("Usage: %s [-d] [-p pidfile] [-s socketpath] "
+ "[-T timeout]\n"), progname);
+ fprintf(stderr, _(" %s [-r|t] [-n num] [-s socketpath]\n"),
+ progname);
+ fprintf(stderr, _(" %s -k\n"), progname);
+ exit(1);
+}
+
+static void die(const char *msg)
+{
+ perror(msg);
+ exit(1);
+}
+
+static void create_daemon(void)
+{
+ pid_t pid;
+ uid_t euid;
+
+ pid = fork();
+ if (pid == -1) {
+ perror("fork");
+ exit(1);
+ } else if (pid != 0) {
+ exit(0);
+ }
+
+ close(0);
+ close(1);
+ close(2);
+ open("/dev/null", O_RDWR);
+ open("/dev/null", O_RDWR);
+ open("/dev/null", O_RDWR);
+
+ if (chdir("/")) {} /* Silence warn_unused_result warning */
+ (void) setsid();
+ euid = geteuid();
+ if (setreuid(euid, euid) < 0)
+ die("setreuid");
+}
+
+static ssize_t read_all(int fd, char *buf, size_t count)
+{
+ ssize_t ret;
+ ssize_t c = 0;
+ int tries = 0;
+
+ memset(buf, 0, count);
+ while (count > 0) {
+ ret = read(fd, buf, count);
+ if (ret <= 0) {
+ if ((errno == EAGAIN || errno == EINTR || ret == 0) &&
+ (tries++ < 5))
+ continue;
+ return c ? c : -1;
+ }
+ if (ret > 0)
+ tries = 0;
+ count -= ret;
+ buf += ret;
+ c += ret;
+ }
+ return c;
+}
+
+static int write_all(int fd, char *buf, size_t count)
+{
+ ssize_t ret;
+ int c = 0;
+
+ while (count > 0) {
+ ret = write(fd, buf, count);
+ if (ret < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ return -1;
+ }
+ count -= ret;
+ buf += ret;
+ c += ret;
+ }
+ return c;
+}
+
+static const char *cleanup_pidfile, *cleanup_socket;
+
+static void terminate_intr(int signo CODE_ATTR((unused)))
+{
+ (void) unlink(cleanup_pidfile);
+ if (cleanup_socket)
+ (void) unlink(cleanup_socket);
+ exit(0);
+}
+
+static int call_daemon(const char *socket_path, int op, char *buf,
+ int buflen, int *num, const char **err_context)
+{
+ char op_buf[8];
+ int op_len;
+ int s;
+ ssize_t ret;
+ int32_t reply_len = 0;
+ struct sockaddr_un srv_addr;
+
+ if (((op == 4) || (op == 5)) && !num) {
+ if (err_context)
+ *err_context = _("bad arguments");
+ errno = EINVAL;
+ return -1;
+ }
+
+ if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ if (err_context)
+ *err_context = _("socket");
+ return -1;
+ }
+
+ srv_addr.sun_family = AF_UNIX;
+ strncpy(srv_addr.sun_path, socket_path, sizeof(srv_addr.sun_path));
+ srv_addr.sun_path[sizeof(srv_addr.sun_path)-1] = '\0';
+
+ if (connect(s, (const struct sockaddr *) &srv_addr,
+ sizeof(struct sockaddr_un)) < 0) {
+ if (err_context)
+ *err_context = _("connect");
+ close(s);
+ return -1;
+ }
+
+ if (op == 5) {
+ if ((*num)*16 > buflen-4)
+ *num = (buflen-4) / 16;
+ }
+ op_buf[0] = op;
+ op_len = 1;
+ if ((op == 4) || (op == 5)) {
+ memcpy(op_buf+1, num, sizeof(int));
+ op_len += sizeof(int);
+ }
+
+ ret = write_all(s, op_buf, op_len);
+ if (ret < op_len) {
+ if (err_context)
+ *err_context = _("write");
+ close(s);
+ return -1;
+ }
+
+ ret = read_all(s, (char *) &reply_len, sizeof(reply_len));
+ if (ret < 0) {
+ if (err_context)
+ *err_context = _("read count");
+ close(s);
+ return -1;
+ }
+ if (reply_len < 0 || reply_len > buflen) {
+ if (err_context)
+ *err_context = _("bad response length");
+ close(s);
+ return -1;
+ }
+ ret = read_all(s, (char *) buf, reply_len);
+
+ if ((ret > 0) && (op == 4)) {
+ if (reply_len >= (int) (16+sizeof(int)))
+ memcpy(buf+16, num, sizeof(int));
+ else
+ *num = -1;
+ }
+ if ((ret > 0) && (op == 5)) {
+ if (*num >= (int) sizeof(int))
+ memcpy(buf, num, sizeof(int));
+ else
+ *num = -1;
+ }
+
+ close(s);
+
+ return ret;
+}
+
+static void server_loop(const char *socket_path, const char *pidfile_path,
+ int debug, int timeout, int quiet)
+{
+ struct sockaddr_un my_addr, from_addr;
+ struct flock fl;
+ socklen_t fromlen;
+ int32_t reply_len = 0;
+ uuid_t uu;
+ mode_t save_umask;
+ char reply_buf[1024], *cp;
+ char op, str[UUID_STR_SIZE];
+ int i, s, ns, len, num;
+ int fd_pidfile, ret;
+
+ fd_pidfile = open(pidfile_path, O_CREAT | O_RDWR, 0664);
+ if (fd_pidfile < 0) {
+ if (!quiet)
+ fprintf(stderr, "Failed to open/create %s: %s\n",
+ pidfile_path, strerror(errno));
+ exit(1);
+ }
+ cleanup_pidfile = pidfile_path;
+ cleanup_socket = 0;
+ signal(SIGALRM, terminate_intr);
+ alarm(30);
+ fl.l_type = F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ fl.l_pid = 0;
+ while (fcntl(fd_pidfile, F_SETLKW, &fl) < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ if (!quiet)
+ fprintf(stderr, "Failed to lock %s: %s\n",
+ pidfile_path, strerror(errno));
+ exit(1);
+ }
+ ret = call_daemon(socket_path, 0, reply_buf, sizeof(reply_buf), 0, 0);
+ if (ret > 0) {
+ if (!quiet)
+ printf(_("uuidd daemon already running at pid %s\n"),
+ reply_buf);
+ exit(1);
+ }
+ alarm(0);
+
+ if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ if (!quiet)
+ fprintf(stderr, _("Couldn't create unix stream "
+ "socket: %s"), strerror(errno));
+ exit(1);
+ }
+
+ /*
+ * Make sure the socket isn't using fd numbers 0-2 to avoid it
+ * getting closed by create_daemon()
+ */
+ while (!debug && s <= 2) {
+ s = dup(s);
+ if (s < 0) {
+ perror("dup");
+ exit(1);
+ }
+ }
+
+ /*
+ * Create the address we will be binding to.
+ */
+ my_addr.sun_family = AF_UNIX;
+ strncpy(my_addr.sun_path, socket_path, sizeof(my_addr.sun_path));
+ my_addr.sun_path[sizeof(my_addr.sun_path)-1] = '\0';
+ (void) unlink(socket_path);
+ save_umask = umask(0);
+ if (bind(s, (const struct sockaddr *) &my_addr,
+ sizeof(struct sockaddr_un)) < 0) {
+ if (!quiet)
+ fprintf(stderr,
+ _("Couldn't bind unix socket %s: %s\n"),
+ socket_path, strerror(errno));
+ exit(1);
+ }
+ (void) umask(save_umask);
+
+ if (listen(s, 5) < 0) {
+ if (!quiet)
+ fprintf(stderr, _("Couldn't listen on unix "
+ "socket %s: %s\n"), socket_path,
+ strerror(errno));
+ exit(1);
+ }
+
+ cleanup_socket = socket_path;
+ if (!debug)
+ create_daemon();
+ signal(SIGHUP, terminate_intr);
+ signal(SIGINT, terminate_intr);
+ signal(SIGTERM, terminate_intr);
+ signal(SIGALRM, terminate_intr);
+ signal(SIGPIPE, SIG_IGN);
+
+ sprintf(reply_buf, "%8d\n", getpid());
+ if (ftruncate(fd_pidfile, 0)) {} /* Silence warn_unused_result */
+ write_all(fd_pidfile, reply_buf, strlen(reply_buf));
+ if (fd_pidfile > 1)
+ close(fd_pidfile); /* Unlock the pid file */
+
+ while (1) {
+ fromlen = sizeof(from_addr);
+ if (timeout > 0)
+ alarm(timeout);
+ ns = accept(s, (struct sockaddr *) &from_addr, &fromlen);
+ alarm(0);
+ if (ns < 0) {
+ if ((errno == EAGAIN) || (errno == EINTR))
+ continue;
+ perror("accept");
+ exit(1);
+ }
+ len = read(ns, &op, 1);
+ if (len != 1) {
+ if (len < 0)
+ perror("read");
+ else
+ printf(_("Error reading from client, "
+ "len = %d\n"), len);
+ goto shutdown_socket;
+ }
+ if ((op == 4) || (op == 5)) {
+ if (read_all(ns, (char *) &num, sizeof(num)) != 4)
+ goto shutdown_socket;
+ if (debug)
+ printf(_("operation %d, incoming num = %d\n"),
+ op, num);
+ } else if (debug)
+ printf("operation %d\n", op);
+
+ switch(op) {
+ case UUIDD_OP_GETPID:
+ sprintf(reply_buf, "%d", getpid());
+ reply_len = strlen(reply_buf)+1;
+ break;
+ case UUIDD_OP_GET_MAXOP:
+ sprintf(reply_buf, "%d", UUIDD_MAX_OP);
+ reply_len = strlen(reply_buf)+1;
+ break;
+ case UUIDD_OP_TIME_UUID:
+ num = 1;
+ uuid__generate_time(uu, &num);
+ if (debug) {
+ uuid_unparse(uu, str);
+ printf(_("Generated time UUID: %s\n"), str);
+ }
+ memcpy(reply_buf, uu, sizeof(uu));
+ reply_len = sizeof(uu);
+ break;
+ case UUIDD_OP_RANDOM_UUID:
+ num = 1;
+ uuid__generate_random(uu, &num);
+ if (debug) {
+ uuid_unparse(uu, str);
+ printf(_("Generated random UUID: %s\n"), str);
+ }
+ memcpy(reply_buf, uu, sizeof(uu));
+ reply_len = sizeof(uu);
+ break;
+ case UUIDD_OP_BULK_TIME_UUID:
+ uuid__generate_time(uu, &num);
+ if (debug) {
+ uuid_unparse(uu, str);
+ printf(P_("Generated time UUID %s and "
+ "subsequent UUID\n",
+ "Generated time UUID %s and %d "
+ "subsequent UUIDs\n", num),
+ str, num);
+ }
+ memcpy(reply_buf, uu, sizeof(uu));
+ reply_len = sizeof(uu);
+ memcpy(reply_buf+reply_len, &num, sizeof(num));
+ reply_len += sizeof(num);
+ break;
+ case UUIDD_OP_BULK_RANDOM_UUID:
+ if (num < 0)
+ num = 1;
+ if (num > 1000)
+ num = 1000;
+ if (num*16 > (int) (sizeof(reply_buf)-sizeof(num)))
+ num = (sizeof(reply_buf)-sizeof(num)) / 16;
+ uuid__generate_random((unsigned char *) reply_buf +
+ sizeof(num), &num);
+ if (debug) {
+ printf(_("Generated %d UUID's:\n"), num);
+ for (i=0, cp=reply_buf+sizeof(num);
+ i < num; i++, cp+=16) {
+ uuid_unparse((unsigned char *)cp, str);
+ printf("\t%s\n", str);
+ }
+ }
+ reply_len = (num*16) + sizeof(num);
+ memcpy(reply_buf, &num, sizeof(num));
+ break;
+ default:
+ if (debug)
+ printf(_("Invalid operation %d\n"), op);
+ goto shutdown_socket;
+ }
+ write_all(ns, (char *) &reply_len, sizeof(reply_len));
+ write_all(ns, reply_buf, reply_len);
+ shutdown_socket:
+ close(ns);
+ }
+}
+
+int main(int argc, char **argv)
+{
+ const char *socket_path = UUIDD_SOCKET_PATH;
+ const char *pidfile_path = UUIDD_PIDFILE_PATH;
+ const char *err_context;
+ char buf[1024], *cp;
+ char str[37], *tmp;
+ uuid_t uu;
+ uid_t uid;
+ gid_t gid;
+ int i, c, ret;
+ int debug = 0, do_type = 0, do_kill = 0, num = 0;
+ int timeout = 0, quiet = 0, drop_privs = 0;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+
+ while ((c = getopt (argc, argv, "dkn:qp:s:tT:r")) != EOF) {
+ switch (c) {
+ case 'd':
+ debug++;
+ drop_privs = 1;
+ break;
+ case 'k':
+ do_kill++;
+ drop_privs = 1;
+ break;
+ case 'n':
+ num = strtol(optarg, &tmp, 0);
+ if ((num < 0) || *tmp) {
+ fprintf(stderr, _("Bad number: %s\n"), optarg);
+ exit(1);
+ }
+ break;
+ case 'p':
+ pidfile_path = optarg;
+ drop_privs = 1;
+ break;
+ case 'q':
+ quiet++;
+ break;
+ case 's':
+ socket_path = optarg;
+ drop_privs = 1;
+ break;
+ case 't':
+ do_type = UUIDD_OP_TIME_UUID;
+ drop_privs = 1;
+ break;
+ case 'T':
+ timeout = strtol(optarg, &tmp, 0);
+ if ((timeout < 0) || *tmp) {
+ fprintf(stderr, _("Bad number: %s\n"), optarg);
+ exit(1);
+ }
+ break;
+ case 'r':
+ do_type = UUIDD_OP_RANDOM_UUID;
+ drop_privs = 1;
+ break;
+ default:
+ usage(argv[0]);
+ }
+ }
+ uid = getuid();
+ if (uid && drop_privs) {
+ gid = getgid();
+#ifdef HAVE_SETRESGID
+ if (setresgid(gid, gid, gid) < 0)
+ die("setresgid");
+#else
+ if (setregid(gid, gid) < 0)
+ die("setregid");
+#endif
+
+#ifdef HAVE_SETRESUID
+ if (setresuid(uid, uid, uid) < 0)
+ die("setresuid");
+#else
+ if (setreuid(uid, uid) < 0)
+ die("setreuid");
+#endif
+ }
+ if (num && do_type) {
+ ret = call_daemon(socket_path, do_type+2, buf,
+ sizeof(buf), &num, &err_context);
+ if (ret < 0) {
+ printf(_("Error calling uuidd daemon (%s): %s\n"),
+ err_context, strerror(errno));
+ exit(1);
+ }
+ if (do_type == UUIDD_OP_TIME_UUID) {
+ if (ret != sizeof(uu) + sizeof(num))
+ goto unexpected_size;
+
+ uuid_unparse((unsigned char *) buf, str);
+
+ printf(P_("%s and subsequent UUID\n",
+ "%s and subsequent %d UUIDs\n", num),
+ str, num);
+ } else {
+ printf("%s", _("List of UUID's:\n"));
+ cp = buf + 4;
+ if (ret != (int) (sizeof(num) + num*sizeof(uu)))
+ goto unexpected_size;
+ for (i=0; i < num; i++, cp+=16) {
+ uuid_unparse((unsigned char *) cp, str);
+ printf("\t%s\n", str);
+ }
+ }
+ exit(0);
+ }
+ if (do_type) {
+ ret = call_daemon(socket_path, do_type, (char *) &uu,
+ sizeof(uu), 0, &err_context);
+ if (ret < 0) {
+ printf(_("Error calling uuidd daemon (%s): %s\n"),
+ err_context, strerror(errno));
+ exit(1);
+ }
+ if (ret != sizeof(uu)) {
+ unexpected_size:
+ printf(_("Unexpected reply length from server %d\n"),
+ ret);
+ exit(1);
+ }
+ uuid_unparse(uu, str);
+
+ printf("%s\n", str);
+ exit(0);
+ }
+
+ if (do_kill) {
+ ret = call_daemon(socket_path, 0, buf, sizeof(buf), 0, 0);
+ if ((ret > 0) && ((do_kill = atoi((char *) buf)) > 0)) {
+ ret = kill(do_kill, SIGTERM);
+ if (ret < 0) {
+ if (!quiet)
+ fprintf(stderr,
+ _("Couldn't kill uuidd running "
+ "at pid %d: %s\n"), do_kill,
+ strerror(errno));
+ exit(1);
+ }
+ if (!quiet)
+ printf(_("Killed uuidd running at pid %d\n"),
+ do_kill);
+ }
+ exit(0);
+ }
+
+ server_loop(socket_path, pidfile_path, debug, timeout, quiet);
+ return 0;
+}
diff --git a/misc/uuidd.rc b/misc/uuidd.rc
new file mode 100644
index 0000000..d35645a
--- /dev/null
+++ b/misc/uuidd.rc
@@ -0,0 +1,55 @@
+#! /bin/sh -e
+### BEGIN INIT INFO
+# Provides: uuidd
+# Required-Start: $time $local_fs
+# Required-Stop: $time $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: uuidd daemon
+# Description: Init script for the uuid generation daemon
+### END INIT INFO
+#
+# Author: "Theodore Ts'o" <tytso@mit.edu>
+#
+set -e
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/uuidd
+PIDFILE=/var/run/uuidd/uuidd.pid
+
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+case "$1" in
+ start)
+ log_daemon_msg "Starting uuid generator" "uuidd"
+ start_daemon -p $PIDFILE $DAEMON
+ log_end_msg $?
+ ;;
+ stop)
+ log_daemon_msg "Stopping uuidd generator" "uuidd"
+ killproc -p $PIDFILE $DAEMON
+ log_end_msg $?
+ ;;
+ status)
+ if pidofproc -p $PIDFILE $DAEMON >& /dev/null ; then
+ echo "$DAEMON is running";
+ exit 0;
+ else
+ echo "$DAEMON is NOT running";
+ if test -f /var/run/uuidd.pid; then exit 2; fi
+ exit 3;
+ fi
+ ;;
+ force-reload|restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/uuidd {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/misc/uuidgen.1.in b/misc/uuidgen.1.in
new file mode 100644
index 0000000..cb8b3a8
--- /dev/null
+++ b/misc/uuidgen.1.in
@@ -0,0 +1,63 @@
+.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
+.\"
+.\" This man page was created for libuuid.so.1.1 from e2fsprogs-1.14.
+.\"
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.\" Created Wed Mar 10 17:42:12 1999, Andreas Dilger
+.TH UUIDGEN 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuidgen \- command\-line utility to create a new UUID value
+.SH SYNOPSIS
+.B uuidgen
+[
+.B \-r
+|
+.B \-t
+]
+.SH DESCRIPTION
+The
+.B uuidgen
+program creates (and prints)
+a new universally unique identifier (UUID) using the
+.BR libuuid (3)
+library. The new UUID can reasonably be considered unique among
+all UUIDs created on the local system,
+and among UUIDs created on other systems in the past
+and in the future.
+.PP
+There are two types of UUID's which
+.B uuidgen
+can generate: time-based UUID's and random-based UUID's. By
+default
+.B uuidgen
+will generate a random-based UUID if a high-quality random number
+generator is present. Otherwise, it will chose a time-based UUID. It
+is possible to force the generation of one of these two
+UUID types by using the
+.B \-r
+or
+.B \-t
+options.
+.SH OPTIONS
+.TP
+.B \-r
+Generate a random-based UUID. This method creates a UUID consisting mostly
+of random bits. It requires that the operating system have a high
+quality random number generator, such as
+.IR /dev/random .
+.TP
+.B \-t
+Generate a time-based UUID. This method creates a UUID based on the system
+clock plus the system's ethernet hardware address, if present.
+.SH "CONFORMING TO"
+OSF DCE 1.1
+.SH AUTHOR
+.B uuidgen
+was written by Andreas Dilger for libuuid.
+.SH AVAILABILITY
+.B uuidgen
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3)
diff --git a/misc/uuidgen.c b/misc/uuidgen.c
new file mode 100644
index 0000000..1233f3d
--- /dev/null
+++ b/misc/uuidgen.c
@@ -0,0 +1,80 @@
+/*
+ * gen_uuid.c --- generate a DCE-compatible uuid
+ *
+ * Copyright (C) 1999, Andreas Dilger and Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int getopt(int argc, char * const argv[], const char *optstring);
+extern char *optarg;
+extern int optind;
+#endif
+#include "uuid/uuid.h"
+#include "support/nls-enable.h"
+
+#define DO_TYPE_TIME 1
+#define DO_TYPE_RANDOM 2
+
+static void usage(const char *progname)
+{
+ fprintf(stderr, _("Usage: %s [-r] [-t]\n"), progname);
+ exit(1);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int c;
+ int do_type = 0;
+ char str[37];
+ uuid_t uu;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+
+ while ((c = getopt (argc, argv, "tr")) != EOF)
+ switch (c) {
+ case 't':
+ do_type = DO_TYPE_TIME;
+ break;
+ case 'r':
+ do_type = DO_TYPE_RANDOM;
+ break;
+ default:
+ usage(argv[0]);
+ }
+
+ switch (do_type) {
+ case DO_TYPE_TIME:
+ uuid_generate_time(uu);
+ break;
+ case DO_TYPE_RANDOM:
+ uuid_generate_random(uu);
+ break;
+ default:
+ uuid_generate(uu);
+ break;
+ }
+
+ uuid_unparse(uu, str);
+
+ printf("%s\n", str);
+
+ return 0;
+}
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..ef3bda2
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1 @@
+ca cs da de eo es fi fr fur hu id it ms nl pl pt sr sv tr uk vi zh_CN
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..f21852f
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,493 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+#
+# Origin: gettext-0.19.8
+GETTEXT_MACRO_VERSION = 0.19
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SED = @SED@
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+# When building gettext-tools, we prefer to use the built programs
+# rather than installed programs. However, we can't do that when we
+# are cross compiling.
+CROSS_COMPILING = @CROSS_COMPILING@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+ $(E) "$(MSGFMT) -c -o $@ $<"; \
+ $(Q) $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: all-@USE_NLS@
+
+all-yes: @MAINTAINER_CMT@stamp-po
+all-no:
+all-static:
+depend:
+coverage.txt:
+
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+CHECK_MACRO_VERSION = \
+ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+ exit 1; \
+ }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+ @$(CHECK_MACRO_VERSION)
+ test ! -f $(srcdir)/$(DOMAIN).pot || \
+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+ echo "touch stamp-po" && \
+ echo timestamp > stamp-poT && \
+ mv stamp-poT stamp-po; \
+ }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+# The determination of whether the package xyz is a GNU one is based on the
+# heuristic whether some file in the top level directory mentions "GNU xyz".
+# If GNU 'find' is available, we avoid grepping through monster files.
+$(DOMAIN).pot-update: $(srcdir)/POTFILES.in remove-potcdate.sed \
+ $(srcdir)/at-expand.pl
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
+ -size -10000000c -exec grep 'GNU @PACKAGE@' \
+ /dev/null '{}' ';' 2>/dev/null; \
+ else \
+ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+ fi; \
+ } | grep -v 'libtool:' >/dev/null; then \
+ package_gnu=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
+ else \
+ package_prefix=''; \
+ fi; \
+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+ else \
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+ fi; \
+ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --directory=$(top_builddir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ *) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --directory=$(top_builddir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --package-name="$${package_prefix}@PACKAGE@" \
+ --package-version='@VERSION@' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ esac
+ perl $(srcdir)/at-expand.pl < $(DOMAIN).po > $(DOMAIN).po.new
+ mv $(DOMAIN).po $(DOMAIN).po.bak
+ mv $(DOMAIN).po.new $(DOMAIN).po
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot-header; then \
+ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
+ cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
+ rm -f $(DOMAIN).1po; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(POFILESDEPS)
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ if test -f "$(srcdir)/$${lang}.po"; then \
+ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) \
+ && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+ esac; \
+ }; \
+ else \
+ $(MAKE) $${lang}.po-create; \
+ fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ for file in Makevars; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+fullcheck check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f stamp-poT
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -f $(DOMAIN).po.bak
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ dists="$$dists Makevars.template"; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ dists="$$dists $(DOMAIN).pot stamp-po"; \
+ fi; \
+ if test -f $(srcdir)/ChangeLog; then \
+ dists="$$dists ChangeLog"; \
+ fi; \
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
+ if test -f $(srcdir)/ChangeLog.$$i; then \
+ dists="$$dists ChangeLog.$$i"; \
+ fi; \
+ done; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir) || exit 1; \
+ else \
+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+ exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ esac; \
+ }; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@.in @SHELL@ ./config.status po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..932a209
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,71 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=P_:1,2
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Theodore Ts''o
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = tytso@alum.mit.edu
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context. Possible values are "yes" and "no". Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+# --previous to keep previous msgids of translated messages,
+# --quiet to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed. Possible values are "yes" and "no". Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = no
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist". Possible values are "yes" and
+# "no". Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = no
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..f5b5936
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,71 @@
+e2fsck/badblocks.c
+e2fsck/dirinfo.c
+e2fsck/dx_dirinfo.c
+e2fsck/e2fsck.c
+e2fsck/ea_refcount.c
+e2fsck/ehandler.c
+e2fsck/emptydir.c
+e2fsck/encrypted_files.c
+e2fsck/extend.c
+e2fsck/extents.c
+e2fsck/flushb.c
+e2fsck/iscan.c
+e2fsck/journal.c
+e2fsck/logfile.c
+e2fsck/message.c
+e2fsck/mtrace.c
+e2fsck/pass1b.c
+e2fsck/pass1.c
+e2fsck/pass2.c
+e2fsck/pass3.c
+e2fsck/pass4.c
+e2fsck/pass5.c
+e2fsck/problem.c
+e2fsck/quota.c
+e2fsck/readahead.c
+e2fsck/recovery.c
+e2fsck/region.c
+e2fsck/rehash.c
+e2fsck/revoke.c
+e2fsck/scantest.c
+e2fsck/sigcatcher.c
+e2fsck/super.c
+e2fsck/unix.c
+e2fsck/util.c
+misc/badblocks.c
+misc/base_device.c
+misc/blkid.c
+misc/chattr.c
+misc/create_inode.c
+misc/dumpe2fs.c
+misc/e2freefrag.c
+misc/e2fuzz.c
+misc/e2image.c
+misc/e2initrd_helper.c
+misc/e2label.c
+misc/e2undo.c
+misc/e4crypt.c
+misc/e4defrag.c
+misc/filefrag.c
+misc/findsuper.c
+misc/fsck.c
+misc/fuse2fs.c
+misc/ismounted.c
+misc/logsave.c
+misc/lsattr.c
+misc/mke2fs.c
+misc/mk_hugefiles.c
+misc/mklost+found.c
+misc/partinfo.c
+misc/tune2fs.c
+misc/util.c
+misc/uuidd.c
+misc/uuidgen.c
+resize/extent.c
+resize/main.c
+resize/online.c
+resize/resize2fs.c
+resize/sim_progress.c
+lib/ext2fs/ext2_err.c
+lib/support/prof_err.c
+lib/support/plausible.c
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 0000000..baf6528
--- /dev/null
+++ b/po/Rules-quot
@@ -0,0 +1,58 @@
+# This file, Rules-quot, can be copied and used freely without restrictions.
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-create:
+ $(MAKE) en@quot.po-update
+en@boldquot.po-create:
+ $(MAKE) en@boldquot.po-update
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ ll=`echo $$lang | sed -e 's/@.*//'`; \
+ LC_ALL=C; export LC_ALL; \
+ cd $(srcdir); \
+ if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
+ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
+ { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
+ $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
+ ;; \
+ *) \
+ $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
+ ;; \
+ esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
+ ; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "creation of $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+en@quot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+ rm -f *.insert-header
diff --git a/po/at-expand.pl b/po/at-expand.pl
new file mode 100644
index 0000000..fe68556
--- /dev/null
+++ b/po/at-expand.pl
@@ -0,0 +1,158 @@
+#!/usr/bin/perl
+
+my @translator_help = (
+ "#. The strings in e2fsck's problem.c can be very hard to translate,\n",
+ "#. since the strings are expanded in two different ways. First of all,\n",
+ "#. there is an \@-expansion, where strings like \"\@i\" are expanded to\n",
+ "#. \"inode\", and so on. In order to make it easier for translators, the\n",
+ "#. e2fsprogs po template file has been enhanced with comments that show\n",
+ "#. the \@-expansion, for the strings in the problem.c file.\n",
+ "#.\n",
+ "#. Translators are free to use the \@-expansion facility if they so\n",
+ "#. choose, by providing translations for strings in e2fsck/message.c.\n",
+ "#. These translation can completely replace an expansion; for example,\n",
+ "#. if \"bblock\" (which indicated that \"\@b\" would be expanded to \"block\")\n",
+ "#. is translated as \"ddatenverlust\", then \"\@d\" will be expanded to\n",
+ "#. \"datenverlust\". Alternatively, translators can simply not use the\n",
+ "#. \@-expansion facility at all.\n",
+ "#.\n",
+ "#. The second expansion which is done for e2fsck's problem.c messages is\n",
+ "#. a dynamic %-expansion, which expands %i as an inode number, and so\n",
+ "#. on. A table of these expansions can be found below. Note that\n",
+ "#. %-expressions that begin with \"%D\" and \"%I\" are two-character\n",
+ "#. expansions; so for example, \"%Iu\" expands to the inode's user id\n",
+ "#. ownership field (inode->i_uid). Also the \"%B\" expansion is special:\n",
+ "#. it can expand to either the string \"indirect block\" (possibly preceded\n",
+ "#. by the word \"double\" or \"triple\"), or the string \"block #\" immediately\n",
+ "#. followed by an integer indicating a block sequence number.\n",
+ "#.\n",
+ "#. Please note that the %-expansion for most e2fsck's problem.c should not\n",
+ "#. use positional indicators such as %1$c, since although they look like c-style\n",
+ "#. format strings, they are NOT c-style format strings, and the positional\n",
+ "#. indicators (which BTW are GNU extensions and so won't work on other Unix\n",
+ "#. gettext implementations) won't work with e2fsck's print_e2fsck_message()\n",
+ "#. function found in e2fsck/message.c\n",
+ "#.\n",
+ "#. %b <blk> block number\n",
+ "#. %B \"indirect block\" | \"block #\"<blkcount> string | string+integer\n",
+ "#. %c <blk2> block number\n",
+ "#. %Di <dirent> -> ino inode number\n",
+ "#. %Dn <dirent> -> name string\n",
+ "#. %Dr <dirent> -> rec_len\n",
+ "#. %Dl <dirent> -> name_len\n",
+ "#. %Dt <dirent> -> filetype\n",
+ "#. %d <dir> inode number\n",
+ "#. %g <group> integer\n",
+ "#. %i <ino> inode number\n",
+ "#. %Is <inode> -> i_size\n",
+ "#. %IS <inode> -> i_extra_isize\n",
+ "#. %Ib <inode> -> i_blocks\n",
+ "#. %Il <inode> -> i_links_count\n",
+ "#. %Im <inode> -> i_mode\n",
+ "#. %IM <inode> -> i_mtime\n",
+ "#. %IF <inode> -> i_faddr\n",
+ "#. %If <inode> -> i_file_acl\n",
+ "#. %Id <inode> -> i_size_high\n",
+ "#. %Iu <inode> -> i_uid\n",
+ "#. %Ig <inode> -> i_gid\n",
+ "#. %It <str> file type\n",
+ "#. %j <ino2> inode number\n",
+ "#. %m <com_err error message>\n",
+ "#. %N <num>\n",
+ "#. %p ext2fs_get_pathname of directory <ino>\n",
+ "#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as\n",
+ "#. the containing directory. (If dirent is NULL\n",
+ "#. then return the pathname of directory <ino2>)\n",
+ "#. %q ext2fs_get_pathname of directory <dir>\n",
+ "#. %Q ext2fs_get_pathname of directory <ino> with <dir> as\n",
+ "#. the containing directory.\n",
+ "#. %s <str> miscellaneous string\n",
+ "#. %S backup superblock\n",
+ "#. %X <num> hexadecimal format\n",
+ "#.\n");
+
+my $is_problem_file = 0;
+my $save_msg;
+my $msg_accum = "";
+my $msg;
+my $expanded = 0;
+my $lines = 0;
+
+sub do_expand {
+ $msg =~ s/\@a/extended attribute/g;
+ $msg =~ s/\@A/error allocating/g;
+ $msg =~ s/\@b/block/g;
+ $msg =~ s/\@B/bitmap/g;
+ $msg =~ s/\@c/compress/g;
+ $msg =~ s/\@C/conflicts with some other fs block/g;
+ $msg =~ s/\@i/inode/g;
+ $msg =~ s/\@I/illegal/g;
+ $msg =~ s/\@j/journal/g;
+ $msg =~ s/\@D/deleted/g;
+ $msg =~ s/\@d/directory/g;
+ $msg =~ s/\@e/entry/g;
+ $msg =~ s/\@E/entry '%Dn' in %p (%i)/g;
+ $msg =~ s/\@f/filesystem/g;
+ $msg =~ s/\@F/for inode %i (%Q) is/g;
+ $msg =~ s/\@g/group/g;
+ $msg =~ s/\@h/HTREE directory inode/g;
+ $msg =~ s/\@l/lost+found/g;
+ $msg =~ s/\@L/is a link/g;
+ $msg =~ s/\@m/multiply-claimed/g;
+ $msg =~ s/\@n/invalid/g;
+ $msg =~ s/\@o/orphaned/g;
+ $msg =~ s/\@p/problem in/g;
+ $msg =~ s/\@q/quota/g;
+ $msg =~ s/\@r/root inode/g;
+ $msg =~ s/\@s/should be/g;
+ $msg =~ s/\@S/superblock/g;
+ $msg =~ s/\@u/unattached/g;
+ $msg =~ s/\@v/device/g;
+ $msg =~ s/\@x/extent/g;
+ $msg =~ s/\@z/zero-length/g;
+ $msg =~ s/\@\@/@/g;
+}
+
+
+while (<>) {
+ $lines++;
+ if ($lines == 6) {
+ print @translator_help;
+ }
+ if (/^#: /)
+ {
+ $is_problem_file = (/^#: e2fsck\/problem/) ? 1 : 0;
+ }
+ $msg = "";
+ if (/^msgid / && $is_problem_file) {
+ ($msg) = /^msgid "(.*)"$/;
+ $save_msgid = $_;
+ if ($msg =~ /\@/) {
+ $expanded++;
+ }
+ &do_expand();
+ if ($msg ne "") {
+ $msg_accum = $msg_accum . "#. \@-expanded: $msg\n";
+ }
+ next;
+ }
+ if (/^"/ && $is_problem_file) {
+ ($msg) = /^"(.*)"$/;
+ $save_msgid = $save_msgid . $_;
+ if ($msg =~ /\@/) {
+ $expanded++;
+ }
+ &do_expand();
+ $msg_accum = $msg_accum . "#. \@-expanded: $msg\n";
+ next;
+ }
+ if (/^msgstr / && $is_problem_file) {
+ if ($expanded) {
+ print $msg_accum;
+ }
+ print $save_msgid;
+ $msg_accum = "";
+ $expanded = 0;
+ }
+ print $_;
+}
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1â€/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“â€/""/g
+s/“/“/g
+s/â€/â€/g
+s/‘/‘/g
+s/’/’/g
diff --git a/po/ca.gmo b/po/ca.gmo
new file mode 100644
index 0000000..7aea756
--- /dev/null
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
new file mode 100644
index 0000000..d3f1518
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,8872 @@
+# Translation of e2fsprogs-1.42.12 to Catalan.
+# Copyright (C) 2007, 2008 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# David Planella Molas <david.planella@gmail.com>, 2007, 2008.
+# Àngel Mompó <mecatxis@mecatxis.cat>, 2014, 2015.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.42.12-pre2\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2015-07-26 11:42+0100\n"
+"Last-Translator: Angel Mompo <mecatxis@mecatxis.cat>\n"
+"Language-Team: Catalan <ca@dodds.net>\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Poedit-Bookmarks: 434,-1,-1,-1,-1,-1,-1,-1,-1,-1\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.7.5\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Bloc erroni %u fora dels límits; s'ignorarà.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "en comprovar l'estat del node-i de blocs erronis"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "en llegir el node-i de blocs erronis"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "en intentar obrir %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "en intentar popen en «%s»"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "en llegir la llista de blocs erronis del fitxer"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "en actualitzar el node-i de block erronis"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr ""
+"Avís: s'ha trobat el bloc no vàlid %u en el node-i de blocs erronis. S'ha "
+"esborrat.\n"
+
+#: e2fsck/dirinfo.c:331
+#, fuzzy
+msgid "while freeing dir_info tdb file"
+msgstr "en llegir el node arrel"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "S'ha produït un error en llegir el bloc %lu (%s) mentre %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "S'ha produït un error en llegir el bloc %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignora l'error"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Força la rescriptura"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "S'ha produït un error en escriure el bloc %lu (%s) mentre %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "S'ha produït un error en escriure el bloc %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "blocs de directori buits"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "mapa de directori buit"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "El bloc de directori %u (#%d) en el node-i %u és buit\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s fitxer nblocs midadelbloc\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Nombre de blocs no vàlid\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "No s'ha pogut assignar el bloc de memoria intermèdia (mida=%d)\n"
+
+#: e2fsck/extents.c:42
+#, fuzzy
+msgid "extent rebuild inode map"
+msgstr "mapa de nodes-i de fitxers normals"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Forma d'ús: %s disc\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr ""
+"L'ioctl BLKFLSBUF no està implementat. No es poden buidar les memòries "
+"intermèdies.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Forma d'ús: %s [-F] [-I blocs_de_mem_int_del_node_i] dispositiu\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "en obrir %s per a buidar-lo"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "en intentar buidar %s"
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr "en intentar obrir «%s»"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr "en obrir l'escaneig de nodes-i"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr "en obtenir el node-i següent"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u nodes-i escanejats.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "s'està llegint el superbloc del registre de transaccions\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: no s'ha trobat cap superbloc del registre de transaccions vàlid\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: el registre de transaccions és massa curt\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: recuperació del registre de transaccions\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+"%s: no es recuperarà el registre de transaccions mentre sigui de només "
+"lectura\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "en intentar tornar a obrir %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aatribut ampliat"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aerror en l'assignació"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bbloc"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bmapa de bits"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccompressió"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Centra en conflicte amb algun altre @b del sistema de fitxers"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "ddirectori"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dsuprimit"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eentrada"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e «%Dn» a %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fsistema de fitxers"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fper a l'@i %i (%Q) és"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrup"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "h@i del @d HTREE"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "inode-i"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iil·legal"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jregistre de transaccions"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lés un enllaç"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mreclamat múltiplement"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nno vàlid"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oorfe"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblema en"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qlímit"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "r@i arrel"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "shauria de ser"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "udesacoblat(s)"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vdispositiu"
+
+# http://en.wikipedia.org/wiki/Extent_(file_systems). Hi ha la ubicació basada en blocs i la ubicació basada en «extents» (dpm).
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zmida zero"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<El node-i NULL>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<El node-i de blocs erronis>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<La quota de node-i per l'usuari>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<La quota de node-i per al grup>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<El node-i del carregador>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<El node-i del directori de desfer les supressions>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<El node-i del descriptor de grup>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<El node-i del registre de transaccions>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Node-i reservat 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Node-i reservat 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "fitxer normal"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "directori"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "dispositiu"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "dispositiu d'accés per bloc"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "conducte amb nom"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "enllaç simbòlic"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "sòcol"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tips de fitxer desconegut amb mode 0%o"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "bloc indirecte"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "bloc indirecte doble"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "bloc indirecte triple"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "bloc del traductor"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "bloc #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr ""
+
+#: e2fsck/message.c:485
+#, fuzzy
+msgid "group"
+msgstr "ggrup"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+#, fuzzy
+msgid "unknown quota type"
+msgstr "sistema operatiu desconegut - %s"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mapa de nodes-i reclamat múltiplement"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "error intern: no s'ha trobat dup_blk per a %llu\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "s'ha tornat de la funció clone_file_block"
+
+# FIXME (dpm)
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr ""
+"error intern: no s'ha pogut cercar el registre de bloc d'atributs ampliats "
+"(EA) per a %llu"
+
+# FIXME (dpm)
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr ""
+"error intern: no s'ha pogut cercar el registre de node-i d'atributs ampliats "
+"(EA) per a %u"
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr "s'està llegint el bloc de directori"
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr "mapa de nodes-i en ús"
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr "mapa de nodes-i de directoris"
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr "mapa de nodes-i de fitxers normals"
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr "mapa de blocs en ús"
+
+#: e2fsck/pass1.c:1262
+#, fuzzy
+msgid "metadata block map"
+msgstr "blocs de metadades"
+
+#: e2fsck/pass1.c:1324
+msgid "opening inode scan"
+msgstr "s'està obring l'escaneig de nodes-i"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr "s'està obtenint el node-i següent de l'escaneig"
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "Pas 1"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "s'estan llegint els blocs indirectes del node-i %u"
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr "mapa de nodes-i malmesos"
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr "node-i en el mapa de nodes-i malmesos"
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr "mapa de nodes-i imagic"
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr "mapa de blocs reclamat més d'un cop"
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr "mapa de blocs d'atributs estesos"
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): s'esperava %6lu i s'ha obtingut phys %6lu (blkcnt %lld)\n"
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr "mapa de bits de blocs"
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr "mapa de bits d'i-nodes"
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr "taula d'inodes"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "Pas 2"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "No es pot continuar."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "mapa de bits de nodes-i creats"
+
+# FIXME: «Memòria màxima»? (dpm)
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Pic de memòria"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Pas 3"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "mapa de bits de la detecció de nodes-i de bucle"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "Pas 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Pas 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(sense pregunta)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Arregla"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Esborra"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Reubica"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Assigna"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Expandeix"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Connecta amb /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Crea"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Salva"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Trunca"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Esborra el node-i"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Interromp"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Divideix"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Continua"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Clona els blocs reclamats múltiplement"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Suprimeix el fitxer"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Suprimeix els missatges"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Desfés l'enllaç"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Esborra l'índex HTree"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Torna a crear"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(CAP)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "ARREGLAT"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "ESBORRAT"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "REUBICAT"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ASSIGNAT"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "EXPANDIT"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "RECONNECTAT"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "CREAT"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "SALVAT"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "TRUNCAT"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "NODE-I ESBORRAT"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "INTERROMPUT"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "DIVIDIT"
+
+# FIXME
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "CONTINUAT"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "CLONATS ELS BLOCS RECLAMATS MÚLTIPLEMENT"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "FITXER SUPRIMIT"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "SUPRIMIT"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "ENLLAÇ DESFET"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "ÃNDEX HTREE ESBORRAT"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "ES TORNARÀ A CREAR"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "El @b @B per al @g %g no és a @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "El @i @B per al @g %g no és a @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"La taula de nodes-i per al @g %g no és al @g. (@b %b)\n"
+"AVÃS: POSSIBLE PÈRDUA DE DADES GREU.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"No s'ha pogut llegir el @S, o bé no descriu un @f\n"
+"ext2/ext3/ext4 correcte. Si el @v és vàlid i realment conté un @f\n"
+"ext2/ext3/ext4 (i no pas d'intercanvi, ufs o algun altre), llavors el @S\n"
+"està malmès, per la qual cosa podeu provar d'executar l'e2fsck amb\n"
+"un @S alternatiu:\n"
+" e2fsck -b 8193 <@v>\n"
+" o\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"La mida del @f (segons el @S) és de %b @bs\n"
+"La mida física del @v és de %c @bs\n"
+"Segurament el @S o bé la taula de particions estan malmesos.\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"mida_del_@b del @S = %b, mida dels fragments = %c.\n"
+"Aquesta versió de l'e2fsck no funciona amb mides de fragment que no\n"
+"coincideixen amb la mida del @b.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@bs_per_grup del @S = %b, hauria d'haver estat %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "primer_@b_de_dades del @S = %b, hauria d'haver estat %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr "El @f no té cap UUID; se li'n generarà un.\n"
+
+#: e2fsck/problem.c:167
+#, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Nota: si diversos blocs de mapes de bits de nodes-i o blocs o\n"
+"parts de taules de nodes-i necessiten una reubicació, podeu \n"
+"provar primer l'e2fsck amb l'opció «-b %S». El problema pot ser\n"
+"només amb els descriptors de grups de blocs primaris, i els\n"
+"descriptors de grups de blocs de còpia de seguretat potser estan bé.\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "El @S està malmès. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "S'ha produït un error en determinar la mida del @v físic: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "El nombre de nodes-i en el @S és %i (@s %j).\n"
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "El Hurd no és compatible amb la característica de tipus de fitxer.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "El @S té un @j @n (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "El @j extern té múltiples usuaris del @f (no compatible).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr "No s'ha trobat el @j extern\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr "El @j extern té un @S malmès\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr "El @j extern no és compatible amb aquest @f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"el @S del @f @j és del tipus %N no conegut (no implementat).\n"
+"Possiblement la versió de e2fsck antiga i/o que no tingui implementat aquest "
+"format de @j.\n"
+"També pot ser que el @S @j estigui malmès.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+msgid "@j @S is corrupt.\n"
+msgstr "El @S del @j està malmès.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "El senyalador has_@j del @S està buit, però el @j té dades.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+"El @S té el senyalador «needs_recovery» (recuperació_necessària) activat, "
+"però no té cap @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "El senyalador de recuperació @S està buit, però el @j té dades.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr "Esborra el @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr ""
+"El @f té els senyaladors de característica (feature) activat, però és un @f "
+"de versió 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s @i @o %i (uid=%Iu, gid=%Ig, mode=%Im, mida=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "S'ha trobat %B @I (%b) a l'@i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "S'ha trobat %B (%b) que ja està esborrat a l'@i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@i @o @I %i en el @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@i @o @I %i a la llista de nodes-i @os.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+"El @S del @j té un senyalador de característica de només lectura activat "
+"desconegut.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"El @S del @j té un senyalador de característica no compatible activat no "
+"compatible.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "La versió del @j no funciona amb aquest e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"S'està traslladant el @j de /%s al @i ocult.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"S'ha produït un error en traslladar el @j: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"S'han trobat camps de @S d'un @j de V2 (en un @j de V1).\n"
+"S'estan esborrant els camps més enllà del @S del @j de V1...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr "Executa el @j de totes maneres"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"El senyalador de recuperació no està definit en la còpia del @S, per la qual "
+"cosa s'executarà el @j de totes maneres.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"S'està fent una còpia de seguretat de la informació del @b de nodes-i del "
+"@j.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"el @f no té el resize_@i habilitat, però s_reserved_gdt_@bs\n"
+"és %N; @s zero. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_@i no està habilitat, però el @i de redimensió no és zero. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+msgid "Resize @i not valid. "
+msgstr "El @i de redimensió no és vàlid. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La darrera hora de muntatge del @S (%t,\n"
+"\tara = %T) és en el futur.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La darrera hora d'escriptura del @S (%t, \n"
+"\tara = %T) és en el futur.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "L'apunt de @S per al superbloc extern @s %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"S'afegeix l'apunt a la taula de directoris de @f.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr ""
+"La suma de verificació del descriptor de @g %g és %04x, hauria de ser %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+"El descriptor de @g %g s'ha marcat com a sense inicialitzar sense cap funció "
+"activada.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "El descriptor de @g %g té %b nodes-i no vàlids que no es fan servir. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr "L'últim @B @g @b no està inicialitzat. "
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+"La transacció del registre de transaccions %i està malmesa, se n'ha "
+"interromput la repetició\n"
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "El senyalador test_fs està activat (i està disponible ext4). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+#, fuzzy
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"La darrera vegada que s'ha muntat el @S és al futur.\n"
+"\t(si és menys d'un dia, probablement sigui un error en el rellotge del "
+"maquinàri) "
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+#, fuzzy
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"La darrera vegada que s'ha escrit al @S és al futur.\n"
+"\t(si és menys d'un dia, probablement sigui un error en el rellotge del "
+"maquinàri) "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr ""
+"Una o més sumes de verificació del descriptor de @g de @b no són vàlids. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "S'allibera @is conta fins a %j (abans era %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "S'allibera @bs conta fins a %c (abans era %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+#, fuzzy
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Es fa ocult l'@i @q %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+msgid "@S has invalid MMP block. "
+msgstr "@S té un bloc MMP no vàlid. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr "El @S té un MMP màgic no vàlid. "
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+#, fuzzy
+msgid "@S MMP @b checksum does not match. "
+msgstr "La suma de verificació del bloc MMP no coincideix amb el bloc MMP"
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+#, fuzzy
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+"El @S del sistema de fitxers de 64 bits necessita «extents» per accedir al "
+"disc sencer. "
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg és massa gran. (%N, valor màx %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+#, fuzzy
+msgid "External @j @S checksum does not match @S. "
+msgstr ""
+"La suma de verificació del bloc «extent» no coincideix amb el bloc «extent»"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+#, fuzzy
+msgid "Invalid %U @q @i %i. "
+msgstr "@i de @z %i @u. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Pas 1: comprovació de nodes-i, @bs i mides\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr "el @r no és un @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "el @r té el dtime definit (segurament degut a un mke2fs antic)."
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "El @i %i (%Q) té un mode @n. "
+
+# FIXME dtime (dpm)
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "El @i %i @D té un dtime zero. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "El @i %i s'està utilitzant, però té dtime definit."
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "El @i %i és un @d de @z. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "@B de @g de @b %g a %b @C.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "@B de @g de @i %g a %b @C.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "Taula de @g de @i %g a %b @C.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "@B de @g de @b %g (%b) és erroni. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "@B de @g de @i %g (%b) és erroni. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size és %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_@bs és %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+msgid "@I %B (%b) in @i %i. "
+msgstr "%B (%b) @I a @i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) se sobreposa al @f de metadades al @i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "El @i %i té @bs no vàlids. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Hi ha massa @b no vàlids al @i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "%B (%b) @I en @b @i dolents. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "El @i de @b erronis té @bs no vàlids. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr "S'està utilitzant el @b duplicat o erroni\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "El @ erroni %b es fa servir com a @b indirecte @b @i erroni. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"El @b @i erroni probablement és corrupte. Hauríeu\n"
+"d'aturar ara el rpocés i executar e2fsck -c per buscar \n"
+"blocs erronis al @f.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Si el @b està realment malmès, el @f no es podrà reparar.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Podeu treure aquest @b de la llista de @b erronis i \n"
+"esperar que el @b sigui correcte. Però no hi ha garanties.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "El @S primary (%b) és a la llista de @bs erronis.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+"El bloc %b del @g de descriptors primari és a la llista de @b erronis\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Avís: el @S (%b) del grup %s és erroni.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+"Avís: la còpia dels descriptors de @g del grup %g té un @b erroni (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+"Es probable que s'hagi produït un error de programació: el @b #%b ha estat "
+"reclamat sense motiu a process_bad_@b.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %N @b(s) contigus al @g @b %g per %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A de la memòria intermèdia del @b per a reubicar %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "S'està reubicant %g del @g %s de %b a %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "S'està reubicant %g del @g %s a %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Avís: no s'ha pogut llegir el @b %b de %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Avís: no s'ha pogut escriure el @b %b per a %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr "S'ha produït un @A del @B del @i (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+msgid "@A @b @B (%N): %m\n"
+msgstr "S'ha produït un @A del @B del @b (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A la informació d'enllaç de l'icount: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A la cadena del @b de @s: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "S'ha produït un error en escanejar els nodes-i (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "S'ha produït un error en iterar a través dels @bs del @i (%i): %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+"S'ha produït un error en desar la informació del nombre de nodes-i (@i=%i, "
+"nombre=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+"S'ha produït un error en desar la informació del @b de @d (@i=%i, @b=%b, núm="
+"%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "S'ha produït un error en llegir el @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "El @i %i té activat el senyalador imagic. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"El fitxer (@i %i) especial (@v/socket/fifo/symlink) té activat\n"
+"l'indicador d'immutable o de només afegir. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "El @i especial %i (@v/socket/fifo) té una mida diferent de zero. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+msgid "@j @i is not in use, but contains data. "
+msgstr "El @i del @j no s'utilitza, però conté dades. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr "El @j no és un fitxer normal. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "El @i %i és part de la llista de nodes-i @os. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+"S'han trobat nodes-i que són part d'una llista enllaçada d'orfes malmesa. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A l'estructura de refcount (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "S'ha produït un error en llegir el @b d'@a del @i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+msgid "@i %i has a bad @a @b %b. "
+msgstr "El @i %i té un @b d'@a %b malmès. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+msgid "Error reading @a @b %b (%m). "
+msgstr "S'ha produït un error en llegir el @b d'@a %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "@a @b %b té un comptador de referència %r, @s %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+msgid "Error writing @a @b %b (%m). "
+msgstr "S'ha produït un error en escriure el @b d'@a %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "@b @a %b té h_@bs > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+#, fuzzy
+msgid "@A @a region allocation structure. "
+msgstr "@A de l'estructura icount: %m\n"
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "El @b d'@a està malmès (col·lisió en l'assignació). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "El @b d'@a està malmès (nom @n). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "El @b d'@a està malmès (valor @n). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr "El @i %i és massa gran. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+msgid "%B (%b) causes @d to be too big. "
+msgstr "El %B (%b) fa que el @d sigui massa gran. "
+
+#: e2fsck/problem.c:854
+msgid "%B (%b) causes file to be too big. "
+msgstr "El %B (%b) fa que el fitxer sigui massa gran. "
+
+#: e2fsck/problem.c:859
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "El %B (%b) fa que l'enllaç simbòlic sigui massa gran. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+"El @i %i té el senyalador INDEX_FL definit en un @f que no és compatble amb "
+"l'htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "El @i %i té el senyalador INDEX_FL definit però no és un @d.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "El @h %i té un node arrel @n.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %i té una versió de resum no compatible (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "@h %i fa servir el senyalador de node arrel htree no compatible.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "@h %i té una profunditat de directoris (%N) massa gran\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"El @i de @b no vàlid té un @b indirecte (%b) que entra\n"
+"en conflicte amb el @f de metadades. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "No s'ha pogut (tornar a) dimensionar el @: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "El @i té una mida addicional (%IS) què no és vàlida\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "La llargada del nom (%N) de l'@a del @i %i no és vàlida\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "El desplaçament del valor (%N) de l'@a del @i %i no és vàlid\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "El @b del valor (%N) de l'@a del @i %i no és vàlid (hauria de ser 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "La mida del valor (%N) de l'@a del @i %i no és vàlida\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "L'@a del @i %i té un resum (%N) que no és vàlid\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "El @i %i és un %It, però sembla ser un directori en realitat.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "S'ha produït un error en llegir l'arbre d'@x al @i %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"No s'ha pogut iterar els «extents» al @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"El @i %i té un @n «extent»\n"
+"\t(@b lògic %c, @b físic @n %b, longitud %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"El @i %i té un @n «extent»\n"
+"\t(@b lògic %c, @ físic %b, longitud @n %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+"El @i %i té el senyalador EXTENTS_FL definit en un @f que no és compatible "
+"«extents».\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+"El @i %i té format «extent», però el @S no té la característica EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "El @i %i no té EXTENT_FL, però té el format «extents»\n"
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "L'enllaç simbòlic ràpid %i té activat el EXTENT_FL. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"El @i %i té «extents» fora de servei\n"
+"\t(@b lògic %c @n, @b físic %b, longitud %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "El @i %i té un node «extent» no vàlid (blc %b, lblc %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "S'ha produït un error quan es convertia el grup de sectors @b @B: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+#, fuzzy
+msgid "@q @i is not a regular file. "
+msgstr "L' @i de @q no és un fitxer normal. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+msgid "@q @i is not in use, but contains data. "
+msgstr "L'@i de @q no s'utilitza, però conté dades. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+msgid "@q @i is visible to the user. "
+msgstr "L'@i de @q és visible per a l'usuari. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+msgid "The bad @b @i looks @n. "
+msgstr "El @i del @b dolent sembla @n. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"El @i %i té l'«extent» de longitud zero\n"
+"\t(@b lògic %c @n, @b físic %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, fuzzy, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "El @i %i és massa gran. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, fuzzy, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+"La suma de verificació del mapa de bits del node-i no coincideix amb el mapa "
+"de bits"
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, fuzzy, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "El @b d'@a està malmès (col·lisió en l'assignació). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+#, fuzzy
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"El @i %i té «extents» fora de servei\n"
+"\t(@b lògic %c @n, @b físic %b, longitud %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Nivell interior del node @x %N del @i %i:\n"
+"L'inici lògic %b no coincideix amb l'inici lògic %c al següent nivell. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i, el final de l'«extent» supera el valor permés\n"
+"\t(@b lògic %c, @b físic %b, longitud %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, fuzzy, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+"El @i %i té format «extent», però el @S no té la característica EXTENTS\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+"El @i %i té el senyalador INDEX_FL definit en un @f que no és compatble amb "
+"l'htree.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "El @i de @d %i @b %b ha de ser al @b %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "El @i de @d %i té un @x marcar com a no inicialitzat a @b %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"El @i %i @b lògic %b (@b físic %c) viola les regles d'ubicació de clúster.\n"
+"S'arreglara al pas 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "El @i %i té el senyalador INDEX_FL definit però no és un @d.\n"
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, fuzzy, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"El fitxer (@i %i) especial (@v/socket/fifo/symlink) té activat\n"
+"l'indicador d'immutable o de només afegir. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+#, fuzzy
+msgid "@A @x region allocation structure. "
+msgstr "@A de l'estructura icount: %m\n"
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+#, fuzzy
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"El @i %i té un @n «extent»\n"
+"\t(@b lògic %c, @b físic @n %b, longitud %N)\n"
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, fuzzy, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "El @b d'@a està malmès (nom @n). "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+#, fuzzy
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "El @i %i té un @b d'@a %b malmès. "
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+#, fuzzy
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+"El @i %i té format «extent», però el @S no té la característica EXTENTS\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"S'executen passos addicionals per resoldre els @bs reclamat és per més d'un "
+"@i...\n"
+"Pas 1B: Es torna a escanejar per @bs @m\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b(s) reclamat(s) múltiplement del @i %i:"
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "S'ha produït un error en escanejar els nodes-i (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A @B de @i (@i_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "S'ha produït un error en iterar pels @bs al @i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+"S'ha produït un error en ajustar el nombre de referències del @b d'@a %b (@i "
+"%i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+"Pas 1C: escaneig dels directoris dels nodes-i amb @bs reclamats "
+"múltiplement\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Pas 1D: conciliació dels @bs reclamats múltiplement\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"El fitxer %Q (@i #%i, hora de mod %IM) \n"
+" té %r @m @b(s) @m, compartits amb %N fitxer(s):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i #%i, hora de modificació %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr "\t<metadades del @f>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr "(Hi ha %N nodes-i que contenen @bs múltiplement reclamats.)\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@bs reclamats múltiplement ja reassignats o clonats.\n"
+"\n"
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "No s'ha pogut clonar el fitxer: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+#, fuzzy
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Pas 3A: optimització dels directoris\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, fuzzy, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "No s'ha pogut optimitzar el directori %q (%d): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+#, fuzzy
+msgid "Optimizing @x trees: "
+msgstr "S'estan optimitzant els directoris: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Pas 2: comprovació de l'estructura del @d\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "El número de @i @n per «.» al @i de @d %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+msgid "@E has @n @i #: %Di.\n"
+msgstr "L'@E té un @i @n #: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E té el @i %Di @D o sense fer servir. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr "L'@E @L a «.»"
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "L'@E apunta al @i (%Di) ubicat en un @b malmès.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "L'@E @L al @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr "L'@E @L al @r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr "El nom de l'@E conté caràcters no vàlids.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Manca el «.» en el @i de @d %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Manca el «..» en el @i de @d %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "La primera @e «%Dn» (@i=%Di) en el @i de @d %i (%p) @s «.»\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "La segona @e «%Dn» (@i=%Di) en el @i de @d %i (%p) @s «..»\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "L'i_faddr @F %IF, @s zero.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "L'i_file_acl @F %If, @s zero.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+#, fuzzy
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "L'i_fsize @F %N, @s zero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "L'i_frag @F %N, @s zero.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "L'i_fsize @F %N, @s zero.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "El @i %i (%Q) té un mode @n (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "El @i de @d %i, %B, desplaçament %N: el @d corromput\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "El @i de @d %i, %B, desplaçament %N: el nom de fitxer és massa llarg\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+msgid "@d @i %i has an unallocated %B. "
+msgstr "El @i de @d %i té un %B no assignat. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "L'@e de @d «.» en el @i de @d %i no acaba en NUL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "L'@e de @d «..» en el @i de @d %i no acaba en NUL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "El @i %i (%Q) és un @v de caràcters @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "El @i %i (%Q) és un @v de blocs @I.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+msgid "@E is duplicate '.' @e.\n"
+msgstr "L'@E és un duplicat de l'@e «.»\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr "L'@E és un duplicat de l'@e «..»\n"
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "S'ha produït un error intern: no s'ha trobat dir_info per a %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E té el rec_len de %Dr, @s %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A de l'estructura icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "S'ha produït en iterar pels @bs de @d: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "S'ha produït un error en llegir el @b de @d %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "S'ha produït un error en escriure el @b de @d %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A el nou @b de @d del @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "S'ha produït un error en desassignar el @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "L'@e de @d per a «.» a %p (%i) és gran. \n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "El @i %i (%Q) és una FIFO no vàlida.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "El @i %i (%Q) és un sòcol @I.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr "S'està establint el tipus de fitxer per a l'@E a %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "El tipus de fitxer de l'@E és incorrecte (és %Dt, @s %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr "El tipus de fitxer de l@E està definit.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+msgid "@E has a @z name.\n"
+msgstr "El nom de l'@E és de @z.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "L'enllaç simbòlic %Q (@i #%i) és @n.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr "El @b d'@a @F @n (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+"El @f conté fitxers grans, però li manca el senyalador LARGE_FILE al @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+msgid "@p @h %d: %B not referenced\n"
+msgstr "S'ha produït un @p al @h %d: %B no està referenciat\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "S'ha produït un @p al @h %d: %B està referenciat dues vegades\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "S'ha produït un @p en el @h %d: %B té un resum min. erroni\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "S'ha produït un @p al @h %d: %B té un resum max. erroni\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+msgid "@n @h %d (%q). "
+msgstr "el @h %d (%q) és @n. "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "S'ha produït un @p al @h %d (q): número de @b %b incorrecte.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "S'ha produït un @p al @h %d:el node arrel no és vàlid\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "S'ha produït un @p al @h %d: %B té un límit (%N) @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "S'ha produït un @p al @h %d: %B té un comptador (%N) @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "S'ha produït un @p al @h %d: %B té una taula de resum desordenada\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "S'ha produït un @p al @h %d: %B té una profunditat (%N) @n\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr "S'ha trobat una @E duplicada. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"L'@E té un nom de fitxer que no és únic.\n"
+"Li hauríeu de canviar el nom a %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"S'ha trobat una @e «%Dn».\n"
+"\tEs marcarà %p (%i) per a ésser reconstruït.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "L'i_blocks_hi @F %N, @s zero.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "No s'esperava el @b al @h %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+"@E que fa referència al @i %Di a @g %g on _INODE_UNINIT està activat.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+"@E que fa referència al @i %Di ha trobat a @g %g's àrees de nodes-i sense "
+"fer servir .\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s zero.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, fuzzy, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "S'ha produït un @p al @h %d:el node arrel no és vàlid\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, fuzzy, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "S'ha produït un @p al @h %d:el node arrel no és vàlid\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "El @i de @d %i, %B, desplaçament %N: el @d corromput\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Pas 3: comprovació de la connectivitat dels @ds\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr "El @r no està assignat. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr "No hi ha prou espai en el @d @l. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "@i de @d %i desconnectat (%p)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr "No s'ha trobat /@l. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "«..» a %Q (%i) és %P (%j), @s %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "El directori /@l no existeix o està malmès. No es pot reconnectar.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "No s'ha pogut expandir el directori /@l: %m\n"
+
+#: e2fsck/problem.c:1731
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "No s'ha pogut reconnectar %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "S'ha produït un error en cercar el directori /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block: %m en intentar crear el @d /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode: %m en intentar crear el @d /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m en crear el @b de @d nou\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_new_dir_block: %m en crear el @b de @d nou per a /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "S'ha produït un error en ajustar el nombre de nodes-i al @i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"No s'ha pogut reparar el pare del @i %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"No s'ha pogut reparar el pare del @i %i: no s'ha trobat l'@e de @d pare\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "S'ha produït un error en crear el @d arrel (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "S'ha produït un error en crear el @d /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+msgid "@r is not a @d; aborting.\n"
+msgstr "el @r no és un @d; s'interromprà.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr "No es pot continuar sense un @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l no és un @d (node-i=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+#, fuzzy
+msgid "/@l is encrypted\n"
+msgstr "La imatge (%s) està xifrada\n"
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Pas 3A: optimització dels directoris\n"
+
+#: e2fsck/problem.c:1838
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "No s'ha pogut crear l'iterador dirs_to_hash: %m\n"
+
+#: e2fsck/problem.c:1843
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "No s'ha pogut optimitzar el directori %q (%d): %m\n"
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "S'estan optimitzant els directoris: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Pas 4: comprovació dels nombres de referències\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, c-format
+msgid "@u @z @i %i. "
+msgstr "@i de @z %i @u. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr "@i %i @u\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "el nombre de referències del @i %s és %Il, @s %N."
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"AVÃS: S'HA PRODUÃT UN ERROR DE PROGRAMACIÓ EN EL E2FSCK!\n"
+"\tO BÉ ALGUN CAP DE PARDAL (O SIGUI, TU) ESTÀ COMPROVANT UN SISTEMA\n"
+"\tDE FITXERS MUNTAT (EN VIU).\n"
+"inode_link_info[%i] és %N, inode.i_links_count és %Il. Haurien de "
+"coincidir!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+#, fuzzy
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "el nombre de referències del @i %s és %Il, @s %N."
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+# FIXME
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Pas 5: comprovació del resum de la informació del @g\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+msgid "Padding at end of @i @B is not set. "
+msgstr "El farciment al final del @B del @i no està habilitat. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+msgid "Padding at end of @b @B is not set. "
+msgstr "El farciment al final del @B del @b no està habilitat. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr "Diferències del @B del @b: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr "Diferències del @B del @i: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+"El nombre de nodes-i lliures no és correcte per al @g núm. %g (%i, recompte="
+"%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+"El nombre de directoris no és correcte per al @g núm. %g (%i, recompte=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "El nombre de nodes-i lliures no és correcte (%i, recompte=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+"El nombre de @bs lliures no és correcte per al @g núm. %g (%i, recompte="
+"%j).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "El nombre de @bs lliures no és correcte (%i, recompte=%j).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+"ERROR DE PROGRAMACIÓ: Els finals del @B (%b, %c) del @f (#%N) no "
+"coincideixen amb els finals del @B (%i, %j) calculats\n"
+
+#: e2fsck/problem.c:1989
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Error intern: es falseja el final del mapa de bits (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "S'ha produït un error copiant en reemplaçar el @B del @i: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "S'ha produït un error copiant en reemplaçar el @B del @b: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+"El @g %g de @b(s) s'està fent servir, però el @g està marcat com "
+"BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+"El @g %g de @i(s) s'està fent servir, però el @g està marcat com "
+"INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+msgid "Recreate @j"
+msgstr "Torna a crear el @j"
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr "Actualitza la informació de la quota de tipus %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr ""
+"S'ha produït un error en establir la informació de suma de verificació del "
+"@g de @b: %m\n"
+
+#: e2fsck/problem.c:2061
+#, c-format
+msgid "Error writing file system info: %m\n"
+msgstr "S'ha produït un error quant s'escrivia la informació del sistema: %m\n"
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+"S'ha produït un error quan es buidaven les escriptures del dispositiu "
+"d'emmagatzemament: %m\n"
+
+#: e2fsck/problem.c:2071
+#, fuzzy
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Actualitza la informació de la quota de tipus %N"
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "S'ha produït un error amb un codi no gestionat (0x%x)\n"
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr "IGNORAT"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Memòria utilitzada: %d, temps transcorregut: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "mida del node-i=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "en iniciar l'exploració dels nodes-i"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "en fer l'exploració dels nodes-i"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "en fer la crida a ext2fs_block_iterate per al node-i %d"
+
+#: e2fsck/super.c:249
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "en fer la crida a ext2fs_adjust_ea_refcount2 per al node-i %d"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Truncament"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Neteja"
+
+#: e2fsck/unix.c:77
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Forma d'ús: %s [-panyrcdfvtDFV] [-b superbloc] [-B midadebloc]\n"
+"\t\t[-I blocs_de_mem_interm_del_node-i] [-P process_inode_size]\n"
+"\t\t[-l|-L fitxer_de_blocs_erronis] [-C fd] [-j reg_de_trans_extern]\n"
+"\t\t[-E opcions_ampliades] dispositiu\n"
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Ajuda d'emergència:\n"
+" -p Reparació automàtica (sense preguntes)\n"
+" -n No facis cap canvi al sistema de fitxers\n"
+" -y Assumeix «sí» per a totes les preguntes\n"
+" -c Comprova si hi ha blocs erronis i afegeix-los a la "
+"llista de blocs erronis\n"
+" -f Força la comprovació encara que el sistema de fitxers "
+"s'hagi marcat com a net\n"
+
+#: e2fsck/unix.c:88
+#, fuzzy
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+"-v Detallat\n"
+" -b superblock Fa servir el superbloc alternatiu\n"
+" -B blocksize Força la mida del bloc quan busca un superbloc\n"
+" -j external_journal Estableix la ubicació del registre de transaccions "
+"extern\n"
+" -l bad_blocks_file Afegeix a la llista de blocs erronis (badblocks)\n"
+" -L bad_blocks_file Estableix la llista de blocs erronis(badblocks)\n"
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u fitxers (%0d.%d%% no contigus), %llu/%llu blocs\n"
+
+#: e2fsck/unix.c:162
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u node-i emprat (%2.2f%% de %u)\n"
+msgstr[1] ""
+"\n"
+"%12u nodes-i emprats (%2.2f%% de %u)\n"
+
+#: e2fsck/unix.c:166
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u fitxer no contigu (%0d.%d%%)\n"
+msgstr[1] "%12u fitxers no contigus (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:171
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u directori no contigu (%0d.%d%%)\n"
+msgstr[1] "%12u directoris no contigus (%0d.%d%%)\n"
+
+# ind: indirect, dind: double indirect, tind: triple indirect (dpm)
+#: e2fsck/unix.c:176
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " nombre de nodes-i amb blocs ind/dind/tind: %u/%u/%u\n"
+
+#: e2fsck/unix.c:184
+msgid " Extent depth histogram: "
+msgstr " Histograma profund estès: "
+
+#: e2fsck/unix.c:193
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu bloc emprat (%2.2f%% de %llu)\n"
+msgstr[1] "%12llu blocs emprats (%2.2f%% de %llu)\n"
+
+#: e2fsck/unix.c:197
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u bloc dolent\n"
+msgstr[1] "%12u blocs dolents\n"
+
+#: e2fsck/unix.c:199
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u fitxer gran\n"
+msgstr[1] "%12u fitxers grans\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u fitxer normal\n"
+msgstr[1] ""
+"\n"
+"%12u fitxers normals\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u directori\n"
+msgstr[1] "%12u directoris\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u fitxer de dispositiu orientat a caràcters\n"
+msgstr[1] "%12u fitxers de dispositiu orientat a caràcters\n"
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u fitxer de dispositiu orientat a blocs\n"
+msgstr[1] "%12u fitxers de dispositiu orientat a blocs\n"
+
+#: e2fsck/unix.c:210
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifos\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u enllaç\n"
+msgstr[1] "%12u enllaços\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u enllaç simbòlic"
+msgstr[1] "%12u enllaços simbòlics"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u enllaç simbòlic ràpid)\n"
+msgstr[1] " (%u enllaços simbòlics ràpids)\n"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u sòcol\n"
+msgstr[1] "%12u sòcols\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fitxer\n"
+msgstr[1] "%12u fitxers\n"
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "en determinar si %s està muntat."
+
+#: e2fsck/unix.c:258
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Avís! %s està muntat.\n"
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Avís! %s s'està fent servir.\n"
+
+#: e2fsck/unix.c:267
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s està muntat.\n"
+
+#: e2fsck/unix.c:269
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s s'està fent servir.\n"
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"No es pot continuar, s'interromprà.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"AVÃS!!! El sistema de fitxers està muntat. Si continueu **CAUSAREU***\n"
+"danys ***GREUS*** al sistema de fitxers.\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Esteu segur que voleu continuar?"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "s'ha interromput la comprovació.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr " conté un sistema de fitxers amb errors"
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr " no es va desmuntar correctament"
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr ""
+" les característiques del superbloc primari són diferents de les del de la "
+"còpia de seguretat"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " s'ha muntat %u vegades sense haver estat comprovat"
+
+#: e2fsck/unix.c:389
+msgid " has filesystem last checked time in the future"
+msgstr ""
+"té la darrera hora de comprovació del sistema de fitxers és en el futur"
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " no s'ha comprovat des de fa %u dies"
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr ", es forçarà la comprovació.\n"
+
+#: e2fsck/unix.c:442
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: net, %u/%u fitxers, %llu/%llu blocs"
+
+#: e2fsck/unix.c:462
+msgid " (check deferred; on battery)"
+msgstr " (s'ha ajornat la comprovació; s'està utilitzant la bateria)"
+
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (es comprovarà després del muntatge següent)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (es comprovarà en %ld muntades)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERROR: no s'ha pogut obrir /dev/null (%s)\n"
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr "La versió dels atributs ampliats no és vàlida.\n"
+
+#: e2fsck/unix.c:701
+#, fuzzy
+msgid "Invalid readahead buffer size.\n"
+msgstr "Paràmetre de canvi de mida no vàlid: %s\n"
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Es desconeix l'opció ampliada: %s\n"
+
+#: e2fsck/unix.c:758
+#, fuzzy
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"S'ha especificat opció(ons) esteses incorrectes: %s\n"
+"\n"
+"Les opcions esteses se separen amb comes, i poden emprar un argument que\n"
+"\n"
+"s'estableix amb un signe igual («=»).\n"
+"\n"
+"Les opcions esteses vàlides són:\n"
+"\tsuperblock=<número de superbloc>\n"
+"\tblocksize=<mida del bloc>\n"
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Hi ha un error de sintaxi al fitxer de configuració de l'e2fsck (%s, línia #"
+"%d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "S'ha produït un error en validar el descriptor de fitxer %d: %s\n"
+
+#: e2fsck/unix.c:860
+msgid "Invalid completion information file descriptor"
+msgstr "El fitxer descriptor de la informació de completat no és vàlid"
+
+#: e2fsck/unix.c:875
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+"Només es pot especificar una de les opcions -p/-a, -n o -y a la vegada."
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "L'opció -t no està implementada en aquesta versió de l'e2fsck.\n"
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "No s'ha pogut resoldre «%s»"
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr "Les opcions -n i -D no són compatibles."
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr "Les opcions -n i -c no són compatibles"
+
+#: e2fsck/unix.c:994
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Les opcions -n i -l/-L no són compatibles."
+
+#: e2fsck/unix.c:1018
+#, fuzzy
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Les opcions -n i -D no són compatibles."
+
+#: e2fsck/unix.c:1024
+#, fuzzy
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Les opcions -n i -D no són compatibles."
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "No es poden utilitzar les opcions -c i -l/-L al mateix temps.\n"
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG «%s» no és un enter\n"
+"\n"
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"L'argument no numèric de -%c no és vàlid («%s»)\n"
+"\n"
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+"L'interval MMP és de %u segons i el temps d'espera total és de %u segons. "
+"Espereu si us plau...\n"
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+msgid "while checking MMP block"
+msgstr "mentre es comprovava el bloc MMP"
+
+#: e2fsck/unix.c:1259
+#, fuzzy, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Si esteu segur que el sistema de fitxers no s'està fent servir a cap node, "
+"executeu:\n"
+"'tune2fs -f -E clear_mmp {dispositiu}'\n"
+
+#: e2fsck/unix.c:1275
+#, fuzzy
+msgid "while reading MMP block"
+msgstr "en llegir el bloc MMP."
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"S'està sobreescrivint el sistema de fitxers existent; la qual cosa es pot "
+"desfer si escriviu:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "en intentar suprimir %s"
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "en provar de configurar el fitxer de desfer\n"
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Error: la versió de la biblioteca de l'ext2fs és massa antiga.\n"
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr "en intentar inicialitzar el programa"
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tS'utilitza %s, %s\n"
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr "cal un terminal per a les reparacions interactives"
+
+#: e2fsck/unix.c:1508
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s provant els blocs de còpia de seguretat...\n"
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr "Superbloc no vàlid,"
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr "Els descriptors de grup no estan en bon estat..."
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s mentre es feien servir els blocs de còpia de seguretat"
+
+#: e2fsck/unix.c:1525
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: mentre es tornava al superbloc original\n"
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"La versió del sistema de fitxers és massa recent per a aquesta versió de "
+"l'e2fsck.\n"
+"(O bé el superbloc del sistema de fitxers està malmès)\n"
+"\n"
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "Pot ser que això sigui una partició de mida zero?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+"Cal que tingueu accés de %s al sistema de fitxers o bé que sigueu l'usuari "
+"primari\n"
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Pot ser que no existeixi el dispositiu o bé que sigui d'intercanvi?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"Pot ser que el sistema de fitxers l'hagi muntat o obert un altre programa de "
+"manera exclusiva?\n"
+
+#: e2fsck/unix.c:1575
+msgid "Possibly non-existent device?\n"
+msgstr "Pot ser que no existeixi el dispositiu?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"El disc està protegit contra escriptura; utilitzeu l'opció\n"
+"-n per a fer una comprovació de només-lectura del dispositiu.\n"
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr "Hauríeu d'obtenir una versió més recent de l'e2fsck"
+
+#: e2fsck/unix.c:1711
+#, fuzzy, c-format
+msgid "while checking journal for %s"
+msgstr "en comprovar el registre de transaccions per a %s"
+
+#: e2fsck/unix.c:1714
+#, fuzzy
+msgid "Cannot proceed with file system check"
+msgstr "No es pot continuar sense un @r.\n"
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Avís: s'omet la recuperació del registre de transaccions perquè s'està "
+"comprovant el sistema de fitxers en mode de només-lectura.\n"
+
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "no s'han pogut definir els senyaladors del superbloc a %s\n"
+
+#: e2fsck/unix.c:1743
+#, fuzzy, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "No s'ha trobat el superbloc del registre de transaccions\n"
+
+#: e2fsck/unix.c:1747
+#, fuzzy, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "S'ha suprimit el registre de transaccions\n"
+
+#: e2fsck/unix.c:1751
+#, fuzzy, c-format
+msgid "while recovering journal of %s"
+msgstr "en recuperar el registre de transaccions ext3 de %s"
+
+#: e2fsck/unix.c:1773
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s té caracteristiques no implementades:"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s en llegir el node-i dels blocs erronis\n"
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Això no és un bon presagi, però s'intentarà continuar...\n"
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Creació del registre de transaccions (%d blocs): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr " Fet.\n"
+
+#: e2fsck/unix.c:1887
+#, fuzzy
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** s'ha tornat a crear el registre de transaccions - el sist. de fitxers "
+"torna a ser ext3 ***\n"
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr "s'ha interromput"
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: s'ha cancel·lat l'e2fsck.\n"
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "S'està tornant a iniciar l'e2fsck des del començament...\n"
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr "en reiniciar el context"
+
+#: e2fsck/unix.c:1985
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** S'HA MODIFICAT EL SISTEMA DE FITXERS *****\n"
+
+#: e2fsck/unix.c:1987
+#, fuzzy, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: l'ordre dels bytes del sistema de fitxers ja està normalitzat.\n"
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** S'HA MODIFICAT EL SISTEMA DE FITXERS *****\n"
+
+#: e2fsck/unix.c:1996
+#, fuzzy, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** REINICIEU EL LINUX *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** AVÃS: el sistema de fitxers encara té errors **********\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr ""
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "s'ha cancel·lat\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr ""
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "sí\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "no\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? no\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? sí\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "sí"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: El(s) mapa(es) de blocs no és correcte per %s"
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr "es llegeixen el mapes de bits dels blocs i dels nodes-i"
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "en tornar a intentar la lectura dels mapes de bits per a %s"
+
+#: e2fsck/util.c:346
+msgid "writing block and inode bitmaps"
+msgstr "escriptura dels mapes de bits de bloc i de node-i"
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "en tornar a escriure els mapes de bits de bloc i de node-i per de %s"
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: INCONSISTÈNCIA INESPERADA; EXECUTEU fsck MANUALMENT.\n"
+"\t(és a dir, sense les opcions -a o -p)\n"
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Memòria utilitzada: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Memòria utilitzada: %lu, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "temps: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "temps transcorregut: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "en llegir el node-i %lu a %s"
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "en escriure el node-i %lu a %s"
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+"INCONGRUÈNCIA INESPERADA: El sistema de fitxers que l'fsck està modificant "
+"s'està executant.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "fet \n"
+
+#: misc/badblocks.c:100
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Forma d'ús: %s [-b mida_del_bloc] [-i fitxer_d'entrada] [-o "
+"fitxer_de_sortida] [-svwnf]\n"
+" [-c blocs_a_la_vegada] [-d factor_de_retard_entre_lectures] [-e "
+"blocs_erronis_màx]\n"
+" [-p nombre_de_passos] [-t patró_de_prova [-t patró_de_prova [...]]]\n"
+" dispositiu [darrer_bloc [bloc_d'inici]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: les opcions -n i -w són mutualment exclusives.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% fet, %s transcorreguts. (%d/%d/%d errors)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Comprovació amb un patró arbitrari: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Comprovació amb el patró 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "durant la cerca"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valor estrany (%ld) a do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "durant l'execució de ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "en iniciar la iteració per la llista de blocs erronis"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "en assignar les memòries intermèdies"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Comprovació dels blocs %lu a %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "S'està comprovant si hi ha blocs erronis en mode de només-lectura\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "S'està comprovant si hi ha blocs erronis (prova de només-lectura): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Hi ha massa blocs erronis, s'interromprà la comprovació\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+"S'està comprovant si hi ha blocs erronis en mode de lectura-escriptura\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Dels blocs %lu a %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Lectura i comparació: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+"S'està comprovant si hi ha blocs erronis en mode de lectura-escriptura no "
+"destructiu\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+"S'està comprovant si hi ha blocs erronis (prova en mode de lectura-"
+"escriptura no destructiu)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"S'ha interceptat una interrupció; s'iniciaran les tasques de neteja\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "durant l'escriptura de les dades de prova, bloc %lu"
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s està muntat; "
+
+# FIXME: Hope - esperem ? (dpm)
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"s'ha forçat badblocks de totes maneres. Segurament /etc/mtab sigui "
+"incorrecte.\n"
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "l'execució de badblocks no és segura!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s està essent utilitzat pel sistema; "
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr "s'ha forçat badblocks de totes maneres.\n"
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s no vàlid - %s"
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "no es pot assignar memòria per al patró_de_prova - %s"
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+"Només es pot especificar un patró_de_prova com a màxim en mode de només-"
+"lectura"
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+"No es pot utilitzar un patró_de_prova arbitrari en mode de només-lectura"
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"No s'ha pogut determinar la mida del dispositiu;\n"
+"l'haureu d'especificar manualment\n"
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr "en intentar determinar la mida del dispositiu"
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr "últim bloc"
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr "primer bloc"
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "bloc d'inici no vàlid (%llu): hauria de ser inferior a %llu"
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "bloc de finalització no vàlid (%llu): ha de ser un valor de 32 bits"
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr "en crear la llista de blocs erronis en memòria"
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr "Fitxer d'entrada - format incorrecte"
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr "en afegir a la llista de blocs erronis en memòria"
+
+#: misc/badblocks.c:1347
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Pas completat. S'han trobat %u blocs erronis. (%d/%d/%d errors)\n"
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr "Forma d'ús: %s [-RVf] [-+=aAcCdDeijsStTu] [-v versió] fitxers...\n"
+
+#: misc/chattr.c:159
+#, fuzzy, c-format
+msgid "bad project - %s\n"
+msgstr "versió no vàlida - %s\n"
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versió no vàlida - %s\n"
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "en intentar mostrar la informació de %s"
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr "en llegir els senyaladors a %s"
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr "S'han establert els senyaladors de %s com a "
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr "en establir els senyaladors a %s"
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "S'ha establert la versió de %s a %lu\n"
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr "en establir la versió a %s"
+
+#: misc/chattr.c:271
+#, fuzzy, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "S'ha establert la versió de %s a %lu\n"
+
+#: misc/chattr.c:275
+#, fuzzy, c-format
+msgid "while setting project on %s"
+msgstr "en establir la versió a %s"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "No s'ha pogut assignar la variable del camí a chattr_dir_proc"
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr "= no és compatible amb - i +\n"
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr "Cal utilitzar «-v», =, - o +\n"
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, fuzzy, c-format
+msgid "while reading inode %u"
+msgstr "en llegir el node-i %lu a %s"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+#, fuzzy
+msgid "while expanding directory"
+msgstr "en expandir el /lost+found"
+
+#: misc/create_inode.c:96
+#, fuzzy, c-format
+msgid "while linking \"%s\""
+msgstr "en obrir %s"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, fuzzy, c-format
+msgid "while writing inode %u"
+msgstr "en escriure el node-i %lu a %s"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, fuzzy, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "en intentar truncar %s"
+
+#: misc/create_inode.c:162
+#, fuzzy, c-format
+msgid "while opening inode %u"
+msgstr "en obrir l'escaneig de nodes-i"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+#, fuzzy
+msgid "while allocating memory"
+msgstr "en assignar la memòria intermèdia"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, fuzzy, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "en llegir els senyaladors a %s"
+
+#: misc/create_inode.c:213
+#, fuzzy, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "en escriure el node-i %lu a %s"
+
+#: misc/create_inode.c:223
+#, fuzzy, c-format
+msgid "while closing inode %u"
+msgstr "en fer l'exploració dels nodes-i"
+
+#: misc/create_inode.c:274
+#, fuzzy, c-format
+msgid "while allocating inode \"%s\""
+msgstr "en ubicar la memòria intermèdia per al node-i"
+
+#: misc/create_inode.c:293
+#, fuzzy, c-format
+msgid "while creating inode \"%s\""
+msgstr "en llegir el node-i %lu a %s"
+
+#: misc/create_inode.c:359
+#, fuzzy, c-format
+msgid "while creating symlink \"%s\""
+msgstr "en llegir els senyaladors a %s"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, fuzzy, c-format
+msgid "while looking up \"%s\""
+msgstr "en cercar el /lost+found"
+
+#: misc/create_inode.c:397
+#, fuzzy, c-format
+msgid "while creating directory \"%s\""
+msgstr "en crear el directori arrel"
+
+#: misc/create_inode.c:625
+#, fuzzy, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "en obrir %s"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:747
+#, fuzzy, c-format
+msgid "while opening directory \"%s\""
+msgstr "en obrir %s"
+
+#: misc/create_inode.c:757
+#, fuzzy, c-format
+msgid "while lstat \"%s\""
+msgstr "en intentar mostrar la informació de %s"
+
+#: misc/create_inode.c:808
+#, fuzzy, c-format
+msgid "while creating special file \"%s\""
+msgstr "en llegir el node-i %lu a %s"
+
+#: misc/create_inode.c:817
+#, fuzzy
+msgid "malloc failed"
+msgstr "L'assignació de memòria ha fallat"
+
+#: misc/create_inode.c:825
+#, fuzzy, c-format
+msgid "while trying to read link \"%s\""
+msgstr "en intentar redimensionar %s"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:843
+#, fuzzy, c-format
+msgid "while writing symlink\"%s\""
+msgstr "en escriure el node-i %lu a %s"
+
+#: misc/create_inode.c:854
+#, fuzzy, c-format
+msgid "while writing file \"%s\""
+msgstr "en escriure el node-i %lu a %s"
+
+#: misc/create_inode.c:867
+#, fuzzy, c-format
+msgid "while making dir \"%s\""
+msgstr "en obrir %s"
+
+#: misc/create_inode.c:885
+#, fuzzy
+msgid "while changing directory"
+msgstr "s'està llegint el bloc de directori"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:904
+#, fuzzy, c-format
+msgid "while setting inode for \"%s\""
+msgstr "en establir la versió a %s"
+
+#: misc/create_inode.c:911
+#, fuzzy, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "en establir els senyaladors a %s"
+
+#: misc/create_inode.c:937
+#, fuzzy
+msgid "while saving inode data"
+msgstr "en iniciar l'exploració dels nodes-i"
+
+#: misc/dumpe2fs.c:56
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+"Forma d'ús: %s [-bfhixV] [-o superbloc=<num>] [-o midadelbloc=<num>] "
+"dispositiu\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blocs"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "grups de sectors"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grup %lu: (blocs "
+
+#: misc/dumpe2fs.c:226
+#, fuzzy, c-format
+msgid " csum 0x%04x"
+msgstr " Suma de verificació 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (S'ESPERAVA 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " superbloc %s a "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primari"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Còpia de seguretat"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", descriptors de grup a "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Blocs GDT reservats a "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " descriptor de grup a "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Mapa de bits del bloc a "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, fuzzy, c-format
+msgid ", csum 0x%08x"
+msgstr " Suma de verificació 0x%04x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+#, fuzzy
+msgid " Inode bitmap at "
+msgstr ", mapa de bits del node-i a "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" taula de nodes-i a "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u %s lliures, %u nodes-i lliures, %u directoris%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nodes-i no utilitzats\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Blocs liures: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Nodes-i lliures: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "en imprimir la llista de blocs erronis"
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Blocs erronis: %u"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr "en llegir el node-i del registre de transaccions"
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr "en obrir el node-i del registre de transaccions"
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr "en llegir el superbloc del registre de transaccions"
+
+#: misc/dumpe2fs.c:392
+msgid "Journal superblock magic number invalid!\n"
+msgstr "El numero màgic del registre de transaccions no és vàlid!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "en llegir el superbloc del registre de transaccions"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+"No s'han trobat els números màgics del superbloc del registre de transaccions"
+
+#: misc/dumpe2fs.c:468
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "en assignar la memòria intermèdia"
+
+#: misc/dumpe2fs.c:479
+#, fuzzy, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Comprovació dels blocs %lu a %lu\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "No s'ha pogut assignar memòria per a analitzar les opcions\n"
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Paràmetre del superbloc no vàlid: %s\n"
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Paràmetre de mida de bloc no vàlida: %s\n"
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"S'ha especificat opció(ons) esteses incorrectes: %s\n"
+"\n"
+"Les opcions esteses se separen amb comes, i poden emprar un argument que\n"
+"\n"
+"s'estableix amb un signe igual («=»).\n"
+"\n"
+"Les opcions esteses vàlides són:\n"
+"\tsuperblock=<número de superbloc>\n"
+"\tblocksize=<mida del bloc>\n"
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tEn utilitzar %s\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "No s'ha trobat un superbloc del sistema de fitxers vàlid.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, fuzzy, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "en tornar a intentar la lectura dels mapes de bits per a %s"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr "Forma d'ús: %s [ -r|Q ] [ -fr ] dispositiu fitxer-imatge\n"
+
+#: misc/e2image.c:109
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I dispositiu fitxer-imatge\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+" %s -ra [ -cfnp ] [ -o desplaç_font ] [ -O desplaç_destí ] sf_font "
+"[ sf_destí ]\n"
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+msgid "while allocating buffer"
+msgstr "en assignar la memòria intermèdia"
+
+#: misc/e2image.c:180
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "S'escriu el bloc %llu\n"
+
+#: misc/e2image.c:194
+#, c-format
+msgid "error writing block %llu"
+msgstr "S'ha produït un error en escriure el bloc %llu"
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr "S'ha produït un error a generic_write()"
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Error: La mida de la capçalera és més gran que wrt_size\n"
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr "No s'ha pogut ubicar la capçalera de la memòria intermèdia\n"
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr "en escriure el superbloc"
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr "en escriure la taula de nodes-i"
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr "en escriure el mapa de bits dels blocs"
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr "en escriure el mapa de bits dels nodes-i"
+
+#: misc/e2image.c:506
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr ""
+"El bloc de directori %llu està corromput: la longitud de registre "
+"«rec_len» (%d) és incorrecta\n"
+
+#: misc/e2image.c:518
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr ""
+"El bloc de directori %llu està corromput: la longitud del nom "
+"«name_len» (%d) és incorrecta\n"
+
+#: misc/e2image.c:559
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu blocs (%d%%)"
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr "S'està copiant "
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+"Si atureu ara el procés destruireu el sistema de fitxers, interrompeu un "
+"altre cop si n'esteu segurs\n"
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " queden %s a %.2f MB/s"
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, c-format
+msgid "error reading block %llu"
+msgstr "S'ha produït un error en llegir el bloc %llu"
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "S'han copiat %llu / %llu blocs (%d%%) en %s "
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "a %.2f MB/s"
+
+#: misc/e2image.c:759
+msgid "while allocating l1 table"
+msgstr "en assignar la taula l1"
+
+#: misc/e2image.c:804
+msgid "while allocating l2 cache"
+msgstr "en assignar la memòria cau l2"
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+"Avís: encara hi ha taules a la memòria cau en el moment de posar-la. Es "
+"perdran dades i la imatge no serà vàlida.\n"
+
+#: misc/e2image.c:1152
+msgid "while allocating ext2_qcow2_image"
+msgstr "en assignar la ext2_qcow2_image"
+
+#: misc/e2image.c:1159
+msgid "while initializing ext2_qcow2_image"
+msgstr "en inicialitzar la ext2_qcow2_image"
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+"Error de programació: s'han creat múltiples blocs refcount seqüencials!\n"
+
+#: misc/e2image.c:1276
+msgid "while allocating block bitmap"
+msgstr "en assignar el mapa de bits dels blocs"
+
+#: misc/e2image.c:1285
+msgid "while allocating scramble block bitmap"
+msgstr "en assignar el mapa de bits xifrat dels blocs"
+
+#: misc/e2image.c:1292
+msgid "Scanning inodes...\n"
+msgstr "Escaneig de nodes-i...\n"
+
+#: misc/e2image.c:1304
+msgid "Can't allocate block buffer"
+msgstr "No es pot assignar la memòria intermèdia de blocs"
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "mentre s'iterava sobre el node-i %u"
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "No es poden instal·lar les imatges raw i QCOW2"
+
+#: misc/e2image.c:1411
+msgid "error reading bitmaps"
+msgstr "error en llegir els mapes de bits"
+
+#: misc/e2image.c:1423
+msgid "while opening device file"
+msgstr "en obrir el fitxer de dispositius"
+
+#: misc/e2image.c:1434
+msgid "while restoring the image table"
+msgstr "en restaurar la taula d'imatges"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "l'opció -a només es pot fer servir amb imatges raw o QCOW2."
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr "Els desplaçaments només es poden fer servir en imatges raw."
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr "El mode «Moure» només es pot fer servir en imatges raw."
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr "El mode «Moure» necessita el mode «totes les dades»."
+
+#: misc/e2image.c:1557
+msgid "checking if mounted"
+msgstr "es comprova si està muntat"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Executar e2image en un sistema de fitxers muntat com a L/E pot resultar\n"
+"en una imatge inconsistent que pot no ser útil per depurar.\n"
+"Feu servir l'opció -f si realment voleu fer-ho.\n"
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "La imatge QCOW2 no es pot escriure a la sortida estàndard (stdout)!\n"
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr "No es pot veure l'estat de la sortida\n"
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "La imatge (%s) està comprimida\n"
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "La imatge (%s) està xifrada\n"
+
+#: misc/e2image.c:1640
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "La imatge (%s) està xifrada\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "en provar de convertir una imatge QCOW2 (%s) en una imatge raw (%s)"
+
+#: misc/e2image.c:1654
+msgid "The -c option only supported in raw mode\n"
+msgstr "L'opció -c només es pot fer servir en mode raw\n"
+
+#: misc/e2image.c:1659
+msgid "The -c option not supported when writing to stdout\n"
+msgstr ""
+"L'opció -c no es pot fer servir quan s'escriu a la sortida estàndard "
+"(stdout)\n"
+
+#: misc/e2image.c:1666
+msgid "while allocating check_buf"
+msgstr "en assignar check_buf"
+
+#: misc/e2image.c:1672
+msgid "The -p option only supported in raw mode\n"
+msgstr "L'opció -p només es pot fer servir em mode raw\n"
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d blocs ja contenen les dades que cal copiar\n"
+
+#: misc/e2initrd_helper.c:68
+#, fuzzy, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Forma d'ús: %s disc\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: no es pot obrir %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: no es pot anar al superbloc\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: s'ha produït un error en llegir el superbloc\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: aquest no és un sistema de fitxers ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Avís: l'etiqueta és massa llarga, es truncarà.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: no es pot tornar a anar al superbloc\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2lable: s'ha produït un error en escriure el superbloc\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Forma d'ús: e2label dispositiu [etiquetanova]\n"
+
+#: misc/e2undo.c:124
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr "Forma d'ús: %s <fitxer de transaccions> <sistema de fitxers>\n"
+
+#: misc/e2undo.c:149
+#, fuzzy
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "L'hora de muntatge del sistema de fitxers no concorda amb %u\n"
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:154
+#, fuzzy
+msgid "Last mount time does not match.\n"
+msgstr "L'hora de muntatge del sistema de fitxers no concorda amb %u\n"
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+#, fuzzy
+msgid "while reading filesystem superblock."
+msgstr "en llegir el superbloc del registre de transaccions"
+
+#: misc/e2undo.c:188
+#, fuzzy
+msgid "while fetching superblock"
+msgstr "en escriure el superbloc"
+
+#: misc/e2undo.c:201
+#, fuzzy, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "La suma de verificació del superbloc no coincideix amb el superbloc"
+
+#: misc/e2undo.c:340
+#, fuzzy, c-format
+msgid "illegal offset - %s"
+msgstr "El desplaçament no és vàlid: %s\n"
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:373
+#, fuzzy, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "en obrir el fitxer de dispositius"
+
+#: misc/e2undo.c:380
+#, fuzzy
+msgid "while reading undo file"
+msgstr "en llegir el node arrel"
+
+#: misc/e2undo.c:385
+#, fuzzy, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: s'han especificat massa dispositius\n"
+
+#: misc/e2undo.c:396
+#, fuzzy, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "La suma de verificació del node-i no coincideix amb el node-i"
+
+#: misc/e2undo.c:403
+#, fuzzy, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "La capçalera estesa està corrompuda"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:412
+#, fuzzy, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "mida del bloc erroni - %s"
+
+#: misc/e2undo.c:425
+#, fuzzy, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+"El @S del @j té un senyalador de característica no compatible activat no "
+"compatible.\n"
+
+#: misc/e2undo.c:433
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "S'ha produït un error en determinar si %s està muntat.\n"
+
+#: misc/e2undo.c:439
+#, fuzzy
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+"e2undo només s'hauria d'executar en un sistema de fitxers sense muntar\n"
+
+#: misc/e2undo.c:455
+#, fuzzy, c-format
+msgid "while opening `%s'"
+msgstr "en obrir %s"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:507
+#, fuzzy
+msgid "while reading keys"
+msgstr "en llegir els mapes de bits"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:552
+#, fuzzy, c-format
+msgid "%s: block %llu is too long."
+msgstr "Dels blocs %lu a %lu\n"
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, fuzzy, c-format
+msgid "while fetching block %llu."
+msgstr "S'escriu el bloc %llu\n"
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:615
+#, fuzzy, c-format
+msgid "while writing block %llu."
+msgstr "S'ha produït un error en escriure el bloc %llu"
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr ""
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr ""
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "AVÃS: no s'ha pogut obrir %s: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "AVÃS: format erroni a la línia %d de %s\n"
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"AVÃS: El fitxer /etc/fstab no conté el camp passno de l'fsck.\n"
+"\tS'intentarà arreglar-ho temporalment, però ho hauríeu de\n"
+"\tsolucionar corregint el fitxer /etc/fstab com més aviat millor.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: no s'ha trobat\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: no hi ha cap més procés fill!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Avís... %s per al dispositiu %s ha sortit amb el senyal %d.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: l'estat és %x, cosa que no hauria de succeir mai.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "S'ha finalitzat amb %s (estat de sortida %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: s'ha produït l'error %d en executar l'fsck.%s per a %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"O bé tots o cap dels sistemes de fitxers passats a l'opció -t s'han de "
+"prefixar\n"
+"amb «no» o «!».\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "No s'ha pogut assignar memòria per al sistema de fitxers\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+"%s: se salta una línia incorrecta de /etc/fstab: muntatge lligat(bind) amb "
+"un número de contrasenya diferent de zero\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: no es pot comprovar %s: no s'ha trobat el fsck.%s\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "S'estan comprovant tots els sistemes de fitxers.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--en espera-- (pas %d)\n"
+
+#: misc/fsck.c:1085
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Forma d'ús: fsck [-AMNPRTV] [ -C [ fd ] ] [-t tipusdesistdefitxers] [opcions-"
+"delsistdefitxers] [sistdefitxers ...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: s'han especificat massa dispositius\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: s'han especificat massa arguments\n"
+
+#: misc/fuse2fs.c:3739
+#, fuzzy
+msgid "Mounting read-only.\n"
+msgstr "El fitxer s'ha obert com a només de lectura"
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, c-format
+msgid "%s: %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, fuzzy, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+"Executeu «e2fsck -f %s» primer.\n"
+"\n"
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3806
+#, fuzzy, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "La reducció de la mida del node-i no està implementada\n"
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, fuzzy, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Forma d'ús: %s [-RVadlv] [fitxers...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "En llegir els senyaladors a %s"
+
+#: misc/lsattr.c:93
+#, fuzzy, c-format
+msgid "While reading project on %s"
+msgstr "En llegir la versió a %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "En llegir la versió a %s"
+
+#: misc/mke2fs.c:130
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Forma d'ús: %s [-c|-l nom-fitxer] [-b mida-bloc] [-C mida-cluster]\n"
+"\t[-i bytes-per-node-i] [-I mida-node-i] [-J opcions-registre-transaccions]\n"
+"\t[-G mida-grup-flex] [-N nombre-nodes-i]\n"
+"\t[-m percentatge-blocs-reservats] [-o so-creador]\n"
+"\t[-g blocs-per-grup] [-L etiqueta-volum] [-M últim-directori-muntat]\n"
+"\t[-O característica[,...]] [-r revisió-sf] [-E opció-estesa[,...]]\n"
+"\t[-t tipus-sf] [-T Tipus-ús ] [-U UUID] [-jnqvDFKSV] dispositiu [comptador-"
+"blocs]\n"
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "S'està executant l'ordre: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "en intentar executar «%s»"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "en processar la llista de blocs erronis des del programa"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+"El bloc %d de l'àrea del descriptor del superbloc/grup primari és "
+"incorrecte.\n"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"Els blocs %u fins a %u han d'ésser correctes per a poder crear un sistema de "
+"fitxers.\n"
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "S'està interrompent...\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Avís: el superbloc o descriptors de grup de còpia de seguretat al bloc %u\n"
+"\tcontenen blocs erronis.\n"
+"\n"
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "en marcar els blocs erronis com a utilitzats"
+
+#: misc/mke2fs.c:368
+#, fuzzy
+msgid "while writing reserved inodes"
+msgstr "en escriure al node-i del registre de transaccions"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Escriptura de les taules de nodes-i:"
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"No s'han pogut escriure %d blocs a la taula de nodes-i que comença a %llu: "
+"%s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "fet \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "en crear el directori arrel"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "en llegir el node arrel"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "en establir la propietat del node-i arrel"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "en crear /lost+found"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "en cercar el /lost+found"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "en expandir el /lost+found"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "en establir el node-i de blocs erronis"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "S'ha exhaurit la memòria en esborrar els sectors %d-%d\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Avís: no s'ha pogut llegir el bloc 0: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Avís: no s'ha pogut esborrar el sector %d: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "en inicialitzar el superbloc del registre de transaccions"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "S'estan escrivint zeros al dispositiu de registre de transaccions:"
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr ""
+"en escriure zeros al dispositiu de registre de transaccions (bloc %llu, "
+"recompte %d)"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "en escriure el superbloc del registre de transaccions"
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "S'està creant un sistema de fitxers amb %llu %dk blocs i %u nodes-i\n"
+
+#: misc/mke2fs.c:673
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"avís: %llu blocs no utilitzats.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Etiqueta del sistema de fitxers=%s\n"
+
+#: misc/mke2fs.c:681
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Tipus de sistema operatiu: %s\n"
+
+# FIXME: log
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Mida del bloc=%u (log=%u)\n"
+
+# FIXME: log
+#: misc/mke2fs.c:686
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Mida del grup de sectors=%u (log=%u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Mida del fragment=%u (log=%u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u blocs, amplada del Stripe=%u blocs\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u nodes-i, %llu blocs\n"
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu blocs (%2.2f%%) reservats per al superusuari\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Bloc de dades inicial=%u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Propietari del directori arrel = %u:%u\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Màxim de blocs del sistema de fitxers=%lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grups de blocs\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grup de blocs\n"
+
+#: misc/mke2fs.c:711
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blocs per grup, %u grups de sectors per grup\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blocs per grup, %u fragments per grup\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u nodes-i per grup\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID del sistema de fitxers=%s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Còpies de seguretat del superbloc desades en els blocs: "
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s necessita «-O 64bit»\n"
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "«%s» ha d'anar abans de «resize=%u»\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "El desc_size no és vàlid: «%s»\n"
+
+#: misc/mke2fs.c:853
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "La mida nova no és vàlida: %s\n"
+
+#: misc/mke2fs.c:865
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "El desplaçament no és vàlid: %s\n"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "L'mmp_update_interval no és vàlid: %s\n"
+
+#: misc/mke2fs.c:896
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "El nombre de superblocs de la còpia de seguretat no és vàlid: %s\n"
+
+#: misc/mke2fs.c:918
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "El paràmetre de stride no és vàlid: %s\n"
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "L'amplada del stripe no és vàlida: %s\n"
+
+#: misc/mke2fs.c:956
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Paràmetre de canvi de mida no vàlid: %s\n"
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+"El màxim del canvi de mida ha de ser més gran que la mida del sistema de "
+"fitxers.\n"
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+"El canvi de mida en línia no és compatible amb sistemes de fitxers de versió "
+"0\n"
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "El root_owner no és vàlid: «%s»\n"
+
+#: misc/mke2fs.c:1065
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"S'ha especificat una o vàries opcions incorrectes: %s\n"
+"\n"
+"Les opcions esteses se separen amb comes, i han de tenir un argument\n"
+"\tque s'estableix amb el signe igual («=»).\n"
+"\n"
+"Les opcions esteses vàlides són:\n"
+"\tmmp_update-.interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<trossos de dades per disc RAID en blocs>\n"
+"\tstride-width=<stride del RAID * discs de dades en blocs>\n"
+"\toffset=<desplaçament per crear el sistema de fitxers>\n"
+"\tresize=<mida màxima del redimensionat en blocs>\n"
+"\tpacked_meta_blocs=<0 per deshabilitar-lo, 1 per habilitar-lo>\n"
+"\tlazy_itable_init=<0 per deshabilitar-lo, 1 per habilitar-lo>\n"
+"\tlazy_journal_init=<0 per deshabilitar-lo, 1 per habilitar-lo>\n"
+"\troot_uid=<id del usuari del directori arrel>\n"
+"\troot_gid=<id del grup del directori arrel>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usuari o grup>\n"
+"\n"
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Avís: l'amplada de l'stripe del RAID %u no és un múltiple senar de l'stride "
+"%u.\n"
+"\n"
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Error de sintaxi en el fitxer de configuració del mke2fs (%s, línia no. %d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "S'ha definit una opció del sistema de fitxers no vàlida: %s\n"
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "S'ha establert una opció de muntatge no vàlida: %s\n"
+
+#: misc/mke2fs.c:1296
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"El vostre fitxer mke2fs.conf no defineix el tipus de sistema de fitxers %s.\n"
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Segurament cal que instal·leu un fitxer mke2fs.conf actualitzat.\n"
+"\n"
+
+#: misc/mke2fs.c:1304
+msgid "Aborting...\n"
+msgstr "S'interromp...\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Avis: el fs_type %s no està definit a l'mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1527
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "No s'ha pogut assignar memòria per al nou CAMÃ.\n"
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "El perfil no s'ha pogut inicialitzar correctament (error: %ld).\n"
+
+#: misc/mke2fs.c:1597
+#, c-format
+msgid "invalid block size - %s"
+msgstr "mida de bloc no vàlida - %s"
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+"Avís: la mida de bloc %d no es pot utilitzar a la majoria dels sistemes.\n"
+
+#: misc/mke2fs.c:1617
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "la mida del grup de sectors no és vàlida - %s"
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "«-R» ja no està suportada, feu servir «-E»"
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "comportament d'error erroni - %s"
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr "Nombre no vàlid per als blocs per grup"
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr "el nombre de blocs per grup ha de ser múltiple de 8"
+
+#: misc/mke2fs.c:1669
+msgid "Illegal number for flex_bg size"
+msgstr "Número no vàlid per a la mida de flex_bg"
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr "la mida de flex_bg ha de ser una potència de 2"
+
+#: misc/mke2fs.c:1680
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "la mida de flex_bg (%lu) ha de ser menor o igual a 2^31"
+
+#: misc/mke2fs.c:1690
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "ràtio de nodes-i %s no vàlida (mín %d/màx %d)"
+
+#: misc/mke2fs.c:1700
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "mida de node-i errònia - %s"
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+"Avís: L'opció K ja no està suportada i no s'hauria de fer servir. Feu servir "
+"l'opció estesa «-E nodiscard»!\n"
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr "en malloc el bad_blocks_filename"
+
+#: misc/mke2fs.c:1733
+#, fuzzy, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Avís: l'etiqueta és massa llarga, es truncarà.\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "percentatge de blocs reservats no vàlid - %s"
+
+#: misc/mke2fs.c:1757
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "nombre de nodes-i no vàlid - %s"
+
+#: misc/mke2fs.c:1770
+#, fuzzy
+msgid "while allocating fs_feature string"
+msgstr "en assignar les memòries intermèdies"
+
+#: misc/mke2fs.c:1787
+#, c-format
+msgid "bad revision level - %s"
+msgstr "nivell de versió erroni - %s"
+
+#: misc/mke2fs.c:1792
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "en provar de crear la versió %d"
+
+#: misc/mke2fs.c:1806
+msgid "The -t option may only be used once"
+msgstr "L'opció -t només es pot especificar una vegada"
+
+#: misc/mke2fs.c:1814
+msgid "The -T option may only be used once"
+msgstr "L'opció -T només es pot especificar una vegada"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "en intentar obrir el dispositiu de registre de transaccions %s\n"
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"La mida de bloc del dispositiu de registre de transaccions (%d) és menor que "
+"la mida mínima de bloc %d\n"
+
+#: misc/mke2fs.c:1882
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr ""
+"Mida de bloc del dispositiu de registre de transaccions a utilitzar: %d\n"
+
+#: misc/mke2fs.c:1893
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "nombre de blocs «%s» no vàlid al dispositiu «%s»"
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "sistema de fitxers"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "en intentar determinar la mida del sistema de fitxers"
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"No s'ha pogut determinar la mida del dispositiu; hau d'especificar\n"
+"la mida del sistema de fitxers\n"
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"La mida del dispositiu s'ha llegit com a zero. O bé heu especificat una\n"
+"\tpartició no vàlida, o bé la taula de particions no s'ha tornat a llegir\n"
+"\tdesprés d'executar l'fdisk degut a una partició ocupada i en ús. Pot\n"
+"\tser que hàgiu de reiniciar perquè es pugui tornar a llegir la taula de.\n"
+"\tparticions.\n"
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr ""
+"La mida del sistema de fitxers és més gran que la mida aparent del "
+"dispositiu."
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr "No s'ha pogut analitzar la llista de sistemes de fitxers\n"
+
+#: misc/mke2fs.c:2040
+#, fuzzy
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "El Hurd no és compatible amb la característica de tipus de fitxer.\n"
+
+#: misc/mke2fs.c:2045
+#, fuzzy
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "El Hurd no és compatible amb la característica de tipus de fitxer.\n"
+
+#: misc/mke2fs.c:2050
+#, fuzzy
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "El Hurd no és compatible amb la característica de tipus de fitxer.\n"
+
+#: misc/mke2fs.c:2055
+#, fuzzy
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "El Hurd no és compatible amb la característica de tipus de fitxer.\n"
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr "en intentar determinar la mida del sector del maquinari"
+
+#: misc/mke2fs.c:2071
+msgid "while trying to determine physical sector size"
+msgstr "en intentar determinar la mida física del sector"
+
+#: misc/mke2fs.c:2103
+msgid "while setting blocksize; too small for device\n"
+msgstr "en establir la mida del bloc. Massa petita pel dispositiu\n"
+
+#: misc/mke2fs.c:2108
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+"Avís: la mida del bloc especificada %d és més petita que la mida física del "
+"sector del dispositiu %d\n"
+
+#: misc/mke2fs.c:2132
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: la mida del dispositiu (0x%llx blocs) %s és massa gran per a expressar-"
+"la \n"
+"\ten 32 bits. S'utilitzarà una mida de bloc de %d.\n"
+
+#: misc/mke2fs.c:2144
+#, fuzzy, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: la mida del dispositiu (0x%llx blocs) %s és massa gran per a expressar-"
+"la \n"
+"\ten 32 bits. S'utilitzarà una mida de bloc de %d.\n"
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "Resolució del fs_types per mke2fs.conf: "
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"Les característiques del sistema de fitxers no són compatibles amb sistemes "
+"de fitxers amb versió 0\n"
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+"Els superblocs dispersos no són compatibles amb sistemes de fitxers amb "
+"versió 0\n"
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+"Els registres de transaccions no són compatibles amb sistemes de fitxers amb "
+"versió 0\n"
+
+#: misc/mke2fs.c:2204
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "percentatge de blocs reservats no vàlid - %lf"
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+"«Extents» HA d'estar habilitat per sistemes de fitxers de 64 bits. Indiqueu "
+"-O extents per rectificar-ho.\n"
+
+#: misc/mke2fs.c:2241
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+"La mida del grup de sectors no hauria de ser més petita que la mida del "
+"bloc.\n"
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+"L'especificació de la mida del grup de sectors necessita la característica "
+"bigalloc"
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "avís: No es pot obtenir la geometria del dispositiu de %s\n"
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "L'alineació de %s està desplaçada %lu bytes.\n"
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+"Això pot resultar en un funcionament molt pobre. Se suggereix (tornar a) fer "
+"les particions.\n"
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "Els blocs de %d-byte són massa grans pel sistema (màx %d)"
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Avís: Els blocs de %d-byte són massa grans pel sistema (màx %d), es força a "
+"continuar\n"
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+"No es pot fer servir la característica bigalloc sense la característica "
+"«extents»"
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Les característiques resize_inode i meta_bg no són compatibles.\n"
+"No es poden activar de manera simultània.\n"
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+"\n"
+"Avís: la característica bigalloc encara està en desenvolupament\n"
+"Vegeu https://ext4.wiki.kernel.org/index.php/Bigalloc per més informació\n"
+"\n"
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"La funció reservada per redimensionar blocs en línia no està implementada "
+"per sistemes de fitxers no dispersos"
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr "el nombre de blocs per grup està fora de l'interval permès"
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+"La característica flex_bg no està habilitada, per la qual cosa no és permès "
+"especificar la mida de flex_bg"
+
+#: misc/mke2fs.c:2467
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "mida de node-i no vàlida (%d) (mín %d/màx %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "hi ha massa nodes-i (%llu), voleu incrementar-ne la ràtio?"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+"hi ha massa nodes-i (%llu), hauríeu d'especificar-ne un nombre menor a 2^32"
+
+#: misc/mke2fs.c:2518
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"El producte inode_size (%u) * inodes_count (%u) és massa gran per a\n"
+"\tun sistema de fitxers amb %llu blocs. Especifiqueu una inode_ratio (-i)\n"
+"\tmés gran o bé un nombre menor de nodes-i (-N).\n"
+
+#: misc/mke2fs.c:2705
+msgid "Discarding device blocks: "
+msgstr "Es descarten els blocs del dispositiu: "
+
+#: misc/mke2fs.c:2721
+msgid "failed - "
+msgstr "ha fallat - "
+
+#: misc/mke2fs.c:2780
+#, fuzzy
+msgid "while initializing quota context"
+msgstr "en inicialitzar la ext2_qcow2_image"
+
+#: misc/mke2fs.c:2787
+#, fuzzy
+msgid "while writing quota inodes"
+msgstr "en escriure al node-i del registre de transaccions"
+
+#: misc/mke2fs.c:2812
+#, fuzzy, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "comportament d'error erroni - %s"
+
+#: misc/mke2fs.c:2888
+#, fuzzy
+msgid "in malloc for android_sparse_params"
+msgstr "en malloc el bad_blocks_filename"
+
+#: misc/mke2fs.c:2902
+msgid "while setting up superblock"
+msgstr "en configurar el superbloc"
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2933
+#, fuzzy
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "El Hurd no és compatible amb la característica de tipus de fitxer.\n"
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+"S'ha descartat correctament i es posaran 0s - se salta la neteja de la taula "
+"de nodes-i\n"
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "sistema operatiu desconegut - %s"
+
+#: misc/mke2fs.c:3119
+msgid "Allocating group tables: "
+msgstr "S'assignen les taules de grup: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr "en intentar assignar les taules del sistema de fitxers"
+
+#: misc/mke2fs.c:3136
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\ten convertir el mapa de bits del subgrup de sectors"
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3183
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "en escriure zeros al bloc %llu al final del sistema de fitxers"
+
+#: misc/mke2fs.c:3196
+msgid "while reserving blocks for online resize"
+msgstr "en reservar blocs per al canvi de mida en línia"
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr "registre de transaccions"
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Addició d'un registre de transaccions al dispositiu %s:"
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\ten intentar afegir un registre de transaccions al dispositiu %s"
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "fet\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+"Es salta la creació del registre de transaccions en el mode només súper\n"
+
+#: misc/mke2fs.c:3248
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Creació del registre de transaccions (%u blocs): "
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\ten intentar crear el registre de transaccions"
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"S'ha produït un error en habilitar la característica de protecció de "
+"muntatge múltiple."
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+"S'ha habilitat la protecció de muntatge múltiple amb un interval "
+"d'actualització de %d segons.\n"
+
+#: misc/mke2fs.c:3290
+#, fuzzy
+msgid "Copying files into the device: "
+msgstr ""
+"S'ha produït un error quan es buidaven les escriptures del dispositiu "
+"d'emmagatzemament: %m\n"
+
+#: misc/mke2fs.c:3296
+#, fuzzy
+msgid "while populating file system"
+msgstr "en assignar la taula l1"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+"Escriptura de la informació dels superblocs i de comptabilitat del sistema "
+"de fitxers:"
+
+#: misc/mke2fs.c:3310
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "en escriure zeros al bloc %llu al final del sistema de fitxers"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"fet\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, fuzzy, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "en escriure zeros al bloc %llu al final del sistema de fitxers"
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:582
+#, fuzzy, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Es crea el fitxer normal %s\n"
+
+#: misc/mk_hugefiles.c:584
+#, fuzzy, c-format
+msgid "with %llu blocks each"
+msgstr ""
+"avís: %llu blocs no utilitzats.\n"
+"\n"
+
+#: misc/mk_hugefiles.c:593
+#, fuzzy, c-format
+msgid "while creating huge file %lu"
+msgstr "mentre s'iterava sobre el node-i %u"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Forma d'ús: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Forma d'ús: %s dispositiu...\n"
+"\n"
+"Mostra la informació de particionament per a cada dispositiu especificat.\n"
+"Per exemple: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "No es pot obrir %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "No es pot obtenir la geometria de %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "No es pot obtenir la mida de %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d inici=%8d mida=%8lu final=%8d\n"
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+#, fuzzy
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Hauríeu d'executar l'e2fsck en el sistema de fitxers.\n"
+
+#: misc/tune2fs.c:123
+#, fuzzy
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Hauríeu d'executar l'e2fsck en el sistema de fitxers.\n"
+
+#: misc/tune2fs.c:136
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Forma d'ús: %s [-c Contador_màxim_muntatges] [-e comportament_errors] [-g "
+"grup]\n"
+"\t[-i interval[d|m|w]] [-j] [-J opcions_registre_transaccions] [-l]\n"
+"\t[-m percent_blocs_reservats] [-o [^]opcions_muntatge[,...]] [-p "
+"mmp_interval_actualitz]\n"
+"\t[-r comptador_blocs_reservats] [-u usuari] [-C comptador_muntatges] [-L "
+"etiqueta_volum]\n"
+"\t[-M dir_últim_muntatge] [-O [^]característica[,...]]\n"
+"\t[-Q opcions_cuota]\n"
+"\t[-E opció_estesa[,...]] [-T últim_cop_comprovat] [-U UUID]\n"
+"\t[ -I nova_mida_node-i] dispositiu\n"
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "No s'ha trobat el superbloc del registre de transaccions\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "en intentar obrir el registre de transaccions extern"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s no és un dispositiu de registre de transaccions.\n"
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+"No s'ha trobat l'UUID del sistema de fitxers en el dispositiu del registre "
+"de transaccions.\n"
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"No es pot ubicar el dispositiu per al registre de transaccions. NO s'ha "
+"tret\n"
+"Feu servir l'opció -f per treure el dispositiu per al registre de "
+"transaccions que falta.\n"
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr "S'ha suprimit el registre de transaccions\n"
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "en llegir els mapes de bits"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr "en netejar el node-i del registre de transaccions"
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr "en escriure al node-i del registre de transaccions"
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr "(i reinicieu després)\n"
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:483
+#, fuzzy, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr ""
+"Executeu «e2fsck -f %s» primer.\n"
+"\n"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+"La característica de neteja del sistema de fitxers «%s» no està "
+"implementada.\n"
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+"L'establiment de la característica del sistema de fitxers «%s» no està "
+"implementada.\n"
+
+#: misc/tune2fs.c:1138
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La característica has_journal només es pot esborrar si el sistema de fitxers "
+"no\n"
+"està muntat, o bé està muntat en mode de només lectura.\n"
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"El senyalador needs_recovery està establert. Hauríeu d'executar l'e2fsck\n"
+"abans de netejar el senyalador has_journal.\n"
+
+#: misc/tune2fs.c:1164
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"L'establiment de la característica del sistema de fitxers «sparse_super» no "
+"està implementada\n"
+"per als sistemes de fitxers amb l'opció meta_bg habilitada\n"
+
+#: misc/tune2fs.c:1177
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"La característica de protecció contra els muntatges múltiples \n"
+"no es pot habilitar si el sistema de fitxers està muntat\n"
+"o és de només lectura.\n"
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+"S'ha habilitat la protecció contra muntatges múltiples amb un interval "
+"d'actualització de %ds.\n"
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"La protecció contra muntatges múltiples no es pot\n"
+"deshabilitar si el sistema de fitxers és de només lectura.\n"
+
+#: misc/tune2fs.c:1212
+msgid "Error while reading bitmaps\n"
+msgstr "S'ha produït un en llegir els mapes de bits\n"
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+"Els númeri màgic del bloc MMP no coincideix. S'esperava: %x, i és: %x\n"
+
+#: misc/tune2fs.c:1226
+msgid "while reading MMP block."
+msgstr "en llegir el bloc MMP."
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Treure el senyalador flex_bg pot fer que el sistema de fitxers\n"
+"no sigui consistent.\n"
+
+#: misc/tune2fs.c:1269
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La característica huge_file només es pot esborrar si el sistema de fitxers "
+"no\n"
+"està muntat, o bé està muntat en mode de només lectura.\n"
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1323
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Avís: L'opció «^quota» substitueix els arguments de «-Q».\n"
+
+#: misc/tune2fs.c:1465
+#, fuzzy
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"L'establiment de la característica del sistema de fitxers «sparse_super» no "
+"està implementada\n"
+"per als sistemes de fitxers amb l'opció meta_bg habilitada\n"
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1489
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr "El sistema de fitxers ja té un registre de transaccions.\n"
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\ten intentar obrir el registre de transaccions a %s\n"
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Creació del registre de transaccions al dispositiu %s:"
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "en afegir un sistema de fitxers al registre de transaccions a %s"
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Creació del node-i del registre de transaccions:"
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\ten intentar crear el fitxer del registre de transaccions"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+#, fuzzy
+msgid "while initializing quota context in support library"
+msgstr "en inicialitzar el superbloc del registre de transaccions"
+
+#: misc/tune2fs.c:1649
+#, fuzzy, c-format
+msgid "while updating quota limits (%d)"
+msgstr "en actualitzar el node-i de block erronis"
+
+#: misc/tune2fs.c:1657
+#, fuzzy, c-format
+msgid "while writing quota file (%d)"
+msgstr "en escriure la taula dels nodes-i (grup %d)"
+
+#: misc/tune2fs.c:1675
+#, fuzzy, c-format
+msgid "while removing quota file (%d)"
+msgstr "en llegir la taula dels nodes-i (grup %d)"
+
+#: misc/tune2fs.c:1718
+#, fuzzy
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Les opcions de quota no s'han especificat correctament.\n"
+"\n"
+"Hi ha disponibles les següents opcions de quota (separeu-les amb coma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "No s'ha pogut analitzar l'especificador de data/hora: %s"
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "nombre de muntatges erroni - %s"
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nom de grup/gid erroni - %s"
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr "interval erroni - %s"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "ràtio de blocs reservats errònia - %s"
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr "-o només es pot especificar una vegada"
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr "-O només es pot especificar una vegada"
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "número de blocs reservats erroni - %s"
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nom d'usuari/uid erroni - %s"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "bad inode size - %s"
+msgstr "mida del node-i errònia - %s"
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "La mida del node-i ha de ser una potència de 2 - %s"
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "L'mmp_update_interval és massa gran: %lu\n"
+
+#: misc/tune2fs.c:2115
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+"S'estableix l'interval d'actualització de la protecció contra muntatges "
+"múltiples a %lu segon\n"
+msgstr[1] ""
+"S'estableix l'interval d'actualització de la protecció contra muntatges "
+"múltiples a %lu segons\n"
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "L'stride del RAID no és vàlid: %s\n"
+
+#: misc/tune2fs.c:2153
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "L'stripe-width del RAID no és vàlid: %s\n"
+
+#: misc/tune2fs.c:2168
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algorisme de resum no vàlid: %s\n"
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Establiment de l'algorisme de resum predeterminat a %s (%d)\n"
+
+#: misc/tune2fs.c:2193
+#, fuzzy
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+"\n"
+"S'ha especificat una o vàries opcions incorrectes.\n"
+"\n"
+"Les opcions esteses se separen amb comes, i han de tenir un argument\n"
+"\tque s'estableix amb el signe igual («=»).\n"
+"\n"
+"Les opcions esteses vàlides són:\n"
+"\tclear_mmp\n"
+"\thash_alg=<algorisme de resum>\n"
+"\tstride=<trossos de dades per disc RAID en blocs>\n"
+"\tstripe-width=<stride del RAID * discs de dades en blocs>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:2663
+msgid "Failed to read inode bitmap\n"
+msgstr "No s'ha pogut llegit el mapa de bits del node-i\n"
+
+#: misc/tune2fs.c:2668
+msgid "Failed to read block bitmap\n"
+msgstr "No s'ha pogut llegit el mapa de bits del bloc\n"
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr "blocs a moure"
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+"No s'ha pogut assignar el mapa de bits del bloc en fer més gran el node-i\n"
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr "No hi ha prou espai per fer més gran el node-i\n"
+
+#: misc/tune2fs.c:2699
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "No s'ha pogut reubicar els blocs en canviar la mida de node-i\n"
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"S'ha produït un error en canviar la mida del node-i.\n"
+"Executeu l'e2undo per a desfer els canvis al sistema de fitxers. \n"
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Si esteu segur que el sistema de fitxers no s'està fent servir a cap node, "
+"executeu:\n"
+"'tune2fs -f -E clear_mmp {dispositiu}'\n"
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"El bloc màgic MMP està malament. Proveu d'arreglar-lo fent servir:\n"
+"'e2fsck -f %s'\n"
+
+#: misc/tune2fs.c:2955
+#, fuzzy
+msgid "Cannot modify a journal device.\n"
+msgstr "%s no és un dispositiu de registre de transaccions.\n"
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "La mida del node-i ja és %lu\n"
+
+#: misc/tune2fs.c:2975
+msgid "Shrinking inode size is not supported\n"
+msgstr "La reducció de la mida del node-i no està implementada\n"
+
+#: misc/tune2fs.c:2980
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "La mida del node-i no és vàlida %lu (màx %d)\n"
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3045
+#, fuzzy, c-format
+msgid "Recovering journal.\n"
+msgstr "%s: recuperació del registre de transaccions\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Establiment del nombre màxim de muntatges a %d\n"
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Establiment del nombre de muntatges actual a %d\n"
+
+#: misc/tune2fs.c:3074
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Establiment del comportament d'error a %d\n"
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Establiment del GID dels blocs reservats a %lu\n"
+
+#: misc/tune2fs.c:3084
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "L'interval entre comprovacions és massa gran (%lu)"
+
+#: misc/tune2fs.c:3091
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Establiment de l'interval entre comprovacions a %lu segons\n"
+
+#: misc/tune2fs.c:3098
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "S'estableix el percentatge de blocs reservats a %g%% (%llu blocs)\n"
+
+#: misc/tune2fs.c:3104
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "el contador de blocs reservats és massa gran (%llu)"
+
+#: misc/tune2fs.c:3111
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "S'estableix el contador de blocs reservats a %llu\n"
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"El sistema de fitxers ja té superblocs dispersos.\n"
+
+#: misc/tune2fs.c:3119
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"L'establiment del senyalador de superbloc dispers no està implementat\n"
+"pels sistemes de fitxers amb la característica meta_bg habilitada.\n"
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"S'ha establert el senyalador de superbloc dispers. %s"
+
+#: misc/tune2fs.c:3134
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"La neteja del senyalador de superbloc dispers no està implementada.\n"
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Establiment de la darrera comprovació del sistema de fitxers a %s\n"
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Establiment de l'UID dels blocs reservats a %lu\n"
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+"S'ha produït un error en fer servir clear_mmp. S'ha de fer servir amb -f\n"
+
+#: misc/tune2fs.c:3198
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"La característica quota s'ha de canviar només quan el sistema de fitxers "
+"està desmuntat.\n"
+
+#: misc/tune2fs.c:3222
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"L'UUID s'ha de canviar només quan el sistema de fitxers està desmuntat.\n"
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr "El format de l'UUID no és vàlid\n"
+
+#: misc/tune2fs.c:3275
+msgid "Need to update journal superblock.\n"
+msgstr "S'ha d'actualitzar el registre de transaccions\n"
+
+#: misc/tune2fs.c:3301
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"La mida del node-i només es pot canviar quan el sistema de fitxers està "
+"desmuntat.\n"
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"No està implementat el canvi de mida del node-i en sistemes de fitxers\n"
+"amb la característica flex_bg habilitada.\n"
+
+#: misc/tune2fs.c:3326
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "S'estableix la mida de node-i a %lu\n"
+
+#: misc/tune2fs.c:3330
+msgid "Failed to change inode size\n"
+msgstr "No s'ha pogut canviar la mida del node-i\n"
+
+#: misc/tune2fs.c:3344
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "S'estableix la mida de l'stride a %d\n"
+
+#: misc/tune2fs.c:3349
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "S'estableix l'amplada de l'stride a %d\n"
+
+#: misc/tune2fs.c:3356
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "S'estableix les opcions esteses de muntatge per defecte «%s»\n"
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr "<continuar>\n"
+
+#: misc/util.c:104
+#, fuzzy, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Voleu continuar de totes maneres (o esperar %d segons) ? (s,n)"
+
+#: misc/util.c:108
+#, fuzzy
+msgid "Proceed anyway? (y,N) "
+msgstr "Voleu continuar de totes maneres? (s,n)"
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"s'ha forçat el mke2fs de totes maneres. Amb una mica de sort el fitxer /etc/"
+"mtab és incorrecte.\n"
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "no es farà un %s aquí\n"
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr "s'ha forçat el mke2fs de totes maneres.\n"
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+"No s'ha pogut assignar memòria per a analitzar les opcions del registre de "
+"transaccions\n"
+
+#: misc/util.c:186
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"No s'ha trobat cap dispositiu de registre de transaccions que coincideixi "
+"amb %s\n"
+
+#: misc/util.c:213
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"S'han especificats opcions incorrectes per al registre de transaccions.\n"
+"\n"
+"Les opcions per al registre de transaccions se separen amb comes i han de "
+"tenir un argument\n"
+"\tque s'estableix amb el signe igual («=»).\n"
+"\n"
+"Les opcions vàlides per al registre de transaccions són:\n"
+"\tsize=<mida en megabytes del registre de transaccions>\n"
+"\tdevice=<dispositiu del registre de transaccions>\n"
+"\tlocation=<ubicació del registre de transaccions>n\n"
+"La mida del registre de transaccions ha de ser entre 1024 i 10240000 blocs "
+"de sistema de fitxer.\n"
+"\n"
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"El sistema de fitxers és massa petit per a un registre de transaccions\n"
+
+#: misc/util.c:251
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"La mida del registre de transaccions requerida és de %d blocs. Ha de ser\n"
+"entre 1024 i 10240000 blocs. S'interromp.\n"
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"La mida del registre de transaccions és massa gran per al sistema de "
+"fitxers.\n"
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Aquest sistema de fitxers es comprovarà automàticament cada %d muntatges\n"
+"o bé cada %g dies, el que passi primer. Feu servir tune2fs -c o -t per "
+"modificar-ho.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Forma d'ús: %s [-d] [-p pidfitxer] [-s camísòcol] [-T tempsmàx]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n núm] [-s camísòcol]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "arguments incorrectes"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "connecta"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "escriu"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "llegeix el comptador"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "longitud de la resposta incorrecta"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "el dimoni uuidd ja s'està executant amb el pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "No s'ha pogut crear el sòcol de flux de unix: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "No s'ha pogut vincular el sòcol %s de unix: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "No s'ha pogut escoltar al sòcol de unix %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "S'ha produït un error en llegir del client, longitud = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operació %d, número entrant =%d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "S'ha generat el UUID de temps: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "S'ha generat el UUID aleatori: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "S'ha generat el UUID de temps %s i el subsegüent UUID\n"
+msgstr[1] "S'ha generat el UUID de temps %s i els %d subsegüents UUIDs\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "S'ha generat %d UUID's:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "L'operació %d no és vàlida\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Número incorrecte: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "S'ha produït un error en cridar el dimoni del uuidd(%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s i el subsegüent UUID\n"
+msgstr[1] "%s i els subsegüents %d UUIDs\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Llista de UUID's:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Longitud de resposta inesperada des del servidor %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "No s'ha pogut matar el uuidd que s'executa amb el pid %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "S'ha matat el uuidd que s'executa amb el pid %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Forma d'ús: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "# Bolcat de l'estensió:\n"
+
+# FIXME: «Sorted» (dpm)
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNúm=%llu, Mida=%llu, Cursor=%llu, Ordenat=%llu\n"
+
+#: resize/main.c:49
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Forma d'ús: %s [-d senyaladors_de_depuració] [-f] [-F] [-M] [-P] [-p] "
+"dispositiu [mida nova]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Ampliació de la taula de nodes-i"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Reubicació dels blocs"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Escaneig de la taula de nodes-i"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Actualització de les referències dels nodes-i"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Trasllat de la taula de nodes-i"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Pas desconegut!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Inici del pas %d (màx = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"El canvi de mida del sistema de fitxers bigalloc no està completament "
+"provat. Continueu\n"
+"al vostre propi risc! Empreu l'opció de forçat si voleu continuar de totes "
+"maneres.\n"
+"\n"
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr "en obrir %s"
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "eon obtenir la informació d'«stat» per a %s"
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Executeu «e2fsck -f %s» primer.\n"
+"\n"
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Mida mínima estimada del sistema de fitxers: %llu\n"
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "La mida nova no és vàlida: %s\n"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "La mida nova és massa gran per ser expressada en 32 bits\n"
+
+#: resize/main.c:534
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "La mida nova és inferior al mínim (%llu)\n"
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr "La longitud del stride no és vàlida"
+
+#: resize/main.c:564
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"La partició (o dispositiu) contenidora té una mida de només %llu (%dk) "
+"blocs.\n"
+"N'heu requerit una mida nova de %llu blocs.\n"
+"\n"
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+
+#: resize/main.c:581
+#, fuzzy, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+"La característica quota s'ha de canviar només quan el sistema de fitxers "
+"està desmuntat.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+
+#: resize/main.c:593
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"El sistema de fitxers ja té una llargària de %llu (%dk) blocs. No cal fer "
+"res!\n"
+"\n"
+
+#: resize/main.c:600
+#, fuzzy, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "El sistema de fitxers ja té un registre de transaccions.\n"
+
+#: resize/main.c:605
+#, fuzzy, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "El sistema de fitxers ja té un registre de transaccions.\n"
+
+#: resize/main.c:613
+#, fuzzy, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Establiment de la darrera comprovació del sistema de fitxers a %s\n"
+
+#: resize/main.c:615
+#, fuzzy, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Establiment de la darrera comprovació del sistema de fitxers a %s\n"
+
+#: resize/main.c:617
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+"Es canvia la mida del sistema de fitxers que hi ha a %s a %llu (%dk) blocs.\n"
+"\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "en intentar redimensionar %s"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Executeu «e2fsck -fy %s» per arreglar el sistema de fitxers\n"
+"després d'interrompre la operació de canvi de mida.\n"
+
+#: resize/main.c:635
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"El sistema de fitxers a %s té ara una llargària de %llu (%dk) blocs.\n"
+"\n"
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "en intentar truncar %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr ""
+"El nucli no és compatible amb el canvi de mida en línia amb sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+"El sistema de fitxers a %s està muntat a %s; cal un canvi de mida en línia\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "La reducció de mida en línia no està implementada"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "El sistema de fitxers no és compatible amb el canvi de mida en línia"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "No hi ha prou blocs gdt reservats per fer el canvi de mida"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+"El nucli no és compatible amb el canvi de mida d'un sistema de fitxers tan "
+"gran"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "en intentar obrir el punt de muntatge %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "S'ha demanat la interfície de canvi de mida antiga.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "S'ha denegat el permís per a canviar la mida del sistema de fitxers"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "En comprovar la compatibilitat amb el canvi de mida en línia"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "El nucli no és compatible amb el canvi de mida en línia"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Es realitza un canvi de mida en línia de %s a %llu (%dk) blocs.\n"
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr "En intentar ampliar el darrer grup"
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "En intentar afegir el grup #%d"
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+"El sistema de fitxers a %s està muntat a %s, i aquest sistema no és "
+"compatible amb el canvi de mida en línia.\n"
+
+#: resize/resize2fs.c:759
+#, fuzzy, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "el nombre de nodes-i (%llu) ha de ser menor que %u"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "blocs reservats"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr "blocs de metadades"
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+msgid "new meta blocks"
+msgstr "nous blocs de metadades"
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "No hauria de passar mai! No hi ha sb al darrer super_sparse bg?\n"
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "No hauria de passar mai! old_desc inesperat al super_sparse bg?\n"
+
+# FIXME: (dpm)
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Això no hauria de passar mai: canvi de mida del node-i malmesa\n"
+
+#: lib/ext2fs/ext2_err.c:11
+#, fuzzy
+msgid "EXT2FS Library version 1.44.4"
+msgstr "Versió 1.42.12 de la llibreria EXT2FS"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "El número màgic és incorrecte per l'estructura d'ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "El número màgic és incorrecte per l'estructura de badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "El número màgic és incorrecte per l'estructura de badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "El número màgic és incorrecte per l'estructura d'inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "El número màgic és incorrecte per l'estructura d'io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "El número màgic és incorrecte per l'estructura d'io_channel de unix"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "El número màgic és incorrecte per l'estructura d'io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "El número màgic és incorrecte per l'estructura de block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "El número màgic és incorrecte per l'estructura d'inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "El número màgic és incorrecte per l'estructura de generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr ""
+"El número màgic és incorrecte per l'estructura de l'io_channel de comprovació"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr ""
+"El número màgic és incorrecte per l'estructura de la llista de directoris de "
+"blocs"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "El número màgic és incorrecte per l'estructura de l'icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr ""
+"El número màgic és incorrecte per l'estructura del Powerquest io_channel"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "El número màgic és incorrecte per l'estructura de fitxers d'ext2"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "El número màgic és incorrecte per l'Ext2 Image Header"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr ""
+"El número màgic és incorrecte per l'estructura de l'io_channel del node-i"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "El número màgic és incorrecte per la gestió de «extent» de l'ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "El número màgic del superbloc és incorrecte"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "La versió del sistema de fitxers és massa alta"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr ""
+"S'intenta escriure en un sistema de fitxers obert com a només de lectura"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "No es poden llegir els descriptors de grup"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "No es poden escriure els descriptors de grup"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+"El descriptor de grups està corromput: el bloc pel bloc de mapa de bits és "
+"incorrecte"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+"El descriptor de grups està corromput: el bloc pel node-i del mapa de bits "
+"és incorrecte"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+"El descriptor de grups està corromput: la taula bloc per node-i és incorrecta"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "No es pot escriure un mapa de bits de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "No es pot llegir un mapa de bits de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "No es pot escriure un mapa de bits de blocs"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "No es pot llegir un mapa de bits de blocs"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "No es pot escriure una taula de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "No es pot llegir una taula de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "No es pot llegir el següent node-i"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "El sistema de fitxers té un bloc de mida inesperada"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "El directori d'EXT2 està corromput"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+"L'intent de llegir un bloc del sistema de fitxers ha resultat en una lectura "
+"curta"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+"L'intent d'escriure un bloc del sistema de fitxers ha resultat en una "
+"escriptura curta"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "No queda espai lliure al directori"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "No s'ha carregat el mapa de bits de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "No s'ha carregat el mapa de bits de blocs"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "El número del node-i no és correcte"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "El número de bloc no és correcte"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "S'ha produït un error intern a ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "No hi ha prou espai per construir el sistema de fitxers proposat"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "S'ha indicat un número de bloc incorrecte a ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "S'ha indicat un número de bloc incorrecte a ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "S'ha indicat un número de bloc incorrecte a ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "S'ha indicat un número de node-i incorrecte a ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+"S'ha indicat un número de node-i incorrecte a ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "S'ha indicat un número de node-i incorrecte a ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+"L'intent de falsejar el final del mapa de bits de blocs ha superat el final "
+"real"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+"L'intent de falsejar el final del mapa de bits de nodes-i ha superat el "
+"final real"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "S'ha trobat un bloc indirecte incorrecte"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "S'ha trobat un bloc doblement indirecte incorrecte"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "S'ha trobat un bloc triplement indirecte incorrecte"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Els mapes de bits de blocs no són iguals"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Els mapes de bits de nodes-i no són iguals"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "El nom del dispositiu és incorrecte o està mal construït"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Hi ha un grup de blocs al que li falta una taula de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "El superbloc d'ext2 està corromput"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+"S'ha indicat un número de bit genèric incorrecte a ext2fs_mark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+"S'ha indicat un número de bit genèric incorrecte a "
+"ext2fs_unmark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+"S'ha indicat un número de bit genèric incorrecte a ext2fs_test_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "S'han trobat massa enllaços simbòlics."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "La funció de crida de retorn no contempla aquest cas"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "El node-i correspon a un bloc incorrecte a la taula de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr ""
+"Hi ha una o més característiques que no estan implementades per aquest "
+"sistema de fitxers"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr ""
+"El sistema de fitxers té característiques només de lectura/n/tque no estan "
+"implementades"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "El canal de E/S no ha pogut cercar en lectura o escriptura"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "L'assignació de memòria ha fallat"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "S'ha indicat un argument incorrecte a la llibreria d'ext2"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "No s'ha pogut assignar blocs al sistema de fitxers ext2"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "No s'ha pogut assignar nodes-i al sistema de fitxers ext2"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "El node-i de l'ext2 no és un directori"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "La taula té massa referències"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "L'ext2_lookup no ha trobat el fitxer"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "El fitxer s'ha obert com a només de lectura"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "No s'ha trobat el bloc de directori de l'ext2"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "El directori de l'ext2 ja existeix"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "La funció de la llibreria ext2 no està implementada"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "L'usuari ha demanat la cancel·lació"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "El fitxer de l'ext2 és massa gran"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "El registre de transaccions indicat no és un dispositiu de blocs"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "El superbloc del registre de transaccions no s'ha trobat"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "El registre de transaccions ha de tenir com a mínim 1024 blocs"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "No es permet l'ús de la versió de registre de transaccions"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "S'ha produït un error en llegir el registre de transaccions extern"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "No s'ha trobat el registre de transaccions"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "No es permet l'ús del hash de directoris"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "El número de bloc de l'atribut extés no és correcte"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "No es pot crear el sistema de fitxers amb el nombre de nodes-i demanat"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "La instantània de l'E2image no es fa servir"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Hi ha massa blocs descriptors de grup reservats"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "El canvi de mida del node-i està corromput"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+"S'ha provat d'establir el bmap del bloc amb el bloc indirecte que falta"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Correcte"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Base de dades corrompuda"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: Error de E/S"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Error de bloqueig"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Sense memòria"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: El registre ja existeix"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: El bloqueig ja existeix amb altres claus"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: El paràmetre no és valid"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: El registre no existeix"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: No es pot escriure"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "La llista de blocs de directori de l'ext2fs està buida"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+"S'intenta modificar un mapatge de blocs a través d'un iterador de blocs de "
+"només lectura"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "El número màgic no és correcte pel camí d'«extent» de l'ext4 desat"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "El número màgic no és correcte pel mapa de bits de 64 bits genèric"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "El número màgic no és correcte pel mapa de bits de blocs de 64 bits"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "El número màgic no és correcte pel mapa de bits de nodes-i de 64 bits"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "El número màgic no és correcte --- RESERVAT_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "El número màgic no és correcte --- RESERVAT_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "El número màgic no és correcte --- RESERVAT_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "El número màgic no és correcte --- RESERVAT_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "El número màgic no és correcte --- RESERVAT_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "El número màgic no és correcte --- RESERVAT_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "El número màgic no és correcte --- RESERVAT_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "La capçalera estesa està corrompuda"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "L'índex estès està corromput"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "L'«extent» està corromput"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "No queda espai lliure al mapa estès"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "El node-i no fa servir «extents»"
+
+# http://en.wikipedia.org/wiki/Extent_(file_systems). Hi ha la ubicació basada en blocs i la ubicació basada en «extents» (dpm).
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "No hi ha «extent» «següent»"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "No hi ha «extent» «anterior»"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "No hi ha «extent» «amunt»"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "No hi ha «extent» «avall»"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "No hi ha node actual"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "No es permet l'operació Ext2fs"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "No hi ha espai per inserir «extent» al node"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "La divisió produirà un node buit"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "No s'ha trobat l'«extent»"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "No es permet la operació per nodes-i que continguin «extents»"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "La longitud de l'«extent» no és vàlida"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "El canal de E/S no permet números de bloc de 64 bits"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+"No es pot comprovar si el sistema de fitxers està muntat perquè falta el "
+"fitxer mtab"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+"El sistema de fitxers és massa gran per fer servir mapes de bits antics"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: número màgic no vàlid"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: dispositiu actualment actiu"
+
+#: lib/ext2fs/ext2_err.c:151
+#, fuzzy
+msgid "MMP: e2fsck being run"
+msgstr "MMP: s'està executant el fsck"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: el número de bloc supera el rang del sistema de fitxers"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: s'ha produït una operació desconeguda"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: el sistema de fitxers encara s'està fent servir"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: no s'ha pogut obrir amb O_DIRECT"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "La mida del descriptor de grup de blocs no és correcta"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "La suma de verificació del node-i no coincideix amb el node-i"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr ""
+"La suma de verificació del mapa de bits del node-i no coincideix amb el mapa "
+"de bits"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr ""
+"La suma de verificació del bloc «extent» no coincideix amb el bloc «extent»"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "El bloc de directoris no té espai per la suma de verificació"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr ""
+"La suma de verificació del bloc de directoris no coincideix amb el bloc de "
+"directoris"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr ""
+"La suma de verificació del bloc d'atributs estesos no coincideix amb el bloc"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "La suma de verificació del superbloc no coincideix amb el superbloc"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "L'algorisme de la suma de verificació és desconegut"
+
+#: lib/ext2fs/ext2_err.c:165
+#, fuzzy
+msgid "MMP block checksum does not match"
+msgstr "La suma de verificació del bloc MMP no coincideix amb el bloc MMP"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "El fitxer ext2 ja existeix"
+
+#: lib/ext2fs/ext2_err.c:167
+#, fuzzy
+msgid "Block bitmap checksum does not match bitmap"
+msgstr ""
+"La suma de verificació del mapa de bits del node-i no coincideix amb el mapa "
+"de bits"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+#, fuzzy
+msgid "Extended attribute has an incorrect hash"
+msgstr ""
+"La suma de verificació del bloc d'atributs estesos no coincideix amb el bloc"
+
+#: lib/ext2fs/ext2_err.c:172
+#, fuzzy
+msgid "Extended attribute block has a bad header"
+msgstr "El número de bloc de l'atribut extés no és correcte"
+
+#: lib/ext2fs/ext2_err.c:173
+#, fuzzy
+msgid "Extended attribute key not found"
+msgstr "aatribut ampliat"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+#, fuzzy
+msgid "Inode doesn't have inline data"
+msgstr "El node-i no fa servir «extents»"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+#, fuzzy
+msgid "No free space in inline data"
+msgstr "No queda espai lliure al mapa estès"
+
+#: lib/ext2fs/ext2_err.c:179
+#, fuzzy
+msgid "Wrong magic number for extended attribute structure"
+msgstr "El número màgic és incorrecte per l'estructura de fitxers d'ext2"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+#, fuzzy
+msgid "Undo file corrupt"
+msgstr "El canvi de mida del node-i està corromput"
+
+#: lib/ext2fs/ext2_err.c:184
+#, fuzzy
+msgid "Wrong undo file for this filesystem"
+msgstr "S'ha denegat el permís per a canviar la mida del sistema de fitxers"
+
+#: lib/ext2fs/ext2_err.c:185
+#, fuzzy
+msgid "File system is corrupted"
+msgstr "El canvi de mida del node-i està corromput"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+#, fuzzy
+msgid "The journal superblock is corrupt"
+msgstr "El superbloc d'ext2 està corromput"
+
+#: lib/ext2fs/ext2_err.c:188
+#, fuzzy
+msgid "Inode is corrupted"
+msgstr "El canvi de mida del node-i està corromput"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Versió 0.0 del perfil"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "El valor màgic de profile_node és incorrecte"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "No s'ha trobat la secció de perfils"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "No s'ha trobat la relació de perfils"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Intent d'afegir una relació amb un node que no és una secció"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Una capçalera de secció de perfils té un valor diferent de zero"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Hi ha una llista enllaçada incorrecta a les estructures de perfil "
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Hi ha un nivell de grup incorrecte a les estructures de perfil"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Hi ha un punter pare incorrecte a les estructures de perfil"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Hi ha un valor màgic incorrecte a la variable d'iteració de perfils"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "No es pot establir un valor al node de la secció"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "S'ha indicat un argument incorrecte a la llibreria de perfils"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "S'ha intentat modificar un perfil de només lectura"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "La capçalera de la secció de perfils no és al nivell superior"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Hi ha un error de sintaxi a la capçalera de la secció de perfils"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Hi ha un error de sintaxi a la relació de perfils"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Hi ha una clau de tancament de més al perfil"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Falta una clau d'obertura al perfil"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Hi ha un valor màgic incorrecte a profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Hi ha un valor màgic incorrecte a profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "No es permet la iteració a través de les seccions del nivell més alt"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "L'objecte profile_section no és vàlid"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "No hi ha més seccions"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "El nameset indicat a la rutina de consulta no és correcte"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "No hi ha cap fitxer de perfils obert"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "El valor màgic de profile_file_t no és correcte"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "No s'ha pogut obrir el fitxer de perfils"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "La secció ja existeix"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "El valor booleà no és vàlid"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "El valor enter no és vàlid"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "El valor màgic de profile_file_data_t no és correcte"
+
+#: lib/support/plausible.c:118
+#, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "\tl'últim muntatge va ser %s a %s"
+
+#: lib/support/plausible.c:121
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tl'últim muntatge va ser el %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tcreat el %s"
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tla darrera modificació és del %s"
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "S'ha trobat una taula de particions %s a %s\n"
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "El fitxer %s no existeix i no s'ha especificat cap mida.\n"
+
+#: lib/support/plausible.c:199
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Es crea el fitxer normal %s\n"
+
+#: lib/support/plausible.c:202
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "No es pot obrir %s: %s\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Sembla que el dispositiu no existeix. Assegureu-vos que l'heu especificat "
+"correctament\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "el %s no és un dispositiu especial de blocs.\n"
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s conté un sistema de fitxers %s etiquetat «%s»\n"
+
+#: lib/support/plausible.c:252
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s conté un sistema de fitxers %s\n"
+
+#: lib/support/plausible.c:276
+#, fuzzy, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s conté un sistema de fitxers %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: s'ha produït un error en llegir els mapes de bits: %s\n"
+
+#, fuzzy
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Avís: hi ha hagut problemes en escriure els superblocs."
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "L'i_dir_acl @F %Id, @s zero.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr ""
+#~ "El @i %i té el senyalador de @c definit en un @f que no és compatible amb "
+#~ "la @c. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "S'ha produït un @A del @b d'@a %b. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: avís: la compatibilitat amb la compressió és experimental.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: e2fsck no està compilat amb la implementació de HTREE,\n"
+#~ "\tperò el sistema de fitxers %s té directoris HTREE.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "en ubicar la memòria intermèdia de zeros"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", %u nodes-i no utilitzats\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Característiques del registre de transaccions: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Mida del registre de transaccions: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Llargada del reg. de trans.: %u\n"
+#~ "Seqüència del reg. de trans.: 0x%08x\n"
+#~ "Inici del registre de trans.: %u\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Número d'error del regi. de trans.: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Mida de bloc del reg. de trans.: %u\n"
+#~ "Llargada del reg. de trans.: %u\n"
+#~ "Primer bloc del reg. de trans.: %u\n"
+#~ "Seqüència del reg. de trans.: 0x%08x\n"
+#~ "Inici del registre de trans.: %u\n"
+#~ "Nombre d'usuaris del reg. de trans.: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "Usuaris del registre de trans.: %s\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "No s'han pogut llegir les dades del sistema de fitxers \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "Ha fallat la tdb_fetch %s\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "L'UUID del sistema de fitxers no concorda \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "Ha fallat la tdb_open %s\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "No s'ha pogut obrir %s\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr ""
+#~ "S'ha tornat a dur a terme la transacció de mida %zd a la ubicació %llu\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Ha fallat l'escriptura %s\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "El quotatype no és vàlid: %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr ""
+#~ "No s'ha pogut assignar memòria per a analitzar les opcions de quota!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "No s'ha pogut assignar memòria per al nom del fitxer del tdb\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Si voleu desfer les operacions del tune2fs executeu l'ordre\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s és el dispositiu complet, no pas només una partició\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "No s'ha pogut fer al crida stat %s --%s\n"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<El node-i de l'índex de les ACL>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<El node-i de les dades de les ACL>"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr ""
+#~ "El @S no té un senyalador «has_journal» (té_@j), però té el @j ext3 %s.\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr ""
+#~ "Voleu tornar a crear el jornal per a fer que el sistema de fitxers torni "
+#~ "a ser ext3?\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "No s'ha pogut determinar la mida del registre de canvis"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "mida de fragment invàlida - %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Avís: els fragments no són compatibles. S'ignorarà l'opció -f\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "NO s'ha suprimit el registre de transaccions\n"
+
+#~ msgid "#\t\t %u -> %u (%d)\n"
+#~ msgstr "#\t\t %u -> %u (%d)\n"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s: la combinació de les funcions flex_bg i\n"
+#~ "\t!resize_inode no és compatible amb el resize2fs.\n"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "en fer la crida a la funció d'iteració"
+
+#~ msgid "invalid starting block - %s"
+#~ msgstr "bloc d'inici no vàlid - %s"
diff --git a/po/cs.gmo b/po/cs.gmo
new file mode 100644
index 0000000..3a73e4e
--- /dev/null
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 0000000..a351851
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,9133 @@
+# Czech translation of e2fsprogs
+# Copyright (C) 2008 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Miloslav Trmac <mitr@volny.cz>, 2003.
+# Petr Pisar <petr.pisar@atlas.cz>, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
+# Petr Pisar <petr.pisar@atlas.cz>, 2016, 2017, 2018, 2019, 2021, 2022.
+#
+# %i, %b, %N in e2fsck/problem.c do not support positional ordering (%2$i).
+# But they can be freely reordered because those are extracted from a context,
+# not from the separate positional arguments.
+#
+# encryption policy → pravidla šifrování
+# feature flag → příznak vlastnosti
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-13 21:00+02:00\n"
+"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
+"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Špatný blok %u mimo rozsah; ignorován.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "při kontrole správnosti iuzlu špatných bloků"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "pÅ™i Ätení iuzlu Å¡patných bloků"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "při pokusu otevřít %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "při pokusu popen „%s“"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "pÅ™i naÄítání seznamu Å¡patných bloků ze souboru"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "při aktualizaci iuzlu špatných bloků"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Varování: v iuzlu špatných bloků nalezen nepovolený blok %u. Vymazán.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "při uvolňování TDB souboru dir_info"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Chyba pÅ™i Ätení bloku %lu (%s) bÄ›hem %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Chyba pÅ™i Ätení bloku %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignorovat chybu"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Vynutit přepsání"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Chyba při zápisu bloku %lu (%s) při %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Chyba při zápisu bloku %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "prázdné bloky adresářů"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "mapa prázdných adresářů"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Prázdný blok adresáře %u (#%d) v iuzlu %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s název_souboru p_bloků velikost_bloku\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Neplatný poÄet bloků!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Nemohu alokovat vyrovnávací paměť bloku (velikost=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "mapa iuzlů přestaveb rozsahů"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Použití: %s disk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr ""
+"ioctl BLKFLSBUF nepodporováno! Nemohu synchronizovat vyrovnávací paměti.\n"
+"\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "Ätení superbloku žurnálu\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: nenalezen platný superblok žurnálu\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: žurnál příliš krátký\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: nesprávné bloky pro rychlý zápis\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: obnovuje se žurnál\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: v režimu jen pro Ätení se žurnál obnovovat nebude\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "při pokusu znovu otevřít %s"
+
+# These shortcuts are a nightmare.
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "arozšířený atribut"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Achyba při alokaci"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ckomprimovat"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckoliduje s jiným blokem systému souborů"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dadresář"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dodstraněn"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "epoložka"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "Epoložka „%Dn“ v %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fsystém souborů"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fpro inode %i (%Q) je"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "gskupin"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hiuzel HTREE adresáře"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Inepovolen"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jžurnál"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lje odkaz"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mvíce krát alokováno"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nneplatný"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oosiřel"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblém v"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qkvóta"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rkořenový iuzel"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "smělo by být"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuperblok"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "unepřipojen"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vzařízení"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xrozsah"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "znulové délky"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<Iuzel NULL>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Iuzel špatných bloků>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<Iuzel kvóty uživatelů>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<Iuzel kvóty skupin>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Iuzel zavadÄ›Äe systému>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Iuzel adresáře undelete>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Iuzel deskriptoru skupiny>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<Iuzel žurnálu>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Rezervovaný iuzel 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Rezervovaný iuzel 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "obyÄejný soubor"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "adresář"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "znakové zařízení"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "blokové zařízení"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "pojmenovaná roura"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "symbolický odkaz"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "soket"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "neznámý druh souboru o módu 0%o"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "nepřímý blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "dvojnásobně nepřímý blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "trojnásobně nepřímý blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "překladový blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "blok Ä."
+
+# user quota
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "uživatele"
+
+# group quota
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "skupiny"
+
+# project quota
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "projektu"
+
+# unknown quota type quota
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "neznámého druhu"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "mapa několikrát alokovaných iuzlů"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "vnitřní chyba: nemohu najít dup_blk pro %llu\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "vrácený z clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "Vnitřní chyba: nemohu najít záznam EA bloku pro %llu"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Vnitřní chyba: nemohu najít záznam EA iuzlu pro %u"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "pÅ™i výpoÄtu hashe položky s e_value_inum = %u"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "Ätení adresářového bloku"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "získávání dalšího iuzlu z průzkumu"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "mapa používaných iuzlů"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "mapa iuzlů adresářů"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "mapa iuzlů obyÄejných souborů"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "mapa používaných bloků"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "mapa bloků metadat"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "mapa velikosti znaků iuzlů"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "otevírání průzkumu iuzlů"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "Průchod 1"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "Ätu nepřímé bloky iuzlu %u"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "mapa špatných iuzlů"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "iuzel v mapě špatných bloků"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "mapa imagic iuzlů"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "mapa několikrát alokovaných bloků"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "mapa bloků rozšířených atributů"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): oÄekáváno %6lu, obdrženo fyz. %6lu (bloků %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "bitmapa bloků"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "bitmapa iuzlů"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "tabulka iuzlů"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "Průchod 2"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "Podpora pro přirozené jazyky je rozbitá."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "Nemohu pokraÄovat."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "bitmapa hotových iuzlů"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Maximum paměti"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Průchod 3"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "bitmapa detekce cyklů iuzlů"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Průchod 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Průchod 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Chyba při alokaci paměti"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Chyba při alokaci paměti"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(žádná výzva)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Opravit"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Vymazat"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Přemístit"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Alokovat"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Zvětšit"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Připojit do /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Vytvořit"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Zachránit"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Useknout"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "VyÄistit iuzel"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Přerušit"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Rozdělit"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "PokraÄovat"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Klonovat více krát alokované bloky"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Odstranit soubor"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "PotlaÄit zprávy"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Odstranit odkaz"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Vymazat index HTree"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Znovu vytvořit"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Optimalizovat"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "Vymazat příznak"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(ŽÃDNÃ)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "OPRAVENO"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "VYMAZÃNO"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "PŘEMÃSTÄšNO"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "ALOKOVÃNO"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "ZVÄšTÅ ENO"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "PŘIPOJENO"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "VYTVOŘENO"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "ZACHRÃNÄšNO"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "USEKNUTO"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INODE VYMAZÃNA"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "PŘERUŠENO"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "ROZDÄšLENO"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "POKRAÄŒUJI"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "VÃCE KRÃT ALOKOVANÉ BLOKU NAKLONOVÃNY"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "SOUBOR ODSTRANÄšN"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "POTLAÄŒENO"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "ODKAZ ODSTRANÄšN"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "INDEX HTREE VYMAZÃN"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "BUDE ZNOVU VYTVOŘENO"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "BUDE SE OPTIMALIZOVAT"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "PŘÃZNAK VYMAZÃN"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "Bitmapa bloků pro skupinu %g není ve skupině. (blok %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "Bitmapa iuzlů pro skupinu %g není ve skupině. (blok %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"Tabulka iuzlů pro skupinu %g není ve skupině. (blok %b)\n"
+"VAROVÃNÃ: MOŽNà VÃŽNà ZTRÃTA DAT.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Superblok nemohl být naÄten nebo nepopisuje správný systém souborů\n"
+"ext2/ext3/ext4. Pokud je zařízení platné a opravdu obsahuje systém\n"
+"souborů ext2/ext3/ext4 (a ne swap nebo UFS nebo něco jiného), pak je\n"
+"superblok poškozen a můžete zkusit spustit e2fsck s jiným superblokem:\n"
+" e2fsck -b %S <zařízení>\n"
+"nebo\n"
+" e2fsck -b 32768 <zařízení>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Velikost systému souborů (podle superbloku) je %b bloků\n"
+"Fyzická velikost zařízení je %c bloků\n"
+"BuÄ superblok nebo tabulka oddílů je pravdÄ›podobnÄ› poÅ¡kozena!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"V superbloku block_size = %b, fragsize = %c.\n"
+"Tato verze e2fsck nepodporuje velikosti fragmentů různé\n"
+"od velikosti bloku.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "V superbloku blocks_per_group = %b, mělo by být %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "V superbloku first_data_block = %b, mělo by být %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"Systém souborů neměl UUID; generuji je.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Poznámka: Pokud existuje více bloků bitmap iuzlů nebo bloků,\n"
+"které vyžadují pÅ™emístÄ›ní, nebo jedna Äást tabulky iuzlů,\n"
+"která musí být přesunuta, možná budete raději chtít nejdříve\n"
+"spustit e2fsck s pÅ™epínaÄem „-b %S“. Problém je možná jen\n"
+"v primárním deskriptoru skupiny bloků a záložní deskriptory\n"
+"skupiny bloků mohou být v pořádku.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "V superbloku nalezeno poškození. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Chyba při zjišťování velikosti fyzického zařízení: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "PoÄet iuzlů v superbloku je %i, mÄ›l by být %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd nepodporuje vlastnost filetype.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Superblok má neplatný žurnál (iuzel %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Externí žurnál používá více systémů souborů (nepodporováno).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Nemohu nalézt externí žurnál\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Externí žurnál má špatný superblok\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Externí žurnál nepodporuje tento systém souborů\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Superblok žurnálu systému souborů je neznámého typu %N (nepodporováno).\n"
+"Je pravděpodobné, že vaše kopie e2fsck je stará a/nebo nepodporuje tento formát žurnálu.\n"
+"Je také možné, že superblok žurnálu je poškozen.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Superblok žurnálu je poškozen.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "Příznak superbloku has_journal (má_žurnál) není nastaven, avšak žurnál je přítomen.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Superblok má nastaven příznak needs_recovery (potřebuje_obnovit), avšak žádný žurnál neexistuje.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "Příznak superbloku needs_recovery (potřebuje_obnovit) není nastaven, avšak žurnál obsahuje data.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Vymazat žurnál"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "Systém souborů má příznak(y) vlastností nastaveny, aÄkoliv se jedná o revizi 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s osiřelý iuzel %i (uid=%Iu, gid=%Ig, práva=%Im, velikost=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "Neplatný %B (%b) nalezen v osiřelém iuzlu %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Již vymazaný %B (%b) nalezen v osiřelém iuzlu %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "V superbloku neplatný osiřelý iuzel %i.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Neplatný iuzel %i v seznamu osiřelých iuzlů.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Superblok žurnálu má nastaven příznak neznámé vlastnosti „jen pro Ätení“.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Superblok žurnálu má nastaven příznak neznámé vlastnosti „nekompatibilní“.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Verze žurnálu nepodporována tímto e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Přesouvám žurnál z /%s do skrytého iuzlu.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Chyba při přesunu žurnálu: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Nalezena neplatná pole superbloku žurnálu V2 (z žurnálu V1).\n"
+"Mažu pole za superblokem žurnálu V1…\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Přesto spustit žurnál"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "Příznak obnovení není nastaven v záložním superbloku, takže přesto spouštím žurnál.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Zálohuji informace o bloku iuzlů žurnálu.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Souborový systém nemá zapnut pÅ™epínaÄ resize_inode,\n"
+"ale s_reserved_gdt_blocks je %N, aÄkoliv by mÄ›lo být nula."
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode není zapnuto, avšak iuzel pro měnění velikosti není nula."
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Iuzel na měnění velikosti není platný. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Čas posledního připojení superbloku (%t,\n"
+"\tnyní = %T) leží v budoucnosti.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Čas posledního zápisu superbloku (%t,\n"
+"\tnyní = %T) leží v budoucnosti.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Nápověda superbloku pro externí superblok by měla být %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Do souborového systému přidávám nápovědu pro dirhash.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Kontrolní souÄet deskriptoru skupiny %g je %04x, mÄ›l by být %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "Deskriptor skupiny %g oznaÄen jako neinicializovaný bez sady vlastností.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Deskriptor skupiny %g má neplatný poÄet nepoužitých bloků %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Poslední bitmapa bloků skupiny není inicializována. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Transakce žurnálu %i byla poškozena, přehrání bylo zrušeno.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Příznak test_fs je nastaven (a ext4 je dostupný). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Čas posledního připojení superbloku leží v budoucnosti.\n"
+"\t(rozdíl menší než den, pravděpodobně jsou chybně nastaveny hardwarové hodiny)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Čas posledního zápisu superbloku leží v budoucnosti.\n"
+"\t(rozdíl menší než den, pravděpodobně jsou chybně nastaveny hardwarové hodiny)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Jeden nebo více kontrolních souÄtů deskriptoru skupiny bloků je chybných. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Nastavuje se poÄet volných iuzlů na %j (byl %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Nastavuje se poÄet volných bloků na %c (byl %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Iuzel %i kvóty %U (%Q) se oznaÄuje jako skrytý.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "Superblok má špatný blok MMP. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "Superblok má neplatná Äísla MMP. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "metadata_csum superbloku nahrazuje uninit_bg, oba bity vlastností nemohou být nastaveny zároveň."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "Kontrolní souÄet bloku superbloku MMP neodpovídá. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "Superblok 64bitových souborových systémů potřebuje rozsahy, aby bylo možné přistoupit na celý disk. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg je příliš velký. (%N, maximální hodnota %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Kontrolní souÄet superbloku externího žurnálu neodpovídá superbloku. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "metadata_csum_seed superbloku není bez metadata_csum potřeba."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Chyba při inicializaci kontextu kvót v podpůrné knihovně: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Špatná vyžadovaná extra velikost iuzlu v superbloku (%N)."
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Špatná vytoužená extra velikost iuzlu v superbloku (%N)."
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "Neplatný iuzel %i kvóty %U. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "Superblok by měl příliš mnoho iuzlů (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Vlastnosti resize_inode a meta_bg jsou zapnuty. Tyto vlastnosti se vyluÄují.\n"
+"Měnění velikosti iuzlu bude vypnuto. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Průchod 1: Kontrolují se iuzly, bloky a velikosti\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "Kořenový iuzel není adresář. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "Kořenový iuzel má nastaven dtime (možná kvůli starém mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Rezervovaný iuzel %i (%Q) má špatný mód. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "Odstraněný iuzel %i má nulový dtime. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "Iuzel %i se používá, ale má nastaven dtime. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "Iuzel %i je adresář nulové délky. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "Bitmapa bloků skupiny %g v %b koliduje s jiným blokem systému souborů.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "Bitmapa iuzlů skupiny %g v %b koliduje s jiným blokem systému souborů.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "Tabulka iuzlů skupiny %g v %b koliduje s jiným blokem systému souborů.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "Bitmapa bloků skupiny %g (%b) je špatná. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "Bitmapa iuzlů skupiny %g (%b) je špatná. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "V iuzlu %i je i_size %Is, měla by být %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "V iuzlu %i je i_blocks %Ib, mělo by být %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "Neplatný %B (%b) v iuzlu %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) se překrývá s metadaty systému souborů v iuzlu %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "Iuzel %i má neplatný blok(y). "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Příliš mnoho neplatných bloků v iuzlu %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "Neplatný %B (%b) v iuzlu špatných bloků. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Iuzel špatných bloků má neplatný blok(y). "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Používá se duplikátní nebo špatný blok!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Špatný blok %b používán jako nepřímý blok špatných bloků. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"Iuzel špatných bloků se pravděpodobně poškodil. Zřejmě byste měli nyní\n"
+"zastavit a vyšetřit souborový systém na špatné bloky příkazem „e2fsck -c“\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Je-li blok opravdu špatný, nemůže být systém souborů opraven.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Můžete tento blok vymazat ze seznamu špatných bloků a doufat, že\n"
+"tento blok je ve skuteÄnosti v pořádku. Ale za nic neruÄíme.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Primární superblok (%b) je na seznamu špatných bloků.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Blok %b v primárních deskriptorech skupin je na seznamu špatných bloků\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Varování: superblok skupiny %g (%b) je špatný.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Varování: Kopie deskriptorů skupin ve skupině %g má špatný blok (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Chyba při programování? Blok #%b bezdůvodně použit v process_bad_blocks.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "Chyba při alokaci %N souvislých bloků ve skupině bloků %g pro %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "Chyba při alokaci vyrovnávací paměti bloků pro přemístění %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Přemísťuji %s skupiny %g z %b do %c…\n"
+
+# FIXME: no-c-format so that I can reorder it properly
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Přemísťuji skupiny %g %s do %c…\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Varování: nemohu naÄíst blok %s %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Varování: nemohu zapsat blok %b pro %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "Chyba při alokaci bitmapy iuzlů (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "Chyba při alokaci bitmapy bloků (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "Chyba při alokaci informací odkazů icount: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "Chyba při alokaci pole bloků adresáře: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Chyba při zkoumání iuzlů (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Chyba při iteraci přes bloky v iuzlu %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Chyba pÅ™i ukládání informace o Äetnosti iuzlu (iuzel=%i, poÄet=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Chyba pÅ™i ukládání informace o bloku adresáře (iuzel=%i, blok=%b, Äís=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Chyba pÅ™i Ätení iuzlu %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Iuzel %i má nastaven příznak imagic. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Speciální soubor (zařízení/socket/fifo/symbolický odkaz, iuzel %i)\n"
+"má nastaven příznak immutable nebo append-only. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Speciální (zařízení/socket/fifo) iuzel %i má nenulovou délku. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "Iuzel žurnálu se nepoužívá, ale obsahuje data. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "Žurnál není obyÄejný soubor. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "Iuzel %i byl souÄástí seznamu osiÅ™elých iuzlů. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Nalezeny iuzly, které byly souÄástí poÅ¡kozeného spojového seznamu osiÅ™elých. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "Chyba při alokaci struktury refcount (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Chyba pÅ™i Ätení bloku rozšířených atributů %b pro iuzel %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "Iuzel %i má špatný blok rozšířených atributů %b. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Chyba pÅ™i Ätení bloku rozšířených atributů %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "Blok rozšířených atributů %b má poÄet odkazů %r, mÄ›l by být %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Chyba při zápisu bloku rozšířených atributů %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "Blok rozšířených atributů %b má h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "Chyba při alokaci struktury pro alokaci oblasti rozšířených atributů. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "Blok rozšířených atributů %b je poškozen (kolize alokace). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "Blok rozšířených atributů %b je poškozen (neplatný název). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "Blok rozšířených atributů %b je poškozen (neplatná hodnota). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "Iuzel %i je příliš velká. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) způsobuje, že adresář je příliš velký. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) způsobuje, že soubor je příliš velký. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) způsobuje, že symbolický odkaz je příliš velký. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "Iuzel %i má nastaven příznak INDEX_FL na systému souborů bez podpory htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "Iuzel %i má nastaven příznak INDEX_FL, ale není adresář.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "Iuzel HTREE adresáře %i má neplatný kořenový uzel.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "Iuzel HTREE adresáře %i má nepodporovanou verzi hashe (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "Iuzel HTREE adresáře %i používá nekompatibilní příznak kořenového uzlu htree.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "Iuzel HTREE adresáře %i má hloubku stromu (%N), která je příliš velká\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Iuzel špatných bloků má nepřímý blok (%b), který je v rozporu s metadaty\n"
+"souborového systému. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "(Znovu) vytvoření iuzlu pro změny velikosti selhalo: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "Iuzel %i má velikost navíc (%IS), která není platná\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "Rozšířený atribut v iuzlu %i má délku jména (%N), která není platná\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "Rozšířený atribut v iuzlu %i má pozici hodnoty (%N), která není platná\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "Rozšířený atribut v iuzlu %i má blok hodnot (%N), který není platný (musí být 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "Rozšířený atribut v iuzlu %i má velikost hodnoty (%N), která není platná\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "Rozšířený atribut v iuzlu %i má hash (%N), který není platný\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "Iuzel %i je %It, ale ve skuteÄnosti vypadá na adresář.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Chyba pÅ™i proÄítání stromu @x v iuzlu %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Průchod rozsahy iuzlu %i selhal\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"Iuzel %i má neplatný rozsah\n"
+"\t(logický blok %c, neplatný fyzický blok %b, délka %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"Iuzel %i má neplatný rozsah\n"
+"\t(logický blok %c, fyzický blok %b, neplatná délka %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "Iuzel %i má nastaven příznak EXTENTS_FL na systému souborů bez podpory rozsahů.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "Iuzel %i rozsahový formát, ale superbloku chybí vlastnost EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "Iuzlu %i chybí EXTENT_FL, ale je v rozsahovém formátu\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Rychlý symbolický odkaz %i na nastaveno EXTENT_FL. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Iuzel %i má zpřeházené rozsahy\n"
+"\t(neplatný logický blok %c, fyzický blok %b, délka %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "Iuzel %i má neplatný uzel rozsahů (op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Chyba při převodu bitmapy bloků subclusteru: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "Iuzel kvóty není obyÄejný soubor. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "Iuzel kvóty se nepoužívá, ale obsahuje data. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "Iuzel kvóty je pro uživatele viditelný. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "Iuzel špatných bloků se zdá být neplatný. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"Iuzel %i má rozsah o nulové délce\n"
+"\t(neplatný logický blok %c, fyzický blok %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "Zdá se, že Iuzel %i obsahuje nesmysly. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "Iuzel %i projde kontrolami, ale kontrolní souÄet iuzlu neodpovídá. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "Rozšířený atribut iuzlu %i je poškozen (kolize alokace). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Blok rozsahů iuzlu %i prochází kontrolami, ale kontrolní souÄet neodpovídá\n"
+"rozsahu\n"
+"\t(logický blok %c, fyzický blok %b, délka %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "Blok %b rozšířeného atributu iuzlu %i projde kontrolami, ale kontrolní souÄet bloku neodpovídá. "
+
+# ??? WTF
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Úroveň vnitřních rozsahový uzlů %N iuzlu %i:\n"
+"Logický zaÄátek %b neodpovídá logickému zaÄátku %c na další úrovni. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Iuzel %i, konec rozsahu pÅ™ekraÄuje povolenou hodnotu\n"
+"\t(logický blok %c, fyzický blok %b, délka %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "Iuzel %i má data v sobě, ale superbloku chybí vlastnost INLINE_DATA\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "Iuzel %i má nastaven příznak INLINE_DATA_FL na systému souborů bez podpory vestavěných dat.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "Blok %b iuzlu %i se nesluÄuje s kritickými metadaty, kontrola bloku se vynechá.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "Iuzel adresáře %i blok %b by měl být na bloku %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "Iuzel adresáře %i má na bloku %c rozsah oznaÄený jako neinicializovaný. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"Iuzel %i logický blok %b (fyzický blok %c) porušuje pravidla\n"
+"alokace clusteru. Bude opraveno v průchodu 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "Iuzel %i má nastaven příznak INLINE_DATA_FL, ale rozšířený atribut nenalezen. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Speciální soubor (zařízení/socket/fifo, iuzel %i)\n"
+"má nastaven příznak rozsahů nebo vestavěných dat. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "Iuzel %i má hlaviÄku pro rozsah, ale příznak vestavÄ›ných dat je nastaven.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "Iuzel %i se zdá mít vestavěná data, ale příznak rozsahu je nastaven.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "Iuzel %i se zdá mít mapu bloků, ale příznaky vestavěných data a rozsahu jsou nastaveny.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "Iuzel %i má nastavené příznaky vestavěných dat a rozsahu, ale i_block obsahuje nesmysly.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "Seznam chybných bloků říká, že iuzel seznamu chybných bloků je chybný. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "Chyba při alokaci struktury pro alokaci oblasti rozsahu. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"Iuzel %i má zdvojené mapování rozsahu\n"
+"\t(logický blok %c, neplatný fyzický blok %b, délka %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "Chyba při alokaci %N bajtů paměti pro seznam šifrovaných iuzlů\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "Strom rozsahů iuzlu %i by mohl být mÄ›lÄí (%b, mohl by být <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "Iuzel %i na souborovém systému s bigalloc nemůže mapován do bloků. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "Iuzel %i má poÅ¡kozenou hlaviÄku rozsahu. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Časové údaje iuzlu %i po 4. dubnu 2310 pravděpodobně spadají před rok 1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "Iuzel %i má zakázaný iuzel rozšířených atributů %N.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "Iuzel %i má neplatný rozšířený atribut. Iuzlu rozšířeného atributu %N chybí příznak EA_INODE.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"Iuzlu rozšířeného atributu %N pro rodiÄovský iuzel %i chybí příznak EA_INODE.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "Iuzel %i má na bloku %c (délka %N) rozsah oznaÄený jako neinicializovaný. "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "Iuzel %i má nastaven příznak casefold, ale není adresářem. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"Adresář %p má příznak casefold, ale\n"
+"vlastnost casefold není zapnuta. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "Iuzel %i má nastaven příznak šifrování, ale nemá žádný šifrovací rozšířený atribut.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "Šifrovaný iuzel %i má poškozený šifrovací rozšířený atribut.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "Iuzel %i HTREE adresáře používá verzi hashe (%N), ale měl by používat SipHash (6) \n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "Iuzel %i HTREE adresáře používá SipHash, ale neměl by. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"SpouÅ¡tím dodateÄné průchody, abych vyÅ™eÅ¡il bloky, ke kterým se hlásí\n"
+"více iuzlů…\n"
+"Průchod 1B: Znovu vyšetřuji více krát alokované bloky\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Více krát alokovaný(é) blok(y) v iuzlu %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Chyba při zkoumání iuzlů (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "Chyba při alokaci bitmapy iuzlů (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Chyba při iteraci přes bloky v iuzlu %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Chyba pÅ™i úpravÄ› poÄtu odkazů bloku rozšířených atributů %b (iuzel %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Průchod 1C: Hledání iuzlů s duplikovanými bloky v adresářích.\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Průchod 1D: Opravuji duplikátní bloky\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Soubor %Q (iuzel %i, Äas zmÄ›ny %IM) \n"
+" má %r duplikovaný(ch) blok(ů) sdílený(ch) mezi %N soubory/souborem:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr " %Q (iuzel %i, Äas zmÄ›ny %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<metadata systému souborů>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Existuje %N iuzlů obsahujících více krát alokované bloky.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Duplikátní bloky již přiřazeny nebo naklonovány.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Nemohu klonovat soubor: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Průchod 1E: Optimalizují se stromy rozsahů\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Optimalizace stromu rozsahů %p (%i) selhala: %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Optimalizují se stromy rozsahů: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "VnitÅ™ní chyba: maximální hloubka stromu rozsahů je příliÅ¡ velká (%b, oÄekáváno=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "Strom rozsahu iuzlu %i (na úrovni %b) by mohl být kratší. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "Strom rozsahu iuzlu %i (na úrovni %b) by mohl být užší. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Průchod 2: Kontroluje se struktura adresářů\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Å patné Äíslo iuzlu pro „.“ v iuzlu adresáře %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "Položka „%Dn“ v %p (%i) má Å¡patné Äíslo iuzlu: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "Položka „%Dn“ v %p (%i) má odstraněný/nepoužívaný iuzel %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "Položka „%Dn“ v %p (%i) je odkaz na „.“ "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "Položka „%Dn“ v %p (%i) ukazuje na iuzel (%Di) umístěný ve špatném bloku.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "Položka „%Dn“ v %p (%i) je odkaz na adresář %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "Položka „%Dn“ v %p (%i) je odkaz na kořenový iuzel.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "Položka „%Dn“ v %p (%i) má ve svém jméně neplatné znaky.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Chybí „.“ v iuzlu adresáře %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Chybí „..“ v iuzlu adresáře %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "První položka „%Dn“ (iuzel=%Di) v iuzlu adresáře %i (%p) by měla být „.“\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Druhá položka „%Dn“ (iuzel=%Di) v iuzlu adresáře %i by měla být „..“\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr pro iuzel %i (%Q) je %IF, měla by být nula.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl pro iuzel %i (%Q) je %If, mělo by být nula.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high pro iuzel %i (%Q) je %Id, měla by být nula.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag pro iuzel %i (%Q) je %N, mělo by být nula.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize pro iuzel %i (%Q) je %N, měla by být nula.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "Iuzel %i (%Q) má špatný mód (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "Iuzel adresáře %i, %B, pozice %N: adresář poškozen\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "Iuzel adresáře %i, blok %B, pozice %N: název souboru příliš dlouhý\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "Iuzel adresáře %i má nealokovaný %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Položka adresáře „.“ v iuzlu adresáře %i není ukonÄena NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Položka adresáře „..“ v iuzlu adresáře %i není ukonÄena NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "Iuzel %i (%q) je neplatné znakové zařízení.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "Iuzel %i (%Q) je neplatné blokové zařízení.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "Položka „%Dn“ v %p (%i) je duplikátní položka „.“.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "Položka „%Dn“ v %p (%i) je duplikátní položka „..“.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Interní chyba: nemohu najít dir_info pro %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "Položka „%Dn“ v %p (%i) má rec_len %Dr, měla by být %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "Chyba při alokaci struktury icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Chyba při iterování přes bloky adresáře: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Chyba pÅ™i Ätení bloku adresáře %b (iuzel %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Chyba při zápisu bloku adresáře %b (iuzel %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "Chyba při alokaci nového bloku adresáře pro iuzel %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Chyba při dealokaci iuzlu %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "Položka adresáře pro „.“ v %p (%i) je velká.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "Iuzel %i (%Q) je neplatná FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "Iuzel %i (%Q) je neplatný socket.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Nastavuje se filetype pro položku „%Dn“ v %p (%i) na %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "Položka „%Dn“ v %p (%i) má chybný filetype (byl %Dt, měl by být %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "Položka „%Dn“ v %p (%i) má nastaven filetype.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "Položka „%Dn“ v %p (%i) má název nulové délky.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symbolický odkaz %Q (iuzel #%i) není platný.\n"
+
+# FIXME: @F already ends with 'is'
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "Blok rozšířených atributů pro iuzel %i (%Q) není platný (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "Systém souborů obsahuje velké soubory, ale v superbloku nemá příznak LARGE_FILE.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: na %B neexistuje odkaz\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: na %B vedou dva odkazy\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: %B má špatný min hash\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: %B má špatný max hash\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "Neplatný iuzel HTREE adresáře %d (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "Systém souborů obsahuje velké adresáře, ale v superbloku nemá příznak LARGE_DIR.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "Problém v iuzlu HTREE adresáře %d (%q): Å¡patné Äíslo bloku %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: kořenový uzel není platný\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: %B má špatný limit (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: %B má Å¡patný poÄet (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: %B má nesetříděnou hash tabulku\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: %B má špatnou hloubku (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Nalezena duplikátní položka „%Dn“ v %p (%i). "
+
+# FIXME: no-c-format
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"Položka „%Dn“ v %p (%i) nemá jedineÄný název souboru.\n"
+"Přejmenovat na %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Nalezena duplikátní položka „%Dn“.\n"
+"\tOznaÄuji %p (%i) pro pÅ™estavbu.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi pro iuzel %i (%Q) je %N, měl by být nula.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "NeoÄekávaný blok v iuzlu HTREE adresáře %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "Položka „%Di“ v %p (%i) odkazuje na iuzel %Di ve skupině %g, kde je nastaveno _INODE_UNINIT.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "Položka „%Dn“ v %p (%i) odkazuje na iuzel %Di nalezený ve skupině %g oblasti nepoužitých iuzlů.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi pro iuzel %i (%Q) je %N, mělo by být nula.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: kontrolní souÄet koÅ™enového uzlu nesouhlasí.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "Problém v iuzlu HTREE adresáře %d: kontrolní souÄet vnitÅ™ního uzlu nesouhlasí.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "Iuzel adresáře %i, %B, pozice %N: adresář nemá kontrolní souÄet.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "Iuzel adresáře %i, %B: adresář proÅ¡el kontrolami, ale souÄet nesouhlasí.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Velikost (%N) iuzlu %i vestavÄ›ného adresáře musí být násobek ÄtyÅ™.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Oprava velikosti iuzly vestavěného adresáře %i se nepodařila.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Zašifrovaný záznam „%Dn“ v %p (%i) je příliš krátký.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "Šifrovaný záznam „%Dn“ v %p (%i) odkazuje na nešifrovaný iuzel %Di.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "Šifrovaný záznam „%Dn“ v %p (%i) odkazuje na iuzel %Di, který má odlišná pravidla šifrování.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "Položka „%Dn“ v %p (%i) má ve svém jméně neplatné znaky UTF-8.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "Nalezena duplikátní položka názvu souboru „%Dn“ v %p (%i). "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Průchod 3: Kontroluje se dosažitelnost adresářů\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "Kořenový iuzel nealokován. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Není místo v adresáři lost+found. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "Nepřipojený adresářový iuzel %i (byl v %q)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/lost+found nenalezeno. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "„..“ v %Q (%i) je %P (%j), mělo by být %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Špatné nebo neexistující /lost+found. Nemohu znovu připojit.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Nemohu zvětšit /lost+found: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Nemohu znovu připojit %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Chyba při pokusu najít /lost+found: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block: %m při pokusu vytvořit adresář /lost+found\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode: %m při pokusu vytvořit adresář /lost+found\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m při pokusu vytváření nového adresáře /lost+found\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block: %m při zápisu bloku adresáře pro /lost+found\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Chyba pÅ™i úpravÄ› Äetnosti iuzlu v iuzlu %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Nemohu opravit rodiÄe iuzlu %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Nemohu opravit rodiÄe iuzlu %i: Nemohu najít položku rodiÄovského adresáře\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Chyba při vytváření kořenového adresáře (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Chyba při vytváření adresáře /lost+found (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "KoÅ™enový iuzel není adresář; konÄím.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Nemohu pokraÄovat bez koÅ™enového iuzlu.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found není adresář (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/lost+found má vestavěná data\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Nelze alokovat místo pro /lost+found.\n"
+"Ztracené soubory místo toho budou umístěny do kořenového adresáře"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Pro obnovu ztracených souborů není dostatek místa!\n"
+"Přesuňte data ze souborového systému a e2fsck spusťte znovu.\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/lost+found je zašifrován\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "Rekurzivně zacyklený adresářový iuzel %i (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Průchod 3A: Optimalizuji adresáře\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Nemohu vytvořit iterátor dirs_to_hash: %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Nemohu optimalizovat adresář %q (%d): %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Optimalizuji adresáře: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Průchod 4: Kontrolují se poÄty odkazů\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "Osiřelý iuzel %i s nulovou délkou. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "Osiřelý iuzel %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "PoÄet odkazů na iuzel %i je %Il, mÄ›l by být %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"VAROVÃNÃ: CHYBA PŘI PROGRAMOVÃNà E2FSCK!\n"
+"\tNEBO NÄšKDO NATVRDLà (VY) KONTROLUJE PŘIPOJENà (POUŽÃVANÃ) SYSTÉM\n"
+"\tSOUBORÅ®.\n"
+"inode_link_info[%i] je %N, inode.i_links_count je %Il. Měly by být stejné!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "PoÄet odkazů na iuzel rozšířeného atributu %i je %N, mÄ›l by být %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "Adresář pÅ™ekraÄuje maximum odkazů, ale v superbloku chybí vlastnost DIR_NLINK.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "PoÄítadlo odkazů iuzlu %i adresáře nastaveno na pÅ™eteÄeno, ale mohlo by být pÅ™esnÄ› %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Průchod 5: Kontrolují se souhrnné informace skupin\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "Výplň na konci bitmapy iuzlů není nastavena. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "Výplň na konci bitmapy bloků není nastavena. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "Rozdíly v bitmapě bloků: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "Rozdíly v bitmapě iuzlů: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "PoÄet volných iuzlů ve skupinÄ› Ä. %g Å¡patnÄ› (%i, spoÄteno=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "PoÄet adresářů ve skupinÄ› Ä. %g Å¡patnÄ› (%i, spoÄteno=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "PoÄet volných iuzlů Å¡patnÄ› (%i, spoÄteno=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "PoÄet volných bloků ve skupinÄ› Ä. %g Å¡patnÄ› (%b, spoÄteno=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "PoÄet volných bloků Å¡patnÄ› (%b, spoÄteno=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "CHYBA PŘI PROGRAMOVÃNÃ: hranice (%b, %c) bitmapy systému souborů (#%N) neodpovídají vypoÄteným hranicím bitmapy (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Interní chyba: pokažený konec bitmapy (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Chyba při kopírování do náhradní bitmapy iuzlů: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Chyba při kopírování do náhradní bitmapy bloků: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "Blok(y) skupiny %g je/jsou používán(y), ale skupina je oznaÄena jako BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "Iuzel/iuzly skupiny %g je/jsou používán(y), ale skupina je oznaÄena jako INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "Bitmapa iuzlů skupiny %g neodpovídá kontrolnímu souÄtu.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "Bitmapa bloků skupiny %g neodpovídá kontrolnímu souÄtu.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Znovu vytvořit žurnál"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "Aktualizovat údaje o kvótách pro druh kvót %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Chyba pÅ™i nastavování informace o kontrolním souÄtu skupiny bloků: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Chyba při zápisu údajů o souborovém systému: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Chyba při synchronizaci zápisů na zařízení úložiště: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Chyba při zápisu údajů o kvótách pro druh kvót %N: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Neobsloužený kód chyby (0x%x)!\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "IGNOROVÃNO"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "v move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Použitá paměť: %lu, strávený Äas: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "velikost iuzlu=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "při zahájení průchodu iuzly"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "při spouštění prohlídky iuzlů"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "při provádění prohlídky iuzlů"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "při volání ext2fs_block_iterate pro iuzel %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "při volání ext2fs_adjust_ea_refcount2 pro iuzel %u"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Usekávám"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "Mažu"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Použití: %s [-panyrcdfktvDFV] [-b superblok] [-B velikost_bloku]\n"
+"\t\t[-l|-L soubor_špatných_bloků] [-C fd] [-j externí_žurnál]\n"
+"\t\t[-E rozšířené-pÅ™epínaÄe] [-z soubor_s_historií] zařízení\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Nápověda v nouzi:\n"
+" -p Automatická oprava (žádné otázky)\n"
+" -n Neprovádět žádné změny systému souborů\n"
+" -y Předpokládat „ano“ u všech otázek\n"
+" -c Hledat špatné bloky a přidat je do seznamu špatných bloků\n"
+" -f Vynutit kontrolu, i když je systém souborů oznaÄen Äistý\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Být podrobný\n"
+" -b superblok Použít alternativní superblok\n"
+" -B velikost_bloku Vnutit velikost bloku při hledání superbloku\n"
+" -j externí_žurnál Nastavit umístění externího žurnálu\n"
+" -l soubor_špatných_bloků\n"
+" Přidat do seznamu špatných bloků\n"
+" -L soubor_špatných_bloků\n"
+" Nastavit seznam špatných bloků\n"
+" -z soubor_s_historií\n"
+" Vytvořit soubor pro návrat změn\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %'u/%'u souborů (%0d,%d %% nesouvislých), %'llu/%'llu bloků\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u použitý iuzel (%2.2f %% z %u)\n"
+msgstr[1] ""
+"\n"
+"%12u použité iuzly (%2.2f %% z %u)\n"
+msgstr[2] ""
+"\n"
+"%12u použitých iuzlů (%2.2f %% z %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u nesouvislý soubor (%0d,%d %%)\n"
+msgstr[1] "%12u nesouvislé soubory (%0d,%d %%)\n"
+msgstr[2] "%12u nesouvislých souborů (%0d,%d %%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u nesouvislý adresář (%0d,%d %%)\n"
+msgstr[1] "%12u nesouvislé adresáře (%0d,%d %%)\n"
+msgstr[2] "%12u nesouvislých adresářů (%0d,%d %%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " PoÄet iuzlů s ind/dind/tind bloky: %'u/%'u/%'u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " Histogram hloubky rozsahu: "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu použitý blok (%2.2f %% z %llu)\n"
+msgstr[1] "%12llu použité bloky (%2.2f %% z %llu)\n"
+msgstr[2] "%12llu použitých bloků (%2.2f %% z %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u chybný blok\n"
+msgstr[1] "%12u chybné bloky\n"
+msgstr[2] "%12u chybných bloků\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u velký soubor\n"
+msgstr[1] "%12u velké soubory\n"
+msgstr[2] "%12u velkých souborů\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u obyÄejný soubor\n"
+msgstr[1] ""
+"\n"
+"%12u obyÄejné soubory\n"
+msgstr[2] ""
+"\n"
+"%12u obyÄejných souborů\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u adresář\n"
+msgstr[1] "%12u adresáře\n"
+msgstr[2] "%12u adresářů\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u znakové zařízení\n"
+msgstr[1] "%12u znaková zařízení\n"
+msgstr[2] "%12u znakových zařízení\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u blokové zařízení\n"
+msgstr[1] "%12u bloková zařízení\n"
+msgstr[2] "%12u blokových zařízení\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u roura\n"
+msgstr[1] "%12u roury\n"
+msgstr[2] "%12u rour\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u odkaz\n"
+msgstr[1] "%12u odkazy\n"
+msgstr[2] "%12u odkazů\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u symbolický odkaz"
+msgstr[1] "%12u symbolické odkazy"
+msgstr[2] "%12u symbolických odkazů"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "(%u rychlý symbolický odkaz)\n"
+msgstr[1] "(%u rychlé symbolické odkazy)\n"
+msgstr[2] "(%u rychlých symbolických odkazů)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+msgstr[1] "%12u sockety\n"
+msgstr[2] "%12u socketů\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u soubor\n"
+msgstr[1] "%12u soubory\n"
+msgstr[2] "%12u souborů\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "při zjišťování, jestli je %s připojen."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Pozor! %s je připojen.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Pozor! %s se používá.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s je připojen.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s se používá.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Nemohu pokraÄovat, konÄím.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"POZOR!!! Souborový systém je pÅ™ipojen. Budete-li pokraÄovat,\n"
+"***ZPÅ®SOBÃTE VÃŽNÉ*** poÅ¡kození systému souborů.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Chcete opravdu pokraÄovat"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "kontrola přerušena.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " obsahuje systém souborů s chybami"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " nebyl ÄistÄ› odpojen"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " vlastnosti primárního superbloku se liší od záložního"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " byl připojen %ukrát bez kontroly"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " má Äas poslední kontroly systému souborů v budoucnosti"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " nebyl kontrolován %u dní"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "ignoruje se interval mezi kontrolami, je nastaveno broken_system_clock\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", kontrola vynucena.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: Äistý, %'u/%'u souborů, %'llu/%'llu bloků"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (kontrola odložena, běžím na baterii)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (kontrola po příštím připojení)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kontrola za %ld připojení)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "CHYBA: Nemohu otevřít /dev/null (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Neplatná verze EA.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "Neplatná velikost pamÄ›ti pro pÅ™ednaÄítání.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Neznámý rozšířený pÅ™epínaÄ: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Rozšířené pÅ™epínaÄe jsou oddÄ›leny Äárkami a mohou mít argument, který je\n"
+"oddÄ›len znaménkem rovná se („=“). Platné rozšířené pÅ™epínaÄe jsou:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<verze_rozšířeného_atributu (1 nebo 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<velikost_vyrovnávací_paměti>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaktická chyba v konfiguraÄním souboru e2fsck (%s, řádek Ä. %d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Chyba při ověřování platnosti deskriptoru souboru %d: %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "Neplatný deskriptor souborů informace o dokonÄení"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Může být zadán jen jeden z pÅ™epínaÄů -p/-a, -n nebo -y."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "PÅ™epínaÄ -t není v této verzi e2fsck podporován.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Nelze vyřešit „%s“"
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "PÅ™epínaÄe -n a -D se vzájemnÄ› vyluÄují."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "PÅ™epínaÄe -n a -c se vzájemnÄ› vyluÄují."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "PÅ™epínaÄe -n a -l/-L se vzájemnÄ› vyluÄují."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "PÅ™epínaÄe -D a -E fixes_only se vzájemnÄ› vyluÄují."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "PÅ™epínaÄe -E bmap2extent a fixes_only se vzájemnÄ› vyluÄují."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "při otevírání %s pro synchronizaci"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "při pokusu synchronizovat %s"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "PÅ™epínaÄe -c a -l/-L nemohou být použity zároveň.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG „%s“ není celým Äíslem\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Neplatný neÄíselný argument u -%c („%s“)\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "Interval MMP je %u sekund a celková doba Äekání je %u sekund. Prosím o strpení…\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "při kontrole bloku MMP"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Jste-li si jisti, že souborový systém není používán na žádném uzlu, spusťte:\n"
+"„tune2fs -f -E clear_mmp %s“\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "pÅ™i Ätení bloku MMP"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"PÅ™episuji existující systém souborů, toto může být odÄinÄ›no příkazem:\n"
+" e2undo %s %s\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "při pokusu smazat %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "při pokusu nastavit soubor pro odvolání změn\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Chyba: stará verze knihovny ext2fs!\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "při pokusu inicializovat program"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tPoužívám %s, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "pro interaktivní opravy potřebuji terminál"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s zkouším záložní bloky…\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Neplatný superblok,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Deskriptory skupin vypadají špatně…"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s při použití záložních bloků"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: návrat k původnímu superbloku\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Revize systému souborů je zřejmě příliš vysoká pro tuto verzi e2fsck.\n"
+"(Nebo je superblok systému souborů poškozen)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "Mohl by toto být oddíl nulové délky?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Musíte mít přístup %s k systému souborů nebo být root\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Pravděpodobně neexistující nebo odkládací zařízení?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Systém souborů pÅ™ipojen nebo otevÅ™en výluÄnÄ› jiným programem?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "Pravděpodobně neexistující zařízení?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Disk chránÄ›n proti zápisu; použijte pÅ™epínaÄ -n pro provedení\n"
+"kontroly zařízení jen pro Ätení.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: Superblok se zkusí naÄíst i pÅ™es chyby…\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "Sežeňte novější verzi e2fsck!"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "při kontrole žurnálu pro %s"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "Nelze pokraÄovat v kontrole souborového systému"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr ""
+"Varování: přeskakuji obnovu žurnálu, protože provádím kontrolu systému\n"
+"souborů jen pro Ätení.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "nemohu nastavit příznaky superbloku na %s\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Nalezena chyba kontrolního souÄtu žurnálu v %s\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Žurnál poškozen v %s\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "při obnově žurnálu %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s má nepodporovanou vlastnost(i):"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s má nepodporované kódování: %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s pÅ™i Ätení iuzlu Å¡patných bloků\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Toto nevypadá dobÅ™e, ale zkusíme pokraÄovat…\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Vytváří se žurnál (%d bloků): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " Hotovo.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** žurnál byl znovu vytvořen ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "přerušen"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck přerušen.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "SpouÅ¡tím e2fsck od zaÄátku…\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "při nulování kontextu"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** CHYBY SOUBOROVÉHO SYSTÉM BYLY OPRAVENY *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: Souborový systém byl pozměněn.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** SYSTÉM SOUBORŮ BYL ZMĚNĚN *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** ZNOVU ZAVEĎTE SYSTÉM *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** VAROVÃNÃ: Systém souborů má stále chyby **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "aA"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "vV"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " („v“ zapne „ano“ pro vše) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<a>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (a/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "přerušeno!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "ano pro vše\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "ano\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "ne\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? ne\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ano\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "ano"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "ne"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: neplatný blok(y) bitmapy pro %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "Ätení bitmap iuzlů a bloků"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "pÅ™i opakovaném pokusu naÄíst bitmapy pro %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "zápisu bitmap bloků a iuzlů"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "při přepisu bitmap bloků a iuzlů pro %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: NEOÄŒEKÃVANà NEKONZISTENCE; SPUSŤTE fsck RUÄŒNÄš.\n"
+"\t(tj. bez pÅ™epínaÄů -a nebo -p)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Použitá paměť: %llu k/%llu k (%llu k/%llu k), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Použitá paměť: %llu k, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "Äas: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "strávený Äas: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "pÅ™i Ätení iuzlu %lu v %s"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "při zápisu iuzlu %lu v %s"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "NEČEKANà NEKONZISTENCE: souborový systém je měněn, zatímco fsck běží.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "hotovo \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Použití: %s [-b velikost_bloku] [-i vstupní_soubor] [-o výstupní_soubor]\n"
+" [-svwnfBX] [-c bloků_najednou] [-d Äinitel_zpoždÄ›ní_mezi_Äteními]\n"
+" [-e max_Å¡patných_bloků] [-p poÄet_průchodů]\n"
+" [-t zkušební_vzorek [-t zkušební_vzorek […]]]\n"
+" zařízení [poslední_blok [první_blok]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: PÅ™epínaÄe „-n“ a „-w“ se vzájemnÄ› vyluÄují.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f %% hotovo, %s uplynulo. (%d/%d/%d chyb)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Zkouším s náhodným vzorkem: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Zkouším se vzorkem 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "při posunu"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Divná hodnota (%ld) v do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "při ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "pÅ™i zaÄátku iterace v seznamu Å¡patných bloků"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "při alokaci vyrovnávacích paměti"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Ověřují se bloky %lu až %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Hledají se Å¡patné bloky v režimu jen pro Ätení\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Hledají se Å¡patné bloky (test jen pro Ätení): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Příliš mnoho špatných bloků, přerušuji test\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Hledají se Å¡patné bloky v režimu Ätení i zápis\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Od bloku %lu do %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Čtení a porovnání: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Hledají se Å¡patné bloky v nedestruktivním režimu Ätení i zápis\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Hledají se Å¡patné bloky (nedestruktivní test Ätení i zápisu)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Zachyceno přerušení, uklízí se\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "při testovacím zápisu dat, blok %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s je připojen; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "badblocks přesto vynucen. Doufám, že /etc/mtab je nesprávný.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "není bezpeÄné spouÅ¡tÄ›t badblocks!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s je zjevně systémem právě používán; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks přesto vynucen.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "neplatný %s – %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "PříliÅ¡ velký poÄet chybných bloků %u – maximum je %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "Nemohu alokovat paměť pro zkušební_vzorek – %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "V režimu pouhého Ätení lze zadat nejvýše jeden zkuÅ¡ební_vzorek"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "V režimu pouhého Ätení není náhodný zkuÅ¡ební_vzorek přípustný"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Špatná velikost bloku: %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Neplatný parametr bloků_najednou: %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Nemohu zjistit velikost zařízení; musíte velikost\n"
+"zadat ruÄnÄ›\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "při pokusu zjistit velikost zařízení"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "poslední blok"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "první blok"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "Å¡patný poÄáteÄní blok (%llu): musí být menší než %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "špatný koncový blok (%llu): musí se jednat o 32bitovou hodnotu"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "při vytváření seznam špatných bloků v paměti"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "vstupní soubor – chybný formát"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "při přidávání do seznamu špatných bloků v paměti"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Průchod dokonÄen, nalezeno %u Å¡patných bloků (%d/%d/%d chyb).\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Použití: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p projekt] [-v verze] soubory…\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "špatný projekt – %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "špatná verze – %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "při pokusu stat %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "pÅ™i Ätení příznaků %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Příznaky %s nastaveny na "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "při nastavování příznaků %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Verze %s nastavena na %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "při nastavování verze %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Verze %s nastavena na %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "při nastavování projektu na %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Nemohu alokovat proměnou path v chattr_dir_proc"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= je nesluÄitelné s - a +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Musíte použít '-v', =, - nebo +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "pÅ™i Ätení iuzlu %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "při zvětšování adresáře"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "při vytváření odkazu „%s“"
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "při zápisu iuzlu %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "při vypisování atributů „%s“"
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "při otevírání iuzlu %u"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "pÅ™i Ätení rozšířeného atributu iuzlu %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "při alokaci paměti"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "pÅ™i Ätení atributu „%s“ u „%s“"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "při zápisu atributu „%s“ do iuzlu %u"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "při uzavírání iuzlu %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "při alokaci iuzlu „%s“"
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "při vytváření iuzlu „%s“"
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "při vytváření symbolického odkazu „%s“"
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "při vyhledávání „%s“"
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "při vytváření adresáře „%s“"
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "pÅ™i otevírání „%s“ za úÄelem kopírování"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "při změně pracovního adresáře na „%s“"
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "při zkoumání adresáře „%s“"
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "při volání lstat nad „%s“"
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "při vytváření zvláštního souboru „%s“"
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "volání malloc selhalo"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "pÅ™i pokusu pÅ™eÄíst odkaz „%s“"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "mezi voláním lstat() a readlink() se velikost symbolického odkazu prodloužila"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "při zápisu symbolického odkazu „%s“"
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "při zápisu souboru „%s“"
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "při výrobě adresáře „%s“"
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "při změně adresáře"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "ignoruje se záznam „%s“"
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "při nastavování iuzlu pro „%s“"
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "při nastavování rozšířených atributů u „%s“"
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "při ukládání dat iuzlu"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "při kopírování rozšířených atributů kořenového adresáře"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Použití: %s [-bfghimxV] [-o superblock=N] [-o blocksize=N] zařízení\n"
+
+# Unit name after numeric value
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "bloků"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "clusterů"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Skupina %lu: (Bloky "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " souÄet 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (OÄŒEKÃVÃNO 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s superblok na "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primární"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Záložní"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Deskriptory skupin na "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Rezervované GDT bloky na "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Deskriptor skupiny na "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Bitmapa bloků na "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", souÄet 0x%08x"
+
+# No space here. It's in front of" Inode bitmap at ".
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Bitmapa iuzlů na "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Tabulka iuzlů na "
+
+# The second string is i18ned `blocks' or `clusters'
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u volných %s, %u volných iuzlů, %u adresářů%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nepoužitých iuzlů\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Volné bloky: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Volné iuzly: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "při tisku seznamu špatných bloků"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Špatné bloky: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "pÅ™i Ätení iuzlu žurnálu"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "při otevírání iuzlu žurnálu"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "pÅ™i Ätení superbloku žurnálu"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Magické Äíslo superbloku žurnálu je Å¡patnÄ›!\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "pÅ™i Ätení superbloku žurnálu"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Nemohu najít magická Äísla superbloku žurnálu"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "alokace vyrovnávací paměti pro MMP selhala\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Ätení MMP bloku %llu z „%s“\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Nemohu alokovat paměť pro zpracování pÅ™epínaÄů!\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Neplatný parametr superblok: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Neplatný parametr blocksize (velikost_bloku): %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Zadán(y) Å¡patný(é) pÅ™epínaÄ(e): %s\n"
+"\n"
+"Rozšířené pÅ™epínaÄe jsou oddÄ›leny Äárkami a mohou mít argument, který je\n"
+"\toddělen znaménkem rovná se („=“).\n"
+"\n"
+"Platné rozšířené pÅ™epínaÄe jsou:\n"
+"\tsuperblock=<Äíslo superbloku>\n"
+"\tblocksize=<velikost bloku>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tPoužívám %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Nemohu najít platný superblok systému souborů.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: vlastnost MMP není zapnuta.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "pÅ™i pokusu naÄíst bitmapy pro %s\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Nyní spusťte e2fsck!\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Použití: %s [-r|Q] [-f] [-b superblok] [-B velikost_bloku] zařízení soubor_s_obrazem\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I zařízení soubor_s_obrazem\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr ""
+" %s -ra [-cfnp] [-o pozice_zdroje] [-O pozice_cíle]\n"
+" zdrojový_souborový_systém [cílový_souborový_systém]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "při alokaci vyrovnávací paměti"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Zapisuje se blok %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "chyba při zápisu bloku %llu"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "chyba ve funkci generic_write()"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Chyba: hlaviÄka je vÄ›tší než wrt_size\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "Nemohu alokovat vyrovnávací paměť hlaviÄky\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "při zápisu superbloku"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "při zápisu tabulky iuzlů"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "při zápisu bitmapy bloků"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "při zápisu bitmapy iuzlů"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Poškozený blok adresáře %llu: chybný rec_len (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Poškozený blok adresáře %llu: chybný name_len (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu/%llu bloků (%d %%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Kopíruje se "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+"Zastavení na tomto místÄ› zniÄí souborový systém. Jste-li si jisti,\n"
+"vyvolejte přerušení znovu\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s zbývá při %.2f MB/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "chyba pÅ™i Ätení bloku %llu"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Zkopírováno %llu/%llu bloků (%d %%) v %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "při %.2f MB/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "při alokaci tabulky l1"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "při alokaci vyrovnávacích paměti druhé úrovně"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Pozor: V okamžiku vkládání vyrovnávací paměti stále jsou ve vyrovnávací paměti tabulky, což vede ke ztrátě dat a obraz možná bude poškozený.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "při alokaci ext2_qcow2_image"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "při inicializaci ext2_qcow2_image"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Chyba v programu: vytvoÅ™eny násobné bloky posloupných poÄtů odkazů!\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "při alokaci bitmapy bloků"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "při alokaci bitmapy zatemňovacích bloků"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Hledají se iuzly…\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "Nelze alokovat vyrovnávací paměť bloku"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "při získávání dalšího iuzlu"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "při procházení iuzlu %u"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "ObyÄejné a QCOW2 obrazy nelze nainstalovat"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "chyba pÅ™i Ätení bitmap"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "při otevírání souboru zařízení"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "při obnovování tabulky obrazu"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "PÅ™epínaÄ -a lze použít jen s s obyÄejnými nebo QCOW2 obrazy."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "PÅ™epínaÄ -b lze použít jen s obyÄejnými nebo QCOW2 obrazy."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "Pozice jsou dovoleny jen u obyÄejných obrazů."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Režim pÅ™esunu je dovolen jen u obyÄejných obrazů."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "Režim přesunu vyžaduje režim všech dat."
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "kontrola na připojení"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Použití e2image na souborový systém připojený pro zápis může vést\n"
+"k nekonzistentnímu obrazu, který se nehodí na ladění.\n"
+"Pokud tak opravdu chcete, použijte pÅ™epínaÄ -f.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "QCOW2 obraz nelze zapsat na standardní výstup!\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "Nelze zjistit údaje o výstupu\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Obraz (%s) je komprimován.\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Obraz (%s) je zašifrován\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Obraz (%s) je poškozen\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "při pokusu převést obraz qcow2 (%s) do binární obrazu (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "PÅ™epínaÄ -c je podporován jen v obyÄejném režimu\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "PÅ™epínaÄ -c není pÅ™i zápisu na standardní výstup podporován\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "při alokaci check_buf"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "PÅ™epínaÄ -p je podporován jen v obyÄejném režimu\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d bloků již obsahuje data, která se měla zkopírovat\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Použití: %s -r zařízení\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: nemohu otevřít %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: nemohu se posunout na superblok\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: chyba pÅ™i Ätení superbloku\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: není systém souborů ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Varování: jmenovka příliš dlouhá, zkracuji.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: nemohu se zase posunout na superblok\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: chyba při zápisu superbloku\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Použití: e2label zařízení [novájmenovka]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr ""
+"Použití: %s [-f] [-h] [-n] [-o pozice] [-v]\n"
+" [-z soubor_pro_odvolání_zmÄ›n] <transakÄní_soubor>\n"
+" <souborový_systém>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Superblok systému souborů se neshoduje se souborem pro odvolání změn.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "UUID nesouhlasí.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Čas posledního připojení neodpovídá.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Čas posledního zápisu neodpovídá.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Celoživotní poÄítadlo zápisů neodpovídá.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "pÅ™i Ätení superbloku souborového systému."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "pÅ™i Ätení superbloku"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Kontrolní souÄet superbloku souboru pro odvolání zmÄ›n neodpovídá.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "neplatná pozice – %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Nebude zapisovat do souboru pro odvolání změn, zatímco se z něj přehrává.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "při otevírání souboru pro odvolání změn „%s“\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "pÅ™i Ätení souboru pro odvolání zmÄ›n"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: Nejedná se o soubor pro odvolání změn.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Kontrolní souÄet hlaviÄky neodpovídá.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: PoÅ¡kozená hlaviÄka souboru pro odvolání zmÄ›n.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Velikost bloku pro odvolání změn je příliš veliká.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Velikost bloku pro odvolání změn je příliš malá.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Nastaven příznak vlastnosti neznámého souboru pro odvolání změn.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Chyba při zjišťování, jestli je %s připojen."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo by měl být pouštěn jen na nepřipojených souborových systémech"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "při otevírání „%s“"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "zadaná pozice je příliš velká"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "pÅ™i Ätení klíÄů"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: chybné signatura klíÄe na pozici %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: chyba kontrolního souÄtu bloku s klíÄem na pozici %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: blok %llu je příliš dlouhý."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "pÅ™i Ätení bloku %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "chyba kontrolního souÄtu v bloku souborového systému %llu (odvolací blok %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "při zápisu bloku %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Soubor pro odvolání změn je poškozený, IHNED spusťte e2fsck!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "Chyba vstupu-výstupu při přehrávání, IHNED spusťte e2fsck!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Neúplný záznam pro odvolání změn, spusťte e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Použití: findsuper zařízení [přeskakovatbajtů [startkb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "pÅ™eskakovatbajtů by mÄ›lo být Äíslo, ne %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "přeskakovatbajtů musí být násobek velikosti sektoru\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "startkb by mÄ›lo být Äíslo, ne %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "startkb by mělo být kladné, ne %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "zaÄíná se na %llu s přírůstky %u bajtů\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] pravděpodobně superblok zapsán do superbloku žurnálu ext3,\n"
+" takže zaÄátek/konec/skupina může být Å¡patnÄ›.\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "bajt_posun bajt_zaÄát bajt_konec ss_bloky velbl sku mkfs/Äas_pÅ™ipojení sb_uuid jmenovka\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: dokonÄeno s Äíslem chyby %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "VAROVÃNÃ: nemohu otevřít %s: %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "VAROVÃNÃ: Å¡patný formát na řádku %d %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"POZOR: Váš /etc/fstab neobsahuje pole s pořadím kontroly.\n"
+"\tNyní se s tím lze vypořádat, ale /etc/fstab byste měli\n"
+"\topravit, jak nejdříve budete moci.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: nenalezen\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: Žádný další synovský proces?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Varování… %s pro zařízení %s skonÄil se signálem %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: stav je %x, nemělo by se nikdy stát.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "DokonÄen s %s (stav ukonÄení %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Chyba %d při spouštění fsck.%s pro %s\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"BuÄ vÅ¡echny nebo žádný typ systému souborů pÅ™edaný -t musí mít pÅ™edponu\n"
+"„no“ nebo „!“.\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Nemohu alokovat paměť pro typy systému souborů\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr ""
+"%s: přeskakuji chybný řádek v /etc/fstab: připojení typu bind s nenulovým\n"
+"pořadím průchodu skrze fsck\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: nemohu zkontrolovat %s: fsck.%s nenalezen\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Kontrolují se všechny systémy souborů.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--Äekám-- (průchod %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Použití: fsck [-AMNPRTV] [-C [fd]] [-t typss] [pÅ™epínaÄe-ss] [systémsouborů…]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: příliš mnoho zařízení\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: příliš mnoho argumentů\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "PÅ™ipojuje se jen pro Ätení.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Uživatelé budou mít dovoleno alokovat vÅ¡echny bloky. To je nebezpeÄné!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Spusťte prosím „e2fsck -fy %s“.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: pÅ™ipojuje se jen pro Ätení bez obnovení žurnálu\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Žurnál potřebuje obnovu, je třeba spustit „e2fsck -E journal_only“.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: Zapisování do žurnálu není podporováno.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Pozor: PÅ™ipojuje se nezkontrolovaný systém, doporuÄuje se spustit e2fsck.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Pozor: Dosaženo maximálního poÄtu pÅ™ipojení, doporuÄuje se spustit e2fsck.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Pozor: ÄŒas kontroly dosažen, doporuÄuje se spustit e2fsck.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Nalezeni sirotci, doporuÄuje se spustit e2fsck.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Nalezeny chyby, doporuÄuje se spustit e2fsck.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Použití: %s [-RVadlpv] [soubory…]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "PÅ™i Ätení příznaků %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "PÅ™i Ätení projektu %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "PÅ™i Ätení verze %s"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Nebylo možné alokovat proměnou path v lsattr_dir_proc\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Použití: %s [-c|-l názevsouboru] [-b velikost-bloku] [-C velkost-clusteru]\n"
+"\t[-i bajtů-na-iuzel] [-I velikost-iuzlu] [-J pÅ™epínaÄe-žurnálu]\n"
+"\t[-G velikost meta skupiny] [-N poÄet-iuzlů] [-d koÅ™enový-adresář]\n"
+"\t[-m procenta-rezervovaných-bloků] [-o os-autora]\n"
+"\t[-g bloků-ve-skupině] [-L jmenovka-svazku]\n"
+"\t[-M adresář-posledního-připojení] [-O vlastnost[,…]] [-r revize-ss]\n"
+"\t[-E rozšířený-pÅ™epínaÄ[,…]] [-t druh-ss] [-T způsob-použití] [-U UUID]\n"
+"\t[-e chování_při_chybě][-z soubor_pro_odvolání_změn]\n"
+"\t[-jnqvDFKSV] zařízení [poÄet-bloků]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Spouštím příkaz: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "při pokusu spustit „%s“"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "při zpracovávání seznamu špatných bloků z programu"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Blok %d v oblasti primárního superbloku/deskriptorů skupin špatný.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Bloky %u až %u musí být pro vytvoření systému souborů v pořádku.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "KonÄí se…\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Varování: záložní superblok/deskriptory skupin v bloku %u obsahují\n"
+"\tšpatné bloky.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "pÅ™i oznaÄování Å¡patných bloků jako použité"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "při zápisu vyhrazených iuzlů"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Zapisuji tabulky iuzlů: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Nemohu zapsat %d bloků do tabulky iuzlů poÄínaje %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "hotovo \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "při vytváření kořenového adresáře"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "pÅ™i Ätení koÅ™enového iuzlu"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "při nastavování vlastnictví kořenového iuzlu"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "při vytváření /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "při vyhledávání /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "při zvětšování /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "při nastavování iuzlu špatných bloků"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Nedostatek paměti při mazání sektorů %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Varování: nemohu naÄíst blok 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Varování: nemohu vymazat sektor %d: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "při dělení velikosti žurnálu"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "při inicializaci superbloku žurnálu"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Nuluji zařízení žurnálu: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "pÅ™i nulování zařízení žurnálu (blok %llu, poÄet %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "při zápisu superbloku žurnálu"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Vytváří se systém souborů s %'llu (%dk) bloky a %'u uzly\n"
+
+# TODO pluralize
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"pozor: nepoužito %'llu bloků.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Jmenovka systému souborů=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Typ OS: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Velikost bloku=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Velikost clusteru=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Velikost fragmentu=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Krok=%u bloků, Šířka pásu=%u bloků\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u iuzlů, %llu bloků\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu bloků (%2.2f %%) rezervováno pro superuživatele\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "První blok dat=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Vlastník kořenového adresáře=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximum bloků v systému souborů=%'lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u skupin bloků\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u skupina bloků\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u bloků ve skupině, %u clusterů ve skupině\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u bloků ve skupině, %u fragmentů ve skupině\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u iuzlů ve skupině\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID systému souborů=%s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Zálohy superbloku uloženy v blocích: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s vyžaduje „-O 64bit“\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "„%s“ musí být před „resize=%u“\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Neplatná desc_size: „%s“\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Neplatná poÄáteÄní hodnota hashe: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Neplatná pozice: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Neplatný interval_aktualizace_mmp: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Neplatný poÄet záložních superbloků: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Neplatný parametr kroku (stride): %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Neplatný parametr šířka-pásu (stripe-width): %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Neplatný parametr změny velikosti: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Maximum změny velkosti musí být větší než velikost systému souborů.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Revize 0 souborového systému nepodporuje změnu velikosti za běhu\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Neplatný vlastník kořenu: „%s“\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Neplatné kódování: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Zadán(y) Å¡patný(é) pÅ™epínaÄ(e): %s\n"
+"\n"
+"Rozšířené pÅ™epínaÄe jsou oddÄ›leny Äárkami a mohou mít argument, který je\n"
+"\toddělen znaménkem rovná se („=“).\n"
+"\n"
+"Platné rozšířené pÅ™epínaÄe jsou:\n"
+"\tmmp_update_interval=<aktualizaÄní interval>\n"
+"\tnum_backup_sb=<poÄet záložních superbloků: 0|1|2>\n"
+"\tstride=<shluk (chunk) dat na jednom raidovém disku v blocích>\n"
+"\tstripe-width=<krok (stride) RAIDu * datových disků v blocích>\n"
+"\toffset=<pozice, na které vytvořit souborový systém>\n"
+"\tresize=<maximální velikost změny velikosti v blocích>\n"
+"\tpacked_meta_blocks=<sbalené meta bloky: 0 zakázáno, 1 povoleno>\n"
+"\tlazy_itable_init=<líná inicializace itabulky: 0 zakázáno, 1 povoleno>\n"
+"\tlazy_journal_init=<líná inicializace žurnálu: 0 zakázáno, 1 povoleno>\n"
+"\troot_owner=<UID kořenového adresáře>:<GID kořenového adresáře>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<kódování>\n"
+"\tencoding_flags=<příznaky>\n"
+"\tquotatype=<zapnuté druhy kvót>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Varování: šířka pruhu RAIDu %u není sudý násobek kroku (stride) %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "chyba: Neplatné příznaky kódování: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "chyba: Jsou-li pÅ™edány příznaky kódování, je tÅ™eba explicitnÄ› urÄit kódování\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Chyba syntaxe v konfiguraÄním souboru mke2fs (%s, řádek Ä. %d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Neplatná sada pÅ™epínaÄů systému souborů: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Nastaven neplatný pÅ™epínaÄ pÅ™ipojení: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Váš soubor mke2fs.conf nedefinuje druh souborového systému %s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Pravděpodobně potřebujete nainstalovat aktualizovaný soubor mke2fs.conf.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "KonÄí se…\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Pozor: fs_type (druh SS) %s není v mke2fs.conf definován\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Nemohu alokovat paměť pro novou proměnnou PATH.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Profil nebylo možné správně inicializovat (chyba: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "špatná velikost bloku – %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Varování: velikost bloku %d není na většině systémů použitelná.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "špatná velikost clusteru – %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "PÅ™epínaÄ â€ž-R“ je zastaralý, použijte místo nÄ›j „-E“"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "špatné chování při chybách - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Neplatný poÄet bloků ve skupinÄ›"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "bloky ve skupině musí být násobek 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Neplatné Äíslo pro velikost flex_bg"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "Velikost flex_bg musí být mocninou 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "Velikost flex_bg (%lu) musí menší nebo rovna 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "špatný podíl iuzlů %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "špatná velikost iuzlu – %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Pozor: PÅ™epínaÄ -K je zastaralý a nemÄ›l by se již používat. Místo nÄ›j použijte rozšířený pÅ™epínaÄ â€ž-E nodiscard“!\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "v malloc pro bad_blocks_filename"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Pozor: jmenovka je příliš dlouhá, bude zkrácena na „%s“\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "špatné procento rezervovaných bloků – %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "chybný poÄet iuzlů – %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "při alokaci řetězce fs_feature"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "Å¡patné Äíslo revize – %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "při pokusu vytvořit revizi %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "PÅ™epínaÄ -t lze použít jen jednou"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "PÅ™epínaÄ -T lze použít jen jednou"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "při pokusu otevřít zařízení žurnálu %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Velikost bloku zařízení žurnálu (%d) menší než minimální velikost bloku %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Použiji velikost bloku žurnálovacího zařízení: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "špatné bloky „%s“ na zařízení „%s“"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "systém souborů"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Soubor %s neexistuje a žádná velikost nebyla zadána.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Vytváří se obyÄejný soubor %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "při pokusu zjistit velikost systému souborů"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Nemohu zjistit velikost zařízení; musíte zadat\n"
+"velikost systému souborů\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Velikost zařízení je prý nula. Zadán neplatný oddíl nebo nebyla\n"
+" tabulka oddílů po fdisk znovu naÄtena, protože zmÄ›nÄ›ný\n"
+" oddíl se používá. Možná budete muset pro opÄ›tovné naÄtení\n"
+" své tabulky oddílů znovu zavést systém.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "Systém souborů větší než velikost zařízení."
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "Seznam druhů souborových systému se nezdařilo rozebrat\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Hurd nepodporuje vlastnost filetype (druh souboru).\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Hurd nepodporuje vlastnost huge_file (velký soubor).\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "Hurd nepodporuje vlastnost metadata_csum (kontrolní souÄet metadat).\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Hurd nepodporuje vlastnost ea_inode (iuzly rozšířených atributů).\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "při pokusu zjistit velikost hardwarového sektoru"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "pÅ™i pokusu urÄit velikost fyzického sektoru"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "při nastavování velikosti bloku; pro zařízení příliš malá hodnota\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Pozor: zadaná velikost bloku %d je menší než velikost fyzického sektoru %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Velikost zařízení (0x%llx bloků) %s je příliš velká, aby byla\n"
+"vyjádřena v 32 bitech za použití bloku o velikosti %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Velikost zařízení (0x%llx bloků) %s je příliš velká, aby bylo\n"
+"možné vytvořit souborový systém za použití bloku o velikosti %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types (druhy SS) pro řešení v mke2fs.conf: "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Vlastnosti systému souborů nejsou v revizi 0 podporovány\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Řídké superbloky systému souborů nejsou v revizi 0 podporovány\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Revize 0 systému souborů žurnály nepodporuje\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "špatné procento rezervovaných bloků – %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr ""
+"Rozsahy MUSà být u 64bitových souborových systémů zapnuty. Toho docílíte\n"
+"zadáním „-O extents“.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Velikost clusteru nemusí být menší než velikost bloku.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "definice velikosti clusteru vyžaduje vlastnost bigalloc"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "varování: Není možné zjistit geometrii %s\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Zarovnání %s představuje posun o %'lu bajtů.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Toto může vést k velmi Å¡patnému výkonu, doporuÄuje se (nové) vytvoÅ™ení oddílů.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s umí DAX, avÅ¡ak souÄasná velikost bloku %u se liší od velikosti stránky systému %u, takže souborový systém DAX podporovat nebude.\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d-bajtové bloky příliš velké pro systém (max %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "Varování: %d-bajtové bloky příliÅ¡ velké pro systém (max %d), donucen pokraÄovat\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Návrh: Pro vyšší stabilitu metadat a schopnost kontrolních souÄtů žurnálu použijte linuxové jádro >= 3.18.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Neznámé kódování názvů souborů v profilu: %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Neznámé příznaky kódování v profilu: %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Pozor: Zadán posun bez explicitní velikosti souborového systému.\n"
+"Bude vytvořen souborový systém o velikosti %'llu bloku, což ale\n"
+"nemusí být to, co chcete.\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "%dbajtové iuzly jsou příliš malé pro projektové kvóty"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Vlastnost bigalloc nelze bez vlastnosti rozsahů zapnout"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Vlastnosti resize_inode a meta_bg nejsou sluÄitelné.\n"
+"ObÄ› nemohou být zapnuty souÄasnÄ›.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"Pozor: souborové systémy s bigalloc a velikostí clusteru větší než\n"
+"16násobek velikosti bloku jsou experimentální.\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"bloky vyhrazené pro změnu velikosti za běhu nejsou podporovány na neřídkém\n"
+"\tsystému souborů"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "poÄet bloků ve skupinÄ› mimo rozsah"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Vlastnost flex_bg není povolena, takže její velikost nemůže být zadána"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "špatná velikost iuzlu %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "%dbajtové iuzly jsou příliš malé pro vestavěná data. Zadejte větší velikost."
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "128bytové iuzly nedokáží pojmout data po roce 2038 a jsou zastaralé\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "příliš mnoho iuzlů (%'llu), zvýšit poměr iuzlů?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "příliš mnoho iuzlů (%'llu), zadejte < 2^32 iuzlů"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"velikost_iuzlu (%u) * poÄet_iuzlů (%u) je moc na\n"
+"\tsystém souborů s %'llu bloky, zadejte vyšší poměr_iuzlu (-i)\n"
+"\tnebo snižte poÄet iuzlů (-N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Zahazují se bloky zařízení: "
+
+# Continuation of "Calling BLKDISCARD from %llu to %llu "
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "selhalo – "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "při inicializaci kontextu kvót"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "při zápisu iuzlů kvót"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "v profilu je špatné chování při chybě - %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "v malloc pro android_sparse_params"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "při nastavování superbloku"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+"Rozsahy nejsou zapnuty. Strom rozsahů souborů může být kontrolován souÄty,\n"
+"zatímco mapy bloků nikoliv. Nezapnutí rozsahů snižuje pokrytí metadat\n"
+"kontrolními souÄty. Situaci lze napravit uvedením -O extents.\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+"Podpora 64bitového souborového systému není zapnuta. Větší položky dostupné\n"
+"s touto vlastností umožňují silnÄ›jší kontrolní souÄty. Situaci lze napravit\n"
+"uvedením -I 64bit.\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Vlastnost metadata_csum_seed vyžaduje vlastnost metadata_csum.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "Skartování (discard) uspělo a bude vráceno 0s – vynechá se výmaz tabulky iuzlů\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "neznámý os – %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Alokují se tabulky skupin: "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "při pokusu alokovat tabulky systému souborů"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "pÅ™i ruÅ¡ení oznaÄení Å¡patných bloků"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tpři převodu bitmapy subclusterů"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "pÅ™i výpoÄtu režie"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s může být dále poškozen přepsáním superbloku\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "při nulování bloku %llu na konci systému souborů"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "při rezervaci bloků pro změnu velikosti za běhu"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "žurnál"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Přidávám žurnál k zařízení %s: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tpři pokusu přidat žurnál k zařízení %s"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "hotovo\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "V režimu jen-superdata bude vynechána tvorba žurnálu\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Vytváří se žurnál (%'u bloků): "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tpři pokusu vytvořit žurnál"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Chyba při zapínání ochrany proti násobnému připojení."
+
+# TODO: Pluralize
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Ochrana proti násobnému pÅ™ipojení je zapnuta s aktualizaÄním intervalem %d sekund.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "Kopírování souborů na zařízení: "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "při naplňování souborového systému"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Zapisuji superbloky a úÄtovací informace systému souborů: "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "při zapisování a uzavírání systému souborů"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"hotovo\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "při nulování bloku %llu pro obrovský soubor (hugefile)"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Odsazení oddílu %llu (%uk) bloků není sluÄitelné s velikostí clusteru %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Velké soubory budou vynulovány\n"
+
+# TODO: pluralize
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Vytváří se %lu velkých souborů "
+
+# TODO pluralize
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "každý o %'llu blocích"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "při vytváření velkého souboru %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Použití: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Použití: %s ZAŘÃZENÃ…\n"
+"\n"
+"Vypíše informace o oddílech na každém zadaném ZAŘÃZENÃ.\n"
+"Na příklad: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Nelze otevřít %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Nelze získat geometrii %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Nelze získat velikost %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d zaÄátek=%8d velikost=%8lu konec=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Tato operace vyžaduje nově zkontrolovaný souborový systém.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Spusťte prosím na tomto systému souborů e2fsck -f.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Spusťte prosím na tomto systému souborů e2fsck -fD.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Použití: %s [-c max_poÄet_pÅ™ipojení] [-e chování_pÅ™i_chybách] [-f]\n"
+"\t[-g skupina] [-i interval[d|m|w]] [-j] [-J pÅ™epínaÄe_žurnálu] [-l]\n"
+"\t[-m procento_rezervovaných_bloků] [-o [^]pÅ™epínaÄe_pÅ™ipojení[,…]]\n"
+"\t[-r poÄet_rezervovaných_bloků] [-u uživatel] [-C poÄet_pÅ™ipojení]\n"
+"\t[-L jmenovka_svazku] [-M poslední_adresář_připojení]\n"
+"\t[-O [^]vlastnost[,…]] [-Q pÅ™epínaÄe_kvót]\n"
+"\t[-E rozšířený_pÅ™epínaÄ[,…]] [-T Äas_poslední_kontroly] [-U UUID]\n"
+"\t[-I nová_velikost_iuzlu] [-z soubor_pro_odvolání_změn] zařízení\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Superblok žurnálu nenalezen!\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "při pokusu otevřít externí žurnál"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s není zařízení žurnálu.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Superblok žurnálu je poškozený, hodnota nr_users\n"
+"je příliš vysoká (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID systému souborů nenalezeno na zařízení žurnálu.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Zařízení žurnálu nelze nalézt. Odstraněno NEBYLO.\n"
+"ChybÄ›jící zařízení žurnálu lze odebrat pÅ™epínaÄem -f.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Žurnál odstraněn\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "pÅ™i Ätení bitmap"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "pÅ™i ÄiÅ¡tÄ›ní iuzlu žurnálu"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "při zápisu iuzlu žurnálu"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(a po té rebootujte!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Po dokonÄení e2fsck spusÅ¥te, prosím, „resize2fs %s %s"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Spusťte, prosím, „resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z „%s“"
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "“, abyste zapnuli 64bitový režim.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "“, abyste vypnuli 64bitový režim.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"POZOR: Nebylo možné potvrdit podporu pro metadata_csum_seed v jádře.\n"
+"Tato vlastnost vyžaduje Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Odstranění vlastnosti systému souborů „%s“ není podporováno.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Nastavená vlastnosti systému souborů „%s“ není podporováno.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Příznak has_journal může být vymazán jen, když je systém souborů\n"
+"odpojen nebo pÅ™ipojen jen pro Ätení.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Příznak needs_recovery je nastaven. Před vymazáním příznaku has_journal\n"
+"prosím spusťte e2fsck.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Na souborových systémech se zapnutou vlastností meta_bg není nastavení\n"
+"vlastnosti „sparse_super“ podporováno.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Ochranu před násobným připojením nelze nastavit,\n"
+"pokud je systém souborů pÅ™ipojen nebo je-li jen pro Ätení.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Ochrana před násobným připojením byla zapnuta s intervalem aktualizace %d s.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"Ochranu před násobným přijením nelze vypnout,\n"
+"je-li souborový systém jen pro Ätení.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "Chyba pÅ™i Ätení bitmap\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Magické Äíslo v bloku MMP se neshoduje. OÄekáváno: %x, skuteÄnost: %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "pÅ™i Ätení bloku MMP."
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Vypnutí indexu adresářů na souborovém systému s kontrolními souÄty by mohlo trvat nÄ›jakou dobu."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Na připojeném souborovém systému nelze vypnout dir_index!\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Odstranění příznaku flex_bg by mohlo způsobit nekonzistenci systému\n"
+"souborů.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Příznak huge_file může být vymazán jen, když je systém souborů\n"
+"odpojen nebo pÅ™ipojen jen pro Ätení.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Zapnutí kontrolních souÄtů by mohlo trvat nÄ›jakou dobu."
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Na připojeném souborovém systému nelze zapnout metadata_csum!\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+"Rozsahy nejsou zapnuty. Strom rozsahů souborů může být prověřen na\n"
+"kontrolní souÄty, ale mapy bloků nikoliv. Nezapnutí rozsahů snižuje pokrytí\n"
+"metadat kontrolními souÄty. Situaci lze napravit spuÅ¡tÄ›ním s -O extent.\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr ""
+"Podpora pro 64bitový souborový systém není zapnuta. Větší položky dostupné\n"
+"s touto podporou umožní silnÄ›jší kontrolní souÄty. Situaci lze napravit\n"
+"spuštěním resize2fs -b.\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "Vypnutí kontrolních souÄtů by mohlo trvat nÄ›jakou dobu."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Na připojeném souborovém systému nelze vypnout metadata_csum!\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Na připojeném souborovém systému nelze zapnout uninit_bg!\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Na připojeném souborovém systému nelze vypnout uninit_bg!\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "64bitový režim nelze zapnout, je-li systém připojen!\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "64bitový systém nelze vypnout, je-li systém připojen!\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Nelze zapnout vlastnost projekty, velikost iuzlu je příliš malá.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Pozor: pÅ™epínaÄ â€ž^quota“ pÅ™ebije argumenty „–Q“.\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "Vlastnost casefold smí být změněna, jen když je systém souborů odpojen.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Nastavení vlastnosti „metadata_csum_seed“ je podporováno jen\n"
+"na souborových systémech se zapnutou vlastností metadata_csum.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"Od zapnutí metadata_csum se UUID zmÄ›nilo. Aby se bezpeÄnÄ› pÅ™epsala\n"
+"všechna metadata na nové UUID, souborový systém musí být odpojen.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "PÅ™epoÄet kontrolních souÄtů by mohlo trvat nÄ›jakou dobu."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "Systém souborů již žurnál má.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tpři pokusu otevřít žurnál na %s\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Vytváří se žurnál na zařízení %s: "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "při přidávání systému souborů do žurnálu na %s"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Vytváří se iuzel žurnálu: "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tpři pokusu vytvořit soubor žurnálu"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Nelze zapnout projektové kvóty, iuzel je příliš malý.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "při inicializaci kontextu kvóty v podpůrné knihovně"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "při aktualizaci hodnot kvót (%d)"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "při zápisu souboru s kvótami (%d)"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "při odstraňovaní souboru s kvótami (%d)"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Zadány chybné pÅ™epínaÄe kvóty.\n"
+"\n"
+"Následují dostupné platné pÅ™epínaÄe kvóty (oddÄ›lují se Äárkou):\n"
+"\t[^]usr[quota] (kvóty uživatelů)\n"
+"\t[^]grp[quota] (kvóty skupin)\n"
+"\t[^]prj[quota] (kvóty projektů)\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Nemohu zpracovat urÄení data/Äasu: %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "Å¡patný poÄet pÅ™ipojení - %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "špatné gid/jméno skupiny - %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "Špatný interval - %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "špatný podíl rezervovaných bloků - %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "-o může být zadáno jen jednou"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "-O může být zadáno jen jednou"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "Å¡patný poÄet rezervovaných bloků - %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "špatné uid/jméno uživatele - %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "špatná velikost iuzlu – %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Velikost iuzlu musí být mocnina dvou – %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "interval_aktualizace_mmp je příliš velký: %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Nastavuje se interval aktualizace ochrany proti násobnému připojení na %'lu sekundu\n"
+msgstr[1] "Nastavuje se interval aktualizace ochrany proti násobnému připojení na %'lu sekundy\n"
+msgstr[2] "Nastavuje se interval aktualizace ochrany proti násobnému připojení na %'lu sekund\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Nastavuje se příznak chyby souborového systému, aby se vynutila jeho kontrola.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Neplatný kroku (stride) RAIDu: %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Neplatná šířka pruhu RAIDu (stripe-width): %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Neplatný hashovací algoritmus: %s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Implicitní hashovací algoritmus se nastavuje na %s (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Stávající kódování nelze změnit\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "Neplatné kódování: %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "Kódování se nastavuje na „%s“\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "encoding_flags se nastavuje na „%s“\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Zadány Å¡patné pÅ™epínaÄe.\n"
+"\n"
+"Rozšířené pÅ™epínaÄe se oddÄ›lují Äárkami a mohou mít argument, který je\n"
+"\toddělen znaménkem rovná se („=“).\n"
+"\n"
+"Platné rozšířené pÅ™epínaÄe jsou:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hashovací algoritmus>\n"
+"\tmount_opts=<rozšířené pÅ™epínaÄe implicitní pÅ™i pÅ™ipojení>\n"
+"\tmmp_update_interval=<interval aktualizace mmp v sekundách>\n"
+"\tstride=<velikost shluku (chunk) na jednom raidovém disku v blocích>\n"
+"\tstripe_width=<krok (stride) RAIDu * datových disků v blocích>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<kódování>\n"
+"\tencoding_flags=<příznaky>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "Čtení bitmapy iuzlů selhalo.\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "Čtení bitmapy bloků selhalo\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "bloky pro přesun"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Během zvětšování iuzlu selhala alokace bitmapy bloků\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "Nedostatek místa pro zvětšení iuzlu\n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Během změny velikosti iuzlu selhala realokace bloků\n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Chyba při měnění velikost iuzlu.\n"
+"Spusťte e2undo, abyste vrátili změny provedené na systému souborů.\n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Jste-li si jisti, že souborový systém není používán na žádném uzlu, spusťte:\n"
+"„tune2fs -f -E clear_mmp ZAŘÃZENÓ\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Magické Äíslo bloku MMP je chybné. Můžete jej zkusit opravit pomocí:\n"
+"„e2fsck -f %s“\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "Zařízení žurnálu nelze upravit.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Velikost iuzlu již je %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "Zmenšování velikosti iuzlu není podporováno\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "špatná velikost iuzlu %lu (max %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Změna velikosti iuzlů by mohla trvat nějakou dobu."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Pozor: Žurnál není Äistý. Možná si budete přát pÅ™ehrát žurnál takto:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"Pak tento příkaz spusťte znovu. Jinak jakékoliv provedené změny mohou být\n"
+"přepsány při obnově žurnálu.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Obnovuje se žurnál.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Nastavuje se maximální poÄet pÅ™ipojení na %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Nastavuje se aktuální poÄet pÅ™ipojení na %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Nastavuje se chování při chybách na %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Nastavuje se GID rezervovaných bloků na %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "interval mezi kontrolami je příliš dlouhý (%'lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Interval mezi kontrolami se nastavuje na %'lu sekund\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Procento rezervovaných bloků se nastavuje na %g %% (%'llu bloků)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "poÄet rezervovaných bloků je příliÅ¡ velký (%'llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "PoÄet rezervovaných bloků se nastavuje na %'llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Systém souborů již má řídké superbloky.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Na souborových systémech se zapnutou vlastností meta_bg není nastavení\n"
+"příznaku řídkého superbloku podporováno.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Příznak řídkých superbloků nastaven. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Odstranění příznaku řídkého superbloku není podporováno.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Nastavuje se Äas poslední kontroly systému souborů na %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Nastavuje se UID rezervovaných bloků na %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Chybné použití clear_mmp. Je třeba jej použít s -f\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Vlastnost kvóty smí být změněna, jen když je systém souborů odpojen.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Na tomto souborovém systému nelze změnit UUID, protože má nastaven příznak vlastnosti stable_inodes.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Nastavení UUID na tomto souborovém systému může nějakou dobu trvat."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "UUID smí být změněno, jen když je systém souborů odpojen.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr ""
+"Pouze pokud používáte jádra novější než v4.4, spusťte\n"
+"„tune2fs -O metadata_csum_seed“ a poté znovu tento příkaz.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Neplatný formát UUID\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Je třeba aktualizovat superblok žurnálu.\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Velikost iuzlu smí být změněna, jen když je systém souborů odpojen.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Na souborových systémech se zapnutou vlastností flex_bg není změna velikosti\n"
+"iuzlu podporována.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Velikost iuzlu se nastavuje na %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "Změna velikosti iuzlu selhala.\n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Velikost kroku (stride) se nastavuje na %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Šířka pruhu (stripe width) se nastavuje na %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Implicitní rozšířené pÅ™epínaÄe pÅ™i přípojení se nastavují na „%s“\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<pokraÄuje se>\n"
+
+# TODO: Pluralize
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "PÅ™esto pokraÄovat (nebo poÄkat %d sekund do pokraÄování)? (a,N) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "PÅ™esto pokraÄovat? (a,N) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs přesto vynucen. Doufám, že /etc/mtab je nesprávná.\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "nebudu tady vytvářet %s!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs stejnÄ› vynucen.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Nemohu alokovat paměť pro zpracování pÅ™epínaÄů žurnálu!\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Nebylo možné najít žurnálovací zařízení odpovídající %s\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Zadány Å¡patné pÅ™epínaÄe žurnálu.\n"
+"\n"
+"PÅ™epínaÄe žurnálu se oddÄ›lují Äárkami a mohou mít argument, který je\n"
+"\toddělen znaménkem rovná se („=“).\n"
+"\n"
+"Platné pÅ™epínaÄe žurnálu jsou:\n"
+"\tsize=<velikost žurnálu v megabajtech>\n"
+"\tdevice=<zařízení žurnálu>\n"
+"\tlocation=<umístění žurnálu>\n"
+"\n"
+"Velikost žurnálu musí být mezi 1024 a 10240000 bloky systému souborů.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Systém souborů příliš malý na žurnál\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Celková požadovaná velikost žurnálu je %'d bloků; musí být\n"
+"mezi 1024 a 10 240 000 bloky. KonÄí se.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Celková velikost žurnálu je příliš velká pro systém souborů.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Tento systém souborů bude automaticky kontrolován každých %d připojení nebo\n"
+"%g dní, podle toho, co nastane dříve. Pro změnu použijte tune2fs -c nebo -i.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Použití: %s [-d] [-p SOUBOR_S_PID] [-s CESTA_K_SOCKETU] [-T LHŮTA]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n POÄŒET] [-s CESTA_K_SOCKETU]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "chybné argumenty"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "připojení"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "zápis"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "Ätení poÄtu"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "chybná délka odpovědi"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "démon uuidd již běží jako PID %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Nebylo možné vytvořit unixový proudový socket: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Unixový socket nebylo možné přilepit k %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Na unixovém socketu %s nebylo možné zaÄít poslouchat: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Chyba pÅ™i Ätení z klienta, délka = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operace %d, příchozí poÄet = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "VytvoÅ™eno Äasové UUID: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Vytvořeno náhodné UUID: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "VytvoÅ™eno Äasové UUID %s a %d následující\n"
+msgstr[1] "VytvoÅ™eno Äasové UUID %s a %d následující\n"
+msgstr[2] "VytvoÅ™eno Äasové UUID %s a %d následujících\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Vytvořeno %d UUID:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Neplatná operace %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Chybné Äíslo: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Chyba při volání démona uuidd (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s a následující %d UUID\n"
+msgstr[1] "%s a následující %d UUID\n"
+msgstr[2] "%s a následujících %d UUID\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Seznam UUID:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "NeoÄekávaná délka odpovÄ›di ze serveru %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Nebylo možné zabít uuidd s PID %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Zabit uuidd s PID %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Použití: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Výpis rozsahu:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tČís=%llu, Velikost=%llu, Kurzor=%llu, Seřazeno=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Použití: %s [-d ladicí_pÅ™epínaÄe] [-f] [-F] [-M] [-P] [-p]\n"
+" zařízení [-b|-s|nová_velikost] [-S krok_RAIDu] [-z soubor_s_historií]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Zvětšuji tabulku iuzlů"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Přesouvám bloky"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Procházím tabulku iuzlů"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Aktualizuji odkazy na iuzly"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Přesouvám tabulku iuzlů"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Neznámý průchod?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "ZaÄátek průchodu %d (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Změna velikosti souborového systému s vlastností bigalloc není plně\n"
+"otestována. PokraÄování jen na vlastní nebezpeÄí! PÅ™ejete-li si pokraÄovat,\n"
+"použijte pÅ™epínaÄ vynucení.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "při otevírání %s"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "při zjišťování stat informací o %s"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Spusťte prosím nejdříve „e2fsck -f %s“.\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Odhadovaná minimální velikost systému souborů: %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Chybná nová velikost: %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Nová velikost je příliš, aby byla vyjádřena ve 32 bitech\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "Nová velikost ústí v příliš mnoho deskriptorů skupin bloků.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Nová velikost je menší než minimum (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Neplatná délka kroku"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"DotÄený oddíl (nebo zařízení) je jen %'llu (%dk) bloků velké.\n"
+"Požadovali jste novou velikost %'llu bloků.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Vlastnost 64 bitů nelze zapnout a vypnout.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr ""
+"Na souborovém systému, který je větší než 2^32 bloků, nelze přepnout\n"
+"vlastnost 64 bitů.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Je-li systém souborů připojen, vlastnost 64 bitů nelze přepnout.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr ""
+"Před tím než zapnete vlastnost 64 bitů, prosím, nejprve zapněte vlastnost\n"
+"rozsahy pomocí tune2fs.\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Souborový systém již je dlouhý %'llu (%dk) bloků. Není co dělat!\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Systém souborů již je 64bitový.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Systém souborů již je 32bitový.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Tento souborový systém nelze zmenšit, protože má příznak vlastnosti stable_inodes.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Souborový systém se převádí do 64 bitů.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Souborový systém se převádí do 32 bitů.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Velikost systému souborů %s se mění na %'llu (%dk) bloků.\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "při pokusu změnit velikost %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Po přerušené změně velikosti, prosím, opravte souborový systém pomocí\n"
+"„e2fsck -fy %s“\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Systém souborů na %s je nyní %'llu (%dk) bloků dlouhý.\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "při pokusu zkrátit %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "jádro nepodporuje změnu velikost za běhu se sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+"Systém souborů v %s je připojen do %s,\n"
+"požadována změna velikosti za běhu.\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Zmenšování za běhu není podporováno"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Systém souborů nepodporuje změnu velikosti za běhu"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Nedostatek rezervovaných GDT bloků pro změnu velikosti za běhu"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Jádro nepodporuje změnu velikosti souborového systému na tuto velikost"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "při pokusu otevřít přípojný bod %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Vyžádáno staré rozhraní pro změnu velikosti.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Povolení ke změně velikosti systému souborů zamítnuto"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Při zjišťování podpory změny velikosti za běhu"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Jádro nepodporuje změnu velikost za běhu"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Mění se velikosti za běhu %s na %'llu (%dk) bloků.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Při pokusu rozšířit poslední skupinu"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "PÅ™i pokusu pÅ™idat skupinu Ä. %d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "Systém souborů v %s je připojen do %s a změna velikost za běhu není na tomto systému podporována.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "iuzlů (%'llu) musí být méně než %'u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "rezervované bloky"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "bloky meta-dat"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "nové meta bloky"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Toto by nikdy nemělo stát! žádný superblok v posledním super_sparse bg?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Toto by se nikdy nemÄ›lo stát! NeoÄekávaný old_desc v super_sparse bg?\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Toto by se nikdy nemělo stát: iuzly pro změnu velikosti jsou poškozeny!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "Knihovna EXT2FS verze 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Chybné magické Äíslo pro strukturu ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Chybné magické Äíslo pro strukturu badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Chybné magické Äíslo pro strukturu badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Chybné magické Äíslo pro strukturu inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Chybné magické Äíslo pro strukturu io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Chybné magické Äíslo pro unixovou strukturu io_channel"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Chybné magické Äíslo pro strukturu io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Chybné magické Äíslo pro strukturu block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Chybné magické Äíslo pro strukturu inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Chybné magické Äíslo pro strukturu generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Chybné magické Äíslo pro strukturu io_channel"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Chybné magické Äíslo pro strukturu seznamu bloků adresářů"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Chybné magické Äíslo pro strukturu icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Chybné magické Äíslo pro strukturu Powerquest io_channel"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Chybné magické Äíslo pro ext2 strukturu souboru"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Chybné magické Äíslo pro hlaviÄku obrazu ext2"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Chybné magické Äíslo pro strukturu io_channel iuzlu"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Chybné magické Äíslo pro popisovaÄ rozsahu ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Chybné magické Äíslo v superbloku"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Revize systému souborů je příliš vysoká"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Pokus zapsat do souborového systému, který je jen pro Ätení"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Deskriptory skupin nelze pÅ™eÄíst"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Deskriptory skupin nelze zapsat"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Poškozený deskriptor skupiny: chybný blok pro bitmapu bloků"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Poškozený deskriptor skupiny: chybný blok pro bitmapu iuzlů"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Poškozený deskriptor skupiny: chybný blok pro tabulku iuzlů"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Bitmapu iuzlů nelze zapsat"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Bitmapu iuzlů nelze pÅ™eÄíst"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Bitmapu bloků nelze zapsat"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Bitmapu bloků nelze pÅ™eÄíst"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Tabulku iuzlů nelze zapsat"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Tabulku iuzlů nelze pÅ™eÄíst"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Následující iuzel nelze pÅ™eÄíst"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Systém souborů má neÄekanou velikost bloku"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Adresář ext2 poškozen"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Pokus pÅ™eÄíst blok ze systému souborů vyústil ve zkrácené Ätení"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Pokus zapsat blok do systému souborů vyústil ve zkrácený zápis"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "V adresáři není volné místo"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Bitmapa iuzlů není naÄtena"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Bitmapa bloků není naÄtena"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Neplatné Äíslo iuzlu"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Neplatné Äíslo bloku"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Vnitřní chyba ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Nedostatek místa pro výstavbu navržené souborového systému"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Do ext2fs_mark_block_bitmap pÅ™edáno zakázané Äíslo bloku"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Do ext2fs_unmark_block_bitmap pÅ™edáno zakázané Äíslo bloku"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Do ext2fs_test_block_bitmap pÅ™edáno zakázané Äíslo bloku"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Do ext2fs_mark_inode_bitmap pÅ™edáno zakázané Äíslo iuzlu"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Do ext2fs_unmark_inode_bitmap pÅ™edáno zakázané Äíslo iuzlu"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Do ext2fs_test_inode_bitmap pÅ™edáno zakázané Äíslo iuzlu"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Pokus podvrhnout konec bitmapy bloků za skuteÄný konec"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Pokus podvrhnout konec bitmapy iuzlů za skuteÄný konec"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Nalezen zakázaný nepřímý blok"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Nalezen zakázaný dvojnásobně nepřímý blok"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Naleze zakázaný trojnásobně nepřímý blok"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Bitmapy bloků se neshodují"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Bitmapu iuzlů se neshodují"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Zakázaný nebo chybně utvořený název zařízení"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Skupina bloků postrádá tabulku iuzlů"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Superblok ext2 je poškozený"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Do ext2fs_mark_generic_bitmap pÅ™edáno zakázané Äíslo obecných bitů"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Do ext2fs_unmark_generic_bitmap pÅ™edáno zakázané Äíslo obecných bitů"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Do ext2fs_test_generic_bitmap pÅ™edáno zakázané Äíslo obecných bitů"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Zaznamenáno příliš mnoho symbolických odkazů"
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Funkce zpětného volání tento případ neumí obsloužit"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Iuzel pochází z chybného bloku tabulky iuzlů"
+
+# TODO: Pluralize
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Souborový systém má nepodporovanou(é) vlastnost(i)"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Souborový systém má nepodporované vlastnosti, které lze jen Äíst"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "I/O Channel nedokázal pÅ™esunout pozici pro Ätení nebo zápis"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Alokace paměti selhala"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Do knihovny ext2 předán neplatný argument"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "V souborovém systému ext2 nebylo možné alokovat blok"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "V souborovém systému ext2 nebylo možné alokovat iuzel"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Iuzel ext2 není adresářem"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Příliš mnoho odkazů do tabulky"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Funkce ext2_lookup soubor nenalezla"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Soubor otevÅ™en jen pro Ätení"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Blok adresáře ext2 nenalezen"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Adresář ext2 již existuje"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Neimplementovaná funkce knihovny ext2"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Uživatel zrušil požadavek"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Soubor ext2 je příliš velký"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Dodané žurnálovací zařízení není blokovým zařízením"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Superblok žurnálu nenalezen"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Žurnál musí mít aspoň 1024 bloků"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Nepodporovaná verze žurnálu"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Chyba pÅ™i naÄítání externího žurnálu"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Žurnál nenalezen"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Hash adresářů nepodporován"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Neplatné Äíslo bloku rozšířeného atributu"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Souborový systém nelze vytvoÅ™it s požadovaným poÄtem iuzlů"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Snímek e2image se právě nepoužívá"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Příliš mnoho rezervovaných bloků deskriptorů skupiny"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Iuzel urÄený pro zmÄ›nu velikosti je poÅ¡kozený"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Byl pokus nastavit bitmapu bloků s chybějícím nepřímým blokem"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Úspěch"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Databáze poškozena"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: Chyba vstupu/výstupu"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Chyba zamykání"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Nedostatek paměti"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Záznam existuje"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Zámek existuje na jiném klíÄi"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Neplatný parametr"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Záznam neexistuje"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Zápis není povolen"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Seznam bloků adresářů ext2 je prázdný"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Pokus zmÄ›nit mapování bloků pÅ™es blokový iterátor urÄený jen pro Ätení"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Chybné magické Äíslo pro uloženou cestu ext4 rozsahu"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Chybné magické Äíslo pro 64bitovou obecnou bitmapu"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Chybné magické Äíslo pro 64bitovou bitmapu bloků"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Chybné magické Äíslo pro 64bitovou bitmapu iuzlů"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Chybné magické Äíslo – RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Chybné magické Äíslo – RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Chybné magické Äíslo – RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Chybné magické Äíslo – RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Chybné magické Äíslo – RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Chybné magické Äíslo – RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Chybné magické Äíslo – RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "PoÅ¡kozená hlaviÄka rozsahu"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Poškozený index rozsahu"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Poškozený rozsah"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "V mapě rozsahů nezbývá volné místo"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Iuzel nepoužívá rozsahy"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Žádný „další“ rozsah"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Žádná „předchozí“ rozsah"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Žádný „nadřízený“ rozsah"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Žádný „podřízený“ rozsah"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Žádný souÄasný uzel"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Operace ext2 není podporována"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Není místo pro vložení rozsahu do uzlu"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Rozdělení by vedlo k prázdnému uzlu"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Rozsah nenalezen"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Operace na iuzlech obsahujících rozsahy není podporována"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Délka rozsahu není platná"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "I/O Channel nepodporuje 64bitová Äísla bloků"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Kvůli chybějícímu souboru mtab nelze zjistit, zda-li je systém souborů připojený"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Souborový systém je příliš velký na to, aby se použily zastaralé bitmapy"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: neplatné magické Äíslo"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: zařízení je právě aktivní"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: e2fsck právě běží"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: Äíslo bloku se nachází za hranicí systému souborů"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: právě probíhá neznámá operace"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: systému souborů se stále používá"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: otevření s O_DIRECT selhalo"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Nesprávná velikost deskriptoru skupiny bloků"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Kontrolní souÄet iuzlu neodpovídá iuzlu"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Kontrolní souÄet bitmapy iuzlů neodpovídá bitmapÄ›"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Kontrolní souÄet bloku rozsahů neodpovídá bloku rozsahů"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Blok adresářů nemá místo pro kontrolní souÄet"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Kontrolní souÄet bloku adresářů neodpovídá bloku adresářů"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Kontrolní souÄet bloku rozšířených atributů neodpovídá bloku"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Kontrolní souÄet superbloku neodpovídá superbloku"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Neznámý algoritmus kontrolního souÄtu"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Kontrolní souÄet bloku MMP neodpovídá"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Soubor ext2 již existuje"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Kontrolní souÄet bitmapy bloků neodpovídá bitmapÄ›"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Nelze projít datové bloky iuzlu, který obsahuje vestavěná data"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Rozšířený atribut má neplatnou délku názvu"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Rozšířený atribut má neplatnou délku hodnoty"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Rozšířený atribut mát nesprávný otisk"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Blok rozšířeného atributu má chybnou hlaviÄku"
+
+# These shortcuts are a nightmare.
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Index rozšířeného atributu nenalezen"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Nedostatek místa pro uložení dat rozšířeného atributu"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Souborový systém postrádá vlastnost ext_attr nebo inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Iuzel nemá vestavěná data"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Neexistuje blok pro iuzel s vestavěnými daty"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Ve vestavěných datech nezbývá volné místo"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Chybné magické Äíslo pro strukturu rozšířeného atributu"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Zdá se, že iuzel obsahuje nesmysly"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Rozšířený atribut má neplatnou pozici hodnoty"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Příznaky žurnálu si odporují"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Soubor pro odvolání změn je poškozený"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Nesprávný soubor pro odvolání změn pro tento systém souborů"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Souborový systém je poškozený"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "V souborovém systému byl nalezen chybný kontrolní souÄet"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Superblok žurnálu je poškozený"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Iuzel je poškozený"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "Iuzel obsahující hodnotu rozšířeného atributu je poškozený"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Deskriptory skupin nenaÄteny"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "Vnitřní datová struktura ext2_filsys se zdá býti poškozená"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "Nalezen cyklus ve stromu rozsahů"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Operace není na externím žurnálů podporována"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil verze 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Chybné magické Äíslo v profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Sekce s profilem nenalezena"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Relace profilu nenalezena"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Pokus přidat relaci uzlu, který není sekcí"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "HlaviÄka sekce profilu má nenulovou hodnotu"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Chybný zřetězený seznam ve struktuře profilu"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Chybná úroveň skupiny ve struktuře profilu"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Chybný ukazatel na rodiÄe ve struktuÅ™e profilu"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Chybné magické Äíslo v iterátoru profilu"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Uzlu sekce nelze nastavit hodnotu"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Do knihovny profilu předán neplatný argument"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Pokus zmÄ›nit profil, který je jen pro Ätení"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "HlaviÄka sekce profilu není na nejvyšší úrovni"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Chyba syntaxe ve hlaviÄce sekce profilu"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Chyba syntaxe v relaci profilu"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "NadbyteÄná uzavírací závorka v profilu"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "V profilu chybí otevírací závorka"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Chybné magické Äíslo v profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Chybné magické Äíslo v profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Průchod skrze všechny vrcholové sekce není podporován"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Neplatný objekt profile_section"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Žádné další sekce"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Do dotazovací rutiny předána chybná množina názvů"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Žádný soubor s profilem k otevření"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Chybné magické Äíslo v profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Soubor s profilem nebylo možné otevřít"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sekce již existuje"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Neplatná pravdivostní hodnota"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Neplatná celoÄíselná hodnota"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Chybné magické Äíslo v profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tnaposledy připojeno do %.*s v %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tnaposledy připojeno v %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tvytvořeno v %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tnaposledy změněno v %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Nalezena tabulka rozdělení disku %s v %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Nebylo možné otevřít %s: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Zařízení zřejmě neexistuje; zadali jste je správně?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s není speciální blokové zařízení.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s obsahuje systém souborů %s se jmenovkou „%s“\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s obsahuje systém souborů %s\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s obsahuje data „%s“\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the bigalloc feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Pozor: vlastnost bigalloc je stále ve vývoji.\n"
+#~ "Podrobnosti naleznete na <https://ext4.wiki.kernel.org/index.php/Bigalloc>.\n"
+#~ "\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "Použití: %s [-F] [-I bloky_inode_bufferů] zařízení\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "při pokusu otevřít „%s“"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "prozkoumáno %u iuzlů.\n"
+
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "Vlastnosti encrypt a casefold nejsou sluÄitelné.\n"
+#~ "ObÄ› nemohou být zapnuty souÄasnÄ›.\n"
+
+#~ msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+#~ msgstr "Na souborových systémech se zapnutou vlastností encoding nelze zapnout vlastnost encrypt.\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "při otevírání adresáře „%s“"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Na souborovém systému byly nalezeny chyby kontrolního souÄtu!\n"
+#~ "*** Okamžitě spusťte e2fsck!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** V bitmapách byly nalezeny chyby kontrolního souÄtu!\n"
+#~ "*** Okamžitě spusťte e2fsck!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: chyba pÅ™i Ätení bitmap: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Pozor, byly problémy se zápisem superbloků.\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "i_dir_acl pro iuzel %i (%Q) je %N, mělo by být nula.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Vlastnosti žurnálu: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Velikost žurnálu: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Délka žurnálu: %u\n"
+#~ "Sekvence žurnálu: 0x%08x\n"
+#~ "ZaÄátek žurnálu: %u\n"
+
+#~ msgid "Journal checksum type: crc32\n"
+#~ msgstr "Typ kontrolního souÄtu žurnálu: crc32\n"
+
+#~ msgid ""
+#~ "Journal checksum type: %s\n"
+#~ "Journal checksum: 0x%08x\n"
+#~ msgstr ""
+#~ "Typ kontrolního souÄtu žurnálu: %s\n"
+#~ "Kontrolní souÄet žurnálu: 0x%08x\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Chybové Äíslo žurnálu: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Velikost bloku žurnálu: %u\n"
+#~ "Délka žurnálu: %u\n"
+#~ "První blok žurnálu: %u\n"
+#~ "Sekvence žurnálu: 0x%08x\n"
+#~ "ZaÄátek žurnálu: %u\n"
+#~ "PoÄet uživatelů žurnálu: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "Uživatelé žurnálu: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: enabled project without quota together\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Pozor: je zapnut projekt bez kvót\n"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "Spusťte prosím na tomto systému souborů e2fsck.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "Iuzel %i má nastaven příznak komprimace na systému souborů bez podpory komprimace. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "Chyba při alokaci bloku rozšířených atributů %b. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: pozor: podpora komprese je experimentální.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: E2fsck nepřeložen s podporou HTREE,\n"
+#~ "\tale systém souborů %s má adresáře HTREE.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "Při alokaci nulovací vyrovnávací paměti"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", nepoužitých iuzlů %u\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Nemohu naÄíst data souborového systému \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "tdb_fetch %s selhalo\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "UUID systému souborů se neshoduje \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "tdb_open %s selhalo\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "Selhalo otevření %s\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr "Přehraná transakce o velikosti %zd na pozici %llu\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Selhal zápis %s\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Neplatný parametr druhu kvót: %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "Nemohu alokovat paměť pro zpracování pÅ™epínaÄů kvóty!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Nemohu alokovat paměť pro název souboru TDB\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Změny způsobené tune2fs lze zvrátit tímto příkazem\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s je celé zařízení, ne jen jeden oddíl!\n"
+
+#~ msgid "\b\b\b\b\b\b\b\bCopied %llu / %llu blocks (%llu%%) in %s at %.2f MB/s \n"
+#~ msgstr "\b\b\b\b\b\b\b\bZkopírováno %llu/%llu bloků (%llu %%) do %s při %.2f MB/s \n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the quota feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Quota for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Pozor: vlastnost kvóty je stále ve vývoji.\n"
+#~ "Podrobnosti naleznete na <https://ext4.wiki.kernel.org/index.php/Quota>.\n"
+#~ "\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "Nemohu stat %s --- %s\n"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "Odstranění příznaku rozsahu není na %s podporováno"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s: Kombinace vlastností flex_bg a\n"
+#~ "\t!resize_inode není podporována nástrojem resize2fs.\n"
+
+#~ msgid "@g %g @b @B uninitialized but @i @B in use.\n"
+#~ msgstr "Bitmapa bloků skupiny %g neinicializována, aÄkoliv bitmapa iuzlů je použita.\n"
+
+#~ msgid "@i %i should not have EOFBLOCKS_FL set (size %Is, lblk %r)\n"
+#~ msgstr "Iuzel %i by neměl mít nastaveno EOFBLOCKS_FL (velikost %Is, lblk %r)\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "Velikost žurnálu nelze urÄit"
+
+#~ msgid "#\t\t %llu -> %llu (%llu)\n"
+#~ msgstr "#\t\t %llu -> %llu (%llu)\n"
+
+# TODO: Missing... not present is duplicate
+#~ msgid "Missing indirect block not present"
+#~ msgstr "Nepřímý blok není přítomen"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<Iuzel indexu ACL>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<Iuzel dat ACL>"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "krátký zápis (jen %d bajtů) pÅ™i zápisu hlaviÄky obrazu"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "špatná velikost fragmentu – %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Varování: fragmenty nepodporovány. Ignoruji pÅ™epínaÄ -f\n"
+
+# Calling is subject
+#~ msgid "Calling BLKDISCARD from %llu to %llu "
+#~ msgstr "Volání BLKDISCARD od %llu do %llu "
+
+# Continuation of "Calling BLKDISCARD from %llu to %llu "
+#~ msgid "succeeded.\n"
+#~ msgstr "uspělo.\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "Žurnál NEODSTRANĚN\n"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr "Superblok nemá příznak has_journal, ale má žurnál ext3 %s.\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "Znovu vytvořit žurnál, aby se získal zpět souborový systém ext3?\n"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "při opakovaném pokusu zapsat bitmapy bloků pro %s"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s selhalo pro %s: %s\n"
+
+# Toto je open(2) použitý jako titulek chybového hlášení
+#~ msgid "open"
+#~ msgstr "otevírání"
+
+#~ msgid "HDIO_GETGEO ioctl"
+#~ msgstr "ioctl HDIO_GETGEO"
+
+#~ msgid "BLKGETSIZE ioctl"
+#~ msgstr "ioctl BLKGETSIZE"
+
+#~ msgid "@a in @i %i has a hash (%N) which is @n (must be 0)\n"
+#~ msgstr "Rozšířený atribut v iuzlu %i má hash (%N), který není platný (musí být 0)\n"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "při volání funkce iterátoru"
+
+#~ msgid "Pass 0: Doing byte-swap of filesystem\n"
+#~ msgstr "Průchod 0: Provádím přehození bajtů systému souborů\n"
+
+#~ msgid ""
+#~ "%s: the filesystem must be freshly checked using fsck\n"
+#~ "and not mounted before trying to byte-swap it.\n"
+#~ msgstr ""
+#~ "%s: systém souborů musí být před pokusem přehodit bajty\n"
+#~ "ÄerstvÄ› otestován pomocí fsck a nesmí být pÅ™ipojen.\n"
+
+#~ msgid "Byte swap"
+#~ msgstr "Přehození bajtů"
+
+#~ msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+#~ msgstr "Přehození bajtů systémů souborů není zabudováno v této verzi e2fsck\n"
+
+#~ msgid "Incompatible options not allowed when byte-swapping.\n"
+#~ msgstr "PÅ™i pÅ™ehození bajtů nejsou dovoleny nekompatibilní pÅ™epínaÄe.\n"
+
+#~ msgid "%s: Filesystem byte order already normalized.\n"
+#~ msgstr "%s: Pořadí bajtů systému souborů již normalizováno.\n"
+
+#~ msgid "invalid starting block - %s"
+#~ msgstr "Å¡patný poÄáteÄní blok – %s"
+
+#~ msgid "Note: This is a byte-swapped filesystem\n"
+#~ msgstr "Poznámka: Tento systém souborů má přehozené bajty\n"
+
+#~ msgid ""
+#~ "Filesystem too large. No more than 2**31-1 blocks\n"
+#~ "\t (8TB using a blocksize of 4k) are currently supported."
+#~ msgstr ""
+#~ "Souborový systém je příliÅ¡ velký. V souÄasnosti není podporováno více jak\n"
+#~ "\t2**31-1 bloků (8 TB při 4k blocích)."
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: some 2.4 kernels do not support blocksizes greater than 4096\n"
+#~ "\tusing ext3. Use -b 4096 if this is an issue for you.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Varování: některá jádra z řady 2.4 nepodporují na ext3 bloky větší než 4096\n"
+#~ "\tJe-li to váš případ, použijte „-b 4096“.\n"
+#~ "\n"
+
+#~ msgid "Warning: %d-byte inodes not usable on older systems\n"
+#~ msgstr "Varování: %dbajtové iuzly nejsou na starších systémech použitelné\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "The filesystem already has sparse superblocks disabled.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Systém souborů již má řídké superbloky zakázány.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Sparse superblock flag cleared. %s"
+#~ msgstr ""
+#~ "\n"
+#~ "Příznak řídkých superbloků vymazán. %s"
+
+#~ msgid "Clone duplicate/bad blocks"
+#~ msgstr "Klonovat duplikátní/špatné bloky"
+
+#~ msgid ""
+#~ "\n"
+#~ "This inconsistency can not be fixed with e2fsck; to fix it, use\n"
+#~ "dumpe2fs -b to dump out the bad @b list and e2fsck -L filename\n"
+#~ "to read it back in again.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Tuto nekonzistenci nelze opravit pomocí e2fsck; opravte ji použitím\n"
+#~ "dumpe2fs -b pro výpis seznamu špatných bloků a e2fsck -L jménosouboru\n"
+#~ "pro jeho opÄ›tovné naÄtení.\n"
+
+#~ msgid "Error allocating @a @b %b. "
+#~ msgstr "Chyba při alokaci bloku rozšířených atributů %b. "
+
+#~ msgid ""
+#~ "Duplicate @bs found... invoking duplicate @b passes.\n"
+#~ "Pass 1B: Rescan for duplicate/bad @bs\n"
+#~ msgstr ""
+#~ "Nalezeny duplikátní bloky… spouštím průchody pro duplikátní bloky.\n"
+#~ "Průchod 1B: Opětovné hledání duplikovaných/špatných bloků\n"
+
+#~ msgid "Duplicate/bad @b(s) in @i %i:"
+#~ msgstr "Duplikovaný/špatný blok(y) v inode %i:"
+
+#~ msgid "Forcibly clearing HTREE flag on @i %d (%q). (Beta test code)\n"
+#~ msgstr "Vynuceně mažu příznak HTREE v inode %d (%q). (Kód v beta testování)\n"
+
+#~ msgid ""
+#~ "%8d blocks used (%d%%)\n"
+#~ "%8d bad blocks\n"
+#~ msgstr ""
+#~ "%8d použitých bloků (%d%%)\n"
+#~ "%8d špatných bloků\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%8d regular files\n"
+#~ "%8d directories\n"
+#~ "%8d character device files\n"
+#~ "%8d block device files\n"
+#~ "%8d fifos\n"
+#~ "%8d links\n"
+#~ "%8d symbolic links (%d fast symbolic links)\n"
+#~ "%8d sockets\n"
+#~ "--------\n"
+#~ "%8d files\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%8d obyÄejných souborů\n"
+#~ "%8d adresářů\n"
+#~ "%8d souborů znakových zařízení\n"
+#~ "%8d souborů blokových zařízení\n"
+#~ "%8d fifo\n"
+#~ "%8d odkazů\n"
+#~ "%8d symbolických odkazů (%d rychlých symbolických odkazů)\n"
+#~ "%8d socketů\n"
+#~ "--------\n"
+#~ "%8d souborů\n"
+
+#~ msgid "done \n"
+#~ msgstr "hotovo \n"
+
+#~ msgid "during seek on block %d"
+#~ msgstr "při posunu na blok %d"
+
+#~ msgid "Initializing random test data\n"
+#~ msgstr "Inicializuji náhodná testovací data\n"
+
+#~ msgid "bad blocks range: %lu-%lu"
+#~ msgstr "špatný rozsah bloků: %lu-%lu"
+
+#~ msgid " thisoff block fs_blk_sz blksz grp last_mount\n"
+#~ msgstr " tentopos blok fs_blk_sz blksz grp last_mount\n"
+
+#~ msgid "(unknown os)"
+#~ msgstr "(neznámý os)"
+
+#~ msgid ""
+#~ "Usage: %s <dev1> <dev2> <dev3>\n"
+#~ "\n"
+#~ "This program prints out the partition information for a set of devices\n"
+#~ "A common way to use this program is:\n"
+#~ "\n"
+#~ "\t%s /dev/hda?\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Použití: %s <zař1> <zař2> <zař3>\n"
+#~ "\n"
+#~ "Tento program vytiskne informace o oddílech pro sadu zařízení\n"
+#~ "Obvyklý způsob použití tohoto programu je:\n"
+#~ "\n"
+#~ "\t%s /dev/hda?\n"
+#~ "\n"
+
+#~ msgid "Number of free blocks: %d/%d, Needed: %d\n"
+#~ msgstr "PoÄet volných bloků: %d/%d, PotÅ™eba: %d\n"
+
+#~ msgid "Going into desperation mode for block allocations\n"
+#~ msgstr "Přecházím do zoufalého režimu alokace bloků\n"
+
+#~ msgid "Moving %d blocks %u->%u\n"
+#~ msgstr "Přesouvám %d bloků %u->%u\n"
+
+#~ msgid "ino=%u, blockcnt=%lld, %u->%u\n"
+#~ msgstr "ino=%u, poÄetbloků=%lld, %u->%u\n"
+
+#~ msgid "Inode moved %u->%u\n"
+#~ msgstr "Iuzel přesunut %u->%u\n"
+
+#~ msgid "Inode translate (dir=%u, name=%.*s, %u->%u)\n"
+#~ msgstr "Překlad inode (adr=%u, název=%.*s, %u->%u)\n"
+
+#~ msgid "Itable move group %d block %u->%u (diff %d)\n"
+#~ msgstr "Přesun itable skupina %d blok %u->%u (rozdíl %d)\n"
+
+#~ msgid "%d blocks of zeros...\n"
+#~ msgstr "%d bloků nul…\n"
+
+#~ msgid "Inode table move finished.\n"
+#~ msgstr "PÅ™esun tabulky inode dokonÄen.\n"
+
+# FIXME: unlocalizable
+#~ msgid "%8d large file%s\n"
+#~ msgstr "%8d velkých souborů%s\n"
diff --git a/po/da.gmo b/po/da.gmo
new file mode 100644
index 0000000..be8c624
--- /dev/null
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
new file mode 100644
index 0000000..bf44f21
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,8287 @@
+# E2fsprogs translation template file
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+# by Theodore Ts'o
+# This file is distributed under the same license as the e2fsprogs package.
+# Theodore Ts'o <tytso@mit.edu>, 2012.
+# Joe Hansen <joedalton2@yahoo.dk>, 2012, 2014, 2015, 2016, 2017.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.44.3-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2018-08-12 22:00+0200\n"
+"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
+"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Ugyldig blok %u uden for interval; ignoreret\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "under tilregnelighedskontrol af de ugyldige blokkes iknude"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "under læsning af de ugyldige blokkes iknude"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "under åbning af %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "under popen af »%s«"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "under læsning i liste over ødelagte blokke fra fil"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "under opdatering af ødelagt blok-iknude"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Advarsel: Ugyldig blok %u fundet i ødelagt blok-iknude. Ryddet.\n"
+
+#: e2fsck/dirinfo.c:331
+msgid "while freeing dir_info tdb file"
+msgstr "under frigørelse af dir_info-fil"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Fejl ved læsning af blok %lu (%s) mens %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Fejl ved læsning af blok %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignorer fejl"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Fremtving genskrivning"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Fejl ved skrivning af blok %lu (%s) mens %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Fejl ved skrivning af blok %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "tomme mappeblokke"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "tomt mappekort"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Tom mappeblok %u (#%d) i iknude %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s filnavn nblockes blokstørrelse\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Ugyldigt antal blokke!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Kunne ikke allokere blokmellemlager (size=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "udvid genbygning af fil-iknudekort"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Brug: %s disk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "BLKFLSBUF ioctl er ikke understøttet! Kan ikke tømme mellemlagre.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Brug: %s [-F] [-I inode_buffer_blocks] enhed\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "under åbning af %s for tømning"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "under forsøg på at tømme %s"
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr "under åbning af »%s«"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr "under åbing af iknudeskanning"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr "under indhentelse af tekstiknude"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u iknuder skannet.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "læsning af journal superblok\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: ingen gyldig journal superblok fundet\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journal for kort\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: genskaber journal\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: udfører ikke journalgendannelse når skrivebeskyttet\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "under forsøg på at genåbne %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "audvidet attribut"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Afejlallokering"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ckomprimer"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cer i konflikt med nogle andre filsystemblokke"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dmappe"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dslettet"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "epost"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e »%Dn« i %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "ffilsystem"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Ffor @i %i (%Q) er"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggruppe"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE @d @i"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iiknude"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iillegal"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "ltabt+fundet"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Ler en henvisning"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mmultiplicere-krævet"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nugyldig"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oforældreløs"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblem i"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qkvota"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rroot @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sbør være"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+# kunne måske også være: løstliggende
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "uikke forbundet"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "venhed"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xudvid"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "znul-længde"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<NULL-iknuden>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<De ugyldige blokkes iknude>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<Brugerkvotaens iknude>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<Gruppekvotaens iknude>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Opstartsindlæserens iknude>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Fortryd mappe-iknuden"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Gruppebeskriver-iknuden>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<Journalens iknude>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Reserveret iknude 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Reserveret iknude 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "regulær fil"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "mappe"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "tegnenhed"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "blokenhed"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "navngivet datakanal"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "symbolsk henvisning"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "sokkel"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "ukendt filtype med tilstand 0%o"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "indirekte blok"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "dobbelt indirekte blok"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "tredobbelt indirekte blok"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "oversættterblok"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "blok #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "bruger"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "gruppe"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "projekt"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "ukendt kvotatype"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "forøg hævdede iknudekort"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "intern fejl: kan ikke finde dup_blk for %llu\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "returneret fra clone_file_block"
+
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "intern fejl: kunne ikke slå EA-blokpost op for %llu"
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "intern fejl: kunne ikke slå EA-iknudepost op for %u"
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "under hashing af post med e_Value_inum = %u"
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr "læser mappeblok"
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr "i brug-iknudekort"
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr "mappe-iknudekort"
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr "regulær fil-iknudekort"
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr "i brug-blokkort"
+
+#: e2fsck/pass1.c:1262
+msgid "metadata block map"
+msgstr "metadatablokkort"
+
+#: e2fsck/pass1.c:1324
+msgid "opening inode scan"
+msgstr "Ã¥bner iknudeskanning"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr "henter næste iknude fra skanning"
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "Gennemløb 1"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "læser indirekte blokke for iknude %u"
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr "ugyldig iknudekort"
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr "iknude i ugyldig blokkort"
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr "imagic-iknudekort"
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr "forøg hævdet blokkort"
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): forventer %6lu fik phys %6lu (blkcnt %lld)\n"
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr "blok-bitmap"
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr "iknude-bitmap"
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr "iknudetabel"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "Gennemløb 2"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "Kan ikke fortsætte."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "iknude færdig bitmap"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Tophukommelse"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Gennemløb 3"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "iknude-loopdetektionsbitmap"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "Gennemløb 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Gennemløb 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Hukommelsesallokeringsfejl"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Hukommelsesallokeringsfejl"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(ingen prompt)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Ret"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Ryd"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Realloker"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Alloker"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Udvid"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Forbind til /mistet+fundet"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Opret"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Red"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Afkort"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Ryd iknude"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Afbryd"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Opdel"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Fortsæt"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Klon blokke krævet af flere"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Slet fil"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Undertryk beskeder"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr ""
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Ryd HTree-indeks"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Genskab"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(INGEN)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "RETTET"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "RYDDET"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "REALLOKERET"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ALLOKERET"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "UDVIDET"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "GENFORBUNDET"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "OPRETTET"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "REDDET"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "AFKORTET"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "IKNUDE RYDDET"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "AFBRUDT"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "OPDEL"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "FORTSÆTTER"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "BLOKKE EJET AF FLERE KLONET"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "FIL SLETTET"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "UNDERTRYKT"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "HENVISNING FJERNET"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE-INDEKS RYDDET"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "VIL GENSKABE"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "blokbitmap for gruppe %g er ikke i gruppe. (blok %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "iknude-bitmap for gruppe %g er ikke i gruppe. (blok %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"iknude-tabel for gruppe %g er ikke i gruppe. (blok %b)\n"
+"ADVARSEL: ALVORLIG DATATAB KAN OPSTÃ….\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Superblokken kunne ikke læses eller beskriver ikke et gyldigt ext2/ext3/"
+"ext4-\n"
+"filsystem. Hvis enheden er gyldig og den indeholder et ext2/ext3/ext4-"
+"filsystem\n"
+"(og ikke swap eller ufs eller noget andet), så er superblokken korrupt,\n"
+"og du kan forsøge at køre e2fsck med en alternativ superblok:\n"
+" e2fsck -b 8193 <@v>\n"
+" eller\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Filsystemets størrelse (jævnfør superblokken) er %b blokke\n"
+"Den fysiske størrelse for enheden er %c blokke\n"
+"Sandsynligvis er enten superblokken eller partitionstabellen ødelagt!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"superblok blok_størrelse = %b, fragstr. = %c.\n"
+"Denne version af e2fsck understøtter ikke fragmentstørrelser, der er\n"
+"forskellige fra blokstørrelsen.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "Superblok blokke_per_gruppe = %b, skulle have været %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "@S first_data_@b = %b, skulle have været %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f havde ikke en UUID; oprette en.\n"
+"\n"
+
+#: e2fsck/problem.c:167
+#, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Bemærk: Hvis flere iknude- eller blok-bitmapblokke eller dele\n"
+"af iknude-tabellen kræver ny placering, så kan du prøve at\n"
+"køre e2fsck med tilvalget »-b %S« først. Problemet er måske\n"
+"kun i den prmære blokgruppes beskrivere, og sikkerhedskopiens\n"
+"blokgruppebeskrivere kan være o.k.\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Korruption fundet i @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Fejl under bestemmelse af størrelsen på den fysiske @v: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "iknude-antal i superblok er %i, skal være %j.\n"
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd'en understøtter ikke filtypefunktionen.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "superblokken har en ugyldig journal (iknude %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Ekstern journal har flere filsystembrugere (ikke understøttet).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr "Kan ikke finde @j\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr "Ekstern @j har ugyldig @S\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr "Ekstern @j understøtter ikke dette @f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+msgid "@j @S is corrupt.\n"
+msgstr "@j @S er ødelagt.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "superbloks has_journal-flag er ryddet, men en journal er til stede.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+"superbloks needs_recovery-flag er angivet, men ingen journal er til stede.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "superbloks needs_recovery-flag er ryddet, men journal har data.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr "Ryd @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "filsytem har funktionsflag angivet, men er et revision 0-filsystem."
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr ""
+"%s forældreløs iknude %i (uid=%Iu, gid=%Ig, tilstand=%Im, størrelse=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "illegal %B (%b) fundet i forældreløs iknude %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Allerede ryddet %b (%b) fundet i forældreløs iknude %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "Illegal forældeløs iknude %i i superblok.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Illegal iknude %i i forældreløs iknudeliste.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+"Journalsuperblok har et ukendt skrivebeskyttet funktionsflag angivet.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"Journalsuperblok har et ukendt og ikke kompatibelt funktionsflag angivet.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Journalversion er ikke understøttet af denne e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Flytter @j fra /%s til skjult @i.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Fejl under flytning af journal: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Fandt ugyldig V2-journalsuperblokfelter (fra V1-journal).\n"
+"Rydder felter efter V1-journalsuperblokken ...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr "Kør journal alligevel"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"Gendannelsesflag er ikke angivet i sikkerhedskopien superblok, så kører "
+"journal alligevel.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr "Laver sikkerhedskopi af journalens iknude-blokinformation.\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Filsystemet har ikke resize_inode aktiveret, men s_reserved_gdt_blocks\n"
+"er %N; skal være nul."
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode er ikke aktiveret, men resize-iknude er non-zero. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+msgid "Resize @i not valid. "
+msgstr "Resize-iknude er ikke gyldig. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Superbloks sidste monteringstidspunkt (%t,\n"
+"\tnu = %T) er i fremtiden.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Superblok-fif for ekstern superblok skal være %X."
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Tilføjer dirhash-fif til filsystemet.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Gruppebeskriver %g's kontrolsum er %04x, skal være %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+"Gruppebeskriver %g markeret som ikke initialiseret uden funktionssæt.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "gruppebeskriver %g har ugyldig ubrugt iknudeantal %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr "Sidste gruppeblokbitmap er ikke initialiseret. "
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Journaltransaktion %i var ødelagt, genafspilning blev afbrudt.\n"
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Flaget test_fs er angivet (og ext2 er tilgængelig). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "En eller flere blokgruppebeskriveres kontrolsummer er ugyldige. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Angiver frit iknudeantal til %j (var %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Angiver frit blokantal til %c (var %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Skjuler %U kvota-iknude %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+msgid "@S has invalid MMP block. "
+msgstr "@S har ugyldig MMP-blok. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr "superblok har ugyldig MMP-magi. "
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+"superblok metadata_csum efterfølger uninit_bg; begge funktionsbit kan ikke "
+"være angivet samtidig."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+msgid "@S MMP @b checksum does not match. "
+msgstr "superblok MMP-blokkens kontrolsum matcher ikke. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+"superblok 64-bit filsystemer kræver udvidelser for at tilgå hele disken. "
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg er for stor. (%N, maks. værdi %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+msgid "External @j @S checksum does not match @S. "
+msgstr "Ekstern kontrolsum for journalsuperblok matcher ikke superblok. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "superblok metadata_csum_seed er ikke nødvendig uden metadata_csum."
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+"Fejl under initialisering af kvotakontekst i understøttelsesbibliotek: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Ugyldig krævet ekstra isize i superblok (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Ugyldig ønsket ekstra isize i superblok (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+msgid "Invalid %U @q @i %i. "
+msgstr "Ugyldig %U kvota iknude %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr "superblok ville have for mange iknuder (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Gennemløb 1: Kontrollerer iknuder, blokke og størrelser\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr "rod-iknude er ikke en mappe. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+"rot-iknude har dtime angivet (sandsynligvis på grund af gammel mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Reserveret iknude %i (%Q) har ugyldig tilstand. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "slettet iknude %i har nul dtime. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "iknude %i er i brug, men har dtime angivet. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "iknude %i er en nulængde mappe. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+"gruppe %g's blok-bitmap på %b er i konflikt med nogle andre fs-blokke.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+"gruppe %g's iknude-bitmap på %b er i konflikt med nogle andre fs-blokke.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+"gruppe %g's iknude-tabel på %b er i konflikt med nogle andre fs-blokke.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "gruppe %g's blok-bitmap (%b) er ugyldig. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "gruppe %g's iknude-bitmap (%b) er ugyldig. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "iknude %i, i_size er %Is, skal være %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "iknude %i, i_blocks er %Ib, skal være %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+msgid "@I %B (%b) in @i %i. "
+msgstr "Illegal %B (%b) i iknude %i."
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) overlapper filsystemmetadata i iknude %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "iknude %i har illegale blokke. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "For mange illegale blokke i iknude %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "illegal %B (%b) i ugyldig blok-iknude. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Ugyldig blok-iknude har illegale blokke. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr ""
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+"Blok %b i de primære gruppebeskrivere er på listen med ugyldige blokke\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Advarsel: Gruppe %gs superblok (%b) er ugyldig.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+"Advarsel: Gruppe %gs kopi af gruppebeskriverne har en ugyldig blok (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+"Programmeringsfejl? blok #%b reserveret uden årsag i process_bad_block.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Flytter gruppen %g's %s fra %b til %c ...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Flytter gruppen %g's %s til %c ...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Advarsel: kunne ikke læse blok %b for %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Advarsel: kunne ikke skrive blok %b for %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr "der opstod en fejl under allokering af iknude-bitmap (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+msgid "@A @b @B (%N): %m\n"
+msgstr "der opstod en fejl under allokering af blok-bitmap (%n): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr ""
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Der opstod en fejl under læsning af iknude %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "iknude %i har magisk flag angivet. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Speciel (enhed/sokkel/fifo/symbolsk_henvisning) fil (iknude %i) har "
+"uforanderlig\n"
+"eller tilføj-kun flag angivet. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+"Speciel (enhed/sokkel/fifo) iknude %i har en størrelse forskellig fra nul. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+msgid "@j @i is not in use, but contains data. "
+msgstr "journal-iknude er ikke i brug, men indeholder data. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr "journal er ikke en normal fil. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "iknude %i var en del af den forældreløse iknudeliste. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+"iknuder som var del af en ødelagt forældeløs lænket liste blev fundet. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+msgid "@A refcount structure (%N): %m\n"
+msgstr "der opstod en fejl under allokering af refcount-struktur (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+msgid "Error reading @a @b %b for @i %i. "
+msgstr ""
+"Der opstod en fejl under læsning af udvidet attributblok %b for iknude %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+msgid "@i %i has a bad @a @b %b. "
+msgstr "iknude %i har en ugyldig udvidet attributblok %b. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+msgid "Error reading @a @b %b (%m). "
+msgstr "Der opstod en fejl under læsning af udvidet attributblok %b (%m)."
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "udvidet attributblok %b har referenceantal %r, skal være %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+msgid "Error writing @a @b %b (%m). "
+msgstr "Der opstod en fejl under skrivning af udvidet attributblok %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "udvidet attributblok %b har h_blokke > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+msgid "@A @a region allocation structure. "
+msgstr ""
+"der opstod en fejl under allokering af udvidet attributstruktur for "
+"regionallokering. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "udvidet attributblok %b er ødelagt (allokeringskollision). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "udvidet attributblok %b er ødelagt (ugyldigt navn). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "udvidet attributblok %b er ødelagt (ugyldig værdi). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr "iknude %i er for stor. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) medfører at mappe er for stor."
+
+#: e2fsck/problem.c:854
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) medfører at fil er for stor. "
+
+#: e2fsck/problem.c:859
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) medfører at symbolsk henvisning er for stor. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+"iknude %i har flaget INDEX_FL angivet på filsystem uden htree-"
+"understøttelse.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "iknude %i har flaget INDEX-FL angivet, men er ikke en mappe.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "HTREE-mappe-iknude %i har en ugyldig root-knde.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "HTREE-mappe-iknude %i har en ikke understøttet hash-version (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "HTREE-mappe-iknude %i har en trædybde (%N) som er for stor\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Ugyldig blok-iknude har en indirekte blok (%b) som er i konflikt med\n"
+"filsystemets metadata."
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Ændring af størrelse for iknude (gen)skabelse mislykkedes: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "iknude %i har en ekstra størrelse (%IS) som er ugyldig\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "udvidet attribut i iknude %i har en namelen (%N) som er ugyldig\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr ""
+"udvidet attribut i iknude %i har en værdiforskydning (%N) som er ugyldig\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr ""
+"udvidet attribut i iknude %i har en værdiblok (%N) som er ugyldig (skal være "
+"o)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr ""
+"udvidet attribut i iknude %i har en værdistørrelse (%N) som er ugyldig\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr ""
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "iknude %i er en %It men ligner egentlig en mappe.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr ""
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr ""
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Der opstod en fejl under konvertering af underklyngeblokbitmap: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+msgid "@q @i is not a regular file. "
+msgstr "kvotaiknude er ikke en normal fil. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+msgid "@q @i is not in use, but contains data. "
+msgstr "kvotaiknude er ikke i brug, men indehoder data. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+msgid "@q @i is visible to the user. "
+msgstr "Iknudens kvota er synlig for brugeren. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+msgid "The bad @b @i looks @n. "
+msgstr "Den ugyldige blok-iknude virker invalid. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"iknude %i har nullængdeomfang\n"
+"\t(ugyldig logisk blok %c, fysisk blok %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "iknude %i ser ud til at indhold bras. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "Iknude %i består kontroller, men kontrolsum matcher ikke iknude. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "iknuden %i's udvidet attribut er ødelagt (allokeringskollision). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+"iknude %i har flaget INLINE_DATA_FL angivet på filsystem uden indlejret "
+"dataunderstøttelse.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr ""
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr ""
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr ""
+"iknude %i har flaget INLINE_DATA_FL angivet, men udvidet attribut blev ikke "
+"fundet. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Speciel (enhed/sokkel/fifo) fil (iknude %i) har extents\n"
+"eller indlejret-data flag angivet. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+msgid "@A @x region allocation structure. "
+msgstr ""
+"der opstod en fejl under allokering af extent-struktur for "
+"regionallokering. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+"der opstod en fejl under allokering af hukommelse for krypteret mappeliste\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "iknude %i har et ødelagt extent-teksthoved. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "iknude %i har en illegal udvidet attributværdi-iknude %N\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+"iknude %i har ugyldig udvidet attribut. EA-iknude %N mangler EA_INODE-flag.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr ""
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr ""
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr ""
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Kunne ikke klone fil: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Gennemløb 1E: Optimerer extent-træer\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Kunne ikke optimere extent-træ %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+msgid "Optimizing @x trees: "
+msgstr "Optimerer extent-træer: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Intern fejl: maks. extent-trædybde er for stor (%b; forventede=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "iknude %i extent-træ (på niveau %b) kunne være kortere. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "iknude %i extent-træ (på niveau %b) kunne være smallere. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Gennemløb 2: Kontrollerer mappestruktur\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "ugyldig iknudenummer for ».« i mappeiknude %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+msgid "@E has @n @i #: %Di.\n"
+msgstr "posten »%Dn« i %p (%i) har ugyldig iknude #: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+msgid "@E has @D/unused @i %Di. "
+msgstr "posten »%Dn« i %p (%i) har slettet/ubrugt iknude %Di."
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr "posten »%Dn« i %p (%i) er en henvisning til ».«"
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+"posten »%Dn« i %p (%i) peger på iknude (%Di) placeret i en ugyldig blok.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "posten »%Dn« i %p (%i) er en henvisning til mappen %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr "posten »%Dn« i %p (%i) er en henvisning til root-iknuden.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr "posten »%Dn« i %p (%i) har illegale tegn i sit navn.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Mangler ».« i mappe-iknude %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Mangler »..« i mappe-iknude %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Første post »%Dn« (iknude=%Di) i mappe-iknude %i (%p) skal være ».«\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Anden post »%Dn« (iknude=%Di) i mappe-iknude %i skal være ».«\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr for iknude %i (%Q) er %IF, skal være nul.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl for iknude %i (%Q) er %If, skal være nul.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high for iknude %i (%Q) er %Id, skal være nul.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag for iknude %i (%Q) er %N, skal være nul.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize for iknude %i (%Q) er %N, skal være nul.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "iknude %i (%Q) har ugyldig tilstand (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "mappe-iknude %i, %B, forskydning %N: mappe ødelagt\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "mappe-iknude %i, %B, forskydning %N: filnavn er for langt\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+msgid "@d @i %i has an unallocated %B. "
+msgstr "mappe-iknude %i har en uallokeret %B."
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "».«-mappepost i mappe-iknude %i er ikke NUL-afsluttet\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "»..«-mappepost i mappeiknude %i er ikke NUl-afsluttet\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "iknude %i (%Q) er en illegal tegnenhed.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "iknude %i (%Q) er en illegal blokenhed.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+msgid "@E is duplicate '.' @e.\n"
+msgstr "posten »%Dn« i %p (%i) er en duplikeret ».«-post.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr "posten »%Dn« i %p (%i) er en duplieret »..«-post\n"
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Intern fejl: kunne ikke finde dir_info for %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "posten »%Dn« i %p (%i) har rec_len for %Dr, skal være %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "der opstod en fejl under allokering af icount-struktur: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Der opstod en fejl under gennemløb over mappeblokke: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Der opstod en fejl under læsning af mappeblok %b (iknude %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Der opstod en fejl under skrivning af mappeblok %b (iknude %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+"Der opstod en fejl under allokering af ny mappeblok for iknude %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Der opstod en fejl under deallokering af iknude %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "mappepost for ».« i %p (%i) er stor.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "iknude %i (%Q) er en illegal FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "iknude %i (%Q) er en illegal sokkel.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Angiver filtype for posten »%Dn« i %p (%i) til %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr ""
+"posten »%Dn« i %p (%i) har en forkert filtype (var %Dt, skal være %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr "posten »%Dn« i %p (%i) har filtypesæt.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+msgid "@E has a @z name.\n"
+msgstr "posten »%Dn« i %p (%i) har et nullængde navn.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symbolsk henvisning %Q (iknude #%i) er ugyldig.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+msgid "@p @h %d: %B not referenced\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+msgid "@p @h %d: %B referenced twice\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+msgid "@n @h %d (%q). "
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "problem i HTREE-mappens iknude %d: %B har ugyldigt antal (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "problem i HTREE-amappens iknude %d: %B har en uordnet hashtabel\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "mappe-iknude %i, %B, forskydning %N: mappe har ingen kontrolsum.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Rettelse af størrelsen for indlejret mappe-iknude %i mislykkedes.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr "Krypteret post »%Dn« i %p (%i) er for kort.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Gennemløb 3: Kontrollerer mappeforbindelse\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr "Root-iknude er ikke allokeret. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr "Ingen plads i mappen lost+found."
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr ""
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr ""
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr ""
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Kunne ikke udvide /lost+found: %m\n"
+
+#: e2fsck/problem.c:1731
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Kunne ikke genforbinde %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Der opstod en fej under forsøget på at finde /lost+found: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_ny_blok: %m under forsøg på at oprette mappen /lost+found\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m under oprettelse af ny mappeblok\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr ""
+"ext2fs_write_dir_block: %m under skrivning af mappeblokken for /lost+found\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Fejl under justering af iknude-antal på iknude %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Der opstod en fejl under oprette af rodmappe (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Fejl under oprettelse af /@l @d (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r er ikke en @d; afbryder.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr "Kan ikke fortsætte uden en @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l er ikke en @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+msgid "/@l is encrypted\n"
+msgstr "/lost+found er krypteret\n"
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Gennemløb 3A: Optimerer mapper\n"
+
+#: e2fsck/problem.c:1838
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Kunne ikke oprette dirs_to_hash-iterator: %m\n"
+
+#: e2fsck/problem.c:1843
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Kunne ikke optimere mappe %q (%d): %m\n"
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "Optimerer mapper: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Gennemløb 4: Kontrollerer referenceantal\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, c-format
+msgid "@u @z @i %i. "
+msgstr "ikke forbundet nullængde iknude %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr "ikke forbundet iknude %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "iknude %i ref-antal er %Il, skal være %n. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "udvidet attribut-iknude %i ref-antal er %N, skal være %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+"mappe overstiger maks. henvisninger, men ingen DIR_NLINK-funktion er "
+"superblok.\n"
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Gennemløb 5: Kontrollerer resumeinformation for gruppe\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr "forskelle på blokbitmap: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr "forskelle på iknude-bitmap: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1989
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Fejl under kopiering af erstatningsiknude-bitmap: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Fejl under kopiering af erstatningsblok-bitmap: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "gruppe %g blokke i brug men grupper er markeret BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "gruppe %g iknuder i brug men gruppe er markeret INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+msgid "Recreate @j"
+msgstr "Genskab journal"
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr "Opdater kvotainfo for kvotatype %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Fejl ved angivelse af blokgruppens kontrolsumsinfo: %m\n"
+
+#: e2fsck/problem.c:2061
+#, c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Fejl under skrivning af filsysteminfo: %m\n"
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2071
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Fejl under skrivning af kvotainfo for kvotatype %N: %m\n"
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Uhåndteret fejlkode (ox%x)!\n"
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr "IGNORERET"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "i move_quota-inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Anvendt hukommselse: %d, forløbet tid: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "størrelse på iknude=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "under start af iknudeskanning"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "under udførsel af iknudeskanning"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "under kald af ext2fs_block_iterate for iknude %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "under kald af ext2fs_adjust_ea_refcount2 for iknude %u"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Beskærer"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Rydder"
+
+#: e2fsck/unix.c:77
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+
+#: e2fsck/unix.c:88
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:162
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u iknude brugt (%2.2f%%, ud af %u)\n"
+msgstr[1] ""
+"\n"
+"%12u iknuder brugt (%2.2f%%, ud af %u)\n"
+
+#: e2fsck/unix.c:166
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u ikketilgrænsende fil (%0d.%d%%)\n"
+msgstr[1] "%12u ikketilgrænsende filer (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:171
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u ikketilgrænsende mappe (%0d.%d%%)\n"
+msgstr[1] "%12u ikketilgrænsende mapper (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:176
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " # af iknuder med ind/dind/tind-blokke: %u/%u/%u\n"
+
+#: e2fsck/unix.c:184
+msgid " Extent depth histogram: "
+msgstr " Udvid dybdehistogram: "
+
+#: e2fsck/unix.c:193
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu blok brugt (%2.2f%%, ud af %llu)\n"
+msgstr[1] "%12llu blokke brugt (%2.2f%%, ud af %llu)\n"
+
+#: e2fsck/unix.c:197
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u ugyldig blok\n"
+msgstr[1] "%12u ugyldige blokke\n"
+
+#: e2fsck/unix.c:199
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u stor fil\n"
+msgstr[1] "%12u store filer\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u normal fil\n"
+msgstr[1] ""
+"\n"
+"%12u normale filer\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u mappe\n"
+msgstr[1] "%12u mapper\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u tegnenhedsfil\n"
+msgstr[1] "%12u tegnenhedsfiler\n"
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u blokenhedsfil\n"
+msgstr[1] "%12u blokenhedsfiler\n"
+
+#: e2fsck/unix.c:210
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifo'er\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u henvisning\n"
+msgstr[1] "%12u henvisninger\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u symbolsk henvisning"
+msgstr[1] "%12u symbolske henvisninger"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u hurtig symbolsk henvisning)\n"
+msgstr[1] " (%u hurtige symbolske henvisninger)\n"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u sokkel\n"
+msgstr[1] "%12u sokler\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fil\n"
+msgstr[1] "%12u filer\n"
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "under bestemmelse af hvorvidt %s er monteret."
+
+#: e2fsck/unix.c:258
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Advarsel! %s er monteret.\n"
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Advarsel! %s er i brug.\n"
+
+#: e2fsck/unix.c:267
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s er monteret.\n"
+
+#: e2fsck/unix.c:269
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s er i brug.\n"
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Kan ikke fortsætte, afbryder.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"ADVARSEL!!! Filsystemet er monteret. Hvis du fortsætter så ***VIL***\n"
+"du påføre ***ALVORLIG*** skade på filsystemet.\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Ønsker du virkelig at fortsætte"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "kontrol afbrudt.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr " indeholder et filsytem med fejl"
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr " var ikke ordenlig afmonteret"
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr " primære superblokfunktioner er forskellige fra sikkerhedskopi"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " er blevet monteret %u gange uden at blive kontrolleret"
+
+#: e2fsck/unix.c:389
+msgid " has filesystem last checked time in the future"
+msgstr " har datoen for sidste kontrol af filsystemet ude i fremtiden"
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " er ikke blevet kontrolleret i %u dage"
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr ", tvungen kontrol.\n"
+
+#: e2fsck/unix.c:442
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: ren, %u/%u filer, %llu/%llu blokke"
+
+#: e2fsck/unix.c:462
+msgid " (check deferred; on battery)"
+msgstr " (kontrol udskudt; på batteri)"
+
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (kontrol efter næste montering)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kontroller om %ld monteringer)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "FEJL: Kunne ikke åbne /dev/null (%s)\n"
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr "Ugyldig EA-version.\n"
+
+#: e2fsck/unix.c:701
+msgid "Invalid readahead buffer size.\n"
+msgstr ""
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Ukendt udvidet tilvalg: %s\n"
+
+#: e2fsck/unix.c:758
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaksfejl i e2fsck-konfigurationsfilen (%s, linje #%d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Der opstod en fejl under validering af filbeskriver %d: %s\n"
+
+#: e2fsck/unix.c:860
+msgid "Invalid completion information file descriptor"
+msgstr "Ugyldig filbeskriver for fuldførelsesinformation"
+
+#: e2fsck/unix.c:875
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Kun en af tilvalgene -p/-a, -n eller -y må angives."
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Tilvalget -t er ikke understøttet på denne version af e2fsck.\n"
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Kan ikke løse »%s«"
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr "Tilvalgene -n og -D er ikke kompatible."
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr "Tilvalgene -n og -D er ikke kompatible."
+
+#: e2fsck/unix.c:994
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Tilvalgene -n og -l/-L er ikke kompatible."
+
+#: e2fsck/unix.c:1018
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Tilvalgene -D og -E fixes_only er ikke kompatible."
+
+#: e2fsck/unix.c:1024
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Tilvalgene -E bmap2extent og fixes_only er ikke kompatible."
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Tilvalgene -c og -l/-L må ikke bruges på samme tid.\n"
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG »%s« er ikke et heltal\n"
+"\n"
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Ugyldig ikke-numerisk argument for -%c (»%s«)\n"
+"\n"
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+"MMP-interval er %u sekunder og samlet ventetid er %u sekunder. Vent "
+"venligst ...\n"
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+msgid "while checking MMP block"
+msgstr "under kontrol af MMP-blok"
+
+#: e2fsck/unix.c:1259
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Hvis du er sikker på, at filsystemet ikke er i brug på nogen knude, så kør:\n"
+"»tune2fs -f -E clear_mmp %s«\n"
+
+#: e2fsck/unix.c:1275
+msgid "while reading MMP block"
+msgstr "under læsning af MMP-blok"
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Overskrivning af eksisterende filsystem; dette kan fortrydes via "
+"kommandoen:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "under forsøg på at slette %s"
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "under forsøg på at opsætte undo-filen\n"
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Fejl: ext2fs-biblioteksversionen er forældet!\n"
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr "under forsøg på at intialisere program"
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tBruger %s, %s\n"
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr "kræver terminal for interaktive reparationer"
+
+#: e2fsck/unix.c:1508
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s tester sikkerhedskopiblokke ...\n"
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr "Superblok ugyldig,"
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr "Gruppebeskrivere ser ugyldige ud ..."
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s under brug af sikkerhedskopiblokkene"
+
+#: e2fsck/unix.c:1525
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: går tilbage til original superblok\n"
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Filsystemrevisionen er tilsyneladende for høj for denne version af e2fsck.\n"
+"(Eller filsystemets superblok er ødelagt)\n"
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "Kunne dette være en partition med nullængde?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Du skal have %s-adgang til filsystemet eller være root\n"
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Muligvis ikkeeksisterende eller swapenhed?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Filsystem monteret eller åbnes eksklusivt af et andet program?\n"
+
+#: e2fsck/unix.c:1575
+msgid "Possibly non-existent device?\n"
+msgstr "Muligvis ikkeeksisterende enhed?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Disk skrivebeskyttet; brug tilvalget -n for at udføre en\n"
+"skrivebeskyttet kontrol af enheden.\n"
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr "Hent en nyere version af e2fsck!"
+
+#: e2fsck/unix.c:1711
+#, c-format
+msgid "while checking journal for %s"
+msgstr "under kontrol af journal for %s"
+
+#: e2fsck/unix.c:1714
+msgid "Cannot proceed with file system check"
+msgstr "Kan ikke fortsætte uden kontrol af filsystem"
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Advarsel: Udelader journalgendannelse da der kun udføres en skrivebeskyttet "
+"kontrol\n"
+"af filsystemet.\n"
+
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "kan ikke angive superblokflag på %s\n"
+
+#: e2fsck/unix.c:1743
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Kontrolsumfejl for journal fundet i %s\n"
+
+#: e2fsck/unix.c:1747
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Journal ødelagt i %s\n"
+
+#: e2fsck/unix.c:1751
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "under gendannelse af journal for %s"
+
+#: e2fsck/unix.c:1773
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s har funktioner der ikke er understøttet:"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s under læsning af ugyldig blok-iknude\n"
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Dette tyder ikke godt, men vi forsøger at fortsætte ...\n"
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Opretter journal (%d blokke): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr " Færdig.\n"
+
+#: e2fsck/unix.c:1887
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** journal har blevet genskabt ***\n"
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr "afbrudt"
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck afbrudt.\n"
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Genstarter e2fsck fra begyndelsen ...\n"
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr "under nulstilling af kontekst"
+
+#: e2fsck/unix.c:1985
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FILSYSTEMFEJL BLEV RETTET *****\n"
+
+#: e2fsck/unix.c:1987
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: Filsystem blev ændret.\n"
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FILSYSTEMET BLEV ÆNDRET *****\n"
+
+#: e2fsck/unix.c:1996
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** GENSTART SYSTEM *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** ADVARSEL: Filsystemet har stadig fejl **********\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "jJ"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr "aA"
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr " (»a« aktiverer »yes« (ja) for alle) "
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<j>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "afbrudt!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr "ja til alle\n"
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "ja\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "nej\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nej\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ja\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "ja"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "nej"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: ulovlige bitmap-blokke for %s"
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr "læser iknude og blok-bitmap"
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "under forsøg på at læse bitmap igen for %s"
+
+#: e2fsck/util.c:346
+msgid "writing block and inode bitmaps"
+msgstr "skriver blok- og iknudebitmap"
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "under genskrivning af blok- og iknudebitmap for %s"
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: UVENTET UOVERENSSTEMMELSE; KØR fsck MANUELT.\n"
+"\t(dvs., uden tilvalgene -a eller -p)\n"
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Hukommelse brugt: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Hukommelse brugt: %lu, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "tid: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "forløbet tid: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "under læsning af iknude %lu i %s"
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "under skrivning af iknude %lu i %s"
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr "UVENTET UOVERENSSTEMMELSE: filsystemet ændres mens fsck kører.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "færdig \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Brug: %s [-b blokstørrelse] [-i inddatafil] [-o uddatafil] [-svwnfBX]\n"
+" [-c blokke_på_en_gang] [-d forsinkelsesfaktor_mellem_læsninger] [-e "
+"maks_ugyldige_blokke]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" enhed [sidste_blok [første_blok]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Tilvalgene -n og -w udelukker hinanden.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% færdig, %s forløbet. (%d/%d/%d fejl)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Test med vilkårligt mønster: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Tester med mønster 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "under søgning"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Mærkelig værdi (%ld) i do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "under ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "under begyndelsen af gennemløb af listen med ugyldige blokke"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "under allokering af mellemlagre"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Kontroller blokke %lu til %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Kontrollerer for ugyldige blokke i skrivebeskyttet tilstand\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Kontrollerer for ugyldige blokke (skrivebeskyttet test): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "For mange ugyldige blokke, afbryder test\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Kontrollerer for ugyldige blokke i læs-skriv tilstand\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Fra blok %lu til %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Læser og sammenligner: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Kontroller for ugyldige blokke i ikkedestruktiv læs-skriv tilstand\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Kontroller for ugyldige blokke (ikkedestruktiv læs-skriv test)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "under testdataskrivning, blok %lu"
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s er monteret; "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "det er ikke sikkert at køre badblocks!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s er øjensynlig i brug af systemet; "
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr ""
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr "ugyldig %s - %s"
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "kan ikke allokere hukommelse for test_pattern - %s"
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Kun en test_pattern kan angives i skrivebeskyttet tilstand"
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Vilkårlig test_pattern er ikke tilladt i skrivebeskyttet tilstand"
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Kunne ikke bestemme enhedsstørrelse; du må angive\n"
+"størrelsen manuelt\n"
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr "under forsøg på at bestemme enhedsstørrelse"
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr "sidste blok"
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr "første blok"
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr ""
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "ugyldig slutblok (%llu): skal være en 32-bit værdi"
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1347
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Gennemløb færdig, %u ugyldige blokke fundet. (%d/%d/%d fejl)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr "Brug: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] filer ...\n"
+
+#: misc/chattr.c:159
+#, c-format
+msgid "bad project - %s\n"
+msgstr "ugyldigt projekt - %s\n"
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr "ugyldig version - %s\n"
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "under forsøg på at køre stat %s"
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Version for %s sat som %lu\n"
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr "under angivelse af version på %s"
+
+#: misc/chattr.c:271
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Projekt for %s angivet som %lu\n"
+
+#: misc/chattr.c:275
+#, c-format
+msgid "while setting project on %s"
+msgstr "under angivelse af projekt på %s"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Kunne ikke allokere stivariabel i chattr_dir_proc"
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr "= er inkompatibel med - og +\n"
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr "Skal bruge »-v«, =, - eller +\n"
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, c-format
+msgid "while reading inode %u"
+msgstr "under læsning af iknude %u"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+msgid "while expanding directory"
+msgstr "under udvidelse af mappe"
+
+#: misc/create_inode.c:96
+#, c-format
+msgid "while linking \"%s\""
+msgstr "under oprettelse af forbindelse for »%s«"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, c-format
+msgid "while writing inode %u"
+msgstr "under skrivning af iknude %u"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "under visning af attributter for »%s«"
+
+#: misc/create_inode.c:162
+#, c-format
+msgid "while opening inode %u"
+msgstr "under åbning af iknude %u"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+msgid "while allocating memory"
+msgstr "under allokering af hukommelse"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "under læsning af attribut »%s« for »%s«"
+
+#: misc/create_inode.c:213
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "under skrivning af attribut »%s« til iknude %u"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while closing inode %u"
+msgstr "under lukning af iknude %u"
+
+#: misc/create_inode.c:274
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "under allokering af iknude »%s«"
+
+#: misc/create_inode.c:293
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "under oprettelse af iknude »%s«"
+
+#: misc/create_inode.c:359
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "under oprettelse af symbolsk henvisning »%s«"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "under opslag af »%s«"
+
+#: misc/create_inode.c:397
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "under oprettelse af mappe »%s«"
+
+#: misc/create_inode.c:625
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "under åbning af »%s« til kopi"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "under ændring af arbejdsmappe til »%s«"
+
+#: misc/create_inode.c:747
+#, c-format
+msgid "while opening directory \"%s\""
+msgstr "under åbning af mappe »%s«"
+
+#: misc/create_inode.c:757
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "under forsøg på at køre lstat for %s"
+
+#: misc/create_inode.c:808
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "under oprettelse af speciel fil »%s«"
+
+#: misc/create_inode.c:817
+msgid "malloc failed"
+msgstr "malloc mislykkedes"
+
+#: misc/create_inode.c:825
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "under forsøg på at læse henvisning »%s«"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "symbolsk henvisning øget i størrelse mellem lstat() og readlink()"
+
+#: misc/create_inode.c:843
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "under skrivning af symbolsk henvisning »%s«"
+
+#: misc/create_inode.c:854
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "under skrivning af fil »%s«"
+
+#: misc/create_inode.c:867
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "under udarbejdelse af mappe »%s«"
+
+#: misc/create_inode.c:885
+msgid "while changing directory"
+msgstr "under ændring af mappe"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "ignorerer post »%s«"
+
+#: misc/create_inode.c:904
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "under angivelse af iknude for »%s«"
+
+#: misc/create_inode.c:911
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "under angivelse af xattrs for »%s«"
+
+#: misc/create_inode.c:937
+msgid "while saving inode data"
+msgstr "under lagring af iknude-data"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+"Brug: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] enhed\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blokke"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "klynger"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Gruppe %lu: (Blokke "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " csum 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (FORVENTEDE 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s superblok ved "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primær"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Sikkerhedskopi"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Gruppebeskrivere på "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Reserveret GDT-blokke på "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Gruppebeskrivere på "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Blokbitmap på "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr " csum 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Iknude-bitmap ved "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Frie blokke: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Frie iknuder: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Ugyldige blokke: %u"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr "under læsning af journals superblok"
+
+#: misc/dumpe2fs.c:392
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Journals magiske numre for superblok er ugyldige!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "under læsning af journalsuperblok"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Kunne ikke finde journals magiske numre for superblok"
+
+#: misc/dumpe2fs.c:468
+msgid "failed to alloc MMP buffer\n"
+msgstr "mislykkedes i at allokere MMP-mellemlager\n"
+
+#: misc/dumpe2fs.c:479
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "læser MMP-blok %llu fra »%s«\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Kunne ikke allokere hukommelse til at fortolke tilvalg!\n"
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ugyldig superblokparameter: %s\n"
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ugyldig blokstørrelseparameter: %s\n"
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tBruger %s\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Kunne ikke finde gyldig filsystemsuperblok.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: MMP-funktioner er ikke aktiveret.\n"
+
+#: misc/dumpe2fs.c:747
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "under forsøg på at læse »%s«-bitmap\n"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Kør e2fsck nu!\n"
+"\n"
+
+#: misc/e2image.c:107
+#, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr "Brug: %s [ -r|Q ] [ -f ] enhedsaftryksfil\n"
+
+#: misc/e2image.c:109
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I enhedsaftryksfil\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+" %s -ra [ -cfnp ] [ -o src_forskydning ] [ -O dest_forskydning ] "
+"src_fs [ dest_fs ]\n"
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+msgid "while allocating buffer"
+msgstr "under allokering af mellemlager"
+
+#: misc/e2image.c:180
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Skriver blok %llu\n"
+
+#: misc/e2image.c:194
+#, c-format
+msgid "error writing block %llu"
+msgstr "fejl ved skrivning af blok %llu"
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr "fejl i generic_write()"
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Fejl: teksthovedstørrelse er større end wrt_size\n"
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr "under skrivning af superblok"
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/e2image.c:506
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Ødelagt mappeblok %llu: ugyldig rec_len (%d)\n"
+
+#: misc/e2image.c:518
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Ødelagt mappeblok %llu: ugydlig name_len (%d)\n"
+
+#: misc/e2image.c:559
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu blokke (%d%%)"
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr "Kopierer "
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+"Hvis du stopper nu, vil filsystemet blive ødelagt, afbryd igen hvis du er "
+"sikker\n"
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, c-format
+msgid "error reading block %llu"
+msgstr "fejl ved læsning af blok %llu"
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Kopierede %llu / %llu blokke (%d%%) i %s "
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:759
+msgid "while allocating l1 table"
+msgstr "under allokering af l1-tabel"
+
+#: misc/e2image.c:804
+msgid "while allocating l2 cache"
+msgstr "under allokering af l2-cache"
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1152
+msgid "while allocating ext2_qcow2_image"
+msgstr "under allokering af ext2_qcow2_image"
+
+#: misc/e2image.c:1159
+msgid "while initializing ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1276
+msgid "while allocating block bitmap"
+msgstr "under allokering af blokbitmap"
+
+#: misc/e2image.c:1285
+msgid "while allocating scramble block bitmap"
+msgstr "under allokering af scramble blokbitmap"
+
+#: misc/e2image.c:1292
+msgid "Scanning inodes...\n"
+msgstr "Skanner iknuder ...\n"
+
+#: misc/e2image.c:1304
+msgid "Can't allocate block buffer"
+msgstr "Kan ikke allokere blokbuffer"
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "under gennemløb over iknude %u"
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "RÃ¥ og qcow2-aftryk kan ikke installeres"
+
+#: misc/e2image.c:1411
+msgid "error reading bitmaps"
+msgstr "der opstod en fejl under læsning af bitmap"
+
+#: misc/e2image.c:1423
+msgid "while opening device file"
+msgstr "under åbning af enhedsfil"
+
+#: misc/e2image.c:1434
+msgid "while restoring the image table"
+msgstr "under gendannelse af billedtabellen"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "-a tilvalg kan kun bruges med rå eller QCOW2-billeder."
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr "Forskydninger er kun tilladte med rå billeder."
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr "Flyttilstand er kun tilladt med rå billeder."
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr "Flyttilstand kræver alle datatilstand."
+
+#: misc/e2image.c:1557
+msgid "checking if mounted"
+msgstr "kontrollerer om monteret"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Afvikling af e2image på et læs/skriv monteret filsystem kan resultere\n"
+"i et inkonsistent billede, som ikke vil være nyttigt til fejlsøgning.\n"
+"Brug tilvalget -f hvis du virkelig ønsker dette.\n"
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "QCOW2-billede kan ikke skrives til standardud!\n"
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr "Kan ikke køre stat på uddata\n"
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Billedet (%s) er komprimeret\n"
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Billedet (%s) er krypteret\n"
+
+#: misc/e2image.c:1640
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Billedet (%s) er ødelagt\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+"under forsøg på at konvertere qcow2-billedet (%s) til et rå billede (%s)"
+
+#: misc/e2image.c:1654
+msgid "The -c option only supported in raw mode\n"
+msgstr "Tilvalget -c er kun understøttet i raw-tilstand\n"
+
+#: misc/e2image.c:1659
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Tilvalget -c er ikke understøttet under skrivning til standardud\n"
+
+#: misc/e2image.c:1666
+msgid "while allocating check_buf"
+msgstr "under allokering af check_buf"
+
+#: misc/e2image.c:1672
+msgid "The -p option only supported in raw mode\n"
+msgstr "Tilvalget -p er kun understøttet i rå tilstand\n"
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d blokke indeholdt allerede dataene til kopiering\n"
+
+#: misc/e2initrd_helper.c:68
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Brug: %s -r enhed\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: kan ikke åbne %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: kan ikke søge til superblok\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: fejl under læsningaf superblok\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: ikke et ext2-filsystem\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Advarsel: etiket er for lang, afkorter.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: kan ikke søge til superblok igen\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: der opstod en fejl under skrivning af superblok\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Brug: e2label enhed [nyetiket]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr ""
+"Brug: %s [-f] [-h] [-n] [-o forskydning] [-v] [-z fortryd_fil] "
+"<transaktionsfil> <filsystem>\n"
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Filsystemets superblok matcher ikke genskabfilen.\n"
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr "UUID matcher ikke.\n"
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr "Sidste monteringstidspunkt matcher ikke.\n"
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr "Sidste skrivetidspunkt matcher ikke.\n"
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+msgid "while reading filesystem superblock."
+msgstr "under læsning af filsystemets superblok."
+
+#: misc/e2undo.c:188
+msgid "while fetching superblock"
+msgstr "under indhentelse af superblok"
+
+#: misc/e2undo.c:201
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Superblokkens kontrolsum for genskab matcher ikke superblok.\n"
+
+#: misc/e2undo.c:340
+#, c-format
+msgid "illegal offset - %s"
+msgstr "ugyldig forskydning - %s"
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Vil ikke skrive til en gendanfil under afspilning af den.\n"
+
+#: misc/e2undo.c:373
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "under åbning af genskabfilen »%s«\n"
+
+#: misc/e2undo.c:380
+msgid "while reading undo file"
+msgstr "under læsning af genskabfil"
+
+#: misc/e2undo.c:385
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: Ikke en genskabfil.\n"
+
+#: misc/e2undo.c:396
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Teksthovedets kontrolsum matcher ikke.\n"
+
+#: misc/e2undo.c:403
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Ødelagt teksthoved for genskabfil.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Genskabblokkens størrelse er for stor.\n"
+
+#: misc/e2undo.c:412
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Genskabblokkens størrelse er for lille.\n"
+
+#: misc/e2undo.c:425
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Ukendt funktionssæt for genskabfilen.\n"
+
+#: misc/e2undo.c:433
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Der opstod en fejl under bestemmelse af om %s er monteret."
+
+#: misc/e2undo.c:439
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo skal kun køres på filsystemer, der ikke er monteret"
+
+#: misc/e2undo.c:455
+#, c-format
+msgid "while opening `%s'"
+msgstr "under åbning af »%s«"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr "angivet forskydning er for stor"
+
+#: misc/e2undo.c:507
+msgid "while reading keys"
+msgstr "under læsning af nøgler"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: forkert nøglemagi ved %llu\n"
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: kontrolsumfejl for nøgleblok ved %llu.\n"
+
+#: misc/e2undo.c:552
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: blok %llu er for lang."
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, c-format
+msgid "while fetching block %llu."
+msgstr "under indhentelse af blok %llu."
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "kontrolsumfejl i filsystemblok %llu (genskab blk %llu)\n"
+
+#: misc/e2undo.c:615
+#, c-format
+msgid "while writing block %llu."
+msgstr "under skrivning af blok %llu."
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Ødelæggelse i genskabfil; kør e2fsck NU!\n"
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "IO-fejl under genafspilning; kør e2fsck NU!\n"
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Ufuldstændig genskabpost; kør e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Brug: findsuper-enhed [skipbytes [startkb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "skipbytes bør være et nummer, ikke %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "skipbytes skal gå op i sektorstørrelsen\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "startkb skal være et nummer, ikke %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "startkb skal være positiv, ikke %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "startende ved %llu, med %u byte stigninger\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] sandsynligvis superblok skrevet i ext3-journalsuperblokken,\n"
+"\tså start/end/grp er forkert\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+"byte_forsk. byte_start byte_slut fs_blokke blksz grp mkfs/"
+"mont_tid sb_uuid etiket\n"
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: afsluttedes med errno %d\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "ADVARSEL: kunne ikke åbne %s: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "ADVARSEL: ugyldigt format på linje %d af %s\n"
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"ADVARSEL: Din /etc/fstab indeholder ikke fsck passno-\n"
+"\tfeltet. Jeg vil lave en lappeløsning for dig, men du\n"
+"\tbør rette din /etc/fstab-fil så snart som muligt.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: ikke fundet\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: vent: Ikke flere underprocesser?!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Advarsel ... %s for enhed %s afsluttedes med signal %d.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: status er %x, bør aldrig ske.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Færdig med %s (afslutningsstatus %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Fejl %d under kørsel af fsck.%s for %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Enten alle eller ingen af filsystemtyperne videresendt til -t må være\n"
+"foranstillet med »no« eller »!«.\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Kunne ikke allokere hukommelse for filsystemstyper\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+"%s: udelader ugyldig linje i /etc/fstab: bind mount med fsck-"
+"gennemløbsnummer forskellig fra nul\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: kan ikke kontrollere %s: fsck.%s blev ikke fundet\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Kontrollerer alle filsystemer.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--waiting-- (gennemløb %d)\n"
+
+#: misc/fsck.c:1085
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Brug: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-tilvalg] [filsyst ...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: for mange enheder\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: for mange argumenter\n"
+
+#: misc/fuse2fs.c:3739
+msgid "Mounting read-only.\n"
+msgstr "Monterer skrivebeskyttet.\n"
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Tillader brugere at allokere alle blokke. Dette er farligt!\n"
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Kør venligst e2fsck -f %s.\n"
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+"Journal kræver gendannelse; kørsel af »e2fsck -E journal_only« er krævet.\n"
+
+#: misc/fuse2fs.c:3806
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: Skrivning til journalen er ikke understøttet.\n"
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+"Advarsel: Montering af ukontrolleret fs, det anbefales at køre e2fsck.\n"
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+"Advarsel: Maksimalt antal monteringer er nået, det anbefales at køre "
+"e2fsck.\n"
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Advarsel: Kontroltid er nået; det anbefales at køre e2fsck.\n"
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Forældreløse registreret; det anbefales at køre e2fsck.\n"
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Fejl registreret; kørsel af e2fsck er krævet.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Brug: %s [-RVadlpv] [filer ...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Under læsning af flag på %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Under læsning af projekt på %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Under læsning af version på %s"
+
+#: misc/mke2fs.c:130
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Brug: %s [-c|-l filnavn] [-b blokstørrelse] [-C klyngestørrelse]\n"
+"\t[-i byte-per-iknude] [-I iknudestørrelse] [-J journaltilvalg]\n"
+"\t[-G flex-gruppestørrelse] [-N antal-iknuder] [-d rodmappe]\n"
+"\t[-m reserveret-blokprocent] [-o oprettet-os]\n"
+"\t[-g blokke-per-gruppe] [-L diskenhedsetiket] [-M sidst-monteret-mappe]\n"
+"\t[-O funktion[,...]] [-r fs-revision] [-E udvidet-tilvalg[,...]]\n"
+"\t[-t fs-type] [-T brug-type ] [-U UUID] [-e fejlopførsel][-z genskabfil]\n"
+"\t[-jnqvDFSV] enhed [blokantal]\n"
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Kører kommando: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "under forsøg på at køre »%s«"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "under behandling af liste med ugyldige blokke fra program"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Blok %d i primær superblok/gruppebeskriver område ugyldig.\n"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Blokkene %u til %u skal være i god stand for at bygge et filsystem.\n"
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "Afbryder ...\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Advarsel: Sikkerhedskopibeskriverne for superblok/gruppe ved blok %u\n"
+"\tindeholder ugyldige blokke.\n"
+"\n"
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "mens markerende ugyldige blokke som brugt"
+
+#: misc/mke2fs.c:368
+msgid "while writing reserved inodes"
+msgstr "under skrivning af reserverede iknuder"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Skriver iknudetabeller: "
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Kunne ikke skrive %d blokke i iknude-tabel startende ved %llu: %s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "færdig \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "under oprettelse af rodmappe"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "under læsning af rod-iknude"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "under opsætning af ejerskab for rod-iknude"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "under oprettelse af /lost+found"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "under opslag af /lost+found"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "under udvidelse af /lost+found"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "under indstilling af ugyldig blok-iknude"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Ikke nok hukommelse under sletning af sektorerne %d-%d\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Advarsel: Kunne ikke læse blok 0: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Advarsel: kunne ikke slette sektor %d: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "under initialisering af journal-superblok"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "Nulstiller journalenhed: "
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "under nulstilling af journalenhed (blok %llu, antal %d)"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "under skrivning af journal-superblok"
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Opretter filsystem med %llu %dk blokke og %u iknuder\n"
+
+#: misc/mke2fs.c:673
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"advarsel: %llu ubrugte blokke.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Filsystemetiket=%s\n"
+
+#: misc/mke2fs.c:681
+#, c-format
+msgid "OS type: %s\n"
+msgstr "OS-type: %s\n"
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blokstørrelse=%u (log=%u)\n"
+
+#: misc/mke2fs.c:686
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Klyngestørrelse=%u (log=%u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmentstørrelse%u (log=%u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u iknuder, %llu blokke\n"
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu blokke (%2.2f%%) reserveret for superbrugeren\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Første datablok=%u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Rodmappeejer=%u:%u\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maksimum filsystemblokke=%lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blokgrupper\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blokgruppe\n"
+
+#: misc/mke2fs.c:711
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blokke per gruppe, %u klynger per gruppe\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blokke per gruppe, %u fragmenter per gruppe\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u iknuder per gruppe\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Filsystem UUID: %s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s kræver »-O 64bit«\n"
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "»%s« skal komme før »resize=%u«\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Ugyldig beskrivelsesstørrelse: »%s«\n"
+
+#: misc/mke2fs.c:853
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Ugyldig hash-seed: %s\n"
+
+#: misc/mke2fs.c:865
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "ugyldig forskydning: %s\n"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ugyldig mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:896
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Ugyldig # for sikkerhedskopisuperblokke: %s\n"
+
+#: misc/mke2fs.c:918
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:956
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ugyldig resize-parameter: %s\n"
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Ugyldig rod_ejer: »%s«\n"
+
+#: misc/mke2fs.c:1065
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Advarsel: RAID stripe-bredde %u ikke et lige multiplum af stride %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaksfejl i mke2fs-konfigurationsfilen (%s, linje #%d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ugyldig filsystemtilvalg angivet: %s\n"
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ugyldig monteringstilvalg angivet: %s\n"
+
+#: misc/mke2fs.c:1296
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Din mke2fs.conf-fil definerer ikke %s-filsystemtypen.\n"
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Du skal sandsynligvis installere en opdateret mke2fs.conf-fil.\n"
+"\n"
+
+#: misc/mke2fs.c:1304
+msgid "Aborting...\n"
+msgstr "Afbryder ...\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Advarsel: fs_type %s er ikke defineret i mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1527
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Kunne ikke allokere hukommelse for ny STI (PATH).\n"
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1597
+#, c-format
+msgid "invalid block size - %s"
+msgstr "ugyldig blokstørrelse - %s"
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Advarsel: blokstørrelse %d kan ikke bruges på de fleste systemer.\n"
+
+#: misc/mke2fs.c:1617
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "ugyldig klyngestørrelse - %s"
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "»-R« er forældet, brug »-E« i stedet for"
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "ugyldig fejlopførsel - %s"
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr "Ulovligt antal for blokke per gruppe"
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr "blokke per gruppe skal være multiplum af 8"
+
+#: misc/mke2fs.c:1669
+msgid "Illegal number for flex_bg size"
+msgstr "Ugyldigt nummer for flex_bg-størrelse"
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr "flex_bg-størrelsen skal være en potens af 2"
+
+#: misc/mke2fs.c:1680
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "flex_bg-størrelsen (%lu) skal være mindre end eller lig med 2^31"
+
+#: misc/mke2fs.c:1690
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "ugyldig iknudeforhold %s (min %d/maks %d)"
+
+#: misc/mke2fs.c:1700
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ugyldig iknudestørrelse - %s"
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+"Advarsel: Tilvalget -K er forældet og bør ikke bruges længere. Brug det "
+"udvidede tilvalg »-E nodiscard« i stedet!\n"
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr "i malloc for bad_blocks_filename"
+
+#: misc/mke2fs.c:1733
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"Advarsel: etiket er for lang, afkorter til »%s«.\n"
+"\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "ugyldig reserveret blokprocent - %s"
+
+#: misc/mke2fs.c:1757
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "ugyldige num-iknuder - %s"
+
+#: misc/mke2fs.c:1770
+msgid "while allocating fs_feature string"
+msgstr "under allokering af fs_feature-streng"
+
+#: misc/mke2fs.c:1787
+#, c-format
+msgid "bad revision level - %s"
+msgstr "ugyldig revisionsniveau - %s"
+
+#: misc/mke2fs.c:1792
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "under forsøg på at oprette revision %d"
+
+#: misc/mke2fs.c:1806
+msgid "The -t option may only be used once"
+msgstr "Tilvalget -t kan kun bruges en gang"
+
+#: misc/mke2fs.c:1814
+msgid "The -T option may only be used once"
+msgstr "Tilvalget -T kan kun bruges en gang"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "under forsøg på at åbne journalenheden %s\n"
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"Journal dev-blokstørrelsen (%d) er mindre end minimumblokstørrelsen %d\n"
+
+#: misc/mke2fs.c:1882
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Bruger journalenhedens blokstørrelse: %d\n"
+
+#: misc/mke2fs.c:1893
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "ugyldige blokke »%s« på enheden »%s«"
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "filsystem"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "under forsøget på at bestemme filsystemstørrelsen"
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Kunne ikke bestemme enhedstørrelsen; du skan angive\n"
+"størrelsen på filsystemet\n"
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Enhedsstørrelse blev rapporteret til nul. Ugyldig partition specificeret,\n"
+"eller partitionstabel blev ikke genlæst efter kørsel af fdisk, på grund\n"
+"af at en ændret partition var optaget eller i brug. Du skal måske genstarte\n"
+"for at kunne genlæse din partitionstabel.\n"
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr "Filsystem er større end tilsyneladende enhedsstørrelse."
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr "Kunne ikke fortolke fs-typeliste\n"
+
+#: misc/mke2fs.c:2040
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "HURD'en understøtter ikke filtypefunktionen.\n"
+
+#: misc/mke2fs.c:2045
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "HURD'en understøtter ikke huge_file-funktionen.\n"
+
+#: misc/mke2fs.c:2050
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "HURD'en understøtter ikke metadata_csum-funktionen.\n"
+
+#: misc/mke2fs.c:2055
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "HURD'en understøtter ikke ea_inode-funktionen.\n"
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr "under forsøg på at bestemme sektorstørrelse for udstyr"
+
+#: misc/mke2fs.c:2071
+msgid "while trying to determine physical sector size"
+msgstr "under forsøg på at bestemme fysisk sektorstørrelse"
+
+#: misc/mke2fs.c:2103
+msgid "while setting blocksize; too small for device\n"
+msgstr "under forsøg på at angive blokstørrelse; for lille for enhed\n"
+
+#: misc/mke2fs.c:2108
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+"Advarsel: specificeret blokstørrelse %d er mindre end enhedens fysiske "
+"sektorstørrelse %d\n"
+
+#: misc/mke2fs.c:2132
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Størrelse for enhed (0x%llx blokke) %s for stor til at blive udtrykt\n"
+"\ti 32-bit via en blokstørrelse på %d.\n"
+
+#: misc/mke2fs.c:2144
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Størrelse for enhed (0x%llx blokke) %s for stor til at oprette\n"
+"\ta filsystem via en blokstørrelse på %d.\n"
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types for mke2fs.conf-opløsning: "
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Filsystemfunktioner er ikke understøttet med revision 0-filsystemer\n"
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Tynde superblokke er ikke understøttet med revision 0-filsystemer\n"
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Journaler er ikke understøttet med revision 0-filsystemer\n"
+
+#: misc/mke2fs.c:2204
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "ugyldig reserveret blokkeprocent - %lf"
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2241
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Klyngestørrelsen må ikke være mindre end blokstørrelsen.\n"
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "angivelse af en klyngestørrelse kræver bigalloc-funktionen"
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "advarsel: Kan ikke indhente enhedsgeometri for %s\n"
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "%s-justering forskydes med %lu byte.\n"
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+"Dette kan medføre meget dårlig ydelse, (ny) partitionering anbefales.\n"
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d-byteblokke er for store for systemet (maks %d)"
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Advarsel: %d-byteblokke er for store for systemet (maks %d), tvunget til at "
+"fortsætte\n"
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+"Forslag: Brug Linuxkerner >= 3.18 for forbedret stabilitet af metadata og "
+"journalkontrolsummens funktioner.\n"
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Advarsel: forskydning specificeret uden en eksplicit filsystemstørrelse.\n"
+"Oprettelse af et filsystem med %llu blokke er måske ikke\n"
+"det du ønsker.\n"
+"\n"
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Kan ikke understøtte bigalloc-funkton uden extents-funktion"
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Funktionerne resize_inode og meta_bg er ikke kompatible.\n"
+"De kan ikke begge være aktiveret på samme tidspunkt.\n"
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+"\n"
+"Advarsel: funktionen bigalloc er stadig under udvikling\n"
+"Se https://ext4.wiki.kernel.org/index.php/Bigalloc for yderligere "
+"information\n"
+"\n"
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"reserverede online ændringsblokke er ikke understøttet på ikke-tyndt "
+"filsystem"
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr "bloks per gruppe-antal uden for interval"
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+"Flex_bg-funktion er ikke aktiveret, så flex_bg-størrelse kan ikke angives"
+
+#: misc/mke2fs.c:2467
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ugyldig iknudestørrelse %d (min %d/maks %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "for mange iknuder (%llu), hæv iknudeforhold?"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "for mange iknuder (%llu), specificer < 2^32 iknuder"
+
+#: misc/mke2fs.c:2518
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"iknude_størrelse(%u) * iknuder_antal (%u) er for stor for et\n"
+"\tfilsystem med %llu blokke, specificer højere iknude_forhold (-i)\n"
+"\teller lavere iknudeantal (-N).\n"
+
+#: misc/mke2fs.c:2705
+msgid "Discarding device blocks: "
+msgstr "Fjerner enhedsblokke: "
+
+#: misc/mke2fs.c:2721
+msgid "failed - "
+msgstr "mislykkedes - "
+
+#: misc/mke2fs.c:2780
+msgid "while initializing quota context"
+msgstr "under initialisering af kvotakontekst"
+
+#: misc/mke2fs.c:2787
+msgid "while writing quota inodes"
+msgstr "under skrivning af kvota-iknuder"
+
+#: misc/mke2fs.c:2812
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "ugyldig fejlopførsel i profil - %s"
+
+#: misc/mke2fs.c:2888
+msgid "in malloc for android_sparse_params"
+msgstr "i malloc for android_sparse_params"
+
+#: misc/mke2fs.c:2902
+msgid "while setting up superblock"
+msgstr "under opsætning af superblok"
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+"64-bit filsystemunderstøttelse er ikke aktiveret. De større felter ydet af "
+"denne funktion aktiverer fuld styrke i kontrolsummer. Send -O 64bit for at "
+"rette.\n"
+
+#: misc/mke2fs.c:2933
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Funktionen metadata_csum_seed kræver funktionen metadata_csum.\n"
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+"Fjernelse lykkedes og vil returnere 0s - udelader iknudetabelfjernelse\n"
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "ukendt os - %s"
+
+#: misc/mke2fs.c:3119
+msgid "Allocating group tables: "
+msgstr "Allokerer gruppetabeller: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr "under forsøg på at allokere filsystemtabeller"
+
+#: misc/mke2fs.c:3136
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tunder konvertering af underklynge-bitmap"
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3183
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "under nulstilling af blok %llu i slutningen af filsystemet"
+
+#: misc/mke2fs.c:3196
+msgid "while reserving blocks for online resize"
+msgstr "under reservering af blokke for online ændring af størrelse"
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr "journal"
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Tilføjer journal til enheden %s: "
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tunder forsøg på at tilføje journal til enheden %s"
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "færdig\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Udelader journaloprettelse i super-only-tilstand\n"
+
+#: misc/mke2fs.c:3248
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Opretter journal (%u blokke): "
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tunder forsøg på at oprette journal"
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Der opstod en fejl under aktivering af funktionen for flere "
+"monteringsbeskyttelser."
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+"Flere monteringsbeskyttelser er aktiveret med opdateringsinterval %d "
+"sekunder.\n"
+
+#: misc/mke2fs.c:3290
+msgid "Copying files into the device: "
+msgstr "Kopierer filer ned på enheden: "
+
+#: misc/mke2fs.c:3296
+msgid "while populating file system"
+msgstr "under udfyldelse af filsystem"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Skriver superblokke og filsystemets registreringsinformation: "
+
+#: misc/mke2fs.c:3310
+msgid "while writing out and closing file system"
+msgstr "under skrivning ud og lukning af filsystem"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"færdig\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "under nulstilling af blok %llu for hugefile"
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+"Partitionforskyning på %llu (%uk) blokke er ikke kompatibel med "
+"klyngestørrelsen %u.\n"
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr "Store filer vil blive nulstillet\n"
+
+#: misc/mk_hugefiles.c:582
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Opretter %lu store filer"
+
+#: misc/mk_hugefiles.c:584
+#, c-format
+msgid "with %llu blocks each"
+msgstr "med %llu blokke hver"
+
+#: misc/mk_hugefiles.c:593
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "under oprettelse af stor fil %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Brug: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Brug: %s enhed...\n"
+"\n"
+"Udskriver partitionsinformation for hver enhed.\n"
+"For eksempel: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Kan ikke åbne %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Kan ikke indhente geometri for %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Kan ikke indhente størrelse på %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d start=%8d str=%8lu slut=%8d\n"
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Denne operation kræver et nyligt kontrolleret filsystem.\n"
+
+#: misc/tune2fs.c:121
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Kør venligst e2fsck -f på filsystemet.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Kør venligst e2fsck -fD på filsystemet.\n"
+
+#: misc/tune2fs.c:136
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Brug: %s [-c maks_monteringsantal] [-e fejl_opførsel] [-f] [-g gruppe]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_tilvalg] [-l]\n"
+"\t[-m reserverede_blokke_procent] [-o [^]monteringstilvalg[,...]]\n"
+"\t[-r reserverede_blokke_antal] [-u bruger] [-C monteringsantal]\n"
+"\t[-L diskenhedsetiket] [-M sidst_monteret_mappe]\n"
+"\t[-O [^]feature[,...]] [-Q kvote_tilvalg]\n"
+"\t[-E udvidet-tilvalg[,...]] [-T sidste_kontroltidspunkt] [-U UUID]\n"
+"\t[-I ny_iknude_størrelse] [-z genskab_fil] enhed\n"
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "Journalsuperblok blev ikke fundet!\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "under forsøg på at åbne ekstern journal"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s er ikke en journalenhed.\n"
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Filsystemets UUID blev ikke fundet på journalenhed.\n"
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Kan ikke finde journalenhed. Den blev IKKE fjernet\n"
+"Brug tilvalget -f til at fjerne manglende journalenhed.\n"
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr "Journal fjernet\n"
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "under læsning af bitmaps"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr "under rydning af journaliknude"
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr "under skrivning af journaliknude"
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr "(og genstart efterfølgende!)\n"
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:483
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Kør venligst »resize2fs %s %s"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z »%s«"
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "' for at aktivere 64-bit tilstand.\n"
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "' for at deaktivere 64-bit tilstand.\n"
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"ADVARSEL: Kunne ikke bekræfte kerneunderstøttelse for metadata_csum_seed.\n"
+" Dette kræver Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Funktionen for rydning af filsystem »%s« er ikke understøttet.\n"
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Funktionen for opsætning af filsystem »%s« er ikke understøttet.\n"
+
+#: misc/tune2fs.c:1138
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Funktionen has_journal kan kun ryddes, når filsystemet er umonteret\n"
+"eller monteret som skrivebeskyttet.\n"
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Flaget needs_recovery er angivet. Kør venligst e2fsck før rydning\n"
+"af flaget has_journal.\n"
+
+#: misc/tune2fs.c:1164
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Angivelse af filsystemfunktionen »sparse_super« er ikke understøttet\n"
+"for filsystemer med funktionen meta_bg aktiveret.\n"
+
+#: misc/tune2fs.c:1177
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Funktionen for flere monteringsbeskyttelser kan\n"
+"ikke angives hvis filsystemet er monteret eller\n"
+"skrivebeskyttet.\n"
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1212
+msgid "Error while reading bitmaps\n"
+msgstr "Der opstod en fejl under læsning af bitmap\n"
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Magisk nummer i MMP-blok matcher ikke. forventede: %x, faktisk %x\n"
+
+#: misc/tune2fs.c:1226
+msgid "while reading MMP block."
+msgstr "under læsning af MMP-blok."
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Rydning af flaget flex_bg vil medføre at filsystemet bliver\n"
+"inkonsistent.\n"
+
+#: misc/tune2fs.c:1269
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr "Deaktivering af kontrolsummer kan tage lidt tid."
+
+#: misc/tune2fs.c:1323
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Kan ikke deaktivere metadata_csum på et monteret filsystem!\n"
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Kan ikke aktivere 64-bit tilstand mens monteret!\n"
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Kan ikke deaktivere 64-bit tilstand mens monteret!\n"
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1465
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Angivelse af funktionen »metadata_csum_seed« er kun understøttet\n"
+"på filsystemer med funktionen metadata_csum aktiveret.\n"
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1489
+msgid "Recalculating checksums could take some time."
+msgstr "Genberegning af kontrolsummer kan tage lidt tid."
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr "Filsystemet har allerede en journal.\n"
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tunder forsøg på at åbne journal på %s\n"
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Opretter journal på enhed %s: "
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "under tilføjelse af filsystem til journal på %s"
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Opretter journaliknude: "
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tunder forsøg på at oprette journalfil"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+msgid "while initializing quota context in support library"
+msgstr "under initialisering af kvotakontekst i understøttelsesbibliotek"
+
+#: misc/tune2fs.c:1649
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "under opdatering af kvotabegrænsninger (%d)"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "under skrivning af kvotafil (%d)"
+
+#: misc/tune2fs.c:1675
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "under fjernelse af kvotafil (%d)"
+
+#: misc/tune2fs.c:1718
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Kunne ikke fortolke dato/tids-angiveren: %s"
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "ugyldigt monteringsantal - %s"
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "ugyldig gid/gruppenavn - %s"
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr "ugyldig interval - %s"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "ugyldigt reserveret blokforhold - %s"
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr "-o kan kun angives en gang"
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr "-O kan kun angives en gang"
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "ugyldigt reserveret blokantal - %s"
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "ugyldig uid/brugernavn - %s"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "bad inode size - %s"
+msgstr "ugylding iknude-størrelse - %s"
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Iknude-størrelse skal være en potens af to - %s"
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval er for stort: %lu\n"
+
+#: misc/tune2fs.c:2115
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ugyldig RAID stride: %s\n"
+
+#: misc/tune2fs.c:2153
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ugyldig RAID stripe-bredde: %s\n"
+
+#: misc/tune2fs.c:2168
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ugyldig hashalgoritme: %s\n"
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Angiver standardhashalgoritmen til %s (%d)\n"
+
+#: misc/tune2fs.c:2193
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+
+#: misc/tune2fs.c:2663
+msgid "Failed to read inode bitmap\n"
+msgstr "Kunne ikke læse iknude-bitmap\n"
+
+#: misc/tune2fs.c:2668
+msgid "Failed to read block bitmap\n"
+msgstr "Kunne ikke læse blok-bitmap\n"
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr "blokke der skal flyttes"
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Kunne ikke allokere blok-bitmap da iknudestørrelsen blev øget\n"
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr "Ikke nok plads til at øge iknudestørrelsen \n"
+
+#: misc/tune2fs.c:2699
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Kunne ikke relokere blokke under ændring af størrelsen for iknude \n"
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Hvis du er sikker på, at filsystemet ikke er i brug på nogen knude, så kør:\n"
+"»tune2fs -f -E clear_mmp {device}«\n"
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2955
+msgid "Cannot modify a journal device.\n"
+msgstr "Kan ikke ændre en journalenhed.\n"
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Iknudestørrelsen er allerede %lu\n"
+
+#: misc/tune2fs.c:2975
+msgid "Shrinking inode size is not supported\n"
+msgstr "Formindskelse af iknudestørrelse er ikke understøttet\n"
+
+#: misc/tune2fs.c:2980
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Ugyldig iknudestørrelse %lu (maks %d)\n"
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Advarsel: Denne journal er beskidt. Du kan genafspille journalen således:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"kør så denne kommando igen. Ellers vil eventuelle ændringer blive "
+"overskrevet\n"
+"af journal-gendannelse.\n"
+
+#: misc/tune2fs.c:3045
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Genskaber journal.\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Sætter nuværende monteringsantal til %d\n"
+
+#: misc/tune2fs.c:3074
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Sætter fejlopførsel til %d\n"
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3084
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr ""
+
+#: misc/tune2fs.c:3091
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:3098
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:3104
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr ""
+
+#: misc/tune2fs.c:3111
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Filsystemet har allerede tynde superblokke.\n"
+
+#: misc/tune2fs.c:3119
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Angivelse af det tynde superblokflag er ikke understøttet\n"
+"for filsystemer med funktionen meta_bg aktiveret.\n"
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Tyndt superblokflag angivet. %s"
+
+#: misc/tune2fs.c:3134
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Rydning af det tynde superblokflag er ikke understøttet.\n"
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Angiver tidspunkt for filsystemets sidste kontrol til %s\n"
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Angiver reserveret blokke-uid til %lu\n"
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "fejl i brugen af clear_mmp. Den skal bruges med -f\n"
+
+#: misc/tune2fs.c:3198
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Kvotafunktionen kan kun ændres når filsystemer er afmonteret.\n"
+
+#: misc/tune2fs.c:3222
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "UUID'en kan kun ændres når filsystemet er afmonteret.\n"
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+"Hvis du kun bruger kerner nyere end version 4.4, så kør »tune2fs -O "
+"metadata_csum_seed« og kør denne kommando igen.\n"
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr "Angivelse af UUID på et filsystem med kontrolsummer kan tage lang tid."
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr "Ugyldigt UUID-format\n"
+
+#: misc/tune2fs.c:3275
+msgid "Need to update journal superblock.\n"
+msgstr "Skal opdatere journalsuperblok.\n"
+
+#: misc/tune2fs.c:3301
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Iknudens størrelse kan kun ændres når filsystemet er afmonteret.\n"
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Ændring af iknudens størrelse er ikke understøttet på filsystemer med\n"
+"funktionen flex_bg aktiveret.\n"
+
+#: misc/tune2fs.c:3326
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Sætter iknudestørrelse %lu\n"
+
+#: misc/tune2fs.c:3330
+msgid "Failed to change inode size\n"
+msgstr "Kunne ikke ændre iknudestørrelse\n"
+
+# eng. tastefejl = stride kontra stripe
+#: misc/tune2fs.c:3344
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Sætter stridestørrelse til %d\n"
+
+#: misc/tune2fs.c:3349
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Sætter stripebredde til %d\n"
+
+#: misc/tune2fs.c:3356
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Sætter udvidede monteringsindstillinger til »%s«\n"
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr "<i_gang>\n"
+
+#: misc/util.c:104
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Fortsæt alligevel (eller vent %d sekunder for at fortsætte) ? (j,N) "
+
+#: misc/util.c:108
+msgid "Proceed anyway? (y,N) "
+msgstr "Fortsæt alligevel? (j,N) "
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs tvunget alligevel. HÃ¥b at /etc/mtab er forkert.\n"
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "vil ikke lave en %s her!\n"
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs tvunget alligevel.\n"
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Kunne ikke allokere hukommelse til at fortolke journalindstillinger!\n"
+
+#: misc/util.c:186
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Kunne ikke finde journal-enhed der matcher %s\n"
+
+#: misc/util.c:213
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Ugyldige journaltilvalg er angivet.\n"
+"\n"
+"Journaltilvalg er adskilt af komma, og kan bruge et argument som sendes\n"
+"\tafsted med et lig med-tegn (»=«).\n"
+"\n"
+"Gyldige journaltilvalg er:\n"
+"\tsize=<journalstørrelse i megabyte>\n"
+"\tdevice=<journalenhed>\n"
+"\tlocation=<journalplacering>\n"
+"\n"
+"Journalstørrelsen skal være mellem 1024 og 10240000 filsystemblokke.\n"
+"\n"
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Filsystem er for lille for en journal\n"
+
+#: misc/util.c:251
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Den anmodt journalstørrelse er på %d blokke; størrelsen\n"
+"skal være mellem 1024 og 10240000 blokke. Afbryder.\n"
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Journalstørrelse er for stor for filsystemet.\n"
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Dette filsystem vil automatisk blive kontrolleret efter hver %d montering\n"
+"eller efter %g dage. Brug tune2fs -c eller -i for at annullere.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Brug: %s [-d] [-p pid-fil] [-s sokkelsti] [-T tidsudløb]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n num] [-s sokkelsti]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "ugyldige parametre"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "forbind"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "skriv"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "ugyldig svarlængde"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "uuidd-dæmon kører allerede på pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Kunne ikke oprette unix-strømsokkel: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Kunne ikke binde unix-sokkel %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Kunne ikke lytte på unix-sokkel %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Fejl ved læsning fra klient, len = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operation %d, indgående num = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Oprettet tids-UUID: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Oprettet vilkårlig UUID: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Oprettet tids UUID %s og efterfølgende UUID\n"
+msgstr[1] "Oprettet tids UUID %s og %d efterfølgende UUID'er\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Oprettet %d UUID'er:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ugyldig operation %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Ugyldigt tal: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Der opstod en fejl ved kald til uuidd-dæmon (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s og efterfølgende UUID\n"
+msgstr[1] "%s og efterfølgende %d UUID'er\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Liste over UUID'er:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Uventet svarlængde fra server %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Kunne ikke dræbe uuidd der kører på pid %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Dræbte uuidd der kører på pid %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Brug: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr ""
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Brug: %s [-d fejlsøgningsflag] [-f] [-F] [-M] [-P] [-p] enhed [-b|-s|"
+"ny_størrelse] [-S RAID-stride] [-z genskabfil]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Udvider iknude-tabellen"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Omallokerer blokke"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Skanner iknude-tabel"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Opdaterer iknude-referencer"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Flytter iknude-tabel"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Ukendt gennemløb?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Begynd gennemløb %d (maks. = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Ændring af størrelsen på bigalloc-filsystemer er ikke testet fuldt ud.\n"
+"Fortsæt på egen risiko! Brug tilvalget force hvis du ønsker at fortsætte.\n"
+"\n"
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr "under åbning af %s"
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "under indhentelse af stat-information for %s"
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"kør venligst »e2fsck -f %s« først.\n"
+"\n"
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Estimeret minimumsstørrelse for filsystemet: %llu\n"
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ugyldig ny størrelse: %s\n"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Ny størrelse for stor til at blive udtryk ti 32-bit\n"
+
+#: resize/main.c:534
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Ny størrelse er mindre end minimum (%llu)\n"
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr "Ugyldig stride-længde"
+
+#: resize/main.c:564
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Den indeholdte partition (eller enhed) er kun på %llu (%dk) blokke.\n"
+"Du anmodte om en størrelse på %llu blokke.\n"
+"\n"
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Kan ikke sætte eller fjerne 64-bit funktion.\n"
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+"Kan ikke ændre 64-bit funktionen på et filsystem som er større end 2^32 "
+"blokke.\n"
+
+#: resize/main.c:581
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Kan ikke ændre 64-bit funktionen mens filsystemet er monteret.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+"Aktiver extents-funktionen med tune2fs før aktivering af 64-bit funktionen.\n"
+
+#: resize/main.c:593
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Filsystemet er allerede %llu (%dk( blokke langt. Intet at gøre!\n"
+"\n"
+
+#: resize/main.c:600
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Filsystemet er allerede 64-bit.\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Filsystemet er allerede 32-bit.\n"
+
+#: resize/main.c:613
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Konverterer filsystemet til 64-bit.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Konverterer filsystemet til 32-bit.\n"
+
+#: resize/main.c:617
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Ændrer størrelse på filsystemet på %s til %llu (%dk) blokke.\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "under forsøg på at ændre størrelse på %s"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Kør venligst »e2fsck -fy %s« for at rette filsystemet\n"
+"efter den afbrudte ændring af størrelse-operation.\n"
+
+#: resize/main.c:635
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Filsystemet på %s er nu %llu (%dk) blokke langt.\n"
+"\n"
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "under forsøg på at forkorte %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "kerne understøtter ikke ny størrelse når aktiv med sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+"Filsystemet på %s er monteret på %s; aktiv (tændt) ændring af størrelse er "
+"krævet\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Aktiv (tændt) formindskelse er ikke understøttet"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Filsystemet understøtter ikke aktiv (når tændt) ændring af størrelsen"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Ikke nok reserverede gdt-blokke for ændring af størrelse"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Kerne understøtter ikke ændring af så stor størrelse for filsystemet"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "under forsøg på at åbne monteringspunkt %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Der blev anmodt om gammel grænseflade til ændring af størrelse.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Tilladelse til at ændre filsystemets størrelse nægtet"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Under kontrol for aktiv (tændt) understøttelse af størrelsesændring"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Kerne understøtter ikke aktiv (tændt) ændring af størrelse"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+"Udfører en aktiv (tændt) ændring af størrelsen af %s til %llu (%dk) blokke.\n"
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr "Under forsøg på at udvide den sidste gruppe"
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Under forsøg på at tilføje gruppe #%d"
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+"Filsystemet på %s er monteret på %s, og aktiv (tændt) størrelsesændring er "
+"ikke understøttet på dette system.\n"
+
+#: resize/resize2fs.c:759
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "iknuder (%llu) skal være mindre end %u\n"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "reserverede blokke"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr "metadatablokke"
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+msgid "new meta blocks"
+msgstr "nye metablokke"
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Bør aldrig ske! Ingen sb i sidste super_sparse bg?\n"
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Bør aldrig ske! Uventet old_desc i super_sparse bg?\n"
+
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Bør aldrig ske: ændring af størrelse for iknude er ødelagt!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+#, fuzzy
+msgid "EXT2FS Library version 1.44.4"
+msgstr "EXT2FS-biblioteksversion 1.44.3"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Forkert magisk nummer for ext2_filsys-struktur"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Forkert magisk nummer for badblocks_list-struktur"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Forkert magisk nummer for badblocks_iterate-struktur"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Forkert magisk nummer inode_scan-struktur"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Forkert magisk nummer for io_channel-struktur"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Forkert magisk nummer for unix io_channel-struktur"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Forkert magisk nummer for io_manager-struktur"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Forkert magisk nummer for block_bitmap-struktur"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Forkert magisk nummer for inode_bitmap-struktur"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Forkert magisk nummer for generic_bitmap-struktur"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Forkert magisk nummer for test io_channel-struktur"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Forkert magisk nummer for mappebloklistestruktur"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Forkert magisk nummer for icount-struktur"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Forkert magisk nummer for Powerquest io_channel-struktur"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Forkert magisk nummer for ext2-filstruktur"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Forkert magisk nummer for Ext2-aftryksteksthoved"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Forkert magisk nummer for inode io_channel-struktur"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Forkert magisk nummer for ext4 extent-håndtag"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Ugyldig magisk nummer i superblok"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Filsystemets revision er for høj"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Forsøg på at skrive til filsystem åbnet i skrivebeskyttet tilstand"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Kan ikke læse gruppebeskrivere"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Kan ikke skrive gruppebeskrivere"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Ødelagt gruppebeskriver: ugyldig blok for blokbitmap"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Ødelagt gruppebeskriver: ugyldig blok for iknude-bitmap"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Ødelagt gruppe-beskriver: ugyldig blok for iknude-tabel"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Kan ikke skrive en iknude-bitmap"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Kan ikke læse en iknude-bitmap"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Kan ikke skrive en blokbitmap"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Kan ikke læse en blokbitmap"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Kan ikke skrive en iknude-tabel"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Kan ikke læse en iknude-tabel"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Kan ikke læse næste iknude"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Filsystem har uventet blokstørrelse"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "EXT2-mappe ødelagt"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Forsøg på at læse blok fra filsystem resulterede i kort læsning"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Forsøg på at skrive blok til filsystem resulterede i kort skrivning"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Ingen ledig plads i mappen"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Iknude-bitmap er ikke indlæst"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Blok-bitmap er ikke indlæst"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Ugyldigt iknude-antal"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Ugyldigt blokantal"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Intern fejl i ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Ikke nok plads til at bygge foreslået filsystem"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Ugyldigt blokantal videresendt til ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Ugyldigt blokantal videresendt til ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Ugyldigt blokantal videresendt til ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Ugyldigt iknudeantal videresendt til ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Ugyldigt iknudeantal videresendt til ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Ugyldigt iknudeantal videresendt til ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Ugyldig indirekte blok fundet"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Blok-bitmap er ikke ens"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Iknude-bitmap er ikke ens"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Ugyldigt eller forkert udformet enhedsnavn"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "En blokgruppe mangler en iknudetabel"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Tilbagekaldsfunktionen vil ikke håndtere dette tilfælde"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Iknuden er fra en ugyldig blok i iknudetabellen"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Filsystemet har funktioner der ikke er understøttet"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Filsystemet har skrivebeskyttede funktioner der ikke er understøttet"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "IO-kanal kunne ikke søge på læs eller skriv"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Hukommelsesallokering mislykkedes"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Ugyldigt argument sendt til ext2-bibliotek"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Kunne ikke allokere blok i ext2-filsystem"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Kunne ikke allokere iknude i ext2-filsystem"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Ext2-iknude er ikke en mappe"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "For mange referencer i tabel"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Fil ikke fundet af ext2_loopup"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Fil åbn er skrivebeskyttet"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Ext2-mappeblok blev ikke fundet"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Ext2-mappe findes allerede"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Ext2-biblioteksfunktion er ikke implementeret"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Der blev anmodt om brugerafbrydelse"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Ext2-fil er for stor"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Indeholdt journalenhed er ikke en blokenhed"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Journalsuperblok blev ikke fundet"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Journal skal være på mindst 1024 blokke"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Ikke understøttet journalversion"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Fejl under indlæsning af ekstern journal"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Journal blev ikke fundet"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Mappehash er ikke understøttet"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Illegal udvidet attributblokantal"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Kan ikke oprette filsystem med det anmodte antal iknuder"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "E2image-øjebliksbillede er ikke i brug"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "For mange reserverede gruppebeskriverblokke"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Ændring af størrelse for iknude er ødelagt"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Prøvede at sætte blok-bmap med manglende indirekte blok"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Succes"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Ødelagt database"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: IO-fejl"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: LÃ¥sefejl"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Ikke nok hukommelse"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Post findes"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Lås findes på andre nøgler"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Ugyldig parameter"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Post findes ikke"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Skrivning ikke tilladt"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Ext2fs-mappeblokliste er tom"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+"Forsøg på at ændre en blokoversættelse via en skrivebeskyttet blokiterator"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Forkert magi-nummer for ext4-udstrækningens gemte sti"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Forkert magi-nummer for 64-bit generisk bitmap"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Forkert magi-nummer for 64-bit blok-bitmap"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Forkert magi-nummer for 64-bit iknude-bitmap"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Forkert magi-nummer --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Forkert magi-nummer --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Forkert magi-nummer --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Forkert magi-nummer --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Forkert magi-nummer --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Forkert magi-nummer --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Forkert magi-nummer --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Ødelagt områdehoved"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Ødelagt områdeindeks"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Ødelagt område"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Ingen ledig plads i områdekort"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Iknude bruger ikke områder"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Intet »næste« område"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Intet »forrige« område"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Intet »up« område"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Intet »down« område"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Ingen aktuel knude"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Ext2fs-operation er ikke understøttet"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Ingen plads til at indsætte område i knude"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Opdeling vil medføre en tom knude"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Område blev ikke fundet"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Operation er ikke understøttet for iknuder, der indeholder områder"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Områdelænge er ugyldig"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "I/O-kanal understøtter ikke 64-bit bloknumre"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+"Kan ikke kontrollere om filsytem er monteret på grund af en manglende mtab-"
+"fil"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Filsystem er for stort til at kunne bruge forældede bitmap'er"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: ugyldigt magi-antal"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: enhed aktiv i øjeblikket"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: e2fsck køres"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: bloknummer er udover filsystemets interval"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: undergår en ukendt operation"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: filsystemet er stadig i brug"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: åb nmed O_DIRECT mislykkedes"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Størrelse for blokgruppebeskriver er ikke korrekt"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Iknudens kontrolsum matcher ikke iknude"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Iknude-bitmapens kontrolsum matcher ikke bitmap"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Extentblokkens kontrolsum matcher ikke extent-blok"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Mappeblok har ikke plads for kontrolsum"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Mappeblokkens kontrolsum matcher ikke mappeblok"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Den udvidede attributbloks kontrolsum matchter ikke blok"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Superblokkens kontrolsum matcher ikke superblok"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Ukendt kontrolsumalgoritme"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "MMP-blokkens kontrolsum matcher ikke"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ext2-fil findes allerede"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Blok-bitmapens kontrolsum matcher ikke bitmap"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Kan ikke gentage datablokke for en iknude indeholdende indlejrede data"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Udvidede attribut har en ugyldig navnelængde"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Udvidede attribut har en ugyldig værdilængde"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Udvidede attribut har en forkert hash"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Udvidede attributblok har et ugyldigt teksthoved"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Udvidedede attributnøgle blev ikke fundet"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Utilstrækkelig plads til at lagre udvidede attributdata"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Filsystem mangler funktionen ext_attr eller inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Iknude har ikke indlejrede data"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Ingen blok for en iknude med indlejrede data"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Ingen ledig plads i indlejrede data"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Forkert magisk nummer for udvidet attributstruktur"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Iknude ser ud til at indeholde bras"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Udvidet attribut har en ugyldig værdiforskydning"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Journalflag er inkonsistente"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Genskab fil ødelagt"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Forkert genskab fil for dette filsystem"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Filsystem er ødelagt"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Ugyldig CRC detekteret i filsystem"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Journalsuperblokken er ødelagt"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Iknude er ødelagt"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil version 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Ugyldig magisk værdi i profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Profilsektion blev ikke fundet"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Profilrelation blev ikke fundet"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Forsøg på at tilføje en relation til knude som ikke er en sektion"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Et profilsektionhoved har en værdi forskellig fra nul"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Ugyldig lænket liste i profilstrukturer"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Ugyldig gruppeniveau i profilstrukturer"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Ugyldig overpeger i profilstrukturer"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Ugyldig magisk værdi i profiliterator"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Kan ikke angive værdi på sektionknude"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Ugyldigt argument videresendt til profilbibliotek"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Forsøg på at ændre en skrivebeskyttet profil"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Profils sektionsteksthoved er ikke på topniveau"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Syntaksfejl i profils sektionsteksthoved"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Syntaksfejl i profilrelation"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Ekstra lukkeparentes i profil"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Manglende åben parentes i profil"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Ugyldig magisk værdi i profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Ugyldig magisk værdi i profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Iteration via alle topniveausektioner er ikke understøttet"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ugyldig profile_section-objekt"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Ikke flere afsnit"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Ugyldigt navnesæt sendt til forespørgselsrutine"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Ingen profilfil er åben"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Ødelagt magisk værdi i profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Kunne ikke åbne profilfil"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sektion findes allerede"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ugyldig boolesk værdi"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ugyldigt heltal"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Ødelagt magisk værdi i profile_file_data_t"
+
+#: lib/support/plausible.c:118
+#, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "\tsidst monteret på %s den %s"
+
+#: lib/support/plausible.c:121
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tsidst monteret på %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\toprettet den %s"
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tsidst ændret den %s"
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Fandt en %s-partitionstabel i %s\n"
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Filen %s findes ikke og ingen størrelse blev angivet.\n"
+
+#: lib/support/plausible.c:199
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Opretter normal fil %s\n"
+
+#: lib/support/plausible.c:202
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Kunne ikke åbne %s: %s\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Enheden findes åbenbart ikke; specificerede du den korrekt?\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s er ikke en blokspeciel enhed.\n"
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s indeholder et %s-filsystem med navnet »%s«\n"
+
+#: lib/support/plausible.c:252
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s indeholder et %s-filsystem\n"
+
+#: lib/support/plausible.c:276
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s indeholder »%s«-data\n"
diff --git a/po/de.gmo b/po/de.gmo
new file mode 100644
index 0000000..75517ed
--- /dev/null
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..e59ffe5
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,9029 @@
+# German translation of e2fsprogs
+# Copyright (C) 1996 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+#
+#
+# Olaf Klemke <olke@users.sourceforge.net>,2002.
+# Marc Langer <marc@marclanger.de>,2003.
+# Philipp Thomas <pth@suse.de>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015.
+# Mario Blättermann <mario.blaettermann@gmail.com>, 2019, 2022.
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs-1.46.3\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2021-07-27 12:40-0400\n"
+"PO-Revision-Date: 2022-09-09 14:46+0200\n"
+"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
+"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Lokalize 22.04.3\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "„Bad block“ %u außerhalb des gültigen Bereichs; ignoriert.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "während der logischen Prüfung des „Bad Block“-Inodes"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "während des Lesens des „Bad Block“-Inodes"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1584
+#: e2fsck/unix.c:1698 misc/badblocks.c:1264 misc/badblocks.c:1272
+#: misc/badblocks.c:1286 misc/badblocks.c:1298 misc/dumpe2fs.c:437
+#: misc/dumpe2fs.c:702 misc/dumpe2fs.c:706 misc/e2image.c:1437
+#: misc/e2image.c:1635 misc/e2image.c:1656 misc/mke2fs.c:237
+#: misc/tune2fs.c:2886 misc/tune2fs.c:2986 resize/main.c:416
+#, c-format
+msgid "while trying to open %s"
+msgstr "beim Versuch, %s zu öffnen"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "beim Versuch, „%s“ mittels „popen“ zu öffnen"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "beim Lesen der „Bad Block“-Liste aus der Datei"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "beim Updaten des „Bad Block“-Inodes"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Warnung: Nicht zulässiger Block %u im „Bad Blocks“-Inode gefunden! Bereinigt.\n"
+
+#: e2fsck/dirinfo.c:332
+#, fuzzy
+#| msgid "while reading undo file"
+msgid "while freeing dir_info tdb file"
+msgstr "beim Lesen der Undo-Datei"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Lesefehler - Block %lu (%s) während %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Lesefehler - Block %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Fehler ignorieren"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Rückschreiben erzwingen"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Schreibfehler - Block %lu (%s) während %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Schreibfehler - Block %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "leere Verzeichnisblöcke"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "leere Verzeichnisliste"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "leerer Verzeichnisblock %u (#%d) im Inode %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s Dateiname nblocks Blockgröße\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Blockanzahl nicht zulässig!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Es konnte kein Blockpuffer (Größe=%d) reserviert werden\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "„extent rebuild inode“-Liste"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Aufruf: %s Laufwerk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "BLKFLSBUF ioctl nicht unterstützt! Puffer kann nicht geleert werden.\n"
+
+#: e2fsck/journal.c:1270
+msgid "reading journal superblock\n"
+msgstr "Journal-Superblock wird gelesen\n"
+
+#: e2fsck/journal.c:1343
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: keinen gültigen Journal-Superblock gefunden\n"
+
+#: e2fsck/journal.c:1352
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: Das Journal ist zu kurz\n"
+
+#: e2fsck/journal.c:1365
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr ""
+
+#: e2fsck/journal.c:1667 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: Journal wird wiederhergestellt\n"
+
+#: e2fsck/journal.c:1669
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: Das Journal ist nur lesbar - Keine Wiederherstellung\n"
+
+#: e2fsck/journal.c:1696
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "beim Versuch, %s erneut zu öffnen"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aerweiterte Attribute"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "AFehler beim Reservieren von Platz für"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bBlock"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "BBitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ckomprimieren"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "CKonflikte mit einem anderen Dateisystemblock"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dVerzeichnis"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dgelöscht"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eEintrag"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e „%Dn“ in %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fDateisystem"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Ffür @i %i (%Q) ist"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "gGruppe"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE @dinode"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iInode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iillegal(er)"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jJournal"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "List eine Verknüpfung"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mmehrfach beansprucht"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nungültig"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "overwaist"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pProblem in"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qQuota"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rRoot @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "ssollte sein"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "SSuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "unicht verbunden"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vGerät"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xErweiterung"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zmit Länge Null"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<Der NULL-Inode>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Der „Bad Blocks“-Inode>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<Die Benutzerquota-Inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<Die Gruppenquota-Inode>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Der „boot loader“-Inode>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Der „undelete directory“-Inode>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Des „group descriptor“-Inode>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<Der Journal-Inode>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Der reservierte Inode 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Der reservierte Inode 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "reguläre Datei"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "Verzeichnis"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "zeichenorientiertes Gerät"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "blockorientiertes Gerät"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "named pipe"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "symbolische Verknüpfung"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "Socket"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "unbekannter Dateityp mit Modus 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "indirekte Blöcke"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "doppelt indirekte Blöcke"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "dreifach indirekte Blöcke"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "Ãœbersetzerblock"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "Block Nr."
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "Benutzer"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "Gruppe"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "unbekannter Typ Quota"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "mehrfach beanspruchte Inode-Liste"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "interner Fehler: dup_blk für %llu wurde nicht gefunden\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "zurückgegeben von clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "interner Fehler: EA-Blockliste für %llu wurde nicht gefunden"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Interner Fehler: EA-Inodeliste für %u wurde nicht gefunden"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:767 e2fsck/pass2.c:1147
+msgid "reading directory block"
+msgstr "Verzeichnisblock wird gelesen"
+
+#: e2fsck/pass1.c:1166
+msgid "getting next inode from scan"
+msgstr "beim Lesen des nächsten Inodes"
+
+#: e2fsck/pass1.c:1218
+msgid "in-use inode map"
+msgstr "„in-use inode“-Liste"
+
+#: e2fsck/pass1.c:1229
+msgid "directory inode map"
+msgstr "„directory inode“-Liste"
+
+#: e2fsck/pass1.c:1239
+msgid "regular file inode map"
+msgstr "„regular file inode“-Liste"
+
+#: e2fsck/pass1.c:1248 misc/e2image.c:1289
+msgid "in-use block map"
+msgstr "Liste der Blöcke, die verwehndet werden"
+
+#: e2fsck/pass1.c:1257
+msgid "metadata block map"
+msgstr "Liste der Metadaten-Blöcke"
+
+#: e2fsck/pass1.c:1268
+#, fuzzy
+#| msgid "inode done bitmap"
+msgid "inode casefold map"
+msgstr "„inode done“-Bitmap"
+
+#: e2fsck/pass1.c:1333
+msgid "opening inode scan"
+msgstr "Inode-Scan wird gestartet"
+
+#: e2fsck/pass1.c:2101
+msgid "Pass 1"
+msgstr "Durchgang 1"
+
+#: e2fsck/pass1.c:2162
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "indirekte Blöcke von Inode %u werden gelesen"
+
+#: e2fsck/pass1.c:2213
+msgid "bad inode map"
+msgstr "fehlerhafte Inode-Liste"
+
+#: e2fsck/pass1.c:2253
+msgid "inode in bad block map"
+msgstr "Inode in „Bad Blocks“-Liste"
+
+#: e2fsck/pass1.c:2273
+msgid "imagic inode map"
+msgstr "i„magic inode“-Liste"
+
+#: e2fsck/pass1.c:2304
+msgid "multiply claimed block map"
+msgstr "mehrfach referenzierte Blockliste"
+
+#: e2fsck/pass1.c:2429
+msgid "ext attr block map"
+msgstr "ext attr block map"
+
+#: e2fsck/pass1.c:3724
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): erwartete %6lu erhielt phys %6lu (Blockanzahl %lld)\n"
+
+#: e2fsck/pass1.c:4145
+msgid "block bitmap"
+msgstr "Block-Bitmap"
+
+#: e2fsck/pass1.c:4151
+msgid "inode bitmap"
+msgstr "Inode-Bitmap"
+
+#: e2fsck/pass1.c:4157
+msgid "inode table"
+msgstr "Inode-Tabelle"
+
+#: e2fsck/pass2.c:317
+msgid "Pass 2"
+msgstr "Durchgang 2"
+
+#: e2fsck/pass2.c:568
+msgid "NLS is broken."
+msgstr ""
+
+#: e2fsck/pass2.c:1220 e2fsck/pass2.c:1404
+msgid "Can not continue."
+msgstr "Das Programm kann nicht fortfahren."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "„inode done“-Bitmap"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Peak-Memory"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Durchgang 3"
+
+#: e2fsck/pass3.c:350
+msgid "inode loop detection bitmap"
+msgstr "„inode loop detection“-Bitmap"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Durchgang 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Durchgang 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Fehler beim reservieren von Hauptspeicher"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Fehler beim reservieren von Hauptspeicher"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(nicht interaktiv)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Reparieren"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Bereinigen"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Zurücksetzen"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Freigeben"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Erweitern"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Nach /lost+found verbinden"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Erstellen"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Retten"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Verkürzen"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Inode bereinigen"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Abbrechen"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Aufteilen"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Fortsetzen"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Mehrfach referenzierte Blöcke werden geklont"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Datei löschen"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Ausgaben unterdrücken"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Trennen"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Der HTree-Index wird bereinigt"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Zurücksetzen"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr ""
+
+#: e2fsck/problem.c:74
+#, fuzzy
+#| msgid "Clear @j"
+msgid "Clear flag"
+msgstr "Journal bereinigen"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(NICHTS)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "REPARIERT"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "BEREINIGT"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "ZURÃœCKGESETZT"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "FREIGEGEBEN"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "ERWEITERT"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "WIEDER VERBUNDEN"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "ANGELEGT"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "GERETTET"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "ABGESCHNITTEN"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INODE BEREINIGT"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "ABGEBROCHEN"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "ABGESPALTEN"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "ES WIRD FORTGEFAHREN"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "MEHRFACH REFERENZIERTE BLÖCKE WURDEN GEKLONT"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "DATEI WURDE GELÖSCHT"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "UNTERDRÃœCKT"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "GETRENNT"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE-INDEX BEREINIGT"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "WIRD WIEDER AUFGEBAUT"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr ""
+
+#: e2fsck/problem.c:104
+#, fuzzy
+#| msgid "CLEARED"
+msgid "FLAG CLEARED"
+msgstr "BEREINIGT"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "Block-Bitmap für Gruppe %g ist nicht in der Gruppe. (Block %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "Inode-Bitmap für Gruppe %g ist nicht in der Gruppe. (Block %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"Inode-Tabelle für Gruppe %g ist nicht in der Gruppe. (Block %b)\n"
+"WARNUNG: GROSSER DATENVERLUST IST MÖGLICH.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Der Superblock ist unlesbar bzw. beschreibt kein gültiges ext2/ext3/ext4-\n"
+"Dateisystem. Wenn das Gerät gültig ist und ein ext2/ext3/ext4-\n"
+"Dateisystem (kein swap oder ufs usw.) enthält, dann ist der Superblock\n"
+"beschädigt, und Sie könnten versuchen, e2fsck mit einem anderen Superblock\n"
+"zu starten:\n"
+" e2fsck -b 8193 <@v>\n"
+" oder\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Die Größe des Dateisystems (laut Superblock) ist %b Blöcke.\n"
+"Die physikalische Größe des Gerätes ist %c Blöcke.\n"
+"Entweder ist der Superblock oder die Partionstabelle beschädigt!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"@S-@b_size = %b, fragsize = %c.\n"
+"Diese Version von e2fsck unterstützt keine von Blockgrößen verschiedene Fragmentgrößen.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@bs_per_group im @S = %b, sollte %c sein\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "first_data_@b im @S = %b, sollte %c sein\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"Das Dateisystem hat keine UUID; es wird eine generiert.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Hinweis: Wenn mehrere Inodes oder Bitmap-Blöcke\n"
+"neu geordnet werden müssen, oder ein Teil der Inode-Tabelle\n"
+"verschoben werden muss, könnte es helfen, e2fsck erst einmal\n"
+"mit der Option „-b %S“ zu starten. Das Problem könnte\n"
+"im primären Blockgruppenbezeichner liegen und seine\n"
+"Sicherungskopie in Ordnung sein.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Beschädigung gefunden im Superblock. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Fehler bei der Feststellung der Größe des physischen Gerät: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "@i-Anzahl in @S ist %i, sollte %j sein.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd unterstützt keine Dateitypen.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Der Superblock hat ein defektes Journal (Inode %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Externes Journal hat mehrere Dateisystem-Benutzer (nicht unterstützt).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Externes Journal kann nicht gefunden werden\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Externes Journal hat einen ungültigen Superblock\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Externes Journal unterstützt dieses Dateisystem nicht\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Der Superblock des Dateisystem-Journals hat den unbekannten Typ %N (nicht unterstützt).\n"
+"Es ist möglich, dass Ihr e2fsck älter ist und/oder dieses Journal-Format nicht unterstützt.\n"
+"Es ist ebenso möglich, dass der Joornal-Superblock defekt ist.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Der Journal-Superblock ist defekt.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr ""
+"Der Bitschalter has_journal im Superblock ist nicht gesetzt, aber ein\n"
+"Journal %s ist vorhanden.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+"Im Superblock ist der Bitschalter „needs_recovery“ gesetzt, aber ein Journal\n"
+"ist nicht vorhanden.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+"Der Bitschalter „needs_recovery“ im Superblock ist nicht gesetzt, aber das\n"
+"Journal enthält Daten.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Journal bereinigen"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr ""
+"Das Dateisystem hat Eigenschafts-Bitschalter gesetzt, ist aber ein\n"
+"Revision-0-Dateisystem. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s verwaister Inode (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "Unzulässiges %B (%b) in verwaisten Inode %i gefunden.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Bereits bereinigter %B (%b) im verwaisten Inode %i gefunden.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "Unzulässiger verwaister Inode %i im Superblock.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Unzulässiger Inode %i in der Liste der verwaisten Inodes.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Der Journal-Superblock hat einen unbekannten Nur-Lesen-Bitschalter gesetzt.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"Im Journal-Superblock ist ein unbekannter Bitschalter für eine\n"
+"inkompatible Eigenschaft gesetzt.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Diese Journal-Version wird von diesem e2fsck nicht unterstützt.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Journal wird von /%s zum versteckten Inode verschoben.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Fehler beim Verschieben des Journals: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Unvollständige V2-Journal-Superblock-Felder (vom V1-Journal) gefunden.\n"
+"Die Felder nach dem V1-Journal-Superblock werden bereinigt...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Journal trotzdem starten"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"Der Bitschalter für Wiederherstellung ist im Sicherungs-Superblock nicht\n"
+"gesetzt, das Journal wird daher trotzdem gestartet.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Die Informationen des Journal-Inodeblocks werden gesichert.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Für @f ist resize_@i nicht eingeschaltet, aber s_reserved_gdt_@bs\n"
+"ist %N; @s Null. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_@i ist nicht aktiviert, aber der zu modifizierende Inode ist nicht-Null."
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Resize-Inode ist ungültig. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Der Zeitpunkt des letzten Einhängens des Superblocks (%t,\n"
+"\tjetzt = %T) liegt in der Zukunft.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Der Zeitpunkt des letzten Schreibens des Superblocks (%t,\n"
+"\tjetzt = %T) liegt in der Zukunft.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Superblock-Hinweis für externen Superblock sollte %X sein. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Verzeichnishash-Hinweis wird zum Dateisystem hinzugefügt.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Die Prüfsumme des Gruppendeskriptors %g ist %04x, sie sollte %04y sein. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+"Gruppendeskriptor %g ist ohne eine gesetzte Eigenschaft.\n"
+"als nicht initialisiert gekennzeichnet.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Gruppendeskriptor %g hat eine ungültige Anzahl ungenutzter Inodes von %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Die letzte Gruppen-Blockbitmap ist nicht initialisiert. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Journaltransaktion %i war beschädigt, die Wiederholung wurde abgebrochen.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Die Kennung test_fs wurde gesetzt (und ext4 ist verfügbar). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Der Zeitpunkt des letzten Einhängens des Superblocks liegt in der Zukunft.\n"
+"\t(weniger als ein Tag, wahrscheinlich aufgrund falsch gesetzter Hardware-Uhr)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Der Zeitpunkt des letzten Schreibens des Superblocks liegt in der Zukunft.\n"
+"\t(weniger als ein Tag, wahrscheinlich aufgrund falsch gesetzter Hardware-Uhr)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Die Prüfsumme eines oder mehrerer Gruppendeskriptoren ist ungültig. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Die Anzahl der freien Inodes wird auf %j gesetzt (war %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Die Anzahl der freien Blöcke wird auf %c gesetzt (war %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "%U-Quota-Inode %i (%Q) wird versteckt.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "Der Superblock hat einen ungültigen MMP-Block. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "Der Superblock besitzt eine falsche MMP-Kennung. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "Superblock metadata_csum überschreibt uninit_bg; bei Eigenschaftenschalter können nicht gleichzeitig gesetzt werden."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+#, fuzzy
+#| msgid "@S MMP @b checksum does not match MMP @b. "
+msgid "@S MMP @b checksum does not match. "
+msgstr "Die MMP-Block-Prüfsumme im Superblock passt nicht zum MMP-Block."
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+"Superblock-64Bit-Dateisysteme brauchen Erweiterungen, um auf die gesamte\n"
+"Platte zugreifen zu können. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg ist zu groß. (%N, max. Wert %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Die Prüfsumme des Superblocks fes externen Journals passt nicht zum Superblock"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "ohne metadata_csum ist metadata_csum_seed im Superblock nicht nötig."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Fehler beim Initialisieren des Quota-Kontextes in der Unterstützungsbibliothek: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Die erforderliche extra isize im Superblock ist ungültig (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Ungültige gewünschte zusätzliche Isize im Superblock (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "Ungültiger %U-Quota-Inode %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Durchgang 1: Inodes, Blöcke und Größen werden geprüft\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "Root-Inode ist kein Verzeichnis. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "Für Root-Inode ist dtime gesetzt (vielleicht durch ein zu altes mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Reservierter Inode %i (%Q) hat einen ungültigen Modus. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "dtime für gelöschten Inode %i ist Null. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "Inode %i ist in Benutzung, aber hat dtime gesetzt. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "Inode %i ist ein Verzeichnis mit Länge Null. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+"Die Blockbitmap der Gruppe %g auf %b überschneidet sich mit\n"
+"einem anderen Dateisystemblock.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+"Die Inode-Bitmap der Gruppe %g bei %b überschneidet sich mit\n"
+"einem anderen Dateisystemblock.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+"Die Inode-Tabelle der Gruppe %g bei %b überschneidet sich mit\n"
+"einem anderen Dateisystemblock.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "die @b-@B (%b) von @g %g ist ungültig. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "Die Inode-Bitmap (%b) der Gruppe %g ist ungültig. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "Inode %i, i_size ist %Is, sollte %N sein. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "Inode %i, i_@bs ist %Ib, sollte %N sein. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "Unzulässiger %B (%b) in Inode %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) überlappt Dateisystem-Metadaten in @i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "Inode %i hat unzulässige(n) Block/Blöcke. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Zu viele unzulässige Blöcke in @i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "Ungültiger %B (%b) in „bad block“-Inode. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "„Bad Block“-Inode hat unzulässige(n) Block/Blöcke. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Doppelter oder unzulässiger Block in Gebrauch!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Ungültiger Block %b wird benutzt als indirekter Block des „Bad Block“-Inodes. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"Der „Bad Block“-Inode ist wahrscheinlich beschädigt worden. Sie sollten\n"
+"nun innehalten und „e2fsck -c“ ausführen, um nach defekten Blöcken in\n"
+"dem Dateisystem zu suchen.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Wenn der Block wirklich defekt ist, kann das Dateisystem nicht repariert werden.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Sie können diesen Block aus der Liste der defekten Blöcke löschen\n"
+"und hoffen, das dieser wirklich in Ordnung ist, es gibt aber\n"
+"KEINE GARANTIEN.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Der primäre Superblock (%b) ist in der Liste der defekten Blöcke.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Block %b im primären Gruppendeskriptor ist in der Liste der defekten Blöcke\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Warnung: der Superblock der Gruppe %g (%b) ist defekt.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Warnung: die Kopie des Gruppendeskriptors von Gruppe %g hat einen defekten Block (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Programmierfehler? Block #%b wird ohne Grund in process_bad_@b verlangt.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "Fehler beim Zuweisen von %N zusammenhängenende(m/n) Block/Blöcken in der @b-@g %g für %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "Fehler beim Zuweisen eines Blockpuffers zum Verschieben von %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Gruppe %g's %s wird von %b nach %c verschoben ...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Gruppe %g's %s wird nach %c verschoben ...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Warnung: Block %b von %s konnte nicht gelesen werden: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Warnung: Block %b von %s konnte nicht geschrieben werden: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "Fehler beim Zuweisen der Inode-Bitmap (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "Fehler beim Zuweisen der Block-Bitmap (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "Fehler beim Zuweisen der „icount link information“: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "Fehler beim Zuweisen des Verzeichnis-Block-Feldes: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Fehler während des Durchsuchens der Inodes (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Fehler beim Iterieren über die Blöcke in Inode %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Fehler beim Speichern der Informationen zur Inode-Anzahl (Inode=%i, Anzahl=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Fehler beim Speichern der Verzeichnis-Block-Informationen (Inode=%i, Block=%b, Anzahl=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Fehler beim Lesen des Inodes %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Inode %i hat den Imagic-Bitschalter gesetzt. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Spezielle Geräte-/Socket-/Fifo-/Symlink-Datei (Inode %i) hat den Bitschalter für\n"
+"unveränderbar oder Nur-Anhängen gesetzt. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Spezieller Geräte-/Socket-/Fifo-Inode %i hat die Größe Null. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "Inode %i wird nicht verwendet, aber enthält Daten. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "Journal ist keine reguläre Datei. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "Inode %i war Teil der Liste verwaister Inodes. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+"Inodes wurden gefunden, die Teil einer defekten verketteten Liste von\n"
+"verwaisten Inodes waren. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "Fehler beim Zuweisen der refcount-Struktur (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Fehler beim Lesen des Blocks für erweiterte Attribute %b für Inode %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "Inode %i hat einen defekten Erweiterte-Attribute-Block %b. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Fehler beim Lesen des Blocks für erweiterte Attribute (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "Der Referenzzähler des Blocks für erweiterte Attribute %b ist %r, richtig wäre %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Fehler beim Schreiben des Blocks für erweiterte Attribute %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "Der Block für erweiterte Attribute %b hat h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "Fehler beim Anfordern von Speicher für die Struktur zur Verwaltung der Speicherreservierungen für die erweiterten Attribute. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "Der Block für erweiterte Attribute %b ist defekt (Kollision der Platzanforderungen). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "Der Block für erweiterte Attribute %b ist defekt (ungültiger Name). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "Der Block für erweiterte Attribute %b ist defekt (ungültiger Wert). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "Inode %i ist zu groß. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) macht das Verzeichnis zu groß. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "Block #%B (%b) macht die Datei zu groß. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "Block #%B (%b) macht den Symlink zu groß. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "Inode %i hat INDEX_FL Flag auf einem Dateisystem ohne HTREE-Unterstützung gesetzt.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "Inode %i hat den INDEX_FL-Bitschalter gesetzt, ist aber kein Verzeichnis.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "HTREE-Verzeichnis-Inode %i hat einen unvollständigen Wurzelknoten („root node“).\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "HTREE-Verzeichnis-Inode %i hat eine nicht unterstützte Hash-Version (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "@h %i benutzt einen nicht unterstützten Bitschalter für einen Htree-Wurzelknoten.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "@h %i hat eine zu große Verzeichnistiefe von (%N)\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Der Inode für defekte Blöcke hat einen indirekten Block (%b), der mit\n"
+"den Dateisystem-Metadaten in Konflikt steht. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Erzeugung des Vergrößerungs-Inodes scheiterte: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "Inode %i hat eine ungültige Extragröße (%IS)\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "Ein erweitertes Attribut in Inode %i hat eine ungültige „namelen“ von %N.\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "Ein erweitertes Attribut in Inode %i hat einen ungültigen Werteversatz von %N.\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "Ein erweitertes Attribut in Inode %i hat einen ungültigen Werteblock von %N (muss 0 sein).\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "Ein erweitertes Attribut in Inode %i hat eine ungültige Wertegröße von %N.\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "Ein erweitertes Attribut in Inode %i hat den ungültigen Hash %N.\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "Inode %i ist ein %It, aber es sieht so aus, als ob es tatsächlich ein Verzeichnis ist.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Fehler beim Iterieren über den Extent-Baum @x in Inode %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Das Iterieren der Erweiterungen (Extents) in Inode %i scheiterte\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i hat eine @ne Erweiterung\n"
+"\t(logischer Block %c, @n physischer Block %b, Länge %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"Inode %i hat eine ungültige Erweiterung\n"
+"\t(logischer Block %c, physischer Block %b, unzulässige Länge %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+"Inode %i hat den EXTENTS_FL-Bitschalter gesetzt, obwohl das Dateisystem\n"
+"Erweiterungen nicht unterstützt.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "Inode %i besitzt das Erweiterungsformat, aber dem Superblock fehlt die Eigenschaft EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "Dem Inode %i fehlt EXTENT_FL, er hat aber das Format einer Erweiterung\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "In schnellem Symlink %i ist EXTENT_FL gesetzt. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i hat unregelmäßige Erweiterungen\n"
+"\t(ungültiger logischer Block %c, physischer Block %b, Länge %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "Inode %i hat einen ungültigen Erweiterungs-Knoten (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Fehler beim Umwandeln der Subcluster-Blockbitmap: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "Der Quota-Inode ist keine reguläre Datei. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "Quota-Inode wird nicht benutzt, enthält aber Daten. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "Der Quota-Inode ist sichtbar für den Benutzer. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "Der Inode für defekte Blöcke sieht ungültig aus. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"Inode %i hat eine Erweitertung der Länge Null\n"
+"\t(ungültiger logischer Block %c, physischer Block %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "Inode %i scheint Müll zu enthalten. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "Die Inode %i passiert die Prüfungen, aber die Prüfsumme passt nicht zur Inode."
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "Das erweiterte Attribut für Inode %i ist defekt (Kollision der Speicerplatzanforderungen). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Der Erweiterungsblock von INode %i passiert die Prüfungen, allerdings passt die Prüfsumme nicht zur Erweiterung\n"
+"\t(logischer Block %c, physischer Block %b, Länge %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "Der Block für erweiterte Attribute von Inode %i passiert die Prüfungen, allerdings passt die Prüfsumme nicht zum Block. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Ebene %N des internen Erweiterungsknotens von Inode %i:\n"
+"Der logische Start %b passt nicht zum logischen Start %c auf der nächsten Ebene."
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i, das Ende der Erweiterung ist außerhalb des gültigen Bereichs\n"
+"\t(logischer Block %c, physischer Block %b, Länge %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "Inode %i besitzt das Erweiterungsformat, aber dem Superblock fehlt die Eigenschaft EXTENTS\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "Inode %i hat den Bitschalter INDEX_DATA_FL gesetzt obwohl das Dateisystem Inline-Daten nicht unterstützt.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "Block %b von Inode %i steht in Konflikt mit kritischen Metadaten, Blockprüfungen werden übersprungen.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "Verzeichnisinode %i Block %b sollte in Block %c sein. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr ""
+"Verzeichnis-Inode %i hat eine Erweiterung, die als nicht initialisiert\n"
+"gekennzeichnet ist in Block %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"Die Inode %i, logischer Block %b (physischer Block %c) verletzt die Regeln zur\b Anforderung von Cluster-Speicher.\n"
+"Dies wird in Durchgang 1B repariert.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "Inode %i hat den INDEX_DATA_FL-Bitschalter gesetzt, aber es wurde kein erweitertes Attribut gefunden. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Spezielle Geräte-/Socket-/Fifo-Datei (Inode %i) hat den Erweiterungs-\n"
+"oder Inlinedaten-Bitschalter gesetzt. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "Inode %i hat den Vorspann einer Erweeiterung aber der Inlinedaten-Bitschalter ist gesetzt.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "Inode %i scheint Inlinedaten zu besitzen, aber der Erweiterungs-Bitschalter ist gesetzt.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "Inode %i scheint eine Blockliste zu haben, aber die Bitschalter für Inlinedaten und Erweiterungen sind gesetzt.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "Die Bitschalter von Inode %i für Inlinedaten und Erweiterungen sind gesetzt aber i_block enthält Müll.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "Die Liste defekter Blöcke sagt, daß die Inode der Liste defekt ist. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "Fehler beim Anfordern von Speicher für die Struktur für Speicheranforderungen für die Erweiterungsregion. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i hat eine doppelte Erweiterungsliste\n"
+"\t(logischer Block %c, ungültiger physischer Block %b, Länge %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+#, fuzzy
+#| msgid "@A memory for encrypted @d list\n"
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "Fehler beim resaervieren von Speicher für die Liste verschlüsselter Verzeichnisse\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "Der Erweiterungsbaum von Inode %i könnte flacher sein (%b; könnte <= %c sein)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "Inode %i auf dem Bigalloc-Dateisystem kann nicht auf Blockcache gemappt werden. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "Inode %i hat einen defekten Erweiterungs-Vorspann. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Zeitstempel in Inode %i nach 2310-04-04 sind wahrscheinlich von vor 1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+#, fuzzy
+#| msgid "@i %i has a bad @a @b %b. "
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "Inode %i hat einen defekten Erweiterte-Attribute-Block %b. "
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+#, fuzzy
+#| msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "Inode %i besitzt das Erweiterungsformat, aber dem Superblock fehlt die Eigenschaft EXTENTS\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, fuzzy, no-c-format
+#| msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr ""
+"Verzeichnis-Inode %i hat eine Erweiterung, die als nicht initialisiert\n"
+"gekennzeichnet ist in Block %c. "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, fuzzy, c-format
+#| msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "Inode %i hat den INDEX_FL-Bitschalter gesetzt, ist aber kein Verzeichnis.\n"
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, fuzzy, c-format
+#| msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "Inode %i hat den INDEX_FL-Bitschalter gesetzt, ist aber kein Verzeichnis.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, fuzzy, c-format
+#| msgid "Encrypted @E is too short.\n"
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "Der verschlüsselte Eintrag „%Dn†in %p (%i) ist zu kurz.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Zusätzliche Läufe werden durchgeführt, um die von mehr als einem Inode\n"
+"beanspruchten Blöcke zu klären ...\n"
+"Durchgang 1B: Suche nach mehrfach beanspruchten Blöcken\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Mehrfach beanspruchte(r) Block/Blöcke in Inode %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Fehler beim Prüfen der Inodes (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "Fehler beim Zuweisen der Inode-Bitmap (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Fehler beim Iterieren über die Blöcke in Inode %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Fehler bei der Anpassung des Referenzzählers des Blocks für erweiterte Attribute %b (Inode %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Durchgang 1C: Verzeichnisse werden nach Inodes mit mehrfach belegten Blöcken durchsucht.\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Durchgang 1D: Mehrfach belegte Blöcke werden abgeglichen.\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Datei %Q (Inode #%i, Änderungszeit %IM) \n"
+" hat %r mehrfach belegte(n) Block/Blöcke, gemeinsam genutzt mit %N Datei(en):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (Inode #%i, Änderungszeit %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<@f-Metadaten>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Es gibt %N Inodes, die mehrfach belegte Blöcke enthalten.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Mehrfach belegte Blöcke wurden bereits neu zugeordnet bzw. geklont.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Datei kann nicht geklont werden: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Durchgang 1E: Erweiterungsbäume werden optimiert\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Erweiterungsbaum %p (%i) konnte nicht optimiert werden: %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Erweiterungsbäume werden optimiert: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Interner Fehler: die max. Tiefe des Erweiterungsbaums ist zu groß (%b; erwartet wurde %c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "Der Erweiterungsbaum von Inode %i (auf Ebene %b) könnte kürzer sein. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "Der Erweiterungsbaum von Inode %i (auf Ebene %b) könnte schmaler sein. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Durchgang 2: Verzeichnisstruktur wird geprüft\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Falsche Inode-Nummer für „.“ in Verzeichnis-Inode %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "Eintrag hat falsche Inode-Nummer: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "Eintrag „%Dn“ in %p (%i) hat gelöschten/unbenutzten Inode %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "Eintrag „%Dn“ in %p (%i) ist ein Link auf „.“ "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) zeigt auf einen Inode (%Di) in einem defekten Block.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "Eintrag „%Dn“ in %p (%i) ist ein Link auf das Verzeichnis %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) ist ein Link auf den Root-Inode.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) hat ein unzulässiges Zeichen im Namen.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Fehlende „.“ im Verzeichnis-Inode %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Fehlender Eintrag „..“ im Verzeichnis-Inode %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Der erste Eintrag „%Dn“ (Inode=%Di) im Verzeichnis-Inode %i (%p) sollte „.“ sein\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Der zweite Eintrag „%Dn“ (Inode=%Di) im Verzeichnis-Inode %i sollte „..“ sein\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr für Inode %i (%Q) ist %IF, sollte Null sein.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl für Inode %i (%Q) ist %If, sollte Null sein.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+#, fuzzy
+#| msgid "i_fsize @F %N, @s zero.\n"
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_fsize für Inode %i (%Q) ist %N, @s null.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag für Inode %i (%Q) ist %N, sollte Null sein.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize für Inode %i (%Q) ist %N, @s null.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "Inode %i (%Q) hat einen ungültigen Modus (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "Verzeichnis-Inode %i, %B, Offset %N: Verzeichnis defekt\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "Verzeichnis-Inode %i, %B, Offset %N: Dateiname zu lang\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "Verzeichnis-Inode %i hat einen nicht zugewiesenen %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Verzeichniseintrag „.“ im Verzeichnis-Inode %i ist nicht NULL-terminiert\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Verzeichniseintrag „..“ im Verzeichnis-Inode %i ist nicht NULL-terminiert\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "Inode %i (%Q) ist ein ungültiges zeichenorientiertes Gerät.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "Inode %i (%Q) ist ein ungültiges blockorientiertes Gerät.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) ist ein doppelter Eintrag für „.“.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) ist ein doppelter Eintrag für „..“.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Interner Fehler: dir_info für %i kann nicht gefunden werden.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) hat eine rec_len von %Dr, sollte %N sein.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "Fehler beim Zuweisen der icount-Struktur: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Fehler beim Durchlaufen der Verzeichnisblöcke: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Fehler beim Lesen des Verzeichnisblocks %b (Inode %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Fehler beim Schreiben des Verzeichnisblocks %b (Inode %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "Fehler beim Zuweisen eines neuen Verzeichnisblocks für Inode %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Fehler bei der Freigabe von Inode %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "Verzeichniseintrag für „.“ in %p (%i) ist groß.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "Inode %i (%Q) ist eine ungültige FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "Inode %i (%Q) ist ein ungültiger Socket.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Dateitypü für Eintrag „%Dn“ in %p (%i) wird auf %N gesetzt.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "Eintrag „%Dn“ in %p (%i) hat einen falschen Dateityp (war %Dt, sollte %N sein).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) hat Dateityp gesetzt.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) hat einen Namen der Länge Null.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symlink %Q (Inode #%i) is invalid.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "Erweiterte-Attribute-Block für Inode %i (%Q) ist ungültig (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+"Dateisystem enthält große Dateien, aber im Superblock ist\n"
+"der Bitschalter LARGE_FILE nicht gesetzt.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B ist nicht referenziert\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B doppelt referenziert\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B hat ungültigen Minimumhash\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B hat ungültigen Maximalhash\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "Ungültiger HTREE-Verzeichnis-Inode %d (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+#, fuzzy
+#| msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr ""
+"Dateisystem enthält große Dateien, aber im Superblock ist\n"
+"der Bitschalter LARGE_FILE nicht gesetzt.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d (%q): falsche Blocknummer %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: Wurzelknoten ist ungültig\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B hat eine ungültige Begrenzung (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B hat einen ungültigen Zählerstand (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B hat eine unsortierte Hashtabelle\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: %B hat eine ungültige Tiefe (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Doppelter Eintrag „%Dn“ in %p (%i) gefunden. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"Eintrag „%Dn“ in %p (%i) hat keinen eindeutigen Dateinamen.\n"
+"Wird in %s umbenannt"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Doppelter Eintrag „%Dn“ gefunden.\n"
+"\t%p (%i) wird für die Neuerstellung markiert.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi für Inode %i (%Q) %N, sollte Null sein.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Unerwarteter Block im HTREE-Verzeichnis-Inode %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) verweist auf Inode %Di in Gruppe %g, für die _INODE_UNINIT gesetzt ist.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+"Eintrag „%Dn“ in %p (%i) verweist auf Inode %Di, der im Bereich ungenutzter Inodes\n"
+"von Gruppe %g zu finden ist.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi für Inode %i (%Q) ist %N, sollte Null sein.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "Problem in HTREE-Verzeichnis-Inode %d: der Wurzelknoten ist ungültig.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "Problem im HTREE-Verzeichnis-Inode %d: der interne Knoten ist ungültig\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "Verzeichnis-Inode %i, %B, Offset %N: das Verzeichnis hat keine Prüfsumme.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "Verzeichnis-Inode %i, %B: das Verzeichnis besteht die Prüfungen aber die Püfsumme ist falsch.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Die Größe von Inode %i (%N) eines Inline-Verzeichnisses muss ein Mehrfaches von 4 sein.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Das Korrigieren der Größe von Inode %i eines Inline-Verzeichnisses ist fehl geschlagen.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Der verschlüsselte Eintrag „%Dn†in %p (%i) ist zu kurz.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+#, fuzzy
+#| msgid "@E has illegal characters in its name.\n"
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "Eintrag „%Dn“ in %p (%i) hat ein unzulässiges Zeichen im Namen.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+#, fuzzy
+#| msgid "Duplicate @E found. "
+msgid "Duplicate filename @E found. "
+msgstr "Doppelter Eintrag „%Dn“ in %p (%i) gefunden. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Durchgang 3: Verzeichnisverknüpfungen werden geprüft\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "Root-Inode nicht zugeordnet. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Kein Platz im Verzeichnis „lost+found“. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Nicht verbundener Verzeichnis-Inode %i (%p)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/lost+found nicht gefunden. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "„..“ in %Q (%i) ist %P (%j), sollte %q (%d) sein.\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Verzeichnis /lost+found ist falsch oder fehlt. Wiederverbinden nicht möglich.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Erweitern von /lost+found nicht möglich: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Wiederverbinden von %i nicht möglich: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Fehler während der Suche nach /lost+found: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b: %m während des Versuches, das Verzeichnis /lost+found zu erzeugen.\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: %m während des Versuches, das Verzeichnis /lost+found zu erzeugen.\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_@b: %m während des Versuches, das Verzeichnis /lost+found zu erzeugen.\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_@b: %m während des Schreibens des Verzeichnisblocks für /lost+found\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Fehler während des Anpassens der Inode-Anzahl auf Inode %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Eigentümer von Inode %i konnte nicht repariert werden: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Eigentümer von Inode %i konnte nicht repariert werden: \n"
+"Verzeichniseintrag des Eigentümers wurde nicht gefunden.\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Fehler beim Erzeugen des Wurzelverzeichnisses (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Fehler beim Erzeugen des Verzeichnisses /lost+found (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "Der Wurzel-Inode ist kein Verzeichnis; Abbruch.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Ohne Wurzel-Inode ist weiteres Arbeiten nicht möglich.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found ist kein Verzeichnis (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/@l hat Inline-Daten\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Es kann kein Platz für /@l reserviert werden.\n"
+"Verlorene Dateien werden daher in das Wurzelverzeichnis geschrieben"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Der vorhandene Platz reicht nicht zur Rettung verlorener Dateien!\n"
+"Verschieben sie Daten von dem Dateisystem auf ein anderes und lassen\n"
+"Sie dann e2fsck noch einmal laufen.\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/lost+found ist verschlüsselt\n"
+
+#: e2fsck/problem.c:1996
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Durchgang 3A: Verzeichnisse werden optimiert\n"
+
+#: e2fsck/problem.c:2002
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "dirs_to_hash Iterator konnte nicht erzeugt werden: %m\n"
+
+#: e2fsck/problem.c:2007
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Verzeichnis %q (%d) konnte nicht optimiert werden: %m\n"
+
+#: e2fsck/problem.c:2012
+msgid "Optimizing directories: "
+msgstr "Verzeichnisse werden optimiert: "
+
+#: e2fsck/problem.c:2029
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Durchgang 4: Referenzzähler werden überprüft\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2035
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "Nicht verbundener Inode der Länge Null %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "Nicht verbundener Inode %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2046
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "Der Referenzzähler von Inode %i ist %Il, sollte aber %N sein. "
+
+# So etwas sollte in einer ernstzunehmenden Software nicht erscheinen,
+# selbst wenn es (derber) Humor ist.
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2050
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"WARNUNG: PROGRAMMIERFEHLER IN E2FSCK!\n"
+"\tODER JEMAND PRÜFT EIN EINGEHÄNGTES (AKTIVES) DATEISYSTEM.\n"
+"@i_link_info[%i] ist %N, @i.i_links_count ist %Il. Sie sollten identisch sein!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2057
+#, fuzzy
+#| msgid "@i %i ref count is %Il, @s %N. "
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "Der Referenzzähler von Inode %i ist %Il, sollte aber %N sein. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2062
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2067
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2074
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Durchgang 5: Zusammengefasste Gruppeninformation wird geprüft\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2079
+msgid "Padding at end of @i @B is not set. "
+msgstr "Auffüllbyte am Ende der Inode-Bitmap ist nicht gesetzt. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2084
+msgid "Padding at end of @b @B is not set. "
+msgstr "Auffüllbyte am Ende der Inode-Bitmap ist nicht gesetzt. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2089
+msgid "@b @B differences: "
+msgstr "Unterschiede in der Block-Bitmap: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2111
+msgid "@i @B differences: "
+msgstr "Unterschiede in der Inode-Bitmap: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2133
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Die Anzahl freier Inodes für Gruppe #%g ist falsch (%i, gezählt=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2138
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Die Anzahl der Verzeichnisse für Gruppe #%g ist falsch (%i, gezählt=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2143
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Die Anzahl freier Inodes ist falsch (%i, gezählt=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2148
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Die Anzahl freier Blöcke in Gruppe #%g ist falsch (%b, gezählt=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2153
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Die Anzahl freier Blöcke ist falsch (%b, gezählt=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2158
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr ""
+"PROGRAMMIERFEHLER: Dateisystem (#%N) Bitmap-Endpunkte (%b, %c) stimmenen nicht\n"
+"mit den berechneten Bitmap-Endpunkten (%i, %j) überein\n"
+
+#: e2fsck/problem.c:2164
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Interner Fehler: das Ende der Bitmap (%N) wird erraten\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2170
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Fehler beim Hineinkopieren der Inode-Bitmap: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Fehler beim Hineinkopieren der Ersatz-Blockbitmap: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2206
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "Blöcke von Gruppe %g sind in Benutzung, obwohl die Gruppe als BLOCK_UNINIT markiert ist\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "Die Inodes der Gruppe %g sind in Benutzung, obwohl die Gruppe als INODE_UNINIT markiert ist\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "Die Inode-Bitmap der Gruppe %g passt nicht zur Prüfsumme.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "Die Block-Bitmap der Gruppe %g passt nicht zur Prüfsumme.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2231
+msgid "Recreate @j"
+msgstr "Journal wird wiederhergestellt"
+
+#: e2fsck/problem.c:2236
+msgid "Update quota info for quota type %N"
+msgstr "Quota-Info für Typ %N wird aktualisiert"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2242
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "beim Setzen der Blockgruppen-Prüfsummeninfo: %m\n"
+
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Fehler beim Lesen de Der Dateisysteminfo: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Fehler beim Schreiben der gepufferten Daten: %m\n"
+
+#: e2fsck/problem.c:2259
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Beim Schreiben der Quota-Info für Typ %N trat ein Fehler auf: %m\n"
+
+#: e2fsck/problem.c:2422
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Unbenutzter Fehlercode (0x%x)!\n"
+
+#: e2fsck/problem.c:2552 e2fsck/problem.c:2556
+msgid "IGNORED"
+msgstr "IGNORIERT"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "in move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, fuzzy, c-format
+#| msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Benutzter Speicher: %d, vergangende Zeit: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "Größe des Inodes=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1330
+msgid "while opening inode scan"
+msgstr "beim Start des Inode-Scans"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "beim Starten der Inode-Prüfung"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "während der Inode-Prüfung"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+#| msgid "while calling ext2fs_block_iterate for inode %d"
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "während des Aufrufs von ext2fs_block_iterate für Inode %d"
+
+#: e2fsck/super.c:249
+#, fuzzy, c-format
+#| msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "während des Aufrufs von ext2fs_adjust_ea_refcount2 für Inode %d"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Wird gekürzt"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Wird bereinigt"
+
+#: e2fsck/unix.c:78
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Aufruf: %s [-panyrcdfktvDFV] [-b Superblock] [-B Blockgröße]\n"
+"\t\t[-l|-L Bad_Blocks_Datei] [-C Dateideskriptor] [-j externes_Journal]\n"
+"\t\t[-E erweiterte_Optionen] [-z Undo_Datei] Gerät\n"
+
+#: e2fsck/unix.c:83
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Notfallhilfe:\n"
+" -p automatische Reparatur (keine Fragen)\n"
+" -n keine Veränderungen am Dateisystem vornehmen\n"
+" -y Alle Fragen mit „Ja†beantworten\n"
+" -c Nach defekten Blöcken suchen und diese zur\n"
+" Liste der defekten Blöcke hinzufügen\n"
+" -f Die Überprüfung erzwingen, auch wenn alles i.O. erscheint\n"
+
+#: e2fsck/unix.c:89
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Ausführliche Ausgaben\n"
+" -b Superblock Alternativen Superblock verwenden\n"
+" -B Blockgröße Blockgröße beim Suchen des Superblocks erzwingen\n"
+" -j externes-Journal Angabe des Speicherortes des externen Jounals\n"
+" -l bad_blocks_file Zur Liste der defekten Blöcke hinzufügen\n"
+" -L bad_blocks_file Liste der defekten Blöcke definieren\n"
+" -z undo_file Eine Datei zum rückgängig machen der Änderungen erzeugen\n"
+
+#: e2fsck/unix.c:137
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u Dateien (%0d.%d%% nicht zusammenhängend), %llu/%llu Blöcke\n"
+
+#: e2fsck/unix.c:164
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u Inode ist in Benutzung (%2.2f%% von %u)\n"
+msgstr[1] ""
+"\n"
+"%12u Inodes sind in Benutzung (%2.2f%% von %u)\n"
+
+#: e2fsck/unix.c:168
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u nicht zusammenhängende Datei (%0d.%d%%)\n"
+msgstr[1] "%12u nicht zusammenhängende Dateien (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:173
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u nicht zusammenhängendes Verzeichnis (%0d.%d%%)\n"
+msgstr[1] "%12u nicht zusammenhängende Verzeichnisse (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:178
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " # von Inodes mit ind/dind/tind Blöcken: %u/%u/%u\n"
+
+#: e2fsck/unix.c:186
+msgid " Extent depth histogram: "
+msgstr " Histogramm der Tiefe von Erweiterungen: "
+
+#: e2fsck/unix.c:195
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu Block wird benutzt (%2.2f%% von %llu)\n"
+msgstr[1] "%12llu Blöcke werden benutzt (%2.2f%% von %llu)\n"
+
+#: e2fsck/unix.c:200
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u defekter Block\n"
+msgstr[1] "%12u defekte Blöcke\n"
+
+#: e2fsck/unix.c:202
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u große Datei\n"
+msgstr[1] "%12u große Dateien\n"
+
+#: e2fsck/unix.c:204
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u reguläre Datei\n"
+msgstr[1] ""
+"\n"
+"%12u reguläre Dateien\n"
+
+#: e2fsck/unix.c:206
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u Verzeichnis\n"
+msgstr[1] "%12u Verzeichnisse\n"
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u zeichenorientierte Gerätedatei\n"
+msgstr[1] "%12u zeichenorientierte Gerätedateien\n"
+
+#: e2fsck/unix.c:211
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u Blockgerätedatei\n"
+msgstr[1] "%12u Blockgerätedateien\n"
+
+#: e2fsck/unix.c:213
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u Fifo\n"
+msgstr[1] "%12u Fifos\n"
+
+#: e2fsck/unix.c:215
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u Verknüpfung\n"
+msgstr[1] "%12u Verknüpfungen\n"
+
+#: e2fsck/unix.c:217
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u symbolische Verknüpfung"
+msgstr[1] "%12u symbolische Verknüpfungen"
+
+#: e2fsck/unix.c:219
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u schnelle symbolische Verknüpfung)\n"
+msgstr[1] " (%u schnelle symbolische Verknüpfungen)\n"
+
+#: e2fsck/unix.c:223
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u Socket\n"
+msgstr[1] "%12u Sockets\n"
+
+#: e2fsck/unix.c:227
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u Datei\n"
+msgstr[1] "%12u Dateien\n"
+
+#: e2fsck/unix.c:240 misc/badblocks.c:1001 misc/tune2fs.c:3078 misc/util.c:129
+#: resize/main.c:356
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "bei der Prüfung, ob %s eingehängt ist."
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Warnung! %s ist eingehängt.\n"
+
+#: e2fsck/unix.c:264
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Warnung! %s wird verwendet.\n"
+
+#: e2fsck/unix.c:270
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s ist eingehängt.\n"
+
+#: e2fsck/unix.c:272
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s wird verwendet.\n"
+
+#: e2fsck/unix.c:274
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Fortsetzung nicht möglich, wird abgebrochen.\n"
+"\n"
+
+#: e2fsck/unix.c:276
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"WARNUNG!!! Das Dateisystem ist eingehängt. Wenn Sie fortfahren, ***WERDEN***\n"
+"Sie ***SCHWERWIEGENDE*** Schäden am Dateisystem verursachen.\n"
+"\n"
+
+#: e2fsck/unix.c:281
+msgid "Do you really want to continue"
+msgstr "Wirklich fortfahren"
+
+#: e2fsck/unix.c:283
+msgid "check aborted.\n"
+msgstr "Prüfung abgebrochen.\n"
+
+#: e2fsck/unix.c:377
+msgid " contains a file system with errors"
+msgstr " enthält ein fehlerhaftes Dateisystem"
+
+#: e2fsck/unix.c:379
+msgid " was not cleanly unmounted"
+msgstr " wurde nicht ordnungsgemäß ausgehängt"
+
+#: e2fsck/unix.c:381
+msgid " primary superblock features different from backup"
+msgstr "Eigenschaften des primären Superblocks unterscheiden sich von der Datensicherung"
+
+#: e2fsck/unix.c:385
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " wurde %u-mal ohne Überprüfung eingehängt"
+
+#: e2fsck/unix.c:392
+msgid " has filesystem last checked time in the future"
+msgstr " hat einen in der Zukunft liegenden Zeitpunkt der letzten Püfung des Dateisystems"
+
+#: e2fsck/unix.c:398
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " wurde %u Tage ohne Überprüfung genutzt"
+
+#: e2fsck/unix.c:406
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:412
+msgid ", check forced.\n"
+msgstr ", Prüfung erzwungen.\n"
+
+#: e2fsck/unix.c:445
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: sauber, %u/%u Dateien, %llu/%llu Blöcke"
+
+#: e2fsck/unix.c:465
+msgid " (check deferred; on battery)"
+msgstr " (Prüfung nach nächstem Einhängen)"
+
+#: e2fsck/unix.c:468
+msgid " (check after next mount)"
+msgstr " (Prüfung nach nächstem Einhängen)"
+
+#: e2fsck/unix.c:470
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (Prüfung nach %ld Einhängevorgängen)"
+
+#: e2fsck/unix.c:620
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "Fehler: /dev/null (%s) kann nicht geöffnet werden\n"
+
+#: e2fsck/unix.c:691
+msgid "Invalid EA version.\n"
+msgstr "Ungültige EA-Version.\n"
+
+#: e2fsck/unix.c:704
+msgid "Invalid readahead buffer size.\n"
+msgstr "Ungültige Größe für den Vorauslesen-Puffer.\n"
+
+#: e2fsck/unix.c:767
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Unbekannte erweiterte Option: %s\n"
+
+#: e2fsck/unix.c:775
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| "Bad extended option(s) specified: %s\n"
+#| "\n"
+#| "Extended options are separated by commas, and may take an argument which\n"
+#| "\tis set off by an equals ('=') sign.\n"
+#| "\n"
+#| "Valid extended options are:\n"
+#| "\tsuperblock=<superblock number>\n"
+#| "\tblocksize=<blocksize>\n"
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Falsche erweiterte Optionen angegeben: %s\n"
+"\n"
+"Erweiterte Optionen werden durch Kommata getrennt. Manche erwarten ein\n"
+"\tArgument, welches mit Gleichheitszeichen („=“) zugewiesen wird.\n"
+"\n"
+"Gültige erweiterte Optionen sind:\n"
+"\tsuperblock=<Nummer des Spuperblocks>\n"
+"\tblocksize=<Blockgröße>\n"
+"\n"
+
+#: e2fsck/unix.c:779
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:788
+#, fuzzy
+#| msgid "Invalid readahead buffer size.\n"
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "Ungültige Größe für den Vorauslesen-Puffer.\n"
+
+#: e2fsck/unix.c:801
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaxfehler in der Konfigurationsdatei von e2fsck (%s, Zeile %d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:874
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Fehler bei Überprüfung des Datei-Deskriptors %d: %s\n"
+
+#: e2fsck/unix.c:878
+msgid "Invalid completion information file descriptor"
+msgstr "Ungültiger „completion information“-Datei-Deskriptor"
+
+#: e2fsck/unix.c:893
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Nur eine der Optionen -p/-a, -n oder -y darf angegeben werden."
+
+#: e2fsck/unix.c:914
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Die Option -t wird von dieser e2fsck-Version nicht unterstützt.\n"
+
+#: e2fsck/unix.c:946 e2fsck/unix.c:1024 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1778 misc/tune2fs.c:2078 misc/tune2fs.c:2096
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Nicht möglich, „%s“ aufzulösen"
+
+#: e2fsck/unix.c:1003
+msgid "The -n and -D options are incompatible."
+msgstr "Die Optionen -n und -D schließen sich gegenseitig aus."
+
+#: e2fsck/unix.c:1008
+msgid "The -n and -c options are incompatible."
+msgstr "Die Optionen -n und -c schließen sich gegenseitig aus."
+
+#: e2fsck/unix.c:1013
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Die Optionen -n und -l/-L schließen sich gegenseitig aus."
+
+#: e2fsck/unix.c:1037
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Die Optionen -D und -E fixes_only sind inkompatibel."
+
+#: e2fsck/unix.c:1043
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Die Optionen -E bmap2extent and fixes_only sind inkompatibel."
+
+#: e2fsck/unix.c:1094
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "beim Öffnen von %s für die Puffer-Leerung"
+
+#: e2fsck/unix.c:1100 resize/main.c:385
+#, c-format
+msgid "while trying to flush %s"
+msgstr "während des Rückschreibeversuches auf %s"
+
+#: e2fsck/unix.c:1107
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Die Optionen -c und -l/-L dürfen nicht gleichzeitig verwendet werden.\n"
+
+#: e2fsck/unix.c:1154
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr "2FSCK_JBD_DEBUG „%s“ ist keine Ganzzahl\n"
+
+#: e2fsck/unix.c:1163
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Ungültiges nicht-numerisches Argument für -%c („%s“)\n"
+"\n"
+
+#: e2fsck/unix.c:1254
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr ""
+"MMP-Intervall ist %u Sekunden und die gesamte Wartezeit ist %u Sekunden.\n"
+"Bitte warten...\n"
+
+#: e2fsck/unix.c:1271 e2fsck/unix.c:1276
+msgid "while checking MMP block"
+msgstr "beim Prüfen des MMP-Blocks"
+
+#: e2fsck/unix.c:1278
+#, fuzzy, c-format
+#| msgid ""
+#| "If you are sure the filesystem is not in use on any node, run:\n"
+#| "'tune2fs -f -E clear_mmp {device}'\n"
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Wenn Sie sicher sind, dass das Dateisystem auf keinem Knoten benutzt wird,\n"
+"führen Sie bitte Folgendes aus:\n"
+"„tune2fs -f -E clear_mmp {device}“\n"
+
+#: e2fsck/unix.c:1294
+msgid "while reading MMP block"
+msgstr "beim Lesen des MMP-Blocks."
+
+#: e2fsck/unix.c:1314 e2fsck/unix.c:1366 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2723 misc/mke2fs.c:2774 misc/tune2fs.c:2803
+#: misc/tune2fs.c:2848 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Das bestehende Dateisystem wird überschrieben, dies kann mittels des Befehls\n"
+"„e2undo %s %s“ rückgängig gemacht werden.\n"
+
+#: e2fsck/unix.c:1355 misc/e2undo.c:274 misc/mke2fs.c:2763 misc/tune2fs.c:2837
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "beim Versuch, %s zu löschen"
+
+#: e2fsck/unix.c:1381 misc/mke2fs.c:2789 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "beim Versuch, die Datei mit den Daten zur Rückgängigmachung anzulegen\n"
+
+#: e2fsck/unix.c:1425
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Fehler: ext2fs-Bibliotheks-Version ist zu alt!\n"
+
+#: e2fsck/unix.c:1432
+msgid "while trying to initialize program"
+msgstr "bei der Programminitialisierung"
+
+#: e2fsck/unix.c:1469
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\t%s wird verwendet, %s\n"
+
+#: e2fsck/unix.c:1481
+msgid "need terminal for interactive repairs"
+msgstr "Ein Terminal wird für interaktive Reparaturen benötigt"
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s Datensicherungs-Blöcke werden versucht ...\n"
+
+#: e2fsck/unix.c:1544
+msgid "Superblock invalid,"
+msgstr "Superblock ungültig,"
+
+#: e2fsck/unix.c:1545
+msgid "Group descriptors look bad..."
+msgstr "Gruppen-Deskriptoren scheinen defekt zu sein..."
+
+#: e2fsck/unix.c:1555
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s beim Benutzen der Datensicherungs-Blöcke"
+
+#: e2fsck/unix.c:1559
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: es wird zum originalen Superblock zurück gekehrt\n"
+
+#: e2fsck/unix.c:1588
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Diese Dateisystem-Revision ist offensichtlich zu neu für diese Version \n"
+"von e2fsck (oder der Dateisystem-Superblock ist defekt).\n"
+"\n"
+
+#: e2fsck/unix.c:1595
+msgid "Could this be a zero-length partition?\n"
+msgstr "Könnte es eine Partion der Länge Null sein?\n"
+
+#: e2fsck/unix.c:1597
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Sie benötigen %s- oder root-Rechte für das Dateisystem.\n"
+
+#: e2fsck/unix.c:1603
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Möglicherweise ist die Partition nicht vorhanden oder eine Swap-Partition?\n"
+
+#: e2fsck/unix.c:1605
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"Ist das Dateisystem eingehängt oder exklusiv von einem anderen Programm\n"
+"geöffnet worden?\n"
+
+#: e2fsck/unix.c:1609
+msgid "Possibly non-existent device?\n"
+msgstr "Ist das Gerät möglicherweise nicht vorhanden?\n"
+
+#: e2fsck/unix.c:1612
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Laufwerk ist schreibgeschützt, nutzen Sie die Option -n,\n"
+"um es im Nur-Lesen-Modus zu prüfen.\n"
+
+#: e2fsck/unix.c:1626
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1701
+msgid "Get a newer version of e2fsck!"
+msgstr "Neuere Version von e2fsck benötigt!"
+
+#: e2fsck/unix.c:1761
+#, c-format
+msgid "while checking journal for %s"
+msgstr "während der Prüfung des Journals auf %s"
+
+#: e2fsck/unix.c:1764
+msgid "Cannot proceed with file system check"
+msgstr "Weiteres Arbeiten auf dem Dateisystem ist nicht möglich"
+
+#: e2fsck/unix.c:1775
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr ""
+"Warnung: Journal-Wiederherstellung wird übersprungen, da sich das Dateisystem\n"
+"im Nur-Lesen-Modus befindet.\n"
+
+#: e2fsck/unix.c:1787
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "Superblock-Flags konnten auf %s nicht gesetzt werden\n"
+
+#: e2fsck/unix.c:1793
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Ein Fehler in der Prüfsumme des Journals wurde in %s gefunden\n"
+
+#: e2fsck/unix.c:1797
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Das Journal von %s ist defekt\n"
+
+#: e2fsck/unix.c:1801
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "bei der Wiederherstellung des ext3-Journals von %s"
+
+#: e2fsck/unix.c:1823
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s besitzt nicht unterstützte Eigenschaft(en):"
+
+#: e2fsck/unix.c:1838
+#, fuzzy, c-format
+#| msgid "%s has unsupported feature(s):"
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s besitzt nicht unterstützte Eigenschaft(en):"
+
+#: e2fsck/unix.c:1888
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s beim Lesen des Bad-Block-Inodes\n"
+
+#: e2fsck/unix.c:1891
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Das verheißt nichts Gutes, aber es wird trotzdem versucht ...\n"
+
+#: e2fsck/unix.c:1934
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Journal wird erstellt (%d Blöcke): "
+
+#: e2fsck/unix.c:1943
+msgid " Done.\n"
+msgstr " Erledigt.\n"
+
+#: e2fsck/unix.c:1945
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** Journal wurde wieder hergestellt ***\n"
+
+#: e2fsck/unix.c:1951
+msgid "aborted"
+msgstr "abgebrochen"
+
+#: e2fsck/unix.c:1953
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck abgebrochen.\n"
+
+#: e2fsck/unix.c:1980
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "e2fsck wird neu gestartet ...\n"
+
+#: e2fsck/unix.c:1984
+msgid "while resetting context"
+msgstr "beim Rücksetzen des Kontexts"
+
+#: e2fsck/unix.c:2043
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DATEISYSTEMFEHLER KORRIGIERT *****\n"
+
+#: e2fsck/unix.c:2045
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: Es wurden Änderungen am Dateisystem vorgenommen.\n"
+
+#: e2fsck/unix.c:2049 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DATEISYSTEM WURDE VERÄNDERT *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** LINUX MUSS NEU GESTARTET WERDEN *****\n"
+
+#: e2fsck/unix.c:2064 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** WARNUNG: Noch Fehler im Dateisystem **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:93
+msgid "yY"
+msgstr "jJyY"
+
+#: e2fsck/util.c:192 misc/util.c:112
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "aA"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " („a†aktiert „ja†für alles) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<jy>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "abgebrochen!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "ja für alles\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "ja\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "nein\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nein\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ja\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "ja"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "nein"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: ungültiger Bitmpa-Block(-Blöcke) für %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "Inode und Block-Bitmaps werden gelesen"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "während des wiederholten Versuches, Bitmaps für %s einzulesen"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "Block- und Inode-Bitmaps werden geschrieben"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "während des wiederholten Versuches, Block- und Inode-Bitmaps für %s zu schreiben."
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: UNERWARTETE INKONSISTENZ; fsck MANUELL AUSFÃœHREN\n"
+"\t(d.h. ohne die Optionen -a oder -p)\n"
+
+#: e2fsck/util.c:438
+#, fuzzy, c-format
+#| msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Benutzter Speicher: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:444
+#, fuzzy, c-format
+#| msgid "Memory used: %lu, "
+msgid "Memory used: %lluk, "
+msgstr "Benutzter Speicher: %lu, "
+
+#: e2fsck/util.c:450
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "Zeit: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "abgelaufende Zeit: %6.3f\n"
+
+#: e2fsck/util.c:490 e2fsck/util.c:504
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "beim Lesen von Inode %lu in %s"
+
+#: e2fsck/util.c:518 e2fsck/util.c:531
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "beim Schreiben von Inode %lu in %s"
+
+#: e2fsck/util.c:790
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "UNERWARTETE INKONSISTENZ: das Dateisystem wird verändert, während fsck läuft.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "erledigt \n"
+
+#: misc/badblocks.c:100
+#, fuzzy, c-format
+#| msgid ""
+#| "Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
+#| " [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+#| " [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+#| " device [last_block [first_block]]\n"
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Aufruf: %s [-b Blockgröße] [-i Eingabedatei] [-o Ausgabedatei] [-svwnf]\n"
+" [-c Blöcke_auf_einmal] [-d Verzögerungsfaktor_zwischen_Lesedurchgängen]\n"
+" [-e maximale_defekte_Blöcke] [-p Anzahl_Durchgänge]\n"
+" [-t Testmuster [-t Testmuster [...]]]\n"
+" Gerät [letzter_Block [Startblock]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Die Optionen -n und -w schließen sich gegenseitig aus.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% erledigt, %s verstrichen. (%d/%d/%d Fehler)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Es wird mit zufälligen Mustern getestet: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Es wird getestet Mit Muster 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "beim Suchen"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Merkwürdiger Wert (%ld) in do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "während ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "beim Beginn des „Bad Block“-Listendurchlaufs"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "beim Zuweisen von Puffern"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Es wird von Block %lu bis %lu geprüft\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Es wird nach defekten Blöcken im Nur-Lesen-Modus gesucht\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Es wird nach defekten Blöcken gesucht (Nur-Lesen-Modus):"
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Zu viele defekte Blöcke, Test wird abgebrochen\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Es wird nach defekten Blöcken gesucht (Lesen+Schreiben-Modus)\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Von Block %lu bis %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Lesen und Vergleichen:"
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Es wird nach defekten Blöcken im zerstörungsfreien Lesen+Schreiben-Modus gesucht\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Es wird nach defekten Blöcken gesucht (zerstörungsfreier Lesen+Schreiben-Modus)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Unterbrechung empfangen, es wird aufgeräumt\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "beim Schreiben der Test-Daten; Block %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:134
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s ist eingehängt; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "Badblocks wird trotzdem erzwungen. Hoffentlich ist /etc/mtab nicht korrekt.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "es ist zu unsicher, Badblocks zu starten!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:145
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s wird offensichtlich vom System genutzt; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "Badblocks wird trotzdem erzwungen. Hoffentlich ist /etc/mtab nicht korrekt.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "ungültige %s - %s"
+
+#: misc/badblocks.c:1135
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Die maximale Anzahl der defekten Blöcke von %u ist zu hoch - Das Maximum sind %u"
+
+#: misc/badblocks.c:1162
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "Speicher für Testmuster kann nicht reserviert werden - %s"
+
+#: misc/badblocks.c:1192
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Es darf im Nur-Lesen-Modus nur ein Testmuster angegeben werden"
+
+#: misc/badblocks.c:1198
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Zufälliges Testmuster ist im Nur-Lesen-Modus nicht erlaubt"
+
+#: misc/badblocks.c:1205
+#, fuzzy, c-format
+#| msgid "invalid block size - %s"
+msgid "Invalid block size: %d\n"
+msgstr "ungültige Blockgröße - %s"
+
+#: misc/badblocks.c:1211
+#, fuzzy, c-format
+#| msgid "Invalid blocksize parameter: %s\n"
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Ungültiger Blockgrößen-Parameter: %s\n"
+
+#: misc/badblocks.c:1225
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Größe des Gerätes ist nicht feststellbar.\n"
+"Sie müssen sie manuell angeben.\n"
+
+#: misc/badblocks.c:1231
+msgid "while trying to determine device size"
+msgstr "beim Versuch, die Gerätegröße festzustellen"
+
+#: misc/badblocks.c:1236
+msgid "last block"
+msgstr "letzter Block"
+
+#: misc/badblocks.c:1242
+msgid "first block"
+msgstr "erster Block"
+
+#: misc/badblocks.c:1245
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "Ungültiger Startblock (%llu): er muss kleiner als %llu sein"
+
+#: misc/badblocks.c:1253
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "Ungültiger Endblock (%llu): er muss ein 32-Bit Wert sein"
+
+#: misc/badblocks.c:1309
+msgid "while creating in-memory bad blocks list"
+msgstr "beim Erstellen der Bad-Block-Liste im Speicher"
+
+#: misc/badblocks.c:1318
+msgid "input file - bad format"
+msgstr "die Eingabedatei hat ein ungültiges Format"
+
+#: misc/badblocks.c:1326 misc/badblocks.c:1335
+msgid "while adding to in-memory bad block list"
+msgstr "beim Hinzufügen zur Bad-Block-Liste im Speicher"
+
+#: misc/badblocks.c:1360
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Durchgang beendet, %u defekte Blöcke gefunden. (%d/%d/%d Fehler)\n"
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+#| msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTuFx] [-v version] files...\n"
+msgstr "Aufruf: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v Version] Dateien…\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "ungültiges Projekt - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "falsche Version - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "beim Auslesen des Status von %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "beim Lesens der Flags in %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flags von %s wie folgt gesetzt: "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "beim Setzen der Flags in %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Version von %s gesetzt auf %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "beim Setzen der Version in %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Das Projekt von %s wurde auf %lu gesetzt\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "beim Setzen des Projektes von %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Pfad-Variable in chattr_dir_proc konnte nicht reserviert werden"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= ist inkompatibel zu - und +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "„-v“, =, - oder + verwenden\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "beim Lesen von Inode %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "beim Expandieren des Verzeichnisses"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "beim Verknüpfen von „%sâ€"
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "beim Schreiben von Inode %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "beim Auflisten der Attribute von „%sâ€"
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "beim Öffnen von Inode %u"
+
+#: misc/create_inode.c:172
+#, fuzzy, c-format
+#| msgid "while reading inode %u"
+msgid "while reading xattrs for inode %u"
+msgstr "beim Lesen von Inode %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "beim Anfordern von Speicher"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "beim Lesens des Attributs „%s†von „%sâ€"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "beim Schreiben von Attribut „%s†nach Inode „%uâ€"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "beim Schließen von Inode %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "beim Reservieren von Speicher für Inode „%sâ€"
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "beim Anlegen von Inode „%sâ€"
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "beim Anlegen der symbolischen Verknüpfung „%sâ€"
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "beim Suchen von „%sâ€"
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "beim Erstellen des Verzeichnisses „%sâ€"
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "beim Öffnen von „%s†zum Kopieren"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "beim Ändern des Arbeitsverzeichnisses zu „%sâ€"
+
+#: misc/create_inode.c:838
+#, fuzzy, c-format
+#| msgid "while creating directory \"%s\""
+msgid "while scanning directory \"%s\""
+msgstr "beim Erstellen des Verzeichnisses „%sâ€"
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "beim Auslesen des Status von „%sâ€"
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "beim Erzeugen der besonderen Datei „%sâ€"
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "Die Reservierung von Speicher schlug fehl"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "beim Versuch, die Verknüpfung „%s†zu lesen"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "Die symbolischen Verknüpfung wurde zwischen lstat() und readlink() größer"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "beim Schreiben der symbolischen Verknüpfung „%sâ€"
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "beim Schreiben von Datei „%sâ€"
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "beim erzeugen von Verzeichnis „%sâ€"
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "beim Wechseln des Verzeichnisses"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "Eintrag „%s†wird ignoriert"
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "beim Setzen der Inode für „%sâ€"
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "beim Setzen der erweiterten Attribute für „%sâ€"
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "beim Sichern der Inode-Daten"
+
+#: misc/create_inode.c:1077
+#, fuzzy
+#| msgid "while changing directory"
+msgid "while copying xattrs on root directory"
+msgstr "beim Wechseln des Verzeichnisses"
+
+#: misc/dumpe2fs.c:56
+#, fuzzy, c-format
+#| msgid "Usage: %s [-bfghixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Aufruf: %s [-bfghixV] [-o superblock=<Nummer>] [-o blocksize=<Nummer>] Gerät\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "Blöcke"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "Cluster"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Gruppe %lu: (Blöcke "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " Prüfsumme 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (0x%04x ERWARTET)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s Superblock in "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primär"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Datensicherung"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Gruppendeskriptoren in "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" reservierte GDT-Blöcke bei "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Gruppendeskriptor in "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Block-Bitmap in "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", Prüfsumme 0x%04x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Inode-Bitmap in "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Inode-Tabelle in "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u freie %s, %u freie Inodes, %u Verzeichnisse%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u ungenutzte Inodes\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Freie Blöcke: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Freie Inodes: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "beim Ausgeben der „Bad Block“-Liste"
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Bad Blocks: %u"
+
+#: misc/dumpe2fs.c:374 misc/tune2fs.c:378
+msgid "while reading journal inode"
+msgstr "beim Lesen des Journal-Inodes"
+
+#: misc/dumpe2fs.c:380
+msgid "while opening journal inode"
+msgstr "beim Lesen des Journal-Inodes"
+
+#: misc/dumpe2fs.c:386
+msgid "while reading journal super block"
+msgstr "beim Lesen des Journal-Superblocks"
+
+#: misc/dumpe2fs.c:393
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Die magische Zahl im Journal-Superblock ist ungültig!\n"
+
+#: misc/dumpe2fs.c:413 misc/tune2fs.c:221
+msgid "while reading journal superblock"
+msgstr "beim Lesen des Journal-Superblocks"
+
+#: misc/dumpe2fs.c:421
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Die magische Nummer des Journal-Superblocks konnte nicht gefunden werden"
+
+#: misc/dumpe2fs.c:476
+#, fuzzy
+#| msgid "while allocating buffer"
+msgid "failed to alloc MMP buffer\n"
+msgstr "beim Zuweisen von Puffern"
+
+#: misc/dumpe2fs.c:487
+#, fuzzy, c-format
+#| msgid "Checking blocks %lu to %lu\n"
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Es wird von Block %lu bis %lu geprüft\n"
+
+#: misc/dumpe2fs.c:519 misc/mke2fs.c:811 misc/tune2fs.c:2118
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Speicher zum Verarbeiten der Optionen konnte nicht reserviert werden!\n"
+
+#: misc/dumpe2fs.c:545
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ungültiger Superblock-Parameter: %s\n"
+
+#: misc/dumpe2fs.c:560
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ungültiger Blockgrößen-Parameter: %s\n"
+
+#: misc/dumpe2fs.c:571
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Falsche erweiterte Optionen angegeben: %s\n"
+"\n"
+"Erweiterte Optionen werden durch Kommata getrennt. Manche erwarten ein\n"
+"\tArgument, welches mit Gleichheitszeichen („=“) zugewiesen wird.\n"
+"\n"
+"Gültige erweiterte Optionen sind:\n"
+"\tsuperblock=<Nummer des Spuperblocks>\n"
+"\tblocksize=<Blockgröße>\n"
+"\n"
+
+#: misc/dumpe2fs.c:661 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\t%s wird benutzt\n"
+
+#: misc/dumpe2fs.c:708 misc/e2image.c:1637 misc/tune2fs.c:3004
+#: resize/main.c:418
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Es kann kein gültiger Dateisystem-Superblock gefunden werden.\n"
+
+#: misc/dumpe2fs.c:730
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:761
+#, fuzzy, c-format
+#| msgid "while retrying to read bitmaps for %s"
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "während des wiederholten Versuches, Bitmaps für %s einzulesen"
+
+#: misc/dumpe2fs.c:770
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+#| msgid "Usage: %s [ -r|Q ] [ -fr ] device image-file\n"
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Aufruf: %s [-r|Q ] [ -fr ] Gerätedatei Abbild-Datei\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s [-I] Gerätedatei Abbild-Datei\n"
+
+#: misc/e2image.c:111
+#, fuzzy, c-format
+#| msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o Quelloffset ] [ -O Zieloffset ] Quell_Fs [ Ziel_fs ]\n"
+
+#: misc/e2image.c:176 misc/e2image.c:592 misc/e2image.c:598
+#: misc/e2image.c:1200
+msgid "while allocating buffer"
+msgstr "beim Zuweisen von Puffern"
+
+#: misc/e2image.c:181
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Block %llu wird geschrieben\n"
+
+#: misc/e2image.c:195
+#, c-format
+msgid "error writing block %llu"
+msgstr "Schreibfehler - Block %llu"
+
+#: misc/e2image.c:199
+msgid "error in generic_write()"
+msgstr "Fehler in generic_write()"
+
+#: misc/e2image.c:216
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Fehler: Größe des Headers übersteigt wrt_size\n"
+
+#: misc/e2image.c:221
+msgid "Couldn't allocate header buffer\n"
+msgstr "Header-Puffer konnte nicht zugewiesen werden\n"
+
+#: misc/e2image.c:249
+msgid "while writing superblock"
+msgstr "beim Schreiben des Superblocks"
+
+#: misc/e2image.c:258
+msgid "while writing inode table"
+msgstr "beim Schreiben der Inode-Tabelle"
+
+#: misc/e2image.c:266
+msgid "while writing block bitmap"
+msgstr "beim Schreiben der Block-Bitmap"
+
+#: misc/e2image.c:274
+msgid "while writing inode bitmap"
+msgstr "beim Schreiben der Inode-Bitmap"
+
+#: misc/e2image.c:516
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Defekter Verzeichnisblock %llu: ungültige rec_len (%d)\n"
+
+#: misc/e2image.c:528
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Defekter Verzeichnisblock %llu: ungültige name_len (%d)\n"
+
+#: misc/e2image.c:569
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu Blöcke (%d%%)"
+
+#: misc/e2image.c:602 misc/e2image.c:642
+msgid "Copying "
+msgstr "Kopieren "
+
+#: misc/e2image.c:639
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+"Jetzt anzuhalten würde das Dateisystem zerstören. Wenn Sie sicher sind,\n"
+"unterbrechen Sie noch einmal.\n"
+
+#: misc/e2image.c:665
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s bleibt bei %.2f MB/s"
+
+#: misc/e2image.c:677 misc/e2image.c:1210
+#, c-format
+msgid "error reading block %llu"
+msgstr "Fehler beim Lesen von Block %llu"
+
+#: misc/e2image.c:732
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "%llu / %llu Blöcke (%d%%) wurden in %s kopiert "
+
+#: misc/e2image.c:737
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "bei %.2f MB/s"
+
+#: misc/e2image.c:773
+msgid "while allocating l1 table"
+msgstr "beim Anfordern von Speicher für die l1-Tabelle"
+
+#: misc/e2image.c:818
+msgid "while allocating l2 cache"
+msgstr "beim Anfordern von Speicher für den l2-Zwischenspeicher"
+
+#: misc/e2image.c:841
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Warnung: Beim Schreiben des Zwischenspeichers befinden sich immer noch Tabellen in ihm. Damit gehen Daten verloren und das Abbild ist eventuell ungültig.\n"
+
+#: misc/e2image.c:1167
+msgid "while allocating ext2_qcow2_image"
+msgstr "beim Reservieren von Speicher für ext2_qcow2_image"
+
+#: misc/e2image.c:1174
+msgid "while initializing ext2_qcow2_image"
+msgstr "beim Initialisieren des ext2_qcow2_image"
+
+#: misc/e2image.c:1234 misc/e2image.c:1252
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Programmierfehler: mehrere sequenzielle Refcount-Blöcke wurden erzeugt!\n"
+
+#: misc/e2image.c:1293
+msgid "while allocating block bitmap"
+msgstr "beim Reservieren von Speicher für die Block-Bitmap"
+
+#: misc/e2image.c:1302
+msgid "while allocating scramble block bitmap"
+msgstr "beim Reservieren von Speicher für die verwürfelte Block-Bitmap"
+
+#: misc/e2image.c:1325
+msgid "Scanning inodes...\n"
+msgstr "Inodes werden eingelesen …\n"
+
+#: misc/e2image.c:1337
+msgid "Can't allocate block buffer"
+msgstr "Es konnte kein Blockpuffer reserviert werden"
+
+#: misc/e2image.c:1349
+msgid "while getting next inode"
+msgstr "beim Laden des nächsten Inodes"
+
+#: misc/e2image.c:1376 misc/e2image.c:1390
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "beim Iterieren über Inode %u"
+
+#: misc/e2image.c:1422
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Rohe und Qcow2-Abbilder können nicht installiert werden"
+
+#: misc/e2image.c:1444
+msgid "error reading bitmaps"
+msgstr "Fehler beim Lesen der Bitmaps"
+
+#: misc/e2image.c:1456
+msgid "while opening device file"
+msgstr "beim Öffnen der Gerätedatei"
+
+#: misc/e2image.c:1467
+msgid "while restoring the image table"
+msgstr "beim Schreiben der Inode-Tabelle"
+
+#: misc/e2image.c:1573
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "Die Option „-a“ kann nur bei Roh- oder QCOW2-Abbildern benutzt werden."
+
+#: misc/e2image.c:1578
+#, fuzzy
+#| msgid "-a option can only be used with raw or QCOW2 images."
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "Die Option „-a“ kann nur bei Roh- oder QCOW2-Abbildern benutzt werden."
+
+#: misc/e2image.c:1584
+msgid "Offsets are only allowed with raw images."
+msgstr "Offsets sind nur bei Roh-Abbildern erlaubt."
+
+#: misc/e2image.c:1589
+msgid "Move mode is only allowed with raw images."
+msgstr "Verschieben ist nur bei Roh- Abbildern erlaubt."
+
+#: misc/e2image.c:1594
+msgid "Move mode requires all data mode."
+msgstr "Der Verschiebemodus erfordert den „Alle Daten“-Modus."
+
+#: misc/e2image.c:1604
+msgid "checking if mounted"
+msgstr "Prüfung, ob eingehängt"
+
+#: misc/e2image.c:1611
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Das Starten von E2image auf einem schreib- und lesbar eingehängten\n"
+"Dateisystem kann zu einem unvollständigen Abbild führen, welches\n"
+"unbrauchbar für die Fehlersuche wäre. Verwenden Sie die Option -f, wenn\n"
+"Sie das wirklich machen wollen.\n"
+
+#: misc/e2image.c:1665
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "Das QCOW2-Abbild kann nicht auf die Standardausgabe geschrieben werden!\n"
+
+#: misc/e2image.c:1671
+msgid "Can not stat output\n"
+msgstr "Der Status der Ausgabe lässt sich nicht feststellen\n"
+
+#: misc/e2image.c:1681
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Das Abbild (%s) ist komprimiert\n"
+
+#: misc/e2image.c:1684
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Das Abbild (%s) ist verschlüsselt\n"
+
+#: misc/e2image.c:1687
+#, fuzzy, c-format
+#| msgid "Image (%s) is encrypted\n"
+msgid "Image (%s) is corrupted\n"
+msgstr "Das Abbild (%s) ist verschlüsselt\n"
+
+#: misc/e2image.c:1691
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "beim Versuch, das Qcow2-Abbild (%s) in ein Roh-Abbild (%s) zu konvertieren"
+
+#: misc/e2image.c:1701
+msgid "The -c option only supported in raw mode\n"
+msgstr "Die Option „-c“ wird nur im Roh-Modus unterstützt\n"
+
+#: misc/e2image.c:1706
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Die Option „-c“ wird beim Schreiben auf die Standardausgabe nicht unterstützt\n"
+
+#: misc/e2image.c:1713
+msgid "while allocating check_buf"
+msgstr "beim Anfordern des Prüfpuffers"
+
+#: misc/e2image.c:1719
+msgid "The -p option only supported in raw mode\n"
+msgstr "Die Option „-p“ wird nur im Roh-Modus unterstützt\n"
+
+#: misc/e2image.c:1729
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d Blöcke enthielten bereits die zu kopierenden Daten.\n"
+
+#: misc/e2initrd_helper.c:68
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Aufruf: %s -r Laufwerk\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: %s kann nicht geöffnet werden.\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: Springen zum Superblock nicht möglich\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: Lesefehler im Superblock\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: Kein ext2-Dateisystem\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3213
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Warnung: Name zu lang, wird gekürzt.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: Erneutes Springen zum Superblock nicht möglich\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: Fehler beim Schreiben des Superblocks\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1770
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Aufruf: e2label Gerät [neuer_Name]\n"
+
+#: misc/e2undo.c:124
+#, fuzzy, c-format
+#| msgid "Usage: %s [-f] [-h] [-n] [-v] <transaction file> <filesystem>\n"
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Aufruf: %s [-f] [-h] [-n] [-v] <Transaktionsdatei> <Dateisystem>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Der Superblock des Dateisystems passt nicht zur Undo-Datei.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "die UUIDs stimmen nicht überein.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Die Zeit des letzten Einhängens stimmt nicht überein.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Die Zeit des letzten Schreibzugriffs stimmt nicht überein.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Der lebenslange Schreibzugriffszähler stimmt nicht überein.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "beim Lesen des Dateisystem-Superblocks"
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "beim Lesen des Superblocks"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Die Prüfsumme des Superblocks in der Undo-Datei stimmt nicht überein.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "Unzulässiger Offset - %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Während des Abarbeitens der Undo-Datei kann nicht in sie geschrieben werden.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "beim Öffnen der Undo-Datei „%sâ€\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "beim Lesen der Undo-Datei"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: Keine Undo-Datei.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Die Prüfsumme des Vorspanns passt nicht dazu.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Der Vorspann der Undo-Datei ist defekt.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Die rückgängig zu machende Blockgröße ist zu groß.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Die rückgängig zu machende Blockgröße ist zu klein.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Unbekannter Satz von Eigenschaften in der UNdo-Datei.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Fehler beim Überprüfen, ob %s eingehängt ist."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo sollte nur auf nicht-eingehängten Dateisystemen laufen"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "beim Öffnen von „%sâ€"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "der angegebene Offset ist zu groß"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "beim Lesen der Schlüssel"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: faslsche Schlüsselmagie bei %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: Prüfsummenfehler des Schlüsselblocks bei %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: Block %llu ist zu lng."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "beim Lesen von Block %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "Prüfsummenfehler im Dateisystemblock %llu (Undo-Block %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "Schreibfehler - Block %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Undo-Datei ist defekt; starten Sie e2fsck JETZT!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "EA-Fehler beim abarbeiten der Undo-Datei; starten Sie e2fsck JETZT!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Unvollständiger Undo-Datensatz; starten Sie e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Aufruf: findsuper Gerät [zu_überspringende_Bytes] [StartKB]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "zu_überspringende_Bytes sollte ein Zahl sein und nicht %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "zu_überspringende_Bytes muß ein Mehrfaches der Sektorgröße sein\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "StartKB sollte eine Zahl sein und nicht %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "StartKB sollte positiv sein, nicht %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "Start bei %llu mit %u Bytes Schrittweite\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] wahrscheinlichj ein Superblock, der Im Ext3-Journal-Superblock geschrieben wurde,\n"
+"\tdaher stimmen Start/Ende/Gruppe nicht\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "Byte_offset Byte_start Byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: endete mit Errno %d\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "WARNUNG: %s konnte nicht geöffnet werden: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "WARNUNG: falsches Format in Zeile %d von %s\n"
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"WARNUNG: Ihre /etc/fstab enthält keine Angabe darüber, wann\n"
+"\tdas Dateisystem geprüft werden soll. Dies wird\n"
+"\tignoriert, aber Sie sollten Ihre /etc/fstab so schnell\n"
+"\twie möglich korrigieren.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: nicht gefunden\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: kein Kindprozess mehr?!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Warnung... %s für Gerät %s wurde mit Signal %d beendet.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: Status ist %x, sollte nie vorkommen.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Beendet mit %s (Exit-Status %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Fehler %d bei Ausführung von fsck.%s für %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Bei -t müssen entweder allen oder keinem Dateisystem ein „no“ bzw. „!“\n"
+"vorangestellt werden.\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Speicher für Dateisystemtypen kann nicht reserviert werden.\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr ""
+"%s: Ungültige Zeile in /etc/fstab wird übersprungen: bind mount mit\n"
+" Durchgangsnummer für fsck, die nicht Null ist\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: %s kann nicht überprüft werden: fsck.%s nicht gefunden\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Alle Dateisysteme werden überprüft.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--warten-- (Durchgang %d)\n"
+
+#: misc/fsck.c:1085
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Aufruf: fsck [-AMNPRTV] [ -C [ fd ] ] [-t Datesystemtyp] [FS-Optionen] [Dateisystem...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: zu viele Geräte\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: zu viele Argumente\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Wird nur-lesbar eingehängt.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Anwendern wird erlaubt, alle Blöcke zu belegen. Das ist gefḧrlich!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3104
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Bitte lassen Sie bitte „e2fsck -fy %s“ laufen.\n"
+
+#: misc/fuse2fs.c:3793
+#, fuzzy, c-format
+#| msgid "%s: recovering journal\n"
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: Journal wird wiederhergestellt\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Das Journal muss wiederherdestellt werden; Das starten von „e2fsck -E journal_only†ist zwingend nerforderlich.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: In das Journal schreiben wird nicht unterstützt.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Warnung: Ein ungeprüftes Dateisystem wird eingehängt. Sie sollten e2fsck laufen lassen.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Warnung: Die maximale Anzahl von Einhängungen ist erreicht. Sie sollten e2fsck laufen lassen.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Warnung: 'Überprüfungszeitpunkt wurde erreicht. Sie sollten e2fsck laufen lassen.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Verweiste Blöcke gefunden. Sie sollten e2fsck laufen lassen.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Es wurden Fehler entdeckt, Sie sollten e2fsck laufen lassen.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Aufruf: %s [-RVadlpv] [Dateien…]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Beim Lesen der Flags von %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Beim Lesen des Projektes von %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Beim Lesen der Version von %s"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Aufruf: %s [-c|-l Dateiname] [-b Blockgröße] [-C Clustergröße]\n"
+"\t[-i Bytes-pro-Inode] [-I Inode-Größe] [-J Journal-Optionen]\n"
+"\t[-G Größe_der_Metagruppe] [-N Anzahl_der_Inodes] [-d Wurzelverzeichnis]\n"
+"\t[-m Reservierte-Blöcke-Prozentsatz] [-o Erzeuger-OS]\n"
+"\t[-g Blöcke-pro-Gruppe] [-L Volume-Label]\n"
+"\t[-M letztes-eingehängtes-Verzeichnis] [-O Eigenschaft[,...]]\n"
+"\t[-r Dateisystem-Revision] [-E erweiterte-Option[,...]]\n"
+"\t[-t Dateisystemtyp] [-T Verwendungs-Typ ] [-U UUID] [-e Fehlerverhalten]\n"
+"\t[-jnqvDFSV] Gerät [Block-Anzahl]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Befehl wird ausgeführt: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "während des Versuchs, „%s“ auszuführen"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "beim Auswerten der „Bad Block“-Liste vom Programm"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Block %d im primären Superblock/Gruppendeskriptorbereich defekt.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"Die Blöcke %u bis einschließlich %u müssen in Ordnung sein, um ein\n"
+"\tDateisystem zu erstellen.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Abbruch...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Warnung: Die Sicherung des Superblocks bzw. Gruppendeskriptors in Block %u\n"
+"\tenthält defekte Blöcke.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3283
+msgid "while marking bad blocks as used"
+msgstr "beim Markieren von defekten Blöcken als „belegt“"
+
+#: misc/mke2fs.c:370
+#, fuzzy
+#| msgid "while writing quota inodes"
+msgid "while writing reserved inodes"
+msgstr "beim Schreiben der Quota-Inodes"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Inode-Tabellen werden geschrieben: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"%d Blöcke konnten nicht in die Inoden-Tabellen beginnend bei %llu geschrieben werden: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2835 misc/mke2fs.c:3243
+msgid "done \n"
+msgstr "erledigt \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "beim Erstellen des Wurzelverzeichnisses"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "beim Lesen des Root-Inodes"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "beim Setzen des Root-Inode-Eigentümers"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "beim Erstellen von /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "beim Suchen von /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "beim Expandieren von /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "beim Setzen des „Bad Block“-Inodes"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Speicher voll beim Löschen der Sektoren %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Warnung: Block %s konnte nicht gelesen werden\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Warnung: Sektor %d konnte nicht gelöscht werden: %s\n"
+
+#: misc/mke2fs.c:617
+#, fuzzy
+#| msgid "while writing journal inode"
+msgid "while splitting the journal size"
+msgstr "beim Schreiben der Journal-Inodes"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "beim Initialisieren des Journal-Superblocks"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Journal-Gerät wird mit Nullen überschrieben: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "beim Überschreiben des Journal-Gerätes mit Nullen (Block %llu, Nr. %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "beim Schreiben des Journal-Superblocks"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Ein Dateisystem mit %llu (%dk) Blöcken und %u Inodes wird erzeugt.\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Warnung: %llu Blöcke unbenutzt.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, fuzzy, c-format
+#| msgid "Filesystem label=%s\n"
+msgid "Filesystem label=%.*s\n"
+msgstr "Dateisystembezeichnung=%s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "OS-Typ: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blockgröße=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Clustergröße=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmentgröße=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u Blöcke, Stripebreite=%u Blöcke\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u Inodes, %llu Blöcke\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu Blöcke (%2.2f%%) reserviert für den Superuser\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Erster Datenblock=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Eigentümer des Wurzelverzeichnisses=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximale Dateisystem-Blöcke=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u Blockgruppen\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u Blockgruppe\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u Blöcke pro Gruppe, %u Cluster pro Gruppe\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u Blöcke pro Gruppe, %u Fragmente pro Gruppe\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u Inodes pro Gruppe\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID des Dateisystems: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblock-Sicherungskopien gespeichert in den Blöcken: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s erfordert „-O 64Bit“\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "„%s“ muss vor „resize=%u“ kommen\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Unzulässige desc_size: „%s“\n"
+
+#: misc/mke2fs.c:866
+#, fuzzy, c-format
+#| msgid "Invalid new size: %s\n"
+msgid "Invalid hash seed: %s\n"
+msgstr "Unzulässige neue Größe: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Unzulässiger Offset: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2146
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ungültiges mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Ungültige Anzahl von Ersatz-Superblöcken: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Ungültiger „stride“-Parameter: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Ungültiger Stripebreite-Parameter: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ungültiger „resize“-Parameter: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Das Maximum der Vergrößerung muss oberhalb als der Dateisystem-Größe liegen.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+"Online-Größenänderungen werden bei Revison-0-Dateisystemen nicht\n"
+"\tunterstützt\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Ungültiger Eigentümer der Wurzel: „%s“\n"
+
+#: misc/mke2fs.c:1080
+#, fuzzy, c-format
+#| msgid "Invalid new size: %s\n"
+msgid "Invalid encoding: %s"
+msgstr "Unzulässige neue Größe: %s\n"
+
+#: misc/mke2fs.c:1098
+#, fuzzy, c-format
+#| msgid ""
+#| "\n"
+#| "Bad option(s) specified: %s\n"
+#| "\n"
+#| "Extended options are separated by commas, and may take an argument which\n"
+#| "\tis set off by an equals ('=') sign.\n"
+#| "\n"
+#| "Valid extended options are:\n"
+#| "\tmmp_update_interval=<interval>\n"
+#| "\tnum_backup_sb=<0|1|2>\n"
+#| "\tstride=<RAID per-disk data chunk in blocks>\n"
+#| "\tstripe-width=<RAID stride * data disks in blocks>\n"
+#| "\toffset=<offset to create the file system>\n"
+#| "\tresize=<resize maximum size in blocks>\n"
+#| "\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+#| "\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+#| "\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+#| "\troot_owner=<uid of root dir>:<gid of root dir>\n"
+#| "\ttest_fs\n"
+#| "\tdiscard\n"
+#| "\tnodiscard\n"
+#| "\tquotatype=<quota type(s) to be enabled>\n"
+#| "\n"
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Ungültige Option(en) angegeben: %s\n"
+"\n"
+"Erweiterte Optionen werden durch Kommata getrennt. Manche erwarten ein\n"
+"\tArgument, welches mit Gleichheitszeichen („=“) zugewiesen wird.\n"
+"\n"
+"Gültige erweiterte Optionen sind:\n"
+"\tmmp_update_interval=<Intervall>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID-Segmentgröße in Blöcken>\n"
+"\tstripe-width=<RAID Stride * Datenplatten in Blöcken>\n"
+"\toffset=<Offset für das Dateisystem>\n"
+"\tresize=<Obergrenze für Größenänderung in Blöcken>\n"
+"\tpacked_meta_blocks=<0 deaktiviert, 1 aktiviert>\n"
+"\tlazy_itable_init=<0 für deaktiviert, 1 für aktiviert>\n"
+"\tlazy_journal_init=<0 für deaktiviert, 1 für aktiviert>\n"
+"\troot_owner=<UID des Wurzelverzeichnisses>:<GID des Wurzelverzeichnisses>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<Zu aktivierende(r) Quota-Typ(en)>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Warnung: Die Stripebreite %u des RAIDs ist kein Vielfaches des Strides %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2282
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2291
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr ""
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaxfehler in der Konfigurationsdatei von mke2fs (%s, Zeile #%d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1107
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ungültige Dateisystem-Option angegeben: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:424
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ungültige Option für das Einhängen angegeben: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Ihre Datei mke2fs.conf definiert den Typ des Dateisystems %s nicht.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Sie müssen wahrscheinlich eine aktualisierte Version der Datei installieren.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Abbruch…\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Warnung: der Dateisystemtyp %s ist in mke2fs.conf nicht definiert\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Es konnte kein Speicher für den neuen PFAD reserviert werden.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Das Profil konnte nicht erfolgreich initialisiert werden: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "ungültige Blockgröße - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Warnung: Eine Blockgröße von %d ist auf den meisten System unbrauchbar.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "ungültige Clustergröße - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "„-R“ ist veraltet, bitte verwenden Sie stattdessen „-E“"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1872
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "ungültiges Verhalten im Fehlerfall - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Die Zahl der Blöcke pro Gruppe ist unzulässig"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "Die Anzahl der Blöcke pro Gruppe muss ein Vielfaches von 8 sein"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Der Wert für die Größe von flex_bg ist unzulässig"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "Die Größe von flex_bg muss eine Potenz von 2 sein"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "Die Größe von flex_bg (%lu) muss gleich oder weniger als 2^31 sein"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "Unzulässige Inode-Rate %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ungültige Inode-Größe - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Warnung: Die Option -K wird bald nicht mehr unterstüzt. Verwenden Sie stattdessen die Erweiterungsoption „-E nodiscard“!\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "in malloc für bad_blocks_filename"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Warnung: Name zu lang, wird auf „%s†gekürzt\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "Ungültiger Wert für die prozentuale Anzahl reservierter Blöcke - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "ungültige Anzahl von Inodes - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "beim Zuweisen von der fs_feature-Zeichenkette"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "ungültige Version - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "beim Versuch, Revision %d zu erzeugen"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "Die Option „-t“ darf nur einmal angegeben werden"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "Die Option „-T“ darf nur einmal angegeben werden"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3366
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "beim Versuch, das Journalgerät %s zu öffnen\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Die Blockgröße des Journalgeräts (%d) ist kleiner als die minimale Blockgröße %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Die Blockgröße des Journalgerätes wird verwendet: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "ungültiger Block „%s“ auf Gerät „%s“"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "Dateisystem"
+
+#: misc/mke2fs.c:1991 resize/main.c:506
+msgid "while trying to determine filesystem size"
+msgstr "beim Versuch, die Größe des Dateisystems zu bestimmen"
+
+#: misc/mke2fs.c:1997
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Die Größe des Gerätes ist nicht feststellbar. Sie müssen die Größe\n"
+"des Dateisystems manuell angeben.\n"
+
+#: misc/mke2fs.c:2004
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Als Größe des Geräts wird Null zurück geliefert. Entweder wurde eine\n"
+"\tungültige Partition angegeben oder die Partitionstabelle wurde nach\n"
+"\teinem Lauf von fdisk nicht neu eingelesen, weil die modifizierte\n"
+"\tPartition vewendet wurde. Sie müssen unter Umständen den Rechner neu\n"
+"\tstarten, damit die Partitionstabelle neu eingelesen wird.\n"
+
+#: misc/mke2fs.c:2021
+msgid "Filesystem larger than apparent device size."
+msgstr "Das Dateisystem ist größer als als die Partition."
+
+#: misc/mke2fs.c:2041
+msgid "Failed to parse fs types list\n"
+msgstr "Die Liste der Dateisystemtypen konnte nicht verarbeitet werden\n"
+
+#: misc/mke2fs.c:2091
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Hurd unterstützt keine Dateitypen.\n"
+
+#: misc/mke2fs.c:2096
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Hurd unterstützt die Eigenschaft huge_file nicht.\n"
+
+#: misc/mke2fs.c:2101
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "Hurd unterstützt die Eigenschaft metadata_csum nicht.\n"
+
+#: misc/mke2fs.c:2106
+#, fuzzy
+#| msgid "The HURD does not support the huge_file feature.\n"
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Hurd unterstützt die Eigenschaft huge_file nicht.\n"
+
+#: misc/mke2fs.c:2116
+msgid "while trying to determine hardware sector size"
+msgstr "beim Versuch, die Hardware-Sektorgröße festzustellen"
+
+#: misc/mke2fs.c:2122
+msgid "while trying to determine physical sector size"
+msgstr "beim Versuch, die physische Sektorgröße festzustellen"
+
+#: misc/mke2fs.c:2154
+msgid "while setting blocksize; too small for device\n"
+msgstr "beim Setzen der Blockgröße: zu klein für das Gerät\n"
+
+#: misc/mke2fs.c:2159
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Warnung: die angegebene Blockgröße %d ist kleiner als die physische Sektorgröße %d\n"
+
+#: misc/mke2fs.c:2183
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%1$s: Die Größe des Gerätes %3$s (0x%2$llx Blöcke) kann bei einer Blockgröße\n"
+"\tvon %4$d nicht mit 32 Bits dargestellt werden.\n"
+
+#: misc/mke2fs.c:2197
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%1$s: Das Gerät %3$s ist zu groß (0x%2$llx Blöcke), um ein Dateisystem\n"
+"\tmit einer Blockgröße von %4$d darauf anzulegen.\n"
+
+#: misc/mke2fs.c:2219
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "Dateisystemtypen für das Aufschlüsseln von mke2fs.conf: "
+
+#: misc/mke2fs.c:2226
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"Eigenschaften von Dateisystemen werden bei Revison-0-Dateisystemen nicht\n"
+"\tunterstützt\n"
+
+#: misc/mke2fs.c:2234
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+"Sparse-Superblöcke werden bei Revison-0-Dateisystemen nicht\n"
+"\tunterstützt\n"
+
+#: misc/mke2fs.c:2244
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+"Journale werden bei Revison-0-Dateisystemen nicht\n"
+"\tunterstützt\n"
+
+#: misc/mke2fs.c:2257
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "Ungültiger Werte für Prozent reservierter Blöcke - %lf"
+
+#: misc/mke2fs.c:2274
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr ""
+"Erweiterungen MÜSSEN für 64-Bit-Dateisysteme aktiviert werden.\n"
+"\tGeben Sie „-O extents“ an, um dies zu tun.\n"
+
+#: misc/mke2fs.c:2294
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Die Clustergröße darf nicht kleiner als die Blockgröße sein.\n"
+
+#: misc/mke2fs.c:2300
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "Die Angabe einer Clustergröße erfordert die Eigenschaft „bigalloc“."
+
+#: misc/mke2fs.c:2320
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "Warnung: Die Geometrie des Gerätes „%s“ kann nicht bestimmt werden\n"
+
+#: misc/mke2fs.c:2332
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Die Ausrichtung von %s ist um %lu Bytes versetzt.\n"
+
+#: misc/mke2fs.c:2334
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+"Dies könnte in sehr schlechter Leistung resultieren. Eine Neupartitionierung\n"
+"ist angeraten.\n"
+
+#: misc/mke2fs.c:2340
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2364
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "Blöcke mit %d Bytes sind zu groß für das Gerät (max %d)"
+
+#: misc/mke2fs.c:2368
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Warnung: Blöcke mit %d Bytes sind zu groß für das Gerät (max %d)\n"
+"\t Weiterverarbeitung wurde erzwungen\n"
+
+#: misc/mke2fs.c:2376
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Vorschlag: Verwenden Sie einen Linux kernel >= 3.18 für verbesserte Stabilität der Metadaten und Journalprüfsummen.\n"
+
+#: misc/mke2fs.c:2422
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2433
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2458
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Warnung: Der Offset wurde ohne explizite Größe des Dateisystems angegeben.\n"
+"Es wird ein Dateisystem mit %llu Blöcken erzeugt, aber das könnte nicht das\n"
+"sein, was Sie wollen.\n"
+"\n"
+
+#: misc/mke2fs.c:2473
+#, fuzzy, c-format
+#| msgid "%d byte inodes are too small for project quota; specify larger size"
+msgid "%d byte inodes are too small for project quota"
+msgstr "%d Bytes große Inodes sind zu klein für Projektquotas; Geben Sie bitte eine höhere Größe an"
+
+#: misc/mke2fs.c:2495
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "„Bigalloc“ ist nur mit „Extents“ möglich"
+
+#: misc/mke2fs.c:2502
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"resize_inode und meta_bg sind nicht kompatibel und können\n"
+"daher nicht gleichzeitig aktiviert werden.\n"
+
+#: misc/mke2fs.c:2510
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+"\n"
+"Warnung: „bigalloc“ befindet sich noch in Entwicklung.\n"
+"Lesen Sie https://ext4.wiki.kernel.org/index.php/Bigalloc für weitere\n"
+"Informationen.\n"
+"\n"
+
+#: misc/mke2fs.c:2522
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"Reservierte Blöcke für die Online-Größenänderung werden auf Nicht-Sparse-\n"
+"Dateisystemen nicht unterstützt."
+
+#: misc/mke2fs.c:2531
+msgid "blocks per group count out of range"
+msgstr "Die Anzahl der Blöcke pro Gruppe ist außerhalb des gültigen Bereichs."
+
+#: misc/mke2fs.c:2553
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Flex_bg ist nicht aktiviert, daher darf dafür auch keine Größe angegeben werden."
+
+#: misc/mke2fs.c:2565
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "unzulässige Inode-Größe %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2580
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "%d Bytes große Inodes sind zu klein für Inline-daten; Geben Sie bitte eine höhere Größe an"
+
+#: misc/mke2fs.c:2595
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "zu wenige Inodes (%llu), Anzahl erhöhen?"
+
+#: misc/mke2fs.c:2603
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "zu viele Inodes (%llu), geben Sie weniger als 2^32 Inodes an"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"inode_size (%u) * inodes_count (%u) ist zu groß für ein\n"
+"\tDateisystem mit %llu Blöcken, geben Sie ein höheres inode_ratio (-i)\n"
+"\tan oder eine niedrigere Anzahl Inodes (-N) an.\n"
+
+#: misc/mke2fs.c:2814
+msgid "Discarding device blocks: "
+msgstr "Geräteblöcke werden verworfen: "
+
+#: misc/mke2fs.c:2830
+msgid "failed - "
+msgstr "gescheitert - "
+
+#: misc/mke2fs.c:2889
+msgid "while initializing quota context"
+msgstr "beim Initialisieren des Quota-Kontextes"
+
+#: misc/mke2fs.c:2896
+msgid "while writing quota inodes"
+msgstr "beim Schreiben der Quota-Inodes"
+
+#: misc/mke2fs.c:2921
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "ungültiges Verhalten im Fehlerfall im Profil - %s"
+
+#: misc/mke2fs.c:3000
+#, fuzzy
+#| msgid "in malloc for bad_blocks_filename"
+msgid "in malloc for android_sparse_params"
+msgstr "in malloc für bad_blocks_filename"
+
+#: misc/mke2fs.c:3014
+msgid "while setting up superblock"
+msgstr "beim Erstellen des Superblocks"
+
+#: misc/mke2fs.c:3030
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Erweiteruingen wurden nicht aktiviert. Die Prüfsumme des Baums mit den Erweiterungen der Datei kann ermittelt werden, nicht aber das Verzeichnis der Blöcke. Wenn Erweiterungen nicht aktiviert werden, reduziert den Umfang dessen, was das Überprüfen der Metadaten-Prüfsummen abdecken kann. Geben Sie „-O extents†an, um dies zu beheben.\n"
+
+#: misc/mke2fs.c:3037
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Die Unterstützung für 64-bittige Dateisysteme wurde nicht aktiviert. Die längeren Felder, die diese Eigenschaft benötigt erlauben die Erstellung der Prüfsumme in voller Stärke. Geben Sie „-O 64bit†an, um dies zu korrigieren.\n"
+
+#: misc/mke2fs.c:3045
+#, fuzzy
+#| msgid "The metadata_csum_seed feature requres the metadata_csum feature.\n"
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Die Eigenschaft metadata_csum_seed erfoprdert die Eigenschaft metadata_csum.\n"
+
+#: misc/mke2fs.c:3069
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+"Verwerfen war erfolgreich und wird Nullen zurück liefern - daher wird\n"
+"das Löschen der Inode-Tabelle übersprungen\n"
+
+#: misc/mke2fs.c:3168
+#, c-format
+msgid "unknown os - %s"
+msgstr "unbekanntes Betriebssystem - %s"
+
+#: misc/mke2fs.c:3231
+msgid "Allocating group tables: "
+msgstr "beim Anfordern von Speicher für die Gruppentabellen: "
+
+#: misc/mke2fs.c:3239
+msgid "while trying to allocate filesystem tables"
+msgstr "beim Anfordern von Speicher für die Dateisystemtabellen"
+
+#: misc/mke2fs.c:3254
+#, fuzzy
+#| msgid "while marking bad blocks as used"
+msgid "while unmarking bad blocks"
+msgstr "beim Markieren von defekten Blöcken als „belegt“"
+
+#: misc/mke2fs.c:3265
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tbeim Konvertieren der Subclusterbitmap"
+
+#: misc/mke2fs.c:3274
+#, fuzzy
+#| msgid "while allocating memory"
+msgid "while calculating overhead"
+msgstr "beim Anfordern von Speicher"
+
+#: misc/mke2fs.c:3293
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s könnte durch das erneute Schreiben des Superblocks noch mehr beschädigt werden\n"
+
+#: misc/mke2fs.c:3334
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "beim Nullen von Block %llu am Ende des Dateisystems"
+
+#: misc/mke2fs.c:3347
+msgid "while reserving blocks for online resize"
+msgstr "beim Reservieren von Blöcken für die Online-Größenänderung"
+
+#: misc/mke2fs.c:3359 misc/tune2fs.c:1569
+msgid "journal"
+msgstr "Journal"
+
+#: misc/mke2fs.c:3371
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Ein Journal wird auf Gerät %s hinzugefügt: "
+
+#: misc/mke2fs.c:3378
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tbeim Versuch, ein Journal auf Gerät %s hinzuzufügen"
+
+#: misc/mke2fs.c:3383 misc/mke2fs.c:3413 misc/mke2fs.c:3455
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1598 misc/tune2fs.c:1620
+msgid "done\n"
+msgstr "erledigt\n"
+
+#: misc/mke2fs.c:3390
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Die Erzeugung eines Journals wird im Nur-Super-Modus übersprungen\n"
+
+#: misc/mke2fs.c:3400
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Das Journal (%u Blöcke) wird angelegt: "
+
+#: misc/mke2fs.c:3409
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tbeim Anlegen des Journals"
+
+#: misc/mke2fs.c:3421 misc/tune2fs.c:1172
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Fehler beim Aktivieren des Schutzes gegen mehrfaches Einhängen"
+
+#: misc/mke2fs.c:3426
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+"Der Schutz gegen mehrfaches Einhängen wurde aktiviert mit einem\n"
+"Aktualisierungsintervall von %d Sekunden.\n"
+
+#: misc/mke2fs.c:3446
+msgid "Copying files into the device: "
+msgstr "Fehler beim Kopieren der Dateien auf das Laufwerk: "
+
+#: misc/mke2fs.c:3452
+msgid "while populating file system"
+msgstr "beim Befüllen des Dateisystems"
+
+#: misc/mke2fs.c:3459
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+"Die Superblöcke und die Informationen über die Dateisystemnutzung werden\n"
+"geschrieben: "
+
+#: misc/mke2fs.c:3466
+#, fuzzy
+#| msgid "while zeroing block %llu at end of filesystem"
+msgid "while writing out and closing file system"
+msgstr "beim Nullen von Block %llu am Ende des Dateisystems"
+
+#: misc/mke2fs.c:3469
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"erledigt\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "beim Nullen von Block %llu für riesige Datei"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Der Abstand vom Partitionsanfang von %llu (%uk) Blöckenm ist inkompatibel mit der Clustergröße %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Riesige Dateien werden mit Nullen überschrieben\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "%lu riesige Datei(en) werden angelegt "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr ", jede mit %llu Blöcken"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "beim Iterieren über riesige Datei %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Aufruf: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Aufruf: %s Gerät…\n"
+"\n"
+"Gibt Informationen über die Partitionierung jedes angegebenen Geräts aus.\n"
+"Zum Beispiel: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "%s kann nicht geöffnet werden: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Die Geometrie von %s kann nicht ermittelt werden: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Die Größe von %s kann nicht ermittelt werden: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d Start=%8d Größe=%8lu Ende=%8d\n"
+
+#: misc/tune2fs.c:120
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:122
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Bitte lassen Sie e2fsck -f dieses Dateisystem überprüfen.\n"
+
+#: misc/tune2fs.c:124
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Bitte lassen Sie e2fsck -fD dieses Dateisystem überprüfen.\n"
+
+#: misc/tune2fs.c:137
+#, fuzzy, c-format
+#| msgid ""
+#| "Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+#| "\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+#| "\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+#| "\t[-p mmp_update_interval] [-r reserved_blocks_count] [-u user]\n"
+#| "\t[-C mount_count] [-L volume_label] [-M last_mounted_dir]\n"
+#| "\t[-O [^]feature[,...]] [-Q quota_options]\n"
+#| "\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+#| "\t[-I new_inode_size] [-z undo_file] device\n"
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Aufruf: %s [-c max_Anzahl_Einhängungen] [-e Fehlerverhalten] [-f] [-g Gruppe]\n"
+"\t[-i Intervall[d|m|w]] [-j] [-J Journal_Optionen] [-l]\n"
+"\t[-m reservierte_Blöcke_Prozent] [-o [^]Einhängeoptionen[…]] [-p mmp_Aktualisierungsintervall]\n"
+"\t[-r Anzahl_reservierter_Blöcke] [-u Benutzer] [-C Anzahl_Einhängungen] [-L Volume_Kennung]\n"
+"\t[-M letztes_eingehängtes_Verzeichnis] [-O [^]Eigenschaft[,...]]\n"
+"\t[-Q Quota-Optionen]\n"
+"\t[-E erweiterte_Optionen[…]] [-T Zeitpunkt_letzter_Prüfung] [-U UUID]\n"
+"\t[ -I neue_Inodegröße ] [-z Undo_Datei] Gerät\n"
+
+#: misc/tune2fs.c:228
+msgid "Journal superblock not found!\n"
+msgstr "Der Journal-Superblock wurde nicht gefunden!\n"
+
+#: misc/tune2fs.c:286
+msgid "while trying to open external journal"
+msgstr "beim Versuch, das externe Journal zu öffnen"
+
+#: misc/tune2fs.c:292 misc/tune2fs.c:2894
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s ist kein Journalgerät.\n"
+
+#: misc/tune2fs.c:301 misc/tune2fs.c:2903
+#, fuzzy, c-format
+#| msgid "The journal superblock is corrupt"
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr "Der Journal-Superblock ist defekt"
+
+#: misc/tune2fs.c:308 misc/tune2fs.c:2910
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Die UUID des Dateisystems wurde auf dem Journalgerät nicht gefunden.\n"
+
+#: misc/tune2fs.c:332
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Das Journalgerät wurde nicht gefunden. Es wurde NICHT entfernt\n"
+"Bitte benutzen Sie die Option „-f“, um das fehlende Gerät zu entfernen.\n"
+
+#: misc/tune2fs.c:341
+msgid "Journal removed\n"
+msgstr "Das Journal wurde entfernt\n"
+
+#: misc/tune2fs.c:385
+msgid "while reading bitmaps"
+msgstr "beim Lesen der Bitmaps"
+
+#: misc/tune2fs.c:393
+msgid "while clearing journal inode"
+msgstr "beim Zurücksetzen der Journal-Inodes"
+
+#: misc/tune2fs.c:406
+msgid "while writing journal inode"
+msgstr "beim Schreiben der Journal-Inodes"
+
+#: misc/tune2fs.c:442 misc/tune2fs.c:467 misc/tune2fs.c:480
+msgid "(and reboot afterwards!)\n"
+msgstr "(und starten Sie danach das System neu)\n"
+
+#: misc/tune2fs.c:495
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Nachdem Sie e2fsck haben laufen lassen, starten Sie bitte „resize2fs %s %s"
+
+#: misc/tune2fs.c:498
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Bitte starten Sie „resize2fs %s %s"
+
+#: misc/tune2fs.c:502
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z „%sâ€"
+
+#: misc/tune2fs.c:504
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "“, um den 64-Bit-Modus zu aktivieren.\n"
+
+#: misc/tune2fs.c:506
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "“, um den 64-Bit-Modus zu deaktivieren.\n"
+
+#: misc/tune2fs.c:1074
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"WARNUNG: Unterstützung des Kernels für metadata_csum_seed konnte nicht festgestellt werden.\n"
+" Dies erfordert Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1110
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Das Deaktivieren von „%s“ wird nicht unterstützt.\n"
+
+#: misc/tune2fs.c:1116
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Das Aktivieren von „%s“ wird nicht unterstützt.\n"
+
+#: misc/tune2fs.c:1125
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Has_journal kann nur zurückgesetzt werden, wenn das Dateisystem nicht\n"
+"oder nur-lesbar eingehängt ist.\n"
+
+#: misc/tune2fs.c:1133
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"needs_recovery ist gesetzt. Bitte führen Sie e2fsck aus, bevor Sie\n"
+"has_journal zurück setzen.\n"
+
+#: misc/tune2fs.c:1151
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Das Setzen von „sparse_super“ wird auf Dateisystemen mit aktiviertem\n"
+"„meta_bg“ nicht unterstützt.\n"
+
+#: misc/tune2fs.c:1164
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Der Schutz vor mehrfachem Einhängen kann nur aktiviert werden, wenn das\n"
+"Dateisystem nicht oder nur-lesbar eingehängt ist.\n"
+
+#: misc/tune2fs.c:1182
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+"Der Schutz vor mehrfachem Einhängen wurde mit einem Aktualisierungsintervall\n"
+"von %d Sekunden aktiviert.\n"
+
+#: misc/tune2fs.c:1191
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"Der Schutz vor mehrfachem Einhängen kann nicht\n"
+"deaktiviert werden, wenn das Dateisystem nur-lesbar\n"
+"eingehängt ist.\n"
+
+#: misc/tune2fs.c:1199
+msgid "Error while reading bitmaps\n"
+msgstr "Fehler beim Lesen der Bitmaps\n"
+
+#: misc/tune2fs.c:1208
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Die magische Zahl im MMP-Block passt nicht. Erwartet: %x, gefunden: %x\n"
+
+#: misc/tune2fs.c:1213
+msgid "while reading MMP block."
+msgstr "beim Lesen des MMP-Blocks."
+
+#: misc/tune2fs.c:1246
+#, fuzzy
+#| msgid "Disabling checksums could take some time."
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Das deaktivieren von Prüfsummen könnte einige Zeit in Anspruch nehman."
+
+#: misc/tune2fs.c:1250
+#, fuzzy
+#| msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Metadata_csum kann auf einem eingehängten Dateisystem nicht aktiviert werden!\n"
+
+#: misc/tune2fs.c:1263
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr "Das Deaktivieren von flex_bg würde das Dateisystem inkonsistent machen.\n"
+
+#: misc/tune2fs.c:1274
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"huge_file kann nur aktiviert werden, wenn das Dateisystem nicht\n"
+"oder nur-lesbar eingehängt ist.\n"
+
+#: misc/tune2fs.c:1285
+msgid "Enabling checksums could take some time."
+msgstr "Das aktivieren von Prüfsummen könnte etwas länger dauern."
+
+#: misc/tune2fs.c:1288
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "metadata_csum kann auf einem eingehängten Dateisystem nicht aktiviert werden!\n"
+
+#: misc/tune2fs.c:1294
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Erweiterungen sind nicht aktiviert. Prüfsummen für den Baum der Dateierweiterungen können geprüft werden, nicht aber die für Blockmaps. Erweiterungen nicht zu aktivieren reduziert den Schutz von Metadaten-Prüfsummen. Starten Sie erneut mit „-O extent†um dies zu korrigieren.\n"
+
+#: misc/tune2fs.c:1301
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Unterstützung für 64-Bit-Dateisysteme ist nbicht aktiviert. Diese Eigenschaft ermöglicht größere Felder und damit maximal starke Prüfsummen. Starten Sie „resize2fs -b†aktivieren.\n"
+
+#: misc/tune2fs.c:1327
+msgid "Disabling checksums could take some time."
+msgstr "Das deaktivieren von Prüfsummen könnte einige Zeit in Anspruch nehman."
+
+#: misc/tune2fs.c:1330
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Metadata_csum kann auf einem eingehängten Dateisystem nicht aktiviert werden!\n"
+
+#: misc/tune2fs.c:1371
+#, fuzzy
+#| msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "metadata_csum kann auf einem eingehängten Dateisystem nicht aktiviert werden!\n"
+
+#: misc/tune2fs.c:1386
+#, fuzzy
+#| msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Metadata_csum kann auf einem eingehängten Dateisystem nicht aktiviert werden!\n"
+
+#: misc/tune2fs.c:1405
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Der 64-Bit-Modus kann auf einem eingehängten Dateisystem nicht aktiviert werden!\n"
+
+#: misc/tune2fs.c:1415
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Der 64-Bit-Modus kann auf einem eingehängten Dateisystem nicht deaktiviert werden!\n"
+
+#: misc/tune2fs.c:1445
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1466
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Warnung: die Option „^quota“ hat Vorrang vor „-Q“-Argumenten.\n"
+
+#: misc/tune2fs.c:1483 misc/tune2fs.c:2244
+#, fuzzy
+#| msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "Quotas können nur bei nicht eingehängten Dateisystemen geändert werden.\n"
+
+#: misc/tune2fs.c:1495
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Das Setzen von „metadata_csum_seed“ wird nur auf Dateisystemen mit\n"
+"aktivierter Eigenschaft metadata_csum unterstützt.\n"
+
+#: misc/tune2fs.c:1513
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"Die UUID hat sich seit dem aktivieren von metadata_csum geändert. Das Dateisystem\n"
+"muss ausgehängt werden, um alle Metadaten in sicherer Form neu so zu schreiben,\n"
+" dass sie zur neuen UUIDS passen.\n"
+
+#: misc/tune2fs.c:1519
+#, fuzzy
+#| msgid "Enabling checksums could take some time."
+msgid "Recalculating checksums could take some time."
+msgstr "Das aktivieren von Prüfsummen könnte etwas länger dauern."
+
+#: misc/tune2fs.c:1562
+msgid "The filesystem already has a journal.\n"
+msgstr "Das Dateisystem hat bereits ein Journal.\n"
+
+#: misc/tune2fs.c:1582
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tbeim Versuch, das Journal auf %s zu öffnen\n"
+
+#: misc/tune2fs.c:1586
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Journal wird erzeugt auf Gerät %s: "
+
+#: misc/tune2fs.c:1594
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "beim Hinzufügen des Dateisystems zum Journal auf %s"
+
+#: misc/tune2fs.c:1600
+msgid "Creating journal inode: "
+msgstr "Journal-Inodes werden erzeugt: "
+
+#: misc/tune2fs.c:1614
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tbeim Versuch, die Journaldatei zu erzeugen"
+
+#: misc/tune2fs.c:1656
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1669
+msgid "while initializing quota context in support library"
+msgstr "beim Initialisieren des Quota=Kontextes in der unterstützenden Bibliothek"
+
+#: misc/tune2fs.c:1684
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "beim Aktualisieren der Quota-Beschränkungen (%d)"
+
+#: misc/tune2fs.c:1694
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "beim Schreiben der Quota-Datei (%d)"
+
+#: misc/tune2fs.c:1712
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "beim Enfernen der Quota-Datei (%d)"
+
+#: misc/tune2fs.c:1755
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Es wurden ungültige Quotaoptionen angegeben.\n"
+"\n"
+"Die folgenden gültigen Quotaoptionen sind verfügbar (durch Kommata getrennt\n"
+"angeben):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1813
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Die Angabe von Zeit/Datum war unverständlich: %s"
+
+#: misc/tune2fs.c:1845 misc/tune2fs.c:1856
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "ungültge Anzahl Einhängungen - %s"
+
+#: misc/tune2fs.c:1899
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "ungültige Gruppen-ID/Gruppe - %s"
+
+#: misc/tune2fs.c:1932
+#, c-format
+msgid "bad interval - %s"
+msgstr "ungültiges Intervall - %s"
+
+#: misc/tune2fs.c:1961
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "ungültiges Verhältnis reservierter Blöcke - %s"
+
+#: misc/tune2fs.c:1976
+msgid "-o may only be specified once"
+msgstr "-o darf nur einmal angegeben werden"
+
+#: misc/tune2fs.c:1985
+msgid "-O may only be specified once"
+msgstr "-O darf nur einmal angegeben werden"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "ungültige Anzahl reservierter Blöcke - %s"
+
+#: misc/tune2fs.c:2031
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "falsche Benutzer-ID/Benutzername - %s"
+
+#: misc/tune2fs.c:2048
+#, c-format
+msgid "bad inode size - %s"
+msgstr "ungültige Inode-Größe - %s"
+
+#: misc/tune2fs.c:2055
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Die Inode-Größe muss eine Zweierpotenz sein - %s"
+
+#: misc/tune2fs.c:2155
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval ist zu groß: %lu\n"
+
+#: misc/tune2fs.c:2160
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+"Das Aktualisierungsintervall des Schutzes vor mehrfachem Einhängen\n"
+"wird auf %lu Sekunde gesetzt\n"
+msgstr[1] ""
+"Das Aktualisierungsintervall des Schutzes vor mehrfachem Einhängen\n"
+"wird auf %lu Sekunden gesetzt\n"
+
+#: misc/tune2fs.c:2169
+#, fuzzy, c-format
+#| msgid "Setting filesystem feature '%s' not supported.\n"
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Das Aktivieren von „%s“ wird nicht unterstützt.\n"
+
+#: misc/tune2fs.c:2187
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ungültiger RAID-Stride: %s\n"
+
+#: misc/tune2fs.c:2202
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ungültiger Stripebreite-Parameter: %s\n"
+
+#: misc/tune2fs.c:2217
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ungültiger Hash-Algorithmus: %s\n"
+
+#: misc/tune2fs.c:2223
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Der Standard-Hash-Algorithmus wird auf %s (%d) gesetzt\n"
+
+#: misc/tune2fs.c:2250
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr ""
+
+#: misc/tune2fs.c:2256
+#, fuzzy, c-format
+#| msgid "Invalid new size: %s\n"
+msgid "Invalid encoding: %s\n"
+msgstr "Unzulässige neue Größe: %s\n"
+
+#: misc/tune2fs.c:2262
+#, fuzzy, c-format
+#| msgid "Setting current mount count to %d\n"
+msgid "Setting encoding to '%s'\n"
+msgstr "Die Anzahl der Einhängungen wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:2286
+#, fuzzy, c-format
+#| msgid "while setting flags on %s"
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "beim Setzen der Flags in %s"
+
+#: misc/tune2fs.c:2296
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| "Bad options specified.\n"
+#| "\n"
+#| "Extended options are separated by commas, and may take an argument which\n"
+#| "\tis set off by an equals ('=') sign.\n"
+#| "\n"
+#| "Valid extended options are:\n"
+#| "\tclear_mmp\n"
+#| "\thash_alg=<hash algorithm>\n"
+#| "\tmount_opts=<extended default mount options>\n"
+#| "\tstride=<RAID per-disk chunk size in blocks>\n"
+#| "\tstripe_width=<RAID stride*data disks in blocks>\n"
+#| "\ttest_fs\n"
+#| "\t^test_fs\n"
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Falsche erweiterte Optionen angegeben.\n"
+"\n"
+"Erweiterte Optionen werden durch Kommata getrennt. Manche erwarten ein\n"
+"\tArgument, welches mit Gleichheitszeichen („=“) zugewiesen wird.\n"
+"\n"
+"Gültige erweiterte Optionen sind:\n"
+"\tclear_mmp\n"
+"\thash_alg=<Hashalgorithmus>\n"
+"\tmount_opts=<erweiterte Standardeinhängoptionen>\n"
+"\tstride=<RAID-Blockgröße pro PLatte in Blöcken\n"
+"\tstripe_width=<RAID Stride*Datenplatten in Blöcken>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\n"
+
+#: misc/tune2fs.c:2712
+msgid "Failed to read inode bitmap\n"
+msgstr "Die Inode-Bitmap konnte nicht gelesen werden\n"
+
+#: misc/tune2fs.c:2717
+msgid "Failed to read block bitmap\n"
+msgstr "Die Block-Bitmap konnte nicht gelesen werden\n"
+
+#: misc/tune2fs.c:2734 resize/resize2fs.c:1284
+msgid "blocks to be moved"
+msgstr "zu verschiebende Blöcke"
+
+#: misc/tune2fs.c:2737
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Beim Erhöhen der Inode-Größe konnte keine Blockbitmap reserviert werden\n"
+
+#: misc/tune2fs.c:2743
+msgid "Not enough space to increase inode size \n"
+msgstr "Der Platz reicht nicht aus für eine Erhöhung der Inode-Größe \n"
+
+#: misc/tune2fs.c:2748
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Das Verschieben von Blöcken während der Größenänderung der Inodes scheiterte \n"
+
+#: misc/tune2fs.c:2780
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Fehler beim Ändern der Inode-Größe.\n"
+"Starten Sie e2undo, um die Änderungen am Dateisystem rückgängig zu machen. \n"
+
+#: misc/tune2fs.c:2991
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Wenn Sie sicher sind, dass das Dateisystem auf keinem Knoten benutzt wird,\n"
+"führen Sie bitte Folgendes aus:\n"
+"„tune2fs -f -E clear_mmp {device}“\n"
+
+#: misc/tune2fs.c:2998
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Die magische Zahl des MMP-Blocks ist ungültig. Versuchen Sie, dies durch\n"
+"„e2fsck -f %s“\n"
+"zu beheben.\n"
+
+#: misc/tune2fs.c:3010
+msgid "Cannot modify a journal device.\n"
+msgstr "Ein Journalgerät kann nicht modifiziert werden.\n"
+
+#: misc/tune2fs.c:3023
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Die Inode-Größe ist bereits %lu\n"
+
+#: misc/tune2fs.c:3030
+msgid "Shrinking inode size is not supported\n"
+msgstr "Das Verringern der Inode-Größe wird nicht unterstützt\n"
+
+#: misc/tune2fs.c:3035
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Unzulässige Inode-Größe: %lu (max %d)\n"
+
+#: misc/tune2fs.c:3041
+msgid "Resizing inodes could take some time."
+msgstr "Die Änderung der Inodegröße kann einige Zeit dauern."
+
+#: misc/tune2fs.c:3090
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Warnung: Das Journal ist inkonsistent. Sie sollten das Journal noch einmal mittels:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"abarbeiten lassen und dann diesen Befehl noch einaml laufen lassen. Ansonsten\n"
+"werden alle Änderungen durch das wiederherstellen des Journals überschrieben.\n"
+
+#: misc/tune2fs.c:3099
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Das Journal wird wiederhergestellt.\n"
+
+#: misc/tune2fs.c:3123
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Die maximale Anzahl von Einhängungen wird auf %d gesezt\n"
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Die Anzahl der Einhängungen wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:3134
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Das Fehlerverhalten wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:3139
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Die Gruppen-ID reservierter Blöcke wird auf %lu gesetzt\n"
+
+#: misc/tune2fs.c:3144
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Der Abstand zwischen zwei Prüfläufen ist zu groß (%lu)"
+
+#: misc/tune2fs.c:3151
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Der Abstand zwischen den Prüfläufen wird auf %lu Sekunden gesetzt\n"
+
+#: misc/tune2fs.c:3158
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Der prozentuelle Anteil reservierter Blöcke wird auf %g%% (%llu Blöcke) gesetzt\n"
+
+#: misc/tune2fs.c:3165
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "Die Anzahl reservierter Blöcke ist zu groß (%llu)"
+
+#: misc/tune2fs.c:3172
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Die Anzahl reservierter Blöcke wird auf %llu gesetzt\n"
+
+#: misc/tune2fs.c:3177
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Das Dateisystem hat bereits Sparse-Superblöcke.\n"
+
+#: misc/tune2fs.c:3180
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Das Aktivieren von Sparse-Superblöcken wird auf Dateisystemen mit aktivierter\n"
+"Eigenschaft meta_bg nicht unterstützt.\n"
+
+#: misc/tune2fs.c:3190
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Kennung „Sparse-Superblöcke“ ist gesetzt. %s"
+
+#: misc/tune2fs.c:3195
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Das Zurücksetzen der Kennung „Sparse-Superblöcke“ wird nicht unterstützt.\n"
+
+#: misc/tune2fs.c:3203
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Der Zeitpunkt der letzten Prüfung des Dateisystems wird auf %s gesetzt\n"
+
+#: misc/tune2fs.c:3209
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Die Benutzer-ID reservierter Blöcke wird auf %lu gesetzt\n"
+
+#: misc/tune2fs.c:3241
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Fehler bei der Verwendung von clear_mmp. Es muss zusammen mit -f benutzt werden\n"
+
+#: misc/tune2fs.c:3259
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Quotas können nur bei nicht eingehängten Dateisystemen geändert werden.\n"
+
+#: misc/tune2fs.c:3276
+#, fuzzy
+#| msgid "Setting UUID on a checksummed filesystem could take some time."
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Das Setzen einer UUID auf einem durch Prüfsummen geschtzten Dateisysten kann einige Zeit dauern."
+
+#: misc/tune2fs.c:3286
+#, fuzzy
+#| msgid "Setting UUID on a checksummed filesystem could take some time."
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Das Setzen einer UUID auf einem durch Prüfsummen geschtzten Dateisysten kann einige Zeit dauern."
+
+#: misc/tune2fs.c:3303
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "Die UUID kann nur bei nicht eingehängtem Dateisystem geändert werden.\n"
+
+#: misc/tune2fs.c:3306
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "We Sie nur Kernel verwenden, die neuer al v4.4 sind, starten Sie „tune2fs -O metadata_csum_seed†und danach diesen Befehl noch einmal.\n"
+
+#: misc/tune2fs.c:3337
+msgid "Invalid UUID format\n"
+msgstr "Ungültiges UUID-Format\n"
+
+#: misc/tune2fs.c:3353
+msgid "Need to update journal superblock.\n"
+msgstr "Der Journal-Superblock muss aktualisiert werden.\n"
+
+#: misc/tune2fs.c:3375
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Die Inode-Größe kann nur bei ausgehängtem Dateisystem geändert werden.\n"
+
+#: misc/tune2fs.c:3382
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Das Ändern der Inode-Größe auf Dateisystemen mit aktiviertem flex_bg\n"
+"wird nicht unterstützt.\n"
+
+#: misc/tune2fs.c:3400
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Die Inode-Größe wird auf %lu gesetzt\n"
+
+#: misc/tune2fs.c:3404
+msgid "Failed to change inode size\n"
+msgstr "Die Inode-Größe konnte nicht geändert werden\n"
+
+#: misc/tune2fs.c:3418
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Die Stride-Größe wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:3423
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Die Stripebreite wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:3430
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Die erweiterten Standard-Einhängeoptionen werden auf „%s“ gesetzt\n"
+
+#: misc/util.c:101
+msgid "<proceeding>\n"
+msgstr "<Verarbeitung läuft\n"
+
+#: misc/util.c:105
+#, fuzzy, c-format
+#| msgid "Proceed anyway (or wait %d seconds) ? (y,N) "
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Trotzdem fortfahren (oder %d Sekunden warten) ? (j,n) "
+
+#: misc/util.c:109
+msgid "Proceed anyway? (y,N) "
+msgstr "Trotzdem fortfahren? (j,n) "
+
+#: misc/util.c:136
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs wird trotzdem erzwungen. Hoffentlich ist /etc/mtab nicht korrekt.\n"
+
+#: misc/util.c:141
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "%s wird hier nicht angelegt!\n"
+
+#: misc/util.c:148
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs wird trotzdem erzwungen.\n"
+
+#: misc/util.c:164
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Es konnte kein Speicher zum Einlesen der Journaloptionen reserviert werden!\n"
+
+#: misc/util.c:189
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Ein zu %s passendes Journalgerät konnte nicht gefunden werden\n"
+
+#: misc/util.c:224
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Falsche Journaloptionen angegeben:\n"
+"\n"
+"Journaloptionen werden durch Kommata getrennt. Manche erwarten ein\n"
+"\tArgument, welches mit Gleichheitszeichen („=“) zugewiesen wird.\n"
+"\n"
+"Gültige Journaloptionen sind:\n"
+"\tsize=<Journalgröße in Megabytes>\n"
+"\tdevice=<Journalgerät>\n"
+"\tlocation=<Position des Journals>\n"
+"\n"
+"Die Größe des Journals muss zwischen 1024 und 10240000 Dateisystemblöcken\n"
+"\tliegen.\n"
+"\n"
+
+#: misc/util.c:267
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Das Dateisystem ist für ein Journal zu klein\n"
+
+#: misc/util.c:284
+#, fuzzy, c-format
+#| msgid ""
+#| "\n"
+#| "The requested journal size is %d blocks; it must be\n"
+#| "between 1024 and 10240000 blocks. Aborting.\n"
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Die gewünschte Journalgröße ist %d Blöcke; sie muss\n"
+"zwischen 1024 und 10240000 Blöcken liegen. Abbruch.\n"
+
+#: misc/util.c:292
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| "Journal size too big for filesystem.\n"
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Das Journal ist für dieses Dateisystem zu groß.\n"
+
+#: misc/util.c:305
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Dieses Dateisystem wird automatisch alle %d Einhängungen oder\n"
+"%g Tage überprüft, was immer zuerst kommt.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Aufruf: %s [-d] [-p Prozess-ID-Datei] [-s Socketpfad] [-T Timeout]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n Anzahl] [-s Socketpfad]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "ungültige Argumente"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "verbinden"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "schreiben"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "Lesezähler"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "ungültige Länge der Antwort"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "der uuidd-Dämon läft bereits mit Prozess-ID %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Es konnte kein Unix-Stream-Socket erzeugt werden: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Es konnte nicht mit Unix-Socket %s verbunden werden: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Lauschen auf Unix-Socket %s war nicht möglich: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Fehler beim Lesen vom Client, Länge = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "Operation %d, eingehende Nummer = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Zeit-UUID erzeugt: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Zufällige UUID erzeugt: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Zeit-UUID %s und die folgende UUID erzeugt\n"
+msgstr[1] "Zeit-UUID %s und die folgenden %d UUIDs erzeugt\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "%d UUIDs erzeugt:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ungültige Operation %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Ungültige Nummer: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Fehler beim Aufruf des Uuid-Dämons (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s und die folgende UUID\n"
+msgstr[1] "%s und die folgenden %d UUIDs\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Liste der UUIDs:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Unerwartete Antwortlänge von Server %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Der mit Prozess-ID %d laufende uuidd konnte nicht abgeschossen werden: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Der mit PID %d laufende uuidd wurde abgeschossen\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Aufruf: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "# Dump der Erweiterung:\n"
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tAnz=%llu, Größe=%llu, Cursor=%llu, Sortiert=%llu\n"
+
+#: resize/main.c:49
+#, fuzzy, c-format
+#| msgid ""
+#| "Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-z undo_file]\n"
+#| "\n"
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Aufruf: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] Gerät [-b|-s|neue_Größe] [-z Undo-Datei]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Die Inode-Tabelle wird erweitert"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Blöcke werden verschoben"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Die Inode-Tabelle wird gelesen"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Die Inode-Referenzen werden aktualisiert"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Die Inode-Tabelle wird verschoben"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Unbekannter Durchgang?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Start von Durchgang %d (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Die Größenveränderung von Bigalloc-Dateisystemen wurde noch nicht vollständig\n"
+"geprüft. Deswegen handeln Sie auf eigene Gefahr!. Verwenden Sie die Option\n"
+"„force“, wenn Sie trotzdem fortfahren wollen.\n"
+
+#: resize/main.c:368
+#, c-format
+msgid "while opening %s"
+msgstr "beim Öffnen von %s"
+
+#: resize/main.c:376
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "beim Abfragen der Statusinformation für %s"
+
+#: resize/main.c:457
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Bitte lassen Sie zuerst „e2fsck -f %s“ laufen.\n"
+"\n"
+
+#: resize/main.c:476
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Geschätzte minimale Größe des Dateisystems: %llu\n"
+
+#: resize/main.c:516
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Unzulässige neue Größe: %s\n"
+
+#: resize/main.c:535
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Die neue Größe lässt sich nicht mehr mit 32 Bits ausdrücken\n"
+
+#: resize/main.c:548
+msgid "New size results in too many block group descriptors.\n"
+msgstr ""
+
+#: resize/main.c:555
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Die neue Größe ist kleiner als das Minimum (%llu)\n"
+
+#: resize/main.c:562
+msgid "Invalid stride length"
+msgstr "Ungültige „Stride“-Länge"
+
+#: resize/main.c:586
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Die sie enthaltende Partition (oder Gerät) ist nur %llu (%dk) Blöcke groß.\n"
+"Sie wollen %llu Blöcke haben.\n"
+
+#: resize/main.c:593
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Die 64Bit-Eigenschaft kann weder gesetzt noch zurückgesetzt werden.\n"
+
+#: resize/main.c:597
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Die 64Bit-Eigenschaft kann auf einem Dateisystem, das größer als 2^32 Blöcke ist, nicht geändert werden.\n"
+
+#: resize/main.c:603
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Die 64-Bit-Eigenschaft kann nur bei nicht eingehängten Dateisystemen geändert werden.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Bitte aktivieren sie Erweiterungen mit tune2fs, bevor sie 64-Bit aktivieren.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Das Dateisystem ist bereits %llu (%dk) Blöcke lang. Nichts zu tun!\n"
+"\n"
+
+#: resize/main.c:623
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Das Dateisystem ist bereits 64-bittig.\n"
+
+#: resize/main.c:628
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Das Dateisystem ist bereits 32-bittig.\n"
+
+#: resize/main.c:633
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr ""
+
+#: resize/main.c:642
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Das Dateisystem wird auf 64-bittig konvertiert.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Das Dateisystem wird auf 32-bittig konvertiert.\n"
+
+#: resize/main.c:646
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Die Größe des Dateisystems auf %s wird auf %llu (%dk) Blöcke geändert.\n"
+
+#: resize/main.c:656
+#, c-format
+msgid "while trying to resize %s"
+msgstr "beim Versuch, die Größe von %s zu ändern"
+
+#: resize/main.c:659
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Bitte lassen Sie „e2fsck -fy %s“ laufen, um das\n"
+"Dateisystem nach der abgebrochenen Größenänderung\n"
+"zu reparieren.\n"
+
+#: resize/main.c:664
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Das Dateisystem auf %s is nun %llu (%dk) Blöcke lang.\n"
+"\n"
+
+#: resize/main.c:679
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "beim Versuch, %s abzuschneiden"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "Der Kernel unterstützt die Online-Größenänderung mit sparse_super2 nicht"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+"Dateisystem bei %s ist auf %s eingehängt; Online-Größenänderung ist\n"
+"erforderlich\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Online-Schrumpfen wird nicht unterstützt"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Das Dateisystem unterstützt die Online-Größenänderung nicht"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Nicht genug reservierte GDT-Blöcke für die Größenänderung"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+"Der Kernel unterstützt die Online-Größenänderungen eines so großen\n"
+"Dateisystems nicht"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "beim Versuch, den Einhängepunkt %s zu öffnen"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Die alte Schnittstelle für Größenänderung wurde angefordert.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Die Erlaubnis zum Ändern der Dateisystemgröße wurde verweigert."
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Beim Überprüfen der Unterstützung für Online-Größenänderung"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Der Kernel bietet keine Unterstützung für eine Online-Größenänderung"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Die Größe von %s wird gerade online auf %llu (%dk) Blöcke geändert.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "beim Versuch, die letzte Gruppe zu erweitern"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "beim Versuch, die Gruppe #%d hinzuzufügen"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr ""
+"Das Dateisystem bei %s ist auf %s eingehängt und die Änderung der Größe im\n"
+"laufenden System wird auf diesem System nicht unterstützt.\n"
+
+#: resize/resize2fs.c:760
+#, fuzzy, c-format
+#| msgid "inodes (%llu) must be less than %u"
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "Die Inodes (%llu) müssen unter %u liegen"
+
+#: resize/resize2fs.c:1039
+msgid "reserved blocks"
+msgstr "reservierte Blöcke"
+
+#: resize/resize2fs.c:1289
+msgid "meta-data blocks"
+msgstr "Metadaten-Blöcke"
+
+#: resize/resize2fs.c:1393 resize/resize2fs.c:2435
+msgid "new meta blocks"
+msgstr "neue Metadaten-Blöcke"
+
+#: resize/resize2fs.c:2659
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Dies sollte nie geschehen! Kein sb im letzten super_sparse bg?\n"
+
+#: resize/resize2fs.c:2664
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Dies sollte nie geschehen! Unerwartete old_desc in super_sparse bg?\n"
+
+#: resize/resize2fs.c:2737
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Dies sollte nie geschehen: Der Größenänderungs-Inode ist defekt!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+#, fuzzy
+#| msgid "EXT2FS Library version 1.43.5"
+msgid "EXT2FS Library version 1.46.3"
+msgstr "EXT2FS-Bibliothek, Version 1.43.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Falsche magische Zahl für eine ext2_filesys-Struktur"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Falsche magische Zahl für eine badblocks_list-Struktur"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Falsche magische Zahl für eine badblocks_iterate-Struktur"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Falsche magische Zahl für eine inode_scan-Struktur"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Falsche magische Zahl für eine io_channel-Struktur"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Falsche magische Zahl für eine Unix io_channel-Struktur"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Falsche magische Zahl für eine io_manager-Struktur"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Falsche magische Zahl für eine block_bitmap-Struktur"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Falsche magische Zahl für eine inode_bitmap-Struktur"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Falsche magische Zahl für eine generic_bitmap-Struktur"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Falsche magische Zahl für eine test-io_channel-Struktur"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Falsche magische Zahl für eine Struktur für die Liste der Verzeichnisblöcke"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Falsche magische Zahl für eine icount-Struktur"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Falsche magische Zahl für eine io_channel-Struktur"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Falsche magische Zahl für eine Ext2-Datei-Struktur"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Falsche magische Zahl für einen Ext2-Abbild-Kopf"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Falsche magische Zahl für eine Struktur des Inode-io_channels"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Falsche magische Zahl für eine Ext4-Erweiterungshandle"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Ungültige magische Zahl im Superblock"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Die Dateisystemversion ist zu hoch"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Dies ist ein Versuch, auf ein nur-lesbar geöffnetes Dateisystem zu schreiben"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Die Gruppendeskriptoren konnten nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Die Gruppendeskriptoren konnten nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Defekter Gruppendeskriptor: defekter Block für die Block-Bitmap"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Defekter Gruppendeskriptor: defekter Block für die Inode-Bitmap"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Defekter Gruppendeskriptor: defekter Block für die Inode-Tabelle"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Eine Inode-Bitmap konnte nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Eine Inode-Bitmap konnte nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Eine Block-Bitmap konnte nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Eine Block-Bitmap konnte nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Eine Inode-Tabelle konnte nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Eine Inode-Tabelle konnte nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Der nächste Inode kann nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Das Dateisystem hat eine unerwartete Blockgröße"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Das Ext2-Verzeichnis ist defekt"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Der Versuch, einen Block vom Dateisystem zu lesen, endete in kurzem Lesen"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Der Versuch, einen Block auf das Dateisystem zu schreiben, endete in kurzem Schreiben"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Kein freier Platz im Verzeichnis"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "die Inode-Bitmap wurde nicht geladen"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "die Block-Bitmap wurde nicht geladen"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Ungültige Inode-Nummer"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Ungültige Blockzahl"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Interner Fehler in ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Nicht genug Platz, um das vorgeschlagene Dateisystem zu bauen"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Es wurde eine ungültige Blocknummer an ext2fs_mark_block_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Es wurde eine ungültige Blocknummer an ext2fs_unmark_block_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Es wurde eine ungültige Blocknummer an ext2fs_test_block_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Es wurde eine ungültige Inode-Nummer an ext2fs_mark_inode_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Es wurde eine ungültige Inode-Nummer an ext2fs_unmark_inode_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Es wurde eine ungültige Inode-Nummer an ext2fs_test_inode_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+"Es wird versucht, das Ende der Block-Bitmap jenseits des wirklichen Endes\n"
+"zu platzieren"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+"Es wird versucht, das Ende der Inode-Bitmap jenseits des wirklichen Endes\n"
+"zu platzieren"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Es wurde ein ungültiger indirekter Block gefunden"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Es wurde ein ungültiger doppelt indirekter Block gefunden"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Es wurde ein ungültiger dreifach indirekter Block gefunden"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Die Block-Bitmaps sind nicht identisch"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Die Inode-Bitmaps sind nicht identisch"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Ungültiger oder fehlerhafter Gerätename"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Einer Blockgruppe fehlt eine Inode-Tabelle"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Der Ext2-Superblock ist defekt"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Eine unzulässige generische Bitnummer wurde an ext2fs_mark_generic_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Eine unzulässige generische Bitnummer wurde an ext2fs_unmark_generic_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Eine unzulässige generische Bitnummer wurde an ext2fs_test_generic_bitmap übergeben"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Es wurden zu viele symbolische Verknüpfungen gefunden."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Die Callback-Funktion kann diesen Fall nicht handhaben."
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Der Inode kommt von einem beschädigten Block in der Inode-Tabelle"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Das Dateisystem besitzt nicht unterstützte Eigenschaft(en)"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Das Dateisystem besitzt nicht unterstützte Nur-Lesen-Eigenschaft(en):"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Der EA-Kanal hat nicht positioniert beim Lesen oder Schreiben"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Die Reservierung von Speicher schlug fehl"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Ein ungültiges Argument wurde an die Ext2-Bibliothek übergeben"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Im Ext2-Dateisystem konnte kein Block angefordert werden"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Im Ext2-Dateisystem konnte kein Inode angefordert werden"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Der Ext2-Inode weist nicht auf ein Verzeichnis"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Zu viele Referenzen in der Tabelle"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Die Datei wurde von ext2_lookup nicht gefunden"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Die Datei wurde nur-lesbar geöffnet"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Der Verzeichnisblock des ext2-Dateisystems wurde nicht gefunden"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Das Ext2-Verzeichnis existiert bereits"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Nicht implementierte Ext2-Bibliotheksfunktion"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Der Benutzer hat abgebrochen"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Die Ext2-Datei ist zu groß"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Das angegebene Journalgerät ist kein blockorientiertes Gerät"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Der Journal-Superblock wurde nicht gefunden"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Das Journal muß mindestens 1024 Blöcke groß sein"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Nicht unterstützte Journalversion"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Fehler beim Laden des externen Journals"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Das Journal wurde nicht gefunden."
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Verzeichnishashes werden nicht unterstützt"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Die Nummer des Blocks für erweiterte Attribute ist unzulässig"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Ein Dateisystem mit der gewünschten Anzahl Inodes kann nicht erzeugt werden"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Der E2image-Schnappschuss wird nicht verwendet"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Zu viele reservierte Blöcke für Gruppen-Deskriptoren"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Der Größenänderungs-Inode ist defekt"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Es wurde versucht, eine Block-Bitmap mit fehlendem indirektem Block zu schreiben"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Erfolg"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Datenbank ist beschädigt"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: EA-Fehler"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Fehler beim Sperren"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Hauptspeicher erschöpft"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Datensatz existiert bereits"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Die Sperre existiert schon auf anderen Schlüsseln"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Ungültiger Parameter"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Der Datensatz existiert nicht"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Schreiben ist nicht zulässig"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Die Liste der Ext2fs-Verzeichnisblöcke ist leer"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+"Es wird versucht, eine Blockzuweisung über einen nur-lesbaren Blockiterator zu\n"
+"ändern"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Falsche magische Zahl für einen gespeicherten Pfad zu ext4-Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Falsche magische Zahl für eine generische 64-Bit-Bitmap"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Falsche magische Zahl für eine 64-Bit-Block-Bitmap"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Falsche magische Zahl für eine 64-Bit-Inode-Bitmap"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Falsche magische Zahl --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Falsche magische Zahl --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Falsche magische Zahl --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Falsche magische Zahl --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Falsche magische Zahl --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Falsche magische Zahl --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Falsche magische Zahl --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Defekter Kopf einer Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Beschädigter Erweiterungsindex"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Beschädigte Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Es ist kein freier Platz in der Karte der Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Der Inode verwendet keine Erweiterungen"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Keine „nächste“ Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Keine „vorherige“ Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Keine „obere“ Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Keine „untere“ Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Kein aktueller Knoten"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Diese Ext2fs-Operation wird nicht unterstẗzt"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Es gibt keinen Platz, um die Erweiterung in den Knoten einzufügen"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Die Aufteilung würde zu einem leeren Knoten führen"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Die Erweiterung wurde nicht gefunden"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Die Operation wird für Inodes mit Erweiterungen nicht unterstüẗzt"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Die Länge der Erweiterung in ungültig"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "Der EA-Kanal unterstützt keine 64-Bit-Blocknummern"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+"Wegen des Fehlens von /etc/mtab kann nicht geprüft werden, ob das Dateisystem\n"
+"eingehängt ist"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Das Dateisystem ist zu groß, um die veralteten Bitmaps zu verwenden"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: fehlende magische Zahl"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: das Gerät ist derzeit aktiv"
+
+#: lib/ext2fs/ext2_err.c:151
+#, fuzzy
+#| msgid "MMP: fsck being run"
+msgid "MMP: e2fsck being run"
+msgstr "MMP: fsck läuft derzeit"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: die Blocknummer ist jenseits der Dateisystemgrenzen"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: eine unbekannte Operation wird durchgeführt"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: das Dateisystem wird immer noch verwendet"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: öffnen mit O_DIRECT ist gescheitert"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Die Größe des „Blockgruppen-Deskriptors“ ist unzulässig"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Die Prüfsumme des Inodes passt nicht dazu"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Die Prüfsumme der Inode-Bitmap passt nicht zur Bitmap"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Die Prüfsumme des Erweiterungsblocks passt nicht dazu"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Der Verzeichnisblock hat keinen Platz für eine Prüfsumme"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Die Prüfsumme des Verzeichnisblocks passt nicht dazu"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Die Prüfsumme des Blocks für erweiterte Attribute passt nicht dazu"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Die Prüfsumme des Superblocks passt nicht dazu"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Unbekannter Prüfsummenalgorithmus"
+
+#: lib/ext2fs/ext2_err.c:165
+#, fuzzy
+#| msgid "MMP block checksum does not match MMP block"
+msgid "MMP block checksum does not match"
+msgstr "Die Prüfsumme des MMP-Blocks passt nicht dazu"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Die Ext2-Datei existiert bereits"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Die Prüfsumme der Block-Bitmap passt nicht zur Bitmap"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Iterieren von Datenblöcken eines Inodes, das Inlinedaten enthält, ist nicht möglich"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Das erweiterte Attribut hat eine ungültige Namenslänge"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Das erweiterte Attribut hat eine ungültige Wertlänge"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Das erweiterte Attribut hat einen ungültigen Hashwert"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Das erweiterte Attribut hat einen ungültigen Vorspann"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Der Schlüssel des erweiterten Attributs ist unauffindbar"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Der zur Verfügung stehende Platz reicht nicht aus, um die Daten des erweiterten Attributes zu speichern"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Dem Dateisystem fehlen die ext_attr oder das inline_data Eigenschaft"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Der Inode verwendet keine Inline-Daten"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Kein Block für eine Inode mit Inline-Daten"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Es ist kein freier Platz in den Inline-Daten"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Falsche magische Zahl für eine Struktur für erweiterte Attribute"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Die Inode scheint Müll zu enthalten"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Das erweiterte Attribut hat einen ungültigen Wertabstand"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Die Journalkennungen sind inkonsistent"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Die Undo-Datei ist defekt"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Falsche Undo-Datei für dieses Dateisystem"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Das Dateisystem ist defekt"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Falscher CRC im Dateisystem gefunden"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Der Journal-Superblock ist defekt"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Der Inode ist defekt"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:190
+#, fuzzy
+#| msgid ", Group descriptors at "
+msgid "Group descriptors not loaded"
+msgstr ", Gruppendeskriptoren in "
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profilversion 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Ungültige magische Zahl im profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "die Profilsektion wurde nicht gefunden"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Zusammenhang des Profils wurde nicht gefunden"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+"Dies ist ein Versuch, einen Bezug zu einem Knoten hinzuzufügen, der keine\n"
+"Sektion ist"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Der Header der Profilsektion hat einen von Null verschiedenen Wert"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Ungültige verkettete Liste in den Profilstrukturen"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Ungültige Gruppenebene in den Profilstrukturen"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Ungültiger Zeiger auf die Eltern in den Profilstrukturen"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Ungültige magische Zahl im Profiliterator"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "In dem Sektionsknoten kann der Wert nicht gesetzt werden"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Es wurde ein unzulässiges Argument an die Profilbibliothek übergeben"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Es wird versucht, ein nur lesbares Profil zu ändern"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Der Header der Profilsektion ist nicht auf der obersten Ebene"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Syntaxfehler im Header der Profilsektion"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Syntaxfehler in den Profilbeziehungen"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Überzählige schließende Klammer im Profil"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Fehlende öffnende Klammer im Profil"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Ungültige magische Zahl im profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Unbekannte magische Zahl im section_t des Profils"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Iteration durch alle Toplevel-Sektionen wird nicht unterstützt"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ungültiges profile_section-Objekt"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Keine weiteren Sektionen"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Ungültige Namen an die Abfrageroutine übergeben"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Es ist keine Profildatei offen"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Ungültige magische Zahl im profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Die Profildatei konnte nicht geöffnet werden"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Die Sektion existiert bereits"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ungültiger boolescher Wert"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ungültiger ganzzahliger Wert"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Ungültige magische Zahl im profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, fuzzy, c-format
+#| msgid "\tlast mounted on %s on %s"
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tzuletzt auf %s auf %s eingehängt"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tzuletzt auf %s eingehängt"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tauf %s erzeugt"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tzuletzt geändert %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "In %2$s wurde eine %1$s-Partitionstabelle gefunden\n"
+
+#: lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Die Datei %s existiert nicht und es wurde keine Größe angegeben.\n"
+
+#: lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Die reguläre Datei %s wird angelegt\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "%s kann nicht geöffnet werden: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Das Gerät existiert offensichtlich nicht; haben Sie es korrekt angegeben?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s ist kein spezielles Blockgerät.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s hat ein %s-Dateisystem mit Namen „%s“\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s hat ein %s-Dateisystem\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s enthält Daten von „%sâ€\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "Aufruf: %s [-F] [-I inode_buffer_blocks] Gerät\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "beim Versuch, %s zu öffnen"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "%u Inodes untersucht.\n"
+
+#, fuzzy
+#~| msgid ""
+#~| "The resize_inode and meta_bg features are not compatible.\n"
+#~| "They can not be both enabled simultaneously.\n"
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "resize_inode und meta_bg sind nicht kompatibel und können\n"
+#~ "daher nicht gleichzeitig aktiviert werden.\n"
+
+#, fuzzy
+#~| msgid ""
+#~| "Changing the inode size not supported for filesystems with the flex_bg\n"
+#~| "feature enabled.\n"
+#~ msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+#~ msgstr ""
+#~ "Das Ändern der Inode-Größe auf Dateisystemen mit aktiviertem flex_bg\n"
+#~ "wird nicht unterstützt.\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "i_dir_acl für Inode %i (%Q) ist %Id, sollte Null sein.\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "beim Öffnen von Verzeichnis „%sâ€"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Es wurden Prüfsummenfehler im Dateisystem gefunden! Starten Sie umgehend e2fsck!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Prüfsummenfehler in den Bitmaps gefunden! Starten Sie umgehend e2fsck!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: Fehler beim Lesen von Bitmaps: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Warnung, es gab Schwierigkeiten beim Schreiben der Superblöcke.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Jounaleigenschaften: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Journalgröße: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Journal-Länge: %u\n"
+#~ "Journal-Sequenz: 0x%08x\n"
+#~ "Journal-Start: %u\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Jounal-Fehlernummer: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Journal-Blockgröße: %u\n"
+#~ "Journal-Länge: %u\n"
+#~ "Journal-Startblock: %u\n"
+#~ "Journal-Sequenz: 0x%08x\n"
+#~ "Journal-Start: %u\n"
+#~ "Journal-Benutzeranzahl: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "Jounalbenutzer: %s\n"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "Bitte lassen Sie e2fsck dieses Dateisystem überprüfen.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr ""
+#~ "Inode %i hat den Kompressions-Bitschalter auf einem Dateisystem gesetzt,\n"
+#~ "welches dies nicht unterstützt. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "Fehler beim Zuweisen des Blocks für erweiterte Attribute %b. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: Warnung: Die Kompressionsunterstützung ist experimentell.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: e2fsck wurde ohne Unterstützung für HTREE kompiliert,\n"
+#~ "\taber das Dateisystem %s besitzt HTREE-Verzeichnisse.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "beim Reservieren eines Puffers zum Nullen"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", ungenutzte Inodes %u\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Die Dateisystemdaten konnten nicht gelesen werden \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "tdb_fetch von %s ist fehlgeschlagen\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "Die UUID des Dateisystems stimmte nicht überein \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "tdb_open von %s ist fehlgeschlagen\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "%s konnte nicht geöffnet werden\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr "Zurückgespielte Transaktion der Größe %zd an Position %llu\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Schreiben von %s ist fehlgeschlagen\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Ungültiger Quotatyp-Parameter: %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "Speicher zum Einlesen der Quota-Optionen konnte nicht reserviert werden!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Es kann kein Speicher für den Tdb-Dateinamen reserviert werden\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Um die durch Tune2fs gemachten Änderungen rückgängig zu machen, starten Sie\n"
+#~ "bitte\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s ist das ganze Gerät und nicht nur eine einzelne Partition!\n"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr ""
+#~ "Das Zurücksetzen des Kennzeichens für „Erweiterung“ wird auf %s\n"
+#~ "\tnicht unterstützt"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s: Die Kombination der Eigenschaften flex_bg und\n"
+#~ "t!resize_inode wird von resize2fs nicht unterestützt.\n"
+
+#~ msgid "@i %i should not have EOFBLOCKS_FL set (size %Is, lblk %r)\n"
+#~ msgstr " in @i %i sollte EOFBLOCKS_FL nicht gesetzt sein (Größe %Is, lblk %r)\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "Konnte die Größe des Dateisystems nicht ermitteln"
+
+#~ msgid "#\t\t %llu -> %llu (%llu)\n"
+#~ msgstr "#\t\t %llu -> %llu (%llu)\n"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "short write (only %d bytes) for writing image header"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Warnung: Fragmente werden nicht unterstützt. Ignoriere -f Option\n"
+
+#~ msgid "Calling BLKDISCARD from %llu to %llu "
+#~ msgstr "Der Aufruf von BLKDISCARD für den Bereich von %llu bis %llu war "
+
+#~ msgid "succeeded.\n"
+#~ msgstr "erfolgreich.\n"
diff --git a/po/e2fsprogs.pot b/po/e2fsprogs.pot
new file mode 100644
index 0000000..6e03e97
--- /dev/null
+++ b/po/e2fsprogs.pot
@@ -0,0 +1,8378 @@
+# E2fsprogs translation template file
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+# 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022,
+# 2023 by Theodore Ts'o
+# This file is distributed under the same license as the e2fsprogs package.
+# Theodore Ts'o <tytso@mit.edu>, 2023.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.47.0\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2023-02-05 15:05-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:223
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr ""
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1273 misc/badblocks.c:1281
+#: misc/badblocks.c:1295 misc/badblocks.c:1307 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1441
+#: misc/e2image.c:1641 misc/e2image.c:1662 misc/mke2fs.c:239
+#: misc/tune2fs.c:3037 misc/tune2fs.c:3231 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr ""
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr ""
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:246
+msgid "while reading in list of bad blocks from file"
+msgstr ""
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr ""
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr ""
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr ""
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr ""
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr ""
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr ""
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr ""
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr ""
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr ""
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr ""
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr ""
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr ""
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr ""
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr ""
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr ""
+
+#: e2fsck/journal.c:1290
+msgid "reading journal superblock\n"
+msgstr ""
+
+#: e2fsck/journal.c:1363
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr ""
+
+#: e2fsck/journal.c:1372
+#, c-format
+msgid "%s: journal too short\n"
+msgstr ""
+
+#: e2fsck/journal.c:1385
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr ""
+
+#: e2fsck/journal.c:1687 misc/fuse2fs.c:3803
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr ""
+
+#: e2fsck/journal.c:1689
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+
+#: e2fsck/journal.c:1716
+#, c-format
+msgid "while trying to re-open %s"
+msgstr ""
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr ""
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr ""
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr ""
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr ""
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr ""
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr ""
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr ""
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr ""
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr ""
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr ""
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr ""
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr ""
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr ""
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr ""
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr ""
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr ""
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr ""
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr ""
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr ""
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr ""
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr ""
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr ""
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr ""
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr ""
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr ""
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr ""
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr ""
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr ""
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr ""
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr ""
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr ""
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr ""
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr ""
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr ""
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr ""
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr ""
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr ""
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr ""
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr ""
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr ""
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr ""
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr ""
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr ""
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr ""
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr ""
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr ""
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr ""
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr ""
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr ""
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr ""
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr ""
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr ""
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr ""
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr ""
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:829
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr ""
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr ""
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr ""
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr ""
+
+#: e2fsck/pass1.c:350
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr ""
+
+#: e2fsck/pass1.c:1175
+msgid "getting next inode from scan"
+msgstr ""
+
+#: e2fsck/pass1.c:1227
+msgid "in-use inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1238
+msgid "directory inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1248
+msgid "regular file inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1257 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1266
+msgid "metadata block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1277
+msgid "inode casefold map"
+msgstr ""
+
+#: e2fsck/pass1.c:1342
+msgid "opening inode scan"
+msgstr ""
+
+#: e2fsck/pass1.c:2137
+msgid "Pass 1"
+msgstr ""
+
+#: e2fsck/pass1.c:2198
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr ""
+
+#: e2fsck/pass1.c:2249
+msgid "bad inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:2289
+msgid "inode in bad block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2309
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:2340
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2465
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:3766
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:4187
+msgid "block bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:4193
+msgid "inode bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:4199
+msgid "inode table"
+msgstr ""
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr ""
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr ""
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr ""
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr ""
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr ""
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr ""
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#: e2fsck/pass4.c:300
+msgid "Pass 4"
+msgstr ""
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr ""
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr ""
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr ""
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr ""
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr ""
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr ""
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr ""
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr ""
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr ""
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr ""
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr ""
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr ""
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr ""
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr ""
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr ""
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr ""
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr ""
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr ""
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr ""
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr ""
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr ""
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr ""
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr ""
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr ""
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr ""
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr ""
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr ""
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr ""
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr ""
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr ""
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr ""
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr ""
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr ""
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr ""
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr ""
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr ""
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr ""
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr ""
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr ""
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr ""
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr ""
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr ""
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr ""
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr ""
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr ""
+
+#: e2fsck/problem.c:118
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:122
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:127
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+
+#: e2fsck/problem.c:133
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:144
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+
+#: e2fsck/problem.c:151
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+
+#: e2fsck/problem.c:158
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:163
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:168
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:183
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:189
+#, no-c-format
+#. @-expanded: Error determining size of the physical device: %m\n
+msgid "Error determining size of the physical @v: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:194
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#: e2fsck/problem.c:204
+#, no-c-format
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+msgid "@S has an @n @j (@i %i).\n"
+msgstr ""
+
+#: e2fsck/problem.c:209
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+
+#: e2fsck/problem.c:214
+#. @-expanded: Can't find external journal\n
+msgid "Can't find external @j\n"
+msgstr ""
+
+#: e2fsck/problem.c:219
+#. @-expanded: External journal has bad superblock\n
+msgid "External @j has bad @S\n"
+msgstr ""
+
+#: e2fsck/problem.c:224
+#. @-expanded: External journal does not support this filesystem\n
+msgid "External @j does not support this @f\n"
+msgstr ""
+
+#: e2fsck/problem.c:229
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+
+#: e2fsck/problem.c:238
+#. @-expanded: journal superblock is corrupt.\n
+msgid "@j @S is corrupt.\n"
+msgstr ""
+
+#: e2fsck/problem.c:243
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr ""
+
+#: e2fsck/problem.c:248
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+
+#: e2fsck/problem.c:253
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+
+#: e2fsck/problem.c:258
+#. @-expanded: Clear journal
+msgid "Clear @j"
+msgstr ""
+
+#: e2fsck/problem.c:263 e2fsck/problem.c:819
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr ""
+
+#: e2fsck/problem.c:268
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr ""
+
+#: e2fsck/problem.c:273
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:278
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:284
+#, no-c-format
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+msgid "@I @o @i %i in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:290
+#, no-c-format
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+msgid "@I @i %i in @o @i list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:295
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:300
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:305
+#. @-expanded: journal version not supported by this e2fsck.\n
+msgid "@j version not supported by this e2fsck.\n"
+msgstr ""
+
+#: e2fsck/problem.c:311
+#, no-c-format
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:317
+#, no-c-format
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:322
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:328
+#. @-expanded: Run journal anyway
+msgid "Run @j anyway"
+msgstr ""
+
+#: e2fsck/problem.c:333
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+
+#: e2fsck/problem.c:338
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:344
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+
+#: e2fsck/problem.c:350
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr ""
+
+#: e2fsck/problem.c:355
+#. @-expanded: Resize inode not valid.
+msgid "Resize @i not valid. "
+msgstr ""
+
+#: e2fsck/problem.c:360
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#: e2fsck/problem.c:365
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#: e2fsck/problem.c:371
+#, no-c-format
+#. @-expanded: superblock hint for external superblock should be %X.
+msgid "@S hint for external superblock @s %X. "
+msgstr ""
+
+#: e2fsck/problem.c:376
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:381
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr ""
+
+#: e2fsck/problem.c:387
+#, no-c-format
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:392
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr ""
+
+#: e2fsck/problem.c:397
+#. @-expanded: Last group block bitmap uninitialized.
+msgid "Last @g @b @B uninitialized. "
+msgstr ""
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr ""
+
+#: e2fsck/problem.c:413
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#: e2fsck/problem.c:419
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#: e2fsck/problem.c:425
+#. @-expanded: One or more block group descriptor checksums are invalid.
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr ""
+
+#: e2fsck/problem.c:430
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr ""
+
+#: e2fsck/problem.c:435
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:440
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr ""
+
+#: e2fsck/problem.c:445
+#. @-expanded: superblock has invalid MMP block.
+msgid "@S has invalid MMP block. "
+msgstr ""
+
+#: e2fsck/problem.c:450
+#. @-expanded: superblock has invalid MMP magic.
+msgid "@S has invalid MMP magic. "
+msgstr ""
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:468
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+
+#: e2fsck/problem.c:474
+#. @-expanded: superblock MMP block checksum does not match.
+msgid "@S MMP @b checksum does not match. "
+msgstr ""
+
+#: e2fsck/problem.c:479
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr ""
+
+#: e2fsck/problem.c:489
+#. @-expanded: External journal superblock checksum does not match superblock.
+msgid "External @j @S checksum does not match @S. "
+msgstr ""
+
+#: e2fsck/problem.c:494
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:505
+#. @-expanded: Bad required extra isize in superblock (%N).
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#: e2fsck/problem.c:510
+#. @-expanded: Bad desired extra isize in superblock (%N).
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#: e2fsck/problem.c:515
+#. @-expanded: Invalid %U quota inode %i.
+msgid "Invalid %U @q @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:520
+#. @-expanded: superblock would have too many inodes (%N).\n
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:525
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#: e2fsck/problem.c:531
+#. @-expanded: Orphan file (inode %i) contains hole at block %b. Terminating orphan file
+#. @-expanded: recovery.\n
+msgid ""
+"Orphan file (@i %i) contains hole at @b %b. Terminating orphan file "
+"recovery.\n"
+msgstr ""
+
+#: e2fsck/problem.c:536
+#. @-expanded: Orphan file (inode %i) block %b contains wrong magic. Terminating orphan file
+#. @-expanded: recovery.\n
+msgid ""
+"Orphan file (@i %i) @b %b contains wrong magic. Terminating orphan file "
+"recovery.\n"
+msgstr ""
+
+#: e2fsck/problem.c:541
+#. @-expanded: Orphan file (inode %i) block %b contains wrong checksum. Terminating orphan file
+#. @-expanded: recovery.\n
+msgid ""
+"Orphan file (@i %i) @b %b contains wrong checksum. Terminating orphan file "
+"recovery.\n"
+msgstr ""
+
+#: e2fsck/problem.c:546
+#, c-format
+#. @-expanded: Orphan file (inode %i) size is not multiple of block size. Terminating orphan
+#. @-expanded: file recovery.\n
+msgid ""
+"Orphan file (@i %i) size is not multiple of block size. Terminating orphan "
+"file recovery.\n"
+msgstr ""
+
+#: e2fsck/problem.c:553
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr ""
+
+#: e2fsck/problem.c:557
+#. @-expanded: root inode is not a directory.
+msgid "@r is not a @d. "
+msgstr ""
+
+#: e2fsck/problem.c:562
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+
+#: e2fsck/problem.c:567
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr ""
+
+#: e2fsck/problem.c:573
+#, no-c-format
+#. @-expanded: deleted inode %i has zero dtime.
+msgid "@D @i %i has zero dtime. "
+msgstr ""
+
+#: e2fsck/problem.c:579
+#, no-c-format
+#. @-expanded: inode %i is in use, but has dtime set.
+msgid "@i %i is in use, but has dtime set. "
+msgstr ""
+
+#: e2fsck/problem.c:585
+#, no-c-format
+#. @-expanded: inode %i is a zero-length directory.
+msgid "@i %i is a @z @d. "
+msgstr ""
+
+#: e2fsck/problem.c:590
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:595
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:600
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:605
+#. @-expanded: group %g's block bitmap (%b) is bad.
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:610
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:615
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:620
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:625
+#. @-expanded: illegal %B (%b) in inode %i.
+msgid "@I %B (%b) in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:630
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:636
+#, no-c-format
+#. @-expanded: inode %i has illegal block(s).
+msgid "@i %i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:642
+#, no-c-format
+#. @-expanded: Too many illegal blocks in inode %i.\n
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:647
+#. @-expanded: illegal %B (%b) in bad block inode.
+msgid "@I %B (%b) in bad @b @i. "
+msgstr ""
+
+#: e2fsck/problem.c:652
+#. @-expanded: Bad block inode has illegal block(s).
+msgid "Bad @b @i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:657
+#. @-expanded: Duplicate or bad block in use!\n
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#: e2fsck/problem.c:662
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr ""
+
+#: e2fsck/problem.c:667
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+
+#: e2fsck/problem.c:674
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+
+#: e2fsck/problem.c:679
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:685
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:690
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+
+#: e2fsck/problem.c:696
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr ""
+
+#: e2fsck/problem.c:702
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+
+#: e2fsck/problem.c:708
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:714
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:720
+#, no-c-format
+#. @-expanded: error allocating block buffer for relocating %s\n
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#: e2fsck/problem.c:725
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:731
+#, no-c-format
+#. @-expanded: Relocating group %g's %s to %c...\n
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:736
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:741
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:746 e2fsck/problem.c:1965
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+msgid "@A @i @B (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:751
+#. @-expanded: error allocating block bitmap (%N): %m\n
+msgid "@A @b @B (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:757
+#, no-c-format
+#. @-expanded: error allocating icount link information: %m\n
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:763
+#, no-c-format
+#. @-expanded: error allocating directory block array: %m\n
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:769
+#, no-c-format
+#. @-expanded: Error while scanning inodes (%i): %m\n
+msgid "Error while scanning @is (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:775
+#, no-c-format
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:780
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:785
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:792
+#, no-c-format
+#. @-expanded: Error reading inode %i: %m\n
+msgid "Error reading @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:801
+#, no-c-format
+#. @-expanded: inode %i has imagic flag set.
+msgid "@i %i has imagic flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:807
+#, no-c-format
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:814
+#, no-c-format
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+
+#: e2fsck/problem.c:824
+#. @-expanded: journal inode is not in use, but contains data.
+msgid "@j @i is not in use, but contains data. "
+msgstr ""
+
+#: e2fsck/problem.c:829
+#. @-expanded: journal is not regular file.
+msgid "@j is not regular file. "
+msgstr ""
+
+#: e2fsck/problem.c:835
+#, no-c-format
+#. @-expanded: inode %i was part of the orphaned inode list.
+msgid "@i %i was part of the @o @i list. "
+msgstr ""
+
+#: e2fsck/problem.c:841
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+
+#: e2fsck/problem.c:846
+#. @-expanded: error allocating refcount structure (%N): %m\n
+msgid "@A refcount structure (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:851
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+msgid "Error reading @a @b %b for @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:856
+#. @-expanded: inode %i has a bad extended attribute block %b.
+msgid "@i %i has a bad @a @b %b. "
+msgstr ""
+
+#: e2fsck/problem.c:861
+#. @-expanded: Error reading extended attribute block %b (%m).
+msgid "Error reading @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:866
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:871
+#. @-expanded: Error writing extended attribute block %b (%m).
+msgid "Error writing @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:876
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+msgid "@a @b %b has h_@bs > 1. "
+msgstr ""
+
+#: e2fsck/problem.c:881
+#. @-expanded: error allocating extended attribute region allocation structure.
+msgid "@A @a region allocation structure. "
+msgstr ""
+
+#: e2fsck/problem.c:886
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr ""
+
+#: e2fsck/problem.c:891
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+msgid "@a @b %b is corrupt (@n name). "
+msgstr ""
+
+#: e2fsck/problem.c:896
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+msgid "@a @b %b is corrupt (@n value). "
+msgstr ""
+
+#: e2fsck/problem.c:902
+#, no-c-format
+#. @-expanded: inode %i is too big.
+msgid "@i %i is too big. "
+msgstr ""
+
+#: e2fsck/problem.c:906
+#. @-expanded: %B (%b) causes directory to be too big.
+msgid "%B (%b) causes @d to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:911
+msgid "%B (%b) causes file to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:916
+msgid "%B (%b) causes symlink to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:922
+#, no-c-format
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+
+#: e2fsck/problem.c:928
+#, no-c-format
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr ""
+
+#: e2fsck/problem.c:934
+#, no-c-format
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+msgid "@h %i has an @n root node.\n"
+msgstr ""
+
+#: e2fsck/problem.c:939
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:945
+#, no-c-format
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+
+#: e2fsck/problem.c:950
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr ""
+
+#: e2fsck/problem.c:956
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+
+#: e2fsck/problem.c:963
+#, no-c-format
+#. @-expanded: Resize inode (re)creation failed: %m.
+msgid "Resize @i (re)creation failed: %m."
+msgstr ""
+
+#: e2fsck/problem.c:968
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr ""
+
+#: e2fsck/problem.c:973
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr ""
+
+#: e2fsck/problem.c:978
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr ""
+
+#: e2fsck/problem.c:983
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr ""
+
+#: e2fsck/problem.c:988
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr ""
+
+#: e2fsck/problem.c:993
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr ""
+
+#: e2fsck/problem.c:998
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1004
+#, no-c-format
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1009
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1015
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1020
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1026
+#, no-c-format
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1032
+#, no-c-format
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+
+#: e2fsck/problem.c:1038
+#, no-c-format
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:1044
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr ""
+
+#: e2fsck/problem.c:1049
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1053
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1059
+#, no-c-format
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1064
+#. @-expanded: quota inode is not a regular file.
+msgid "@q @i is not a regular file. "
+msgstr ""
+
+#: e2fsck/problem.c:1069
+#. @-expanded: quota inode is not in use, but contains data.
+msgid "@q @i is not in use, but contains data. "
+msgstr ""
+
+#: e2fsck/problem.c:1074
+#. @-expanded: quota inode is visible to the user.
+msgid "@q @i is visible to the user. "
+msgstr ""
+
+#: e2fsck/problem.c:1079
+#. @-expanded: The bad block inode looks invalid.
+msgid "The bad @b @i looks @n. "
+msgstr ""
+
+#: e2fsck/problem.c:1084
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1090
+#, no-c-format
+#. @-expanded: inode %i seems to contain garbage.
+msgid "@i %i seems to contain garbage. "
+msgstr ""
+
+#: e2fsck/problem.c:1096
+#, no-c-format
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+
+#: e2fsck/problem.c:1102
+#, no-c-format
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr ""
+
+#: e2fsck/problem.c:1110
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1119
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#: e2fsck/problem.c:1124
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#: e2fsck/problem.c:1130
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1136
+#, no-c-format
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+
+#: e2fsck/problem.c:1142
+#, no-c-format
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1150
+#, no-c-format
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1155
+#. @-expanded: directory inode %i block %b should be at block %c.
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr ""
+
+#: e2fsck/problem.c:1161
+#, no-c-format
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr ""
+
+#: e2fsck/problem.c:1166
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1172
+#, no-c-format
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr ""
+
+#: e2fsck/problem.c:1179
+#, no-c-format
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:1186
+#, no-c-format
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1192
+#, no-c-format
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1198
+#, no-c-format
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1204
+#, no-c-format
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1209
+#. @-expanded: Bad block list says the bad block list inode is bad.
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:1214
+#. @-expanded: error allocating extent region allocation structure.
+msgid "@A @x region allocation structure. "
+msgstr ""
+
+#: e2fsck/problem.c:1219
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1224
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr ""
+
+#: e2fsck/problem.c:1229
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1235
+#, no-c-format
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#: e2fsck/problem.c:1241
+#, no-c-format
+#. @-expanded: inode %i has corrupt extent header.
+msgid "@i %i has corrupt @x header. "
+msgstr ""
+
+#: e2fsck/problem.c:1247
+#, no-c-format
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1252
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1258
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1263
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#: e2fsck/problem.c:1269
+#, no-c-format
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr ""
+
+#: e2fsck/problem.c:1274
+#, c-format
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr ""
+
+#: e2fsck/problem.c:1279
+#, c-format
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+
+#: e2fsck/problem.c:1284
+#, c-format
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1289
+#, c-format
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1294
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr ""
+
+#: e2fsck/problem.c:1299
+#, c-format
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+msgid "@h %i uses SipHash, but should not. "
+msgstr ""
+
+#: e2fsck/problem.c:1304
+#, c-format
+#. @-expanded: Orphan file inode %i is not regular file.
+msgid "Orphan file @i %i is not regular file. "
+msgstr ""
+
+#: e2fsck/problem.c:1309
+#, c-format
+#. @-expanded: Orphan file inode %i is not in use, but contains data.
+msgid "Orphan file @i %i is not in use, but contains data. "
+msgstr ""
+
+#: e2fsck/problem.c:1316
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:1323
+#, no-c-format
+#. @-expanded: multiply-claimed block(s) in inode %i:
+msgid "@m @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:1339
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1345
+#, no-c-format
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1351
+#, no-c-format
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1356 e2fsck/problem.c:1736
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1366
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:1372
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:1377
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#: e2fsck/problem.c:1383
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1388
+#. @-expanded: \t<filesystem metadata>\n
+msgid "\t<@f metadata>\n"
+msgstr ""
+
+#: e2fsck/problem.c:1393
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1398
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1412
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1418
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr ""
+
+#: e2fsck/problem.c:1424
+#, no-c-format
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1429
+#. @-expanded: Optimizing extent trees:
+msgid "Optimizing @x trees: "
+msgstr ""
+
+#: e2fsck/problem.c:1444
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1449
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#: e2fsck/problem.c:1454
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#: e2fsck/problem.c:1461
+#. @-expanded: Pass 2: Checking directory structure\n
+msgid "Pass 2: Checking @d structure\n"
+msgstr ""
+
+#: e2fsck/problem.c:1467
+#, no-c-format
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1472
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+msgid "@E has @n @i #: %Di.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1477
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+
+#: e2fsck/problem.c:1482
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+msgid "@E @L to '.' "
+msgstr ""
+
+#: e2fsck/problem.c:1487
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1492
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+msgid "@E @L to @d %P (%Di).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1497
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+msgid "@E @L to the @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1502
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1508
+#, no-c-format
+#. @-expanded: Missing '.' in directory inode %i.\n
+msgid "Missing '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1514
+#, no-c-format
+#. @-expanded: Missing '..' in directory inode %i.\n
+msgid "Missing '..' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1519
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+
+#: e2fsck/problem.c:1524
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+
+#: e2fsck/problem.c:1529
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1534
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1539
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1544
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+msgid "i_frag @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1549
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1554
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1559
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr ""
+
+#: e2fsck/problem.c:1564
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr ""
+
+#: e2fsck/problem.c:1569
+#. @-expanded: directory inode %i has an unallocated %B.
+msgid "@d @i %i has an unallocated %B. "
+msgstr ""
+
+#: e2fsck/problem.c:1575
+#, no-c-format
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:1581
+#, no-c-format
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:1586
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1591
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1596
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1601
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1607 e2fsck/problem.c:1992
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1612
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1618
+#, no-c-format
+#. @-expanded: error allocating icount structure: %m\n
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1624
+#, no-c-format
+#. @-expanded: Error iterating over directory blocks: %m\n
+msgid "Error iterating over @d @bs: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1629
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1634
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1640
+#, no-c-format
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1646
+#, no-c-format
+#. @-expanded: Error deallocating inode %i: %m\n
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1652
+#, no-c-format
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1657
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1662
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1667
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+msgid "Setting filetype for @E to %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1672
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1677
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1682
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+msgid "@E has a @z name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1687
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1692
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1697
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1702
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+msgid "@p @h %d: %B not referenced\n"
+msgstr ""
+
+#: e2fsck/problem.c:1707
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+msgid "@p @h %d: %B referenced twice\n"
+msgstr ""
+
+#: e2fsck/problem.c:1712
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr ""
+
+#: e2fsck/problem.c:1717
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+
+#: e2fsck/problem.c:1722
+#. @-expanded: invalid HTREE directory inode %d (%q).
+msgid "@n @h %d (%q). "
+msgstr ""
+
+#: e2fsck/problem.c:1726
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1731
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1742
+#, no-c-format
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+msgid "@p @h %d: root node is @n\n"
+msgstr ""
+
+#: e2fsck/problem.c:1747
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1752
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1757
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr ""
+
+#: e2fsck/problem.c:1762
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1767
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+msgid "Duplicate @E found. "
+msgstr ""
+
+#: e2fsck/problem.c:1772
+#, no-c-format
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+
+#: e2fsck/problem.c:1777
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1782
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1787
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1792
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1797
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1802
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1808
+#, no-c-format
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1814
+#, no-c-format
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1819
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1824
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1829
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1835
+#, no-c-format
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1840
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+msgid "Encrypted @E is too short.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1845
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1850
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+msgid ""
+"Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1855
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1860
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+msgid "Duplicate filename @E found. "
+msgstr ""
+
+#: e2fsck/problem.c:1868
+#. @-expanded: Pass 3: Checking directory connectivity\n
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr ""
+
+#: e2fsck/problem.c:1873
+#. @-expanded: root inode not allocated.
+msgid "@r not allocated. "
+msgstr ""
+
+#: e2fsck/problem.c:1878
+#. @-expanded: No room in lost+found directory.
+msgid "No room in @l @d. "
+msgstr ""
+
+#: e2fsck/problem.c:1884
+#, no-c-format
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1889
+#. @-expanded: /lost+found not found.
+msgid "/@l not found. "
+msgstr ""
+
+#: e2fsck/problem.c:1894
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1900
+#, no-c-format
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1906
+#, no-c-format
+#. @-expanded: Could not expand /lost+found: %m\n
+msgid "Could not expand /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1912
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1918
+#, no-c-format
+#. @-expanded: Error while trying to find /lost+found: %m\n
+msgid "Error while trying to find /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1924
+#, no-c-format
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1930
+#, no-c-format
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1936
+#, no-c-format
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr ""
+
+#: e2fsck/problem.c:1942
+#, no-c-format
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr ""
+
+#: e2fsck/problem.c:1948
+#, no-c-format
+#. @-expanded: Error while adjusting inode count on inode %i\n
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr ""
+
+#: e2fsck/problem.c:1954
+#, no-c-format
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1960
+#, no-c-format
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1971
+#, no-c-format
+#. @-expanded: Error creating root directory (%s): %m\n
+msgid "Error creating root @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1977
+#, no-c-format
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1982
+#. @-expanded: root inode is not a directory; aborting.\n
+msgid "@r is not a @d; aborting.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1987
+#. @-expanded: Cannot proceed without a root inode.\n
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1998
+#, no-c-format
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr ""
+
+#: e2fsck/problem.c:2003
+#. @-expanded: /lost+found has inline data\n
+msgid "/@l has inline data\n"
+msgstr ""
+
+#: e2fsck/problem.c:2008
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#: e2fsck/problem.c:2013
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:2018
+#. @-expanded: /lost+found is encrypted\n
+msgid "/@l is encrypted\n"
+msgstr ""
+
+#: e2fsck/problem.c:2024
+#, no-c-format
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr ""
+
+#: e2fsck/problem.c:2031
+msgid "Pass 3A: Optimizing directories\n"
+msgstr ""
+
+#: e2fsck/problem.c:2037
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2042
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2047
+msgid "Optimizing directories: "
+msgstr ""
+
+#: e2fsck/problem.c:2064
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#: e2fsck/problem.c:2070
+#, no-c-format
+#. @-expanded: unattached zero-length inode %i.
+msgid "@u @z @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:2076
+#, no-c-format
+#. @-expanded: unattached inode %i\n
+msgid "@u @i %i\n"
+msgstr ""
+
+#: e2fsck/problem.c:2081
+#. @-expanded: inode %i ref count is %Il, should be %N.
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:2085
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+
+#: e2fsck/problem.c:2092
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr ""
+
+#: e2fsck/problem.c:2097
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2102
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr ""
+
+#: e2fsck/problem.c:2109
+#. @-expanded: Pass 5: Checking group summary information\n
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#: e2fsck/problem.c:2114
+#. @-expanded: Padding at end of inode bitmap is not set.
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:2119
+#. @-expanded: Padding at end of block bitmap is not set.
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:2124
+#. @-expanded: block bitmap differences:
+msgid "@b @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:2146
+#. @-expanded: inode bitmap differences:
+msgid "@i @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:2168
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:2173
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:2178
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:2183
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:2188
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:2193
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:2199
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:2205
+#, no-c-format
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2211
+#, no-c-format
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2241
+#, no-c-format
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+
+#: e2fsck/problem.c:2247
+#, no-c-format
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#: e2fsck/problem.c:2253
+#, no-c-format
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2259
+#, no-c-format
+#. @-expanded: group %g block bitmap does not match checksum.\n
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2266
+#. @-expanded: Recreate journal
+msgid "Recreate @j"
+msgstr ""
+
+#: e2fsck/problem.c:2271
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:2277
+#, no-c-format
+#. @-expanded: Error setting block group checksum info: %m\n
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2283
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2289
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2294
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2299
+#. @-expanded: superblock has orphan file without journal.\n
+msgid "@S has orphan file without @j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2304
+msgid "Failed to truncate orphan file.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2309
+msgid "Failed to initialize orphan file.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2314
+msgid "Cannot fix corrupted orphan file with invalid bitmaps.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2319
+#, c-format
+#. @-expanded: Failed to truncate orphan file (inode %i).\n
+msgid "Failed to truncate orphan file (@i %i).\n"
+msgstr ""
+
+#: e2fsck/problem.c:2324
+#. @-expanded: Orphan file (inode %i) block %b is not clean.\n
+msgid "Orphan file (@i %i) @b %b is not clean.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2329
+msgid "Feature orphan_present is set but orphan file is clean.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2334
+msgid "Feature orphan_present is set but feature orphan_file is not.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2339
+#, c-format
+#. @-expanded: Orphan file (inode %i) size is not multiple of block size.\n
+msgid "Orphan file (@i %i) size is not multiple of block size.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2344
+#. @-expanded: Orphan file (inode %i) contains hole at block %b.\n
+msgid "Orphan file (@i %i) contains hole at @b %b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:2509
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr ""
+
+#: e2fsck/problem.c:2637 e2fsck/problem.c:2641
+msgid "IGNORED"
+msgstr ""
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr ""
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr ""
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr ""
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr ""
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr ""
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr ""
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr ""
+
+#: e2fsck/super.c:329
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:329
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/super.c:453
+#, c-format
+msgid "while reading inode %d"
+msgstr ""
+
+#: e2fsck/super.c:473 e2fsck/super.c:677
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:481 e2fsck/super.c:685
+#, c-format
+msgid "while reading blocks of inode %d"
+msgstr ""
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3324 misc/util.c:135
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr ""
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr ""
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr ""
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr ""
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr ""
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr ""
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr ""
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ""
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr ""
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr ""
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr ""
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr ""
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr ""
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr ""
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr ""
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1914 misc/tune2fs.c:2214 misc/tune2fs.c:2232
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr ""
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr ""
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr ""
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr ""
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr ""
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2802 misc/mke2fs.c:2853 misc/tune2fs.c:2954
+#: misc/tune2fs.c:2999 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2842 misc/tune2fs.c:2988
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr ""
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2868 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr ""
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr ""
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr ""
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr ""
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr ""
+
+#: e2fsck/unix.c:1784
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr ""
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr ""
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr ""
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr ""
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr ""
+
+#: e2fsck/unix.c:1952 e2fsck/unix.c:2024
+msgid " Done.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr ""
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr ""
+
+#: e2fsck/unix.c:2012
+#, c-format
+msgid "Creating orphan file (%d blocks): "
+msgstr ""
+
+#: e2fsck/unix.c:2056
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr ""
+
+#: e2fsck/unix.c:2060
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:2120
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:2122
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr ""
+
+#: e2fsck/unix.c:2126 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:2131
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:2141 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:191 misc/util.c:99
+msgid "yY"
+msgstr ""
+
+#: e2fsck/util.c:192 misc/util.c:118
+msgid "nN"
+msgstr ""
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr ""
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr ""
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr ""
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr ""
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr ""
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr ""
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr ""
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr ""
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr ""
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr ""
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr ""
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr ""
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr ""
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:799
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr ""
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr ""
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr ""
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr ""
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:1006 misc/util.c:140
+#, c-format
+msgid "%s is mounted; "
+msgstr ""
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr ""
+
+#: misc/badblocks.c:1018 misc/util.c:151
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr ""
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr ""
+
+#: misc/badblocks.c:1040
+#, c-format
+msgid "invalid %s - %s"
+msgstr ""
+
+#: misc/badblocks.c:1044
+#, c-format
+msgid "%s too large - %lu"
+msgstr ""
+
+#: misc/badblocks.c:1140
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1167
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr ""
+
+#: misc/badblocks.c:1197
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1203
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1210
+#, c-format
+msgid "Invalid block size: %u\n"
+msgstr ""
+
+#: misc/badblocks.c:1215
+#, c-format
+msgid "Invalid number of blocks: %d\n"
+msgstr ""
+
+#: misc/badblocks.c:1220
+#, c-format
+msgid "For block size %d, number of blocks too large: %d\n"
+msgstr ""
+
+#: misc/badblocks.c:1234
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:1240
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:1245
+msgid "last block"
+msgstr ""
+
+#: misc/badblocks.c:1251
+msgid "first block"
+msgstr ""
+
+#: misc/badblocks.c:1254
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr ""
+
+#: misc/badblocks.c:1262
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr ""
+
+#: misc/badblocks.c:1318
+msgid "while creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:1327
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1335 misc/badblocks.c:1344
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1369
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr ""
+
+#: misc/chattr.c:89
+#, c-format
+msgid ""
+"Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr ""
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr ""
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr ""
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr ""
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr ""
+
+#: misc/create_inode.c:90 misc/create_inode.c:298 misc/create_inode.c:363
+#: misc/create_inode.c:401
+msgid "while expanding directory"
+msgstr ""
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:332
+#, c-format
+msgid "while writing inode %u"
+msgstr ""
+
+#: misc/create_inode.c:156 misc/create_inode.c:187
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:167
+#, c-format
+msgid "while opening inode %u"
+msgstr ""
+
+#: misc/create_inode.c:174
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr ""
+
+#: misc/create_inode.c:180 misc/create_inode.c:207 misc/create_inode.c:1064
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:363
+msgid "while allocating memory"
+msgstr ""
+
+#: misc/create_inode.c:200 misc/create_inode.c:216
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:225
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr ""
+
+#: misc/create_inode.c:235
+#, c-format
+msgid "while closing inode %u"
+msgstr ""
+
+#: misc/create_inode.c:285
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:304
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:370
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:388 misc/create_inode.c:652 misc/create_inode.c:984
+#, c-format
+msgid "while looking up \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:408
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:638
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr ""
+
+#: misc/create_inode.c:822
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:832
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:842
+#, c-format
+msgid "while lstat \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:892
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:904
+msgid "malloc failed"
+msgstr ""
+
+#: misc/create_inode.c:912
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:919
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:930
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr ""
+
+#: misc/create_inode.c:942
+#, c-format
+msgid "while writing file \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:955
+#, c-format
+msgid "while making dir \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:973
+msgid "while changing directory"
+msgstr ""
+
+#: misc/create_inode.c:979
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:992
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:999
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:1025
+msgid "while saving inode data"
+msgstr ""
+
+#: misc/create_inode.c:1075
+msgid "while copying xattrs on root directory"
+msgstr ""
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr ""
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr ""
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr ""
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr ""
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr ""
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ""
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr ""
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ""
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr ""
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr ""
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr ""
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:409
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr ""
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:252
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:813 misc/tune2fs.c:2254
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1939
+#, c-format
+msgid "\tUsing %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1643 misc/tune2fs.c:3249
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:108
+#, c-format
+msgid ""
+"Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-"
+"file\n"
+msgstr ""
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr ""
+
+#: misc/e2image.c:112
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599 misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr ""
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr ""
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr ""
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr ""
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr ""
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr ""
+
+#: misc/e2image.c:640
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr ""
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr ""
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr ""
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr ""
+
+#: misc/e2image.c:842
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr ""
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr ""
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr ""
+
+#: misc/e2image.c:1380 misc/e2image.c:1394
+#, c-format
+msgid "while iterating over inode %u"
+msgstr ""
+
+#: misc/e2image.c:1426
+msgid "Raw and qcow2 images cannot be installed"
+msgstr ""
+
+#: misc/e2image.c:1448
+msgid "error reading bitmaps"
+msgstr ""
+
+#: misc/e2image.c:1460
+msgid "while opening device file"
+msgstr ""
+
+#: misc/e2image.c:1471
+msgid "while restoring the image table"
+msgstr ""
+
+#: misc/e2image.c:1579
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1584
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1590
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1595
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1600
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1610
+msgid "checking if mounted"
+msgstr ""
+
+#: misc/e2image.c:1617
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+
+#: misc/e2image.c:1671
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1677
+msgid "Can not stat output\n"
+msgstr ""
+
+#: misc/e2image.c:1687
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr ""
+
+#: misc/e2image.c:1690
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr ""
+
+#: misc/e2image.c:1693
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr ""
+
+#: misc/e2image.c:1697
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: misc/e2image.c:1707
+msgid "The -c option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1712
+msgid "The -c option not supported when writing to stdout\n"
+msgstr ""
+
+#: misc/e2image.c:1719
+msgid "while allocating check_buf"
+msgstr ""
+
+#: misc/e2image.c:1725
+msgid "The -p option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1735
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr ""
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr ""
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr ""
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr ""
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr ""
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr ""
+
+#: misc/e2label.c:97 misc/tune2fs.c:3136 misc/tune2fs.c:3459
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr ""
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr ""
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr ""
+
+#: misc/e2label.c:117 misc/tune2fs.c:1906
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+
+#: misc/e2undo.c:124
+#, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr ""
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr ""
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr ""
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr ""
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr ""
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr ""
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr ""
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr ""
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr ""
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr ""
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr ""
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr ""
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr ""
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr ""
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr ""
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr ""
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr ""
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr ""
+
+#: misc/fsck.c:604
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:626
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:632
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:671
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr ""
+
+#: misc/fsck.c:731
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:752
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:771
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:894
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+
+#: misc/fsck.c:921
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:977
+msgid "Checking all file systems.\n"
+msgstr ""
+
+#: misc/fsck.c:1068
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr ""
+
+#: misc/fsck.c:1088
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+
+#: misc/fsck.c:1130
+#, c-format
+msgid "%s: too many devices\n"
+msgstr ""
+
+#: misc/fsck.c:1163 misc/fsck.c:1249
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3750
+msgid "Mounting read-only.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3774
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3788 misc/fuse2fs.c:3806
+#, c-format
+msgid "%s: %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3789 misc/fuse2fs.c:3808 misc/tune2fs.c:3350
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3799
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3815
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3823
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3838
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3842
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3847
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3851
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3855
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr ""
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr ""
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr ""
+
+#: misc/mke2fs.c:133
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "Running command: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:269
+#, c-format
+msgid "while trying to run '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:276
+msgid "while processing list of bad blocks from program"
+msgstr ""
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:305
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+
+#: misc/mke2fs.c:308
+msgid "Aborting....\n"
+msgstr ""
+
+#: misc/mke2fs.c:328
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:347 misc/mke2fs.c:3374
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:372
+msgid "while writing reserved inodes"
+msgstr ""
+
+#: misc/mke2fs.c:424
+msgid "Writing inode tables: "
+msgstr ""
+
+#: misc/mke2fs.c:446
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:461 misc/mke2fs.c:2914 misc/mke2fs.c:3334
+msgid "done \n"
+msgstr ""
+
+#: misc/mke2fs.c:476
+msgid "while creating root dir"
+msgstr ""
+
+#: misc/mke2fs.c:483
+msgid "while reading root inode"
+msgstr ""
+
+#: misc/mke2fs.c:495
+msgid "while setting root inode ownership"
+msgstr ""
+
+#: misc/mke2fs.c:513
+msgid "while creating /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:520
+msgid "while looking up /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:533
+msgid "while expanding /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:548
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:575
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr ""
+
+#: misc/mke2fs.c:585
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:603
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:619
+msgid "while splitting the journal size"
+msgstr ""
+
+#: misc/mke2fs.c:626
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:634
+msgid "Zeroing journal device: "
+msgstr ""
+
+#: misc/mke2fs.c:646
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:664
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr ""
+
+#: misc/mke2fs.c:686
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr ""
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "OS type: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "First data block=%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr ""
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block groups\n"
+msgstr ""
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u block group\n"
+msgstr ""
+
+#: misc/mke2fs.c:724
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:729
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:738
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:739
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:835
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+
+#: misc/mke2fs.c:841
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:854
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr ""
+
+#: misc/mke2fs.c:868
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:880
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:894 misc/tune2fs.c:2282
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:911
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:948
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:971
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:978
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1002
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1033 misc/mke2fs.c:1042
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr ""
+
+#: misc/mke2fs.c:1087
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr ""
+
+#: misc/mke2fs.c:1109 misc/tune2fs.c:2417
+#, c-format
+msgid "Invalid size of orphan file %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1120
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\tassume_storage_prezeroed=<0 to disable, 1 to enable>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1148
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1159 misc/tune2fs.c:2433
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1165 misc/tune2fs.c:2442
+#, c-format
+msgid ""
+"error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr ""
+
+#: misc/mke2fs.c:1216
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1229 misc/tune2fs.c:1176
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1241 misc/tune2fs.c:455
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1377
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1381
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1385
+msgid "Aborting...\n"
+msgstr ""
+
+#: misc/mke2fs.c:1426
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1616
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1656
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1689
+#, c-format
+msgid "invalid block size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1693
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1709
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1722
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1736 misc/tune2fs.c:2008
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1748
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:1753
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:1761
+msgid "Illegal number for flex_bg size"
+msgstr ""
+
+#: misc/mke2fs.c:1767
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1772
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr ""
+
+#: misc/mke2fs.c:1782
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1792
+#, c-format
+msgid "invalid inode size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1807
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1818
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:1827
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1836
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1851
+#, c-format
+msgid "bad num inodes - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1864
+msgid "while allocating fs_feature string"
+msgstr ""
+
+#: misc/mke2fs.c:1881
+#, c-format
+msgid "bad revision level - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1886
+#, c-format
+msgid "while trying to create revision %d"
+msgstr ""
+
+#: misc/mke2fs.c:1900
+msgid "The -t option may only be used once"
+msgstr ""
+
+#: misc/mke2fs.c:1908
+msgid "The -T option may only be used once"
+msgstr ""
+
+#: misc/mke2fs.c:1964 misc/mke2fs.c:3457
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1970
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1976
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1987
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:2007
+msgid "filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2022 lib/support/plausible.c:187
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2034 lib/support/plausible.c:195
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:2039 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:2045
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:2052
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2069
+msgid "Filesystem larger than apparent device size."
+msgstr ""
+
+#: misc/mke2fs.c:2092
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:2158
+msgid "The HURD does not support the filetype feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2163
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2168
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2173
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2183
+msgid "while trying to determine hardware sector size"
+msgstr ""
+
+#: misc/mke2fs.c:2189
+msgid "while trying to determine physical sector size"
+msgstr ""
+
+#: misc/mke2fs.c:2221
+msgid "while setting blocksize; too small for device\n"
+msgstr ""
+
+#: misc/mke2fs.c:2226
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:2250
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2264
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2286
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:2293
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2301
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2311
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2324
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr ""
+
+#: misc/mke2fs.c:2341
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2361
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2367
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2401
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2407
+#, c-format
+msgid ""
+"%s is capable of DAX but current block size %u is different from system page "
+"size %u so filesystem will not support DAX.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2431
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2435
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:2443
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2489
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2500
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2525
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2540
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2562
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2569
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2578
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+
+#: misc/mke2fs.c:2590
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2599
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:2621
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2633
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2648
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2663
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr ""
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2682
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2696
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+
+#: misc/mke2fs.c:2893
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2909
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2968
+msgid "while initializing quota context"
+msgstr ""
+
+#: misc/mke2fs.c:2975
+msgid "while writing quota inodes"
+msgstr ""
+
+#: misc/mke2fs.c:3000
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr ""
+
+#: misc/mke2fs.c:3079
+msgid "in malloc for android_sparse_params"
+msgstr ""
+
+#: misc/mke2fs.c:3093
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:3109
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3116
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3124
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3145
+msgid ""
+"Assuming the storage device is prezeroed - skipping inode table and journal "
+"wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3160
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3259
+#, c-format
+msgid "unknown os - %s"
+msgstr ""
+
+#: misc/mke2fs.c:3322
+msgid "Allocating group tables: "
+msgstr ""
+
+#: misc/mke2fs.c:3330
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:3345
+msgid "while unmarking bad blocks"
+msgstr ""
+
+#: misc/mke2fs.c:3356
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+
+#: misc/mke2fs.c:3365
+msgid "while calculating overhead"
+msgstr ""
+
+#: misc/mke2fs.c:3384
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3425
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:3438
+msgid "while reserving blocks for online resize"
+msgstr ""
+
+#: misc/mke2fs.c:3450 misc/tune2fs.c:1704
+msgid "journal"
+msgstr ""
+
+#: misc/mke2fs.c:3462
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:3469
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:3474 misc/mke2fs.c:3507 misc/mke2fs.c:3566
+#: misc/mk_hugefiles.c:486 misc/tune2fs.c:1733 misc/tune2fs.c:1755
+msgid "done\n"
+msgstr ""
+
+#: misc/mke2fs.c:3481
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:3494
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:3503
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:3515 misc/tune2fs.c:1291
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3520
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3535
+msgid "cannot set orphan_file feature without a journal."
+msgstr ""
+
+#: misc/mke2fs.c:3546 misc/tune2fs.c:3516
+msgid "while creating orphan file"
+msgstr ""
+
+#: misc/mke2fs.c:3557
+msgid "Copying files into the device: "
+msgstr ""
+
+#: misc/mke2fs.c:3563
+msgid "while populating file system"
+msgstr ""
+
+#: misc/mke2fs.c:3570
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:3577 misc/tune2fs.c:3764
+msgid "while writing out and closing file system"
+msgstr ""
+
+#: misc/mke2fs.c:3580
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:223
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr ""
+
+#: misc/mk_hugefiles.c:400
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:468
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:469
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr ""
+
+#: misc/mk_hugefiles.c:471
+#, c-format
+msgid "with %llu blocks each"
+msgstr ""
+
+#: misc/mk_hugefiles.c:481
+#, c-format
+msgid "while creating huge file %lu"
+msgstr ""
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr ""
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:148
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:150
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:152
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:165
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:259
+msgid "Journal superblock not found!\n"
+msgstr ""
+
+#: misc/tune2fs.c:317
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:323 misc/tune2fs.c:3045
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:332 misc/tune2fs.c:3054
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+
+#: misc/tune2fs.c:339 misc/tune2fs.c:3061
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:363
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:372
+msgid "Journal removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:416
+msgid "while reading bitmaps"
+msgstr ""
+
+#: misc/tune2fs.c:424
+msgid "while clearing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:437
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:473 misc/tune2fs.c:498 misc/tune2fs.c:511
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:526
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:529
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:533
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:535
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:537
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1143
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1179
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1185
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1194
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1202
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1221
+msgid ""
+"The orphan_file feature may only be cleared when the filesystem is "
+"unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1226
+msgid ""
+"The orphan_present feature is set. Please run e2fsck before clearing "
+"orphan_file feature.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1235 misc/tune2fs.c:3509
+msgid "while loading bitmaps"
+msgstr ""
+
+#: misc/tune2fs.c:1241
+msgid ""
+"\n"
+"\twhile trying to delete orphan file\n"
+msgstr ""
+
+#: misc/tune2fs.c:1254
+msgid "orphan_file feature can be set only for filesystems with journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1270
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1283
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1301
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1310
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1318
+msgid "Error while reading bitmaps\n"
+msgstr ""
+
+#: misc/tune2fs.c:1327
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1332
+msgid "while reading MMP block."
+msgstr ""
+
+#: misc/tune2fs.c:1365
+msgid ""
+"Disabling directory index on filesystem with checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1369
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1382
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1393
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1404
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1407
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1413
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1420
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1446
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1449
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1490
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1505
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1524
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1534
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1564
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1585
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1602 misc/tune2fs.c:2380
+msgid ""
+"The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1613
+msgid ""
+"The casefold feature may only be disabled when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1618
+msgid ""
+"The casefold feature can't be cleared when there are inodes with +F flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1630
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1648
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1654
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1697
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1717
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1721
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr ""
+
+#: misc/tune2fs.c:1729
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:1735
+msgid "Creating journal inode: "
+msgstr ""
+
+#: misc/tune2fs.c:1749
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+
+#: misc/tune2fs.c:1791
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1804
+msgid "while initializing quota context in support library"
+msgstr ""
+
+#: misc/tune2fs.c:1820
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr ""
+
+#: misc/tune2fs.c:1830
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr ""
+
+#: misc/tune2fs.c:1848
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr ""
+
+#: misc/tune2fs.c:1891
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1949
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr ""
+
+#: misc/tune2fs.c:1981 misc/tune2fs.c:1992
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2035
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2068
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2097
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2112
+msgid "-o may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:2121
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2167
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2184
+#, c-format
+msgid "bad inode size - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2191
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:2291
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2296
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/tune2fs.c:2305
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2323
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2338
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2353
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2359
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2386
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr ""
+
+#: misc/tune2fs.c:2392
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2398
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2437
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2447
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+
+#: misc/tune2fs.c:2863
+msgid "Failed to read inode bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2868
+msgid "Failed to read block bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2885 resize/resize2fs.c:1368
+msgid "blocks to be moved"
+msgstr ""
+
+#: misc/tune2fs.c:2888
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2894
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:2899
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr ""
+
+#: misc/tune2fs.c:2931
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:3100
+msgid "while checking mount status"
+msgstr ""
+
+#: misc/tune2fs.c:3108
+#, c-format
+msgid "Unknown mount point for %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:3114
+msgid "while opening mount point"
+msgstr ""
+
+#: misc/tune2fs.c:3124
+msgid "while trying to get fs label"
+msgstr ""
+
+#: misc/tune2fs.c:3146
+msgid "while trying to set fs label"
+msgstr ""
+
+#: misc/tune2fs.c:3236
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:3243
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:3255
+msgid "Cannot modify a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3268
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3275
+msgid "Shrinking inode size is not supported\n"
+msgstr ""
+
+#: misc/tune2fs.c:3280
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:3286
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3336
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3345
+#, c-format
+msgid "Recovering journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3369
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3375
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3380
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3385
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3390
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr ""
+
+#: misc/tune2fs.c:3397
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:3404
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:3411
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr ""
+
+#: misc/tune2fs.c:3418
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3423
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3426
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3436
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:3441
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3449
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:3455
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3487
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3524
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3543
+msgid ""
+"Cannot change the UUID of this filesystem because it has the stable_inodes "
+"feature flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3553
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3570
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3573
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3623
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/tune2fs.c:3657
+msgid "Need to update journal superblock.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3677
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3684
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3702
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3706
+msgid "Failed to change inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:3726
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3731
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3738
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+
+#: misc/util.c:107
+msgid "<proceeding>\n"
+msgstr ""
+
+#: misc/util.c:111
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr ""
+
+#: misc/util.c:115
+msgid "Proceed anyway? (y,N) "
+msgstr ""
+
+#: misc/util.c:142
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:147
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:154
+msgid "mke2fs forced anyway.\n"
+msgstr ""
+
+#: misc/util.c:170
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:195
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+
+#: misc/util.c:230
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:273
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+
+#: misc/util.c:290
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:298
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+
+#: misc/util.c:311
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr ""
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr ""
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr ""
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr ""
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr ""
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr ""
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr ""
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr ""
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr ""
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr ""
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr ""
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr ""
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr ""
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr ""
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr ""
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:609
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+
+#: resize/main.c:621
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr ""
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr ""
+
+#: resize/main.c:649
+#, c-format
+msgid ""
+"Cannot shrink this filesystem because it has the stable_inodes feature "
+"flag.\n"
+msgstr ""
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr ""
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr ""
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr ""
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr ""
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr ""
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr ""
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr ""
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr ""
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr ""
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr ""
+
+#: resize/online.c:289
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr ""
+
+#: resize/resize2fs.c:1126
+msgid "reserved blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1373
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1477 resize/resize2fs.c:2521
+msgid "new meta blocks"
+msgstr ""
+
+#: resize/resize2fs.c:2745
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2750
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2823
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.47.0"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr ""
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr ""
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr ""
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr ""
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr ""
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#: lib/support/plausible.c:114
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr ""
+
+#: lib/support/plausible.c:117
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr ""
+
+#: lib/support/plausible.c:120
+#, c-format
+msgid "\tcreated on %s"
+msgstr ""
+
+#: lib/support/plausible.c:123
+#, c-format
+msgid "\tlast modified on %s"
+msgstr ""
+
+#: lib/support/plausible.c:157
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:198
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:201
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: lib/support/plausible.c:223
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr ""
+
+#: lib/support/plausible.c:245
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr ""
+
+#: lib/support/plausible.c:248
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr ""
+
+#: lib/support/plausible.c:272
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr ""
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644
index 0000000..fedb6a0
--- /dev/null
+++ b/po/en@boldquot.header
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644
index 0000000..a9647fc
--- /dev/null
+++ b/po/en@quot.header
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/eo.gmo b/po/eo.gmo
new file mode 100644
index 0000000..fce4bcd
--- /dev/null
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
new file mode 100644
index 0000000..08fbf62
--- /dev/null
+++ b/po/eo.po
@@ -0,0 +1,8254 @@
+# Esperanto translations for e2fsprogs.
+# Copyright (C) 2014 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+#
+# Prave, "paÅo" ne estas traduko de "pass",
+# sed Äi tre klaras kaj bone esprimas la faradon.
+#
+# Benno Schulenberg <benno@vertaalt.nl>, 2012, 2013, 2014.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs-1.42.12-pre2\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2014-08-31 18:44+0200\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
+"Language: eo\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Lokalize 1.0\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Malbona bloko %u estas ekster gamo; Äi ignoriÄas.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "dum sankontrolo de malbonbloka i-nodo"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "dum legado de malbonbloka i-nodo"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "dum provo de malfermi %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "dum provo de malfermi dukton al '%s'"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "dum legado de listo de malbonaj blokoj el dosiero"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "dum Äisdatigo de malbonbloka i-nodo"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Averto: nevalida bloko %u troviÄis malbonbloka i-nodo. ViÅiÄis.\n"
+
+#: e2fsck/dirinfo.c:331
+#, fuzzy
+msgid "while freeing dir_info tdb file"
+msgstr "dum legado de radika i-nodo"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Eraro dum legado de bloko %lu (%s) dum %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Eraro dum legado de bloko %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignori eraron"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Devigi reskribon"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Eraro dum skribado de bloko %lu (%s) dum %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Eraro dum skribado de bloko %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "vakaj ujaj blokoj"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "vaka uja mapo"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Vaka uja bloko %u (#%d) en i-nodo %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "Uzmaniero de %s: %s DOSIERNOMO BLOKNOMBRO BLOKGRANDO\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Nevalida nombro de blokoj!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Mankas sufiĉa memoro por asigni bufron (grando=%d)\n"
+
+#: e2fsck/extents.c:42
+#, fuzzy
+msgid "extent rebuild inode map"
+msgstr "mapo de normaldosieraj i-nodoj"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Uzmaniero: %s DISKO\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr ""
+"La 'ioctl(BLKFLSBUF)' ne subtenatas! Ne eblas peli bufrajn enhavojn.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Uzmaniero: %s [-F] [-I BUFROBLOKNOMBRO] APARATO\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "dum malfermo de %s por elbufrigo"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "dum provo de elbufrigi %s"
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr "dum provo de malfermi '%s'"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr "dum malfermo de i-noda skano"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr "dum preno de sekva i-nodo"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "SkaniÄis %u i-nodoj.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "dum legado de kaÅprotokola ĉefbloko\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: ne troviÄis valida kaÅprotokola ĉefbloko\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: kaÅprotokolo tro mallongas\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: restaÅ­riÄas kaÅprotokolo...\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: ne restaÅ­riÄos kaÅprotokolo en nurlega stato\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "dum provo de remalfermi %s"
+
+# ****************************************************************
+# *** La sekvaj mallongigoj preskaÅ­ ĉiuj uziÄas en la traduko. ***
+# ****************************************************************
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aetendita atributo"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aeraro dum asigno"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bbloko"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmapo"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "c<senuza>"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckonfliktas kun alia dosiersistema bloko"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "ddosierujo"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dforigita"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eero"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "Eero '%Dn' en %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fdosiersistemo"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fpor @i %i (%Q) estas"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrupo"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "h'HTREE'-a uja @i"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "ii-nodo"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Inevalida"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jkaÅprotokolo"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lestas ligo"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mpluroble posedata"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nmalvalida"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oorfa"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblemo en"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qkvoto"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rradika @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sdevus esti"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Sĉefbloko"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "unekonektita"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vaparato"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xamplekso"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "znullonga"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<La NULL-a i-nodo>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<La malbonbloka i-nodo>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<La uzantkvota i-nodo>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<La grupkvota i-nodo>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<La startiga i-nodo>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<La malforiguja i-nodo>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<La gruppriaĵa i-nodo>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<La kaÅprotokola i-nodo>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Rezervita i-nodo 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Rezervita i-nodo 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "normala dosiero"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "dosierujo"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "signo-aparato"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "blokaparato"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "nomita dukto"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "simbola ligo"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "konektilo"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "nekonata dosiertipo kun moduso 0%o"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "nerekta bloko"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "duoble nerekta bloko"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "trioble nerekta bloko"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "traduka bloko"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "bloko #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr ""
+
+#: e2fsck/message.c:485
+#, fuzzy
+msgid "group"
+msgstr "ggrupo"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+#, fuzzy
+msgid "unknown quota type"
+msgstr "nekonata mastrumsistemo: %s"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mapo de pluroble posedataj i-nodoj"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr ""
+
+# FIXME -- is a debug message?
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr ""
+
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr ""
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr ""
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr "legante dosierujan blokon"
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr "mapo de uzataj i-nodoj"
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr "mapo de dosierujaj i-nodoj"
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr "mapo de normaldosieraj i-nodoj"
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr "mapo de uzataj blokoj"
+
+#: e2fsck/pass1.c:1262
+#, fuzzy
+msgid "metadata block map"
+msgstr "mapo de blokoj kun etenditaj atributoj"
+
+#: e2fsck/pass1.c:1324
+msgid "opening inode scan"
+msgstr "malfermante i-nodan skanon"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr "prenante sekvan i-nodon el skano"
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "PaÅo 1"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "legante nerektajn blokojn de i-nodo %u"
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr "mapo de malbonaj i-nodoj"
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr "i-nodo en mapo de difektaj blokoj"
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr "mapo de 'imagic'-i-nodoj"
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr "mapo de pluroble posedataj i-nodoj"
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr "mapo de blokoj kun etenditaj atributoj"
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr "bloka bitmapo"
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr "i-noda bitmapo"
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr "i-noda tabelo"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "PaÅo 2"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "Ne eblas daÅ­rigi."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "bitmapo de traktitaj i-nodoj"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Pinta memoruzo"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "PaÅo 3"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "bitmapo por i-noda buklorekono"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "PaÅo 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "PaÅo 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(neniu invito)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Ĉu ripari"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Ĉu viÅi"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Ĉu alilokigi"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Ĉu asigni"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Ĉu etendigi"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Ĉu konektigi al /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Ĉu krei"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Ĉu savi"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Ĉu trunki"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Ĉu viÅi i-nodon"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Ĉu ĉesi"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Ĉu fendi"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Ĉu daŭrigi"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Ĉu kloni pluroble posedatajn blokojn"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Ĉu forigi dosieron"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Ĉu malebligi mesaÄojn"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Ĉu malligi"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Ĉu viÅi 'HTree'-an indekson"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Ĉu reestigi"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(NENIU)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "RIPARITA"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "VIÅœITA"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "ALILOKIGITA"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ASIGNITA"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ETENDIGITA"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "REKONEKTITA"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "KREITA"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "SAVITA"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "TRUNKITA"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "I-NODO VIÅœITA"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "ĈESIGITA"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "FENDITA"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "DAŬRIGITA"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "PLUROBLE POSEDATAJ BLOKOJ KLONIÄœIS"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "DOSIERO FORIGIÄœIS"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "MALEBLIGITAJ"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "MALLIGITA"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "'HTREE'-A INDEKSO VIÅœITA"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "ESTOS REESTIGATA"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "bloka @B por @g %g ne estas en @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "i-noda @B por @g %g ne estas en @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"i-noda tabelo por @g %g ne estas en @g. (@b %b)\n"
+"AVERTO: SEVERA PERDO DE DATUMOJN EBLAS.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"La dosiersistema grando estas %b blokoj (laŭ la ĉefbloko);\n"
+"la fizika aparata grando estas %c blokoj.\n"
+"Aŭ la ĉefbloko aŭ la subdiskiga tabelo estas difekta!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"En @S: block_size = %b, fragsize = %c.\n"
+"Ĉi tiu versio de 'e2fsck' ne subtenas fragmentgrandojn kiuj\n"
+"malsamas al blokgrando.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "En @S: blocks_per_group = %b, devus esti %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "En @S: first_data_block = %b, devus esti %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"Dosiersistemo ne havas UUID-on; unu generiÄas.\n"
+"\n"
+
+#: e2fsck/problem.c:167
+#, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "TroviÄis difekto en @S; (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Eraro dum eltrovo de grando de fizika aparato: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "I-noda nombro en ĉefbloko estas %i, @s %j.\n"
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Ĉefbloko havas malvalidan kaÅprotokolon (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+"Ekstera kaÅprotokolo havas plurajn dosiersistemajn uzantojn (ne "
+"subtenatas).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr "Ne eblas trovi eksteran kaÅprotokolon.\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr "Ekstera kaÅprotokolo havas malbonan ĉefblokon.\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr "Ekstera kaÅprotokolo ne subtenas ĉi tiun dosiersistemon.\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+msgid "@j @S is corrupt.\n"
+msgstr "KaÅprotokola ĉefbloko estas difekta.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "Maljesas ĉefbloka flago 'has_journal', sed ekzistas kaÅprotokolo.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Jesas ĉefbloka flago 'needs_recovery', sed ne ekzistas @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "Maljesas ĉefbloka flago 'needs_recovery', sed @j enhavas datumojn.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr "Ĉu viÅi kaÅprotokolon"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "Dosiersistemo havas jesajn funkciajn flagojn, sed estas revizio 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s orfan i-nodon %i (uid=%Iu, gid=%Ig, moduso=%Im, grando=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@I %B (%b) troviÄis en @o @i %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "JamviÅita %B (%b) troviÄis en @o @i %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@I @o @i %i en @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@I @i %i en listo de orfaj i-nodoj.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "KaÅprotokola @S havas nekonatan jesan nurlegan funkcian flagon.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "KaÅprotokola @S havas nekonatan jesan nekongruan funkcian flagon.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "La kaÅprotokola versio ne subtenatas por ĉi tiu 'e2fsck'.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"KaÅprotokolo moviÄas de /%s al kaÅita i-nodo.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Eraro dum movo de kaÅprotokolo: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr "Ĉu tamen ruli kaÅprotokolon"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "RestaÅ­ra flago maljesas en savkopia @S, tamen ruliÄas @j.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"FariÄas savkopio de la informoj en kaÅprotokola @i.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Dosiersistemo havas maljesan 'resize_inode', sed 's_reserved_gdt_blocks'\n"
+"estas %N; @s nulo. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Maljesas 'resize_inode', sed la regrandiga @i estas nenula. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+msgid "Resize @i not valid. "
+msgstr "La regrandiga @i malvalidas. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"En @S: tempo de lasta surmeto (%t,\n"
+" nun = %T) estas en la estonteco.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"En @S: tempo de lasta skribo (%t,\n"
+" nun = %T) estas en la estonteco.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Ĉefbloka indiko por ekstera @S @s %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"AldoniÄas 'dirhash'-a indiko al @f.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "kontrolsumo de gruppriaĵo %g estas %04x, @s %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr "Lasta grupa bloka bitmapo estas sen pravalorizo. "
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "KaÅprotokola transakcio %i estis difekta; refarado abortiÄis.\n"
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr ""
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+#, fuzzy
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"En @S la tempo de lasta surmeto estas en la estonteco.\n"
+" (je malpli ol unu tago, probable kaÅ­ze de malbona alÄustigo de fizika "
+"horloÄo) "
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+#, fuzzy
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"En @S la tempo de lasta skribo estas en la estonteco.\n"
+" (je malpli ol unu tago, probable kaÅ­ze de malbona alÄustigo de fizika "
+"horloÄo) "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Unu aŭ pluraj blokgrupaj priaĵoj havas nevalidan kontrolsumon. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Nombro de liberaj i-nodoj agordiÄas al %j (estis %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Nombro de liberaj blokoj agordiÄas al %c (estis %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+#, fuzzy
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "La kvota @i %i (%Q) fariÄas kaÅita.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+msgid "@S has invalid MMP block. "
+msgstr "Ĉefbloko havas nevalidan MMP-blokon. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr "Ĉefbloko havas nevalidan maginumeron por MMP. "
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2(): %m\n"
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc(): %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+#, fuzzy
+msgid "@S MMP @b checksum does not match. "
+msgstr "Kontrolsumo de MMP-bloko ne konkordas kun MMP-bloko"
+
+# FIXME -- missing "of"?
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+#, fuzzy
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+"@S de 64-bitaj dosiersistemoj bezonas ampleksojn por atingi la tutan "
+"diskon. "
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr ""
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+#, fuzzy
+msgid "External @j @S checksum does not match @S. "
+msgstr "Kontrolsumo de 'extent'-bloko ne konkordas kun bloko"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+#, fuzzy
+msgid "Invalid %U @q @i %i. "
+msgstr "@u @i %i kun nula longo. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "PaÅo 1: Kontrolo de i-nodoj, blokoj kaj grandoj...\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr "@r ne estas @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "@r havas 'dtime'-an valoron (probable kaÅ­ze de olda 'mke2fs'). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Rezervita i-nodo %i (%Q) havas nevalidan moduson. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "@D @i %i havas nulan 'dtime'. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "@i %i uziÄas, sed havas 'dtime'-an valoron. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "@i %i estas @d kun nula longo. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "bloka @B (%b) de @g %g @C.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "i-noda @B (%b) de @g %g @C.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "i-noda tabelo (%b) de @g %g @C.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "bloka @B (%b) de @g %g malbonas. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "i-noda @B (%b) de @g %g malbonas. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, 'i_size' estas %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, 'i_blocks' estas %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+msgid "@I %B (%b) in @i %i. "
+msgstr "@I %B (%b) en @i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) parte kovras dosiersistemajn metadatumojn en @i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "I-nodo %i havas nevalida(j)n bloko(j)n. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Tro multaj nevalidaj blokoj en i-nodo %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "@I %B (%b) en malbonbloka @i. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Malbonbloka i-nodo havas nevalida(j)n bloko(j)n. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Duobla aÅ­ malbona bloko uziÄas!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Malbona bloko %b uziÄas kiel nerekta bloko de malbonbloka i-nodo. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"La malbonbloka i-nodo verÅajne difektiÄis. Probable vi\n"
+"devus nun halti ĉian faradon kaj ruli 'e2fsck -c' por\n"
+"trovi eblajn malbonajn blokojn en la dosiersistemo.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Se la bloko vere malbonas, ne eblas ripari la dosiersistemon.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Vi povas forigi ĉi tiun blokon de la malbonbloka listo\n"
+"kaj esperi ke la bloko fakte bonas. Sed tio ne garantias.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "La unua ĉefbloko (%b) estas en la malbonbloka listo.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Bloko %b en la unuaj gruppriaĵoj estas en la malbonbloka listo.\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Averto: ĉefbloko %b de grupo %g malbonas.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+"Averto: en grupo %g la kopio de la gruppriaĵoj havas malbonan blokon (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+"**Programmiso?** Bloko %b senrezone pretendiÄis en process_bad_block().\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A de %N koneksaj blokoj en @b @g %g por %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A de blokbufro por transloki %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "De @g %g translokiÄas %s de %b al %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "De @g %g translokiÄas %s al %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Averto: malsukcesis legi blokon %b de %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Averto: malsukcesis skribi blokon %b por %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A de i-noda @B (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A de bloka @B (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A de 'icount'-a liginformo: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A de uja blokaro: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Eraro dum skanado de i-nodoj (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Eraro dum iteracio je blokoj en @i %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+"Eraro dum skribado de informo pri i-noda nombro (@i=%i, nombro=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+"Eraro dum skribado de informo pri uja bloko (@i=%i, @b=%b, numero=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Eraro dum legado de @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "@i %i havas jesan flagon 'imagic'. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Speciala @i %i (aparato/konektilo/vicmemoro) havas jesan flagon\n"
+"'immutable' aÅ­ 'append-only'. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Speciala @i %i (aparato/konektilo/vicmemoro) havas nenulan grandon. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+msgid "@j @i is not in use, but contains data. "
+msgstr "KaÅprotokola i-nodo ne uziÄas, sed enhavas datumojn. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr "KaÅprotokolo ne estas normala dosiero. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "I-nodo %i estis en la listo de orfaj i-nodoj. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "TroviÄis i-nodoj kiuj estis anoj en difekta listo de orfoj. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A de 'refcount'-a strukturo (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Eraro dum legado de @b %b de etenditaj atributoj por @i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+msgid "@i %i has a bad @a @b %b. "
+msgstr "@i %i havas malbonan blokon %b de etenditaj atributoj. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+msgid "Error reading @a @b %b (%m). "
+msgstr "Eraro dum legado de @b %b de etenditaj atributoj (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "@b %b de etenditaj atributoj havas referencnombron %r, @s %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+msgid "Error writing @a @b %b (%m). "
+msgstr "Eraro dum skribado de @b %b de etenditaj atributoj (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "@b %b de etenditaj atributoj havas 'h_blocks > 1'. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+#, fuzzy
+msgid "@A @a region allocation structure. "
+msgstr "@A de 'icount'-a strukturo: %m\n"
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "@b %b de etenditaj atributoj estas difekta (asigna kolizio). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "@b %b de etenditaj atributoj estas difekta (malvalida nomo). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "@b %b de etenditaj atributoj estas difekta (malvalida valoro). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr "@i %i tro grandas. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) estigas dosierujon tro granda. "
+
+#: e2fsck/problem.c:854
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) estigas dosieron tro granda. "
+
+#: e2fsck/problem.c:859
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) estigas simbolan ligon tro granda. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+"@i %i havas jesan flagon 'INDEX_FL' en dosiersistemo sen subteno por "
+"'HTREE'.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "@i %i havas jesan flagon 'INDEX_FL' sed ne estas @d.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "@h %i havas malvalidan radikan nodon.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %i havas nesubtenatan haketan version (%N).\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "@h %i uzas nekongruan flagon por 'HTREE'-a radika nodo.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "@h %i havas arban profundon (%N) kiu tro grandas\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Malbonbloka @i havas nerektan blokon (%b) kiu konfliktas\n"
+"kun dosiersistemaj metadatumoj. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Malsukcesis (re)kreado de regrandiga @i: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "@i %i havas kroman grandon (%IS) kiu malvalidas\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "@a en @i %i havas nomlongon (%N) kiu malvalidas\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "@a en @i i havas valoran pozicion (%N) kiu malvalidas\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "@a en @i i havas valoran blokon (%N) kiu malvalidas (devus esti 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "@a en @i i havas valoran grandon (%N) kiu malvalidas\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "@a en @i i havas haketon (%N) kiu malvalidas\n"
+
+# XXX what is %It??
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "@i %i estas %It sed Åajnas ke Äi vere estas ujo.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Eraro dum legado tra arbo de ampleksoj en @i %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Malsukcesis iteracio je ampleksoj en @i %i\n"
+" (op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i havas malvalidan amplekson\n"
+" (logika @b %c, @n fizika @b %b, longo %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"@i %i havas malvalidan amplekson\n"
+" (logika @b %c, fizika @b %b, @n longo %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+"@i %i havas jesan flagon 'EXTENTS_FL' en dosiersistemo sen subteno por "
+"ampleksoj.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "@i %i estas en ampleksa aranÄo, sed @S ne havas funkcion 'EXTENTS'\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "@i %i estas en ampleksa aranÄo, sed ne havas 'EXTENT_FL'\n"
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Rapida simbola ligo %i havas jesan flagon 'EXTENT_FL'. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i havas neordajn ampleksojn\n"
+" (@n logika @b %c, fizika @b %b, longo %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "@i %i havas malvalidan ampleksan nodon (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Eraro dum konverto de subfaska bloka @B: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+#, fuzzy
+msgid "@q @i is not a regular file. "
+msgstr "La kvota @i ne estas normala dosiero. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+msgid "@q @i is not in use, but contains data. "
+msgstr "La kvota @i ne uziÄas, sed enhavas datumojn. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+msgid "@q @i is visible to the user. "
+msgstr "La kvota @i estas videbla por uzanto. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+msgid "The bad @b @i looks @n. "
+msgstr "La malbonbloka @i Åajnas @n. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"@i %i havas nullongan amplekson\n"
+" (@n logika @b %c, fizika @b %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, fuzzy, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "@i %i tro grandas. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, fuzzy, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "Kontrolsumo de i-noda bitmapo ne konkordas kun bitmapo"
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, fuzzy, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "@b %b de etenditaj atributoj estas difekta (asigna kolizio). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+#, fuzzy
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i havas neordajn ampleksojn\n"
+" (@n logika @b %c, fizika @b %b, longo %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Interna ampleksa noda nivelo %N de @i %i:\n"
+"Logika komenco %b ne kongruas kun logika komenco %c je posta nivelo. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i, fino de amplekso transpasas permesatan valoron\n"
+" (logika @b %c, fizika @b %b, longo %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, fuzzy, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "@i %i estas en ampleksa aranÄo, sed @S ne havas funkcion 'EXTENTS'\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+"@i %i havas jesan flagon 'INDEX_FL' en dosiersistemo sen subteno por "
+"'HTREE'.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "bloko %b de uja @i %i devus esti je bloko %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "uja @i %i havas amplekson markitan kiel sen pravalorizo je @b %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "@i %i havas jesan flagon 'INDEX_FL' sed ne estas @d.\n"
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, fuzzy, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Speciala @i %i (aparato/konektilo/vicmemoro) havas jesan flagon\n"
+"'immutable' aÅ­ 'append-only'. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+#, fuzzy
+msgid "@A @x region allocation structure. "
+msgstr "@A de 'icount'-a strukturo: %m\n"
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+#, fuzzy
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i havas malvalidan amplekson\n"
+" (logika @b %c, @n fizika @b %b, longo %N)\n"
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, fuzzy, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "@b %b de etenditaj atributoj estas difekta (malvalida nomo). "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+#, fuzzy
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i havas malbonan blokon %b de etenditaj atributoj. "
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+#, fuzzy
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "@i %i estas en ampleksa aranÄo, sed @S ne havas funkcion 'EXTENTS'\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Aldonaj paÅoj por solvi blokoj kiuj posedatas de pli ol unu i-nodo.\n"
+"PaÅo 1B: Reskanaado por pluroble posedataj blokoj...\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "pluroble posedata(j) bloko(j) en i-nodo %i:"
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Eraro dum skanado de i-nodoj (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A de i-noda @B ('inode_dup_map()'): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Eraro dum iteracio je blokoj en @i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+"Eraro dum alÄustigo de referencnombro por @b %b de etenditaj atributoj (@i "
+"%i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+"PaÅo 1C: Skanado de dosierujoj por i-nodoj kun pluroble posedataj blokoj...\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "PaÅo 1D: Solvado de pluroble posedataj blokoj...\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Dosiero %Q (@i %i, modifa tempo %IM) \n"
+" havas %r pluroble posedata(j)n bloko(j)n, kunhave kun %N dosiero(j):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr " <dosiersistemaj metadatumoj>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Ekzistas %N i-nodoj kiuj havas pluroble posedatajn blokojn.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"pluroble posedataj blokoj jam reasigniÄis aÅ­ kloniÄis.\n"
+"\n"
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Malsukcesis kloni dosieron: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+#, fuzzy
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "PaÅo 3A: Optimumigo de dosierujoj...\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, fuzzy, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Fiaskis optimumigo de dosierujo %q (%d): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+#, fuzzy
+msgid "Optimizing @x trees: "
+msgstr "Optimumigo de dosierujoj: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr "PaÅo 2: Kontrolo de dosieruja strukturo...\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "@n i-noda numero por '.' en uja @i %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E havas malvalidan i-nodan nombron: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E havas forigitan/neuzatan i-nodon %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr "@E @L al '.' "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E referencas al @i (%Di) kiu estas en malbona bloko.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E @L al @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr "@E @L al @r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E havas nevalidajn signojn en sia nomo.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Mankas '.' en uja @i %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Mankas '..' en uja @i %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Unua @e '%Dn' (@i=%Di) en uja @i %i (%p) @s '.'\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Dua @e '%Dn' (@i=%Di) en uja @i %i @s '..'\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "'i_faddr' @F %IF, @s nulo.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "'i_file_acl' @F %If, @s nulo.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+#, fuzzy
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "'i_fsize' @F %N, @s nulo.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "'i_frag' @F %N, @s nulo.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "'i_fsize' @F %N, @s nulo.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) havas nevalidan moduson (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "uja @i %i, %B, pozicio %N: @d difektas\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "uja @i %i, %B, pozicio %N: dosiernomo tro longas\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+msgid "@d @i %i has an unallocated %B. "
+msgstr "uja @i %i havas neasignatan %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "uja @e '.' en uja @i %i ne finiÄas per NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "uja @e '..' en uja @i %i ne finiÄas per NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) estas @I signo-aparato.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) estas @I blokaparato.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E estas duobla @e '.'.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E estas duobla @e '..'.\n"
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E havas 'rec_len' %Dr, @s %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A de 'icount'-a strukturo: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Eraro dum iteracio je ujaj blokoj: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Eraro dum legado de uja bloko %b (i-nodo %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Eraro dum skribado de uja bloko %b (i-nodo %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A de nova uja @b por @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "uja @e por '.' en %p (%i) estas granda.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) estas @I vicmemoro.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) estas @I konektilo.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr "AgordiÄas dosiertipo por @E al %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E havas malÄustan dosiertipon (estas %Dt, @s %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr "@E havas dosiertipon agordita.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+msgid "@E has a @z name.\n"
+msgstr "@E havas nomon kun nula longo.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Simbola ligo %Q (@i %i) malvalidas.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr "@b de etenditaj atributoj @F malvalida (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+"@f enhavas grandajn dosierojn, sed maljesas flago 'LARGE_FILE' en @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@p @h %d: %B ne referenciÄas\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p @h %d: %B referenciÄas duoble\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p @h %d: %B havas malvalidan minimuman haketon\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p @h %d: %B havas malvalidan maksimuman haketon\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+msgid "@n @h %d (%q). "
+msgstr "@n @h %d (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p @h %d (%q): malvalida bloknumero %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p @h %d: radika nodo estas @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p @h %d: %B havas malvalidan limon (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p @h %d: %B havas malvalidan nombron (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p @h %d: %B havas neordigitan haketan tabelon\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p @h %d: %B havas malvalidan profundon (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr "Duobla @E troviÄis. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E havas neunikan dosiernomon.\n"
+"Ĉu alinomi al %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Duobla @e '%Dn' troviÄis.\n"
+" MarkiÄas %p (%i) por rekonstruo.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "'i_blocks_hi' @F %N, @s nulo.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E referencas i-nodon %Di en @g %g kie jesas '_INODE_UNINIT'.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E referencas i-nodon %Di kiu troviÄas je neuzataj i-nodoj de @g %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "'i_file_acl_hi' @F %N, @s nulo.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, fuzzy, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p @h %d: radika nodo estas @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, fuzzy, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p @h %d: radika nodo estas @n\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "uja @i %i, %B, pozicio %N: @d difektas\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "PaÅo 3: Kontrolo de konektoj inter dosierujoj...\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr "@r ne asignatas. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr "Ne estas plu da spaco en dosierujo '@l'. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Nekonektita dosieruja @i %i (%p)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr "/@l ne troviÄis. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' en %Q (%i) estas %P (%j), devus esti %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Malbonas aÅ­ ne ekzistas /@l. Ne eblas rekonekti.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Malsukcesis etendi /@l: %m\n"
+
+#: e2fsck/problem.c:1731
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Malsukcesis rekonekti %i: m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Eraro dum serĉo de /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block(): %m dum kreado de dosierujo /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode(): %m dum kreado de dosierujo /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block(): %m dum kreado de nova uja bloko\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block(): %m dum skribado de uja bloko por /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Eraro dum alÄustigo de i-noda nombro je i-nodo %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Ne eblas fiksi padron de @i %i: maleblis trovi ujeron por padro\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Eraro dum kreado de radika dosierujo (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Eraro dum kreado de dosierujo /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r ne estas dosierujo -- ĉesigo.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr "Ne eblas daÅ­rigi sen @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l ne estas dosierujo (i-nodo=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+#, fuzzy
+msgid "/@l is encrypted\n"
+msgstr "Bildo (%s) estas ĉifrita\n"
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "PaÅo 3A: Optimumigo de dosierujoj...\n"
+
+#: e2fsck/problem.c:1838
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1843
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Fiaskis optimumigo de dosierujo %q (%d): %m\n"
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "Optimumigo de dosierujoj: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "PaÅo 4: Kontrolo de nombroj de referencoj...\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, c-format
+msgid "@u @z @i %i. "
+msgstr "@u @i %i kun nula longo. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr "@u @i %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "referencnombro de @i %i estas %Il, @s %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"**AVERTO**: ebla programmiso en 'e2fsck', aÅ­ pli probable\n"
+" IU STULTULO (vi) kontrolas VIVAN (SURMETATAN) DOSIERSISTEMON.\n"
+"\n"
+"inode_link_info[%i] estas %N, inode.i_links_count estas %Il -- ili devus "
+"egali!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+#, fuzzy
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "referencnombro de @i %i estas %Il, @s %N. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "PaÅo 5: Kontrolo de grupa resuma informo...\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+msgid "Padding at end of @i @B is not set. "
+msgstr "Åœtopado je fino de i-noda bitmapo ne agordiÄas. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+msgid "Padding at end of @b @B is not set. "
+msgstr "Åœtopado je fino de bloka bitmapo ne agordiÄas. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr "Malsamoj en bloka bitmapo: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr "Malsamoj en i-noda bitmapo: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+"Nombro de liberaj i-nodoj malÄustas por grupo %g (estas %i, nombriÄis %j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+"Nombro de dosierujoj malÄustas por grupo %g (estas %i, nombriÄis %j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Nombro de liberaj i-nodoj malÄustas (estas %i, nombriÄis %j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+"Nombro de liberaj blokoj malÄustas por grupo %g (estas %b, nombriÄis %c)\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Nombro de liberaj blokoj malÄustas (estas %b, nombriÄis %c)\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1989
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Eraro dum kopiado de anstataÅ­a i-noda @B: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Eraro dum kopiado de anstataÅ­a bloka @B: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+"@g %g havas blokojn uzatajn, sed la @g estas markita kiel 'BLOCK_UNINIT'\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+"@g %g havas i-nodojn uzatajn, sed la @g estas markita kiel 'INODE_UNINIT'\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+msgid "Recreate @j"
+msgstr "Ĉu rekrei kaÅprotokolon"
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr "Ĉu Äisdatigi kvotan informon por kvottipo %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Eraro dum agordo de blokgrupa kontrolsumo: %m\n"
+
+#: e2fsck/problem.c:2061
+#, c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Eraro dum skribado de dosiersistema informo: %m\n"
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Eraro dum elbufrigo de skriboj al memoraparato: %m\n"
+
+#: e2fsck/problem.c:2071
+#, fuzzy
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Ĉu Äisdatigi kvotan informon por kvottipo %N"
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Netraktata erarkodo (0x%x)!\n"
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr "IGNORIÄœIS"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Uzata memoro: %d, pasinta tempo: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "grando de i-nodo=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "dum komenco de skano de i-nodoj"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "dum skanado de i-nodoj"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "dum alvoko de 'ext2fs_block_iterate()' por i-nodo %d"
+
+#: e2fsck/super.c:249
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "dum alvoko de 'ext2fs_adjust_ea_refcount2()' por i-nodo %d"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "TrunkiÄas"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "ViÅiÄas"
+
+#: e2fsck/unix.c:77
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Uzmaniero: %s [-pnycfktvDFV] [-b ĉefbloko] [-B blokgrando]\n"
+" [-C dosierpriaĵo] [-E etenditaj_opcioj]\n"
+" [-I i_noda_bufroblokoj] [-j ekstera_kaÅprotokolo]\n"
+" [-l|-L malbonbloka_dosiero] aparato\n"
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Kriza helpo:\n"
+" -p aÅ­tomate ripari (sen demandoj)\n"
+" -n neniel ÅanÄi la dosiersistemon\n"
+" -y supozi 'jes' je ĉiu demando\n"
+" -c kontroli por malbonaj blokoj kaj aldoni ilin al malbonbloka listo\n"
+" -f devigi kontrolon, eĉ se dosiersistemo estas markita kiel pura\n"
+
+#: e2fsck/unix.c:88
+#, fuzzy
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v eligi detalojn pri la farado\n"
+" -b <numero> uzenda alternativa ĉefbloko\n"
+" -B <nombro> deviga blokgrando dum serĉo de ĉefbloko\n"
+" -j <pado> loko de la ekstera kaÅprotokolo\n"
+" -l <dosiernomo> aldoni al malbonbloka listo\n"
+" -L <dosiernomo> uzenda kiel malbonbloka listo\n"
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u dosieroj (%0d.%d%% nekontinua), %llu/%llu blokoj\n"
+
+#: e2fsck/unix.c:162
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u i-nodo uzita (%2.2f%%, el de %u)\n"
+msgstr[1] ""
+"\n"
+"%12u i-nodoj uzitaj (%2.2f%%, el de %u)\n"
+
+#: e2fsck/unix.c:166
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u nekontinua dosiero (%0d.%d%%)\n"
+msgstr[1] "%12u nekontinuaj dosieroj (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:171
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u nekontinua dosierujo (%0d.%d%%)\n"
+msgstr[1] "%12u nekontinuaj dosierujoj (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:176
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+" nombro de i-nodoj kun nerektaj blokoj: %u simple, %u duoble, %u "
+"trioble\n"
+
+#: e2fsck/unix.c:184
+msgid " Extent depth histogram: "
+msgstr " histogramo de ampleksa profundo: "
+
+#: e2fsck/unix.c:193
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu bloko uzita (%2.2f%%, el de %llu)\n"
+msgstr[1] "%12llu blokoj uzitaj (%2.2f%%, el de %llu)\n"
+
+#: e2fsck/unix.c:197
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u difekta bloko\n"
+msgstr[1] "%12u difektaj blokoj\n"
+
+#: e2fsck/unix.c:199
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u granda dosiero\n"
+msgstr[1] "%12u grandaj dosieroj\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u normala dosiero\n"
+msgstr[1] ""
+"\n"
+"%12u normalaj dosieroj\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u dosierujo\n"
+msgstr[1] "%12u dosierujoj\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u signo-aparato\n"
+msgstr[1] "%12u signo-aparatoj\n"
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u blokaparato\n"
+msgstr[1] "%12u blokaparatoj\n"
+
+#: e2fsck/unix.c:210
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u vicmemoro\n"
+msgstr[1] "%12u vicmemoroj\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u ligo\n"
+msgstr[1] "%12u ligoj\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u simbola ligo"
+msgstr[1] "%12u simbolaj ligoj"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u rapida simbola ligo)\n"
+msgstr[1] " (%u rapidaj simbolaj ligoj)\n"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u konektilo\n"
+msgstr[1] "%12u konektiloj\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u dosiero\n"
+msgstr[1] "%12u dosieroj\n"
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "dum eltrovo se %s estas surmetata."
+
+#: e2fsck/unix.c:258
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Averto! %s estas surmetata.\n"
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Averto! %s uziÄas.\n"
+
+#: e2fsck/unix.c:267
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s estas surmetata.\n"
+
+#: e2fsck/unix.c:269
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s uziÄas.\n"
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Ne eblas daŭrigi -- ĉesigo.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"**AVERTO**!! La dosiersistemo estas surmetata!!\n"
+" Se vi kontinuas, vi **KAŬZOS** **SEVERAJN** dosiersistemajn difektojn.\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Ĉu vi vere volas kontinui"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "kontrolo ĉesigiÄis.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr " enhavas dosiersistemon kun eraroj"
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr " ne demetiÄis tutkorekte"
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr " unua ĉefbloko havas aliajn funkciojn ol savkopia"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " surmetiÄis %u fojojn sen esti kontrolata"
+
+#: e2fsck/unix.c:389
+msgid " has filesystem last checked time in the future"
+msgstr " havas tempon de kontrolo en la estonteco"
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " pasis %u tagojn sen kontrolo"
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr "; perforta kontrolo.\n"
+
+#: e2fsck/unix.c:442
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: pura, %u/%u dosieroj, %llu/%llu blokoj"
+
+#: e2fsck/unix.c:462
+msgid " (check deferred; on battery)"
+msgstr " (kontrolo prokrastis; sur baterio)"
+
+# FIXME: maybe *upon* next mount?
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (kontroliÄos je sekva surmeto)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kontroliÄos en %ld surmetoj)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "Eraro: fiaskis malfermi /dev/null (%s)\n"
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr "Malvalida versio de EA.\n"
+
+#: e2fsck/unix.c:701
+#, fuzzy
+msgid "Invalid readahead buffer size.\n"
+msgstr "Malvalida argumento por 'resize': %s\n"
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Nekonata etendita opcio: %s\n"
+
+#: e2fsck/unix.c:758
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:860
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:875
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr ""
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:994
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1018
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1024
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+msgid "while checking MMP block"
+msgstr ""
+
+#: e2fsck/unix.c:1259
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1275
+#, fuzzy
+msgid "while reading MMP block"
+msgstr "dum legado de kaÅprotokola ĉefbloko"
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr ""
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:1508
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr "Ĉefbloko nevalidas,"
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr "Gruppriaĵoj aspektas malbonaj..."
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s dum uzado de savkopiaj blokoj"
+
+#: e2fsck/unix.c:1525
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: reiriÄas al originala ĉefbloko\n"
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "Ĉu eble ĉi tiu estas nullonga subdisko?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Vi bezonas havi %s atingon al la dosiersistemo, aŭ esti ĉefuzanto\n"
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Ĉu eble aparato ne ekzistas aŭ estas 'swap'?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1575
+msgid "Possibly non-existent device?\n"
+msgstr "Ĉu eble aparato ne ekzistas?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:1711
+#, fuzzy, c-format
+msgid "while checking journal for %s"
+msgstr "dum kontrolado de Ext3-kaÅprotokolo por %s"
+
+#: e2fsck/unix.c:1714
+#, fuzzy
+msgid "Cannot proceed with file system check"
+msgstr "Ne eblas daÅ­rigi sen @r.\n"
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Averto: transsaltiÄas kaÅprotokola restaÅ­ro, ĉar fariÄas nurlega kontrolo de "
+"dosiersistemo.\n"
+
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1743
+#, fuzzy, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "KaÅprotokola ĉefbloko ne troviÄis!\n"
+
+#: e2fsck/unix.c:1747
+#, fuzzy, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "KaÅprotokolo forigiÄis\n"
+
+#: e2fsck/unix.c:1751
+#, fuzzy, c-format
+msgid "while recovering journal of %s"
+msgstr "dum restaÅ­rado de Ext3-kaÅprotokolo por %s"
+
+#: e2fsck/unix.c:1773
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr ""
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s dum legado de malbonbloka i-nodo\n"
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Kreado de kaÅprotokolo (%d blokoj): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr " Pretas.\n"
+
+#: e2fsck/unix.c:1887
+#, fuzzy
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** kaÅprotokolo rekreiÄis -- dosiersistemo estas denove ext3 ***\n"
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr ""
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:1985
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DOSIERSISTEMO MODIFIÄœIS *****\n"
+
+#: e2fsck/unix.c:1987
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DOSIERSISTEMO MODIFIÄœIS *****\n"
+
+#: e2fsck/unix.c:1996
+#, fuzzy, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** RESTARTIGU LINUKSON *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** AVERTO: Dosiersistemo ankoraÅ­ enhavas erarojn **********\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "jJyY"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr ""
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<j>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr ""
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr ""
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "jes\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "ne\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? ne\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? jes\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "jes"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "ne"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:346
+msgid "writing block and inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr ""
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr ""
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr ""
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr ""
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% fariÄis, %s pasis. (%d/%d/%d eraroj)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Testante kun hazarda aranÄo: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Testante kun aranÄo 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Stranga valoro (%ld) en 'do_read()'\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "dum 'ext2fs_sync_device()'"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "dum komenco de iteracio je malbonbloka listo"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "dum asigno de bufroj"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Kontrolante blokojn %lu al %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Kontrolante por malbonaj blokoj en nurlega moduso\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Kontrolante por malbonaj blokoj (nurlega testo): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Tro multaj malbonaj blokoj -- ĉesigo de testo\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Kontrolante por malbonaj blokoj en lega-skriba moduso\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "De bloko %lu al %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Legante kaj komparante: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Kontrolante por malbonaj blokoj en nedetrua lega-skriba moduso\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Kontrolante por malbonaj blokoj (nedetrua lega-skriba testo)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Interrompo alvenis -- ordigante\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "dum testa datuma skribo, bloko %lu"
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s estas surmetata; "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "'badblocks' tamen perfortiÄas. Esperu ke /etc/mtab Äustas.\n"
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "ne estas sendanÄera ruli 'badblocks'!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s Åajne uziÄas per la sistemo; "
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr "'badblocks' tamen perfortiÄas.\n"
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr ""
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr ""
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr ""
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr ""
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr ""
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr ""
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1347
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr ""
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr "Uzmaniero: %s [-RVf] [-+=AaCcDdeijSsTtu] [-v VERSIO] DOSIERO...\n"
+
+#: misc/chattr.c:159
+#, fuzzy, c-format
+msgid "bad project - %s\n"
+msgstr "malbona versio - %s\n"
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr "malbona versio - %s\n"
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:271
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:275
+#, fuzzy, c-format
+msgid "while setting project on %s"
+msgstr "dum provo de malfermi %s"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, fuzzy, c-format
+msgid "while reading inode %u"
+msgstr "dum legado de radika i-nodo"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+#, fuzzy
+msgid "while expanding directory"
+msgstr "dum etendado de dosierujo '/lost+found'"
+
+#: misc/create_inode.c:96
+#, fuzzy, c-format
+msgid "while linking \"%s\""
+msgstr "dum skanado de i-nodoj"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, fuzzy, c-format
+msgid "while writing inode %u"
+msgstr "dum skribado de i-noda tabelo"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, fuzzy, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "dum provo de regrandigi %s"
+
+#: misc/create_inode.c:162
+#, fuzzy, c-format
+msgid "while opening inode %u"
+msgstr "dum malfermo de i-noda skano"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+#, fuzzy
+msgid "while allocating memory"
+msgstr "dum asigno de bufro"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, fuzzy, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "dum legado de radika i-nodo"
+
+#: misc/create_inode.c:213
+#, fuzzy, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "dum iteracio je i-nodo %u"
+
+#: misc/create_inode.c:223
+#, fuzzy, c-format
+msgid "while closing inode %u"
+msgstr "dum skanado de i-nodoj"
+
+#: misc/create_inode.c:274
+#, fuzzy, c-format
+msgid "while allocating inode \"%s\""
+msgstr "dum asigno de bufroj"
+
+#: misc/create_inode.c:293
+#, fuzzy, c-format
+msgid "while creating inode \"%s\""
+msgstr "dum komenco de skano de i-nodoj"
+
+#: misc/create_inode.c:359
+#, fuzzy, c-format
+msgid "while creating symlink \"%s\""
+msgstr "dum kreado de dosierujo '/lost+found'"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, fuzzy, c-format
+msgid "while looking up \"%s\""
+msgstr "dum serĉado de dosierujo '/lost+found'"
+
+#: misc/create_inode.c:397
+#, fuzzy, c-format
+msgid "while creating directory \"%s\""
+msgstr "dum kreado de radika dosierujo"
+
+#: misc/create_inode.c:625
+#, fuzzy, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "dum malfermo de %s por elbufrigo"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:747
+#, fuzzy, c-format
+msgid "while opening directory \"%s\""
+msgstr "dum malfermo de i-noda skano"
+
+#: misc/create_inode.c:757
+#, c-format
+msgid "while lstat \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:808
+#, fuzzy, c-format
+msgid "while creating special file \"%s\""
+msgstr "KreiÄas normala dosiero %s\n"
+
+#: misc/create_inode.c:817
+#, fuzzy
+msgid "malloc failed"
+msgstr "Mankas sufiĉa memoro"
+
+#: misc/create_inode.c:825
+#, fuzzy, c-format
+msgid "while trying to read link \"%s\""
+msgstr "dum provo de regrandigi %s"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:843
+#, fuzzy, c-format
+msgid "while writing symlink\"%s\""
+msgstr "dum skribado de ĉefbloko"
+
+#: misc/create_inode.c:854
+#, fuzzy, c-format
+msgid "while writing file \"%s\""
+msgstr "dum skribado de i-noda tabelo"
+
+#: misc/create_inode.c:867
+#, fuzzy, c-format
+msgid "while making dir \"%s\""
+msgstr "dum kreado de radika dosierujo"
+
+#: misc/create_inode.c:885
+#, fuzzy
+msgid "while changing directory"
+msgstr "legante dosierujan blokon"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:904
+#, fuzzy, c-format
+msgid "while setting inode for \"%s\""
+msgstr "dum komenco de skano de i-nodoj"
+
+#: misc/create_inode.c:911
+#, fuzzy, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "dum kontrolado de Ext3-kaÅprotokolo por %s"
+
+#: misc/create_inode.c:937
+#, fuzzy
+msgid "while saving inode data"
+msgstr "dum komenco de skano de i-nodoj"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blokoj"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupo %lu: (Blokoj "
+
+#: misc/dumpe2fs.c:226
+#, fuzzy, c-format
+msgid " csum 0x%04x"
+msgstr " Kontrolsumo 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (ATENDIÄœIS 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s ĉefbloko je "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Unua"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Savkopia"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Grupaj priaĵoj je "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Rezervitaj GDT-blokoj je "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Gruppriaĵo je "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Bloka bitmapo je "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, fuzzy, c-format
+msgid ", csum 0x%08x"
+msgstr " Kontrolsumo 0x%04x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+#, fuzzy
+msgid " Inode bitmap at "
+msgstr ", i-noda bitmapo je "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" I-noda tabelo je "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u neuzitaj i-nodoj\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Liberaj blokoj: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Liberaj i-nodoj: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Difektaj blokoj: %u"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr "dum legado de kaÅprotokola i-nodo"
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr "dum malfermo de kaÅprotokola i-nodo"
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr "dum legado de kaÅprotokola ĉefbloko"
+
+#: misc/dumpe2fs.c:392
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Malvalidas maginumero de la kaÅprotokola ĉefbloko!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "dum legado de kaÅprotokola ĉefbloko"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Ne eblas trovi kaÅprotokolajn maginumerojn"
+
+#: misc/dumpe2fs.c:468
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "dum asigno de bufro"
+
+#: misc/dumpe2fs.c:479
+#, fuzzy, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Kontrolante blokojn %lu al %lu\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Mankas sufiĉa memoro por analizi opciojn!\n"
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr " UziÄas %s\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Malsukcesis trovi validan dosiersisteman ĉefblokon.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, fuzzy, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "dum provo de ruli '%s'"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr "Uzmaniero: %s [-r|Q] [-fr] APARATO BILDODOSIERO\n"
+
+#: misc/e2image.c:109
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I APARATO BILDODOSIERO\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+" %s -ra [-cfnp] [-o fontpozicio] [-O celpozicio] font-ds [cel-"
+"ds]\n"
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+msgid "while allocating buffer"
+msgstr "dum asigno de bufro"
+
+#: misc/e2image.c:180
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Skribado de bloko %llu\n"
+
+#: misc/e2image.c:194
+#, c-format
+msgid "error writing block %llu"
+msgstr "eraro dum skribado de bloko %llu"
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr "eraro en 'generic_write()'"
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Eraro: ĉapa grando pli grandas o 'wrt_size'\n"
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr "Mankas sufiĉa memoro por asigni bufron por ĉapo\n"
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr "dum skribado de ĉefbloko"
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr "dum skribado de i-noda tabelo"
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr "dum skribado de bloka bitmapo"
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr "dum skribado de i-noda bitmapo"
+
+#: misc/e2image.c:506
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Difekta uja bloko %llu: malbona 'rec_len' (%d)\n"
+
+#: misc/e2image.c:518
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Difekta uja bloko %llu: malbona 'name_len' (%d)\n"
+
+#: misc/e2image.c:559
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu blokoj (de %d%%)"
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr "Kopiado "
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Halti nun detruos la dosiersistemon; interrompu denove se vi certas.\n"
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " restas %s je %.2f MB/s"
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, c-format
+msgid "error reading block %llu"
+msgstr "eraro dum legado de bloko %llu"
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "KopiiÄis %llu / %llu blokoj (de %d%%) en %s "
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "je %.2f MB/s"
+
+#: misc/e2image.c:759
+msgid "while allocating l1 table"
+msgstr "dum asigno de l1-tabelo"
+
+#: misc/e2image.c:804
+msgid "while allocating l2 cache"
+msgstr "dum asigno de l2-kaÅmemoro"
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+"Averto: ankoraÅ­ ekzistas tabeloj en la kaÅmemoro dum sia konservado, tial "
+"datumoj perdiÄos kaj la bildo eble malvalidas.\n"
+
+#: misc/e2image.c:1152
+msgid "while allocating ext2_qcow2_image"
+msgstr "dum asigno de 'ext2_qcow2_image'"
+
+#: misc/e2image.c:1159
+msgid "while initializing ext2_qcow2_image"
+msgstr "dum pravalorizo de 'ext2_qcow2_image'"
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1276
+msgid "while allocating block bitmap"
+msgstr "dum asigno de bloka bitmapo"
+
+#: misc/e2image.c:1285
+#, fuzzy
+msgid "while allocating scramble block bitmap"
+msgstr "dum asigno de kirlita bloka bitmapo"
+
+#: misc/e2image.c:1292
+msgid "Scanning inodes...\n"
+msgstr "Skanado de i-nodoj...\n"
+
+#: misc/e2image.c:1304
+msgid "Can't allocate block buffer"
+msgstr "Mankas sufiĉa memoro por asigni bufron por bloko"
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "dum iteracio je i-nodo %u"
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Krudajn kaj QCOW2-bildojn ne eblas instali"
+
+#: misc/e2image.c:1411
+msgid "error reading bitmaps"
+msgstr "eraro dum legado de bitmapoj"
+
+#: misc/e2image.c:1423
+msgid "while opening device file"
+msgstr "dum malfermo de aparatdosiero"
+
+#: misc/e2image.c:1434
+msgid "while restoring the image table"
+msgstr "dum restaÅ­ro de bilda tabelo"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "Opcio '-a' uzeblas nur kun krudaj aÅ­ QCOW2-bildoj."
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr "Pozicioj uzeblas nur kun krudaj bildoj."
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr "Movmoduso uzeblas nur kun krudaj bildoj."
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr "Movmoduso postulas 'all-data' moduson"
+
+#: misc/e2image.c:1557
+msgid "checking if mounted"
+msgstr "kontrolo je surmeto"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Ruli 'e2image' je skribeble surmetata dosiersistemo povas rezulti\n"
+"en malkohera bildo kiu ne utilos por serĉo de programmisoj.\n"
+"Uzu opcio '-f' se vi vere volas fari tion.\n"
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "Ne eblas skribi QCOW2-bildon al ĉefeligujo!\n"
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr "Malsukcesis eltrovi statinformon pri eligujo\n"
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Bildo (%s) estas densigita\n"
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Bildo (%s) estas ĉifrita\n"
+
+#: misc/e2image.c:1640
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Bildo (%s) estas ĉifrita\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "dum konverto de QCOW2-bildo (%s) al kruda bildo (%s)"
+
+#: misc/e2image.c:1654
+msgid "The -c option only supported in raw mode\n"
+msgstr "Opcio '-c' uzeblas nur en kruda moduso\n"
+
+#: misc/e2image.c:1659
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Opcio '-c' ne uzeblas dum skribado al ĉefeligujo\n"
+
+#: misc/e2image.c:1666
+msgid "while allocating check_buf"
+msgstr "dum asigno de 'check_buf'"
+
+#: misc/e2image.c:1672
+msgid "The -p option only supported in raw mode\n"
+msgstr "Opcio '-p' uzeblas nur en kruda moduso\n"
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "Estis %d blokoj kiuj jam enhavis la kopiendajn datumojn\n"
+
+#: misc/e2initrd_helper.c:68
+#, fuzzy, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Uzmaniero: %s DISKO\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: ne eblas malfermi %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: ne eblas salti al ĉefbloko\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: eraro dum legado de ĉefbloko\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: ne estas Ext2-dosiersistemo\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Averto: etikedo tro longas, Äi trunkiÄas.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: ne eblas resalti al ĉefbloko\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: eraro dum skribado de ĉefbloko\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Uzmaniero: e2label APARATO [NOVETIKEDO]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+#, fuzzy
+msgid "while reading filesystem superblock."
+msgstr "dum legado de kaÅprotokola ĉefbloko"
+
+#: misc/e2undo.c:188
+#, fuzzy
+msgid "while fetching superblock"
+msgstr "dum skribado de ĉefbloko"
+
+#: misc/e2undo.c:201
+#, fuzzy, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Kontrolsumo de ĉefbloko ne konkordas kun ĉefbloko"
+
+#: misc/e2undo.c:340
+#, fuzzy, c-format
+msgid "illegal offset - %s"
+msgstr "Nevalida pozicio: %s\n"
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:373
+#, fuzzy, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "dum malfermo de aparatdosiero"
+
+#: misc/e2undo.c:380
+#, fuzzy
+msgid "while reading undo file"
+msgstr "dum legado de radika i-nodo"
+
+#: misc/e2undo.c:385
+#, fuzzy, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: tro da aparatoj\n"
+
+#: misc/e2undo.c:396
+#, fuzzy, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "Kontrolsumo de i-nodo ne konkordas kun i-nodo"
+
+#: misc/e2undo.c:403
+#, fuzzy, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "Difekta ampleksa ĉapo"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:412
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr ""
+
+#: misc/e2undo.c:425
+#, fuzzy, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "KaÅprotokola @S havas nekonatan jesan nekongruan funkcian flagon.\n"
+
+#: misc/e2undo.c:433
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "dum eltrovo se %s estas surmetata."
+
+#: misc/e2undo.c:439
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+
+#: misc/e2undo.c:455
+#, fuzzy, c-format
+msgid "while opening `%s'"
+msgstr "dum malfermo de i-noda skano"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:507
+#, fuzzy
+msgid "while reading keys"
+msgstr "dum legado de bitmapoj"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:552
+#, fuzzy, c-format
+msgid "%s: block %llu is too long."
+msgstr "De bloko %lu al %lu\n"
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, fuzzy, c-format
+msgid "while fetching block %llu."
+msgstr "Skribado de bloko %llu\n"
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:615
+#, fuzzy, c-format
+msgid "while writing block %llu."
+msgstr "eraro dum skribado de bloko %llu"
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr ""
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr ""
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "AVERTO: malsukcesis malfermi %s: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "AVERTO: malvalida sintakso en linio %d de %s\n"
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"WARNING: /etc/fstab ne enhavas le sesan kampon (vicnumeron por 'fsck')\n"
+" Ĉi tiu problemo nun ĉirkaÅ­iriÄos kaj evitiÄos, sed vi devus\n"
+" korekti vian dosieron /etc/fstab la plej frue ke vi povas.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s ne troviÄis\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: Ne plu ekzistas ida procezo!!\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Averto... %s por aparato %s finis kun signalo %d.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: elirstato estas %x -- tio devus neniam okazi.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Finkontrolis aparaton %s (elirstato estas %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Eraro %d dum rulado de 'fsck.%s' por %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Aŭ ĉiuj aŭ neniuj de la dosiersistemaj tipoj je opcio '-t'\n"
+"devus esti prefiksitaj kun 'no' aÅ­ '!'.\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Mankas sufiĉa memoro por dosiersistemaj tipoj\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+"%s: transsaltiÄas malbona linio en /etc/fstab: 'bind'-surmeto havas nenulan "
+"sesan kampon (vicnumeron por 'fsck')\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: ne eblas kontroli %s: 'fsck.%s' ne troviÄas\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Kontrolo de ĉiuj dosiersistemoj.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--atendado-- (paÅo %d)\n"
+
+#: misc/fsck.c:1085
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Uzmaniero: fsck [-AMNPRTV] [-C [dosierpriaĵo]] [-t dosiersistemtipo]\n"
+" [dosiersistemopcioj] [dosiersistemo...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: tro da aparatoj\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: tro da argumentoj\n"
+
+#: misc/fuse2fs.c:3739
+#, fuzzy
+msgid "Mounting read-only.\n"
+msgstr "Dosiero estas malferma nurlege"
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, c-format
+msgid "%s: %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3806
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, fuzzy, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Uzmaniero: %s [-RVf] [-+=AaCcDdeijSsTtu] [-v VERSIO] DOSIERO...\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:93
+#, fuzzy, c-format
+msgid "While reading project on %s"
+msgstr "dum legado de radika i-nodo"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:130
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "RuliÄas komando: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "dum provo de ruli '%s'"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "dum traktado de listo de malbonaj blokoj el programo"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "AbortiÄas...\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "dum markado de malbonaj blokoj kiel uzataj"
+
+#: misc/mke2fs.c:368
+#, fuzzy
+msgid "while writing reserved inodes"
+msgstr "dum skribado de kaÅprotokola i-nodo"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "SkribiÄas i-nodaj tabeloj: "
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Malsukcesis skribi %d blokojn en i-noda tabelo ekde %llu: %s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "farita \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "dum kreado de radika dosierujo"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "dum legado de radika i-nodo"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "dum agordo de posedeco de radika i-nodo"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "dum kreado de dosierujo '/lost+found'"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "dum serĉado de dosierujo '/lost+found'"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "dum etendado de dosierujo '/lost+found'"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "dum agordo de malbonbloka i-nodo"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Mankas sufiĉa memoro dum viÅado de sektoroj %d-%d\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Averto: malsukcesis legi blokon 0: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Averto: malsukcesis viÅi sektoron %d: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "dum pravalorizo de kaÅprotokola ĉefbloko"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "NulpleniÄas kaÅprotokola aparato: "
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "dum nulplenigo de kaÅprotokola aparato (bloko %llu, numero %d)"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "dum skribado de kaÅprotokola ĉefbloko"
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Kreado de dosiersistemo kun %llu blokoj (de %dK) kaj %u i-nodoj\n"
+
+#: misc/mke2fs.c:673
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Averto: %llu blokoj ne uziÄas.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Dosiersistema etikedo=%s\n"
+
+#: misc/mke2fs.c:681
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Mastrumsistema tipo: %s\n"
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blokgrando=%u (log=%u)\n"
+
+#: misc/mke2fs.c:686
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Faska grando=%u (log=%u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmenta grando=%u (log=%u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "'Stride'-paÅo=%u blokoj, 'stripe'-larÄo=%u blokoj\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u i-nodoj, %llu blokoj\n"
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu blokoj (%2.2f%%) rezerviÄas por la ĉefuzanto\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Unua datumbloko=%u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Posedanto de radika dosierujo=%u:%u\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maksimuma nombro de dosiersistemaj blokoj=%lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blokgrupoj\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blokgrupo\n"
+
+#: misc/mke2fs.c:711
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blokoj po grupo, %u faskoj po grupo\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blokoj po grupo, %u fragmentoj po grupo\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u i-nodoj po grupo\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Dosiersistema UUID=%s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Ĉefblokaj savkopioj gardiÄas en blokoj: "
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s bezonas '-O 64bit'\n"
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "'%s' devas esti antaÅ­ 'resize=%u'\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Nevalida 'desc_size': '%s'\n"
+
+#: misc/mke2fs.c:853
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Nevalida pozicio: %s\n"
+
+#: misc/mke2fs.c:865
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Nevalida pozicio: %s\n"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Nevalida 'mmp_update_interval': %s\n"
+
+#: misc/mke2fs.c:896
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Malvalida nombro de savkopiaj ĉefblokoj: %s\n"
+
+#: misc/mke2fs.c:918
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Malvalida argumento por 'stride': %s\n"
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Malvalida argumento por 'stripe'-larÄo: %s\n"
+
+#: misc/mke2fs.c:956
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Malvalida argumento por 'resize': %s\n"
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Nevalida radikposedanto: '%s'\n"
+
+#: misc/mke2fs.c:1065
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Nevalida dosiersistema opcio agordiÄas: %s\n"
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Nevalida surmeta opcio agordiÄas: %s\n"
+
+#: misc/mke2fs.c:1296
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1304
+msgid "Aborting...\n"
+msgstr "AbortiÄas...\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1527
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Mankas sufiĉa memoro por nova 'PATH'.\n"
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1597
+#, c-format
+msgid "invalid block size - %s"
+msgstr "nevalida blokgrando: %s"
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Averto: blokgrando %d ne uzeblas en plejmulto de sistemoj.\n"
+
+#: misc/mke2fs.c:1617
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "nevalida faskgrando: %s"
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "opcio '-R' arkaikas; uzu '-E' anstataÅ­e"
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr "Nevalida nombro de blokoj po grupo"
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr "blokoj po grupo devas esti oblo de 8"
+
+#: misc/mke2fs.c:1669
+msgid "Illegal number for flex_bg size"
+msgstr "Malvalida nombro por grando de 'flex_bg'"
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr "Grando de 'flex_bg' devas esti potenco de 2"
+
+#: misc/mke2fs.c:1680
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "Grando de 'flex_bg' (%lu) devas esti malpli ol (aÅ­ egale al) 2^31"
+
+#: misc/mke2fs.c:1690
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "nevalida i-noda rilato %s (min %d/maks %d)"
+
+#: misc/mke2fs.c:1700
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "nevalida i-noda grando: %s"
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr "mankas sufiĉa memoro en 'bad_blocks_filename()'"
+
+#: misc/mke2fs.c:1733
+#, fuzzy, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Averto: etikedo tro longas, Äi trunkiÄas.\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "nevalida elcento de rezervitaj blokoj: %s"
+
+#: misc/mke2fs.c:1757
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "nevalida nombro de i-nodoj: %s"
+
+#: misc/mke2fs.c:1770
+#, fuzzy
+msgid "while allocating fs_feature string"
+msgstr "dum asigno de bufroj"
+
+#: misc/mke2fs.c:1787
+#, c-format
+msgid "bad revision level - %s"
+msgstr "nevalida revizia nivelo: %s"
+
+#: misc/mke2fs.c:1792
+#, c-format
+msgid "while trying to create revision %d"
+msgstr ""
+
+#: misc/mke2fs.c:1806
+msgid "The -t option may only be used once"
+msgstr "Opcio '-t' uzeblas nur unu fojon"
+
+#: misc/mke2fs.c:1814
+msgid "The -T option may only be used once"
+msgstr "Opcio '-T' uzeblas nur unu fojon"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "dum provo de malfermi kaÅprotokolan aparaton %s\n"
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"Blokgrando %d de kaÅprotokola aparato estas pli malgranda ol minimuma "
+"blokgrando %d\n"
+
+#: misc/mke2fs.c:1882
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Blokgrando de kaÅprotokola aparato uziÄas: %d\n"
+
+#: misc/mke2fs.c:1893
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "nevalidaj blokoj '%s' en aparato '%s'"
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "dosiersistemo"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "dum eltrovo de dosiersistema grando"
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Malsukcesis eltrovi aparatan grandon;\n"
+"necesas indiki la grandon de la dosiersistemo\n"
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr "Dosiersistemo pli grandas ol Åajna aparata grando."
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr "Malsukcesis analizi liston de dosiersistemaj tipoj\n"
+
+#: misc/mke2fs.c:2040
+#, fuzzy
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Ekstera kaÅprotokolo ne subtenas ĉi tiun dosiersistemon.\n"
+
+#: misc/mke2fs.c:2045
+#, fuzzy
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Ekstera kaÅprotokolo ne subtenas ĉi tiun dosiersistemon.\n"
+
+#: misc/mke2fs.c:2050
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2055
+#, fuzzy
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Ekstera kaÅprotokolo ne subtenas ĉi tiun dosiersistemon.\n"
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr ""
+
+#: misc/mke2fs.c:2071
+msgid "while trying to determine physical sector size"
+msgstr ""
+
+#: misc/mke2fs.c:2103
+msgid "while setting blocksize; too small for device\n"
+msgstr "dum agordo de blokgrando; Äi tro malgrandas por aparato\n"
+
+#: misc/mke2fs.c:2108
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:2132
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2144
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "KaÅprotokoloj ne subtenatas en dosiersistemoj de revizio 0\n"
+
+#: misc/mke2fs.c:2204
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "nevalida elcento de rezervitaj blokoj: %lf"
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2241
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Faskgrando ne povas esti pli malgranda ol blokgrando.\n"
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "indiki faskgrandon bezonas la 'bigalloc'-kapablon"
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr "nombro de blokoj po grupo estas ekster gamo"
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2467
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "nevalida i-nodgrando %d (min %d/maks %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "tro multaj i-nodoj (%llu); ĉu altigi la i-nodan rilaton?"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "tro multaj i-nodoj (%llu); indiku malpli ol 2^32 i-nodoj"
+
+#: misc/mke2fs.c:2518
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+
+#: misc/mke2fs.c:2705
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2721
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2780
+#, fuzzy
+msgid "while initializing quota context"
+msgstr "dum pravalorizo de 'ext2_qcow2_image'"
+
+#: misc/mke2fs.c:2787
+#, fuzzy
+msgid "while writing quota inodes"
+msgstr "dum skribado de kaÅprotokola i-nodo"
+
+#: misc/mke2fs.c:2812
+#, fuzzy, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "nevalida revizia nivelo: %s"
+
+#: misc/mke2fs.c:2888
+#, fuzzy
+msgid "in malloc for android_sparse_params"
+msgstr "mankas sufiĉa memoro en 'bad_blocks_filename()'"
+
+#: misc/mke2fs.c:2902
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2933
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "nekonata mastrumsistemo: %s"
+
+#: misc/mke2fs.c:3119
+msgid "Allocating group tables: "
+msgstr "Asigno de grupaj tabeloj: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr "dum asigno de dosiersistemaj tabeloj"
+
+#: misc/mke2fs.c:3136
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+" dum konverto de subfaska bloka bitmapo"
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3183
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "dum nulplenigo de bloko %llu je fino de dosiersistemo"
+
+#: misc/mke2fs.c:3196
+msgid "while reserving blocks for online resize"
+msgstr ""
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr "kaÅprotokolo"
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "AldoniÄas kaÅprotokolo al aparato %s: "
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+" dum provo de aldoni kaÅprotokolon al aparato %s"
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "pretas\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "TranssaltiÄas kreado de kaÅprotokolo en nurĉefa moduso\n"
+
+#: misc/mke2fs.c:3248
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Kreado de kaÅprotokolo (%u blokoj): "
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+" dum provo de krei kaÅprotokolon"
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3290
+#, fuzzy
+msgid "Copying files into the device: "
+msgstr "Eraro dum elbufrigo de skriboj al memoraparato: %m\n"
+
+#: misc/mke2fs.c:3296
+#, fuzzy
+msgid "while populating file system"
+msgstr "dum asigno de l1-tabelo"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:3310
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "dum nulplenigo de bloko %llu je fino de dosiersistemo"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"pretas\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, fuzzy, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "dum nulplenigo de bloko %llu je fino de dosiersistemo"
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:582
+#, fuzzy, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "KreiÄas normala dosiero %s\n"
+
+#: misc/mk_hugefiles.c:584
+#, fuzzy, c-format
+msgid "with %llu blocks each"
+msgstr ""
+"Averto: %llu blokoj ne uziÄas.\n"
+"\n"
+
+#: misc/mk_hugefiles.c:593
+#, fuzzy, c-format
+msgid "while creating huge file %lu"
+msgstr "dum iteracio je i-nodo %u"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr ""
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:136
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "KaÅprotokola ĉefbloko ne troviÄis!\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "dum provo de malfermi eksteran kaÅprotokolon"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s ne estas kaÅprotokola aparato.\n"
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Dosiersistema UUID ne troviÄis en kaÅprotokola aparato.\n"
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr "KaÅprotokolo forigiÄis\n"
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "dum legado de bitmapoj"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr "dum viÅado de kaÅprotokola i-nodo"
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr "dum skribado de kaÅprotokola i-nodo"
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr "(kaj poste restartigu la komputilon!)\n"
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:483
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1138
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1164
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1177
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1212
+msgid "Error while reading bitmaps\n"
+msgstr ""
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1226
+msgid "while reading MMP block."
+msgstr ""
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1269
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1323
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1465
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1489
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr "Dosiersistemo jam havas kaÅprotokolon.\n"
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+" dum provo de malfermi kaÅprotokolon en %s\n"
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Kreado de kaÅprotokolo en aparato %s: "
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "dum aldoniÄo de dosiersistemo al kaÅprotokolo en %s"
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Kreado de kaÅprotokola i-nodo: "
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+" dum provo de krei kaÅprotokola dosiero"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+#, fuzzy
+msgid "while initializing quota context in support library"
+msgstr "dum pravalorizo de kaÅprotokola ĉefbloko"
+
+#: misc/tune2fs.c:1649
+#, fuzzy, c-format
+msgid "while updating quota limits (%d)"
+msgstr "dum Äisdatigo de malbonbloka i-nodo"
+
+#: misc/tune2fs.c:1657
+#, fuzzy, c-format
+msgid "while writing quota file (%d)"
+msgstr "dum skribado de i-noda tabelo"
+
+#: misc/tune2fs.c:1675
+#, fuzzy, c-format
+msgid "while removing quota file (%d)"
+msgstr "dum legado de radika i-nodo"
+
+#: misc/tune2fs.c:1718
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr ""
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "bad inode size - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2115
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2153
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2168
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2193
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+
+#: misc/tune2fs.c:2663
+msgid "Failed to read inode bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2668
+msgid "Failed to read block bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr ""
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:2699
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr ""
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2955
+#, fuzzy
+msgid "Cannot modify a journal device.\n"
+msgstr "%s ne estas kaÅprotokola aparato.\n"
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2975
+msgid "Shrinking inode size is not supported\n"
+msgstr ""
+
+#: misc/tune2fs.c:2980
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3045
+#, fuzzy, c-format
+msgid "Recovering journal.\n"
+msgstr "%s: restaÅ­riÄas kaÅprotokolo...\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3074
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3084
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr ""
+
+#: misc/tune2fs.c:3091
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:3098
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:3104
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr ""
+
+#: misc/tune2fs.c:3111
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3119
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:3134
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3198
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3222
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/tune2fs.c:3275
+msgid "Need to update journal superblock.\n"
+msgstr "Necesas Äisdatigi kaÅprotokolan ĉefblokon.\n"
+
+#: misc/tune2fs.c:3301
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Nur eblas ÅanÄi i-nodan grandon kiam dosiersistemo ne estas surmetata.\n"
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3326
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "ArgordiÄas i-noda grando al %lu\n"
+
+#: misc/tune2fs.c:3330
+msgid "Failed to change inode size\n"
+msgstr "Fiaskis ÅanÄo de i-noda grando\n"
+
+#: misc/tune2fs.c:3344
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3349
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3356
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr ""
+
+#: misc/util.c:104
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr ""
+
+#: misc/util.c:108
+msgid "Proceed anyway? (y,N) "
+msgstr ""
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr ""
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:186
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+
+#: misc/util.c:213
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Dosiersistemo tro malgrandas por havi kaÅprotokolon.\n"
+
+#: misc/util.c:251
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"KaÅprotokola grando tro grandas por dosiersistemo.\n"
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr ""
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr ""
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr ""
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr ""
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr ""
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr ""
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr ""
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr ""
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr ""
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr ""
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr ""
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr ""
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr ""
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:534
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr ""
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:564
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+
+#: resize/main.c:581
+#, fuzzy, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+"Nur eblas ÅanÄi i-nodan grandon kiam dosiersistemo ne estas surmetata.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+
+#: resize/main.c:593
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"La dosiersistemo jam havas %llu blokojn (de %dK). Nenio farendas.\n"
+"\n"
+
+#: resize/main.c:600
+#, fuzzy, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Dosiersistemo jam havas kaÅprotokolon.\n"
+
+#: resize/main.c:605
+#, fuzzy, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Dosiersistemo jam havas kaÅprotokolon.\n"
+
+#: resize/main.c:613
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr ""
+
+#: resize/main.c:615
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr ""
+
+#: resize/main.c:617
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Dosiersistemo sur %s regrandigiÄas al %llu blokoj (de %dK).\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "dum provo de regrandigi %s"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:635
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Dosiersistemo sur %s nun havas %llu blokojn (de %dK).\n"
+"\n"
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr ""
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr ""
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr ""
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr ""
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr ""
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr ""
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr ""
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+
+#: resize/resize2fs.c:759
+#, fuzzy, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "Grando de 'flex_bg' (%lu) devas esti malpli ol (aÅ­ egale al) 2^31"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+msgid "new meta blocks"
+msgstr "novaj metablokoj"
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.44.4"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "MalÄustas magia numero por strukturo 'ext2_filsys'"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "MalÄustas magia numero por strukturo 'badblocks_list'"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "MalÄustas magia numero por strukturo 'badblocks_iterate'"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "MalÄustas magia numero por strukturo 'inode_scan'"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "MalÄustas magia numero por strukturo 'io_channel'"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "MalÄustas magia numero por Uniksa strukturo 'io_channel'"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "MalÄustas magia numero por strukturo 'io_manager'"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "MalÄustas magia numero por strukturo 'block_bitmap'"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "MalÄustas magia numero por strukturo 'inode_bitmap'"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "MalÄustas magia numero por strukturo 'generic_bitmap'"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "MalÄustas magia numero por strukturo 'test io_channel'"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "MalÄustas magia numero por strukturo 'block list'"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "MalÄustas magia numero por strukturo 'icount'"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "MalÄustas magia numero por strukturo 'Powerquest io_channel'"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "MalÄustas magia numero por strukturo 'ext2 file'"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "MalÄustas magia numero por 'Ext2 Image Header'"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "MalÄustas magia numero por strukturo 'io_channel'"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "MalÄustas magia numero por 'ext4 extent handle'"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Malbonas magia numero en ĉefbloko"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Dosiersistema revizio tro altas"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Provo de skribi al dosiersistemo kiu malfermiÄis kiel nurlega"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Malsukcesis legi grupajn priaĵojn"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Malsukcesis skribi grupajn priaĵojn"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Difekta gruppriaĵo: malbona bloko por bloka bitmapo"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Difekta gruppriaĵo: malbona bloko por i-noda bitmapo"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Difekta gruppriaĵo: malbona bloko por i-noda tabelo"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Malsukcesis skribi i-nodan bitmapon"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Malsukcesis legi i-nodan bitmapon"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Malsukcesis skribi blokan bitmapon"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Malsukcesis legi blokan bitmapon"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Malsukcesis skribi i-nodan tabelon"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Malsukcesis legi i-nodan tabelon"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Malsukcesis legi sekvan i-nodon"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Dosiersistemo havas neatenditan blokgrandon"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "EXT2-dosierujo estas difekta"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Provo de legi blokon el dosiersistemo rezultis en mallonga lego"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Provo de skribi blokon al dosiersistemo rezultis en mallonga skribo"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Dosierujo ne havas liberan spacon"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "I-noda bitmapo ne estas Åargata"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Bloka bitmapo ne estas Åargata"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Nevalida i-noda numero"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Nevalida bloka numero"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "**interna programmiso** en 'ext2fs_expand_dir()'"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Malsufiĉas spaco por konstrui proponata dosiersistemo"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Nevalida bloknumero doniÄis al 'ext2fs_mark_block_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Nevalida bloknumero doniÄis al 'ext2fs_unmark_block_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Nevalida bloknumero doniÄis al 'ext2fs_test_block_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Nevalida i-nodnumero doniÄis al 'ext2fs_mark_inode_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Nevalida i-nodnumero doniÄis al 'ext2fs_unmark_inode_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Nevalida i-nodnumero doniÄis al 'ext2fs_test_inode_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Provo de smurfi la finon de bloka bitmapo trans la vera fino"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Provo de smurfi la finon de i-noda bitmapo trans la vera fino"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "TroviÄis nevalida nerekta bloko"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "TroviÄis nevalida duoble nerekta bloko"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "TroviÄis nevalida trioble nerekta bloko"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Blokaj bitmapoj ne samas"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "I-nodaj bitmapoj ne samas"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Nevalida aÅ­ misformita aparatnomo"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Mankas i-noda tabelo en iu bloka grupo"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "La Ext2-ĉefbloko estas difekta"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Nevalida komuna bitnumero doniÄis al 'ext2fs_mark_generic_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Nevalida komuna bitnumero doniÄis al 'ext2fs_unmark_generic_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Nevalida komuna bitnumero doniÄis al 'ext2fs_test_generic_bitmap()'"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "TroviÄis tro multaj da simbolaj ligoj."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "La referencvoka funkcio ne kapablas trakti ĉi tiun kazon"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "La i-nodo estas el malbona bloko en la i-noda tabelo"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Dosiersistemo havas nesubtenata(j)n kapablo(j)n"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Dosiersistemo havas nesubtenata(j)n nurlega(j)n kapablo(j)n"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "En-eliga kanalo malsukcesis fari 'seek' je legado aÅ­ skribado"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Mankas sufiĉa memoro"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Nevalida argumento doniÄis al Ext2-biblioteko"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Malsukcesis asigni blokon en Ext2-dosiersistemo"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Malsukcesis asigni i-nodon en Ext2-dosiersistemo"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Ext2-i-nodo ne estas dosierujo"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Tro multaj referencoj en tabelo"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Dosiero ne troviÄis per 'ext2_lookup()'"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Dosiero estas malferma nurlege"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Ext2-dosieruja bloko ne troviÄis"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Ext2-dosierujo jam ekzistas"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Nerealigita funkcio en Ext2-biblioteko"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Nuligo petiÄis de uzanto"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Ext2-dosiero tro grandas"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Indikata kaÅprotokola aparato ne estas blokaparato"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "KaÅprotokola ĉefbloko ne troviÄis"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "KaÅprotokolo devas esti minimume 1024 blokoj"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Nesubtenata kaÅprotokola versio"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Eraro dum Åargo de ekstera kaÅprotokolo"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "KaÅprotokolo ne troviÄis"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Uja haketo ne subtenatas"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Nevalida numero de bloko de etenditaj atributoj"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Ne eblas krei dosiersistemon kun la petata nombro de i-nodoj"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "SnapÅoto de 'e2image' ne uziÄas"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Tro multe da rezervitaj gruppriaĵaj blokoj"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Regrandiga i-nodo estas difekta"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Provo de agordi blokan bitmapon kun mankanta nerekta bloko"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Sukceso"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Difekta datumbazo"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: En-eliga eraro"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Rigla eraro"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Mankas sufiĉa memoro"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Rikordo ekzistas"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Riglo ekzistas je aliaj Ålosiloj"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Nevalida parametro"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Rikordo ne ekzistas"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Skribo ne permesatas"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Ext2-dosieruja bloka listo vakas"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Provo de ÅanÄi blokasignon per nurlega blokiterilo"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "MalÄustas maginumero por 'ext4 extent saved path'"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "MalÄustas maginumero por 64-bita komuna bitmapo"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "MalÄustas maginumero por 64-bita bloka bitmapo"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "MalÄustas maginumero por 64-bita i-noda bitmapo"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "MalÄustas maginumero -- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "MalÄustas maginumero -- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "MalÄustas maginumero -- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "MalÄustas maginumero -- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "MalÄustas maginumero -- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "MalÄustas maginumero -- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "MalÄustas maginumero -- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Difekta ampleksa ĉapo"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Difekta ampleksa indekso"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Difekta amplekso"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Ampleksmapo ne havas liberan spacon"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "I-nodo ne uzas ampleksojn"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Malestas 'next'-amplekso"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Malestas 'previous'-amplekso"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Malestas 'up'-amplekso"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Malestas 'down'-amplekso"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Neniu aktuala nodo"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "tiu Ext2fs-operacio ne subtenatas"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Mankas spaco por enmeti amplekson en nodo"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Fendo rezultus en vaka nodo"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Amplekso ne troviÄis"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Operacio ne subtenatas por i-nodoj kiuj enhavas ampleksojn"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Ampleksa longo malvalidas"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "En-eliga kanalo ne subtenas 64-bitajn bloknumerojn"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+"Ne eblas kontroli se dosiersistemo estas muntita, ĉar mankas dosiero 'mtab'"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Dosiersistemo tro grandas por uzi arkaikajn bitmapojn"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: nevalida magia numero"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: aparato nune aktivas"
+
+#: lib/ext2fs/ext2_err.c:151
+#, fuzzy
+msgid "MMP: e2fsck being run"
+msgstr "MMP: 'fsck' rulas"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: bloknumero transpasas dosiersisteman gamon"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: spertas nekonatan operacion"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: dosiersistemo ankoraÅ­ uziÄas"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: malsukcesis malfermo kun 'O_DIRECT'"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "MalÄustas grando de blokgruppriaĵo"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Kontrolsumo de i-nodo ne konkordas kun i-nodo"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Kontrolsumo de i-noda bitmapo ne konkordas kun bitmapo"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Kontrolsumo de 'extent'-bloko ne konkordas kun bloko"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Dosieruja bloko ne havas spacon por kontrolsumo"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Kontrolsumo de dosieruja bloko ne konkordas kun dosieruja bloko"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Kontrolsumo de bloko de etenditaj atributoj ne konkordas kun bloko"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Kontrolsumo de ĉefbloko ne konkordas kun ĉefbloko"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Nekonata kontrolsuma algoritmo"
+
+#: lib/ext2fs/ext2_err.c:165
+#, fuzzy
+msgid "MMP block checksum does not match"
+msgstr "Kontrolsumo de MMP-bloko ne konkordas kun MMP-bloko"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ext2-dosiero jam ekzistas"
+
+#: lib/ext2fs/ext2_err.c:167
+#, fuzzy
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Kontrolsumo de i-noda bitmapo ne konkordas kun bitmapo"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+#, fuzzy
+msgid "Extended attribute has an incorrect hash"
+msgstr "Kontrolsumo de bloko de etenditaj atributoj ne konkordas kun bloko"
+
+#: lib/ext2fs/ext2_err.c:172
+#, fuzzy
+msgid "Extended attribute block has a bad header"
+msgstr "Nevalida numero de bloko de etenditaj atributoj"
+
+# ****************************************************************
+# *** La sekvaj mallongigoj preskaÅ­ ĉiuj uziÄas en la traduko. ***
+# ****************************************************************
+#: lib/ext2fs/ext2_err.c:173
+#, fuzzy
+msgid "Extended attribute key not found"
+msgstr "aetendita atributo"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+#, fuzzy
+msgid "Inode doesn't have inline data"
+msgstr "I-nodo ne uzas ampleksojn"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+#, fuzzy
+msgid "No free space in inline data"
+msgstr "Ampleksmapo ne havas liberan spacon"
+
+#: lib/ext2fs/ext2_err.c:179
+#, fuzzy
+msgid "Wrong magic number for extended attribute structure"
+msgstr "MalÄustas magia numero por strukturo 'ext2 file'"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+#, fuzzy
+msgid "Undo file corrupt"
+msgstr "Regrandiga i-nodo estas difekta"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:185
+#, fuzzy
+msgid "File system is corrupted"
+msgstr "Regrandiga i-nodo estas difekta"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+#, fuzzy
+msgid "The journal superblock is corrupt"
+msgstr "La Ext2-ĉefbloko estas difekta"
+
+#: lib/ext2fs/ext2_err.c:188
+#, fuzzy
+msgid "Inode is corrupted"
+msgstr "Regrandiga i-nodo estas difekta"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr ""
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr ""
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr ""
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr ""
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Malvalida bulea valoro"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Malvalida entjera valoro"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#: lib/support/plausible.c:118
+#, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr ""
+
+#: lib/support/plausible.c:121
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr ""
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr ""
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr ""
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr ""
+
+#: lib/support/plausible.c:199
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "KreiÄas normala dosiero %s\n"
+
+#: lib/support/plausible.c:202
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Malsukcesis malfermi %s: %s\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr ""
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s enhavas %s-dosiersistemon kun etikedo '%s'\n"
+
+#: lib/support/plausible.c:252
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s enhavas %s-dosiersistemon\n"
+
+#: lib/support/plausible.c:276
+#, fuzzy, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s enhavas %s-dosiersistemon\n"
+
+#, fuzzy
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr "dum skribado de kaÅprotokola ĉefbloko"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "'i_dir_acl' @F %Id, @s nulo.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr ""
+#~ "@i %i havas jesan densigan flagon en dosiersistemo sen subteno por "
+#~ "densigo. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "@A de @b %b por etenditaj atributoj. "
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", neuzitaj i-nodoj %u\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "KaÅprotokolaj kapabloj: "
+
+#~ msgid "Journal size: "
+#~ msgstr "KaÅprotokola grando: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "KaÅprotokola longo: %u\n"
+#~ "KaÅprotokola sekvenco: 0x%08x\n"
+#~ "KaÅprotokola komenco: %u\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "KaÅprotokola erarnumero: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "KaÅprotokola blokgrando: %u\n"
+#~ "KaÅprotokola longo: %u\n"
+#~ "KaÅprotokola unua bloko: %u\n"
+#~ "KaÅprotokola sekvenco: 0x%08x\n"
+#~ "KaÅprotokola komenco: %u\n"
+#~ "KaÅprotokola uzantnombro: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "KaÅprotokolaj uzantoj: %s\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "Malsukcesis malfermi %s\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Malvalida argumento por 'quotatype': %s\n"
diff --git a/po/es.gmo b/po/es.gmo
new file mode 100644
index 0000000..a3f46fb
--- /dev/null
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..48dfd61
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,9009 @@
+# Mensajes en español para e2fsprogs.
+# Copyright (C) 2014 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+#
+# Max de Mendizábal <max@upn.mx>, 2003, 2005.
+# Benno Schulenberg <benno@vertaalt.nl>, 2008, 2014.
+# Antonio Ceballos <aceballos@gmail.com>, 2014, 2015, 2016, 2017, 2018, 2019, 2021, 2022.
+#
+# Comienzo de un vocabulario (lista de palabras usadas aquí):
+# block --> bloque
+# bad block --> bloque dañado
+# inode --> nodo-i
+# bitmap --> mapa de bits
+# ignore --> descartar
+# extent --> «extent» TBC
+# journal -> fichero de transacciones
+# socket -> «socket» TBC
+# regular file -> fichero ordnario, normal TBC
+# checksum -> «checksum», suma de verificación TBC
+# lost+found -> lost+found
+# loop -> bucle
+# cluster -> TBD
+# profile -> «profile» TBC
+# profile file -> fichero «profile» TBC
+# ...
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs-1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-25 13:42+0200\n"
+"Last-Translator: Antonio Ceballos <aceballos@gmail.com>\n"
+"Language-Team: Spanish <es@tp.org.es>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Lokalize 1.0\n"
+
+# Ojo: "To ignore" no es ignorar sino "no tener en cuenta",
+# "pasar por alto", etc. Ya sé que "ignorar" se entiende, pero sólo
+# porque su mal uso está muy extendido. sv
+# ¿Qué tal "se descarta"? Me gustaría saber si hay algún glosario de
+# frases para traducir programas GNU, son cosas que deberían ser
+# estándar. mm
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "El bloque dañado %u está fuera del intervalo; se descarta.\n"
+
+# En el K&R se habla de nodo-i. ¿Cuáles son las razones a favor y en contra
+# de "nodo i" sobre "nodo-i"? sv
+# El plural. Pero está bien, adopto la convención K&R. mm
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "mientras se revisaba la salud del nodo-i de bloques dañados"
+
+# Yo pondría mejor "el nodo i de bloques dañados". No sé mucho sobre el
+# formato ext2, pero creo que es muy posible que haya un nodo-i especial
+# cuya tarea sea precisamente la de recordar cuáles son los bloques
+# dañados. Investigarlo en caso de duda. sv
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "mientras se leía el nodo-i de bloques dañados"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "mientras se intentaba abrir %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "mientras se intentaba abrir la tubería '%s'"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "mientras se leía una lista de bloques dañados desde un fichero"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "mientras se actualizaba el nodo-i de bloques dañados"
+
+# Solemos traducir Warning por Atención. sv
+# Ok, uniformizo. mm
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Atención: se encontró un bloque no válido %u en el nodo-i de bloques dañados. Limpiado.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "mientras se liberaba el fichero tdb dir_info"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Error al leer el bloque %lu (%s) mientras %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Error al leer el bloque %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Descartar el error"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Forzar la reescritura"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Error al escribir el bloque %lu (%s) mientras %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Error al escribir el bloque %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "bloques de directorio vacíos"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "mapa de directorios vacío"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "El bloque del directorio %u (#%d) está vacío en el nodo-i %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s fichero númerodebloques tamañodelbloque\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "¡Número inválido de bloques!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "No se puede reservar un búfer de bloques (tamaño=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "mapa de nodos-i de reconstrucción de «extents»"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Modo de empleo: %s disco\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "¡No está implementado el control de entrada/salida BLKFLSBUF! No se pueden vaciar los búfers.\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "leyendo el superbloque del fichero de transacciones\n"
+
+# Ojo: No es que se haya encontrado un superbloque que resulta que no es
+# válido, sino que no se ha encontrado ningún superbloque que sea válido,
+# que es distinto (a lo mejor no se ha encontrado ningún superbloque
+# en absoluto). Creo que la traducción debería cambiarse. sv
+# En efecto, tienes toda la razón. Corregido. mm
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: no se ha encontrado un superbloque válido en el fichero de transacciones\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: el fichero de transacciones es demasiado corto\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: bloques de commit rápido incorrectos\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: recuperando el fichero de transacciones\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: no se puede hacer la recuperación del fichero de transacciones en modo de sólo lectura\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "mientras se intentaba reabrir %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aatributo extendido"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aerror al asignar"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bbloque"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bmapa de bits"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccompresión"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Centra en conflicto con algún otro @b del sistema de ficheros"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "ddirectorio"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dborrado"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eentrada"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "ELa @e '%Dn' que está en %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fsistema de ficheros"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fpara el @i %i (%Q) es"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrupo"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hEl ÃRBOL-H del @i del @d"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "inodo-i"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Ino válido"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jfichero de transacciones"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Les un enlace"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mreclamado en múltiples ocasiones"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "ninválido"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "ohuérfano"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblema en"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qcuota"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "r@i raíz"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sdebería ser"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "udesacoplado"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vdispositivo"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zlongitud cero"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<El nodo-i NULO>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<El nodo-i de bloques dañados>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<El nodo-i de la cuota de usuario>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<El nodo-i de la cuota de grupo>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<El nodo-i del cargador de arranque>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<El nodo-i del directorio de desborrado>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<El nodo-i del descriptor de grupo>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<El nodo-i del fichero de transacciones>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Se ha reservado el nodo-i 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Se ha reservado el nodo-i 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "fichero normal"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "directorio"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "dispositivo de caracteres"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "dispositivo de bloque"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "tubería con nombre"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "enlace simbólico"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "«socket»"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tipo de fichero desconocido con modo 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "bloque indirecto"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "bloque doblemente indirecto"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "bloque triplemente indirecto"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "bloque de traducción"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "bloque #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "usuario"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "grupo"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "proyecto"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "tipo de cuota desconocido"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "mapa de nodos-i reclamados en múltiples ocasiones"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "error interno: no se ha encontrado el dup_blk para %llu\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "regresado del clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "Error interno: no se puede encontrar el registro de bloque EA para %llu"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Error interno: no se puede encontrar el registro de bloque EA %u"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "mientras se hace «hash» de la entrada con e_value_inum = %u"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "leyendo bloque de directorio"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "obteniendo el siguiente nodo-i para examinar"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "mapa de nodos-i usados"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "mapa de nodos-i de directorio"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "mapa de nodos-i de ficheros normales"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "mapa de bloques usados"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "mapa de bloques de metadatos"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "mapa de casefold de nodos-i"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "iniciando la exploración de los nodos-i"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "Paso 1"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "leyendo bloques indirectos del nodo-i %u"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "mapa de nodos-i dañados"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "el nodo-i está en el mapa de bloques dañados"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "mapa de nodos-i con 'imagic'"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "mapa de bloques reclamados en múltiples ocasiones"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "mapa de bloques de atributos extendidos"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): se esperaba %6lu, pero se han obtenido bloques físicos %6lu (número de bloques %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "mapa de bits de bloques"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "mapa de bits de nodos-i"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "tabla de nodos-i"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "Paso 2"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "El NLS está roto."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "No se puede continuar."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "mapa de bits de nodos-i pasados"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Pico de memoria"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Paso 3"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "mapa de bits de detección de bucles de nodos-i"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Paso 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Paso 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Error de asignación de memoria"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Error de asignación de memoria"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(sin cursor)"
+
+# Yo pondría mejor "Arreglar", ya que es una pregunta que hace que quedaría
+# mejor en forma impersonal. Fíjate que todos los demás verbos que siguen
+# están en infinitivo.
+# Cierto. mm
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Arreglar"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Borrar"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Reubicar"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Reservar"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Expandir"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Conectar a /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Crear"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Recuperar"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Truncar"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Borrar nodo-i"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Interrumpir"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Dividir"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Continuar"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Clonar los bloques reclamados en múltiples ocasiones"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Borrar fichero"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Eliminar mensajes"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Desvincular"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Borrar el índice del árbol-H"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Recrear"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Optimizar"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "Borrar bandera"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(NINGUNO)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "ARREGLADO"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "BORRADO"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "REUBICADO"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "RESERVADO"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "EXPANDIDO"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "RECONECTADO"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "CREADO"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "RECUPERADO"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "TRUNCADO"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "NODO-I BORRADO"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "INTERRUMPIDO"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "DIVIDIDO"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "CONTINUANDO"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "SE CLONARON LOS BLOQUES RECLAMADOS EN MÚLTIPLES OCASIONES"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "FICHERO BORRADO"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "SUPRIMIDO"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "DESVINCULADO"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "SE HA LIMPIADO EL ÃNDICE DEL ÃRBOL-H"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "SE CREARÃ DE NUEVO"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "SE OPTIMIZARÃ"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "BANDERA BORRADA"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "El mapa de bits de bloques para el grupo %g no está en el grupo. (bloque %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "El mapa de bits de nodos-i para el grupo %g no está en el grupo. (bloque %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"La tabla de nodos-i para el @g %g no está en el @g. (@b %b)\n"
+"ATENCIÓN: ES POSIBLE QUE HAYA UNA PÉRDIDA DE DATOS MUY GRAVE.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"El @S no se ha podido leer o no describe un @f ext2/ext3/ext4 válido.\n"
+"Si el @v es válido y contiene realmente un @f ext2/ext3/ext4\n"
+"(y no uno de intercambio, ufs u otra cosa), entonces el @S está\n"
+"corrompido; podría intentar ejecutar e2fsck con un @S alternativo:\n"
+" e2fsck -b 8193 <@v>\n"
+" o\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"El tamaño del @f (de acuerdo con el @S) es de %b @bs.\n"
+"El tamaño físico del @v es de %c @bs.\n"
+"¡Es probable que el @S o la tabla de particiones estén corruptos!\n"
+
+# "¡Puede ser que el @S, o la tabla de particiones, estén corruptos!\n"
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"En el @S el tamaño del @b = %b, el tamaño del fragmento = %c.\n"
+"Esta versión de e2fsck no tiene implementado el manejo de\n"
+"tamaños de fragmento distintos al del @b.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "El «blocks_per_group» del @S es %b y debería haber sido %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "El «first_data_block» del @S es %b y debería haber sido %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr "El @f no tiene un UUID; se generará uno.\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Nota: si varios bloques de mapas de bits (de nodos-i o de bloques)\n"
+"o parte de la tabla de nodos-i necesitan reubicación,\n"
+"es posible que primero quiera intentar ejecutar e2fsck con\n"
+"la opción '-b %S'. El problema podría estar únicamente en los\n"
+"descriptores del grupo de bloques primario, y los\n"
+"descriptores del grupo de bloques de respaldo podrían estar bien.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "El @S está corrupto. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Error al determinar el tamaño del @v físico: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "La cuenta @i en el @S es %i, @s %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "El Hurd no tiene implementada la opción de tipos de fichero.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@S tiene un @j @n (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "El @j externo tiene varios usuarios del @f (no implementado).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "No se ha encontrado un @j externo\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "El @j externo tiene un @S dañado\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "El @j externo no tiene implementado este @f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"El @S del @j del @f es de un tipo desconocido %N (no implementado).\n"
+"Es probable que su copia de e2fsck sea muy antigua y/o no tenga implementado\n"
+"este formato de @j.\n"
+"También es posible que el @S del @j esté corrupto.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "El @S del @j está corrupto.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "La bandera has_journal del @S está quitada, pero hay un @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "La bandera de recuperación del superbloque está puesta, pero no hay @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+"La bandera de recuperación del superbloque está limpia, pero el @j\n"
+"contiene información.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Borrar el @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "El @f tiene una(s) bandera(s) especial(es), pero es una revisión 0 del @f. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s @i @o %i (uid=%Iu, gid=%Ig, modo=%Im, tamaño=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@I %B (%b) encontrado en un @i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Ya se borró el %B (%b) encontrado en el @i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@i @o @I %i en el @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@i @I %i en la lista de nodos-i huérfanos.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "El @S del @j tiene puesta una bandera desconocida de sólo lectura.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "El @S del @j tiene puesta una bandera desconocida incompatible.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "La versión del @j no está implementada en este e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Moviendo el @j de /%s a un nodo-i oculto.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Error moviendo el @j: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Se encontraron campos V2 no válidos en el @j del @S\n"
+"(del V1 del @j).\n"
+"Borrando los campos que exceden la V1 del @j del @S...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Ejecutar el @j de todas formas"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"La bandera de recuperación no está puesta en el @S de respaldo,\n"
+"por eso se ejecutará de todas maneras el @j.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Respaldando la información del @j, el @i y el @b.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"El @f no tiene 'resize_inode' habilitado, pero 's_reserved_gdt_blocks'\n"
+"es %N; debería ser cero. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "El 'resize_inode' no está habilitado, pero el nodo-i de cambio del tamaño no es cero. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Cambio de tamaño de nodo-i no válido. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La última vez (%t,\tnow=%T)\n"
+"que se montó el superbloque es en el futuro.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La última vez (%t,\tnow = %T) que\n"
+"se escribió en el superbloque es en el futuro.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "La pista de superbloque para un superbloque externo debería ser %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Agregando la pista dirhash al sistema de ficheros\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "El «checksum» del descriptor de @g %g es %04x; debería ser %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "El descriptor de @g %g etiquetado como no inicializado no tiene activada esa funcionalidad.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "La cuenta de nodos-i no utilizados %b del descriptor de @g %g no es válida. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "El mapa de bits de bloque del último grupo no está inicializado. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "La transacción %i del fichero de transacciones estaba corrupta; se ha interrumpido la repetición.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "La bandera test_fs está puesta (y ext4 está disponible). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"La última hora de montaje del @S está en el futuro.\n"
+"\t(por menos de un día, probablemente debido a que el reloj del hardware está mal puesto)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"La última hora de escritura del @S está en el futuro.\n"
+"\t(por menos de un día, probablemente debido a que el reloj del hardware está mal puesto)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Los «checksums» de uno o más descriptores de @gs de @bs son inválidos. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Se pone la cantidad de nodos-i libres a %j (era %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Se pone la cantidad de bloques libres a %c (era %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Ocultando el %U @i de @q %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "El superbloque tiene un bloque MMP inválido. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "El superbloque tiene un número mágico de MMP inválido. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2(): %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc(): %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "El metadata_csum de superbloque reemplaza a uninit_bg; no pueden ponerse los dos bits a la vez."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "El «checksum» del @b MMP del @S no cuadra. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "@S de un @f de 64 bits necesita «extents» para acceder al disco entero. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg es demasiado grande. (%N, valor máx. %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "El «checksum» del @S externo @j no cuadra con el @S. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "El metadata_csum_seed de @S no es necesario sin metadata_csum."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Error al inicializar el contexto de cuota en la biblioteca de soporte: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Tamaño-i extra requerido en @S incorrecto (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Tamaño-i extra deseado en @S incorrecto (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "%U @i de @q %i no válido. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "El @S tendría demasiados nodos-i (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Las características resize_inode y meta_bg están activadas, pero no son\n"
+"compatibles. Resize_inode debería desactivarse. "
+
+# Prefiero el infinitivo, pero hay ocasiones en que el gerundio es
+# indispensable, como por ejemplo "verificando", "revisando", en donde
+# da la impresión de que en ese momento se están haciendo las cosas.
+# En este caso en particular, creo que es conveniente el gerundio. mm
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Paso 1: Verificando nodos-i, @bs y tamaños\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "El @r no es un @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "El @r tiene puesto el dtime (probablemente debido a una versión antigua del mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "El @i reservado %i %Q tiene un modo incorrecto. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "El @i %i @, tiene un dtime cero. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "El @i %i está en uso, pero tiene puesto dtime. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "El @i %i es un @d con @z. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "El @B de bloques del @g %g en el lugar %b @C.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "El @B de nodos-i del @g %g en el lugar %b @C.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "La tabla de nodos-i del @g %g en el lugar %b @C.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "El @B (%b) de bloques del @g %g está dañado. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "El @B (%b) de nodos-i del @g %g está dañado. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size es %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_@bs es %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "@I %B (%b) en @i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) se solapa con los metadatos del @f en el @i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "@i %i tiene @b(s) inválido(s). "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Demasiados @bs inválidos en el @i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "Número de bloque inválido (%b) en el nodo-i de bloques dañados. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "El nodo-i de bloques dañados tiene @b(s) inválido(s). "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "¡@b duplicado o dañado está en uso!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "El @b dañado %b se usa como bloque indirecto en el nodo-i de bloques dañados"
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"El nodo-i de bloques dañados probablemente haya sido corrompido.\n"
+"Probablemente se debería detener ahora el programa y ejecutar\n"
+"e2fsck -c para buscar bloques dañados en el @f.\n"
+
+# Muchas oraciones en pasiva en inglés quedan mejor en forma reflexiva
+# cuando se traducen.
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Si el @b está realmente dañado, el @f no se puede arreglar.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Se puede borrar este bloque de la lista de bloques dañados con la esperanza\n"
+"de que el bloque esté correcto. Pero no hay ninguna garantía.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "El @S primario (%b) está en la lista de @bs dañados.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "El bloque %b en los descriptores primarios de grupos está en la lista de @bs dañados\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Atención: el @S (%b) del grupo %g está dañado.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Atención: la copia de los descriptores del @g %g tiene un @b (%b) dañado.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "¿Será un error de programación? El @b #%b se reclama sin razón en el process_bad_block.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %N @b(s) contiguos en el @g de @b %g para %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A búfer de @b para reubicar %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Reubicando %s del @g %g de %b a %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Reubicando el @g %g de %s hacia %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Atención: no se puede leer el @b %b de %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Atención: no se puede escribir el @b %b para %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A de @B de @i (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A @b de @B (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A la información del enlace de la cuenta-i: %m\n"
+
+# array -> matriz
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A matriz de @b de @d: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Error mientras se exploraba el @i (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Error mientras se iteraba sobre los @bs en el @i %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Error al guardar la información de la cuenta del @i (@i=%i, cuenta=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Error al guardar la información del @b de @ds (@i=%i, @b=%b, núm=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Error al leer el @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "@i %i tiene puesta la bandera imagic. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"El fichero especial (dispositivo/«socket»/fifo/enlace símbolico) (@i %i)\n"
+"no es modificable o tiene la bandera 'append-only' (sólo añadir). "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+"El fichero especial (dispositivo/«socket»/fifo) (@i %i)\n"
+"tiene un tamaño distinto de cero. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "El @i del @j no está en uso, pero contiene información. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "el @j no es un fichero normal. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "el @i %i era parte de la lista de nodos-i @os. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Los nodos-i fueron parte de una lista enlazada que estaba huérfana y dañada. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A la estructura refcount (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Error al leer el @b del @a %b para el @i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "@i %i tiene un @b del @a %b dañado. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Error al leer el @b del @a %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "El @b del @a %b tiene una cuenta de referencia %r y @s %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Error al escribir el @b de @a %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "El @b del @a %b tiene h_@bs > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "@A la estructura de asignación de región de @a. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "el @b del @a %b está dañado (hubo una colisión en la reserva). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "el @b del @a %b está dañado (nombre no válido). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "el @b del @a %b está dañado (valor no válido). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "el @i %i es demasiado grande. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) provoca que el @d sea demasiado grande. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) provoca que el fichero sea demasiado grande. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) provoca que el enlace simbólico sea demasiado grande. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "el @i %i tiene la bandera INDEX_FL puesta en el @f sin el árbol-h implementado.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "@i %i tiene puesta la bandera INDEX_FL pero no es un @d.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "El @h %i tiene un nodo raíz no válido.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "El @h %i tiene una versión de hash no implementada (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "El @h %i utiliza una bandera incompatible para el nodo raíz del árbol-h.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "El @h %i tiene una profundidad (%N) muy grande\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"El @i del @b está dañado y tiene un @b indirecto (%b) que\n"
+"entra en conflicto con la metainformación del @f. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Falló la (re)creación del nodo-i de cambio de tamaño: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "El @i %i tiene un tamaño adicional (%IS) que es @n\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "El @a en el @i %i tiene una longitud de nombre (%N) que es @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "El @a en @i %i tiene un valor de desplazamiento (%N) que es @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "El @a en el @i %i tiene un valor de @b (%N) que es @n (debe ser 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "El @a en el @i %i tiene un valor de tamaño (%N) que es @n\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "El @a en el @i %i tiene un hash (%N) que es @n\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "El nodo-i %i está marcado como un %It pero parece ser un directorio.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Error mientras se leía el árbol de «@xs» en el @i %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Fallo al iterar los «extent» en el @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"El @i %i tiene un extent @n\n"
+"\t(@b lógico %c, @b físico @n %b, longitud %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"El @i %i tiene un «extent» @n\n"
+"\t(@b lógico %c, @b físico %b, longitud @n %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "El @i %i tiene la bandera EXTENTS_FL puesta en el @f sin «extents» implementado.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "el @i %i está en formato «extent», pero el @S no tiene la característica EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "el @i %i no tiene EXTENT_FL, pero está en formato «extents»\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "El enlace simbólico rápido %i tiene puesto EXTENT_FL. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"el @i %i tiene «extents» estropeados\n"
+"\t(@b lógico @n %c, @b físico %b, longitud %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "el @i %i tiene un modo de «extent» no válido (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Error al convertir el @B de @bs del «subcluster»: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "El @i de la @q no es un fichero normal. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "El @i de la @q no está en uso, pero contiene datos. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "El @i de la @q es visible para el usuario. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "El nodo-i de bloques dañados parece inválido. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"el @i %i tiene «extent» de longitud cero\n"
+"\t(@b lógico @n %c, @b físico %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "el @i %i parece que contiene basura. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "el @i %i pasa las comprobaciones, pero el «checksum» no cuadra con el @i. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "el @a del @i %i está dañado (hubo una colisión en la reserva). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"el bloque «extent» del @i %i pasa las comprobaciones, pero el «checksum» no concuerda con el «extent»\n"
+"\t(@b lógico %c, @b físico %b, longitud %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "el @b de @a %b del @i %i pasa las comprobaciones, pero el «checksum» no concuerda con el @b. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Nivel %N de nodo @x interior del @i %i:\n"
+"El comienzo lógico %b no casa con el comienzo lógico %c del siguiente nivel. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"el @i %i, fin de «extent», excede el valor permitido\n"
+"\t(@b lógico %c, @b físico %b, longitud %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "el @i %i tiene datos en línea, pero el @S no tiene la característica INLINE_DATA\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "el @i %i tiene la bandera INLINE_DATA_FL puesta en el @f pero no tiene capacidad de datos en línea.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "El bloque %b del @i %i está en conflicto con metadatos críticos; saltar comprobaciones de bloque.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "El @b %b del @i %i de @d debería estar en el @b %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "El @i %i del @d tiene un @x marcado como no inicializado en el @b %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"El @b lógico %b del @i %i (@b físico %c) viola las reglas de asignación de «cluster».\n"
+"Se corregirá en el paso 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "El @i %i tiene puesta la bandera INLINE_DATA_FL pero no se ha encontrado @a. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"El fichero especial (dispositivo/«socket»/fifo) (@i %i) tiene «extents»\n"
+"o tiene la bandera 'inline-data' (datos en línea). "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "El @i %i tiene cabecera de @x pero la bandera de datos en línea está puesta.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "El @i %i parece tener datos en línea pero la bandera @x está puesta.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "El @i %i parece tener mapa de @b pero datos en línea y la bandera @x está puesta.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "El @i %i tiene datos en línea y las banderas @x están puestas pero el i_block contiene basura.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "La lista de bloques defectuosos dice que el @i de dicha lista es defectuoso. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "@A estructura de asignación de la región de @x. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"El @i %i tiene una asociación de @z duplicada\n"
+"\t(@b lógico %c, @b físico @n %b, longitud %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "@A %N bytes de memoria para la lista de @i cifrados\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "el árbol de @x del @i %i podía ser más superficial (%b; podía ser <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "El @i %i del @f de «bigalloc» no puede asociarse a bloque. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "el @i %i tiene dañada la cabecera de @x. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "La(s) fecha(s) del @i %i posteriores a 2310-04-04 probablemente son anteriores a 1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i tiene un valor de @I @a @i %N.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "el @i %i tiene @n, @a, EA @i %N no tiene el indicador EA_INODE.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"EA @i %N para el padre @i %i no tiene el indicador EA_INODE.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "El @i %i tiene un @x marcado como no inicializado en el @b %c (longitud %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "@i %i tiene puesta la bandera casefold pero no es un directorio. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"@d %p tiene puesta la bandera casefold, pero\n"
+"la característica casefold no está activada. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "@i %i tiene puesta la bandera de cifrado pero no tiene @a de cifrado.\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "El @i %i cifrado tiene @a de cifrado corrupto.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "@h %i utiliza la versión de hash (%N), pero debería utilizar SipHash (6) \n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "@h %i utiliza SipHash, pero no debería. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Se ejecutan pasos adicionales para resolver los @bs reclamados por más de un @i...\n"
+"Paso 1B: Se vuelven a explorar para los @bs reclamados en múltiples ocasiones\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Bloque(s) reclamado(s) en múltiples ocasiones en @i %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Error mientras se exploraban los nodos-i (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A @B de @i (@i_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Error mientras se iteraba sobre los @bs en el @i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Error al ajustar la cuenta de referencia para el @b del @a %b (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Paso 1C: Explorando los directorios para buscar nodos-i con @bs reclamados en múltiples ocasiones\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Paso 1D: Reconciliando los @bs reclamados en múltiples ocasiones\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"El fichero %Q (@i #%i, fecha de modificación %IM)\n"
+" tiene %r @b(s) reclamado(s) en múltiples ocasiones, compartido(s) con %N fichero(s):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i #%i, fecha de modificación %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<metadatos del @f>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Hay %N nodos-i que contienen @bs reclamados en múltiples ocasiones.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr "Los @bs reclamados en múltiples ocasiones ya se reasignaron o se clonaron.\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "No se puede clonar el fichero: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Paso 1E: Optimizando los árboles @x\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Fallo al optimizar el árbol @x %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Optimizando los árboles @x: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Error interno: máxima profundidad de árbol «extent» demasiado grande (%b; esperada=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "El árbol @x del @i %i (nivel %b) podría ser más corto. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "El árbol @x del @i %i (nivel %b) podría ser más estrecho. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Paso 2: Verificando la estructura de @ds\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Número @n del @i para '.' en el @i del @d %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E tiene un @i @n #: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E tiene un @i %Di @D/no utilizado. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "@E @L a '.' "
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E apunta al @i (%Di) ubicado en un @b dañado.\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E @L al @d %P (%Di).\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "@E @L al @r.\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E contiene caracteres no válidos en el nombre.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Falta '.' en el @d @i %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Falta '..' en el @i del @d %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "La primera @e '%Dn' (@i=%Di) en el @i del @d %i (%p) @s '.'\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "La segunda @e '%Dn' (@i=%Di) en el @i del @d %i @s '..'\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "El i_faddr @F %IF, @s cero.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "El i_file_acl @F %If, @s cero.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "El i_size @F %Id, @s cero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "El i_frag @F %N, @s cero.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "El i_fsize @F %N, @s cero.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "El @i %i (%Q) tiene un modo @n (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "El @i del @d %i, %B, desplazamiento %N: el @d está dañado\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "El @i del @d %i, %B, desplazamiento %N: el nombre del fichero es muy largo\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "El @i %i del @d tiene un %B que no está reservado. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "La @e del @d '.' en el @i del @d %i no termina con NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "La @e del @d '..' en el @i %i del @d no termina con NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "El @i %i (%Q) es un @v de carácter @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "El @i %i (%Q) es un @v de @b @I.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "La @E está duplicada en la @e '.'.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "La @E está duplicada en la @e '..'.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Error interno: no se puede encontrar el dir_info para %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "La @E tiene un rec_len de %Dr y @s %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A estructura icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Error al iterar sobre los @bs del @d: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Error al leer el @b %b del @d (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Error al escribir el @b %b del @d (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A nuevo @b de @d para el @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Error al liberar el @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "La @e del @d para '.' en %p (%i) es grande.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "El @i %i (%Q) es un FIFO @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "El @i %i (%Q) es un «socket» @I.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Se pone el tipo de fichero para la @E a %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "La @E tiene un tipo de fichero incorrecto (era %Dt y @s %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "La @E tiene puesto el tipo de fichero.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "La @E tiene un nombre de @z.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "El enlace simbólico %Q (@i #%i) es @n.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "El @b del @a @F es @n (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "El @f contiene ficheros grandes, pero no tiene la bandera LARGE_FILE en el @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "Hay un @p el @h %d: %B no ha sido referenciado\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "Hay un @p el @h %d: %B ha sido referenciado dos veces\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "Hay un @en el @h %d: %B tiene un hash mínimo incorrecto\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "Hay un @p el @h %d: %B tiene un hash máximo incorrecto\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "El @h %d es @n (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "El @f tiene directorios grandes, pero no tiene la bandera LARGE_DIR en el @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "Hay un @p el @h %d (%q): el número del @b %b es incorrecto.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "Hay un @p el @h %d: el nodo raíz es @n.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "Hay un @p el @h %d: %B tiene un límite @n (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "Hay un @p el @h %d: %B tiene una cuenta @n (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "Hay un @p el @h %d: %B tiene una tabla de hash no ordenada\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "Hay un @p el @h %d: %B tiene una profundidad que no es válida (%N)\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "@E está duplicada. "
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E tiene un nombre de fichero no único.\n"
+"Se cambia el nombre a %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Se encontró una @e duplicada '%Dn'.\n"
+"\tSe marca %p (%i) para ser reconstruido.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "El i_blocks_hi @F %N, @s cero.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "@b inesperado en el @h %d (%q).\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E hace referencia al @i %Di del @g %g en el que _INODE_UNINIT está puesto.\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E hace referencia al @i %Di encontrado en la zona de nodos-i no utilizados del @g %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "El i_file_acl @F %N, @s cero.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "Hay un @p el @h %d: falla la suma de comprobación del nodo raíz.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "Hay un @p el @h %d: falla el «checksum» del nodo interno.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "El @i de @d %i, %B, desplazamiento %N: el @d no tiene «checksum».\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "el @i de @d %i, %B: el @d pasa las comprobaciones pero falla el «checksum».\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "El tamaño (%N) del @i de @d en línea %i debe ser múltiplo de 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Fallo al reparar el tamaño del @i de @d en línea %i.\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "@E cifrada es demasiado corta.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "@E cifrada hace referencia al @i no cifrado %Di.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "@E cifrada hace referencia al @i %Di, el cual difiere en la política de cifrado.\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "@E tiene caracteres UTF-8 no válidos en el nombre.\n"
+
+# '@E' o 'La @e', no 'La @E'. Ver: e2fsck/message.c:125
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "Nombre de fichero @E duplicado. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Paso 3: Revisando la conectividad de directorios\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "El @r no ha sido reservado. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "No hay espacio en el @d @l. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "El @d del @i %i está desconectado (estaba en %q)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "No se encontró /@l. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' en %Q (%i) es %P (%j) y debería ser %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "El /@l no existe o está dañado. No se puede reconectar.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "No se puede expandir /@l: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "No se puede reconectar %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Error mientras se intentaba encontrar /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block: %m mientras se intentaba crear el @d /@l.\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode: %m cuando se intentaba crear el @d /@l.\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m mientras se creaba un nuevo @b de @d.\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block: %m mientras se escribía el @b de @d para /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Error mientras se ajustaba la cuenta del @i en el @i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"No se puede arreglar al padre del @i %i: %m\n"
+"\n"
+
+# el padre
+# Perdón, no entiendo, se intenta arreglar AL padre, no EL padre de un directorio.
+# Hay alguna regla que se me escape? mm
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"No se puede arreglar al padre del @i %i: no se puede encontrar la @e al @d padre\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Error al crear el @d raíz (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Error al crear el @d /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "El @r no es un @d; se finaliza la operación.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "No se puede proceder sin un @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l no es un @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/@l tiene datos en línea\n"
+
+# Parece que habría que redactarlo como una orden: Coloque los ficheros perdidos en el directorio raíz
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"No se puede reservar espacio para /@l.\n"
+"Coloque ficheros perdidos en el directorio raíz"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"¡Espacio insuficiente para recuperar los ficheros perdidos!\n"
+"Saque datos fuera del @f y ejecute otra vez e2fsck.\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/@l está cifrado\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "Bucle recursivo @d del @i %i (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Paso 3A: Optimizando directorios\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Fallo al crear el iterador dirs_to_hash: %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Fallo al optimizar el directorio %q (%d): %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Optimizando directorios: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Paso 4: Revisando las cuentas de referencia\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "@i %i que tiene @z está @u. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "el @i %i está @u\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "La cuenta de referencia del @i %i es %Il, y @s %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"¡ATENCIÓN: ERROR DE PROGRAMACIÓN EN E2FSCK!\n"
+"\tO ALGÚN TARADO (USTED) ESTà REVISANDO UN SISTEMA DE FICHEROS MONTADO (VIVO).\n"
+"inode_link_info[%i] es %N, inode.i_links_count es %Il. ¡Y deberían ser el mismo!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "La cuenta de referencia del @a @i %i es %N, y @s %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "El @d excede el número máximo de enlaces, pero no hay característica DIR_NLINK en el @S.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "La cuenta de referencia del @d @i %i está puesta a desbordamiento pero podría ser el valor exacto %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Paso 5: Revisando el resumen de información de grupos\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "No está puesto el relleno al final del @B del @i. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "No está puesto el relleno al final del @B del @b. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "Diferencias del @B del @b: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "Diferencias del @B del @i: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "La cuenta de nodos-i libres es incorrecta para el @g #%g (%i, contados=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "La cuenta de directorios es incorrecta para @g #%g (%i, contados=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "La cuenta de nodos-i libres es incorrecta (%i, contados=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "La cuenta de @bs libres es incorrecta para el @g #%g (%b, contados=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "La cuenta de @bs libres es incorrecta (%b, contados=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "ERROR DE PROGRAMACIÓN: los puntos finales del %B (%b, %c) del @f (#%N) no coinciden con los puntos finales del @B calculados (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Error interno: el final del bitmap (%N) no tiene sentido\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Error al copiar el reemplazo del @i @B: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Error al copiar el reemplazo del @b @B: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "El(los) @b(s) del @g %g está(n) en uso, pero el grupo está etiquetado como BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "El(los) nodo(s)-i del @g %g está(n) en uso, pero el grupo está etiquetado como INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "El @B del @i del @g %g no concuerda con el «checksum».\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "El @B del @b del @g %g no concuerda con el «checksum».\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Vuelva a crear el @j"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "Actualizar la información de cuota para el tipo de cuota %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Error al poner la información de «checksum» del grupo de bloques: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Error al escribir la información del sistema de ficheros: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Error al hacer efectivas las escrituras en el dispositivo de almacenamiento: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Error al escribir la información de cuota para el tipo de cuota %N: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "¡Código de error no previsto (0x%x)!\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "SE IGNORA"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "en move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Memoria utilizada: %lu, tiempo transcurrido: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "tamaño del nodo-i=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "mientras se iniciaba la exploración de los nodos-i"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "mientras se comenzaban a explorar los nodos-i"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "mientras se exploraban los nodos-i"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "mientras se llamaba a ext2fs_block_iterate para el nodo-i %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "mientras se llamaba a ext2fs_adjust_ea_refcount2 para el nodo-i %u"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Truncando"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "Borrando"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Modo de empleo: %s [-panyrcdfktvDFV] [-b superbloque] [-B tamaño_del_bloque]\n"
+"\t\t[-l|-L fichero_de_bloques_dañados] [-C fd] [-j fichero_de_transacciones_externo]\n"
+"\t\t[-E opciones_extendidas] [-z fichero_de_deshacer] dispositivo\n"
+
+# La coma tras 'fuerza la revisión' me parece que es peor
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Ayuda de emergencia:\n"
+" -p Reparación automática (sin hacer preguntas)\n"
+" -n No se hacen cambios al sistema de ficheros\n"
+" -y Contesta \"sí\" a todas las preguntas\n"
+" -c Busca los bloques dañados y los agrega a la\n"
+" lista de bloques dañados\n"
+" -f Fuerza la revisión aun si el sistema de ficheros\n"
+" está etiquetado como limpio\n"
+
+# Por coherencia con el mensaje del modo de empleo:
+# fichero-de-transacciones-externo -> fichero_de_transacciones_externo
+# tamañodelbloque -> tamaño_del_bloque
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Genera más mensajes de diagnóstico\n"
+" -b superbloque Utiliza el superbloque alternativo\n"
+" -B tamañodelbloque Fuerza el tamaño del bloque cuando busca el superbloque\n"
+" -j fichero_de_transacciones_externo\n"
+" Indica el lugar en donde está el fichero\n"
+" de transacciones externo\n"
+" -l fichero_de_bloques_dañados\n"
+" Agrega a la lista de bloques dañados\n"
+" -L fichero_de_bloques_dañados\n"
+" Pone la lista de bloques dañados\n"
+" -z fichero_de_deshacer\n"
+" Crea un fichero de deshacer\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u ficheros (%0d.%d%% no contiguos), %llu/%llu bloques\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u nodo-i utilizado (el %2.2f%% de %u)\n"
+msgstr[1] ""
+"\n"
+"%12u nodos-i utilizados (el %2.2f%% de %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u fichero no contiguo (%0d.%d%%)\n"
+msgstr[1] "%12u ficheros no contiguos (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u directorio no contiguo (%0d.%d%%)\n"
+msgstr[1] "%12u directorios no contiguos (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " número de nodos-i con bloques ind/dind/tind: %u/%u/%u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " Histograma de las profundidades de «extents»: "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu bloque usado (el %2.2f%% de %llu)\n"
+msgstr[1] "%12llu bloques usados (el %2.2f%% de %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u bloque dañado\n"
+msgstr[1] "%12u bloques dañados\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u fichero grande\n"
+msgstr[1] "%12u ficheros grandes\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u fichero regular\n"
+msgstr[1] ""
+"\n"
+"%12u ficheros regulares\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u directorio\n"
+msgstr[1] "%12u directorios\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u dispositivo de caracteres\n"
+msgstr[1] "%12u dispositivos de caracteres\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u dispositivo de bloque\n"
+msgstr[1] "%12u dispositivos de bloque\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifos\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u vínculo\n"
+msgstr[1] "%12u vínculos\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u enlace simbólico"
+msgstr[1] "%12u enlaces simbólicos"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u vínculo simbólico rápido)\n"
+msgstr[1] " (%u vínculos simbólicos rápidos)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u zócalo\n"
+msgstr[1] "%12u zócalos\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fichero\n"
+msgstr[1] "%12u ficheros\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "mientras se determinaba si %s está montado."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "¡Atención! %s está montado.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "¡Atención! %s está en uso.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s está montado.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s está en uso.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"No se puede continuar; se finaliza.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"¡¡ATENCIÓN!! El sistema de ficheros está montado. Si se continúa se PROVOCARÃN\n"
+"GRAVES daños al sistema de ficheros.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "¿De verdad quiere continuar?"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "revisión interrumpida.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " contiene un sistema de ficheros con errores"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " no fue desmontado limpiamente"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " las características del superbloque primario difieren de las de la copia de seguridad"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " ha sido montado %u veces sin ser revisado"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " tiene la hora de la última revisión al sistema de ficheros en el futuro"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " ya lleva %u días sin ser revisado"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "se ignora el intervalo de comprobación, se pone broken_system_clock\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", se fuerza la revisión.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: limpio, %u/%u ficheros, %llu/%llu bloques"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (comprobación aplazada: está funcionando con baterías)"
+
+# O "revisión después del siguiente montaje".
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (comprobación en el siguiente montaje)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (comprobación después de %ld montajes)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERROR: no se puede abrir /dev/null (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Versión de EA no válida.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "Tamaño incorrecto del «buffer» de lectura anticipada.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Opción extendida desconocida: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Las opciones extendidas deben estar separadas por comas, y pueden tomar un argumento\n"
+"que se ajusta con un signo de igual ('='). Las opciones extendidas válidas son:\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<ea_version (1 o 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<tamaño de búfer>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Error de sintaxis en el fichero de configuración de e2fsck (%s, línea #%d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Error al validar el descriptor de ficheros %d: %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "Información de consistencia no válida en el descriptor de ficheros"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Sólo se puede especificar una de las opciones -p/-a, -n o -y."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "La opción -t no está implementada en esta versión de e2fsck.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "No es posible resolver '%s'"
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "Las opciones -n y -D se excluyen mutuamente."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "Las opciones -n y -c se excluyen mutuamente."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Las opciones -n y -l/-L se excluyen mutuamente."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Las opciones -D y -E fixes_only se excluyen mutuamente."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Las opciones -E bmap2extent y -D fixes_only se excluyen mutuamente."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "mientras se abría %s para su vaciado"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "mientras se intentaba vaciar %s"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Las opciones -c y -l/-L no pueden ser utilizadas simultáneamente.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG \"%s\" no es un entero\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Argumento no numérico inválido para -%c (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "El intervalo de la protección contra montaje múltiple (MMP) es de %u segundos y el tiempo total de espera es de %u segundos. Por favor, espere...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "mientras se revisaba el bloque MMP"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Si sabe con certeza que el sistema de ficheros no está en uso en ningún\n"
+"modo, ejecute 'tune2fs -f -E clear_mmp %s'\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "mientras se leía el bloque MMP"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Sobrescribiendo el sistema de ficheros existente; puede deshacerse mediante el comando:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "mientras se intentaba borrar %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "mientras se intentaba configurar el fichero de anulación\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "¡Error: la versión de la biblioteca ext2fs está caduca!\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "mientras se intentaba inicializar el programa"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tAl emplear %s, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "se necesita una terminal para hacer las reparaciones interactivas"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s intentando los bloques de respaldo...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "El superbloque es inválido,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Los descriptores del grupo parecen dañados..."
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s mientras se utilizaban los bloques de respaldo"
+
+# Ojo: No es que se haya encontrado un superbloque que resulta que no es
+# válido, sino que no se ha encontrado ningún superbloque que sea válido,
+# que es distinto (a lo mejor no se ha encontrado ningún superbloque
+# en absoluto). Creo que la traducción debería cambiarse. sv
+# En efecto, tienes toda la razón. Corregido. mm
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: volviendo al superbloque original\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"La versión del sistema de ficheros es, en apariencia, muy superior para esta\n"
+"versión de e2fsck. (O el superbloque del sistema de ficheros está dañado)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "¿Esta podría ser una partición de longitud cero?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Se debe tener acceso %s al sistema de ficheros o ser root\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "¿Es posible que no exista o que sea un dispositivo de intercambio?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "¿Sistema de ficheros montado o abierto en exclusiva por otro programa?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "¿Es posible que no exista el dispositivo?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"El disco está protegido contra escritura; utilice la opción -n para\n"
+"hacer una revisión de sólo lectura al dispositivo.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: Se intenta cargar el superbloque a pesar de los errores...\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "¡Consiga una versión más moderna de e2fsck!"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "mientras se revisaba el fichero de transacciones para %s"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "No se puede proceder con la comprobación del sistema de ficheros"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Atención: se omitirá la recuperación del fichero de transacciones debido a que se está haciendo una revisión de sólo lectura del sistema de ficheros.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "no es posible poner las banderas de superbloque en %s\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Se ha encontrado un error en el fichero de transacciones en %s\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Fichero de transacciones corrupto en %s\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "mientras se recuperaba el fichero de transacciones de %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s tiene características no implementadas:"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s tiene una codificación no implementada: %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s mientras se leía el nodo-i de los bloques dañados\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Esto no se ve muy bien, pero se intentará continuar...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Creando el fichero de transacciones (%d bloques): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " Hecho.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** el fichero de transacciones se ha regenerado ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "finalizado"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: se cancela e2fsck.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Se reinicia e2fsck desde el principio...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "mientras se reajusta el contexto"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** ERRORES CORREGIDOS DEL SISTEMA DE FICHEROS *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: El sistema de ficheros se ha modificado.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** EL SISTEMA DE FICHEROS FUE MODIFICADO *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** REINICIE EL SISTEMA *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** ATENCIÓN: El sistema de ficheros todavía tiene errores ***********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "tT"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " ('t' aplica 'sí' a todo) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "¡cancelado!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "sí a todo\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "sí\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "no\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"¿%s? no\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"¿%s? sí\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "sí"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: bloque(s) no válido(s) de mapas de bits para %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "leyendo los mapas de bits del nodo-i y del bloque"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "mientras se intentaban leer los mapas de bits para %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "escribiendo los mapas de bits del bloque y del nodo-i"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "mientras se reescribían los mapas de bits de bloques y de nodos-i para %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: INCONSISTENCIA INESPERADA; EJECUTE fsck MANUALMENTE.\n"
+"(i.e., sin las opciones -a o -p)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Memoria utilizada: %lluk/%lluk (%lluk/%lluk), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Memoria utilizada: %lluk, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "fecha: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "tiempo transcurrido: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "mientras se leía el nodo-i %lu en %s"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "mientras se escribía el nodo-i %lu en %s"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "INCONSISTENCIA INESPERADA: se está modificando el sistema de ficheros mientras fsck está corriendo.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "hecho \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Modo de empleo: %s [-b tamaño_del_bloque] [-i fichero_de_entrada] [-svwnfBX]\n"
+" [-c bloques_a_la_vez] [-d factor_de_retardo_entre_lecturas] [-e max_bloques_dañados]\n"
+" [-p núm_pasos] [-t patrón_de_prueba [-t patrón_de_prueba [...]]]\n"
+" dispositivo [bloque_final [bloque_inicial]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Las opciones -n y -w se excluyen mutuamente.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% hecho, %s transcurrido. (%d/%d/%d errores)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Probando con un patrón aleatorio: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Probando con el patrón 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "durante la búsqueda"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valor extraño (%ld) en do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "durante el ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "mientras se comenzaba la iteración en la lista de bloques dañados"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "mientras se reservaban los búferes"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Revisando los bloques del %lu al %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Revisando los bloques dañados en modo de sólo lectura\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Se están revisando los bloques dañados (prueba de sólo lectura): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Demasiados bloques dañados, se interrumpe la prueba\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Se están revisando los bloques dañados en modo de lectura-escritura\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Del bloque %lu al %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Leyendo y comparando: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Revisando los bloques dañados en modo lectura-escritura no destructivo\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Revisando los bloques dañados (prueba de lectura-escritura no destructiva)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Se interceptó una interrupción, se limpia todo\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "durante la prueba de escritura de datos del bloque %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s está montado; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "los bloques dañados se fuerzan de todas formas. Se cree que /etc/mtab esté incorrecto.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "¡No es seguro ejecutar los bloques dañados!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s está aparentemente en uso por el sistema; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "los bloques dañados se fuerzan de todas formas.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s inválido - %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "El número máximo de bloques dañados es demasiado grande %u - el máximo es %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "no se puede reservar memoria para el patrón_de_prueba - %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Sólo un máximo de un patrón_de_prueba puede ser especificado en modo sólo lectura"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "El patrón_de_prueba aleatorio no está permitido en modo sólo lectura"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Tamaño de bloque no válido: %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "bloques_a_la_vez no válido: %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"No se puede determinar el tamaño del dispositivo; se debe especificar\n"
+"de forma manual\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "mientras se intentaba determinar el tamaño del dispositivo"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "último bloque"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "primer bloque"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "bloque inicial no válido (%llu): debe ser menos que %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "bloque final no válido (%llu): debe ser un valor de 32 bits"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "cuando se creaba la lista de bloques dañados en memoria"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "fichero de entrada - formato incorrecto"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "cuando se añadía a la lista de bloques dañados en memoria"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Paso terminado, se encontraron %u bloques dañados. (%d/%d/%d errores)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Modo de empleo: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p proyecto] [-v versión] ficheros...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "proyecto incorrecto - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versión incorrecta - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "mientras se intentaba ver el estado del fichero %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "mientras se estaban leyendo las banderas en %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Las banderas de %s están puestas como "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "mientras se ponían las banderas en %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "La versión de %s está puesta como %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "mientras se estaba poniendo la versión en %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "El proyecto de %s está puesto como %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "mientras se estaba poniendo el proyecto en %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "No se puede reservar la variable de ruta en chattr_dir_proc"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= es incompatible con - y +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Se debe usar '-v', =, - o +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "mientras se leía el nodo-i %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "mientras se expandía el directorio"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "mientras se enlazaba \"%s\""
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "mientras se escribía el nodo-i %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "mientras se listaban los atributos de \"%s\""
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "mientras se abría el nodo-i %u"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "mientras se leía xattrs para el nodo-i %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "mientras se reservaba memoria"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "mientras se estaban leyendo los atributos \"%s\" de \"%s\""
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "mientras se escribía el atributo \"%s\" del nodo-i %u"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "mientras se cerraba el nodo-i %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "mientras se reservaba al nodo-i \"%s\""
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "mientras se creaba el nodo-i \"%s\""
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "mientras se creaba el enlace simbólico \"%s\""
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "mientras se buscaba \"%s\""
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "mientras se creaba el directorio \"%s\""
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "mientras se abría \"%s\" para copiar"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "mientras se cambiaba el directorio de trabajo a \"%s\""
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "mientras se exploraba el directorio \"%s\""
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "mientras se intentaba lstat con \"%s\""
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "mientras se creaba el fichero especial \"%s\""
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "fallo de malloc"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "mientras se intentaba leer el enlace \"%s\""
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "el tamaño del enlace simbólico ha aumentado entre lstat() y readlink()"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "mientras se escribía el enlace simbólico \"%s\""
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "mientras se escribía el fichero \"%s\""
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "mientras se creaba el directorio \"%s\""
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "mientras se cambiaba de directorio"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "ignorar la entrada \"%s\""
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "mientras se estaba poniendo el nodo-i para \"%s\""
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "mientras se ponían los xattrs para \"%s\""
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "mientras se guardaban los datos de nodo-i"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "mientras se copiaban xattrs en el directorio raíz"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Modo de empleo: %s [-bfghimxV] [-o superblock=<número>] [-o blocksize=<número>] dispositivo\n"
+
+# Usado quince mensajes más allá.
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "bloques"
+
+# Usado quince mensajes más allá.
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "«clusters»"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupo %lu: (Bloques "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " csum 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (ESPERADO 0x%04x)"
+
+# Se completa con uno de los dos mensajes siguientes.
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " Superbloque %s en "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "primario"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "de respaldo"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", descriptores de grupo en "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Se reservaron los bloques GDT en "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Descriptor de grupo en "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Mapa de bits de bloques en "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", csum 0x%04x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Mapa de bits de nodos-i en "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Tabla de nodos-i en "
+
+# El primer %s de sustituye con "bloques" o "clusters", el segundo con nada o "\n".
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u %s libres, %u nodos-i libres, %u directorios%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nodos-i sin usar\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Bloques libres: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Nodos-i libres: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "mientras se imprimía la lista de bloques dañados"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Bloques dañados: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "mientras se leía el nodo-i del fichero de transacciones"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "mientras se abría el nodo-i del fichero de transacciones"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "mientras se leía el superbloque del fichero de transacciones"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "¡El número mágico del superbloque del fichero de transacciones es inválido!\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "mientras se leía el superbloque del fichero de transacciones"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "No se pueden encontrar los números mágicos del superbloque del fichero de transacciones"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "no se ha podido reservar un búfer MMP\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "leyendo el bloque MMP %llu desde '%s'\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "¡No se puede reservar memoria para analizar sintácticamente las opciones!\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parámetro de superbloque no válido: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parámetro de tamaño del bloque no válido: %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Las opciones especificadas son incorrectas: %s\n"
+"\n"
+"Las opciones extendidas deben estar separadas por comas y pueden tomar un\n"
+"\targumento que se ajusta con un signo de igual ('=').\n"
+"\n"
+"Las opciones extendidas válidas son:\n"
+"\tsuperblock=<número_del_superbloque>\n"
+"\tblocksize=<tamaño_del_bloque>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tSe emplea %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "No se pudo encontrar un superbloque válido para el sistema de ficheros.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: característica MMP no habilitada.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "mientras se intentaban leer los mapas de bits '%s'\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** ¡Ejecute e2fsck ahora!\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Modo de empleo: %s [ -r|-Q ] [ -f ] [ -b superbloque ] [ -B tamaño_de_bloque ] dispositivo fichero_de_imagen\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I dispositivo fichero_de_imagen\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o desplz_orig ] [ -O desplz_dest ] fs_orig [ fs_dest ]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "mientras se reservaba un búfer"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Escribiendo el bloque %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "error al escribir el bloque %llu"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "error en generic_write()"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Error: el tamaño de la cabecera es mayor que wrt_size\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "No se puede reservar el búfer del encabezado\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "mientras se escribía el superbloque"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "mientras se escribía la tabla de nodos-i"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "mientras se escribía el mapa de bits de bloques"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "mientras se escribía el mapa de bits de nodos-i"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Bloque de directorio corrupto %llu: rec_len incorrecto (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Bloque de directorio corrupto %llu: name_len incorrecto (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu bloques (%d%%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Copiando "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Parar ahora destruirá el sistema de ficheros; interrumpa otra vez si está seguro\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s restante a %.2f MB/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "error al leer el bloque %llu"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Copiados %llu / %llu bloques (%d%%) in %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "a %.2f MB/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "mientras se reservaba una tabla l1"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "mientras se reservaba una caché l2"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Atención: Todavía hay tablas en la caché mientras esta se está poniendo: se perderán datos, por lo que la imagen podría no ser válida.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "mientras se reservaba ext2_qcow2_image"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "mientras se inicializaba ext2_qcow2_image"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Error de programación: ¡se han creado múltiples bloques con cuenta de referencia secuencial!\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "mientras se reservaba el mapa de bits de bloques"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "mientras se reservaba el mapa de bits de bloques de «scramble»"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Explorando nodos-i...\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "No se puede reservar el búfer de bloque"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "mientras se obtenía el nodo-i siguiente"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "mientras se iteraba sobre el nodo-i %u"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "No se pueden instalar imágenes en bruto ni qcow2"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "error mientras se leían los mapas de bits"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "mientras se abría el fichero de dispositivo"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "mientras se restauraba la tabla de la imagen"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "la opción -a solo puede utilizarse con imágenes en bruto o QCOW2."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "la opción -b solo puede utilizarse con imágenes en bruto o QCOW2."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "Solo se permiten desplazamientos con imágenes en bruto."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Solo se permite el modo de movimiento con imágenes en bruto."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "El modo de movimiento requiere el modo de todos los datos."
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "comprobando si está montado"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Ejecutar e2image en un sistema de ficheros montado para lectura y escritura puede dar\n"
+"como resultado una imagen inconsistente que no servirá para depurar.\n"
+"Utilice la opción -f si realmente desea hacer eso.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "¡La imagen QCOW2 no puede escribirse en la salida estándar!\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "No puede examinarse la salida\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "La imagen (%s) está comprimida\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "La imagen (%s) está cifrada\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "La imagen (%s) está corrupta\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "mientras se intentaba convertir la imagen qcow2 (%s) a imagen en bruto (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "La opción -c solo está implementada en el modo en bruto\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "La opción -c no funciona cuando se escribe en la salida estándar\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "mientras se reservaba check_buf"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "La opción -p solo está implementada en el modo en bruto\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d bloques ya contenían los datos que había que copiar\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Modo de empleo: %s -r dispositivo\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: no se puede abrir %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: no se puede buscar al superbloque\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: error leyendo el superbloque\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: no es un sistema de ficheros ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Atención: la etiqueta es muy larga, se trunca.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: de nuevo, no se puede encontrar al superbloque\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: error al escribir el superbloque\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Modo de empleo: e2label dispositivo [nuevabandera]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Modo de empleo: %s [-f] [-h] [-n] [-o desplazamiento] [-v] [-z fich_deshacer] <fichero de transacciones> <sistema de ficheros>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "El superbloque del sistema de ficheros no concuerda con el fichero de deshacer.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "El UUID no concuerda.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "La hora del último montaje no concuerda.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "La hora de la última escritura no concuerda.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "El contador de escritura del tiempo de vida no concuerda.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "mientras se leía el superbloque del sistema de ficheros."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "mientras se obtenía el superbloque"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "El «checksum» del superbloque del fichero de deshacer no concuerda.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "desplazamiento no válido - %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "No se escribirá en un fichero de deshacer mientras se esté reproduciendo.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "mientras se abría el fichero de deshacer `%s'\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "mientras se leía el fichero de deshacer"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: No es un fichero de deshacer.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: El «checksum» de la cabecera no concuerda.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Cabecera del fichero de deshacer corrupta.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Tamaño del bloque de deshacer demasiado grande.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Tamaño del bloque de deshacer demasiado pequeño.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: El fichero de deshacer tiene puesta una característica desconocida.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Error mientras se determinaba si %s está montado."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo solo debería ejecutarse sobre un sistema de ficheros no montado"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "mientras se abría `%s'"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "el desplazamiento especificado es demasiado grande"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "mientras se leían las claves"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: número mágico de clave incorrecto en %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: error de «checksum» en bloque de clave en %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: el bloque %llu es demasiado largo."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "mientras se obtenía el bloque %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "error de «checksum» en el bloque %llu del sistema de ficheros (deshacer bloque %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "mientras se escribía el bloque %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Fichero de deshacer corrupto; ¡ejecute e2fsck AHORA!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "Error de ES durante la repetición; ¡ejecute e2fsck AHORA!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Registro de deshacer incompleto; ejecute e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Modo de empleo: findsuper dispositivo [bytesporsaltar [principio (en kb)]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "bytesporsaltar debe ser un número, no %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "bytesporsaltar debe ser un múltiplo del tamaño del sector\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "principio debe ser un número, no %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "principio debe ser positivo, no %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "se comienza en %llu, con incrementos de %u bytes\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] probablemente superbloque escrito en el superbloque del fichero\n"
+"\tde transacciones ext3; por lo tanto, comienzo/fin/grupo incorrecto\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "depsplaz_oct comienzo_oct fin_oct bloqs_sf blqtam grp mkfs/hora_mount sb_uuid etiq\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: se finaliza con el error número %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "ATENCIÓN: no se puede abrir %s: %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "ATENCIÓN: formato incorrecto en la línea %d de %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"ATENCIÓN: El /etc/fstab no contiene el campo passno fsck.\n"
+"\tSe intentará hacer un truco, pero se debería arreglar el \n"
+"\tfichero /etc/fstab tan pronto como sea posible.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: no se encontró\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: espera: ¿¡¿No hay más procesos hijos?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Atención... %s para el dispositivo %s que finalizó con la señal %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: el estatus es %x, y nunca debió haber sucedido.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Se finaliza con %s (estado de salida %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Error %d mientras se ejecutaba fsck. %s para %s\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Los tipos de sistemas de ficheros pasados con -t deben llevar el prefijo\n"
+"'no' o '!' o todos o ninguno.\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "No se puede reservar memoria para los tipos de sistema de ficheros\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: se ignora línea incorrecta en /etc/fstab: montaje «bind» con número de rango fcsk distinto de cero\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: no se puede verificar %s: fsck.%s no se encuentra\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Revisando todos los sistemas de ficheros.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--esperando-- (paso %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Modo de empleo: fsck [-AMNPRTV] [ -C [ fd ] ] [-t tipo_de_sf]\n"
+" [opciones_de_sf] [sistema_de_ficheros ...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: demasiados dispositivos\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: demasiados argumentos\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Montando solo para lectura.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Se permite a los usuarios reservar todos los bloques. ¡Es peligroso!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Por favor, ejecute 'e2fsck -fy %s'.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: se está montando solo para lectura sin recuperar el fichero de transacciones\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Hay que recuperar el fichero de transacciones; hace falta ejecutar `e2fsck -E journal_only'.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: No está contemplado escribir en el fichero de transacciones.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Atención: se está montando un sistema de ficheros sin comprobar; se recomienda ejecutar e2fsck.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Atención: se ha llegado al número máximo de montajes; se recomienda ejecutar e2fsck.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Atención: se ha llegado al tiempo límite de una comprobación; se recomienda ejecutar e2fsck.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Se han detectado huérfanos; se recomienda ejecutar e2fsck.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Se han detectado errores; es preciso ejecutar e2fsck.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Modo de empleo: %s [-RVadlpv] [ficheros...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Mientras se leían las banderas en %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Mientras se leía el proyecto en %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Mientras se leía la versión en %s"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "No se puede reservar la variable de ruta en lsattr_dir_proc\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Modo de empleo: %s [-c|-l nombre-del-fichero] [-b tamaño-del-bloque] [-C tamaño-del-«cluster»]\n"
+"\t[-i bytes-por-nodo-i] [-I tamaño-del-nodo-i] -J opciones-de-fichero-de-transacciones]\n"
+"\t[-G tamaño-del_grupo_flex] [-N número-de-nodos-i] [-d directorio-raíz]\n"
+"\t[-m porcentaje-de-bloques-reservados] [-o SO-creador]\n"
+"\t[-g bloques-por-grupo] [-L etiqueta-de-volumen] [-M último-directorio-montado]\n"
+"\t[-O característica[,...]] [-r revisión-del-sf] [-E opción-extendida{,...]]\n"
+"\t[-t tipo-del-sf] [-T tipo-de-uso ] [-U UUID] [-e comportamiento_con_errores][-z fichero_deshacer]\n"
+"\t[-jnqvDFSV] dispositivo [número-de-bloques]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Ejecutando orden: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "mientras se intentaba ejecutar '%s'"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "mientras se procesaba la lista de bloques dañados del programa"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "El bloque %d en el área del descriptor primario del superbloque/grupo está dañado.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Los bloques del %u al %u deben estar correctos para poder construir un sistema de ficheros.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Finalizando...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Atención: los descriptores de respaldo del superbloque/grupo en el bloque %u\n"
+"\tcontienen bloques dañados.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "mientras se marcaban los bloques dañados como utilizados"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "mientras se escribían los nodos-i reservados"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Escribiendo las tablas de nodos-i: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"No se pueden escribir %d bloques en la tabla de nodos-i comenzando en %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "hecho \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "mientras se creaba el directorio raíz"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "mientras se leía el nodo-i raíz"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "mientras se establecía el dueño del nodo-i raíz"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "mientras se creaba /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "mientras se revisaba /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "mientras se expandía /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "mientras se ponía el nodo-i de bloques dañados"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Se agotó la memoria cuando se borraban los sectores %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Atención: no se puede leer el bloque 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Atención: no se puede borrar el sector %d: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "mientras se partía el tamaño del fichero de transacciones"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "mientras se inicializaba el superbloque del fichero de transacciones"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Se rellena con ceros el dispositivo del fichero de transacciones: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "mientras se inicializaba con ceros el dispositivo del fichero de transacciones (bloque %llu, cuenta %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "mientras se escribía el superbloque del fichero de transacciones"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Se está creando un sistema de ficheros con %llu bloques de %dk y %u nodos-i\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Atención: hay %llu bloques sin usar.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Etiqueta del sistema de ficheros=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Tipo de SO: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Tamaño del bloque=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Tamaño del «cluster»=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Tamaño del fragmento=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u bloques, anchura de stripe=%u bloques\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u nodos-i, %llu bloques\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu bloques (%2.2f%%) reservados para el superusuario\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Primer bloque de datos=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Propietario del directorio raíz=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Número máximo de bloques del sistema de ficheros=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grupos de bloques\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grupo de bloques\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u bloques por grupo, %u «clusters» por grupo\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u bloques por grupo, %u fragmentos por grupo\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u nodos-i por grupo\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID del sistema de ficheros: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Respaldos del superbloque guardados en los bloques: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s requiere '-O 64bit'\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "'%s' debe estar antes de 'resize=%u'\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "desc_size no válido: '%s'\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "La semilla «hash» no es válida: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Desplazamiento no válido: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "mmp_update_interval no válido: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Número de superbloques de respaldo no válido: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Parámetro de «stride» no válido: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parámetro stripe-width no válido: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Parámetro de variación de tamaño no válido: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "El máximo de la variación de tamaño debe ser mayor que el tamaño del sistema de ficheros.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "El cambio de tamaño en línea no es posible en sistemas de archivos de revisión 0\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "root_owner no válido: '%s'\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "La codificación no es válida: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Las opciones especificadas son incorrectas: %s\n"
+"\n"
+"Las opciones extendidas deben estar separadas por comas, y pueden tomar un\n"
+"\targumento que se ajusta con un signo de igual ('=').\n"
+"\n"
+"Las opciones extendidas válidas son:\n"
+"\tmmp_update_interval=<intervalo>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<longitud de la zancada, en bloques>\n"
+"\tstripe-width=<«stride» de RAID * discos de datos, en bloques>\n"
+"\toffset=<desplazamiento para crear el sistema de ficheros>\n"
+"\tresize=<máximo de variación de tamaño, en bloques>\n"
+"\tpacked_meta_blocks=<0 para desactivar, 1 para activar>\n"
+"\tlazy_itable_init=<0 para desactivar, 1 para activar>\n"
+"\tlazy_journal_init=<0 para desactivar, 1 para activar>\n"
+"\troot_owner=<uid del directorio raíz>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<codificación>\n"
+"\tencoding_flags=<banderas>\n"
+"\tquotatype=<tipo(s) de cuota para activar>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Atención: El parámetro «stripe-width» de RAID %u no es un múltiplo par del parámetro «stride» %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "error: Indicador de codificación no válido: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "error: Debe especificarse explícitamente una codifiación cuando se pasan las banderas de codificación\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Error de sintaxis en el fichero de configuración de mke2fs (%s, línea #%d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Se puso una opción no válida para el sistema de ficheros: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Se puso una opción de montaje no válida: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"El fichero mke2fs.conf no define el tipo de sistema de ficheros %s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Probablemente sea necesario instalar un fichero mke2fs.conf actualizado.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Interrumpiendo...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Atención: el fs_type %s no está definido en mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "No se puede reservar memoria para la nueva RUTA.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "No se puede inicializar correctamente el perfil (error: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "tamaño del bloque inválido - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Atención: el tamaño del bloque %d no se puede utilizar en muchos sistemas.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "tamaño del «cluster» no válido - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "'-R' está en desuso; utilice '-E' en su lugar"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "comportamiento de errores incorrecto - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Número no válido de bloques por grupo"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "los bloques por grupo deben ser un múltiplo de 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Número no válido para el tamaño de flex_bg"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "el tamaño de flex_bg debe ser una potencia de 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "el tamaño de flex_bg (%lu) debe ser menor o igual que 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "proporción de nodos-i inválida %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "tamaño de los nodos-i inválido - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "¡Atención: la opción -K está en desuso y no debería utilizarse nunca más. Utilice la opción extendida '-E nodiscard' en su lugar!\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "en malloc para fichero_de_bloques_dañados"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Atención: la etiqueta es demasiado larga; se trunca a '%s'\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "el porcentaje de bloques reservados es inválido - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "número de los nodos-i inválido - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "mientras se reservaba la cadena de fs_feature"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "nivel de revisión incorrecto - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "mientras se intentaba crear la revisión %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "La opción -t solo puede utilizarse una vez"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "La opción -T solo puede utilizarse una vez"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "mientras se intentaba abrir el dispositivo del fichero de transacciones %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"El tamaño del bloque del dispositivo del fichero de transacciones (%d) es\n"
+"menor que el tamaño del bloque mínimo %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Utilizando el tamaño de bloque del dispositivo del fichero de transacciones: %d\n"
+
+# The specified number of blocks is invalid.
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "bloques no válidos '%s' en el dispositivo '%s'"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "sistema de ficheros"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "El fichero %s no existe y no se ha especificado ningún tamaño.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Creando el fichero ordinario %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "mientras se intentaba determinar el tamaño del sistema de ficheros"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"No se puede determinar el tamaño del dispositivo; se deberá especificar\n"
+"explícitamente el tamaño del sistema de ficheros\n"
+
+# Se informó que -> Se informó de que
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Se informó de que el tamaño del dispositivo es cero. Es posible que se haya\n"
+"\tespecificado una partición no válida o que la tabla de particiones\n"
+"\tno haya sido releída después de ejecutar fdisk debido a que una \n"
+"\tpartición modificada está ocupada o en uso. Es necesario reiniciar\n"
+"\tpara poder releer la tabla de particiones.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "El sistema de ficheros es más grande que el tamaño aparente del dispositivo."
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "Fallo al analizar sintácticamente la lista de tipos de sf\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "El HURD no tiene implementada la opción de tipos de fichero.\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "El HURD no tiene implementada la opción huge_file.\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "El HURD no tiene implementada la opción metadata_csum.\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "El HURD no tiene implementada la opción ea_inode.\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "mientras se intentaba determinar el tamaño del sector del hardware"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "mientras se intentaba determinar el tamaño del sector físico"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "mientras se establecía el tamaño de bloque; demasiado pequeño para el dispositivo\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Atención: el tamaño de bloque especificado %d es menor que el tamaño de sector físico del dispositivo %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Tamaño del dispositivo (0x%llx bloques) %s demasiado grande para expresarse\n"
+"\ten 32 bits utilizando un tamaño de bloque de %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Tamaño del dispositivo (0x%llx bloques) %s demasiado grande para crear\n"
+"\tun sistema de ficheros utilizando un tamaño de bloque de %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "resolución de fs_types para mke2fs.conf: "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Características del sistema de ficheros no disponibles con la revisión 0 de los sistemas de ficheros\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Superbloques dispersos no disponibles con la revisión 0 de los sistemas de ficheros\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Fichero de transacciones no implementado para la revisión 0 de los sistemas de ficheros\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "el porcentaje de bloques reservados es inválido - %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "Los «extents» DEBEN estar activados para un sistema de ficheros de 64 bits. Pase -O extents para rectificar.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "El tamaño de «cluster» no puede ser menor que el tamaño de bloque.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "para especificar un tamaño de «cluster» hace falta la característica «bigalloc»"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "atención: no se puede obtener la geometría del dispositivo para %s\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "el alineamiento de %s está desplazado en %lu bytes.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Esto puede provocar un rendimiento muy bajo; se sugiere (re)particionar.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s tiene capacidad DAX pero el tamaño actual %u de bloque difiere del tamaño %u de página del sistema, por lo que el sistema de ficheros no admitirá DAX.\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "los bloques de %d bytes son muy grandes para el sistema (máx %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Atención: los bloques de %d bytes son muy grandes para el sistema\n"
+"(máx %d): continuación forzada\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Sugerencia: utilice un núcleo de Linux >= 3.18 para disponer de una mejor estabilidad de los metadatos y de suma de comprobación del fichero de transacciones.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Codificación de nombre de fichero desconocida en el perfil: %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Banderas de codificación desconocidas en el perfil: %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Atención: desplazamiento especificado sin un tamaño explícito del sistema de ficheros.\n"
+"Se está creando un sistema de ficheros con %llu bloques,\n"
+"pero esto podría no ser lo que usted desea.\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "los nodos-i de %d octetos son demasiado pequeños para cuota de proyecto"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "No se puede disponer de la característica «bigalloc» sin la característica «extents»"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Las características resize_inode y meta_bg no son compatibles.\n"
+"No pueden estar activadas las dos a la vez.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"Atención: los sitemas de ficheros «bigalloc» con un tamaño de «cluster»\n"
+"mayor que 16 veces el tamaño de bloque se consideran experimentales\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "el cambio de tamaño en línea de los bloques reservados no está implementado para los sistemas de ficheros que no están esparcidos"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "la cuenta de bloques por grupo está fuera del intervalo"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "La característica flex_bg no está activada, por lo que no puede especificarse el tamaño de flex_bg"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "tamaño incorrecto del nodo-i %d (mín %d/máx %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "los nodos-i de %d octetos son demasiado pequeños para datos en línea; especifique un tamaño mayor"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "los nodos-i de 128 bytes no pueden manejar fechas posteriores a 2038 y están en desuso\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "demasiados nodos-i (%llu), ¿aumentar el ratio de los nodos-i?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "demasiados nodos-i (%llu), especifique menos que 2^32 nodos-i"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"el tamaño_de_nodos_i (%u) * número_de_nodos_i (%u) es demasiado\n"
+"\tgrande para un sistema de ficheros con %llu bloques; especifique\n"
+"\tun ratio mayor de nodos-i (-i) o un menor número de nodos-i (-N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Descartando los bloques del dispositivo: "
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "fallo - "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "mientras se inicializaba el contexto de cuota"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "mientras se escribían los nodos-i de la cuota"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "comportamiento de errores incorrecto en el perfil - %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "en malloc para parámetros_dispersos_de_android"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "mientras se ajustaba el superbloque"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Los «extents» no están activados. Es posible calcular la suma de comprobación de los árboles «extent» de ficheros, no de los mapas de bloques. No activar los «extents» reduce la cobertura de las sumas de comprobación de metadatos. Pase -O «extents» para rectificar.\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "No está activado que se admitan sistemas de ficheros de 64 bits. Los campos más grandes ofrecidos por esta característica permiten la suma de comprobación más potente. Pase -O 64bit para rectificar.\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "La característica metadata_csum_seed requiere la característica metadata_csum.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "El descarte ha sido correcto y devolverá 0s - se salta el borrado de la tabla de nodos-i\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "sistema operativo desconocido - %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Reservando las tablas de grupo: "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "mientras se intentaba reservar las tablas del sistema de ficheros"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "mientras se desmarcaban los bloques dañados"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tmientras se convertía el mapa de bits de «subcluster»"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "mientras se calculaba la sobrecarga"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s puede corromperse aún más por reescritura de superbloque\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "mientras se inicializaba a cero el bloque %llu al final del sistema de ficheros"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "mientras se reservaban los bloques para el cambio de tamaño en línea"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "fichero de transacciones"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Añadiendo el fichero de transacciones al dispositivo %s: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tmientras se intentaba añadir el fichero de transacciones al dispositivo %s"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "hecho\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Se omite la creación del fichero de transacciones en modo solo-super\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Creando el fichero de transacciones (%u bloques): "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tmientras se intentaba crear el fichero de transacciones"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Error mientras se activaba la característica de protección de montaje múltiple."
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "La protección de montaje múltiple está activada con un intervalo de actualización de %d segundos.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "Copiando ficheros al dispositivo: "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "mientras se poblaba el sistema de ficheros"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Escribiendo superbloques y la información contable del sistema de ficheros: "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "mientras se escribía y se cerraba el sistema de ficheros"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"hecho\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "mientras se inicializaba a cero el bloque %llu para fichero gigante"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "El desplazamiento de la partición de %llu (%uk) bloques no es compatible con el tamaño %u del «cluster».\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Los ficheros gigantes se rellenarán con ceros.\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Creando %lu fichero(s) gigante(s) "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "con %llu bloques cada uno"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "mientras se creaba el fichero gigante %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Modo de empleo: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Modo de empleo: %s dispositivo...\n"
+"\n"
+"Este programa muestra la información de la partición de cada dispositivo.\n"
+"Por ejemplo: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "No se puede abrir %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "No se puede obtener la geometría de %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "No se puede obtener el tamaño de %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d inicio=%8d tamaño=%8lu fin=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Esta operación requiere un systema de ficheros recién comprobado.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Por favor, ejecute e2fsck -f sobre el sistema de ficheros.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Por favor, ejecute e2fsck -fD sobre el sistema de ficheros.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Modo de empleo: %s [-c cuenta-máxima-de-montajes] [-e comportamiento-de-errores] [-f] [-g grupo]\n"
+"\t[-i intervalo[d|m|w]] [-j] [-J opciones-del-fichero-de-transacciones] [-l]\n"
+"\t[-m porcentaje-de-bloques-reservados] [-o [^]opciones-de-montaje[,...]]\n"
+"\t[-r número-de-bloques-reservados] [-u usuario] [-C número-de-montajes]\n"
+"\t[-L etiqueta-de-volumen] [-M último-directorio-montado]\n"
+"\t[-O [^]característica[,...]] [-Q opcions_de-cuota]\n"
+"\t[-E opción-extendida[,...]] [-T última-fecha-de-revisón] [-U UUID]\n"
+"\t[-I nuevo-tamaño-de-nodo-i] [-z fichero-deshacer] dispositivo\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "¡No se encontró el superbloque del fichero de transacciones!\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "mientras se intentaba abrir el fichero de transacciones externo"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s no es un dispositivo con fichero de transacciones.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"El superbloque del fichero de transacciones está corrupto;\n"
+"nr_users es demasiado grande (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+"No se encontró el UUID del sistema de ficheros en el fichero de\n"
+"transacciones del dispositivo.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"No se puede localizar el dispositivo del fichero de transacciones. NO se eliminó\n"
+"Utilice la opción -f para eliminar el dispositivo del fichero de transacciones perdido.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Fichero de transacciones eliminado\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "mientras se leían los mapas de bits"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "mientras se borraba el nodo-i del fichero de transacciones"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "mientras se escribía el nodo-i del fichero de transacciones"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(¡y reinicie después!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Después de ejecutar e2fsck, por favor, ejecute `resize2fs %s %s"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Por favor, ejecute `resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "' para activar el modo de 64 bits.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "' para desactivar el modo de 64 bits.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"ATENCIÓN: no se ha podido confirmar la capacidad del núcleo para metadata_csum_seed.\n"
+" Se requiere Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "No se puede desactivar la característica '%s' del sistema de ficheros.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "El ajuste de la característica '%s' del sistema de ficheros no está implementado.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La bandera 'has_journal' sólo puede ser borrada cuando el sistema de\n"
+"ficheros no está montado o está montado en modo de sólo lectura.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"La bandera 'needs_recovery' está puesta. Por favor ejecute e2fsck antes\n"
+"de deactivar la bandera 'has_journal'.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"La característica 'sparse_super' no se puede activar\n"
+"en sistemas de ficheros que tengan la característica meta_bg activada.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"La caracterísitca de protección de montaje múltiple no puede\n"
+"ponerse si el sistema de ficheros está montado o es\n"
+"de solo lectura.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Se ha activado la protección de montaje múltiple con un intervalo de actualización de %ds.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"La característica de montaje múltiple no se puede\n"
+"desactivar si el sistema de ficheros es de solo lectura.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "Error mientras se leían los mapas de bits\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "El número mágico en el bloque MMP no cuadra. esperado: %x, real: %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "mientras se leía el bloque MMP."
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Podría tardarse un rato en desactivar el índice del directorio en un sistema de ficheros con suma de comprobación."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "¡No se puede desactivar el índice_de_directorio en un sistema de ficheros montado!\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Borrar la bandera flex_bg provocaría que el sistema de ficheros se\n"
+"volviera inconsistente.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La característica 'huge_file' sólo puede ser borrada cuando el sistema de\n"
+"ficheros no está montado o está en modo de sólo lectura.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Podría tardarse un poco en activar la suma de comprobación."
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "¡No puede activarse metadata_csum en un sistema de ficheros montado!\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Los «extents» no están activados. Puede calcularse la suma de comprobación del árbol «extent» de ficheros, no de mapas de bloques. No activar los «extents» reduce la cobertura de la suma de comprobación de metadatos. Ejecute otra vez con -O «extent» para rectificar.\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "No está activado que se admitan sistemas de ficheros de 64 bits. Los campos más grandes ofrecidos por esta característica permiten la suma de comprobación más potente. Ejecute resize2fs -b para rectificar.\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "Podría tardarse un rato en desactivar la suma de comprobación."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "¡No se puede desactivar metadata_csum en un sistema de ficheros montado!\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "¡No se puede activar uninit_bg en un sistema de ficheros montado!\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "¡No se puede desactivar uninit_bg en un sistema de ficheros montado!\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "¡No se puede activar el modo de 64 bits cuando está montado!\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "¡No se puede desactivar el modo de 64 bits cuando está montado!\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "No se puede activar la característica del proyecto; el tamaño del nodo-i es demasiado pequeño.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Atención: la opción '^quota' deja sin efecto los argumentos '-Q'.\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "La característica casefold sólo puede activarse cuando el sistema de ficheros no está montado.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"La característica 'metadata_csum_seed' solo se puede activar\n"
+"en sistemas de ficheros que tengan activada la característica meta_csum.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"El UUID ha cambiado desde la activación de metadata_csum. Debe desmontarse el \n"
+"sistema de ficheros para que puedan reescribirse sin peligro todos los metadatos \n"
+"y casen con el nuevo UUID.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "Podría tardarse un poco en recalcular las sumas de comprobación."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "El sistema de ficheros ya tiene un fichero de transacciones.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tmientras se intentaba abrir el fichero de transacciones en %s\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Creando un fichero de transacciones en el dispositivo %s: "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "mientras se agregaba un sistema de ficheros al fichero de transacciones en %s"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Creando el nodo-i del fichero de transacciones: "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tmientras intentaba crear el fichero de transacciones"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "No se puede activar la cuota del proyecto; el tamaño del nodo-i es demasiado pequeño.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "mientras se inicializaba el contexto de cuota en la biblioteca de soporte"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "mientras se actualizaban los límites de cuota (%d)"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "mientras se escribía el fichero de cuota (%d)"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "mientras se borraba el fichero de cuota (%d)"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Las opciones de cuota especificadas no son correctas.\n"
+"\n"
+"Las siguientes opciones de cuota válidas están disponibles (deben separarse por comas):\n"
+"\t[^]usr[cuota]\n"
+"\t[^]grp[cuota]\n"
+"\t[^]prj[cuota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "No se puede analizar sintácticamente el especificador de fecha/hora: %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "cuenta de montajes incorrectos - %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nombre del gid/grupo incorrecto - %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "intervalo incorrecto - %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "proporción de bloques reservados incorrecta - %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "-o solo puede especificarse una vez"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "-O sólo se puede especificar una vez"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "cuenta de bloques reservados incorrecta - %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nombre de uid/usuario incorrecto - %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "tamaño de nodo-i no válido - %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "El tamaño de nodo-i debe ser potencia de dos - %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval demasiado grande: %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Se pone el intervalo de actualización de protección de montaje múltiple a %lu segundo\n"
+msgstr[1] "Se pone el intervalo de actualización de protección de montaje múltiple a %lu segundos\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Se pone el indicador de error del sistema de ficheros para forzar fsck.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "«Stride» de RAID no válido: %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "«stripe-width» de RAID no válido: %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algoritmo «hash» no válido: %s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Poniendo el algoritmo «hash» predeterminado a %s (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "No se puede alterar la condificación existente\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "La codificación no es válida: %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "Se pone la condificación '%s'\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "Se ponen encoding_flags a '%s' \n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Las opciones especificadas son incorrectas.\n"
+"\n"
+"Las opciones extendidas deben estar separadas por comas y pueden tomar un\n"
+"\targumento que se ajusta con un signo de igual ('=').\n"
+"\n"
+"Las opciones extendidas válidas son:\n"
+"\tclear_mmp\n"
+"\thash_alg=<algoritmo «hash»>\n"
+"\tmount_opts=<opciones de montaje extendidas predeterminadas>\n"
+"\tmmp_update_interval=<intervalo de actualización mmp en segundos>\n"
+"\tstride=<tamaño de fragmento por disco RAID, en bloques>\n"
+"\tstripe_width=<«stride» de RAID * discos de datos, en bloques>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<condificación>\n"
+"\tencoding_flags=<banderas>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "Fallo mientras se leía el mapa de bits del nodo-i\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "Fallo leyendo el mapa de bits del bloque\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "bloques por ser movidos"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Fallo reservando el mapa de bits del bloque al incrementar el tamaño de nodo-i\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "No hay espacio suficiente para aumentar el tamaño de nodo-i \n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Fallo mientras se reservaban los bloques para el cambio de tamaño de nodo-i \n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Error al cambiar el tamaño del nodo-i.\n"
+"Ejecute e2undo para deshacer los cambios del sistema de ficheros. \n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Si se sabe con certeza que el sistema de ficheros no está en uso en ningún\n"
+"modo, ejecute 'tune2fs -f -E clear_mmp {device}'\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"El número mágico del bloque MMP es incorrecto. Trate de arreglarlo ejecutando:\n"
+"'e2fsck -f %s'\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "No se puede modificar el dispositivo de un fichero de transacciones.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "El tamaño del nodo-i ya es %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "No es posible reducir el tamaño del nodo-i\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Tamaño incorrecto del nodo-i %lu (máx %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Podría tardarse un rato en cambiar el tamaño de los nodos-i."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Atención: el fichero de transacciones está sucio. Quizá quiera reproducirlo así:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"después ejecute otra vez esta orden. De lo contrario, podrían perderse los cambios\n"
+"al recuperar el fichero de transacciones.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Recuperando el fichero de transacciones.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Se pone la cuenta de montajes máxima a %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Se pone la cuenta de montajes actual a %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Se pone el comportamiento de errores a %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Se pone el gid de los bloques reservados a %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "el intervalo entre revisiones es demasiado grande (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Se pone el intervalo entre revisiones en %lu segundos\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Se pone el porcentaje de bloques reservados a %g%% (%llu bloques)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "la cantidad de bloques reservados es demasiado grande (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Se pone la cantidad de bloques reservados a %llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"El sistema de ficheros ya tiene superbloques dispersos.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"La característica de superbloques dispersos no se puede activar\n"
+"en sistemas de ficheros que tengan la característica meta_bg activada.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"La bandera de superbloques dispersos está puesta. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"No es posible quitar la bandera de superbloques dispersos.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Se pone la hora de la última revisión al sistema de ficheros a %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Se pone el uid de los bloques reservados a %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Error al utilizar clear_mmp. Debe utilizarse con -f\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "La característica de cuota sólo puede cambiarse cuando el sistema de ficheros no está montado.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "No se puede cambiar el UUID de este sistema de ficheros porque tiene puesta la bandera de la característica nodosi_estables.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Podría tardarse un rato en establecer el UUID en este sistema de ficheros."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "El UUID solo puede cambiarse cuando el sistema de ficheros no está montado.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Si solo utiliza núcleos más recientes que v4.4, ejecute 'tune2fs -O metadata_csum_seed' y ejecute otra vez esta orden.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Formato del UUID no válido\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Hace falta actualizar el superbloque del fichero de transacciones.\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "El tamaño de nodo-i solo puede cambiarse cuando el sistema de ficheros no está montado.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"No es posible cambiar el tamaño de nodo-i en sistemas de ficheros que tengan\n"
+"la característica flex_bg activada.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Se pone el tamaño de nodo-i %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "Fallo mientras se cambiaba el tamaño de nodo-i\n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Configurando el tamaño de «stride» a %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Configurando la anchura de «stripe» a %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Se ponen las opciones de montaje extendidas predeterminadas a '%s'\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<procediendo>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "¿Continuar de todas formas (o esperar %d segundos antes de proceder)? (s,N) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "¿Continuar de todas formas? (s,N) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "Se fuerza de todas formas mke2fs. Esperemos que /etc/mtab sea incorrecto.\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "¡No se hará un %s aquí!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "Se fuerza de todas formas mke2fs.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "¡No se puede reservar memoria para la revisión sintáctica de las opciones del fichero de transacciones!\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"No se puede encontrar el dispositivo del fichero de transacciones correspondiente a %s\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Se especificaron opciones incorrectas para el fichero de transacciones.\n"
+"\n"
+"Las opciones del fichero de transacciones deben estar separadas por comas\n"
+"y pueden tener un argumento que se pone con un signo de igual ('=').\n"
+"\n"
+"Las opciones válidas para el fichero de transacciones son:\n"
+"\tsize=<tamaño del fichero de transacciones en megabytes>\n"
+"\tdevice=<dispositivo del fichero de transacciones>\n"
+"\tlocation=<localización del fichero de transacciones>\n"
+"\n"
+"El tamaño del fichero de transacciones debe estar entre 1024 y 10240000 bloques del sistema de ficheros.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"El sistema de ficheros es demasiado pequeño para un fichero de transacciones\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"El tamaño del fichero de transacciones solicitado total es de %d bloques;\n"
+"debería estar entre 1024 y 10240000 bloques. Se aborta.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"El tamaño total del fichero de transacciones es muy grande para el sistema de ficheros.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Este sistema de ficheros se revisará automáticamente cada %d montajes o\n"
+"%g días, lo que suceda primero. Utilice tune2fs -c o -i para cambiarlo.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Modo de empleo: %s [-d] [-p fichero-pid] [-s ruta-socket] [-T retardo]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n núm] [-s ruta-socket]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "argumentos incorrectos"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "conexión"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "escritura"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "número de lecturas"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "la longitud de la respuesta es incorrecta"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "el demonio uuidd ya está corriendo con pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "No se puede crear el «socket» unix de flujo: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "No se puede asignar el «socket» unix %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "No se puede escuchar por el «socket» unix %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Error al leer del cliente, longitud = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operación %d, número entrante = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "UUID con hora generado: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "UUID aleatorio generado: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "UUID con hora generado %s y el UUID siguiente\n"
+msgstr[1] "UUID con hora generado %s y los %d UUIDs siguientes\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "%d UUIDs generados:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Operación no válida %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Número incorrecto: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Error al invocar al demonio uuidd (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s y el UUID siguiente\n"
+msgstr[1] "%s y los %d UUIDs siguientes\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Lista de UUIDs:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Longitud de respuesta del servidor inesperada %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "No se ha podido matar uuidd que corre con pid %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Se ha matado uuidd que corría con pid %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Modo de empleo: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Volcado de «extent»:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNúm=%llu, Tamaño=%llu, Cursor=%llu, Ordenado=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Modo de empleo: %s [-d banderas_de_depuración] [-f] [-F] [-M] [-P] [-p] dispositivo [-b|-s|[nuevo-tamaño] [-S RAID-«stride»] [-z fichero-deshacer]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Extendiendo la tabla de nodos-i"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Reubicando bloques"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Revisando la tabla de nodos-i"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Actualizando las referencias a los nodos-i"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Moviendo la tabla de nodos-i"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "¿¡¿Paso desconocido?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Comienza el paso %d (máx = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"No está totalmente probada la función de cambio de tamaño de los sistemas de ficheros «bigalloc». ¡Prosiga\n"
+"bajo su cuenta y riesgo! Utilice la opción «force» si desea seguir adelante de todos modos.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "mientras se abría %s"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "mientras se estaba obteniendo información del estado de %s"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Por favor ejecute antes 'e2fsck -f %s'.\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Tamaño mínimo estimado del sistema de ficheros: %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "El nuevo tamaño no es válido: %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "El nuevo tamaño es demasiado grande para poder expresarse en 32 bits\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "El nuevo tamaño da lugar a demasiados descriptores del grupo de bloques.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "El nuevo tamaño es menor que el mínimo (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Longitud de «stride» no válida"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"La partición continente (o el dispositivo) sólo tiene %llu (%dk) bloques.\n"
+"Y se ha solicitado un nuevo tamaño de %llu bloques.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "No se puede poner y quitar la característica 64bit.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "No se puede cambiar la característica 64bit en un sistema de ficheros mayor de 2^32 bloques.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "No se puede cambiar la característica 64bit cuando el sistema de ficheros está montado.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Por favor, active la característica «extents» con tune2fs antes de activar la característica 64bit.\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"El sistema de ficheros ya tiene %llu bloques (%dk) de longitud. ¡No hay que hacer nada!\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "El sistema de ficheros ya es de 64 bits.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "El sistema de ficheros ya es de 32 bits.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "No se puede contraer este sistema de ficheros porque tiene puesta la bandera de la característica nodosi_estables.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Se convierte el sistema de ficheros a 64 bits.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Se convierte el sistema de ficheros a 32 bits.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Cambiando el tamaño del sistema de ficheros en %s a %llu (%dk) bloques.\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "mientras se intentaba modificar el tamaño %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Por favor, ejecute 'e2fsck -fy %s' para arreglar el sistema de ficheros\n"
+"después de la operación de cambio de tamaño interrumpida.\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"El sistema de ficheros en %s tiene ahora %llu bloques (de %dk).\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "mientras se intentaba truncar %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "el núcleo no permite cambiar el tamaño en línea con sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "El sistema de ficheros de %s está montado en %s; hace falta cambiar el tamaño en línea\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "La reducción de tamaño en línea no está implementada"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "El sistema de ficheros no permite cambiar el tamaño en línea"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "No se han reservado suficientes bloques gdt para cambiar el tamaño"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "El núcleo no permite cambiar el tamaño de un sistema de ficheros tan grande"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "mientras se intentaba abrir el punto de montaje %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Se ha solicitado el interfaz de cambio de tamaño antiguo.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Permiso para cambiar el tamaño del sistema de ficheros denegado"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Mientras se comprobaba si se puede cambiar de tamaño en línea"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "El núcleo no permite cambiar el tamaño en línea"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Realizando cambio de tamaño en línea de %s a %llu (%dk) bloques.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "mientras se intentaba extender el último grupo"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "mientras se intentaba añadir el grupo #%d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "El sistema de ficheros de %s está montado en %s, pero el cambio de tamaño en línea no está implementado en este sistema.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "los nodos-i (%llu) deben ser menos de %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "bloques reservados"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "bloques de metadatos"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "nuevos bloques de metadatos"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "¡Nunca debería suceder! ¿No hay ningún sb en el último bg super_sparse?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "¡Nunca debería suceder! ¿old_desc inesperada en el bg super_sparse?\n"
+
+# No estoy seguro
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Esto nunca debería suceder: ¡El nodo-i de cambio de tamaño está corrupto!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "Biblioteca EXT2FS versión 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Número mágico incorrecto para la estructura ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Número mágico incorrecto para la estructura badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Número mágico incorrecto para la estructura badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Número mágico incorrecto para la estructura inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Número mágico incorrecto para la estructura io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Número mágico incorrecto para la estructura io_channel unix"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Número mágico incorrecto para la estructura io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Número mágico incorrecto para la estructura block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Número mágico incorrecto para la estructura inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Número mágico incorrecto para la estructura generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Número mágico incorrecto para la estructura io_channel de test"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Número mágico incorrecto para la estructura de lista de bloque de directorio"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Número mágico incorrecto para la estructura icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Número mágico incorrecto para la estructura io_channel Powerquest"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Número mágico incorrecto para la estructura de ficheros ext2"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Número mágico incorrecto para la cabecera de imagen Ext2"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Número mágico incorrecto para la estructura io_channel de nodo-i"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Número mágico incorrecto para el manejador de «extent» ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Número mágico incorrecto en el superbloque"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Revisión del sistema de ficheros demasiado alta"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Intento de escribir en un sistema de ficheros de solo lectura"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "No se pueden leer los descriptores de grupo"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "No se pueden escribir los descriptores de grupo"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Descriptor de grupo corrupto: bloque incorrecto para el mapa de bits de bloques"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Descriptor de grupo corrupto: bloque incorrecto para el mapa de bits de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Descriptor de grupo corrupto: bloque incorrecto para la tabla de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "No se ha podido escribir un mapa de bits de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "No se ha podido leer un mapa de bits de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "No se ha podido escribir un mapa de bits de bloque"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "No se ha podido leer un mapa de bits de bloque"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "No se ha podido escribir una tabla de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "No se ha podido leer una tabla de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "No se ha podido leer el siguiente nodo-i"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "El sistema de ficheros tiene un tamaño de bloque inesperado"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Directorio EXT2 corrupto"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "El intento de leer un bloque del sistema de ficheros resultó en una lectura corta"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "El intento de escribir un bloque en el sistema de ficheros resultó en una escritura corta"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "No hay espacio libre en el directorio"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "No está cargado el mapa de bits de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "No está cargado el mapa de bits de bloques"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Número inválido de nodo-i"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Número inválido de bloque"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Error interno en ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "No hay suficiente espacio para construir el sistema de ficheros propuesto"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Se ha pasado un número de bloque no válido a ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Se ha pasado un número de bloque no válido a ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Se ha pasado un número de bloque no válido a ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Se ha pasado un número de nodo-i no válido a ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Se ha pasado un número de nodo-i no válido a ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Se ha pasado un número de nodo-i no válido a ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Se ha intentado empujar el final del mapa de bits de bloques más allá del final real"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Se ha intentado empujar el final del mapa de bits de nodos-i más allá del final real"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Se ha encontrado un bloque indirecto no válido"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Se ha encontrado un bloque doblemente indirecto no válido"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Se ha encontrado un bloque triplemente indirecto no válido"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Los mapas de bits de bloques no son iguales"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Los mapas de bits de nodos-i no son iguales"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Nombre de dispositivo no válido o mal formado"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Al grupo de bloques le falta la tabla de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "El superbloque ext2 está corrupto"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "El número de bit genérico pasado a ext2fs_mark_generic_bitmap no es válido"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "El número de bit genérico pasado a ext2fs_unmark_generic_bitmap no es válido"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "El número de bit genérico pasado a ext2fs_test_generic_bitmap no es válido"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Se han encontrado demasiados enlaces simbólicos."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "La función de retrollamada no manejará este caso"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "El nodo-i procede de un bloque incorrecto en la tabla de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "El sistema de ficheros tiene característica(s) no implementada(s)"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "El sistema de ficheros tiene característica(s) no implementada(s) de solo lectura"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Fallo de búsqueda en canal ES al leer o escribir"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Fallo en la reserva de memoria"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "El argumento pasado a la biblioteca ext2 no es válido"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "No se ha podido reservar bloque en el sistema de ficheros ext2"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "No se ha podido reservar nodo-i en el sistema de ficheros ext2"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "El nodo-i no es un directorio"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Demasiadas referencias en la tabla"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "ext2_lookup no ha encontrado el fichero"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Fichero abierto solo para lectura"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Bloque de directorio no encontrado"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "El directorio ya existe"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Función de biblioteca ext2 no implementada"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "El usuario ha solicitado cancelar"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Fichero demasiado grande"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "El dispositivo de fichero de transacciones suministrado no es un dispositivo de bloques"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "No se encontró el superbloque del fichero de transacciones"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "El fichero de transacciones debe tener al menos 1024 bloques"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Versión del fichero de transacciones no compatible"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Error mientras se intentaba cargar el fichero de transacciones externo"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "No se encontró el fichero de transacciones"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "«Hash» de directorio no compatible"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "El número de bloque de atributo extendido no es válido"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "No se ha podido crear el sistema de ficheros con el número de nodos-i solicitado"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "La instantánea E2image no está en uso"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Demasiados bloques de descriptores de grupo reservados"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "El nodo-i de cambio de tamaño está corrupto"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Se ha intentado poner un bmap de bloque con bloque indirecto perdido"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Bien"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Base de datos corrupta"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: Error de ES"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Error de bloqueo"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: No hay más memoria"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Ya existe el registro"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Ya existe el bloqueo en otras llaves"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Parámetro no válido"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: No existe el registro"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: No está permitido escribir"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "La lista de bloques del directorio ext2fs está vacía"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Intento de modificar una asociación de bloques mediante un iterador de bloques de solo lectura"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Número mágico incorrecto para la ruta «extent» ext4 guardada"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Número mágico incorrecto para el bitmap genérico de 64 bits"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Número mágico incorrecto para el bitmap de bloques de 64 bits"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Número mágico incorrecto para el bitmap de nodos-i de 64-bits"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Número mágico incorrecto --- RESERVADO_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Número mágico incorrecto --- RESERVADO_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Número mágico incorrecto --- RESERVADO_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Número mágico incorrecto --- RESERVADO_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Número mágico incorrecto --- RESERVADO_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Número mágico incorrecto --- RESERVADO_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Número mágico incorrecto --- RESERVADO_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Cabecera de «extent» corrupta"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Ãndice de «extent» corrupto"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "«Extent» corrupto"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "No queda espacio libre el el mapa de «extent»"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "El nodo-i no utiliza «extents»"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "No hay «extent» 'next'"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "No hay «extent» 'previous'"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "No hay «extent» 'up'"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "No hay «extent» 'down'"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "No hay nodo actual"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "La operación ext2fs no está implementada"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "No hay sitio para insertar «extent» en el nodo-i"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "La división daría lugar a un nodo vacío"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "No se encontró el «extent»"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "La operación no está implementada para nodos-i que contienen «extents»"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "La longitud del «extent» no es válida"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "El canal de E/S no admite números de bloque de 64 bits"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "No se ha podido comprobar si el sistema de ficheros está montado, porque falta el fichero mtab"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "El sistema de ficheros es demasiado grande para utilizar mapas de bits antiguos"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: número mágico no válido"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: dispositivo actualmente activo"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: e2fsck ejecutándose"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: número de bloque fuera del alcance del sistema de ficheros"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: cursando operación desconocida"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: el sistema de ficheros todavía está en uso"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: no se ha podido abrir con O_DIRECT"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "El tamaño del descriptor del grupo de bloques es incorrecto"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "El «checksum» del nodo-i no cuadra con el nodo-i"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "El «checksum» del mapa de bits del nodo-i no cuadra con el mapa de bits"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "El «checksum» del bloque «extent» no cuadra con el bloque «extent»"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "El bloque de directorio no tiene espacio para el «checksum»"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "El «checksum» del bloque de directorio no cuadra con el bloque de directorio"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "El «checksum» del bloque de atributo extendido no cuadra con el bloque"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "El «checksum» del superbloque no cuadra con el superbloque"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Algoritmo de «checksum» desconocido"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "El «checksum» del bloque MMP no cuadra"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "El fichero ya existe"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "El «checksum» del mapa de bits del bloque no cuadra con el mapa de bits"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "No se puede iterar por los bloques de datos de un nodo-i que contiene datos en línea"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "La longitud del nombre del atributo extendido no es válida"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "La longitud del valor del atributo extendido no es válida"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "El atributo extendido tiene un «hash» incorrecto"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "El bloque de atributo extendido tiene una cabecera incorrecta"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Clave de atributo extendido no encontrada"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Espacio insuficiente para almacenar los datos de atributos extendidos"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "El sistema de ficheros carece de la característica ext_attr o inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "El nodo-i no tiene datos en línea"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "No hay bloque para un nodo-i con datos en línea"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "No queda espacio libre en los datos en línea"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Número mágico incorrecto para la estructura de attributos extendidos"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Parece que el nodo-i contiene basura"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "El atributo extendido tiene un desplazamiento del valor que no es válido"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Los indicadores del fichero de transacciones son incoherentes"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "El fichero deshacer está corrupto"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Fichero deshacer incorrecto para este sistema de ficheros"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "El sistema de ficheros está corrupto"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Se ha detectado un CRC incorrecto en el sistema de ficheros"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "El superbloque del fichero de transacciones está corrupto"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "El nodo-i está corrupto"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "El nodo-i que contiene el valor de un atributo extendido está corrupto"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Descriptores de grupo no cargados"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "La estructura de datos ext2_filsys interna parece que está corrupta"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "Se ha encontrado un bucle cíclico en un árbol «extent»"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "La operación no se puede hacer sobre un fichero de transacciones externo"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Versión de «profile» 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Valor mágico incorrecto en profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Sección «profile» no encontrada"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Relación «profile» no encontrada"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Intento de añadir una relación a un nodo que no es sección"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Una cabecera de sección de «profile» tiene un valor no nulo"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Lista enlazada incorrecta en las estructuras «profile»"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Nivel de grupo incorrecto en las estructuras «profile»"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Puntero padre incorrecto en las estructuras «profile»"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Valor mágico incorrecto en el iterador «profile»"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "No se ha podido poner el valor en el nodo de sección"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Se ha pasado un argumento no válido a la biblioteca «profile»"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Intento de modificar «profile» de solo lectura"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "La cabecera de sección «profile» no está en el nivel superior"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Error de sintaxis en la cabecera de la sección «profile»"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Error de sintaxis en la relación «profile»"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Sobra una llave de cierre en «profile»"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Falta una llave de apertura en «profile»"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Valor mágico incorrecto en profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Valor mágico incorrecto en profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "La iteración por la sección de nivel superior no está implementada"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "El objeto profile_section no es válido"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "No hay más secciones"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "El conjunto de nombres pasado a la rutina de consulta es incorrecto"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "No hay ningún fichero «profile» abierto"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Valor mágico incorrecto en profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "No se ha podido abrir el fichero «profile»"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "La sección ya existe"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Valor lógico no válido"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Valor entero no válido"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Valor mágico incorrecto en profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\túltima fecha de montaje en %.*s %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\túltima fecha de montaje %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tfecha de creación %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tfecha de última modificación %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Se ha encontrado una tabla de particiones %s en %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "No se puede abrir %s: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"En apariencia, el dispositivo no existe; ¿Se especificó correctamente?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s no es un dispositivo especial de bloques.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s contiene un sistema de ficheros %s etiquetado '%s'\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s contiene un sistema de ficheros %s\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s contiene datos `%s'\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the bigalloc feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Atención: la característica «bigalloc» aún está en proceso de desarrollo\n"
+#~ "Véase https://ext4.wiki.kernel.org/index.php/Bigalloc para más información\n"
+#~ "\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "Modo de empleo: %s [-F] [-I bloques_del_búfer_del_nodo_i] dispositivo\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "mientras se intentaba abrir '%s'"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "%u nodos-i explorados.\n"
+
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "Las características de cifrado y «casefold» no son compatibles.\n"
+#~ "No pueden estar activadas las dos a la vez.\n"
+
+#~ msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+#~ msgstr ""
+#~ "No es posible activar la característica de cifrado en sistemas de ficheros que tengan\n"
+#~ "la característica de codificación activada.\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "mientras se abría el directorio \"%s\""
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** ¡Errores de «checksum» detectados en el sistema de ficheros! ¡Ejecute e2fsck ahora!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** ¡Errores de «checksum» detectados en mapas de bits! ¡Ejecute e2fsck ahora!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: error al leer los mapas de bits: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Atención, se tuvo un problema al escribir los superbloques.\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "El i_dir_acl @F %Id, @s cero.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Características del fichero de transacciones: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Tamaño del fichero de transacciones: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Longitud del fichero de transacciones: %u\n"
+#~ "Secuencia del fichero de transacciones: 0x%08x\n"
+#~ "Inicio del fichero de transacciones: %u\n"
+
+#~ msgid "Journal checksum type: crc32\n"
+#~ msgstr "Tipo de «checksum» del fichero de transacciones: crc32\n"
+
+#~ msgid ""
+#~ "Journal checksum type: %s\n"
+#~ "Journal checksum: 0x%08x\n"
+#~ msgstr ""
+#~ "Tipo de «checksum» del fichero de transacciones: %s\n"
+#~ "«Checksum» del fichero de transacciones: 0x%08x\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Número de error del fichero de transacciones: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Tamaño del bloque del fichero de transacciones: %u\n"
+#~ "Longitud del fichero de transacciones: %u\n"
+#~ "Primer bloque del fichero de transacciones: %u\n"
+#~ "Secuencia del fichero de transacciones: 0x%08x\n"
+#~ "Inicio del fichero de transacciones: %u\n"
+#~ "Número de usuarios del fichero de transacciones: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "Usuarios del fichero de transacciones: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: enabled project without quota together\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Atención: proyecto activado sin cuota al mismo tiempo\n"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "Por favor ejecute e2fsck sobre el sistema de ficheros.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "el @i %i tiene la bandera de @c puesta en el @f sin que la @c esté implementada. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "@A de @a @b %b. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: atención: el soporte a la compresión es experimental.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: e2fsck no está compilado con soporte a ÃRBOLES-H,\n"
+#~ "\tpero el sistema de ficheros %s tiene directorios con ÃRBOLES-H.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "mientras se reservaba el búfer relleno con ceros"
+
+# FIXME: %u BEFORE unused
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", %u nodos-i sin usar\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Fallo mientras se intentaban leer los datos del sistema de ficheros \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "Fallo en tdb_fetch %s\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "El UUID del sistema de ficheros no cuadraba \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "Fallo en tdb_open %s\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "Fallo mientras se intentaba abrir %s\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr "Se ejecutó de nuevo un transacción de tamaño %zd en la posición %llu\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Fallo de escritura %s\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Parámetro de tipo de cuota no válido: %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "¡No se puede reservar memoria para analizar sintácticamente las opciones de cuota!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "No se puede reservar memoria para el nombre del fichero tdb\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Para deshacer la operación tune2fs, ejecute el comando\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "¡%s es todo el dispositivo, no sólo una partición!\n"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<El índice ACL del nodo-i>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<La información ACL del nodo-i>"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr "El @S no tiene la bandera has_journal, pero tiene un @j ext3 %s.\n"
+
+#~ msgid "@a in @i %i has a hash (%N) which is @n (must be 0)\n"
+#~ msgstr "El @a en el @i %i tiene un arreglo asociativo (%N) que es @n (debe ser 0)\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "¿Recrear el @j para hacer el sistema de ficheros ext3 de nuevo?\n"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "mientras se llamaba a la función iteradora"
+
+#~ msgid "Pass 0: Doing byte-swap of filesystem\n"
+#~ msgstr "Paso 0: Haciendo la trasposición de bytes del sistema de ficheros\n"
+
+#~ msgid ""
+#~ "%s: the filesystem must be freshly checked using fsck\n"
+#~ "and not mounted before trying to byte-swap it.\n"
+#~ msgstr ""
+#~ "%s: el sistema de ficheros debe ser revisado desde cero utilizando\n"
+#~ "fsck y no debe estar montado cuando se intente hacer una trasposición de bytes en él.\n"
+
+#~ msgid "Byte swap"
+#~ msgstr "Trasposición de bytes"
+
+#~ msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+#~ msgstr "Los sistemas con trasposición de bytes no están compilados en esta versión de e2fsck\n"
+
+#~ msgid "Incompatible options not allowed when byte-swapping.\n"
+#~ msgstr "Las opciones incompatibles no están permitidas cuando se hace trasposición de bytes.\n"
+
+#~ msgid "%s: Filesystem byte order already normalized.\n"
+#~ msgstr "%s: el orden de los bytes del sistema de ficheros ya se normalizó.\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "No se puede determinar el tamaño del fichero de transacciones"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "mientras se reintentaba escribir los mapas de bits del bloque para %s"
+
+#~ msgid "invalid starting block - %s"
+#~ msgstr "bloque inicial no válido - %s"
+
+#~ msgid "Note: This is a byte-swapped filesystem\n"
+#~ msgstr "Nota: este es un sistema de ficheros con trasposición de bytes\n"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "se escribió muy poco (sólo %d bytes) para el encabezado de la imagen"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "Tamaño del fragmento inválido - %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Atención: no están implementados los fragmentos. Se descarta la opción -f\n"
+
+#~ msgid ""
+#~ "Filesystem too large. No more than 2**31-1 blocks\n"
+#~ "\t (8TB using a blocksize of 4k) are currently supported."
+#~ msgstr ""
+#~ "El sistema de ficheros es demasiado grande. Actualmente no se\n"
+#~ "soportan más de 2**31-1 bloques (8 TB con un tamaño de bloque de 4k)."
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: some 2.4 kernels do not support blocksizes greater than 4096\n"
+#~ "\tusing ext3. Use -b 4096 if this is an issue for you.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Atención: algunos núcleos 2.4 no operan con tamaños de bloque superiores\n"
+#~ "a 4096 con ext3. Utilice -b 4096 si esto es un problema para usted.\n"
+#~ "\n"
+
+#~ msgid "Warning: %d-byte inodes not usable on older systems\n"
+#~ msgstr "Atención: los nodos-i de %d bytes no se pueden utilizar en muchos sistemas\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "NO se ha eliminado el fichero de transacciones\n"
+
+#~ msgid "done \n"
+#~ msgstr "hecho \n"
+
+#~ msgid "invalid blocks range: %lu-%lu"
+#~ msgstr "intervalo de bloques dañados: %lu-%lu"
+
+#~ msgid ""
+#~ "\n"
+#~ "The filesystem already has sparse superblocks disabled.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "El sistema de ficheros ya tiene los superbloques dispersos deshabilitados.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Sparse superblock flag cleared. %s"
+#~ msgstr ""
+#~ "\n"
+#~ "La bandera de superbloques dispersos ha sido borrada. %s"
+
+#~ msgid "Clone duplicate/bad blocks"
+#~ msgstr "Clonar los bloques duplicados/dañados"
+
+#~ msgid "Error allocating @a @b %b. "
+#~ msgstr "Error al reservar el @b del @a %b. "
+
+#~ msgid ""
+#~ "Duplicate @bs found... invoking duplicate @b passes.\n"
+#~ "Pass 1B: Rescan for duplicate/bad @bs\n"
+#~ msgstr ""
+#~ "Se encontraron @bs duplicados... se invocan los pasos para @bs duplicados.\n"
+#~ "Paso 1B: Re-exploración para buscar @bs duplicados/dañados\n"
+
+#~ msgid "Duplicate/bad @b(s) in @i %i:"
+#~ msgstr "Hay @b(s) duplicados/dañados en el @i %i:"
+
+#~ msgid "Forcibly clearing HTREE flag on @i %d (%q). (Beta test code)\n"
+#~ msgstr "Se intenta borrar a la fuerza la bandera HTREE en el @i %d (%q). (Código de prueba en etapa beta)\n"
+
+#~ msgid " thisoff block fs_blk_sz blksz grp last_mount\n"
+#~ msgstr " este bloque fs_blk_sz blksz grp ultimo_montado\n"
+
+#~ msgid "(unknown os)"
+#~ msgstr "(so desconocido)"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s falló para %s: %s\n"
+
+#~ msgid "Number of free blocks: %d/%d, Needed: %d\n"
+#~ msgstr "Número de bloques libres: %d/%d, se necesitan: %d\n"
+
+#~ msgid "Going into desperation mode for block allocations\n"
+#~ msgstr "Entrando al modo desesperado para reservar bloques\n"
+
+#~ msgid "Moving %d blocks %u->%u\n"
+#~ msgstr "Moviendo %d bloques %u->%u\n"
+
+#~ msgid "Inode moved %u->%u\n"
+#~ msgstr "Nodo i movido %u->%u\n"
+
+#~ msgid "Inode translate (dir=%u, name=%.*s, %u->%u)\n"
+#~ msgstr "Traducción de nodo-i (dir=%u, nombre=%.*s, %u->%u)\n"
+
+#~ msgid "Itable move group %d block %u->%u (diff %d)\n"
+#~ msgstr "La tabla i mueve al grupo %d bloque %u->%u (diferencia %d)\n"
+
+#~ msgid "%d blocks of zeros...\n"
+#~ msgstr "%d bloques de ceros...\n"
+
+#~ msgid "Inode table move finished.\n"
+#~ msgstr "El movimiento de la tabla de los nodos i ha terminado.\n"
diff --git a/po/fi.gmo b/po/fi.gmo
new file mode 100644
index 0000000..9a71c00
--- /dev/null
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 0000000..7593094
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,8034 @@
+# Finnish translation for e2fsprogs
+# Copyright © 2016 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Lauri Nurmi <lanurmi@iki.fi>, 2007, 2015-2016.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.42.12-pre2\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2016-05-26 21:46+0300\n"
+"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
+"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.8.7\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Viallinen lohko %u sallitun välin ulkopuolella; jätetään huomiotta.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr ""
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr ""
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr ""
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr ""
+
+#: e2fsck/dirinfo.c:331
+#, fuzzy
+msgid "while freeing dir_info tdb file"
+msgstr "luettaessa juuren i-solmua"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Virhe luettaessa lohkoa %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr ""
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr ""
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr ""
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr ""
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr ""
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr ""
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr ""
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Virheellinen lohkojen määrä!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr ""
+
+#: e2fsck/extents.c:42
+#, fuzzy
+msgid "extent rebuild inode map"
+msgstr "I-solmubittikartan luku ei onnistu"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Käyttö: %s levy\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr ""
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Käyttö: %s [-F] [-I i-solmupuskurilohkot] laite\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr ""
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr ""
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr ""
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr ""
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr ""
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u i-solmua tutkittu.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr ""
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr ""
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr ""
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr ""
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr ""
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr ""
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr ""
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr ""
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr ""
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr ""
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr ""
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr ""
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr ""
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr ""
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr ""
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr ""
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr ""
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr ""
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr ""
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr ""
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr ""
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr ""
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr ""
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr ""
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr ""
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr ""
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr ""
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr ""
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr ""
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr ""
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr ""
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr ""
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr ""
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr ""
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr ""
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr ""
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr ""
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr ""
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr ""
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr ""
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr ""
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr ""
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr ""
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "tavallinen tiedosto"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "hakemisto"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "merkkilaite"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "lohkolaite"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "nimetty putki"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "symbolinen linkki"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "pistoke"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr ""
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "epäsuora lohko"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr ""
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr ""
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr ""
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr ""
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr ""
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr ""
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+#, fuzzy
+msgid "unknown quota type"
+msgstr "tuntematon käyttöjärjestelmä - %s"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr ""
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr ""
+
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr ""
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr ""
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr ""
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1262
+#, fuzzy
+msgid "metadata block map"
+msgstr "Lohkobittikartan luku ei onnistu"
+
+#: e2fsck/pass1.c:1324
+#, fuzzy
+msgid "opening inode scan"
+msgstr "Laajennetaan i-solmutaulua"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr ""
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "Vaihe 1"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr ""
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr ""
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "Vaihe 2"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "Ei voida jatkaa."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr ""
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr ""
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Vaihe 3"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "Vaihe 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Vaihe 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr ""
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr ""
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr ""
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr ""
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr ""
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr ""
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr ""
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr ""
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr ""
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr ""
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr ""
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr ""
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr ""
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr ""
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr ""
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr ""
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr ""
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr ""
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr ""
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr ""
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr ""
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr ""
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr ""
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr ""
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr ""
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr ""
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr ""
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr ""
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr ""
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr ""
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr ""
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "KESKEYTETTY"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr ""
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr ""
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr ""
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr ""
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr ""
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr ""
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr ""
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr ""
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr ""
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr ""
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:167
+#, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr ""
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr ""
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr ""
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr ""
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr ""
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr ""
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+msgid "@j @S is corrupt.\n"
+msgstr ""
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr ""
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr ""
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr ""
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr ""
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr ""
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr ""
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr ""
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr ""
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr ""
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+msgid "Resize @i not valid. "
+msgstr ""
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr ""
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr ""
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr ""
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr ""
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr ""
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr ""
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+msgid "@S has invalid MMP block. "
+msgstr ""
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr ""
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+msgid "@S MMP @b checksum does not match. "
+msgstr ""
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr ""
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+msgid "External @j @S checksum does not match @S. "
+msgstr ""
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+msgid "Invalid %U @q @i %i. "
+msgstr ""
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr ""
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr ""
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr ""
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr ""
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr ""
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr ""
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr ""
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr ""
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr ""
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr ""
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+msgid "@I %B (%b) in @i %i. "
+msgstr ""
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr ""
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Liikaa viallisia @bja @issa %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in bad @b @i. "
+msgstr ""
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+msgid "Bad @b @i has illegal @b(s). "
+msgstr ""
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr ""
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr ""
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr ""
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr ""
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr ""
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+msgid "@A @b @B (%N): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr ""
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+msgid "@j @i is not in use, but contains data. "
+msgstr ""
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr ""
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr ""
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+msgid "@A refcount structure (%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+msgid "Error reading @a @b %b for @i %i. "
+msgstr ""
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+msgid "@i %i has a bad @a @b %b. "
+msgstr ""
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+msgid "Error reading @a @b %b (%m). "
+msgstr ""
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr ""
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+msgid "Error writing @a @b %b (%m). "
+msgstr ""
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+msgid "@a @b %b has h_@bs > 1. "
+msgstr ""
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+msgid "@A @a region allocation structure. "
+msgstr ""
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr ""
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+msgid "@a @b %b is corrupt (@n name). "
+msgstr ""
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+msgid "@a @b %b is corrupt (@n value). "
+msgstr ""
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr ""
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+msgid "%B (%b) causes @d to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:854
+msgid "%B (%b) causes file to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:859
+msgid "%B (%b) causes symlink to be too big. "
+msgstr ""
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr ""
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr ""
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr ""
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr ""
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr ""
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr ""
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr ""
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+msgid "@q @i is not a regular file. "
+msgstr ""
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+msgid "@q @i is not in use, but contains data. "
+msgstr ""
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+msgid "@q @i is visible to the user. "
+msgstr ""
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+msgid "The bad @b @i looks @n. "
+msgstr ""
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr ""
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr ""
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr ""
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr ""
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+msgid "@A @x region allocation structure. "
+msgstr ""
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr ""
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr ""
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr ""
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr ""
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr ""
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+#, fuzzy
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Vaihe 3A: Optimoidaan hakemistoja\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr ""
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+#, fuzzy
+msgid "Optimizing @x trees: "
+msgstr "Optimoidaan hakemistoja: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr ""
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+msgid "@E has @n @i #: %Di.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr ""
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr ""
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+msgid "i_frag @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr ""
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+msgid "@d @i %i has an unallocated %B. "
+msgstr ""
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr ""
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr ""
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+msgid "@E has a @z name.\n"
+msgstr ""
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr ""
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+msgid "@p @h %d: %B not referenced\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+msgid "@p @h %d: %B referenced twice\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+msgid "@n @h %d (%q). "
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr ""
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr ""
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr ""
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr ""
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr ""
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr ""
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1731
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr ""
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr ""
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr ""
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr ""
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+msgid "@r is not a @d; aborting.\n"
+msgstr ""
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr ""
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+#, fuzzy
+msgid "/@l is encrypted\n"
+msgstr "Vedos (%s) on salattu\n"
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Vaihe 3A: Optimoidaan hakemistoja\n"
+
+#: e2fsck/problem.c:1838
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1843
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "Optimoidaan hakemistoja: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Vaihe 4: Tarkastetaan viittausmääriä\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, c-format
+msgid "@u @z @i %i. "
+msgstr ""
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr ""
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr ""
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr ""
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr ""
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr ""
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1989
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr ""
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+msgid "Recreate @j"
+msgstr ""
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2061
+#, c-format
+msgid "Error writing file system info: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2071
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr ""
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr ""
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr ""
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "i-solmun koko=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr ""
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr ""
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr ""
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr ""
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/unix.c:77
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Käyttö: %s [-panyrcdfvstDFSV] [-b superlohko] [-B lohkokoko]\n"
+"\t\t[-I i-solmupuskurilohkot] [-P prosessin_i-solmukoko]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j ext-journal]\n"
+"\t\t[-E extended-options] laite\n"
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+
+#: e2fsck/unix.c:88
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u tiedostoa (%0d.%d %% epäjatkuvia), %llu/%llu lohkoa\n"
+
+#: e2fsck/unix.c:162
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u i-solmu käytetty (%2.2f %%, kokonaismäärä %u)\n"
+msgstr[1] ""
+"\n"
+"%12u i-solmua käytetty (%2.2f %%, kokonaismäärä %u)\n"
+
+#: e2fsck/unix.c:166
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u epäjatkuva tiedosto (%0d.%d %%)\n"
+msgstr[1] ""
+"%12u epäjatkuvaa tiedostoa (%0d.%d %%)\n"
+"\n"
+
+#: e2fsck/unix.c:171
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u epäjatkuva hakemisto (%0d.%d %%)\n"
+msgstr[1] ""
+"%12u epäjatkuvaa hakemistoa (%0d.%d %%)\n"
+"\n"
+
+#: e2fsck/unix.c:176
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+
+#: e2fsck/unix.c:184
+msgid " Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:193
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu lohko käytetty (%2.2f %%, kokonaismäärä %llu)\n"
+msgstr[1] ""
+"%12llu lohkoa käytetty (%2.2f %%, kokonaismäärä %llu)\n"
+"\n"
+
+#: e2fsck/unix.c:197
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u viallinen lohko\n"
+msgstr[1] "%12u viallista lohkoa\n"
+
+#: e2fsck/unix.c:199
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u suuri tiedosto\n"
+msgstr[1] "%12u suurta tiedostoa\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u tavallinen tiedosto\n"
+msgstr[1] ""
+"\n"
+"%12u tavallista tiedostoa\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u hakemisto\n"
+msgstr[1] "%12u hakemistoa\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u merkkilaitetiedosto\n"
+msgstr[1] "%12u merkkilaitetiedostoa\n"
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u lohkolaitetiedosto\n"
+msgstr[1] "%12u lohkolaitetiedostoa\n"
+
+#: e2fsck/unix.c:210
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifoa\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u linkki\n"
+msgstr[1] "%12u linkkiä\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u symbolinen linkki"
+msgstr[1] "%12u symbolista linkkiä"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u nopea symbolinen linkki)\n"
+msgstr[1] " (%u nopeata symbolista linkkiä)\n"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u pistoke\n"
+msgstr[1] "%12u pistoketta\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u tiedosto\n"
+msgstr[1] "%12u tiedostoa\n"
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr ""
+
+#: e2fsck/unix.c:258
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Varoitus! %s on liitettynä.\n"
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Varoitus! %s on käytössä.\n"
+
+#: e2fsck/unix.c:267
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s on liitettynä.\n"
+
+#: e2fsck/unix.c:269
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s on käytössä.\n"
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Ei voida jatkaa, keskeytetään.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"VAROITUS!!! Tiedostojärjestelmä on liitettynä. Jatkamisesta ***SEURAA***\n"
+"***VAKAVIA*** vaurioita tiedostojärjestelmälle.\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Haluatko varmasti jatkaa"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "tarkistus keskeytetty.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr ""
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr ""
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:389
+msgid " has filesystem last checked time in the future"
+msgstr ""
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr ""
+
+#: e2fsck/unix.c:442
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr ""
+
+#: e2fsck/unix.c:462
+msgid " (check deferred; on battery)"
+msgstr " (tarkistus lykätty; toimitaan akkuvirralla)"
+
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (tarkistus seuraavan liittämiskerran jälkeen)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (tarkistus %ld liittämiskerran jälkeen)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr ""
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr ""
+
+#: e2fsck/unix.c:701
+msgid "Invalid readahead buffer size.\n"
+msgstr ""
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:758
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:860
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:875
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr ""
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr "Valitsimet -n ja -D ovat epäyhteensopivia."
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr "Valitsimet -n ja -c ovat epäyhteensopivia."
+
+#: e2fsck/unix.c:994
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Valitsimet -n ja -l/-L ovat epäyhteensopivia."
+
+#: e2fsck/unix.c:1018
+#, fuzzy
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Valitsimet -n ja -D ovat epäyhteensopivia."
+
+#: e2fsck/unix.c:1024
+#, fuzzy
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Valitsimet -n ja -D ovat epäyhteensopivia."
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+msgid "while checking MMP block"
+msgstr ""
+
+#: e2fsck/unix.c:1259
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1275
+#, fuzzy
+msgid "while reading MMP block"
+msgstr "luettaessa kirjanpidon superlohkoa"
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Ylikirjoitetaan nykyinen tiedostojärjestelmä; tämän voi perua komennolla:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr ""
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr "ohjelman alustusta yritettäessä"
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr "vuorovaikutteisia korjauksia varten tarvitaan pääte"
+
+#: e2fsck/unix.c:1508
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr ""
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr ""
+
+#: e2fsck/unix.c:1525
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr ""
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "Voisiko tämä olla nollan pituinen osio?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Mahdollisesti puuttuva laite tai sivutuslaite?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"Tiedostojärjestelmä liitettynä tai toisen ohjelman poissulkevasti avaamana?\n"
+
+#: e2fsck/unix.c:1575
+msgid "Possibly non-existent device?\n"
+msgstr "Mahdollisesti puuttuva laite?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr "Hanki e2fsck:n uudempi versio!"
+
+#: e2fsck/unix.c:1711
+#, fuzzy, c-format
+msgid "while checking journal for %s"
+msgstr "luettaessa kirjanpidon superlohkoa"
+
+#: e2fsck/unix.c:1714
+msgid "Cannot proceed with file system check"
+msgstr ""
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1743
+#, fuzzy, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Kirjanpidon superlohkoa ei löydy"
+
+#: e2fsck/unix.c:1747
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1751
+#, fuzzy, c-format
+msgid "while recovering journal of %s"
+msgstr "luettaessa kirjanpidon superlohkoa"
+
+#: e2fsck/unix.c:1773
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr ""
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr ""
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Tämä ei lupaa hyvää, mutta me yritämme jatkaa...\n"
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Luodaan kirjanpito (%d lohkoa): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr " Valmis.\n"
+
+#: e2fsck/unix.c:1887
+#, fuzzy
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** kirjanpito luotiin uudelleen - tiedostojärjestelmä on jälleen ext3 ***\n"
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr "keskeytetty"
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck peruutettu.\n"
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Aloitetaan e2fsck alusta...\n"
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:1985
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** TIEDOSTOJÄRJESTELMÄÄ MUUTETTIIN *****\n"
+
+#: e2fsck/unix.c:1987
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** TIEDOSTOJÄRJESTELMÄÄ MUUTETTIIN *****\n"
+
+#: e2fsck/unix.c:1996
+#, fuzzy, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** KÄYNNISTÄ LINUX UUDELLEEN *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ***** VAROITUS: Tiedostojärjestelmässä on edelleen virheitä *****\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "yYkK"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "nNeE"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr ""
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<k>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<e>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (k/e)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "peruutettu!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr ""
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "kyllä\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "ei\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? ei\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? kyllä\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "kyllä"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "ei"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:346
+#, fuzzy
+msgid "writing block and inode bitmaps"
+msgstr "Kirjoitetaan i-solmutauluja: "
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: ODOTTAMATTOMIA RISTIRIITOJA - AJA fsck KÄSIN.\n"
+"\t(ilman valitsinta -a ja -p)\n"
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Muistia käytetty: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Muistia käytetty: %lu, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "aika: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "kulunut aika: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "valmis \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr ""
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr ""
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Outo arvo (%ld) do_read-funktiossa\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Luetaan ja verrataan: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s on liitetty - "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "badblocksin ajaminen ei ole turvallista!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr ""
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr ""
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr ""
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr ""
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr "viimeinen lohko"
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr "ensimmäinen lohko"
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "virheellinen aloituslohko (%llu): oltava pienempi kuin %llu"
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "virheellinen lopetuslohko (%llu): oltava 32-bittinen arvo"
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1347
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr ""
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr "käyttö: %s [-RV] [-+=AacDdijsSu] [-v versio] tiedostot...\n"
+
+#: misc/chattr.c:159
+#, c-format
+msgid "bad project - %s\n"
+msgstr ""
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr ""
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:271
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:275
+#, fuzzy, c-format
+msgid "while setting project on %s"
+msgstr "juuri-i-solmun omistajuutta asetettaessa"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, fuzzy, c-format
+msgid "while reading inode %u"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+#, fuzzy
+msgid "while expanding directory"
+msgstr "/lost+foundia laajennettaessa"
+
+#: misc/create_inode.c:96
+#, fuzzy, c-format
+msgid "while linking \"%s\""
+msgstr "avattaessa tiedostoa %s"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, fuzzy, c-format
+msgid "while writing inode %u"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:162
+#, fuzzy, c-format
+msgid "while opening inode %u"
+msgstr "avattaessa tiedostoa %s"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+#, fuzzy
+msgid "while allocating memory"
+msgstr "puskuria varattaessa"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, fuzzy, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/create_inode.c:213
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr ""
+
+#: misc/create_inode.c:223
+#, fuzzy, c-format
+msgid "while closing inode %u"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/create_inode.c:274
+#, fuzzy, c-format
+msgid "while allocating inode \"%s\""
+msgstr "puskuria varattaessa"
+
+#: misc/create_inode.c:293
+#, fuzzy, c-format
+msgid "while creating inode \"%s\""
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/create_inode.c:359
+#, fuzzy, c-format
+msgid "while creating symlink \"%s\""
+msgstr "/lost+foundia luodessa"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, fuzzy, c-format
+msgid "while looking up \"%s\""
+msgstr "/lost+foundia haettaessa"
+
+#: misc/create_inode.c:397
+#, fuzzy, c-format
+msgid "while creating directory \"%s\""
+msgstr "juurihakemistoa luodessa"
+
+#: misc/create_inode.c:625
+#, fuzzy, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "avattaessa tiedostoa %s"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:747
+#, fuzzy, c-format
+msgid "while opening directory \"%s\""
+msgstr "avattaessa tiedostoa %s"
+
+#: misc/create_inode.c:757
+#, c-format
+msgid "while lstat \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:808
+#, fuzzy, c-format
+msgid "while creating special file \"%s\""
+msgstr "Luodaan tavallinen tiedosto %s\n"
+
+#: misc/create_inode.c:817
+#, fuzzy
+msgid "malloc failed"
+msgstr "Muistinvaraus epäonnistui"
+
+#: misc/create_inode.c:825
+#, fuzzy, c-format
+msgid "while trying to read link \"%s\""
+msgstr ""
+"\n"
+"\tyritettäessä luoda kirjanpitotiedostoa"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:843
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr ""
+
+#: misc/create_inode.c:854
+#, fuzzy, c-format
+msgid "while writing file \"%s\""
+msgstr "avattaessa tiedostoa %s"
+
+#: misc/create_inode.c:867
+#, fuzzy, c-format
+msgid "while making dir \"%s\""
+msgstr "avattaessa tiedostoa %s"
+
+#: misc/create_inode.c:885
+#, fuzzy
+msgid "while changing directory"
+msgstr "juurihakemistoa luodessa"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:904
+#, fuzzy, c-format
+msgid "while setting inode for \"%s\""
+msgstr "juuri-i-solmun omistajuutta asetettaessa"
+
+#: misc/create_inode.c:911
+#, fuzzy, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "juuri-i-solmun omistajuutta asetettaessa"
+
+#: misc/create_inode.c:937
+#, fuzzy
+msgid "while saving inode data"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/dumpe2fs.c:56
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Käyttö: %s [-bfhixV] [-ob superlohko] [-oB lohkokoko] laite\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "lohkoa"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr ""
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr ""
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr ""
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr ""
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ""
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr ""
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ""
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr ""
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr ""
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr ""
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr "luettaessa kirjanpidon superlohkoa"
+
+#: misc/dumpe2fs.c:392
+msgid "Journal superblock magic number invalid!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#: misc/dumpe2fs.c:468
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "puskuria varattaessa"
+
+#: misc/dumpe2fs.c:479
+#, fuzzy, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "virhe luettaessa lohkoa %llu"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, fuzzy, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr ""
+"\n"
+"\tyritettäessä luoda kirjanpitotiedostoa"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr "Käyttö: %s [-RVadlv] [tiedostot...]\n"
+
+#: misc/e2image.c:109
+#, fuzzy, c-format
+msgid " %s -I device image-file\n"
+msgstr "Käyttö: %s [-RVadlv] [tiedostot...]\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+msgid "while allocating buffer"
+msgstr "puskuria varattaessa"
+
+#: misc/e2image.c:180
+#, c-format
+msgid "Writing block %llu\n"
+msgstr ""
+
+#: misc/e2image.c:194
+#, c-format
+msgid "error writing block %llu"
+msgstr "virhe kirjoitettaessa lohkoa %llu"
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr ""
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/e2image.c:506
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:518
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:559
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu lohkoa (%d %%)"
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr ""
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s jäljellä nopeudella %.2f Mt/s"
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, c-format
+msgid "error reading block %llu"
+msgstr "virhe luettaessa lohkoa %llu"
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Kopioitu %llu / %llu lohkoa (%d %%) ajassa %s"
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "nopeudella %.2f Mt/s"
+
+#: misc/e2image.c:759
+msgid "while allocating l1 table"
+msgstr ""
+
+#: misc/e2image.c:804
+msgid "while allocating l2 cache"
+msgstr ""
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1152
+msgid "while allocating ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1159
+msgid "while initializing ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1276
+msgid "while allocating block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1285
+msgid "while allocating scramble block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1292
+msgid "Scanning inodes...\n"
+msgstr "Tutkitaan i-solmuja...\n"
+
+#: misc/e2image.c:1304
+msgid "Can't allocate block buffer"
+msgstr ""
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, c-format
+msgid "while iterating over inode %u"
+msgstr ""
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr ""
+
+#: misc/e2image.c:1411
+msgid "error reading bitmaps"
+msgstr ""
+
+#: misc/e2image.c:1423
+msgid "while opening device file"
+msgstr "avattaessa laitetiedostoa"
+
+#: misc/e2image.c:1434
+#, fuzzy
+msgid "while restoring the image table"
+msgstr "Laajennetaan i-solmutaulua"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1557
+msgid "checking if mounted"
+msgstr "tarkastetaan onko liitettynä"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr ""
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Vedos (%s) on tiivistetty\n"
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Vedos (%s) on salattu\n"
+
+#: misc/e2image.c:1640
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Vedos (%s) on salattu\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "yritettäessä muuntaa qcow2-vedosta (%s) raw-vedokseksi (%s)"
+
+#: misc/e2image.c:1654
+msgid "The -c option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1659
+msgid "The -c option not supported when writing to stdout\n"
+msgstr ""
+
+#: misc/e2image.c:1666
+msgid "while allocating check_buf"
+msgstr ""
+
+#: misc/e2image.c:1672
+msgid "The -p option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr ""
+
+#: misc/e2initrd_helper.c:68
+#, fuzzy, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Käyttö: %s levy\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: ei voi avata kohdetta %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr ""
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: virhe luettaessa superlohkoa\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: ei ole ext2-tiedostojärjestelmä\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Varoitus: nimiö on liian pitkä, katkaistaan.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr ""
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: virhe kirjoitettaessa superlohkoa\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Käyttö: e2label laite [uusi_nimiö]\n"
+
+#: misc/e2undo.c:124
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr "Käyttö: %s <transaktiotiedosto> <tiedostojärjestelmä>\n"
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+#, fuzzy
+msgid "while reading filesystem superblock."
+msgstr "luettaessa kirjanpidon superlohkoa"
+
+#: misc/e2undo.c:188
+#, fuzzy
+msgid "while fetching superblock"
+msgstr "luettaessa kirjanpidon superlohkoa"
+
+#: misc/e2undo.c:201
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:340
+#, fuzzy, c-format
+msgid "illegal offset - %s"
+msgstr "Virheellinen offset: %s\n"
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:373
+#, fuzzy, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "avattaessa laitetiedostoa"
+
+#: misc/e2undo.c:380
+#, fuzzy
+msgid "while reading undo file"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/e2undo.c:385
+#, fuzzy, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: liian monta laitetta\n"
+
+#: misc/e2undo.c:396
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:403
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr ""
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:412
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr ""
+
+#: misc/e2undo.c:425
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+
+#: misc/e2undo.c:433
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Varoitus! %s on liitettynä.\n"
+
+#: misc/e2undo.c:439
+#, fuzzy
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undoa tulee käyttää vain liittämättömälle tiedostojärjestelmälle\n"
+
+#: misc/e2undo.c:455
+#, fuzzy, c-format
+msgid "while opening `%s'"
+msgstr "avattaessa tiedostoa %s"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:507
+#, fuzzy
+msgid "while reading keys"
+msgstr "luettaessa bittikarttoja"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:552
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr ""
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, fuzzy, c-format
+msgid "while fetching block %llu."
+msgstr "virhe kirjoitettaessa lohkoa %llu"
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:615
+#, fuzzy, c-format
+msgid "while writing block %llu."
+msgstr "virhe kirjoitettaessa lohkoa %llu"
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Käyttö: findsuper laite [ohitettavat_tavut [alkukilotavu]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr ""
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+
+#: misc/fsck.c:343
+#, fuzzy, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "VAROITUS: ei voitu avata"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr ""
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: ei löytynyt\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr ""
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Tarkistetaan kaikki tiedostojärjestelmät.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr ""
+
+#: misc/fsck.c:1085
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Käyttö: fsck [-AMNPRTV] [ -C [ fd ] ] [-t tiedjärjtyyppi] "
+"[tiedjärjvalitsimet] [tiedjärj ...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: liian monta laitetta\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: liian monta argumenttia\n"
+
+#: misc/fuse2fs.c:3739
+msgid "Mounting read-only.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, c-format
+msgid "%s: %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, fuzzy, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+"Aja ensin â€e2fsck -f %sâ€.\n"
+"\n"
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3806
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, fuzzy, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Käyttö: %s [-RVadlv] [tiedostot...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:93
+#, fuzzy, c-format
+msgid "While reading project on %s"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:130
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Ajetaan komento: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr ""
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "Keskeytetään...\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:368
+#, fuzzy
+msgid "while writing reserved inodes"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Kirjoitetaan i-solmutauluja: "
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "valmis \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "juurihakemistoa luodessa"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "juuri-i-solmun omistajuutta asetettaessa"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "/lost+foundia luodessa"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "/lost+foundia haettaessa"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "/lost+foundia laajennettaessa"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Muisti loppui tyhjennettäessä sektoreita %d-%d\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Varoitus: ei voitu lukea lohkoa 0: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Varoitus: ei voitu tyhjentää sektoria %d: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "Nollataan kirjanpitolaite: "
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr ""
+"Luodaan %llu-lohkoinen tiedostojärjestelmä %dk lohkokoolla ja %u i-solmulla\n"
+
+#: misc/mke2fs.c:673
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"varoitus: %llu lohkoa käyttämättä.\n"
+"\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Tiedostojärjestelmän nimiö=%s\n"
+
+#: misc/mke2fs.c:681
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Käyttöjärjestelmän tyyppi: %s\n"
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:686
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu lohkoa (%2.2f %%) varattu pääkäyttäjälle\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr ""
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u lohkoryhmää\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u lohkoryhmä\n"
+
+#: misc/mke2fs.c:711
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Tiedostojärjestelmän UUID: %s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Superlohkon varmuuskopiot tallennettu lohkoihin: "
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Virheellinen desc_size: â€%sâ€\n"
+
+#: misc/mke2fs.c:853
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Virheellinen uusi koko: %s\n"
+
+#: misc/mke2fs.c:865
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Virheellinen offset: %s\n"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Virheellinen mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:896
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:918
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:956
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr ""
+
+#: misc/mke2fs.c:1065
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1296
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1304
+msgid "Aborting...\n"
+msgstr "Keskeytetään...\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1527
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1597
+#, c-format
+msgid "invalid block size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1617
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:1669
+msgid "Illegal number for flex_bg size"
+msgstr ""
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1680
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr ""
+
+#: misc/mke2fs.c:1690
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1700
+#, c-format
+msgid "invalid inode size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:1733
+#, fuzzy, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Varoitus: nimiö on liian pitkä, katkaistaan.\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1757
+#, c-format
+msgid "bad num inodes - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1770
+#, fuzzy
+msgid "while allocating fs_feature string"
+msgstr "puskuria varattaessa"
+
+#: misc/mke2fs.c:1787
+#, c-format
+msgid "bad revision level - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1792
+#, c-format
+msgid "while trying to create revision %d"
+msgstr ""
+
+#: misc/mke2fs.c:1806
+msgid "The -t option may only be used once"
+msgstr "Valitsinta -t voi käyttää vain kerran"
+
+#: misc/mke2fs.c:1814
+msgid "The -T option may only be used once"
+msgstr "Valitsinta -T voi käyttää vain kerran"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1882
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1893
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "tiedostojärjestelmä"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr ""
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:2040
+msgid "The HURD does not support the filetype feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2045
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2050
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2055
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr "yritettäessä määrittää laitteiston sektorikokoa"
+
+#: misc/mke2fs.c:2071
+msgid "while trying to determine physical sector size"
+msgstr "yritettäessä määrittää fyysistä sektorin kokoa"
+
+#: misc/mke2fs.c:2103
+msgid "while setting blocksize; too small for device\n"
+msgstr ""
+
+#: misc/mke2fs.c:2108
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:2132
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2144
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2204
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr ""
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2241
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "varoitus: Geometrian noutaminen laitteelle %s ei onnistu\n"
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+"Tämä voi johtaa hyvin huonoon suorituskykyyn, (uudelleen)osiointi on "
+"suositeltavaa.\n"
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2467
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "virheellinen i-solmun koko %d (väh. %d/enint. %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2518
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+
+#: misc/mke2fs.c:2705
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2721
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2780
+msgid "while initializing quota context"
+msgstr ""
+
+#: misc/mke2fs.c:2787
+#, fuzzy
+msgid "while writing quota inodes"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/mke2fs.c:2812
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr ""
+
+#: misc/mke2fs.c:2888
+msgid "in malloc for android_sparse_params"
+msgstr ""
+
+#: misc/mke2fs.c:2902
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2933
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "tuntematon käyttöjärjestelmä - %s"
+
+#: misc/mke2fs.c:3119
+msgid "Allocating group tables: "
+msgstr "Varataan ryhmätauluja: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:3136
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3183
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:3196
+msgid "while reserving blocks for online resize"
+msgstr ""
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr ""
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "valmis\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:3248
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3290
+msgid "Copying files into the device: "
+msgstr ""
+
+#: misc/mke2fs.c:3296
+#, fuzzy
+msgid "while populating file system"
+msgstr "Tarkistetaan kaikki tiedostojärjestelmät.\n"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:3310
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "Tarkistetaan kaikki tiedostojärjestelmät.\n"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"valmis\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr ""
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:582
+#, fuzzy, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Luodaan tavallinen tiedosto %s\n"
+
+#: misc/mk_hugefiles.c:584
+#, fuzzy, c-format
+msgid "with %llu blocks each"
+msgstr ""
+"varoitus: %llu lohkoa käyttämättä.\n"
+"\n"
+"\n"
+
+#: misc/mk_hugefiles.c:593
+#, fuzzy, c-format
+msgid "while creating huge file %lu"
+msgstr "Laajennetaan i-solmutaulua"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Käyttö: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+#, fuzzy
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Suorita e2fsck tiedostojärjestelmälle.\n"
+
+#: misc/tune2fs.c:123
+#, fuzzy
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Suorita e2fsck tiedostojärjestelmälle.\n"
+
+#: misc/tune2fs.c:136
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr ""
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "luettaessa bittikarttoja"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr "(ja uudelleenkäynnistys sen jälkeen!)\n"
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:483
+#, fuzzy, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr ""
+"Aja ensin â€e2fsck -f %sâ€.\n"
+"\n"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1138
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1164
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1177
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1212
+msgid "Error while reading bitmaps\n"
+msgstr ""
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1226
+msgid "while reading MMP block."
+msgstr ""
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1269
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1323
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1465
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1489
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Luodaan kirjanpitoa laitteelle %s: "
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Luodaan kirjanpito-i-solmu: "
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tyritettäessä luoda kirjanpitotiedostoa"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+msgid "while initializing quota context in support library"
+msgstr ""
+
+#: misc/tune2fs.c:1649
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr ""
+
+#: misc/tune2fs.c:1657
+#, fuzzy, c-format
+msgid "while writing quota file (%d)"
+msgstr "juurihakemistoa luodessa"
+
+#: misc/tune2fs.c:1675
+#, fuzzy, c-format
+msgid "while removing quota file (%d)"
+msgstr "luettaessa juuren i-solmua"
+
+#: misc/tune2fs.c:1718
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr ""
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "bad inode size - %s"
+msgstr ""
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2115
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2153
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2168
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2193
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+
+#: misc/tune2fs.c:2663
+msgid "Failed to read inode bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2668
+msgid "Failed to read block bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr ""
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:2699
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr ""
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2955
+#, fuzzy
+msgid "Cannot modify a journal device.\n"
+msgstr "Nollataan kirjanpitolaite: "
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2975
+msgid "Shrinking inode size is not supported\n"
+msgstr ""
+
+#: misc/tune2fs.c:2980
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3045
+#, c-format
+msgid "Recovering journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3074
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3084
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr ""
+
+#: misc/tune2fs.c:3091
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:3098
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:3104
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "varattujen lhkojen määrä on liian suuri (%llu)"
+
+#: misc/tune2fs.c:3111
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3119
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:3134
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3198
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3222
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/tune2fs.c:3275
+msgid "Need to update journal superblock.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3301
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3326
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3330
+msgid "Failed to change inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:3344
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3349
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3356
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr "<jatketaan>\n"
+
+#: misc/util.c:104
+#, fuzzy, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Jatketaanko silti (vai odotetaanko %d sekuntia)? (k,e)"
+
+#: misc/util.c:108
+#, fuzzy
+msgid "Proceed anyway? (y,N) "
+msgstr "Jatketaanko silti? (k,e) "
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr ""
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:186
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+
+#: misc/util.c:213
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+
+#: misc/util.c:251
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: liian monta argumenttia\n"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "kirjoitus"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr ""
+
+#: misc/uuidd.c:308
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Ext2-superlohkoa ei löytynyt,"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr ""
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr ""
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Käyttö: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr ""
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Laajennetaan i-solmutaulua"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Tutkitaan i-solmutaulua"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Päivitetään i-solmuviittauksia"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Siirretään i-solmutaulua"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr "avattaessa tiedostoa %s"
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr ""
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Aja ensin â€e2fsck -f %sâ€.\n"
+"\n"
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Tiedostojärjestelmän arvioitu vähimmäiskoko: %llu\n"
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Virheellinen uusi koko: %s\n"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Uusi koko liian suuri ilmaistavaksi 32 bitillä\n"
+
+#: resize/main.c:534
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Uusi koko alle vähimmäiskoon (%llu)\n"
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:564
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+
+#: resize/main.c:581
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+
+#: resize/main.c:593
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:600
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr ""
+
+#: resize/main.c:605
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr ""
+
+#: resize/main.c:613
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr ""
+
+#: resize/main.c:615
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr ""
+
+#: resize/main.c:617
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr ""
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:635
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr ""
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr ""
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr ""
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr ""
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr ""
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr ""
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr ""
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+
+#: resize/resize2fs.c:759
+#, fuzzy, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "virheellinen aloituslohko (%llu): oltava pienempi kuin %llu"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "varatut lohkot"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+msgid "new meta blocks"
+msgstr ""
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+#, fuzzy
+msgid "EXT2FS Library version 1.44.4"
+msgstr "EXT2FS-kirjaston versio 1.42.12"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Väärä taikaluku ext2_filsys-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Väärä taikaluku badblocks_list-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Väärä taikaluku badblocks_iterate-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Väärä taikaluku inode_scan-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Väärä taikaluku io_channel-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Väärä taikaluku unix io_channel-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Väärä taikaluku io_manager-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Väärä taikaluku block_bitmap-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Väärä taikaluku inode_bitmap-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Väärä taikaluku generic_bitmap-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:22
+#, fuzzy
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Väärä taikaluku io_channel-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "I-solmubittikartan kirjoitus ei onnistu"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "I-solmubittikartan luku ei onnistu"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Lohkobittikartan kirjoitus ei onnistu"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Lohkobittikartan luku ei onnistu"
+
+#: lib/ext2fs/ext2_err.c:42
+#, fuzzy
+msgid "Can't write an inode table"
+msgstr "Kirjoitetaan i-solmutauluja: "
+
+#: lib/ext2fs/ext2_err.c:43
+#, fuzzy
+msgid "Can't read an inode table"
+msgstr "Laajennetaan i-solmutaulua"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Ei voida lukea seuraavaa i-solmua"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Tiedostojärjestelmällä on odottamaton lohkokoko"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "EXT2-hakemisto vioittunut"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Hakemistossa ei ole vapaata tilaa"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Lohkobittikartta ei ole ladattu"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Virheellinen i-solmun numero"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Virheellinen lohkon numero"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Sisäinen virhe ext2fs_expand_dir-funktiossa"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Ei riittävästi tilaa ehdotetun tiedostojärjestelmän luomiseen"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Virheellinen tai väärän muotoinen laitteen nimi"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Ext2-superlohko on vioittunut"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Kohdattiin liian monta symbolista linkkiä."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Muistinvaraus epäonnistui"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:83
+#, fuzzy
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "e2label: ei ole ext2-tiedostojärjestelmä\n"
+
+#: lib/ext2fs/ext2_err.c:84
+#, fuzzy
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "e2label: ei ole ext2-tiedostojärjestelmä\n"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Ext2-i-solmu ei ole hakemisto"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Liian monta viittausta taulussa"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Ext2-hakemistolohkoa ei löydy"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Ext2-hakemisto on jo olemassa"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Toteuttamaton ext2-kirjaston funktio"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Ext2-tiedosto liian suuri"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Kirjanpidon superlohkoa ei löydy"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Kirjanpidon on oltava vähintään 1024-lohkoinen"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "KIrjanpitoa ei löydy"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Väärä taikaluku --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Väärä taikaluku --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Väärä taikaluku --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Väärä taikaluku --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Väärä taikaluku --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Väärä taikaluku --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Väärä taikaluku --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ext2-tiedosto on jo olemassa"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:173
+#, fuzzy
+msgid "Extended attribute key not found"
+msgstr "Ext2-hakemistolohkoa ei löydy"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+#, fuzzy
+msgid "No free space in inline data"
+msgstr "Hakemistossa ei ole vapaata tilaa"
+
+#: lib/ext2fs/ext2_err.c:179
+#, fuzzy
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Väärä taikaluku generic_bitmap-rakenteelle"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:185
+#, fuzzy
+msgid "File system is corrupted"
+msgstr "Tiedostojärjestelmällä on odottamaton lohkokoko"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+#, fuzzy
+msgid "The journal superblock is corrupt"
+msgstr "Ext2-superlohko on vioittunut"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr ""
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr ""
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr ""
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr ""
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Virheellinen totuusarvo"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Virheellinen kokonaislukuarvo"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#: lib/support/plausible.c:118
+#, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "\tviimeksi liitetty %s, %s"
+
+#: lib/support/plausible.c:121
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tviimeksi liitetty %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tluotu %s"
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tviimeksi muutettu %s"
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr ""
+
+#: lib/support/plausible.c:199
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Luodaan tavallinen tiedosto %s\n"
+
+#: lib/support/plausible.c:202
+#, fuzzy, c-format
+msgid "Could not open %s: %s\n"
+msgstr "VAROITUS: ei voitu avata"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Laitetta ei nähtävästi ole olemassa. Määrittelitkö sen oikein?\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s ei ole lohkolaite.\n"
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr ""
+
+#: lib/support/plausible.c:252
+#, fuzzy, c-format
+msgid "%s contains a %s file system\n"
+msgstr "Tarkistetaan kaikki tiedostojärjestelmät.\n"
+
+#: lib/support/plausible.c:276
+#, fuzzy, c-format
+msgid "%s contains `%s' data\n"
+msgstr "Tarkistetaan kaikki tiedostojärjestelmät.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: e2fsck on käännetty ilman HTREE-tukea, mutta\n"
+#~ "\ttiedostojärjestelmä %s sisältää HTREE-hakemistoja.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Kirjanpidon ominaisuudet: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Kirjanpidon koko: "
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s on koko laite, ei vain yksi osio!\n"
+
+#~ msgid "done \n"
+#~ msgstr "valmis \n"
+
+#~ msgid "(unknown os)"
+#~ msgstr "(tuntematon käyttöjärjestelmä)"
diff --git a/po/fr.gmo b/po/fr.gmo
new file mode 100644
index 0000000..23db035
--- /dev/null
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..91b98d2
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,8633 @@
+# Messages français pour GNU concernant e2fsprogs.
+# Copyright (C) 2008 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Copyright © 1996 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
+# Samuel Thibault <samuel.thibault@ens-lyon.org>, 2006-2022.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-13 22:00+0200\n"
+"Last-Translator: Samuel Thibault <samuel.thibault@ens-lyon.org>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Bloc défectueux %u hors limite ; ignoré.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "lors du contrôle de l'intégrité de l'i-noeud des blocs défecteux"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "lors de la lecture de l'i-noeud des blocs défectueux"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "lors de la tentative d'ouverture de %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "lors de la tentative d'ouverture via popen() « %s »"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "lors de la lecture de la liste des blocs défectueux à partir du fichier"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "lors de la mise à jour de l'i-noeud des blocs défectueux"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr ""
+"Avertissement : bloc illégal %u repéré dans l'i-noeud des blocs\n"
+"défectueux. Effacé.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "lors de la libération du fichier tdb dir_info"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Erreur de lecture du bloc %lu (%s) lors de %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Erreur de lecture du bloc %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignorer l'erreur"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Forcer la ré-écriture"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Erreur lors de l'écriture du bloc %lu (%s) lors de %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Erreur lors de d'écriture du bloc %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "blocs des répertoires vides"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "carte des répertoires vide"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Bloc des répertoires %u (n°%d) vide dans l'i-noeud %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s : %s nom-de-fichier nombre-de-blocs taille-des-blocs\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Nombre illégal de blocs !\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Ne peut allouer le tampon de bloc (taille=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "carte des i-noeuds de reconstruction des extents"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Utilisation : %s disque\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "L'ioctl BLKFLSBUF n'est pas supporté ! Impossible de vider les tampons.\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "lecture en cours du superbloc du journal\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s : aucun superbloc de journal valide n'a été trouvé\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s : journal trop court\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: blocs de fast commit incorrects\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s : récupération du journal\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+"%s : aucune récupération du journal n'est possible tant qu'il est en\n"
+"lecture seule\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "lors de la tentative de ré-ouverture de %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aattribut étendu"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aerreur lors de l'allocation"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bbloc"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccompress"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cest en conflit avec des @bs d'autres systèmes de fichiers"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "drépertoire"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Deffacé"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eentrée"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e « %Dn » dans %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fsystème de fichiers"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fpour l'@i %i (%Q) est"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggroupe"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "h@i de @d d'HTREE"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "ii-noeud"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iillégal"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lest un lien"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mréclamé(s) plusieurs fois"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "ninvalide"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oorphelin"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblème avec"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qquota"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "r@i racine"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sdevrait être"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "unon attaché"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vpériphérique"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zde longueur zéro"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<L'i-noeud NUL>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<L'i-noeud des blocs défectueux>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<L'i-noeud de quota utilisateur>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<L'i-noeud de quota de groupe>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<L'i-noeud du chargeur d'amorce>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<L'i-noeud du répertoire de récupération de fichiers effacés>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<L'i-noeud descripteur de groupe>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<L'i-noeud de journal>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<L'i-noeud réservé 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<L'i-noeud réservé 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "fichier normal"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "répertoire"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "fichier de périphérique en mode caractère"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "fichier de périphérique en mode bloc"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "tube nommé"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "lien symbolique"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "type de fichier inconnu avec un mode 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "bloc indirect"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "bloc doublement indirect"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "bloc triplement indirect"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "bloc de traduction"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "bloc n°"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "utilisateur"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "groupe"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "projet"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "type de quota inconnu"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "carte des i-noeuds réclamés plusieurs fois"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "erreur interne : ne peut trouver dup_blk pour %llu\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "retourné de clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "erreur interne : impossible de trouver l'enregistrement de bloc EA pour %llu"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "erreur interne : impossible de trouver l'enregistrement d'i-noeud EA pour %u"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "lors du hachage de l'entrée avec e_value_inum = %u"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "lecture des blocs de répertoire"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "l'obtention de l'i-noeud suivant depuis l'examen"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "carte des i-noeuds utilisés"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "carte des i-noeuds de répertoires"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "carte des i-noeuds de fichiers normaux"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "carte des blocs utilisés"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "carte des blocs de métadonnées"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "carte casefold des i-noeuds"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "l'ouverture de l'examen des i-noeuds"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "Passe 1"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "lecture des blocs indirects de l'i-noeud %u"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "carte des i-noeuds défectueux"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "i-noeud dans la carte des blocs défectueux"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "carte d'i-noeuds magiques"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "carte des blocs réclamés plusieurs fois"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "carte des blocs d'attributs étendus"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c) : %6lu attendu, obtenu phys %6lu (blkcnt %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "bitmap de blocs"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "bitmap d'i-noeuds"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "table d'i-noeuds"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "Passe 2"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "NLS est cassé."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "Ne peut continuer."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "bitmap d'i-noeuds complétés"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Pointe mémoire"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Passe 3"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "bitmap de détection des boucles d'i-noeuds"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Passe 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Passe 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Erreur d'allocation mémoire"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Erreur d'allocation mémoire"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(pas d'invite)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Corriger"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Effacer"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Relocaliser"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Allouer"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Étendre"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Connecter à /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Créer"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Récupérer"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Tronquer"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Effacer l'i-noeud"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Arrêter"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Scinder"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Continuer"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Cloner les blocs réclamés plusieurs fois"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Détruire le fichier"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Supprimer les messages"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Délier"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Effacer l'index HTree"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Recréer"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Optimiser"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "Effacer le drapeau"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(AUCUN)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "CORRIGÉ"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "EFFACÉ"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "RELOCALISÉ"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "ALLOUÉ"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "ÉTENDU"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "RECONNECTÉ"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "CRÉÉ"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "RÉCUPÉRÉ"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "TRONQUÉ"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INODE EFFACÉ"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "ARRÊTÉ"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "SCINDÉ"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "POURSUITE"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "BLOCS RÉCLAMÉS PLUSIEURS FOIS CLONÉS"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "FICHIER DÉTRUIT"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "SUPPRIMÉ"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "DÉLIÉ"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "INDEX HTREE EFFACÉ"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "RECRÉERA"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "OPTIMISERA"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "DRAPEAU EFFACÉ"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "le @B de @bs pour le @g %g n'est pas dans le @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "le @B d'@is pour le @g %g n'est pas dans le @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"la table d'@is pour le @g %g n'est pas dans le @g. (@b %b)\n"
+"ATTENTION : PERTE SÉVÈRE DE DONNÉES POSSIBLE.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Le @S n'a pu être lu ou ne contient pas un @f\n"
+"ext2/ext3/ext4 correct. Si le @v est valide et qu'il contient réellement\n"
+"un @f ext2/ext3/ext4 (et non pas de type swap, ufs ou autre),\n"
+"alors le @S est corrompu, et vous pourriez tenter d'exécuter\n"
+"e2fsck avec un autre @S :\n"
+" e2fsck -b 8193 <@v>\n"
+" ou\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"La taille du @f (selon le @S) est de %b @bs\n"
+"La taille physique du @v est de %c @bs\n"
+"Le @S ou la table des partitions est peut-être corrompue !\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"@S @b_size = %b, fragsize = %c.\n"
+"Cette version d'e2fsck ne supporte pas les fragments de tailles différentes\n"
+"de la taille des @b.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@S @bs_per_group = %b, aurait dû être %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "@S first_data_@b = %b, aurait dû être %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"Le @f n'a pas d'UUID; on en génère un.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Note : si plusieurs i-noeuds ou blocs de bitmaps de blocs ou\n"
+"une partie de la table des i-noeuds nécessitent une relocalisation,\n"
+"vous désirerez peut-être essayer en premier lieu d'exécuter e2fsck\n"
+"avec l'option « -b %S ». Le problème réside peut-être seulement\n"
+"dans les descripteurs de groupes de blocs du bloc primaire, alors\n"
+"que les descripteurs de groupes de blocs de secours sont peut-être\n"
+"en bon état.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Corruption repérée dans le @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Erreur lors de la détermination de la taille du @v physique : %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "le compteur d'@i dans le @S est %i, @s %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Le Hurd ne supporte pas la fonctionnalité filetype.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "le @S a un @j @n (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Le @j externe a plusieurs utilisateurs de @f (non supporté).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Ne peut trouver le @j externe\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Le @j externe a un @S corrompu\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Le @j externe ne supporte pas ce @f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Le @S du @j est de type inconnu %N (non supporté).\n"
+"Il semble que votre copie d'e2fsck soit un peu vieillotte et/ou ne supporte\n"
+"pas ce format de @j.\n"
+"Il est aussi possible que le @S du @j soit corrompu.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Le @S du @j est corrompu.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "Le drapeau has_@j du @S n'est pas activé, mais un @j est présent.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Le @S a le drapeau needs_recovery activé, mais n'a pas de de @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "le drapeau needs_recovery n'est pas activé, mais le @j contient des données.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Effacer le @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "le @f a des drapeaux de fonctionnalités activés mais est un @f de version 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s l'@i @o %i (uid=%Iu, gid=%Ig, mode=%Im, taille=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "%B (%b) @I repéré dans l'@i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Déjà effaçé le %B (%b) repéré dans l'@i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@i @o %i @I dans le @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@i %i @I dans la liste des @is @os.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Le @S du @j a un drapeau de fonctionnalités inconnu sélectionné en lecture seule.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Le @S du @j contient un drapeau non reconnu de fonctionnalités incompatibles.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "cette version de @j n'est pas supportée par cet e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Déplacement du @j à partir de /%s vers l'@i caché.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"ERREUR lors du déplacement du @j : %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Champs de @S de @j @n repérés (à partir du @j V1).\n"
+"Effacement des champs au-delà du @S de @j V1...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Exécuter quand même le @j"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "Le drapeau de récupération n'est pas activé dans le @S de secours, le @j sera donc quand même exécuté.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Archivage des informations du @b de l'@i du @j.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Le @f n'a pas l'option resize_inode activée, mais s_reserved_gdt_@bs\n"
+"est %N ; @s zéro. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode n'est pas activé, mais l'@i de changement de taille n'est pas nul. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "L'@i de changement de taille n'est pas valide. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La date de dernier montage du @S (%t,\n"
+"\tmaintenant = %T) est dans le futur.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La date de dernière écriture du @S (%t,\n"
+"\tmaintenant = %T) est dans le futur.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "L'indication du @S pour le @S externe @s %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Ajout de l'indication « dirhash » au @f.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Le checksum du descripteur de @g %g est %04x, devrait être %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+"Le descripteur de @g %g est marqué comme non initialisé alors que la\n"
+"fonctionnalité n'est pas activée.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Le descripteur de @g %g a un nombre invalide d'i-noeuds non utilisés %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Le @B de @b du dernier @g n'est pas initialisé. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "La transaction %i du journal était corrompue, le rejeu a été abandonné.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Le drapeau test_fs est positionné (et ext4 est disponible). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"La date de dernier montage du @S est dans le futur.\n"
+"\t(de moins d'un jour, probablement à cause d'une horloge matérielle mal configurée)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"La date de dernière écriture du @S est dans le futur.\n"
+"\t(de moins d'un jour, probablement à cause d'une horloge matérielle mal configurée)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Le checksum d'un ou de plusieurs descripteurs de @g de @b est invalide. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Définition du compteur d'@is libres à %j (était %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Définition du compteur des @bs libres à %c (était %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Dissimulation de %U @i de @q %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "Le @S a un @b MMP invalide. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "@S a un numéro magique MMP invalide. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "exet2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "Le metadata_csum du @S annule uninit_bg ; les deux bits de fonctionalités ne peuvent être positionnés simultanément."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "La somme de contrôle du @b MMP du @S ne correspond. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "Le superbloc d'un @f 64bit a besoin des extents pour accéder à l'ensemble du disque. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg est trop grand. (%N, valeur maximum %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "La somme de contrôle du @S du @j externe ne correspond pas au @S"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "Le metadata_csum_seed du @S n'est pas nécessaire sans metadata_csum."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Erreur lors de l'initialisation du contexte de quota dans la bibliothèque support: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Extra isize requis invalide dans le @S (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Extra isize désiré invalide dans le @S (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "%U @i de @q %i invalide. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "Le @S aurait trop d'i-noeuds (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Les fonctionnalités resize_inode et meta_bg sont activées. Ces fonctionnalités\n"
+"ne sont pas compatibles. resize_inode devrait être désactivée. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Passe 1 : vérification des @is, des @bs et des tailles\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "l'@r n'est pas un @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "l'@r a un dtime (probablement en raison d'un vieux mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "l'@i réservé %i (%Q) a un mode @n. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "l'@i @D %i a un dtime nul. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "l'@i %i est utilisé, mais a un dtime. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "l'@i %i est un @d @z. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "le @B de @bs du @g %g à %b @C.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "le @B d'@is du @g %g à %b @C.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "la table d'@is du @g %g à %b @C.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "le @B (%b) de @bs du @g %g's est corrompu. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "le @B (%b) d'@is du @g %g's est corrompu. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size est %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_@bs est %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "%B (%b) @I dans l'@i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "le %B (%b) chevauche les métadonnées de @f dans l'@i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "l'@i %i a un(des) @b(s) illégal(aux). "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Trop de @bs illégaux dans l'@i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "%B (%b) @I dans l'@i des @b défectueux. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "L'@i des @bs défectueux a un(des) @b(s) illégal(aux). "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "@b dupliqué ou défectueux actuellement utilisé !\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "%b défectueux utilisé en tant que @b indirect d'@i des @bs défectueux. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"L'@i des @bs défectueux a probablement été corrompu. Vous devriez arrêter\n"
+"maintenant et exécuter e2fsck -c pour examiner les blocs défectueux\n"
+"dans le @f.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Si le @b est réellement défectueux, le @f ne peut être réparé.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Vous pouvez supprimer le @b de la liste des @b erronés et espérer que\n"
+"le @b soit réellement en bon état. Mais il n'y a aucune garantie.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Le @S primaire (%b) est sur la liste des @bs défectueux.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Le bloc %b dans les descripteurs de @gs primaires est dans la liste des @bs défectueux\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Avertissement : le @S (%b) du @g %g est corrompu.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Avertissement : la copie des descripteurs de @gs du @g %g a un @b (%b) défectueux.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Erreur de programmation ? @b n°%b reclamé sans aucune raison dans process_bad_block.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A de %N @b(s) contigus dans le @g de @b %g pour %s : %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A d'un tampon de @b pour la relocalisation de %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Relocalisation du %s du @g %g de %b vers %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Relocalisation pour le @g %g du %s vers %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Avertissement : impossible de lire le @b %b de %s : %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Avertissement : impossible d'écrire le @b %b pour %s : %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A du @B d'@is (%N) : %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A du @B de @bs (%N) : %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A de l'information du compteur de liens : %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A du tableau des @bs de @ds : %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Erreur lors de l'examen des @is (%i) : %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Erreur lors de la boucle d'itération sur les @bs dans l'@i %i : %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Erreur lors du stockage du compteur d'information d'@i (@i=%i, compteur=%N) : %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Erreur lors du stockage de l'information du @b de @ds (@i=%i, @b=%b, num=%N) : %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Erreur lors de la lecture de l'@i %i : %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "l'@i %i a un drapeau imagic activé. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Le fichier spécial (@v/socket/fifo/symlink) (@i %i) a le drapeau\n"
+"immutable ou append-only activé. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "L'@i spécial (@v/socket/fifo) %i a une taille non nulle. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "l'@i de @j n'est pas utilisé mais contient des données. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "le @j n'est pas un fichier normal. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "l'@i %i fait partie de la liste des @is @os. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "des @is qui faisaient partie d'une liste chaînée d'orphelins corrompue ont été repérés. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A d'une structure de comptage de références (%N) : %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Erreur lors de la lecture du @b %b d'@a pour l'@i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "l'@i %i a un mauvais @b %b d'@a. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Erreur de lecture du @b %b d'@a (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "le @b %b d'@a a un compteur de référence %r, @s %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Erreur d'écriture du @b %b d'@a (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "le @b %b d'@a a h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "@A d'une structure d'allocation de région d'@a. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "le @b %b d'@a est corrompu (collision d'allocation). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "le @b %b d'@a est corrompu (nom @n). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "le @b %b d'@a est corrompu (valeur @n). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "l'@i %i est trop grand. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "le %B (%b) rend le @d trop grand. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "le %B (%b) rend le fichier trop grand. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "le %B (%b) rend le lien symbolique trop grand. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "l'@i %i a le drapeau INDEX_FL activé sur le @f sans support des htrees.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "l'@i %i a le drapeau INDEX_FL activé mais n'est pas un @d.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "l'@h %i a un noeud root @n.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "l'@h %i dispose d'une version de hachage non supportée (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "l'@h %i utilise un drapeau de noeud root incompatible.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "l'@h %i a une hauteur d'arbre (%N) qui est trop grande\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"l'@i des @bs défectueux a un @b indirect (%b) qui\n"
+"entre en conflit avec les métadonnées du @f. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "La (re-)création de l'@i de changement de taille a échoué : %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "l'@i %i a une taille extra (%IS) qui est @n\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "l'@a dans l'@i %i a une longueur de nom (%N) qui est @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "l'@a dans l'@i %i a une valeur de décalage (%N) qui est @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "l'@a dans l'@i %i a un @b de valeur (%N) qui est @n (doit être 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "l'@a dans l'@i %i a une valeur de taille (%N) qui est @n\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "l'@a dans l'@i %i a un hachage (%N) qui est @n\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "l'@i %i est un %It mais il semble qu'il soit en fait un répertoire.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Erreur lors de l'itération sur l'arbre d'@xs dans l'@i %i : %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"N'a pu itérer sur les extents de l'@i %i\n"
+"\t(op %s, blk %b, lblk %c) : %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"L'@i %i a un extent @n\n"
+"\t(@b logique %c, @b physique @n %b, longueur %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"L'@i %i a un extent @n\n"
+"\t(@b logique %c, @b physique %b, longueur @n %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "l'@i %i a le drapeau EXTENTS_FL activé sur le @f sans support des extents.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "L'@i %i a un format d'extent, mais le @S n'a pas la fonctionnalité EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "L'@i %i n'a pas le drapeau EXTENT_FL, mais a un format d'extent\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Le fast symlink %i a le drapeau EXTENT_FL activé. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"L'@i %i a des extents dans le désordre\n"
+"\t(@b logique @n %c, @b physique %b, longueur %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "L'@i %i a un noeud d'extent invalide (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Erreur lors de la conversion du @B de @b de sous-cluster : %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "L'@i de @q n'est pas un fichier normal. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "L'@i de @q n'est pas utilisé mais contient des données. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "L'@i de @q est visible par l'utilisateur. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "L'@i des @bs défectueux a l'air @n. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"L'@i %i a un extent de taille nulle\n"
+"\t(@b logique @n %c, @b physique %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "l'@i %i semble contenir des données incorrectes. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "L'@i %i passe les vérifications, mais la somme de contrôle ne correspond pas à l'@i. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "L'@ de l'@i %i est corrompu (collision d'allocation). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Le bloc d'extent de l'@i %i passe les vérifications, mais la somme de contrôle ne correspond pas à l'extent\n"
+"\t(@b logique %c, @b physique %b, longueur %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "Le @b d'@a de l'@i %i passe les vérifications, mais la somme de contrôle ne correspond pas au @b. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Extent intérieur de niveau de noeud %N de l'i-noeud %i:\n"
+"Le début logique %b ne correspond pas au début logique %c du niveau suivant. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Dans l'@i %i, la fin de l'extent dépasse la valeur autorisée\n"
+"\t(@b logique %c, @b physique %b, longueur %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "L'@i %i a des données en ligne, mais le @S n'a pas la fonctionnalité INLINE_DATA\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "L'@i %i a le drapeau INLINE_DATA_FL activé sur le @f sans support des données en ligne.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "Le bloc %b de l'@i %i conflicte avec des meta-données critiques, saute les vérifications du bloc.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "@i de @d %i a un mauvais @b %b d'@a. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "L'@i de @d %i a un @x marqué non initialisé au @b %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"L'@i %i @b logique %b (@b physique %c) viole les règles d'allocation de cluster.\n"
+"Sera corrigé pendant la passe 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "L'@i %i a le drapeau INLINE_DATA_FL activé mais l'@a n'a pas été trouvé. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Le fichier spécial (@v/socket/fifo) (@i %i) a le drapeau\n"
+"extents ou inline-data. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "L'@i %i a un en-tête d'@x mais le drapeau de données en ligne est positionné.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "L'@i %i semble avec des données en ligne mais le drapeau d'@x est positionné.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "L'@i %i semble avoir une carte de @b mais les drapeaux de données en ligne et d'@x sont positionnés.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "L'@i %i a des données en ligne et le drapeau d'@x positionné mais l'i_block contient des déchets.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "La liste des blocs défectueux indique que la liste de blocs défectueux %i est défectueuse. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "@A d'une structure d'allocation de région d'@x. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"L'@i %i a un plan de @x doublon\n"
+"\t(@b logique %c, @b physique @n %b, longueur %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "@A de %N octets de mémoire pour la liste des @i chiffrés\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "L'arbre d'@x de l'i-noeud @i pourrait être moins profond (%b ; pourrait être <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "L'@i %i sur le @f bigalloc ne peut pas être projeté sur un @b. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "L'@i %i a un en-tête d'@x corrompu. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Les horodatages sur l'@i %i au-delà du 04/04/2310 sont probablement pré-1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "l'@i %i a une valeur d'@a @i %N @I.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "l'@i %i un @a @n. L'@i EA %N n'a pas le drapeau EA_INODE.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"il manque à l'@i EA %N pour l'l@i parent %i le drapeau EA_INODE.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "L'@i %i a un @x marqué non initialisé au @b %c (longueur %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "l'@i %i a le drapeau casefold activé mais n'est pas un répertoire. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"le @d %p a le drapeau casefold, mais la\n"
+"fonctionalité casefold n'est pas activée. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "l'@i %i a le drapeau de chiffrement mais n'a pas d'@a de chiffrement.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "L'@i chiffré %i a un @a de chiffrement corrompu.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "L'@h %i utilise la version de hachage (%N), mais devrait utiliser SipHash (6) \n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "L'@h %i utilise SipHash, mais ne le devrait pas. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Exécution de passes additionnelles pour résoudre les problèmes de @bs réclamés par plus d'un @i...\n"
+"Passe 1B : ré-examen pour les @bs @m\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b(s) @m dans l'@i %i :"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Erreur lors de l'examen des i-noeuds (%i) : %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A du @B d'@is (i_node_dup_map) : %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Erreur lors des itérations sur les @bs dans l'@i %i (%s) : %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Erreur d'ajustement de refcount pour le @b %b d'@a (@i %i) : %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Passe 1C : examen des répertoires pour les @is avec des @bs @m\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Passe 1D : ajustement des @bs @m\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Le fichier %Q (@i n°%i, date de modification %IM)\n"
+" a %r @b(s) @m, partagés avec %N fichier(s) :\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i n°%i, date de modification %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<métadonnée du @f>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Il y a %N @is contenant des @bs @m.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@bs @m déjà été réassignés ou clonés.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "N'a pu cloner le fichier : %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Passe 1E : Optimisation des arbres d'@x\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Échec d'optimisation de l'arbre d'@x %p (%i) : %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Optimisation des arbres d'@x : "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Erreur interne: la largeur maximale de l'arbre d'extents est trop grande (%b ; attendu=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "L'arbre d'@x de l'@i %i (au niveau %b) pourrait être plus court. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "L'arbre d'@x de l'@i %i (au niveau %b) pourrait être plus étroit. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Passe 2 : vérification de la structure des @ds\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Numéro d'@i @n pour « . » dans l'@i de @d %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "L'@E a un n° d'@i @n : %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "L'@E a un @i @D/non utilisé %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "L'@E @L vers « . » "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "L'@E pointe vers l'@i (%Di) localisé dans un @b défectueux.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "L'@E @L vers le @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "L'@E @L vers l'@r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "L'@E a un caractère illégal dans son nom.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "« . » manquant dans l'@i de @d %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "« .. » manquant dans l'@i de @d %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "La première @e « %Dn » (@i=%Di) dans l'@i de @d %i (%p) @s « . »\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "La seconde @e « %Dn » (@i=%Di) dans l'@i de @d %i @s « .. »\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr @F %IF, @s zéro.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s zéro.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high @F %Id, @s zéro.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N, @s zéro.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N, @s zéro.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "L'@i %i (%Q) a un mode @n (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@i de @d %i, %B, déplacement %N : @d corrompu\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@i de @d %i, %B, déplacement %N : nom de fichier trop long\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "L'@i de @d %i a un %B non alloué. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "L'@e de @d « . » dans l'@i de @d %i n'est pas terminée pas un NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "L'@e de @d « .. » dans l'@i de @d %i n'est pas terminée pas un NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "L'@i %i (%Q) est un @v de caractère @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "L'@i %i (%Q) est un @v de @b @I.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "L'@E est un doublon de l'@e « . ».\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "L'@E est un doublon de l'@e « .. ».\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Erreur interne : impossible de trouver dir_info pour %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "L'@E a un rec_len de %Dr, @s %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A d'une structure icount : %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Erreur d'itération sur les @bs de @d : %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Erreur de lecture du @b %b de @d (@i %i) : %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Erreur d'écriture du @b %b de @d (@i %i) : %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A d'un nouveau @b de @d pour l'@i %i (%s) : %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Erreur lors de la désallocation de l'@i %i : %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "L'@e de @d pour « . » dans %p (%i) est grande.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "L'@i %i (%Q) est un FIFO @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "L'@i %i (%Q) est une socket @I.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Définition du type de fichier pour l'@E à %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "L'@E a un type de fichier incorrect (était %Dt, @s %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "L'@E a un type de fichier initialisé.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "L'@E a un nom @z.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Le lien symbolique %Q (@i n°%i) est @n.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "le @b d'@a @F @n (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "le @f contient de grands fichiers, mais n'a pas le drapeau LARGE_FILE activé dans le @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@p l'@h %d : %B n'est pas référencé\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p l'@h %d : %B est référencé deux fois\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p l'@h %d : %B a un hachage mininal erroné\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p l'@h %d : %B a un hachage maximal erroné\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "@h %d @n (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "le @f contient de grands répertoires, mais n'a pas le drapeau LARGE_DIR activé dans le @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p l'@h %d (%q) : numéro de @b %b erroné.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p l'@h %d : le noeud root est @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p l'@h %d : %B a une limite @n (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p l'@h %d : %B a un compteur @n (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p l'@h %d : %B a une table de hachage non ordonnée\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p l'@h %d : %B a une profondeur @n (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "@E doublon repérée. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E a un nom de fichier qui n'est pas unique.\n"
+"Renommage en %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"@e '%Dn' doublon repéré.\n"
+"\tMarquage de %p (%i) comme devant être re-construit.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, @s zéro.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "@b dans l'@h %d (%q) inattendu.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E référence l'@i %Di dans le @g %g où _INODE_UNINIT est positionné.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E référence l'@i %Di trouvé dans la zone d'i-noeuds non utilisés du @g %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s zéro.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p l'@h %d : le noeud root a une somme de contrôle incorrecte.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p l'@h %d : le noeud interne a une somme de contrôle incorrecte.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@i de @d %i, %B, déplacement %N : le @d n'a pas de somme de contrôle.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "@i de @d %i, %B: le @d passe les vérifications, mais a une somme de contrôle incorrecte.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "La taille de l'@i de @d en ligne (%N) doit être un multiple de 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "La correction de la taille de l'@i %i de @d en ligne a échoué.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "L'@E chiffrée est trop courte.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "L'@E chiffrée référence l'@i %Di non chiffré.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "L'@E chiffrée référence l'@i %Di, qui a une politique de chiffrement différente.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "L'@E a des caractères UTF-8 illégaux dans son nom.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "@E de nom de fichier doublon repérée. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Passe 3 : vérification de la connectivité des @ds\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "L'@r n'est pas alloué. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Pas d'espace dans le @d @l. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "@i %i (était dans %q) de @d non connecté\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/@l n'a pas été trouvé. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "« .. » dans %Q (%i) est %P (%j), @s %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "/@l erroné ou inexistent. Ne peut reconnecter.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Ne peut étendre /@l : %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Ne peut reconnecter %i : %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Erreur lors de la tentative de repérage de /@l : %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b : %m lors de la tentative de création du @d /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i : %m lors de la tentative de création du @d /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_@b : %m lors de la tentative de création d'un nouveau @b de @d\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_@b : %m lors de la tentative d'écriture du @b de @d pour /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Erreur lors de l'ajustement du compteur d'@i sur l'@i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"N'a pu corriger le parent de l'@i %i : %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"N'a pu corriger le parent de l'@i %i : n'a pu trouver l'@e du @d parent\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Erreur de création du @d racine (%s) : %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Erreur de création du @d /@l (%s) : %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "L'@r n'est pas un @d ; arrêt immédiat.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Ne peut procéder sans un @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l n'est pas un @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/@l a des données en ligne\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Ne peut pas allouer de l'espace pour /@l.\n"
+"Les fichiers perdus seront placés à la racine à la place"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Espace insuffisant pour recouvrer les fichers perdus !\n"
+"Libérez des données du @f et relancez e2fsck.\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/@l est chiffré\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "@i %i (%p) de @d en boucle récursive\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Passe 3A : optimisation des répertoires\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Échec de création de l'itérateur dirs_to_hash : %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Échec d'optimisation du répertoire %q (%d) : %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Optimisation des répertoires : "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Passe 4 : vérification des compteurs de référence\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "@i %i @z @u. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "@i %i @u\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "le compteur de référence de l'@i %i est %Il, @s %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"ATTENTION : BOGUE DE PROGRAMMATION DANS E2FSCK !\n"
+"\tOU UN IDIOT (VOUS) EST EN TRAIN DE VÉRIFIER UN SYSTÈME DE\n"
+"\tFICHIER MONTÉ (ACTIF). inode_link_info[%i] est %N,\n"
+"\ti-node.i_links_count est %Il. Ils devraient être les mêmes !\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "le compteur de référence de l'@i d'@a %i est %N, @s %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "le @d dépasse ne nombre de liens maximum, mais la fonctionalité DIR_NLINK n'est pas activée dans le @S.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "Le compteur de référence de l'@i de @d %i est à la valeur de débordement mais pourrait être à la valeur exacte %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Passe 5 : vérification de l'information du sommaire de @g\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "Le remplissage à la fin du @B d'@i n'est pas initialisé. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "Le remplissage à la fin du @B de @bs n'est pas initialisé. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "différences de @B de @bs : "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "différences de @B d'@is : "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Le décompte des @is libres est erroné pour le @g n°%g (%i, décompté=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Le décompte des répertoires est erroné pour le @g n°%g (%i, décompté=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Le décompte des @is libres est erroné (%i, décompté=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Le décompte des @bs libres est erroné pour le @g n°%g (%b, décompté=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Le décompte des @bs libres est erroné (%b, décompté=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "ERREUR DE PROGRAMMATION : les points de terminaison (%b, %c) de @Bs du @f (n°%N) ne concordent pas avec les points de terminaison de @Bs calculés (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Erreur interne : ajustement approximatif de la fin du bitmap (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Erreur lors de la copie du @B d'@is de remplacement : %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Erreur lors de la copie du @B des @bs de remplacement : %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "Un ou des @b(s) du @g %g en cours d'utilisation alors que le @g est marqué BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "Un ou des @i(s) du @g %g en cours d'utilisation alors que le @g est marqué INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "Le @B d'@i du @g %g ne correspond pas à la somme de contrôle.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "Le @B de @b du @g %g ne correspond pas à la somme de contrôle.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Recréer le @j"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "Mise à jour de l'information de quota pour le type de quota %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Erreur lors de l'initialisation de l'information de checksum du @g de @b\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Erreur lors de l'écriture de l'information de système de fichier: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Erreur lors de la vidange des tampons d'écriture vers le périphérique de stockage: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Erreur lors de l'écriture de l'information de quota pour le type de quota %N: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Code d'erreur non traité (0x%x) !\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "IGNORÉ"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "dans move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Mémoire utilisée : %lu, temps requis : %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "taille de l'i-noeud=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "lors de l'ouverture de l'examen d'i-noeuds"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "lors du démarrage de l'examen des i-noeuds"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "lors de l'examen des i-noeuds"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "lors de l'appel de ext2fs_block_iterate pour l'i-noeud %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "lors de l'appel à ext2fs_adjust_ea_refcount2 pour l'i-noeud %u"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Lors de la troncature de"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "Lors de l'effacement de"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Utilisation : %s [-panyrcdfktvDFV] [-b super-bloc] [-B taille-de-bloc]\n"
+"\t\t[-l|-L fichiers-des-blocs-défectueux] [-C fd] [-j journal-externe]\n"
+"\t\t[-E options-étendues] périphérique\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Aide d'urgence :\n"
+" -p Réparation automatique (sans question)\n"
+" -n N'appliquer aucun changement au système de fichiers\n"
+" -y Supposer « oui » pour toutes les questions\n"
+" -c Vérifier la présence de blocs défectueux et les\n"
+" ajouter à la liste des blocs défectueux\n"
+" -f Forcer la vérification même si le système de fichiers\n"
+" est marqué propre\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Travailler en mode bavard\n"
+" -b super-bloc Utiliser un bloc alternatif pour le superbloc\n"
+" -B taille-de-bloc Forcer la taille des blocs lors de la recherche du\n"
+" superbloc\n"
+" -j journal-externe Définir la localisation du journal externe\n"
+" -l fichier-des-blocs-erronés\n"
+" Ajouter à la liste des blocs défectueux\n"
+" -L fichier-des-blocs-erronés\n"
+" Définir la liste des blocs défectueux\n"
+" -z fichier-d-annulation\n"
+" Créer un fichier d'annulation\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s : %u/%u fichiers (%0d.%d%% non contigus), %llu/%llu blocs\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u i-noeud utilisé (%2.2f%%, sur %u)\n"
+msgstr[1] ""
+"\n"
+"%12u i-noeuds utilisés (%2.2f%%, sur %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u fichier non contigu (%0d.%d%%)\n"
+msgstr[1] "%12u fichiers non contigus (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u répertoire non contigu (%0d.%d%%)\n"
+msgstr[1] "%12u répertoires non contigus (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " nombre d'i-noeuds avec des blocs ind/dind/tind : %u/%u/%u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " Histogramme des profondeurs d'extents : "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu bloc utilisé (%2.2f%%, sur %llu)\n"
+msgstr[1] "%12llu blocs utilisés (%2.2f%%, sur %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u bloc défectueux\n"
+msgstr[1] "%12u blocs défectueux\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u fichier de grande taille\n"
+msgstr[1] "%12u fichiers de grande taille\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u fichier normal\n"
+msgstr[1] ""
+"\n"
+"%12u fichiers normaux\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u répertoire\n"
+msgstr[1] "%12u répertoires\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u fichier de périphérique en mode caractère\n"
+msgstr[1] "%12u fichiers de périphérique en mode caractère\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u fichier de périphérique en mode bloc\n"
+msgstr[1] "%12u fichiers de périphérique en mode bloc\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifos\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u lien\n"
+msgstr[1] "%12u liens\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u lien symbolique"
+msgstr[1] "%12u liens symboliques"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u lien symbolique rapide)\n"
+msgstr[1] " (%u liens symboliques rapides)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+msgstr[1] "%12u sockets\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fichier\n"
+msgstr[1] "%12u fichiers\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "lors de la détermination à savoir si %s est monté."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Attention ! %s est monté.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Attention ! %s est en cours d'utilisation.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s est monté.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s est en cours d'utilisation.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Ne peut continuer, arrêt immédiat.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"ATTENTION !!! Le système de fichiers est monté. Si vous continuez\n"
+"vous ***CAUSEREZ*** des dommages ***SÉVÈRES*** au système de fichiers.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Souhaitez-vous réellement continuer"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "vérification stoppée.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " contient un système de fichiers comportant des erreurs"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " n'a pas été démonté proprement"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " les fonctionnalités du superbloc primaire diffèrent de celles de la sauvegarde"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " a été monté %u fois sans avoir été vérifié"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " a une date de dernière vérification du système de fichiers dans le futur"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " a passé %u jours sans avoir été vérifié"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "ignorons l'intervale de vérification, broken_system_clock est activé\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", vérification forcée.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s : propre, %u/%u fichiers, %llu/%llu blocs"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (vérification remise à plus tard : sur batterie)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (vérification lors du prochain montage)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (vérification dans %ld montages)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERREUR : ne peut ouvrir /dev/null (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Version EA invalide.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "Taille de tampon de lecture anticipée invalide.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Option étendue inconnue : %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Les options étendues sont séparées par des virgules et peuvent prendre un\n"
+"argument qui est défini à l'aide d'un signe d'égalité (« = »). Les options\n"
+"valides sont:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<version_ea (1 ou 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<taille buffer>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Erreur de syntaxe dans le fichier de configuration d'e2fsck (%s,\n"
+"\tligne n°%d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "ERREUR lors de la validation du descripteur de fichier %d : %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "Descripteur de fichier d'information de complétion invalide"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Seule une des options -p/-a, -n ou -y peut être spécifiée."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "L'option -t n'est pas supportée sur cette version d'e2fsck.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Impossible de résoudre « %s »"
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "Les options -n et -D sont incompatibles."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "Les options -n et -c sont incompatibles."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Les options -n et -l/-L sont incompatibles."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Les options -D et -E fixes_only sont incompatibles."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Les options -E bmap2extent et fixes_only sont incompatibles."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "lors de l'ouverture de %s pour la vidange"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "lors de la tentative de vidange de %s"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Les options -c et -l/-L ne peuvent pas être utilisées simultanément.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG « %s » n'est pas un entier\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Argument non numérique invalide pour -%c (« %s »)\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "L'intervale de protection contre montage multiple (MMP) est de %u secondes et temps total d'attente est de %u seconds. Veuillez patienter...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "lors de la vérification du block MMP"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Si vous êtes sûr(e) que le système de fichiers n'est en cours d'utilisation sur aucun noeud, lancer:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "lors de la lecture du bloc MMP"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Écrasement du système de fichiers existant ; cela peut être défait en utilisant la commande :\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "lors de la tentative d'effacement de %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "lors de la tentative de mise en place du fichier d'annulation\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Erreur : la version de la bibliothèque ext2fs est périmée !\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "lors de la tentative d'initialisation du programme"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tUtilisation de %s, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "a besoin d'un terminal pour des réparations en mode interactif"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s : %s tentons d'utiliser les blocs de sauvetage...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Superbloc invalide,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Les descripteurs de groupe semblent en mauvais état..."
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s : %s lors de l'utilisation des blocs de sauvetage"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s : retour au superblock originel\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"La version du système de fichiers est apparemment trop élevée pour cette \n"
+"version d'e2fsck. (ou bien le superbloc du système de fichiers est\n"
+"corrompu)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "Peut-être cette partition est-elle de taille zéro ?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Vous devez avoir un accès %s au système de fichiers ou être root\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Périphérique peut-être inexistent ou pour le swap ?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"Système de fichier monté ou ouvert en mode exclusif par un autre\n"
+"programme ?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "Périphérique peut-être inexistant ?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Disque protégé en écriture ; utilisez l'option -n pour effectuer une\n"
+"vérification du périphérique en lecture seule.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: Essai de chargement du superblock malgré les erreurs...\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "Veuillez obtenir une version plus récente d'e2fsck !"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "lors de la vérification du journal pour %s"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "Ne peut procéder à une vérification du système de fichier."
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr ""
+"Avertissement : saute la récupération du journal puisque l'on\n"
+"procède à l'examen d'un système de fichiers en lecture seule.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "impossible d'initialiser les drapeaux du superbloc sur %s\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Erreur de somme de contrôle de journal trouvée dans %s\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Journal corrompu dans %s\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "lors de la récupération du journal de %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s a une(des) fonctionnalité(s) non supportée(s) :"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s a un encodage non supporté : %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s : %s lors de la lecture de l'i-noeud des blocs défectueux\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Cela ne semble pas être bien, mais on va quand même essayer...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Création du journal (%d blocs) : "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr "Complété.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** le journal a été regénéré ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "arrêté"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s : e2fsck a été annulé.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Re-démarrons e2fsck depuis le début...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "lors de la réinitialisation du contexte"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** LES ERREURS DU SYSTÈME DE FICHIERS ONT ÉTÉ CORRIGÉES *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: Le système de fichier a été modifié.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** LE SYSTÈME DE FICHIERS A ÉTÉ MODIFIÉ *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s : ***** RÉ-AMORCER LE SYSTÈME *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s : **ATTENTION : le système de fichiers contient encore des erreurs**\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "oO"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "tT"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " ('t' active 'oui' pour tout) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<o>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (o/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "annulé !\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "oui pour tout\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "oui\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "non\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s ? non\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s ? oui\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "oui"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "non"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps : bloc(s) de bitmap illégal(aux) pour %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "la lecture des bitmaps d'i-noeuds et de blocs"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "lors de la tentative de re-lecture des bitmaps pour %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "l'écriture des bitmaps de blocs et d'i-noeuds"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "lors d'une nouvelle tentative d'écriture de bitmaps de blocs et d'i-noeuds pour %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: INCONSISTENCE INATTENDUE ; EXÉCUTEZ fsck MANUELLEMENT.\n"
+"\t(i.e., sans options -a ou -p)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Mémoire utilisée : %lluk/%lluk (%lluk/%lluk), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Mémoire utilisée : %llu, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "temps : %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "temps écoulé : %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "lors de la lecture de l'i-noeud %lu dans %s"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "lors de l'écriture de l'i-noeud %lu dans %s"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "INCOHÉRENCE INATTENDUE : le système de fichiers a été modifié pendant le déroulement de fsck.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "complété \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Utilisation : %s [-b taille_de_bloc] [-i fichier_d_entrée]\n"
+" [-o fichier_de_sortie] [-svwnfBX] [-c blocs_à_la_fois]\n"
+" [-d facteur_délai_entre_lectures]\n"
+" [-e max_blocks_défectueux] [-p nombre_de_passes]\n"
+" [-t motif_de_test [-t motif_de_test [...]]]\n"
+" périphérique [dernier_bloc [premier_bloc]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Les options -n et -w sont mutuellement exclusive.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% effectué, %s écoulé. (%d/%d/%d erreurs)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Test en cours avec un motif aléatoire : "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Test en cours avec le motif 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "lors de la recherche"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valeur bizarre (%ld) dans do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "lors de l'exécution d'ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "lors du début de l'itération de la liste des blocs défectueux"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "lors de l'allocation des tampons"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Vérification des blocs %lu à %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Vérification des blocs défectueux en mode lecture seule\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Vérification des blocs défectueux (test en mode lecture seule) : "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Trop de blocs défectueux, test abandonné\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Vérification des blocs défectueux en mode lecture-écriture\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Du bloc %lu au bloc %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Lecture et comparaison : "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+"Vérification des blocs défectueux dans un mode non destructif de lecture-\n"
+"écriture\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Vérification des blocs défectueux (test non destructif de lecture-écriture)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Interruption, nettoyage en cours\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "lors du test d'écriture de données, bloc %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s est monté ; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"l'exécution de badblocks est tout de même forcée.\n"
+"Espérons que /etc/mtab est incorrect.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "il n'est pas prudent d'exécuter badblocks !\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s est apparemment utilisé par le système ; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "blocs erronés forcés de toutes manières.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s invalide - %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Nombre maximum de blocs défectueux %u trop grand - le maximum est %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "ne peut allouer de la mémoire pour motif_de_test - %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Au plus un seul motif_de_test peut être spécifé en mode lecture seule"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Un motif_de_test aléatoire n'est pas permis en mode lecture seule"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Taille invalide de bloc : %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Paramètre blocks_at_once invalide : %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Ne peut déterminer la taille du périphérique ; vous devez spécifier\n"
+"la taille manuellement\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "lors de la tentative de détermination de la taille du périphérique"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "dernier bloc"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "premier bloc"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "bloc de départ invalide (%llu) : doit être moins de %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "bloc de départ invalide (%llu) : doit être une valeur sur 32 bit"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "lors de la création en mémoire d'une liste des blocs défectueux"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "fichier d'entrée - mauvais format"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "lors de l'ajout en mémoire à la liste des blocs défectueux"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Passe complétée, %u blocs défectueux repérés. (%d/%d/%d erreurs)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Utilisation : %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p projet] [-v version] fichiers...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "projet erroné - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "version erronée - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "lors de l'évaluation par stat() de %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "lors de la lecture des drapeaux sur %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Drapeaux de %s initialisés comme "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "lors de l'initialisation des drapeaux sur %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Version de %s initialisée à %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "lors de l'initialisation de la version sur %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Projet de %s initialisé à %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "lors de l'initialisation du projet sur %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Ne peut allouer une variable de chemin dans chattr_dir_proc"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= est incompatible avec - et +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Vous devez utiliser « -v », = - ou +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "lors de la lecture de l'i-noeud %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "lors de l'extension du répertoire"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "lors de la liaison de « %s »"
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "lors de l'écriture de l'i-noeud %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "lors du listage des attributs de « %s »"
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "lors de l'ouverture de l'i-noeud %u"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "lors de la lecture des xattrs pour l'i-noeud %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "lors d'une allocation mémoire"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "lors de la lecture de l'attribut « %s » de « %s »"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "lors de l'écriture de l'attribut « %s » dans l'i-noeud « %u »"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "lors de la fermeture de l'i-noeud %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "lors de l'allocation de l'i-noeud « %s »"
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "lors de la création de l'i-noeud « %s »"
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "lors de la création du lien symbolique « %s »"
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "lors de la recherche de « %s »"
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "lors de la création du répertoire « %s »"
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "lors de l'ouverture de « %s » pour copie"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "lors du changement de répertoire courant vers « %s »"
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "lors du parcours du répertoire « %s »"
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "lors d'un lstat sur « %s »"
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "lors de la création du fichier spécial « %s »"
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "échec de malloc"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "lors de la tentative de lecture du lien « %s »"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "la taille du lien symbolique a augmenté entre lstat() et readlink()"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "lors de l'écriture du lien symbolique « %s »"
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "lors de l'écriture du fichier « %s »"
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "lors de la fabrication du répertoire « %s »"
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "lors du changement de répertoire"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "ignorons l'entrée « %s »"
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "lors de l'initialisation de l'i-noeud pour « %s »"
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "lors de l'initialisation des xattrs pour « %s »"
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "lors de la sauvegarde des données de l'i-noeud"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "lors de la copie des xattrs sur le répertoire racine"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Utilisation : %s [-bfghimxV] [-o superblock=<nombre>] [-o blocksize=<nombre>] périphérique\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blocs"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "clusters"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Groupe %lu : (Blocs "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " csum 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (ATTENDU 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " superbloc %s à "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primaire"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Secours"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Descripteurs de groupes à "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Blocs réservés GDT à "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Descripteur de groupe à "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Bitmap de blocs à "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", csum 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Bitmap d'i-noeuds à "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Table d'i-noeuds à "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u %s libres, %u i-noeuds libres, %u répertoires%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u i-noeuds non utilisés\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Blocs libres : "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " I-noeuds libres : "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "lors de l'affichage de la liste des blocs défectueux"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Blocs défectueux : %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "lors de la lecture de l'i-noeud du journal"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "lors de l'ouverture de l'i-noeud du journal"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "lors de la lecture du journal du superbloc"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Le numéro magique du superbloc de journal est invalide !\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "lors de la lecture du journal du superbloc"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Ne peut trouver les numéros magiques du superbloc du journal"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "n'a pus allouer de tampon MMP\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "lecture du bloc MMP %llu depuis '%s'\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Impossible d'allouer de la mémoire pour analyser les options !\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Paramètre de superbloc invalide : %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Paramètre de taille de bloc invalide : %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Une ou des options spécifiées sont erronées : %s\n"
+"\n"
+"Les options étendues sont séparées par des virgules et peuvent prendre un\n"
+"\targument qui est défini à l'aide d'un signe d'égalité (« = »).\n"
+"\n"
+"Les options valides sont:\n"
+"\tsuperblock=<numéro de superbloc>\n"
+"\tblocksize=<taille de bloc>\n"
+"\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tUtilisation de %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Impossible de trouver un superbloc de système de fichiers valide.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: la fonctionalité MMP n'est pas activée.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "lors de la tentative de lecture des bitmaps '%s'\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Lancez e2fsck maintenant !\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Utilisation : %s [ -r|Q ] [ -f ] [ -b superbloc ] [ -B taille_bloc ] périphérique fichier_image\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I périphérique fichier_image\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o décalage-src ] [ -O décalage-dst ] src_fs [ dest_fs ]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "lors de l'allocation d'un tampon"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Écriture du bloc %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "Erreur lors de d'écriture du bloc %llu"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "erreur dans generic_write()"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Erreur : la taille d'en-tête est plus grande que wrt_size\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "Ne peut allouer un tampon d'en-tête\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "lors de l'écriture du superbloc"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "lors de l'écriture de la table d'i-noeuds"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "lors de l'écriture du bitmap de blocs"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "lors de l'écriture du bitmap d'i-noeuds"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Bloc des répertoires %llu corrompu: mauvais rec_len (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Bloc des répertoires %llu corrompu: mauvais name_len (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu blocs (%d%%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Copie "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Arrêter maintenant va détruire le système de fichier, interrompez de nouveau si vous êtes sûr\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " reste %s à %.2f Mo/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "erreur de lecture du bloc %llu"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Copié %llu / %llu blocs (%d%%) dans %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "à %.2f Mo/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "lors de l'allocation d'une table l1"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "lors de l'allocation d'un cache l2"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Attention : Il reste des tables dans le cache lors de la libération du cache, les données seront perdue, et donc l'image pourrait ne pas être valide.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "lors de l'allocation de ext2fs_qcow2_image"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "lors de l'initialization de ext2fs_qcow2_image"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Erreur de programmation : plusieurs blocs séquentiels refcount ont été créés !\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "lors de l'allocation d'un bitmap de blocs"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "lors de l'allocation d'un bitmap de bloc scamble"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Examen des i-noeuds...\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "Ne peut allouer le tampon de bloc"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "lors de l'obtention de l'i-noeud suivant"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "lors de l'iteration sur l'i-noeud %u"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Les images brutes et qcow2 ne peuvent pas être installée"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "erreur lors de la lecture des bitmaps"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "lors de l'ouverture du fichier de périphérique"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "lors de la restauration de de la table de l'image"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "L'option -a ne peut être utilisée qu'avec les images brutes ou QCOW2."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "L'option -b ne peut être utilisée qu'avec les images brutes ou QCOW2."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "Les décalages ne sont autorisés qu'avec les images brutes."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Le mode de déplacement n'est autorisé qu'avec les images brutes."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "Le mode de déplacement nécessite tous les mode de données."
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "vérification de montage existant"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Lancer e2image sur un système de fichier monté en écriture peut\n"
+"produire une image incohérente qui ne sera pas utile pour des fins\n"
+"de débuggage. Utilisez l'option -f si vous voulez réellement faire\n"
+"cela.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "Une image QCOW2 ne peut pas être écrite sur stdout !\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "Ne peut pas examiner la sortie\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "L'image (%s) est compressée\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "L'image (%s) est chiffrée\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "L'image (%s) est corrompue\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "lors de l'essai de conversion de l'image qcow2 (%s) en image brute (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "L'option -c n'est supportée qu'en mode brut\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "L'option -c n'est pas supportée avec écriture sur stdout\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "lors de l'allocation de check_buf"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "L'option -p n'est supportée qu'en mode brut\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d blocs contenaient déjà les données devant être copiées\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Utilisation : %s -r périphérique\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label : impossible d'ouvrir %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label : ne peut atteindre le superbloc\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label : erreur de lecture du superbloc\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label : n'est pas un système de fichiers ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Avertissement : étiquette trop longue, sera tronquée.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label : ne peut atteindre le superbloc à nouveau\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label : erreur lors de l'écriture du superbloc\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Utilisation : e2label périphérique [nouvelle_étiquette]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Utilisation : %s [-f] [-h] [-n] [-o décalage] [-v] [-z fichier_annulation] <fichier transaction> <système de fichiers>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Le superbloc du système de fichier ne correspond pas au fichier d'annulation\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "L'UUID ne correspond pas.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "La date de dernier montage ne correspond pas.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "La date de dernière écriture ne correspond pas.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Le compteur de durée de vie d'écriture ne correspond pas.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "lors de la lecture superbloc du système de fichiers."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "lors de la récupération du superbloc"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "La somme de contrôle du superbloc du fichier d'annulation ne correspond pas.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "décalage illégal - %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "On ne peut pas écrire dans un fichier d'annulation pendant son rejeu.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "lors de l'ouverture du fichier d'annulation « %s »\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "lors de la lecture du fichier d'annulation"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s : N'est pas un fichier d'annulation\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: La somme de contrôle de l'en-tête ne correspond pas.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: En-tête de fichier d'annulation corrompu.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: La taille de bloc d'annulation est trop grande.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Taille de bloc d'annulation trop petite.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Fonctionnalité de fichier d'annulation inconnue positionnée.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Erreur lors la détermination à savoir si %s est monté."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo ne devrait être lancé que sur des systèmes de fichiers non montés"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "lors de l'ouverture de « %s »"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "le décalage spécifié est trop grand"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "lors de la lecture des clés"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: nombre magique de clé incorrect à %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: erreur de somme de contrôle du bloc de clé à %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: le bloc %llu est trop long."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "lors de la récupération du bloc %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "erreur de somme de contrôle dans le bloc de système de fichier %llu (bloc d'annulation %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "lors de d'écriture du bloc %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Fichier d'annulation corrompu ; lancez e2fsck MAINTENANT !\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "Erreur d'E/S pendant le rejeu ; lancez e2fsck MAINTENANT !\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Enregistrement d'annulation incomplet ; lancez e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Usage : findsuper périphérique [octets_à_escamoter [début_en_Ko]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "octets à escamoter doit être un nombre, non pas %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "octets à escamoter doit être un multiple de la taille de secteur\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "début en Ko doit être un nombre, non pas %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "startkb devrait être supérieur ou égal à 0, non pas %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "début à %llu, avec un incrément de %u octets\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] probablement un superbloc écrit dans le superbloc de journal ext3,\n"
+"\tet donc start/end/grp incorrect\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "décalage_o début_o find_o blocs_sf blksz grp mkfs/date_montage sb_uuid étiquette\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: terminé avec errno %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "ATTENTION : impossible d'ouvrir %s : %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "ATTENTION : format erroné sur la ligne %d de %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"ATTENTION : votre fichier /etc/fstab ne contient pas de champ\n"
+"\tde numéro de passe fsck. Je vais arranger cette situation pour vous\n"
+"\tmais vous devriez corriger votre fichier /etc/fstab aussi tôt que\n"
+"\tpossible.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck : %s : non trouvé\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s : wait : plus de processus fils ?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Avertissement... %s pour le périphérique %s s'est terminé avec le signal %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s : l'état est %x, ne devrait jamais se produire.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Terminé avec %s (état de fin d'exécution %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s : Erreur %d lors de l'exécution de fsck.%s pour %s\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Soit tous ou aucun des types de systèmes de fichiers passés à -t doivent\n"
+"être préfixés par « no » ou « ! ».\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Impossible d'allouer de la mémoire pour les types de systèmes de fichiers\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s : saut de la mauvaise ligne de /etc/fstab : montage « bind » avec un numéro de passe fsck non nul\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck : ne peut pas vérifier %s : fsck.%s non trouvé\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Vérification de tous les systèmes de fichiers.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--en attente-- (passe %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Utilisation : fsck [-AMNPRTV] [ -C [ fd ] ] [-t type_sys_fichiers] [options_sys_fichiers] [sys_fichiers...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s : trop de périphériques\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s : trop d'arguments\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Montage en lecture seule.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Utilisateurs autorisés à allouer tous les blocs. Ceci est dangereux !\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "SVP exécutez e2fsck -fy %s.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s : montage en lectur seule sans récupération du journal\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Le journal a besoin d'une récupération ; lancer « e2fsck -E journal_only » est nécessaire.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: Écrire dans le journal n'est pas supporté.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Avertissement: Montage d'un système de fichier non vérifié, lancer e2fsck est recommandé.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Avertissement: Nombre maximum de montage atteint, lancer e2fsck est recommandé.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Avertissement: Date de vérification atteinte ; lancer e2fsck est recommandé.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Orphelins détectés ; lancer e2fsck est recommandé.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Erreurs détectées ; lancer e2fsck est requis.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Utilisation : %s [-RVadlpv] [fichiers...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Lors de la lecture des drapeaux sur %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Lors de la lecture du projet sur %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Lors de la lecture de la version sur %s"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Ne peut allouer une variable de chemin dans lsattr_dir_proc\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Utilisation : %s [-c|-l nom-de-fichier] [-b taille-de-bloc] [-C taille-de-cluster]\n"
+"\t[-i octets-par-i-noeud] [-I taille-des-i-noeuds]\n"
+"\t[-J options-de-journal] [-G taille-groupe-flex] [-N nombre-d-i-noeuds]\n"
+"\t[-d répertoire-racine] [-m pourcentage-de-blocs-réservés]\n"
+"\t[-o système-d-exploitation-de-création] [-g blocs-par-groupe]\n"
+"\t[-L étiquette-du-volume] [-M dernier-répertoire-monté]\n"
+"\t[-O fonctionnalité[,...]] [-r révision-du-système-de-fichiers]\n"
+"\t[-E option-étendue[,...]] [-t type-système-de-fichiers] [-T type-d'utilisation]\n"
+"\t[-U UUID] [-e comportement_erreur] [-z fichier_annulation]\n"
+"\t[-jnqvDFSV] périphérique [nombre-de-blocs]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Exécution de la commande : %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "durant la tentative d'exécution de « %s »"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "lors du traitement de la liste des blocs défectueux à partir du programme"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Bloc %d dans la zone du descripteur de superbloc/groupe primaire est défectueux.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Les blocs de %u à %u doivent être en bon état pour générer le système de fichiers.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Arrêt immédiat...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Avertissement : les sauvegardes des descripteurs de superblocs/groupes au\n"
+"\tbloc %u contiennent des blocs défectueux.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "lors du marquage des blocs défectueux en tant qu'utilisés"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "lors de l'écriture des i-noeuds réservés"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Écriture des tables d'i-noeuds : "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Impossible d'écrire %d blocs dans la table d'i-noeuds débutant à %llu : %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "complété \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "lors de la création du répertoire racine"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "lors de la lecture de l'i-noeud racine"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "lors de l'initialisation de la propriété de l'i-noeud racine"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "lors de la création de /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "lors de la recherche de /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "lors de l'extension de /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "lors de l'initialisation de l'i-noeud des blocs défectueux"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Mémoire épuisée lors de l'effacement des secteurs %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Avertissement : impossible de lire le bloc 0 : %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Avertissement : impossible d'effacer le secteur %d : %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "lors du découpage de la taille du journal"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "lors de l'initialisation du journal du superbloc"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Mise à zéro du périphérique de journal : "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "lors de la mise à zéro du périphérique de journal (bloc %llu, compte %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "lors de l'écriture du superbloc de journal"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "En train de créer un système de fichiers avec %llu %dk blocs et %u i-noeuds.\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Avertissement : %llu blocs inutilisés.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Étiquette de système de fichiers=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Type de système d'exploitation : %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Taille de bloc=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Taille de cluster=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Taille de fragment=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "« Stride » = %u blocs, « Stripe width » = %u blocs\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u i-noeuds, %llu blocs\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu blocs (%2.2f%%) réservés pour le super utilisateur\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Premier bloc de données=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Propriétaire du répertoire racine=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Nombre maximum de blocs du système de fichiers=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u groupes de blocs\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u groupe de bloc\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blocs par groupe, %u clusters par groupe\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blocs par groupe, %u fragments par groupe\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u i-noeuds par groupe\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID de système de fichiers=%s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblocs de secours stockés sur les blocs : "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s nécessite '-O 64bit'\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "'%s' doit être avant 'resize=%u'\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "desc_size invalide: '%s'\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Graine de hachage invalide: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Décalage invalide : %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "mmp_update_interval invalide : %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Nombre de superbloc de secours invalide : %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Paramètre « stride » invalide : %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Paramètre « stripe-width » invalide : %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Paramètre de changement de taille invalide : %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+"La taille maximale de l'agrandissement doit être plus grande que la taille\n"
+"du système de fichiers.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+"Le changement de taille en ligne n'est pas supportée avec les systèmes de\n"
+"fichiers de version 0\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "root_owner invalide : « %s »\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Encodage invalide : %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Une ou des options spécifiées sont erronées : %s\n"
+"\n"
+"Les options étendues sont séparées par des virgules et peuvent prendre un\n"
+"\targument qui est défini à l'aide d'un signe d'égalité (« = »).\n"
+"\n"
+"Les options valides sont :\n"
+"\tmmp_update_interval=<intervalle>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<taille en blocs des morceaux par disque RAID>\n"
+"\tstripe-width=<stride RAID * nombre de disques en blocs>\n"
+"\toffset=<décalage où créer le système de fichiers>\n"
+"\tresize=<taille maximale de changement de taille en blocs>\n"
+"\tpacked_meta_blocks=<0 pour désactiver, 1 pour activer>\n"
+"\tlazy_itable_init=<0 pour désactiver, 1 pour activer>\n"
+"\tlazy_journal_init=<0 pour désactiver, 1 pour activer>\n"
+"\troot_owner=<uid du répertoire racine>:<gid du répertoire racine>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encodage>\n"
+"\tencoding_flags=<drapeaux>\n"
+"\tquotatype=<type(s) de quota(s) à activer>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Attention : le « stripe-width » RAID %u n'est pas multiple impair du « stride » %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "erreur : drapeau d'encodage invalide: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "erreur : Un encodage doit être explicitement spécifié lorsque encoding-flags est passé\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Erreur de syntaxe dans le fichier de configuration de mke2fs\n"
+"\t(%s, ligne n°%d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Jeu d'options de système de fichiers invalide : %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Jeu d'options pour le montage invalide : %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Votre mke2fs.conf ne précise pas le type de système de fichiers de\n"
+"%s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Il vous faut sans doute installer un fichier mke2fs.conf mis à jour.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Arrêt immédiat...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Avertissement : le fs_type %s n'est pas défini dans mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Impossible d'allouer de la mémoire pour un nouveau chemin.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "N'a pu initialiser le profilage correctement (erreur : %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "taille invalide des blocs - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+"Avertissement : la taille de bloc %d n'est pas utilisable\n"
+"sur la plupart des systèmes.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "taille de cluster invalide - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "« -R » est déprécié, utiliser plutôt « -E »"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "mauvais comportement en cas d'erreur - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Nombre de blocs par groupe illégal"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "le nombre de blocs par groupe doit être un multiple de 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Nombre illégal pour la taille flex_bg"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "La taille flex_bg doit être une puissance de 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "La taille flex_bg (%lu) doit être inférieur ou égal à 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "taux d'i-noeuds invalides %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "taille d'i-noeud invalide - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Avertissement : l'option -K est dépréciée et ne devrait plus être utilisée. Utiliser plutôt l'option étendue « -E nodiscard » !\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "dans malloc pour bad_blocks_filename"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"Avertissement : étiquette trop longue ; sera tronquée à « %s »\n"
+"\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "pourcentage de blocs réservés invalide - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "mauvais nombre d'i-noeuds - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "lors de l'allocation de la chaîne fs_feature"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "mauvais numéro de version - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "lors de la tentative de création de la révision %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "L'option -t ne peut être spécifiée qu'une fois"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "L'option -T ne peut être spécifiée qu'une fois"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "lors de la tentative d'ouverture du périphérique de journal %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"la taille de bloc du périphérique de journal (%d) est plus petit que la\n"
+"taille de blocs minimum %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Utilisation de la taille de bloc du périphérique de journal : %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "blocs '%s' invalides sur le périphérique %s"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "système de fichiers"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Le fichier %s n'existe pas et aucune taille n'a été spécifiée.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Création d'un fichier normal %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "lors de la tentative de détermination de la taille du système de fichiers"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Ne peut déterminer la taille du périphérique ; vous devez spécifier\n"
+"la taille du système de fichiers\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"La taille rapportée du périphérique est zéro. La partition spécifiée est\n"
+"\tinvalide ou la table de partitions n'a pas été relue après\n"
+"\tl'exécution de fdisk, dû au fait que la partition modifiée était\n"
+"\toccupée et utilisée. Vous devez ré-amorcer pour forcer une\n"
+"\trelecture de la table de partitions.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "Système de fichiers plus grand que la taille apparente du périphérique"
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "Échec du parcours de la liste de types de systèmes de fichiers\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Le HURD ne supporte pas la fonctionnalité filetype.\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Le HURD ne supporte pas la fonctionnalité huge_file.\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "Le HURD ne supporte pas la fonctionnalité metadata_csum.\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Le HURD ne supporte pas la fonctionnalité ea_inode.\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "lors de la tentative de détermination de la taille matérielle de secteur"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "lors de la tentative de détermination de la taille de secteur matériel"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "lors de la définition de la taille de bloc ; trop petite pour le périphérique\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Avertissement : la taille de bloc %d spécifiée est plus petite que la taille de secteur physique %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: La taille (0x%llx blocs) du périphérique %s est trop grande pour\n"
+"\tpouvoir être exprimée sur 32 bits en utilisant une taille de bloc de %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: La taille (0x%llx blocs) du périphérique %s est trop grande pour\n"
+"\tcréer un système de fichier utilisant une taille de block de %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "résolution de fs_types pour mke2fs.conf : "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"Fonctionnalités du système de fichiers non supportées par les systèmes de\n"
+"fichiers de version 0\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+"Les superblocs creux ne sont pas supportés par les systèmes de\n"
+"fichiers de version 0\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+"Les journaux ne sont pas supportés par les systèmes de\n"
+"fichiers de version 0\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "pourcentage de blocs réservés invalide - %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "Les extents DOIVENT être activées pour un système de fichiers 64 bit. Passez -O extents pour corriger.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "La taille d'un cluster ne peut pas être plus petite que la taille d'un bloc.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "Spécifier une taille de cluster nécessite la fonctionalité bigalloc"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "attention : Impossible d'obtenir la géométrie du périphérique %s\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "L'alignement de %s est décalé de %lu octets.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Cela peut induire de très mauvaises performances, il est suggéré de (re)-partitionner.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s a la capacité DAX, mais la taille de bloc courante %u est différente de la taille de page %u du système donc le système de fichier ne supportera pas DAX.\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "blocs de %d octets trop gros pour le système (max %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Avertissement : blocs de %d octets trop gros pour le système (max %d),\n"
+"poursuite forcée\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Suggestion : Utilisez un noyau Linux >= 3.18 pour améliorer la stabilité des fonctionalités de méta-données et somme de contrôle de journal.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Encodage de nom de fichier inconnu du profil : %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Drapeau d'encodage inconnu du profil : %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Avertissement : décalage spécifié sans une taille de système de fichier\n"
+"explicite.\n"
+"Un système de fichier possédant %llu blocks va être créé mais ce n'était\n"
+"peut-être pas ce que vous vouliez.\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "des i-noeuds de %d octets sont trop petits pour des quota de projet"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "La fonctionalité bigalloc ne peut pas être supportée sans la fonctionalité extent"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Les fonctionnalités resize_inode et meta_bg ne sont pas compatibles.\n"
+"Elles ne peuvent pas être activées simultanément.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"Attention: les systèmes de fichier bigalloc avec une taille de cluster plus\n"
+"grande que 16 foix la taille de block sont considérés comme expérimentaux\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"la réservation de blocs de changement de taille en ligne n'est pas\n"
+"supportée sur un système de fichiers non creux"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "compteur de blocs par groupe hors limite"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "La fonctionnalité flex_bg n'est pas activée, la taille flex_bg ne peut donc pas être spécifiée"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "taille d'i-noeud invalide %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "des i-noeuds de %d octets sont trop petits pour des données en ligne ; spécifiez une taille plus grande"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "Les i-noeuds de 128 octets ne peuvent pas gérer des dates au-delà de 2038 et sont dépréciés\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "trop d'i-noeuds (%llu), augmenter le ratio d'i-noeuds ?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "trop d'i-noeuds (%llu), indiquer < 2^32 i-noeuds"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"taille_i_noeud (%u) * nombre_i_noeuds (%u) trop grand pour un\n"
+"\tsystème de fichiers avec %llu blocs, indiquer un ratio_i_noeud (-i)\n"
+"\tplus grand ou un nombre d'i-noeud plus petit (-N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Rejet des blocs de périphérique : "
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "échoué - "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "lors de l'initialization du contexte de quota"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "lors de l'écriture des i-noeuds de quota"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "mauvais comportement en cas d'erreur dans le profile - %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "dans malloc pour android_sparse_params"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "lors de l'initialisation du superbloc"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Les extents ne sont pas activés. L'arbre des extents de fichier peut avoir une somme de contrôle, mais les cartes de blocs ne le peuvent pas. Ne pas activer les extents réduit la couverture des sommes de contrôle des méta-données. Passez -O extents pour corriger.\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Le support de système 64-bits n'est pas activé. La taille de champs plus grande apportée par cette fonctionalité permet des sommes de contrôle fortes. Passez -O 64bit pour corriger.\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "La fonctionalité metadata_csum_seed requière la fonctionalité metadata_csum.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "La libération a réussi et retournera des 0s - inutile d'effacer la table des i-noeuds\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "système d'exploitation inconnu - %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Allocation des tables de groupe : "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "lors de la tentative d'allocation des tables de systèmes de fichiers"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "lors du démarquage de blocs défectueux"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tlors de la conversion du bitmap de sous-cluster"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "lors du calcul du surcoût"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s peut être encore plus corrompu par une réécriture du superbloc\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "lors de la mise à zéro du bloc %llu à la fin du système de fichiers"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "lors de la réservation de blocs pour un changement de taille en ligne"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "journal"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Ajout du journal au périphérique %s : "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tlors de la tentative d'ajout d'un journal au périphérique %s"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "complété\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Pas de création de journal en mode super-seul\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Création du journal (%u blocs) : "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tlors de la tentative de création du journal"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Erreur lors de l'activation de la fonctionnalité de protection contre le montage multiple."
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "La protection contre le montage multiple est activée avec un intervale de mise à jour de %d secondes.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "Copie des fichiers dans le périphérique : "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "lors du peuplement du système de fichier"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+"Écriture des superblocs et de l'information de comptabilité du système de\n"
+"fichiers : "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "lors de l'écriture et la fermeture du système de fichiers"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"complété\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "lors de la mise à zéro du bloc %llu pour le fichier géant"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Le décalage de partition de %llu (%uk) blocs n'est pas compatible avec la taille de cluster %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Les fichiers géants vont être remplis de zéros\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Création de %lu fichier(s) géant(s) "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "avec %llu blocs chacun"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "lors de la création du fichier géant %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Utilisation : mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Utilisation : %s périphérique...\n"
+"\n"
+"Imprime l'information de partition pour chaque périphérique indiqué.\n"
+"Par exemple : %s /dev/hda\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Impossible d'ouvrir %s : %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Impossible d'obtenir la géométrie de %s : %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Impossible d'obtenir la taille de %s : %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s : h=%3d s=%3d c=%4d début=%8d taille=%8lu fin=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Cette opération nécessite un système de fichier fraîchement vérifié.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "SVP exécutez e2fsck -f sur le système de fichiers.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "SVP exécutez e2fsck -fD sur le système de fichiers.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Utilisation : %s [-c limite-maximale-de-montage]\n"
+"\t[-e comportement-en-cas-d-erreur] [-f] [-g groupe]\n"
+"\t[-i intervalle[d|m|w]] [-j] [-J options-journal] [-l]\n"
+"\t[-m pourcentage-de-blocs-réservés] [-o [^]options-de-montage[,...]]\n"
+"\t[-r nombre-de-blocs-réservés] [-u utilisateur] [-C nombre-de-montage]\n"
+"\t[-L étiquette-du-volume] [-M dernier-répertoire-monté]\n"
+"\t[-O [^]fonctionnalité[,...]] [-Q options-de-quota]\n"
+"\t[-E option-étendue[,...]] [-T date-de-dernière-vérification]\n"
+"\t[-U UUID] [-I nouvelle-taille-i-noeuds] [-z fichier_annulation]\n"
+"\tpériphérique\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Le superbloc de journal n'a pas été trouvé !\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "lors de la tentative d'ouverture du journal externe"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s n'est pas un périphérique de journal.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Le superbloc du journal est corrompu, nr_users\n"
+"est trop grand (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+"L'UUID du système de fichiers n'a pas été trouvé sur le périphérique de\n"
+"journal.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Ne peut repérer le périphérique de journal. Il n'a PAS été supprimé\n"
+"Utiliser l'option -f pour supprimer le périphérique de journal manquant.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Journal enlevé\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "lors de la lecture des bitmaps"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "lors de l'effacement de l'i-noeud du journal"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "lors de l'écriture de l'i-noeud du journal"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(et rebootez après !)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Après avoir lancé e2fsck, veuillez lancer « resize2fs %s %s »"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Veuillez exécuter « resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr " » pour activer le mode 64-bits.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr " » pour désactiver le mode 64-bits.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"AVERTISSEMENT: N'a pas pu confirmer le support noyau pour metadata_csum_seed.\n"
+" Cela nécessite Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+"La suppression de la fonctionnalité de système de fichiers '%s' n'est pas\n"
+"supportée.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+"L'ajout de la fonctionnalité de système de fichiers '%s' n'est pas\n"
+"supporté.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La fonctionnalitié has_journal peut être désactivée uniquement lorsque le\n"
+"système de fichiers est démonté ou monté en lecture seule.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Le drapeau needs_recovery est activé. SVP exécutez e2fsck avant\n"
+"de désactiver le drapeau has_journal.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Définir la fonctionalité de système de fichier 'sparse_super' n'est pas\n"
+"supporté pour les systèmes de fichiers avec la fonctionalité flex_bg activée.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"La fonctionnalité de protection contre les\n"
+"montages multiples ne peut être activée lorsque\n"
+"le système de fichier est monté ou en lecture seule.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "La protection contre le montage multiple a été activée avec un intervale de mise à jour de %ds.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"La fonctionnalité de protection contre le montage multiple ne peut\n"
+"être désactivée si le système de fichiers est en lecture seule.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "Erreur lors de la lecture des bitmaps\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Le numéro magique dans le bloc MMP ne correspond pas. attendu : %x, actuel : %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "lors de la lecture du bloc MMP."
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Désactiver les index de répertoire sur un système de fichier avec sommes de contrôle pourrait prendre du temps."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Ne peut pas désactiver dir_index sur un système de fichiers monté !\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr "Effacer le drapeau flex_bg rendrait le système de fichiers incohérent.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La fonctionnalité huge_file peut être désactivée uniquement lorsque le\n"
+"système de fichiers est démonté ou monté en lecture seule.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Activer les sommes de contrôle pourrait prendre du temps. "
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Ne peut pas activer metadata_csum sur un système de fichiers monté !\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Les extents ne sont pas activés. L'arbre des extents de fichiers peut avoir une somme de contrôle, mais les cartes de blocs ne le peuvent pas. Ne pas activer les extents réduit la couverture des sommes de contrôle des méta-données. Relancez avec -O extent pour corriger.\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Le support de système de fichier 64-bits n'est pas activé. La taille de champs plus grande apportée par cette fonctionalité permet des sommes de contrôle fortes. Lancez resize2fs -b pour corriger.\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "Désactiver les sommes de contrôle pourrait prendre du temps."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Ne peut pas désactiver metadata_sum sur un système de fichiers monté !\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Ne peut pas activer uninit_bg sur un système de fichiers monté !\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Ne peut pas désactiver uninit_bg sur un système de fichiers monté !\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Ne peut pas activer le mode 64-bits alors que le système de fichiers est monté !\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Ne peut pas désactiver le mode 64-bits alors que le système de fichiers est monté !\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Ne peut pas activer la fonctionalité projet; la taille d'i-noeud est trop petite.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Avertissement : l'option « ^quota » supplante les arguments « -Q ».\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "La fonctionalité casefold ne peut être changée que lorsque le système de fichiers est démonté.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Définir la fonctionalité 'metadata_csum_seed' n'est supporté que sur\n"
+"les systèmes de fichiers avec la fonctionalité metadata_csum activée.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"L'UUID a changé depuis l'activation de metadata_csum. Le système de fichier \n"
+"doit être démonté pour réécrire sans risque toutes les données pour \n"
+"correspondre au nouvel UUID.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "Recalculer les sommes de contrôle pourrait prendre du temps."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "Le système de fichiers a déjà un journal.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tlors de la tentative d'ouverture du journal sur %s\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Création du journal sur le périphérique %s : "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "lors de l'ajout du système de fichiers au journal sur %s"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Création de l'i-noeud du journal : "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tlors de la tentative de création du fichier journal"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Ne peut pas activer les quotas de projet; la tailles des i-noeud est trop petite.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "lors de l'initialisation du contexte de quota dans la bibliothèque support"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "lors de la mise à jour des limites de quota (%d)"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "lors de l'écriture du fichier de quota (%d)"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "lors de la suppression du fichier de quota (%d)"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Une ou des options de quota spécifiées sont erronées.\n"
+"\n"
+"Les options de quota suivantes sont disponibles (les fournir séparées par des virgules):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Ne peut analyser la spécification de date/heure : %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "compteur de montages erroné - %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nom gid/groupe erroné - %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "intervalle erroné - %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "taux de blocs réservés erroné - %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "-o ne peut être spécifié qu'une fois"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "-O ne peut être spécifié qu'une fois"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "compteur de blocs réservés erroné - %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nom utilisateur/uid erroné - %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "taille d'i-noeud invalide - %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "La taille des i-noeuds doit être une puissance de deux - %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval trop grand : %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Définition de l'intervale de mise à jour de la protection contre les montages multiples à %lu seconde\n"
+msgstr[1] "Définition de l'intervale de mise à jour de la protection contre les montages multiples à %lu secondes\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Activation du drapeau d'erreur de système de fichier pour forcer une passe fsck.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Paramètre « stride RAID » invalide : %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Paramètre « stripe-width RAID » invalide : %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algorithme de hachage invalide : %s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Définition de l'algorithme de hachage par défaut à %s (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Le peut pas changer l'encodage existant\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "Encodage invalide : %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "Définition de l'encodage à '%s'\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "Définition du drapeau encoding_flags à '%s'\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Une ou des options spécifiées sont erronées.\n"
+"\n"
+"Les options étendues sont séparées par des virgules et peuvent prendre un\n"
+"\targument qui est défini à l'aide d'un signe d'égalité (« = »).\n"
+"\n"
+"Les options étendues valides sont:\n"
+"\tclear_mmp\n"
+"\thash_alg=<algorithme de hachage>\n"
+"\tmount_opts=<options de montages étendues par défaut>\n"
+"\tmmp_update_interval=<intervale de mise à jour en secondes>\n"
+"\tstride=<taille en blocs des morceaux par disque RAID>\n"
+"\tstripe-width=<stride RAID * nombre de disques en blocs>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encodage>\n"
+"\tencoding_flags=<drapeaux>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "Échec de lecture du bitmap d'i-noeuds\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "Échec de lecture du bitmap de bloc\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "blocs à déplacer"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "N'a pu allouer de bitmap de blocs lors d'une augmentation de taille d'i-noeud \n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "Pas assez d'espace pour augmenter la taille d'i-noeud \n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "N'a pu reloger des blocs lors d'un changement de taille d'i-noeud \n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Erreur lors du changement de la taille des i-noeuds.\n"
+"Exécutez e2undo pour défaire les changements du système de fichiers. \n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Si vous êtes sûr(e) que le système de fichiers n'est en cours d'utilisation sur aucun noeud, lancer:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Le numéro magique du bloc MMP est incorrect. Essayer de le corriger en lançant:\n"
+"'e2fsck -f %s'\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "Ne peut pas modifier un périphérique de journal.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "La taille des i-noeuds est déjà %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "La réduction de la taille d'un i-noeud n'est pas supportée\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Taille d'i-noeud invalide %lu (max %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Retailles les i-noeuds pourrait prendre du temps."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Avertissement: Le journal est sale. Vous voulez peut-être rejouer le journal\n"
+"ainsi:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"et ensuite relancer cette commande. Sinon, tout changement effectué pourrait\n"
+"être écrasé par la récupération du journal.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Récupération du journal.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Définition du nombre maximal de montages à %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Définition du nombre courant de montages à %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Définition du comportement en cas d'erreur à %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Définition du gid des blocs réservés à %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "l'intervalle entre les vérifications est trop grand (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Définition de l'intervalle de vérification à %lu secondes\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Définition du pourcentage de blocs réservés à %g%% (%llu blocs)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "le nombre de blocs réservés est trop grand (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Définition du nombre de blocs réservés à %llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Le système de fichiers a déjà des superblocs creux.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Définir le drapeau creux du superbloc n'est pas supporté pour les systèmes\n"
+"de fichiers avec la fonctionalité flex_bg activée.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Drapeau de superbloc creux activé. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"La suppression du drapeau creux du superbloc n'est pas supportée.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+"Définition de la date de la dernière vérification du système de\n"
+"fichiers à %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Définition de l'uid de blocs réservés à %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Erreur lors de l'utilisation de clear_mmp. Elle doit être utilisée avec -f\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "La fonctionalité de quota ne peut être changée que lorsque le système de fichiers est démonté.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Ne peut pas changer l'UUID de ce système de fichier car il a le drapeau de fonctionnalité stable_inodes.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Définir l'UUID sur ce système de fichier pourrait prendre du temps."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"L'UUID ne peut être changé que lorsque le système\n"
+"de fichiers et démonté.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Si vous utilisez seulement des noyaux plus récents que v4.4, lancez « tune2fs -O metadata_csum_seed » et relancez cette commande.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Format UUID invalide\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Doit mettre à jour le superbloc du journal\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"La taille des i-noeuds ne peut être changée que lorsque le système\n"
+"de fichiers et démonté.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Changer la taille des i-noeuds n'est pas supporté pour les systèmes de\n"
+"fichiers avec la fonctionalité flex_bg activée.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Définition de la taille des i-noeuds à %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "N'a pu changer la taille d'i-noeud \n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Définition de la taille de « stride » à %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Définition de la taille du « stripe width » à %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Définition des options de montage étendues par défaut à « %s »\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<on procède>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Procéder malgré tout (ou attendre %d secondes pour procéder) ? (o,N) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "Procéder malgré tout ? (o,N) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"l'exécution de mke2fs est tout de même forcée.\n"
+"Espérons que /etc/mtab est incorrect.\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "ne fera pas un %s ici !\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "l'exécution de mke2fs est tout de même forcée.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "N'a pu allouer de la mémoire pour analyser les options du journal !\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"N'a pu trouver le périphérique de journal correspondant à %s\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Une ou des options de journal spécifiées sont erronées.\n"
+"\n"
+"Les options de journal sont séparées par des virgules et peuvent prendre un\n"
+"\targument qui est défini à l'aide d'un signe d'égalité (« = »).\n"
+"\n"
+"Les options de journal valides sont :\n"
+"\tsize=<taille du journal en mégaoctets>\n"
+"\tdevice=<périphérique du journal>\n"
+"\tlocation=<emplacement du journal>\n"
+"\n"
+"La taille du journal doit être comprise entre 1024 et 10240000 blocs du\n"
+"système de fichiers.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Le système de fichiers est trop petit pour un journal\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"La taille totale demandée du journal est de %d blocs ; elle doit être\n"
+"entre 1024 et 10240000 blocs. Arrêt immédiat.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"La taille totale du journal est trop grande pour le système de fichiers.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Le système de fichiers sera automatiquement vérifié tous les %d montages ou\n"
+"après %g jours, selon la première éventualité. Utiliser tune2fs -c ou -i\n"
+"pour écraser la valeur.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Utilisation : %s [-d] [-p fichier-pid] [-s chemin-socket] [-T délai]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n num] [-s chemin-socket]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "mauvais arguments"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "connection"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "écriture"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "nombre de lectures"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "longueur de réponse invalide"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "le démon uuidd est déjà en cours d'exécution avec pour pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "N'a pas pu créer la socket unix de flux : %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "N'a pas pu attacher la socket unix %s : %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "N'a pas pu écouter sur la socket unix %s : %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Erreur lors de la lecture depuis le client, longueur = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "opération %d, num entrant = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "UUID de temps généré : %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "UUID aléatoire généré : %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "UUID de temps %s et %d suivant générés\n"
+msgstr[1] "UUID de temps %s et %d suivants générés\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Généré %d UUIDs :\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Operation %d invalide\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Nombre invalide : %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Erreur lors de l'appel au démon uuidd (%s) : %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s et UUID suivant\n"
+msgstr[1] "%s et %d UUIDs suivants\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Liste des UUIDs :\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Longueur de réponse inattendue depuis le serveur %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "N'a pu tuer l'uuidd en cours d'exécution sous le pid %d : %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "A tué l'uuid en cours d'exécution sous le pid %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Utilisation : %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Vidange des extents :\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNb=%llu, Taille=%llu, Curseur=%llu, Triés=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Utilisation : %s [-d drapeaux_de_debug] [-f] [-F] [-M] [ -P] [-p] périphérique [-b|-s|nouvelle_taille] [-S RAID-stride] [-z fichier_annulation]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Extension de la table d'i-noeuds"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Relocalisation de blocs"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Examen de la table d'i-noeuds"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Mise à jour des références d'i-noeuds"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Déplacement de la table d'i-noeuds"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Passe inconnue ?!?!"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Début de la passe %d (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Retailler un système de fichier bigalloc n'a pas été complètement testé.\n"
+"Procédez selon votre propre risque ! Utilisez l'option force si vous\n"
+"voulez continuer malgré tout.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "lors de l'ouverture de %s"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "lors de la récupérartion de l'état de %s"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"SVP exécutez « e2fsck -f %s » d'abord.\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Taille minimale estimée du système de fichiers : %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "taille d'i-noeud invalide - %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "La nouvelle taille est trop grande pour être exprimée sur 32 bits\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "La nouvelle taille produit trop de descripteurs de groupes de blocs.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "La nouvelle taille est plus petite que le minimum (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Longueur « stride » invalide"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"La partition (ou le périphérique) contenante n'a que %llu (%dk) blocs.\n"
+"Vous avez demandé une nouvelle taille de %llu blocs.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Ne peut pas positionner et dépositionner la fonctionnalité 64-bits.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Ne peut pas changer la fonctionnalité sur un système de fichiers qui est plus grand que 2^32 blocs.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "La fonctionalité de 64 bits ne peut être changée lorsque le système de fichiers est monté.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Veuillez activer la fonctionnalité des extents avec tune2fs avant d'activer la fonctionalité 64-bits.\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Le système de fichiers a déjà %llu blocs (%dk). Rien à faire !\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Le système de fichiers est déjà 64 bits.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Le système de fichiers est déjà 32 bits.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Ne peut pas réduire ce système de fichier car il a le drapeau de fonctionnalité stable_inodes.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Conversion du système de fichiers en 64 bits.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Conversion du système de fichiers en 32 bits.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "En train de redimensionner le système de fichiers sur %s à %llu (%dk) blocs.\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "lors de la tentative de changement de taille de %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Veuillez lancer « e2fsck -fy %s » pour corriger le système de fichiers\n"
+"après l'opération de changement de taille avortée.\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Le système de fichiers sur %s a maintenant une taille de %llu blocs (%dk).\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "lors de la troncature de %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "Le noyau ne supporte pas le changement de taille en ligne avec sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "Le système de fichiers de %s est monté sur %s ; le changement de taille doit être effectué en ligne\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "La réduction en ligne n'est pas supportée"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Le système de fichiers ne supporte pas le changement de taille en ligne"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Pas assez de blocs gdt réservés pour un changement de taille"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Le noyau ne sait pas retailler un système de fichiers d'une telle taille"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "lors de la tentative d'ouverture du point de montage %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Utilisation de l'ancienne interface de changement de taille.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Permission de redimensionner le système de fichiers refusée"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Lors de la vérification du support de changement de taille en ligne"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Le noyau ne supporte pas le changement de taille en ligne"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "En train d'effectuer un changement de taille en ligne de %s vers %llu (%dk) blocs.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Lors de la tentative d'étendre le dernier groupe"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Lors de la tentative d'ajout du groupe numéro %d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "Le système de fichiers de %s est monté sur %s, et le changement de taille en ligne n'est pas supporté sur ce système.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "le nombre d'i-noeuds (%llu) doit être plus petit que %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "blocs réservés"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "blocs de métadonnées"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "nouveaux blocs de métadonnées"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Ne devrait jamais arriver ! Pas de sb dans le dernier super_sparse bg ?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Ne devrait jamais arriver ! old_desc inattendu dans super_sparse bg ?\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Ne devrait jamais se produire : i-noeud de redimensionnement corrompu !\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "Bibliothèque EXT2FS version 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Numéro magique invalide pour la structure ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Numéro magique invalide pour la structure badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Numéro magique invalide pour la structure badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Numéro magique invalide pour la structure inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Numéro magique invalide pour la structure io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Numéro magique invalide pour la structure io_channel unix"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Numéro magique invalide pour la structure io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Numéro magique invalide pour la structure block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Numéro magique invalide pour la structure inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Numéro magique invalide pour la structure generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Numéro magique invalide pour la structure io_channel de test"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Numéro magique invalide pour la structure de liste de bloc de répertoire"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Numéro magique invalide pour la structure icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Numéro magique invalide pour la structure Powerquest io_channel"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Numéro magique invalide pour la structure de fichier ext2"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Numéro magique invalide pour l'en-tête d'image Ext2"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Numéro magique invalide pour la structure io_channel d'i-noeud"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Numéro magique invalide pour le handle d'extent ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Numéro magique invalide dans le super-bloc"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Révision de système de fichier trop grande"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Tentative d'écriture dans un système de fichiers ouvert en lecture seule"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Ne peut lire les descripteurs de groupes"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Ne peut écrire les descripteurs de groupes"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Descripteur de groupe corrompu : bloc invalide pour le bitmap de blocs"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Descripteur de groupe corrompu : bloc invalide pour le bitmap d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Descripteur de groupe corrompu : bloc invalide pour la table d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Ne peut écrire un bitmap d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Ne peut lire un bitmap d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Ne peut écrire un bitmap de blocs"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Ne peut lire un bitmap de blocs"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Ne peut écrire une table d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Ne peut lire une table d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Ne peut lire l'i-noeud suivant"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Le système de fichiers a une taille de bloc inattendue"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Répertoire EXT2 corrompu"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "La tentative de lecture d'un bloc depuis le système de fichiers a produit une lecture tronquée"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "La tentative d'écriture d'un block vers le système de fichiers a produit une écriture tronquée"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Pas de place libre dans le répertoire"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Bitmap d'i-noeuds non chargé"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Bitmap de blocs non chargé"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Numéro d'i-noeud illégal"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Numéro de bloc illégal"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Erreur interne dans ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Pas assez d'espace pour construire le système de fichiers proposé"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Numéro de blocs illégal passé à ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Numéro de blocs illégal passé à ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Numéro de blocs illégal passé à ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Numéro de blocs illégal passé à ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Numéro de blocs illégal passé à ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Numéro de blocs illégal passé à ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Tentative de truquage de la fin du bitmap de blocs au-delà de la fin réelle"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Tentative de truquage de la fin du bitmap d'i-noeuds au-delà de la fin réelle"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Bloc indirect illégal repéré"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Bloc doublement indirect illégal repéré"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Bloc triplement indirect illégal repéré"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Les bitmaps de blocs ne sont pas les mêmes"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Les bitmaps d'i-noeuds ne sont pas les mêmes"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Nom de périphérique illégal ou mal formé"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Il manque une table d'i-noeuds à un groupe de blocs"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Le superbloc ext2 est corrompu"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Numéro de bit générique illégal passé à ext2fs_mark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Numéro de bit générique illégal passé à ext2fs_unmark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Numéro de bit générique illégal passé à ext2fs_test_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Trop de liens symboliques rencontrés."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "La fonction de rappel ne traitera pas ce cas"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "L'i-noeud provient d'un bloc défectueux dans la table d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Le système de fichiers a une(des) fonctionnalité(s) non supportée(s)"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Le système de fichiers a une(des) fonctionnalité(s) en lecture seule non supportées"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Le canal d'E/S n'a pas pu se déplacer sur une lecture ou écriture"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Échec d'allocation mémoire"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Argument invalide passé à la bibliothèque ext2"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "N'a pu allouer de bloc dans le système de fichiers ext2"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "N'a pu allouer d'i-noeud dans le système de fichiers ext2"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "L'i-noeud ext2 n'est pas un répertoire"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Trop de références dans la table"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Fichier non trouvé par ext2_lookup"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Fichier ouvert en lecture seule"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Bloc de répertoire d'ext2 non trouvé"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Le répertoire ext2 existe déjà"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Function de bibliothèque ext2 non implémentée"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Requête d'annulation utilisateur"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Fichier ext2 trop grand"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Le périphérique de journal fourni n'est pas un périphérique de bloc"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Le superbloc de journal non trouvé"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Le journal doit avoir au moins 1024 blocs"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Version de journal non supportée"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Erreur lors de l'ouverture du journal externe"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Journal non trouvé"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Hachage de répertoire non supporté"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Numéro de bloc d'attribut étendu illégal"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Ne peut créer le système de fichiers avec le nombre requis d'i-noeuds"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "L'instantané E2image n'est pas en cours d'utilisation"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Trop de blocs de descripteurs de groupes réservés"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "L'i-noeud de changement de taille est corrompu"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "A essayé de définir le bitmap de blocs avec un bloc indirect manquant"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB : Succès"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB : Base de données corrompue"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB : Erreur E/S"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB : Erreur de verrouillage"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB : Dépassement mémoire"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB : L'enregistrement existe"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB : le verrou existe sur d'autres clés"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB : paramètre invalide"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB : L'enregistrement n'existe pas"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB : Écriture non permise"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "La liste de blocs de répertoires ext2fs est vide"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Tentative de modification d'un plan de blocs via un itérateur de blocs en lecture seule"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Numéro magique invalide pour le chemin d'extent ext4 sauvé"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Numéro magique invalide pour le bitmap générique 64-bit"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Numéro magique invalide pour le bitmap de blocs 64-bit"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Numéro magique invalide pour le bitmap d'i-noeuds 64-bit"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Numéro magique invalide --- RÉSERVÉ_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Numéro magique invalide --- RÉSERVÉ_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Numéro magique invalide --- RÉSERVÉ_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Numéro magique invalide --- RÉSERVÉ_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Numéro magique invalide --- RÉSERVÉ_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Numéro magique invalide --- RÉSERVÉ_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Numéro magique invalide --- RÉSERVÉ_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "En-tête d'extent corrompu"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Index d'extent corrompu"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Extent corrompu"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Pas de place libre dans la carte d'extent"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "L'i-noeud n'utilise pas d'extents"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Pas d'extent 'next'"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Pas d'extent 'previous'"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Pas d'extent 'up'"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Pas d'extent 'down'"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Pas de noeud courant"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Opération ext2fs non supportée"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Pas de place pour insérer l'extent dans le noeud"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Découper produirait un noeud vide"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Extent non trouvé"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Opération non supportée pour les i-noeuds contenant des extents"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "La longueur d'extent est invalide"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "Le canal d'E/S ne supporte pas les numéros de bloc 64-bit"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Ne peut pas vérifier si le système de fichiers est monté à cause du manque de fichier mtab"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Le système de fichier est trop grand pour utiliser l'ancien style de bitmap"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP : numéro magique invalide"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP : périphérique actuellement actif"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP : e2fsck en cours d'exécution"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP : numéro de bloc en-dehors de la portée du système de fichiers"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP : en cours d'opération inconnue"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP : système de fichiers en cours d'utilisation"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP : l'ouverture avec O_DIRECT a échoué"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Taille du descripteur de groupe de blocs incorrecte."
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "La somme de contrôle de l'i-noeud ne correspond pas à l'i-noeud"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "La somme de contrôle du bitmap d'i-noeud ne correspond pas au bitmap"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "La somme de contrôle du block d'extent ne correspond pas au bloc d'extent"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Le bloc de répertoire n'a pas de place pour la somme de contrôle"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "La somme de contrôle du bloc de répertoire ne correspond pas au bloc de répertoire"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "La somme de contrôle du bloc d'attribut étendu ne correspond pas au bloc"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "La somme de contrôle du superbloc ne correspond pas au superbloc"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Algorithme de somme de contrôle inconnu"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "La somme de contrôle du bloc MMP ne correspond pas"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Le fichier ext2 existe déjà"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "La somme de contrôle du bitmap de bloc ne correspond pas au bitmap"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Ne peut pas itérer sur les blocs de données d'un i-noeud contenant des données en ligne"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "L'attribut étendu a une longueur de nom invalide"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "L'attribut étendu a une longueur de valeur invalide"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "L'attribut étendu a un hachage incorrect"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Le bloc d'attribut étendu a un en-tête défectueux"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Clé d'attribut étendu non trouvée"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Espace insuffisant pour stocker les données de l'attribut étendu"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Il manque au système de fichier la fonctionnalité ext_attr ou inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "L'i-noeud n'a pas de donnée en ligne"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Pas de bloc pour un i-noeud avec des données en ligne"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Pas de place libre dans les données en ligne"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Numéro magique invalide pour la structure d'attribut étendu"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "L'i-noeud semble contenir des données incorrectes"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "L'attribut étendu a un décalage de valeur invalide"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Les drapeaux du journal sont incohérents"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Fichier d'annulation corrompu"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Fichier d'annulation erroné pour ce système de fichier"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Le système de fichier est corrompu"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "CRC incorrect détecté dans le système de fichiers"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Le superbloc du journal est corrompu"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "L'i-noeud est corrompu"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "L'i-noeud contenant la valeur d'attribut étendu est corrompu"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Descripteurs de groupes non chargés"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "La structure de données interne ext2_filsys a l'air corrompue"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "Trouvé une boucle récursive dans un arbre des extents"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Opération non supportée sur un journal externe"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profilage version 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Valeur magique invalide dans profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Section de profilage non trouvée"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Relation de profilage non trouvée"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Tentative d'ajout d'une relation à un noeud qui n'est pas une section"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Un en-tête de section de profilage a un valeur non nulle"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Liste chaînée invalide dans les structures de profilage"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Niveau de groupe invalide dans les structures de profilage"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Pointeur parent invalide dans les structures de profilage"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Valeur magique invalide dans l'iterateur de profilage"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Ne peut définire la valeur sur un noeud de section"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Argument invalide passé à la bibliothèque de profilage"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Tentative de modifier un profilage en lecture seule"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "L'en-tête de section de profilage n'est pas niveau sommet"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Erreur de syntaxe dans l'en-tête de section de profilage"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Erreur de syntaxe dans la relation de profilage"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Accolade fermante superflue dans le profilage"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Accolade ouvrante manquante dans le profilage"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Valeur magique invalide dans profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Valeur magique invalide dans profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Itération sur toutes les sections de niveau sommet non supportée"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Object profile_section invalide"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Plus de sections"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Ensemble de nom invalide passé à la routine de requête"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Pas de fichier de profilage ouvert"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Valeur magique invalide dans profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "N'a pu ouvrir le fichier de profilage"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "La section existe déjà"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Valeur booléenne invalide"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Valeur entière invalide"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Valeur magique invalide dans profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tdernier montage sur %.*s le %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tdernier montage le %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tcréé le %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tmodifié la dernière fois le %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Trouvé une table de partitions %s dans %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Impossible d'ouvrir %s : %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Le périphérique n'existe apparemment pas ; l'avez-vous spécifié\n"
+"correctement ?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s n'est pas un périphérique spécial en mode bloc.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s contient un système de fichiers %s étiqueté « %s »\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s contient un système de fichiers %s\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s contient une donnée « %s »\n"
diff --git a/po/fur.gmo b/po/fur.gmo
new file mode 100644
index 0000000..edb28fb
--- /dev/null
+++ b/po/fur.gmo
Binary files differ
diff --git a/po/fur.po b/po/fur.po
new file mode 100644
index 0000000..606b6cf
--- /dev/null
+++ b/po/fur.po
@@ -0,0 +1,8003 @@
+# Friulian translation for E2fsprogs
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+# 2013, 2014, 2015, 2016, 2017, 2018, 2019 by Theodore Ts'o
+# This file is distributed under the same license as the e2fsprogs package.
+# Theodore Ts'o <tytso@mit.edu>, 2019.
+# Fabio Tomat <f.t.public@gmail.com>, 2019.
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.45.3\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2019-07-14 20:56-0400\n"
+"PO-Revision-Date: 2020-09-22 16:03+0200\n"
+"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
+"Language-Team: Friulian <f.t.public@gmail.com>\n"
+"Language: fur_IT\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.4.1\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Bloc difetôs %u fûr dai limits; ignorât.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "tal controlâ la integritât dai inode dai blocs difetôs"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "tal lei i inode dai blocs difetôs"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1571
+#: e2fsck/unix.c:1685 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1430
+#: misc/e2image.c:1627 misc/e2image.c:1648 misc/mke2fs.c:236
+#: misc/tune2fs.c:2796 misc/tune2fs.c:2895 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "tal cirî di vierzi %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "tal cirî di eseguî popen su '%s'"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "tal lei la liste di blocs difetôs dal file"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "tal inzornâ il inode dal bloc difetôs"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Avertiment: cjatât bloc %u no valit intun inode dal bloc difetôs. Netât.\n"
+
+#: e2fsck/dirinfo.c:331
+msgid "while freeing dir_info tdb file"
+msgstr "intant che si liberave il file tdb dir_info"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Erôr tal lei il bloc %lu (%s) intant che %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Erôr tal lei il bloc %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignore erôr"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Sfuarce riscriture"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Erôr tal scrivi il bloc %lu (%s) intant che %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Erôr tal scrivi il bloc %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "blocs cartelis vueit"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "mape cartelis vueide"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Bloc di cartele %u (#%d) vueit tal inode %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s nonfile nblocs dimbloc\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Numar di blocs no valit!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Impussibil assegnâ il buffer dal bloc (dimension=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "mape dai inode di ricostruzion dai «extent»"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Utilizazion: %s disc\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "Ioctl BLKFLSBUF no supuartât! Impussibil disvuedâ i buffer.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Ûs: %s [-F] [-I inode_buffer_blocks] dispositîf\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1082
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "tal vierzi %s pal disvuedâ"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1088 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "tal cirî di disvuedâ %s"
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr "tal cirî di vierzi '%s'"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1323
+msgid "while opening inode scan"
+msgstr "tal inviâ la analisi dai inode"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1342
+msgid "while getting next inode"
+msgstr "tal otignî il prossim inode"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u inode analizâts.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "daûr a lei il superbloc dal gjornâl des transazions\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: nissun superbloc di gjornâl des transazions valit cjatât\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: gjornâl des transazions masse curt\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3792
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: daûr a recuperâ il gjornâl des transazions\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: no recuperarai il gjornâl des transazions in dome leture\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "tal cirî di tornâ a vierzi %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aatribût estindût"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "AErôr tal assegnâ"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bbloc"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccomprim"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cal va in conflit cun cualchi altri fs @b"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dcartele"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Deliminât"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eelement"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e '%Dn' in %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "ffilesystem"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fpar l'@i %i (%Q) al è"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrup"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "h@i de @d HTREE"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iillegâl"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jgjornâl des transazions"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lal è un colegament"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mreclamât in plui ocasions"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nno valit"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "ovuarfin"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pprobleme in"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qcuote"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rroot @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sal varès di jessi"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "uno colegât"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vdispositîf"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zlungjece-zero"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<Inode NULL>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Inode dai blocs difetôs>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<Il inode de cuote dal utent>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<Il inode group quota inode>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Il inode dal boot loader>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Il inode de cartele par anulâ la eliminazion>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Il inode dal descritôr dal grup>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<Inode dal gjornâl des transazions>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Inode riservât 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Inode riservât 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "file regolâr"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "cartele"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "dispositîf a caratars"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "dispositîf a blocs"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "canâl cun non"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "colegament simbolic"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "gjenar di file no cognossût cun modalitât 0%o"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "bloc indiret"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "bloc indiret dopli"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "bloc indiret tripli"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "bloc tradutôr"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "block #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "utent"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "grup"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "progjet"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "gjenar di cuote no cognossût"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mape di inode reclamade in plui ocasions"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "erôr interni: impussibil cjatâ dup_blk par %llu\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "tornât dal clone_file_block"
+
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "erôr interni: impussibil cirî il regjistri dal bloc EA par %llu"
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "erôr interni: impussibil cirî il regjistri dal bloc EA par %u"
+
+#: e2fsck/pass1.c:357
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "intant che si fâs l'hash de vôs cun e_value_inum = %u"
+
+#: e2fsck/pass1.c:775 e2fsck/pass2.c:1007
+msgid "reading directory block"
+msgstr "daûr a lei il bloc de cartele"
+
+#: e2fsck/pass1.c:1224
+msgid "in-use inode map"
+msgstr "mape di inode in ûs"
+
+#: e2fsck/pass1.c:1235
+msgid "directory inode map"
+msgstr "mape dai inode de cartele"
+
+#: e2fsck/pass1.c:1245
+msgid "regular file inode map"
+msgstr "mape dai inode dal file regolârs"
+
+#: e2fsck/pass1.c:1254 misc/e2image.c:1282
+msgid "in-use block map"
+msgstr "mape dai blocs in ûs"
+
+#: e2fsck/pass1.c:1263
+msgid "metadata block map"
+msgstr "mape dal bloc dai metadâts"
+
+#: e2fsck/pass1.c:1325
+msgid "opening inode scan"
+msgstr "daûr a vierzi la scansion dai inode"
+
+#: e2fsck/pass1.c:1363
+msgid "getting next inode from scan"
+msgstr "daûr a otignî de scansion il inode sucessîf"
+
+#: e2fsck/pass1.c:2067
+msgid "Pass 1"
+msgstr "Pas 1"
+
+#: e2fsck/pass1.c:2128
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "daûr a lei i blocs indirets dal inode %u"
+
+#: e2fsck/pass1.c:2179
+msgid "bad inode map"
+msgstr "mape dai inode ruvinade"
+
+#: e2fsck/pass1.c:2219
+msgid "inode in bad block map"
+msgstr "inode in mape di bloc ruvinade"
+
+#: e2fsck/pass1.c:2239
+msgid "imagic inode map"
+msgstr "mape dai inode cun imagic"
+
+#: e2fsck/pass1.c:2270
+msgid "multiply claimed block map"
+msgstr "mape dai blocs reclamâts in plui ocasions"
+
+#: e2fsck/pass1.c:2395
+msgid "ext attr block map"
+msgstr "mape dai blocs di atribûts estindûts"
+
+#: e2fsck/pass1.c:3640
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): si spietave %6lu ma si à vût blocs fisics %6lu (numar di blocs %lld)\n"
+
+#: e2fsck/pass1.c:4060
+msgid "block bitmap"
+msgstr "mape dai bit dai blocs"
+
+#: e2fsck/pass1.c:4066
+msgid "inode bitmap"
+msgstr "map dai bit dai inode"
+
+#: e2fsck/pass1.c:4072
+msgid "inode table"
+msgstr "tabele inode"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "Pas 2"
+
+#: e2fsck/pass2.c:1079 e2fsck/pass2.c:1246
+msgid "Can not continue."
+msgstr "Impussibil continuâ."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "mape dai bit dai inode fats"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Memorie di pic"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Pas 3"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "mape dai bit dai rilevaments di ciclis di inode"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "Pas 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Pas 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: erôr di assegnazion de memorie"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: erôr di assegnazion de memorie"
+
+#: e2fsck/problem.c:52
+msgid "(no prompt)"
+msgstr "(nissune richieste)"
+
+#: e2fsck/problem.c:53
+msgid "Fix"
+msgstr "Comede"
+
+#: e2fsck/problem.c:54
+msgid "Clear"
+msgstr "Nete"
+
+#: e2fsck/problem.c:55
+msgid "Relocate"
+msgstr "Torne a colocâ"
+
+#: e2fsck/problem.c:56
+msgid "Allocate"
+msgstr "Assegne"
+
+#: e2fsck/problem.c:57
+msgid "Expand"
+msgstr "Pant"
+
+#: e2fsck/problem.c:58
+msgid "Connect to /lost+found"
+msgstr "Conet a /lost+found"
+
+#: e2fsck/problem.c:59
+msgid "Create"
+msgstr "Cree"
+
+#: e2fsck/problem.c:60
+msgid "Salvage"
+msgstr "Recupere"
+
+#: e2fsck/problem.c:61
+msgid "Truncate"
+msgstr "Cjonce"
+
+#: e2fsck/problem.c:62
+msgid "Clear inode"
+msgstr "Nete inode"
+
+#: e2fsck/problem.c:63
+msgid "Abort"
+msgstr "Anule"
+
+#: e2fsck/problem.c:64
+msgid "Split"
+msgstr "Divît"
+
+#: e2fsck/problem.c:65
+msgid "Continue"
+msgstr "Continue"
+
+#: e2fsck/problem.c:66
+msgid "Clone multiply-claimed blocks"
+msgstr "Clone i blocs reclamâts in multiplis ocasions"
+
+#: e2fsck/problem.c:67
+msgid "Delete file"
+msgstr "Elimine file"
+
+#: e2fsck/problem.c:68
+msgid "Suppress messages"
+msgstr "Soprimi messaçs"
+
+#: e2fsck/problem.c:69
+msgid "Unlink"
+msgstr "Scoleghe"
+
+#: e2fsck/problem.c:70
+msgid "Clear HTree index"
+msgstr "Nete indiç HTree"
+
+#: e2fsck/problem.c:71
+msgid "Recreate"
+msgstr "Ricree"
+
+#: e2fsck/problem.c:72
+msgid "Optimize"
+msgstr "Perfezione"
+
+#: e2fsck/problem.c:81
+msgid "(NONE)"
+msgstr "(NISSUN)"
+
+#: e2fsck/problem.c:82
+msgid "FIXED"
+msgstr "COMEDÂT"
+
+#: e2fsck/problem.c:83
+msgid "CLEARED"
+msgstr "NETÂT"
+
+#: e2fsck/problem.c:84
+msgid "RELOCATED"
+msgstr "TORNÂT A COLOCÂ"
+
+#: e2fsck/problem.c:85
+msgid "ALLOCATED"
+msgstr "ASSEGNÂT"
+
+#: e2fsck/problem.c:86
+msgid "EXPANDED"
+msgstr "PANDÛT"
+
+#: e2fsck/problem.c:87
+msgid "RECONNECTED"
+msgstr "TORNÂT A CONETI"
+
+#: e2fsck/problem.c:88
+msgid "CREATED"
+msgstr "CREÂT"
+
+#: e2fsck/problem.c:89
+msgid "SALVAGED"
+msgstr "RECUPERÂT"
+
+#: e2fsck/problem.c:90
+msgid "TRUNCATED"
+msgstr "CJONÇÂT"
+
+#: e2fsck/problem.c:91
+msgid "INODE CLEARED"
+msgstr "INODE NETÂT"
+
+#: e2fsck/problem.c:92
+msgid "ABORTED"
+msgstr "ANULÂT"
+
+#: e2fsck/problem.c:93
+msgid "SPLIT"
+msgstr "DIVIDÛT"
+
+#: e2fsck/problem.c:94
+msgid "CONTINUING"
+msgstr "SI CONTINUE"
+
+#: e2fsck/problem.c:95
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "SI À CLONÂT I BLOCS RECLAMÂTS IN PLUI OCASIONS"
+
+#: e2fsck/problem.c:96
+msgid "FILE DELETED"
+msgstr "FILE ELIMINÂT"
+
+#: e2fsck/problem.c:97
+msgid "SUPPRESSED"
+msgstr "SOPRIMÛT"
+
+#: e2fsck/problem.c:98
+msgid "UNLINKED"
+msgstr "SCOLEGÂT"
+
+#: e2fsck/problem.c:99
+msgid "HTREE INDEX CLEARED"
+msgstr "INDIÇ HTREE NETÂT"
+
+#: e2fsck/problem.c:100
+msgid "WILL RECREATE"
+msgstr "SI CREARÀ DI GNÛF"
+
+#: e2fsck/problem.c:101
+msgid "WILL OPTIMIZE"
+msgstr "SI PERFEZIONARÀ"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:115
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@B dal @b pal @g %g nol è tal @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:119
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@B dal @i pal @g %g nol è tal @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:124
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"Tabele @i pal @g %g no je tal @g. (@b %b)\n"
+"ATENZION: AL È PUSSIBIL VÊ GRIVIIS PIERDITIS DI DÂTS.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:130
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Il @S nol à podût lei o nol descrîf un valit @f ext2/ext3/ext4.\n"
+"Se il @v al è valit e al conten pardabon un @f ext2/ext3/ext4\n"
+"(e no swap o ufs o alc altri), alore il @S\n"
+"al è ruvinât, e tu varessis di cirî di eseguî e2fsck cuntun @S alternatîf:\n"
+" e2fsck -b 8193 <@v>\n"
+" o\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:141
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"La dimension dal @f (in acuardi cul @S) e je %b @bs\n"
+"La dimension fisiche dal @v e je %c @bs\n"
+"Al è probabil che un dai doi, tra il @S e la tabele des partizions, al sedi ruvinât.\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:148
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"Tal @S la dimension dal @b (blocsize) = %b, la dimension dal toc (fragsize) = %c.\n"
+"Cheste version di e2fsck no supuarte lis dimensions dal toc (fragment) diferentis\n"
+"de dimension dal @b.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:155
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "Il @bs_per_group dal @S al è %b, al varès dovût jessi %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:160
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "Il first_data_@b dal @S al è %b, al varès dovût jessi %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:165
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f nol à un UUID; si gjenere un.\n"
+"\n"
+
+#: e2fsck/problem.c:171
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Note: se varis inode o blocs di mape di bit di blocs o part\n"
+"de tabele di inode a àn bisugne di ricolocament, prime tu \n"
+"podaressis cirî di eseguî e2fsck cu la opzion '-b %S'. Il probleme\n"
+"al pues stâ dome intai descritôrs dal grup di blocs primari e la\n"
+"copie di backup dai descritôrs dal grup di blocs e podarès jessi a\n"
+"puest.\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:180
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Coruzion cjatade in @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:186
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Erôr tal determinâ la dimension dal @v fisic: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:191
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "La conte @i tal @S e je %i, @s %j.\n"
+
+#: e2fsck/problem.c:195
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Il Hurd nol supuarte la funzionalitât dal gjenar di file.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:201
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Il @S al à un @j @n (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:206
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Il @j eterni al à plui utents dal @f (no supuartât).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:211
+msgid "Can't find external @j\n"
+msgstr "Impussibil cjatâ il @j esterni\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:216
+msgid "External @j has bad @S\n"
+msgstr "Il @j esterni al à un @S difetôs\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:221
+msgid "External @j does not support this @f\n"
+msgstr "Il @j esterni nol supuarte chest @f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:226
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Il @S dal @j dal @f al è di un gjenar no cognossût %N (no supuartât).\n"
+"Al è probabil che la copie di e2fsck e sedi vecje e/o no supuarte chest formât di @j.\n"
+"Al è ancje pussibil che il @S dal @j al sedi ruvinât.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:235
+msgid "@j @S is corrupt.\n"
+msgstr "@j @S al è ruvinât.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:240
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "La opzion has_@j dal @S e je nete, ma al è presint un @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:245
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "La variabile needs_recovery dal @S e je ative, ma nol è presint nissun @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:250
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "La variabile needs_recovery dal @S e je nete, ma il @j al à dâts.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:255
+msgid "Clear @j"
+msgstr "Nete @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:260 e2fsck/problem.c:796
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "Il @f al à opzions di funzionalitâts ativadis, però al è un @f di revision 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:265
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s @i @o %i (uid=%Iu, gid=%Ig, mût=%Im, dimension=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:270
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@I %B (%b) cjatât in @i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:275
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Cjatât %b (%b) za netât tal @i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:281
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@I @o @i %i in @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:287
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@I @i %i te liste @i @o.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:292
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Il @S dal @j al à ative une opzion di funzionalitât di nome-leture che no je cognossude.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:297
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Il @S dal @j al à ative une opzion di funzionalitât no compatibile che no je cognossude.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:302
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Version dal @j no supuartade di chest e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Daûr a movi il @j di /%s sul @i platât.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:314
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Erôr tal spostâ il @j: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:319
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Cjatâts cjamps di @S dal @j V2 @ns (dal @j V1).\n"
+"Daûr a netâ i cjamps là di là dal @S dal @j de V1...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:325
+msgid "Run @j anyway"
+msgstr "Eseguìs il @j distès"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:330
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"La variabile di recupar no je ative tal @S di backup, duncje si\n"
+"eseguìs il @j distès.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:335
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr "Daûr a fâ il backup des informazions dal @b dal @i dal @j\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:341
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Il @f nol à abilitât il resize_@i, ma s_reserved_gdt_@bs\n"
+"al è %N; al varès di jessi zero. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:347
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode nol è abilitât, ma il inode de ridimension nol è zero. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:352
+msgid "Resize @i not valid. "
+msgstr "Cambi di dimension di @i no valit. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:357
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La ultime volte (%t,tnow = %T)\n"
+"che si à montât il @S e je tal futûr.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:362
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"La ultime volte (%t,tnow = %T)\n"
+"che si à scrit il @S e je tal futûr.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:368
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "La piste dal @S par un superbloc esterni e varès di jessi %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:373
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Daûr a zontâ la piste dal dirhash al @f.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:378
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "La sume di control (checksum) dal descritôr dal @g %g e je %04x, e varès di jessi %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:384
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "Descritôr dal @g %g segnât come no inizializât cence schirie di funzionalitâts.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:389
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Il descritôr dal @g %g al à une conte no valide di %b inode no doprâts. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:394
+msgid "Last @g @b @B uninitialized. "
+msgstr "L'ultin @B di @b dal @g nol è inizializât. "
+
+#: e2fsck/problem.c:400
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "La transazion %i dal gjornâl des transazions e jere ruvinade, e je stade interote la ripetizion.\n"
+
+#: e2fsck/problem.c:405
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "La opzion test_fs e je ative (e ext4 al è disponibil). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:410
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"La ore dal montaç dal ultin @S e je tal futûr.\n"
+"\t(par mancul di un dì, al è probabil che al sedi par vie di une impostazion sbaliade dal orloi hardware)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:416
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"La ore de scriture dal ultin @S e je tal futûr.\n"
+"\t(par mancul di un dì, al è probabil che al sedi par vie di une impostazion sbaliade dal orloi hardware)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:422
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Une o plui sumis di control (checksums) dai descritôrs dal @g dal @b no son validis. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:427
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Daûr a stabilî la conte dai @i libars a %j (e jere %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:432
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Daûr a stabilî la conte dai @bs libars a %c (e jere %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:437
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Daûr a platâ il %U @i de @q %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:442
+msgid "@S has invalid MMP block. "
+msgstr "Il @S nol à un bloc MMP valit. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:447
+msgid "@S has invalid MMP magic. "
+msgstr "Il @S al à un numar magjic di MMP no valit. "
+
+#: e2fsck/problem.c:453
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:459
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:465
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "il metadata_csum dal @S al rimplace uninit_bg; no puedin jessi ativâts tal stes timp ducj i doi i bit des funzionalitâts."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:471
+msgid "@S MMP @b checksum does not match. "
+msgstr "Il checksum dal @b MMP dal @S nol corispuint. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:476
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "Il @S di un @f a 64bit al à bisugne dai «extents» par acedi al disc intîr. "
+
+#: e2fsck/problem.c:481
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg al è masse grant. (%N, valôr massim %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:486
+msgid "External @j @S checksum does not match @S. "
+msgstr "Il checksum dal @S dal @j esterni nol corispuint cul @S. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:491
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "metadata_csum_seed dal @S nol è necessari cence metadata_csum."
+
+#: e2fsck/problem.c:497
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Erôr tal inizializâ il contest de cuote inte librarie di supuart: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:502
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Il isize adizionâl domandât al è sbaliât in @S (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:507
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Il isize adizionâl desiderât al è sbaliât in @S (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:512
+msgid "Invalid %U @q @i %i. "
+msgstr "%U @i de @q %i no valit. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:517
+msgid "@S would have too many inodes (%N).\n"
+msgstr "@S al varès masse inode (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:522
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Lis funzionalitâts resize_inode e beta_bg a son abilitadis, ma no son\n"
+"compatibilis. Si varès di disabilitâ il resize_inode."
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:530
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Pas 1: Ccontrol @i, @bs e dimensions\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:534
+msgid "@r is not a @d. "
+msgstr "@r no je une @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:539
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "dtime al è stât stabilît in @r (forsit par vie di un vecjo mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:544
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Il @i riservât %i (%Q) al à une modalitât no valide."
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:550
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "Il @i eliminât %i al à un dtime zero. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:556
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "Il @i %i al è in ûs, ma al à configurât un dtime. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:562
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr ""
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:567
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:572
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:577
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:582
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "@B dal @b dal @g %g (%b) al è ruvinât. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:587
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "@B dal @i dal @g %g (%b) al è ruvinât. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:592
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr ""
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:597
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr ""
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in @i %i. "
+msgstr ""
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:607
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:613
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr ""
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:619
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr ""
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:624
+msgid "@I %B (%b) in bad @b @i. "
+msgstr ""
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:629
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Il @i dal @b ruvinât al à @b(s) no valit(s). "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:634
+msgid "Duplicate or bad @b in use!\n"
+msgstr "@b dopli o difetôs in ûs!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:639
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "@b %b difetôs doprât come @b indiret di @i dal bloc difetôs. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:644
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"Il @i dal @b difetôs forsit al è ruvinât. Probabilmentri\n"
+"si varès di fermâsi cumò e eseguî e2fsck -c par analizâ i blocs\n"
+"difetôs tal @f.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:651
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Se il @b al è pardabon ruvinât, il @f nol pues jessi comedât.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:656
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Tu puedis gjavâ chest @b de liste dai @bs difetôs e sperâ\n"
+"che il @b al sedi pardabon A PUEST. Ma no si à garanziis.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:662
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Il @S primari (%b) al sta su pe liste dai @bs difetôs.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:667
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Il bloc %b tai descritôrs dal @g primari al sta su pe liste dai @b difetôs\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:673
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Atenzion: il @S dal grup %g (%b) al è difetôs.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:679
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Atenzion: la copie dal grup %g dai descritôrs dal grup al à un @b (%b) difetôs.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:685
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Erôr di programazion? @b #%b reclamât cence reson tal process_bad_@b.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:691
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:697
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:702
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr ""
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:708
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr ""
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:713
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Atenzion: impussibil lei @b %b di %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:718
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Atenzion: impussibil scrivi @b %b par %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:723 e2fsck/problem.c:1871
+msgid "@A @i @B (%N): %m\n"
+msgstr "Si à un @A dal @B dal @i (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:728
+msgid "@A @b @B (%N): %m\n"
+msgstr "Si à un @A dal @B dal @b (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:734
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:740
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:746
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Erôr tal scansionâ i @i (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:752
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:757
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:762
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:769
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Erôr tal lei @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:778
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Il @i %i al à atîf une la opzion imagic. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:784
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:791
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:801
+msgid "@j @i is not in use, but contains data. "
+msgstr "@j @i nol è in ûs, ma al conten dâts. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:806
+msgid "@j is not regular file. "
+msgstr "@j nol è un file regolâr. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:812
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "@i %i al jere part de liste @i vuarfins. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:818
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "cjatâts @i che a fasevin part di une liste di vuarfins ruvinâts colegâts. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:823
+msgid "@A refcount structure (%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:828
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Erôr tal lei il bloc %b dal @a pal @i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:833
+msgid "@i %i has a bad @a @b %b. "
+msgstr "Il @i %i al à un bloc %b dal @a difetôs. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:838
+msgid "Error reading @a @b %b (%m). "
+msgstr "Erôr tal lei il bloc %b dal @a (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:843
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "Il bloc %b dal @a al à une conte di riferiment %r, @s %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:848
+msgid "Error writing @a @b %b (%m). "
+msgstr "Erôr tal scrivi il bloc %b dal @a (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:853
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "Il bloc %b dal @a al à h_@bs > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:858
+msgid "@A @a region allocation structure. "
+msgstr ""
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:863
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "Il bloc %b dal @a al è ruvinât (colision di assegnazion). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:868
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "Il bloc %b dal @a al è ruvinât (non @n). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:873
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "Il bloc %b dal @a al è ruvinât (valôr @n). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:879
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "@i %i al è masse grant. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:883
+msgid "%B (%b) causes @d to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:888
+msgid "%B (%b) causes file to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:893
+msgid "%B (%b) causes symlink to be too big. "
+msgstr ""
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:899
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:905
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:911
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:916
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:922
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:927
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr ""
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:933
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Il @i dal @b ruinât al à un@b indiret (%b) che al va in conflit cui\n"
+"metadâts dal @f. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:940
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr ""
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:945
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "Il @i %i al à une dimension adizionâl (%IS) che no je valide\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:950
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "l'@a tal @i %i al à une lungjece dal non (%N) che no je valide\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:955
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "l'@a tal @i %i al à un valôr di offset (%N) che nol è valit\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:960
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "l'@a tal @i %i al à un valôr di @b (%N) che nol è valit (al scugne jessi 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:965
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "l'@a tal @i %i al à un valôr di dimension (%N) che nol è valit\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:970
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "l'@a tal @i %i al à une hash (%N) che nol è valit\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:975
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "Il @i %i al è un %It ma al semee jessi une cartele.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:981
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:986
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:992
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:997
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1003
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1009
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1015
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:1021
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Il colegament simbolic veloç %i al à atîf EXTENT_FL. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1026
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1030
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr ""
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1036
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Erôr tal convertî il @B dal @b dal sot-cluster: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1041
+msgid "@q @i is not a regular file. "
+msgstr "Il @i de @q nol è un file regolâr. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1046
+msgid "@q @i is not in use, but contains data. "
+msgstr "Il @i de @q nol è in ûs, ma al conten dâts. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1051
+msgid "@q @i is visible to the user. "
+msgstr "Il @i de @q al è visibil al utent. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1056
+msgid "The bad @b @i looks @n. "
+msgstr "Il @i dal @b difetôs nol semee valit. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1061
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1067
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr ""
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1073
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1079
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr ""
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1087
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1096
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1101
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1107
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1113
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1119
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1127
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1132
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr ""
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1138
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr ""
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1143
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1149
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1156
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1163
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1169
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1175
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1181
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1186
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "La liste dai blocs ruvinâts e dîs che il @i de liste dai blocs ruvinâts al è ruvinât. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1191
+msgid "@A @x region allocation structure. "
+msgstr ""
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1196
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1201
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1206
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1212
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1218
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "l'@i %i al à une intestazion di @x ruvinade. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1224
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1229
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr ""
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1235
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1240
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1248
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1255
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:1271
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Erôr intal scansionâ i inode (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1277
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr ""
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1283
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1288 e2fsck/problem.c:1663
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1298
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Pas 1C: scansion cartelis pai @i cun @m @bs\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1304
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Pas 1D: riconciliazion @m @bs\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1309
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1315
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1320
+msgid "\t<@f metadata>\n"
+msgstr "\t<metadâts di @f>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1325
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(A son %N @i che a contegnin @m @bs.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1330
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1344
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Impussibil clonâ il file: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1350
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Pas 1E: otimizazion arbui @x\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1356
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "No si è rivâts a perfezionâ l'arbul @x %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1361
+msgid "Optimizing @x trees: "
+msgstr "Otimizazion dai arbui @x: "
+
+#: e2fsck/problem.c:1376
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1381
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1386
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1393
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Pas 2: control de struture @d\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1399
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1404
+msgid "@E has @n @i #: %Di.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1409
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1414
+msgid "@E @L to '.' "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1419
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "La @E e ponte al @i (%Di) posizionât intun @b ruvinât.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1424
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "La @E @L ae @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1429
+msgid "@E @L to the @r.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1434
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1440
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Al mancje '.' intal @i de @d %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1446
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Al mancje '..' intal @i de @d %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1451
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1456
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1461
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1466
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1471
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1476
+msgid "i_frag @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1481
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1486
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1491
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1496
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr ""
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1501
+msgid "@d @i %i has an unallocated %B. "
+msgstr ""
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1507
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1513
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1518
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1523
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1528
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1533
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1539 e2fsck/problem.c:1898
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1544
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1550
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1556
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr ""
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1561
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Erôr tal lei il @b de @d %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1566
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Erôr tal scrivi il @b de @d %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1572
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1578
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1584
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1589
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "il @i %i (%Q) al è un FIFO @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1594
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr ""
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1599
+msgid "Setting filetype for @E to %N.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1604
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1609
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1614
+msgid "@E has a @z name.\n"
+msgstr ""
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1619
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr ""
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1624
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1629
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1634
+msgid "@p @h %d: %B not referenced\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1639
+msgid "@p @h %d: %B referenced twice\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1644
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1649
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1654
+msgid "@n @h %d (%q). "
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1658
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1669
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p @h %d: il grop root al è @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1674
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1679
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1684
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1689
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1694
+msgid "Duplicate @E found. "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1699
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1704
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1709
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1714
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1719
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1724
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1729
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1735
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1741
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1746
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1751
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1756
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1762
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1767
+msgid "Encrypted @E is too short.\n"
+msgstr "@E cifrade e je masse curte.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1774
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr ""
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1779
+msgid "@r not allocated. "
+msgstr "@r no assegnât. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1784
+msgid "No room in @l @d. "
+msgstr "Nol è spazi te @d @l. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1790
+#, no-c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1795
+msgid "/@l not found. "
+msgstr "/@l no cjatât. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1800
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr ""
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "/@l ruvinade o inesistente. Impussibil tornâ a coneti.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1812
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Impussibil espandi /@l: %m\n"
+
+#: e2fsck/problem.c:1818
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Impussibil tornâ a coneti %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1824
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Erôr tal cirî di cjatâ /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1830
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1836
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1842
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr ""
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1848
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr ""
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1854
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr ""
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1860
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr "Impussibil comedâ il gjenitôr/superiôr di @i %i: %m\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1866
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1888
+msgid "@r is not a @d; aborting.\n"
+msgstr ""
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1893
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1904
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l no je une @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1909
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1914
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Impussibil assegnâ spazi par /@l.\n"
+"Place i file pierdûts inte cartele lidrîs invezit"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1919
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Spazi insuficient par recuperâ i file pierdûts!\n"
+"Sposte i dâts fûr dal @f e torne eseguìs e2fsck.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1924
+msgid "/@l is encrypted\n"
+msgstr "/@l al è cifrât\n"
+
+#: e2fsck/problem.c:1931
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Pas 3A: otimizazion cartelis\n"
+
+#: e2fsck/problem.c:1937
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1942
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1947
+msgid "Optimizing directories: "
+msgstr "Otimizazion cartelis: "
+
+#: e2fsck/problem.c:1964
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1970
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr ""
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1976
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr ""
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1981
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr ""
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1985
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1992
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr ""
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1997
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2004
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2009
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2014
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2019
+msgid "@b @B differences: "
+msgstr ""
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2041
+msgid "@i @B differences: "
+msgstr ""
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2063
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2068
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2073
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2078
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2083
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2088
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:2094
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2100
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2106
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr ""
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2136
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2142
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2148
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2154
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2161
+msgid "Recreate @j"
+msgstr ""
+
+#: e2fsck/problem.c:2166
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2172
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2178
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Erôr tal scrivi lis info dal file system: %m\n"
+
+#: e2fsck/problem.c:2184
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Erôr tal disvuedâ il flus di scriture sul dispositîf di archiviazion: %m\n"
+
+#: e2fsck/problem.c:2189
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2352
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Codiç di erôr no gjestît (0x%x)!\n"
+
+#: e2fsck/problem.c:2482 e2fsck/problem.c:2486
+msgid "IGNORED"
+msgstr "IGNORÂT"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr ""
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "dimension dal inode=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr ""
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr ""
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr ""
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr ""
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Si cjonce"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Si nete"
+
+#: e2fsck/unix.c:78
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Ûs: %s [-panyrcdfktvDFV] [-b superbloc] [-B dimension_bloc]\n"
+"\t\t[-l|-L file_blocs_ruvinâts] [-C fd] [-j gjornâl_esterni]\n"
+"\t\t[-E opzions-estindudis] [-z file_par_disfâ_il_lavôr] dispositîf\n"
+
+#: e2fsck/unix.c:83
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+
+#: e2fsck/unix.c:89
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Jessi prolìs\n"
+" -b superbloc Dopre superbloc alternatîf\n"
+" -B dimension_bloc Sfuarce la dimension dal bloc cuant che si cîr il superbloc\n"
+" -j gjornâl_esterni Stabilìs la posizion dal gjornâl esterni\n"
+" -l file_blocs_ruvinâts Zonte ae liste dai blocs ruvinâts\n"
+" -L file_blocs_ruvinâts Stabilìs la liste dai blocs ruvinâts\n"
+" -z file_par_disfâ_il_lavôr Cree un file par disfâ il lavôr fat\n"
+
+#: e2fsck/unix.c:137
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:163
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:167
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:172
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:177
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+
+#: e2fsck/unix.c:185
+msgid " Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:194
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:198
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u bloc difetôs\n"
+msgstr[1] "%12u blocs difetôs\n"
+
+#: e2fsck/unix.c:200
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:202
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u file regolâr\n"
+msgstr[1] ""
+"\n"
+"%12u file regolârs\n"
+
+#: e2fsck/unix.c:204
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:206
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:211
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:213
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:215
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:217
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:221
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:225
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:238 misc/badblocks.c:1002 misc/tune2fs.c:2986 misc/util.c:129
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "intal determinâ se %s al è montât."
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Atenzion! %s al è montât.\n"
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Atenzion! %s al è in ûs.\n"
+
+#: e2fsck/unix.c:268
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s al è montât.\n"
+
+#: e2fsck/unix.c:270
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s al è in ûs.\n"
+
+#: e2fsck/unix.c:272
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Impussibil continuâ, si interomp.\n"
+"\n"
+
+#: e2fsck/unix.c:274
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:279
+msgid "Do you really want to continue"
+msgstr "Continuâ pardabon"
+
+#: e2fsck/unix.c:281
+msgid "check aborted.\n"
+msgstr "control interot.\n"
+
+#: e2fsck/unix.c:375
+msgid " contains a file system with errors"
+msgstr " al conten un filesystem cun erôrs"
+
+#: e2fsck/unix.c:377
+msgid " was not cleanly unmounted"
+msgstr " nol è stât dismontât in maniere nete"
+
+#: e2fsck/unix.c:379
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:383
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " al è stât montât %u voltis cence jessi controlât"
+
+#: e2fsck/unix.c:390
+msgid " has filesystem last checked time in the future"
+msgstr ""
+
+#: e2fsck/unix.c:396
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " al à passât %u dîs cence jessi controlât"
+
+#: e2fsck/unix.c:404
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:410
+msgid ", check forced.\n"
+msgstr ", control sfuarçât.\n"
+
+#: e2fsck/unix.c:443
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr ""
+
+#: e2fsck/unix.c:463
+msgid " (check deferred; on battery)"
+msgstr ""
+
+#: e2fsck/unix.c:466
+msgid " (check after next mount)"
+msgstr ""
+
+#: e2fsck/unix.c:468
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr ""
+
+#: e2fsck/unix.c:618
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERÔR: impussibil vierzi /dev/null (%s)\n"
+
+#: e2fsck/unix.c:689
+msgid "Invalid EA version.\n"
+msgstr "Version EA no valide.\n"
+
+#: e2fsck/unix.c:702
+msgid "Invalid readahead buffer size.\n"
+msgstr ""
+
+#: e2fsck/unix.c:757
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:765
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:769
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:778
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:790
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:863
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:867
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:882
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+
+#: e2fsck/unix.c:903
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:934 e2fsck/unix.c:1012 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1695 misc/tune2fs.c:1990 misc/tune2fs.c:2008
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr ""
+
+#: e2fsck/unix.c:991
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:996
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1001
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1025
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1031
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:1095
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1142
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1151
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1242
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1259 e2fsck/unix.c:1264
+msgid "while checking MMP block"
+msgstr ""
+
+#: e2fsck/unix.c:1266
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1282
+msgid "while reading MMP block"
+msgstr ""
+
+#: e2fsck/unix.c:1302 e2fsck/unix.c:1354 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2696 misc/mke2fs.c:2747 misc/tune2fs.c:2713
+#: misc/tune2fs.c:2758 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1343 misc/e2undo.c:270 misc/mke2fs.c:2736 misc/tune2fs.c:2747
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr ""
+
+#: e2fsck/unix.c:1369 misc/mke2fs.c:2762 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:1412
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:1419
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:1456
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1468
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:1529
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1531
+msgid "Superblock invalid,"
+msgstr ""
+
+#: e2fsck/unix.c:1532
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr ""
+
+#: e2fsck/unix.c:1546
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr ""
+
+#: e2fsck/unix.c:1575
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1582
+msgid "Could this be a zero-length partition?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1584
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:1590
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1592
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1596
+msgid "Possibly non-existent device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1599
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1613
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1688
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:1749
+#, c-format
+msgid "while checking journal for %s"
+msgstr ""
+
+#: e2fsck/unix.c:1752
+msgid "Cannot proceed with file system check"
+msgstr ""
+
+#: e2fsck/unix.c:1763
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1775
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1781
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1785
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1789
+#, c-format
+msgid "while recovering journal of %s"
+msgstr ""
+
+#: e2fsck/unix.c:1811
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr ""
+
+#: e2fsck/unix.c:1826
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr ""
+
+#: e2fsck/unix.c:1876
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr ""
+
+#: e2fsck/unix.c:1879
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1919
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr ""
+
+#: e2fsck/unix.c:1929
+msgid " Done.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1931
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+
+#: e2fsck/unix.c:1937
+msgid "aborted"
+msgstr "interot"
+
+#: e2fsck/unix.c:1939
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1966
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1970
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:2029
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:2031
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr ""
+
+#: e2fsck/unix.c:2035 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:2040
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:2050 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:197 misc/util.c:112
+msgid "nN"
+msgstr ""
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr " ('a' al abilite 'sì' a dut) "
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "anulât!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr "sì a dut\n"
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "sì\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "no\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? no\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? sì\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "sì"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:346
+msgid "writing block and inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr ""
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr ""
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr ""
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:792
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr ""
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr ""
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr ""
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr ""
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:1007 misc/util.c:134
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s al è montât; "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr ""
+
+#: misc/badblocks.c:1019 misc/util.c:145
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr ""
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr ""
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr ""
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr ""
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr ""
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr ""
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr ""
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr ""
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1347
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr ""
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTuF] [-v version] files...\n"
+msgstr ""
+
+#: misc/chattr.c:160
+#, c-format
+msgid "bad project - %s\n"
+msgstr ""
+
+#: misc/chattr.c:174
+#, c-format
+msgid "bad version - %s\n"
+msgstr ""
+
+#: misc/chattr.c:220 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:227
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:232 misc/chattr.c:244
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:253
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:261
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:265
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:272
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:276
+#, c-format
+msgid "while setting project on %s"
+msgstr ""
+
+#: misc/chattr.c:298
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:338
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:346
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr ""
+
+#: misc/create_inode.c:90 misc/create_inode.c:288 misc/create_inode.c:353
+#: misc/create_inode.c:391
+msgid "while expanding directory"
+msgstr ""
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:105 misc/create_inode.c:132 misc/create_inode.c:322
+#, c-format
+msgid "while writing inode %u"
+msgstr ""
+
+#: misc/create_inode.c:152 misc/create_inode.c:176
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:163
+#, c-format
+msgid "while opening inode %u"
+msgstr ""
+
+#: misc/create_inode.c:169 misc/create_inode.c:196 misc/create_inode.c:1043
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+msgid "while allocating memory"
+msgstr ""
+
+#: misc/create_inode.c:189 misc/create_inode.c:205
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:214
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr ""
+
+#: misc/create_inode.c:224
+#, c-format
+msgid "while closing inode %u"
+msgstr ""
+
+#: misc/create_inode.c:275
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:294
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:360
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:378 misc/create_inode.c:963
+#, c-format
+msgid "while looking up \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:398
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:627
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr ""
+
+#: misc/create_inode.c:805
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:815
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:825
+#, c-format
+msgid "while lstat \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:875
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:884
+msgid "malloc failed"
+msgstr ""
+
+#: misc/create_inode.c:892
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:899
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:910
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr ""
+
+#: misc/create_inode.c:921
+#, c-format
+msgid "while writing file \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:934
+#, c-format
+msgid "while making dir \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:952
+msgid "while changing directory"
+msgstr ""
+
+#: misc/create_inode.c:958
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:971
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:978
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:1004
+msgid "while saving inode data"
+msgstr ""
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blocs"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "cluster"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr ""
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr ""
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primari"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Backup"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ""
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr ""
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ""
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Blocs libars: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Inode libars: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr ""
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:373
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr ""
+
+#: misc/dumpe2fs.c:392
+msgid "Journal superblock magic number invalid!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#: misc/dumpe2fs.c:468
+msgid "failed to alloc MMP buffer\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:479
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:800 misc/tune2fs.c:2027
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1889
+#, c-format
+msgid "\tUsing %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1629 misc/tune2fs.c:2913
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Eseguìs e2fsck cumò!\n"
+"\n"
+
+#: misc/e2image.c:107
+#, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] [ -b superblock ] [ -B blocksize][ -fr ] device image-file\n"
+msgstr ""
+
+#: misc/e2image.c:110
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr ""
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr ""
+
+#: misc/e2image.c:176 misc/e2image.c:589 misc/e2image.c:595
+#: misc/e2image.c:1194
+msgid "while allocating buffer"
+msgstr ""
+
+#: misc/e2image.c:181
+#, c-format
+msgid "Writing block %llu\n"
+msgstr ""
+
+#: misc/e2image.c:195
+#, c-format
+msgid "error writing block %llu"
+msgstr ""
+
+#: misc/e2image.c:198
+msgid "error in generic_write()"
+msgstr ""
+
+#: misc/e2image.c:215
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:220
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:248
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:257
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:265
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:273
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/e2image.c:515
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:527
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:568
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr ""
+
+#: misc/e2image.c:599 misc/e2image.c:639
+msgid "Copying "
+msgstr ""
+
+#: misc/e2image.c:636
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:662
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:674 misc/e2image.c:1204
+#, c-format
+msgid "error reading block %llu"
+msgstr ""
+
+#: misc/e2image.c:728
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr ""
+
+#: misc/e2image.c:732
+#, c-format
+msgid "at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:768
+msgid "while allocating l1 table"
+msgstr ""
+
+#: misc/e2image.c:813
+msgid "while allocating l2 cache"
+msgstr ""
+
+#: misc/e2image.c:836
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1161
+msgid "while allocating ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1168
+msgid "while initializing ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1227 misc/e2image.c:1245
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1286
+msgid "while allocating block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1295
+msgid "while allocating scramble block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1318
+msgid "Scanning inodes...\n"
+msgstr ""
+
+#: misc/e2image.c:1330
+msgid "Can't allocate block buffer"
+msgstr ""
+
+#: misc/e2image.c:1369 misc/e2image.c:1383
+#, c-format
+msgid "while iterating over inode %u"
+msgstr ""
+
+#: misc/e2image.c:1415
+msgid "Raw and qcow2 images cannot be installed"
+msgstr ""
+
+#: misc/e2image.c:1437
+msgid "error reading bitmaps"
+msgstr ""
+
+#: misc/e2image.c:1449
+msgid "while opening device file"
+msgstr ""
+
+#: misc/e2image.c:1460
+msgid "while restoring the image table"
+msgstr ""
+
+#: misc/e2image.c:1565
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1570
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1576
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1581
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1586
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1596
+msgid "checking if mounted"
+msgstr ""
+
+#: misc/e2image.c:1603
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+
+#: misc/e2image.c:1657
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1663
+msgid "Can not stat output\n"
+msgstr ""
+
+#: misc/e2image.c:1673
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr ""
+
+#: misc/e2image.c:1676
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr ""
+
+#: misc/e2image.c:1679
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr ""
+
+#: misc/e2image.c:1683
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: misc/e2image.c:1693
+msgid "The -c option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1698
+msgid "The -c option not supported when writing to stdout\n"
+msgstr ""
+
+#: misc/e2image.c:1705
+msgid "while allocating check_buf"
+msgstr ""
+
+#: misc/e2image.c:1711
+msgid "The -p option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1721
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr ""
+
+#: misc/e2initrd_helper.c:68
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr ""
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr ""
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr ""
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr ""
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr ""
+
+#: misc/e2label.c:97 misc/tune2fs.c:3117
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr ""
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr ""
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr ""
+
+#: misc/e2label.c:117 misc/tune2fs.c:1687
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+msgid "while reading filesystem superblock."
+msgstr ""
+
+#: misc/e2undo.c:188
+msgid "while fetching superblock"
+msgstr ""
+
+#: misc/e2undo.c:201
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:340
+#, c-format
+msgid "illegal offset - %s"
+msgstr ""
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:373
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr ""
+
+#: misc/e2undo.c:380
+msgid "while reading undo file"
+msgstr ""
+
+#: misc/e2undo.c:385
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:396
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:403
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr ""
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:412
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr ""
+
+#: misc/e2undo.c:425
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+
+#: misc/e2undo.c:433
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr ""
+
+#: misc/e2undo.c:439
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+
+#: misc/e2undo.c:455
+#, c-format
+msgid "while opening `%s'"
+msgstr ""
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:507
+msgid "while reading keys"
+msgstr ""
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:552
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr ""
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, c-format
+msgid "while fetching block %llu."
+msgstr ""
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:615
+#, c-format
+msgid "while writing block %llu."
+msgstr ""
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr ""
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr ""
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr ""
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr ""
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr ""
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr ""
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:891
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr ""
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr ""
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr ""
+
+#: misc/fsck.c:1085
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr ""
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3745
+msgid "Mounting read-only.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3769
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3781 misc/fuse2fs.c:3795
+#, c-format
+msgid "%s: %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3797 misc/tune2fs.c:3013
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3804
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3812
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3827
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3831
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3840
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Vuarfins rilevâts; si consee la esecuzion di e2fsck.\n"
+
+#: misc/fuse2fs.c:3844
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr ""
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr ""
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:130
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr ""
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr ""
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:368
+msgid "while writing reserved inodes"
+msgstr ""
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr ""
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2809 misc/mke2fs.c:3214
+msgid "done \n"
+msgstr ""
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr ""
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr ""
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr ""
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr ""
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr ""
+
+#: misc/mke2fs.c:673
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:681
+#, c-format
+msgid "OS type: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:686
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr ""
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr ""
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr ""
+
+#: misc/mke2fs.c:711
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:822
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+
+#: misc/mke2fs.c:828
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:841
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr ""
+
+#: misc/mke2fs.c:855
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:867
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:881 misc/tune2fs.c:2055
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:898
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:920
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:935
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:958
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:965
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:989
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1015 misc/mke2fs.c:1024
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr ""
+
+#: misc/mke2fs.c:1069
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr ""
+
+#: misc/mke2fs.c:1087
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1114
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1131
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr ""
+
+#: misc/mke2fs.c:1179
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1192 misc/tune2fs.c:1068
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1204 misc/tune2fs.c:417
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1340
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1344
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1348
+msgid "Aborting...\n"
+msgstr ""
+
+#: misc/mke2fs.c:1389
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1571
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1608
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1641
+#, c-format
+msgid "invalid block size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1645
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1674
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1688 misc/tune2fs.c:1784
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1700
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:1705
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:1713
+msgid "Illegal number for flex_bg size"
+msgstr ""
+
+#: misc/mke2fs.c:1719
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1724
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr ""
+
+#: misc/mke2fs.c:1734
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "invalid inode size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1757
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1768
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:1777
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1786
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1801
+#, c-format
+msgid "bad num inodes - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1814
+msgid "while allocating fs_feature string"
+msgstr ""
+
+#: misc/mke2fs.c:1831
+#, c-format
+msgid "bad revision level - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1836
+#, c-format
+msgid "while trying to create revision %d"
+msgstr ""
+
+#: misc/mke2fs.c:1850
+msgid "The -t option may only be used once"
+msgstr ""
+
+#: misc/mke2fs.c:1858
+msgid "The -T option may only be used once"
+msgstr ""
+
+#: misc/mke2fs.c:1914 misc/mke2fs.c:3298
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1920
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1926
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1937
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:1967
+msgid "filesystem"
+msgstr "filesystem"
+
+#: misc/mke2fs.c:1985 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:1991
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:1998
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2015
+msgid "Filesystem larger than apparent device size."
+msgstr ""
+
+#: misc/mke2fs.c:2035
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:2085
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Il HURD nol supuarte la funzionalitât dal gjenar di file.\n"
+
+#: misc/mke2fs.c:2090
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2095
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2100
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2110
+msgid "while trying to determine hardware sector size"
+msgstr ""
+
+#: misc/mke2fs.c:2116
+msgid "while trying to determine physical sector size"
+msgstr ""
+
+#: misc/mke2fs.c:2148
+msgid "while setting blocksize; too small for device\n"
+msgstr ""
+
+#: misc/mke2fs.c:2153
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:2177
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2191
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2213
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:2220
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2228
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2238
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2251
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr ""
+
+#: misc/mke2fs.c:2268
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2288
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2294
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:2314
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:2317
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2319
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2340
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2344
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:2352
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2398
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2409
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2434
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2449
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2465
+msgid ""
+"The encrypt and casefold features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2480
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2487
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2495
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2507
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2516
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:2538
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2550
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2565
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2580
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2587
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2601
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+
+#: misc/mke2fs.c:2788
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2804
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2863
+msgid "while initializing quota context"
+msgstr ""
+
+#: misc/mke2fs.c:2870
+msgid "while writing quota inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2895
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr ""
+
+#: misc/mke2fs.c:2971
+msgid "in malloc for android_sparse_params"
+msgstr ""
+
+#: misc/mke2fs.c:2985
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:3001
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3008
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3016
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3040
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3139
+#, c-format
+msgid "unknown os - %s"
+msgstr ""
+
+#: misc/mke2fs.c:3202
+msgid "Allocating group tables: "
+msgstr ""
+
+#: misc/mke2fs.c:3210
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:3219
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+
+#: misc/mke2fs.c:3225
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3266
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:3279
+msgid "while reserving blocks for online resize"
+msgstr ""
+
+#: misc/mke2fs.c:3291 misc/tune2fs.c:1492
+msgid "journal"
+msgstr ""
+
+#: misc/mke2fs.c:3303
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:3310
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:3315 misc/mke2fs.c:3344 misc/mke2fs.c:3382
+#: misc/mk_hugefiles.c:600 misc/tune2fs.c:1521 misc/tune2fs.c:1540
+msgid "done\n"
+msgstr ""
+
+#: misc/mke2fs.c:3321
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:3331
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:3340
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:3352 misc/tune2fs.c:1133
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3357
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3373
+msgid "Copying files into the device: "
+msgstr ""
+
+#: misc/mke2fs.c:3379
+msgid "while populating file system"
+msgstr ""
+
+#: misc/mke2fs.c:3386
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:3393
+msgid "while writing out and closing file system"
+msgstr ""
+
+#: misc/mke2fs.c:3396
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr ""
+
+#: misc/mk_hugefiles.c:515
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:583
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:584
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr ""
+
+#: misc/mk_hugefiles.c:586
+#, c-format
+msgid "with %llu blocks each"
+msgstr ""
+
+#: misc/mk_hugefiles.c:595
+#, c-format
+msgid "while creating huge file %lu"
+msgstr ""
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr ""
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Impussibil vierzi %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:136
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr ""
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2804
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:296 misc/tune2fs.c:2813
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+
+#: misc/tune2fs.c:303 misc/tune2fs.c:2820
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:327
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:336
+msgid "Journal removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:380
+msgid "while reading bitmaps"
+msgstr ""
+
+#: misc/tune2fs.c:388
+msgid "while clearing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:399
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:435 misc/tune2fs.c:458 misc/tune2fs.c:471
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:486
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:493
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:495
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:497
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1035
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1071
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1077
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1086
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1094
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1112
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1125
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1143
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1152
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1160
+msgid "Error while reading bitmaps\n"
+msgstr ""
+
+#: misc/tune2fs.c:1169
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1174
+msgid "while reading MMP block."
+msgstr ""
+
+#: misc/tune2fs.c:1206
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1217
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1228
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1230
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1236
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1243
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1269
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1271
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1334
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1344
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1374
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1395
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1405
+msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1419
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1437
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1443
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1485
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1505
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1509
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr ""
+
+#: misc/tune2fs.c:1517
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:1523
+msgid "Creating journal inode: "
+msgstr ""
+
+#: misc/tune2fs.c:1537
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+
+#: misc/tune2fs.c:1575
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1588
+msgid "while initializing quota context in support library"
+msgstr ""
+
+#: misc/tune2fs.c:1603
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr ""
+
+#: misc/tune2fs.c:1611
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr ""
+
+#: misc/tune2fs.c:1629
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr ""
+
+#: misc/tune2fs.c:1672
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1730
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr ""
+
+#: misc/tune2fs.c:1755 misc/tune2fs.c:1768
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1811
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1844
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1873
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1888
+msgid "-o may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1897
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1914
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad inode size - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1967
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:2064
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2069
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/tune2fs.c:2078
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2096
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2111
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2126
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2132
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2151
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+
+#: misc/tune2fs.c:2622
+msgid "Failed to read inode bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2627
+msgid "Failed to read block bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:2644 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr ""
+
+#: misc/tune2fs.c:2647
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2653
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:2658
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr ""
+
+#: misc/tune2fs.c:2690
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:2900
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2907
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2919
+msgid "Cannot modify a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2932
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2939
+msgid "Shrinking inode size is not supported\n"
+msgstr ""
+
+#: misc/tune2fs.c:2944
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2950
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:2998
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3009
+#, c-format
+msgid "Recovering journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3028
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3044
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3049
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr ""
+
+#: misc/tune2fs.c:3056
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr ""
+
+#: misc/tune2fs.c:3076
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3081
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3084
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:3099
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3107
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:3113
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3145
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3163
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3181
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3196
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3199
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3229
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/tune2fs.c:3245
+msgid "Need to update journal superblock.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3267
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3274
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3292
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3296
+msgid "Failed to change inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:3310
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3315
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3322
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+
+#: misc/util.c:101
+msgid "<proceeding>\n"
+msgstr ""
+
+#: misc/util.c:105
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr ""
+
+#: misc/util.c:109
+msgid "Proceed anyway? (y,N) "
+msgstr ""
+
+#: misc/util.c:136
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:141
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:148
+msgid "mke2fs forced anyway.\n"
+msgstr ""
+
+#: misc/util.c:164
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:189
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+
+#: misc/util.c:216
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:247
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+
+#: misc/util.c:254
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"La dimension dal gjornâl domandade e je di %d blocs; e scugne stâ\n"
+"tra 1024 e 10240000 blocs. Si interomp.\n"
+
+#: misc/util.c:262
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Dimension dal gjornâl masse grande pal filesystem.\n"
+
+#: misc/util.c:276
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Ûs: %s [-d] [-p file_pid] [-s percorssocket] [-T timeout]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n num] [-s percorssocket]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "argoments sbaliâts"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "demoni uuidd za in esecuzion al pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Impussibil creâ un socket di flus unix: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Impussibil vincolâ il socket unix %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Impussibil scoltâ sul socket unix %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr ""
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr ""
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr ""
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr ""
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr ""
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr ""
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr ""
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr ""
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr ""
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr ""
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr ""
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:534
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr ""
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:564
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:575
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr ""
+
+#: resize/main.c:581
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+
+#: resize/main.c:587
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:593
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:600
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr ""
+
+#: resize/main.c:605
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr ""
+
+#: resize/main.c:613
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr ""
+
+#: resize/main.c:615
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr ""
+
+#: resize/main.c:617
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr ""
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:635
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr ""
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr ""
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr ""
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr ""
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr ""
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr ""
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr ""
+
+#: resize/online.c:288
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr ""
+
+#: resize/resize2fs.c:759
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr ""
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2421
+msgid "new meta blocks"
+msgstr ""
+
+#: resize/resize2fs.c:2644
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2649
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2722
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.45.3"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Assegnazion memorie falide"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr ""
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr ""
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr ""
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr ""
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr ""
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#: lib/support/plausible.c:118
+#, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr ""
+
+#: lib/support/plausible.c:121
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr ""
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr ""
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr ""
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr ""
+
+#: lib/support/plausible.c:199
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:202
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Impussibil vierzi %s: %s\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr ""
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr ""
+
+#: lib/support/plausible.c:252
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr ""
+
+#: lib/support/plausible.c:276
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr ""
diff --git a/po/hu.gmo b/po/hu.gmo
new file mode 100644
index 0000000..0705511
--- /dev/null
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
new file mode 100644
index 0000000..50a20e9
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,8663 @@
+# Hungarian translation of e2fsprogs
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+# This file is distributed under the same license as the e2fsprogs package.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by Theodore Ts'o.
+# Theodore Ts'o <tytso@mit.edu>, 2010.
+# Gabor Kelemen <kelemeng at gnome dot hu>, 2016.
+# Balázs Úr <urbalazs@gmail.com>, 2017, 2018.
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.43.5\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2018-01-21 15:55+0100\n"
+"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
+"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
+"Language: hu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "A(z) %u. hibás blokk kívül esik a tartományon; mellőzve.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "a hibás blokk inode épségének ellenőrzése közben"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "a hibás blokk inode olvasása közben"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "a(z) %s megnyitására tett kísérlet közben"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "a(z) „%s†megnyitására tett kísérlet közben"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "a hibás blokkok listájának olvasásakor fájlból"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "a hibás blokkok inode frissítésekor"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr ""
+"Figyelem: a(z) %u. blokk illegális a hibás blokkok inode-jában. Törölve.\n"
+
+#: e2fsck/dirinfo.c:331
+#, fuzzy
+msgid "while freeing dir_info tdb file"
+msgstr "a visszavonási fájl olvasásakor"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Hiba a(z) %lu (%s) blokk olvasásakor %s során. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Hiba a(z) %lu (%s) blokk olvasásakor. "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Hiba mellőzése"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Újraírás kényszerítése"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Hiba a(z) %lu (%s) blokk írásakor %s során. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Hiba a(z) %lu (%s) blokk írásakor. "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "üres könyvtárblokkok"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "üres könyvtártérkép"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Üres könyvtárblokk %u (#%d) ebben az inode-ban: %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s fájlnév blokkszám blokkméret\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "A blokkok száma illegális!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Nem foglalható blokkpuffer (méret=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "extent újjáépíti az inode-térképet"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Használat: %s lemez\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "A BLKFLSBUF ioctl nem támogatott! A pufferek nem üríthetők.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Használat: %s [-F] [-I inode_puffer_blokkok] eszköz\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "%s megnyitásakor ürítésre"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "%s ürítésére tett kísérlet közben"
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr "„%s†megnyitására tett kísérlet közben"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr "inode vizsgálat megnyitása közben"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr "következő inode lekérése közben"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u inode vizsgálva.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "napló szuperblokkjának olvasása\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: nem található érvényes napló-szuperblokk\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: a napló túl rövid\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: napló helyreállítása\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: nem próbálom helyreállítani a naplót írásvédett módban\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "%s újranyitására tett kísérlet közben"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aextended attribute"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aerror allocating"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblock"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccompress"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cconflicts with some other fs @b"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "ddirectory"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Ddeleted"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eentry"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e '%Dn' in %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "ffilesystem"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Ffor @i %i (%Q) is"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggroup"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE @d @i"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iillegal"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lis a link"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mmultiply-claimed"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "ninvalid"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oorphaned"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblem in"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qquota"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rroot @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sshould be"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "uunattached"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vdevice"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zzero-length"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<A NULL inode>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<A hibás blokkok inode>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<A felhasználói kvóta inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<A csoportkvóta inode>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<A rendszertöltő inode>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<A könyvtár visszaállítása inode>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<A csoportleíró inode>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<A napló inode>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<9. fenntartott inode>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<10. fenntartott inode>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "szabályos fájl"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "könyvtár"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "karakteres eszköz"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "blokkos eszköz"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "elnevezett adatcsatorna"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "szimbolikus link"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "foglalat"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "ismeretlen fájltípus 0%o móddal"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "indirekt blokk"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "dupla indirekt blokk"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "tripla indirekt blokk"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "fordító blokk"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "blokk #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "felhasználó"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "csoport"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "ismeretlen kvótatípus"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "többszörösen lefoglalt inode térkép"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "belső hiba: nem található a dup_blk ehhez: %llu\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "visszaadva a clone_file_block-ból"
+
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "belső hiba: nem kereshető ki az EA blokkrekord ehhez: %llu"
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "belső hiba: nem kereshető ki az EA inode rekord ehhez: %u"
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr "könyvtárblokk olvasása"
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr "használatban lévő inode-térkép"
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr "könyvtár inode-térkép"
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr "szabályos fájl inode-térkép"
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr "használatban lévő blokktérkép"
+
+#: e2fsck/pass1.c:1262
+msgid "metadata block map"
+msgstr "metaadat-blokktérkép"
+
+#: e2fsck/pass1.c:1324
+msgid "opening inode scan"
+msgstr "inode-vizsgálat megkezdése"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr "következő inode lekérése a vizsgálattól"
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "1. lépés"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "%u. inode indirekt blokkjainak olvasása"
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr "hibás inode-térkép"
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr "inode a hibás blokktérképben"
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr "imagic inode-térkép"
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr "többszörösen lefoglalt blokktérkép"
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr "ext attr blokktérkép"
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+"%6lu(%c): a várt %6lu helyett %6lu fizikai érkezett (blokkszám: %lld)\n"
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr "blokkbittérkép"
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr "inode bittérkép"
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr "inode tábla"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "2. lépés"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "Nem folytatható."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "inode kész bittérkép"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Legmagasabb memória"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "3. lépés"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "inode-ciklust felismerő bittérkép"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "4. lépés"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "5. lépés"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Memóriafoglalási hiba"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Memóriafoglalási hiba"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(nincs kérdés)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Javítás"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Törlés"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Ãthelyezés"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Lefoglalás"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Kiterjesztés"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Csatolás a /lost+found könyvtárba"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Létrehozás"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Megmentés"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Csonkítás"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Inode törlése"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Megszakítás"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Szétvágás"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Folytatás"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Többszörösen lefoglalt blokkok klónozása"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Fájl törlése"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Üzenetek elnyomása"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Törlés"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "HTree index törlése"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Újralétrehozás"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(NINCS)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "JAVÃTVA"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "TÖRÖLVE"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "ÃTHELYEZVE"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "LEFOGLALVA"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "KITERJESZTVE"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "ÚJRACSATOLVA"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "LÉTREHOZVA"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "MEGMENTVE"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "CSONKÃTVA"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INODE TÖRÖLVE"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "MEGSZAKÃTVA"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "SZÉTVÃGVA"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "FOLYTATÃS"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "TÖBBSZÖRÖSEN LEFOGLALT BLOKKOK KLÓNOZVA"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "FÃJL TÖRÖLVE"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "ELNYOMVA"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "TÖRÖLVE"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE INDEX TÖRÖLVE"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "ÚJRA LÉTRE LESZ HOZVA"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "%g csoport blokkbittérképe nincs a csoportban (%b blokk)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "%g csoport inode bittérképe nincs a csoportban (%b blokk)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"%g csoport inode táblája nincs a csoportban (%b blokk)\n"
+"FIGYELMEZTETÉS: SÚLYOS ADATVESZTÉS LEHETSÉGES.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"A szuperblokk nem olvasható, vagy nem érvényes ext2/ext3/ext4 fájlrendszert "
+"ír\n"
+"le. Ha az eszköz érvényes és valóban ext2/ext3/ext4 fájlrendszert tartalmaz\n"
+"(nem pedig swapet, ufs-t vagy mást), akkor a szuperblokk sérült, és "
+"próbálja\n"
+"meg futtatni az e2fsck-t egy alternatív szuperblokk használatával:\n"
+" e2fsck -b 8193 <eszköz>\n"
+" vagy\n"
+" e2fsck -b 32768 <eszköz>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"A fájlrendszer mérete (a szuperblokk szerint) %b blokk\n"
+"Az eszköz fizikai mérete %c blokk.\n"
+"A szuperblokk vagy a partíciós tábla egyike valószínűleg sérült!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"A szuperblokk blokkmérete = %b, darabmérete = %c.\n"
+"Az e2fsck ezen verziója nem támogatja a blokkmérettől eltérő darabméretet.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "A szuperblokk blocks_per_group értéke %b, %c helyett\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "A szuperblokk first_data_block %b, %c helyett\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"A fájlrendszernek nincs UUID-je; létrehozok egyet.\n"
+"\n"
+
+#: e2fsck/problem.c:167
+#, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Megjegyzés: ha több inode-, vagy blokkbittérkép, vagy az inode tábla\n"
+"része áthelyezést igényel, akkor hasznos lehet előbb az e2fsck futtatása\n"
+"a „-b %S†kapcsolóval. Lehet, hogy a problémát csak az elsődleges\n"
+"blokkcsoport-leírók okozzák, és a tartalék blokkcsoport-leírók rendben "
+"vannak\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Sérülés a szuperblokkban. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Hiba a fizikai eszköz méretének meghatározásakor: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "az inode-szám a szuperblokkban %i, %j helyett.\n"
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "A Hurd nem támogatja a fájltípus-jellemzőt.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "A szuperblokk naplója érvénytelen (%i. inode).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+"A külső napló több fájlrendszer-felhasználóval rendelkezik (nem "
+"támogatott).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr "Nem található külső napló\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr "A külső napló szuperblokkja hibás\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr "A külső napló nem támogatja ezt a fájlrendszert\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"A fájlrendszernapló szuperblokkja ismeretlen %N típusú (nem támogatott).\n"
+"Valószínű, hogy ez az e2fsck példány régi, és/vagy nem támogatja ezt a\n"
+"naplóformátumot.\n"
+"Az is lehet, hogy a napló szuperblokkja sérült.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+msgid "@j @S is corrupt.\n"
+msgstr "A napló szuperblokkja sérült.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "A szuperblokk has_journal jelzője tiszta, de jelen van napló.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+"A szuperblokk needs_recovery jelzője be van állítva, de nincs jelen napló.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+"A szuperblokk needs_recovery jelzője tiszta, de a napló adatokat tartalmaz.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr "Napló tisztítása"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr ""
+"A fájlrendszer jellemzőjelzői be vannak állítva, de 0 revíziójú "
+"fájlrendszer. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s árva inode: %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "Illegális %B (%b) található az árva %i. inode-ban.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Már megtisztított %B (%b) található az árva %i. inode-ban.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "Illegális árva inode (%i.) a szuperblokkban.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Illegális árva inode (%i.) az árva inode-ok listájában.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+"A napló szuperblokkján ismeretlen, csak olvasható jellemzőjelző van "
+"beállítva.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"A napló szuperblokkján ismeretlen, inkompatibilis jellemzőjelző van "
+"beállítva.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "A naplóverziót ez az e2fsck nem támogatja.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"A napló áthelyezése a /%s alól egy rejtett inode-ra.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Hiba a napló mozgatásakor: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Érvénytelen V2 naplószuperblokk-mezők találhatók (V1 naplóból).\n"
+"Mezők tisztítása a V1 naplószuperblokkon túl…\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr "Napló futtatása mindenképp"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"A helyreállítási jelző nincs beállítva a tartalék szuperblokkban, emiatt a\n"
+"napló mindenképp futtatásra kerül.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Napló inode-blokk információinak mentése.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"A fájlrendszeren a resize_inode nincs engedélyezve, de a "
+"s_reserved_gdt_blocks\n"
+"értéke %N; ám nulla kellene legyen. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode nincs engedélyezve, de az átméretezési inode nem nulla. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+msgid "Resize @i not valid. "
+msgstr "Az átméretezési inode nem érvényes. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"A szuperblokk utolsó csatolási ideje\n"
+"(%t, most = %T) a jövőben van.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"A szuperblokk utolsó írási ideje\n"
+"(%t, most = %T) a jövőben van.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "A szuperblokktipp a külső szuperblokkhoz %X kellene legyen. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Dirhash tipp hozzáadása a fájlrendszerhez.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "%g csoportleíró ellenőrzőösszege %04x a várt %04y helyett. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+"%g csoportleíró inicializálatlanként van megjelölve a jellemző megadása "
+"nélkül.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "%g csoportleíró használaton kívüli inode száma érvénytelen: %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr "Az utolsó csoportblokk-bittérkép inicializálatlan. "
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "A(z) %i. naplótranzakció sérült, az újrajátszás megszakítva.\n"
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "A test_fs jelző beállítva (és az ext4 elérhető). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"A szuperblokk utolsó csatolási ideje a jövőben van.\n"
+"\t(egy napnál kevesebbel, valószínűleg a hardveróra hibás beállítása miatt)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"A szuperblokk utolsó írási ideje a jövőben van.\n"
+"\t(egy napnál kevesebbel, valószínűleg a hardveróra hibás beállítása miatt)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Legalább egy blokkcsoportleíró ellenőrzőösszege érvénytelen. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "A szabad inode-ok számának beállítása erre: %j (volt: %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "A szabad blokkok számának beállítása erre: %c (volt: %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "%U kvóta i-node %i (%Q) elrejtése.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+msgid "@S has invalid MMP block. "
+msgstr "A szuperblokk érvénytelen MMP-blokkal rendelkezik. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr "A szuperblokk érvénytelen MMP-magic bájtokkal rendelkezik. "
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+"A szuperblokk metadata_csum jellemzője elavulttá teszi az uninit_bg-t. "
+"Mindkét jellemző nem lehet egyszerre beállítva."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+#, fuzzy
+msgid "@S MMP @b checksum does not match. "
+msgstr ""
+"A szuperblokk MMP blokk ellenőrzőösszege nem felel meg az MMP blokknak. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+"A 64 bites szuperblokkú fájlrendszereknek extentekre van szükségük a teljes "
+"lemez eléréséhez. "
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "A First_meta_bg túl nagy. (%N, a maximum érték: %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+msgid "External @j @S checksum does not match @S. "
+msgstr ""
+"A külső napló szuperblokk ellenőrzőösszege nem felel meg a szuperblokknak. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+"a szuperblokk metadata_csum_seed jellemzője nem szükséges a metadata_csum "
+"nélkül."
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+"Hiba a kvóta kontextus előkészítésekor a támogató programkönyvtárban: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Hibás szükséges további isize ebben: @S (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Hibás kívánt további isize ebben: @S (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+msgid "Invalid %U @q @i %i. "
+msgstr "Érvénytelen %U kvóta inode: %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "1. lépés: inode-ok, blokkok és méretek ellenőrzése\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr "a gyökér inode nem könyvtár. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+"a gyökér inode dtime értéke be van állítva (valószínűleg a régi mke2fs "
+"miatt). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "A(z) %i. fenntartott inode (%Q) érvénytelen móddal rendelkezik. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "a(z) %i. törölt inode dtime-ja nulla. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "a(z) %i. inode használatban van, de a dtime be van állítva. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "a(z) %i. inode nulla hosszúságú könyvtár. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "%g csoport blokkbittérképe itt: %b más fájlrendszerblokkal ütközik.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "%g csoport inode bittérképe itt: %b más fájlrendszerblokkal ütközik.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "%g csoport inode táblája itt: %b más fájlrendszerblokkal ütközik.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "%g csoport blokkbittérképe (%b) hibás. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "%g csoport inode bittérképe (%b) hibás. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "%i. inode: i_size=%Is, de %N kellene legyen. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "%i. inode: i_blocks=%Ib, de %N kellene legyen. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+msgid "@I %B (%b) in @i %i. "
+msgstr "illegális %B (%b) a(z) %i. inode-ban. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "A %B (%b) átfedi a fájlrendszer metaadatait a(z) %i. inode-ban. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "%i. inode illegális "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Túl sok illegális blokk a(z) %i. inode-ban.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "illegális %B (%b) a hibás blokk inode-ban. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "A hibás blokk inode illegális blokkokal rendelkezik. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Többször szereplő vagy hibás blokk van használatban!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "A hibás %b blokk hibásblokk-inode indirekt blokként van használatban. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"A hibás blokk inode valószínűleg megsérült. Most álljon meg,\n"
+"és futtassa az „e2fsck -c†parancsot a hibás blokkok kereséséhez\n"
+"a fájlrendszeren.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Ha a blokk valóban hibás, akkor a fájlrendszer nem javítható.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Ezt a blokkot eltávolíthatja a hibás blokkok listájáról, és\n"
+"remélheti, hogy a blokk valójában jó, de erre nincs garancia.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Az elsődleges szuperblokk (%b) a hibás blokkok listáján van.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+"Az elsődleges csoportleírókban lévő blokk (%b) a hibás blokkok listáján van\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Figyelmeztetés: A(z) %g csoport szuperblokkja (%b) hibás.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+"Figyelmeztetés: A(z) %g csoport csoportleíróinak másolata hibás blokkot (%b) "
+"tartalmaz.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+"Programozási hiba? A(z) %b. blokk ok nélkül lefoglalva a process_bad_block-"
+"ban.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr ""
+"hiba %N folytonos blokk lefoglalásakor a(z) %g. blokkcsoportban %s számára: "
+"%m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "hiba a blokkpuffer lefoglalásakor %s áthelyezéséhez\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "%g csoportból %s áthelyezése innen: %b ide: %c…\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "%g csoportból %s áthelyezése ide: %c…\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Figyelmeztetés: nem olvasható %b blokk ebből: %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Figyelmeztetés: nem írható %b blokk ehhez: %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr "hiba az inode bittérkép lefoglalásakor (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+msgid "@A @b @B (%N): %m\n"
+msgstr "hiba a blokkbittérkép lefoglalásakor (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr "hiba az icount linkinformációk lefoglalásakor: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "hiba a könyvtárblokktömb lefoglalásakor: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Hiba az inode-ok vizsgálatakor (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Hiba a(z) %i. inode blokkjainak bejárásakor: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Hiba az inode száminformációinak tárolásakor (inode=%i, szám=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+"Hiba a könyvtárblokk-információk tárolásakor (inode=%i, blokk=%b, szám=%N): "
+"%m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Hiba a(z) %i. inode olvasásakor: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "a(z) %i. inode imagic jelzője beállítva. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"A speciális fájl (eszköz/foglalat/fifo/szimlink) fájl (inode: %i)\n"
+"megváltoztathatatlan vagy csak hozzáfűzés jelzője be van állítva. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+"A speciális fájl (eszköz/foglalat/fifo/szimlink) fájl %i. inode-ja nem nulla "
+"méretű. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+msgid "@j @i is not in use, but contains data. "
+msgstr "a napló inode nincs használatban, de adatokat tartalmaz. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr "a napló nem normál fájl. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "a(z) %i. inode része az elárvult inode-ok listájának. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "egy sérült, árva láncolt lista részét alkotó inode-ok megtalálva. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+msgid "@A refcount structure (%N): %m\n"
+msgstr "hiba a refcount struktúra lefoglalásakor (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Hiba a bővített attribútumblokk (%b) olvasásakor a(z) %i. inode-hoz."
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+msgid "@i %i has a bad @a @b %b. "
+msgstr "a(z) %i. inode bővített attribútumblokkja (%b) hibás ."
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+msgid "Error reading @a @b %b (%m). "
+msgstr "Hiba a bővített %b attribútumblokk olvasásakor (%m)."
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "a(z) %b bővített attribútumblokk referenciaszáma %r a várt %N helyett."
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+msgid "Error writing @a @b %b (%m). "
+msgstr "Hiba a bővített attribútumblokk (%b) írásakor (%m)."
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "a bővített attribútumblokk (%b) h_blocks értéke > 1."
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+msgid "@A @a region allocation structure. "
+msgstr ""
+"hiba a bővített attribútumrégió foglalási struktúrájának lefoglalásakor. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "a bővített attribútumblokk (%b) sérült (foglalásütközés)."
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "a bővített attribútumblokk (%b) sérült (érvénytelen név)-"
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "a bővített attribútumblokk (%b) sérült (érvénytelen érték)."
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr "a(z) %i. inode túl nagy. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+msgid "%B (%b) causes @d to be too big. "
+msgstr "A %B (%b) miatt a könyvtár túl nagy. "
+
+#: e2fsck/problem.c:854
+msgid "%B (%b) causes file to be too big. "
+msgstr "A %B (%b) miatt a fájl túl nagy. "
+
+#: e2fsck/problem.c:859
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "A %B (%b) miatt a szimlink túl nagy. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+"a(z) %i. inode INDEX_FL jelzője be van állítva egy htree-t nem támogató "
+"fájlrendszeren.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "a(z) %i inode INDEX_FL jelzője be van állítva, de nem könyvtár.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "a(z) %i. HTREE könyvtár inode gyökér csomópontja érvénytelen.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "a(z) %i. HTREE könyvtár hash verziója nem támogatott (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+"a(z) %i. HTREE könyvtár inode inkompatibilis htree gyökércsomópont-jelzőt "
+"használ.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "a(z) %i. HTREE könyvtár inode famélysége (%N) túl nagy\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"A hibás blokk inode indirekt blokkja (%b) ütközik a\n"
+"fájlrendszer metaadataival."
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Az átméretezési inode (újra)létrehozása sikertelen: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "a(z) %i. inode extra mérete (%IS) érvénytelen\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "a(z) %i. inode bővített attribútumának névhossza (%N) érvénytelen\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr ""
+"a(z) %i. inode bővített attribútumának értékeltolása (%N) érvénytelen\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr ""
+"a(z) %i. inode bővített attribútumának értékblokkja (%N) érvénytelen (0 kell "
+"legyen)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "a(z) %i. inode bővített attribútumának értékmérete (%N) érvénytelen\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "a(z) %i. inode bővített attribútumának hashe (%N) érvénytelen\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "a(z) %i. inode egy %It, de úgy tűnik, valójában egy könyvtár.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Hiba az extent fa olvasásakor a(z) %i. inode-ban: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Nem sikerült az extentek bejárása a(z) %i. inode-ban\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"a(z) %i. inode érvénytelen extentet tartalmaz\n"
+"\t(logikai blokk: %c, érvénytelen fizikai blokk: %b, hossz: %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"a(z) %i. inode érvénytelen extentet tartalmaz\n"
+"\t(logikai blokk: %c, fizikai blokk: %b, érvénytelen hossz: %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+"a(z) %i. inode EXTENTS_FL jelzője be van állítva egy extenteket nem támogató "
+"fájlrendszeren.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+"a(z) %i. inode extent formátumú, de a szuperblokkban nincs EXTENTS jellemző\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "a(z) %i. inode-ból hiányzik az EXTENT_FL, de extent formátumú\n"
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "a(z) %i. gyors szimlinkhez be van állítva az EXTENT_FL."
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"a(z) %i. inode használaton kívüli extenteket tartalmaz\n"
+"\t(érvénytelen logikai blokk: %c, fizikai blokk: %b, hossz: %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr ""
+"a(z) %i. inode érvénytelen extent csomópontot tartalmaz (%b. blk, %c. lblk)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr ""
+"Hiba a részfürt blokkbittérképének átalakításakor: %m\n"
+"\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+msgid "@q @i is not a regular file. "
+msgstr "a kvóta inode nem normál fájl. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+msgid "@q @i is not in use, but contains data. "
+msgstr "a kvóta inode nincs használatban, de adatokat tartalmaz. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+msgid "@q @i is visible to the user. "
+msgstr "a kvóta inode látható a felhasználó számára. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+msgid "The bad @b @i looks @n. "
+msgstr "A hibás blokkok inode érvénytelennek tűnik. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"a(z) %i. inode nulla hosszúságú extentet tartalmaz\n"
+"\t(érvénytelen logikai blokk: %c, fizikai blokk: %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "a(z) %i. inode látszólag szemetet tartalmaz. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+"a(z) %i. inode átmegy az ellenőrzéseken, de az ellenőrzőösszege nem felel "
+"meg egy inode-nak. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "a(z) %i. inode bővített attribútuma sérült (foglalásütközés). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"a(z) %i. inode extentblokkja átmegy az ellenőrzéseken, de nem felel meg egy "
+"extentnek\n"
+"\t(logikai blokk: %c, fizikai blokk: %b, hossz: %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+"a(z) %i. inode bővített attribútumblokkja (%b) átmegy az ellenőrzéseken, de "
+"az ellenőrzőösszege nem felel meg egy blokknak. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"a(z) %i. inode %N belső extent csomópont szintje:\n"
+"A logikai %b kezdet nem egyezik a következő szint %c logikai kezdetével. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"a(z) %i. inode extentjei vége meghaladja az engedélyezett értéket\n"
+"\t(logikai blokk: %c, fizikai blokk: %b, hossz: %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+"a(z) %i. inode beágyazott adatokat tartalmaz, de a szuperblokkban nincs "
+"INLINE_DATA jellemző\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+"a(z) %i. inode INLINE_DATA_FL jelzővel rendelkezik egy beágyazott adatokat "
+"nem támogató fájlrendszeren.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+"a(z) %i. inode %b blokkja kritikus metaadatokkal ütközik, blokkellenőrzések "
+"kihagyása.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr ""
+"a(z) %i. könyvtár inode %b blokkjának a(z) %c. blokknál kellene lennie. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr ""
+"a(z) %i. könyvtár inode inicializálatlannak jelölt extentet tartalmaz a(z) "
+"%c. blokknál. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"a(z) %i. inode logikai %b blokkja (%c. fizikai blokk) megsérti a "
+"fürtfoglalási szabályokat.\n"
+"Az 1B lépésben javításra kerül.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr ""
+"a(z) %i. inode INLINE_DATA_FL jelzővel rendelkezik, de a bővített attribútum "
+"nem található. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"A speciális fájl (eszköz/foglalat/fifo) fájl (inode: %i)\n"
+"extents vagy beágyazott adatok jelzője be van állítva. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+"a(z) %i. inode rendelkezik extent fejléccel, de a beágyazott adatok jelző be "
+"van állítva.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+"a(z) %i. inode úgy tűnik beágyazott adatokkal rendelkezik, de az extent "
+"jelző be van állítva.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+"a(z) %i. inode úgy tűnik blokktérképpel rendelkezik, de a beágyazott adatok "
+"és az extent jelző be van állítva.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+"a(z) %i. inode beágyazott adatok és extent jelzői be vannak állítva, de az "
+"i_block szemetet tartalmaz.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+"A hibás blokkok listája szerint a hibás blokkok listájának inode-ja hibás. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+msgid "@A @x region allocation structure. "
+msgstr "hiba az extentrégió foglalási struktúrájának lefoglalásakor. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"a(z) %i. inode többszörös extentleképezést tartalmaz\n"
+"\t(logikai blokk: %c, érvénytelen fizikai blokk: %b, hossz: %N)\n"
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr "hiba memória foglalásakor a titkosított könyvtárlista számára\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "a(z) %i. inode extentfája sekélyebb lehetne (%b; lehetne <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+"a(z) %i. inode a bigalloc fájlrendszeren nem lehet blokkleképezés alanya. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "a(z) %i. inode sérült extentfejlécet tartalmaz. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+"A(z) %i. inode 2310-04-04 utáni időbélyegei valószínűleg 1970 előttiek.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+#, fuzzy
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "a(z) %i. inode bővített attribútumblokkja (%b) hibás ."
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+#, fuzzy
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+"a(z) %i. inode beágyazott adatokat tartalmaz, de a szuperblokkban nincs "
+"INLINE_DATA jellemző\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"További lépések futtatása a több inode által birtokolt blokkok "
+"megoldásához...\n"
+"1B lépés: többszörösen birtokolt blokkok ismételt keresése\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "többszörösen birtokolt blokkok a(z) %i. inode-ban:"
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Hiba az inode-ok vizsgálatakor (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "hiba az inode bittérkép lefoglalásakor (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Hiba a(z) %i. (%s) inode blokkjainak bejárásakor: %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+"Hiba a bővített attribútumblokk (%b) referenciaszámának módosításakor "
+"(inode: %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+"1C lépés: többszörösen lefoglalt blokkokat tartalmazó könyvtárak keresése\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "1D lépés: többszörösen lefoglalt blokkok egyeztetése\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"A(z) %Q fájl (%i. inode, módosítási idő: %IM)\n"
+" %r többszörösen lefoglalt blokkal rendelkezik, %N fájllal közösen:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q fájl (i. inode, módosítási idő: %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr "\t<fájlrendszer-metaadatok>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(%N inode tartalmaz többszörösen lefoglalt blokkokat.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"a többszörösen lefoglalt blokkok már újra ki vannak osztva vagy klónozva "
+"vannak.\n"
+"\n"
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "A fájl nem klónozható: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "1E lépés: Extentfák optimalizálása\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "A(z) %p (%i) extentfa optimalizálása sikertelen: %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+msgid "Optimizing @x trees: "
+msgstr "Extentfák optimalizálása: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Belső hiba: a maximális extentfamélység túl nagy (%b, várt: %c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "a(z) %i. inode extentfája (a(z) %b. szinten) lehetne rövidebb. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "a(z) %i. inode extentfája (a(z) %b. szinten) lehetne szűkebb. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr "2. lépés: könyvtárszerkezet ellenőrzése\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "érvénytelen inode szám a „.â€-hoz a(z) %i. könyvtár inode-ban.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+msgid "@E has @n @i #: %Di.\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) érvénytelen inode számot tartalmaz: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) törölt/nem használt inode-ot tartalmaz: "
+"%Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr "a(z) „%Dn†bejegyzés itt: %p (%i) egy hivatkozás a „.â€-ra "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) a hibás blokkban található %Di inode-ra "
+"mutat.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) egy hivatkozás a(z) %P (%Di) könyvtárra.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr "a(z) „%Dn†bejegyzés itt: %p (%i) egy hivatkozás a gyökér inode-ra.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) neve illegális karaktereket tartalmaz.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Hiányzó „.†a(z) %i könyvtár inode-ban.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Hiányzó „..†a(z) %i könyvtár inode-ban.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+"A(z) %i. (%p) könyvtár inode-ban az első „%Dn.†bejegyzés (inode=%Di) „.†"
+"kellene legyen.\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+"A(z) %i. könyvtár inode-ban a második „%Dn.†bejegyzés (inode=%Di) „..†"
+"kellene legyen.\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr a(z) %i. (%Q) inode-hoz %IF, nulla kellene legyen.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl a(z) %i. (%Q) inode-hoz %If, nulla kellene legyen.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+#, fuzzy
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_fsize a(z) %i. (%Q) inode-hoz %N, nulla kellene legyen.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag a(z) %i. (%Q) inode-hoz %N, nulla kellene legyen.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize a(z) %i. (%Q) inode-hoz %N, nulla kellene legyen.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "A(z) %i. inode (%Q) érvénytelen móddal (%Im) rendelkezik.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "%i. könyvtár inode, %B, eltolás: %N: a könyvtár sérült\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "%i. könyvtár inode, %B, eltolás: %N: a fájlnév túl hosszú\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+msgid "@d @i %i has an unallocated %B. "
+msgstr "a(z) %i könyvtár inode-ban egy lefoglalatlan %B van. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+"A „.†könyvtárbejegyzés a(z) %i. könyvtár inode-ban nem NULL végződésű\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+"A „..†könyvtárbejegyzés a(z) %i. könyvtár inode-ban nem NULL végződésű\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "a(z) %i. (%Q) inode egy illegális karakteres eszköz.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "a(z) %i. (%Q) inode egy illegális blokkos eszköz.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+msgid "@E is duplicate '.' @e.\n"
+msgstr "a(z) „%Dn†bejegyzés itt: %p (%i) egy duplikált „.†bejegyzés.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr "a(z) „%Dn†bejegyzés itt: %p (%i) egy duplikált „..†bejegyzés.\n"
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "belső hiba: nem található a dir_info ehhez: %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) rec_len értéke %Dr, de %N kellene legyen.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "hiba az icount struktúra lefoglalásakor: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Hiba a könyvtárblokkok bejárásakor: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Hiba a(z) %b. könyvtárblokk (%i. inode) olvasásakor: %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Hiba a(z) %b könyvtárblokk (%i. inode) írásakor: %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "hiba új könyvtárblokk lefoglalásakor a(z) %i. inode (%s) számára: %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Hiba a(z) %i. inode felszabadításakor: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "A „.†könyvtárbejegyzése itt: %p (%i) túl nagy.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "a(z) %i. inode (%Q) egy illegális FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "a(z) %i. inode (%Q) egy illegális foglalat.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Fájltípus beállítása a(z) „%Dn†bejegyzéshez itt: %p (%i), erre: %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) helytelen fájltípusú (volt: %Dt, de %N "
+"kellene legyen).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr "a(z) „%Dn†bejegyzés itt: %p (%i) fájltípusa be van állítva.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+msgid "@E has a @z name.\n"
+msgstr "a(z) „%Dn†bejegyzés itt: %p (%i) nulla hosszú névvel rendelkezik.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "A(z) %Q szimbolikus link (%i. inode) érvénytelen.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr "a(z) %i. (%Q) inode bővített attribútumblokkja érvénytelen (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+"a fájlrendszer nagy fájlokat tartalmaz, de a szuperblokkban nincs LARGE_FILE "
+"jelző.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+msgid "@p @h %d: %B not referenced\n"
+msgstr "probléma a(z) %d. HTREE könyvtár inode-ban: a %B nincs hivatkozva\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+msgid "@p @h %d: %B referenced twice\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a %B kétszer van hivatkozva\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a %B hibás min hash-t tartalmaz\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a %B hibás max hash-t tartalmaz\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+msgid "@n @h %d (%q). "
+msgstr "érvénytelen HTREE könyvtár inode: %d (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr ""
+"probléma a(z) %d. (%p) HTREE könyvtár inode-ban: hibás blokkszám: %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a gyökér csomópont érvénytelen\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a %B korlátja érvénytelen (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a %B száma érvénytelen (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a %B rendezetlen hash táblát "
+"tartalmaz\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a %B mélysége érvénytelen (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr "a(z) „%Dn†bejegyzés itt: %p (%i) duplikált. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) nem egyedi fájlnévvel rendelkezik.\n"
+"Ãtnevezés erre: %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Duplikált „%Dn†bejegyzés.\n"
+"\t%p (%i) megjelölése újjáépítendőként.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi a(z) %i. (%Q) inode-hoz %N, nulla kellene legyen.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Váratlan blokk a(z) %d. (%q) HTREE könyvtár inode-ban.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) a beállított _INODE_UNINIT értékű %g "
+"csoport %Di inode-jára hivatkozik\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+"a(z) „%Dn†bejegyzés itt: %p (%i) a(z) %g csoport nem használt inode-jainak "
+"területén található %Di inode-ra hivatkozik.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi a(z) %i. (%Q) inode-hoz %N, nulla kellene legyen.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a gyökér csomópont "
+"ellenőrzőösszege hibás.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr ""
+"probléma a(z) %d. HTREE könyvtár inode-ban: a belső csomópont "
+"ellenőrzőösszege hibás.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr ""
+"%i. könyvtár inode, %B, eltolás: %N: a könyvtárnak nincs ellenőrzőösszege.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+"%i. könyvtár inode, %B: a könyvtár átmegy az ellenőrzéseken, de az "
+"ellenőrzőösszege hibás.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+"A(z) %i. beágyazott könyvtár inode mérete (%N) 4 többszöröse kell legyen.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "A beágyazott könyvtár inode (%i) méretének javítása sikertelen.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr "A titkosított „%Dn†bejegyzés itt: %p (%i) túl rövid\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "3. lépés: könyvtárkapcsolatok ellenőrzése\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr "a gyökér inode nincs lefoglalva. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr "Nincs hely a lost+found könyvtárban. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Nem csatlakoztatott könyvtár inode: %i (%p)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr "a /lost+found nem található. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "A „..†a %Q (%i) esetén %P (%j), de %q (%d) kellene legyen.\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Hibás vagy nem létező /lost+found. Nem csatlakoztatható újra.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Nem bontható ki a /lost+found: %m\n"
+
+#: e2fsck/problem.c:1731
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Nem lehet újracsatlakoztatni ezt: %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Hiba a /lost+found megtalálására tett kísérlet közben: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr ""
+"ext2fs_new_block: %m a /lost+found könyvtár létrehozására tett kísérlet "
+"közben\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr ""
+"ext2fs_new_inode: %m a /lost+found könyvtár létrehozására tett kísérlet "
+"közben\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m az új könyvtárblokk létrehozása közben\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr ""
+"ext2fs_write_dir_block: %m a /lost+found könyvtárblokkjának írása közben\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Hiba a(z) %i. inode inode számának módosításakor\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Nem javítható a(z) %i. inode szülője: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Nem javítható a(z) %i. inode szülője: Nem található a szülő "
+"könyvtárbejegyzés\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Hiba a gyökérkönyvtár (%s) létrehozásakor: %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Hiba a /lost+found könyvtár (%s) létrehozásakor: %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+msgid "@r is not a @d; aborting.\n"
+msgstr "a gyökér inode nem könyvtár, megszakítás.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr "Gyökér inode nélkül nem lehet folytatni.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "A /lost+found nem könyvtár (inode=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr "a /lost+found beágyazott adatokat tartalmaz\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Nem foglalható hely a /lost+found számára.\n"
+"Az elveszett fájlok ehelyett a gyökérkönyvtárba kerülnek"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Nincs elég hely az elveszett fájlok visszaállításához!\n"
+"Helyezzen át adatokat a fájlrendszerről, és futtassa újra az e2fsck-t.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+msgid "/@l is encrypted\n"
+msgstr "A /lost+found titkosított\n"
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "3A lépés: könyvtárak optimalizálása\n"
+
+#: e2fsck/problem.c:1838
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "A dirs_to_hash iterátor létrehozása sikertelen: %m\n"
+
+#: e2fsck/problem.c:1843
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "A(z) %q (%d) könyvtár optimalizálása sikertelen: %m\n"
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "Könyvtárak optimalizálása: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "4. lépés: referenciaszámok ellenőrzése\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, c-format
+msgid "@u @z @i %i. "
+msgstr "nem csatlakoztatott, nulla hosszúságú inode: %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr "nem csatlakoztatott inode: %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "A(z) %i. inode hivatkozásszáma %Il, de %N kellene legyen. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"FIGYELMEZTETÉS: PROGRAMOZÃSI HIBA AZ E2FSCK-BAN!\n"
+"\tVAGY VALAMI FAFEJ (TE) EGY CSATOLT (ÉLÅ) FÃJLRENDSZERT ELLENÅRIZ.\n"
+"inode_link_info[%i] = %N, inode.i_links_count = %Il.\n"
+"Egyezniük kellene!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+#, fuzzy
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "A(z) %i. inode hivatkozásszáma %Il, de %N kellene legyen. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "5. lépés: csoport összefoglaló információinak ellenőrzése\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+msgid "Padding at end of @i @B is not set. "
+msgstr "A kitöltés az inode bittérkép végén nincs beállítva. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+msgid "Padding at end of @b @B is not set. "
+msgstr "A kitöltés a blokkbittérkép végén nincs beállítva. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr "blokkbittérkép eltérései: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr "inode bittérkép eltérései: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "A szabad inode-ok száma hibás a(z) %g. csoporthoz (%i, számolt=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "A könyvtárak száma hibás a(z) %g. csoporthoz (%i, számolt=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "A szabad inode-ok száma hibás (%i, számolt=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "A szabad blokkok száma hibás a(z) %g. csoporthoz (%b, számolt=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "A szabad blokkok száma hibás (%b, számolt=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+"PROGRAMOZÃSI HIBA: a fájlrendszer (%N.) bittérképének végpontjai (%b, %c) "
+"nem egyeznek a számított bittérkép-végpontokkal (%i, %j)\n"
+
+#: e2fsck/problem.c:1989
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Belső hiba: a bittérkép végének megtippelése (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Hiba a helyettesítő inode bittérkép másolásakor: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Hiba a helyettesítő blokkbittérkép másolásakor: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+"%g csoport blokkjai használatban vannak, de a csoport BLOCK_UNINIT-tel van "
+"megjelölve\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+"%g csoport inode-jai használatban vannak, de a csoport INODE_UNINIT-tel van "
+"megjelölve\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "%g csoport inode bittérképe nem felel meg az ellenőrzőösszegnek.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "%g csoport blokkbittérképe nem felel meg az ellenőrzőösszegnek.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+msgid "Recreate @j"
+msgstr "Napló újralétrehozása"
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr "Kvótainformációk frissítése %N kvótatípushoz"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Hiba a blokkcsoport ellenőrzőösszeg-információinak beállításakor: %m\n"
+
+#: e2fsck/problem.c:2061
+#, c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Hiba a fájlrendszer-információk írásakor: %m\n"
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Hiba az írások tárolóeszközre ürítésekor: %m\n"
+
+#: e2fsck/problem.c:2071
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Hiba a kvótainformációk írásakor %N kvótatípushoz: %m\n"
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Nem kezelt hibakód (0x%x)!\n"
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr "MELLÅZVE"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "a move_quota_inode hívásban"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Használt memória: %d, eltelt idő: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "az inode mérete=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "az inode vizsgálat megkezdésekor"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "inode vizsgálat végrehajtása közben"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "az ext2fs_block_iterate meghívásakor a(z) %d. inode-ra"
+
+#: e2fsck/super.c:249
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "az ext2fs_adjust_ea_refcount2 meghívásakor a(z) %d. inode-ra"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Csonkítás"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Törlés"
+
+#: e2fsck/unix.c:77
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Használat: %s [-panyrcdfktvDFV] [-b szuperblokk] [-B blokkméret]\n"
+"\t\t[-l|-L hibás_blokkok_fájlja] [-C fd] [-j külső_napló]\n"
+"\t\t[-E bővített-kapcsolók] [-z visszavonási_fájl] eszköz\n"
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Vészsúgó:\n"
+" -p Automatikus javítás (nem kérdez)\n"
+" -n Ne módosítsa a fájlrendszert\n"
+" -y Feltételezze az „igen†választ minden kérdésre\n"
+" -c Hibás blokkok keresése és hozzáadása a hibás blokkok\n"
+" listájához\n"
+" -f Ellenőrzés kényszerítése, még ha a fájlrendszer "
+"tisztának\n"
+" is van jelölve\n"
+
+#: e2fsck/unix.c:88
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Részletes mód\n"
+" -b szuperblokk Alternatív szuperblokk használata\n"
+" -B blokkméret Blokkméret kényszerítése a szuperblokk keresésekor\n"
+" -j külső_napló A külső napló helyének beállítása\n"
+" -l hibás_blokkok_fájlja Hozzáadás a hibás blokkok listájához\n"
+" -L hibás_blokkok_fájlja Hibás blokkok listájának beállítása\n"
+" -z visszavonási_fájl Visszavonási fájl létrehozása\n"
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u fájl (%0d.%d%% nem összefüggő), %llu/%llu blokk\n"
+
+#: e2fsck/unix.c:162
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u inode használatban (%2.2f%%, összesen %u)\n"
+msgstr[1] ""
+"\n"
+"%12u inode használatban (%2.2f%%, összesen %u)\n"
+
+#: e2fsck/unix.c:166
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u nem folytonos fájl (%0d.%d%%)\n"
+msgstr[1] "%12u nem folytonos fájl (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:171
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u nem folytonos könyvtár (%0d.%d%%)\n"
+msgstr[1] "%12u nem folytonos könyvtár (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:176
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+" ind/dind/tind blokkokat tartalmazó inode-ok száma: %u/%u/%u\n"
+
+#: e2fsck/unix.c:184
+msgid " Extent depth histogram: "
+msgstr " Extentmélység-hisztogram: "
+
+#: e2fsck/unix.c:193
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu blokk használatban (%2.2f%%, összesen %llu)\n"
+msgstr[1] "%12llu blokk használatban (%2.2f%%, összesen %llu)\n"
+
+#: e2fsck/unix.c:197
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u hibás blokk\n"
+msgstr[1] "%12u hibás blokk\n"
+
+#: e2fsck/unix.c:199
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u nagy fájl\n"
+msgstr[1] "%12u nagy fájl\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u normál fájl\n"
+msgstr[1] ""
+"\n"
+"%12u normál fájl\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u könyvtár\n"
+msgstr[1] "%12u könyvtár\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u karakteres eszköz fájl\n"
+msgstr[1] "%12u karakteres eszköz fájl\n"
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u blokkos eszköz fájl\n"
+msgstr[1] "%12u blokkos eszköz fájl\n"
+
+#: e2fsck/unix.c:210
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifo\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u link\n"
+msgstr[1] "%12u link\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u szimbolikus link"
+msgstr[1] "%12u szimbolikus link"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "(%u gyors szimbolikus link)\n"
+msgstr[1] "(%u gyors szimbolikus link)\n"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u foglalat\n"
+msgstr[1] "%12u foglalat\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fájl\n"
+msgstr[1] "%12u fájl\n"
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "%s csatolt állapotának meghatározása közben."
+
+#: e2fsck/unix.c:258
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Figyelmeztetés! %s csatolva van.\n"
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Figyelmeztetés! %s használatban van.\n"
+
+#: e2fsck/unix.c:267
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s csatolva van.\n"
+
+#: e2fsck/unix.c:269
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s használatban van.\n"
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Nem folytatható, megszakítás.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"FIGYELEM!!! A fájlrendszer csatolva van. Ha folytatja, azzal\n"
+"***SÚLYOS*** fájlrendszer-károsodást ***FOG*** okozni!\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Biztosan folytatni akarja"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "ellenőrzés megszakítva.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr " hibás fájlrendszert tartalmaz"
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr " nem lett tisztán leválasztva"
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr " elsődleges szuperblokkjának jellemzői eltérnek a tartalékéitól"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " %u alkalommal lett ellenőrzés nélkül csatolva"
+
+#: e2fsck/unix.c:389
+msgid " has filesystem last checked time in the future"
+msgstr " fájlrendszerének utolsó ellenőrzési ideje a jövőben van"
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " %u napja nem került ellenőrzésre"
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr ", ellenőrzés kikényszerítve.\n"
+
+#: e2fsck/unix.c:442
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: tiszta, %u/%u fájl, %llu/%llu blokk"
+
+#: e2fsck/unix.c:462
+msgid " (check deferred; on battery)"
+msgstr " (ellenőrzés elhalasztva, akkumulátoron)"
+
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (ellenőrzés a következő csatolás után)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (ellenőrzés %ld csatoláson belül)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "HIBA: Nem nyitható meg a /dev/null (%s)\n"
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr "Érvénytelen bővített attribútum verzió.\n"
+
+#: e2fsck/unix.c:701
+msgid "Invalid readahead buffer size.\n"
+msgstr "Érvénytelen előreolvasási pufferméret.\n"
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Ismeretlen bővített beállítás: %s\n"
+
+#: e2fsck/unix.c:758
+#, fuzzy
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"A megadott bővített beállítások hibásak: %s\n"
+"\n"
+"A bővített beállításokat vessző választja el, és egy argumentumot "
+"várhatnak,\n"
+"\tamit egy egyenlőségjel ('=') kezd.\n"
+"\n"
+"Érvényes bővített beállítások:\n"
+"\tsuperblock=<szuperblokk száma>\n"
+"\tblocksize=<blokkméret>\n"
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+#, fuzzy
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "Érvénytelen előreolvasási pufferméret.\n"
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Szintaktikai hiba az e2fsck beállítófájljában (%s, a(z) %d. sorban)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Hiba a(z) %d. fájlleíró érvényesítésekor: %s\n"
+
+#: e2fsck/unix.c:860
+msgid "Invalid completion information file descriptor"
+msgstr "Érvénytelen kiegészítésinformációs fájlleíró"
+
+#: e2fsck/unix.c:875
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "A -p/-a, -n vagy -y kapcsolók közül csak egy adható meg."
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Az e2fsck ezen verziója nem támogatja a -t kapcsolót.\n"
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Nem oldható fel „%sâ€"
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr "A -n és -D kapcsolók inkompatibilisek."
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr "A -n és -c kapcsolók inkompatibilisek."
+
+#: e2fsck/unix.c:994
+msgid "The -n and -l/-L options are incompatible."
+msgstr "A -n és -l/-L kapcsolók inkompatibilisek."
+
+#: e2fsck/unix.c:1018
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "A -D és -E fixes_only kapcsolók inkompatibilisek."
+
+#: e2fsck/unix.c:1024
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "A -E bmap2extent és fixes_only kapcsolók inkompatibilisek."
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "A -c és -l/-L kapcsolók nem használhatók egyszerre.\n"
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG „%s†nem egész szám\n"
+"\n"
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Érvénytelen, nem szám argumentum a -%c kapcsolóhoz („%sâ€)\n"
+"\n"
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+"Az MMP időköz %u másodperc, a teljes várakozási idő %u másodperc. Kis "
+"türelmet...\n"
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+msgid "while checking MMP block"
+msgstr "az MMP blokk ellenőrzése közben"
+
+#: e2fsck/unix.c:1259
+#, fuzzy, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Ha biztos benne, hogy a fájlrendszer nincs használatban egyetlen "
+"csomóponton\n"
+"sem, akkor futtassa a következőt:\n"
+"„tune2fs -f -E clear_mmp {eszköz}â€\n"
+
+#: e2fsck/unix.c:1275
+msgid "while reading MMP block"
+msgstr "az MMP blokk olvasása közben"
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Meglévő fájlrendszer felülírása, ez a következő paranccsal vonható vissza:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "%s törlésére tett kísérlet közben"
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "a visszavonási fájl elkészítésére tett kísérlet közben\n"
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Hiba: az ext2fs programkönyvtár verziója elavult!\n"
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr "a program előkészítésére tett kíséret közben"
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\t%s, %s használatával\n"
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr "az interaktív helyreállításhoz terminál szükséges"
+
+#: e2fsck/unix.c:1508
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s tartalék blokkok kipróbálása…\n"
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr "A szuperblokk érvénytelen,"
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr "A csoportleírók rosszul néznek ki…"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s a tartalék blokkok használata közben"
+
+#: e2fsck/unix.c:1525
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: visszatérés az eredeti szuperblokkhoz\n"
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"A fájlrendszer verziója nyilvánvalóan túl magas az e2fsck ezen verziójának.\n"
+"(vagy a fájlrendszer szuperblokkja sérült)\n"
+"\n"
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "Lehet, hogy ez egy nulla hosszú partíció?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+"%s hozzáféréssel kell rendelkeznie a fájlrendszerhez, vagy root jogokkal\n"
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Lehet, hogy ez egy nem létező, vagy swap eszköz?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"A fájlrendszer csatolva van, vagy egy másik program kizárólagos módban "
+"nyitotta meg?\n"
+
+#: e2fsck/unix.c:1575
+msgid "Possibly non-existent device?\n"
+msgstr "Lehet, hogy ez egy nem létező eszköz?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"A lemez írásvédett, használja a -n kapcsolót az eszköz csak\n"
+"olvasási módú ellenőrzéséhez.\n"
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr "Szerezze be az e2fsck újabb verzióját!"
+
+#: e2fsck/unix.c:1711
+#, c-format
+msgid "while checking journal for %s"
+msgstr "a napló ellenőrzésekor ezen: %s"
+
+#: e2fsck/unix.c:1714
+msgid "Cannot proceed with file system check"
+msgstr "A fájlrendszer ellenőrzését nem lehet folytatni"
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Figyelmeztetés: a napló helyreállításának kihagyása, mert csak olvasási módú "
+"fájlrendszer-ellenőrzést végez.\n"
+
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "nem állíthatók be a szuperblokk jelzői ezen: %s\n"
+
+#: e2fsck/unix.c:1743
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "A napló ellenőrzőösszege hibás itt: %s\n"
+
+#: e2fsck/unix.c:1747
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "A napló sérült itt: %s\n"
+
+#: e2fsck/unix.c:1751
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "a napló helyreállításakor ezen: %s"
+
+#: e2fsck/unix.c:1773
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s nem támogatott jellemzőkkel rendelkezik:"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s a hibás blokkok inode olvasása közben\n"
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Ez nem néz ki jónak, de megpróbáljuk folytatni…\n"
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Napló létrehozása (%d blokk): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr " Kész.\n"
+
+#: e2fsck/unix.c:1887
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** a napló újra létrehozva ***\n"
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr "megszakítva"
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck megszakítva.\n"
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Az e2fsck újraindítása az elejétől…\n"
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr "a kontextus alaphelyzetbe állításakor"
+
+#: e2fsck/unix.c:1985
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FÃJLRENDSZERHIBÃK JAVÃTVA *****\n"
+
+#: e2fsck/unix.c:1987
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: A fájlrendszer módosítva lett.\n"
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** A FÃJLRENDSZER MÓDOSÃTVA LETT *****\n"
+
+#: e2fsck/unix.c:1996
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** INDÃTSA ÚJRA A RENDSZERT *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ******* FIGYELEM: A fájlrendszeren még mindig vannak hibák *******\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "iI"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "nN"
+
+# az a fordítása lehetne m is, mint "Minden", de túl közel van az n (nem)-hez a billentyűzeten.
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr "aA"
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr " (az „a†jelentése: „igen†mindenre) "
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<i>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (i/n)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "megszakítva!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr "igen mindenre\n"
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "igen\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "nem\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nem\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? igen\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "igen"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "nem"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: illegális bittérképblokkok ehhez: %s"
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr "inode- és blokkbittérképek olvasása"
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "%s bittérképei olvasásának újrapróbálásakor"
+
+#: e2fsck/util.c:346
+msgid "writing block and inode bitmaps"
+msgstr "blokk- és inode bittérképek írása"
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "%s blokk- és inode bittérképeinek újraírásakor"
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: VÃRATLAN INKONZISZTENCIA; FUTTASSA KÉZZEL AZ fsck PARANCSOT.\n"
+"\t(azaz a -a vagy -p kapcsolók nélkül)\n"
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Használt memória: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Használt memória: %lu, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "idő: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "eltelt idő: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "%lu inode olvasásakor itt: %s"
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "%lu inode írásakor itt: %s"
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+"VÃRATLAN INKONZISZTENCIA: a fájlrendszert módosítják az fsck futása közben.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "kész \n"
+
+#: misc/badblocks.c:100
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Használat: %s [-b blokkméret] [-i bemeneti_fájl] [-o kimeneti_fájl]\n"
+" [-svwnf] [-c blokkok_egyszerre] [-d késleltetés_olvasások_közt]\n"
+" [-e max_rossz_blokkok] [-p lépések_száma] [-t tesztminta\n"
+" [-t tesztminta [...]]] eszköz [utolsó_blokk [első_blokk]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: a -n és -w kapcsolók kölcsönösen kizárják egymást.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% kész, %s telt el. (%d/%d/%d hiba)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Tesztelés véletlen mintával:"
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Tesztelés 0x mintával"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "pozicionálás közben"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Fura érték (%ld) a do_read-ben\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "az ext2fs_sync_device hívás közben"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "a hibásblokk-lista bejárásának megkezdése közben"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "pufferek foglalásakor"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Blokkok ellenőrzése %lu és %lu között\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Hibás blokkok keresése csak olvasható módban\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Hibás blokkok keresése (csak olvasható teszt): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Túl sok hibás blokk, teszt megszakítása\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Hibás blokkok keresése írható-olvasható módban\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "%lu és %lu közti blokkok\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Olvasás és összehasonlítás: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Hibás blokkok keresése nem destruktív írható-olvasható módban\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Hibás blokkok keresése (nem destruktív írható-olvasható teszt\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Megszakítás érkezett, takarítás\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "tesztadatok írásakor, %lu. blokk"
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s csatolva van; "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "badblocks kényszerítve mindenképp. Reméljük, a /etc/mtab helytelen.\n"
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "a badblocks futtatása nem biztonságos!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s nyilvánvalóan használatban van a rendszer által; "
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks kényszerítve mindenképp.\n"
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr "érvénytelen %s - %s"
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "A hibás blokkok maximális száma (%u) túl nagy, a maximum: %u"
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "nem foglalható memória a test_pattern számára - %s"
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Csak olvasható módban legfeljebb egy test_pattern adható meg"
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "A véletlen test_pattern nem engedélyezett csak olvasható módban"
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr "Nem határozható meg az eszközméret, adja meg saját kezűleg\n"
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr "az eszközméret meghatározására tett kísérlet közben"
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr "utolsó blokk"
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr "első blokk"
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "érvénytelen kezdő blokk (%llu): kisebb kell legyen, mint %llu"
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "érvénytelen befejező blokk (%llu): 32 bites érték kell legyen"
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr "a hibás blokkok memóriában lévő listájának létrehozása közben"
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr "bemeneti fájl - hibás formátum"
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr "a hibás blokkok memóriában lévő listájához adás közben"
+
+#: misc/badblocks.c:1347
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Lépés kész, %u hibás blokk megtalálva. (%d/%d/%d hiba)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr "Használat: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v verzió] fájlok…\n"
+
+#: misc/chattr.c:159
+#, c-format
+msgid "bad project - %s\n"
+msgstr "hibás projekt - %s\n"
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr "hibás verzió - %s\n"
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "%s elérésére tett kísérlet közben"
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr "%s jelzőinek olvasása közben"
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr "%s jelzői: "
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr "%s jelzőinek beállításakor"
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "%s verziója: %lu\n"
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr "%s verziójának beállításakor"
+
+#: misc/chattr.c:271
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "%s projektje beállítva, mint %lu\n"
+
+#: misc/chattr.c:275
+#, c-format
+msgid "while setting project on %s"
+msgstr "%s projektjének beállításakor"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Nem sikerült útvonal változót foglalni a chattr_dir_proc hívásban"
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr "az = nem használható együtt a - és + jelekkel\n"
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr "A „-vâ€, =, - vagy + egyikét kell használni\n"
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, c-format
+msgid "while reading inode %u"
+msgstr "%u. inode olvasásakor"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+msgid "while expanding directory"
+msgstr "a könyvtár kibővítésekor"
+
+#: misc/create_inode.c:96
+#, c-format
+msgid "while linking \"%s\""
+msgstr "„%s†linkelésekor"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, c-format
+msgid "while writing inode %u"
+msgstr "%u. inode írásakor"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "„%s†attribútumainak kiírásakor"
+
+#: misc/create_inode.c:162
+#, c-format
+msgid "while opening inode %u"
+msgstr "%u. inode megnyitásakor"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+msgid "while allocating memory"
+msgstr "memória foglalásakor"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "„%2$s†„%1$s†attribútumának olvasásakor"
+
+#: misc/create_inode.c:213
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "„%s†attribútum %u. inode-ba írásakor"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while closing inode %u"
+msgstr "%u. inode lezárásakor"
+
+#: misc/create_inode.c:274
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "„%s†inode foglalásakor"
+
+#: misc/create_inode.c:293
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "„%s†inode létrehozásakor"
+
+#: misc/create_inode.c:359
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "„%s†szimbolikus link létrehozásakor"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "„%s†kikeresésekor"
+
+#: misc/create_inode.c:397
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "„%s†könyvtár létrehozásakor"
+
+#: misc/create_inode.c:625
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "„%s†másolásra megnyitásakor"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "munkakönyvtár váltásakor erre: „%sâ€"
+
+#: misc/create_inode.c:747
+#, c-format
+msgid "while opening directory \"%s\""
+msgstr "„%s†könyvtár megnyitásakor"
+
+#: misc/create_inode.c:757
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "„%s†elérésére tett kísérletkor"
+
+#: misc/create_inode.c:808
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "„%s†speciális fájl létrehozásakor"
+
+#: misc/create_inode.c:817
+msgid "malloc failed"
+msgstr "A memóriafoglalás meghiúsult"
+
+#: misc/create_inode.c:825
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "„%s†link olvasására tett kísérletkor"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "a szimlink mérete nőtt az lstat() és readlink() között"
+
+#: misc/create_inode.c:843
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "„%s†szimlink írásakor"
+
+#: misc/create_inode.c:854
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "„%s†fájl írásakor"
+
+#: misc/create_inode.c:867
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "„%s†könyvtár megnyitásakor"
+
+#: misc/create_inode.c:885
+msgid "while changing directory"
+msgstr "könyvtárváltáskor"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "„%s†bejegyzés figyelmen kívül hagyása"
+
+#: misc/create_inode.c:904
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "„%s†inode-jának beállításakor"
+
+#: misc/create_inode.c:911
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "„%s†bővített attribútumainak beállításakor"
+
+#: misc/create_inode.c:937
+msgid "while saving inode data"
+msgstr "az inode adatainak mentésekor"
+
+#: misc/dumpe2fs.c:56
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+"Használat: %s [-bfghixV] [-o superblock=<szám>] [-o blocksize=<szám>] "
+"eszköz\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blokk"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "fürt"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "%lu. csoport: (Blokkok "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " eössz 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (VÃRT: 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s szuperblokk itt: "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Elsődleges"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Tartalék"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Csoportleírók itt: "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Fenntartott GDT blokkok itt: "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Csoportleíró itt: "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Blokkbittérkép itt:"
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", eössz 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Inode bittérkép itt: "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Inode tábla itt:"
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u szabad %s, %u szabad inode, %u könyvtár%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nem használt inode\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Szabad blokkok: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Szabad inode-ok: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "a hibás blokkok listájának kiírása közben"
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Hibás blokkok: %u"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr "napló inode olvasása közben"
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr "napló inode megnyitása közben"
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr "napló szuperblokkjának olvasása közben"
+
+#: misc/dumpe2fs.c:392
+msgid "Journal superblock magic number invalid!\n"
+msgstr "A naplószuperblokk bűvös száma érvénytelen!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "napló szuperblokkjának olvasásakor"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "A naplószuperblokk bűvös számai nem találhatók"
+
+#: misc/dumpe2fs.c:468
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "puffer foglalásakor"
+
+#: misc/dumpe2fs.c:479
+#, fuzzy, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Blokkok ellenőrzése %lu és %lu között\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Nem sikerült memóriát foglalni a beállítások feldolgozásához!\n"
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Érvénytelen szuperblokk paraméter: %s\n"
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Érvénytelen blokkméret paraméter: %s\n"
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"A megadott bővített beállítások hibásak: %s\n"
+"\n"
+"A bővített beállításokat vessző választja el, és egy argumentumot "
+"várhatnak,\n"
+"\tamit egy egyenlőségjel ('=') kezd.\n"
+"\n"
+"Érvényes bővített beállítások:\n"
+"\tsuperblock=<szuperblokk száma>\n"
+"\tblocksize=<blokkméret>\n"
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\t%s használatával\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Nem található érvényes fájlrendszer-szuperblokk.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, fuzzy, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "%s bittérképei olvasásának újrapróbálásakor"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr "Használat: %s [ -r|Q ] [ -fr ] eszköz lemezképfájl\n"
+
+#: misc/e2image.c:109
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I eszköz lemezképfájl\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+" %s -ra [ -cfnp ] [ -o forrás_eltolás ] [ -O cél_eltolás ] "
+"forrás_fr [ cél_fr ]\n"
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+msgid "while allocating buffer"
+msgstr "puffer foglalásakor"
+
+#: misc/e2image.c:180
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "%llu blokk írásakor\n"
+
+#: misc/e2image.c:194
+#, c-format
+msgid "error writing block %llu"
+msgstr "Hiba a(z) %llu. blokk írásakor"
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr "hiba a generic_write() függvényben"
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Hiba: a fejléc mérete nagyobb, mint a wrt_size\n"
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr "Nem sikerült fejlécpuffert foglalni\n"
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr "a szuperblokk írása közben"
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr "az inode tábla írása közben"
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr "a blokkbittérkép írása közben"
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr "az inode bittérkép írása közben"
+
+#: misc/e2image.c:506
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Sérült könyvtárblokk (%llu): a rec_len (%d) hibás\n"
+
+#: misc/e2image.c:518
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Sérült könyvtárblokk (%llu): a name_len (%d) hibás\n"
+
+#: misc/e2image.c:559
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu blokk (%d%%)"
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr "Másolás "
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+"A mostani leállítás megsemmisítené a fájlrendszert, szakítsa meg újra, ha "
+"biztos\n"
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s marad, %.2f MB/s"
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, c-format
+msgid "error reading block %llu"
+msgstr "hiba a(z) %llu blokk olvasásakor"
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "%llu / %llu blokk átmásolva (%d%%) %s alatt "
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "%.2f MB/s sebességgel"
+
+#: misc/e2image.c:759
+msgid "while allocating l1 table"
+msgstr "az l1 tábla foglalásakor"
+
+#: misc/e2image.c:804
+msgid "while allocating l2 cache"
+msgstr "az l2 gyorsítótár foglalásakor"
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+"Figyelmeztetés: Még vannak táblák a gyorsítótárban annak bővítésekor, "
+"adatvesztés fog történni, így a lemezkép esetleg nem lesz érvényes.\n"
+
+#: misc/e2image.c:1152
+msgid "while allocating ext2_qcow2_image"
+msgstr "az ext2_qcow2_image foglalásakor"
+
+#: misc/e2image.c:1159
+msgid "while initializing ext2_qcow2_image"
+msgstr "az ext2_qcow2_image előkészítésekor"
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Programozási hiba: több egymást követő refcount blokk jött létre!\n"
+
+#: misc/e2image.c:1276
+msgid "while allocating block bitmap"
+msgstr "a blokkbittérkép lefoglalása közben"
+
+# FIXME: ennek utánanézni
+#: misc/e2image.c:1285
+msgid "while allocating scramble block bitmap"
+msgstr "a kevert blokkbittérkép lefoglalása közben"
+
+#: misc/e2image.c:1292
+msgid "Scanning inodes...\n"
+msgstr "Inode-ok vizsgálata…\n"
+
+#: misc/e2image.c:1304
+msgid "Can't allocate block buffer"
+msgstr "Nem foglalható blokkpuffer"
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "%u. inode bejárása közben"
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "A raw és qcow2 lemezképek nem telepíthetők"
+
+#: misc/e2image.c:1411
+msgid "error reading bitmaps"
+msgstr "hiba a bittérképek olvasásakor"
+
+#: misc/e2image.c:1423
+msgid "while opening device file"
+msgstr "az eszközfájl megnyitása közben"
+
+#: misc/e2image.c:1434
+msgid "while restoring the image table"
+msgstr "a lemezképtábla helyreállítása közben"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "a -a kapcsoló csak raw vagy QCOW2 lemezképekkel használható."
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr "Az eltolások csak nyers lemezképekkel engedélyezettek."
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr "Az áthelyezési mód csak nyers lemezképekkel engedélyezett."
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr "Az áthelyezési mód teljes adat módot igényel."
+
+#: misc/e2image.c:1557
+msgid "checking if mounted"
+msgstr "csatoltság ellenőrzése"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"
Az e2image írásra/olvasásra csatolt fájlrendszeren való használata "
+"inkonzisztens\n"
+"lemezképet eredményezhet, ami nem hasznos hibakeresési célokra.\n"
+"Használja a -f kapcsolót, ha tényleg ezt szeretné.\n"
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "a QCOW2 lemezkép nem írható a szabványos kimenetre!\n"
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr "A kimenet nem érhető el\n"
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "A lemezkép (%s) tömörített\n"
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "A lemezkép (%s) titkosított\n"
+
+#: misc/e2image.c:1640
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "A lemezkép (%s) titkosított\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+"a cow2 lemezkép (%s) raw lemezképpé (%s) alakítására tett kísérlet közben"
+
+#: misc/e2image.c:1654
+msgid "The -c option only supported in raw mode\n"
+msgstr "A -c kapcsoló csak raw módban támogatott\n"
+
+#: misc/e2image.c:1659
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "A -c kapcsoló nem támogatott a szabványos kimenetre íráskor\n"
+
+#: misc/e2image.c:1666
+msgid "while allocating check_buf"
+msgstr "a check_buf foglalásakor"
+
+#: misc/e2image.c:1672
+msgid "The -p option only supported in raw mode\n"
+msgstr "A -p kapcsoló csak raw módban támogatott\n"
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d blokk már tartalmazta a másolandó adatokat\n"
+
+#: misc/e2initrd_helper.c:68
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Használat: %s -r eszköz\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: a(z) %s nem nyitható meg\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: nem lehet a szuperblokkra pozicionálni\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: hiba a szuperblokk olvasásakor\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: ez nem ext2 fájlrendszer\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Figyelmeztetés: a címke túl hosszú, csonkítás.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: nem lehet újra a szuperblokkra pozicionálni\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: hiba a szuperblokk írása közben\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Használat: e2label eszköz [új_címke]\n"
+
+#: misc/e2undo.c:124
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr "Használat: %s [-f] [-h] [-n] [-v] <tranzakciós_fájl> <fájlrendszer>\n"
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "A fájlrendszer szuperblokkja nem felel meg a visszavonási fájlénak.\n"
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr "Az UUID nem egyezik.\n"
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr "Az utolsó csatolási idő nem egyezik.\n"
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr "Az utolsó írási idő nem egyezik.\n"
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr "Az élettartam-írásszámláló nem egyezik.\n"
+
+#: misc/e2undo.c:172
+msgid "while reading filesystem superblock."
+msgstr "fájlrendszer szuperblokkjának olvasásakor"
+
+#: misc/e2undo.c:188
+msgid "while fetching superblock"
+msgstr "a szuperblokk lekérésekor"
+
+#: misc/e2undo.c:201
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "A visszavonási fájl szuperblokkjának ellenőrzőösszege nem egyezik.\n"
+
+#: misc/e2undo.c:340
+#, c-format
+msgid "illegal offset - %s"
+msgstr "érvénytelen eltolás - %s"
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Nem fogok egy visszavonási fájlba írni annak újrajátszása közben.\n"
+
+#: misc/e2undo.c:373
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "„%s†visszavonási fájl megnyitásakor\n"
+
+#: misc/e2undo.c:380
+msgid "while reading undo file"
+msgstr "a visszavonási fájl olvasásakor"
+
+#: misc/e2undo.c:385
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: Ez nem visszavonási fájl.\n"
+
+#: misc/e2undo.c:396
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: A fejléc ellenőrzőösszege nem egyezik.\n"
+
+#: misc/e2undo.c:403
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: A visszavonási fájl fejléce sérült.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: A visszavonási blokkméret túl nagy.\n"
+
+#: misc/e2undo.c:412
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: A visszavonási blokkméret túl kicsi.\n"
+
+#: misc/e2undo.c:425
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: A visszavonási fájlhoz ismeretlen jellemző van beállítva.\n"
+
+#: misc/e2undo.c:433
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Hiba %s csatolt állapotának meghatározása közben."
+
+#: misc/e2undo.c:439
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "Az e2undo parancsot csak leválasztott fájlrendszereken lehet futtatni"
+
+#: misc/e2undo.c:455
+#, c-format
+msgid "while opening `%s'"
+msgstr "„%s†megnyitásakor"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr "a megadott eltolás túl nagy"
+
+#: misc/e2undo.c:507
+msgid "while reading keys"
+msgstr "kulcsok olvasásakor"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: hibás a kulcs bűvös száma itt: %llu\n"
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: hiba a kulcsblokk ellenőrzőösszegében itt: %llu.\n"
+
+#: misc/e2undo.c:552
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: a(z) %llu blokk túl hosszú."
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, c-format
+msgid "while fetching block %llu."
+msgstr "%llu blokk elérésekor."
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+"ellenőrzőösszeg-hiba a(z) %llu. fájlrendszerblokkban (visszavonási blokk: "
+"%llu)\n"
+
+#: misc/e2undo.c:615
+#, c-format
+msgid "while writing block %llu."
+msgstr "a(z) %llu. blokk írásakor."
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "A visszavonási fájl sérült, futtassa az e2fsck-t MOST!\n"
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "I/O hiba a visszajátszáskor, futtassa az e2fsck-t MOST!\n"
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Nem teljes visszavonási rekord, futtassa az e2fsck-t.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Használat: findsuper eszköz [kihagyottbájtok [kezdőkb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "a kihagyottbájtok szám kell legyen, nem %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "a kihagyottbájtok a szektorméret többszöröse kell legyen\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "a kezdőkb szám kell legyen, nem %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "a kezdőkb pozitív kell legyen, nem %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "kezdés itt: %llu, %u bájtos növekménnyel\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] valószínűleg az ext3 napló szuperblokkba írt szuperblokk,\n"
+"\tígy a kezdő/vég/csoport rossz\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+"bájt_eltol bájt_kezd bájt_vég fs_blokk blkmrt csop mkfs/"
+"csatol_idő sb_uuid címke\n"
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: befejeződött ezzel a hibaszámmal: %d\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "FIGYELMEZTETÉS: %s megnyitása sikertelen: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "FIGYELMEZTETÉS: hibás formátum %2$s %1$d. sorában\n"
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"FIGYELMEZTETÉS: Az /etc/fstab fájl nem tartalmazza az fsck passno mezőt.\n"
+"\tEzt most megkerülöm, de tényleg ki kellene javítani az /etc/fstab\n"
+"\tfájlt, amint csak lehet.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: nem található\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: várjunk csak: nincs több gyermekfolyamat???\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Figyelmeztetés: %s ezen eszközhöz: %s, %d szignállal lépett ki.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: az állapot %x, soha nem fordulhatna elő.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Befejeződött ezzel: %s (kilépési állapot: %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: %d. hiba az fsck.%s végrehajtásakor erre: %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"A -t kapcsolónak átadott fájlrendszertípusokból vagy az összes,\n"
+"vagy egyik sem kaphat „no†vagy „!†előtagot.\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Nem sikerült memóriát foglalni a fájlrendszertípusokhoz\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+"%s: hibás sor átugrása az /etc/fstab fájlban: bind csatolás nem nulla fsck "
+"lépésszámmal\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: %s nem ellenőrizhető: az fsck.%s nem található\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Minden fájlrendszer ellenőrzése.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--várakozás-- (%d. lépés)\n"
+
+#: misc/fsck.c:1085
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Használat: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fr_típus] [fr-kapcsoló] "
+"[fájlrendszer …]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: túl sok eszköz\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: Túl sok argumentum\n"
+
+#: misc/fuse2fs.c:3739
+msgid "Mounting read-only.\n"
+msgstr "Csatolás csak olvashatóként.\n"
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+"%s: Az összes blokk lefoglalásának engedélyezése a felhasználóknak "
+"veszélyes!\n"
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Futtassa az „e2fsck -fy %s†parancsot.\n"
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+"A napló helyreállítást igényel, az „e2fsck -E journal_only†futtatása "
+"szükséges.\n"
+
+#: misc/fuse2fs.c:3806
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: A naplóba írás nem támogatott.\n"
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+"Figyelmeztetés: ellenőrizetlen fájlrendszer csatolása, futtassa az e2fsck-"
+"t.\n"
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+"Figyelmeztetés: maximális csatolások száma elérve, futtassa az e2fsck-t.\n"
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Figyelmeztetés: ellenőrzési idő elérve, futtassa az e2fsck-t.\n"
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Ãrva inode-ok találhatók, futtassa az e2fsck-t.\n"
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Hibák találhatók, futtassa az e2fsck-t.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Használat: %s [-RVadlpv] [fájlok…]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "%s jelzőinek olvasása közben"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "%s projektjének olvasása közben"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "%s verziójának olvasása közben"
+
+#: misc/mke2fs.c:130
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Használat: %s [-c|-l fájlnév] [-b blokkméret] [-C fürtméret]\n"
+"\t[-i bájtok_inode-onként] [-I inode-méret] [-J naplóbeállítások]\n"
+"\t[-G rugalmas_csoportméret] [-N inode-ok_száma] [-d gyökérkönyvtár]\n"
+"\t[-m fenntartott_blokkok_százaléka] [-o létrehozó_rendszer]\n"
+"\t[-g blokkok_csoportonként] [-L kötetcímke] [-M utolsó_csatolási_könyvtár]\n"
+"\t[-O jellemző[,…]] [-r fr_verzió] [-E bővített_beállítás[,…]]\n"
+"\t[-t fr_típus] [-T használattípus] [-U UUID] [-e hibaviselkedés]\n"
+"\t[-z visszavonási_fájl] [-jnqvDFSV] eszköz [blokkszám]\n"
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Parancs futtatása: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "„%s†futtatására tett kísérlet közben"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "a hibás blokkok programból származó listájának feldolgozásakor"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+"A(z) %d. blokk az elsődleges szuperblokk/csoportleíró területen hibás.\n"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"Fájlrendszer készítéséhez a(z) %u és %u közötti blokkoknak jóknak kell "
+"lenniük.\n"
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "Megszakítás…\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Figyelmeztetés: a tartalék szuperblokk/csoportleírók a(z) %u. blokknál\n"
+"\thibás blokkokat tartalmaznak.\n"
+"\n"
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "a hibás blokkok használtként jelölése közben"
+
+#: misc/mke2fs.c:368
+#, fuzzy
+msgid "while writing reserved inodes"
+msgstr "kvóta inode-ok írásakor"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Inode táblák írásakor: "
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Nem sikerült %d blokk írása az inode táblába innen kezdve: %llu: %s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "kész \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "a gyökérkönyvtár létrehozása közben"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "a gyökér inode olvasása közben"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "a gyökér inode tulajdonosának beállítása közben"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "a /lost+found létrehozása közben"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "a /lost+found kikeresése közben"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "a /lost+found kibővítése közben"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "a hibás blokkok inode beállításakor"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Elfogyott a memória a(z) %d-%d szektorok törlése közben\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Figyelmeztetés: nem olvasható a 0. blokk: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Figyelmeztetés: nem törölhető a(z) %d. szektor: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "napló szuperblokkjának előkészítésekor"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "Naplóeszköz nullázása: "
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "a naplóeszköz nullázása közben (%llu. blokk, számláló: %d)"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "napló szuperblokkjának írásakor"
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Fájlrendszer létrehozása %llu %d blokkal és %u inode-dal\n"
+
+#: misc/mke2fs.c:673
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"figyelmeztetés: %llu blokk használaton kívül van.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Fájlrendszer címkéje=%s\n"
+
+#: misc/mke2fs.c:681
+#, c-format
+msgid "OS type: %s\n"
+msgstr "OS típusa: %s\n"
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blokkméret=%u (napló=%u)\n"
+
+#: misc/mke2fs.c:686
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Fürtméret=%u (napló=%u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Töredék mérete=%u (napló=%u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u blokk, csíkszélesség=%u blokk\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inode, %llu blokk\n"
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu blokk (%2.2f%%) fenntartva a rendszergazda számára\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Első adatblokk=%u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Gyökérkönyvtár tulajdonosa=%u:%u\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Fájlrendszerblokkok maximális száma=%lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blokkcsoport\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blokkcsoport\n"
+
+#: misc/mke2fs.c:711
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blokk csoportonként, %u fürt csoportonként\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blokk csoportonként, %u töredék csoportonként\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inode csoportonként\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Fájlrendszer UUID: %s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Tartalék szuperblokkok tárolva a blokkokon: "
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s a „-O 64bit†megadását igényli\n"
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "a(z) „%s†a „resize=%u†előtt kell legyen\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Érvénytelen desc_size: „%sâ€\n"
+
+#: misc/mke2fs.c:853
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Érvénytelen új méret: %s\n"
+
+#: misc/mke2fs.c:865
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Érvénytelen offset: %s\n"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Érvénytelen mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:896
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "A tartalék szuperblokkok száma érvénytelen: %s\n"
+
+#: misc/mke2fs.c:918
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Érvénytelen stride paraméter: %s\n"
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Érvénytelen stripe-width paraméter: %s\n"
+
+#: misc/mke2fs.c:956
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Érvénytelen resize paraméter: %s\n"
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+"Az átméretezési maximum nagyobb kell legyen a fájlrendszer méreténél.\n"
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Az online átméretezés nem támogatott 0 revíziójú fájlrendszerekkel\n"
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Érvénytelen root_owner: „%sâ€\n"
+
+#: misc/mke2fs.c:1065
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"A megadott bővített beállítások hibásak: %s\n"
+"\n"
+"A bővített beállításokat vessző választja el, és egy argumentumot "
+"várhatnak,\n"
+"\tamit egy egyenlőségjel ('=') kezd.\n"
+"\n"
+"Érvényes bővített beállítások:\n"
+"\tmmp_update_interval=<gyakoriság>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID lemezenkénti adatdarab blokkokban>\n"
+"\tstripe-width=<RAID stride * adatlemezek blokkokban>\n"
+"\toffset=<eltolás a fájlrendszer létrehozásához>\n"
+"\tresize=<átméretezési maximális méret blokkokban>\n"
+"\tpacked_meta_blocks=<0 a kikapcsoláshoz, 1 a bekapcsoláshoz>\n"
+"\tlazy_itable_init=<0 a kikapcsoláshoz, 1 a bekapcsoláshoz>\n"
+"\tlazy_journal_init=<0 a kikapcsoláshoz, 1 a bekapcsoláshoz>\n"
+"\troot_owner=<a root könyvtár uid-ja>:<a root könyvtár gid-je>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<engedélyezendő kvótatípusok>\n"
+"\n"
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Figyelmeztetés: %u RAID csíkszélesség nem páros többszöröse %u stride-nak.\n"
+"\n"
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Szintaktikai hiba az mke2fs beállítófájljában (%s, a(z) %d. sorban)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Érvénytelen fájlrendszer-beállítás lett megadva: %s\n"
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Érvénytelen csatolási beállítás lett megadva: %s\n"
+
+#: misc/mke2fs.c:1296
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Az mke2fs.conf fájl nem definiálja a(z) %s fájlrendszer típusát.\n"
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Valószínűleg telepíteni kell egy frissített mke2fs.conf fájlt.\n"
+"\n"
+
+#: misc/mke2fs.c:1304
+msgid "Aborting...\n"
+msgstr "Megszakítás…\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Figyelmeztetés: az fs_type %s nincs definiálva az mke2fs.conf-ban\n"
+"\n"
+
+#: misc/mke2fs.c:1527
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Nem sikerült memóriát foglalni az új PATH számára.\n"
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Nem sikerült a profil előkészítése (hiba: %ld).\n"
+
+#: misc/mke2fs.c:1597
+#, c-format
+msgid "invalid block size - %s"
+msgstr "érvénytelen blokkméret - %s"
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+"Figyelmeztetés: a(z) %d blokkméret nem használható a legtöbb rendszeren.\n"
+
+#: misc/mke2fs.c:1617
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "Érvénytelen fürtméret - %s"
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "A „-R†elavult, használja helyette a „-E†kapcsolót"
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "a hibaviselkedés hibás - %s"
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr "A csoportonkénti blokkok száma érvénytelen"
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr "a csoportonkénti blokkok számának 8 többszörösének kell lennie"
+
+#: misc/mke2fs.c:1669
+msgid "Illegal number for flex_bg size"
+msgstr "A flex_bg mérethez megadott szám érvénytelen"
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr "a flex_bg méretnek 2 hatványának kell lennie"
+
+#: misc/mke2fs.c:1680
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "a flex_bg mérete (%lu) legfeljebb 2^31 lehet"
+
+#: misc/mke2fs.c:1690
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "az inode arány (%s) érvénytelen (min %d/max %d)"
+
+#: misc/mke2fs.c:1700
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "érvénytelen inode méret - %s"
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+"Figyelmeztetés: a -K kapcsoló elavult, már ne használja. Helyette a „-E "
+"nodiscard†bővített beállítás használható.\n"
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr "a malloc-ban a bad_blocks_filename-hez"
+
+#: misc/mke2fs.c:1733
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"Figyelmeztetés: a címke túl hosszú, csonkítva lesz erre: „%sâ€\n"
+"\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "a fenntartott blokkok százaléka érvénytelen - %s"
+
+#: misc/mke2fs.c:1757
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "az inode-ok száma hibás - %s"
+
+#: misc/mke2fs.c:1770
+msgid "while allocating fs_feature string"
+msgstr "az fs_feature karakterlánc foglalásakor"
+
+#: misc/mke2fs.c:1787
+#, c-format
+msgid "bad revision level - %s"
+msgstr "hibás revíziószint - %s"
+
+#: misc/mke2fs.c:1792
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "%d revízió létrehozására tett kísérlet közben"
+
+#: misc/mke2fs.c:1806
+msgid "The -t option may only be used once"
+msgstr "A -t kapcsoló csak egyszer használható"
+
+#: misc/mke2fs.c:1814
+msgid "The -T option may only be used once"
+msgstr "A -T kapcsoló csak egyszer használható"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "%s naplóeszköz megnyitására tett kísérlet közben\n"
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"A naplóeszköz blokkmérete (%d) kisebb, mint a minimális %d blokkméret\n"
+
+#: misc/mke2fs.c:1882
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "A naplóeszköz blokkmérete lesz felhasználva: %d\n"
+
+#: misc/mke2fs.c:1893
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "érvénytelen blokkok: „%s†ezen az eszközön: „%sâ€"
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "fájlrendszer"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "a fájlrendszerméret meghatározására tett kísérlet közben"
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Nem határozható meg az eszközméret, meg kell adnia\n"
+"a fájlrendszer méretét\n"
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Az eszköz jelentett mérete nulla. Érvénytelen partíciót adott meg,\n"
+"\tvagy a partíciós tábla nem lett újraolvasva az fdisk futtatása után,\n"
+"\tmert egy módosított partíció foglalt és használatban van. Újraindításra\n"
+"\tlehet szükség a partíciós tábla újraolvasásához.\n"
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr "A fájlrendszer nagyobb, mint a nyilvánvaló lemezméret."
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr "A fájlrendszer-típusok listája nem dolgozható fel\n"
+
+#: misc/mke2fs.c:2040
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "A HURD nem támogatja a filetype jellemzőt.\n"
+
+#: misc/mke2fs.c:2045
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "A HURD nem támogatja a huge_file jellemzőt.\n"
+
+#: misc/mke2fs.c:2050
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "A HURD nem támogatja a metadata_csum jellemzőt.\n"
+
+#: misc/mke2fs.c:2055
+#, fuzzy
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "A HURD nem támogatja a huge_file jellemzőt.\n"
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr "a hardver szektorméret meghatározására tett kísérlet közben"
+
+#: misc/mke2fs.c:2071
+msgid "while trying to determine physical sector size"
+msgstr "a fizikai szektorméret meghatározására tett kísérlet közben"
+
+#: misc/mke2fs.c:2103
+msgid "while setting blocksize; too small for device\n"
+msgstr "a blokkméret beállítása közben: túl kicsi az eszközhöz\n"
+
+#: misc/mke2fs.c:2108
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+"Figyelmeztetés: a megadott %d blokkméret kisebb az eszköz fizikai %d "
+"szektorméreténél\n"
+
+#: misc/mke2fs.c:2132
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Az eszköz mérete (0x%llx blokk) %s darabbal nagyobb,\n"
+"\tmint ami 32 biten kifejezhető %d blokkmérettel.\n"
+
+#: misc/mke2fs.c:2144
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Az eszköz mérete (0x%llx blokk) %s túl nagy egy\n"
+"\t%d blokkméretet használó fájlrendszer létrehozásához.\n"
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types feloldása az mke2fs.conf-hoz: "
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"A fájlrendszer jellemzői nem támogatottak 0 revíziójú fájlrendszerekkel\n"
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "A ritka szuperblokkok nem támogatottak 0 revíziójú fájlrendszerekkel\n"
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "A naplók nem támogatottak 0 revíziójú fájlrendszerekkel\n"
+
+#: misc/mke2fs.c:2204
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "a fenntartott blokkok százaléka érvénytelen - %lf"
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+"Az extenteket engedélyezni KELL a 64 bites fájlrendszerekhez. A -O extents "
+"megadásával javíthatja.\n"
+
+#: misc/mke2fs.c:2241
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "A fürtméret nem lehet kisebb a blokkméretnél.\n"
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "a fürtméret megadása igényli a bigalloc jellemzőt"
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "figyelmeztetés: Nem kérhető le az eszközgeometria ehhez: %s\n"
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "%s igazítása eltolva %lu bájttal.\n"
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Ez rossz teljesítményt okozhat, javasolt a(z újra)particionálás.\n"
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "a(z) %d bájtos blokkméret túl nagy a rendszerhez (maximum: %d)"
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Figyelmeztetés: a(z) %d bájtos blokkméret túl nagy a rendszerhez (maximum: "
+"%d), folytatás kényszerítve\n"
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+"Javaslat: használja a 3.18-as vagy újabb Linux kernelt a metaadat- és napló-"
+"ellenőrzőösszeg jellemzők stabilabb támogatásáért.\n"
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Figyelmeztetés: az eltolás konkrét fájlrendszerméret nélkül lett megadva.\n"
+"Létrejön egy %llu blokkos fájlrendszer, de nem biztos, hogy ezt akarta.\n"
+"\n"
+
+#: misc/mke2fs.c:2375
+#, fuzzy, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+"%d bájtos inode-ok túl kicsik a projektkvótához, adjon meg nagyobb méretet"
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "A bigalloc jellemző nem támogatható az extents jellemző nélkül"
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"A resize_inode és meta_bg jellemzők nem kompatibilisek.\n"
+"Egyszerre nem engedélyezhető mindkettő.\n"
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+"\n"
+"Figyelmeztetés: a bigalloc jellemző még fejlesztés alatt van\n"
+"További információkért lásd: https://ext4.wiki.kernel.org/index.php/"
+"Bigalloc\n"
+"\n"
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"a fenntartott online átméretezési blokkok nem támogatottak nem ritka "
+"fájlrendszeren"
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr "a csoportonkénti blokkszám kívül esik a tartományon"
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+"A flex_bg jellemző nincs engedélyezve, így a flex_bg mérete nem adható meg"
+
+#: misc/mke2fs.c:2467
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "az inode méret (%d) érvénytelen (min %d/max %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+"%d bájtos inode-ok túl kicsik a beágyazott adatokhoz, adjon meg nagyobb "
+"méretet"
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "túl sok inode (%llu), növelje az inode arányt"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "túl sok inode (%llu), 2^32-nél kevesebbet adjon meg"
+
+#: misc/mke2fs.c:2518
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"az inode_size (%u) * inodes_count (%u) túl nagy egy %llu\n"
+"\tblokkos fájlrendszernek, adjon meg magasabb inode_ratio (-i) értéket\n"
+"\tvagy csökkentse az inode számot (-N).\n"
+
+#: misc/mke2fs.c:2705
+msgid "Discarding device blocks: "
+msgstr "Eszközblokkok eldobása: "
+
+#: misc/mke2fs.c:2721
+msgid "failed - "
+msgstr "meghiúsult - "
+
+#: misc/mke2fs.c:2780
+msgid "while initializing quota context"
+msgstr "a kvóta kontextus előkészítésekor"
+
+#: misc/mke2fs.c:2787
+msgid "while writing quota inodes"
+msgstr "kvóta inode-ok írásakor"
+
+#: misc/mke2fs.c:2812
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "hibás hibaviselkedés a profilban - %s"
+
+#: misc/mke2fs.c:2888
+#, fuzzy
+msgid "in malloc for android_sparse_params"
+msgstr "a malloc-ban a bad_blocks_filename-hez"
+
+#: misc/mke2fs.c:2902
+msgid "while setting up superblock"
+msgstr "a szuperblokk beállítása közben"
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+"Az extentek nincsenek engedélyezve. A fájlextentfa ellenőrzőösszege "
+"kezelhető, de a blokktérképeké nem. Az extentek kikapcsolása csökkenti a "
+"metaadat-ellenőrzés lefedettségét. A -O extents megadásával javíthatja.\n"
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+"A 64 bites fájlrendszer támogatása nincs engedélyezve. A jellemző által "
+"támogatott nagyobb mezők lehetővé teszik a teljes erősségű ellenőrzést. A -O "
+"64bit megadásával javíthatja.\n"
+
+#: misc/mke2fs.c:2933
+#, fuzzy
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "A metadata_csum_seed jellemző igényli a metadata_csum jellemzőt.\n"
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+"Az eldobás sikerült, és 0-kat fog visszaadni - az inode tábla törlésének "
+"kihagyása\n"
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "ismeretlen oprendszer - %s"
+
+#: misc/mke2fs.c:3119
+msgid "Allocating group tables: "
+msgstr "Csoporttáblák foglalása: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr "a fájlrendszer táblák lefoglalására tett kísérlet közben"
+
+#: misc/mke2fs.c:3136
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tA részfürt bittérképének konvertálása közben"
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s tovább sérülhet a szuperblokk újraírásával\n"
+
+#: misc/mke2fs.c:3183
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "%llu blokk nullázásakor a fájlrendszer végén"
+
+#: misc/mke2fs.c:3196
+msgid "while reserving blocks for online resize"
+msgstr "blokkok foglalásakor az online átméretezéshez"
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr "napló"
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Napló hozzáadása a(z) %s eszközhöz: "
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tNapló %s eszközhöz adására tett kísérlet közben"
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "kész\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Naplólétrehozás kihagyása csak szuper módban\n"
+
+#: misc/mke2fs.c:3248
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Napló létrehozása (%u blokk): "
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tNapló létrehozására tett kísérlet közben"
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Hiba a többszörös csatolás elleni védelem szolgáltatás bekapcsolásakor."
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+"A többszörös csatolás elleni védelem bekapcsolva %d másodperces frissítési "
+"gyakorisággal.\n"
+
+#: misc/mke2fs.c:3290
+msgid "Copying files into the device: "
+msgstr "Fájlok másolása az eszközre: "
+
+#: misc/mke2fs.c:3296
+msgid "while populating file system"
+msgstr "a fájlrendszer feltöltésekor"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Szuperblokkok és fájlrendszer-könyvelési információk írása: "
+
+#: misc/mke2fs.c:3310
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "%llu blokk nullázásakor a fájlrendszer végén"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"kész\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "%llu blokk nullázásakor a nagy fájlnál"
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+"A(z) %llu (%uk) blokkos partícióeltolás nem kompatibilis a(z) %u "
+"fürtmérettel.\n"
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr "Az óriási fájlok nullázva lesznek\n"
+
+#: misc/mk_hugefiles.c:582
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "%lu óriási fájl létrehozása "
+
+#: misc/mk_hugefiles.c:584
+#, c-format
+msgid "with %llu blocks each"
+msgstr "egyenként %llu blokkal"
+
+#: misc/mk_hugefiles.c:593
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "%lu. óriási fájl létrehozása közben"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Használat: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Használat: %s eszköz...\n"
+"\n"
+"Partícióinformációkat ír ki minden megadott eszközről.\n"
+"Például: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "%s nem nyitható meg: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Nem kérhető le %s geometriája: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Nem kérhető le a(z) %s mérete: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d kezdet=%8d méret=%8lu vég=%8d\n"
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Futtassa az „e2fsck -f†parancsot a fájlrendszeren.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Futtassa az „e2fsck -fD†parancsot a fájlrendszeren.\n"
+
+#: misc/tune2fs.c:136
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Használat: %s [-c max_csatolásszám] [-e hiba_viselkedés] [-f] [-g csoport]\n"
+"\t[-i gyakoriság[d|m|w]] [-j] [-J naplóbeállítások] [-l]\n"
+"\t[-m fenntartott_blokkok_százaléka] [-o [^]csatolási_beállítások[,...]]\n"
+"\t[-p mmp_frissítési_gyakoriság] [-r fenntartott_blokkok_száma] [-u "
+"felhasználó]\n"
+"\t[-C csatolások_száma] [-L kötetcímke] [-M utolsó_csatolási_könyvtár]\n"
+"\t[-O [^]jellemző[,...]] [-Q kvótabeállítások]\n"
+"\t[-E bővített_beállítás[,...]] [-T utolsó_ellenőrzés_ideje] [-U UUID]\n"
+"\t[ -I új_inode_méret ] [-z visszavonási_fájl] eszköz\n"
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "A napló-szuperblokk nem található!\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "a külső napló megnyitására tett kísérlet közben"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s nem naplóeszköz.\n"
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "A fájlrendszer UUID-ja nem található a naplóeszközön.\n"
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Nem található a naplóeszköz. NEM került eltávolításra.\n"
+"Használja a -f kapcsolót hiányzó naplóeszköz eltávolításához.\n"
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr "Napló eltávolítva\n"
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "bittérképek olvasásakor"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr "napló inode törlése közben"
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr "napló inode írásakor"
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr "(és utána indítsa újra!)\n"
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Az e2fsck futtatása után futtassa a „resize2fs %s %s"
+
+#: misc/tune2fs.c:483
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Futtassa a „resize2fs %s %s"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "†parancsot a 64 bites mód bekapcsolásához.\n"
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "†parancsot a 64 bites mód kikapcsolásához.\n"
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"FIGYELMEZTETÉS: Nem erősíthető meg a kernel support metadata_csum_seed\n"
+" kernelbeli támogatása. Ehhez Linux >= v4.4 szükséges.\n"
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "„%s†fájlrendszer-jellemző törlése nem támogatott.\n"
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "„%s†fájlrendszer-jellemző beállítása nem támogatott.\n"
+
+#: misc/tune2fs.c:1138
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"A has_journal jellemző csak akkor törölhető, ha a fájlrendszer nincs "
+"csatolva,\n"
+"vagy csak olvashatóan van csatolva.\n"
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"A needs_recovery jelző be van állítva. A has_journal jelző törlése előtt\n"
+"futtassa az e2fsck programot.\n"
+
+#: misc/tune2fs.c:1164
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"A „sparse_super†fájlrendszer-jellemző beállítása nem támogatott\n"
+"a bekapcsolt meta_bg jellemzővel rendelkező fájlrendszerekhez.\n"
+
+#: misc/tune2fs.c:1177
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"A többszörös csatolás elleni védelem nem állítható be,\n"
+"ha a fájlrendszer csatolva van, vagy csak olvasható.\n"
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+"A többszörös csatolás elleni védelem bekapcsolva %d mp frissítési "
+"gyakorisággal.\n"
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"A többszörös csatolás elleni védelem nem kapcsolható ki,\n"
+"ha a fájlrendszer csak olvasható.\n"
+
+#: misc/tune2fs.c:1212
+msgid "Error while reading bitmaps\n"
+msgstr "Hiba a bittérképek olvasásakor\n"
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Az MMP blokkban lévő bűvös szám nem egyezik. Várt: %x, tényleges: %x\n"
+
+#: misc/tune2fs.c:1226
+msgid "while reading MMP block."
+msgstr "az MMP blokk olvasása közben."
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr "A flex_bg jelző törlése inkonzisztenssé tenné a fájlrendszert.\n"
+
+#: misc/tune2fs.c:1269
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"A huge_file jellemző csak akkor törölhető, ha a fájlrendszer nincs "
+"csatolva,\n"
+"vagy csak olvashatóan van csatolva.\n"
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr "Az ellenőrzőösszegek engedélyezése eltarthat egy ideig."
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "A metadata_csum nem engedélyezhető csatolt fájlrendszeren!\n"
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+"Az extentek nincsenek engedélyezve. A fájlextentfa ellenőrzőösszege "
+"kezelhető, de a blokktérképeké nem. Az extentek kikapcsolása csökkenti a "
+"metaadat-ellenőrzés lefedettségét. Futtassa újra a -O extents megadásával a "
+"javításhoz.\n"
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+"A 64 bites fájlrendszer támogatása nincs engedélyezve. A jellemző által "
+"támogatott nagyobb mezők lehetővé teszik a teljes erősségű ellenőrzést. "
+"Futtassa a resize2fs -b parancsot a javításhoz.\n"
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr "Az ellenőrzőösszegek letiltása eltarthat egy ideig."
+
+#: misc/tune2fs.c:1323
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "A metadata_csum nem tiltható le csatolt fájlrendszeren!\n"
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "A 64 bites mód nem engedélyezhető csatolt fájlrendszeren!\n"
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "A 64 bites mód nem tiltható le csatolt fájlrendszeren!\n"
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Figyelmeztetés: a '^quota' jellemző felülírja a '-Q' argumentumait.\n"
+
+#: misc/tune2fs.c:1465
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"A „metadata_csum_seed†fájlrendszer-jellemző beállítása csak a bekapcsolt\n"
+"metadata_csum jellemzővel rendelkező fájlrendszerekhez támogatott.\n"
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"Az UUID megváltozott a metadata_csum engedélyezése óta. A fájlrendszert le "
+"kell választani az összes metaadat biztonságos újraírásához, hogy "
+"megfeleljenek az új UUID-nek.\n"
+
+#: misc/tune2fs.c:1489
+#, fuzzy
+msgid "Recalculating checksums could take some time."
+msgstr "Az ellenőrzőösszegek engedélyezése eltarthat egy ideig."
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr "A fájlrendszer már rendelkezik naplóval.\n"
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\t%s naplójának megnyitására tett kísérlet közben\n"
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Napló létrehozása %s eszközön: "
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "fájlrendszer naplóhoz adása közben ezen: %s"
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Napló inode létrehozása: "
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tNaplófájl létrehozására tett kísérlet közben"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+msgid "while initializing quota context in support library"
+msgstr "a kvóta kontextus előkészítésekor a támogató programkönyvtárban"
+
+#: misc/tune2fs.c:1649
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "a kvótakorlátok frissítésekor (%d)"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "a kvótafájl írásakor (%d)"
+
+#: misc/tune2fs.c:1675
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "a kvótafájl eltávolításakor (%d)"
+
+#: misc/tune2fs.c:1718
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Hibás kvótabeállítások lettek megadva.\n"
+"\n"
+"A következő érvényes kvótabeállítások érhetők el (vesszővel elválasztva\n"
+"adhatók meg):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "A dátum/időmeghatározás nem dolgozható fel: %s"
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "a csatolásszám hibás - %s"
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "a gid/csoportnév hibás - %s"
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr "a gyakoriság hibás - %s"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "a fenntartott blokkok aránya hibás - %s"
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr "a -o csak egyszer adható meg"
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr "a -O csak egyszer adható meg"
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "a fenntartott blokkok száma hibás - %s"
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "hibás uid/felhasználónév - %s"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "bad inode size - %s"
+msgstr "hibás inode méret - %s"
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Az inode méretnek kettő hatványának kell lennie - %s"
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "az mmp_update_interval túl nagy: %lu\n"
+
+#: misc/tune2fs.c:2115
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+"A többszörös csatolás elleni védelem gyakoriságának beállítása %lu "
+"másodpercre\n"
+msgstr[1] ""
+"A többszörös csatolás elleni védelem gyakoriságának beállítása %lu "
+"másodpercre\n"
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Érvénytelen RAID stride: %s\n"
+
+#: misc/tune2fs.c:2153
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Érvénytelen RAID csíkszélesség: %s\n"
+
+#: misc/tune2fs.c:2168
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Érvénytelen hash algoritmus: %s\n"
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Az alapértelmezett hash algoritmus beállítása erre: %s (%d)\n"
+
+#: misc/tune2fs.c:2193
+#, fuzzy
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+"\n"
+"A megadott bővített beállítások hibásak: %s\n"
+"\n"
+"A bővített beállításokat vessző választja el, és egy argumentumot "
+"várhatnak,\n"
+"\tamit egy egyenlőségjel ('=') kezd.\n"
+"\n"
+"Érvényes bővített beállítások:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algoritmus>\n"
+"\tmount_opts=<bővített alapértelmezett csatolási beállítások>\n"
+"\tstride=<RAID lemezenkénti darabméret blokkokban>\n"
+"\tstripe_width=<RAID stride*adatlemezek blokkokban>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:2663
+msgid "Failed to read inode bitmap\n"
+msgstr "Nem sikerült beolvasni az inode bittérképet\n"
+
+#: misc/tune2fs.c:2668
+msgid "Failed to read block bitmap\n"
+msgstr "Nem sikerült beolvasni a blokkbittérképet\n"
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr "áthelyezendő blokkok"
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "A blokkbittérkép lefoglalása sikertelen az inode méret növelésekor\n"
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr "Nincs elég hely az inode méret növeléséhez \n"
+
+#: misc/tune2fs.c:2699
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "A blokkok áthelyezése sikertelen az inode-átméretezéskor \n"
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Hiba az inode méret módosításakor.\n"
+"Futtassa az e2undo parancsot a fájlrendszer módosításainak "
+"visszavonásához. \n"
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Ha biztos benne, hogy a fájlrendszer nincs használatban egyetlen "
+"csomóponton\n"
+"sem, akkor futtassa a következőt:\n"
+"„tune2fs -f -E clear_mmp {eszköz}â€\n"
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Az MMP blokk bűvös száma hibás. Próbálja javítani a következő futtatásával:\n"
+"'e2fsck -f %s'\n"
+
+#: misc/tune2fs.c:2955
+msgid "Cannot modify a journal device.\n"
+msgstr "Nem lehet naplóeszközt módosítani.\n"
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Az inode méret már %lu\n"
+
+#: misc/tune2fs.c:2975
+msgid "Shrinking inode size is not supported\n"
+msgstr "Az inode méret csökkentése nem támogatott\n"
+
+#: misc/tune2fs.c:2980
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Érvénytelen inode méret: %lu (max: %d)\n"
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr "Az inode-ok átméretezése eltarthat egy ideig."
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Figyelmeztetés: A napló piszkos. Érdemes lenne újrajátszani a naplót, így:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"és utána futtatni ezt a parancsot. Egyébként a módosításokat a napló\n"
+"helyreállítása felülírhatja.\n"
+
+#: misc/tune2fs.c:3045
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Napló helyreállítása.\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "A maximális csatolásszám beállítása ennyire: %d\n"
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Az aktuális csatolásszám beállítása ennyire: %d\n"
+
+#: misc/tune2fs.c:3074
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "A hibaviselkedés beállítása erre: %d\n"
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "A fenntartott blokkok gid-jének beállítása erre: %lu\n"
+
+#: misc/tune2fs.c:3084
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "az ellenőrzések időköze túl nagy (%lu)"
+
+#: misc/tune2fs.c:3091
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Az ellenőrzések közti időköz beállítása %lu másodpercre\n"
+
+#: misc/tune2fs.c:3098
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+"A fenntartott blokkok százalékos arányának beállítása ennyire: %g%% (%llu "
+"blokk)\n"
+
+#: misc/tune2fs.c:3104
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "a fenntartott blokkok száma túl nagy (%llu)"
+
+#: misc/tune2fs.c:3111
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "A fenntartott blokkok számának beállítása erre: %llu\n"
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"A fájlrendszer már rendelkezik ritka szuperblokkokkal.\n"
+
+#: misc/tune2fs.c:3119
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"\n"
+"A ritka szuperblokk jelző beállítása nem támogatott\n"
+"a bekapcsolt meta_bg jellemzővel rendelkező fájlrendszerekhez.\n"
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"A ritka szuperblokk jelző beállítva. %s"
+
+#: misc/tune2fs.c:3134
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"A ritka szuperblokk jelző törlése nem támogatott.\n"
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "A fájlrendszer utolsó ellenőrzési idejének beállítása erre: %s\n"
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "A fenntartott blokkok uid-jének beállítása erre: %lu\n"
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Hiba a clear_mmp használatakor. A -f kapcsolóval együtt használandó\n"
+
+#: misc/tune2fs.c:3198
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"A kvóta jellemző csak akkor módosítható, amikor a fájlrendszer le van "
+"választva.\n"
+
+#: misc/tune2fs.c:3222
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Az UUID csak akkor módosítható, amikor a fájlrendszer le van választva.\n"
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+"Ha csak a v4.4-nél újabb kernelt használ, futtassa a „tune2fs -O "
+"metadata_csum_seed†parancsot, majd futtassa újra ezt a parancsot.\n"
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr ""
+"Az UUID beállítása egy ellenőrzőösszeget használó fájlrendszeren eltarthat "
+"egy ideig."
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr "Érvénytelen UUID formátum\n"
+
+#: misc/tune2fs.c:3275
+msgid "Need to update journal superblock.\n"
+msgstr "A napló szuperblokkját frissíteni kell.\n"
+
+#: misc/tune2fs.c:3301
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Az inode méret csak akkor módosítható, amikor a fájlrendszer le van "
+"választva.\n"
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Az inode méret módosítása nem támogatott a bekapcsolt flex_bg\n"
+"jellemzővel rendelkező fájlrendszerekhez.\n"
+
+#: misc/tune2fs.c:3326
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Az inode méret beállítása ennyire: %lu\n"
+
+#: misc/tune2fs.c:3330
+msgid "Failed to change inode size\n"
+msgstr "Nem sikerült megváltoztatni az inode méretet\n"
+
+#: misc/tune2fs.c:3344
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "A stride méret beállítása ennyire: %d\n"
+
+#: misc/tune2fs.c:3349
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "A csíkszélesség beállítása ennyire: %d\n"
+
+#: misc/tune2fs.c:3356
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+"A bÅ‘vített alapértelmezett csatolási beállítások beállítása erre: „%sâ€\n"
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr "<folytatás>\n"
+
+#: misc/util.c:104
+#, fuzzy, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Mindenképp folytatja (vagy vár %d másodpercet)? (i,N) "
+
+#: misc/util.c:108
+msgid "Proceed anyway? (y,N) "
+msgstr "Mindenképp folytatja? (i,N) "
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs kényszerítve mindenképp. Reméljük, a /etc/mtab helytelen.\n"
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "itt aztán nem jön létre egy %s!\n"
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs kényszerítve mindenképp.\n"
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Nem sikerült memóriát foglalni a naplóbeállítások feldolgozásához!\n"
+
+#: misc/util.c:186
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Nem található ennek megfelelő naplóeszköz: %s\n"
+
+#: misc/util.c:213
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"A megadott naplóbeállítások hibásak: %s\n"
+"\n"
+"A naplóbeállításokat vessző választja el, és egy argumentumot várhatnak,\n"
+"\tamit egy egyenlőségjel ('=') kezd.\n"
+"\n"
+"Érvényes naplókapcsolók:\n"
+"\tsize=<naplóméret megabájtban>\n"
+"\tdevice=<naplóeszköz>\n"
+"\tlocation=<napló helye>\n"
+"\n"
+"A naplóméret 1024 és 10240000 fájlrendszerblokk között kell legyen.\n"
+"\n"
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"A fájlrendszer túl kicsi a naplóhoz\n"
+
+#: misc/util.c:251
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"A kért naplóméret %d blokk, de 1024 és 10240000\n"
+"blokk között kell lennie. Megszakítás.\n"
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"A naplóméret túl nagy a fájlrendszerhez.\n"
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Ez a fájlrendszer %d csatolásonként, vagy %g naponta (amelyik hamarabb\n"
+"bekövetkezik) automatikusan ellenőrzésre kerül. A felülbíráláshoz\n"
+"használja a tune2fs -c vagy -i kapcsolóját.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+"Használat: %s [-d] [-p pidfájl] [-s foglalat_útvonal] [-T időtúllépés]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n szám] [-s foglalat_útvonal]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "hibás argumentumok"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "kapcsolódás"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "írás"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "olvasásszám"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "hibás válaszhossz"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "az uuidd démon már fut, %s PID-del\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "A unix adatfolyam socket létrehozása sikertelen: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "A(z) %s unix sockethez csatlakozás sikertelen: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "A(z) %s unix socketen figyelés sikertelen: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Hiba a kliensről olvasáskor, hossz = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "művelet: %d, bejövő szám = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Idő UUID előállítva: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Véletlen UUID előállítva: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Idő UUID előállítva: %s, és rá következő UUID\n"
+msgstr[1] "Idő UUID előállítva: %s, és %d rá következő UUID\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "%d UUID előállítva\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Érvénytelen művelet: %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Hibás szám: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Hiba az UUID démon (%s) hívásakor: %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s, és rá következő UUID\n"
+msgstr[1] "%s, és %d rá következő UUID\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "UUID-k listája:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Váratlan válaszhossz a(z) %d. kiszolgálótól\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Nem lőhető ki a(z) %d PID-del futó UUID: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "A(z) %d PID-del futó UUID kilőve\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Használat: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "Extentkiíratás:\n"
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tSzám=%llu, Méret=%llu, Kurzor=%llu, Rendezett=%llu\n"
+
+#: resize/main.c:49
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Használat: %s [-d hibakeresési_jelzők] [-f] [-F] [-M] [-P] [-p] eszköz [-b|-"
+"s|új_méret] [-z visszavonási_fájl]\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Az inode tábla kibővítése"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Blokkok áthelyezése"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Az inode tábla vizsgálata"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Inode hivatkozások frissítése"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Inode tábla áthelyezése"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Ismeretlen lépés?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "%d. lépés kezdése (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"A bigalloc fájlrendszerek átméretezése nincs teljesen letesztelve. Saját\n"
+"felelősségre folytassa! Használja a -f kapcsolót, ha mindenképp folytatni\n"
+"szeretné.\n"
+"\n"
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr "%s megnyitása közben"
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "az elérési információk lekérésekor ehhez: %s"
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Először futtassa az „e2fsck -f %s†parancsot.\n"
+"\n"
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "A fájlrendszer becsült minimális mérete: %llu\n"
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Érvénytelen új méret: %s\n"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Az új méret túl nagy a 32 biten való ábrázoláshoz\n"
+
+#: resize/main.c:534
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Az új méret kisebb a minimálisnál (%llu)\n"
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr "Érvénytelen stride hossz"
+
+#: resize/main.c:564
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"A tartalmazó partíció (vagy eszköz) csak %llu (%dk) blokkos.\n"
+"A kért új méret %llu blokk.\n"
+"\n"
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "A 64bit jellemzőt nem lehet beállítani és törölni is.\n"
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+"Egy 2^32 blokknál nagyobb fájlrendszeren nem módosítható a 64bit jellemző.\n"
+
+#: resize/main.c:581
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "A 64bit jellemző nem módosítható, amíg a fájlrendszer csatolva van.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+"Engedélyezze az extents jellemzőt a tune2fs használatával a 64bit\n"
+"jellemző bekapcsolása előtt.\n"
+
+#: resize/main.c:593
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"A fájlrendszer már %llu (%dk) blokk hosszú. Nincs teendő!\n"
+"\n"
+
+#: resize/main.c:600
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "A fájlrendszer már 64 bites.\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "A fájlrendszer már 32 bites.\n"
+
+#: resize/main.c:613
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "A fájlrendszer 64 bitesre alakítása.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "A fájlrendszer 32 bitesre alakítása.\n"
+
+#: resize/main.c:617
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "A fájlrendszer átméretezése ezen: %s, %llu (%dk) blokkra.\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "%s átméretezésére tett kísérlet közben"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Futtassa az „e2fsck -fy %s†parancsot a fájlrendszer\n"
+"megjavításához a megszakított átméretezési művelet után.\n"
+
+#: resize/main.c:635
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"A fájlrendszer ezen: %s mostantól %llu (%dk) blokk hosszú.\n"
+"\n"
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "%s csonkítására tett kísérlet közben"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr ""
+"A kernel nem támogatja az online átméretezést a sparse_super2 használatakor"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+"A fájlrendszer (%s) csatolva van ide: %s, online átméretezés szükséges\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Az online zsugorítás nem támogatott"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "A fájlrendszer nem támogatja az online átméretezést"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Nincs elég fenntartott gdt blokk az átméretezéshez"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "A kernel nem támogatja az ilyen nagy fájlrendszer átméretezését"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "%s csatolási pont megnyitására tett kísérlet közben"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Régi átméretezési felület kérve.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Hozzáférés megtagadva a fájlrendszer átméretezéséhez"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Az online átméretezés támogatásának keresésekor"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "A kernel nem támogatja az online átméretezést"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "%s online átméretezésének végrehajtása %llu (%dk) blokkra.\n"
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr "Az utolsó csoport kiterjesztésére tett kísérlet közben"
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "A(z) %d. csoport hozzáadására tett kísérlet közben"
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+"A fájlrendszer (%s) csatolva van ide: %s, és az online\n"
+"átméretezés nem támogatott ezen a rendszeren\n"
+
+#: resize/resize2fs.c:759
+#, fuzzy, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "az inode-ok (%llu) száma kisebb kell legyen, mint %u"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "fenntartott blokkok"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr "metaadat-blokkok"
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+msgid "new meta blocks"
+msgstr "új metablokkok"
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Soha nem fordulhatna elő! Nincs sb az utolsó super_sparse bg-ben?\n"
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Soha nem fordulhatna elő! Váratlan old_desc a super_sparse bg-ben?\n"
+
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Soha nem fordulhatna elő: az átméretezendő inode sérült!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+#, fuzzy
+msgid "EXT2FS Library version 1.44.4"
+msgstr "EXT2FS programkönyvtár 1.43.5 verzió"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Hibás bűvös szám az ext2_filsys structure struktúrához"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Hibás bűvös szám a badblocks_list struktúrához"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Hibás bűvös szám a badblocks_iterate struktúrához"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Hibás bűvös szám az inode_scan struktúrához"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Hibás bűvös szám az io_channel struktúrához"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Hibás bűvös szám a unix io_channel struktúrához"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Hibás bűvös szám az io_manager struktúrához"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Hibás bűvös szám a block_bitmap struktúrához"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Hibás bűvös szám az inode_bitmap struktúrához"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Hibás bűvös szám a generic_bitmap struktúrához"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Hibás bűvös szám a teszt io_channel struktúrához"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Hibás bűvös szám a könyvtárblokk lista struktúrához"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Hibás bűvös szám az icount struktúrához"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Hibás bűvös szám a Powerquest io_channel struktúrához"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Hibás bűvös szám az ext2 fájlstruktúrához"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Hibás bűvös szám az ext2 lemezképfejléchez"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Hibás bűvös szám az inode io_channel struktúrához"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Hibás bűvös szám az ext4 extentkezelőhöz"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Hibás bűvös szám a szuperblokkban"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "A fájlrendszer revíziója túl magas"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Kísérlet egy csak olvashatóan megnyitott fájlrendszer írására"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Nem olvashatók a csoportleírók"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Nem írhatók a csoportleírók"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Sérült csoportleíró: hibás blokk a blokkbittérképhez"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Sérült csoportleíró: hibás blokk az inode bittérképhez"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Sérült csoportleíró: hibás blokk az inode táblához"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Nem írható egy inode bittérkép"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Nem olvasható egy inode bittérkép"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Nem írható egy blokkbittérkép"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Nem olvasható egy blokkbittérkép"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Nem írható egy inode tábla"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Nem olvasható egy inode tábla"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Nem olvasható a következő inode"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "A fájlrendszer blokkmérete váratlan"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Az EXT2 könyvtár sérült"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+"A fájlrendszerről való blokkolvasási kísérlet rövid olvasást eredményezett"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "A fájlrendszere való blokkírási kísérlet rövid írást eredményezett"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Nincs szabad hely a könyvtárban"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Az inode bittérkép nem lett betöltve"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "A blokkbittérkép nem lett betöltve"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Az inode száma illegális"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "A blokkszám illegális"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Belső hiba az ext2fs_expand_dir hívásban"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Nincs elég hely a javasolt fájlrendszer felépítéséhez"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Az ext2fs_mark_block_bitmap függvénynek átadott blokkszám illegális"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Az ext2fs_unmark_block_bitmap függvénynek átadott blokkszám illegális"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Az ext2fs_test_block_bitmap függvénynek átadott blokkszám illegális"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Az ext2fs_mark_inode_bitmap függvénynek átadott inode szám illegális"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Az ext2fs_unmark_inode_bitmap függvénynek átadott blokkszám illegális"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Az ext2fs_test_inode_bitmap függvénynek átadott inode szám illegális"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Kísérlet a blokkbittérkép végének eltolására a valós vég mögé"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Kísérlet az inode bittérkép végének eltolására a valós vég mögé"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Illegális indirekt blokk fordult elő"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Illegális duplán indirekt blokk fordult elő"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Illegális triplán indirekt blokk fordult elő"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "A blokkbittérképek nem azonosak"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Az inode bittérképek nem azonosak"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Illegális vagy rosszul formázott eszköznév"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Egy blokkcsoportból hiányzik egy inode tábla"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Az ext2 szuperblokk sérült"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+"Az ext2fs_mark_generic_bitmap függvénynek átadott általános bitszám illegális"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+"Az ext2fs_unmark_generic_bitmap függvénynek átadott általános bitszám "
+"illegális"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+"Az ext2fs_test_generic_bitmap függvénynek átadott általános bitszám illegális"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Túl sok szimbolikus linkkel találkoztam."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "A visszahívás függvény nem fogja kezelni ezt az esetet"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Az inode az inode tábla hibás blokkjából származik"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "A fájlrendszer nem támogatott jellemzőkkel rendelkezik"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "A fájlrendszer nem támogatott, csak olvasható jellemzőkkel rendelkezik"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Az IO csatorna nem tudott olvasáskor vagy íráskor pozicionálni"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "A memóriafoglalás meghiúsult"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Érvénytelen argumentum lett átadva az ext2 programkönyvtárnak"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Nem sikerült blokkot foglalni az ext2 fájlrendszeren"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Nem sikerült inode-ot foglalni az ext2 fájlrendszeren"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Az ext2 inode nem könyvtár"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Túl sok hivatkozás a táblában"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Az ext2_lookup nem találja a fájlt"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Fájl megnyitva csak olvashatóként"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Az ext2 könyvtárblokk nem található"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Az ext2 könyvtár már létezik"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Megvalósítatlan ext2 könyvtárfüggvény"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Felhasználói megszakítás kérve"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Az ext2 fájl túl nagy"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "A megadott naplóeszköz nem blokkos eszköz"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "A napló-szuperblokk nem található"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "A naplónak legalább 1024 blokkból kell állnia"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Nem támogatott naplóverzió"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Hiba a külső napló betöltésekor"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Nem található napló"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "A könyvtár hash nem támogatott"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "A bővített attribútum blokkszáma illegális"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Nem hozható létre fájlrendszer a kért számú inode-dal"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Az e2image pillanatkép nincs használatban"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Túl sok fenntartott csoportleíró blokk"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Az átméretezendő inode sérült"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Kísérlet blokkbittérkép beállítására hiányzó indirekt blokkal"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Siker"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Sérült adatbázis"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: IO hiba"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Zárolási hiba"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Elfogyott a memória"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: A rekord létezik"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Zárolás létezik más kulcsokon"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Érvénytelen paraméter"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: A rekord nem létezik"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Az írás nem engedélyezett"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Az ext2fs könyvtárblokklista üres"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+"Kísérlet blokkleképezés módosítására csak olvasható blokkiterátoron keresztül"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Hibás bűvös szám az ext4 extent mentett útvonalhoz"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Hibás bűvös szám a 64 bites általános bittérképhez"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Hibás bűvös szám a 64 bites blokkbittérképhez"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Hibás bűvös szám a 64 bites inode bittérképhez"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Hibás bűvös szám --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Hibás bűvös szám --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Hibás bűvös szám --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Hibás bűvös szám --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Hibás bűvös szám --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Hibás bűvös szám --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Hibás bűvös szám --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Sérült extentfejléc"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Sérült extentindex"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Sérült extent"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Nincs szabad hely az extenttérképben"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Az inode nem használ extenteket"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Nincs „következő†extent"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Nincs „előző†extent"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Nincs „felső†extent"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Nincs „alsó†extent"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Nincs aktuális csomópont"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Az ext2fs művelet nem támogatott"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Nincs hely az extent beszúrásához a csomópontba"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "A szétvágás üres csomópontot eredményezne"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Az extent nem található"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "A művelet nem támogatott extenteket tartalmazó inode-okra"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Az extent hossza érvénytelen"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "Az I/O csatorna nem támogatja a 64 bites blokkszámokat"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+"A hiányzó mtab fájl miatt nem ellenőrizhető, hogy a fájlrendszer csatolva "
+"van-e"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "A fájlrendszer túl nagy az örökölt bittérképek használatához"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: érvénytelen bűvös szám"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: az eszköz jelenleg aktív"
+
+#: lib/ext2fs/ext2_err.c:151
+#, fuzzy
+msgid "MMP: e2fsck being run"
+msgstr "MMP: az fsck fut"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: a blokkszám kívül esik a fájlrendszer tartományán"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: ismeretlen művelet van folyamatban"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: a fájlrendszer még használatban van"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: az O_DIRECT módú megnyitás meghiúsult"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "A blokkcsoportleíró mérete helytelen"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Az inode ellenőrzőösszege nem felel meg az inode-nak"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Az inode bittérkép ellenőrzőösszege nem felel meg a bittérképnek"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Az extentblokk ellenőrzőösszege nem felel meg az extentblokknak"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "A könyvtárblokkban nincs hely az ellenőrzőösszegnek"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "A könyvtárblokk ellenőrzőösszege nem felel meg a könyvtárblokknak"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "A bővített attribútumblokk ellenőrzőösszege nem felel meg a blokknak"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "A szuperblokk ellenőrzőösszege nem felel meg a szuperblokknak"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Ismeretlen ellenőrzőösszeg-algoritmus"
+
+#: lib/ext2fs/ext2_err.c:165
+#, fuzzy
+msgid "MMP block checksum does not match"
+msgstr "Az MMP blokk ellenőrzőösszege nem felel meg az MMP blokknak"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Az ext2 fájl már létezik"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "A blokkbittérkép ellenőrzőösszege nem felel meg a bittérképnek"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+"Nem lehet bejárni egy beágyazott adatokat tartalmazó inode adatblokkjait"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "A bővített attribútum névhossza érvénytelen"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "A bővített attribútum értékhossza érvénytelen"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "A bővített attribútum hash-e helytelen"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "A bővített attribútumblokk fejléce hibás"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "A bővített attribútumkulcs nem található"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Nincs elég hely a bővített attribútumadatok tárolásához"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "A fájlrendszerről hiányzik az ext_attr vagy inline_data jellemző"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Az inode nem tartalmaz beágyazott adatokat"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Nem egy beágyazott adatokat tartalmazó inode blokkja"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Nincs szabad hely a beágyazott adatoknak"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Hibás bűvös szám a bővített attribútumstruktúrához"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Az inode látszólag szemetet tartalmaz"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "A bővített attribútum érvénytelen értékeltolással rendelkezik"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "A naplójelzők inkonzisztensek"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "A visszavonási fájl sérült"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Rossz visszavonási fájl ehhez a fájlrendszerhez"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "A fájlrendszer sérült"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "A fájlrendszeren hibás CRC található"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "A napló szuperblokk sérült"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Az inode sérült"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profilverzió 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Hibás bűvös érték a profile_node-ban"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "A profilszakasz nem található"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "A profilreláció nem található"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Kísérlet egy reláció csomóponthoz adására, ami nem szakasz"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Egy profilszakaszfejléc nem nulla értékű"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Hibás láncolt lista a profilstruktúrákban"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Hibás csoportszint a profilstruktúrákban"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Hibás szülőmutató a profilstruktúrákban"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Hibás bűvös érték a profiliterátorban"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Nem állítható be érték a szakasz csomóponton"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Érvénytelen argumentum lett átadva a profil programkönyvtárnak"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Kísérlet csak olvasható profil módosítására"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "A profilszakasz fejléce nem a legfelső szinten van"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Szintaktikai hiba a profilszakasz fejlécében"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Szintaktikai hiba a profilrelációban"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Extra záró zárójel a profilban"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Hiányzó nyitó zárójel a profilban"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Hibás bűvös érték a profile_t-ben"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Hibás bűvös érték a profile_section_t-ben"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Az összes felső szintű szakasz bejárása nem támogatott"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Érvénytelen profile_section objektum"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Nincs több szakasz"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Hibás nameset került átadásra a lekérdező rutinnak"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Nincs profilfájl megnyitva"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Hibás bűvös érték a profile_file_t-ben"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Nem nyitható meg a profilfájl"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "A szakasz már létezik"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Érvénytelen logikai érték"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Érvénytelen egész érték"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Hibás bűvös érték a profile_file_data_t-ben"
+
+#: lib/support/plausible.c:118
+#, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "\tutoljára csatolva ide: %s, ekkor: %s"
+
+#: lib/support/plausible.c:121
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tutoljára csatolva ide: %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tlétrehozva ekkor: %s"
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tutoljára módosítva ekkor: %s"
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "%s partíciós tábla megtalálva itt: %s\n"
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "A(z) %s fájl nem létezik, és nem lett méret megadva.\n"
+
+#: lib/support/plausible.c:199
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "%s szabályos fájl létrehozása\n"
+
+#: lib/support/plausible.c:202
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "%s nem nyitható meg: %s\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Az eszköz nyilvánvalóan nem létezik, helyesen adta meg?\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "a(z) %s nem egy speciális blokkos eszköz\n"
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%1$s egy „%3$s†címkéjű „%2$s†fájlrendszert tartalmaz\n"
+
+#: lib/support/plausible.c:252
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s egy %s fájlrendszert tartalmaz\n"
+
+#: lib/support/plausible.c:276
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s „%s†adatokat tartalmaz\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Ellenőrzőösszeg-hibák vannak a fájlrendszeren! Futtassa az e2fsck-t "
+#~ "most!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Ellenőrzőösszeg-hibák vannak a bittérképekben! Futtassa az e2fsck-t "
+#~ "most!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: hiba a bittérképek olvasásakor: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Figyelmeztetés: hiba történt a szuperblokkok kiírásakor.\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "i_dir_acl a(z) %i. (%Q) inode-hoz %Id, nulla kellene legyen.\n"
diff --git a/po/id.gmo b/po/id.gmo
new file mode 100644
index 0000000..6657b01
--- /dev/null
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
new file mode 100644
index 0000000..2f76799
--- /dev/null
+++ b/po/id.po
@@ -0,0 +1,8687 @@
+# Pesan Bahasa Indonesia untuk e2fsprogs
+# Copyright (C) 2008 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Permission is granted to freely copy and distribute
+# this file and modified versions, provided that this
+# header is not removed and modified versions are marked
+# as such.
+# Arif E. Nugroho <arif_endro@yahoo.com>, 2008, 2009, 2010.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.41.12\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2010-05-24 12:30+0700\n"
+"Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
+"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
+"Language: id\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Bad block %u diluar jangkauan; diabaikan.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "ketika melakukan pengecheckan di inode bad block"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "ketika membaca inode bad block"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "ketika mencoba untuk membuka %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "ketika mencoba popen '%s'"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "ketika membaca dalam daftar bad block dari berkas"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "ketika memperbarui inode bad block"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr ""
+"Peringatan: illegal block %u ditemukan dalam inode bad block. Dihapus.\n"
+
+#: e2fsck/dirinfo.c:331
+#, fuzzy
+msgid "while freeing dir_info tdb file"
+msgstr "ketika membaca inode root"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Error membaca block %lu (%s) ketika %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Error membaca block %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Mengabaikan error"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Memaksa menulis kembali"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Error menulis block %lu (%s) ketika %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Error menulis block %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "dirblock kosong"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "dir map kosong"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Direktori block %u (#%d) kosong dalam inode %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s filename nblocks blocksize\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Nomor dari block tidak legal!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Tidak dapat mengalokasikan block buffer (ukuran=%d)\n"
+
+#: e2fsck/extents.c:42
+#, fuzzy
+msgid "extent rebuild inode map"
+msgstr "regular file inode map"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Penggunaan: %s disk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "BLKFLSBUF ioctl tidak disupport! Tidak dapat memflush buffer.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Penggunaan: %s [-F] [-I inode_buffer_block] perangkat\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "ketika membuka %s untuk flushing"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "ketika mencoba untuk memflush %s"
+
+#: e2fsck/iscan.c:110
+#, fuzzy, c-format
+msgid "while trying to open '%s'"
+msgstr "ketika mencoba untuk membuka %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr "ketika mencoba membuka inode scan"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr "ketika memperoleh inode berikutnya"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u inodes discan.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "membaca journal superblock\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: journal superblock tidak valid ditemukan\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journal terlalu pendek\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: merecovery journal\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: tidak akan melakukan journal recovery ketika read-only\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "ketika mencoba untuk membuka %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aextended attribute"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aerror mengalokasikan"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblock"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccompress"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckonflik dengan beberapa sistem berkas lain @b"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "ddirektori"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Ddeleted"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eentri"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e '%Dn' dalam %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fsistem berkas"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Funtuk @i %i (%Q) adalah"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrup"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE @d @i"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iilegal"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Ladalah sebuah link"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mmultiply-claimed"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "ninvalid"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oorphaned"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblem dalam"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rroot @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sseharusnya"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "uunattached"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vperangkat"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zzero-length"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<Inode Kosong>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Bad block inode>"
+
+#: e2fsck/message.c:160
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<Inode journal>"
+
+#: e2fsck/message.c:161
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<inode deskripsi grup>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<boot loader inode>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<undelete direktori inode>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<inode deskripsi grup>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<Inode journal>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Inode terpesan 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Inode Terpesan 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "berkas biasa"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "direktori"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "karakter device"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "block device"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "named pipe"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "symbolic link"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tipe file tidak diketahui dengan mode 0%o"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "block tidak langsung"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "blok tidak langsung berdua"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "blok tidak langsung bertiga"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "blok penerjemah"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "blok #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr ""
+
+#: e2fsck/message.c:485
+#, fuzzy
+msgid "group"
+msgstr "ggrup"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+#, fuzzy
+msgid "unknown quota type"
+msgstr "os tidak diketahui - %s"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "kalikan peta inode yang dituntut"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, fuzzy, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "internal error: tidak dapat menemukan dup_blk untuk %u\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "kembali dari clone_file_block"
+
+#: e2fsck/pass1b.c:976
+#, fuzzy, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "internal error: tidak dapat menemukan EA block record untuk %u"
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "internal error: tidak dapat menemukan EA inode record untuk %u"
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr "membaca direktori block"
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr "in-use inode map"
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr "direktori inode map"
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr "regular file inode map"
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr "in-use block map"
+
+#: e2fsck/pass1.c:1262
+#, fuzzy
+msgid "metadata block map"
+msgstr "meta-data blok"
+
+#: e2fsck/pass1.c:1324
+msgid "opening inode scan"
+msgstr "membuka inode scan"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr "memperoleh inode selanjutnya dari scan"
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "Tahap 1"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "membaca indirect block dari inode %u"
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr "inode map buruk"
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr "inode dalam bad block map"
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr "imagic inode map"
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr "multiply diklaim block map"
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr "ext attr block map"
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): diperkirakan %6lu diperoleh phys %6lu (blkcnt %lld)\n"
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr "block bitmap"
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr "inode bitmap"
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr "inode table"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "Tahap 2"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "Tidak dapat melanjutkan."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "inode selesai bitmap"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Puncak pemakaian memori"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Tahap 3"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "inode deteksi loop bitmap"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "Tahap 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Tahap 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(tidak ada prompt)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Betulkan"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Dihapus"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Dipindahkan"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Dialokasikan"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Diexpand"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Menyambungkan ke /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Membuat"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Mengambil"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Truncate"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Menghapus inode"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Membatalkan"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Membagi"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Melanjutkan"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Kopi multiply-claimed blocks"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Hapus berkas"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Suppress pesan"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Unlink"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Hapus HTree index"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Buat kembali"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(KOSONG)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "DIBETULKAN"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "DIHAPUS"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "DIPINDAHKAN"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "DIALOKASIKAN"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "DIEXPAND"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "DIHUBUNGKAN"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "DIBUAT"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "DIAMANKAN"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "DIPOTONG"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INODE DIHAPUS"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "DIBATALKAN"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "DIBAGI"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "MELANJUTKAN"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "MULTIPLY-CLAIMED BLOK DIKOPI"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "BERKAS DIHAPUS"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "DIAKHIRI"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "DILEPAS"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE INDEX DIHAPUS"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "AKAN MEMBUAT KEMBALI"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@b @B untuk @g %g tidak dalam @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@i @B untuk @G %G tidak dalam @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"@i table untuk @g %g tidak berada dalam @g. (@b %b)\n"
+"PERINGATAN: KEMUNGKINAN KEHILANGAN DATA BESAR.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+#, fuzzy
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"@S tidak dapat dibaca atau tidak dapat menjelaskan ext2 dengan benar\n"
+"@f. Jika @v tidak valid dan ini berisi sebuah ext2\n"
+"@f (dan bukan swap atau ufs atau sesuatu yang lain), maka @S\n"
+"korup, dan anda mungkin bisa mencoba menjalankan e2fsck secara alternatif "
+"@S:\n"
+" e2fsck -b %S <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Ukuran @f (menurut dari @S) adalah %b @bs\n"
+"Ukuran fisik dari @v adalah %c @bs\n"
+"Kalau nggak @S atau tabel partisi yang mungkin korup!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"@S @b_size = %b, fragsize = %c.\n"
+"Versi e2fsck ini tidak mengimplementasikan untuk ukuran fragment yang "
+"berbeda\n"
+"dari @b.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@S @bs_per_group = %b, seharusnya %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "@S first_data_@b = %b, seharusnya %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f tidak memiliki sebuah UUID; membuat satu.\n"
+"\n"
+
+#: e2fsck/problem.c:167
+#, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Catatan: jika beberapa inode atau blok bitmap blok atau bagian\n"
+"dari tabel inode membutuhkan relokasi, anda mungkin bisa mencoba\n"
+"dengan menjalankan e2fsck dengan pilihan '-b %S' terlebih dahulu. Masalah\n"
+"yang mungkin timbul jika dengan menggunakan blok deskripsi utama, dan\n"
+"blok cadangan grup deskripsi mungkin OK.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Korupsi ditemukan di @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Error menentukan ukuran dari phisik @v: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "@i terhitung dalam @S adalah %i, @s %j.\n"
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd tidak mendukung layanan filetype.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@S memiliki sebuah @n @j (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "External @j memiliki multiple @f dari pengguna (tidak dilayani).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr "Tidak dapat menemukan external @j\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr "External @j memiliki bad @S\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr "External @j tidak melayani ini @f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"@f @j @S memiliki tipe yang tidak diketahui %N (tidak disupport).\n"
+"Ini sangat memungkinkan jika salinan dari e2fsck sudah lama dan/atau tidak "
+"melayani format @j ini.\n"
+"Ini juga mungkin jika @j @S telah terkorupsi.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+msgid "@j @S is corrupt.\n"
+msgstr "@j @S telah terkorupsi.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+#, fuzzy
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "@S tanda has_@j hilang, tetapi @j %s ada.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "@S tanda needs_recovery ada, tetapi tidak memiliki @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "@S tanda need_recovery sudah hilang, tetapi @j memiliki data.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr "Hapus @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "@f memiliki feature flag(s) set, tetapi memiliki sebuah revisi 0 @f."
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, ukuran=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@I %B (%b) ditemukan dalam @o @i %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Sudah dihapus %B (%b) ditemukan dalam @o @i %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@I @o @i %i dalam @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@I @i %i dalam daftar @o @i.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "@j @S memiliki sebuah feature yang tidak diketahui aktif.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"@j @S memiliki sebuah feature yang tidak kompatibel yang tidak diketahui "
+"aktif.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "versi @j tidak disupport oleh e2fsck ini.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Memindahkan @j dari /%s ke tersembunyi @i.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Error memindahkan @j: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Menemukan @n V2 @j @S fields (dari V1 @j).\n"
+"Menghapus field diatas dari V1 @j @S...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr "Jalankan @j bagaimanapun"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"Recovery flag tidak diset dalam backup @S, jadi menjalankan @j "
+"bagaimanapun.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Menyimpan informasi @j @i @b.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"@f tidak memiliki resize_@i aktif, tetapi _reserved_gdt_@bs\n"
+"adalah %N; @s nol. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_@i tidak aktif, tetapi resize @i bukan nol. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+msgid "Resize @i not valid. "
+msgstr "Resize @i tidak valid. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"@S waktu terakhir dipasang (%t,\n"
+"\tsekarang = %T) berada di masa yang akan datang.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"@S waktu terakhir ditulis (%t,\n"
+"\tsekarang = %T) berada di masa yang akan datang.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "@S petunjuk untuk superblok luar @s %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Menambahkan dirhas hint ke @f.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+#, fuzzy
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "@g deskripsi %g checksum tidak valid. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "@g deskripsi %g ditandai unintialisasi tanpa menset feature.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "@g deskripsi %g memiliki inode yang tidak valid terhitung %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr "Terakhir @g @b @B tidak terinitialisasi. "
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Jurnal transaksi %i terkorupsi, balasan dibatalkan.\n"
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Tanda test_fs telah aktif (dan ext4 tersedia). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+#, fuzzy
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"@S waktu pasang terakhir berada di masa yang akan datang.\n"
+"\t(lebih kecil sehari, mungkin karena perangkat jam diset tidak benar) "
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+#, fuzzy
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+"@S waktu tulis terakhir berada dimasa yang akan datang.\n"
+"\t(lebih kecil sehari, mungkin karena perangkat jam diset tidak benar). "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Satu atau lebih @b @g pendeskripsi checksum tidak valid. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Menset jumlah reserved blok ke %lu\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Menset jumlah reserved blok ke %lu\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+#, fuzzy
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Hilang '.' dalam @d @i %i.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+#, fuzzy
+msgid "@S has invalid MMP block. "
+msgstr "Ukuran blok tidak valid - %s"
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr ""
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+#, fuzzy
+msgid "@S MMP @b checksum does not match. "
+msgstr "External @j tidak melayani ini @f\n"
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr ""
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+#, fuzzy
+msgid "External @j @S checksum does not match @S. "
+msgstr "External @j tidak melayani ini @f\n"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+#, fuzzy
+msgid "Invalid %U @q @i %i. "
+msgstr "@u @z @i %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Tahap 1: Memeriksa @i, @bs, dan ukuran\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr "@r bukan sebuah @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+"@r memiliki dtime terset (mungkin karena penggunaan mke2fs versi lama). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Reserved @i %i (%Q) memiliki @n mode. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "@D @i %i memiliki dtime nol. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "@i %i sedang digunakan, tetapi miliki dtime terset. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "@i %i adalah sebuah @z @d. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "@g %g's @b @B di %b @C.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "@g %g's @i @B di %b @C.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "@G %g's @i tabel di %b @C.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "@g %g's @b @B (%b) adalah buruk. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "@g %g's @i @B (%b) adalah buruk. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size adalah %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_@bs adalah %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+msgid "@I %B (%b) in @i %i. "
+msgstr "@I %B (%b) dalam @i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) saling bertumpang tindih @f metadata dalam @i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "@i %i memiliki @b(s) ilegal. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Terlalu banyak ilegal @bs dalam @i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "@I %B (%b) dalam @b @i buruk. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "@b @i buruk memiliki ilegal @b(s). "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Duplikasi atau @b buruk sedang digunakan!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "@b %b buruk yang digunakan sama buruknya dengan @b @i indirect @b. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"@b @i buruk telah terkorupsi. Anda seharusnya berhenti\n"
+"sekarang dan menjalankan e2fsck -c untuk menscan untuk\n"
+"mencari blok buruk dalam @f.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Jika @b adalah sangat buruk, @f tidak dapat dibetulkan.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Anda dapat menghapus @b ini dari daftar @b buruk dan berharap\n"
+"@b benar benar OK. Tetapi tidak garansi untuk hal ini.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "@S (%b) utama berada dalam daftar @b buruk.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Blok %b dalam deskripsi @g utama berada dalam daftar @b buruk\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Peringatan: Grup %g's @S (b) buruk.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+"Peringatan: Grup %g's salinan dari deskripsi @g memiliki sebuah @b (%b) "
+"buruk.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+"Programming error? @b #%b terklaim untuk tidak ada alasan dalam "
+"process_bad_@b.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %N kontinu @b(s) dalam @b @g %g untuk %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A @b buffer untuk relokasi %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Memindahkan @g %g's %s dari %b ke %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Memindahkan @g %g's %s ke %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Peringatan: tidak dapat membaca @b %b dari %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Peringatan: tidak dapat menulis @b %b untuk %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A @i @B (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A @b @B (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A icount link informasi: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A @d @b array: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Error ketika melakukan scanning @is (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Error ketika mengiterasi melalui @bs dalam @i %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Error menyimpan @i count informasi (@i=%i, count=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Error menyimpan @d @b informasi (@i=%i, @b=%b, num=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Error membaca @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "@i %i memiliki flag imagic terset. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Spesial (@v/socket/fifo/symlink) berkas (@i %i) memiliki ketahanan\n"
+"atau append-only flag terset."
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Spesial (@v/socket/fifo) @i %i memiliki ukuran kosong. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+msgid "@j @i is not in use, but contains data. "
+msgstr "@j @i sedang tidak digunakan, tetapi berisi data. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr "@j bukan sebuah file regular. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "@i %i adalah bagian dari daftar @o @i. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+"@i adalah bagian dari orphan terkorupsi yang ditemukan dari linked list. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A refcount structure (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Error membaca @a @b %b untuk @i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+msgid "@i %i has a bad @a @b %b. "
+msgstr "@i %i memiliki sebuah @a @b %b buruk."
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+msgid "Error reading @a @b %b (%m). "
+msgstr "Error membaca @a @b %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "@a @b %b memiliki jumlah referensi %r, @s %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+msgid "Error writing @a @b %b (%m). "
+msgstr "Error menulis @a @b %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "@a @b %b memiliki h_@bs > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+#, fuzzy
+msgid "@A @a region allocation structure. "
+msgstr "struktur @A icount: %m\n"
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "@a @b %b adalah korup (bentrok dalam alokasi). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "@a @b %b adalah korup (@n nama). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "@a @b %b adalah korup (@n value). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr "@i %i terlalu besar. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) menyebabkan @d terlalu besar. "
+
+#: e2fsck/problem.c:854
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) menyebabkan berkas terlalu besar. "
+
+#: e2fsck/problem.c:859
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) menyebabkan symlink terlalu besar. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "@i %i memiliki INDEX_FL flag terset di @f tanpa bantuan htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "@i %i memiliki INDEX_FL flag terset tetapi tidak sebuah @d\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "@h %i memiliki sebuah @n titik root.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %i memiliki sebuah versi hash yang tidak dilayani (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+"@h %i menggunakan sebuah htree yang tidak kompatible di titik root flag.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "@h %i memiliki sebuah kedalaman pohon (%N) yang terlalu besar\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Buruk @b @i memiliki sebuah @b (%b) tidak langsung yang konflik dengan\n"
+"@f metadata. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Resize @i gagal membuat kembali: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "@i %i memiliki sebuah ukuran extra (%IS) yang berisi @n\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "@a dalam @i %i memiliki sebuah panjang nama (%N) yang berisi @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "@a dalam @i %i memiliki nilai ofset (%N) yang berisi @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr ""
+"@a dalam @i %i memiliki sebuah nilai @b (%N) yang berisi @n (seharusnya 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr ""
+"@a dalam @i %i memiliki sebuah nilai yang berukuran (%N) yang berisi @n\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "@a dalam @i %i memiliki sebuah hash (%N) yang berisi @n\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr ""
+"@i %i adalah sebuah %It tetapi sepertinya benar benar sebuah direktori.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Error ketika membaca diatas @x tree dalam @i %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Gagal mengiterasi extens dalam @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i memiliki sebuah extensi @n\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"@i %i memiliki sebuah entensi @n\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "@i %i memiliki EXTENTS_FL tanda set di @f tanpa support extensi.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "@i %i adalah sebuah format extensi, tetapi @S hilang feature EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "@i %i hilang EXTENT_FL, tetapi adalah sebuah format extensi\n"
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Fast symlink %i memiliki EXTENT_FL terset. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i telah tidak teratur extensinya\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "@i %i memiliki sebuah titik ekstensi tidak valid (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Error mengiterasi melalui @d @bs: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+#, fuzzy
+msgid "@q @i is not a regular file. "
+msgstr "@j bukan sebuah file regular. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+#, fuzzy
+msgid "@q @i is not in use, but contains data. "
+msgstr "@j @i sedang tidak digunakan, tetapi berisi data. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+#, fuzzy
+msgid "@q @i is visible to the user. "
+msgstr "@i %i sedang digunakan, tetapi miliki dtime terset. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+#, fuzzy
+msgid "The bad @b @i looks @n. "
+msgstr "<Bad block inode>"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+#, fuzzy
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"@i %i telah tidak teratur extensinya\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, fuzzy, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "@i %i terlalu besar. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, fuzzy, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "@a @b %b adalah korup (bentrok dalam alokasi). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+#, fuzzy
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i telah tidak teratur extensinya\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+#, fuzzy
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i memiliki sebuah extensi @n\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, fuzzy, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "@i %i adalah sebuah format extensi, tetapi @S hilang feature EXTENTS\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "@i %i memiliki INDEX_FL flag terset di @f tanpa bantuan htree.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+#, fuzzy
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "@i %i memiliki sebuah @a @b %b buruk."
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, fuzzy, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "@d @i %i memiliki #%B yang tidak teralokasi. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "@i %i memiliki INDEX_FL flag terset tetapi tidak sebuah @d\n"
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, fuzzy, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Spesial (@v/socket/fifo/symlink) berkas (@i %i) memiliki ketahanan\n"
+"atau append-only flag terset."
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+#, fuzzy
+msgid "@A @x region allocation structure. "
+msgstr "struktur @A icount: %m\n"
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+#, fuzzy
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i memiliki sebuah extensi @n\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, fuzzy, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "@a @b %b adalah korup (@n nama). "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+#, fuzzy
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i memiliki sebuah @a @b %b buruk."
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+#, fuzzy
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "@i %i adalah sebuah format extensi, tetapi @S hilang feature EXTENTS\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Menjalankan tahap tambahan untuk meresolve @bs diklaim oleh lebih dari satu "
+"@i...\n"
+"Tahap 1B: Menscan kembali untuk @m @bs\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@m @b(s) dalam @i %i:"
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Error ketika menscan inodes (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A @i @B (@i_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Error ketika mengiterasi di @bs dalam @i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Error menyesuaikan refcount untuk @a @b %b (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Tahap 1C: Memeriksa direktori untuk @is dengan @m @bs\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Tahap 1D: Membetulkan @m @bs\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Berkas %Q (@i #%i, waktu berubah %IM) \n"
+" memiliki %r @m @b(s), dibagi dengan %N berkas:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i #%i, mod time %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr "\t<@f metadata>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Ada %N @is berisi @m @bs.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@m @bs telah diassign atau dikopi.\n"
+"\n"
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Tidak dapat menyalin file: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+#, fuzzy
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Tahap 3A: Mengoptimasi direktori\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, fuzzy, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Gagal mengoptimasi direktori %q (%d): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+#, fuzzy
+msgid "Optimizing @x trees: "
+msgstr "Mengoptimasi direktori: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Tahap 2: Memeriksa struktur @d\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "@n @i jumlah untuk '.' dalam @d @i %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E memiliki @n @i #: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E memiliki @D/tidak dipakai @i %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr "@E @L ke '.' "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E menunjuk ke @i (%Di) terletak di dalam @b buruk.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E @L ke @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr "@E @L ke @r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E memiliki karakter ilegal dalam namanya.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Hilang '.' dalam @d @i %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Hilang '..' dalam @d @i %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Pertama @e '%Dn' (@i=%Di) dalam @d @i %i (%p) @s '.'\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Kedua @e '%Dn' (@i=%Di) dalam @d @i %i @s '..'\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr @F %IF, @s nol.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s nol.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+#, fuzzy
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_fsize @F %N, @s nol.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N, @s nol.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N, @s nol.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) memiliki mode @n (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@d @i %i, %B, ofset %N: @d terkorupsi\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@d @i %i, %B, ofset %N: nama berkas terlalu panjang\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+msgid "@d @i %i has an unallocated %B. "
+msgstr "@d @i %i memiliki #%B yang tidak teralokasi. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "'.' @d @e dalam @d @i %i tidak terakhiri dengan NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "'..' @d @e dalam @d @i %i tidak terakhiri dengan NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) adalah sebuah karakter @I @v.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) adalah sebuah @I @b @v.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E adalah salinan '.' @e.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E adalah duplikasi dari '..' @e.\n"
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Internal error: tidak dapat mencari dir_info untuk %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E memiliki rec_len dari %Dr, @s %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "struktur @A icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Error mengiterasi melalui @d @bs: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Error membaca @d @b %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Error menulis @d @b %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A baru @d @b untuk @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Error mendealokasikan @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "@d @e untuk '.' dalam %p (%i) besar.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) adalah sebuah @I FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) adalah sebuah @I socket.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Setting filetype untuk @E ke %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr ""
+"@E memiliki sebuah tipe berkas yang tidak benar (sebelumnya %Dt, @s %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr "@E memiliki filetype set.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+msgid "@E has a @z name.\n"
+msgstr "@E memiliki sebuah nama @z.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symlink %Q (@i #%i) adalah @n.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr "@a @b @F @n (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "@f berisi berkas besar, tetapi kurang LARGE_FILE flag dalam @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@p @h %d: %B tidak memiliki referensi\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p @h %d: %B memiliki dua referensi.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p @h %d: %B memiliki min hash buruk\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p @h %d: %B memiliki max has buruk\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+msgid "@n @h %d (%q). "
+msgstr "@n @h %d (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p @h %d (%q): buruk @b nomor %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p @h %d: titik root adalah @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p @h %d: %B memiliki @n batas (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p @h %d: %B memiliki @n jumlah (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p @h %d: %B memiliki sebuah tabel hash yang tidak terurut\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p @h %d: %B memiliki @n kedalaman (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr "Duplikasi @E ditemukan. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E memiliki sebuah nama file yang tidak uniq.\n"
+"Mengubah namanya ke %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Duplikasi @e '%Dn' ditemukan.\n"
+"\t Menandai %p (%i) untuk dibuat kembali.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, @s nol.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Tidak terduga @b dalam @h %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E referensi @i %Di dalam @g %g dimana _INODE_UNINIT telah diset.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+"@E referensi @i %Di ditemukan dalam @g %g's di daerah inode yang tidak "
+"digunakan.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s nol.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, fuzzy, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p @h %d: titik root adalah @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, fuzzy, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p @h %d: titik root adalah @n\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@d @i %i, %B, ofset %N: @d terkorupsi\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Tahap 3: Memeriksa konektivitas @d\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr "@r tidak dialokasikan. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr "Tidak ada ruang dalam @l @d. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Tidak terhubung @d @i %i (%p)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr "/@l tidak ditemukan. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' dalam %Q (%i) adalah %P (%j), @s %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Buruk atau tidak ada /@l. Tidak dapat dihubungkan kembali.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Tidak dapat mengexpan /@l: %m\n"
+
+#: e2fsck/problem.c:1731
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Tidak dapat menghubungkan %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Error ketika mencoba mencari /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b: %m ketika mencoba untuk membuat /@l @d\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: %m ketika mencoba untuk membuat /@l @d\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_@b: %m ketika membuat @d @b baru\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_@b: %m ketika menulis @d @b untuk /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Error ketika menyesuaikan jumlah @i di @i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Tidak dapat membetulkan parent dari @i %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Tidak dapat membetulkan parent dari @i %i: Tidak dapat mencari parent @d @e\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Error membuat root @d (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Error membuat /@l @d (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r bukan sebuah @d: membatalkan.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr "Tidak dapat melanjutkan tanpa sebuah @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l bukan sebuah @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+msgid "/@l is encrypted\n"
+msgstr ""
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Tahap 3A: Mengoptimasi direktori\n"
+
+#: e2fsck/problem.c:1838
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Gagal membuat peng-iterasi dirs_to_hash: %m\n"
+
+#: e2fsck/problem.c:1843
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Gagal mengoptimasi direktori %q (%d): %m\n"
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "Mengoptimasi direktori: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Tahap 4: Memeriksa jumlah referensi\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, c-format
+msgid "@u @z @i %i. "
+msgstr "@u @z @i %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr "@u @i %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "@i %i ref count adalah %Il, @s %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"PERINGATAN: BUG DALAM PEMROGRAMAN E2FSCK!\n"
+"\tATAU SEORANG KERAS KEPALA (ANDA) MEMERIKSA SEBUAH SISTEM BERKAS (HIDUP) "
+"YANG TERPASANG.\n"
+"@i_link_info[%i] adalah %N, @i.i_links_count adalah %Il. Mereka @s adalah "
+"sama!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+#, fuzzy
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "@i %i ref count adalah %Il, @s %N. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Tahap 5: Memeriksa ringkasan informasi @g\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+msgid "Padding at end of @i @B is not set. "
+msgstr "Menambahkan pad diakhir dari @i @B yang tidak terset. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+msgid "Padding at end of @b @B is not set. "
+msgstr "Menambahkan pad di akhir dari @b @B adalah ter set. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr "@b @B perbedaan: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr "@i @B perbedaan: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Kosong @is terhitung salah untuk @g #%g (%i, terhitung=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Direktori terhitung salah untuk @g #%g (%i, terhitung=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Kosong @is terhitung salah (%i, terhitung=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Kosong @bs terhitung salah untuk @g #%g (%b, terhitung=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Kosong @bs terhitung salah (%b, terhitung=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) tidak dapat mencocokan "
+"perhitungan @B titik ujung (%i, %j)\n"
+
+#: e2fsck/problem.c:1989
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Internal error: fudging berakhir dari bitmap (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Error menyalin dalam mengganti @i @B: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Error menyalin dalam mengganti @b @B: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "@g %g @b(s) sedang digunakan tetapi @g tertanda BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "@g %g @i(s) sedang digunakan tetapi @g tertanda INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+msgid "Recreate @j"
+msgstr "Membuat kembali @j"
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, fuzzy, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "ketika sedang menset informasi checksum di grup blok"
+
+#: e2fsck/problem.c:2061
+#, fuzzy, c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Error ketika menghapus extensi: %m\n"
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2071
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Kode error tidak tertangani (0x%x)!\n"
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr "DIABAIKAN"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Memori yang digunakan: %d, waktu yang digunakan: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "ukuran dari inode=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "ketika memulai scan dari inode"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "ketika melakukan pemeriksaan inode"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "ketika memanggil ext2fs_block_iterate untuk inode %d"
+
+#: e2fsck/super.c:249
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "ketika memanggil ext2fs_adjust_ea_refcount untuk inode %d"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Truncating"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Menghapus"
+
+#: e2fsck/unix.c:77
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Penggunaan: %s [-panyrcdfvtDFV] [-b superblok] [-B ukuran blok]\n"
+"\t\t[-I inode_buffer_block] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extendend-options] perangkat\n"
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Pertolongan darurat:\n"
+" -p Otomatis perbaikan (tanpa pertanyaan)\n"
+" -n Tidak membuat perubahan di sistem berkas\n"
+" -y Mengasumsi \"yes\" untuk semua pertanyaan\n"
+" -c Memeriksa blok buruk dan menambahkan hasilnya ke "
+"daftar blok buruk\n"
+" -f Memaksa memeriksa walaupun sistem berkas ditandai "
+"bersih\n"
+
+#: e2fsck/unix.c:88
+#, fuzzy
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Tampilkan pesan pesan\n"
+" -b super blok Gunakan superblok lain\n"
+" -B ukuran blok Paksa menggunakan ukuran blok ketika mencari super "
+"blok\n"
+" -j external_journal Set lokasi dari journal luar\n"
+" -l bad_blok_file Tambahkan ke daftar blok buruk\n"
+" -L bad_blok_file Set daftar blok buruk\n"
+
+#: e2fsck/unix.c:136
+#, fuzzy, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u berkas (%0d.%d%% tidak kontinu), %u/%u blok\n"
+
+#: e2fsck/unix.c:162
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:166
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:171
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:176
+#, fuzzy, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " # dari inodes dengan ind/dind/tind blok: %u/%u/%u\n"
+
+#: e2fsck/unix.c:184
+#, fuzzy
+msgid " Extent depth histogram: "
+msgstr " Kedalaman Extensi histogram: "
+
+#: e2fsck/unix.c:193
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:197
+#, fuzzy, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%u inodes, %u blok\n"
+msgstr[1] "%u inodes, %u blok\n"
+
+#: e2fsck/unix.c:199
+#, fuzzy, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "berkas biasa"
+msgstr[1] "berkas biasa"
+
+#: e2fsck/unix.c:201
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] "berkas biasa"
+msgstr[1] "berkas biasa"
+
+#: e2fsck/unix.c:203
+#, fuzzy, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "direktori"
+msgstr[1] "direktori"
+
+#: e2fsck/unix.c:205
+#, fuzzy, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "karakter device"
+msgstr[1] "karakter device"
+
+#: e2fsck/unix.c:208
+#, fuzzy, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "block device"
+msgstr[1] "block device"
+
+#: e2fsck/unix.c:210
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:214
+#, fuzzy, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "symbolic link"
+msgstr[1] "symbolic link"
+
+#: e2fsck/unix.c:216
+#, fuzzy, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "symbolic link"
+msgstr[1] "symbolic link"
+
+#: e2fsck/unix.c:220
+#, fuzzy, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "socket"
+msgstr[1] "socket"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "ketika sedang menentukan apakah %s sedang dimount."
+
+#: e2fsck/unix.c:258
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Peringatan! %s sedang dimount.\n"
+
+#: e2fsck/unix.c:261
+#, fuzzy, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Peringatan! %s sedang dimount.\n"
+
+#: e2fsck/unix.c:267
+#, fuzzy, c-format
+msgid "%s is mounted.\n"
+msgstr "%s sedang dimount. "
+
+#: e2fsck/unix.c:269
+#, fuzzy, c-format
+msgid "%s is in use.\n"
+msgstr "%s sedang dimount. "
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Tidak dapat melanjutkan, membatalkan.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+#, fuzzy
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"\a\a\a\aPERINGATAN!!! Sistem berkas telah terpasang. Jika anda lanjutkan "
+"anda ***AKAN***\n"
+"bisa menyebabkan kerusakan ***PARAH*** di sistem berkas.\a\a\a\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Apakah anda yakin ingin melanjutkan"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "pemeriksaan dibatalkan.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr " berisi sebuah file system dengan errors"
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr " tidak bersih setelah diunmount."
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr " superblok utama memiliki feature berbeda dari backup"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " telah dimount %u kali tanpa dilakukan pemeriksaan"
+
+#: e2fsck/unix.c:389
+msgid " has filesystem last checked time in the future"
+msgstr ""
+" memiliki sistem berkas yang waktu terakhir diperiksa berada di masa yang "
+"akan datang"
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " telah lewat %u hari tanpa dilakukan pemeriksaan"
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr ", pemeriksaan dipaksakan.\n"
+
+#: e2fsck/unix.c:442
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: bersih, %u/%u berkas, %u/%u blok"
+
+#: e2fsck/unix.c:462
+msgid " (check deferred; on battery)"
+msgstr " (pemeriksaan dibatalkan; power menggunakan batere)"
+
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (pemeriksaan dilakukan setelah mount selanjutnya)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (pemeriksaan dilakukan dalam %ld mounts)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERROR: Tidak dapat membuka /dev/null (%s)\n"
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr "Versi EA tidak valid.\n"
+
+#: e2fsck/unix.c:701
+#, fuzzy
+msgid "Invalid readahead buffer size.\n"
+msgstr "Parameter resize tidak valid: %s\n"
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Pilihan extended tidak diketahui: %s\n"
+
+#: e2fsck/unix.c:758
+#, fuzzy
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Pilihan extended buruk dispesifikasikan: %s\n"
+"\n"
+"Pilihan extended dipisahkan dengan koma, dan boleh membawa argument dimana\n"
+"\tini di set off oleh sebuah tanda sama dengan ('=').\n"
+"\n"
+"Pilihan extended yang valid adalah:\n"
+"\tsuperblock=<nomor superblok>\n"
+"\tblocksize=<besar blok>\n"
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntax error dalam berkas konfigurasi e2fsck (%s, baris #%d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Error memvalidasi berkas deskripsi %d: %s\n"
+
+#: e2fsck/unix.c:860
+msgid "Invalid completion information file descriptor"
+msgstr "Informasi File berkas completion tidak valid"
+
+#: e2fsck/unix.c:875
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+"Hanya salah satu dari pilihan -p/-a, -n atau -y yang boleh dispesifikasikan."
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Pilihan -t tidak dilayani dalam versi e2fsck ini.\n"
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Tidak dapat meresolve '%s'"
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr "Pilihan -n dan -D tidak kompatibel."
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr "Pilihan -n dan -c tidak kompatibel."
+
+#: e2fsck/unix.c:994
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Pilihan -n dan -l/-L tidak kompatibel."
+
+#: e2fsck/unix.c:1018
+#, fuzzy
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Pilihan -n dan -D tidak kompatibel."
+
+#: e2fsck/unix.c:1024
+#, fuzzy
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Pilihan -n dan -D tidak kompatibel."
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+"Pilihan -c dan -l/-L tidak boleh digunakan secara bersamaan dalam satu "
+"waktu.\n"
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG \"%s\" bukan sebuah integer\n"
+"\n"
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Argument bukan numerik tidak valid untuk -%c (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "ketika mensetup superblok"
+
+#: e2fsck/unix.c:1259
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1275
+#, fuzzy
+msgid "while reading MMP block"
+msgstr "ketika sedang membaca inode blok buruk"
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Memaksa menulis sistem berkas yang sudah ada; ini tidak dapat diundo dengan "
+"perintah:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "ketika mencoba untuk menghapus %s"
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\tketika mencoba membuat file jurnal"
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Error: ext2fs versi librari ketinggalan jaman!\n"
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr "ketika mencoba untuk menginisialisasi aplikasi"
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tMenggunakan %s, %s\n"
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr "butuh terminal untuk reparasi interactive"
+
+#: e2fsck/unix.c:1508
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s mencoba membackup blok...\n"
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr "Superblok tidak valid,"
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr "Deskripsi grup terlihat buruk..."
+
+#: e2fsck/unix.c:1521
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s mencoba membackup blok...\n"
+
+#: e2fsck/unix.c:1525
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: kembali ke superblock asli\n"
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Revisi sistem berkas kelihatannya terlalu tinggi untuk versi e2fsck ini.\n"
+"(Atau sistem berkas superblok terkorupsi)\n"
+"\n"
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "Mungkinkan ini sebuah partisi dengan panjang nol?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Anda harus memiliki %s akses ke sistem berkas atau menjadi root\n"
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Mungkin tidak ada atau sebuah perangkat swap?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"Sistem berkas dimount atau dibuka secara exclusively oleh aplikasi lain?\n"
+
+#: e2fsck/unix.c:1575
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "Mungkin tidak ada atau sebuah perangkat swap?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Disk terproteksi untuk ditulis; gunakan pilihan -n untuk melakukan secara "
+"baca-saja\n"
+"dalam memeriksa perangkat.\n"
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr "Dapatkan versi yang lebih baru dari e2fsck!"
+
+#: e2fsck/unix.c:1711
+#, fuzzy, c-format
+msgid "while checking journal for %s"
+msgstr "ketika memeriksa ext3 jurnal untuk %s"
+
+#: e2fsck/unix.c:1714
+#, fuzzy
+msgid "Cannot proceed with file system check"
+msgstr "Tidak dapat melanjutkan tanpa sebuah @r.\n"
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Peringatan: melewatkan recovery jurnal karena sedang melakukan pemeriksaan "
+"di sistem berkas yang baca-saja (read-only).\n"
+
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "tidak dapat menset superblok flag di %s\n"
+
+#: e2fsck/unix.c:1743
+#, fuzzy, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Jurnal superblok tidak ditemukan!\n"
+
+#: e2fsck/unix.c:1747
+#, fuzzy, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Jurnal dihapus\n"
+
+#: e2fsck/unix.c:1751
+#, fuzzy, c-format
+msgid "while recovering journal of %s"
+msgstr "ketika merecovery ext3 jurnal dari %s"
+
+#: e2fsck/unix.c:1773
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s memiliki feature yang tidak disupport:"
+
+#: e2fsck/unix.c:1832
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "ketika sedang membaca inode blok buruk"
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+"Ini bukan pertanda baik, tapi kita akan tetap mencoba untuk meneruskan...\n"
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Membuat jurnal (%d blok): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr " Selesai.\n"
+
+#: e2fsck/unix.c:1887
+#, fuzzy
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** jurnal telah dibuat kembali - sistem berkas sekarang ext3 lagi ***\n"
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr "dibatalkan"
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck dibatalkan.\n"
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Mengulang kembali e2fsck dari awal...\n"
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr "ketika mereset context"
+
+#: e2fsck/unix.c:1985
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FILE SYSTEM TELAH TERMODIFIKASI *****\n"
+
+#: e2fsck/unix.c:1987
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FILE SYSTEM TELAH TERMODIFIKASI *****\n"
+
+#: e2fsck/unix.c:1996
+#, fuzzy, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** REBOOT LINUX *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** PERINGATAN: Sistem berkas masih memiliki errors *********\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "yY"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr ""
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<y>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr "(y/n)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "dibatalkan!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr ""
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "ya\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "tidak\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? tidak\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ya\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "ya"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "tidak"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: ilegal bitmap blok untuk %s"
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr "membaca inode dan blok bitmap"
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "ketika sedang mencoba untuk membaca bitmap untuk %s"
+
+#: e2fsck/util.c:346
+msgid "writing block and inode bitmaps"
+msgstr "menulis blok dan inode bitmaps"
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "ketika mencoba untuk menulis blok dan inode bitmap untuk %s"
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: TERJADI INKONSITENSI YANG TIDAK DIHARAPKAN; JALANKAN fsck SECARA "
+"MANUAL.\n"
+"\t(i.e, tanpa pilihan -a atau -p)\n"
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Memori yang digunakan: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Memori yang digunakan: %lu, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "waktu: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "waktu yang dijalani: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "ketika membaca inode %lu dalam %s"
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "ketika menulis inode %lu dalam %s"
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+#, fuzzy
+msgid "done \n"
+msgstr "selesai \n"
+
+#: misc/badblocks.c:100
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Penggunaan: %s [-b ukuran_blok] [-i berkas_masukan] [-o berkas_keluaran] [-"
+"svwnf]\n"
+" [-c blok_di_sekali] [-p jumlah_tahap] [-e maksimal_blok_buruk] [-d "
+"faktor_delay_antara_baca]\n"
+" [-e pattern_tes] [-t pattern_test [...]]]\n"
+" perangkat [blok_terakhir [blok_pertama]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Pilihan -n dan -w adalah mutually exclusive.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, fuzzy, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% selesai, %s berjalan"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Memeriksa dengan pattern random: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Memeriksa dengan pattern 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "ketika mencari(seek)"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Nilai aneh (%ld) dalam do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "ketika ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "ketika di awal iterasi daftara blok buruk"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Memeriksa blok %lu ke %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Memeriksa blok buruk dalam mode baca-saja (read-only)\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Memeriksa blok buruk (pemeriksaan baca-saja): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Terlalu banyak blok buruk, membatalkan pemeriksaan\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Memeriksa untuk blok buruk dalam mode baca-tulis\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Dari blok %lu ke %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Membaca dan membandingkan: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Memeriksa untuk blok buruk dalal mode tidak-merusak baca-tulis\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Memeriksa untuk blok buruk (pemeriksaan tidak-merusak baca-tulis)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Interupsi tertangkap, membersihkan\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "ketika memerikas data ditulis, blok %lu"
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s sedang dimount; "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "badbloks tetap dipaksakan. Mudah-mudahan /etc/mtab tidak benar\n"
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "ini tidak aman untuk menjalankan badblocks!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s kelihatannya sedang digunakan oleh system; "
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks dipaksakan saja.\n"
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr "tidak valid %s - %s"
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "tidak dapat mengalokasikan memori untuk test_pattern - %s"
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+"Maksimum dari satu test_pattern boleh dispesifikasi dalam mode baca-saja"
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Random test_pattern tidak diperbolehkan dalam mode baca-saja"
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Tidak dapat menentukan ukuran perangkat; anda harus menspesifikasikan\n"
+"ukuran perangkat secara manual\n"
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr "ketika mencoba untuk menentukakn ukuran perangkat"
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr "blok terakhir"
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr "blok pertama"
+
+#: misc/badblocks.c:1233
+#, fuzzy, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "awal blok tidak valid (%lu): harus lebih kecil dari %lu"
+
+#: misc/badblocks.c:1240
+#, fuzzy, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "awal blok tidak valid (%lu): harus lebih kecil dari %lu"
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr "ketika membuat daftar blok buruk dalam memori"
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr "ketika menambahkan daftar blok buruk dalam memori"
+
+#: misc/badblocks.c:1347
+#, fuzzy, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Tahap selesai, %u blok buruk ditemukan.\n"
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr "Penggunaan: %s [-RVf] [-+=AacDdeijsSu] [-v versi] berkas...\n"
+
+#: misc/chattr.c:159
+#, fuzzy, c-format
+msgid "bad project - %s\n"
+msgstr "versi buruk - %s\n"
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versi buruk - %s\n"
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "ketika mencoba untuk melakukan statistik %s"
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr "ketika membaca flags di %s"
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flags dari %s diset sebagai "
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr "ketika menset flags di %s"
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versi dari %s diset sebagai %lu\n"
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr "ketika menset versi di %s"
+
+#: misc/chattr.c:271
+#, fuzzy, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Versi dari %s diset sebagai %lu\n"
+
+#: misc/chattr.c:275
+#, fuzzy, c-format
+msgid "while setting project on %s"
+msgstr "ketika menset versi di %s"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Tidak dapat mengalokasikan variable path di chattr_dir_proc"
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr "= tidak kompatibel dengan - dan +\n"
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr "Harus menggunakan '-v', =, - atau +\n"
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, fuzzy, c-format
+msgid "while reading inode %u"
+msgstr "ketika membaca inode %lu dalam %s"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+#, fuzzy
+msgid "while expanding directory"
+msgstr "ketika mengekspansi /lost+found"
+
+#: misc/create_inode.c:96
+#, fuzzy, c-format
+msgid "while linking \"%s\""
+msgstr "ketika membuka %s"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, fuzzy, c-format
+msgid "while writing inode %u"
+msgstr "ketika menulis inode %lu dalam %s"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, fuzzy, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "ketika mencoba untuk memotong %s"
+
+#: misc/create_inode.c:162
+#, fuzzy, c-format
+msgid "while opening inode %u"
+msgstr "ketika mencoba membuka inode scan"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+#, fuzzy
+msgid "while allocating memory"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, fuzzy, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "ketika membaca flags di %s"
+
+#: misc/create_inode.c:213
+#, fuzzy, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "ketika menulis inode %lu dalam %s"
+
+#: misc/create_inode.c:223
+#, fuzzy, c-format
+msgid "while closing inode %u"
+msgstr "ketika melakukan pemeriksaan inode"
+
+#: misc/create_inode.c:274
+#, fuzzy, c-format
+msgid "while allocating inode \"%s\""
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/create_inode.c:293
+#, fuzzy, c-format
+msgid "while creating inode \"%s\""
+msgstr "ketika membaca inode %lu dalam %s"
+
+#: misc/create_inode.c:359
+#, fuzzy, c-format
+msgid "while creating symlink \"%s\""
+msgstr "ketika membaca flags di %s"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, fuzzy, c-format
+msgid "while looking up \"%s\""
+msgstr "ketika mencari /lost+found"
+
+#: misc/create_inode.c:397
+#, fuzzy, c-format
+msgid "while creating directory \"%s\""
+msgstr "ketika membuat direktori root"
+
+#: misc/create_inode.c:625
+#, fuzzy, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "ketika membuka %s"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:747
+#, fuzzy, c-format
+msgid "while opening directory \"%s\""
+msgstr "ketika membuka %s"
+
+#: misc/create_inode.c:757
+#, fuzzy, c-format
+msgid "while lstat \"%s\""
+msgstr "ketika mencoba untuk melakukan statistik %s"
+
+#: misc/create_inode.c:808
+#, fuzzy, c-format
+msgid "while creating special file \"%s\""
+msgstr "ketika membaca inode %lu dalam %s"
+
+#: misc/create_inode.c:817
+msgid "malloc failed"
+msgstr ""
+
+#: misc/create_inode.c:825
+#, fuzzy, c-format
+msgid "while trying to read link \"%s\""
+msgstr "ketika mencoba untuk mengubah ukuran %s"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:843
+#, fuzzy, c-format
+msgid "while writing symlink\"%s\""
+msgstr "ketika menulis inode %lu dalam %s"
+
+#: misc/create_inode.c:854
+#, fuzzy, c-format
+msgid "while writing file \"%s\""
+msgstr "ketika menulis inode %lu dalam %s"
+
+#: misc/create_inode.c:867
+#, fuzzy, c-format
+msgid "while making dir \"%s\""
+msgstr "ketika membuka %s"
+
+#: misc/create_inode.c:885
+#, fuzzy
+msgid "while changing directory"
+msgstr "membaca direktori block"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:904
+#, fuzzy, c-format
+msgid "while setting inode for \"%s\""
+msgstr "ketika menset versi di %s"
+
+#: misc/create_inode.c:911
+#, fuzzy, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "ketika menset flags di %s"
+
+#: misc/create_inode.c:937
+#, fuzzy
+msgid "while saving inode data"
+msgstr "ketika memulai scan dari inode"
+
+#: misc/dumpe2fs.c:56
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+"Penggunaan: %s [-bfhixV] [-o superblok=<jumlah>] [-o ukuranblok=<besar>] "
+"perangkat\n"
+
+#: misc/dumpe2fs.c:159
+#, fuzzy
+msgid "blocks"
+msgstr "bblock"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grup %lu: (blok "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s superblok di "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Utama"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Cadangan"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Grup deskripsi di "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Reserved GDT blok di "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Grup deskripsi di "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Blok bitmap di "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ""
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+#, fuzzy
+msgid " Inode bitmap at "
+msgstr ", Inode bitmap di "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Inode tabel di "
+
+#: misc/dumpe2fs.c:279
+#, fuzzy, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u blok bebas, %u inode bebas, %u direktori%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u inode yang tidak digunakan\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Blok bebas: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Inode bebas: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "ketika mencetak daftar blok buruk"
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Blok buruk: %u"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr "ketika membaca jurnal inode"
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr "ketika membuka jurnal inode"
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr "ketika membaca super blok jurnal"
+
+#: misc/dumpe2fs.c:392
+#, fuzzy
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Jurnal superblok tidak ditemukan!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "ketikan membaca superblok jurnal"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Tidak dapat mencari nomor magic di jurnal superblok"
+
+#: misc/dumpe2fs.c:468
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/dumpe2fs.c:479
+#, fuzzy, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Memeriksa blok %lu ke %lu\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Tidak dapat mengalokasikan memori untuk memparse pilihan!\n"
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parameter superblok tidak valid: %s\n"
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parameter ukuran-blok tidak valid: %s\n"
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Pilihan extended buruk dispesifikasikan: %s\n"
+"\n"
+"Pilihan extended dipisahkan dengan koma, dan boleh membawa argument dimana\n"
+"\tini di set off oleh sebuah tanda sama dengan ('=').\n"
+"\n"
+"Pilihan extended yang valid adalah:\n"
+"\tsuperblock=<nomor superblok>\n"
+"\tblocksize=<besar blok>\n"
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tMenggunakan %s\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Tidak dapat mencari superblok sistem berkas yang valid.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, fuzzy, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "ketika sedang mencoba untuk membaca bitmap untuk %s"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr "Penggunaan: %s [-rsI] perangkat image_file\n"
+
+#: misc/e2image.c:109
+#, fuzzy, c-format
+msgid " %s -I device image-file\n"
+msgstr "Penggunaan: %s [-rsI] perangkat image_file\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+#, fuzzy
+msgid "while allocating buffer"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/e2image.c:180
+#, fuzzy, c-format
+msgid "Writing block %llu\n"
+msgstr "Memeriksa blok %lu ke %lu\n"
+
+#: misc/e2image.c:194
+#, fuzzy, c-format
+msgid "error writing block %llu"
+msgstr "Error menulis block %lu (%s). "
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr ""
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr "Tidak dapat mengalokasikan buffer header\n"
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr "ketika menulis superblok"
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr "ketika menulis tabel inode"
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr "ketika menulis blok bitmap"
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr "ketika menulis inode bitmap"
+
+#: misc/e2image.c:506
+#, fuzzy, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Direktori block %u (#%d) kosong dalam inode %u\n"
+
+#: misc/e2image.c:518
+#, fuzzy, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Direktori block %u (#%d) kosong dalam inode %u\n"
+
+#: misc/e2image.c:559
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr ""
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr ""
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, fuzzy, c-format
+msgid "error reading block %llu"
+msgstr "Error membaca block %lu (%s). "
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr ""
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:759
+#, fuzzy
+msgid "while allocating l1 table"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/e2image.c:804
+#, fuzzy
+msgid "while allocating l2 cache"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1152
+#, fuzzy
+msgid "while allocating ext2_qcow2_image"
+msgstr "ketika mengalokasikan zeroizing buffer"
+
+#: misc/e2image.c:1159
+#, fuzzy
+msgid "while initializing ext2_qcow2_image"
+msgstr "ketika menginisialisasi jurnal superblok"
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1276
+#, fuzzy
+msgid "while allocating block bitmap"
+msgstr "ketika menulis blok bitmap"
+
+#: misc/e2image.c:1285
+#, fuzzy
+msgid "while allocating scramble block bitmap"
+msgstr "ketika menulis blok bitmap"
+
+#: misc/e2image.c:1292
+#, fuzzy
+msgid "Scanning inodes...\n"
+msgstr "Memeriksa tabel inode"
+
+#: misc/e2image.c:1304
+#, fuzzy
+msgid "Can't allocate block buffer"
+msgstr "Tidak dapat mengalokasikan block buffer (ukuran=%d)\n"
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, fuzzy, c-format
+msgid "while iterating over inode %u"
+msgstr "ketika memperoleh inode berikutnya"
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr ""
+
+#: misc/e2image.c:1411
+#, fuzzy
+msgid "error reading bitmaps"
+msgstr "ketika membaca bitmap"
+
+#: misc/e2image.c:1423
+#, fuzzy
+msgid "while opening device file"
+msgstr "ketika mencoba membuka inode scan"
+
+#: misc/e2image.c:1434
+#, fuzzy
+msgid "while restoring the image table"
+msgstr "ketika menulis tabel inode"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1557
+#, fuzzy
+msgid "checking if mounted"
+msgstr " (pemeriksaan dilakukan dalam %ld mounts)"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr ""
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr ""
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr ""
+
+#: misc/e2image.c:1640
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "@j @S telah terkorupsi.\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: misc/e2image.c:1654
+#, fuzzy
+msgid "The -c option only supported in raw mode\n"
+msgstr "Pilihan -t tidak dilayani dalam versi e2fsck ini.\n"
+
+#: misc/e2image.c:1659
+#, fuzzy
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Pilihan -t tidak dilayani dalam versi e2fsck ini.\n"
+
+#: misc/e2image.c:1666
+#, fuzzy
+msgid "while allocating check_buf"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/e2image.c:1672
+#, fuzzy
+msgid "The -p option only supported in raw mode\n"
+msgstr "Pilihan -t tidak dilayani dalam versi e2fsck ini.\n"
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr ""
+
+#: misc/e2initrd_helper.c:68
+#, fuzzy, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Penggunaan: %s disk\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: tidak dapat membuka %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: tidak dapat mencari superblok\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: error membaca superblok\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: bukan sebuah ext2 sistem berkas\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Peringatan: label terlalu panjang, memotong.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: tidak dapat mencari superblok lagi\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: error menulis superblok\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Penggunaan: e2label perangkat [labelbaru]\n"
+
+#: misc/e2undo.c:124
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr "Penggunaan: %s <berkas transaksi> <sistem berkas>\n"
+
+#: misc/e2undo.c:149
+#, fuzzy
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Sistem berkas waktu mount tidak cocok %u\n"
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:154
+#, fuzzy
+msgid "Last mount time does not match.\n"
+msgstr "Sistem berkas waktu mount tidak cocok %u\n"
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+#, fuzzy
+msgid "while reading filesystem superblock."
+msgstr "ketikan membaca superblok jurnal"
+
+#: misc/e2undo.c:188
+#, fuzzy
+msgid "while fetching superblock"
+msgstr "ketika menulis superblok"
+
+#: misc/e2undo.c:201
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:340
+#, c-format
+msgid "illegal offset - %s"
+msgstr ""
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:373
+#, fuzzy, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "ketika mencoba membuka inode scan"
+
+#: misc/e2undo.c:380
+#, fuzzy
+msgid "while reading undo file"
+msgstr "ketika membaca inode root"
+
+#: misc/e2undo.c:385
+#, fuzzy, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: terlalu banyak perangkat\n"
+
+#: misc/e2undo.c:396
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:403
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr ""
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:412
+#, fuzzy, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "ukuran blok buruk - %s"
+
+#: misc/e2undo.c:425
+#, fuzzy, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+"@j @S memiliki sebuah feature yang tidak kompatibel yang tidak diketahui "
+"aktif.\n"
+
+#: misc/e2undo.c:433
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Error ketika menentukan apakah %s sudah dimount.\n"
+
+#: misc/e2undo.c:439
+#, fuzzy
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+"e2undo seharusnya hanya dijalankan di sistem berkas yang sudah diunmount\n"
+
+#: misc/e2undo.c:455
+#, fuzzy, c-format
+msgid "while opening `%s'"
+msgstr "ketika membuka %s"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:507
+#, fuzzy
+msgid "while reading keys"
+msgstr "ketika membaca bitmap"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:552
+#, fuzzy, c-format
+msgid "%s: block %llu is too long."
+msgstr "Dari blok %lu ke %lu\n"
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, fuzzy, c-format
+msgid "while fetching block %llu."
+msgstr "ketika mencetak daftar blok buruk"
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:615
+#, fuzzy, c-format
+msgid "while writing block %llu."
+msgstr "ketika menulis blok bitmap"
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr ""
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr ""
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "PERINGATAN: tidak dapat membuka %s: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "PERINGATAN: format buruk di bari %d dari %s\n"
+
+#: misc/fsck.c:370
+#, fuzzy
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"\a\a\aPERINGATAN: /etc/fstab anda tidak berisi fsck passno\n"
+"\tpilihan. Saya akan klude around things untuk anda, tetapi anda\n"
+"\tseharusnya membetulkan berkas /etc/fstab anda secepatnya.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: tidak ditemukan\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: tunggu: Tidak ada lagi proses anak?!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Peringatan... %s untuk perangkat %s keluar dengan sinyal %d.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: status adalah %x, seharusnya tidak pernah terjadi.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Berakhir dengan %s (status keluar %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Error %d ketika menjalankan fsck.%s untuk %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Semua atau tidak sama sekali dari tipe sistem berkas dilewatkan melalui "
+"pilihan -t harus diwali\n"
+"dengan 'no' atau '!'.\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Tidak dapat mengalokasikan memori untuk tipe sistem berkas\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+"%s: melewatkan baris buruk di /etc/fstab: bind mount dengan tidak nol fsck "
+"tahap nomor\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: tidak dapat memeriksa %s: fsck.%s tidak ditemukan\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Memeriksa semua filesytem.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--menunggu-- (tahap %d)\n"
+
+#: misc/fsck.c:1085
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Penggunaan: fsck [-AMNPRTV] -C [fd] ] [-t fstype] [fs-pilihan] "
+"[filesys ...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: terlalu banyak perangkat\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: terlalu banyak argumen\n"
+
+#: misc/fuse2fs.c:3739
+msgid "Mounting read-only.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, c-format
+msgid "%s: %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, fuzzy, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+"Tolong jalankan 'e2fsck -f %s' terlebih dahulu.\n"
+"\n"
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3806
+#, fuzzy, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "Mengecilkan ukuran inode yang tidak dilayani\n"
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, fuzzy, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Penggunaan: %s [-RVadlv] [berkas...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Ketika membaca flags di %s"
+
+#: misc/lsattr.c:93
+#, fuzzy, c-format
+msgid "While reading project on %s"
+msgstr "Ketika membaca versi di %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Ketika membaca versi di %s"
+
+#: misc/mke2fs.c:130
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Penggunaan: %s [-c|-l namafile] [-b ukuran-blok] [-f ukuran-fragmen]\n"
+"\t[-i bytes-per-inode] [-I ukuran-inode] [-J pilihan-jurnal]\n"
+"\t[-G ukuran meta grup] [-N jumlah-dari-inode]\n"
+"\t[-m persentasi-reserved-blok] [-o sistem-operasi-pembuat]\n"
+"\t[-g blok-per-grup] [-L label-volume] [-M direktori-terakhir-dipasang]\n"
+"\t[-O fasilitas[,...]] [-r revisi-fs] [-E pilihan-tambahan[,...]]\n"
+"\t[-T type-fs] [-U UUID] [-jnqvFKSV] perangkat [jumlah-blok]\n"
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Menjalankan perintah: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "ketika mencoba untuk menjalankan '%s'"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "ketika memproses daftar dari blok buruk dari aplikasi"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Blok %d dalam daerah deskripsi superblok/grup utama buruk.\n"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"Blok %u sampai %u harus dalam keadaan baik untuk membuat sebuah sistem "
+"berkas.\n"
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "Membatalkan...\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Peringatan: deskripsi superblok/grup cadangan di blok %u berisi\n"
+"\tblok buruk.\n"
+"\n"
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "ketika menandai blok buruk sebagai digunakan"
+
+#: misc/mke2fs.c:368
+#, fuzzy
+msgid "while writing reserved inodes"
+msgstr "ketika menulis inode jurnal"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Menulis tabel inode: "
+
+#: misc/mke2fs.c:442
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Tidak dapat menulis %d blok dalam tabel inode dimulai di %u: %s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "selesai \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "ketika membuat direktori root"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "ketika membaca inode root"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "ketika menset kepemilikan inode root"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "ketika membuat /lost+found"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "ketika mencari /lost+found"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "ketika mengekspansi /lost+found"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "ketika menset inode blok buruk"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Kehabisan memori menghapus sektor %d-%d\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Peringatan: tidak dapat membaca blok 0: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Peringatan: tidak dapat menghapus sektor %d: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "ketika menginisialisasi jurnal superblok"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "Mengosongkan perangkat jurnal: "
+
+#: misc/mke2fs.c:632
+#, fuzzy, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "ketika mengosongkan perangkat jurnal (blok %u, jumlah %d)"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "ketika menulis jurnal superblok"
+
+#: misc/mke2fs.c:665
+#, fuzzy, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Mengubah sistem berkas di %s ke %u (%dk) blok.\n"
+
+#: misc/mke2fs.c:673
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"peringatan: %u blok tidak digunakan.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Sistem berkas label=%s\n"
+
+#: misc/mke2fs.c:681
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "Tipe OS: "
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Ukuran blok=%u (log=%u)\n"
+
+#: misc/mke2fs.c:686
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Ukuran blok=%u (log=%u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Ukuran pecahan=%u (log=%u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u blok, Lebar stripe=%u blok\n"
+
+#: misc/mke2fs.c:694
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inodes, %u blok\n"
+
+#: misc/mke2fs.c:696
+#, fuzzy, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%u blok (%2.2f%%) reserved untuk super user\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Data blok pertama=%u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maksimum blok sistem berkas=%lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grup blok\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grup blok\n"
+
+#: misc/mke2fs.c:711
+#, fuzzy, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blok per grup, %u potongan per grup\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blok per grup, %u potongan per grup\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inode per grup\n"
+
+#: misc/mke2fs.c:725
+#, fuzzy, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Sistem berkas label=%s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Cadangan superblok disimpan di blok: "
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:839
+#, fuzzy, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Ukuran inode baru tidak valid: %s\n"
+
+#: misc/mke2fs.c:853
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Ukuran inode baru tidak valid: %s\n"
+
+#: misc/mke2fs.c:865
+#, fuzzy, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Ukuran inode baru tidak valid: %s\n"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "pilihan mount tidak valid diset: %s\n"
+
+#: misc/mke2fs.c:896
+#, fuzzy, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Parameter superblok tidak valid: %s\n"
+
+#: misc/mke2fs.c:918
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Parameter stride tidak valid: %s\n"
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parameter stripe-width tidak valid: %s\n"
+
+#: misc/mke2fs.c:956
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Parameter resize tidak valid: %s\n"
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Resize maksimum harus lebih besar daripada ukuran sistem berkas.\n"
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "On-line resizing tidak dilayani dengan sistem berkas revisi 0\n"
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, fuzzy, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "pilihan mount tidak valid diset: %s\n"
+
+#: misc/mke2fs.c:1065
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Pilihan buruk dispesifikasikan: %s\n"
+"\n"
+"Pilihan extended dipisahkan dengan koma, dan boleh menggunakan argumen yang\n"
+"\tdi set off oleh tanda sama dengan ('=').\n"
+"\n"
+"Pilihan extended yang valid adalah:\n"
+"\tstride=<RAID per-disk data chunk dalam blok>\n"
+"\tstripe-width=<RAID stride * data disk dalam blok>\n"
+"\tresize=<resize ukuran maksimum dalam blok>\n"
+"\tlazy_itable_init=<0 untuk menonaktifkan, 1 untuk mengaktifkan>\n"
+"\ttest_fs\n"
+"\n"
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Peringatan: RAID stripe-width %u bukan sebuah even multiple dari stride %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntax error dalam mke2fs berkas konfigurasi (%s, baris #%d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Pilihan sistem berkas tidak valid diset: %s\n"
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "pilihan mount tidak valid diset: %s\n"
+
+#: misc/mke2fs.c:1296
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Peringatan! Berkas mke2fs.conf anda tidak mendefinisikan tipe sistem berkas "
+"%s.\n"
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Anda mungkin butuh untuk memasang sebuah update dari berkas mke2fs.conf.\n"
+"\n"
+
+#: misc/mke2fs.c:1304
+#, fuzzy
+msgid "Aborting...\n"
+msgstr "Membatalkan...\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1527
+#, fuzzy
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Tidak dapat mengalokasikan memori untuk nama berkas tdb\n"
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1597
+#, c-format
+msgid "invalid block size - %s"
+msgstr "Ukuran blok tidak valid - %s"
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Peringatan: ukuranblok %d tidak berguna dalam kebanyakan system.\n"
+
+#: misc/mke2fs.c:1617
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "Ukuran blok tidak valid - %s"
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "perilaku error buruk - %s"
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr "Jumlah ilegal untuk blok per grup"
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr "blok per grup harus kelipatan dari 8"
+
+#: misc/mke2fs.c:1669
+msgid "Illegal number for flex_bg size"
+msgstr "Jumlah ilegal untuk ukuran flex_bg"
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr "ukuran flex_bg harus kelipatan dari 2"
+
+#: misc/mke2fs.c:1680
+#, fuzzy, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "ukuran flex_bg harus kelipatan dari 2"
+
+#: misc/mke2fs.c:1690
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "rasio dari inode tidak valid %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1700
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ukuran inode tidak valid - %s"
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr "dalam malloc untuk bad_block_filename"
+
+#: misc/mke2fs.c:1733
+#, fuzzy, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Peringatan: label terlalu panjang, memotong.\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "persentasi reserved blok tidak valid - %s"
+
+#: misc/mke2fs.c:1757
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "jumlah inode buruk - %s"
+
+#: misc/mke2fs.c:1770
+#, fuzzy
+msgid "while allocating fs_feature string"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/mke2fs.c:1787
+#, c-format
+msgid "bad revision level - %s"
+msgstr "level revisi buruk - %s"
+
+#: misc/mke2fs.c:1792
+#, fuzzy, c-format
+msgid "while trying to create revision %d"
+msgstr ""
+"\n"
+"\tketika mencoba untuk membuat jurnal"
+
+#: misc/mke2fs.c:1806
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o hanya boleh dispesifikasikan sekali"
+
+#: misc/mke2fs.c:1814
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o hanya boleh dispesifikasikan sekali"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "ketika mencoba membuka perangkat jurnal %s\n"
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"Perangkat jurnal ukuranblok (%d) lebih kecil daripada minimum ukuranblok %d\n"
+
+#: misc/mke2fs.c:1882
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Menggunakan perangkat jurnal ukuranblok: %d\n"
+
+#: misc/mke2fs.c:1893
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "jumlah blok tidak valid - %s"
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "sistem berkas"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "ketika mencoba untuk menentukan ukuran sistem berkas"
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Tidak dapat menentukan ukuran perangkat; anda harus menspesifikasikan\n"
+"ukuran dari sistem berkas\n"
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Ukuran perangkat yang dilaporkan nol. Partisi yang dispesifikasikan tidak "
+"valid, atau\n"
+"\ttabel partisi tidak dibaca kembali setelah menjalankan fdisk, karena\n"
+"\tpartisi yang diubah sedang sibuk dan sedang digunakan. Anda bisa melakukan "
+"reboot\n"
+"\tuntuk membaca kembali tabel partisi.\n"
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr "Sistem berkas lebih besar dari ukuran perangkat yang terlihat."
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr "Gagal untuk memparse daftar type fs\n"
+
+#: misc/mke2fs.c:2040
+#, fuzzy
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Hurd tidak mendukung layanan filetype.\n"
+
+#: misc/mke2fs.c:2045
+#, fuzzy
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Hurd tidak mendukung layanan filetype.\n"
+
+#: misc/mke2fs.c:2050
+#, fuzzy
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "Hurd tidak mendukung layanan filetype.\n"
+
+#: misc/mke2fs.c:2055
+#, fuzzy
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Hurd tidak mendukung layanan filetype.\n"
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr "ketika mencoba untuk menentukan ukuran sektor perangkat"
+
+#: misc/mke2fs.c:2071
+msgid "while trying to determine physical sector size"
+msgstr "ketika mencoba untuk menentukan ukuran fisik sektor"
+
+#: misc/mke2fs.c:2103
+msgid "while setting blocksize; too small for device\n"
+msgstr ""
+"ketika sedang melakukan konfigurasi ukuran blok;terlalu kecil untuk "
+"perangkat\n"
+
+#: misc/mke2fs.c:2108
+#, fuzzy, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+"Peringatan: ukuran blok yang dispesifikasikan %d lebih kecil daripada ukuran "
+"fisik sektor perangkat %d, tetap dilanjutkan\n"
+
+#: misc/mke2fs.c:2132
+#, fuzzy, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Ukuran dari perangkat %s terlalu besar untuk diexpresikan dalam 32 bit\n"
+"\tmenggunakan sebuah ukuranblok dari %d.\n"
+
+#: misc/mke2fs.c:2144
+#, fuzzy, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Ukuran dari perangkat %s terlalu besar untuk diexpresikan dalam 32 bit\n"
+"\tmenggunakan sebuah ukuranblok dari %d.\n"
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types untuk mke2fs.conf resolution: "
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Sistem berkas features tidak dilayani dengan sistem berkas revisi 0\n"
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Sparse superblok tidak dilayani dengan sistem berkas revisi 0\n"
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Jurnal tidak dilayani dengan sistem berkas revisi 0\n"
+
+#: misc/mke2fs.c:2204
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "persentasi reserved blok tidak valid - %s"
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2241
+#, fuzzy
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Resize maksimum harus lebih besar daripada ukuran sistem berkas.\n"
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "Peringatan: Tidak dapat mendapatkan geometri untuk perangkat %s\n"
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "%s penyesuaian ofset sebesar %lu bytes.\n"
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+"Ini mungkin akan berujung ke performa yang tidak baik, disarankan untuk "
+"melakukan pembagian ulang.\n"
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d-byte bloks terlalu besar untuk system (maksimal %d)"
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Peringatan: %d-byte blok terlalu besar untuk system (maksimal %d), dipaksa "
+"untuk melanjutkan\n"
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"resize_inode dan meta_bg feature tidak saling kompatibel.\n"
+"Meraka tidak dapat diaktifkan secara bersamaan.\n"
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "reserved online resize blok tidak dilayani di non-sparse sistem berkas"
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr "jumlah blok per grup diluar jangkauan"
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+"Flex_bg feature tidak diaktifkan, jadi ukuran flex_bw mungkin tidak dapat "
+"dispesifikasikan"
+
+#: misc/mke2fs.c:2467
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ukuran inode tidak valid %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "terlalu banyak inode (%llu), naikkan rasio inode?"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "terlalu banyak inode (%llu), spesifikasikan < 2³2 inode"
+
+#: misc/mke2fs.c:2518
+#, fuzzy, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"inode_size (%u) * inode_count (%u) terlalu besar untuk sebuah\n"
+"\tsistem berkas dengan %lu blok, spesifikan lebih tinggi inode_ratio (-i)\n"
+"\tatau lebih rendah jumlah inode (-N).\n"
+
+#: misc/mke2fs.c:2705
+#, fuzzy
+msgid "Discarding device blocks: "
+msgstr "Menggunakan perangkat jurnal ukuranblok: %d\n"
+
+#: misc/mke2fs.c:2721
+#, fuzzy
+msgid "failed - "
+msgstr "gagal.\n"
+
+#: misc/mke2fs.c:2780
+#, fuzzy
+msgid "while initializing quota context"
+msgstr "ketika menginisialisasi jurnal superblok"
+
+#: misc/mke2fs.c:2787
+#, fuzzy
+msgid "while writing quota inodes"
+msgstr "ketika menulis inode jurnal"
+
+#: misc/mke2fs.c:2812
+#, fuzzy, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "perilaku error buruk - %s"
+
+#: misc/mke2fs.c:2888
+#, fuzzy
+msgid "in malloc for android_sparse_params"
+msgstr "dalam malloc untuk bad_block_filename"
+
+#: misc/mke2fs.c:2902
+msgid "while setting up superblock"
+msgstr "ketika mensetup superblok"
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2933
+#, fuzzy
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Hurd tidak mendukung layanan filetype.\n"
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "os tidak diketahui - %s"
+
+#: misc/mke2fs.c:3119
+#, fuzzy
+msgid "Allocating group tables: "
+msgstr "Menulis tabel inode: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr "ketika mencoba mengalokasikan tabel sistem berkas"
+
+#: misc/mke2fs.c:3136
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "ketika menulis blok bitmap"
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3183
+#, fuzzy, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "ketika mengkosongkan blok %u di akhir dari sistem berkas"
+
+#: misc/mke2fs.c:3196
+msgid "while reserving blocks for online resize"
+msgstr "ketika menreserve blok untuk online resize"
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr "jurnal"
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Menambahkan jurnal ke perangkat %s: "
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tketika mencoba untuk menambahkan jurnal ke perangkat %s"
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "selesai\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Melewatkan pembuatan jurnal dalam mode super-saja\n"
+
+#: misc/mke2fs.c:3248
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Membuat jurnal (%u blok): "
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tketika mencoba untuk membuat jurnal"
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3290
+msgid "Copying files into the device: "
+msgstr ""
+
+#: misc/mke2fs.c:3296
+#, fuzzy
+msgid "while populating file system"
+msgstr "ketika mengkosongkan blok %u di akhir dari sistem berkas"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Menulis superblok dan informasi akuntasi sistem berkas: "
+
+#: misc/mke2fs.c:3310
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "ketika mengkosongkan blok %u di akhir dari sistem berkas"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"selesai\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, fuzzy, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "ketika mengkosongkan blok %u di akhir dari sistem berkas"
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:582
+#, fuzzy, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Membuat jurnal (%u blok): "
+
+#: misc/mk_hugefiles.c:584
+#, c-format
+msgid "with %llu blocks each"
+msgstr ""
+
+#: misc/mk_hugefiles.c:593
+#, fuzzy, c-format
+msgid "while creating huge file %lu"
+msgstr "ketika membuat direktori root"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Penggunaan: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Penggunaan: %s perangkat...\n"
+"\n"
+"Tampilkan informasi partisi untuk setiap perangkat yang diberikan.\n"
+"Contoh: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "tidak dapat membuka %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Tidak dapat memperoleh geometry dari %s; %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Tidak dapat memperoleh ukuran dari %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d awal=%8d ukuran=%8lu akhir=%6d\n"
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+#, fuzzy
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Tolong jalankan e2fsck untuk sistem berkas.\n"
+
+#: misc/tune2fs.c:123
+#, fuzzy
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Tolong jalankan e2fsck untuk sistem berkas.\n"
+
+#: misc/tune2fs.c:136
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Penggunaan: %s [-c jumlah_max_mount] [-e errors_behavior] [-g grup]\n"
+"\t[-t interval[d|m|w]] [-j] [-J pilihan_jurnal] [-l]\n"
+"\t[-m persentasi_reserved_blok] [-o [^]pilihan_mount[,...]] \n"
+"\t[-r jumlah_reserved_blok] [-u pengguna] [-C jumlah_mount] [-L "
+"label_volume]\n"
+"\t[-E pilihan-tambahan[,...]] [-T waktu_terakhir_diperiksa] [-U UUID]\n"
+"\t[-I ukuran_inode_baru] perangkat\n"
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "Jurnal superblok tidak ditemukan!\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "ketika mencoba membuka jurnal external"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s bukan sebuah perangkat jurnal.\n"
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Sistem berkas UUID tidak ditemukan dalam perangkat jurnal.\n"
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr "Jurnal dihapus\n"
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr "ketika menghapus inode jurnal"
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr "ketika menulis inode jurnal"
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr "(dan reboot setelah ini!)\n"
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:483
+#, fuzzy, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr ""
+"Tolong jalankan 'e2fsck -f %s' terlebih dahulu.\n"
+"\n"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Menghapus feature sistem berkas '%s' tidak dilayani.\n"
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Tatanan fitur sistem berkas '%s' tidak dilayani.\n"
+
+#: misc/tune2fs.c:1138
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Has_journal feature mungkin hanya bisa dihapus ketika sistem berkas sedang\n"
+"dimount baca-saja atau tidak dimount.\n"
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Needs_recovery flag diset. Tolong jalankan e2fsck sebelum menghapus\n"
+"has_journal flag.\n"
+
+#: misc/tune2fs.c:1164
+#, fuzzy
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Pengubahan ukuran inode tidak didukung untuk sistem berkas dengan flex_bg\n"
+"fitur aktif.\n"
+
+#: misc/tune2fs.c:1177
+#, fuzzy
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Huge_file feature hanya boleh dihapus ketika sistem berkas sedang\n"
+"dimount baca-saja atau tidak dimount.\n"
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1212
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1226
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "ketika sedang membaca inode blok buruk"
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Menghapus flex_bg flag akan mengakibatkan sistem berkas menjadi\n"
+"tidak konsisten.\n"
+
+#: misc/tune2fs.c:1269
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Huge_file feature hanya boleh dihapus ketika sistem berkas sedang\n"
+"dimount baca-saja atau tidak dimount.\n"
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1323
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1465
+#, fuzzy
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Pengubahan ukuran inode tidak didukung untuk sistem berkas dengan flex_bg\n"
+"fitur aktif.\n"
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1489
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr "Sistem berkas telah memiliki sebuah jurnal.\n"
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tketika mencoba untuk membuka jurnal di %s\n"
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Membuat jurnal di perangkat %s: "
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "ketika menambahkan sistem berkas di jurnal di %s"
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Membuat jurnal inode: "
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tketika mencoba membuat file jurnal"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+#, fuzzy
+msgid "while initializing quota context in support library"
+msgstr "ketika menginisialisasi jurnal superblok"
+
+#: misc/tune2fs.c:1649
+#, fuzzy, c-format
+msgid "while updating quota limits (%d)"
+msgstr "ketika memperbarui inode bad block"
+
+#: misc/tune2fs.c:1657
+#, fuzzy, c-format
+msgid "while writing quota file (%d)"
+msgstr "ketika menulis tabel inode"
+
+#: misc/tune2fs.c:1675
+#, fuzzy, c-format
+msgid "while removing quota file (%d)"
+msgstr "ketika membaca inode root"
+
+#: misc/tune2fs.c:1718
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Tidak dapat memparse date/time specifier: %s"
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "jumlah mount buruk - %s"
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nama gid/grup buruk - %s"
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr "interval buruk - %s"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "rasio reserved blok buruk - %s"
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr "-o hanya boleh dispesifikasikan sekali"
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr "-O hanya boleh dispesifikasikan sekali"
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "jumlah reserved blok buruk - %s"
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nama uid/pengguna buruk - %s"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "bad inode size - %s"
+msgstr "ukuran inode buruk - %s"
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Ukuran inode harus kelipatan dari dua - %s"
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2115
+#, fuzzy, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Menset maksimal jumlah mount ke %d\n"
+msgstr[1] "Menset maksimal jumlah mount ke %d\n"
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Invalid RAID stride: %s\n"
+
+#: misc/tune2fs.c:2153
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Invalid RAID stripe-width: %s\n"
+
+#: misc/tune2fs.c:2168
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algoritma hash tidak valid: %s\n"
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Menset default algoritma hash ke %s (%d)\n"
+
+#: misc/tune2fs.c:2193
+#, fuzzy
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+"\n"
+"Pilihan buruk dispesifikasikan.\n"
+"\n"
+"Pilihan extended dipisahkan oleh koma, dan boleh mengambil argumen\n"
+"\tyang di set of oleh sebuah tanda sama dengan ('=').\n"
+"\n"
+"Pilihan extended yang valid adalah:\n"
+"\tstride=<RAID per-disk ukuran chunk dalam blok>\n"
+"\tstripe-width=<RAID stride*data disk dalam blok>\n"
+"\thash_alg=<algoritma_hash>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:2663
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:2668
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "membaca inode dan blok bitmap"
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr "blok akan dipindahkan"
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+"Gagal untuk mengalokasikan bitmap blok ketika meningkatkan ukuran inode\n"
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr "Tidak cukup ruang untuk meningkatkan ukuran inode \n"
+
+#: misc/tune2fs.c:2699
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Gagal untuk memindahkan blok ketika pengubahan ukuran inode \n"
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Error dalam mengubah ukuran dari ukuran inode.\n"
+"Jalankan e2undo untuk undo perubahan sistem berkas.\n"
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2955
+#, fuzzy
+msgid "Cannot modify a journal device.\n"
+msgstr "%s bukan sebuah perangkat jurnal.\n"
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Ukuran inode telah %lu\n"
+
+#: misc/tune2fs.c:2975
+#, fuzzy
+msgid "Shrinking inode size is not supported\n"
+msgstr "Mengecilkan ukuran inode yang tidak dilayani\n"
+
+#: misc/tune2fs.c:2980
+#, fuzzy, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "ukuran inode tidak valid %d (min %d/max %d)"
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3045
+#, fuzzy, c-format
+msgid "Recovering journal.\n"
+msgstr "%s: merecovery journal\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Menset maksimal jumlah mount ke %d\n"
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Menset jumlah mount sekarang ke %d\n"
+
+#: misc/tune2fs.c:3074
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Menset perilaku error ke %d\n"
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Menset gid reserved blok ke %lu\n"
+
+#: misc/tune2fs.c:3084
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Menset interval diantara check ke %lu detik\n"
+
+#: misc/tune2fs.c:3091
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Menset interval diantara check ke %lu detik\n"
+
+#: misc/tune2fs.c:3098
+#, fuzzy, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Menset persentasi reserved blok ke %g%% (%u blok)\n"
+
+#: misc/tune2fs.c:3104
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "jumlah reserved blok terlalu besar (%lu)"
+
+#: misc/tune2fs.c:3111
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Menset jumlah reserved blok ke %lu\n"
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Sistem berkas telah memiliki sparse superblok.\n"
+
+#: misc/tune2fs.c:3119
+#, fuzzy
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Pengubahan ukuran inode tidak didukung untuk sistem berkas dengan flex_bg\n"
+"fitur aktif.\n"
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Sparse superblok flag diset. %s"
+
+#: misc/tune2fs.c:3134
+#, fuzzy
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Menghapus sparse superflag tidak dilayani.\n"
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Menset waktu sistem berkas terakhir diperiksa ke %s\n"
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Menset uid reserved blok ke %lu\n"
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3198
+#, fuzzy
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Ukuran inode mungkin akan berubah ketika sistem berkas tidak dimount.\n"
+
+#: misc/tune2fs.c:3222
+#, fuzzy
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Ukuran inode mungkin akan berubah ketika sistem berkas tidak dimount.\n"
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr "Invalid format UUID\n"
+
+#: misc/tune2fs.c:3275
+#, fuzzy
+msgid "Need to update journal superblock.\n"
+msgstr "membaca journal superblock\n"
+
+#: misc/tune2fs.c:3301
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Ukuran inode mungkin akan berubah ketika sistem berkas tidak dimount.\n"
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Pengubahan ukuran inode tidak didukung untuk sistem berkas dengan flex_bg\n"
+"fitur aktif.\n"
+
+#: misc/tune2fs.c:3326
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Menset ukuran inode %lu\n"
+
+#: misc/tune2fs.c:3330
+#, fuzzy
+msgid "Failed to change inode size\n"
+msgstr "Gagal untuk memindahkan blok ketika pengubahan ukuran inode \n"
+
+#: misc/tune2fs.c:3344
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Menset ukuran stride ke %d\n"
+
+#: misc/tune2fs.c:3349
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Menset lebar stripe ke %d\n"
+
+#: misc/tune2fs.c:3356
+#, fuzzy, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Menset jumlah mount sekarang ke %d\n"
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr ""
+
+#: misc/util.c:104
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr ""
+
+#: misc/util.c:108
+#, fuzzy
+msgid "Proceed anyway? (y,N) "
+msgstr "Jalankan saja? (y,n) "
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs dipaksakan saja. Mudah mudahan /etc/mtab tidak benar.\n"
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "tidak akan membuat sebuah %s disini!\n"
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs dipaksakan saja.\n"
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Tidak dapat mengalokasikan memori untuk memparse pilihan jurnal!\n"
+
+#: misc/util.c:186
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Tidak dapat menemukan perangkat jurnal yang cocok %s\n"
+
+#: misc/util.c:213
+#, fuzzy
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Pilihan jurnal buruk dispesifikasikan.\n"
+"\n"
+"Pilihan jurnal dipisahkan dengan koma, dan boleh menggunakan argumen yang\n"
+"\tdiset off dengan sebuah tanda sama dengan ('=').\n"
+"\n"
+"Pilihan jurnal valid adalah:\n"
+"\tsize=<ukuran jurnal dalam megabytes>\n"
+"\tdevice=<perangkat jurnal>\n"
+"\n"
+"Ukuran jurnal harus diantara 1024 dan 10240000 blok sistem berkas.\n"
+"\n"
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Sistem berkas terlalu kecil untuk sebuah jurnal\n"
+
+#: misc/util.c:251
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Ukuran jurnal yang diminta adalah %d blok; ini harus berada\n"
+"diantara 1024 dan 10240000 blok. Membatalkan.\n"
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Ukuran jurnal terlalu besar untuk sistem berkas.\n"
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Sistem berkas ini akan secara otomatis diperiksa setiap %d mounts atau\n"
+"%g hari, yang mana yang datang lebih dulu. Gunakan tune2fs -c atau -i\n"
+"untuk mengubahnya.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:155
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: terlalu banyak argumen\n"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+#, fuzzy
+msgid "bad response length"
+msgstr "Panjang stride tidak valid"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:279
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Tidak dapat memparse date/time specifier: %s"
+
+#: misc/uuidd.c:308
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Tidak dapat menghubungkan %i: %m\n"
+
+#: misc/uuidd.c:316
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Tidak dapat menghubungkan %i: %m\n"
+
+#: misc/uuidd.c:354
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Error membaca @i %i: %m\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:433
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "Versi EA tidak valid.\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Error membuat /@l @d (%s): %m\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Penggunaan: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "# Extent dump:\n"
+
+#: resize/extent.c:203
+#, fuzzy, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNum=%d, Ukuran=%d, Cursor=%d, Sorted=%d\n"
+
+#: resize/main.c:49
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Penggunaan: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] perangkat "
+"[ukuran_baru]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Memperbesar tabel inode"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Memindahkan blok"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Memeriksa tabel inode"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Memperbarui referensi inode"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Memindahkan tabel inode"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Tahap tidak diketahui?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Awal tahap %d (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr "ketika membuka %s"
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "ketika memperoleh informasi statistik untuk %s"
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Tolong jalankan 'e2fsck -f %s' terlebih dahulu.\n"
+"\n"
+
+#: resize/main.c:470
+#, fuzzy, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Estimasi minimum dari ukuran sistem berkas: %u\n"
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ukuran inode baru tidak valid: %s\n"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:534
+#, fuzzy, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Ukuran baru lebih kecil daripada minimum (%u)\n"
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr "Panjang stride tidak valid"
+
+#: resize/main.c:564
+#, fuzzy, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Partisi (atau perangkat) hanya berisi %u (%dk) blok.\n"
+"Anda meminta ukuran baru %u blok.\n"
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+
+#: resize/main.c:581
+#, fuzzy, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+"Ukuran inode mungkin akan berubah ketika sistem berkas tidak dimount.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+
+#: resize/main.c:593
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Sistem berkas telah memiliki panjang %u blok. Tidak ada yang harus "
+"dilakukan !\n"
+"\n"
+
+#: resize/main.c:600
+#, fuzzy, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Sistem berkas telah memiliki sebuah jurnal.\n"
+
+#: resize/main.c:605
+#, fuzzy, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Sistem berkas telah memiliki sebuah jurnal.\n"
+
+#: resize/main.c:613
+#, fuzzy, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Menset waktu sistem berkas terakhir diperiksa ke %s\n"
+
+#: resize/main.c:615
+#, fuzzy, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Menset waktu sistem berkas terakhir diperiksa ke %s\n"
+
+#: resize/main.c:617
+#, fuzzy, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Mengubah sistem berkas di %s ke %u (%dk) blok.\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "ketika mencoba untuk mengubah ukuran %s"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Mohon jalankan 'e2fsck -fy %s' untuk membetulkan sistem berkas\n"
+"setelah pembatalan operasi pengubahan ukuran.\n"
+
+#: resize/main.c:635
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Sistem berkas di %s sekarang memiliki panjang %u blok.\n"
+"\n"
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "ketika mencoba untuk memotong %s"
+
+#: resize/online.c:81
+#, fuzzy
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "Kernel tidak melayani online resizing"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "Sistem berkas di %s dimount di %s; on-line resizing dibutuhkan\n"
+
+#: resize/online.c:90
+#, fuzzy
+msgid "On-line shrinking not supported"
+msgstr "On-line shrinking dari %u ke %u tidak dilayani.\n"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Sistem berkas tidak melayani online resizing"
+
+#: resize/online.c:122
+#, fuzzy
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "ketika menreserve blok untuk online resize"
+
+#: resize/online.c:129
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Kernel tidak melayani online resizing"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "ketika mencoba membuka mountpoint %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Ijin ditolak ketika mengubah ukuran sistem berkas"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Ketika memeriksa untuk layanan on-line resizing"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Kernel tidak melayani online resizing"
+
+#: resize/online.c:220
+#, fuzzy, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Menjalankan sebuah on-line resize dari %s ke %u (%dk) blok.\n"
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr "Ketika mencoba untuk mengexten grup terakhir"
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Ketika mencoba untuk menambahkan grup #%d"
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+"Sistem berkas di %s dimount di %s, dan on-line resizing tidak disupport di "
+"system ini.\n"
+
+#: resize/resize2fs.c:759
+#, fuzzy, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "inode (%llu) harus lebih kecil dari %u"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "reserved blok"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr "meta-data blok"
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+#, fuzzy
+msgid "new meta blocks"
+msgstr "meta-data blok"
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Seharusnya tidak pernah terjadi: resize inode corrupt!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.44.4"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:30
+#, fuzzy
+msgid "Bad magic number in super-block"
+msgstr "membaca journal superblock\n"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:33
+#, fuzzy
+msgid "Can't read group descriptors"
+msgstr ", Grup deskripsi di "
+
+#: lib/ext2fs/ext2_err.c:34
+#, fuzzy
+msgid "Can't write group descriptors"
+msgstr ", Grup deskripsi di "
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:38
+#, fuzzy
+msgid "Can't write an inode bitmap"
+msgstr "menulis inode bitmap"
+
+#: lib/ext2fs/ext2_err.c:39
+#, fuzzy
+msgid "Can't read an inode bitmap"
+msgstr "menulis inode bitmap"
+
+#: lib/ext2fs/ext2_err.c:40
+#, fuzzy
+msgid "Can't write a block bitmap"
+msgstr "membaca inode dan blok bitmap"
+
+#: lib/ext2fs/ext2_err.c:41
+#, fuzzy
+msgid "Can't read a block bitmap"
+msgstr "membaca inode dan blok bitmap"
+
+#: lib/ext2fs/ext2_err.c:42
+#, fuzzy
+msgid "Can't write an inode table"
+msgstr "ketika menulis tabel inode"
+
+#: lib/ext2fs/ext2_err.c:43
+#, fuzzy
+msgid "Can't read an inode table"
+msgstr "Memeriksa tabel inode"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:45
+#, fuzzy
+msgid "Filesystem has unexpected block size"
+msgstr "Sistem berkas lebih besar dari ukuran perangkat yang terlihat."
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:50
+#, fuzzy
+msgid "Inode bitmap not loaded"
+msgstr ", Inode bitmap di "
+
+#: lib/ext2fs/ext2_err.c:51
+#, fuzzy
+msgid "Block bitmap not loaded"
+msgstr " Blok bitmap di "
+
+#: lib/ext2fs/ext2_err.c:52
+#, fuzzy
+msgid "Illegal inode number"
+msgstr "Nomor dari block tidak legal!\n"
+
+#: lib/ext2fs/ext2_err.c:53
+#, fuzzy
+msgid "Illegal block number"
+msgstr "Nomor dari block tidak legal!\n"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:55
+#, fuzzy
+msgid "Not enough space to build proposed filesystem"
+msgstr "Tidak cukup ruang untuk meningkatkan ukuran inode \n"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+#, fuzzy
+msgid "Illegal indirect block found"
+msgstr "blok tidak langsung berdua"
+
+#: lib/ext2fs/ext2_err.c:65
+#, fuzzy
+msgid "Illegal doubly indirect block found"
+msgstr "blok tidak langsung berdua"
+
+#: lib/ext2fs/ext2_err.c:66
+#, fuzzy
+msgid "Illegal triply indirect block found"
+msgstr "blok tidak langsung bertiga"
+
+#: lib/ext2fs/ext2_err.c:67
+#, fuzzy
+msgid "Block bitmaps are not the same"
+msgstr " Blok bitmap di "
+
+#: lib/ext2fs/ext2_err.c:68
+#, fuzzy
+msgid "Inode bitmaps are not the same"
+msgstr ", Inode bitmap di "
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:78
+#, fuzzy
+msgid "Filesystem has unsupported feature(s)"
+msgstr "%s memiliki feature yang tidak disupport:"
+
+#: lib/ext2fs/ext2_err.c:79
+#, fuzzy
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "%s memiliki feature yang tidak disupport:"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:81
+#, fuzzy
+msgid "Memory allocation failed"
+msgstr "Aerror mengalokasikan"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:83
+#, fuzzy
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Tidak dapat mengalokasikan memori untuk tipe sistem berkas\n"
+
+#: lib/ext2fs/ext2_err.c:84
+#, fuzzy
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Tidak dapat mengalokasikan memori untuk tipe sistem berkas\n"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:89
+#, fuzzy
+msgid "Ext2 directory block not found"
+msgstr "Direktori block %u (#%d) kosong dalam inode %u\n"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:94
+#, fuzzy
+msgid "Supplied journal device not a block device"
+msgstr "Menggunakan perangkat jurnal ukuranblok: %d\n"
+
+#: lib/ext2fs/ext2_err.c:95
+#, fuzzy
+msgid "Journal superblock not found"
+msgstr "Jurnal superblok tidak ditemukan!\n"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:98
+#, fuzzy
+msgid "Error loading external journal"
+msgstr "ketika mencoba membuka jurnal external"
+
+#: lib/ext2fs/ext2_err.c:99
+#, fuzzy
+msgid "Journal not found"
+msgstr "Jurnal superblok tidak ditemukan!\n"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:101
+#, fuzzy
+msgid "Illegal extended attribute block number"
+msgstr "aextended attribute"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:104
+#, fuzzy
+msgid "Too many reserved group descriptor blocks"
+msgstr "<inode deskripsi grup>"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:106
+#, fuzzy
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+"Gagal untuk mengalokasikan bitmap blok ketika meningkatkan ukuran inode\n"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:114
+#, fuzzy
+msgid "TDB: Invalid parameter"
+msgstr "Parameter stride tidak valid: %s\n"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:135
+#, fuzzy
+msgid "No 'next' extent"
+msgstr "xextent"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:143
+#, fuzzy
+msgid "Extent not found"
+msgstr "/@l tidak ditemukan. "
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:156
+#, fuzzy
+msgid "Block group descriptor size incorrect"
+msgstr "<inode deskripsi grup>"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:163
+#, fuzzy
+msgid "Superblock checksum does not match superblock"
+msgstr "Cadangan superblok disimpan di blok: "
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:165
+#, fuzzy
+msgid "MMP block checksum does not match"
+msgstr "Cadangan superblok disimpan di blok: "
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:173
+#, fuzzy
+msgid "Extended attribute key not found"
+msgstr "aextended attribute"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:184
+#, fuzzy
+msgid "Wrong undo file for this filesystem"
+msgstr "Ijin ditolak ketika mengubah ukuran sistem berkas"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+#, fuzzy
+msgid "The journal superblock is corrupt"
+msgstr "membaca journal superblock\n"
+
+#: lib/ext2fs/ext2_err.c:188
+#, fuzzy
+msgid "Inode is corrupted"
+msgstr "@j @S telah terkorupsi.\n"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: lib/support/prof_err.c:13
+#, fuzzy
+msgid "Profile section not found"
+msgstr "ketika membuat /lost+found"
+
+#: lib/support/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "ketika membuat /lost+found"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "Pilihan sistem berkas tidak valid diset: %s\n"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: lib/support/prof_err.c:37
+#, fuzzy
+msgid "Couldn't open profile file"
+msgstr "Tidak dapat menyalin file: %m\n"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: lib/support/prof_err.c:40
+#, fuzzy
+msgid "Invalid integer value"
+msgstr "Panjang stride tidak valid"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#: lib/support/plausible.c:118
+#, fuzzy, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "jumlah mount buruk - %s"
+
+#: lib/support/plausible.c:121
+#, fuzzy, c-format
+msgid "\tlast mounted on %s"
+msgstr "jumlah mount buruk - %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr ""
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr ""
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr ""
+
+#: lib/support/plausible.c:199
+#, fuzzy, c-format
+msgid "Creating regular file %s\n"
+msgstr "berkas biasa"
+
+#: lib/support/plausible.c:202
+#, fuzzy, c-format
+msgid "Could not open %s: %s\n"
+msgstr "tidak dapat membuka %s: %s"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Perangkat kelihatannya tidak ada; apakah anda menspesifikasikannya dengan "
+"benar?\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s bukan sebuah perangkat blok spesial.\n"
+
+#: lib/support/plausible.c:249
+#, fuzzy, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr " berisi sebuah file system dengan errors"
+
+#: lib/support/plausible.c:252
+#, fuzzy, c-format
+msgid "%s contains a %s file system\n"
+msgstr " berisi sebuah file system dengan errors"
+
+#: lib/support/plausible.c:276
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr ""
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: error membaca bitmaps: %s\n"
+
+#, fuzzy
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Peringatan, memiliki masalah menulis diluar superblok."
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "i_dir_acl @F %Id, @s nol.\n"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<ACL index inode>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<ACL data inode>"
+
+#~ msgid "@g %g @b @B uninitialized but @i @B in use.\n"
+#~ msgstr "@g %g @b @B tidak terinitialisasi tetapi @i @B sedang digunakan.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "@i %i memiliki @cion flag terset pada @f tanpa layanan @cion. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "@A @a @b %b. "
+
+#~ msgid "@i %i should not have EOFBLOCKS_FL set (size %Is, lblk %r)\n"
+#~ msgstr "@i %i seharusnya EOFBLOCKS_FL tidak aktif (ukuran %Is, lblk %r)\n"
+
+#~ msgid "Warning: compression support is experimental.\n"
+#~ msgstr "Peringatan: support untuk kompresi adalah experimental.\n"
+
+#~ msgid ""
+#~ "E2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "E2fsck tidak dikompilasi dengan layanan HTREE,\n"
+#~ "\t tetapi sistem berkas %s memiliki direktori HTREE.\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "Tidak dapat menentukan ukuran jurnal"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "Menghapus tanda ekstensi yang tidak didukung di %s"
+
+#~ msgid " Checksum 0x%04x, unused inodes %d\n"
+#~ msgstr " Checksum 0x%04x, inode yang tidak digunakan %d\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Fasilitas jurnal: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Ukuran jurnal: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Panjang jurnal: %u\n"
+#~ "Urutan jurnal: 0x%08x\n"
+#~ "Awal dari jurnal: %u\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Ukuran blok jurnal: %u\n"
+#~ "Panjang jurnal: %u\n"
+#~ "Blok pertama jurnal: %u\n"
+#~ "Urutan jurnal: 0x%08x\n"
+#~ "Awal dari jurnal: %u\n"
+#~ "Jumlah pengguna dari jurnal: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "Pengguna jurnal: %s\n"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "menulis pendek (hanya %d bytes) untuk menulis header image"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Gagal membaca data filesystem \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "Gagal tdb_fetch %s\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "Sistem berkas UUID tidak cocok \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "Gagal tdb_open %s\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "Gagal membuka %s\n"
+
+#~ msgid "Replayed transaction of size %zd at location %ld\n"
+#~ msgstr "Balasan ukuran transaksi %zd di lokasi %ld\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Gagal menulis %s\n"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "ukuran potongan/fragmen tidak valid - %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Peringatan: fragment tidak dilayani. Mengabaikan pilihan -f\n"
+
+#~ msgid "Calling BLKDISCARD from %llu to %llu "
+#~ msgstr "Memanggil BLKDISCARD dari %llu ke %llu "
+
+#~ msgid "succeeded.\n"
+#~ msgstr "berhasil.\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "Jurnal TIDAK dihapus\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Untuk mengembalikan operasi tune2fs mohon jalankan perintah\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "Tidak dapat melakukan statistik %s --- %s\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s adalah seluruh perangkatm bukan hanya sebuah partisi!\n"
+
+#~ msgid "#\t\t %u -> %u (%d)\n"
+#~ msgstr "#\t\t %u -> %u (%d)\n"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s: Kombinasi dari flex_bg dan\n"
+#~ "\t!resize_inode features tidak dilayani oleh resize2fs.\n"
+
+#~ msgid "Setting sistem berkas feature '%s' not supported.\n"
+#~ msgstr "Menset sistem berkas feature '%s' tidak dilayani.\n"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr "@S tidak memiliki @j tanda, tetapi memiliki ext3 @j %s.\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "Membuat kembali jurnal untuk membuat sistem berkas ext3 lagi?\n"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "ketika sedang mencoba untuk menulis blok bitmap untuk %s"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s gagal untuk %s: %s\n"
+
+#~ msgid "open"
+#~ msgstr "buka"
+
+#~ msgid "HDIO_GETGEO ioctl"
+#~ msgstr "HDIO_GETGEO ioctl"
+
+#~ msgid "BLKGETSIZE ioctl"
+#~ msgstr "BLKGETSIZE ioctl"
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 0000000..b26de01
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/it.gmo b/po/it.gmo
new file mode 100644
index 0000000..9ae9bde
--- /dev/null
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..5a9ef2a
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,8589 @@
+# Italian translation for e2fsprogs
+# Copyright (C) 2004, 2013 2014 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Andrea Spadaccini <lupin85@email.it>, 2004
+# Marco Colombo <m.colombo@ed.ac.uk>, 2004
+# Milo Casagrande <milo@milo.name>, 2013.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs-1.42.10\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2014-05-31 16:09+0100\n"
+"Last-Translator: Milo Casagrande <milo@milo.name>\n"
+"Language-Team: Italian <tp@lists.linux.it>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"X-Generator: Poedit 1.6.5\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Blocco non valido %u fuori dall'intervallo; ignorato.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "nel controllare l'integrità degli inode dei blocchi danneggiati"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "nel leggere gli inode dei blocchi danneggiati"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "nell'aprire %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "nell'eseguire popen su \"%s\""
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "nel leggere l'elenco di blocchi danneggiati da file"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "nell'aggiornare l'inode di un blocco danneggiato"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr ""
+"Attenzione: blocco %u non valido trovato nell'inode di un blocco "
+"danneggiato. Azzerato.\n"
+
+#: e2fsck/dirinfo.c:331
+#, fuzzy
+msgid "while freeing dir_info tdb file"
+msgstr "creando l'inode root"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Errore nel leggere il blocco %lu (%s) mentre %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Errore nel leggere il blocco %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignora l'errore"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Forza la riscrittura"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Errore nello scrivere il blocco %lu (%s) mentre %s."
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Errore nello scrivere il blocco %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "blocchi directory vuoti"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "mappa directory vuota"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Blocco directory %u (#%d) vuoto nell'inode %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s nomefile nblocchi dim_blocco\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Numero di blocchi non valido.\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Impossibile allocare il buffer blocco (dimensione=%d)\n"
+
+#: e2fsck/extents.c:42
+#, fuzzy
+msgid "extent rebuild inode map"
+msgstr "mappa degli inode dei file regolari"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Uso: %s disco\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "Ioctl BLKFLSBUF non supportata: impossibile svuotare i buffer.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Uso: %s [-F] [-I blocchi_buffer_inode] device\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "nell'aprire %s per lo svuotamento"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "nel tentare lo svuotamento di %s"
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr "nel tentare di aprire \"%s\""
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr "nell'avviare l'analisi degli inode"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr "nel recuperare l'inode successivo"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u inode analizzati.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "lettura del superblocco del journal\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: non è stato trovato un superblocco valido del journal\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journal troppo corto\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: ripristino del journal\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: impossibile ripritinare il journal in modalità sola lettura\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "nel tentare di riaprire %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aattributo esteso"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aerrore nell'allocare"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblocco"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccomprimi"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cva in conflitto con altri blocchi nel file system"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "ddirectory"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Deliminato"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eelemento"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e \"%Dn\" in %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "ffile system"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fper l'@i %i (%Q) è"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggruppo"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "h@i della @d HTREE"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iillegale"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lè un collegamento"
+
+#: e2fsck/message.c:135
+#, fuzzy
+msgid "mmultiply-claimed"
+msgstr "mappa degli inode richiesta più volte"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nnon valido"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oorfano"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblema in"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qquota"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "r@i root"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sdovrebbe essere"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper-@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "unon collegato"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vdevice"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zlunghezza-zero"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<Inode NULL>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Inode dei blocchi danneggiati>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<Inode della quota utente>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<Inode della quota del gruppo>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Inode del boot loader>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Inode della directory undelete>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Inode del descrittore di gruppo>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<Inode del journal>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Inode riservato 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Inode riservato 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "file regolare"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "ddirectory"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "device a caratteri"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "device a blocchi"
+
+#: e2fsck/message.c:335
+#, fuzzy
+msgid "named pipe"
+msgstr "pipe con nome"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "collegamento simbolico"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tipo di file sconosciuto con modalità 0%o"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "blocco indiretto"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "blocco doppio indiretto"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "blocco triplo indiretto"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "blocco traduttore"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "blocco n° "
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr ""
+
+#: e2fsck/message.c:485
+#, fuzzy
+msgid "group"
+msgstr "ggruppo"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+#, fuzzy
+msgid "unknown quota type"
+msgstr "SO sconosciuto - %s"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mappa degli inode richiesta più volte"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "errore interno: impossibile trovare dup_blk per %llu\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "ritornato da clone_file_block"
+
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "Errore interno: impossibile trovare il blocco EA per %llu"
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Errore interno: impossibile trovare l'inode EA per %u"
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr "lettura blocco directory"
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr "mappa degli inode in uso"
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr "mappa degli inode delle directory"
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr "mappa degli inode dei file regolari"
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr "mappa dei blocchi in uso"
+
+#: e2fsck/pass1.c:1262
+#, fuzzy
+msgid "metadata block map"
+msgstr "blocchi di meta-dati"
+
+#: e2fsck/pass1.c:1324
+msgid "opening inode scan"
+msgstr "inizio analisi inode"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr "recupero inode successivo dall'analisi"
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "Passo 1"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr "mappa degli inode non valida"
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr "inode nella mappa dei blocchi danneggiati"
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr "mappa degli inode imagic"
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr "mappa dei blocchi richiesta più volte"
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr "bitmap del blocco"
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr "bitmap dell'inode"
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr "tabella dell'inode"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "Passo 2"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "Impossibile continuare."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr ""
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Memoria di picco"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Passo 3"
+
+#: e2fsck/pass3.c:344
+#, fuzzy
+msgid "inode loop detection bitmap"
+msgstr "mappa dei bit del ciclo di rilevamento inode"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "Passo 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Passo 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(nessun prompt)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Correggi"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Azzera"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Ricolloca"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Alloca"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Espandi"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Collega a /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Crea"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Recupera"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Tronca"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Azzera inode"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Annulla"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Dividi"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Continua"
+
+#: e2fsck/problem.c:65
+#, fuzzy
+msgid "Clone multiply-claimed blocks"
+msgstr "mappa dei blocchi richiesta più volte"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Elimina file"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Sopprimi messaggi"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Scollega"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Azzera l'indice HTree"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Ricrea"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(NESSUNO)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "CORRETTO"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "AZZERATO"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "RICOLLOCATO"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ALLOCATO"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ESPANSO"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "RICOLLEGATO"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "CREATO"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "RECUPERATO"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "TRONCATO"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INODE AZZERATO"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "INTERROTTO"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "DIVISO"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "CONTINUA"
+
+#: e2fsck/problem.c:93
+#, fuzzy
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "CLONATI BLOCCHI DUPLICATI/NON VALIDI"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "FILE ELIMINATO"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "SOPPRESSO"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "SCOLLEGATO"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "INDICE HTREE AZZERATO"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "RICREERÀ"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@B del @b per il @g %g non è in @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@B dell'@i per il @g %g non è in @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"La tavola degli @i per il @g %g non è in @g. (@b %b)\n"
+"ATTENZIONE: SONO POSSIBILI NOTEVOLI PERDITE DI DATI.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+#, fuzzy
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Il @S è illeggibile, o non descrive un corretto @f ext2\n"
+"Se il @v è valido e contiene realmente un @f ext2\n"
+"(e non swap, ufs o altro), allora il @S è corrotto, e si potrebbe\n"
+"provare ad eseguire e2fsck con un @S alternativo:\n"
+" e2fsck -b %S <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"La dimensione del @f (secondo il @S) è %b @b(i)\n"
+"La dimensione fisica del @v è %c @b(i)\n"
+"È probabile che il @S o la tavola delle partizioni siano corrotti!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"Dimensione del @b del @S = %b, dimensione frammento = %c.\n"
+"Questa versione di e2fsck non supporta dimensioni di frammento\n"
+"differenti dalla dimensione del @b.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@S @b(i)_per_gruppo = %b, avrebbe dovuto essere %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+#, fuzzy
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "Primo @b contenente dati del @S = %b, avrebbe dovuto essere %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"il @f non aveva un UUID; generazione di un UUID.\n"
+"\n"
+
+#: e2fsck/problem.c:167
+#, fuzzy, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Nota: se molte mappe dei bit degli inode o dei blocchi\n"
+"richiedono il rilocamento, o una parte della tavola degli\n"
+"inode deve essere spostata, si può prima provare ad eseguire\n"
+"e2fsck con l'opzione '-b %S'. Il problema potrebbe risiedere\n"
+"nel descrittore di gruppo dei blocchi primario, ed il descrittore\n"
+"di gruppo dei blocchi potrebbe essere OK.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Trovata corruzione nel @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Errore determinando la dimensione del @v fisico: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+#, fuzzy
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "Il numero di @i in @S è %i, dovrebbe essere %j.\n"
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Il kernel Hurd non supporta la caratteristica filetype.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, fuzzy, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Il @S ha un @j ext3 non valido (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Il @j esterno ha diversi utenti del @f (non supportato).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr "Impossibile trovare il @j esterno\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr "Il @j esterno ha un @S non valido\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr "Il @j esterno non supporta questo @f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+#, fuzzy
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Il @S del @j ext3 è del tipo sconosciuto %N (non supportato).\n"
+"E' probabile che questa copia di e2fsck sia vecchia e/o non supporti questo "
+"formato di @j.\n"
+"E' anche possibile che il @S del @j sia corrotto.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+#, fuzzy
+msgid "@j @S is corrupt.\n"
+msgstr "Il @S del @j ext3 è corrotto.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+#, fuzzy
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "Il @S ha il flag ext3 needs_recovery impostato, ma non ha @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+#, fuzzy
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Il @S ha il flag ext3 needs_recovery impostato, ma non ha @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+#, fuzzy
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "flag del recupero ext3 pulito, ma il @j contiene ancora dati.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr "Azzerare @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr ""
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s @o @i %i (uid=%Iu, gid=%Ig, modalità=%Im, dimensione=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+#, fuzzy
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@b @I #%B (%b) trovato in un @i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+#, fuzzy
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Già azzerato il @b #%B (%b) trovato in un @i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@i @o @I %i nel @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@i @I %i nella lista degli @i @o.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+#, fuzzy
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+"Il @S del @j ext3 ha impostato il flag a sola lettura di una caratteristica "
+"sconosciuta.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+#, fuzzy
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"Il @S del @j ext3 ha impostato il flag di una caratteristica non "
+"compatibile.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Versione del @j non supportata da questo e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, fuzzy, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Spostamento di @j da /%s all'inode nascosto.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Errore spostando @j: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+#, fuzzy
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Trovati dei campi V2 del @S del @j non validi (dal journal V1).\n"
+"Pulitura dei campi al di là del @S del @j V1...\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr "Eseguire @j comunque"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "Flag di recupero non impostato nel @S di backup, eseguo @j comunque.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Esecuzione del backup dell'informazione @j @i @b.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr ""
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+#, fuzzy
+msgid "Resize @i not valid. "
+msgstr "L'@r non è una @d. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr ""
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr ""
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr ""
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Impostazione del numero di blocchi riservati a %lu\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Impostazione del numero di blocchi riservati a %lu\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+#, fuzzy
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "'.' mancante nell'@i %i della @d.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+msgid "@S has invalid MMP block. "
+msgstr ""
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr ""
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+#, fuzzy
+msgid "@S MMP @b checksum does not match. "
+msgstr "Il checksum del blocco MMP non corrisponde al blocco MMP"
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr ""
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+#, fuzzy
+msgid "External @j @S checksum does not match @S. "
+msgstr "Il checksum del super-blocco non corrisponde al super-blocco"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+#, fuzzy
+msgid "Invalid %U @q @i %i. "
+msgstr "@i @o @I %i nel @S.\n"
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Passo 1: Controllo di @i, @b(i) e dimensioni\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr "L'@r non è una @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+"L'@r ha il dtime impostato (probabilmente a causa di un vecchio mke2fs)."
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+#, fuzzy
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "L'@i riservato %i %Q ha una modalità errata. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "L'@i @D %i ha dtime zero. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, fuzzy, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "L'@i %i è in uso, ma ha il dtime impostato. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "L'@i %i è una @d a @z. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "La @B dei @b(i) del @g %g a %b @C.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "La @B degli @i del @g %g a %b @C.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "La tavola degli @i del @g %g a %b @C.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "La @B dei @b(i) del @g %g (%b) non è valida. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "La @B degli @i del @g %g (%b) non è valida. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size è %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+#, fuzzy
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_blocks è %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+#, fuzzy
+msgid "@I %B (%b) in @i %i. "
+msgstr "@b @I #%B (%b) nell'@i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "L'@i %i ha @b(i) illegali. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Troppi @b(i) illegali in @i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+#, fuzzy
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "@b @I #%B (%b) nell'@i del @b non valido. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+#, fuzzy
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "L'@i del @b non valido ha @b(i) illegali. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr "@b duplicato o non valido in uso!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+#, fuzzy
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Il @b %b usa come @i del @b non valido un @b indiretto. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"L'@i del @b non valido è stato probabilmente corrotto. E' consigliabile\n"
+"fermarsi ora ed eseguire e2fsck -c per cercare blocchi non validi\n"
+"nel @f.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Se il @b è molto corrotto, il @f non può essere riparato.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+#, fuzzy
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"E' possibile eliminare questo @b (e sperare il meglio) dalla\n"
+"lista dei @b(i) non validi, e sperare che sia davvero a posto, ma\n"
+"non ci sono garanzie.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Il @S primario (%b) è nella listi dei @b(i) non validi.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+"Il blocco %b nei descrittori primari del @g è nella lista dei @b(i) non "
+"validi\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Attenzione: Il @S (%b) del gruppo %g non è valido.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+#, fuzzy
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+"Attenzione: La copia dei descrittori di @g del gruppo %g ha un @b (%b) non "
+"valido.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+"Errore di programmazione? @b #%b reclamato senza ragione in process_bad_@b.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+#, fuzzy
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %N @b(i) contigui nel @g di @b %g per %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A il buffer @b per la rilocazione di %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Rilocazione del %s del @g %g da %b a %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, fuzzy, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Rilocazione del %s del @g %g in %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Attenzione: impossibile leggere @b %b di %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Attenzione: impossibile scrivere @b %b per %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A la @B dell'@i (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+#, fuzzy
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A la @B dell'@i (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, fuzzy, c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A le informazioni del collegamento icount: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, fuzzy, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A l'array dei @b di @d: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Errore analizzando @is (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Errore scorrendo i @b(i) nell'@i %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+"Errore salvando le informazioni sul numero di @i (@i=%i, numero=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+#, fuzzy
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+"Errore salvando le informazioni sui @b(i) di @d (@i=%i, @b=%b, num=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Errore durante la lettura dell'@i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "L'@i %i ha il flag imagic impostato. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Un file (@i %i) speciale (@v/socket/fifo/symlink) ha il flag\n"
+"immutable o append-only impostato. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, fuzzy, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+"Un file (@i %i) speciale (@v/socket/fifo/symlink) ha il flag\n"
+"immutable o append-only impostato. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+#, fuzzy
+msgid "@j @i is not in use, but contains data. "
+msgstr "L'@i %i è in uso, ma ha il dtime impostato. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr "Il @j non è un file regolare. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, fuzzy, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "L'@i %i faceva parte della lista degli @i orfani. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+#, fuzzy
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+"trovati @i che facevano parte di una lista di orfani corrotti collegati. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+#, fuzzy
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A la struttura icount: %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+#, fuzzy
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Errore leggendo l'@a di @b %b per l'@i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+#, fuzzy
+msgid "@i %i has a bad @a @b %b. "
+msgstr "L'@i %i ha un @a di @b %b non valido. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+#, fuzzy
+msgid "Error reading @a @b %b (%m). "
+msgstr "Errore leggendo l'@a di @b %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+#, fuzzy
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "L'@a di @b %b è contato come %b, dovrebbe essere %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+#, fuzzy
+msgid "Error writing @a @b %b (%m). "
+msgstr "Errore scrivendo l'@a @b %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+#, fuzzy
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "L'@a @b %b ha il valore h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+#, fuzzy
+msgid "@A @a region allocation structure. "
+msgstr "@A la struttura icount: %m\n"
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+#, fuzzy
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "L'@a di @b %b è corrotto (collisione di allocazione). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+#, fuzzy
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "L'@a di @b %b è corrotto (nome non valido). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+#, fuzzy
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "L'@a di @b %b è corrotto (valore non valido). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr "L'@i %i è troppo grande. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+#, fuzzy
+msgid "%B (%b) causes @d to be too big. "
+msgstr "Il @b #%B (%b) fa diventare il @d troppo grande. "
+
+#: e2fsck/problem.c:854
+#, fuzzy
+msgid "%B (%b) causes file to be too big. "
+msgstr "Il @b #%B (%b) fa diventare il file troppo grande. "
+
+#: e2fsck/problem.c:859
+#, fuzzy
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "Il @b #%B (%b) fa diventare il link simbolico troppo grande. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+"L'@i %i ga il flag INDEX_FL impostato nel @f senza il supporto htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "L'@i %i ha il flag INDEX_FL impostato, ma non è un @d.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, fuzzy, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "L'@h %i ha un nodo root non valido.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "L'@h %i ha una versione dell'hash non supportata (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "L'@h %i usa un flag di nodo htree di root non compatibile.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"L'@i del @b non valido ha un @b indiretto (%b) che entra in\n"
+"conflitto con il metadata del @f. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr ""
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+#, fuzzy
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+#, fuzzy
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+#, fuzzy
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+#, fuzzy
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+#, fuzzy
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+#, fuzzy
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr ""
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, fuzzy, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Errore scorrendo i @b(i) nell'@i %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, fuzzy, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+"L'@i %i ga il flag INDEX_FL impostato nel @f senza il supporto htree.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr ""
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+#, fuzzy
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "L'@h %i ha un nodo root non valido.\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Errore scorrendo i @b(i) delle @d: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+#, fuzzy
+msgid "@q @i is not a regular file. "
+msgstr "Il @j non è un file regolare. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+#, fuzzy
+msgid "@q @i is not in use, but contains data. "
+msgstr "L'@i %i è in uso, ma ha il dtime impostato. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+#, fuzzy
+msgid "@q @i is visible to the user. "
+msgstr "L'@i %i è in uso, ma ha il dtime impostato. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+#, fuzzy
+msgid "The bad @b @i looks @n. "
+msgstr "<Inode numero 1>"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, fuzzy, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "L'@i %i è troppo grande. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, fuzzy, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "L'@a di @b %b è corrotto (collisione di allocazione). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+"L'@i %i ga il flag INDEX_FL impostato nel @f senza il supporto htree.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+#, fuzzy
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "L'@i %i ha un @a di @b %b non valido. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, fuzzy, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "L'@i %i della @d ha un @b (#%B) non allocato. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "L'@i %i ha il flag INDEX_FL impostato, ma non è un @d.\n"
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, fuzzy, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Un file (@i %i) speciale (@v/socket/fifo/symlink) ha il flag\n"
+"immutable o append-only impostato. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+#, fuzzy
+msgid "@A @x region allocation structure. "
+msgstr "@A la struttura icount: %m\n"
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, fuzzy, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "L'@a di @b %b è corrotto (nome non valido). "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+#, fuzzy
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "L'@i %i ha un @a di @b %b non valido. "
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, fuzzy, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b @I #%B (%b) nell'@i %i. "
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Errore analizzando gli inode (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, fuzzy, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A la @B degli @i (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Errore scorrendo i @b(i) nell'@i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+#, fuzzy
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+"Errore sistemando il conteggio dei riferimenti per il @b @a %b (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+#, fuzzy
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+"Passo 1C: Analisi delle directory relativa agli @i con @b(i) duplicati.\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+#, fuzzy
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Passo 1D: Riconciliamento del @b(i) duplicati\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+#, fuzzy
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Il file %Q (@i #%i, ultima modifica %IM) \n"
+" ha %b @b(i) duplicati, condivisi con %N file:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i #%i, ultima modifica %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr "\t<metadata del @f>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+#, fuzzy
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Ci sono %n @i contenenti @b(i) duplicato/non valido(i).)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+#, fuzzy
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@b(i) duplicati già riassegnati o clonati.\n"
+"\n"
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Impossibile clonare il file: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+#, fuzzy
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Passo 3A: Ottimizzazione delle directory\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, fuzzy, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Impossibile ottimizzare la directory %q (%d): %m"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+#, fuzzy
+msgid "Optimizing @x trees: "
+msgstr "Ottimizzazione delle directory: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Passo 2: Analisi della struttura delle @d\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, fuzzy, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Numero di @i non valido per '.' nell'@i @d %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+#, fuzzy
+msgid "@E has @n @i #: %Di.\n"
+msgstr "L'@E ha un @i non valido #: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+#, fuzzy
+msgid "@E has @D/unused @i %Di. "
+msgstr "L'@E ha @i non utilizzato/@D %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr "L'@E @L a '.' "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "L'@E punta all'@i (%Di), posizionato in un @b non valido.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "L'@E @L alla @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr "L'@E @L all'@r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr "L'@E ha caratteri non validi nel suo nome.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "'.' mancante nell'@i %i della @d.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "'..' mancante nell'@i %i della @d.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+#, fuzzy
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Il primo @e '%Dn' (inode=%Di) nell'@i %i della @d (%p) @s '.'\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+#, fuzzy
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Il secondo @e '%Dn' (inode=%Di) nell'@i %i della @d (%p) @s '.'\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+#, fuzzy
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr @F %IF @s zero.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+#, fuzzy
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If @s zero.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+#, fuzzy
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_fsize @F %N @s zero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+#, fuzzy
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N @s zero.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+#, fuzzy
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N @s zero.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+#, fuzzy
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "L'@o %i (%Q) ha una modalità non valida (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@i %i della @d, offset %N: @d corrotta\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@i %i della @d, offset %N: nome file troppo lungo\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+#, fuzzy
+msgid "@d @i %i has an unallocated %B. "
+msgstr "L'@i %i della @d ha un @b (#%B) non allocato. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "L'@e della @d '.' nell'@i %i della @d non è terminato da NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "L'@e della @d '..' nell'@i %i della @d non è terminato da NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "L'@i %i (%Q) è un @v a caratteri @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "L'@i %i (%Q) è un @v a @b(i) @I.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+#, fuzzy
+msgid "@E is duplicate '.' @e.\n"
+msgstr "L'@E è un duplicato dell'@e '.'.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr "L'@E è un duplicato dell'@e '..'.\n"
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Errore interno: impossibile trovare dir_info per %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+#, fuzzy
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "L'@E ha rec_len di %Dr, dovrebbe essere %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A la struttura icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Errore scorrendo i @b(i) delle @d: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Errore leggendo il @b della @d %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Errore scrivendo il @b della @d %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A un nuovo @b della @d per l'@i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, fuzzy, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Errore deallocando l'@i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, fuzzy, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "L'@e della @d di '.' è grande. "
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "L'@i %i (%Q) è una FIFO @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "L'@i %i (%Q) è un socket @I.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Impostazione del tipo di file per l'@E a %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+#, fuzzy
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "L'@E non è del giusto tipo di file (era %Dt, dovrebbe essere %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr "E' impostato il tipo di file per l'@E.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+#, fuzzy
+msgid "@E has a @z name.\n"
+msgstr "Il nome dell'@E è di lunghezza nulla.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+#, fuzzy
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Il symlink %Q (@i #%i) non è valido.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+"Il @f contiene files di grandi dimensioni, ma nel @S non è specificato il "
+"flag LARGE_FILE.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+#, fuzzy
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@p un @h (%d): nodo (%B) non referenziato\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+#, fuzzy
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p un @h (%d): nodo (%b) referenziato due volte\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+#, fuzzy
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p un @h (%d): nodo (%B) con hash minimo non valido\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+#, fuzzy
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p un @h (%d): nodo (%b) con hash massimo non valido\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+#, fuzzy
+msgid "@n @h %d (%q). "
+msgstr "@h %d non valido (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p un @h %d (%q): @b non valido numero %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, fuzzy, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p un @h (%d): nodo root non valido\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+#, fuzzy
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p un @h (%d): nodo (%B) con limite non valido (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+#, fuzzy
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p un @h (%d): numero (%N) di nodo (%B) non valido\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+#, fuzzy
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p un @h (%d): nodo (%B) con tabella hash non ordinata\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+#, fuzzy
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p un @h (%d): nodo (%B) con profondità non valida\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr "Trovato @E duplicato. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E ha un nome file non univoco.\n"
+"Cambiare il nome in %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+#, fuzzy
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Trovato @e duplicato '%Dn'.\n"
+"\t%p (%i) è da ricostruire.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+#, fuzzy
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_fsize @F %N @s zero.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+#, fuzzy
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl @F %If @s zero.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, fuzzy, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p un @h (%d): nodo root non valido\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, fuzzy, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p un @h (%d): nodo root non valido\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@i %i della @d, offset %N: @d corrotta\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Passo 3: Controllo della connettività di @d\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr "@r non allocato."
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr "Non c'è spazio nella @d @l"
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr "/@l non trovata. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' in %Q (%i) è %P (%j), @s %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+#, fuzzy
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "/@l non valida o inesistente. Impossibile riconnettere.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Impossibile espandere /@l: %m\n"
+
+#: e2fsck/problem.c:1731
+#, fuzzy, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Impossibile riconnettere %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Errore cercando /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, fuzzy, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block: %m cercando di creare la @d /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: %m cercando di creare la @d /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, fuzzy, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2f_new_dir_block: %m creando un nuovo @b @d\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, fuzzy, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block: %m scrivendo il @b @d per /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Errore aggiustando il numero @i nell'@i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Errore creando la @d root (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Errore creando la @d /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+#, fuzzy
+msgid "@r is not a @d; aborting.\n"
+msgstr "L'@r non è una @d; cancellazione.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr "Impossibile procedere senza un @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l non è una @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+msgid "/@l is encrypted\n"
+msgstr ""
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Passo 3A: Ottimizzazione delle directory\n"
+
+#: e2fsck/problem.c:1838
+#, fuzzy, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Impossibile creare un iteratore dirs_to_hash: %m"
+
+#: e2fsck/problem.c:1843
+#, fuzzy
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Impossibile ottimizzare la directory %q (%d): %m"
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "Ottimizzazione delle directory: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Pass 4: Controllo del numero dei riferimenti\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, fuzzy, c-format
+msgid "@u @z @i %i. "
+msgstr "@i @o @I %i nel @S.\n"
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr ""
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+#, fuzzy
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "Il contatore riferimenti dell'@i %i è %Il, @s %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"ATTENZIONE: ERRORE DI PROGRAMMAZIONE IN E2FSCK!\n"
+"\tO QUALCHE TESTA VUOTA (TU) STA CONTROLLANDO UN FILE SYSTEM MONTATO "
+"(LIVE).\n"
+"@i_link_info[%i] è %N, @i.i_links_count è %Il. Dovrebbero essere identici!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+#, fuzzy
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "Il contatore riferimenti dell'@i %i è %Il, @s %N. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+#, fuzzy
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Passo 5: Controllo del riepilogo delle informazioni del @g\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+#, fuzzy
+msgid "Padding at end of @i @B is not set. "
+msgstr "Riempimento alla fine di @i @B non impostato. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+#, fuzzy
+msgid "Padding at end of @b @B is not set. "
+msgstr "Riempimento alla fine di @b @B non impostato. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr "Differenze nella @B dei @b: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr "Differenze nella @B degli @i: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Numero degli @i liberi errato per il @g #%g (%i, contati=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Numero delle directory errato per il @g #%g (%i, contati=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Numero degli @i liberi errato (%i, contati=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Numero dei @b(i) liberi errato per il @g #%g (%b, contati=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Numero dei @b(i) liberi errato (%b, contati=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1989
+#, fuzzy
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+"Errore interno: impossibile individuare la fine della mappa di bit (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, fuzzy, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Errore durante la lettura dell'@i %i: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr ""
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+#, fuzzy
+msgid "Recreate @j"
+msgstr "Ricrea"
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, fuzzy, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "impostando l'inode del blocco difettoso"
+
+#: e2fsck/problem.c:2061
+#, fuzzy, c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Errore durante la lettura dell'@i %i: %m\n"
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2071
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Codice errore non gestito (0x%x)!\n"
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr "IGNORATO"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Memoria usata: %d, tempo rimasto: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "dimensione di un inode=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "iniziando la scansione degli inode"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "durante la scansione dell'inode"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "chiamando ext2fs_block_iterate per l'inode %d"
+
+#: e2fsck/super.c:249
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "chiamando ext2fs_adjust_ea_refocunt per l'inode %d"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/unix.c:77
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Utilizzo: %s [-panyrcdfvstDFSV] [-b superblocco] [-B dimensione_blocco]\n"
+"\t\t[-I blocchi_buffer_inode] [-P processa_dimensione_inode]\n"
+"\t\t[-l|-L file_blocchi_non_validi] [-C fd] [-j ext-journal]\n"
+"\t\t[-E opzioni-estese] device\n"
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Aiuto di emergenza:\n"
+" -p Riparazione automatica (senza domande)\n"
+" -n Non effettua modifiche nel file system\n"
+" -y Risposta affermativa a tutte le domande\n"
+" -c Cerca blocchi non validi e li aggiunge nell'apposito "
+"elenco\n"
+" -f Forza il controllo anche se il file system è segnato "
+"come pulito\n"
+
+#: e2fsck/unix.c:88
+#, fuzzy
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Modalità prolissa\n"
+" -b superblocco Usa un superblocco alternativo\n"
+" -B dim_blocco Forza la dimensione dei blocchi durante la ricerca del "
+"superblocco\n"
+" -j journal-esterno Specifica la posizione del journal esterno\n"
+" -l file_bad_blocks Aggiungi alla lista dei blocchi non validi\n"
+" -L file_bad_blocks Imposta la lista dei blocchi non validi\n"
+
+#: e2fsck/unix.c:136
+#, fuzzy, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %d/%d files (%0d.%d%% non contigui), %d/%d blocchi\n"
+
+#: e2fsck/unix.c:162
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:166
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:171
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:176
+#, fuzzy, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " # di inode con blocchi ind/dind/tind: %d/%d/%d\n"
+
+#: e2fsck/unix.c:184
+msgid " Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:193
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:197
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u blocco danneggiato\n"
+msgstr[1] "%12u blocchi danneggiati\n"
+
+#: e2fsck/unix.c:199
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u file regolare\n"
+msgstr[1] ""
+"\n"
+"%12u file regolari\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u directory\n"
+msgstr[1] "%12u directory\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:210
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifo\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u collegamento\n"
+msgstr[1] "%12u collegamenti\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u collegamento simbolico"
+msgstr[1] "%12u collegamenti simbolici"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+msgstr[1] "%12u socket\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u file\n"
+msgstr[1] "%12u file\n"
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "nel determinare se %s è montato."
+
+#: e2fsck/unix.c:258
+#, fuzzy, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Attenzione: %s è %s.\n"
+
+#: e2fsck/unix.c:261
+#, fuzzy, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Attenzione: %s è %s.\n"
+
+#: e2fsck/unix.c:267
+#, fuzzy, c-format
+msgid "%s is mounted.\n"
+msgstr "%s è montato: "
+
+#: e2fsck/unix.c:269
+#, fuzzy, c-format
+msgid "%s is in use.\n"
+msgstr "%s è %s.\n"
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Impossibile continuare, operazione annullata.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"ATTENZIONE: il file system è montato. Continuando l'operazione\n"
+"verranno causati seri danni al file system.\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Continuare"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "controllo annullato.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr " contiene un file system con errori"
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr " non è stato smontato in maniera corretta"
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " è stato montato %u volte senza essere controllato"
+
+#: e2fsck/unix.c:389
+msgid " has filesystem last checked time in the future"
+msgstr " presenta orario di ultimo controllo del file system nel futuro"
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " non è stato controllato negli ultimi %u giorni"
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr ", controllo forzato.\n"
+
+#: e2fsck/unix.c:442
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: a posto, %d/%d file, %d/%d blocchi"
+
+#: e2fsck/unix.c:462
+#, fuzzy
+msgid " (check deferred; on battery)"
+msgstr " (controllo dopo il prossimo mount)"
+
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (controllo dopo il prossimo mount)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (controllo tra %ld mount)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERRORE: Impossibile aprire /dev/null (%s)\n"
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr "Versione EA non valida.\n"
+
+#: e2fsck/unix.c:701
+#, fuzzy
+msgid "Invalid readahead buffer size.\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:758
+#, fuzzy
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Opzioni raid non valide.\n"
+"\n"
+"Le opzioni raid sono separte da virgole, e possono avere un parametro, che\n"
+"\tè passato da un segno di uguale ('=').\n"
+"\n"
+"Le opzioni raid valide sono:\n"
+"\tstride=lunghezza stride in blocchi>\n"
+"\n"
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Errore convalidando il descrittore di file %d: %s\n"
+
+#: e2fsck/unix.c:860
+#, fuzzy
+msgid "Invalid completion information file descriptor"
+msgstr "Informazioni di completamento descrittore di file non valide"
+
+#: e2fsck/unix.c:875
+#, fuzzy
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Solo una tra le opzioni -p/-a, -n o -y può essere specificata."
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "L'opzione -t non è supportata da questa versione di e2fsck.\n"
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Impossibile risolvere '%s'"
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:994
+#, fuzzy
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Le opzioni -c e -I/-L non possono essere usate contemporaneamente.\n"
+
+#: e2fsck/unix.c:1018
+#, fuzzy
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Le opzioni -c e -I/-L non possono essere usate contemporaneamente.\n"
+
+#: e2fsck/unix.c:1024
+#, fuzzy
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Le opzioni -c e -I/-L non possono essere usate contemporaneamente.\n"
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Le opzioni -c e -I/-L non possono essere usate contemporaneamente.\n"
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "impostando il superblocco"
+
+#: e2fsck/unix.c:1259
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1275
+#, fuzzy
+msgid "while reading MMP block"
+msgstr "leggendo l'inode numero 1"
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, fuzzy, c-format
+msgid "while trying to delete %s"
+msgstr "provando a ridimensionare %s"
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\tcercando di creare il file di journal"
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Errore: versione obsoleta della libreria ext2fs!\n"
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr "tentando di inizializzare il programma"
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tUtilizzando %s, %s\n"
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr "serve il terminale per il riparo interattivo"
+
+#: e2fsck/unix.c:1508
+#, fuzzy, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s cercando tra i blocchi di backup...\n"
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr ""
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr "I descrittori di gruppo sembrano non validi..."
+
+#: e2fsck/unix.c:1521
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "durante la lettura dell'inode numero 1"
+
+#: e2fsck/unix.c:1525
+#, fuzzy, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: non è stato trovato un superblocco valido del journal\n"
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"La revisione del file system sembra troppo alta per questa versione di "
+"e2fsck.\n"
+"(O il super-blocco del file system è danneggiato)\n"
+"\n"
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "E' possibile che questa sia una partizione di dimensione zero?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Serve accesso di tipo %s al file system o è necessario essere root\n"
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Device non esistente o di swap?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1575
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "Device non esistente o di swap?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Disco protetto da scrittura: usare l'opzione -n per controllare\n"
+"in modalità sola lettura.\n"
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr "Utilizzare una versione più nuova di e2fsck."
+
+#: e2fsck/unix.c:1711
+#, fuzzy, c-format
+msgid "while checking journal for %s"
+msgstr "controllando il journal ext3 per %s"
+
+#: e2fsck/unix.c:1714
+#, fuzzy
+msgid "Cannot proceed with file system check"
+msgstr "Impossibile procedere senza un @r.\n"
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Attenzione: essendo un controllo a sola lettura, il journal non verrà "
+"ripristinato.\n"
+
+# fuzzy
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "impossibile impostarei i flag del superblocco a %s\n"
+
+#: e2fsck/unix.c:1743
+#, fuzzy, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Superblocco del journal non trovato!\n"
+
+#: e2fsck/unix.c:1747
+#, fuzzy, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Journal rimosso\n"
+
+#: e2fsck/unix.c:1751
+#, fuzzy, c-format
+msgid "while recovering journal of %s"
+msgstr "ripristinando il journal ext3 di %s"
+
+#: e2fsck/unix.c:1773
+#, fuzzy, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "L'@h %i ha una versione dell'hash non supportata (%N)\n"
+
+#: e2fsck/unix.c:1832
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "leggendo l'inode numero 1"
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Questo non è un buon segno, ma si tenterà di continuare...\n"
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Creazione del journal (%d blocchi): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1887
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr "annullato"
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck cancellato.\n"
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Riavvio di e2fsck dall'inizio...\n"
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr "resettando il contesto"
+
+#: e2fsck/unix.c:1985
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** IL FILE SYSTEM È STATO MODIFICATO *****\n"
+
+#: e2fsck/unix.c:1987
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** IL FILE SYSTEM È STATO MODIFICATO *****\n"
+
+#: e2fsck/unix.c:1996
+#, fuzzy, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** RIAVVIARE LINUX *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** ATTENZIONE: Il file system contiene ancora errori "
+"************\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr ""
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "cancellato!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr ""
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "sì\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "no\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? no\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? sì\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "sì"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr "lettura delle mappe di bit inode e blocco"
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "riprovando a leggere le mappe di bit per %s"
+
+#: e2fsck/util.c:346
+#, fuzzy
+msgid "writing block and inode bitmaps"
+msgstr "scrivendo le mappe di bit di blocco"
+
+#: e2fsck/util.c:351
+#, fuzzy, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "riprovando a scrivere le mappe di bit di inode per %s"
+
+# fuzzy
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: INCONSISTENZA INASPETTATA: ESEGUIRE fsck MANUALMENTE.\n"
+"\t(es., senza le opzioni -a o -p)\n"
+
+#: e2fsck/util.c:444
+#, fuzzy, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Memoria usata: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:448
+#, fuzzy, c-format
+msgid "Memory used: %lu, "
+msgstr "Memoria usata: %d, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "durata: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "tempo rimanente: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, fuzzy, c-format
+msgid "while reading inode %lu in %s"
+msgstr "leggendo l'inode %ld in %s"
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, fuzzy, c-format
+msgid "while writing inode %lu in %s"
+msgstr "scrivendo l'inode %ld in %s"
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+#, fuzzy
+msgid "done \n"
+msgstr "fatto \n"
+
+#: misc/badblocks.c:100
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Uso: %s [-b dim_blocco] [-i file_di_input] [-o file_di_output] [-svwnf]\n"
+" [-c blocks_at_once] [-p num_passi] [-t modello_di_prova [-t "
+"modello_di_prova [...]]]\n"
+" device [blocco_finale [blocco_iniziale]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Controllo con un modello casuale: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Controllo con modello 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "durante la ricerca"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valore strano (%ld) nella do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "durante la ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "iniziando a scorrere la lista dei blocchi difettosi"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "allocando i buffer"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Controllo dei blocchi da %lu a %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Ricerca dei blocchi non validi in modalità sola lettura\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Ricerca dei blocchi non validi (test a sola lettura): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Ricerca dei blocchi non validi in modalità lettura-scrittura\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Dal blocco %lu al blocco %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Lettura e confronto: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+"Ricerca dei blocchi non validi in modalità lettura-scrittura non "
+"distruttiva\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+"Ricerca dei blocchi non validi (test in moalità lettura-scrittura non "
+"distruttiva)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Rilevato interrupt, pulizia in corso\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "durante la scrittura dei dati del test, blocco %lu"
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s è montato: "
+
+#: misc/badblocks.c:1009
+#, fuzzy
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "forzato comunque badblocks. Speriamo che /etc/mtab si errato.\n"
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "non è sicuro eseguire badblocks!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr ""
+
+#: misc/badblocks.c:1022
+#, fuzzy
+msgid "badblocks forced anyway.\n"
+msgstr "forzato comunque badblocks. Speriamo che /etc/mtab si errato.\n"
+
+#: misc/badblocks.c:1042
+#, fuzzy, c-format
+msgid "invalid %s - %s"
+msgstr "intervallo non valido - %s"
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "impossibile allocare memoria per il modello di prova - %s"
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+"E' possibile specificare un solo modello di prova in modalità sola lettura"
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Modello di prova casuale non consentito in modalità sola lettura"
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Impossibile determinare la dimensione del device:\n"
+"specificarla manualmente\n"
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr "tentando di determinare la dimensione del device"
+
+#: misc/badblocks.c:1224
+#, fuzzy
+msgid "last block"
+msgstr "Rilocazione dei blocchi"
+
+#: misc/badblocks.c:1230
+#, fuzzy
+msgid "first block"
+msgstr "Primo blocco dati=%u\n"
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr ""
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr ""
+
+#: misc/badblocks.c:1296
+#, fuzzy
+msgid "while creating in-memory bad blocks list"
+msgstr "creando la lista dei blocchi non validi in memoria"
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+#, fuzzy
+msgid "while adding to in-memory bad block list"
+msgstr "aggiungendo un elemento alla lista dei blocchi difettosi in memoria"
+
+#: misc/badblocks.c:1347
+#, fuzzy, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Passo completato. %u blocchi non validi trovati.\n"
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr "uso: %s [-RV] [-+=AacDdijsSu] [-v versione] file...\n"
+
+#: misc/chattr.c:159
+#, fuzzy, c-format
+msgid "bad project - %s\n"
+msgstr "versione non valida - %s\n"
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versione non valida - %s\n"
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "tentando di fare lo stat di %s"
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr "leggendo i flag di %s"
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr "flag di %s impostati come"
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr "impostando i flag di %s"
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versione di %s impostata a %lu\n"
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr "impostando la versione a %s"
+
+#: misc/chattr.c:271
+#, fuzzy, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Versione di %s impostata a %lu\n"
+
+#: misc/chattr.c:275
+#, fuzzy, c-format
+msgid "while setting project on %s"
+msgstr "impostando la versione a %s"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Impossibile allocare la variabile di percorso nella chattr_dir_proc"
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr "= è incompatibile con + e -\n"
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr "Si deve usare '-v', =, - o +\n"
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, fuzzy, c-format
+msgid "while reading inode %u"
+msgstr "leggendo l'inode %ld in %s"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+#, fuzzy
+msgid "while expanding directory"
+msgstr "espandendo /lost+found"
+
+#: misc/create_inode.c:96
+#, fuzzy, c-format
+msgid "while linking \"%s\""
+msgstr "avviando la scansione degli inode"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, fuzzy, c-format
+msgid "while writing inode %u"
+msgstr "scrivendo l'inode %ld in %s"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, fuzzy, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "tentando di fare lo stat di %s"
+
+#: misc/create_inode.c:162
+#, fuzzy, c-format
+msgid "while opening inode %u"
+msgstr "nell'avviare l'analisi degli inode"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+#, fuzzy
+msgid "while allocating memory"
+msgstr "allocando i buffer"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, fuzzy, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "leggendo i flag di %s"
+
+#: misc/create_inode.c:213
+#, fuzzy, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "scrivendo l'inode %ld in %s"
+
+#: misc/create_inode.c:223
+#, fuzzy, c-format
+msgid "while closing inode %u"
+msgstr "durante la scansione dell'inode"
+
+#: misc/create_inode.c:274
+#, fuzzy, c-format
+msgid "while allocating inode \"%s\""
+msgstr "allocando i buffer"
+
+#: misc/create_inode.c:293
+#, fuzzy, c-format
+msgid "while creating inode \"%s\""
+msgstr "leggendo l'inode %ld in %s"
+
+#: misc/create_inode.c:359
+#, fuzzy, c-format
+msgid "while creating symlink \"%s\""
+msgstr "leggendo i flag di %s"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, fuzzy, c-format
+msgid "while looking up \"%s\""
+msgstr "cercando /lost+found"
+
+#: misc/create_inode.c:397
+#, fuzzy, c-format
+msgid "while creating directory \"%s\""
+msgstr "creando la directory root"
+
+#: misc/create_inode.c:625
+#, fuzzy, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "avviando la scansione degli inode"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:747
+#, fuzzy, c-format
+msgid "while opening directory \"%s\""
+msgstr "avviando la scansione degli inode"
+
+#: misc/create_inode.c:757
+#, fuzzy, c-format
+msgid "while lstat \"%s\""
+msgstr "tentando di fare lo stat di %s"
+
+#: misc/create_inode.c:808
+#, fuzzy, c-format
+msgid "while creating special file \"%s\""
+msgstr "leggendo l'inode %ld in %s"
+
+#: misc/create_inode.c:817
+#, fuzzy
+msgid "malloc failed"
+msgstr "Allocazione di memoria non riuscita"
+
+#: misc/create_inode.c:825
+#, fuzzy, c-format
+msgid "while trying to read link \"%s\""
+msgstr "provando a ridimensionare %s"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:843
+#, fuzzy, c-format
+msgid "while writing symlink\"%s\""
+msgstr "scrivendo l'inode %ld in %s"
+
+#: misc/create_inode.c:854
+#, fuzzy, c-format
+msgid "while writing file \"%s\""
+msgstr "scrivendo l'inode %ld in %s"
+
+#: misc/create_inode.c:867
+#, fuzzy, c-format
+msgid "while making dir \"%s\""
+msgstr "avviando la scansione degli inode"
+
+#: misc/create_inode.c:885
+#, fuzzy
+msgid "while changing directory"
+msgstr "lettura blocco directory"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:904
+#, fuzzy, c-format
+msgid "while setting inode for \"%s\""
+msgstr "impostando la versione a %s"
+
+#: misc/create_inode.c:911
+#, fuzzy, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "impostando i flag di %s"
+
+#: misc/create_inode.c:937
+#, fuzzy
+msgid "while saving inode data"
+msgstr "iniziando la scansione degli inode"
+
+#: misc/dumpe2fs.c:56
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Uso: %s [-bfhixV] [-ob superblocco] [-oB dim_blocco] device\n"
+
+#: misc/dumpe2fs.c:159
+#, fuzzy
+msgid "blocks"
+msgstr "bblocco"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Gruppo %lu: (Blocchi "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " superblocco %s a "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primario"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Backup"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Descrittori di gruppo a "
+
+#: misc/dumpe2fs.c:242
+#, fuzzy
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr "blocchi riservati"
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Descrittori di gruppo a"
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Mappa dei bit di blocco a "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ""
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+#, fuzzy
+msgid " Inode bitmap at "
+msgstr ", mappa dei bit inode a "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Tavola degli inode a "
+
+#: misc/dumpe2fs.c:279
+#, fuzzy, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %d blocchi liberi, %d inode liberi, %d directory\n"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Blocchi liberi: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Inode liberi: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "stampando la lista dei blocchi difettosi"
+
+#: misc/dumpe2fs.c:346
+#, fuzzy, c-format
+msgid "Bad blocks: %u"
+msgstr "Blocchi non validi: %d"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr "leggendo l'inode del journal"
+
+#: misc/dumpe2fs.c:379
+#, fuzzy
+msgid "while opening journal inode"
+msgstr "leggendo l'inode del journal"
+
+#: misc/dumpe2fs.c:385
+#, fuzzy
+msgid "while reading journal super block"
+msgstr "leggendo il superblocco del journal"
+
+#: misc/dumpe2fs.c:392
+#, fuzzy
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Superblocco del journal non trovato!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "leggendo il superblocco del journal"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Impossibile trovare i magic numbers del superblocco del journal"
+
+#: misc/dumpe2fs.c:468
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "allocando i buffer"
+
+#: misc/dumpe2fs.c:479
+#, fuzzy, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Controllo dei blocchi da %lu a %lu\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+#, fuzzy
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Impossibile allocare memoria per fare il parsing delle opzioni raid!\n"
+
+#: misc/dumpe2fs.c:533
+#, fuzzy, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/dumpe2fs.c:548
+#, fuzzy, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/dumpe2fs.c:559
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Opzioni raid non valide.\n"
+"\n"
+"Le opzioni raid sono separte da virgole, e possono avere un parametro, che\n"
+"\tè passato da un segno di uguale ('=').\n"
+"\n"
+"Le opzioni raid valide sono:\n"
+"\tstride=lunghezza stride in blocchi>\n"
+"\n"
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tUsando %s\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Impossibile trovare un valido super-blocco per il file system.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, fuzzy, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "riprovando a leggere le mappe di bit per %s"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr "Uso: %s [-r] dispositivo file_immagine\n"
+
+#: misc/e2image.c:109
+#, fuzzy, c-format
+msgid " %s -I device image-file\n"
+msgstr "Uso: %s [-r] dispositivo file_immagine\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+#, fuzzy
+msgid "while allocating buffer"
+msgstr "allocando i buffer"
+
+#: misc/e2image.c:180
+#, fuzzy, c-format
+msgid "Writing block %llu\n"
+msgstr "Controllo dei blocchi da %lu a %lu\n"
+
+#: misc/e2image.c:194
+#, fuzzy, c-format
+msgid "error writing block %llu"
+msgstr "Errore nello scrivere il blocco %lu (%s). "
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr ""
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr "Impossibile allocare il buffer d'intestazione\n"
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr "scrivendo il superblocco"
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr "scrivendo la tavola degli inode"
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr "scrivendo la mappa dei bit del blocco"
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr "scrivendo la mappa dei bit dell'inode"
+
+#: misc/e2image.c:506
+#, fuzzy, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Blocco directory %u (#%d) vuoto nell'inode %u\n"
+
+#: misc/e2image.c:518
+#, fuzzy, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Blocco directory %u (#%d) vuoto nell'inode %u\n"
+
+#: misc/e2image.c:559
+#, fuzzy, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%u inode, %u blocchi\n"
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr ""
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, fuzzy, c-format
+msgid "error reading block %llu"
+msgstr "Errore nel leggere il blocco %lu (%s). "
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr ""
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:759
+#, fuzzy
+msgid "while allocating l1 table"
+msgstr "allocando i buffer"
+
+#: misc/e2image.c:804
+#, fuzzy
+msgid "while allocating l2 cache"
+msgstr "allocando i buffer"
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1152
+#, fuzzy
+msgid "while allocating ext2_qcow2_image"
+msgstr "chiamando ext2fs_block_iterate"
+
+#: misc/e2image.c:1159
+#, fuzzy
+msgid "while initializing ext2_qcow2_image"
+msgstr "chiamando ext2fs_block_iterate"
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1276
+#, fuzzy
+msgid "while allocating block bitmap"
+msgstr "scrivendo la mappa dei bit del blocco"
+
+#: misc/e2image.c:1285
+#, fuzzy
+msgid "while allocating scramble block bitmap"
+msgstr "scrivendo la mappa dei bit del blocco"
+
+#: misc/e2image.c:1292
+#, fuzzy
+msgid "Scanning inodes...\n"
+msgstr "Scansione della tavola degli inode"
+
+#: misc/e2image.c:1304
+#, fuzzy
+msgid "Can't allocate block buffer"
+msgstr "Impossibile allocare il buffer blocco (dimensione=%d)\n"
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, fuzzy, c-format
+msgid "while iterating over inode %u"
+msgstr "nel recuperare l'inode successivo"
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr ""
+
+#: misc/e2image.c:1411
+#, fuzzy
+msgid "error reading bitmaps"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/e2image.c:1423
+#, fuzzy
+msgid "while opening device file"
+msgstr "nell'avviare l'analisi degli inode"
+
+#: misc/e2image.c:1434
+#, fuzzy
+msgid "while restoring the image table"
+msgstr "scrivendo la tavola degli inode"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1557
+#, fuzzy
+msgid "checking if mounted"
+msgstr " (controllo tra %ld mount)"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr ""
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr ""
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr ""
+
+#: misc/e2image.c:1640
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Il @S del @j ext3 è corrotto.\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: misc/e2image.c:1654
+#, fuzzy
+msgid "The -c option only supported in raw mode\n"
+msgstr "L'opzione -t non è supportata da questa versione di e2fsck.\n"
+
+#: misc/e2image.c:1659
+#, fuzzy
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "L'opzione -t non è supportata da questa versione di e2fsck.\n"
+
+#: misc/e2image.c:1666
+#, fuzzy
+msgid "while allocating check_buf"
+msgstr "allocando i buffer"
+
+#: misc/e2image.c:1672
+#, fuzzy
+msgid "The -p option only supported in raw mode\n"
+msgstr "L'opzione -t non è supportata da questa versione di e2fsck.\n"
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr ""
+
+#: misc/e2initrd_helper.c:68
+#, fuzzy, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Uso: %s disco\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: impossibile aprire %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: impossibile raggiungere il superblocco\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: errore durante la lettura del superblocco\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: non è un fil esystem ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Attenzione: troncamento dell'etichetta, troppo lunga.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: impossibile spostarsi nuovamente sul superblocco\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: errore durante la scrittura del superblocco\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Uso: e2label device [nuova_etichetta]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+#, fuzzy
+msgid "while reading filesystem superblock."
+msgstr "leggendo il superblocco del journal"
+
+#: misc/e2undo.c:188
+#, fuzzy
+msgid "while fetching superblock"
+msgstr "scrivendo il superblocco"
+
+#: misc/e2undo.c:201
+#, fuzzy, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Il checksum del super-blocco non corrisponde al super-blocco"
+
+#: misc/e2undo.c:340
+#, fuzzy, c-format
+msgid "illegal offset - %s"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:373
+#, fuzzy, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "nell'avviare l'analisi degli inode"
+
+#: misc/e2undo.c:380
+#, fuzzy
+msgid "while reading undo file"
+msgstr "creando l'inode root"
+
+#: misc/e2undo.c:385
+#, fuzzy, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: troppi device\n"
+
+#: misc/e2undo.c:396
+#, fuzzy, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "Il checksum del super-blocco non corrisponde al super-blocco"
+
+#: misc/e2undo.c:403
+#, fuzzy, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "Extent intestazione danneggiato"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:412
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr ""
+
+#: misc/e2undo.c:425
+#, fuzzy, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+"Il @S del @j ext3 ha impostato il flag di una caratteristica non "
+"compatibile.\n"
+
+#: misc/e2undo.c:433
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "determinando se %s è montato."
+
+#: misc/e2undo.c:439
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+
+#: misc/e2undo.c:455
+#, fuzzy, c-format
+msgid "while opening `%s'"
+msgstr "avviando la scansione degli inode"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:507
+#, fuzzy
+msgid "while reading keys"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:552
+#, fuzzy, c-format
+msgid "%s: block %llu is too long."
+msgstr "Dal blocco %lu al blocco %lu\n"
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, fuzzy, c-format
+msgid "while fetching block %llu."
+msgstr "Controllo dei blocchi da %lu a %lu\n"
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:615
+#, fuzzy, c-format
+msgid "while writing block %llu."
+msgstr "Errore nello scrivere il blocco %lu (%s). "
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr ""
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr ""
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr ""
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "ATTENZIONE: impossibile aprire %s: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "ATTENZIONE: formato non valido alla linea %d di %s\n"
+
+#: misc/fsck.c:370
+#, fuzzy
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"ATTENZIONE: Il file /etc/fstab non contiene il campo fsck\n"
+"\tpassn. L'errore verrà ignorato, ma il file /etc/fstab dovrebbe\n"
+"\tessere sistemato al più presto.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: non trovato\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: aspetta: Non ci sono processi figli?!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Attenzione... %s per il device %s è uscito con il segnale %d.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: lo stato è %x, non dovrebbe avvenire mai.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Terminato con %s (stato di uscita %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Errore %d eseguendo fsck. %s per %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Tutti, o nessuno, i tipi di file system passati con l'opzione -t devono "
+"essere preceduti\n"
+"da \"no\" o \"!\".\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Impossibile allocare memoria per i tipi di file system\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: impossibile controllare %s: fsck.%s non trovato\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Controllo di tutti i file system.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--attesa-- (passo %d)\n"
+
+#: misc/fsck.c:1085
+#, fuzzy
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Uso: fsck [-ACNPRTV] [-t tipofs] [opzioni-fs] [filesys ...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: troppi device\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: troppi parametri\n"
+
+#: misc/fuse2fs.c:3739
+msgid "Mounting read-only.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, fuzzy, c-format
+msgid "%s: %s.\n"
+msgstr "%s è %s.\n"
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, fuzzy, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+"Eseguire prima 'e2fsck -f %s'.\n"
+"\n"
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3806
+#, fuzzy, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del file system a %s\n"
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, fuzzy, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Uso: %s [RVadlv] [file ...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Durante la lettura dei flag di %s"
+
+#: misc/lsattr.c:93
+#, fuzzy, c-format
+msgid "While reading project on %s"
+msgstr "Durante la lettura della versione di %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Durante la lettura della versione di %s"
+
+#: misc/mke2fs.c:130
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Uso: %s [-c|-t|-l nomefile] [-b dim_blocchi] [-f dim_frammento]\n"
+"\t[-i byte-per-inode] [-j] [-J opzioni-journal] [-N numero-di-inode]\n"
+"\t[-m percentuale-blocchi-riservati] [-o os-origine] [-g blocchi-per-"
+"gruppo]\n"
+"\t[-L etichetta-volume] [-M ultima-dir-montata] [-O caratteristica[,...]]\n"
+"\t[-r revisione-fs] [-R opz_raid] [-qvSV] device [numero-blocchi]\n"
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Esecuzione del comando: %s\n"
+
+#: misc/mke2fs.c:265
+#, fuzzy, c-format
+msgid "while trying to run '%s'"
+msgstr "provando a caricare '%s'"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "analizzando una lista di blocchi non validi dal programma"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+"Blocco %d non valido nel superblocco primario/area del descrittore di "
+"gruppo.\n"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"I blocchi da %u a %u devono essere validi per costruire un file system.\n"
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "Annullamento....\n"
+
+#: misc/mke2fs.c:324
+#, fuzzy, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Attenzione: il superblocco di backup/descrittori di gruppo ai blocchi %d\n"
+"\tcontengono blocchi non validi.\n"
+"\n"
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "contrassegnando i blocchi non validi come utilizzati"
+
+#: misc/mke2fs.c:368
+#, fuzzy
+msgid "while writing reserved inodes"
+msgstr "scrivendo l'inode del journal"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Scrittura delle tavole degli inode: "
+
+#: misc/mke2fs.c:442
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Impossibile scrivere %d blocchi nella tavola degli inode iniziando da %d: "
+"%s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "fatto \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "creando la directory root"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "creando l'inode root"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "impostando i permessi dell'inode root"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "creando /lost+found"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "cercando /lost+found"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "espandendo /lost+found"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "impostando l'inode del blocco difettoso"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Fine memoria cancellando i settori %d-%d\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Attenzione: impossibile leggere il blocco 0: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Attenzione: impossibile cancellare il settore %d: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "inizializzando il superblocco del journal"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "Azzeramento del device di journaling: "
+
+#: misc/mke2fs.c:632
+#, fuzzy, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "azzerando il device di journaling (blocco %u, numero %d)"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "scrivendo il superblocco del journal"
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Creazione del file system con %llu %dk blocchi e %u inode\n"
+
+#: misc/mke2fs.c:673
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"attenzione: %d blocchi inutilizzati.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Etichetta del file system=%s\n"
+
+#: misc/mke2fs.c:681
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "Tipo SO: "
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Dimensione blocco=%u (log=%u)\n"
+
+#: misc/mke2fs.c:686
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Dimensione blocco=%u (log=%u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Dimensione frammento=%u (log=%u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:694
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inode, %u blocchi\n"
+
+#: misc/mke2fs.c:696
+#, fuzzy, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%u blocchi (%2.2f%%) riservati per l'utente root\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Primo blocco dati=%u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Blocchi massimi nel file system=%lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u gruppi di blocchi\n"
+
+#: misc/mke2fs.c:709
+#, fuzzy, c-format
+msgid "%u block group\n"
+msgstr "%u gruppo di blocchi\n"
+
+#: misc/mke2fs.c:711
+#, fuzzy, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blocchi per gruppo, %u frammenti per gruppo\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blocchi per gruppo, %u frammenti per gruppo\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inode per gruppo\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Etichetta del file system=%s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Backup del superblocco salvati nei blocchi: "
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:839
+#, fuzzy, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:853
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:865
+#, fuzzy, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "modello di prova non valido: %s\n"
+
+#: misc/mke2fs.c:896
+#, fuzzy, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:918
+#, fuzzy, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:933
+#, fuzzy, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:956
+#, fuzzy, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, fuzzy, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Insieme di opzioni di mount non valido: %s\n"
+
+#: misc/mke2fs.c:1065
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Set di opzioni del file system non valido: %s\n"
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Insieme di opzioni di mount non valido: %s\n"
+
+#: misc/mke2fs.c:1296
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1304
+#, fuzzy
+msgid "Aborting...\n"
+msgstr "Annullamento....\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1527
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Impossibile allocare memoria per i tipi di file system\n"
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1597
+#, fuzzy, c-format
+msgid "invalid block size - %s"
+msgstr "dimensione del blocco difettoso - %s"
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+"Attenzione: la dimensione di blocco %d non è utilizzabile su molti sistemi.\n"
+
+#: misc/mke2fs.c:1617
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "dimensione file system non valida - %s"
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, fuzzy, c-format
+msgid "bad error behavior - %s"
+msgstr "comportamento relativo ad un errore non valido - %s"
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr "Numero di blocchi per gruppo non valido"
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr "i blocchi per gruppo devono essere multipli di 8"
+
+#: misc/mke2fs.c:1669
+#, fuzzy
+msgid "Illegal number for flex_bg size"
+msgstr "Numero di blocchi per gruppo non valido"
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1680
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr ""
+
+#: misc/mke2fs.c:1690
+#, fuzzy, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "tasso di inode non valido %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1700
+#, fuzzy, c-format
+msgid "invalid inode size - %s"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr "nella malloc per bad_blocks_filename"
+
+#: misc/mke2fs.c:1733
+#, fuzzy, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Attenzione: troncamento dell'etichetta, troppo lunga.\n"
+
+#: misc/mke2fs.c:1742
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "percentuale di blocchi riservati non valida - %s"
+
+#: misc/mke2fs.c:1757
+#, fuzzy, c-format
+msgid "bad num inodes - %s"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/mke2fs.c:1770
+#, fuzzy
+msgid "while allocating fs_feature string"
+msgstr "allocando i buffer"
+
+#: misc/mke2fs.c:1787
+#, fuzzy, c-format
+msgid "bad revision level - %s"
+msgstr "versione non valida - %s\n"
+
+#: misc/mke2fs.c:1792
+#, fuzzy, c-format
+msgid "while trying to create revision %d"
+msgstr ""
+"\n"
+"\tcercando di creare il journal"
+
+#: misc/mke2fs.c:1806
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o può essere specificata solo una volta"
+
+#: misc/mke2fs.c:1814
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o può essere specificata solo una volta"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "durante l'apertura del dispositivo di journaling %s\n"
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+"Dimensione dei blocchi del device di journaling (%d) minore della dim minima "
+"dei blocchi %d\n"
+
+#: misc/mke2fs.c:1882
+#, fuzzy, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Aggiunta del journal al device %s: "
+
+#: misc/mke2fs.c:1893
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "file system"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "tentando di determinare la dimensione del file system"
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Impossibile determinare la dimensione del device: bisogna\n"
+"specificare la dimensione del file system\n"
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Sembra che la dimensione del device sia zero. Specificata partizione non\n"
+"\tvalida o la tabella delle partizioni non è stata riletta dopo "
+"l'esecuzione\n"
+"\tdi fdisk, poiché una partizione modificata era occupata. Potrebbe essere\n"
+"\tnecessario riavviare per rileggere la tabella delle partizioni.\n"
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr "Il file system è più grande della dimensione apparente del device."
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:2040
+#, fuzzy
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Il kernel Hurd non supporta la caratteristica filetype.\n"
+
+#: misc/mke2fs.c:2045
+#, fuzzy
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Il kernel Hurd non supporta la caratteristica filetype.\n"
+
+#: misc/mke2fs.c:2050
+#, fuzzy
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "Il kernel Hurd non supporta la caratteristica filetype.\n"
+
+#: misc/mke2fs.c:2055
+#, fuzzy
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Il kernel Hurd non supporta la caratteristica filetype.\n"
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr "provando a determinare la dimensione del settore hardware"
+
+#: misc/mke2fs.c:2071
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "provando a determinare la dimensione del settore hardware"
+
+#: misc/mke2fs.c:2103
+#, fuzzy
+msgid "while setting blocksize; too small for device\n"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: misc/mke2fs.c:2108
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:2132
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2144
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Journal non supportati con il numero di revisione 0 del file system\n"
+
+#: misc/mke2fs.c:2204
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "percentuale di blocchi riservati non valida - %s"
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2241
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "blocchi di %d byte troppo grandi per il sistema (max %d)"
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Attenzione: blocchi di %d bytes troppo grandi per il sistema (max %d), "
+"continuo comunque\n"
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr "conteggio dei blocchi per gruppo fuori dall'intervallo"
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2467
+#, fuzzy, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "dimensione dell'inode non valida: %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2518
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+
+#: misc/mke2fs.c:2705
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2721
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2780
+#, fuzzy
+msgid "while initializing quota context"
+msgstr "chiamando ext2fs_block_iterate"
+
+#: misc/mke2fs.c:2787
+#, fuzzy
+msgid "while writing quota inodes"
+msgstr "scrivendo l'inode del journal"
+
+#: misc/mke2fs.c:2812
+#, fuzzy, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "comportamento relativo ad un errore non valido - %s"
+
+#: misc/mke2fs.c:2888
+#, fuzzy
+msgid "in malloc for android_sparse_params"
+msgstr "nella malloc per bad_blocks_filename"
+
+#: misc/mke2fs.c:2902
+#, fuzzy
+msgid "while setting up superblock"
+msgstr "impostando il superblocco"
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2933
+#, fuzzy
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Il kernel Hurd non supporta la caratteristica filetype.\n"
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "SO sconosciuto - %s"
+
+#: misc/mke2fs.c:3119
+#, fuzzy
+msgid "Allocating group tables: "
+msgstr "Scrittura delle tavole degli inode: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr "tentando di allocare le tabelle del file system"
+
+#: misc/mke2fs.c:3136
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "scrivendo la mappa dei bit del blocco"
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3183
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "nell'azzerare il blocco %llu alla fine del file system"
+
+#: misc/mke2fs.c:3196
+#, fuzzy
+msgid "while reserving blocks for online resize"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr "journal"
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Aggiunta del journal al device %s: "
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tcercando di agigungere il journal al device %s"
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "fatto\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:3248
+#, fuzzy, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Creazione del journal (%d blocchi): "
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tcercando di creare il journal"
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3290
+msgid "Copying files into the device: "
+msgstr ""
+
+#: misc/mke2fs.c:3296
+#, fuzzy
+msgid "while populating file system"
+msgstr "allocando i buffer"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+"Scrittura delle informazioni dei super-blocchi e dell'accounting del file "
+"system: "
+
+#: misc/mke2fs.c:3310
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "nell'azzerare il blocco %llu alla fine del file system"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"fatto\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, fuzzy, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "nell'azzerare il blocco %llu alla fine del file system"
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:582
+#, fuzzy, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "file regolare"
+
+#: misc/mk_hugefiles.c:584
+#, fuzzy, c-format
+msgid "with %llu blocks each"
+msgstr ""
+"attenzione: %d blocchi inutilizzati.\n"
+"\n"
+
+#: misc/mk_hugefiles.c:593
+#, fuzzy, c-format
+msgid "while creating huge file %lu"
+msgstr "nel recuperare l'inode successivo"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Uso: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, fuzzy, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Uso: %s <dev1> <dev2> <dev3>\n"
+"\n"
+"Questo programma stampa le informazioni di partizione per un insieme di "
+"device\n"
+"Un utilizzo comune di questo programma è:\n"
+"\n"
+"\t%s /dev/hda?\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, fuzzy, c-format
+msgid "Cannot open %s: %s"
+msgstr "e2label: impossibile aprire %s\n"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+#, fuzzy
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Eseguire e2fsck sul file system.\n"
+
+#: misc/tune2fs.c:123
+#, fuzzy
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Eseguire e2fsck sul file system.\n"
+
+#: misc/tune2fs.c:136
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Uso: %s [-c max-numero-mount] [-e comportamento-errori] [-g gruppo]\n"
+"\t[-i intervallo[d|m|w]] [-j] [-J opzioni-journal]\n"
+"\t[-l] [-s flag-sparse] [-m percentuale-blocchi-riservati]\n"
+"\t[-o [^]opzioni-mount[,...]] [-r numero-blocchi-riservati]\n"
+"\t[-u utente] [-C numero-mount] [-L etichetta-volume] [-M ultima-dir-"
+"montata]\n"
+"\t[-O [^]caratteristica[,...]] [-T ultimo-controllo] [-U UUID] device\n"
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "Superblocco del journal non trovato!\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "cercando di aprire il journal esterno"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s non è un dispositivo di journaling.\n"
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID del file system non trovato sul dispositivo di journaling.\n"
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr "Journal rimosso\n"
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr "azzerando l'inode del journal"
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr "scrivendo l'inode del journal"
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:483
+#, fuzzy, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr ""
+"Eseguire prima 'e2fsck -f %s'.\n"
+"\n"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del file system a %s\n"
+
+#: misc/tune2fs.c:1138
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il file system non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Il flag needs_recovery è impostato. Eseguire e2fsck prima di azzerare\n"
+"il flag has_journal.\n"
+
+#: misc/tune2fs.c:1164
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del file system a %s\n"
+
+#: misc/tune2fs.c:1177
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il file system non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1212
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1226
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "leggendo l'inode numero 1"
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1269
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il file system non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1323
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1465
+#, fuzzy
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del file system a %s\n"
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1489
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr "Il file system ha già un journal.\n"
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\ttentando di aprire il journal in %s\n"
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Creando il journal per il device %s: "
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "aggiungendo un file system al journal in %s"
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Creazione dell'inode del journal: "
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tcercando di creare il file di journal"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+#, fuzzy
+msgid "while initializing quota context in support library"
+msgstr "inizializzando il superblocco del journal"
+
+#: misc/tune2fs.c:1649
+#, fuzzy, c-format
+msgid "while updating quota limits (%d)"
+msgstr "nell'aggiornare l'inode di un blocco danneggiato"
+
+#: misc/tune2fs.c:1657
+#, fuzzy, c-format
+msgid "while writing quota file (%d)"
+msgstr "scrivendo la tavola degli inode"
+
+#: misc/tune2fs.c:1675
+#, fuzzy, c-format
+msgid "while removing quota file (%d)"
+msgstr "creando l'inode root"
+
+#: misc/tune2fs.c:1718
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Impossibile comprendere il formato di data/ora: %s"
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "numero di mount non validi - %s"
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "gid/nome gruppo non valido - %s"
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr "intervallo non valido - %s"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "percentuale di blocchi riservati non valida - %s"
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr "-o può essere specificata solo una volta"
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr "-O può essere specificata solo una volta"
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "numero di blocchi riservati non valido - %s"
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "uid/nome utente non valido - %s"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "bad inode size - %s"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2115
+#, fuzzy, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Impostazione del numero massimo di mount a %d\n"
+msgstr[1] "Impostazione del numero massimo di mount a %d\n"
+
+#: misc/tune2fs.c:2138
+#, fuzzy, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Insieme di opzioni di mount non valido: %s\n"
+
+#: misc/tune2fs.c:2153
+#, fuzzy, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/tune2fs.c:2168
+#, fuzzy, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2193
+#, fuzzy
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+"\n"
+"Opzioni raid non valide.\n"
+"\n"
+"Le opzioni raid sono separte da virgole, e possono avere un parametro, che\n"
+"\tè passato da un segno di uguale ('=').\n"
+"\n"
+"Le opzioni raid valide sono:\n"
+"\tstride=lunghezza stride in blocchi>\n"
+"\n"
+
+#: misc/tune2fs.c:2663
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/tune2fs.c:2668
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "lettura delle mappe di bit inode e blocco"
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr "blocchi da spostare"
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:2699
+#, fuzzy
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2955
+#, fuzzy
+msgid "Cannot modify a journal device.\n"
+msgstr "%s non è un dispositivo di journaling.\n"
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2975
+msgid "Shrinking inode size is not supported\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del file system a %s\n"
+
+#: misc/tune2fs.c:2980
+#, fuzzy, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "dimensione dell'inode non valida: %d (min %d/max %d)"
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3045
+#, fuzzy, c-format
+msgid "Recovering journal.\n"
+msgstr "%s: ripristino del journal\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Impostazione del numero massimo di mount a %d\n"
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Impostazione del numero attuale di mount a %d\n"
+
+#: misc/tune2fs.c:3074
+#, fuzzy, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Impostazione del comportamento da errore a %d\n"
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:3084
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "il numero di blocchi riservati è troppo alto (%lu)"
+
+#: misc/tune2fs.c:3091
+#, fuzzy, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Impostazione dell'intervallo tra i controlli a %lu secondi\n"
+
+#: misc/tune2fs.c:3098
+#, fuzzy, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+"Impostazione della percentuale di blocchi riservati a %lu (%u blocchi)\n"
+
+#: misc/tune2fs.c:3104
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "il numero di blocchi riservati è troppo alto (%lu)"
+
+#: misc/tune2fs.c:3111
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Impostazione del numero di blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Il file system ha già dei super-blocchi sparsi.\n"
+
+#: misc/tune2fs.c:3119
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+# fuzzy
+#: misc/tune2fs.c:3134
+#, fuzzy
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr "impossibile impostarei i flag del superblocco a %s\n"
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+"Impostazione di data e ora dell'ultimo controllo del file system a %s\n"
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Impostazione dell'uid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3198
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il file system non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:3222
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il file system non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr "Formato UUID non valido\n"
+
+#: misc/tune2fs.c:3275
+#, fuzzy
+msgid "Need to update journal superblock.\n"
+msgstr "lettura del superblocco del journal\n"
+
+#: misc/tune2fs.c:3301
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il file system non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3326
+#, fuzzy, c-format
+msgid "Setting inode size %lu\n"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/tune2fs.c:3330
+#, fuzzy
+msgid "Failed to change inode size\n"
+msgstr "iniziando la scansione degli inode"
+
+#: misc/tune2fs.c:3344
+#, fuzzy, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:3349
+#, fuzzy, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:3356
+#, fuzzy, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Impostazione del numero attuale di mount a %d\n"
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr ""
+
+#: misc/util.c:104
+#, fuzzy, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Procedere comunque? (s,n) "
+
+#: misc/util.c:108
+#, fuzzy
+msgid "Proceed anyway? (y,N) "
+msgstr "Procedere comunque? (s,n) "
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"mke2fs è stato forzato comunque. Si spera che /etc/mtab sia sbagliato.\n"
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "non farò un %s qui!\n"
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr ""
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+"Impossibile allocare memoria per fare il parsing delle opzioni del journal!\n"
+
+#: misc/util.c:186
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr "Impossibile trovare i magic numbers del superblocco del journal"
+
+#: misc/util.c:213
+#, fuzzy
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Sono state specificate opzioni non valide per il journal.\n"
+"\n"
+"Le opzioni per il journal sono separate da virgole, e possono avere un "
+"parametro,\n"
+"\tpassato da un segno di uguale ('=').\n"
+"\n"
+"Opzioni valide per il journal sono:\n"
+"\tsize=<dimensione del journal in MB>\n"
+"\tdevice=<dispositivo di journal>\n"
+"\n"
+"La dimensione del journal dev'essere compreso tra 1024 e 102400 blocchi del "
+"filesystem.\n"
+"\n"
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Filesystem troppo piccolo per un journal\n"
+
+#: misc/util.c:251
+#, fuzzy, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"La dimensione specificata del journal è di %d blocchi, ma essa\n"
+"dev'essere compresa tra 1024 e 102400 blocchi. Operazione annullata.\n"
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Dimensione del journal troppo grande per il filesystem.\n"
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Questo filesystem verrà automaticamente controllato ogni %d mount, o\n"
+"%g giorni, a seconda di quale venga prima. Usare tune2fs -c o -i per "
+"cambiare.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:155
+#, fuzzy
+msgid "bad arguments"
+msgstr "dimensione del frammento non valida - %s"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:279
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Impossibile comprendere il formato di data/ora: %s"
+
+#: misc/uuidd.c:308
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Impossibile trovare il superblocco ext2"
+
+#: misc/uuidd.c:316
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Impossibile riconnettere %i: %m\n"
+
+#: misc/uuidd.c:354
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Errore durante la lettura dell'@i %i: %m\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:433
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "Versione EA non valida.\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Errore creando la @d /@l (%s): %m\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Uso: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+#, fuzzy
+msgid "# Extent dump:\n"
+msgstr "# Dump esteso:\n"
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr ""
+
+#: resize/main.c:49
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Uso: %s [-d flag_di_debug] [-f] [-F] [-p] device [nuova-dimensione]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Estensione della tavola degli inode"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Rilocazione dei blocchi"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Scansione della tavola degli inode"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Aggiornamento dei riferimenti degli inode"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Spostamento della tavola degli inode"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Passo sconosciuto?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Inizio del passo %d (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:366
+#, fuzzy, c-format
+msgid "while opening %s"
+msgstr "avviando la scansione degli inode"
+
+#: resize/main.c:374
+#, fuzzy, c-format
+msgid "while getting stat information for %s"
+msgstr "impostando la versione a %s"
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Eseguire prima 'e2fsck -f %s'.\n"
+"\n"
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:507
+#, fuzzy, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:534
+#, fuzzy, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr ""
+"Dimensione dei blocchi del device di journaling (%d) minore della dim minima "
+"dei blocchi %d\n"
+
+#: resize/main.c:540
+#, fuzzy
+msgid "Invalid stride length"
+msgstr "Parametro di stride non valido.\n"
+
+#: resize/main.c:564
+#, fuzzy, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"La partizione (o device) contenente è solo di %d (%dk) blocchi.\n"
+"E' stata richiesta una nuova dimensione di %d blocchi.\n"
+"\n"
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+
+#: resize/main.c:581
+#, fuzzy, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il file system non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+
+#: resize/main.c:593
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Il filesystem è già lungo %d blocchi. Nulla da fare!\n"
+"\n"
+
+#: resize/main.c:600
+#, fuzzy, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Il file system ha già un journal.\n"
+
+#: resize/main.c:605
+#, fuzzy, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Il file system ha già un journal.\n"
+
+#: resize/main.c:613
+#, fuzzy, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr ""
+"Impostazione di data e ora dell'ultimo controllo del file system a %s\n"
+
+#: resize/main.c:615
+#, fuzzy, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr ""
+"Impostazione di data e ora dell'ultimo controllo del file system a %s\n"
+
+#: resize/main.c:617
+#, fuzzy, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+"Il filesystem su %s è ora lungo %d blocchi.\n"
+"\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "provando a ridimensionare %s"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:635
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Il filesystem su %s è ora lungo %d blocchi.\n"
+"\n"
+
+#: resize/main.c:650
+#, fuzzy, c-format
+msgid "while trying to truncate %s"
+msgstr "tentando di fare lo stat di %s"
+
+#: resize/online.c:81
+#, fuzzy
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "Il @j esterno non supporta questo @f\n"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:122
+#, fuzzy
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: resize/online.c:129
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Il kernel Hurd non supporta la caratteristica filetype.\n"
+
+#: resize/online.c:137
+#, fuzzy, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+"\n"
+"\ttentando di aprire il journal in %s\n"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:164 resize/online.c:184
+#, fuzzy
+msgid "While checking for on-line resizing support"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: resize/online.c:181
+#, fuzzy
+msgid "Kernel does not support online resizing"
+msgstr "Il @j esterno non supporta questo @f\n"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:230
+#, fuzzy
+msgid "While trying to extend the last group"
+msgstr "cercando di aprire il journal esterno"
+
+#: resize/online.c:277
+#, fuzzy, c-format
+msgid "While trying to add group #%d"
+msgstr "durante l'apertura di %s"
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+
+#: resize/resize2fs.c:759
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr ""
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "blocchi riservati"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr "blocchi di meta-dati"
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+#, fuzzy
+msgid "new meta blocks"
+msgstr "blocchi di meta-dati"
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.44.4"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Valore magic non corretto nel super-blocco"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Numero di revisione del filesystem troppo elevato"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Tentativo di scrivere su un filesystem aperto in sola lettura"
+
+#: lib/ext2fs/ext2_err.c:33
+#, fuzzy
+msgid "Can't read group descriptors"
+msgstr ", Descrittori di gruppo a "
+
+#: lib/ext2fs/ext2_err.c:34
+#, fuzzy
+msgid "Can't write group descriptors"
+msgstr ", Descrittori di gruppo a "
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:38
+#, fuzzy
+msgid "Can't write an inode bitmap"
+msgstr "scrivendo le mappe di bit di inode"
+
+#: lib/ext2fs/ext2_err.c:39
+#, fuzzy
+msgid "Can't read an inode bitmap"
+msgstr "scrivendo le mappe di bit di inode"
+
+#: lib/ext2fs/ext2_err.c:40
+#, fuzzy
+msgid "Can't write a block bitmap"
+msgstr "scrivendo le mappe di bit di blocco"
+
+#: lib/ext2fs/ext2_err.c:41
+#, fuzzy
+msgid "Can't read a block bitmap"
+msgstr "lettura delle mappe di bit inode e blocco"
+
+#: lib/ext2fs/ext2_err.c:42
+#, fuzzy
+msgid "Can't write an inode table"
+msgstr "scrivendo la tavola degli inode"
+
+#: lib/ext2fs/ext2_err.c:43
+#, fuzzy
+msgid "Can't read an inode table"
+msgstr "Scansione della tavola degli inode"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Impossibile leggere l'inode successivo"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Il filesystem ha una dimensione del blocco non attesa"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Directory EXT2 danneggiata"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Spazio non sufficiente nella directory"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Bitmap degli inode non caricata"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Bitmap dei blocchi non caricata"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Numero di inode non valido"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Numero di blocchi non valido"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+#, fuzzy
+msgid "Illegal indirect block found"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: lib/ext2fs/ext2_err.c:65
+#, fuzzy
+msgid "Illegal doubly indirect block found"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: lib/ext2fs/ext2_err.c:66
+#, fuzzy
+msgid "Illegal triply indirect block found"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: lib/ext2fs/ext2_err.c:67
+#, fuzzy
+msgid "Block bitmaps are not the same"
+msgstr " Mappa dei bit di blocco a "
+
+#: lib/ext2fs/ext2_err.c:68
+#, fuzzy
+msgid "Inode bitmaps are not the same"
+msgstr ", mappa dei bit inode a "
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Il super-blocco ext2 è danneggiato"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Trovati troppi collegamenti simbolici."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "La funzione di callback non gestirà questo caso"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "L'inode arriva da un blocco danneggiato nella tabella degli inode"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Allocazione di memoria non riuscita"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Argomento non valido passato alla libreria ext2"
+
+#: lib/ext2fs/ext2_err.c:83
+#, fuzzy
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Impossibile allocare memoria per i tipi di filesystem\n"
+
+#: lib/ext2fs/ext2_err.c:84
+#, fuzzy
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Impossibile allocare memoria per i tipi di filesystem\n"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:89
+#, fuzzy
+msgid "Ext2 directory block not found"
+msgstr "Blocco directory %d (#%d) vuoto nell'inode %d\n"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "La directory Ext2 esiste già"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "L'utente ha annullato la richiesta"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "File Ext2 troppo grande"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:95
+#, fuzzy
+msgid "Journal superblock not found"
+msgstr "Superblocco del journal non trovato!\n"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:98
+#, fuzzy
+msgid "Error loading external journal"
+msgstr "cercando di aprire il journal esterno"
+
+#: lib/ext2fs/ext2_err.c:99
+#, fuzzy
+msgid "Journal not found"
+msgstr "Superblocco del journal non trovato!\n"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:101
+#, fuzzy
+msgid "Illegal extended attribute block number"
+msgstr "aattributo esteso"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:104
+#, fuzzy
+msgid "Too many reserved group descriptor blocks"
+msgstr "<Inode del descrittore di gruppo>"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: successo"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: database danneggiato"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: errore I/O"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: errore nell'ottenere il blocco"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: memoria esaurita"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: il record esiste"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: blocco esistente su altre chiavi"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: parametro non valido"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: il record non esiste"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: scrittura non consentita"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Extent intestazione danneggiato"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Extent indice danneggiato"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Extent danneggiato"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "L'inode non usa gli extent"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Extent non trovato"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: numero magic non valido"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: device attivo"
+
+#: lib/ext2fs/ext2_err.c:151
+#, fuzzy
+msgid "MMP: e2fsck being run"
+msgstr "MMP: fsck in esecuzione"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:154
+#, fuzzy
+msgid "MMP: filesystem still in use"
+msgstr "dimensione filesystem non valida - %s"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:156
+#, fuzzy
+msgid "Block group descriptor size incorrect"
+msgstr "<Inode del descrittore di gruppo>"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Il checksum del super-blocco non corrisponde al super-blocco"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Algoritmo di checksum sconosciuto"
+
+#: lib/ext2fs/ext2_err.c:165
+#, fuzzy
+msgid "MMP block checksum does not match"
+msgstr "Il checksum del blocco MMP non corrisponde al blocco MMP"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Il file Ext2 esiste già"
+
+#: lib/ext2fs/ext2_err.c:167
+#, fuzzy
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Il checksum del blocco MMP non corrisponde al blocco MMP"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:172
+#, fuzzy
+msgid "Extended attribute block has a bad header"
+msgstr "aattributo esteso"
+
+#: lib/ext2fs/ext2_err.c:173
+#, fuzzy
+msgid "Extended attribute key not found"
+msgstr "aattributo esteso"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+#, fuzzy
+msgid "Inode doesn't have inline data"
+msgstr "L'inode non usa gli extent"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+#, fuzzy
+msgid "No free space in inline data"
+msgstr "Spazio non sufficiente nella directory"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:185
+#, fuzzy
+msgid "File system is corrupted"
+msgstr "Il filesystem ha una dimensione del blocco non attesa"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+#, fuzzy
+msgid "The journal superblock is corrupt"
+msgstr "Il super-blocco ext2 è danneggiato"
+
+#: lib/ext2fs/ext2_err.c:188
+#, fuzzy
+msgid "Inode is corrupted"
+msgstr "Il @S del @j ext3 è corrotto.\n"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profilo versione 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Valore magic non corretto in profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Sezione del profilo non trovata"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Relazione del profile non trovata"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Errore di sintassi nella relazione del profilo"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Parentesi di apertura mancante nel profilo"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Valore magic non corretto in profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Valore magic non corretto in profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Oggetto profile_section non valido"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Sezioni esaurite"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Nameset errato passato alla routine di interrogazione"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Nessun file di profilo da aprire"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Valore magic non corretto in profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Impossibile aprire il file del profilo"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "La sezione esiste già"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Valore booleano non valido"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Valore intero non valido"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Valore magic non corretto in profile_file_data_t"
+
+#: lib/support/plausible.c:118
+#, fuzzy, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "numero di mount non validi - %s"
+
+#: lib/support/plausible.c:121
+#, fuzzy, c-format
+msgid "\tlast mounted on %s"
+msgstr "numero di mount non validi - %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr ""
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr ""
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr ""
+
+#: lib/support/plausible.c:199
+#, fuzzy, c-format
+msgid "Creating regular file %s\n"
+msgstr "file regolare"
+
+#: lib/support/plausible.c:202
+#, fuzzy, c-format
+msgid "Could not open %s: %s\n"
+msgstr "e2label: impossibile aprire %s\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Sembra che il dispositivo non esista; è stato specificato correttamente?\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s non è un device speciale a blocchi.\n"
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s contiene un file system %s con etichetta \"%s\"\n"
+
+#: lib/support/plausible.c:252
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s contiene un file system %s\n"
+
+#: lib/support/plausible.c:276
+#, fuzzy, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s contiene un file system %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: errore leggendo le mappe di bit: %s\n"
+
+#, fuzzy
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Attenzione, problemi durante la scrittura dei superblocchi."
+
+#, fuzzy
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "i_dir_acl @F %Id @s zero.\n"
+
+#, fuzzy
+#~ msgid "@A @a @b %b. "
+#~ msgstr "L'@i %i ha un @a di @b %b non valido. "
+
+#, fuzzy
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "Attenzione: il supporto per la compressione è sperimentale.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: e2fsck non è stato compilato con il supporto HTREE,\n"
+#~ "\tma il file system %s contiene directory HTREE.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "allocando i buffer zeroizing"
+
+#, fuzzy
+#~ msgid ", unused inodes %u\n"
+#~ msgstr "mappa degli inode in utilizzo"
+
+#, fuzzy
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Dimensione dei blocchi del journal: %d\n"
+#~ "Dimensione del journal: %d\n"
+#~ "Primo blocco del journal: %d\n"
+#~ "Sequenza del journal: ox%08x\n"
+#~ "Inizio del journal: %d\n"
+#~ "Numero di utenti del journal: %d\n"
+
+#, fuzzy
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Dimensione dei blocchi del journal: %d\n"
+#~ "Dimensione del journal: %d\n"
+#~ "Primo blocco del journal: %d\n"
+#~ "Sequenza del journal: ox%08x\n"
+#~ "Inizio del journal: %d\n"
+#~ "Numero di utenti del journal: %d\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Lettura dei dati del file system non riuscita\n"
+
+#, fuzzy
+#~ msgid "Failed to open %s\n"
+#~ msgstr "durante l'apertura di %s"
+
+#, fuzzy
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Parametro di stride non valido.\n"
+
+#, fuzzy
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr ""
+#~ "Impossibile allocare memoria per fare il parsing delle opzioni raid!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Impossibile allocare memoria per i tipi di file system\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s è un device intero, non solo una partizione.\n"
diff --git a/po/ms.gmo b/po/ms.gmo
new file mode 100644
index 0000000..fa6ef80
--- /dev/null
+++ b/po/ms.gmo
Binary files differ
diff --git a/po/ms.po b/po/ms.po
new file mode 100644
index 0000000..27ebbcb
--- /dev/null
+++ b/po/ms.po
@@ -0,0 +1,8545 @@
+# e2fsprogs Bahasa Melayu (Malay) (ms).
+# Copyright (C) 2008, 2009, 2015, 2018, 2019, 2020, 2021, 2022, 2023 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Sharuzzaman Ahmat Raslan <sharuzzaman@gmail.com>, 2008, 2009, 2015, 2018, 2019, 2020, 2021, 2022, 2023.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2023-01-28 23:57+0800\n"
+"Last-Translator: Sharuzzaman Ahmat Raslan <sharuzzaman@gmail.com>\n"
+"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
+"Language: ms\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Poedit 3.2.2\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Blok buruk %u diluar julat; diabaikan.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "ketika memeriksa kewarasan blok inode buruk"
+
+#: e2fsck/badblocks.c:58
+#, fuzzy
+msgid "while reading the bad blocks inode"
+msgstr "ketika membaca dalam senarai blok buruk dari fail"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, fuzzy, c-format
+msgid "while trying to open %s"
+msgstr "Ralat tidak diketahui berlaku bila cuba membuka \"%s\"."
+
+#: e2fsck/badblocks.c:84
+#, fuzzy, c-format
+msgid "while trying popen '%s'"
+msgstr "ketika cuba untuk stat %s"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "ketika membaca dalam senarai blok buruk dari fail"
+
+#: e2fsck/badblocks.c:106
+#, fuzzy
+msgid "while updating bad block inode"
+msgstr "ketika menetapkan inod blok buruk"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Amaran: blok tidak sah %u terdapat di dalam blok inode buruk. Dibersihkan.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "ketika membebaskan fail dir_info tdb"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Ralat membaca blok %lu (%s) ketika %s. "
+
+#: e2fsck/ehandler.c:58
+#, fuzzy, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Ralat membaca blok %lu (%s) ketika %s. "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+#, fuzzy
+msgid "Ignore error"
+msgstr "Abai ralat dan teruskan ke modul berikutnya"
+
+#: e2fsck/ehandler.c:67
+#, fuzzy
+msgid "Force rewrite"
+msgstr "Gagal menulis semula pengepala\n"
+
+#: e2fsck/ehandler.c:109
+#, fuzzy, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Ralat membaca blok %lu (%s) ketika %s. "
+
+#: e2fsck/ehandler.c:112
+#, fuzzy, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Ralat membaca blok %lu (%s) ketika %s. "
+
+#: e2fsck/emptydir.c:56
+#, fuzzy
+msgid "empty dirblocks"
+msgstr "Kosong"
+
+#: e2fsck/emptydir.c:61
+#, fuzzy
+msgid "empty dir map"
+msgstr "Mencipta peta kosong..."
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Blok direktori kosong %u (#%d) dalam inode %u\n"
+
+#: e2fsck/extend.c:22
+#, fuzzy, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "Parameter saiz blok tidak sah: %s\n"
+
+#: e2fsck/extend.c:45
+#, fuzzy, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Nombor tidak sah untuk saiz flex_bg"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr ""
+
+#: e2fsck/extents.c:42
+#, fuzzy
+msgid "extent rebuild inode map"
+msgstr "Tiada ruang bebas dalam peta takat"
+
+#: e2fsck/flushb.c:35
+#, fuzzy, c-format
+msgid "Usage: %s disk\n"
+msgstr "Penggunaan cakera"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr ""
+
+#: e2fsck/journal.c:1289
+#, fuzzy
+msgid "reading journal superblock\n"
+msgstr "ketika membaca superblok jurnal"
+
+#: e2fsck/journal.c:1362
+#, fuzzy, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "Superblok jurnal tidak dijumpai!\n"
+
+#: e2fsck/journal.c:1371
+#, fuzzy, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: fail terlalu pendek untuk menjadi fail gmon\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr ""
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, fuzzy, c-format
+msgid "%s: recovering journal\n"
+msgstr "ketika mendapatkan semula jurnal ext3 bagi %s"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+
+#: e2fsck/journal.c:1715
+#, fuzzy, c-format
+msgid "while trying to re-open %s"
+msgstr "Ralat tidak diketahui berlaku bila cuba membuka \"%s\"."
+
+#: e2fsck/message.c:116
+#, fuzzy
+msgid "aextended attribute"
+msgstr "Atribut:"
+
+#: e2fsck/message.c:117
+#, fuzzy
+msgid "Aerror allocating"
+msgstr "Memperuntuk Imej Cakera"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr ""
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr ""
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr ""
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr ""
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr ""
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr ""
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr ""
+
+#: e2fsck/message.c:125
+#, fuzzy
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "hari ini pada %-I:%M %p"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr ""
+
+#: e2fsck/message.c:127
+#, fuzzy
+msgid "Ffor @i %i (%Q) is"
+msgstr "Symlink %Q (@i #%i) adalah @n.\n"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr ""
+
+#: e2fsck/message.c:129
+#, fuzzy
+msgid "hHTREE @d @i"
+msgstr "Yahoo I_D:"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr ""
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr ""
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr ""
+
+#: e2fsck/message.c:133
+#, fuzzy
+msgid "llost+found"
+msgstr "Tidak dijumpai."
+
+#: e2fsck/message.c:134
+#, fuzzy
+msgid "Lis a link"
+msgstr "Fleur De Lis"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr ""
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr ""
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pmasalah dalam"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:140
+#, fuzzy
+msgid "rroot @i"
+msgstr "%i%%"
+
+#: e2fsck/message.c:141
+#, fuzzy
+msgid "sshould be"
+msgstr "%s mestilah nombor"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr ""
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr ""
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr ""
+
+#: e2fsck/message.c:146
+#, fuzzy
+msgid "zzero-length"
+msgstr "Mengikut Pan_jang"
+
+#: e2fsck/message.c:157
+#, fuzzy
+msgid "<The NULL inode>"
+msgstr "kosong"
+
+#: e2fsck/message.c:158
+#, fuzzy
+msgid "<The bad blocks inode>"
+msgstr "ketika memeriksa kewarasan blok inode buruk"
+
+#: e2fsck/message.c:160
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "Kuota penggunaan"
+
+#: e2fsck/message.c:161
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "Satu kumpulan blok kehilangan jadual inode"
+
+#: e2fsck/message.c:162
+#, fuzzy
+msgid "<The boot loader inode>"
+msgstr "Pemuat plugin"
+
+#: e2fsck/message.c:163
+#, fuzzy
+msgid "<The undelete directory inode>"
+msgstr "Inode Ext2 adalah bukan direktori"
+
+#: e2fsck/message.c:164
+#, fuzzy
+msgid "<The group descriptor inode>"
+msgstr " Penghurai kumpulan di "
+
+#: e2fsck/message.c:165
+#, fuzzy
+msgid "<The journal inode>"
+msgstr "Mencipta inode jurnal: "
+
+#: e2fsck/message.c:166
+#, fuzzy
+msgid "<Reserved inode 9>"
+msgstr "9"
+
+#: e2fsck/message.c:167
+#, fuzzy
+msgid "<Reserved inode 10>"
+msgstr "Simpanan"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "fail biasa"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "direktori"
+
+#: e2fsck/message.c:329
+#, fuzzy
+msgid "character device"
+msgstr "Peranti aksara"
+
+#: e2fsck/message.c:331
+#, fuzzy
+msgid "block device"
+msgstr "Peranti blok"
+
+#: e2fsck/message.c:333
+#, fuzzy
+msgid "named pipe"
+msgstr "(paip)"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "pautan simbolik"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "soket"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr ""
+
+#: e2fsck/message.c:410
+#, fuzzy
+msgid "indirect block"
+msgstr "Blok tidak langsung dua kali yang tidak sah dijumpai"
+
+#: e2fsck/message.c:412
+#, fuzzy
+msgid "double indirect block"
+msgstr "Blok tidak langsung dua kali yang tidak sah dijumpai"
+
+#: e2fsck/message.c:414
+#, fuzzy
+msgid "triple indirect block"
+msgstr "Blok tidak langsung dua kali yang tidak sah dijumpai"
+
+#: e2fsck/message.c:416
+#, fuzzy
+msgid "translator block"
+msgstr "Blok"
+
+#: e2fsck/message.c:418
+#, fuzzy
+msgid "block #"
+msgstr "Blok"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "pengguna"
+
+#: e2fsck/message.c:485
+#, fuzzy
+msgid "group"
+msgstr "Kumpulan"
+
+#: e2fsck/message.c:488
+#, fuzzy
+msgid "project"
+msgstr "Projek:"
+
+#: e2fsck/message.c:491
+#, fuzzy
+#| msgid "unknown os - %s"
+msgid "unknown quota type"
+msgstr "Jenis tidak diketahui"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr ""
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr ""
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr ""
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr ""
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+#, fuzzy
+msgid "reading directory block"
+msgstr "membaca direktori %s"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr ""
+
+#: e2fsck/pass1.c:1221
+#, fuzzy
+msgid "in-use inode map"
+msgstr "Guna peta imej"
+
+#: e2fsck/pass1.c:1232
+#, fuzzy
+msgid "directory inode map"
+msgstr "Inode Ext2 adalah bukan direktori"
+
+#: e2fsck/pass1.c:1242
+#, fuzzy
+msgid "regular file inode map"
+msgstr "Bukan satu fail nalar."
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+#, fuzzy
+msgid "in-use block map"
+msgstr "Guna url suai bagi peta radar"
+
+#: e2fsck/pass1.c:1260
+#, fuzzy
+#| msgid "meta-data blocks"
+msgid "metadata block map"
+msgstr "Data meta"
+
+#: e2fsck/pass1.c:1271
+#, fuzzy
+msgid "inode casefold map"
+msgstr "Peta"
+
+#: e2fsck/pass1.c:1336
+#, fuzzy
+msgid "opening inode scan"
+msgstr "ketika melakukan pengesanan inod"
+
+#: e2fsck/pass1.c:2104
+#, fuzzy
+msgid "Pass 1"
+msgstr "Takrifkan pilihan pengekodan anda untuk laluan 1 \\n (biarkan lalai jika anda tidak tahu apa perlu dibuat)"
+
+#: e2fsck/pass1.c:2165
+#, fuzzy, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "ketika membaca inod jurnal"
+
+#: e2fsck/pass1.c:2216
+#, fuzzy
+msgid "bad inode map"
+msgstr "ketika menetapkan inod blok buruk"
+
+#: e2fsck/pass1.c:2256
+#, fuzzy
+msgid "inode in bad block map"
+msgstr "Inode adalah dari blok buruk dalam jadual inode"
+
+#: e2fsck/pass1.c:2276
+#, fuzzy
+msgid "imagic inode map"
+msgstr "Peta"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:4150
+#, fuzzy
+msgid "block bitmap"
+msgstr " Blok peta bit di "
+
+#: e2fsck/pass1.c:4156
+#, fuzzy
+msgid "inode bitmap"
+msgstr ", Bitmap inode di"
+
+#: e2fsck/pass1.c:4162
+#, fuzzy
+msgid "inode table"
+msgstr ""
+"\n"
+" Jadual inode di "
+
+#: e2fsck/pass2.c:318
+#, fuzzy
+msgid "Pass 2"
+msgstr "Takrifkan pilihan pengekodan anda untuk laluan 2 \\n (biarkan lalai jika anda tidak tahu apa perlu dibuat)"
+
+#: e2fsck/pass2.c:576
+#, fuzzy
+msgid "NLS is broken."
+msgstr "Rosak"
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+#, fuzzy
+msgid "Can not continue."
+msgstr "OTRS Verifyâ„¢ tidak boleh diteruskan."
+
+#: e2fsck/pass3.c:77
+#, fuzzy
+msgid "inode done bitmap"
+msgstr ", Bitmap inode di"
+
+#: e2fsck/pass3.c:86
+#, fuzzy
+msgid "Peak memory"
+msgstr "Puncak"
+
+#: e2fsck/pass3.c:149
+#, fuzzy
+msgid "Pass 3"
+msgstr "Ulangan 3: Memeriksa sambungan @d\n"
+
+#: e2fsck/pass3.c:355
+#, fuzzy
+msgid "inode loop detection bitmap"
+msgstr ", Bitmap inode di"
+
+#: e2fsck/pass4.c:289
+#, fuzzy
+msgid "Pass 4"
+msgstr "Katalaluan: "
+
+#: e2fsck/pass5.c:79
+#, fuzzy
+msgid "Pass 5"
+msgstr "Katalaluan: "
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:53
+#, fuzzy
+msgid "(no prompt)"
+msgstr "Jenis makluman"
+
+#: e2fsck/problem.c:54
+#, fuzzy
+msgid "Fix"
+msgstr "Baiki Bahasa"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Padam"
+
+#: e2fsck/problem.c:56
+#, fuzzy
+msgid "Relocate"
+msgstr "Tempat semula"
+
+#: e2fsck/problem.c:57
+#, fuzzy
+msgid "Allocate"
+msgstr "tak dapat memperuntukkan warna \"%s\""
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Kembang"
+
+#: e2fsck/problem.c:59
+#, fuzzy
+msgid "Connect to /lost+found"
+msgstr "Hilang Kata Laluan"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Cipta"
+
+#: e2fsck/problem.c:61
+#, fuzzy
+msgid "Salvage"
+msgstr "Sisaan"
+
+#: e2fsck/problem.c:62
+#, fuzzy
+msgid "Truncate"
+msgstr "Pangkaskan"
+
+#: e2fsck/problem.c:63
+#, fuzzy
+msgid "Clear inode"
+msgstr "kosongkan"
+
+#: e2fsck/problem.c:64
+#, fuzzy
+msgid "Abort"
+msgstr "Henti Paksa"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Pisah"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Teruskan"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr ""
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Padam fail"
+
+#: e2fsck/problem.c:69
+#, fuzzy
+msgid "Suppress messages"
+msgstr "Paksa mesej"
+
+#: e2fsck/problem.c:70
+#, fuzzy
+msgid "Unlink"
+msgstr "nyahpaut"
+
+#: e2fsck/problem.c:71
+#, fuzzy
+msgid "Clear HTree index"
+msgstr "kosongkan"
+
+#: e2fsck/problem.c:72
+#, fuzzy
+msgid "Recreate"
+msgstr "Cipta semula folder yang tersimpan dalam arkib"
+
+#: e2fsck/problem.c:73
+#, fuzzy
+msgid "Optimize"
+msgstr "Mengoptimumkan"
+
+#: e2fsck/problem.c:74
+#, fuzzy
+msgid "Clear flag"
+msgstr "_Buang Bendera"
+
+#: e2fsck/problem.c:83
+#, fuzzy
+msgid "(NONE)"
+msgstr "[tiada]"
+
+#: e2fsck/problem.c:84
+#, fuzzy
+msgid "FIXED"
+msgstr "tetap"
+
+#: e2fsck/problem.c:85
+#, fuzzy
+msgid "CLEARED"
+msgstr "Padamkan"
+
+#: e2fsck/problem.c:86
+#, fuzzy
+msgid "RELOCATED"
+msgstr ""
+"Padam ruangkerja semasa. semua ahli tetingkap akan dipindahkan ke \n"
+"ruangkerja terdahulu."
+
+#: e2fsck/problem.c:87
+#, fuzzy
+msgid "ALLOCATED"
+msgstr "Sama ada penimbal kedalaman diperuntuk"
+
+#: e2fsck/problem.c:88
+#, fuzzy
+msgid "EXPANDED"
+msgstr "dikembang"
+
+#: e2fsck/problem.c:89
+#, fuzzy
+msgid "RECONNECTED"
+msgstr "Berjaya menyambung semula dengan pelayan meta!"
+
+#: e2fsck/problem.c:90
+#, fuzzy
+msgid "CREATED"
+msgstr "Dicipta"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr ""
+
+#: e2fsck/problem.c:92
+#, fuzzy
+msgid "TRUNCATED"
+msgstr "GIF: strim data dilihat seperti dipotong."
+
+#: e2fsck/problem.c:93
+#, fuzzy
+msgid "INODE CLEARED"
+msgstr "Amaran: blok tidak sah %u terdapat di dalam blok inode buruk. Dibersihkan.\n"
+
+#: e2fsck/problem.c:94
+#, fuzzy
+msgid "ABORTED"
+msgstr "dibatalkan"
+
+#: e2fsck/problem.c:95
+#, fuzzy
+msgid "SPLIT"
+msgstr "Pisah"
+
+#: e2fsck/problem.c:96
+#, fuzzy
+msgid "CONTINUING"
+msgstr "Menyambung semula"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr ""
+
+#: e2fsck/problem.c:98
+#, fuzzy
+msgid "FILE DELETED"
+msgstr "%d fail dipadam"
+
+#: e2fsck/problem.c:99
+#, fuzzy
+msgid "SUPPRESSED"
+msgstr "Sama ada hendak tunjukkan output HTML terpaksa"
+
+#: e2fsck/problem.c:100
+#, fuzzy
+msgid "UNLINKED"
+msgstr "Ralat menutup fail kunci (nyahpaut) \"%s\": %s"
+
+#: e2fsck/problem.c:101
+#, fuzzy
+msgid "HTREE INDEX CLEARED"
+msgstr "Padamkan"
+
+#: e2fsck/problem.c:102
+#, fuzzy
+msgid "WILL RECREATE"
+msgstr "Cipta semula folder yang tersimpan dalam arkib"
+
+#: e2fsck/problem.c:103
+#, fuzzy
+msgid "WILL OPTIMIZE"
+msgstr "Mengoptimumkan"
+
+#: e2fsck/problem.c:104
+#, fuzzy
+msgid "FLAG CLEARED"
+msgstr "Padamkan"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@b @B untuk @g %g tiada didalam @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@i @B untuk @g %g tiada didalam @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr ""
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "@S first_data_@b = %b, sepatutnya adalah %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+#, fuzzy
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "%n milisaat"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, fuzzy, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Ralat ketika menentukan sama ada %s telah dilekapkan.\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+#, fuzzy
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "'..' dalam %Q (%i) adalah %P (%j), @s %q (%d).\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, fuzzy, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "'..' dalam %Q (%i) adalah %P (%j), @s %q (%d).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+#, fuzzy
+msgid "Can't find external @j\n"
+msgstr "Tidak dapat mencari objek piawai"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+#, fuzzy
+msgid "External @j has bad @S\n"
+msgstr "%s: fail `%s' mempunyai cecikut magik buruk\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+#, fuzzy
+msgid "External @j does not support this @f\n"
+msgstr "Cdrdao %1 tidak menyokong overburning."
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+#, fuzzy
+msgid "@j @S is corrupt.\n"
+msgstr "J"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr ""
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+#, fuzzy
+msgid "Clear @j"
+msgstr "J$"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr ""
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr ""
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+#, fuzzy
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@i %i (%Q) adalah @I @b @v.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+#, fuzzy
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Fail Telah Ada dalam Senarai"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, fuzzy, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "%i × %i piksel %s %i%%"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, fuzzy, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "I/O sekarang dibolehkan"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+#, fuzzy
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Gzip tidak disokong oleh versi zlib ini"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, fuzzy, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr "Direktori Untuk Dikembalikan Dari"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, fuzzy, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr "Ralat ketika mengalih."
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+#, fuzzy
+msgid "Run @j anyway"
+msgstr "-J <nombor>"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+#, fuzzy
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr "Toggle salinan fail asal"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr ""
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+#, fuzzy
+msgid "Resize @i not valid. "
+msgstr "\"%s\" adalah bukan nilai atribut ubahsaiz yang sah"
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, fuzzy, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Tetap masa untuk memaparkan hint:"
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+#, fuzzy
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr "Menambah jurnal ke peranti %s:"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+#, fuzzy
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Saiz tab \"%s\" yang diminta tidak sah"
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+#, fuzzy
+msgid "Last @g @b @B uninitialized. "
+msgstr "@i @B untuk @g %g tiada didalam @g. (@b %b)\n"
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr ""
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+#, fuzzy
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Saiz tab \"%s\" yang diminta tidak sah"
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr ""
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr ""
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+#, fuzzy
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "@i %i (%Q) adalah soket @I.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+#, fuzzy
+msgid "@S has invalid MMP block. "
+msgstr "Blok vendor %s tidak sah"
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+#, fuzzy
+msgid "@S has invalid MMP magic. "
+msgstr "MMP: nombor magic tidak sah"
+
+#: e2fsck/problem.c:456
+#, fuzzy, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "%a dari %m"
+
+#: e2fsck/problem.c:462
+#, fuzzy, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "Huraian Pendek: %s\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr ""
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+#, fuzzy
+msgid "@S MMP @b checksum does not match. "
+msgstr "Pengiraan bitmap MMP tidak sepadan"
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr ""
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+#, fuzzy
+msgid "External @j @S checksum does not match @S. "
+msgstr "Cdrdao %1 tidak menyokong overburning."
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+#, fuzzy
+msgid "Invalid %U @q @i %i. "
+msgstr "@i %i (%Q) adalah @I FIFO.\n"
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr ""
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+#, fuzzy
+msgid "@r is not a @d. "
+msgstr "@r adalah bukan @d; menghentikan.\n"
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+#, fuzzy
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "@i %i (%Q) mempunyai mod @n (%Im).\n"
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, fuzzy, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "i_blocks_hi @F %N, @s sifar.\n"
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr ""
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, fuzzy, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "@u @z @i %i. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+#, fuzzy
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "@i @B untuk @g %g tiada didalam @g. (@b %b)\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+#, fuzzy
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "@i @B untuk @g %g tiada didalam @g. (@b %b)\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+#, fuzzy
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "@i @B untuk @g %g tiada didalam @g. (@b %b)\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+#, fuzzy
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "warna [R,G,B] teruk"
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+#, fuzzy
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "@i @B untuk @g %g tiada didalam @g. (@b %b)\n"
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+#, fuzzy
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "Symlink %Q (@i #%i) adalah @n.\n"
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+#, fuzzy
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "i_frag @F %N, @s sifar.\n"
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+#, fuzzy
+msgid "@I %B (%b) in @i %i. "
+msgstr "<b><i>Perintah</i></b>"
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+#, fuzzy
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "&Dalam pelayar web"
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, fuzzy, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "<b>%s</b> (versi <i>%s</i>) akan dipasang\n"
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr ""
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+#, fuzzy
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "<b><i>Perintah</i></b>"
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+#, fuzzy
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Parameter tidak sah telah diterima."
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+#, fuzzy
+msgid "Duplicate or bad @b in use!\n"
+msgstr "<b>_Guna pengesahihan</b>"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr ""
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+#, fuzzy
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "gid/nama kumpulan buruk - %s"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+#, fuzzy
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "&Cari Bantuan"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, fuzzy, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+"\n"
+"Buffer ditulis ke %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+#, fuzzy
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Direktori Untuk Dikembalikan Dari"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, fuzzy, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "%s %g — %g, lalai %g"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+#, fuzzy
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Amaran: tidak dapat membaca blok 0: %s\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+#, fuzzy
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Tidak dapat menulis kepada fail %s"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A @i @B (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A @b @B (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, fuzzy, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "Maklumat Peranti Terlampir"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, fuzzy, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "%a, %b %d / %H∶%M"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, fuzzy, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Ralat menyahumpuk @i %i: %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, fuzzy, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Ralat menyahumpuk @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr ""
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+#, fuzzy
+msgid "@j @i is not in use, but contains data. "
+msgstr "Data EXIF mengandungi gambar kecil (%i byte)."
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+#, fuzzy
+msgid "@j is not regular file. "
+msgstr "J"
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, fuzzy, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "I/O sekarang dibolehkan"
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+#, fuzzy
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A @i @B (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+#, fuzzy
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Ralat membaca @d @b %b (@i %i): %m\n"
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+#, fuzzy
+msgid "@i %i has a bad @a @b %b. "
+msgstr "<b><i>Perintah</i></b>"
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+#, fuzzy
+msgid "Error reading @a @b %b (%m). "
+msgstr "Terdapat ralat semasa membaca folder \"%B\"."
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+#, fuzzy
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "@p @h %d: nod (%B) mempunyai @n bilangan (%N)\n"
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+#, fuzzy
+msgid "Error writing @a @b %b (%m). "
+msgstr "Ralat menyalin dalam gantian @b @B: %m\n"
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+#, fuzzy
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "Mempunyai &Heading"
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+#, fuzzy
+msgid "@A @a region allocation structure. "
+msgstr "Peruntukan"
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+#, fuzzy
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "<b>Allocation</b>"
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+#, fuzzy
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "<b>Nama Profil</b>"
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+#, fuzzy
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "@A @i @B (%N): %m\n"
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, fuzzy, no-c-format
+msgid "@i %i is too big. "
+msgstr "Regular expression terlalu besar"
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr ""
+
+#: e2fsck/problem.c:891
+#, fuzzy
+msgid "%B (%b) causes file to be too big. "
+msgstr "<big><b>Fail telah wujud</b></big>\n"
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr ""
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, fuzzy, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "@p @h %d: nod root node ialah @n\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+#, fuzzy
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "Sijil tidak mempunyai ciri disokong."
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr ""
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr ""
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+#, fuzzy
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "@i %i (%Q) mempunyai mod @n (%Im).\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr ""
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+#, fuzzy
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "@i %i (%Q) mempunyai mod @n (%Im).\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr ""
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, fuzzy, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Ralat berlaku bila cuba menyalin cekupan skrin."
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr ""
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr ""
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, fuzzy, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Ralat menyalin dalam gantian @b @B: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+#, fuzzy
+msgid "@q @i is not a regular file. "
+msgstr "@i %i (%Q) adalah soket @I.\n"
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+#, fuzzy
+msgid "@q @i is not in use, but contains data. "
+msgstr "Data EXIF mengandungi gambar kecil (%i byte)."
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+#, fuzzy
+msgid "@q @i is visible to the user. "
+msgstr "Symlink %Q (@i #%i) adalah @n.\n"
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+#, fuzzy
+msgid "The bad @b @i looks @n. "
+msgstr "@A @i @B (%N): %m\n"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, fuzzy, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "Regular expression terlalu besar"
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr ""
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+#, fuzzy
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "@A baru @d @b untuk @i %i (%s): %m\n"
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, fuzzy, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "@d @i %i mempunyai @b tidak diumpuk #%B. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+#, fuzzy
+msgid "@A @x region allocation structure. "
+msgstr "Struktur utama yang mengandungi maklumat berasaskan kawasan"
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+#, fuzzy
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "Kehabisan memori ketika memadam sektor %d-%d\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, fuzzy, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "Nama terlalu panjang"
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+#, fuzzy
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i (%Q) mempunyai mod @n (%Im).\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, fuzzy, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "@d @i %i mempunyai @b tidak diumpuk #%B. "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr ""
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr ""
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, fuzzy, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "%s: fail terlalu pendek untuk menjadi fail gmon\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, fuzzy, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "%A, %-d %B %Y pada %-I:%M:%S %p"
+
+#: e2fsck/problem.c:1310
+#, fuzzy, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Ralat apabila membaca fail."
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, fuzzy, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A baru @d @b untuk @i %i (%s): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+#, fuzzy
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Ralat menyalin dalam penggantian @i @B: %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr ""
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+#, fuzzy
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "@i %i (%Q) mempunyai mod @n (%Im).\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+#, fuzzy
+msgid "\t<@f metadata>\n"
+msgstr "Data meta"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+#, fuzzy
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr "HYPGEOMDIST(x; n; M; N)"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1383
+#, fuzzy, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Tidak dapat membuka fail profil"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+#, fuzzy
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Mengoptimakan direktori"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, fuzzy, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Gagal untuk mengoptima direktori %q (%d): %m"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+#, fuzzy
+#| msgid "Optimizing directories: "
+msgid "Optimizing @x trees: "
+msgstr "Mengoptimumkan direktori: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+#, fuzzy
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Ulangan 3: Memeriksa sambungan @d\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, fuzzy, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Symlink %Q (@i #%i) adalah @n.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+#, fuzzy
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@i %i (%Q) mempunyai mod @n (%Im).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+#, fuzzy
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+"amaran: %u blok tidak digunakan.\n"
+"\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+#, fuzzy
+msgid "@E @L to '.' "
+msgstr "%b %e %l:%M %p"
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+#, fuzzy
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "%a %e %b_%l:%M %p"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+#, fuzzy
+msgid "@E @L to the @r.\n"
+msgstr "%a %e %b_%R:%S"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, fuzzy, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "/@l adalah bukan sejenis @d (ino=%i)\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, fuzzy, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "/@l adalah bukan sejenis @d (ino=%i)\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+#, fuzzy
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Pergi ke fail pertama dalam senarai"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr @F %IF, @s sifar.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+#, fuzzy
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_faddr @F %IF, @s sifar.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+#, fuzzy
+#| msgid "i_fsize @F %N, @s zero.\n"
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_fsize @F %N, @s sifar.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N, @s sifar.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N, @s sifar.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) mempunyai mod @n (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@d @i %i, @b %B, offset %N: @d rosak\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@d @i %i, @b %B, offset %N: namafail terlalu panjang\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+#, fuzzy
+msgid "@d @i %i has an unallocated %B. "
+msgstr "%b %d %I∶%M %p"
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) adalah @I aksara @v.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) adalah @I @b @v.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E adalah salinan '.' @e.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E adalah salinan '..' @e.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, fuzzy, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "Nombor ajaib yang salah untuk struktur icount"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Ralat mengulang ke atas @d @bs: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Ralat membaca @d @b %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Ralat menulis @d @b %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A baru @d @b untuk @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Ralat menyahumpuk @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, fuzzy, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "%B %e %Y, %I∶%M∶%S %p"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) adalah @I FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) adalah soket @I.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Menetapkan jenisfail untuk @E ke %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "@E mempunyai jenisfail ditetapkan.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "@E mempunyai nama @z.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symlink %Q (@i #%i) adalah @n.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+#, fuzzy
+msgid "@a @b @F @n (%If).\n"
+msgstr "@A @b @B (%N): %m\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+#, fuzzy
+msgid "@p @h %d: %B not referenced\n"
+msgstr "%b %d, %H∶%M"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+#, fuzzy
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p @h %d (%q): buruk @b nombor %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+#, fuzzy
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p @h %d: nod (%B) mempunyai kedalaman @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+#, fuzzy
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p @h %d: nod (%B) mempunyai kedalaman @n\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "@n @h %d (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p @h %d (%q): buruk @b nombor %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p @h %d: nod root node ialah @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+#, fuzzy
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p @h %d: nod (%B) mempunyai had @n (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+#, fuzzy
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p @h %d: nod (%B) mempunyai @n bilangan (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+#, fuzzy
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p @h %d: nod (%B) mempunyai kedalaman @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+#, fuzzy
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p @h %d: nod (%B) mempunyai kedalaman @n\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Salinan @E dijumpai. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, @s sifar.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "@b tidak dijangka dalam @h %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+#, fuzzy
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, @s sifar.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, fuzzy, no-c-format
+#| msgid "@p @h %d: root node is @n\n"
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p @h %d: nod root node ialah @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, fuzzy, no-c-format
+#| msgid "@p @h %d: root node is @n\n"
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p @h %d: nod root node ialah @n\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@d @i %i, @b %B, offset %N: @d rosak\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+#, fuzzy
+msgid "Encrypted @E is too short.\n"
+msgstr "Tajuk filem terlalu pendek"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr ""
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+#, fuzzy
+#| msgid "Duplicate @E found. "
+msgid "Duplicate filename @E found. "
+msgstr "Salinan @E dijumpai. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Ulangan 3: Memeriksa sambungan @d\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "@r tidak diumpukkan. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Tiada ruang dalam @l @d. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, fuzzy, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "@i %i (%Q) adalah @I FIFO.\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/@l tidak dijumpai. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' dalam %Q (%i) adalah %P (%j), @s %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr ""
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Tidak dapat mengembang /@l: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Tidak dapat menyambung semula %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Ralat ketika cuba mencari /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr ""
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr ""
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr ""
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Tidak dapat membaiki induk untuk @i %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Ralat mencipta root @d (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Ralat mencipta /@l @d (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r adalah bukan @d; menghentikan.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Tidak dapat meneruskan tanpa @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l adalah bukan sejenis @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+#, fuzzy
+msgid "/@l has inline data\n"
+msgstr "Inode tidak mempunyai data sebaris"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+#, fuzzy
+msgid "/@l is encrypted\n"
+msgstr "Disulitkan oleh:"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, fuzzy, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "'..' dalam %Q (%i) adalah %P (%j), @s %q (%d).\n"
+
+#: e2fsck/problem.c:2002
+#, fuzzy
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Mengoptimumkan direktori: "
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2013
+#, fuzzy
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Gagal untuk mengoptima direktori %q (%d): %m"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Mengoptimumkan direktori: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "@u @z @i %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "@u @i %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr ""
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+#, fuzzy
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "i_fsize @F %N, @s sifar.\n"
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+#, fuzzy
+msgid "Padding at end of @b @B is not set. "
+msgstr "<b>Tetapkan Aplikasi Kegemaran</b>"
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "@b @B perbezaan: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "@i @B perbezaan: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Ralat menyalin dalam penggantian @i @B: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Ralat menyalin dalam gantian @b @B: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+#, fuzzy
+msgid "Recreate @j"
+msgstr "Cipta semula folder yang tersimpan dalam arkib"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, fuzzy, no-c-format
+#| msgid "while setting block group checksum info"
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "ketika menetapkan maklumat checksum kumpulan blok"
+
+#: e2fsck/problem.c:2254
+#, fuzzy, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Ralat memadam gulungan mel.\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2265
+#, fuzzy
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Ralat memadam gulungan mel.\n"
+
+#: e2fsck/problem.c:2430
+#, fuzzy, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Ralat LDAP 0x%x (%s)"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "DIABAIKAN"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+#, fuzzy
+msgid "in move_quota_inode"
+msgstr "Inod"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr ""
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "saiz inod=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+#, fuzzy
+msgid "while opening inode scan"
+msgstr "ketika memulakan pengesanan inod"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "ketika memulakan pengesanan inod"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "ketika melakukan pengesanan inod"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "ketika mengosongkan inod jurnal"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr ""
+
+#: e2fsck/super.c:375
+#, fuzzy
+msgid "Truncating"
+msgstr "Ralat tidak diketahui #0 dikendalikan ketika memangkas fail."
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "Mengosongkan"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+
+#: e2fsck/unix.c:138
+#, fuzzy, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: bersih, %u/%u fail, %u/%u blok"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+
+#: e2fsck/unix.c:187
+#, fuzzy
+msgid " Extent depth histogram: "
+msgstr "Kedalaman:"
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] ""
+
+#: e2fsck/unix.c:201
+#, fuzzy, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u fifo\n"
+
+#: e2fsck/unix.c:203
+#, fuzzy, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u fifo\n"
+
+#: e2fsck/unix.c:205
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] "Bukan satu fail nalar."
+
+#: e2fsck/unix.c:207
+#, fuzzy, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u fifo\n"
+
+#: e2fsck/unix.c:209
+#, fuzzy, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "/dev/urandom bukan peranti aksara"
+
+#: e2fsck/unix.c:212
+#, fuzzy, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "Peranti blok"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+
+#: e2fsck/unix.c:216
+#, fuzzy, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u fifo\n"
+
+#: e2fsck/unix.c:218
+#, fuzzy, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "pautan simbolik"
+
+#: e2fsck/unix.c:220
+#, fuzzy, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "Cipta pautan simbolik ke fail."
+
+#: e2fsck/unix.c:224
+#, fuzzy, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "soket"
+
+#: e2fsck/unix.c:228
+#, fuzzy, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fifo\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "ketika menentukan sama ada %s telah dilekapkan."
+
+#: e2fsck/unix.c:262
+#, fuzzy, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "%s dilekapkan; "
+
+#: e2fsck/unix.c:265
+#, fuzzy, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "%s Amaran"
+
+#: e2fsck/unix.c:271
+#, fuzzy, c-format
+#| msgid "%s is mounted. "
+msgid "%s is mounted.\n"
+msgstr "%s dilekapkan; "
+
+#: e2fsck/unix.c:273
+#, fuzzy, c-format
+#| msgid "%s is mounted. "
+msgid "%s is in use.\n"
+msgstr "Menetapkan %s untuk tidak guna satu anak pusat"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Tidak dapat meneruskan, membatalkan.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Adakah anda pasti untuk meneruskan"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "pemeriksaan dibatalkan.\n"
+
+#: e2fsck/unix.c:378
+#, fuzzy
+msgid " contains a file system with errors"
+msgstr "%s mengandungi sistem fail %s\n"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " telah tidak dinyahlekap dengan bersih"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr ""
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", pemeriksaan dipaksa.\n"
+
+#: e2fsck/unix.c:446
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: bersih, %u/%u fail, %u/%u blok"
+
+#: e2fsck/unix.c:466
+#, fuzzy
+msgid " (check deferred; on battery)"
+msgstr "Ditangguhkan"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (periksa selepas lekapan akan datang)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (diperiksa daiam lekapan %ld)"
+
+#: e2fsck/unix.c:621
+#, fuzzy, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "RALAT: tidak dapat buka %s untuk penulisan"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Versi EA tidak sah.\n"
+
+#: e2fsck/unix.c:705
+#, fuzzy
+#| msgid "Invalid resize parameter: %s\n"
+msgid "Invalid readahead buffer size.\n"
+msgstr "Penimbal mengandungi aksara-aksara tidak sah."
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Pilihan lanjutan tidak diketahui: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:789
+#, fuzzy
+#| msgid "Invalid resize parameter: %s\n"
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "Saiz penimbal FIFO (dalam kb)"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Ralat mengesahkan penghurai fail %d: %s\n"
+
+#: e2fsck/unix.c:879
+#, fuzzy
+msgid "Invalid completion information file descriptor"
+msgstr "Ralat mendapatkan maklumat untuk penerang fail: %s"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+
+#: e2fsck/unix.c:915
+#, fuzzy, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Pilihan “%s†tidak lagi disokong dalam versi gnome-terminal ini."
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Tidak dapat menghurai '%s'"
+
+#: e2fsck/unix.c:1004
+#, fuzzy
+msgid "The -n and -D options are incompatible."
+msgstr "pilihan -l dan -s tidak sepadan"
+
+#: e2fsck/unix.c:1009
+#, fuzzy
+msgid "The -n and -c options are incompatible."
+msgstr "pilihan -l dan -s tidak sepadan"
+
+#: e2fsck/unix.c:1014
+#, fuzzy
+msgid "The -n and -l/-L options are incompatible."
+msgstr "pilihan -l dan -s tidak sepadan"
+
+#: e2fsck/unix.c:1038
+#, fuzzy
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "pilihan -l dan -s tidak sepadan"
+
+#: e2fsck/unix.c:1044
+#, fuzzy
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "pilihan -l dan -s tidak sepadan"
+
+#: e2fsck/unix.c:1095
+#, fuzzy, c-format
+msgid "while opening %s for flushing"
+msgstr "Ralat mengosongkan sambungan: %s\n"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, fuzzy, c-format
+msgid "while trying to flush %s"
+msgstr "ketika cuba untuk melaksana '%s'"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1155
+#, fuzzy, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr "integer diluar julat: %s"
+
+#: e2fsck/unix.c:1164
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr "%s: hujah tidak sah untuk %s%c escape"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "Pengiraan bitmap MMP tidak sepadan"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1302
+#, fuzzy
+msgid "while reading MMP block"
+msgstr "Pengiraan bitmap MMP tidak sepadan"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "ketika cuba untuk memadam %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr "Ralat berlaku bila membaca fail"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "ketika cuba memulakan program"
+
+#: e2fsck/unix.c:1477
+#, fuzzy, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+"[%s] panjang titik perpuluhan (dalam lokal) tidak disokong: >%s<\n"
+"Anda mungkin menghadapi masalah bila menggunakan %s! %s\n"
+")"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s mencuba backup blok...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Superblok tidak sah,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Pemerihal kumpulan kelihatan buruk..."
+
+#: e2fsck/unix.c:1563
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "Menggunakan nama sandar: %s"
+
+#: e2fsck/unix.c:1567
+#, fuzzy, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "ketika membaca superblok jurnal"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1603
+#, fuzzy
+msgid "Could this be a zero-length partition?\n"
+msgstr "rujukan simbolik panjang-sifar"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1617
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "rujukan ke subpola tidak-wujud"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1710
+#, fuzzy
+msgid "Get a newer version of e2fsck!"
+msgstr "Versi baru (%s) telah dipasang."
+
+#: e2fsck/unix.c:1770
+#, fuzzy, c-format
+msgid "while checking journal for %s"
+msgstr "ketika mendapatkan semula jurnal ext3 bagi %s"
+
+#: e2fsck/unix.c:1773
+#, fuzzy
+#| msgid "Cannot proceed without a @r.\n"
+msgid "Cannot proceed with file system check"
+msgstr "tak dapat membaca maklumat sistem fail bagi %s"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1796
+#, fuzzy, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "Bendera bagi %s ditetapkan sebagai "
+
+#: e2fsck/unix.c:1802
+#, fuzzy, c-format
+#| msgid "Journal superblock not found!\n"
+msgid "Journal checksum error found in %s\n"
+msgstr "%s: hasil tambah semak teruk (dijangka %u, temui %u)\n"
+
+#: e2fsck/unix.c:1806
+#, fuzzy, c-format
+#| msgid "Journal removed\n"
+msgid "Journal corrupted in %s\n"
+msgstr "Menambah jurnal ke peranti %s: "
+
+#: e2fsck/unix.c:1810
+#, fuzzy, c-format
+#| msgid "while recovering ext3 journal of %s"
+msgid "while recovering journal of %s"
+msgstr "ketika mendapatkan semula jurnal ext3 bagi %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s tidak mempunyai ciri disokong:"
+
+#: e2fsck/unix.c:1847
+#, fuzzy, c-format
+#| msgid "%s has unsupported feature(s):"
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "Pengekodan \"%s\" tidak disokong"
+
+#: e2fsck/unix.c:1897
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "ketika menetapkan inod blok buruk"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Mencipta jurnal (%d blok): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " Selesai.\n"
+
+#: e2fsck/unix.c:1954
+#, fuzzy
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr "Sistemfail telah mempunyai jurnal.\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "dibatalkan"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck dibatalkan.\n"
+
+#: e2fsck/unix.c:1989
+#, fuzzy
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Teruskan dari permulaan?"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "ketika mengulangtetap konteks"
+
+#: e2fsck/unix.c:2052
+#, fuzzy, c-format
+#| msgid ""
+#| "\n"
+#| "%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr "%s: Ralat ditemui dalam fail. Menghenti paksa.\n"
+
+#: e2fsck/unix.c:2054
+#, fuzzy, c-format
+msgid "%s: File system was modified.\n"
+msgstr ""
+"\n"
+"%s: ***** SISTEM FAIL TELAH DIUBAHSUAI *****\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** SISTEM FAIL TELAH DIUBAHSUAI *****\n"
+
+#: e2fsck/unix.c:2063
+#, fuzzy, c-format
+#| msgid "%s: ***** REBOOT LINUX *****\n"
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** ULANGBOOT LINUX *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "yY"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "tTnN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "aA"
+
+#: e2fsck/util.c:197
+#, fuzzy
+msgid " ('a' enables 'yes' to all) "
+msgstr "Ya untuk se_mua"
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<y>"
+
+#: e2fsck/util.c:216
+#, fuzzy
+msgid "<n>"
+msgstr "Tidak tersedia"
+
+#: e2fsck/util.c:218
+#, fuzzy
+msgid " (y/n)"
+msgstr "[y|T]"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "dibatalkan!\n"
+
+#: e2fsck/util.c:274
+#, fuzzy
+msgid "yes to all\n"
+msgstr "Ya untuk se_mua"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "ya\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "tidak\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? tidak\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ya\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "ya"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "tidak"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:317
+#, fuzzy
+msgid "reading inode and block bitmaps"
+msgstr "ketika membaca bitmap"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:341
+#, fuzzy
+msgid "writing block and inode bitmaps"
+msgstr "Peta bit inode tidak sama"
+
+#: e2fsck/util.c:346
+#, fuzzy, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "ketika menulis bitmap blok"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, fuzzy, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Memori digunakan: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:453
+#, fuzzy, c-format
+msgid "Memory used: %lluk, "
+msgstr "Ingatan: %ldMB dari %ldMB digunakan"
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "masa: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "masa lepas: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, fuzzy, c-format
+msgid "while reading inode %lu in %s"
+msgstr "ketika membaca inod jurnal"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, fuzzy, c-format
+msgid "while writing inode %lu in %s"
+msgstr "ketika menulis jadual inod"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+#, fuzzy
+msgid "done \n"
+msgstr "selesai \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:337
+#, fuzzy
+msgid "Testing with random pattern: "
+msgstr "Pengujian"
+
+#: misc/badblocks.c:355
+#, fuzzy
+msgid "Testing with pattern 0x"
+msgstr "Cuba, ..."
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "ketika mencari"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:485
+#, fuzzy
+msgid "during ext2fs_sync_device"
+msgstr "Peranti tidak dapat digunakan ketika kemas kini."
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Memeriksa blok %lu ke %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Dari blok %lu ke %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Membaca dan membanding: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+
+#: misc/badblocks.c:803
+#, fuzzy
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr "Membersihkan..."
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s dilekapkan; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:1013
+#, fuzzy
+msgid "it's not safe to run badblocks!\n"
+msgstr "blok buruk dipaksa juga.\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, fuzzy, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "G_una fon lebar tetap sistem (%s)"
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "blok buruk dipaksa juga.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s tidak sah - %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr ""
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1207
+#, fuzzy, c-format
+#| msgid "invalid block size - %s"
+msgid "Invalid block size: %d\n"
+msgstr "saiz blok tidak sah - %s"
+
+#: misc/badblocks.c:1213
+#, fuzzy, c-format
+#| msgid "Invalid blocksize parameter: %s\n"
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Hanya %d blok tersedia"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "blok terakhir"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "blok pertama"
+
+#: misc/badblocks.c:1247
+#, fuzzy, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "blok permulaan tidak sah (%lu): mesti kurang dari %lu"
+
+#: misc/badblocks.c:1255
+#, fuzzy, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "blok permulaan tidak sah (%lu): mesti kurang dari %lu"
+
+#: misc/badblocks.c:1311
+#, fuzzy
+msgid "while creating in-memory bad blocks list"
+msgstr "ketika membaca dalam senarai blok buruk dari fail"
+
+#: misc/badblocks.c:1320
+#, fuzzy
+msgid "input file - bad format"
+msgstr "Format fail rosak."
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr ""
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Penggunaan: %s [-RVf] [-+=AacDdijsSu] [-v versi] fail...\n"
+
+#: misc/chattr.c:162
+#, fuzzy, c-format
+#| msgid "bad version - %s\n"
+msgid "bad project - %s\n"
+msgstr "URI tidak elok: %s"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versi buruk - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "ketika cuba untuk stat %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "ketika membaca penanda pada %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Bendera bagi %s ditetapkan sebagai "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "ketika menetapkan penanda pada %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versi %s ditetapkan sebagai %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "ketika menetapkan versi pada %s"
+
+#: misc/chattr.c:273
+#, fuzzy, c-format
+#| msgid "Version of %s set as %lu\n"
+msgid "Project of %s set as %lu\n"
+msgstr "Versi %s ditetapkan sebagai %lu\n"
+
+#: misc/chattr.c:277
+#, fuzzy, c-format
+#| msgid "while setting version on %s"
+msgid "while setting project on %s"
+msgstr "ketika menetapkan penanda pada %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= tidak sepadan dengan - dan +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Mesti menggunakan '-v', =, - atau +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, fuzzy, c-format
+msgid "while reading inode %u"
+msgstr "ketika membaca inod root"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+#, fuzzy
+msgid "while expanding directory"
+msgstr "Ralat berlaku semasa memuatkan direktori"
+
+#: misc/create_inode.c:97
+#, fuzzy, c-format
+#| msgid "while opening %s"
+msgid "while linking \"%s\""
+msgstr "Hubungikan..."
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, fuzzy, c-format
+msgid "while writing inode %u"
+msgstr "ketika menulis jadual inod"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, fuzzy, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "Ralat menyenaraikan dir pada '%s': %s"
+
+#: misc/create_inode.c:165
+#, fuzzy, c-format
+msgid "while opening inode %u"
+msgstr "ketika melakukan pengesanan inod"
+
+#: misc/create_inode.c:172
+#, fuzzy, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "ketika membaca inod jurnal"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+#, fuzzy
+msgid "while allocating memory"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, fuzzy, c-format
+#| msgid "while reading flags on %s"
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr ""
+"Terdapat ralat ketika pembacaan CD:\n"
+"\n"
+"%s"
+
+#: misc/create_inode.c:223
+#, fuzzy, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "ketika menulis inod jurnal"
+
+#: misc/create_inode.c:233
+#, fuzzy, c-format
+#| msgid "while doing inode scan"
+msgid "while closing inode %u"
+msgstr "ketika melakukan pengesanan inod"
+
+#: misc/create_inode.c:283
+#, fuzzy, c-format
+#| msgid "while allocating buffers"
+msgid "while allocating inode \"%s\""
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/create_inode.c:302
+#, fuzzy, c-format
+msgid "while creating inode \"%s\""
+msgstr "Ralat ketika mencipta fail %s."
+
+#: misc/create_inode.c:368
+#, fuzzy, c-format
+#| msgid "while reading flags on %s"
+msgid "while creating symlink \"%s\""
+msgstr "Terdapat ralat ketika mencipta pautan simbolik di dalam %s."
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, fuzzy, c-format
+msgid "while looking up \"%s\""
+msgstr "Ralat semasa mencari takrifan"
+
+#: misc/create_inode.c:406
+#, fuzzy, c-format
+#| msgid "while creating root dir"
+msgid "while creating directory \"%s\""
+msgstr "Ralat ketika mencipta direktori %s."
+
+#: misc/create_inode.c:636
+#, fuzzy, c-format
+#| msgid "while opening %s"
+msgid "while opening \"%s\" to copy"
+msgstr "ketika membuka %s"
+
+#: misc/create_inode.c:828
+#, fuzzy, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "Semasa menukar %s:"
+
+#: misc/create_inode.c:838
+#, fuzzy, c-format
+#| msgid "while creating root dir"
+msgid "while scanning directory \"%s\""
+msgstr "Mengimbas %s"
+
+#: misc/create_inode.c:848
+#, fuzzy, c-format
+#| msgid "while trying to stat %s"
+msgid "while lstat \"%s\""
+msgstr "tak dapat lstat %s"
+
+#: misc/create_inode.c:898
+#, fuzzy, c-format
+msgid "while creating special file \"%s\""
+msgstr "Ralat ketika mencipta fail %s."
+
+#: misc/create_inode.c:907
+#, fuzzy
+msgid "malloc failed"
+msgstr "malloc() gagal. Tidak dapat memperuntukkan memori yang cukup."
+
+#: misc/create_inode.c:915
+#, fuzzy, c-format
+#| msgid "while trying to resize %s"
+msgid "while trying to read link \"%s\""
+msgstr "Ralat berlaku bila membaca fail"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:933
+#, fuzzy, c-format
+msgid "while writing symlink\"%s\""
+msgstr "Ralat semasa menulis ke `%s'"
+
+#: misc/create_inode.c:944
+#, fuzzy, c-format
+msgid "while writing file \"%s\""
+msgstr "Ralat semasa menulis '%s': %s"
+
+#: misc/create_inode.c:957
+#, fuzzy, c-format
+#| msgid "while opening %s"
+msgid "while making dir \"%s\""
+msgstr "ketika mencipta direktori root"
+
+#: misc/create_inode.c:975
+#, fuzzy
+msgid "while changing directory"
+msgstr "Ralat ketika mengubah kata laluan NIS."
+
+#: misc/create_inode.c:981
+#, fuzzy, c-format
+msgid "ignoring entry \"%s\""
+msgstr "[%s] Fail konfigurasi: mengabaikan masukan tidak diketahui %s=%s. %s\n"
+
+#: misc/create_inode.c:994
+#, fuzzy, c-format
+#| msgid "while setting version on %s"
+msgid "while setting inode for \"%s\""
+msgstr "ketika menetapkan inod blok buruk"
+
+#: misc/create_inode.c:1001
+#, fuzzy, c-format
+#| msgid "while setting flags on %s"
+msgid "while setting xattrs for \"%s\""
+msgstr "ketika menetapkan versi pada %s"
+
+#: misc/create_inode.c:1027
+#, fuzzy
+#| msgid "while starting inode scan"
+msgid "while saving inode data"
+msgstr "Ralat ketika menyimpan tangkap layar"
+
+#: misc/create_inode.c:1077
+#, fuzzy
+msgid "while copying xattrs on root directory"
+msgstr "Ralat berlaku semasa menetapkan direktori root"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blok"
+
+#: misc/dumpe2fs.c:168
+#, fuzzy
+msgid "clusters"
+msgstr "Kelompok"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Kumpulan %lu: (Blok "
+
+#: misc/dumpe2fs.c:226
+#, fuzzy, c-format
+msgid " csum 0x%04x"
+msgstr "Tidak diketahui (0x%04x)<br>"
+
+#: misc/dumpe2fs.c:228
+#, fuzzy, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr "Tidak diketahui (0x%04x)<br>"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s superblok di "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Utama"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Backup"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Penerangan kumpulan di "
+
+#: misc/dumpe2fs.c:242
+#, fuzzy
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr "blok dikhaskan"
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Penghurai kumpulan di "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Blok peta bit di "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, fuzzy, c-format
+msgid ", csum 0x%08x"
+msgstr "Eksponen: 0x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+#, fuzzy
+#| msgid ", Inode bitmap at "
+msgid " Inode bitmap at "
+msgstr ", Bitmap inode di"
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Jadual inode di "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u inod tidak digunakan\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Blok bebas: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Inodes bebas: "
+
+#: misc/dumpe2fs.c:340
+#, fuzzy
+msgid "while printing bad block list"
+msgstr "ketika menetapkan inod blok buruk"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Blok buruk: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "ketika membaca inod jurnal"
+
+#: misc/dumpe2fs.c:381
+#, fuzzy
+msgid "while opening journal inode"
+msgstr "ketika membaca inod jurnal"
+
+#: misc/dumpe2fs.c:387
+#, fuzzy
+msgid "while reading journal super block"
+msgstr "ketika membaca superblok jurnal"
+
+#: misc/dumpe2fs.c:394
+#, fuzzy
+msgid "Journal superblock magic number invalid!\n"
+msgstr "MMP: nombor magic tidak sah"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "ketika membaca superblok jurnal"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#: misc/dumpe2fs.c:477
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "gagal memperuntuk penimbal imej bersaiz %u bait"
+
+#: misc/dumpe2fs.c:488
+#, fuzzy, c-format
+#| msgid "Checking blocks %lu to %lu\n"
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Memeriksa blok %lu ke %lu\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+#, fuzzy
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "BMP: Gagal sediakan memori."
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parameter superblok tidak sah: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parameter saiz blok tidak sah: %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, fuzzy, c-format
+msgid "\tUsing %s\n"
+msgstr "Tiada nama kumpulan dinyatakan, menggunakan %s.\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:732
+#, fuzzy, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "Ciri ini diaktifkan!"
+
+#: misc/dumpe2fs.c:763
+#, fuzzy, c-format
+#| msgid "while trying to run '%s'"
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "Ralat berlaku bila membaca fail"
+
+#: misc/dumpe2fs.c:772
+#, fuzzy
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr "Main Sekarang!"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr ""
+
+#: misc/e2image.c:111
+#, fuzzy, c-format
+msgid " %s -I device image-file\n"
+msgstr "\"%s\" adalah sebuah fail peranti"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr ""
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+#, fuzzy
+msgid "while allocating buffer"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/e2image.c:182
+#, fuzzy, c-format
+msgid "Writing block %llu\n"
+msgstr "ketika menulis bitmap blok"
+
+#: misc/e2image.c:196
+#, fuzzy, c-format
+msgid "error writing block %llu"
+msgstr "ketika menulis bitmap blok"
+
+#: misc/e2image.c:200
+#, fuzzy
+msgid "error in generic_write()"
+msgstr "Ralat libmtp generik"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:222
+#, fuzzy
+msgid "Couldn't allocate header buffer\n"
+msgstr "Tak dapat memperuntukkan memori untuk penimbal konteks"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "ketika menulis superblok"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "ketika menulis jadual inod"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "ketika menulis bitmap blok"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "ketika menulis inod bitmap"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:570
+#, fuzzy, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "inode (%llu) mesti kurang dari %u"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Menyalin "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:666
+#, fuzzy, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr "%.2f Mb/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, fuzzy, c-format
+msgid "error reading block %llu"
+msgstr "e2label: ralat membaca superblok\n"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr ""
+
+#: misc/e2image.c:738
+#, fuzzy, c-format
+msgid "at %.2f MB/s"
+msgstr "%.2f Mb/s"
+
+#: misc/e2image.c:774
+#, fuzzy
+msgid "while allocating l1 table"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/e2image.c:819
+#, fuzzy
+msgid "while allocating l2 cache"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1168
+#, fuzzy
+msgid "while allocating ext2_qcow2_image"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/e2image.c:1175
+#, fuzzy
+msgid "while initializing ext2_qcow2_image"
+msgstr "ketika memulakan superblok jurnal"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1294
+#, fuzzy
+msgid "while allocating block bitmap"
+msgstr "ketika menulis bitmap blok"
+
+#: misc/e2image.c:1303
+#, fuzzy
+msgid "while allocating scramble block bitmap"
+msgstr "ketika menulis bitmap blok"
+
+#: misc/e2image.c:1326
+#, fuzzy
+msgid "Scanning inodes...\n"
+msgstr "Mengimbas"
+
+#: misc/e2image.c:1338
+#, fuzzy
+msgid "Can't allocate block buffer"
+msgstr "Tak dapat memperuntukkan ruang penimbal"
+
+#: misc/e2image.c:1350
+#, fuzzy
+msgid "while getting next inode"
+msgstr ""
+"Hampir siap.\n"
+"Tapi, akan ambil masa sikit."
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, fuzzy, c-format
+msgid "while iterating over inode %u"
+msgstr "ketika mengosongkan inod jurnal"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr ""
+
+#: misc/e2image.c:1447
+#, fuzzy
+msgid "error reading bitmaps"
+msgstr ""
+"\n"
+"%s: %s: ralat membaca bitmap: %s\n"
+
+#: misc/e2image.c:1459
+#, fuzzy
+msgid "while opening device file"
+msgstr "Satu ralat berlaku ketika membuka fail."
+
+#: misc/e2image.c:1470
+#, fuzzy
+#| msgid "while writing inode table"
+msgid "while restoring the image table"
+msgstr "Ralat memulihkan imej cakera"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1609
+#, fuzzy
+msgid "checking if mounted"
+msgstr "Memeriksa"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1676
+#, fuzzy
+msgid "Can not stat output\n"
+msgstr "Nombor Statistik."
+
+#: misc/e2image.c:1686
+#, fuzzy, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Saiz Imej Termampat"
+
+#: misc/e2image.c:1689
+#, fuzzy, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "%s Berkemungkinan Tersulit"
+
+#: misc/e2image.c:1692
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Fail %s telah rosak semasa muat naik."
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr ""
+
+#: misc/e2image.c:1718
+#, fuzzy
+msgid "while allocating check_buf"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr ""
+
+#: misc/e2initrd_helper.c:69
+#, fuzzy, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Penggunaan: %s [-r] [-t]\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: tidak dapat membuka %s\n"
+
+#: misc/e2label.c:63
+#, fuzzy, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: ralat membaca superblok\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: ralat membaca superblok\n"
+
+#: misc/e2label.c:72
+#, fuzzy, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "Sistem Fail"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr ""
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr ""
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: ralat menulis superblok\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+
+#: misc/e2undo.c:124
+#, fuzzy, c-format
+#| msgid "Usage: %s <transaction file> <filesystem>\n"
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Penggunaan: %s <fail transaksi> <sistemfail>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:156
+#, fuzzy
+msgid "UUID does not match.\n"
+msgstr "(TIDAK SEPADAN)"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:176
+#, fuzzy
+#| msgid "while reading journal superblock"
+msgid "while reading filesystem superblock."
+msgstr "ketika membaca superblok jurnal"
+
+#: misc/e2undo.c:192
+#, fuzzy
+#| msgid "while writing superblock"
+msgid "while fetching superblock"
+msgstr "ketika menulis superblok"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr ""
+
+#: misc/e2undo.c:344
+#, fuzzy, c-format
+msgid "illegal offset - %s"
+msgstr "%s: pilihan salah -- %c\n"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:377
+#, fuzzy, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "Ralat bila membuka fail xbase."
+
+#: misc/e2undo.c:384
+#, fuzzy
+#| msgid "while reading root inode"
+msgid "while reading undo file"
+msgstr "Ralat apabila membaca fail."
+
+#: misc/e2undo.c:389
+#, fuzzy, c-format
+#| msgid "%s: too many devices\n"
+msgid "%s: Not an undo file.\n"
+msgstr "Undur fail yang rosak"
+
+#: misc/e2undo.c:400
+#, fuzzy, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "Kepala DIB: pengenkod tidak sepadan kedalaman bit."
+
+#: misc/e2undo.c:407
+#, fuzzy, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "Undur fail yang rosak"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr ""
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+
+#: misc/e2undo.c:437
+#, fuzzy, c-format
+#| msgid "Error while determining whether %s is mounted.\n"
+msgid "Error while determining whether %s is mounted."
+msgstr "Ralat ketika menentukan sama ada %s telah dilekapkan.\n"
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+
+#: misc/e2undo.c:459
+#, fuzzy, c-format
+#| msgid "while opening %s"
+msgid "while opening `%s'"
+msgstr "ketika membuka %s"
+
+#: misc/e2undo.c:470
+#, fuzzy
+msgid "specified offset is too large"
+msgstr "nombor token terlalu besar"
+
+#: misc/e2undo.c:511
+#, fuzzy
+#| msgid "while reading bitmaps"
+msgid "while reading keys"
+msgstr "ketika membaca bitmap"
+
+#: misc/e2undo.c:523
+#, fuzzy, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "Nilai salah untuk kekunci \"%s\". Sepatutnya Koordinat"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:556
+#, fuzzy, c-format
+#| msgid "From block %lu to %lu\n"
+msgid "%s: block %llu is too long."
+msgstr "%s: fail terlalu panjang"
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, fuzzy, c-format
+msgid "while fetching block %llu."
+msgstr "ketika menulis bitmap blok"
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:622
+#, fuzzy, c-format
+msgid "while writing block %llu."
+msgstr "ketika menulis bitmap blok"
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr ""
+
+#: misc/findsuper.c:155
+#, fuzzy, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "Ruang ini haruslah disi dengan nombor."
+
+#: misc/findsuper.c:162
+#, fuzzy, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "Saiz rekod mesti dalam gandaan %d."
+
+#: misc/findsuper.c:169
+#, fuzzy, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "Ruang ini haruslah disi dengan nombor."
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr ""
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr ""
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:265
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr "Buka %s gagal. Errno = %d, "
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "AMARAN: tidak dapat membuka %s: %s\n"
+
+#: misc/fsck.c:354
+#, fuzzy, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "Amaran gFTP: Melangkah baris %d pada fail tandabuku: %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: tidak dijumpai\n"
+
+#: misc/fsck.c:602
+#, fuzzy, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "Gagal melakukan proses anak (%s)"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Selesai dengan %s (status keluar %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:769
+#, fuzzy
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Tak dapat memperuntukkan memori untuk penimbal konteks"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr ""
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:975
+#, fuzzy
+msgid "Checking all file systems.\n"
+msgstr "Tunjuk semu_a sistem fail"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--menunggu-- (lalu %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: terlalu banyak peranti\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: terlalu banyak hujah\n"
+
+#: misc/fuse2fs.c:3746
+#, fuzzy
+msgid "Mounting read-only.\n"
+msgstr "Baca-Sahaja"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3793
+#, fuzzy, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "ketika mendapatkan semula jurnal ext3 bagi %s"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3817
+#, fuzzy, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "Menulis ke jurnal (%s)"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, fuzzy, c-format
+#| msgid "Usage: %s [-RVadlv] [files...]\n"
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Penggunaan: %s [-RVadlv] [fail...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Ketika membaca penanda pada %s"
+
+#: misc/lsattr.c:93
+#, fuzzy, c-format
+#| msgid "While reading version on %s"
+msgid "While reading project on %s"
+msgstr "Ketika membaca versi pada %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Ketika membaca versi pada %s"
+
+#: misc/lsattr.c:148
+#, fuzzy
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Tak dapat memperuntukkan memori untuk penimbal konteks"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Melaksana arahan: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "ketika cuba untuk melaksana '%s'"
+
+#: misc/mke2fs.c:274
+#, fuzzy
+msgid "while processing list of bad blocks from program"
+msgstr "ketika membaca dalam senarai blok buruk dari fail"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Menghentikan....\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+#, fuzzy
+msgid "while marking bad blocks as used"
+msgstr "ketika memeriksa kewarasan blok inode buruk"
+
+#: misc/mke2fs.c:370
+#, fuzzy
+#| msgid "while writing journal inode"
+msgid "while writing reserved inodes"
+msgstr "ketika menulis inod jurnal"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Menulis jadual inode: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "selesai \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "ketika mencipta direktori root"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "ketika membaca inod root"
+
+#: misc/mke2fs.c:493
+#, fuzzy
+msgid "while setting root inode ownership"
+msgstr "ketika membaca inod root"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "ketika mencipta /lost+found"
+
+#: misc/mke2fs.c:518
+#, fuzzy
+msgid "while looking up /lost+found"
+msgstr "Ralat semasa mencari takrifan"
+
+#: misc/mke2fs.c:531
+#, fuzzy
+msgid "while expanding /lost+found"
+msgstr "ketika mencipta /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "ketika menetapkan inod blok buruk"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Kehabisan memori ketika memadam sektor %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Amaran: tidak dapat membaca blok 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Amaran: tidak dapat memadam sektor %d: %s\n"
+
+#: misc/mke2fs.c:617
+#, fuzzy
+#| msgid "while writing journal inode"
+msgid "while splitting the journal size"
+msgstr "ketika membaca inod jurnal"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "ketika memulakan superblok jurnal"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Mengosongkan peranti jurnal: "
+
+#: misc/mke2fs.c:644
+#, fuzzy, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "Menggunakan saiz blok peranti jurnal: %d\n"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "ketika menulis superblok jurnal"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr ""
+
+#: misc/mke2fs.c:684
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"amaran: %u blok tidak digunakan.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, fuzzy, c-format
+#| msgid "Filesystem label=%s\n"
+msgid "Filesystem label=%.*s\n"
+msgstr "Label sistemfail=%s\n"
+
+#: misc/mke2fs.c:692
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "Jenis OS:"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Saiz blok=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Saiz pecahan=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Saiz pecahan=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:705
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "inode (%llu) mesti kurang dari %u"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Blok data pertama=%u\n"
+
+#: misc/mke2fs.c:712
+#, fuzzy, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Blok direktori kosong %u (#%d) dalam inode %u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Blok sistemfail maksimum=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "kumpulan blok %u\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "kumpulan blok %u\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inod setiap kumpulan\n"
+
+#: misc/mke2fs.c:736
+#, fuzzy, c-format
+#| msgid "Filesystem label=%s\n"
+msgid "Filesystem UUID: %s\n"
+msgstr "Sistem fail %s pada %s tidak rosak."
+
+#: misc/mke2fs.c:737
+#, fuzzy
+msgid "Superblock backups stored on blocks: "
+msgstr "Folder yang mana sandar disimpan"
+
+#: misc/mke2fs.c:833
+#, fuzzy, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%i pakej memerlukan %s"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:852
+#, fuzzy, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "saiz blok tidak sah - %s"
+
+#: misc/mke2fs.c:866
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Data tidak sah - %s cincangan tidak sepadan untuk fail:"
+
+#: misc/mke2fs.c:878
+#, fuzzy, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Ralat menjangkau ke ofset %s"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "jarakmasa `%s' tidak sah"
+
+#: misc/mke2fs.c:909
+#, fuzzy, c-format
+#| msgid "Invalid superblock parameter: %s\n"
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Permintaan backup tidak sah"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Parameter stride tidak sah: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parameter lebar stripe tidak sah: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Parameter ulangsaiz tidak sah: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, fuzzy, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "UTF-8 tidak sah pada pemilik bagi skema"
+
+#: misc/mke2fs.c:1080
+#, fuzzy, c-format
+msgid "Invalid encoding: %s"
+msgstr "%s: pengekodan tidak sah."
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, fuzzy, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "%s: pengekodan tidak sah.âŽ\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr ""
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Tetapan pilihan sistemfail tidak sah: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Tetapan pilihan lekapan tidak sah: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1361
+#, fuzzy
+msgid "Aborting...\n"
+msgstr "Menghentikan....\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1591
+#, fuzzy
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Tak dapat memperuntukkan memori bagi pengepala"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "saiz blok tidak sah - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1681
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "saiz pecahan tidak sah - %s"
+
+#: misc/mke2fs.c:1694
+#, fuzzy
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "atribut telah lapuk. Guna revspec sebagai ganti."
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "kelakuan ralat buruk - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Nombor tidak sah untuk saiz flex_bg"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1744
+#, fuzzy, c-format
+#| msgid "inodes (%llu) must be less than %u"
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "inod (%llu) mesti kurang dari %u"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "saiz inode tidak sah - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1790
+#, fuzzy
+msgid "in malloc for bad_blocks_filename"
+msgstr "ketika memeriksa kewarasan blok inode buruk"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "nombor inode buruk - %s"
+
+#: misc/mke2fs.c:1836
+#, fuzzy
+#| msgid "while allocating buffers"
+msgid "while allocating fs_feature string"
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "tahap semakan buruk - %s"
+
+#: misc/mke2fs.c:1858
+#, fuzzy, c-format
+#| msgid "while trying to resize %s"
+msgid "while trying to create revision %d"
+msgstr "Ketika cuba menambah kumpulan #%d"
+
+#: misc/mke2fs.c:1872
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "pilihan -T hanya boleh digunakan dengan tindakan nama semula\n"
+
+#: misc/mke2fs.c:1880
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "pilihan -T hanya boleh digunakan dengan tindakan nama semula\n"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, fuzzy, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "ketika cuba untuk membuka titiklekap %s"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Menggunakan saiz blok peranti jurnal: %d\n"
+
+#: misc/mke2fs.c:1959
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "nombor peranti major tidak sah %s"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "sistemfail"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Fail %s tidak wujud dan tiada saiz dinyatakan.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Mencipta fail biasa %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr ""
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:2114
+#, fuzzy
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Cdrdao %1 tidak menyokong overburning."
+
+#: misc/mke2fs.c:2119
+#, fuzzy
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Cdrdao %1 tidak menyokong overburning."
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2129
+#, fuzzy
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Cdrdao %1 tidak menyokong overburning."
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr ""
+
+#: misc/mke2fs.c:2145
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "ketika cuba untuk memadam %s"
+
+#: misc/mke2fs.c:2177
+#, fuzzy
+msgid "while setting blocksize; too small for device\n"
+msgstr "ketika menetapkan maklumat checksum kumpulan blok"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2280
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "kiraan blok tidak sah - %s"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:2355
+#, fuzzy, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Muat naik gagal, \"%s\", telah memindahkan %lu daripada %lu bait"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr ""
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr ""
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+
+#: misc/mke2fs.c:2849
+#, fuzzy
+msgid "Discarding device blocks: "
+msgstr "Blok"
+
+#: misc/mke2fs.c:2865
+#, fuzzy
+msgid "failed - "
+msgstr "Gagal"
+
+#: misc/mke2fs.c:2924
+#, fuzzy
+msgid "while initializing quota context"
+msgstr "ketika memulakan superblok jurnal"
+
+#: misc/mke2fs.c:2931
+#, fuzzy
+#| msgid "while writing journal inode"
+msgid "while writing quota inodes"
+msgstr "ketika menulis bitmap blok"
+
+#: misc/mke2fs.c:2956
+#, fuzzy, c-format
+#| msgid "bad error behavior - %s"
+msgid "bad error behavior in profile - %s"
+msgstr "kelakuan ralat buruk - %s"
+
+#: misc/mke2fs.c:3035
+#, fuzzy
+msgid "in malloc for android_sparse_params"
+msgstr "ketika memeriksa kewarasan blok inode buruk"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "ketika menetapkan superblok"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "OS tidak diketahui - %s"
+
+#: misc/mke2fs.c:3266
+#, fuzzy
+msgid "Allocating group tables: "
+msgstr "ketika mengumpukkan penimbal"
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:3289
+#, fuzzy
+msgid "while unmarking bad blocks"
+msgstr "ketika memeriksa kewarasan blok inode buruk"
+
+#: misc/mke2fs.c:3300
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "ketika menulis bitmap blok"
+
+#: misc/mke2fs.c:3309
+#, fuzzy
+msgid "while calculating overhead"
+msgstr "Mengira..."
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr ""
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "jurnal"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Menambah jurnal ke peranti %s: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "selesai\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Mencipta jurnal (%u blok): "
+
+#: misc/mke2fs.c:3444
+#, fuzzy
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr "ketika membaca inod jurnal"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3481
+#, fuzzy
+msgid "Copying files into the device: "
+msgstr "Menyalin peranti ke imej cakera"
+
+#: misc/mke2fs.c:3487
+#, fuzzy
+msgid "while populating file system"
+msgstr "Ralat apabila membaca fail."
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:3501
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "Abai fail tetapan sistem"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"selesai\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, fuzzy, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "ketika menetapkan maklumat checksum kumpulan blok"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:584
+#, fuzzy
+msgid "Huge files will be zero'ed\n"
+msgstr "Trak pembuang besar."
+
+#: misc/mk_hugefiles.c:585
+#, fuzzy, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Mencipta fail biasa %s\n"
+
+#: misc/mk_hugefiles.c:587
+#, fuzzy, c-format
+msgid "with %llu blocks each"
+msgstr "Saiz blok kod dalam setiap sub-jalur"
+
+#: misc/mk_hugefiles.c:597
+#, fuzzy, c-format
+msgid "while creating huge file %lu"
+msgstr "Ralat ketika mencipta fail %s."
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Penggunaan: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+
+#: misc/partinfo.c:53
+#, fuzzy, c-format
+msgid "Cannot open %s: %s"
+msgstr "Tidak dapat membuka pengkalan data %s: %s"
+
+#: misc/partinfo.c:59
+#, fuzzy, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Tak dapat memperolehi skema bagi %s: %s"
+
+#: misc/partinfo.c:67
+#, fuzzy, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Tidak memperoleh mesej %s: "
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Superblok jurnal tidak dijumpai!\n"
+
+#: misc/tune2fs.c:287
+#, fuzzy
+msgid "while trying to open external journal"
+msgstr "ketika cuba untuk membuka titiklekap %s"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s adalah bukan peranti jurnal.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, fuzzy, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr "ketika membaca superblok jurnal"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+#, fuzzy
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Temui UUID bagi fail silih {device} ialah {uuid}."
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Jurnal dibuang\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "ketika mengosongkan inod jurnal"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "ketika menulis inod jurnal"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(dan ulangboot selepas itu!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:499
+#, fuzzy, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Gagal untuk melaksanakan arahan \"%s\": %s\n"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, fuzzy, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "Satu bendera untuk membenarkan mod termaksimum"
+
+#: misc/tune2fs.c:507
+#, fuzzy, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "Benar/lumpuhkan mod karet"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1111
+#, fuzzy, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Sistem fail mempunyai ciri baca-sahaja yang tidak disokong"
+
+#: misc/tune2fs.c:1117
+#, fuzzy, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Sistem fail mempunyai ciri yang tidak disokong"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1200
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1214
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "Pengiraan bitmap MMP tidak sepadan"
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "Sistemfail telah mempunyai jurnal.\n"
+
+#: misc/tune2fs.c:1583
+#, fuzzy, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr "ketika cuba untuk membuka titiklekap %s"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Mencipta jurnal pada peranti %s: "
+
+#: misc/tune2fs.c:1595
+#, fuzzy, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "Menambah jurnal ke peranti %s: "
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Mencipta inode jurnal: "
+
+#: misc/tune2fs.c:1615
+#, fuzzy
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr "Ralat berlaku bila membaca fail"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1670
+#, fuzzy
+#| msgid "while initializing journal superblock"
+msgid "while initializing quota context in support library"
+msgstr "ketika memulakan superblok jurnal"
+
+#: misc/tune2fs.c:1686
+#, fuzzy, c-format
+msgid "while updating quota limits (%d)"
+msgstr "ketika menetapkan inod blok buruk"
+
+#: misc/tune2fs.c:1696
+#, fuzzy, c-format
+#| msgid "while writing inode table"
+msgid "while writing quota file (%d)"
+msgstr "ketika menulis jadual inod"
+
+#: misc/tune2fs.c:1714
+#, fuzzy, c-format
+#| msgid "while reading root inode"
+msgid "while removing quota file (%d)"
+msgstr "ketika membaca inod root"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr ""
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "kiraan lekapan buruk - %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "gid/nama kumpulan buruk - %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "selamasa buruk - %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1978
+#, fuzzy
+msgid "-o may only be specified once"
+msgstr "hanya satu jenis senarai boleh dinyatakan"
+
+#: misc/tune2fs.c:1987
+#, fuzzy
+msgid "-O may only be specified once"
+msgstr "hanya satu jenis senarai boleh dinyatakan"
+
+#: misc/tune2fs.c:2004
+#, fuzzy, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "kiraan lekapan buruk - %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "uid/nama pengguna buruk - %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "saiz inode buruk - %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] ""
+
+#: misc/tune2fs.c:2171
+#, fuzzy, c-format
+#| msgid "Setting filetype for @E to %N.\n"
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Menetapkan jenisfail untuk @E ke %N.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Stride RAID tidak sah: %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Lebar stripe RAID tidak sah: %s\n"
+
+#: misc/tune2fs.c:2219
+#, fuzzy, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algoritma hash tidak diketahui."
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2252
+#, fuzzy, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Tidak jumpa pengekodan: %1"
+
+#: misc/tune2fs.c:2258
+#, fuzzy, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "%s: pengekodan tidak sah."
+
+#: misc/tune2fs.c:2264
+#, fuzzy, c-format
+#| msgid "Setting error behavior to %d\n"
+msgid "Setting encoding to '%s'\n"
+msgstr ""
+"%s%s\n"
+"Pengekodan: %s\n"
+"%s"
+
+#: misc/tune2fs.c:2288
+#, fuzzy, c-format
+#| msgid "while setting flags on %s"
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "ketika menetapkan penanda pada %s"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+
+#: misc/tune2fs.c:2714
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "Tidak dapat membaca peta bit inode"
+
+#: misc/tune2fs.c:2719
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "Tidak dapat membaca peta bit blok"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "blok untuk dipindahkan"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr ""
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:3014
+#, fuzzy
+#| msgid "%s is not a journal device.\n"
+msgid "Cannot modify a journal device.\n"
+msgstr "Mengosongkan peranti jurnal: "
+
+#: misc/tune2fs.c:3027
+#, fuzzy, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Menetapkan saiz inod %lu\n"
+
+#: misc/tune2fs.c:3034
+#, fuzzy
+msgid "Shrinking inode size is not supported\n"
+msgstr "Pengecutan dalam talian tidak disokong"
+
+#: misc/tune2fs.c:3039
+#, fuzzy, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "saiz inode tidak sah - %s"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3103
+#, fuzzy, c-format
+msgid "Recovering journal.\n"
+msgstr "ketika mendapatkan semula jurnal ext3 bagi %s"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Menetapkan kelakuan ralat ke %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr ""
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr ""
+
+#: misc/tune2fs.c:3174
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Memeriksa blok %lu ke %lu\n"
+
+#: misc/tune2fs.c:3179
+#, fuzzy
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr "Sistemfail telah mempunyai jurnal.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Format UUID tidak sah\n"
+
+#: misc/tune2fs.c:3356
+#, fuzzy
+msgid "Need to update journal superblock.\n"
+msgstr "ketika memulakan superblok jurnal"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Menetapkan saiz inod %lu\n"
+
+#: misc/tune2fs.c:3407
+#, fuzzy
+msgid "Failed to change inode size\n"
+msgstr "Ubah Saiz"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Menetapkan saiz stride ke %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Menetapkan lebar stripe ke %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+
+#: misc/util.c:102
+#, fuzzy
+msgid "<proceeding>\n"
+msgstr "Metadata kiriman telah dimuat turun, meneruskan dengan kiriman..."
+
+#: misc/util.c:106
+#, fuzzy, c-format
+#| msgid "Proceed anyway? (y,n) "
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Teruskan juga? (y,t)"
+
+#: misc/util.c:110
+#, fuzzy
+#| msgid "Proceed anyway? (y,n) "
+msgid "Proceed anyway? (y,N) "
+msgstr "Teruskan juga? (y,t)"
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "tidak akan membuat %s disini!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs dipaksa juga.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Sistemfail terlalu kecil untuk jurnal\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:293
+#, fuzzy
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Sistemfail terlalu kecil untuk jurnal\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+#, fuzzy
+msgid "bad arguments"
+msgstr "Hujah teruk ke arahan pengguna\n"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "sambung"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "tulis"
+
+#: misc/uuidd.c:200
+#, fuzzy
+msgid "read count"
+msgstr "kiraan"
+
+#: misc/uuidd.c:206
+#, fuzzy
+msgid "bad response length"
+msgstr "Respons pengesahihan teruk daripada pelayan."
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:279
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Tidak dapat mencipta soket: %s"
+
+#: misc/uuidd.c:308
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Tidak dapat ikat port %d pada %s: %s (%s)"
+
+#: misc/uuidd.c:316
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Tidak dapat menulis pada soket! %s."
+
+#: misc/uuidd.c:354
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Ralat membaca '%s': %s"
+
+#: misc/uuidd.c:362
+#, fuzzy, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "%d operasi muat turun aktif"
+
+#: misc/uuidd.c:381
+#, fuzzy, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Masa (s): "
+
+#: misc/uuidd.c:391
+#, fuzzy, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Guna nombor rawak terjana-perkakasan"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+
+#: misc/uuidd.c:421
+#, fuzzy, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Dijana"
+
+#: misc/uuidd.c:433
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "%d operasi fail berjalan"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, fuzzy, c-format
+msgid "Bad number: %s\n"
+msgstr "Nombor ajaib buruk dalam blok-super"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Ralat memanggil StartServiceByName untuk %s: "
+
+#: misc/uuidd.c:544
+#, fuzzy, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "Peristiwa berikutn_ya"
+
+#: misc/uuidd.c:548
+#, fuzzy
+msgid "List of UUID's:\n"
+msgstr "UUID:"
+
+#: misc/uuidd.c:569
+#, fuzzy, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Balas tidak jangka daripada pelayan"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, fuzzy, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Program ini dilaksanakan sebagai proses bernombor %(pid)d."
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Penggunaan: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Loggokan extent:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr ""
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Memanjangkan jadual inode"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Memindahkan blok"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Mengesan jadual inode"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Mengemaskini rujukan inode"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Memindah jadual inode"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Katalaluan tidak diketahui?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "ketika membuka %s"
+
+#: resize/main.c:382
+#, fuzzy, c-format
+msgid "while getting stat information for %s"
+msgstr "RaLat semasa mendapatkan maklumat kongsi: %s"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:482
+#, fuzzy, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Ralat melekapkan sistem fail untuk mengira saiz minimum"
+
+#: resize/main.c:522
+#, fuzzy, c-format
+msgid "Invalid new size: %s\n"
+msgstr "%s: fail saiz tidak sah"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr ""
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr ""
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Panjang stride tidak sah"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr ""
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:639
+#, fuzzy, c-format
+#| msgid "The filesystem already has a journal.\n"
+msgid "The filesystem is already 64-bit.\n"
+msgstr "64-bit"
+
+#: resize/main.c:644
+#, fuzzy, c-format
+#| msgid "The filesystem already has a journal.\n"
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Sistemfail telah mempunyai jurnal.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr ""
+
+#: resize/main.c:658
+#, fuzzy, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Menukarkan"
+
+#: resize/main.c:660
+#, fuzzy, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "32-bit"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "ketika cuba untuk mengulangsaiz %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "ketika cuba untuk memangkas %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr ""
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Pengecutan dalam talian tidak disokong"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Sistem fail tidak menyokong saiz semula dalam talian"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr ""
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "ketika cuba untuk membuka titiklekap %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Antaramuka mengubah saiz lama diminta.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Kebenaran ditolak untuk mengubah saiz sistem fail"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr ""
+
+#: resize/online.c:181
+#, fuzzy
+msgid "Kernel does not support online resizing"
+msgstr "Sistem fail tidak menyokong saiz semula dalam talian"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Ketika cuba memanjangkan kumpulan terakhir"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Ketika cuba menambah kumpulan #%d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr ""
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "inode (%llu) mesti kurang dari %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "blok dikhaskan"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "blok meta-data"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "blok meta baharu"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "Pustaka EXT2FS versi 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Nombor ajaib yang salah untuk struktur ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Nombor ajaib yang salah untuk struktur badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Nombor ajaib yang salah untuk struktur badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Nombor ajaib yang salah untuk struktur inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Nombor ajaib yang salah untuk struktur io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Nombor ajaib yang salah untuk struktur io_channel unix"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Nombor ajaib yang salah untuk struktur io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Nombor ajaib yang salah untuk struktur block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Nombor ajaib yang salah untuk struktur inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Nombor ajaib yang salah untuk struktur generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Nombor ajaib yang salah untuk struktur io_channel ujian"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Nombor ajaib yang salah untuk struktur senarai blok direktori"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Nombor ajaib yang salah untuk struktur icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Nombor ajaib yang salah untuk struktur Powerquest io_channel"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Nombor ajaib yang salah untuk struktur fail ext2"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Nombor ajaib yang salah untuk Pengepala Imej Ext2"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Nombor ajaib yang salah untuk struktur io_channel inode"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Nombor ajaib buruk dalam blok-super"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Semakan sistem fail terlalu tinggi"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Tidak dapat membaca penerangan kumpulan"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Tidak dapat menulis penerangan kumpulan"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Tidak dapat menulis peta bit inode"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Tidak dapat membaca peta bit inode"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Tidak dapat menulis peta bit blok"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Tidak dapat membaca peta bit blok"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Tidak dapat menulis jadual inode"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Tidak dapat membaca jadual inode"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Tidak dapat membaca inode seterusnya"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Sistem fail mempunyai saiz blok yang tidak dijangka"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Direktori EXT2 rosak"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Tiada ruang kosong dalam direktori"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Peta bit inode tidak dimuatkan"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Peta bit blok tidak dimuatkan"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Nombor inode tidak sah"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Nombor blok tidak sah"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Ralat dalaman dalam ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Blok tidak langsung yang tidak sah dijumpai"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Blok tidak langsung dua kali yang tidak sah dijumpai"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Blok tidak langsung tiga kali yang tidak sah dijumpai"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Peta bit blok tidak sama"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Peta bit inode tidak sama"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Nama peranti cacat atau tidak sah"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Satu kumpulan blok kehilangan jadual inode"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Superblock ext2 rosak"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Terlalu banyak pautan simbolik ditemui."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Fungsi panggil balik tidak akan mengendalikan kes ini"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Inode adalah dari blok buruk dalam jadual inode"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Sistem fail mempunyai ciri yang tidak disokong"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Sistem fail mempunyai ciri baca-sahaja yang tidak disokong"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Pengumpukan memori gagal"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Hujah tidak sah dihantar ke pustaka ext2"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Inode Ext2 adalah bukan direktori"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Terlalu banyak rujukan dalam jadual"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Fail tidak dijumpai oleh ext2_lookup"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Fail dibuka baca sahaja"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Blok direktori Ext2 tidak dijumpai"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Direktori Ext2 sudah wujud"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Fungsi pustaka ext2 tidak diterapkna"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Pengguna meminta pembatalan"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Fail Ext2 terlalu besar"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Peranti jurnal yang dinyatakan bukan peranti blok"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Superblok jurnal tidak dijumpai"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Versi jurnal tidak disokong"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Ralat memuatkan jurnal luaran"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Jurnal tidak dijumpai"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Hash direktori tidak disokong"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Nombor blok atribut lanjutan tidak sah"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Snapshot E2image tidak digunakan"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Terlalu banyak blok penerangan kumpulan simpanan"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Inode saiz semula telah rosak"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Berjaya"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Pengkalan data rosak"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: Ralat IO"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Ralat penguncian"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Tidak cukup memori"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Rekod wujud"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Parameter tidak sah"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Rekod tidak wujud"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Tulis tidak dibenarkan"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Senarai blok direktori Ext2fs kosong"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Nombor ajaib yang salah untuk peta bit umum 64-bit"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Nombor ajaib yang salah untuk peta bit blok 64-bit"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Nombor ajaib yang salah untuk peta bit inode 64-bit"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Nombor ajaib yang salah --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Nombor ajaib yang salah --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Nombor ajaib yang salah --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Nombor ajaib yang salah --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Nombor ajaib yang salah --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Nombor ajaib yang salah --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Nombor ajaib yang salah --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Pengepala takat rosak"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Takat indeks rosak"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Takat rosak"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Tiada ruang bebas dalam peta takat"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Inode tidak menggunakan takat"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Tiada takat 'seterusnya'"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Tiada takat 'terdahulu'"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Tiada takat 'atas'"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Tiada takat 'bawah'"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Tiada nod semasa"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Operasi Ext2fs tidak disokong"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Takat tidak dijumpai"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Panjang takat tidak sah"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: nombor magic tidak sah"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: peranti sedang aktif"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: menjalani operasi yang tidak diketahui"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: sistem fail masih digunakan"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Saiz huraian kumpulan blok tidak tepat"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Semakan inode tidak sepadan inode"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Semakan peta bit inode peta bit tidak sepadan peta bit"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Semakan blok medan tidak sepadan dengan blok medan"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Blok direktori tidak mempunyai ruang untuk semakan"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Semakan blok direktori tidak sepadan dengan blok direktori"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Semakan blok atribut lanjutan tidak sepadan dengan blok"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Pengiraan superblock tidak sepadan superblok"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Algoritma pengiraan tidak diketahui"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Pengiraan bitmap MMP tidak sepadan"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Fail Ext2 sudah wujud"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Pengiraan bitmap blok tidak padan bitmap"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Atribut lanjutan mempunyai panjang nama yang tidak sah"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Atribut lanjutan mempunyai panjang nilai yang tidak sah"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Atribut lanjutan mempunyai hash yang salah"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Kekunci atribut lanjutan tidak dijumpai"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Inode tidak mempunyai data sebaris"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Tiada blok untuk inode dengan data sebaris"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Tiada ruang bebas dalam data sebaris"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Nombor ajaib yang salah untuk struktur sifat lanjutan"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Atribut lanjutan mempunyai nilai anjakan yang tidak sah"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Bendera jurnal tidak konsisten"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Undur fail yang rosak"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Fail undur yang salah untuk sistem fail ini"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Sistem fail rosak"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Superblock jurnal ini rosak"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Inode rosak"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Penerangan kumpulan tidak dimuatkan"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Operasi tidak disokong pada jurnal luaran"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Versi profil 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Seksyen profil tidak dijumpai"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Kaitan profil tidak dijumpai"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Tidak dapat tetapkan nilai pada node seksyen"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Pilihan tidak sah dihantar ke pustaka profil"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Profail seksyen pengepala tidak di peringkat tertinggi"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Ralat sintaks dalam pengepala seksyen profil"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Ralat sintaks dalam kaitan profil"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Penutup pendakap tambahan dalam profil"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Hilang pembuka pendakap dalam profil"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Objek profile_section tidak sah"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Tiada lagi seksyen"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Tiada fail profil dibuka"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Tidak dapat membuka fail profil"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Seksyen telah wujud"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Nilai boolean tidak sah"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Nilai integer tidak sah"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tterakhir dilekapkan pada %.*s pada %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tterakhir dilekapkan pada %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tdicipta pada %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tterakhir diubahsuai pada %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "%s jadual pembahagian dijumpai didalam %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Tidak dapat membuka %s: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s adalah bukan peranti khas.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s mengandungi sistem fail %s yang dilabelkan '%s'\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s mengandungi sistem fail %s\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s mengandungi data `%s'\n"
diff --git a/po/nl.gmo b/po/nl.gmo
new file mode 100644
index 0000000..517931f
--- /dev/null
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
new file mode 100644
index 0000000..0ea4641
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,8964 @@
+# Dutch translations for e2fsprogs.
+# Copyright (C) 2021 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+#
+# «A reality program does actually illustrate it well. The key to victory
+# lies more in manipulation and cooperation than in exceptional personal skills.»
+#
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 2013.
+# Benno Schulenberg <benno@vertaalt.nl>, 2014, 2016, 2017, 2018, 2019, 2020, 2021, 2022.
+#
+# Woordgebruik:
+# block -> blok
+# sector -> sector
+# directory -> map
+# entry -> item
+# filesystem -> bestandssysteem
+# checksum -> controlesom
+# superblock -> superblok
+#
+# (inode blijft onvertaald)
+# (extent blijft onvertaald)
+# (journal blijft onvertaald)
+# (profile blijft onvertaald)
+# ('trying to' wordt weggelaten)
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs-1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-19 11:03+0200\n"
+"Last-Translator: Benno Schulenberg <vertaling@coevern.nl>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
+"Language: nl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Slecht blok %u ligt buiten bereik; genegeerd.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "tijdens controle van de slechteblokken-inode"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "tijdens lezen van de slechteblokken-inode"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "tijdens openen van %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "tijdens een popen() van %s"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "tijdens lezen van lijst van slechte blokken uit bestand"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "tijdens bijwerken van de inode van een slecht blok"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Waarschuwing: ongeldig blok %u gevonden in inode van slecht blok. Gewist.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "tijdens vrijgeven van 'dir_info' TDB-bestand"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Fout tijdens lezen van blok %lu (%s) tijdens %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Fout tijdens lezen van blok %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Fout negeren"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Herschrijven afdwingen"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Fout tijdens schrijven van blok %lu (%s) tijdens %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Fout tijdens schrijven van blok %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "lege mapblokken"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "lege maptabel"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Leeg mapblok %u (#%d) in inode %u.\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "Gebruik van %s: %s bestandsnaam blokkenaantal blokgrootte\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Ongeldig aantal blokken!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Kan geen blokbuffer reserveren (grootte=%d).\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "bitkaart van inodes met te hermaken extents"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Gebruik: %s schijfnaam\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "ioctl(BLKFLSBUF) wordt niet ondersteund! Kan buffers niet leegmaken.\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "lezen van journal-superblok...\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: geen geldig journal-superblok gevonden\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journal is te kort\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: onjuiste fast-commit blokken\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: herstellen van journal...\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: geen herstelling van journal bij alleen-lezen\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "tijdens heropenen van %s"
+
+# Behalve E en F worden de volgende 30 letterafkortingen niet gebruikt.
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "a<fout>"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "A<fout>"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "b<fout>"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "B<fout>"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "c<fout>"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "C<fout>"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "d<fout>"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "D<fout>"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "e<fout>"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "EItem '%Dn' in %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "f<fout>"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fvoor inode %i (%Q)"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "g<fout>"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "h<fout>"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "i<fout>"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "I<fout>"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "j<fout>"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "l<fout>"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "L<fout>"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "m<fout>"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "n<fout>"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "o<fout>"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "p<fout>"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "q<fout>"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "r<fout>"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "s<fout>"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "S<fout>"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "u<fout>"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "v<fout>"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "x<fout>"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "z<fout>"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<de NULL-inode>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<de slechteblokken-inode>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<de gebruikersquota-inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<de groepsquota-inode>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<de opstart-inode>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<de wis-ongedaanmakingsmap-inode>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<de groepsbeschrijver-inode>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<de journal-inode>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<gereserveerde inode 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<gereserveerde inode 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "normaal bestand"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "map"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "byte-apparaat"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "blok-apparaat"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "benoemde pijp"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "symbolische koppeling"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "onbekend bestandstype met modus 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "indirect blok"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "dubbel-indirect blok"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "drievoudig-indirect blok"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "translator-blok"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "blok #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "gebruiker"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "groep"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "project"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "onbekend quotatype"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "bitkaart van meervoudig-geclaimde inodes"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "**interne programmafout**: kan geen 'dup_blk' voor %llu vinden\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "### teruggekeerd van clone_file_block()"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "**interne programmafout**: kan de record van EA-blokken voor %llu niet opvragen"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "**interne programmafout**: kan de record van EA-inodes voor %u niet opvragen"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "tijdens hashen van item met e_value_inum = %u"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "tijdens lezen van mapblok"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "tijdens halen van volgende inode"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "bitkaart van gebruikte inodes"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "bitkaart van mappen"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "bitkaart van normale bestanden"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "bitkaart van gebruikte blokken"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "bitkaart van blokken met metagegevens"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "bitkaart van 'casefold' inodes"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "tijdens starten van inode-scan"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "Stap 1"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "lezen van indirecte blokken van inode %u"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "bitkaart van slechte inodes"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "inode staat in kaart van slechte blokken"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "bitkaart van imagic-inodes"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "kaart van meervoudig-geclaimde blokken"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "kaart van blokken met uitgebreide kenmerken"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): verwachtte %6lu, kreeg fysiek %6lu (blokkenaantal %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "blok-bitkaart"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "inode-bitkaart"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "inodetabel"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "Stap 2"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "NLS is defect."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "Kan niet verdergaan."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "bitkaart van behandelde inodes"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Piekgeheugengebruik"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Stap 3"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "bitkaart van inode-lusdetectie"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Stap 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Stap 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Onvoldoende geheugen beschikbaar"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Onvoldoende geheugen beschikbaar"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(geen prompt)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Repareren"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Wissen"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Herplaatsen"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Plaatsen"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Uitbreiden"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Verbinden met /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Aanmaken"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Bergen"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Afkappen"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Inode wissen"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Afbreken"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Splitsen"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Doorgaan"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Meervoudig-geclaimde blokken klonen"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Bestand verwijderen"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Berichten onderdrukken"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Losmaken"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "'htree'-index wissen"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Heraanmaken"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Optimaliseren"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "Vlag wissen"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(GEEN)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "GEREPAREERD"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "GEWIST"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "HERPLAATST"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "GEPLAATST"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "UITGEBREID"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "HERVERBONDEN"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "AANGEMAAKT"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "GEBORGEN"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "AFGEKAPT"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INODE GEWIST"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "AFGEBROKEN"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "GESPLITST"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "VERDERGAAND"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "MEERVOUDIG-GECLAIMDE BLOKKEN GEKLOOND"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "BESTAND VERWIJDERD"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "ONDERDRUKT"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "LOSGEMAAKT"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "'HTREE'-INDEX GEWIST"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "ZAL HERAANMAKEN"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "ZAL OPTIMALISEREN"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "VLAG IS GEWIST"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "blok-bitkaart voor groep %g zit niet in groep (blok %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "inode-bitkaart voor groep %g zit niet in groep (blok %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"inodetabel voor groep %g zit niet in groep (blok %b)\n"
+"WAARSCHUWING: ERNSTIG VERLIES VAN GEGEVENS IS MOGELIJK.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Het superblok is onleesbaar of omschrijft geen geldig ext2/3/4-bestandssysteem.\n"
+"Als het apparaat juist is en werkelijk een ext2-, ext3- of ext4-bestandssysteem\n"
+"bevat (en niet swap of UFS of iets anders), dan is het superblok beschadigd.\n"
+"U kunt dan proberen een ander superblok te gebruiken, bijvoorbeeld:\n"
+" e2fsck -b 8193 <apparaat>\n"
+"of:\n"
+" e2fsck -b 32768 <apparaat>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Volgens het superblok is de grootte van het bestandssysteem %b blokken.\n"
+"Maar de fysieke grootte van het apparaat is %c blokken.\n"
+"Waarschijnlijk is ofwel het superblok ofwel de partitietabel beschadigd!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"Superblok: blokgrootte = %b, fragmentgrootte = %c.\n"
+"Deze versie van 'e2fsck' ondersteunt geen\n"
+"fragmentgrootte die verschilt van de blokgrootte.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "Superblok: blokken_per_groep = %b, zou %c moeten zijn.\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "Superblok: eerste_gegevens_blok = %b, zou %c moeten zijn.\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"Bestandssysteem heeft geen UUID; er wordt eentje aangemaakt.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Opmerking: als meerdere blokken van inode-bitkaarten of blok-bitkaarten\n"
+"herplaatst moeten worden, of een deel van de inodetabel, kunt u beter\n"
+"eerst 'e2fsck' uitvoeren met de optie '-b %S'. Misschien doet het\n"
+"probleem zich alleen voor in het eerste superblok; mogelijk is een\n"
+"reservekopie nog in orde.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Beschadiging gevonden in het superblok: %s = %N.\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Fout tijdens bepalen van de grootte van fysiek apparaat: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "Inodetal in superblok is %i, zou %j moeten zijn.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "De Hurd ondersteunt de bestandstypenfunctie niet.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Superblok heeft een ongeldig journal (inode %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+"Het externe journal heeft meerdere bestandssysteem-gebruikers;\n"
+"dit wordt niet ondersteund.\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Kan geen extern journal vinden.\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Het externe journal heeft een slecht superblok.\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Het externe journal ondersteunt dit bestandssysteem niet.\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Het superblok van het journal is van een onbekend en niet-ondersteund type %N.\n"
+"Vermoedelijk gebruikt u een ouder 'e2fsck'-programma dat deze journal-indeling\n"
+"niet ondersteunt. Het kan ook zijn dat het journal-superblok beschadigd is.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Het superblok van het journal is beschadigd.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "Journal-vlag in superblok is niet gezet, maar er is wel een journal.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Herstellingsvlag in superblok is gezet, maar er is geen journal.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "Herstellingsvlag in superblok is niet gezet, maar het journal bevat gegevens.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Journal wissen"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "Bestandssysteem is een versie 0, maar heeft functievlag(gen) gezet. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s van verweesde inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "Ongeldig %B (%b) gevonden in verweesde inode %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Reeds-gewist %B (%b) gevonden in verweesde inode %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "Ongeldige verweesde inode %i in superblok.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Ongeldige inode %i in lijst van verweesde inodes.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Journal-superblok heeft een onbekende alleen-lezen-functievlag gezet.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Journal-superblok heeft een onbekende en incompatibele functievlag gezet.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Journal-versie wordt niet ondersteund door deze e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Journal wordt verplaatst van /%s naar een verborgen inode.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Fout tijdens verplaatsen van journal: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Ongeldige V2-journal-superblokvelden gevonden in V1-journal.\n"
+"Velden voorbij het V1-journal-superblok worden gewist...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Journal toch afspelen"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"Reservekopieën van het superblok kennen geen herstellingsvlag;\n"
+"het niet-lege journal wordt daarom afgespeeld.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Maken van reservekopie van informatie in journal-inodeblokken...\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Bestandssysteem heeft functie 'resize_inode' uitgeschakeld,\n"
+"maar 's_reserved_gdt_blocks' is %N; zou nul moeten zijn. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Functie 'resize_inode' is uitgeschakeld, maar de 'resize'-inode is niet nul. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Ongeldige 'resize'-inode. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Laatste aankoppelingstijd (%t) ligt volgens superblok\n"
+" in de toekomst (nu = %T).\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Laatste schrijftijd (%t) ligt volgens superblok\n"
+" in de toekomst (nu = %T).\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "De superblokhint voor een extern superblok dient %X te zijn. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Toevoegen van 'dirhash'-hint aan bestandssysteem.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Van groepsbeschrijver %g is de controlesom %04x, zou %04y moeten zijn. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "Groepsbeschrijver %g is gemarkeerd als ongeïnitialiseerd zonder functies.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Groepsbeschrijver %g heeft een ongeldig aantal (%b) ongebruikte inodes. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Blok-bitkaart van laatste groepsbeschrijver is ongeïnitialiseerd. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Journal-transactie %i is beschadigd; het afspelen is afgebroken.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "De functievlag 'test_fs' is gezet (en ext4 is beschikbaar). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Laatste aankoppelingstijd ligt volgens het superblok in de toekomst.\n"
+" (Maar minder dan een dag; vermoedelijk is de hardwareklok onjuist ingesteld.)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Laatste schrijftijd ligt volgens het superblok in de toekomst.\n"
+" (Maar minder dan een dag; vermoedelijk is de hardwareklok onjuist ingesteld.)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Een of meer groepsbeschrijvers hebben een ongeldige controlesom. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Het aantal vrije inodes is op %j gezet (was %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Het aantal vrije blokken is op %c gezet (was %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "De %U quota-inode %i (%Q) wordt verborgen.\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "Superblok heeft ongeldig MMP-blok. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "Superblok heeft ongeldig magisch getal voor MMP. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2(): %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc(): %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "Superblok 'metadata_csum' overstijgt 'uninit_bg'; de twee functiebits kunnen niet tegelijk gezet zijn."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "Controlesom (in superblok) van MMP-blok komt niet overeen. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "Superblok van 64-bits bestandssysteem heeft extents nodig om gehele schijf te kunnen bereiken. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "Waarde van 'first_meta_bg' is te groot (%N, maximum is %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Controlesom van superblok (in extern journal) komt niet overeen met superblok. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "Superblok 'metadata_csum_seed' is onnodig zonder 'metadata_csum'."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Fout tijdens initialiseren van quota-context in ondersteunende bibliotheek: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Ongeldige vereiste extra inode-grootte in superblok (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Ongeldige gewenste extra inode-grootte in superblok (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "Ongeldige %U quota-inode %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "Superblok zou te veel inodes (%N) bevatten.\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"De functies 'resize_inode' en 'meta_bg' zijn beide actief, maar ze gaan\n"
+"niet samen. Functie 'resize_inode' zou uitgeschakeld moeten worden. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Stap 1: Controle van inodes, blokken, en groottes\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "De hoofd-inode is geen map. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "De verwijderingstijd van de hoofd-inode is niet nul (waarschijnlijk veroorzaakt door een oude mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Gereserveerde inode %i %Q heeft een ongeldige modus. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "De verwijderingstijd van verwijderde inode %i is nul. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "Inode %i is in gebruik, maar heeft een ingevulde verwijderingstijd. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "Inode %i is een map met lengte nul. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "De blok-bitkaart van groep %g botst bij %b met een bestandssysteemblok.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "De inode-bitkaart van groep %g botst bij %b met een bestandssysteemblok.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "De inodetabel van groep %g botst bij %b met een bestandssysteemblok.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "De blok-bitkaart %b van groep %g is ongeldig. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "De inode-bitkaart %b van groep %g is ongeldig. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "Inode %i, 'i_size' is %Is, zou %N moeten zijn. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "Inode %i, 'i_blocks' is %Ib, zou %N moeten zijn. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "Ongeldig %B (%b) in inode %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) overlapt metadata van bestandssysteem in inode %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "Inode %i bevat ongeldig(e) blok(ken). "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Te veel ongeldige blokken in inode %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "Ongeldig %B (%b) in slechteblokken-inode. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Slechteblokken-inode bevat ongeldig(e) blok(ken). "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Een dubbel of slecht blok is in gebruik!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Slecht blok %b is in gebruik als indirect blok voor de slechteblokken-inode. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"De slechteblokken-inode is vermoedelijk beschadigd.\n"
+"U kunt nu beter stoppen en 'e2fsck -c' uitvoeren om\n"
+"het bestandssysteem te doorzoeken naar slechte blokken.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Als het blok echt slecht is, kan het bestandssysteem niet gerepareerd worden.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"U kunt dit blok uit de lijst van slechte blokken wissen en hopen\n"
+"dat het blok toch goed is. Maar er zijn geen garanties.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Het primaire superblok (%b) staat in de lijst van slechte blokken.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Een groepsbeschrijversblok (%b) staat in de lijst van slechte blokken.\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Waarschuwing: groep %g heeft een slecht superblok (%b).\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Waarschuwing: groep %g bevat een slecht blok (%b) in de groepsbeschrijvers.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Interne fout?: blok %b is zonder reden geclaimd in process_bad_block().\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "Fout tijdens reserveren van %N aaneengsloten blokken in groep %g voor %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "Fout tijdens reserveren van buffer voor verplaatsen van %s.\n"
+
+# src/delegate.c:368
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Bezig met verplaatsen van groep %g's %s van %b naar %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Bezig met verplaatsen van groep %g's %s naar %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Waarschuwing: kan blok %b van %s niet lezen: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Waarschuwing: kan blok %b van %s niet schrijven: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "Fout tijdens reserveren van inode-bitkaart (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "Fout tijdens reserveren van blok-bitkaart (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "Fout tijdens reserveren van 'icount'-link-informatie: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "Fout tijdens reserveren van blokreeks voor map: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Fout tijdens scannen van inodes (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Fout tijdens langslopen van blokken van inode %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Fout tijdens opslaan van inodetal (inode=%i, aantal=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Fout tijdens opslaan van mapblokkeninformatie (inode=%i, blok=%b, aantal=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Fout tijdens lezen van inode %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Inode %i heeft de imagic-vlag gezet. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Speciaal bestand (apparaat/socket/fifo/symlink) (inode %i) heeft de\n"
+"onveranderbaar- of de alleen-toevoegenvlag gezet. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Speciale inode %i (apparaat/socket/fifo) heeft niet lengte nul. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "Journal-inode is niet in gebruik, maar bevat gegevens. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "Journal is geen normaal bestand. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "Inode %i was deel van de lijst van verweesde inodes. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Inodes gevonden die deel waren van een beschadigde lijst van verweesde inodes. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "Fout tijdens reserveren van 'refcount'-structuur (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Fout tijdens lezen van blok %b met uitgebreide kenmerken voor inode %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "Inode %i bevat een slecht blok %b met uitgebreide kenmerken. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Fout tijdens lezen van blok %b met uitgebreide kenmerken: %m "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "Blok %b met uitgebreide kenmerken heeft verwijzingstal %r, zou %N moeten zijn. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Fout tijdens schrijven van blok %b met uitgebreide kenmerken: %m "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "Blok %b met uitgebreide kenmerken heeft h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "Fout tijdens reserveren van structuur voor reservering van uitgebreidekenmerkenregio. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "Blok %b met uitgebreide kenmerken is beschadigd (reserveringsoverlap). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "Blok %b met uitgebreide kenmerken is beschadigd (ongeldige naam). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "Blok %b met uitgebreide kenmerken is beschadigd (ongeldige waarde). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "Inode %i is te groot. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) maakt map te groot. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) maakt bestand te groot. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) maakt symbolische koppeling te groot. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "Inode %i heeft de 'INDEX_FL'-vlag gezet op een bestandssysteem zonder 'htree'-ondersteuning.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "Inode %i heeft de 'INDEX_FL'-vlag gezet maar het is geen map.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "Inode %i van 'htree'-map heeft een ongeldige wortelknoop.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "Inode %i van 'htree'-map gebruikt een niet-ondersteunde hash-versie (%N).\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "Inode %i van 'htree'-map gebruikt een incompatibele wortelknoopvlag.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "Inode %i van 'htree'-map heeft een te grote boomdiepte (%N).\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Slechteblokken-inode bevat een indirect blok (%b) dat strijdig\n"
+"is met de metagegevens van het bestandssysteem. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Aanmaken van 'resize'-inode is mislukt: %m"
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "Inode %i heeft een ongeldige extra grootte (%IS).\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "Een uitgebreid kenmerk in inode %i heeft een ongeldige naamlengte (%N).\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "Een uitgebreid kenmerk in inode %i heeft een ongeldige waardeoffset (%N).\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "Een uitgebreid kenmerk in inode %i heeft een ongeldig waardeblok (%N, moet 0 zijn).\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "Een uitgebreid kenmerk in inode %i heeft een ongeldige waardegrootte (%N).\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "Een uitgebreid kenmerk in inode %i heeft een ongeldige hash-waarde (%N).\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "Inode %i is gemarkeerd als een %It, maar lijkt feitelijk een map te zijn.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Fout tijdens doorlezen van extents-boom in inode %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Langslopen van extents in inode %i is mislukt\n"
+" (op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i heeft een ongeldige extent\n"
+" (logisch blok %c, ongeldig fysiek blok %b, lengte %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"Inode %i heeft een ongeldige extent\n"
+" (logisch blok %c, fysiek blok %b, ongeldige lengte %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "Inode %i heeft de 'EXTENTS_FL'-vlag gezet op een bestandssysteem zonder 'htree'-ondersteuning.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "Inode %i heeft extent-opmaak, maar superblok heeft EXTENTS-vlag niet gezet.\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "Inode %i heeft extent-opmaak, maar heeft EXTENT_FL-vlag niet gezet.\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Snelle symbolische koppeling %i heeft 'EXTENT_FL'-vlag gezet. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i heeft extents die niet op volgorde liggen\n"
+" (ongeldig logisch blok %c, fysiek blok %b, lengte %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "Inode %i heeft een ongeldige extent-knoop (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Fout tijdens converteren van subclusterblokken-bitkaart: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "Quota-inode is geen normaal bestand. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "Quota-inode is niet in gebruik, maar bevat gegevens. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "Quota-inode is zichtbaar voor de gebruiker. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "De slechteblokken-inode lijkt ongeldig. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"Inode %i heeft een extent met lengte nul\n"
+" (ongeldig logisch blok %c, fysiek blok %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "Inode %i schijnt rommel te bevatten. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "Inode %i komt door de tests, maar controlesom komt niet overeen met inode. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "Uitgebreid kenmerk van inode %i is beschadigd (reserveringsoverlap). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Extent-blok van inode %i komt door de tests, maar controlesom komt niet overeen met extent\n"
+" (logisch blok %c, fysiek blok %b, lengte %N).\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "Uitgebreidkenmerkblok van inode %i komt door de tests, maar controlesom komt niet overeen met blok. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Inwendig extent-knoopniveau %N van inode %i:\n"
+"Logisch begin %b komt niet overeen met logisch begin %c op volgende niveau. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i: einde van extent overschrijdt toegestane waarde\n"
+" (logisch blok %c, fysiek blok %b, lengte %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "Inode %i bevat inline gegevens, maar superblok heeft INLINE_DATA-vlag niet gezet.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "Inode %i heeft de 'INLINE_DATA_FL'-vlag gezet op een bestandssysteem zonder ondersteuning voor inline gegevens.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "Blok %b van inode %i conflicteert met kritieke metadata; blokcontroles worden overgeslagen.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "In map-inode %i zou blok %b blok %c moeten zijn. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "Map-inode %i bevat een ongeïnitialiseerde extent in blok %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"Logisch blok %b (fysiek blok %c) in inode %i schendt clusterreserveringsregels.\n"
+"Zal worden gerepareerd in stap 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "Inode %i heeft de 'INLINE_DATA_FL'-vlag gezet maar uitgebreid kenmerk is niet gevonden. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Speciaal bestand (apparaat/socket/fifo) (inode %i) heeft de\n"
+"extents- of inline-gegevens-vlag gezet. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "Inode %i heeft een extents-header maar de inline-gegevens-vlag is gezet.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "Inode %i schijnt inline gegevens te hebben maar de extents-vlag is gezet.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "Inode %i schijnt een blokkenkaart te hebben maar de inline-gegevens- of de extents-vlag is gezet.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "Inode %i bevat inline gegevens en heeft extent-vlaggen gezet maar 'i_block' bevat rommel.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "De slechteblokkenlijst zegt dat de slechteblokkenlijst-inode slecht is. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "Fout tijdens reserveren van structuur voor reservering van extents-regio. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"Inode %i heeft een gedupliceerde extent-toewijzing\n"
+" (logisch blok %c, ongeldig fysiek blok %b, lengte %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "Fout tijdens reserveren van %N bytes voor versleutelde inode-lijst\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "extents-boom van inode %i zou ondieper kunnen (%b; zou <= %c kunnen zijn)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "Inode %i op 'bigalloc'-bestandssysteem kan niet blok-mapped zijn. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "Inode %i heeft een beschadigde extents-header. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Tijdsstempels van inode %i voorbij 4 april 2310 zijn vermoedelijk van vóór 1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "Inode %i bevat een ongeldig slecht blok %b met uitgebreide kenmerken. \n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "Inode %i heeft een ongeldig uitgebreid kenmerk. Uitgebreidkenmerk-inode %N heeft EA_INODE-vlag niet gezet.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "Inode %i bevat een ongeïnitialiseerde extent in blok %c (lengte %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "Inode %i heeft de 'casefold'-vlag gezet maar het is geen map. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"Map %p heeft de 'casefold'-vlag gezet,\n"
+"maar de 'casefold'-functie is niet ingeschakeld. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "Inode %i heeft de 'encrypt'-vlag gezet maar geen uitgebreid kenmerk voor versleuteling.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "Versleutelde inode %i heeft een beschadigd uitgebreid kenmerk voor versleuteling.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr ""
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Er zijn extra stappen nodig voor het ontwarren van blokken die door\n"
+"meer dan één inode geclaimd worden.\n"
+"Stap 1B: Opnieuw zoeken naar meervoudig-geclaimde blokken\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Meervoudig-geclaimd blok (of blokken) in inode %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Fout tijdens scannen van inodes (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "Fout tijdens reserveren van vervangende inode-bitkaart: %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Fout tijdens langslopen van blokken van inode %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Fout tijdens bijstellen van verwijzingstal van blok %b met uitgebreide kenmerken (inode %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Stap 1C: Doorzoeken van mappen naar inodes met meervoudig-geclaimde blokken\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Stap 1D: Verzoenen van meervoudig-geclaimde blokken\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Bestand %Q (inode %i, wijzigingstijd %IM)\n"
+" bevat %r meervoudig-geclaimd(e) blok(ken), gedeeld met %N bestand(en):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (inode %i, wijzigingstijd %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<metagegevens van bestandssysteem>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Er zijn %N inodes met meervoudig-geclaimde blokken.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Meervoudig-geclaimde blokken zijn al gekloond of opnieuw toegekend.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Kan bestand niet klonen: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Stap 1E: Optimalisatie van extents-bomen\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Optimaliseren van extents-boom %p (%i) is mislukt: %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Optimaliseren van extents-bomen: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "Extents-boom van inode %i zou korter kunnen (op niveau %b). "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "Extents-boom van inode %i zou smaller kunnen (op niveau %b). "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Stap 2: Controle van mappenstructuur\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Ongeldig inodenummer voor '.' in map-inode %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E heeft een ongeldig inodenummer: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E bevat een verwijderde of ongebruikte inode %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "@E is een koppeling naar '.' "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E verwijst naar een inode (%Di) in een slecht blok.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E is een koppeling naar map %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "@E is een koppeling naar de hoofd-inode.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E bevat ongeldige tekens in de naam.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Ontbrekende '.' in map-inode %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Ontbrekende '..' in map-inode %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Eerste item '%Dn' (inode=%Di) in map-inode %i (%p) moet '.' zijn.\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Tweede item '%Dn' (inode=%Di) in map-inode %i moet '..' zijn.\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "'i_faddr' @F is %IF, moet nul zijn.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "'i_file_acl' @F is %If, moet nul zijn.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "'i_size_high' @F is %Id, moet nul zijn.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "'i_frag' @F is %N, moet nul zijn.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "'i_fsize' @F is %N, moet nul zijn.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "Inode %i (%Q) heeft een ongeldige modus (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "Map-inode %i, %B, positie %N: map is beschadigd\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "Map-inode %i, %B, positie %N: bestandsnaam is te lang\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "Map-inode %i bevat een ongereserveerd %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Item '.' in map-inode %i eindigt niet op NULL.\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Item '..' in map-inode %i eindigt niet op NULL.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "Inode %i (%Q) is een ongeldig byte-apparaat.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "Inode %i (%Q) is een ongeldig blok-apparaat.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E is een duplicaat-'.'-item.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E is een duplicaat-'..'-item.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "**Interne programmafout**: kan 'dir_info' voor %i niet vinden.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E heeft een 'rec_len' van %Dr, zou %N moeten zijn.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "Fout tijdens reserveren van 'icount'-structuur: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Fout tijdens langslopen van mapblokken: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Fout tijdens lezen van mapblok %b (inode %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Fout tijdens schrijven van mapblok %b (inode %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "Fout tijdens reserveren van nieuw mapblok voor inode %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Fout tijdens vrijgeven van inode %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "Mapitem voor '.' in %p (%i) is groot.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "Inode %i (%Q) is een ongeldige FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "Inode %i (%Q) is een ongeldige socket.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Bestandstype van @E wordt op %N gezet.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E heeft een ongeldig bestandstype (%Dt, zou %N moeten zijn).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "@E heeft een ingevuld bestandstype.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "@E heeft een naam met lengte nul.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symbolische koppeling %Q (inode %i) is ongeldig.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "Blok van uitgebreide kenmerken @F is ongeldig (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "Bestandssysteem bevat grote bestanden, maar superblok heeft niet de 'LARGE_FILE'-vlag.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "Probleem in 'htree'-map-inode %d: naar %B wordt niet verwezen.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "Probleem in 'htree'-map-inode %d: naar %B wordt twee keer verwezen.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "Probleem in 'htree'-map-inode %d: %B heeft een ongeldige minimum hash.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "Probleem in 'htree'-map-inode %d: %B heeft een ongeldige maximum hash.\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "Ongeldige 'htree'-map-inode %d (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "Bestandssysteem bevat grote mappen, maar superblok heeft niet de 'LARGE_DIR'-vlag.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "Probleem in 'htree'-map-inode %d (%q): ongeldig bloknummer %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "Probleem in 'htree'-map-inode %d: de wortelknoop is ongeldig.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "Probleem in 'htree'-map-inode %d: %B heeft een ongeldige limiet (%N).\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "Probleem in 'htree'-map-inode %d: %B heeft een ongeldig aantal (%N).\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "Probleem in 'htree'-map-inode %d: %B heeft een ongeordende hash-tabel.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "Probleem in 'htree'-map-inode %d: %B heeft een ongeldige diepte (%N).\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Dubbel item '%Dn' in %p (%i) gevonden. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E heeft een niet-unieke bestandsnaam.\n"
+"Hernoemen tot %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Dubbel item '%Dn' gevonden.\n"
+" Map %p (%i) wordt gemarkeerd om opnieuw te worden opgebouwd.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "'i_blocks_hi' @F is %N, moet nul zijn.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Onverwacht blok in 'htree'-map-inode %d (%q)\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E verwijst naar inode %Di in groep %g die gemarkeerd is als _INODE_UNINIT.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E verwijst naar inode %Di in het gebied met ongebruikte inodes van groep %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "'i_file_acl' @F is %N, moet nul zijn.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "Probleem in 'htree'-map-inode %d: controlesomfout over wortelknoop.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "Probleem in 'htree'-map-inode %d: controlesomfout over wortelknoop.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "Map-inode %i, %B, positie %N: map heeft geen controlesom.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "Map-inode %i, %B: map voldoet aan eisen maar controlesom klopt niet.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Grootte van inline map-inode %i (%N) moet een veelvoud van 4 zijn,\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Het corrigeren van de grootte van inline map-inode %i is mislukt.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Versleuteld item '%Dn' in %p (%i) is te kort.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "@E bevat ongeldige UTF-8-tekens in de naam.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "Dubbel bestandsnaamitem '%Dn' in %p (%i) gevonden. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Stap 3: Controle van verbindingen tussen mappen\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "Hoofd-inode is niet gereserveerd. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Geen ruimte meer in /lost+found. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "Onverbonden map-inode %i (was in %q)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/lost+found niet gevonden. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' in %Q (%i) is %P (%j), moet %q (%d) zijn.\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Beschadigde of niet-bestaande /lost+found. Kan inode niet herverbinden.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Kan /lost+found niet uitbreiden: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Kan inode %i niet herverbinden: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Fout tijdens zoeken van /lost+found: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block(): %m tijdens maken van /lost+found\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode(): %m tijdens maken van /lost+found\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block(): %m tijdens maken van nieuw mapblok\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block(): %m tijdens maken van mapblok voor /lost+found\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Fout tijdens bijwerken van inodetal van inode %i.\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Kan ouderverwijzing van inode %i niet herstellen: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Kan ouderverwijzing van inode %i niet herstellen: kan de oudermap niet vinden.\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Fout tijdens maken van hoofdmap (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Fout tijdens maken van /lost+found-map (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "De hoofd-inode is geen map. Gestopt.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Kan niet verder zonder een hoofd-inode.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found (inode %i) is geen map\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/lost+found heeft inline-gegevens\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Kan geen ruimte reserveren voor /lost+found.\n"
+"Verloren bestanden worden in hoofdmap geplaatst."
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Onvoldoende ruimte om verloren bestanden te herstellen.\n"
+"Verplaats gegevens vanuit het bestandssysteem en draai 'e2fsck' opnieuw.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/lost+found is versleuteld\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "Recursief geluste map-inode %i (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Stap 3A: Optimalisatie van mappen\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Maken van 'dirs_to_hash-iterator' is mislukt: %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Optimaliseren van map %q (%d) is mislukt: %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Optimaliseren van mappen: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Stap 4: Controle van verwijzingsaantallen\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "Onverbonden inode %i met lengte nul. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "Onverbonden inode %i.\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "Verwijzingsaantal van inode %i is %Il, zou %N moeten zijn. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"WAARSCHUWING: programmafout in e2fsck!\n"
+" *of* U BENT EEN AANGEKOPPELD BESTANDSSYSTEEM AAN HET CONTROLEREN!\n"
+"\n"
+"inode_link_info[%i] is %N, inode.i_links_count is %Il.\n"
+"Deze horen hetzelfde te zijn!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "Verwijzingsaantal van uitgebreidkenmerk-inode %i is %N, zou %n moeten zijn. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "Map overschrijdt maximum aantal koppelingen, maar superblok heeft DIR_NLINK-vlag niet gezet.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "Map-inode %i heeft verwijzingstal als overloop gezet maar zou exact waarde %N kunnen zijn."
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Stap 5: Controle van groepssamenvattingen\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "Opvulling aan het eind van inode-bitkaart is niet gezet. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "Opvulling aan het eind van blok-bitkaart is niet gezet. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "Blok-bitkaart-verschillen: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "Inode-bitkaart-verschillen: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Verkeerd aantal vrije inodes voor groep #%g (%i, geteld=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Verkeerd aantal mappen voor groep #%g (%i, geteld=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Verkeerd aantal inodes (%i, geteld=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Verkeerd aantal blokken voor groep #%g (%b, geteld=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Verkeerd aantal blokken (%b, geteld=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "PROGRAMMAFOUT in e2fsck: in bestandssysteem %N komen de bitkaart-eindpunten (%b, %c) niet overeen met de berekende eindpunten (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "**Interne programmafout**: einde van bitmap is gefoezeld (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Fout tijdens kopiëren naar vervangende inode-bitkaart: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Fout tijdens kopiëren naar vervangende blok-bitkaart: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "Blok(ken) van groep %g in gebruik, maar groep is gemarkeerd als BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "Inode(s) van groep %g in gebruik, maar groep is gemarkeerd als INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "Inode-bitkaart van groep %g komt niet overeen met controlesom.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "Blok-bitkaart van groep %g komt niet overeen met controlesom.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Journal heraanmaken"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "Quota-informatie bijwerken voor quotatype %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Fout bij instellen van blokgroepcontrolesominformatie: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Fout bij schrijven van bestandssysteeminformatie: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Fout bij wegschrijven van buffers naar opslagapparaat: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Fout tijdens schrijven van quota-informatie voor quotatype %N: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Onbekende foutcode (0x%x)!\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "GENEGEERD"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "in 'move_quota_inode'"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Gebruikt geheugen: %lu, verlopen tijd: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "grootte van inode is %d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "tijdens openen voor inode-scan"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "tijdens start van inode-scan"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "tijdens uitvoering van inode-scan"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "tijdens aanroep van ext2fs_block_iterate() voor inode %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "tijdens aanroep van ext2fs_adjust_ea_refcount2() voor inode %u"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Afkappen van"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "Wissen van"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Gebruik: %s [-pnycdfktvDFV] [-b superblok] [-B blokgrootte]\n"
+" [-C bestandsdescriptor] [-E uitgebreide_opties]\n"
+" [-I inodebufferblokken] [-j extern_journal] \n"
+" [-l|-L slechteblokkenbestand] [-z ongedaanmakenbestand]\n"
+" apparaat\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Noodhulp:\n"
+" -p Automatische reparatie (zonder vragen).\n"
+" -n Bestandssyteem niet veranderen; op alle vragen \"nee\" aannemen.\n"
+" -y Als antwoord op alle vragen \"ja\" aannemen.\n"
+" -c Op slechte blokken controleren en deze aan lijst toevoegen.\n"
+" -f Een controle afdwingen, ook als het bestandssysteem schoon is.\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Gedetailleerde uitvoer produceren.\n"
+" -b superblok Dit superblok gebruiken.\n"
+" -B blokgrootte Deze blokgrootte gebruiken bij zoeken naar superblok.\n"
+" -j extern_journal Dit externe journal gebruiken.\n"
+" -l slechteblokkenbestand Deze lijst aan de slechteblokkenlijst toevoegen.\n"
+" -L slechteblokkenbestand Deze slechteblokkenlijst gebruiken.\n"
+" -z ongedaanmakenbestand Een ongedaanmakenbestand met deze naam aanmaken.\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u bestanden (%0d.%d%% niet-aaneengesloten), %llu/%llu blokken\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u inode gebruikt (%2.2f%% van %u)\n"
+msgstr[1] ""
+"\n"
+"%12u inodes gebruikt (%2.2f%% van %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u niet-aaneengesloten bestand (%0d.%d%%)\n"
+msgstr[1] "%12u niet-aaneengesloten bestanden (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u niet-aaneengesloten map (%0d.%d%%)\n"
+msgstr[1] "%12u niet-aaneengesloten mappen (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " aantal inodes met indirecte blokken: %u enkel, %u dubbel, %u triple\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " Extents-dieptehistogram: "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu blok gebruikt (%2.2f%% van %llu)\n"
+msgstr[1] "%12llu blokken gebruikt (%2.2f%% van %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u slecht blok\n"
+msgstr[1] "%12u slechte blokken\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u groot bestand\n"
+msgstr[1] "%12u grote bestanden\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u normaal bestand\n"
+msgstr[1] ""
+"\n"
+"%12u normale bestanden\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u map\n"
+msgstr[1] "%12u mappen\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u byte-apparaat\n"
+msgstr[1] "%12u byte-apparaten\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u blok-apparaat\n"
+msgstr[1] "%12u blok-apparaten\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifo's\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u koppeling\n"
+msgstr[1] "%12u koppelingen\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u symbolische koppeling"
+msgstr[1] "%12u symbolische koppelingen"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u snelle koppeling)\n"
+msgstr[1] " (%u snelle koppelingen)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+msgstr[1] "%12u sockets\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u bestand\n"
+msgstr[1] "%12u bestanden\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "tijdens bepalen of %s aangekoppeld is."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Waarschuwing! %s is aangekoppeld.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Waarschuwing! %s is in gebruik.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s is aangekoppeld.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s is in gebruik.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Kan niet doorgaan. Gestopt.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"**WAARSCHUWING**!!! Het bestandssysteem is aangekoppeld!\n"
+" Als u doorgaat **ZAL** dit tot **ZWARE** beschadigingen leiden.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Wilt u echt doorgaan"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "De controle is afgebroken.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " bevat een bestandssysteem met fouten"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " is niet goed ontkoppeld"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " het primaire superblok heeft andere functievlaggen gezet dan de reserveblokken"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " is %u keer aangekoppeld geweest zonder controle"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " is schijnbaar het laatst gecontroleerd in de toekomst"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " is gedurende %u dagen niet gecontroleerd"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "controle-interval wordt genegeerd; 'broken_system_clock' is gezet\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", gedwongen controle.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: schoon, %u/%u bestanden, %llu/%llu blokken"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (controle is uitgesteld; computer loopt op accu)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (controle bij volgende aankoppeling)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (controle na %ld aankoppelingen)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "FOUT: kan /dev/null niet openen (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Ongeldige versie van uitgebreide kenmerken.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "Ongeldige grootte van vooruitleesbuffer.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Onbekende uitgebreide optie: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Uitgebreide opties worden gescheiden door komma's; een eventueel argument\n"
+"wordt voorafgegaan door een '='-teken. Geldige uitgebreide opties zijn:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr " ea_ver=<uitgebreidekenmerkenversie (1 of 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr " readahead_kb=<buffergrootte>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaxfout in 'e2fsck'-configuratiebestand (%s, regel #%d)\n"
+" %s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Fout tijdens valideren van bestandsdesriptor %d: %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "Ongeldige completeringsinformatie voor bestandsdescriptor."
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Slechts één van de opties -a, -p, -n of -y mag worden opgegeven."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Optie '-t' wordt niet ondersteund door deze versie van e2fsck.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Kan apparaat '%s' niet vinden."
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "Opties '-n' en '-D' gaan niet samen."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "Opties '-n' en '-c' gaan niet samen."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "De opties '-n' en '-l' of '-L' gaan niet samen."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Opties '-D' en '-E fixes_only' gaan niet samen."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Opties '-E bmap2extent' en '-E fixes_only' gaan niet samen."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "tijdens openen van %s om deze leeg te maken"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "tijdens leegmaken van %s"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "De opties '-c' en '-l' of '-L' kunnen niet samen gebruikt worden.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG -- \"%s\" is geen geheel getal\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Ongeldig niet-numeriek argument van '-%c': \"%s\"\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "Het MMP-interval is %u seconden, en de totale wachttijd is %u seconden. Even geduld...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "tijdens controleren van MMP-blok"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Als u zeker weet dat het bestandssysteem nergens in gebruik is,\n"
+"geef dan deze opdracht: 'tune2fs -f -E clear_mmp %s'\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "tijdens lezen van MMP-blok"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Een bestaand bestandssysteem wordt overschreven;\n"
+"dit kan ongedaan gemaakt worden met de opdracht:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "tijdens verwijderen van %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "tijdens aanmaken van 'undo'-bestand\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Fout: de ext2fs-bibliotheek is te oud!\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "tijdens programma-initialisatie"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr " gebruik makend van %s, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "voor interactieve reparaties is een terminal vereist"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s reservekopieblokken worden bekeken...\n"
+
+# Gebruik van '--' in deze en volgende string is opzettelijk;
+# één van deze strings wordt ingevuld voor de tweede %s hierboven.
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Superblok is ongeldig --"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Groepsbeschrijvers zien er slecht uit --"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s tijdens gebruik van de reservekopieblokken"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: er wordt teruggevallen op het eerste superblok\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"De bestandssysteemversie is blijkbaar te nieuw voor deze versie van e2fsck.\n"
+"(Of het superblok is beschadigd.)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "Is dit misschien een partitie met lengte nul?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "U dient %s-toegang tot het bestandssyteem te hebben, of root te zijn.\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Mogelijk een niet-bestaand apparaat of een swap-apparaat?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Is bestandssysteem exclusief aangekoppeld of geopend door een ander programma?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "Mogelijk een niet-bestaand apparaat?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"De schijf is schrijfbeveiligd. Gebruik de optie '-n' om een\n"
+"alleen-lezencontrole van het apparaat uit te voeren.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: Poging om superblok te laden ondanks fouten...\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "Installeer een nieuwere versie van e2fsck!"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "tijdens controle van het journal voor %s"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "Kan niet verdergaan met bestandssysteemcontrole"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr ""
+"Waarschuwing: afspelen van journal wordt overgeslagen\n"
+"omdat een alleen-lezencontrole uitgevoerd wordt.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "Kan superblokvlaggen van %s niet zetten.\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Controlesomfout in journal in %s\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Journal is beschadigd in %s\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "tijdens afspelen van het journal van %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "Bestandssysteem %s heeft functies ingeschakeld die niet ondersteund worden:"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "Bestandssysteem %s heeft een niet-ondersteunde codering: %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s tijdens lezen van slechteblokken-inode\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Dit ziet er niet goed uit, maar we zullen doorgaan...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Aanmaken van journal (%d blokken): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " voltooid.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** journal is opnieuw aangemaakt ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "afgebroken"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: 'e2fsck' is geannuleerd.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "E2fsck wordt opnieuw gestart vanaf het begin...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "tijdens wissen van de context"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** BESTANDSSYSTEEMFOUTEN ZIJN GECORRIGEERD *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: Het bestandssysteem is veranderd.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** BESTANDSSYSTEEM IS VERANDERD *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** HERSTART UW SYSTEEM *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** WAARSCHUWING: bestandssysteem bevat nog fouten **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "jJyY"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "aA"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " ('a' betekent 'ja tegen alles') "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<j>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "geannuleerd!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "ja tegen alles\n"
+
+# src/main.c:417 src/main.c:418 src/main.c:483 src/main.c:484 src/main.c:489
+# src/main.c:490 src/main.c:574
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "ja\n"
+
+# src/main.c:417 src/main.c:418 src/main.c:432 src/main.c:483 src/main.c:484
+# src/main.c:489 src/main.c:490 src/main.c:574
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "nee\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nee\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ja\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "ja"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "nee"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps(): ongeldige bitkaartblokken voor %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "lezen van inode- en blok-bitkaarten"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "tijdens herlezen van bitkaarten voor %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "schrijven van blok- en inode-bitkaarten"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "tijdens herschrijven van blok- en inode-bitkaarten voor %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: ONVERWACHTE INCONSISTENTIE; voer 'fsck' met de hand uit\n"
+" (dat wil zeggen: zonder de opties '-a' of '-p').\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Gebruikt geheugen: %lluk/%lluk (%lluk/%lluk), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Gebruikt geheugen: %lluk, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "tijd: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "verlopen tijd: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "tijdens lezen van inode %lu in %s"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "tijdens schrijven van inode %lu in %s"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "ONVERWACHTE INCONSISTENTIE: het bestandssysteem wordt gewijzigd terwijl 'fsck' uitgevoerd wordt.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "voltooid \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Gebruik: %s [-b blokgrootte] [-i invoerbestand] [-o uitvoerbestand]\n"
+" [-c aantal_blokken_tegelijk] [-d vertragingsfactor_tussen_leesacties]\n"
+" [-e maximum_aantal_slechte_blokken] [-p aantal_controles]\n"
+" [-t testpatroon [-t testpatroon [...]]] [-fnsvwBX]\n"
+" apparaat [eindblok [beginblok]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Opties '-n' en '-w' gaan niet samen.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% gedaan, %s verlopen (%d/%d/%d fouten)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Test wordt uitgevoerd met dit willekeurige patroon: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Test wordt uitgevoerd met patroon 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "tijdens 'seek'"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Vreemde waarde (%ld) bij leespoging\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "tijdens leegmaken van de buffers"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "tijdens voorbereiding van het langslopen van de lijst met slechte blokken"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "tijdens reserveren van buffers"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Controleren van blokken %lu tot %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Zoeken naar slechte blokken in alleen-lezen-modus\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Zoeken naar slechte blokken (alleen-lezen-test): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Te veel slechte blokken -- controle is afgebroken\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Zoeken naar slechte blokken in lezen-en-schrijven-modus\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Van blok %lu tot %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Lezen en vergelijken: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Zoeken naar slechte blokken in niet-destructieve lezen-en-schrijven-modus\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Zoeken naar slechte blokken (niet-destructieve lezen-en-schrijven-test)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Interrupt ontvangen, bezig met opschonen...\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "tijdens schrijven van testpatroon, blok %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s is aangekoppeld; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"maar 'badblocks' wordt gedwongen uitgevoerd.\n"
+"Hoop dat /etc/mtab onjuist is.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "het is niet veilig om 'badblocks' uit te voeren!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s wordt blijkbaar gebruikt door het systeem; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "maar 'badblocks' wordt gedwongen uitgevoerd.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "ongeldige %s: %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Te groot aantal (%u) slechte blokken -- maximum is %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "kan geen geheugen reserveren voor testpatroon -- %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "In alleen-lezen-modus mag slechts één testpatroon gegeven worden"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "In alleen-lezen-modus is een willekeurig testpatroon niet toegestaan"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Ongeldige blokgrootte: %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Ongeldige aantal_blokken_tegelijk: %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr "Kan de apparaatgrootte niet bepalen; geef de grootte handmatig op.\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "tijdens bepalen van apparaatgrootte"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "laatste blok"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "eerste blok"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "ongeldig beginblok: %llu -- moet kleiner dan %llu zijn"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "ongeldig beginblok: %llu -- moet een 32-bits waarde zijn"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "tijdens opstellen van lijst van slechte blokken in geheugen"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "invoerbestand heeft ongeldige opmaak"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "tijdens toevoegen aan lijst van slechte blokken in geheugen"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Controle is voltooid; %u slechte blokken gevonden (%d/%d/%d fouten).\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Gebruik: %s [-RVf] [-+=AaCcDdeijPSsTtuFx] [-p PROJECT] [-v VERSIE] BESTAND...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "ongeldig project: %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "ongeldige versie: %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "tijdens opvragen van de status van %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "tijdens lezen van vlaggen op %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Vlaggen van %s zijn gezet als "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "tijdens zetten van vlaggen op %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versie van %s is gezet als %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "tijdens zetten van versie op %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Project van %s is gezet als %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "tijdens instellen van project op %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Kan geen padvariabele reserveren in chattr_dir_proc()"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "'=' gaat niet samen met '-' en '+'\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Gebruik '-v', '=', '-' of '+'.\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "tijdens lezen van inode %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "tijdens uitbreiden van map"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "tijdens koppelen van \"%s\""
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "tijdens schrijven van inode %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "tijdens opsommen van kenmerken van \"%s\""
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "tijdens openen van inode %u"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "tijdens lezen van xattrs voor inode %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "tijdens reserveren van geheugen"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "tijdens lezen van kenmerk \"%s\" van \"%s\""
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "tijdens schrijven van kenmerk \"%s\" naar inode %u"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "tijdens sluiten van inode %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "tijdens reserveren van geheugen voor inode \"%s\""
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "tijdens aanmaken van inode \"%s\""
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "tijdens aanmaken van symbolische koppeling \"%s\""
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "tijdens opzoeken van \"%s\""
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "tijdens aanmaken van map \"%s\""
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "tijdens openen van \"%s\" voor kopiëren"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "tijdens veranderen van werkmap naar \"%s\""
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "tijdens scannen van map \"%s\""
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "tijdens lstat() van \"%s\""
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "tijdens aanmaken van speciaal bestand \"%s\""
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "onvoldoende geheugen beschikbaar"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "tijdens lezen van koppeling \"%s\""
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "symbolische koppeling is groter geworden tussen lstat() en readlink()"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "tijdens schrijven van symbolische koppeling \"%s\""
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "tijdens schrijven van bestand \"%s\""
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "tijdens aanmaken van map \"%s\""
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "tijdens wijzigen van map"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "item \"%s\" wordt genegeerd"
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "tijdens instellen van inode voor \"%s\""
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "tijdens instellen van uitgebreide kenmerken voor \"%s\""
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "tijdens opslaan van inode-gegevens"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "tijdens kopiëren van 'xattrs' voor hoofdmap"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Gebruik: %s [-bfghimxV] [-o superblock=<nummer>] [-o blocksize=<getal>] apparaat\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blokken"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "clusters"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Groep %lu: (Blokken "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " c.som 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (0x%04x WERD VERWACHT)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s superblok op "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primair"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Reservekopie"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Groepsbeschrijvers op "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Blokken voor groepsbeschrijverstabel gereserveerd op "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Groepsbeschrijver op "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Blok-bitkaart op "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", c.som 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Inode-bitkaart op "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Inodetabel op "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u vrije %s, %u vrije inodes, %u mappen%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u ongebruikte inodes\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Vrije blokken: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Vrije inodes: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "tijdens printen van lijst van slechte blokken"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Slechte blokken: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "tijdens lezen van journal-inode"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "tijdens openen van journal-inode"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "tijdens lezen van journal-superblok"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Magisch getal van journal-superblok is ongeldig!\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "tijdens lezen van journal-superblok"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Kan magische getallen van journal-superblok niet vinden"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "reserveren van MMP-buffer is mislukt\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "lezen van MMP-blok %llu van '%s'\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Kan geen geheugen reserveren om opties te ontleden!\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ongeldig superblok opgegeven: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ongeldige blokgrootte opgegeven: %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Ongeldige optie opgegeven: %s\n"
+"\n"
+"Uitgebreide opties worden gescheiden door komma's;\n"
+"hun argument wordt voorafgegaan door een '='-teken.\n"
+"\n"
+"Geldige uitgebreide opties zijn:\n"
+" superblock=<superbloknummer>\n"
+" blocksize=<blokgrootte>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tgebruik makend van %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Kan geen geldig bestandssysteem-superblok vinden.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: MMP-functie is niet ingeschakeld.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "tijdens lezen van '%s'-bitkaarten\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Draai 'e2fsck' nu!\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Gebruik: %s [-r|-Q] [-f] [-b superblok] [-B blokgrootte] apparaat imagebestand\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I apparaat imagebestand\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [-cfnp] [-o bronpositie] [-O doelpositie] bron-bs [doel-bs]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "tijdens reserveren van buffer"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Schrijven van blok %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "fout tijdens schrijven van blok %llu"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "fout in generic_write()"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Fout: header-grootte is groter dan wrt_size\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "Kan geen header-buffer reserveren.\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "tijdens schrijven van superblok"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "tijdens aanmaken van inodetabel"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "tijdens schrijven van blok-bitkaart"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "tijdens schrijven van inode-bitkaart"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Beschadigd mapblok %llu: onjuiste 'rec_len' (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Beschadigd mapblok %llu: onjuiste 'name_len' (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu blokken (%d%%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Kopiëren van "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Nu stoppen zal het bestandssysteem vernietigen; onderbreek opnieuw als u het zeker weet.\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " nog %s bij %.2f MB/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "fout tijdens lezen van blok %llu"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Er zijn %llu / %llu blokken gekopieerd (%d%%) in %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "met %.2f MB/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "tijdens reserveren van l1-tabel"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "tijdens reserveren van l2-cache"
+
+# XXX "while putting"??
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr ""
+"Waarschuwing: er zitten nog tabellen in de cache terwijl deze opgeslagen wordt;\n"
+"er zullen gegevens verloren gaan, dus de image kan ongeldig zijn.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "tijdens reserveren van 'ext2_qcow2_image'"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "tijdens initialiseren van 'ext2_qcow2_image'"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "**Programmafout**: meerdere opeenvolgende 'refcount'-blokken aangemaakt!\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "tijdens reserveren van blok-bitkaart"
+
+# XXX maybe 'scrambled'?
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "tijdens reserveren van gehusselde blok-bitkaart"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Scannen van inodes...\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "Kan geen blokbuffer reserveren"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "tijdens halen van volgende inode"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "tijdens iteratie over inode %u"
+
+# XXX uppercase QCOW2, add space
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "'raw'- en QCOW2-images kunnen niet geïnstalleerd worden"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "fout tijdens lezen van bitkaarten"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "tijdens openen van apparaatbestand"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "tijdens het herstellen van de image-tabel"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "Optie '-a' kan alleen gebruikt worden met 'raw'- of QCOW2-images."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "Optie '-b' kan alleen gebruikt worden met 'raw'- of QCOW2-images."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "Posities zijn alleen toegestaan met 'raw'-images."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Verplaatsingsmodus is alleen toegestaan met 'raw'-images."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "Verplaatsingsmodus vereist 'all-data'-modus"
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "controle op aankoppeling"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Het draaien van 'e2image' op een schrijfbaar aangekoppeld bestandssysteem\n"
+"kan resulteren in een inconsistente image die onbruikbaar is voor debugging.\n"
+"Gebruik optie '-f' als u dit echt wilt doen.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "Een QCOW2-image kan niet naar standaarduitvoer geschreven worden.\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "Kan status van uitvoer niet opvragen\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Image (%s) is gecomprimeerd.\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Image (%s) is versleuteld.\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Image (%s) is beschadigd.\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "tijdens converteren van een qcow2-image (%s) naar een raw-imagebestand (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "Optie '-c' wordt alleen ondersteund in 'raw'-modus.\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Optie '-c' wordt niet ondersteund bij schrijven naar standaarduitvoer.\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "tijdens reserveren van 'check_buf'"
+
+# XXX add the word 'is' before 'only'
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "Optie '-p' wordt alleen ondersteund in 'raw'-modus.\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d blokken bevatten reeds de te kopiëren gegevens\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Gebruik: %s -r apparaat\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: kan %s niet openen\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: kan geen 'seek' doen naar superblok\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: fout tijdens lezen van superblok\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: dit is geen ext2-bestandssysteem\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Waarschuwing: label is te lang, wordt afgekapt.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: kan niet opnieuw 'seek' doen naar superblok\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: fout tijdens schrijven van superblok\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Gebruik: e2label apparaat [nieuw_label]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr ""
+"Gebruik: %s [-f] [-h] [-n] [-o positie] [-v] [-z ongedaanmakenbestand]\n"
+" <transactiebestand> <bestandssysteem>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Superblok van bestandssysteem komt niet overeen met die in 'undo'-bestand.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "UUID komt niet overeen.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Laatste-aankoppelingstijd komt niet overeen.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Laatste-schrijftijd komt niet overeen.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Schrijfteller komt niet overeen.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "tijdens lezen van bestandssysteem-superblok"
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "tijdens ophalen van superblok"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Controlesom van superblok in 'undo'-bestand komt niet overeen.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "ongeldige positie: %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Zal niet naar een ongedaanmakenbestand schrijven tijdens het afspelen ervan.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "tijdens openen van ongedaanmakenbestand '%s'\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "tijdens lezen van ongedaanmakenbestand"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: is geen ongedaanmakenbestand\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Controlesom van header komt niet overeen.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Header van undo-bestand is beschadigd.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Undo-blokgrootte is te groot.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Undo-blokgrootte is te klein.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Onbekende ongedaanmaken-functievlag gezet.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Fout tijdens bepalen of %s aangekoppeld is."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "Voer 'e2undo' alleen uit op een niet-aangekoppeld bestandssysteem."
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "tijdens openen van '%s'"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "gegeven positie is te groot"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "tijdens lezen van sleutels"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: ongeldig magisch getal voor sleutel op %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: controlesomfout van sleutelblok op %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: blok %llu is te lang."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "tijdens ophalen van blok %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "controlesomfout in bestandssysteemblok %llu (ongedaanmakenblok %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "tijdens schrijven van blok %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Beschadiging in ongedaanmakenbestand; voer 'e2fsck' NU uit!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "In-/uitvoerfout tijdens afspelen; voer 'e2fsck' NU uit!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Onvolledig ongedaanmakenitem; voer 'e2fsck' uit.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Gebruik: findsuper apparaat [stapbytes [start_bij_kilobytes]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "stapbytes moet een getal zijn, niet %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "stapbytes moet een veelvoud van de sectorgrootte zijn\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "start_bij_kilobytes moet een getal zijn, niet %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "start_bij_kilobytes moet positief zijn, niet %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "beginnend bij %llu, met stappen van %u bytes\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: afgesloten met foutnummer %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "WAARSCHUWING: kan %s niet openen: %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "WAARSCHUWING: foute indeling op regel %d van %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"WAARSCHUWING: /etc/fstab bevat geen zesde veld (een fsck-volgnummer).\n"
+" Er wordt nu omheengewerkt, maar u zou dit veld bij\n"
+" de eerstvolgende gelegenheid toe dienen te voegen.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: niet gevonden\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: geen dochterprocessen meer?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Waarschuwing: %s voor apparaat %s werd beëindigd met signaal %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: de status is %x, dit zou nooit voor mogen komen.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Afgesloten met %s (afsluitwaarde %d).\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Fout %d tijdens uitvoering van fsck.%s voor %s\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Óf geen óf alle bestandsssysteemsoorten bij optie -t\n"
+"dienen voorafgegaan te worden door 'no' of '!'.\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Kan geen geheugen reserveren voor bestandssysteemsoorten.\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr ""
+"%s: ongeldige regel in /etc/fstab wordt overgeslagen:\n"
+"zesde veld van 'bind'-aankoppeling is niet nul (fsck-volgnummer)\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: kan %s niet controleren: fsck.%s niet gevonden\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Alle bestandssystemen worden gecontroleerd.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--wachten-- (volgnummer %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Gebruik: fsck [-AMNPRTV] [-C [descriptor]] [-t bestandssysteemsoort]\n"
+" [bestandssysteemopties] [bestandssysteem...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: te veel apparaten\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: te veel argumenten\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Wordt als alleen-lezen aangekoppeld.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Gebruikers mogen alle blokken reserveren. Dit is gevaarlijk!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Voer 'e2fsck -fy %s' uit.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: wordt als alleen-lezen aangekoppeld zonder het journal te herstellen\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Het journal moet worden afgespeeld; draai 'e2fsck -E journal_only'.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: Schrijven naar het journal wordt niet ondersteund.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+"Waarschuwing: een ongecontroleerd bestandssysteem wordt aangekoppeld;\n"
+"het uitvoeren van 'e2fsck' wordt aangeraden.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+"Waarschuwing: het maximum aantal aankoppelingen is bereikt;\n"
+"het uitvoeren van 'e2fsck' wordt aangeraden.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+"Waarschuwing: de controletijd is bereikt;\n"
+"het uitvoeren van 'e2fsck' wordt aangeraden.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Wees-inodes gevonden; het uitvoeren van 'e2fsck' wordt aangeraden.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Fouten gedetecteerd; het uitvoeren van 'e2fsck' wordt aangeraden.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Gebruik: %s [-RVadlpv] [bestand...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Tijdens lezen van vlaggen op %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Tijdens lezen van project op %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Tijdens lezen van versie op %s"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Kan geen padvariabele reserveren in lsattr_dir_proc()\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Gebruik: %s [-b blokgrootte] [-c|-l bestandsnaam] [-C clustergrootte]\n"
+" [-d hoofdmap] [-e gedrag_bij_fouten] [-E uitgebreide_optie[,...]]\n"
+" [-g blokken_per_groep] [-G flexgroepgrootte] [-i bytes_per_inode]\n"
+" [-I inode-grootte] [-J journal-opties] [-L label] [-N aantal_inodes]\n"
+" [-m percentage_gereserveerde_blokken] [-M laatste_aankoppelingspunt]\n"
+" [-o naam_van_aanmakende_besturingssyteem] [-O functie[,...]]\n"
+" [-r bestandssysteemversie] [-t bestandssysteemsoort]\n"
+" [-T gebruikstype] [-U UUID] [-z ongedaanmakenbestand]\n"
+" [-jnqvDFKSV] apparaat [aantal_blokken]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Uitgevoerde opdracht is: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "tijdens uitvoering van '%s'"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "tijdens verwerken van de gemaakte lijst van slechte blokken"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Blok %d in het primaire superblok of de groepsbeschrijvers is slecht.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"Blokken %u tot en met %u moeten goed zijn\n"
+"om een bestandssysteem aan te kunnen maken.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Gestopt...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Waarschuwing: de reservekopie van het superblok en de groepsbeschrijvers,\n"
+"beginnend bij blok %u, bevat slechte blokken.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "tijdens het markeren van slechte blokken (als zijnde in gebruik)"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "tijdens schrijven van gereserveerde inodes"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Schrijven van inodetabellen: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Kan %d blokken in inodetabel niet schrijven, beginnend bij %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "voltooid \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "tijdens aanmaken van hoofdmap"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "tijdens lezen van hoofd-inode"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "tijdens zetten van eigenaar van hoofd-inode"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "tijdens aanmaken van /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "tijdens zoeken van /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "tijdens uitbreiden van /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "tijdens zetten van slechteblokken-inode"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Onvoldoende geheugen tijdens wissen van sectoren %d-%d.\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Waarschuwing: kan blok 0 niet lezen: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Waarschuwing: kan sector %d niet wissen: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "tijdens splitsen van de journal-grootte"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "tijdens initialiseren van het journal-superblok"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Nulmaken van journal-apparaat: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "tijdens nulmaken van journal-apparaat (blok %llu, nummer %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "tijdens schrijven van journal-superblok"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Aanmaken van bestandssysteem met %llu blokken (van %dK) en %u inodes.\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Waarschuwing: %llu ongebruikte blokken.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Bestandssysteemlabel=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Soort besturingssysteem: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blokgrootte=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Clustergrootte=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmentgrootte=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "'stride'=%u blokken, 'stripe'-breedte=%u blokken\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inodes, %llu blokken\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu blokken (%2.2f%%) gereserveerd voor systeembeheer\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Eerste gegevensblok=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Hoofdmap-eigenaar=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximum aantal bestandssysteemblokken=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blokgroepen\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blokgroep\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blokken per groep, %u clusters per groep\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blokken per groep, %u fragmenten per groep\n"
+
+# src/main.c:425
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inodes per groep\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Bestandssysteem-UUID: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblokreservekopieën zijn opgeslagen in blokken: "
+
+# XXX manpage does not mention -O 64bit
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s vereist '-O 64bit'\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "'%s' moet vóór 'resize=%u' staan\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Ongeldige 'desc_size': '%s'\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Ongeldige hash-seed: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Ongeldige positie: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ongeldig 'mmp_update_interval': %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Ongeldig aantal reservekopie-superblokken: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Ongeldig argument van 'stride': %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Ongeldig argument van 'stripe_width': %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ongeldig argument van 'resize': %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "De maximum grootte moet groter zijn dan de huidige bestandssysteemgrootte.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Live vergroten of verkleinen is niet mogelijk op een bestandssysteem van versie 0.\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Ongeldige hoofdmap-eigenaar: '%s'\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Ongeldige codering: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Ongeldige optie opgegeven: %s\n"
+"\n"
+"Uitgebreide opties worden gescheiden door komma's;\n"
+"hun argument wordt voorafgegaan door een '='-teken.\n"
+"\n"
+"Geldige uitgebreide opties zijn:\n"
+" mmp_update_interval=<interval>\n"
+" num_backup_sb=<0|1|2>\n"
+" stride=<aantal blokken dat samen per RAID-schijf wordt gelezen/geschreven>\n"
+" stripe_width=<aantal blokken per stripe> (meestal stride × aantal schijven)\n"
+" offset=<positie waarop het bestandssysteem te beginnen>\n"
+" resize=<maximum grootte van bestandssysteem in blokken>\n"
+" packed_meta_blocks=<0 voor uitschakelen, 1 voor inschakelen>\n"
+" lazy_itable_init=<0 voor uitschakelen, 1 voor inschakelen>\n"
+" lazy_journal_init=<0 voor uitschakelen, 1 voor inschakelen>\n"
+" root_owner=<UID van hoofdmap>:<GID van hoofdmap>\n"
+" test_fs\n"
+" discard\n"
+" nodiscard\n"
+" encoding=<codering>\n"
+" encoding_flags=<vlaggen>\n"
+" quotatype=<in_te_schakelen_quotatypes>\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Waarschuwing: 'stripe'-breedte %u is geen even veelvoud van 'stride' %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "Fout: ongeldige coderingsvlag: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "Fout: de codering moet expliciet gegeven worden wanneer coderingsvlaggen gegeven zijn\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaxfout in mke2fs-configuratiebestand (%s, regel #%d)\n"
+" %s\n"
+
+# Dit gaat over het argument van optie -O.
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ongeldige bestandssysteemfunctie: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ongeldige aankoppelingsoptie: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Uw mke2fs.conf definieert geen bestandssysteemtype %s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"U dient waarschijnlijk een nieuwer mke2fs.conf-bestand te installeren.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Gestopt...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Waarschuwing: bestandssysteemtype %s is niet gedefinieerd in mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Kan geen geheugen reserveren voor nieuwe PATH.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Initialiseren van profile is mislukt (fout: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "ongeldige blokgrootte: %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Waarschuwing: blokgrootte %d is op de meeste systemen niet bruikbaar.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "ongeldige clustergrootte: %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "'optie '-R' is verouderd; gebruik '-E'"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "onjuist argument van -e (gedrag bij een fout): %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Ongeldig aantal blokken per groep"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "argument van -g (blokken per groep) is geen veelvoud van 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Ongeldig getal voor metagroepgrootte"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "Metagroepgrootte moet een macht van 2 zijn"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "Metagroepgrootte (%lu) moet kleiner zijn dan of gelijk zijn aan 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "ongeldige inodeverhouding %s (min %d / max %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ongeldige grootte van inode: %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr ""
+"Waarschuwing: optie '-K' is verouderd en zou u niet meer moeten gebruiken;\n"
+"gebruik in plaats daarvan de uitgebreide optie '-E nodiscard'.\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "onvoldoende geheugen in bad_blocks_filename()"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"Waarschuwing: label is te lang -- wordt afgekapt tot '%s'.\n"
+"\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "ongeldig percentage gereserveerde blokken: %s"
+
+# lib/prange.c:299 lib/prange.c:316
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "ongeldig aantal inodes: %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "tijdens reserveren van tekenreeks voor 'fs_feature'"
+
+# lib/prange.c:299 lib/prange.c:316
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "ongeldig revisienummer: %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "tijdens aanmaken van versie %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "Optie '-t' mag slechts één keer gegeven worden"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "Optie '-T' mag slechts één keer gegeven worden"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "tijdens openen van journal-apparaat %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Blokgrootte %d van journal-apparaat is kleiner dan minimum blokgrootte %d.\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Blokgrootte van het journal-apparaat wordt gebruikt: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "ongeldige blokken '%s' op apparaat '%s'"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "bestandssysteem"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Bestand %s bestaat niet en er is geen grootte opgegeven.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Aanmaken van normaal bestand %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "tijdens bepalen van grootte van bestandssysteem"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Kan de grootte van het apparaat niet bepalen;\n"
+"u dient zelf de grootte van het bestandssysteem aan te geven.\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Apparaatgrootte wordt gerapporteerd als nul. Dit betekent dat er een\n"
+" ongeldige partitie is opgegeven, of dat de partitietabel niet opnieuw\n"
+" gelezen is na gebruik van een partitioneringsprogramma, wegens het\n"
+" in-gebruik-zijn van een gewijzigde partitie. Mogelijk dient u uw\n"
+" computer te herstarten om de juiste partitietabel te verkrijgen.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "Bestandssysteem is groter dan de schijnbare apparaatgrootte."
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "Verwerken van lijst met bestandssysteemsoorten is mislukt\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "De Hurd ondersteunt de 'filetype'-functie niet.\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "De Hurd ondersteunt de 'huge_file'-functie niet.\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "De Hurd ondersteunt de 'metadata_csum'-functie niet.\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "De Hurd ondersteunt de 'ea_inode'-functie niet.\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "tijdens bepalen van de hardware-sectorgrootte"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "tijdens bepalen van de fysieke sectorgrootte"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "tijdens instellen van de blokgrootte; te klein voor apparaat\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Waarschuwing: de gegeven blokgrootte %d is kleiner dan de fysieke sectorgrootte %d van het apparaat\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: De grootte (0x%llx blokken) van apparaat %s kan niet uitgedrukt\n"
+" worden in 32 bits bij een blokgrootte van %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: De grootte (0x%llx blokken) van apparaat %s is te groot om\n"
+" een bestandssysteem aan te kunnen maken met blokgrootte %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "Lijst met bestandssysteemsoorten voor mke2fs.conf: "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Extra functies worden niet ondersteund op een bestandssysteem van versie 0.\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Schaarse superblokken zijn niet mogelijk op een bestandssysteem van versie 0.\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Een journal is niet mogelijk op een bestandssysteem van versie 0.\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "ongeldig percentage gereserveerde blokken: %lf"
+
+# XXX option should '-O extent', singular
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr ""
+"Extents MOETEN ingeschakeld zijn voor een 64-bits bestandssysteem.\n"
+"Geef optie '-O extent' om dit te doen.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "De clustergrootte mag niet kleiner zijn dan de blokgrootte.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "het opgeven van een clustergrootte vereist de 'bigalloc'-functie"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "Waarschuwing: kan logische schijfopbouw van %s niet verkrijgen.\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Uitlijning van %s is %lu bytes verschoven.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+"Dit kan zeer slechte prestaties tot gevolg hebben;\n"
+"(her)partitionering wordt aanbevolen.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "Blokken van %d bytes zijn te groot voor dit systeem (max %d)."
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Waarschuwing: blokken van %d bytes zijn te groot voor dit systeem,\n"
+"het maximum is %d -- maar 'mke2fs' wordt gedwongen uitgevoerd.\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Suggestie: Gebruik Linux-kernel 3.18 of nieuwer voor verbeterde stabiliteit van de controlesomfuncties op metagegevens en journal.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Onbekende bestandsnaamcodering uit profile: %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Onbekende coderingsvlaggen uit profile: %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "inodes van %d bytes zijn te klein voor projectquota"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Kan 'bigalloc'-functie niet ondersteunen zonder 'extents'-functie"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"De functies 'resize_inode' en 'meta_bg' gaan niet samen.\n"
+"Ze kunnen niet beide ingeschakeld worden.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "het reserveren van blokken voor bestandssysteemvergroting wordt niet ondersteund op een niet-schaars bestandssysteem"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "teller van blokken-per-groep ligt buiten het toegestane bereik"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "De functie 'flex_bg' is niet ingeschakeld, dus de metagroepgrootte mag niet opgegeven worden"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ongeldige inode-grootte %d (min %d / max %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "inodes van %d bytes zijn te klein voor inline gegevens -- geef een grotere grootte op"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "128-byte inodes kunnen geen datums voorbij 2038 aan -- zij worden ontraden\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "te veel inodes (%llu) -- inodeverhouding verhogen?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "te veel inodes (%llu) -- geef minder dan 2^32 op"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"De inode-ruimte (inode-grootte %u * aantal_inodes %u)\n"
+" is te groot voor een bestandssysteem met %llu blokken --\n"
+" geef een hogere bytes-per-inodeverhouding op (met -i),\n"
+" of verklein het aantal inodes (met -N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Verwerpen van blokken: "
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "is mislukt - "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "tijdens initialiseren van quota-context"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "tijdens schrijven van quota-inodes"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "onjuist foutengedrag gegeven in profile - %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "onvoldoende geheugen in android_sparse_params()"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "tijdens aanmaken van superblok"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "De 'metadata_csum_seed'-functie vereist de 'metadata_csum'-functie.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "Verwerping is gelukt en zal nullen retourneren -- wissen van inode-tabel wordt overgeslagen\n"
+
+# XXX uppercase OS
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "onbekend besturingssysteem: %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Reserveren van groepstabellen: "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "tijdens reserveren van bestandssysteemtabellen"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "tijdens het demarkeren van slechte blokken"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+" tijdens converteren van subcluster-bitkaart"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "tijdens berekenen van overhead"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s kan verder beschadigd raken door het herschrijven van het superblok\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "tijdens nulmaken van blok %llu aan het eind van het bestandssysteem"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "tijdens reserveren van uitbreidingsblokken"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "journal"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Toevoegen van journal aan apparaat %s: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+" tijdens toevoegen van journal aan apparaat %s"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "voltooid\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Aanmaken van journal wordt overgeslagen wegens optie '-S'.\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Aanmaken van journal (%u blokken): "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+" tijdens aanmaken van journal"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Fout tijdens inschakelen van MMP (bescherming tegen meervoudige aankoppelingen)."
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+"Bescherming tegen meervoudige aankoppelingen is ingeschakeld\n"
+"met een bijwerkingsinterval van %d seconden.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "Kopiëren van bestanden naar apparaat: "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "tijdens bevolken van bestandssysteem"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Schrijven van superblokken en bestandssysteem-metagegevens: "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "tijdens schrijven en sluiten van het bestandssysteem"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"voltooid\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "tijdens nulmaken van blok %llu voor enorm bestand"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Partitiepositie van %llu (%uK) blokken is niet compatibel met clustergrootte %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Enorme bestanden worden nulgemaakt.\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Aanmaken van %lu enorm(e) bestand(en) "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "met elk %llu blokken"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "tijdens aanmaken van enorm bestand %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Gebruik: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Gebruik: %s apparaat...\n"
+"\n"
+"Toont de partitie-informatie voor elk gegeven apparaat.\n"
+"\n"
+"Voorbeeld: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Kan %s niet openen: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Kan geometrie van %s niet bepalen: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Kan grootte van %s niet bepalen: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: kop=%3d sec=%3d cil=%4d begin=%8d grootte=%8lu einde=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Deze bewerking vereist een vers-gecontroleerd bestandssysteem.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Controleer het bestandssysteem met 'e2fsck -f'.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Controleer het bestandssysteem met 'e2fsck -fD'.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Gebruik: %s [-c maximum_aantal_aankoppelingen] [-C aankoppelingental]\n"
+" [-e gedrag_bij_fouten] [-E uitgebreide_optie[,...]] [-f]\n"
+" [-g groep] [-i interval[d|w|m]] [-I nieuwe_inode-grootte]\n"
+" [-j] [-J journal-opties] [-l] [-L label]\n"
+" [-m percentage_gereserveerde_blokken] [-M laatste_aankoppelingspunt]\n"
+" [-o [^]aankoppelingsopties[,...]] [-O [^]functie[,...]]\n"
+" [-Q quota-opties] [-r aantal_gereserveerde_blokken]\n"
+" [-T tijdstip_van_laatste_controle] [-u gebruiker]\n"
+" [-U UUID] [-z ongedaanmakenbestand] apparaat\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Geen journal-superblok gevonden!\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "tijdens openen van extern journal"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s: is geen journal-apparaat.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr "Het journal-superblok is beschadigd: nr_users is te groot (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID van bestandssysteem niet gevonden op journal-apparaat.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Kan journal-apparaat niet lokaliseren. Het is NIET verwijderd.\n"
+"Gebruik optie '-f' om het ontbrekende journal-apparaat te verwijderen.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Journal is verwijderd.\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "tijdens lezen van bitkaarten"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "tijdens wissen van journal-inode"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "tijdens schrijven van journal-inode"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(En herstart daarna uw computer!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Voer eerst 'e2fsck' uit. Voer dan 'resize2fs %s %s"
+
+# XXX The next three should be a single msgid.
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Voer 'resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "' uit om 64-bit modus in te schakelen.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "' uit om 64-bit modus uit te schakelen.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Het uitschakelen van bestandssysteemfunctie '%s' is niet mogelijk.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Het inschakelen van bestandssysteemfunctie '%s' is niet mogelijk.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"De journal-vlag mag alleen gewist worden wanneer het bestandssysteem\n"
+"ontkoppeld is of aangekoppeld als alleen-lezen.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"De herstellingsvlag van het journal is gezet.\n"
+"Voer eerst 'e2fsck' uit, voordat u de journal-vlag wist.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Het inschakelen van bestandssysteemfunctie 'sparse_super' is niet mogelijk voor\n"
+"bestandssystemen met ingeschakelde 'meta_bg'-functievlag.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Bescherming tegen meervoudige aankoppelingen kan\n"
+"niet ingeschakeld worden als het bestandssysteem\n"
+"aangekoppeld of alleen-lezen is.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+"Bescherming tegen meervoudige aankoppelingen is ingeschakeld\n"
+"met een bijwerkingsinterval van %d seconden.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"Bescherming tegen meervoudige aankoppelingen kan\n"
+"niet uitgeschakeld worden als het bestandssysteem\n"
+"alleen-lezen is.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "Fout tijdens lezen van bitkaarten\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Magisch getal in MMP-blok klopt niet -- verwacht: %x, gevonden: %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "tijdens lezen van MMP-blok"
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Het uitschakelen van de mappenindex op een bestandssysteem met controlesommen kan enige tijd duren."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Kan 'dir_index' niet uitschakelen voor een aangekoppeld bestandssysteem!\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Het uitschakelen van bestandssysteemfunctie 'flex_bg' zou het\n"
+"bestandssysteem inconsistent maken.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"De 'huge_file'-functievlag mag alleen gewist worden wanneer het\n"
+"bestandssysteem ontkoppeld is of aangekoppeld als alleen-lezen.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Het inschakelen van controlesommen kan enige tijd duren."
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Kan 'metadata_csum' niet inschakelen voor een aangekoppeld bestandssysteem!\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "Het uitschakelen van controlesommen kan enige tijd duren."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Kan 'metadata_csum' niet uitschakelen voor een aangekoppeld bestandssysteem!\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Kan 'uninit_bg' niet inschakelen voor een aangekoppeld bestandssysteem!\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Kan 'uninit_bg' niet uitschakelen voor een aangekoppeld bestandssysteem!\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Kan 64-bit-modus niet inschakelen terwijl bestandssysteem aangekoppeld is!\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Kan 64-bit-modus niet uitschakelen terwijl bestandssysteem aangekoppeld is!\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Kan 'project'-functie niet inschakelen; de inode-grootte is te klein.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Waarschuwing: '^quota'-optie overstijgt '-Q'-argumenten.\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr ""
+"De casefold-functie mag alleen ingeschakeld worden wanneer het bestandssysteem\n"
+"ontkoppeld is.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Het inschakelen van bestandssysteemfunctie 'metadata_csum_seed' is alleen\n"
+"mogelijk voor bestandssystemen met ingeschakelde 'metadata_csum'-functievlag.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"De UUID is gewijzigd sinds het zetten van 'metadata_csum'.\n"
+"Het bestandssysteem dient ontkoppeld te worden om veilig alle\n"
+"metadata te herschrijven, aangepast aan de nieuwe UUID.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "Het herberekenen van controlesommen kan enige tijd duren."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "Het bestandssysteem heeft al een journal.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+" tijdens openen van journal op %s\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Aanmaken van journal op apparaat %s: "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "tijdens toevoegen van bestandssysteem aan journal op %s"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Aanmaken van journal-inode: "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+" tijdens aanmaken van journal-inode"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Kan projectquota niet inschakelen; de inode-grootte is te klein.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "tijdens initialiseren van quota-context in ondersteunende bibliotheek"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "tijdens bijwerken van quota-grenzen (%d)"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "tijdens schrijven van quota-bestand (%d)"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "tijdens verwijderen van quota-bestand (%d)"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Ongeldige quota-optie opgegeven.\n"
+"\n"
+"Geldige quota-opties zijn (te scheiden met een komma):\n"
+" [^]usr[quota]\n"
+" [^]grp[quota]\n"
+" [^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Kan datum/tijd-specificatie niet ontleden: %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "onjuist aankoppelingenaantal: %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "onjuiste GID of groepsnaam: %s"
+
+# lib/prange.c:299 lib/prange.c:316
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "onjuist interval: %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "onjuiste verhouding (%s) voor gereserveerde blokken"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "Optie '-o' mag slechts één keer gegeven worden"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "Optie '-o' mag slechts één keer gegeven worden"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "onjuist aantal gereserveerde blokken: %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "onjuiste UID of gebruikersnaam: %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "ongeldige grootte van inode: %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Inode-grootte moet een macht van 2 zijn -- niet %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "MMP-bijwerkingsinterval is te groot: %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Het MMP-bijwerkingsinterval is op %lu seconde gezet\n"
+msgstr[1] "Het MMP-bijwerkingsinterval is op %lu seconden gezet\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Bestandssysteem-foutvlag wordt gezet om een controle af te dwingen.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ongeldig argument van 'stride': %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ongeldig argument van 'stripe_width': %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ongeldig hash-algoritme: %s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Het standaard-hash-algoritme is op %s (%d) gezet\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Kan bestaande codering niet wijzigen\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "Ongeldige codering: %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "Codering wordt ingesteld op '%s'\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "Coderingsvlaggen wordt ingesteld op '%s'\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Ongeldige optie opgegeven.\n"
+"\n"
+"Uitgebreide opties worden gescheiden door komma's;\n"
+"hun argument wordt voorafgegaan door een '='-teken.\n"
+"\n"
+"Geldige uitgebreide opties zijn:\n"
+" clear_mmp\n"
+" hash_alg=<hash-algoritme>\n"
+" mount_opts=<uitgebreide standaard aankoppelingsopties>\n"
+" mmp_update_interval=<update-interval voor MMP in seconden>\n"
+" stride=<aantal blokken dat samen per RAID-schijf wordt gelezen/geschreven>\n"
+" stripe_width=<aantal blokken per stripe> (meestal stride × aantal schijven)\n"
+" force_fsck\n"
+" test_fs\n"
+" ^test_fs\n"
+" encoding=<codering>\n"
+" encoding_flags=<coderingsvlaggen>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "Lezen van inode-bitkaart is mislukt\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "Lezen van blok-bitkaart is mislukt\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "te verplaatsen blokken"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Reserveren van blok-bitkaart tijdens inode-grootteverandering is mislukt.\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "Er is onvoldoende ruimte om de inode-grootte te vergroten. \n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Herplaatsen van blokken tijdens inode-grootteverandering is mislukt. \n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Fout tijdens veranderen van de inode-grootte.\n"
+"Voer 'e2undo' uit om de bestandssysteemwijzigingen ongedaan te maken. \n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Als u zeker weet dat het bestandssysteem nergens gebruikt wordt,\n"
+"geef dan deze opdracht: 'tune2fs -f -E clear_mmp {apparaat}'\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Ongeldig magisch getal in MMP-blok.\n"
+"Probeer het te repareren met:\n"
+" e2fsck -f %s\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "Kan een journal-apparaat niet wijzigen.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "De inode-grootte is al %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "Het verkleinen van de inode-grootte wordt niet ondersteund.\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "ongeldige inode-grootte %lu (max %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Het veranderen van de inode-grootte kan enige tijd duren."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Waarschuwing: Het journal bevat gegevens. U kunt beter eerst het journal afspelen met:\n"
+"\n"
+" e2fsck -E journal_only %s\n"
+"\n"
+"en dan het huidige commando opnieuw geven. Anders kunnen gemaakte veranderingen\n"
+"overschreven worden door het latere afspelen van het journal.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Herstellen van journal.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Het maximum aantal aankoppelingen is op %d gezet\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Het huidige aantal aankoppelingen is op %d gezet\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Gedrag bij fouten is op %d gezet\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "GID van gereserveerde blokken is op %lu gezet\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "interval tussen controles is te groot (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Interval tussen controles is op %lu seconden gezet\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Percentage gereserveerde blokken is op %g%% gezet (%llu blokken)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "aantal gereserveerde blokken is te groot (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Het aantal gereserveerde blokken is op %llu gezet\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Het bestandssysteem is al zuinig met superblokken.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Het inschakelen van de 'sparse_super'-functievlag is niet mogelijk voor\n"
+"bestandssystemen met ingeschakelde 'meta_bg'-functievlag.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"De zuinig-met-superblokkenvlag is aangezet. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Het uitzetten van de 'sparse_super'-functievlag is niet mogelijk.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Tijd van laatste controle is op %s gezet\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "UID van gereserveerde blokken is op %lu gezet\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Fout in gebruik van 'clear_mmp'. Het moet samengaan met '-f'.\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"De quota-functie mag alleen gewijzigd worden wanneer het bestandssysteem\n"
+"ontkoppeld is.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Kan de UUID van dit bestandssysteem niet wijzigen want het heeft de 'stable_inodes'-vlag gezet.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Een UUID instellen voor dit bestandssyteem kan enige tijd duren."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "De UUID mag alleen gewijzigd worden wanneer het bestandssysteem ontkoppeld is.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr ""
+"Als u alleen kernels gebruikt nieuwer dan versie 4.4, voer dan eerst\n"
+"'tune2fs -O metadata_csum_seed' uit en herhaal dan dit commando.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Onjuiste UUID-indeling\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Het journal-superblok moet bijgewerkt worden.\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"De inode-grootte mag alleen gewijzigd worden wanneer het bestandssysteem\n"
+"ontkoppeld is.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Het veranderen van de inode-grootte is niet mogelijk voor\n"
+"bestandssystemen met ingeschakelde 'flex_bg'-functievlag.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "De inode-groote is op %lu gezet\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "Het veranderen van de inode-grootte is mislukt. \n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "De 'stride'-lengte is op %d gezet\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "De 'stripe'-breedte is op %d gezet\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "De uitgebreide standaard aankoppelingsopties zijn op '%s' gezet\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<verdergaand>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Toch doorgaan? (anders wordt na %d seconden doorgegaan) (j,N) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "Toch doorgaan? (j,N) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "'mke2fs' wordt gedwongen uitgevoerd. Hoop dat /etc/mtab onjuist is.\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "zal hier geen %s maken!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "'mke2fs' wordt gedwongen uitgevoerd.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Kan geen geheugen reserveren om journal-opties te ontleden!\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Kan geen journal-apparaat vinden dat overeenkomt met %s\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Ongeldige journal-opties opgegeven.\n"
+"\n"
+"Journal-opties worden gescheiden door komma's,\n"
+"hun argument wordt voorafgegaan door een '='-teken.\n"
+"\n"
+"Geldige journal-opties zijn:\n"
+" size=<journal-grootte in megabytes>\n"
+" device=<journal-apparaat>\n"
+" location=<journal-locatie>\n"
+"\n"
+"De grootte van het journal is minimaal 1024 en maximaal 10240000 blokken.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Bestandssysteem is te klein voor een journal.\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"De totale gevraagde journal-afmeting is %d blokken; maar deze dient\n"
+"tussen de 1024 en de 10.240.000 blokken te liggen. Gestopt.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"De totale journal-afmeting is te groot voor het bestandssysteem.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Dit bestandssysteem zal automatisch gecontroleerd worden na elke\n"
+"%d aankoppelingen of na %g dagen, afhankelijk van wat het eerst voorkomt.\n"
+"U kunt 'tune2fs' met '-c' of '-i' gebruiken om dit bij te stellen.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Gebruik: %s [-d] [-p PID-bestand] [-s socket-pad] [-T tijdslimiet]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n nummer] [-s socket-pad]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "ongeldige argumenten"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "verbinden"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "schrijven"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "gelezen aantal"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "ongeldige antwoordlengte"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "uuidd-dienst draait al onder PID %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Kan geen UNIX-stream-socket aanmaken: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Kan UNIX-stream-socket %s niet binden: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Kan niet luisteren op UNIX-stream-socket %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Fout tijdens lezen van cliënt; lengte = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "bewerking %d, gegeven getal = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Gegenereerde tijds-UUID: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Gegenereerde willekeurige UUID: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Tijds-UUID %s werd gegenereerd, en één opvolgende\n"
+msgstr[1] "Tijds-UUID %s werd gegenereerd, en %d opvolgende\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Er zijn %d UUID's gegenereerd:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ongeldige bewerking %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Ongeldig getal: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Fout bij aanroepen van uuidd-dienst (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s en één opvolgende UUID\n"
+msgstr[1] "%s en %d opvolgende UUID's\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Lijst van UUID's:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Onverwachte antwoordlengte (%d) van server\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Kan uuidd met PID %d niet elimineren: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "uuidd met PID %d is geëlimineerd\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Gebruik: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# (debug) Extent dump:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "# (debug)\tNum=%llu Size=%llu, Cursor=%llu, Sorted=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Gebruik: %s [-d debugvlaggen] [-fFMPp] apparaat [-b|-s|nieuwe_grootte]\n"
+" [-S RAID-stride] [-z ongedaanmakenbestand]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Uitbreiden van inodetabel"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Verplaatsen van blokken"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Scannen van inodetabel"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Bijwerken van inode-verwijzingen"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Verplaatsen van inodetabel"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Onbekende stap?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Begin van stap %d (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Het van grootte veranderen van een 'bigalloc'-bestandssysteem is nog\n"
+"onvoldoende getest. Doorgaan is geheel voor eigen risico! Gebruik\n"
+"de dwangoptie als u toch door wilt gaan.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "tijdens openen van %s"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "tijdens opvragen van status van %s"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Voer eerst 'e2fsck -f %s' uit.\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Geschatte minimum grootte van het bestandssysteem: %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ongeldige nieuwe grootte: %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Nieuwe grootte is te groot om uitgedrukt te kunnen worden in 32 bits.\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "Nieuwe grootte resulteert in te veel blokgroepbeschrijvers.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Nieuwe grootte is kleiner dan minimum (%llu).\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Ongeldige lengte voor 'stride'"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"De partitie (of het apparaat) is slechts %llu blokken (van %dK).\n"
+"U vroeg om een nieuwe grootte van %llu blokken.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Kan 64-bit-functie niet in- en uitschakelen.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Kan 64-bit-functie niet wijzigen op een bestandssysteem dat groter is dan 2^32 blokken.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Kan 64-bit-functie niet wijzigen terwijl bestandssysteem aangekoppeld is.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Schakel met 'tune2fs' de extents-functie in alvorens de 64bit-functie in te schakelen.\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Het bestandssysteem is al %llu blokken (van %dK) groot. Er is niets te doen!\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Het bestandssysteem is al 64-bit.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Het bestandssysteem is al 32-bit.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Kan dit bestandssysteem niet krimpen want het heeft de 'stable_inodes'-vlag gezet.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Converteren van bestandssysteem naar 64-bit.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Converteren van bestandssysteem naar 32-bit.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Van grootte veranderen van bestandssysteem op %s naar %llu blokken (van %dK).\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "tijdens veranderen van de grootte van %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Voer 'e2fsck -fy %s' uit om het bestandssysteem\n"
+"te repareren na de afgebroken grootteverandering.\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Het bestandssysteem op %s is nu %llu blokken (van %dK) groot.\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "tijdens inkorten van %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "de kernel ondersteunt het live vergroten/verkleinen met 'sparse_super2' niet"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+"Bestandssysteem op %s is aangekoppeld op %s;\n"
+"het vergroten/verkleinen zal live gedaan moeten worden.\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Het live krimpen wordt niet ondersteund"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Bestandssysteem ondersteunt live vergroten/verkleinen niet"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Niet genoeg gereserveerde GDT-blokken om grootte te kunnen veranderen"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+"De kernel ondersteunt het vergroten/verkleinen van\n"
+"een bestandssysteem met deze afmetingen niet"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "tijdens openen van aankoppelingspunt %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Oude interface voor grootteverandering is gevraagd.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Toegang geweigerd voor het vergroten/verkleinen van bestandssysteem"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Tijdens controle op ondersteuning voor live vergroten/verkleinen"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "De kernel ondersteunt het live vergroten/verkleinen niet"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Uitvoeren van live verandering van %s naar %llu blokken (van %dK).\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Tijdens uitbreiden van de laatste groep"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Tijdens toevoegen van groep #%d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr ""
+"Bestandssysteem op %s is aangekoppled op %s;\n"
+"op dit systeem is live vergroten/verkleinen niet mogelijk.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "aantal inodes (%llu) moet kleiner zijn dan %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "gereserveerde blokken"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "blokken voor metagegevens"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "nieuwe metablokken"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Zou nooit mogen gebeuren: geen superblok in laatste 'super_sparse' blokgroep!\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Zou nooit mogen gebeuren: onverwachte 'old_desc' in 'super_sparse' blokgroep!\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Zou nooit mogen gebeuren: de 'resize'-inode is beschadigd!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "EXT2FS-bibliotheek versie 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Ongeldig magisch getal voor 'ext2_filsys'-structuur"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Ongeldig magisch getal voor 'badblocks_list'-structuur"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Ongeldig magisch getal voor 'badblocks_iterate'-structuur"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Ongeldig magisch getal voor 'inode_scan'-structuur"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Ongeldig magisch getal voor 'io_channel'-structuur"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Ongeldig magisch getal voor Unix-'io_channel'-structuur"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Ongeldig magisch getal voor 'io_manager'-structuur"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Ongeldig magisch getal voor 'block_bitmap'-structuur"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Ongeldig magisch getal voor 'inode_bitmap'-structuur"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Ongeldig magisch getal voor 'generic_bitmap'-structuur"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Ongeldig magisch getal voor test-'io_channel'-structuur"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Ongeldig magisch getal voor mappenbloklijst-structuur"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Ongeldig magisch getal voor 'icount'-structuur"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Ongeldig magisch getal voor Powerquest-'io_channel'-structuur"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Ongeldig magisch getal voor ext2-bestands-structuur"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Ongeldig magisch getal voor Ext2-imageheader"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Ongeldig magisch getal voor inode-'io_channel'-structuur"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Ongeldig magisch getal voor Ext4-extent-handle"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Ongeldig magisch getal in superblok"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Bestandssysteemversie is te hoog"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Poging tot schrijven naar bestandssysteem dat geopend is voor alleen-lezen"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Kan groepsbeschrijvers niet lezen"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Kan groepsbeschrijvers niet schrijven"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Beschadigde groepsbeschrijver: ongeldig blok voor blok-bitkaart"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Beschadigde groepsbeschrijver: ongeldig blok voor inode-bitkaart"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Beschadigde groepsbeschrijver: ongeldig blok voor inodetabel"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Kan een inode-bitkaart niet schrijven"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Kan een inode-bitkaart niet lezen"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Kan een blok-bitkaart niet schrijven"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Kan een blok-bitkaart niet lezen"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Kan een inodetabel niet schrijven"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Kan een inodetabel niet lezen"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Kan volgende inode niet lezen"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Bestandssysteem heeft een onverwachte blokgrootte"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "EXT2-map is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Poging tot lezen van blok uit bestandssysteem las te weinig"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Poging tot schrijven van blok naar bestandssysteem schreef te weinig"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Geen vrije ruimte meer in de map"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Inode-bitkaart is niet geladen"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Blok-bitkaart is niet geladen"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Ongeldig inodenummer"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Ongeldig bloknummer"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "**Interne programmafout** in ext2fs_expand_dir()"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Er is onvoldoende ruimte om het voorgestelde bestandssysteem te creëren"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Ongeldig bloknummer gegeven aan ext2fs_mark_block_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Ongeldig bloknummer gegeven aan ext2fs_unmark_block_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Ongeldig bloknummer gegeven aan ext2fs_test_block_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Ongeldig bloknummer gegeven aan ext2fs_mark_inode_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Ongeldig bloknummer gegeven aan ext2fs_unmark_inode_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Ongeldig bloknummer gegeven aan ext2fs_test_inode_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Poging om het eind van blok-bitkaart voorbij het echte eind te smurfen"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Poging om het eind van inode-bitkaart voorbij het echte eind te smurfen"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Ongeldig indirect blok gevonden"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Ongeldig dubbel-indirect blok gevonden"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Ongeldig drievoudig-indirect blok gevonden"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Blok-bitkaarten zijn niet hetzelfde"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Inode-bitkaarten zijn niet hetzelfde"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Ongeldige of misvormde apparaatnaam"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Er ontbreekt een blokgroep in de inodetabel"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Het Ext2-superblok is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Ongeldig generiek bitnummer gegeven aan ext2fs_mark_generic_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Ongeldig generiek bitnummer gegeven aan ext2fs_unmark_generic_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Ongeldig generiek bitnummer gegeven aan ext2fs_test_generic_bitmap()"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Te veel symbolische koppelingen"
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "De callback-functie kan dit geval niet aan"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "De inode komt uit een slecht blok in de inodetabel"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Bestandssysteem heeft niet-ondersteunde functies"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Bestandssysteem heeft niet-ondersteunde alleen-lezen functies"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "In-/uitvoerkanaal kon geen 'seek' doen bij lezen of schrijven"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Onvoldoende geheugen beschikbaar"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Ongeldig argument gegeven aan Ext2-bibliotheek"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Kan geen blok reserveren in Ext2-bestandssysteem"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Kan geen inode reserveren in Ext2-bestandssysteem"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Ext2-inode is geen map"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Te veel verwijzingen in tabel"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Bestand is niet gevonden door 'ext2_lookup()'"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Bestand is geopend voor alleen-lezen"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Ext2-mapblok niet gevonden"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Ext2-map bestaat al"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Ongeïmplementeerde Ext2-bibliotheekfunctie"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Annulering is verzocht door gebruiker"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Ext2-bestand is te groot"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Aangegeven journal-apparaat is geen blok-apparaat"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Geen journal-superblok gevonden"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Journal moet minstens 1024 blokken zijn"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Niet-ondersteunde journal-versie"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Fout tijdens laden van extern journal"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Geen journal gevonden"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Map-hash wordt niet ondersteund"
+
+# Behalve E en F worden de volgende 30 letterafkortingen niet gebruikt.
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Ongeldig bloknummer voor uitgebreid kenmerk"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Kan geen bestandssysteem aanmaken met het gevraagde aantal inodes"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "E2image-snapshot wordt niet gebruikt"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Te veel gereserveerde groepsbeschrijverblokken"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "De resize-inode is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Poging tot zetten van blok-bitkaart met ontbrekend indirect blok"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: gelukt"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: databank is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: in-/uitvoerfout"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: vergrendelingsfout"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: onvoldoende geheugen beschikbaar"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: record bestaat al"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: andere sleutels zijn vergrendeld"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: ongeldige parameter"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: record bestaat niet"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: schrijven is niet toegestaan"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Ext2fs-mapblokkenlijst is leeg"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Poging tot wijzigen van bloktoewijzing via een alleen-lezen iterator"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Ongeldig magisch getal voor opgeslagen pad van Ext4-extent"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Ongeldig magisch getal voor 64-bit generieke bitkaart"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Ongeldig magisch getal voor 64-bit blok-bitkaart"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Ongeldig magisch getal voor 64-bit inode-bitkaart"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Ongeldig magisch getal -- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Ongeldig magisch getal -- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Ongeldig magisch getal -- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Ongeldig magisch getal -- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Ongeldig magisch getal -- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Ongeldig magisch getal -- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Ongeldig magisch getal -- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Extent-header is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Extent-index is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Extent is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Geen vrije ruimte meer in extent-kaart"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Inode gebruikt geen extents"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Er is geen 'next' extent"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Er is geen 'previous' extent"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Er is geen 'up' extent"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Er is geen 'down' extent"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Er is geen huidige knoop"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Ext2fs-bewerking wordt niet ondersteund"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Er is geen ruimte om een extent in de knoop in te voegen"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Splitsen zou resulteren in een lege knoop"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Extent niet gevonden"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Bewerking wordt niet ondersteund voor inodes die extents bevatten"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Extent-lengte is ongeldig"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "In-/uitvoerkanaal ondersteunt geen 64-bit bloknummers"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+"Kan geen controle uitvoeren als het bestandssysteem aangekoppeld is\n"
+"wegens een ontbrekend 'mtab'-bestand"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Bestandssysteem is te groot om oude bitkaarten te kunnen gebruiken"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: ongeldig magisch getal"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: apparaat is momenteel actief"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: 'e2fsck' wordt uitgevoerd"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: bloknummer valt buiten bereik van bestandssysteem"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: ondergaat een onbekende bewerking"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: bestandssysteem is nog in gebruik"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: openen met 'O_DIRECT' is mislukt"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Grootte van blokgroepsbeschrijver is onjuist"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Controlesom van inode komt niet overeen met inode"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Controlesom van inode-bitkaart komt niet overeen met bitkaart"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Controlesom van extent-blok komt niet overeen met extent-blok"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Map-blok heeft geen ruimte voor een controlesom"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Controlesom van map-blok komt niet overeen met map-blok"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Controlesom van uitgebreidkenmerkblok komt niet overeen met blok"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Controlesom van superblok komt niet overeen met superblok"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Ongeldig controlesom-algoritme"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Controlesom van MMP-blok komt niet overeen"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ext2-bestand bestaat al"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Controlesom van blok-bitkaart komt niet overeen met bitkaart"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Kan datablokken van een inode met inline data niet langslopen"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Uitgebreid kenmerk heeft een ongeldige lengte van de naam"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Uitgebreid kenmerk heeft een ongeldige lengte van de waarde"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Uitgebreid kenmerk heeft een onjuiste hash"
+
+# Behalve E en F worden de volgende 30 letterafkortingen niet gebruikt.
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Uitgebreidkenmerkblok heeft een ongeldige header"
+
+# Behalve E en F worden de volgende 30 letterafkortingen niet gebruikt.
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Uitgebreidkenmerksleutel is niet gevonden"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Onvoldoende ruimte om gegevens voor uitgebreide kenmerken op te slaan"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Bestandssysteem heeft functievlag 'ext_attr' of 'inline_data' niet"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Inode bevat geen inline gegevens"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Geen blok voor een inode met inline gegevens"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Geen vrije ruimte meer in inline gegevens"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Ongeldig magisch getal voor uitgebreidekenmerkenstructuur"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Inode schijnt rommel te bevatten"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Uitgebreid kenmerk heeft een ongeldige positie van de waarde"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Journal-vlaggen zijn inconsistent"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Het 'undo'-bestand is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Onjuist 'undo'-bestand voor dit bestandssysteem"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Het bestandssysteem is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Onjuiste CRC aangetroffen in bestandssysteem"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Het journal-superblok is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Inode is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "Inode met uitgebreidkenmerkwaarde is beschadigd"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Groepsbeschrijvers zijn niet geladen"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "De interne 'ext2_filsys' gegevensstructuur lijkt beschadigd te zijn"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "Cyclische lus gevonden in extent-boom"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Bewerking wordt niet ondersteund op een extern journal"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profile versie 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Ongeldig magisch getal in 'profile_node'"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Profile-sectie niet gevonden"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Profile-relatie niet gevonden"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Poging tot het toevoegen van een relatie aan een knoop die geen sectie is"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Een profile-sectiekop heeft een waarde die niet nul is"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Ongeldige gekoppelde lijst in profile-structuren"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Ongeldig groepsniveau in profile-structuren"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Ongeldige pointer naar ouder in profile-structuren"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Ongeldig magisch getal in profile-iterator"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Kan waarde niet instellen in sectieknoop"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Ongeldig argument gegeven aan Profile-bibliotheek"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Poging tot wijzigen van een alleen-lezen profile"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Profile-sectiekop is niet op topniveau"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Syntaxfout in profile-sectiekop"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Syntaxfout in profile-relatie"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Overtollige sluitaccolade in profile"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Ontbrekende openingsaccolade in profile"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Ongeldig magisch getal in 'profile_t'"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Ongeldig magisch getal in 'profile_section_t'"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Doorlopen van alle topniveau-secties wordt niet ondersteund"
+
+# Dit gaat over het argument van optie -O.
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ongeldig 'profile_section'-object"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Er zijn geen verdere secties"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Ongeldige naamset gegeven aan bevragingsroutine"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Er is geen open profile-bestand"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Ongeldig magisch getal in 'profile_file_t'"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Kan profile-bestand niet openen"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sectie bestaat al"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ongeldige booleaanse waarde"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ongeldig geheel getal"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Ongeldig magisch getal in 'profile_file_data_t'"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tlaatst aangekoppeld op %.*s op %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tlaatst aangekoppeld op %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\taangemaakt op %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tlaatst gewijzigd op %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Er is een %s-partitietabel gevonden in %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Kan %s niet openen: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Het apparaat bestaat blijkbaar niet; heeft u het juist opgegeven?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s is geen blok-apparaat.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s bevat een %s-bestandssysteem met label '%s'\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s bevat een %s-bestandssysteem\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s bevat '%s'-gegevens\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the bigalloc feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Waarschuwing: de 'bigalloc'-functie is nog in ontwikkeling.\n"
+#~ "Zie https://ext4.wiki.kernel.org/index.php/Bigalloc voor meer informatie.\n"
+#~ "\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "Gebruik: %s [-F] [-I inodebufferblokken] apparaat\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "tijdens openen van '%s'"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "%u inodes gescand.\n"
+
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "De functies 'encrypt' en 'casefold' gaan niet samen.\n"
+#~ "Ze kunnen niet beide ingeschakeld worden.\n"
+
+#~ msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+#~ msgstr "Kan 'encrypt'-functie niet inschakelen op bestandssystemen met ingeschakelde 'encoding'-functie.\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "tijdens openen van map \"%s\""
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Controlesomfouten gevonden in bestandssysteem! Draai 'e2fsck' nu!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Controlesomfouten gevonden in bitkaarten! Draai 'e2fsck' nu!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: fout tijdens lezen van bitkaarten: %s\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "'i_dir_acl' @F is %Id, moet nul zijn.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Journal-functies: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Grootte van journal: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Lengte van journal: %u\n"
+#~ "Journal-sequentie: 0x%08x\n"
+#~ "Begin van journal: %u\n"
+
+#~ msgid "Journal checksum type: crc32\n"
+#~ msgstr "Journal-controlesomtype: crc32\n"
+
+#~ msgid ""
+#~ "Journal checksum type: %s\n"
+#~ "Journal checksum: 0x%08x\n"
+#~ msgstr ""
+#~ "Journal-controlesomtype: %s\n"
+#~ "Journal-controlesom: 0x%08x\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Journal-foutmnummer: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Blokgrootte in journal: %u\n"
+#~ "Lengte van journal: %u\n"
+#~ "Eerste journal-blok: %u\n"
+#~ "Kopcode van journal-reeks: 0x%08x\n"
+#~ "Begin van journal: %u\n"
+#~ "Aantal journal-gebruikers: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "Journal-gebruikers: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Waarschuwing: problemen tijdens schrijven van superblokken.\n"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "Controleer het bestandssysteem met 'e2fsck'.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "Inode %i heeft de compressievlag gezet op een bestandssysteem zonder compressie-ondersteuning. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "Fout tijdens reserveren van blok %b met uitgebreide kenmerken. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: Waarschuwing: compressie-ondersteuning is nog experimenteel.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: Deze 'e2fsck' is niet gecompileerd met 'htree'-ondersteuning,\n"
+#~ " maar het bestandssysteem %s bevat 'htree'-mappen.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "tijdens reserveren van nulmakingsbuffer"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", %u ongebruikte inodes\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Lezen van bestandssysteemgegevens is mislukt \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "Lezen van transactiegegevens is mislukt: %s\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "UUID's van bestandssysteem en uit transactiebestand komen niet overeen\n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "Openen van transactiebestand %s is mislukt\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "Openen van %s is mislukt\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr "Een transactie met grootte %zd is afgespeeld op locatie %llu.\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Schrijven is mislukt: %s\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Ongeldig argument van 'quotatype': %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "Kan geen geheugen reserveren om quota-opties te ontleden!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Kan geen geheugen reserveren voor 'tdb'-bestandsnaam\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "De veranderingen die door 'tune2fs' gemaakt zijn\n"
+#~ "kunnen ongedaan gemaakt worden met de opdracht:\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s is het hele apparaat, niet slechts een partitie!\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the quota feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Quota for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Waarschuwing: de 'quota'-functie is nog in ontwikkeling.\n"
+#~ "Zie https://ext4.wiki.kernel.org/index.php/Quota voor meer informatie.\n"
+#~ "\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "Kan de status van %s niet opvragen -- %s\n"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "Het uitzetten van de extent-functievlag wordt niet ondersteund op %s"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s: De functie 'flex_bg' zonder de functie 'resize_inode'\n"
+#~ " wordt door 'resize2fs' niet ondersteund.\n"
+
+#~ msgid "@g %g @b @B uninitialized but @i @B in use.\n"
+#~ msgstr "Groepsbeschrijver %g heeft een ongeïnitialiseerde blok-bitkaart maar de inode-bitkaart is in gebruik.\n"
+
+#~ msgid "@i %i should not have EOFBLOCKS_FL set (size %Is, lblk %r)\n"
+#~ msgstr "Inode %i zou niet de 'EOFBLOCKS_FL'-vlag gezet moeten hebben (grootte %Is, lblk %r)\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "Kan journal-grootte niet bepalen"
+
+#~ msgid "Missing indirect block not present"
+#~ msgstr "Ontbrekend indirect blok is afwezig"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<de ACL-data-inode>"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "onvolledig blok (slechts %d bytes) tijdens schrijven van image-kop"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "ongeldige fragmentgrootte: %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Waarschuwing: fragmenten worden niet ondersteund; optie '-f' wordt genegeerd\n"
+
+#~ msgid "Calling BLKDISCARD from %llu to %llu "
+#~ msgstr "Aanroepen van BLKDISCARD van %llu tot %llu "
+
+#~ msgid "succeeded.\n"
+#~ msgstr "is geslaagd.\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "Journal is NIET verwijderd.\n"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr "Superblok heeft journal-vlag niet gezet, maar heeft wel een ext3-journal %s.\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "Het journal heraanmaken om het bestandssysteem weer ext3 te maken?\n"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "tijdens herschrijven van blok-bitkaarten voor %s"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s is mislukt voor %s: %s\n"
+
+#~ msgid "HDIO_GETGEO ioctl"
+#~ msgstr "Opvragen van geometrie"
+
+#~ msgid "BLKGETSIZE ioctl"
+#~ msgstr "Opvragen van grootte"
+
+#~ msgid "@a in @i %i has a hash (%N) which is @n (must be 0)\n"
+#~ msgstr "Een uitgebreid kenmerk in inode %i heeft een ongeldige hashwaarde (%N, moet 0 zijn).\n"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "tijdens aanroep van iterator-functie"
+
+#~ msgid "Pass 0: Doing byte-swap of filesystem\n"
+#~ msgstr "Stap 0: Omwisseling van hoge en lage bytes in hele bestandssysteem\n"
+
+#~ msgid ""
+#~ "%s: the filesystem must be freshly checked using fsck\n"
+#~ "and not mounted before trying to byte-swap it.\n"
+#~ msgstr ""
+#~ "%s: het bestandssysteem dient opnieuw gecontroleerd te worden met 'fsck'\n"
+#~ "en niet aangekoppeld te worden voordat de byte-omwisseling gebeurd is.\n"
+
+#~ msgid "Byte swap"
+#~ msgstr "Byte-omwisseling"
+
+#~ msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+#~ msgstr "Byte-omwisseling is niet mogelijk met deze versie van e2fsck.\n"
+
+#~ msgid "Incompatible options not allowed when byte-swapping.\n"
+#~ msgstr "Bij byte-omwisseling zijn botsende opties niet toegestaan.\n"
+
+#~ msgid "%s: Filesystem byte order already normalized.\n"
+#~ msgstr "%s: bytevolgorde van bestandssysteem is al genormaliseerd.\n"
+
+#~ msgid "invalid starting block - %s"
+#~ msgstr "ongeldig beginblok: %s"
+
+#~ msgid "Note: This is a byte-swapped filesystem\n"
+#~ msgstr "Opmerking: dit is een byte-verwisseld bestandssysteem.\n"
+
+#~ msgid ""
+#~ "Filesystem too large. No more than 2**31-1 blocks\n"
+#~ "\t (8TB using a blocksize of 4k) are currently supported."
+#~ msgstr ""
+#~ "Bestandssysteem is te groot. Momenteel zijn niet meer dan\n"
+#~ "2**31-1 blokken mogelijk (8TB bij een blokgrootte van 4K)."
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: some 2.4 kernels do not support blocksizes greater than 4096\n"
+#~ "\tusing ext3. Use -b 4096 if this is an issue for you.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Waarschuwing: sommige 2.4-kernels ondersteunen voor ext3 geen\n"
+#~ "blokgroottes groter dan 4096. Gebruik in dat geval '-b 4096'.\n"
+#~ "\n"
+
+#~ msgid "Warning: %d-byte inodes not usable on older systems\n"
+#~ msgstr "Waarschuwing: inodes van %d bytes zijn onbruikbaar op oudere systemen\n"
diff --git a/po/pl.gmo b/po/pl.gmo
new file mode 100644
index 0000000..8d510d4
--- /dev/null
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..b98b550
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,8579 @@
+# Polish translation for e2fsprogs.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021, 2022 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Jakub Bogusz <qboosh@pld-linux.org>, 2002-2022.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-13 18:45+0200\n"
+"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
+"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Wadliwy blok %u poza zakresem - zignorowany.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "podczas sprawdzania poprawności i-węzła wadliwych bloków"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "podczas odczytu i-węzła wadliwych bloków"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "podczas próby otworzenia %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "podczas próby popen '%s'"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "podczas wczytywania z pliku listy wadliwych bloków"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "podczas uaktualniania i-węzła wadliwego bloku"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Uwaga: znaleziono niedopuszczalny blok %u w i-węźle wadliwego bloku. Wyczyszczono.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "podczas zwalniania pliku tdb dir_info"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "BÅ‚Ä…d przy odczycie bloku %lu (%s) podczas %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "BÅ‚Ä…d przy odczycie bloku %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Zignorować błąd"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Wymusić ponowny zapis"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "BÅ‚Ä…d przy zapisie bloku %lu (%s) podczas %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "BÅ‚Ä…d przy zapisie bloku %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "puste bloki katalogu"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "pusta mapa katalogu"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Pusty blok katalogu %u (#%d) w i-węźle %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s nazwa_pliku liczba_bloków rozmiar_bloku\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Niedopuszczalna liczba bloków!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Nie można przydzielić bufora bloku (rozmiar=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "mapa i-węzłów do przebudowy ekstentu"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Składnia: %s dysk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "ioctl BLKFLSBUF nie obsługiwany! Nie można opróżnić buforów.\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "odczyt superbloku kroniki\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: nie znaleziono poprawnego superbloku kroniki\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: kronika za krótka\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: niepoprawne bloki fast commit\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: odtwarzanie z kroniki\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: odtworzenie z kroniki nie zostanie wykonane w trybie tylko do odczytu\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "podczas próby ponownego otwarcia %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "arozszerzony atrybut"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Abłąd podczas przydzielania"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmapa"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ckompresja"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckonflikt z innym @biem systemu plików"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dkatalog"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dusunięty"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "ewpis"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e '%Dn' w %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fsystem plików"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fdla i-węzła %i (%Q) wynosi"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrupa"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "h@i @du HTREE"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "ii-węzeł"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iniedopuszczalny"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jkronika"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Ljest dowiÄ…zaniem"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mwielokrotnie zadeklarowany"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nbłędny"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oosierocony"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblem w"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qlimit"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rgłówny @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "spowinno być"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "uniedołączony"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vurzÄ…dzenie"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xekstent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zzerowej długości"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<pusty i-węzeł>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<i-węzeł wadliwych bloków>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<i-węzeł limitów użytkowników>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<i-węzeł limitów grup>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<i-węzeł boot-loadera>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<i-węzeł katalogu undelete>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<i-węzeł deskryptora grupy>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<i-węzeł kroniki>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<zarezerwowany i-węzeł 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<zarezerwowany i-węzeł 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "plik zwykły"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "katalog"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "urzÄ…dzenie znakowe"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "urzÄ…dzenie blokowe"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "nazwany potok"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "dowiÄ…zanie symboliczne"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "gniazdo"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "nieznany rodzaj pliku typu 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "blok pośredni"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "blok podwójnie pośredni"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "blok potrójnie pośredni"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "blok tłumaczący"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "blok #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "użytkownika"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "grupy"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "projektu"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "nieznany rodzaj limitów"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "wielokrotnie zadeklarowana mapa i-węzłów"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "błąd wewnętrzny; nie można znaleźć dup_blk dla %llu\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "powrót z clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "błąd wewnętrzny: nie można znaleźć rekordu bloku EA dla %llu"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Błąd wewnętrzny: nie można znaleźć rekordu i-węzła EA dla %u"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "podczas haszowania wpisu z e_value_inum = %u"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "odczytu bloku katalogu"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "pobierania następnego i-węzła"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "mapa używanych i-węzłów"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "mapa i-węzłów katalogów"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "mapa i-węzłów zwykłych plików"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "mapa używanych bloków"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "mapa bloków metadanych"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "mapa casefold i-węzłów"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "rozpoczynania przeszukiwania i-węzłów"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "Przebieg 1"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "odczytu niebezpośrednich bloków i-węzła %u"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "błędna mapa i-węzłów"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "i-węzeł w mapie wadliwych bloków"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "mapa i-węzłów imagic"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "wielokrotnie zadeklarowana mapa bloków"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "mapa bloków rozszerzonych atrybutów"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): oczekiwano %6lu, otrzymano phys %6lu (blkcnt %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "bitmapa bloków"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "bitmapa i-węzłów"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "tablica i-węzłów"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "Przebieg 2"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "NLS jest uszkodzony."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "Nie można kontynuować."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "bitmapa wykonanych i-węzłów"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Największe użycie pamięci"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Przebieg 3"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "bitmapa wykrywania pętli i-węzłów"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Przebieg 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Przebieg 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: błąd przydzielania pamięci"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: błąd przydzielania pamięci"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(bez pytania)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Poprawić"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Wyczyścić"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Przenieść"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Przydzielić"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Rozszerzyć"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Dołączyć do /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Wyczyścić"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Uratować"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Uciąć"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Wyczyścić i-węzeł"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Przerwać"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Podzielić"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Kontynuować"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Sklonować wielokrotnie zadeklarowane bloki"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Usunąć plik"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Pominąć komunikaty"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Odłączyć"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Wyczyścić indeks HTree"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Odtworzyć"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Zoptymalizować"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "Wyczyścić flagę"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(NIC)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "POPRAWIONO"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "WYCZYSZCZONO"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "PRZENIESIONO"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "PRZYDZIELONO"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "ROZSZERZONO"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "PODÅÄ„CZONO"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "UTWORZONO"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "URATOWANO"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "SKRÓCONO"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "I-WĘZEŠWYCZYSZCZONY"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "PRZERWANO"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "PODZIELONO"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "KONTYNUACJA"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "SKLONOWANO WIELOKROTNIE ZADEKLAROWANE BLOKI"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "PLIK USUNIĘTY"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "POMINIĘTO"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "ODÅÄ„CZONO"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "INDEKS HTREE WYCZYSZCZONY"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "ZOSTANIE ODTWORZONY"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "ZOSTANIE ZOPTYMALIZOWANE"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "WYCZYSZCZONO FLAGĘ"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@B @bów dla grupy %g nie jest w grupie. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@B i-węzłów dla grupy %g nie jest w grupie. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"tablica i-węzłów dla grupy %g nie jest w grupie. (@b %b)\n"
+"UWAGA: MOŻLIWA POWAŻNA UTRATA DANYCH.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"@S nie mógł być odczytany lub nie opisuje prawidłowego systemu\n"
+"plików ext2/ext3/ext4. Jeżeli @v jest prawidłowe i naprawdę zawiera\n"
+"@f ext2/ext3/ext4 (nie jest swapem, ufs-em ani niczym innym),\n"
+"to @S jest uszkodzony - można próbować uruchomić e2fsck z innym\n"
+"@Siem:\n"
+" e2fsck -b 8193 <@v>\n"
+" lub\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Rozmiar systemu plików (według @Su) wynosi %b @bów\n"
+"Fizyczny rozmiar urządzenia wynosi %c @bów\n"
+"Możliwe, że @S albo tablica partycji jest uszkodzona!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"W @Su block_size (rozm. bloku) = %b, fragsize (rozm. fragmentu) = %c.\n"
+"Ta wersja e2fsck nie obsługuje rozmiarów fragmentu różnych od rozmiaru\n"
+"@bu.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "W @Su blocks_per_group (bloków w grupie) = %b, powinno być %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "W @Su first_data_block (1. @b danych) = %b, powinien być %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f nie miał UUID-a; wygenerowano.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Uwaga: jeśli jakieś bloki bitmap i-węzłów lub bloków albo część\n"
+"tabeli i-węzłów wymaga relokacji, można uruchomić najpierw e2fsck\n"
+"z opcją '-b %S'. Problem może tkwić tylko w deskryptorach głównej\n"
+"grupy bloków, a zapasowe deskryptory grupy bloków mogą być poprawne.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Znaleziono uszkodzenia w @Su. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Błąd podczas określania rozmiaru fizycznego urządzenia: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "licznik i-węzłów w @Su wynosi %i, powinien być %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd nie obsługuje własności filetype.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@S ma błędną kronikę (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Zewnętrzna @j ma wielu użytkowników systemu plików (nie obsługiwane).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Nie można znaleźć zewnętrznej kroniki\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Zewnętrzna @j ma błędny @S\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Zewnętrzna @j nie obsługuje tego systemu plików\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"@S kroniki systemu plików ma nieznany typ %N (nie obsługiwany).\n"
+"Możliwe, że ta kopia e2fsck jest stara i/lub nie obsługuje tego formatu\n"
+"kroniki.\n"
+"Możliwe też, że @S kroniki jest uszkodzony.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "@S kroniki jest uszkodzony.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "flaga @Su has_journal jest wyzerowana, ale @j istnieje.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "@S ma ustawionÄ… flagÄ™ needs_recovery, ale nie ma kroniki.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "flaga needs_recovery @Su jest wyzerowana, ale @j zawiera dane.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Wyczyścić kronikę"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "@f ma ustawione flagi właściwości, ale ma wersję 0 systemu plików. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s @o @i %i (uid=%Iu, gid=%Ig, uprawnienia=%Im, rozmiar=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "znaleziono @I %B (%b) w @om i-węźle %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Już wyczyszczono %B (%b) znaleziony w @om i-węźle %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@I @o @i %i w @Su.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@I @i %i w liście @och i-węzłów.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "@S kroniki ma ustawionÄ… nieznanÄ… flagÄ™ tylko do odczytu.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "@S kroniki ma ustawioną flagę nieznanej właściwości.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Wersja kroniki nie obsługiwana przez ten e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Przenoszenie kroniki z /%s do ukrytego i-węzła.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"BÅ‚Ä…d podczas przenoszenia kroniki: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Znaleziono błędne pola @Su kroniki V2 (z kroniki V1).\n"
+"Czyszczenie pól spoza @Su kroniki V1...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Wykonać zapisy z kroniki"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"Flaga odtworzenia nie ustawiona w zapasowym @Su,\n"
+"więc wykonuję zapisy z kroniki mimo to.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr "Tworzenie kopii zapasowej informacji z @bu i-węzła kroniki.\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"@f nie ma włączonego resize_inode, ale s_reserved_gdt_blocks\n"
+"wynosi %N; @s zero. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode nie włączone, ale i-węzeł zmiany rozmiaru jest niezerowy. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "i-węzeł zmiany rozmiaru (resize) nieprawidłowy. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Czas ostatniego montowania @Su (%t,\n"
+"\tteraz = %T) jest w przyszłości.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Czas ostatniego zapisu @Su (%t,\n"
+"\tteraz = %T) jest w przyszłości.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Podpowiedź @Su dla zewnętrznego superbloku powinna być %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Dodawanie podpowiedzi dirhash do systemu plików.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Suma kontrolna deskryptora grupy %g to %04x, powinna wynosić %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "Deskryptor grupy %g oznaczony jako nie zainicjowany bez zbioru właściwości.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Deskryptor grupy %g ma błędną liczbę nie używanych i-węzłów %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "@B @bu ostatniej grupy niezainicjowana. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Transakcja %i kroniki była uszkodzona, odtwarzanie przerwano.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Flags test_fs jest ustawiona (i ext4 jest dostępny). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Czas ostatniego montowania @Su jest w przyszłości\n"
+"\t(o mniej niż dzień, zapewne z powodu złego ustawienia zegara sprzętowego)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Czas ostatniego zapisu @Su jest w przyszłości\n"
+"\t(o mniej niż dzień, zapewne z powodu złego ustawienia zegara sprzętowego)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Jeden lub więcej deskryptorów grup bloków jest błędnych. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Ustawianie liczby wolnych i-węzłów na %j (było %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Ustawianie liczby wolnych @bów na %c (było %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Ukrywanie i-węzła @qów %U %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "@S ma błędny blok MMP. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "@S ma błędną liczbę magiczną MMP. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "Pole @Su metadata_csum zastępuje uninit_bg: oba bity właściwości nie mogą być użyte jednocześnie."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "Suma kontrolna @bu MMP @Su nie zgadza siÄ™. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "@S 64-bitowych systemów plików wymaga ekstentów do dostępu do całego dysku. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg jest zbyt duże (%N, wartość maksymalna %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Suma kontrolna superbloku zewnętrznej kroniki nie zgadza się z superblokiem"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "Pole metadata_csum_seed @Su nie jest potrzebne bez metadata_csum."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Błąd inicjowania kontekstu limitów w bibliotece wspierającej: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Wadliwy dodatkowy wymagany isize w @Su (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Wadliwy dodatkowy pożądany isize w @Su (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "Błędny i-węzeł @q %U %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "@S miałby zbyt dużo i-węzłów (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Właściwości resize_inode oraz meta_bg są włączone. Nie są one\n"
+"kompatybilne. Resize_inode powinno być wyłączone. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Przebieg 1: Sprawdzanie i-węzłów, @bów i rozmiarów\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "@r nie jest @diem. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "@r ma ustawiony dtime (zapewne przez stary mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Zarezerwowany @i %i (%Q) ma błędne uprawnienia. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "@D @i %i ma zerowy dtime. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "@i %i jest używany, ale ma ustawiony dtime. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "@i %i jest @diem @z. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "@B @bów grupy %g w %b jest w konflikcie z innym @biem.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "@B i-węzłów grupy %g w %b jest w konflikcie z innym @biem.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "tablica i-węzłów grupy %g w %b jest w konflikcie z innym @biem.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "@B @bów grupy %g (%b) jest błędna. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "@B i-węzłów grupy %g (%b) jest błędna. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size wynosi %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_blocks wynosi %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "@I %B (%b) w i-węźle %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) nakłada się na metadane systemu plików w i-węźle %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "@i %i ma niedopuszczalne @bi. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Za dużo niedopuszczalnych @bów w i-węźle %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "@I %B (%b) w i-węźle wadliwych @bów. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "I-węzeł wadliwych @bów ma niedopuszczalne @bi. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Podwójny lub wadliwy @b jest używany!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Wadliwy @b %b jest używany jako niebiezpośredni @b i-węźła z wadliwym @biem. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"I-węzeł z wadliwym @biem został prawdopodobnie uszkodzony.\n"
+"Prawdopodobnie należałoby teraz zatrzymać i uruchomić e2fsck -c\n"
+"aby przeszukać @f pod kątem wadliwych bloków.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Jeżeli @b jest naprawdę wadliwy, @f nie może być naprawiony.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Można wyczyścić ten @b z listy wadliwych @bów i mieć nadzieję,\n"
+"że @b jest naprawdę dobry. Ale nie ma takiej gwarancji.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Główny @S (%b) jest na liście wadliwych @bów.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Blok %b z deskryptorów głównej grupy jest na liście wadliwych @bów\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Uwaga: w grupie %g @S (%b) jest wadliwy.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Uwaga: kopia deskryptorów grupy %g ma błędny @b (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "BÅ‚Ä…d programu? @b #%b uznany bez powodu w process_bad_block.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %N ciągłych @bów w grupie @bów %g dla %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A bufora @bów do przenoszenia %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Przenoszenie w grupie %g %s z %b do %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Przenoszenie w grupie %g %s do %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Uwaga: nie można odczytać @bu %b z %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Uwaga: nie można zapisać @bu %b do %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A bitmapy i-węzłów (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A bitmapy i-węzłów (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A informacji o liczniku dowiązań (icount): %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A tablicy @dch @bów: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Błąd podczas przeszukiwania i-węzłów (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Błąd podczas iteracji po @bach w i-węźle %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Błąd podczas zapisu informacji o liczbie i-węzłów (@i=%i, liczba=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "BÅ‚Ä…d podczas zapisu informacji o @dch @bach (@i=%i, @b=%b, liczba=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Błąd podczas odczytu i-węzła %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "@i %i ma ustawionÄ… flagÄ™ imagic. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Specjalny plik (@v/gniazdo/potok/dowiÄ…zanie) (@i %i) ma ustawionÄ…\n"
+"flagę nienaruszalności (immutable) lub dopisywania (append-only). "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Specjalny (@v/gniazdo/potok/dowiÄ…zanie) @i %i ma niezerowy rozmiar. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "@i kroniki nie jest używany, ale zawiera dane. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "@j nie jest zwykłym plikiem. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "@i %i był częścią listy osieroconych i-węzłów. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Znaleziono i-węzły, które były częścią uszkodzonej listy sierot. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A struktury refcount (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Błąd podczas odczytu @bu rozszerzonych atrybutów %b dla i-węzła %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "@i %i ma błędny @b rozszerzonych atrybutów %b. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Błąd podczas odczytu @bu rozszerzonych atrybutów %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "@b rozszerzonych atrybutów %b ma liczbę odniesień %r, powinno być %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Błąd podczas zapisu @bu rozszerzonych atrybutów %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "@b rozszerzonych atrybutów %b ma h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "@A struktury przydzielania regionu rozszerzonych atrybutów. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "@b rozszerzonych atrybutów %b jest uszkodzony (kolizja przydzielania). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "@b rozszerzonych atrybutów %b jest uszkodzony (błędna nazwa). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "@b rozszerzonych atrybutów %b jest uszkodzony (błędna wartość). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "@i %i jest zbyt duży. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) powoduje, że @d jest zbyt duży. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) powoduje, że plik jest zbyt duży. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) powoduje, że dowiązanie jest zbyt duże. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "@i %i ma ustawioną flagę INDEX_FL na systemie plików bez obsługi htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "@i %i ma ustawionÄ… flagÄ™ INDEX_FL, ale nie jest @diem.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "@h %i ma błędny główny węzeł.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %i ma nie obsługiwaną wersję hasza (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "@h %i używa niekompatybilnej flagi głównego węzła htree.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "@h %i ma zbyt dużą głębokość drzewa (%N)\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"I-węzeł z wadliwym @biem ma niebezpośredni @b (%b) będący\n"
+"w konflikcie z metadanymi systemu plików. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Tworzenie/odtwarzanie i-węzła zmiany rozmiaru nie powiodło się: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "@i %i ma dodatkowy rozmiar (%IS), co jest błędne\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "@a w i-węźle %i ma namelen (%N), co jest błędne\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "@a w i-węźle %i ma przesunięcie wartości (%N), co jest błędne\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "@a w i-węźle %i ma @b wartości (%N), co jest błędne (musi być 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "@a w i-węźle %i ma rozmiar wartości (%N), co jest błędne\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "@a w i-węźle %i ma hash (%N), co jest błędne\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "@i %i to %It, ale wygląda jakby w rzeczywistości był katalogiem.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Błąd podczas czytania po @xach w i-węźle %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Nie udało się przejść ekstentów w i-węźle %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i ma @n ekstent\n"
+"\t(@b logiczny %c, @n @b fizyczny %b, długość %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"@i %i ma błędny ekstent\n"
+"\t(@b logiczny %c, @b fizyczny %b, błędna długość %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "@i %i ma ustawioną flagę EXTENTS_FL na systemie plików bez obsługi ekstentów.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "@i %i ma format z ekstentami, ale w superbloku brakuje właściwości EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "@i %i nie ma flagi EXTENT_FL, ale jest w formacie z ekstentami\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Szybkie dowiÄ…zanie symboliczne %i ma ustawionÄ… flagÄ™ EXTENT_FL. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i ma ekstenty spoza kolejności\n"
+"\t(@n @b logiczny %c, @b fizyczny %b, długość %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "@i %i ma błędny węzeł ekstentu (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Błąd podczas przekształcania bitmapy @bów podklastra: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "@i @qów nie jest zwykłym plikiem. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "@i @qów nie jest używany, ale zawiera dane. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "@i @qów jest widoczny dla użytkownika. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "I-węzeł wadliwych @bów wygląda na błędny. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"@i %i ma ekstent zerowej długości\n"
+"\t(@n @b logiczny %c, @b fizyczny %b, długość %N)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "@i %i zdaje się zawierać śmieci. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "@i %i przechodzi testy, ale suma kontrolna nie zgadza się z i-węzłem. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "@a i-węzła %i jest uszkodzony (kolizja przydzielania). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"blok ekstentów i-węzła %i przechodzi testy, ale suma kontrolna nie zgadza się z ekstentem\n"
+"\t(@b logiczny %c, @b fizyczny %b, długość %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "@b rozszerzonych atrybutów i-węzła %i %b przechodzi testy, ale suma kontrolna nie zgadza się z @biem. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Poziom wewnętrznego węzła ekstentu %N i-węzła %i:\n"
+"PoczÄ…tek logiczny %b nie zgadza siÄ™ z poczÄ…tkiem logicznym %c kolejnego poziomu. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i, koniec ekstentu przekracza dozwoloną wartość\n"
+"\t(@b logiczny %c, @b fizyczny %b, długość %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "@i %i ma dane wewnętrzne, ale w @Su brak właściwości INLINE_DATA\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "@i %i ma flagę INLINE_DATA_FL w systemie plików bez obsługi danych wewnętrznych.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "blok i-węzła %i %b jest w konflikcie z krytycznymi metadanymi, pominięto sprawdzanie bloku.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "Dla i-węzła @du %i @b %b powinien być przy @bu %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "@i @du %i ma @x oznaczony jako niezainicjowany przy @bu %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"Dla i-węzła %i @b logiczny %b (@b fizyczny %c) narusza zasady przydzielania klastrów.\n"
+"Zostanie poprawiony w przebiegu 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "@i %i ma flagę INLINE_DATA_FL, ale nie znaleziono rozszerzonych atrybutów. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Specjalny plik (@v/gniazdo/potok/dowiÄ…zanie) (@i %i) ma ustawionÄ…\n"
+"flagę nienaruszalności (immutable) lub dopisywania (append-only). "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "@i %i ma nagłówek @xu, ale flaga danych wewnętrznych jest ustawiona.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "@i %i wydaje się mieć dane wewnętrzne, ale ustawiona jest flaga @xu.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "@i %i wydaje się mieć mapę @bów, ale ustawione flagi danych wewnętrznych i @xu.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "@i %i ma ustawione flagi danych wewnętrznych i @xu, ale pole i_block zawiera śmieci.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "Lista wadliwych bloków twierdzi, że @i listy wadliwych bloków jest wadliwy. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "@A struktury przydzielania regionu @xu. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i ma powtórzone odwzorowanie @xu\n"
+"\t(@b logiczny %c, @n @b fizyczny %b, długość %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "@A %N bajtów pamięci dla listy zaszyfrowanych i-węzłów\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "drzewo ekstentów i-węzła %i mogłoby być płytsze (%b; mogłoby być <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "@i %i w systemie plików bigalloc nie może być odwzorowany na @b. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "@i %i ma uszkodzony nagłówek @xu. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Znaczniki czasu w i-węźle %i po 2310-04-04 są prawdopodobnie sprzed 1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i ma niedopuszczalny i-węzeł wartości rozszerzonego atrybutu %N.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "@i %i ma błędny @a. I-węzeł EA nie ma flagi EA_INODE.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"@i EA %N dla i-węzła rodzica %i nie ma flagi EA_INODE.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "@i %i ma @x oznaczony jako niezainicjowany przy @bu %c (długość %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "@i %i ma ustawionÄ… flagÄ™ casefold, ale nie jest @diem. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"@d %p ma flagę casefold, ale właściwość\n"
+"casefold nie jest włączona. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "@i %i ma ustawionÄ… flagÄ™ szyfrowania, ale brak rozszerzonego atrybutu szyfrowania.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "Szyfrowany @i %i ma uszkodzony @a szyfrowania.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "@h %i używa wersji hasza (%N), a powinien używać SipHasha (6)\n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "@h %i używa SipHasha, a nie powinien. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Uruchamianie dodatkowych przebiegów do rozwiązania bloków zadeklarowanych\n"
+"przez więcej niż jeden @i...\n"
+"Przebieg 1B: Ponowne przeszukiwanie @mch @bów\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@m @b(i) w i-węźle %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Błąd podczas szukania i-węzła (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A bitmapy i-węzłów (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Błąd podczas iteracji po @bach w i-węźle %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Błąd podczas poprawiania refcount dla @bu rozszerzonych atrybutów %b (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Przebieg 1C: Przeszukiwanie katalogów pod kątem i-węzłów z @mmi @bami\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Przebieg 1D: Uzgadnianie @mch @bów\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Plik %Q (@i #%i, czas modyfikacji %IM) \n"
+" ma %r @mch @bów, dzielonych z %N plikami:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i #%i, czas modyfikacji %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<metadane systemu plików>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Jest %N i-węzłów zawierających podwójnie zadeklarowane @bi.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Podwójnie zadeklarowane @bi już przepisane lub sklonowane.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Nie można sklonować pliku: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Przebieg 1E: Optymalizacja drzew @xów\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Nie udało się zoptymalizować drzewa @xów %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Optymalizacja drzew @xów: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Błąd wewnętrzny: zbut duża głębokość maksymalna drzewa ekstentów (%b; oczekiwana=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "drzewo @xów i-węzła %i (na poziomie %b) mogłoby być krótsze. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "drzewo @xów i-węzła %i (na poziomie %b) mogłoby być węższe. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Przebieg 2: Sprawdzanie struktury @dów\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Błędny numer i-węzła dla '.' w i-węźle @du %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E ma błędny numer i-węzła: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E ma @D/nie używany @i %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "@E @L do '.' "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E wskazuje na @i (%Di) położony w wadliwym @b.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E @L do @du %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "@E @L do głównego katalogu.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E ma niedopuszczalne znaki w nazwie.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Brakuje '.' w i-węźle @du %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Brakuje '..' w i-węźle @du %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Pierwszym @eem '%Dn' (@i=%Di) w i-węźle @du %i (%p) @s '.'\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Drugim @eem '%Dn' (@i=%Di) w i-węźle @du %i @s '..'\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr @F %IF, @s zero.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s zero.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high @F %Id, @s zero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N, @s zero.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N, @s zero.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) ma błędne uprawnienia (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@i @du %i, %B, offset %N: @d uszkodzony\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@i @du %i, %B, offset %N: nazwa pliku zbyt długa\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "@i @du %i ma nie przydzielony %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@e @du '.' w i-węźle @du %i nie jest zakończony przez NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@e @du '..' w i-węźle @du %i nie jest zakończony przez NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) jest @Im @vm znakowym.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) jest @Im @vm @bowym.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E jest powielonym @eem '.'.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E jest powielonym @eem '..'.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Błąd wewnętrzny: nie można znaleźć dir_info dla %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E ma rec_len %Dr, @s %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A struktury icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "BÅ‚Ä…d podczas iteracji po @bach @du: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "BÅ‚Ä…d podczas odczytu @b %b @du (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "BÅ‚Ä…d podczas zapisu @b %b @du (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A nowego @bu @du dla i-węzła %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Błąd podczas zwalniania i-węzła %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "@e @du dla '.' w %p (%i) jest duży.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) jest @Im FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) jest @Im gniazdem.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Ustawiono filetype dla @eu '%Dn' w %p (%i) na %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E ma błędny filetype (był %Dt, powinien być %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "@E ma ustawione filetype.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "@E ma nazwę zerowej długości.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Dowiązanie symboliczne %Q (@i #%i) jest błędne.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "@b rozszerzonych atrybutów dla i-węzła %i (%Q) jest błędny (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "@f zawiera duże pliki, ale brak flagi LARGE_FILE w @Su.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@p i-węźle @du HTREE %d: %B nie ma odwołań\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p i-węźle @du HTREE %d: %B ma podwójne odwołanie\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p i-węźle @du HTREE %d: %B ma błędny minimalny hasz\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p i-węźle @du HTREE %d: %B ma błędny maksymalny hasz\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "Błędne @h %d (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "@f zawiera duże katalogi, ale brak flagi LARGE_DIR w @Su.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p i-węźle @du HTREE %d (%q): błędny numer @bu %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p i-węźle @du HTREE %d: główny węzeł jest błędny\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p i-węźle @du HTREE %d: %B ma błędny limit (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p i-węźle @du HTREE %d: %B ma błędny licznik (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p i-węźle @du HTREE %d: %B ma nie uporządkowaną tablicę haszującą\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p i-węźle @du HTREE %d: %B ma błędną głębokość (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Znaleziono podwójny @E. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E ma nieunikalnÄ… nazwÄ™ pliku.\n"
+"Zmienić na %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Znaleziono podwójny @e '%Dn'.\n"
+"\tZaznaczono %p (%i) do przebudowania.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, @s zero.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Nieoczekiwany @b w i-węźle @du HTREE %d (%q)\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@i %Di znaleziony w grupie %g, która ma ustawioną flagę _INONE_UNINIT.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@i %Di znaleziony w grupie %g obszaru nie używanych i-węzłów.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s zero.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p i-węźle @du HTREE %d: główny węzeł ma błędną sumę kontrolną.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p i-węźle @du HTREE %d: wewnętrzny węzeł ma błędną sumę kontrolną.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@i @du %i, %B, offset %N: @d nie ma sumy kontrolnej.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "@i @du %i, %B: @d przechodzi testy, ale ma błędną sumę kontrolną.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Rozmiar i-węzła @du wewnętrznego %i (%N) musi być wielokrotnością 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Poprawienie rozmiaru i-węzła @du wewnętrznego %i nie powiodło się.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Szyfrowany @E jest zbyt krótki.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "Szyfrowany @E odwołuje się do nieszyfrowanego i-węzła %Di.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "Szyfrowany @E odwołuje się do i-węzła %Di, który ma inną politykę szyfrowania.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "@E ma niedopuszczalne znaki UTF-8 w nazwie.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "Znaleziono podwójną nazwę pliku @E. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Przebieg 3: Sprawdzanie łączności @dów\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "@r jest nie przydzielony. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Brak miejsca w @du @l. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "Nie podłączony @i @du %i (był w %q)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "Nie znaleziono /@l. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' w %Q (%i) jest %P (%j), @s %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Błędny lub nie istniejący /@l. Nie można podłączyć.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Nie można rozszerzyć /@l: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Nie można podłączyć %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "BÅ‚Ä…d podczas szukania /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block: %m podczas próby utworzenia @du /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode: %m podczas próby utworzenia @du /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m podczas tworzenia nowego @bu @du\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block: %m podczas zapisu @bu @du dla /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Błąd podczas poprawiania liczby i-węzłów w i-węźle %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Nie można poprawić rodzica i-węzła %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Nie można poprawić rodzica i-węzła %i: nie znaleziono wpisu @du rodzica\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Błąd podczas tworzenia głównego @du (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "BÅ‚Ä…d podczas tworzenia @du /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r nie jest @diem; przerwanie.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Nie można kontynuować bez głównego katalogu.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l nie jest @diem (@i=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/@l ma dane wewnętrzne\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Nie można przydzielić miejsca na /@l.\n"
+"Utracone pliki zostaną umieszczone w katalogu głównym"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Brak miejsca na odzyskanie utraconych plików!\n"
+"Proszę usunąć dane z systemu plików i uruchomić ponownie e2fsck.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/@l jest zaszyfrowany\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "Rekurencyjnie zapętlony @i @du %i (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Przebieg 3A: Optymalizacja katalogów\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Tworzenie iteratora dirs_to_hash nie powiodło się: %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Optymalizacja katalogu %q (%d) nie powiodła się: %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Optymalizacja katalogów: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Przebieg 4: Sprawdzanie liczników odwołań\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "@u @i @z %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "@u @i %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "licznik odwołań i-węzła %i wynosi %Il, @s %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"UWAGA: BÅÄ„D PROGRAMU W E2FSCK!\n"
+"\tLUB KTOŚ BEZMÓZGI (TY) SPRAWDZA PODMONTOWANY (ŻYWY) SYSTEM PLIKÓW.\n"
+"inode_link_info[%i]=%N, inode.i_links_count=%Il. Powinny być takie same!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "Licznik odwołań i-węzła rozszerzonych atrybutów %i wynosi %N, @s %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "@d przekracza maksymalną liczbę dowiązań, ale brak cechy DIR_NLINK w @Su.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "Licznik odwołań i-węzła @du %i ustawiony na przepełnienie, a powinien być równy %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Przebieg 5: Sprawdzanie sumarycznych informacji o @gch\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "Wypełnienie na końcu bitmapy i-węzłów nie jest ustawione. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "Wypełnienie na końcu bitmapy @bów nie jest ustawione. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "Różnice bitmapy @bów: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "Różnice bitmapy i-węzłów: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Błędna liczba wolnych i-węzłów dla grupy #%g (%i, naliczono %j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Błędna liczba katalogów dla grupy #%g (%i, naliczono %j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Błędna liczba wolnych i-węzłów (%i, naliczono %j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Błędna liczba wolnych @bów dla grupy #%g (%b, naliczono %c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Błędna liczba wolnych @bów (%b, naliczono %c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "BÅÄ„D PROGRAMU: koÅ„ce bitmap systemu plików (#%N) (%b, %c) nie zgadzajÄ… siÄ™ z policzonymi koÅ„cami bitmap (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Błąd wewnętrzny: fałszywy koniec bitmapy (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Błąd podczas kopiowania w zastępczej bitmapie i-węzłów: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Błąd podczas kopiowania w zastępczej bitmapie @bów: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "@b(i) grupy %g są używane, ale @g ma flagę BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "i-węzły grupy %g są używane, ale @g ma flagę INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "@B i-węzłów grupy %g nie zgadza się z sumą kontrolną.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "@B @bów grupy %g nie zgadza się z sumą kontrolną.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Odtworzyć kronikę"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "Uaktualnić informacje o limitach typu %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Błąd podczas ustawiania informacji o sumie kontrolnej grupy bloków: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Błąd podczas zapisu informacji o systemie plików: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Błąd podczas zrzucania zapisów na urządzenie przechowujące: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "BÅ‚Ä…d podczas zapisu informacji o limitach typu %N: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Nie obsłużony kod błędu (0x%x)!\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "ZIGNOROWANO"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "w move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Użyta pamięć: %lu, upłynął czas: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "rozmiar i-węzła=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "podczas otwierania obrazu i-węzłów"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "podczas rozpoczynania przeszukiwania i-węzłów"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "podczas przeszukiwania i-węzłów"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "podczas wywołania ext2fs_block_iterate dla i-węzła %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "podczas wywołania ext2fs_adjust_ea_refcount2 dla i-węzła %u"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Skracanie"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "Czyszczenie"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Składnia: %s [-panyrcdfktvDFV] [-b superblok] [-B rozm_bloku]\n"
+"\t\t[-l|-L plik_wadliwych_bloków] [-C fd] [-j zewn-kronika]\n"
+"\t\t[-E opcje-rozszerzone] [-z plik-undo] urzÄ…dzenie\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Pomoc awaryjna:\n"
+" -p Automatyczne naprawianie (bez pytań)\n"
+" -n Nie wykonywanie zmian w systemie plików\n"
+" -y Przyjęcie odpowiedzi \"tak\" na wszystkie pytania\n"
+" -c Szukanie wadliwych bloków i dodanie ich do listy\n"
+" -f Wymuszenie sprawdzenia nawet \"czystego\" systemu plików\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Pokazywanie większej ilości informacji\n"
+" -b superblok Użycie innego superbloku\n"
+" -B rozm.bloku Wymuszenie rozmiaru bloku przy poszukiwaniu superbloku\n"
+" -j zewn-kronika Ustawienie położenia zewnętrznej kroniki\n"
+" -l plik_złych_bloków Dodanie do listy wadliwych bloków\n"
+" -L plik_złych_bloków Ustawienie listy wadliwych bloków\n"
+" -z plik_undo Utworzenie pliku \"undo\" pozwalającego wycofać zmiany\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u plików (%0d.%d%% nieciągłych), %llu/%llu bloków\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u użyty i-węzeł (%2.2f%% z %u)\n"
+msgstr[1] ""
+"\n"
+"%12u użyte i-węzły (%2.2f%% z %u)\n"
+msgstr[2] ""
+"\n"
+"%12u użytych i-węzłów (%2.2f%% z %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u plik nieciągły (%0d.%d%%)\n"
+msgstr[1] "%12u pliki nieciągłe (%0d.%d%%)\n"
+msgstr[2] "%12u plików nieciągłych (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u katalog nieciągły (%0d.%d%%)\n"
+msgstr[1] "%12u katalogi nieciągłe (%0d.%d%%)\n"
+msgstr[2] "%12u katalogów nieciągłych (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " liczba i-węzłów z blokami ind/dind/tind: %u/%u/%u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " Histogram głębokości ekstentów: "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu użyty blok (%2.2f%% z %llu)\n"
+msgstr[1] "%12llu użyte bloki (%2.2f%% z %llu)\n"
+msgstr[2] "%12llu użytych bloków (%2.2f%% z %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u wadliwy blok\n"
+msgstr[1] "%12u wadliwe bloki\n"
+msgstr[2] "%12u wadliwych bloków\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u duży plik\n"
+msgstr[1] "%12u duże pliki\n"
+msgstr[2] "%12u dużych plików\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u zwykły plik\n"
+msgstr[1] ""
+"\n"
+"%12u zwykłe pliki\n"
+msgstr[2] ""
+"\n"
+"%12u zwykłych plików\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u katalog\n"
+msgstr[1] "%12u katalogi\n"
+msgstr[2] "%12u katalogów\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u plik urzÄ…dzenia znakowego\n"
+msgstr[1] "%12u pliki urządzeń znakowych\n"
+msgstr[2] "%12u plików urządzeń znakowych\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u plik urzÄ…dzenia blokowego\n"
+msgstr[1] "%12u pliki urządzeń blokowych\n"
+msgstr[2] "%12u plików urządzeń blokowych\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u potok\n"
+msgstr[1] "%12u potoki\n"
+msgstr[2] "%12u potoków\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u dowiÄ…zanie\n"
+msgstr[1] "%12u dowiÄ…zania\n"
+msgstr[2] "%12u dowiązań\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u dowiÄ…zanie symboliczne"
+msgstr[1] "%12u dowiÄ…zania symboliczne"
+msgstr[2] "%12u dowiązań symbolicznych"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u szybkie dowiÄ…zanie symboliczne)\n"
+msgstr[1] " (%u szybkie dowiÄ…zania symboliczne)\n"
+msgstr[2] " (%u szybkich dowiązań symbolicznych)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u gniazdo\n"
+msgstr[1] "%12u gniazda\n"
+msgstr[2] "%12u gniazd\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u plik\n"
+msgstr[1] "%12u pliki\n"
+msgstr[2] "%12u plików\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "podczas sprawdzania, czy %s jest zamontowany."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Uwaga! %s jest zamontowany.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Uwaga! %s jest w użyciu.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s jest zamontowany.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s jest w użyciu.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Nie można kontynuować, przerwano.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"UWAGA!!! System plików jest zamontowany. Kontynuacja ***SPOWODUJE***\n"
+"***POWAŻNE*** uszkodzenie systemu plików.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Naprawdę kontynuować?"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "sprawdzanie przerwane.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " zawiera system plików z błędami"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " nie był czysto odmontowany"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " właściwości głównego superbloku różnią się od kopii zapasowej"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " był montowany %u razy bez sprawdzania"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " ma czas ostatniego sprawdzenia systemu plików w przyszłości"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " przetrwał %u dni bez sprawdzania"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "zignorowano częstotliwość sprawdzania, ustawione jest broken_system_clock\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", wymuszono sprawdzenie.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: czysty, %u/%u plików, %llu/%llu bloków"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (sprawdzenie wstrzymane; zasilanie z baterii)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (sprawdzenie po następnym montowaniu)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr "(sprawdzenie za %ld montowań)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "BÅÄ„D: Nie można otworzyć /dev/null (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Błędna wersja EA.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "Błędny parametr rozmiaru bufora odczytu z wyprzedzeniem.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Nieznana opcja rozszerzona: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Opcje rozszerzone są oddzielane przecinkami i mogą przyjmować parametr,\n"
+"który jest ustawiany znakiem równości ('='). Poprawne opcje rozszerzone to:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<wersja ea (1 lub 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<rozmiar bufora>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Błąd składni w pliku konfiguracyjnym e2fsck (%s, linia %d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "BÅ‚Ä…d podczas kontroli deskryptora pliku %d: %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "Błędne informacje dopełniające deskryptora plików"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Można podać tylko jedną z opcji -p/-a, -n lub -y."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Opcja -t nie jest obsługiwana przez tę wersję e2fsck.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Nie udało się rozwiązać '%s'"
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "Opcje -n i -D sÄ… niekompatybilne."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "Opcje -n i -c sÄ… niekompatybilne."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Opcje -n i -l/-L sÄ… niekompatybilne."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Opcje -D i -E fixes_only sÄ… niekompatybilne."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Opcje -E bmap2extent i fixes_only sÄ… niekompatybilne."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "podczas otwierania %s w celu opróżnienia"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "podczas próby opróżnienia %s"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Opcje -c oraz -l/-L nie mogą być podane jednocześnie.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG \"%s\" nie jest liczbą całkowitą\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Błędny argument nieliczbowy dla -%c (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "Przedział MMP to %u sek, a całkowity czas oczekiwania %u sek. Proszę czekać...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "podczas sprawdzania bloku MMP"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Jeśli system plików nie jest na pewno używany przez żaden system, można uruchomić:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "podczas odczytu bloku MMP"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Nadpisywanie istniejącego systemu plików; można to wycofać poleceniem:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "podczas próby usunięcia %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "podczas próby utworzenia pliku cofnięcia (undo)\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "BÅ‚Ä…d: wersja biblioteki ext2fs jest za stara!\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "podczas próby zainicjowania programu"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tUżywane %s, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "interaktywna naprawa wymaga terminala"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s próba użycia zapasowych bloków...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Superblok błędny,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Deskryptory grup wyglądają źle..."
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s podczas próby użycia zapasowych bloków"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: powracanie do oryginalnego superbloku\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Wersja systemu plików jest zbyt duża dla tej wersji e2fsck.\n"
+"(lub superblok systemu plików jest uszkodzony)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "Czy to może jest partycja zerowej długości?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Trzeba mieć dostęp %s do systemu plików lub być rootem\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Zapewne nie istniejÄ…ce urzÄ…dzenie lub swap?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "System plików zamontowany lub otwarty na wyłączność przez inny program?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "Zapewne nie istniejÄ…ce urzÄ…dzenie?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Dysk zabezpieczony przed zapisem; można użyć opcji -n aby sprawdzić\n"
+"urzÄ…dzenie w trybie tylko do odczytu.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: Próba załadowania superbloku mimo błędów...\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "Potrzeba nowszej wersji e2fsck!"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "podczas sprawdzania kroniki dla %s"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "Nie można kontynuować sprawdzania systemu plików"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr ""
+"Uwaga: pominięto odtwarzanie z kroniki z powodu sprawdzania w trybie tylko\n"
+"do odczytu.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "nie można ustawić flag superbloku na %s\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Napotkano błąd sumy kontrolnej kroniki w %s\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Uszkodzona kronika w %s\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "podczas odtwarzania kroniki dla %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s ma włączone nie obsługiwane właściwości:"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s ma nie obsługiwane kodowanie: %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s podczas odczytu i-węzła wadliwych bloków\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Nie wróży to dobrze, ale spróbuję kontynuować...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Tworzenie kroniki (%d bloków): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " Wykonano.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** kronika została zregenerowana ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "przerwano"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck przerwany.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Restart e2fsck od poczÄ…tku...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "podczas resetowania kontekstu"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** BÅĘDY SYSTEMU PLIKÓW NAPRAWIONE *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: System plików został zmodyfikowany.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** SYSTEM PLIKÓW ZMODYFIKOWANY *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** WYMAGANY RESTART SYSTEMU *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** UWAGA: System plików nadal ma błędy **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "tTyY"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "wWaA"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " ('w' włącza 'tak' na wszystko) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<t>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (t/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "anulowano!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "tak na wszystko\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "tak\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "nie\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nie\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? tak\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "tak"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "nie"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: niedopuszczalne bloki bitmapy dla %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "odczytu bitmap i-węzłów i bloków"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "podczas ponawiania próby odczytu bitmap dla %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "zapisu bitmap bloków i i-węzłów"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "podczas ponownego zapisu bitmap blików i i-węzłów dla %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: NIEOCZEKIWANA NIESPÓJNOŚĆ; TRZEBA URUCHOMIĆ fsck RĘCZNIE.\n"
+"\t(tzn. bez opcji -a ani -p)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Użyta pamięć: %lluk/%lluk (%lluk/%lluk), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Użyta pamięć: %lluk, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "czas: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "upłynął czas: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "podczas odczytu i-węzła %lu w %s"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "podczas zapisu i-węzła %lu w %s"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "NIEOCZEKIWANA NIESPÓJNOŚĆ: system plików został zmodyfikowany podczas działania fsck.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "zakończono \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Składnia: %s [-b rozm_bloku] [-i plik_wej] [-o plik_wyj] [-svwnfBX]\n"
+" [-c bloków_naraz] [-d wsp_opóźn_między_odczytami]\n"
+" [-e maks_wadliwych_bloków] [-p przebiegów]\n"
+" [-t wzór_testowy [-t wzór_testowy [...]]]\n"
+" urzÄ…dzenie [ostatni_blok [pierwszy_blok]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Opcje -n i -w wykluczajÄ… siÄ™ wzajemnie.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "Gotowe w %6.2f%%, minęło %s (błędów: %d/%d/%d)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Testowanie wzorcem losowym: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Testowanie wzorcem 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "podczas przeskakiwania"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Dziwna wartość (%ld) w do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "podczas ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "podczas rozpoczynania iteracji po liście wadliwych bloków"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "podczas przydzielania buforów"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Sprawdzanie bloków od %lu do %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Poszukiwanie wadliwych bloków w trybie tylko do odczytu\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Poszukiwanie wadliwych bloków (tylko odczyt): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Zbyt dużo wadliwych bloków, przerwanie testu\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Poszukiwanie wadliwych bloków w trybie odczytu i zapisu\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Od bloku %lu do %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Odczyt i porównywanie: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Poszukiwanie wadliwych bloków w trybie z niedestruktywnym zapisem\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Poszukiwanie wadliwych bloków (odczyt i niedestruktywny zapis)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Otrzymano przerwanie, sprzÄ…tam\n"
+"\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "podczas zapisu testowych danych, blok %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s jest zamontowany; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "badblocks wymuszone mimo to. Mam nadzieję, że /etc/mtab się myli.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "nie jest bezpiecznie uruchamiać badblocks!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s jest najwyraźniej używany przez system; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks wymuszone mimo to.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "błędny %s - %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Zbyt duża maksymalna liczba wadliwych bloków %u - maksymalna to %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "nie można przydzielić pamięci na wzorzec_testowy - %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "W trybie odczytu-zapisu można podać najwyżej jeden wzorzec testowy"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "W trybie samego odczytu nie można podać wzorca_testowego"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Błędny rozmiar bloku: %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Błędne blocks_at_once: %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Nie można określić rozmiaru urządzenia; trzeba podać\n"
+"rozmiar ręcznie\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "podczas próby określenia rozmiaru urządzenia"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "ostatni blok"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "pierwszy blok"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "błędny początkowy blok (%llu): musi być mniejszy niż %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "błędny początkowy blok (%llu): musi być wartością 32-bitową"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "podczas tworzenia listy wadliwych bloków w pamięci"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "plik wejściowy - błędny format"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "podczas dodawania do listy wadliwych bloków w pamięci"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Przebieg zakończony, znaleziono %u wadliwych bloków (błędów: %d/%d/%d).\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Składnia: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p projekt] [-v wersja] pliki...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "błędny projekt - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "błędna wersja - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "podczas próby stat %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "podczas odczytu flag %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flagi %s ustawiono jako "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "podczas ustawiania flag %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Wersja %s ustawiona jako %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "podczas ustawiania wersji %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Projekt %s ustawiony na %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "podczas ustawiania projektu %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Nie można przydzielić zmiennej path w chattr_dir_proc"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= jest niekompatybilne z - i +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Trzeba użyć '-v', =, - lub +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "podczas odczytu i-węzła %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "podczas rozszerzania katalogu"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "podczas dowiÄ…zywania \"%s\""
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "podczas zapisu i-węzła %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "podczas wypisywania atrybutów \"%s\""
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "podczas otwierania i-węzła %u"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "podczas odczytu atrybutów rozszerzonych i-węzła %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "podczas przydzielania pamięci"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "podczas odczytu atrubytu \"%s\" dla \"%s\""
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "podczas zapisu atrybutu \"%s\" do i-węzła %u"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "podczas zamykania i-węzła %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "podczas przydzielania i-węzła \"%s\""
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "podczas tworzenia i-węzła \"%s\""
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "podczas tworzenia dowiÄ…zania symbolicznego \"%s\""
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "podczas szukania \"%s\""
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "podczas tworzenia katalogu \"%s\""
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "podczas otwierania \"%s\" w celu skopiowania"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "podczas zmiany katalogu roboczego na \"%s\""
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "podczas skanowania katalogu \"%s\""
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "podczas wykonywania lstat na \"%s\""
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "podczas tworzenia pliku specjalnego \"%s\""
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "malloc nie powiodło się"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "podczas próby odczytu dowiązania \"%s\""
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "dowiązanie symboliczne zwiększyło rozmiar między lstat() a readlink()"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "podczas zapisu dowiÄ…zania symbolicznego \"%s\""
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "podczas zapisu pliku \"%s\""
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "podczas tworzenia katalogu \"%s\""
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "podczas zmiany katalogu"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "ignorowanie wpisu \"%s\""
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "podczas ustawiania i-węzła dla \"%s\""
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "podczas ustawiania rozszerzonych atrybutów dla \"%s\""
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "podczas zapisywania danych i-węzła"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "podczas kopiowania atrybutów rozszerzonych katalogu głównego"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Składnia: %s [-bfghimxV] [-o superblok=<numer>] [-o blocksize=<rozmiar>] urządzenie\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "bloków"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "klastrów"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupa %lu: (Bloki "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " suma kontr. 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (OCZEKIWANA 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s superblok pod "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Główny"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Zapasowy"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Deskryptory grup pod "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Zarezerwowane bloki GDT pod "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr ", Deskryptory grup pod "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Bitmapa bloków pod "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", suma kontr. 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Bitmapa i-węzłów pod "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Tablica i-węzłów pod "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" wolnych %2$s: %1$u, wolnych i-węzłów: %3$u, katalogów: %4$u%5$s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", nie używanych i-węzłów: %u\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Wolne bloki: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Wolne i-węzły: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "podczas wypisywania listy wadliwych bloków"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Wadliwe bloki: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "podczas odczytu i-węzła kroniki"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "podczas otwierania i-węzła kroniki"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "podczas odczytu superbloku kroniki"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Błędna liczba magiczna superbloku kroniki!\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "podczas odczytu superbloku kroniki"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Nie można znaleźć magicznych liczb superbloku kroniki"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "nie udało się przydzielić bufora MMP\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "podczas odczytu bloku MMP %llu z '%s'\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Nie można przydzielić pamięci do analizy opcji!\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Błędny parametr superblock: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Błędny parametr blocksize: %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Podano błędne opcje rozszerzone: %s.\n"
+"\n"
+"Opcje rozszerzone są oddzielane przecinkami i mogą przyjmować parametr,\n"
+"\tktóry jest ustawiany znakiem '='.\n"
+"\n"
+"Poprawne opcje rozszerzone to:\n"
+"\tsuperblock=<numer superbloku>\n"
+"\tblocksize=<rozmiar bloku>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tUżywane %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Nie można znaleźć poprawnego superbloku systemu plików.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: cecha MMP nie jest włączona.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "podczas próby odczytu bitmap '%s'\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Należy teraz uruchomić e2fsck!\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Składnia: %s [ -r|Q ] [ -f ] [ -b superblok ] [ -B rozm_bloku ] urządzenie plik_obrazu\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I urzÄ…dzenie plik_obrazu\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o offset_źr ] [ -O offset_doc ] fs_źr [ fs_doc ]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "podczas przydzielania bufora"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Zapisywanie bloku %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "błąd przy zapisie bloku %llu"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "błąd w generic_write()"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Błąd: rozmiar nagłówka jest większy niż wrt_size\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "Nie można przydzielić bufora nagłówka\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "podczas zapisu superbloku"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "podczas zapisu tabeli i-węzłów"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "podczas zapisu bitmapy bloków"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "podczas zapisu bitmapy i-węzłów"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Uszkodzony blok katalogu %llu: błędne rec_len (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Uszkodzony blok katalogu %llu: błędne name_len (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "Bloków: %llu / %llu (%d%%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Kopiowanie "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Zatrzymanie teraz zniszczy system plików; aby potwierdzić, można przerwać ponownie\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s pozostało przy %.2f MB/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "błąd przy odczycie bloku %llu"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Skopiowano bloków: %llu / %llu (%d%%) w %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "przy %.2f MB/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "podczas przydzielania tablicy l1"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "podczas przydzielania bufora l2"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Uwaga: w pamięci podręcznej są nadal tablice w trakcie zapisu bufora, dane zostaną utracone, więc obraz może nie być poprawny.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "podczas przydzielania ext_qcow2_image"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "podczas inicjowania ext2_qcow2_image"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Błąd programu: utworzono wiele bloków sekwencyjnych liczników odwołań!\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "podczas przydzielania bitmapy bloków"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "podczas przydzielania bitmapy bloków scramble"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Przeszukiwanie i-węzłów...\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "Nie można przydzielić bufora bloku"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "podczas pobierania następnego i-węzła"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "podczas iteracji po i-węźle %u"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Obrazów surowego i qcow2 nie można zainstalować"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "błąd podczas odczytu bitmap"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "podczas otwierania pliku urzÄ…dzenia"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "podczas odtwarzania tabeli obrazu"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "Opcja -a może być użyta tylko z obrazami surowym lub QCOW2."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "Opcja -b może być użyta tylko z obrazami surowym lub QCOW2."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "Offsety sÄ… dozwolone tylko z obrazami surowymi."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Tryb przesunięcia jest dozwolony tylko z obrazami surowymi."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "Tryb przesunięcia wymaga trybu wszystkich danych."
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "sprawdzanie, czy zamontowany"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Uruchamianie e2image na systemie plików zamontowanym do odczytu i zapisu\n"
+"może spowodować, że obraz będzie niespójny, przez co nie będzie przydatny\n"
+"do celów diagnostycznych. Aby na pewno to zrobić, można użyć opcji -f.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "Obrazu QCOW2 nie można zapisać na standardowe wyjście!\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "Nie można wykonać stat na wyjściu\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Obraz (%s) jest skompresowany\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Obraz (%s) jest zaszyfrowany\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Obraz (%s) jest uszkodzony\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "podczas próby przekształcenia obrazu qcow2 (%s) na obraz surowy (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "Opcja -c jest obsługiwana tylko w trybie surowym\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Opcja -c nie jest obsługiwana przy zapisie na standardowe wyjscie\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "podczas przydzielania check_buf"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "Opcja -p jest obsługiwana tylko w trybie surowym\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d bloków już zawierało dane do skopiowania\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Składnia: %s -r urządzenie\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: nie można otworzyć %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: nie można przejść do superbloku\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: błąd podczas odczytu superbloku\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: to nie jest system plików ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Uwaga: etykieta za długa, skrócono.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: nie można przejść ponownie do superbloku\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: błąd podczas zapisu superbloku\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Składnia: e2label urządzenie [nowa-etykieta]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Składnia: %s [-f] [-h] [-n] [-o offset] [-v] [-z plik_undo] <plik_transakcji> <system_plików>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Superblok systemu plików nie pasuje do pliku undo.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "UUID siÄ™ nie zgadza.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Czas ostatniego montowania siÄ™ nie zgadza.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Czas ostatniego zapisu siÄ™ nie zgadza.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Licznik zapisu czasu życia się nie zgadza.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "podczas odczytu superbloku systemu plików."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "podczas pobierania superbloku"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Suma kontrolna superbloku pliku undo nie zgadza siÄ™.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "Błędny offset - %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Nie będzie zapisu do pliku undo podczas odtwarzania go.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "podczas otwierania pliku undo `%s'\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "podczas odczytu pliku undo"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: To nie jest plik undo.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Suma kontrolna nagłówka się nie zgadza.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Uszkodzony nagłówek pliku undo.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Rozmiar bloku undo zbyt duży.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Rozmiar bloku undo zbyt mały.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Nieznany zbiór właściwości pliku undo.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "BÅ‚Ä…d podczas sprawdzania, czy %s jest zamontowany."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo powinno być uruchamiane tylko na odmontowanych systemach plików"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "podczas otwierania `%s'"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "podany offset jest zbyt duży"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "podczas odczytu kluczy"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: błędna wartość magiczna klucza pod %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: błąd sumy kontrolnej klucza pod %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: blok %llu jest zbyt długi."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "podczas pobierania bloku %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "błąd sumy kontrolnej w bloku systemu plików %llu (blok undo %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "podczas zapisu bloku %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Uszkodzenie pliku undo; proszę TERAZ uruchomić e2fsck!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "Błąd we/wy podczas odtwarzania: proszę TERAZ uruchomić e2fsck!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Niekompletny rekord undo; proszę uruchomić e2fsc.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Składnia findsuper urządzenie [krok [startkb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "krok powinien być liczbą, a nie %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "krok musi być wielokrotnością rozmiaru sektora\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "startkb powinno być liczbą, a nie %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "startkb powinno być dodatnie, a nie %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "rozpoczęcie od %llu, z przyrostami co %u B\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] prawdopodobnie superblok zapisano w superbloku kroniki ext3,\n"
+"\twięc będzie błędny początek/koniec/grp\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "offset_b pocz_b koniec_b bloki_fs rozmb grp mkfs/czas_mont sb_uuid etykieta\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: zakończono z errno %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "UWAGA: nie można otworzyć %s: %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "UWAGA: zły format w linii %d pliku %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"UWAGA: /etc/fstab nie zawiera pola passno dla fsck.\n"
+"Pominę ten błąd, ale /etc/fstab należy jak najszybciej poprawić.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: nie znaleziono\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: Nie ma więcej procesów potomnych?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Uwaga... %s dla urządzenia %s zakończył się sygnałem %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: status wynosi %x, to się nie powinno nigdy zdarzyć.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Skończono z %s (status wyjścia %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: BÅ‚Ä…d %d podczas wykonywania fsck.%s dla %s\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Albo wszystkie, albo żaden rodzaj systemu plików z podanych po -t musi być\n"
+"poprzedzony 'no' lub '!'.\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Nie można przydzielić pamięci na rodzaje systemów plików\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: pominięto błędną linię w /etc/fstab: montowanie bind z niezerowym numerem przebiegu fsck\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: nie można sprawdzić %s: fsck.%s nie znaleziony\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Sprawdzanie wszystkich systemów plików.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--oczekiwanie-- (przebieg %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Składnia: fsck [-AMNPRTV] [ -C [ deskryptor ] ] [-t rodzaj-fs] [opcje-fs] [system-plików ...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: za dużo urządzeń\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: za dużo parametrów\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Montowanie tylko do odczytu.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Zezwolenie użytkownikom na przydzielenie wszystkich bloków. To niebezpieczne!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Proszę uruchomić e2fsck -fy %s.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: montowanie tylko do odczytu bez odtwarzania kroniki\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Kronika wymaga odtworzenia; wymagane uruchomienie `e2fsck -E journal_only'.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: Zapis do kroniki nie jest obsługiwany.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Uwaga: Montowanie nie sprawdzonego systemu plików, zalecane jest uruchomienie e2fsck.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Uwaga: Osiągnięto maksymalną liczbę montowań, zalecane jest uruchomienie e2fsck.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Uwaga: Osiągnięto czas sprawdzenia; zalecane jest uruchomienie e2fsck.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Wykryto sieroty; zalecane jest uruchomienie e2fsck.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Wykryto błędy; konieczne jest uruchomienie e2fsck.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Składnia: %s [-RVadlpv] [pliki...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Podczas odczytu flag %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Podczas odczytu projektu %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Podczas odczytu wersji %s"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Nie można przydzielić zmiennej path w lsattr_dir_proc\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Składnia: %s [-c|-l nazwa-pliku] [-b rozm.bloku] [-C rozm.klastra]\n"
+"\t[-i bajtów-na-i-węzeł] [-I rozm-i-węzła] [-J opcje-kroniki]\n"
+"\t[-G rozmiar-grupy-flex] [-N liczba-i-węzłów] [-d katalog-główny]\n"
+"\t[-m procent-rezerw.-bloków] [-o os-twórcy]\n"
+"\t[-g bloków-w-grupie] [-L etykieta-wolumenu] [-M ost.-mont.-katalog]\n"
+"\t[-O właściwość[,...]] [-r wersja-fs] [-E opcja-rozszerzona[,...]]\n"
+"\t[-t typ-fs] [-T typ-użycia] [-U UUID] [-e traktowanie_błędów]\n"
+"\t[-z plik_undo] [-jnqvDFSV] urządzenie [liczba-bloków]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Uruchamianie polecenia: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "podczas próby uruchomienia '%s'"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "podczas przetwarzania listy wadliwych bloków z programu"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Wadliwy blok %d w głównym superbloku/obszarze deskryptora grup.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Bloki od %u do %u muszą być dobre, aby stworzyć system plików.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Przerwano...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Uwaga: zapasowy superblok/deskryptory grup w bloku %u zawierajÄ…\n"
+"\twadliwe bloki.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "podczas zaznaczania wadliwych bloków jako używane"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "podczas zapisu zarezerwowanych i-węzłów"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Zapis tablicy i-węzłów: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Nie udało się zapisać %d bloków w tablicy i-węzłów począwszy od %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "zakończono \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "podczas tworzenia głównego katalogu"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "podczas odczytu głównego i-węzła"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "podczas ustawiania właściciela głównego i-węzła"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "podczas tworzenia /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "podczas szukania /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "podczas rozszerzania /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "podczas ustawiania i-węzła wadliwych bloków"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Brak pamięci podczas czyszczenia sektorów %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Uwaga: nie można odczytać bloku 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Uwaga: nie można wyczyścić sektora %d: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "podczas dzielenia rozmiaru kroniki"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "podczas inicjowania superbloku kroniki"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Zerowanie urzÄ…dzenia kroniki: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "podczas zerowania urzÄ…dzenia kroniki (blok %llu, liczba %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "podczas zapisu superbloku kroniki"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Tworzenie systemu plików o %llu blokach %dk oraz %u i-węzłach\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"uwaga: %llu bloków nie używanych.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Etykieta systemu plików=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Typ OS: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Rozmiar bloku=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Rozmiar klastra=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Rozmiar fragmentu=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u bloków, szerokość Stripe=%u bloków\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u i-węzłów, %llu bloków\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu bloków (%2.2f%%) zarezerwowanych dla superużytkownika\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Pierwszy blok danych=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Właściciel głównego katalogu=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maksymalna liczba bloków systemu plików=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grup bloków\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grupa bloków\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u bloków w grupie, %u klastrów w grupie\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u bloków w grupie, %u fragmentów w grupie\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u i-węzłów w grupie\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID systemu plików: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Kopie zapasowe superbloku zapisane w blokach: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s wymaga '-O 64bit'\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "'%s' musi być przed 'resize=%u'\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Błędny desc_size: '%s'\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Błędny zarodek haszowania: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Błędny offset: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Błędny okres uaktualniania mmp: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Błędna liczba kopii zapasowych superbloku: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Błędny parametr stride: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Błędny parametr stripe-width: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Błędny parametr resize: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Maksymalny rozmiar (resize) musi być większy od rozmiaru systemu plików.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Zmiana rozmiaru w locie nie jest obsługiwana przez systemy plików w wersji 0\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Błędny root_owner: '%s'\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Błędne kodowanie: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Podano błędne opcje: %s\n"
+"\n"
+"Opcje rozszerzone są oddzielane przecinkami i mogą przyjmować parametr,\n"
+"\tktóry jest ustawiany znakiem równości ('=').\n"
+"\n"
+"Poprawne opcje rozszerzone to:\n"
+"\tmmp_update_interval=<przedział>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<rozmiar porcji danych RAID na dysku w blokach>\n"
+"\tstripe-width=<RAID stride * liczba dysków danych w blokach>\n"
+"\toffset=<przesunięcie systemu plików do utworzenia>\n"
+"\tresize=<maksymalny rozmiar powiększenia w blokach>\n"
+"\tpacked_meta_blocks=<0 aby wyłączyć, 1 aby włączyć>\n"
+"\tlazy_itable_init=<0 aby wyłączyć, 1 aby włączyć>\n"
+"\tlazy_journal_init=<0 aby wyłączyć, 1 aby włączyć>\n"
+"\troot_owner=<uid katalogu głównego>:<gid katalogu głównego>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<kodowanie>\n"
+"\tencoding_flags=<flagi>\n"
+"\tquotatype=<rodzaj(e) limitów do włączenia>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Uwaga: RAID stripe-width %u nie jest parzystą wielokrotnością stride %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "błąd: Błędna flaga kodowania: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "błąd: W przypadku podawania flag kodowania trzeba podać bezpośrednio kodowanie\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Błąd składni w pliku konfiguracyjnym mke2fs (%s, linia %d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ustawiona błędna opcja systemu plików: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ustawiona błędna opcja montowania: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Uwaga! Plik mke2fs.conf nie określa typu systemu plików %s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Prawdopodobnie trzeba zainstalować uaktualniony plik mke2fs.conf.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Przerwano...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Uwaga: typ systemu plików %s nie jest zdefiniowany w mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Nie udało się przydzielić pamięci na nową PATH\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Nie udało się poprawnie zainicjować profilu (błąd: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "błędny rozmiar bloku - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Uwaga: rozmiar bloku %d nie używalny na większości systemów.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "błędny rozmiar klastra - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "'-%' jest przestarzałe, zamiast niego należy używać '-E'"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "błędne traktowanie błędów - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Błędna liczba bloków w grupie"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "liczba bloków w grupie musi być wielokrotnością 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Niedopuszczalny rozmiar flex_bg"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "rozmiar flex_bg musi być potęgą 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "rozmiar flex_bg (%lu) musi być mniejszy lub równy 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "błędny stosunek i-węzłów %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "błędny rozmiar i-węzła - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Uwaga: opcja -K jest przestarzała i nie powinna już być używana. Zamiast niej należy użyć opcji rozszerzonej '-E nodiscard'.\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "w malloc dla bad_blocks_filename"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Uwaga: etykieta za długa; zostanie skrócona do '%s'\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "błędny procent zarezerwowanych bloków - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "błędna liczba i-węzłów - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "podczas przydzielania łańcucha fs_feature"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "błędny poziom wersji - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "tpodczas próby utworzenia rewizji %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "Opcja -t może być użyta tylko raz"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "Opcja -T może być użyta tylko raz"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "podczas próby otwarcia urządzenia kroniki %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Rozmiar bloku urzÄ…dzenia z kronikÄ… (%d) mniejszy od minimalnego %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Użycie rozmiaru bloku urządzenia kroniki: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "błędna liczba bloków '%s' na urządzeniu '%s'"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "system plików"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Plik %s nie istnieje i nie podano rozmiaru.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Tworzenie zwykłego pliku %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "podczas próby określenia rozmiaru systemu plików"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Nie można określić rozmiaru urządzenia; rozmiar systemu\n"
+"plików musi być podany\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Odczytany rozmiar urządzenia wynosi zero. Podano błędną partycję\n"
+"\tlub tablica partycji nie była odczytana ponownie po uruchomieniu\n"
+"\tfdiska z powodu zajętej modyfikowanej partycji. Ponowny odczyt\n"
+"\ttablicy partycji może wymagać rebootu.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "System plików większy od widocznego rozmiaru urządzenia."
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "Nie udało się przeanalizować listy typów systemów plików\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "HURD nie obsługuje właściwości filetype.\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "HURD nie obsługuje właściwości huge_file.\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "HURD nie obsługuje właściwości metadata_csum.\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "HURD nie obsługuje właściwości ea_inode.\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "podczas próby określenia rozmiaru sprzętowego sektora"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "podczas próby określenia rozmiaru sektora fizycznego"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "podczas ustawiania rozmiaru bloku; zbyt mały dla urządzenia\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Uwaga: podany rozmiar bloku %d jest mniejszy niż rozmiar sektora fizycznego %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Rozmiar urządzenia (0x%llx bloków) %s jest zbyt duży, aby wyrazić go\n"
+"\tw 32 bitach przy użyciu rozmiaru bloku %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Rozmiar urządzenia (0x%llx bloków) %s jest zbyt duży, aby utworzyć\n"
+"\tsystem plików przy użyciu rozmiaru bloku %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "Rozwinięcie fs_types dla mke2fs.conf: "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Właściwości systemu plików nie obsługiwane przez systemy plików w wersji 0\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Rzadkie superbloki nie są obsługiwane przez systemy plików w wersji 0\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Kroniki nie są obsługiwane przez systemy plików w wersji 0\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "błędny procent zarezerwowanych bloków - %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "Ekstenty MUSZĄ być włączone dla 64-bitowego systemu plików. Aby to poprawić, należy przekazać -O extents.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Rozmiar klastra nie może być mniejszy niż rozmiar bloku.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "określenie rozmiaru klastra wymaga własności bigalloc"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "uwaga: nie udało się odczytać geometrii urządzenia dla %s\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Wyrównanie %s jest przesunięte o %lu bajtów.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Może to powodować bardzo niską wydajność, zalecane jest (prze)partycjonowanie.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s obsługuje DAX, ale bieżący rozmiar bloku %u jest inny niż rozmiar strony systemowej %u, więc system plików nie będzie obsługiwał DAX.\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d-bajtowe bloki są zbyt duże dla systemu (max %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "Uwaga: %d-bajtowe bloki są zbyt duże dla systemu (max %d), wymuszono kontynuację\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Sugestia: jądro Linuksa >= 3.18 daje lepszą stabilność metadanych oraz sumy kontrolne kroniki.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Nieznane kodowanie nazw plików z profilu: %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Nieznane flagi kodowania z profilu: %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Uwaga: offset podany bez jawnego rozmiaru systemu plików.\n"
+"Tworzenie systemu plików o %llu blokach, ale być może nie o to chodziło.\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "i-węzły %d-bajtowe są zbyt małe dla limitów projektu"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Obsługa własności bigalloc jest niemożliwa bez własności extents"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Właściwości resize_inode i meta_bg nie są kompatybilne.\n"
+"Nie można ich włączyć jednocześnie.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"Uwaga: systemy plików bigalloc z rozmiarem klastra większym niż\n"
+"16-krotność rozmiaru bloku są eksperymentalne\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "zarezerwowane bloki do zmiany rozmiaru w locie nie obsługiwane na nieciągłym systemie plików"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "liczba bloków w grupie spoza zakresu"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Właściwość flex_bg nie jest włączona, więc nie można określić rozmiaru flex_bg"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "błędny rozmiar i-węzła %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "i-węzły %d-bajtowe są zbyt małe dla danych wewnętrznych; proszę podać większy rozmiar"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "i-węzły 128-bajtowe nie mogą obsłużyć dat powyżej 2038 i są przestarzałe\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "zbyt dużo i-węzłów (%llu), zwiększyć współczynnik i-węzłów?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "zbyt dużo i-węzłów (%llu), należy podać < 2^32"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"rozm_iwęzła (%u) * liczba_iwęzłów (%u) zbyt duże dla systemu\n"
+"\tplików o liczbie bloków %llu, należy podać większy współczynnik (-i)\n"
+"\tlub mniejszą liczbę i-węzłów (-N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Porzucanie bloków urządzenia: "
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "nie powiodło się - "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "podczas inicjowania kontekstu limitów"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "podczas zapisu i-węzłów limitów"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "błędne traktowanie błędów w profilu - %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "w malloc dla android_sparse_params"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "podczas ustawiania superbloku"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Ekstenty nie są włączone. Drzewo ekstenów plików może mieć sumy kontrolne, a mapy bloków nie. Niewłączenie ekstentów zmniejsza pokrycie sum kontrolnych metadanych. Aby to poprawić, należy dodać opcję -O extents.\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Obsługa 64-bitowego systemu plików nie jest włączona. Większe pola dostarczane przez tę właściwość pozwalają na silniejsze sumy kontrolne. Aby to poprawić, należy dodać opcję -O 64bit.\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Właściwość metadata_csum_seed wymaga właściwości metadata_csum.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "Czyszczenie się powiodło i będzie zwracać zera - pominięto czyszczenie tablicy i-węzłów\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "nieznany os - %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Przydzielanie tablicy grup: "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "podczas próby przydzielenia tablic systemu plików"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "podczas usuwania zaznaczenia wadliwych bloków"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tpodczas próby przekształcenia bitmapy podklastrów"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "podczas obliczania narzutu"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s może być bardziej uszkodzony poprzez nadpisanie superbloku\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "podczas zerowania bloku %llu na końcu systemu plików"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "podczas rezerwowania bloków na zmianę rozmiaru w locie"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "kronika"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Dodano kronikÄ™ do urzÄ…dzenia %s: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tpodczas próby dodania kroniki do urządzenia %s"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "wykonano\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Pominięto tworzenie kroniki w trybie super-only\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Tworzenie kroniki (%u bloków): "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tpodczas próby utworzenia kroniki"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Błąd podczas włączania funkcji zabezpieczenia przed wielokrotnym montowaniem."
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Zabezpieczenie przed wielokrotnym montowaniem jest włączone z okresem uaktualniania %d sekund.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "Kopiowanie plików na urzędzenie: "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "podczas zapełniania systemu plików"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Zapis superbloków i podsumowania systemu plików: "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "podczas zapisu i zamykania systemu plików"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"wykonano\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "podczas zerowania bloku %llu dla dużego pliku"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Przesunięcie partycji w blokach %llu (%uk) nie jest zgodne z rozmiarem klastra %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Duże pliki będą wyzerowane\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Tworzenie dużych plików w liczbie %lu "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "mających po %llu blok(ów)"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "podczas tworzenia dużego pliku %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Składnia: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Składnia: %s urządzenie...\n"
+"\n"
+"Wypisanie informacji o partycjach na każdym podanym urządzeniu.\n"
+"Przykład: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Nie można otworzyć %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Nie można pobrać geometrii %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Nie można pobrać rozmiaru %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d poczÄ…tek=%8d rozmiar=%8lu koniec=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Ta operacja wymaga świeżo sprawdzonego systemu plików.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Proszę uruchomić e2fsck -f na systemie plików.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Proszę uruchomić e2fsck -fD na systemie plików.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Składnia: %s [-c max_licznik_montowań] [-e trakt._błędów] [-f] [-g grupa]\n"
+"\t[-i odstęp[d|m|w]] [-j] [-J opcje_kroniki] [-l]\n"
+"\t[-m procent_rezerw._bloków] [-o [^]opcje_montowania[,...]]\n"
+"\t[-r liczba_zarez._bloków] [-u użytkownik] [-C licznik_montowań]\n"
+"\t[-L etykieta_wolumenu] [-M ostatnio_mont._katalog]\n"
+"\t[-O [^]właściwość[,...]] [-Q opcje_limitów]\n"
+"\t[-E opcja_rozszerzona[,...]] [-T czas_ost._sprawdz.] [-U UUID]\n"
+"\t[-I nowy_rozmiar_i-węzła] [-z plik_undo] urządzenie\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Nie znaleziono superbloku kroniki!\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "podczas próby otworzenia zewnętrznej kroniki"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s nie jest urzÄ…dzeniem kroniki.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Superblok kroniki jest uszkodzony, nr_users\n"
+"jest zbyt duże (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID systemu plików nie znaleziony na urządzeniu kroniki.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Nie można zlokalizować urządzenia kroniki. NIE zostało usunięte.\n"
+"Można użyć opcji -f, aby usunąć nieistniejące urządzenie kroniki.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Kronika usunięta\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "podczas odczytu bitmap"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "podczas czyszczenia i-węzła kroniki"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "podczas zapisu i-węzła kroniki"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(proszę zrestartować potem system!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Po uruchomieniu e2fsck proszę uruchomić `resize2fs %s %s"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Proszę uruchomić `resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "', aby włączyć tryb 64-bitowy.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "', aby wyłączyć tryb 64-bitowy.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"UWAGA: nie udało się upewnić co do obsługi właściwości metadata_csum_seed w jądrze.\n"
+" Wymaga to Linuksa w wersji >= 4.4.\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Usuwanie właściwości systemu plików '%s' nie jest obsługiwane.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Ustawianie właściwości systemu plików '%s' nie jest obsługiwane.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Flaga has_journal może być wyczyszczona tylko kiedy system plików\n"
+"jest odmontowany lub zamontowany tylko do odczytu.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Flaga needs_recovery jest ustawiona. Proszę uruchomić e2fsck przed\n"
+"czyszczeniem flagi has_journal.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Ustawienie właściwości systemu plików 'sparse_super' nie jest obsługiwane\n"
+"dla systemów plików z włączoną właściwością meta_bg.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Funkcja ochrony przed wielokrotnym montowaniem nie może zostać\n"
+"włączona, jeśli system plików jest zamontowany lub tylko do odczytu.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Zavezpieczenie przed wielokrotnym montowaniem została włączona z czasem uaktualniania %ds.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"Funkcja zabezpieczenia przed wielokrotnym montowaniem nie może zostać\n"
+"wyłączona, jeśli system plików jest tylko do odczytu.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "BÅ‚Ä…d podczas odczytu bitmap\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Liczba magiczna w bloku MMP siÄ™ nie zgadza; oczekiwano %x, jest %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "podczas odczytu bloku MMP."
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Wyłączenie indeksów katalogów w systemie plików z sumami kontrolnymi może zająć trochę czasu."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Nie można wyłączyć właściwości dir_index na zamontowanym systemie plików!\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr "Wyłączenie flagi flex_bg spowoduje niespójność systemu plików.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Flaga huge_file może być wyczyszczona tylko kiedy system plików\n"
+"jest odmontowany lub zamontowany tylko do odczytu.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Włączenie sum kontrolnych może zająć trochę czasu."
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Nie można włączyć właściwości metadata_csum na zamontowanym systemie plików!\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Ekstenty nie są włączone. Drzewo ekstenów plików może mieć sumy kontrolne, a mapy bloków nie. Niewłączenie ekstentów zmniejsza pokrycie sum kontrolnych metadanych. Aby to poprawić, należy uruchomić ponownie z opcją -O extents.\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Obsługa 64-bitowego systemu plików nie jest włączona. Większe pola dostarczane przez tę właściwość pozwalają na silniejsze sumy kontrolne. Aby to poprawić, należy uruchomić resize2fs -b.\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "Wyłączenie sum kontrolnych może zająć trochę czasu."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Nie można wyłączyć właściwości metadata_csum na zamontowanym systemie plików!\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Nie można włączyć właściwości uninit_bg na zamontowanym systemie plików!\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Nie można wyłączyć właściwości uninit_bg na zamontowanym systemie plików!\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Nie można włączyć trybu 64-bitowego, kiedy system plików jest zamontowany!\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Nie można wyłączyć trybu 64-bitowego, kiedy system plików jest zamontowany!\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Nie można włączyć właściwości project; rozmiar i-węzła zbyt mały.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Uwaga: opcja '^quota' nadpisuje argumenty '-Q'.\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "Właściwość casefold można włączyć tylko na niezamontowanym systemie plików.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Ustawienie właściwości 'metadata_csum_seed' jest obsługiwane\n"
+"tylko dla systemów plików z włączoną właściwością metadata_csum.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"UUID zmienił się od czasu włączenia właściwości metadata_csum. System plików musi\n"
+"być odmontowany, aby bezpiecznie nadpisać wszystkie metadane, żeby zgadzały\n"
+"siÄ™ z nowym UUID-em.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "Przeliczanie sum kontrolnych może zająć trochę czasu."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "System plików już ma kronikę.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tpodczas próby otworzenia kroniki na %s\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Tworzenie kroniki na urzÄ…dzeniu %s: "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "podczas dodawania systemu plików do kroniki na %s"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Tworzenie i-węzła kroniki: "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tpodczas próby utworzenia pliku kroniki"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Nie można włączyć limitów projektów; rozmiar i-węzła zbyt mały.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "podczas inicjowania kontekstu limitów w bibliotece wspierającej"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "podczas uaktualniania limitów (%d)"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "podczas zapisu pliku limitów (%d)"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "podczas usuwania pliku limitów (%d)"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Podano błędne opcje limitów.\n"
+"\n"
+"Dostępne są następujące opcje limitów (można je przekazywać oddzielone przecinkiem):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Nie można przeanalizować podanej daty/czasu: %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "błędna liczba montowań - %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "błędny gid/nazwa grupy - %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "błędny odstęp - %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "błędny procent zarezerwowanych bloków - %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "-o może być podane tylko raz"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "-O może być podane tylko raz"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "błędna liczba zarezerwowanych bloków - %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "błędny uid/nazwa użytkownika - %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "błędny rozmiar i-węzła - %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Rozmiar i-węzła musi być potęgą dwójki - %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "Okres uaktualniania mmp zbyt duży: %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Ustawianie okresu uaktualniania zabezpieczenia przed wielokrotnym montowaniem na %lu sekundÄ™\n"
+msgstr[1] "Ustawianie okresu uaktualniania zabezpieczenia przed wielokrotnym montowaniem na %lu sekundy\n"
+msgstr[2] "Ustawianie okresu uaktualniania zabezpieczenia przed wielokrotnym montowaniem na %lu sekund\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Ustawianie flagi błędu systemu plików w celu wymuszenia fsck.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Błędny parametr RAID stride: %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Błędny parametr RAID stripe-width: %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Błędny algorytm haszowania: %s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Ustawianie domyślnego algorytmu haszowania na %s (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Nie można zmienić istniejącego kodowania\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "Błędne kodowanie: %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "Ustawianie kodowania na '%s'\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "Ustawianie flag kodowania na '%s'\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Podano błędne opcje.\n"
+"\n"
+"Opcje rozszerzone są oddzielane przecinkami i mogą przyjmować parametr,\n"
+"\tktóry jest ustawiany znakiem równości ('=').\n"
+"\n"
+"Poprawne opcje rozszerzone to:\n"
+"\tclear_mmp\n"
+"\thash_alg=<algorytm haszowania>\n"
+"\tmount_opts=<rozszerzone domyślne opcje montowania>\n"
+"\tmmp_update_interval=<częśtotliwość uaktualniania mmp w sekundach>\n"
+"\tstride=<rozmiar porcji danych RAID na dysku w blokach>\n"
+"\tstripe_width=<RAID stride * liczba dysków danych w blokach>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<kodowanie>\n"
+"\tencoding_flags=<flagi>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "Nie udało się odczytać bitmapy i-węzłów\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "Nie udało się odczytać bitmapy bloków\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "bloki do przeniesienia"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Nie udało się przydzielić bitmapy bloków podczas zwiększania rozmiaru i-węzła\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "Za mało miejsca, aby zwiększyć rozmiar i-węzła\n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Nie udało się przemieścić bloków podczas zmiany rozmiaru i-węzła\n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Błąd podczas zmiany rozmiaru i-węzła.\n"
+"Należy uruchomić e2undo w celu wycofania zmian w systemie plików.\n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Jeśli system plików nie jest na pewno używany przez żaden system, można uruchomić:\n"
+"'tune2fs -f -E clear_mmp {urzÄ…dzenie}'\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Liczba magiczna bloku MMP jest błędna. Można próbować to naprawić uruchamiając:\n"
+"'e2fsck -f %s'\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "Nie można zmodyfikować urządzenia kroniki.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Rozmiar i-węzła już wynosi %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "Zmniejszanie rozmiaru i-węzła nie jest obsługiwane\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Błędny rozmiar i-węzła %lu (max %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Zmiana rozmiaru i-węzłów może zająć trochę czasu."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Uwaga: kronika nie jest czysta. Można odtworzyć kronikę poleceniem:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"a następnie uruchomić ponownie to polecenie. W innym przypadku wszelkie\n"
+"wykonane zmiany mogą zostać nadpisane przy odtwarzaniu kroniki.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Odtwarzanie kroniki.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Ustawianie maksymalnej liczby montowań na %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Ustawianie aktualnego licznika montowań na %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Ustawianie traktowania błędów na %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Ustawianie gid-a zarezerwowanych bloków na %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "odstęp pomiędzy sprawdzeniami jest zbyt duży (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Ustawianie odstępu pomiędzy sprawdzeniami na %lu sekund\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Ustawianie procentu zarezerwowanych bloków na %g%% (%llu bloków)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "liczba zarezerwowanych bloków jest zbyt duża (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Ustawianie liczby zarezerwowanych bloków na %llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"System plików już ma rzadkie superbloki.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Ustawienie flagi rzadkiego superbloku nie jest obsługiwane\n"
+"dla systemów plików z włączoną właściwością meta_bg.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Flaga rzadkich superbloków ustawiona. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Usuwanie flagi rzadkiego superbloku nie jest obsługiwane.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Ustawianie czasu ostatniego sprawdzenia systemu plików na %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Ustawianie uid-a zarezerwowanych bloków na %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Błąd w użyciu clear_mmp. Opcja ta musi być użyta z -f\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Funkcję limitów można zmienić tylko na niezamontowanym systemie plików.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Nie można zmienić UUID-a w tym systemie plików, ponieważ ma flagę właściwości stable_inodes.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Ustawienie UUID-a w tym systemie plików może zająć trochę czasu."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "UUID można zmienić tylko na niezamontowanym systemie plików.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Jeżeli używane są tylko jądra nowsze niż 4.4, można uruchomić 'tune2fs -O metadata_csum_seed', a następnie ponownie to polecenie.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Błędny format UUID-a\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Trzeba uaktualnić superblok kroniki.\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Rozmiar i-węzła można zmienić tylko na niezamontowanym systemie plików.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Zmiana rozmiaru i-węzła nie jest obsługiwana dla systemów plików\n"
+"z włączoną właściwością flex_bg.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Ustawianie rozmiaru i-węzła na %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "Nie udało się zmienić rozmiaru i-węzła\n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Ustawianie rozmiaru stride na %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Ustawianie szerokości stripe na na %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Ustawianie rozszerzonych domyślnych opcji montowania na '%s'\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<kontynuacja>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Kontynuować mimo to (lub odczekać %d s, aby kontynuować)? (t,N) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "Kontynuować mimo to? (t,N) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs wymuszone mimo to. Mam nadzieję, że /etc/mtab się myli.\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "nie zrobiÄ™ tutaj %s!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs wymuszone mimo to.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Nie można przydzielić pamięci na analizę opcji kroniki!\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Nie można znaleźć urządzenia kroniki pasującego do %s\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Podano błędne opcje kroniki.\n"
+"\n"
+"Opcje kroniki są oddzielane przecinkami i mogą przyjmować parametr,\n"
+"\tktóry ustawia się znakiem '='.\n"
+"\n"
+"Poprawne opcje kroniki to:\n"
+"\tsize=<rozmiar kroniki w megabajtach>\n"
+"\tdevice=<urzÄ…dzenie kroniki>\n"
+"\tlocation=<położenie kroniki>\n"
+"\n"
+"Rozmiar kroniki musi być pomiędzy 1024 a 10240000 blokami systemu plików.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"System plików za mały na kronikę\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Całkowity żądany rozmiar kroniki to %d bloków; musi być\n"
+"pomiędzy 1024 a 10240000 bloków. Przerwano.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Całkowity rozmiar kroniki zbyt duży dla systemu plików.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Ten system plików będzie automatycznie sprawdzany co każde %d montowań\n"
+"lub co %g dni, zależnie co nastąpi pierwsze. Można to zmienić poprzez\n"
+"tune2fs -c lub -i.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Składnia: %s [-d] [-p plik_pid] [-s ścieżka_gniazda] [-T limit_czasu]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n ile] [-s ścieżka_gniazda]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "błędne argumenty"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "Å‚Ä…czenie"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "zapis"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "odczyt liczby"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "błędna długość odpowiedzi"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "demon uuidd już działa z pidem %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Nie udało się utworzyć uniksowego gniazda strumieniowego: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Nie udało się podpiąć gniazda uniksowego %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Nie można nasłuchiwać na gnieździe uniksowym %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Błąd odczytu od klienta, długość = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operacja %d, liczba przychodzÄ…ca = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Wygenerowany UUID czasowy: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Wygenerowany UUID losowy: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Wygenerowany UUID czasowy %s i kolejny\n"
+msgstr[1] "Wygenerowany UUID czasowy %s i %d kolejne\n"
+msgstr[2] "Wygenerowany UUID czasowy %s i %d kolejnych\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Wygenerowano %d UUID-ów:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Błędna operacja %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Błędna liczba: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Błąd podczas wywołania demona uuidd (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s i kolejny UUID\n"
+msgstr[1] "%s i %d kolejne UUID-y\n"
+msgstr[2] "%s i %d kolejnych UUID-ów\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Lista UUID-ów:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Nieoczekiwana długość odpowiedzi serwera: %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Nie udało się zabić uuidd działającego z pidem %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Zapito uuidd działający z pidem %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Składnia: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Zrzut ekstentu:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNum=%llu, Rozmiar=%llu, Kursor=%llu, Sortowane=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Składnia: %s [-d flagi_śledzenia] [-f] [-F] [-M] [-P] [-p] urządzenie [-b|-s|nowy_rozm] [-S porcja-RAID] [-z plik_undo]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Rozszerzanie tablicy i-węzłów"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Relokowanie bloków"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Przeszukiwanie tablicy i-węzłów"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Uaktualnianie odwołań do i-węzłów"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Przenoszenie tablicy i-węzłów"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Nieznany przebieg?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "PoczÄ…tkowy przebieg %d (maksymalny = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Zmiana rozmiarów systemów plików bigalloc nie została jeszcze w pełni\n"
+"przetestowana. Kontynuacja tylko na własne ryzyko! Aby mimo wszystko\n"
+"to wykonać, należy użyć opcji force.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "podczas otwierania %s"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "podczas pobierania informacji stat dla %s"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Proszę uruchomić najpierw 'e2fsck -f %s'.\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Przybliżony minimalny rozmiar systemu plików: %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Błędny nowy rozmiar: %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Nowy rozmiar zbyt duży, by mógł być wyrażony w 32 bitach\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "Nowy rozmiar powoduje zbyt dużo deskryptorów grup bloków.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Nowy rozmiar jest mniejszy niż minimalny (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Błędna długość stride"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Partycja zawierająca (lub urządzenie) ma tylko %llu bloków (%dk).\n"
+"Zażądano nowego rozmiaru %llu bloków.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Nie można włączyć i wyłączyć właściwości 64bit.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Nie można zmienić właściwości 64bit w systemie plików większym niż 2^32 bloków.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Nie można zmienić właściwości 64bit, kiedy system plików jest zamontowany.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Proszę włączyć właściwość extents przy użyciu tune2fs przed włączeniem właściwości 64bit.\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"System plików już ma wielkość %llu (%dk) bloków. Nie ma nic do roboty!\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "System plików jest już 64-bitowy.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "System plików jest już 32-bitowy.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Nie można zmniejszyć tego systemu plików, ponieważ ma flagę właściwości stable_inodes.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Konwersja systemu plików na 64 bity.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Konwersja systemu plików na 32 bity.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Zmiana rozmiaru systemu plików %s na %llu (%dk) bloków.\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "podczas próby zmiany rozmiaru %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Proszę uruchomić 'e2fsck -fy %s', aby naprawić system plików\n"
+"po przerwanej operacji zmiany rozmiaru.\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"System plików na %s ma teraz %llu (%dk) bloków.\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "podczas próby skrócenia %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "jądro nie obsługuje zmiany rozmiaru w locie przy fladze sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "System plików %s jest zamontowany pod %s; wymagana zmiana rozmiaru w locie\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Zmniejszanie w locie nie jest obsługiwane"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "System plików nie obsługuje zmiany rozmiaru w locie"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Zbyt mało zarezerwowanych bloków gdt do zmiany rozmiaru"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Jądro nie obsługuje zmiany rozmiaru tak dużego systemu plików"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "podczas próby otwarcia punktu montowania %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Zażądano starego interfejsu resize.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Brak uprawnień do zmiany rozmiaru systemu plików"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Podczas sprawdzania obsługi zmiany rozmiaru w locie"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Jądro nie obsługuje zmiany rozmiaru w locie"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Wykonywanie zmiany rozmiaru w locie %s na %llu (%dk) bloków.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Podczas próby rozszerzenia ostatniej grupy"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Podczas próby dodania grupy #%d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "System plików na %s jest zamontowany pod %s, zmiana rozmiaru w locie nie jest obsługiwana na tym systemie.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "liczba i-węzłów (%llu) musi być mniejsza niż %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "zarezerwowane bloki"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "bloki metadanych"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "nowe bloki meta"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "To się nie powinno zdarzyć! Brak sb w ostatnim super_sparse bg?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "To się nie powinno zdarzyć! Nieoczekiwane old_desc w super_sparse bg?\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Nigdy się nie powinno zdarzyć: i-węzeł zmiany rozmiaru uszkodzony!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "Biblioteka EXT2FS w wersji 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Błędna liczba magiczna dla struktury ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Błędna liczba magiczna dla struktury badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Błędna liczba magiczna dla struktury badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Błędna liczba magiczna dla struktury inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Błędna liczba magiczna dla struktury io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Błędna liczba magiczna dla struktury io_channel typu unix"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Błędna liczba magiczna dla struktury io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Błędna liczba magiczna dla struktury block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Błędna liczba magiczna dla struktury inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Błędna liczba magiczna dla struktury generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Błędna liczba magiczna dla strukruty io_channel typu test"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Błędna liczba magiczna dla struktury listy bloków katalogu"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Błędna liczba magiczna dla struktury icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Błędna liczba magiczna dla struktury io_channel typu Powerquest"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Błędna liczba magiczna dla struktury pliku ext2"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Błędna liczba magiczna dla nagłówka obrazu ext2"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Błędna liczba magiczna dla struktury io_channel i-węzła"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Błędna liczba magiczna dla uchwytu ekstentu ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Błędna liczba magiczna w superbloku"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Wersja systemu plików zbyt duża"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Próba zapisu w systemie plików otwartym tylko do odczytu"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Nie można odczytać deskryptorów grup"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Nie można zapisać deskryptorów grup"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Uszkodzony deskryptor grupy: wadliwy blok bitmapy bloków"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Uszkodzony deskryptor grupy: wadliwy blok bitmapy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Uszkodzony deskryptor grupy: wadliwy blok tablicy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Nie można zapisać bitmapy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Nie można odczytać bitmapy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Nie można zapisać bitmapy bloków"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Nie można odczytać bitmapy bloków"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Nie można zapisać tablicy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Nie można odczytać tablicy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Nie można odczytać kolejnego i-węzła"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "System plików ma nieoczekiwany rozmiar bloku"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Katalog EXT2 uszkodzony"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Próba odczytu bloku z systemu plików zakończyła się skróconym odczytem"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Próba zapisu bloku w systemie plików zakończyła się skróconym zapisem"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Brak wolnego miejsca w katalogu"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Nie wczytano bitmapy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Nie wczytano bitmapy bloków"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Niedozwolona liczba i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Niedozwolona liczba bloków"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Błąd wewnętrzny w ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Za mało miejsca do zbudowania proponowanego systemu plików"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Niedozwolony numer bloku przekazany do ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Niedozwolony numer bloku przekazany do ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Niedozwolony numer bloku przekazany do ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Niedozwolony numer i-węzła przekazany do ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Niedozwolony numer i-węzła przekazany do ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Niedozwolony numer i-węzła przekazany do ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Próba sfałszowania końca bitmapy bloków za prawdziwym końcem"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Próba sfałszowania końca bitmapy i-węzłów za prawdziwym końcem"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Znaleziono niedozwolony blok pośredni"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Znaleziono niedozwolony blok podwójnie pośredni"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Znaleziono niedozwolony blok potrójnie pośredni"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Bitmapy bloków nie są takie same"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Bitmapy i-węzłów nie są takie same"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Niedozwolona lub źle zapisana nazwa urządzenia"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Grupa bloków nie ma tablicy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Superblok ext2 jest uszkodzony"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Niedozwolony numer bitu przekazany do ext2fs_mark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Niedozwolony numer bitu przekazany do ext2fs_unmark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Niedozwolony numer bitu przekazany do ext2fs_test_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Napotkano zbyt dużo dowiązań symbolicznych."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Funkcja wywołania zwrotnego nie obsłuży tego przypadku"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "I-węzeł pochodzący z wadliwego bloku w tablicy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "System plików ma włączone nie obsługiwane właściwości"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "System plików ma włączone nie obsługiwane właściwości tylko do odczytu"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Nie powiodło się przemieszczenie w kanał we/wy przy odczycie lub zapisie"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Przydzielenie pamięci nie powiodło się"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Przekazano błędny argument do biblioteki ext2"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Nie udało się przydzielić bloku w systemie plików ext2"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Nie udało się przydzielić i-węzła w systemie plików ext2"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "I-węzeł ext2 nie jest katalogiem"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Zbyt dużo odniesień w tablicy"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Nie znaleziono pliku w ext2_lookup"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Plik otwarty tylko do odczytu"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Nie znaleziono bloku katalogu ext2"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Katalog ext2 już istnieje"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Nie zaimplementowana funkcja biblioteki ext2"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Żądanie przerwania od użytkownika"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Plik ext2 zbyt duży"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Przekazane urzÄ…dzenie kroniki nie jest urzÄ…dzeniem blokowym"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Nie znaleziono superbloku kroniki"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Kronika musi mieć przynajmniej 1024 bloki"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Nie obsługiwana wersja kroniki"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Błąd podczas wczytywania zewnętrznej kroniki"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Nie znaleziono kroniki"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Nie obsługiwane haszowanie katalogu"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Błędny numer bloku atrybutu rozszerzonego"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Nie można utworzyć systemu plików o żądanej liczbie i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Migawka e2image nie jest w użyciu"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Zbyt dużo zarezerwowanych bloków deskryptorów grup"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "I-węzeł zmiany rozmiaru jest uszkodzony"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Próbowano ustawić bitmapę bloków z brakującym blokiem bezpośrednim"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: sukces"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: uszkodzona baza danych"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: błąd we/wy"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: błąd blokowania"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: brak pamięci"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: rekord istnieje"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: istnieje blokada na innych kluczach"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: błędny parametr"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: rekord nie istnieje"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: zapis niedozwolony"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Lista bloków katalogu ext2fs jest pusta"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Próba zmodyfikowania mapy bloków poprzez iterator bloków tylko do odczytu"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Błędna liczba magiczna ścieżki zachowanych ekstentów ext4"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Błędna liczba magiczna dla ogólnej bitmapy 64-bitowej"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Błędna liczba magiczna dla 64-bitowej bitmapy bloków"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Błędna liczba magiczna dla 64-bitowej bitmapy i-węzłów"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Błędna liczba magiczna --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Błędna liczba magiczna --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Błędna liczba magiczna --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Błędna liczba magiczna --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Błędna liczba magiczna --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Błędna liczba magiczna --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Błędna liczba magiczna --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Uszkodzony nagłówek ekstentu"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Uszkodzony indeks ekstentu"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Uszkodzony ekstent"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Brak wolnego miejsca w mapie ekstentów"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "I-węzeł nie wykorzystuje ekstentów"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Brak ekstentu następnego"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Brak ekstentu poprzedniego"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Brak ekstentu 'w górę'"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Brak ekstentu 'w dół'"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Brak bieżącego węzła"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Operacja ext2fs nie obsługiwana"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Brak miejsca na wstawienie ekstentu w węźle"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Podzielenie utworzyłoby pusty węzeł"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Nie znaleziono ekstentu"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Operacja nie obsługiwana dla i-węzłów zawierających ekstenty"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Błędna długość ekstentu"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "Kanał we/wy nie obsługuje 64-bitowych numerów bloków"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Nie można sprawdzić, czy system plików jest zamontowany z powodu braku pliku mtab"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "System plików zbyt duży, aby użyć bitmap starego typu"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: błędna liczba magiczna"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: urzÄ…dzenie obecnie aktywne"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: e2fsck jest uruchomiony"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: numer bloku poza zakresem systemu plików"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: wykonywana jest nieznana operacja"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: system plików nadal w użyciu"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: otwarcie z flagą O_DIRECT nie powiodło się"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Niepoprawny rozmiar deskryptora grupy bloków"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Suma kontrolna i-węzła nie zgadza się z i-węzłem"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Suma kontrolna bitmapy i-węzłów nie zgadza się z bitmapą"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Suma kontrolna bloku ekstentów nie zgadza się z blokiem ekstentów"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Blok katalogu nie ma miejsca na sumÄ™ kontrolnÄ…"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Suma kontrolna bloku katalogu nie zgadza siÄ™ z blokiem katalogu"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Sumar kontrolna bloku rozszerzonych atrybutów nie zgadza się z blokiem"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Suma kontrolna superbloku nie zgadza siÄ™ z superblokiem"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Nieznany algorytm sumy kontrolnej"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Suma kontrolna bloku MMP nie zgadza siÄ™"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Plik ext2 już istnieje"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Suma kontrolna bitmapy bloków nie zgadza się z bitmapą"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Nie można iterować po blokach danych i-węzła zawierającego dane wewnętrzne"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Rozszerzony atrybut ma błędną długość nazwy"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Rozszerzony atrybut ma błędną długość wartości"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Rozszerzony atrybut ma nieprawidłowy skrót"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Blok rozszerzonego atrybutu ma błędny nagłówek"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Nie znaleziono klucza rozszerzonego atrybutu"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Za mało miejsca na zapisanie danych rozszerzonego atrybutu"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "System plików nie ma właściwości ext_attr lub inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "I-węzeł nie zawiera danych wewnętrznych"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Brak bloku dla i-węzła z danymi wewnętrznymi"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Brak wolnego miejsca w danych wewnętrznych"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Błędna liczba magiczna dla struktury rozszerzonych atrybutów"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "I-węzeł zdaje się zawierać śmieci"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Rozszerzony atrybut ma błędny offset wartości"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Niespójne flagi kroniki"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Uszkodzony plik undo"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Niewłaściwy plik undo dla tego systemu plików"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "System plików jest uszkodzony"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Wykryto błędne CRC w systemie plików"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Superblok kroniki jest uszkodzony"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "I-węzeł jest uszkodzony"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "I-węzeł zawierający wartość rozszerzonego atrybutu jest uszkodzony"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Deskryptory grup nie załadowane"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "Wewnętrzna struktura danych ext2_filsys wydaje się uszkodzona"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "Znaleziono pętlę cykliczną w drzewie ekstentów"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Operacja nie obsługiwana na zewnętrznej kronice"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil w wersji 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Błędna wartość magiczna w profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Nie znaleziono sekcji profilu"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Nie znaleziono relacji profilu"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Próba dodania relacji do węzła, który nie jest sekcją"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Nagłówek sekcji profilu ma niezerową wartość"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Błędna lista w strukturach profilu"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Błędny poziom grupy w strukturach profilu"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Błędny wskaźnik rodzica w strukturach profilu"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Błędna wartość magiczna w iteratorze profilu"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Nie można ustawić wartości w węźle sekcji"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Błędny argument przekazany do biblioteki profilu"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Próba zmodyfikowania profilu tylko do odczytu"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Nagłówek sekcji profilu nie na najwyższym poziomie"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Błąd składni w nagłówku sekcji profilu"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Błąd składni w relacji profilu"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Nadmiarowy nawias zamykajÄ…cy w profilu"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "BrakujÄ…cy nawias otwierajÄ…cy w profilu"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Błędna wartość magiczna w profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Błędna wartość magiczna w profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Iterowanie poprzez wszystkie sekcje najwyższego poziomu nie jest obsługiwane"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Błędny obiekt profile_section"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Nie ma więcej sekcji"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Błędny nameset przekazany do funkcji odpytującej"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Brak otwartego pliku profilu"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Błędna wartość magiczna w profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Nie udało się otworzyć pliku profilu"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sekcja już istnieje"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Błędna wartość logiczna"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Błędna wartość całkowita"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Błędna wartość magiczna w profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tostatnio montowano %.*s pod %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tostatnio montowano %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tutworzono %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tostatnio zmodyfikowano %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Znaleziono tablicÄ™ partycji %s w %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Nie udało się otworzyć %s: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Urządzenie najwyraźniej nie istnieje; czy zostało podane poprawnie?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s nie jest specjalnym urzÄ…dzeniem blokowym.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s zawiera system plików %s z etykietą '%s'\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s zawiera system plików %s\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s zawiera dane `%s'\n"
diff --git a/po/pt.gmo b/po/pt.gmo
new file mode 100644
index 0000000..931592e
--- /dev/null
+++ b/po/pt.gmo
Binary files differ
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 0000000..78aa70c
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,8563 @@
+# E2fsprogs translation template file
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+# 2013, 2014, 2015, 2016, 2017, 2018 by Theodore Ts'o
+# This file is distributed under the same license as the e2fsprogs package.
+# Theodore Ts'o <tytso@mit.edu>, 2018.
+# Pedro Albuquerque <pmra@protonmail.com>, 2018, 2019, 2021.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.46.3\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2021-07-27 12:40-0400\n"
+"PO-Revision-Date: 2021-08-13 09:31+0100\n"
+"Last-Translator: Pedro Albuquerque <pmra@protonmail.com>\n"
+"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.3\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Mau bloco %u fora do intervalo; ignorado.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "ao verificar a sanidade de inodes de maus blocos"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "ao ler inodes de maus blocos"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1584
+#: e2fsck/unix.c:1698 misc/badblocks.c:1264 misc/badblocks.c:1272
+#: misc/badblocks.c:1286 misc/badblocks.c:1298 misc/dumpe2fs.c:437
+#: misc/dumpe2fs.c:702 misc/dumpe2fs.c:706 misc/e2image.c:1437
+#: misc/e2image.c:1635 misc/e2image.c:1656 misc/mke2fs.c:237
+#: misc/tune2fs.c:2886 misc/tune2fs.c:2986 resize/main.c:416
+#, c-format
+msgid "while trying to open %s"
+msgstr "ao tentar abrir %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "ao tentar popen \"%s\""
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "ao ler na lista de maus blocos a partir de ficheiro"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "ao actualizar inode de mau bloco"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Aviso: bloco %u ilegal encontrado em inode de mau bloco. Limpo.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "ao libertar ficheiro dir_info tdb"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Erro ao ler bloco %lu (%s) enquanto %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Erro ao ler bloco %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignorar erro"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Forçar reescrever"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Erro ao escrever bloco %lu (%s) enquanto %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Erro ao escrever bloco %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "dirblocks vazio"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "dir map vazio"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Bloco de pastas vazio %u (nº %d) em inode %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s nome de ficheiro nblocks tamanho de bloco\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Número ilegal de blocos!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Impossível alocar buffer do bloco (tamanho=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "estender reconstrução de mapa de inode"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Uso: %s disco\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "BLKFLSBUF ioctl não suportado! Impossível despejar os buffers.\n"
+
+#: e2fsck/journal.c:1270
+msgid "reading journal superblock\n"
+msgstr "ao ler super-bloco de diário\n"
+
+#: e2fsck/journal.c:1343
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: sem super-bloco de diário válido\n"
+
+#: e2fsck/journal.c:1352
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: diário muito curto\n"
+
+#: e2fsck/journal.c:1365
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: blocos de submissão rápida incorrectos\n"
+
+#: e2fsck/journal.c:1667 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: a recuperar diário\n"
+
+#: e2fsck/journal.c:1669
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: impossível recuperar diário em modo só-de-leitura\n"
+
+#: e2fsck/journal.c:1696
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "ao tentar reabrir %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aatributo estendido"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "AErro de alocação"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bbloco"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ccomprimir"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cconflitos com bloco de outro fs"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dpasta"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Deliminado"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eentrada"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "Eentrada '%Dn' em %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fsistema de ficheiros"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fpara inode %i (%Q) é"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrupo"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hpasta HTREE inode"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iilegal"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jdiário"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "lperdido+achado"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lé ligação"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mmultiplicar-reclamado"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "ninválido"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oorfanado"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblema em"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qquota"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rinode root"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sdevia ser"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuper-bloco"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "udesanexado"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vdispositivo"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xestender"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "ztamanho-zero"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<o inode NULL>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<o inode de maus blocos>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<o inode de quota do utilizador>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<o inode de quota do grupo>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<o inode do boot loader>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<o inode da pasta de recuperação>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<o inode de descritor de grupo>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<o inode de diário>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<inode 9 reservado>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<inode 10 reservado>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "ficheiro normal"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "pasta"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "dispositivo de carácter"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "dispositivo de bloco"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "túnel nomeado"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "ligação simbólica"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tipo de ficheiro desconhecido com modo 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "bloco indirecto"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "duplo bloco indirecto"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "triplo bloco indirecto"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "bloco de tradutor"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "bloco nº"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "utilizador"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "grupo"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "projecto"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "tipo de quota desconhecido"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "multiplicar mapa de inode reclamado"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "erro interno: impossível encontrar dup_blk para %llu\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "devolvido de clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "erro interno: impossível procurar registo de bloco EA para %llu"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "erro interno: impossível procurar registo de inode EA para %u"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "ao criar hash da entrada com e_value_inum = %u"
+
+#: e2fsck/pass1.c:767 e2fsck/pass2.c:1147
+msgid "reading directory block"
+msgstr "a ler bloco de pasta"
+
+#: e2fsck/pass1.c:1166
+msgid "getting next inode from scan"
+msgstr "a obter inode seguinte da análise"
+
+#: e2fsck/pass1.c:1218
+msgid "in-use inode map"
+msgstr "mapa de inode em-uso"
+
+#: e2fsck/pass1.c:1229
+msgid "directory inode map"
+msgstr "mapa de inode de pasta"
+
+#: e2fsck/pass1.c:1239
+msgid "regular file inode map"
+msgstr "mapa de inode de ficheiro normal"
+
+#: e2fsck/pass1.c:1248 misc/e2image.c:1289
+msgid "in-use block map"
+msgstr "mapa de bloco em-uso"
+
+#: e2fsck/pass1.c:1257
+msgid "metadata block map"
+msgstr "mapa de bloco de meta-dados"
+
+#: e2fsck/pass1.c:1268
+msgid "inode casefold map"
+msgstr "mapa de inode casefold"
+
+#: e2fsck/pass1.c:1333
+msgid "opening inode scan"
+msgstr "a abrir análise de inode"
+
+#: e2fsck/pass1.c:2101
+msgid "Pass 1"
+msgstr "Passagem 1"
+
+#: e2fsck/pass1.c:2162
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "a ler blocos indirectos de inode %u"
+
+#: e2fsck/pass1.c:2213
+msgid "bad inode map"
+msgstr "mau mapa de inode"
+
+#: e2fsck/pass1.c:2253
+msgid "inode in bad block map"
+msgstr "inode em mau mapa de bloco"
+
+#: e2fsck/pass1.c:2273
+msgid "imagic inode map"
+msgstr "mapa de inode imagic"
+
+#: e2fsck/pass1.c:2304
+msgid "multiply claimed block map"
+msgstr "multiplicar mapa de bloco reclamado"
+
+#: e2fsck/pass1.c:2429
+msgid "ext attr block map"
+msgstr "mapa de bloco de atributo estendido"
+
+#: e2fsck/pass1.c:3724
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): esperado %6lu, obtido phys %6lu (blkcnt %lld)\n"
+
+#: e2fsck/pass1.c:4145
+msgid "block bitmap"
+msgstr "bitmap de bloco"
+
+#: e2fsck/pass1.c:4151
+msgid "inode bitmap"
+msgstr "bitmap de inode"
+
+#: e2fsck/pass1.c:4157
+msgid "inode table"
+msgstr "tabela de inode"
+
+#: e2fsck/pass2.c:317
+msgid "Pass 2"
+msgstr "Passagem 2"
+
+#: e2fsck/pass2.c:568
+msgid "NLS is broken."
+msgstr "NLS está quebrado."
+
+#: e2fsck/pass2.c:1220 e2fsck/pass2.c:1404
+msgid "Can not continue."
+msgstr "Impossível continuar."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "bitmap de inode feito"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Memória pico"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Passagem 3"
+
+#: e2fsck/pass3.c:350
+msgid "inode loop detection bitmap"
+msgstr "bitmap de detecção de ciclos de inode"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Passagem 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Passagem 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: erro de alocação de memória"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: erro de alocação de memória"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(sem prompt)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Reparar"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Limpar"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Relocalizar"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Alocar"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Expandir"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Ligar a/perdido+achado"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Criar"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Salvar"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Truncar"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Limpar inode"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Abortar"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Dividir"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Continuar"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Clonar blocos multiplicar-reclamado"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Eliminar ficheiro"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Suprimir mensagens"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Desligar"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Limpar índice HTree"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Recriar"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Optimizar"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "Limpar bandeira"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(NADA)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "REPARADO"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "LIMPO"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "RELOCALIZADO"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "ALOCADO"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "EXPANDIDO"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "RELIGADO"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "CRIADO"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "SALVO"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "TRUNCADO"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INODE LIMPO"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "ABORTADO"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "DIVIDIDO"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "A CONTINUAR"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "BLOCOS MULTIPLICAR-RECLAMADO CLONADOS"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "FICHEIRO ELIMINADO"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "SUPRIMIDAS"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "DESLIGADO"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "ÃNDICE HTREE LIMPO"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "SERÃ RECRIADO"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "SERÃ OPTIMIZADO"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "BANDEIRA LIMPA"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "bitmap do bloco para o grupo %g não está no grupo. (bloco %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "Bitmap de inode para grupo %g não está em grupo. (bloco %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"tabela inode para grupo %g não está em grupo. (bloco %b)\n"
+"AVISO: POSSÃVEL PERDA SEVERA DE DADOS.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"O super-bloco não pôde ser lido ou não descreve um sistema ext2/ext3/ext4\n"
+"válido. Se o dispositivo é válido e realmente contém um sistema ext2/ext3/ext4\n"
+"(e não swap, ufs ou outra coisa), então o super-bloco está corrompido e\n"
+"pode tentar executar e2fsck com um super-bloco alternativo:\n"
+" e2fsck -b 8193 <dispositivo>\n"
+" ou\n"
+" e2fsck -b 32768 <dispositivo>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"O tamanho de sistema de ficheiros (de acordo com o super-bloco)\n"
+"é %b blocos. O tamanho físico do dispositivo é %c blocos.\n"
+"Ou o super-bloco ou a tabela de partições estão corrompidos!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"super-bloco block_size = %b, fragsize = %c.\n"
+"Esta versão do e2fsck não suporta tamanhos de fragmento diferentes\n"
+"do tamanho de bloco.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "super-bloco blocks_per_group = %b, devia ter sido %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "super-bloco first_data_block = %b, devia ter sido %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"sistema de ficheiros não tinha UUID; a gerar uma.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Nota: se vários blocos de inode ou bimap de bloco ou parte\n"
+"da tabela de inode requerem relocalização, poderá querer\n"
+"executar e2fsck com '-b %S' primeiro. O problema\n"
+"pode ser só com os descritores primários de grupos de blocos e\n"
+"os descritores de segurança dos grupos de blocos podem estar bons.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Encontrada corrupção em super-bloco (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Erro ao determinar o tamanho do dispositivo físico: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "total de inode no super-bloco é %i, devia ser %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "The Hurd não suporta a funcionalidade de tipo de ficheiro.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "super-bloco tem um diário inválido (inode %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Diário externo tem múltiplos utilizadores de sistema de ficheiros (não suportado).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Impossível encontrar diário externo\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Diário externo tem um mau super-bloco\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Diário externo não suporta este sistema de ficheiros\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Super-bloco de diário de sistema de ficheiros de tipo %N desconhecido (não suportado).\n"
+"É possível que a sua cópia do e2fsck seja antiga e/ou não suporte este formato de diário.\n"
+"Também é possível que o super-bloco de diário esteja corrompido.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Super-bloco de diário corrompido.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "Bandeira has_journal de super-bloco limpa, mas está presente um diário.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Bandeira needs_recovery de super-bloco definida, mas não há um diário presente.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "Bandeira needs_recovery de super-bloco limpa, mas o diário tem dados.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Diário limpo"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "Sistema de ficheiros tem bandeiras de funcionalidade definidas, mas é um sistema de ficheiros revisão 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "inode orfanado %s %i (uid=%Iu, gid=%Ig, modo=%Im, tamanho=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "%B (%b) ilegal encontrado em inode orfanado %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "%B (%b) já limpo encontrado em inode orfanado %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "inode orfanado %i ilegal em super-bloco.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "inode %i ilegal na lista de inode orfanados.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Super-bloco de diário tem uma bandeira só-de-leitura desconhecida definida.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Super-bloco de diário tem uma bandeira de incompatibilidade desconhecida definida.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Versão de diário não suportada por este e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"A mover diário de /%s para inode oculto.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Erro ao mover diário: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Encontrados campos de super-bloco V2 inválidos (de diário V1).\n"
+"A limpar campos além do super-bloco de diário V1...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Executar diário mesmo assim"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "Bandeira de recuperação não definida na segurança de super-bloco, a executar diário mesmo assim.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"A fazer segurança de diário da informação de bloco de inode.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"sistema de ficheiros não tem resize_inode activo, mas s_reserved_gdt_blocks\n"
+"é %N; devia ser zero. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode não activo, mas resize inode é não-zero. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Resize inode inválido. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"última hora de montagem do super-bloco (%t\n"
+"\t, agora = %T) está no futuro.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"última hora de escrita super-bloco (%t,\n"
+"\tagora = %T) está no futuro.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Dica de super-bloco para super-bloco externo devia ser %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"A adicionar dica dirhash a sistema de ficheiros.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "checksum de descritor de grupo %g é %04x, deveria ser %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "descritor de grupo %g marcado como inicializado sem conjunto de funcionalidades.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Descritor de grupo %g tem um total %b de inodes não utilizados. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Último bitmap de grupo de blocos não inicializados. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Transacção de diário %i estava corrompida, reprodução abortada.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "A bandeira test_fs está definida (e ext4 está disponível). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"última hora de montagem de super-bloco é no futuro.\n"
+"\t(por menos de um dia, provavelmente devido ao relógio do equipamento não estar certo)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"última hora de escrita de super-bloco é no futuro.\n"
+"\t(por menos de um dia, provavelmente devido ao relógio do equipamento não estar certo)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Uma ou mais checksums de descritores de grupo de blocos são inválidas. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "A definir total de inodes livres para %j (era %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "A definir total de blocos livres para %c (era %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "A ocultar quota %U de inode %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "Super-bloco tem um bloco MMP inválido. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "Super-bloco tem magia MMP inválida. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "metadata_csum suplanta uninit_bg; impossível definir ambos os bits em simultâneo."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "chcecksum de super-bloco MMP bloco não coincide. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "Sistema de ficheiros de super-bloco 64bit precisa de extents para aceder a todo o disco. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg é muito grande. (%N, valor máximo %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Checksum de super-bloco de diário externo não coincide com super-bloco. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "metadata_csum_seed não é necessário sem metadata_csum."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Erro ao inicializar contexto de quota em biblioteca de suporte: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Extra isize requerido errado em @S (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Extra isize desejado errado em @S (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "Quota %U de inode %i inválida. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "super-bloco teria demasiados inodes (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"As funcionalidades Resize_@i e meta_bg estão activas. Essas funcionalidades\n"
+"não são compatíveis. Deve desactivar Resize @i. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Passo 1: a verificar inodes, blocos e tamanhos\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "inode root não é pasta. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "inode root tem dtime definido (provavelmente devido a um mke2fs antigo). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "@i %i (%Q) reservado tem modo @n. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "inode %i eliminado tem dtime zero. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "inode %i está em uso, mas tem dtime definido. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "inode %i é pasta de tamanho zero. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "Bitmap de bloco de grupo %g em %b em conflito com outro bloco do sistema de ficheiros.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "Bitmap de inode de grupo %g em %b em conflito com outro bloco do sistema de ficheiros.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "tabela inode de grupo %g em %b em conflito com outro bloco do sistema de ficheiros.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "Bitmap de bloco de grupo %g (%b) está mau. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "Bitmap de inode de grupo %g (%b) está mau. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "inode %i, i_size é %Is, devia ser %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "inode %i, i_blocks é %Ib, devia ser %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "ilegal %B (%b) em inode %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) sobrepõe-se aos meta-dados do sistema de ficheiros em inode %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "inode %i tem blocos ilegais. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Demasiados blocos ilegais em inode %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "%B (%b) ilegal em mau inode de bloco. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Mau inode de bloco tem blocos ilegais. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Bloco duplicado ou mau em uso!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Mau bloco %b usado como mau bloco indirecto de inode de bloco. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"O mau inode de bloco foi provavelmente corrompido. Deverá\n"
+"parar agora e executar e2fsck -c para procurar maus blocos\n"
+"no sistema de ficheiros.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Se o bloco está realmente mau, o sistema de ficheiros não pode ser reparado.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Pode remover este bloco da lista de maus blocos e esperar\n"
+"que o bloco esteja realmente bom. Mas não há garantias.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "O super-bloco (%b) primário está na lista de maus blocos.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "O bloco %b nos descritores primários do grupo está na lista de maus blocos\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Aviso: o super-bloco (%b) do grupo %g está mau.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Aviso: a cópia dos descritores grupo do grupo %g tem um bloco (%b) mau.\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Erro de programação? Bloco nº %b reclamado sem razão em process_bad_block.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "Erro ao alocar %N bloco(s) contíguos no grupo de blocos %g para %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "Erro ao alocar o buffer de bloco para relocalizar %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "A relocalizar %s de grupo %g de %b para %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "A relocalizar grupo %g - %s para %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Aviso: impossível ler bloco %b de %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Aviso: impossível escrever bloco %b em %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "Erro ao alocar bitmap de inode (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "Erro ao alocar bitmap de bloco (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "Erro ao alocar informação de ligação icount: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "Erro ao alocar pasta de matriz de bloco: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Erro ao analisar inodes (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Erro ao iterar sobre blocos em inode %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Erro ao armazenar informação de total de inodes (inode=%i, total=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Erro ao armazenar informação de bloco de pasta (inode=%i, bloco=%b, núm=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Erro ao ler inode %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "inode %i tem bandeira imagic definida. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Ficheiro especial (dispositivo/socket/fifo/symlink) (inode %i) tem bandeira\n"
+"immuttable ou append-only definidas. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "@i %i especial (@v/socket/fifo) tem tamanho não-zero. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "inode de diário não está em uso, mas contém dados. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "o diário não é um ficheiro regular. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "inode %i fazia parte da lista de inodes orfanados. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "inodes que faziam parte de uma lista ligada orfanada corrompida. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "Erro ao alocar estrutura refcount (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Erro ao ler bloco %b de atributo estendido para inode %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "inode %i tem um mau bloco %b de atributo estendido. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Erro ao ler bloco %b de atributo estendido (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "bloco %b de atributo estendido tem total de referência %r, devia ser %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Erro ao escrever bloco %b de atributo estendido (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "bloco %b de atributo estendido tem h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "Erro ao alocar estrutura de alocação de região de atributo estendido. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "bloco %b de atributo estendido está corrompido (colisão de alocação). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "bloco %b de atributo estendido está corrompido (nome inválido). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "bloco %b de atributo estendido está corrompido (valor inválido). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "inode %i muito grande. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) faz com que a pasta seja muito grande. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) faz com que o ficheiro seja muito grande. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) faz com que a symlink seja muito grande. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "inode %i tem bandeira INDEX_FL definida em sistema de ficheiros sem suporte a htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "inode %i tem bandeira INDEX_FL definida mas não é uma pasta.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "pasta HTREE inode %i tem nó raiz inválido.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "pasta HTREE inode %i tem versãi hash não suportada (%N).\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "pasta HTREE inode %i usa uma bandeira de nó raiz htree incompatível.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "pasta HTREE inode %i tem uma profundidade de árvore (%N) muito grande\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Mau inode de bloco tem um bloco (%b) indirecto que conflitua com\n"
+"meta-dados do sistema de ficheiros. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Falha ao redimensionar (re)criação de inode: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "inode %i tem um tamanho extra (%IS) que é inválido\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "atributo estendido em inode %i tem um namelen (%N) que é inválido\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "atributo estendido em inode %i tem um desvio de valor (%N) que é inválido\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "atributo estendido em inode %i tem um bloco de valor (%N) que é inválido (tem de ser 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "atributo estendido em inode %i tem um tamanho de valor (%N) que é inválido\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "atributo estendido em inode %i tem uma hash (%N) que é inválida\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "inode %i é %It mas parece que é realmente uma pasta.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Erro ao ler sobre árvore estendida em inode %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Falha ao iterar extensões em inode %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"inode %i tem uma extensão inválida\n"
+"\t(bloco lógico %c, bloco físico %b inválido, tamanho %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"inode %i tem uma extensão inválida\n"
+"\t(bloco lógico %c, bloco físico %b, tamanho inválido %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "inode %i tem bandeira EXTENTS_FL definida em sistema de ficheiros sem suporte a extensões.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "inode %i está em formato de extensão, mas o super-bloco tem a funcionalidade EXTENTS em falta\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "inode %i com EXTENT_FL em falta, mas está em formato de extensão\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "symlink %i rápida tem EXTENT_FL definida. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"inode %i tem extensões fora de ordem\n"
+"\t(bloco lógico %c inválido, bloco físico %b, tamanho %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "inode %i tem um nó de extensão inválido (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Erro ao converter bitmap de bloco de sub-cluster: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "inode de quota não é um ficheiro normal. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "inode de quota não está em uso, mas contém dados. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "inode de quota é visível pelo utilizador. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "O inode de bloco mau parece inválido. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"inode %i tem extensão de tamanho zero\n"
+"\t(bloco lógico %c inválido, bloco físico %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "inode %i parece conter lixo. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "inode %i passa os testes, mas a checksum não corresponde a inode. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "atributo estendido de inode %i está corrompido (colisão de alocação). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"bloco estendido de inode %i passa os testes, mas a checksum não corresponde a extensão\n"
+"\t(bloco lógico %c, bloco físico %b, tamanho %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "bloco %b de atributo estendido de inode %i passa os testes, mas a checksum não corresponde ao bloco. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Nível de nó de extensão interior %N de inode %i:\n"
+"início lógico %b não corresponde ao início lógico %c no nível seguinte. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"inode %i, fim da extensão excede o valor permitido\n"
+"\t(bloco lógico %c, bloco físico %b, tamanho %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "inode %i tem dados em linha, mas o super-bloco tem a funcionalidade INLINE_DATA em falta\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "inode %i tem bandeira INLINE_DATA_FL em sistema de ficheiros sem suporte a dados em linha.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "inode %i bloco %b conflitua com meta-dados críticos, a saltar testes de bloco.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "bloco %b de inode %i de pasta devia estar em bloco %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "inode %i de pasta tem extensão marcada como não-inicializada no bloco %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"inode %i bloco lógico %b (bloco físico %c) viola as regras de alocação de cluster.\n"
+"Será reparado no passo 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "inode %i tem bandeira INLINE_DATA_FL mas não se encontrou atributo estendido. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Ficheiro especial (dispositivo/socket/fifo) (inode %i) tem extensões\n"
+"ou bandeira inline-data definida. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "inode %i tem cabeçalho de extensão mas a bandeira de dados em linha está definida.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "inode %i parece ter dados em linha, mas a bandeira de extensão está definida.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "inode %i parece ter mapa de bloco, mas as bandeiras de dados em linha e extensão estão definidas.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "inode %i tem as bandeiras de dados em linha e extensão definidas, mas i_block contém lixo.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "Lista de blocos maus diz que o inode da lista de blocos maus está mau. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "Erro ao alocar estrutura de alocação de região de extensão. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"inode %i tem mapeamento de extensão duplicado\n"
+"\t(bloco lógico %c, bloco físico %b inválido, tamanho %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "@A %N bytes de memória para lista de @i encriptada\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "árvore de extensões de inode %i podia ser mais rasa (%b; podia ser <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "inode %i em sistema de ficheiros bigalloc não pode ser mapeada em blocos. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "inode %i tem cabeçalho de extensão corrompido. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Carimbo(s) em inode %i além de 04-04-2310 são provavelmente pré-1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "inode %i tem valor de atributo estendido ilegal inode %N.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "inode %i tem atributo estendido inválido. inode EA %N com bandeira EA_INODE em falta.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"@i EA %N para @i-mãe %i com bandeira EA_INODE em falta.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "@i %i tem @x marcada não inicializada no @b %c (tam. %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "@i %i tem bandeira casefold definida mas não é uma pasta. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"a @d %p tem a bandeira casefold, mas a\n"
+"funcionalidade casefold não está activa. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "inode %i tem bandeira de encriptação, mas não tem atributo de encriptação estendido.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "inode %i encriptado tem o atributo de encriptação estendido corrompido.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "@h %i usa a versão hash (%N), mas devia usar SipHash (6) \n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "@h %i usa SipHash, mas não devia. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"A executar passos adicionais para resolver blocos reclamados por mais de um inode..\n"
+"Passo 1B: re-analisar blocos multiplicar-reclamados\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "blocos multiplicar-reclamados em inode %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Erro ao analisar inodes (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "Erro ao alocar bitmap de inode (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Erro ao iterar sobre blocos em inode %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Erro ao ajustar refcount para bloco %b de atributo estendido (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Passo 1C: analisar pastas para inodes com blocos multiplicar-reclamados\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Passo 1D: reconciliar blocos multiplicar-reclamados\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Ficheiro %Q (inode nº %i, hora de mod. %IM) \n"
+" tem %r bloco(s) multiplicar-reclamado(s), partilhados com %N ficheiro(s):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (inode nº %i, hora de mod. %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<meta-dados do sistema de ficheiros>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(há %N inodes contendo blocos multiplicar-reclamados.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"blocos multiplicar-reclamados já re-atribuídos ou clonados.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Impossível clonar o ficheiro: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Passo 1E: optimizar árvores de extensões\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Falha ao optimizar árvore de extensão %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Optimizar árvores de extensões: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Erro interno: profundidade máxima da árvore de extensões muito grande (%b; esperada=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "árvore de extensão de inode %i (no nível %b) podia ser mais curta. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "árvore de extensão de inode %i (no nível %b) podia ser mais estreita. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Passo 2: verificar estrutura de pastas\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "número de inode inválido para '.' em inode de pasta %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "Entrada \"%Dn\" em %p (%i) tem número de inode inválido: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "Entrada \"%Dn\" em %p (%i) tem inode %Di eliminado/não utilizado. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "Entrada \"%Dn\" em %p (%i) é ligação a '.' "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "Entrada \"%Dn\" em %p (%i) aponta para indode (%Di) localizado num mau bloco.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "Entrada \"%Dn\" em %p (%i) é ligação a pasta %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "Entrada \"%Dn\" em %p (%i) é ligação ao inode raiz.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "Entrada \"%Dn\" em %p (%i) tem caracteres ilegais no nome.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "'.' em falta em inode de pasta %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "'..' em falta em inode de pasta %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Primeira entrada '%Dn' (inode=%Di) em inode de pastai %i (%p) devia ser '.'\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Segunda entrada '%Dn' (inode=%Di) em inode de pasta %i devia ser '..'\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr para inode %i(%Q) é %IF, devia ser zero.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl para inode %i(%Q) é %If, devia ser zero.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high para inode %i(%Q) é %Id, devia zero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag para inode %i(%Q) é %N, devia ser zero.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize para inode %i(%Q) é %N, devia ser zero.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "inode %i (%Q) tem modo inválido (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "inode de pasta %i, %B, desvio %N: pasta corrompida\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "inode de pasta %i, %B, desvio %N: nome de ficheiro muito grande\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "inode de pasta %i tem %B não alocado. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "entrada de pasta '.' em inode de pasta %i não termina em NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "entrada de pasta '..' em inode de pasta %i não termina em NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "inode %i (%Q) é um dispositivo de carácter ilegal.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "inode %i (%Q) é um dispositivo de bloco ilegal.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) é entrada '.' duplicada.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) é entrada '..' duplicada.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Erro interno: impossível encontrar dir_info para %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) tem rec_len de %Dr, devia ser %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "Erro ao alocar estrutura icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Erro ao iterar sobre blocos de pasta: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Erro ao ler bloco de pasta %b (inode %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Erro ao escrever bloco de pasta %b (inode %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "Erro ao alocar novo bloco de pasta para inode %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Erro ao desalocar inode %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "Entrada de pasta para '.' em %p (%i) é grande.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "inode %i (%Q) é FIFO ilegal.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "inode %i (%Q) é um socket ilegal.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "A definir tipo de ficheiro para entrada \"%Dn\" em %p(%i) como %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "Entrada \"%Dn\" em %p(%i) tem um tipo de ficheiro incorrecto (era %Dt, devia ser %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) tem tipo de ficheiro definido.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) tem nome de tamanho zero.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symlink %Q (inode nº %i) é inválido.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "bloco de atributo estendido para inode %i(%Q) é inválido (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "o sistema de ficheiros contém ficheiros grandes, mas te bandeira LARGE_FILE em super-bloco.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "problema em pasta HTREE inode %d: %B não referenciado\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "problema em pasta HTREE inode %d: %B referenciado duas vezes\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "problema em pasta HTREE inode %d: %B tem hash mínima má\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "Problema em pasta HTREE inode %d: %B tem má hash máxima\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "Pasta HTREE inode %d (%q) inválida. "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "o sistema de ficheiros tem pastas grandes, malta-lhe a bandeira LARGE_DIR no superbloco.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "Problema em pasta HTREE inode %d (%q): mau número de bloco %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "Problema em pasta HTREE inode %d: nó raiz inválido\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "Problema em pasta HTREE inode %d: %B tem limite inválido (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "Problema em pasta HTREE inode %d: %B tem total inválido (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "Problema em pasta HTREE inode %d: %B tem tabela de hash desordenada\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "Problema em pasta HTREE inode %d: %B tem profundidade inválida (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Encontrada entrada \"%Dn\" em %p (%i) duplicada. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"Entrada \"%Dn\" em %p (%i) com nome de ficheiro não único.\n"
+"Renomear para %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Encontrada entrada '%Dn' duplicada.\n"
+"\tA marcar %p (%i) para reconstrução.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi para inode %i(%Q) é %N, devia ser zero.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Bloco inesperado em pasta HTREE inode %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) referencia inode %Di em grupo %g onde _INODE_UNINIT está definida.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) referencia inode %Di encontrado na área de inodes não usados do grupo %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi para inode %i(%Q) é %N, devia ser zero.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "Problema em pasta HTREE inode %d: nó raiz falha a checksum.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "Problema em pasta HTREE inode %d: nó interno falha a checksum.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "inode de pasta %i, %B, desvio %N: pasta sem checksum.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "inode de pasta %i, %B: a pasta passa os testes mas falha a checksum.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "O tamanho do inode de pasta %i em linha (%N) tem de ser múltiplo de 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Falha ao reparar o tamanho do inode de pasta %i em linha.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Entrada \"%Dn\" em %p(%i) encriptada muito curta.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "@E encriptada referencia @i %Di desencriptado.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "@E encriptada referencia @i %Di, que tem uma política de encriptação diferente.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "A entrada \"%Dn\" em %p (%i) tem caracteres UTF-8 ilegais no nome.\\n\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "Encontrado nome de ficheiro @E duplicado. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Passo 3: verificar conectividade da pasta\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "@r não alocado. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Sem espaço na @d @l. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "@i %i (%p) de @d não ligado\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/perdido+achado não encontrado. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "'..' em %Q (%i) é %P (%j), devia ser %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "/perdido+achado mau ou não-existente. Impossível religar.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Impossível expandir /perdido+achado: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Impossível religar %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Erro ao tentar encontrar /perdido+achado: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b: %m ao tentar criar pasta /perdido+achado\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: %m ao tentar criar pasta /perdido+achado\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_@b: %m ao criar novo bloco de pasta\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_@b: %m ao escrever o bloco de pasta para /perdido+achado\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Erro ao ajustar total de inodes no inode %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Impossível reparar mãe de inode %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Impossível reparar mãe de inode %i: impossível encontrar entrada de pasta-mãe\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Erro ao criar pasta raiz (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Erro ao criar pasta /perdido+achado (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "inode raiz não é uma pasta; a abortar.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Impossível prosseguir sem um inode raiz.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/perdido+achado não é uma pasta (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/perdido+achado tem dados em linha\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Impossível alocar espaço para /perdido+achado.\n"
+"Colocar antes os ficheiros perdidos na pasta raiz"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Espaço insuficiente para recuperar ficheiros perdidos!\n"
+"Mova dados para fora do sistema de ficheiros e volte a executar e2fsck.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/perdido+achado está encriptada\n"
+
+#: e2fsck/problem.c:1996
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Passo 3A: optimizar pastas\n"
+
+#: e2fsck/problem.c:2002
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Falha ao criar iterador dirs_to_hash: %m\n"
+
+#: e2fsck/problem.c:2007
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Falha ao optimizar a pasta %q (%d): %m\n"
+
+#: e2fsck/problem.c:2012
+msgid "Optimizing directories: "
+msgstr "A optimizar pastas: "
+
+#: e2fsck/problem.c:2029
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Passo 4: verificar totais de referência\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2035
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "inode %i desanexado de tamanho zero. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "inode %i desanexado\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2046
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "total referência de inode %i é %Il, devia ser %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2050
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"AVISO: ERRO DE PROGRAMAÇÃO NO E2FSCK!\n"
+"\tOU ALGUM TONTO (?!?) ESTÃ A VERIFICAR UM SISTEMA DE FICHEIROS MONTADO.\n"
+"@i_link_info[%i] é %N, inode.i_links_count é %Il. Deviam ser iguais!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2057
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "total de referência do inode %i de atributo estendido é %N, devia ser %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2062
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "A pasta excede o máximo de ligações, mas não há funcionalidade DIR_NLINK no super-bloco.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2067
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "@d @i %i: contagem de referências definida para fazer transporte, mas podia ser um valor exacto %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2074
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Passo 5: verificar informação de resumo do grupo\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2079
+msgid "Padding at end of @i @B is not set. "
+msgstr "Espaço no final do bitmap de inode não está definido. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2084
+msgid "Padding at end of @b @B is not set. "
+msgstr "Espaço no final do bitmap de bloco não está definido. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2089
+msgid "@b @B differences: "
+msgstr "diferenças do bitmap de bloco: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2111
+msgid "@i @B differences: "
+msgstr "diferenças do bitmap de inode: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2133
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Total de inodes livres para o grupo nº %g errado (%i, contados=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2138
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Total de pastas para o grupo nº %g (%i, contadas=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2143
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Total de inodes livres errado (%i, contados=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2148
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Total de blocos livres para o grupo nº %g errado (%b, contados=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2153
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Total de blocos livres errado (%b, contados=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2158
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "ERRO DE PROGRAMAÇÃO: pontos finais do bitmap do sistema de ficheiros (nº %N) (%b, %c) não correspondem aos pontos finais calculados (%i, %j)\n"
+
+#: e2fsck/problem.c:2164
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Erro interno: final de bitmap disparatado (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2170
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Erro de cópia no bitmap de inode substituto: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Erro de cópia no bitmap de bloco substituto: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2206
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "blocos de grupo %g em uso, mas o grupo está marcado como BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "inodes de grupo %g em uso, mas o grupo está marcado como INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "bitmap de inode do grupo %g não corresponde à checksum.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "bitmap de bloco do grupo %g não corresponde à checksum.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2231
+msgid "Recreate @j"
+msgstr "Recriar diário"
+
+#: e2fsck/problem.c:2236
+msgid "Update quota info for quota type %N"
+msgstr "Actualizar informação de quota para quota tipo %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2242
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Erro ao definir informação de checksum de grupo do bloco: %m\n"
+
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Erro ao escrever informação do sistema de ficheiros: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Erro ao despejar escritas para o dispositivo de armazenamento: %m\n"
+
+#: e2fsck/problem.c:2259
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Erro ao escrever informação de quota para quota tipo %N: %m\n"
+
+#: e2fsck/problem.c:2422
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Código de erro não gerido (0x%x)!\n"
+
+#: e2fsck/problem.c:2552 e2fsck/problem.c:2556
+msgid "IGNORED"
+msgstr "IGNORADO"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "em move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Memória usada: %lu, tempo decorrido: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "tamanho do inode=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1330
+msgid "while opening inode scan"
+msgstr "ao abrir análise inode"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "ao iniciar análise de inode"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "ao fazer análise de inode"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "ao chamar ext2fs_block_iterate para inode %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "ao chamar ext2fs_adjust_ea_refcount2 para inode %u"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "A truncar"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "A limpar"
+
+#: e2fsck/unix.c:78
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Uso: %s [-panyrcdfktvDFV] [-b super-bloco] [-B tam-bloco]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] dispositivo\n"
+
+#: e2fsck/unix.c:83
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Ajuda de emergência:\n"
+" -p Reparação automática (sem perguntas)\n"
+" -n Não faz alterações ao sistema de ficheiros\n"
+" -y Assume \"yes\" para todas as perguntas\n"
+" -c Procura maus blocos e adiciona-os à lista de maus blocos\n"
+" -f Força a verificação, mesmo que o sistema de ficheiros esteja marcado como limpo\n"
+
+#: e2fsck/unix.c:89
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Verboso\n"
+" -b superblock Usa super-bloco alternativo\n"
+" -B tam-bloco Força tam-bloco ao procurar o super-bloco\n"
+" -j external_journal Define localização do diário externo\n"
+" -l bad_blocks_file Adiciona à lista de maus blocos\n"
+" -L bad_blocks_file Define a lista de maus blocos\n"
+" -z undo_file Cria um ficheiro para desfazer\n"
+
+#: e2fsck/unix.c:137
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u ficheiros (%0d.%d%% não-contíguos), %llu/%llu blocos\n"
+
+#: e2fsck/unix.c:164
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u inode usado (%2.2f%%, de %u)\n"
+msgstr[1] ""
+"\n"
+"%12u inodes usados (%2.2f%%, de %u)\n"
+
+#: e2fsck/unix.c:168
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u ficheiro não-contíguo (%0d.%d%%)\n"
+msgstr[1] "%12u ficheiros não-contíguos (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:173
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u pasta não-contígua (%0d.%d%%)\n"
+msgstr[1] "%12u pastas não-contíguas (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:178
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " nº de inodes com blocos ind/dind/tind: %u/%u/%u\n"
+
+#: e2fsck/unix.c:186
+msgid " Extent depth histogram: "
+msgstr " Histograma de profundidade de extensão: "
+
+#: e2fsck/unix.c:195
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu bloco usado (%2.2f%%, de %llu)\n"
+msgstr[1] "%12llu blocos usados (%2.2f%%, de %llu)\n"
+
+#: e2fsck/unix.c:200
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u mau bloco\n"
+msgstr[1] "%12u maus blocos\n"
+
+#: e2fsck/unix.c:202
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u ficheiro grande\n"
+msgstr[1] "%12u ficheiros grandes\n"
+
+#: e2fsck/unix.c:204
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u ficheiro normal\n"
+msgstr[1] ""
+"\n"
+"%12u ficheiros normais\n"
+
+#: e2fsck/unix.c:206
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u pasta\n"
+msgstr[1] "%12u pastas\n"
+
+#: e2fsck/unix.c:208
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u ficheiro de dispositivo de carácter\n"
+msgstr[1] "%12u ficheiros de dispositivo de carácter\n"
+
+#: e2fsck/unix.c:211
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u ficheiro de dispositivo de bloco\n"
+msgstr[1] "%12u ficheiros de dispositivo de bloco\n"
+
+#: e2fsck/unix.c:213
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifos\n"
+
+#: e2fsck/unix.c:215
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u ligação\n"
+msgstr[1] "%12u ligações\n"
+
+#: e2fsck/unix.c:217
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u ligação simbólica"
+msgstr[1] "%12u ligações simbólicas"
+
+#: e2fsck/unix.c:219
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u ligação simbólica rápida)\n"
+msgstr[1] " (%u ligações simbólicas rápidas)\n"
+
+#: e2fsck/unix.c:223
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+msgstr[1] "%12u sockets\n"
+
+#: e2fsck/unix.c:227
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u ficheiro\n"
+msgstr[1] "%12u ficheiros\n"
+
+#: e2fsck/unix.c:240 misc/badblocks.c:1001 misc/tune2fs.c:3078 misc/util.c:129
+#: resize/main.c:356
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "ao determinar se %s está montado."
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Aviso! %s está montado.\n"
+
+#: e2fsck/unix.c:264
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Aviso! %s está em uso.\n"
+
+#: e2fsck/unix.c:270
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s está montado.\n"
+
+#: e2fsck/unix.c:272
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s está em uso.\n"
+
+#: e2fsck/unix.c:274
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Impossível continuar, a abortar.\n"
+"\n"
+
+#: e2fsck/unix.c:276
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"AVISO!!! O sistema de ficheiros está montado. Se continuar ***VAI***\n"
+"causar ***GRAVES*** danos ao sistema de ficheiros.\n"
+"\n"
+
+#: e2fsck/unix.c:281
+msgid "Do you really want to continue"
+msgstr "Deseja realmente continuar"
+
+#: e2fsck/unix.c:283
+msgid "check aborted.\n"
+msgstr "verificação abortada.\n"
+
+#: e2fsck/unix.c:377
+msgid " contains a file system with errors"
+msgstr " contém um sistema de ficheiros com erros"
+
+#: e2fsck/unix.c:379
+msgid " was not cleanly unmounted"
+msgstr " não foi desmontado asseadamente"
+
+#: e2fsck/unix.c:381
+msgid " primary superblock features different from backup"
+msgstr " funcionalidades do super-bloco primário diferentes da segurança"
+
+#: e2fsck/unix.c:385
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " foi montado %u vezes sem verificação"
+
+#: e2fsck/unix.c:392
+msgid " has filesystem last checked time in the future"
+msgstr " tem a última hora de verificação do sistema de ficheiros no futuro"
+
+#: e2fsck/unix.c:398
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " há %u dias que não é verificado"
+
+#: e2fsck/unix.c:406
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "a ignorar intervalo de verificação, broken_system_clock definido\n"
+
+#: e2fsck/unix.c:412
+msgid ", check forced.\n"
+msgstr ", verificação forçada.\n"
+
+#: e2fsck/unix.c:445
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: limpo, %u/%u ficheiros, %llu/%llu blocos"
+
+#: e2fsck/unix.c:465
+msgid " (check deferred; on battery)"
+msgstr " (verificação adiada; em bateria)"
+
+#: e2fsck/unix.c:468
+msgid " (check after next mount)"
+msgstr " (verificar após montagem seguinte)"
+
+#: e2fsck/unix.c:470
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (verificar após %ld montagens)"
+
+#: e2fsck/unix.c:620
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERRO: impossível abrir /dev/null (%s)\n"
+
+#: e2fsck/unix.c:691
+msgid "Invalid EA version.\n"
+msgstr "Versão EA inválida.\n"
+
+#: e2fsck/unix.c:704
+msgid "Invalid readahead buffer size.\n"
+msgstr "Tamanho de buffer readahead inválido.\n"
+
+#: e2fsck/unix.c:767
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Opção estendida desconhecida: %s\n"
+
+#: e2fsck/unix.c:775
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Opções estendidas são separadas por vírgulas e podem receber um argumento\n"
+"que é predefinido como um sinal de igual (\"=\"). As opções válidas são:\n"
+"\n"
+
+#: e2fsck/unix.c:779
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<ea_version (1 ou 2)>\n"
+
+#: e2fsck/unix.c:788
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<tamanho do buffer>\n"
+
+#: e2fsck/unix.c:801
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Erro de sintaxe no ficheiro de configuração do e2fsck (%s, linha #%d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:874
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Erro ao validar o descritor do ficheiro %d: %s\n"
+
+#: e2fsck/unix.c:878
+msgid "Invalid completion information file descriptor"
+msgstr "Descritor de ficheiro de informação de conclusão inválido"
+
+#: e2fsck/unix.c:893
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Só pode especificar uma das opções -p/-a, -n ou -y."
+
+#: e2fsck/unix.c:914
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "A opção -t não é suportada nesta versão do e2fsck.\n"
+
+#: e2fsck/unix.c:946 e2fsck/unix.c:1024 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1778 misc/tune2fs.c:2078 misc/tune2fs.c:2096
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Impossível resolver \"%s\""
+
+#: e2fsck/unix.c:1003
+msgid "The -n and -D options are incompatible."
+msgstr "As opções -n e -D são incompatíveis."
+
+#: e2fsck/unix.c:1008
+msgid "The -n and -c options are incompatible."
+msgstr "As opções -n e -c são incompatíveis."
+
+#: e2fsck/unix.c:1013
+msgid "The -n and -l/-L options are incompatible."
+msgstr "As opções -n e -l/-L são incompatíveis."
+
+#: e2fsck/unix.c:1037
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "As opções -D e -E fixes_only são incompatíveis."
+
+#: e2fsck/unix.c:1043
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "As opções -E bmap2extent e fixes_only são incompatíveis."
+
+#: e2fsck/unix.c:1094
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "ao abrir %s para despejo"
+
+#: e2fsck/unix.c:1100 resize/main.c:385
+#, c-format
+msgid "while trying to flush %s"
+msgstr "ao tentar despejar %s"
+
+#: e2fsck/unix.c:1107
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "As opções -c e -l/-L não podem ser usadas ao mesmo tempo.\n"
+
+#: e2fsck/unix.c:1154
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG \"%s\" não é inteiro\n"
+"\n"
+
+#: e2fsck/unix.c:1163
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Argumento não-numérico inválido para -%c (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1254
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "Intervalo MMP é %u segundos e o tempo total de espera é %u segundos. Por favor aguarde...\n"
+
+#: e2fsck/unix.c:1271 e2fsck/unix.c:1276
+msgid "while checking MMP block"
+msgstr "ao verificar bloco MMP"
+
+#: e2fsck/unix.c:1278
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Se tem a certeza de que o sistema de ficheiros não está em uso em nenhum nó, execute:\n"
+"\"tune2fs -f -E clear_mmp %s\"\n"
+
+#: e2fsck/unix.c:1294
+msgid "while reading MMP block"
+msgstr "ao ler bloco MMP"
+
+#: e2fsck/unix.c:1314 e2fsck/unix.c:1366 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2723 misc/mke2fs.c:2774 misc/tune2fs.c:2803
+#: misc/tune2fs.c:2848 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"A sobresscrever sistema de ficheiros existente; pode ser desfeito com o comando:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1355 misc/e2undo.c:274 misc/mke2fs.c:2763 misc/tune2fs.c:2837
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "ao tentar eliminar %s"
+
+#: e2fsck/unix.c:1381 misc/mke2fs.c:2789 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "ao tentar configurar o ficheiro de desfazer\n"
+
+#: e2fsck/unix.c:1425
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Erro: versão da biblioteca ext2fs fora de prazo!\n"
+
+#: e2fsck/unix.c:1432
+msgid "while trying to initialize program"
+msgstr "ao tentar inicializar o programa"
+
+#: e2fsck/unix.c:1469
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tA usar %s, %s\n"
+
+#: e2fsck/unix.c:1481
+msgid "need terminal for interactive repairs"
+msgstr "precisa do terminal para reparações interactivas"
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s a tentar blocos de segurança...\n"
+
+#: e2fsck/unix.c:1544
+msgid "Superblock invalid,"
+msgstr "Super-bloco inválido,"
+
+#: e2fsck/unix.c:1545
+msgid "Group descriptors look bad..."
+msgstr "Descritores de grupo parecem mal..."
+
+#: e2fsck/unix.c:1555
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s ao usar os blocos de segurança"
+
+#: e2fsck/unix.c:1559
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: a regressar ao super-bloco original\n"
+
+#: e2fsck/unix.c:1588
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Aparentemente, a revisão do sistema de ficheiros é muito alta para esta\n"
+"versão do e2fsck (ou o super-bloco do sistema de ficheiros está corrompido).\n"
+"\n"
+
+#: e2fsck/unix.c:1595
+msgid "Could this be a zero-length partition?\n"
+msgstr "Poderá esta ser uma partição de tamanho zero?\n"
+
+#: e2fsck/unix.c:1597
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Tem de ter acesso %s ao sistema de ficheiros ou ser root\n"
+
+#: e2fsck/unix.c:1603
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Possível dispositivo não-existente ou swap?\n"
+
+#: e2fsck/unix.c:1605
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Sistema de ficheiros montado ou aberto exclusivamente por outro programa?\n"
+
+#: e2fsck/unix.c:1609
+msgid "Possibly non-existent device?\n"
+msgstr "Possível dispositivo não-existente?\n"
+
+#: e2fsck/unix.c:1612
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Disco protegido contra escrita; use a opção -n para fazer\n"
+"uma verificação só-de-leitura do dispositivo.\n"
+
+#: e2fsck/unix.c:1626
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: a tentar carregar o super-bloco, apesar dos erros...\n"
+
+#: e2fsck/unix.c:1701
+msgid "Get a newer version of e2fsck!"
+msgstr "Obtenha uma nova versão do e2fsck!"
+
+#: e2fsck/unix.c:1761
+#, c-format
+msgid "while checking journal for %s"
+msgstr "ao verificar diário para %s"
+
+#: e2fsck/unix.c:1764
+msgid "Cannot proceed with file system check"
+msgstr "Impossível prosseguir com a verificação do sistema de ficheiros"
+
+#: e2fsck/unix.c:1775
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Aviso: a saltar recuperação do diário por estar em curso uma verificação só-de-leitura do sistema de ficheiros.\n"
+
+#: e2fsck/unix.c:1787
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "impossível definir bandeiras do super-bloco em %s\n"
+
+#: e2fsck/unix.c:1793
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Encontrado erro de checksum de diário em %s\n"
+
+#: e2fsck/unix.c:1797
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Diário corrompido em %s\n"
+
+#: e2fsck/unix.c:1801
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "ao recuperar diário de %s"
+
+#: e2fsck/unix.c:1823
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s tem funcionalidades não suportadas:"
+
+#: e2fsck/unix.c:1838
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s tem codificação não suportada: %0x\n"
+
+#: e2fsck/unix.c:1888
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s ao ler inode de maus blocos\n"
+
+#: e2fsck/unix.c:1891
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Isto não augura nada de bom, mas vamos tentar continuar...\n"
+
+#: e2fsck/unix.c:1934
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "A criar diário (%d blocos): "
+
+#: e2fsck/unix.c:1943
+msgid " Done.\n"
+msgstr " Feito.\n"
+
+#: e2fsck/unix.c:1945
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** o diário foi regenerado ***\n"
+
+#: e2fsck/unix.c:1951
+msgid "aborted"
+msgstr "abortado"
+
+#: e2fsck/unix.c:1953
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck cancelado.\n"
+
+#: e2fsck/unix.c:1980
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "A recomeçar o e2fsck desde o princípio...\n"
+
+#: e2fsck/unix.c:1984
+msgid "while resetting context"
+msgstr "ao repor o contexto"
+
+#: e2fsck/unix.c:2043
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** ERROS DO SISTEMA DE FICHEIROS CORRIGIDOS *****\n"
+
+#: e2fsck/unix.c:2045
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: o sistema de ficheiros foi modificado.\n"
+
+#: e2fsck/unix.c:2049 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** O SISTEMA DE FICHEIROS FOI MODIFICADO *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** REINICIAR O SISTEMA *****\n"
+
+#: e2fsck/unix.c:2064 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** AVISO: o sistema de ficheiros ainda tem erros **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:93
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:192 misc/util.c:112
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "tT"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " ('t' activa \"sim\" para todos) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "cancelado!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "sim para todos\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "sim\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "não\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? não\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? sim\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "sim"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "não"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: blocos de bitmap ilegais para %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "a ler bitmaps de inode e bloco"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "ao tentar ler bitmaps para %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "escrever bitmaps de bloco e inode"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "ao reescrever bitmaps de bloco e inode para %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: INCONSISTENCIA INESPERADA; EXECUTE fsck MANUALMENTE.\n"
+"\t(i.e., sem opções -a ou -p)\n"
+
+#: e2fsck/util.c:438
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Memória usada: %lluk/%lluk (%lluk/%lluk), "
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Memória usada: %lluk, "
+
+#: e2fsck/util.c:450
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "hora: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "tempo decorrido: %6.3f\n"
+
+#: e2fsck/util.c:490 e2fsck/util.c:504
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "ao ler inode %lu em %s"
+
+#: e2fsck/util.c:518 e2fsck/util.c:531
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "ao escrever inode %lu em %s"
+
+#: e2fsck/util.c:790
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "INCONSISTENCIA INESPERADA: o sistema de ficheiros está a ser modificado enquanto o fsck está em execução.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "feito \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Uso: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" dispositivo [last_block [first_block]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: as opções -n e -w são mutuamente exclusivas.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% feito, %s decorrido. (%d/%d/%d erros)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "A testar com padrão aleatório: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "A testar com padrão 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "durante a procura"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valor esquisito (%ld) em do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "durante ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "ao iniciar iteração da lista de maus blocos"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "ao alocar buffers"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "A verificar blocos %lu a %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "A procurar maus blocos em modo só-de-leitura\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "A procurar maus blocos (teste só-de-leitura): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Demasiados maus blocos, a abortar o teste\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "A procurar maus blocos em modo leitura-escrita\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Do bloco %lu ao %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "A ler e comparar: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "A procurar maus blocos em modo leitura-escrita não destrutivo\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "A procurar maus blocos (teste leitura-escrita não destrutivo)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Apanhado um interrupt, a limpar\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "durante escrita de dados de teste, bloco %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:134
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s está montado; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "badblocks forçado mesmo assim. Espera-se que /etc/mtab esteja incorrecta.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "não é seguro executar badblocks!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:145
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s aparenta estar em uso pelo sistema; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks forçado mesmo assim.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s - %s inválido"
+
+#: misc/badblocks.c:1135
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Total de máximo de maus blocos %u muito grande - o máximo é %u"
+
+#: misc/badblocks.c:1162
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "impossível alocae memória para test_pattern - %s"
+
+#: misc/badblocks.c:1192
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Máximo de um test_pattern pode ter sido especificado em modo só-de-leitura"
+
+#: misc/badblocks.c:1198
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Não é permitido um test_pattern aleatório em modo só-de-leitura"
+
+#: misc/badblocks.c:1205
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Tamanho de bloco inválido: %d\n"
+
+#: misc/badblocks.c:1211
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "blocks_at_once inválido: %d\n"
+
+#: misc/badblocks.c:1225
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Impossível determinar o tamanho do dispositivo; tem de o\n"
+"especificar manualmente\n"
+
+#: misc/badblocks.c:1231
+msgid "while trying to determine device size"
+msgstr "ao tentar determinar o tamanho do dispositivo"
+
+#: misc/badblocks.c:1236
+msgid "last block"
+msgstr "último bloco"
+
+#: misc/badblocks.c:1242
+msgid "first block"
+msgstr "primeiro bloco"
+
+#: misc/badblocks.c:1245
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "bloco inicial inválido (%llu): tem de ser menor que %llu"
+
+#: misc/badblocks.c:1253
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "bloco final inválido (%llu): tem de ser um valor 32-bit"
+
+#: misc/badblocks.c:1309
+msgid "while creating in-memory bad blocks list"
+msgstr "ao criar lista de maus blocos em memória"
+
+#: misc/badblocks.c:1318
+msgid "input file - bad format"
+msgstr "ficheiro de entrada - mau formato"
+
+#: misc/badblocks.c:1326 misc/badblocks.c:1335
+msgid "while adding to in-memory bad block list"
+msgstr "ao adicionar à lista de maus blocos em memória"
+
+#: misc/badblocks.c:1360
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Passo concluído, encontrados %u maus blocos. (%d/%d/%d erros)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTuFx] [-v version] files...\n"
+msgstr "Uso: %s [-pRVf] [-+=aAcCdDeijPsStTuFx] [-v versão] ficheiros...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "projecto errado - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versão errada - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "ao tentar analisar %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "ao ler bandeiras em %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Bandeiras de %s definidas como "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "ao definir bandeiras em %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versão de %s definida como %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "ao definir versão em %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Projecto de %s definido como %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "ao definir projecto em %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Impossível alocar variável de caminho em chattr_dir_proc"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= é incompatível com - e +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Deve usar \"-v\", =, - ou +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "ao ler inode %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "ao expandir pasta"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "ao ligar \"%s\""
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "ao escrever inode %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "ao listar atributos de \"%s\""
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "ao abrir inode %u"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "ao ler xattrs para o inode %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "ao alocar memória"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "ao ler atributo \"%s\" de \"%s\""
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "ao escrever atributo \"%s\" no inode %u"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "ao fechar inode %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "ao alocar inode \"%s\""
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "ao criar inode \"%s\""
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "ao criar ligação simbólica \"%s\""
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "ao procurar \"%s\""
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "ao criar pasta \"%s\""
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "ao abrir \"%s\" para cópia"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "ao mudar pasta de trabalho para \"%s\""
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "ao analisar pasta \"%s\""
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "ao lstat \"%s\""
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "ao criar o ficheiro especial \"%s\""
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "malloc falhou"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "ao tentar ler a ligação \"%s\""
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "a ligação simbólica aumentou de tamanho entre lstat() e readlink()"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "ao escrever ligação simbólica \"%s\""
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "ao escrever ficheiro \"%s\""
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "ao fazer pasta \"%s\""
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "ao mudar de pasta"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "a ignorar entrada \"%s\""
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "ao definir inode para \"%s\""
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "ao definir xattrs para \"%s\""
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "ao gravar dados do inode"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "ao copiar xattrs na pasta raiz"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Uso: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] dispositivo\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "blocos"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "clusters"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupo %lu: (blocos "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " csum 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (ESPERADO 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s super-bloco em "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primário"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Segurança"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", descritores de grupo em "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Blocos GDT reservados em "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " descritor de grupo em "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " bitmap de bloco em "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", csum 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " bitmap de inode em "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" tabela de inode em "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u livre %s, %u inodes livres, %u pastas%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u inodes não usados\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Blocos livres: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " inodes livres: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "ao imprimir lista de maus blocos"
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Maus blocos: %u"
+
+#: misc/dumpe2fs.c:374 misc/tune2fs.c:378
+msgid "while reading journal inode"
+msgstr "ao ler inode de diário"
+
+#: misc/dumpe2fs.c:380
+msgid "while opening journal inode"
+msgstr "ao abrir inode de diário"
+
+#: misc/dumpe2fs.c:386
+msgid "while reading journal super block"
+msgstr "ao ler super-bloco de diário"
+
+#: misc/dumpe2fs.c:393
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Número mágico do super-bloco de diário inválido!\n"
+
+#: misc/dumpe2fs.c:413 misc/tune2fs.c:221
+msgid "while reading journal superblock"
+msgstr "ao ler super-bloco de diário"
+
+#: misc/dumpe2fs.c:421
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Impossível encontrar números mágicos do super-bloco de diário"
+
+#: misc/dumpe2fs.c:476
+msgid "failed to alloc MMP buffer\n"
+msgstr "falha ao alocar buffer MMP\n"
+
+#: misc/dumpe2fs.c:487
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "a ler bloco MMP %llu de \"%s\"\n"
+
+#: misc/dumpe2fs.c:519 misc/mke2fs.c:811 misc/tune2fs.c:2118
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Impossível alocar memória para processar opções!\n"
+
+#: misc/dumpe2fs.c:545
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parâmetro de super-bloco inválido: %s\n"
+
+#: misc/dumpe2fs.c:560
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parâmetro de tamanho de bloco inválido: %s\n"
+
+#: misc/dumpe2fs.c:571
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Especificou más opções estendidas: %s\n"
+"\n"
+"Opções estendidas são separadas por vírgulas e podem receber um argumento\n"
+"\tiniciado com um sinal de igual (\"=\").\n"
+"\n"
+"As opções válidas são:\n"
+"\tsuperblock=<número do super-bloco>\n"
+"\tblocksize=<tamanho do bloco>\n"
+
+#: misc/dumpe2fs.c:661 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tA usar %s\n"
+
+#: misc/dumpe2fs.c:708 misc/e2image.c:1637 misc/tune2fs.c:3004
+#: resize/main.c:418
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Impossível encontrar um super-bloco de sistema de ficheiros válido.\n"
+
+#: misc/dumpe2fs.c:730
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: funcionalidade MMP não activada.\n"
+
+#: misc/dumpe2fs.c:761
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "ao tentar ler bitmaps de \"%s\"\n"
+
+#: misc/dumpe2fs.c:770
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Executar e2fsck agora!\n"
+"\n"
+
+#: misc/e2image.c:107
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Uso: %s [ -r|-Q ] [ -f ] [ -b super-bloco ] [ -B tambloco ] disp fich-imagem\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I dispositivo ficheiro-imagem\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+
+#: misc/e2image.c:176 misc/e2image.c:592 misc/e2image.c:598
+#: misc/e2image.c:1200
+msgid "while allocating buffer"
+msgstr "ao alocar o buffer"
+
+#: misc/e2image.c:181
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "A escrever bloco %llu\n"
+
+#: misc/e2image.c:195
+#, c-format
+msgid "error writing block %llu"
+msgstr "erro ao escrever bloco %llu"
+
+#: misc/e2image.c:199
+msgid "error in generic_write()"
+msgstr "erro em generic_write()"
+
+#: misc/e2image.c:216
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Erro: tamanho de cabeçalho maior que wrt_size\n"
+
+#: misc/e2image.c:221
+msgid "Couldn't allocate header buffer\n"
+msgstr "Impossível alocar buffer de cabeçalho\n"
+
+#: misc/e2image.c:249
+msgid "while writing superblock"
+msgstr "ao escrever super-bloco"
+
+#: misc/e2image.c:258
+msgid "while writing inode table"
+msgstr "ao escrever tabela de inodes"
+
+#: misc/e2image.c:266
+msgid "while writing block bitmap"
+msgstr "ao escrever bitmap de bloco"
+
+#: misc/e2image.c:274
+msgid "while writing inode bitmap"
+msgstr "ao escrever bitmap de inode"
+
+#: misc/e2image.c:516
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Bloco de pasta corrompido %llu: mau rec_len (%d)\n"
+
+#: misc/e2image.c:528
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Bloco de pasta corrompido %llu: mau name_len (%d)\n"
+
+#: misc/e2image.c:569
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu blocos (%d%%)"
+
+#: misc/e2image.c:602 misc/e2image.c:642
+msgid "Copying "
+msgstr "A copiar "
+
+#: misc/e2image.c:639
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Parar agora destruirá o sistema de ficheiros, interrompa novamente se tem a certeza\n"
+
+#: misc/e2image.c:665
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s restante em %.2f MB/s"
+
+#: misc/e2image.c:677 misc/e2image.c:1210
+#, c-format
+msgid "error reading block %llu"
+msgstr "erro ao ler bloco %llu"
+
+#: misc/e2image.c:732
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Copiados %llu / %llu blocos (%d%%) em %s "
+
+#: misc/e2image.c:737
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "em %.2f MB/s"
+
+#: misc/e2image.c:773
+msgid "while allocating l1 table"
+msgstr "ao alocar tabela l1"
+
+#: misc/e2image.c:818
+msgid "while allocating l2 cache"
+msgstr "ao alocar cache l2"
+
+#: misc/e2image.c:841
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Aviso: ainda há tabelas na cache ao Pôr a cache, perder-se-ão dados, pelo que a imagem poderá não ser válida.\n"
+
+#: misc/e2image.c:1167
+msgid "while allocating ext2_qcow2_image"
+msgstr "ao alocar ext2_qcow2_image"
+
+#: misc/e2image.c:1174
+msgid "while initializing ext2_qcow2_image"
+msgstr "ao inicializar ext2_qcow2_image"
+
+#: misc/e2image.c:1234 misc/e2image.c:1252
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Erro de programação: criados múltiplos blocos refcount sequenciais!\n"
+
+#: misc/e2image.c:1293
+msgid "while allocating block bitmap"
+msgstr "ao alocar bitmap de bloco"
+
+#: misc/e2image.c:1302
+msgid "while allocating scramble block bitmap"
+msgstr "ao alocar bitmap de bloco baralhado"
+
+#: misc/e2image.c:1325
+msgid "Scanning inodes...\n"
+msgstr "A analisar inodes...\n"
+
+#: misc/e2image.c:1337
+msgid "Can't allocate block buffer"
+msgstr "Impossível alocar buffer de bloco"
+
+#: misc/e2image.c:1349
+msgid "while getting next inode"
+msgstr "ao obter inode seguinte"
+
+#: misc/e2image.c:1376 misc/e2image.c:1390
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "ao iterar sobre inode %u"
+
+#: misc/e2image.c:1422
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Não se podem instalar imagens raw e qcow2"
+
+#: misc/e2image.c:1444
+msgid "error reading bitmaps"
+msgstr "erro ao ler bitmaps"
+
+#: misc/e2image.c:1456
+msgid "while opening device file"
+msgstr "ao abrir ficheiro de dispositivo"
+
+#: misc/e2image.c:1467
+msgid "while restoring the image table"
+msgstr "ao restaurar a tabela da imagem"
+
+#: misc/e2image.c:1573
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "a opção -a só pode ser usada com imagens raw ou QCOW2."
+
+#: misc/e2image.c:1578
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "a opção -b só pode ser usada com imagens raw ou QCOW2."
+
+#: misc/e2image.c:1584
+msgid "Offsets are only allowed with raw images."
+msgstr "SAó são permitidos desvios com imagens raw."
+
+#: misc/e2image.c:1589
+msgid "Move mode is only allowed with raw images."
+msgstr "O modo move só é permitido com imagens raw."
+
+#: misc/e2image.c:1594
+msgid "Move mode requires all data mode."
+msgstr "O modo move requer o modo all data."
+
+#: misc/e2image.c:1604
+msgid "checking if mounted"
+msgstr "a verificar se está montado"
+
+#: misc/e2image.c:1611
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Executar e2image num sistema de ficheiros R/W montado pode resultar numa\n"
+"imagem inconsistente que não terá utilidade para depuração.\n"
+"Use a opção -f se realmente o quer fazer.\n"
+
+#: misc/e2image.c:1665
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "A imagem QCOW2 não pode ser escrita em stdout!\n"
+
+#: misc/e2image.c:1671
+msgid "Can not stat output\n"
+msgstr "Impossível analisar a saída\n"
+
+#: misc/e2image.c:1681
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "A imagem (%s) está comprimida\n"
+
+#: misc/e2image.c:1684
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "A imagem (%s) está encriptada\n"
+
+#: misc/e2image.c:1687
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "A imagem (%s) está corrompida\n"
+
+#: misc/e2image.c:1691
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "ao tentar converter imagem qcow2 (%s) em imagem raw (%s)"
+
+#: misc/e2image.c:1701
+msgid "The -c option only supported in raw mode\n"
+msgstr "A opção -c só é suportada em modo raw\n"
+
+#: misc/e2image.c:1706
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "A opção -c não é suportada ao escrever em stdout\n"
+
+#: misc/e2image.c:1713
+msgid "while allocating check_buf"
+msgstr "ao alocar check_buf"
+
+#: misc/e2image.c:1719
+msgid "The -p option only supported in raw mode\n"
+msgstr "A opção -p só é suportada em modo raw\n"
+
+#: misc/e2image.c:1729
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d blocos já continham os dados a copiar\n"
+
+#: misc/e2initrd_helper.c:68
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Uso: %s -r dispositivo\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: impossível abrir %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: impossível procurar para super-bloco\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: erro ao ler super-bloco\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: não é sistema ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3213
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Aviso: rótulo muito longo, a truncar.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: impossível procurar para super-bloco de novo\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: erro ao escrever super-bloco\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1770
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Uso: e2label dispositivo [novo-rótulo]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Uso: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <ficheiro de transacção> <sistema de ficheiros>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "O super-bloco de sistema de ficheiros não corresponde ao ficheiro de desfazer.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "UUID não corresponde.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Última hora de montagem não corresponde.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Última hora de escrita não corresponde.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Contador de escrita vitalício não corresponde.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "ao ler super-bloco de sistema de ficheiros."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "ao obter super-bloco"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Checksum de super-bloco do ficheiro de desfazer não corresponde.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "desvio ilegal - %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Não se escreve no ficheiro de desfazer enquanto ele estiver em reprodução.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "ao abrir ficheiro de desfazer \"%s\"\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "ao ler ficheiro de desfazer"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: não é ficheiro de desfazer.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: checksum de cabeçalho não corresponde.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: cabeçalho de ficheiro de desfazer corrompido.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: tamanho de bloco de desfazer muito grande.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: tamanho de bloco de desfazer muito pequeno.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: conjunto de funcionalidades de ficheiro de desfazer desconhecido.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Erro ao determinar se %s está montado."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo só deve ser executado em sistemas de ficheiros desmontados"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "ao abrir \"%s\""
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "desvio especificado muito grande"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "ao ler chaves"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: magia de chave errada em %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: erro de checksum de bloco de chave em %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: bloco %llu é muito longo."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "ao obter bloco %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "erro de checksum em bloco de sistema de ficheiros %llu (undo blk %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "ao escrever bloco %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Corrupção de ficheiro de desfazer; execute e2fsck AGORA!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "Erro IO durante a reprodução; execute e2fsck AGORA!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Registo de desfazer incompleto; execute e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Uso: findsuper dispositivo [saltarbytes [kbinicial]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "saltarbytes deve ser um número, não %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "saltarbytes tem de ser múltiplo do tamanho do sector\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "kbinicial deve ser um número, não %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "kbinicial deve ser positivo, não %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "a iniciar em %llu, com incrementos de %u byte\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] provavelmente super-bloco escrito no super-bloco de diário ext3,\n"
+"\tlogo start/end/grp errados\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: terminado com erro nº %d\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "AVISO: impossível abrir %s: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "AVISO: mau formato na linha %d de %s\n"
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"AVISO: a sua /etc/fstab não contém o campo fsck passno.\n"
+"\tAs coisas serão compostas por si, mas deve reparar\n"
+"\to seu ficheiro /etc/fstab assim que possível.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: não encontrado\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: espere: sem mais processos-filho?!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Aviso... %s para dispositivo %s saiu sem sinal %d.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: o estado é %x, nunca devia acontecer.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Terminado com %s (estado de saída %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Erro %d ao executar fsck.%s para %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Ou todos ou nenhum dos tipos de sistema de ficheiros passados a -t têm de ser\n"
+"prefixados com \"no\" ou \"!\".\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Impossível alocar memória para tipos de sistema de ficheiro\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: a saltar linha má em /etc/fstab: ligar montagem com número de passagem fsck não zero\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: impossível verificar %s: fsck.%s não encontrado\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "A verificar todos os sistemas de ficheiros.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--em espera-- (passo %d)\n"
+
+#: misc/fsck.c:1085
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Uso: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: demasiados dispositivos\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: demasiados argumentos\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "A montar só-de-leitura.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: permissão a todos os utilizadores para alocar todos os blocos. Isto é perigoso!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3104
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Por favor, execute e2fsck -fy %s.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: montar só de leitura sem recuperar o diário\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "O diário precisa de recuperação; é requerida a execução de \"e2fsck -E journal_only\"\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: escrever no diário não é suportado.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Aviso: a montar sf não verificado, recomenda-se a execução de e2fsck.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Aviso: atingido o máximo total de montagem, recomenda-se a execução de e2fsck.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Aviso: atingida hora de verificação; recomenda-se a execução de e2fsck.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Órfãos detectados; recomenda-se a execução de e2fsck.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Erros detectados; é requerida a execução de e2fsck.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Uso: %s [-RVadlpv] [ficheiros...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Ao ler bandeiras em %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Ao ler projecto em %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Ao ler versão em %s"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Uso: %s [-c|-l nomefich] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O funcionalidade[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] dispositivo [blocks-count]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "A executar comando: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "ao tentar executar \"%s\""
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "ao processar lista de maus blocos do programa"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Mau bloco %d em área em descritor primário de super-bloco/grupo.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Blocos %u a %u têm de estar em boa ordem para construir um sistema de ficheiros.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "A abortar...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Aviso: os descritores de segurança de super-bloco/grupo no bloco %u contêm\n"
+"\tmaus blocos.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3283
+msgid "while marking bad blocks as used"
+msgstr "ao marcar maus blocos como usados"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "ao escrever inodes reservados"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "A escrever tabelas de inodes: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Impossível escrever %d blocos na tabela de inodes começando em %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2835 misc/mke2fs.c:3243
+msgid "done \n"
+msgstr "feito \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "ao criar pasta raiz"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "ao ler inode raiz"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "ao definir propriedade do inode raiz"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "ao criar /perdido+achado"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "ao procurar /perdido+achado"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "ao expandir /perdido+achado"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "ao definir inode de mau bloco"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Memória esgotada ao apagar sectores %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Aviso: impossível ler bloco 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Aviso: impossível apagar sector %d: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "ao dividir o tamanho do diário"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "ao inicializar super-bloco de diário"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "A pôr a zero o dispositivo de diário: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "ao pôr a zero o dispositivo de diário (bloco %llu, total %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "ao escrever super-bloco de diário"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "A criar sistema de ficheiros com %llu %dk blocos e %u inodes\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"aviso: %llu blocos não usados.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Rótulo do sistema de ficheiros=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Tipo de SO: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Tamanho de bloco=%u (diário=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Tamanho de cluster=%u (diário=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Tamanho de fragmento=%u (diário=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Passo=%u blocos, Largura de banda=%u blocos\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inodes, %llu blocos\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu blocos (%2.2f%%) reservado para super-utilizador\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "1º bloco de dados=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Dono da pasta raiz=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Máximo de blocos do sistema de ficheiros=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grupos de blocos\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grupo de blocos\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blocos por grupo, %u clusters por grupo\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u blocos por grupo, %u fragmentos por grupo\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inodes por grupo\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID do sistema de ficheiros: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Seguranças de super-blocos armazenadas em blocos: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s requer \"-O 64bit\"\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "\"%s\" tem de estar antes de \"resize=%u\"\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "desc_size inválido: \"%s\"\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Semente de hash inválida: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Desvio inválido: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2146
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "mmp_update_interval inválido: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Nº de super-blocos de segurança inválido: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Parâmetro de passo inválido: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parâmetro de largura de banda inválido: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Parâmetro de redimensionamento inválido: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "O redimensionamento máximo tem de ser maior que o tamanho do sistema de ficheiros.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Redimensionamento em linha não suportado com sistemas de ficheiros revisão 0\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "root_owner inválido: \"%s\"\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Codificação inválida: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Más opções especificadas: %s\n"
+"\n"
+"As opções estendidas são separadas por vírgulas e podem receber um argumento que\n"
+"\té definido por um sinal de igual (\"=\").\n"
+"\n"
+"Opções estendidas válidas:\n"
+"\tmmp_update_interval=<intervalo>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID por-bocado de dados de disco em blocos>\n"
+"\tstripe-width=<RAID passo * discos de dados em blocos>\n"
+"\toffset=<desvio para criar o sistema de ficheiros>\n"
+"\tresize=<tamanho máximo de redimensionamento em blocos>\n"
+"\tpacked_meta_blocks=<0 para desactivar, 1 para activar>\n"
+"\tlazy_itable_init=<0 para desactivar, 1 para activar>\n"
+"\tlazy_journal_init=<0 para desactivar, 1 para activar>\n"
+"\troot_owner=<uid da pasta raiz>:<gid da pasta raiz>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<codificação>\n"
+"\tencoding_flags=<bandeiras>\n"
+"\tquotatype=<tipo(s) de quota a activar>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Aviso: largura de banda RAID %u não é um múltiplo par do passo %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2282
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "erro: bandeira de codificação inválida: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2291
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "erro: tem de especificar explicitamente uma codificação ao passar bandeiras de codificação\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Erro de sintaxe no ficheiro de configuração de mke2fs (%s, linha #%d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1107
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Opção de sistema de ficheiros definida inválida: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:424
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Opção de montagem definida inválida: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"O seu ficheiro mke2fs.conf não define o tipo de sistema de ficheiros %s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Provavelmente tem de instalar um ficheiro mke2fs.conf actualizado.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "A abortar...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Aviso: fs_type %s não definido em mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Impossível alocar memória para o novo PATH.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Impossível inicializar o perfil com sucesso (erro: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "tamanho de bloco inválido - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Aviso: tamanho de bloco %d não utilizável na maioria dos sistemas.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "tamanho de cluster inválido - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "\"-R\" é obsoleto, use antes \"-E\""
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1872
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "mau comportamento de erro - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Número ilegal para blocos por grupo"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "blocos por grupo tem de ser múltiplo de 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Número ilegal para tamanho de flex_bg"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "tamanho de flex_bg tem de ser uma potência de 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "tamanho de flex_bg (%lu) tem de ser menor ou igual a 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "proporção de inode inválida %s (mín %d/máx %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "tamanho de inode inválido - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Aviso: a opção -K option é obsoleta e já não devia ser usada. Use antes a opção estendida \"-E nodiscard\"!\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "em malloc para bad_blocks_filename"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"Aviso: rótulo muito grande; será truncado para \"%s\"\n"
+"\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "percentagem de blocos reservados inválida - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "mau núm inodes - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "ao alocar cadeia fs_feature"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "mau nível de revisão - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "ao tentar criar revisão %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "A opção -t só pode ser usada uma vez"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "A opção -T só pode ser usada uma vez"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3366
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "ao tentar abrir dispositivo de diário %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Tamanho de bloco do dispositivo de diário (%d) menor que o tamanho mínimo de bloco %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "A usar tamanho de bloco do dispositivo de diário: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "blocos \"%s\" inválidos no dispositivo \"%s\""
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "sistema de ficheiros"
+
+#: misc/mke2fs.c:1991 resize/main.c:506
+msgid "while trying to determine filesystem size"
+msgstr "ao tentar determinar o tamanho do sistema de ficheiros"
+
+#: misc/mke2fs.c:1997
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Impossível determinar o tamanho do dispositivo; tem de especificar\n"
+"o tamanho do sistema de ficheiros\n"
+
+#: misc/mke2fs.c:2004
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Tamanho de dispositivo reportado como zero. Partição inválida especificada ou\n"
+"\ta tabela de partições não foi lida após executar fdisk, devido a uma\n"
+"\tpartição modificada estar ocupada e em uso. Pode precisar de reiniciar\n"
+"\tpara voltar a ler a tabela de partições.\n"
+
+#: misc/mke2fs.c:2021
+msgid "Filesystem larger than apparent device size."
+msgstr "Sistema de ficheiros maior que o tamanho aparente do dispositivo."
+
+#: misc/mke2fs.c:2041
+msgid "Failed to parse fs types list\n"
+msgstr "Falha ao analisar a lista de tipos de sistemas de ficheiros\n"
+
+#: misc/mke2fs.c:2091
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "HURD não suporta a funcionalidade de tipo de ficheiro.\n"
+
+#: misc/mke2fs.c:2096
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "HURD não suporta a funcionalidade huge_file.\n"
+
+#: misc/mke2fs.c:2101
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "HURD não suporta a funcionalidade metadata_csum.\n"
+
+#: misc/mke2fs.c:2106
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "HURD não suporta a funcionalidade ea_inode.\n"
+
+#: misc/mke2fs.c:2116
+msgid "while trying to determine hardware sector size"
+msgstr "ao tentar determinar o tamanho do sector do equipamento"
+
+#: misc/mke2fs.c:2122
+msgid "while trying to determine physical sector size"
+msgstr "ao tentar determinar o tamanho do sector físico"
+
+#: misc/mke2fs.c:2154
+msgid "while setting blocksize; too small for device\n"
+msgstr "ao definir tamanho de bloco; muito pequeno para o dispositivo\n"
+
+#: misc/mke2fs.c:2159
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Aviso: tamanho de bloco especificado %d menor que tamanho do sector físico do dispositivo %d\n"
+
+#: misc/mke2fs.c:2183
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: tamanho do dispositivo (0x%llx blocos) %s muito grande para expressar\n"
+"\tem 32 bits usando um tamanho de bloco de %d.\n"
+
+#: misc/mke2fs.c:2197
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: tamanho de dispositivo (0x%llx blocos) %s muito grande para criar\n"
+"\tum sistema de ficheiros usando tamanho de bloco %d.\n"
+
+#: misc/mke2fs.c:2219
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types para resolução mke2fs.conf: "
+
+#: misc/mke2fs.c:2226
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Funcionalidades de sistema de ficheiros não suportadas com sistemas de ficheiros revisão 0\n"
+
+#: misc/mke2fs.c:2234
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Super-blocos esparsos não suportados com sistemas de ficheiros revisão 0\n"
+
+#: misc/mke2fs.c:2244
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Diários não suportados com sistemas de ficheiros revisão 0\n"
+
+#: misc/mke2fs.c:2257
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "percentagem de blocos reservados inválida - %lf"
+
+#: misc/mke2fs.c:2274
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "Extents TÊM de estar activadas para um sistema de ficheiros 64-bit. Passe -O extents para rectificar.\n"
+
+#: misc/mke2fs.c:2294
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "O tamanho de cluster não pode ser menor que o tamanho de bloco.\n"
+
+#: misc/mke2fs.c:2300
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "especificar um tamanho de cluster requer a funcionalidade bigalloc"
+
+#: misc/mke2fs.c:2320
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "aviso: impossível obter a geometria do dispositivo para %s\n"
+
+#: misc/mke2fs.c:2332
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "alinhamento de %s está desviado em %lu bytes.\n"
+
+#: misc/mke2fs.c:2334
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Isto pode resultar num desempenho muito pobre, recomenda-se re-particionamento.\n"
+
+#: misc/mke2fs.c:2340
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s é capaz de DAX, mas o tamanho de blco actual %u é diferente do tamanho de página do sistema %u, logo o sistema de ficheiros não suportará DAX.\n"
+
+#: misc/mke2fs.c:2364
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "blocos %d-byte muito grandes para o sistema (máx %d)"
+
+#: misc/mke2fs.c:2368
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "Aviso: blocos %d-byte muito grandes para o sistema (máx %d), forçado a continuar\n"
+
+#: misc/mke2fs.c:2376
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Sugestão: use kernel Linux >= 3.18 para estabilidade melhorada das funcionalidades de checksum dos meta-dados e diários.\n"
+
+#: misc/mke2fs.c:2422
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Codificação de nome de ficheiro a partir de perfil desconhecida: %s"
+
+#: misc/mke2fs.c:2433
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Bandeiras de codificação a partir do perfil desconhecidas: %s"
+
+#: misc/mke2fs.c:2458
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Aviso: desvio especificado sem tamanho explícito de sistema de ficheiros.\n"
+"Será criado um sistema de ficheiros com %llu blocos mas isto \n"
+"pode não ser o que deseja.\n"
+"\n"
+
+#: misc/mke2fs.c:2473
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "inodes de %d byte são muito pequenos para a quota do projecto"
+
+#: misc/mke2fs.c:2495
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Impossível suportar a funcionalidade bigalloc sem a funcionalidade extents"
+
+#: misc/mke2fs.c:2502
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"As funcionalidades resize_inode e meta_bg não são compatíveis.\n"
+"Não podem estar activas simultaneamente.\n"
+
+#: misc/mke2fs.c:2510
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+"\n"
+"Aviso: a funcionalidade bigalloc ainda está em desenvolvimento\n"
+"Veja https://ext4.wiki.kernel.org/index.php/Bigalloc para mais informação\n"
+"\n"
+
+#: misc/mke2fs.c:2522
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "redimensionamento de blocos em linha reservado não é suportado em sistemas de ficheiros não-esparsos"
+
+#: misc/mke2fs.c:2531
+msgid "blocks per group count out of range"
+msgstr "total de blocos por grupo fora do intervalo"
+
+#: misc/mke2fs.c:2553
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Funcionalidade Flex_bg não activa, não pode especificar tamanho flex_bg"
+
+#: misc/mke2fs.c:2565
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "tamanho de inode inválido %d (mín %d/máx %d)"
+
+#: misc/mke2fs.c:2580
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "inodes de %d byte muito pequenos para dados em linha; especifique um tamanho maior"
+
+#: misc/mke2fs.c:2595
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "demasiados inodes (%llu), aumentar a proporção de inodes?"
+
+#: misc/mke2fs.c:2603
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "demasiados inodes (%llu), especifique < 2^32 inodes"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"inode_size (%u) * inodes_count (%u) muito grande para um\n"
+"\tsistema de ficheiros com %llu blocos, especifique inode_ratio (-i) maior\n"
+"\tou menor total de inode (-N).\n"
+
+#: misc/mke2fs.c:2814
+msgid "Discarding device blocks: "
+msgstr "A descartar blocos de dispositivo: "
+
+#: misc/mke2fs.c:2830
+msgid "failed - "
+msgstr "falhou - "
+
+#: misc/mke2fs.c:2889
+msgid "while initializing quota context"
+msgstr "ao inicializar contexto de quota"
+
+#: misc/mke2fs.c:2896
+msgid "while writing quota inodes"
+msgstr "ao escrever inodes de quota"
+
+#: misc/mke2fs.c:2921
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "mau comportamento de erro em perfil - %s"
+
+#: misc/mke2fs.c:3000
+msgid "in malloc for android_sparse_params"
+msgstr "em malloc para android_sparse_params"
+
+#: misc/mke2fs.c:3014
+msgid "while setting up superblock"
+msgstr "ao configurar super-bloco"
+
+#: misc/mke2fs.c:3030
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Extensões não activadas. A árvore de extensões de ficheiro pode ter a checksum, mas os mapas de bloco não. Não activar as extensões reduz a cobertura das checksums de meta-dados. Passe -0 extends para rectificar.\n"
+
+#: misc/mke2fs.c:3037
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Suporte a sistemas de ficheiros 64 bits não activado. Os campos maiores oferecidos por esta funcionalidade activam as checksums de máxima força. Passe -0 64bit para rectificar\n"
+
+#: misc/mke2fs.c:3045
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "A funcionalidade metadata_csum_seed requer a funcionalidade metadata_csum.\n"
+
+#: misc/mke2fs.c:3069
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "Descarte com sucesso e devolverá 0s - a saltar limpeza da tabela de inodes\n"
+
+#: misc/mke2fs.c:3168
+#, c-format
+msgid "unknown os - %s"
+msgstr "so desconhecido - %s"
+
+#: misc/mke2fs.c:3231
+msgid "Allocating group tables: "
+msgstr "A alocar tabelas de grupo: "
+
+#: misc/mke2fs.c:3239
+msgid "while trying to allocate filesystem tables"
+msgstr "ao tentar alocar tabelas de sistemas de ficheiros"
+
+#: misc/mke2fs.c:3254
+msgid "while unmarking bad blocks"
+msgstr "ao desmarcar maus blocos"
+
+#: misc/mke2fs.c:3265
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tao converter bitmap de sub-cluster"
+
+#: misc/mke2fs.c:3274
+msgid "while calculating overhead"
+msgstr "ao calcular overhead"
+
+#: misc/mke2fs.c:3293
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s pode estar mais comprometido pela re-escrita do super-bloco\n"
+
+#: misc/mke2fs.c:3334
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "ao pôr a zero o bloco %llu no final do sistema de ficheiros"
+
+#: misc/mke2fs.c:3347
+msgid "while reserving blocks for online resize"
+msgstr "ao reservar blocos para redimensionamento em linha"
+
+#: misc/mke2fs.c:3359 misc/tune2fs.c:1569
+msgid "journal"
+msgstr "diário"
+
+#: misc/mke2fs.c:3371
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "A adicionar diário ao dispositivo %s: "
+
+#: misc/mke2fs.c:3378
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tao tentar adicionar diário ao dispositivo %s"
+
+#: misc/mke2fs.c:3383 misc/mke2fs.c:3413 misc/mke2fs.c:3455
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1598 misc/tune2fs.c:1620
+msgid "done\n"
+msgstr "feito\n"
+
+#: misc/mke2fs.c:3390
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "A saltar criação de diário em modo super-only\n"
+
+#: misc/mke2fs.c:3400
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "A criar diário (%u blocos): "
+
+#: misc/mke2fs.c:3409
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tao tentar criar diário"
+
+#: misc/mke2fs.c:3421 misc/tune2fs.c:1172
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Erro ao activar funcionalidade de protecção de múltipla montagem."
+
+#: misc/mke2fs.c:3426
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Protecção de múltipla montagem activada com intervalo de actualização de %d segundos.\n"
+
+#: misc/mke2fs.c:3446
+msgid "Copying files into the device: "
+msgstr "A copiar ficheiros para o dispositivo: "
+
+#: misc/mke2fs.c:3452
+msgid "while populating file system"
+msgstr "ao povoar o sistema de ficheiros"
+
+#: misc/mke2fs.c:3459
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "A escrever super-blocos e informação de contabilidade do sistema de ficheiros: "
+
+#: misc/mke2fs.c:3466
+msgid "while writing out and closing file system"
+msgstr "ao escrever e fechar o sistema de ficheiros"
+
+#: misc/mke2fs.c:3469
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"feito\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "ao pôr a zero o bloco %llu para ficheiro enorme"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Desvio de partição de %llu (%uk) blocos não é compatível com o tamanho do cluster %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Ficheiros enormes serão postos a zero\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "a criar %lu ficheiros enormes "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "com %llu blocos cada"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "ao criar ficheiro enorme %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Uso: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Uso: %s dispositivo...\n"
+"\n"
+"Imprime a informação da partição para cada dispositivo indicado.\n"
+"Por exemplo: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Impossível abrir %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Impossível obter a geometria de %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Impossível obter o tamanho de %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d início=%8d tamanho=%8lu fim=%8d\n"
+
+#: misc/tune2fs.c:120
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Esta operação requer um sistema de ficheiros acabado de verificar.\n"
+
+#: misc/tune2fs.c:122
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Por favor, execute e2fsck -f no sistema de ficheiros.\n"
+
+#: misc/tune2fs.c:124
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Por favor, execute e2fsck -fD no sistema de ficheiros.\n"
+
+#: misc/tune2fs.c:137
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Uso: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g grupo]\n"
+"\t[-i intervalo[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u utilizador] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]funcionalidade[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] dispositivo\n"
+
+#: misc/tune2fs.c:228
+msgid "Journal superblock not found!\n"
+msgstr "Super-bloco de diário não encontrado!\n"
+
+#: misc/tune2fs.c:286
+msgid "while trying to open external journal"
+msgstr "ao tentar abrir diário externo"
+
+#: misc/tune2fs.c:292 misc/tune2fs.c:2894
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s não é dispositivo de diário.\n"
+
+#: misc/tune2fs.c:301 misc/tune2fs.c:2903
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Super-bloco de diário corrompido, nr_users\n"
+"muito alto (%d).\n"
+
+#: misc/tune2fs.c:308 misc/tune2fs.c:2910
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID do sistema de ficheiros não encontrada no dispositivo de diário.\n"
+
+#: misc/tune2fs.c:332
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Impossível localizar o dispositivo de diário. NÃO foi removido\n"
+"Use a opção -f para remover o dispositivo de diário em falta.\n"
+
+#: misc/tune2fs.c:341
+msgid "Journal removed\n"
+msgstr "Diário removido\n"
+
+#: misc/tune2fs.c:385
+msgid "while reading bitmaps"
+msgstr "ao ler bitmaps"
+
+#: misc/tune2fs.c:393
+msgid "while clearing journal inode"
+msgstr "ao limpar inode de diário"
+
+#: misc/tune2fs.c:406
+msgid "while writing journal inode"
+msgstr "ao escrever inode de diário"
+
+#: misc/tune2fs.c:442 misc/tune2fs.c:467 misc/tune2fs.c:480
+msgid "(and reboot afterwards!)\n"
+msgstr "(e reiniciar depois!)\n"
+
+#: misc/tune2fs.c:495
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Após executar e2fsck, por favor execute `resize2fs %s %s"
+
+#: misc/tune2fs.c:498
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Por favor, execute `resize2fs %s %s"
+
+#: misc/tune2fs.c:502
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:504
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "' para activar o modo 64-bit.\n"
+
+#: misc/tune2fs.c:506
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "' para desactivar o modo 64-bit.\n"
+
+#: misc/tune2fs.c:1074
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"AVISO: impossível confirmar o suporte do kernel a metadata_csum_seed.\n"
+" Isto requer o Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1110
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Funcionalidade \"%s\" de limpeza do sistema de ficheiros não suportada.\n"
+
+#: misc/tune2fs.c:1116
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Funcionalidade \"%s\" de definição do sistema de ficheiros não suportada.\n"
+
+#: misc/tune2fs.c:1125
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"A funcionalidade has_journal só pode ser limpa quando o sistema de ficheiros estiver\n"
+"desmontado ou montado como só-de-leitura.\n"
+
+#: misc/tune2fs.c:1133
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"A bandeira needs_recovery está definida. Por favor, execute e2fsck antes de limpar\n"
+"a bandeira has_journal.\n"
+
+#: misc/tune2fs.c:1151
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Definiçã da funcionalidade \"sparse_super\" do sistema de ficheiros não suportada\n"
+"em sistemas de ficheiros com meta_bg feature activa.\n"
+
+#: misc/tune2fs.c:1164
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"A funcionalidade de protecção de montagem múltipla não\n"
+"pode ser definida se o sistema de ficheiros estiver montado\n"
+"seja só de leitura.\n"
+
+#: misc/tune2fs.c:1182
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Protecção de montagem múltipla activada com intervalo de actualização de %ds.\n"
+
+#: misc/tune2fs.c:1191
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"A funcionalidade de protecção de montagem múltipla não pode\n"
+"ser desactivada se o sistema de ficheiros for só de leitura.\n"
+
+#: misc/tune2fs.c:1199
+msgid "Error while reading bitmaps\n"
+msgstr "Erro ao ler bitmaps\n"
+
+#: misc/tune2fs.c:1208
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "O número mágico no bloco MMP não corresponde. Esperado: %x, actual: %x\n"
+
+#: misc/tune2fs.c:1213
+msgid "while reading MMP block."
+msgstr "ao ler bloco MMP."
+
+#: misc/tune2fs.c:1246
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Desactivar o índice da pasta no sistema de ficheiros com checksums pode levar algum tempo."
+
+#: misc/tune2fs.c:1250
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Impossível desactivar dir_index num sistema de ficheiros montado!\n"
+
+#: misc/tune2fs.c:1263
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Limpar a bandeira flex_bg faria com que o sistema de ficheiros se\n"
+"tornasse inconsistente.\n"
+
+#: misc/tune2fs.c:1274
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"A funcionalidade huge_file só pode ser limpa quando o sistema de ficheiros estiver\n"
+"desmontado ou montado só-de-leitura.\n"
+
+#: misc/tune2fs.c:1285
+msgid "Enabling checksums could take some time."
+msgstr "Activar as checksums pode levar algum tempo."
+
+#: misc/tune2fs.c:1288
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Impossível activar metadata_csum num sistema de ficheiros montado!\n"
+
+#: misc/tune2fs.c:1294
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Extents não estão activas. A árvore de extensão do ficheiro pode aceitar a checksum, mas os mapas de bloco não. Não activar as extensões reduz a cobertura das checksums de meta-dados. Re-execute com -O extent para rectificar.\n"
+
+#: misc/tune2fs.c:1301
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Suporte a sistemas de ficheiros de 64-bit não activo. Os campos mais largos oferecidos por esta funcionalidade permitem as checksums de máxima força. Execute resize2fs -b para rectificar.\n"
+
+#: misc/tune2fs.c:1327
+msgid "Disabling checksums could take some time."
+msgstr "Desactivar as checksums pode levar algum tempo."
+
+#: misc/tune2fs.c:1330
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Impossível desactivar metadata_csum num sistema de ficheiros montado!\n"
+
+#: misc/tune2fs.c:1371
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Impossível activar uninit_bg num sistema de ficheiros montado!\n"
+
+#: misc/tune2fs.c:1386
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Impossível desactivar uninit_bg num sistema de ficheiros montado!\n"
+
+#: misc/tune2fs.c:1405
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Impossível activar o modo 64-bit enquanto montado!\n"
+
+#: misc/tune2fs.c:1415
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Impossível desactivar o modo 64-bit enquanto montado!\n"
+
+#: misc/tune2fs.c:1445
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Impossível activar a funcionalidade do projecto; tamanho de inode muito pequeno.\n"
+
+#: misc/tune2fs.c:1466
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Aviso: a opção \"^quota\" sobrpõe-se a argumentos \"-Q\".\n"
+
+#: misc/tune2fs.c:1483 misc/tune2fs.c:2244
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "A funcionalidade casefold só pode ser activada com o sistema de ficheiros desmontado.\n"
+
+#: misc/tune2fs.c:1495
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Definir a funcionalidade \"metadata_csum_seed\" só é suportado\n"
+"em sistemas de ficheiroscom a funcionalidade metadata_csum activa.\n"
+
+#: misc/tune2fs.c:1513
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"UUID alterada desde a activação de metadata_csum. O sistema de ficheiros tem de ser\n"
+"desmontado para reescrever com segurança os meta-dados correspondentes à nova UUID.\n"
+
+#: misc/tune2fs.c:1519
+msgid "Recalculating checksums could take some time."
+msgstr "Recalcular as checksums pode levar algum tempo."
+
+#: misc/tune2fs.c:1562
+msgid "The filesystem already has a journal.\n"
+msgstr "O sistema de ficheiros já tem um diário.\n"
+
+#: misc/tune2fs.c:1582
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tao tentar abrir o diário em %s\n"
+
+#: misc/tune2fs.c:1586
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "A criar diário no dispositivo %s: "
+
+#: misc/tune2fs.c:1594
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "ao adicionar sistema de ficheiros ao diário em %s"
+
+#: misc/tune2fs.c:1600
+msgid "Creating journal inode: "
+msgstr "A criar inode de diário: "
+
+#: misc/tune2fs.c:1614
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tao tentar criar ficheiros de diário"
+
+#: misc/tune2fs.c:1656
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Impossível activar quota do projecto; tamanho de inode muito pequeno.\n"
+
+#: misc/tune2fs.c:1669
+msgid "while initializing quota context in support library"
+msgstr "ao inicializar contexto de quota em biblioteca de suporte"
+
+#: misc/tune2fs.c:1684
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "ao actualizar limites de quota (%d)"
+
+#: misc/tune2fs.c:1694
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "ao escrever ficheiro de quota (%d)"
+
+#: misc/tune2fs.c:1712
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "ao remover ficheiro de quota (%d)"
+
+#: misc/tune2fs.c:1755
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Más opções de quota especificadas.\n"
+"\n"
+"Estão disponíveis as seguintes opções válidas de quota (passe separadas por vírgulas):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1813
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Impossível analisar especificador de data/hora: %s"
+
+#: misc/tune2fs.c:1845 misc/tune2fs.c:1856
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "total de montagem mau - %s"
+
+#: misc/tune2fs.c:1899
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "mau nome de gid/grupo - %s"
+
+#: misc/tune2fs.c:1932
+#, c-format
+msgid "bad interval - %s"
+msgstr "mau intervalo - %s"
+
+#: misc/tune2fs.c:1961
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "má proporção de bloco reservado - %s"
+
+#: misc/tune2fs.c:1976
+msgid "-o may only be specified once"
+msgstr "-o só pode ser especificado uma vez"
+
+#: misc/tune2fs.c:1985
+msgid "-O may only be specified once"
+msgstr "-O só pode ser especificado uma vez"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "mau total de blocos reservados - %s"
+
+#: misc/tune2fs.c:2031
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "mau nome de uid/utilizador - %s"
+
+#: misc/tune2fs.c:2048
+#, c-format
+msgid "bad inode size - %s"
+msgstr "mau tamanho de inode - %s"
+
+#: misc/tune2fs.c:2055
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Tamanho de inode tem de ser uma potência de 2- %s"
+
+#: misc/tune2fs.c:2155
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval muito grande: %lu\n"
+
+#: misc/tune2fs.c:2160
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "A definir intervalo de actualização de protecção de montagem múltipla para %lu segundo\n"
+msgstr[1] "A definir intervalo de actualização de protecção de montagem múltipla para %lu segundos\n"
+
+#: misc/tune2fs.c:2169
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "A definir bandeira de erro do sistema de ficheiros para forçar fsck.\n"
+
+#: misc/tune2fs.c:2187
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Passo RAID inválido: %s\n"
+
+#: misc/tune2fs.c:2202
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Largura de banda RAID inválida: %s\n"
+
+#: misc/tune2fs.c:2217
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algoritmo hash inválido: %s\n"
+
+#: misc/tune2fs.c:2223
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "A predefinir algoritmo hash para %s (%d)\n"
+
+#: misc/tune2fs.c:2250
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Impossível alterar a codificação existente\n"
+
+#: misc/tune2fs.c:2256
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "Codificação inválida: %s\n"
+
+#: misc/tune2fs.c:2262
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr ""
+"A definir codificação para \"%s\"\n"
+"\n"
+
+#: misc/tune2fs.c:2286
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "A definir encoding_flags como \"%s\"\n"
+
+#: misc/tune2fs.c:2296
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Especificou más opções.\n"
+"\n"
+"Opções estendidas são separadas por vírgulas e podem receber um argumento\n"
+"\tiniciado por um sinal de igual (\"=\").\n"
+"\n"
+"As opções estendidas válidas são:\n"
+"\tclear_mmp\n"
+"\thash_alg=<algoritmo hash>\n"
+"\tmount_opts=<opções de montagem estendidas predefinidas>\n"
+"\tmmp_update_interval=<intervalo de actualização mmp em segundos>\n"
+"\tstride=<tamanho de bocado de RAID por-disco em blocos>\n"
+"\tstripe_width=<RAID passo*discos de dados em blocos>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<codificação>\n"
+"\tencoding_flags=<bandeiras>\n"
+"\n"
+
+#: misc/tune2fs.c:2712
+msgid "Failed to read inode bitmap\n"
+msgstr "Falha ao ler bitmap de inode\n"
+
+#: misc/tune2fs.c:2717
+msgid "Failed to read block bitmap\n"
+msgstr "Falha ao ler bitmap de bloco\n"
+
+#: misc/tune2fs.c:2734 resize/resize2fs.c:1284
+msgid "blocks to be moved"
+msgstr "blocos a mover"
+
+#: misc/tune2fs.c:2737
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Falha ao alocar bimap de bloco ao aumentar tamanho do inode\n"
+
+#: misc/tune2fs.c:2743
+msgid "Not enough space to increase inode size \n"
+msgstr "Sem espaço suficiente para aumentar tamanho do inode \n"
+
+#: misc/tune2fs.c:2748
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Falha ao relocalizar blocos durante o redimensionamento do inode \n"
+
+#: misc/tune2fs.c:2780
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Erro ao redimensionar o inode.\n"
+"Execute e2undo para desfazer as alterações ao sistema de ficheiros. \n"
+
+#: misc/tune2fs.c:2991
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Se tem a certeza de que o sistema de ficheiros não está em uso em nenhum nó, execute:\n"
+"\"tune2fs -f -E clear_mmp {dispositivo}\"\n"
+
+#: misc/tune2fs.c:2998
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"A magia do bloco MMP está má. Tente repará-la executando:\n"
+"\"e2fsck -f %s\"\n"
+
+#: misc/tune2fs.c:3010
+msgid "Cannot modify a journal device.\n"
+msgstr "Impossível modificar um dispositivo de diário.\n"
+
+#: misc/tune2fs.c:3023
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "O tamanho do inode já é %lu\n"
+
+#: misc/tune2fs.c:3030
+msgid "Shrinking inode size is not supported\n"
+msgstr "Diminuição do tamanho do inode não suportada\n"
+
+#: misc/tune2fs.c:3035
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Tamanho de inode inválido %lu (máx %d)\n"
+
+#: misc/tune2fs.c:3041
+msgid "Resizing inodes could take some time."
+msgstr "Redimensionar inodes pode levar algum tempo."
+
+#: misc/tune2fs.c:3090
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Aviso: o diário está sujo. Poderá querer reproduzir o diário assim:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"e depois re-executar este comando. Senão, quaisquer alterações podem ser sobrescritas\n"
+"pela recuperação do diário.\n"
+
+#: misc/tune2fs.c:3099
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "A recuperar diário.\n"
+
+#: misc/tune2fs.c:3123
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "A definir máximo de total de montagens para %d\n"
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "A definir total de montagens actual para %d\n"
+
+#: misc/tune2fs.c:3134
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "A definir comportamento de erro para %d\n"
+
+#: misc/tune2fs.c:3139
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "A definir gid de blocos reservados para %lu\n"
+
+#: misc/tune2fs.c:3144
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "intervalo entre verificações muito grande (%lu)"
+
+#: misc/tune2fs.c:3151
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "A definir intervalo entre verificações para %lu segundos\n"
+
+#: misc/tune2fs.c:3158
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "A definir percentagem de blocos reservados para %g%% (%llu blocos)\n"
+
+#: misc/tune2fs.c:3165
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "total de blocos reservados muito grande (%llu)"
+
+#: misc/tune2fs.c:3172
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "A definir total de blocos reservados para %llu\n"
+
+#: misc/tune2fs.c:3177
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"O sistema de ficheiros já tem super-blocos esparsos.\n"
+
+#: misc/tune2fs.c:3180
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Definição de bandeira de super-bloco esparso não suportada\n"
+"em sistemas de ficheiros com a funcionalidade meta_bg activa.\n"
+
+#: misc/tune2fs.c:3190
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Bandeira de super-bloco esparso definida. %s"
+
+#: misc/tune2fs.c:3195
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Limpeza da bandeira de super-bloco esparso não suportada.\n"
+
+#: misc/tune2fs.c:3203
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "A definir hora da última verificação do sistema de ficheiros para %s\n"
+
+#: misc/tune2fs.c:3209
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "A definir uid de blocos reservados para %lu\n"
+
+#: misc/tune2fs.c:3241
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Erro ao usar clear_mmp. Tem de ser usado com -f\n"
+
+#: misc/tune2fs.c:3259
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "A funcionalidade de quota só pode ser alterada com o sistema de ficheiros desmontado.\n"
+
+#: misc/tune2fs.c:3276
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Impossível alterar a UUID deste sistema de ficheiros por ter a bandeira stable_inodes.\n"
+
+#: misc/tune2fs.c:3286
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Definir a UUID neste sistema de ficheiros pode levar algum tempo."
+
+#: misc/tune2fs.c:3303
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "A UUID só pode ser alterada com o sistema de ficheiros desmontado.\n"
+
+#: misc/tune2fs.c:3306
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Se só utiliza kernels mais recentes que o v4.4, execute \"tune2fs -O metadata_csum_seed\" e re-execute este comando.\n"
+
+#: misc/tune2fs.c:3337
+msgid "Invalid UUID format\n"
+msgstr "Formato de UUID inválido\n"
+
+#: misc/tune2fs.c:3353
+msgid "Need to update journal superblock.\n"
+msgstr "Tem de actualizar o super-bloco de diário.\n"
+
+#: misc/tune2fs.c:3375
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "O tamanho de inode só pode ser alterado com o sistema de ficheiros desmontado.\n"
+
+#: misc/tune2fs.c:3382
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Alteração de tamanho de inode não suportada em sistemas de ficheiros com a funcionalidade\n"
+"flex_bg activa.\n"
+
+#: misc/tune2fs.c:3400
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "A definir tamanho de inode %lu\n"
+
+#: misc/tune2fs.c:3404
+msgid "Failed to change inode size\n"
+msgstr "Falha ao alterar o tamanho de inode\n"
+
+#: misc/tune2fs.c:3418
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "A definir tamanho de passo para %d\n"
+
+#: misc/tune2fs.c:3423
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "A definir largura de banda para %d\n"
+
+#: misc/tune2fs.c:3430
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "A predefinir opções de montagem estendidas para \"%s\"\n"
+
+#: misc/util.c:101
+msgid "<proceeding>\n"
+msgstr "<prosseguindo>\n"
+
+#: misc/util.c:105
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Proceder mesmo assim (ou esperar %d segundos para proceder)? (y,N) "
+
+#: misc/util.c:109
+msgid "Proceed anyway? (y,N) "
+msgstr "Proceder mesmo assim? (y,N) "
+
+#: misc/util.c:136
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs forçado mesmo assim. Esperemos que /etc/mtab esteja incorrecta.\n"
+
+#: misc/util.c:141
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "não fará um %s aqui!\n"
+
+#: misc/util.c:148
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs forçado mesmo assim.\n"
+
+#: misc/util.c:164
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Impossível alocar memória para processar opções do diário!\n"
+
+#: misc/util.c:189
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Impossível encontrar dispositivo de diário correspondente a %s\n"
+
+#: misc/util.c:224
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Más opções de diário especificadas.\n"
+"\n"
+"As opções de diário são separadas por vírgulas e podem receber um argumento que\n"
+"\té definido por um sinal de igual (\"=\").\n"
+"\n"
+"As opções de diário válidas são:\n"
+"\tsize=<tamanho do diário em megabytes>\n"
+"\tdevice=<dispositivo de diário>\n"
+"\tlocation=<localização do diário>\n"
+"\n"
+"O tamanho do diário tem de estar entre 1024 e 10240000 blocos do sistema de ficheiros.\n"
+"\n"
+
+#: misc/util.c:267
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Sistema de ficheiros muito pequeno para um diário\n"
+
+#: misc/util.c:284
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"O tamanho total pedido do diário é %d blocos; tem de estar\n"
+"entre 1024 e 10240000 blocos. A abortar.\n"
+
+#: misc/util.c:292
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Tamanho total de diário muito grande para o sistema de ficheiros.\n"
+
+#: misc/util.c:305
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Este sistema de ficheiros será verificado automaticamente a cada %d montagens ou\n"
+"%g dias, o que ocorrer primeiro. Use tune2fs -c ou -i para sobrepor.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Uso: %s [-d] [-p pidfile] [-s socketpath] [-T expiração]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n num] [-s socketpath]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "maus argumentos"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "ligar"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "escrever"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "ler total"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "mau tamanho de resposta"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "daemon uuidd já em execução em pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Impossível criar unix stream socket: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Impossível vincular unix socket %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Impossível ouvir em unix socket %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Erro ao ler do cliente, tam = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operação %d, núm entrada = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Hora UUID gerada: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "UUID aleatória gerada: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Hora UUID gerada %s e %d UUID subsequente\n"
+msgstr[1] "Hora UUID gerada %s e %d UUIDs subsequentes\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Geradas %d UUIDs:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Operação %d inválida\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Mau número: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Erro ao chamar o daemon uuidd (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s e %d UUID subsequente\n"
+msgstr[1] "%s e %d UUIDs subsequentes\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Lista de UUIDs:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Tamanho de resposta inesperado do servidor %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Impossível matar uuidd em execução em pid %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Matada uuidd em execução em pid %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Uso: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "Despejo # Extent:\n"
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNúm=%llu, Tamanho=%llu, Cursor=%llu, Ordenados=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Uso: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] dispositivo [-b|-s|new_size] [-S passo-RAID] [-z undo_file]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "A estender tabela de inodes"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "A relocalizar blocos"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "A analisar tabela de inodes"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "A actualizar referências de inodes"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "A mover tabela de inodes"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Passagem desconhecida!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Passagem inicial %d (máx = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"O redimensionamento do sistema de ficheiros bigalloc não está completamente testado. Proceda\n"
+"por sua conta e risco! Use a opção de forçar se pretende continuar de qualquer forma.\n"
+"\n"
+
+#: resize/main.c:368
+#, c-format
+msgid "while opening %s"
+msgstr "ao abri %s"
+
+#: resize/main.c:376
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "ao obter estatísticas para %s"
+
+#: resize/main.c:457
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Por favor, execute \"e2fsck -f %s\" primeiro.\n"
+"\n"
+
+#: resize/main.c:476
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Tamanho mínimo estimado do sistema de ficheiros: %llu\n"
+
+#: resize/main.c:516
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Novo tamanho inválido: %s\n"
+
+#: resize/main.c:535
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Novo tamanho muito grade para ser expressado em 32 bits\n"
+
+#: resize/main.c:548
+msgid "New size results in too many block group descriptors.\n"
+msgstr "Novos resultados de tamanho em demasiados descritores de grupos de bloco.\n"
+
+#: resize/main.c:555
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Novo tamanho menor que o mínimo (%llu)\n"
+
+#: resize/main.c:562
+msgid "Invalid stride length"
+msgstr "Tamanho de passo inválido"
+
+#: resize/main.c:586
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"A partição contentora (ou dispositivo) só tem %llu (%dk) blocos.\n"
+"Pediu um novo tamanho de %llu blocos.\n"
+"\n"
+
+#: resize/main.c:593
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Impossível definir e limpar a funcionalidade 64bit.\n"
+
+#: resize/main.c:597
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Impossível alterar a funcionalidade 64bit num sistema de ficheiros maior que 2^32 blocos.\n"
+
+#: resize/main.c:603
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Impossível alterar a funcionalidade 64bit enquanto o sistema de ficheiros estiver montado.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Por favor, active a funcionalidade de extensões com tune2fs antes de activar a funcionalidade 64bit.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"O sistema de ficheiros já tem %llu (%dk) blocos. Nada a fazer!\n"
+"\n"
+
+#: resize/main.c:623
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "O sistema de ficheiros já é 64-bit.\n"
+
+#: resize/main.c:628
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "O sistema de ficheiros já é 32-bit.\n"
+
+#: resize/main.c:633
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Impossível encolher este sistema de ficheiros porque está marcado com a bandeira stable_inodes.\n"
+
+#: resize/main.c:642
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "A converter o sistema de ficheiros para 64-bit.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "A converter o sistema de ficheiros para 32-bit.\n"
+
+#: resize/main.c:646
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "A redimensionar o sistema de ficheiros em %s para %llu (%dk) blocos.\n"
+
+#: resize/main.c:656
+#, c-format
+msgid "while trying to resize %s"
+msgstr "ao tentar redimensionar %s"
+
+#: resize/main.c:659
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Por favor, execute \"e2fsck -fy %s\" para reparar o sistema de ficheiros\n"
+"após a operação de redimensionamento abortada.\n"
+
+#: resize/main.c:664
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"O sistema de ficheiros em %s tem agora %llu (%dk) blocos.\n"
+"\n"
+
+#: resize/main.c:679
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "ao tentar truncar %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "o kernel não suporta redimensionamento em linha com sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "Sistema de ficheiros em %s está montado em %s; requerido redimensionamento em linha\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Diminuição em linha não suportada"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "O sistema de ficheiros não suporta redimensionamento em linha"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Sem blocos gdt reservados suficientes para redimensionar"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "O kernel não suporta redimensionar um sistema de ficheiros tão grande"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "ao tentar abrir ponto de montagem %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Pedida uma interface de redimensionamento antiga.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Permissão negada para redimensionar o sistema de ficheiros"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Ao verificar suporte a redimensionamento em linha"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "O kernel não suporta redimensionamento em linha"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "A realizar redimensionamento em linha de %s para %llu (%dk) blocos.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Ao tentar estender o último grupo"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Ao tentar adicionar o grupo nº %d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "Sistema de ficheiros em %s montado em %s e o redimensionamento em linha não é suportado neste sistema.\n"
+
+#: resize/resize2fs.c:760
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "inodes (%llu) têm de ser menos de %u\n"
+
+#: resize/resize2fs.c:1039
+msgid "reserved blocks"
+msgstr "blocos reservados"
+
+#: resize/resize2fs.c:1289
+msgid "meta-data blocks"
+msgstr "blocos de meta-dados"
+
+#: resize/resize2fs.c:1393 resize/resize2fs.c:2435
+msgid "new meta blocks"
+msgstr "novos meta-blocos"
+
+#: resize/resize2fs.c:2659
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Nunca devia acontecer! Sem sb no último super_sparse bg?\n"
+
+#: resize/resize2fs.c:2664
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Nunca devia acontecer! old_desc inesperado em super_sparse bg?\n"
+
+#: resize/resize2fs.c:2737
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Nunca devia acontecer! inode de redimensionamento corrompido!\n"
+
+# Version could be replaced by a variable, avoiding a new translation.
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.3"
+msgstr "EXT2FS Library versão 1.46.3"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Número mágico errado para estrutura ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Número mágico errado para estrutura badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Número mágico errado para estrutura badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Número mágico errado para estrutura inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Número mágico errado para estrutura io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Número mágico errado para estrutura unix io_channel"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Número mágico errado para estrutura io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Número mágico errado para estrutura block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Número mágico errado para estrutura inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Número mágico errado para estrutura generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Número mágico errado para estrutura test io_channel"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Número mágico errado para estrutura directory block list"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Número mágico errado para estrutura icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Número mágico errado para estrutura Powerquest io_channel"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Número mágico errado para estrutura ext2 file"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Número mágico errado para Ext2 Image Header"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Número mágico errado para estrutura inode io_channel"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Número mágico errado para gestor de extensão ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Mau número mágico em super-bloco"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Revisão do sistema de ficheiros muito alta"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Tentativa de escrever num sistema de ficheiros só-de-leitura"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Impossível ler descritores de grupo"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Impossível escrever descritores de grupo"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Descritor de grupo corrompido: mau bloco para bitmap de bloco"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Descritor de grupo corrompido: mau bloco para bitmap de inode"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Descritor de grupo corrompido: mau bloco para tabela de inodes"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Impossível escrever um bitmap de inode"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Impossível ler um bitmap de inode"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Impossível escrever um bitmap de bloco"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Impossível ler um bitmap de bloco"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Impossível escrever uma tabela de inodes"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Impossível ler uma tabela de inodes"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Impossível ler inode seguinte"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Sistema de ficheiros com tamanho de bloco inesperado"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Pasta EXT2 corrompida"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Tentativa de ler bloco do sistema de ficheiros resultou em leitura curta"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Tentativa de escrever bloco no sistema de ficheiros resultou em escrita curta"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Sem espaço livre na pasta"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Bitmap de inode não carregado"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Bitmap de bloco não carregado"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Número de inode ilegal"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Número de bloco ilegal"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Erro interno em ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Sem espaço suficiente para construir o sistema de ficheiros proposto"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Número de bloco ilegal passado a ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Número de bloco ilegal passado a ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Número de bloco ilegal passado a ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Número de inode ilegal passado a ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Número de inode ilegal passado a ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Número de inode ilegal passado a ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Tentativa de falsificar fim do bitmap de bloco além do fim real"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Tentativa de falsificar fim do bitmap de inode além do fim real"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Encontrado bloco indirecto ilegal"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Encontrado bloco indirecto ilegal duplo"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Encontrado bloco indirecto ilegal triplo"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Bitmaps de bloco não são os mesmos"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Bitmaps de inode não são os mesmos"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Nome de dispositivo ilegal ou mal formado"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Um grupo de bloco tem tabela de inodes em falta"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "O super-bloco ext2 está corrompido"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Número de bit genérico ilegal passado a ext2fs_mark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Número de bit genérico ilegal passado a ext2fs_unmark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Número de bit genérico ilegal passado a ext2fs_test_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Encontradas demasiadas ligações simbólicas."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "A função de retorno de chamada não lidará com este caso"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "O inode é de um mau bloco na tabela de inodes"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "O sistema de ficheiros tem funcionalidades não suportadas"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "O sistema de ficheiros tem funcionalidades só-de-leitura não suportadas"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Canal IO falhou a procura ao ler ou escrever"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Falha ao alocar memória"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Argumento inválido passado a biblioteca ext2"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Impossível alocar bloco em sistema de ficheiros ext2"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Impossível alocar inode em sistema de ficheiros ext2"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Inode ext2 não é uma pasta"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Demasiadas referências na tabela"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Ficheiro não encontrado por ext2_lookup"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Ficheiro aberto só-de-leitura"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Bloco de pasta ext2 não encontrado"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Pasta ext2 já existe"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Função de biblioteca ext2 não implementada"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Pedido cancelado pelo utilizador"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Ficheiro ext2 muito grande"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Dispositivo de diário indicado não é dispositivo de bloco"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Super-bloco de diário não encontrado"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "O diário tem de ter pelo menos 1024 blocos"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Versão de diário não suportada"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Erro ao carregar diário externo"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Diário não encontrado"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Hash de pasta não suportada"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Número de bloco de atributo estendido ilegal"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Impossível criar sistema de ficheiros com o número de inodes pedido"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Instantâneo E2image não está em uso"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Demasiados blocos de descritores de grupo reservados"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Inode redimensionado está corrompido"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Tentativa de definir bitmap de bloco com bloco indirecto em falta"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: successo"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: base de dados corrompida"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: erro de E/S"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: erro de bloqueio"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: memória esgotada"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: registo existe"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: bloqueio existe noutras teclas"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: parâmetro inválido"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: registo não existe"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: escrita não permitida"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Lista de blocos de pasta Ext2fs vazia"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Tentativa de modificar um mapeamento de bloco via iterador de bloco só-de-leitura"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Número mágico errado para caminho gravado de ext4 extent"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Número mágico errado para bitmap genérico de 64-bit"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Número mágico errado para bitmap de bloco de 64-bit"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Número mágico errado para bitmap de inode de 64-bit"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Número mágico errado --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Número mágico errado --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Número mágico errado --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Número mágico errado --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Número mágico errado --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Número mágico errado --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Número mágico errado --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Cabeçalho de extensão corrompido"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Ãndice de extensão corrompido"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Extensão corrompida"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Sem espaço livre em mapa de extensão"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Inode não usa extensões"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Sem extensão \"next\""
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Sem extensão \"previous\""
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Sem extensão \"up\""
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Sem extensão \"down\""
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Sem nó actual"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Operação Ext2fs não suportada"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Sem espaço para inserir extensão no nó"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "A divisão resultaria num nó vazio"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Extensão não encontrada"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Operação não suportada em inodes contendo extensões"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Tamanho de extensão inválido"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "Canal de E/S não suporta números de bloco de 64-bit"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Impossível verificar se o sistema de ficheiros está montado devido a ficheiro mtab em falta"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Sistema de ficheiros muito grande para usar bitmaps antigos"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: número mágico inválido"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: dispositivo actualmente activo"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: e2fsck em execução"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: número de bloco fora do intervalo do sistema de ficheiros"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: operação desconhecida em curso"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: sistema de ficheiros ainda em uso"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: falha ao abrir com O_DIRECT"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Tamanho de descritor de grupo de blocos incorrecto"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Checksum de inode não corresponde ao inode"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Checksum de bitmap de inode não corresponde ao bitmap"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Checksum de bloco estendido não corresponde ao bloco estendido"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Bloco de pasta não tem espaço para a checksum"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Checksum de bloco de pasta não corresponde ao bloco de pasta"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Checksum de bloco de atributo estendido não corresponde ao bloco"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Checksum de super-bloco não corresponde ao super-bloco"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Algoritmo de checksum desconhecido"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Checksum de bloco MMP não corresponde"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ficheiro ext2 já existe"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Checksum de bitmap de bloco não corresponde ao bitmap"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Impossível iterar blocos de dados de um inode contendo dados em linha"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Atributo estendido tem um tamanho de nome inválido"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Atributo estendido tem um tamanho de valor inválido"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Atributo estendido tem uma hash incorrecta"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Bloco de atributo estendido tem um mau cabeçalho"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Chave de atributo estendido não encontrada"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Espaço insuficiente para armazenar dados de atributo estendido"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Sistema de ficheiros com funcionalidades ext_attr ou inline_data em falta"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "O inode não tem dados em linha"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Sem bloco para inode com dados em linha"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Sem espaço livre em dados em linha"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Número mágico errado para estrutura de atributo estendido"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "O inode parece conter lixo"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Atributo estendido com um desvio de valor inválido"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Bandeiras de diário inconsistentes"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Ficheiro de desfazer corrompido"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Ficheiro de desfazer errado para este sistema de ficheiros"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Sistema de ficheiros corrompido"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Mau CRC detectado no sistema de ficheiros"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Super-bloco de diário corrompido"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Inode corrompido"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "O inode contendo o valor do atributo estendido está corrompido"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Descritores de grupo não carregados"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "A estrutura de dados interna ext2_filsys parece estar corrompida"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profile versão 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Mau valor mágico em profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Secção de perfil não encontrada"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Relação de perfil não encontrada"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Tentativa de adicionar uma relação a nó que não é uma secção"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Um cabeçalho de secção de perfil tem valor não-zero"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Má lista ligada em estruturas de perfil"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Mau nível de grupo em estruturas de perfil"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Mau ponteiro-mãe em estruturas de perfil"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Mau valor mágico em iterador de perfil"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Impossível definir valor em nó de secção"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Argumento inválido passado a biblioteca de perfil"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Tentativa de modificar perfil só-de-leitura"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Cabeçalho de secção de perfil não está no nível de topo"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Erro de sintaxe em cabeçalho de secção de perfil"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Erro de sintaxe em relação de perfil"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Chaveta de fecho extra em perfil"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Chaveta de abertura em falta em perfil"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Mau valor mágico em profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Mau valor mágico em profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Iteração em todas as secções de nível de topo não suportada"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Objecto profile_section inválido"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Sem mais secções"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Mau nameset passado a rotina de consulta"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Sem perfil aberto"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Mau valor mágico em profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Impossível abrir ficheiro de perfil"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Secção já existente"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Valor booleano inválido"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Valor inteiro inválido"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Mau valor mágico em profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\túltima montagem em %.*s em %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\túltima montagem em %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tcriado em %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\túltima modificação em %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Encontrada uma tabela de partições %s em %s\n"
+
+#: lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "O ficheiro %s não existe e não foi especificado um tamanho.\n"
+
+#: lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "A criar ficheiro normal %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Impossível abrir %s: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Aparentemente, o dispositivo não existe; especificou-o correctamente?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s não é um dispositivo especial de bloco.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s contém um sistema de ficheiros %s rotulado \"%s\"\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s contém um sistema de ficheiros %s\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s contém dados \"%s\"\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "Uso: %s [-F] [-I inode_buffer_blocks] dispositivo\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "ao tentar abrir '%s'"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "%u inodes analisados.\n"
+
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "As funcionalidades encrypt e casefold não são compatíveis.\n"
+#~ "Não podem estar activas simultaneamente.\n"
+
+#~ msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+#~ msgstr "Impossível activar a funcionalidade de encriptação em sistemas de ficheiros com codificação activa.\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "ao abrir a pasta \"%s\""
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1â€/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“â€/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/sr.gmo b/po/sr.gmo
new file mode 100644
index 0000000..3b80fad
--- /dev/null
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
new file mode 100644
index 0000000..f25838d
--- /dev/null
+++ b/po/sr.po
@@ -0,0 +1,8771 @@
+# Serbian translation of e2fsprogs.
+# This file is distributed under the same license as the e2fsprogs package.
+# Translators:
+# Marko Uskokovic <uskokovic@etf.bg.ac.yu>, 2007—2008.
+# Ðлојз Јакоб <jakobyu@yahoo.com>, 2008.
+# МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>, 2016–2021.
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-17 20:32+0200\n"
+"Last-Translator: МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>\n"
+"Language-Team: Serbian <(nothing)>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Poedit 2.3\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Лош блок „%u“ је ван опÑега; занемарујем.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "приликом провере иÑправноÑти и-чвора лоших блокова"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "приликом читања и-чвора лоших блокова"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "док Ñам покушавао да отворим „%s“"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "док Ñам покушавао да п-отворим „%s“"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "приликом читања ÑпиÑка лоших блокова из датотеке"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "приликом оÑвежавања и-чвора лоших блокова"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Упозорење: нађох недозвољени блок „%u“ у и-чвору лошег блока. ОчиÑтих га.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "приликом оÑлобађања „dir_info“ тбп датотеке"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Грешка читања блока „%lu“ (%s) приликом %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Грешка читања блока „%lu“ (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Занемари грешку"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "ПриÑили препиÑивање"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Грешка пиÑања блока „%lu“ (%s) приликом %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Грешка пиÑања блока „%lu“ (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "празни блокови директоријума"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "празна мапа директоријума"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Празан блок директоријума %u (%d.) у и-чвору „%u“\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: величина блока н-блокова „%s“ назива датотеке\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Ðедозвољени број блокова!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Ðе могу да доделим међумеморију блока (величина=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "мапа и-чвора поновне изградње раÑпона"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Употреба: %s диÑк\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "„BLKFLSBUF ioctl“ није подржано! Ðе могу да преÑунем међумеморије.\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "читам Ñупер блок дневника\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: ниÑам нашао иÑправан Ñуперблок дневника\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: дневник је прекратак\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: нетачни брзи блокови предаје\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: опорављам дневник\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: нећу опоравити дневник док је Ñамо за читање\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "док Ñам покушавао поново да отворим „%s“"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "проширени атрибут"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "грешка доделе"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "блок"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "битмапа"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "Ñажми"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Ñе Ñукобљава Ñа неким другим блоком ÑиÑтема датотека"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "директоријум"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "обриÑано"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "уноÑ"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "ÑиÑтем датотека"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "ÑиÑтем датотека за и-чвор „%i“ (%Q) је"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "група"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "Ð¥-СТÐБЛО директоријума и-чвора"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "и-чвор"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "недозвољено"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "дневник"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "изгубљено+нађено"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "је веза"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "више пута затражено"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "неиÑправно"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "напуштено"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "проблем у"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "квота"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "корени и-чвор"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "треба бити"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ñупер-блок"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "није закачен"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "уређај"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "раÑпон"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "нулта дужина"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<ÐИШТÐÐ’ÐРи-чвор>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<и-чвор лоших блокова>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<и-чвор квоте кориÑника>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<и-чвор квоте групе>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<и-чвор учитавача ÑиÑтема>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<ÐеобриÑан и-чвор директоријума>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<и-чвор опиÑника групе>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<и-чвор дневника>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<РезервиÑани и-чвор 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<РезервиÑани и-чвор 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "обична датотека"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "директоријум"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "знаковни уређај"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "блок уређај"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "именована Ñпојка"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "Ñимболичка веза"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "прикључница"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "непозната врÑта датотеке Ñа режимом „0%o“"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "индиректни блок"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "двоÑтруко индиректни блок"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "троÑтруко индиректни блок"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "блок преводиоца"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "бр. блока"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "кориÑник"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "група"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "пројекат"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "непозната врÑта квоте"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "више пута затражена мапа и-чворова"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "унутрашња грешка: не могу да нађем дупли_блок за „%llu“\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "враћено из блока_датотеке_клона"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "унутрашња грешка: не могу да претражим Ð·Ð°Ð¿Ð¸Ñ Ð•Ð Ð±Ð»Ð¾ÐºÐ° за „%llu“"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "унутрашња грешка: не могу да претражим Ð·Ð°Ð¿Ð¸Ñ Ð•Ð Ð¸-чвора за „%u“"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "приликом хеширања уноÑа Ñа „e_value_inum = %u“"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "читам блок директоријума"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "добављам Ñледећи и-чвор из Ñкенираних"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "мапа и-чвора у употреби"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "мапа и-чвора директоријума"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "мапа и-чвора обичне датотеке"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "мапа блока у употреби"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "мапа блока метаподатака"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "мапа претварања и-чвора у мала Ñлова"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "отварам Ñкенирање и-чворова"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "1. пролаз"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "читам индиректне блокове и-чвора „%u“"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "лоша мапа и-чвора"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "и-чвор у мапи лошег блока"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "Ñликовна мапа и-чвора"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "више пута затражена мапа блока"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "мапа блокова Ñпољних атрибута"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): очекивах „%6lu“ а добих физички „%6lu“ (бр. блокова: %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "битмапа блока"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "битмапа и-чвора"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "табела и-чвора"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "2. пролаз"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "„NLS“ је оштећено."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "Ðе могу да наÑтавим."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "готова битмапа и-чвора"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Врхунац меморије"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "3. пролаз"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "битмапа налажења петље и-чвора"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "4. пролаз"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "5. пролаз"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "провера_Ñуме_провере_битмапе_и-чвора: Грешка доделе меморије"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "провера_Ñуме_провере_битмапе_блока: Грешка доделе меморије"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(нема упита)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "ИÑправи"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "ОчиÑти"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "ПремеÑти"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Додели"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Рашири"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Повежи Ñе Ñа „/изгубљено+нађено“"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Ðаправи"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Сачувај"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Скрати"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "ОчиÑти и-чвор"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Прекини"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Подели"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "ÐаÑтави"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Клонирај више пута затражене блокове"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Обриши датотеку"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "ПотиÑни поруке"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Развежи"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "ОчиÑти Ð¸Ð½Ð´ÐµÐºÑ Ð¥-Ñтабла"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Поново направи"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Прилагоди"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "ОчиÑти заÑтавицу"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(ÐИШТÐ)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "ИСПРÐВЉЕÐО"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "ОЧИШЋЕÐО"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "ПРЕМЕШТЕÐО"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "ДОДЕЉЕÐО"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "РÐШИРЕÐО"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "ПОÐОВО_ПОВЕЗÐÐО"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "ÐÐПРÐВЉЕÐО"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "СПÐШЕÐО"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "СКРÐЋЕÐО"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "ОБРИСÐРИ-ЧВОР"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "ПРЕКИÐУТО"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "ПОДЕЉЕÐО"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "ÐÐСТÐВЉÐÐœ"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "ВИШЕ ПУТРЗÐТРÐЖЕÐИ БЛОКОВИ СУ КЛОÐИРÐÐИ"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "ОБРИСÐÐРДÐТОТЕКÐ"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "ПОТИСÐУТО"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "РÐЗВЕЗÐÐО"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "ИÐДЕКС Ð¥-СТÐБЛРЈЕ ОЧИШЋЕÐ"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "ÐÐПРÐВИЋУ ПОÐОВО"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "ПРИЛÐГОДИЋУ"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "ЗÐСТÐВИЦРЈЕ ОЧИШЋЕÐÐ"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "Битмапа блока за групу „%g“ није у групи. (%b. блок)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "Битмапа и-чвора за групу „%g“ није у групи. (%b. блок)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"Табела и-чвора за групу „%g“ није у групи. (%b. блок)\n"
+"УПОЗОРЕЊЕ: МОГУЋ ЈЕ ЗÐÐЧÐЈÐИЈИ ГУБИТÐК ПОДÐТÐКÐ.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Ðе могу да прочитам Ñупер-блок или не опиÑује иÑправан ÑиÑтем датотека „екÑÑ‚2/екÑÑ‚3/екÑÑ‚4“.\n"
+"Ðко је уређај иÑправан и ако Ñтварно Ñадржи „екÑÑ‚2/екÑÑ‚3/екÑÑ‚4“\n"
+"ÑиÑтем датотека (а не разменÑку партицију или уÑд или нешто друго), онда је Ñупер-блок\n"
+"оштећен, онда морате покренути „e2fsck“ Ñа неким другим Ñупер-блоком:\n"
+" „e2fsck“ -b 8193 <уређај>\n"
+" или\n"
+" „e2fsck“ -b 32768 <уређај>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Величина ÑиÑтема датотека (у Ñкладу Ñа Ñупер-блоком) је %b блока\n"
+"Физичка величина уређаја је %c блока\n"
+"Ðајвероватније да је оштећен Ñупер-блок или партициона табела!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"Величина_блока Ñуперблока = %b, величина_одломка = %c.\n"
+"Ово издање „e2fsck“-а не подржава величине одломака различите\n"
+"од величине блока.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "Блокова_по_групи Ñуперблока = %b, треба да буде %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "Први_блок_података Ñуперблока = %b, треба да буде %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"СиÑтем датотека нема УУИД; Ñтварам га.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Ðапомена: ако неколико блокова и-чворова или битмапе блокова или део\n"
+"табеле и-чворова захтевају премештање, можете покушати\n"
+"прво да покренете „e2fsck“ Ñа опцијом „-b %S“. Проблем\n"
+"може бити Ñамо Ñа опиÑницима главне групе блокова, а\n"
+"опиÑници резервне копије иÑтих могу бити у реду.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Ðађох оштећење у Ñупер-блоку. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Грешка одређивања величине физичког уређаја: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "Број и-чворова у Ñуперблоку је %i, треба бити %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Хурд не подржава функцију врÑте датотеке.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Суперблок има неиÑправан дневник (%i. и-чвор).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Спољни дневник има више кориÑника ÑиÑтема датотека (није подржано).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Ðе могу да нађем Ñпољни дневник\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Спољни дневник има лош Ñуперблок\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Спољни дневник не подржава овај ÑиÑтем датотека\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Суперблок дневника ÑиÑтема датотека је непознате врÑте „%N“ (неподржано).\n"
+"Ðајвероватније да је ваш примерак „e2fsck“-а Ñтар и/или не подржава овај Ð·Ð°Ð¿Ð¸Ñ Ð´Ð½ÐµÐ²Ð½Ð¸ÐºÐ°.\n"
+"Такође може бити да је оштећен Ñуперблок дневника.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Суперблок дневника је оштећен.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "ЗаÑтавица Ñуперблока „има_дневник“ је поништена, али је дневник приÑутан.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "ЗаÑтавица Ñуперблока „захтева_опоравак“ је поÑтављена, али нема никаквог дневника.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "ЗаÑтавица Ñуперблока „захтева_опоравак“ је поништена, али дневник Ñадржи податке.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "ОчиÑти дневник"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "СиÑтем датотека има поÑтављену заÑтавицу функције, али је ревизија 0 ÑиÑтема датотека. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s напуштених и-чворова %i (уид=%Iu, гид=%Ig, режим=%Im, величина=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "Ðађох недозвољени „%B“ (%b) у напуштеном и-чвору %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Ðађох већ очишћени „%B“ (%b) у напуштеном и-чвору %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "Ðедозвољени напуштени и-чвор „%i“ у Ñуперблоку.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Ðедозвољени и-чвор „%i“ на ÑпиÑку напуштених и-чворова.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Суперблок дневника има поÑтављену непознату заÑтавицу функције Ñамо-читања.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Суперблок дневника има поÑтављену непознату неÑаглаÑну заÑтавицу функције.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Овај „e2fsck“ не подржава издање дневника.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Премештам дневник из „/%s“ у Ñкривени и-чвор.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Грешка премештања дневника: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Пронађох неиÑправна поља Ñуперблока V2 дневника (из V1 дневника).\n"
+"Бришем поља изван Ñуперблока V1 дневника...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Ипак покрени дневник"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "ЗаÑтавица опоравка није поÑтављена у Ñуперблоку резерве, тако да ипак покрећем дневник.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Правим резерву података блока и-чвора дневника.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Ðа ÑиÑтему датотека није укључена промена величине и-чвора, али „Ñ_резервиÑани_гдт_блокови“\n"
+"је %N; треба бити нула. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Ðије укључена промена величине и-чвора, али промена величине и-чвора није нула. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Промена величине и-чвора није иÑправна. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Време поÑледњег качења Ñуперблока (%t,\n"
+"\tÑада = %T) је у будућноÑти.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Време поÑледњег пиÑања Ñуперблока (%t,\n"
+"\tÑада = %T) је у будућноÑти.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Погодак Ñуперблока за Ñпољни Ñуперблок треба бити %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Додајем погодак дирхеша ÑиÑтему датотека.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Сума провере опиÑника групе „%g“ је %04x, треба бити %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "ОпиÑник групе „%g“ је означен као непокренут без поÑтављене функције.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "ОпиÑник групе „%g“ има неиÑправан број некоришћених и-чворова %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Ðије покренута битмапа поÑледњег блока групе. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "ÐŸÑ€ÐµÐ½Ð¾Ñ Ð´Ð½ÐµÐ²Ð½Ð¸ÐºÐ° „%i“ беше оштећен, одговор је прекинут.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "ЗаÑтавица „иÑпробај_Ñд“ је поÑтављена (а и екÑÑ‚4 је доÑтупан). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Време поÑледњег качења Ñуперблока је у будућноÑти.\n"
+"\t(мање од једног дана, вероватно уÑлед погрешно подешеног хардверÑког Ñата)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Време поÑледњег пиÑања Ñуперблока је у будућноÑти.\n"
+"\t(мање од једног дана, вероватно уÑлед погрешно подешеног хардверÑког Ñата)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "ÐеиÑправна је једна или неколико Ñума провере опиÑника групе блокова. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "ПоÑтављам број Ñлободних и-чворова на %j (беше %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "ПоÑтављам број Ñлободних блокова на %c (беше %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Скривам %U квоту и-чвора %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "Супер-блок има неиÑправан ММП блок. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "Супер-блок има неиÑправну ММП магију. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "екÑÑ‚2Ñд_отвори2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "екÑÑ‚2Ñд_провери_опиÑник: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "„metadata_csum“ Ñуперблока замењује „uninit_bg“; битови обе функције Ñе не могу подеÑити иÑтовремено."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "Сума провере ММП блока Ñуперблока не одговара. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "Суперблоку 64-битног ÑиÑтема датотека Ñу потребни раÑпони да би приÑтупио читавом диÑку. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "Први_мета_бг је превелик. (%N, највећа вредноÑÑ‚ је %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Сума провере Ñуперблока Ñпољног дневника не одговара Ñуперблоку. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "„metadata_csum_seed“ Ñуперблок није неопходан без „metadata_csum“."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Грешка покретања контекÑта квоте у библиотеци подршке: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Лоша затражена додатна и-величина у Ñуперблоку (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Лоша жељена додатна и-величина у Ñуперблоку (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "ÐеиÑправна %U квота и-чвора %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "Супер блок ће имати превише и-чворова (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Функције Промени_величину_и-чвора и мета_бг Ñу укључене. Те функције\n"
+"ниÑу ÑаглаÑне. Треба да иÑкључите промену_величине_и-чвора. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "1. пролаз: Проверавам и-чворове, блокове, и величине\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "корени и-чвор није директоријум. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "корени и-чвор има подешено д-време (вероватно због Ñтарог „mke2fs“-а). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "РезервиÑани и-чвор „%i“ (%Q) има неиÑправан режим. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "обриÑани и-чвор „%i“ има нулто д-време. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "и-чвор „%i“ је у употреби, али има поÑтављено д-време. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "и-чвор „%i“ је директоријум нулте дужине. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "битмапа блокова групе „%g“ на „%b“ Ñе Ñукобљава Ñа неким другим блоком ÑиÑтема датотека.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "битмапа и-чворова групе „%g“ на „%b“ Ñе Ñукобљава Ñа неким другим блоком ÑиÑтема датотека.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "табела и-чвора групе „%g“ на „%b“ Ñе Ñукобљава Ñа неким другим блоком ÑиÑтема датотека.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "битмапа блокова (%b) групе „%g“ је лоша. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "битмапа и-чвора (%b) групе „%g“ је лоша. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "и-чвор %i, и_величина је %Is, треба бити %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "и-чвор %i, и_блокова је %Ib, треба бити %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "недозвољено „%B“ (%b) у и-чвору %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "„%B“ (%b) преклапа метаподатке ÑиÑтема датотека у и-чвору %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "и-чвор „%i“ има недозвољен(е) блок(ове). "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Превише недозвољених блокова у и-чвору %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "Ðедозвољено „%B“ (%b) у и-чвору лошег блока. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "и-чвор лошег блока има недозвољен(е) блок(ове). "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "УдвоÑтручени или лош блок је у употреби!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Лош блок „%b“ Ñе кориÑти као индиректни блок и-чвора лошег блока. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"и-чвор лоших блокова је вероватно оштећен. Требало би Ñада\n"
+"да зауÑтавите и да покренете „e2fsck -c“ да видите има ли лоших блокова\n"
+"у ÑиÑтему датотека.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Ðко је блок Ñтварно лош, ÑиÑтем датотека не може бити поправљен.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Можете да уклоните тај блок Ñа ÑпиÑка лоших блокова и да Ñе надате\n"
+"да је блок Ñтварно добар. Ðли нико вам ништа не гарантује.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Примарни Ñупер-блок (%b) је на ÑпиÑку лоших блокова.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Блок „%b“ у опиÑницима примарне групе је на ÑпиÑку лоших блокова\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Упозорење: Супер-блок (%b) групе „%g“ је лош.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Упозорење: Умножак групе „%g“ опиÑника групе има лош блок (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Грешка програма? Блок бр. %b је затражен без разлога у обради_лоших_блокова.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "Грешка доделе %N непрекидна(их) блока(ова) у групи блока „%g“ за „%s“: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "грешка доделе међумеморије блока за премештање „%s“\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Премештам „%g“ групе „%s“ из „%b“ у „%c“...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Премештам „%g“ групе „%s“ у „%c“...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Упозорење: не могу да прочитам блок „%b“ од „%s“: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Упозорење: не могу да упишем блок „%b“ од „%s“: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "грешка доделе битмапе и-чвора (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "грешка доделе битмапе блокова (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "грешка доделе података везе и-броја: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "грешка доделе низа блокова директоријума: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Грешка приликом Ñкенирања и-чворова (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Грешка приликом понављања на блоковима у и-чвору „%i“: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Грешка Ñмештања података о броју и-чворова (и-чвор=%i, број=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Грешка Ñмештања података блока директоријума (и-чвор=%i, блок=%b, број=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Грешка читања и-чвора „%i“: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "и-чвор „%i“ има поÑтављену и-магичну заÑтавицу. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Ðарочита датотека (уређај/прикључница/пупи/Ñимболичка_веза) (и-чвор „%i“) има непроменљиву\n"
+"или поÑтављену заÑтавицу прикачињања-Ñамо. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Ðарочити и-чвор „%i“ (уређај/прикључница/пупи) има не-нулту величину. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "и-чвор дневника није у употреби, али Ñадржи податке. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "дневник није обична датотека. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "и-чвор „%i“ беше део ÑпиÑка напуштених и-чворова. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Ðађох и-чворове који Ñу били део оштећеног напуштеног Ñвезаног ÑпиÑка. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "грешка доделе Ñтруктуре броја упуте (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Грешка читања блока „%b“ проширеног атрибута за и-чвор „%i“. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "и-чвор „%i“ има лош блок „%b“ проширеног атрибута. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Грешка читања блока „%b“ проширеног атрибута (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "блок „%b“ проширеног атрибута има број упуте %r, треба бити %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Грешка пиÑања блока „%b“ проширеног атрибута (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "блок „%b“ проширеног атрибута има h_блокове > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "грешка доделе Ñтруктуре доделе облаÑти проширеног атрибута. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "блок „%b“ проширеног атрибута је оштећен (Ñукоб доделе). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "блок „%b“ проширеног атрибута је оштећен (неиÑправан назив). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "блок „%b“ проширеног атрибута је оштећен (неиÑправна вредноÑÑ‚). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "и-чвор „%i“ је превелик. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "„%B“ (%b) доводи до тога да директоријум буде превелик. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "„%B“ (%b) доводи до тога да датотека буде превелика. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "„%B“ (%b) доводи до тога да Ñимболичка веза буде превелика. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "и-чвор „%i“ има поÑтављену заÑтавицу „INDEX_FL“ на ÑиÑтему датотека без подршке Ñ…-Ñтабла.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "и-чвор „%i“ има поÑтављену заÑтавицу „INDEX_FL“ али није директоријум.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "и-чвор „%i“ директоријума Ð¥-СТÐБЛРима неиÑправан корени чвор.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "и-чвор „%i“ директоријума Ð¥-СТÐБЛРима неподржано издање хеша (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "и-чвор „%i“ директоријума Ð¥-СТÐБЛРкориÑти неодговарајућу заÑтавицу кореног чвора Ñ…-Ñтабла.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "и-чвор „%i“ директоријума Ð¥-СТÐБЛРима дубину Ñтабла (%N) која је превелика\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"и-чвор лошег блока има индиректни блок (%b) који је у Ñукобу Ñа\n"
+"метаподацима ÑиÑтема датотека. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Ðије уÑпело (поновно)Ñтварање промене величине и-чвора: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "и-чвор „%i“ има додатну величину (%IS) која је неиÑправна\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "проширени атрибут у и-чвору „%i“ има дужину назива (%N) која је неиÑправна\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "проширени атрибут у и-чвору „%i“ има померај вредноÑти (%N) који је неиÑправан\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "проширени атрибут у и-чвору „%i“ има блок вредноÑти (%N) који је неиÑправан (мора бити 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "проширени атрибут у и-чвору „%i“ има величину вредноÑти (%N) која је неиÑправна\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "проширени атрибут у и-чвору „%i“ има хеш (%N) који је неиÑправан\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "и-чвор „%i“ је %It али изгледа као да је Ñтваран директоријум.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Грешка приликом читања Ñтабла раÑпона у и-чвору „%i“: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"ÐиÑам уÑпео да поновим раÑпоне у и-чвору „%i“\n"
+"\t(оп %s, блк %b, лблк %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"и-чвор „%i“ има неиÑправан раÑпон\n"
+"\t(логички блок „%c“, неиÑправан физички блок „%b“, дужине %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"и-чвор „%i“ има неиÑправан раÑпон\n"
+"\t(логички блок „%c“, физички блок „%b“, неиÑправне дужине %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "и-чвор „%i“ има поÑтављену заÑтавицу „EXTENTS_FL“ на ÑиÑтему датотека без подршке раÑпона.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "и-чвор „%i“ је у запиÑу раÑпона, али Ñупер-блоку недоÑтаје функција „EXTENTS“\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "и-чвору „%i“ недоÑтаје „EXTENT_FL“, али је у запиÑу раÑпона\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Брза Ñимболичка веза „%i“ има поÑтављено „EXTENT_FL“. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"и-чвор „%i“ има раÑпоне ван поретка\n"
+"\t(неиÑправан логички блок „%c“, физички блок „%b“, дужина %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "и-чвор „%i“ има неиÑправан чвор раÑпона (блок „%b“, лблк %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Грешка претварања битмапе блока подклаÑтера: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "квота и-чвора није обична датотека. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "и-чвор квоте није у употреби, али Ñадржи податке. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "и-чвор квоте је видљив кориÑнику. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "и-чвор лошег блока изгледа неиÑправно. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"и-чвор „%i“ има раÑпон нулте величине\n"
+"\t(неиÑправан логички блок „%c“, физички блок „%b“)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "и-чвор %i изгледа да Ñадржи ђубре. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "и-чвор %i пролази провере, али Ñума провере не одговара и-чвору. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "проширени атрибута и-чвора %i је оштећен (Ñукоб доделе). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"блок раÑпона и-чвора %i је прошао провере, али Ñума провере не одговара логичком\n"
+"\t(блоку раÑпона „%c“, физичком блоку „%b“, дужини %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "и-чвор %i блока %b проширеног атрибута пролази провере, али Ñума провере не одговара и-чвору. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Ðиво унутрашњег чвора раÑпона %N и-чвора „%i“:\n"
+"Логички почетак „%b“ не одговара логичком почетку „%c“ на Ñледећем нивоу. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"и-чвор „%i“, крај раÑпона превазилази дозвољену вредноÑÑ‚\n"
+"\t(логички блок „%c“, физички блок „%b“, дужина %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "и-чвор %i има уграђене податке, али Ñуперблоку недоÑтаје функција „INLINE_DATA“\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "и-чвор %i има поÑтављену заÑтавицу „INLINE_DATA_FL“ на ÑиÑтему датотека без подршке уграђених података.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "и-чвор %i блока %b Ñе Ñукобљава Ñа критичним метаподацима, преÑкачем провере блока.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "блок „%b“ и-чвора „%i“ директоријума треба да буде на блоку „%c“. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "и-чвор „%i“ директоријума има раÑпон означен некоришћеним на блоку „%c“. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"и-чвор „%i“ логичког блока „%b“ (физички блок „%c“) нарушава правила доделе клаÑтера.\n"
+"Биће поправљен у пролазу 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "и-чвор %i има поÑтављену заÑтавицу „INLINE_DATA_FL“ али ниÑам нашао проширени атрибут. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Ðарочита датотека (уређај/прикључница/пупи) (и-чвор %i) има раÑпоне\n"
+"или поÑтављену заÑтавицу уграђених података. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "и-чвор %i има заглавље раÑпона али је поÑтављена заÑтавица уграђених података.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "и-чвор %i изгледа да има уграђене податке али је поÑтављена заÑтавица раÑпона.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "и-чвор %i изгледа да има мапу блока али Ñу поÑтављене заÑтавице уграђених података и раÑпона.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "и-чвор %i има поÑтављене заÑтавице уграђених података и раÑпона али и_блок Ñадржи ђубре.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "Лош ÑпиÑак блока каже да је лош и-чвор лошег ÑпиÑка блока. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "грешка доделе Ñтруктуре доделе облаÑти раÑпона. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"и-чвор %i има удвоÑтручено мапирање раÑпона\n"
+"\t(логички блок „%c“, неиÑправан физички блок „%b“, дужине %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "грешка доделе %N бајта меморије за шифровани ÑпиÑак и-чворова\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "Ñтабло раÑпона и-чвора %i треба бити површније (%b; треба бити <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "и-чвор %i на ÑиÑтему датотека велике доделе не може бити мапиран блоком. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "и-чвор %i има оштећено заглавље раÑпона. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "ВременÑка ознака на и-чвору %i поÑле 04.04.2310. је вероватно пре-1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "и-чвор „%i“ има неиÑправн и-чвор проширеног атрибута вредноÑти „%N“.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "и-чвор „%i“ има неиÑправан проширени атрибут. ЕРи-чвору „%N“ недоÑтаје обележје „EA_INODE“.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"ЕРи-чвору „%N“ родитељÑког и-чвора „%i“ недоÑтаје обележје „EA_INODE“.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "и-чвор %i има проширење означено као некоришћено у блоку %c (величина %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "и-чвор „%i“ има поÑтављену заÑтавицу малих Ñлова али није директоријум. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"директоријум „%p“ има заÑтавицу малих Ñлова, али\n"
+"функција малих Ñлова није укључена. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "и-чвор „%i“ има заÑтавицу шифровања али нема проширени атрибут шифровања.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "Шифровани и-чвор %i има оштећени проширени атрибут шифровања.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "и-чвор „%i“ директоријума Ð¥-СТÐБЛРкориÑти хеш издање (%N), али треба да кориÑти „SipHash (6)“ \n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "и-чвор „%i“ директоријума Ð¥-СТÐБЛРкориÑти „SipHash“, али не би требало. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Покрећем додатне пролазе да решим блокове које тражи више од једног и-чвора...\n"
+"Пролаз 1B: Поново прегледам има ли блокова који Ñу неколико пута затражени\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "блок(ови) неколико пута затражени у и-чвору „%i“:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Грешка приликом Ñкенирања и-чворова (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "грешка доделе битмапе и-чвора (двоÑтрука_мапа_и_чвора): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Грешка приликом понављања на блоковима у и-чвору „%i“ (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Грешка дотеривања броја упута за блок „%b“ проширеног атрибута (и-чвор „%i“): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Пролаз 1C: Прегледам директоријуме за и-чворовима Ñа неколико пута затраженим блоковима\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Пролаз 1D: Поново дотерујем неколико пута затражене блокове\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Датотека „%Q“ (и-чвор „%i“, датум измене %IM)\n"
+" има %r неколико пута затражен(е) блок(ове), дељен(е) Ñа %N датотеком(е):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (и-чвор „%i“, датум измене %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<метаподаци ÑиÑтема датотека>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Има %N и-чвор(ов)а који Ñадржи(е) неколико пута затражене блокове.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"неколико пута затражени блокови Ñу већ поново додељени или клонирани.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Ðе могу да клонирам датотеку: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Пролаз 1Е: Оптимизујем Ñтабла раÑпона\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "ÐиÑам уÑпео да оптимизујем Ñтабло раÑпона „%p“ (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Оптимизујем Ñтабла раÑпона: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Унутрашња грешка: навећа дубина Ñтабла раÑпона је превелика (%b; очекивано=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "Ñтабло раÑпона и-чвора %i (на нивоу %b) треба бити краће. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "Ñтабло раÑпона и-чвора %i (на нивоу %b) треба бити уже. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "2. пролаз: Проверавам Ñтруктуру директоријума\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "неиÑправан број и-чвора за „.“ у „%i“ и-чвору директоријума.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има неиÑправан и-чвор бр.: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има обриÑан/некоришћени и-чвор %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) је веза Ñа „.“ "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) указује на и-чвор (%Di) који Ñе налази у лошем блоку.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) је веза ка директоријуму „%P“ (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) је веза ка кореном и-чвору.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има недозвољени знак у називу.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "ÐедоÑтаје „.“ у „%i“ и-чвору директоријума.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "ÐедоÑтају „..“ у „%i“ и-чвору директоријума.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Први ÑƒÐ½Ð¾Ñ â€ž%Dn“ (и-чвор=%Di) у „%i“ и-чвору директоријума (%p) треба бити „.“\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Други ÑƒÐ½Ð¾Ñ â€ž%Dn“ (и-чвор=%Di) у „%i“ и-чвору директоријума треба бити „..“\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "„i_faddr“ за и-чвор „%i“ (%Q) је „%IF“, треба бити нула.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "„i_file_acl“ за и-чвор „%i“ (%Q) је „%If“, треба бити нула.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "„i_size_high“ за и-чвор „%i“ (%Q) је „%If“, треба бити нула.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "„i_frag“ за и-чвор „%i“ (%Q) је „%N“, треба бити нула.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "„i_fsize“ за и-чвор „%i“ (%Q) је „%N“, треба бити нула.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "и-чвор „%i“ (%Q) има неиÑправан режим (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "и-чвор „%i“ директоријума, %B, померај „%N“: директоријум је оштећен\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "и-чвор „%i“ директоријума, %B, померај „%N“: назив датотеке је предуг\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "и-чвор „%i“ директоријума има недодељен %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "ÑƒÐ½Ð¾Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð° „.“ у и-чвору „%i“ директоријума Ñе не завршава на ÐИШТÐ\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "ÑƒÐ½Ð¾Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð° „..“ у и-чвору „%i“ директоријума Ñе не завршава на ÐИШТÐ\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "и-чвор „%i“ (%Q) је недозвољени знаковни уређај.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "и-чвор „%i“ (%Q) је недозвољени блок уређај.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) је удвоÑтручени ÑƒÐ½Ð¾Ñ â€ž.“.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) је удвоÑтручени ÑƒÐ½Ð¾Ñ â€ž..“.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Унутрашња грешка: не могу да нађем податке_директоријума за „%i“.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има дужину_запиÑа %Dr, треба бити %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "грешка доделе Ñтруктуре и-броја: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Грешка понављања у блоковима директоријума: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Грешка читања блока „%b“ директоријума (и-чвор „%i“): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Грешка пиÑања блока „%b“ директоријума (и-чвор „%i“): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "грешка доделе новог блока директоријума за и-чвор „%i“ (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Грешка размештања и-чвора „%i“: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "ÑƒÐ½Ð¾Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð° за „.“ у „%p“ (%i) је велик.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "и-чвор „%i“ (%Q) је недозвољени ПУПИ.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "и-чвор „%i“ (%Q) је недозвољена прикључница.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "ПоÑтављам врÑту датотеке за ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) на „%N“.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има неиÑправну врÑту датотека (беше „%Dt“, треба бити „%N“).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има поÑтављену врÑту датотека.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има назив нулте дужине.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Симболичка веза „%Q“ (и-чвор „%i“) је неиÑправна.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "блок проширеног атрибута за и-чвор „%i“ (%Q) је неиÑправан (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "ÑиÑтем датотека Ñадржи велике датотеке, али му недоÑтаје заÑтавица „LARGE_FILE“ у Ñупер-блоку.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ нема упуту\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ је двоупутно\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ има лош најмањи хеш\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ има лош највећи хеш\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "и-чвор „%d“ директоријума Ð¥-СТÐБЛРје неиÑправан (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "ÑиÑтем датотека има велике директоријуме, али му недоÑтаје заÑтавица „LARGE_DIR“ у Ñуперблоку.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛР(%q): лош број блока %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: корени чвор је неиÑправан\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ има неиÑправно ограничење (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ има неиÑправан број (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ има неуређену хеш табелу\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: „%B“ има неиÑправну дубину (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Ðађох удвоÑтручени ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i). "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има не-јединÑтвен назив датотеке.\n"
+"Преименујем га у „%s“"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Ðађох удвоÑтручени ÑƒÐ½Ð¾Ñ â€ž%Dn“.\n"
+"\tОзначавам „%p“ (%i) за поновну изградњу.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "„i_blocks_hi“ за и-чвор „%i“ (%Q) је „%N“, треба бити нула.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Ðеочекивани блок у и-чвору „%d“ директоријума Ð¥-СТÐБЛР(%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) упућује на и-чвор „%Di“ у групи „%g“ је поÑтављено „_INODE_UNINIT“.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) упућује на и-чвор „%Di“ нађен у групи „%g“ некоришћене облаÑти и-чвора.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "„i_file_acl_hi“ за и-чвор „%i“ (%Q) је „%N“, треба бити нула.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: није уÑпела Ñума провере на кореном чвору.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "проблем у и-чвору „%d“ директоријума Ð¥-СТÐБЛÐ: није уÑпела Ñума провере на унутрашњем чвору.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "и-чвор „%i“ директоријума, %B, померај „%N“: директоријум нема Ñуму провере.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "и-чвор директоријума %i, %B: директоријум пролази провере али му не уÑпева Ñума провере.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Величина и-чвора уграђеног директоријума %i (%N) мора бити производ 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Поправљање величине и-чвора уграђеног директоријума %i није уÑпело.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Шифровани ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) је прекратак.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "Шифровани ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) упућује на нешифровани и-чвор „%Di“.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "Шифровани ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) упућује на и-чвор „%Di“, који има другачију политику шифровања.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "ÑƒÐ½Ð¾Ñ â€ž%Dn“ у „%p“ (%i) има неиÑправне УТФ-8 знакове у Ñвом називу.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "Ðађох двоÑтруки ÑƒÐ½Ð¾Ñ Ð½Ð°Ð·Ð¸Ð²Ð° датотеке „%Dn“ у „%p“ (%i). "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "3. пролаз: Проверавам повезивоÑÑ‚ директоријума\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "корени и-чвор није додељен. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Ðема меÑта у директоријуму изгубљено+нађено. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "Ðеповезани и-чвор директоријума „%i“ (бејаше у „%q“)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "ниÑам нашао „/изгубљено+нађено“. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "„..“ у „%Q“ (%i) је „%P“ (%j), треба бити „%q“ (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "„/изгубљено+нађено“ је лош или не поÑтоји. Ðе могу поново да Ñе повежем.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Ðе могу да раширим „/изгубљено+нађено“: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Ðе могу поново да повежем „%i“: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Грешка када Ñам покушао да нађем „/изгубљено+нађено“: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "екÑÑ‚2Ñд_нови_блок: „%m“ када Ñам покушао да направим директоријум „/изгубљено+нађено“\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "екÑÑ‚2Ñд_нови_и-чвор: „%m“ када Ñам покушао да направим директоријум „/изгубљено+нађено“\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "екÑÑ‚2Ñд_нови_дир_блок: „%m“ када Ñам покушао да направим нови блок директоријума\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "екÑÑ‚2Ñд_пиши_дир_блок: „%m“ када Ñам пиÑао блок директоријума за „/изгубљено+нађено“\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Грешка приликом дотеривања броја и-чвора на и-чвору „%i“\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Ðе могу да поправим полазиште и-чвора „%i“: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Ðе могу да поправим полазиште и-чвора „%i“: Ðе могу да нађем ÑƒÐ½Ð¾Ñ Ð¿Ð¾Ð»Ð°Ð·Ð½Ð¾Ð³ директоријума\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Грешка Ñтварања кореног директоријума (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Грешка Ñтварања директоријума „/изгубљено+нађено“ (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "корени и-чвор није директоријум; прекидам.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Ðе могу да наÑтавим без кореног и-чвора.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "„/изгубљено+нађено“ није директоријум (и-чвор=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/изгубљено+нађено има уграђене податке\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Ðе могу да доделим проÑтор за „/изгубљено+нађено“.\n"
+"Ставите изгубљене датотеке у корени директоријум"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Ðедовољно проÑтора за опоравак изгубљених датотека!\n"
+"ПремеÑтите податке ÑиÑтема датотека и поново покрените „e2fsck“.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "„/изгубљено+нађено“ је шифровано\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "ДубинÑки упетљан и-чвор директоријума „%i“ (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Пролаз 3A: Оптимизујем директоријуме\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "ÐиÑам уÑпео да Ñтворим приÑтупник „директоријуми_у_хеш“: %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "ÐиÑам уÑпео да оптимизујем директоријум „%q“ (%d): %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Оптимизација директоријума: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Пролаз 4: Проверавам бројеве упута\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "не закачен и-чвор „%i“ нулте дужине. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "не закачен и-чвор „%i“\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "број упута и-чвора „%i“ је %Il, треба бити %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"УПОЗОРЕЊЕ: ГРЕШКРПРОГРÐМИРÐЊРУ „E2FSCK“-у!\n"
+"\tИЛИ ÐЕКИ ТУПÐВКО (МОЖДРВИ) ПРОВЕРÐВРПРИКÐЧЕÐИ (ЖИВИ) СИСТЕМ ДÐТОТЕКÐ\n"
+"податак_везе_и-чвора[%i] је %N,\t„и-чвор.број_и_везе“ је %Il. Требало би да буду иÑти!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "број упута и-чвора „%i“ је %N, треба бити %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "директоријум прелази макÑимум веза, али нема „DIR_NLINK“ функције у Ñупер блоку.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "упута броја и-чвора директоријума „%i“ је поÑтављена на прекорачење али треба бити тачна вредноÑÑ‚ %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Пролаз 5: Проверавам податке Ñажетка групе\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "Попуњавање на крају битмапе и-чвора није поÑтављено. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "Попуњавање на крају битмапе блока није поÑтављено. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "разлике битмапе блокова: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "разлике битмапе и-чворова: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Број Ñлободних и-чворова је погрешан за групу бр. %g (%i, избројано=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Број директоријума је погрешан за групу бр. %g (%i, избројано=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Број Ñлободних и-чворова је погрешан (%i, избројано=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Број Ñлободних блокова је погрешан за групу бр. %g (%b, избројано=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Број Ñлободних блокова је погрешан (%b, избројано=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "ГРЕШКРПРОГРÐМИРÐЊÐ: крајње тачке (%b, %c) битмапе ÑиÑтема датотека (бр. %N) не одговарају израчунатим крајњим тачкама битмапе (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Унутрашња грешка: привидно дотерујем крај битмапе (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Грешка умножавања у битмапи замене и-чвора: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Грешка умножавања у битмапи замене блока: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "блок(ови) групе „%g“ је(Ñу) у употреби али је група означена „BLOCK_UNINIT“\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "и-чвор(ови) групе „%g“ је(Ñу) у употреби али је група означена „INODE_UNINIT“\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "битмапа и-чвора групе „%g“ не одговара Ñуми провере.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "битмапа блока групе „%g“ не одговара Ñуми провере.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Поново направи дневник"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "ОÑвежи податке квоте за врÑту квоте „%N“"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Грешка поÑтављања података Ñуме провере групе блока: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Грешка пиÑања података ÑиÑтема датотека: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Грешка преÑипања пиÑања на Ñкладишни уређај: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Грешка пиÑања података квоте за врÑту квоте „%N“: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Ðепозната грешка кода (0x%x)!\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "ЗÐÐЕМÐРЕÐО"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "у „move_quota_inode“"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Коришћена меморија: %lu, протекло време: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "величина и-чвора=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "приликом отварања Ñкенирања и-чвора"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "приликом покретања Ñкенирања и-чвора"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "приликом обављања Ñкенирања и-чвора"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "приликом позивања „ext2fs_block_iterate“ за и-чвор „%u“"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "приликом позивања „ext2fs_adjust_ea_refcount2“ за и-чвор „%u“"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Скраћујем"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "ЧиÑтим"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Употреба: %s [-panyrcdfktvDFV] [-b Ñуперблок] [-B вел_блока]\n"
+"\t\t[-l|-L дттка_лоших_блокова] [-C опиÑник_дттке] [-j Ñпољни_дневник]\n"
+"\t\t[-E проширене-опције] [-z опозив_дттке] уређај\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Брза помоћ:\n"
+" -p ÐутоматÑка поправка (без питања)\n"
+" -n Ðе уноÑи никакве измене у ÑиÑтем датотека\n"
+" -y Подразумева „да“ за Ñва питања\n"
+" -c Проверава има ли лоших блокова и\n"
+"\t\t\tдодаје их на ÑпиÑак лоших блокова\n"
+" -f Приморава проверу чак и ако је ÑиÑтем\n"
+"\t\t\tдатотека означен као чиÑÑ‚\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Бива опширан\n"
+" -b Ñуперблок КориÑти заменÑки Ñуперблок\n"
+" -B величина блока ПриÑиљава величину блока када тражи Ñуперблок\n"
+" -j Ñпољни_дневник ПоÑтавља меÑто Ñпољног дневника\n"
+" -l дттка_лшх_блква Додаје на ÑпиÑак лоших блокова\n"
+" -L дттка_лшх_блква ПоÑтавља ÑпиÑак лоших блокова\n"
+" -z опозив_дттке Ствара датотеку опозива\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u датотеке (%0d.%d%% Ñа прекидима), %llu/%llu блока\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u и-чвор је коришћен (%2.2f%%, од %u)\n"
+msgstr[1] ""
+"\n"
+"%12u и-чвора Ñу коришћена (%2.2f%%, од %u)\n"
+msgstr[2] ""
+"\n"
+"%12u и-чворова је коришћено (%2.2f%%, од %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u датотека Ñа прекидима (%0d.%d%%)\n"
+msgstr[1] "%12u датотеке Ñа прекидима (%0d.%d%%)\n"
+msgstr[2] "%12u датотека Ñа прекидима (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u директоријум Ñа прекидима (%0d.%d%%)\n"
+msgstr[1] "%12u директоријума Ñа прекидима (%0d.%d%%)\n"
+msgstr[2] "%12u директоријума Ñа прекидима (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " број и-чворова Ñа „ind/dind/tind“ блокова: %u/%u/%u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " ХиÑтограм дубине раÑпона: "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu блок је коришћен (%2.2f%%, од %llu)\n"
+msgstr[1] "%12llu блока Ñу коришћена (%2.2f%%, од %llu)\n"
+msgstr[2] "%12llu блокова је коришћено (%2.2f%%, од %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u лош блок\n"
+msgstr[1] "%12u лоша блока\n"
+msgstr[2] "%12u лоших блокова\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u велика датотека\n"
+msgstr[1] "%12u велике датотеке\n"
+msgstr[2] "%12u великих датотека\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u обична датотека\n"
+msgstr[1] ""
+"\n"
+"%12u обичне датотеке\n"
+msgstr[2] ""
+"\n"
+"%12u обичних датотека\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u директоријум\n"
+msgstr[1] "%12u директоријума\n"
+msgstr[2] "%12u директоријума\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u датотека знаковног уређаја\n"
+msgstr[1] "%12u датотеке знаковног уређаја\n"
+msgstr[2] "%12u датотека знаковног уређаја\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u датотека блок уређаја\n"
+msgstr[1] "%12u датотеке блок уређаја\n"
+msgstr[2] "%12u датотека блок уређаја\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u пупи\n"
+msgstr[1] "%12u пупи-ја\n"
+msgstr[2] "%12u пупи-ја\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u веза\n"
+msgstr[1] "%12u везе\n"
+msgstr[2] "%12u веза\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u Ñимболичка веза"
+msgstr[1] "%12u Ñимболичке везе"
+msgstr[2] "%12u Ñимболичких веза"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u брза Ñимболичка веза)\n"
+msgstr[1] " (%u брзе Ñимболичке везе)\n"
+msgstr[2] " (%u брзих Ñимболичких веза)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u прикључница\n"
+msgstr[1] "%12u прикључнице\n"
+msgstr[2] "%12u прикључница\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u датотека\n"
+msgstr[1] "%12u датотеке\n"
+msgstr[2] "%12u датотека\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "приликом одређивања да ли је „%s“ прикачен."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Упозорење! „%s“ је прикачен.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Упозорење! „%s“ је у употреби.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "„%s“ је прикачен.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "„%s“ је у употреби.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Ðе могу да наÑтавим, прекидам.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"ПÐЖЊÐ!!! СиÑтем датотека је прикачен. Ðко наÑтавите\n"
+"***ОЗБИЉÐО*** ћете ***ОШТЕТИТИ*** ÑиÑтем датотека.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Да ли Ñтварно желите да наÑтавите"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "провера је прекинута.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " Ñадржи ÑиÑтем датотека Ñа грешкама"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " није иÑправно откачен"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " функције примарног Ñуперблока Ñе разликују од резерве"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " је био прикачен %u пута а да није провераван"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " има време провере ÑиÑтема датотека у будућноÑти"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " прошла Ñу %u дана а да није провераван"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "занемарујем период провере, подешено је „broken_system_clock“\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", провера је приÑилна.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: чиÑÑ‚, %u/%u датотеке, %llu/%llu блока"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (провера је одложена; ради на батерији)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (провера након Ñледећег качења)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (провера након %ld качења)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ГРЕШКÐ: Ðе могу да отворим „/dev/null“ (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "ÐеиÑправно ЕРиздање.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "ÐеиÑправна величина међумеморије.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Ðепозната проширена опција: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Проширене опције Ñу раздвојене зарезима, и могу имати аргумент\n"
+"\tкоји је подешен знаком једнакоÑти (=). ИÑправне проширене опције Ñу:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<еа_издање (1 или 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<величина међумеморије>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Грешка ÑинтакÑе у датотеци подешавања „e2fsck“-а (%s, %d. ред)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Грешка потврђивања опиÑника датотеке „%d“: %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "ÐеиÑправан опиÑник датотеке података довршавања"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Може бити наведена Ñамо једна од опција „-p/-a“, „-n“ или „-y“."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Опција „-t“ није подржана на овом издању „e2fsck“-а.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Ðе могу да решим „%s“"
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "Опције „-n“ и „-D“ ниÑу ÑаглаÑне."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "Опције „-n“ и „-c“ ниÑу ÑаглаÑне."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Опције „-n“ и „-l/-L“ ниÑу ÑаглаÑне."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Опције „-D“ и „-E fixes_only“ ниÑу ÑаглаÑне."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Опције „-E bmap2extent“ и „fixes_only“ ниÑу ÑаглаÑне."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "приликом отварања „%s“ за преÑипање"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "док Ñам покушавао да преÑунем „%s“"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Ðе можете кориÑтити у иÑто време опције „-c“ и „-l/-L“.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG „%s“ није цео број\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"ÐеиÑправан не-бројевни аргумент за „-%c“ (%s)\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "ММП период је %u Ñекунде а укупно време чекања је %u Ñекунде. Сачекајте малко...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "приликом провере ММП блока"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Ðко Ñте Ñигурни да ÑиÑтем датотека није у употреби ни на једном чвору, покрените:\n"
+"„tune2fs -f -E clear_mmp %s“\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "приликом читања ММП блока"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"ПрепиÑујем поÑтојећи ÑиÑтем датотека; ово може бити поништено наредбом:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "приликом покушаја бриÑања „%s“"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "приликом покушаја поÑтављања датотеке поништавања\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Грешка: издање библиотеке „ext2fs“ је заÑтарело!\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "када Ñам покушао да покренем програм"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tКориÑтим „%s“, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "потребан је терминал за међудејÑтвене поправке"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: „%s“ покушавам да направим резерву блокова...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Суперблок је неиÑправан,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "ОпиÑник групе изгледа лоше..."
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: „%s“ приликом коришћења резерве блокова"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: враћам Ñе на изворни Ñуперблок\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Ревизија ÑиÑтема датотека је привидно превиÑока за ово издање „e2fsck“-а.\n"
+"(Или је Ñуперблок ÑиÑтема датотека оштећен)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "Да није ово партиција нулте дужине?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Морате имати право „%s“ на ÑиÑтему датотека или бити админиÑтратор\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Можда је непоÑтојећи или разменÑки уређај?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "СиÑтем датотека је прикачен или отворен иÑкључиво другим програмом?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "Можда је непоÑтојећи или уређај?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"ДиÑк је заштићен од пиÑања; кориÑтите опцију „-n“ да одрадите проверу\n"
+"Ñамо за читање уређаја.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: Покушавам да учитам Ñуперблок ÑƒÐ¿Ñ€ÐºÐ¾Ñ Ð³Ñ€ÐµÑˆÐºÐ°Ð¼Ð°...\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "Ðабавите најновије издање „e2fsck“-а!"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "приликом провере дневника за „%s“"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "Ðе могу наÑтавити Ñа провером ÑиÑтема датотека"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Упозорење: преÑкачем опоравак дневника зато што вршим проверу ÑиÑтема датотека Ñамо за читање.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "не могу да поÑтавим заÑтавице Ñуперблока на „%s“\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Ðађох грешку провере Ñуме дневника у „%s“\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Дневник је оштећен у „%s“\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "приликом поправке дневника за „%s“"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "„%s“ има неподржану(е) функцију(е):"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "„%s“ има неподржано кодирање: %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: „%s“ приликом читања и-чвора лоших блокова\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Ово не Ñлути на добро, али ћемо покушати да наÑтавимо...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Правим дневник (%d блока): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " Готово.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** дневник је поново Ñтворен ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "прекинуто"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: „e2fsck“ је отказан.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Поново покрећем „e2fsck“ из почетка...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "приликом враћања поÑтавки контекÑта"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** ГРЕШКЕ СИСТЕМРДÐТОТЕКРСУ ИСПРÐВЉЕÐЕ *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: СиÑтем датотека је измењен.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** СИСТЕМ ДÐТОТЕКРЈЕ ИЗМЕЊЕР*****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** ПОÐОВО ПОДИЖЕМ СИСТЕМ *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** УПОЗОРЕЊЕ: СиÑтем датотека још увек има грешака **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "дД"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "нÐ"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "аÐ"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " („а“ укључује „да“ за Ñве) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<д>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<н>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (д/н)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "отказано!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "да за Ñве\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "да\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "не\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? не\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? да\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "да"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "не"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: недозвољени блок(ови) битмапе за „%s“"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "читам битмапе и-чвора и блокова"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "док Ñам поново покушао да читам битмапе за „%s“"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "пишем битмапе блока и и-чвора"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "приликом препиÑивања битмапа блока и и-чвора за „%s“"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: ÐЕОЧЕКИВÐÐÐ ÐЕДОСЛЕДÐОСТ; ПОКРЕÐИТЕ „fsck“ РУЧÐО.\n"
+"\t(тј., без „-a“ или „-p“)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Коришћена меморија: %lluk/%lluk (%lluk/%lluk), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Коришћена меморија: %lluk, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "време: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "протекло време: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "приликом читања и-чвора „%lu“ у „%s“"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "приликом пиÑања и-чвора „%lu“ у „%s“"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "ÐЕОЧЕКИВÐÐÐ ÐЕДОСЛЕДÐОСТ: ÑиÑтем датотека је измењен док је „fsck“ био покренут.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "готово \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Употреба: %s [-b величина_блока] [-i улазна_дттка] [-o излазна_дттка] [-svwnfBX]\n"
+" [-c блокови_одједном] [-d чинилац_заÑтоја_између_читања] [-e најв._лоших_блокова]\n"
+" [-p бр._пролаза] [-t теÑÑ‚_шаблон [-t теÑÑ‚_шаблон [...]]]\n"
+" уређај [поÑледњи_блок [први_блок]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Опције „-n“ и „-w“ Ñе узајамно иÑкључују.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% урађено, %s протекло. (%d/%d/%d грешака)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "ИÑпробавам наÑумичним шаблоном: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "ИÑпробавам шаблоном 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "приликом тражења"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Чудна вредноÑÑ‚ (%ld) у „do_read“\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "приликом „ext2fs_sync_device“"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "приликом почињања понављања ÑпиÑка лоших блокова"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "приликом доделе међумеморија"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Проверавам блокове од %lu до %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Проверавам има ли лоших блокова у режиму Ñамо-за-читање\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Тражим лоше блокове (теÑÑ‚ Ñамо-за-читање): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Превише лоших блокова, прекидам теÑÑ‚\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Проверавам има ли лоших блокова у режиму пиÑања и читања\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Од блока %lu до %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Читам и упоређујем: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Проверавам има ли лоших блокова у не-разарајућем режиму пиÑања и читања\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Проверавам има ли лоших блокова (не-разарајући теÑÑ‚ пиÑања и читања)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Дошло је до прекида, чиÑтим\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "приликом пиÑања података теÑта, блок %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "„%s“ је прикачен; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "лоши блокови Ñу ипак приÑиљени. Ðадам Ñе да је „/etc/mtab“ нетачан.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "није безбедно покренути лоше блокове!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "„%s“ Ñе делимично кориÑти на ÑиÑтему; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "лоши блокови Ñу ипак приÑиљени.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "неиÑправано „%s“ — %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Ðајвећи Ð¸Ð·Ð½Ð¾Ñ Ð¾Ð´ %u лоша блока је превелик — највише је %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "не могу да доделим меморију за теÑÑ‚_шаблон — %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "МакÑимум једног теÑÑ‚_шаблона може бити наведен у режиму Ñамо за читање"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "ÐаÑумични теÑÑ‚_шаблон није дозвољен у режиму Ñамо за читање"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "ÐеиÑправна величина блока: %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "ÐеиÑправно „blocks_at_once“: %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Ðе могу да одредим величину уређаја; морате ручно\n"
+"навеÑти величину\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "док Ñам покушавао да одредим величину уређаја"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "поÑледњи блок"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "први блок"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "неиÑправан почетни блок (%llu): мора бити мање од %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "неиÑправан крајњи блок (%llu): мора бити 32-битна вредноÑÑ‚"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "приликом Ñтварања ÑпиÑка лоших блокова у-меморији"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "улазна датотека — лош запиÑ"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "приликом додавања ÑпиÑка лоших блокова у-меморији"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Пролаз је обављен, нађених лоших блокова: %u. (грешака: %d/%d/%d)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Употреба: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p пројекат] [-v издање] датотеке...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "лош пројекат — %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "лоше издање — %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "приликом покушаја да добавим податке „%s“"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "приликом читања заÑтавица на „%s“"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "ЗаÑтавице за „%s“ Ñу поÑтављене као "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "приликом поÑтављања заÑтавица на „%s“"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Издање за „%s“ је поÑтављено као %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "приликом поÑтављања издања на „%s“"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Пројекат за „%s“ је поÑтављено као %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "приликом поÑтављања пројекта на „%s“"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Ðе могу да доделим променљиву путање у „chattr_dir_proc“"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= није ÑаглаÑно Ñа - и +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Морате кориÑтити „-v“, =, - или +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "приликом читања и-чвора „%u“"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "приликом ширења директоријума"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "приликом повезивања „%s“"
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "приликом пиÑања и-чвора „%u“"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "приликом иÑпиÑивања атрибута за „%s“"
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "приликом отварања и-чвора „%u“"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "приликом читања x-атрибута за и-чвор %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "приликом доделе меморије"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "приликом читања атрибута „%s“ за „%s“"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "приликом пиÑања атрибута „%s“ у и-чвор „%u“"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "приликом затварања и-чвора „%u“"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "приликом доделе и-чвора „%s“"
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "приликом Ñтварања и-чвора „%s“"
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "приликом Ñтварања Ñимболичке везе „%s“"
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "приликом тражења „%s“"
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "приликом Ñтварања директоријума „%s“"
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "приликом отварања „%s“ за умножавање"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "приликом промене радног директоријума у „%s“"
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "приликом прегледа директоријума „%s“"
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "приликом покушаја да добавим податке за „%s“"
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "приликом Ñтварања Ñпецијалне датотеке „%s“"
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "није уÑпела додела меморије"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "приликом покушаја читања везе „%s“"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "Ñимболичкој вези Ñе повећала величина између „lstat()“ и „readlink()“"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "приликом пиÑања Ñимболичке везе „%s“"
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "приликом пиÑања датотеке „%s“"
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "приликом прављења директоријума „%s“"
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "приликом промене директоријума"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "занемарујем ÑƒÐ½Ð¾Ñ â€ž%s“"
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "приликом подешавања и-чвора за „%s“"
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "приликом поÑтављања Ñ…-атрибута за „%s“"
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "приликом чувања података и-чвора"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "приликом умножавања х-атрибута на кореном директоријуму"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Употреба: %s [-bfghimxV] [-o Ñуперблок=<бр.>] [-o величина_блока=<бр.>] уређај\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "блокова"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "клаÑтера"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Група %lu: (Блокова "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " Ñума провере 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (ОЧЕКИВÐÐ¥ 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " Ñуперблок „%s“ на "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Примарно"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Резерва"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", ОпиÑници групе на "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" РезервиÑаних ГДТ блокова на "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " ОпиÑник групе на "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Битмапа блока на "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", Ñума провере 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Битмапа и-чвора на "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Табела и-чвора на "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u %s Ñлободно, %u Ñлободних и-чворова, %u директоријума%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u некоришћени и-чворови\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Слободних блокова: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Слободних и-чворова: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "приликом штампања ÑпиÑка оштећених блокова"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Лоших блокова: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "приликом читања и-чвора дневника"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "приликом отварања и-чвора дневника"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "приликом читања Ñуперблока дневника"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Чаробни број Ñуперблока дневника је неиÑправан!\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "приликом читања Ñуперблока дневника"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Ðе могу да нађем чаробне бројеве Ñуперблока дневника"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "ниÑам уÑпео да доделим ММП међумеморију\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "читам ММП блок %llu из „%s“\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Ðе могу да доделим меморију да бих обрадио опције!\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "ÐеиÑправан параметар Ñуперблока: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "ÐеиÑправан параметар величине блока: %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Ðаведене Ñу лоше проширене опције: %s\n"
+"\n"
+"Проширене опције Ñу раздвојене зарезима, и могу имати аргумент\n"
+"\tкоји је подешен знаком једнакоÑти (=).\n"
+"\n"
+"ИÑправне проширене опције Ñу:\n"
+"\tsuperblock=<број Ñуперблока>\n"
+"\tblocksize=<величина блока>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tКориÑтим „%s“\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Ðе могу да нађем иÑправан Ñуперблок ÑиÑтема датотека.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: ММП функција није укључена.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "приликом покушаја читања битмапа „%s“\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Покрећем „e2fsck“!\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Употреба: %s [ -r|-Q ] [ -f ] [ -b Ñупер блок ] [ -B величина блока ] уређај датотека-Ñлике\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I уређај датотека_Ñлике\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o померај_извора ] [ -O померај_одредишта ] Ñд_извора [ Ñд_одредишта ]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "приликом доделе међумеморије"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Пишем блок %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "грешка пиÑања блока %llu"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "грешка у функцији „generic_write()“"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Грешка: величина заглавља је већа од величине пиÑања\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "Ðе могу да доделим међумеморију заглавља\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "приликом пиÑања Ñуперблока"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "приликом пиÑања табеле и-чвора"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "приликом пиÑања битмапе блока"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "приликом пиÑања битмапе и-чвора"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Оштећени блок директоријума %llu: лоша дужина_запиÑа (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Оштећени блок директоријума %llu: лоша дужина_назива (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu блока (%d%%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Умножавам "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "ЗауÑтављање ће оштетити ÑиÑтем датотека, прекините опет ако Ñте Ñигурни\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " преоÑтаје %s при %.2f MB/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "грешка читања блока %llu"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Умножих %llu / %llu блока (%d%%) у „%s“ "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "при %.2f MB/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "приликом додељивања табеле „l1“"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "приликом додељивања оÑтаве „l2“"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Упозорење: Још увек има табела у оÑтави приликом Ñтављања оÑтаве, подаци ће бити изгубљени тако да Ñлика можда неће бити иÑправна.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "приликом доделе „ext2_qcow2_image“"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "приликом покретања „ext2_qcow2_image“"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Грешка програма: направљено је неколико Ñеквентних блокова броја упута!\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "приликом доделе битмапе блока"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "приликом доделе битмапе иÑпремештаних блокова"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Прегледам и-чворове...\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "Ðе могу да доделим међумеморију блока"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "приликом добављања Ñледећег и-чвора"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "приликом понављања на и-чвору %u"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Сирова и „qcow2“ Ñлике не могу бити инÑталиране"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "грешка читања битмапа"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "приликом отварања датотеке уређаја"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "приликом враћања табеле Ñлике"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "Опција „-a“ Ñе може кориÑтити Ñамо Ñа Ñировим или „QCOW2“ Ñликама."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "Опција „-b“ Ñе може кориÑтити Ñамо Ñа Ñировим или „QCOW2“ Ñликама."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "Помераји Ñу дозвољени Ñамо Ñа Ñировим Ñликама."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Режим премештања је дозвољен Ñамо Ñа Ñировим Ñликама."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "Режим премештања захтева Ñве режиме података."
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "проверавам да ли је прикачен"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Покретање „e2image“-а на ÑиÑтемима датотека монтираним за читање/пиÑање може довеÑти до\n"
+"недоÑледноÑти Ñлике која потом неће бити кориÑна у Ñврхе иÑправљања грешака.\n"
+"КориÑтите опцију „-f“ ако Ñтварно желите ово.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "„QCOW2“ Ñлика не може бити иÑпиÑана на Ñтандардном излазу!\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "Ðе могу да добавим податке излаза\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Слика (%s) је Ñажета\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Слика (%s) је шифрована\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Слика (%s) је оштећена\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "приликом покушаја претварања „qcow2“ Ñлике (%s) у Ñирову Ñлику (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "Опција „-c“ је подржана једино у Ñировом режиму\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Опција „-c“ није подржана приликом пиÑања на Ñтандардном излазу\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "приликом доделе међумеморије провере"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "Опција „-p“ је подржана једино у Ñировом режиму\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d блока већ Ñадрже податке за умножавање\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Употреба: %s -r уређај\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: не могу да отворим „%s“\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: не могу да пређем на Ñуперблок\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: грешка читања Ñуперблока\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: није ÑиÑтем датотека екÑÑ‚2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Упозорење: Ð½Ð°Ñ‚Ð¿Ð¸Ñ Ñ˜Ðµ предуг, Ñкраћујем.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: не могу опет да пређем на Ñуперблок\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: грешка пиÑања Ñуперблока\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Употреба: e2label уређај [нови_натпиÑ]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Употреба: %s [-f] [-h] [-n] [-o померај] [-v] [-z дттка_врати] <датотека преноÑа> <ÑиÑтем датотека>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Суперблок ÑиÑтема датотека не одговара датотеци опозива.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "УУИД не одговара.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Време поÑледњег качења не одговара.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Време поÑледњег пиÑања не одговара.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Бројач времена пиÑања не одговара.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "приликом читања Ñуперблока ÑиÑтема датотека."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "приликом довлачења Ñуперблока"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Сума провере Ñуперблока датотеке опозива не одговара.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "неиÑправан померај — %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Ðећу пиÑати у датотеку опозива приликом одговарања.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "проликом отварања датотеке опозива „%s“\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "приликом читања датотеке опозива"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: Ðије датотека опозива.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Сума провере заглавља не одговара.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Оштећено заглавље датотеке опозива.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Величина блока опозива је превелика.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Величина блока опозива је премала.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Ðепозната подешена функције датотеке опозива.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Грешка приликом одређивања да ли је „%s“ прикачен."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "„e2undo“ треба покретати Ñамо на откаченим ÑиÑтемима датотека"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "приликом отварања „%s“"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "наведени померај је превелик"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "приликом читања кључева"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: погрешна магија кључа на %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: грешка Ñуме провере блока кључа на %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: блок %llu је предуг."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "приликом довлачења блока %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "грешка Ñуме провере у блоку ÑиÑтема датотека %llu (поништавам „blk %llu“)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "приликом пиÑања блока %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Оштећење датотеке опозива; СÐДРпокрените „e2fsck“!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "УИ грешка приликом одговора; СÐДРпокрените „e2fsck“!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Ðепотпун Ð·Ð°Ð¿Ð¸Ñ Ð¾Ð¿Ð¾Ð·Ð¸Ð²Ð°; покрените „e2fsck“.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Употреба: findsuper device [skipbytes [startkb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "„skipbytes“ треба бити број, а не „%s“\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "„skipbytes“ треба бити производ величине Ñектора\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "„startkb“ треба бити број, а не „%s“\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "„startkb“ треба бити позитиван, а не „%llu“\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "почиње на %llu, Ñа %u бајта повећања\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] вероватно Ñуперблок запиÑан у Ñуперблоку екÑÑ‚3 дневника,\n"
+"\tтако да је почетак/крај/група погрешно\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "померај_бајта почетак_бајта крај_бајта Ñд_блокови блквел грп mkfs/време_качења цб_ууид натпиÑ\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: је завршено грешком %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "УПОЗОРЕЊЕ: не могу да отворим „%s“: %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "УПОЗОРЕЊЕ: лош Ð·Ð°Ð¿Ð¸Ñ Ñƒ %d. реду за „%s“\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"УПОЗОРЕЊЕ: Ваша „/etc/fstab“ не Ñадржи поље „fsck passno“.\n"
+"\tЈа ћу умеÑто Ð²Ð°Ñ Ñклепати нешто, али ви треба да\n"
+" поправите датотеку „/etc/fstab“ што пре будете могли.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: ниÑам нашао\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: тренутак: Ðема више произашлих процеÑа?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Упозорење... „%s“ за уређај „%s“ је завршио Ñигналом %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: Ñтање је „%x“, ово не би требало никада да Ñе деÑи.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Завршено је Ñа „%s“ (Ñтање излаза %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Грешка „%d“ приликом извршавања „fsck.%s“ за „%s“\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Или Ñве или ниједна врÑта ÑиÑтема датотека проÑлеђена за „-t“ мора имати префикÑ\n"
+"„no“ или „!“.\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Ðе могу да доделим меморију за врÑте ÑиÑтема датотека\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: преÑкачем лош ред у датотеци „/etc/fstab“: Ñвезујем качење Ñа не-нултим бројем пролаза „fsck“-а\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: не могу да проверим „%s“: ниÑам нашао „fsck.%s“\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Проверавам Ñве ÑиÑтеме датотека.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "——чекам—— (%d. корак)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Употреба: fsck [-AMNPRTV] [ -C [ од ] ] [-t врÑта_ÑиÑ_дат] [опције_ÑиÑ_дат] [ÑиÑ_дттка...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: превише уређаја\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: превише аргумената\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Качим Ñамо за читање.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Омогућавам кориÑницима да доделе Ñве блокове. Ово је опаÑно!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Покрените „e2fsck -fy“ „%s“.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: качим Ñамо за читање без опоравка дневника\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Дневнику је потребан опоравак; треба да покренете „e2fsck -E дневник_Ñамо“.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: ПиÑање у дневник није подржано.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Упозорење: Качим непроверени ÑиÑ_дттка, покретање „e2fsck“ је препоручљиво.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Упозорење: ДоÑтигнут је највећи број качења, покретање „e2fsck“ је препоручљиво.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Упозорење: ДоÑтигнуто је време провере, покретање „e2fsck“ је препоручљиво.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Откривени Ñу Ñирочићи; покретање „e2fsck“ је препоручљиво.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Откривене Ñу грешке; покретање „e2fsck“ је препоручљиво.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Употреба: %s [-RVadlpv] [датотеке...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "За време читања заÑтавица на „%s“"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Приликом читања пројекта на „%s“"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "За време читања издања на „%s“"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Ðе могу да доделим променљиву путање у „lsattr_dir_proc“\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Употреба: %s [-c|-l назив_датотеке] [-b величина_блока] [-C величина_клаÑтера]\n"
+"\t[-i бајтова_по_и-чвору] [-I величина_и-чвора] [-J опције_дневника]\n"
+"\t[-G величина_флекÑ_групе] [-N број_и-чворова] [-d корени_директоријум]\n"
+"\t[-m проценат_резервиÑаних_блокова] [-o оÑ_творца]\n"
+"\t[-g блокова_по_групи] [-L натпиÑ_волумена] [-M поÑледњи_прикачени_директоријум]\n"
+"\t[-O функција[,...]] [-r ревизија_Ñд-а] [-E проширена_опција[,...]]\n"
+"\t[-t fs-type] [-T врÑта_употребе ] [-U UUID] [-e понашање_грешака][-z датотека_опозива]\n"
+" [-jnqvDFSV] уређај [број_блокова]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Покрећем наредбу: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "док Ñам покушавао да покренем „%s“"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "приликом обраде ÑпиÑка лоших блокова из програма"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Блок %d у облаÑти опиÑника примарног Ñуперблока/групе је лош.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Блокови од %u до %u морају бити добри да би Ñе изградио ÑиÑтем датотека.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Прекидам...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Упозорење: резерва опиÑника Ñуперблока/групе на блоку %u Ñадржи\n"
+"\tлоше блокове.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "приликом обележавања лоших блокова коришћеним"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "приликом пиÑања резервиÑаних и-чворова"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Пишем табеле и-чвора: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Ðе могу да запишем %d блока у табели и-чвора Ñа почетком %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "готово \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "приликом Ñтварања кореног директоријума"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "приликом читања кореног и-чвора"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "приликом поÑтављања влаÑништва кореног и-чвора"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "приликом Ñтварања „/изгубљено+нађено“"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "приликом тражења „/изгубљено+нађено“"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "приликом ширења „/изгубљено+нађено“"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "приликом поÑтављања и-чвора оштећених блокова"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "ÐеÑтало је меморије током бриÑања Ñектора %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Упозорење: не могу да читам блок 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Упозорење: не могу да обришем Ñектор %d: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "приликом поделе величине дневника"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "приликом покретања Ñуперблока дневника"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "ПоÑтављам на нулу уређај дневника: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "приликом поÑтављања на нулу уређаја дневника (блок %llu, укупно %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "приликом пиÑања Ñуперблока дневника"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Стварам ÑиÑтем датотека Ñа %llu %dk блока и %u и-чвора\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"упозорење: %llu блока Ñе не кориÑте.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "ÐÐ°Ñ‚Ð¿Ð¸Ñ ÑиÑтема датотека=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Ð’Ñ€Ñта ОС-а: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Величина блока=%u (запиÑник=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Величина клаÑтера=%u (запиÑник=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Величина фрагмента=%u (запиÑник=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "ИÑкорак = %u блока, ширина траке = %u блока\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u и-чвора, %llu блока\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu блока (%2.2f%%) је резревиÑано за админиÑтратора\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Први блок података=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "ВлаÑник кореног директоријума=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Ðајвећи број блокова ÑиÑтем датотека=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u групе блокова\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u група блокова\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u блока по групи, %u клаÑтера по групи\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u блока по групи, %u фрагмента по групи\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u и-чвора по групи\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "УУИД ÑиÑтема датотека: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Резерве Ñуперблока Ñмештене на блоковима: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "„%s“ захтева „-O 64бита“\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "„%s“ мора бити пре „resize=%u“\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "ÐеиÑправна величина опиÑника: %s\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "ÐеиÑправно Ñеме хеша: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "ÐеиÑправан померај: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "ÐеиÑправан период оÑвежавања ммп-а: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "ÐеиÑправан број Ñуперблокова резерве: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "ÐеиÑправан параметар иÑкорака: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "ÐеиÑправан параметар ширине траке: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "ÐеиÑправан параметар промене величине: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Ðајвећа вредноÑÑ‚ промене величине мора бити већа од величине ÑиÑтема датотека.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Промена величине на мрежи није подржана Ñа ÑиÑтемима датотека ревизије 0\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "ÐеиÑправан корени влаÑник: %s\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "ÐеиÑправно кодирање: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Ðаведена је лоша опција: %s\n"
+"\n"
+"Проширене опције Ñу раздвојене зарезима, и могу имати аргумент\n"
+"\tкоји је подешен знаком једнакоÑти (=).\n"
+"\n"
+"ИÑправне проширене опције Ñу:\n"
+"\tmmp_update_interval=<период>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<РÐИД комада података по диÑку у блоковима>\n"
+"\tstripe-width=<РÐИД иÑкорак * диÑкови података у блоковима>\n"
+"\toffset=<померај за Ñтварање ÑиÑтема датотека>\n"
+"\tresize=<највећа величина промене величине у блоковима>\n"
+"\tpacked_meta_blocks=<0 иÑкључује, 1 укључује>\n"
+"\tlazy_itable_init=<0 иÑкључује, 1 укључује>\n"
+"\tlazy_journal_init=<0 иÑкључује, 1 укључује>\n"
+"\troot_owner=<уид кореног директоријума>:<гид кореног директоријума>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<кодирање>\n"
+"\tencoding_flags=<заÑтавице>\n"
+"\tquotatype=<врÑта квоте за укључивање>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Упозорење: РÐИД ширина траке %u није парни умножак иÑкорака %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "грешка: ÐеиÑправна заÑтавица кодирања: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "грешка: Кодирање мора изричито бити наведено приликом давања заÑтавица кодирања\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Грешка ÑинтакÑе у датотеци подешавања „mke2fs“-а (%s, %d. ред)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "ПоÑтављена је неиÑправна опција ÑиÑтема датотека: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "ПоÑтављена је неиÑправна опција качења: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Ваша датотека „mke2fs.conf“ не дефинише „%s“ врÑту ÑиÑтема датотека.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Вероватно треба да инÑталирате оÑвежену датотеку „mke2fs.conf“.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Прекидам...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Упозорење: врÑта ÑиÑтема датотека „%s“ није дефиниÑана у датотеци „mke2fs.conf“\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Ðе могу да доделим меморију за нову ПУТÐЊУ.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Ðе могу уÑпешно да покренем профил (грешка: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "неиÑправна величина блока — %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Упозорење: величина блока %d није употребљива на већини ÑиÑтема.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "неиÑправна величина клаÑтера — %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "„-R“ је заÑтарело, кориÑтите „-E“"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "лоше понашање грешке — %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Ðедозвољени број за блокове по групи"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "блокова по групи мора бити умножак од 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Ðедозвољени број за величину „flex_bg“"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "Величина „flex_bg“ мора бити Ñтепен 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "Величина „flex_bg“ (%lu) мора бити мање или једнака Ñа 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "неиÑправан опÑег и-чвора %s (најм. %d/најв. %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "неиÑправна величина и-чвора — %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Упозорење: Опција „-K“ је заÑтарела и не треба више да Ñе кориÑти. КориÑтите проширену опцију „-E nodiscard“!\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "у додели меморије за назив_датотеке_лоших_блокова"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"Упозорење: Ð½Ð°Ñ‚Ð¿Ð¸Ñ Ñ˜Ðµ предуг; биће Ñкраћен на „%s“\n"
+"\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "неиÑправан проценат резервиÑаних блокова — %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "лош број и-чворова — %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "приликом доделе ниÑке функције ÑиÑтема датотека"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "лош ниво ревизије — %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "приликом покушаја Ñтварања ревизије %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "Опција „-t“ Ñе може кориÑтити Ñамо једном"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "Опција „-T“ Ñе може кориÑтити Ñамо једном"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "приликом покушаја отварања уређаја дневника „%s“\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Величина блока уређаја дневника (%d) је мања од најмање величине блока %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "КориÑтим величину блока уређаја дневника: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "неиÑправни блокови „%s“ на уређају „%s“"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "ÑиÑтем датотека"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Ðе поÑтоји датотека „%s“ и никаква величина није наведена.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Стварам обичну датотеку „%s“\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "док Ñам покушавао да одредим величину ÑиÑтема датотека"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Ðе могу да одредим величину уређаја; морате навеÑти\n"
+"величину ÑиÑтема датотека\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Извештено је да је величина уређаја нула. Ðаведена је неиÑправна партиција, или\n"
+"\tтабела партиција није поново прочитана након покретања „fdisk“-а, зато што је\n"
+"\tизмењена партиција заузета и у употреби. Морате поново да подигнете\n"
+"\tÑиÑтем да биÑте поново прочитали табелу патриција.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "СиÑтем датотека је већи од привидне величине уређаја."
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "ÐиÑам уÑпео да обрадим ÑпиÑак врÑта ÑиÑтема датотека\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "ХУРД не подржава функцију врÑте датотеке.\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "ХУРД не подржава функцију велике датотеке.\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "ХУРД не подржава функцију Ñуме провере метаподатака.\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "ХУРД не подржава функцију „еа_чвор“.\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "док Ñам покушавао да одредим величину хардверÑког Ñектора"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "док Ñам покушавао да одредим величину физичког Ñектора"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "приликом поÑтављања величине блока; премала је за уређај\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Упозорење: наведена величина блока %d је мања од величине физичког Ñектора уређаја %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Величина уређаја (0x%llx blocs) „%s“ је превише велика да би била изражена\n"
+"\tÑа 32 бита коришћењем величине блока од %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Величина уређаја (0x%llx blocs) „%s“ је превише велика за прављење\n"
+"\tÑ Ð¸Ñтема датотека коришћењем величине блока од %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "врÑте_Ñд-а за резолуцију „mke2fs.conf“-а: "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Функције ÑиÑтема датотека ниÑу подржане Ñа ÑиÑтемима датотека ревизије 0\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "ОÑкудни Ñуперблокови ниÑу подржани Ñа ÑиÑтемима датотека ревизије 0\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Дневници ниÑу подржани Ñа ÑиÑтемима датотека ревизије 0\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "неиÑправан проценат резервиÑаних блокова — %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "РаÑпони МОРÐЈУ бити укључени за 64-битни ÑиÑтем датотека. ПроÑледите раÑпоне „-O“ да иÑправите.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Величина клаÑтера не може бити мања од величине блока.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "навођење величине клаÑтера захтева функцију „bigalloc“"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "упозорење: Ðе могу да добавим геометрију уређаја за „%s“\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Поравнање „%s“ је померено за %lu бајта.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Ово може довеÑти до врло Ñлабог учинка, предлаже вам Ñе (поновно)-партициониÑање.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "„%s“ има могућноÑÑ‚ ДÐИкÑ-а али тренутна величина блока %u Ñе разликује од величине Ñтранице ÑиÑтема %u тако да ÑиÑтем датотека неће подржавати ДÐИкÑ.\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "блокови од %d бајта Ñу превелики за ÑиÑтем (најв. %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "Упозорење: блокови од %d бајта Ñу превелики за ÑиÑтем (најв. %d), приморано је наÑтављање\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Предлог: КОриÑтите језгро ЛинукÑа >= 3.18 због побољшане ÑтабилноÑти функција метаподатака и Ñуме провере дневника.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Ðепознато кодирање назива датотеке из профила: %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Ðепознате заÑтавице кодирања из профила: %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Упозорење: померај је наведен без изричите величине ÑиÑтема датотека.\n"
+"Стварам ÑиÑтем датотека Ñа %llu блока али то можда није\n"
+"оно што ви желите.\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "и-чворови од %d бајта Ñу премали за квоту пројекта"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Ðе могу да подржим функцију „bigalloc“ без функције раÑпона"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Функције „resize_inode“ и „meta_bg“ ниÑу ÑаглаÑне.\n"
+"Ðе могу бити укључене иÑтовремено.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"Упозорење: „bigalloc“ ÑиÑтеми датотека Ñа величином клаÑтера већом\n"
+"16 пута од величине блока Ñе Ñматра екÑперименталним\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "резервиÑани блокови промене величине на мрежи ниÑу подржани на не-оÑкудном ÑиÑтему датотека"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "број блокова по групи је ван опÑега"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Функција „flex_bg“ није укључена, тако да величина „flex_bg“ не може бити наведена"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "неиÑправна величина и-чвора %d (најм. %d/најв. %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "и-чворови од %d бајта Ñу премали за уграђене податке; наведите већу величину"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "128-битни и-чворови не могу да раде Ñа подацима изван 2038 а јеÑу и заÑтарели\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "превише и-чворова (%llu), да повећам опÑег и-чвора?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "превише и-чворова (%llu), наведи < 2^32 и-чвора"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"величина_и-чвора (%u) * број_и-чворова (%u) је превелико за\n"
+"\tÑиÑтем датотека Ñа %llu блок(ов)а, наведите већи опÑег_и-чвора (-i)\n"
+"\tили Ñмањите број_и-чворова (-N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Одбацујем блокове уређаја: "
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "неуÑпех — "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "приликом покретања контекÑта квоте"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "приликом пиÑања и-чвора квоте"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "лоше понашање грешке у профилу — %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "у додели меморије за „android_sparse_params“"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "приликом поÑтављања Ñуперблока"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "РаÑпони ниÑу укључени. Стаблу раÑпона датотеке Ñе може урадити Ñума провере, док мапама блокова не. Ðе укључивање раÑпона Ñмањује покривање метаподатака током Ñуме провере. ПроÑледите „-O“ раÑпонима да иÑправите.\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Подршка 64-битног ÑиÑтема датотека није укључена. Већа поља обезбеђена овом функцијом укључују Ñвеобухватну Ñуму проевере. ПроÑледите „-O 64-бита“ да иÑправите.\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Функција „metadata_csum_seed“ захтева функцију „metadata_csum“.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "Одбацивање је уÑпело а као резултат даће 0s — преÑкачем бриÑање табеле и-чвора\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "непознат Ð¾Ñ â€” %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Додељујем табеле групе: "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "приликом покушаја додељивања табела ÑиÑтема датотека"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "приликом одзначавања лоших блокова"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tприликом претварања битмапе подклаÑтера"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "приликом израчунавања прекорачења"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "„%s“ може бити и даље оштећено препиÑивањем Ñуперблоком\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "приликом поÑтављања на нулу блока %llu на крају ÑиÑтема датотека"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "приликом резервиÑања блокова за промену величине на мрежи"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "дневник"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Додајем дневник уређају „%s“: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tприликом покушаја додавања дневника уређају „%s“"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "готово\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "ПреÑкачем Ñтварање дневника у режиму Ñамо-Ñупер\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Правим дневник (%u блока): "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tприликом покушаја Ñтварања дневника"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Грешка приликом укључивања функције заштите од вишеÑтруког качења."
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Заштита од вишеÑтруког качења је укључена Ñа периодом оÑвежавања од %d Ñекунде.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "Умножавам датотеке на уређај: "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "приликом попуњавања ÑиÑтема датотека"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "ЗапиÑујем податке предрачуна Ñуперблокова и ÑиÑтема датотека: "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "приликом пиÑања и затварања ÑиÑтема датотека"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"готово\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "приликом поÑтављања на нулу блока %llu за велику датотеку"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Померај партиције од %llu (%uk) блока није ÑаглаÑан Ñа величином клаÑтера %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Огромне датотеке биће Ñведене на нулу\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Стварам %lu огромну(е) датотеку(е) "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "Ñа %llu блока Ñвака"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "приликом Ñтварања огромне датотеке %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Употреба: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Употреба: %s уређај...\n"
+"\n"
+"ИÑпиÑује податке о партицији за Ñваки дати уређај.\n"
+"Ðа пример: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Ðе могу да отворим „%s“: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Ðе могу да добавим геометрију за „%s“: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Ðе могу да добавим величину за „%s“: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d почетак=%8d величина=%8lu крај=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Ова операција захтева недавно проверени ÑиÑтем датотека.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Покрените „e2fsck -f“ на ÑиÑтему датотека.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Покрените „e2fsck -fD“ на ÑиÑтему датотека.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Употреба: %s [-c највећи_број_качења] [-e понашање_грешака] [-f] [-g група]\n"
+"\t[-i период[d|m|w]] [-j] [-J опције_дневника] [-l]\n"
+"\t[-m проценат_резервиÑаних_блокова] [-o [^]опције_качења[,...]]\n"
+"\t[-r број_резервиÑаних_блокова] [-u кориÑник] [-C број_качења]\n"
+"\t[-L натпиÑ_волумена] [-M поÑледњи_качени_дир]\n"
+"\t[-O [^]функција[,...]] [-Q опције_квоте]\n"
+"\t[-E проширена_опција[,...]] [-T поÑледње_време_провере] [-U УУИД]\n"
+"\t[-I нова_величина_и-чвора] [-z датотека_поништења] уређај\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "ÐиÑам нашао Ñуперблок дневника!\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "приликом покушаја отварања Ñпољног дневника"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "„%s“ није уређај дневника.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Суперблок дневника је оштећен, бр_кориÑника\n"
+"је превиÑок (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "ÐиÑам нашао УУИД ÑиÑтема датотека на уређају дневника.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Ðе могу да нађем уређај дневника. ÐИЈЕ уклоњен\n"
+"КориÑтите опцију „-f“ да уклоните недоÑтајући уређај дневника.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Дневник је уклоњен\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "приликом читања битмапа"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "приликом бриÑања и-чвора дневника"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "приликом пиÑања и-чвора дневника"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(и поÑле поново подигните ÑиÑтем!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Ðакон што покренете „e2fsck“, покрените „resize2fs %s %s“"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Покрените „resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z „%s“"
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "“ да укључите 64-битни режим.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "“ да иÑкључите 64-битни режим.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"УПОЗОРЕЊЕ: Ðе могу да потврдим подршку језгра за „metadata_csum_seed“.\n"
+" Ово захтева Ð›Ð¸Ð½ÑƒÐºÑ >= v4.4.\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "БриÑање „%s“ функције ÑиÑтема датотека није подржано.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "ПоÑтављање „%s“ функције ÑиÑтема датотека није подржано.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Функција „has_journal“ може бити очишћена Ñамо када је ÑиÑтем датотека\n"
+"откачен или прикачен Ñамо за читање.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"ЗаÑтавица „needs_recovery“ је поÑтављена. Покрените „e2fsck“ пре\n"
+"бриÑања заÑтавице „has_journal“.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"ПоÑтављање „sparse_super“ функције ÑиÑтема датотека није подржано\n"
+"за ÑиÑтеме датотека Ñа укљученом функцијом „meta_bg“.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Функција заштите од вишеÑтруког качења не може\n"
+"бити поÑтављена ако је ÑиÑтем датотека прикачен\n"
+"или Ñамо за читање.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Заштита од вишеÑтруког качења је била укључена Ñа периодом оÑвежавања од %d Ñек.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"Функција заштите од вишеÑтруког качења не може бити\n"
+"иÑкључена ако је ÑиÑтем датотека Ñамо за читање.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "Грешка приликом читања битмапа\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Магични број у ММП блоку не одговара. очекиван: %x, Ñтваран: %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "приликом читања ММП блока."
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "ИÑкључивање Ð¸Ð½Ð´ÐµÐºÑ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ˜ÑƒÐ¼Ð° на ÑиÑтему датотека Ñа Ñумама провере може да потраје."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Ðе могу да иÑкључим „dir_index“ на прикаченом ÑиÑтему датотека!\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"БриÑање заÑтавице „flex_bg“ ће довеÑти до недоÑледноÑти\n"
+"ÑиÑтема датотека.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Функција „huge_file“ може бити очишћена Ñамо када је ÑиÑтем датотека\n"
+"откачен или прикачен Ñамо за читање.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Укључивање Ñума провере може потрајати."
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Ðе могу да укључим „metadata_csum“ на прикаченом ÑиÑтему датотека!\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "РаÑпони ниÑу укључени. Стаблу раÑпона датотеке Ñе може урадити Ñума провере, док мапама блокова не. Ðе укључивање раÑпона Ñмањује покривање метаподатака током Ñуме провере. Поново покрените Ñа „-O“ раÑпоном да иÑправите.\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Подршка 64-битног ÑиÑтема датотека није укључена. Већа поља обезбеђена овом функцијом укључују Ñвеобухватну Ñуму проевере. Покрените „resize2fs -b“ да иÑправите.\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "ИÑкључивање Ñума провере може потрајати."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Ðе могу да иÑкључим „metadata_csum“ на прикаченом ÑиÑтему датотека!\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Ðе могу да укључим „uninit_bg“ на прикаченом ÑиÑтему датотека!\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Ðе могу да иÑкључим „uninit_bg“ на прикаченом ÑиÑтему датотека!\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Ðе могу да укључим 64-битни режим док је прикачен!\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Ðе могу да иÑкључим 64-битни режим док је прикачен!\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Ðе могу да омогућим функцију пројекта; величина и-чвора је премала.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Упозорење: Опција „^quota“ превазилази аргументе „-Q“.\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "Функција малих Ñлова Ñе може изменити Ñамо када је ÑиÑтем датотека откачен.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"ПоÑтављање функције „metadata_csum_seed“ је подржано Ñамо\n"
+"на ÑиÑтемима датотека Ñа укљученом функцијом „metadata_csum“.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"УУИД је измењен од укључивања функције „metadata_csum“. СиÑтем датотека мора бити откачен \n"
+"да би Ñе безбедно препиÑали Ñви метаподаци како би одговарали новом УУИД-у.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "Поновно израчунавање Ñума провере може потрајати."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "СиÑтем датотека већ има дневник.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tприликом покушаја отварања дневника на „%s“\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Стварам дневник на уређају „%s“: "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "приликом додавања ÑиÑтема датотека дневнику на „%s“"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Стварам и-чвор дневника: "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tприликом покушаја Ñтварања датотеке дневника"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Ðе могу да омогућим квоту пројекта; величина и-чвора је премала.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "приликом покретања контекÑта квоте у библиотеци подршке"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "приликом оÑвежавања ограничења квоте (%d)"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "приликом пиÑања датотеке квоте (%d)"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "приликом уклањања датотеке квоте (%d)"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Ðаведене Ñу лоше опције квоте.\n"
+"\n"
+"ДоÑтупне Ñу Ñледеће иÑправне опције квоте (проÑлеђују Ñе раздвојене зарезом):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Ðе могу да обрадим одредник датума/времена: %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "лош број качења — %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "лош назив гид-а/групе — %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "лош период — %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "лош опÑег резервиÑаног блока — %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "„-o“ Ñе може навеÑти Ñамо једном"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "„-O“ Ñе може навеÑти Ñамо једном"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "лош број резервиÑаних блокова — %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "лош назив уид-а/кориÑника — %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "лоша величина и-чвора — %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Величина и-чвора мора бити Ñтепен двојке — %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "период_ммп_оÑвежавања је превелик: %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "ПоÑтављам период оÑвежавања заштите од вишеÑтруког качења на %lu Ñекунду\n"
+msgstr[1] "ПоÑтављам период оÑвежавања заштите од вишеÑтруког качења на %lu Ñекунде\n"
+msgstr[2] "ПоÑтављам период оÑвежавања заштите од вишеÑтруког качења на %lu Ñекунди\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "ПоÑтављам зÑтавицу грешке ÑиÑтема датотека на приÑилну проверу иÑтог.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "ÐеиÑправан РÐИД иÑкорак: %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "ÐеиÑправна РÐИД ширина траке: %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "ÐеиÑправан хеш алгоритам: %s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "ПоÑтављам оÑновни хеш алгоритам на „%s“ (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Ðе могу да изменим поÑтојеће кодирање\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "ÐеиÑправно кодирање: %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "ПоÑтављам кодирање на „%s“\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "ПоÑтављам заÑтавице кодирања на „%s“\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Ðаведене Ñу лоше опције.\n"
+"\n"
+"Проширене опције Ñу раздвојене зарезима, и могу имати аргумент\n"
+"\tкоји је подешен знаком једнакоÑти (=).\n"
+"\n"
+"ИÑправне проширене опције Ñу:\n"
+"\tclear_mmp\n"
+"\thash_alg=<хеш алгоритам>\n"
+"\tmount_opts=<проширене подразумеване опције качења>\n"
+"\tmmp_update_interval=<ммп период оÑвежавања у Ñекундама>\n"
+"\tstride=<РÐИД величина комада по диÑку у блоковима>\n"
+"\tstripe_width=<РÐИД диÑкови иÑкорак*подаци у блоковима>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<кодирање>\n"
+"\tencoding_flags=<заÑтавице>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "ÐиÑам уÑпео да прочитам битмапу и-чвора\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "ÐиÑам уÑпео да прочитам битмапу блока\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "блокови за премештање"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "ÐиÑам уÑпео да доделим битмау блока приликом повећања величине и-чвора\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "Ðема довољно проÑтора за повећање величине и-чвора \n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "ÐиÑам уÑпео да премеÑтим блокове приликом промене величине и-чвора \n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Грешка промене величине и-чвора.\n"
+"Покрените „e2undo“ да поништите измене ÑиÑтема датотека. \n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Ðко Ñте Ñигурни да ÑиÑтем датотека није у употреби ни на једном чвору, покрените:\n"
+"„tune2fs -f -E clear_mmp {уређај}“\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Магија ММП блока је лоша. Покушајте да је поправите покретањем:\n"
+"„e2fsck -f %s“\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "Ðе могу да изменим уређај дневника.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Величина и-чвора је већ %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "Скупљање величине и-чвора није подржано\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "ÐеиÑправна величина и-чвора %lu (најв. %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Промена величине и-чворова може потрајати мало дуже."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Упозорење: Дневник је неуредан. Можете заменити дневник као:\n"
+"\n"
+"\te2fsck -E Ñамо_дневник %s\n"
+"\n"
+"затим поново покренути ову наредбу. У Ñупротном, Ñве начињене измене могу бити препиÑане\n"
+"опоравком дневника.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Опорављам дневник.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "ПоÑтављам највећи број качења на %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "ПоÑтављам текући број качења на %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "ПоÑтављам понашање грешке на %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "ПоÑтављам гид резервиÑаних блокова на %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "период између провера је превелик (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "ПоÑтављам период између провера на %lu Ñекунде\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "ПоÑтављам проценат резервиÑаних блокова на %g%% (%llu блока)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "број резервиÑаних блокова је превелик (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "ПоÑтављам брј резервиÑаних блокова на %llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"СиÑтем датотека већ има оÑкудне Ñуперблокове.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"ПоÑтављање заÑтавице оÑкудног Ñуперблока није подржано\n"
+"за ÑиÑтеме датотека Ñа укљученом функцијом „meta_bg“.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"ЗаÑтавица оÑкудног Ñуперблока је поÑтављена. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"БриÑање заÑтавице оÑкудног Ñуперблока није подржано.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "ПоÑтављам време поÑледње провере ÑиÑтема датотека на %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "ПоÑтављам уид резервиÑаних блокова на %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Грешка коришћења „clear_mmp“-а. Мора Ñе кориÑтити Ñа „-f“\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Функција квоте Ñе може изменити Ñамо када је ÑиÑтем датотека откачен.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Ðе могу да изменим УУИД овог ÑиÑтема датотека јер има заÑтавицу функције „stable_inodes“.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Подешавање УУИД-а на овом ÑиÑтему датотека може потрајати."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "УУИД Ñе може изменити Ñамо када је ÑиÑтем датотека откачен.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Ðко кориÑтите Ñамо језгра новија од v4.4, покрените „tune2fs -O metadata_csum_seed“ и поново је покрените.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "ÐеиÑправан УУИД запиÑ\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Потребно је оÑвежавање Ñуперблока дневника.\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Величина и-чвора Ñе може изменити Ñамо када је ÑиÑтем датотека откачен.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Промена величине и-чвора није подржана за ÑиÑтеме датотека Ñа укљученом\n"
+"функцијом „flex_bg“.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "ПоÑтављам величину и-чвора %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "ÐиÑам уÑпео да изменим величину и-чвора\n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "ПоÑтављам величину иÑкорака на %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "ПоÑтављам ширину траке на %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "ПоÑтављам проширене оÑновне опције качења на „%s“\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<наÑтављам>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Да наÑтавим (или да Ñачекам %d Ñек.) ? (y,N = да,не) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "Да наÑтавим ипак? (y,N = да,не) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "„mke2fs“ је ипак приÑиљено. Ðадам Ñе да је „/etc/mtab“ неиÑправно.\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "неће овде направити „%s“!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "„mke2fs“ је ипак приÑиљено.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Ðе могу да доделим меморију за обраду опција дневника!\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Ðе могу да нађем уређај дневника који одговара „%s“\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Ðаведене Ñу лоше опције дневника.\n"
+"\n"
+"Опције дневника Ñу раздвојене зарезима, и могу имати аргумент\n"
+"\tкоји је подешен знаком једнакоÑти „=“.\n"
+"\n"
+"ИÑправне опције дневника Ñу:\n"
+"\tsize=<величина дневника у мегабајтима>\n"
+"\tdevice=<уређај дневника>\n"
+"\tlocation=<меÑто дневника>\n"
+"\n"
+"Величина дневника мора бити између 1024 и 10240000 блокова ÑиÑтема датотека.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"СиÑтем датотека је премали за дневник\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Затражена величина дневника је %d блока; мора бити\n"
+"између 1024 и 10240000 блокова. Прекидам.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Укупна величина дневника је превелика за ÑиÑтем датотека.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"СиÑтем датотека ће бити ÑамоÑтално проверен након %d качења или након %g дана,\n"
+"до чега прво дође. КориÑтите „tune2fs -c“ или „-i“ за преÑкакање.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Употреба: %s [-d] [-p датотека_пид-а] [-s путања_утичнице] [-T време]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n број] [-s путања_утичнице]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "лоши аргументи"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "повежи"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "пиши"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "број читања"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "лоша дужина одговора"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "„УУИДd“ демон је већ покренут на пид-у „%s“\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Ðе могу да Ñтворим утичницу Ñ˜ÑƒÐ½Ð¸ÐºÑ Ñ‚Ð¾ÐºÐ°: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Ðе могу да Ñвежем Ñ˜ÑƒÐ½Ð¸ÐºÑ ÑƒÑ‚Ð¸Ñ‡Ð½Ð¸Ñ†Ñƒ „%s“: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Ðе могу да оÑлушкујем на Ñ˜ÑƒÐ½Ð¸ÐºÑ ÑƒÑ‚Ð¸Ñ‡Ð½Ð¸Ñ†Ð¸ „%s“: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Грешка читања Ñа клијента, дужина = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "операција %d, долазни број = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Време Ñтварања УУИД-а: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Створен је наÑумични УУИД: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Створен је временÑки УУИД %s и %d каÑнији УУИД\n"
+msgstr[1] "Створен је временÑки УУИД %s и %d каÑнија УУИД-а\n"
+msgstr[2] "Створен је временÑки УУИД %s и %d каÑнијих УУИД-а\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Створени Ñу „%d“ УУИД-и:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "ÐеиÑправна радња %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Лош број: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Грешка позивања „uuidd“ демона (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s и %d каÑнији УУИД\n"
+msgstr[1] "%s и %d каÑнија УУИД-а\n"
+msgstr[2] "%s и %d каÑнијих УУИД-а\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "СпиÑак УУИД-а:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Ðеочекивана дужина одговора Ñа Ñервера „%d“\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Ðе могу да убијем ууид демона Ñа пид-ом %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Убих ууид демона Ñа пид-ом %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Употреба: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Избачај раÑпона:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tБрој=%llu, Величина=%llu, Курзор=%llu, Поређано=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Употреба: %s [-d заÑтавице_прочишћавања] [-f] [-F] [-M] [-P] [-p] уређај [-b|-s|нова_величина] [-S RAID-stride] [-z датотека_опозива]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Проширујем табелу и-чвора"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Премештам блокове"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Прегледам табелу и-чворова"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "ОÑвежавам упуте и-чвора"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Премештам табелу и-чворова"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Ðепознат пролаз?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Почетни пролаз %d (најв. = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Промена величине „bigalloc“ ÑиÑтема датотека није у потпуноÑти иÑпробана. ÐаÑтавите на\n"
+"ÑопÑтвену одговорноÑÑ‚! КориÑтите опцију „force“ ако ипак желите да наÑтавите.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "приликом отварања „%s“"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "приликом добављања података Ñтања за „%s“"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Прво покрените „e2fsck -f %s“.\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Процењена најмања величина ÑиÑтема датотека: %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "ÐеиÑправна нова величина: %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Ðова величина је превише велика да би била изражена Ñа 32 бита\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "Ðова величина резултира Ñа превише опиÑника групе блока.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Ðова величина је мања од најмање (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "ÐеиÑправна дужина иÑкорака"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Садржајна партиција (или уређај) има Ñамо %llu (%dk) блока.\n"
+"Затражили Ñте нову величину од %llu блока.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Ðе могу да подеÑим и да поништим 64-битну функцију.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Ðе могу да изменим 64-битну функцију на ÑиÑтему датотека који је већи од 2^32 блокова.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Ðе могу да изменим 64-битну функцију док је ÑиÑтем датотека прикачен.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Укључите функцију раÑпона Ñа „tune2fs“ пре него што укључите 64-битну функцију.\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"СиÑтем датотека је већ од %llu блока (%dk). Ðишта за урадити!\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "СиÑтем датотека је већ 64-битни.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "СиÑтем датотека је већ 32-битни.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Ðе могу да Ñкупим овај ÑиÑтем датотека јер има заÑтавицу функције „stable_inodes“.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Претварам ÑиÑтем датотека на 64-битни.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Претварам ÑиÑтем датотека на 32-битни.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Мењам величину ÑиÑтема датотека „%s“-а на %llu (%dk) блока.\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "приликом покушаја промене величине „%s“"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Покрените „e2fsck -fy %s“ да поправите ÑиÑтем датотека\n"
+"након прекинуте радње промене величине.\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"СиÑтем датотека на „%s“ је Ñада величине %llu блока (%dk).\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "приликом покушаја Ñкраћивања „%s“"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "језгро не подржава промену величине Ñа „sparse_super2“"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "СиÑтем датотека „%s“ је прикачен на „%s“; потребна је промена величине на мрежи\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Скупљање на мрежи није подржано"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "СиÑтем датотека не подржава промену величине на мрежи"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Ðема довољно резервиÑаних гдт блокова за промену величине"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Језгро не подржава промену величине ÑиÑтема датотека ове величине"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "приликом покушаја отварања тачке качења „%s“"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Затражено је Ñтаро Ñучеље промене величине.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Ðије дозвољена промена величине ÑиÑтема датотека"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Приликом провере подршке за промену величине на мрежи"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Језгро не подржава промену величине на мрежи"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Обављам промену величине на мрежи за „%s“ на %llu (%dk) блока.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Када Ñам покушао да раширим поÑледњу групу"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Када Ñам покушао да додам групу бр. %d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "СиÑтем датотека за „%s“ је прикачен на „%s“, а промена величине није подржана на том ÑиÑтему.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "број и-чворова (%llu) мора бити мањи од %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "резервиÑани блокови"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "блокови метаподатака"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "нови мета блокови"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Ово није требало да Ñе деÑи! Ðема Ñуперблока у поÑледњој „super_sparse“ групи блока?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Ово није требало да Ñе деÑи! Ðеочекивани Ñтари опиÑник (old_desc) у „super_sparse“ групи блока?\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Ово није требало да Ñе деÑи: промена величине и-чвора је оштећена!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "„EXT2FS“ библиотека издањeа 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Погрешан магични број за Ñтруктуру „ext2_filsys“"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Погрешан магични број за Ñтруктуру „badblocks_list“"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Погрешан магични број за Ñтруктуру „badblocks_iterate“"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Погрешан магични број за Ñтруктуру „inode_scan“"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Погрешан магични број за Ñтруктуру „io_channel“"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Погрешан магични број за Ñтруктуру „io_channel unix“"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Погрешан магични број за Ñтруктуру „io_manager“"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Погрешан магични број за Ñтруктуру „block_bitmap“"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Погрешан магични број за Ñтруктуру „inode_bitmap“"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Погрешан магични број за Ñтруктуру „generic_bitmap“"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Погрешан магични број за Ñтруктуру „io_channel test“"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Погрешан магични број за Ñтруктуру „ÑпиÑка блока директоријума“"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Погрешан магични број за Ñтруктуру „icount“"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Погрешан магични број за Ñтруктуру „Powerquest io_channel“"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Погрешан магични број за Ñтруктуру „екÑÑ‚2 датотеке“"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Погрешан магични број за заглавље екÑÑ‚2 Ñлике"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Погрешан магични број за Ñтруктуру „io_channel и-чвора“"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Погрешан магични број за руковање ext4 раÑпоном"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Лош магични број у Ñуперблоку"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Ревизија ÑиÑтема датотека је превиÑока"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Покушавам да пишем у ÑиÑтему датотека који је отворен Ñамо за читање"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Ðе могу да прочитам опиÑнике групе"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Ðе могу да упишем опиÑнике групе"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Оштећени опиÑник групе: лош блок за битмапу блока"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Оштећени опиÑник групе: лош блок за битмапу и-чвора"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Оштећени опиÑник групе: лош блок за табелу и-чвора"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Ðе могу да упишем битмапу и-чвора"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Ðе могу да прочитам битмапу и-чвора"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Ðе могу да упишем битмапу блока"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Ðе могу да прочитам битмапу блока"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Ðе могу да упишем табелу и-чвора"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Ðе могу да прочитам табелу и-чвора"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Ðе могу да прочитам Ñледећи и-чвор"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "СиÑтем датотека има неочекивану величину блока"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "екÑÑ‚2 директоријум је оштећен"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Покушај читања блока Ñа ÑиÑтема датотека је резултирао кратким читањем"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Покушај пиÑања блока на ÑиÑтем датотека је резултирао кратким пиÑањем"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Ðема Ñлободног проÑтора у директоријуму"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Битмапа и-чвора није учитана"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Битмапа блока није учитана"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Ðедозвољени број и-чвора"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Ðедозвољени број блока"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Унутрашња грешка у „ext2fs_expand_dir“-у"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Ðема довољно проÑтора за изградњу предложеног ÑиÑтема датотека"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "ÐеиÑправан број блока је проÑлеђен „ext2fs_mark_block_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "ÐеиÑправан број блока је проÑлеђен „ext2fs_unmark_block_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "ÐеиÑправан број блока је проÑлеђен „ext2fs_test_block_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "ÐеиÑправан број блока је проÑлеђен „ext2fs_mark_inode_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "ÐеиÑправан број блока је проÑлеђен „ext2fs_unmark_inode_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "ÐеиÑправан број блока је проÑлеђен „ext2fs_test_inode_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Покушај да привидно дотерам крај битмапе блокова је прошао Ñтварни крај"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Покушај да привидно дотерам крај битмапе и-чворова је прошао Ñтварни крај"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Ðађох недозвољени индиректни блок"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Ðађох двоÑтруки недозвољени индиректни блок"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Ðађох троÑтруки недозвољени индиректни блок"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Битмапе блока ниÑу иÑте"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Битмапе и-чвора ниÑу иÑте"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Ðедозвољени или лош назив уређаја"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Групи блока недоÑтаје табела и-чвора"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "екÑÑ‚2 Ñуперблок је оштећен"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "ÐеиÑправан општи број бита је проÑлеђен „ext2fs_mark_generic_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "ÐеиÑправан општи број бита је проÑлеђен „ext2fs_unmark_generic_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "ÐеиÑправан општи број бита је проÑлеђен „ext2fs_test_generic_bitmap“-и"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Превише Ñимболичких веза."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Функција опозива неће одрадити овај Ñлучај"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "и-чвор је из лошег блока у табели и-чвора"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "СиÑтем датотека има неподржану функцију"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "СиÑтем датотека има неподржану функцију Ñамо-за-читање"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "УИ канал није уÑпео да премота при читању или пиÑању"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Додела меморије није уÑпела"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "ÐеиÑправан аргумент је проÑлеђен библиотеци екÑÑ‚2"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Ðе могу да доделим блок у екÑÑ‚2 ÑиÑтему датотека"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Ðе могу да доделим и-чвор у екÑÑ‚2 ÑиÑтему датотека"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "екÑÑ‚2 и-чвор није директоријум"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Превише упута у табели"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "„ext2_lookup“ није нашао датотеку"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Датотека је отворена Ñамо за читање"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "ÐиÑам нашао блок екÑÑ‚2 директоријума"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "екÑÑ‚2 директоријум већ поÑтоји"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Функција екÑÑ‚2 библиотеке није примењена"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "КориÑник је отказао захтевано"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "екÑÑ‚2 датотека је превелика"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "ДоÑтављени уређај дневника није блок уређај"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "ÐиÑам нашао Ñуперблок дневника"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Дневник мора бити барем од 1024 блокова"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Ðеподржано издање дневника"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Грешка учитавања Ñпољног дневника"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "ÐиÑам нашао дневник"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Хеш директоријума није подржан"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Ðедозвољени број блока проширеног атрибута"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Ðе могу да направим ÑиÑтем датотека Ñа затраженим бројем и-чворова"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "„E2image“ Ñнимак није у употреби"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Превише резервиÑаних блокова опиÑника групе"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Промена величине и-чвора је оштећена"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Покушао Ñам да поÑтавим битмапу блока Ñа недоÑтајућим индиректним блоком"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: УÑпело је"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: База података је оштећена"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: УИ грешка"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Грешка закључавања"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Ðема више меморије"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Ð—Ð°Ð¿Ð¸Ñ Ñ˜Ðµ изашао"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Катанац поÑтоји на другим кључевима"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: ÐеиÑправан параметар"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Ð—Ð°Ð¿Ð¸Ñ Ð½Ðµ поÑтоји"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: ПиÑање није дозвољено"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "СпиÑак блока директоријума „ext2fs“-а је празан"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Покушавам да изменим мапирање блока путем приÑтупника блока Ñамо за читање"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Погрешан магични број за Ñачувану путању екÑÑ‚4 раÑпона"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Погрешан магични број за 64-битну општу битмапу"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Погрешан магични број за 64-битну битмапу блока"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Погрешан магични број за 64-битну битмапу и-чвора"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Погрешан магични број —— РЕЗЕРВИСÐÐО_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Погрешан магични број —— РЕЗЕРВИСÐÐО_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Погрешан магични број —— РЕЗЕРВИСÐÐО_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Погрешан магични број —— РЕЗЕРВИСÐÐО_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Погрешан магични број —— РЕЗЕРВИСÐÐО_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Погрешан магични број —— РЕЗЕРВИСÐÐО_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Погрешан магични број —— РЕЗЕРВИСÐÐО_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Заглавље раÑпона је оштећено"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Ð˜Ð½Ð´ÐµÐºÑ Ñ€Ð°Ñпона је оштећен"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "РаÑпон је оштећен"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Ðема Ñлободног проÑтора у мапи раÑпона"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "и-чвор не кориÑти раÑпоне"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Ðема „next“ (Ñледећег) раÑпона"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Ðема „previous“ (претходног) раÑпона"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Ðема „up“ (горњег) раÑпона"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Ðема „down“ (доњег) раÑпона"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Ðема текућег чвора"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Операција „ext2fs“ није подржана"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Ðема меÑта за уметање раÑпона у и-чвор"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Дељење ће резултирати празним чвором"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "ÐиÑам нашао раÑпон"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Радња није подржана за и-чворове који Ñадрже раÑпоне"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Дужина раÑпона није иÑправна"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "УИ канал не подржава 64-битне бројеве блока"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Ðе могу да проверим да ли је ÑиÑтем датотека прикачен зато што недоÑтаје мтаб датотека"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "СиÑтем датотека је превелик за коришћење Ñтарих битмапа"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "ММП: неиÑправан магични број"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "ММП: уређај је тренутно активан"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "ММП: „e2fsck“ је покренут"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "ММП: број блокова је ван опÑега ÑиÑтема датотека"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "ММП: у току је непозната радња"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "ММП: ÑиÑтем датотека је још увек у току"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "ММП: отварање Ñа „O_DIRECT“ није уÑпело"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Величина опиÑника групе блокова није иÑправна"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Сума провере и-чвора не одговара и-чвору"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Сума провере битмапе и-чвора не одговара битмапи"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Сума провере блока раÑпона не одговара блоку раÑпона"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Блок директоријума нема проÑтора за Ñуму провере"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Сума провере блока директоријума не одговара блоку директоријума"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Сума провере блока проширеног атрибута не одговара блоку"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Сума провере Ñуперблока не одговара Ñуперблоку"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Ðлгоритам Ñуме провере није познат"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Сума провере ММП блока не одговара"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "екÑÑ‚2 датотека већ поÑтоји"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Сума провере битмапе блока не одговара битмапи"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Ðе могу да понављам блокове података и-чвора који Ñадржи уграђене податаке"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Проширени атрибут има неиÑправну дужину назива"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Проширени атрибут има неиÑправну дужину вредноÑти"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Проширени атрибут има нетачан хеш"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Блок проширеног атрибута има лоше заглавље"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "ÐиÑам нашао кључ проширеног атрибута"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Ðема довољно проÑтора за Ñмештај података проширеног атрибута"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "СиÑтему датотека недоÑтаје функција „ext_attr“ или „inline_data“"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "И-чвор нема уграђене податке"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Ðема блока за и-чвор Ñа уграђеним подацима"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Ðема Ñлободног проÑтора у уграђеним подацима"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Погрешан магични број за Ñтруктуру проширеног атрибута"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "И-чвор изгледа да Ñадржи ђубре"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Проширени атрибут има неиÑправан померај вредноÑти"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "ÐедоÑледне заÑтавице дневника"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Оштећена је датотека опозива"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Погрешна датотека опозива за овај ÑиÑтем датотека"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "СиÑтем датотека је оштећен"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Лош ЦРЦ је откривен у ÑиÑтему датотека"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Суперблок дневника је оштећен"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "И-чвор је оштећен"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "И-чвор који Ñадржи вредноÑÑ‚ проширеног атрибута је оштећен"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "ОпиÑници групе ниÑу учитани"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "Изгледа да је оштећена унутрашња Ñтруктура „ext2_filsys“ података"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "Ðађох цикличну петљу у Ñтаблу проширења"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Радња није подржана на Ñпољном журналу"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Издање профила 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Лоша магична вредноÑÑ‚ у чвору профила"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "ÐиÑам нашао одељак профила"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "ÐиÑам нашао релацију профила"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Покушао Ñам да додам релацију чвору који није одељак"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Заглавље одељка профила има не-нулту вредноÑÑ‚"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Лош Ñвезани ÑпиÑак у Ñтруктури профила"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Лош ниво групе у Ñтруктури профила"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Лош показивач полазишта у Ñтруктури профила"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Лоша магична вредноÑÑ‚ у приÑтупнику профила"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Ðе могу да поÑтавим вредноÑÑ‚ на чвору одељка"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "ÐеиÑправан аргумент је проÑлеђен библиотеци профила"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Покушавам да изменим профил Ñамо за читање"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Заглавље одељка профила није на највишем нивоу"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Грешка ÑинтакÑе у заглављу одељка профила"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Грешка ÑинтакÑе у релацији профила"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Вишак затворене заграде у профилу"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "ÐедоÑтаје отворена заграда у профилу"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Лоша магична вредноÑÑ‚ у табели профила"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Лоша магична вредноÑÑ‚ у табели одељка профила"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Понављање кроз Ñве одељке највишег нивоа није подржано"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "ÐеиÑправан објекат одељка профила"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Ðема више одељака"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Лош Ñкуп назива је проÑлеђен поÑтупку упита"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Ðије отворена ниједна датотека профила"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Лоша магична вредноÑÑ‚ у табели датотеке профила"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Ðе могу да отворим датотеку профила"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Већ поÑтоји одељак"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "ÐеиÑправна логичка вредноÑÑ‚"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "ÐеиÑправна вредноÑÑ‚ целог броја"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Лоша магична вредноÑÑ‚ у табели података датотеке профила"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tпоÑледњи пут је прикачен у %.*s у %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tпоÑледњи пут је прикачен у %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tнаправљен је у %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tпоÑледњи пут је измењен у %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Ðашао Ñам партициону табелу „%s“ у „%s“\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Ðе могу да отворим „%s“: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Уређај као да не поÑтоји; да ли Ñте га иÑправно навели?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "„%s“ није Ñпецијални уређај блока.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "„%s“ Ñадржи „%s“ ÑиÑтем датотека Ñа натпиÑом „%s“\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "„%s“ Ñадржи „%s“ ÑиÑтем датотека\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "„%s“ Ñадржи податке „%s“\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the bigalloc feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Упозорење: функција „bigalloc“ је још увек у развоју\n"
+#~ "Видите „https://ext4.wiki.kernel.org/index.php/Bigalloc“ за више о томе\n"
+#~ "\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "Употреба: %s [-F] [-I међумеморија_блокова_и-чвора] уређај\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "док Ñам покушавао да отворим „%s“"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "Ñкенираних и-чворова: %u.\n"
+
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "Функције кодирања и увијања Ñлова ниÑу ÑаглаÑне.\n"
+#~ "Ðе могу бити укључене иÑтовремено.\n"
+
+#~ msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+#~ msgstr "Ðе могу да омогућим функцију шифровања на ÑиÑтемима датотека Ñа укљученом функцијом кодирања.\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "„i_dir_acl“ за и-чвор „%i“ (%Q) је „%Id“, треба бити нула.\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "приликом отварања директоријума „%s“"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Откривене Ñу грешке Ñуме провере у ÑиÑтему датотека! Сада покрените „e2fsck“!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Откривене Ñу грешке Ñуме провере у битмапама! Сада покрените „e2fsck“!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: грешка читања битмапа: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Упозорење, имам проблема Ñа пиÑањем Ñуперблокова.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Функције дневника: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Величина дневника: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Дужина дневника: %u\n"
+#~ "Ðиз дневника: 0x%08x\n"
+#~ "Почетак дневника: %u\n"
+
+#~ msgid "Journal checksum type: crc32\n"
+#~ msgstr "Ð’Ñ€Ñта Ñуме провере дневника: crc32\n"
+
+#~ msgid ""
+#~ "Journal checksum type: %s\n"
+#~ "Journal checksum: 0x%08x\n"
+#~ msgstr ""
+#~ "Ð’Ñ€Ñта Ñуме провере дневника: %s\n"
+#~ "Сума провере дневника: 0x%08x\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Број грешке дневника: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Величина блока дневника: %u\n"
+#~ "Дужина дневника: %u\n"
+#~ "Први блок дневника: %u\n"
+#~ "Ðиз дневника: 0x%08x\n"
+#~ "Почетак дневника: %u\n"
+#~ "Број кориÑника дневника: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "КориÑници дневника: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: enabled project without quota together\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Упозорење: укључен је пројекат без квоте\n"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "Покрените „e2fsck“ на ÑиÑтему датотека.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "и-чвор „%i“ има поÑтављену заÑтавицу Ñажимања на ÑиÑтему датотека без подршке Ñажимања. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "грешка доделе блока „%b“ проширеног атрибута. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: упозорење: подршка Ñажимања је екÑпериментална.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: „e2fsck“ није преведен Ñа подршком Ð¥-СТÐБЛÐ,\n"
+#~ "\tали ÑиÑтем датотека „%s“ има директоријуме Ð¥-СТÐБЛÐ.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "за време доделе међумеморије поништавања"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", некоришћени и-чворови %u\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "ÐиÑам уÑпео да прочитам податаке ÑиÑтема датотека \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "Ðије уÑпело „tdb_fetch“ %s\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "УУИД ÑиÑтема датотека Ñе разликује \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "Ðије уÑпело „tdb_open“ %s\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "ÐиÑам уÑпео да отворим „%s“\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr "Поново одрађен Ð¿Ñ€ÐµÐ½Ð¾Ñ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ðµ %zd на меÑту %llu\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Ðије уÑпело пиÑање „%s“\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "ÐеиÑправан параметар врÑте квоте: %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "Ðе могу да доделим меморију за обраду опција квоте!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Ðе могу да доделим меморију за нову тдб назив датотеке\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Да поништите радње „tune2fs“-а, покрените наредбу\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "„%s“ је читав уређај, а не Ñамо једна партиција!\n"
diff --git a/po/sv.gmo b/po/sv.gmo
new file mode 100644
index 0000000..1e79a6d
--- /dev/null
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..403c588
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,8585 @@
+# Swedish messages for e2fsprogs.
+# Copyright © 2003, 2005, 2006, 2008, 2009, 2010, 2011, 2012, 2014, 2016, 2017, 2018, 2019, 2021, 2022 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+#
+# Göran Uddeborg <goeran@uddeborg.se>, 2003, 2005, 2006, 2008, 2009, 2010, 2011, 2012, 2014, 2016, 2017, 2018, 2019, 2021, 2022.
+#
+# $Revision: 1.111 $
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-13 15:58+0200\n"
+"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Dåligt block %u utanför giltigt intervall; ignoreras.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "vid rimlighetskontroll av inoden för dåliga block"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "vid läsning av inoden för dåliga block"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "vid försök att öppna %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "vid försök att använda popen â€%sâ€"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "vid läsning i listan över dåliga block från fil"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "vid uppdatering av inoden för dåliga block"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Varning: otillåtet block %u hittat i inoden får dåliga block. Tömt.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "när dir_info-tdbfilen frigjordes"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Fel vid läsning av block %lu (%s) vid %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Fel vid läsning av block %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ignorera fel"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Framtvinga omskrivning"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Fel vid skrivning av block %lu (%s) vid %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Fel vid skrivning av block %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "tomma katalogblock"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "tom katalogkarta"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Tomt katalogblock %u (nr. %d) i inod %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s filnamn nblock blockstorlek\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Otillåtet antal block!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Kunde inte allokera blockbuffert (storlek=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "inodskarta över utsträckningsombyggnad"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Användning: %s disk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "BLKFLSBUF-ioctl stöds inte! Kan inte tömma buffertar.\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "läser journalsuperblock\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: inget giltigt journalsuperblock hittades\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journalen för kort\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: felaktiga block för snabbfastställande\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: återhämtar journalen\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: återhämtar inte journalen i skrivskyddat läge\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "vid försök att återöppna %s"
+
+# Första bokstaven i detta och följande meddelanden är ett index som
+# används som en förkortning i andra meddelanden, och inte skrivs ut.
+# Uppslagningen sker på det ursprungliga meddelandet, så det spelar
+# egentligen ingen roll vilket tecken som står först i den översatta
+# strängen. Det viktiga är att det står någon platshållare där, första
+# tecknet skrivs inte ut, vare sig i originalsträngen eller den översatta
+# strängen. Jag tyckte det var bäst att behålla orginaltecknet.
+#
+# Jag har felrapporterat hela idén. Det innebär ju att man bygger ihop
+# meningar från delar, och det brukar ju gå sönder i översättningar med
+# olika genus och dylikt. Men författaren har en del bra argument om
+# att förkortningssystemet är en fördel när man skall få plats med så
+# mycket som möjligt på en räddningsdiskett. I det fallet är ändå
+# knappast översättningar med. Så den bästa lösningen är nog att låta
+# systemet som sådant finnas kvar, men inte använda det alls i översatta
+# meddelanden.
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "autökat attribut"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Afel vid allokering"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblock"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bbitkarta"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "ckomprimera"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckonflikt med något annat fs @b"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dkatalog"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Draderad"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "epost"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "Epost â€%Dn†i %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "ffilsystem"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fför inod %i (%Q) är"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrupp"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE katalog-inod"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinod"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iotillåten"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lär en länk"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mflerfaldigt ianspråkstagna"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nogiltig"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oföräldralös"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pproblem i"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qkvot"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rrotinod"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sskulle varit"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssuperblock"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "ulös"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "venhet"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xutsträckning"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "znollängds"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<Inod noll>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Inoden för dåliga block>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<Inoden för användarkvoter>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<Inoden för gruppkvoter>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Uppstartsprograminoden>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Inoden för återhämtning av borttagna kataloger>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Gruppidentifierarinoden>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<Journalinoden>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Reserverad inod 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Reserverad inod 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "normal fil"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "katalog"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "teckenenhet"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "blockenhet"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "namngivet rör"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "symbolisk länk"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "uttag (socket)"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "okänd filtyp med typ 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "indirekt block"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "dubbelt indirekt block"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "trippelt indirekt block"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "översättningsblock"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "block nr."
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "användare"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "grupp"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "projekt"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "okänd kvottyp"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "karta över flerfaldigt i anspråkstagna inoder"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "internt fel: kan inte hitta dup_blk för %llu\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "återvände från clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "internt fel: det gick inte att slå upp EA-blockpost för %llu"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "internt fel: det gick inte att slå upp EA-inodpost för %u"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "vid hashning av post med e_value_inum = %u"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "läser katalogblock"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "hämtar nästa inod från sökning"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "karta över använda inoder"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "kataloginodskarta"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "inodskarta över reguljära filer"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "karta över använda block"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "blockkarta över metadata"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "inod-skiftlägesavbildning"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "öppnar inodsökning"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "Pass 1"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "läser indirektblock för inod %u"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "karta över dåliga inoder"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "inod i karta över dåliga block"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "imagic inodskarta"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "karta över flerfaldigt i anspråkstagna block"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "karta över block för utökade attribut"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): förväntade %6lu fick fys %6lu (blkant %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "blockbitkarta"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "inodbitkarta"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "inodstabell"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "Pass 2"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "NLS är trasigt."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "Kan inte fortsätta."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "inod klar bitkarta"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Max minne"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Pass 3"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "bitkarta för upptäckt av inodsslingor"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Pass 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Pass 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Minnesallokeringsfel"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Minnesallokeringsfel"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(ingen prompt)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Fixa"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "Töm"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Relokera"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Allokera"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Expandera"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "Koppla till /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Skapa"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Rädda"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Kapa"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Töm inod"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Avbryt"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Dela"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Fortsätt"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Klona flerfaldigt ianspråkstagna block"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Ta bort fil"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Undertryck meddelanden"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Avlänka"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Töm HTree-index"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Ã…terskapa"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Optimera"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "Nollställ flagga"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(INGET)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "FIXAT"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "TÖMD"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "RELOKERAT"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "ALLOKERAT"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "EXPANDERAD"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "Ã…TERKOPPLAD"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "SKAPAD"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "RÄDDAD"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "KAPAT"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INOD TÖMD"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "AVBRUTET"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "DELAD"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "FORTSÄTTER"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "FLERFALDIG IANSPRÃ…KSTAGNA BLOCK KLONADE"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "FIL BORTTAGEN"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "UNDERTRYCKT"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "AVLÄNKAD"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE-INDEX TÖMT"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "KOMMER Ã…TERSKAPA"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "KOMMER OPTIMERA"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "FLAGGAN NOLLSTÄLLD"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "blockbitkarta för grupp %g är inte i gruppen. (block %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "inodsbitkarta för grupp %g är inte i gruppen. (block %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"inodtabell för grupp %g är inte i gruppen. (block %b)\n"
+"VARNING: ALLVARLIG DATAFÖRLUST ÄR MÖJLIG.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Superblocket kunde inte läsas eller beskriver inte ett giltigt\n"
+"ext2/ext3/ext4-filsystem. Om enheten är giltig och den verkligen innehåller ett\n"
+"ext2/ext3/ext4-filsystem (och inte växlingsutrymme eller ufs eller något annat)\n"
+"är superblocket trasigt, och du kan försöka köra med ett alternativt\n"
+"superblock:\n"
+" e2fsck -b 8193 <enhet>\n"
+" eller\n"
+" e2fsck -b 32768 <enhet>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Filsystemsstorleken (enligt superblocket) är %b block\n"
+"Den fysiska storleken på enheten är %c block\n"
+"Superblocket eller partitionstabellen är förmodligen trasig!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"Superblockets blockstorlek = %b, fragmentstorlek = %c.\n"
+"Denna version av e2fsck stödjer inte andra fragmentstorlekar än\n"
+"blockstorleken.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "Superblockets block per grupp = %b, skulle ha varit %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "Superblockets första datablock = %b, skulle ha varit %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"filsystemet hade ingen UUID; genererar en.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Observera: om det är flera inod- eller blockbitkarteblock eller en del\n"
+"av inodstabellen som måste flyttas, kanske du vill köra e2fsck med\n"
+"flaggan â€-b %S†först. Problemet kan ligga bara i den primära\n"
+"blockgruppbeskrivaren, och reservblockgruppbeskrivaren kan vara OK.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Skada hittad i superblock. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Fel vid bestämning av den fysiska enheten: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "inodsantal i superblock är %i, skall vara %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd stödjer inte funktionen filtyp.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Superblock har en ogiltig journal (inod %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Extern journal har flera filsystemsanvändare (stödjs ej).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Kan inte hitta extern journal\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "Extern journal har dåligt superblock\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Extern journal stödjer inte detta filsystem\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Filsystemsjournalsuperblock är av okänd typ %N (ej stött).\n"
+"Det är troligt att ditt exemplar av e2fsck är gammalt och/eller inte\n"
+"stödjer detta journalformat.\n"
+"Det är också möjligt att journalsuperblocket är trasigt.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Journalsuperblock är trasigt.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "Superblocksflaggan has_journal är nollställd, men en journal finns.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Superblockflagga behöver_rättas är satt, men ingen journal finns.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "Superblocksflagga behöver_rättas är nollställd, men journal har data.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "Töm journal"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "filsystemet har funktionsflaggor satta, men är ett revision 0-filsystem. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s föräldralös inod %i (uid=%Iu, gid=%Ig, rättighet=%Im, storlek=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "Ogiltigt %B (%b) hittat i föräldralös inod %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Redan tömt %B (%b) hittat i föräldralös inod %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "Ogiltig föräldralös inod %i i superblock.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Ogiltig inod %i i föräldralös inodlista.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Journalsuperblock har okänd skrivskyddad funktionsflagga satt.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Journalsuperblock har okänd inkompatibel funktionsflagga satt.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Journalversion stöds inte av denna e2fsck.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Flyttar journal från /%s till dold inod.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Fel vid flyttning av journal: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Hittade ogiltiga V2-journalsuperblockfält (från V1-journal).\n"
+"Tömmer fält efter V1-journalsuperblock ...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "Kör journal ändå"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "Rättningsflagga inte satt i reservsuperblock, så kör journal ändå.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Säkerhetskopierar blockinformation för journalinod.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"Filsystemet har inte resize_inode aktiverat, men r_reserved_gdt_blocks\n"
+"är %N; skulle varit noll. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode är inte aktiverat, men storleksändringsinoden är inte noll. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Storleksändringsinod är inte giltig. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Superblockets senaste monteringstid (%t,\n"
+"\tnu = %T) är i framtiden.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Superblockets senaste skrivningstid (%t,\n"
+"\tnu = %T) är i framtiden.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Superblocktips för externt superblock borde vara %X."
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Lägger till dirhash-tips till filsystem.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "kontrollsumma för gruppbeskrivare %g är %04x, skall vara %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "gruppbeskrivare %g är markerad oinitierad utan att egenskapen är satt.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "gruppbeskrivare %g har ogiltigt antal oanvända inoder %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Sista gruppblockbitkarta oinitierad. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Journaltransaktion %i var trasig, återuppspelningen avbröts.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Flaggan test_fs är satt (och ext4 är tillgängligt). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Superblockets senaste monteringstid ligger i framtiden.\n"
+"\t(med mindre än en dag, förmodligen för att hårdvaruklockan går fel)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Superblockets skrevs senast i framtiden.\n"
+"\t(med mindre än en dag, förmodligen för att hårdvaruklockan går fel)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Kontrollsumma för en eller flera blockgruppbeskrivare är ogiltig. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Sätter antalet fria inoder %j (var %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Sätter antalet fria block till %c (var %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Döljer kvotinod %i för %U (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "superblocket har ett felaktigt MMP-block. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "superblocket har ogiltigt MMP-magiskt tal. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "superblockets metadata_csum ersätter uninit_bg; båda funktionsbitarna kan inte vara satta samtidigt."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "Kontrollsumman för super-MMP-blocket stämmer inte. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "superblock på 64-bitars filsystem behöver utsträckningar för att komma åt hela disken. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg är för stort. (%N, maxvärde %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Extern kontrollsumma för journalsuperblock stämmer inte med superblocket. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "superblockets metadata_csum_seed är inte nödvändigt utan metadata_csum."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Fel vid initiering av kvotkontext i stödbiblioteket: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Felaktig krävd extra isize i superblocket (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Felaktig önskad extra isize i superblocket (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "Ogiltig kvotinod %i för %U. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "Superblocket skulle ha för många inoder (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Funktionerna resize_inode och meta_bg är aktiverade. Dessa funktioner\n"
+"är inte kompatibla. Storleksändingsinod skall avaktiveras. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Pass 1: Kontrollerar inoder, block och storlekar\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "Rotinod är inte en katalog. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "rotinod har dtid satt (förmodligen på grund av gammal mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Reserverad inod %i (%Q) har ogiltiga rättigheter. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "Raderad inod %i har dtid noll. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "Inod %i används, men har dtid satt. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "Inod %i är en nollängds katalog. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "Grupp %g:s blockbitkarta vid %b står i konflikt med annat filsystemblock.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "Grupp %g:s inodbitkarta vid %b står i konflikt med annat filsystemblock.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "Grupp %g:s inodtabell vid %b står i konflikt med annat filsystemblock.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "Grupp %g:s blockbitkarta (%b) år felaktig. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "Grupp %g:s inodbitkarta (%b) är felaktig. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "Inod %i, i_storlek är %Is, skulle varit %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "Inod %i, i_block är %Ib, skulle varit %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "Ogiltigt %B (%b) i inod %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) överlappar filsystemmetadata i inod %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "Inod %i har ogiltiga block. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "För många ogiltiga block i inod %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "Ogiltigt %B (%b) i inod för felaktiga block. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Inod för felaktiga block har ogiltiga block. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Duplicerat eller felaktigt block används!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Felaktigt block %b använt som indirektblock för inod för dåliga block. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"Inoden för dåliga block har antagligen blivit skadad. Du bör\n"
+"antagligen sluta nu och köra e2fsck -c för att söka efter dåliga block\n"
+"i filsystemet.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Om blocket verkligen är dåligt kan inte filsystemet lagas.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Du kan ta bort detta block från listan över dåliga block och hoppas\n"
+"att blocket verkligen är OK. men det finns inga garantier.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Det primära superblocket (%b) är på listan över dåliga block.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Block %b i de primära gruppbeskrivarna är på listan över dåliga block\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Varning: Grupp %g:s superblock (%b) är dåligt.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Varning: Grupp %g:s kopia av gruppbeskrivarna har ett dåligt block (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Programmeringsfel? Block nr. %b tas i anspråk utan anledning i process_bad_block.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "Fel vid allokering av %N konsekutiva block i blockgrupp %g för %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "Fel vid allokering av blockbuffert för relokering av %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Relokerar grupp %g:s %s från %b till %c ...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Relokerar grupp %g:s %s till %c ...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Varning: kunde inte läsa block %b av %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Varning: kunde inte skriva block %b av %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "Fel vid allokering av inodbitkarta (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "Fel vid allokering av blockbitkarta (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "Fel vid allokering av icount-länkinformation: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "Fel vid allokering av katalogblockvektor: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Fel vid genomsökning av inoder (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Fel vid iterering över block i inod %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Fel vid lagring av inodsräknarinformation (inod=%i, antal=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Fel vid lagring av katalogblocksinformation (inod=%i, block=%b, antal=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Fel vid läsning av inod %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Inod %i har flaggan imagic satt. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Specialfil (enhet/uttag (socket)/fifo/symlänk) (inod %i) har flaggan\n"
+"oföränderlig eller endast tillägg satt."
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Specialinod (enhet/uttag (socket)/fifo) %i har nollskild storlek. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "Journalinod används, men innehåller data. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "Journal är inte en vanlig fil. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "Inod %i var med i listan över föräldralösa inoder. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Inoder som var med i trasig lista över föräldralösa inoder hittad. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "Fel vid allokering av referensräknarstruktur (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Fel vid läsning av utökade attribut-block %b för inod %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "Inod %i har ett felaktigt utökade attribut-block %b. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Fel vid läsning av utökade attribut-block %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "Utökade attribut-block %b har referensräknare %r, skall vara %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Fel vid skrivning av utökade attribut-block %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "Utökade attribut-block %b har h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "Fel vid allokering av utökade attributs regionallokeringsstruktur. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "Utökade attribut-block %b är trasigt (allokeringskollision). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "Utökade attribut-block %b är trasigt (ogiltigt namn). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "Utökade attribut-block %b är trasigt (ogiltigt värde). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "Inod %i är för stor. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) får katalog att bli för stor. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) får fil att bli för stor. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) får symlänk att bli för stor. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "Inod %i har flagga INDEX_FL satt på filsystem utan stöd för htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "Inod %i har flagga INDEX_FL satt men är inte en katalog.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "HTREE katalog-inod %i har en ogiltig rotnod.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "HTREE katalog-inod %i har en hashversion som inte stöds (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "HTREE katalog-inod %i använder en inkompatibel htree rotnodsflagga.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "HTREE katalog-inod %i har ett träddjup (%N) som är för stort\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Inoden för dåliga block har ett indirektblock (%b) som står i konflikt\n"
+"med filsystemsmetadata. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Misslyckades att återskapa storleksändringsinod: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "Inod %i har en extra storlek (%IS) som är ogiltig\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "Utökat attribut i inod %i har ett namelen (%N) som är ogiltig\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "Utökat attribut i inod %i har en värdeposition (%N) som är ogiltig\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "Utökat attribut i inod %i har ett värdeblock (%N) som är ogiltigt (måste vara 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "Utökat attribut i inod %i har ett värdestorlek (%N) som är ogiltig\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "Utökat attribut i inod %i har hash (%N) som är ogiltig\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "inod %i är en %It men det ser ut som det egentligen är en katalog.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Fel vid läsning över utsträckningsträd i inod %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Misslyckades att iterera över utsträckningar i inod %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"inod %i har en ogiltig utsträckning\n"
+"\t(logiskt block %c, ogiltigt fysiskt block %b, längd %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"inod %i har en ogiltig utsträckning\n"
+"\t(logiskt block %c, fysiskt block %b, ogiltig längd %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "Inod %i har flaggan EXTENTS_FL satt på filsystemet utan stöd för utsträckningar.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "inod %i är i utsträckningsformat, men superblocket saknar egenskapen EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "inod %i saknar EXTENT_FL, men är i utsträckningsformat\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Snabb symlänk %i har EXTENT_FL satt. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"inod %i har utsträckningar i oordning\n"
+"\t(ogiltigt logiskt block %c, fysiskt block %b, längd %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "inod %i har en ogiltig utsträckningsnod (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Fel vid konvertering av blockbitkarta över subkluster: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "Kvotinoden är inte en vanlig fil. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "Kvotinoden används inte, men innehåller data. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "Kvotinoden är synlig för användaren. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "Inoden för dåliga block verkar felaktig. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"inod %i har en utsträckning med noll längd\n"
+"\t(ogiltigt logiskt block %c, fysiskt block %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "Inod %i verkar innehålla skräp. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "Inod %i klarar kontroller, men kontrollsumman stämmer inte med inoden. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "De utökade attributen för inod %i är trasiga (allokeringskollision). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"Utsträckningsblocken för inod %i klarar kontroller, men kontrollsumman stämmer inte med utsträckningarna\n"
+"\t(logiskt block %c, fysiskt block %b, längd %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "inod %i:s utökade attributblock %b passerar kontrollerna, men kontrollsumman stämmer inte med blocket. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Intern utsträckningsnod på nivå %N av inod %i:\n"
+"Logisk start %b stämmer inte med logisk start %c på nästa nivå. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"inod %i, slutet på utsträckningen överskrider tillåtet värde\n"
+"\t(logiskt block %c, fysiskt block %b, längd %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "Inod %i har inline-data, men superblocket saknar egenskapen INLINE_DATA\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "Inod %i har flaggan INLINE_DATA_FL satt på filsystem utan stöd för inline-data.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "inod %i block %b står i konflikt med kritisk metadata, hoppar över blockkontroller.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "Kataloginod %i block %b skulle varit vid %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "Kataloginod %i en utsträckning markerad oinitierad vid block %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"inod %i logiskt block %b (fysiskt block %c) bryter mot klusterallokeringsregler.\n"
+"Kommer fixa i pass 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "Inod %i har flaggan INLINE_DATA_FL satt men utökade attribut finns inte. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Specialfil (enhet/uttag (socket)/fifo) (inod %i) har utsträcknings-\n"
+"eller inline-data-flaggan satt. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "inod %i has utsträckningshuvud men inline-dataflaggan satt.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "inod %i verkar ha inline-data men utsträckningsflaggan är satt.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "inod %i verkar ha blockkarta men inline-data och utsträckningsflaggor satta.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "inod %i har inline-data och utsträckningsflaggor satta men i_block innehåller skräp.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "Trasig-block-lista säger att inoden för listan över trasiga block är trasig. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "Fel vid allokering av utsträckningars regionallokeringsstruktur. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"Inod %i har dubblerad utsträckningmappning\n"
+"\t(logiskt block %c, ogiltigt fysiskt block %b, längd %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "fel vid allokering av %N byte minne för krypterad inodslista\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "inod %i:s utsträckningsträd kunde vara grundare (%b; kunde vara ≤ %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "inod %i på ett bigalloc-filsystem kan inte vara blockkartestyrd. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "Inod %i har trasigt utsträckningshuvud. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Tidsstämplar på inod %i bortom 2310-04-04 är sannolikt före 1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "Inod %i har en otillåten värdeinod %N för utökade attribut.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "Inod %i har ett otillåtet utökat attribut. EA-inod %N saknar flaggan EA_INODE.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"EA-inod %N för föräldrainod %i saknar EA_INODE-flaggan.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "Inod %i har en utsträckning markerad oinitierad vid block %c (längd %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "Inod %i har flaggan casefold satt men är inte en katalog. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"Katalogen %p har flaggan casefold satt, men\n"
+"funktionen casefold är inte aktiverad. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "Inod %i har en krypteringsflagga men inget utökat attribut för kryptering.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "Krypterad inod %i har trasigt utökat attribut för kryptering.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "HTREE katalog-inod %i använder hashversion (%N), men skulle använda SipHash (6) \n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "HTREE katalog-inod %i använder SipHash, men skulle inte. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Kör ytterligare pass för att lösa upp block som används av mer än en inod ...\n"
+"Pass 1B: Söker igen efter block som används flera gånger\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Flerfaldigt ianspråkstagna block i inod %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Fel vid genomsökning av inoder (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "Fel vid allokering av inodbitkarta (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Fel vid iterering över block i inod %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Fel vid justering av referensräknare för externa attribut-block %b (inod %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Pass 1C: Söker kataloger efter inoder med flerfaldigt ianspråkstagna block\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Pass 1D: Förlikar flerfaldigt ianspråkstagna block\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Fil %Q (inod nr. %i, modifieringstid %IM) \n"
+" har %r flerfaldigt ianspråkstagna block, delade med %N filer:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (inod nr. %i, modifieringstid %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<filsystemsmetadata>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Det finns %N inoder som innehåller flerfaldigt ianspråkstagna block.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Flerfaldig ianspråkstagna block redan överlåtna eller klonade.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Kunde inte klona fil: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Pass 1E: Optimerar utsträckningsträd\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Misslyckades att optimera utsträckningsträd %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Optimerar utsträckningsträd: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Internt fel: max djup på utsträckningsträd är för stort (%b; förväntat=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "inod %i:s utsträckningsträd (på nivå %b) kunde vara kortare. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "inod %i:s utsträckningsträd (på nivå %b) kunde vara smalare. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Pass 2: Kontrollerar katalogstruktur\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Ogiltigt inodsnummer för â€.†i kataloginod %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "Post â€%Dn†i %p (%i) har ogiltigt inodsnummer: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "Post â€%Dn†i %p (%i) har raderad/oanvänd inod %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "Post â€%Dn†i %p (%i) är en länk till â€.†"
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "Post â€%Dn†i %p (%i) pekar pÃ¥ inod (%Di) som finns i ett trasigt block.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "Post â€%Dn†i %p (%i) är en länk till katalog %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "Post â€%Dn†i %p (%i) är en länk till rotinoden.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "Post â€%Dn†i %p (%i) har ogiltiga tecken i namnet.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "â€.†saknas i kataloginod %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "â€..†saknas i kataloginod %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Första post â€%Dn†(inod=%Di) i kataloginod %i (%p) skulle varit â€.â€\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Andra post â€%Dn†(inod=%Di) i kataloginod %i skulle varit â€..â€\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr för inod %i (%Q) är %IF, skulle varit noll.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl för inod %i (%Q) är %If, skulle varit noll.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high för inod %i (%Q) är %Id, skulle varit noll.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag för inod %i (%Q) är %N, skulle varit noll.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize för inod %i (%Q) är %N, skulle varit noll.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "Inod %i (%Q) har ogiltiga rättigheter (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "Kataloginod %i, %B, position %N: katalogen trasig\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "Kataloginod %i, %B, position %N: för långt filnamn\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "Kataloginod %i har ett oallokerat %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Katalogposten â€.†i kataloginod %i är inte nollterminerad\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Katalogposten â€..†i kataloginod %i är inte nollterminerad\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "Inod %i (%Q) är en ogiltig teckenenhet.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "Inod %i (TQ är en ogiltig blockenhet.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "Post â€%Dn†i %p (%i) är duplicerad â€.â€-post.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "Post â€%Dn†i %p (%i) är duplicerad â€..â€-post.\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Internt fel: kunde inte hitta dir_info för %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "Post â€%Dn†i %p (%i) har rec_len %Dr, skulle varit %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "Fel vid allokering av icount-struktur: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Fel vid iterering över katalogblock: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Fel vid läsning av katalogblock %b (inod %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Fel vid skrivning av katalogblock %b (inod %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "Fel vid allokering av nytt katalogblock för inod %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Fel vid deallokering av inod %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "Katalogpost för â€.†i %p (%i) är stor.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "Inod %i (%Q) är en ogiltig FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "Inod %i (%Q) är ett ogiltigt uttag (socket).\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Sätter filtyp för post â€%Dn†i %p (%i) till %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "Post â€%Dn†i %p (%i) har felaktig filtyp (var %Dt, skulle varit %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "Post â€%Dn†i %p (%i) har filtyp satt.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "Post â€%Dn†i %p (%i) har nollängdsnamn.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symlänk %Q (inod nr. %i) är ogiltig.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "Utökat attribut-block för inod %i (%Q) är ogiltigt (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "Filsystem innehåller stora filer, men saknar flaggan LARGE_FILE i superblock.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "Problem i HTREE-kataloginod %d: %B inte refererad\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "Problem i HTREE-kataloginod %d: %B refererat två gånger\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "Problem i HTREE-kataloginod %d: %B har felaktig min-hash\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "Problem i HTREE-kataloginod %d: %B har felaktig max-hash\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "Ogiltig HTREE-kataloginod %d (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "Filsystem har stora kataloger, men saknar flaggan LARGE_DIR i superblocket.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "Problem i HTREE-kataloginod %d (%q): felaktigt blocknummer %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "Problem i HTREE-kataloginod %d: ogiltig rotnod.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "Problem i HTREE-kataloginod %d: %B har ogiltig gräns (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr ""
+"Problem i HTREE-kataloginod %d: %B har ogiltigt antal (%N)\n"
+"\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "Problem i HTREE-kataloginod %d: %B har en oordnad hash-tabell\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "Problem i HTREE-kataloginod %d: %B har ogiltigt djup (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "Duplicerad post â€%Dn†i %p (%i) hittad. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"Post â€%Dn†i %p (%i) har ett icke unikt filnamn.\n"
+"Byt namn till %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Duplicerad post â€%Dn†hittad.\n"
+"\tMarkerar %p (%i) för ombyggnad.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi för inod %i (%Q) är %N, skulle varit noll.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Oväntat block i HTREE-katalog %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "Post â€%Dn†i %p (%i) refererar inod %Di i grupp %g där _INODE_UNINIT är satt.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "Post â€%Dn†i %p (%i) refererar inod %Di funnen i oanvänt inodsomrÃ¥de i grupp %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi för inod %i (%Q) är %N, skulle varit noll.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "Problem i HTREE-kataloginod %d: rotnoden stämmer inte med kontrollsumman.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "Problem i HTREE-kataloginod %d: intern nod har inte rätt kontrollsumma.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "Kataloginod %i, %B, position %N: katalogen har ingen kontrollsumma.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "kataloginod %i, %B: katalogen passerar kontrollerna men kontrollsumman stämmer inte.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Inline-kataloginod %i:s storlek (%N) måste vara en multipel av 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Att rätta storleken på inline-kataloginod %i misslyckades.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Krypterad post â€%Dn†i %p (%i) är för kort.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "Krypterad post â€%Dn†i %p (%i) refererar okrypterad inod %Di.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "Krypterad post â€%Dn†i %p (%i) refererar inod %Di, vilken har en annan krypteringspolicy.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "Post â€%Dn†i %p (%i) har ogiltiga UTF-8-tecken i namnet.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "Duplicerad filnamnspost â€%Dn†i %p (%i) hittad. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Pass 3: Kontrollerar katalogförbindelser\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "Rotinod inte allokerad. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "Ingen plats i lost+found-katalog. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "Oförbunden kataloginod %i (fanns i %q)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/lost+found inte funnen. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "â€..†i %Q (%i) är %P (%j), skulle varit %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Felaktig eller ej existerande /lost+found. Kan inte återansluta.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Kunde inte expandera /lost+found: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Kunde inte återförbinda %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Fel vid försök att hitta /lost+found: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block: %m ved försök att skapa /lost+found-katalog\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode: %m vid försök att skapa /lost+found-katalog\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m när nytt katalogblock skapades\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block: %m vid skrivning av katalogblocket för /lost+found\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Fel vid justering av inodräknare på inod %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Kunde inte rätta förälder till inod %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Kunde inte rätta förälder till inod %i: Kunde inte hitta föräldrakatalogpost\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Fel vid skapande av rotkatalog (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Fel vid skapande av /lost+found-katalog (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "Rotinod är inte en katalog; avbryter.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "Kan inte fortsätta utan en rotinod.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found är inte en katalog (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/lost+found har inline-data\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Kan inte allokera utrymme för /lost+found.\n"
+"Placera borttappade filer i rotkatalogen istället"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Otillräckligt utrymme för att återhämta förlorade filer!\n"
+"Flytta data från filsystemet och kör om e2fsck.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/lost+found är krypterad\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "Rekursiv slinga i kataloginod %i (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Pass 3A: Optimerar kataloger\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Misslyckades att skapa dirs_to_hash-iterator: %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Misslyckades att optimera katalog %q (%d): %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Optimerar kataloger: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Pass 4: Kontrollerar referensräknare\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "Lös nollängdsinod %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "lös inod %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "Inod %i referensräknare är %Il, skulle varit %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"VARNING: PROGRAMMERINGSFEL I E2FSCK!\n"
+"\tELLER NÃ…GON KLANTSKALLE (DU) KONTROLLERAR ETT MONTERAT (AKTIVT) FILSYSTEM.\n"
+"inod_link_info[%i] är %N, inod.i_links_count är %Il. De skulle vara samma!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "Inod %i för utökade attribut har referensräknare som är %N, skulle varit %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "Katalogen överskrider maximala antalet länkar, men DIR_NLINK-funktionen finns inte i superblocket.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "referensräknaren för kataloginod %i satt att spilla över men kan vara exakt värdet %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Pass 5: Kontrollerar gruppsammanfattningsinformation\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "Utfyllnad vid slutet av inodsbitkarta är inte satt. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "Utfyllnad vid slutet av blockbitkarta är inte satt. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "Blockbitkarteskillnader: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "Inodsbitkarteskillnader: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Antal fria inoder är fel för grupp nr. %g (%i, räknade=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Katalogantal fel för grupp nr. %g (%i, räknade=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Antal fria inoder är fel (%i, räknade=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Antal fria block är fel för grupp nr. %g (%b, räknade=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Antal fria block är fel (%b, räknade=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr ""
+"PROGRAMMERINGSFEL: filsystem (nr. %N) bitkartas ändpunkter (%b, %c) stämmer\n"
+"inte med beräknade bitkarteändpunkter (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Internt fel: fuskar till slut på bitkarta (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Fel vid kopiering av ersättningsinodskarta: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Fel vid inkopiering av ersättningsbitkarta: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "block i grupp %g används men gruppen är markerad BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "inoder i grupp %g används men gruppen är markerad INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "grupp %g:s inodsbitkarta stämmer inte med kontrollsumman.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "grupp %g:s blockbitkarta stämmer inte med kontrollsumman.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Ã…terskapa journal"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "Uppdatera kvotinformation för kvottyp %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Fel när kontrollsummeinformation för blockgrupp sattes: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Fel vid skrivning av filsystemsinformation: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Fel när skrivningar tömdes till lagringsenheten: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Fel när kvotinformation skrevs för kvottyp %N: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Ej hanterad felkod (0x%x)!\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "IGNORERAT"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "i move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Använt minne: %lu, förlupen tid: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "storlek på inod=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "vid öppning av inodsökning"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "vid start av inodsgenomsökning"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "vid inodsgenomsökning"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "vid anrop av ext2fs_block_iterate för inod %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "vid anrop av ext2fs_adjust_ea_refcount2 för inod %u"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Kapar"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "Tömmer"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Användning: %s [-panyrcdfktvDFV] [-b superblock] [-B blockstorlek]\n"
+"\t\t[-l|-L dåliga_block_fil] [-C fd] [-j extern_journal]\n"
+"\t\t[-E utökade-flaggor] [-z gör_ogjort_fil] enhet\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Nödhjälp:\n"
+" -p Reparera automatiskt (inga frågor)\n"
+" -n Gör inga förändringar av filsystemet\n"
+" -y Anta â€ja†som svar pÃ¥ alla frÃ¥gor\n"
+" -c Leta efter dåliga block och lägg till dem i listan\n"
+" -f Framtvinga kontroll även om filsystemet är markerat rent\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Var utförlig\n"
+" -b superblock Använd alternativt superblock\n"
+" -B blockstorlek Framtvinga blockstorlek vid sökande efter superblock\n"
+" -j extern_journal Bestäm plats för den externa journalen\n"
+" -l dåliga_block_fil Lägg till till listan över dåliga block\n"
+" -L dåliga_block_fil Ange lista över dåliga block\n"
+" -z gör_ogjort_fil Skapa en gör-ogjort-fil\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u filer (%0d.%d%% ej sammanhängande), %llu/%llu block\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u inod använd (%2.2f %%, av %u)\n"
+msgstr[1] ""
+"\n"
+"%12u inoder använda (%2.2f %%, av %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u ej konsekutiv fil (%0d.%d %%)\n"
+msgstr[1] "%12u ej konsekutiva filer (%0d.%d %%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u ej konsekutiv katalog (%0d.%d %%)\n"
+msgstr[1] "%12u ej konsekutiva kataloger (%0d.%d %%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " antal inoder med ind/dind/tind-block: %u/%u/%u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " Histogram över utsträckningars djup: "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu använt block (%2.2f %%, av %llu)\n"
+msgstr[1] "%12llu använda block (%2.2f %%, av %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u dåligt block\n"
+msgstr[1] "%12u dåliga block\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u stor fil\n"
+msgstr[1] "%12u stora filer\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u normal fil\n"
+msgstr[1] ""
+"\n"
+"%12u normala filer\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u katalog\n"
+msgstr[1] "%12u kataloger\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u teckenenhetsfil\n"
+msgstr[1] "%12u teckenenhetsfiler\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u blockenhetsfil\n"
+msgstr[1] "%12u blockenhetsfiler\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifon\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u länk\n"
+msgstr[1] "%12u länkar\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u symbolisk länk"
+msgstr[1] "%12u symboliska länkar"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u snabb symbolisk länk)\n"
+msgstr[1] " (%u snabba symboliska länkar)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u uttag (socket)\n"
+msgstr[1] "%12u uttag (sockets)\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fil\n"
+msgstr[1] "%12u filer\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "när det avgjordes om %s är monterat."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Varning! %s är monterat.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Varning! %s används.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s är monterat.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s används.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Kan inte fortsätta, avbryter.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"VARNING!!! Filsystemet är monterat. Om du fortsätter ***KOMMER***\n"
+"du att orsaka ***ALLVARLIG*** skada på filsystemet.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Vill du verkligen fortsätta"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "kontroll avbruten.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " innehåller ett filsystem med fel"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " var inte fläckfritt avmonterat"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " det primära superblockets egenskaper skiljer från reservens"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " har monterats %u gånger utan att kontrolleras"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " har tidpunkten för senaste filsystemskontroll i framtiden"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " har inte kontrollerats på %u dagar"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "ignorerar kontrollintervallet, broken_system_clock är satt\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", kontroll framtvingad.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: rent, %u/%u filer, %llu/%llu block"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (kontroll senarelagd; på batteri)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (kontrollera efter nästa montering)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kontrollera om %ld monteringar)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "FEL: Kunde inte öppna /dev/null (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Ogiltig EA-version.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "Ogiltig buffertstorlek för förhandsläsning.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Okänd utökad flagga: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Utökade flaggor separeras med komman, och kan ta ett argument som avdelas\n"
+"med ett likhetstecken (â€=â€). Giltiga utökade flaggor är:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<ea_version (1 eller 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<buffertstorlek>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaxfel i e2fsck:s konfigurationsfil (%s, rad nr %d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Fel vid validering av filidentifierare %d: %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "Ogiltig filidentifierare för förloppsinformation"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Endast en av flaggorna -p/-a, -n eller -y kan anges."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Flaggan -t stödjs inte i denna version av e2fsck.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Kan inte hitta â€%sâ€"
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "Flaggorna -n och -D är inkompatibla."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "Flaggorna -n och -c är inkompatibla."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Flaggorna -n och -l/-L är inkompatibla."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Flaggorna -D och -E fixes_only är inkompatibla."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Flaggorna -E bmap2extent och fixes_only är inkompatibla."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "vid öppning av %s för utskrivning"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "vid försök att skriva ut %s"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Flaggorna -c och -l/-L kan inte båda användas på samma gång.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG â€%s†är inte ett heltal\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Ogiltigt ickenumeriskt argument till -%c (â€%sâ€)\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "MMP-intervall är %u sekunder och den totala väntetiden är %u sekunder. Var god dröj ...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "vid uppsättning av MMP-block"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Om du är säker på att filsystemet inte används på någon nod, kör:\n"
+"â€tune2fs -f -E clear_mmp %sâ€\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "vid läsning av MMP-block"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Skriver över existerande filsystem, detta kan göras ogjort med kommandot:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "vid försök att ta bort %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "vid försök att skapa en gör-ogjort-fil\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Fel: ext2fs-biblioteksversion inaktuell!\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "vid försök att initiera program"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tAnvänder %s, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "behöver terminal för interaktiva reparationer"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s försöker med reservblock ...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Superblocket är ogiltigt,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Gruppbeskrivarna ser trasiga ut ..."
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s när reservblocken användes"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: går tillbaka till originalsuperblock\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Filsystemsrevisionen är uppenbarligen för hög för denna version av e2fsck.\n"
+"(Eller så är filsystemets superblock trasigt)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "Kan detta vara en nollängdspartition?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Du måste ha %s-åtkomst till filsystemet eller vara root\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Kanske inte existerar eller växlingsenhet?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Filsystemet monterat eller öppnat exklusivt av ett annat program?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "Kanske en enhet som inte existerar?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Skrivskyddad disk; använd flaggan -n för att göra en läsningskontroll\n"
+"av enheten.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: Försöker läsa in superblocket trots fel …\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "Hämta en nyare version av e2fsck!"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "vid kontroll av journal för %s"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "Kan inte fortsätta med filsystemskontrollen"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Varning: hoppar över journalåterhämtning eftersom en läsningskontroll av filsystem görs.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "kan inte sätta superblocksflaggor på %s\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Fel i journalkontrollsumman funnet i %s\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Journalen trasig i %s\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "vid återhämtning av journalen för %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s har funktioner som inte stöds:"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s har kodning som inte stöds: %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s vid läsning av inod för dåliga block\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Detta bådar inte gott, men vi skall försöka att fortsätta ...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Skapar journal (%d block): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " Klar.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** journalen har genererats om ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "avbruten"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck inställd.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Startar om e2fsck från början ...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "vid återställning av omgivning"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FEL I FILSYSTEMET RÄTTADE *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: Filsystemet modifierades.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FILSYSTEMET MODIFIERADES *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** STARTA OM SYSTEMET *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** VARNING: Filsystemet har fortfarande fel **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "yYjJ"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "aA"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " (â€a†aktiverar â€ja†för alla) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<j>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "inställd!\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "ja för alla\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "ja\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "nej\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nej\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ja\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "ja"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "nej"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: ogiltiga bitkarteblock för %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "läser inod- och blockbitkartor"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "vid upprepat försök att läsa bitkarta för %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "skriver block- och inodsbitkartor"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "vid omskrivning av block- och inodsbitkartor för %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: OVÄNTAD INKONSEKVENS; KÖR fsck MANUELLT.\n"
+"\t(d.v.s., utan flaggorna -a eller -p)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "Använt minne: %llu k/%llu k (%llu k/%llu k), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "Använt minne: %llu k, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "tid: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "förfluten tid: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "när inod %lu i %s lästes"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "när inod %lu i %s skrevs"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "OVÄNTAD INKONSISTENS: filsystemet modifieras medan fsck körs.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "klar \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Användning: %s [-b blockstorlek] [-i infil] [-o utfil] [-svwnfBX]\n"
+" [-c block_åt_gången] [-d fördröjningsfaktor mellan läsningar]\n"
+" [-e max_dåliga_block] [-p antal_pass]\n"
+" [-t testmönster [-t testmönster [...]]]\n"
+" enhet [sista_block [första_block]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Flaggorna -n och -w är ömsesidigt uteslutande.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f %% klar, %s har gått. (%d/%d/%d fel)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Testar med slumpmönster: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Testar med mönster 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "vid sökning"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Underligt värde (%ld) i do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "vid ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "vid början av iteration över lista av dåliga block"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "vid allokering av buffertar"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Kontrollerar block %lu till %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Letar efter dåliga block i skrivskyddat läge\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Letar efter dåliga block (skrivskyddad test): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "För många dåliga block, avbryter testet\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Letar efter dåliga block i läs-skriv-läge\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Från block %lu till %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Läser och jämför: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Letar efter dåliga block i ickeförstörande läs-skriv-läge\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Letar efter dåliga block (ickeförstörande läs-skriv-test)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Avbrott fångat, rensar upp\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "vid testdataskrivning, block %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s är monterat, "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "badblocks framtvingat ändå. Hoppas /etc/mtab är felaktig.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "det är inte säkert att köra badblocks!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s används uppenbarligen av systemet; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks framtvingat ändå.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "ogiltig %s - %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "För stort maximalt antal dåliga block %u — maximum är %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "kunde inte allokera minne för testmönster - %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Högst ett testmönster får anges i skrivskyddat läge"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Slumpvis testmönster är inte tillåtet i skrivskyddat läge"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Felaktig blockstorlek: %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Felaktigt blocks_at_once: %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Kunde inte avgöra enhetsstorlek; du måste ange\n"
+"storleken manuellt\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "vid försök att avgöra enhetsstorlek"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "sista block"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "första block"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "felaktigt startblock (%llu): måste vara mindre än %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "felaktigt startblock (%llu): måste vara ett 32-bitars värde"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "när lista över dåliga block i minnet skapades"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "indatafil — felaktigt format"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "när tillägg gjordes till lista i minnet över dåliga block gjordes"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Pass avslutat, %u dåliga block hittade. (%d/%d/%d fel)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "Användning: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p projekt] [-v version] filer…\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "felaktigt projekt - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "felaktig version - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "vid försök att ta status på %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "vid läsning av flaggor på %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flaggor på %s satta som "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "vid sättning av flaggor på %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Version av %s satt som %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "vid sättning av version på %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Projektet för %s satt som %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "när projektet sattes på %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Kunde inte allokera sökvägsvariabel i chattr_dir_proc"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= är inkompatibelt med - och +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "MÃ¥ste använda â€-vâ€, =, - eller +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "när inod %u lästes"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "vid utvidgning av katalogen"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "när â€%s†länkades"
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "när inod %u skrevs"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "när attributen pÃ¥ â€%s†listades"
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "när inod %u öppnades"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "när xattr för inod %u lästes"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "vid allokering av minne"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "när attributet â€%s†pÃ¥ â€%s†lästes"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "när attributet â€%s†skrevs till inod %u"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "när inod %u stängdes"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "när inod â€%s†allokerades"
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "när inod â€%s†skapades"
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "när symlänk â€%s†skapades"
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "när â€%s†slogs upp"
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "när katalogen â€%s†skapades"
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "när â€%s†öppnades för att kopieras"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "när arbetskatalog byttes till â€%sâ€"
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "när katalogen â€%s†skannades"
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "vid lstat â€%sâ€"
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "när specialfilen â€%s†skapades"
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "malloc misslyckades"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "vid försök att läsa länken â€%sâ€"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "symlänk ökade i storlek mellan lstat() och readlink()"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "när symlänken â€%s†skrevs"
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "när filen â€%s†skrevs"
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "när katalogen â€%s†skapades"
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "vid byte av katalog"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "ignorerar posten â€%sâ€"
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "när inoden för â€%s†sattes"
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "när xattrs för â€%s†sattes"
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "när inodsdata sparades"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "vid kopiering av xattr på rotkatalogen"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Användning: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] enhet\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "block"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "kluster"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupp %lu: (Block "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " csum 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (0x%04x FÖRVÄNTADES)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %ssuperblock vid "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Primärt "
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Reserv"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Gruppbeskrivare vid "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Reserverade GDT-block vid "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Gruppbeskrivare vid "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Blockbitkarta vid "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", csum 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Inodsbitkarta vid "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Inodstabell vid "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u fritt %s, %u fria inoder, %u kataloger%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u oanvända inoder\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Fria block: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Fria inoder: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "vid utskrift av lista över dåliga block"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "DÃ¥liga block: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "vid läsning av journalinod"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "när journalinoden öppnades"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "när journalsuperblocket lästes"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Journalsuperblockets magiska tal felaktigt!\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "vid läsning av journalsuperblock"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Kunde inte hitta journalsuperblockets magiska tal"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "misslyckades att allokera en MMP-buffert\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "läser MMP-block %llu frÃ¥n â€%sâ€\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Kunde inte allokera minne för att tolka flaggor!\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ogiltig superblockparameter: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ogiltig blockstorleksparameter: %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Felaktiga utökade flaggor angivna: %s\n"
+"\n"
+"Utökade flaggor separeras med komman, och kan ta ett argument som avdelas med\n"
+"\tett likhetstecken (â€=â€).\n"
+"\n"
+"Giltiga utökade flaggor är:\n"
+"\tsuperblock=<superblocknummer>\n"
+"\tblocksize=<blockstorlek>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tAnvänder %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Kunde inte hitta giltigt filsystemssuperblock.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: funktionen MMP är inte aktiverad.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "vid försök att läsa â€%sâ€-bitkartor\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Kör e2fsck nu!\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "Användning: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blockstorlek ] enhet avbildsfil\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I enhet avbildsfil\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o källavstånd ] [ -O målavstånd ] käll-fs [ mål-fs ]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "vid allokering av buffert"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "När block %llu skrevs\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "fel när block %llu skrevs"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "fel i generic_write()"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Fel: huvudstorlek är större än wrt_size\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "Kunde inte allokera huvudbuffert\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "vid skrivning av superblock"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "vid skrivning av inodtabell"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "vid skrivning av blockbitkarta"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "vid skrivning av inodbitkarta"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Trasigt katalogblock %llu: felaktig rec_len (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Trasigt katalogblock %llu: felaktig name_len (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu block (%d %%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Kopierar "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Att sluta nu kommer förstöra filsystemet, avbryt igen om du är säker\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s återstår med %.2f MB/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "fel när block %llu lästes"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Kopierade %llu / %llu block (%d %%) på %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "med %.2f MB/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "när l1-tabell allokerades"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "när l2-cache allokerades"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Varning: det finns fortfarande tabeller i cachen medan cachen skrivs, data kommer gå förlorade så avbilden kommer kanske inte vara korrekt.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "när ext2_qcow2_image allokerades"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "när ext2_qcow2_image initierades"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Programmeringsfel: multipla sekventiella referensräknarblock skapade!\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "när blockbitkarta allokerades"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "när förvrängd blockbitkarta allokerades"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Söker igenom inoder …\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "Kan inte allokera en blockbuffert"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "när nästa inod hämtades"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "vid iteration över inod %u"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Raw- och qcow2-avbilder kan inte installeras"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "fel när bitkartor lästes"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "när enhetsfil öppnades"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "när avbildstabellen återställdes"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "flaggan -a kan endast användas med raw- eller QCOW2-avbilder."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "flaggan -b kan endast användas med raw- eller QCOW2-avbilder."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "Avstånd är endast tillåtna med raw-avbilder."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Flyttningsläge är endast tillåtet med raw-avbilder."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "Flyttningsläge behöver läget all data."
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "kontrollerar om monterad"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Att köra e2image på ett filsystem monterat både för skrivning och läsning\n"
+"kan resultera i en inkonsistent avbild som inte kommer vara användbar för\n"
+"felsökningsändamål. Använd flaggan -f om du verkligen vill göra det.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "En QCOW2-avbild kan inte skrivas till standard ut!\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "Kan inte ta status på utdata\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Avbilden (%s) är komprimerad\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Avbilden (%s) är krypterad\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Avbilden (%s) är trasig\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "vid försök att konvertera en qcow2-bild (%s) till en rå bild (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "Flaggan -c stödjs endast i raw-läge\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Flaggan -c stödjs inte vid skrivning till standard ut\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "när check_buf allokerades"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "Flaggan -p stödjs endast i raw-läge\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d block innehöll redan de data som skulle kopieras\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Användning: %s -r enhet\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: kan inte öppna %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: kan inte söka till superblock\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: fel vid läsning av superblock\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: inte ett ext2-filsystem\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Varning: etikett för lång, avkortar.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: kan inte söka till superblock igen\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: fel vid skrivning av superblock\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Användning: e2label enhet [ny-etikett]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Användning: %s [-f] [-h] [-n] [-o avstånd] [-v] [-z gör-ogjort-fil] <transaktionsfil> <filsystem>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Filsystemets superblock stämmer inte med gör-ogjort-filen.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "UUID stämmer inte.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Senaste monteringstid stämmer inte.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Sista skrivningstiden stämmer inte.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "Livstidsskrivningsräknaren stämmer inte.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "när filsystemets superblock lästes."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "när superblocket skrevs"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Gör-ogjort-superblockets kontrollsumma stämmer inte.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "felaktigt avstånd - %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Kommer inte skriva till en gör-ogjort-fil under återuppspelning av den.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "när gör-ogjort-filen â€%s†öppnades\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "när gör-ogjort-filen lästes"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: Inte en gör-ogjort-fil.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Huvudets kontrollsumma stämmer inte.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Trasig huvud i gör-ogjort-filen.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Gör-ogjort-blockstorleken är för stor.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Gör-ogjort-blockstorleken är för liten.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Okänd funktionsuppsättning i gör-ogjort-fil.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Fel när det avgjordes om %s är monterat."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo skall endast köras på omonterade filsystem"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "när â€%s†öppnades"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "angivet avstånd är för stort"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "när nycklar lästes"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: fel nyckelmagi vid %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: kontrollsumman för nyckelblock är fel vid %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: block %llu är för långt."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "när block %llu hämtades."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "kontrollsumman i filsystemblock %llu (gör-ogjort-block %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "fel när block %llu skrevs."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Gör-ogjort-filen trasig; kör e2fsck NU!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "IO-fel vid återuppspelning; kör e2fsck NU!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Ofullständig gör-ogjort-post; kör e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Användning: findsuper enhet [skippabyte [startkb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "skippabyte skall vara ett tal, inte %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "skippabyte måste vara en multipel av sektorstorleken\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "startkb skall vara ett tal, inte %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "startkb skall vara positivt, inte %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "startar vid %llu, med %u-bytesteg\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] förmodligen ett superblock skrivet i ext3-journalsuperblocket,\n"
+"\tså start/slut/grupp är fel\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "byteavstånd bytestart byteslut fs_block blkst grp mkfs/monteringstid sb_uuid etikett\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: avslutade med felnummer %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "VARNING: kunde inte öppna %s: %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "VARNING: fel format på rad %d av %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"VARNING: Din /etc/fstab innehåller inte fsck-passnr-fältet.\n"
+"\tJag fixar mig förbi detta åt dig, men du\n"
+"\tbör rätta din /etc/fstab-fil så snart du kan.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: inte funnen\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: Inga fler barnprocesser?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Varning... %s för enhet %s avslutade med signal %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: status är %x, skulle aldrig inträffa.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Avslutade med %s (slutstatus %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Fel %d när fsck.%s kördes för %s\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Antingen alla eller inga av filsystemstyperna som ges till -t måste ha\n"
+"prefix â€no†eller â€!â€.\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Kunde inte allokera minne för filsystemtyper\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: hoppar över felaktig rad i /etc/fstab: bind-montering med fsck-passnummer som inte är noll\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: kan inte kontrollera %s: fsck.%s finns inte\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Kontrollerar alla filsystem.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--väntar-- (pass %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "Användning: fsck [-AMNPRTV] [ -C [ fh ] ] [-t fstyp] [fs-flaggor] [filsys ...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: för många enheter\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: för många argument\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Monterar endast läsbart.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Låter användare allokera alla block. Detta är farligt!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Kör e2fsck -fy %s.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: monterar endast för läsning utan att återhämta journalen\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Journalen behöver Ã¥terhämtas; â€e2fsck -E journal_only†behöver köras.\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: Att skriva till journalfilen stödjs inte.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Varning: monterar okontrollerat fs, att köra e2fsck rekommenderas.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Varning: maximalt antal monteringar uppnått, att köra e2fsck rekommenderas.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Varning: kontrolltiden uppnådd; att köra e2fsck rekommenderas.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Föräldralösa hittade; att köra e2fsck rekommenderas.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Fel upptäckta; att köra e2fsck rekommenderas.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Användning: %s [-RVadlpv] [filer…]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Vid läsning av flaggor på %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "När projektet på %s lästes"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Vid läsning av version på %s"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Kunde inte allokera sökvägsvariabel i lsattr_dir_proc\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Användning: %s [-c|-l filnamn] [-b blockstorlek] [-C klusterstorlek]\n"
+"\t[-i byte-per-inod] [-I inodstorlek] [-J journalflaggor]\n"
+"\t[-G flexgruppstorlek] [-N antal-inoder] [-d rotkatalog]\n"
+"\t[-m reserverade-block-procent] [-o skapar-os]\n"
+"\t[-g block-per-grupp] [-L volymetikett] [-M senast-monterad-katalog]\n"
+"\t[-O funktion[,...]] [-r fs-revision] [-E utökad-flagga[,...]]\n"
+"\t[-t fs-typ] [-T användningstyp] [-U UUID] [-e felbeteende]\n"
+"\t[-z gör-ogjort-fil] [-jnqvDFSV] enhet [blockantal]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Kör kommando: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "vid försök att köra â€%sâ€"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "vid bearbetning av lista över dåliga block från program"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Block %d i primär superblock-/gruppbeskrivare är felaktigt.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Block %u till %u måste vara bra för att bygga ett filsystem.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Avbryter...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Varning: reservsuperblock-/-gruppbeskrivare vid block %u innehåller\n"
+"\tdåliga block.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "vid markering av dåliga block som använda"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "när reserverade inoder skrevs"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "Skriver inodstabeller: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Kunde inte skriva %d block i inodstabell som börjar vid %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "klar \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "vid skapande av rotkatalog"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "vid läsning av rotinod"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "vid inställning av rotinodens ägarskap"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "vid skapande av /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "vid sökning efter /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "vid utvidgning av /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "vid inställning av inod för dåliga block"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Slut på minne vid radering av sektorer %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Varning: kunde inte läsa block 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Varning: kunde inte radera sektor %d: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "när journalstorleken delades"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "vid initiering av journalsuperblock"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Nollställer journalenhet: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "vid nollställning av journalenhet (block %llu, antal %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "vid skrivning av journalsuperblock"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Skapar ett filsystem med %llu %d k-block och %u inoder\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"varning: %llu block oanvända.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Filsystemsetikett=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "OS-typ: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blockstorlek=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Klusterstorlek=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmentstorlek=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Kliv=%u block, remsvidd=%u block\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inoder, %llu block\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu block (%2.2f%%) reserverade för superanvändaren\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Första datablock=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Rotkatalogägare=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximalt antal filsystemsblock=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blockgrupper\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blockgrupp\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u block per grupp, %u kluster per grupp\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u block per grupp, %u fragment per grupp\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inoder per grupp\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Filsystems-UUID: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblockkopior lagrade på block: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s förutsätter â€-O 64bitâ€\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "â€%s†mÃ¥ste komma före â€resize=%uâ€\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Ogiltig desc_size: â€%sâ€\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Ogiltigt hashfrö: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Ogiltigt avstånd: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ogiltigt mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Ogiltigt antal superblockskopior: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Ogiltig klivparameter: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Ogiltig remsbreddsparameter: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ogiltig storleksändringsparameter: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Storleksändringens maximum måste vara större än filsystemets storlek.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Storleksändring under drift stöds inte med revision 0-filsystem\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Ogiltig rotägare: â€%sâ€\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Felaktig kodning: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Felaktiga flaggor angivna: %s\n"
+"\n"
+"Utökade flaggor separeras med komman, och kan ta ett argument som avdelas med\n"
+"\tett likhetstecken (â€=â€).\n"
+"\n"
+"Giltiga utökade flaggor är:\n"
+"\tmmp_update_interval=<intervall>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID-datastycken per disk i block>\n"
+"\tstripe-width=<RAID-kliv · datadiskar i block>\n"
+"\toffset=<avstånd att skapa filsystemet på>\n"
+"\tresize=<maximal storleksändringsstorlek i block>\n"
+"\tpacked_meta_blocks=<0 för att avaktivera, 1 för att aktivera>\n"
+"\tlazy_itable_init=<0 för att avaktivera, 1 för att aktivera>\n"
+"\tlazy_journal_init=<0 för att avaktivera, 1 för att aktivera>\n"
+"\troot_owner=<uid för rotkatalogen>:<gid för rotkatalogen>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=kodning\n"
+"\tencoding_flags=flaggor\n"
+"\tquotatype=<kvottyper att aktivera>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Varning: RAID-remsbredd %u är inte en jämn multipel av klivet %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "fel: felaktig kodningsflagga: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "fel: en kodning måste specificeras explicit när kodningsflaggor skickas\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntaxfel i mke2fs konfigurationsfil (%s, rad nr %d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ogiltig filsystemsflagga satt: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ogiltig monteringsflagga satt: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Din mke2fs.conf-fil definierar inte filsystemstypen %s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Du behöver förmodligen installera en uppdaterad mke2fs.conf-fil.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Avbryter...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Varning: fs_type %s är inte definierad i mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Kunde inte allokera minne för ny SÖKVÄG.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Kunde inte initiera profilen (fel: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "felaktig blockstorlek - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Varning: blockstorlek %d är inte användbar på de flesta system.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "felaktig klusterstorlek - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "â€-R†undanbedes, använd â€-E†istället"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "felaktigt felbeteende - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Ogiltigt antal för block per grupp"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "block per grupp måste vara en multipel av 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Felaktigt tal för flex_bg-storlek"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "storlek på flex_bg måste vara en multipel av 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "storlek på flex_bg (%lu) måste vara mindre än eller lika med 2³¹"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "ogiltig inodsförhållande %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ogiltig inodsstorlek - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Varning: flaggan -K undanbedes och skall inte användas mera. Använd den utökade flaggan â€-E nodiscard†istället!\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "i malloc för bad_blocks_filename"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"Varning: etiketten för lÃ¥ng, kommer avkortas till â€%sâ€.\n"
+"\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "ogiltig procentandel reserverade block - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "felaktigt antal inoder - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "vid allokering av fs_feature-sträng"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "felaktig versionsnivå - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "vid försök att skapa revision %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "Flaggan -t får endast anges en gång"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "Flaggan -T får endast anges en gång"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "vid försök att öppna journalenhet %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Journalenhetens blockstorlek (%d) mindre än minsta blockstorlek %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Använder journalenhetens blockstorlek: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "felaktiga block â€%s†pÃ¥ enhet â€%sâ€"
+
+# "Ett" för att detta sätts in i annan sträng där det föregås av "a".
+# Även "journal" kan sättas in på samma plats. Felrapporterat.
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "ett filsystem"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Filen %s finns inte och ingen storlek angavs.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Skapar normal fil %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "vid försök att avgöra filsystemstorlek"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Kunde inte avgöra enhetsstorlek; du måste ange\n"
+"storleken på filsystemet\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Enhetsstorlek rapporterades som noll. Ogiltig partition angiven, eller\n"
+"\tpartitionstabellen var inte omläst efter att ha kört fsck, på grund\n"
+"\tav en modifierad partition används och är i bruk. Du kan behöva\n"
+"\tstarta om för att läsa om din partitionstabell.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "Filsystem större än synbar enhetsstorlek."
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "Misslyckades tolka fs-typlista\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "HURD stödjer inte funktionen filtype.\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "HURD stödjer inte funktionen huge_file.\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "HURD stödjer inte funktionen metadata_csum.\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "HURD stödjer inte funktionen ea_inode.\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "vid försök att avgöra hårdvarusektorstorlek"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "vid försök att avgöra fysisk sektorstorlek"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "när blockstorlek sattes; för liten för enheten\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Varning: angiven blockstorlek %d är mindre än enhetens fysiska sektorstorlek %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: Storleken på enhet (0x%llx block) %s är för stor för att uttryckas\n"
+"\tmed 32 bitar med användning av en blockstorlek på %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Storleken på enhet (0x%llx block) %s är för stor för att skapa\n"
+"\tett filsystem som använder en blockstorlek på %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "upplösning av fs_types för mke2fs.conf: "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Filsystemsfunktioner som inte stöds med revision 0-filsystem\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Glesa superblock stöds inte med revision 0-filsystem\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Journaler stöds inte med revision 0-filsystem\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "ogiltig procentandel reserverade block - %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "Utsträckningar MÅSTE vara aktiverade på ett 64-bitars filsystem. Skicka -O extents för att rätta.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Klusterstorleken får inte vara mindre än blockstorleken.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "att ange en klusterstorlek förutsätter funktionen bigalloc"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "varning: Kan inte ta reda på enhetens geometri för %s\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "%s justering är förskjuten med %lu byte.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Detta kan medföra väldigt dåliga prestanda, (om)partitionering föreslås.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s har förmågan DAX men aktuell blockstorlek %u är skild från systemsidstorleken %u så filsystemet kommer inte stödja DAX.\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d-byteblock för stort för systemet (max %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "Varning: %d-byteblock för stort för systemet (max %d), tvingas fortsätta\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Förslag: använd en Linuxkärna ≥ 3.18 för förbättrad stabilitet av metadatan och funktionerna för journalkontrollsumma.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Okänd filnamnskodning från profilen: %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Okända kodningsflaggor från profilen: %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Varning: avstånd angivet utan en uttrycklig filsystemstorlek.\n"
+"Skapar ett filsystem med %llu block men detta kanske inte\n"
+"är vad du vill.\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "%d-byteinoder är för små för projektkvoter"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Kan inte stödja funktionen bigalloc utan funktionen utsträckningar"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Egenskaperna resize_inode och meta_bg är inte kompatibla\n"
+"De kan inte båda aktiveras samtidigt.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"Varning: bigalloc-filsystem med en klusterstorlek större än\n"
+"16 gånger blockstorleken betraktas som experimentellt\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "reserverade block för storleksändring under drift stöds inte på icke-glesa filsystem"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "antal block per grupp utanför giltigt intervall"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Funktionen flex_bg är inte aktiverad, så fleg_bg-storlek kan inte anges"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ogiltig inodstorlek %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "%d-byteinoder är för små för inline-data; ange en större storlek"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "128-bytes inoder kan inte hantera data bortom 2038 och bör undvikas\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "för många inoder (%llu), öka inodsförhållandet?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "för många inoder (%llu), ange < 2³² inoder"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"inodsstorlek (%u) · inodantal (%u) för stort för ett\n"
+"\tfilsystem med %llu block, ange högre inodsförhållande (-i)\n"
+"\teller lägre inodantal (-N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Utrangerar enhetsblock: "
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "misslyckades - "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "när kvotkontexten initierades"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "när kvotinoder skrevs"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "felaktigt felbeteende i profilen - %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "i malloc för android_sparse_params"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "vid uppsättning av superblock"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Utsträckningar är inte aktiverade. I trädet med filutsträckningar kan blocksummor beräknas, medan blockkartor inte kan det. Att inte aktivera utsträckningar reducerar täckningen av kontrollsummor för metadata. Skicka -O extents för att rätta.\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Stöd för 64-bitars filsystem är inte aktiverat. De större fälten som denna funktion erbjuder gör kontrollsummor med full styrka möjliga. Skicka -O 64bit för att rätta.\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Funktionen metadata_csum_seed förutsätter funktionen metadata_csum.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "Utrangering lyckades och kommer returnera 0s — hoppar över rensning av inodstabell\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "okänt os - %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Allokerar grupptabeller: "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "vid försök att allokera filsystemstabeller"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "när dåliga block avmarkerades"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tvid konvertering av underklustrets bitkarta"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "vid beräkning av omkostnad"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s kan göras ännu trasigare av omskrivning av superblock\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "vid nollställning av block %llu vid slutet av filsystemet"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "vid reservation av block för storleksändring under drift"
+
+# "En" för att detta sätts in i annan sträng där det föregås av "a".
+# Även "filsystem" kan sättas in på samma plats. Felrapporterat.
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "en journal"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Lägger till journal till enhet %s: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tvid försök att lägga till journal till enhet %s"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "klar\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Hoppar över att skapa journal i läget endast super\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Skapar journal (%u block): "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tvid försök att skapa journal"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Fel vid aktivering av funktionen för skydd mot flerfaldig montering."
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Skydd mot flerfaldig montering är aktiverat med uppdateringsintervall %d sekunder.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "Kopierar filer till enheten: "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "när filsystemet populerades"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Skriver superblock och bokföringsinformation för filsystemet: "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "när filsystemet skrevs ut och stängdes"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"klar\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "vid nollställning av block %llu för jättefil"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Ett partitionsavstånd på %llu (%u k) block är inte kompatibelt med klusterstorleken %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Stora filer kommer att nollställas\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Skapar %lu stora filer "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "med %llu block var"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "när den stora filen %lu skapades"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Användning: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Användning: %s enhet...\n"
+"\n"
+"Skriv ut partitionsinformationen för varje angiven enhet.\n"
+"Till exempel: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Kan inte öppna %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Kan inte få geometrin för %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Kan inte få storlek av %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d start=%8d storlek=%8lu slut=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Denna åtgärd kräver en nykontrollerat filsystem.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Kör e2fsck -f på filsystemet.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Kör e2fsck -fD på filsystemet.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Användning: %s [-c max_antal_monteringar] [-e felbeteende] [-f] [-g grupp]\n"
+"\t[-i intervall[d|m|w]] [-j] [-J journalflaggor] [-l]\n"
+"\t[-m reserverade_block_procent] [-o [^]monteringsflaggor[,…]]\n"
+"\t[-r antal_reserverade_block] [-u användare] [-C antal_monteringar]\n"
+"\t[-L volymetikett] [-M senast_monterad_katalog]\n"
+"\t[-O [^]funktion[,…]] [-Q kvotflaggor]\n"
+"\t[-E utökad-flagga[,…]] [-T senaste_kontrolltid] [-U UUID]\n"
+"\t[-I ny_inodstorlek] [-z gör-ogjort-fil] enhet\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Journalsuperblock inte funnet!\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "vid försök att öppna extern journal"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s är inte en journalenhet.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Journalsuperblocket är trasigt, nr_users\n"
+"är för hög (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Filsystems UUID inte funnet på journalenhet.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Kan inte hitta journalenheten. Den togs INTE bort.\n"
+"Använd flaggan -f för att ta bort en saknad journalenhet.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Journal borttagen\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "vid läsning av bitkartor"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "vid nollställning av journalinod"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "vid skrivning av journalinod"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(och starta om efteråt!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Efter att ha kört e2fsck, kör â€resize2fs %s %s"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Kör â€resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "†för att aktivera 64-bitarsläge.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "†för att avaktivera 64-bitarsläge.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"VARNING: Kunde inte bekräfta stöd i kärnan för metadata_csum_seed.\n"
+" Detta kräver Linux ≥ v4.4.\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Nollställning av filsystemsfunktion â€%s†stöds inte.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Att sätta filsystemsfunktion â€%s†stöds inte.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Flaggan has_journal får endast nollställas när filsystemet är\n"
+"omonterat eller monterat enbart för läsning.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Flaggan needs_recovery är satt. Kör e2fsck före flaggan has_journal\n"
+"nollställs.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Att sätta filsystemsfunktionen â€sparse_super†stödjs inte\n"
+"för filsystem med funktionen meta_bg aktiverad.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Funktionen för skydd mot flerfaldig montering\n"
+"kan inte sättas på om filsystemet är monterat\n"
+"eller skrivskyddat.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Skydd mot flerfaldig montering har aktiverats med uppdateringsintervallet %d s.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"Funktionen för skydd mot flerfaldig montering kan inte\n"
+"avaktiveras om filsystemet är skrivskyddat.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "Fel vid läsning av bitkartor\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Magiskt tal i MMP-block stämmer inte. förväntat: %x, faktiskt: %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "vid läsning av MMP-block."
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Att avaktivera katalogindex på filsystem med kontrollsummor kan ta ett tag."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Det går inte att avaktivera dir_index på ett monterat filsystem!\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Att nollställa flaggan flex_bg skulle få filsystemet att bli\n"
+"inkonsistent.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Flaggan huge_file får endast nollställas när filsystemet är\n"
+"omonterat eller monterat enbart för läsning.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Att aktivera kontrollsummor kan ta ett tag."
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Kan inte aktivera metadata_csum på ett monterat filsystem!\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Utsträckningar är inte aktiverade. I trädet med filutsträckningar kan blocksummor beräknas, medan blockkartor inte kan det. Att inte aktivera utsträckningar reducerar täckningen av kontrollsummor för metadata. Kör om med -O extents för att rätta.\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Stöd för 64-bitars filsystem är inte aktiverat. De större fälten som denna funktion erbjuder gör kontrollsummor med full styrka möjliga. Kör resize2fs -b för att rätta.\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "Att avaktivera kontrollsummor kan ta ett tag."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Kan inte avaktivera metadata_csum på ett monterat filsystem!\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Det går inte att aktivera uninit_bg på ett monterat filsystem!\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Det går inte att avaktivera uninit_bg på ett monterat filsystem!\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Kan inte aktivera 64-bitarsläge när det är monterat!\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Kan inte avaktivera 64-bitarsläge när det är monterat!\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Kan inte aktivera projektfunktionen; inodstorleken är för liten.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Varning: flaggan â€^quota†åsidosätter â€-Qâ€-argument.\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "Funktionen casefold kan endast aktiveras när filsystemet är omonterat.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Att sätta funktionen â€metadata_csum_seed†stödjs bara\n"
+"för filsystem med funktionen metadata_csum aktiverad.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr "UUID har ändrats sedan metadata_csum aktiverades. Filsystem måste vara omonterade för att säkert skriva om alla metadata till att matcha det nya UUID:t.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "Att beräkna om kontrollsummor kan ta ett tag."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "Filsystemet har redan en journal.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tvid försök att öppna journal på %s\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Skapar journal på enhet %s: "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "vid tillägg av filsystem till journal på %s"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Skapar journalinod: "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tvid försök att skapa journalfil"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Kan inte aktivera projektkvoter; inodstorleken är för liten.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "när kvotkontexten i stödbiblioteket initierades"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "när kvotgränser (%d) uppdaterades"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "när kvotfil (%d) skrevs"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "när kvotfil (%d) togs bort"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Felaktigt kvotalternativ angivet.\n"
+"\n"
+"Följande giltiga kvotalternativ finns (skicka dem separerade med kommatecken):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Kunde inte tolka datum-/tidsangivelse: %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "felaktigt antal monteringar - %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "felaktigt gid/gruppnamn - %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "felaktigt intervall - %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "felaktig andel reserverade block - %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "-o får endast anges en gång"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "-O får endast anges en gång"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "felaktigt antal reserverade block - %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "felaktigt uid/användarnamn - %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "felaktig inodsstorlek - %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Inodsstorlek måste vara en multipel av två- %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval är för stort: %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Sätter uppdateringsintervall för skydd mot flerfaldig montering till %lu sekund\n"
+msgstr[1] "Sätter uppdateringsintervall för skydd mot flerfaldig montering till %lu sekunder\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Sätter filsystemets felflagga för att framtvinga fsck.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ogiltig RAID-kliv: %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ogiltig RAID-remsbredd: %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ogiltig hash-algoritm: %s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Sätter standardhashalgoritm till %s (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Det går inte att ändra en befintlig kodning\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "Felaktig kodning: %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "Sätter kodningen till â€%sâ€\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "Sätter encoding_flags till â€%sâ€\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Felaktiga flaggor angivna.\n"
+"\n"
+"Utökade flaggor separeras med komman, och kan ta ett argument som avdelas med\n"
+"\tett likhetstecken (â€=â€).\n"
+"\n"
+"Giltiga utökade flaggor är:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash-algoritm>\n"
+"\tmount_opts=<utökade standardmonteringsflaggor>\n"
+"\tmmp_update_interval=<mmp-uppdateringsintervall i sekunder>\n"
+"\tstride=<RAID-styckestorlek per disk i block>\n"
+"\tstripe_width=<RAID-kliv·datadiskar i block>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<kodning>\n"
+"\tencoding_flags=<flaggor>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "Misslyckades att läsa inodsbitkarta\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "Misslyckades att läsa blockbitkarta\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "block att flytta"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Kunde inte allokera blockbitkarta när inodsstorleken ökades\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "Inte tillräckligt med utrymme för att öka inodsstorleken \n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Misslyckades omlokalisera block under storleksändring av inoder \n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Fel när storleken på inoder ändrades.\n"
+"Kör e2undo för att göra filsystemsändringarna ogjorda. \n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Om du är säker på att filsystemet inte används på någon nod, kör:\n"
+"â€tune2fs -f -E clear_mmp {enhet}â€\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"MMP-blockets magiska tal är felaktigt. Försök att rätta det genom att köra:\n"
+"â€e2fsck-f %sâ€\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "Kan inte modifiera en journalenhet.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Inodsstorleken är redan %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "Att krympa inodsstorleken stödjs inte\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Ogiltig inodstorlek %lu (max %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Att ändra storlek på inoder kan ta ett tag."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Varning: journalen är smutsig. Du kanske vill köra om journalen så här:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"kör sedan om detta kommando. Annars kan eventuella ändringar skrivas över\n"
+"när journalen återhämtas.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Återhämtar journalen.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Sätter max antal monteringar till %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Sätter aktuellt antal monteringar till %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Sätter felbeteende till %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Sätter gid för reserverade block till %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "intervall mellan kontroller är för stort (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Sätter intervall mellan kontroller till %lu sekunder\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Sätter procent reserverade block till %g %% (%llu block)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "antal reserverade block för stort (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Sätter antal reserverade block till %llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Filsystemet har redan glesa superblock.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Att sätta superblockflaggan gles stödjs inte\n"
+"för filsystem med funktionen meta_bg aktiverad.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Flaggan för glesa superblock satt. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Nollställning av superblocksflaggan gles stödjs inte.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Sätter tidpunkt för senaste filsystemskontroll till %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Sätter uid för reserverade block till %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Fel vid användning av clear_mmp. Det måste användas med -f\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Kvotfunktionen kan endast ändras när filsystemet är omonterat.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Kan inte ändra UUID:t på detta filsystem eftersom det har funktionsflaggan stable_inodes.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Att sätta UUID:n på detta filsystem kan ta ett tag."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "UUID:n får endast ändras när filsystemet är omonterat.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Om du bara använder kärnor nyare än v4.4, kör â€tune2fs -O metadata_csum_seed†och kör om detta kommando.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Ogiltigt UUID-format\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Behöver uppdatera journalsuperblock.\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Inodsstorleken får endast ändras när filsystemet är omonterat.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Att ändra inodsstorlek stöds inte för filsystem med funktionen flex_bg\n"
+"aktiverad.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Sätter inodsstorlek till %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "Misslyckades att ändra inodsstorlek\n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Sätter klivstorlek till %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Sätter remsbredd till %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Sätter utökade standardmonteringsflaggor till â€%sâ€\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<fortsätter>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Fortsätt ändå (eller vänta %d sekunder för att fortsätta)? (j,N) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "Fortsätt ändå? (j,N) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs framtvingat ändå. Hoppas /etc/mtab är felaktig.\n"
+
+# %s kan bli "filsystem" eller "journal". Jag har lagt till "en"
+# respektive "ett" i översättningarna av dessa strängar istället.
+# Felrapporterat.
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "skapar inte %s här!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs framtvingad ändå.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Kunde inte allokera minne för att tolka journalflaggor!\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Kunde inte hitta journalenhet som matchar %s\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Felaktiga journalflaggor angivna.\n"
+"\n"
+"Journalflaggor separeras med kommatecken, och kan ta ett argument som\n"
+"\tavgränsas med ett likhetstecken (â€=â€).\n"
+"\n"
+"Giltiga journalflaggor är:\n"
+"\tsize=<journalstorlek i megabyte>\n"
+"\tenhet=<journalenhet>\n"
+"\tlocation=<journalplats>\n"
+"\n"
+"Journalstorleken måste vara mellan 1024 och 10240000 filsystemsblock.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Filsystem för litet för en journal\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Den totala begärda journalstorleken är %d block; den måste vara\n"
+"mellan 1024 och 10240000 block. Avbryter.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Den totala journalstorleken är för stor för filsystemet.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Detta filsystem kommer automatiskt kontrolleras var %d montering eller\n"
+"%g dag, vilket som kommer först. Använd tune2fs -c eller -i för att ändra.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Användning: %s [-d] [-p pid-fil] [-s uttagssökväg] [-T tidsgräns]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n ant] [-s uttagssökväg]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "felaktiga argument"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "anslut"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "skriv"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "läsantal"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "felaktig svarslängd"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "uuidd-demonen som körs redan med pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Kunde inte skapa unix-strömuttag: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Kunde inte binda unix-uttag %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Kunde inte lyssna på unix-uttag %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Fel vid läsning från klient, len = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operation %d, inkommande ant = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Genererade tids-UUID: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Genererade slumpmässigt UUID: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Genererade tids-UUID %s och efterföljande UUID\n"
+msgstr[1] "Genererade tids-UUID %s och %d efterföljande UUID:er\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Genererade %d UUID:er:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ogiltig operation %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Felaktigt tal: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Fel vid anrop av uuidd-demonen (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s och efterföljande UUID\n"
+msgstr[1] "%s och efterföljande %d UUID:er\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Lista över UUID:er:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Oväntad svarslängd från servern %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Kunde inte döda uuidd som kör med pid %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Dödade uuidd som körde med pid %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Användning: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Områdesdump:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tAntal=%llu, Storlek=%llu, Markör=%llu, Sorterad=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Användning: %s [-d felsökningflaggor] [-f] [-F] [-M] [-P] [-p] enhet [-b|-s|ny_storlek] [-S RAID-kliv] [-z gör-ogjort-fil]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Utökar inodstabellen"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Flyttar om block"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Söker igenom inodstabell"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Uppdaterar inodsreferenser"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Flyttar inodstabell"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Okänt pass?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Börja pass %d (max = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Att ändra storlek på bigalloc-filsystem har inte testats fullt ut.\n"
+"Fortsätt på egen risk! Använd den tvingande flaggan om du vill göra\n"
+"det ändå.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "när %s öppnades"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "när statusinformation för %s hämtades"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Kör â€e2fsck -f %s†först.\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Uppskattad minsta storlek på filsystemet: %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ogiltig ny storlek: %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Ny storlek för stor för att uttryckas i 32 bitar\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "Ny storlek resulterar i för många blockgruppbeskrivare.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Ny storlek mindre än minimum (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Ogiltig klivlängd"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Den rymmande partitionen (eller enheten) är bara %llu (%d k) block.\n"
+"Du begärde en ny storlek på %llu block.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Kan inte slå på och av 64-bitarsfunktionen.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Kan inte ändra 64-bitarsfunktionen på ett filsystem som är större än 2³² block.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Kan inte ändra 64-bitarsfunktionen när filsystemet är monterat.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Aktivera utsträckningsfunktionen med tune2fs före aktivering av 64-bitarsfunktionen.\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Filsystemet är redan %llu (%d k) block långt. Inget behöver göras!\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Filsystemet är redan 64-bitars.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Filsystemet är redan 32-bitars.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Kan inte krympa detta filsystem eftersom det har funktionsflaggan stable_inodes.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Konverterar filsystemet till 64-bitars.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Konverterar filsystemet till 32-bitars.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Ändrar storlek på filsystemet på %s till %llu (%d k) block.\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "vid försök att ändra storlek på %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Kör â€e2fsck -fy %s†för att laga filsystemet\n"
+"efter den avbrutna storleksändringen.\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Filsystemet på %s är nu %llu (%d k) block långt.\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "vid försök att korta av %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "kärnan stödjer inte storleksändring uppkopplat med sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "Filsystem på %s är monterat på %s, on-line-storleksändring krävs\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Att krympa uppkopplat stödjs inte"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Filsystemet stödjer inte storleksändring uppkopplat"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Inte tillräckligt med reserverade gdt-block för storleksändring"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Kärnan stödjer inte ändring av storlek på så stora filsystem"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "vid försök att öppna monteringspunkt %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Gammalt gränssnitt för storleksändring begärt.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Rättighet att ändra storlek på filsystem nekas"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Vid kontroll av stöd för storleksändring uppkopplat"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Kärnan stödjer inte storleksändring uppkopplat"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Utför en storleksändring on-line av %s till %llu (%d k) block.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Vid försök att utöka den sista gruppen"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Vid försök att öppna grupp nr. %d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "Filsystemet på %s är monterat på %s, och storleksändring on-line stöds inte på detta system.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "inoder (%llu) måste vara mindre än %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "reserverade block"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "metadatablock"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "nya metablock"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Borde aldrig hända! Ingen sb i sista super_sparse bg?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Borde aldrig hända! Oväntad old_desc i super_sparse bg?\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Skulle aldrig inträffa: storleksändringsinoden trasig!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "EXT2FS-bibliotek version 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Fel magiskt tal för ext2_filsys-post"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Fel magiskt tal för badblocks_list-post"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Fel magiskt tal för badblocks_iterate-post"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Fel magiskt tal för inode_scan-post"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Fel magiskt tal för io_channel-post"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Fel magiskt tal för unix-io_channel-post"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Fel magiskt tal för io_manager-post"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Fel magiskt tal för block_bitmap-post"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Fel magiskt tal för inode_bitmap-post"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Fel magiskt tal för generic_bitmap-post"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Fel magiskt tal för test io_channel-post"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Fel magiskt tal för katalogenblocklistepost"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Fel magiskt tal för icount-post"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Fel magiskt tal för PowerQuest-io_channel-post"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Fel magiskt tal för ext2-filstruktur"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Fel magiskt tal för ext2-avbildshuvud"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Fel magiskt tal för inods-io_channel-post"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Fel magiskt tal för ext4-utsträckningshandtag"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Fel magiskt tal i superblocket"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Filesystemversionen är för hög"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Försök att skriva till ett filsystem öppnat skrivskyddat"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Kan inte läsa gruppbeskrivare"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Kan inte skriva gruppbeskrivare"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Trasig gruppbeskrivare: felaktigt block för blockbitkarta"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Trasig gruppbeskrivare: felaktigt block för inodsbitkarta"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Trasig gruppbeskrivare: dåligt block för inodstabell"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Kan inte skriva en inodsbitkarta"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Kan inte läsa en inodsbitkarta"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Kan inte skriva en blockbitkarta"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Kan inte läsa en blockbitkarta"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Kan inte skriva en inodstabell"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Kan inte läsa en inodstabell"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Kan inte läsa nästa inod"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Filsystemet har oväntad blockstorlek"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "EXT2-katalog skadad"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Försök att läsa block från filsystemet resulterade i en kort läsning"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Försök att skriva block till filsystemet resulterade i en kort skrivning"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Inget ledigt utrymme i katalogen"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Inodsbitkartan inte inläst"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Blockbitkartan inte inläst"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Otillåtet inodsnummer"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Otillåtet blocknummer"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Internt fel i ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Inte tillräckligt med utrymme för att bygga det föreslagna filsystemet"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Otillåtet blocknummer skickat till ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Otillåtet blocknummer skickat till ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Otillåtet blocknummer skickat till ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Otillåtet inodsnummer skickat till ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Otillåtet inodsnummer skickat till ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Otillåtet inodsnummer skickat till ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Försök att fuska till slutet av blockbitkartan bortom det riktiga slutet"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Försök att fuska till slutet av inodsbitkartan bortom det riktiga slutet"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Otillåtet indirektblock hittat"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Otillåtet dubbelt indirektblock hittat"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Otillåtet trippelt indirektblock hittat"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Blockbitkartorna är inte desamma"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Inodsbitkartorna är inte desamma"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Otillåtet eller felformat enhetsnamn"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "En blockgrupp saknar en inodstabell"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Ext2-superblocket är skadat"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Otillåtet generiskt bittal skickat till ext2fs_mark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Otillåtet generiskt bittal skickat till ext2fs_unmark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Otillåtet generiskt bittal skickat till ext2fs_test_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Alltför många symboliska länkar påträffade."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Ã…teranropsfunktionen kommer inte att hantera detta fall"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Inoden är från ett dåligt block i inodstabellen"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Filsystemet har funktioner som inte stödjs"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Filsystemet har endast-läsbart-funktioner som inte stödjs"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "IO-kanalen misslyckades söka vid läsning eller skrivning"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Minnesallokering misslyckades"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Ogiltigt argumentet skickat till ext2-biblioteket"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Kunde inte allokera block i ext2-filsystem"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Kunde inte allokera inoder i ext2-filsystem"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Ext2-inod är inte en katalog"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "För många referenser i tabellen"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Filen hittades inte av ext2_lookup"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Filen öppnas skrivskyddad"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Ext2-katalogblock hittades inte"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Ext2-katalogen finns redan"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Oimplementerad ext2-biblioteksfunktion"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Användarannullering begärd"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Ext2-fil för stor"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Angiven journalenhet är inte en blockenhet"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Journalsuperblock inte funnet"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Journalen måste vara minst 1024 block"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Ej stödd journalversion"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Fel vid läsning av en extern journal"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Journalen inte funnen"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Katalog-hash stödjs inte"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Ogiltigt blocknummer för utökat attribut"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Kan inte skapa ett filsystem med begärt antal inoder"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "E2image-ögonblicksbild används inte"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "För många reserverade gruppidentifierarblock"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Storleksändringsinoden är trasig"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Försökte sätta en blockbitkarta med saknat indirektblock"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Gick bra"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Trasig databas"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: I/O-fel"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: LÃ¥sningsfel"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Slut på minne"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Posten finns"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Lås finns på andra nycklar"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TBD: Ogiltig parameter"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Posten finns inte"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Skrivning är inte tillåten"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Ext2fs-katalogblocklistan är tom"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Försök att ändra en blockmappning via en endast läsbar blockiterator"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Fel magiskt nummer för sparad sökväg till ext4-utsträckning"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Fel magiskt nummer för 64-bitars allmän bitkarta"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Fel magiskt nummer för 64-bitars blockbitkarta"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Fel magiskt nummer för 64-bitars inodsbitkarta"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Fel magiskt nummer — RESERVERAT_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Fel magiskt nummer — RESERVERAT_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Fel magiskt nummer — RESERVERAT_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Fel magiskt nummer — RESERVERAT_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Fel magiskt nummer — RESERVERAT_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Fel magiskt nummer — RESERVERAT_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Fel magiskt nummer — RESERVERAT_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Trasigt utsträckningshuvud"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Trasigt utsträckningsindex"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Trasig utsträckning"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Inget fritt utrymme i utsträckningskartan"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Inoder använder inte utsträckningar"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Ingen â€nästaâ€-utsträckning"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Ingen â€föregÃ¥endeâ€-utsträckning"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Ingen â€uppâ€-utsträckning"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Ingen â€ner“-utsträckning"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Ingen aktuell nod"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Ext2fs-operationen stödjs inte"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Ingen plats att lägga in en utsträckning i noden"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Uppdelning skulle resultera i en tom nod"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Utsträckningen inte funnen"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Operationen stödjs inte för inoder som innehåller utsträckningar"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Utsträckningslängden är felaktig"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "I/O-kanaler stödjer inte 64-bitars blocknummer"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Kan inte kontrollera om filsystem är monterade för att mtab-filen saknas"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Filsystemen är för stora för att använda gammaldags bitkartor"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: ogiltigt magiskt nummer"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: enheten är för närvarande aktiv"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: e2fsck körs"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: blocknummer utanför filsystemets räckvidd"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: utför en okänd operation"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: filsystemet används fortfarande"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: öppning med O_DIRECT misslyckades"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Storlek på blockgruppbeskrivare felaktig"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Inodens kontrollsumma stämmer inte med inoden"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Kontrollsumman för inodsbitkartan stämmer inte med bitkartan"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Utökningens blockkontrollsumma stämmer inte utökningsblocket"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Katalogblocket har inte plats för kontrollsumman"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Katalogblocksumman stämmer inte med katalogblocket"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Kontrollsumman för blocket för utökade attribut stämmer inte med blocket"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Kontrollsumman för superblocket stämmer inte med superblocket"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Okänd kontrollsummealgoritm"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Kontrollsumman för MMP-blocket stämmer inte"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ext2-filen finns redan"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Blockbitkartan stämmer inte med bitkartan"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Kan inte iterera över datablock för en inod som innehåller inline-data"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Ett utökat attribut har en ogiltig namnlängd"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Ett utökat attribut har en ogiltig värdelängd"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Kontrollsumman för utökade attribut har en felaktig hash"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Block med utökade attribut har ett felaktigt huvud"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Nyckeln för utökade attribut finns inte"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Ofullständigt utrymme för att lagra utökade attributdata"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Filsystemet saknar funktionen ext_attr eller inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Inoder har inte inline-data"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Inga block för en inod med inline-data"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Inget fritt utrymme i inline-data"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Fel magiskt tal för struktur för utökade attribut"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Inoden verkar innehålla skräp"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Utökade attribut har ett ogiltigt värdeavstånd"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Journalflaggorna är inkonsistenta"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Gör-ogjort-filen är trasig"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Felaktig gör-ogjort-fil för detta filsystem"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Filsystemet är trasigt"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Felaktig CRC upptäckt i filsystemet"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Journalsuperblocket är trasigt"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Inoden är trasig"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "Inod som innehåller ett utökat attributvärde är trasig"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "Gruppbeskrivare inte inlästa"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "Den interna ext2_filsys-datastrukturen förefaller vara trasig"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "Hittade en cyklisk slinga i utökningsträdet"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Åtgärden stödjs inte på en extern journal"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil version 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Felaktigt magiskt värde i profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Profilsektionen inte funnen"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Profilrelationen inte funnen"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Försök att lägga till en relation till en nod som inte är en sektion"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Ett huvud till en profilsektion har ett värde skilt från noll"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Felaktig länkad lista i profilstrukturer"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Felaktig gruppnivå i profilstrukturer"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Felaktig föräldrapekare i profilstrukturer"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Felaktigt magiskt värde i profiliterator"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Kan inte sätta värde på sektionsnod"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Ogiltigt argument skickat till profilbiblioteket"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Försök att ändra en endast läsbar profil"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Huvudet till profilsektionen är inte på toppnivån"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Syntaxfel i huvudet till profilsektionen"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Syntaxfel i en profilrelation"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Extra avslutande klammer i profilen"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Inledande klammer saknas i profilen"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Felaktigt magiskt värde i profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Felaktigt magiskt värde i profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Iteration över alla toppnivåsektioner stödjs inte"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ogiltigt profile_section-objekt"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Inga fler sektioner"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Felaktig namnmängd skickad till frågerutinen"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Ingen profilfil öppen"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Felaktigt magiskt värde i profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Kunde inte öppna profilfilen"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sektionen finns redan"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ogiltigt booleskt värde"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ogiltigt heltalsvärde"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Felaktigt magiskt värde i profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tsenast monterad på %.*s på %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tsenast monterad på %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tskapad %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tsenast modifierad på %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Hittade en %s-partitionstabell i %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Kunde inte öppna %s: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Enheten existerar uppenbarligen inte; angav du den korrekt?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s är inte en blockspecialenhet.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s innehÃ¥ller ett %s-filsystem med etiketten â€%sâ€\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s innehåller ett %s-filsystem\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s innehÃ¥ller â€%sâ€-data\n"
diff --git a/po/tr.gmo b/po/tr.gmo
new file mode 100644
index 0000000..9953902
--- /dev/null
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..d66cede
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,9057 @@
+# Turkish translations for e2fsprogs messages.
+# Copyright (C) 2007 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+#
+# Nilgün Belma Bugüner <nilgun@buguner.name.tr>, 2001,..., 2007.
+# Volkan Gezer <vlkngzr@gmail.com>, 2013.
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.42.8\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2018-08-18 21:03-0400\n"
+"PO-Revision-Date: 2013-11-01 22:49+0100\n"
+"Last-Translator: Volkan Gezer <vlkngzr@gmail.com>\n"
+"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Lokalize 1.5\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Hatalı blok %u kapsamdışı; yoksayıldı.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "- hatalı bloklar düğümünde doğruluk denetlenirken hata oluştu"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "- hatalı bloklar düğümü okunurken hata oluştu"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1550
+#: e2fsck/unix.c:1664 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1404
+#: misc/e2image.c:1588 misc/e2image.c:1609 misc/mke2fs.c:236
+#: misc/tune2fs.c:2837 misc/tune2fs.c:2931 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "- %s açılmaya çalışılırken hata oluştu"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "- '%s' veri yolu açılmaya çalışılırken hata oluştu"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "- dosyadan hatalı bloklar listesinin okunması sırasında hata oluştu"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "- hatalı bloklar düğümü güncellenirken hata oluştu"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Uyarı: Hatalı blok düğümünde %u. blok kuraldışı; temizlendi.\n"
+
+#: e2fsck/dirinfo.c:331
+#, fuzzy
+msgid "while freeing dir_info tdb file"
+msgstr "- kök düğümü okunurken hata oluştu"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "%3$s işlemi sırasında blok %1$lu okunurken hata oluştu (%2$s). "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "blok %lu okunurken hata oluÅŸtu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Hata görmezden gelindi"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Yeniden yaz"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "%3$s işlemi sırasında blok %1$lu yazılırken hata oluştu (%2$s). "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "%lu bloğu yazılırken hata: %s. "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "boş dizin blokları"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "boÅŸ dizin eÅŸlemi"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Empty directory block %u (#%d) in inode %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s dosya_ismi blok_sayısı blok_boyu\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Blok sayısı kuraldışı!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Blok tamponu ayrılamadı (boyu=%d)\n"
+
+#: e2fsck/extents.c:42
+#, fuzzy
+msgid "extent rebuild inode map"
+msgstr "normal dosya düğümü eşlemi"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Kullanımı: %s disk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "BLKFLSBUF ioctl desteklenmiyor! Tamponlar boşaltılamadı.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Kullanımı: %s [-F] [-I düğüm_tampon_blokları] aygıt\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1075
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "%s temizlik için açılırken hata oluştu"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1081 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "%s boşaltılmaya çalışılırken hata oluştu"
+
+#: e2fsck/iscan.c:110
+#, fuzzy, c-format
+msgid "while trying to open '%s'"
+msgstr "- %s açılmaya çalışılırken hata oluştu"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1297
+msgid "while opening inode scan"
+msgstr "düğüm taraması başlatılırken hata oluştu"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1316
+msgid "while getting next inode"
+msgstr "sonraki düğüme geçilirken hata oluştu"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u düğüm tarandı.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "günlük dosyası super bloğu okunuyor\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: geçerli gümlük dosyası super bloğu yok\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: gümlük dosyası çok kısa\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3786
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: günlük dosyasına göre kurtarılıyor\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: salt-okunur durumdayken günlük dosyasına göre kurtarma yapılamaz\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "%s yeniden açılmaya çalışılırken hata oluştu"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aek özellik"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aayrılırken hata oluştu"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "BbiteÅŸlem"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "csıkıştırma"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cbazı dosya sistemi blokları ile çelişiyor"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "ddizin"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dsilinen"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "egirdi"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@E"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fdosya sistemi"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "F%i (%Q) düğümü için"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "ggrup"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE dizin düğüm"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "idüğüm"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Ikuraldışı"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jgünlük"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Lbir bağdır"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mçok düğümlü"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "ngeçersiz"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oartık"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "psorun"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rkök düğümü"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "solmalıydı"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssüper blok"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "ubağlantısız"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vaygıt"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr ""
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zsıfır uzunluklu"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<NULL düğüm>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Hatalı bloklar düğümü>"
+
+#: e2fsck/message.c:160
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<günlük düğümü>"
+
+#: e2fsck/message.c:161
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<Grup tanımlayıcı düğümü>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Önyükleyici düğümü>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Kurtarılan dizinin düğümü>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Grup tanımlayıcı düğümü>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<günlük düğümü>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Yedek düğüm 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Yedek düğüm 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "olaÄŸan dosya"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "dizin"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "karakter aygıtı"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "aygıtı engelle"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "isimli veri yolu"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "sembolik baÄŸ"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "yuva"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "0%o kipinde bilinmeyen dosya türü"
+
+#: e2fsck/message.c:412
+#, fuzzy
+msgid "indirect block"
+msgstr "kullanımdaki blok eşlemi"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr ""
+
+#: e2fsck/message.c:416
+#, fuzzy
+msgid "triple indirect block"
+msgstr "%u düğümünün dolaylı blokları okunuyor"
+
+#: e2fsck/message.c:418
+#, fuzzy
+msgid "translator block"
+msgstr "meta-veri blokları"
+
+#: e2fsck/message.c:420
+#, fuzzy
+msgid "block #"
+msgstr "bblok"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr ""
+
+#: e2fsck/message.c:485
+#, fuzzy
+msgid "group"
+msgstr "ggrup"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr ""
+
+#: e2fsck/message.c:491
+#, fuzzy
+msgid "unknown quota type"
+msgstr "bilinmeyen iÅŸletim sistemi - %s"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "tekrarlanan blokların düğüm eşlemi"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, fuzzy, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "iç hata; %u için dup_blk bulunamıyor\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "clone_file_block işlevinden döndürüldü"
+
+#: e2fsck/pass1b.c:976
+#, fuzzy, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "iç hata; %u için dup_blk bulunamıyor\n"
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "İç hata: %u için dizin bilgileri bulunamıyor."
+
+#: e2fsck/pass1.c:356
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr ""
+
+#: e2fsck/pass1.c:774 e2fsck/pass2.c:1005
+msgid "reading directory block"
+msgstr "blok dizini okunuyor"
+
+#: e2fsck/pass1.c:1223
+msgid "in-use inode map"
+msgstr "kullanımdaki düğüm eşlemi"
+
+#: e2fsck/pass1.c:1234
+msgid "directory inode map"
+msgstr "dizin düğümü eşlemi"
+
+#: e2fsck/pass1.c:1244
+msgid "regular file inode map"
+msgstr "normal dosya düğümü eşlemi"
+
+#: e2fsck/pass1.c:1253 misc/e2image.c:1272
+msgid "in-use block map"
+msgstr "kullanımdaki blok eşlemi"
+
+#: e2fsck/pass1.c:1262
+#, fuzzy
+msgid "metadata block map"
+msgstr "meta-veri blokları"
+
+#: e2fsck/pass1.c:1324
+msgid "opening inode scan"
+msgstr "düğüm tarama açılıyor"
+
+#: e2fsck/pass1.c:1362
+msgid "getting next inode from scan"
+msgstr ""
+
+#: e2fsck/pass1.c:2066
+msgid "Pass 1"
+msgstr "1. geçiş"
+
+#: e2fsck/pass1.c:2127
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "%u düğümünün dolaylı blokları okunuyor"
+
+#: e2fsck/pass1.c:2178
+msgid "bad inode map"
+msgstr "hatalı düğüm eşlemi"
+
+#: e2fsck/pass1.c:2218
+msgid "inode in bad block map"
+msgstr "hatalı blok eşlemindeki düğüm"
+
+#: e2fsck/pass1.c:2238
+msgid "imagic inode map"
+msgstr "imagic düğüm eşlemi"
+
+#: e2fsck/pass1.c:2269
+msgid "multiply claimed block map"
+msgstr "tekrarlanan blokların eşlemi"
+
+#: e2fsck/pass1.c:2394
+msgid "ext attr block map"
+msgstr "ek özellik bloğu eşlemi"
+
+#: e2fsck/pass1.c:3637
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:4054
+msgid "block bitmap"
+msgstr "blok biteÅŸlemi"
+
+#: e2fsck/pass1.c:4060
+msgid "inode bitmap"
+msgstr "düğüm biteşlemi"
+
+#: e2fsck/pass1.c:4066
+msgid "inode table"
+msgstr "düğüm tablosu"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "2. geçiş"
+
+#: e2fsck/pass2.c:1077 e2fsck/pass2.c:1244
+msgid "Can not continue."
+msgstr "Devam edilemiyor."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "düğümleri indeksli biteşlem"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Doruk bellek"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "3. geçiş"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "düğüm döngüsü saptama biteşlemi"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "4. geçiş"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "5. geçiş"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr ""
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(komut istemi yok)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Düzelt"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Temizle"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Konumlandır"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Tahsis et"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "GeniÅŸlet"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "/lost+found a baÄŸlan"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "OluÅŸtur"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Kurtarılacaklar"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Kırp"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Düğümü temizle"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Vazgeç"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Ayır"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Devam et"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Çok düğümlü blokları kopyalar"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Dosyayı Sil"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Ä°letileri engelle"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Bağı kaldır"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "HTree indeksini temizle"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Yeniden oluÅŸtur"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(HİÇBİRİ)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "DÃœZELTÄ°LDÄ°"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "TEMÄ°ZLENDÄ°"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "KONUMLANDI"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "TAHSÄ°S EDÄ°LDÄ°"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "GENÄ°ÅžLETÄ°LDÄ°"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "TEKRAR BAÄžLANDI"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "OLUÅžTURULDU"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "KURTARILABÄ°LÄ°RLER LÄ°STELENDÄ°"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "KIRPILDI"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "DÜĞÜM TEMİZLENDİ"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "VAZGEÇİLDİ"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "AYRILDI"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "SÃœRÃœYOR"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "ÇOK DÜĞÜMLÜ BLOKLAR KOPYALANDI"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "DOSYA SÄ°LÄ°NDÄ°"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "ENGELLENDÄ°"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "BAÄž KALDIRILDI"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE Ä°NDEKSÄ° TEMÄ°ZLENDÄ°"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "TEKRAR OLUÅžTURULACAK"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:112
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "%g grubunun blok biteşlemi grup içinde değil. (blok %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:116
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "%g grubunun düğüm biteşlemi grup içinde değil. (blok %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:121
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"%g grubunun düğüm tablosu grup içinde değil. (blok %b)\n"
+"UYARI: CÄ°DDÄ° VERÄ° KAYBI OLASILIÄžI.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:127
+#, fuzzy
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Süper blok okunamıyor ya da doğru ext2 dosya sistemi tanımlamıyor.\n"
+"Aygıt geçerliyse ve gerçekten bir ext2 dosya sistemi içeriyorsa,\n"
+"(ve bir takas bölümü veya ufs ya da her neyse değilse)\n"
+"süper blok bozulmuş demektir. Başka bir süper blok ile e2fsck çalıştırmayı\n"
+"denemelisiniz:\n"
+" e2fsck -b %S <aygıt>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:138
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Dosya sistemi uzunluğu (süperblok ile ilişkili) %b blok,\n"
+"aygıtın gerçek boyutu ise %c bloktur.\n"
+"Hem süper blok hem de disk bölümleme tablosu bozuk olabilir!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:145
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"Süperblok blok_uzunluğu = %b, adımlama_uzunluğu = %c.\n"
+"Bu e2fsck sürümünde adımlama uzunluklarının blok uzunluklarından\n"
+"farklı olması desteklenmiyor.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:152
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "Süperblok grup_başına_blok_sayısı = %b; %c olmalıydı\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:157
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "Süper blok ilk_veri_bloğu = %b; %c olmalıydı\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:162
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"Dosya sistemi bir UUID içermiyor; bir tane üretiliyor.\n"
+"\n"
+
+#: e2fsck/problem.c:167
+#, c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Bilgi: Taşınması gereken düğüm tablosunun bir parçası olan\n"
+"ya da yeniden konumlanması gereken blok biteşlem blokları\n"
+"ya da düğümleri varsa, e2fsck'yı önce '-b %S' seçeneğiyle\n"
+"çalıştırmalısınız. Sorun sadece birincil bloğun grup\n"
+"tanımlayıcısı ile ilgili olabilir ve yedekleme bloğu grup\n"
+"tanımlayıcısı da doğru olabilir.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:176
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Süperblok içinde bozukluk saptandı. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:181
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Aygıtın fiziksel uzunluğu saptanırken hata oluştu: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:186
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "Süperblok içindeki düğüm sayısı %i; %j olmalıydı.\n"
+
+#: e2fsck/problem.c:190
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:195
+#, fuzzy, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Süperblok hatalı ext3 günlüğü içeriyor (düğüm %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:200
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+"Dış günlük çok sayıda dosya sistemi kullanıcısı içeriyor. (desteklenmiyor)\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:205
+msgid "Can't find external @j\n"
+msgstr "Dış günlük bulunamıyor\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:210
+msgid "External @j has bad @S\n"
+msgstr "Dış günlük hatalı süperblok içeriyor\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:215
+msgid "External @j does not support this @f\n"
+msgstr "Dış günlük bu dosya sistemini desteklemiyor\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:220
+#, fuzzy
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
+"format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Ext3 günlüğü süperblok türü %N bilinmiyor (desteklenmiyor).\n"
+"Bu kopya, bu dosya sistemi tarafından desteklenmeyen ve/ya\n"
+"eski bir biçim gibi görünüyor.\n"
+"Ayrıca, günlük süperblokunun bozuk olması da mümkün.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:228
+#, fuzzy
+msgid "@j @S is corrupt.\n"
+msgstr "Ext3 günlüğü süperbloku bozuk.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:233
+#, fuzzy
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "ext3 kurtarma bayrağı temiz ama günlük veri içeriyor.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:238
+#, fuzzy
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Süperblok ext3 needs_recovery bayrağı içeriyor ama günlük yok.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:243
+#, fuzzy
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "ext3 kurtarma bayrağı temiz ama günlük veri içeriyor.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:248
+msgid "Clear @j"
+msgstr "Günlüğü Temizle"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:253 e2fsck/problem.c:764
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "dosyasisteminin özellik bayrakları etkin ama dosyasisteminin sürümü 0."
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:258
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s artık düğüm %i (kull_kiml=%Iu, grup_kiml=%Ig, kip=%Im, boy=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:263
+#, fuzzy
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "düğüm %i içindeki blok #%B (%b) kuraldışı.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:268
+#, fuzzy
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "artık düğüm %i içindeki blok #%B (%b) zaten temizlenmiş.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:273
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "süper blok içindeki artık düğüm %i kuraldışı.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:278
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "artık düğüm listesindeki düğüm %i kuraldışı\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:283
+#, fuzzy
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+"Ext3 günlüğü süper bloğu bilinmeyen salt-okunur özellikli bir bayrak "
+"içeriyor.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:288
+#, fuzzy
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"Ext3 günlüğünün süper bloğu bilinmeyen uyumsuz özellikli bir bayrak "
+"içeriyor.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:293
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "günlük sürümü bu e2fsck tarafından desteklenmiyor.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:298
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Günlük /%s den gizli düğüme taşınıyor.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:303
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"günlük taşınırken hata oluştu: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Geçersiz V2 günlüğü süper blok alanları bulundu (V1 günlüğünden).\n"
+"V1 günlüğü süper bloğundan sonraki alanlar temizleniyor...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:314
+msgid "Run @j anyway"
+msgstr "Günlüğü yine de çalıştır"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:319
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"Yedek süper blokda kurtarma bayrağı temiz olduğundan günlük herşeye rağmen "
+"çalışacak.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:324
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Günlük düğümü blok bilgileri yedekleniyor.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:330
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"dosya sisteminde resize_ınode etkin değil, ama s_reserved_gdt_blocks için\n"
+"%N değeri var; sıfır olmalıydı. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:336
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_inode etkin değil, ama düğüm boyutlandırma sıfırdan farklı. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:341
+msgid "Resize @i not valid. "
+msgstr "Düğüm boyutlandırma geçersiz. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:346
+#, fuzzy
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "Süperbloğun son bağlama zamanı gelecekte. "
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:351
+#, fuzzy
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "Süperblokun son yazma zamanı gelecekte. "
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:356
+#, c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "harici süperbloku %X olması gereken dosyasistemi için süperblok iması"
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:361
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:366
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:371
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:376
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:381
+msgid "Last @g @b @B uninitialized. "
+msgstr ""
+
+#: e2fsck/problem.c:386
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:391
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr ""
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:396
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:402
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly "
+"set)\n"
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:408
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Yedek blok sayısı %lu olarak belirleniyor\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Yedek blok sayısı %lu olarak belirleniyor\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:423
+#, fuzzy
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr ""
+"Günlük /%s den gizli düğüme taşınıyor.\n"
+"\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:428
+#, fuzzy
+msgid "@S has invalid MMP block. "
+msgstr "blok uzunluğu hatalı - %s"
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:433
+msgid "@S has invalid MMP magic. "
+msgstr ""
+
+#: e2fsck/problem.c:438
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:443
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:449
+msgid ""
+"@S metadata_csum supersedes uninit_bg; both feature bits cannot be set "
+"simultaneously."
+msgstr ""
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:455
+#, fuzzy
+msgid "@S MMP @b checksum does not match. "
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:460
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr ""
+
+#: e2fsck/problem.c:465
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr ""
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:470
+#, fuzzy
+msgid "External @j @S checksum does not match @S. "
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:475
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr ""
+
+#: e2fsck/problem.c:480
+#, c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr ""
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:485
+msgid "Bad required extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:490
+msgid "Bad desired extra isize in @S (%N). "
+msgstr ""
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:495
+#, fuzzy
+msgid "Invalid %U @q @i %i. "
+msgstr "artık düğüm %i sıfır uzunlukta. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:500
+msgid "@S would have too many inodes (%N).\n"
+msgstr ""
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:505
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:513
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "1. geçiş: düğümler, bloklar ve uzunluklar denetleniyor\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:517
+msgid "@r is not a @d. "
+msgstr "Kök düğümü bir dizin değil. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:522
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "Kök düğümü için dtime belirtilmiş (eski mke2fs'den dolayı olabilir). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:527
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Yedek düğüm %i (%Q) hatalı kip içeriyor. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:532
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "Silinen düğüm %i sıfır dtime içeriyor. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:537
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "Düğüm %i kullanımda, ama dtime belirtilmiş. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:542
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "Düğüm %i bir sıfır uzunluklu dizindir. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:547
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+"%g grubunun %b deki blok biteşlemi diğer dosya sistemi blokları ile "
+"çelişiyor.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:552
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+"%g grubunun %b deki düğüm biteşlemi diğer dosya sistemi blokları ile "
+"çelişiyor.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:557
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+"%g grubunun %b deki düğüm tablosu diğer dosya sistemi blokları ile "
+"çelişiyor.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:562
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "%g grubunun blok biteşlemi (%b) hatalı. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:567
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "%g grubunun düğüm biteşlemi (%b) hatalı. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:572
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "Düğüm %i düğüm uzunluğu %Is, %N olmalıydı. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:577
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "Dosya düğüm %i, blok düğümü %Ib, %N olmalıydı. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:582
+#, fuzzy
+msgid "@I %B (%b) in @i %i. "
+msgstr "Düğüm %i içindeki blok #%B (%b) kuraldışı. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:587
+#, fuzzy
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+"Düğüm %i içindeki blok #%B (%b) dosya sistemi metaverisinin üzerine "
+"taşıyor. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:592
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "Düğüm %i kuraldışı blok(lar) içeriyor. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:597
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Düğüm %i içinde çok fazla kuraldışı blok.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:602
+#, fuzzy
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "Hatalı blok düğümü içindeki blok %B (%b) kuraldışı. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:607
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Hatalı blok düğümü kuraldışı blok(lar) içeriyor. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:612
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Tekrarlanmış ya da hatalı blok kullanımda!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:617
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Hatalı blok %b, hatalı blok düğümü dolaylı bloğu olarak kullanılmış."
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:622
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"Hatalı blok düğümü galiba bozulmuş. Bu durumda herşeyi durdurup\n"
+"dosya sistemindeki hatalı blokları taramak için e2fsck -c\n"
+"çalıştırmalısınız.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:629
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Blok gerçekten hatalıysa, dosya sistemi düzeltilemez.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:634
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Bu bloğu hatalı bloklar listesinden silebilir ve bu bloğun gerçekten\n"
+"doğru olduğunu umabilirsiniz, ancak hiçbir garantisi yoktur.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:640
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Birincil dosya sistemi (%b) hatalı bloklar listesinde kayıtlı.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:645
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+"Birincil grup tanımlarındaki blok %b, hatalı bloklar listesinde kayıtlı\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:651
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Uyarı: %g grubunun superbloğu (%b) hatalı.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:657
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+"Uyarı %g grubunun grup tanımları kopyası bir hatalı blok içeriyor (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:663
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr ""
+"Programlama hatası? blok %b, hatalı blok işleminde sebepsiz olarak talep "
+"edildi.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:669
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr ""
+"%s için %g blok grubunda %N bitişik bloğa yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "%s tekrar konumlaması için blok tamponuna yer ayrılırken hata oluştu\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:679
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "%g grubunun %s %b den %c ye aktarılıyor...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:684
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "%g grubunun %s %c ye aktarılıyor...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:689
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Uyarı: %snin %b bloğu okunamadı: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Uyarı: %snin %b bloğu yazılamadı: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:699 e2fsck/problem.c:1776
+msgid "@A @i @B (%N): %m\n"
+msgstr "Düğüm biteşlemi (%N) ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:704
+msgid "@A @b @B (%N): %m\n"
+msgstr "Düğüm biteşlemi (%N) ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:709
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr "Düğüm sayısı bağ bilgisine yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:714
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "Dizin bloğu dizisine yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:719
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Düğümler (%i) taranırken hata oluştu: %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:724
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+"Düğüm %i içindeki bloklar üzerinde işlemler tekrarlanırken hata oluştu: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:729
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+"Düğüm sayısı bilgisi (düğüm = %i, sayısı = %N)\n"
+"saklanırken hata oluştu: %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:734
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+"Dizin bloğu bilgisi (düğüm = %i, blok = %b, num = %N)\n"
+"saklanırken hata oluştu: %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:740
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Düğüm %i okunurken hata oluştu: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:748
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Düğüm %i imagic bayrağı içeriyor. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:753
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Özel (aygıt/soket/fifo/sembağ) dosya (düğüm %i),\n"
+"salt-eklenir ya da değişmez bayrağı içeriyor. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:759
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Özel (aygıt/soket/fifo) düğüm %i sıfırdan farklı boyutta. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:769
+msgid "@j @i is not in use, but contains data. "
+msgstr "Günlük düğümü kullanımda değil ama veri içeriyor. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:774
+msgid "@j is not regular file. "
+msgstr "Günlük dosyası normal bir dosya değil. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:779
+#, c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "Düğüm %i öksüz düğüm listesinin parçasıydı. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:785
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Bozuk bir artık bağlı listenin bir parçasını bulunduran düğümler. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:790
+msgid "@A refcount structure (%N): %m\n"
+msgstr "refcount veri yapısı için yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:795
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Düğüm %i için ek özellik bloğu %b okunurken hata oluştu. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:800
+msgid "@i %i has a bad @a @b %b. "
+msgstr "Düğüm %i %b hatalı ek özellik bloğunu içeriyor. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:805
+msgid "Error reading @a @b %b (%m). "
+msgstr "Ek özellik bloğu %b okunurken hata oluştu (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:810
+#, fuzzy
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "Ek özellikler bloğu %b %B başvuru sayısına sahip, %N olmalıydı. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:815
+msgid "Error writing @a @b %b (%m). "
+msgstr "Ek özellik bloğu %b yazılırken hata oluştu (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:820
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "Ek özellikler bloğu %b için h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:825
+#, fuzzy
+msgid "@A @a region allocation structure. "
+msgstr "icount veri yapısı için yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:830
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "Ek özellik bloğu %b bozuk (tahsis çatışması). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:835
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "Ek özellikler bloğu %b bozuk (geçersiz isim). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:840
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "Ek özellikler bloğu %b bozuk (geçersiz değer). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:845
+#, c-format
+msgid "@i %i is too big. "
+msgstr "düğüm %i çok büyük. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:849
+#, fuzzy
+msgid "%B (%b) causes @d to be too big. "
+msgstr "Blok #%B (%b) çok büyük dizin oluşturuyor. "
+
+#: e2fsck/problem.c:854
+#, fuzzy
+msgid "%B (%b) causes file to be too big. "
+msgstr "Blok #%B (%b) çok büyük dosya oluşturuyor. "
+
+#: e2fsck/problem.c:859
+#, fuzzy
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "Blok #%B (%b) çok büyük sembolik bağ oluşturuyor. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:864
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr ""
+"Düğüm %i htree desteği bulunmayan dosya sisteminde INDEX_FL bayrağı "
+"içeriyor.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:869
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "Düğüm %i INDEX_FL bayrağı içeriyor ama o bir dizin değil.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:874
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "HTREE dizin düğümü %i geçersiz bir kök düğümü içeriyor.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:879
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "HTREE dizin düğümü %i desteklenmeyen bir hash sürümü (%N) içeriyor.\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:884
+#, c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr ""
+"HTREE dizin düğümü %i uyumsuz bir htree kök düğümü bayrağı kullanıyor.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:889
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "HTREE dizin düğümü %i çok büyük bir ağaç derinliğine (%N) sahip\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:895
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"Hatalı düğüm bloğu dosya sisteminin meta verisi ile çelişen\n"
+"bir dolaylı blok (%b) içeriyor."
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:901
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Düğümü boyutlandırmak için (tekrar) oluşturma başarısız: %m"
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:906
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "%i. düğüm geçersiz bir ek boyut içeriyor (%IS)\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:911
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "%i. düğümdeki ek özellik geçersiz bir isim alanı içeriyor (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:916
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "%i. düğümdeki ek özellik geçersiz bir değer başlangıcı içeriyor (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:921
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr ""
+"%i. düğümdeki ek özellik geçersiz bir değer bloğu içeriyor (%N), 0 olmalı\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:926
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "%i. düğümdeki ek özellik geçersiz bir değer içeriyor (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:931
+#, fuzzy
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "%i. düğümdeki ek özellik geçersiz bir isim alanı içeriyor (%N)\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:936
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "@i %i bir %It ancak gerçekten bir dizin gibi görünüyor.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:941
+#, fuzzy, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr ""
+"Düğüm %i içindeki bloklar üzerinde işlemler tekrarlanırken hata oluştu: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:946
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:952
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:957
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:962
+#, fuzzy, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+"Düğüm %i htree desteği bulunmayan dosya sisteminde INDEX_FL bayrağı "
+"içeriyor.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:967
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr ""
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:972
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:977
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr ""
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:982
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:986
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr ""
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:991
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Dizin blokları yinelenirken hata: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:996
+#, fuzzy
+msgid "@q @i is not a regular file. "
+msgstr "Günlük dosyası normal bir dosya değil. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1001
+#, fuzzy
+msgid "@q @i is not in use, but contains data. "
+msgstr "Günlük düğümü kullanımda değil ama veri içeriyor. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1006
+#, fuzzy
+msgid "@q @i is visible to the user. "
+msgstr "Düğüm %i kullanımda, ama dtime belirtilmiş. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1011
+#, fuzzy
+msgid "The bad @b @i looks @n. "
+msgstr "<Hatalı bloklar düğümü>"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1016
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1021
+#, fuzzy, c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "düğüm %i çok büyük. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1026
+#, c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr ""
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1031
+#, fuzzy, c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "Ek özellik bloğu %b bozuk (tahsis çatışması). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1039
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1048
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr ""
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1053
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1059
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1064
+#, c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1069
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr ""
+"Düğüm %i htree desteği bulunmayan dosya sisteminde INDEX_FL bayrağı "
+"içeriyor.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1076
+msgid ""
+"@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr ""
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1081
+#, fuzzy
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "Düğüm %i %b hatalı ek özellik bloğunu içeriyor. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1086
+#, fuzzy, c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "Dizin düğümü %i bir ayrılmayan blok #%B içeriyor. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1091
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1096
+#, fuzzy, c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "Düğüm %i INDEX_FL bayrağı içeriyor ama o bir dizin değil.\n"
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1102
+#, fuzzy, c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Özel (aygıt/soket/fifo/sembağ) dosya (düğüm %i),\n"
+"salt-eklenir ya da değişmez bayrağı içeriyor. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1108
+#, c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1113
+#, c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr ""
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1118
+#, c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr ""
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1123
+#, c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr ""
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1128
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr ""
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1133
+#, fuzzy
+msgid "@A @x region allocation structure. "
+msgstr "icount veri yapısı için yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1138
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1143
+msgid "@A memory for encrypted @d list\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1148
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr ""
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1153
+#, c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr ""
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1158
+#, fuzzy, c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "Ek özellikler bloğu %b bozuk (geçersiz isim). "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1163
+#, c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr ""
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1168
+#, fuzzy
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "Düğüm %i %b hatalı ek özellik bloğunu içeriyor. "
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1174
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr ""
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1179
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1187
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Birden fazla düğüm gerektiren blokları çözümlemek için ek geçişler "
+"yapılıyor...\n"
+"Geçiş 1B: Çok düğümlü bloklar yeniden taranıyor\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1193
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Düğüm %i içinde çok düğümlü bloklar var:"
+
+#: e2fsck/problem.c:1208
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Düğümler (%i) taranırken hata oluştu: %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1213
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "Düğüm biteşlemi (inode_dup_map) için yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1218
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+"Düğüm %i içindeki bloklar üzerindeki işlemler tekrarlanırken\n"
+"hata oluÅŸtu (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1223 e2fsck/problem.c:1585
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr ""
+"Ek özellikler bloğu %b (düğüm %i) için refcount ayarlanırken hata oluştu: "
+"%m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1233
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Geçiş 1C: Tekrarlanan blokların düğümleri için dizinler taranıyor.\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1239
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Geçiş 1D: Çok düğümlü bloklar yeniden hallediliyor\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1244
+#, fuzzy
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Dosya %Q (düğüm %i, değişiklik zamanı %IM) \n"
+" %N dosya ile paylaşımlı, çok düğümlü %B blok içeriyor:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1250
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (düğüm %i, değişiklik zamanı %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1255
+msgid "\t<@f metadata>\n"
+msgstr "\t<dosya sistemi metaverisi>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1260
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Çok düğümlü blok içeren %N düğüm var.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1265
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Çok düğümlü bloklar zaten yeniden atanmış ya da kopyalanmıştı.\n"
+"\n"
+
+#: e2fsck/problem.c:1278
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Dosya kopyalanamadı: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1284
+#, fuzzy
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Pass 3A: Dizinler eniyileniyor\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1289
+#, fuzzy, c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Dizin %q (%d) eniyilenemedi: %m"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1294
+#, fuzzy
+msgid "Optimizing @x trees: "
+msgstr "Eniyilenen dizinler: "
+
+#: e2fsck/problem.c:1309
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1314
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr ""
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1319
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1326
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Geçiş 2: Dizin yapısı denetleniyor\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1331
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Dizin düğümü %i içindeki '.' için düğüm numarası geçersiz.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1336
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E hatalı düğüm numarası içeriyor: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1341
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E silinmiş/kullanılmayan düğüm %Di içeriyor. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1346
+msgid "@E @L to '.' "
+msgstr "@E '.' ya bir bağdır. "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1351
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E bir hatalı blok içindeki düğümü (%Di) gösteriyor.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1356
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E dizin %P (%Di) için bir bağdır.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1361
+msgid "@E @L to the @r.\n"
+msgstr "@E kök düğümüne bir bağdır.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1366
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E isminde kuraldışı karakterler içeriyor.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1371
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Dizin düğümü %i içinde '.' eksik.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1376
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Dizin düğümü %i içinde '..' eksik.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1381
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+"Dizin düğümü %i (%p) içindeki ilk girdi '%Dn' (düğüm=%Di) '.' olmalıydı.\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1386
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+"Dizin düğümü %i içindeki ikinci girdi '%Dn' (düğüm=%Di) '..' olmalıydı.\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1391
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "düğüm %i (%Q) %IF için i_faddr, sıfır olmalı.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1396
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "düğüm %i (%Q) %If için i_file_acl, sıfır olmalı.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1401
+#, fuzzy
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "düğüm %i (%Q) %N için i_fsize, sıfır olmalı.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1406
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "düğüm %i (%Q) %N için i_frag, sıfır olmalı.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1411
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "düğüm %i (%Q) %N için i_fsize, sıfır olmalı.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1416
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "Düğüm %i (%Q) bir hatalı kip (%Im) içeriyor.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1421
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "Dizin düğümü %i, blok %B, konum %N: dizin bozuk\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1426
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "Dizin düğümü %i, blok %B, konum %N: dosya ismi çok uzun\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1431
+#, fuzzy
+msgid "@d @i %i has an unallocated %B. "
+msgstr "Dizin düğümü %i bir ayrılmayan blok #%B içeriyor. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1436
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Dizin düğümü %i deki '.' dizin girdisi NULL sonlandırmalı değil\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1441
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Dizin düğümü %i deki '..' dizin girdisi NULL sonlandırmalı değil\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1446
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "Düğüm %i (%Q) bir kuraldışı karakter aygıtı.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1451
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "Düğüm %i (%Q) bir kuraldışı blok aygıtı.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1456
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E tekrarlayan '.' girdisi içeriyor.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1461
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E tekrarlayan '..' girdisi içeriyor.\n"
+
+#: e2fsck/problem.c:1466 e2fsck/problem.c:1801
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "İç hata: %i için dizin bilgileri bulunamıyor.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1471
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E %Dr kayıt uzunluğunda, %N olmalıydı.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1476
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "icount veri yapısı için yer ayrılırken hata oluştu: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1481
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Dizin blokları yinelenirken hata: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1486
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Dizin bloğu %b (düğüm %i) okunurken hata oluştu: %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1491
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Dizin bloğu %b (düğüm %i) yazılırken hata oluştu: %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1496
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "Düğüm %i için yeni dizin bloku ayrılırken hata oluştu (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1501
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Düğüm %i bırakılırken hata: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1506
+#, fuzzy, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "'.' için dizin girdisi büyük. "
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1511
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "Düğüm %i (%Q) bir kuraldışı FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1516
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "Düğüm %i (%Q) bir kuraldışı soket.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1521
+msgid "Setting filetype for @E to %N.\n"
+msgstr "@E için dosya türü %N olarak belirleniyor.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1526
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E yanlış dosya türünde (%Dt idi, %N olmalıydı).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1531
+msgid "@E has filetype set.\n"
+msgstr "@E için dosya türü belirtilmiş.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1536
+msgid "@E has a @z name.\n"
+msgstr "@Enin ismi sıfır uzunlukta.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1541
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "%Q sembolik bağı (düğüm %i) geçersiz.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1546
+msgid "@a @b @F @n (%If).\n"
+msgstr "@F ek özellik bloğu geçersiz (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1551
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+"Dosya sistemi çok büyük dosyalar içeriyor, ama süperblokta LARGE_FILE "
+"bayrağı yok\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1556
+#, fuzzy
+msgid "@p @h %d: %B not referenced\n"
+msgstr "HTREE dizin düğümü %d içinde sorun: düğüm (%B) referanssız\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1561
+#, fuzzy
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "HTREE dizin düğümü %d içinde sorun: düğüm (%B) iki kere referanslı\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1566
+#, fuzzy
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr ""
+"HTREE dizin düğümü %d içinde sorun: düğüm (%B) hatali asgari hash içeriyor\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1571
+#, fuzzy
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+"HTREE dizin düğümü %d içinde sorun: düğüm (%B) hatali azami hash içeriyor\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1576
+msgid "@n @h %d (%q). "
+msgstr "HTREE dizin düğümü %d (%q) geçersiz. "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1580
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "HTREE dizin düğümü %d içinde sorun: blok numarası %b hatalı.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1590
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "HTREE dizin düğümü %d içinde sorun: kök düğümü geçersiz\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1595
+#, fuzzy
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr ""
+"HTREE dizin düğümü %d içinde sorun: düğüm (%B) hatalı sınır (%N) içeriyor\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1600
+#, fuzzy
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr ""
+"HTREE dizin düğümü %d içinde sorun: düğüm (%B) hatalı sayım (%N) içeriyor.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1605
+#, fuzzy
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr ""
+"HTREE dizin düğümü %d içinde sorun: düğüm (%B) sırasız bit hash tablosu "
+"içeriyor\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1610
+#, fuzzy
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr ""
+"HTREE dizin düğümü %d içinde sorun: düğüm (%B) geçersiz derinlik içeriyor\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1615
+msgid "Duplicate @E found. "
+msgstr "YinelenmiÅŸ @E bulundu. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1620
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E benzersiz olmayan bir dosya ismi içeriyor.\n"
+"%s olarak deÄŸiÅŸtirilmeli"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1625
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"'%Dn' girdisi yinelenmiÅŸ.\n"
+"\t%p (%i) yeniden kurgulanmak üzere imleniyor.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1630
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, @s sıfır.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1635
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Beklenmeyen @b, @h içinde %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1639
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1644
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr ""
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1649
+#, fuzzy
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "düğüm %i (%Q) %If için i_file_acl, sıfır olmalı.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1654
+#, fuzzy, c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "HTREE dizin düğümü %d içinde sorun: kök düğümü geçersiz\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1659
+#, fuzzy, c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "HTREE dizin düğümü %d içinde sorun: kök düğümü geçersiz\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1664
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "Dizin düğümü %i, blok %B, konum %N: dizin bozuk\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1669
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr ""
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1674
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr ""
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1679
+#, c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr ""
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1684
+msgid "Encrypted @E is too short.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1691
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Geçiş 3: Dizin bağlanabilirliği denetleniyor\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1696
+msgid "@r not allocated. "
+msgstr "Kök düğümü tahsisli değil. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1701
+msgid "No room in @l @d. "
+msgstr "lost+found dizininde yer yok. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1706
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Dizin düğümü %i (%p) bağlantısız\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1711
+msgid "/@l not found. "
+msgstr "/lost+found dizini yok. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1716
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "%Q (%i) daki '..' %P (%j), süperblok %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1721
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "/lost+found dizini ya yok ya da hatalı. tekrar bağlanılamıyor.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1726
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "/lost+found dizini geniÅŸletilemiyor: %m\n"
+
+#: e2fsck/problem.c:1731
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "%i ye tekrar bağlanılamıyor: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1736
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "/lost+found dizini bulunmaya çalışılırkan hata oluştu: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1741
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr ""
+"ext2fs_new_block: %m\n"
+"/lost+found dizini oluşturulmaya çalışılırkan hata oluştu.\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1746
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr ""
+"ext2fs_new_inode: %m\n"
+"/lost+found dizini oluşturulmaya çalışılırkan hata oluştu.\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1751
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr ""
+"ext2fs_new_dir_block: %m\n"
+"yeni dizin bloÄŸu oluÅŸturulurken hata.\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1756
+#, c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr ""
+"ext2fs_write_dir_block: %m\n"
+"/lost+found için dizin bloğu yazılırken hata oluştu.\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1761
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Düğüm %i üzerinde düğüm sayısı ayarlanırken hata oluştu\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1766
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Düğüm %i için üst düğüm belirlenemedi: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1771
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Düğüm %i için üst düğüm belirlenemedi: üst dizin girdisi bulunamadı\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1781
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Kök dizini oluşturulurken hata (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1786
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "/lost+found dizini oluÅŸturulurken hata (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1791
+msgid "@r is not a @d; aborting.\n"
+msgstr "Kök düğümü bir dizin değil; çıkılıyor.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1796
+msgid "Cannot proceed without a @r.\n"
+msgstr "Bir kök düğümü olmaksızın işlenemez.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1806
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found bir dizin değil (düğüm = %i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1811
+msgid "/@l has inline data\n"
+msgstr ""
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1816
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1821
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1826
+msgid "/@l is encrypted\n"
+msgstr ""
+
+#: e2fsck/problem.c:1833
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Pass 3A: Dizinler eniyileniyor\n"
+
+#: e2fsck/problem.c:1838
+#, fuzzy, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "dirs_to_hash yineleyici oluşturulamadı: %m"
+
+#: e2fsck/problem.c:1843
+#, fuzzy
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Dizin %q (%d) eniyilenemedi: %m"
+
+#: e2fsck/problem.c:1848
+msgid "Optimizing directories: "
+msgstr "Eniyilenen dizinler: "
+
+#: e2fsck/problem.c:1865
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Geçiş 4: Başvuru sayısı denetleniyor\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1870
+#, c-format
+msgid "@u @z @i %i. "
+msgstr "artık düğüm %i sıfır uzunlukta. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1875
+#, c-format
+msgid "@u @i %i\n"
+msgstr "artık düğüm %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1880
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "Düğüm %i için başvuru sayısı %Il, %N olmalıydı. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1884
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"UYARI: E2FSCK'DA YAZILIM HATASI!\n"
+" YA DA BÄ°R MANKAFA (SÄ°Z) BAÄžLI (CANLI) DOSYA SÄ°STEMÄ°NÄ° DENETLETÄ°YOR.\n"
+" (pardon, yazar BONEHEAD (YOU) yazmış da)\n"
+"inode_link_info[%i] = %N, inode.inode_links_count = %Il.\n"
+"Bunlar aynı olmalıydı!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1891
+#, fuzzy
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "Düğüm %i için başvuru sayısı %Il, %N olmalıydı. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1896
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr ""
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1903
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "5. Geçiş: grup özet bilgileri denetleniyor\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:1908
+msgid "Padding at end of @i @B is not set. "
+msgstr "Düğüm biteşleminin sonundaki alan belirlenmemiş. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:1913
+msgid "Padding at end of @b @B is not set. "
+msgstr "Blok biteÅŸleminin sonundaki alan belirlenmemiÅŸ. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:1918
+msgid "@b @B differences: "
+msgstr "blok biteşlemi farkları: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:1938
+msgid "@i @B differences: "
+msgstr "düğüm biteşlemi farkları: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1958
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "%g. grup için serbest düğüm sayısı yanlış (%i, sayılan = %j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1963
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "%g. grup için dizin sayısı yanlış (%i, sayılan = %j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1968
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Serbest düğüm sayısı yanlış (%i, sayılan = %j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1973
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "%g. grup için serbest blok sayısı yanlış (%b, sayılan = %c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1978
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Serbest blok sayısı yanlış (%b, sayılan = %c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:1983
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+"PROGRAMLAMA HATASI: dosya sistemi (#%N) biteşlem sınırları (%b, %c)\n"
+"ile hesaplanan biteşlem sınırları (%i, %j) uyuşmuyor\n"
+
+#: e2fsck/problem.c:1989
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "İç hata: biteşlemin sonunda bozulma (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1994
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Yedek düğüm biteşleminde kopyalama hatası: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1999
+#, c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Yedek blok biteşleminde kopyalama hatası: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2024
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2029
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2034
+#, c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2039
+#, c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2046
+#, fuzzy
+msgid "Recreate @j"
+msgstr "Yeniden oluÅŸtur"
+
+#: e2fsck/problem.c:2051
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2056
+#, fuzzy, c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "- hatalı blok düğümü belirlenirken hata oluştu"
+
+#: e2fsck/problem.c:2061
+#, fuzzy, c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Düğüm %i okunurken hata oluştu: %m\n"
+
+#: e2fsck/problem.c:2066
+#, c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2071
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:2194
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Elde edilemeyen hata kodu ((0x%x)!\n"
+
+#: e2fsck/problem.c:2320 e2fsck/problem.c:2324
+msgid "IGNORED"
+msgstr "YOKSAYILDI"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr ""
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Kullanılan bellek: %d, geçen süre: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "düğüm uzunluğu = %d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "- düğüm taraması başlatılırken hata oluştu"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "- düğüm taraması yapılırken hata oluştu"
+
+#: e2fsck/super.c:224
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "Düğüm %d için ext2fs_block_iterate işlevi çağrılırken hata oluştu"
+
+#: e2fsck/super.c:249
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "Düğüm %d için ext2fs_block_iterate işlevi çağrılırken hata oluştu"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Kırpılıyor"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Temizleniyor"
+
+#: e2fsck/unix.c:77
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Kullanımı: %s [-panyrcdfvstDFSV] [-b superblok] [-B blokboyu]\n"
+"\t[-I düğüm_tamponu_blok_sayısı] [-P işlem_düğümü_boyu]\n"
+"\t[-l|-L hatalı_bloklar_dosyası] [-C dosya_tanımlayıcı]\n"
+"\t[-j dış_günlük_aygıtı] [-E ek_seçenekler] aygıt\n"
+"Linux ikinci gelişmiş dosya sisteminin (e2fs) denetlenmesi için\n"
+"kullanılır. ext3 desteklenmiştir.\n"
+"\n"
+"Seçenekler:\n"
+" -a -p ile aynı\n"
+" -C dosya_tanımlayıcı e2fsck'yı çalıştıran uygulamalarca kullanılır\n"
+" -d Hata ayıklama iletilerini gösterir\n"
+" -D dizinler eniyilenir\n"
+" -F tampon bellek işlem öncesi boşaltılır\n"
+" -r bu seçenek yoksayılır\n"
+" -s dosya sistemi bayt sıralaması tersse "
+"kullanılır.\n"
+" Normal sırada ise etkisizdir.\n"
+" -S Mevcut bayt sıralamasına bakılmaksızın dosya\n"
+" sisteminin bayt sıralaması ters çevrilir\n"
+" -t istatistikler gösterilir, iki kere verilmişse\n"
+" her geçişin istatistikleri de gösterilir.\n"
+" -V sürüm bilgileri gösterilir ve çıkar\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: e2fsck/unix.c:82
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock "
+"list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Acil yardım:\n"
+" -p Hiç soru sormadan sistem otomatik onarılır\n"
+" -n dosya sistemi salt-okunur açılır. Denetim\n"
+" sırasında tüm sorulara HAYIR cevabı verildiği\n"
+" varsayılır.\n"
+" -y Denetim sırasında tüm sorulara EVET cevabı\n"
+" verildiği varsayılır.\n"
+" -c varsa hatalı bloklar bulunur ve hatalı bloklar\n"
+" listesine eklenir\n"
+" -f disk bölümü temiz bile olsa denetim yapılır\n"
+
+#: e2fsck/unix.c:88
+#, fuzzy
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v ayrıntılı bilgi verilir\n"
+" -b superblok normal süperblok yerine belirtilen kullanılır\n"
+" -B blokboyu süperblok aranırken kullanılan blok boyu\n"
+" yerine belirtilen kullanılır\n"
+" -j dış-günlük-aygıtı günlük dosyasının aranacağı aygıt belirtilir\n"
+" -l hatalı_bloklar_dosyası belirtilen dosyadaki hatalı bloklar listeye\n"
+" eklenir\n"
+" -L hatalı_bloklar_dosyası hatalı bloklar listesi belirtilen dosyadakiler\n"
+" ile oluÅŸturulur\n"
+
+#: e2fsck/unix.c:136
+#, fuzzy, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %d/%d dosya (%%%0d.%d yanyana olmayan düğüm), %u/%u blok\n"
+
+#: e2fsck/unix.c:162
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%8d düğüm kullanıldı (%%%d)\n"
+msgstr[1] ""
+"\n"
+"%8d düğüm kullanıldı (%%%d)\n"
+
+#: e2fsck/unix.c:166
+#, fuzzy, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%8d bitişik olmayan düğüm (%%%0d.%d)\n"
+msgstr[1] "%8d bitişik olmayan düğüm (%%%0d.%d)\n"
+
+#: e2fsck/unix.c:171
+#, fuzzy, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%8d bitişik olmayan düğüm (%%%0d.%d)\n"
+msgstr[1] "%8d bitişik olmayan düğüm (%%%0d.%d)\n"
+
+#: e2fsck/unix.c:176
+#, fuzzy, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " ind/dind/tind bloklarının düğüm sayıları: %d/%d/%d\n"
+
+#: e2fsck/unix.c:184
+msgid " Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:193
+#, fuzzy, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%8d blok kullanıldı (%%%d)\n"
+msgstr[1] "%8d blok kullanıldı (%%%d)\n"
+
+#: e2fsck/unix.c:197
+#, fuzzy, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%8d hatalı blok\n"
+msgstr[1] "%8d hatalı blok\n"
+
+#: e2fsck/unix.c:199
+#, fuzzy, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%8d büyük dosya\n"
+msgstr[1] "%8d büyük dosya\n"
+
+#: e2fsck/unix.c:201
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%8d normal dosya\n"
+msgstr[1] ""
+"\n"
+"%8d normal dosya\n"
+
+#: e2fsck/unix.c:203
+#, fuzzy, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%8d dizin\n"
+msgstr[1] "%8d dizin\n"
+
+#: e2fsck/unix.c:205
+#, fuzzy, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%8d karakter aygıtı dosyası\n"
+msgstr[1] "%8d karakter aygıtı dosyası\n"
+
+#: e2fsck/unix.c:208
+#, fuzzy, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%8d blok aygıtı dosyası\n"
+msgstr[1] "%8d blok aygıtı dosyası\n"
+
+#: e2fsck/unix.c:210
+#, fuzzy, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%8d fifo\n"
+msgstr[1] "%8d fifo\n"
+
+#: e2fsck/unix.c:212
+#, fuzzy, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%8d baÄŸ\n"
+msgstr[1] "%8d baÄŸ\n"
+
+#: e2fsck/unix.c:214
+#, fuzzy, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%8d sembolik baÄŸ"
+msgstr[1] "%8d sembolik baÄŸ"
+
+#: e2fsck/unix.c:216
+#, fuzzy, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%d hızlı sembolik bağ)\n"
+msgstr[1] " (%d hızlı sembolik bağ)\n"
+
+#: e2fsck/unix.c:220
+#, fuzzy, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%8d soket\n"
+msgstr[1] "%8d soket\n"
+
+#: e2fsck/unix.c:224
+#, fuzzy, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%8d dosya\n"
+msgstr[1] "%8d dosya\n"
+
+#: e2fsck/unix.c:237 misc/badblocks.c:1002 misc/tune2fs.c:3022 misc/util.c:126
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "- %s'in bağlı olup olmadığı saptanmaya çalışılırken hata oluştu."
+
+#: e2fsck/unix.c:258
+#, fuzzy, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Uyarı! %s bağlı.\n"
+
+#: e2fsck/unix.c:261
+#, fuzzy, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Uyarı! %s bağlı.\n"
+
+#: e2fsck/unix.c:267
+#, fuzzy, c-format
+msgid "%s is mounted.\n"
+msgstr "%s bağlandı. "
+
+#: e2fsck/unix.c:269
+#, fuzzy, c-format
+msgid "%s is in use.\n"
+msgstr "%s bağlandı. "
+
+#: e2fsck/unix.c:271
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Devam edilemiyor. çıkılıyor.\n"
+"\n"
+
+#: e2fsck/unix.c:273
+#, fuzzy
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"****DİKKAT!!!! e2fsck'nın bağlı bir dosya sisteminde çalıştırılması\n"
+"ÇOK CİDDİ hasarlara sebep olabilir.****\n"
+"\n"
+
+#: e2fsck/unix.c:278
+msgid "Do you really want to continue"
+msgstr "Gerçekten devam etmek istiyor musunuz?"
+
+#: e2fsck/unix.c:280
+msgid "check aborted.\n"
+msgstr "denetim durdu.\n"
+
+#: e2fsck/unix.c:374
+msgid " contains a file system with errors"
+msgstr " hatalı bir dosya sistemi içeriyor"
+
+#: e2fsck/unix.c:376
+msgid " was not cleanly unmounted"
+msgstr " usulünce sistemden ayrılmamış"
+
+#: e2fsck/unix.c:378
+msgid " primary superblock features different from backup"
+msgstr " birincil süperblok özellikleri yedeklemeden farklı"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " denetlenmeksizin %u kere bağlandı"
+
+#: e2fsck/unix.c:389
+#, fuzzy
+msgid " has filesystem last checked time in the future"
+msgstr "Dosya sisteminin son denetim zamanı %s yapılıyor\n"
+
+#: e2fsck/unix.c:395
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " denetlenmeksizin %u gün geçti"
+
+#: e2fsck/unix.c:403
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr ""
+
+#: e2fsck/unix.c:409
+msgid ", check forced.\n"
+msgstr ", denetim başlatılacak.\n"
+
+#: e2fsck/unix.c:442
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: temiz, %d/%d dosya, %u/%u blok"
+
+#: e2fsck/unix.c:462
+msgid " (check deferred; on battery)"
+msgstr " (denetleme ertelendi; batarya)"
+
+#: e2fsck/unix.c:465
+msgid " (check after next mount)"
+msgstr " (sistem bağlandıktan sonra denetle)"
+
+#: e2fsck/unix.c:467
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (sistem %ld kere bağlandığında denetle)"
+
+#: e2fsck/unix.c:617
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "HATA: /dev/null açılamadı (%s)\n"
+
+#: e2fsck/unix.c:688
+msgid "Invalid EA version.\n"
+msgstr "Ek özellik sürümü geçersiz.\n"
+
+#: e2fsck/unix.c:701
+#, fuzzy
+msgid "Invalid readahead buffer size.\n"
+msgstr "Yeniden boyutlama parametresi geçersiz: %s\n"
+
+#: e2fsck/unix.c:750
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Bilinmeyen ek seçenek: %s\n"
+
+#: e2fsck/unix.c:758
+#, fuzzy
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"Belirtilen ek seçenekler hatalı. Ek seçenekler '=' işaretli çiftler\n"
+"virgüllerle ayrılarak verilir. Geçerli raid seçenekleri:\n"
+"\tea_ver=<ek_özellik_sürümü> (1 ya da 2)\n"
+"\n"
+
+#: e2fsck/unix.c:762
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr ""
+
+#: e2fsck/unix.c:771
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr ""
+
+#: e2fsck/unix.c:783
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"e2fsck yapılandırma dosyasında (%s, %d.satırda) sözdizimi hatası\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:856
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Dosya tanımlayıcı %d değerlendirilirken hata: %s\n"
+
+#: e2fsck/unix.c:860
+msgid "Invalid completion information file descriptor"
+msgstr "Tamamlama bilgisi dosya tanımlayıcısı geçersiz"
+
+#: e2fsck/unix.c:875
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Sadece -p/-a, -n veya -y seçeneklerinden sadece biri belirtilebilir."
+
+#: e2fsck/unix.c:896
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr " -t seçeneği e2fsck'nın bu sürümünde desteklenmiyor.\n"
+
+#: e2fsck/unix.c:927 e2fsck/unix.c:1005 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1741 misc/tune2fs.c:2036 misc/tune2fs.c:2054
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "'%s' çözümlenemiyor"
+
+#: e2fsck/unix.c:984
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:989
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:994
+#, fuzzy
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+" -c seçeneği ile -l ve -L seçenekleri aynı anda birlikte kullanılamaz.\n"
+
+#: e2fsck/unix.c:1018
+#, fuzzy
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr ""
+" -c seçeneği ile -l ve -L seçenekleri aynı anda birlikte kullanılamaz.\n"
+
+#: e2fsck/unix.c:1024
+#, fuzzy
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr ""
+" -c seçeneği ile -l ve -L seçenekleri aynı anda birlikte kullanılamaz.\n"
+
+#: e2fsck/unix.c:1088
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+" -c seçeneği ile -l ve -L seçenekleri aynı anda birlikte kullanılamaz.\n"
+
+#: e2fsck/unix.c:1135
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG \"%s\" bir tamsayı değil\n"
+"\n"
+
+#: e2fsck/unix.c:1144
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Sayısal olmayan geçersiz bağımsız değişken, -%c (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1235
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1252 e2fsck/unix.c:1257
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "- süperblok ayarlanırken hata oluştu"
+
+#: e2fsck/unix.c:1259
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1275
+#, fuzzy
+msgid "while reading MMP block"
+msgstr "- hatalı bloklar düğümü okunmaya çalışılırken hata oluştu"
+
+#: e2fsck/unix.c:1295 e2fsck/unix.c:1347 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2613 misc/mke2fs.c:2664 misc/tune2fs.c:2754
+#: misc/tune2fs.c:2799 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1336 misc/e2undo.c:270 misc/mke2fs.c:2653 misc/tune2fs.c:2788
+#: resize/main.c:222
+#, fuzzy, c-format
+msgid "while trying to delete %s"
+msgstr "- %s yeniden boyutlandırılırken hata oluştu"
+
+#: e2fsck/unix.c:1362 misc/mke2fs.c:2679 resize/main.c:243
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\tgünlük dosyası oluşturulmaya çalışılırken hata oluştu"
+
+#: e2fsck/unix.c:1405
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Hata: ext2fs kitaplık sürümü uygun değil!\n"
+
+#: e2fsck/unix.c:1412
+msgid "while trying to initialize program"
+msgstr "- uygulama başlatılmaya çelışılırken hata oluştu"
+
+#: e2fsck/unix.c:1435
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\t%s, %s kullanılıyor\n"
+
+#: e2fsck/unix.c:1447
+msgid "need terminal for interactive repairs"
+msgstr "etkileşimli onarım için uçbirim gerekli"
+
+#: e2fsck/unix.c:1508
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s blokları yedeklemeye çalışıyor...\n"
+
+#: e2fsck/unix.c:1510
+msgid "Superblock invalid,"
+msgstr "Süperblok geçersiz,"
+
+#: e2fsck/unix.c:1511
+msgid "Group descriptors look bad..."
+msgstr "Grup tanımlayıcılar hatalı görünüyor..."
+
+#: e2fsck/unix.c:1521
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "- hatalı bloklar düğümü okunurken hata oluştu"
+
+#: e2fsck/unix.c:1525
+#, fuzzy, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: geçerli gümlük dosyası super bloğu yok\n"
+
+#: e2fsck/unix.c:1554
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Dosya sistemi e2fsck'nın bu sürümünden daha yüksek bir sürümü\n"
+"destekliyor gibi. (Ya da dosya sisteminin süperbloğu bozuk olabilir)\n"
+"\n"
+
+#: e2fsck/unix.c:1561
+msgid "Could this be a zero-length partition?\n"
+msgstr "Bu sıfır uzunluklu bir disk bölümü olabilir mi?\n"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Dosya sistemine %s erişiminiz olmalı ya da root olmalısınız\n"
+
+#: e2fsck/unix.c:1569
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Bu mevcut olmayan bir aygıt ya da bir takas aygıtı mı acaba?\n"
+
+#: e2fsck/unix.c:1571
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"Dosyasistemi başka bir uygulama tarafından özellikle bağlanmış veya açılmış\n"
+"olabilir mi?\n"
+
+#: e2fsck/unix.c:1575
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "Bu mevcut olmayan bir aygıt ya da bir takas aygıtı mı acaba?\n"
+
+#: e2fsck/unix.c:1578
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"Disk yazma korumalı; -n seçeneğini kullanarak salt-oku kipinde\n"
+"denetim yapınız.\n"
+
+#: e2fsck/unix.c:1592
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1667
+msgid "Get a newer version of e2fsck!"
+msgstr "e2fsck'nın daha yeni bir sürümünü alın!"
+
+#: e2fsck/unix.c:1711
+#, fuzzy, c-format
+msgid "while checking journal for %s"
+msgstr "- %s için ext3 günlüğü denetlenirken hata oluştu"
+
+#: e2fsck/unix.c:1714
+#, fuzzy
+msgid "Cannot proceed with file system check"
+msgstr "Bir kök düğümü olmaksızın işlenemez.\n"
+
+#: e2fsck/unix.c:1725
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Uyarı: Dosya sistemi salt-oku kipinde denetlendiğinden\n"
+"günlük dosyasına göre kurtarma atlanıyor.\n"
+
+#: e2fsck/unix.c:1737
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "%s üzerine süperblok bayrakları konulamadı\n"
+
+#: e2fsck/unix.c:1743
+#, fuzzy, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Günlük süperbloğu yok!\n"
+
+#: e2fsck/unix.c:1747
+#, fuzzy, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Günlük silindi\n"
+
+#: e2fsck/unix.c:1751
+#, fuzzy, c-format
+msgid "while recovering journal of %s"
+msgstr "- %s ext3 günlük dosyası kurtarılmaya çalışılırken hata oluştu"
+
+#: e2fsck/unix.c:1773
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s desteklenmeyen özellik(leri):"
+
+#: e2fsck/unix.c:1832
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "- hatalı bloklar düğümü okunmaya çalışılırken hata oluştu"
+
+#: e2fsck/unix.c:1835
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Bu pek hayra alamet değil, ama üstüne gidilecek...\n"
+
+#: e2fsck/unix.c:1875
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Günlük oluşturuluyor (%d blok): "
+
+#: e2fsck/unix.c:1885
+msgid " Done.\n"
+msgstr " Tamamlandı.\n"
+
+#: e2fsck/unix.c:1887
+#, fuzzy
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** günlük yeniden oluşturuldu - dosya sistemi yeniden ext3 ***\n"
+
+#: e2fsck/unix.c:1893
+msgid "aborted"
+msgstr "çıktı"
+
+#: e2fsck/unix.c:1895
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck durduruldu.\n"
+
+#: e2fsck/unix.c:1922
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "e2fsck baştan başlıyor...\n"
+
+#: e2fsck/unix.c:1926
+msgid "while resetting context"
+msgstr "- bağlam sıfırlanırken hata oluştu"
+
+#: e2fsck/unix.c:1985
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DOSYA SİSTEMİ DEĞİŞTİRİLDİ *****\n"
+
+#: e2fsck/unix.c:1987
+#, fuzzy, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s Dosya sisteminde baytlar zaten normal.\n"
+
+#: e2fsck/unix.c:1991 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DOSYA SİSTEMİ DEĞİŞTİRİLDİ *****\n"
+
+#: e2fsck/unix.c:1996
+#, fuzzy, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** MAKÄ°NAYI YENÄ°DEN BAÅžLATIN *****\n"
+
+#: e2fsck/unix.c:2006 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** UYARI: Dosya sistemi hala hatalı **********\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "eE"
+
+#: e2fsck/util.c:197
+msgid "nN"
+msgstr "hH"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr ""
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr ""
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<e>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<h>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (e/h)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "durduruldu!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr ""
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "evet\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "hayır\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? hayır\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? evet\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "evet"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "hayır"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: %s için biteşlem blokları kuraldışı"
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr "düğüm ve blok biteşlemleri okunuyor"
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "- %s için biteşlemlerin okunması yinelenirken hata oluştu"
+
+#: e2fsck/util.c:346
+#, fuzzy
+msgid "writing block and inode bitmaps"
+msgstr "blok biteşlemleri yazılıyor"
+
+#: e2fsck/util.c:351
+#, fuzzy, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "- %s için düğüm biteşlemlerinin yazılması yinelenirken hata oluştu"
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: BEKLENMEYEN UYGUNSUZLUK; fsck ÇALIŞTIRMALISINIZ.\n"
+"\t(-a ve -p seçeneklerini kullanmadan)\n"
+
+#: e2fsck/util.c:444
+#, fuzzy, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Kullanılan bellek: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:448
+#, fuzzy, c-format
+msgid "Memory used: %lu, "
+msgstr "Kullanılan bellek: %d, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "zaman: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "geçen süre: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, fuzzy, c-format
+msgid "while reading inode %lu in %s"
+msgstr "- %ld düğümü %s den okunurken hata oluştu"
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, fuzzy, c-format
+msgid "while writing inode %lu in %s"
+msgstr "- %ld düğümü %s e yazılırken hata oluştu"
+
+#: e2fsck/util.c:792
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:75
+#, fuzzy
+msgid "done \n"
+msgstr "bitti .\n"
+
+#: misc/badblocks.c:100
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e "
+"max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Kullanımı: %s [-b blok_boyu] [-i girdi_dosyası] [-o çıktı_dosyası]\n"
+" [-svwnf] [-c blok_sayısı] [-p geçiş_sayısı]\n"
+" [-t deneme_ÅŸablonu [-t deneme_ÅŸablonu\n"
+" [...]]]\n"
+" aygıt [son_blok [ilk_blok]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: -n ve -w seçenekleri birbirinden bağımsızdır.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Rasgele şablon ile sınanıyor: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Sınama şablonu: 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "erişim sırasında"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "do_read için tuhaf değer (%ld)\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "ext2fs_sync_device sırasında"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "- hatalı blok listesi yinelemesine başlanırken hata oluştu"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "%lu ile %lu arasındaki bloklar denetleniyor\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Hatalı bloklar salt-okunur kipte denetleniyor\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Hatalı bloklar için denetleniyor (salt-oku testi): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Hatalı bloklar oku-yaz kipinde denetleniyor\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Blok %lu dan %lu ya kadar\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Okunuyor ve karşılaştırılıyor: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Hatalı bloklar veri bozmayan oku-yaz kipinde denetleniyor\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Hatalı bloklar denetleniyor (yıkıcı olmayan oku-yaz sınaması)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Kesme yakalandı, kaldırılıyor\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "veri yazma denemesi sırasında, blok %lu"
+
+#: misc/badblocks.c:1007 misc/util.c:131
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s bağlandı; "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"badblocks n'olursa olsun çalıştırılacak. İnşallah /etc/mtab yanlıştır.\n"
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "'badblocks' çalıştırmak güvenli değil!\n"
+
+#: misc/badblocks.c:1019 misc/util.c:142
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s görünüşe göre sistem tarafından kullanılıyor; "
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks n'olursa olsun çalıştırılacak.\n"
+
+#: misc/badblocks.c:1042
+#, fuzzy, c-format
+msgid "invalid %s - %s"
+msgstr "blok uzunluğu hatalı - %s"
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr ""
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "sınama şablonu - %s için bellek ayrılamadı"
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Salt okunur kipte en çok bir sınama şablonu belirtilebilir"
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Salt okunur kipte rasgele sınama şablonu kullanımına izin verilmez"
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr "Aygıt alanı saptanamadı; Elle bir değer girmelisiniz\n"
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr "- aygıt alanı saptanmaya çalışılırken hata oluştu"
+
+#: misc/badblocks.c:1224
+#, fuzzy
+msgid "last block"
+msgstr "Bloklar yeniden konumlandırılıyor"
+
+#: misc/badblocks.c:1230
+#, fuzzy
+msgid "first block"
+msgstr "Ä°lk veri bloÄŸu = %u\n"
+
+#: misc/badblocks.c:1233
+#, fuzzy, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "başlangıç bloğu hatalı - %s"
+
+#: misc/badblocks.c:1240
+#, fuzzy, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "başlangıç bloğu hatalı - %s"
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr "hatalı bloklar listesi bellekte oluşturulurken"
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr "bellekteki hatalı bloklar listesine eklenirken"
+
+#: misc/badblocks.c:1347
+#, fuzzy, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Geçiş tamamlandı, %u hatalı blok bulundu.\n"
+
+#: misc/chattr.c:89
+#, fuzzy, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...\n"
+msgstr ""
+"Kullanımı: %s [-RV] [-+=AacDdijsSu] [-v sürüm] dosyalar...\n"
+"\n"
+"Dosya özelliklerini değiştirmekte kullanılır.\n"
+"\n"
+"Sembolik kip seçenekleri:\n"
+"\n"
+"Bu kipte özellikler + ile mevcut seçeneklere eklenir, - ile kaldırılır,\n"
+"= ile sadece belirtilen özellikler içerilir.\n"
+"\n"
+" A: erişim zamanı güncellenmez\n"
+" a: sadece dosyanın sonuna ekleme yapılabilir. root değiştirebilir.\n"
+" c: sıkıştırılmış; dosyanın okuma-yazma sırasındaki açılması/"
+"sıkıştırılması\n"
+" çekirdeğin denetimindedir.\n"
+" d: dökümlenmez; dump uygulamasından etkilenmez.\n"
+" D: bir dizine uygulanır ve dizindeki değişiklikler eşzamanlı işlenir.\n"
+" i: değişmez; dosya içeriği silinemez, yazılamaz, dosyaya bağ "
+"oluÅŸturulamaz\n"
+" ve ismi değiştirilemez. Sadece root bu özelliği değiştirebilir.\n"
+" j: günlükleme; dosya sistemi ext3 olarak bağlanmışsa bu özellik "
+"etkisizdir\n"
+" s: silinme güvenliği; bu özellik verilen bir dosya silindiğinde veri "
+"alanı\n"
+" sıfırlarla doldurulur\n"
+" S: eşzamanlı güncellemeler; bu özelliği içeren bir dosyaya tüm\n"
+" değişiklikler anında yazılır, sistemin 'sync' seçeneği ile "
+"bağlanmasına\n"
+" eşdeğer özellik sağlar\n"
+" u: silinememezlik; bu dosya silindiğinde içeriği saklanır, silecek\n"
+" kullanıcıya silinme sırasında sorulmasını sağlar.\n"
+"\n"
+"Seçenekler:\n"
+" -R dizinler ve içeriklerinde ardışık işlem yapılır\n"
+" -V sürüm bilgisi ile işlem hakkında daha ayrıntılı bilgi verilir\n"
+" -v sürüm dosyanın sürüm/üretim numarası belirtilir\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: misc/chattr.c:159
+#, fuzzy, c-format
+msgid "bad project - %s\n"
+msgstr "sürüm hatalı - %s\n"
+
+#: misc/chattr.c:173
+#, c-format
+msgid "bad version - %s\n"
+msgstr "sürüm hatalı - %s\n"
+
+#: misc/chattr.c:219 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "- stat %s yapılmaya çalışılırken hata oluştu"
+
+#: misc/chattr.c:226
+#, c-format
+msgid "while reading flags on %s"
+msgstr "- %s üzerinde bayraklar okunurken hata oluştu"
+
+#: misc/chattr.c:231 misc/chattr.c:243
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Belirlenen %s bayrakları: "
+
+#: misc/chattr.c:252
+#, c-format
+msgid "while setting flags on %s"
+msgstr "- %s üzerinde bayraklar belirlenirken hata oluştu"
+
+#: misc/chattr.c:260
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "%s sürümü %lu olarak belirlendi\n"
+
+#: misc/chattr.c:264
+#, c-format
+msgid "while setting version on %s"
+msgstr "- %s üzerinde sürüm belirlenirken hata oluştu"
+
+#: misc/chattr.c:271
+#, fuzzy, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "%s sürümü %lu olarak belirlendi\n"
+
+#: misc/chattr.c:275
+#, fuzzy, c-format
+msgid "while setting project on %s"
+msgstr "- %s üzerinde sürüm belirlenirken hata oluştu"
+
+#: misc/chattr.c:297
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "chattr_dir_proc işlevinde dosya yolu değişkenine yer ayrılamadı"
+
+#: misc/chattr.c:337
+msgid "= is incompatible with - and +\n"
+msgstr "= ile + ve - uyumsuz\n"
+
+#: misc/chattr.c:345
+msgid "Must use '-v', =, - or +\n"
+msgstr "'-v', =, - veya + kullanılmalı\n"
+
+#: misc/create_inode.c:79 misc/create_inode.c:118
+#, fuzzy, c-format
+msgid "while reading inode %u"
+msgstr "- %ld düğümü %s den okunurken hata oluştu"
+
+#: misc/create_inode.c:89 misc/create_inode.c:287 misc/create_inode.c:352
+#: misc/create_inode.c:390
+#, fuzzy
+msgid "while expanding directory"
+msgstr "- /lost+found dizini geniÅŸletilirken hata oluÅŸtu"
+
+#: misc/create_inode.c:96
+#, fuzzy, c-format
+msgid "while linking \"%s\""
+msgstr "%s açılırken"
+
+#: misc/create_inode.c:104 misc/create_inode.c:131 misc/create_inode.c:321
+#, fuzzy, c-format
+msgid "while writing inode %u"
+msgstr "- %ld düğümü %s e yazılırken hata oluştu"
+
+#: misc/create_inode.c:151 misc/create_inode.c:175
+#, fuzzy, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "- stat %s yapılmaya çalışılırken hata oluştu"
+
+#: misc/create_inode.c:162
+#, fuzzy, c-format
+msgid "while opening inode %u"
+msgstr "düğüm taraması başlatılırken hata oluştu"
+
+#: misc/create_inode.c:168 misc/create_inode.c:195 misc/create_inode.c:975
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+#, fuzzy
+msgid "while allocating memory"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/create_inode.c:188 misc/create_inode.c:204
+#, fuzzy, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "- %s üzerinde bayraklar okunurken hata oluştu"
+
+#: misc/create_inode.c:213
+#, fuzzy, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "- %ld düğümü %s e yazılırken hata oluştu"
+
+#: misc/create_inode.c:223
+#, fuzzy, c-format
+msgid "while closing inode %u"
+msgstr "- düğüm taraması yapılırken hata oluştu"
+
+#: misc/create_inode.c:274
+#, fuzzy, c-format
+msgid "while allocating inode \"%s\""
+msgstr "- düğüm tampon belleği ayrılırken hata oluştu"
+
+#: misc/create_inode.c:293
+#, fuzzy, c-format
+msgid "while creating inode \"%s\""
+msgstr "- %ld düğümü %s den okunurken hata oluştu"
+
+#: misc/create_inode.c:359
+#, fuzzy, c-format
+msgid "while creating symlink \"%s\""
+msgstr "- %s üzerinde bayraklar okunurken hata oluştu"
+
+#: misc/create_inode.c:377 misc/create_inode.c:896
+#, fuzzy, c-format
+msgid "while looking up \"%s\""
+msgstr "- /lost+found dizine bakılırken hata oluştu"
+
+#: misc/create_inode.c:397
+#, fuzzy, c-format
+msgid "while creating directory \"%s\""
+msgstr "- kök dizin oluşturulurken hata"
+
+#: misc/create_inode.c:625
+#, fuzzy, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "%s açılırken"
+
+#: misc/create_inode.c:739
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:747
+#, fuzzy, c-format
+msgid "while opening directory \"%s\""
+msgstr "%s açılırken"
+
+#: misc/create_inode.c:757
+#, fuzzy, c-format
+msgid "while lstat \"%s\""
+msgstr "- stat %s yapılmaya çalışılırken hata oluştu"
+
+#: misc/create_inode.c:808
+#, fuzzy, c-format
+msgid "while creating special file \"%s\""
+msgstr "- %ld düğümü %s den okunurken hata oluştu"
+
+#: misc/create_inode.c:817
+#, fuzzy
+msgid "malloc failed"
+msgstr "Aayrılırken hata oluştu"
+
+#: misc/create_inode.c:825
+#, fuzzy, c-format
+msgid "while trying to read link \"%s\""
+msgstr "- %s yeniden boyutlandırılırken hata oluştu"
+
+#: misc/create_inode.c:832
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr ""
+
+#: misc/create_inode.c:843
+#, fuzzy, c-format
+msgid "while writing symlink\"%s\""
+msgstr "- %ld düğümü %s e yazılırken hata oluştu"
+
+#: misc/create_inode.c:854
+#, fuzzy, c-format
+msgid "while writing file \"%s\""
+msgstr "- %ld düğümü %s e yazılırken hata oluştu"
+
+#: misc/create_inode.c:867
+#, fuzzy, c-format
+msgid "while making dir \"%s\""
+msgstr "%s açılırken"
+
+#: misc/create_inode.c:885
+#, fuzzy
+msgid "while changing directory"
+msgstr "blok dizini okunuyor"
+
+#: misc/create_inode.c:891
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr ""
+
+#: misc/create_inode.c:904
+#, fuzzy, c-format
+msgid "while setting inode for \"%s\""
+msgstr "- %s üzerinde sürüm belirlenirken hata oluştu"
+
+#: misc/create_inode.c:911
+#, fuzzy, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "- %s üzerinde bayraklar belirlenirken hata oluştu"
+
+#: misc/create_inode.c:937
+#, fuzzy
+msgid "while saving inode data"
+msgstr "- düğüm taraması başlatılırken hata oluştu"
+
+#: misc/dumpe2fs.c:56
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+"Kullanımı: %s [-bfhixV] [-ob süperblok] [-oB blokboyu] aygıt\n"
+"\n"
+"Dosya sistemi bilgilerini dökümler.\n"
+"\n"
+"Seçenekler:\n"
+" -b hatalı olarak imlenmiş blokları gösterir\n"
+" -f dosya sistemi dumpe2fs'in bilmediği özellikler içerse "
+"bile\n"
+" bilgilerin dökümlenmesini sağlar\n"
+" -h grup tanımlayıcıları değil sadece süperblok bilgilerini\n"
+" gösterir\n"
+" -i belirtilen aygıt için e2image tarafından oluşturulmuş "
+"disk\n"
+" görüntüsü dosyasının verilerini gösterir\n"
+" -x ayrıntılı olarak grupların bilgileri gösterilir\n"
+" -V sürüm bilgileri gösterilir ve çıkar\n"
+" -ob süperblok dosya sistemini tanımlayan süperblok belirtilir\n"
+" -oB blokboyu dosya sistemini tanımlayan blok uzunluğu belirtilir\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: misc/dumpe2fs.c:159
+#, fuzzy
+msgid "blocks"
+msgstr "bblok"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grup %lu: (Bloklar: "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s süperblok: "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr " Ä°lk"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Yedek"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ""
+" \n"
+" Grup tanımlayıcı: "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Yedek GDT blokları "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr ""
+" \n"
+" Grup tanımlayıcı: "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Blok biteÅŸlemi: "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ""
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ""
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+
+#: misc/dumpe2fs.c:266
+#, fuzzy
+msgid " Inode bitmap at "
+msgstr ""
+" \n"
+" Düğüm biteşlemi: "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Düğüm tablosu: "
+
+#: misc/dumpe2fs.c:279
+#, fuzzy, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %d serbest blok, %d serbest düğüm, %d dizin\n"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Serbest bloklar: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Serbest düğümler: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "- hatalı bloklar listesi basılırken hata oluştu"
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Hatalı bloklar: %u"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:367
+msgid "while reading journal inode"
+msgstr "- günlük düğümü okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:379
+#, fuzzy
+msgid "while opening journal inode"
+msgstr "- günlük düğümü okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:385
+#, fuzzy
+msgid "while reading journal super block"
+msgstr "- günlük dosyası süperbloğu okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:392
+#, fuzzy
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Günlük süperbloğu yok!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "- günlük dosyası süperbloğu okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Günlük dosyası süperbloğu tanım numarası bulunamadı"
+
+#: misc/dumpe2fs.c:468
+#, fuzzy
+msgid "failed to alloc MMP buffer\n"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/dumpe2fs.c:479
+#, fuzzy, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "%lu ile %lu arasındaki bloklar denetleniyor\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:798 misc/tune2fs.c:2073
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Seçenekleri çözümlemek için bellek ayrılamadı!\n"
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Geçersiz süper blok parametresi: %s\n"
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ge.ers,z blok boyut parametresi: %s\n"
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Bozuk genişletilmiş seçenek(ler) belirtildi: %s\n"
+"\n"
+"Uzatılmış seçenekler virgülle ayrılır ve bir eşittir ('=') simgesi ile "
+"ayarlanabilen\n"
+"\tbir argüman alabilirler.\n"
+"\n"
+"Geçerli genişletilmiş seçenekler:\n"
+"\tsuperblock=<süperblok sayısı>\n"
+"\tblocksize=<blok boyutu>\n"
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1845
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\t%s kullanılıyor\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1590 misc/tune2fs.c:2949
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Geçerli süperblok bulunamadı.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:747
+#, fuzzy, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "- %s için biteşlemlerin okunması yinelenirken hata oluştu"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+
+#: misc/e2image.c:107
+#, fuzzy, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] device image-file\n"
+msgstr ""
+"Kullanımı: %s [-rsI] AYGIT DOSYA\n"
+"\n"
+"AYGIT üzerindeki ext2 dosya sisteminin kritik verilerini DOSYAya kaydeder.\n"
+"Örn: 4GB lık bir sistem için yaklaşık 3MB lık bir görüntü dosyası\n"
+"oluşturulur. Bu dosya, dosya sistemini kurtarmak için uzmanlarca\n"
+"kullanılabilir. Belli aralıklarla bu dosyanın başka bir dosya sistemine\n"
+"kaydedilmesi önerilir. -r seçeneği temel biçimli bir dosya üretir, çok "
+"büyük\n"
+"olacağından önerilmez. DOSYA yerine - verilirse dosya standart çıktıya\n"
+"yazılır.\n"
+
+#: misc/e2image.c:109
+#, fuzzy, c-format
+msgid " %s -I device image-file\n"
+msgstr ""
+"Kullanımı: %s [-rsI] AYGIT DOSYA\n"
+"\n"
+"AYGIT üzerindeki ext2 dosya sisteminin kritik verilerini DOSYAya kaydeder.\n"
+"Örn: 4GB lık bir sistem için yaklaşık 3MB lık bir görüntü dosyası\n"
+"oluşturulur. Bu dosya, dosya sistemini kurtarmak için uzmanlarca\n"
+"kullanılabilir. Belli aralıklarla bu dosyanın başka bir dosya sistemine\n"
+"kaydedilmesi önerilir. -r seçeneği temel biçimli bir dosya üretir, çok "
+"büyük\n"
+"olacağından önerilmez. DOSYA yerine - verilirse dosya standart çıktıya\n"
+"yazılır.\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid ""
+" %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+
+#: misc/e2image.c:175 misc/e2image.c:580 misc/e2image.c:586 misc/e2image.c:1185
+#, fuzzy
+msgid "while allocating buffer"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/e2image.c:180
+#, fuzzy, c-format
+msgid "Writing block %llu\n"
+msgstr "%lu ile %lu arasındaki bloklar denetleniyor\n"
+
+#: misc/e2image.c:194
+#, fuzzy, c-format
+msgid "error writing block %llu"
+msgstr "%lu bloğu yazılırken hata: %s. "
+
+#: misc/e2image.c:197
+msgid "error in generic_write()"
+msgstr ""
+
+#: misc/e2image.c:214
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:219
+msgid "Couldn't allocate header buffer\n"
+msgstr "Başlık için tampon bellek ayrılamadı\n"
+
+#: misc/e2image.c:247
+msgid "while writing superblock"
+msgstr "- süperbloğa yazılırken hata oluştu"
+
+#: misc/e2image.c:256
+msgid "while writing inode table"
+msgstr "- düğüm tablosuna yazılırken hata oluştu"
+
+#: misc/e2image.c:264
+msgid "while writing block bitmap"
+msgstr "- blok biteşlemi yazılırken hata oluştu"
+
+#: misc/e2image.c:272
+msgid "while writing inode bitmap"
+msgstr "- düğüm biteşlemi yazılırken hata oluştu"
+
+#: misc/e2image.c:506
+#, fuzzy, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Empty directory block %u (#%d) in inode %u\n"
+
+#: misc/e2image.c:518
+#, fuzzy, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Empty directory block %u (#%d) in inode %u\n"
+
+#: misc/e2image.c:559
+#, fuzzy, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%u düğüm, %u blok\n"
+
+#: misc/e2image.c:590 misc/e2image.c:630
+msgid "Copying "
+msgstr ""
+
+#: misc/e2image.c:627
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:653
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:665 misc/e2image.c:1195
+#, fuzzy, c-format
+msgid "error reading block %llu"
+msgstr "blok %lu okunurken hata oluÅŸtu (%s). "
+
+#: misc/e2image.c:719
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr ""
+
+#: misc/e2image.c:723
+#, c-format
+msgid "at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:759
+#, fuzzy
+msgid "while allocating l1 table"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/e2image.c:804
+#, fuzzy
+msgid "while allocating l2 cache"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/e2image.c:827
+msgid ""
+"Warning: There are still tables in the cache while putting the cache, data "
+"will be lost so the image may not be valid.\n"
+msgstr ""
+
+#: misc/e2image.c:1152
+#, fuzzy
+msgid "while allocating ext2_qcow2_image"
+msgstr "ext2fs_block_iterate işlevi çağrılırken hata oluştu"
+
+#: misc/e2image.c:1159
+#, fuzzy
+msgid "while initializing ext2_qcow2_image"
+msgstr "ext2fs_block_iterate işlevi çağrılırken hata oluştu"
+
+#: misc/e2image.c:1218 misc/e2image.c:1236
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1276
+#, fuzzy
+msgid "while allocating block bitmap"
+msgstr "- blok biteşlemi yazılırken hata oluştu"
+
+#: misc/e2image.c:1285
+#, fuzzy
+msgid "while allocating scramble block bitmap"
+msgstr "- blok biteşlemi yazılırken hata oluştu"
+
+#: misc/e2image.c:1292
+#, fuzzy
+msgid "Scanning inodes...\n"
+msgstr "Dosya indeksi tablosu taranıyor"
+
+#: misc/e2image.c:1304
+#, fuzzy
+msgid "Can't allocate block buffer"
+msgstr "Blok tamponu ayrılamadı (boyu=%d)\n"
+
+#: misc/e2image.c:1343 misc/e2image.c:1357
+#, fuzzy, c-format
+msgid "while iterating over inode %u"
+msgstr "sonraki düğüme geçilirken hata oluştu"
+
+#: misc/e2image.c:1389
+msgid "Raw and qcow2 images cannot be installed"
+msgstr ""
+
+#: misc/e2image.c:1411
+#, fuzzy
+msgid "error reading bitmaps"
+msgstr "- biteÅŸlemler okunurken hata oluÅŸtu"
+
+#: misc/e2image.c:1423
+#, fuzzy
+msgid "while opening device file"
+msgstr "düğüm taraması başlatılırken hata oluştu"
+
+#: misc/e2image.c:1434
+#, fuzzy
+msgid "while restoring the image table"
+msgstr "- düğüm tablosuna yazılırken hata oluştu"
+
+#: misc/e2image.c:1531
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1537
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1542
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1547
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1557
+#, fuzzy
+msgid "checking if mounted"
+msgstr " (sistem %ld kere bağlandığında denetle)"
+
+#: misc/e2image.c:1564
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+
+#: misc/e2image.c:1618
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1624
+msgid "Can not stat output\n"
+msgstr ""
+
+#: misc/e2image.c:1634
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr ""
+
+#: misc/e2image.c:1637
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr ""
+
+#: misc/e2image.c:1640
+#, fuzzy, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Ext3 günlüğü süperbloku bozuk.\n"
+
+#: misc/e2image.c:1644
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: misc/e2image.c:1654
+#, fuzzy
+msgid "The -c option only supported in raw mode\n"
+msgstr " -t seçeneği e2fsck'nın bu sürümünde desteklenmiyor.\n"
+
+#: misc/e2image.c:1659
+#, fuzzy
+msgid "The -c option not supported when writing to stdout\n"
+msgstr " -t seçeneği e2fsck'nın bu sürümünde desteklenmiyor.\n"
+
+#: misc/e2image.c:1666
+#, fuzzy
+msgid "while allocating check_buf"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/e2image.c:1672
+#, fuzzy
+msgid "The -p option only supported in raw mode\n"
+msgstr " -t seçeneği e2fsck'nın bu sürümünde desteklenmiyor.\n"
+
+#: misc/e2image.c:1682
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr ""
+
+#: misc/e2initrd_helper.c:68
+#, fuzzy, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Kullanımı: %s disk\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: %s açılamıyor\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: süperbloka erişilemiyor\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: süperblok okunurken hata oluştu\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: bir ext2 dosya sistemi deÄŸil\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3152
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Uyarı: etiket çok uzun, kırpılıyor.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: süperbloğa yine erişilemedi\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: süperbloğa yazılırken hata oluştu\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1733
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+" \n"
+"Kullanımı: e2label AYGIT [etiket]\n"
+"AYGIT bölüm ismini atamak/okumak için kullanılır.\n"
+"\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid ""
+"Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> "
+"<filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr ""
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr ""
+
+#: misc/e2undo.c:172
+#, fuzzy
+msgid "while reading filesystem superblock."
+msgstr "- günlük dosyası süperbloğu okunurken hata oluştu"
+
+#: misc/e2undo.c:188
+#, fuzzy
+msgid "while fetching superblock"
+msgstr "- süperbloğa yazılırken hata oluştu"
+
+#: misc/e2undo.c:201
+#, fuzzy, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#: misc/e2undo.c:340
+#, c-format
+msgid "illegal offset - %s"
+msgstr ""
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr ""
+
+#: misc/e2undo.c:373
+#, fuzzy, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "düğüm taraması başlatılırken hata oluştu"
+
+#: misc/e2undo.c:380
+#, fuzzy
+msgid "while reading undo file"
+msgstr "- kök düğümü okunurken hata oluştu"
+
+#: misc/e2undo.c:385
+#, fuzzy, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: aygıt sayısı çok fazla\n"
+
+#: misc/e2undo.c:396
+#, fuzzy, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#: misc/e2undo.c:403
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr ""
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr ""
+
+#: misc/e2undo.c:412
+#, fuzzy, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "blok uzunluğu hatalı - %s"
+
+#: misc/e2undo.c:425
+#, fuzzy, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr ""
+"Ext3 günlüğünün süper bloğu bilinmeyen uyumsuz özellikli bir bayrak "
+"içeriyor.\n"
+
+#: misc/e2undo.c:433
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "- %s'in bağlı olup olmadığı saptanmaya çalışılırken hata oluştu."
+
+#: misc/e2undo.c:439
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr ""
+
+#: misc/e2undo.c:455
+#, fuzzy, c-format
+msgid "while opening `%s'"
+msgstr "%s açılırken"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr ""
+
+#: misc/e2undo.c:507
+#, fuzzy
+msgid "while reading keys"
+msgstr "- biteÅŸlemler okunurken hata oluÅŸtu"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr ""
+
+#: misc/e2undo.c:552
+#, fuzzy, c-format
+msgid "%s: block %llu is too long."
+msgstr "Blok %lu dan %lu ya kadar\n"
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, fuzzy, c-format
+msgid "while fetching block %llu."
+msgstr "- süperblok ayarlanırken hata oluştu"
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr ""
+
+#: misc/e2undo.c:615
+#, fuzzy, c-format
+msgid "while writing block %llu."
+msgstr "- blok biteşlemi yazılırken hata oluştu"
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr ""
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr ""
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Kullanımı: findsuper aygıt [atlanacak_baytlar [başlangıç_kb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "atlanacak_baytlar bir sayı olmalı, %s değil\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "atlanacak_baytlar sektör boyunun katları olmalı\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "başlangıç_kb bir sayı olmalı, %s değil\n"
+
+#: misc/findsuper.c:175
+#, fuzzy, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "başlangıç_kb poritif olmalı, %Ld değil\n"
+
+#: misc/findsuper.c:186
+#, fuzzy, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "%Ld de başlayıp %d bayt arttırımla\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+
+#: misc/findsuper.c:190
+#, c-format
+msgid ""
+"byte_offset byte_start byte_end fs_blocks blksz grp mkfs/"
+"mount_time sb_uuid label\n"
+msgstr ""
+
+#: misc/findsuper.c:264
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%14Ld: %d hatası ile bitti\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "UYARI: %s açılamadı: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "UYARI: %2$s nin %1$d. satırında biçem hatası\n"
+
+#: misc/fsck.c:370
+#, fuzzy
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+" ***DİKKAT: /etc/fstab dosyanızda fsck geçiş sayısı (passno)\n"
+" alanı bulunmuyor. Bu seferlik işlem yapılacak,\n"
+" ancak en kısa zamanda /etc/fstab dosyanızı\n"
+" düzeltmelisiniz.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: yok\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: bekliyor: Başka ast süreç yok?!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Uyarı... %s %s aygıtı için %d sinyali ile çıktı.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: durum %x, asla olmamalıydı.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "%s ile bitti (çıkış durumu: %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Hata %d: fsck.%s %s için çalıtırılırken oluştu.\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"-t ile ister tüm dosya sistemi türleri belirtilsin ister bir dosya sistemi\n"
+"türü belirtilmesin, ya 'no' ya da '!' öneki kullanılmalıdır.\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+"%s: /etc/fstab içerisindeki bozuk satır atlanıyor: sıfır olmayan fsck geçiş "
+"sayısı ile bağlama ataması\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: %s denetlenemiyor: fsck.%s yok\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Tüm dosya sistemleri denetleniyor.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--beklemede-- (%d. geçiş)\n"
+
+#: misc/fsck.c:1085
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Kullanımı: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] "
+"[filesys ...]\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: aygıt sayısı çok fazla\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: argüman sayısı fazla\n"
+
+#: misc/fuse2fs.c:3739
+msgid "Mounting read-only.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3763
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3775 misc/fuse2fs.c:3789
+#, c-format
+msgid "%s: %s.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3776 misc/fuse2fs.c:3791 misc/tune2fs.c:3049
+#, fuzzy, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+"Lütfen önce 'e2fsck -f %s' komutunu çalıştırın.\n"
+"\n"
+
+#: misc/fuse2fs.c:3798
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3806
+#, fuzzy, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "'%s' dosya sistemi özelliğini temizleme desteklenmiyor.\n"
+
+#: misc/fuse2fs.c:3821
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3825
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3830
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3834
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr ""
+
+#: misc/fuse2fs.c:3838
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr ""
+
+#: misc/lsattr.c:75
+#, fuzzy, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr ""
+"Kullanımı: %s [-RVadv] [dosyalar...]\n"
+"\n"
+"Dosyaların özelliklerini listeler.\n"
+"\n"
+"Seçenekler:\n"
+" -a '.' ile başlayanlar dahil dizinlerin içindeki tüm dosyaları "
+"listeler\n"
+" -d dosyalar gibi dizinleri de listeler\n"
+" -R dizinler ve içerikleri ardışık olarak listelenir\n"
+" -V sürüm bilgileri gösterilir\n"
+" -v dosyaların sürüm/üretim numaralarını listeler\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "- %s üzerinde bayraklar okunurken hata oluştu"
+
+#: misc/lsattr.c:93
+#, fuzzy, c-format
+msgid "While reading project on %s"
+msgstr "- %s üzerinde sürüm okunurken hata oluştu"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "- %s üzerinde sürüm okunurken hata oluştu"
+
+#: misc/mke2fs.c:130
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z "
+"undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Kullanımı: %s [seçenekler] aygıt [blok-sayısı]\n"
+"\n"
+"Genellikle bir disk bölümü üzerinde bir ext2 dosya sistemi oluşturur.\n"
+"ext3 de desteklenmiÅŸtir.\n"
+"\n"
+"Seçenekler:\n"
+" -b 1024|2048|4096 dosya sisteminin blok uzunluÄŸu belirtilir\n"
+" -c salt-okunur kipte hatalı bloklar aranır\n"
+" -f adım-boyu bu sürümde adım boyu blok boyuna eşittir\n"
+" -g her-gruptaki-blok-sayısı\n"
+" -i düğüm-uzunluğu boş bir dizinin disk üzerinde kaplayabileceği\n"
+" en küçük alan, bayt cinsinden verilir.\n"
+" -j ext3 dosya sistemi için günlük dosyası "
+"oluÅŸturur\n"
+" -J ile günlük dosyasının özellikleri "
+"verilmezse\n"
+" dosya öntanımlı özelliklrele oluşturulur.\n"
+" DİKKAT: Linux çekirdeğinde ext3 desteği yoksa\n"
+" sistem ext2 olarak kullanılabilir\n"
+" -J günlük-seçenekleri günlük seçenekleri aşağıda verilmiştir\n"
+" -l DOSYA hatalı bloklar DOSYAdan okunur\n"
+" -L etiket dosya sistemine bir etiket atar\n"
+" -m yedek-blok-yüzdesi root kullanıcı için ayrılan yedek blokların\n"
+" yüzdesi. Öntanımlı değeri %%5 tir\n"
+" -M son-baÄŸlanan-dizin dosya sistemine son baÄŸlanan dizin belirtilir\n"
+" -N düğüm-sayısı sistemdeki toplam düğüm sayısı belirtilir\n"
+" -o işletim-sistemi dosya sisteminin 'creator os' alanına "
+"yazılacak\n"
+" deÄŸer. Normalde Linux'tur.\n"
+" -O özellik[,...] belirtilen özellikte dosya sistemi oluşturur.\n"
+" Özellikler aşağıda verilmiştir.\n"
+" -q işlem sırasında bilgi verilmez\n"
+" -r dosya-sistemi-sürümü 1.2 çekirdekler dışında öntanımlı değeri 1 dir\n"
+" -R raid_seçenekleri bu seçenekler için man sayfasına bakınız\n"
+" -S kurtarma amacıyla sadece süper blok ve grup\n"
+" tanımlayıcılar yeniden yazılır\n"
+" -v işlem sırasında ayrıntılı bilgi verilir\n"
+" -V sürüm bilgileri gösterilir ve çıkar\n"
+"Günlükleme seçenekleri:\n"
+" size=günlük-uzunluğu Günlük dosyasının uzunluğu MB olarak "
+"belirtilir\n"
+" device=dış-günlük-aygıtı Başka bir aygıt üzerindeki günlük dosyasının\n"
+" kullanılması sağlanır.\n"
+"\n"
+"Özellikler:\n"
+" sparse_super Yedek süperblokların sayısını sınırlamakta kullanılır.\n"
+" filetype Dizin kayıtlarında dosya türü bilgisi saklanır.\n"
+" has_journal -j seçeneği ile aynı. Bir ext3 günlük dosyası "
+"oluÅŸturur.\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Çalışan komut: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "- '%s' çalıştırılırken oldu"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "- hatalı bloklar listesi işlenirken hata oluştu"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Birincil süperblok/grup tanımı alanındaki blok %d hatalı\n"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"Bir dosya sistemi oluÅŸturulurken %u den %u ye kadar olan\n"
+"bloklar hatasız olmak zorundadır.\n"
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "Çıkılıyor...\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Uyarı: Blok %u deki yedek süperblok/grup tanımları\n"
+"\thatalı bloklar içeriyor.\n"
+"\n"
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "- hatalı bloklar kullanılmış olarak imlenirken hata oluştu"
+
+#: misc/mke2fs.c:368
+#, fuzzy
+msgid "while writing reserved inodes"
+msgstr "- günlük düğümü yazılırken hata oluştu"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Düğüm tabloları yazılıyor: "
+
+#: misc/mke2fs.c:442
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"%2$u de başlayan düğüm tablosundaki %1$d blok yazılamadı: %3$s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2726 misc/mke2fs.c:3131
+msgid "done \n"
+msgstr "bitti \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "- kök dizin oluşturulurken hata"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "- kök düğümü okunurken hata oluştu"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "- kök düğümünün sahibi belirlenirken hata oluştu"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "- /lost+found dizini oluÅŸturulurken hata oluÅŸtu"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "- /lost+found dizine bakılırken hata oluştu"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "- /lost+found dizini geniÅŸletilirken hata oluÅŸtu"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "- hatalı blok düğümü belirlenirken hata oluştu"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "%d-%d arasındaki sektörler silinirken bellek yetmedi\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Uyarı: blok 0 okunamadı: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Uyarı: %d. sektör silinemedi: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "- gümlük superbloğu ilklendirilirken hata oluştu"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "Günlük aygıtı temizleniyor: "
+
+#: misc/mke2fs.c:632
+#, fuzzy, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "- günlük aygıtı temizlenirken (blok %u, %d blok) hata oluştu"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "- günlük süperbloğu yazılırken hata oluştu"
+
+#: misc/mke2fs.c:665
+#, fuzzy, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr ""
+"%s üzerindeki dosya sistemi şimdi %u blok uzunlukta.\n"
+"\n"
+
+#: misc/mke2fs.c:673
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"uyarı: %u blok kullanılmamış.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Dosya sistemi ismi = %s\n"
+
+#: misc/mke2fs.c:681
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "İşl. Sist. türü: "
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blok boyu = %u (günlük kaydı = %u)\n"
+
+#: misc/mke2fs.c:686
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Blok boyu = %u (günlük kaydı = %u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Adımlama boyu = %u (günlük kaydı = %u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:694
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u düğüm, %u blok\n"
+
+#: misc/mke2fs.c:696
+#, fuzzy, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%u blok (%%%2.2f) süper kullanıcı için ayrıldı\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Ä°lk veri bloÄŸu = %u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Azami dosyasistemi bloğu sayısı = %lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blok grubu\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blok grubu\n"
+
+#: misc/mke2fs.c:711
+#, fuzzy, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "Grup başına %u blok ve %u sekme\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "Grup başına %u blok ve %u sekme\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "grup başına %u düğüm\n"
+
+#: misc/mke2fs.c:725
+#, fuzzy, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Dosya sistemi ismi = %s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#: misc/mke2fs.c:820
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+
+#: misc/mke2fs.c:826
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:839
+#, fuzzy, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:853
+#, fuzzy, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:865
+#, fuzzy, c-format
+msgid "Invalid offset: %s\n"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:879 misc/tune2fs.c:2101
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "sınama şablonu geçersiz: %s\n"
+
+#: misc/mke2fs.c:896
+#, fuzzy, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Geçersiz süper blok parametresi: %s\n"
+
+#: misc/mke2fs.c:918
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "'stride' parametresi geçersiz: %s\n"
+
+#: misc/mke2fs.c:933
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Geçersiz çizgi genişlik parametresi: %s\n"
+
+#: misc/mke2fs.c:956
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Yeniden boyutlama parametresi geçersiz: %s\n"
+
+#: misc/mke2fs.c:963
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+"Azami yeniden boyutlama değeri dosya sistemi boyutundan büyük olmalıdır.\n"
+
+#: misc/mke2fs.c:987
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+"Satırda boyutlandırma, 0. gözden geçirmedeki dosya sistemlerinde "
+"desteklenmemektedir\n"
+
+#: misc/mke2fs.c:1013 misc/mke2fs.c:1022
+#, fuzzy, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Geçersiz dosya sistemi seçeneği belirtidi: %s\n"
+
+#: misc/mke2fs.c:1065
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Belirtilen seçenekler hatalı.\n"
+"\n"
+"Ek seçenekler virgüllerle ayrılarak belirtilir. Bir seçeneğe değer\n"
+"belirtilecekse bu '=' işaretinden sonra yazılır.\n"
+"\n"
+"Geçerli ek seçenekler:\n"
+"\tstride=<blok cinsinden adım uzunluğu>\n"
+"\tresize=<yeniden boyutlanacağı blok sayısı>\n"
+"\n"
+
+#: misc/mke2fs.c:1090
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1135
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"mke2fs yapılandırma dosyasında (%s, %d.satırda) sözdizimi hatası\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1148 misc/tune2fs.c:1120
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Geçersiz dosya sistemi seçeneği: %s\n"
+
+#: misc/mke2fs.c:1160 misc/tune2fs.c:411
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Geçersiz dosya sistemi seçeneği belirtidi: %s\n"
+
+#: misc/mke2fs.c:1296
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1300
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1304
+#, fuzzy
+msgid "Aborting...\n"
+msgstr "Çıkılıyor...\n"
+
+#: misc/mke2fs.c:1345
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1527
+#, fuzzy
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#: misc/mke2fs.c:1564
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1597
+#, c-format
+msgid "invalid block size - %s"
+msgstr "blok uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:1601
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Uyarı: blok uzunluğu %d birçok sistemde kullanımdışıdır.\n"
+
+#: misc/mke2fs.c:1617
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "blok uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:1630
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1644 misc/tune2fs.c:1830
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "hata davranışı hatalı - %s"
+
+#: misc/mke2fs.c:1656
+msgid "Illegal number for blocks per group"
+msgstr "Grup başına blok sayısı kuraldışı"
+
+#: misc/mke2fs.c:1661
+msgid "blocks per group must be multiple of 8"
+msgstr "grup başına blok sayısı 8'in katları olmalıdır"
+
+#: misc/mke2fs.c:1669
+#, fuzzy
+msgid "Illegal number for flex_bg size"
+msgstr "Grup başına blok sayısı kuraldışı"
+
+#: misc/mke2fs.c:1675
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1680
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr ""
+
+#: misc/mke2fs.c:1690
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "düğüm oranı %s hatalı (en az %d/en çok %d)"
+
+#: misc/mke2fs.c:1700
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:1713
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1724
+msgid "in malloc for bad_blocks_filename"
+msgstr "- bad_blocks_filename için bellek ayrılırken"
+
+#: misc/mke2fs.c:1733
+#, fuzzy, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Uyarı: etiket çok uzun, kırpılıyor.\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "yedek blok yüzdesi hatalı - %s"
+
+#: misc/mke2fs.c:1757
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "düğüm sayısı hatalı - %s"
+
+#: misc/mke2fs.c:1770
+#, fuzzy
+msgid "while allocating fs_feature string"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/mke2fs.c:1787
+#, c-format
+msgid "bad revision level - %s"
+msgstr "değişiklik seviyesi hatalı - %s"
+
+#: misc/mke2fs.c:1792
+#, fuzzy, c-format
+msgid "while trying to create revision %d"
+msgstr ""
+"\n"
+"\tgünlük oluşturulmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:1806
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o yalnız bir kere kullanılabilir"
+
+#: misc/mke2fs.c:1814
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o yalnız bir kere kullanılabilir"
+
+#: misc/mke2fs.c:1870 misc/mke2fs.c:3215
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "- %s günlük aygıtı açılmaya çalışılırken hata\n"
+
+#: misc/mke2fs.c:1876
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Günlük aygıtının blok boyu (%d) asgari blok boyundan (%d) küçük\n"
+
+#: misc/mke2fs.c:1882
+#, fuzzy, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "%s'e günlük ekleniyor: "
+
+#: misc/mke2fs.c:1893
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "blok sayısı hatalı - %s"
+
+#: misc/mke2fs.c:1923
+msgid "filesystem"
+msgstr "dosya sistemi"
+
+#: misc/mke2fs.c:1941 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "- dosya sistemi uzunluğu saptanmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:1947
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Aygıt alanı saptanamadı; dosya sistemi için\n"
+"bir uzunluk belirtmelisiniz\n"
+
+#: misc/mke2fs.c:1954
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Aygıttaki alan sıfır olarak raporlandı. Ya değiştirilen bir disk bölümü\n"
+"hala meşgul veya kullanımda olduğundan fdisk çalıştırıldıktan sonra\n"
+"disk bölümleme tablosu yeniden okunamadı ya da yanlış bölüm belirtildi.\n"
+"Disk bölümleme tablosunun yeniden okunması için sisteminizi yeniden\n"
+"başlatmalısınız.\n"
+
+#: misc/mke2fs.c:1971
+msgid "Filesystem larger than apparent device size."
+msgstr "Dosya sisteminin uzunluğu görünürdeki uzunluktan büyük."
+
+#: misc/mke2fs.c:1991
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:2040
+#, fuzzy
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#: misc/mke2fs.c:2045
+#, fuzzy
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#: misc/mke2fs.c:2050
+#, fuzzy
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#: misc/mke2fs.c:2055
+#, fuzzy
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#: misc/mke2fs.c:2065
+msgid "while trying to determine hardware sector size"
+msgstr "- donanımsal sektör boyu saptanmaya çalışılırken"
+
+#: misc/mke2fs.c:2071
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "- donanımsal sektör boyu saptanmaya çalışılırken"
+
+#: misc/mke2fs.c:2103
+#, fuzzy
+msgid "while setting blocksize; too small for device\n"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: misc/mke2fs.c:2108
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:2132
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2144
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2166
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:2173
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"Dosyasistemi özellikleri 0 revizyonlu dosyasistemlerinde desteklenmiyor\n"
+
+#: misc/mke2fs.c:2181
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2191
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:2204
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "yedek blok yüzdesi hatalı - %s"
+
+#: misc/mke2fs.c:2221
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2241
+#, fuzzy
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+"Azami yeniden boyutlama değeri dosya sistemi boyutundan büyük olmalıdır.\n"
+
+#: misc/mke2fs.c:2247
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:2267
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:2270
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2272
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2293
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d baytlık bloklar sistem için çok büyük (en çok %d)"
+
+#: misc/mke2fs.c:2297
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Uyarı: %d baytlık bloklar sistem için çok büyük (en çok %d), ama devam "
+"ediliyor\n"
+
+#: misc/mke2fs.c:2305
+#, c-format
+msgid ""
+"Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
+"and journal checksum features.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2360
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr ""
+
+#: misc/mke2fs.c:2397
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2404
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2412
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2424
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"süperblok azaltması uygulanmamış dosya sisteminde\n"
+"yedek bloklar kullanılarak yeniden boyutlama desteklenmiyor."
+
+#: misc/mke2fs.c:2433
+msgid "blocks per group count out of range"
+msgstr "Grup başına blok sayısı kapsamdışı"
+
+#: misc/mke2fs.c:2455
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2467
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "düğüm uzunluğu %d hatalı (en az %d/en çok %d)"
+
+#: misc/mke2fs.c:2482
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr ""
+
+#: misc/mke2fs.c:2497
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2518
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+
+#: misc/mke2fs.c:2705
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2721
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2780
+#, fuzzy
+msgid "while initializing quota context"
+msgstr "- gümlük superbloğu ilklendirilirken hata oluştu"
+
+#: misc/mke2fs.c:2787
+#, fuzzy
+msgid "while writing quota inodes"
+msgstr "- günlük düğümü yazılırken hata oluştu"
+
+#: misc/mke2fs.c:2812
+#, fuzzy, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "hata davranışı hatalı - %s"
+
+#: misc/mke2fs.c:2888
+#, fuzzy
+msgid "in malloc for android_sparse_params"
+msgstr "- bad_blocks_filename için bellek ayrılırken"
+
+#: misc/mke2fs.c:2902
+msgid "while setting up superblock"
+msgstr "- süperblok ayarlanırken hata oluştu"
+
+#: misc/mke2fs.c:2918
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Pass -O extents to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2925
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2933
+#, fuzzy
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#: misc/mke2fs.c:2957
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:3056
+#, c-format
+msgid "unknown os - %s"
+msgstr "bilinmeyen iÅŸletim sistemi - %s"
+
+#: misc/mke2fs.c:3119
+#, fuzzy
+msgid "Allocating group tables: "
+msgstr "Düğüm tabloları yazılıyor: "
+
+#: misc/mke2fs.c:3127
+msgid "while trying to allocate filesystem tables"
+msgstr "- dosya sistemi tabloları ayrılmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:3136
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "- blok biteşlemi yazılırken hata oluştu"
+
+#: misc/mke2fs.c:3142
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr ""
+
+#: misc/mke2fs.c:3183
+#, fuzzy, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "- dosya sisteminin sonunda blok %u sıfırlanırken hata oluştu"
+
+#: misc/mke2fs.c:3196
+msgid "while reserving blocks for online resize"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: misc/mke2fs.c:3208 misc/tune2fs.c:1538
+msgid "journal"
+msgstr "günlük"
+
+#: misc/mke2fs.c:3220
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "%s'e günlük ekleniyor: "
+
+#: misc/mke2fs.c:3227
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tgünlük %s e eklenmeye çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:3232 misc/mke2fs.c:3261 misc/mke2fs.c:3299
+#: misc/mk_hugefiles.c:598 misc/tune2fs.c:1567 misc/tune2fs.c:1586
+msgid "done\n"
+msgstr "tamam\n"
+
+#: misc/mke2fs.c:3238
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:3248
+#, fuzzy, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Günlük oluşturuluyor (%d blok): "
+
+#: misc/mke2fs.c:3257
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tgünlük oluşturulmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:3269 misc/tune2fs.c:1185
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:3274
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:3290
+msgid "Copying files into the device: "
+msgstr ""
+
+#: misc/mke2fs.c:3296
+#, fuzzy
+msgid "while populating file system"
+msgstr "Tüm dosya sistemleri denetleniyor.\n"
+
+#: misc/mke2fs.c:3303
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Süperblokların ve dosya sisteminin hesap bilgileri yazılıyor: "
+
+#: misc/mke2fs.c:3310
+#, fuzzy
+msgid "while writing out and closing file system"
+msgstr "- dosya sisteminin sonunda blok %u sıfırlanırken hata oluştu"
+
+#: misc/mke2fs.c:3313
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"bitti\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, fuzzy, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "- dosya sisteminin sonunda blok %u sıfırlanırken hata oluştu"
+
+#: misc/mk_hugefiles.c:514
+#, c-format
+msgid ""
+"Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:581
+msgid "Huge files will be zero'ed\n"
+msgstr ""
+
+#: misc/mk_hugefiles.c:582
+#, fuzzy, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Günlük oluşturuluyor (%d blok): "
+
+#: misc/mk_hugefiles.c:584
+#, fuzzy, c-format
+msgid "with %llu blocks each"
+msgstr ""
+"uyarı: %u blok kullanılmamış.\n"
+"\n"
+
+#: misc/mk_hugefiles.c:593
+#, fuzzy, c-format
+msgid "while creating huge file %lu"
+msgstr "- kök dizin oluşturulurken hata"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Kullanımı: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, fuzzy, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Kullanımı: %s <aygıt1> <aygıt2> <aygıt3>\n"
+"\n"
+"Bir aygıt kümesi için disk bölümleme bilgilerini gösterir\n"
+"Bu uygulamanın çok kullanılan biçimi:\n"
+"\n"
+"\t%s /dev/hda?\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, fuzzy, c-format
+msgid "Cannot open %s: %s"
+msgstr "e2label: %s açılamıyor\n"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:121
+#, fuzzy
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Lütfen dosya sisteminde e2fsck çalıştırın.\n"
+
+#: misc/tune2fs.c:123
+#, fuzzy
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Lütfen dosya sisteminde e2fsck çalıştırın.\n"
+
+#: misc/tune2fs.c:136
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Kullanımı: %s [seçenekler] aygıt\n"
+"\n"
+"Dosya sisteminin ayarlanabilir parametrelerini değiştirmekte kullanılır.\n"
+"\n"
+"Seçenekler:\n"
+" -c SAYI İki dosyasistemi denetimi arasında dosya "
+"sisteminin\n"
+" en çok kaç defa bağlanabileceği belirtilir.\n"
+" -C SAYI -c ile aynı\n"
+" -e hata-davranışı Hata oluştuğunda ne yapılacağı belirtilir.\n"
+" 'continue': hata yoksayılır. 'remount-ro': dosya\n"
+" sistemi salt-okunur olarak bağlanır. 'panic':\n"
+" çekirdek paniği oluşur.\n"
+" -g grup Yedek blokların hangi kullanıcı grubuna "
+"ayrılacağı\n"
+" belirtilir. Grup ismi ya da numarası verilebilir.\n"
+" -u kullanıcı Yedek blokların hangi kullanıcıya ayrılacağı\n"
+" belirtilir. Kull. ismi ya da numarası "
+"verilebilir.\n"
+" -i süre[d|m|w] İki denetim arasındaki en büyük süre belirtilir.\n"
+" Gün(d), ay(m), hafta(w) olarak verilebilir. 0 ile\n"
+" zamana bağlı denetim ayarı kaldırılır.\n"
+" -j Dosya sistemine günlük dosyası eklenir. -J\n"
+" seçeneği ile seçenekler belirtilmezse dosya\n"
+" öntanımlı özelliklerle oluşturulur.\n"
+" -J seçenek[,...] Aşağıda açıklamaları verilen seçenekler burada\n"
+" virgüllerle ayrılarak verilebilir.\n"
+" -l Dosya sisteminin özellikleri listelenir.\n"
+" -L etiket Dosya sisteminin bölüm ismi belirtilir.\n"
+" -m yedek-blok-yüzdesi Yedek blokların yüzdesi belirtilir. Öntanımlı %%5\n"
+" -M DÄ°ZÄ°N Dosya sistemine son baÄŸlanan dizin belirtilir.\n"
+" -o [^]seçenek[,...] Bağlama seçenekleri\n"
+" -O [^]özellik[,...] Aşağıda açıklamaları verilen özellikler burada\n"
+" virgüllerle ayrılarak verilebilir.\n"
+" -r yedek-blok-sayısı Yedek blokların sayısı belirtilir.\n"
+" -s [0|1] Çok büyük dosya sistemlerinde yer kazandırır.\n"
+" -O sparse_super ile aynıdır.\n"
+" -T son-denetim-zamanı Betiklerle kullanmak içindir\n"
+" -U UUID|clear|random|time\n"
+" Dosya sisteminin evrensel tek kimliÄŸi veya (UUID)\n"
+" hangi yöntemle belirleneceği belirtilir.'clear' "
+"ile\n"
+" silinir; 'random' rasgele, 'time' zamana göre bir\n"
+" kimlik üretir.\n"
+"\n"
+"Günlükleme seçenekleri:\n"
+" size=günlük-uzunluğu Günlük dosyasının uzunluğu MB olarak "
+"belirtilir\n"
+" device=dış-günlük-aygıtı Başka bir aygıt üzerindeki günlük dosyasının\n"
+" kullanılması sağlanır.\n"
+"\n"
+"Özellikler:\n"
+"'^' öneki ile verilen özellikler süperbloğa eskiler kaldırılarak yazılır.\n"
+"'+' önekiyle ya da öneksiz verilen özellikler süperbloktaki özelliklere\n"
+"eklenir.\n"
+" sparse_super Yedek süperblokların sayısını sınırlamakta kullanılır.\n"
+" filetype Dizin kayıtlarında dosya türü bilgisi saklanır.\n"
+" has_journal -j seçeneği ile aynı. Bir ext3 günlük dosyası "
+"oluÅŸturur.\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "Günlük süperbloğu yok!\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "- dış günlük açılmaya çalışılırken hata oluştu"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2845
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s bir günlükleme aygıtı değil.\n"
+
+#: misc/tune2fs.c:297 misc/tune2fs.c:2856
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+"Günlükleme aygıtında dosya sisteminin evrensel tek kimliği (UUID) yok.\n"
+
+#: misc/tune2fs.c:321
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:330
+msgid "Journal removed\n"
+msgstr "Günlük silindi\n"
+
+#: misc/tune2fs.c:374
+msgid "while reading bitmaps"
+msgstr "- biteÅŸlemler okunurken hata oluÅŸtu"
+
+#: misc/tune2fs.c:382
+msgid "while clearing journal inode"
+msgstr "- günlük düğümü temizlenirken hata oluştu"
+
+#: misc/tune2fs.c:393
+msgid "while writing journal inode"
+msgstr "- günlük düğümü yazılırken hata oluştu"
+
+#: misc/tune2fs.c:429 misc/tune2fs.c:452 misc/tune2fs.c:465
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:480
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr ""
+
+#: misc/tune2fs.c:483
+#, fuzzy, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "resize2fs %s (%s)\n"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid " -z \"%s\""
+msgstr ""
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1087
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1123
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "'%s' dosya sistemi özelliğini temizleme desteklenmiyor.\n"
+
+#: misc/tune2fs.c:1129
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1138
+#, fuzzy
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"has_journal bayrağı sadece dosya sistemi bağlı değilken ya da salt-okunur\n"
+"bağlıyken temizlenebilir.\n"
+
+#: misc/tune2fs.c:1146
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"needs_recovery bayrağı gerekiyor. Lütfen has_journal bayrağı\n"
+"temizlenmeden önce e2fsck çalıştırın.\n"
+
+#: misc/tune2fs.c:1164
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1177
+#, fuzzy
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"has_journal bayrağı sadece dosya sistemi bağlı değilken ya da salt-okunur\n"
+"bağlıyken temizlenebilir.\n"
+
+#: misc/tune2fs.c:1195
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1204
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1212
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "- biteÅŸlemler okunurken hata oluÅŸtu"
+
+#: misc/tune2fs.c:1221
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:1226
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "- hatalı bloklar düğümü okunmaya çalışılırken hata oluştu"
+
+#: misc/tune2fs.c:1258
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1269
+#, fuzzy
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"has_journal bayrağı sadece dosya sistemi bağlı değilken ya da salt-okunur\n"
+"bağlıyken temizlenebilir.\n"
+
+#: misc/tune2fs.c:1280
+msgid "Enabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1282
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1288
+msgid ""
+"Extents are not enabled. The file extent tree can be checksummed, whereas "
+"block maps cannot. Not enabling extents reduces the coverage of metadata "
+"checksumming. Re-run with -O extent to rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1295
+msgid ""
+"64-bit filesystem support is not enabled. The larger fields afforded by "
+"this feature enable full-strength checksumming. Run resize2fs -b to "
+"rectify.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1321
+msgid "Disabling checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1323
+#, fuzzy
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "%s bağlı; bağlı bir dosya sistemi yeniden boyutlandırılamaz!\n"
+
+#: misc/tune2fs.c:1386
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1396
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr ""
+
+#: misc/tune2fs.c:1426
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1447
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1465
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1483
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be "
+"unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1489
+msgid "Recalculating checksums could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:1531
+msgid "The filesystem already has a journal.\n"
+msgstr "Dosya sisteminde bir günlük dosyası zaten var.\n"
+
+#: misc/tune2fs.c:1551
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\t%s üzerindeki günlük açılmaya çalışılırken hata oluştu\n"
+
+#: misc/tune2fs.c:1555
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "%s üzerinde günlük dosyası oluşturuluyor: "
+
+#: misc/tune2fs.c:1563
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "- %s üzerindeki günlük dosyasına dosya sistemi eklenirken hata oluştu"
+
+#: misc/tune2fs.c:1569
+msgid "Creating journal inode: "
+msgstr "Günlük düğümü oluşturuluyor: "
+
+#: misc/tune2fs.c:1583
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tgünlük dosyası oluşturulmaya çalışılırken hata oluştu"
+
+#: misc/tune2fs.c:1621
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr ""
+
+#: misc/tune2fs.c:1634
+#, fuzzy
+msgid "while initializing quota context in support library"
+msgstr "- gümlük superbloğu ilklendirilirken hata oluştu"
+
+#: misc/tune2fs.c:1649
+#, fuzzy, c-format
+msgid "while updating quota limits (%d)"
+msgstr "- hatalı bloklar düğümü güncellenirken hata oluştu"
+
+#: misc/tune2fs.c:1657
+#, fuzzy, c-format
+msgid "while writing quota file (%d)"
+msgstr "- düğüm tablosu yazılırken hata oluştu (grup %d)"
+
+#: misc/tune2fs.c:1675
+#, fuzzy, c-format
+msgid "while removing quota file (%d)"
+msgstr "- düğüm tablosu okunurken hata oluştu (grup %d)"
+
+#: misc/tune2fs.c:1718
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1776
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Tarih/zaman belirteci çözümlenemedi: %s"
+
+#: misc/tune2fs.c:1801 misc/tune2fs.c:1814
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "bağlama sayısı hatalı - %s"
+
+#: misc/tune2fs.c:1857
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "grup ismi/numarası hatalı -%s"
+
+#: misc/tune2fs.c:1890
+#, c-format
+msgid "bad interval - %s"
+msgstr "süre hatalı - %s"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "yedek blok oranı hatalı - %s"
+
+#: misc/tune2fs.c:1934
+msgid "-o may only be specified once"
+msgstr "-o yalnız bir kere kullanılabilir"
+
+#: misc/tune2fs.c:1943
+msgid "-O may only be specified once"
+msgstr "-O yalnız bir kere kullanılabilir"
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "yedek blok sayısı hatalı - %s"
+
+#: misc/tune2fs.c:1989
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "kullanıcı ismi/numarası hatalı - %s"
+
+#: misc/tune2fs.c:2006
+#, fuzzy, c-format
+msgid "bad inode size - %s"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/tune2fs.c:2013
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:2110
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2115
+#, fuzzy, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural ""
+"Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "En fazla bağlama sayısı %d olarak belirleniyor\n"
+msgstr[1] "En fazla bağlama sayısı %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:2138
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2153
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2168
+#, fuzzy, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "'stride' parametresi geçersiz: %s\n"
+
+#: misc/tune2fs.c:2174
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2193
+#, fuzzy
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+"\n"
+"Belirtilen seçenekler hatalı.\n"
+"\n"
+"Ek seçenekler virgüllerle ayrılarak belirtilir. Bir seçeneğe değer\n"
+"belirtilecekse bu '=' işaretinden sonra yazılır.\n"
+"\n"
+"Geçerli ek seçenekler:\n"
+"\tstride=<blok cinsinden adım uzunluğu>\n"
+"\tresize=<yeniden boyutlanacağı blok sayısı>\n"
+"\n"
+
+#: misc/tune2fs.c:2663
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "- biteÅŸlemler okunurken hata oluÅŸtu"
+
+#: misc/tune2fs.c:2668
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "düğüm ve blok biteşlemleri okunuyor"
+
+#: misc/tune2fs.c:2685 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr "taşınacak bloklar"
+
+#: misc/tune2fs.c:2688
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2694
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:2699
+#, fuzzy
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: misc/tune2fs.c:2731
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:2936
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2943
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:2955
+#, fuzzy
+msgid "Cannot modify a journal device.\n"
+msgstr "%s bir günlükleme aygıtı değil.\n"
+
+#: misc/tune2fs.c:2968
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2975
+#, fuzzy
+msgid "Shrinking inode size is not supported\n"
+msgstr "'%s' dosya sistemi özelliğini temizleme desteklenmiyor.\n"
+
+#: misc/tune2fs.c:2980
+#, fuzzy, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "düğüm uzunluğu %d hatalı (en az %d/en çok %d)"
+
+#: misc/tune2fs.c:2986
+msgid "Resizing inodes could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3045
+#, fuzzy, c-format
+msgid "Recovering journal.\n"
+msgstr "%s: günlük dosyasına göre kurtarılıyor\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "En fazla bağlama sayısı %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Şimdiki bağlama sayısı %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3074
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Hata davranışı %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3079
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Yedek blokların grup numarası %lu olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3084
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Denetimler arasındaki süre %lu saniye olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3091
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Denetimler arasındaki süre %lu saniye olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3098
+#, fuzzy, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Yedek blokların yüzdesi %%%g (%u blok) olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3104
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "yedek ayrılmış blok sayısı çok büyük (%lu)"
+
+#: misc/tune2fs.c:3111
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Yedek blok sayısı %lu olarak belirleniyor\n"
+
+#: misc/tune2fs.c:3116
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Dosya sistemindeki süperbloklar zaten azaltılmış.\n"
+
+#: misc/tune2fs.c:3119
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3129
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Süperblok azaltma bayrağı konuldu. %s"
+
+#: misc/tune2fs.c:3134
+#, fuzzy
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr "'%s' dosya sistemi özelliğini temizleme desteklenmiyor.\n"
+
+#: misc/tune2fs.c:3142
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Dosya sisteminin son denetim zamanı %s yapılıyor\n"
+
+#: misc/tune2fs.c:3148
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Ayrılan blokların kullanıcı numarası %lu olarak ayarlanıyor\n"
+
+#: misc/tune2fs.c:3180
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:3198
+#, fuzzy
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"has_journal bayrağı sadece dosya sistemi bağlı değilken ya da salt-okunur\n"
+"bağlıyken temizlenebilir.\n"
+
+#: misc/tune2fs.c:3222
+#, fuzzy
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"has_journal bayrağı sadece dosya sistemi bağlı değilken ya da salt-okunur\n"
+"bağlıyken temizlenebilir.\n"
+
+#: misc/tune2fs.c:3225
+msgid ""
+"If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' "
+"and re-run this command.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3234
+msgid "Setting UUID on a checksummed filesystem could take some time."
+msgstr ""
+
+#: misc/tune2fs.c:3259
+msgid "Invalid UUID format\n"
+msgstr "Geçersiz UUID biçemi\n"
+
+#: misc/tune2fs.c:3275
+#, fuzzy
+msgid "Need to update journal superblock.\n"
+msgstr "günlük dosyası super bloğu okunuyor\n"
+
+#: misc/tune2fs.c:3301
+#, fuzzy
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"has_journal bayrağı sadece dosya sistemi bağlı değilken ya da salt-okunur\n"
+"bağlıyken temizlenebilir.\n"
+
+#: misc/tune2fs.c:3308
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:3326
+#, fuzzy, c-format
+msgid "Setting inode size %lu\n"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/tune2fs.c:3330
+#, fuzzy
+msgid "Failed to change inode size\n"
+msgstr "- düğüm taraması başlatılırken hata oluştu"
+
+#: misc/tune2fs.c:3344
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3349
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:3356
+#, fuzzy, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Şimdiki bağlama sayısı %d olarak belirleniyor\n"
+
+#: misc/util.c:100
+msgid "<proceeding>\n"
+msgstr ""
+
+#: misc/util.c:104
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr ""
+
+#: misc/util.c:108
+#, fuzzy
+msgid "Proceed anyway? (y,N) "
+msgstr "Yine de devam edilsin mi? (e/h) "
+
+#: misc/util.c:133
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs n'olursa olsun çalıştırılacak. İnşallah /etc/mtab yanlıştır.\n"
+
+#: misc/util.c:138
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "burada bir %s yapılmayacak!\n"
+
+#: misc/util.c:145
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs ne olursa olsun çalıştırılacak.\n"
+
+#: misc/util.c:161
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Günlük seçenekleri için bellek ayrılamadı!\n"
+
+#: misc/util.c:186
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr "Günlük dosyası süperbloğu tanım numarası bulunamadı"
+
+#: misc/util.c:213
+#, fuzzy
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Günlük seçenekleri hatalı belirtilmiş.\n"
+"\n"
+"Günlük seçenekleri 'isim=değer' çiftleri halinde\n"
+"virgüllerle ayrılarak verilir.\n"
+"\n"
+"Geçerli günlükleme seçenekleri:\n"
+"\tsize=<MB olarak günlük uzunluğu>\n"
+"\tdevice=<günlük dosyasının bulunacağı aygıt>\n"
+"\n"
+"Günlük dosyasının uzunluğu 1024 ile 102400 blok arasında seçilebilir.\n"
+"\n"
+
+#: misc/util.c:244
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Dosya sistemi bir günlük için çok küçük\n"
+
+#: misc/util.c:251
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:259
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Günlük dosyası dosya sistemi için çok büyük.\n"
+
+#: misc/util.c:273
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Bu dosya sistemi her %d bağlamada bir ya da %g günde bir, hangisi önce\n"
+"gerçekleşirse, otomatik olarak denetlenecektir. Bu değerleri değiştirmek\n"
+"için tune2fs'yi -c veya -i seçeneği ile çalıştırınız.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:155
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: argüman sayısı fazla\n"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:279
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Tarih/zaman belirteci çözümlenemedi: %s"
+
+#: misc/uuidd.c:308
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "ext2 süperbloğu bulunamadı,"
+
+#: misc/uuidd.c:316
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "%i ye tekrar bağlanılamıyor: %m\n"
+
+#: misc/uuidd.c:354
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Düğüm %i okunurken hata oluştu: %m\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:433
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ek özellik sürümü geçersiz.\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "/lost+found dizini oluÅŸturulurken hata (%s): %m\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr ""
+"Kullanımı: %s [seçenek]\n"
+"Evrendeki tek tanımlayıcıyı (UUID) oluşturur.\n"
+"\n"
+"Seçenekler:\n"
+" -r rasgele sayı üreteci kullanılarak rasgele bir numara üretilir\n"
+" -t varsa eternet kartının adresi ve sistem zamanına göre bir\n"
+" numara üretir\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "# Ek döküm:\n"
+
+#: resize/extent.c:203
+#, fuzzy, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNum = %d, Boy = %d, İmleç = %d, Sıralı = %d\n"
+
+#: resize/main.c:49
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] "
+"[-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Kullanımı: %s [seçenekler] aygıt [yeni-boyut]\n"
+"\n"
+"Dosya sistemini yeniden boyutlandırır.\n"
+"\n"
+"Seçenekler:\n"
+" -d bayraklar hata ayıklama seçeneği ile derlenmişse hata ayıklama\n"
+" seviyeleri belirtilir\n"
+" -f bazı güvenlik denetimlerini engelleyerek boyutlandırmaya\n"
+" zorlar\n"
+" -F başlamadan önce dosya sisteminin tampon belleklerini\n"
+" boşaltır\n"
+" -p işlem ilerleyişini gösteren bir çubuk üretir\n"
+"\n"
+"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Dosya indeksi tablosu geniÅŸletiliyor"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Bloklar yeniden konumlandırılıyor"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Dosya indeksi tablosu taranıyor"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Dosya indeksi başvuruları güncelleniyor"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Dosya indeksi tablosu taşınıyor"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "bilinmeyen geçiş?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Geçiş %d başlıyor (en çok = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr "%s açılırken"
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "%s için durum bilgisi alınırken"
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Lütfen önce 'e2fsck -f %s' komutunu çalıştırın.\n"
+"\n"
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:507
+#, fuzzy, c-format
+msgid "Invalid new size: %s\n"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:534
+#, fuzzy, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Günlük aygıtının blok boyu (%d) asgari blok boyundan (%d) küçük\n"
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:564
+#, fuzzy, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Disk bölümü (ya da aygıt) sadece %u (%dk) blok içeriyor.\n"
+"Siz ise %u blokluk bir boyut istediniz.\n"
+"\n"
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr ""
+
+#: resize/main.c:575
+#, c-format
+msgid ""
+"Cannot change the 64bit feature on a filesystem that is larger than 2^32 "
+"blocks.\n"
+msgstr ""
+
+#: resize/main.c:581
+#, fuzzy, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr ""
+"has_journal bayrağı sadece dosya sistemi bağlı değilken ya da salt-okunur\n"
+"bağlıyken temizlenebilir.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid ""
+"Please enable the extents feature with tune2fs before enabling the 64bit "
+"feature.\n"
+msgstr ""
+
+#: resize/main.c:593
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Dosya sistemi zaten %u blok uzunlukta. Hiçbir şey yapılmadı!\n"
+"\n"
+
+#: resize/main.c:600
+#, fuzzy, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Dosya sisteminde bir günlük dosyası zaten var.\n"
+
+#: resize/main.c:605
+#, fuzzy, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Dosya sisteminde bir günlük dosyası zaten var.\n"
+
+#: resize/main.c:613
+#, fuzzy, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Dosya sisteminin son denetim zamanı %s yapılıyor\n"
+
+#: resize/main.c:615
+#, fuzzy, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Dosya sisteminin son denetim zamanı %s yapılıyor\n"
+
+#: resize/main.c:617
+#, fuzzy, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+"%s üzerindeki dosya sistemi şimdi %u blok uzunlukta.\n"
+"\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "- %s yeniden boyutlandırılırken hata oluştu"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:635
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"%s üzerindeki dosya sistemi şimdi %u blok uzunlukta.\n"
+"\n"
+
+#: resize/main.c:650
+#, fuzzy, c-format
+msgid "while trying to truncate %s"
+msgstr "- stat %s yapılmaya çalışılırken hata oluştu"
+
+#: resize/online.c:81
+#, fuzzy
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "Dış günlük bu dosya sistemini desteklemiyor\n"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:114
+#, fuzzy
+msgid "Filesystem does not support online resizing"
+msgstr ""
+"Dosyasistemi özellikleri 0 revizyonlu dosyasistemlerinde desteklenmiyor\n"
+
+#: resize/online.c:122
+#, fuzzy
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: resize/online.c:129
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#: resize/online.c:137
+#, fuzzy, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+"\n"
+"\t%s üzerindeki günlük açılmaya çalışılırken hata oluştu\n"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:164 resize/online.c:184
+#, fuzzy
+msgid "While checking for on-line resizing support"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: resize/online.c:181
+#, fuzzy
+msgid "Kernel does not support online resizing"
+msgstr "Dış günlük bu dosya sistemini desteklemiyor\n"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:230
+#, fuzzy
+msgid "While trying to extend the last group"
+msgstr "- dış günlük açılmaya çalışılırken hata oluştu"
+
+#: resize/online.c:277
+#, fuzzy, c-format
+msgid "While trying to add group #%d"
+msgstr "- %s açılmaya çalışılırken hata oluştu"
+
+#: resize/online.c:288
+#, c-format
+msgid ""
+"Filesystem at %s is mounted on %s, and on-line resizing is not supported on "
+"this system.\n"
+msgstr ""
+
+#: resize/resize2fs.c:759
+#, fuzzy, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "başlangıç bloğu hatalı - %s"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "yedek bloklar"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr "meta-veri blokları"
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2475
+#, fuzzy
+msgid "new meta blocks"
+msgstr "meta-veri blokları"
+
+#: resize/resize2fs.c:2698
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2703
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr ""
+
+#: resize/resize2fs.c:2776
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Bu olmamalıydı: boyutlandırırken düğümü kaybettik!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.44.4"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:30
+#, fuzzy
+msgid "Bad magic number in super-block"
+msgstr "günlük dosyası super bloğu okunuyor\n"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:33
+#, fuzzy
+msgid "Can't read group descriptors"
+msgstr ""
+" \n"
+" Grup tanımlayıcı: "
+
+#: lib/ext2fs/ext2_err.c:34
+#, fuzzy
+msgid "Can't write group descriptors"
+msgstr ""
+" \n"
+" Grup tanımlayıcı: "
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:38
+#, fuzzy
+msgid "Can't write an inode bitmap"
+msgstr "düğüm biteşlemleri yazılıyor"
+
+#: lib/ext2fs/ext2_err.c:39
+#, fuzzy
+msgid "Can't read an inode bitmap"
+msgstr "düğüm biteşlemleri yazılıyor"
+
+#: lib/ext2fs/ext2_err.c:40
+#, fuzzy
+msgid "Can't write a block bitmap"
+msgstr "blok biteşlemleri yazılıyor"
+
+#: lib/ext2fs/ext2_err.c:41
+#, fuzzy
+msgid "Can't read a block bitmap"
+msgstr "düğüm ve blok biteşlemleri okunuyor"
+
+#: lib/ext2fs/ext2_err.c:42
+#, fuzzy
+msgid "Can't write an inode table"
+msgstr "- düğüm tablosuna yazılırken hata oluştu"
+
+#: lib/ext2fs/ext2_err.c:43
+#, fuzzy
+msgid "Can't read an inode table"
+msgstr "Dosya indeksi tablosu taranıyor"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:45
+#, fuzzy
+msgid "Filesystem has unexpected block size"
+msgstr "Dosya sisteminin uzunluğu görünürdeki uzunluktan büyük."
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:50
+#, fuzzy
+msgid "Inode bitmap not loaded"
+msgstr ""
+" \n"
+" Düğüm biteşlemi: "
+
+#: lib/ext2fs/ext2_err.c:51
+#, fuzzy
+msgid "Block bitmap not loaded"
+msgstr " Blok biteÅŸlemi: "
+
+#: lib/ext2fs/ext2_err.c:52
+#, fuzzy
+msgid "Illegal inode number"
+msgstr "Blok sayısı kuraldışı!\n"
+
+#: lib/ext2fs/ext2_err.c:53
+#, fuzzy
+msgid "Illegal block number"
+msgstr "Blok sayısı kuraldışı!\n"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:64
+#, fuzzy
+msgid "Illegal indirect block found"
+msgstr "%u düğümünün dolaylı blokları okunuyor"
+
+#: lib/ext2fs/ext2_err.c:65
+#, fuzzy
+msgid "Illegal doubly indirect block found"
+msgstr "%u düğümünün dolaylı blokları okunuyor"
+
+#: lib/ext2fs/ext2_err.c:66
+#, fuzzy
+msgid "Illegal triply indirect block found"
+msgstr "%u düğümünün dolaylı blokları okunuyor"
+
+#: lib/ext2fs/ext2_err.c:67
+#, fuzzy
+msgid "Block bitmaps are not the same"
+msgstr " Blok biteÅŸlemi: "
+
+#: lib/ext2fs/ext2_err.c:68
+#, fuzzy
+msgid "Inode bitmaps are not the same"
+msgstr ""
+" \n"
+" Düğüm biteşlemi: "
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:78
+#, fuzzy
+msgid "Filesystem has unsupported feature(s)"
+msgstr ""
+"Dosyasistemi özellikleri 0 revizyonlu dosyasistemlerinde desteklenmiyor\n"
+
+#: lib/ext2fs/ext2_err.c:79
+#, fuzzy
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr ""
+"Dosyasistemi özellikleri 0 revizyonlu dosyasistemlerinde desteklenmiyor\n"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:81
+#, fuzzy
+msgid "Memory allocation failed"
+msgstr "Aayrılırken hata oluştu"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:83
+#, fuzzy
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#: lib/ext2fs/ext2_err.c:84
+#, fuzzy
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:89
+#, fuzzy
+msgid "Ext2 directory block not found"
+msgstr "Düğüm %3$d deki dizin bloku %1$u (#%2$d) boş\n"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:95
+#, fuzzy
+msgid "Journal superblock not found"
+msgstr "Günlük süperbloğu yok!\n"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:98
+#, fuzzy
+msgid "Error loading external journal"
+msgstr "- dış günlük açılmaya çalışılırken hata oluştu"
+
+#: lib/ext2fs/ext2_err.c:99
+#, fuzzy
+msgid "Journal not found"
+msgstr "Günlük süperbloğu yok!\n"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:101
+#, fuzzy
+msgid "Illegal extended attribute block number"
+msgstr "aek özellik"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:104
+#, fuzzy
+msgid "Too many reserved group descriptor blocks"
+msgstr "<Grup tanımlayıcı düğümü>"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:114
+#, fuzzy
+msgid "TDB: Invalid parameter"
+msgstr "'stride' parametresi geçersiz: %s\n"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:143
+#, fuzzy
+msgid "Extent not found"
+msgstr "/lost+found dizini yok. "
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:154
+#, fuzzy
+msgid "MMP: filesystem still in use"
+msgstr "dosya sistemi uzunluğu hatalı - %s"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:156
+#, fuzzy
+msgid "Block group descriptor size incorrect"
+msgstr "<Grup tanımlayıcı düğümü>"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:163
+#, fuzzy
+msgid "Superblock checksum does not match superblock"
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:165
+#, fuzzy
+msgid "MMP block checksum does not match"
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:167
+#, fuzzy
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:172
+#, fuzzy
+msgid "Extended attribute block has a bad header"
+msgstr "aek özellik"
+
+#: lib/ext2fs/ext2_err.c:173
+#, fuzzy
+msgid "Extended attribute key not found"
+msgstr "aek özellik"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:185
+#, fuzzy
+msgid "File system is corrupted"
+msgstr "Dosya sisteminin uzunluğu görünürdeki uzunluktan büyük."
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:187
+#, fuzzy
+msgid "The journal superblock is corrupt"
+msgstr "Günlük süperbloğu yok!\n"
+
+#: lib/ext2fs/ext2_err.c:188
+#, fuzzy
+msgid "Inode is corrupted"
+msgstr "Ext3 günlüğü süperbloku bozuk.\n"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr ""
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: lib/support/prof_err.c:13
+#, fuzzy
+msgid "Profile section not found"
+msgstr "- /lost+found dizini oluÅŸturulurken hata oluÅŸtu"
+
+#: lib/support/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "- /lost+found dizini oluÅŸturulurken hata oluÅŸtu"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: lib/support/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "Geçersiz dosya sistemi seçeneği: %s\n"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: lib/support/prof_err.c:37
+#, fuzzy
+msgid "Couldn't open profile file"
+msgstr "Dosya kopyalanamadı: %m\n"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr ""
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#: lib/support/plausible.c:118
+#, fuzzy, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "bağlama sayısı hatalı - %s"
+
+#: lib/support/plausible.c:121
+#, fuzzy, c-format
+msgid "\tlast mounted on %s"
+msgstr "bağlama sayısı hatalı - %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr ""
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr ""
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr ""
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr ""
+
+#: lib/support/plausible.c:199
+#, fuzzy, c-format
+msgid "Creating regular file %s\n"
+msgstr "olaÄŸan dosya"
+
+#: lib/support/plausible.c:202
+#, fuzzy, c-format
+msgid "Could not open %s: %s\n"
+msgstr "e2label: %s açılamıyor\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Aygıt görünmüyor; doğru belirttiğinize emin misiniz?\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s blok özellikli bir aygıt değil.\n"
+
+#: lib/support/plausible.c:249
+#, fuzzy, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr " hatalı bir dosya sistemi içeriyor"
+
+#: lib/support/plausible.c:252
+#, fuzzy, c-format
+msgid "%s contains a %s file system\n"
+msgstr " hatalı bir dosya sistemi içeriyor"
+
+#: lib/support/plausible.c:276
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr ""
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: biteÅŸlemler okunurken hata oluÅŸtu: %s\n"
+
+#, fuzzy
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Uyarı, süperblokların tamamına yazma sorunu var."
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "düğüm %i (%Q) %Id için i_dir_acl, sıfır olmalı.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr ""
+#~ "Düğüm %i sıkıştırma desteklenmeyen dosya sisteminde sıkıştırma bayrağı "
+#~ "içeriyor. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "Ek özellikler bloğu %b ayrılırken hata. "
+
+#, fuzzy
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "Uyarı: sıkıştırma desteği deneyseldir.\n"
+
+#, fuzzy
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "E2fsck HTREE desteÄŸi ile derlenmemiÅŸ,\n"
+#~ "\tama dosya sistemi %s HTREE dizinleri içeriyor.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "- sıfırlama tampon belleği ayrılırken hata oluştu"
+
+#, fuzzy
+#~ msgid ", unused inodes %u\n"
+#~ msgstr "düğüm sayısı hatalı - %s"
+
+#, fuzzy
+#~ msgid "Journal features: "
+#~ msgstr "Günlük kullanıcıları: %s\n"
+
+#~ msgid "Journal size: "
+#~ msgstr "Günlük boyutu: "
+
+#, fuzzy
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Günlük bloğu boyu: %u\n"
+#~ "Günlük uzunluğu: %u\n"
+#~ "Günlük ilk bloğu: %u\n"
+#~ "Günlük sıralaması: 0x%08x\n"
+#~ "Günlük başlangıcı: %u\n"
+#~ "Günlük kullanıcı sayısı: %lu\n"
+
+#, fuzzy
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Günlük kullanıcıları: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Günlük bloğu boyu: %u\n"
+#~ "Günlük uzunluğu: %u\n"
+#~ "Günlük ilk bloğu: %u\n"
+#~ "Günlük sıralaması: 0x%08x\n"
+#~ "Günlük başlangıcı: %u\n"
+#~ "Günlük kullanıcı sayısı: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "Günlük kullanıcıları: %s\n"
+
+#, fuzzy
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "- dosya sistemi tabloları ayrılmaya çalışılırken hata oluştu"
+
+#, fuzzy
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "%s açılırken"
+
+#, fuzzy
+#~ msgid "Failed to open %s\n"
+#~ msgstr "- %s açılmaya çalışılırken hata oluştu"
+
+#, fuzzy
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "'stride' parametresi geçersiz: %s\n"
+
+#, fuzzy
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "Seçenekleri çözümlemek için bellek ayrılamadı!\n"
+
+#, fuzzy
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "stat %s yapılamadı --- %s\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s diskin tamamı! Bir disk bölümü değil!\n"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<ACL indeksinin düğümü>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<ACL verisinin düğümü>"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr ""
+#~ "Süperblok has_journal bayrağı içermiyor, ama ext3 günlüğü %s içeriyor.\n"
+
+#~ msgid "@a in @i %i has a hash (%N) which is @n (must be 0)\n"
+#~ msgstr ""
+#~ "%i. düğümdeki ek özellik geçersiz bir çırpı (hash) içeriyor (%N), 0 "
+#~ "olmalı\n"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "- yineleme işlevi çağrılırken hata oluştu"
+
+#~ msgid "Pass 0: Doing byte-swap of filesystem\n"
+#~ msgstr "Geçiş 0: dosya sisteminin bayt sıralaması düzeltiliyor\n"
+
+#~ msgid ""
+#~ "%s: the filesystem must be freshly checked using fsck\n"
+#~ "and not mounted before trying to byte-swap it.\n"
+#~ msgstr ""
+#~ "%s: dosya sitemi fsck kullanılarak tamamen denetlenmeli ve\n"
+#~ "ters baytlar normal düzene döndürülmeden bağlanmamalıdır.\n"
+
+#~ msgid "Byte swap"
+#~ msgstr "Ters baytlı"
+
+#~ msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+#~ msgstr "e2fsck'nın bu sürümünde derlenmemiş ters baytlı sistemler \n"
+
+#~ msgid "Incompatible options not allowed when byte-swapping.\n"
+#~ msgstr "Ters baytlar düzeltilirken uyumsuz seçeneklere izin verilmez.\n"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "- %s için blok biteşlemlerinin yazılması yinelenirken hata oluştu"
+
+#~ msgid "invalid blocks range: %lu-%lu"
+#~ msgstr "hatalı blok aralığı: %lu-%lu"
+
+#~ msgid "Note: This is a byte-swapped filesystem\n"
+#~ msgstr "Bilgi: Bu bir ters-baytlı dosya sistemi\n"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "görüntü başlığını yazmak için kısa yazma (sadece %d bayt)"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "sekme boyu hatalı - %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Uyarı: sekmeler desteklenmediğinden -f seçeneği yoksayılıyor\n"
+
+#~ msgid ""
+#~ "Filesystem too large. No more than 2**31-1 blocks\n"
+#~ "\t (8TB using a blocksize of 4k) are currently supported."
+#~ msgstr ""
+#~ "Dosya sistemi çok büyük. 2**31-1 bloktan fazlası\n"
+#~ "\t (4k'lık bloklarla 8TB mümkün) desteklenmiyor."
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: some 2.4 kernels do not support blocksizes greater than 4096\n"
+#~ "\tusing ext3. Use -b 4096 if this is an issue for you.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Uyarı: Bazı 2.4 çekirdekler ext3 kullanırken 4096'dan daha büyük blok\n"
+#~ "\tboylarını desteklemez. Bu sizin için de geçerliyse, -b 4096 hullanın.\n"
+#~ "\n"
+
+#~ msgid "Warning: %d-byte inodes not usable on most systems\n"
+#~ msgstr "Uyarı: %d baytlık düğümler bir çok sistemde kullanımdışıdır.\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "Günlük silinMEdi\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "The filesystem already has sparse superblocks disabled.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Dosya sisteminde süperblok azaltma bayrağı zaten etkin değil.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Sparse superblock flag cleared. %s"
+#~ msgstr ""
+#~ "\n"
+#~ "Süperblok azaltma bayrağı temizlendi. %s"
+
+#~ msgid "#\t\t %u -> %u (%d)\n"
+#~ msgstr "#\t\t %u -> %u (%d)\n"
+
+#~ msgid "done \n"
+#~ msgstr "bitti \n"
+
+#~ msgid "Clone duplicate/bad blocks"
+#~ msgstr "tekrarlı/hatalı bloklaları kopyala"
+
+#~ msgid "Error allocating @a @b %b. "
+#~ msgstr "Ek özellik bloğu %b ayrılırken hata oluştu. "
+
+#~ msgid ""
+#~ "Duplicate @bs found... invoking duplicate @b passes.\n"
+#~ "Pass 1B: Rescan for duplicate/bad @bs\n"
+#~ msgstr ""
+#~ "Tekrarlanmış bloklar bulundu... tekrarlanan blok taraması başlatılıyor.\n"
+#~ "Geçiş 1B: tekrarlanmış/hatalı bloklar yeniden taranıyor\n"
+
+#~ msgid "Duplicate/bad @b(s) in @i %i:"
+#~ msgstr "Düğüm %i içindeki tekrarlanmış/hatalı blok(lar):"
+
+#~ msgid " thisoff block fs_blk_sz blksz grp last_mount\n"
+#~ msgstr " thisoff blok ds_blok_boyu blokboyu grup son_baÄŸlama\n"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s %s için başarısız: %s\n"
+
+#~ msgid "HDIO_GETGEO ioctl"
+#~ msgstr "HDIO_GETGEO ioctl"
+
+#~ msgid "BLKGETSIZE ioctl"
+#~ msgstr "BLKGETSIZE ioctl"
+
+#~ msgid "Forcibly clearing HTREE flag on @i %d (%q). (Beta test code)\n"
+#~ msgstr ""
+#~ "Düğüm %d (%q) üzerindeki HTREE bayrağı zorla temizleniyor. (Beta test "
+#~ "kodu)\n"
+
+#~ msgid "(unknown os)"
+#~ msgstr "(bilinmeyen iÅŸl. sist.)"
+
+#~ msgid "Number of free blocks: %d/%d, Needed: %d\n"
+#~ msgstr "Serbest blok sayısı: %d/%d, Gereken: %d\n"
+
+#~ msgid "Going into desperation mode for block allocations\n"
+#~ msgstr "Blok tahsislerinde umutsuz kipe geçiliyor\n"
+
+#~ msgid "Moving %d blocks %u->%u\n"
+#~ msgstr "%d blok taşınıyor %u->%u\n"
+
+#~ msgid "ino=%u, blockcnt=%lld, %u->%u\n"
+#~ msgstr "düğüm = %u, block_sayısı = %lld, %u->%u\n"
+
+#~ msgid "Inode moved %u->%u\n"
+#~ msgstr "Düğüm taşındı %u->%u\n"
+
+#~ msgid "Inode translate (dir=%u, name=%.*s, %u->%u)\n"
+#~ msgstr "Düğüm çevirisi (dizin = %u, isim= %.*s, %u->%u)\n"
+
+#~ msgid "Itable move group %d block %u->%u (diff %d)\n"
+#~ msgstr ""
+#~ "Düğüm tablosu %d. grubun blokları %u -> %u arasında taşınıyor (fark %d)\n"
+
+#~ msgid "%d blocks of zeros...\n"
+#~ msgstr "%d sıfırlı blok...\n"
+
+#~ msgid "Inode table move finished.\n"
+#~ msgstr "Düğüm tablosunun taşınması tamamlandı.\n"
diff --git a/po/uk.gmo b/po/uk.gmo
new file mode 100644
index 0000000..59158d2
--- /dev/null
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
new file mode 100644
index 0000000..b730572
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,8796 @@
+# Ukarainian translation of E2fsprogs
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+# 2013 by Theodore Ts'o
+# This file is distributed under the same license as the e2fsprogs package.
+#
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,.
+# Theodore Ts'o <tytso@mit.edu>, 2013.
+# Yuri Chornoivan <yurchor@ukr.net>, 2013, 2014, 2016, 2017, 2018, 2019, 2021, 2022.
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-13 13:06+0300\n"
+"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
+"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
+"Language: uk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Lokalize 20.12.0\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Помилковий блок %u поза доÑтупним діапазоном; проігноровано.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "при перевірці правильноÑÑ‚Ñ– inode пошкоджених блоків"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "при читанні inode пошкоджених блоків"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити %s"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "при Ñпробі відкрити '%s'"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "при читанні ÑпиÑку пошкоджених блоків з файла"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "при оновленні inode пошкоджених блоків"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "ПопередженнÑ: в inode пошкоджених блоків знайдено недопуÑтимий блок %u. Очищено.\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "під Ñ‡Ð°Ñ Ð²Ð¸Ð²Ñ–Ð»ÑŒÐ½ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° tdb dir_info"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ %lu (%s) доки %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÐ° %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Ігнорувати помилку"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "ПримуÑово перезапиÑати"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Помилка запиÑу блоку %lu (%s) доки %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Помилка запиÑу блоку %lu (%s). "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "порожні блоки каталогів"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "Ð¿Ð¾Ñ€Ð¾Ð¶Ð½Ñ ÐºÐ°Ñ€Ñ‚Ð° каталогів"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Порожній блок каталогу %u (№%d) у inode %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s назва файлу розмір блоків nblocks\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Ðекоректна кількіÑÑ‚ÑŒ блоків!\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ пам’ÑÑ‚ÑŒ під буфер блоків (розмір=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "карта перебудови inode розширеннÑ"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "КориÑтуваннÑ: %s диÑк\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "Підтримки ioctl BLKFLSBUF не передбачено! Ð¡ÐºÐ¸Ð´Ð°Ð½Ð½Ñ Ð±ÑƒÑ„ÐµÑ€Ñ–Ð² неможливе.\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñуперблоку журналу\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: не знайдено коректного Ñуперблоку журналу\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: журнал є надто коротким\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: помилкові блоки швидкого внеÑеннÑ\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: відновлюємо журнал\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ не буде виконано до виходу з режиму лише читаннÑ\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби повторно відкрити %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "aрозширений атрибут"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Aпомилка під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¿Ð¾Ð´Ñ–Ð»Ñƒ"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bблок"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bбітова карта"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "cÑтиÑканнÑ"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cконфліктує з ÑкоюÑÑŒ іншою файловою ÑиÑтемою @b"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dкаталог"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dвилучено"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "eзапиÑ"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "EÐ·Ð°Ð¿Ð¸Ñ Â«%Dn» у %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fфайлова ÑиÑтема"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "FÐ´Ð»Ñ @i %i (%Q) Ñ”"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "gгрупа"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hinode каталогу HTREE"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iзаборонений"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jжурнал"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "lзагублені+знайдені"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "LÑ” поÑиланнÑм"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mкратне викориÑтаннÑ"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nнекоректний"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "oоÑиротілий"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pпроблема у"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qквота"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "rкореневий inode"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "sмає бути"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "СÑупер@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "uнеприєднаний"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vприÑтрій"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xрозширеннÑ"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zнульової довжини"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<Порожній inode>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<inode пошкоджених блоків>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<inode квоти кориÑтувача>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<inode квоти групи>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<inode завантажувача>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<inode відновлюваного каталогу>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<inode деÑкриптора групи>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<inode журналу>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Зарезервований inode 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<Зарезервований inode 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "звичайний файл"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "каталог"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "Ñимвольний приÑтрій"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "блоковий приÑтрій"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "іменований канал"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "Ñимволічне поÑиланнÑ"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "Ñокет"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "файл невідомого типу з режимом доÑтупу 0%o"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "опоÑередкований блок"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "двічі опоÑередкований блок"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "тричі опоÑередкований блок"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "блок перенеÑеннÑ"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "№ блоку"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "кориÑтувач"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "група"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "проект"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "невідомий тип квоти"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "карта inode кратного викориÑтаннÑ"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°: не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ dup_blk Ð´Ð»Ñ %llu\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "повернуто з clone_file_block"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°: не вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ пошук запиÑу блоку з розширеним атрибутом Ð´Ð»Ñ %llu"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°: не вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ пошук запиÑу inode з розширеним атрибутом Ð´Ð»Ñ %u"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "під Ñ‡Ð°Ñ Ñ…ÐµÑˆÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð¿Ð¸Ñу з e_value_inum = %u"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ каталогу"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "отримуємо наÑтупний inode від заÑобу ÑкануваннÑ"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "карта викориÑтовуваних inode"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "карта inode каталогів"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "карта inode звичайних файлів"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "карта викориÑтовуваних блоків"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "карта блоків метаданих"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "карта casefold inode"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "розпочинаємо ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ inode"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "Прохід 1"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "читаємо опоÑередковані блоки inode %u"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "картка пошкоджених inode"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "inode у карті пошкоджених блоків"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "карта inode imagic"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "карта блоків кратного викориÑтаннÑ"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "карта блоків з розширеним атрибутом"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu(%c): мало бути %6lu маємо фізичних %6lu (к-ть блоків %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "карта бітів блоку"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "бітова карта inode"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ inode"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "Прохід 2"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "NLS пошкоджено."
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "ÐŸÑ€Ð¾Ð´Ð¾Ð²Ð¶ÐµÐ½Ð½Ñ Ð½ÐµÐ¼Ð¾Ð¶Ð»Ð¸Ð²Ðµ."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "бітова карта Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ inode"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Пікове ÑÐ¿Ð¾Ð¶Ð¸Ð²Ð°Ð½Ð½Ñ Ð¿Ð°Ð¼â€™ÑÑ‚Ñ–"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Прохід 3"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "бітова карта виÑÐ²Ð»ÐµÐ½Ð½Ñ Ñ†Ð¸ÐºÐ»Ñ–Ð² inode"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "Прохід 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Прохід 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: помилка під Ñ‡Ð°Ñ Ñпроби розподілити пам’ÑÑ‚ÑŒ"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: помилка Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñƒ пам’ÑÑ‚Ñ–"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(без запиту)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "Виправити"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "ОчиÑтити"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "Змінити розташуваннÑ"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "Розподілити"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "Розгорнути"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "З’єднати з /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "Створити"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "Ð’Ñ€Ñтувати"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "Вкоротити"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "Спорожнити inode"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "Перервати"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "Розділити"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "Продовжити"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "Клонувати блоки кратного викориÑтаннÑ"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "Вилучити файл"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "Придушити Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½ÑŒ"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "Від’єднати"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "Спорожнити покажчик HTree"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "Створити заново"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "Оптимізувати"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "ЗнÑти прапорець"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(ÐЕМÐЄ)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "ВИПРÐВЛЕÐО"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "ОЧИЩЕÐО"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "ЗМІÐЕÐО РОЗТÐШУВÐÐÐЯ"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "РОЗМІЩЕÐО"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "РОЗШИРЕÐО"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "ПОВТОРÐО З’ЄДÐÐÐО"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "СТВОРЕÐО"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "ВРЯТОВÐÐО"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "ОБРІЗÐÐО"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INODE СПОРОЖÐЕÐО"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "ПЕРЕРВÐÐО"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "РОЗДІЛЕÐО"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "ПРОДОВЖЕÐО"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "КЛОÐОВÐÐО БЛОКИ КРÐТÐОГО ВИКОРИСТÐÐÐЯ"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "ФÐЙЛ ВИЛУЧЕÐО"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "ПРИДУШЕÐО"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "ВІД’ЄДÐÐÐО"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "ІÐДЕКС HTREE ОЧИЩЕÐО"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "ПЕРЕСТВОРИТЬ"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "ОПТИМІЗУЄ"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "ПРÐПОРЕЦЬ ЗÐЯТО"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "бітова карта блоків Ð´Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸ %g не перебуває у групі. (блок %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "бітова карта inode Ð´Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸ %g не перебуває у групі. (блок %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ @i Ð´Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸ %g не перебуває у групі. (блок %b)\n"
+"УВÐГÐ: МОЖЛИВРЗÐÐЧÐРВТРÐТРДÐÐИХ.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ Ñуперблок або Ñуперблок не опиÑує коректної\n"
+"файлової ÑиÑтеми ext2/ext3/ext4. Якщо приÑтрій Ñ” коректним Ñ– наÑправді\n"
+"міÑтить файлову ÑиÑтему ext2/ext3/ext4 (а не swap чи або щоÑÑŒ інше), тоді\n"
+"Ñуперблок пошкоджено, Ñ– ви можете Ñпробувати запуÑтити e2fsck з\n"
+"альтернативним Ñуперблоком:\n"
+" e2fsck -b 8193 <приÑтрій>\n"
+" або\n"
+" e2fsck -b 32768 <приÑтрій>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Розмір файлової ÑиÑтеми (відповідно до Ñуперблоку) дорівнює %b блоків\n"
+"Фізичний розмір приÑтрою дорівнює %c блоків\n"
+"Ймовірно, пошкоджено дані або Ñуперблоку, або таблиці розділів!\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"Розмір блоку Ñупреблоку = %b, розмір фрагмента = %c.\n"
+"У цій верÑÑ–Ñ— e2fsck не передбачено варіанта, коли розміри фрагмента відрізнÑÑŽÑ‚ÑŒÑÑ\n"
+"від розмірів блоку.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "кількіÑÑ‚ÑŒ блоків на групу у Ñуперблоці = %b, мало б бути %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "перший блок даних у Ñупрерблоці = %b, мав би бути %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"файлова ÑиÑтема не мала UUID; Ñтворюємо відповідний UUID.\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"ЗауваженнÑ: Ñкщо декілька блоків бітових карт inode або\n"
+"блоків або чаÑтина таблиці inode потребують переÑуваннÑ, вам\n"
+"варто Ñпробувати Ñпочатку запуÑтити e2fsck з параметром\n"
+"«-b %S». Проблему може бути пов’Ñзано із деÑкрипторами груп\n"
+"оÑновного блоку, а деÑкриптори груп резервного блоку може\n"
+"бути не пошкоджено.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "ВиÑвлено Ð¿Ð¾ÑˆÐºÐ¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñƒ @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ фізичного тому: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "КількіÑÑ‚ÑŒ @i у Ñуперблоці дорівнює, має бути %j.\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "У Hurd не передбачено підтримки можливоÑÑ‚Ñ– Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ файлів.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "Журна Ñуперблоку Ñ” некоректним (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "У зовнішньому журналі визначено декілька кориÑтувачів файлової ÑиÑтеми (така ÐºÐ¾Ð½Ñ„Ñ–Ð³ÑƒÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ зовнішнього @j\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "У зовнішнього журналу пошкоджено Ñуперблок\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "Ð”Ð»Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ журналу не передбачено підтримки цієї файлової ÑиÑтеми\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"Ñуперблок журналу файлової ÑиÑтеми належить до невідомого типу %N (не підтримуєтьÑÑ).\n"
+"Ймовірно, ваша ÐºÐ¾Ð¿Ñ–Ñ e2fsck Ñ” заÑтарілою Ñ–/або не підтримує цього формату журналу.\n"
+"Ймовірно, Ñуперблок журналу пошкоджено.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "Ñуперблок журналу пошкоджено.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "прапорець Ñуперблоку has_journal Ñкинуто, але наÑвним Ñ” журнал.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Ð’Ñтановлено прапорець needs_recovery Ð´Ð»Ñ Ñуперблоку, але не виÑвлено журналу.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "ЗнÑто прапорець needs_recovery Ð´Ð»Ñ Ñуперблоку, але у журналі немає даних.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "ОчиÑтити журнал"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "Ð”Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми вÑтановлено прапорці можливоÑтей, але Ñ†Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð° ÑиÑтема має верÑÑ–ÑŽ 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "оÑиротілий inode %s %i (uid=%Iu, gid=%Ig, режим=%Im, розмір=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "знайдено некоректний %B (%b) у оÑиротілому inode %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Вже Ñпрожнено знайдені %B (%b) у оÑиротілому inode %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "некоректний оÑиротілий @i %i у Ñуперблоці.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "некоректний @i %i у ÑпиÑку оÑиротілих @i.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "Ð”Ð»Ñ Ñуперблоку журналу вÑтановлено невідомий придатний лише до Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€ÐµÑ†ÑŒ можливоÑÑ‚Ñ–.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "Ð”Ð»Ñ Ñуперблоку журналу вÑтановлено невідомий Ñ– неÑуміÑний прапорець можливоÑÑ‚Ñ–.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Підтримки цієї верÑÑ–Ñ— журналу у поточній верÑÑ–Ñ— e2fsck не передбачено.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"ПереÑуваємо журнал з /%s до прихованого @i.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Помилка під Ñ‡Ð°Ñ Ñпроби переÑунути журнал: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"ВиÑвлено некоректні Ð¿Ð¾Ð»Ñ Ñуперблоку журналу V2 (з журналу V1).\n"
+"Спорожнюємо Ð¿Ð¾Ð»Ñ Ð·Ð° Ñуперблоком журналу V1...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "ЗапуÑтити Ð¶ÑƒÑ€Ð½Ð°Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ð¿Ñ€Ð¸ це"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "У резервному Ñуперблоці не вÑтановлено прапорець відновленнÑ, отже, попри вÑе запуÑкаємо журнал.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Створюємо резервну копію даних щодо блоків @j журналу.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"у файловій ÑиÑтемі не увімкнено resize_@i, але s_reserved_gdt_@bs\n"
+"має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %N; має бути нульовим. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_@i не увімкнено, але зміна розміру @i є ненульовою. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Зміна розміру @i є некоректною. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Ñ‡Ð°Ñ Ð¾Ñтаннього Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñуперблоку (%t,\n"
+"\tтепер = %T) лежить у майбутньому.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Ñ‡Ð°Ñ Ð¾Ñтаннього запиÑу Ñуперблоку (%t,\n"
+"\tтепер = %T) лежить у майбутньому.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "підказкою Ñуперблоку Ð´Ð»Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ Ñуперблоку має бути %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Додаємо підказку dirhash до файлової ÑиÑтеми.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "контрольна Ñума деÑкриптора групи %g дорівнює %04x, а має бути %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "деÑкриптор групи %g позначено неініціалізованим без вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾Ñ— можливоÑÑ‚Ñ–.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "деÑкриптор групи %g міÑтить дані щодо некоректної кількоÑÑ‚Ñ– невикориÑтаних inode %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "Бітову карту оÑтаннього блоку групи не ініціалізовано. "
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð´Ñ–Ñ— журналу %i пошкоджено, повторне Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð¿ÐµÑ€ÐµÑ€Ð²Ð°Ð½Ð¾.\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "Ð’Ñтановлено прапорець test_fs (Ñ– доÑтупна ext4). "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Ð§Ð°Ñ Ð¾Ñтаннього Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñуперблоку лежить у майбутньому.\n"
+"\t(менше ніж на день, ймовірно через помилковий Ñ‡Ð°Ñ Ð½Ð° апаратному годиннику)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"Ð§Ð°Ñ Ð¾Ñтаннього запиÑу Ñуперблоку лежить у майбутньому.\n"
+"\t(менше ніж на день, ймовірно через помилковий Ñ‡Ð°Ñ Ð½Ð° апаратному годиннику)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Одна або декілька контрольних Ñум деÑкрипторів груп блоків Ñ” некоректними. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Ð’Ñтановлюємо Ð´Ð»Ñ ÐºÑ–Ð»ÑŒÐºÐ¾ÑÑ‚Ñ– вільних @inode Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %j (було %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Ð’Ñтановлюємо Ð´Ð»Ñ ÐºÑ–Ð»ÑŒÐºÐ¾ÑÑ‚Ñ– вільних блоків Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %c (було %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Приховуємо квоти %U, @i %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "Блок MMP Ñуперблоку Ñ” некоректним. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "Контрольна Ñума MMP Ñуперблоку Ñ” некоректною. "
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "metadata_csum Ñуперблоку заміщує uninit_bg; не можна вÑтановлювати обидва біти влаÑтивоÑтей одночаÑно."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "Контрольна Ñума блоку MMP Ñуперблоку не збігаєтьÑÑ Ñ–Ð· еталонною. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "64-бітові файлові ÑиÑтеми Ñуперблоку потребують розширень Ð´Ð»Ñ Ð´Ð¾Ñтупу до уÑього диÑка. "
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ First_meta_bg Ñ” надто великим. (%N, макÑимальним Ñ” Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "Контрольна Ñума Ñуперблоку зовнішнього журналу не відповідає Ñуперблоку. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "metadata_csum_seed Ñуперблоку необов’Ñзково без metadata_csum."
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби ініціалізувати контекÑÑ‚ квот у бібліотеці підтримки: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ð¾Ð³Ð¾ додаткового розміру у @S (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±Ð°Ð¶Ð°Ð½Ð¾Ð³Ð¾ додаткового розміру у @S (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "Ðекоректна квота %U, @i %i. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "@S мав би забагато inode (%N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Увімкнено можливоÑÑ‚Ñ– Resize_@i та meta_bg features. Ці можливоÑÑ‚Ñ– Ñ” неÑуміÑними.\n"
+"Слід вимкнути можливіÑÑ‚ÑŒ Resize_@i. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Прохід 1: перевірÑємо @i, блоки та розміри\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "кореневий inode не є каталогом. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "Ð´Ð»Ñ ÐºÐ¾Ñ€ÐµÐ½ÐµÐ²Ð¾Ð³Ð¾ inode вÑтановлено dtime (ймовірно, через заÑтарілу програму mke2fs). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "Ð”Ð»Ñ Ð·Ð°Ñ€ÐµÐ·ÐµÑ€Ð²Ð¾Ð²Ð°Ð½Ð¾Ð³Ð¾ @i %i (%Q) визначено некоректний режим. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "Ð´Ð»Ñ Ð²Ð¸Ð»ÑƒÑ‡ÐµÐ½Ð¾Ð³Ð¾ @i %i визначено нульове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ dtime. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "@i %i викориÑтовуєтьÑÑ, але Ð´Ð»Ñ Ð½ÑŒÐ¾Ð³Ð¾ вÑтановлено dtime. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "@i %i є каталогом нульової довжини. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "бітова карта блоків групи %g за адреÑою %b конфліктує з іншим блоком файлової ÑиÑтеми.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "бітова карта inode групи %g у %b конфліктує з ÑкимоÑÑŒ іншим блоком файлової ÑиÑтеми.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ inode групи %g у %b конфліктує з певним блоком іншої файлової ÑиÑтеми.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "бітову карту блоків групи %g (%b) пошкоджено. "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "карту inode групи %g (%b) пошкоджено. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size дорівнює %Is, має бути %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_blocks — %Ib, має бути %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %B (%b) у @i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) перекриває метадані файлової ÑиÑтеми у @i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "@i %i міÑтить некоректні блоки. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "У @i %i забагато неприпуÑтимих блоків.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "некоректне %B (%b) у помилковому блоковому @i. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Помилковий @i блоку міÑтить некоректні блоки. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "ВикориÑтовуєтьÑÑ Ð´ÑƒÐ±Ð»Ñ–ÐºÐ°Ñ‚ або помилковий блок!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "Пошкоджений блок %b викориÑтано Ñк опоÑередкований блок @i пошкодженого блоку. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"Ймовірно, помилковий @i блоку було пошкоджено. Вам варто\n"
+"зупинитиÑÑ Ñ– запуÑтити e2fsck -c Ð´Ð»Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ помилкових блоків\n"
+"у файловій ÑиÑтемі.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Якщо блок Ñерйозно пошкоджено, файлову ÑиÑтему не можна буде виправити.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Ви можете вилучити цей блок зі ÑпиÑку пошкоджених блоків Ñ– ÑподіватиÑÑ Ð½Ð° те,\n"
+"що блок наÑправді не пошкоджено. Втім, гарантувати це неможливо.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "ОÑновний Ñуперблок (%b) перебуває у ÑпиÑку помилкових блоків.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Блок %b у оÑновних деÑкрипторах груп перебуває у ÑпиÑку помилкових блоків\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "ПопередженнÑ: Ñуперблок групи %g (%b) Ñ” помилковим.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "ПопередженнÑ: ÐºÐ¾Ð¿Ñ–Ñ Ð´ÐµÑкрипторів груп групи %g міÑтить пошкоджений блок (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Помилка у програмі? Блок №%b витребувано без причини у process_bad_block.\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ %N неперервних блоків у групі блоків %g Ð´Ð»Ñ %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð±ÑƒÑ„ÐµÑ€Ð° блоків Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑÑƒÐ²Ð°Ð½Ð½Ñ %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "ПереÑÑƒÐ²Ð°Ð½Ð½Ñ %g групи %s з %b до %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "ПереÑÑƒÐ²Ð°Ð½Ð½Ñ %g групи %s до %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "ПопередженнÑ: не вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ блок %b з %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "ПопередженнÑ: не вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати блок %b Ð´Ð»Ñ %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¾Ñ— кари @i (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ ÐºÐ°Ñ€Ñ‚Ð¸ блоків (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… щодо поÑÐ¸Ð»Ð°Ð½Ð½Ñ icount: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð¼Ð°Ñиву блоків каталогів: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ @i (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ñ–Ñ‚ÐµÑ€Ð°Ñ†Ñ–Ñ— над блоками у @i %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби зберегти дані щодо кількоÑÑ‚Ñ– @i (@i=%i, кількіÑÑ‚ÑŒ=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби зберегти дані щодо блоків каталогу (@i=%i, блок=%b, к-Ñ‚ÑŒ=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Ð”Ð»Ñ @i %i вÑтановлено прапорець imagic. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Ð”Ð»Ñ Ñпеціального файла (приÑтрою/Ñокета/fifo/Ñимволічного поÑиланнÑ(@i %i))\n"
+"вÑтановлено прапорець незмінноÑÑ‚Ñ– або лише допиÑуваннÑ. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "Спеціальний @i (приÑтрій/Ñокет/fifo) %i має ненульовий розмір. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "@i журналу не викориÑтовуєтьÑÑ, але міÑтить дані. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "журнал не є звичайним файлом. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "@i %i Ñ” чаÑтиною ÑпиÑку оÑиротілих @i. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "виÑвлено @i, Ñкі були чаÑтиною пов’Ñзаного ÑпиÑку пошкоджених оÑиротілих блоків. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñтруктури кількоÑÑ‚Ñ– поÑилань (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ атрибутів %b Ð´Ð»Ñ @i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "@i %i міÑтить пошкоджений блок розширеного атрибута %b. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "Помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ розширених атрибутів %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "у блоку розширеного атрибута %b кількіÑÑ‚ÑŒ поÑилань дорівнює %r, а має бути %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "Помилка під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ розширених атрибутів %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "блок розширеного атрибута %b має h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "помилка під Ñ‡Ð°Ñ Ñпроби розміÑтити Ñтруктуру Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ€ÐµÐ³Ñ–Ð¾Ð½Ñ–Ð² розширених атрибутів. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "блок розширеного атрибута %b пошкодженого (конфлікт розміщеннÑ). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "блок розширених атрибутів %b пошкоджено (некоректна назва). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "блок розширених атрибутів %b пошкоджено (некоректне значеннÑ). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "@i %i є надто великим. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) робить каталог надто великим. "
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) робить файл надто великим. "
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) робить Ñимволічне поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð°Ð´Ñ‚Ð¾ великим. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "Ð´Ð»Ñ @i %i вÑтановлено прапорець INDEX_FL у файловій ÑиÑтемі, де підтримки htree не передбачено.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "Ð´Ð»Ñ @i %i вÑтановлено прапорець INDEX_FL, але він не Ñ” каталогом.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "inode каталогу HTREE %i має некоректний кореневий вузол.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %i належить до непідтримуваної верÑÑ–Ñ— хешу (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "inode каталогу HTREE %i викориÑтовує неÑуміÑний прапорець кореневого вузла htree.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "inode каталогу HTREE %i має рівень вкладеноÑÑ‚Ñ– у ієрархії (%N), Ñкий Ñ” надто великим\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"@i помилкового блоку міÑтить опоÑередкований блок (%b), Ñкий конфліктує з\n"
+"метаданими файлової ÑиÑтеми. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Помилка (повторного) ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ @i зміни розмірів: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "@i %i має надмірний розмір (%IS), це некоректно\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "розширений атрибут у @i %i має некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ namelen (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "розширений атрибут у @i %i має некоректний відÑтуп Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "розширений атрибут у @i %i має некоректний блок Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (%N), має бути 0\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "розширений атрибут у @i %i має некоректний розмір Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "розширений атрибут у @i %i має некоректний хеш (%N)\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "@i %i Ñ” %It, але, здаєтьÑÑ, він наÑправді Ñ” каталогом.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð¾Ñ— ієрархії у inode %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Ðе вдалоÑÑ Ñ–Ñ‚ÐµÑ€Ð°Ñ‚Ð¸Ð²Ð½Ð¾ пройтиÑÑ Ð·Ð° розширеннÑми у @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i має некоректне розширеннÑ\n"
+"\t(логічний блок %c, некоректний фізичний блок %b, довжина %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"@i %i має некоректне розширеннÑ\n"
+"\t(логічний блок %c, фізичний блок %b, некоректна довжина %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "Ð´Ð»Ñ @i %i вÑтановлено прапорець EXTENTS_FL на файловій ÑиÑтемі без підтримки розширень.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "@i %i запиÑано у форматі розширеннÑ, але у Ñуперблоці немає можливоÑÑ‚Ñ– EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "@i %i не має EXTENT_FL, але його запиÑано у форматі розширеннÑ\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Ð”Ð»Ñ ÑˆÐ²Ð¸Ð´ÐºÐ¾Ð³Ð¾ Ñимволічного поÑÐ¸Ð»Ð°Ð½Ð½Ñ %i вÑтановлено EXTENT_FL. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i має невпорÑдковані розширеннÑ\n"
+"\t(некоректний логічний блок %c, фізичний блок %b, довжина %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "@i %i міÑтить некоректний вузол Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¾Ñ— карти блоків підклаÑтера: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "@i квоти не є звичайним файлом. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "@i квоти не викориÑтовуєтьÑÑ, але міÑтить дані. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "@i квоти Ñ” видимим кориÑтувачеві. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "Помилковий @i блоку виглÑдає некоректним. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"@i %i має Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð½ÑƒÐ»ÑŒÐ¾Ð²Ð¾Ñ— довжини\n"
+"\t(некоректний логічний блок %c, фізичний блок %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "здаєтьÑÑ, @i %i міÑтить мотлох. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "@i %i пройшов перевірку, але контрольна Ñума не відповідає @i. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "розширений атрибут @i %i пошкоджено (конфлікт розміщеннÑ). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"блок Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ @i %i пройшов перевірку, але контрольна Ñума не відповідає розширенню\n"
+"\t(логічний блок %c, фізичний блок %b, довжина %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "блок розширеного атрибута @i %i %b пройшов перевірку, але контрольна Ñума не відповідає блокові. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Внутрішній розширений рівень вузла %N @i %i:\n"
+"Логічний початок %b не відповідає логічному початку %c на наÑтупному рівні. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i, кінець Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ²Ð¸Ñ‰ÑƒÑ” дозволене значеннÑ\n"
+"\t(логічний блок %c, фізичний блок %b, довжина %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "@i %i міÑтить вбудовані дані, але у Ñуперблоку немає влаÑтивоÑÑ‚Ñ– INLINE_DATA\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "Ð´Ð»Ñ @i %i вÑтановлено прапорець INLINE_DATA_FL на файловій ÑиÑтемі без підтримки вбудованих даних.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "@i %i, блок %b конфліктує із критичними метаданими, пропуÑкаємо перевірки блоків.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "@i каталогу %i, блок %b, має бути у блоці %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "@i каталогу %i позначено Ñк неініціалізований у блоці %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"логічний блок @i %i %b (фізичний блок %c) порушує правила розподілу клаÑтерів.\n"
+"Буде виправлено на кроці 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "Ð´Ð»Ñ @i %i вÑтановлено прапорець INLINE_DATA_FL, але відповідного атрибута не знайдено. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Ð”Ð»Ñ Ñпеціального файла (приÑтрою/Ñокета/fifo, (@i %i))\n"
+"вÑтановлено Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð°Ð±Ð¾ прапорець вбудованих даних. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "@i %i має розширений заголовок, але вÑтановлено прапорець вбудованих даних.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "здаєтьÑÑ, @i %i міÑтить вбудовані дані, але Ð´Ð»Ñ Ð½ÑŒÐ¾Ð³Ð¾ вÑтановлено прапорець розширеннÑ.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "здаєтьÑÑ, @i %i міÑтить карту блоків, але вÑтановлено прапорці вбудованих даних Ñ– розширеннÑ.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "@i %i міÑтить вбудовані дані Ñ– вÑтановлено прапорці розширеннÑ, але у i_block міÑтитьÑÑ Ð¼Ð¾Ñ‚Ð»Ð¾Ñ….\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "У ÑпиÑку пошкоджених блоків повідомлÑєтьÑÑ, що @i ÑпиÑку пошкоджених блоків пошкоджено. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "помилка під Ñ‡Ð°Ñ Ñпроби розміÑтити Ñтруктуру Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ€ÐµÐ³Ñ–Ð¾Ð½Ñ–Ð² розширеннÑ. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i міÑтить Ð´ÑƒÐ±Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ð²â€™Ñзки розширень\n"
+"\t(логічний блок %c, некоректний фізичний блок %b, довжина %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "@A %N байтів пам'ÑÑ‚Ñ– Ð´Ð»Ñ Ð·Ð°ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¾Ð³Ð¾ ÑпиÑку @i\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "дерево розширень @i %i могло б бути вужчим (%b; могло бути <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "@i %i на файловій ÑиÑтемі bigalloc не може бути пов’Ñзане із блоком. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "@i %i має пошкоджений заголовок розширень. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "ЧаÑові позначки на @i %i піÑÐ»Ñ 4 ÐºÐ²Ñ–Ñ‚Ð½Ñ 2310 року ймовірно Ñ” чаÑовими позначками періоду чаÑу до 1970 року.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i міÑтить @I @a Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ @i %N.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "@i %i міÑтить @n @a. EA @i %N не міÑтить Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ EA_INODE.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"EA @i %N Ð´Ð»Ñ Ð±Ð°Ñ‚ÑŒÐºÑ–Ð²Ñького @i %i не міÑтить Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ EA_INODE.\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "@i %i позначено Ñк неініціалізований у блоці %c (довжина %N). "
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "Ð´Ð»Ñ @i %i вÑтановлено прапорець Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð´Ð¾ нижнього регіÑтру, але він не Ñ” каталогом. "
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"Ð´Ð»Ñ @dу %p вÑтановлено прапорець Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð´Ð¾ нижнього регіÑтру, але\n"
+"можливіÑÑ‚ÑŒ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ðµ увімкнено. "
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "Ð”Ð»Ñ @i %i вÑтановлено прапорець шифруваннÑ, але не @a шифруваннÑ.\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "Зашифрований @i %i має пошкоджений @a шифруваннÑ.\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "@h %i викориÑтовує верÑÑ–ÑŽ хешу (%N), а має викориÑтовувати SipHash (6) \n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "@h %i викориÑтовує SipHash, а не має цього робити. "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Виконуємо додаткові проходи Ð´Ð»Ñ ÑƒÑÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑ–Ð², Ñкі викориÑтано понад одним @i...\n"
+"Прохід 1B: повторюємо ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð±Ð»Ð¾ÐºÑ–Ð² кратного викориÑтаннÑ\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "блок(и) кратного викориÑÑ‚Ð°Ð½Ð½Ñ Ñƒ @i %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ inode (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ñпроби Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ @i (@i_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ñ–Ñ‚ÐµÑ€Ð°Ñ†Ñ–Ñ— над блоками у @i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби ÐºÐ¾Ñ€Ð¸Ð³ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÑ–Ð»ÑŒÐºÐ¾ÑÑ‚Ñ– поÑилань Ð´Ð»Ñ Ð±Ð»Ð¾ÐºÑƒ розширеного атрибута %b (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Прохід 1C: шукаємо у каталогах @i з кратним викориÑтаннÑм блоків\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Прохід 1D: узгоджуємо блоки кратного викориÑтаннÑ\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Файл %Q (@i %i, Ñ‡Ð°Ñ Ð²Ð½ÐµÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½: %IM) \n"
+" має %r блоків кратного викориÑтаннÑ, Ñкі Ñ” Ñпільними з %N файлами:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i %i, Ñ‡Ð°Ñ Ð²Ð½ÐµÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½: %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<метадані файлової ÑиÑтеми>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(ІÑнує %N @i, що міÑÑ‚ÑÑ‚ÑŒ блоки кратного викориÑтаннÑ.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"блоки кратного викориÑÑ‚Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ повторно призначено або клоновано.\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Ðе вдалоÑÑ ÐºÐ»Ð¾Ð½ÑƒÐ²Ð°Ñ‚Ð¸ файл: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Прохід 1A: оптимізуємо ієрархії розширень\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Ðе вдалоÑÑ Ð¾Ð¿Ñ‚Ð¸Ð¼Ñ–Ð·ÑƒÐ²Ð°Ñ‚Ð¸ ієрархію розширень %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "Оптимізуємо ієрархії розширень: "
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°: дерево макÑимального Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ñ” надто великим (%b; мало бути=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "дерево розширень @i %i (на рівні %b) мало б бути коротшим. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "дерево розширень @i %i (на рівні %b) мало б бути вужчим. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Прохід 2: перевірÑємо Ñтруктуру каталогів\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "некоректний номер @i Ð´Ð»Ñ Â«.» у @i каталогу %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E міÑтить некоректний @i з номером %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E міÑтить вилучений або невикориÑтаний @i %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "@E @L на «.» "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E вказує на @i (%Di), розташований у помилковому блоці.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E @L на каталог %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "@E @L на @r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E міÑтить некоректні Ñимволи у назві.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Пропущено «.» у inode каталогу %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Ðе виÑтачає «..» у @i каталогу %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Першим запиÑом «%Dn» (@i=%Di) у @i каталогу %i (%p) має бути «.»\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Другим запиÑом «%Dn» (@i=%Di) у @i каталогу %i має бути «..»\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr Ð´Ð»Ñ inode дорівнює %IF, має бути нульовим.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, а має бути нуль.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high Ð´Ð»Ñ %Id, має бути нулем.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N, а має бути нуль.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N, а має бути нуль.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) має некоректний режим (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@i каталогу %i, %B, відÑтуп %N: каталог пошкоджено\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "inode каталогу %i, %B, відÑтуп %N: назва файла Ñ” надто довгою\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "@i каталогу %i міÑтить нерозподілений %B. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Ð·Ð°Ð¿Ð¸Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ «.» у @i каталогу %i не завершено Ñимволом NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "Ð·Ð°Ð¿Ð¸Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ «..» у @i каталогу %i не завершено Ñимволом NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) Ñ” некоректним Ñимвольним приÑтроєм.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) Ñ” некоректним блоковим приÑтроєм.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E Ñ” дублікатом запиÑу «.».\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E Ñ” дублікатом запиÑу «..».\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°: не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ dir_info Ð´Ð»Ñ %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E має rec_len %Dr, має бути %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ñпроби розміÑтити Ñтруктуру icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ñ–Ñ‚ÐµÑ€Ð°Ñ†Ñ–Ñ— ÑпиÑком блоків каталогів: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ каталогу %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби запиÑати блок каталогу %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "помилка під Ñ‡Ð°Ñ Ñпроби розміÑтити новий блок каталогу Ð´Ð»Ñ @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "Ð·Ð°Ð¿Ð¸Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ Ð´Ð»Ñ Â«.» у %p (%i) Ñ” великим.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) є некоректним FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) Ñ” некоректним Ñокетом.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Ð’Ñтановлюємо тип файла Ð´Ð»Ñ @E у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E належить до некоректного типу файлів (було %Dt, має бути %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "@E має уÑтановлений тип файла.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "@E має назву нульової довжини.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Символічне поÑÐ¸Ð»Ð°Ð½Ð½Ñ %Q (@i #%i) Ñ” некоректним.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "блок розширеного атрибута @F некоректним (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "файлова ÑиÑтема міÑтить великі файли, але не має Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ LARGE_FILE у Ñуперблоці.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "проблема у inode каталогу HTREE %d: немає поÑиланнÑ\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "проблема у inode каталогу HTREE %d: подвійне поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° %B\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "проблема у @i каталогу HTREE %d: %B має помилкову мінімальну хеш-Ñуму\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "проблема у @i каталогу HTREE %d: %B має помилкову макÑимальну хеш-Ñуму\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "некоректний inode каталогу HTREE %d (%q). "
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "@f міÑтить великі каталоги, але не має визначеного Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ LARGE_DIR у Ñуперблоці.\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "проблема у @i каталогу HTREE %d (%q): помилковий номер блоку %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "проблема у @i каталогу HTREE %d: кореневий вузол є некоректним\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "проблема у @i каталогу HTREE %d: %B має некоректне Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "проблема у @i каталогу HTREE %d: %B має некоректну кількіÑÑ‚ÑŒ (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "проблема у @i каталогу HTREE %d: %B має невпорÑдковану таблицю хешів\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "проблема у @i каталогу HTREE %d: %B має некоректний рівень вкладеноÑÑ‚Ñ– (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "ВиÑвлено дублікат запиÑу. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"У запиÑÑ– міÑтитьÑÑ Ð½ÐµÑƒÐ½Ñ–ÐºÐ°Ð»ÑŒÐ½Ð° назва файла.\n"
+"Перейменовуємо на %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"ВиÑвлено дублікат запиÑу «%Dn».\n"
+"\tПозначаємо %p (%i) Ð´Ð»Ñ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¾Ñ— побудови.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, має бути нуль.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Ðеочікуваний блок у @i каталогу HTREE %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E поÑилаєтьÑÑ Ð½Ð° @i %Di у групі %g, де вÑтановлено _INODE_UNINIT.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E поÑилаєтьÑÑ Ð½Ð° @i %Di, Ñкий знайдено у облаÑÑ‚Ñ– невикориÑтаних @i групи %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, має бути нуль.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "проблема у @i каталогу HTREE %d: кореневий вузол не пройшов перевірки контрольною Ñумою\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "проблема у @i каталогу HTREE %d: внутрішній вузол не пройшов перевірки контрольною Ñумою\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@i каталогу %i, %B, відÑтуп %N: каталог не має контрольної Ñуми.\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "@i %i каталогу, %B: каталог пройшов перевірку, але має невідповідну контрольну Ñуму.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Розмір @i %i вбудованого каталогу (%N) має бути кратним до 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Спроба Ð²Ð¸Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ @i %i вбудованого каталогу зазнала невдачі.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "Зашифрований @E є надто коротким.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "Зашифрований @E поÑилаєтьÑÑ Ð½Ð° незашифрований @i %Di.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "Зашифрований @E поÑилаєтьÑÑ Ð½Ð° @i %Di, Ð´Ð»Ñ Ñкого визначено інші правила шифруваннÑ.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "@E міÑтить некоректні Ñимволи UTF-8 у назві.\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "ВиÑвлено Ð´ÑƒÐ±Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ð·Ð²Ð¸ файла — @E. "
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Прохід 3: перевірÑємо можливіÑÑ‚ÑŒ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "кореневий inode не розміщено. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "ÐедоÑтатньо міÑÑ†Ñ Ð´Ð»Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ @l. "
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "Ðез'єднаний @i %i (was in %q)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/@l не знайдено. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "«..» у %Q (%i) дорівнює %P (%j), має бути %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Помилковий каталог /@l або каталогу не Ñ–Ñнує. Повторне Ð¿Ñ€Ð¸Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½ÐµÐ¼Ð¾Ð¶Ð»Ð¸Ð²Ðµ.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ð½ÑƒÑ‚Ð¸ /@l: %m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Ðе вдалоÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¾ приєднати %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби знайти /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b: Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ %m під Ñ‡Ð°Ñ Ñпроби Ñтворити каталогу /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ %m під Ñ‡Ð°Ñ Ñпроби Ñтворити каталогу /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: %m під Ñ‡Ð°Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ каталогу\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_block: %m під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу блоку каталогу Ð´Ð»Ñ /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби ÐºÐ¾Ñ€Ð¸Ð³ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÑ–Ð»ÑŒÐºÐ¾ÑÑ‚Ñ– @i на @i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Ðе вдалоÑÑ Ð²Ð¸Ð¿Ñ€Ð°Ð²Ð¸Ñ‚Ð¸ батьківÑький вузол @i %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Ðе вдалоÑÑ Ð²Ð¸Ð¿Ñ€Ð°Ð²Ð¸Ñ‚Ð¸ батьківÑький каталог @i %i: не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ Ð·Ð°Ð¿Ð¸Ñ Ð±Ð°Ñ‚ÑŒÐºÑ–Ð²Ñького каталогу\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ¾Ñ€ÐµÐ½ÐµÐ²Ð¾Ð³Ð¾ каталогу (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "кореневий @i не є каталогом; перериваємо обробку.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "ÐŸÑ€Ð¾Ð´Ð¾Ð²Ð¶ÐµÐ½Ð½Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ без кореневого @i неможливе.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l не є каталогом (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/@l міÑтить вбудовані дані\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити дані /@l.\n"
+"Розташовуємо втрачені файли у кореневому каталозі"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"ÐедоÑтатньо вільного міÑÑ†Ñ Ð´Ð»Ñ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ‚Ñ€Ð°Ñ‡ÐµÐ½Ð¸Ñ… файлів!\n"
+"ПереÑуньте ÑкіÑÑŒ дані з файлової ÑиÑтеми Ñ– повторно запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck.\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/@l зашифровано\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "РекурÑивне Ð·Ð°Ñ†Ð¸ÐºÐ»ÐµÐ½Ð½Ñ @i каталогу %i (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Прохід 3A: оптимізуємо каталоги\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Ðе вдалоÑÑ Ñтворити ітератор dirs_to_hash: %m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Ðе вдалоÑÑ Ð¾Ð¿Ñ‚Ð¸Ð¼Ñ–Ð·ÑƒÐ²Ð°Ñ‚Ð¸ каталог %q (%d): %m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "Оптимізуємо каталоги: "
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Прохід 4: перевірÑємо кількоÑÑ‚Ñ– поÑилань\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "нез’єднаний @i нульової довжини %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "нез’єднаний @i %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "кількіÑÑ‚ÑŒ поÑилань @i %i дорівнює %Il, а має бути %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"УВÐГÐ: ПОМИЛКРУ КОДІ E2FSCK!\n"
+"\tÐБО ХТОСЬ (ВИ) ПЕРЕВІРЯЄ ЗМОÐТОВÐÐУ (РОБОЧУ) ФÐЙЛОВУ СИСТЕМУ.\n"
+"@i_link_info[%i] дорівнює %N, а @i.i_links_count дорівнює %Il. Ці Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°ÑŽÑ‚ÑŒ бути однаковими!\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "кількіÑÑ‚ÑŒ поÑилань @i %i дорівнює %N, а має бути %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "@d міÑтить забагато поÑилань, але у Ñуперблоці немає можливоÑÑ‚Ñ– DIR_NLINK.\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "Ð”Ð»Ñ @i @dу %i лічильник поÑилань вÑтановлено у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ, але він міг би бути точним значеннÑм %N. "
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Прохід 5: перевірÑємо інформацію резюме щодо груп\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "Ðе вÑтановлено Ð´Ð¾Ð¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ Ð½Ð°Ð¿Ñ€Ð¸ÐºÑ–Ð½Ñ†Ñ– бітової карти inode. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "Ðе вÑтановлено Ð´Ð¾Ð¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ Ð½Ð°Ð¿Ñ€Ð¸ÐºÑ–Ð½Ñ†Ñ– бітової карти блоків. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "відмінноÑÑ‚Ñ– у бітовій карті блоків: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "відмінноÑÑ‚Ñ– у бітовій карті @i: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "КількіÑÑ‚ÑŒ вільних @i у групі %g Ñ” помилковою (%i, нараховано=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Помилкова кількіÑÑ‚ÑŒ каталогів Ð´Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸ %g (%i, пораховано=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Помилкова кількіÑÑ‚ÑŒ @i (%i, обчиÑлено=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Помилкова кількіÑÑ‚ÑŒ вільних блоків Ð´Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸ %g (%b, нараховано=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Помилкова кількіÑÑ‚ÑŒ вільних блоків (%b, нараховано=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "ПОМИЛКРУ КОДІ: кінцеві точки бітової картки файлової ÑиÑтеми (%N) (%b, %c) не збігаютьÑÑ Ñ–Ð· обчиÑленими кінцевими точками бітової карти (%i, %j)\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°: помилкове Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¾Ñ— карти (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ ÐºÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð¼Ñ–Ð½Ð½Ð¸ÐºÐ° бітової карти @i: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ ÐºÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¾Ñ— карти блоків: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "блоки групи %g викориÑтовуютьÑÑ, але групу позначено Ñк BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "inode групи %g викориÑтовуютьÑÑ, але групу позначено Ñк INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "група %g, бітова карта @i не відповідає контрольній Ñумі.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "група %g, бітова карта блоків не відповідає контрольній Ñумі.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "Повторно Ñтворюємо журнал"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "Оновити дані щодо квоти Ð´Ð»Ñ Ñ‚Ð¸Ð¿Ñƒ квоти %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… щодо контрольної Ñуми групи блоків: %m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу даних щодо файлової ÑиÑтеми: %m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу Ð´Ð»Ñ Ð²Ð¸Ñ‚Ð¸Ñ€Ð°Ð½Ð½Ñ Ð½Ð° приÑтрій Ð·Ð±ÐµÑ€Ñ–Ð³Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…: %m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби запиÑати дані щодо квот Ð´Ð»Ñ Ñ‚Ð¸Ð¿Ñƒ квоти %N: %m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Код непридатної до обробки помилки (0x%x)!\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "ПРОІГÐОРОВÐÐО"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "у move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "ВикориÑтано пам’ÑÑ‚Ñ–: %lu, витрачено чаÑу: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "розмір inode=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "під Ñ‡Ð°Ñ Ð¿Ð¾Ñ‡Ð°Ñ‚ÐºÐ¾Ð²Ð¾Ð³Ð¾ ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ inode"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "на початку ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ inode"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ inode"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ ext2fs_block_iterate Ð´Ð»Ñ inode %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ ext2fs_adjust_ea_refcount2 Ð´Ð»Ñ inode %u"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "Обрізаємо"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "ЧищеннÑ"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"КориÑтуваннÑ: %s [-panyrcdfktvDFV] [-b Ñуперблок] [-B розмір блоку]\n"
+"\t\t[-l|-L файл пошкоджених блоків] [-C fd] [-j зовнішній журнал]\n"
+"\t\t[-E додаткові параметри] [-z файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹] приÑтрій\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Термінова довідка:\n"
+" -p автоматичне Ð²Ð¸Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð½Ñ (без додаткових запитань)\n"
+" -n не вноÑити змін до файлової ÑиÑтеми\n"
+" -y відповіÑти на уÑÑ– Ð¿Ð¸Ñ‚Ð°Ð½Ð½Ñ Â«Ñ‚Ð°ÐºÂ»\n"
+" -c знайти пошкоджені блоки Ñ– додати Ñ—Ñ… до ÑпиÑку\n"
+" -f примуÑова перевірка, навіть Ñкщо ÑиÑтему позначено Ñк непошкоджену\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v режим докладних повідомлень\n"
+" -b Ñуперблок викориÑтовувати альтернативний Ñуперблок\n"
+" -B розмір_блоку примуÑово визначити розмір Ð´Ð»Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ Ñуперблоку\n"
+" -j зовн_журналу вказати Ñ€Ð¾Ð·Ñ‚Ð°ÑˆÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ журналу\n"
+" -l файл_пом_блоків додати до ÑпиÑку помилкових блоків\n"
+" -L файл_пом_блоків вказати ÑпиÑок помилкових блоків\n"
+" -z файл_ÑÐºÐ°Ñ Ñтворити файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u файлів (%0d.%d%% розривних), %llu/%llu блоків\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"ВикориÑтано %12u inode (%2.2f%% з %u)\n"
+msgstr[1] ""
+"\n"
+"ВикориÑтано %12u inode (%2.2f%% з %u)\n"
+msgstr[2] ""
+"\n"
+"ВикориÑтано %12u inode (%2.2f%% з %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u розривний файл (%0d.%d%%)\n"
+msgstr[1] "%12u розривних файла (%0d.%d%%)\n"
+msgstr[2] "%12u розривних файлів (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u розривний каталог (%0d.%d%%)\n"
+msgstr[1] "%12u розривних каталоги (%0d.%d%%)\n"
+msgstr[2] "%12u розривних каталогів (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " К-ть inode з блоками ind/dind/tind: %u/%u/%u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " ГіÑтограма глибини розширеннÑ: "
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "викориÑтано %12llu блок (%2.2f%% з %llu)\n"
+msgstr[1] "викориÑтано %12llu блоки (%2.2f%% з %llu)\n"
+msgstr[2] "викориÑтано %12llu блоків (%2.2f%% з %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u помилковий блок\n"
+msgstr[1] "%12u помилкові блоки\n"
+msgstr[2] "%12u помилкових блоків\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u великий файл\n"
+msgstr[1] "%12u великих файла\n"
+msgstr[2] "%12u великих файлів\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u звичайний файл\n"
+msgstr[1] ""
+"\n"
+"%12u звичайних файла\n"
+msgstr[2] ""
+"\n"
+"%12u звичайних файлів\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u каталог\n"
+msgstr[1] "%12u каталоги\n"
+msgstr[2] "%12u каталогів\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u файл Ñимвольних приÑтроїв\n"
+msgstr[1] "%12u файли Ñимвольних приÑтроїв\n"
+msgstr[2] "%12u файлів Ñимвольних приÑтроїв\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u файл блокових приÑтроїв\n"
+msgstr[1] "%12u файли блокових приÑтроїв\n"
+msgstr[2] "%12u файлів блокових приÑтроїв\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifo\n"
+msgstr[2] "%12u fifo\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u поÑиланнÑ\n"
+msgstr[1] "%12u поÑиланнÑ\n"
+msgstr[2] "%12u поÑилань\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u Ñимволічне поÑиланнÑ"
+msgstr[1] "%12u Ñимволічних поÑиланнÑ"
+msgstr[2] "%12u Ñимволічних поÑилань"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u швидке Ñимволічне поÑиланнÑ)\n"
+msgstr[1] " (%u швидких Ñимволічних поÑиланнÑ)\n"
+msgstr[2] " (%u швидких Ñимволічних поÑилань)\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u Ñокет\n"
+msgstr[1] "%12u Ñокети\n"
+msgstr[2] "%12u Ñокетів\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u файл\n"
+msgstr[1] "%12u файли\n"
+msgstr[2] "%12u файлів\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "під Ñ‡Ð°Ñ Ñпроби визначити, чи змонтовано %s."
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Увага! %s змонтовано.\n"
+
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Увага! %s викориÑтовуєтьÑÑ.\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s змонтовано.\n"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s викориÑтовуєтьÑÑ.\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"ÐŸÑ€Ð¾Ð´Ð¾Ð²Ð¶ÐµÐ½Ð½Ñ Ð½ÐµÐ¼Ð¾Ð¶Ð»Ð¸Ð²Ðµ, перериваємо роботу.\n"
+"\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"УВÐГÐ!!! Файлову ÑиÑтему змонтовано. Якщо Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð´Ñ–Ñ— буде продовжено,\n"
+"можливі ***ЗÐÐЧÐІ*** ÑƒÑˆÐºÐ¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми.\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "Ви дійÑно бажаєте продовжити"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "перевірку перервано.\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " міÑтить файлову ÑиÑтему з помилками"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " не було демонтовано у штатному режимі"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " можливоÑÑ‚Ñ– оÑновного Ñуперблоку відрізнÑєтьÑÑ Ð²Ñ–Ð´ можливоÑтей у резервній копії"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " змонтовано %u разів без перевірки"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " міÑтить файлову ÑиÑтему, Ñ‡Ð°Ñ Ð¾Ñтанньої перевірки Ñкої перебуває у майбутньому"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " пройшло %u днів без перевірки"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "ігноруємо інтервал перевірки, вÑтановлено broken_system_clock\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ", примуÑова перевірка.\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: без помилок, %u/%u файлів, %llu/%llu блоків"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr " (перевірку відкладено, працюємо від акумулÑтора)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr " (перевірка піÑÐ»Ñ Ð½Ð°Ñтупного монтуваннÑ)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (перевірка за %ld монтувань)"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ПОМИЛКÐ: не вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ /dev/null (%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "Ðекоректна верÑÑ–Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð¾Ð³Ð¾ атрибута.\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "Ðекоректний розмір буфера випереджального читаннÑ.\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Ðевідомий розширений параметр: %s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Додаткові параметри Ñлід відокремлювати комами. Додаткові параметри можуть\n"
+"приймати аргументи, Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñких вÑтановлюютьÑÑ Ð·Ð° допомогою знаку рівноÑÑ‚Ñ– (=).\n"
+"Коректні додаткові параметри:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<ea_version (1 або 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<розмір буфера>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"СинтакÑична помилка у файлі налаштувань e2fsck (%s, Ñ€Ñдок %d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби виконати перевірку деÑкриптора файла %d: %s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "Ðекоректний деÑкриптор файла даних Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾Ð³Ð¾ доповненнÑ"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Можна викориÑтовувати лише один з набору параметрів -p/-a, -n та -y."
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Підтримки параметра -t у цій верÑÑ–Ñ— e2fsck не передбачено.\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»"
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "Параметри -n Ñ– -D Ñ” взаємно неÑуміÑними."
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "Параметри -n Ñ– -c Ñ” взаємно неÑуміÑними."
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Параметри -n Ñ– -l/-L Ñ” взаємно неÑуміÑними."
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Параметри -D Ñ– -E fixes_only Ñ” неÑуміÑними."
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Параметри -E bmap2extent Ñ– fixes_only Ñ” неÑуміÑними."
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ %s Ð´Ð»Ñ ÑпорожненнÑ"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÐ¿Ð¾Ñ€Ð¾Ð¶Ð½ÐµÐ½Ð½Ñ %s"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Параметри -c Ñ– -l/-L не можна викориÑтовувати одночаÑно.\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG «%s» не Ñ” цілими чиÑлом\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Ðекоректний нечиÑловий аргумент параметра -%c (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "Інтервал MMP дорівнює %u Ñекунд, а загальний Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾Ñ€Ñ–Ð²Ð½ÑŽÑ” %u Ñекунд. Будь лаÑка, зачекайте...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "під Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸ блоку MMP"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Якщо ви впевнені, що файлова ÑиÑтема не викориÑтовуєтьÑÑ Ð¶Ð¾Ð´Ð½Ð¸Ð¼ вузлом. Віддайте команду:\n"
+"«tune2fs -f -E clear_mmp %s»\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ MMP"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"ПерезапиÑуємо наÑвну файлову ÑиÑтему; ÑкаÑувати перезапиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð½Ð° за допомогою команди:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби вилучити %s"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° даних Ð´Ð»Ñ ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Помилка: заÑтаріла верÑÑ–Ñ Ð±Ñ–Ð±Ð»Ñ–Ð¾Ñ‚ÐµÐºÐ¸ ext2fs!\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ініціалізувати програму"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tВикориÑтовуємо %s, %s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾Ð³Ð¾ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð½ÐµÐ¾Ð±Ñ…Ñ–Ð´Ð½Ð¸Ð¹ термінал"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s, намагаємоÑÑ Ñтворити резервні копії блоків...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "Ðекоректний Ñуперблок,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "Ймовірно, деÑкриптори груп Ñ” помилковими…"
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑ–Ð² резервної копії"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: повертаємоÑÑ Ð´Ð¾ початкового Ñуперблоку\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Ðомер модифікації файлової ÑиÑтеми Ñ” надто великим Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— верÑÑ–Ñ— e2fsck.\n"
+"(або Ñуперблок файлової ÑиÑтеми пошкоджено)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "Можливо, це розділ з нульовою довжиною?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Вам потрібен доÑтуп %s до файлової ÑиÑтеми або адмініÑтративний доÑтуп (root)\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Можливо, приÑтрою не Ñ–Ñнує або це приÑтрій резервної пам’ÑÑ‚Ñ– (Ñвопінгу)?\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Файлову ÑиÑтему змонтовано або відкрито іншою програмою у режимі, що виключає доÑтуп Ñторонніх програм?\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "Можливо, приÑтрою не Ñ–Ñнує?\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"ДиÑк захищено від запиÑу; ÑкориÑтайтеÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ -n длÑ\n"
+"Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸ диÑка читаннÑм.\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: намагаємоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ Ñуперблок, незважаючи на помилки...\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "Ð’Ñтановіть новішу верÑÑ–ÑŽ e2fsck!"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "під Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸ журналу %s"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "ÐŸÑ€Ð¾Ð´Ð¾Ð²Ð¶ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸ файлової ÑиÑтеми неможливе"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "ПопередженнÑ: не виконуємо Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ, оÑкільки перевірка виконуєтьÑÑ Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми, доÑтуп до Ñкої здійÑнюєтьÑÑ Ñƒ режимі лише читаннÑ.\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "не вдалоÑÑ Ð²Ñтановити прапорці Ñуперблоку на %s\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "ВиÑвлено помилку контрольної Ñуми у %s\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "У %s пошкоджено журнал\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "під Ñ‡Ð°Ñ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ %s"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s має непідтримувані можливоÑÑ‚Ñ–:"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s міÑтить непідтримувані дані щодо кодуваннÑ: %0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ inode пошкоджених блоків\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Прогнозуванню не піддаєтьÑÑ, але ми Ñпробуємо щоÑÑŒ зробити...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Створюємо журнал (%d блоків): "
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr " Виконано.\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** журнал було Ñтворено повторно ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "перервано"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: обробку за допомогою e2fsck ÑкаÑовано.\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "ПерезапуÑкаємо e2fsck з початку...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "під Ñ‡Ð°Ñ ÑÐºÐ¸Ð´Ð°Ð½Ð½Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** ВИПРÐВЛЕÐО ПОМИЛКИ ФÐЙЛОВОЇ СИСТЕМИ *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: внеÑено зміни до файлової ÑиÑтеми.\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** ДО ФÐЙЛОВОЇ СИСТЕМИ БУЛО Ð’ÐЕСЕÐО ЗМІÐИ *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** ПЕРЕЗÐÐ’ÐÐТÐЖТЕ СИСТЕМУ *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** ПОПЕРЕДЖЕÐÐЯ: у файловій ÑиÑтемі уÑе ще Ñ” помилки **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "yYтТ"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nNнÐ"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "aAуУ"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr " («a» вмикає «yes/так» Ð´Ð»Ñ ÑƒÑÑ–Ñ…) "
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<y>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (y/n або т/н)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "ÑкаÑовано.\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "«так» Ð´Ð»Ñ ÑƒÑÑ–Ñ…\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "так\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "ні\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? ні\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? так\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "так"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "ні"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: некоректні блоки бітової карти Ð´Ð»Ñ %s"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… карт inode та блоків"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "під Ñ‡Ð°Ñ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€ÐµÐ½Ð½Ñ Ñпроби Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… карт Ð´Ð»Ñ %s"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "запиÑуємо бітові карти блоків та inode"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "під Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿Ð¸Ñу блоку та бітових карт inode Ð´Ð»Ñ %s"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: ÐЕОЧІКУВÐÐРВТРÐТРЦІЛІСÐОСТІ; ЗÐПУСТІТЬ fsck ВРУЧÐУ.\n"
+"\t(тобто без параметрів -a та -p)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "ВикориÑтано пам'ÑÑ‚Ñ–: %lluk з %lluk (%lluk з %lluk), "
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "ВикориÑтано пам'ÑÑ‚Ñ–: %lluk, "
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "чаÑ: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "витрачено чаÑу: %6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ inode %lu у %s"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу inode %lu до %s"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "ÐЕОЧІКУВÐÐРВТРÐТРЦІЛІСÐОСТІ: під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ fsck до файлової ÑиÑтеми було внеÑено зміни.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "виконано \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"КориÑтуваннÑ: %s [-b розмір_блоку] [-i вхідний_файл] [-o файл_виведеннÑ] [-svwnfBX]\n"
+" [-c блоків_одночаÑно] [-d коеф_затримки_між_читаннÑми] [-e макÑ_пошк_блоків]\n"
+" [-p к-Ñ‚ÑŒ_проходів] [-t теÑÑ‚_зразок [-t теÑÑ‚_зразок [...]]]\n"
+" приÑтрій [оÑтанній_блок [перший_блок]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: параметри -n Ñ– -w не можна викориÑтовувати одночаÑно.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "Виконано на %6.2f%%, лишилоÑÑ %s. (помилки: %d/%d/%d)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "ТеÑÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð· випадковим взірцем: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "ТеÑÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ñ– взірцем 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "під Ñ‡Ð°Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Дивне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (%ld) у do_read\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ ext2fs_sync_device"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "на початку ітерації ÑпиÑком помилкових блоків"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð±ÑƒÑ„ÐµÑ€Ñ–Ð² у пам’ÑÑ‚Ñ–"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "ПеревірÑємо блоки з %lu до %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Шукаємо помилкові блоки у режимі лише читаннÑ\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "ПеревірÑємо наÑвніÑÑ‚ÑŒ помилкових блоків (перевірка лише читаннÑм): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Занадто багато помилкових блоків, перериваємо перевірку\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Шукаємо помилкові блоки у режимі читаннÑ-запиÑу\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Від блоку %lu до блоку %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Ð§Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ– порівнÑннÑ: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Шукаємо помилкові блоки у режимі читаннÑ-запиÑу без Ñ€ÑƒÐ¹Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "ПеревірÑємо на пошкоджені блоки (перевірка читаннÑм-запиÑом без Ñ€ÑƒÐ¹Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"ПерериваннÑ, Ñпорожнюємо дані\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "під Ñ‡Ð°Ñ Ñ‚ÐµÑтового запиÑу даних, блок %lu"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s змонтовано; "
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "ПримуÑове Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ badblocks. СподіваємоÑÑ, що /etc/mtab міÑтить помилки.\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "запуÑкати badblocks небезпечно!\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s, ймовірно, викориÑтовуєтьÑÑ ÑиÑтемою; "
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks буде примуÑово додано попри це.\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "некоректний %s - %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Завелика макÑимальна кількіÑÑ‚ÑŒ пошкоджених блоків, %u — не може бути більшою за %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "не вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити у пам’ÑÑ‚Ñ– test_pattern - %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "У режим лише Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути вказано макÑимум одного test_pattern"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Випадкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ test_pattern у режимі лише читаннÑ"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "Ðекоректний розмір блоку: %d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ blocks_at_once: %d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Ðе вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ розмір приÑтрою; вам Ñлід вказати\n"
+"розмір вручну\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ñ–ÑткоÑÑ‚Ñ– приÑтрою"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "оÑтанній блок"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "перший блок"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "некоректний початковий блок (%llu): номер має бути меншим за %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "некоректний завершальний блок (%llu): має бути 32-бітове значеннÑ"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÑпиÑку помилкових блоків у пам’ÑÑ‚Ñ–"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "файл вхідних даних — помилковий формат"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "під Ñ‡Ð°Ñ Ð´Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð¾ ÑпиÑку пошкоджених блоків у пам’ÑÑ‚Ñ–"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Прохід завершено, знайдено %u пошкоджених блоків. (%d/%d/%d помилок)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "КориÑтуваннÑ: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p проєкт] [-v верÑÑ–Ñ] файли...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "помилковий проект - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "помилкова верÑÑ–Ñ - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ ÑтатиÑтичних даних щодо %s"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ–Ð² на %s"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Прапорці %s вÑтановлено Ñк "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "під Ñ‡Ð°Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ–Ð² на %s"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "ВерÑÑ–ÑŽ %s вÑтановлено у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "під Ñ‡Ð°Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²ÐµÑ€ÑÑ–Ñ— на %s"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Проект %s вÑтановлено Ñк %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "під Ñ‡Ð°Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ñƒ на %s"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити змінну шлÑху у chattr_dir_proc"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= Ñ” неÑуміÑним з - Ñ– +\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "Слід викориÑтовувати «-v», =, - або +\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ inode %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Â«%s»"
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу inode %u"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "під Ñ‡Ð°Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÑпиÑку атрибутів «%s»"
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити inode %u"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ xattr Ð´Ð»Ñ inode %u"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñƒ пам’ÑÑ‚Ñ–"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚Ð° «%s» «%s»"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу атрибута «%s» до inode %u"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ‚Ñ inode %u"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ inode «%s»"
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ inode «%s»"
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñимволічного поÑÐ¸Ð»Ð°Ð½Ð½Ñ Â«%s»"
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ «%s»"
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ «%s»"
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Â«%s» Ð´Ð»Ñ ÐºÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби змінити робочий каталог на «%s»"
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "під Ñ‡Ð°Ñ ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ «%s»"
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби виконати lstat Ð´Ð»Ñ Â«%s»"
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñпеціального файла «%s»"
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "невдала Ñпроба виконати malloc"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби прочитати поÑÐ¸Ð»Ð°Ð½Ð½Ñ Â«%s»"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "Ñимволічне поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð·Ñ€Ð¾Ñло у розмірі між lstat() Ñ– readlink()"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑати Ñимволічне поÑÐ¸Ð»Ð°Ð½Ð½Ñ Â«%s»"
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑати файл «%s»"
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ «%s»"
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "під Ñ‡Ð°Ñ Ñпроби змінити каталог"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "ігноруємо Ð·Ð°Ð¿Ð¸Ñ Â«%s»"
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ inode Ð´Ð»Ñ Â«%s»"
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "під Ñ‡Ð°Ñ Ñпроби вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ… атрибутів (xattr) Ð´Ð»Ñ Â«%s»"
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "під Ñ‡Ð°Ñ Ñпроби зберегти дані inode"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "під Ñ‡Ð°Ñ ÐºÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ x-атрибутів до кореневого каталогу"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "КориÑтуваннÑ: %s [-bfghimxV] [-o superblock=<номер>] [-o blocksize=<номер>] приÑтрій\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "блоки"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "клаÑтери"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Група %lu: (блоки "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " контрольна Ñума 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (ОЧІКУВÐЛОСЯ 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " Ñуперблок %s у "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "ОÑновний"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "ЗапаÑний"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", деÑкриптори груп у "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Зарезервовані блоки GDT у "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " ДеÑкриптор групи у "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Бітова карта блоків у "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", контрольна Ñума 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " бітова карта Inode у "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Inode за адреÑою "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u вільних %s, %u вільних inode, %u каталогів%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u невикориÑтаних inode\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Вільних блоків: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr "Вільних inode: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "під Ñ‡Ð°Ñ Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ ÑпиÑку помилкових блоків"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Помилкових блоків: %u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ inode журналу"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити inode журналу"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñуперблоку журналу"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Контрольна Ñума Ñуперблоку журналу Ñ” некоректною!\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñуперблоку журналу"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ контрольні Ñуми Ñуперблоку журналу"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "не вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити буфер MMP у пам'ÑÑ‚Ñ–\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "читаємо блок MMP %llu з «%s»\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ облаÑÑ‚ÑŒ пам’ÑÑ‚Ñ– Ð´Ð»Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ параметрів!\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ðекоректний параметр Ñуперблоку: %s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ðекоректний параметр розміру блоку: %s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Вказано помилкові додаткові параметри: %s\n"
+"\n"
+"Додаткові параметри Ñлід відокремлювати комами. Додаткові параметри можуть\n"
+"\tприймати аргументи, Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñких вÑтановлюютьÑÑ Ð·Ð° допомогою знаку рівноÑÑ‚Ñ– (=).\n"
+"\n"
+"Коректні додаткові параметри:\n"
+"\tsuperblock=<номер Ñуперблоку>\n"
+"\tblocksize=<розмір блоку>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tВикориÑтовуємо %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ коректний Ñуперблок файлової ÑиÑтеми.\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: можливіÑÑ‚ÑŒ MMP не увімкнено.\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… карт Ð´Ð»Ñ %s\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** ЗапуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck зараз!\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "КориÑтуваннÑ: %s [ -r|-Q ] [ -f ] [ -b Ñуперблок ] [ -B розмір_блоку] приÑтрій файл-образу\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I приÑтрій файл-образу\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o відÑтуп джерела ] [ -O відÑтуп Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ] ФС_джерела [ ФС_Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð±ÑƒÑ„ÐµÑ€Ð° у пам’ÑÑ‚Ñ–"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "ЗапиÑуємо блок %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "помилка під Ñ‡Ð°Ñ Ñпроби запиÑати блок %llu"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "помилка у generic_write()"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Помилка: розмір заголовка перевищує розмір_запиÑу\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити буфер заголовка у пам’ÑÑ‚Ñ–\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑати Ñуперблок"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑати таблицю inode"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу бітової карти блоків"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу бітової карти inode"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Пошкоджено блок каталогу %llu: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ rec_len (%d)\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Пошкоджено блок каталогу %llu: помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ name_len (%d)\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu з %llu блоків (%d%%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "Копіюємо "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Якщо зараз зупинити обробку, файлову ÑиÑтему буде зруйновано. Перервіть обробку ще раз, Ñкщо це Ñаме те, що потрібно.\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s тримаєтьÑÑ Ð½Ð° швидкоÑÑ‚Ñ– %.2f МБ/Ñ"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ %llu"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Скопійовано %llu / %llu блоків (%d%%) у %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "на швидкоÑÑ‚Ñ– %.2f МБ/Ñ"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "помилка під Ñ‡Ð°Ñ Ñпроби розміÑтити у пам’ÑÑ‚Ñ– таблицю l1"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ ÐºÐµÑˆÑƒ l2 у пам’ÑÑ‚Ñ–"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "ПопередженнÑ: під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ ÐºÐµÑˆÑƒ у ньому залишилиÑÑ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ–. ÐеможливіÑÑ‚ÑŒ розміÑтити ці таблиці призведе до втрати даних, отже образ може виÑвитиÑÑ Ð½ÐµÐºÐ¾Ñ€ÐµÐºÑ‚Ð½Ð¸Ð¼.\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñƒ пам’ÑÑ‚Ñ– ext2_qcow2_image"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ініціалізувати ext2_qcow2_image"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Помилка у коді: Ñтворено декілька поÑлідовних блоків підрахунку поÑилань!\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñƒ пам’ÑÑ‚Ñ– бітової карти блоків"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñƒ пам’ÑÑ‚Ñ– бітової карти шифрованих блоків"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "Скануємо inode...\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ пам’ÑÑ‚ÑŒ під буфер блоків"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð½Ð°Ñтупного inode"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "під Ñ‡Ð°Ñ Ñ–Ñ‚ÐµÑ€Ð°Ñ‚Ð¸Ð²Ð½Ð¾Ñ— обробки inode %u"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¾Ð±Ñ€Ð°Ð·Ñ–Ð² Raw Ñ– qcow2 неможливе"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… карт"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити файл приÑтрою"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– образу"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "Параметр -a можна викориÑтовувати лише Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð·Ñ–Ð² raw Ñ– QCOW2."
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "Параметр -b можна викориÑтовувати лише Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð·Ñ–Ð² raw Ñ– QCOW2."
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "ВідÑтупи можна викориÑтовувати лише Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð·Ñ–Ð² raw."
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "Режим переÑÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð½Ð° викориÑтовувати лише Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð·Ñ–Ð² raw."
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "Режим переÑÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±ÑƒÑ” режиму вÑÑ–Ñ… даних."
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "перевірка змонтованоÑÑ‚Ñ–"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"ЗапуÑк e2image Ð´Ð»Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ змонтованих Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ– запиÑу файлових\n"
+"ÑиÑтем може призвеÑти до Ð¿Ð¾Ñ€ÑƒÑˆÐµÐ½Ð½Ñ Ñ†Ñ–Ð»Ñ–ÑноÑÑ‚Ñ– образу, що позначитьÑÑ\n"
+"на можливоÑÑ‚Ñ– його викориÑÑ‚Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð´Ñ–Ð°Ð³Ð½Ð¾Ñтики помилок.\n"
+"СкориÑтайтеÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ -f, Ñкщо цю дію Ñлід виконати примуÑово.\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "Образ QCOW2 не можна запиÑувати до Ñтандартного Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ (stdout)!\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ виведені дані\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Образ (%s) ÑтиÑнуто\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Образ (%s) зашифровано\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Образ (%s) пошкоджено\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¾Ð±Ñ€Ð°Ð·Ñƒ qcow2 (%s) у образ raw (%s)"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "Підтримку параметра -c передбачено лише у режимі raw\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Підтримки запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾ Ñтандартного Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð· параметром -c не передбачено\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "під Ñ‡Ð°Ñ Ñпроби розміÑтити check_buf у пам’ÑÑ‚Ñ–"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "Підтримку параметра -p передбачено лише у режимі raw\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d блоків вже міÑтили дані, Ñкі Ñлід було Ñкопіювати\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "КориÑтуваннÑ: %s -r приÑтрій\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: не вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: Ð¿Ð¾Ð·Ð¸Ñ†Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ñуперблок неможливе\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: помилка під Ñ‡Ð°Ñ Ñпроби Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñуперблоку\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: не Ñ” файловою ÑиÑтемою ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "ПопередженнÑ: надто довга мітка, обрізаємо.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: повторне Ð¿Ð¾Ð·Ð¸Ñ†Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ñуперблок неможливе\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: помилка під Ñ‡Ð°Ñ Ñпроби запиÑати Ñуперблок\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "КориÑтуваннÑ: e2label приÑтрій [нова мітка]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "КориÑтуваннÑ: %s [-f] [-h] [-n] [-o offset] [-v] [-z файл ÑкаÑÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹] <файл транзакцій> <файлова ÑиÑтема>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Суперблок файлової ÑиÑтеми не відповідає файлу ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹.\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "UUID є невідповідним.\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "Ð—Ð°Ð¿Ð¸Ñ Ñ‡Ð°Ñу оÑтаннього Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ” невідповідним.\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "Ð§Ð°Ñ Ð¾Ñтаннього запиÑу Ñ” невідповідним.\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "КількіÑÑ‚ÑŒ запиÑів протÑгом Ñ–ÑÐ½ÑƒÐ²Ð°Ð½Ð½Ñ Ñ” невідповідною.\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñуперблоку файлової ÑиÑтеми."
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "під Ñ‡Ð°Ñ Ñпроби отримати Ñуперблок"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Контрольна Ñума Ñуперблоку у файлі ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹ Ñ” невідповідною.\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "Ðекоректний відÑтуп: %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð´Ð¾ файла ÑкаÑÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹ не веÑтиметьÑÑ Ð¿Ñ€Ð¾Ñ‚Ñгом його відтвореннÑ.\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹ «%s»\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "під Ñ‡Ð°Ñ Ñпроби прочитати файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: не Ñ” файлом ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹.\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: контрольна Ñума заголовка Ñ” невідповідною.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: заголовок файла ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹ пошкоджено.\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: розмір блоку піÑÐ»Ñ ÑкаÑÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ñ— Ñ” надто великим.\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: розмір блоку піÑÐ»Ñ ÑкаÑÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ñ— Ñ” надто великим.\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: невідомий набір можливоÑтей у файлі ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹.\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби визначеннÑ, чи змонтовано %s."
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo Ñлід запуÑкати лише на демонтованих файлових ÑиÑтемах"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Â«%s»"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "вказаний відÑтуп Ñ” надто великим"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ ÐºÐ»ÑŽÑ‡Ñ–Ð²"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: помилкова контрольна Ñума ключа у %llu\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: помилка у контрольній Ñумі ключового блоку на %llu.\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: блок %llu є надто довгим."
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ %llu."
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "помилка контрольної Ñуми у блоці файлової ÑиÑтеми %llu (ÑкаÑÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ %llu)\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑати блок %llu."
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Файл ÑкаÑÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹ пошкоджено; запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck ЗÐРÐЗ ЖЕ!\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "Помилка введеннÑ-Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ ÑкаÑÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹; запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck ЗÐРÐЗ ЖЕ!\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Ðеповний Ð·Ð°Ð¿Ð¸Ñ ÑкаÑовуваннÑ; запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "КориÑтуваннÑ: findsuper приÑтрій [пропущені_байти [початок_у_кБ]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«Ð¿Ñ€Ð¾Ð¿ÑƒÑ‰ÐµÐ½Ñ–_байти» має бути чиÑловим, а не %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«Ð¿Ñ€Ð¾Ð¿ÑƒÑ‰ÐµÐ½Ñ–_байти» має бути кратним до розміру Ñектора\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«Ð¿Ð¾Ñ‡Ð°Ñ‚Ð¾Ðº_у_кБ» має бути чиÑлом, а не %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«Ð¿Ð¾Ñ‡Ð°Ñ‚Ð¾Ðº_у_кБ» має бути додатним, а не %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "починаємо з %llu із кроком у %u байт\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] ймовірно, Ñупербло запиÑано до Ñуперблоку журналу ext3,\n"
+"\tотже початок/кінець/grp є помилковими\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "зміщ_у_байт поч_байт кінц_байт блок_Ñ„Ñ Ñ€Ð¾Ð·_бл грп чаÑ_mkfs/mount sb_uuid мітка\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: завершено з номером помилки %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "ПОПЕРЕДЖЕÐÐЯ: не вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ %s: %s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "ПОПЕРЕДЖЕÐÐЯ: помилкове Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ Ñ€Ñдку %d у %s\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"ПОПЕРЕДЖЕÐÐЯ: у вашому файлі /etc/fstab немає Ð¿Ð¾Ð»Ñ passno\n"
+"\tfsck. Ми Ñпробуємо щоÑÑŒ зробити, але вам Ñлід виправити\n"
+"\tваш файл /etc/fstab Ñкомога швидше.\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: не знайдено\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: очікуваннÑ: не залишилоÑÑ Ð´Ð¾Ñ‡Ñ–Ñ€Ð½Ñ–Ñ… процеÑів?!?\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "ПопередженнÑ... Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ %s Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñтрою %s завершилоÑÑ Ñигналом %d.\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: Ñтан — %x, такого не повинно було ÑтатиÑÑ.\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Завершено, %s (Ñтан виходу %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: помилка %d під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ fsck.%s Ð´Ð»Ñ %s\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"ÐŸÑ€ÐµÑ„Ñ–ÐºÑ Â«no» або «!» має бути передано або вÑім або жодному з типів файлових\n"
+"ÑиÑтем, переданих до -t.\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити у пам’ÑÑ‚Ñ– типи файлових ÑиÑтем\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: пропуÑкаємо помилковий Ñ€Ñдок у /etc/fstab: Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð· прив’ÑзуваннÑм Ñ– ненульовою кількіÑÑ‚ÑŽ проходів fsck\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: не вдалоÑÑ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€Ð¸Ñ‚Ð¸ %s: на виÑвлено fsck.%s\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "Перевірка вÑÑ–Ñ… файлових ÑиÑтем.\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--очікуваннÑ-- (прохід %d)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "КориÑтуваннÑ: fsck [-AMNPRTV] [ -C [ деÑкриптор файла ] ] [-t тип ФС] [параметри ФС] [файлова ÑиÑтема ...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: забагато приÑтроїв\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: занадто багато аргументів\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "Монтуємо лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ.\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: дозволÑємо кориÑтувачам розміщувати уÑÑ– блоки. Це небезпечно!\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "Будь лаÑка, віддайте команду e2fsck -fy %s.\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: змонтовано лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±ÐµÐ· журналу відновленнÑ\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Журнал потребує відновленнÑ; Ñлід запуÑтити «e2fsck -E journal_only».\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: підтримки запиÑу до журналу не передбачено.\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "ПопередженнÑ: монтуємо неперевірену файлову ÑиÑтему, рекомендуємо запуÑтити e2fsck.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "ПопередженнÑ: доÑÑгнуто макÑимальної кількоÑÑ‚Ñ– монтувань, рекомендуємо запуÑтити e2fsck.\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "ПопередженнÑ: прийшов Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸; рекомендуємо запуÑтити e2fsck.\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "ВиÑвлено оÑиротілі блоки; рекомендуємо запуÑтити e2fsck.\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "ВиÑвлено помилки; Ñлід запуÑтити e2fsck.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "КориÑтуваннÑ: %s [-RVadlpv] [файли...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ–Ð² на %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ñƒ на %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð²ÐµÑ€ÑÑ–Ñ— на %s"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити змінну шлÑху у lsattr_dir_proc\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"КориÑтуваннÑ: %s [-c|-l назва файла] [-b розмір блоку] [-C розмір клаÑтера]\n"
+"\t[-i байтів на inode] [-I розмір inode] [-J параметри журналу]\n"
+"\t[-G розмір флекÑ-групи] [-N кількіÑÑ‚ÑŒ inode] [-d кореневий каталог]\n"
+"\t[-m відÑоток зарезервованих блоків] [-o ОС ÑтвореннÑ]\n"
+"\t[-g блоків на групу] [-L мітка тому] [-M оÑтанній змонтований каталог]\n"
+"\t[-O можливіÑÑ‚ÑŒ[,...]] [-r Ð¼Ð¾Ð´Ð¸Ñ„Ñ–ÐºÐ°Ñ†Ñ–Ñ Ð¤Ð¡] [-E розширений параметр[,...]]\n"
+"\t[-t тип ФС] [-T тип викориÑтаннÑ] [-U UUID] [-e поведінка при помилках]\n"
+"\t[-z файла ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹] [-jnqvDFSV] приÑтрій [лічильник блоків]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Ð’Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¸: %s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "під Ñ‡Ð°Ñ Ñпроби виконати «%s»"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "під Ñ‡Ð°Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ ÑпиÑку помилкових блоків з програми"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Пошкоджено блок %d у оÑновному деÑкрипторі Ñуперблоку або групи.\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "Щоб побудувати файлову ÑиÑтему, блоки від %u до %u має бути не пошкоджено.\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "Перериваємо обробку...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"ПопередженнÑ: резервні деÑкриптори Ñуперблоків або груп у блоці %u\n"
+"\tміÑÑ‚ÑÑ‚ÑŒ помилкові блоки.\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "під Ñ‡Ð°Ñ Ñпроби позначити пошкоджені блоки Ñк викориÑтані"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑу зарезервованих inode-ів"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "ЗапиÑуємо таблиці inode: "
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати %d блоків до таблиці inode, що починаєтьÑÑ Ð· %llu: %s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "виконано \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "під Ñ‡Ð°Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ¾Ñ€ÐµÐ½ÐµÐ²Ð¾Ð³Ð¾ каталогу"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ ÐºÐ¾Ñ€ÐµÐ½ÐµÐ²Ð¾Ð³Ð¾ inode"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "під Ñ‡Ð°Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… щодо влаÑника кореневого inode"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ñтворити /lost+found"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "під Ñ‡Ð°Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ /lost+found"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ /lost+found"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "під Ñ‡Ð°Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ inode помилкового блоку"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Ðе визначає пам’ÑÑ‚Ñ– Ð´Ð»Ñ Ð²Ð¸Ñ‚Ð¸Ñ€Ð°Ð½Ð½Ñ Ñекторів %d-%d\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "ПопередженнÑ: не вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ блок 0: %s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "ПопередженнÑ: не вдалоÑÑ Ð²Ð¸Ñ‚ÐµÑ€Ñ‚Ð¸ Ñектор %d: %s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "під Ñ‡Ð°Ñ Ð¿Ð¾Ð´Ñ–Ð»Ñƒ розміру журналу"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ініціалізації Ñуперблоку журналу"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "Ð—Ð°Ð½ÑƒÐ»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою журналу: "
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð½ÑƒÐ»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою журналу (блок %llu, кількіÑÑ‚ÑŒ %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑати Ñуперблок журналу"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Створюємо файлову ÑиÑтему з %llu %dК блоками та %u inode\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"попередженнÑ: не викориÑтано %llu блоків.\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "Мітка файлової ÑиÑтеми=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Тип ОС: %s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Розмір блоку=%u (журнал=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Розмір клаÑтера=%u (журнал=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Розмір фрагмента=%u (журнал=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u блоків, Stripe width=%u блоків\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inode, %llu блоків\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu блоків (%2.2f%%) зарезервовано Ð´Ð»Ñ ÑуперкориÑтувача\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Перший блок даних=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "ВлаÑник кореневого каталогу=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "МакÑимальна кількіÑÑ‚ÑŒ блоків у файловій ÑиÑтемі=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u груп блоків\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u-блокова група\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u блоків на групу, %u клаÑтерів на групу\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u блоків на групу, %u фрагментів на групу\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inode на групу\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "UUID файлової ÑиÑтеми: %s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "Резервні копії Ñуперблоку зберігаютьÑÑ Ñƒ таких блоках: "
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s потребує '-O 64bit'\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "«%s» має бути до «resize=%u»\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ desc_size: «%s»\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Ðекоректний породжувач хешу: %s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Ðекоректний відÑтуп: %s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ðекоректний mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Ðекоректна кількіÑÑ‚ÑŒ резервних Ñуперблоків: %s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° stride: %s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° stripe-width: %s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ðекоректний параметр зміни розмірів: %s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "МакÑимум зміни розміру має перевищувати розмір файлової ÑиÑтеми.\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "Підтримки інтерактивної зміни розмірів Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ… ÑиÑтем модифікації 0 не передбачено\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ root_owner: «%s»\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Ðекоректне кодуваннÑ: %s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Вказано помилкові параметри: %s\n"
+"\n"
+"Додаткові параметри Ñлід відокремлювати комами, до них можна додавати аргумент,\n"
+"\tÐ·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñкого запиÑуєтьÑÑ Ð¿Ñ–ÑÐ»Ñ Ð·Ð½Ð°ÐºÑƒ рівноÑÑ‚Ñ– («=»).\n"
+"\n"
+"Коректні додаткові параметри:\n"
+"\tmmp_update_interval=<інтервал>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<фрагмент даних на диÑк RAID у блоках>\n"
+"\tstripe-width=<RAID stride * кількіÑÑ‚ÑŒ диÑків з даними у блоках>\n"
+"\toffset=<відÑтуп Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми>\n"
+"\tresize=<макÑимальна зміна розмірів у блоках>\n"
+"\tpacked_meta_blocks=<0 - вимкнути, 1 - увімкнути>\n"
+"\tlazy_itable_init=<0 - вимкнути, 1 - увімкнути>\n"
+"\tlazy_journal_init=<0 - вимкнути, 1 - увімкнути>\n"
+"\troot_owner=<uid кореневого каталогу>:<gid кореневого каталогу>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<кодуваннÑ>\n"
+"\tencoding_flags=<прапорці>\n"
+"\tquotatype=<увімкнені типи квот>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"ПопередженнÑ: stripe-width RAID, %u, не Ñ” парним кратним stride, %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "помилка: некоректний прапорець кодуваннÑ: %s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "помилка: Ñкщо передаютьÑÑ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ– ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ (encoding-flags), має бути Ñвно вказано Ñ– кодуваннÑ\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"СинтакÑична помилка у файлі налаштувань mke2fs (%s, Ñ€Ñдок %d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ð’Ñтановлено некоректний параметр файлової ÑиÑтеми: %s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ð’Ñтановлено некоректний параметр монтуваннÑ: %s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"У вашому файлі mke2fs.conf не міÑтитьÑÑ Ñ‚Ð¸Ð¿Ñƒ файлової ÑиÑтеми %s.\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Ймовірно, вам Ñлід вÑтановити оновлений файл mke2fs.conf.\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "Перериваємо обробку...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"ПопередженнÑ: fs_type Ð´Ð»Ñ %s у mke2fs.conf не визначено\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити у пам’ÑÑ‚ÑŒ нову змінну PATH.\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Ðе вдалоÑÑ ÑƒÑпішно ініціалізувати профіль (помилка: %ld).\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "некоректний розмір блоку - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "ПопередженнÑ: розмір блоку %d Ñ” непридатним Ð´Ð»Ñ Ð±Ñ–Ð»ÑŒÑˆÐ¾ÑÑ‚Ñ– ÑиÑтем.\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "некоректний розмір клаÑтера - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "«-R» Ñ” заÑтарілим, вам варто ÑкориÑтатиÑÑ Â«-E»"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "помилкова поведінка у відповідь на помилку: %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "Ðекоректна кількіÑÑ‚ÑŒ блоків на групу"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "кількіÑÑ‚ÑŒ блоків на групу має бути кратною 8"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "Ðекоректне чиÑло Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ flex_bg"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "Розмір flex_bg має бути Ñтепенем 2"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "розмір flex_bg (%lu) має бути не більшим за 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "некоректне Ð²Ñ–Ð´Ð½Ð¾ÑˆÐµÐ½Ð½Ñ inode %s (мін. %d/макÑ. %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "некоректний розмір inode - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "ПопередженнÑ: параметр -K Ñ” заÑтарілим, ним не варто більше кориÑтуватиÑÑ. Вам варто кориÑтуватиÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ «-E nodiscard»!\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "у malloc Ð´Ð»Ñ bad_blocks_filename"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"ПопередженнÑ: надто довга мітка, обрізаємо до «%s».\n"
+"\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "некоректний відÑоток зарезервованих блоків - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "помилкова кількіÑÑ‚ÑŒ inode - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñƒ пам’ÑÑ‚Ñ– Ñ€Ñдка fs_feature"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "помилковий рівень модифікації - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "під Ñ‡Ð°Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¼Ð¾Ð´Ð¸Ñ„Ñ–ÐºÐ°Ñ†Ñ–Ñ— %d"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "Параметр -t можна викориÑтовувати лише один раз"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "Параметр -T можна викориÑтовувати лише один раз"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити приÑтрій журналу %s\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Розмір блоку приÑтрою журналу (%d) Ñ” меншим за мінімальний розмір блоку %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "ВикориÑтовуємо розмір блоку приÑтрою журналу: %d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "некоректні блоки «%s» на приÑтрої «%s»"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "файлова ÑиÑтема"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Файла %s не Ñ–Ñнує, а розмір не було вказано.\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Створюємо звичайний файл %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "під Ñ‡Ð°Ñ Ñпроби визначити розмір файлової ÑиÑтеми"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Ðе вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ розмір приÑтрою; вам Ñлід вказати\n"
+"розмір файлової ÑиÑтеми\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Отримано дані щодо нульового розміру приÑтрою. Вказано некоректний\n"
+"\tрозділ або таблицю розділів не було повторно прочитано піÑлÑ\n"
+"\tзапуÑку fdisk через внеÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½ до розділу, Ñкий перебував у\n"
+"\tкориÑтуванні. Вам варто перезавантажити ÑиÑтему, щоб\n"
+"\tдані таблиці розділів було прочитано правильно.\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "Файлова ÑиÑтема Ñ” більшою за видимий розмір приÑтрою."
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ ÑпиÑок типів файлової ÑиÑтеми\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "У HURD не передбачено підтримки можливоÑÑ‚Ñ– Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ файлів.\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "У HURD не передбачено підтримки можливоÑÑ‚Ñ– huge_file.\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "У HURD не передбачено підтримки можливоÑÑ‚Ñ– metadata_csum.\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "У HURD не передбачено підтримки можливоÑÑ‚Ñ– ea_inode.\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "під Ñ‡Ð°Ñ Ñпроби визначити апаратний розмір Ñектора"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "під Ñ‡Ð°Ñ Ñпроби визначити фізичний розмір Ñектора"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "під Ñ‡Ð°Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ блоку; розмір Ñ” надто малим Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñтрою\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "ПопередженнÑ: вказаний розмір блоку, %d, Ñ” меншим за фізичний розмір Ñектора приÑтрою, %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: розміри приÑтрою (0x%llx блоків) %s Ñ” надто великими длÑ\n"
+"\tзапиÑу Ñ—Ñ… у 32-бітовому форматі з розміром блоку %d.\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: розміри приÑтрою (0x%llx блоків) %s Ñ” надто великими длÑ\n"
+"\tÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми із розміром блоку %d.\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types Ð´Ð»Ñ Ñ€Ð¾Ð·Ð²â€™ÑÐ·Ð°Ð½Ð½Ñ mke2fs.conf: "
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "У файлових ÑиÑтемах модифікації 0 можливоÑÑ‚Ñ– файлової ÑиÑтеми не підтримуютьÑÑ\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "У файлових ÑиÑтемах модифікації 0 підтримки розріджених Ñуперблоків не передбачено\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "У файлових ÑиÑтемах модифікації 0 підтримки журналів не передбачено\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "некоректний відÑоток зарезервованих блоків - %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "Ð”Ð»Ñ 64-бітової файлової ÑиÑтеми Ñлід увімкнути розширеннÑ. Передайте програмі -O extents, щоб виправити це.\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Розмір клаÑтера не може бути меншим за розмір блоку.\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ клаÑтера потрібна можливіÑÑ‚ÑŒ bigalloc"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "попередженнÑ: не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ параметри приÑтрою Ð´Ð»Ñ %s\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Ð²Ð¸Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ %s зÑунуто на %lu байтів.\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "Це може призвеÑти до значної втрати швидкодії. Вам варто виконати повторний розподіл приÑтрою на розділи.\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s має можливоÑÑ‚Ñ– DAX, але поточний розмір блоку %u відрізнÑєтьÑÑ Ð²Ñ–Ð´ розміру Ñторінки ÑиÑтеми %u, тому файлова ÑиÑтема не підтримуватиме DAX.\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d-байтові блоки Ñ” надто великими Ð´Ð»Ñ ÑиÑтеми (макÑ. - %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "ПопередженнÑ: %d-байтові блоки Ñ” надто великими Ð´Ð»Ñ ÑиÑтеми (макÑ. - %d), примуÑово продовжуємо роботу\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "ПропозиціÑ: ÑкориÑтайтеÑÑ Ñдром Linux >= 3.18, щоб поліпшити ÑтабільніÑÑ‚ÑŒ роботи з метаданими та можливоÑÑ‚Ñ– з обчиÑÐ»ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум журналу.\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Ðевідоме ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ð·Ð²Ð¸ файла у профілі: %s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Ðевідомі прапорці ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ профілі: %s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"ПопередженнÑ: відÑтуп вказано без Ñвного розміру файлової ÑиÑтеми.\n"
+"Створюємо файлову ÑиÑтему із %llu блоків, але результат може\n"
+"не збігатиÑÑ Ñ–Ð· вашими очікуваннÑми.\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "inode із %d байтів Ñ” надто малим Ð´Ð»Ñ ÐºÐ²Ð¾Ñ‚ проектів"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Підтримка можливоÑÑ‚Ñ– bigalloc неможлива без можливоÑÑ‚Ñ– extents"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"МожливоÑÑ‚Ñ– resize_inode Ñ– meta_bg Ñ” неÑуміÑними.\n"
+"Їх не можна вмикати одночаÑно.\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"ПопередженнÑ: файлові ÑиÑтеми bigalloc із розміром клаÑтера, що перевищує\n"
+"у 16 разів розмір блоку, вважаютьÑÑ ÐµÐºÑпериментальними\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "у нерозріджених файлових ÑиÑтемах підтримки інтерактивної зміни розмірів блоків не передбачено"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "кількіÑÑ‚ÑŒ блоків на групу лежить за межами припуÑтимого діапазону"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "МожливіÑÑ‚ÑŒ flex_bg не увімкнено, отже, розмір flex_bg не можна вказувати"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "некоректний розмір inode %d (мін. %d/макÑ. %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "inode із %d байтів Ñ” надто малим Ð´Ð»Ñ Ð²Ð±ÑƒÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ… даних; вкажіть більший розмір"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "у 128-байтових inode неможлива обробка дат піÑÐ»Ñ 2038 року, вони вважаютьÑÑ Ð·Ð°Ñтарілими\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "занадто багато inode (%llu), збільшити Ð²Ñ–Ð´Ð½Ð¾ÑˆÐµÐ½Ð½Ñ inode?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "занадто багато inode (%llu), вкажіть < 2^32 inode"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ inode_size (%u) * inodes_count (%u) Ñ” надто великим\n"
+"\tÐ´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми з %llu блоків, вкажіть більше Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ inode_ratio (-i)\n"
+"\tабо зменшіть кількіÑÑ‚ÑŒ inode (-N).\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "Відкидаємо блоки приÑтрою: "
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "помилка - "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ініціалізації контекÑту квоти"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "під Ñ‡Ð°Ñ Ñпроби запиÑу inode-ів квоти"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "помилкова поведінка у відповідь на помилки у профілі — %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "у malloc Ð´Ð»Ñ android_sparse_params"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "під Ñ‡Ð°Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ñуперблоку"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Ð Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð½Ðµ увімкнено. Ð”Ð»Ñ Ñ–Ñ”Ñ€Ð°Ñ€Ñ…Ñ–Ñ— розширень файлів можна обчиÑлювати контрольні Ñуми, а Ð´Ð»Ñ ÐºÐ°Ñ€Ñ‚ блоків — ні. Ð’Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½ÑŒ зменшує Ð¿Ð¾ÐºÑ€Ð¸Ñ‚Ñ‚Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум метаданих. Передайте параметр -O extents, щоб виправити.\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Ðе увімкнено підтримку 64-бітових файлових ÑиÑтем. Ð—Ð±Ñ–Ð»ÑŒÑˆÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ полів, Ñкі надаютьÑÑ Ñ†Ñ–Ñ”ÑŽ можливіÑÑ‚ÑŽ, уможливлює повноцінне обчиÑÐ»ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум. Передайте параметр -O 64bit, щоб виправити цю помилку.\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "МожливіÑÑ‚ÑŒ metadata_csum_seed потребує можливоÑÑ‚Ñ– metadata_csum.\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "УÑпішно відкинуто, буде повернуто 0s - пропуÑкаємо Ð²Ð¸Ñ‚Ð¸Ñ€Ð°Ð½Ð½Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– inode\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "невідома ОС - %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "Розміщуємо таблиці груп: "
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "під Ñ‡Ð°Ñ Ñпроби розміÑтити таблиці файлової ÑиÑтеми"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "під Ñ‡Ð°Ñ Ñпроби знÑти Ð¿Ð¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ¾Ð²Ð¸Ñ… блоків"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tпід Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¾Ñ— карти підклаÑтера"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "під Ñ‡Ð°Ñ Ð¾Ð±Ñ‡Ð¸ÑÐ»ÐµÐ½Ð½Ñ Ð´Ð¾Ð´Ð°Ñ‚ÐºÐ¾Ð²Ð¸Ñ… витрат"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s може бути пошкоджено Ñерйозніше перезапиÑом Ñуперблоку\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð½ÑƒÐ»ÐµÐ½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ %llu наприкінці файлової ÑиÑтеми"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "під Ñ‡Ð°Ñ Ñ€ÐµÐ·ÐµÑ€Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑ–Ð² Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾Ñ— зміни розміру"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "журнал"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Ð”Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ на приÑтрої %s: "
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tпід Ñ‡Ð°Ñ Ñпроби Ð´Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ на приÑтрою %s"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "виконано\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "ПропуÑкаємо ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ у лише-Ñупер режимі\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Створюємо журнал (%u блоків): "
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tпід Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Помилка під Ñ‡Ð°Ñ Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– Ð·Ð°Ð¿Ð¾Ð±Ñ–Ð³Ð°Ð½Ð½Ñ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¸Ð¼ монтуваннÑм."
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Увімкнено захиÑÑ‚ від повторного Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð· інтервалом Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñƒ %d Ñекунд.\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "ÐšÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ñ–Ð² на приÑтрій: "
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "ЗапиÑуємо дані щодо обліку Ñуперблоків та файлової ÑиÑтеми: "
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑƒÐ²Ð°Ð½Ð½Ñ Ñ– Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"виконано\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð½ÑƒÐ»ÐµÐ½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ %llu Ð´Ð»Ñ Ð²ÐµÐ»Ð¸ÐºÐ¾Ð³Ð¾ файла"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»Ñƒ у %llu (%uk) блоків Ñ” неÑуміÑним із розміром клаÑтера, %u.\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "Великі файли буде перезапиÑано нулÑми\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Створюємо %lu великих файлів "
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "із %llu блоками у кожному"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð²ÐµÐ»Ð¸ÐºÐ¾Ð³Ð¾ файла %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "КориÑтуваннÑ: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"КориÑтуваннÑ: %s приÑтрій...\n"
+"\n"
+"Виводить дані щодо розділів Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ вказаного приÑтрою.\n"
+"Приклад: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Ðе вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ параметри %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані щодо розміру %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d початок=%8d розмір=%8lu кінець=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Ð¦Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±ÑƒÑ” щойно перевіреної файлової ÑиÑтеми.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Будь лаÑка, запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck -f Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми.\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Будь лаÑка, запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck -fD Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми.\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"КориÑтуваннÑ: %s [-c макÑ_к-Ñ‚ÑŒ_монтувань] [-e повед_длÑ_помилок] [-f] [-g група]\n"
+"\t[-i інтервал[d|m|w]] [-j] [-J параметри_журналу] [-l]\n"
+"\t[-m відÑ_зарез_блоків] [-o [^]параметри_монтуваннÑ[,...]]\n"
+"\t[-r к-Ñ‚ÑŒ_зарез_блоків] [-u кориÑтувач] [-C к-Ñ‚ÑŒ_монтувань]\n"
+"\t[-L мітка_тому] [-M оÑÑ‚_змонт_каталог]\n"
+"\t[-O [^]можливіÑÑ‚ÑŒ[,...]] [-Q параметри_квотуваннÑ]\n"
+"\t[-E додатковий_параметр[,...]] [-T чаÑ_оÑÑ‚_перевірки] [-U UUID]\n"
+"\t[ -I новий_розмір_inode] [-z файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹] приÑтрій\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Суперблок журналу не виÑвлено!\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити зовнішній журнал"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s не Ñ” журнальованим приÑтроєм.\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Суперблок журналу пошкоджено, Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ nr_users\n"
+"є надто великим (%d).\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID файлової ÑиÑтеми не знайдено на журнальованому приÑтрої.\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Ðе вдалоÑÑ Ð²Ð¸Ñвити журнальований приÑтрій. Його ÐЕ вилучено.\n"
+"СкориÑтайтеÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ -f Ð´Ð»Ñ Ð²Ð¸Ð»ÑƒÑ‡ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»ÑŒÐ¾Ð²Ð°Ð½Ð¾Ð³Ð¾ приÑтрою.\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "Журнал вилучено\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… карт"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "під Ñ‡Ð°Ñ ÑÐ¿Ð¾Ñ€Ð¾Ð¶Ð½ÐµÐ½Ð½Ñ inode журналу"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸Ñу inode журналу"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(Ñ– перезавантажте комп’ютер піÑÐ»Ñ Ñ†ÑŒÐ¾Ð³Ð¾!)\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "ПіÑÐ»Ñ Ð·Ð°Ð¿ÑƒÑку e2fsck, будь лаÑка, запуÑÑ‚Ñ–Ñ‚ÑŒ «resize2fs %s %s"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Будь лаÑка, віддайте команду «resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "», щоб увімкнути 64-бітовий режим.\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "», щоб вимкнути 64-бітовий режим.\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"ПОПЕРЕДЖЕÐÐЯ: не вдалоÑÑ Ð¿Ñ–Ð´Ñ‚Ð²ÐµÑ€Ð´Ð¸Ñ‚Ð¸ підтримку metadata_csum_seed у Ñдрі.\n"
+" Така підтримка потребує Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Підтримки ÑÐ¿Ð¾Ñ€Ð¾Ð¶Ð½ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– файлової ÑиÑтеми «%s» не передбачено.\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Підтримки вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– файлової ÑиÑтеми «%s» не передбачено.\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"МожливіÑÑ‚ÑŒ has_journal можна знімати, лише Ñкщо файлову ÑиÑтему\n"
+"демонтовано або змонтовано лише у режимі читаннÑ.\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Ð’Ñтановлено прапорець needs_recovery. Будь лаÑка, запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck до\n"
+"знÑÑ‚Ñ‚Ñ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ has_journal.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Ð”Ð»Ñ ÑиÑтем з увімкненою можливіÑÑ‚ÑŽ meta_bg вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ–\n"
+"файлової ÑиÑтеми sparse_super не передбачено.\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"МожливіÑÑ‚ÑŒ захиÑту від повторного монтуваннÑ\n"
+"не можна вмикати, Ñкщо файлову ÑиÑтему змонтовано\n"
+"або вона перебуває у режимі лише читаннÑ.\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Увімкнено захиÑÑ‚ від повторного Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð· інтервалом Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñƒ %d Ñекунд.\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"МожливіÑÑ‚ÑŒ захиÑту від повторного Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ можна\n"
+"вимкнути, Ñкщо файлова ÑиÑтема придатна лише Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу.\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… карт\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Контрольна Ñума у блоці MMP Ñ” невідповідною. Мало бути: %x, маємо: %x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ MMP."
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "Ð’Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð¿Ð¾ÐºÐ°Ð¶Ñ‡Ð¸ÐºÐ° каталогу у файлових ÑиÑтемах із контрольними Ñумами потребуватиме певного чаÑу."
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "Ðе можна вимикати dir_index Ð´Ð»Ñ Ð·Ð¼Ð¾Ð½Ñ‚Ð¾Ð²Ð°Ð½Ð¾Ñ— файлової ÑиÑтеми!\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"ЗнÑÑ‚Ñ‚Ñ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ flex_bg може призвеÑти до втрати ціліÑноÑÑ‚Ñ–\n"
+"файлової ÑиÑтеми.\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"МожливіÑÑ‚ÑŒ huge_file можна знімати, лише Ñкщо файлову ÑиÑтему\n"
+"демонтовано або змонтовано лише у режимі читаннÑ.\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "Ð’Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум потребуватиме певного чаÑу."
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Ðе можна вмикати metadata_csum Ð´Ð»Ñ Ð·Ð¼Ð¾Ð½Ñ‚Ð¾Ð²Ð°Ð½Ð¾Ñ— файлової ÑиÑтеми!\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Ð Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð½Ðµ увімкнено. Ð”Ð»Ñ Ñ–Ñ”Ñ€Ð°Ñ€Ñ…Ñ–Ñ— розширень файлів можна обчиÑлювати контрольні Ñуми, а Ð´Ð»Ñ ÐºÐ°Ñ€Ñ‚ блоків — ні. Ð’Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½ÑŒ зменшує Ð¿Ð¾ÐºÑ€Ð¸Ñ‚Ñ‚Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум метаданих. Повторно запуÑÑ‚Ñ–Ñ‚ÑŒ із -O extent, щоб виправити.\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Ðе увімкнено підтримку 64-бітових файлових ÑиÑтем. Ð—Ð±Ñ–Ð»ÑŒÑˆÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ полів, Ñкі надаютьÑÑ Ñ†Ñ–Ñ”ÑŽ можливіÑÑ‚ÑŽ, уможливлює повноцінне обчиÑÐ»ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум. ЗапуÑÑ‚Ñ–Ñ‚ÑŒ resize2fs -b, щоб виправити цю помилку.\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "Ð’Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум потребуватиме певного чаÑу."
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Ðе можна вимикати metadata_csum Ð´Ð»Ñ Ð·Ð¼Ð¾Ð½Ñ‚Ð¾Ð²Ð°Ð½Ð¾Ñ— файлової ÑиÑтеми!\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "Ðе можна вмикати uninit_bg Ð´Ð»Ñ Ð·Ð¼Ð¾Ð½Ñ‚Ð¾Ð²Ð°Ð½Ð¾Ñ— файлової ÑиÑтеми!\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "Ðе можна вимикати uninit_bg Ð´Ð»Ñ Ð·Ð¼Ð¾Ð½Ñ‚Ð¾Ð²Ð°Ð½Ð¾Ñ— файлової ÑиÑтеми!\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Ðе можна вмикати 64-бітовий режим, доки файлову ÑиÑтему змонтовано!\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Ðе можна вимикати 64-бітовий режим, доки файлову ÑиÑтему змонтовано!\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Ðе вдалоÑÑ ÑƒÐ²Ñ–Ð¼ÐºÐ½ÑƒÑ‚Ð¸ можливіÑÑ‚ÑŒ проекту; розмір inode Ñ” надто малим.\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"ПопередженнÑ: параметр «^quota» перевизначає аргументи «-Q».\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "Вмикати можливіÑÑ‚ÑŒ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð´Ð¾ нижнього регіÑтру можна, лише Ñкщо файлову ÑиÑтему демонтовано.\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– «metadata_csum_seed» передбачено лише\n"
+"Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ… ÑиÑтем із увімкненою можливіÑÑ‚ÑŽ metadata_csum.\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"З чаÑу Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ metadata_csum змінилоÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ UUID. Файлову ÑиÑтему Ñлід демонтувати, \n"
+"щоб безпечно перезапиÑати уÑÑ– метадані, що відповідають новому UUID.\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "Повторне обчиÑÐ»ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¸Ñ… Ñум потребуватиме певного чаÑу."
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "Ðа файловій ÑиÑтемі вже Ñ” журнал.\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tпід Ñ‡Ð°Ñ Ñпроби відкрити журнал на %s\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Створюємо журнал на приÑтрої %s: "
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "під Ñ‡Ð°Ñ Ð´Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми до журналу на %s"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "Створюємо inode журналу: "
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tпід Ñ‡Ð°Ñ Ñпроби ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° журналу"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Ðе вдалоÑÑ ÑƒÐ²Ñ–Ð¼ÐºÐ½ÑƒÑ‚Ð¸ квоту проекту; розмір inode Ñ” надто малим.\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "під Ñ‡Ð°Ñ Ñпроби ініціалізації контекÑту квоти у бібліотеці підтримки"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "під Ñ‡Ð°Ñ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½ÑŒ квоти (%d)"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "під Ñ‡Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑƒÐ²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° квот (%d)"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "під Ñ‡Ð°Ñ Ð²Ð¸Ð»ÑƒÑ‡ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° квот (%d)"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Вказано некоректні параметри квотуваннÑ.\n"
+"\n"
+"Можна викориÑтовувати такі коректні параметри ÐºÐ²Ð¾Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ (при передаванні Ñлід відокремлювати комами):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ Ñпецифікатор дати/чаÑу: %s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "помилкова кількіÑÑ‚ÑŒ монтувань: %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "помилковий ідентифікатор або назва групи: %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "помилковий інтервал: %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "помилкова чаÑтка зарезервованих блоків: %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "-o можна вказувати лише один раз"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "-O можна вказувати лише один раз"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "помилкова кількіÑÑ‚ÑŒ зарезервованих блоків: %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "помилковий ідентифікатор або Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача: %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "помилковий розмір inode: %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Розмір inode має бути Ñтепенем двійки: %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "Ðадто велике Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ mmp_update_interval: %lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð²Ð°Ð»Ñƒ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·Ð°Ñ…Ð¸Ñту від повторного Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ %lu Ñекунду\n"
+msgstr[1] "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð²Ð°Ð»Ñƒ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·Ð°Ñ…Ð¸Ñту від повторного Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ %lu Ñекунди\n"
+msgstr[2] "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð²Ð°Ð»Ñƒ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·Ð°Ñ…Ð¸Ñту від повторного Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ %lu Ñекунд\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Ð’Ñтановлюємо прапорець помилки файлової ÑиÑтеми Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¼ÑƒÑового Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ fsck.\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ stride RAID: %s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ stripe-width RAID: %s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ðекоректний алгоритм хешуваннÑ: «%s»\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Ð’Ñтановлюємо типовий алгоритм Ñ…ÐµÑˆÑƒÐ²Ð°Ð½Ð½Ñ %s (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "Ðеможливо змінити наÑвне кодуваннÑ\n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "Ðекоректне кодуваннÑ: %s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "Ð’Ñтановлюємо ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Â«%s»\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "Ð’Ñтановлюємо encoding_flags у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"Вказано помилкові параметри.\n"
+"\n"
+"Додаткові параметри Ñлід відокремлювати комами, можна вÑтановлювати\n"
+"\tÐ·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ñ–Ð² за допомогою знака рівноÑÑ‚Ñ– («=»).\n"
+"\n"
+"Можливі додаткові параметри:\n"
+"\tclear_mmp\n"
+"\thash_alg=<алгоритм хешуваннÑ>\n"
+"\tmount_opts=<розширені типові параметри монтуваннÑ>\n"
+"\tmmp_update_interval=<інтервал Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ mmp у Ñекундах>\n"
+"\tstride=<розмір фрагмента RAID на окремому диÑку у блоках>\n"
+"\tstripe_width=<Ñтрайд RAID*диÑки даних у блоках>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<кодуваннÑ>\n"
+"\tencoding_flags=<прапорці>\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ бітову карту inode\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ бітову карту блоків\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "блоки, Ñкі буде переÑунуто"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити бітову карту блоків під Ñ‡Ð°Ñ Ð·Ð±Ñ–Ð»ÑŒÑˆÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñ–Ð² inode\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "ÐедоÑтатньо проÑтору Ð´Ð»Ñ Ð·Ð±Ñ–Ð»ÑŒÑˆÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñƒ inode\n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Ðе вдалоÑÑ Ð¿ÐµÑ€ÐµÑунути блоки під Ñ‡Ð°Ñ Ð·Ð¼Ñ–Ð½Ð¸ розмірів inode \n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Помилка під Ñ‡Ð°Ñ Ð·Ð¼Ñ–Ð½Ð¸ розмірів inode.\n"
+"ЗапуÑÑ‚Ñ–Ñ‚ÑŒ e2undo Ð´Ð»Ñ ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð¼Ñ–Ð½, внеÑених до файлової ÑиÑтеми. \n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Якщо ви впевнені, що файлова ÑиÑтема не викориÑтовуєтьÑÑ Ð¶Ð¾Ð´Ð½Ð¸Ð¼ вузлом. Віддайте команду:\n"
+"«tune2fs -f -E clear_mmp {приÑтрій}»\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Контрольна Ñума блоку MMP вказує на пошкодженіÑÑ‚ÑŒ. Спробуйте виправити це за допомогою команди:\n"
+"«e2fsck -f %s»\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "Ðе можна вноÑити зміни до приÑтрою журналюваннÑ.\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Розміром inode уже є %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "Підтримки Ð·Ð¼ÐµÐ½ÑˆÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñ–Ð² inode не передбачено\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Ðекоректний розмір inode %lu (макÑимальним Ñ” %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "Зміна розмірів inode-ів може бути доволі тривалою."
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"ПопередженнÑ: журнал міÑтить Ñліди пошкодженнÑ. Вам варто відтворити журнал за допомогою\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"а потім повторно віддати цю команду. Якщо ви цього не зробите, внеÑені нею зміни\n"
+"може бути перезапиÑано піÑÐ»Ñ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ.\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Відновлюємо журнал.\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Ð’Ñтановлюємо Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°ÐºÑимальної кількоÑÑ‚Ñ– монтувань %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Ð’Ñтановлюємо поточну кількіÑÑ‚ÑŒ монтувань у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Ð’Ñтановлюємо режим поведінки у відповідь на помилку %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Ð’Ñтановлюємо gid Ð´Ð»Ñ Ð·Ð°Ñ€ÐµÐ·ÐµÑ€Ð²Ð¾Ð²Ð°Ð½Ð¸Ñ… блоків у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "інтервал між перевірками є надто великим (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Ð’Ñтановлюємо інтервал між перевірками у %lu Ñекунд\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Ð’Ñтановлюємо чаÑту зарезервованих блоків %g%% (%llu блоків)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "кількіÑÑ‚ÑŒ зарезервованих блоків Ñ” надто великою (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Ð’Ñтановлюємо кількіÑÑ‚ÑŒ зарезервованих блоків у %llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Суперблоки файлової ÑиÑтеми вже розріджено.\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Ð”Ð»Ñ ÑиÑтем з увімкненою можливіÑÑ‚ÑŽ meta_bg вÑтановленнÑ\n"
+"Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ Ñ€Ð¾Ð·Ñ€Ñ–Ð´Ð¶ÐµÐ½Ð¸Ñ… Ñуперблоків не передбачено.\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Ð’Ñтановлено прапорець Ñ€Ð¾Ð·Ñ€Ñ–Ð´Ð¶ÐµÐ½Ð½Ñ Ñуперблоків. %s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Підтримки знÑÑ‚Ñ‚Ñ Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ Ñ€Ð¾Ð·Ñ€Ñ–Ð´Ð¶ÐµÐ½Ð½Ñ Ñуперблоків не передбачено.\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Ð’Ñтановлюємо Ñ‡Ð°Ñ Ð¾Ñтанньої перевірки файлової ÑиÑтеми у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Ð’Ñтановлюємо uid Ð´Ð»Ñ Ð·Ð°Ñ€ÐµÐ·ÐµÑ€Ð²Ð¾Ð²Ð°Ð½Ð¸Ñ… блоків у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Помилка у викориÑтанні clear_mmp. Слід викориÑтовувати з -f\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Змінювати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— можливоÑÑ‚Ñ– Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ ÐºÐ²Ð¾Ñ‚Ð¸ можна, лише Ñкщо файлову ÑиÑтему демонтовано.\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Ðеможливо змінити UUID цієї файлової ÑиÑтеми, оÑкільки Ð´Ð»Ñ Ð½ÐµÑ— визначено прапорець можливоÑÑ‚Ñ– stable_inodes.\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ UUID на цій файловій ÑиÑтемі може бути доволі тривалим."
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "Змінювати UUID можна, лише Ñкщо файлову ÑиÑтему демонтовано.\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Якщо ви кориÑтуєтеÑÑ Ð»Ð¸ÑˆÐµ Ñдрами, новішими за верÑÑ–ÑŽ 4.4, запуÑÑ‚Ñ–Ñ‚ÑŒ «tune2fs -O metadata_csum_seed», потім знову віддайте цю команду.\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "Ðекоректний формат UUID\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "Слід оновити Ñуперблок журналу.\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Змінювати розмір inode можна, лише Ñкщо файлову ÑиÑтему демонтовано.\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Підтримки зміни розмірів inode size Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ… ÑиÑтем з увімкненою можливіÑÑ‚ÑŽ flex_bg\n"
+"не передбачено.\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Ð’Ñтановлюємо розмір inode у %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "Ðе вдалоÑÑ Ð·Ð¼Ñ–Ð½Ð¸Ñ‚Ð¸ розмір inode\n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Ð’Ñтановлюємо розмір stride %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Ð’Ñтановлюємо ширину stripe %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Ð’Ñтановлюємо Ð´Ð»Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ… типових параметрів Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<продовженнÑ>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Продовжувати (чи зачекати %d Ñекунд)? (y - так, N - ні) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "Продовжувати? (y - так, N - ні) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "ПримуÑове Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ mke2fs. СподіваємоÑÑ, що /etc/mtab міÑтить помилки.\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "не Ñтворюватиме %s тут!\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "ПримуÑове Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ mke2fs.\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ облаÑÑ‚ÑŒ пам’ÑÑ‚Ñ– Ð´Ð»Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ параметрів журналу!\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ приÑтрій журналу, що відповідає вказаному %s\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Вказано помилкові параметри журналу.\n"
+"\n"
+"Параметри журналу відокремлюютьÑÑ ÐºÐ¾Ð¼Ð°Ð¼Ð¸ Ñ– можуть приймати аргументи,\n"
+"\tÑкі вÑтановлюютьÑÑ Ð·Ð° допомогою Ñимволу рівноÑÑ‚Ñ– («=»).\n"
+"\n"
+"Коректні параметри журналу:\n"
+"\tsize=<розмір журналу у мегабайтах>\n"
+"\tdevice=<приÑтрій журналюваннÑ>\n"
+"\tlocation=<Ñ€Ð¾Ð·Ñ‚Ð°ÑˆÑƒÐ²Ð°Ð½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ>\n"
+"\n"
+"Розмір журналу має належати діапазону від 1024 до 10240000 блоків файлової ÑиÑтеми.\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Файлова ÑиÑтема надто мала Ð´Ð»Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»ÑŽÐ²Ð°Ð½Ð½Ñ\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Загальний розмір журналу, на Ñкий надійшов запит, дорівнює %d блокам;\n"
+"розміри мають належати діапазону від 1024 до 10240000 блоків.\n"
+"Перериваємо обробку.\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Загальний розмір журналу Ñ” надто великим Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми.\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Перевірка цієї файлової ÑиÑтеми виконуватиметьÑÑ ÐºÐ¾Ð¶Ð½Ñ– %d монтувань або\n"
+"%g днів, щойно буде доÑÑгнуто одного з цих обмежень. Перевизначити\n"
+"ці параметри можна за допомогою tune2fs -c або -i.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "КориÑтуваннÑ: %s [-d] [-p файл_pid] [-s шлÑÑ…_до_Ñокета] [-T чаÑ_очікуваннÑ]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n чиÑло] [-s шлÑÑ… до Ñокета]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "помилкові параметри"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "з'єднаннÑ"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "запиÑ"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "кількіÑÑ‚ÑŒ читань"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "помилкова довжина відповіді"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "фонову Ñлужбу uuidd вже запущено з pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Ðе вдалоÑÑ Ñтворити Ñокет потоку даних UNIX: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¸Ð²â€™ÑзатиÑÑ Ð´Ð¾ Ñокета unix %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Ðе вдалоÑÑ Ð¿Ð¾Ñ‡Ð°Ñ‚Ð¸ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… на Ñокеті unix %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð· клієнта, довжина = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ %d, вхідне чиÑло = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Створений на оÑнові чаÑу UUID: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Створений пÑевдовипадковий UUID: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "Створено чаÑовий UUID %s Ñ– %d поÑлідовний UUID\n"
+msgstr[1] "Створено чаÑовий UUID %s Ñ– %d поÑлідовних UUID\n"
+msgstr[2] "Створено чаÑовий UUID %s Ñ– %d поÑлідовних UUID\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Створено %d UUID:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ðекоректна Ð´Ñ–Ñ %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Помилковий номер: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби викликати фонову Ñлужбу uuidd (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s Ñ– %d поÑлідовний UUID\n"
+msgstr[1] "%s Ñ– %d поÑлідовні UUID\n"
+msgstr[2] "%s Ñ– %d поÑлідовних UUID\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "СпиÑок UUID:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Ðеочікувана довжина відповіді від Ñервера, %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¸Ð¿Ð¸Ð½Ð¸Ñ‚Ð¸ роботу uuidd, запущеного з pid %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Припинено роботу uuidd з pid %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "КориÑтуваннÑ: %s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Дамп розширеннÑ:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "â„–\tÐом=%llu, Розм=%llu, КурÑор=%llu, УпорÑдк=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"КориÑтуваннÑ: %s [-d прапорці_діагноÑтики] [-f] [-F] [-M] [-P] [-p] приÑтрій [-b|-s|новий розмір] [-S RAID-stride] [-z файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Розширюємо таблицю inode"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "ПереÑуваємо блоки"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Скануємо таблицю inode"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Оновлюємо поÑÐ¸Ð»Ð°Ð½Ð½Ñ inode"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "ПереÑуваємо таблицю inode"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Ðевідомий прохід?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Початок проходу %d (макÑ. = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Код зміни розмірів файлових ÑиÑтем bigalloc не Ñ” доÑтатньо перевіреним.\n"
+"ВідповідальніÑÑ‚ÑŒ за можливі наÑлідки покладаєтьÑÑ Ð½Ð° ваÑ! СкориÑтайтеÑÑ\n"
+"параметром примуÑового виконаннÑ, Ñкщо хочете ризикнути.\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ %s"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ ÑтатиÑтичних даних щодо %s"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Будь лаÑка, Ñпочатку віддайте команду «e2fsck -f %s».\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Оцінка мінімального розміру файлової ÑиÑтеми: %llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ðекоректний новий розмір: %s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Ðовий розмір Ñ” надто великим Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´ÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð½Ñ Ð¹Ð¾Ð³Ð¾ у форматі 32-бітового чиÑла\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "Ðовий розмір призведе до надто великої кількоÑÑ‚Ñ– деÑкрипторів груп блоків.\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Ðовий розмір Ñ” меншим за мінімальний (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "Ðекоректна довжина stride"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Ðа розділі (або приÑтрої) лише %llu (%d тиÑÑч) блоків.\n"
+"Вами надіÑлано запит щодо нового розміру у %llu блоків.\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Ðе можна вÑтановлювати або ÑкаÑовувати вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– 64-бітового режиму.\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Ðе можна змінювати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÑƒÐ²Ñ–Ð¼ÐºÐ½ÐµÐ½Ð¾ÑÑ‚Ñ– можливоÑÑ‚Ñ– 64bit на файловій ÑиÑтемі, розмір Ñкої перевищує 2^32 блоків.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Ðе можна змінювати параметри можливоÑÑ‚Ñ– 64-бітового режиму, доки файлову ÑиÑтему змонтовано.\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Будь лаÑка, увімкніть можливіÑÑ‚ÑŒ розширень (extents) у tune2fs до Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– 64-бітового режиму (64bit).\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Файлова ÑиÑтема вже ÑкладаєтьÑÑ Ð· %llu (%dК) блоків. Потреби у додаткових діÑÑ… немає.\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Файлова ÑиÑтема вже Ñ” 64-бітовою.\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Файлова ÑиÑтема вже Ñ” 32-бітовою.\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "Ðеможливо ÑтиÑнути цю файлову ÑиÑтему, оÑкільки Ð´Ð»Ñ Ð½ÐµÑ— визначено прапорець можливоÑÑ‚Ñ– stable_inodes.\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Перетворюємо файлову ÑиÑтему на 64-бітову.\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Перетворюємо файлову ÑиÑтему на 32-бітову.\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Змінюємо розмір файлової ÑиÑтеми на %s до %llu (%d тиÑÑч) блоків.\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби змінити розмір %s"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Будь лаÑка, віддайте команду «e2fsck -fy %s», щоб виправити\n"
+"файлову ÑиÑтему піÑÐ»Ñ Ð¿ÐµÑ€ÐµÑ€Ð¸Ð²Ð°Ð½Ð½Ñ Ð´Ñ–Ñ— зі зміни розмірів.\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"У файловій ÑиÑтемі %s тепер %llu (%dК) блоків.\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби обрізати %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "у Ñдрі не передбачено інтерактивної зміни розмірів за допомогою sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "Файлову ÑиÑтему у %s змонтовано до %s; надіÑлано запит щодо інтерактивної зміни розмірів\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Підтримки інтерактивного Ð·Ð¼ÐµÐ½ÑˆÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ€Ñ–Ð² не передбачено"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "У файловій ÑиÑтемі не передбачено підтримки інтерактивної зміни розмірів"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "ÐедоÑтатньо зарезервованих блоків gdt Ð´Ð»Ñ Ð·Ð¼Ñ–Ð½Ð¸ розмірів"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "У Ñдрі операційної ÑиÑтеми не передбачено підтримки зміни розмірів таких великих файлових ÑиÑтем"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити точку Ð¼Ð¾Ð½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Запит на заÑтарілий Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð·Ð¼Ñ–Ð½Ð¸ розміру.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "ÐедоÑтатньо прав доÑтупу Ð´Ð»Ñ Ð·Ð¼Ñ–Ð½Ð¸ розмірів файлової ÑиÑтеми"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Під Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸ можливоÑÑ‚Ñ– інтерактивної зміни розмірів"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "У Ñдрі операційної ÑиÑтеми не передбачено підтримки інтерактивної зміни розмірів"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Виконуємо інтерактивну зміну розмірів %s до %llu (%d тиÑÑч) блоків.\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "Під Ñ‡Ð°Ñ Ñпроби Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð¾Ñтанньої групи"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Під Ñ‡Ð°Ñ Ñпроби додати групу %d"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "Файлову ÑиÑтему у %s змонтовано до %s, підтримки інтерактивної зміни розмірів Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— файлової ÑиÑтеми не передбачено.\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "кількіÑÑ‚ÑŒ inode (%llu) має бути меншою за %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "зарезервовані блоки"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "блоки метаданих"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "нові метаблоки"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Такого не повинно було ÑтатиÑÑ! Ðемає sb у last super_sparse bg?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Такого не повинно було ÑтатиÑÑ! Ðеочікуване old_desc у super_sparse bg?\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Такого не повинно було ÑтатиÑÑ: inode зміни розмірів пошкоджено!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "Бібліотека EXT2FS верÑÑ–Ñ— 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури badblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури io_channel UNIX"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸ Ñтруктури io_channel"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури ÑпиÑку блоків каталогів"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Помилкова контрольна Ñума Ð´Ð»Ñ Ñтруктури icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури Powerquest io_channel"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури файлів ext2"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ° образу Ext2"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури io_channel inode`"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ð´ÐµÑкриптора Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Ðеправильна Ñигнатура Ñуперблока"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Занадто виÑокий номер модифікації файлової ÑиÑтеми"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Спроба запиÑу до файлової ÑиÑтеми, відкритої лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ деÑкриптори груп"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати деÑкриптори груп"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Пошкоджений деÑкриптор групи: помилковий блок або бітова карта блоків"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Пошкоджений деÑкриптор групи: помилковий блок або бітова карта inode"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Пошкоджений деÑкриптор групи: помилковий блок або Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ inode"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати бітову карту inode"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ бітову карту inode"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати бітову карту блоків"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ бітову карту блоків"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð´Ð¾ таблиці inode неможливий"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ таблицю inode"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ наÑтупний inode"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Ðеочікуваний розмір блоку файлової ÑиÑтеми"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "Каталог EXT2 пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Спроба прочитати блок з файлової ÑиÑтеми призвела до Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð½ÐµÐ´Ð¾Ñтатньої кількоÑÑ‚Ñ– даних"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Спроба запиÑати блок до файлової ÑиÑтеми призвела до недоÑтатноÑÑ‚Ñ– обÑÑгу даних"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "У каталозі немає вільного міÑцÑ"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Бітову карту inode не завантажено"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Бітову карту блоків не завантажено"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Ðекоректна кількіÑÑ‚ÑŒ inode"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Ðекоректна кількіÑÑ‚ÑŒ блоків"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° у ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "ÐедоÑтатньо проÑтору Ð´Ð»Ñ Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ð·Ð°Ð¿Ñ€Ð¾Ð¿Ð¾Ð½Ð¾Ð²Ð°Ð½Ð¾Ñ— файлової ÑиÑтеми"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "ext2fs_mark_block_bitmap передано некоректну кількіÑÑ‚ÑŒ блоків"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "ext2fs_unmark_block_bitmap передано некоректну кількіÑÑ‚ÑŒ блоків"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "ext2fs_test_block_bitmap передано некоректну кількіÑÑ‚ÑŒ блоків"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "ext2fs_mark_inode_bitmap передано некоректну кількіÑÑ‚ÑŒ inode"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "ext2fs_unmark_inode_bitmap передано некоректну кількіÑÑ‚ÑŒ inode"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "ext2fs_test_inode_bitmap передано некоректну кількіÑÑ‚ÑŒ inode"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Спроба переÑунути кінець бітової карти блоків за Ñправжній кінець"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Спроба переÑунути кінець бітової карти inode за Ñправжній кінець"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "ВиÑвлено некоректний опоÑередкований блок"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "ВиÑвлено некоректний подвійно опоÑередкований блок"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "ВиÑвлено некоректний потрійно опоÑередкований блок"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Бітові карти блоків не є однаковими"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Бітові карти inode не є однаковими"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "ÐеприпуÑтима назва приÑтрою або помилкове Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ð·Ð²Ð¸"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "У групі блоків немає таблиці inode"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Суперблок ext2 пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "ext2fs_mark_generic_bitmap передано некоректну загальну кількіÑÑ‚ÑŒ бітів"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "ext2fs_unmark_generic_bitmap передано некоректну загальну кількіÑÑ‚ÑŒ бітів"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "ext2fs_test_generic_bitmap передано некоректну загальну кількіÑÑ‚ÑŒ бітів"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "ВиÑвлено надто багато Ñимволічних поÑилань."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Функцією зворотного виклику цей випадок не оброблÑєтьÑÑ"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Inode належить пошкодженому блоку у таблиці inode"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "У файлової ÑиÑтеми Ñ” непідтримувані можливоÑÑ‚Ñ–"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "У файлової ÑиÑтеми Ñ” непідтримувані влаÑтивоÑÑ‚Ñ– щодо заборони запиÑу"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ Ð¿Ð¾Ð·Ð¸Ñ†Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ ÐºÐ°Ð½Ð°Ð»Ñƒ введеннÑ-Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ‡Ð¸ запиÑу"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ міÑце у пам'ÑÑ‚Ñ–"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Бібліотеці ext2 передано некоректний аргумент"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити блок у файловій ÑиÑтемі ext2"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¼Ñ–Ñтити inode у файловій ÑиÑтемі ext2"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Inode ext2 не є каталогом"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "У таблиці занадто багато поÑилань"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "ext2_lookup не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ файл"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Файл відкрито лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Ðе знайдено блоку каталогу ext2"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Каталог ext2 вже Ñ–Ñнує"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Ðереалізована бібліотечна Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ ext2"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "Ðадійшов запит щодо ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ñ–Ð´ кориÑтувача"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Файл ext2 є надто великим"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Ðаданий приÑтрій Ð¶ÑƒÑ€Ð½Ð°Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” блоковим приÑтроєм"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Ðе знайдено Ñуперблоку журналу"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Журнал має ÑкладатиÑÑ Ð· принаймні 1024 блоків"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Ðепідтримувана верÑÑ–Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Помилка під Ñ‡Ð°Ñ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ журналу"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Журнал не знайдено"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Підтримки хешів каталогів не передбачено"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Ðекоректний номер блоку розширеного атрибута"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми з бажаною кількіÑÑ‚ÑŽ inode неможливе"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Знімок e2image не викориÑтовуєтьÑÑ"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Занадто багато блоків деÑкрипторів зарезервованих груп"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Inode зміни розмірів пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Спроба вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ bmap блоку з пропущеним опоÑередкованим блоком"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: виконано"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: пошкоджена база даних"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: помилка введеннÑ-виведеннÑ"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: помилка блокуваннÑ"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: не виÑтачає пам’ÑÑ‚Ñ–"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Ð·Ð°Ð¿Ð¸Ñ Ð²Ð¶Ðµ Ñ–Ñнує"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ Ñ–Ñнує Ð´Ð»Ñ Ñ–Ð½ÑˆÐ¸Ñ… ключів"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: некоректний параметр"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: запиÑу не Ñ–Ñнує"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Ð·Ð°Ð¿Ð¸Ñ Ð·Ð°Ð±Ð¾Ñ€Ð¾Ð½ÐµÐ½Ð¾"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "СпиÑок блокувань каталогів ext2fs Ñ” порожнім"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Спроба змінити прив’Ñзку блоків за допомогою ітератора, придатного лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð¾Ð³Ð¾ шлÑху Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ ext4"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Помилкова контрольна Ñума Ð´Ð»Ñ 64-бітової загальної бітової карти"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Помилкова контрольна Ñума Ð´Ð»Ñ 64-бітової карти блоків"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Помилкова контрольна Ñума Ð´Ð»Ñ 64-бітової карти inode"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Помилкова контрольна Ñума --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Помилкова контрольна Ñума --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Помилкова контрольна Ñума --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Помилкова контрольна Ñума --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Помилкова контрольна Ñума --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Помилкова контрольна Ñума --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Помилкова контрольна Ñума --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Пошкоджено заголовок розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Пошкоджено покажчик розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Пошкоджено розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "У карті Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð½ÐµÐ¼Ð°Ñ” вільного міÑцÑ"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "У inode не викориÑтовуютьÑÑ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Ðемає «наÑтупного» розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Ðемає «попереднього» розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Ðемає Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Â«Ð²Ð³Ð¾Ñ€ÑƒÂ»"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Ðемає Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Â«Ð²Ð½Ð¸Ð·Â»"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Ðемає поточного вузла"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Підтримки дії у ext2fs не передбачено"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Ð”Ð»Ñ Ð²ÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð´Ð¾ вузла не виÑтачає міÑцÑ"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Поділ призведе до поÑви порожнього вузла"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Ð Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð½Ðµ знайдено"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Підтримки дії Ð´Ð»Ñ inode, що міÑÑ‚ÑÑ‚ÑŒ розширеннÑ, не передбачено"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Ðекоректна довжина розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "У каналі введеннÑ-Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ðµ передбачено 64-бітових номерів блоків"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Ðе вдалоÑÑ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€Ð¸Ñ‚Ð¸, чи змонтовано файлову ÑиÑтему, оÑкільки немає файла mtab"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Файлова ÑиÑтема Ñ” надто великою Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ð·Ð°Ñтарілих бітових карт"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: некоректна контрольна Ñума"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: зараз приÑтрій викориÑтовуєтьÑÑ"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: виконуєтьÑÑ e2fsck"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: номер блоку поза межами діапазону файлової ÑиÑтеми"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: виконуєтьÑÑ Ð½ÐµÐ²Ñ–Ð´Ð¾Ð¼Ð° діÑ"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: файлова ÑиÑтема вÑе ще викориÑтовуєтьÑÑ"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: Ñпроба Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ð·Ð° допомогою O_DIRECT зазнала невдачі"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Помилковий розмір деÑкриптора групи блоків"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Контрольна Ñума inode не відповідає inode"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Контрольна Ñума бітової карти inode не відповідає бітовій карті"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Контрольна Ñума блоку Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ Ð½Ðµ відповідає блоку розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "У блоці каталогу недоÑтатньо міÑÑ†Ñ Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Контрольна Ñума блоку каталогу не відповідає блоку каталогу"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Контрольна Ñума блоку розширеного атрибута не відповідає блоку"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Контрольна Ñума Ñуперблоку не відповідає Ñуперблоку"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Ðевідомий алгоритм обчиÑÐ»ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Контрольна Ñума блоку MMP не відповідає еталонній"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Файл ext2 вже Ñ–Ñнує"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Контрольна Ñума бітової карти блоку не відповідає бітовій карті"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Ðе можна здійÑнювати ітерацію блоками даних inode, що міÑтить вбудовані дані"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Розширений атрибут має некоректну довжину назви"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Розширений атрибут має некоректне довжину значеннÑ"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Розширений атрибут має некоректну хеш-Ñуму"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Блок розширеного атрибута має помилковий заголовок"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Ðе знайдено ключа розширеного атрибута"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "ÐедоÑтатньо міÑÑ†Ñ Ð´Ð»Ñ Ð·Ð±ÐµÑ€Ñ–Ð³Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… розширених атрибутів"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "У файловій ÑиÑтемі не передбачено можливоÑÑ‚Ñ– ext_attr або inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "У inode не міÑтитьÑÑ Ð²Ð±ÑƒÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ… даних"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Ðемає блоку Ð´Ð»Ñ inode із вбудованими даними"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "У вбудованих даних немає вільного міÑцÑ"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми Ð´Ð»Ñ Ñтруктури розширених атрибутів"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "ЗдаєтьÑÑ, inode міÑтить мотлох"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Розширений атрибут має некоректний відÑтуп значеннÑ"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Прапорці журналу є неузгодженими"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹ пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Помилковий файл ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð¹ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— файлової ÑиÑтеми"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Файлову ÑиÑтему пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "У файловій ÑиÑтемі виÑвлено помилковий CRC"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Суперблок журналу пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Inode пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "Inode, Ñкий міÑтить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð¾Ð³Ð¾ атрибута, пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "ДеÑкриптори групи не завантажено"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "ЗдаєтьÑÑ, внутрішню Ñтруктуру даних ext2_filsys пошкоджено"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "ВиÑвлено цикл у ієрархії розширеннÑ"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "Підтримки дії Ð´Ð»Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ журналу не передбачено"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "ВерÑÑ–Ñ Ð¿Ñ€Ð¾Ñ„Ñ–Ð»ÑŽ 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми у profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Розділ профілю не знайдено"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Зв’Ñзок профілю не знайдено"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Спроба додати зв’Ñзок до вузла, Ñкий не Ñ” розділом"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Заголовок розділу профілю міÑтить ненульове значеннÑ"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Помилковий зв’Ñзаний ÑпиÑок у Ñтруктурах профілю"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Помилковий груповий рівень у Ñтруктурах профілю"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Помилковий батьківÑький вказівник у Ñтруктурах профілю"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми у ітераторі профілю"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Ðе можна вÑтановлювати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ð° вузлі розділу"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Бібліотеці профілю передано некоректний аргумент"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Спроба внеÑти зміни до профілю, придатного лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Заголовок розділу профілю не перебуває на найвищому рівні"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "СинтакÑична помилка у заголовку розділу профілю"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "СинтакÑична помилка у запиÑу зв’Ñзку профілю"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Зайва завершальна дужка у профілі"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "У профілі не виÑтачає початкової фігурної дужки"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми у profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŒÐ½Ð¾Ñ— Ñуми у profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Ð†Ñ‚ÐµÑ€Ð°Ñ†Ñ–Ñ ÑƒÑіма розділами верхнього Ñ€Ñ–Ð²Ð½Ñ Ð½Ðµ підтримуєтьÑÑ"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ðекоректний об’єкт profile_section"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Більше немає розділів"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Підпрограмі обробки запитів передано помилковий набір назв"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Ðе відкрито жодного файла профілю"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ð³Ñ–Ñ‡Ð½Ð¾Ñ— Ñуми у profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Ðе вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ файл профілю"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Розділ вже Ñ–Ñнує"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ðекоректне булеве значеннÑ"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ðекоректне ціле значеннÑ"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Помилкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ð³Ñ–Ñ‡Ð½Ð¾Ñ— Ñуми у profile_file_data_t"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\tвоÑтаннє змонтовано %.*s, %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tвоÑтаннє змонтовано %s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tÑтворено %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tвоÑтаннє змінено %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Знайдено таблицю розділів %s у %s\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Ðе вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ %s: %s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Ймовірно, приÑтрою не Ñ–Ñнує. Чи правильно ви його вказали?\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s не Ñ” блоковим Ñпеціальним приÑтроєм.\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s міÑтить файлову ÑиÑтему %s з міткою %s\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s міÑить файлову ÑиÑтему %s\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s міÑтить дані «%s»\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the bigalloc feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "ПопередженнÑ: розробку Ñ– теÑÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– bigalloc ще не завершено\n"
+#~ "Докладніша інформаціÑ: https://ext4.wiki.kernel.org/index.php/Bigalloc\n"
+#~ "\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "ВикориÑтаннÑ: %s [-F] [-I inode_buffer_blocks] приÑтрій\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "під Ñ‡Ð°Ñ Ñпроби відкрити «%s»"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "Виконано ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ %u inode.\n"
+
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "МожливоÑÑ‚Ñ– encrypt та casefold неÑуміÑними.\n"
+#~ "Їх не можна вмикати одночаÑно.\n"
+
+#~ msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+#~ msgstr "Ðе можна вмикати можливіÑÑ‚ÑŒ ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ… ÑиÑтем, де увімкнено можливіÑÑ‚ÑŒ кодуваннÑ.\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "під Ñ‡Ð°Ñ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ «%s»"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** У файловій ÑиÑтемі виÑвлено помилки у контрольних Ñумах! ЗапуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck зараз же!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** У бітових картка виÑвлено помилки у контрольних Ñумах! ЗапуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck зараз же!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… карт: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "ПопередженнÑ, виникли проблеми з запиÑом Ñуперблоків.\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "i_dir_acl @F %Id, а має бути нуль.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "МожливоÑÑ‚Ñ– журналу: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Розмір журналу: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Довжина журналу: %u\n"
+#~ "ПоÑлідовніÑÑ‚ÑŒ журналу: 0x%08x\n"
+#~ "Початок журналу: %u\n"
+
+#~ msgid "Journal checksum type: crc32\n"
+#~ msgstr "Тип контрольної Ñуми журналу: crc32\n"
+
+#~ msgid ""
+#~ "Journal checksum type: %s\n"
+#~ "Journal checksum: 0x%08x\n"
+#~ msgstr ""
+#~ "Тип контрольної Ñуми журналу: %s\n"
+#~ "Контрольна Ñума журналу: 0x%08x\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "КількіÑÑ‚ÑŒ помилок журналу: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Розмір блоку журналу: %u\n"
+#~ "Довжина журналу: %u\n"
+#~ "Перший блок журналу: %u\n"
+#~ "ПоÑлідовніÑÑ‚ÑŒ журналу: 0x%08x\n"
+#~ "Початок журналу: %u\n"
+#~ "К-Ñ‚ÑŒ кориÑтувачів журналу: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "КориÑтувачі журналу: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: enabled project without quota together\n"
+#~ msgstr ""
+#~ "\n"
+#~ "ПопередженнÑ: увімкнено проект без Ñпільної квоти (together)\n"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "Будь лаÑка, запуÑÑ‚Ñ–Ñ‚ÑŒ e2fsck Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ñ— ÑиÑтеми.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "Ð´Ð»Ñ @i %i вÑтановлено прапорець ÑтиÑÐºÐ°Ð½Ð½Ñ Ñƒ файловій ÑиÑтемі, де підтримки ÑтиÑÐºÐ°Ð½Ð½Ñ Ð½Ðµ передбачено. "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "помилка під Ñ‡Ð°Ñ Ñпроби Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒ розширеного атрибута %b. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: попередженнÑ: теÑÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ–Ð´Ñ‚Ñ€Ð¸Ð¼ÐºÐ¸ ÑтиÑÐºÐ°Ð½Ð½Ñ Ñ‰Ðµ не завершено (екÑпериментальна можливіÑÑ‚ÑŒ).\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: e2fsck не було зібрано з підтримкою HTREE,\n"
+#~ "\tвтім, на файловій ÑиÑтемі %s Ñ” каталоги HTREE.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "під Ñ‡Ð°Ñ Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñƒ пам’ÑÑ‚Ñ– буфера зануленнÑ"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", невикориÑтаних inode %u\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ дані файлової ÑиÑтеми \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ tdb_fetch %s\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "UUID файлової ÑиÑтеми Ñ” невідповідним \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ tdb_open %s\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "Ðе вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ %s\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr "Відтворено операцію розміру %zd за адреÑою %llu\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати %s\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Ðекоректний параметр quotatype: %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ облаÑÑ‚ÑŒ пам’ÑÑ‚Ñ– Ð´Ð»Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ параметрів квотуваннÑ!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ облаÑÑ‚ÑŒ пам’ÑÑ‚Ñ– Ð´Ð»Ñ Ð·Ð±ÐµÑ€Ñ–Ð³Ð°Ð½Ð½Ñ Ð½Ð°Ð·Ð²Ð¸ файла tdb\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Ð”Ð»Ñ ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ñ— tune2fs, будь лаÑка, віддайте команду\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s Ñ” цілим приÑтроєм, а не лише одним розділом!\n"
+
+#~ msgid "\b\b\b\b\b\b\b\bCopied %llu / %llu blocks (%llu%%) in %s at %.2f MB/s \n"
+#~ msgstr "\b\b\b\b\b\b\b\bСкопійовано %llu з %llu блоків (%llu%%) за %s зі швидкіÑÑ‚ÑŽ %.2f МБ/Ñ\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the quota feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Quota for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "ПопередженнÑ: розробку Ñ– теÑÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑ‚Ñ– quota ще не завершено\n"
+#~ "Докладніша інформаціÑ: https://ext4.wiki.kernel.org/index.php/Quota\n"
+#~ "\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ ÑтатиÑтичні дані щодо %s --- %s\n"
diff --git a/po/vi.gmo b/po/vi.gmo
new file mode 100644
index 0000000..707785e
--- /dev/null
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 0000000..c528173
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,8594 @@
+# Vietnamese translation for e2fsprogs.
+# Bản dịch tiếng Việt dành cho e2fsprogs.
+# Copyright © 2014 Theodore Tso (msgids)
+# Copyright © 2014 Free Software Foundation, Inc.
+# This file is distributed under the same license as the e2fsprogs package.
+# Clytie Siddall <clytie@riverland.net.au>, 2006-2010.
+# Trần Ngá»c Quân <vnwildman@gmail.com>, 2012-2014, 2016, 2017, 2018.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.45.3\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2019-07-14 20:56-0400\n"
+"PO-Revision-Date: 2019-08-26 07:46+0700\n"
+"Last-Translator: Trần Ngá»c Quân <vnwildman@gmail.com>\n"
+"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Language-Team-Website: <http://translationproject.org/team/vi.html>\n"
+"X-Generator: Poedit 2.2.3\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Khối há»ng %u nằm ngoài phạm vi nên bị bá» qua.\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "trong khi kiểm tra sá»± đúng má»±c nút thông tin khối há»ng"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "trong khi Ä‘á»c nút thông tin khối há»ng"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1571
+#: e2fsck/unix.c:1685 misc/badblocks.c:1251 misc/badblocks.c:1259
+#: misc/badblocks.c:1273 misc/badblocks.c:1285 misc/dumpe2fs.c:431
+#: misc/dumpe2fs.c:688 misc/dumpe2fs.c:692 misc/e2image.c:1430
+#: misc/e2image.c:1627 misc/e2image.c:1648 misc/mke2fs.c:236
+#: misc/tune2fs.c:2796 misc/tune2fs.c:2895 resize/main.c:414
+#, c-format
+msgid "while trying to open %s"
+msgstr "trong khi cố mở %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "trong khi cố mở popen “%sâ€"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:243
+msgid "while reading in list of bad blocks from file"
+msgstr "trong khi Ä‘á»c vào danh sách các khối há»ng từ tập tin"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "trong khi cập nhật nút thông tin khối há»ng"
+
+#: e2fsck/badblocks.c:133
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "Cảnh báo: tìm thấy khối %u không hợp lệ trong nút thông tin khối há»ng nên bị xóa.\n"
+
+#: e2fsck/dirinfo.c:331
+msgid "while freeing dir_info tdb file"
+msgstr "trong khi đang giải phóng tập tin dir_info"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "Gặp lá»—i khi Ä‘á»c khối %lu (%s) trong khi %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "Gặp lá»—i khi Ä‘á»c khối %lu (%s). "
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "Bá» qua lá»—i"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "Ép buộc ghi lại"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "Găp lỗi khi ghi khối %lu (%s) trong khi %s. "
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "Gặp lỗi khi ghi khối %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "khối thư mục rỗng"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "ánh xạ thư mục rỗng"
+
+#: e2fsck/emptydir.c:98
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Khối thư mục rỗng %u (#%d) trong nút thông tin %u\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s tên tập tin số khối cỡ khối\n"
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Số lượng khối không hợp lệ!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Không thể cấp phát bộ đệm khối (cỡ=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "ánh xạ nút tái thiết mở rộng"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Cách dùng: %s đĩa\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "BLKFLSBUF ioctl không được hỗ trợ. Không thể đẩy dữ liệu bộ đệm lên đĩa.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr ""
+"Cách dùng: %s [-F] [-I khối_đệm_nút] thiết_bị\n"
+"\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:1082
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "trong khi mở %s để đẩy dữ liệu lên đĩa"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:1088 resize/main.c:383
+#, c-format
+msgid "while trying to flush %s"
+msgstr "trong khi cố đẩy dữ liệu %s lên đĩa"
+
+#: e2fsck/iscan.c:110
+#, c-format
+msgid "while trying to open '%s'"
+msgstr "trong khi cố mở “%sâ€"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1323
+msgid "while opening inode scan"
+msgstr "trong khi mở việc quét nút thông tin"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1342
+msgid "while getting next inode"
+msgstr "trong khi lấy nút thông tin kế tiếp"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u nút thông tin đã được quét.\n"
+
+#: e2fsck/journal.c:597
+msgid "reading journal superblock\n"
+msgstr "Ä‘ang Ä‘á»c siêu khối nhật ký\n"
+
+#: e2fsck/journal.c:670
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: không tìm thấy siêu khối nhật ký hợp lệ\n"
+
+#: e2fsck/journal.c:679
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: nhật ký quá ngắn\n"
+
+#: e2fsck/journal.c:972 misc/fuse2fs.c:3792
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: đang phục hồi nhật ký\n"
+
+#: e2fsck/journal.c:974
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: sẽ không phục hồi nhật ký trong khi ở chế Ä‘á»™ chỉ-Ä‘á»c\n"
+
+#: e2fsck/journal.c:1001
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "trong khi cố mở lại %s"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "athuộc tính đã mở rộng"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "Agặp lỗi khi cấp phát"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bkhối"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bmảng ảnh"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "cnén"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "Cxung đột với @b của hệ thống tập tin khác"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "dthư mục"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "Dbị xóa"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "emục nhập"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "E@e “%Dn†trong %p (%i)"
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "fhệ thống tập tin"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "Fcho @i %i (%Q) là"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "gnhóm"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE @d @i"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "inút thông tin"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Icấm"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "jnhật ký"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "lmất+tìm"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "Llà liên kết"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mđa tuyên bố"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "nkhông hợp lệ"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "othừa"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "pvấn đỠtrong"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qhạn nghạch"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "r@i gốc"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "snên là"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "Ssiêu@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "uchưa-gắn"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "vthiết-bị"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xmở-rộng"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "zdài bằng không"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<nút thông tin vô giá trị>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<Nút thông tin khối há»ng>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<Nút hạn ngạch ngÆ°á»i dùng>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<Nút hạn ngạch nhóm>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<Nút thông tin bộ nạp khởi động>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<Nút thông tin hủy xóa thư mục>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<Nút thông tin mô tả nhóm>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<nút thông tin nhật ký>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<Nút thông tin được dành riêng 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<nút thông tin được dành riêng 10>"
+
+#: e2fsck/message.c:327
+msgid "regular file"
+msgstr "tập tin thÆ°á»ng"
+
+#: e2fsck/message.c:329
+msgid "directory"
+msgstr "thư mục"
+
+#: e2fsck/message.c:331
+msgid "character device"
+msgstr "thiết bị ký tự"
+
+#: e2fsck/message.c:333
+msgid "block device"
+msgstr "thiết bị khối"
+
+#: e2fsck/message.c:335
+msgid "named pipe"
+msgstr "ống dẫn có tên"
+
+#: e2fsck/message.c:337
+msgid "symbolic link"
+msgstr "liên kết má»m"
+
+#: e2fsck/message.c:339 misc/uuidd.c:162
+msgid "socket"
+msgstr "ổ cắm"
+
+#: e2fsck/message.c:341
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "kiểu tập tin không rõ với chế độ 0%o"
+
+#: e2fsck/message.c:412
+msgid "indirect block"
+msgstr "khối gián tiếp"
+
+#: e2fsck/message.c:414
+msgid "double indirect block"
+msgstr "khối gián tiếp đôi"
+
+#: e2fsck/message.c:416
+msgid "triple indirect block"
+msgstr "khối gián tiếp gấp ba"
+
+#: e2fsck/message.c:418
+msgid "translator block"
+msgstr "khối dịch"
+
+#: e2fsck/message.c:420
+msgid "block #"
+msgstr "khối #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "ngÆ°á»i dùng"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "nhóm"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "dự án"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "kiểu hạn ngạch chưa biết"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "ánh xạ nút thông tin đa tuyên bố"
+
+#: e2fsck/pass1b.c:672 e2fsck/pass1b.c:826
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "lỗi nội bộ: không tìm thấy khối trùng (dup_blk) cho %llu\n"
+
+#: e2fsck/pass1b.c:952
+msgid "returned from clone_file_block"
+msgstr "đã trả lại từ khối tập tin nhái (clone_file_block)"
+
+#: e2fsck/pass1b.c:976
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "lỗi nội bộ: không thể tra tìm mục ghi khối EA cho %llu"
+
+#: e2fsck/pass1b.c:988
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "lỗi nội bộ: không thể tra tìm mục ghi nút thông tin EA cho %u"
+
+#: e2fsck/pass1.c:357
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "trong khi băm các hạng mục với e_value_inum = %u"
+
+#: e2fsck/pass1.c:775 e2fsck/pass2.c:1007
+msgid "reading directory block"
+msgstr "Ä‘ang Ä‘á»c khối thÆ° mục"
+
+#: e2fsck/pass1.c:1224
+msgid "in-use inode map"
+msgstr "ánh xạ nút thông tin đang được dùng"
+
+#: e2fsck/pass1.c:1235
+msgid "directory inode map"
+msgstr "ánh xạ nút thông tin thư mục"
+
+#: e2fsck/pass1.c:1245
+msgid "regular file inode map"
+msgstr "ánh xạ nút thông tin tập tin chuẩn"
+
+#: e2fsck/pass1.c:1254 misc/e2image.c:1282
+msgid "in-use block map"
+msgstr "ánh xạ khối đang được dùng"
+
+#: e2fsck/pass1.c:1263
+msgid "metadata block map"
+msgstr "bản đồ khối siêu_dữ_liệu"
+
+#: e2fsck/pass1.c:1325
+msgid "opening inode scan"
+msgstr "đang mở bản quét nút thông tin"
+
+#: e2fsck/pass1.c:1363
+msgid "getting next inode from scan"
+msgstr "đang lấy nút thông tin kế tiếp từ bản quét"
+
+#: e2fsck/pass1.c:2067
+msgid "Pass 1"
+msgstr "Lần 1"
+
+#: e2fsck/pass1.c:2128
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "Ä‘ang Ä‘á»c khối gián tiếp của nút thông tin %u"
+
+#: e2fsck/pass1.c:2179
+msgid "bad inode map"
+msgstr "ánh xạ nút thông tin sai"
+
+#: e2fsck/pass1.c:2219
+msgid "inode in bad block map"
+msgstr "nút thông tin trong ánh xạ khối sai"
+
+#: e2fsck/pass1.c:2239
+msgid "imagic inode map"
+msgstr "ánh xạ nút thông tin ma thuật imagic"
+
+#: e2fsck/pass1.c:2270
+msgid "multiply claimed block map"
+msgstr "ánh xạ khối đa tuyên bố"
+
+#: e2fsck/pass1.c:2395
+msgid "ext attr block map"
+msgstr "ánh xạ khối ext attr (thuộc tính thêm?)"
+
+#: e2fsck/pass1.c:3640
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu (%c): cần %6lu nhưng lại nhận được %6lu vật lý (đếm khối %lld)\n"
+
+#: e2fsck/pass1.c:4060
+msgid "block bitmap"
+msgstr "mảng ảnh khối"
+
+#: e2fsck/pass1.c:4066
+msgid "inode bitmap"
+msgstr "mảng ảnh nút thông tin"
+
+#: e2fsck/pass1.c:4072
+msgid "inode table"
+msgstr "bảng nút thông tin"
+
+#: e2fsck/pass2.c:307
+msgid "Pass 2"
+msgstr "Lần 2"
+
+#: e2fsck/pass2.c:1079 e2fsck/pass2.c:1246
+msgid "Can not continue."
+msgstr "Không thể tiếp tục."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "mảng ảnh nút thông tin hoàn tất"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Bộ nhớ cao điểm"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "Lần 3"
+
+#: e2fsck/pass3.c:344
+msgid "inode loop detection bitmap"
+msgstr "mảng ảnh phát hiện vòng lặp nút thông tin"
+
+#: e2fsck/pass4.c:277
+msgid "Pass 4"
+msgstr "Lần 4"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "Lần 5"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: Lỗi cấp phát bộ nhớ"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: Lỗi cấp phát bộ nhớ"
+
+#: e2fsck/problem.c:52
+msgid "(no prompt)"
+msgstr "(không nhắc)"
+
+#: e2fsck/problem.c:53
+msgid "Fix"
+msgstr "Sửa chữa"
+
+#: e2fsck/problem.c:54
+msgid "Clear"
+msgstr "Xóa sạch"
+
+#: e2fsck/problem.c:55
+msgid "Relocate"
+msgstr "Äịnh vị lại"
+
+#: e2fsck/problem.c:56
+msgid "Allocate"
+msgstr "Cấp phát"
+
+#: e2fsck/problem.c:57
+msgid "Expand"
+msgstr "Mở rộng"
+
+#: e2fsck/problem.c:58
+msgid "Connect to /lost+found"
+msgstr "Kết nối đến /mất+tìm"
+
+#: e2fsck/problem.c:59
+msgid "Create"
+msgstr "Tạo"
+
+#: e2fsck/problem.c:60
+msgid "Salvage"
+msgstr "Cứu vớt"
+
+#: e2fsck/problem.c:61
+msgid "Truncate"
+msgstr "Cắt ngắn"
+
+#: e2fsck/problem.c:62
+msgid "Clear inode"
+msgstr "Xóa sạch nút thông tin"
+
+#: e2fsck/problem.c:63
+msgid "Abort"
+msgstr "Hủy bá»"
+
+#: e2fsck/problem.c:64
+msgid "Split"
+msgstr "Chia tách"
+
+#: e2fsck/problem.c:65
+msgid "Continue"
+msgstr "Tiếp tục"
+
+#: e2fsck/problem.c:66
+msgid "Clone multiply-claimed blocks"
+msgstr "Nhân bản các khối đa tuyên bố"
+
+#: e2fsck/problem.c:67
+msgid "Delete file"
+msgstr "Xóa tập tin"
+
+#: e2fsck/problem.c:68
+msgid "Suppress messages"
+msgstr "Thu hồi thông điệp"
+
+#: e2fsck/problem.c:69
+msgid "Unlink"
+msgstr "BỠliên kết"
+
+#: e2fsck/problem.c:70
+msgid "Clear HTree index"
+msgstr "Xóa sạch chỉ mục hHTREE"
+
+#: e2fsck/problem.c:71
+msgid "Recreate"
+msgstr "Tạo lại"
+
+#: e2fsck/problem.c:72
+msgid "Optimize"
+msgstr "Tối ưu hóa"
+
+#: e2fsck/problem.c:81
+msgid "(NONE)"
+msgstr "(KHÔNG)"
+
+#: e2fsck/problem.c:82
+msgid "FIXED"
+msgstr "ÄÃ SỬA CHá»®A"
+
+#: e2fsck/problem.c:83
+msgid "CLEARED"
+msgstr "ÄÃ XÓA SẠCH"
+
+#: e2fsck/problem.c:84
+msgid "RELOCATED"
+msgstr "ÄÃ ÄỊNH VỊ LẠI"
+
+#: e2fsck/problem.c:85
+msgid "ALLOCATED"
+msgstr "ÄÃ CẤP PHÃT"
+
+#: e2fsck/problem.c:86
+msgid "EXPANDED"
+msgstr "ÄÃ MỞ RỘNG"
+
+#: e2fsck/problem.c:87
+msgid "RECONNECTED"
+msgstr "Äà KẾT Ná»I LẠI"
+
+#: e2fsck/problem.c:88
+msgid "CREATED"
+msgstr "ÄÃ TẠO"
+
+#: e2fsck/problem.c:89
+msgid "SALVAGED"
+msgstr "ÄÃ CỨU VỚT"
+
+#: e2fsck/problem.c:90
+msgid "TRUNCATED"
+msgstr "ÄÃ CẮT NGẮN"
+
+#: e2fsck/problem.c:91
+msgid "INODE CLEARED"
+msgstr "NÚT THÔNG TIN ÄÃ XÓA SẠCH"
+
+#: e2fsck/problem.c:92
+msgid "ABORTED"
+msgstr "BỊ HỦY BỎ"
+
+#: e2fsck/problem.c:93
+msgid "SPLIT"
+msgstr "ÄÃ CHIA TÃCH"
+
+#: e2fsck/problem.c:94
+msgid "CONTINUING"
+msgstr "ÄANG TIẾP TỤC"
+
+#: e2fsck/problem.c:95
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "CÃC KHá»I ÄA TUYÊN Bá» Äà ÄƯỢC NHÃI"
+
+#: e2fsck/problem.c:96
+msgid "FILE DELETED"
+msgstr "TẬP TIN ÄÃ BỊ XÓA"
+
+#: e2fsck/problem.c:97
+msgid "SUPPRESSED"
+msgstr "BỊ THU HỒI"
+
+#: e2fsck/problem.c:98
+msgid "UNLINKED"
+msgstr "BỊ BỎ LIÊN KẾT"
+
+#: e2fsck/problem.c:99
+msgid "HTREE INDEX CLEARED"
+msgstr "CHỈ MỤC HTREE ÄÃ ÄƯỢC XÓA SẠCH"
+
+#: e2fsck/problem.c:100
+msgid "WILL RECREATE"
+msgstr "SẼ TẠO LẠI"
+
+#: e2fsck/problem.c:101
+msgid "WILL OPTIMIZE"
+msgstr "SẼ Tá»I ƯU HÓA"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:115
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@b @B cho @g %g không phải trong @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:119
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@i @B cho @g %g không phải trong @g. (@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:124
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"Bảng @i cho @g %g không phải trong @g. (@b %b)\n"
+"CẢNH BÃO: CÓ THỂ MẤT Dá»® LIỆU NHIỀU.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:130
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"@S không thể Ä‘á»c được hoặc không diá»…n tả @f kiểu ext2 đúng.\n"
+"@v hợp lệ. Nếu @v là hợp lệ và nó đã sẵn chứa một @f kiểu ext2/ext3/ext4\n"
+"(và không phải vùng trao đổi hay ufs hay gì khác), thế thì @S\n"
+"bị há»ng: thế thì bạn nên thá»­ chạy e2fsck vá»›i @S thay thế:\n"
+" e2fsck -b 8193 <@v>\n"
+" hoặc\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:141
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"Kích cỡ @f (tùy theo @S) là %b @b\n"
+"Kích cỡ vật lý của @v là %c @b\n"
+"Hoặc @S hoặc bảng phân vùng rất có thể bị há»ng.\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:148
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"@S kích cỡ @b = %b, kích cỡ đoạn = %c.\n"
+"Phiên bản e2fsck này không hỗ trợ kích cỡ đoạn\n"
+"khác với kích cỡ @b.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:155
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@S @b mỗi nhóm = %b, còn nên là %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:160
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "@S @b dữ liệu thứ nhất = %b, nên là %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:165
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f không có UUID nên đang tạo ra nó.\n"
+"\n"
+
+#: e2fsck/problem.c:171
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"Ghi chú: nếu vài khối nút thông tin hay khối mảng ảnh khối\n"
+"hay phần của bảng nút thông tin cần thiết được định vị lại,\n"
+"Ä‘á» nghị bạn thá»­ chạy e2fsck vá»›i tùy chá»n “-b %Sâ€\n"
+"trước tiên. Vấn đỠcó thể nằm chỉ trong các mô tả nhóm\n"
+"khối chính, thì các mô tả nhóm khối dự trữ có thể là đúng.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:180
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Tìm thấy hÆ° há»ng trong @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:186
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Gặp lỗi khi xác định kích cỡ của @v vật lý: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:191
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "Số lượng @i trong @S là %i, @s %j.\n"
+
+#: e2fsck/problem.c:195
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd không hỗ trợ tính năng kiểu tập tin.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:201
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@S có một @n @j (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:206
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "@j bên ngoài có nhiá»u ngÆ°á»i dùng @f (không được há»— trợ).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:211
+msgid "Can't find external @j\n"
+msgstr "Không tìm thấy @j bên ngoài\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:216
+msgid "External @j has bad @S\n"
+msgstr "@j bên ngoài có @S sai\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:221
+msgid "External @j does not support this @f\n"
+msgstr "@j bên ngoài không hỗ trợ @f này\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:226
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"@S @j @f có kiểu lạ %N (không được hỗ trợ).\n"
+"Rất có thể là bạn có một bản sao e2fsck cũ mà/hay không hỗ trợ định dạng @j này.\n"
+"CÅ©ng có thể là @S @j bị há»ng.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:235
+msgid "@j @S is corrupt.\n"
+msgstr "@S @j bị há»ng.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:240
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "CỠ@S has_@j vẫn tốt, nhưng lại có một @j hiện diện ở đây.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:245
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "@S đặt cỠneeds_recovery, còn không có @j hiện diện.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:250
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "CỠ@S needs_recovery vẫn tốt, nhưng @j lại có dữ liệu.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:255
+msgid "Clear @j"
+msgstr "Xóa sạch @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:260 e2fsck/problem.c:796
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "@f đặt (các) cỠtính năng, còn là @f bản sửa đổi 0. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:265
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "@i @o %s %i (uid=%Iu, gid=%Ig, chế độ=%Im, cỡ=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:270
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "%B (%b) @l được tìm trong @i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:275
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Äã xóa sạch %B (%b) được tìm trong @i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:281
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@i @o %i @l trong @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:287
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@I @i %i in @o @i list.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:292
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "@S @j đặt má»™t cá» tính năng chỉ Ä‘á»c không rõ.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:297
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "@S @j đặt một cỠtính năng không tương thích không rõ.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:302
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "Phiên bản @j không hỗ trợ trong e2fsck này.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:308
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Äang di chuyển @j từ /%s sang @i ẩn.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:314
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Gặp lỗi khi di chuyển @j: %m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:319
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Tìm thấy các trÆ°á»ng @S @j pb2 @n (từ @j pb1).\n"
+"Äang xóa sạch các trÆ°á»ng nằm ở bên kia @S @j pb1…\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:325
+msgid "Run @j anyway"
+msgstr "Vẫn chạy @j"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:330
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "Chưa đặt cỠphục hồi trong @S dự trữ nên vẫn chạy @j.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:335
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"Äang sao lÆ°u thông tin @b @i @j.\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:341
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"@f không bật resize_@i, còn s_reserved_gdt_@bs là %N;\n"
+"@s số không. "
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:347
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Không bật resize_@i, còn @i thay đổi kích cỡ không phải số không.. "
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:352
+msgid "Resize @i not valid. "
+msgstr "@i thay đổi kích cỡ không phải hợp lệ. "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:357
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"GiỠgắn kết @S cuối cùng\n"
+"(%t, bây giá» = %T) nằm trong thá»i tÆ°Æ¡ng lai.\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:362
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "GiỠghi @S cuối cùng(%t, bây giỠ= %T) nằm trong thì tương lai.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:368
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "Lá»i gợi ý @S cho siêu khối bên ngoài @s %X. "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:373
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Äang thêm gợi ý dirhash vào @f.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:378
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "Mô tả @g %g có tổng kiểm là %04x, phải là %04y. "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:384
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "Mô tả @g %g có nhãn là chưa khởi tạo mà không có tập tính năng.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:389
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "Mô tả @g %g sai đếm các nút thông tin chưa dùng %b. "
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:394
+msgid "Last @g @b @B uninitialized. "
+msgstr "Chưa khởi tạo @B @b @g cuối cùng. "
+
+#: e2fsck/problem.c:400
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Giao dịch nhật ký %i bị há»ng nên hủy bá» tiến trình phát lại.\n"
+
+#: e2fsck/problem.c:405
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "CỠ“test_fs†được đặt (và ext4 sẵn sàng) "
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:410
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"GiỠgắn kết @S cuối cùng nằm trong tương lai\n"
+"\t(theo ít nhất má»™t ngày, rất có thể do đồng hồ phần cứng bị đặt sai giá»)\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:416
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"GiỠghi @S cuối cùng nằm trong tương lai\n"
+"\t(theo ít nhất một ngày, rất có thể do đồng hồ phần cứng bị đặt không đúng)\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:422
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "Lá»—i: má»™t hay nhiá»u tổng kiểm bá»™ mô tả @g @b không phải hợp lệ. "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:427
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Äang đặt số lượng @is thành %j (là %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:432
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Äang đặt số lượng @bs thành %c (là %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:437
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "Äang ẩn %U @q @i %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:442
+msgid "@S has invalid MMP block. "
+msgstr "@S có khối MMP không hợp lệ. "
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:447
+msgid "@S has invalid MMP magic. "
+msgstr "@S có số màu nhiệm MMP không hợp lệ. "
+
+#: e2fsck/problem.c:453
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:459
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:465
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "@S metadata_csum supersedes uninit_bg; cả hai bít đó không thể được đặt cùng lúc."
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:471
+msgid "@S MMP @b checksum does not match. "
+msgstr "Tổng kiểm tra @b MMP @S không khớp. "
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:476
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "@f 64bit @S cần mở rộng để có thể truy cập toàn bộ đĩa. "
+
+#: e2fsck/problem.c:481
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "First_meta_bg quá lớn. (%N, giá trị tối đa %g). "
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:486
+msgid "External @j @S checksum does not match @S. "
+msgstr "Tổng kiểm tra @j @S mở rộng không khớp với @S. "
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:491
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "@S metadata_csum_seed là không cần thiết nếu không có metadata_csum."
+
+#: e2fsck/problem.c:497
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "Lỗi khởi tạo ngữ cảnh hạn ngạch trong thư viện hỗ trợ: %m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:502
+msgid "Bad required extra isize in @S (%N). "
+msgstr "Sai isize mở rộng đã yêu cầu trong @S (%N). "
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:507
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "Sai isize mở rộng đã mong muốn trong @S (%N). "
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:512
+msgid "Invalid %U @q @i %i. "
+msgstr "%U @q @i %i không hợp lệ. "
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:517
+msgid "@S would have too many inodes (%N).\n"
+msgstr "@S đã có quá nhiá»u nút (% N).\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:522
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"Resize_@i và tính năng meta_bg được kích hoạt. Những tính năng này\n"
+"không tương thích. Resize @i nên bị vô hiệu hoá. "
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:530
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Lần qua 1: đang kiểm tra các @i, @b và kích cỡ\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:534
+msgid "@r is not a @d. "
+msgstr "@r không phải @d. "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:539
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "@r đặt dtime (rất có thể do mkd2fs cũ). "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:544
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "@i %i đã dành riêng (%Q) có chế độ @n. "
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:550
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "@i @D %i có dtime bằng không. "
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:556
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "@i %i đang được dùng, còn đặt dtime. "
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:562
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "@i %i là @d @z. "
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:567
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "@B @b của @g %g tại %b @C.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:572
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "@B @i của @g %g ở %b @c.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:577
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "Bảng @i của @g %g ở %b @C.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:582
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "@b @B (%b) của @g %g là sai "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:587
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "@B @i (%b) của @g %g là sai. "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:592
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i, i_size là %Is, @s %N. "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:597
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i, i_@bs là %Ib, @s %N. "
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:602
+msgid "@I %B (%b) in @i %i. "
+msgstr "%B (%b) @l nằm trong @i %i. "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:607
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) đè lên siêu dữ liệu @f trong @i %i. "
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:613
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "@i %i có @b cấm. "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:619
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Quá nhiá»u @b cấm trong @i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:624
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "%B (%b) @l nằm trong @i @b sai. "
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:629
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "@i @b sai có @b cấm. "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:634
+msgid "Duplicate or bad @b in use!\n"
+msgstr "@b trùng hay sai đang được dùng.\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:639
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "@b sai %b được dùng làm @b gián tiếp của @i @b. "
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:644
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"@i @n gần nhÆ° chắc chắn đã há»ng. Äá» nghị bạn dừng ngay bây giá»\n"
+"và chạy lệnh “e2fsck -c†để quét tìm khối sai trong @f.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:651
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"@b thật sai thì không thể sửa chữa @f.\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:656
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"Bạn có thể gỡ bá» @b này khá»i danh sách các @b sai\n"
+"và mong @b thật đúng. Nhưng mà không bảo hành gì.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:662
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "@S chính (%b) nằm trên danh sách các @b sai.\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:667
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Khối %b trong những mô tả @g chính có nằm trong danh sách các @b sai.\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:673
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Cảnh báo: @S của @g %g (%b) là sai.\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:679
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Cảnh báo: bản sao các mô tả @g của nhóm %g có một @b sai (%b).\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:685
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Lỗi lập trình? @b %b được tuyên bố, không có lý do, trong process_bad_@b\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:691
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %N @b ká» nhau trong @g @b %g cho %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:697
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A bộ đệm @b để định vị lại %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:702
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Äang định vị lại %s của @g %g từ %b sang %c…\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:708
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Äang định vị lại %s của @g %g sang %c…\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:713
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Cảnh báo: không thể Ä‘á»c @b %b trên %s: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:718
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Cảnh báo: không thể ghi @b %b cho %s: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:723 e2fsck/problem.c:1871
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A @B @i (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:728
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A @B @b (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:734
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A thông tin liên kết icount: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:740
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A mảng @d @d: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:746
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Gặp lỗi khi quét các @i (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:752
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Gặp lỗi khi lặp lại trên các @b trong @i %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:757
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Gặp lỗi khi cất giữ thông tin đếm @i (@i=%i, đếm=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:762
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Gặp lỗi khi cất giữ thông tin @d @b (@i=%i, @b=%b, số=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:769
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Gặp lá»—i khi Ä‘á»c @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:778
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "@i %i đặt cỠma thuật imagic. "
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:784
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"Tập tin (@v/ổ cắm/FIFO/liên kết má»m) đặc biệt\n"
+"(@i %i) đặt cỠkhông thay đổi (immutable) hay\n"
+"chỉ phụ thêm (append-only). "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:791
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "@i (@v/ổ cắm/FIFO) %i có kích cỡ không phải số không. "
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:801
+msgid "@j @i is not in use, but contains data. "
+msgstr "@i @j không đang được dùng, còn chứa dữ liệu. "
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:806
+msgid "@j is not regular file. "
+msgstr "@j không phải tập tin chuẩn. "
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:812
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "@i %i đã thuộc vỠsanh sách @i @o. "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:818
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "Tìm thấy các @i đã thuá»™c vá» danh sách đã liên kết thừa bị há»ng. "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:823
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A cấu trúc refcount (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:828
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Gặp lá»—i khi Ä‘á»c @b @a %b cho @i %i. "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:833
+msgid "@i %i has a bad @a @b %b. "
+msgstr "@i %i có một @b @a %b. "
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:838
+msgid "Error reading @a @b %b (%m). "
+msgstr "Gặp lá»—i khi Ä‘á»c @b @a %b (%m). "
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:843
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "@b @a %b có số đếm tham chiếu %r, @s %N. "
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:848
+msgid "Error writing @a @b %b (%m). "
+msgstr "Gặp lỗi khi ghi @b @a %b (%m). "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:853
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "@b @a %b có h_@b > 1. "
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:858
+msgid "@A @a region allocation structure. "
+msgstr "@A @a cấu trúc phân bổ vùng. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:863
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "@b @a %b bị há»ng (xung Ä‘á»™t cấp phát). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:868
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "@b @a %b bị há»ng (tên @n). "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:873
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "@b @a %b bị há»ng (giá trị @n). "
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:879
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "@i %i là quá lớn. "
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:883
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) gây ra @d quá lớn. "
+
+#: e2fsck/problem.c:888
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) làm cho tập tin quá lớn. "
+
+#: e2fsck/problem.c:893
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) làm cho liên kết má»m quá lá»›n. "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:899
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "@i %i đặt cỠINDEX_FL trên @f không có hỗ trợ htree.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:905
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "@i %i đặt cỠINDEX_FL nhưng không phải @d.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:911
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "@h %i có một nút gốc @n.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:916
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %i có một phiên bản băm không được hỗ trợ (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:922
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "@h %i dùng cỠnút gốc htree không tương thích.\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:927
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "@h %i có độ sâu cây (%N) quá lớn\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:933
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr ""
+"@i @b sai có một @b gián tiếp (%b) xung đột với\n"
+"siêu dữ liệu @f. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:940
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Việc tạo (lại) sự thay đổi kích cỡ @i bị lỗi: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:945
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "@i %i có một kích cỡ thêm (%IS) @n\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:950
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "@a trong @i %i có một namelen (%N) @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:955
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "@a trong @i %i có một hiệu giá trị (%N) @n\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:960
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "@a trong @i %i có một giá trị @b (%N) @n (phải là 0)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:965
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "@a trong @i %i có một kích cỡ giá trị (%N) @n\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:970
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "@a trong @i %i có một chuỗi duy nhất (%N) mà @n\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:975
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "@i %i là %It nhưng hình như nó thực sự là thư mục.\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:981
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Gặp lá»—i khi Ä‘á»c qua cây @x trong @i %i: %m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:986
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"Không lặp lại tầm trong @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:992
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i có một phạm vi @n\n"
+"\t(@b lô-gíc %c, @b vật lý @n %b, dài %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:997
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"@i %i có một phạm vi @n\n"
+"\t(@b lô-gíc %c, @b vật lý %b, dài @n %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1003
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "@i %i đặt cỠEXTENTS_FL trên @f mà không hỗ trợ phạm vi.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1009
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "@i %i theo định dạng phạm vi, còn @S thiếu tính năng phạm vi (EXTENTS)\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1015
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "@i %i thiếu EXTENTS_FL, nhưng theo định dạng phạm vi\n"
+
+#: e2fsck/problem.c:1021
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "Liên kết má»m nhanh %i đã đặt EXTENTS_FL. "
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1026
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i có các phạm vi sai thứ tự\n"
+"\t(@b lô-gíc %c, @b vật lý %b, dài %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1030
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "@i %i có một nút tầm không hợp lệ (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1036
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Gặp lỗi khi chuyển đổi liên cung con @b @B: %m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1041
+msgid "@q @i is not a regular file. "
+msgstr "@q @i không phải tập tin thông thÆ°á»ng. "
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1046
+msgid "@q @i is not in use, but contains data. "
+msgstr "@q @i đang không được dùng, nhưng chứa dữ liệu. "
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1051
+msgid "@q @i is visible to the user. "
+msgstr "@q @i sẵn dùng. "
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1056
+msgid "The bad @b @i looks @n. "
+msgstr "The bad @b @i looks @n. "
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1061
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"@i %i có phần mở rộng mà độ dài bằng không\n"
+"\t(@n lôgíc @b %c, vật lý @b %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1067
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "@i %i có lẽ đã chứa rác. "
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1073
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "@i %i các kiểm tra qua, nhưng tổng kiểm không khớp @i. "
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1079
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "@i %i @a bị há»ng (xung Ä‘á»™t cấp phát). "
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1087
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i các kiểm tra khối mở rộng đã qua, nhưng tổng kiểm không khớp phạm vi\n"
+"\t(@b lô-gíc %c, @b vật lý %b, dài %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1096
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "@i %i @a @b %b các kiemr tra đã qua, nhưng tổng kiểm không khớp @b. "
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1101
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"Ở trong nút @x mức %N/@i %i:\n"
+"Khởi đầu lô-gíc %b không khớp với khởi đầu lô-gíc %c tại mức kế tiếp. "
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1107
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i, điểm kết thúc vượt quá giá trị cho phép\n"
+"\t(lô-gíc @b %c, vật lý @b %b, dài %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1113
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "@i %i có dữ liệu chung dòng, nhưng còn @S thiếu tính năng dữ liệu chung dòng INLINE_DATA\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1119
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "@i %i có cỠchung dòng INLINE_DATA_FL trên @f không có hỗ trợ dữ liệu chung dòng.\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1127
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "@i %i khối %b xung đột với siêu dữ liệu tới hạn, bỠqua kiểm tra khối.\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1132
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "@d @i %i @b %b nên ở tại @b %c. "
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1138
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "@i @d %i có một @x được đánh dấu là chưa khởi tạo tại @biến %c. "
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1143
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"@i %i lô-gíc @b %b (vật lý @b %c) vi phạm qui tắc phân bỠliên cung.\n"
+"Sẽ được sửa tại lần 1B.\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1149
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "@i %i có cỠINLINE_DATA_FL nhưng @a không tìm thấy. "
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1156
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"Tập tin đặc biệt (@v/socket/fifo) (@i %i) có đặt cỠmở rộng\n"
+"hay dữ liệu chung dòng. "
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1163
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "@i %i có phần đầu @x nhưng cỠdữ liệu chung dòng không được đặt.\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1169
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "@i %i dÆ°á»ng nhÆ° có dữ liệu chung dòng nhÆ°ng cá» @x lại được đặt.\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1175
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "@i %i dÆ°á»ng nhÆ° có ánh xạ @b nhÆ°ng dữ liệu chung dòng và cá» @x được đặt.\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1181
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "@i %i có dữ liệu chung dòng và cỠ@x được đặt nhưng i_block chứa rác.\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1186
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "Danh sách khối há»ng nói rằng danh sách khối sai @i là sai. "
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1191
+msgid "@A @x region allocation structure. "
+msgstr "@A @x cấu trúc phân bổ vùng. "
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1196
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i có ánh xạ @x trùng lặp\n"
+"\t(@b lô-gíc %c, @n vật lý @b %b, dài %N)\n"
+
+#. @-expanded: error allocating memory for encrypted directory list\n
+#: e2fsck/problem.c:1201
+msgid "@A memory for encrypted @d list\n"
+msgstr "@A bộ nhớ cho danh sách @d đã mã hóa\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1206
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "@i %i @x cây nên nông hơn (%b; nên <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1212
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "@i %i trên @f bigalloc không thể là một ánh xạ @b. "
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1218
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "@i %i có phần đầu @x bị há»ng. "
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1224
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "Các dấu thá»i gian trên @i %i vượt quá 2310-04-04 giống nhÆ° là trÆ°á»›c 1970.\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1229
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i có @I @a giá trị @i %N.\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1235
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "@i %i có @n @a. EA @i %N thiếu cỠEA_INODE.\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1240
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"EA @i %N cho cha @i %i thiếu cỠEA_INODE.\n"
+" "
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1248
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Äạng chạy má»™t số lần qua thêm để tháo gỡ các @b đã tuyên bố\n"
+"bởi nhiá»u @i…\n"
+"Lần qua 1B: đang quét lại tìm @b @m.\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1255
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b @m trong @i %i:"
+
+#: e2fsck/problem.c:1271
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Gặp lỗi khi quét các nút thông tin (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1277
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A @B @i (@i_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1283
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Gặp lỗi khi lặp lại trên các @b trong @i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1288 e2fsck/problem.c:1663
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Gặp lá»—i khi Ä‘iá»u chỉnh số đếm tham chiếu cho @b @a %b (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1298
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Lần qua 1C: đang quét các thư mục tìm @i có @b @m\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1304
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Lần qua 1D: Ä‘ang Ä‘iá»u hòa các @b @m\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1309
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Tập tin %Q (@i #%i, giỠsửa đổi %IM) \n"
+" có %r @b @m, chia sẻ với %N tập tin:\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1315
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i #%i, giỠsửa đổi %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1320
+msgid "\t<@f metadata>\n"
+msgstr "\t<siêu dữ liệu @f>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1325
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(Có %N @is chứa @b @m.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1330
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@b @m đã được gán lại hay nhân bản.\n"
+"\n"
+
+#: e2fsck/problem.c:1344
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Không thể nhân bản tập tin: %m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1350
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "Lần 1E: Äang tối Æ°u cây @x\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1356
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "Gặp lỗi khi tối ưu hóa cây @x %p (%i): %m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1361
+msgid "Optimizing @x trees: "
+msgstr "Äang tối Æ°u hóa cây %x: "
+
+#: e2fsck/problem.c:1376
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "Lỗi nội bộ: độ sâu cây mở rộng tối đa quá lớn (%b; cần=%c).\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1381
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "@i %i @x cây (ở mức %b) nên ngắn hơn. "
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1386
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "@i %i @x cây (ở mức %b) nên hẹp hơn. "
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1393
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Lần qua 2: đang kiểm tra cấu trúc @d\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1399
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Con số @i @n cho dấu chấm “.†trong @i @d %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1404
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E có số hiệu @i @n: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1409
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E có @i @D/chưa dùng %Di. "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1414
+msgid "@E @L to '.' "
+msgstr "@E @L đến “.†"
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1419
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E chỉ tới @i (%Di) nằm trong @b sai.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1424
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E @L đến @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1429
+msgid "@E @L to the @r.\n"
+msgstr "@E @L tá»›i @r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1434
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E có tên chứa ký tự cấm.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1440
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Thiếu “.†trong @i @d %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1446
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Thiếu “..†trong @i @d %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1451
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "@e “%Dn†thứ nhất (@i=%Di) trong @i @d %i (%p) @s “.â€\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1456
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "@e “%Dn†thứ hai (@i=%Di) trong @i @d %i @s “..â€\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1461
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "Äịa chỉ i_faddr cho nút injode %i (%Q) là %IF, còn nên là số không.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1466
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s số không.\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1471
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "i_size_high @F %Id, @s số không.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1476
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N, @s số không.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1481
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N, @s số không.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1486
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) có chế độ @n (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1491
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@i @d %i, %B, hiệu %N: @d bị há»ng\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1496
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@i @d %i, %B, hiệu %N: tên tập tin quá dài\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1501
+msgid "@d @i %i has an unallocated %B. "
+msgstr "@i @d %i có một %B chưa cấp phát. "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1507
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@e @d “.†trong @i @d %i không được chấm dứt bằng NULL (vô giá trị)\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1513
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@e @d “..†trong @i @d %i không được chấm dứt bằng NULL (vô giá trị)\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1518
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) là @v ký tự @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1523
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) là @v @b @I.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1528
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E là @e “.†trùng.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1533
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E là @e “..†trùng.\n"
+
+#: e2fsck/problem.c:1539 e2fsck/problem.c:1898
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Lỗi nội bộ: không tìm thấy thông tin thư mục (dir_info) vỠ%i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1544
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E có rec_len %Dr, @s %N.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1550
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A cấu trúc icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1556
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Gặp lỗi khi lặp lại trên các @b @d: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1561
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Gặp lá»—i khi Ä‘á»c @b @d %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1566
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Gặp lỗi khi ghi @b @d %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1572
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A @b @d má»›i cho @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1578
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Gặp lỗi khi hủy cấp phát @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1584
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "@d @e đối với “.†trong %p (%i) quá lớn.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1589
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) là một FIFO @I.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1594
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) là một ổ cắm @I.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1599
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Äăng đặt kiểu tập tin cho @E thành %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1604
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E có kiểu tập tin không đúng (đã %Dt, @s %N).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1609
+msgid "@E has filetype set.\n"
+msgstr "@E đặt kiểu tập tin.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1614
+msgid "@E has a @z name.\n"
+msgstr "@E có tên @z.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1619
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Liên kết má»m %Q (@i #%i) @n.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1624
+msgid "@a @b @F @n (%If).\n"
+msgstr "@a @b @F @n (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1629
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "@f chứa các tập tin lớn còn thiếu cỠLARGE_FILE trong @S.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1634
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@p @h %d: %B không được tham chiếu\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1639
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p @h %d: %B được tham chiếu hai lần\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1644
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p @h %d: %B có chuỗi duy nhất tối thiểu sai\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1649
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p @h %d: %B có chuỗi duy nhất tối đa sai\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1654
+msgid "@n @h %d (%q). "
+msgstr "@h @n %d (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1658
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p @h %d (%q): số @b sai %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1669
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p @h %d: nút gốc @n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1674
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p @h %d: %B có giới hạn @n (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1679
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p @h %d: %B có số đếm @n (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1684
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p @h %d: %B có một bảng chuỗi duy nhất không đặt thứ tự\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1689
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p @h %d: %B có chiá»u sâu @n (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1694
+msgid "Duplicate @E found. "
+msgstr "Tìm thấy @E trùng. "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1699
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E có tên tập tin không duy nhất.\n"
+"Thay đổi tên thành %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1704
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Tìm thấy @e “%Dn†trùng.\n"
+"\tNên nhãn %p (%i) cần được xây dựng lại.\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1709
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, @s số không.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1714
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Gặp @b bất thÆ°á»ng trong @h %d (%q).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1719
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E tham chiếu đến @i %Di trong @g %g ở vị trí đặt _INODE_UNINIT.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1724
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E tham chiếu đến @i %Di được tìm trong vùng nút thông tin không dùng của @g %g.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1729
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s số không.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1735
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p @h %d: nút gốc có tổng kiểm sai.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1741
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p @h %d: nút nội tại có tổng kiểm sai.\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1746
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@i @d %i, %B, khoảng bù %N: @d không có tổng kiểm\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1751
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "@d @i %i, %B: @d qua kiểm tra nhưng lại sai tổng kiểm.\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1756
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "Chung dòng @d @i %i cỡ (%N) phải là bội của 4.\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1762
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "Gặp lỗi khi sửa cỡ của chung dòng @d @i %i.\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1767
+msgid "Encrypted @E is too short.\n"
+msgstr "@E đã mã hóa là quá ngắn.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1774
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Lần 3: Äang kiểm tra khả năng kết nối của @d\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1779
+msgid "@r not allocated. "
+msgstr "Chưa cấp phát @r. "
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1784
+msgid "No room in @l @d. "
+msgstr "Không có chỗ còn trống trong @d @l. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1790
+#, no-c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "@i @d %i không được kết nối (%p)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1795
+msgid "/@l not found. "
+msgstr "/@l không tìm thấy. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1800
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "“..†trong %Q (%i) là %P (%j), @s %q (%d).\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "Có /@l sai hay không tồn tại nên không thể kết nối lại.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1812
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Không thể mở rộng /@l: %m\n"
+
+#: e2fsck/problem.c:1818
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "Không thể kết nối lại %i: %m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1824
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Gặp lỗi khi cố tìm /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1830
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b: %m trong khi cố tạo @d /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1836
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: %m trong khi cố tạo @d /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1842
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_@b: %m trong khi đang tạo @b @d mới\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1848
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_write_dir_@b: %m trong khi ghi @b @d cho /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1854
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Gặp lá»—i khi Ä‘iá»u chỉnh số đếm @i trên @i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1860
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Không thể sửa chữa nút cha của @i %i: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1866
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Không thể sửa chữa nút cha của @i %i: không tìm thấy @e @d cha\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Gặp lỗi khi tạo @d gốc (%s): %m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Gặp lỗi khi tạo @d /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1888
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r không phải @d nên hủy bá».\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1893
+msgid "Cannot proceed without a @r.\n"
+msgstr "Không thể tiếp tục khi không có @r.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1904
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l không phải @d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1909
+msgid "/@l has inline data\n"
+msgstr "/@l có dữ liệu chung dòng\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1914
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"Không thể phân bổ không gian cho /@l.\n"
+"Äặt các tập tin mất trong thÆ° mục gốc để thay thế"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1919
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"Không đủ chỗ để khôi phục các tập tin đã mất!\n"
+"Xóa bá»›t dữ liệu ra khá»i và chạy lại e2fsck.\n"
+"\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1924
+msgid "/@l is encrypted\n"
+msgstr "/@l đã được mã hóa\n"
+
+#: e2fsck/problem.c:1931
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Lần qua 3A: đang tối ưu hóa các thư mục\n"
+
+#: e2fsck/problem.c:1937
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Lỗi tạo bộ lặp lại thư mục tới băm (dirs_to_hash): %m\n"
+
+#: e2fsck/problem.c:1942
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Lỗi tối ưu hóa thư mục %q (%d): %m\n"
+
+#: e2fsck/problem.c:1947
+msgid "Optimizing directories: "
+msgstr "Äang tối Æ°u hóa các thÆ° mục: "
+
+#: e2fsck/problem.c:1964
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Lần qua 4: đang kiểm tra các số đếm tham chiếu\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:1970
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "@i @u @z %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1976
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "@i @u %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:1981
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "@i %i có số đếm tham chiếu %Il, @s %N. "
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:1985
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"CẢNH BÃO: GẶP Lá»–I LẬP TRÃŒNH TRONG E2FSCK!\n"
+"\tHOẶC NGƯỜI NÀO ÄANG KIỂM TRA MỘT HỆ THá»NG TẬP TIN Äà LẮP (ÄỘNG).\n"
+"@i_link_info[%i] là %N, @i.i_links_count là %Il: @s trùng.\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:1992
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "@i @i %i có số đếm tham chiếu %N, @s %n. "
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:1997
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "@d vượt quá liên kết tối đa, nhưng không có tính năng DIR_NLINK trong @S.\n"
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2004
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Lần 5: đang kiểm tra thông tin tóm tắt nhóm\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2009
+msgid "Padding at end of @i @B is not set. "
+msgstr "Chưa đặt độ đệm tại kết thúc của @B @I. "
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2014
+msgid "Padding at end of @b @B is not set. "
+msgstr "Chưa đặt độ đệm tại kết thúc của @B @b. "
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2019
+msgid "@b @B differences: "
+msgstr "Khác biệt @B @b: "
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2041
+msgid "@i @B differences: "
+msgstr "Khác biệt @B @i: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2063
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Số đếm các @i rảnh không đúng cho @g #%g (%i, đã đếm=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2068
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Số đếm các thư mục không đúng cho @g #%g (%i, đã đếm=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2073
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Số đếm các @i rảnh không đúng (%i, đã đếm=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2078
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Số đếm các @b rảnh không đúng cho @g #%g (%b, đã đếm=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2083
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Số đếm các @b rảnh không đúng (%b, đã đếm=%c).\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2088
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "LỖI LẬP TRÌNH: trong @f (#%N) có các điểm cuối @B (%b, %c) không tương ứng với các điểm cuối @B đã tính (%i, %j)\n"
+
+#: e2fsck/problem.c:2094
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Lỗi nội bộ: đang làm quấy quá kết thúc của mảng ảnh (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2100
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Gặp lỗi khi sao chép vào @B @i thay thế: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2106
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "Gặp lỗi khi sao chép vào @B @b thay thế: %m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2136
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "Các @b của @g %g đang được dùng, còn @g có nhãn là BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2142
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "Các @i của @g %g đang được dùng, còn @g có nhãn là INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2148
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "@g %g @i @B không khớp tổng kiểm.\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2154
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "@g %g @b @B không khớp tổng kiểm.\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2161
+msgid "Recreate @j"
+msgstr "Tạo lại @j"
+
+#: e2fsck/problem.c:2166
+msgid "Update quota info for quota type %N"
+msgstr "Cập nhật thông tin hạn ngạch cho kiểu hạn ngạch %N"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2172
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "Gặp lỗi khi đặt thông tin tổng kiểm @b @g: %m\n"
+
+#: e2fsck/problem.c:2178
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "Gặp lỗi khi ghi thông tin hệ thống: %m\n"
+
+#: e2fsck/problem.c:2184
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "Gặp lỗi khi đẩy dữ liệu sau lệnh ghi lên thiết bị lưu trữ: %m\n"
+
+#: e2fsck/problem.c:2189
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "Lỗi khi ghi thông tin hạn ngạch cho kiểu %N: %m\n"
+
+#: e2fsck/problem.c:2352
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Mã lỗi chưa quản lý (0x%x)!\n"
+
+#: e2fsck/problem.c:2482 e2fsck/problem.c:2486
+msgid "IGNORED"
+msgstr "BỊ BỎ QUA"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "trong move_quota_inode"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Bá»™ nhá»› đã chiếm: %d, thá»i gian đã qua: %6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "kích cỡ nút thông tin=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "trong khi khởi chạy tiến trình quét nút thông tin"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "trong khi chạy tiến trình quét nút thông tin"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "trong khi gá»i hàm lặp lại khối “ext2fs_block_iterate†cho nút thông tin %u"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "trong khi gá»i hàm “ext2fs_adjust_ea_refcount†cho nút thông tin %u"
+
+#: e2fsck/super.c:374
+msgid "Truncating"
+msgstr "Äang cắt ngắn"
+
+#: e2fsck/super.c:375
+msgid "Clearing"
+msgstr "Äang xóa sạch"
+
+#: e2fsck/unix.c:78
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"Cách dùng: %s [-panyrcdfktvDFV] [-b siêu_khối] [-B cỡ_khối]\n"
+"\t\t[-I khối_đệm_inode] [-P cỡ_inode_xử_lý]\n"
+"\t\t[-l|-L tập_tin_khối_sai] [-C fd] [-j nhật_ký_ngoài]\n"
+"\t\t[-E tùy_chá»n_đã_mở_rá»™ng] [-z tập_tin_undo] thiết_bị\n"
+
+#: e2fsck/unix.c:83
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Trợ giúp khẩn cấp:\n"
+" -p Sá»­a chữa tá»± Ä‘á»™ng (không có câu há»i)\n"
+" -n Không thay đổi hệ thống tập tin\n"
+" -y Giả sá»­ trả lá»i “Có†má»i câu há»i\n"
+" -c Kiểm tra tìm khối sai: thêm vào danh sách khối sai\n"
+" -f Buộc kiểm tra ngay cả khi hệ thống tập tin có nhãn là sạch\n"
+
+#: e2fsck/unix.c:89
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v Xuất chi tiết\n"
+" -b siêu_khối Dùng siêu khối xen kẽ\n"
+" -B cỡ_khối Buộc kích cỡ của khối khi tìm siêu khối\n"
+" -j nhật_ký_bên_ngoài Äặt địa Ä‘iểm của nhật ký bên ngoài\n"
+" -l tập_tin_khối_sai Thêm vào danh sách các khối sai\n"
+" -L tập_tin_khối_sai Äặt danh sách các khối sai\n"
+" -z undo_file Tạo một tập tin undo\n"
+
+#: e2fsck/unix.c:137
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u tập tin (%0d.%d%% không kỠnhau), %llu/%llu khối\n"
+
+#: e2fsck/unix.c:163
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u inode đã được dùng (%2.2f%%, vượt quá %u)\n"
+
+#: e2fsck/unix.c:167
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u tệp tin không liá»n ká» nhau (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:172
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u thư mục không kỠnhau (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:177
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " # số inode có khối ind/dind/tind: %u/%u/%u\n"
+
+#: e2fsck/unix.c:185
+msgid " Extent depth histogram: "
+msgstr " Äồ thị Ä‘á»™ sâu: "
+
+#: e2fsck/unix.c:194
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu khối đã dùng (%2.2f%%, vượt quá %llu)\n"
+
+#: e2fsck/unix.c:198
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u khối há»ng\n"
+
+#: e2fsck/unix.c:200
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u tập tin quá lớn\n"
+
+#: e2fsck/unix.c:202
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u tập tin thÆ°á»ng\n"
+
+#: e2fsck/unix.c:204
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u thư mục\n"
+
+#: e2fsck/unix.c:206
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u thiết bị ký tự\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u tệp tin thiết bị khối\n"
+
+#: e2fsck/unix.c:211
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u tập tin fifo\n"
+
+#: e2fsck/unix.c:213
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u liên kết\n"
+
+#: e2fsck/unix.c:215
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u liên kết má»m"
+
+#: e2fsck/unix.c:217
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u liên kết má»m nhanh)\n"
+
+#: e2fsck/unix.c:221
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+
+#: e2fsck/unix.c:225
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u tập tin\n"
+
+#: e2fsck/unix.c:238 misc/badblocks.c:1002 misc/tune2fs.c:2986 misc/util.c:129
+#: resize/main.c:354
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "trong khi dò tìm xem %s đã gắn kết chưa."
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Cảnh báo! %s đã được gắn.\n"
+
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "Cảnh báo! %s đang được dùng.\n"
+
+#: e2fsck/unix.c:268
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s đã gắn kết.\n"
+
+#: e2fsck/unix.c:270
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s đang được dùng.\n"
+
+#: e2fsck/unix.c:272
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Không thể tiếp tục nên hủy bá».\n"
+"\n"
+
+#: e2fsck/unix.c:274
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"CẢNH BÃO!!! Hệ thống tập tin đã gắn kết. Vẫn tiếp tục thì\n"
+"đây có thể là nguyên nhân ***LÀM HỎNG NẶNG*** hệ thống tập tin.\n"
+"\n"
+
+#: e2fsck/unix.c:279
+msgid "Do you really want to continue"
+msgstr "Bạn thực sự muốn tiếp tục"
+
+#: e2fsck/unix.c:281
+msgid "check aborted.\n"
+msgstr "kiểm tra bị hủy bá».\n"
+
+#: e2fsck/unix.c:375
+msgid " contains a file system with errors"
+msgstr " chứa hệ thống tập tin có lỗi"
+
+#: e2fsck/unix.c:377
+msgid " was not cleanly unmounted"
+msgstr " chưa tháo gắn kết sạch"
+
+#: e2fsck/unix.c:379
+msgid " primary superblock features different from backup"
+msgstr " tính năng của siêu khối chính khác với bản sao lưu"
+
+#: e2fsck/unix.c:383
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " đã được gắn kết %u lần mà không được kiểm tra"
+
+#: e2fsck/unix.c:390
+msgid " has filesystem last checked time in the future"
+msgstr " có giỠkiểm tra hệ thống tập tin lần cuối cùng trong tương lai"
+
+#: e2fsck/unix.c:396
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " đã chạy trong %u ngày mà không được kiểm tra"
+
+#: e2fsck/unix.c:404
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "bá» qua kiểm tra khoảng thá»i gian, đặt broken_system_clock\n"
+
+#: e2fsck/unix.c:410
+msgid ", check forced.\n"
+msgstr ", kiểm tra bị ép buộc.\n"
+
+#: e2fsck/unix.c:443
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: sạch, %u/%u tập tin, %llu/%llu khối"
+
+#: e2fsck/unix.c:463
+msgid " (check deferred; on battery)"
+msgstr " (kiểm tra bị hoãn; chạy bằng pin)"
+
+#: e2fsck/unix.c:466
+msgid " (check after next mount)"
+msgstr " (kiểm tra sau lần gắn kết kế tiếp)"
+
+#: e2fsck/unix.c:468
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kiểm tra sau %ld lần gắn kết)"
+
+#: e2fsck/unix.c:618
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "LỖI: không thể mở “/dev/null†(%s)\n"
+
+#: e2fsck/unix.c:689
+msgid "Invalid EA version.\n"
+msgstr "Phiên bản EA không hợp lệ.\n"
+
+#: e2fsck/unix.c:702
+msgid "Invalid readahead buffer size.\n"
+msgstr "Kích cỡ bộ đệm readahead không hợp lệ.\n"
+
+#: e2fsck/unix.c:757
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Tùy chá»n đã mở rá»™ng lạ: %s\n"
+
+#: e2fsck/unix.c:765
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"Các tùy chá»n mở rá»™ng được ngăn cách nhau bằng dấu phẩy, và có thể chấp nhận\n"
+"đối số được đặt vá»›i dấu bằng “=â€. Các tùy chá»n mở rá»™ng hợp lệ là:\n"
+"\n"
+
+#: e2fsck/unix.c:769
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<ea_version (1 hoặc 2)>\n"
+
+#: e2fsck/unix.c:778
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<cỡ bộ đệm>\n"
+
+#: e2fsck/unix.c:790
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Gặp lỗi cú pháp trong tập tin cấu hình e2fsck (%s, dòng số %d)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:863
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Gặp lỗi khi hợp lệ hóa mô tả tập tin %d: %s\n"
+
+#: e2fsck/unix.c:867
+msgid "Invalid completion information file descriptor"
+msgstr "Mô tả tập tin thông tin hòa chỉnh không hợp lệ"
+
+#: e2fsck/unix.c:882
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "Có thể chỉ ra má»™t trong những tùy chá»n -p/-a, -n và -y."
+
+#: e2fsck/unix.c:903
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Tùy chá»n “-t†không được há»— trợ trong phiên bản e2fsck này.\n"
+
+#: e2fsck/unix.c:934 e2fsck/unix.c:1012 misc/e2initrd_helper.c:330
+#: misc/tune2fs.c:1695 misc/tune2fs.c:1990 misc/tune2fs.c:2008
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Không thể phân giải “%sâ€"
+
+#: e2fsck/unix.c:991
+msgid "The -n and -D options are incompatible."
+msgstr "Hai tùy chá»n “-n†và “-D†không tÆ°Æ¡ng thích vá»›i nhau."
+
+#: e2fsck/unix.c:996
+msgid "The -n and -c options are incompatible."
+msgstr "Hai tùy chá»n “-n†và “-c†không tÆ°Æ¡ng thích vá»›i nhau."
+
+#: e2fsck/unix.c:1001
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Hai tùy chá»n “-n†và “-l/-L†không tÆ°Æ¡ng thích vá»›i nhau."
+
+#: e2fsck/unix.c:1025
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "Hai tùy chá»n “-D†và “-E†không tÆ°Æ¡ng thích vá»›i nhau."
+
+#: e2fsck/unix.c:1031
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "Hai tùy chá»n -E bmap2extent và fixes_only không tÆ°Æ¡ng thích vá»›i nhau."
+
+#: e2fsck/unix.c:1095
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Không cho phép sá»­ dụng đồng thá»i cả hai tùy chá»n “--c†và “--l/Lâ€.\n"
+
+#: e2fsck/unix.c:1142
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG “%s†không phải số nguyên\n"
+"\n"
+
+#: e2fsck/unix.c:1151
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Äối số không thuá»™c số không hợp lệ đối vá»›i -%c (“%sâ€)\n"
+"\n"
+
+#: e2fsck/unix.c:1242
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "Khoảng nhịp MMP là %u giây cá»™ng vá»›i tổng thá»i gian chá» là %u giây. Vui lòng chá»â€¦\n"
+
+# Item in the main menu to select this package
+#: e2fsck/unix.c:1259 e2fsck/unix.c:1264
+msgid "while checking MMP block"
+msgstr "trong khi kiểm tra khối MMP"
+
+#: e2fsck/unix.c:1266
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"Nếu bạn chắc là hệ thống tập tin không đang sử dụng bất kỳ nút nào, chạy lệnh:\n"
+"“tune2fs -f -E clear_mmp %sâ€\n"
+
+#: e2fsck/unix.c:1282
+msgid "while reading MMP block"
+msgstr "trong khi Ä‘á»c khối MMP"
+
+#: e2fsck/unix.c:1302 e2fsck/unix.c:1354 misc/e2undo.c:236 misc/e2undo.c:281
+#: misc/mke2fs.c:2696 misc/mke2fs.c:2747 misc/tune2fs.c:2713
+#: misc/tune2fs.c:2758 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"Äang ghi đè lên hệ thống tập tin đã có ; có thể làm việc này dùng câu lệnh:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1343 misc/e2undo.c:270 misc/mke2fs.c:2736 misc/tune2fs.c:2747
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "trong khi cố xóa %s"
+
+#: e2fsck/unix.c:1369 misc/mke2fs.c:2762 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "trong khi cố cài đặt tập tin undo\n"
+
+#: e2fsck/unix.c:1412
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Lỗi: phiên bản thư viện ext2fs quá cũ.\n"
+
+#: e2fsck/unix.c:1419
+msgid "while trying to initialize program"
+msgstr "trong khi cố khởi tạo chương trình"
+
+#: e2fsck/unix.c:1456
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tDùng %s, %s\n"
+
+#: e2fsck/unix.c:1468
+msgid "need terminal for interactive repairs"
+msgstr "cần thiết bị cuối để sửa chữa theo kiểu tương tác"
+
+#: e2fsck/unix.c:1529
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s đang cố sao lưu dự phòng các khối dự trữ…\n"
+
+#: e2fsck/unix.c:1531
+msgid "Superblock invalid,"
+msgstr "Siêu khối không hợp lệ,"
+
+#: e2fsck/unix.c:1532
+msgid "Group descriptors look bad..."
+msgstr "Có vẻ là các mô tả nhóm sai…"
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s trong khi Ä‘á»c nút thông tin khối há»ng"
+
+#: e2fsck/unix.c:1546
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: đang trở vỠsiêu khối gốc\n"
+
+#: e2fsck/unix.c:1575
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"Có vẻ là bản sửa đổi hệ thống tập tin quá cao cho phiên bản e2fsck này\n"
+"(hoặc siêu khối hệ thống tập tin bị há»ng).\n"
+"\n"
+
+#: e2fsck/unix.c:1582
+msgid "Could this be a zero-length partition?\n"
+msgstr "Phân vùng này có thể có độ dài bằng không?\n"
+
+#: e2fsck/unix.c:1584
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Bạn phải có quyá»n truy cập %s vào hệ thống tập tin, hoặc có quyá»n siêu quản trị\n"
+
+#: e2fsck/unix.c:1590
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Có thể là thiết bị không tồn tại, hoặc thiết bị trao đổi?\n"
+
+#: e2fsck/unix.c:1592
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Hệ thống tập tin đã được gắn kết hay mở hoàn toàn bởi chương trình khác?\n"
+
+#: e2fsck/unix.c:1596
+msgid "Possibly non-existent device?\n"
+msgstr "Có thể là thiết bị không tồn tại?\n"
+
+#: e2fsck/unix.c:1599
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+"ÄÄ©a bị chống ghi; hãy dùng tùy chá»n “-n†để chạy\n"
+"việc kiểm tra chỉ Ä‘á»c trên thiết bị đó.\n"
+
+#: e2fsck/unix.c:1613
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: cố gắng để tải siêu khối mặc dù lỗi...\n"
+
+#: e2fsck/unix.c:1688
+msgid "Get a newer version of e2fsck!"
+msgstr "Lấy phiên bản e2fsck mới hơn!"
+
+#: e2fsck/unix.c:1749
+#, c-format
+msgid "while checking journal for %s"
+msgstr "trong khi kiểm tra nhật ký cho %s"
+
+#: e2fsck/unix.c:1752
+msgid "Cannot proceed with file system check"
+msgstr "Không thể xử lý với kiểm tra hệ thống tập tin"
+
+#: e2fsck/unix.c:1763
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Cảnh báo: Ä‘ang bá» qua việc phục hồi nhật ký vì Ä‘ang kiểm tra hệ thống tập tin má»™t cách chỉ Ä‘á»c.\n"
+
+#: e2fsck/unix.c:1775
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "không thể đặt cỠsiêu khối trên %s\n"
+
+#: e2fsck/unix.c:1781
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "Tìm thấy lỗi tổng kiểm nhật ký trong %s\n"
+
+#: e2fsck/unix.c:1785
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "Nhật ký bị há»ng ở %s\n"
+
+#: e2fsck/unix.c:1789
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "trong khi phục hồi nhật ký của %s"
+
+#: e2fsck/unix.c:1811
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s có tính năng không được hỗ trợ:"
+
+#: e2fsck/unix.c:1826
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s có tính năng không được hỗ trợ: %0x\n"
+
+#: e2fsck/unix.c:1876
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s trong khi Ä‘á»c nút thông tin khối há»ng\n"
+
+#: e2fsck/unix.c:1879
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Äây không phải báo trÆ°á»›c Ä‘iá»m hay, nhÆ°ng chúng tôi sẽ cố thử…\n"
+
+#: e2fsck/unix.c:1919
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Äang tạo nhật ký (%d khối): "
+
+#: e2fsck/unix.c:1929
+msgid " Done.\n"
+msgstr " Xong.\n"
+
+#: e2fsck/unix.c:1931
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** nhật ký đã được tạo lại ***\n"
+
+#: e2fsck/unix.c:1937
+msgid "aborted"
+msgstr "bị hủy bá»"
+
+#: e2fsck/unix.c:1939
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck bị hủy bá».\n"
+
+#: e2fsck/unix.c:1966
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Äang khởi chạy lại hoàn toàn e2fsck…\n"
+
+#: e2fsck/unix.c:1970
+msgid "while resetting context"
+msgstr "trong khi đặt lại ngữ cảnh"
+
+#: e2fsck/unix.c:2029
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** CÃC Lá»–I CỦA HỆ THá»NG TẬP TIN Äà ÄƯỢC SỬA Äá»”I *****\n"
+
+#: e2fsck/unix.c:2031
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: Hệ thống tập tin bị sửa đổi.\n"
+
+#: e2fsck/unix.c:2035 e2fsck/util.c:71
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** HỆ THá»NG TẬP TIN BỊ SỬA Äá»”I *****\n"
+
+#: e2fsck/unix.c:2040
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** KHỞI ÄỘNG LẠI HỆ THá»NG *****\n"
+
+#: e2fsck/unix.c:2050 e2fsck/util.c:77
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** CẢNH BÃO: Hệ thống tập tin vẫn còn có lá»—i **********\n"
+"\n"
+
+#: e2fsck/util.c:196 misc/util.c:93
+msgid "yY"
+msgstr "cCyY"
+
+#: e2fsck/util.c:197 misc/util.c:112
+msgid "nN"
+msgstr "kKnN"
+
+#: e2fsck/util.c:198
+msgid "aA"
+msgstr "tTaA"
+
+#: e2fsck/util.c:202
+msgid " ('a' enables 'yes' to all) "
+msgstr " (“a†bật “yes†cho tất cả) "
+
+#: e2fsck/util.c:219
+msgid "<y>"
+msgstr "<c>"
+
+#: e2fsck/util.c:221
+msgid "<n>"
+msgstr "<k>"
+
+#: e2fsck/util.c:223
+msgid " (y/n)"
+msgstr " (c/k)"
+
+#: e2fsck/util.c:246
+msgid "cancelled!\n"
+msgstr "đã hủy!\n"
+
+#: e2fsck/util.c:279
+msgid "yes to all\n"
+msgstr "đồng ý với tất cả\n"
+
+#: e2fsck/util.c:281
+msgid "yes\n"
+msgstr "có\n"
+
+#: e2fsck/util.c:283
+msgid "no\n"
+msgstr "không\n"
+
+#: e2fsck/util.c:293
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? không\n"
+"\n"
+
+#: e2fsck/util.c:297
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? có\n"
+"\n"
+
+#: e2fsck/util.c:301
+msgid "yes"
+msgstr "có"
+
+#: e2fsck/util.c:301
+msgid "no"
+msgstr "không"
+
+#: e2fsck/util.c:317
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: khối mảng ảnh cấm cho %s"
+
+#: e2fsck/util.c:322
+msgid "reading inode and block bitmaps"
+msgstr "Ä‘ang Ä‘á»c mảng ảnh kiểu cả hai nút thông tin và khối"
+
+#: e2fsck/util.c:334
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "trong khi cố Ä‘á»c mảng ảnh cho %s"
+
+#: e2fsck/util.c:346
+msgid "writing block and inode bitmaps"
+msgstr "đang ghi các mảng ảnh kiểu khối và nút thông tin"
+
+#: e2fsck/util.c:351
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "trong khi ghi lại các mảng ảnh kiểu khối và nút thông tin cho %s"
+
+#: e2fsck/util.c:363
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: MÂU THUẪN BẤT THƯỜNG: HÃY TỰ CHẠY fsck.\n"
+"\t(tức là không có tùy chá»n “-a†hay “-pâ€).\n"
+
+#: e2fsck/util.c:444
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Vùng nhớ được dùng: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:448
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Vùng nhớ được dùng: %lu, "
+
+#: e2fsck/util.c:455
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "thá»i gian: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:460
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "thá»i gian đã qua: %6.3f\n"
+
+#: e2fsck/util.c:495 e2fsck/util.c:509
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "trong khi Ä‘á»c nút thông tin %lu trong %s"
+
+#: e2fsck/util.c:523 e2fsck/util.c:536
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "trong khi ghi nút thông tin %lu trong %s"
+
+#: e2fsck/util.c:792
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "MÂU THUẪN: hệ thống tập tin đang được sửa chữa trong khi lệnh fsck đang chạy.\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "hoàn tất \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"Cách dùng: %s [-b cỡ_khối] [-i tập_tin_đầu_vào] [-o tập_tin_đầu_ra] [-svwnfBX]\n"
+" [-c số_khối_cùng_lúc] [-d hệ_số_đợi_Ä‘á»c] [-e số_tối_Ä‘a_khối_xấu]\n"
+" [-p số_lần_qua] [-t mẫu_thử [-t mẫu_thử […]]]\n"
+" thiết_bị [khối_cuối [khối_đầu]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: hai tùy chá»n “-n†và “-w†loại từ lẫn nhau.\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% hoàn tất, %s đã trôi qua. (%d/%d/%d lỗi)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "Äang thá»­ ra bằng mẫu ngẫu nhiên: "
+
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "Äang thá»­ ra bằng mẫu 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "trong khi di chuyển vị trí"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Giá trị lạ (%ld) trong việc Ä‘á»c “do_readâ€\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "trong khi đồng bá»™ hóa thiết bị “ext2fs_sync_deviceâ€"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "trong khi bắt đầu lặp lại danh sách các khối sai"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "trong khi cấp phát bộ đệm"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Äang kiểm tra khối trong phạm vi %lu đến %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Äang kiểm tra tìm khối sai trong chế Ä‘á»™ chỉ Ä‘á»c\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Äang kiểm tra tìm khối sai (kiểm tra ở chế Ä‘á»™ chỉ Ä‘á»c): "
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Quá nhiá»u khối sai nên hủy bá» phép thá»­\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Äang kiểm tra tìm khối sai trong chế Ä‘á»™ Ä‘á»c-ghi\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Từ khối %lu đến %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "Äang Ä‘á»c và so sánh: "
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Äang kiểm tra tìm khối sai trong chế Ä‘á»™ Ä‘á»c-ghi không hủy\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Äang kiểm tra tìm khối sai (thá»­ ở chế Ä‘á»™ Ä‘á»c-ghi không phá hủy)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Mới bắt tín hiệu ngắt nên làm sạch\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "trong khi thử ra ghi dữ liệu, khối %lu"
+
+#: misc/badblocks.c:1007 misc/util.c:134
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s đã được gắn kết; "
+
+#: misc/badblocks.c:1009
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+"tùy chá»n khối sai (badblocks) vẫn bị ép buá»™c.\n"
+"Mong “/etc/mtab†không đúng.\n"
+
+#: misc/badblocks.c:1014
+msgid "it's not safe to run badblocks!\n"
+msgstr "không an toàn khi chạy badblocks.\n"
+
+#: misc/badblocks.c:1019 misc/util.c:145
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "Có vẻ là %s đang được hệ thống dùng; "
+
+#: misc/badblocks.c:1022
+msgid "badblocks forced anyway.\n"
+msgstr "vẫn ép buộc badblocks (khối sai).\n"
+
+#: misc/badblocks.c:1042
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s không hợp lệ — %s"
+
+#: misc/badblocks.c:1136
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "Số lượng khối sai tối đa %u quá lớn - tối đa là %u"
+
+#: misc/badblocks.c:1163
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "không thể cấp phát bộ nhớ cho mẫu thử (test_pattern) — %s"
+
+#: misc/badblocks.c:1193
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "Trong chế Ä‘á»™ chỉ Ä‘á»c, có thể chỉ ra tối Ä‘a má»™t mẫu thá»­ (test_pattern)"
+
+#: misc/badblocks.c:1199
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Không cho phép mẫu thá»­ (test_pattern) ngẫu nhiên trong chế Ä‘á»™ chỉ Ä‘á»c"
+
+#: misc/badblocks.c:1213
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Không thể xác định kích cỡ của thiết bị;\n"
+"bạn cần phải tự chỉ định kích cỡ đó.\n"
+
+#: misc/badblocks.c:1219
+msgid "while trying to determine device size"
+msgstr "trong khi thử dò tìm kích cỡ của thiết bị"
+
+#: misc/badblocks.c:1224
+msgid "last block"
+msgstr "khối cuối"
+
+#: misc/badblocks.c:1230
+msgid "first block"
+msgstr "khối đầu"
+
+#: misc/badblocks.c:1233
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "khối đầu không hợp lệ (%llu): phải nhỠhơn %llu"
+
+#: misc/badblocks.c:1240
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "khối cuối không hợp lệ (%llu): phải là giá trị 32 bít"
+
+#: misc/badblocks.c:1296
+msgid "while creating in-memory bad blocks list"
+msgstr "trong khi tạo danh sách các khối há»ng trong bá»™ nhá»›"
+
+#: misc/badblocks.c:1305
+msgid "input file - bad format"
+msgstr "tập tin đầu vào - sai định dạng"
+
+#: misc/badblocks.c:1313 misc/badblocks.c:1322
+msgid "while adding to in-memory bad block list"
+msgstr "trong khi thêm vào danh sách các khối há»ng trong bá»™ nhá»›"
+
+#: misc/badblocks.c:1347
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Qua xong, tìm thấy %u khối sai. (%d/%d/%d errors)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-pRVf] [-+=aAcCdDeijPsStTuF] [-v version] files...\n"
+msgstr "Cách dùng: %s [-pRVf] [-+=aAcCdDeijPsStTuF] [-v phiên_bản] tập_tin…\n"
+
+#: misc/chattr.c:160
+#, c-format
+msgid "bad project - %s\n"
+msgstr "dự án sai — %s\n"
+
+#: misc/chattr.c:174
+#, c-format
+msgid "bad version - %s\n"
+msgstr "phiên bản sai — %s\n"
+
+#: misc/chattr.c:220 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "trong khi cố lấy các thông tin vỠ%s"
+
+#: misc/chattr.c:227
+#, c-format
+msgid "while reading flags on %s"
+msgstr "trong khi Ä‘á»c các cá» trên %s"
+
+#: misc/chattr.c:232 misc/chattr.c:244
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Các cỠcủa %s đã đặt thành "
+
+#: misc/chattr.c:253
+#, c-format
+msgid "while setting flags on %s"
+msgstr "trong khi đặt các cỠtrên %s"
+
+#: misc/chattr.c:261
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Phiên bản %s được đặt thành %lu\n"
+
+#: misc/chattr.c:265
+#, c-format
+msgid "while setting version on %s"
+msgstr "trong khi đặt phiên bản trên %s"
+
+#: misc/chattr.c:272
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "Dự án của %s được đặt thành %lu\n"
+
+#: misc/chattr.c:276
+#, c-format
+msgid "while setting project on %s"
+msgstr "trong khi cài đặt dự án trên %s"
+
+#: misc/chattr.c:298
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Không thể cấp phát biến Ä‘Æ°á»ng dẫn trong chattr_dir_proc"
+
+#: misc/chattr.c:338
+msgid "= is incompatible with - and +\n"
+msgstr "= không tÆ°Æ¡ng thích vá»›i “-†và “+â€\n"
+
+#: misc/chattr.c:346
+msgid "Must use '-v', =, - or +\n"
+msgstr "Phải dùng “-vâ€, “=â€, “-†hay “+â€\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "trong khi Ä‘á»c nút thông tin %u"
+
+#: misc/create_inode.c:90 misc/create_inode.c:288 misc/create_inode.c:353
+#: misc/create_inode.c:391
+msgid "while expanding directory"
+msgstr "trong khi mở rộng thư mục"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "trong khi liên kết \"%s\""
+
+#: misc/create_inode.c:105 misc/create_inode.c:132 misc/create_inode.c:322
+#, c-format
+msgid "while writing inode %u"
+msgstr "trong khi ghi nút thông tin %u"
+
+#: misc/create_inode.c:152 misc/create_inode.c:176
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "trong khi liệt kê các thuộc tính của \"%s\""
+
+#: misc/create_inode.c:163
+#, c-format
+msgid "while opening inode %u"
+msgstr "trong khi mở nút thông tin %u"
+
+#: misc/create_inode.c:169 misc/create_inode.c:196 misc/create_inode.c:1043
+#: misc/e2undo.c:182 misc/e2undo.c:479 misc/e2undo.c:485 misc/e2undo.c:491
+#: misc/mke2fs.c:359
+msgid "while allocating memory"
+msgstr "trong khi cấp phát bộ nhớ"
+
+#: misc/create_inode.c:189 misc/create_inode.c:205
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "trong khi Ä‘á»c thuá»™c tính \"%s\" của \"%s\""
+
+#: misc/create_inode.c:214
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "trong khi ghi thuộc tính \"%s\" của nút thông tin %u"
+
+#: misc/create_inode.c:224
+#, c-format
+msgid "while closing inode %u"
+msgstr "trong khi đóng nút thông tin %u"
+
+#: misc/create_inode.c:275
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "trong khi cấp phát nút thông tin \"%s\""
+
+#: misc/create_inode.c:294
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "trong khi tạo nút thông tin \"%s\""
+
+#: misc/create_inode.c:360
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "trong khi tạo liên kết má»m \"%s\""
+
+#: misc/create_inode.c:378 misc/create_inode.c:963
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "trong khi tra tìm \"%s\""
+
+#: misc/create_inode.c:398
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "trong khi tạo thư mục \"%s\""
+
+#: misc/create_inode.c:627
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "trong khi mở \"%s\" để sao chép"
+
+#: misc/create_inode.c:805
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "trong khi đổi thư mục làm việc sang \"%s\""
+
+#: misc/create_inode.c:815
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "trong khi đang quét thư mục \"%s\""
+
+#: misc/create_inode.c:825
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "trong khi lstat \"%s\""
+
+#: misc/create_inode.c:875
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "trong khi tạo tập tin đặc biệt \"%s\""
+
+#: misc/create_inode.c:884
+msgid "malloc failed"
+msgstr "malloc gặp lỗi"
+
+#: misc/create_inode.c:892
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "trong khi cố Ä‘á»c liên kết \"%s\""
+
+#: misc/create_inode.c:899
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "liên kết má»m làm gia tăng kích cỡ giữa lstat() và readlink()"
+
+#: misc/create_inode.c:910
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "trong khi ghi liên kết má»m \"%s\""
+
+#: misc/create_inode.c:921
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "trong khi ghi tập tin \"%s\""
+
+#: misc/create_inode.c:934
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "trong khi tạo thư mục \"%s\""
+
+#: misc/create_inode.c:952
+msgid "while changing directory"
+msgstr "trong khi thay Ä‘á»i thÆ° mục"
+
+#: misc/create_inode.c:958
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "đang bỠqua mục \"%s\""
+
+#: misc/create_inode.c:971
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "trong khi cài đặt nút cho \"%s\""
+
+#: misc/create_inode.c:978
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "trong khi cài đặt xattrs cho \"%s\""
+
+#: misc/create_inode.c:1004
+msgid "while saving inode data"
+msgstr "trong khi ghi dữ liệu nút"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Cách dùng: %s [-bfghimxV] [-o superblock=<số>] [-o blocksize=<số>] thiết_bị\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "khối"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "liên cung"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Nhóm %lu: (Khối "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " csum 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (CẦN 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s siêu khối tại "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "Chính"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "Sao lÆ°u"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ", Mô tả nhóm tại "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" Các khối GDT đã dành riêng tại "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " Mô tả nhóm tại "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " Mảng ảnh khối tại "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ", csum 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " Mảng ảnh nút thông tin tại "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" Bảng nút thông tin tại "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u trống %s, %u nút rảnh, %u thư mục%s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nút không dùng\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " Khối rảnh: "
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " Nút rảnh: "
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "trong khi in ra danh sách các khối sai"
+
+#: misc/dumpe2fs.c:346
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Khối sai: %u"
+
+#: misc/dumpe2fs.c:373 misc/tune2fs.c:373
+msgid "while reading journal inode"
+msgstr "trong khi Ä‘á»c nút thông tin nhật ký"
+
+#: misc/dumpe2fs.c:379
+msgid "while opening journal inode"
+msgstr "trong khi mở nút thông tin nhật ký"
+
+#: misc/dumpe2fs.c:385
+msgid "while reading journal super block"
+msgstr "trong khi Ä‘á»c siêu khối nhật ký"
+
+#: misc/dumpe2fs.c:392
+msgid "Journal superblock magic number invalid!\n"
+msgstr "Số ma thuật thấy siêu khối nhật ký không hợp lệ!\n"
+
+#: misc/dumpe2fs.c:409 misc/tune2fs.c:216
+msgid "while reading journal superblock"
+msgstr "trong khi Ä‘á»c siêu khối nhật ký"
+
+#: misc/dumpe2fs.c:417
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Không tìm thấy các số ma thuật siêu khối nhật ký"
+
+#: misc/dumpe2fs.c:468
+msgid "failed to alloc MMP buffer\n"
+msgstr "gặp lỗi khi cấp phát bộ đệm MMP\n"
+
+#: misc/dumpe2fs.c:479
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "Ä‘ang Ä‘á»c MMP khối %llu từ ' %s '\n"
+
+#: misc/dumpe2fs.c:507 misc/mke2fs.c:800 misc/tune2fs.c:2027
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Không thể cấp phát bá»™ nhá»› để phân tách tùy chá»n!\n"
+
+#: misc/dumpe2fs.c:533
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Tham số siêu khối không hợp lệ: %s\n"
+
+#: misc/dumpe2fs.c:548
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Tham số kích cỡ khối không hợp lệ: %s\n"
+
+#: misc/dumpe2fs.c:559
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"Chỉ ra tùy chá»n mở rá»™ng sai: %s\n"
+"\n"
+"Các tùy chá»n đã mở rá»™ng cÅ©ng định giá»›i bằng dấu phẩy, có thể chấp nhận\n"
+"đối số được ngụ ý vá»›i dấu bằng “=â€.\n"
+"\n"
+"Tùy chá»n đã mở rá»™ng hợp lệ:\n"
+"\tsuperblock=<số thứ tự siêu khối>\n"
+"\tblocksize=<kích cỡ khối>\n"
+
+#: misc/dumpe2fs.c:649 misc/mke2fs.c:1889
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tDùng %s\n"
+
+#: misc/dumpe2fs.c:694 misc/e2image.c:1629 misc/tune2fs.c:2913
+#: resize/main.c:416
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Không tìm thấy siêu khối hệ thống tập tin hợp lệ.\n"
+
+#: misc/dumpe2fs.c:716
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: Tính năng MMP không được bật.\n"
+
+#: misc/dumpe2fs.c:747
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "trong khi cố gắng để Ä‘á»c ảnh bitmap '%s'\n"
+
+#: misc/dumpe2fs.c:756
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** Hãy chạy e2fsck NGAY!\n"
+"\n"
+
+#: misc/e2image.c:107
+#, c-format
+msgid "Usage: %s [ -r|Q ] [ -f ] [ -b superblock ] [ -B blocksize][ -fr ] device image-file\n"
+msgstr "Cách dùng: %s [ -r|Q ] [ -f ] [ -b siêu_khối ] [ -B siêu_khối][ -fr ] thiết_bị tập_tin_ảnh\n"
+
+#: misc/e2image.c:110
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I thiết_bị tập_tin_ảnh\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+
+#: misc/e2image.c:176 misc/e2image.c:589 misc/e2image.c:595
+#: misc/e2image.c:1194
+msgid "while allocating buffer"
+msgstr "trong khi cấp phát bộ đệm"
+
+#: misc/e2image.c:181
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "Äang ghi khối %llu\n"
+
+#: misc/e2image.c:195
+#, c-format
+msgid "error writing block %llu"
+msgstr "gặp lỗi khi ghi khối %llu"
+
+#: misc/e2image.c:198
+msgid "error in generic_write()"
+msgstr "có lỗi trong generic_write()"
+
+#: misc/e2image.c:215
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Lỗi: kích thước phần đầu lớn hơn wrt_size\n"
+
+#: misc/e2image.c:220
+msgid "Couldn't allocate header buffer\n"
+msgstr "Không thể cấp phát bộ đệm phần đầu\n"
+
+#: misc/e2image.c:248
+msgid "while writing superblock"
+msgstr "trong khi ghi siêu khối"
+
+#: misc/e2image.c:257
+msgid "while writing inode table"
+msgstr "trong khi ghi bảng nút thông tin"
+
+#: misc/e2image.c:265
+msgid "while writing block bitmap"
+msgstr "trong khi ghi mảng ảnh khối"
+
+#: misc/e2image.c:273
+msgid "while writing inode bitmap"
+msgstr "trong khi ghi mảng ảnh nút thông tin"
+
+#: misc/e2image.c:515
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "Há»ng khối thÆ° mục %llu: rec_len sai (%d)\n"
+
+#: misc/e2image.c:527
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "Há»ng khối thÆ° mục %llu: name_len sai (%d)\n"
+
+#: misc/e2image.c:568
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu khối (%d%%)"
+
+#: misc/e2image.c:599 misc/e2image.c:639
+msgid "Copying "
+msgstr "Äang chép "
+
+#: misc/e2image.c:636
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "Dừng lại sẽ làm há»ng hệ thống tập tin, ngắt lần nữa nếu bạn thá»±c sá»± muốn thế\n"
+
+#: misc/e2image.c:662
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " %s còn lại ở tốc độ %.2f MB/s"
+
+#: misc/e2image.c:674 misc/e2image.c:1204
+#, c-format
+msgid "error reading block %llu"
+msgstr "gặp lá»—i khi Ä‘á»c khối %llu"
+
+#: misc/e2image.c:728
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "Äã chép %llu / %llu khối (%d%%) trong %s "
+
+#: misc/e2image.c:732
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "ở tốc độ %.2f MB/s"
+
+#: misc/e2image.c:768
+msgid "while allocating l1 table"
+msgstr "trong khi cấp phát bảng l1"
+
+#: misc/e2image.c:813
+msgid "while allocating l2 cache"
+msgstr "trong khi cấp phát bảng l2"
+
+#: misc/e2image.c:836
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "Cảnh báo: Vẫn còn bảng trong bộ nhớ đệm trong khi đặt bộ nhớ này, dữ liệu sẽ mất do đó ảnh có thể không hợp lệ.\n"
+
+#: misc/e2image.c:1161
+msgid "while allocating ext2_qcow2_image"
+msgstr "trong khi cấp phát ext2_qcow2_image"
+
+#: misc/e2image.c:1168
+msgid "while initializing ext2_qcow2_image"
+msgstr "trong khi khởi tạo ext2_qcow2_image"
+
+#: misc/e2image.c:1227 misc/e2image.c:1245
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "Lỗi lập trình: đa khối refcount liên tiếp được tạo ra!\n"
+
+#: misc/e2image.c:1286
+msgid "while allocating block bitmap"
+msgstr "trong cấp phát mảng ảnh khối"
+
+#: misc/e2image.c:1295
+msgid "while allocating scramble block bitmap"
+msgstr "trong khi cấp phát mảng ảnh khối scramble"
+
+#: misc/e2image.c:1318
+msgid "Scanning inodes...\n"
+msgstr "Äang quét các nút…\n"
+
+#: misc/e2image.c:1330
+msgid "Can't allocate block buffer"
+msgstr "Không thể cấp phát bộ đệm khối"
+
+#: misc/e2image.c:1369 misc/e2image.c:1383
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "trong khi lặp qua nút %u"
+
+#: misc/e2image.c:1415
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "Ảnh thô và qconw2 không thể được cài đặt"
+
+#: misc/e2image.c:1437
+msgid "error reading bitmaps"
+msgstr "lặp lá»—i khi Ä‘á»c mảng bit"
+
+#: misc/e2image.c:1449
+msgid "while opening device file"
+msgstr "trong khi mở tập tin thiết bị"
+
+#: misc/e2image.c:1460
+msgid "while restoring the image table"
+msgstr "trong khi phục hồi bảng ảnh"
+
+#: misc/e2image.c:1565
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "tùy chá»n -a chỉ có thể được dùng cùng vá»›i các ảnh thô hoặc QCOW2."
+
+#: misc/e2image.c:1570
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "tùy chá»n -b chỉ có thể được dùng cùng vá»›i các ảnh thô hoặc QCOW2."
+
+#: misc/e2image.c:1576
+msgid "Offsets are only allowed with raw images."
+msgstr "Chế độ bù chỉ cho phép với ảnh thô."
+
+#: misc/e2image.c:1581
+msgid "Move mode is only allowed with raw images."
+msgstr "Chế độ di chuyển chỉ cho phép với ảnh thô."
+
+#: misc/e2image.c:1586
+msgid "Move mode requires all data mode."
+msgstr "Chế Ä‘á»™ di chuyển yêu cầu má»i chế Ä‘á»™ dữ liệu."
+
+#: misc/e2image.c:1596
+msgid "checking if mounted"
+msgstr "kiểm tra xem đã gắn kết chưa"
+
+#: misc/e2image.c:1603
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"Chạy e2image trên hệ thống tập tin gắn Äá»c/Ghi có thể tạo ra má»™t\n"
+"ảnh không phù hợp cái mà sẽ không hữu ích khi muốn gỡ lỗi.\n"
+"Dùng tùy chá»n -f nếu bạn thá»±c sá»± muốn làm thế.\n"
+
+#: misc/e2image.c:1657
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "Ảnh QCOW2 không thể ghi ra đầu ra tiêu chuẩn!\n"
+
+#: misc/e2image.c:1663
+msgid "Can not stat output\n"
+msgstr "Không thể lấy thống kê đầu ra\n"
+
+#: misc/e2image.c:1673
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "Ảnh (%s) đã được nén lại\n"
+
+#: misc/e2image.c:1676
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "Ảnh (%s) đã được mã hóa\n"
+
+#: misc/e2image.c:1679
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "Ảnh (%s) đã bị há»ng\n"
+
+#: misc/e2image.c:1683
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "khi cố chuyển đổi ảnh qcow2 (%s) thành dạng ảnh thô (%s)"
+
+#: misc/e2image.c:1693
+msgid "The -c option only supported in raw mode\n"
+msgstr "Tùy chá»n “-c†chỉ được há»— trợ trong chế Ä‘á»™ thô\n"
+
+#: misc/e2image.c:1698
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "Tùy chá»n “-c†không được há»— trợ khi ghi ra đầu ra tiêu chuẩn\n"
+
+#: misc/e2image.c:1705
+msgid "while allocating check_buf"
+msgstr "trong khi cấp phát check_buf"
+
+#: misc/e2image.c:1711
+msgid "The -p option only supported in raw mode\n"
+msgstr "Tùy chá»n “-p†không được há»— trợ trong chế Ä‘á»™ thô\n"
+
+#: misc/e2image.c:1721
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d khối đã sẵn chứa dữ liệu để sao chép\n"
+
+#: misc/e2initrd_helper.c:68
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "Cách dùng: %s -r thiết-bị\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: không thể mở %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: không thể di chuyển đầu Ä‘á»c vị trí siêu khối\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: gặp lá»—i khi Ä‘á»c siêu khối\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: không phải hệ thống tập tin kiểu ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3117
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Cảnh báo: nhãn quá dài nên cắt ngắn.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: không thể di chuyển đầu Ä‘á»c để lấy lại siêu khối\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: gặp lỗi khi ghi siêu khối\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1687
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Cách dùng: e2label thiết_bị [nhãn_mới]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "Cách dùng: %s [-f] [-h] [-n] [-o offset] [-v] [-z tập_tin_undo] <tập tin giao dịch> <hệ thống tập tin>\n"
+
+#: misc/e2undo.c:149
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "Siêu khối hệ thống tập tin không khớp với tập tin undo.\n"
+
+#: misc/e2undo.c:152
+msgid "UUID does not match.\n"
+msgstr "UUID không khớp.\n"
+
+#: misc/e2undo.c:154
+msgid "Last mount time does not match.\n"
+msgstr "GiỠgắn kết hệ thống tập tin không khớp.\n"
+
+#: misc/e2undo.c:156
+msgid "Last write time does not match.\n"
+msgstr "GiỠghi cuối cùng không khớp.\n"
+
+#: misc/e2undo.c:158
+msgid "Lifetime write counter does not match.\n"
+msgstr "Số lượng ghi lifetime không khớp.\n"
+
+#: misc/e2undo.c:172
+msgid "while reading filesystem superblock."
+msgstr "trong khi Ä‘á»c siêu khối hệ thống tập tin."
+
+#: misc/e2undo.c:188
+msgid "while fetching superblock"
+msgstr "trong khi lấy siêu khối"
+
+#: misc/e2undo.c:201
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "Tổng kiểm siêu khối tập tin undo không khớp.\n"
+
+#: misc/e2undo.c:340
+#, c-format
+msgid "illegal offset - %s"
+msgstr "khoảng bù không hợp lệ - %s"
+
+#: misc/e2undo.c:364
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "Sẽ không ghi vào một tập tin undo trong khi đang trình diễn lại nó.\n"
+
+#: misc/e2undo.c:373
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "trong khi mở tập tin undo “%sâ€\n"
+
+#: misc/e2undo.c:380
+msgid "while reading undo file"
+msgstr "trong khi Ä‘á»c tập tin undo"
+
+#: misc/e2undo.c:385
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: Không phải là tập tin undo.\n"
+
+#: misc/e2undo.c:396
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: Tổng kiểm phần đầu không khớp.\n"
+
+#: misc/e2undo.c:403
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: Phần đầu tập tin undo bị há»ng.\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: Cỡ khối tập tin undo quá lớn.\n"
+
+#: misc/e2undo.c:412
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: Cỡ khối tập tin undo quá nhá».\n"
+
+#: misc/e2undo.c:425
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: Không hiểu tính năng tập tin undo.\n"
+
+#: misc/e2undo.c:433
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "Gặp lỗi trong khi dò tìm xem %s đã gắn kết chưa."
+
+#: misc/e2undo.c:439
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo chỉ nên chạy trên một hệ thống tập tin chưa gắn kết"
+
+#: misc/e2undo.c:455
+#, c-format
+msgid "while opening `%s'"
+msgstr "trong khi mở “%sâ€"
+
+#: misc/e2undo.c:466
+msgid "specified offset is too large"
+msgstr "khoảng bù đã cho là quá lớn"
+
+#: misc/e2undo.c:507
+msgid "while reading keys"
+msgstr "trong khi Ä‘á»c khóa"
+
+#: misc/e2undo.c:519
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: sai khóa thần diệu tại %llu\n"
+
+#: misc/e2undo.c:529
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: tổng kiểm khối khóa lỗi tại %llu.\n"
+
+#: misc/e2undo.c:552
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: khối %llu là quá dài."
+
+#: misc/e2undo.c:564 misc/e2undo.c:600
+#, c-format
+msgid "while fetching block %llu."
+msgstr "trong khi lấy khối %llu."
+
+#: misc/e2undo.c:576
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "lỗi tổng kiểm trong khối hệ thống tập tin %llu (undo blk %llu)\n"
+
+#: misc/e2undo.c:615
+#, c-format
+msgid "while writing block %llu."
+msgstr "trong khi ghi khối %llu."
+
+#: misc/e2undo.c:621
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "Tập tin undo bị há»ng; hãy chạy e2fsck NGAY!\n"
+
+#: misc/e2undo.c:623
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "Lỗi V/R trong khi trình diễn lại; hãy chạy e2fsck NGAY!\n"
+
+#: misc/e2undo.c:626
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "Các bản ghi undo không hoàn thiện; hãy chạy e2fsck.\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "Cách dùng: findsuper thiết-bị [skipbytes [startkb]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "skipbytes phải là một con số, không phải %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "skipbytes phải là bội số của cỡ cung từ\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "startkb phải là một con số, không phải %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "startkb phải là dương, không phải %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "bắt đầu tại %llu, với việc gia thêm %u byte\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] gần như chắc chắn là siêu khối đã được ghi trong siêu khối journal ext3,\n"
+"\tdo đó đầu/cuối/nhóm sai\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid nhãn\n"
+
+#: misc/findsuper.c:264
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: đã kết thúc với lỗi %d\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "CẢNH BÃO: không thể mở %s: %s\n"
+
+#: misc/fsck.c:353
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "CẢNH BÃO: gặp định dạng sai trên dòng %d trên %s\n"
+
+#: misc/fsck.c:370
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"CẢNH BÃO: /etc/fstab của bạn không chứa trÆ°á»ng fsck passno.\n"
+"\tMáy tính sẽ Ä‘iá»u chỉnh tạm thá»i cho bạn, nhÆ°ng bạn nên sá»­a chữa\n"
+"\ttập tin /etc/fstab càng sớm càng càng tốt.\n"
+"\n"
+
+#: misc/fsck.c:485
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: không tìm thấy\n"
+
+#: misc/fsck.c:601
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: đợi: không có tiến trình con nữa?!?\n"
+
+#: misc/fsck.c:623
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "Cảnh báo… %s cho thiết bị %s đã thoát với tín hiệu %d.\n"
+
+#: misc/fsck.c:629
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: trạng thái là %x, không bao giỠnên xảy ra.\n"
+
+#: misc/fsck.c:668
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "%s hoàn tất (trạng thái thoát %d)\n"
+
+#: misc/fsck.c:728
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%s: Gặp lỗi %d trong khi thực hiện fsck.%s cho %s\n"
+
+#: misc/fsck.c:749
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Hoặc tất cả hoặc không có kiểu hệ thống tập tin được gửi qua\n"
+"cho tùy chá»n “-t†phải có tiá»n tố “no†hay “!â€.\n"
+
+#: misc/fsck.c:768
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Không thể cấp phát bộ nhớ cho kiểu hế thống tập tin\n"
+
+#: misc/fsck.c:891
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: Ä‘ang bá» qua dòng sai trong “/etc/fstabâ€: đóng kết lắp vá»›i số gá»­i qua fsck khác số không\n"
+
+#: misc/fsck.c:918
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: không thể kiểm tra %s: fsck.%s không tìm thấy\n"
+
+#: misc/fsck.c:974
+msgid "Checking all file systems.\n"
+msgstr "Äang kiểm tra má»i hệ thống tập tin.\n"
+
+#: misc/fsck.c:1065
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--đang đợi-- (lần qua %d)\n"
+
+#: misc/fsck.c:1085
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"Cách dùng: fsck [-AMNPRTV] [ -C [ fd ] ] [-t kiểu_HTT] [fs-options] [HTT …]\n"
+"\n"
+"HTT: hệ thống tập tin\n"
+
+#: misc/fsck.c:1127
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: quá nhiá»u thiết bị\n"
+
+#: misc/fsck.c:1160 misc/fsck.c:1246
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: quá nhiá»u đối số\n"
+
+#: misc/fuse2fs.c:3745
+msgid "Mounting read-only.\n"
+msgstr "Gắn chế Ä‘á»™ chỉ cho Ä‘á»c.\n"
+
+#: misc/fuse2fs.c:3769
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: Cho phép những ngÆ°á»i dùng phân bổ má»i khối. Hành Ä‘á»™ng này nguy hiểm!\n"
+
+#: misc/fuse2fs.c:3781 misc/fuse2fs.c:3795
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s.\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3797 misc/tune2fs.c:3013
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr ""
+"Vui lòng chạy lệnh “e2fsck -fy %sâ€.\n"
+"\n"
+
+#: misc/fuse2fs.c:3804
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "Journal cần được phục hồi; việc chạy “e2fsck -E journal_only†là cần thiết.\n"
+
+#: misc/fuse2fs.c:3812
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: Không hỗ trợ tính năng ghi journal.\n"
+
+#: misc/fuse2fs.c:3827
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "Cảnh báo: Äang gắn fs chÆ°a kiểm tra, khuyên bạn nên chạy e2fsck.\n"
+
+#: misc/fuse2fs.c:3831
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr "Cảnh báo: Số lượng gắn kết tối đa đã bị vượt quá, khuyên bạn nên chạy e2fsck.\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "Cảnh báo: Thá»i gian kiểm tra đã bị vượt quá, khuyên bạn nên chạy e2fsck.\n"
+
+#: misc/fuse2fs.c:3840
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "Dò thấy mồ côi, khuyên bạn nên chạy e2fsck.\n"
+
+#: misc/fuse2fs.c:3844
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "Dò thấy có lỗi: bắt buộc phải chạy e2fsck.\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "Cách dùng: %s [-RVadlpv] [tập_tin…]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Trong khi Ä‘á»c các cá» trên %s"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "Trong khi Ä‘á»c dá»± án trên %s"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "Trong khi Ä‘á»c phiên bản trên %s"
+
+#: misc/mke2fs.c:130
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"Cách dùng: %s [-c|-l tên_tập_tin] [-b cỡ_khối] [-C cỡ_liên_cung]\n"
+"\t[-i byte_má»—i_inode] [-I cỡ_inode] [-J tùy_chá»n_nhật_ký]\n"
+"\t[-G cỡ_nhóm-flex] [-N số_lượng_inode] [-d thư-mục-root]\n"
+"\t[-m phần_trăm_khối_chÆ°a_dùng] [-o HÄH_tạo]\n"
+"\t[-g số-khối_mỗi_nhóm] [-L nhãn_khối_tin] [-M thư_mục_lắp_cuối]\n"
+"\t[-O tính_năng[,…]] [-r bản_sá»­a_đổi_HTT] [-E tùy_chá»n_mở_rá»™ng[,…]]\n"
+"\t[-t kiểu_HTTT] [-T kiểu-dùng ] [-U UUID] [-e errors_behavior][-z tập_in_undo]\n"
+"\t [-jnqvDFSV] thiết_bị [số_lượng_khối]\n"
+"Từ viết tắt:\n"
+"\tHDH: hệ Ä‘iá»u hành\n"
+"\tHTTT: hệ thống tập tin\n"
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Äang chạy lệnh: %s\n"
+
+#: misc/mke2fs.c:265
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "trong khi cố chạy “%sâ€"
+
+#: misc/mke2fs.c:272
+msgid "while processing list of bad blocks from program"
+msgstr "trong khi xử lý danh sách các khối sai từ chương trình"
+
+#: misc/mke2fs.c:299
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "Khối %d sai trong vùng mô tả nhóm/siêu khối chính.\n"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"Các khối trong phạm vi %u đến %u phải là tốt\n"
+"để xây dựng được hệ thống tập tin.\n"
+
+#: misc/mke2fs.c:304
+msgid "Aborting....\n"
+msgstr "Äang hủy bá»â€¦\n"
+
+#: misc/mke2fs.c:324
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Cảnh báo: các mô tả nhóm/siêu khối dự trữ tại khối %u chứa khối sai.\n"
+"\n"
+
+#: misc/mke2fs.c:343
+msgid "while marking bad blocks as used"
+msgstr "trong khi đánh dấu các khối sai đã được dùng"
+
+#: misc/mke2fs.c:368
+msgid "while writing reserved inodes"
+msgstr "trong khi ghi nút dự phòng"
+
+#: misc/mke2fs.c:420
+msgid "Writing inode tables: "
+msgstr "Äang ghi các bảng nút thông tin: "
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"Không thể ghi %d khối trong bảng nút thông tin, bắt đầu tại %llu: %s\n"
+
+#: misc/mke2fs.c:456 misc/mke2fs.c:2809 misc/mke2fs.c:3214
+msgid "done \n"
+msgstr "hoàn tất \n"
+
+#: misc/mke2fs.c:471
+msgid "while creating root dir"
+msgstr "trong khi tạo thư mục gốc"
+
+#: misc/mke2fs.c:478
+msgid "while reading root inode"
+msgstr "trong khi Ä‘á»c nút thông tin gốc"
+
+#: misc/mke2fs.c:490
+msgid "while setting root inode ownership"
+msgstr "trong khi đặt quyá»n sở hữu nút thông tin gốc"
+
+#: misc/mke2fs.c:508
+msgid "while creating /lost+found"
+msgstr "trong khi tạo /mất+tìm"
+
+#: misc/mke2fs.c:515
+msgid "while looking up /lost+found"
+msgstr "trong khi tra tìm /mất+tìm"
+
+#: misc/mke2fs.c:528
+msgid "while expanding /lost+found"
+msgstr "trong khi mở rộng /mất+tìm"
+
+#: misc/mke2fs.c:543
+msgid "while setting bad block inode"
+msgstr "trong khi đặt nút thông tin khối sai"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Hết bộ nhớ nên xóa các rãnh ghi trong phạm vi %d đến %d\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Cảnh báo: không thể Ä‘á»c khối 0: %s\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Cảnh báo: không thể xóa rãnh ghi %d: %s\n"
+
+#: misc/mke2fs.c:612
+msgid "while initializing journal superblock"
+msgstr "trong khi khởi tạo siêu khối nhật ký"
+
+#: misc/mke2fs.c:620
+msgid "Zeroing journal device: "
+msgstr "Äang ghi số không thiết bị nhật ký: "
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "trong khi làm số không thiết bị nhật ký (khối %llu, số lượng %d)"
+
+#: misc/mke2fs.c:650
+msgid "while writing journal superblock"
+msgstr "trong khi ghi siêu khối nhật ký"
+
+#: misc/mke2fs.c:665
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "Äang tạo hệ thống tập tin vá»›i %llu (%dk) khối và %u nút.\n"
+
+#: misc/mke2fs.c:673
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"cảnh báo: %llu khối chưa dùng.\n"
+"\n"
+
+#: misc/mke2fs.c:678
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Nhãn hệ thống tập tin=%s\n"
+
+#: misc/mke2fs.c:681
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Kiểu HÄH: %s\n"
+
+#: misc/mke2fs.c:683
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Cỡ khối=%u (bản ghi=%u)\n"
+
+#: misc/mke2fs.c:686
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Cỡ liên cung=%u (bản ghi=%u)\n"
+
+#: misc/mke2fs.c:690
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Cỡ đoạn=%u (bản ghi=%u)\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "BÆ°á»›c=%u khối, Äá»™ rá»™ng sá»c=%u khối\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u nút thông tin, %llu khối\n"
+
+#: misc/mke2fs.c:696
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu khối (%2.2f%%) được dành riêng cho siêu ngÆ°á»i dùng\n"
+
+#: misc/mke2fs.c:699
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Khối dữ liệu đầu=%u\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Chủ sở hữu thư-mục gốc=%u:%u\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Khối hệ thống tập tin tối đa=%lu\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u nhóm khối\n"
+
+#: misc/mke2fs.c:709
+#, c-format
+msgid "%u block group\n"
+msgstr "%u nhóm khối\n"
+
+#: misc/mke2fs.c:711
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u khối trên mỗi nhóm, %u liên cung trên mỗi nhóm\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr "%u khối trên mỗi nhóm, %u đoạn trên mỗi nhóm\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u nút thông tin trên mỗi nhóm\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "Mã số định danh thiết bị hệ thống tập tin: %s\n"
+
+#: misc/mke2fs.c:726
+msgid "Superblock backups stored on blocks: "
+msgstr "Siêu khối dự trữ được cất giữ trên khối: "
+
+#: misc/mke2fs.c:822
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr "%s cần “-O 64bitâ€\n"
+
+#: misc/mke2fs.c:828
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "“%s†phải trÆ°á»›c “resize=%uâ€\n"
+
+#: misc/mke2fs.c:841
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "desc_size không hợp lệ: “%sâ€\n"
+
+#: misc/mke2fs.c:855
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "Hạt mầm băm không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:867
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "Khoảng bù không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:881 misc/tune2fs.c:2055
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "mmp_update_interval không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:898
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "Số lượng siêu khối dự phòng không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:920
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Tham số stride không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:935
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Tham số stride không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:958
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Tham số thay đổi kích cỡ không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:965
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Số thay đổi kích cỡ tối đa phải lớn hơn kích cỡ của hệ thống tập tin.\n"
+
+#: misc/mke2fs.c:989
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+"Tính năng thay đổi kích cỡ một cách trực tuyến không được hỗ trợ\n"
+"trên hệ thống tập tin bản sửa đổi 0\n"
+
+#: misc/mke2fs.c:1015 misc/mke2fs.c:1024
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "root_owner không hợp lệ: '%s'\n"
+
+#: misc/mke2fs.c:1069
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "Bảng mã không hợp lệ: %s"
+
+#: misc/mke2fs.c:1087
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"Tùy chá»n đã cho không đúng: %s\n"
+"\n"
+"Các tùy chá»n mở rá»™ng được ngăn cách bằng dấu phẩy, có thể chấp nhận\n"
+"\tđối số được gán bằng dấu bằng (“=â€)\n"
+"\n"
+"Tùy chá»n mở rá»™ng hợp lệ:\n"
+"\tmmp_update_interval=<khoảng thá»i gian>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<đoạn dữ liệu RAID mỗi đĩa theo khối>\n"
+"\tstripe-width=<RAID stride * các đĩa dữ liệu theo khối>\n"
+"\toffset=<vị trí tương đối để tạo hệ thống tập tin>\n"
+"\tresize=<kích cỡ thay đổi kích cỡ tối đa theo khối>\n"
+"\tpacked_meta_blocks=<0 để tắt, 1 để bật>\n"
+"\tlazy_itable_init=<0 để tắt, 1 để bật>\n"
+"\tlazy_journal_init=<0 để tắt, 1 để bật>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<bảng mã>\n"
+"\tencoding_flags=<các cá»>\n"
+"\tquotatype=<kiểu quota sẽ được bật>\n"
+"\n"
+
+#: misc/mke2fs.c:1114
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Cảnh báo: chiá»u rá»™ng sá»c (stripe-width) RAID %u không phải là má»™t bá»™i số dÆ°Æ¡ng của %u.\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "lỗi: CỠbảng mã không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:1131
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "lỗi: Một mã hoá phải được xác định rõ ràng khi đi chuyển qua cỠmã hóa\n"
+
+#: misc/mke2fs.c:1179
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Gặp lỗi cú pháp trong tập tin cấu hình mke2fs (%s, dòng số %d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1192 misc/tune2fs.c:1068
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Äặt tùy chá»n hệ thống tập tin không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:1204 misc/tune2fs.c:417
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Äặt tùy chá»n lắp không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:1340
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Tập tin “mke2fs.conf†của bạn không định nghĩa kiểu hệ thống tập tin %s.\n"
+
+#: misc/mke2fs.c:1344
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Rất có thể là bạn cần phải cài đặt một tập tin “mke2fs.conf†mới.\n"
+"\n"
+
+#: misc/mke2fs.c:1348
+msgid "Aborting...\n"
+msgstr "Äang hủy bá»â€¦\n"
+
+#: misc/mke2fs.c:1389
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Cảnh báo: fs_type %s không được định nghĩa trong mke2fs.conf\n"
+"\n"
+
+#: misc/mke2fs.c:1571
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Không thể cấp phát bá»™ nhá»› cho ÄƯỜNG-DẪN\n"
+
+#: misc/mke2fs.c:1608
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Không thể khởi tạo profile thành công (lỗi: %ld).\n"
+
+#: misc/mke2fs.c:1641
+#, c-format
+msgid "invalid block size - %s"
+msgstr "cỡ khối không hợp lệ — %s"
+
+#: misc/mke2fs.c:1645
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Cảnh báo: kích cỡ khối %d vô ích trên phần lớn hệ thống.\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "cỡ liên cung không hợp lệ — %s"
+
+#: misc/mke2fs.c:1674
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "“-R†không dùng nữa, hãy thay bằng “-Eâ€"
+
+#: misc/mke2fs.c:1688 misc/tune2fs.c:1784
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "ứng xử lỗi sai — %s"
+
+#: misc/mke2fs.c:1700
+msgid "Illegal number for blocks per group"
+msgstr "Số cấm cho số khối trên mỗi nhóm"
+
+#: misc/mke2fs.c:1705
+msgid "blocks per group must be multiple of 8"
+msgstr "số khối trên mỗi nhóm phải là bội số cho 8"
+
+#: misc/mke2fs.c:1713
+msgid "Illegal number for flex_bg size"
+msgstr "Kích cỡ flex_bg có số không được phép"
+
+#: misc/mke2fs.c:1719
+msgid "flex_bg size must be a power of 2"
+msgstr "kích cỡ flex_bg phải là lũy thừa 2"
+
+#: misc/mke2fs.c:1724
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "kích cỡ flex_bg (%lu) phải nhỠhơn hoặc bằng 2^31"
+
+#: misc/mke2fs.c:1734
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "tỷ lệ nút thông tin không hợp lệ %s (thiểu %d/đa %d)"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "kích cỡ nút thông tin không hợp lệ — %s"
+
+#: misc/mke2fs.c:1757
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Cảnh báo: Không tán thành việc sá»­ dụng tùy chá»n -K và có lẽ nó sẽ không bao giỠđược sá»­ dụng nữa. Sá»­ dụng tùy chá»n mở rá»™ng “-E nodiscard†để thay thế!\n"
+
+#: misc/mke2fs.c:1768
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+"trong hàm cấp phát bộ nhớ malloc cho tên tập tin khối sai\n"
+"“bad_blocks_filenameâ€"
+
+#: misc/mke2fs.c:1777
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr "Cảnh báo: nhãn quá dài nên cắt ngắn thành “%sâ€.\n"
+
+#: misc/mke2fs.c:1786
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "phần trăm khối được dành riêng không hợp lệ — %s"
+
+#: misc/mke2fs.c:1801
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "số (num) nút thông tin sai — %s"
+
+#: misc/mke2fs.c:1814
+msgid "while allocating fs_feature string"
+msgstr "trong khi cấp phát chuỗi fs_feature"
+
+#: misc/mke2fs.c:1831
+#, c-format
+msgid "bad revision level - %s"
+msgstr "cấp bản sửa đổi sai — %s"
+
+#: misc/mke2fs.c:1836
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "trong khi cố tạo điểm %d"
+
+#: misc/mke2fs.c:1850
+msgid "The -t option may only be used once"
+msgstr "Tùy chá»n -t chỉ sá»­ dụng má»™t lần"
+
+#: misc/mke2fs.c:1858
+msgid "The -T option may only be used once"
+msgstr "Tùy chá»n -T chỉ sá»­ dụng má»™t lần"
+
+#: misc/mke2fs.c:1914 misc/mke2fs.c:3298
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "trong khi cố mở thiết bị nhật ký %s\n"
+
+#: misc/mke2fs.c:1920
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Kích cỡ của thiết bị nhật ký (%d) nhỠhơn kích cỡ tối thiểu %d\n"
+
+#: misc/mke2fs.c:1926
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Äang dùng kích cỡ khối của thiết bị nhật ký: %d\n"
+
+#: misc/mke2fs.c:1937
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "khối “%s†sai trên thiết bị “%sâ€"
+
+#: misc/mke2fs.c:1967
+msgid "filesystem"
+msgstr "hệ thống tập tin"
+
+#: misc/mke2fs.c:1985 resize/main.c:497
+msgid "while trying to determine filesystem size"
+msgstr "trong khi cố xác định kích cỡ của hệ thống tập tin"
+
+#: misc/mke2fs.c:1991
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Không thể xác định kích cỡ của thiết bị;\n"
+"bạn cần phải chỉ định kích cỡ của hệ thống tập tin\n"
+
+#: misc/mke2fs.c:1998
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"Kích cỡ của thiết bị được thông báo là số không.\n"
+"\tPhân vùng không hợp lệ được đưa ra,\n"
+"\thoặc bảng phân vùng không được Ä‘á»c lại\n"
+"\tsau khi chạy tiến trình fdisk,\n"
+"\tdo phân vùng đã sửa đổi đang bận và đang được dùng.\n"
+"Có lẽ bạn cần phải khởi Ä‘á»™ng lại máy để Ä‘á»c lại bảng phân vùng.\n"
+
+#: misc/mke2fs.c:2015
+msgid "Filesystem larger than apparent device size."
+msgstr "Hệ thống tập tin lớn hơn kích cỡ thiết bị biểu kiến."
+
+#: misc/mke2fs.c:2035
+msgid "Failed to parse fs types list\n"
+msgstr "Lỗi phân tích danh sách các kiểu hệ thống tập tin\n"
+
+#: misc/mke2fs.c:2085
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "HURD không hỗ trợ tính năng kiểu tập tin.\n"
+
+#: misc/mke2fs.c:2090
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "HURD không hỗ trợ tính năng huge_file (tập tin rất lớn).\n"
+
+#: misc/mke2fs.c:2095
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "HURD không hỗ trợ tính năng metadata_csum.\n"
+
+#: misc/mke2fs.c:2100
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "HURD không hỗ trợ tính năng ea_inode.\n"
+
+#: misc/mke2fs.c:2110
+msgid "while trying to determine hardware sector size"
+msgstr "trong khi cố xác định kích cỡ của rãnh ghi phần cứng"
+
+#: misc/mke2fs.c:2116
+msgid "while trying to determine physical sector size"
+msgstr "trong khi cố xác định kích cỡ của rãnh ghi vật lý"
+
+#: misc/mke2fs.c:2148
+msgid "while setting blocksize; too small for device\n"
+msgstr "trong khi cài đặt kích cỡ khối ; quá nhỠđối với thiết bị\n"
+
+#: misc/mke2fs.c:2153
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Cảnh báo: kích cỡ khối %d đã ghi rõ vẫn nhỠhơn kích cỡ rãnh ghi vật lý của thiết bị %d\n"
+
+#: misc/mke2fs.c:2177
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%s: thiết bị (0x%llx blocks) %s có kích cỡ quá lớn để biểu diễn theo 32 bit\n"
+"\tdùng kích cỡ khối của %d.\n"
+
+#: misc/mke2fs.c:2191
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%s: Cỡ của thiết bị (0x%llx khối) %s có kích cỡ quá lớn để\n"
+"\ttạo một hệ thống tập tin dùng cỡ khối của %d.\n"
+
+#: misc/mke2fs.c:2213
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types để giải quyết mke2fs.conf: "
+
+#: misc/mke2fs.c:2220
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"Tính năng hệ thống tập tin không được hỗ trợ trên hệ thống tập tin\n"
+"bản sửa đổi 0\n"
+
+#: misc/mke2fs.c:2228
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+"Tính năng siêu khối thưa thớt không được hỗ trợ\n"
+"trên hệ thống tập tin bản sửa đổi 0\n"
+
+#: misc/mke2fs.c:2238
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+"Tính năng nhật ký không được hỗ trợ trên hệ thống tập tin\n"
+"bản sửa đổi 0\n"
+
+#: misc/mke2fs.c:2251
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "phần trăm khối được dành riêng không hợp lệ -%lf"
+
+#: misc/mke2fs.c:2268
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "Phần mở rộng PHẢI được bật cho hệ thống tập tin 64-bit. Chuyển -O phần_mở_rộng để nắn chỉnh.\n"
+
+#: misc/mke2fs.c:2288
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "Kích thước liên cung không thể nhỠhơn kích cỡ khối.\n"
+
+#: misc/mke2fs.c:2294
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "chỉ định kích thước liên cung cần đặc tính bigalloc"
+
+#: misc/mke2fs.c:2314
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "cảnh báo: không thể lấy dạng hình thiết bị cho %s\n"
+
+#: misc/mke2fs.c:2317
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Khoảng sắp hàng %s bị bù theo %lu byte.\n"
+
+#: misc/mke2fs.c:2319
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "TrÆ°á»ng hợp này có thể gây ra hiệu suất rất yếu thì khuyên bạn phân vùng (lại).\n"
+
+#: misc/mke2fs.c:2340
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "Khối %d-byte quá lớn đối với hệ thống (tối đa %d)"
+
+#: misc/mke2fs.c:2344
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+"Cảnh báo: khối %d-byte quá lớn đối với hệ thống (tối đa %d)\n"
+"nên bị buộc tiếp tục\n"
+
+#: misc/mke2fs.c:2352
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "Gợi ý: Dùng Linux kernel >= 3.18 để tăng cÆ°á»ng tính ổn định của tính năng tổng kiểm siêu dữ liệu và journal.\n"
+
+#: misc/mke2fs.c:2398
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "Không hiểu bảng mã tên tập tin từ hồ sơ: %s"
+
+#: misc/mke2fs.c:2409
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "Không hiểu các cỠbảng mã từ hồ sơ: %s"
+
+#: misc/mke2fs.c:2434
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"Cảnh báo: khoảng bù đã cho không có một cỡ hệ thống tập tin rõ ràng.\n"
+"Äang tạo má»™t hệ thống tập tin vá»›i %llu khối nhÆ°ng đây có lẽ\n"
+"không phải là thứ bạn muốn.\n"
+"\n"
+
+#: misc/mke2fs.c:2449
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "cỡ nút %d byte là quá nhỠcho hạn ngạch dự án"
+
+#: misc/mke2fs.c:2465
+msgid ""
+"The encrypt and casefold features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Các tính năng mã hóa và casefold không tương thích.\n"
+"Há» không thể được cả hai kích hoạt đồng thá»i.\n"
+
+#: misc/mke2fs.c:2480
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Không thể hỗ trợ đặc tính bigalloc mà không có phần mở"
+
+#: misc/mke2fs.c:2487
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Hai tính năng thay đổi kích cỡ nút (resize_inode) và siêu ná»n (meta_bg) không tÆ°Æ¡ng thích vá»›i nhau.\n"
+"Do đó không thể hiệu lá»±c đồng thá»i cả hai.\n"
+
+#: misc/mke2fs.c:2495
+msgid ""
+"\n"
+"Warning: the bigalloc feature is still under development\n"
+"See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+"\n"
+msgstr ""
+"\n"
+"Cảnh báo: đặc tính phân-bổ-lớn vẫn đang trong quá trình phát triển\n"
+"Xem https://ext4.wiki.kernel.org/index.php/Bigalloc để biết chi tiết\n"
+"\n"
+
+#: misc/mke2fs.c:2507
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"khối thay đổi kích cỡ trực tuyến được dành riêng không được hỗ trợ\n"
+"trên hệ thống tập tin không thưa thớt"
+
+#: misc/mke2fs.c:2516
+msgid "blocks per group count out of range"
+msgstr "số khối trên mỗi nhóm ở ngoài phạm vi"
+
+#: misc/mke2fs.c:2538
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Chưa hiệu lực tính năng Flex_bg thì không thể ghi rõ kích cỡ Flex_bg"
+
+#: misc/mke2fs.c:2550
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "kích cỡ nút thông tin không hợp lệ %d (thiểu %d/đa %d)"
+
+#: misc/mke2fs.c:2565
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "cỡ nút %d byte là quá nhỠcho dữ liệu chung dòng; hãy đưa ra cỡ lớn hơn"
+
+#: misc/mke2fs.c:2580
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "quá nhiá»u nút thông tin (%llu), tăng tá»· lệ nút thông tin không?"
+
+#: misc/mke2fs.c:2587
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "quá nhiá»u nút thông tin (%llu), chỉ ra <2³² nút thông tin"
+
+#: misc/mke2fs.c:2601
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"cỡ_nút_thông_tin (%u) * số_lượng_nút_thông_tin (%u) quá lớn\n"
+"\tcho hệ thống tập tin có %llu khối, hãy chỉ định\n"
+"\ttỷ_lệ_nút_thông_tin (-i) cao hơn hay số lượng nút thông tin\n"
+"(-N) thấp hơn\n"
+
+#: misc/mke2fs.c:2788
+msgid "Discarding device blocks: "
+msgstr "BỠqua khối thiết bị: "
+
+#: misc/mke2fs.c:2804
+msgid "failed - "
+msgstr "gặp lỗi - "
+
+#: misc/mke2fs.c:2863
+msgid "while initializing quota context"
+msgstr "trong khi khởi tạo ngữ cảnh hạn ngạch"
+
+#: misc/mke2fs.c:2870
+msgid "while writing quota inodes"
+msgstr "trong khi ghi nút hạn ngạch"
+
+#: misc/mke2fs.c:2895
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "ứng xử lỗi sai trong hồ sơ — %s"
+
+#: misc/mke2fs.c:2971
+msgid "in malloc for android_sparse_params"
+msgstr "trong hàm cấp phát bộ nhớ malloc cho android_sparse_params"
+
+# Item in the main menu to select this package
+#: misc/mke2fs.c:2985
+msgid "while setting up superblock"
+msgstr "trong khi cài đặt siêu khối"
+
+#: misc/mke2fs.c:3001
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "Các phần mở rộng không được bật. Cây mở rộng tập tin có thể được kiểm tra tổng kiểm, nhưng trái lại ánh xạ khối lại không thể. Không bật giản lược mở rộng bao phủ của kiểm tra tổng thể siêu dữ liệu. Chuyển mở rộng -O để sửa lại cho đúng.\n"
+
+#: misc/mke2fs.c:3008
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "Hệ thống tập tin 64-bít không được bật. Các trÆ°á»ng lá»›n hÆ¡n cung cấp bởi tính năng này bật kiểm tra tổng thể full-strength. Chuyển -O 64bit để chỉnh lại cho đúng.\n"
+
+#: misc/mke2fs.c:3016
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "Tính năng metadata_csum_seed cần tính năng metadata_csum.\n"
+
+#: misc/mke2fs.c:3040
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "Loại bỠthành công và sẽ trả vỠ0 - bỠqua xóa bảng nút\n"
+
+#: misc/mke2fs.c:3139
+#, c-format
+msgid "unknown os - %s"
+msgstr "hệ Ä‘iá»u hành lạ — %s"
+
+#: misc/mke2fs.c:3202
+msgid "Allocating group tables: "
+msgstr "Phân bổ bảng nhóm: "
+
+#: misc/mke2fs.c:3210
+msgid "while trying to allocate filesystem tables"
+msgstr "trong khi cố cấp phát các bảng hệ thống tập tin"
+
+#: misc/mke2fs.c:3219
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\ttrong khi chuyển đổi mảng ảnh liên cung con"
+
+#: misc/mke2fs.c:3225
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s có thể há»ng nặng hÆ¡n nữa nếu viết lại siêu khối\n"
+
+#: misc/mke2fs.c:3266
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "trong khi Ä‘iá»n số không khối %llu tại kết thúc của hệ thống tập tin"
+
+#: misc/mke2fs.c:3279
+msgid "while reserving blocks for online resize"
+msgstr "trong khi dành riêng các khối để thay đổi kích cỡ trực tuyến"
+
+#: misc/mke2fs.c:3291 misc/tune2fs.c:1492
+msgid "journal"
+msgstr "nhật ký"
+
+#: misc/mke2fs.c:3303
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Äang thêm nhật ký vào thiết bị %s: "
+
+#: misc/mke2fs.c:3310
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"trong khi cố thêm nhật ký vào thiết bị %s"
+
+#: misc/mke2fs.c:3315 misc/mke2fs.c:3344 misc/mke2fs.c:3382
+#: misc/mk_hugefiles.c:600 misc/tune2fs.c:1521 misc/tune2fs.c:1540
+msgid "done\n"
+msgstr "hoàn tất\n"
+
+#: misc/mke2fs.c:3321
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Äang bá» qua bÆ°á»›c tạo nhật ký trong chế Ä‘á»™ chỉ siêu\n"
+
+#: misc/mke2fs.c:3331
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Äang tạo nhật ký (%u khối): "
+
+#: misc/mke2fs.c:3340
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"trong khi cố tạo nhật ký"
+
+#: misc/mke2fs.c:3352 misc/tune2fs.c:1133
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Lỗi khi bật đặc tính bảo vệ đa gắn."
+
+#: misc/mke2fs.c:3357
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Bảo vệ đa gắn được bật với nhịp cập nhật là %d giây.\n"
+
+#: misc/mke2fs.c:3373
+msgid "Copying files into the device: "
+msgstr "Äang chép các tập tin vào trong thiết: "
+
+#: misc/mke2fs.c:3379
+msgid "while populating file system"
+msgstr "trong khi di chuyển hệ thống tập tin"
+
+#: misc/mke2fs.c:3386
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Äang ghi siêu khối và thông tin kế toán hệ thống tập tin: "
+
+#: misc/mke2fs.c:3393
+msgid "while writing out and closing file system"
+msgstr "trong khi ghi ra và đòng hệ thống tập tin"
+
+#: misc/mke2fs.c:3396
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"hoàn tất\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "trong khi Ä‘iá»n số không khối %llu cho tập tin cá»±c lá»›n"
+
+#: misc/mk_hugefiles.c:515
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "Vị trí bù phân vùng của %llu (%uk) khối là không tương thích với cỡ liên cung %u.\n"
+
+#: misc/mk_hugefiles.c:583
+msgid "Huge files will be zero'ed\n"
+msgstr "Các tập tin cá»±c lá»›n sẽ bị Ä‘iá»n bằng số không\n"
+
+#: misc/mk_hugefiles.c:584
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "Äang tạo tập tin cá»±c lá»›n %lu "
+
+#: misc/mk_hugefiles.c:586
+#, c-format
+msgid "with %llu blocks each"
+msgstr "với %llu khối cho mỗi"
+
+#: misc/mk_hugefiles.c:595
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "trong khi tạo tập tin cự lớn %lu"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "Cách dùng: mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"Cách dùng: %s thiết bị…\n"
+"\n"
+"In ra thông tin vỠphân vùng đối với mỗi thiết bị được cho.\n"
+"Ví dụ: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Không thể mở %s: %s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Không thể lấy dạng hình của %s: %s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Không thể lấy kích cỡ của %s: %s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: h=%3d s=%3d c=%4d đầu=%8d cỡ=%8lu cuối=%8d\n"
+
+#: misc/tune2fs.c:119
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"Thao tác này yêu cầu một hệ thống tập tin đã được kiểm tra làm mới lại.\n"
+
+#: misc/tune2fs.c:121
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "Hãy chạy e2fsck -f trên hệ thống tập tin.\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "Hãy chạy e2fsck -fD trên hệ thống tập tin.\n"
+
+#: misc/tune2fs.c:136
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"Cách dùng: %s [-c số_đếm_lắp_tối_đa] [-e ứng_xử_lỗi] [-f] [-g nhóm]\n"
+"\t[-i khoảng[d|m|w]] [-j] [-J tùy_chá»n_nhật_ký] [-l]\n"
+"\t[-m phần_trăm_khối_để_dành] [-o [^]tùy_chá»n_lắp[,…]]\n"
+"\t[-r số_đếm_khối_để_dành] [-u ngÆ°á»i_dùng] [-C số_đếm_lắp]\n"
+"\t[-L nhãn_phân_vùng] [-M thư_mục_lắp_cuối]\n"
+"\t[-O [^]tính_năng[,…]] [-Q tùy_chá»n_quota]\n"
+"\t[-E tùy_chá»n_mở_rá»™ng[,…] [-T giá»_kiểm_tra_cuối] [-U UUID]\n"
+"\t[-I cỡ_nút_mới] [-z tập_tin_undo] thiết_bị\n"
+
+#: misc/tune2fs.c:223
+msgid "Journal superblock not found!\n"
+msgstr "Không tìm thấy siêu khối nhật ký !\n"
+
+#: misc/tune2fs.c:281
+msgid "while trying to open external journal"
+msgstr "trong khi cố mở nhật ký bên ngoài"
+
+#: misc/tune2fs.c:287 misc/tune2fs.c:2804
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s không phải thiết bị nhật ký.\n"
+
+#: misc/tune2fs.c:296 misc/tune2fs.c:2813
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"Siêu khối journal bị há»ng, nr_users\n"
+"thì quá cao (%d).\n"
+
+#: misc/tune2fs.c:303 misc/tune2fs.c:2820
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Không tìm thấy UUID của hệ thống tập tin trên thiết bị nhật ký.\n"
+
+#: misc/tune2fs.c:327
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Không thể định được thiết bị journal. Nó đã KHÔNG bị gỡ bá»\n"
+"Sá»­ dụng tùy chá»n -f để gỡ bá» thiết bị journal bị thiếu.\n"
+
+#: misc/tune2fs.c:336
+msgid "Journal removed\n"
+msgstr "Nhật ký đã gỡ bá»\n"
+
+#: misc/tune2fs.c:380
+msgid "while reading bitmaps"
+msgstr "trong khi Ä‘á»c các mảng ảnh"
+
+#: misc/tune2fs.c:388
+msgid "while clearing journal inode"
+msgstr "trong khi xóa sạch nút thông tin nhật ký"
+
+#: misc/tune2fs.c:399
+msgid "while writing journal inode"
+msgstr "trong khi ghi nút thông tin nhật ký"
+
+#: misc/tune2fs.c:435 misc/tune2fs.c:458 misc/tune2fs.c:471
+msgid "(and reboot afterwards!)\n"
+msgstr "(và khởi động lại sau!)\n"
+
+#: misc/tune2fs.c:486
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "Sau khi chạy e2fsck, vui lòng chạy “resize2fs %s %s"
+
+#: misc/tune2fs.c:489
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "Vui lòng chạy “resize2fs %s %s"
+
+#: misc/tune2fs.c:493
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:495
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "†để bật chế độ 64-bít.\n"
+
+#: misc/tune2fs.c:497
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "†để tắt chế độ 64-bít.\n"
+
+#: misc/tune2fs.c:1035
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"CẢNH BÃO: Không thể xác nhận rằng hạt nhân có há»— trợ metadata_csum_seed.\n"
+" Việc này yêu cầu Linux >= v4.4.\n"
+
+#: misc/tune2fs.c:1071
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Tính năng xóa sạch hệ thống tập tin “%s†không được hỗ trợ.\n"
+
+#: misc/tune2fs.c:1077
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Tính năng đặt hệ thống tập tin “%s†không được hỗ trợ.\n"
+
+#: misc/tune2fs.c:1086
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Tính năng có nhật ký (has_journal) có thể được xóa sạch\n"
+"chỉ khi hệ thống tập tin được tháo gắn kết\n"
+"hay được gắn kết má»™t cách chỉ Ä‘á»c.\n"
+
+#: misc/tune2fs.c:1094
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Äặt cá» cần thiết phục hồi (needs_recovery).\n"
+"Hãy chạy tiến trình e2fsck trước khi xóa sạch cỠcó nhật ký (has_journal).\n"
+
+#: misc/tune2fs.c:1112
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"Không được há»— trợ chức năng “sparse_superâ€\n"
+"cho hệ thống tập tin với đặc tính meta_bg được bật.\n"
+
+#: misc/tune2fs.c:1125
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Tính năng bảo vệ chống đa gắn không thể\n"
+"đặt được nếu hệ thống tập tin đã được gắn kết\n"
+"hay chỉ cho Ä‘á»c.\n"
+
+#: misc/tune2fs.c:1143
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "Äặc tính kỹ thuật bảo vệ Ä‘a gắn đã bật vá»›i nhịp cập nhật là %d giây.\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+"Äặc tính kỹ thuật bảo vệ Ä‘a gắn không thể\n"
+"được tắt nếu hệ thống tập tin chỉ Ä‘á»c.\n"
+
+#: misc/tune2fs.c:1160
+msgid "Error while reading bitmaps\n"
+msgstr "Gặp lá»—i khi Ä‘á»c mảng\n"
+
+#: misc/tune2fs.c:1169
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "Số mầu nhiệm trong khối MMP không khá»›p. mong chá»: %x, thá»±c tế: %x\n"
+
+#: misc/tune2fs.c:1174
+msgid "while reading MMP block."
+msgstr "trong khi Ä‘á»c khối MMP."
+
+#: misc/tune2fs.c:1206
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr "Gỡ bỠcỠflex_bg thì gây ra hệ thống tập tin không thống nhất.\n"
+
+#: misc/tune2fs.c:1217
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Tính năng tập tin rất lớn (huge_file) có thể được xóa sạch\n"
+"chỉ khi hệ thống tập tin được tháo gắn kết\n"
+"hay được gắn kết má»™t cách chỉ Ä‘á»c.\n"
+
+#: misc/tune2fs.c:1228
+msgid "Enabling checksums could take some time."
+msgstr "Bật tổng kiểm có thể mất má»™t ít thá»i gian."
+
+#: misc/tune2fs.c:1230
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "Không thể bật metadata_csum trên hệ thống tập tin đã gắn!\n"
+
+#: misc/tune2fs.c:1236
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "Các phần mở rộng không được bật. Cây mở rộng tập tin có thể được kiểm tra tổng kiểm, nhưng trái lại ánh xạ khối lại không thể. Không bật giản lược mở rộng bao phủ của kiểm tra tổng thể siêu dữ liệu. Chạy lại với mở rộng -O để sửa lại cho đúng.\n"
+
+#: misc/tune2fs.c:1243
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "Hệ thống tập tin 64-bít không được bật. Các trÆ°á»ng lá»›n hÆ¡n cung cấp bởi tính năng này bật kiểm tra tổng thể full-strength. Chạy resize2fs -b để chỉnh lại cho đúng.\n"
+
+#: misc/tune2fs.c:1269
+msgid "Disabling checksums could take some time."
+msgstr "Tắt tổng kiểm có thể mất má»™t ít thá»i gian."
+
+#: misc/tune2fs.c:1271
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "Không thể tắt metadata_csum trên hệ thống tập tin đã gắn!\n"
+
+#: misc/tune2fs.c:1334
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "Không thể bật chế độ 64-bít trong khi đang gắn!\n"
+
+#: misc/tune2fs.c:1344
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "Không thể tắt chế độ 64-bít trong khi đang gắn!\n"
+
+#: misc/tune2fs.c:1374
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "Không thể bật tính năng dá»± án; cỡ nút quá nhá».\n"
+
+#: misc/tune2fs.c:1395
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Cảnh báo: tùy chá»n “^quota†sẽ dè lên đối số “-Qâ€.\n"
+
+#: misc/tune2fs.c:1405
+msgid "Cannot enable encrypt feature on filesystems with the encoding feature enabled.\n"
+msgstr "Không thể kích hoạt tính năng mã hóa trên hệ thống tập tin với tính năng mã hoá được bật.\n"
+
+#: misc/tune2fs.c:1419
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"Cài đặt chức năng “metadata_csum_seed†chỉ được hỗ trợ\n"
+"cho hệ thống tập tin với đặc tính metadata_csum được bật.\n"
+
+#: misc/tune2fs.c:1437
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"UUID đã thay đổi kể từ khi bật metadata_csum. hệ thống tập tin phải được bỠgắn kết\n"
+"để ghi lại má»™t cách an toàn má»i siêu dữ liệu sao cho khá»›p vá»›i UUID má»›i.\n"
+
+#: misc/tune2fs.c:1443
+msgid "Recalculating checksums could take some time."
+msgstr "Tình tổng kiểm lại có thể mất má»™t ít thá»i gian."
+
+#: misc/tune2fs.c:1485
+msgid "The filesystem already has a journal.\n"
+msgstr "Hệ thống tập tin đã có nhật ký.\n"
+
+#: misc/tune2fs.c:1505
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"trong khi cố mở nhật ký trên %s\n"
+
+#: misc/tune2fs.c:1509
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Äang tạo nhật ký trên thiết bị %s: "
+
+#: misc/tune2fs.c:1517
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "trong khi thêm hệ thống tập tin vào nhật ký trên %s"
+
+#: misc/tune2fs.c:1523
+msgid "Creating journal inode: "
+msgstr "Äang tạo nút thông tin nhật ký: "
+
+#: misc/tune2fs.c:1537
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"trong khi cố tạo tập tin nhật ký"
+
+#: misc/tune2fs.c:1575
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "Không thể bật giá»›i hạn dá»± án; cỡ nút quá nhá».\n"
+
+#: misc/tune2fs.c:1588
+msgid "while initializing quota context in support library"
+msgstr "trong khi khởi tạo ngữ cảnh hạn ngạch trong thư viện hỗ trợ"
+
+#: misc/tune2fs.c:1603
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "trong khi cập nhật giới hạn hạn ngạch (%d)"
+
+#: misc/tune2fs.c:1611
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "trong khi ghi tập tin hạn ngạch (%d)"
+
+#: misc/tune2fs.c:1629
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "trong khi xóa bỠtập tin hạn ngạch (%d)"
+
+#: misc/tune2fs.c:1672
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Äã chỉ định tùy chá»n hạn ngạch sai.\n"
+"\n"
+"Sau đây là danh sách các tùy chá»n hạn ngạch được dùng (chấp nhận ngăn cách bằng dấu phẩy):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1730
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Không thể phân tách toán tá»­ ngày/giá»: %s"
+
+#: misc/tune2fs.c:1755 misc/tune2fs.c:1768
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "số đếm gắn sai — %s"
+
+#: misc/tune2fs.c:1811
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "gid/tên nhóm sai — %s"
+
+#: misc/tune2fs.c:1844
+#, c-format
+msgid "bad interval - %s"
+msgstr "sai nhịp - %s"
+
+#: misc/tune2fs.c:1873
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "tỷ lệ khối dành riêng sai — %s"
+
+#: misc/tune2fs.c:1888
+msgid "-o may only be specified once"
+msgstr "có thể Ä‘Æ°a ra tùy chá»n “-o†chỉ má»™t lần"
+
+#: misc/tune2fs.c:1897
+msgid "-O may only be specified once"
+msgstr "có thể Ä‘Æ°a ra tùy chá»n “-O†chỉ má»™t lần"
+
+#: misc/tune2fs.c:1914
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "số đếm khối dành riêng sai — %s"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "uid/tên ngÆ°á»i dùng sai — %s"
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "bad inode size - %s"
+msgstr "kích cỡ nút sai — %s"
+
+#: misc/tune2fs.c:1967
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Kích cỡ nút phải là lũy thừa 2 — %s"
+
+#: misc/tune2fs.c:2064
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval quá lớn (%lu)\n"
+
+#: misc/tune2fs.c:2069
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "Äang đặt khoảng thá»i gian cập nhật bảo vệ chống Ä‘a lắp thành %lu giây\n"
+
+#: misc/tune2fs.c:2078
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "Äặt cá» lá»—i cho hệ thống tập tin để buá»™c chạy fsck.\n"
+
+#: misc/tune2fs.c:2096
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Tham số stride RAID không hợp lệ: %s\n"
+
+#: misc/tune2fs.c:2111
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Tham số chiá»u rá»™ng sá»c (stripe-width) RAID không hợp lệ: %s\n"
+
+#: misc/tune2fs.c:2126
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Thuật toán tạo mẫu duy nhất vẫn không hợp lệ: %s\n"
+
+#: misc/tune2fs.c:2132
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Äang đặt thuật toán tạo mẫu duy nhất thành %s (%d)\n"
+
+#: misc/tune2fs.c:2151
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+msgstr ""
+"\n"
+"Chỉ định tùy chá»n sai.\n"
+"\n"
+"Các tùy chá»n mở rá»™ng được ngăn cách nhau bằng dấu phẩy, có thể chấp nhận\n"
+"\tđối số được gán vá»›i dấu bằng (“=â€).\n"
+"\n"
+"Tùy chá»n mở rá»™ng hợp lệ:\n"
+"\tclear_mmp\n"
+"\thash_alg=<thuật toán băm>\n"
+"\tmount_opts=<các tùy chá»n gắn mặc định mở rá»™ng>\n"
+"\tmmp_update_interval=<nhịp cập nhật mmp tính bằng giây>\n"
+"\tstride=<RAID cho mỗi kích cỡ đoạn đĩa theo khối>\n"
+"\tstripe-width=<RAID stride*các đĩa dữ liệu theo khối>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:2622
+msgid "Failed to read inode bitmap\n"
+msgstr "Không thể Ä‘á»c ánh xạ inode\n"
+
+#: misc/tune2fs.c:2627
+msgid "Failed to read block bitmap\n"
+msgstr "Lá»—i khi Ä‘á»c mảng khối\n"
+
+#: misc/tune2fs.c:2644 resize/resize2fs.c:1277
+msgid "blocks to be moved"
+msgstr "khối cần di chuyển"
+
+#: misc/tune2fs.c:2647
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Lỗi cấp phát ảnh mảng khối khi tăng kích cỡ inode\n"
+
+#: misc/tune2fs.c:2653
+msgid "Not enough space to increase inode size \n"
+msgstr "Không đủ sức chứa để tăng kích cỡ inode\n"
+
+#: misc/tune2fs.c:2658
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Lỗi định vị lại khối trong khi thay đổi kích cỡ inode \n"
+
+#: misc/tune2fs.c:2690
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Gặp lỗi khi thay đổi kích cỡ nút.\n"
+"Hãy chạy lệnh “e2undo†để hủy các bước thay đổi hệ thống tập tin. \n"
+
+#: misc/tune2fs.c:2900
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"Nếu bạn không chắc là hệ thống tập tin không đang sử dụng bất kỳ nút nào, chạy lệnh:\n"
+"“tune2fs -f -E clear_mmp {thiết_bị}â€\n"
+
+#: misc/tune2fs.c:2907
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Khối màu nhiệm MMP sai. Hãy thử sửa bằng cách chạy lệnh:\n"
+"“e2fsck -f %sâ€\n"
+
+#: misc/tune2fs.c:2919
+msgid "Cannot modify a journal device.\n"
+msgstr "Không thể sửa thiết bị nhật ký.\n"
+
+#: misc/tune2fs.c:2932
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Kích cỡ nút thông tin đã %lu\n"
+
+#: misc/tune2fs.c:2939
+msgid "Shrinking inode size is not supported\n"
+msgstr "Không hỗ trợ tính năng thu nhỠkích cỡ nút\n"
+
+#: misc/tune2fs.c:2944
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Kích cỡ nút thông tin không hợp lệ %lu (tối đa %d)\n"
+
+#: misc/tune2fs.c:2950
+msgid "Resizing inodes could take some time."
+msgstr "Việc đổi cỡ nút thông tin có thể mất nhiá»u thá»i gian."
+
+#: misc/tune2fs.c:2998
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"Cảnh báo: Journal đang sai. Bạn có thể muốn trình diễn lại journal như:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"sau đó trở vá» lệnh này. Nếu không, má»i thay đổi đã tạo có thể bị ghi đè\n"
+"bởi việc phục hồi journal.\n"
+
+#: misc/tune2fs.c:3009
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "Äang phục hồi journal.\n"
+
+#: misc/tune2fs.c:3028
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Äang đặt số đếm lắp tối Ä‘a thành %d\n"
+
+#: misc/tune2fs.c:3034
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Äang đặt số đếm lắp hiện thá»i thành %d\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Äang đặt ứng xá»­ lá»—i thành %d\n"
+
+#: misc/tune2fs.c:3044
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Äang đặt GID khối dành riêng thành %lu\n"
+
+#: misc/tune2fs.c:3049
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "khoảng giữa hai lần kiểm tra quá lớn (%lu)"
+
+#: misc/tune2fs.c:3056
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Äang đặt khoảng giữa hai lần kiểm tra thành %lu giây\n"
+
+#: misc/tune2fs.c:3063
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Äang đặt phần trăm khối dá»± trữ thành %g%% (%llu khối)\n"
+
+#: misc/tune2fs.c:3069
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "số lượng khối dự trữ quá lớn (%llu)"
+
+#: misc/tune2fs.c:3076
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Äang đặt số lượng khối dá»± trữ thành %llu\n"
+
+#: misc/tune2fs.c:3081
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Hệ thống tập tin đã có siêu khối thưa thớt.\n"
+
+#: misc/tune2fs.c:3084
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"Không được hỗ trợ chức năng phân tích cỠsiêu khối\n"
+"cho hệ thống tập tin với đặc tính meta_bg được bật.\n"
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Äặt cá» siêu khối thÆ°a thá»›t. %s"
+
+#: misc/tune2fs.c:3099
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"Tính năng xóa sạch cỠsiêu khối không được hỗ trợ.\n"
+
+#: misc/tune2fs.c:3107
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Äang đặt giá» kiểm tra hệ thống tập tin lần cuối cùng thành %s\n"
+
+#: misc/tune2fs.c:3113
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Äang đặt UID khối dành riêng thành %lu\n"
+
+#: misc/tune2fs.c:3145
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "Lỗi không sử dụng clear_mmp. Nó phải được sử dụng cùng với -f\n"
+
+#: misc/tune2fs.c:3163
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Äặc tính hạn ngạch chỉ có thể được thay đổi khi hệ thống tập tin không được gắn kết.\n"
+
+#: misc/tune2fs.c:3181
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "Thiết lập UUID trên hệ thống tập tin này có thể mất thá»i gian."
+
+#: misc/tune2fs.c:3196
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "Chỉ có thể thay đổi UUID khi hệ thống tập tin không được gắn kết.\n"
+
+#: misc/tune2fs.c:3199
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "Nếu bạn chỉ sử dụng hạt nhân mới hơn v4.4, hãy chạy “tune2fs -O metadata_csum_seed†và chạy lại lệnh này.\n"
+
+#: misc/tune2fs.c:3229
+msgid "Invalid UUID format\n"
+msgstr "Äịnh dạng UUID không hợp lệ\n"
+
+#: misc/tune2fs.c:3245
+msgid "Need to update journal superblock.\n"
+msgstr "Cần phải cập nhật siêu khối nhật ký.\n"
+
+#: misc/tune2fs.c:3267
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "Kích cỡ nút chỉ có thể thay đổi khi hệ thống tập tin không được gắn kết.\n"
+
+#: misc/tune2fs.c:3274
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr "Chức năng thay đổi kích cỡ nút thông tin không phải được há»— trợ đối vá»›i hệ thống tập tin đã bật tính năng “flex_bgâ€.\n"
+
+#: misc/tune2fs.c:3292
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Äang đặt kích cỡ nút %lu\n"
+
+#: misc/tune2fs.c:3296
+msgid "Failed to change inode size\n"
+msgstr "Lỗi thay đổi kích thước của nút\n"
+
+#: misc/tune2fs.c:3310
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Äang đặt kích cỡ stride thành %d\n"
+
+#: misc/tune2fs.c:3315
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Äang đặt chiá»u rá»™ng sá»c (stripe width) thành %d\n"
+
+#: misc/tune2fs.c:3322
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Äang đặt tùy chá»n gắn mặc định mở rá»™ng thành “%sâ€\n"
+
+#: misc/util.c:101
+msgid "<proceeding>\n"
+msgstr "<đang xử lý>\n"
+
+#: misc/util.c:105
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "Vẫn xử lý (hoặc chỠ%d giây để xử lý)? (y,N,c,K) "
+
+#: misc/util.c:109
+msgid "Proceed anyway? (y,N) "
+msgstr "Vẫn xử lý? (y,N,c,K) "
+
+#: misc/util.c:136
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs vẫn còn bị ép buộc. Mong “/etc/mtab†không đúng.\n"
+
+#: misc/util.c:141
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "sẽ không làm %s ở đây !\n"
+
+#: misc/util.c:148
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs vẫn còn bị ép buộc.\n"
+
+#: misc/util.c:164
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Không thể cấp phát bá»™ nhá»› để phân tách các tùy chá»n nhật ký !\n"
+
+#: misc/util.c:189
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Không tìm thấy thiết bị nhật ký tương ứng với %s\n"
+
+#: misc/util.c:216
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"ÄÆ°a ra tùy chá»n nhật ký sai.\n"
+"\n"
+"Các tùy chá»n nhật ký cÅ©ng định giá»›i bằng dấu phẩy, có thể chấp nhận\n"
+"đối số cái mà được đặt bằng dấu bằng (“=â€).\n"
+"\n"
+"Tùy chá»n nhật ký hợp lệ:\n"
+"\tsize=<kích cỡ nhật ký theo megabyte>\n"
+"\tdevice=<thiết bị nhật ký>\n"
+"\tlocation=<vị trí nhật ký>\n"
+"\n"
+"Kích cỡ của nhật ký phải nằm trong phạm vi\n"
+"1024 đến 10240000 khối hệ thống tập tin.\n"
+"\n"
+
+#: misc/util.c:247
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Hệ thống tập tin quá nhỠđối với nhật ký\n"
+
+#: misc/util.c:254
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Kích cỡ nhật ký đã yêu cầu là %d khối;\n"
+"nó phải nằm trong phạm vi 1024 đến 10240000 khối\n"
+"nên hủy bá».\n"
+
+#: misc/util.c:262
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Kích cỡ nhật ký quá lớn đối với hệ thống tập tin.\n"
+
+#: misc/util.c:276
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"Hệ thống tập tin này sẽ được kiểm tra tự động mỗi %d lần gắn kết\n"
+"hay má»—i %g ngày, Ä‘iá»u nào xảy ra trÆ°á»›c. Hãy dùng tùy chá»n\n"
+"“tune2fs -c†hay “tune2fs -i†để ghi đè lên nó.\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Cách dùng: %s [-d] [-p tập_tin_PID] [-s Ä‘Æ°á»ng_dẫn_ổ_cắm] [-T thá»i_hạn]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n num] [-s socketpath]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "đối số sai"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "kết nối"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "ghi"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "số lần Ä‘á»c"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "độ dài trả vỠkhông hợp lệ"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "uuidd daemon đã chạy sẵn rồi tại pid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Không thể tạo ổ cắm luồng stream UNIX: %s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Không thể buộc kết ổ cắm UNIX %s: %s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Không thể lắng nghe trên ổ cắm UNIX %s: %s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Gặp lá»—i khi Ä‘á»c từ ứng dụng khách, dài = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "thao tác %d, số gửi đến = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "UUID thá»i gian đã tạo ra: %s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "UUID ngẫu nhiên đã tạo ra: %s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "UUID thá»i gian đã tạo ra %s và %d theo sau\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "%d UUID đã tạo ra:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Thao tác không hợp lệ %d\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Số sai: %s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Gặp lá»—i khi gá»i trình ná»n uuidd (%s): %s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s và %d UUID xảy ra sau\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "Danh sách của UUID:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Máy chủ trả lá»i đáp ứng vá»›i chiá»u dài bất thÆ°á»ng %d\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Không thể buộc kết thúc uuidd đang chạy với PID %d: %s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Äã buá»™c kết thúc uuidd chạy tại PID %d\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Cách dùng: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "# Äổ mở rá»™ng:\n"
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tSố=%llu, Cỡ=%llu, Con trá»=%llu, Sắp xếp=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"Cách dùng: %s [-d cá»_gỡ_lá»—i] [-f] [-F] [-M] [-P] [-p] thiết_bị [-b|-s|kích_cỡ_má»›i] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "Äang mở rá»™ng bảng nút thông tin"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "Äang định vị lại các khối"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "Äang quét bảng nút thông tin"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "Äang cập nhật các tham chiếu nút thông tin"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "Äang di chuyển bảng nút thông tin"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "Lần qua lạ?!?"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Khởi chạy lần qua %d (tối đa = %lu)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"Việc thay đổi kích thước của hệ thống tập tin bigalloc chưa được thử nghiệm đầy đủ.\n"
+"Tá»± chịu trách nhiệm nếu muốn dùng! Dùng tùy chá»n ép buá»™c nếu bạn muốn thá»±c hiện tiếp.\n"
+"\n"
+
+#: resize/main.c:366
+#, c-format
+msgid "while opening %s"
+msgstr "trong khi mở %s"
+
+#: resize/main.c:374
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "trong khi lấy các thông tin vỠ%s"
+
+#: resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"TrÆ°á»›c tiên hãy chạy lệnh “e2fsck -f %sâ€.\n"
+"\n"
+
+#: resize/main.c:470
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Ước tính tích cỡ tối thiểu của hệ thống tập tin: %llu\n"
+
+#: resize/main.c:507
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Kích cỡ mới không hợp lệ: %s\n"
+
+#: resize/main.c:526
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Kích thước mới quá lớn để có thể dùng số 32 bit\n"
+
+#: resize/main.c:534
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Kích cỡ mới vẫn nhỠhơn mức tối thiểu (%llu)\n"
+
+#: resize/main.c:540
+msgid "Invalid stride length"
+msgstr "Äá»™ dài stride không hợp lệ"
+
+#: resize/main.c:564
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"Phân vùng chứa (hay thiết bị) chứa chỉ có kích cỡ %llu (%dk) khối.\n"
+"Bạn đã yêu cầu kích cỡ mới %llu khối.\n"
+"\n"
+
+#: resize/main.c:571
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "Không thể đặt hay bỠđặt tính năng 64bít.\n"
+
+#: resize/main.c:575
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "Không thể thay đổi tính năng 64bit trên một hệ thống tập tin mà nó lớn hơn 2^32 khối.\n"
+
+#: resize/main.c:581
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "Không thể thay đổi tính năng 64bit khi hệ thống tập tin đã được gắn kết.\n"
+
+#: resize/main.c:587
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "Vui lòng bật các tính năng mở rộng với tune2fs trước khi bật tính năng 64bit.\n"
+
+#: resize/main.c:593
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Hệ thống tập tin đã có độ dài %llu (%dk) khối. Không cần làm gì!\n"
+"\n"
+
+#: resize/main.c:600
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "Hệ thống tập tin đã sẵn là 64-bít.\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "Hệ thống tập tin đã sẵn là 32-bít.\n"
+
+#: resize/main.c:613
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "Äang chuyển đổi hệ thống tập tin sang 64-bít.\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "Äang chuyển đổi hệ thống tập tin sang 32-bít.\n"
+
+#: resize/main.c:617
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "Äang thay đổi kích cỡ của hệ thống tập tin trên %s thành %llu (%dk) khối.\n"
+
+#: resize/main.c:626
+#, c-format
+msgid "while trying to resize %s"
+msgstr "trong khi cố thay đổi kích cỡ %s"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Hãy chạy câu lệnh “e2fsck -fy %s†để sửa chữa hệ thống tập tin\n"
+"đằng sau thao tác thay đổi kích cỡ bị hủy bá».\n"
+
+#: resize/main.c:635
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"Hệ thống tập tin nằm trên %s giỠcó độ dài %llu (%dk) khối.\n"
+"\n"
+
+#: resize/main.c:650
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "trong khi cố cắt ngắn %s"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "hạt nhân không hỗ trợ tính năng thay đổi kích cỡ trực tuyến với sparse_super2"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "Hệ thống tập tin ở %s được gắn kết vào %s; cần thiết thay đổi kích cỡ trực tuyến\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "Tính năng thu nhỠkhi đang chạy không được hỗ trợ"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "Hệ thống tập tin không hỗ trợ tính năng thay đổi kích cỡ trực tuyến"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Không đủ khối dự trữ gdt để thay đổi kích thước"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Hạt nhân không hỗ trợ tính năng thay đổi kích cỡ hệ thống tập tin này rộng hơn"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "trong khi cố mở điểm lắp %s"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Äã yêu cầu giao diện thay đổi kích cỡ cÅ©.\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "Không đủ quyá»n để thay đổi kích cỡ của hệ thống tập tin"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "Trong khi kiểm tra có hỗ trợ thay đổi kích cỡ trực tuyến"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "Hạt nhân không hỗ trợ tính năng thay đổi kích cỡ trực tuyến"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Äang thá»±c hiện má»™t công việc thay đổi kích cỡ %s trá»±c tuyến thành %llu (%dk) khối.\n"
+
+#: resize/online.c:230
+msgid "While trying to extend the last group"
+msgstr "Trong khi cố mở rộng nhóm cuối cùng"
+
+#: resize/online.c:277
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Trong khi cố thêm nhóm số %d"
+
+#: resize/online.c:288
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "Hệ thống tập tin ở %s được gắn kết vào %s, và tính năng thay đổi kích cỡ trên dòng không được hỗ trợ trên hệ thống này.\n"
+
+#: resize/resize2fs.c:759
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "nút thông tin (%llu) phải nhỠhơn %u\n"
+
+#: resize/resize2fs.c:1038
+msgid "reserved blocks"
+msgstr "khối dành riêng"
+
+#: resize/resize2fs.c:1282
+msgid "meta-data blocks"
+msgstr "khối siêu_dữ_liệu"
+
+#: resize/resize2fs.c:1386 resize/resize2fs.c:2421
+msgid "new meta blocks"
+msgstr "khối siêu dữ liệu mới"
+
+#: resize/resize2fs.c:2644
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "Không bao giỠnên xảy ra! Không có sb trong super_sparse bg?\n"
+
+#: resize/resize2fs.c:2649
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "Không bao giỠnên xảy ra! Gặp old_desc không cần trong super_sparse bg?\n"
+
+#: resize/resize2fs.c:2722
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Không bao giá» nên xảy ra: nút thông tin thay đổi kích cỡ bị há»ng!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.45.3"
+msgstr "Thư viện EXT2FS phiên bản 1.45.3"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Sai số màu nhiệm cho cấu trúc ext2_filsys"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Sai số màu nhiệm cho cấu trúcbadblocks_list"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Sai số màu nhiệm cho cấu trúc badblocks_iterate"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Sai số màu nhiệm cho cấu trúc inode_scan"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Sai số màu nhiệm cho cấu trúc io_channel"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Sai số màu nhiệm cho cấu trúc unix io_channel"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Sai số màu nhiệm cho cấu trúc io_manager"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Sai số màu nhiệm cho cấu trúc block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Sai số màu nhiệm cho cấu trúc inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Sai số màu nhiệm cho cấu trúc generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Sai số màu nhiệm cho cấu trúc test io_channel"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "Sai số màu nhiệm cho cấu trúc danh sách khối thư mục"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Sai số màu nhiệm cho cấu trúc icount"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Sai số màu nhiệm cho cấu trúc Powerquest io_channe"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Sai số màu nhiệm cho cấu trúc tập tin ext2"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Sai số màu nhiệm cho Ext2 Image Header"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Sai số màu nhiệm cho cấu trúc nút io_channel"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Sai số màu nhiệm cho cán mở rộng ext4"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "Sai số màu nhiệm trong siêu khối"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "Phiên bản hệ thống tập tin quá cao"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Thá»­ viết vào hệ thống tập tin mà nó chỉ Ä‘á»c"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Không thể Ä‘á»c mô tả nhóm"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Không thể ghi mô tả nhóm"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Bá»™ mô tả nhóm há»ng: khối sai cho mảng khối"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Bá»™ mô tả nhóm há»ng: khối sai cho mảng nút"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Bá»™ mô tả nhóm há»ng: khối sai cho bảng nút"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Không thể ghi mảng ảnh nút"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Không thể Ä‘á»c mảng ảnh nút"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Không thể ghi mảng ảnh khối"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Không thể Ä‘á»c mảng ảnh khối"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Không thể ghi bảng nút thông tin"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Không thể Ä‘á»c bảng nút thông tin"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "Không thể Ä‘á»c nút tiếp theo"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "Hệ thống tập tin có kích cỡ khối bất thÆ°á»ng"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "ThÆ° mục ext2 đã há»ng"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Thá»­ Ä‘á»c khối từ hệ thống tập tin kết quả dạng ngắn"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Thử ghi khối tới hệ thống tập tin kết quả dạng ngắn"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Không còn không gian trống trong thư mục"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "Mảng nút không được tải lên"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "Mảng khối không được tải lên"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "Sai số lượng nút"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Sai số lượng khối"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "Lá»—i ná»™i bá»™ trong ext2fs_expand_dir"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "Không đủ sức chứa để xây dựng hệ thống tập tin như đỠxuất"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "Sai số lượng khối chuyển tới ext2fs_mark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "Sai số lượng khối chuyển tới ext2fs_unmark_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "Sai số lượng khối chuyển tới ext2fs_test_block_bitmap"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "Sai số lượng nút chuyển tới ext2fs_mark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "Sai số lượng nút chuyển tới ext2fs_unmark_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "Sai số lượng nút chuyển tới ext2fs_test_inode_bitmap"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Thử chuyển cuối của mảng khối qua phần cuối thật"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Thử chuyển cuối của mảng nút qua phần cuối thật"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Tìm thấy khối gián tiếp không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Tìm thấy khối gián tiếp đôi không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Tìm thấy khối gián tiếp ba không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Mảng ảnh khối không giống nhau"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Mảng ảnh nút không giống nhau"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Tên thiết bị không hợp lệ hay dị hình"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Một nhóm khối bị mất một bảng nút"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Siêu khối ext2 bị há»ng"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "Số bít chung không hợp lệ được chuyển qua cho ext2fs_mark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "Số bít chung không hợp lệ được chuyển qua cho ext2fs_unmark_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "Số bít chung không hợp lệ được chuyển qua cho ext2fs_test_generic_bitmap"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "Gặp quá nhiá»u liên kết má»m."
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "Hàm gá»i ngược callback không được tiếp nhận trong trÆ°á»ng hợp này"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Nút từ một khối sai trong bảng nút"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "Hệ thống tập tin có tính năng không được hỗ trợ"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "Hệ thống tập tin không há»— trợ tính năng chỉ Ä‘á»c"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "Kênh IO gặp lá»—i khi di chuyển vị trí trên tập tin lúc Ä‘á»c hay ghi"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Lỗi cấp phát vùng nhớ"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Äối số không hợp lệ được chuyển qua cho thÆ° viện profile"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Không thể cấp phát khối cho kiểu hế thống tập tin ext2"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Không thể cấp phát nút cho hệ thống tập tin ext2"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Nút ext2 không phải là một thư mục"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "Có quá nhiá»u tham chiếu trong bảng"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "Tập tin không tìm được bởi ext2_lookup"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "Mở tập tin trong chế Ä‘á»™ chỉ cho Ä‘á»c"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Khối thư mục ext2 không tìm thấy"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "Thư mục ext2 đã tồn tại rồi"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "Chức năng thư viện ext2 chưa được thực hiện"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "NgÆ°á»i dùng yêu cầu hủy"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Tập tin ext2 quá lớn"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Ãp dụng thiết bị journal không phải thiết bị khối"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Không tìm thấy siêu khối nhật ký (Journal)"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Journal phải có ít nhất 1024 khối"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "Phiên bản journal không được hỗ trợ"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "Lỗi tải journal mở rộng"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "Không tìm thấy Journal"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "Thư mục bảng băm không được hỗ trợ"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Số khối thuộc tính mở rộng không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Không thể tạo hệ thống tập tin với số nút đã yêu cầu"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Bản chụp nhanh E2image không được sử dụng"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Có quá nhiá»u khối mô tả nhóm dá»± trữ"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Thay đổi kích thước nút bị thất bại"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "Thử đặt khối bmap với khối gián tiếp bị mất"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Thành công"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: CÆ¡ sở dữ liệu há»ng"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: IO Lá»—i"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: Lỗi khóa"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: Hết bộ nhớ"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: Bản ghi đã sẵn có"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Khóa đã tồn tại trên chìa khóa khác"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: Äối số không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: Bản ghi không tồn tại"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: Không có quyá»n ghi"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Danh sách khối thư mục ext2fs bị rỗng"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "Thá»­ chỉnh sá»­a má»™t mảng khối thông qua bá»™ lặp khối chỉ Ä‘á»c"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Sai số nhiệm màu cho mở rá»™ng ext4 ghi lại Ä‘Æ°á»ng dẫn"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Sai số nhiệm màu cho bitmap chung 64-bit"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Sai số nhiệm màu cho bitmap khối 64-bit"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Sai số nhiệm màu cho bitmap nút 64-bit"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "Sai số nhiệm màu --- RESERVED_13"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "Sai số nhiệm màu --- RESERVED_14"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "Sai số nhiệm màu --- RESERVED_15"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "Sai số nhiệm màu --- RESERVED_16"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "Sai số nhiệm màu --- RESERVED_17"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "Sai số nhiệm màu --- RESERVED_18"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "Sai số nhiệm màu --- RESERVED_19"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "Phần đầu extent bị há»ng"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Chỉ số extent bị há»ng"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Extent há»ng"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Không còn khoảng đĩa trống cho mảng extent"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "Inode does not use extents"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "Không có extent “tiếp theoâ€"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "Không có extent “liá»n trÆ°á»›câ€"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "Không có extent “lênâ€"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Không có extent “xuốngâ€"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "Không nút hiện hành"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "Thao tác Ext2fs không được hỗ trợ"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Không còn phòng nào để chèn extent trong nút"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Phân tách có thể làm nguyên nhân nút bị rỗng"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "Extent không tìm thấy"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Thao tác không được hỗ trợ cho nút chứa phần mở rộng"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Äá»™ dài kích thÆ°á»›c không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "Kênh I/O không hỗ trợ số khối 64-bít"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Không thể kiểm tra nếu hệ thống tập tin được gắn bởi vì mất tập tin mtab"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Hệ thống tập tin quá lớn để có thể sử dụng mảng kiểu cũ"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: sai số màu nhiệm"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: thiết bị hiện thá»i hoạt Ä‘á»™ng"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: e2fsck đang chạy"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: số khối nằm xa ngoài vùng của hệ thống tập tin"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: trải qua một thao tác chưa được biết đến"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: hệ thống tập tin vẫn đang được sử dụng"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: mở với O_DIRECT gặp lỗi"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "Kích thước bộ mô tả nhóm khối không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "Tổng kiểm nút không khớp với nút"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "Tổng kiểm Mảng ảnh nút không khớp nhau"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "Tổng kiểm tra khối mở rộng không khớp với khối mở rộng"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "Khối thư mục không có chỗ dành cho tổng kiểm tra"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "Tổng kiểm tra khối thư mục không khớp với khối thư mục"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "Tổng kiểm tra khối thuộc tính mở rộng không khớp với khối"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "Tổng kiểm siêu khối không khớp với siêu khối"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "Không hiểu thuật toán tổng kiểm"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "Tổng kiểm tra khối MMP không khớp"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Tập tin ext2 đã sẵn có rồi"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "Tổng kiểm mảng ảnh khối không khớp mảng ảnh"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "Không thể lặp lại các khối dữ liệu của một nút chứa dữ liệu chung dòng"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "Thuá»™c tính mở rá»™ng có chiá»u dài tên không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "Thuá»™c tính mở rá»™ng có chiá»u dài giá trị không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "Thuộc tính mở rộng có mã băm không đúng"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "Thuộc tính mở rộng có phần đầu sai"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "Không tìm thấy khóa thuộc tính mở rộng"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "Không đủ khoảng trống để lưu trữ dữ liệu thuộc tính mở rộng"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "Hệ thống tập tin thiếu tính năng ext_attr hay inline_data"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "Nút không có dữ liệu chung dòng"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "Không khối cho một nút với dữ liệu chung dòng"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "Không còn khoảng trống trong dữ liệu chung dòng"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "Sai số màu nhiệm cho cấu trúc thuộc tính mở rộng"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "Nút hình như có chứa rác"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "Thuộc tính mở rộng có khoảng bù giá trị không hợp lệ"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "Các cỠjournal mâu thuẫn nhau"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "Tập tin undo bị há»ng"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "Tập tin undo sai cho hệ thống tập tin này"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "Hệ thống tập tin bị há»ng"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "Tìm thấy CRC sai trong hệ thống tập tin"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "Siêu khối journal bị há»ng"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "Nú bị há»ng"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "Inode chứa giá trị thuá»™c tính mở rá»™ng bị sai há»ng"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profile phiên bản 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Giá trị số mầu nhiệm sai trong profile_node"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Phần của profile không tìm thấy"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Mối quan hệ profile không tìm thấy"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Thử thêm quan hệ vào nút mà nó không là một chương"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Phần đầu chương profile phải có giá trị khác không"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Danh sách liên kết không đúng trong cấu trúc profile"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Mức nhóm không đúng trong cấu trúc profile"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Con trỠđến cha không đúng trong cấu trúc profile"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Giá trị số mầu nhiệm sai trong profile iterator"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Không thể đặt giá trị trên nút của đoạn"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Tham số không hợp lệ được chuyển qua cho thư viện profile"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Thá»­ viết vào hệ thống tập tin profile chỉ Ä‘á»c"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Phần đầu chương profile không ở mức cao nhất"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Cú pháp lỗi trong khai báo phần đầu chương profile"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Sai cú pháp trong quan hệ profile"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Bổ xung dấu ngoặc ôm đóng trong profile"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Thiếu mất dấu ngoặc ôm mở trong profile"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Số nhiệm màu sai trong profile_t"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Giá trị số mầu nhiệm sai trong profile_section_t"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Lặp đi lặp lại qua toàn bộ chương ở mức cao nhất không được hỗ trợ"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Äối tượng profile_section không hợp lệ"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "Không còn thêm phần nào nữa"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Tên sai được chuyển qua cho thủ tục truy vấn"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "Không mở tập tin profile nào"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Giá trị số mầu nhiệm sai trong profile_file_t"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Không thể mở tập tin profile"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "Phần đã tồn tại rồi"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Giá trị lô-gíc không hợp lệ"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Giá trị nguyên không hợp lệ"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Giá trị số mầu nhiệm sai trong profile_file_data_t"
+
+#: lib/support/plausible.c:118
+#, c-format
+msgid "\tlast mounted on %s on %s"
+msgstr "\tlần cuối được gắn vào %s trên %s"
+
+#: lib/support/plausible.c:121
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\tlần cuối được gắn vào %s"
+
+#: lib/support/plausible.c:124
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\tđược tạo lúc %s"
+
+#: lib/support/plausible.c:127
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\tsửa lần cuối lúc %s"
+
+#: lib/support/plausible.c:161
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "Tìm thấy %s bảng phân vùng trong %s\n"
+
+#: lib/support/plausible.c:191
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "Tập tin %s không tồn tại và cũng chưa chỉ ra kích cỡ.\n"
+
+#: lib/support/plausible.c:199
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "Äang tạo tập tin thÆ°á»ng %s\n"
+
+#: lib/support/plausible.c:202
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "Không thể mở %s: %s\n"
+
+#: lib/support/plausible.c:205
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"Có vẻ là thiết bị không tồn tại; bạn có đưa ra đúng chưa?\n"
+
+#: lib/support/plausible.c:227
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s không phải thiết bị đặc biệt khối.\n"
+
+#: lib/support/plausible.c:249
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%s chứa hệ thống tập tin %s có nhãn “%sâ€\n"
+
+#: lib/support/plausible.c:252
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s chứa hệ thống tập tin %s\n"
+
+#: lib/support/plausible.c:276
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s chứa dữ liệu “%sâ€\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "trong khi mở thư mục \"%s\""
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Tìm thấy lỗi tổng kiểm trong hệ thống tập tin! Hãy chạy ngay e2fsck!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** Tìm thấy lỗi tổng kiểm trong ảnh bít! Chạy e2fsck ngay!\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s: %s: gặp lá»—i khi Ä‘á»c mảng ảnh: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Cảnh báo: gặp khó khăn trong việc ghi ra các siêu khối.\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "i_dir_acl @F %Id, @s số không.\n"
+
+#~ msgid "Journal features: "
+#~ msgstr "Tính năng nhật ký: "
+
+#~ msgid "Journal size: "
+#~ msgstr "Kích cỡ nhật ký: "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "Chiá»u dài nhật ký: %u\n"
+#~ "Dãy nhật ký: 0x%08x\n"
+#~ "Äầu nhật ký: %u\n"
+
+#~ msgid "Journal checksum type: crc32\n"
+#~ msgstr "Kiểu tổng kiểm journal: crc32\n"
+
+#~ msgid ""
+#~ "Journal checksum type: %s\n"
+#~ "Journal checksum: 0x%08x\n"
+#~ msgstr ""
+#~ "Kiểu tổng kiểm journal: %s\n"
+#~ "Tổng kiểm journal: 0x%08x\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "Lá»—i Journal: %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Kích cỡ khối nhật ký: %u\n"
+#~ "Äá»™ dài nhật ký: %u\n"
+#~ "Khối đầu nhật ký: %u\n"
+#~ "Dãy nhật ký: 0x%08x\n"
+#~ "Äầu nhật ký: %u\n"
+#~ "Số ngÆ°á»i dùng nhật ký: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "NgÆ°á»i dùng nhật ký: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: enabled project without quota together\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Cảnh báo: đã bật dự án mà không có hạn ngạch đi kèm\n"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "Hãy chạy tiến trình e2fsck trên hệ thống tập tin.\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "@i %i đặt cỠ@c trên @f mà không hỗ trợ khả năng @c."
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "@A @b @a %b. "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s: cảnh báo: sự hỗ trợ khả năng nén là thực nghiệm.\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s: e2fsck không được biên dịch với khả năng hỗ trợ HTREE,\n"
+#~ "\tnhưng hệ thống tập tin %s có thư mục HTREE.\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "trong khi cấp phát bộ đếm làm số không"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ", nút không dùng %u\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "Lá»—i Ä‘á»c dữ liệu hệ thống tập tin \n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "Lá»—i tdb_fetch %s\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "UUID hệ thống tập tin không tương ứng \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "Lá»—i tdb_open %s\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "Lỗi mở %s\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr "Äã chạy lại giao dịch có kích cỡ %zd ở vị trí %llu\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "Lá»—i ghi %s\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "Tham số kiểu hạn ngạch không hợp lệ: %s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "Không thể cấp phát bá»™ nhá»› để phân tách các tùy chá»n hạn ngạch!\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "Không thể cấp phát bộ nhớ cho tên tập tin tdb\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Äể hoàn lại thao tác tune2fs, hãy chạy câu lệnh\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s là toàn bộ thiết bị, không phải chỉ một phân vùng !\n"
+
+#~ msgid "\b\b\b\b\b\b\b\bCopied %llu / %llu blocks (%llu%%) in %s at %.2f MB/s \n"
+#~ msgstr "\b\b\b\b\b\b\b\bÄã chép %llu / %llu khối (%llu%%) trong %s tốc Ä‘á»™ %.2f MB/s \n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the quota feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Quota for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Cảnh báo: đặc tính hạn ngạch vẫn đang trong quá trình phát triển\n"
+#~ "Xem https://ext4.wiki.kernel.org/index.php/Quota để biết chi tiết\n"
+#~ "\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "Không thể lấy các thông tin vỠ%s — %s\n"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "Chức năng xóa sạch cỠtầm không được hỗ trợ trên %s"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s: tổ hợp hai tính năng flex_bg và !resize_inode\n"
+#~ "Ä‘á»u không được resize2fs há»— trợ.\n"
+
+#~ msgid "@g %g @b @B uninitialized but @i @B in use.\n"
+#~ msgstr "@B @b của @g %g chưa khởi tạo nhưng đang dùng @B @i.\n"
+
+#~ msgid "@i %i should not have EOFBLOCKS_FL set (size %Is, lblk %r)\n"
+#~ msgstr "@i %i không nên lập EOFBLOCKS_FL (kích cỡ %Is, lblk %r)\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "Không thể xác định kích cỡ nhật ký"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<nút thông tin chỉ mục ACL>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<nút thông tin dữ liệu ACL>"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "ghi ngắn (chỉ %d byte) để ghi phần đầu ảnh"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "cỡ đoạn không hợp lệ — %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "Cảnh báo: không há»— trợ Ä‘oạn nên bá» qua tùy chá»n “-fâ€\n"
+
+#~ msgid "Calling BLKDISCARD from %llu to %llu "
+#~ msgstr "Äang gá»i BLKDISCARD từ %llu đến %llu "
+
+#~ msgid "succeeded.\n"
+#~ msgstr "đã thành công.\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "CHƯA gỡ bỠnhật ký\n"
+
+#~ msgid "#\t\t %u -> %u (%d)\n"
+#~ msgstr "#\t\t %u -> %u (%d)\n"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
new file mode 100644
index 0000000..e7520fd
--- /dev/null
+++ b/po/zh_CN.gmo
Binary files differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..a94612e
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,8784 @@
+# Chinese (simplified) translation for e2fsprogs.
+# This file is distributed under the same license as the e2fsprogs package.
+# Dark Raven <drdarkraven@gmail.com>, 2009.
+# zwpwjwtz <zwpwjwtz@126.com>, 2015.
+# Mingye Wang (Arthur2e5) <arthur200126@gmail.com>, 2016.
+# Boyuan Yang <073plan@gmail.com>, 2019.
+# Wenbin Lv <wenbin816@gmail.com>, 2021-2022.
+#
+#. The strings in e2fsck's problem.c can be very hard to translate,
+#. since the strings are expanded in two different ways. First of all,
+#. there is an @-expansion, where strings like "@i" are expanded to
+#. "inode", and so on. In order to make it easier for translators, the
+#. e2fsprogs po template file has been enhanced with comments that show
+#. the @-expansion, for the strings in the problem.c file.
+#.
+#. Translators are free to use the @-expansion facility if they so
+#. choose, by providing translations for strings in e2fsck/message.c.
+#. These translation can completely replace an expansion; for example,
+#. if "bblock" (which indicated that "@b" would be expanded to "block")
+#. is translated as "ddatenverlust", then "@d" will be expanded to
+#. "datenverlust". Alternatively, translators can simply not use the
+#. @-expansion facility at all.
+#.
+#. The second expansion which is done for e2fsck's problem.c messages is
+#. a dynamic %-expansion, which expands %i as an inode number, and so
+#. on. A table of these expansions can be found below. Note that
+#. %-expressions that begin with "%D" and "%I" are two-character
+#. expansions; so for example, "%Iu" expands to the inode's user id
+#. ownership field (inode->i_uid). Also the "%B" expansion is special:
+#. it can expand to either the string "indirect block" (possibly preceded
+#. by the word "double" or "triple"), or the string "block #" immediately
+#. followed by an integer indicating a block sequence number.
+#.
+#. Please note that the %-expansion for most e2fsck's problem.c should not
+#. use positional indicators such as %1, since although they look like c-style
+#. format strings, they are NOT c-style format strings, and the positional
+#. indicators (which BTW are GNU extensions and so won't work on other Unix
+#. gettext implementations) won't work with e2fsck's print_e2fsck_message()
+#. function found in e2fsck/message.c
+#.
+#. %b <blk> block number
+#. %B "indirect block" | "block #"<blkcount> string | string+integer
+#. %c <blk2> block number
+#. %Di <dirent> -> ino inode number
+#. %Dn <dirent> -> name string
+#. %Dr <dirent> -> rec_len
+#. %Dl <dirent> -> name_len
+#. %Dt <dirent> -> filetype
+#. %d <dir> inode number
+#. %g <group> integer
+#. %i <ino> inode number
+#. %Is <inode> -> i_size
+#. %IS <inode> -> i_extra_isize
+#. %Ib <inode> -> i_blocks
+#. %Il <inode> -> i_links_count
+#. %Im <inode> -> i_mode
+#. %IM <inode> -> i_mtime
+#. %IF <inode> -> i_faddr
+#. %If <inode> -> i_file_acl
+#. %Id <inode> -> i_size_high
+#. %Iu <inode> -> i_uid
+#. %Ig <inode> -> i_gid
+#. %It <str> file type
+#. %j <ino2> inode number
+#. %m <com_err error message>
+#. %N <num>
+#. %p ext2fs_get_pathname of directory <ino>
+#. %P ext2fs_get_pathname of <dirent>->ino with <ino2> as
+#. the containing directory. (If dirent is NULL
+#. then return the pathname of directory <ino2>)
+#. %q ext2fs_get_pathname of directory <dir>
+#. %Q ext2fs_get_pathname of directory <ino> with <dir> as
+#. the containing directory.
+#. %s <str> miscellaneous string
+#. %S backup superblock
+#. %X <num> hexadecimal format
+#.
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.46.6-rc1\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2022-09-12 08:19-0400\n"
+"PO-Revision-Date: 2022-09-13 15:53+0800\n"
+"Last-Translator: Wenbin Lv <wenbin816@gmail.com>\n"
+"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Poedit 3.1.1\n"
+"X-Poedit-Bookmarks: -1,591,-1,-1,-1,-1,-1,-1,-1,-1\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:221
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "åå— %u 超出范围;已忽略。\n"
+
+#: e2fsck/badblocks.c:46
+msgid "while sanity checking the bad blocks inode"
+msgstr "进行åå— inode çš„å¥å…¨æ€§æ£€æŸ¥æ—¶"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "读å–åå— inode æ—¶"
+
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1592
+#: e2fsck/unix.c:1707 misc/badblocks.c:1266 misc/badblocks.c:1274
+#: misc/badblocks.c:1288 misc/badblocks.c:1300 misc/dumpe2fs.c:438
+#: misc/dumpe2fs.c:704 misc/dumpe2fs.c:708 misc/e2image.c:1440
+#: misc/e2image.c:1640 misc/e2image.c:1661 misc/mke2fs.c:237
+#: misc/tune2fs.c:2888 misc/tune2fs.c:2990 resize/main.c:422
+#, c-format
+msgid "while trying to open %s"
+msgstr "å°è¯•æ‰“å¼€ %s æ—¶"
+
+#: e2fsck/badblocks.c:84
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "å°è¯• popen \"%s\" æ—¶"
+
+#: e2fsck/badblocks.c:95 misc/mke2fs.c:244
+msgid "while reading in list of bad blocks from file"
+msgstr "从文件中读å–åå—列表时"
+
+#: e2fsck/badblocks.c:106
+msgid "while updating bad block inode"
+msgstr "æ›´æ–°åå— inode æ—¶"
+
+#: e2fsck/badblocks.c:134
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode. Cleared.\n"
+msgstr "警告:在åå— inode 中å‘现éžæ³•çš„å— %u 。已清除。\n"
+
+#: e2fsck/dirinfo.c:332
+msgid "while freeing dir_info tdb file"
+msgstr "释放 dir_info tdb 文件时"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr "%3$s时读å–å— %1$lu 出错(%2$s)。"
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "读å–å— %lu 出错(%s)。"
+
+#: e2fsck/ehandler.c:66 e2fsck/ehandler.c:115
+msgid "Ignore error"
+msgstr "忽略错误"
+
+#: e2fsck/ehandler.c:67
+msgid "Force rewrite"
+msgstr "强制覆盖"
+
+#: e2fsck/ehandler.c:109
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr "%3$sæ—¶å†™å…¥å— %1$lu 出错(%2$s)。"
+
+#: e2fsck/ehandler.c:112
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "å†™å— %lu 出错(%s)。"
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "空目录å—"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "空目录映射"
+
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "ç©ºç›®å½•å— %u (#%d) 于 inode %u 中\n"
+
+#: e2fsck/extend.c:22
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s 文件å å—æ•° å—大å°\n"
+
+#: e2fsck/extend.c:45
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "éžæ³•çš„å—æ•°é‡ï¼\n"
+
+#: e2fsck/extend.c:51
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "无法为å—缓存分é…内存(大å°=%d)\n"
+
+#: e2fsck/extents.c:42
+msgid "extent rebuild inode map"
+msgstr "extent é‡å»º inode 映射"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "用法:%s ç£ç›˜å\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported! Can't flush buffers.\n"
+msgstr "ä¸æ”¯æŒå¯¹ BLKFLSBUF 进行 ioctl 调用ï¼æ— æ³•æŽ’空缓冲区。\n"
+
+#: e2fsck/journal.c:1289
+msgid "reading journal superblock\n"
+msgstr "读å–日志超级å—\n"
+
+#: e2fsck/journal.c:1362
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: 没有å‘现日志超级å—\n"
+
+#: e2fsck/journal.c:1371
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: 日志过短\n"
+
+#: e2fsck/journal.c:1384
+#, c-format
+msgid "%s: incorrect fast commit blocks\n"
+msgstr "%s: 错误的快速æ交å—\n"
+
+#: e2fsck/journal.c:1686 misc/fuse2fs.c:3797
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: 正在æ¢å¤æ—¥å¿—\n"
+
+#: e2fsck/journal.c:1688
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: 使用åªè¯»æ¨¡å¼æ—¶ä¸ä¼šè¿›è¡Œæ—¥å¿—ä¿®å¤\n"
+
+#: e2fsck/journal.c:1715
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "å°è¯•é‡æ–°æ‰“å¼€ %s æ—¶"
+
+#: e2fsck/message.c:116
+msgid "aextended attribute"
+msgstr "a扩展属性"
+
+#: e2fsck/message.c:117
+msgid "Aerror allocating"
+msgstr "A分é…出错"
+
+#: e2fsck/message.c:118
+msgid "bblock"
+msgstr "bå—"
+
+#: e2fsck/message.c:119
+msgid "Bbitmap"
+msgstr "Bä½å›¾"
+
+#: e2fsck/message.c:120
+msgid "ccompress"
+msgstr "c压缩"
+
+#: e2fsck/message.c:121
+msgid "Cconflicts with some other fs @b"
+msgstr "C与其他文件系统@b冲çª"
+
+#: e2fsck/message.c:122
+msgid "ddirectory"
+msgstr "d目录"
+
+#: e2fsck/message.c:123
+msgid "Ddeleted"
+msgstr "D已删除"
+
+#: e2fsck/message.c:124
+msgid "eentry"
+msgstr "e项"
+
+#: e2fsck/message.c:125
+msgid "E@e '%Dn' in %p (%i)"
+msgstr "Eä½äºŽ %p (%i) çš„@e \"%Dn\""
+
+#: e2fsck/message.c:126
+msgid "ffilesystem"
+msgstr "f文件系统"
+
+#: e2fsck/message.c:127
+msgid "Ffor @i %i (%Q) is"
+msgstr "F关于 @i %i (%Q) 为"
+
+#: e2fsck/message.c:128
+msgid "ggroup"
+msgstr "g组"
+
+#: e2fsck/message.c:129
+msgid "hHTREE @d @i"
+msgstr "hHTREE@d @i"
+
+#: e2fsck/message.c:130
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:131
+msgid "Iillegal"
+msgstr "Iéžæ³•çš„"
+
+#: e2fsck/message.c:132
+msgid "jjournal"
+msgstr "j日志"
+
+#: e2fsck/message.c:133
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:134
+msgid "Lis a link"
+msgstr "L是一个链接"
+
+#: e2fsck/message.c:135
+msgid "mmultiply-claimed"
+msgstr "mé‡å¤å¼•ç”¨çš„"
+
+#: e2fsck/message.c:136
+msgid "ninvalid"
+msgstr "n无效的"
+
+#: e2fsck/message.c:137
+msgid "oorphaned"
+msgstr "o孤立的"
+
+#: e2fsck/message.c:138
+msgid "pproblem in"
+msgstr "p有问题的"
+
+#: e2fsck/message.c:139
+msgid "qquota"
+msgstr "qé…é¢"
+
+#: e2fsck/message.c:140
+msgid "rroot @i"
+msgstr "ræ ¹ @i"
+
+#: e2fsck/message.c:141
+msgid "sshould be"
+msgstr "s应为"
+
+#: e2fsck/message.c:142
+msgid "Ssuper@b"
+msgstr "S超级@b"
+
+#: e2fsck/message.c:143
+msgid "uunattached"
+msgstr "u独立的"
+
+#: e2fsck/message.c:144
+msgid "vdevice"
+msgstr "v设备"
+
+#: e2fsck/message.c:145
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:146
+msgid "zzero-length"
+msgstr "z零长度"
+
+#: e2fsck/message.c:157
+msgid "<The NULL inode>"
+msgstr "<NULL inode>"
+
+#: e2fsck/message.c:158
+msgid "<The bad blocks inode>"
+msgstr "<åå— inode>"
+
+#: e2fsck/message.c:160
+msgid "<The user quota inode>"
+msgstr "<用户é…é¢ inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group quota inode>"
+msgstr "<组é…é¢ inode>"
+
+#: e2fsck/message.c:162
+msgid "<The boot loader inode>"
+msgstr "<引导加载器 inode>"
+
+#: e2fsck/message.c:163
+msgid "<The undelete directory inode>"
+msgstr "<未删除的目录 inode>"
+
+#: e2fsck/message.c:164
+msgid "<The group descriptor inode>"
+msgstr "<组æ述符 inode>"
+
+#: e2fsck/message.c:165
+msgid "<The journal inode>"
+msgstr "<日志 inode>"
+
+#: e2fsck/message.c:166
+msgid "<Reserved inode 9>"
+msgstr "<ä¿ç•™çš„ inode 9>"
+
+#: e2fsck/message.c:167
+msgid "<Reserved inode 10>"
+msgstr "<ä¿ç•™çš„ inode 10>"
+
+#: e2fsck/message.c:325
+msgid "regular file"
+msgstr "一般文件"
+
+#: e2fsck/message.c:327
+msgid "directory"
+msgstr "目录"
+
+#: e2fsck/message.c:329
+msgid "character device"
+msgstr "字符设备"
+
+#: e2fsck/message.c:331
+msgid "block device"
+msgstr "å—设备"
+
+#: e2fsck/message.c:333
+msgid "named pipe"
+msgstr "命å管é“"
+
+#: e2fsck/message.c:335
+msgid "symbolic link"
+msgstr "符å·é“¾æŽ¥"
+
+#: e2fsck/message.c:337 misc/uuidd.c:162
+msgid "socket"
+msgstr "套接字"
+
+#: e2fsck/message.c:339
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "模å¼ä¸º 0%o 的未知文件类型"
+
+#: e2fsck/message.c:410
+msgid "indirect block"
+msgstr "间接å—"
+
+#: e2fsck/message.c:412
+msgid "double indirect block"
+msgstr "二次间接å—"
+
+#: e2fsck/message.c:414
+msgid "triple indirect block"
+msgstr "三次间接å—"
+
+#: e2fsck/message.c:416
+msgid "translator block"
+msgstr "翻译å—"
+
+#: e2fsck/message.c:418
+msgid "block #"
+msgstr "å— #"
+
+#: e2fsck/message.c:482
+msgid "user"
+msgstr "用户"
+
+#: e2fsck/message.c:485
+msgid "group"
+msgstr "组"
+
+#: e2fsck/message.c:488
+msgid "project"
+msgstr "项目"
+
+#: e2fsck/message.c:491
+msgid "unknown quota type"
+msgstr "未知é…é¢ç±»åž‹"
+
+#: e2fsck/pass1b.c:223
+msgid "multiply claimed inode map"
+msgstr "é‡å¤å¼•ç”¨çš„ inode 映射"
+
+#: e2fsck/pass1b.c:673 e2fsck/pass1b.c:831
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "内部错误:无法找到 %llu çš„ dup_blk ä¿¡æ¯\n"
+
+#: e2fsck/pass1b.c:958
+msgid "returned from clone_file_block"
+msgstr "从 clone_file_block 返回"
+
+#: e2fsck/pass1b.c:982
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "内部错误:无法查找 %llu çš„ EA å—记录"
+
+#: e2fsck/pass1b.c:995
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "内部错误:无法查找 %u çš„ EA inode å—记录"
+
+#: e2fsck/pass1.c:349
+#, c-format
+msgid "while hashing entry with e_value_inum = %u"
+msgstr "对 e_value_inum = %u 的项进行哈希时"
+
+#: e2fsck/pass1.c:770 e2fsck/pass2.c:1155
+msgid "reading directory block"
+msgstr "读å–目录å—"
+
+#: e2fsck/pass1.c:1169
+msgid "getting next inode from scan"
+msgstr "从扫æ中获å–下一个 inode"
+
+#: e2fsck/pass1.c:1221
+msgid "in-use inode map"
+msgstr "使用中的 inode 映射"
+
+#: e2fsck/pass1.c:1232
+msgid "directory inode map"
+msgstr "目录 inode 映射"
+
+#: e2fsck/pass1.c:1242
+msgid "regular file inode map"
+msgstr "普通文件 inode 映射"
+
+#: e2fsck/pass1.c:1251 misc/e2image.c:1290
+msgid "in-use block map"
+msgstr "使用中的å—映射"
+
+#: e2fsck/pass1.c:1260
+msgid "metadata block map"
+msgstr "元数æ®å—映射"
+
+#: e2fsck/pass1.c:1271
+msgid "inode casefold map"
+msgstr "inode casefold 映射"
+
+#: e2fsck/pass1.c:1336
+msgid "opening inode scan"
+msgstr "打开 inode 扫æ"
+
+#: e2fsck/pass1.c:2104
+msgid "Pass 1"
+msgstr "第 1 é"
+
+#: e2fsck/pass1.c:2165
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "è¯»å– inode %u 的间接å—"
+
+#: e2fsck/pass1.c:2216
+msgid "bad inode map"
+msgstr "æŸåçš„ inode 映射"
+
+#: e2fsck/pass1.c:2256
+msgid "inode in bad block map"
+msgstr "åå—映射中的 inode"
+
+#: e2fsck/pass1.c:2276
+msgid "imagic inode map"
+msgstr "imagic inode 映射"
+
+#: e2fsck/pass1.c:2307
+msgid "multiply claimed block map"
+msgstr "é‡å¤å¼•ç”¨çš„å—映射"
+
+#: e2fsck/pass1.c:2432
+msgid "ext attr block map"
+msgstr "扩展属性å—映射"
+
+#: e2fsck/pass1.c:3729
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu (%c): 应为 %6lu 但得到物ç†å— %6lu(å—计数 %lld)\n"
+
+#: e2fsck/pass1.c:4150
+msgid "block bitmap"
+msgstr "å—ä½å›¾"
+
+#: e2fsck/pass1.c:4156
+msgid "inode bitmap"
+msgstr "inode ä½å›¾"
+
+#: e2fsck/pass1.c:4162
+msgid "inode table"
+msgstr "inode 表"
+
+#: e2fsck/pass2.c:318
+msgid "Pass 2"
+msgstr "第 2 é"
+
+#: e2fsck/pass2.c:576
+msgid "NLS is broken."
+msgstr "NLS å·²æŸå。"
+
+#: e2fsck/pass2.c:1228 e2fsck/pass2.c:1414
+msgid "Can not continue."
+msgstr "无法继续。"
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "已完æˆçš„ inode ä½å›¾"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "内存峰值"
+
+#: e2fsck/pass3.c:149
+msgid "Pass 3"
+msgstr "第 3 é"
+
+#: e2fsck/pass3.c:355
+msgid "inode loop detection bitmap"
+msgstr "inode 循环检测ä½å›¾"
+
+#: e2fsck/pass4.c:289
+msgid "Pass 4"
+msgstr "第 4 é"
+
+#: e2fsck/pass5.c:79
+msgid "Pass 5"
+msgstr "第 5 é"
+
+#: e2fsck/pass5.c:102
+msgid "check_inode_bitmap_checksum: Memory allocation error"
+msgstr "check_inode_bitmap_checksum: 内存分é…出错"
+
+#: e2fsck/pass5.c:156
+msgid "check_block_bitmap_checksum: Memory allocation error"
+msgstr "check_block_bitmap_checksum: 内存分é…出错"
+
+#: e2fsck/problem.c:53
+msgid "(no prompt)"
+msgstr "(没有æ示)"
+
+#: e2fsck/problem.c:54
+msgid "Fix"
+msgstr "ä¿®å¤"
+
+#: e2fsck/problem.c:55
+msgid "Clear"
+msgstr "清除"
+
+#: e2fsck/problem.c:56
+msgid "Relocate"
+msgstr "é‡å®šä½"
+
+#: e2fsck/problem.c:57
+msgid "Allocate"
+msgstr "分é…"
+
+#: e2fsck/problem.c:58
+msgid "Expand"
+msgstr "扩充"
+
+#: e2fsck/problem.c:59
+msgid "Connect to /lost+found"
+msgstr "连接到 /lost+found"
+
+#: e2fsck/problem.c:60
+msgid "Create"
+msgstr "创建"
+
+#: e2fsck/problem.c:61
+msgid "Salvage"
+msgstr "抢救"
+
+#: e2fsck/problem.c:62
+msgid "Truncate"
+msgstr "截断"
+
+#: e2fsck/problem.c:63
+msgid "Clear inode"
+msgstr "清除 inode"
+
+#: e2fsck/problem.c:64
+msgid "Abort"
+msgstr "中止"
+
+#: e2fsck/problem.c:65
+msgid "Split"
+msgstr "分割"
+
+#: e2fsck/problem.c:66
+msgid "Continue"
+msgstr "继续"
+
+#: e2fsck/problem.c:67
+msgid "Clone multiply-claimed blocks"
+msgstr "克隆é‡å¤å¼•ç”¨çš„å—"
+
+#: e2fsck/problem.c:68
+msgid "Delete file"
+msgstr "删除文件"
+
+#: e2fsck/problem.c:69
+msgid "Suppress messages"
+msgstr "ä¸æ˜¾ç¤ºæ¶ˆæ¯"
+
+#: e2fsck/problem.c:70
+msgid "Unlink"
+msgstr "解除链接"
+
+#: e2fsck/problem.c:71
+msgid "Clear HTree index"
+msgstr "清除 HTree 索引"
+
+#: e2fsck/problem.c:72
+msgid "Recreate"
+msgstr "é‡å»º"
+
+#: e2fsck/problem.c:73
+msgid "Optimize"
+msgstr "优化"
+
+#: e2fsck/problem.c:74
+msgid "Clear flag"
+msgstr "清除标志"
+
+#: e2fsck/problem.c:83
+msgid "(NONE)"
+msgstr "(空)"
+
+#: e2fsck/problem.c:84
+msgid "FIXED"
+msgstr "已修å¤"
+
+#: e2fsck/problem.c:85
+msgid "CLEARED"
+msgstr "已清除"
+
+#: e2fsck/problem.c:86
+msgid "RELOCATED"
+msgstr "å·²é‡å®šä½"
+
+#: e2fsck/problem.c:87
+msgid "ALLOCATED"
+msgstr "已分é…"
+
+#: e2fsck/problem.c:88
+msgid "EXPANDED"
+msgstr "已扩充"
+
+#: e2fsck/problem.c:89
+msgid "RECONNECTED"
+msgstr "å·²é‡æ–°è¿žæŽ¥"
+
+#: e2fsck/problem.c:90
+msgid "CREATED"
+msgstr "已创建"
+
+#: e2fsck/problem.c:91
+msgid "SALVAGED"
+msgstr "已抢救"
+
+#: e2fsck/problem.c:92
+msgid "TRUNCATED"
+msgstr "已截断"
+
+#: e2fsck/problem.c:93
+msgid "INODE CLEARED"
+msgstr "INODE 已清除"
+
+#: e2fsck/problem.c:94
+msgid "ABORTED"
+msgstr "已中止"
+
+#: e2fsck/problem.c:95
+msgid "SPLIT"
+msgstr "已分割"
+
+#: e2fsck/problem.c:96
+msgid "CONTINUING"
+msgstr "正在继续"
+
+#: e2fsck/problem.c:97
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "é‡å¤å¼•ç”¨çš„å—已克隆"
+
+#: e2fsck/problem.c:98
+msgid "FILE DELETED"
+msgstr "文件已删除"
+
+#: e2fsck/problem.c:99
+msgid "SUPPRESSED"
+msgstr "å·²ç¦æ­¢æ˜¾ç¤º"
+
+#: e2fsck/problem.c:100
+msgid "UNLINKED"
+msgstr "已解除链接"
+
+#: e2fsck/problem.c:101
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE 索引已清除"
+
+#: e2fsck/problem.c:102
+msgid "WILL RECREATE"
+msgstr "将会é‡å»º"
+
+#: e2fsck/problem.c:103
+msgid "WILL OPTIMIZE"
+msgstr "将会优化"
+
+#: e2fsck/problem.c:104
+msgid "FLAG CLEARED"
+msgstr "标志已清除"
+
+#. @-expanded: block bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:118
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@g %g çš„@b@B并ä¸åœ¨@g中。(@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group. (block %b)\n
+#: e2fsck/problem.c:122
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "@g %g çš„ @i @B并ä¸åœ¨@g中。(@b %b)\n"
+
+#. @-expanded: inode table for group %g is not in group. (block %b)\n
+#. @-expanded: WARNING: SEVERE DATA LOSS POSSIBLE.\n
+#: e2fsck/problem.c:127
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"@g %g çš„ @i 表并ä¸åœ¨@g中。(@b %b)\n"
+"警告:这å¯èƒ½å¯¼è‡´ä¸¥é‡çš„æ•°æ®ä¸¢å¤±ã€‚\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a valid ext2/ext3/ext4\n
+#. @-expanded: filesystem. If the device is valid and it really contains an ext2/ext3/ext4\n
+#. @-expanded: filesystem (and not swap or ufs or something else), then the superblock\n
+#. @-expanded: is corrupt, and you might try running e2fsck with an alternate superblock:\n
+#. @-expanded: e2fsck -b 8193 <device>\n
+#. @-expanded: or\n
+#. @-expanded: e2fsck -b 32768 <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:133
+msgid ""
+"\n"
+"The @S could not be read or does not describe a valid ext2/ext3/ext4\n"
+"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
+"@f (and not swap or ufs or something else), then the @S\n"
+"is corrupt, and you might try running e2fsck with an alternate @S:\n"
+" e2fsck -b 8193 <@v>\n"
+" or\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"@S无法被读å–,或它未能正确地æ述一个有效的 ext2/ext3/ext4 @f。\n"
+"如果@v有效并确实为 ext2/ext3/ext4 @fï¼ˆè€Œéž swap 或 ufs 等格å¼ï¼‰ï¼Œ\n"
+"这说明@Så·²ç»æŸå,您å¯èƒ½éœ€è¦æŒ‡å®šå¤‡é€‰@Sæ¥è¿è¡Œ e2fsck:\n"
+" e2fsck -b 8193 <@v>\n"
+" 或\n"
+" e2fsck -b 32768 <@v>\n"
+"\n"
+
+#. @-expanded: The filesystem size (according to the superblock) is %b blocks\n
+#. @-expanded: The physical size of the device is %c blocks\n
+#. @-expanded: Either the superblock or the partition table is likely to be corrupt!\n
+#: e2fsck/problem.c:144
+msgid ""
+"The @f size (according to the @S) is %b @bs\n"
+"The physical size of the @v is %c @bs\n"
+"Either the @S or the partition table is likely to be corrupt!\n"
+msgstr ""
+"æ ¹æ®@S,@f的大å°åº”为 %b @b\n"
+"但@v的物ç†å¤§å°æ˜¯ %c @b\n"
+"@S或分区表å¯èƒ½å·²ç»æŸåï¼\n"
+
+#. @-expanded: superblock block_size = %b, fragsize = %c.\n
+#. @-expanded: This version of e2fsck does not support fragment sizes different\n
+#. @-expanded: from the block size.\n
+#: e2fsck/problem.c:151
+msgid ""
+"@S @b_size = %b, fragsize = %c.\n"
+"This version of e2fsck does not support fragment sizes different\n"
+"from the @b size.\n"
+msgstr ""
+"@S @bå¤§å° = %b,分å—å¤§å° = %c。\n"
+"此版本的 e2fsck ä¸å…许分å—大å°ä¸Ž\n"
+"@b大å°ä¸åŒã€‚\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:158
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@S æ¯ç»„@bæ•° = %b,应当为 %c。\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:163
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "@S 第一个数æ®å— = %b,应当为 %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:168
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f没有 UUID;正在创建新的 UUID。\n"
+"\n"
+
+#: e2fsck/problem.c:174
+#, no-c-format
+msgid ""
+"Note: if several inode or block bitmap blocks or part\n"
+"of the inode table require relocation, you may wish to try\n"
+"running e2fsck with the '-b %S' option first. The problem\n"
+"may lie only with the primary block group descriptors, and\n"
+"the backup block group descriptors may be OK.\n"
+"\n"
+msgstr ""
+"注æ„:如果有数个 inodeã€å—ä½å›¾å—或 inode 表\n"
+"的一部分需è¦é‡å®šä½ï¼Œæ‚¨å¯ä»¥å…ˆå°è¯•\n"
+"用 \"-b %S\" 选项è¿è¡Œ e2fsck。有å¯èƒ½\n"
+"åªæœ‰ä¸»å—组æ述符有问题,\n"
+"备份å—组æ述符å¯èƒ½æ˜¯æ­£å¸¸çš„。\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock. (%s = %N).\n
+#: e2fsck/problem.c:183
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "在@S中å‘现æŸå。(%s = %N)。\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:189
+#, no-c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "确定物ç†@v的大å°æ—¶å‡ºé”™ï¼š%m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:194
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "@S中的 @i 计数为 %i,@s %j。\n"
+
+#: e2fsck/problem.c:198
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd ä¸æ”¯æŒ filetype 特性。\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:204
+#, no-c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@Så«æœ‰ä¸€ä¸ª@n@j (@i %i)。\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:209
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "外部@jå«æœ‰å¤šä¸ª@f用户(ä¸æ”¯æŒæ­¤ç‰¹æ€§ï¼‰ã€‚\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:214
+msgid "Can't find external @j\n"
+msgstr "无法找到外部@j\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:219
+msgid "External @j has bad @S\n"
+msgstr "外部@jçš„@Så·²æŸå\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:224
+msgid "External @j does not support this @f\n"
+msgstr "外部@jä¸æ”¯æŒæ­¤@f\n"
+
+#. @-expanded: filesystem journal superblock is unknown type %N (unsupported).\n
+#. @-expanded: It is likely that your copy of e2fsck is old and/or doesn't support this journal
+#. @-expanded: format.\n
+#. @-expanded: It is also possible the journal superblock is corrupt.\n
+#: e2fsck/problem.c:229
+msgid ""
+"@f @j @S is unknown type %N (unsupported).\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
+"It is also possible the @j @S is corrupt.\n"
+msgstr ""
+"@f@j@S为未知类型 %N(ä¸æ”¯æŒæ­¤ç±»åž‹ï¼‰ã€‚\n"
+"å¯èƒ½æ‚¨çš„ e2fsck 版本太低且/或ä¸æ”¯æŒè¿™ç§@jæ ¼å¼ã€‚\n"
+"也有å¯èƒ½@j@Så·²ç»æŸå。\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:238
+msgid "@j @S is corrupt.\n"
+msgstr "@j@Så·²æŸå。\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal is present.\n
+#: e2fsck/problem.c:243
+msgid "@S has_@j flag is clear, but a @j is present.\n"
+msgstr "@Sä¸å…·æœ‰ has_journal 标志,但å‘现了@j。\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:248
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "@S被设置了 needs_recovery 标志,但找ä¸åˆ°@j。\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:253
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "@Sä¸å…·æœ‰ needs_recovery 标志,但@j中有数æ®ã€‚\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:258
+msgid "Clear @j"
+msgstr "清除@j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.
+#: e2fsck/problem.c:263 e2fsck/problem.c:799
+msgid "@f has feature flag(s) set, but is a revision 0 @f. "
+msgstr "@f被设置了特性标志,但@f版本为 0。"
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:268
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s@o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:273
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@o @i %i 中å‘现@I%B (%b)。\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:278
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "@o @i %i 中å‘现已清除的%B (%b)。\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:284
+#, no-c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@S中有@I@o @i %i。\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:290
+#, no-c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@o @i 列表中å‘现@I @i %i。\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:295
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "@j@S被设置了未知的åªè¯»ç‰¹æ€§æ ‡å¿—。\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:300
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "@j@S被设置了未知的ä¸å…¼å®¹ç‰¹æ€§æ ‡å¿—。\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:305
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "æ­¤ e2fsck ä¸æ”¯æŒæ­¤@j版本。\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:311
+#, no-c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"å°†@j从 /%s 移动到éšè—çš„ @i。\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+#, no-c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"移动@j时出错:%m\n"
+"\n"
+
+#. @-expanded: Found invalid V2 journal superblock fields (from V1 journal).\n
+#. @-expanded: Clearing fields beyond the V1 journal superblock...\n
+#. @-expanded: \n
+#: e2fsck/problem.c:322
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"在 V1 @j中å‘现@n V2 @j@S区域。\n"
+"正在清除 V1 @j@S以外的区域...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:328
+msgid "Run @j anyway"
+msgstr "ä»ç„¶è¿è¡Œ@j"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:333
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr "备份@S中未设置æ¢å¤æ ‡å¿—,所以ä»ç„¶è¿è¡Œæ—¥å¿—。\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:338
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+"正在备份@j @i @bçš„ä¿¡æ¯ã€‚\n"
+"\n"
+
+#. @-expanded: filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks\n
+#. @-expanded: is %N; should be zero.
+#: e2fsck/problem.c:344
+msgid ""
+"@f does not have resize_@i enabled, but s_reserved_gdt_@bs\n"
+"is %N; @s zero. "
+msgstr ""
+"@f未å¯ç”¨ resize_inode,但 s_reserved_gdt_blocks\n"
+"为 %N;@s 0。"
+
+#. @-expanded: Resize_inode not enabled, but the resize inode is non-zero.
+#: e2fsck/problem.c:350
+msgid "Resize_@i not enabled, but the resize @i is non-zero. "
+msgstr "Resize_@i 未å¯ç”¨ï¼Œä½† resize inode éžé›¶ã€‚"
+
+#. @-expanded: Resize inode not valid.
+#: e2fsck/problem.c:355
+msgid "Resize @i not valid. "
+msgstr "Resize @i 无效。"
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:360
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"@S上一次的挂载时间(%t,\n"
+"\t当å‰ï¼š%T)在未æ¥ã€‚\n"
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:365
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"@S上一次的写入时间(%t,\n"
+"\t当å‰ï¼š%T)在未æ¥ã€‚\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.
+#: e2fsck/problem.c:371
+#, no-c-format
+msgid "@S hint for external superblock @s %X. "
+msgstr "外部超级å—çš„@S标记@s %X。"
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:376
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"正在将 dirhash æ示添加到@f。\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.
+#: e2fsck/problem.c:381
+msgid "@g descriptor %g checksum is %04x, should be %04y. "
+msgstr "@gæ述符 %g 的校验和为 %04x,应当为 %04y。"
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:387
+#, no-c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "@gæ述符 %g 被标记为未åˆå§‹åŒ–,并且没有设定特性。\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.
+#: e2fsck/problem.c:392
+msgid "@g descriptor %g has invalid unused inodes count %b. "
+msgstr "@gæ述符 %g 中的未使用 inode æ•° %b 为无效值。"
+
+#. @-expanded: Last group block bitmap uninitialized.
+#: e2fsck/problem.c:397
+msgid "Last @g @b @B uninitialized. "
+msgstr "最åŽä¸€ä¸ª@g@b@B未åˆå§‹åŒ–。"
+
+#: e2fsck/problem.c:403
+#, no-c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "日志事务 %i æŸå,é‡æ”¾è¿‡ç¨‹å·²ä¸­æ­¢ã€‚\n"
+
+#: e2fsck/problem.c:408
+msgid "The test_fs flag is set (and ext4 is available). "
+msgstr "设置了 test_fs 标志(并且ext4å¯ç”¨ï¼‰ã€‚"
+
+#. @-expanded: superblock last mount time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:413
+msgid ""
+"@S last mount time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"@S上一次挂载时间在未æ¥ã€‚\n"
+"\t(相差ä¸åˆ°ä¸€å¤©ï¼Œå¯èƒ½æ˜¯ç¡¬ä»¶æ—¶é’Ÿè®¾å®šé”™è¯¯æ‰€è‡´ï¼‰\n"
+
+#. @-expanded: superblock last write time is in the future.\n
+#. @-expanded: \t(by less than a day, probably due to the hardware clock being incorrectly
+#. @-expanded: set)\n
+#: e2fsck/problem.c:419
+msgid ""
+"@S last write time is in the future.\n"
+"\t(by less than a day, probably due to the hardware clock being incorrectly set)\n"
+msgstr ""
+"@S上一次写入时间在未æ¥ã€‚\n"
+"\t(相差ä¸åˆ°ä¸€å¤©ï¼Œå¯èƒ½æ˜¯ç¡¬ä»¶æ—¶é’Ÿè®¾å®šé”™è¯¯æ‰€è‡´ï¼‰\n"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.
+#: e2fsck/problem.c:425
+msgid "One or more @b @g descriptor checksums are invalid. "
+msgstr "一个或多个@b@gæ述符的校验和无效。"
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:430
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "设置未使用的 @i 数为 %j(之å‰ä¸º %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:435
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "设置未使用的@b数为 %c(之å‰ä¸º %b)\n"
+
+#. @-expanded: Hiding %U quota inode %i (%Q).\n
+#: e2fsck/problem.c:440
+msgid "Hiding %U @q @i %i (%Q).\n"
+msgstr "éšè— %U @q @i %i (%Q)。\n"
+
+#. @-expanded: superblock has invalid MMP block.
+#: e2fsck/problem.c:445
+msgid "@S has invalid MMP block. "
+msgstr "@Så«æœ‰æ— æ•ˆçš„ MMP å—。"
+
+#. @-expanded: superblock has invalid MMP magic.
+#: e2fsck/problem.c:450
+msgid "@S has invalid MMP magic. "
+msgstr "@Så«æœ‰æ— æ•ˆçš„ MMP 幻数。"
+
+#: e2fsck/problem.c:456
+#, no-c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:462
+#, no-c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: superblock metadata_csum supersedes uninit_bg; both feature bits cannot be set
+#. @-expanded: simultaneously.
+#: e2fsck/problem.c:468
+msgid "@S metadata_csum supersedes uninit_bg; both feature bits cannot be set simultaneously."
+msgstr "@Sçš„ metadata_csum 特性将å–代 uninit_bg 特性,因此ä¸èƒ½åŒæ—¶å°†äºŒè€…å¼€å¯ã€‚"
+
+#. @-expanded: superblock MMP block checksum does not match.
+#: e2fsck/problem.c:474
+msgid "@S MMP @b checksum does not match. "
+msgstr "@S MMP @b校验和ä¸ç¬¦ã€‚"
+
+#. @-expanded: superblock 64bit filesystem needs extents to access the whole disk.
+#: e2fsck/problem.c:479
+msgid "@S 64bit @f needs extents to access the whole disk. "
+msgstr "@S 64 ä½@féœ€è¦ extent æ¥è®¿é—®æ•´ä¸ªç£ç›˜ã€‚"
+
+#: e2fsck/problem.c:484
+msgid "First_meta_bg is too big. (%N, max value %g). "
+msgstr "first_meta_bg 太大。(%N,最大值 %g)。"
+
+#. @-expanded: External journal superblock checksum does not match superblock.
+#: e2fsck/problem.c:489
+msgid "External @j @S checksum does not match @S. "
+msgstr "外部@j@S校验和与@Sä¸ç¬¦ã€‚"
+
+#. @-expanded: superblock metadata_csum_seed is not necessary without metadata_csum.
+#: e2fsck/problem.c:494
+msgid "@S metadata_csum_seed is not necessary without metadata_csum."
+msgstr "åªæœ‰åŒæ—¶å¼€å¯äº†@Sçš„ metadata_csum 特性,metadata_csum_seed 特性æ‰æœ‰æ„义。"
+
+#: e2fsck/problem.c:500
+#, no-c-format
+msgid "Error initializing quota context in support library: %m\n"
+msgstr "åˆå§‹åŒ–支æŒåº“中的é…é¢ä¸Šä¸‹æ–‡æ—¶å‡ºé”™ï¼š%m\n"
+
+#. @-expanded: Bad required extra isize in superblock (%N).
+#: e2fsck/problem.c:505
+msgid "Bad required extra isize in @S (%N). "
+msgstr "@S (%N) 中的 required extra isize 有误。"
+
+#. @-expanded: Bad desired extra isize in superblock (%N).
+#: e2fsck/problem.c:510
+msgid "Bad desired extra isize in @S (%N). "
+msgstr "@S (%N) 中的 desired extra isize 有误。"
+
+#. @-expanded: Invalid %U quota inode %i.
+#: e2fsck/problem.c:515
+msgid "Invalid %U @q @i %i. "
+msgstr "无效的 %U @q @i %i。"
+
+#. @-expanded: superblock would have too many inodes (%N).\n
+#: e2fsck/problem.c:520
+msgid "@S would have too many inodes (%N).\n"
+msgstr "@S å°†å«æœ‰è¿‡å¤š inode (%N)。\n"
+
+#. @-expanded: Resize_inode and meta_bg features are enabled. Those features are\n
+#. @-expanded: not compatible. Resize inode should be disabled.
+#: e2fsck/problem.c:525
+msgid ""
+"Resize_@i and meta_bg features are enabled. Those features are\n"
+"not compatible. Resize @i should be disabled. "
+msgstr ""
+"resize_@i å’Œ meta_bg 特性å‡è¢«å¯ç”¨ã€‚这两个特性\n"
+"ä¸å…¼å®¹ã€‚resize @i 应当被ç¦ç”¨ã€‚"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:533
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "第 1 é:检查 @iã€@b,和大å°\n"
+
+#. @-expanded: root inode is not a directory.
+#: e2fsck/problem.c:537
+msgid "@r is not a @d. "
+msgstr "@r ä¸æ˜¯ä¸€ä¸ª@d。"
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).
+#: e2fsck/problem.c:542
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "@r 被设置了删除时间(å¯èƒ½ç”±è€ç‰ˆæœ¬çš„ mke2fs 导致)。"
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.
+#: e2fsck/problem.c:547
+msgid "Reserved @i %i (%Q) has @n mode. "
+msgstr "ä¿ç•™çš„ @i %i (%Q) 的模å¼æ— æ•ˆã€‚"
+
+#. @-expanded: deleted inode %i has zero dtime.
+#: e2fsck/problem.c:553
+#, no-c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "@D @i %i 的删除时间为零。"
+
+#. @-expanded: inode %i is in use, but has dtime set.
+#: e2fsck/problem.c:559
+#, no-c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "@i %i 正在使用,但被设置了删除时间。"
+
+#. @-expanded: inode %i is a zero-length directory.
+#: e2fsck/problem.c:565
+#, no-c-format
+msgid "@i %i is a @z @d. "
+msgstr "@i %i 是一个@z@d。"
+
+#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:570
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "ä½äºŽ %b çš„@g %gçš„@b@B@C。\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:575
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "ä½äºŽ %b çš„@g %gçš„ @i @B@C。\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:580
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "ä½äºŽ %b çš„@g %gçš„ @i 表@C。\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.
+#: e2fsck/problem.c:585
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "@g %g 的@b@B (%b) 无效。"
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.
+#: e2fsck/problem.c:590
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "@g %g 的 @i @B (%b) 无效。"
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.
+#: e2fsck/problem.c:595
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i 的 i_size 为 %Is,@s %N。"
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.
+#: e2fsck/problem.c:600
+msgid "@i %i, i_@bs is %Ib, @s %N. "
+msgstr "@i %i 的 i_blocks 为 %Ib,@s %N。"
+
+#. @-expanded: illegal %B (%b) in inode %i.
+#: e2fsck/problem.c:605
+msgid "@I %B (%b) in @i %i. "
+msgstr "@i %i çš„%B (%b) éžæ³•ã€‚"
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.
+#: e2fsck/problem.c:610
+msgid "%B (%b) overlaps @f metadata in @i %i. "
+msgstr "%B (%b) 与 @i %i 中的@f元数æ®é‡å ã€‚"
+
+#. @-expanded: inode %i has illegal block(s).
+#: e2fsck/problem.c:616
+#, no-c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "@i %i 中包å«éžæ³•@b。"
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:622
+#, no-c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "@i %i 中包å«äº†è¿‡å¤šçš„éžæ³•@b。\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.
+#: e2fsck/problem.c:627
+msgid "@I %B (%b) in bad @b @i. "
+msgstr "å@b @i 中的%B (%b) éžæ³•ã€‚"
+
+#. @-expanded: Bad block inode has illegal block(s).
+#: e2fsck/problem.c:632
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "å@b @i å«æœ‰éžæ³•çš„@b。"
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:637
+msgid "Duplicate or bad @b in use!\n"
+msgstr "使用了é‡å¤@b或å@bï¼\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.
+#: e2fsck/problem.c:642
+msgid "Bad @b %b used as bad @b @i indirect @b. "
+msgstr "å@b %b 被用作å@b @i 间接@b。"
+
+#. @-expanded: \n
+#. @-expanded: The bad block inode has probably been corrupted. You probably\n
+#. @-expanded: should stop now and run e2fsck -c to scan for bad blocks\n
+#. @-expanded: in the filesystem.\n
+#: e2fsck/problem.c:647
+msgid ""
+"\n"
+"The bad @b @i has probably been corrupted. You probably\n"
+"should stop now and run e2fsck -c to scan for bad blocks\n"
+"in the @f.\n"
+msgstr ""
+"\n"
+"å@b @i å¯èƒ½å·²ç»æŸå。你å¯èƒ½éœ€è¦ç«‹åˆ»åœæ­¢æ‰§è¡Œæ­¤ä»»åŠ¡ï¼Œ\n"
+"并è¿è¡Œ e2fsck -c æ¥æ‰«æ@f中的åå—。\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:654
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"如果该@b确实为å@b,则文件系统将无法被修å¤ã€‚\n"
+
+#. @-expanded: You can remove this block from the bad block list and hope\n
+#. @-expanded: that the block is really OK. But there are no guarantees.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:659
+msgid ""
+"You can remove this @b from the bad @b list and hope\n"
+"that the @b is really OK. But there are no guarantees.\n"
+"\n"
+msgstr ""
+"ä½ å¯ä»¥å°†è¯¥@b从å@b列表中移除,并指望\n"
+"该@b实际上是正常的。但是没有任何ä¿è¯ã€‚\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:665
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "主@S (%b) ä½äºŽå@b列表中。\n"
+
+#. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
+#: e2fsck/problem.c:670
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "主@gæè¿°ç¬¦ä¸­çš„å— %b ä½äºŽå@b列表中\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:676
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "警告:组 %g çš„@S (%b) 为åå—。\n"
+
+#. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
+#: e2fsck/problem.c:682
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "警告:组 %g çš„@gæ述符的备份å«æœ‰ä¸€ä¸ªå@b (%b)。\n"
+
+#. @-expanded: Programming error? block #%b claimed for no reason in process_bad_block.\n
+#: e2fsck/problem.c:688
+msgid "Programming error? @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "程åºé”™è¯¯ï¼Ÿ@b #%b 在 process_bad_block 中被毫无ç†ç”±åœ°å¼•ç”¨äº†ã€‚\n"
+
+#. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
+#: e2fsck/problem.c:694
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "在@b@g %g 中为 %s åˆ†é… %N 个连续的@b时出错:%m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:700
+#, no-c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "é‡å®šä½ %s 时分é…@b缓冲区时出错\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:705
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "正在将@g %g çš„ %s 从 %b é‡å®šä½è‡³ %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:711
+#, no-c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "正在将@g %g çš„ %s é‡å®šä½è‡³ %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:716
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "警告:无法从 %s 中读å–@b %b:%m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:721
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "è­¦å‘Šï¼šæ— æ³•å‘ %s 中写入@b %b:%m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:726 e2fsck/problem.c:1936
+msgid "@A @i @B (%N): %m\n"
+msgstr "åˆ†é… @i @B (%N) 时出错:%m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:731
+msgid "@A @b @B (%N): %m\n"
+msgstr "分é…@b@B (%N) 时出错:%m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:737
+#, no-c-format
+msgid "@A icount link information: %m\n"
+msgstr "åˆ†é… icount 链接信æ¯æ—¶å‡ºé”™ï¼š%m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:743
+#, no-c-format
+msgid "@A @d @b array: %m\n"
+msgstr "分é…@d@b数组时出错:%m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:749
+#, no-c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "扫æ @i (%i) 时出错:%m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:755
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "迭代 @i %i 中的@b时出错:%m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:760
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "写入 @i 计数信æ¯æ—¶å‡ºé”™ï¼ˆ@i=%i,计数=%N):%m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:765
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "写入@d@bä¿¡æ¯æ—¶å‡ºé”™ï¼ˆ@i=%i,@b=%b,num=%N):%m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:772
+#, no-c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "è¯»å– @i %i 时出错:%m\n"
+
+#. @-expanded: inode %i has imagic flag set.
+#: e2fsck/problem.c:781
+#, no-c-format
+msgid "@i %i has imagic flag set. "
+msgstr "@i %i 被设置了 imagic 标志。"
+
+#. @-expanded: Special (device/socket/fifo/symlink) file (inode %i) has immutable\n
+#. @-expanded: or append-only flag set.
+#: e2fsck/problem.c:787
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+"特殊(@v/套接字/队列/符å·é“¾æŽ¥ï¼‰æ–‡ä»¶ (@i %i) 被设置了\n"
+"immutable 或 append-only 标志。"
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.
+#: e2fsck/problem.c:794
+#, no-c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size. "
+msgstr "特殊(@v/套接字/队列)@i %i 的大å°éžé›¶ã€‚"
+
+#. @-expanded: journal inode is not in use, but contains data.
+#: e2fsck/problem.c:804
+msgid "@j @i is not in use, but contains data. "
+msgstr "@j @i 未被使用,但å«æœ‰æ•°æ®ã€‚"
+
+#. @-expanded: journal is not regular file.
+#: e2fsck/problem.c:809
+msgid "@j is not regular file. "
+msgstr "@jä¸æ˜¯æ™®é€šæ–‡ä»¶ã€‚"
+
+#. @-expanded: inode %i was part of the orphaned inode list.
+#: e2fsck/problem.c:815
+#, no-c-format
+msgid "@i %i was part of the @o @i list. "
+msgstr "@i %i ä½äºŽ@o @i 列表中。"
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.
+#: e2fsck/problem.c:821
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr "å‘现了曾属于æŸå的孤立链表的 @i。"
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:826
+msgid "@A refcount structure (%N): %m\n"
+msgstr "åˆ†é… refcount 结构体 (%N) 时出错:%m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.
+#: e2fsck/problem.c:831
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "è¯»å– @i %i çš„@a@b %b 时出错。"
+
+#. @-expanded: inode %i has a bad extended attribute block %b.
+#: e2fsck/problem.c:836
+msgid "@i %i has a bad @a @b %b. "
+msgstr "@i %i 有一个æŸåçš„@a@b %b。"
+
+#. @-expanded: Error reading extended attribute block %b (%m).
+#: e2fsck/problem.c:841
+msgid "Error reading @a @b %b (%m). "
+msgstr "读å–@a@b %b 时出错(%m)。"
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.
+#: e2fsck/problem.c:846
+msgid "@a @b %b has reference count %r, @s %N. "
+msgstr "@a@b %b 的引用计数为 %r,@s %N。"
+
+#. @-expanded: Error writing extended attribute block %b (%m).
+#: e2fsck/problem.c:851
+msgid "Error writing @a @b %b (%m). "
+msgstr "写入@a@b %b 时出错(%m)。"
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.
+#: e2fsck/problem.c:856
+msgid "@a @b %b has h_@bs > 1. "
+msgstr "@a@b %b 的 h_blocks > 1。"
+
+#. @-expanded: error allocating extended attribute region allocation structure.
+#: e2fsck/problem.c:861
+msgid "@A @a region allocation structure. "
+msgstr "分é…扩展属性区域的分é…结构体时出错。"
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).
+#: e2fsck/problem.c:866
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "@a@b %b å·²æŸå(分é…冲çªï¼‰ã€‚"
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).
+#: e2fsck/problem.c:871
+msgid "@a @b %b is corrupt (@n name). "
+msgstr "@a@b %b å·²æŸå(@nå称)。"
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).
+#: e2fsck/problem.c:876
+msgid "@a @b %b is corrupt (@n value). "
+msgstr "@a@b %b å·²æŸå(@n值)。"
+
+#. @-expanded: inode %i is too big.
+#: e2fsck/problem.c:882
+#, no-c-format
+msgid "@i %i is too big. "
+msgstr "@i %i 过大。"
+
+#. @-expanded: %B (%b) causes directory to be too big.
+#: e2fsck/problem.c:886
+msgid "%B (%b) causes @d to be too big. "
+msgstr "%B (%b) 造æˆ@d过大。"
+
+#: e2fsck/problem.c:891
+msgid "%B (%b) causes file to be too big. "
+msgstr "%B (%b) 造æˆæ–‡ä»¶è¿‡å¤§ã€‚"
+
+#: e2fsck/problem.c:896
+msgid "%B (%b) causes symlink to be too big. "
+msgstr "%B (%b) 造æˆç¬¦å·é“¾æŽ¥è¿‡å¤§ã€‚"
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:902
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "@i %i 被设置了 INDEX_FL 标志,但文件系统ä¸æ”¯æŒ htree。\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:908
+#, no-c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "@i %i 被设置了 INDEX_FL 标志,但它并éžç›®å½•ã€‚\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:914
+#, no-c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "@h %i 有一个@n根节点。\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:919
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %i 有一个ä¸å—支æŒçš„ hash 版本 (%N)\n"
+
+#. @-expanded: HTREE directory inode %i uses an incompatible htree root node flag.\n
+#: e2fsck/problem.c:925
+#, no-c-format
+msgid "@h %i uses an incompatible htree root node flag.\n"
+msgstr "@h %i 使用了一个ä¸å…¼å®¹çš„ htree 根节点标志。\n"
+
+#. @-expanded: HTREE directory inode %i has a tree depth (%N) which is too big\n
+#: e2fsck/problem.c:930
+msgid "@h %i has a tree depth (%N) which is too big\n"
+msgstr "@h %i 的树深度过大 (%N)\n"
+
+#. @-expanded: Bad block inode has an indirect block (%b) that conflicts with\n
+#. @-expanded: filesystem metadata.
+#: e2fsck/problem.c:936
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata. "
+msgstr "å@b @i å«æœ‰ä¸€ä¸ªä¸Ž@f元数æ®å†²çªçš„间接@b (%b)。"
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:943
+#, no-c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "(é‡æ–°ï¼‰åˆ›å»º resize @i 失败:%m。"
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:948
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "@i %i 有一个é¢å¤–çš„å¤§å° %IS(@n值)\n"
+
+#. @-expanded: extended attribute in inode %i has a namelen (%N) which is invalid\n
+#: e2fsck/problem.c:953
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "@i %i 中的@aå«æœ‰ä¸€ä¸ªæ— æ•ˆçš„ namelen (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a value offset (%N) which is invalid\n
+#: e2fsck/problem.c:958
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "@i %i 中的@aå«æœ‰ä¸€ä¸ªæ— æ•ˆçš„å移é‡å€¼ (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a value block (%N) which is invalid (must be 0)\n
+#: e2fsck/problem.c:963
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "@i %i 中的@aå«æœ‰ä¸€ä¸ªæ— æ•ˆçš„å—值 (%N),应当为 0\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:968
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "@i %i 中的@aå«æœ‰ä¸€ä¸ªæ— æ•ˆçš„大å°å€¼ (%N)\n"
+
+#. @-expanded: extended attribute in inode %i has a hash (%N) which is invalid\n
+#: e2fsck/problem.c:973
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "@i %i 中的@aå«æœ‰ä¸€ä¸ªæ— æ•ˆçš„ hash (%N)\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:978
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "@i %i 是一个 %It,但它看起æ¥å®žé™…是一个目录。\n"
+
+#. @-expanded: Error while reading over extent tree in inode %i: %m\n
+#: e2fsck/problem.c:984
+#, no-c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "è¯»å– @i %i 中的 @x 树时出错:%m\n"
+
+#. @-expanded: Failed to iterate extents in inode %i\n
+#. @-expanded: \t(op %s, blk %b, lblk %c): %m\n
+#: e2fsck/problem.c:989
+msgid ""
+"Failed to iterate extents in @i %i\n"
+"\t(op %s, blk %b, lblk %c): %m\n"
+msgstr ""
+"迭代 @i %i 中的 extent 失败\n"
+"\t(op %s, blk %b, lblk %c):%m\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:995
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i 有一个@n extent\n"
+"\t(逻辑@b %c,@n物ç†@b %b,长度 %N)\n"
+
+#. @-expanded: inode %i has an invalid extent\n
+#. @-expanded: \t(logical block %c, physical block %b, invalid len %N)\n
+#: e2fsck/problem.c:1000
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"@i %i 有一个@n extent\n"
+"\t(逻辑@b %c,物ç†@b %b,@n长度 %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:1006
+#, no-c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "@i %i 被设置了 EXTENTS_FL 标志,但文件系统ä¸æ”¯æŒ extent。\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:1012
+#, no-c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "@i %i 为 extent æ ¼å¼ï¼Œä½†@Sä¸å…·æœ‰ EXTENTS 特性\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:1018
+#, no-c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "@i %i ä¸å…·æœ‰ EXTENT_FL 标志,但å´ä¸º extents æ ¼å¼\n"
+
+#: e2fsck/problem.c:1024
+#, no-c-format
+msgid "Fast symlink %i has EXTENT_FL set. "
+msgstr "快速符å·é“¾æŽ¥ %i 被设置了 EXTENT_FL 标志。"
+
+#. @-expanded: inode %i has out of order extents\n
+#. @-expanded: \t(invalid logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1029
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i å«æœ‰ä¹±åºçš„ extent\n"
+"\t(@n逻辑@b %c,物ç†@b %b,长度 %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:1033
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "@i %i 是一个无效的 extent 节点 (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:1039
+#, no-c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "转æ¢å­ç°‡çš„@b@B时出错:%m\n"
+
+#. @-expanded: quota inode is not a regular file.
+#: e2fsck/problem.c:1044
+msgid "@q @i is not a regular file. "
+msgstr "@q @i ä¸æ˜¯æ™®é€šæ–‡ä»¶ã€‚"
+
+#. @-expanded: quota inode is not in use, but contains data.
+#: e2fsck/problem.c:1049
+msgid "@q @i is not in use, but contains data. "
+msgstr "@q @i 未被使用,但å«æœ‰æ•°æ®ã€‚"
+
+#. @-expanded: quota inode is visible to the user.
+#: e2fsck/problem.c:1054
+msgid "@q @i is visible to the user. "
+msgstr "@q @i 对用户å¯è§ã€‚"
+
+#. @-expanded: The bad block inode looks invalid.
+#: e2fsck/problem.c:1059
+msgid "The bad @b @i looks @n. "
+msgstr "å@b @i 似乎是@n。"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:1064
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"@i %i å«æœ‰é›¶é•¿åº¦çš„ extent\n"
+"\t(@n逻辑@b %c,物ç†@b %b)\n"
+
+#. @-expanded: inode %i seems to contain garbage.
+#: e2fsck/problem.c:1070
+#, no-c-format
+msgid "@i %i seems to contain garbage. "
+msgstr "@i %i 似乎å«æœ‰æ— æ•ˆæ•°æ®ã€‚"
+
+#. @-expanded: inode %i passes checks, but checksum does not match inode.
+#: e2fsck/problem.c:1076
+#, no-c-format
+msgid "@i %i passes checks, but checksum does not match @i. "
+msgstr "@i %i 通过检验,但其校验和与 @i ä¸ç¬¦ã€‚"
+
+#. @-expanded: inode %i extended attribute is corrupt (allocation collision).
+#: e2fsck/problem.c:1082
+#, no-c-format
+msgid "@i %i @a is corrupt (allocation collision). "
+msgstr "@i %i @aå·²æŸå(分é…冲çªï¼‰ã€‚"
+
+#. @-expanded: inode %i extent block passes checks, but checksum does not match extent\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1090
+msgid ""
+"@i %i extent block passes checks, but checksum does not match extent\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i extent å—通过了检查,但其校验和与 extent ä¸ç¬¦\n"
+"\t(逻辑@b %c,物ç†@b %b,长度 %N)\n"
+
+#. @-expanded: inode %i extended attribute block %b passes checks, but checksum does not match block.
+#: e2fsck/problem.c:1099
+msgid "@i %i @a @b %b passes checks, but checksum does not match @b. "
+msgstr "@i %i çš„@a@b %b 通过了检查,但其校验和与@bä¸ç¬¦ã€‚"
+
+#. @-expanded: Interior extent node level %N of inode %i:\n
+#. @-expanded: Logical start %b does not match logical start %c at next level.
+#: e2fsck/problem.c:1104
+msgid ""
+"Interior @x node level %N of @i %i:\n"
+"Logical start %b does not match logical start %c at next level. "
+msgstr ""
+"@i %i çš„å­ @x 节点第 %N 层:\n"
+"逻辑起始ä½ç‚¹ %b 与下一层的逻辑起始ä½ç‚¹ %c ä¸åŒ¹é…。"
+
+#. @-expanded: inode %i, end of extent exceeds allowed value\n
+#. @-expanded: \t(logical block %c, physical block %b, len %N)\n
+#: e2fsck/problem.c:1110
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i,extent 的尾部超出了å…许的值\n"
+"\t(逻辑@b %c,物ç†@b %b,长度 %N)\n"
+
+#. @-expanded: inode %i has inline data, but superblock is missing INLINE_DATA feature\n
+#: e2fsck/problem.c:1116
+#, no-c-format
+msgid "@i %i has inline data, but @S is missing INLINE_DATA feature\n"
+msgstr "@i %i å«æœ‰å†…è”æ•°æ®ï¼Œä½†@Sä¸å…·æœ‰ INLINE_DATA 特性\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag on filesystem without inline data support.\n
+#: e2fsck/problem.c:1122
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag on @f without inline data support.\n"
+msgstr "@i %i 被设置了 INLINE_DATA_FL 标志,但文件系统ä¸æ”¯æŒå†…è”æ•°æ®ã€‚\n"
+
+#. @-expanded: inode %i block %b conflicts with critical metadata, skipping block checks.\n
+#: e2fsck/problem.c:1130
+#, no-c-format
+msgid "@i %i block %b conflicts with critical metadata, skipping block checks.\n"
+msgstr "@i %i å— %b 与关键元数æ®å†²çªï¼Œè·³è¿‡å¯¹å—的检查。\n"
+
+#. @-expanded: directory inode %i block %b should be at block %c.
+#: e2fsck/problem.c:1135
+msgid "@d @i %i @b %b should be at @b %c. "
+msgstr "@d @i %i @b %b 应当ä½äºŽ@b %c。"
+
+#. @-expanded: directory inode %i has extent marked uninitialized at block %c.
+#: e2fsck/problem.c:1141
+#, no-c-format
+msgid "@d @i %i has @x marked uninitialized at @b %c. "
+msgstr "@d @i %i å«æœ‰è¢«æ ‡è®°ä¸ºæœªåˆå§‹åŒ–çš„ @x,ä½äºŽ@b %c。"
+
+#. @-expanded: inode %i logical block %b (physical block %c) violates cluster allocation rules.\n
+#. @-expanded: Will fix in pass 1B.\n
+#: e2fsck/problem.c:1146
+msgid ""
+"@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\n"
+"Will fix in pass 1B.\n"
+msgstr ""
+"@i %i 逻辑@b %b(物ç†@b %c)è¿å了簇分é…规则。\n"
+"将会在第 1B é中进行修å¤ã€‚\n"
+
+#. @-expanded: inode %i has INLINE_DATA_FL flag but extended attribute not found.
+#: e2fsck/problem.c:1152
+#, no-c-format
+msgid "@i %i has INLINE_DATA_FL flag but @a not found. "
+msgstr "@i %i 被设置了 INDEX_DATA_FL 标志,但找ä¸åˆ°ç›¸åº”çš„@a。"
+
+#. @-expanded: Special (device/socket/fifo) file (inode %i) has extents\n
+#. @-expanded: or inline-data flag set.
+#: e2fsck/problem.c:1159
+#, no-c-format
+msgid ""
+"Special (@v/socket/fifo) file (@i %i) has extents\n"
+"or inline-data flag set. "
+msgstr ""
+"特殊(@v/套接字/队列)文件 (@i %i) 被设置了\n"
+"extents 或 inline-data 标志。"
+
+#. @-expanded: inode %i has extent header but inline data flag is set.\n
+#: e2fsck/problem.c:1166
+#, no-c-format
+msgid "@i %i has @x header but inline data flag is set.\n"
+msgstr "@i %i å«æœ‰ @x 头部,但被设置了 inline-data 标志。\n"
+
+#. @-expanded: inode %i seems to have inline data but extent flag is set.\n
+#: e2fsck/problem.c:1172
+#, no-c-format
+msgid "@i %i seems to have inline data but @x flag is set.\n"
+msgstr "@i %i 似乎å«æœ‰å†…è”æ•°æ®ï¼Œä½†è¢«è®¾ç½®äº† @x 标志。\n"
+
+#. @-expanded: inode %i seems to have block map but inline data and extent flags set.\n
+#: e2fsck/problem.c:1178
+#, no-c-format
+msgid "@i %i seems to have @b map but inline data and @x flags set.\n"
+msgstr "@i %i 似乎å«æœ‰@b映射,但被设置了 inline-data 标志和 @x 标志。\n"
+
+#. @-expanded: inode %i has inline data and extent flags set but i_block contains junk.\n
+#: e2fsck/problem.c:1184
+#, no-c-format
+msgid "@i %i has inline data and @x flags set but i_block contains junk.\n"
+msgstr "@i %i å«æœ‰å†…è”æ•°æ®ä¸”被设置了 @x 标志,但 i_block 中å«æœ‰æ— æ•ˆæ•°æ®ã€‚\n"
+
+#. @-expanded: Bad block list says the bad block list inode is bad.
+#: e2fsck/problem.c:1189
+msgid "Bad block list says the bad block list @i is bad. "
+msgstr "åå—列表中的数æ®è¡¨æ˜Žï¼Œåå—列表 @i å·²æŸå。"
+
+#. @-expanded: error allocating extent region allocation structure.
+#: e2fsck/problem.c:1194
+msgid "@A @x region allocation structure. "
+msgstr "åˆ†é… extent 区域的分é…结构体时出错。"
+
+#. @-expanded: inode %i has a duplicate extent mapping\n
+#. @-expanded: \t(logical block %c, invalid physical block %b, len %N)\n
+#: e2fsck/problem.c:1199
+msgid ""
+"@i %i has a duplicate @x mapping\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i å«æœ‰é‡å¤çš„ @x 映射\n"
+"\tï¼ˆé€»è¾‘å— %c,@n物ç†å— %b,长度 %N)\n"
+
+#. @-expanded: error allocating %N bytes of memory for encrypted inode list\n
+#: e2fsck/problem.c:1204
+msgid "@A %N bytes of memory for encrypted @i list\n"
+msgstr "为加密 @i åˆ—è¡¨åˆ†é… %N 字节内存时出错\n"
+
+#. @-expanded: inode %i extent tree could be more shallow (%b; could be <= %c)\n
+#: e2fsck/problem.c:1209
+msgid "@i %i @x tree could be more shallow (%b; could be <= %c)\n"
+msgstr "@i %i @x 树的深度å¯ä»¥æ›´å°ï¼ˆ%bï¼›å¯ä»¥ <= %c)\n"
+
+#. @-expanded: inode %i on bigalloc filesystem cannot be block mapped.
+#: e2fsck/problem.c:1215
+#, no-c-format
+msgid "@i %i on bigalloc @f cannot be @b mapped. "
+msgstr "ä½äºŽ bigalloc @f çš„ @i %i 无法被@b映射。"
+
+#. @-expanded: inode %i has corrupt extent header.
+#: e2fsck/problem.c:1221
+#, no-c-format
+msgid "@i %i has corrupt @x header. "
+msgstr "@i %i å«æœ‰æŸåçš„ @x 头部。"
+
+#. @-expanded: Timestamp(s) on inode %i beyond 2310-04-04 are likely pre-1970.\n
+#: e2fsck/problem.c:1227
+#, no-c-format
+msgid "Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"
+msgstr "@i %i 的时间戳超过了 2310-04-04,å¯èƒ½åº”为 1970 年之å‰ã€‚\n"
+
+#. @-expanded: inode %i has illegal extended attribute value inode %N.\n
+#: e2fsck/problem.c:1232
+msgid "@i %i has @I @a value @i %N.\n"
+msgstr "@i %i 有一个@I@a值 @i %N。\n"
+
+#. @-expanded: inode %i has invalid extended attribute. EA inode %N missing EA_INODE flag.\n
+#: e2fsck/problem.c:1238
+msgid "@i %i has @n @a. EA @i %N missing EA_INODE flag.\n"
+msgstr "@i %i å«æœ‰@n@a。EA @i %N 缺少 EA_INODE 标志。\n"
+
+#. @-expanded: EA inode %N for parent inode %i missing EA_INODE flag.\n
+#. @-expanded:
+#: e2fsck/problem.c:1243
+msgid ""
+"EA @i %N for parent @i %i missing EA_INODE flag.\n"
+" "
+msgstr ""
+"用于父 @i %i 的 EA @i %N 缺少 EA_INODE 标志。\n"
+" "
+
+#. @-expanded: inode %i has extent marked uninitialized at block %c (len %N).
+#: e2fsck/problem.c:1249
+#, no-c-format
+msgid "@i %i has @x marked uninitialized at @b %c (len %N). "
+msgstr "@i %i å«æœ‰è¢«æ ‡è®°ä¸ºæœªåˆå§‹åŒ–çš„ @x,ä½äºŽ@b %c(长度 %N)。"
+
+#. @-expanded: inode %i has the casefold flag set but is not a directory.
+#: e2fsck/problem.c:1254
+#, c-format
+msgid "@i %i has the casefold flag set but is not a directory. "
+msgstr "@i %i 被设置了 casefold 标志,但它并éžç›®å½•ã€‚"
+
+#. @-expanded: directory %p has the casefold flag, but the\n
+#. @-expanded: casefold feature is not enabled.
+#: e2fsck/problem.c:1259
+#, c-format
+msgid ""
+"@d %p has the casefold flag, but the\n"
+"casefold feature is not enabled. "
+msgstr ""
+"@d %p 被设置了 casefold 标志,但\n"
+"casefold 特性未å¯ç”¨ã€‚"
+
+#. @-expanded: inode %i has encrypt flag but no encryption extended attribute.\n
+#: e2fsck/problem.c:1264
+#, c-format
+msgid "@i %i has encrypt flag but no encryption @a.\n"
+msgstr "@i %i 被设置了加密标志,但没有加密@a。\n"
+
+#. @-expanded: Encrypted inode %i has corrupt encryption extended attribute.\n
+#: e2fsck/problem.c:1269
+#, c-format
+msgid "Encrypted @i %i has corrupt encryption @a.\n"
+msgstr "加密的 @i %i 的加密@aå·²æŸå。\n"
+
+#. @-expanded: HTREE directory inode %i uses hash version (%N), but should use SipHash (6) \n
+#: e2fsck/problem.c:1274
+msgid "@h %i uses hash version (%N), but should use SipHash (6) \n"
+msgstr "@h %i 使用了 hash 版本 (%N),但应当使用 SipHash (6)\n"
+
+#. @-expanded: HTREE directory inode %i uses SipHash, but should not.
+#: e2fsck/problem.c:1279
+#, c-format
+msgid "@h %i uses SipHash, but should not. "
+msgstr "@h %i 使用了 SipHash,但ä¸åº”当使用。"
+
+#. @-expanded: \n
+#. @-expanded: Running additional passes to resolve blocks claimed by more than one inode...\n
+#. @-expanded: Pass 1B: Rescanning for multiply-claimed blocks\n
+#: e2fsck/problem.c:1287
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"执行é¢å¤–çš„éæ•°æ¥å¤„ç†è¢«å¤šä¸ª @i 引用的@b...\n"
+"第 1B é:é‡æ–°æ‰«æ@m@b\n"
+
+#. @-expanded: multiply-claimed block(s) in inode %i:
+#: e2fsck/problem.c:1294
+#, no-c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@m@bä½äºŽ @i %i:"
+
+#: e2fsck/problem.c:1310
+#, no-c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "扫æ inode (%i) 时出错:%m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:1316
+#, no-c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "åˆ†é… @i @B时出错 (inode_dup_map):%m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:1322
+#, no-c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "迭代 @i %i (%s) 中的@b时出错:%m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:1327 e2fsck/problem.c:1707
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "为@a@b %b (@i %i) 调整引用计数时出错:%m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:1337
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "第 1C é:扫æ目录以寻找å«æœ‰@m@bçš„ @i\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1343
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "第 1D é:修å¤@m@b\n"
+
+#. @-expanded: File %Q (inode #%i, mod time %IM) \n
+#. @-expanded: has %r multiply-claimed block(s), shared with %N file(s):\n
+#: e2fsck/problem.c:1348
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"文件 %Q(@i #%i,修改时间 %IM)\n"
+"与 %N 个文件共享 %r 个@m@b\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1354
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q(@i #%i,修改时间 %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1359
+msgid "\t<@f metadata>\n"
+msgstr "\t<@f元数æ®>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1364
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(共有 %N 个 @i å«æœ‰@m@b。)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1369
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@m@b已被é‡æ–°åˆ†é…或克隆。\n"
+"\n"
+
+#: e2fsck/problem.c:1383
+#, no-c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "无法克隆文件:%m\n"
+
+#. @-expanded: Pass 1E: Optimizing extent trees\n
+#: e2fsck/problem.c:1389
+msgid "Pass 1E: Optimizing @x trees\n"
+msgstr "第 1E é:优化 @x æ ‘\n"
+
+#. @-expanded: Failed to optimize extent tree %p (%i): %m\n
+#: e2fsck/problem.c:1395
+#, no-c-format
+msgid "Failed to optimize @x tree %p (%i): %m\n"
+msgstr "优化 @x 树 %p (%i) 失败:%m\n"
+
+#. @-expanded: Optimizing extent trees:
+#: e2fsck/problem.c:1400
+msgid "Optimizing @x trees: "
+msgstr "优化 @x 树:"
+
+#: e2fsck/problem.c:1415
+msgid "Internal error: max extent tree depth too large (%b; expected=%c).\n"
+msgstr "内部错误:extent 树的最大深度过大(%b;应为 %c)。\n"
+
+#. @-expanded: inode %i extent tree (at level %b) could be shorter.
+#: e2fsck/problem.c:1420
+msgid "@i %i @x tree (at level %b) could be shorter. "
+msgstr "@i %i çš„ @x 树(ä½äºŽç¬¬ %b 层)的深度å¯ä»¥æ›´å°ã€‚"
+
+#. @-expanded: inode %i extent tree (at level %b) could be narrower.
+#: e2fsck/problem.c:1425
+msgid "@i %i @x tree (at level %b) could be narrower. "
+msgstr "@i %i çš„ @x 树(ä½äºŽç¬¬ %b 层)å¯ä»¥æ›´çª„。"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1432
+msgid "Pass 2: Checking @d structure\n"
+msgstr "第 2 é:检查目录结构\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1438
+#, no-c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "@d @i %i 中 \".\" çš„ @i ç¼–å·æ— æ•ˆã€‚\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1443
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E å«æœ‰@n @i ç¼–å·ï¼š%Di。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.
+#: e2fsck/problem.c:1448
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E å«æœ‰@D或未使用的 @i %Di。"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'
+#: e2fsck/problem.c:1453
+msgid "@E @L to '.' "
+msgstr "@E æ˜¯ä¸€ä¸ªæŒ‡å‘ \".\" 的链接 "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1458
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E 指å‘ä½äºŽå@bçš„ @i (%Di)。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1463
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E 是一个指å‘@d %P (%Di) 的链接。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1468
+msgid "@E @L to the @r.\n"
+msgstr "@E 是一个指å‘@r 的链接。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1473
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E çš„å称中有éžæ³•å­—符。\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1479
+#, no-c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "@d @i %i 中缺少 \".\"。\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1485
+#, no-c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "@d @i %i 中缺少 \"..\"。\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1490
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "@d @i %i (%p) 中的第一个@e \"%Dn\" (@i=%Di) @s \".\"\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1495
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "@d @i %i 中的第二个@e \"%Dn\" (@i=%Di) @s \"..\"\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1500
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "@i %i (%Q) 的 i_faddr 为 %IF,@s 0。\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1505
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "@i %i (%Q) 的 i_file_acl 为 %IF,@s 0。\n"
+
+#. @-expanded: i_size_high for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1510
+msgid "i_size_high @F %Id, @s zero.\n"
+msgstr "@i %i (%Q) 的 i_size_high 为 %Id,@s 0。\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1515
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "@i %i (%Q) 的 i_frag 为 %N,@s 0。\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1520
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "@i %i (%Q) 的 i_size 为 %N,@s 0。\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1525
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) 有@næ¨¡å¼ (%Im)。\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1530
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@d @i %i,%B,åç§»é‡ %N:@då·²æŸå\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1535
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@d @i %i,%B,åç§»é‡ %N:文件å过长\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.
+#: e2fsck/problem.c:1540
+msgid "@d @i %i has an unallocated %B. "
+msgstr "@d @i %i å«æœ‰æœªåˆ†é…çš„%B。"
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1546
+#, no-c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@d @i %i 中的 \".\" @d@e没有以 NULL 终止\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1552
+#, no-c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@d @i %i 中的 \"..\" @d@e没有以 NULL 终止\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1557
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) 是一个éžæ³•çš„字符@v。\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1562
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) 是一个éžæ³•çš„@b@v。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1567
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E 为é‡å¤çš„ \".\" 目录@e。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1572
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E 为é‡å¤çš„ \"..\" 目录@e。\n"
+
+#: e2fsck/problem.c:1578 e2fsck/problem.c:1963
+#, no-c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "内部错误:无法找到 %i 的 dir_info。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1583
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E 的 rec_len 为 %Dr,@s %N。\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1589
+#, no-c-format
+msgid "@A icount structure: %m\n"
+msgstr "åˆ†é… icount 结构体时出错:%m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1595
+#, no-c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "迭代@d@b时出错:%m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1600
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "读å–@d@b %b (@i %i) 时出错:%m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1605
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "写入@d@b %b (@i %i) 时出错:%m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1611
+#, no-c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "为 @i %i (%s) 分é…æ–°@d@b时出错:%m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1617
+#, no-c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "å–æ¶ˆåˆ†é… @i %i 时出错:%m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1623
+#, no-c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "%p (%i) 中 \".\" 的@d@e太大。\n"
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1628
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) 是一个@I队列。\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1633
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) 是一个@I套接字。\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1638
+msgid "Setting filetype for @E to %N.\n"
+msgstr "将@E 的文件类型设置为 %N。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1643
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E å«æœ‰é”™è¯¯çš„文件类型(%Dt,@s %N)。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1648
+msgid "@E has filetype set.\n"
+msgstr "@E 被设置了文件类型。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1653
+msgid "@E has a @z name.\n"
+msgstr "@E å«æœ‰é•¿åº¦ä¸ºé›¶çš„å称。\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1658
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "符å·é“¾æŽ¥ %Q (@i #%i) 无效。\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1663
+msgid "@a @b @F @n (%If).\n"
+msgstr "@i %i (%Q) 的@a@b无效 (%If)。\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1668
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "@få«æœ‰å¤§æ–‡ä»¶ï¼Œä½†@S中未设置 LARGE_FILE 标志。\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1673
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@h %d 中å‘现问题:%B 未被引用\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1678
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@h %d 中å‘现问题:%B 被引用了两次\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1683
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@h %d 中å‘现问题:%B å«æœ‰é”™è¯¯çš„æœ€å° hash 值\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1688
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@h %d 中å‘现问题:%B å«æœ‰é”™è¯¯çš„最大 hash 值\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).
+#: e2fsck/problem.c:1693
+msgid "@n @h %d (%q). "
+msgstr "@n @h %d (%q)。"
+
+#. @-expanded: filesystem has large directories, but lacks LARGE_DIR flag in superblock.\n
+#: e2fsck/problem.c:1697
+msgid "@f has large directories, but lacks LARGE_DIR flag in @S.\n"
+msgstr "@få«æœ‰å¤§ç›®å½•ï¼Œä½†@S中未设置 LARGE_DIR 标志。\n"
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1702
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@h %d (%q) 中å‘现问题:@bç¼–å· %b 无效。\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1713
+#, no-c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@h %d 中å‘现问题:根结点无效\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1718
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@h %d 中å‘现问题:%B å«æœ‰@né™åˆ¶ (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1723
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@h %d 中å‘现问题:%B å«æœ‰@n计数 (%N)\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1728
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@h %d 中å‘现问题:%B å«æœ‰æœªæŽ’åºçš„ hash 表\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1733
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@h %d 中å‘现问题:%B å«æœ‰@n深度 (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1738
+msgid "Duplicate @E found. "
+msgstr "å‘现 %p (%i) 中有é‡å¤é¡¹ \"%Dn\"。"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1743
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E å«æœ‰ä¸€ä¸ªéžå”¯ä¸€çš„文件å。\n"
+"é‡å‘½å为 %s"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1748
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"å‘现了é‡å¤çš„@e \"@Dn\"。\n"
+"\tå°† %p (%i) 标记为需è¦é‡å»ºçš„。\n"
+"\n"
+
+#. @-expanded: i_blocks_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1753
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "@i %i (%Q) 的 i_blocks_hi 为 %N,@s 0。\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1758
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "@h %d (%q) 中有éžé¢„期的@b。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1763
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E 引用了@g %g 中的 @i %Di,但该@g被设置了 _INODE_UNINIT 标志。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di found in group %g's unused inodes area.\n
+#: e2fsck/problem.c:1768
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E 引用了 @i %Di,但该 @i ä½äºŽ@g %g 的未使用的 inode 区。\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1773
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "@i %i (%Q) 的 i_file_acl_hi 为 %N,@s 0。\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node fails checksum.\n
+#: e2fsck/problem.c:1779
+#, no-c-format
+msgid "@p @h %d: root node fails checksum.\n"
+msgstr "@p @h %d:根结点的校验和错误。\n"
+
+#. @-expanded: problem in HTREE directory inode %d: internal node fails checksum.\n
+#: e2fsck/problem.c:1785
+#, no-c-format
+msgid "@p @h %d: internal node fails checksum.\n"
+msgstr "@p @h %d:内部结点的校验和错误。\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory has no checksum.\n
+#: e2fsck/problem.c:1790
+msgid "@d @i %i, %B, offset %N: @d has no checksum.\n"
+msgstr "@d @i %i,%B,åç§»é‡ %N:@d没有校验和。\n"
+
+#. @-expanded: directory inode %i, %B: directory passes checks but fails checksum.\n
+#: e2fsck/problem.c:1795
+msgid "@d @i %i, %B: @d passes checks but fails checksum.\n"
+msgstr "@d @i %i,%B:@d通过了检查,但校验和错误。\n"
+
+#. @-expanded: Inline directory inode %i size (%N) must be a multiple of 4.\n
+#: e2fsck/problem.c:1800
+msgid "Inline @d @i %i size (%N) must be a multiple of 4.\n"
+msgstr "内è”@d @i %i çš„å¤§å° (%N) 必须为 4 çš„æ•´æ•°å€ã€‚\n"
+
+#. @-expanded: Fixing size of inline directory inode %i failed.\n
+#: e2fsck/problem.c:1806
+#, no-c-format
+msgid "Fixing size of inline @d @i %i failed.\n"
+msgstr "ä¿®å¤å†…è”@d @i %i 的大å°å¤±è´¥ã€‚\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) is too short.\n
+#: e2fsck/problem.c:1811
+msgid "Encrypted @E is too short.\n"
+msgstr "加密的@E 太短。\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references unencrypted inode %Di.\n
+#: e2fsck/problem.c:1816
+msgid "Encrypted @E references unencrypted @i %Di.\n"
+msgstr "加密的@E 引用了未加密的 @i %Di。\n"
+
+#. @-expanded: Encrypted entry '%Dn' in %p (%i) references inode %Di, which has a different encryption policy.\n
+#: e2fsck/problem.c:1821
+msgid "Encrypted @E references @i %Di, which has a different encryption policy.\n"
+msgstr "加密的@E 引用了 @i %Di,但它具有ä¸åŒçš„加密策略。\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal UTF-8 characters in its name.\n
+#: e2fsck/problem.c:1826
+msgid "@E has illegal UTF-8 characters in its name.\n"
+msgstr "@E çš„å称中å«æœ‰æ— æ•ˆçš„ UTF-8 字符。\n"
+
+#. @-expanded: Duplicate filename entry '%Dn' in %p (%i) found.
+#: e2fsck/problem.c:1831
+msgid "Duplicate filename @E found. "
+msgstr "å‘现 %p (%i) 中有é‡å¤çš„文件å项 \"%Dn\"。"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1839
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "第 3 é:检查目录连接性\n"
+
+#. @-expanded: root inode not allocated.
+#: e2fsck/problem.c:1844
+msgid "@r not allocated. "
+msgstr "@r 未被分é…。"
+
+#. @-expanded: No room in lost+found directory.
+#: e2fsck/problem.c:1849
+msgid "No room in @l @d. "
+msgstr "@l @d中没有空间。"
+
+#. @-expanded: Unconnected directory inode %i (was in %q)\n
+#: e2fsck/problem.c:1855
+#, no-c-format
+msgid "Unconnected @d @i %i (was in %q)\n"
+msgstr "未被连接的@d @i %i(之å‰ä½äºŽ %p)\n"
+
+#. @-expanded: /lost+found not found.
+#: e2fsck/problem.c:1860
+msgid "/@l not found. "
+msgstr "/@l 未找到。"
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1865
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "%Q (%i) 中的 \"..\" 为 %P (%j),@s %q (%d)。\n"
+
+#. @-expanded: Bad or non-existent /lost+found. Cannot reconnect.\n
+#: e2fsck/problem.c:1871
+#, no-c-format
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "错误或ä¸å­˜åœ¨çš„ /@l。无法é‡æ–°è¿žæŽ¥ã€‚\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1877
+#, no-c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "无法扩充 /@l:%m\n"
+
+#: e2fsck/problem.c:1883
+#, no-c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "无法é‡æ–°è¿žæŽ¥ %i:%m\n"
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1889
+#, no-c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "å°è¯•æŸ¥æ‰¾ /@l 时出错:%m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1895
+#, no-c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_block: å°è¯•åˆ›å»º /@l @dæ—¶%m\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1901
+#, no-c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_inode: å°è¯•åˆ›å»º /@l @dæ—¶%m\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1907
+#, no-c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_block: 创建新的@d@b时%m\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1913
+#, no-c-format
+msgid "ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"
+msgstr "ext2fs_new_dir_block: 为 /@l 写入@d@b时%m\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1919
+#, no-c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "调整 @i %i 的 @i 计数时出错\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1925
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"无法修改 @i %i 的父节点:%m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1931
+#, no-c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"无法修改 @i %i 的父节点:无法找到父@d@e\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1942
+#, no-c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "创建根@d (%s) 时出错:%m\n"
+
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+#: e2fsck/problem.c:1948
+#, no-c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "创建 /@l @d (%s) 时出错:%m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1953
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r ä¸æ˜¯ä¸€ä¸ª@d;已中止执行。\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1958
+msgid "Cannot proceed without a @r.\n"
+msgstr "无法在没有@r 的情况下继续。\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1969
+#, no-c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l ä¸æ˜¯ä¸€ä¸ª@d (ino=%i)\n"
+
+#. @-expanded: /lost+found has inline data\n
+#: e2fsck/problem.c:1974
+msgid "/@l has inline data\n"
+msgstr "/@l å«æœ‰å†…è”æ•°æ®\n"
+
+#. @-expanded: Cannot allocate space for /lost+found.\n
+#. @-expanded: Place lost files in root directory instead
+#: e2fsck/problem.c:1979
+msgid ""
+"Cannot allocate space for /@l.\n"
+"Place lost files in root directory instead"
+msgstr ""
+"无法为 /@l 分é…空间。\n"
+"转而将丢失的文件置于根目录下"
+
+#. @-expanded: Insufficient space to recover lost files!\n
+#. @-expanded: Move data off the filesystem and re-run e2fsck.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1984
+msgid ""
+"Insufficient space to recover lost files!\n"
+"Move data off the @f and re-run e2fsck.\n"
+"\n"
+msgstr ""
+"没有足够的空间æ¥æ¢å¤ä¸¢å¤±æ–‡ä»¶ï¼\n"
+"请将数æ®ä»Ž@f中移出,然åŽé‡æ–°è¿è¡Œ e2fsck。\n"
+"\n"
+
+#. @-expanded: /lost+found is encrypted\n
+#: e2fsck/problem.c:1989
+msgid "/@l is encrypted\n"
+msgstr "/@l 已被加密\n"
+
+#. @-expanded: Recursively looped directory inode %i (%p)\n
+#: e2fsck/problem.c:1995
+#, no-c-format
+msgid "Recursively looped @d @i %i (%p)\n"
+msgstr "递归循环的@d @i %i (%p)\n"
+
+#: e2fsck/problem.c:2002
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "第 3A é:优化目录\n"
+
+#: e2fsck/problem.c:2008
+#, no-c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "创建 dirs_to_hash 迭代器失败:%m\n"
+
+#: e2fsck/problem.c:2013
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "优化目录 %q (%d) 失败:%m\n"
+
+#: e2fsck/problem.c:2018
+msgid "Optimizing directories: "
+msgstr "优化目录:"
+
+#: e2fsck/problem.c:2035
+msgid "Pass 4: Checking reference counts\n"
+msgstr "第 4 é:检查引用计数\n"
+
+#. @-expanded: unattached zero-length inode %i.
+#: e2fsck/problem.c:2041
+#, no-c-format
+msgid "@u @z @i %i. "
+msgstr "@u@z @i %i。"
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:2047
+#, no-c-format
+msgid "@u @i %i\n"
+msgstr "@u @i %i。\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.
+#: e2fsck/problem.c:2052
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "@i %i 的引用计数为 %Il,@s %N。"
+
+#. @-expanded: WARNING: PROGRAMMING BUG IN E2FSCK!\n
+#. @-expanded: \tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n
+#. @-expanded: inode_link_info[%i] is %N, inode.i_links_count is %Il. They should be the same!\n
+#: e2fsck/problem.c:2056
+msgid ""
+"WARNING: PROGRAMMING BUG IN E2FSCK!\n"
+"\tOR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.\n"
+"@i_link_info[%i] is %N, @i.i_links_count is %Il. They @s the same!\n"
+msgstr ""
+"警告:e2fsck 中出现程åºé”™è¯¯ï¼\n"
+"\t或者æŸä¸ªç²—心大æ„的人(你)正在检查一个已挂载的(活动的)文件系统。\n"
+"@i_link_info[%i] 为 %N,@i.i_links_count 为 %Il。它们应当相åŒï¼\n"
+
+#. @-expanded: extended attribute inode %i ref count is %N, should be %n.
+#: e2fsck/problem.c:2063
+msgid "@a @i %i ref count is %N, @s %n. "
+msgstr "@a @i %i 引用计数为 %N,@s %n。"
+
+#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
+#: e2fsck/problem.c:2068
+msgid "@d exceeds max links, but no DIR_NLINK feature in @S.\n"
+msgstr "@d超出了最大链接数,但@S中没有 DIR_NLINK 特性。\n"
+
+#. @-expanded: directory inode %i ref count set to overflow but could be exact value %N.
+#: e2fsck/problem.c:2073
+msgid "@d @i %i ref count set to overflow but could be exact value %N. "
+msgstr "@d @i %i 的引用计数被设为溢出,但å¯èƒ½æ˜¯å‡†ç¡®å€¼ %N。"
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:2080
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "第 5 é:检查@g概è¦ä¿¡æ¯\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set.
+#: e2fsck/problem.c:2085
+msgid "Padding at end of @i @B is not set. "
+msgstr "@i @B末尾的填充值未设置。"
+
+#. @-expanded: Padding at end of block bitmap is not set.
+#: e2fsck/problem.c:2090
+msgid "Padding at end of @b @B is not set. "
+msgstr "@b@B末尾的填充值未设置。"
+
+#. @-expanded: block bitmap differences:
+#: e2fsck/problem.c:2095
+msgid "@b @B differences: "
+msgstr "@b@B的差异:"
+
+#. @-expanded: inode bitmap differences:
+#: e2fsck/problem.c:2117
+msgid "@i @B differences: "
+msgstr "@i @B的差异:"
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2139
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "@g #%g çš„å¯ç”¨ @i 计数错误 (%i, counted=%j)。\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:2144
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "@g #%g 的目录计数错误 (%i, counted=%j)。\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:2149
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "å¯ç”¨ @i 计数错误 (%i, counted=%j)。\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:2154
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "@g #%g çš„å¯ç”¨@b计数错误 (%b, counted=%c)。\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:2159
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "å¯ç”¨@b计数错误 (%b, counted=%c)。\n"
+
+#. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap
+#. @-expanded: endpoints (%i, %j)\n
+#: e2fsck/problem.c:2164
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "程åºé”™è¯¯ï¼š@f (#%N) @B端点 (%b,%c) 与计算的@B端点 (%i,%j) ä¸ç¬¦\n"
+
+#: e2fsck/problem.c:2170
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "内部错误:伪造ä½å›¾å°¾éƒ¨ (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:2176
+#, no-c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "æ›¿æ¢ @i @B时拷è´é”™è¯¯ï¼š%m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:2182
+#, no-c-format
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr "替æ¢@b@B时拷è´é”™è¯¯ï¼š%m\n"
+
+#. @-expanded: group %g block(s) in use but group is marked BLOCK_UNINIT\n
+#: e2fsck/problem.c:2212
+#, no-c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "@g %g @b已被使用,但@g被标记为 BLOCK_UNINIT\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:2218
+#, no-c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "@g %g @i 已被使用,但@g被标记为 INODE_UNINIT\n"
+
+#. @-expanded: group %g inode bitmap does not match checksum.\n
+#: e2fsck/problem.c:2224
+#, no-c-format
+msgid "@g %g @i @B does not match checksum.\n"
+msgstr "@g %g @i @B与校验和ä¸ç¬¦ã€‚\n"
+
+#. @-expanded: group %g block bitmap does not match checksum.\n
+#: e2fsck/problem.c:2230
+#, no-c-format
+msgid "@g %g @b @B does not match checksum.\n"
+msgstr "@g %g @b@B与校验和ä¸ç¬¦ã€‚\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:2237
+msgid "Recreate @j"
+msgstr "é‡å»º@j"
+
+#: e2fsck/problem.c:2242
+msgid "Update quota info for quota type %N"
+msgstr "æ›´æ–°é…é¢ç±»åž‹ %N çš„é…é¢ä¿¡æ¯"
+
+#. @-expanded: Error setting block group checksum info: %m\n
+#: e2fsck/problem.c:2248
+#, no-c-format
+msgid "Error setting @b @g checksum info: %m\n"
+msgstr "设置@b@g的校验和信æ¯æ—¶å‡ºé”™ï¼š%m\n"
+
+#: e2fsck/problem.c:2254
+#, no-c-format
+msgid "Error writing file system info: %m\n"
+msgstr "写入文件系统信æ¯æ—¶å‡ºé”™ï¼š%m\n"
+
+#: e2fsck/problem.c:2260
+#, no-c-format
+msgid "Error flushing writes to storage device: %m\n"
+msgstr "排空缓冲区到存储设备时出错:%m\n"
+
+#: e2fsck/problem.c:2265
+msgid "Error writing quota info for quota type %N: %m\n"
+msgstr "写入é…é¢ç±»åž‹ %N çš„é…é¢ä¿¡æ¯æ—¶å‡ºé”™ï¼š%m\n"
+
+#: e2fsck/problem.c:2430
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "未处ç†çš„é”™è¯¯ç  (0x%x)ï¼\n"
+
+#: e2fsck/problem.c:2558 e2fsck/problem.c:2562
+msgid "IGNORED"
+msgstr "已忽略"
+
+#: e2fsck/quota.c:30 e2fsck/quota.c:37 e2fsck/quota.c:50 e2fsck/quota.c:59
+msgid "in move_quota_inode"
+msgstr "于 move_quota_inode 中"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %lu, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "内存使用é‡ï¼š%lu,用时:%6.3f/%6.3f/%6.3f\n"
+
+#: e2fsck/scantest.c:98
+#, c-format
+msgid "size of inode=%d\n"
+msgstr "inode 大å°=%d\n"
+
+#: e2fsck/scantest.c:114 misc/e2image.c:1331
+msgid "while opening inode scan"
+msgstr "打开 inode 扫ææ—¶"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "开始 inode 扫ææ—¶"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "进行 inode 扫ææ—¶"
+
+#: e2fsck/super.c:224
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %u"
+msgstr "为 inode %u 调用 ext2fs_block_iterate 时"
+
+#: e2fsck/super.c:249
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %u"
+msgstr "为 inode %u 调用 ext2fs_adjust_ea_refcount2 时"
+
+#: e2fsck/super.c:375
+msgid "Truncating"
+msgstr "正在截断"
+
+#: e2fsck/super.c:376
+msgid "Clearing"
+msgstr "正在清除"
+
+#: e2fsck/unix.c:79
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfktvDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] [-z undo_file] device\n"
+msgstr ""
+"用法:%s [-panyrcdfktvDFV] [-b 超级å—] [-B å—大å°]\n"
+"\t\t[-l|-L åå—文件] [-C fd] [-j 外部日志]\n"
+"\t\t[-E 扩展选项] [-z 撤销文件] 设备\n"
+
+#: e2fsck/unix.c:84
+msgid ""
+"\n"
+"Emergency help:\n"
+" -p Automatic repair (no questions)\n"
+" -n Make no changes to the filesystem\n"
+" -y Assume \"yes\" to all questions\n"
+" -c Check for bad blocks and add them to the badblock list\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"应急æ示:\n"
+" -p 自动修å¤ï¼ˆä¸è¯¢é—®ï¼‰\n"
+" -n ä¸å¯¹æ–‡ä»¶ç³»ç»Ÿåšä»»ä½•æ›´æ”¹\n"
+" -y 对所有询问都回答 \"是\"\n"
+" -c 检查å¯èƒ½çš„åå—,并将它们加入åå—列表\n"
+" -f 强制进行检查,å³ä½¿æ–‡ä»¶ç³»ç»Ÿè¢«æ ‡è®°ä¸º \"没有问题\"\n"
+
+#: e2fsck/unix.c:90
+msgid ""
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -j external_journal Set location of the external journal\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+" -z undo_file Create an undo file\n"
+msgstr ""
+" -v 显示更多信æ¯\n"
+" -b è¶…çº§å— ä½¿ç”¨å¤‡é€‰è¶…çº§å—\n"
+" -B å—å¤§å° ä½¿ç”¨æŒ‡å®šå—大å°æ¥æŸ¥æ‰¾è¶…级å—\n"
+" -j 外部日志 指定外部日志的ä½ç½®\n"
+" -l åå—文件 添加文件到åå—列表\n"
+" -L åå—文件 指定åå—列表\n"
+" -z 撤销文件 创建一个撤销文件\n"
+
+#: e2fsck/unix.c:138
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u 文件(%0d.%d%% ä¸è¿žç»­ï¼‰ï¼Œ%llu/%llu å—\n"
+
+#: e2fsck/unix.c:165
+#, c-format
+msgid ""
+"\n"
+"%12u inode used (%2.2f%%, out of %u)\n"
+msgid_plural ""
+"\n"
+"%12u inodes used (%2.2f%%, out of %u)\n"
+msgstr[0] ""
+"\n"
+"%12u 个已使用的 inode(%2.2f%%,总共 %u)\n"
+
+#: e2fsck/unix.c:169
+#, c-format
+msgid "%12u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%12u 个ä¸è¿žç»­çš„文件 (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:174
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%12u 个ä¸è¿žç»­çš„目录 (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr " å«æœ‰ä¸€æ¬¡/二次/三次间接å—çš„ inode 数:%u/%u/%u\n"
+
+#: e2fsck/unix.c:187
+msgid " Extent depth histogram: "
+msgstr " extent 深度直方图:"
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid "%12llu block used (%2.2f%%, out of %llu)\n"
+msgid_plural "%12llu blocks used (%2.2f%%, out of %llu)\n"
+msgstr[0] "%12llu 个已使用的å—(%2.2f%%,总共 %llu)\n"
+
+#: e2fsck/unix.c:201
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u 个åå—\n"
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "%12u 个大文件\n"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+"\n"
+"%12u 个普通文件\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u 个目录\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "%12u 个字符设备文件\n"
+
+#: e2fsck/unix.c:212
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "%12u 个å—设备文件\n"
+
+#: e2fsck/unix.c:214
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u 个队列文件\n"
+
+#: e2fsck/unix.c:216
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u 个链接\n"
+
+#: e2fsck/unix.c:218
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u 个符å·é“¾æŽ¥"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "(%u 个快速符å·é“¾æŽ¥ï¼‰\n"
+
+#: e2fsck/unix.c:224
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u 个套接字文件\n"
+
+#: e2fsck/unix.c:228
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u 个文件\n"
+
+#: e2fsck/unix.c:241 misc/badblocks.c:1001 misc/tune2fs.c:3082 misc/util.c:130
+#: resize/main.c:359
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "确定 %s 是å¦å·²æŒ‚载时。"
+
+# Note:The second "%s" represents the current status of the device (defined by the first "%s"), thus it is not necessary to translate the word "is". The second "%s" will serve as the copula as well as the predicative (in Chinese).
+#: e2fsck/unix.c:262
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "警告ï¼%s 已被挂载。\n"
+
+# Note:The second "%s" represents the current status of the device (defined by the first "%s"), thus it is not necessary to translate the word "is". The second "%s" will serve as the copula as well as the predicative (in Chinese).
+#: e2fsck/unix.c:265
+#, c-format
+msgid "Warning! %s is in use.\n"
+msgstr "警告ï¼%s 正被使用。\n"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "%s is mounted.\n"
+msgstr "%s 已被挂载。\n"
+
+# Same as the above.
+#: e2fsck/unix.c:273
+#, c-format
+msgid "%s is in use.\n"
+msgstr "%s 正被使用。\n"
+
+#: e2fsck/unix.c:275
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr "无法继续,已中止。\n"
+
+#: e2fsck/unix.c:277
+msgid ""
+"\n"
+"\n"
+"WARNING!!! The filesystem is mounted. If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"警告ï¼ï¼ï¼è¯¥æ–‡ä»¶ç³»ç»Ÿå·²è¢«æŒ‚载。如果你继续æ“作,你***将会***\n"
+"使文件系统é­å—***严é‡æŸå***ï¼\n"
+"\n"
+
+#: e2fsck/unix.c:282
+msgid "Do you really want to continue"
+msgstr "你真的想è¦ç»§ç»­å—"
+
+#: e2fsck/unix.c:284
+msgid "check aborted.\n"
+msgstr "检查被中止。\n"
+
+#: e2fsck/unix.c:378
+msgid " contains a file system with errors"
+msgstr " 有一个å«æœ‰é”™è¯¯çš„文件系统"
+
+#: e2fsck/unix.c:380
+msgid " was not cleanly unmounted"
+msgstr " 未被彻底å¸è½½"
+
+#: e2fsck/unix.c:382
+msgid " primary superblock features different from backup"
+msgstr " 主超级å—的特性与备份超级å—有差异"
+
+#: e2fsck/unix.c:386
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " 已被挂载 %u 次而未进行检查"
+
+#: e2fsck/unix.c:393
+msgid " has filesystem last checked time in the future"
+msgstr " 上一次检查的时间在未æ¥"
+
+#: e2fsck/unix.c:399
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " 已超过 %u 天未被检查"
+
+#: e2fsck/unix.c:407
+msgid "ignoring check interval, broken_system_clock set\n"
+msgstr "忽略检查间隔,因为设置了 broken_system_clock\n"
+
+#: e2fsck/unix.c:413
+msgid ", check forced.\n"
+msgstr ",强制进行检查。\n"
+
+#: e2fsck/unix.c:446
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: 没有问题,%u/%u 文件,%llu/%llu å—"
+
+#: e2fsck/unix.c:466
+msgid " (check deferred; on battery)"
+msgstr "(正在使用电池;已推迟检查)"
+
+#: e2fsck/unix.c:469
+msgid " (check after next mount)"
+msgstr "(将于下次挂载时进行检查)"
+
+#: e2fsck/unix.c:471
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr "(将于 %ld 次挂载åŽè¿›è¡Œæ£€æŸ¥ï¼‰"
+
+#: e2fsck/unix.c:621
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "错误:无法打开 /dev/null(%s)\n"
+
+#: e2fsck/unix.c:692
+msgid "Invalid EA version.\n"
+msgstr "无效的 EA 版本å·ã€‚\n"
+
+#: e2fsck/unix.c:705
+msgid "Invalid readahead buffer size.\n"
+msgstr "预读å–缓冲区大å°æ— æ•ˆã€‚\n"
+
+#: e2fsck/unix.c:768
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "未知的扩展选项:%s\n"
+
+#: e2fsck/unix.c:776
+msgid ""
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"is set off by an equals ('=') sign. Valid extended options are:\n"
+"\n"
+msgstr ""
+"\n"
+"扩展选项由逗å·åˆ†éš”,有些需è¦é€šè¿‡ç­‰å· (\"=\")\n"
+"传递å‚数。有效的扩展选项有:\n"
+"\n"
+
+#: e2fsck/unix.c:780
+msgid "\tea_ver=<ea_version (1 or 2)>\n"
+msgstr "\tea_ver=<EA 版本(1 或 2)>\n"
+
+#: e2fsck/unix.c:789
+msgid "\treadahead_kb=<buffer size>\n"
+msgstr "\treadahead_kb=<缓冲区大å°>\n"
+
+#: e2fsck/unix.c:802
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"e2fsck é…置文件中语法错误(%s,第 %d 行)\n"
+"\t%s\n"
+
+#: e2fsck/unix.c:875
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "验è¯æ–‡ä»¶æ述符 %d 时出错:%s\n"
+
+#: e2fsck/unix.c:879
+msgid "Invalid completion information file descriptor"
+msgstr "无效的补全信æ¯æ–‡ä»¶æ述符"
+
+#: e2fsck/unix.c:894
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr "åªèƒ½ä½¿ç”¨é€‰é¡¹ -p/-aã€-n 或 -y 其中之一。"
+
+#: e2fsck/unix.c:915
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "此版本的 e2fsck ä¸æ”¯æŒ -t 选项。\n"
+
+#: e2fsck/unix.c:947 e2fsck/unix.c:1025 misc/e2initrd_helper.c:331
+#: misc/tune2fs.c:1780 misc/tune2fs.c:2080 misc/tune2fs.c:2098
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "æ— æ³•è§£æž \"%s\""
+
+#: e2fsck/unix.c:1004
+msgid "The -n and -D options are incompatible."
+msgstr "-n 和 -D 选项是互斥的。"
+
+#: e2fsck/unix.c:1009
+msgid "The -n and -c options are incompatible."
+msgstr "-n 和 -c 选项是互斥的。"
+
+#: e2fsck/unix.c:1014
+msgid "The -n and -l/-L options are incompatible."
+msgstr "-n 和 -l/-L 选项是互斥的。"
+
+#: e2fsck/unix.c:1038
+msgid "The -D and -E fixes_only options are incompatible."
+msgstr "-D 和 -E fixes_only 选项是互斥的。"
+
+#: e2fsck/unix.c:1044
+msgid "The -E bmap2extent and fixes_only options are incompatible."
+msgstr "-E bmap2extent 和 fixes_only 选项是互斥的。"
+
+#: e2fsck/unix.c:1095
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "打开 %s 准备排空缓冲区时"
+
+#: e2fsck/unix.c:1101 resize/main.c:391
+#, c-format
+msgid "while trying to flush %s"
+msgstr "å°è¯•æŽ’空 %s 的缓冲区时"
+
+#: e2fsck/unix.c:1108
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "-c å’Œ -l/-L 选项ä¸èƒ½åŒæ—¶ä½¿ç”¨ã€‚\n"
+
+#: e2fsck/unix.c:1155
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+"E2FSCK_JBD_DEBUG \"%s\" ä¸æ˜¯æ•´æ•°\n"
+"\n"
+
+#: e2fsck/unix.c:1164
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"-%c 接收到无效的éžæ•°å€¼å‚æ•° (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1262
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr "MMP 间隔为 %u 秒,总等候时间为 %u 秒。请ç¨å€™...\n"
+
+#: e2fsck/unix.c:1279 e2fsck/unix.c:1284
+msgid "while checking MMP block"
+msgstr "检测 MMP å—æ—¶"
+
+#: e2fsck/unix.c:1286
+#, c-format
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp %s'\n"
+msgstr ""
+"如果您确定文件系统没有在任何节点上使用,请è¿è¡Œï¼š\n"
+"\"tune2fs -f -E clear_mmp %s\"\n"
+
+#: e2fsck/unix.c:1302
+msgid "while reading MMP block"
+msgstr "è¯»å– MMP å—æ—¶"
+
+#: e2fsck/unix.c:1322 e2fsck/unix.c:1374 misc/e2undo.c:240 misc/e2undo.c:285
+#: misc/mke2fs.c:2758 misc/mke2fs.c:2809 misc/tune2fs.c:2805
+#: misc/tune2fs.c:2850 resize/main.c:188 resize/main.c:233
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+" e2undo %s %s\n"
+"\n"
+msgstr ""
+"正在覆盖现有的文件系统;å¯ä»¥ç”¨ä¸‹åˆ—命令æ¥æ’¤é”€è¯¥æ“作:\n"
+" e2undo %s %s\n"
+"\n"
+
+#: e2fsck/unix.c:1363 misc/e2undo.c:274 misc/mke2fs.c:2798 misc/tune2fs.c:2839
+#: resize/main.c:222
+#, c-format
+msgid "while trying to delete %s"
+msgstr "å°è¯•åˆ é™¤ %s æ—¶"
+
+#: e2fsck/unix.c:1389 misc/mke2fs.c:2824 resize/main.c:243
+msgid "while trying to setup undo file\n"
+msgstr "å°è¯•åˆ›å»ºæ’¤é”€æ–‡ä»¶æ—¶\n"
+
+#: e2fsck/unix.c:1433
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "错误:ext2fs 库版本过旧ï¼\n"
+
+#: e2fsck/unix.c:1440
+msgid "while trying to initialize program"
+msgstr "å°è¯•åˆå§‹åŒ–程åºæ—¶"
+
+#: e2fsck/unix.c:1477
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\t使用 %s,%s\n"
+
+#: e2fsck/unix.c:1489
+msgid "need terminal for interactive repairs"
+msgstr "需è¦åœ¨ç»ˆç«¯ä¸­è¿›è¡Œäº¤äº’å¼ä¿®å¤"
+
+#: e2fsck/unix.c:1550
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s正在å°è¯•å¤‡ä»½å—...\n"
+
+#: e2fsck/unix.c:1552
+msgid "Superblock invalid,"
+msgstr "超级å—无效,"
+
+#: e2fsck/unix.c:1553
+msgid "Group descriptors look bad..."
+msgstr "组æ述符似乎是错误的..."
+
+#: e2fsck/unix.c:1563
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: å°è¯•å¤‡ä»½å—æ—¶%s"
+
+#: e2fsck/unix.c:1567
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: 回到原先的超级å—\n"
+
+#: e2fsck/unix.c:1596
+msgid ""
+"The filesystem revision is apparently too high for this version of e2fsck.\n"
+"(Or the filesystem superblock is corrupt)\n"
+"\n"
+msgstr ""
+"文件系统的版本高于此 e2fsck 所支æŒçš„版本。\n"
+"(也有å¯èƒ½æ–‡ä»¶ç³»ç»Ÿçš„超级å—å·²æŸå)\n"
+"\n"
+
+#: e2fsck/unix.c:1603
+msgid "Could this be a zero-length partition?\n"
+msgstr "分区长度为零å—?\n"
+
+#: e2fsck/unix.c:1605
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "你必须具有对该文件系统的 %s æƒé™ï¼Œæˆ–者为 root\n"
+
+#: e2fsck/unix.c:1611
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+"å¯èƒ½è¯¥è®¾å¤‡ä¸å­˜åœ¨ï¼Œæˆ–为 swap 设备?\n"
+"\n"
+
+#: e2fsck/unix.c:1613
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "文件系统å¯èƒ½å·²æŒ‚载,或正被其他程åºç‹¬å ä½¿ç”¨ï¼Ÿ\n"
+
+#: e2fsck/unix.c:1617
+msgid "Possibly non-existent device?\n"
+msgstr "å¯èƒ½è¯¥è®¾å¤‡ä¸å­˜åœ¨ï¼Ÿ\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr "ç£ç›˜è¢«å†™ä¿æŠ¤ï¼›è¯·ä½¿ç”¨ -n 选项进行åªè¯»æ£€æŸ¥ã€‚\n"
+
+#: e2fsck/unix.c:1635
+#, c-format
+msgid "%s: Trying to load superblock despite errors...\n"
+msgstr "%s: 尽管有错误,ä»ç„¶å°è¯•åŠ è½½è¶…级å—...\n"
+
+#: e2fsck/unix.c:1710
+msgid "Get a newer version of e2fsck!"
+msgstr "请获å–新版本的 e2fsckï¼"
+
+#: e2fsck/unix.c:1770
+#, c-format
+msgid "while checking journal for %s"
+msgstr "检查 %s 的日志时"
+
+#: e2fsck/unix.c:1773
+msgid "Cannot proceed with file system check"
+msgstr "无法继续进行文件系统检查"
+
+#: e2fsck/unix.c:1784
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "警告:跳过日志æ¢å¤æµç¨‹ï¼Œå› ä¸ºæ­£åœ¨è¿›è¡Œåªè¯»çš„文件系统检查。\n"
+
+#: e2fsck/unix.c:1796
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "无法设置 %s 的超级å—标志\n"
+
+#: e2fsck/unix.c:1802
+#, c-format
+msgid "Journal checksum error found in %s\n"
+msgstr "在 %s 中å‘现日志校验和错误\n"
+
+#: e2fsck/unix.c:1806
+#, c-format
+msgid "Journal corrupted in %s\n"
+msgstr "%s 中的日志已æŸå\n"
+
+#: e2fsck/unix.c:1810
+#, c-format
+msgid "while recovering journal of %s"
+msgstr "æ¢å¤ %s 的日志时"
+
+#: e2fsck/unix.c:1832
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s 有ä¸è¢«æ”¯æŒçš„特性:"
+
+#: e2fsck/unix.c:1847
+#, c-format
+msgid "%s has unsupported encoding: %0x\n"
+msgstr "%s 有ä¸è¢«æ”¯æŒçš„ç¼–ç ï¼š%0x\n"
+
+#: e2fsck/unix.c:1897
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: 读å–åå— inode æ—¶%s\n"
+
+#: e2fsck/unix.c:1900
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "这并ä¸æ˜¯ä¸€ä¸ªå¥½é¢„兆,然而我们将继续进行...\n"
+
+#: e2fsck/unix.c:1943
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "创建日志(%d 个å—):"
+
+#: e2fsck/unix.c:1952
+msgid " Done.\n"
+msgstr "完毕。\n"
+
+#: e2fsck/unix.c:1954
+msgid ""
+"\n"
+"*** journal has been regenerated ***\n"
+msgstr ""
+"\n"
+"*** 日志已被é‡å»º ***\n"
+
+#: e2fsck/unix.c:1960
+msgid "aborted"
+msgstr "已中止"
+
+#: e2fsck/unix.c:1962
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck 被å–消。\n"
+
+#: e2fsck/unix.c:1989
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "正在从头开始 e2fsck...\n"
+
+#: e2fsck/unix.c:1993
+msgid "while resetting context"
+msgstr "é‡ç½®ä¸Šä¸‹æ–‡æ—¶"
+
+#: e2fsck/unix.c:2052
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM ERRORS CORRECTED *****\n"
+msgstr ""
+"\n"
+"%s: ***** 文件系统错误已修正 *****\n"
+
+#: e2fsck/unix.c:2054
+#, c-format
+msgid "%s: File system was modified.\n"
+msgstr "%s: 文件系统已被修改。\n"
+
+#: e2fsck/unix.c:2058 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** 文件系统已被修改 *****\n"
+
+#: e2fsck/unix.c:2063
+#, c-format
+msgid "%s: ***** REBOOT SYSTEM *****\n"
+msgstr "%s: ***** 请é‡æ–°å¯åŠ¨ç³»ç»Ÿ *****\n"
+
+#: e2fsck/unix.c:2073 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** 警告:文件系统上ä»æœ‰é”™è¯¯ **********\n"
+"\n"
+
+#: e2fsck/util.c:191 misc/util.c:94
+msgid "yY"
+msgstr "yY"
+
+#: e2fsck/util.c:192 misc/util.c:113
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:193
+msgid "aA"
+msgstr "aA"
+
+#: e2fsck/util.c:197
+msgid " ('a' enables 'yes' to all) "
+msgstr "(\"a\" 表示全部回答 \"是\")"
+
+#: e2fsck/util.c:214
+msgid "<y>"
+msgstr "<y>"
+
+#: e2fsck/util.c:216
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:218
+msgid " (y/n)"
+msgstr " (y/n)"
+
+#: e2fsck/util.c:241
+msgid "cancelled!\n"
+msgstr "å·²å–消ï¼\n"
+
+#: e2fsck/util.c:274
+msgid "yes to all\n"
+msgstr "全部回答 \"是\"\n"
+
+#: e2fsck/util.c:276
+msgid "yes\n"
+msgstr "是\n"
+
+#: e2fsck/util.c:278
+msgid "no\n"
+msgstr "å¦\n"
+
+#: e2fsck/util.c:288
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s?å¦\n"
+"\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s?是\n"
+"\n"
+
+#: e2fsck/util.c:296
+msgid "yes"
+msgstr "是"
+
+#: e2fsck/util.c:296
+msgid "no"
+msgstr "å¦"
+
+#: e2fsck/util.c:312
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: %s å«æœ‰éžæ³•çš„ä½å›¾å—"
+
+#: e2fsck/util.c:317
+msgid "reading inode and block bitmaps"
+msgstr "è¯»å– inode å’Œå—ä½å›¾"
+
+#: e2fsck/util.c:329
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "é‡æ–°å°è¯•è¯»å– %s çš„ä½å›¾æ—¶"
+
+#: e2fsck/util.c:341
+msgid "writing block and inode bitmaps"
+msgstr "写入å—å’Œ inode ä½å›¾"
+
+#: e2fsck/util.c:346
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "é‡å†™ %s çš„å—å’Œ inode ä½å›¾æ—¶"
+
+#: e2fsck/util.c:358
+#, c-format
+msgid ""
+"\n"
+"\n"
+"%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n"
+"\t(i.e., without -a or -p options)\n"
+msgstr ""
+"\n"
+"\n"
+"%s: 未预期的ä¸ä¸€è‡´æ€§ï¼›è¯·æ‰‹åŠ¨è¿è¡Œ fsck。\n"
+"\t(å³ä¸ä½¿ç”¨ -a 或 -p 选项)\n"
+
+#: e2fsck/util.c:437 e2fsck/util.c:447
+#, c-format
+msgid "Memory used: %lluk/%lluk (%lluk/%lluk), "
+msgstr "内存使用é‡ï¼š%lluk/%lluk (%lluk/%lluk),"
+
+#: e2fsck/util.c:453
+#, c-format
+msgid "Memory used: %lluk, "
+msgstr "内存使用é‡ï¼š%lluk,"
+
+#: e2fsck/util.c:459
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "时间:%5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:464
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "用时:%6.3f\n"
+
+#: e2fsck/util.c:499 e2fsck/util.c:513
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "è¯»å– %2$s 中的 inode %1$lu æ—¶"
+
+#: e2fsck/util.c:527 e2fsck/util.c:540
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "写入 %2$s 中的 inode %1$lu 时"
+
+#: e2fsck/util.c:799
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "未预期的ä¸ä¸€è‡´æ€§ï¼šæ–‡ä»¶ç³»ç»Ÿåœ¨ fsck è¿è¡Œè¿‡ç¨‹ä¸­è¢«ä¿®æ”¹ã€‚\n"
+
+#: misc/badblocks.c:75
+msgid "done \n"
+msgstr "å·²å®Œæˆ \n"
+
+#: misc/badblocks.c:100
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
+" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
+" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
+" device [last_block [first_block]]\n"
+msgstr ""
+"用法:%s [-b å—大å°] [-i 输入文件] [-o 输出文件] [-svwnfBX]\n"
+" [-c æ¯æ¬¡æµ‹è¯•å—æ•°] [-d 读å–延迟因å­] [-e 最大åå—æ•°]\n"
+" [-p éæ•°] [-t æµ‹è¯•æ¨¡å¼ [-t æµ‹è¯•æ¨¡å¼ [...]]]\n"
+" 设备 [æœ«å— [首å—]]\n"
+
+#: misc/badblocks.c:111
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: -n 和 -w 选项是互斥的。\n"
+"\n"
+
+#: misc/badblocks.c:229
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "进度 %6.2f%%,用时 %s。(%d/%d/%d 个错误)"
+
+#: misc/badblocks.c:337
+msgid "Testing with random pattern: "
+msgstr "正在测试éšæœºæ¨¡å¼ï¼š"
+
+# upstream bug but whatever
+#: misc/badblocks.c:355
+msgid "Testing with pattern 0x"
+msgstr "æ­£åœ¨æµ‹è¯•æ¨¡å¼ 0x"
+
+#: misc/badblocks.c:387 misc/badblocks.c:460
+msgid "during seek"
+msgstr "定ä½æ—¶"
+
+#: misc/badblocks.c:398
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "do_read æ—¶é‡åˆ°å¼‚常值 (%ld)\n"
+
+#: misc/badblocks.c:485
+msgid "during ext2fs_sync_device"
+msgstr "执行 ext2fs_sync_device 时"
+
+#: misc/badblocks.c:505 misc/badblocks.c:767
+msgid "while beginning bad block list iteration"
+msgstr "开始åå—列表迭代时"
+
+#: misc/badblocks.c:520 misc/badblocks.c:620 misc/badblocks.c:778
+msgid "while allocating buffers"
+msgstr "分é…缓冲区时"
+
+#: misc/badblocks.c:524
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "æ­£åœ¨æ£€æŸ¥å— %lu 到 %lu\n"
+
+#: misc/badblocks.c:529
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "在åªè¯»æ¨¡å¼ä¸‹æ£€æŸ¥åå—\n"
+
+#: misc/badblocks.c:538
+msgid "Checking for bad blocks (read-only test): "
+msgstr "检查åå—(åªè¯»æµ‹è¯•ï¼‰ï¼š"
+
+#: misc/badblocks.c:545 misc/badblocks.c:652 misc/badblocks.c:694
+#: misc/badblocks.c:841
+msgid "Too many bad blocks, aborting test\n"
+msgstr "åå—太多,中止测试\n"
+
+#: misc/badblocks.c:627
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "在读写模å¼ä¸‹æ£€æŸ¥åå—\n"
+
+#: misc/badblocks.c:629 misc/badblocks.c:791
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "ä»Žå— %lu 至 %lu\n"
+
+#: misc/badblocks.c:684
+msgid "Reading and comparing: "
+msgstr "正在读å–并比较:"
+
+#: misc/badblocks.c:790
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "使用éžç ´å性读写模å¼è¿›è¡Œåå—检查\n"
+
+#: misc/badblocks.c:796
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "正在检查åå—(éžç ´å性读写测试)\n"
+
+#: misc/badblocks.c:803
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"收到中断,正在清ç†\n"
+
+#: misc/badblocks.c:886
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "将测试数æ®å†™å…¥å— %lu æ—¶"
+
+#: misc/badblocks.c:1006 misc/util.c:135
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s å·²ç»æŒ‚载;"
+
+#: misc/badblocks.c:1008
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "强制进行åå—检查。希望 /etc/mtab 中å映的并éžçœŸå®žæƒ…况。\n"
+
+#: misc/badblocks.c:1013
+msgid "it's not safe to run badblocks!\n"
+msgstr "进行åå—检查有风险ï¼\n"
+
+#: misc/badblocks.c:1018 misc/util.c:146
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s 似乎正被系统使用;"
+
+#: misc/badblocks.c:1021
+msgid "badblocks forced anyway.\n"
+msgstr "强制进行åå—检查。\n"
+
+#: misc/badblocks.c:1041
+#, c-format
+msgid "invalid %s - %s"
+msgstr "无效的 %s - %s"
+
+#: misc/badblocks.c:1137
+#, c-format
+msgid "Too big max bad blocks count %u - maximum is %u"
+msgstr "最大åå—æ•° (%u) 过大 - 最大值为 %u"
+
+#: misc/badblocks.c:1164
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "无法为测试模å¼åˆ†é…内存 - %s"
+
+#: misc/badblocks.c:1194
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr "åªè¯»æµ‹è¯•ä¸­æœ€å¤šåªèƒ½æŒ‡å®šä¸€ç§æµ‹è¯•æ¨¡å¼"
+
+#: misc/badblocks.c:1200
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "åªè¯»æµ‹è¯•ä¸­ä¸å…许使用éšæœºæµ‹è¯•æ¨¡å¼"
+
+#: misc/badblocks.c:1207
+#, c-format
+msgid "Invalid block size: %d\n"
+msgstr "无效的å—大å°ï¼š%d\n"
+
+#: misc/badblocks.c:1213
+#, c-format
+msgid "Invalid blocks_at_once: %d\n"
+msgstr "无效的 blocks_at_once:%d\n"
+
+#: misc/badblocks.c:1227
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr "无法确定设备大å°ï¼›æ‚¨å¿…须手动指定大å°\n"
+
+#: misc/badblocks.c:1233
+msgid "while trying to determine device size"
+msgstr "å°è¯•ç¡®å®šè®¾å¤‡å¤§å°æ—¶"
+
+#: misc/badblocks.c:1238
+msgid "last block"
+msgstr "末å—"
+
+#: misc/badblocks.c:1244
+msgid "first block"
+msgstr "首å—"
+
+#: misc/badblocks.c:1247
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr "é¦–å— (%llu) 无效:必须å°äºŽ %llu"
+
+#: misc/badblocks.c:1255
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr "æœ«å— (%llu) 无效:必须为 32 ä½å€¼"
+
+#: misc/badblocks.c:1311
+msgid "while creating in-memory bad blocks list"
+msgstr "在内存中创建åå—列表时"
+
+#: misc/badblocks.c:1320
+msgid "input file - bad format"
+msgstr "输入文件 - æ ¼å¼é”™è¯¯"
+
+#: misc/badblocks.c:1328 misc/badblocks.c:1337
+msgid "while adding to in-memory bad block list"
+msgstr "å‘内存中的åå—列表中添加记录时"
+
+#: misc/badblocks.c:1362
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "所有é数已完æˆï¼Œå‘现了 %u 个åå—。(%d/%d/%d 个错误)\n"
+
+#: misc/chattr.c:89
+#, c-format
+msgid "Usage: %s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p project] [-v version] files...\n"
+msgstr "用法:%s [-RVf] [-+=aAcCdDeijPsStTuFx] [-p 项目] [-v 版本] 文件...\n"
+
+#: misc/chattr.c:162
+#, c-format
+msgid "bad project - %s\n"
+msgstr "项目错误 - %s\n"
+
+#: misc/chattr.c:176
+#, c-format
+msgid "bad version - %s\n"
+msgstr "版本错误 - %s\n"
+
+#: misc/chattr.c:221 misc/lsattr.c:127
+#, c-format
+msgid "while trying to stat %s"
+msgstr "å°è¯•å¯¹ %s 进行 stat 调用时"
+
+#: misc/chattr.c:228
+#, c-format
+msgid "while reading flags on %s"
+msgstr "è¯»å– %s 的标志时"
+
+#: misc/chattr.c:233 misc/chattr.c:245
+#, c-format
+msgid "Flags of %s set as "
+msgstr "%s 的标志被设为 "
+
+#: misc/chattr.c:254
+#, c-format
+msgid "while setting flags on %s"
+msgstr "设置 %s 的标志时"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "%s 的版本被设置为 %lu\n"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "while setting version on %s"
+msgstr "设置 %s 的版本时"
+
+#: misc/chattr.c:273
+#, c-format
+msgid "Project of %s set as %lu\n"
+msgstr "%s 的项目被设置为 %lu\n"
+
+#: misc/chattr.c:277
+#, c-format
+msgid "while setting project on %s"
+msgstr "设置 %s 的项目时"
+
+#: misc/chattr.c:299
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "无法在 chattr_dir_proc 中为路径å˜é‡åˆ†é…内存"
+
+#: misc/chattr.c:339
+msgid "= is incompatible with - and +\n"
+msgstr "= 与 - / + ä¸ç›¸å®¹\n"
+
+#: misc/chattr.c:347
+msgid "Must use '-v', =, - or +\n"
+msgstr "必须使用 \"-v\"ã€=ã€- 或 + 其中之一\n"
+
+#: misc/create_inode.c:80 misc/create_inode.c:119
+#, c-format
+msgid "while reading inode %u"
+msgstr "è¯»å– inode %u æ—¶"
+
+#: misc/create_inode.c:90 misc/create_inode.c:296 misc/create_inode.c:361
+#: misc/create_inode.c:399
+msgid "while expanding directory"
+msgstr "扩充目录时"
+
+#: misc/create_inode.c:97
+#, c-format
+msgid "while linking \"%s\""
+msgstr "链接 \"%s\" 时"
+
+#: misc/create_inode.c:105 misc/create_inode.c:134 misc/create_inode.c:330
+#, c-format
+msgid "while writing inode %u"
+msgstr "写入 inode %u 时"
+
+#: misc/create_inode.c:154 misc/create_inode.c:185
+#, c-format
+msgid "while listing attributes of \"%s\""
+msgstr "å°è¯•åˆ—出 \"%s\" 的属性时"
+
+#: misc/create_inode.c:165
+#, c-format
+msgid "while opening inode %u"
+msgstr "打开 inode %u 时"
+
+#: misc/create_inode.c:172
+#, c-format
+msgid "while reading xattrs for inode %u"
+msgstr "è¯»å– inode %u çš„ xattr æ—¶"
+
+#: misc/create_inode.c:178 misc/create_inode.c:205 misc/create_inode.c:1066
+#: misc/e2undo.c:186 misc/e2undo.c:483 misc/e2undo.c:489 misc/e2undo.c:495
+#: misc/mke2fs.c:361
+msgid "while allocating memory"
+msgstr "分é…内存时"
+
+#: misc/create_inode.c:198 misc/create_inode.c:214
+#, c-format
+msgid "while reading attribute \"%s\" of \"%s\""
+msgstr "è¯»å– \"%2$s\" çš„ \"%1$s\" 属性时"
+
+#: misc/create_inode.c:223
+#, c-format
+msgid "while writing attribute \"%s\" to inode %u"
+msgstr "写入属性 \"%s\" 到 inode %u 时"
+
+#: misc/create_inode.c:233
+#, c-format
+msgid "while closing inode %u"
+msgstr "关闭 inode %u 时"
+
+#: misc/create_inode.c:283
+#, c-format
+msgid "while allocating inode \"%s\""
+msgstr "åˆ†é… inode \"%s\" æ—¶"
+
+#: misc/create_inode.c:302
+#, c-format
+msgid "while creating inode \"%s\""
+msgstr "创建 inode \"%s\" 时"
+
+#: misc/create_inode.c:368
+#, c-format
+msgid "while creating symlink \"%s\""
+msgstr "创建符å·é“¾æŽ¥ \"%s\" æ—¶"
+
+#: misc/create_inode.c:386 misc/create_inode.c:650 misc/create_inode.c:986
+#, c-format
+msgid "while looking up \"%s\""
+msgstr "查找 \"%s\" 时"
+
+#: misc/create_inode.c:406
+#, c-format
+msgid "while creating directory \"%s\""
+msgstr "创建目录 \"%s\" 时"
+
+#: misc/create_inode.c:636
+#, c-format
+msgid "while opening \"%s\" to copy"
+msgstr "打开 \"%s\" 准备拷è´æ—¶"
+
+#: misc/create_inode.c:828
+#, c-format
+msgid "while changing working directory to \"%s\""
+msgstr "改å˜å·¥ä½œç›®å½•ä¸º \"%s\" æ—¶"
+
+#: misc/create_inode.c:838
+#, c-format
+msgid "while scanning directory \"%s\""
+msgstr "扫æ目录 \"%s\" æ—¶"
+
+#: misc/create_inode.c:848
+#, c-format
+msgid "while lstat \"%s\""
+msgstr "对 \"%s\" 进行 lstat 调用时"
+
+#: misc/create_inode.c:898
+#, c-format
+msgid "while creating special file \"%s\""
+msgstr "创建特殊文件 \"%s\" 时"
+
+#: misc/create_inode.c:907
+msgid "malloc failed"
+msgstr "内存分é…失败"
+
+#: misc/create_inode.c:915
+#, c-format
+msgid "while trying to read link \"%s\""
+msgstr "å°è¯•è¯»å–链接 \"%s\" æ—¶"
+
+#: misc/create_inode.c:922
+msgid "symlink increased in size between lstat() and readlink()"
+msgstr "在执行 lstat() 与 readlink() 之间,符å·é“¾æŽ¥çš„大å°å¢žåŠ äº†"
+
+#: misc/create_inode.c:933
+#, c-format
+msgid "while writing symlink\"%s\""
+msgstr "写入符å·é“¾æŽ¥ \"%s\" æ—¶"
+
+#: misc/create_inode.c:944
+#, c-format
+msgid "while writing file \"%s\""
+msgstr "写入文件 \"%s\" 时"
+
+#: misc/create_inode.c:957
+#, c-format
+msgid "while making dir \"%s\""
+msgstr "创建目录 \"%s\" 时"
+
+#: misc/create_inode.c:975
+msgid "while changing directory"
+msgstr "改å˜ç›®å½•æ—¶"
+
+#: misc/create_inode.c:981
+#, c-format
+msgid "ignoring entry \"%s\""
+msgstr "忽略项 \"%s\""
+
+#: misc/create_inode.c:994
+#, c-format
+msgid "while setting inode for \"%s\""
+msgstr "为 \"%s\" 设置 inode 时"
+
+#: misc/create_inode.c:1001
+#, c-format
+msgid "while setting xattrs for \"%s\""
+msgstr "设置 \"%s\" 的 xattr 时"
+
+#: misc/create_inode.c:1027
+msgid "while saving inode data"
+msgstr "ä¿å­˜ inode æ•°æ®æ—¶"
+
+#: misc/create_inode.c:1077
+msgid "while copying xattrs on root directory"
+msgstr "å°† xattr å¤åˆ¶åˆ°æ ¹ç›®å½•æ—¶"
+
+#: misc/dumpe2fs.c:56
+#, c-format
+msgid "Usage: %s [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "用法:%s [-bfghimxV] [-o superblock=<超级å—ç¼–å·>] [-o blocksize=<å—大å°>] 设备\n"
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr "å—"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr "ç°‡"
+
+#: misc/dumpe2fs.c:219
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "组 %lu:(å— "
+
+#: misc/dumpe2fs.c:226
+#, c-format
+msgid " csum 0x%04x"
+msgstr " 校验和 0x%04x"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr "(应为 0x%04x)"
+
+#: misc/dumpe2fs.c:233
+#, c-format
+msgid " %s superblock at "
+msgstr " %s 超级å—ä½äºŽ "
+
+#: misc/dumpe2fs.c:234
+msgid "Primary"
+msgstr "主"
+
+#: misc/dumpe2fs.c:234
+msgid "Backup"
+msgstr "备份"
+
+#: misc/dumpe2fs.c:238
+msgid ", Group descriptors at "
+msgstr ",组æ述符ä½äºŽ "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+" Reserved GDT blocks at "
+msgstr ""
+"\n"
+" ä¿ç•™çš„ GDT å—ä½äºŽ "
+
+#: misc/dumpe2fs.c:249
+msgid " Group descriptor at "
+msgstr " 组æ述符ä½äºŽ "
+
+#: misc/dumpe2fs.c:255
+msgid " Block bitmap at "
+msgstr " å—ä½å›¾ä½äºŽ "
+
+#: misc/dumpe2fs.c:260 misc/dumpe2fs.c:271
+#, c-format
+msgid ", csum 0x%08x"
+msgstr ",校验和 0x%08x"
+
+#: misc/dumpe2fs.c:263
+msgid ","
+msgstr ","
+
+#: misc/dumpe2fs.c:265
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
+
+#: misc/dumpe2fs.c:266
+msgid " Inode bitmap at "
+msgstr " inode ä½å›¾ä½äºŽ "
+
+#: misc/dumpe2fs.c:273
+msgid ""
+"\n"
+" Inode table at "
+msgstr ""
+"\n"
+" inode 表ä½äºŽ "
+
+#: misc/dumpe2fs.c:279
+#, c-format
+msgid ""
+"\n"
+" %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+" %u 个å¯ç”¨%s,%u 个å¯ç”¨ inode,%u 个目录 %s"
+
+#: misc/dumpe2fs.c:286
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ",%u 个未使用的 inode\n"
+
+#: misc/dumpe2fs.c:289
+msgid " Free blocks: "
+msgstr " å¯ç”¨å—数:"
+
+#: misc/dumpe2fs.c:304
+msgid " Free inodes: "
+msgstr " å¯ç”¨ inode 数:"
+
+#: misc/dumpe2fs.c:340
+msgid "while printing bad block list"
+msgstr "输出åå—列表时"
+
+#: misc/dumpe2fs.c:347
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "åå—数:%u"
+
+#: misc/dumpe2fs.c:375 misc/tune2fs.c:379
+msgid "while reading journal inode"
+msgstr "读å–日志 inode æ—¶"
+
+#: misc/dumpe2fs.c:381
+msgid "while opening journal inode"
+msgstr "打开日志 inode 时"
+
+#: misc/dumpe2fs.c:387
+msgid "while reading journal super block"
+msgstr "读å–日志超级å—æ—¶"
+
+#: misc/dumpe2fs.c:394
+msgid "Journal superblock magic number invalid!\n"
+msgstr "日志超级å—的幻数有错ï¼\n"
+
+#: misc/dumpe2fs.c:414 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "读å–日志超级å—æ—¶"
+
+#: misc/dumpe2fs.c:422
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "无法找到日志超级å—的幻数"
+
+#: misc/dumpe2fs.c:477
+msgid "failed to alloc MMP buffer\n"
+msgstr "åˆ†é… MMP 缓冲区失败\n"
+
+#: misc/dumpe2fs.c:488
+#, c-format
+msgid "reading MMP block %llu from '%s'\n"
+msgstr "从 \"%2$s\" è¯»å– MMP å— %1$llu æ—¶\n"
+
+#: misc/dumpe2fs.c:520 misc/mke2fs.c:811 misc/tune2fs.c:2120
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "无法为解æžé€‰é¡¹åˆ†é…内存ï¼\n"
+
+#: misc/dumpe2fs.c:546
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "无效的超级å—å‚数:%s\n"
+
+#: misc/dumpe2fs.c:561
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "无效的å—大å°å‚数:%s\n"
+
+#: misc/dumpe2fs.c:572
+#, c-format
+msgid ""
+"\n"
+"Bad extended option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tsuperblock=<superblock number>\n"
+"\tblocksize=<blocksize>\n"
+msgstr ""
+"\n"
+"指定了错误的扩展属性:%s\n"
+"\n"
+"扩展属性由逗å·åˆ†éš”,有些需è¦é€šè¿‡ç­‰å· (\"=\") 传递å‚数。\n"
+"\n"
+"有效的å‚数有:\n"
+"\tsuperblock=<超级å—ç¼–å·>\n"
+"\tblocksize=<å—大å°>\n"
+
+#: misc/dumpe2fs.c:663 misc/mke2fs.c:1911
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\t使用 %s\n"
+
+#: misc/dumpe2fs.c:710 misc/e2image.c:1642 misc/tune2fs.c:3008
+#: resize/main.c:424
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "找ä¸åˆ°æœ‰æ•ˆçš„文件系统超级å—。\n"
+
+#: misc/dumpe2fs.c:732
+#, c-format
+msgid "%s: MMP feature not enabled.\n"
+msgstr "%s: MMP 特性未å¯ç”¨ã€‚\n"
+
+#: misc/dumpe2fs.c:763
+#, c-format
+msgid "while trying to read '%s' bitmaps\n"
+msgstr "å°è¯•è¯»å– \"%s\" ä½å›¾æ—¶\n"
+
+#: misc/dumpe2fs.c:772
+msgid ""
+"*** Run e2fsck now!\n"
+"\n"
+msgstr ""
+"*** 请立å³è¿è¡Œ e2fsckï¼\n"
+"\n"
+
+#: misc/e2image.c:108
+#, c-format
+msgid "Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] device image-file\n"
+msgstr "用法:%s [ -r|-Q ] [ -f ] [ -b 超级å—] [ -B å—大å°] 设备 é•œåƒæ–‡ä»¶\n"
+
+#: misc/e2image.c:111
+#, c-format
+msgid " %s -I device image-file\n"
+msgstr " %s -I 设备 é•œåƒæ–‡ä»¶\n"
+
+#: misc/e2image.c:112
+#, c-format
+msgid " %s -ra [ -cfnp ] [ -o src_offset ] [ -O dest_offset ] src_fs [ dest_fs ]\n"
+msgstr " %s -ra [ -cfnp ] [ -o æºå移é‡] [ -O 目标å移é‡] æºæ–‡ä»¶ç³»ç»Ÿ [目标文件系统]\n"
+
+#: misc/e2image.c:177 misc/e2image.c:593 misc/e2image.c:599
+#: misc/e2image.c:1201
+msgid "while allocating buffer"
+msgstr "为缓冲区分é…内存时"
+
+#: misc/e2image.c:182
+#, c-format
+msgid "Writing block %llu\n"
+msgstr "æ­£åœ¨å†™å…¥åˆ°å— %llu\n"
+
+#: misc/e2image.c:196
+#, c-format
+msgid "error writing block %llu"
+msgstr "å†™å…¥å— %llu 时出错"
+
+#: misc/e2image.c:200
+msgid "error in generic_write()"
+msgstr "generic_write() 函数出错"
+
+#: misc/e2image.c:217
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "错误:头部大å°è¶…过 wrt_size\n"
+
+#: misc/e2image.c:222
+msgid "Couldn't allocate header buffer\n"
+msgstr "无法为头部缓冲区分é…内存\n"
+
+#: misc/e2image.c:250
+msgid "while writing superblock"
+msgstr "写入超级å—æ—¶"
+
+#: misc/e2image.c:259
+msgid "while writing inode table"
+msgstr "写入 inode 表时"
+
+#: misc/e2image.c:267
+msgid "while writing block bitmap"
+msgstr "写入å—ä½å›¾æ—¶"
+
+#: misc/e2image.c:275
+msgid "while writing inode bitmap"
+msgstr "写入 inode ä½å›¾æ—¶"
+
+#: misc/e2image.c:517
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr "æŸåçš„ç›®å½•å— %llu:rec_len (%d) 错误\n"
+
+#: misc/e2image.c:529
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr "æŸåçš„ç›®å½•å— %llu:name_len (%d) 错误\n"
+
+#: misc/e2image.c:570
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr "%llu / %llu å— (%d%%)"
+
+#: misc/e2image.c:603 misc/e2image.c:643
+msgid "Copying "
+msgstr "æ­£åœ¨æ‹·è´ "
+
+#: misc/e2image.c:640
+msgid "Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr "现在åœæ­¢å°†ä¼šæŸå文件系统;如果你确定è¦åœæ­¢ï¼Œè¯·å†æ¬¡å‘é€ä¸­æ–­\n"
+
+#: misc/e2image.c:666
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr " 剩余 %s,速度 %.2f MB/s"
+
+#: misc/e2image.c:678 misc/e2image.c:1211
+#, c-format
+msgid "error reading block %llu"
+msgstr "读å–å— %llu 出错"
+
+#: misc/e2image.c:733
+#, c-format
+msgid "Copied %llu / %llu blocks (%d%%) in %s "
+msgstr "å·²å¤åˆ¶ %llu / %llu å— (%d%%),用时 %s "
+
+#: misc/e2image.c:738
+#, c-format
+msgid "at %.2f MB/s"
+msgstr "速度 %.2f MB/s"
+
+#: misc/e2image.c:774
+msgid "while allocating l1 table"
+msgstr "åˆ†é… l1 表时"
+
+#: misc/e2image.c:819
+msgid "while allocating l2 cache"
+msgstr "åˆ†é… l2 缓存时"
+
+#: misc/e2image.c:842
+msgid "Warning: There are still tables in the cache while putting the cache, data will be lost so the image may not be valid.\n"
+msgstr "警告:当放入缓存时,ä»æœ‰è¡¨å‚¨å­˜åœ¨ç¼“存中,这将导致数æ®ä¸¢å¤±ï¼Œé•œåƒæ–‡ä»¶ä¹Ÿå¯èƒ½æ— æ•ˆã€‚\n"
+
+#: misc/e2image.c:1168
+msgid "while allocating ext2_qcow2_image"
+msgstr "为 ext2_qcow2_image 分é…内存时"
+
+#: misc/e2image.c:1175
+msgid "while initializing ext2_qcow2_image"
+msgstr "åˆå§‹åŒ– ext2_qcow2_image æ—¶"
+
+#: misc/e2image.c:1235 misc/e2image.c:1253
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr "程åºé”™è¯¯ï¼šåˆ›å»ºäº†å¤šä¸ªé¡ºåºçš„引用计数å—ï¼\n"
+
+#: misc/e2image.c:1294
+msgid "while allocating block bitmap"
+msgstr "分é…å—ä½å›¾æ—¶"
+
+#: misc/e2image.c:1303
+msgid "while allocating scramble block bitmap"
+msgstr "分é…加扰å—ä½å›¾æ—¶"
+
+#: misc/e2image.c:1326
+msgid "Scanning inodes...\n"
+msgstr "正在扫æ inode...\n"
+
+#: misc/e2image.c:1338
+msgid "Can't allocate block buffer"
+msgstr "无法为å—缓冲区分é…内存"
+
+#: misc/e2image.c:1350
+msgid "while getting next inode"
+msgstr "获å–下一个 inode æ—¶"
+
+#: misc/e2image.c:1379 misc/e2image.c:1393
+#, c-format
+msgid "while iterating over inode %u"
+msgstr "é历 inode %u æ—¶"
+
+#: misc/e2image.c:1425
+msgid "Raw and qcow2 images cannot be installed"
+msgstr "raw å’Œ qcow2 é•œåƒæ— æ³•è¢«å®‰è£…"
+
+#: misc/e2image.c:1447
+msgid "error reading bitmaps"
+msgstr "读å–ä½å›¾æ—¶å‘生错误"
+
+#: misc/e2image.c:1459
+msgid "while opening device file"
+msgstr "打开设备文件时"
+
+#: misc/e2image.c:1470
+msgid "while restoring the image table"
+msgstr "æ¢å¤é•œåƒè¡¨æ—¶"
+
+#: misc/e2image.c:1578
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr "-a 选项åªèƒ½ç”¨äºŽ raw 或 QCOW2 é•œåƒã€‚"
+
+#: misc/e2image.c:1583
+msgid "-b option can only be used with raw or QCOW2 images."
+msgstr "-b 选项åªèƒ½ç”¨äºŽ raw 或 QCOW2 é•œåƒã€‚"
+
+#: misc/e2image.c:1589
+msgid "Offsets are only allowed with raw images."
+msgstr "å移é‡åªèƒ½ç”¨äºŽ raw é•œåƒã€‚"
+
+#: misc/e2image.c:1594
+msgid "Move mode is only allowed with raw images."
+msgstr "移动模å¼åªèƒ½ç”¨äºŽ raw é•œåƒã€‚"
+
+#: misc/e2image.c:1599
+msgid "Move mode requires all data mode."
+msgstr "移动模å¼éœ€è¦å¯ç”¨å®Œå…¨æ•°æ®æ¨¡å¼ã€‚"
+
+#: misc/e2image.c:1609
+msgid "checking if mounted"
+msgstr "检测其是å¦å·²æŒ‚è½½"
+
+#: misc/e2image.c:1616
+msgid ""
+"\n"
+"Running e2image on a R/W mounted filesystem can result in an\n"
+"inconsistent image which will not be useful for debugging purposes.\n"
+"Use -f option if you really want to do that.\n"
+msgstr ""
+"\n"
+"在以读写模å¼æŒ‚载的文件系统上è¿è¡Œ e2image å¯èƒ½å¯¼è‡´é•œåƒä¸ä¸€è‡´ï¼Œ\n"
+"这样的镜åƒä¹Ÿæ— æ³•ç”¨äºŽè°ƒè¯•ã€‚如果你确实需è¦è¿™æ ·åšï¼Œè¯·ä½¿ç”¨ -f 选项。\n"
+
+#: misc/e2image.c:1670
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr "无法将 QCOW2 é•œåƒå†™åˆ°æ ‡å‡†è¾“出ï¼\n"
+
+#: misc/e2image.c:1676
+msgid "Can not stat output\n"
+msgstr "无法对输出进行 stat æ“作\n"
+
+#: misc/e2image.c:1686
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr "é•œåƒ (%s) 已被压缩\n"
+
+#: misc/e2image.c:1689
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr "é•œåƒ (%s) 已被加密\n"
+
+#: misc/e2image.c:1692
+#, c-format
+msgid "Image (%s) is corrupted\n"
+msgstr "é•œåƒ (%s) å·²æŸå\n"
+
+#: misc/e2image.c:1696
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "å°è¯•å°† qcow2 é•œåƒ (%s) 转æ¢ä¸º raw é•œåƒ (%s) æ—¶"
+
+#: misc/e2image.c:1706
+msgid "The -c option only supported in raw mode\n"
+msgstr "åªæœ‰ raw 模å¼æ”¯æŒ -c 选项\n"
+
+#: misc/e2image.c:1711
+msgid "The -c option not supported when writing to stdout\n"
+msgstr "写入到标准输出时无法使用 -c 选项\n"
+
+#: misc/e2image.c:1718
+msgid "while allocating check_buf"
+msgstr "为 check_buf 分é…内存时"
+
+#: misc/e2image.c:1724
+msgid "The -p option only supported in raw mode\n"
+msgstr "åªæœ‰ raw 模å¼æ”¯æŒ -p 选项\n"
+
+#: misc/e2image.c:1734
+#, c-format
+msgid "%d blocks already contained the data to be copied\n"
+msgstr "%d 个å—已包å«éœ€è¦è¢«æ‹·è´çš„æ•°æ®\n"
+
+#: misc/e2initrd_helper.c:69
+#, c-format
+msgid "Usage: %s -r device\n"
+msgstr "用法:%s -r 设备\n"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: 无法打开 %s\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: 无法定ä½åˆ°è¶…级å—\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: 读å–超级å—时出错\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: ä¸æ˜¯ä¸€ä¸ª ext2 文件系统\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:3215
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "警告:标签太长,已截短。\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: å†ä¸€æ¬¡æ— æ³•å®šä½åˆ°è¶…级å—\n"
+
+#: misc/e2label.c:105
+#, c-format
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: 写入超级å—时出错\n"
+
+#: misc/e2label.c:117 misc/tune2fs.c:1772
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "用法:e2label 设备 [新标签]\n"
+
+#: misc/e2undo.c:124
+#, c-format
+msgid "Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"
+msgstr "用法:%s [-f] [-h] [-n] [-o å移é‡] [-v] [-z 撤销文件] <事务文件> <文件系统>\n"
+
+#: misc/e2undo.c:153
+msgid "The file system superblock doesn't match the undo file.\n"
+msgstr "文件系统的超级å—与撤销文件ä¸åŒ¹é…\n"
+
+#: misc/e2undo.c:156
+msgid "UUID does not match.\n"
+msgstr "UUID ä¸åŒ¹é…。\n"
+
+#: misc/e2undo.c:158
+msgid "Last mount time does not match.\n"
+msgstr "上一次的挂载时间ä¸åŒ¹é…。\n"
+
+#: misc/e2undo.c:160
+msgid "Last write time does not match.\n"
+msgstr "上一次的写入时间ä¸åŒ¹é…。\n"
+
+#: misc/e2undo.c:162
+msgid "Lifetime write counter does not match.\n"
+msgstr "写入计数ä¸åŒ¹é…。\n"
+
+#: misc/e2undo.c:176
+msgid "while reading filesystem superblock."
+msgstr "读å–文件系统超级å—时。"
+
+#: misc/e2undo.c:192
+msgid "while fetching superblock"
+msgstr "获å–超级å—æ—¶"
+
+#: misc/e2undo.c:205
+#, c-format
+msgid "Undo file superblock checksum doesn't match.\n"
+msgstr "撤销文件的超级å—的校验和ä¸ç¬¦ã€‚\n"
+
+#: misc/e2undo.c:344
+#, c-format
+msgid "illegal offset - %s"
+msgstr "éžæ³•çš„åç§»é‡ - %s"
+
+#: misc/e2undo.c:368
+#, c-format
+msgid "Will not write to an undo file while replaying it.\n"
+msgstr "在进行é‡æ”¾æ“作时,ä¸ä¼šå†™å…¥åˆ°æ’¤é”€æ–‡ä»¶ã€‚\n"
+
+#: misc/e2undo.c:377
+#, c-format
+msgid "while opening undo file `%s'\n"
+msgstr "打开撤销文件 \"%s\" 时\n"
+
+#: misc/e2undo.c:384
+msgid "while reading undo file"
+msgstr "读å–撤销文件时"
+
+#: misc/e2undo.c:389
+#, c-format
+msgid "%s: Not an undo file.\n"
+msgstr "%s: ä¸æ˜¯æ’¤é”€æ–‡ä»¶ã€‚\n"
+
+#: misc/e2undo.c:400
+#, c-format
+msgid "%s: Header checksum doesn't match.\n"
+msgstr "%s: 头部校验和ä¸åŒ¹é…。\n"
+
+#: misc/e2undo.c:407
+#, c-format
+msgid "%s: Corrupt undo file header.\n"
+msgstr "%s: 撤销文件头æŸå。\n"
+
+#: misc/e2undo.c:411
+#, c-format
+msgid "%s: Undo block size too large.\n"
+msgstr "%s: 撤销å—过大。\n"
+
+#: misc/e2undo.c:416
+#, c-format
+msgid "%s: Undo block size too small.\n"
+msgstr "%s: 撤销å—过å°ã€‚\n"
+
+#: misc/e2undo.c:429
+#, c-format
+msgid "%s: Unknown undo file feature set.\n"
+msgstr "%s: 设置了未知的撤销文件特性。\n"
+
+#: misc/e2undo.c:437
+#, c-format
+msgid "Error while determining whether %s is mounted."
+msgstr "确定 %s 是å¦å·²æŒ‚载时出错。"
+
+#: misc/e2undo.c:443
+msgid "e2undo should only be run on unmounted filesystems"
+msgstr "e2undo åªèƒ½ç”¨äºŽæœªæŒ‚载的文件系统"
+
+#: misc/e2undo.c:459
+#, c-format
+msgid "while opening `%s'"
+msgstr "打开 \"%s\" 时"
+
+#: misc/e2undo.c:470
+msgid "specified offset is too large"
+msgstr "指定的å移é‡å¤ªå¤§"
+
+#: misc/e2undo.c:511
+msgid "while reading keys"
+msgstr "读å–键时"
+
+#: misc/e2undo.c:523
+#, c-format
+msgid "%s: wrong key magic at %llu\n"
+msgstr "%s: %llu 中的键幻数有误\n"
+
+#: misc/e2undo.c:533
+#, c-format
+msgid "%s: key block checksum error at %llu.\n"
+msgstr "%s: %llu 中的键å—的校验和有误。\n"
+
+#: misc/e2undo.c:556
+#, c-format
+msgid "%s: block %llu is too long."
+msgstr "%s: å— %llu 太长。"
+
+#: misc/e2undo.c:569 misc/e2undo.c:606
+#, c-format
+msgid "while fetching block %llu."
+msgstr "获å–å— %llu 时。"
+
+#: misc/e2undo.c:581
+#, c-format
+msgid "checksum error in filesystem block %llu (undo blk %llu)\n"
+msgstr "æ–‡ä»¶ç³»ç»Ÿå— %lluï¼ˆæ’¤é”€å— %llu)的校验和有误\n"
+
+#: misc/e2undo.c:622
+#, c-format
+msgid "while writing block %llu."
+msgstr "å†™å— %llu 时。"
+
+#: misc/e2undo.c:629
+#, c-format
+msgid "Undo file corruption; run e2fsck NOW!\n"
+msgstr "撤销文件æŸå;请立å³è¿è¡Œ e2fsckï¼\n"
+
+#: misc/e2undo.c:631
+#, c-format
+msgid "IO error during replay; run e2fsck NOW!\n"
+msgstr "执行é‡æ”¾æ“作时出现输入/输出错误;请立å³è¿è¡Œ e2fsckï¼\n"
+
+#: misc/e2undo.c:634
+#, c-format
+msgid "Incomplete undo record; run e2fsck.\n"
+msgstr "撤销记录ä¸å®Œæ•´ï¼›è¯·è¿è¡Œ e2fsck。\n"
+
+#: misc/findsuper.c:110
+#, c-format
+msgid "Usage: findsuper device [skipbytes [startkb]]\n"
+msgstr "用法:findsuper 设备 [跳过字节数 [起始kb数]]\n"
+
+#: misc/findsuper.c:155
+#, c-format
+msgid "skipbytes should be a number, not %s\n"
+msgstr "\"跳过字节数\" 应当为一个数字,而ä¸æ˜¯ %s\n"
+
+#: misc/findsuper.c:162
+#, c-format
+msgid "skipbytes must be a multiple of the sector size\n"
+msgstr "\"跳过字节数\" 应当是扇区大å°çš„æ•´æ•°å€\n"
+
+#: misc/findsuper.c:169
+#, c-format
+msgid "startkb should be a number, not %s\n"
+msgstr "\"起始kbæ•°\" 应当为一个数字,而ä¸æ˜¯ %s\n"
+
+#: misc/findsuper.c:175
+#, c-format
+msgid "startkb should be positive, not %llu\n"
+msgstr "\"起始kbæ•°\" 应当为正数,而ä¸æ˜¯ %llu\n"
+
+#: misc/findsuper.c:186
+#, c-format
+msgid "starting at %llu, with %u byte increments\n"
+msgstr "在 %llu 处开始,增é‡ä¸º %u 字节\n"
+
+#: misc/findsuper.c:188
+#, c-format
+msgid ""
+"[*] probably superblock written in the ext3 journal superblock,\n"
+"\tso start/end/grp wrong\n"
+msgstr ""
+"[*] å¯èƒ½æ˜¯è¢«å†™å…¥äº† ext3 日志超级å—中的超级å—,\n"
+"\tå› æ­¤ 起始/结æŸ/组 å¯èƒ½æœ‰è¯¯\n"
+
+#: misc/findsuper.c:190
+#, c-format
+msgid "byte_offset byte_start byte_end fs_blocks blksz grp mkfs/mount_time sb_uuid label\n"
+msgstr "å移字节 起始字节 结æŸå­—节 å—æ•° å—å¤§å° ç»„ 创建/挂载时间 超级å—UUID 标签\n"
+
+#: misc/findsuper.c:265
+#, c-format
+msgid ""
+"\n"
+"%11Lu: finished with errno %d\n"
+msgstr ""
+"\n"
+"%11Lu: 已结æŸï¼Œé”™è¯¯å·ä¸º %d\n"
+
+#: misc/fsck.c:344
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "警告:无法打开 %s:%s\n"
+
+#: misc/fsck.c:354
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr "警告:%2$s 的第 %1$d 行格å¼é”™è¯¯\n"
+
+#: misc/fsck.c:371
+msgid ""
+"WARNING: Your /etc/fstab does not contain the fsck passno\n"
+"\tfield. I will kludge around things for you, but you\n"
+"\tshould fix your /etc/fstab file as soon as you can.\n"
+"\n"
+msgstr ""
+"警告:你的 /etc/fstab 中缺少 fsck passno 字段。\n"
+"\t我将会设法完æˆä»»åŠ¡ï¼Œä½†ä½ åº”å½“å°½å¿«ä¿®å¤ /etc/fstab。\n"
+"\n"
+
+#: misc/fsck.c:486
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: 未找到\n"
+
+#: misc/fsck.c:602
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: 没有å­è¿›ç¨‹äº†å—?ï¼ï¼Ÿ\n"
+
+#: misc/fsck.c:624
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr "警告...设备 %2$s çš„ %1$s æ”¶åˆ°ä¿¡å· %3$d åŽé€€å‡ºã€‚\n"
+
+#: misc/fsck.c:630
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: 状æ€ä¸º %x,这ä¸åº”该å‘生。\n"
+
+#: misc/fsck.c:669
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "å·²å®Œæˆ %s(退出状æ€ç  %d)\n"
+
+#: misc/fsck.c:729
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr "%1$s: 执行 fsck.%3$s %4$s 时出错,退出状æ€ç  %2$d\n"
+
+#: misc/fsck.c:750
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"所有通过 -t 选项指定的文件系统类型必须都å«æœ‰ï¼ˆæˆ–都ä¸å«æœ‰ï¼‰\n"
+"\"no\" 或 \"!\" å‰ç¼€ã€‚\n"
+
+#: misc/fsck.c:769
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+"无法为文件系统类型分é…内存\n"
+"\n"
+
+#: misc/fsck.c:892
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: 跳过 /etc/fstab 中的错误行:bind 挂载项的 fsck pass æ•°éžé›¶\n"
+
+#: misc/fsck.c:919
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: 无法检查 %s:找ä¸åˆ° fsck.%s\n"
+
+#: misc/fsck.c:975
+msgid "Checking all file systems.\n"
+msgstr "正在检查所有文件系统。\n"
+
+#: misc/fsck.c:1066
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--请ç¨å€™--(第 %d é)\n"
+
+#: misc/fsck.c:1086
+msgid "Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr "用法:fsck [-AMNPRTV] [ -C [ fd ] ] [-t 文件系统类型] [文件系统选项] [文件系统 ...]\n"
+
+#: misc/fsck.c:1128
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: 设备过多\n"
+
+#: misc/fsck.c:1161 misc/fsck.c:1247
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: å‚数过多\n"
+
+#: misc/fuse2fs.c:3746
+msgid "Mounting read-only.\n"
+msgstr "以åªè¯»æ¨¡å¼æŒ‚载。\n"
+
+#: misc/fuse2fs.c:3770
+#, c-format
+msgid "%s: Allowing users to allocate all blocks. This is dangerous!\n"
+msgstr "%s: å…许用户分é…所有å—。这样åšå¾ˆå±é™©ï¼\n"
+
+#: misc/fuse2fs.c:3782 misc/fuse2fs.c:3800
+#, c-format
+msgid "%s: %s.\n"
+msgstr "%s: %s。\n"
+
+#: misc/fuse2fs.c:3783 misc/fuse2fs.c:3802 misc/tune2fs.c:3108
+#, c-format
+msgid "Please run e2fsck -fy %s.\n"
+msgstr "请先è¿è¡Œ \"e2fsck -fy %s\"。\n"
+
+#: misc/fuse2fs.c:3793
+#, c-format
+msgid "%s: mounting read-only without recovering journal\n"
+msgstr "%s: 以åªè¯»æ–¹å¼æŒ‚载且ä¸æ¢å¤æ—¥å¿—\n"
+
+#: misc/fuse2fs.c:3809
+msgid "Journal needs recovery; running `e2fsck -E journal_only' is required.\n"
+msgstr "需è¦æ¢å¤æ—¥å¿—;请è¿è¡Œ \"e2fsck -E journal_only\"。\n"
+
+#: misc/fuse2fs.c:3817
+#, c-format
+msgid "%s: Writing to the journal is not supported.\n"
+msgstr "%s: ä¸æ”¯æŒå†™å…¥æ—¥å¿—。\n"
+
+#: misc/fuse2fs.c:3832
+msgid "Warning: Mounting unchecked fs, running e2fsck is recommended.\n"
+msgstr "警告:正在挂载未ç»æ£€æŸ¥çš„文件系统,建议您è¿è¡Œ e2fsck。\n"
+
+#: misc/fuse2fs.c:3836
+msgid "Warning: Maximal mount count reached, running e2fsck is recommended.\n"
+msgstr ""
+"警告:达到了最大挂载次数,建议您è¿è¡Œ e2fsck。\n"
+"\n"
+
+#: misc/fuse2fs.c:3841
+msgid "Warning: Check time reached; running e2fsck is recommended.\n"
+msgstr "警告:检查时间已到;建议您è¿è¡Œ e2fsck。\n"
+
+#: misc/fuse2fs.c:3845
+msgid "Orphans detected; running e2fsck is recommended.\n"
+msgstr "检测到孤立å—;建议您è¿è¡Œ e2fsck。\n"
+
+#: misc/fuse2fs.c:3849
+msgid "Errors detected; running e2fsck is required.\n"
+msgstr "检测到错误;请è¿è¡Œ e2fsck。\n"
+
+#: misc/lsattr.c:75
+#, c-format
+msgid "Usage: %s [-RVadlpv] [files...]\n"
+msgstr "用法:%s [-RVadlpv] [文件...]\n"
+
+#: misc/lsattr.c:86
+#, c-format
+msgid "While reading flags on %s"
+msgstr "è¯»å– %s 的标志时"
+
+#: misc/lsattr.c:93
+#, c-format
+msgid "While reading project on %s"
+msgstr "è¯»å– %s 的项目时"
+
+#: misc/lsattr.c:102
+#, c-format
+msgid "While reading version on %s"
+msgstr "è¯»å– %s 的版本时"
+
+#: misc/lsattr.c:148
+msgid "Couldn't allocate path variable in lsattr_dir_proc\n"
+msgstr "无法在 lsattr_dir_proc 中为路径å˜é‡åˆ†é…内存\n"
+
+#: misc/mke2fs.c:131
+#, c-format
+msgid ""
+"Usage: %s [-c|-l filename] [-b block-size] [-C cluster-size]\n"
+"\t[-i bytes-per-inode] [-I inode-size] [-J journal-options]\n"
+"\t[-G flex-group-size] [-N number-of-inodes] [-d root-directory]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
+"\t[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]\n"
+"\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]\n"
+"\t[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]\n"
+"\t[-jnqvDFSV] device [blocks-count]\n"
+msgstr ""
+"用法:%s [-c|-l 文件å] [-b å—大å°] [-C 簇大å°]\n"
+"\t[-i æ¯inode的字节数] [-I inode大å°] [-J 日志选项]\n"
+"\t[-G 弹性组大å°] [-N inodeæ•°] [-d 根目录]\n"
+"\t[-m ä¿ç•™å—所å ç™¾åˆ†æ¯”] [-o 创始系统å]\n"
+"\t[-g æ¯ç»„çš„å—æ•°] [-L å·æ ‡] [-M 上一次挂载点]\n"
+"\t[-O 特性[,...]] [-r 文件系统版本] [-E 扩展选项[,...]]\n"
+"\t[-t 文件系统类型] [-T 用法类型] [-U UUID] [-e 错误行为][-z 撤销文件]\n"
+"\t[-jnqvDFKSV] 设备 [å—æ•°]\n"
+
+#: misc/mke2fs.c:263
+#, c-format
+msgid "Running command: %s\n"
+msgstr "正在执行命令:%s\n"
+
+#: misc/mke2fs.c:267
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "å°è¯•è¿è¡Œ \"%s\" æ—¶"
+
+#: misc/mke2fs.c:274
+msgid "while processing list of bad blocks from program"
+msgstr "处ç†ç¨‹åºæ供的åå—列表时"
+
+#: misc/mke2fs.c:301
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr "主超级å—/组æè¿°ç¬¦åŒºä¸­çš„å— %d 为åå—。\n"
+
+#: misc/mke2fs.c:303
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr "è‹¥è¦åˆ›å»ºæ–‡ä»¶ç³»ç»Ÿï¼Œå— %u 至 %u 必须为好å—。\n"
+
+#: misc/mke2fs.c:306
+msgid "Aborting....\n"
+msgstr "正在中止...\n"
+
+#: misc/mke2fs.c:326
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"警告:备份超级å—/组æ述符中å‘现åå— (%u)\n"
+"\n"
+
+#: misc/mke2fs.c:345 misc/mke2fs.c:3318
+msgid "while marking bad blocks as used"
+msgstr "å°†åå—标记为已使用的"
+
+#: misc/mke2fs.c:370
+msgid "while writing reserved inodes"
+msgstr "写入预留 inode 时"
+
+#: misc/mke2fs.c:422
+msgid "Writing inode tables: "
+msgstr "正在写入 inode表:"
+
+#: misc/mke2fs.c:444
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+"\n"
+"无法写入 %d 个å—到起始于%lluçš„ inode 表:%s\n"
+
+#: misc/mke2fs.c:459 misc/mke2fs.c:2870 misc/mke2fs.c:3278
+msgid "done \n"
+msgstr "å®Œæˆ \n"
+
+#: misc/mke2fs.c:474
+msgid "while creating root dir"
+msgstr "创建根目录时"
+
+#: misc/mke2fs.c:481
+msgid "while reading root inode"
+msgstr "读å–æ ¹ inode æ—¶"
+
+#: misc/mke2fs.c:493
+msgid "while setting root inode ownership"
+msgstr "设置根 inode 的所有者时"
+
+#: misc/mke2fs.c:511
+msgid "while creating /lost+found"
+msgstr "创建 /lost+found 时"
+
+#: misc/mke2fs.c:518
+msgid "while looking up /lost+found"
+msgstr "查找 /lost+found 时"
+
+#: misc/mke2fs.c:531
+msgid "while expanding /lost+found"
+msgstr "扩充 /lost+found 时"
+
+#: misc/mke2fs.c:546
+msgid "while setting bad block inode"
+msgstr "设置åå— inode æ—¶"
+
+#: misc/mke2fs.c:573
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "擦除扇区 %d-%d 时内存ä¸è¶³\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "警告:无法读å–å— 0:%s\n"
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "警告:无法擦除扇区 %d:%s\n"
+
+#: misc/mke2fs.c:617
+msgid "while splitting the journal size"
+msgstr "分离日志大å°æ—¶"
+
+#: misc/mke2fs.c:624
+msgid "while initializing journal superblock"
+msgstr "åˆå§‹åŒ–日志超级å—æ—¶"
+
+#: misc/mke2fs.c:632
+msgid "Zeroing journal device: "
+msgstr "正在对日志设备填零:"
+
+#: misc/mke2fs.c:644
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "å¯¹æ—¥å¿—è®¾å¤‡å¡«é›¶æ—¶ï¼ˆå— %llu,计数 %d)"
+
+#: misc/mke2fs.c:662
+msgid "while writing journal superblock"
+msgstr "写入日志超级å—æ—¶"
+
+#: misc/mke2fs.c:676
+#, c-format
+msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
+msgstr "创建å«æœ‰ %llu 个å—(æ¯å— %dk)和 %u 个 inode 的文件系统\n"
+
+#: misc/mke2fs.c:684
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"警告:%llu å—未使用。\n"
+"\n"
+
+#: misc/mke2fs.c:688
+#, c-format
+msgid "Filesystem label=%.*s\n"
+msgstr "文件系统标签=%.*s\n"
+
+#: misc/mke2fs.c:692
+#, c-format
+msgid "OS type: %s\n"
+msgstr "æ“作系统类型:%s\n"
+
+#: misc/mke2fs.c:694
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "å—大å°=%u (log=%u)\n"
+
+#: misc/mke2fs.c:697
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "簇大å°=%u (log=%u)\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "分å—大å°=%u (log=%u)\n"
+
+#: misc/mke2fs.c:703
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "步长=%u å—,带宽=%u å—\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u 个 inode,%llu 个å—\n"
+
+#: misc/mke2fs.c:707
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%llu ä¸ªå— (%2.2f%%) 为超级用户ä¿ç•™\n"
+
+#: misc/mke2fs.c:710
+#, c-format
+msgid "First data block=%u\n"
+msgstr "第一个数æ®å—=%u\n"
+
+#: misc/mke2fs.c:712
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "根目录的所有者=%u:%u\n"
+
+#: misc/mke2fs.c:714
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "文件系统å—的最大值=%lu\n"
+
+#: misc/mke2fs.c:718
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u 个å—组\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "%u block group\n"
+msgstr "%u 个å—组\n"
+
+#: misc/mke2fs.c:722
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr ""
+"æ¯ç»„ %u 个å—,%u 个簇\n"
+"\n"
+
+#: misc/mke2fs.c:725
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+"æ¯ç»„ %u 个å—,%u 个分å—\n"
+"\n"
+
+#: misc/mke2fs.c:727
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "æ¯ç»„ %u 个 inode\n"
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Filesystem UUID: %s\n"
+msgstr "文件系统 UUID:%s\n"
+
+#: misc/mke2fs.c:737
+msgid "Superblock backups stored on blocks: "
+msgstr "超级å—的备份存储于下列å—:"
+
+#: misc/mke2fs.c:833
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+"%s éœ€è¦ \"-O 64bit\" 选项\n"
+"\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr "\"%s\" 选项必须ä½äºŽ \"resize=%u\" 之å‰\n"
+
+#: misc/mke2fs.c:852
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr "无效的 desc_size:\"%s\"\n"
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid hash seed: %s\n"
+msgstr "无效的 hash ç§å­ï¼š%s\n"
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid "Invalid offset: %s\n"
+msgstr "无效的å移é‡ï¼š%s\n"
+
+#: misc/mke2fs.c:892 misc/tune2fs.c:2148
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "无效的 mmp_update_interval:%s\n"
+
+#: misc/mke2fs.c:909
+#, c-format
+msgid "Invalid # of backup superblocks: %s\n"
+msgstr "备份超级å—ç¼–å·æ— æ•ˆï¼š%s\n"
+
+#: misc/mke2fs.c:931
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "无效的步长å‚数:%s\n"
+
+#: misc/mke2fs.c:946
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "无效的带宽å‚数:%s\n"
+
+#: misc/mke2fs.c:969
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "无效的 resize å‚数:%s\n"
+
+#: misc/mke2fs.c:976
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "resize å‚数必须大于文件系统大å°ã€‚\n"
+
+#: misc/mke2fs.c:1000
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr "文件系统版本 0 ä¸æ”¯æŒåœ¨çº¿è°ƒæ•´å¤§å°ã€‚\n"
+
+#: misc/mke2fs.c:1026 misc/mke2fs.c:1035
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "无效的根目录所有者:\"%s\"\n"
+
+#: misc/mke2fs.c:1080
+#, c-format
+msgid "Invalid encoding: %s"
+msgstr "无效的编ç ï¼š%s"
+
+#: misc/mke2fs.c:1098
+#, c-format
+msgid ""
+"\n"
+"Bad option(s) specified: %s\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tmmp_update_interval=<interval>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\toffset=<offset to create the file system>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tpacked_meta_blocks=<0 to disable, 1 to enable>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_owner=<uid of root dir>:<gid of root dir>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+"\tquotatype=<quota type(s) to be enabled>\n"
+"\n"
+msgstr ""
+"\n"
+"指定了错误的选项:%s\n"
+"\n"
+"扩展选项由逗å·åˆ†éš”,有些需è¦é€šè¿‡ç­‰å· (\"=\") 传递å‚数。\n"
+"\n"
+"有效的扩展选项有:\n"
+"\tmmp_update_interval=<é—´éš”>\n"
+"\tnum_backup_sb=<0|1|2>\n"
+"\tstride=<RAID æ¯ä¸ªç£ç›˜çš„æ•°æ®å—数(步长)>\n"
+"\tstripe-width=<步长*RAID ç£ç›˜æ•°ï¼ˆå¸¦å®½ï¼‰>\n"
+"\toffset=<文件系统的å移é‡>\n"
+"\tresize=<调整大å°çš„最大值(å—)>\n"
+"\tpacked_meta_blocks=<0(ç¦ç”¨ï¼‰æˆ– 1(å¯ç”¨ï¼‰>\n"
+"\tlazy_itable_init=<0(ç¦ç”¨ï¼‰æˆ– 1(å¯ç”¨ï¼‰>\n"
+"\tlazy_journal_init=<0(ç¦ç”¨ï¼‰æˆ– 1(å¯ç”¨ï¼‰>\n"
+"\troot_owner=<根目录的uid>:<根目录的gid>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tencoding=<ç¼–ç >\n"
+"\tencoding_flags=<标志>\n"
+"\tquotatype=<è¦å¯ç”¨çš„é…é¢ç±»åž‹>\n"
+"\n"
+
+#: misc/mke2fs.c:1125
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"警告:RAID带宽 %u ä¸æ˜¯æ­¥é•¿ %u çš„å¶æ•°å€ã€‚\n"
+"\n"
+
+#: misc/mke2fs.c:1136 misc/tune2fs.c:2284
+#, c-format
+msgid "error: Invalid encoding flag: %s\n"
+msgstr "错误:无效的编ç æ ‡å¿—:%s\n"
+
+#: misc/mke2fs.c:1142 misc/tune2fs.c:2293
+#, c-format
+msgid "error: An encoding must be explicitly specified when passing encoding-flags\n"
+msgstr "错误:传递 encoding-flags 时需è¦æ˜¾å¼æŒ‡å®š encoding\n"
+
+#: misc/mke2fs.c:1192
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"mke2fs é…置文件中有语法错误(%s,第 %d 行)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:1205 misc/tune2fs.c:1108
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "设置了无效的文件系统选项:%s\n"
+
+#: misc/mke2fs.c:1217 misc/tune2fs.c:425
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "设置了无效的挂载选项:%s\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"你的 mke2fs.conf 文件中没有定义文件系统类型 %s 。\n"
+
+#: misc/mke2fs.c:1357
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"您å¯èƒ½éœ€è¦å‡çº§ mke2fs.conf 文件。\n"
+"\n"
+
+#: misc/mke2fs.c:1361
+msgid "Aborting...\n"
+msgstr "正在中止...\n"
+
+#: misc/mke2fs.c:1402
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"警告:mke2fs.conf 中未定义文件系统类型 %s\n"
+"\n"
+
+#: misc/mke2fs.c:1591
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "无法为新的 PATH 分é…内存。\n"
+
+#: misc/mke2fs.c:1628
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "无法æˆåŠŸåˆå§‹åŒ–é…置(错误:%ld)。\n"
+
+#: misc/mke2fs.c:1661
+#, c-format
+msgid "invalid block size - %s"
+msgstr "无效的å—å¤§å° - %s"
+
+#: misc/mke2fs.c:1665
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "警告:å—å¤§å° %d 在很多系统中无法使用。\n"
+
+#: misc/mke2fs.c:1681
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "æ— æ•ˆçš„ç°‡å¤§å° - %s"
+
+#: misc/mke2fs.c:1694
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "\"-R\" 选项已被废弃,请使用 \"-E\" 选项"
+
+#: misc/mke2fs.c:1708 misc/tune2fs.c:1874
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "出错行为有误 - %s"
+
+#: misc/mke2fs.c:1720
+msgid "Illegal number for blocks per group"
+msgstr "éžæ³•çš„æ¯ç»„å—æ•°"
+
+#: misc/mke2fs.c:1725
+msgid "blocks per group must be multiple of 8"
+msgstr "æ¯ç»„å—数必须是 8 çš„å€æ•°"
+
+#: misc/mke2fs.c:1733
+msgid "Illegal number for flex_bg size"
+msgstr "éžæ³•çš„ flex_bg 大å°"
+
+#: misc/mke2fs.c:1739
+msgid "flex_bg size must be a power of 2"
+msgstr "flex_bg 的大å°å¿…须是 2 的幂"
+
+#: misc/mke2fs.c:1744
+#, c-format
+msgid "flex_bg size (%lu) must be less than or equal to 2^31"
+msgstr "flex_bg çš„å¤§å° (%lu) å¿…é¡»å°äºŽç­‰äºŽ 2^31"
+
+#: misc/mke2fs.c:1754
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "无效的 inode 比 %sï¼ˆæœ€å° %d/最大 %d)"
+
+#: misc/mke2fs.c:1764
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "无效的 inode å¤§å° - %s"
+
+#: misc/mke2fs.c:1779
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "警告:-K 选项已被废弃,ä¸åº”当å†è¢«ä½¿ç”¨ã€‚请使用扩展选项 \"-E nodiscard\" 作为替代ï¼\n"
+
+#: misc/mke2fs.c:1790
+msgid "in malloc for bad_blocks_filename"
+msgstr "为 bad_blocks_filename 分é…内存时"
+
+#: misc/mke2fs.c:1799
+#, c-format
+msgid ""
+"Warning: label too long; will be truncated to '%s'\n"
+"\n"
+msgstr ""
+"警告:标签太长;将截短为 \"%s\"\n"
+"\n"
+
+#: misc/mke2fs.c:1808
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "无效的ä¿ç•™å—百分比 - %s"
+
+#: misc/mke2fs.c:1823
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "错误的 inode 数 - %s"
+
+#: misc/mke2fs.c:1836
+msgid "while allocating fs_feature string"
+msgstr "åˆ†é… fs_feature 字符串时"
+
+#: misc/mke2fs.c:1853
+#, c-format
+msgid "bad revision level - %s"
+msgstr "é”™è¯¯çš„ç‰ˆæœ¬å· - %s"
+
+#: misc/mke2fs.c:1858
+#, c-format
+msgid "while trying to create revision %d"
+msgstr "å°è¯•åˆ›å»ºç‰ˆæœ¬ %d æ—¶"
+
+#: misc/mke2fs.c:1872
+msgid "The -t option may only be used once"
+msgstr "-t 选项åªèƒ½è¢«æŒ‡å®šä¸€æ¬¡"
+
+#: misc/mke2fs.c:1880
+msgid "The -T option may only be used once"
+msgstr "-T 选项åªèƒ½è¢«æŒ‡å®šä¸€æ¬¡"
+
+#: misc/mke2fs.c:1936 misc/mke2fs.c:3401
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "å°è¯•æ‰“开日志设备 %s æ—¶\n"
+
+#: misc/mke2fs.c:1942
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "日志设备的å—å¤§å° (%d) 低于最å°çš„å—å¤§å° %d\n"
+
+#: misc/mke2fs.c:1948
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "使用日志设备的å—大å°ï¼š%d\n"
+
+#: misc/mke2fs.c:1959
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "设备 \"%2$s\" çš„å—æ•° \"%1$s\" 无效"
+
+#: misc/mke2fs.c:1979
+msgid "filesystem"
+msgstr "文件系统"
+
+#: misc/mke2fs.c:1994 lib/support/plausible.c:192
+#, c-format
+msgid "The file %s does not exist and no size was specified.\n"
+msgstr "文件 %s ä¸å­˜åœ¨ï¼Œä¹Ÿæ²¡æœ‰æŒ‡å®šå¤§å°ã€‚\n"
+
+#: misc/mke2fs.c:2006 lib/support/plausible.c:200
+#, c-format
+msgid "Creating regular file %s\n"
+msgstr "创建一般文件 %s\n"
+
+#: misc/mke2fs.c:2011 resize/main.c:512
+msgid "while trying to determine filesystem size"
+msgstr "å°è¯•ç¡®å®šæ–‡ä»¶ç³»ç»Ÿå¤§å°æ—¶"
+
+#: misc/mke2fs.c:2017
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr "无法确定设备大å°ï¼›æ‚¨å¿…须手动指定文件系统大å°\n"
+
+#: misc/mke2fs.c:2024
+msgid ""
+"Device size reported to be zero. Invalid partition specified, or\n"
+"\tpartition table wasn't reread after running fdisk, due to\n"
+"\ta modified partition being busy and in use. You may need to reboot\n"
+"\tto re-read your partition table.\n"
+msgstr ""
+"设备大å°ä¸ºé›¶ã€‚å¯èƒ½æ˜¯æŒ‡å®šäº†æ— æ•ˆçš„设备,或是分区表在\n"
+"\t执行 fdisk åŽæœªè¢«é‡æ–°åŠ è½½ï¼ˆåˆ†åŒºæ­£è¢«å ç”¨ï¼‰å¯¼è‡´çš„。\n"
+"\t您å¯èƒ½éœ€è¦é‡å¯ï¼Œä»¥é‡æ–°è¯»å–分区表。\n"
+
+#: misc/mke2fs.c:2041
+msgid "Filesystem larger than apparent device size."
+msgstr "文件系统大å°è¶…过设备的实际大å°ã€‚"
+
+#: misc/mke2fs.c:2064
+msgid "Failed to parse fs types list\n"
+msgstr "解æžæ–‡ä»¶ç³»ç»Ÿç±»åž‹åˆ—表失败\n"
+
+#: misc/mke2fs.c:2114
+msgid "The HURD does not support the filetype feature.\n"
+msgstr "HURD ä¸æ”¯æŒ filetype 特性。\n"
+
+#: misc/mke2fs.c:2119
+msgid "The HURD does not support the huge_file feature.\n"
+msgstr "HURD ä¸æ”¯æŒ huge_file 特性。\n"
+
+#: misc/mke2fs.c:2124
+msgid "The HURD does not support the metadata_csum feature.\n"
+msgstr "HURD ä¸æ”¯æŒ metadata_csum 特性。\n"
+
+#: misc/mke2fs.c:2129
+msgid "The HURD does not support the ea_inode feature.\n"
+msgstr "HURD ä¸æ”¯æŒ ea_inode 特性。\n"
+
+#: misc/mke2fs.c:2139
+msgid "while trying to determine hardware sector size"
+msgstr "å°è¯•ç¡®å®šç¡¬ä»¶æ‰‡åŒºå¤§å°æ—¶"
+
+#: misc/mke2fs.c:2145
+msgid "while trying to determine physical sector size"
+msgstr "å°è¯•ç¡®å®šç‰©ç†æ‰‡åŒºå¤§å°æ—¶"
+
+#: misc/mke2fs.c:2177
+msgid "while setting blocksize; too small for device\n"
+msgstr "设置å—大å°æ—¶ï¼›å¯¹äºŽè®¾å¤‡æ¥è¯´å¤ªå°\n"
+
+#: misc/mke2fs.c:2182
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "警告:指定的å—å¤§å° %d å°äºŽè®¾å¤‡ç‰©ç†æ‰‡åŒºå¤§å° %d\n"
+
+#: misc/mke2fs.c:2206
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
+"\tin 32 bits using a blocksize of %d.\n"
+msgstr ""
+"%1$s: 使用的å—大å°ä¸º %4$d 时,设备 %3$s 的尺寸\n"
+"(0x%2$llx 个å—)太大,无法用 32 ä½æ•´æ•°è¡¨ç¤ºã€‚\n"
+
+#: misc/mke2fs.c:2220
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+"%1$s: 使用的å—大å°ä¸º %4$d 时,设备 %3$s 的尺寸\n"
+"(0x%2$llx 个å—)太大,无法创建文件系统。\n"
+
+#: misc/mke2fs.c:2242
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "mke2fs.conf 中有关文件系统类型的解释:"
+
+#: misc/mke2fs.c:2249
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"文件系统版本 0 ä¸æ”¯æŒæ–‡ä»¶ç³»ç»Ÿç‰¹æ€§\n"
+"\n"
+
+#: misc/mke2fs.c:2257
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "文件系统版本 0 ä¸æ”¯æŒç¨€ç–超级å—\n"
+
+#: misc/mke2fs.c:2267
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "文件系统版本 0 ä¸æ”¯æŒæ—¥å¿—\n"
+
+#: misc/mke2fs.c:2280
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "无效的ä¿ç•™å—百分比 - %lf"
+
+#: misc/mke2fs.c:2297
+msgid "Extents MUST be enabled for a 64-bit filesystem. Pass -O extents to rectify.\n"
+msgstr "64 ä½æ–‡ä»¶ç³»ç»Ÿå¿…é¡»å¯ç”¨ extent 特性。请使用 \"-O extents\" 选项æ¥ä¿®æ­£ã€‚\n"
+
+#: misc/mke2fs.c:2317
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr "簇大å°ä¸èƒ½å°äºŽå—大å°ã€‚\n"
+
+#: misc/mke2fs.c:2323
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "指定簇大å°éœ€è¦å¯ç”¨ bigalloc 特性"
+
+#: misc/mke2fs.c:2343
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "警告:无法获å–设备 %s 的几何å‚æ•°\n"
+
+#: misc/mke2fs.c:2355
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "%s 未对é½ï¼Œå移了 %lu 个字节。\n"
+
+#: misc/mke2fs.c:2357
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr "è¿™å¯èƒ½å¯¼è‡´æ€§èƒ½æ˜Žæ˜¾ä¸‹é™ï¼Œå»ºè®®é‡æ–°è¿›è¡Œåˆ†åŒºã€‚\n"
+
+#: misc/mke2fs.c:2363
+#, c-format
+msgid "%s is capable of DAX but current block size %u is different from system page size %u so filesystem will not support DAX.\n"
+msgstr "%s æ”¯æŒ DAX,但当å‰çš„å—å¤§å° %u 与系统的页é¢å¤§å° %u ä¸åŒï¼Œæ‰€ä»¥æ–‡ä»¶ç³»ç»Ÿå°†ä¸æ”¯æŒ DAX。\n"
+
+#: misc/mke2fs.c:2387
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d 字节的å—对于系统æ¥è¯´å¤ªå¤§ï¼ˆæœ€å¤§ä¸º %d)"
+
+#: misc/mke2fs.c:2391
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "警告:%d 字节的å—对于系统æ¥è¯´å¤ªå¤§ï¼ˆæœ€å¤§ä¸º %d),但ä»ç„¶å¼ºåˆ¶è¿›è¡Œæ“作\n"
+
+#: misc/mke2fs.c:2399
+#, c-format
+msgid "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.\n"
+msgstr "建议:使用 3.18 以上的 Linux 内核以æ高元数æ®ç¨³å®šæ€§ï¼Œä»¥åŠä½¿ç”¨æ—¥å¿—校验和特性。\n"
+
+#: misc/mke2fs.c:2445
+#, c-format
+msgid "Unknown filename encoding from profile: %s"
+msgstr "é…置中的文件åç¼–ç æœªçŸ¥ï¼š%s"
+
+#: misc/mke2fs.c:2456
+#, c-format
+msgid "Unknown encoding flags from profile: %s"
+msgstr "é…置中的编ç æ ‡å¿—未知:%s"
+
+#: misc/mke2fs.c:2481
+#, c-format
+msgid ""
+"\n"
+"Warning: offset specified without an explicit file system size.\n"
+"Creating a file system with %llu blocks but this might\n"
+"not be what you want.\n"
+"\n"
+msgstr ""
+"\n"
+"警告:指定了å移é‡ï¼Œä½†æ²¡æœ‰æ˜¾å¼æŒ‡å®šæ–‡ä»¶ç³»ç»Ÿå¤§å°ã€‚\n"
+"将创建å«æœ‰ %llu 个å—的文件系统,这å¯èƒ½ä¸Žæ‚¨çš„预期ä¸ç¬¦ã€‚\n"
+"\n"
+
+#: misc/mke2fs.c:2496
+#, c-format
+msgid "%d byte inodes are too small for project quota"
+msgstr "%d 字节的 inode 对于项目é…é¢æ¥è¯´å¤ªå°"
+
+#: misc/mke2fs.c:2518
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "æ— æ³•åœ¨ç¼ºä¹ extent ç‰¹æ€§çš„æƒ…å†µä¸‹æ”¯æŒ bigalloc 特性"
+
+#: misc/mke2fs.c:2525
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"resize_inode å’Œ meta_bg 特性ä¸å…¼å®¹ã€‚\n"
+"无法åŒæ—¶å¯ç”¨å®ƒä»¬ã€‚\n"
+
+#: misc/mke2fs.c:2534
+msgid ""
+"\n"
+"Warning: bigalloc file systems with a cluster size greater than\n"
+"16 times the block size is considered experimental\n"
+msgstr ""
+"\n"
+"警告:簇大å°å¤§äºŽå—大å°çš„ 16 å€çš„ bigalloc 文件系统\n"
+"被认为是实验性的\n"
+
+#: misc/mke2fs.c:2546
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr "éžç¨€ç–文件系统ä¸æ”¯æŒä¸ºåœ¨çº¿è°ƒæ•´å¤§å°è®¾ç½®ä¿ç•™å—"
+
+#: misc/mke2fs.c:2555
+msgid "blocks per group count out of range"
+msgstr "æ¯ç»„å—数超过å…许范围"
+
+#: misc/mke2fs.c:2577
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "flex_bg 特性未å¯ç”¨ï¼Œæ‰€ä»¥æ— æ³•æŒ‡å®š flex_bg 尺寸"
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "无效的 inode å¤§å° %dï¼ˆæœ€å° %d/最大 %d)"
+
+#: misc/mke2fs.c:2604
+#, c-format
+msgid "%d byte inodes are too small for inline data; specify larger size"
+msgstr "%d 字节的 inode 对于内è”æ•°æ®æ¥è¯´å¤ªå°ï¼›è¯·æŒ‡å®šä¸€ä¸ªæ›´å¤§çš„值"
+
+#: misc/mke2fs.c:2619
+#, c-format
+msgid "128-byte inodes cannot handle dates beyond 2038 and are deprecated\n"
+msgstr "128 ä½ inode ä¸èƒ½å¤„ç† 2038 年以åŽçš„日期,已被废弃\n"
+
+#: misc/mke2fs.c:2630
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "inode 太多 (%llu),是å¦æ高 inode 比?"
+
+#: misc/mke2fs.c:2638
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "inode 太多 (%llu),请指定å°äºŽ 2^32 çš„ inode æ•°"
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid ""
+"inode_size (%u) * inodes_count (%u) too big for a\n"
+"\tfilesystem with %llu blocks, specify higher inode_ratio (-i)\n"
+"\tor lower inode count (-N).\n"
+msgstr ""
+"inode å¤§å° (%u) * inode æ•° (%u) 对于å«æœ‰ %llu 个å—\n"
+"\t的文件系统æ¥è¯´å¤ªå¤§ï¼Œè¯·æŒ‡å®šæ›´é«˜çš„ inode 比 (-i)\n"
+"\t或更少的 inode 数 (-N)。\n"
+
+#: misc/mke2fs.c:2849
+msgid "Discarding device blocks: "
+msgstr "丢弃设备å—:"
+
+#: misc/mke2fs.c:2865
+msgid "failed - "
+msgstr "已失败 - "
+
+#: misc/mke2fs.c:2924
+msgid "while initializing quota context"
+msgstr "åˆå§‹åŒ–é…é¢ä¸Šä¸‹æ–‡æ—¶"
+
+#: misc/mke2fs.c:2931
+msgid "while writing quota inodes"
+msgstr "写入é…é¢ inode æ—¶"
+
+#: misc/mke2fs.c:2956
+#, c-format
+msgid "bad error behavior in profile - %s"
+msgstr "é…置中的出错行为有误 - %s"
+
+#: misc/mke2fs.c:3035
+msgid "in malloc for android_sparse_params"
+msgstr "为 android_sparse_params 分é…内存时"
+
+#: misc/mke2fs.c:3049
+msgid "while setting up superblock"
+msgstr "设置超级å—æ—¶"
+
+#: misc/mke2fs.c:3065
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Pass -O extents to rectify.\n"
+msgstr "未å¯ç”¨ extent 特性,所以仅对文件 extent 树进行校验,而ä¸ä¼šå¯¹å—映射进行校验。ä¸å¯ç”¨ extent å°†é™ä½Žå…ƒæ•°æ®æ ¡éªŒå’Œçš„覆盖范围。å¯ä»¥ä½¿ç”¨å‚æ•° \"-O extents\" æ¥è¿›è¡Œçº æ­£ã€‚\n"
+
+#: misc/mke2fs.c:3072
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.\n"
+msgstr "未å¯ç”¨ 64 ä½æ–‡ä»¶ç³»ç»Ÿæ”¯æŒï¼Œå°†æ— æ³•ä½¿ç”¨æ›´å¤§çš„字段æ¥è¿›è¡Œæ›´å®Œæ•´çš„校验。å¯ä»¥ä½¿ç”¨å‚æ•° \"-O 64bit\" æ¥è¿›è¡Œçº æ­£ã€‚\n"
+
+#: misc/mke2fs.c:3080
+msgid "The metadata_csum_seed feature requires the metadata_csum feature.\n"
+msgstr "å¯ç”¨ metadata_csum_seed 特性需è¦åŒæ—¶å¯ç”¨ metadata_csum 特性。\n"
+
+#: misc/mke2fs.c:3104
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr "èˆå¼ƒæˆåŠŸï¼Œå°†ä¼šè¿”回 0 值 - 跳过擦除 inode 表\n"
+
+#: misc/mke2fs.c:3203
+#, c-format
+msgid "unknown os - %s"
+msgstr "未知的æ“作系统 - %s"
+
+#: misc/mke2fs.c:3266
+msgid "Allocating group tables: "
+msgstr "正在分é…组表:"
+
+#: misc/mke2fs.c:3274
+msgid "while trying to allocate filesystem tables"
+msgstr "å°è¯•åˆ†é…文件系统表时"
+
+#: misc/mke2fs.c:3289
+msgid "while unmarking bad blocks"
+msgstr "å–消åå—标记时"
+
+#: misc/mke2fs.c:3300
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\t转æ¢å­ç°‡ä½å›¾æ—¶"
+
+#: misc/mke2fs.c:3309
+msgid "while calculating overhead"
+msgstr "计算é¢å¤–开销时"
+
+#: misc/mke2fs.c:3328
+#, c-format
+msgid "%s may be further corrupted by superblock rewrite\n"
+msgstr "%s å¯èƒ½å› ä¸ºé‡å†™è¶…级å—而å—到进一步æŸå\n"
+
+#: misc/mke2fs.c:3369
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "å¯¹æ–‡ä»¶ç³»ç»Ÿæœ«å°¾çš„å— %llu 填零时"
+
+#: misc/mke2fs.c:3382
+msgid "while reserving blocks for online resize"
+msgstr "为在线调整大å°ä¿ç•™å—æ—¶"
+
+#: misc/mke2fs.c:3394 misc/tune2fs.c:1570
+msgid "journal"
+msgstr "日志"
+
+#: misc/mke2fs.c:3406
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "将日志添加到设备 %s:"
+
+#: misc/mke2fs.c:3413
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tå°è¯•å°†æ—¥å¿—添加到设备 %s æ—¶"
+
+#: misc/mke2fs.c:3418 misc/mke2fs.c:3448 misc/mke2fs.c:3490
+#: misc/mk_hugefiles.c:602 misc/tune2fs.c:1599 misc/tune2fs.c:1621
+msgid "done\n"
+msgstr "完æˆ\n"
+
+#: misc/mke2fs.c:3425
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "跳过创建日志的步骤(唯超级å—模å¼ï¼‰\n"
+
+#: misc/mke2fs.c:3435
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "创建日志(%u 个å—):"
+
+#: misc/mke2fs.c:3444
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tå°è¯•åˆ›å»ºæ—¥å¿—æ—¶"
+
+#: misc/mke2fs.c:3456 misc/tune2fs.c:1173
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"å¯ç”¨å¤šé‡æŒ‚è½½ä¿æŠ¤ç‰¹æ€§å¤±è´¥ã€‚"
+
+#: misc/mke2fs.c:3461
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "多é‡æŒ‚è½½ä¿æŠ¤å·²è¢«å¯ç”¨ï¼Œæ›´æ–°é—´éš”为 %d 秒。\n"
+
+#: misc/mke2fs.c:3481
+msgid "Copying files into the device: "
+msgstr "将文件å¤åˆ¶åˆ°è®¾å¤‡ï¼š"
+
+#: misc/mke2fs.c:3487
+msgid "while populating file system"
+msgstr "填充文件系统时"
+
+#: misc/mke2fs.c:3494
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "写入超级å—和文件系统账户统计信æ¯ï¼š"
+
+#: misc/mke2fs.c:3501
+msgid "while writing out and closing file system"
+msgstr "写出并关闭文件系统时"
+
+#: misc/mke2fs.c:3504
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"已完æˆ\n"
+"\n"
+
+#: misc/mk_hugefiles.c:339
+#, c-format
+msgid "while zeroing block %llu for hugefile"
+msgstr "å¯¹å¤§æ–‡ä»¶çš„å— %llu 填零时"
+
+#: misc/mk_hugefiles.c:516
+#, c-format
+msgid "Partition offset of %llu (%uk) blocks not compatible with cluster size %u.\n"
+msgstr "分区åç§»é‡ %llu (%uk) å—ä¸Žç°‡å¤§å° %u ä¸ç›¸å®¹ã€‚\n"
+
+#: misc/mk_hugefiles.c:584
+msgid "Huge files will be zero'ed\n"
+msgstr "将对大文件填零\n"
+
+#: misc/mk_hugefiles.c:585
+#, c-format
+msgid "Creating %lu huge file(s) "
+msgstr "创建 %lu 个大文件"
+
+#: misc/mk_hugefiles.c:587
+#, c-format
+msgid "with %llu blocks each"
+msgstr "æ¯ä¸ªä½¿ç”¨ %llu 个å—"
+
+#: misc/mk_hugefiles.c:597
+#, c-format
+msgid "while creating huge file %lu"
+msgstr "创建大文件 %lu 时"
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr "用法:mklost+found\n"
+
+#: misc/partinfo.c:43
+#, c-format
+msgid ""
+"Usage: %s device...\n"
+"\n"
+"Prints out the partition information for each given device.\n"
+"For example: %s /dev/hda\n"
+"\n"
+msgstr ""
+"用法:%s 设备...\n"
+"\n"
+"输出æ¯ä¸ªç»™å®šè®¾å¤‡çš„分区信æ¯.\n"
+"例如:%s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:53
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "无法打开 %s:%s"
+
+#: misc/partinfo.c:59
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "æ— æ³•èŽ·å– %s 的几何å‚数:%s"
+
+#: misc/partinfo.c:67
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "无法获得 %s 的大å°ï¼š%s"
+
+#: misc/partinfo.c:73
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d start=%8d size=%8lu end=%8d\n"
+msgstr "%s: ç£å¤´=%3d 扇区=%3d 柱é¢=%4d 起始=%8d 大å°=%8lu 终止=%8d\n"
+
+#: misc/tune2fs.c:121
+msgid ""
+"\n"
+"This operation requires a freshly checked filesystem.\n"
+msgstr ""
+"\n"
+"æ­¤æ“作è¦æ±‚文件系统刚刚被检查过。\n"
+
+#: misc/tune2fs.c:123
+msgid "Please run e2fsck -f on the filesystem.\n"
+msgstr "请在这个文件系统上è¿è¡Œ e2fsck -f。\n"
+
+#: misc/tune2fs.c:125
+msgid "Please run e2fsck -fD on the filesystem.\n"
+msgstr "请在这个文件系统上è¿è¡Œ e2fsck -fD。\n"
+
+#: misc/tune2fs.c:138
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+"\t[-L volume_label] [-M last_mounted_dir]\n"
+"\t[-O [^]feature[,...]] [-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[-I new_inode_size] [-z undo_file] device\n"
+msgstr ""
+"用法:%s [-c 最大挂载次数] [-e 出错行为] [-f] [-g 组]\n"
+"\t[-i 间隔[d|m|w]] [-j] [-J 日志选项] [-l]\n"
+"\t[-m ä¿ç•™å—所å ç™¾åˆ†æ¯”] [-o [^]挂载选项[,...]]\n"
+"\t[-r ä¿ç•™å—æ•°] [-u 用户] [-C 挂载次数]\n"
+"\t[-L å·æ ‡][-M 上一次挂载点]\n"
+"\t[-O [^]特性[,...]] [-Q é…é¢é€‰é¡¹]\n"
+"\t[-E 扩展选项[,...]] [-T 上一次检查时间] [-U UUID]\n"
+"\t[ -I æ–°çš„inode大å°] [-z 撤销文件] 设备\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "日志超级å—未找到ï¼\n"
+
+#: misc/tune2fs.c:287
+msgid "while trying to open external journal"
+msgstr "å°è¯•æ‰“开外部日志时"
+
+#: misc/tune2fs.c:293 misc/tune2fs.c:2896
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s ä¸æ˜¯æ—¥å¿—设备。\n"
+
+#: misc/tune2fs.c:302 misc/tune2fs.c:2905
+#, c-format
+msgid ""
+"Journal superblock is corrupted, nr_users\n"
+"is too high (%d).\n"
+msgstr ""
+"日志超级å—å·²æŸå,nr_users\n"
+"过高 (%d)。\n"
+
+#: misc/tune2fs.c:309 misc/tune2fs.c:2912
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "日志设备中未找到文件系统的 UUID。\n"
+
+#: misc/tune2fs.c:333
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"无法定ä½æ—¥å¿—设备。设备未被移除\n"
+"请使用 -f 选项æ¥ç§»é™¤ä¸¢å¤±çš„日志设备。\n"
+
+#: misc/tune2fs.c:342
+msgid "Journal removed\n"
+msgstr "日志已删除\n"
+
+#: misc/tune2fs.c:386
+msgid "while reading bitmaps"
+msgstr "读å–ä½å›¾æ—¶"
+
+#: misc/tune2fs.c:394
+msgid "while clearing journal inode"
+msgstr "清除日志 inode 时"
+
+#: misc/tune2fs.c:407
+msgid "while writing journal inode"
+msgstr "写入日志 inode 时"
+
+#: misc/tune2fs.c:443 misc/tune2fs.c:468 misc/tune2fs.c:481
+msgid "(and reboot afterwards!)\n"
+msgstr "(并且在此之åŽé‡å¯ï¼ï¼‰\n"
+
+#: misc/tune2fs.c:496
+#, c-format
+msgid "After running e2fsck, please run `resize2fs %s %s"
+msgstr "在è¿è¡Œ e2fsck åŽï¼Œè¯·è¿è¡Œ \"resize2fs %s %s"
+
+#: misc/tune2fs.c:499
+#, c-format
+msgid "Please run `resize2fs %s %s"
+msgstr "请è¿è¡Œ \"resize2fs %s %s"
+
+#: misc/tune2fs.c:503
+#, c-format
+msgid " -z \"%s\""
+msgstr " -z \"%s\""
+
+#: misc/tune2fs.c:505
+#, c-format
+msgid "' to enable 64-bit mode.\n"
+msgstr "\" æ¥å¯ç”¨ 64 ä½æ¨¡å¼ã€‚\n"
+
+#: misc/tune2fs.c:507
+#, c-format
+msgid "' to disable 64-bit mode.\n"
+msgstr "\" æ¥ç¦ç”¨ 64 ä½æ¨¡å¼ã€‚\n"
+
+#: misc/tune2fs.c:1075
+msgid ""
+"WARNING: Could not confirm kernel support for metadata_csum_seed.\n"
+" This requires Linux >= v4.4.\n"
+msgstr ""
+"警告:无法确定内核是å¦æ”¯æŒ metadata_csum_seed 特性。\n"
+" 该特性仅被 4.4 以上的 Linux 内核支æŒã€‚\n"
+
+#: misc/tune2fs.c:1111
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "ä¸æ”¯æŒç§»é™¤æ–‡ä»¶ç³»ç»Ÿç‰¹æ€§ \"%s\"。\n"
+
+#: misc/tune2fs.c:1117
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "ä¸æ”¯æŒè®¾ç½®æ–‡ä»¶ç³»ç»Ÿç‰¹æ€§ \"%s\"。\n"
+
+#: misc/tune2fs.c:1126
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr "åªæœ‰å½“文件系统未挂载,或以åªè¯»æ¨¡å¼æŒ‚载时æ‰èƒ½ç§»é™¤å…¶ has_journal 特性。\n"
+
+#: misc/tune2fs.c:1134
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr "å‘现 needs_recovery 标志。请在移除 has_journal 特性å‰è¿è¡Œe2fsck。\n"
+
+#: misc/tune2fs.c:1152
+msgid ""
+"Setting filesystem feature 'sparse_super' not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"å¯ç”¨äº† meta_bg 特性的文件系统ä¸æ”¯æŒ\n"
+"设置 \"sparse_super\" 特性。\n"
+
+#: misc/tune2fs.c:1165
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr "文件系统被挂载或åªè¯»æ—¶æ— æ³•è®¾ç½®å¤šé‡æŒ‚è½½ä¿æŠ¤ç‰¹æ€§ã€‚\n"
+
+#: misc/tune2fs.c:1183
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr "多é‡æŒ‚è½½ä¿æŠ¤å·²è¢«å¯ç”¨ï¼Œæ›´æ–°é—´éš”为 %ds。\n"
+
+#: misc/tune2fs.c:1192
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr "文件系统为åªè¯»çŠ¶æ€æ—¶æ— æ³•ç¦ç”¨å¤šé‡æŒ‚è½½ä¿æŠ¤ç‰¹æ€§ã€‚\n"
+
+#: misc/tune2fs.c:1200
+msgid "Error while reading bitmaps\n"
+msgstr "读å–ä½å›¾æ—¶å‘生错误\n"
+
+#: misc/tune2fs.c:1209
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr "MMP å—的幻数ä¸åŒ¹é…。预期:%x,实际:%x\n"
+
+#: misc/tune2fs.c:1214
+msgid "while reading MMP block."
+msgstr "è¯»å– MMP å—时。"
+
+#: misc/tune2fs.c:1247
+msgid "Disabling directory index on filesystem with checksums could take some time."
+msgstr "在å¯ç”¨æ ¡éªŒå’Œçš„文件系统上ç¦ç”¨ç›®å½•ç´¢å¼•å¯èƒ½éœ€è¦èŠ±è´¹ä¸€äº›æ—¶é—´ã€‚"
+
+#: misc/tune2fs.c:1251
+msgid "Cannot disable dir_index on a mounted filesystem!\n"
+msgstr "无法在已挂载的文件系统上ç¦ç”¨ dir_index 特性ï¼\n"
+
+#: misc/tune2fs.c:1264
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr "清除 flex_bg 标志将会导致文件系统ä¸ä¸€è‡´ã€‚\n"
+
+#: misc/tune2fs.c:1275
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr "åªæœ‰å½“文件系统未挂载,或以åªè¯»æ¨¡å¼æŒ‚载时æ‰èƒ½ç§»é™¤å…¶ huge_file 特性。\n"
+
+#: misc/tune2fs.c:1286
+msgid "Enabling checksums could take some time."
+msgstr "å¯ç”¨æ ¡éªŒå’Œéœ€è¦èŠ±è´¹ä¸€æ®µæ—¶é—´ã€‚"
+
+#: misc/tune2fs.c:1289
+msgid "Cannot enable metadata_csum on a mounted filesystem!\n"
+msgstr "无法在已挂载的文件系统上å¯ç”¨ metadata_csum 特性ï¼\n"
+
+#: misc/tune2fs.c:1295
+msgid "Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.\n"
+msgstr "未å¯ç”¨ extent 特性,所以仅对文件 extent 树进行校验,而ä¸ä¼šå¯¹å—ä½å›¾è¿›è¡Œæ ¡éªŒã€‚ä¸å¯ç”¨ extent å°†é™ä½Žå…ƒæ•°æ®æ ¡éªŒå’Œçš„覆盖范围。å¯ä»¥åŠ ä¸Šå‚æ•° \"-O extents\" é‡æ–°è¿è¡Œæ¥çº æ­£è¿™ä¸€é—®é¢˜ã€‚\n"
+
+#: misc/tune2fs.c:1302
+msgid "64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.\n"
+msgstr "未å¯ç”¨ 64 ä½æ–‡ä»¶ç³»ç»Ÿæ”¯æŒï¼Œå°†æ— æ³•ä½¿ç”¨æ›´å¤§çš„字段æ¥è¿›è¡Œæ›´å®Œæ•´çš„校验。å¯ä»¥è¿è¡Œ \"resize2fs -b\" æ¥çº æ­£è¿™ä¸€é—®é¢˜ã€‚\n"
+
+#: misc/tune2fs.c:1328
+msgid "Disabling checksums could take some time."
+msgstr "ç¦ç”¨æ ¡éªŒå’Œéœ€è¦èŠ±è´¹ä¸€æ®µæ—¶é—´ã€‚"
+
+#: misc/tune2fs.c:1331
+msgid "Cannot disable metadata_csum on a mounted filesystem!\n"
+msgstr "无法在已挂载的文件系统上ç¦ç”¨ metadata_csum 特性ï¼\n"
+
+#: misc/tune2fs.c:1372
+msgid "Cannot enable uninit_bg on a mounted filesystem!\n"
+msgstr "无法在已挂载的文件系统上å¯ç”¨ uninit_bg 特性ï¼\n"
+
+#: misc/tune2fs.c:1387
+msgid "Cannot disable uninit_bg on a mounted filesystem!\n"
+msgstr "无法在已挂载的文件系统上ç¦ç”¨ uninit_bg 特性ï¼\n"
+
+#: misc/tune2fs.c:1406
+#, c-format
+msgid "Cannot enable 64-bit mode while mounted!\n"
+msgstr "无法在已挂载的文件系统上å¯ç”¨ 64 ä½æ¨¡å¼ï¼\n"
+
+#: misc/tune2fs.c:1416
+#, c-format
+msgid "Cannot disable 64-bit mode while mounted!\n"
+msgstr "无法在已挂载的文件系统上ç¦ç”¨ 64 ä½æ¨¡å¼ï¼\n"
+
+#: misc/tune2fs.c:1446
+#, c-format
+msgid "Cannot enable project feature; inode size too small.\n"
+msgstr "无法å¯ç”¨é¡¹ç›®ç‰¹æ€§ï¼›inode 大å°å¤ªå°ã€‚\n"
+
+#: misc/tune2fs.c:1467
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"警告:\"^quota\" 选项将覆盖 \"-Q\" çš„å‚数。\n"
+
+#: misc/tune2fs.c:1484 misc/tune2fs.c:2246
+msgid "The casefold feature may only be enabled when the filesystem is unmounted.\n"
+msgstr "åªæœ‰å½“文件系统未挂载时æ‰èƒ½å¯ç”¨ casefold 特性。\n"
+
+#: misc/tune2fs.c:1496
+msgid ""
+"Setting feature 'metadata_csum_seed' is only supported\n"
+"on filesystems with the metadata_csum feature enabled.\n"
+msgstr ""
+"åªæœ‰åœ¨å¯ç”¨äº† metadata_csum 特性的文件系统æ‰æ”¯æŒ\n"
+"\"metadata_csum_seed\" 特性。\n"
+
+#: misc/tune2fs.c:1514
+msgid ""
+"UUID has changed since enabling metadata_csum. Filesystem must be unmounted \n"
+"to safely rewrite all metadata to match the new UUID.\n"
+msgstr ""
+"å¯ç”¨ metadata_csum ç‰¹æ€§åŽ UUID 被改å˜ã€‚å¿…é¡»å¸è½½æ–‡ä»¶ç³»ç»Ÿä»¥å®‰å…¨åœ°æ”¹å†™æ‰€æœ‰å…ƒæ•°æ®ï¼Œä»¥ä¾¿\n"
+"与新的 UUID 相匹é…。\n"
+
+#: misc/tune2fs.c:1520
+msgid "Recalculating checksums could take some time."
+msgstr "é‡æ–°è®¡ç®—校验和å¯èƒ½éœ€è¦èŠ±è´¹ä¸€äº›æ—¶é—´ã€‚"
+
+#: misc/tune2fs.c:1563
+msgid "The filesystem already has a journal.\n"
+msgstr "文件系统已有日志。\n"
+
+#: misc/tune2fs.c:1583
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tå°è¯•æ‰“å¼€ä½äºŽ %s 的日志时\n"
+
+#: misc/tune2fs.c:1587
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "在设备 %s 上创建日志:"
+
+#: misc/tune2fs.c:1595
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "将文件系统添加到 %s 上的日志"
+
+#: misc/tune2fs.c:1601
+msgid "Creating journal inode: "
+msgstr "创建日志 inode:"
+
+#: misc/tune2fs.c:1615
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tå°è¯•åˆ›å»ºæ—¥å¿—文件时"
+
+#: misc/tune2fs.c:1657
+#, c-format
+msgid "Cannot enable project quota; inode size too small.\n"
+msgstr "无法å¯ç”¨é¡¹ç›®é…é¢ï¼›inode 大å°å¤ªå°ã€‚\n"
+
+#: misc/tune2fs.c:1670
+msgid "while initializing quota context in support library"
+msgstr "åˆå§‹åŒ–支æŒåº“中的é…é¢ä¸Šä¸‹æ–‡æ—¶"
+
+#: misc/tune2fs.c:1686
+#, c-format
+msgid "while updating quota limits (%d)"
+msgstr "æ›´æ–°é…é¢é™åˆ¶ (%d) æ—¶"
+
+#: misc/tune2fs.c:1696
+#, c-format
+msgid "while writing quota file (%d)"
+msgstr "写入é…é¢æ–‡ä»¶ (%d) æ—¶"
+
+#: misc/tune2fs.c:1714
+#, c-format
+msgid "while removing quota file (%d)"
+msgstr "移除é…é¢æ–‡ä»¶ (%d) æ—¶"
+
+#: misc/tune2fs.c:1757
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"指定了错误的é…é¢é€‰é¡¹ã€‚\n"
+"\n"
+"å¯ä»¥ä½¿ç”¨ä¸‹åˆ—é…é¢é€‰é¡¹ï¼ˆé€šè¿‡é€—å·åˆ†éš”):\n"
+"\t[^]usr[quota]\n"
+"\t[^]grp[quota]\n"
+"\t[^]prj[quota]\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:1815
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "无法解æžæ—¥æœŸ/时间æ述符:%s"
+
+#: misc/tune2fs.c:1847 misc/tune2fs.c:1858
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "错误的挂载计数 - %s"
+
+#: misc/tune2fs.c:1901
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "错误的 gid/组å - %s"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "bad interval - %s"
+msgstr "错误的间隔 - %s"
+
+#: misc/tune2fs.c:1963
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "错误的ä¿ç•™å—比 - %s"
+
+#: misc/tune2fs.c:1978
+msgid "-o may only be specified once"
+msgstr "-o åªèƒ½è¢«æŒ‡å®šä¸€æ¬¡"
+
+#: misc/tune2fs.c:1987
+msgid "-O may only be specified once"
+msgstr "-O åªèƒ½è¢«æŒ‡å®šä¸€æ¬¡"
+
+#: misc/tune2fs.c:2004
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "错误的ä¿ç•™å—æ•° - %s"
+
+#: misc/tune2fs.c:2033
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "错误的 uid/用户å - %s"
+
+#: misc/tune2fs.c:2050
+#, c-format
+msgid "bad inode size - %s"
+msgstr "无效的 inode å¤§å° - %s"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Inode 大å°å¿…须是 2 的幂 - %s"
+
+#: misc/tune2fs.c:2157
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_internal 太大:%lu\n"
+
+#: misc/tune2fs.c:2162
+#, c-format
+msgid "Setting multiple mount protection update interval to %lu second\n"
+msgid_plural "Setting multiple mount protection update interval to %lu seconds\n"
+msgstr[0] "设置多é‡æŒ‚è½½ä¿æŠ¤æ›´æ–°é—´éš”为 %lu 秒\n"
+
+#: misc/tune2fs.c:2171
+#, c-format
+msgid "Setting filesystem error flag to force fsck.\n"
+msgstr "设置文件系统错误标志以强制 fsck。\n"
+
+#: misc/tune2fs.c:2189
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "无效的 RAID 步长:%s\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "无效的 RAID 带宽:%s\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "无效的 hash 算法:%s\n"
+
+#: misc/tune2fs.c:2225
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "将默认 hash 算法设置为 %s (%d)\n"
+
+#: misc/tune2fs.c:2252
+#, c-format
+msgid "Cannot alter existing encoding\n"
+msgstr "无法更改已存在的编ç \n"
+
+#: misc/tune2fs.c:2258
+#, c-format
+msgid "Invalid encoding: %s\n"
+msgstr "无效的编ç ï¼š%s\n"
+
+#: misc/tune2fs.c:2264
+#, c-format
+msgid "Setting encoding to '%s'\n"
+msgstr "设置编ç ä¸º \"%s\"\n"
+
+#: misc/tune2fs.c:2288
+#, c-format
+msgid "Setting encoding_flags to '%s'\n"
+msgstr "设置 encoding_flags 为 \"%s\"\n"
+
+#: misc/tune2fs.c:2298
+msgid ""
+"\n"
+"Bad options specified.\n"
+"\n"
+"Extended options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid extended options are:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash algorithm>\n"
+"\tmount_opts=<extended default mount options>\n"
+"\tmmp_update_interval=<mmp update interval in seconds>\n"
+"\tstride=<RAID per-disk chunk size in blocks>\n"
+"\tstripe_width=<RAID stride*data disks in blocks>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<encoding>\n"
+"\tencoding_flags=<flags>\n"
+msgstr ""
+"\n"
+"指定了错误的选项。\n"
+"\n"
+"扩展选项由逗å·åˆ†éš”,有些需è¦é€šè¿‡ç­‰å· (\"=\") 传递å‚数。\n"
+"\n"
+"有效的扩展选项有:\n"
+"\tclear_mmp\n"
+"\thash_alg=<hash 算法>\n"
+"\tmount_opts=<扩展的默认挂载选项>\n"
+"\tmmp_update_interval=<以秒表示的 mmp 更新间隔>\n"
+"\tstride=<RAID æ¯ä¸ªç£ç›˜çš„æ•°æ®å—数(步长)>\n"
+"\tstripe_width=<步长*RAID ç£ç›˜æ•°ï¼ˆå¸¦å®½ï¼‰>\n"
+"\tforce_fsck\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+"\tencoding=<ç¼–ç >\n"
+"\tencoding_flags=<标志>\n"
+"\n"
+
+#: misc/tune2fs.c:2714
+msgid "Failed to read inode bitmap\n"
+msgstr "è¯»å– inode ä½å›¾å¤±è´¥\n"
+
+#: misc/tune2fs.c:2719
+msgid "Failed to read block bitmap\n"
+msgstr "读å–å—ä½å›¾å¤±è´¥\n"
+
+#: misc/tune2fs.c:2736 resize/resize2fs.c:1372
+msgid "blocks to be moved"
+msgstr "需è¦ç§»åŠ¨çš„å—"
+
+#: misc/tune2fs.c:2739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "增加 inode 大å°æ—¶åˆ†é…å—ä½å›¾å¤±è´¥\n"
+
+#: misc/tune2fs.c:2745
+msgid "Not enough space to increase inode size \n"
+msgstr "没有足够的空间用于增加 inode 大å°\n"
+
+#: misc/tune2fs.c:2750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "调整 inode 大å°æ—¶é‡å®šä½å—失败 \n"
+
+#: misc/tune2fs.c:2782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"调整 inode 大å°æ—¶å‡ºé”™ã€‚\n"
+"请è¿è¡Œ e2undo æ¥æ’¤é”€å¯¹æ–‡ä»¶ç³»ç»Ÿçš„更改。\n"
+
+#: misc/tune2fs.c:2995
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+"如果您确定文件系统并没有挂载到任何节点上,请è¿è¡Œï¼š\n"
+"\"tune2fs -f -E clear_mmp {设备}\"\n"
+
+#: misc/tune2fs.c:3002
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"MMP å—幻数错误。请å°è¯•è¿è¡Œä»¥ä¸‹å‘½ä»¤æ¥ä¿®å¤ï¼š\n"
+"\"e2fsck -f %s\"\n"
+
+#: misc/tune2fs.c:3014
+msgid "Cannot modify a journal device.\n"
+msgstr "无法修改日志设备。\n"
+
+#: misc/tune2fs.c:3027
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "inode 大å°å·²ç»ä¸º %lu\n"
+
+#: misc/tune2fs.c:3034
+msgid "Shrinking inode size is not supported\n"
+msgstr "ä¸æ”¯æŒç¼©å° inode 大å°\n"
+
+#: misc/tune2fs.c:3039
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "无效的 inode å¤§å° %lu(最大 %d)\n"
+
+#: misc/tune2fs.c:3045
+msgid "Resizing inodes could take some time."
+msgstr "调整 inode 大å°å¯èƒ½éœ€è¦èŠ±è´¹ä¸€æ®µæ—¶é—´ã€‚"
+
+#: misc/tune2fs.c:3094
+#, c-format
+msgid ""
+"Warning: The journal is dirty. You may wish to replay the journal like:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"then rerun this command. Otherwise, any changes made may be overwritten\n"
+"by journal recovery.\n"
+msgstr ""
+"警告:日志是è„的。您å¯èƒ½éœ€è¦é‡æ”¾æ—¥å¿—,如:\n"
+"\n"
+"\te2fsck -E journal_only %s\n"
+"\n"
+"然åŽé‡æ–°è¿è¡Œæœ¬å‘½ä»¤ã€‚å¦åˆ™ï¼Œä»»ä½•æ‰€åšçš„更改都å¯èƒ½è¢«æ—¥å¿—æ¢å¤æ“作所覆盖。\n"
+
+#: misc/tune2fs.c:3103
+#, c-format
+msgid "Recovering journal.\n"
+msgstr "正在æ¢å¤æ—¥å¿—。\n"
+
+#: misc/tune2fs.c:3125
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "设置最大挂载次数为 %d\n"
+
+#: misc/tune2fs.c:3131
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "设置当å‰æŒ‚载次数为 %d\n"
+
+#: misc/tune2fs.c:3136
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "将出错行为设置为 %d\n"
+
+#: misc/tune2fs.c:3141
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "设置ä¿ç•™å—çš„ gid 为 %lu\n"
+
+#: misc/tune2fs.c:3146
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "检查间隔太长 (%lu)"
+
+#: misc/tune2fs.c:3153
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "将检查间隔设置为 %lu 秒\n"
+
+#: misc/tune2fs.c:3160
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "å°†ä¿ç•™å—百分比设置为 %g%%(%llu 个å—)\n"
+
+#: misc/tune2fs.c:3167
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "ä¿ç•™å—çš„æ•°é‡å¤ªå¤§ (%llu)"
+
+#: misc/tune2fs.c:3174
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "设置ä¿ç•™å—数为 %llu\n"
+
+#: misc/tune2fs.c:3179
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"文件系统已ç»å«æœ‰ç¨€ç–超级å—\n"
+
+#: misc/tune2fs.c:3182
+msgid ""
+"\n"
+"Setting the sparse superblock flag not supported\n"
+"for filesystems with the meta_bg feature enabled.\n"
+msgstr ""
+"\n"
+"å¯ç”¨äº† meta_bg 特性的文件系统ä¸æ”¯æŒè®¾ç½®\n"
+"sparse superblock 标志。\n"
+"\n"
+
+#: misc/tune2fs.c:3192
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"已设置 sparse superblock 标志。%s"
+
+#: misc/tune2fs.c:3197
+msgid ""
+"\n"
+"Clearing the sparse superblock flag not supported.\n"
+msgstr ""
+"\n"
+"ä¸æ”¯æŒç§»é™¤ sparse superblock 标志。\n"
+
+#: misc/tune2fs.c:3205
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "设置上一次检查的时间为 %s\n"
+
+#: misc/tune2fs.c:3211
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "设置ä¿ç•™å—çš„ uid 为 %lu\n"
+
+#: misc/tune2fs.c:3243
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr "clear_mmp 选项使用错误。必须和 -f 选项一起使用\n"
+
+#: misc/tune2fs.c:3262
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "åªæœ‰å½“文件系统未挂载时æ‰èƒ½ä¿®æ”¹é…é¢ç‰¹æ€§ã€‚\n"
+
+#: misc/tune2fs.c:3279
+msgid "Cannot change the UUID of this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "无法更改此文件系统的 UUID,因为它设置了 stable_inodes 特性标志。\n"
+
+#: misc/tune2fs.c:3289
+msgid "Setting the UUID on this filesystem could take some time."
+msgstr "在此文件系统上设置 UUID 需è¦èŠ±è´¹ä¸€æ®µæ—¶é—´ã€‚"
+
+#: misc/tune2fs.c:3306
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr "åªæœ‰å½“文件系统未挂载时æ‰èƒ½æ”¹å˜ UUID。\n"
+
+#: misc/tune2fs.c:3309
+msgid "If you only use kernels newer than v4.4, run 'tune2fs -O metadata_csum_seed' and re-run this command.\n"
+msgstr "若您仅使用 v4.4 以上的内核,请è¿è¡Œ \"tune2fs -O metadata_csum_seed\",然åŽé‡æ–°è¿è¡Œæ­¤å‘½ä»¤ã€‚\n"
+
+#: misc/tune2fs.c:3340
+msgid "Invalid UUID format\n"
+msgstr "无效的 UUID æ ¼å¼\n"
+
+#: misc/tune2fs.c:3356
+msgid "Need to update journal superblock.\n"
+msgstr "需è¦æ›´æ–°æ—¥å¿—超级å—。\n"
+
+#: misc/tune2fs.c:3378
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr "åªæœ‰å½“文件系统未挂载时æ‰èƒ½è°ƒæ•´ inode 大å°ã€‚\n"
+
+#: misc/tune2fs.c:3385
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr "å¯ç”¨äº† flex_bg 特性的文件系统ä¸æ”¯æŒè°ƒæ•´ inode 大å°ã€‚\n"
+
+#: misc/tune2fs.c:3403
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "正在将 inode 大å°è®¾ç½®ä¸º %lu\n"
+
+#: misc/tune2fs.c:3407
+msgid "Failed to change inode size\n"
+msgstr "调整 inode 大å°å¤±è´¥ \n"
+
+#: misc/tune2fs.c:3421
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "设置步长为 %d\n"
+
+#: misc/tune2fs.c:3426
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "设置带宽为 %d\n"
+
+#: misc/tune2fs.c:3433
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "设置扩展的默认挂载选项为 \"%s\"\n"
+
+#: misc/util.c:102
+msgid "<proceeding>\n"
+msgstr "<正在继续>\n"
+
+#: misc/util.c:106
+#, c-format
+msgid "Proceed anyway (or wait %d seconds to proceed) ? (y,N) "
+msgstr "无论如何也è¦ç»§ç»­ï¼ˆæˆ–等待 %d 秒以继续)?(y,N) "
+
+#: misc/util.c:110
+msgid "Proceed anyway? (y,N) "
+msgstr "无论如何也è¦ç»§ç»­ï¼Ÿ(y,N) "
+
+#: misc/util.c:137
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr "ä»ç„¶å¼ºåˆ¶æ‰§è¡Œ mke2fs 。希望 /etc/mtab 中å映的并éžçœŸå®žæƒ…况。\n"
+
+#: misc/util.c:142
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "å°†ä¸ä¼šåœ¨æ­¤åˆ›å»º%sï¼\n"
+
+#: misc/util.c:149
+msgid "mke2fs forced anyway.\n"
+msgstr "ä»ç„¶å¼ºåˆ¶æ‰§è¡Œ mke2fs。\n"
+
+#: misc/util.c:165
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "无法为解æžæ—¥å¿—选项分é…内存ï¼\n"
+
+#: misc/util.c:190
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"æ— æ³•æ‰¾åˆ°åŒ¹é… %s 的日志设备\n"
+
+#: misc/util.c:225
+msgid ""
+"\n"
+"Bad journal options specified.\n"
+"\n"
+"Journal options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid journal options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\tlocation=<journal location>\n"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"给定的日志选项有误。\n"
+"\n"
+"日志选项由逗å·åˆ†éš”,有些还需è¦é€šè¿‡ç­‰å· (\"=\") 传递å‚数。\n"
+"\n"
+"有效的日志选项为:\n"
+"\tsize=<æ—¥å¿—å¤§å° (MB)>\n"
+"\tdevice=<日志设备>\n"
+"\tlocation=<日志所在ä½ç½®>\n"
+"\n"
+"日志大å°å¿…须介于 1024 至 10240000 个文件系统å—之间。\n"
+"\n"
+
+#: misc/util.c:268
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"文件系统太å°ï¼Œæ— æ³•å®¹çº³æ—¥å¿—\n"
+
+#: misc/util.c:285
+#, c-format
+msgid ""
+"\n"
+"The total requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"给定的日志总大å°ä¸º %d 个å—;但该值必须\n"
+"介于 1024 至 10240000 å—之间。中止执行。\n"
+
+#: misc/util.c:293
+msgid ""
+"\n"
+"Total journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"日志总大å°å¤ªå¤§ï¼Œæ–‡ä»¶ç³»ç»Ÿæ— æ³•å®¹çº³ã€‚\n"
+
+#: misc/util.c:306
+#, c-format
+msgid ""
+"This filesystem will be automatically checked every %d mounts or\n"
+"%g days, whichever comes first. Use tune2fs -c or -i to override.\n"
+msgstr ""
+"该文件系统æ¯æŒ‚è½½ %d 次或æ¯éš” %g 天都会进行自动检查,\n"
+"å–决于哪个先到。使用 tune2fs -c 或 -i æ¥è¦†ç›–这一特性。\n"
+
+#: misc/uuidd.c:49
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "用法:%s [-d] [-p pid文件] [-s 套接字路径] [-T 超时时长]\n"
+
+#: misc/uuidd.c:51
+#, c-format
+msgid " %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr " %s [-r|t] [-n æ•°é‡] [-s 套接字路径]\n"
+
+#: misc/uuidd.c:53
+#, c-format
+msgid " %s -k\n"
+msgstr " %s -k\n"
+
+#: misc/uuidd.c:155
+msgid "bad arguments"
+msgstr "å‚数错误"
+
+#: misc/uuidd.c:173
+msgid "connect"
+msgstr "连接"
+
+#: misc/uuidd.c:192
+msgid "write"
+msgstr "写入"
+
+#: misc/uuidd.c:200
+msgid "read count"
+msgstr "读å–计数"
+
+#: misc/uuidd.c:206
+msgid "bad response length"
+msgstr "错误的å“应长度"
+
+#: misc/uuidd.c:271
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "uuidd 守护进程已ç»åœ¨è¿è¡Œï¼Œpid %s\n"
+
+#: misc/uuidd.c:279
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "无法创建 unix æµå¥—接字:%s"
+
+#: misc/uuidd.c:308
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "无法绑定 unix 套接字 %s:%s\n"
+
+#: misc/uuidd.c:316
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "æ— æ³•ç›‘å¬ unix 套接字 %s:%s\n"
+
+#: misc/uuidd.c:354
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "读å–客户端内容出错,长度 = %d\n"
+
+#: misc/uuidd.c:362
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "æ“作 %d,传入值 = %d\n"
+
+#: misc/uuidd.c:381
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "已生æˆæ—¶é—´ UUID:%s\n"
+
+#: misc/uuidd.c:391
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "已生æˆéšæœºæ•° UUID:%s\n"
+
+#: misc/uuidd.c:400
+#, c-format
+msgid "Generated time UUID %s and subsequent UUID\n"
+msgid_plural "Generated time UUID %s and %d subsequent UUIDs\n"
+msgstr[0] "已生æˆæ—¶é—´ UUID %s å’ŒåŽç»­çš„ %d 个 UUID\n"
+
+#: misc/uuidd.c:421
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "å·²ç”Ÿæˆ %d 个 UUID:\n"
+
+#: misc/uuidd.c:433
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "æ“作 %d 无效\n"
+
+#: misc/uuidd.c:477 misc/uuidd.c:499
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "错误的数值:%s\n"
+
+#: misc/uuidd.c:534 misc/uuidd.c:563
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "调用 uuidd 守护进程 (%s) 时出错:%s\n"
+
+#: misc/uuidd.c:544
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s å’ŒåŽç»­çš„ %d 个 UUID\n"
+
+#: misc/uuidd.c:548
+msgid "List of UUID's:\n"
+msgstr "UUID 列表:\n"
+
+#: misc/uuidd.c:569
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "æœåŠ¡å™¨ %d 返回了长度异常的内容\n"
+
+#: misc/uuidd.c:586
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "无法æ€æ­» pid 为 %d çš„ uuidd 进程:%s\n"
+
+#: misc/uuidd.c:592
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "å·²æ€æ­» pid 为 %d çš„ uuidd 进程\n"
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "用法:%s [-r] [-t]\n"
+
+#: resize/extent.c:200
+msgid "# Extent dump:\n"
+msgstr "# Extent 转储:\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+
+#: resize/main.c:49
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]\n"
+"\n"
+msgstr ""
+"用法:%s [-d 调试标志] [-f] [-F] [-M] [-P] [-p] 设备 [-b|-s|新大å°] [-S RAID步长] [-z 撤销文件]\n"
+"\n"
+
+#: resize/main.c:73
+msgid "Extending the inode table"
+msgstr "正在扩充 inode 表"
+
+#: resize/main.c:76
+msgid "Relocating blocks"
+msgstr "正在é‡å®šä½å—"
+
+#: resize/main.c:79
+msgid "Scanning inode table"
+msgstr "正在扫æ inode 表"
+
+#: resize/main.c:82
+msgid "Updating inode references"
+msgstr "正在更新 inode 引用"
+
+#: resize/main.c:85
+msgid "Moving inode table"
+msgstr "正在移动 inode 表"
+
+#: resize/main.c:88
+msgid "Unknown pass?!?"
+msgstr "未知é数?ï¼ï¼Ÿ"
+
+#: resize/main.c:91
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "开始第 %d é(最多 %lu é)\n"
+
+#: resize/main.c:163
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested. Proceed at\n"
+"your own risk! Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+"\n"
+"调整 bigalloc 文件系统的大å°å°šæœªè¢«å……分测试。你需è¦æ‰¿æ‹…å¯èƒ½çš„风险ï¼\n"
+"如果你希望继续,请使用 -f 选项。\n"
+"\n"
+
+#: resize/main.c:374
+#, c-format
+msgid "while opening %s"
+msgstr "打开 %s 时"
+
+#: resize/main.c:382
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "èŽ·å– %s çš„ stat ä¿¡æ¯æ—¶"
+
+#: resize/main.c:463
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"请先è¿è¡Œ \"e2fsck -f %s\"。\n"
+"\n"
+
+#: resize/main.c:482
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "预计文件系统的最å°å°ºå¯¸ï¼š%llu\n"
+
+#: resize/main.c:522
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "无效的新大å°ï¼š%s\n"
+
+#: resize/main.c:541
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "新大å°å¤ªå¤§ï¼Œæ— æ³•ç”¨ 32 ä½æ•´æ•°è¡¨ç¤º\n"
+
+#: resize/main.c:560
+msgid "New size results in too many block group descriptors.\n"
+msgstr "新的大å°ä¼šå¯¼è‡´å—组æ述符的数é‡è¿‡å¤šã€‚\n"
+
+#: resize/main.c:567
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "新大å°ä½ŽäºŽå…许的最å°å€¼ (%llu)\n"
+
+#: resize/main.c:574
+msgid "Invalid stride length"
+msgstr "无效的步长"
+
+#: resize/main.c:598
+#, c-format
+msgid ""
+"The containing partition (or device) is only %llu (%dk) blocks.\n"
+"You requested a new size of %llu blocks.\n"
+"\n"
+msgstr ""
+"包å«æ­¤æ–‡ä»¶ç³»ç»Ÿçš„分区(或设备)仅有 %llu 个å—(æ¯å—为 %dk),\n"
+"但你å´æŒ‡å®šæ–°å¤§å°ä¸º %llu 个å—。\n"
+"\n"
+
+#: resize/main.c:605
+#, c-format
+msgid "Cannot set and unset 64bit feature.\n"
+msgstr "无法设置/å–消设置 64 ä½ç‰¹æ€§ã€‚\n"
+
+#: resize/main.c:609
+#, c-format
+msgid "Cannot change the 64bit feature on a filesystem that is larger than 2^32 blocks.\n"
+msgstr "无法在大å°è¶…过 2^32 个å—çš„æ–‡ä»¶ç³»ç»Ÿä¸Šæ”¹å˜ 64 ä½ç‰¹æ€§ã€‚\n"
+
+#: resize/main.c:615
+#, c-format
+msgid "Cannot change the 64bit feature while the filesystem is mounted.\n"
+msgstr "æ— æ³•åœ¨å·²æŒ‚è½½çš„æ–‡ä»¶ç³»ç»Ÿä¸Šæ”¹å˜ 64 ä½ç‰¹æ€§ã€‚\n"
+
+#: resize/main.c:621
+#, c-format
+msgid "Please enable the extents feature with tune2fs before enabling the 64bit feature.\n"
+msgstr "在å¯ç”¨ 64 ä½ç‰¹æ€§å‰ï¼Œè¯·å…ˆæ‰§è¡Œ tune2fs æ¥å¯ç”¨ extent。\n"
+
+#: resize/main.c:629
+#, c-format
+msgid ""
+"The filesystem is already %llu (%dk) blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"文件系统已ç»ä¸º %llu 个å—(æ¯å— %dk)。无事å¯åšï¼\n"
+"\n"
+
+#: resize/main.c:639
+#, c-format
+msgid "The filesystem is already 64-bit.\n"
+msgstr "文件系统已ç»ä¸º 64 ä½ã€‚\n"
+
+#: resize/main.c:644
+#, c-format
+msgid "The filesystem is already 32-bit.\n"
+msgstr "文件系统已ç»ä¸º 32 ä½ã€‚\n"
+
+#: resize/main.c:649
+#, c-format
+msgid "Cannot shrink this filesystem because it has the stable_inodes feature flag.\n"
+msgstr "无法缩å°æ­¤æ–‡ä»¶ç³»ç»Ÿï¼Œå› ä¸ºå®ƒè®¾ç½®äº† stable_inodes 特性标志。\n"
+
+#: resize/main.c:658
+#, c-format
+msgid "Converting the filesystem to 64-bit.\n"
+msgstr "将文件系统转æ¢ä¸º 64 ä½ã€‚\n"
+
+#: resize/main.c:660
+#, c-format
+msgid "Converting the filesystem to 32-bit.\n"
+msgstr "将文件系统转æ¢ä¸º 32 ä½ã€‚\n"
+
+#: resize/main.c:662
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr "å°† %s 上的文件系统调整为 %llu 个å—(æ¯å— %dk)。\n"
+
+#: resize/main.c:672
+#, c-format
+msgid "while trying to resize %s"
+msgstr "å°è¯•è°ƒæ•´ %s 的大å°æ—¶"
+
+#: resize/main.c:675
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"请在调整大å°æ“作中止åŽè¿è¡Œ \"e2fsck -fy %s\"\n"
+"æ¥ä¿®å¤æ–‡ä»¶ç³»ç»Ÿã€‚\n"
+
+#: resize/main.c:680
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu (%dk) blocks long.\n"
+"\n"
+msgstr ""
+"%s 上的文件系统大å°å·²ç»è°ƒæ•´ä¸º %llu 个å—(æ¯å— %dk)。\n"
+"\n"
+
+#: resize/main.c:695
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "å°è¯•æˆªæ–­ %s æ—¶"
+
+#: resize/online.c:81
+msgid "kernel does not support online resize with sparse_super2"
+msgstr "内核ä¸æ”¯æŒåœ¨çº¿è°ƒæ•´å¯ç”¨äº† sparse_super2 特性的文件系统的大å°"
+
+#: resize/online.c:86
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+"%s 上的文件系统已被挂载于 %s;需è¦è¿›è¡Œåœ¨çº¿è°ƒæ•´å¤§å°\n"
+"\n"
+
+#: resize/online.c:90
+msgid "On-line shrinking not supported"
+msgstr "ä¸æ”¯æŒåœ¨çº¿ç¼©å°å¤§å°"
+
+#: resize/online.c:114
+msgid "Filesystem does not support online resizing"
+msgstr "文件系统ä¸æ”¯æŒåœ¨çº¿è°ƒæ•´å¤§å°"
+
+#: resize/online.c:122
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "没有足够的ä¿ç•™ gdt å—用于调整文件系统大å°"
+
+#: resize/online.c:129
+msgid "Kernel does not support resizing a file system this large"
+msgstr "内核ä¸æ”¯æŒè°ƒæ•´å¦‚此之大的文件系统"
+
+#: resize/online.c:137
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "å°è¯•æ‰“开挂载点 %s æ—¶"
+
+#: resize/online.c:142
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "使用旧版本的调整大å°æŽ¥å£ã€‚\n"
+
+#: resize/online.c:161 resize/online.c:178
+msgid "Permission denied to resize filesystem"
+msgstr "没有调整文件系统大å°çš„æƒé™"
+
+#: resize/online.c:164 resize/online.c:184
+msgid "While checking for on-line resizing support"
+msgstr "检查是å¦æ”¯æŒåœ¨çº¿è°ƒæ•´å¤§å°æ—¶"
+
+#: resize/online.c:181
+msgid "Kernel does not support online resizing"
+msgstr "内核ä¸æ”¯æŒåœ¨çº¿è°ƒæ•´å¤§å°"
+
+#: resize/online.c:220
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "在线调整 %s 的大å°ä¸º %llu å—(æ¯å—为 %dk)。\n"
+
+#: resize/online.c:231
+msgid "While trying to extend the last group"
+msgstr "å°è¯•æ‰©å±•æœ€åŽä¸€ä¸ªç»„æ—¶"
+
+#: resize/online.c:278
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "å°è¯•æ·»åŠ ç»„ #%d æ—¶"
+
+#: resize/online.c:289
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "文件系统 %s 被挂载于 %s,并且本系统ä¸æ”¯æŒåœ¨çº¿è°ƒæ•´å¤§å°ã€‚\n"
+
+#: resize/resize2fs.c:769
+#, c-format
+msgid "inodes (%llu) must be less than %u\n"
+msgstr "inode æ•° (%llu) å¿…é¡»å°äºŽ %u\n"
+
+#: resize/resize2fs.c:1127
+msgid "reserved blocks"
+msgstr "ä¿ç•™å—"
+
+#: resize/resize2fs.c:1377
+msgid "meta-data blocks"
+msgstr "元数æ®å—"
+
+#: resize/resize2fs.c:1481 resize/resize2fs.c:2525
+msgid "new meta blocks"
+msgstr "新的元数æ®å—"
+
+#: resize/resize2fs.c:2749
+msgid "Should never happen! No sb in last super_sparse bg?\n"
+msgstr "ä¸åº”当出现的情况ï¼æœ€åŽä¸€ä¸ª super_sparse å—组中没有超级å—?\n"
+
+#: resize/resize2fs.c:2754
+msgid "Should never happen! Unexpected old_desc in super_sparse bg?\n"
+msgstr "ä¸åº”当出现的情况ï¼super_sparse å—组中有未预期的 old_desc?\n"
+
+#: resize/resize2fs.c:2827
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "ä¸åº”å½“å‡ºçŽ°çš„æƒ…å†µï¼šè°ƒæ•´å¤§å° inode æŸåï¼\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.46.5"
+msgstr "EXT2FS 库版本 1.46.5"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "ext2_filsys 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "badblocks_list 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "badblocks_iterate 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "inode_scan 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "io_channel 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "unix io_channel 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "io_manager 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "block_bitmap 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "inode_bitmap 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "generic_bitmap 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "test io_channel 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:23
+msgid "Wrong magic number for directory block list structure"
+msgstr "目录å—列表结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "icount 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Powerquest io_channel 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "ext2 文件结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "ext2 é•œåƒå¤´ä¸­çš„幻数有错"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "inode io_channel 结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "ext4 extent å¥æŸ„中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:30
+msgid "Bad magic number in super-block"
+msgstr "超级å—中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:31
+msgid "Filesystem revision too high"
+msgstr "文件系统版本太高"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "å°è¯•å†™å…¥åˆ°ä»¥åªè¯»æ–¹å¼æ‰“开的文件系统"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "无法读å–组æ述符"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "无法写入组æ述符"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "组æ述符æŸå:å—ä½å›¾ä¸­æœ‰åå—"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "组æ述符æŸå:inode ä½å›¾ä¸­æœ‰åå—"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "组æ述符æŸå:inode 表中有åå—"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "无法写入 inode ä½å›¾"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "æ— æ³•è¯»å– inode ä½å›¾"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "无法写入å—ä½å›¾"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "无法读å–å—ä½å›¾"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "无法写入 inode 表"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "æ— æ³•è¯»å– inode 表"
+
+#: lib/ext2fs/ext2_err.c:44
+msgid "Can't read next inode"
+msgstr "无法读å–下一个 inode"
+
+#: lib/ext2fs/ext2_err.c:45
+msgid "Filesystem has unexpected block size"
+msgstr "文件系统的å—大å°å¼‚常"
+
+#: lib/ext2fs/ext2_err.c:46
+msgid "EXT2 directory corrupted"
+msgstr "EXT2 目录æŸå"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "å°è¯•è¯»å–文件系统å—çš„æ“作过早结æŸ"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "å°è¯•å†™å…¥æ–‡ä»¶ç³»ç»Ÿå—çš„æ“作过早结æŸ"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "目录中没有å¯ç”¨ç©ºé—´"
+
+#: lib/ext2fs/ext2_err.c:50
+msgid "Inode bitmap not loaded"
+msgstr "未加载 inode ä½å›¾"
+
+#: lib/ext2fs/ext2_err.c:51
+msgid "Block bitmap not loaded"
+msgstr "未加载å—ä½å›¾"
+
+#: lib/ext2fs/ext2_err.c:52
+msgid "Illegal inode number"
+msgstr "éžæ³•çš„ inode æ•°"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "éžæ³•çš„å—æ•°"
+
+#: lib/ext2fs/ext2_err.c:54
+msgid "Internal error in ext2fs_expand_dir"
+msgstr "ext2fs_expand_dir 中出现内部错误"
+
+#: lib/ext2fs/ext2_err.c:55
+msgid "Not enough space to build proposed filesystem"
+msgstr "没有足够的空间用于建立指定的文件系统"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "传递给 ext2fs_mark_block_bitmap çš„å—数为éžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "传递给 ext2fs_unmark_block_bitmap çš„å—数为éžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "传递给 ext2fs_test_block_bitmap çš„å—数为éžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "传递给 ext2fs_mark_inode_bitmap çš„å—数为éžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "传递给 ext2fs_unmark_inode_bitmap çš„å—数为éžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "传递给 ext2fs_test_inode_bitmap çš„å—数为éžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "试图伪造å—ä½å›¾å°¾éƒ¨ï¼Œè¶Šè¿‡çœŸå®žè¾¹ç•Œ"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "试图伪造 inode ä½å›¾å°¾éƒ¨ï¼Œè¶Šè¿‡çœŸå®žè¾¹ç•Œ"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "å‘现éžæ³•çš„间接å—"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "å‘现éžæ³•çš„二次间接å—"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "å‘现éžæ³•çš„三次间接å—"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "å—ä½å›¾ä¸ç›¸åŒ"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "inode ä½å›¾ä¸ç›¸åŒ"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "设备åéžæ³•æˆ–æ ¼å¼é”™è¯¯"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "一个å—组中缺少一个 inode 表"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "ext2 超级å—æŸå"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "传递给 ext2fs_mark_generic_bitmap 的通用ä½æ•°ä¸ºä¸ºéžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "传递给 ext2fs_unmark_generic_bitmap 的通用ä½æ•°ä¸ºä¸ºéžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "传递给 ext2fs_test_generic_bitmap 的通用ä½æ•°ä¸ºä¸ºéžæ³•å€¼"
+
+#: lib/ext2fs/ext2_err.c:75
+msgid "Too many symbolic links encountered."
+msgstr "é‡åˆ°äº†è¿‡å¤šçš„符å·é“¾æŽ¥ã€‚"
+
+#: lib/ext2fs/ext2_err.c:76
+msgid "The callback function will not handle this case"
+msgstr "回调函数将ä¸ä¼šå¤„ç†è¿™ä¸ªæƒ…况"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "该 inode æ¥è‡ª inode 表中的一个åå—"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "文件系统有ä¸è¢«æ”¯æŒçš„特性"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "文件系统有ä¸è¢«æ”¯æŒçš„åªè¯»ç‰¹æ€§"
+
+#: lib/ext2fs/ext2_err.c:80
+msgid "IO Channel failed to seek on read or write"
+msgstr "I/O 通é“定ä½è¯»å–/写入ä½ç½®æ—¶å¤±è´¥"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "内存分é…失败"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "传给了 ext2 库无效的å‚æ•°"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "无法为 ext2 文件系统分é…å—"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "无法为 ext2 æ–‡ä»¶ç³»ç»Ÿåˆ†é… inode"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "ext2 inode ä¸ä¸ºç›®å½•"
+
+#: lib/ext2fs/ext2_err.c:86
+msgid "Too many references in table"
+msgstr "表中有太多的引用"
+
+#: lib/ext2fs/ext2_err.c:87
+msgid "File not found by ext2_lookup"
+msgstr "ext2_lookup 未å‘现文件"
+
+#: lib/ext2fs/ext2_err.c:88
+msgid "File open read-only"
+msgstr "文件以åªè¯»æ¨¡å¼æ‰“å¼€"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "未找到 ext2 目录å—"
+
+#: lib/ext2fs/ext2_err.c:90
+msgid "Ext2 directory already exists"
+msgstr "ext2 目录å—已存在"
+
+#: lib/ext2fs/ext2_err.c:91
+msgid "Unimplemented ext2 library function"
+msgstr "未实现的 ext2 库函数"
+
+#: lib/ext2fs/ext2_err.c:92
+msgid "User cancel requested"
+msgstr "用户å–消了æ“作"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "ext2 文件太大"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "指定的日志设备ä¸æ˜¯å—设备"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "日志超级å—未找到"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "日志大å°åº”至少为 1024 个å—"
+
+#: lib/ext2fs/ext2_err.c:97
+msgid "Unsupported journal version"
+msgstr "ä¸æ”¯æŒçš„日志版本"
+
+#: lib/ext2fs/ext2_err.c:98
+msgid "Error loading external journal"
+msgstr "打开外部日志时出错"
+
+#: lib/ext2fs/ext2_err.c:99
+msgid "Journal not found"
+msgstr "日志未找到"
+
+#: lib/ext2fs/ext2_err.c:100
+msgid "Directory hash unsupported"
+msgstr "ä¸æ”¯æŒç›®å½• hash"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "éžæ³•çš„扩展属性å—å·"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "无法创建å«æœ‰æŒ‡å®š inode 数的文件系统"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "e2image 快照未在使用中"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "ä¿ç•™çš„组æ述符å—太多"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "è°ƒæ•´å¤§å° inode å·²æŸå"
+
+#: lib/ext2fs/ext2_err.c:106
+msgid "Tried to set block bmap with missing indirect block"
+msgstr "å°è¯•åœ¨å—ä½å›¾ä¸­è®¾ç½®ä¸¢å¤±çš„间接å—"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: æˆåŠŸ"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: æ•°æ®åº“æŸå"
+
+#: lib/ext2fs/ext2_err.c:109
+msgid "TDB: IO Error"
+msgstr "TDB: I/O 错误"
+
+#: lib/ext2fs/ext2_err.c:110
+msgid "TDB: Locking error"
+msgstr "TDB: 加é”错误"
+
+#: lib/ext2fs/ext2_err.c:111
+msgid "TDB: Out of memory"
+msgstr "TDB: 内存耗尽"
+
+#: lib/ext2fs/ext2_err.c:112
+msgid "TDB: Record exists"
+msgstr "TDB: 记录已存在"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: é”已存在于其他键"
+
+#: lib/ext2fs/ext2_err.c:114
+msgid "TDB: Invalid parameter"
+msgstr "TDB: 无效的å‚æ•°"
+
+#: lib/ext2fs/ext2_err.c:115
+msgid "TDB: Record does not exist"
+msgstr "TDB: 记录ä¸å­˜åœ¨"
+
+#: lib/ext2fs/ext2_err.c:116
+msgid "TDB: Write not permitted"
+msgstr "TDB: ä¸å…许写入"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Ext2fs 目录å—列表为空"
+
+#: lib/ext2fs/ext2_err.c:118
+msgid "Attempt to modify a block mapping via a read-only block iterator"
+msgstr "ä¼å›¾é€šè¿‡åªè¯»çš„å—迭代器修改å—映射"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "ext4 extent ä¿å­˜è·¯å¾„的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "64 ä½é€šç”¨ä½å›¾ä¸­çš„幻数有错"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "64 ä½å—ä½å›¾ä¸­çš„幻数有错"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "64 ä½ inode ä½å›¾ä¸­çš„幻数有错"
+
+#: lib/ext2fs/ext2_err.c:123
+msgid "Wrong magic number --- RESERVED_13"
+msgstr "幻数错误(ä¿ç•™ç¼–å·ï¼š13)"
+
+#: lib/ext2fs/ext2_err.c:124
+msgid "Wrong magic number --- RESERVED_14"
+msgstr "幻数错误(ä¿ç•™ç¼–å·ï¼š14)"
+
+#: lib/ext2fs/ext2_err.c:125
+msgid "Wrong magic number --- RESERVED_15"
+msgstr "幻数错误(ä¿ç•™ç¼–å·ï¼š15)"
+
+#: lib/ext2fs/ext2_err.c:126
+msgid "Wrong magic number --- RESERVED_16"
+msgstr "幻数错误(ä¿ç•™ç¼–å·ï¼š16)"
+
+#: lib/ext2fs/ext2_err.c:127
+msgid "Wrong magic number --- RESERVED_17"
+msgstr "幻数错误(ä¿ç•™ç¼–å·ï¼š17)"
+
+#: lib/ext2fs/ext2_err.c:128
+msgid "Wrong magic number --- RESERVED_18"
+msgstr "幻数错误(ä¿ç•™ç¼–å·ï¼š18)"
+
+#: lib/ext2fs/ext2_err.c:129
+msgid "Wrong magic number --- RESERVED_19"
+msgstr "幻数错误(ä¿ç•™ç¼–å·ï¼š19)"
+
+#: lib/ext2fs/ext2_err.c:130
+msgid "Corrupt extent header"
+msgstr "extent 头æŸå"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "extent 索引æŸå"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "extent æŸå"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "extent 映射中没有å¯ç”¨ç©ºé—´"
+
+#: lib/ext2fs/ext2_err.c:134
+msgid "Inode does not use extents"
+msgstr "inode 未使用 extent"
+
+#: lib/ext2fs/ext2_err.c:135
+msgid "No 'next' extent"
+msgstr "找ä¸åˆ° \"next\" extent"
+
+#: lib/ext2fs/ext2_err.c:136
+msgid "No 'previous' extent"
+msgstr "找ä¸åˆ° \"previous\" extent"
+
+#: lib/ext2fs/ext2_err.c:137
+msgid "No 'up' extent"
+msgstr "找ä¸åˆ° \"up\" extent"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "找ä¸åˆ° \"down\" extent"
+
+#: lib/ext2fs/ext2_err.c:139
+msgid "No current node"
+msgstr "当å‰èŠ‚点ä¸å­˜åœ¨"
+
+#: lib/ext2fs/ext2_err.c:140
+msgid "Ext2fs operation not supported"
+msgstr "ä¸æ”¯æŒçš„ ext2fs æ“作"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "没有足够空间用于æ’å…¥ extent 到节点"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "分割æ“作将导致空节点产生"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "未找到 extent"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "å«æœ‰ extent çš„ inode ä¸æ”¯æŒæ­¤æ“作"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "extent 长度无效"
+
+#: lib/ext2fs/ext2_err.c:146
+msgid "I/O Channel does not support 64-bit block numbers"
+msgstr "I/O 通é“ä¸æ”¯æŒ 64 ä½è¡¨ç¤ºçš„å—æ•°"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "由于 mtab 文件缺失,无法检查文件系统是å¦å·²æŒ‚è½½"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "文件系统太大,无法使用传统ä½å›¾"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: 无效的幻数"
+
+#: lib/ext2fs/ext2_err.c:150
+msgid "MMP: device currently active"
+msgstr "MMP: 设备当å‰ä¸ºæ´»åŠ¨çŠ¶æ€"
+
+#: lib/ext2fs/ext2_err.c:151
+msgid "MMP: e2fsck being run"
+msgstr "MMP: 试图è¿è¡Œ e2fsck"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: å—ç¼–å·è¶…出文件系统边界"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: 正在进行未知的æ“作"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: 文件系统ä»åœ¨ä½¿ç”¨"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: 使用 O_DIRECT 标志打开失败"
+
+#: lib/ext2fs/ext2_err.c:156
+msgid "Block group descriptor size incorrect"
+msgstr "å—组æ述符大å°é”™è¯¯"
+
+#: lib/ext2fs/ext2_err.c:157
+msgid "Inode checksum does not match inode"
+msgstr "inode 校验和与 inode ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:158
+msgid "Inode bitmap checksum does not match bitmap"
+msgstr "inode ä½å›¾æ ¡éªŒå’Œä¸Žä½å›¾ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:159
+msgid "Extent block checksum does not match extent block"
+msgstr "extent å—校验和与 extent å—ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:160
+msgid "Directory block does not have space for checksum"
+msgstr "目录å—中没有用于存储校验和的空间"
+
+#: lib/ext2fs/ext2_err.c:161
+msgid "Directory block checksum does not match directory block"
+msgstr "目录å—校验和与目录å—ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:162
+msgid "Extended attribute block checksum does not match block"
+msgstr "扩展属性å—校验和与å—ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:163
+msgid "Superblock checksum does not match superblock"
+msgstr "超级å—校验和与超级å—ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr "未知的校验和算法"
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match"
+msgstr "MMP å—校验和ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "ext2 文件已存在"
+
+#: lib/ext2fs/ext2_err.c:167
+msgid "Block bitmap checksum does not match bitmap"
+msgstr "å—ä½å›¾æ ¡éªŒå’Œä¸Žä½å›¾ä¸ç¬¦"
+
+#: lib/ext2fs/ext2_err.c:168
+msgid "Cannot iterate data blocks of an inode containing inline data"
+msgstr "无法对å«æœ‰å†…è”æ•°æ®çš„ inode 中的数æ®å—进行迭代"
+
+#: lib/ext2fs/ext2_err.c:169
+msgid "Extended attribute has an invalid name length"
+msgstr "扩展属性å的长度无效"
+
+#: lib/ext2fs/ext2_err.c:170
+msgid "Extended attribute has an invalid value length"
+msgstr "扩展属性å的值无效"
+
+#: lib/ext2fs/ext2_err.c:171
+msgid "Extended attribute has an incorrect hash"
+msgstr "扩展属性å—的校验和错误"
+
+#: lib/ext2fs/ext2_err.c:172
+msgid "Extended attribute block has a bad header"
+msgstr "扩展属性å—的头部有误"
+
+#: lib/ext2fs/ext2_err.c:173
+msgid "Extended attribute key not found"
+msgstr "找ä¸åˆ°æ‰©å±•å±žæ€§çš„é”®"
+
+#: lib/ext2fs/ext2_err.c:174
+msgid "Insufficient space to store extended attribute data"
+msgstr "用于存储扩展属性数æ®çš„空间ä¸è¶³"
+
+#: lib/ext2fs/ext2_err.c:175
+msgid "Filesystem is missing ext_attr or inline_data feature"
+msgstr "文件系统缺少 ext_attr 或 inline_data 特性"
+
+#: lib/ext2fs/ext2_err.c:176
+msgid "Inode doesn't have inline data"
+msgstr "inode 中ä¸å«å†…è”æ•°æ®"
+
+#: lib/ext2fs/ext2_err.c:177
+msgid "No block for an inode with inline data"
+msgstr "å«æœ‰å†…è”æ•°æ®çš„ inode ä¸å«å—"
+
+#: lib/ext2fs/ext2_err.c:178
+msgid "No free space in inline data"
+msgstr "没有足够空间用于存储内è”æ•°æ®"
+
+#: lib/ext2fs/ext2_err.c:179
+msgid "Wrong magic number for extended attribute structure"
+msgstr "扩展属性结构体中的幻数有错"
+
+#: lib/ext2fs/ext2_err.c:180
+msgid "Inode seems to contain garbage"
+msgstr "inode 中å«æœ‰æ— æ•ˆæ•°æ®"
+
+#: lib/ext2fs/ext2_err.c:181
+msgid "Extended attribute has an invalid value offset"
+msgstr "扩展属性中å«æœ‰æ— æ•ˆçš„值å移é‡"
+
+#: lib/ext2fs/ext2_err.c:182
+msgid "Journal flags inconsistent"
+msgstr "日志标志ä¸ä¸€è‡´"
+
+#: lib/ext2fs/ext2_err.c:183
+msgid "Undo file corrupt"
+msgstr "撤销文件æŸå"
+
+#: lib/ext2fs/ext2_err.c:184
+msgid "Wrong undo file for this filesystem"
+msgstr "撤销文件ä¸èƒ½ç”¨äºŽæ­¤æ–‡ä»¶ç³»ç»Ÿ"
+
+#: lib/ext2fs/ext2_err.c:185
+msgid "File system is corrupted"
+msgstr "文件系统已æŸå"
+
+#: lib/ext2fs/ext2_err.c:186
+msgid "Bad CRC detected in file system"
+msgstr "在文件系统中检测到错误的 CRC 值"
+
+#: lib/ext2fs/ext2_err.c:187
+msgid "The journal superblock is corrupt"
+msgstr "日志超级å—å·²æŸå"
+
+#: lib/ext2fs/ext2_err.c:188
+msgid "Inode is corrupted"
+msgstr "inode å·²æŸå"
+
+#: lib/ext2fs/ext2_err.c:189
+msgid "Inode containing extended attribute value is corrupted"
+msgstr "å«æœ‰æ‰©å±•å±žæ€§å€¼çš„ inode å·²æŸå"
+
+#: lib/ext2fs/ext2_err.c:190
+msgid "Group descriptors not loaded"
+msgstr "组æ述符未加载"
+
+#: lib/ext2fs/ext2_err.c:191
+msgid "The internal ext2_filsys data structure appears to be corrupted"
+msgstr "内部的 ext2_filsys æ•°æ®ç»“构似乎已æŸå"
+
+#: lib/ext2fs/ext2_err.c:192
+msgid "Found cyclic loop in extent tree"
+msgstr "extent 树中å‘现循环"
+
+#: lib/ext2fs/ext2_err.c:193
+msgid "Operation not supported on an external journal"
+msgstr "ä¸æ”¯æŒå¯¹å¤–部日志执行此æ“作"
+
+#: lib/support/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "é…置版本 0.0"
+
+#: lib/support/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "profile_node 中的幻数有错"
+
+#: lib/support/prof_err.c:13
+msgid "Profile section not found"
+msgstr "未找到é…置区段"
+
+#: lib/support/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "未找到é…置关系"
+
+#: lib/support/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "ä¼å›¾å°†å…³è”添加到éžåŒºæ®µçš„node"
+
+#: lib/support/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "æŸä¸ªé…置区段的头部å«æœ‰éžé›¶å€¼"
+
+#: lib/support/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "é…置结构体中有错误的链表"
+
+#: lib/support/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "é…置结构体中有错误的组级别"
+
+#: lib/support/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "é…置结构体中有错误的父指针"
+
+#: lib/support/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "é…置迭代器中的幻数有错"
+
+#: lib/support/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "无法设置区段节点"
+
+#: lib/support/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "传给了é…置库无效的å‚æ•°"
+
+#: lib/support/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "ä¼å›¾ä¿®æ”¹åªè¯»çš„é…ç½®"
+
+#: lib/support/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "é…置区段头部ä¸å¤„于顶级"
+
+#: lib/support/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "é…置区段头部中有语法错误"
+
+#: lib/support/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "é…置关系中有语法错误"
+
+#: lib/support/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "é…置中å‘现é¢å¤–çš„å³èŠ±æ‹¬å·"
+
+#: lib/support/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "é…置中缺少左花括å·"
+
+#: lib/support/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "profile_t 中的幻数有错"
+
+#: lib/support/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "profile_section_t 中的幻数有错"
+
+#: lib/support/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "ä¸æ”¯æŒè¿­ä»£æ‰€æœ‰é¡¶çº§åŒºæ®µ"
+
+#: lib/support/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "无效的é…置区段对象"
+
+#: lib/support/prof_err.c:33
+msgid "No more sections"
+msgstr "没有更多的区段"
+
+#: lib/support/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "传给了查询程åºé”™è¯¯çš„å称集"
+
+#: lib/support/prof_err.c:35
+msgid "No profile file open"
+msgstr "未打开任何é…置文件"
+
+#: lib/support/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "profile_file_t 中的幻数有错"
+
+#: lib/support/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "无法打开é…置文件"
+
+#: lib/support/prof_err.c:38
+msgid "Section already exists"
+msgstr "区段已存在"
+
+#: lib/support/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "无效的布尔值"
+
+#: lib/support/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "无效的整数值"
+
+#: lib/support/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "profile_file_data_t 中的幻数有误"
+
+#: lib/support/plausible.c:119
+#, c-format
+msgid "\tlast mounted on %.*s on %s"
+msgstr "\t上一次挂载于 %.*s,时间 %s"
+
+#: lib/support/plausible.c:122
+#, c-format
+msgid "\tlast mounted on %s"
+msgstr "\t上一次挂载于%s"
+
+#: lib/support/plausible.c:125
+#, c-format
+msgid "\tcreated on %s"
+msgstr "\t创建于 %s"
+
+#: lib/support/plausible.c:128
+#, c-format
+msgid "\tlast modified on %s"
+msgstr "\t上一次修改于 %s"
+
+#: lib/support/plausible.c:162
+#, c-format
+msgid "Found a %s partition table in %s\n"
+msgstr "在 %2$s 中å‘现一个 %1$s 分区表\n"
+
+#: lib/support/plausible.c:203
+#, c-format
+msgid "Could not open %s: %s\n"
+msgstr "无法打开 %s:%s\n"
+
+#: lib/support/plausible.c:206
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+"\n"
+"设备似乎ä¸å­˜åœ¨ã€‚指定的设备å是å¦æ­£ç¡®ï¼Ÿ\n"
+
+#: lib/support/plausible.c:228
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s ä¸æ˜¯å—设备。\n"
+
+#: lib/support/plausible.c:250
+#, c-format
+msgid "%s contains a %s file system labelled '%s'\n"
+msgstr "%1$s 有一个标签为 \"%3$s\" 的 %2$s 文件系统\n"
+
+#: lib/support/plausible.c:253
+#, c-format
+msgid "%s contains a %s file system\n"
+msgstr "%s 有一个 %s 文件系统\n"
+
+#: lib/support/plausible.c:277
+#, c-format
+msgid "%s contains `%s' data\n"
+msgstr "%s å«æœ‰ \"%s\" æ•°æ®\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the bigalloc feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Bigalloc for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "警告:bigalloc 特性ä»ç„¶åœ¨å¼€å‘中\n"
+#~ "更多详情请å‚è§ https://ext4.wiki.kernel.org/index.php/Bigalloc\n"
+#~ "\n"
+
+#~ msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+#~ msgstr "用法:%s [-F] [-I inode缓冲å—] 设备\n"
+
+#~ msgid "while trying to open '%s'"
+#~ msgstr "å°è¯•æ‰“å¼€ “%s†时"
+
+#~ msgid "%u inodes scanned.\n"
+#~ msgstr "已扫æ %u 个inode。\n"
+
+#, fuzzy
+#~| msgid ""
+#~| "The resize_inode and meta_bg features are not compatible.\n"
+#~| "They can not be both enabled simultaneously.\n"
+#~ msgid ""
+#~ "The encrypt and casefold features are not compatible.\n"
+#~ "They can not be both enabled simultaneously.\n"
+#~ msgstr ""
+#~ "resize_inode å’Œ meta_bg 特性ä¸å…¼å®¹ã€‚\n"
+#~ "无法åŒæ—¶å¯ç”¨å®ƒä»¬ã€‚\n"
+
+#~ msgid "i_dir_acl @F %Id, @s zero.\n"
+#~ msgstr "@i %i (%Q)的i_dir_acl为 %ld,@s0。\n"
+
+#~ msgid "while opening directory \"%s\""
+#~ msgstr "打开目录“%sâ€æ—¶"
+
+#~ msgid "Journal features: "
+#~ msgstr "日志特性:: "
+
+#~ msgid "Journal size: "
+#~ msgstr "日志大å°ï¼š "
+
+#~ msgid ""
+#~ "Journal length: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ msgstr ""
+#~ "日志长度: %u\n"
+#~ "日志åºåˆ—: 0x%08x\n"
+#~ "日志起始于: %u\n"
+
+#~ msgid "Journal checksum type: crc32\n"
+#~ msgstr "日志校验值类型: crc32\n"
+
+#~ msgid ""
+#~ "Journal checksum type: %s\n"
+#~ "Journal checksum: 0x%08x\n"
+#~ msgstr ""
+#~ "日志校验值类型: %s\n"
+#~ "日志校验值: 0x%08x\n"
+
+#~ msgid "Journal errno: %d\n"
+#~ msgstr "日志错误ç ï¼š %d\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Journal block size: %u\n"
+#~ "Journal length: %u\n"
+#~ "Journal first block: %u\n"
+#~ "Journal sequence: 0x%08x\n"
+#~ "Journal start: %u\n"
+#~ "Journal number of users: %u\n"
+#~ msgstr ""
+#~ "\n"
+#~ "日志å—大å°ï¼š %u\n"
+#~ "日志å—长度: %u\n"
+#~ "日志å—首å—: %u\n"
+#~ "日志åºåˆ—: 0x%08x\n"
+#~ "日志起始于: %u\n"
+#~ "用户日志数: %u\n"
+
+#~ msgid "Journal users: %s\n"
+#~ msgstr "日志使用者: %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in filesystem! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** å‘现文件系统的校验值有误ï¼è¯·ç«‹å³è¿è¡Œ e2fsckï¼\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "*** Checksum errors detected in bitmaps! Run e2fsck now!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "*** å‘现ä½å›¾çš„校验值有误ï¼è¯·ç«‹å³è¿è¡Œ e2fsckï¼\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%s: %s: error reading bitmaps: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%s:%s:读å–ä½å›¾é”™è¯¯ï¼š%s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning, had trouble writing out superblocks."
+#~ msgstr ""
+#~ "\n"
+#~ "警告:写入超级å—æ—¶é‡åˆ°é—®é¢˜"
+
+#~ msgid "Please run e2fsck on the filesystem.\n"
+#~ msgstr "请在这个文件系统上è¿è¡Œ e2fsck。\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: enabled project without quota together\n"
+#~ msgstr ""
+#~ "\n"
+#~ "警告:å¯ç”¨é¡¹ç›®çš„åŒæ—¶æ²¡æœ‰åŒæ—¶å¯ç”¨é…é¢\n"
+
+#~ msgid "@i %i has @cion flag set on @f without @cion support. "
+#~ msgstr "@i %i ç”±chattr设置了c(@c)标志,但@fä¸æ”¯æŒ@c。 "
+
+#~ msgid "@A @a @b %b. "
+#~ msgstr "分é…@a@b %b时出错。 "
+
+#~ msgid "%s: warning: compression support is experimental.\n"
+#~ msgstr "%s:警告:压缩支æŒæ˜¯å®žéªŒæ€§çš„。\n"
+
+#~ msgid ""
+#~ "%s: e2fsck not compiled with HTREE support,\n"
+#~ "\tbut filesystem %s has HTREE directories.\n"
+#~ msgstr ""
+#~ "%s:编译e2fsck时未添加HTREE支æŒï¼Œ\n"
+#~ "\t但文件系统 %s å«æœ‰HTREE目录。\n"
+
+#~ msgid "while allocating zeroizing buffer"
+#~ msgstr "为(填零的)缓冲区分é…内存时"
+
+#~ msgid ", unused inodes %u\n"
+#~ msgstr ",%u个未使用的inodes\n"
+
+#~ msgid "Failed to read the file system data \n"
+#~ msgstr "读å–文件系统数æ®å¤±è´¥\n"
+
+#~ msgid "Failed tdb_fetch %s\n"
+#~ msgstr "tdb_fetch %s 失败\n"
+
+#~ msgid "The file system UUID didn't match \n"
+#~ msgstr "文件系统的UUIDä¸åŒ¹é… \n"
+
+#~ msgid "Failed tdb_open %s\n"
+#~ msgstr "tdb_open %s 失败\n"
+
+#~ msgid "Failed to open %s\n"
+#~ msgstr "打开%s失败\n"
+
+#~ msgid "Replayed transaction of size %zd at location %llu\n"
+#~ msgstr ""
+#~ "æ ¹æ®å¤§å°ä¸º %zd 的事务记录撤销ä½äºŽ %llu çš„æ“作\n"
+#~ "\n"
+
+#~ msgid "Failed write %s\n"
+#~ msgstr "写入%s失败\n"
+
+#~ msgid "Invalid quotatype parameter: %s\n"
+#~ msgstr "无效的é…é¢ç±»åž‹å‚数:%s\n"
+
+#~ msgid "Couldn't allocate memory to parse quota options!\n"
+#~ msgstr "无法为解æžé…é¢é€‰é¡¹èŽ·å–内存ï¼\n"
+
+#~ msgid "Couldn't allocate memory for tdb filename\n"
+#~ msgstr "无法为处ç†tdb文件å分é…内存\n"
+
+#~ msgid ""
+#~ "To undo the tune2fs operation please run the command\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+#~ msgstr ""
+#~ "è¦æ’¤é”€ tune2fs æ“作请è¿è¡Œå‘½ä»¤ï¼š\n"
+#~ " e2undo %s %s\n"
+#~ "\n"
+
+#~ msgid "%s is entire device, not just one partition!\n"
+#~ msgstr "%s 为整个设备,而éžå•ä¸ªåˆ†åŒºï¼\n"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<ACL 索引 inode>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<ACL æ•°æ® inode>"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "日志未删除\n"
+
+#~ msgid "Could not stat %s --- %s\n"
+#~ msgstr "无法对 %s 进行 stat 调用 --- %s\n"
+
+#~ msgid "\b\b\b\b\b\b\b\bCopied %llu / %llu blocks (%llu%%) in %s at %.2f MB/s \n"
+#~ msgstr "\b\b\b\b\b\b\b\bå·²å¤åˆ¶ %llu / %llu å—(%llu%%),用时 %s,速度 %.2f MB/s \n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Warning: the quota feature is still under development\n"
+#~ "See https://ext4.wiki.kernel.org/index.php/Quota for more information\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "警告:é…é¢ç‰¹æ€§ä»ç„¶åœ¨å¼€å‘中\n"
+#~ "更多详情请å‚è§ https://ext4.wiki.kernel.org/index.php/Quota\n"
+#~ "\n"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "移除 %s 中ä¸è¢«æ”¯æŒçš„extent标志"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr "%s:resize2fsä¸æ”¯æŒåŒæ—¶ä½¿ç”¨å¼¹æ€§ç»„和固定inode大å°ç‰¹æ€§ã€‚\n"
+
+#~ msgid "@g %g @b @B uninitialized but @i @B in use.\n"
+#~ msgstr "@g %g @b@B未åˆå§‹åŒ–,但@i@B已被使用。\n"
+
+#~ msgid "@i %i should not have EOFBLOCKS_FL set (size %Is, lblk %r)\n"
+#~ msgstr "@i %i ä¸åº”被设定EOFBLOCKS_FLæ ‡å¿—ï¼ˆå¤§å° %ls,lblk %r)\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "无法确定日志大å°"
+
+#~ msgid "#\t\t %llu -> %llu (%llu)\n"
+#~ msgstr "#\t\t %llu -> %llu(%llu)\n"
+
+#~ msgid "Missing indirect block not present"
+#~ msgstr "未找到丢失的链接å—"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "写入镜åƒå¤´éƒ¨çš„æ•°æ®è¿‡å°‘(åªæœ‰ %d 字节)"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "无效的碎片尺寸 - %s"
+
+#~ msgid "Warning: fragments not supported. Ignoring -f option\n"
+#~ msgstr "警告:ä¸æ”¯æŒç¢Žç‰‡ç®¡ç†ã€‚已忽略 -f 选项\n"
+
+#~ msgid "Calling BLKDISCARD from %llu to %llu "
+#~ msgstr "å¯¹å— %llu 至 %llu 执行BLKDISCARDæ“作"
+
+#~ msgid "succeeded.\n"
+#~ msgstr "æˆåŠŸã€‚\n"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr "@Sä¸å…·æœ‰has_journal标志,但ext3日志 %s 具有。\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "将日志é‡å»ºä¸ºext3文件系统格å¼å—?\n"
diff --git a/resize/Android.bp b/resize/Android.bp
new file mode 100644
index 0000000..ea6cf1e
--- /dev/null
+++ b/resize/Android.bp
@@ -0,0 +1,58 @@
+// Copyright 2017 The Android Open Source Project
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_e2fsprogs_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-GPL
+ default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
+resize2fs_libs = [
+ "libext2fs",
+ "libext2_com_err",
+ "libext2_e2p",
+ "libext2_uuid",
+ "libext2_blkid",
+]
+
+cc_defaults {
+ name: "resize2fs-defaults",
+ defaults: ["e2fsprogs-defaults"],
+ srcs: [
+ "extent.c",
+ "resize2fs.c",
+ "main.c",
+ "online.c",
+ "sim_progress.c",
+ "resource_track.c",
+ ],
+}
+
+cc_binary {
+ name: "resize2fs",
+ host_supported: true,
+ vendor_ramdisk_available: true,
+ defaults: ["resize2fs-defaults"],
+
+ // Host binaries can be compiled statically to be re-used in other environments.
+ // For android binaries, we keep shared libraries to keep the binary size smaller.
+ target: {
+ host: {
+ static_libs: resize2fs_libs,
+ },
+ android: {
+ shared_libs: resize2fs_libs,
+ },
+ },
+}
+
+cc_binary {
+ name: "resize2fs_ramdisk",
+ stem: "resize2fs",
+ static_executable: true,
+ ramdisk: true,
+ defaults: ["resize2fs-defaults"],
+ static_libs: resize2fs_libs,
+}
diff --git a/resize/Makefile.in b/resize/Makefile.in
new file mode 100644
index 0000000..27f7213
--- /dev/null
+++ b/resize/Makefile.in
@@ -0,0 +1,170 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = resize
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+PROGS= resize2fs
+TEST_PROGS= test_extent
+MANPAGES= resize2fs.8
+
+RESIZE_OBJS= extent.o resize2fs.o main.o online.o resource_track.o \
+ sim_progress.o
+
+TEST_EXTENT_OBJS= extent.o test_extent.o
+
+SRCS= $(srcdir)/extent.c \
+ $(srcdir)/resize2fs.c \
+ $(srcdir)/main.c \
+ $(srcdir)/online.c \
+ $(srcdir)/resource_track.c \
+ $(srcdir)/sim_progress.c
+
+LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL) $(SYSLIBS)
+DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(DEPLIBCOM_ERR)
+
+STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+ $(LIBINTL) $(SYSLIBS)
+DEPSTATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+
+all:: $(PROGS) $(TEST_PROGS) $(MANPAGES)
+
+all-static:: resize2fs.static
+
+resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS)
+
+resize2fs.static: $(RESIZE_OBJS) $(DEPSTATIC_LIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(LDFLAGS_STATIC) -o resize2fs.static \
+ $(RESIZE_OBJS) $(STATIC_LIBS)
+
+resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/resize2fs.8.in resize2fs.8
+
+test_extent: $(TEST_EXTENT_OBJS)
+ $(E) " LD $@"
+ $(Q) $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
+
+installdirs:
+ $(E) " MKDIR_P $(root_sbindir) $(man8dir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(root_sbindir) \
+ $(DESTDIR)$(man8dir)
+
+install: $(PROGS) $(MANPAGES) installdirs
+ $(Q) for i in $(PROGS); do \
+ echo " INSTALL $(root_sbindir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(Q) for i in $(MANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
+ done; \
+ echo " INSTALL_DATA $(man8dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+ done
+
+install-strip: install
+ $(Q) for i in $(PROGS); do \
+ echo " STRIP $(root_sbindir)/$$i"; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+
+uninstall:
+ for i in $(PROGS); do \
+ $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
+ done
+
+test_extent.out: test_extent $(srcdir)/test_extent.in
+ $(TESTENV) ./test_extent < $(srcdir)/test_extent.in > test_extent.out
+
+fullcheck check:: test_extent.out
+ $(Q) if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
+ echo "Test succeeded." ; \
+ else \
+ echo "Test failed!" ; \
+ diff test_extent.out $(srcdir)/test_extent.in ; \
+ exit 1 ; \
+ fi
+
+clean::
+ $(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \
+ resize2fs.static test_extent.out
+
+mostlyclean: clean
+
+distclean: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+extent.o: $(srcdir)/extent.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
+resize2fs.o: $(srcdir)/resize2fs.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
+main.o: $(srcdir)/main.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/resize2fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/version.h
+online.o: $(srcdir)/online.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
+resource_track.o: $(srcdir)/resource_track.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
+sim_progress.o: $(srcdir)/sim_progress.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h
diff --git a/resize/extent.c b/resize/extent.c
new file mode 100644
index 0000000..82f69ca
--- /dev/null
+++ b/resize/extent.c
@@ -0,0 +1,244 @@
+/*
+ * extent.c --- ext2 extent abstraction
+ *
+ * This abstraction is used to provide a compact way of representing a
+ * translation table, for moving multiple contiguous ranges (extents)
+ * of blocks or inodes.
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "resize2fs.h"
+
+struct ext2_extent_entry {
+ __u64 old_loc, new_loc;
+ __u64 size;
+};
+
+struct _ext2_extent {
+ struct ext2_extent_entry *list;
+ __u64 cursor;
+ __u64 size;
+ __u64 num;
+ __u64 sorted;
+};
+
+/*
+ * Create an extent table
+ */
+errcode_t ext2fs_create_extent_table(ext2_extent *ret_extent, __u64 size)
+{
+ ext2_extent extent;
+ errcode_t retval;
+
+ retval = ext2fs_get_mem(sizeof(struct _ext2_extent), &extent);
+ if (retval)
+ return retval;
+ memset(extent, 0, sizeof(struct _ext2_extent));
+
+ extent->size = size ? size : 50;
+ extent->cursor = 0;
+ extent->num = 0;
+ extent->sorted = 1;
+
+ retval = ext2fs_get_arrayzero(sizeof(struct ext2_extent_entry),
+ extent->size, &extent->list);
+ if (retval) {
+ ext2fs_free_mem(&extent);
+ return retval;
+ }
+ *ret_extent = extent;
+ return 0;
+}
+
+/*
+ * Free an extent table
+ */
+void ext2fs_free_extent_table(ext2_extent extent)
+{
+ if (extent->list)
+ ext2fs_free_mem(&extent->list);
+ extent->list = 0;
+ extent->size = 0;
+ extent->num = 0;
+ ext2fs_free_mem(&extent);
+}
+
+/*
+ * Add an entry to the extent table
+ */
+errcode_t ext2fs_add_extent_entry(ext2_extent extent, __u64 old_loc, __u64 new_loc)
+{
+ struct ext2_extent_entry *ent;
+ errcode_t retval;
+ __u64 newsize;
+ __u64 curr;
+
+ if (extent->num >= extent->size) {
+ newsize = extent->size + 100;
+ retval = ext2fs_resize_mem(sizeof(struct ext2_extent_entry) *
+ extent->size,
+ sizeof(struct ext2_extent_entry) *
+ newsize, &extent->list);
+ if (retval)
+ return retval;
+ extent->size = newsize;
+ }
+ curr = extent->num;
+ ent = extent->list + curr;
+ if (curr) {
+ /*
+ * Check to see if this can be coalesced with the last
+ * extent
+ */
+ ent--;
+ if ((ent->old_loc + ent->size == old_loc) &&
+ (ent->new_loc + ent->size == new_loc)) {
+ ent->size++;
+ return 0;
+ }
+ /*
+ * Now see if we're going to ruin the sorting
+ */
+ if (ent->old_loc + ent->size > old_loc)
+ extent->sorted = 0;
+ ent++;
+ }
+ ent->old_loc = old_loc;
+ ent->new_loc = new_loc;
+ ent->size = 1;
+ extent->num++;
+ return 0;
+}
+
+/*
+ * Helper function for qsort
+ */
+static EXT2_QSORT_TYPE extent_cmp(const void *a, const void *b)
+{
+ const struct ext2_extent_entry *db_a;
+ const struct ext2_extent_entry *db_b;
+
+ db_a = (const struct ext2_extent_entry *) a;
+ db_b = (const struct ext2_extent_entry *) b;
+
+ return (db_a->old_loc - db_b->old_loc);
+}
+
+/*
+ * Given an inode map and inode number, look up the old inode number
+ * and return the new inode number.
+ */
+__u64 ext2fs_extent_translate(ext2_extent extent, __u64 old_loc)
+{
+ __s64 low, high, mid;
+ __u64 lowval, highval;
+ float range;
+
+ if (!extent->sorted) {
+ qsort(extent->list, extent->num,
+ sizeof(struct ext2_extent_entry), extent_cmp);
+ extent->sorted = 1;
+ }
+ low = 0;
+ high = extent->num-1;
+ while (low <= high) {
+#if 0
+ mid = (low+high)/2;
+#else
+ if (low == high)
+ mid = low;
+ else {
+ /* Interpolate for efficiency */
+ lowval = extent->list[low].old_loc;
+ highval = extent->list[high].old_loc;
+
+ if (old_loc < lowval)
+ range = 0;
+ else if (old_loc > highval)
+ range = 1;
+ else {
+ range = ((float) (old_loc - lowval)) /
+ (highval - lowval);
+ if (range > 0.9)
+ range = 0.9;
+ if (range < 0.1)
+ range = 0.1;
+ }
+ mid = low + ((__u64) (range * (high-low)));
+ }
+#endif
+ if ((old_loc >= extent->list[mid].old_loc) &&
+ (old_loc < extent->list[mid].old_loc + extent->list[mid].size))
+ return (extent->list[mid].new_loc +
+ (old_loc - extent->list[mid].old_loc));
+ if (old_loc < extent->list[mid].old_loc)
+ high = mid-1;
+ else
+ low = mid+1;
+ }
+ return 0;
+}
+
+/*
+ * For debugging only
+ */
+void ext2fs_extent_dump(ext2_extent extent, FILE *out)
+{
+ __u64 i;
+ struct ext2_extent_entry *ent;
+
+ fputs(_("# Extent dump:\n"), out);
+ fprintf(out, _("#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"),
+ (unsigned long long) extent->num,
+ (unsigned long long) extent->size,
+ (unsigned long long) extent->cursor,
+ (unsigned long long) extent->sorted);
+ for (i=0, ent=extent->list; i < extent->num; i++, ent++) {
+ fprintf(out, "#\t\t %llu -> %llu (%llu)\n",
+ (unsigned long long) ent->old_loc,
+ (unsigned long long) ent->new_loc,
+ (unsigned long long) ent->size);
+ }
+}
+
+/*
+ * Iterate over the contents of the extent table
+ */
+errcode_t ext2fs_iterate_extent(ext2_extent extent, __u64 *old_loc,
+ __u64 *new_loc, __u64 *size)
+{
+ struct ext2_extent_entry *ent;
+
+ if (!old_loc) {
+ extent->cursor = 0;
+ return 0;
+ }
+
+ if (extent->cursor >= extent->num) {
+ *old_loc = 0;
+ *new_loc = 0;
+ *size = 0;
+ return 0;
+ }
+
+ ent = extent->list + extent->cursor++;
+
+ *old_loc = ent->old_loc;
+ *new_loc = ent->new_loc;
+ *size = ent->size;
+ return 0;
+}
+
+
+
+
diff --git a/resize/main.c b/resize/main.c
new file mode 100644
index 0000000..94f5ec6
--- /dev/null
+++ b/resize/main.c
@@ -0,0 +1,706 @@
+/*
+ * main.c --- ext2 resizer main program
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <unistd.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <libgen.h>
+
+#include "e2p/e2p.h"
+
+#include "resize2fs.h"
+
+#include "../version.h"
+
+char *program_name;
+static char *device_name, *io_options;
+
+static void usage (char *prog)
+{
+ fprintf (stderr, _("Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] "
+ "[-p] device [-b|-s|new_size] [-S RAID-stride] "
+ "[-z undo_file]\n\n"),
+ prog ? prog : "resize2fs");
+
+ exit (1);
+}
+
+static errcode_t resize_progress_func(ext2_resize_t rfs, int pass,
+ unsigned long cur, unsigned long max)
+{
+ ext2_sim_progmeter progress;
+ const char *label;
+ errcode_t retval;
+
+ progress = (ext2_sim_progmeter) rfs->prog_data;
+ if (max == 0)
+ return 0;
+ if (cur == 0) {
+ if (progress)
+ ext2fs_progress_close(progress);
+ progress = 0;
+ switch (pass) {
+ case E2_RSZ_EXTEND_ITABLE_PASS:
+ label = _("Extending the inode table");
+ break;
+ case E2_RSZ_BLOCK_RELOC_PASS:
+ label = _("Relocating blocks");
+ break;
+ case E2_RSZ_INODE_SCAN_PASS:
+ label = _("Scanning inode table");
+ break;
+ case E2_RSZ_INODE_REF_UPD_PASS:
+ label = _("Updating inode references");
+ break;
+ case E2_RSZ_MOVE_ITABLE_PASS:
+ label = _("Moving inode table");
+ break;
+ default:
+ label = _("Unknown pass?!?");
+ break;
+ }
+ printf(_("Begin pass %d (max = %lu)\n"), pass, max);
+ retval = ext2fs_progress_init(&progress, label, 30,
+ 40, max, 0);
+ if (retval)
+ progress = 0;
+ rfs->prog_data = (void *) progress;
+ }
+ if (progress)
+ ext2fs_progress_update(progress, cur);
+ if (cur >= max) {
+ if (progress)
+ ext2fs_progress_close(progress);
+ progress = 0;
+ rfs->prog_data = 0;
+ }
+ return 0;
+}
+
+static void determine_fs_stride(ext2_filsys fs)
+{
+ unsigned int group;
+ unsigned long long sum;
+ unsigned int has_sb, prev_has_sb = 0, num;
+ unsigned int flexbg_size = 1U << fs->super->s_log_groups_per_flex;
+ int i_stride, b_stride;
+
+ if (fs->stride)
+ return;
+ num = 0; sum = 0;
+ for (group = 0; group < fs->group_desc_count; group++) {
+ has_sb = ext2fs_bg_has_super(fs, group);
+ if (group == 0 || has_sb != prev_has_sb)
+ goto next;
+ b_stride = ext2fs_block_bitmap_loc(fs, group) -
+ ext2fs_block_bitmap_loc(fs, group - 1) -
+ fs->super->s_blocks_per_group;
+ i_stride = ext2fs_inode_bitmap_loc(fs, group) -
+ ext2fs_inode_bitmap_loc(fs, group - 1) -
+ fs->super->s_blocks_per_group;
+ if (b_stride != i_stride ||
+ b_stride < 0 ||
+ (flexbg_size > 1 && (group % flexbg_size == 0)))
+ goto next;
+
+ /* printf("group %d has stride %d\n", group, b_stride); */
+ sum += b_stride;
+ num++;
+
+ next:
+ prev_has_sb = has_sb;
+ }
+
+ if (fs->group_desc_count > 12 && num < 3)
+ sum = 0;
+
+ if (num)
+ fs->stride = sum / num;
+ else
+ fs->stride = 0;
+
+ fs->super->s_raid_stride = fs->stride;
+ ext2fs_mark_super_dirty(fs);
+
+#if 0
+ if (fs->stride)
+ printf("Using RAID stride of %d\n", fs->stride);
+#endif
+}
+
+static void bigalloc_check(ext2_filsys fs, int force)
+{
+ if (!force && ext2fs_has_feature_bigalloc(fs->super)) {
+ fprintf(stderr, "%s", _("\nResizing bigalloc file systems has "
+ "not been fully tested. Proceed at\n"
+ "your own risk! Use the force option "
+ "if you want to go ahead anyway.\n\n"));
+ exit(1);
+ }
+}
+
+static int resize2fs_setup_tdb(const char *device, char *undo_file,
+ io_manager *io_ptr)
+{
+ errcode_t retval = ENOMEM;
+ const char *tdb_dir = NULL;
+ char *tdb_file = NULL;
+ char *dev_name, *tmp_name;
+
+ /* (re)open a specific undo file */
+ if (undo_file && undo_file[0] != 0) {
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto err;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(undo_file);
+ if (retval)
+ goto err;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"),
+ undo_file, device);
+ return retval;
+ }
+
+ /*
+ * Configuration via a conf file would be
+ * nice
+ */
+ tdb_dir = getenv("E2FSPROGS_UNDO_DIR");
+ if (!tdb_dir)
+ tdb_dir = "/var/lib/e2fsprogs";
+
+ if (!strcmp(tdb_dir, "none") || (tdb_dir[0] == 0) ||
+ access(tdb_dir, W_OK))
+ return 0;
+
+ tmp_name = strdup(device);
+ if (!tmp_name)
+ goto errout;
+ dev_name = basename(tmp_name);
+ tdb_file = malloc(strlen(tdb_dir) + 11 + strlen(dev_name) + 7 + 1);
+ if (!tdb_file) {
+ free(tmp_name);
+ goto errout;
+ }
+ sprintf(tdb_file, "%s/resize2fs-%s.e2undo", tdb_dir, dev_name);
+ free(tmp_name);
+
+ if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
+ retval = errno;
+ com_err(program_name, retval,
+ _("while trying to delete %s"), tdb_file);
+ goto errout;
+ }
+
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto errout;
+ *io_ptr = undo_io_manager;
+ retval = set_undo_io_backup_file(tdb_file);
+ if (retval)
+ goto errout;
+ printf(_("Overwriting existing filesystem; this can be undone "
+ "using the command:\n"
+ " e2undo %s %s\n\n"), tdb_file, device);
+
+ free(tdb_file);
+ return 0;
+errout:
+ free(tdb_file);
+err:
+ com_err(program_name, retval, "%s",
+ _("while trying to setup undo file\n"));
+ return retval;
+}
+
+int main (int argc, char ** argv)
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ int c;
+ int flags = 0;
+ int flush = 0;
+ int force = 0;
+ int io_flags = 0;
+ int force_min_size = 0;
+ int print_min_size = 0;
+ int fd, ret;
+ int open_flags = O_RDWR;
+ blk64_t new_size = 0;
+ blk64_t max_size = 0;
+ blk64_t min_size = 0;
+ io_manager io_ptr;
+ char *new_size_str = 0;
+ int use_stride = -1;
+ ext2fs_struct_stat st_buf;
+ __s64 new_file_size;
+ unsigned int sys_page_size = 4096;
+ unsigned int blocksize;
+ long sysval;
+ int len, mount_flags;
+ char *mtpt, *undo_file = NULL;
+ dgrp_t new_group_desc_count;
+ unsigned long new_desc_blocks;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
+#endif
+
+ add_error_table(&et_ext2_error_table);
+
+ fprintf (stderr, "resize2fs %s (%s)\n",
+ E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ if (argc && *argv)
+ program_name = *argv;
+ else
+ usage(NULL);
+
+ while ((c = getopt(argc, argv, "d:fFhMPpS:bsz:")) != EOF) {
+ switch (c) {
+ case 'h':
+ usage(program_name);
+ break;
+ case 'f':
+ force = 1;
+ break;
+ case 'F':
+ flush = 1;
+ break;
+ case 'M':
+ force_min_size = 1;
+ break;
+ case 'P':
+ print_min_size = 1;
+ break;
+ case 'd':
+ flags |= atoi(optarg);
+ break;
+ case 'p':
+ flags |= RESIZE_PERCENT_COMPLETE;
+ break;
+ case 'S':
+ use_stride = atoi(optarg);
+ break;
+ case 'b':
+ flags |= RESIZE_ENABLE_64BIT;
+ break;
+ case 's':
+ flags |= RESIZE_DISABLE_64BIT;
+ break;
+ case 'z':
+ undo_file = optarg;
+ break;
+ default:
+ usage(program_name);
+ }
+ }
+ if (optind == argc)
+ usage(program_name);
+
+ device_name = argv[optind++];
+ if (optind < argc)
+ new_size_str = argv[optind++];
+ if (optind < argc)
+ usage(program_name);
+
+ io_options = strchr(device_name, '?');
+ if (io_options)
+ *io_options++ = 0;
+
+ /*
+ * Figure out whether or not the device is mounted, and if it is
+ * where it is mounted.
+ */
+ len=80;
+ while (1) {
+ mtpt = malloc(len);
+ if (!mtpt)
+ return ENOMEM;
+ mtpt[len-1] = 0;
+ retval = ext2fs_check_mount_point(device_name, &mount_flags,
+ mtpt, len);
+ if (retval) {
+ com_err("ext2fs_check_mount_point", retval,
+ _("while determining whether %s is mounted."),
+ device_name);
+ exit(1);
+ }
+ if (!(mount_flags & EXT2_MF_MOUNTED) || (mtpt[len-1] == 0))
+ break;
+ free(mtpt);
+ len = 2 * len;
+ }
+
+ if (print_min_size)
+ open_flags = O_RDONLY;
+
+ fd = ext2fs_open_file(device_name, open_flags, 0);
+ if (fd < 0) {
+ com_err("open", errno, _("while opening %s"),
+ device_name);
+ exit(1);
+ }
+
+ ret = ext2fs_fstat(fd, &st_buf);
+ if (ret < 0) {
+ com_err("open", errno,
+ _("while getting stat information for %s"),
+ device_name);
+ exit(1);
+ }
+
+ if (flush) {
+ retval = ext2fs_sync_device(fd, 1);
+ if (retval) {
+ com_err(argv[0], retval,
+ _("while trying to flush %s"),
+ device_name);
+ exit(1);
+ }
+ }
+
+ if (!S_ISREG(st_buf.st_mode )) {
+ close(fd);
+ fd = -1;
+ }
+
+#ifdef CONFIG_TESTIO_DEBUG
+ if (getenv("TEST_IO_FLAGS") || getenv("TEST_IO_BLOCK")) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+#endif
+ io_ptr = unix_io_manager;
+
+ if (!(mount_flags & EXT2_MF_MOUNTED) && !print_min_size)
+ io_flags = EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE;
+
+ io_flags |= EXT2_FLAG_64BITS | EXT2_FLAG_THREADS;
+ if (undo_file) {
+ retval = resize2fs_setup_tdb(device_name, undo_file, &io_ptr);
+ if (retval)
+ exit(1);
+ }
+ retval = ext2fs_open2(device_name, io_options, io_flags,
+ 0, 0, io_ptr, &fs);
+ if (retval) {
+ com_err(program_name, retval, _("while trying to open %s"),
+ device_name);
+ printf("%s", _("Couldn't find valid filesystem superblock.\n"));
+ exit (1);
+ }
+ fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+
+ /*
+ * Before acting on an unmounted filesystem, make sure it's ok,
+ * unless the user is forcing it.
+ *
+ * We do ERROR and VALID checks even if we're only printing the
+ * minimum size, because traversal of a badly damaged filesystem
+ * can cause issues as well. We don't require it to be fscked after
+ * the last mount time in this case, though, as this is a bit less
+ * risky.
+ */
+ if (!force && !(mount_flags & EXT2_MF_MOUNTED)) {
+ int checkit = 0;
+
+ if (fs->super->s_state & EXT2_ERROR_FS)
+ checkit = 1;
+
+ if ((fs->super->s_state & EXT2_VALID_FS) == 0)
+ checkit = 1;
+
+ if ((fs->super->s_lastcheck < fs->super->s_mtime) &&
+ !print_min_size)
+ checkit = 1;
+
+ if ((ext2fs_free_blocks_count(fs->super) >
+ ext2fs_blocks_count(fs->super)) ||
+ (fs->super->s_free_inodes_count > fs->super->s_inodes_count))
+ checkit = 1;
+
+ if ((fs->super->s_last_orphan != 0) ||
+ ext2fs_has_feature_journal_needs_recovery(fs->super))
+ checkit = 1;
+
+ if (checkit) {
+ fprintf(stderr,
+ _("Please run 'e2fsck -f %s' first.\n\n"),
+ device_name);
+ goto errout;
+ }
+ }
+
+ /*
+ * Check for compatibility with the feature sets. We need to
+ * be more stringent than ext2fs_open().
+ */
+ if (fs->super->s_feature_compat & ~EXT2_LIB_FEATURE_COMPAT_SUPP) {
+ com_err(program_name, EXT2_ET_UNSUPP_FEATURE,
+ "(%s)", device_name);
+ goto errout;
+ }
+
+ min_size = calculate_minimum_resize_size(fs, flags);
+
+ if (print_min_size) {
+ printf(_("Estimated minimum size of the filesystem: %llu\n"),
+ (unsigned long long) min_size);
+ success_exit:
+ (void) ext2fs_close_free(&fs);
+ remove_error_table(&et_ext2_error_table);
+ exit(0);
+ }
+
+ /* Determine the system page size if possible */
+#ifdef HAVE_SYSCONF
+#if (!defined(_SC_PAGESIZE) && defined(_SC_PAGE_SIZE))
+#define _SC_PAGESIZE _SC_PAGE_SIZE
+#endif
+#ifdef _SC_PAGESIZE
+ sysval = sysconf(_SC_PAGESIZE);
+ if (sysval > 0)
+ sys_page_size = sysval;
+#endif /* _SC_PAGESIZE */
+#endif /* HAVE_SYSCONF */
+
+ /*
+ * Get the size of the containing partition, and use this for
+ * defaults and for making sure the new filesystem doesn't
+ * exceed the partition size.
+ */
+ blocksize = fs->blocksize;
+ retval = ext2fs_get_device_size2(device_name, blocksize,
+ &max_size);
+ if (retval) {
+ com_err(program_name, retval, "%s",
+ _("while trying to determine filesystem size"));
+ goto errout;
+ }
+ if (force_min_size)
+ new_size = min_size;
+ else if (new_size_str) {
+ new_size = parse_num_blocks2(new_size_str,
+ fs->super->s_log_block_size);
+ if (new_size == 0) {
+ com_err(program_name, 0,
+ _("Invalid new size: %s\n"), new_size_str);
+ goto errout;
+ }
+ } else {
+ new_size = max_size;
+ /* Round down to an even multiple of a pagesize */
+ if (sys_page_size > blocksize)
+ new_size &= ~((blk64_t)((sys_page_size / blocksize)-1));
+ }
+ /* If changing 64bit, don't change the filesystem size. */
+ if (flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)) {
+ new_size = ext2fs_blocks_count(fs->super);
+ }
+ if (!ext2fs_has_feature_64bit(fs->super)) {
+ /* Take 16T down to 2^32-1 blocks */
+ if (new_size == (1ULL << 32))
+ new_size--;
+ else if (new_size > (1ULL << 32)) {
+ com_err(program_name, 0, "%s",
+ _("New size too large to be "
+ "expressed in 32 bits\n"));
+ goto errout;
+ }
+ }
+
+ /* If using cluster allocations, trim down to a cluster boundary */
+ if (ext2fs_has_feature_bigalloc(fs->super)) {
+ new_size &= ~((blk64_t)(1ULL << fs->cluster_ratio_bits) - 1);
+ }
+
+ new_group_desc_count = ext2fs_div64_ceil(new_size -
+ fs->super->s_first_data_block,
+ EXT2_BLOCKS_PER_GROUP(fs->super));
+ new_desc_blocks = ext2fs_div_ceil(new_group_desc_count,
+ EXT2_DESC_PER_BLOCK(fs->super));
+ if ((new_desc_blocks + fs->super->s_first_data_block) >
+ EXT2_BLOCKS_PER_GROUP(fs->super)) {
+ com_err(program_name, 0,
+ _("New size results in too many block group "
+ "descriptors.\n"));
+ goto errout;
+ }
+
+ if (!force && new_size < min_size) {
+ com_err(program_name, 0,
+ _("New size smaller than minimum (%llu)\n"),
+ (unsigned long long) min_size);
+ goto errout;
+ }
+ if (use_stride >= 0) {
+ if (use_stride >= (int) fs->super->s_blocks_per_group) {
+ com_err(program_name, 0, "%s",
+ _("Invalid stride length"));
+ goto errout;
+ }
+ fs->stride = fs->super->s_raid_stride = use_stride;
+ ext2fs_mark_super_dirty(fs);
+ } else
+ determine_fs_stride(fs);
+
+ /*
+ * If we are resizing a plain file, and it's not big enough,
+ * automatically extend it in a sparse fashion by writing the
+ * last requested block.
+ */
+ new_file_size = ((__u64) new_size) * blocksize;
+ if ((__u64) new_file_size >
+ (((__u64) 1) << (sizeof(st_buf.st_size)*8 - 1)) - 1)
+ fd = -1;
+ if ((new_file_size > st_buf.st_size) &&
+ (fd > 0)) {
+ if ((ext2fs_llseek(fd, new_file_size-1, SEEK_SET) >= 0) &&
+ (write(fd, "0", 1) == 1))
+ max_size = new_size;
+ }
+ if (!force && (new_size > max_size)) {
+ fprintf(stderr, _("The containing partition (or device)"
+ " is only %llu (%dk) blocks.\nYou requested a new size"
+ " of %llu blocks.\n\n"), (unsigned long long) max_size,
+ blocksize / 1024, (unsigned long long) new_size);
+ goto errout;
+ }
+ if ((flags & RESIZE_DISABLE_64BIT) && (flags & RESIZE_ENABLE_64BIT)) {
+ fprintf(stderr, _("Cannot set and unset 64bit feature.\n"));
+ goto errout;
+ } else if (flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)) {
+ if (new_size >= (1ULL << 32)) {
+ fprintf(stderr, _("Cannot change the 64bit feature "
+ "on a filesystem that is larger than "
+ "2^32 blocks.\n"));
+ goto errout;
+ }
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ fprintf(stderr, _("Cannot change the 64bit feature "
+ "while the filesystem is mounted.\n"));
+ goto errout;
+ }
+ if (flags & RESIZE_ENABLE_64BIT &&
+ !ext2fs_has_feature_extents(fs->super)) {
+ fprintf(stderr, _("Please enable the extents feature "
+ "with tune2fs before enabling the 64bit "
+ "feature.\n"));
+ goto errout;
+ }
+ } else {
+ adjust_new_size(fs, &new_size);
+ if (new_size == ext2fs_blocks_count(fs->super)) {
+ fprintf(stderr, _("The filesystem is already "
+ "%llu (%dk) blocks long. "
+ "Nothing to do!\n\n"),
+ (unsigned long long) new_size,
+ blocksize / 1024);
+ goto success_exit;
+ }
+ }
+ if ((flags & RESIZE_ENABLE_64BIT) &&
+ ext2fs_has_feature_64bit(fs->super)) {
+ fprintf(stderr, _("The filesystem is already 64-bit.\n"));
+ goto success_exit;
+ }
+ if ((flags & RESIZE_DISABLE_64BIT) &&
+ !ext2fs_has_feature_64bit(fs->super)) {
+ fprintf(stderr, _("The filesystem is already 32-bit.\n"));
+ goto success_exit;
+ }
+ if (new_size < ext2fs_blocks_count(fs->super) &&
+ ext2fs_has_feature_stable_inodes(fs->super)) {
+ fprintf(stderr, _("Cannot shrink this filesystem "
+ "because it has the stable_inodes feature flag.\n"));
+ goto errout;
+ }
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ retval = online_resize_fs(fs, mtpt, &new_size, flags);
+ } else {
+ bigalloc_check(fs, force);
+ if (flags & RESIZE_ENABLE_64BIT)
+ printf(_("Converting the filesystem to 64-bit.\n"));
+ else if (flags & RESIZE_DISABLE_64BIT)
+ printf(_("Converting the filesystem to 32-bit.\n"));
+ else
+ printf(_("Resizing the filesystem on "
+ "%s to %llu (%dk) blocks.\n"),
+ device_name, (unsigned long long) new_size,
+ blocksize / 1024);
+ retval = resize_fs(fs, &new_size, flags,
+ ((flags & RESIZE_PERCENT_COMPLETE) ?
+ resize_progress_func : 0));
+ }
+ free(mtpt);
+ if (retval) {
+ com_err(program_name, retval, _("while trying to resize %s"),
+ device_name);
+ fprintf(stderr,
+ _("Please run 'e2fsck -fy %s' to fix the filesystem\n"
+ "after the aborted resize operation.\n"),
+ device_name);
+ goto errout;
+ }
+ printf(_("The filesystem on %s is now %llu (%dk) blocks long.\n\n"),
+ device_name, (unsigned long long) new_size, blocksize / 1024);
+
+ if ((st_buf.st_size > new_file_size) &&
+ (fd > 0)) {
+#ifdef HAVE_FTRUNCATE64
+ retval = ftruncate64(fd, new_file_size);
+#else
+ retval = 0;
+ /* Only truncate if new_file_size doesn't overflow off_t */
+ if (((off_t) new_file_size) == new_file_size)
+ retval = ftruncate(fd, (off_t) new_file_size);
+#endif
+ if (retval)
+ com_err(program_name, retval,
+ _("while trying to truncate %s"),
+ device_name);
+ }
+ if (fd > 0)
+ close(fd);
+ remove_error_table(&et_ext2_error_table);
+ return 0;
+errout:
+ (void) ext2fs_close_free(&fs);
+ remove_error_table(&et_ext2_error_table);
+ return 1;
+}
diff --git a/resize/online.c b/resize/online.c
new file mode 100644
index 0000000..eef7c0b
--- /dev/null
+++ b/resize/online.c
@@ -0,0 +1,293 @@
+/*
+ * online.c --- Do on-line resizing of the ext3 filesystem
+ *
+ * Copyright (C) 2006 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "resize2fs.h"
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#include <sys/stat.h>
+#include <fcntl.h>
+
+extern char *program_name;
+
+#define MAX_32_NUM ((((unsigned long long) 1) << 32) - 1)
+
+#ifdef __linux__
+static int parse_version_number(const char *s)
+{
+ int major, minor, rev;
+ char *endptr;
+ const char *cp = s;
+
+ if (!s)
+ return 0;
+ major = strtol(cp, &endptr, 10);
+ if (cp == endptr || *endptr != '.')
+ return 0;
+ cp = endptr + 1;
+ minor = strtol(cp, &endptr, 10);
+ if (cp == endptr || *endptr != '.')
+ return 0;
+ cp = endptr + 1;
+ rev = strtol(cp, &endptr, 10);
+ if (cp == endptr)
+ return 0;
+ return ((((major * 256) + minor) * 256) + rev);
+}
+
+#define VERSION_CODE(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+
+#endif
+
+errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt,
+ blk64_t *new_size, int flags EXT2FS_ATTR((unused)))
+{
+#ifdef __linux__
+ struct ext2_new_group_input input;
+ struct ext4_new_group_input input64;
+ struct ext2_super_block *sb = fs->super;
+ unsigned long new_desc_blocks;
+ ext2_filsys new_fs;
+ errcode_t retval;
+ double percent;
+ dgrp_t i;
+ blk_t size;
+ int fd;
+ int use_old_ioctl = 1;
+ int no_meta_bg_resize = 0;
+ int no_resize_ioctl = 0;
+
+ if (getenv("RESIZE2FS_KERNEL_VERSION")) {
+ char *version_to_emulate = getenv("RESIZE2FS_KERNEL_VERSION");
+ int kvers = parse_version_number(version_to_emulate);
+
+ if (kvers < VERSION_CODE(3, 7, 0))
+ no_meta_bg_resize = 1;
+ if (kvers < VERSION_CODE(3, 3, 0))
+ no_resize_ioctl = 1;
+ }
+
+ if (ext2fs_has_feature_sparse_super2(fs->super) &&
+ (access("/sys/fs/ext4/features/sparse_super2", R_OK) != 0)) {
+ com_err(program_name, 0, _("kernel does not support online "
+ "resize with sparse_super2"));
+ exit(1);
+ }
+
+ printf(_("Filesystem at %s is mounted on %s; "
+ "on-line resizing required\n"), fs->device_name, mtpt);
+
+ if (*new_size < ext2fs_blocks_count(sb)) {
+ com_err(program_name, 0, _("On-line shrinking not supported"));
+ exit(1);
+ }
+
+ /*
+ * If the number of descriptor blocks is going to increase,
+ * the on-line resizing inode must be present.
+ */
+ new_desc_blocks = ext2fs_div_ceil(
+ ext2fs_div64_ceil(*new_size -
+ fs->super->s_first_data_block,
+ EXT2_BLOCKS_PER_GROUP(fs->super)),
+ EXT2_DESC_PER_BLOCK(fs->super));
+ printf("old_desc_blocks = %lu, new_desc_blocks = %lu\n",
+ fs->desc_blocks, new_desc_blocks);
+
+ /*
+ * Do error checking to make sure the resize will be successful.
+ */
+ if ((access("/sys/fs/ext4/features/meta_bg_resize", R_OK) != 0) ||
+ no_meta_bg_resize) {
+ if (!ext2fs_has_feature_resize_inode(fs->super) &&
+ (new_desc_blocks != fs->desc_blocks)) {
+ com_err(program_name, 0,
+ _("Filesystem does not support online resizing"));
+ exit(1);
+ }
+
+ if (ext2fs_has_feature_resize_inode(fs->super) &&
+ new_desc_blocks > (fs->desc_blocks +
+ fs->super->s_reserved_gdt_blocks)) {
+ com_err(program_name, 0,
+ _("Not enough reserved gdt blocks for resizing"));
+ exit(1);
+ }
+
+ if ((ext2fs_blocks_count(sb) > MAX_32_NUM) ||
+ (*new_size > MAX_32_NUM)) {
+ com_err(program_name, 0,
+ _("Kernel does not support resizing a file system this large"));
+ exit(1);
+ }
+ }
+
+ fd = open(mtpt, O_RDONLY);
+ if (fd < 0) {
+ com_err(program_name, errno,
+ _("while trying to open mountpoint %s"), mtpt);
+ exit(1);
+ }
+
+ if (no_resize_ioctl) {
+ printf(_("Old resize interface requested.\n"));
+ } else if (ioctl(fd, EXT4_IOC_RESIZE_FS, new_size)) {
+ /*
+ * If kernel does not support EXT4_IOC_RESIZE_FS, use the
+ * old online resize. Note that the old approach does not
+ * handle >32 bit file systems
+ *
+ * Sigh, if we are running a 32-bit binary on a 64-bit
+ * kernel (which happens all the time on the MIPS
+ * architecture in Debian, but can happen on other CPU
+ * architectures as well) we will get EINVAL returned
+ * when an ioctl doesn't exist, at least up to Linux
+ * 3.1. See compat_sys_ioctl() in fs/compat_ioctl.c
+ * in the kernel sources. This is probably a kernel
+ * bug, but work around it here.
+ */
+ if ((errno != ENOTTY) && (errno != EINVAL)) {
+ if (errno == EPERM)
+ com_err(program_name, 0,
+ _("Permission denied to resize filesystem"));
+ else
+ com_err(program_name, errno,
+ _("While checking for on-line resizing "
+ "support"));
+ exit(1);
+ }
+ } else {
+ close(fd);
+ return 0;
+ }
+
+ size = ext2fs_blocks_count(sb);
+
+ if (ioctl(fd, EXT2_IOC_GROUP_EXTEND, &size)) {
+ if (errno == EPERM)
+ com_err(program_name, 0,
+ _("Permission denied to resize filesystem"));
+ else if (errno == ENOTTY)
+ com_err(program_name, 0,
+ _("Kernel does not support online resizing"));
+ else
+ com_err(program_name, errno,
+ _("While checking for on-line resizing support"));
+ exit(1);
+ }
+
+ percent = (ext2fs_r_blocks_count(sb) * 100.0) /
+ ext2fs_blocks_count(sb);
+
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval) {
+ close(fd);
+ return retval;
+ }
+
+ retval = ext2fs_dup_handle(fs, &new_fs);
+ if (retval) {
+ close(fd);
+ return retval;
+ }
+
+ /* The current method of adding one block group at a time to a
+ * mounted filesystem means it is impossible to accommodate the
+ * flex_bg allocation method of placing the metadata together
+ * in a single block group. For now we "fix" this issue by
+ * using the traditional layout for new block groups, where
+ * each block group is self-contained and contains its own
+ * bitmap blocks and inode tables. This means we don't get
+ * the layout advantages of flex_bg in the new block groups,
+ * but at least it allows on-line resizing to function.
+ */
+ ext2fs_clear_feature_flex_bg(new_fs->super);
+ retval = adjust_fs_info(new_fs, fs, 0, *new_size);
+ if (retval) {
+ close(fd);
+ return retval;
+ }
+
+ printf(_("Performing an on-line resize of %s to %llu (%dk) blocks.\n"),
+ fs->device_name, (unsigned long long) *new_size,
+ fs->blocksize / 1024);
+
+ size = fs->group_desc_count * sb->s_blocks_per_group +
+ sb->s_first_data_block;
+ if (size > *new_size)
+ size = *new_size;
+
+ if (ioctl(fd, EXT2_IOC_GROUP_EXTEND, &size)) {
+ com_err(program_name, errno,
+ _("While trying to extend the last group"));
+ exit(1);
+ }
+
+ for (i = fs->group_desc_count;
+ i < new_fs->group_desc_count; i++) {
+ input.group = i;
+ input.block_bitmap = ext2fs_block_bitmap_loc(new_fs, i);
+ input.inode_bitmap = ext2fs_inode_bitmap_loc(new_fs, i);
+ input.inode_table = ext2fs_inode_table_loc(new_fs, i);
+ input.blocks_count = ext2fs_group_blocks_count(new_fs, i);
+ input.reserved_blocks = (blk_t) (percent * input.blocks_count
+ / 100.0);
+
+#if 0
+ printf("new block bitmap is at 0x%04x\n", input.block_bitmap);
+ printf("new inode bitmap is at 0x%04x\n", input.inode_bitmap);
+ printf("new inode table is at 0x%04x-0x%04x\n",
+ input.inode_table,
+ input.inode_table + new_fs->inode_blocks_per_group-1);
+ printf("new group has %u blocks\n", input.blocks_count);
+ printf("new group will reserve %d blocks\n",
+ input.reserved_blocks);
+ printf("new group has %d free blocks\n",
+ ext2fs_bg_free_blocks_count(new_fs, i),
+ printf("new group has %d free inodes (%d blocks)\n",
+ ext2fs_bg_free_inodes_count(new_fs, i),
+ new_fs->inode_blocks_per_group);
+ printf("Adding group #%d\n", input.group);
+#endif
+
+ if (use_old_ioctl &&
+ ioctl(fd, EXT2_IOC_GROUP_ADD, &input) == 0)
+ continue;
+ else
+ use_old_ioctl = 0;
+
+ input64.group = input.group;
+ input64.block_bitmap = input.block_bitmap;
+ input64.inode_bitmap = input.inode_bitmap;
+ input64.inode_table = input.inode_table;
+ input64.blocks_count = input.blocks_count;
+ input64.reserved_blocks = input.reserved_blocks;
+ input64.unused = input.unused;
+
+ if (ioctl(fd, EXT4_IOC_GROUP_ADD, &input64) < 0) {
+ com_err(program_name, errno,
+ _("While trying to add group #%d"),
+ input.group);
+ exit(1);
+ }
+ }
+
+ ext2fs_free(new_fs);
+ close(fd);
+
+ return 0;
+#else
+ printf(_("Filesystem at %s is mounted on %s, and on-line resizing is "
+ "not supported on this system.\n"), fs->device_name, mtpt);
+ exit(1);
+#endif
+}
diff --git a/resize/resize2fs.8.in b/resize/resize2fs.8.in
new file mode 100644
index 0000000..528b626
--- /dev/null
+++ b/resize/resize2fs.8.in
@@ -0,0 +1,181 @@
+.\" -*- nroff -*-
+.\" Copyright 1997 by Theodore Ts'o. All Rights Reserved.
+.\"
+.\" .TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+resize2fs \- ext2/ext3/ext4 file system resizer
+.SH SYNOPSIS
+.B resize2fs
+[
+.B \-fFpPMbs
+]
+[
+.B \-d
+.I debug-flags
+]
+[
+.B \-S
+.I RAID-stride
+]
+[
+.B \-z
+.I undo_file
+]
+.I device
+[
+.I size
+]
+.SH DESCRIPTION
+The
+.B resize2fs
+program will resize ext2, ext3, or ext4 file systems. It can be used to
+enlarge or shrink an unmounted file system located on
+.IR device .
+If the file system is mounted, it can be used to expand the size of the
+mounted file system, assuming the kernel and the file system supports
+on-line resizing. (Modern Linux 2.6 kernels will support on-line resize
+for file systems mounted using ext3 and ext4; ext3 file systems will
+require the use of file systems with the resize_inode feature enabled.)
+.PP
+The
+.I size
+parameter specifies the requested new size of the file system.
+If no units are specified, the units of the
+.I size
+parameter shall be the file system blocksize of the file system.
+Optionally, the
+.I size
+parameter may be suffixed by one of the following units
+designators: 'K', 'M', 'G', 'T' (either upper-case or lower-case) or 's'
+for power-of-two kilobytes, megabytes, gigabytes, terabytes or 512 byte
+sectors respectively. The
+.I size
+of the file system may never be larger than the size of the partition.
+If
+.I size
+parameter is not specified, it will default to the size of the partition.
+.PP
+The
+.B resize2fs
+program does not manipulate the size of partitions. If you wish to enlarge
+a file system, you must make sure you can expand the size of the
+underlying partition first. This can be done using
+.BR fdisk (8)
+by deleting the partition and recreating it with a larger size or using
+.BR lvextend (8),
+if you're using the logical volume manager
+.BR lvm (8).
+When
+recreating the partition, make sure you create it with the same starting
+disk cylinder as before! Otherwise, the resize operation will
+certainly not work, and you may lose your entire file system.
+After running
+.BR fdisk (8),
+run resize2fs to resize the ext2 file system
+to use all of the space in the newly enlarged partition.
+.PP
+If you wish to shrink an ext2 partition, first use
+.B resize2fs
+to shrink the size of file system. Then you may use
+.BR fdisk (8)
+to shrink the size of the partition. When shrinking the size of
+the partition, make sure you do not make it smaller than the new size
+of the ext2 file system!
+.PP
+The
+.B \-b
+and
+.B \-s
+options enable and disable the 64bit feature, respectively. The resize2fs
+program will, of course, take care of resizing the block group descriptors
+and moving other data blocks out of the way, as needed. It is not possible
+to resize the file system concurrent with changing the 64bit status.
+.SH OPTIONS
+.TP
+.B \-b
+Turns on the 64bit feature, resizes the group descriptors as necessary, and
+moves other metadata out of the way.
+.TP
+.B \-d \fIdebug-flags
+Turns on various resize2fs debugging features, if they have been compiled
+into the binary.
+.I debug-flags
+should be computed by adding the numbers of the desired features
+from the following list:
+.br
+ 2 \-\ Debug block relocations
+.br
+ 4 \-\ Debug inode relocations
+.br
+ 8 \-\ Debug moving the inode table
+.br
+ 16 \-\ Print timing information
+.br
+ 32 \-\ Debug minimum file system size (\-M) calculation
+.TP
+.B \-f
+Forces resize2fs to proceed with the file system resize operation, overriding
+some safety checks which resize2fs normally enforces.
+.TP
+.B \-F
+Flush the file system device's buffer caches before beginning. Only
+really useful for doing
+.B resize2fs
+time trials.
+.TP
+.B \-M
+Shrink the file system to minimize its size as much as possible,
+given the files stored in the file system.
+.TP
+.B \-p
+Print out percentage completion bars for each
+.B resize2fs
+phase during an offline (non-trivial) resize operation, so that the user
+can keep track of what the program is doing. (For very fast resize
+operations, no progress bars may be displayed.)
+.TP
+.B \-P
+Print an estimate of the number of file system blocks in the file system
+if it is shrunk using
+.BR resize2fs 's
+.B \-M
+option and then exit.
+.TP
+.B \-s
+Turns off the 64bit feature and frees blocks that are no longer in use.
+.TP
+.B \-S \fIRAID-stride
+The
+.B resize2fs
+program will heuristically determine the RAID stride that was specified
+when the file system was created. This option allows the user to
+explicitly specify a RAID stride setting to be used by resize2fs instead.
+.TP
+.BI \-z " undo_file"
+Before overwriting a file system block, write the old contents of the block to
+an undo file. This undo file can be used with e2undo(8) to restore the old
+contents of the file system should something go wrong. If the empty string is
+passed as the undo_file argument, the undo file will be written to a file named
+resize2fs-\fIdevice\fR.e2undo in the directory specified via the
+\fIE2FSPROGS_UNDO_DIR\fR environment variable.
+
+WARNING: The undo file cannot be used to recover from a power or system crash.
+.SH KNOWN BUGS
+The minimum size of the file system as estimated by resize2fs may be
+incorrect, especially for file systems with 1k and 2k blocksizes.
+.SH AUTHOR
+.B resize2fs
+was written by Theodore Ts'o <tytso@mit.edu>.
+.SH COPYRIGHT
+Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All
+rights reserved.
+As of April, 2000
+.B Resize2fs
+may be redistributed under the terms of the GPL.
+.SH SEE ALSO
+.BR fdisk (8),
+.BR e2fsck (8),
+.BR mke2fs (8),
+.BR lvm (8),
+.BR lvextend (8)
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
new file mode 100644
index 0000000..5eeb7d4
--- /dev/null
+++ b/resize/resize2fs.c
@@ -0,0 +1,3235 @@
+/*
+ * resize2fs.c --- ext2 main routine
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/*
+ * Resizing a filesystem consists of the following phases:
+ *
+ * 1. Adjust superblock and write out new parts of the inode
+ * table
+ * 2. Determine blocks which need to be relocated, and copy the
+ * contents of blocks from their old locations to the new ones.
+ * 3. Scan the inode table, doing the following:
+ * a. If blocks have been moved, update the block
+ * pointers in the inodes and indirect blocks to
+ * point at the new block locations.
+ * b. If parts of the inode table need to be evacuated,
+ * copy inodes from their old locations to their
+ * new ones.
+ * c. If (b) needs to be done, note which blocks contain
+ * directory information, since we will need to
+ * update the directory information.
+ * 4. Update the directory blocks with the new inode locations.
+ * 5. Move the inode tables, if necessary.
+ */
+
+#include "config.h"
+#include "resize2fs.h"
+#include <time.h>
+
+#ifdef __linux__ /* Kludge for debugging */
+#define RESIZE2FS_DEBUG
+#endif
+
+static void fix_uninit_block_bitmaps(ext2_filsys fs);
+static errcode_t adjust_superblock(ext2_resize_t rfs, blk64_t new_size);
+static errcode_t blocks_to_move(ext2_resize_t rfs);
+static errcode_t block_mover(ext2_resize_t rfs);
+static errcode_t inode_scan_and_fix(ext2_resize_t rfs);
+static errcode_t inode_ref_fix(ext2_resize_t rfs);
+static errcode_t move_itables(ext2_resize_t rfs);
+static errcode_t fix_resize_inode(ext2_filsys fs);
+static errcode_t resize2fs_calculate_summary_stats(ext2_filsys fs);
+static errcode_t fix_sb_journal_backup(ext2_filsys fs);
+static errcode_t mark_table_blocks(ext2_filsys fs,
+ ext2fs_block_bitmap bmap);
+static errcode_t clear_sparse_super2_last_group(ext2_resize_t rfs);
+static errcode_t reserve_sparse_super2_last_group(ext2_resize_t rfs,
+ ext2fs_block_bitmap meta_bmap);
+static errcode_t resize_group_descriptors(ext2_resize_t rfs, blk64_t new_size);
+static errcode_t move_bg_metadata(ext2_resize_t rfs);
+static errcode_t zero_high_bits_in_inodes(ext2_resize_t rfs);
+
+/*
+ * Some helper functions to check if a block is in a metadata area
+ */
+static inline int is_block_bm(ext2_filsys fs, unsigned int grp, blk64_t blk)
+{
+ return blk == ext2fs_block_bitmap_loc(fs, grp);
+}
+
+static inline int is_inode_bm(ext2_filsys fs, unsigned int grp, blk64_t blk)
+{
+ return blk == ext2fs_inode_bitmap_loc(fs, grp);
+}
+
+static int is_inode_tb(ext2_filsys fs, unsigned int grp, blk64_t blk)
+{
+ return blk >= ext2fs_inode_table_loc(fs, grp) &&
+ blk < (ext2fs_inode_table_loc(fs, grp) +
+ fs->inode_blocks_per_group);
+}
+
+/* Some bigalloc helper macros which are more succinct... */
+#define B2C(x) EXT2FS_B2C(fs, (x))
+#define C2B(x) EXT2FS_C2B(fs, (x))
+#define EQ_CLSTR(x, y) (B2C(x) == B2C(y))
+#define LE_CLSTR(x, y) (B2C(x) <= B2C(y))
+#define LT_CLSTR(x, y) (B2C(x) < B2C(y))
+#define GE_CLSTR(x, y) (B2C(x) >= B2C(y))
+#define GT_CLSTR(x, y) (B2C(x) > B2C(y))
+
+static int lazy_itable_init;
+
+/*
+ * This is the top-level routine which does the dirty deed....
+ */
+errcode_t resize_fs(ext2_filsys fs, blk64_t *new_size, int flags,
+ errcode_t (*progress)(ext2_resize_t rfs, int pass,
+ unsigned long cur,
+ unsigned long max_val))
+{
+ ext2_resize_t rfs;
+ errcode_t retval;
+ struct resource_track rtrack, overall_track;
+
+ /*
+ * Create the data structure
+ */
+ retval = ext2fs_get_mem(sizeof(struct ext2_resize_struct), &rfs);
+ if (retval)
+ return retval;
+
+ memset(rfs, 0, sizeof(struct ext2_resize_struct));
+ fs->priv_data = rfs;
+ rfs->old_fs = fs;
+ rfs->flags = flags;
+ rfs->itable_buf = 0;
+ rfs->progress = progress;
+
+ init_resource_track(&overall_track, "overall resize2fs", fs->io);
+ init_resource_track(&rtrack, "read_bitmaps", fs->io);
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ fs->super->s_state |= EXT2_ERROR_FS;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_flush(fs);
+
+ init_resource_track(&rtrack, "fix_uninit_block_bitmaps 1", fs->io);
+ fix_uninit_block_bitmaps(fs);
+ print_resource_track(rfs, &rtrack, fs->io);
+ retval = ext2fs_dup_handle(fs, &rfs->new_fs);
+ if (retval)
+ goto errout;
+
+ init_resource_track(&rtrack, "resize_group_descriptors", fs->io);
+ retval = resize_group_descriptors(rfs, *new_size);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "move_bg_metadata", fs->io);
+ retval = move_bg_metadata(rfs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "zero_high_bits_in_metadata", fs->io);
+ retval = zero_high_bits_in_inodes(rfs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "adjust_superblock", fs->io);
+ retval = adjust_superblock(rfs, *new_size);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "fix_uninit_block_bitmaps 2", fs->io);
+ fix_uninit_block_bitmaps(rfs->new_fs);
+ print_resource_track(rfs, &rtrack, fs->io);
+ /* Clear the block bitmap uninit flag for the last block group */
+ ext2fs_bg_flags_clear(rfs->new_fs, rfs->new_fs->group_desc_count - 1,
+ EXT2_BG_BLOCK_UNINIT);
+
+ *new_size = ext2fs_blocks_count(rfs->new_fs->super);
+
+ init_resource_track(&rtrack, "blocks_to_move", fs->io);
+ retval = blocks_to_move(rfs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_BMOVE)
+ printf("Number of free blocks: %llu/%llu, Needed: %llu\n",
+ (unsigned long long) ext2fs_free_blocks_count(rfs->old_fs->super),
+ (unsigned long long) ext2fs_free_blocks_count(rfs->new_fs->super),
+ (unsigned long long) rfs->needed_blocks);
+#endif
+
+ init_resource_track(&rtrack, "block_mover", fs->io);
+ retval = block_mover(rfs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "inode_scan_and_fix", fs->io);
+ retval = inode_scan_and_fix(rfs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "inode_ref_fix", fs->io);
+ retval = inode_ref_fix(rfs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "move_itables", fs->io);
+ retval = move_itables(rfs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ retval = clear_sparse_super2_last_group(rfs);
+ if (retval)
+ goto errout;
+
+ init_resource_track(&rtrack, "calculate_summary_stats", fs->io);
+ retval = resize2fs_calculate_summary_stats(rfs->new_fs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "fix_resize_inode", fs->io);
+ retval = fix_resize_inode(rfs->new_fs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ init_resource_track(&rtrack, "fix_sb_journal_backup", fs->io);
+ retval = fix_sb_journal_backup(rfs->new_fs);
+ if (retval)
+ goto errout;
+ print_resource_track(rfs, &rtrack, fs->io);
+
+ retval = ext2fs_set_gdt_csum(rfs->new_fs);
+ if (retval)
+ goto errout;
+
+ rfs->new_fs->super->s_state &= ~EXT2_ERROR_FS;
+ rfs->new_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+
+ print_resource_track(rfs, &overall_track, fs->io);
+ retval = ext2fs_close_free(&rfs->new_fs);
+ if (retval)
+ goto errout;
+
+ rfs->flags = flags;
+
+ ext2fs_free(rfs->old_fs);
+ rfs->old_fs = NULL;
+ if (rfs->itable_buf)
+ ext2fs_free_mem(&rfs->itable_buf);
+ if (rfs->reserve_blocks)
+ ext2fs_free_block_bitmap(rfs->reserve_blocks);
+ if (rfs->move_blocks)
+ ext2fs_free_block_bitmap(rfs->move_blocks);
+ ext2fs_free_mem(&rfs);
+
+ return 0;
+
+errout:
+ if (rfs->new_fs) {
+ ext2fs_free(rfs->new_fs);
+ rfs->new_fs = NULL;
+ }
+ if (rfs->itable_buf)
+ ext2fs_free_mem(&rfs->itable_buf);
+ ext2fs_free_mem(&rfs);
+ return retval;
+}
+
+/* Keep the size of the group descriptor region constant */
+static void adjust_reserved_gdt_blocks(ext2_filsys old_fs, ext2_filsys fs)
+{
+ if (ext2fs_has_feature_resize_inode(fs->super) &&
+ (old_fs->desc_blocks != fs->desc_blocks)) {
+ int new;
+
+ new = ((int) fs->super->s_reserved_gdt_blocks) +
+ (old_fs->desc_blocks - fs->desc_blocks);
+ if (new < 0)
+ new = 0;
+ if (new > (int) fs->blocksize/4)
+ new = fs->blocksize/4;
+ fs->super->s_reserved_gdt_blocks = new;
+ }
+}
+
+/* Toggle 64bit mode */
+static errcode_t resize_group_descriptors(ext2_resize_t rfs, blk64_t new_size)
+{
+ void *o, *n, *new_group_desc;
+ dgrp_t i;
+ int copy_size;
+ errcode_t retval;
+
+ if (!(rfs->flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)))
+ return 0;
+
+ if (new_size != ext2fs_blocks_count(rfs->new_fs->super) ||
+ ext2fs_blocks_count(rfs->new_fs->super) >= (1ULL << 32) ||
+ (rfs->flags & RESIZE_DISABLE_64BIT &&
+ rfs->flags & RESIZE_ENABLE_64BIT))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (rfs->flags & RESIZE_DISABLE_64BIT) {
+ ext2fs_clear_feature_64bit(rfs->new_fs->super);
+ rfs->new_fs->super->s_desc_size = EXT2_MIN_DESC_SIZE;
+ } else if (rfs->flags & RESIZE_ENABLE_64BIT) {
+ ext2fs_set_feature_64bit(rfs->new_fs->super);
+ rfs->new_fs->super->s_desc_size = EXT2_MIN_DESC_SIZE_64BIT;
+ }
+
+ if (EXT2_DESC_SIZE(rfs->old_fs->super) ==
+ EXT2_DESC_SIZE(rfs->new_fs->super))
+ return 0;
+
+ o = rfs->new_fs->group_desc;
+ rfs->new_fs->desc_blocks = ext2fs_div_ceil(
+ rfs->old_fs->group_desc_count,
+ EXT2_DESC_PER_BLOCK(rfs->new_fs->super));
+ retval = ext2fs_get_arrayzero(rfs->new_fs->desc_blocks,
+ rfs->old_fs->blocksize, &new_group_desc);
+ if (retval)
+ return retval;
+
+ n = new_group_desc;
+
+ if (EXT2_DESC_SIZE(rfs->old_fs->super) <=
+ EXT2_DESC_SIZE(rfs->new_fs->super))
+ copy_size = EXT2_DESC_SIZE(rfs->old_fs->super);
+ else
+ copy_size = EXT2_DESC_SIZE(rfs->new_fs->super);
+ for (i = 0; i < rfs->old_fs->group_desc_count; i++) {
+ memcpy(n, o, copy_size);
+ n = (char *)n + EXT2_DESC_SIZE(rfs->new_fs->super);
+ o = (char *)o + EXT2_DESC_SIZE(rfs->old_fs->super);
+ }
+
+ ext2fs_free_mem(&rfs->new_fs->group_desc);
+ rfs->new_fs->group_desc = new_group_desc;
+
+ for (i = 0; i < rfs->old_fs->group_desc_count; i++)
+ ext2fs_group_desc_csum_set(rfs->new_fs, i);
+
+ adjust_reserved_gdt_blocks(rfs->old_fs, rfs->new_fs);
+
+ return 0;
+}
+
+/* Move bitmaps/inode tables out of the way. */
+static errcode_t move_bg_metadata(ext2_resize_t rfs)
+{
+ dgrp_t i;
+ blk64_t b, c, d, old_desc_blocks, new_desc_blocks, j;
+ ext2fs_block_bitmap old_map, new_map;
+ int old, new;
+ errcode_t retval;
+ int cluster_ratio;
+
+ if (!(rfs->flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)))
+ return 0;
+
+ retval = ext2fs_allocate_block_bitmap(rfs->old_fs, "oldfs", &old_map);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_allocate_block_bitmap(rfs->new_fs, "newfs", &new_map);
+ if (retval)
+ goto out;
+
+ if (ext2fs_has_feature_meta_bg(rfs->old_fs->super)) {
+ old_desc_blocks = rfs->old_fs->super->s_first_meta_bg;
+ new_desc_blocks = rfs->new_fs->super->s_first_meta_bg;
+ } else {
+ old_desc_blocks = rfs->old_fs->desc_blocks +
+ rfs->old_fs->super->s_reserved_gdt_blocks;
+ new_desc_blocks = rfs->new_fs->desc_blocks +
+ rfs->new_fs->super->s_reserved_gdt_blocks;
+ }
+
+ /* Construct bitmaps of super/descriptor blocks in old and new fs */
+ for (i = 0; i < rfs->old_fs->group_desc_count; i++) {
+ retval = ext2fs_super_and_bgd_loc2(rfs->old_fs, i, &b, &c, &d,
+ NULL);
+ if (retval)
+ goto out;
+ if (b)
+ ext2fs_mark_block_bitmap2(old_map, b);
+ for (j = 0; c != 0 && j < old_desc_blocks; j++)
+ ext2fs_mark_block_bitmap2(old_map, c + j);
+ if (d)
+ ext2fs_mark_block_bitmap2(old_map, d);
+
+ retval = ext2fs_super_and_bgd_loc2(rfs->new_fs, i, &b, &c, &d,
+ NULL);
+ if (retval)
+ goto out;
+ if (b)
+ ext2fs_mark_block_bitmap2(new_map, b);
+ for (j = 0; c != 0 && j < new_desc_blocks; j++)
+ ext2fs_mark_block_bitmap2(new_map, c + j);
+ if (d)
+ ext2fs_mark_block_bitmap2(new_map, d);
+ }
+
+ cluster_ratio = EXT2FS_CLUSTER_RATIO(rfs->new_fs);
+
+ /* Find changes in block allocations for bg metadata */
+ for (b = EXT2FS_B2C(rfs->old_fs,
+ rfs->old_fs->super->s_first_data_block);
+ b < ext2fs_blocks_count(rfs->new_fs->super);
+ b += cluster_ratio) {
+ old = ext2fs_test_block_bitmap2(old_map, b);
+ new = ext2fs_test_block_bitmap2(new_map, b);
+
+ if (old && !new) {
+ /* mark old_map, unmark new_map */
+ if (cluster_ratio == 1)
+ ext2fs_unmark_block_bitmap2(
+ rfs->new_fs->block_map, b);
+ } else if (!old && new)
+ ; /* unmark old_map, mark new_map */
+ else {
+ ext2fs_unmark_block_bitmap2(old_map, b);
+ ext2fs_unmark_block_bitmap2(new_map, b);
+ }
+ }
+
+ /*
+ * new_map now shows blocks that have been newly allocated.
+ * old_map now shows blocks that have been newly freed.
+ */
+
+ /*
+ * Move any conflicting bitmaps and inode tables. Ensure that we
+ * don't try to free clusters associated with bitmaps or tables.
+ */
+ for (i = 0; i < rfs->old_fs->group_desc_count; i++) {
+ b = ext2fs_block_bitmap_loc(rfs->new_fs, i);
+ if (ext2fs_test_block_bitmap2(new_map, b))
+ ext2fs_block_bitmap_loc_set(rfs->new_fs, i, 0);
+ else if (ext2fs_test_block_bitmap2(old_map, b))
+ ext2fs_unmark_block_bitmap2(old_map, b);
+
+ b = ext2fs_inode_bitmap_loc(rfs->new_fs, i);
+ if (ext2fs_test_block_bitmap2(new_map, b))
+ ext2fs_inode_bitmap_loc_set(rfs->new_fs, i, 0);
+ else if (ext2fs_test_block_bitmap2(old_map, b))
+ ext2fs_unmark_block_bitmap2(old_map, b);
+
+ c = ext2fs_inode_table_loc(rfs->new_fs, i);
+ for (b = 0;
+ b < rfs->new_fs->inode_blocks_per_group;
+ b++) {
+ if (ext2fs_test_block_bitmap2(new_map, b + c))
+ ext2fs_inode_table_loc_set(rfs->new_fs, i, 0);
+ else if (ext2fs_test_block_bitmap2(old_map, b + c))
+ ext2fs_unmark_block_bitmap2(old_map, b + c);
+ }
+ }
+
+ /* Free unused clusters */
+ for (b = 0;
+ cluster_ratio > 1 && b < ext2fs_blocks_count(rfs->new_fs->super);
+ b += cluster_ratio)
+ if (ext2fs_test_block_bitmap2(old_map, b))
+ ext2fs_unmark_block_bitmap2(rfs->new_fs->block_map, b);
+out:
+ if (old_map)
+ ext2fs_free_block_bitmap(old_map);
+ if (new_map)
+ ext2fs_free_block_bitmap(new_map);
+ return retval;
+}
+
+/* Zero out the high bits of extent fields */
+static errcode_t zero_high_bits_in_extents(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode)
+{
+ ext2_extent_handle_t handle;
+ struct ext2fs_extent extent;
+ int op = EXT2_EXTENT_ROOT;
+ errcode_t errcode;
+
+ if (!(inode->i_flags & EXT4_EXTENTS_FL))
+ return 0;
+
+ errcode = ext2fs_extent_open(fs, ino, &handle);
+ if (errcode)
+ return errcode;
+
+ while (1) {
+ errcode = ext2fs_extent_get(handle, op, &extent);
+ if (errcode)
+ break;
+
+ op = EXT2_EXTENT_NEXT_SIB;
+
+ if (extent.e_pblk > (1ULL << 32)) {
+ extent.e_pblk &= (1ULL << 32) - 1;
+ errcode = ext2fs_extent_replace(handle, 0, &extent);
+ if (errcode)
+ break;
+ }
+ }
+
+ /* Ok if we run off the end */
+ if (errcode == EXT2_ET_EXTENT_NO_NEXT)
+ errcode = 0;
+ ext2fs_extent_free(handle);
+ return errcode;
+}
+
+/* Zero out the high bits of inodes. */
+static errcode_t zero_high_bits_in_inodes(ext2_resize_t rfs)
+{
+ ext2_filsys fs = rfs->old_fs;
+ int length = EXT2_INODE_SIZE(fs->super);
+ struct ext2_inode *inode = NULL;
+ ext2_inode_scan scan = NULL;
+ errcode_t retval;
+ ext2_ino_t ino;
+
+ if (!(rfs->flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)))
+ return 0;
+
+ if (fs->super->s_creator_os == EXT2_OS_HURD)
+ return 0;
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_get_mem(length, &inode);
+ if (retval)
+ goto out;
+
+ do {
+ retval = ext2fs_get_next_inode_full(scan, &ino, inode, length);
+ if (retval)
+ goto out;
+ if (!ino)
+ break;
+ if (!ext2fs_test_inode_bitmap2(fs->inode_map, ino))
+ continue;
+
+ /*
+ * Here's how we deal with high block number fields:
+ *
+ * - i_size_high has been been written out with i_size_lo
+ * since the ext2 days, so no conversion is needed.
+ *
+ * - i_blocks_hi is guarded by both the huge_file feature and
+ * inode flags and has always been written out with
+ * i_blocks_lo if the feature is set. The field is only
+ * ever read if both feature and inode flag are set, so
+ * we don't need to zero it now.
+ *
+ * - i_file_acl_high can be uninitialized, so zero it if
+ * it isn't already.
+ */
+ if (inode->osd2.linux2.l_i_file_acl_high) {
+ inode->osd2.linux2.l_i_file_acl_high = 0;
+ retval = ext2fs_write_inode_full(fs, ino, inode,
+ length);
+ if (retval)
+ goto out;
+ }
+
+ retval = zero_high_bits_in_extents(fs, ino, inode);
+ if (retval)
+ goto out;
+ } while (ino);
+
+out:
+ if (inode)
+ ext2fs_free_mem(&inode);
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ return retval;
+}
+
+/*
+ * Clean up the bitmaps for uninitialized bitmaps
+ */
+static void fix_uninit_block_bitmaps(ext2_filsys fs)
+{
+ blk64_t blk, lblk;
+ dgrp_t g;
+ unsigned int i;
+
+ if (!ext2fs_has_group_desc_csum(fs))
+ return;
+
+ for (g=0; g < fs->group_desc_count; g++) {
+ if (!(ext2fs_bg_flags_test(fs, g, EXT2_BG_BLOCK_UNINIT)))
+ continue;
+
+ blk = ext2fs_group_first_block2(fs, g);
+ lblk = ext2fs_group_last_block2(fs, g);
+ ext2fs_unmark_block_bitmap_range2(fs->block_map, blk,
+ lblk - blk + 1);
+
+ ext2fs_reserve_super_and_bgd(fs, g, fs->block_map);
+ ext2fs_mark_block_bitmap2(fs->block_map,
+ ext2fs_block_bitmap_loc(fs, g));
+ ext2fs_mark_block_bitmap2(fs->block_map,
+ ext2fs_inode_bitmap_loc(fs, g));
+ for (i = 0, blk = ext2fs_inode_table_loc(fs, g);
+ i < fs->inode_blocks_per_group;
+ i++, blk++)
+ ext2fs_mark_block_bitmap2(fs->block_map, blk);
+ }
+}
+
+/* --------------------------------------------------------------------
+ *
+ * Resize processing, phase 1.
+ *
+ * In this phase we adjust the in-memory superblock information, and
+ * initialize any new parts of the inode table. The new parts of the
+ * inode table are created in virgin disk space, so we can abort here
+ * without any side effects.
+ * --------------------------------------------------------------------
+ */
+
+/*
+ * If the group descriptor's bitmap and inode table blocks are valid,
+ * release them in the new filesystem data structure, and mark them as
+ * reserved so the old inode table blocks don't get overwritten.
+ */
+static errcode_t free_gdp_blocks(ext2_filsys fs,
+ ext2fs_block_bitmap reserve_blocks,
+ ext2_filsys old_fs,
+ dgrp_t group)
+{
+ blk64_t blk;
+ unsigned int j;
+ dgrp_t i;
+ ext2fs_block_bitmap bg_map = NULL;
+ errcode_t retval = 0;
+ dgrp_t count = old_fs->group_desc_count - fs->group_desc_count;
+
+ /* If bigalloc, don't free metadata living in the same cluster */
+ if (EXT2FS_CLUSTER_RATIO(fs) > 1) {
+ retval = ext2fs_allocate_block_bitmap(fs, "bgdata", &bg_map);
+ if (retval)
+ goto out;
+
+ retval = mark_table_blocks(fs, bg_map);
+ if (retval)
+ goto out;
+ }
+
+ for (i = group; i < group + count; i++) {
+ blk = ext2fs_block_bitmap_loc(old_fs, i);
+ if (blk &&
+ (blk < ext2fs_blocks_count(fs->super)) &&
+ !(bg_map && ext2fs_test_block_bitmap2(bg_map, blk))) {
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ ext2fs_mark_block_bitmap2(reserve_blocks, blk);
+ }
+
+ blk = ext2fs_inode_bitmap_loc(old_fs, i);
+ if (blk &&
+ (blk < ext2fs_blocks_count(fs->super)) &&
+ !(bg_map && ext2fs_test_block_bitmap2(bg_map, blk))) {
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ ext2fs_mark_block_bitmap2(reserve_blocks, blk);
+ }
+
+ blk = ext2fs_inode_table_loc(old_fs, i);
+ for (j = 0;
+ j < fs->inode_blocks_per_group; j++, blk++) {
+ if (blk >= ext2fs_blocks_count(fs->super) ||
+ (bg_map && ext2fs_test_block_bitmap2(bg_map, blk)))
+ continue;
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ ext2fs_mark_block_bitmap2(reserve_blocks, blk);
+ }
+ }
+
+out:
+ if (bg_map)
+ ext2fs_free_block_bitmap(bg_map);
+ return retval;
+}
+
+/*
+ * This routine is shared by the online and offline resize routines.
+ * All of the information which is adjusted in memory is done here.
+ */
+errcode_t adjust_fs_info(ext2_filsys fs, ext2_filsys old_fs,
+ ext2fs_block_bitmap reserve_blocks, blk64_t new_size)
+{
+ errcode_t retval;
+ blk64_t overhead = 0;
+ blk64_t rem;
+ blk64_t blk, group_block;
+ blk64_t real_end;
+ blk64_t old_numblocks, numblocks, adjblocks;
+ unsigned long i, j, old_desc_blocks;
+ unsigned int meta_bg, meta_bg_size;
+ int has_super, csum_flag, has_bg;
+ unsigned long long new_inodes; /* u64 to check for overflow */
+ double percent;
+
+ ext2fs_blocks_count_set(fs->super, new_size);
+ fs->super->s_overhead_clusters = 0;
+
+retry:
+ fs->group_desc_count = ext2fs_div64_ceil(ext2fs_blocks_count(fs->super) -
+ fs->super->s_first_data_block,
+ EXT2_BLOCKS_PER_GROUP(fs->super));
+ if (fs->group_desc_count == 0)
+ return EXT2_ET_TOOSMALL;
+ fs->desc_blocks = ext2fs_div_ceil(fs->group_desc_count,
+ EXT2_DESC_PER_BLOCK(fs->super));
+
+ /*
+ * Overhead is the number of bookkeeping blocks per group. It
+ * includes the superblock backup, the group descriptor
+ * backups, the inode bitmap, the block bitmap, and the inode
+ * table.
+ */
+ overhead = (int) (2 + fs->inode_blocks_per_group);
+
+ has_bg = 0;
+ if (ext2fs_has_feature_sparse_super2(fs->super)) {
+ /*
+ * We have to do this manually since
+ * super->s_backup_bgs hasn't been set up yet.
+ */
+ if (fs->group_desc_count == 2)
+ has_bg = fs->super->s_backup_bgs[0] != 0;
+ else
+ has_bg = fs->super->s_backup_bgs[1] != 0;
+ } else
+ has_bg = ext2fs_bg_has_super(fs, fs->group_desc_count - 1);
+ if (has_bg)
+ overhead += 1 + fs->desc_blocks +
+ fs->super->s_reserved_gdt_blocks;
+
+ /*
+ * See if the last group is big enough to support the
+ * necessary data structures. If not, we need to get rid of
+ * it.
+ */
+ rem = (ext2fs_blocks_count(fs->super) - fs->super->s_first_data_block) %
+ fs->super->s_blocks_per_group;
+ if ((fs->group_desc_count == 1) && rem && (rem < overhead))
+ return EXT2_ET_TOOSMALL;
+ if ((fs->group_desc_count > 1) && rem && (rem < overhead+50)) {
+ ext2fs_blocks_count_set(fs->super,
+ ext2fs_blocks_count(fs->super) - rem);
+ goto retry;
+ }
+ /*
+ * Adjust the number of inodes
+ */
+ new_inodes =(unsigned long long) fs->super->s_inodes_per_group * fs->group_desc_count;
+ if (new_inodes > ~0U) {
+ new_inodes = (unsigned long long) fs->super->s_inodes_per_group * (fs->group_desc_count - 1);
+ if (new_inodes <= ~0U) {
+ unsigned long long new_blocks =
+ ((unsigned long long) fs->super->s_blocks_per_group *
+ (fs->group_desc_count - 1)) + fs->super->s_first_data_block;
+
+ ext2fs_blocks_count_set(fs->super, new_blocks);
+ goto retry;
+ }
+ fprintf(stderr, _("inodes (%llu) must be less than %u\n"),
+ (unsigned long long) new_inodes, ~0U);
+ return EXT2_ET_TOO_MANY_INODES;
+ }
+ fs->super->s_inodes_count = fs->super->s_inodes_per_group *
+ fs->group_desc_count;
+
+ /*
+ * Adjust the number of free blocks
+ */
+ blk = ext2fs_blocks_count(old_fs->super);
+ if (blk > ext2fs_blocks_count(fs->super))
+ ext2fs_free_blocks_count_set(fs->super,
+ ext2fs_free_blocks_count(fs->super) -
+ (blk - ext2fs_blocks_count(fs->super)));
+ else
+ ext2fs_free_blocks_count_set(fs->super,
+ ext2fs_free_blocks_count(fs->super) +
+ (ext2fs_blocks_count(fs->super) - blk));
+
+ /*
+ * Adjust the number of reserved blocks
+ */
+ percent = (ext2fs_r_blocks_count(old_fs->super) * 100.0) /
+ ext2fs_blocks_count(old_fs->super);
+ ext2fs_r_blocks_count_set(fs->super,
+ (percent * ext2fs_blocks_count(fs->super) /
+ 100.0));
+
+ /*
+ * Adjust the bitmaps for size
+ */
+ retval = ext2fs_resize_inode_bitmap2(fs->super->s_inodes_count,
+ fs->super->s_inodes_count,
+ fs->inode_map);
+ if (retval) goto errout;
+
+ real_end = EXT2_GROUPS_TO_BLOCKS(fs->super, fs->group_desc_count) - 1 +
+ fs->super->s_first_data_block;
+ retval = ext2fs_resize_block_bitmap2(new_size - 1,
+ real_end, fs->block_map);
+ if (retval) goto errout;
+
+ /*
+ * If we are growing the file system, also grow the size of
+ * the reserve_blocks bitmap
+ */
+ if (reserve_blocks && new_size > ext2fs_blocks_count(old_fs->super)) {
+ retval = ext2fs_resize_block_bitmap2(new_size - 1,
+ real_end, reserve_blocks);
+ if (retval) goto errout;
+ }
+
+ /*
+ * Reallocate the group descriptors as necessary.
+ */
+ if (EXT2_DESC_SIZE(old_fs->super) == EXT2_DESC_SIZE(fs->super) &&
+ old_fs->desc_blocks != fs->desc_blocks) {
+ retval = ext2fs_resize_mem(old_fs->desc_blocks *
+ fs->blocksize,
+ fs->desc_blocks * fs->blocksize,
+ &fs->group_desc);
+ if (retval)
+ goto errout;
+ if (fs->desc_blocks > old_fs->desc_blocks)
+ memset((char *) fs->group_desc +
+ (old_fs->desc_blocks * fs->blocksize), 0,
+ (fs->desc_blocks - old_fs->desc_blocks) *
+ fs->blocksize);
+ }
+
+ /*
+ * If the resize_inode feature is set, and we are changing the
+ * number of descriptor blocks, then adjust
+ * s_reserved_gdt_blocks if possible to avoid needing to move
+ * the inode table either now or in the future.
+ *
+ * Note: If we're converting to 64bit mode, we did this earlier.
+ */
+ if (EXT2_DESC_SIZE(old_fs->super) == EXT2_DESC_SIZE(fs->super))
+ adjust_reserved_gdt_blocks(old_fs, fs);
+
+ if (ext2fs_has_feature_meta_bg(fs->super) &&
+ (fs->super->s_first_meta_bg > fs->desc_blocks)) {
+ ext2fs_clear_feature_meta_bg(fs->super);
+ fs->super->s_first_meta_bg = 0;
+ }
+
+ /*
+ * Update the location of the backup superblocks if the
+ * sparse_super2 feature is enabled.
+ */
+ if (ext2fs_has_feature_sparse_super2(fs->super)) {
+ dgrp_t last_bg = fs->group_desc_count - 1;
+ dgrp_t old_last_bg = old_fs->group_desc_count - 1;
+
+ if (last_bg > old_last_bg) {
+ if (old_fs->group_desc_count == 1)
+ fs->super->s_backup_bgs[0] = 1;
+ if ((old_fs->group_desc_count < 3 &&
+ fs->group_desc_count > 2) ||
+ fs->super->s_backup_bgs[1])
+ fs->super->s_backup_bgs[1] = last_bg;
+ } else if (last_bg < old_last_bg) {
+ if (fs->super->s_backup_bgs[0] > last_bg)
+ fs->super->s_backup_bgs[0] = 0;
+ if (fs->super->s_backup_bgs[1] > last_bg)
+ fs->super->s_backup_bgs[1] = 0;
+ if (last_bg > 1 &&
+ old_fs->super->s_backup_bgs[1] == old_last_bg)
+ fs->super->s_backup_bgs[1] = last_bg;
+ }
+ }
+
+ /*
+ * If we are shrinking the number of block groups, we're done
+ * and can exit now.
+ */
+ if (old_fs->group_desc_count > fs->group_desc_count) {
+ /*
+ * Check the block groups that we are chopping off
+ * and free any blocks associated with their metadata
+ */
+ retval = free_gdp_blocks(fs, reserve_blocks, old_fs,
+ fs->group_desc_count);
+ goto errout;
+ }
+
+ /*
+ * Fix the count of the last (old) block group
+ */
+ old_numblocks = (ext2fs_blocks_count(old_fs->super) -
+ old_fs->super->s_first_data_block) %
+ old_fs->super->s_blocks_per_group;
+ if (!old_numblocks)
+ old_numblocks = old_fs->super->s_blocks_per_group;
+ if (old_fs->group_desc_count == fs->group_desc_count) {
+ numblocks = (ext2fs_blocks_count(fs->super) -
+ fs->super->s_first_data_block) %
+ fs->super->s_blocks_per_group;
+ if (!numblocks)
+ numblocks = fs->super->s_blocks_per_group;
+ } else
+ numblocks = fs->super->s_blocks_per_group;
+ i = old_fs->group_desc_count - 1;
+ ext2fs_bg_free_blocks_count_set(fs, i, ext2fs_bg_free_blocks_count(fs, i) + (numblocks - old_numblocks));
+ ext2fs_group_desc_csum_set(fs, i);
+
+ /*
+ * If the number of block groups is staying the same, we're
+ * done and can exit now. (If the number block groups is
+ * shrinking, we had exited earlier.)
+ */
+ if (old_fs->group_desc_count >= fs->group_desc_count) {
+ retval = 0;
+ goto errout;
+ }
+
+ /*
+ * Initialize the new block group descriptors
+ */
+ group_block = ext2fs_group_first_block2(fs,
+ old_fs->group_desc_count);
+ csum_flag = ext2fs_has_group_desc_csum(fs);
+ if (getenv("RESIZE2FS_FORCE_LAZY_ITABLE_INIT") ||
+ (!getenv("RESIZE2FS_FORCE_ITABLE_INIT") &&
+ access("/sys/fs/ext4/features/lazy_itable_init", F_OK) == 0))
+ lazy_itable_init = 1;
+ if (ext2fs_has_feature_meta_bg(fs->super))
+ old_desc_blocks = fs->super->s_first_meta_bg;
+ else
+ old_desc_blocks = fs->desc_blocks +
+ fs->super->s_reserved_gdt_blocks;
+
+ /*
+ * If we changed the number of block_group descriptor blocks,
+ * we need to make sure they are all marked as reserved in the
+ * filesystem's block allocation map.
+ */
+ for (i = 0; i < old_fs->group_desc_count; i++)
+ ext2fs_reserve_super_and_bgd(fs, i, fs->block_map);
+
+ for (i = old_fs->group_desc_count;
+ i < fs->group_desc_count; i++) {
+ memset(ext2fs_group_desc(fs, fs->group_desc, i), 0,
+ sizeof(struct ext2_group_desc));
+ adjblocks = 0;
+
+ ext2fs_bg_flags_zap(fs, i);
+ if (csum_flag) {
+ ext2fs_bg_flags_set(fs, i, EXT2_BG_INODE_UNINIT);
+ if (!lazy_itable_init)
+ ext2fs_bg_flags_set(fs, i,
+ EXT2_BG_INODE_ZEROED);
+ ext2fs_bg_itable_unused_set(fs, i,
+ fs->super->s_inodes_per_group);
+ }
+
+ numblocks = ext2fs_group_blocks_count(fs, i);
+ if ((i < fs->group_desc_count - 1) && csum_flag)
+ ext2fs_bg_flags_set(fs, i, EXT2_BG_BLOCK_UNINIT);
+
+ has_super = ext2fs_bg_has_super(fs, i);
+ if (has_super) {
+ ext2fs_block_alloc_stats2(fs, group_block, +1);
+ adjblocks++;
+ }
+ meta_bg_size = EXT2_DESC_PER_BLOCK(fs->super);
+ meta_bg = i / meta_bg_size;
+ if (!ext2fs_has_feature_meta_bg(fs->super) ||
+ (meta_bg < fs->super->s_first_meta_bg)) {
+ if (has_super) {
+ for (j=0; j < old_desc_blocks; j++)
+ ext2fs_block_alloc_stats2(fs,
+ group_block + 1 + j, +1);
+ adjblocks += old_desc_blocks;
+ }
+ } else {
+ if (has_super)
+ has_super = 1;
+ if (((i % meta_bg_size) == 0) ||
+ ((i % meta_bg_size) == 1) ||
+ ((i % meta_bg_size) == (meta_bg_size-1)))
+ ext2fs_block_alloc_stats2(fs,
+ group_block + has_super, +1);
+ }
+
+ adjblocks += 2 + fs->inode_blocks_per_group;
+
+ numblocks -= adjblocks;
+ ext2fs_free_blocks_count_set(fs->super,
+ ext2fs_free_blocks_count(fs->super) - adjblocks);
+ fs->super->s_free_inodes_count +=
+ fs->super->s_inodes_per_group;
+ ext2fs_bg_free_blocks_count_set(fs, i, numblocks);
+ ext2fs_bg_free_inodes_count_set(fs, i,
+ fs->super->s_inodes_per_group);
+ ext2fs_bg_used_dirs_count_set(fs, i, 0);
+ ext2fs_group_desc_csum_set(fs, i);
+
+ retval = ext2fs_allocate_group_table(fs, i, 0);
+ if (retval) goto errout;
+
+ group_block += fs->super->s_blocks_per_group;
+ }
+ retval = 0;
+
+ /*
+ * Mark all of the metadata blocks as reserved so they won't
+ * get allocated by the call to ext2fs_allocate_group_table()
+ * in blocks_to_move(), where we allocate new blocks to
+ * replace those allocation bitmap and inode table blocks
+ * which have to get relocated to make space for an increased
+ * number of the block group descriptors.
+ */
+ if (reserve_blocks)
+ mark_table_blocks(fs, reserve_blocks);
+
+errout:
+ return (retval);
+}
+
+/*
+ * Replicate the first part of adjust_fs_info to determine what the
+ * new size of the file system should be. This allows resize2fs to
+ * exit early if we aren't going to make any changes to the file
+ * system.
+ */
+void adjust_new_size(ext2_filsys fs, blk64_t *sizep)
+{
+ blk64_t size, rem, overhead = 0;
+ unsigned long desc_blocks;
+ dgrp_t group_desc_count;
+ int has_bg;
+ unsigned long long new_inodes; /* u64 to check for overflow */
+
+ size = *sizep;
+retry:
+ group_desc_count = ext2fs_div64_ceil(size -
+ fs->super->s_first_data_block,
+ EXT2_BLOCKS_PER_GROUP(fs->super));
+ if (group_desc_count == 0)
+ return;
+ desc_blocks = ext2fs_div_ceil(group_desc_count,
+ EXT2_DESC_PER_BLOCK(fs->super));
+
+ /*
+ * Overhead is the number of bookkeeping blocks per group. It
+ * includes the superblock backup, the group descriptor
+ * backups, the inode bitmap, the block bitmap, and the inode
+ * table.
+ */
+ overhead = (int) (2 + fs->inode_blocks_per_group);
+
+ has_bg = 0;
+ if (ext2fs_has_feature_sparse_super2(fs->super)) {
+ /*
+ * We have to do this manually since
+ * super->s_backup_bgs hasn't been set up yet.
+ */
+ if (group_desc_count == 2)
+ has_bg = fs->super->s_backup_bgs[0] != 0;
+ else
+ has_bg = fs->super->s_backup_bgs[1] != 0;
+ } else
+ has_bg = ext2fs_bg_has_super(fs, group_desc_count - 1);
+ if (has_bg)
+ overhead += 1 + desc_blocks +
+ fs->super->s_reserved_gdt_blocks;
+
+ /*
+ * See if the last group is big enough to support the
+ * necessary data structures. If not, we need to get rid of
+ * it.
+ */
+ rem = (size - fs->super->s_first_data_block) %
+ fs->super->s_blocks_per_group;
+ if ((group_desc_count == 1) && rem && (rem < overhead))
+ return;
+ if ((group_desc_count > 1) && rem && (rem < overhead+50)) {
+ size -= rem;
+ goto retry;
+ }
+
+ /*
+ * If we need to reduce the size by no more than a block
+ * group to avoid overrunning the max inode limit, do it.
+ */
+ new_inodes =(unsigned long long) fs->super->s_inodes_per_group * group_desc_count;
+ if (new_inodes > ~0U) {
+ new_inodes = (unsigned long long) fs->super->s_inodes_per_group * (group_desc_count - 1);
+ if (new_inodes > ~0U)
+ return;
+ size = ((unsigned long long) fs->super->s_blocks_per_group *
+ (group_desc_count - 1)) + fs->super->s_first_data_block;
+
+ goto retry;
+ }
+ *sizep = size;
+}
+
+/*
+ * This routine adjusts the superblock and other data structures, both
+ * in disk as well as in memory...
+ */
+static errcode_t adjust_superblock(ext2_resize_t rfs, blk64_t new_size)
+{
+ ext2_filsys fs = rfs->new_fs;
+ int adj = 0;
+ errcode_t retval;
+ unsigned long i;
+ unsigned long max_group;
+
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ ext2fs_mark_ib_dirty(fs);
+
+ retval = ext2fs_allocate_block_bitmap(fs, _("reserved blocks"),
+ &rfs->reserve_blocks);
+ if (retval)
+ return retval;
+
+ retval = adjust_fs_info(fs, rfs->old_fs, rfs->reserve_blocks, new_size);
+ if (retval)
+ goto errout;
+
+ /*
+ * Check to make sure there are enough inodes
+ */
+ if ((rfs->old_fs->super->s_inodes_count -
+ rfs->old_fs->super->s_free_inodes_count) >
+ rfs->new_fs->super->s_inodes_count) {
+ retval = ENOSPC;
+ goto errout;
+ }
+
+ /*
+ * If we are shrinking the number block groups, we're done and
+ * can exit now.
+ */
+ if (rfs->old_fs->group_desc_count > fs->group_desc_count) {
+ retval = 0;
+ goto errout;
+ }
+
+ /*
+ * If the number of block groups is staying the same, we're
+ * done and can exit now. (If the number block groups is
+ * shrinking, we had exited earlier.)
+ */
+ if (rfs->old_fs->group_desc_count >= fs->group_desc_count) {
+ retval = 0;
+ goto errout;
+ }
+
+ /*
+ * If we are using uninit_bg (aka GDT_CSUM) and the kernel
+ * supports lazy inode initialization, we can skip
+ * initializing the inode table.
+ */
+ if (lazy_itable_init && ext2fs_has_group_desc_csum(fs)) {
+ retval = 0;
+ goto errout;
+ }
+
+ /*
+ * Initialize the inode table
+ */
+ retval = ext2fs_get_array(fs->blocksize, fs->inode_blocks_per_group,
+ &rfs->itable_buf);
+ if (retval)
+ goto errout;
+
+ memset(rfs->itable_buf, 0, fs->blocksize * fs->inode_blocks_per_group);
+ adj = rfs->old_fs->group_desc_count;
+ max_group = fs->group_desc_count - adj;
+ if (rfs->progress) {
+ retval = rfs->progress(rfs, E2_RSZ_EXTEND_ITABLE_PASS,
+ 0, max_group);
+ if (retval)
+ goto errout;
+ }
+ for (i = rfs->old_fs->group_desc_count;
+ i < fs->group_desc_count; i++) {
+ /*
+ * Write out the new inode table
+ */
+ retval = ext2fs_zero_blocks2(fs, ext2fs_inode_table_loc(fs, i),
+ fs->inode_blocks_per_group, NULL,
+ NULL);
+ if (retval)
+ goto errout;
+
+ io_channel_flush(fs->io);
+ if (rfs->progress) {
+ retval = rfs->progress(rfs, E2_RSZ_EXTEND_ITABLE_PASS,
+ i - adj + 1, max_group);
+ if (retval)
+ goto errout;
+ }
+ }
+ io_channel_flush(fs->io);
+ retval = 0;
+
+errout:
+ return retval;
+}
+
+/* --------------------------------------------------------------------
+ *
+ * Resize processing, phase 2.
+ *
+ * In this phase we adjust determine which blocks need to be moved, in
+ * blocks_to_move(). We then copy the blocks to their ultimate new
+ * destinations using block_mover(). Since we are copying blocks to
+ * their new locations, again during this pass we can abort without
+ * any problems.
+ * --------------------------------------------------------------------
+ */
+
+/*
+ * This helper function creates a block bitmap with all of the
+ * filesystem meta-data blocks.
+ */
+static errcode_t mark_table_blocks(ext2_filsys fs,
+ ext2fs_block_bitmap bmap)
+{
+ dgrp_t i;
+ blk64_t blk;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ ext2fs_reserve_super_and_bgd(fs, i, bmap);
+
+ /*
+ * Mark the blocks used for the inode table
+ */
+ blk = ext2fs_inode_table_loc(fs, i);
+ if (blk)
+ ext2fs_mark_block_bitmap_range2(bmap, blk,
+ fs->inode_blocks_per_group);
+
+ /*
+ * Mark block used for the block bitmap
+ */
+ blk = ext2fs_block_bitmap_loc(fs, i);
+ if (blk)
+ ext2fs_mark_block_bitmap2(bmap, blk);
+
+ /*
+ * Mark block used for the inode bitmap
+ */
+ blk = ext2fs_inode_bitmap_loc(fs, i);
+ if (blk)
+ ext2fs_mark_block_bitmap2(bmap, blk);
+ }
+ /* Reserve the MMP block */
+ if (ext2fs_has_feature_mmp(fs->super) &&
+ fs->super->s_mmp_block > fs->super->s_first_data_block &&
+ fs->super->s_mmp_block < ext2fs_blocks_count(fs->super))
+ ext2fs_mark_block_bitmap2(bmap, fs->super->s_mmp_block);
+ return 0;
+}
+
+/*
+ * This function checks to see if a particular block (either a
+ * superblock or a block group descriptor) overlaps with an inode or
+ * block bitmap block, or with the inode table.
+ */
+static void mark_fs_metablock(ext2_resize_t rfs,
+ ext2fs_block_bitmap meta_bmap,
+ int group, blk64_t blk)
+{
+ ext2_filsys fs = rfs->new_fs;
+
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks, blk);
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+
+ /*
+ * Check to see if we overlap with the inode or block bitmap,
+ * or the inode tables. If not, and the block is in use, then
+ * mark it as a block to be moved.
+ */
+ if (is_block_bm(fs, group, blk)) {
+ ext2fs_block_bitmap_loc_set(fs, group, 0);
+ rfs->needed_blocks++;
+ return;
+ }
+ if (is_inode_bm(fs, group, blk)) {
+ ext2fs_inode_bitmap_loc_set(fs, group, 0);
+ rfs->needed_blocks++;
+ return;
+ }
+ if (is_inode_tb(fs, group, blk)) {
+ ext2fs_inode_table_loc_set(fs, group, 0);
+ rfs->needed_blocks++;
+ return;
+ }
+ if (ext2fs_has_feature_flex_bg(fs->super)) {
+ dgrp_t i;
+
+ for (i = 0; i < rfs->old_fs->group_desc_count; i++) {
+ if (is_block_bm(fs, i, blk)) {
+ ext2fs_block_bitmap_loc_set(fs, i, 0);
+ rfs->needed_blocks++;
+ return;
+ }
+ if (is_inode_bm(fs, i, blk)) {
+ ext2fs_inode_bitmap_loc_set(fs, i, 0);
+ rfs->needed_blocks++;
+ return;
+ }
+ if (is_inode_tb(fs, i, blk)) {
+ ext2fs_inode_table_loc_set(fs, i, 0);
+ rfs->needed_blocks++;
+ return;
+ }
+ }
+ }
+
+ if (ext2fs_has_group_desc_csum(fs) &&
+ (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))) {
+ /*
+ * If the block bitmap is uninitialized, which means
+ * nothing other than standard metadata in use.
+ */
+ return;
+ } else if (blk < ext2fs_blocks_count(rfs->old_fs->super) &&
+ ext2fs_test_block_bitmap2(rfs->old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap2(meta_bmap, blk)) {
+ ext2fs_mark_block_bitmap2(rfs->move_blocks, blk);
+ rfs->needed_blocks++;
+ }
+}
+
+
+/*
+ * This routine marks and unmarks reserved blocks in the new block
+ * bitmap. It also determines which blocks need to be moved and
+ * places this information into the move_blocks bitmap.
+ */
+static errcode_t blocks_to_move(ext2_resize_t rfs)
+{
+ unsigned int j;
+ int has_super;
+ dgrp_t i, max_groups, g;
+ blk64_t blk, group_blk;
+ blk64_t old_blocks, new_blocks, group_end, cluster_freed;
+ blk64_t new_size;
+ unsigned int meta_bg, meta_bg_size;
+ errcode_t retval;
+ ext2_filsys fs, old_fs;
+ ext2fs_block_bitmap meta_bmap, new_meta_bmap = NULL;
+ int flex_bg;
+
+ fs = rfs->new_fs;
+ old_fs = rfs->old_fs;
+ if (ext2fs_blocks_count(old_fs->super) > ext2fs_blocks_count(fs->super))
+ fs = rfs->old_fs;
+
+ retval = ext2fs_allocate_block_bitmap(fs, _("blocks to be moved"),
+ &rfs->move_blocks);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_allocate_block_bitmap(fs, _("meta-data blocks"),
+ &meta_bmap);
+ if (retval)
+ return retval;
+
+ retval = mark_table_blocks(old_fs, meta_bmap);
+ if (retval)
+ return retval;
+
+ fs = rfs->new_fs;
+
+ /*
+ * If we're shrinking the filesystem, we need to move any
+ * group's metadata blocks (either allocation bitmaps or the
+ * inode table) which are beyond the end of the new
+ * filesystem.
+ */
+ new_size = ext2fs_blocks_count(fs->super);
+ if (new_size < ext2fs_blocks_count(old_fs->super)) {
+ for (g = 0; g < fs->group_desc_count; g++) {
+ int realloc = 0;
+ /*
+ * ext2fs_allocate_group_table will re-allocate any
+ * metadata blocks whose location is set to zero.
+ */
+ if (ext2fs_block_bitmap_loc(fs, g) >= new_size) {
+ ext2fs_block_bitmap_loc_set(fs, g, 0);
+ realloc = 1;
+ }
+ if (ext2fs_inode_bitmap_loc(fs, g) >= new_size) {
+ ext2fs_inode_bitmap_loc_set(fs, g, 0);
+ realloc = 1;
+ }
+ if ((ext2fs_inode_table_loc(fs, g) +
+ fs->inode_blocks_per_group) > new_size) {
+ ext2fs_inode_table_loc_set(fs, g, 0);
+ realloc = 1;
+ }
+
+ if (realloc) {
+ retval = ext2fs_allocate_group_table(fs, g, 0);
+ if (retval)
+ return retval;
+ }
+ }
+ }
+
+ /*
+ * If we're shrinking the filesystem, we need to move all of
+ * the blocks that don't fit any more
+ */
+ for (blk = ext2fs_blocks_count(fs->super);
+ blk < ext2fs_blocks_count(old_fs->super); blk++) {
+ g = ext2fs_group_of_blk2(fs, blk);
+ if (ext2fs_has_group_desc_csum(fs) &&
+ ext2fs_bg_flags_test(old_fs, g, EXT2_BG_BLOCK_UNINIT)) {
+ /*
+ * The block bitmap is uninitialized, so skip
+ * to the next block group.
+ */
+ blk = ext2fs_group_first_block2(fs, g+1) - 1;
+ continue;
+ }
+ if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap2(meta_bmap, blk)) {
+ ext2fs_mark_block_bitmap2(rfs->move_blocks, blk);
+ rfs->needed_blocks++;
+ }
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks, blk);
+ }
+
+ if (ext2fs_has_feature_meta_bg(old_fs->super))
+ old_blocks = old_fs->super->s_first_meta_bg;
+ else
+ old_blocks = old_fs->desc_blocks +
+ old_fs->super->s_reserved_gdt_blocks;
+ if (ext2fs_has_feature_meta_bg(fs->super))
+ new_blocks = fs->super->s_first_meta_bg;
+ else
+ new_blocks = fs->desc_blocks + fs->super->s_reserved_gdt_blocks;
+
+ retval = reserve_sparse_super2_last_group(rfs, meta_bmap);
+ if (retval)
+ goto errout;
+
+ if (EXT2_DESC_SIZE(rfs->old_fs->super) ==
+ EXT2_DESC_SIZE(rfs->new_fs->super) &&
+ old_blocks == new_blocks) {
+ retval = 0;
+ goto errout;
+ }
+
+ max_groups = fs->group_desc_count;
+ if (max_groups > old_fs->group_desc_count)
+ max_groups = old_fs->group_desc_count;
+ group_blk = old_fs->super->s_first_data_block;
+ /*
+ * If we're reducing the number of descriptor blocks, this
+ * makes life easy. :-) We just have to mark some extra
+ * blocks as free.
+ */
+ if (old_blocks > new_blocks) {
+ if (EXT2FS_CLUSTER_RATIO(fs) > 1) {
+ retval = ext2fs_allocate_block_bitmap(fs,
+ _("new meta blocks"),
+ &new_meta_bmap);
+ if (retval)
+ goto errout;
+
+ retval = mark_table_blocks(fs, new_meta_bmap);
+ if (retval)
+ goto errout;
+ }
+
+ for (i = 0; i < max_groups; i++) {
+ if (!ext2fs_bg_has_super(old_fs, i)) {
+ group_blk += fs->super->s_blocks_per_group;
+ continue;
+ }
+ group_end = group_blk + 1 + old_blocks;
+ for (blk = group_blk + 1 + new_blocks;
+ blk < group_end;) {
+ if (new_meta_bmap == NULL ||
+ !ext2fs_test_block_bitmap2(new_meta_bmap,
+ blk)) {
+ cluster_freed =
+ EXT2FS_CLUSTER_RATIO(fs) -
+ (blk &
+ EXT2FS_CLUSTER_MASK(fs));
+ if (cluster_freed > group_end - blk)
+ cluster_freed = group_end - blk;
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ blk += EXT2FS_CLUSTER_RATIO(fs);
+ rfs->needed_blocks -= cluster_freed;
+ continue;
+ }
+ rfs->needed_blocks--;
+ blk++;
+ }
+ group_blk += fs->super->s_blocks_per_group;
+ }
+ retval = 0;
+ goto errout;
+ }
+ /*
+ * If we're increasing the number of descriptor blocks, life
+ * gets interesting....
+ */
+ meta_bg_size = EXT2_DESC_PER_BLOCK(fs->super);
+ flex_bg = ext2fs_has_feature_flex_bg(fs->super);
+ /* first reserve all of the existing fs meta blocks */
+ for (i = 0; i < max_groups; i++) {
+ has_super = ext2fs_bg_has_super(fs, i);
+ if (has_super)
+ mark_fs_metablock(rfs, meta_bmap, i, group_blk);
+
+ meta_bg = i / meta_bg_size;
+ if (!ext2fs_has_feature_meta_bg(fs->super) ||
+ (meta_bg < fs->super->s_first_meta_bg)) {
+ if (has_super) {
+ for (blk = group_blk+1;
+ blk < group_blk + 1 + new_blocks; blk++)
+ mark_fs_metablock(rfs, meta_bmap,
+ i, blk);
+ }
+ } else {
+ if (has_super)
+ has_super = 1;
+ if (((i % meta_bg_size) == 0) ||
+ ((i % meta_bg_size) == 1) ||
+ ((i % meta_bg_size) == (meta_bg_size-1)))
+ mark_fs_metablock(rfs, meta_bmap, i,
+ group_blk + has_super);
+ }
+
+ /*
+ * Reserve the existing meta blocks that we know
+ * aren't to be moved.
+ *
+ * For flex_bg file systems, in order to avoid
+ * overwriting fs metadata (especially inode table
+ * blocks) belonging to a different block group when
+ * we are relocating the inode tables, we need to
+ * reserve all existing fs metadata blocks.
+ */
+ if (ext2fs_block_bitmap_loc(fs, i))
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks,
+ ext2fs_block_bitmap_loc(fs, i));
+ else if (flex_bg && i < old_fs->group_desc_count)
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks,
+ ext2fs_block_bitmap_loc(old_fs, i));
+
+ if (ext2fs_inode_bitmap_loc(fs, i))
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks,
+ ext2fs_inode_bitmap_loc(fs, i));
+ else if (flex_bg && i < old_fs->group_desc_count)
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks,
+ ext2fs_inode_bitmap_loc(old_fs, i));
+
+ if (ext2fs_inode_table_loc(fs, i))
+ ext2fs_mark_block_bitmap_range2(rfs->reserve_blocks,
+ ext2fs_inode_table_loc(fs, i),
+ fs->inode_blocks_per_group);
+ else if (flex_bg && i < old_fs->group_desc_count)
+ ext2fs_mark_block_bitmap_range2(rfs->reserve_blocks,
+ ext2fs_inode_table_loc(old_fs, i),
+ old_fs->inode_blocks_per_group);
+
+ group_blk += rfs->new_fs->super->s_blocks_per_group;
+ }
+
+ /* Allocate the missing data structures */
+ for (i = 0; i < max_groups; i++) {
+ if (ext2fs_inode_table_loc(fs, i) &&
+ ext2fs_inode_bitmap_loc(fs, i) &&
+ ext2fs_block_bitmap_loc(fs, i))
+ continue;
+
+ retval = ext2fs_allocate_group_table(fs, i,
+ rfs->reserve_blocks);
+ if (retval)
+ goto errout;
+
+ /*
+ * For those structures that have changed, we need to
+ * do bookkeeping.
+ */
+ if (ext2fs_block_bitmap_loc(old_fs, i) !=
+ (blk = ext2fs_block_bitmap_loc(fs, i))) {
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+ if (blk < ext2fs_blocks_count(old_fs->super) &&
+ ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap2(meta_bmap, blk))
+ ext2fs_mark_block_bitmap2(rfs->move_blocks,
+ blk);
+ }
+ if (ext2fs_inode_bitmap_loc(old_fs, i) !=
+ (blk = ext2fs_inode_bitmap_loc(fs, i))) {
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+ if (blk < ext2fs_blocks_count(old_fs->super) &&
+ ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap2(meta_bmap, blk))
+ ext2fs_mark_block_bitmap2(rfs->move_blocks,
+ blk);
+ }
+
+ /*
+ * The inode table, if we need to relocate it, is
+ * handled specially. We have to reserve the blocks
+ * for both the old and the new inode table, since we
+ * can't have the inode table be destroyed during the
+ * block relocation phase.
+ */
+ if (ext2fs_inode_table_loc(fs, i) == ext2fs_inode_table_loc(old_fs, i))
+ continue; /* inode table not moved */
+
+ rfs->needed_blocks += fs->inode_blocks_per_group;
+
+ /*
+ * Mark the new inode table as in use in the new block
+ * allocation bitmap, and move any blocks that might
+ * be necessary.
+ */
+ for (blk = ext2fs_inode_table_loc(fs, i), j=0;
+ j < fs->inode_blocks_per_group ; j++, blk++) {
+ ext2fs_block_alloc_stats2(fs, blk, +1);
+ if (blk < ext2fs_blocks_count(old_fs->super) &&
+ ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap2(meta_bmap, blk))
+ ext2fs_mark_block_bitmap2(rfs->move_blocks,
+ blk);
+ }
+
+ /*
+ * Make sure the old inode table is reserved in the
+ * block reservation bitmap.
+ */
+ for (blk = ext2fs_inode_table_loc(rfs->old_fs, i), j=0;
+ j < fs->inode_blocks_per_group ; j++, blk++)
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks, blk);
+ }
+ retval = 0;
+
+errout:
+ if (new_meta_bmap)
+ ext2fs_free_block_bitmap(new_meta_bmap);
+ if (meta_bmap)
+ ext2fs_free_block_bitmap(meta_bmap);
+
+ return retval;
+}
+
+/*
+ * This helper function tries to allocate a new block. We try to
+ * avoid hitting the original group descriptor blocks at least at
+ * first, since we want to make it possible to recover from a badly
+ * aborted resize operation as much as possible.
+ *
+ * In the future, I may further modify this routine to balance out
+ * where we get the new blocks across the various block groups.
+ * Ideally we would allocate blocks that corresponded with the block
+ * group of the containing inode, and keep contiguous blocks
+ * together. However, this very difficult to do efficiently, since we
+ * don't have the necessary information up front.
+ */
+
+#define AVOID_OLD 1
+#define DESPERATION 2
+
+static void init_block_alloc(ext2_resize_t rfs)
+{
+ rfs->alloc_state = AVOID_OLD;
+ rfs->new_blk = rfs->new_fs->super->s_first_data_block;
+#if 0
+ /* HACK for testing */
+ if (ext2fs_blocks_count(rfs->new_fs->super) >
+ ext2fs_blocks_count(rfs->old_fs->super))
+ rfs->new_blk = ext2fs_blocks_count(rfs->old_fs->super);
+#endif
+}
+
+static blk64_t get_new_block(ext2_resize_t rfs)
+{
+ ext2_filsys fs = rfs->new_fs;
+
+ while (1) {
+ if (rfs->new_blk >= ext2fs_blocks_count(fs->super)) {
+ if (rfs->alloc_state == DESPERATION)
+ return 0;
+
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_BMOVE)
+ printf("Going into desperation mode "
+ "for block allocations\n");
+#endif
+ rfs->alloc_state = DESPERATION;
+ rfs->new_blk = fs->super->s_first_data_block;
+ continue;
+ }
+ if (ext2fs_test_block_bitmap2(fs->block_map, rfs->new_blk) ||
+ ext2fs_test_block_bitmap2(rfs->reserve_blocks,
+ rfs->new_blk) ||
+ ((rfs->alloc_state == AVOID_OLD) &&
+ (rfs->new_blk < ext2fs_blocks_count(rfs->old_fs->super)) &&
+ ext2fs_test_block_bitmap2(rfs->old_fs->block_map,
+ rfs->new_blk))) {
+ rfs->new_blk++;
+ continue;
+ }
+ return rfs->new_blk;
+ }
+}
+
+static errcode_t resize2fs_get_alloc_block(ext2_filsys fs,
+ blk64_t goal EXT2FS_ATTR((unused)),
+ blk64_t *ret)
+{
+ ext2_resize_t rfs = (ext2_resize_t) fs->priv_data;
+ blk64_t blk;
+ int group;
+
+ blk = get_new_block(rfs);
+ if (!blk)
+ return ENOSPC;
+
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & 0xF)
+ printf("get_alloc_block allocating %llu\n",
+ (unsigned long long) blk);
+#endif
+
+ ext2fs_mark_block_bitmap2(rfs->old_fs->block_map, blk);
+ ext2fs_mark_block_bitmap2(rfs->new_fs->block_map, blk);
+
+ group = ext2fs_group_of_blk2(rfs->old_fs, blk);
+ ext2fs_clear_block_uninit(rfs->old_fs, group);
+ group = ext2fs_group_of_blk2(rfs->new_fs, blk);
+ ext2fs_clear_block_uninit(rfs->new_fs, group);
+
+ *ret = (blk64_t) blk;
+ return 0;
+}
+
+static errcode_t block_mover(ext2_resize_t rfs)
+{
+ blk64_t blk, old_blk, new_blk;
+ ext2_filsys fs = rfs->new_fs;
+ ext2_filsys old_fs = rfs->old_fs;
+ errcode_t retval;
+ __u64 c, size;
+ int to_move, moved;
+ ext2_badblocks_list badblock_list = 0;
+ int bb_modified = 0;
+
+ fs->get_alloc_block = resize2fs_get_alloc_block;
+ old_fs->get_alloc_block = resize2fs_get_alloc_block;
+
+ retval = ext2fs_read_bb_inode(old_fs, &badblock_list);
+ if (retval)
+ return retval;
+
+ new_blk = fs->super->s_first_data_block;
+ if (!rfs->itable_buf) {
+ retval = ext2fs_get_array(fs->blocksize,
+ fs->inode_blocks_per_group,
+ &rfs->itable_buf);
+ if (retval)
+ goto errout;
+ }
+ retval = ext2fs_create_extent_table(&rfs->bmap, 0);
+ if (retval)
+ goto errout;
+
+ /*
+ * The first step is to figure out where all of the blocks
+ * will go.
+ */
+ to_move = moved = 0;
+ init_block_alloc(rfs);
+ for (blk = B2C(old_fs->super->s_first_data_block);
+ blk < ext2fs_blocks_count(old_fs->super);
+ blk += EXT2FS_CLUSTER_RATIO(fs)) {
+ if (!ext2fs_test_block_bitmap2(old_fs->block_map, blk))
+ continue;
+ if (!ext2fs_test_block_bitmap2(rfs->move_blocks, blk))
+ continue;
+ if (ext2fs_badblocks_list_test(badblock_list, blk)) {
+ ext2fs_badblocks_list_del(badblock_list, blk);
+ bb_modified++;
+ continue;
+ }
+
+ new_blk = get_new_block(rfs);
+ if (!new_blk) {
+ retval = ENOSPC;
+ goto errout;
+ }
+ ext2fs_block_alloc_stats2(fs, new_blk, +1);
+ ext2fs_add_extent_entry(rfs->bmap, B2C(blk), B2C(new_blk));
+ to_move++;
+ }
+
+ if (to_move == 0) {
+ if (rfs->bmap) {
+ ext2fs_free_extent_table(rfs->bmap);
+ rfs->bmap = 0;
+ }
+ retval = 0;
+ goto errout;
+ }
+
+ /*
+ * Step two is to actually move the blocks
+ */
+ retval = ext2fs_iterate_extent(rfs->bmap, 0, 0, 0);
+ if (retval) goto errout;
+
+ if (rfs->progress) {
+ retval = (rfs->progress)(rfs, E2_RSZ_BLOCK_RELOC_PASS,
+ 0, to_move);
+ if (retval)
+ goto errout;
+ }
+ while (1) {
+ retval = ext2fs_iterate_extent(rfs->bmap, &old_blk, &new_blk, &size);
+ if (retval) goto errout;
+ if (!size)
+ break;
+ old_blk = C2B(old_blk);
+ new_blk = C2B(new_blk);
+ size = C2B(size);
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_BMOVE)
+ printf("Moving %llu blocks %llu->%llu\n",
+ (unsigned long long) size,
+ (unsigned long long) old_blk,
+ (unsigned long long) new_blk);
+#endif
+ do {
+ c = size;
+ if (c > fs->inode_blocks_per_group)
+ c = fs->inode_blocks_per_group;
+ retval = io_channel_read_blk64(fs->io, old_blk, c,
+ rfs->itable_buf);
+ if (retval) goto errout;
+ retval = io_channel_write_blk64(fs->io, new_blk, c,
+ rfs->itable_buf);
+ if (retval) goto errout;
+ size -= c;
+ new_blk += c;
+ old_blk += c;
+ moved += c;
+ if (rfs->progress) {
+ io_channel_flush(fs->io);
+ retval = (rfs->progress)(rfs,
+ E2_RSZ_BLOCK_RELOC_PASS,
+ moved, to_move);
+ if (retval)
+ goto errout;
+ }
+ } while (size > 0);
+ io_channel_flush(fs->io);
+ }
+
+errout:
+ if (badblock_list) {
+ if (!retval && bb_modified)
+ retval = ext2fs_update_bb_inode(old_fs,
+ badblock_list);
+ ext2fs_badblocks_list_free(badblock_list);
+ }
+ return retval;
+}
+
+
+/* --------------------------------------------------------------------
+ *
+ * Resize processing, phase 3
+ *
+ * --------------------------------------------------------------------
+ */
+
+
+/*
+ * The extent translation table is stored in clusters so we need to
+ * take special care when mapping a source block number to its
+ * destination block number.
+ */
+static __u64 extent_translate(ext2_filsys fs, ext2_extent extent, __u64 old_loc)
+{
+ __u64 new_block = C2B(ext2fs_extent_translate(extent, B2C(old_loc)));
+
+ if (new_block != 0)
+ new_block += old_loc & (EXT2FS_CLUSTER_RATIO(fs) - 1);
+ return new_block;
+}
+
+struct process_block_struct {
+ ext2_resize_t rfs;
+ ext2_ino_t ino;
+ ext2_ino_t old_ino;
+ struct ext2_inode * inode;
+ errcode_t error;
+ int is_dir;
+ int changed;
+ int has_extents;
+};
+
+static int process_block(ext2_filsys fs, blk64_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk64_t ref_block EXT2FS_ATTR((unused)),
+ int ref_offset EXT2FS_ATTR((unused)), void *priv_data)
+{
+ struct process_block_struct *pb;
+ errcode_t retval;
+ blk64_t block, new_block;
+ int ret = 0;
+
+ pb = (struct process_block_struct *) priv_data;
+ block = *block_nr;
+ if (pb->rfs->bmap) {
+ new_block = extent_translate(fs, pb->rfs->bmap, block);
+ if (new_block) {
+ *block_nr = new_block;
+ ret |= BLOCK_CHANGED;
+ pb->changed = 1;
+#ifdef RESIZE2FS_DEBUG
+ if (pb->rfs->flags & RESIZE_DEBUG_BMOVE)
+ printf("ino=%u, blockcnt=%lld, %llu->%llu\n",
+ pb->old_ino, (long long) blockcnt,
+ (unsigned long long) block,
+ (unsigned long long) new_block);
+#endif
+ block = new_block;
+ }
+ }
+
+ if (pb->is_dir) {
+ retval = ext2fs_add_dir_block2(fs->dblist, pb->ino,
+ block, (int) blockcnt);
+ if (retval) {
+ pb->error = retval;
+ ret |= BLOCK_ABORT;
+ }
+ }
+ return ret;
+}
+
+/*
+ * Progress callback
+ */
+static errcode_t progress_callback(ext2_filsys fs,
+ ext2_inode_scan scan EXT2FS_ATTR((unused)),
+ dgrp_t group, void * priv_data)
+{
+ ext2_resize_t rfs = (ext2_resize_t) priv_data;
+ errcode_t retval;
+
+ /*
+ * This check is to protect against old ext2 libraries. It
+ * shouldn't be needed against new libraries.
+ */
+ if ((group+1) == 0)
+ return 0;
+
+ if (rfs->progress) {
+ io_channel_flush(fs->io);
+ retval = (rfs->progress)(rfs, E2_RSZ_INODE_SCAN_PASS,
+ group+1, fs->group_desc_count);
+ if (retval)
+ return retval;
+ }
+
+ return 0;
+}
+
+static errcode_t migrate_ea_block(ext2_resize_t rfs, ext2_ino_t ino,
+ struct ext2_inode *inode, int *changed)
+{
+ char *buf = NULL;
+ blk64_t new_block;
+ errcode_t err = 0;
+
+ /* No EA block or no remapping? Quit early. */
+ if (ext2fs_file_acl_block(rfs->old_fs, inode) == 0 || !rfs->bmap)
+ return 0;
+ new_block = extent_translate(rfs->old_fs, rfs->bmap,
+ ext2fs_file_acl_block(rfs->old_fs, inode));
+ if (new_block == 0)
+ return 0;
+
+ /* Set the new ACL block */
+ ext2fs_file_acl_block_set(rfs->old_fs, inode, new_block);
+
+ /* Update checksum */
+ if (ext2fs_has_feature_metadata_csum(rfs->new_fs->super)) {
+ err = ext2fs_get_mem(rfs->old_fs->blocksize, &buf);
+ if (err)
+ return err;
+ rfs->old_fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ err = ext2fs_read_ext_attr3(rfs->old_fs, new_block, buf, ino);
+ rfs->old_fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ if (err)
+ goto out;
+ err = ext2fs_write_ext_attr3(rfs->old_fs, new_block, buf, ino);
+ if (err)
+ goto out;
+ }
+ *changed = 1;
+
+out:
+ ext2fs_free_mem(&buf);
+ return err;
+}
+
+static void quiet_com_err_proc(const char *whoami EXT2FS_ATTR((unused)),
+ errcode_t code EXT2FS_ATTR((unused)),
+ const char *fmt EXT2FS_ATTR((unused)),
+ va_list args EXT2FS_ATTR((unused)))
+{
+}
+
+static int fix_ea_entries(ext2_extent imap, struct ext2_ext_attr_entry *entry,
+ struct ext2_ext_attr_entry *end, ext2_ino_t last_ino)
+{
+ int modified = 0;
+ ext2_ino_t new_ino;
+
+ while (entry < end && !EXT2_EXT_IS_LAST_ENTRY(entry)) {
+ if (entry->e_value_inum > last_ino) {
+ new_ino = ext2fs_extent_translate(imap,
+ entry->e_value_inum);
+ entry->e_value_inum = new_ino;
+ modified = 1;
+ }
+ entry = EXT2_EXT_ATTR_NEXT(entry);
+ }
+ return modified;
+}
+
+static int fix_ea_ibody_entries(ext2_extent imap,
+ struct ext2_inode_large *inode, int inode_size,
+ ext2_ino_t last_ino)
+{
+ struct ext2_ext_attr_entry *start, *end;
+ __u32 *ea_magic;
+
+ if (inode->i_extra_isize == 0)
+ return 0;
+
+ ea_magic = (__u32 *)((char *)inode + EXT2_GOOD_OLD_INODE_SIZE +
+ inode->i_extra_isize);
+ if (*ea_magic != EXT2_EXT_ATTR_MAGIC)
+ return 0;
+
+ start = (struct ext2_ext_attr_entry *)(ea_magic + 1);
+ end = (struct ext2_ext_attr_entry *)((char *)inode + inode_size);
+
+ return fix_ea_entries(imap, start, end, last_ino);
+}
+
+static int fix_ea_block_entries(ext2_extent imap, char *block_buf,
+ unsigned int blocksize, ext2_ino_t last_ino)
+{
+ struct ext2_ext_attr_header *header;
+ struct ext2_ext_attr_entry *start, *end;
+
+ header = (struct ext2_ext_attr_header *)block_buf;
+ start = (struct ext2_ext_attr_entry *)(header+1);
+ end = (struct ext2_ext_attr_entry *)(block_buf + blocksize);
+
+ return fix_ea_entries(imap, start, end, last_ino);
+}
+
+/* A simple LRU cache to check recently processed blocks. */
+struct blk_cache {
+ int cursor;
+ blk64_t blks[4];
+};
+
+#define BLK_IN_CACHE(b,c) ((b) == (c).blks[0] || (b) == (c).blks[1] || \
+ (b) == (c).blks[2] || (b) == (c).blks[3])
+#define BLK_ADD_CACHE(b,c) { \
+ (c).blks[(c).cursor] = (b); \
+ (c).cursor = ((c).cursor + 1) % 4; \
+}
+
+static errcode_t fix_ea_inode_refs(ext2_resize_t rfs, struct ext2_inode *inode,
+ char *block_buf, ext2_ino_t last_ino)
+{
+ ext2_filsys fs = rfs->new_fs;
+ ext2_inode_scan scan = NULL;
+ ext2_ino_t ino;
+ int inode_size = EXT2_INODE_SIZE(fs->super);
+ blk64_t blk;
+ int modified;
+ struct blk_cache blk_cache;
+ struct ext2_ext_attr_header *header;
+ errcode_t retval;
+
+ memset(&blk_cache, 0, sizeof(blk_cache));
+
+ header = (struct ext2_ext_attr_header *)block_buf;
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval)
+ goto out;
+
+ while (1) {
+ retval = ext2fs_get_next_inode_full(scan, &ino, inode,
+ inode_size);
+ if (retval)
+ goto out;
+ if (!ino)
+ break;
+
+ if (inode->i_links_count == 0 && ino != EXT2_RESIZE_INO)
+ continue; /* inode not in use */
+
+ if (inode_size != EXT2_GOOD_OLD_INODE_SIZE) {
+ modified = fix_ea_ibody_entries(rfs->imap,
+ (struct ext2_inode_large *)inode,
+ inode_size, last_ino);
+ if (modified) {
+ retval = ext2fs_write_inode_full(fs, ino, inode,
+ inode_size);
+ if (retval)
+ goto out;
+ }
+ }
+
+ blk = ext2fs_file_acl_block(fs, inode);
+ if (blk && !BLK_IN_CACHE(blk, blk_cache)) {
+ retval = ext2fs_read_ext_attr3(fs, blk, block_buf, ino);
+ if (retval)
+ goto out;
+
+ modified = fix_ea_block_entries(rfs->imap, block_buf,
+ fs->blocksize,
+ last_ino);
+ if (modified) {
+ retval = ext2fs_write_ext_attr3(fs, blk,
+ block_buf, ino);
+ if (retval)
+ goto out;
+ /*
+ * If refcount is greater than 1, we might see
+ * the same block referenced by other inodes
+ * later.
+ */
+ if (header->h_refcount > 1)
+ BLK_ADD_CACHE(blk, blk_cache);
+ }
+ }
+ }
+ retval = 0;
+out:
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ return retval;
+
+}
+static errcode_t inode_scan_and_fix(ext2_resize_t rfs)
+{
+ struct process_block_struct pb;
+ ext2_ino_t ino, new_inode;
+ struct ext2_inode *inode = NULL;
+ ext2_inode_scan scan = NULL;
+ errcode_t retval;
+ char *block_buf = 0;
+ ext2_ino_t start_to_move;
+ int inode_size;
+ int update_ea_inode_refs = 0;
+
+ if ((rfs->old_fs->group_desc_count <=
+ rfs->new_fs->group_desc_count) &&
+ !rfs->bmap)
+ return 0;
+
+ set_com_err_hook(quiet_com_err_proc);
+
+ retval = ext2fs_open_inode_scan(rfs->old_fs, 0, &scan);
+ if (retval) goto errout;
+
+ retval = ext2fs_init_dblist(rfs->old_fs, 0);
+ if (retval) goto errout;
+ retval = ext2fs_get_array(rfs->old_fs->blocksize, 3, &block_buf);
+ if (retval) goto errout;
+
+ start_to_move = (rfs->new_fs->group_desc_count *
+ rfs->new_fs->super->s_inodes_per_group);
+
+ if (rfs->progress) {
+ retval = (rfs->progress)(rfs, E2_RSZ_INODE_SCAN_PASS,
+ 0, rfs->old_fs->group_desc_count);
+ if (retval)
+ goto errout;
+ }
+ ext2fs_set_inode_callback(scan, progress_callback, (void *) rfs);
+ pb.rfs = rfs;
+ pb.inode = inode;
+ pb.error = 0;
+ new_inode = EXT2_FIRST_INODE(rfs->new_fs->super);
+ inode_size = EXT2_INODE_SIZE(rfs->new_fs->super);
+ inode = malloc(inode_size);
+ if (!inode) {
+ retval = ENOMEM;
+ goto errout;
+ }
+ /*
+ * First, copy all of the inodes that need to be moved
+ * elsewhere in the inode table
+ */
+ while (1) {
+ retval = ext2fs_get_next_inode_full(scan, &ino, inode, inode_size);
+ if (retval) goto errout;
+ if (!ino)
+ break;
+
+ if (inode->i_links_count == 0 && ino != EXT2_RESIZE_INO)
+ continue; /* inode not in use */
+
+ pb.is_dir = LINUX_S_ISDIR(inode->i_mode);
+ pb.changed = 0;
+
+ /* Remap EA block */
+ retval = migrate_ea_block(rfs, ino, inode, &pb.changed);
+ if (retval)
+ goto errout;
+
+ new_inode = ino;
+ if (ino <= start_to_move)
+ goto remap_blocks; /* Don't need to move inode. */
+
+ /*
+ * Find a new inode. Now that extents and directory blocks
+ * are tied to the inode number through the checksum, we must
+ * set up the new inode before we start rewriting blocks.
+ */
+ retval = ext2fs_new_inode(rfs->new_fs, 0, 0, 0, &new_inode);
+ if (retval)
+ goto errout;
+
+ ext2fs_inode_alloc_stats2(rfs->new_fs, new_inode, +1,
+ pb.is_dir);
+ /*
+ * i_ctime field in xattr inodes contain a portion of the ref
+ * count, do not overwrite.
+ */
+ if (inode->i_flags & EXT4_EA_INODE_FL)
+ update_ea_inode_refs = 1;
+ else
+ inode->i_ctime = rfs->old_fs->now ?
+ rfs->old_fs->now : time(0);
+
+ retval = ext2fs_write_inode_full(rfs->old_fs, new_inode,
+ inode, inode_size);
+ if (retval)
+ goto errout;
+ pb.changed = 0;
+
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_INODEMAP)
+ printf("Inode moved %u->%u\n", ino, new_inode);
+#endif
+ if (!rfs->imap) {
+ retval = ext2fs_create_extent_table(&rfs->imap, 0);
+ if (retval)
+ goto errout;
+ }
+ ext2fs_add_extent_entry(rfs->imap, ino, new_inode);
+
+remap_blocks:
+ if (pb.changed)
+ retval = ext2fs_write_inode_full(rfs->old_fs,
+ new_inode,
+ inode, inode_size);
+ if (retval)
+ goto errout;
+
+ /*
+ * Update inodes to point to new blocks; schedule directory
+ * blocks for inode remapping. Need to write out dir blocks
+ * with new inode numbers if we have metadata_csum enabled.
+ */
+ rfs->old_fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ if (ext2fs_inode_has_valid_blocks2(rfs->old_fs, inode) &&
+ (rfs->bmap || pb.is_dir)) {
+ pb.ino = new_inode;
+ pb.old_ino = ino;
+ pb.has_extents = inode->i_flags & EXT4_EXTENTS_FL;
+ retval = ext2fs_block_iterate3(rfs->old_fs,
+ new_inode, 0, block_buf,
+ process_block, &pb);
+ if (retval)
+ goto errout;
+ if (pb.error) {
+ retval = pb.error;
+ goto errout;
+ }
+ } else if ((inode->i_flags & EXT4_INLINE_DATA_FL) &&
+ (rfs->bmap || pb.is_dir)) {
+ /* inline data dir; update it too */
+ retval = ext2fs_add_dir_block2(rfs->old_fs->dblist,
+ new_inode, 0, 0);
+ if (retval)
+ goto errout;
+ }
+
+ /* Fix up extent block checksums with the new inode number */
+ if (ext2fs_has_feature_metadata_csum(rfs->old_fs->super) &&
+ (inode->i_flags & EXT4_EXTENTS_FL)) {
+ retval = ext2fs_fix_extents_checksums(rfs->old_fs,
+ new_inode, NULL);
+ if (retval)
+ goto errout;
+ }
+ }
+
+ if (update_ea_inode_refs &&
+ ext2fs_has_feature_ea_inode(rfs->new_fs->super)) {
+ retval = fix_ea_inode_refs(rfs, inode, block_buf,
+ start_to_move);
+ if (retval)
+ goto errout;
+ }
+ io_channel_flush(rfs->old_fs->io);
+
+errout:
+ reset_com_err_hook();
+ rfs->old_fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ if (rfs->bmap) {
+ ext2fs_free_extent_table(rfs->bmap);
+ rfs->bmap = 0;
+ }
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ if (block_buf)
+ ext2fs_free_mem(&block_buf);
+ free(inode);
+ return retval;
+}
+
+/* --------------------------------------------------------------------
+ *
+ * Resize processing, phase 4.
+ *
+ * --------------------------------------------------------------------
+ */
+
+struct istruct {
+ ext2_resize_t rfs;
+ errcode_t err;
+ unsigned int max_dirs;
+ unsigned int num;
+};
+
+static int check_and_change_inodes(ext2_ino_t dir,
+ int entry EXT2FS_ATTR((unused)),
+ struct ext2_dir_entry *dirent, int offset,
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
+ void *priv_data)
+{
+ struct istruct *is = (struct istruct *) priv_data;
+ struct ext2_inode inode;
+ ext2_ino_t new_inode;
+ errcode_t retval;
+ int ret = 0;
+
+ if (is->rfs->progress && offset == 0) {
+ io_channel_flush(is->rfs->old_fs->io);
+ is->err = (is->rfs->progress)(is->rfs,
+ E2_RSZ_INODE_REF_UPD_PASS,
+ ++is->num, is->max_dirs);
+ if (is->err)
+ return DIRENT_ABORT;
+ }
+
+ /*
+ * If we have checksums enabled and the inode wasn't present in the
+ * old fs, then we must rewrite all dir blocks with new checksums.
+ */
+ if (ext2fs_has_feature_metadata_csum(is->rfs->old_fs->super) &&
+ !ext2fs_test_inode_bitmap2(is->rfs->old_fs->inode_map, dir))
+ ret |= DIRENT_CHANGED;
+
+ if (!dirent->inode)
+ return ret;
+
+ new_inode = ext2fs_extent_translate(is->rfs->imap, dirent->inode);
+
+ if (!new_inode)
+ return ret;
+#ifdef RESIZE2FS_DEBUG
+ if (is->rfs->flags & RESIZE_DEBUG_INODEMAP)
+ printf("Inode translate (dir=%u, name=%.*s, %u->%u)\n",
+ dir, ext2fs_dirent_name_len(dirent), dirent->name,
+ dirent->inode, new_inode);
+#endif
+
+ dirent->inode = new_inode;
+
+ /* Update the directory mtime and ctime */
+ retval = ext2fs_read_inode(is->rfs->old_fs, dir, &inode);
+ if (retval == 0) {
+ inode.i_mtime = inode.i_ctime = is->rfs->old_fs->now ?
+ is->rfs->old_fs->now : time(0);
+ is->err = ext2fs_write_inode(is->rfs->old_fs, dir, &inode);
+ if (is->err)
+ return ret | DIRENT_ABORT;
+ }
+
+ return ret | DIRENT_CHANGED;
+}
+
+static errcode_t inode_ref_fix(ext2_resize_t rfs)
+{
+ errcode_t retval;
+ struct istruct is;
+
+ if (!rfs->imap)
+ return 0;
+
+ /*
+ * Now, we iterate over all of the directories to update the
+ * inode references
+ */
+ is.num = 0;
+ is.max_dirs = ext2fs_dblist_count2(rfs->old_fs->dblist);
+ is.rfs = rfs;
+ is.err = 0;
+
+ if (rfs->progress) {
+ retval = (rfs->progress)(rfs, E2_RSZ_INODE_REF_UPD_PASS,
+ 0, is.max_dirs);
+ if (retval)
+ goto errout;
+ }
+
+ rfs->old_fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ retval = ext2fs_dblist_dir_iterate(rfs->old_fs->dblist,
+ DIRENT_FLAG_INCLUDE_EMPTY, 0,
+ check_and_change_inodes, &is);
+ rfs->old_fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
+ if (retval)
+ goto errout;
+ if (is.err) {
+ retval = is.err;
+ goto errout;
+ }
+
+ if (rfs->progress && (is.num < is.max_dirs))
+ (rfs->progress)(rfs, E2_RSZ_INODE_REF_UPD_PASS,
+ is.max_dirs, is.max_dirs);
+
+errout:
+ ext2fs_free_extent_table(rfs->imap);
+ rfs->imap = 0;
+ return retval;
+}
+
+
+/* --------------------------------------------------------------------
+ *
+ * Resize processing, phase 5.
+ *
+ * In this phase we actually move the inode table around, and then
+ * update the summary statistics. This is scary, since aborting here
+ * will potentially scramble the filesystem. (We are moving the
+ * inode tables around in place, and so the potential for lost data,
+ * or at the very least scrambling the mapping between filenames and
+ * inode numbers is very high in case of a power failure here.)
+ * --------------------------------------------------------------------
+ */
+
+
+/*
+ * A very scary routine --- this one moves the inode table around!!!
+ *
+ * After this you have to use the rfs->new_fs file handle to read and
+ * write inodes.
+ */
+static errcode_t move_itables(ext2_resize_t rfs)
+{
+ int n, num, size;
+ long long diff;
+ dgrp_t i, max_groups;
+ ext2_filsys fs = rfs->new_fs;
+ char *cp;
+ blk64_t old_blk, new_blk, blk, cluster_freed;
+ errcode_t retval;
+ int to_move, moved;
+ unsigned int j;
+ ext2fs_block_bitmap new_bmap = NULL;
+
+ max_groups = fs->group_desc_count;
+ if (max_groups > rfs->old_fs->group_desc_count)
+ max_groups = rfs->old_fs->group_desc_count;
+
+ size = fs->blocksize * fs->inode_blocks_per_group;
+ if (!rfs->itable_buf) {
+ retval = ext2fs_get_mem(size, &rfs->itable_buf);
+ if (retval)
+ return retval;
+ }
+
+ if (EXT2FS_CLUSTER_RATIO(fs) > 1) {
+ retval = ext2fs_allocate_block_bitmap(fs, _("new meta blocks"),
+ &new_bmap);
+ if (retval)
+ return retval;
+
+ retval = mark_table_blocks(fs, new_bmap);
+ if (retval)
+ goto errout;
+ }
+
+ /*
+ * Figure out how many inode tables we need to move
+ */
+ to_move = moved = 0;
+ for (i=0; i < max_groups; i++)
+ if (ext2fs_inode_table_loc(rfs->old_fs, i) !=
+ ext2fs_inode_table_loc(fs, i))
+ to_move++;
+
+ if (to_move == 0) {
+ retval = 0;
+ goto errout;
+ }
+
+ if (rfs->progress) {
+ retval = rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS,
+ 0, to_move);
+ if (retval)
+ goto errout;
+ }
+
+ rfs->old_fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+
+ for (i=0; i < max_groups; i++) {
+ old_blk = ext2fs_inode_table_loc(rfs->old_fs, i);
+ new_blk = ext2fs_inode_table_loc(fs, i);
+ diff = new_blk - old_blk;
+
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE)
+ printf("Itable move group %d block %llu->%llu (diff %lld)\n",
+ i, (unsigned long long) old_blk,
+ (unsigned long long) new_blk, diff);
+#endif
+
+ if (!diff)
+ continue;
+ if (diff < 0)
+ diff = 0;
+
+ retval = io_channel_read_blk64(fs->io, old_blk,
+ fs->inode_blocks_per_group,
+ rfs->itable_buf);
+ if (retval)
+ goto errout;
+ /*
+ * The end of the inode table segment often contains
+ * all zeros, and we're often only moving the inode
+ * table down a block or two. If so, we can optimize
+ * things by not rewriting blocks that we know to be zero
+ * already.
+ */
+ for (cp = rfs->itable_buf+size-1, n=0; n < size; n++, cp--)
+ if (*cp)
+ break;
+ n = n >> EXT2_BLOCK_SIZE_BITS(fs->super);
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE)
+ printf("%d blocks of zeros...\n", n);
+#endif
+ num = fs->inode_blocks_per_group;
+ if (n > diff)
+ num -= n;
+
+ retval = io_channel_write_blk64(fs->io, new_blk,
+ num, rfs->itable_buf);
+ if (retval) {
+ io_channel_write_blk64(fs->io, old_blk,
+ num, rfs->itable_buf);
+ goto errout;
+ }
+ if (n > diff) {
+ retval = io_channel_write_blk64(fs->io,
+ old_blk + fs->inode_blocks_per_group,
+ diff, (rfs->itable_buf +
+ (fs->inode_blocks_per_group - diff) *
+ fs->blocksize));
+ if (retval)
+ goto errout;
+ }
+
+ for (blk = ext2fs_inode_table_loc(rfs->old_fs, i), j=0;
+ j < fs->inode_blocks_per_group;) {
+ if (new_bmap == NULL ||
+ !ext2fs_test_block_bitmap2(new_bmap, blk)) {
+ ext2fs_block_alloc_stats2(fs, blk, -1);
+ cluster_freed = EXT2FS_CLUSTER_RATIO(fs) -
+ (blk & EXT2FS_CLUSTER_MASK(fs));
+ blk += cluster_freed;
+ j += cluster_freed;
+ continue;
+ }
+ blk++;
+ j++;
+ }
+
+ ext2fs_inode_table_loc_set(rfs->old_fs, i, new_blk);
+ ext2fs_group_desc_csum_set(rfs->old_fs, i);
+ ext2fs_mark_super_dirty(rfs->old_fs);
+ ext2fs_flush(rfs->old_fs);
+
+ if (rfs->progress) {
+ retval = rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS,
+ ++moved, to_move);
+ if (retval)
+ goto errout;
+ }
+ }
+ mark_table_blocks(fs, fs->block_map);
+ ext2fs_flush(fs);
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE)
+ printf("Inode table move finished.\n");
+#endif
+ retval = 0;
+
+errout:
+ if (new_bmap)
+ ext2fs_free_block_bitmap(new_bmap);
+ return retval;
+}
+
+/*
+ * This function is used when expanding a file system. It frees the
+ * superblock and block group descriptor blocks from the block group
+ * which is no longer the last block group.
+ */
+static errcode_t clear_sparse_super2_last_group(ext2_resize_t rfs)
+{
+ ext2_filsys fs = rfs->new_fs;
+ ext2_filsys old_fs = rfs->old_fs;
+ errcode_t retval;
+ dgrp_t old_last_bg = rfs->old_fs->group_desc_count - 1;
+ dgrp_t last_bg = fs->group_desc_count - 1;
+ blk64_t sb, old_desc;
+ blk_t num;
+
+ if (!ext2fs_has_feature_sparse_super2(fs->super))
+ return 0;
+
+ if (last_bg <= old_last_bg)
+ return 0;
+
+ if (fs->super->s_backup_bgs[0] == old_fs->super->s_backup_bgs[0] &&
+ fs->super->s_backup_bgs[1] == old_fs->super->s_backup_bgs[1])
+ return 0;
+
+ if (old_fs->super->s_backup_bgs[0] != old_last_bg &&
+ old_fs->super->s_backup_bgs[1] != old_last_bg)
+ return 0;
+
+ if (fs->super->s_backup_bgs[0] == old_last_bg ||
+ fs->super->s_backup_bgs[1] == old_last_bg)
+ return 0;
+
+ if (old_last_bg == 0)
+ return 0;
+
+ retval = ext2fs_super_and_bgd_loc2(rfs->old_fs, old_last_bg,
+ &sb, &old_desc, NULL, &num);
+ if (retval)
+ return retval;
+
+ if (sb)
+ ext2fs_unmark_block_bitmap2(fs->block_map, sb);
+ if (old_desc)
+ ext2fs_unmark_block_bitmap_range2(fs->block_map, old_desc, num);
+ return 0;
+}
+
+/*
+ * This function is used when shrinking a file system. We need to
+ * utilize blocks from what will be the new last block group for the
+ * backup superblock and block group descriptor blocks.
+ * Unfortunately, those blocks may be used by other files or fs
+ * metadata blocks. We need to mark them as being in use.
+ */
+static errcode_t reserve_sparse_super2_last_group(ext2_resize_t rfs,
+ ext2fs_block_bitmap meta_bmap)
+{
+ ext2_filsys fs = rfs->new_fs;
+ ext2_filsys old_fs = rfs->old_fs;
+ errcode_t retval;
+ dgrp_t old_last_bg = rfs->old_fs->group_desc_count - 1;
+ dgrp_t last_bg = fs->group_desc_count - 1;
+ dgrp_t g;
+ blk64_t blk, sb, old_desc;
+ blk_t i, num;
+ int realloc = 0;
+
+ if (!ext2fs_has_feature_sparse_super2(fs->super))
+ return 0;
+
+ if (last_bg >= old_last_bg)
+ return 0;
+
+ if (fs->super->s_backup_bgs[0] == old_fs->super->s_backup_bgs[0] &&
+ fs->super->s_backup_bgs[1] == old_fs->super->s_backup_bgs[1])
+ return 0;
+
+ if (fs->super->s_backup_bgs[0] != last_bg &&
+ fs->super->s_backup_bgs[1] != last_bg)
+ return 0;
+
+ if (old_fs->super->s_backup_bgs[0] == last_bg ||
+ old_fs->super->s_backup_bgs[1] == last_bg)
+ return 0;
+
+ retval = ext2fs_super_and_bgd_loc2(rfs->new_fs, last_bg,
+ &sb, &old_desc, NULL, &num);
+ if (retval)
+ return retval;
+
+ if (last_bg && !sb) {
+ fputs(_("Should never happen! No sb in last super_sparse bg?\n"),
+ stderr);
+ exit(1);
+ }
+ if (old_desc && old_desc != sb+1) {
+ fputs(_("Should never happen! Unexpected old_desc in "
+ "super_sparse bg?\n"),
+ stderr);
+ exit(1);
+ }
+ num = (old_desc) ? num : 1;
+
+ /* Reserve the backup blocks */
+ ext2fs_mark_block_bitmap_range2(fs->block_map, sb, num);
+
+ for (g = 0; g < fs->group_desc_count; g++) {
+ blk64_t mb;
+
+ mb = ext2fs_block_bitmap_loc(fs, g);
+ if ((mb >= sb) && (mb < sb + num)) {
+ ext2fs_block_bitmap_loc_set(fs, g, 0);
+ realloc = 1;
+ }
+ mb = ext2fs_inode_bitmap_loc(fs, g);
+ if ((mb >= sb) && (mb < sb + num)) {
+ ext2fs_inode_bitmap_loc_set(fs, g, 0);
+ realloc = 1;
+ }
+ mb = ext2fs_inode_table_loc(fs, g);
+ if ((mb < sb + num) &&
+ (sb < mb + fs->inode_blocks_per_group)) {
+ ext2fs_inode_table_loc_set(fs, g, 0);
+ realloc = 1;
+ }
+ if (realloc) {
+ retval = ext2fs_allocate_group_table(fs, g, 0);
+ if (retval)
+ return retval;
+ }
+ }
+
+ for (blk = sb, i = 0; i < num; blk++, i++) {
+ if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap2(meta_bmap, blk)) {
+ ext2fs_mark_block_bitmap2(rfs->move_blocks, blk);
+ rfs->needed_blocks++;
+ }
+ ext2fs_mark_block_bitmap2(rfs->reserve_blocks, blk);
+ }
+ return 0;
+}
+
+/*
+ * Fix the resize inode
+ */
+static errcode_t fix_resize_inode(ext2_filsys fs)
+{
+ struct ext2_inode inode;
+ errcode_t retval;
+
+ if (!ext2fs_has_feature_resize_inode(fs->super))
+ return 0;
+
+ retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
+ if (retval) goto errout;
+
+ ext2fs_iblk_set(fs, &inode, 1);
+
+ retval = ext2fs_write_inode(fs, EXT2_RESIZE_INO, &inode);
+ if (retval) goto errout;
+
+ if (!inode.i_block[EXT2_DIND_BLOCK]) {
+ /*
+ * Avoid zeroing out block #0; that's rude. This
+ * should never happen anyway since the filesystem
+ * should be fsck'ed and we assume it is consistent.
+ */
+ fprintf(stderr, "%s",
+ _("Should never happen: resize inode corrupt!\n"));
+ exit(1);
+ }
+
+ retval = ext2fs_zero_blocks2(fs, inode.i_block[EXT2_DIND_BLOCK], 1,
+ NULL, NULL);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_create_resize_inode(fs);
+ if (retval)
+ goto errout;
+
+errout:
+ return retval;
+}
+
+/*
+ * Finally, recalculate the summary information
+ */
+static errcode_t resize2fs_calculate_summary_stats(ext2_filsys fs)
+{
+ errcode_t retval;
+ blk64_t blk = fs->super->s_first_data_block;
+ ext2_ino_t ino;
+ unsigned int n, group, count;
+ blk64_t total_clusters_free = 0;
+ int total_inodes_free = 0;
+ int group_free = 0;
+ int uninit = 0;
+ char *bitmap_buf;
+
+ /*
+ * First calculate the block statistics
+ */
+ bitmap_buf = malloc(fs->blocksize);
+ if (!bitmap_buf)
+ return ENOMEM;
+ for (group = 0; group < fs->group_desc_count;
+ group++) {
+ retval = ext2fs_get_block_bitmap_range2(fs->block_map,
+ B2C(blk), fs->super->s_clusters_per_group, bitmap_buf);
+ if (retval) {
+ free(bitmap_buf);
+ return retval;
+ }
+ n = ext2fs_bitcount(bitmap_buf,
+ fs->super->s_clusters_per_group / 8);
+ group_free = fs->super->s_clusters_per_group - n;
+ total_clusters_free += group_free;
+ ext2fs_bg_free_blocks_count_set(fs, group, group_free);
+ ext2fs_group_desc_csum_set(fs, group);
+ blk += fs->super->s_blocks_per_group;
+ }
+ free(bitmap_buf);
+ ext2fs_free_blocks_count_set(fs->super, C2B(total_clusters_free));
+
+ /*
+ * Next, calculate the inode statistics
+ */
+ group_free = 0;
+ count = 0;
+ group = 0;
+
+ /* Protect loop from wrap-around if s_inodes_count maxed */
+ uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT);
+ for (ino = 1; ino <= fs->super->s_inodes_count && ino > 0; ino++) {
+ if (uninit ||
+ !ext2fs_fast_test_inode_bitmap2(fs->inode_map, ino)) {
+ group_free++;
+ total_inodes_free++;
+ }
+ count++;
+ if ((count == fs->super->s_inodes_per_group) ||
+ (ino == fs->super->s_inodes_count)) {
+ ext2fs_bg_free_inodes_count_set(fs, group, group_free);
+ ext2fs_group_desc_csum_set(fs, group);
+ group++;
+ if (group >= fs->group_desc_count)
+ break;
+ count = 0;
+ group_free = 0;
+ uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT);
+ }
+ }
+ fs->super->s_free_inodes_count = total_inodes_free;
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
+
+/*
+ * Journal may have been relocated; update the backup journal blocks
+ * in the superblock.
+ */
+static errcode_t fix_sb_journal_backup(ext2_filsys fs)
+{
+ errcode_t retval;
+ struct ext2_inode inode;
+
+ if (!ext2fs_has_feature_journal(fs->super))
+ return 0;
+
+ /* External journal? Nothing to do. */
+ if (fs->super->s_journal_dev && !fs->super->s_journal_inum)
+ return 0;
+
+ retval = ext2fs_read_inode(fs, fs->super->s_journal_inum, &inode);
+ if (retval)
+ return retval;
+ memcpy(fs->super->s_jnl_blocks, inode.i_block, EXT2_N_BLOCKS*4);
+ fs->super->s_jnl_blocks[15] = inode.i_size_high;
+ fs->super->s_jnl_blocks[16] = inode.i_size;
+ fs->super->s_jnl_backup_type = EXT3_JNL_BACKUP_BLOCKS;
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
+
+static int calc_group_overhead(ext2_filsys fs, blk64_t grp,
+ int old_desc_blocks)
+{
+ blk64_t super_blk, old_desc_blk, new_desc_blk;
+ int overhead;
+
+ /* inode table blocks plus allocation bitmaps */
+ overhead = fs->inode_blocks_per_group + 2;
+
+ ext2fs_super_and_bgd_loc2(fs, grp, &super_blk,
+ &old_desc_blk, &new_desc_blk, 0);
+ if ((grp == 0) || super_blk)
+ overhead++;
+ if (old_desc_blk)
+ overhead += old_desc_blocks;
+ else if (new_desc_blk)
+ overhead++;
+ return overhead;
+}
+
+
+/*
+ * calculate the minimum number of blocks the given fs can be resized to
+ */
+blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags)
+{
+ ext2_ino_t inode_count;
+ dgrp_t groups, flex_groups;
+ blk64_t blks_needed, data_blocks;
+ blk64_t grp, data_needed, last_start;
+ blk64_t overhead = 0;
+ int old_desc_blocks;
+ unsigned flexbg_size = 1U << fs->super->s_log_groups_per_flex;
+
+ /*
+ * first figure out how many group descriptors we need to
+ * handle the number of inodes we have
+ */
+ inode_count = fs->super->s_inodes_count -
+ fs->super->s_free_inodes_count;
+ blks_needed = ext2fs_div_ceil(inode_count,
+ fs->super->s_inodes_per_group) *
+ (blk64_t) EXT2_BLOCKS_PER_GROUP(fs->super);
+ groups = ext2fs_div64_ceil(blks_needed,
+ EXT2_BLOCKS_PER_GROUP(fs->super));
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("fs has %d inodes, %d groups required.\n",
+ inode_count, groups);
+#endif
+
+ /*
+ * number of old-style block group descriptor blocks
+ */
+ if (ext2fs_has_feature_meta_bg(fs->super))
+ old_desc_blocks = fs->super->s_first_meta_bg;
+ else
+ old_desc_blocks = fs->desc_blocks +
+ fs->super->s_reserved_gdt_blocks;
+
+ /* calculate how many blocks are needed for data */
+ data_needed = ext2fs_blocks_count(fs->super);
+ for (grp = 0; grp < fs->group_desc_count; grp++) {
+ __u32 n = ext2fs_bg_free_blocks_count(fs, grp);
+
+ if (n > EXT2_BLOCKS_PER_GROUP(fs->super))
+ n = EXT2_BLOCKS_PER_GROUP(fs->super);
+ n += calc_group_overhead(fs, grp, old_desc_blocks);
+ if (data_needed < n) {
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("file system appears inconsistent?!?\n");
+ return ext2fs_blocks_count(fs->super);
+ }
+ data_needed -= n;
+ }
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("fs requires %llu data blocks.\n",
+ (unsigned long long) data_needed);
+#endif
+
+ /*
+ * For ext4 we need to allow for up to a flex_bg worth of
+ * inode tables of slack space so the resize operation can be
+ * guaranteed to finish.
+ */
+ flex_groups = groups;
+ if (ext2fs_has_feature_flex_bg(fs->super)) {
+ dgrp_t remainder = groups & (flexbg_size - 1);
+
+ flex_groups += flexbg_size - remainder;
+ if (flex_groups > fs->group_desc_count)
+ flex_groups = fs->group_desc_count;
+ }
+
+ /*
+ * figure out how many data blocks we have given the number of groups
+ * we need for our inodes
+ */
+ data_blocks = EXT2_GROUPS_TO_BLOCKS(fs->super, groups);
+ last_start = 0;
+ for (grp = 0; grp < flex_groups; grp++) {
+ overhead = calc_group_overhead(fs, grp, old_desc_blocks);
+
+ /*
+ * we want to keep track of how much data we can store in
+ * the groups leading up to the last group so we can determine
+ * how big the last group needs to be
+ */
+ if (grp < (groups - 1))
+ last_start += EXT2_BLOCKS_PER_GROUP(fs->super) -
+ overhead;
+
+ if (data_blocks > overhead)
+ data_blocks -= overhead;
+ else
+ data_blocks = 0;
+ }
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("With %d group(s), we have %llu blocks available.\n",
+ groups, (unsigned long long) data_blocks);
+#endif
+
+ /*
+ * if we need more group descriptors in order to accommodate our data
+ * then we need to add them here
+ */
+ blks_needed = data_needed;
+ while (blks_needed > data_blocks) {
+ blk64_t remainder = blks_needed - data_blocks;
+ dgrp_t extra_grps;
+
+ /* figure out how many more groups we need for the data */
+ extra_grps = ext2fs_div64_ceil(remainder,
+ EXT2_BLOCKS_PER_GROUP(fs->super));
+
+ data_blocks += EXT2_GROUPS_TO_BLOCKS(fs->super, extra_grps);
+
+ /* ok we have to account for the last group */
+ overhead = calc_group_overhead(fs, groups-1, old_desc_blocks);
+ last_start += EXT2_BLOCKS_PER_GROUP(fs->super) - overhead;
+
+ grp = flex_groups;
+ groups += extra_grps;
+ if (!ext2fs_has_feature_flex_bg(fs->super))
+ flex_groups = groups;
+ else if (groups > flex_groups) {
+ dgrp_t r = groups & (flexbg_size - 1);
+
+ flex_groups = groups + flexbg_size - r;
+ if (flex_groups > fs->group_desc_count)
+ flex_groups = fs->group_desc_count;
+ }
+
+ for (; grp < flex_groups; grp++) {
+ overhead = calc_group_overhead(fs, grp,
+ old_desc_blocks);
+
+ /*
+ * again, we need to see how much data we cram into
+ * all of the groups leading up to the last group
+ */
+ if (grp < groups - 1)
+ last_start += EXT2_BLOCKS_PER_GROUP(fs->super)
+ - overhead;
+
+ data_blocks -= overhead;
+ }
+
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("Added %d extra group(s), "
+ "blks_needed %llu, data_blocks %llu, "
+ "last_start %llu\n", extra_grps,
+ (unsigned long long) blks_needed,
+ (unsigned long long) data_blocks,
+ (unsigned long long) last_start);
+#endif
+ }
+
+ /* now for the fun voodoo */
+ grp = groups - 1;
+ if (ext2fs_has_feature_flex_bg(fs->super) &&
+ (grp & ~(flexbg_size - 1)) == 0)
+ grp = grp & ~(flexbg_size - 1);
+ overhead = 0;
+ for (; grp < flex_groups; grp++)
+ overhead += calc_group_overhead(fs, grp, old_desc_blocks);
+
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("Last group's overhead is %llu\n",
+ (unsigned long long) overhead);
+#endif
+
+ /*
+ * if this is the case then the last group is going to have data in it
+ * so we need to adjust the size of the last group accordingly
+ */
+ if (last_start < blks_needed) {
+ blk64_t remainder = blks_needed - last_start;
+
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("Need %llu data blocks in last group\n",
+ (unsigned long long) remainder);
+#endif
+ /*
+ * 50 is a magic number that mkfs/resize uses to see if its
+ * even worth making/resizing the fs. basically you need to
+ * have at least 50 blocks in addition to the blocks needed
+ * for the metadata in the last group
+ */
+ if (remainder > 50)
+ overhead += remainder;
+ else
+ overhead += 50;
+ } else
+ overhead += 50;
+
+ overhead += fs->super->s_first_data_block;
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("Final size of last group is %llu\n",
+ (unsigned long long) overhead);
+#endif
+
+ /* Add extra slack for bigalloc file systems */
+ if (EXT2FS_CLUSTER_RATIO(fs) > 1)
+ overhead += EXT2FS_CLUSTER_RATIO(fs) * 2;
+
+ /*
+ * since our last group doesn't have to be BLOCKS_PER_GROUP
+ * large, we only do groups-1, and then add the number of
+ * blocks needed to handle the group descriptor metadata+data
+ * that we need
+ */
+ blks_needed = EXT2_GROUPS_TO_BLOCKS(fs->super, groups - 1);
+ blks_needed += overhead;
+
+ /*
+ * Make sure blks_needed covers the end of the inode table in
+ * the last block group.
+ */
+ overhead = ext2fs_inode_table_loc(fs, groups-1) +
+ fs->inode_blocks_per_group;
+ if (blks_needed < overhead)
+ blks_needed = overhead;
+
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("Estimated blocks needed: %llu\n",
+ (unsigned long long) blks_needed);
+#endif
+
+ /*
+ * If at this point we've already added up more "needed" than
+ * the current size, just return current size as minimum.
+ */
+ if (blks_needed >= ext2fs_blocks_count(fs->super))
+ return ext2fs_blocks_count(fs->super);
+ /*
+ * We need to reserve a few extra blocks if extents are
+ * enabled, in case we need to grow the extent tree. The more
+ * we shrink the file system, the more space we need.
+ *
+ * The absolute worst case is every single data block is in
+ * the part of the file system that needs to be evacuated,
+ * with each data block needs to be in its own extent, and
+ * with each inode needing at least one extent block.
+ */
+ if (ext2fs_has_feature_extents(fs->super)) {
+ blk64_t safe_margin = (ext2fs_blocks_count(fs->super) -
+ blks_needed)/500;
+ unsigned int exts_per_blk = (fs->blocksize /
+ sizeof(struct ext3_extent)) - 1;
+ blk64_t worst_case = ((data_needed + exts_per_blk - 1) /
+ exts_per_blk);
+
+ if (worst_case < inode_count)
+ worst_case = inode_count;
+
+ if (safe_margin > worst_case)
+ safe_margin = worst_case;
+
+#ifdef RESIZE2FS_DEBUG
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("Extents safety margin: %llu\n",
+ (unsigned long long) safe_margin);
+#endif
+ blks_needed += safe_margin;
+ }
+
+ return blks_needed;
+}
diff --git a/resize/resize2fs.h b/resize/resize2fs.h
new file mode 100644
index 0000000..96a878a
--- /dev/null
+++ b/resize/resize2fs.h
@@ -0,0 +1,190 @@
+/*
+ * resize2fs.h --- ext2 resizer header file
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#if EXT2_FLAT_INCLUDES
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "e2p.h"
+#else
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "e2p/e2p.h"
+#endif
+
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#include <locale.h>
+#define _(a) (gettext (a))
+#ifdef gettext_noop
+#define N_(a) gettext_noop (a)
+#else
+#define N_(a) (a)
+#endif
+#ifndef NLS_CAT_NAME
+#define NLS_CAT_NAME "e2fsprogs"
+#endif
+#ifndef LOCALEDIR
+#define LOCALEDIR "/usr/share/locale"
+#endif
+#else
+#define _(a) (a)
+#define N_(a) a
+#endif
+
+
+/*
+ * For the extent map
+ */
+typedef struct _ext2_extent *ext2_extent;
+
+/*
+ * For the simple progress meter
+ */
+typedef struct ext2_sim_progress *ext2_sim_progmeter;
+
+/*
+ * Flags for the resizer; most are debugging flags only
+ */
+#define RESIZE_DEBUG_IO 0x0001
+#define RESIZE_DEBUG_BMOVE 0x0002
+#define RESIZE_DEBUG_INODEMAP 0x0004
+#define RESIZE_DEBUG_ITABLEMOVE 0x0008
+#define RESIZE_DEBUG_RTRACK 0x0010
+#define RESIZE_DEBUG_MIN_CALC 0x0020
+
+#define RESIZE_PERCENT_COMPLETE 0x0100
+#define RESIZE_VERBOSE 0x0200
+
+#define RESIZE_ENABLE_64BIT 0x0400
+#define RESIZE_DISABLE_64BIT 0x0800
+
+/*
+ * This structure is used for keeping track of how much resources have
+ * been used for a particular resize2fs pass.
+ */
+struct resource_track {
+ const char *desc;
+ struct timeval time_start;
+ struct timeval user_start;
+ struct timeval system_start;
+ void *brk_start;
+ unsigned long long bytes_read;
+ unsigned long long bytes_written;
+};
+
+/*
+ * The core state structure for the ext2 resizer
+ */
+typedef struct ext2_resize_struct *ext2_resize_t;
+
+struct ext2_resize_struct {
+ ext2_filsys old_fs;
+ ext2_filsys new_fs;
+ ext2fs_block_bitmap reserve_blocks;
+ ext2fs_block_bitmap move_blocks;
+ ext2_extent bmap;
+ ext2_extent imap;
+ blk64_t needed_blocks;
+ int flags;
+ char *itable_buf;
+
+ /*
+ * For the block allocator
+ */
+ blk64_t new_blk;
+ int alloc_state;
+
+ /*
+ * For the progress meter
+ */
+ errcode_t (*progress)(ext2_resize_t rfs, int pass,
+ unsigned long cur,
+ unsigned long max);
+ void *prog_data;
+};
+
+/*
+ * Progress pass numbers...
+ */
+#define E2_RSZ_EXTEND_ITABLE_PASS 1
+#define E2_RSZ_BLOCK_RELOC_PASS 2
+#define E2_RSZ_INODE_SCAN_PASS 3
+#define E2_RSZ_INODE_REF_UPD_PASS 4
+#define E2_RSZ_MOVE_ITABLE_PASS 5
+
+
+/* prototypes */
+extern errcode_t resize_fs(ext2_filsys fs, blk64_t *new_size, int flags,
+ errcode_t (*progress)(ext2_resize_t rfs,
+ int pass, unsigned long cur,
+ unsigned long max));
+
+extern errcode_t adjust_fs_info(ext2_filsys fs, ext2_filsys old_fs,
+ ext2fs_block_bitmap reserve_blocks,
+ blk64_t new_size);
+extern blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags);
+extern void adjust_new_size(ext2_filsys fs, blk64_t *sizep);
+
+
+/* extent.c */
+extern errcode_t ext2fs_create_extent_table(ext2_extent *ret_extent,
+ __u64 size);
+extern void ext2fs_free_extent_table(ext2_extent extent);
+extern errcode_t ext2fs_add_extent_entry(ext2_extent extent,
+ __u64 old_loc, __u64 new_loc);
+extern __u64 ext2fs_extent_translate(ext2_extent extent, __u64 old_loc);
+extern void ext2fs_extent_dump(ext2_extent extent, FILE *out);
+extern errcode_t ext2fs_iterate_extent(ext2_extent extent, __u64 *old_loc,
+ __u64 *new_loc, __u64 *size);
+
+/* main.c */
+extern char *program_name;
+
+/* online.c */
+extern errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt,
+ blk64_t *new_size, int flags);
+
+/* resource_track.c */
+extern void init_resource_track(struct resource_track *track, const char *desc,
+ io_channel channel);
+extern void print_resource_track(ext2_resize_t rfs,
+ struct resource_track *track,
+ io_channel channel);
+
+/* sim_progress.c */
+extern errcode_t ext2fs_progress_init(ext2_sim_progmeter *ret_prog,
+ const char *label,
+ int labelwidth, int barwidth,
+ __u32 maxdone, int flags);
+extern void ext2fs_progress_update(ext2_sim_progmeter prog,
+ __u32 current);
+extern void ext2fs_progress_close(ext2_sim_progmeter prog);
+
+
diff --git a/resize/resource_track.c b/resize/resource_track.c
new file mode 100644
index 0000000..f466706
--- /dev/null
+++ b/resize/resource_track.c
@@ -0,0 +1,135 @@
+/*
+ * resource_track.c --- resource tracking
+ *
+ * Copyright (C) 2013 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+
+#include "config.h"
+#include "resize2fs.h"
+#include <time.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#include <sys/resource.h>
+
+void init_resource_track(struct resource_track *track, const char *desc,
+ io_channel channel)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+ io_stats io_start = 0;
+
+ track->desc = desc;
+ track->brk_start = sbrk(0);
+ gettimeofday(&track->time_start, 0);
+#ifdef HAVE_GETRUSAGE
+#ifdef sun
+ memset(&r, 0, sizeof(struct rusage));
+#endif
+ getrusage(RUSAGE_SELF, &r);
+ track->user_start = r.ru_utime;
+ track->system_start = r.ru_stime;
+#else
+ track->user_start.tv_sec = track->user_start.tv_usec = 0;
+ track->system_start.tv_sec = track->system_start.tv_usec = 0;
+#endif
+ track->bytes_read = 0;
+ track->bytes_written = 0;
+ if (channel && channel->manager && channel->manager->get_stats)
+ channel->manager->get_stats(channel, &io_start);
+ if (io_start) {
+ track->bytes_read = io_start->bytes_read;
+ track->bytes_written = io_start->bytes_written;
+ }
+}
+
+static float timeval_subtract(struct timeval *tv1,
+ struct timeval *tv2)
+{
+ return ((tv1->tv_sec - tv2->tv_sec) +
+ ((float) (tv1->tv_usec - tv2->tv_usec)) / 1000000);
+}
+
+void print_resource_track(ext2_resize_t rfs, struct resource_track *track,
+ io_channel channel)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+#ifdef HAVE_MALLINFO2
+ struct mallinfo2 malloc_info;
+#elif defined HAVE_MALLINFO
+ struct mallinfo malloc_info;
+#endif
+ struct timeval time_end;
+
+ if ((rfs->flags & RESIZE_DEBUG_RTRACK) == 0)
+ return;
+
+ gettimeofday(&time_end, 0);
+
+ if (track->desc)
+ printf("%s: ", track->desc);
+
+#define kbytes(x) (((unsigned long)(x) + 1023) / 1024)
+#ifdef HAVE_MALLINFO2
+ malloc_info = mallinfo2();
+ printf("Memory used: %luk/%luk (%luk/%luk), ",
+ kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ kbytes(malloc_info.uordblks), kbytes(malloc_info.fordblks));
+#elif defined HAVE_MALLINFO
+
+ malloc_info = mallinfo();
+ printf("Memory used: %luk/%luk (%luk/%luk), ",
+ kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ kbytes(malloc_info.uordblks), kbytes(malloc_info.fordblks));
+#else
+ printf("Memory used: %lu, ",
+ (unsigned long) (((char *) sbrk(0)) -
+ ((char *) track->brk_start)));
+#endif
+#ifdef HAVE_GETRUSAGE
+ getrusage(RUSAGE_SELF, &r);
+
+ printf("time: %5.2f/%5.2f/%5.2f\n",
+ timeval_subtract(&time_end, &track->time_start),
+ timeval_subtract(&r.ru_utime, &track->user_start),
+ timeval_subtract(&r.ru_stime, &track->system_start));
+#else
+ printf("elapsed time: %6.3f\n",
+ timeval_subtract(&time_end, &track->time_start));
+#endif
+#define mbytes(x) (((x) + 1048575) / 1048576)
+ if (channel && channel->manager && channel->manager->get_stats) {
+ io_stats delta = 0;
+ unsigned long long bytes_read = 0;
+ unsigned long long bytes_written = 0;
+
+ channel->manager->get_stats(channel, &delta);
+ if (delta) {
+ bytes_read = delta->bytes_read - track->bytes_read;
+ bytes_written = delta->bytes_written -
+ track->bytes_written;
+ if (bytes_read == 0 && bytes_written == 0)
+ goto skip_io;
+ if (track->desc)
+ printf("%s: ", track->desc);
+ printf("I/O read: %lluMB, write: %lluMB, "
+ "rate: %.2fMB/s\n",
+ mbytes(bytes_read),
+ mbytes(bytes_written),
+ (double)mbytes(bytes_read + bytes_written) /
+ timeval_subtract(&time_end, &track->time_start));
+ }
+ }
+skip_io:
+ fflush(stdout);
+}
+
diff --git a/resize/sim_progress.c b/resize/sim_progress.c
new file mode 100644
index 0000000..321becd
--- /dev/null
+++ b/resize/sim_progress.c
@@ -0,0 +1,118 @@
+/*
+ * sim_progress.c --- simple progress meter
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "resize2fs.h"
+
+struct ext2_sim_progress {
+ FILE *f;
+ char *label;
+ int labelwidth;
+ int barwidth;
+ __u32 maxdone;
+ __u32 current;
+ int shown;
+ int flags;
+};
+
+static errcode_t ext2fs_progress_display(ext2_sim_progmeter prog)
+{
+ int i, width;
+
+ fputs(prog->label, prog->f);
+ width = prog->labelwidth - strlen(prog->label);
+ while (width-- > 0)
+ putc(' ', prog->f);
+ if (prog->labelwidth + prog->barwidth > 80) {
+ fputs("\n", prog->f);
+ for (width = prog->labelwidth; width > 0; width--)
+ putc(' ', prog->f);
+ }
+ for (i=0; i < prog->barwidth; i++)
+ putc('-', prog->f);
+ for (i=0; i < prog->barwidth; i++)
+ putc('\b', prog->f);
+ fflush(prog->f);
+ return 0;
+}
+
+
+void ext2fs_progress_update(ext2_sim_progmeter prog, __u32 current)
+{
+ int old_level, level, num, i;
+
+ level = prog->barwidth * current / prog->maxdone;
+ old_level = prog->barwidth * prog->current / prog->maxdone;
+ prog->current = current;
+
+ num = level - old_level;
+ if (num == 0)
+ return;
+
+ if (num > 0) {
+ for (i=0; i < num; i++)
+ putc('X', prog->f);
+ } else {
+ num = -num;
+ for (i=0; i < num; i++)
+ putc('\b', prog->f);
+ for (i=0; i < num; i++)
+ putc('-', prog->f);
+ for (i=0; i < num; i++)
+ putc('\b', prog->f);
+ }
+ fflush(prog->f);
+}
+
+errcode_t ext2fs_progress_init(ext2_sim_progmeter *ret_prog,
+ const char *label,
+ int labelwidth, int barwidth,
+ __u32 maxdone, int flags)
+{
+ ext2_sim_progmeter prog;
+ errcode_t retval;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_sim_progress), &prog);
+ if (retval)
+ return retval;
+ memset(prog, 0, sizeof(struct ext2_sim_progress));
+
+ retval = ext2fs_get_mem(strlen(label)+1, &prog->label);
+ if (retval) {
+ free(prog);
+ return retval;
+ }
+ strcpy(prog->label, label);
+ prog->labelwidth = labelwidth;
+ prog->barwidth = barwidth;
+ prog->flags = flags;
+ prog->maxdone = maxdone;
+ prog->current = 0;
+ prog->shown = 0;
+ prog->f = stdout;
+
+ *ret_prog = prog;
+
+ return ext2fs_progress_display(prog);
+}
+
+void ext2fs_progress_close(ext2_sim_progmeter prog)
+{
+
+ if (prog->label)
+ ext2fs_free_mem(&prog->label);
+ ext2fs_free_mem(&prog);
+ printf("\n");
+ return;
+}
diff --git a/resize/test-resize b/resize/test-resize
new file mode 100755
index 0000000..3766f4f
--- /dev/null
+++ b/resize/test-resize
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+FS=/bigscratch/testfs
+FEATURE="-O 64bit"
+
+RESIZE2FS=/tmp/resize2fs.static
+MKE2FS=mke2fs
+DUMPE2FS=dumpe2fs
+E2FSCK=e2fsck
+
+/bin/rm -f $FS ; touch $FS
+truncate -s 8T $FS
+$MKE2FS -F -t ext4 $FEATURE $FS
+$E2FSCK -FY $FS
+$DUMPE2FS $FS > /tmp/d1
+
+truncate -s 20T $FS
+time $RESIZE2FS -d 31 -p $FS > /tmp/r1
+$DUMPE2FS $FS > /tmp/d2
+$E2FSCK -fy $FS
+$DUMPE2FS $FS > /tmp/d3
+
+truncate -s 21T $FS
+time $RESIZE2FS -d 31 -p $FS > /tmp/r2
+$DUMPE2FS $FS > /tmp/d4
+$E2FSCK -fy $FS
+$DUMPE2FS $FS > /tmp/d5
diff --git a/resize/test_extent.c b/resize/test_extent.c
new file mode 100644
index 0000000..11ad132
--- /dev/null
+++ b/resize/test_extent.c
@@ -0,0 +1,129 @@
+/*
+ * test_extent.c --- tester for the extent abstraction
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include "resize2fs.h"
+
+void do_test(FILE *in, FILE *out);
+
+void do_test(FILE *in, FILE *out)
+{
+ char buf[128];
+ char *cp, *cmd, *arg1, *arg2;
+ __u64 num1, num2;
+ __u64 size;
+ errcode_t retval;
+ ext2_extent extent = 0;
+ const char *no_table = "# No extent table\n";
+
+ while (!feof(in)) {
+ if (!fgets(buf, sizeof(buf), in))
+ break;
+ /*
+ * Ignore comments
+ */
+ if (buf[0] =='#')
+ continue;
+
+ /*
+ * Echo command
+ */
+ fputs(buf, out);
+
+ cp = strchr(buf, '\n');
+ if (cp)
+ *cp = '\0';
+
+ /*
+ * Parse command line; simple, at most two arguments
+ */
+ cmd = buf;
+ num1 = num2 = 0;
+ arg1 = arg2 = 0;
+ cp = strchr(buf, ' ');
+ if (cp) {
+ *cp++ = '\0';
+ arg1 = cp;
+ num1 = strtoul(arg1, 0, 0);
+
+ cp = strchr(cp, ' ');
+ }
+ if (cp) {
+ *cp++ = '\0';
+ arg2 = cp;
+ num2 = strtoul(arg2, 0, 0);
+ }
+
+ if (!strcmp(cmd, "create")) {
+ retval = ext2fs_create_extent_table(&extent, num1);
+ if (retval) {
+ handle_error:
+ fprintf(out, "# Error: %s\n",
+ error_message(retval));
+ continue;
+ }
+ continue;
+ }
+ if (!extent) {
+ fputs(no_table, out);
+ continue;
+ }
+ if (!strcmp(cmd, "free")) {
+ ext2fs_free_extent_table(extent);
+ extent = 0;
+ } else if (!strcmp(cmd, "add")) {
+ retval = ext2fs_add_extent_entry(extent, num1, num2);
+ if (retval)
+ goto handle_error;
+ } else if (!strcmp(cmd, "lookup")) {
+ num2 = ext2fs_extent_translate(extent, num1);
+ fprintf(out, "# Answer: %llu%s\n",
+ (unsigned long long) num2,
+ num2 ? "" : " (not found)");
+ } else if (!strcmp(cmd, "dump")) {
+ ext2fs_extent_dump(extent, out);
+ } else if (!strcmp(cmd, "iter_test")) {
+ retval = ext2fs_iterate_extent(extent, 0, 0, 0);
+ if (retval)
+ goto handle_error;
+ while (1) {
+ retval = ext2fs_iterate_extent(extent,
+ &num1, &num2, &size);
+ if (retval)
+ goto handle_error;
+ if (!size)
+ break;
+ fprintf(out, "# %llu -> %llu (%llu)\n",
+ (unsigned long long) num1,
+ (unsigned long long) num2,
+ (unsigned long long) size);
+ }
+ } else
+ fputs("# Syntax error\n", out);
+ }
+ if (extent)
+ ext2fs_free_extent_table(extent);
+}
+
+#ifdef __GNUC__
+#define ATTR(x) __attribute__(x)
+#else
+#define ATTR(x)
+#endif
+
+int main(int argc ATTR((unused)), char **argv ATTR((unused)))
+{
+ do_test(stdin, stdout);
+ exit(0);
+}
diff --git a/resize/test_extent.in b/resize/test_extent.in
new file mode 100644
index 0000000..7edcc41
--- /dev/null
+++ b/resize/test_extent.in
@@ -0,0 +1,64 @@
+create 10
+add 10 20
+add 11 21
+add 12 22
+add 14 45
+add 16 50
+add 17 51
+dump
+# Extent dump:
+# Num=3, Size=10, Cursor=0, Sorted=1
+# 10 -> 20 (3)
+# 14 -> 45 (1)
+# 16 -> 50 (2)
+add 18 52
+dump
+# Extent dump:
+# Num=3, Size=10, Cursor=0, Sorted=1
+# 10 -> 20 (3)
+# 14 -> 45 (1)
+# 16 -> 50 (3)
+lookup 10
+# Answer: 20
+lookup 11
+# Answer: 21
+lookup 12
+# Answer: 22
+lookup 13
+# Answer: 0 (not found)
+lookup 14
+# Answer: 45
+lookup 15
+# Answer: 0 (not found)
+lookup 16
+# Answer: 50
+lookup 1
+# Answer: 0 (not found)
+lookup 50
+# Answer: 0 (not found)
+add 19 100
+add 13 5
+lookup 18
+# Answer: 52
+lookup 19
+# Answer: 100
+lookup 20
+# Answer: 0 (not found)
+lookup 12
+# Answer: 22
+lookup 13
+# Answer: 5
+dump
+# Extent dump:
+# Num=5, Size=10, Cursor=0, Sorted=1
+# 10 -> 20 (3)
+# 13 -> 5 (1)
+# 14 -> 45 (1)
+# 16 -> 50 (3)
+# 19 -> 100 (1)
+iter_test
+# 10 -> 20 (3)
+# 13 -> 5 (1)
+# 14 -> 45 (1)
+# 16 -> 50 (3)
+# 19 -> 100 (1)
diff --git a/scrub/Makefile.in b/scrub/Makefile.in
new file mode 100644
index 0000000..387f650
--- /dev/null
+++ b/scrub/Makefile.in
@@ -0,0 +1,188 @@
+#
+# Makefile for e2scrub
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = scrub
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+PROGS= e2scrub e2scrub_all
+MANPAGES= e2scrub.8 e2scrub_all.8
+CONFFILES= e2scrub.conf
+
+ifeq ($(HAVE_UDEV),yes)
+UDEV_RULES = e2scrub.rules
+INSTALLDIRS_TGT += installdirs-udev
+INSTALL_TGT += install-udev
+UNINSTALL_TGT += uninstall-udev
+endif
+
+ifeq ($(HAVE_CROND),yes)
+CRONTABS = e2scrub_all.cron
+LIBPROGS += e2scrub_all_cron
+INSTALLDIRS_TGT += installdirs-crond installdirs-libprogs
+INSTALL_TGT += install-crond install-libprogs
+UNINSTALL_TGT += uninstall-crond uninstall-libprogs
+endif
+
+ifeq ($(HAVE_SYSTEMD),yes)
+SERVICE_FILES = e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
+LIBPROGS += e2scrub_fail
+INSTALLDIRS_TGT += installdirs-systemd installdirs-libprogs
+INSTALL_TGT += install-systemd install-libprogs
+UNINSTALL_TGT += uninstall-systemd uninstall-libprogs
+endif
+
+all:: $(PROGS) $(MANPAGES) $(CONFFILES) $(UDEV_RULES) $(SERVICE_FILES) $(CRONTABS) $(LIBPROGS)
+
+e2scrub: $(DEP_SUBSTITUTE) e2scrub.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2scrub.in $@
+ $(Q) chmod a+x $@
+
+e2scrub_all: e2scrub_all.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2scrub_all.in $@
+ $(Q) chmod a+x $@
+
+e2scrub_fail: e2scrub_fail.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2scrub_fail.in $@
+ $(Q) chmod a+x $@
+
+e2scrub_all_cron: e2scrub_all_cron.in
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2scrub_all_cron.in $@
+ $(Q) chmod a+x $@
+
+%.8: %.8.in $(DEP_SUBSTITUTE)
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $< $@
+
+%.conf: %.conf.in $(DEP_SUBSTITUTE)
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $< $@
+
+%.rules: %.rules.in $(DEP_SUBSTITUTE)
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $< $@
+
+%.service: %.service.in $(DEP_SUBSTITUTE)
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $< $@
+
+%.cron: %.cron.in $(DEP_SUBSTITUTE)
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $< $@
+
+%.timer: %.timer.in $(DEP_SUBSTITUTE)
+ $(E) " SUBST $@"
+ $(Q) $(SUBSTITUTE_UPTIME) $< $@
+
+installdirs-udev:
+ $(E) " MKDIR_P $(UDEV_RULES_DIR)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(UDEV_RULES_DIR)
+
+installdirs-crond:
+ $(E) " MKDIR_P $(CROND_DIR)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(CROND_DIR)
+
+installdirs-libprogs:
+ $(E) " MKDIR_P $(pkglibdir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(pkglibdir)
+
+installdirs-systemd:
+ $(E) " MKDIR_P $(SYSTEMD_SYSTEM_UNIT_DIR)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)
+
+installdirs: $(INSTALLDIRS_TGT)
+ $(E) " MKDIR_P $(root_sbindir) $(man8dir) $(root_sysconfdir)"
+ $(Q) $(MKDIR_P) $(DESTDIR)$(root_sbindir) \
+ $(DESTDIR)$(man8dir) $(DESTDIR)$(root_sysconfdir)
+
+install-udev: installdirs-udev
+ $(Q) for i in $(UDEV_RULES); do \
+ $(ES) " INSTALL $(UDEV_RULES_DIR)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR)/96-$$i; \
+ done
+
+install-crond: installdirs-crond
+ $(Q) if test -n "$(CRONTABS)" ; then \
+ $(ES) " INSTALL $(CROND_DIR)/e2scrub_all" ; \
+ $(INSTALL_DATA) e2scrub_all.cron $(DESTDIR)$(CROND_DIR)/e2scrub_all ; \
+ fi
+
+install-libprogs: $(LIBPROGS) installdirs-libprogs
+ $(Q) for i in $(LIBPROGS); do \
+ $(ES) " INSTALL $(pkglibdir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(pkglibdir)/$$i; \
+ done
+
+install-systemd: $(SERVICE_FILES) installdirs-systemd
+ $(Q) for i in $(SERVICE_FILES); do \
+ $(ES) " INSTALL_DATA $(SYSTEMD_SYSTEM_UNIT_DIR)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/$$i; \
+ done
+
+install-strip: install
+
+install: $(PROGS) $(MANPAGES) $(FMANPAGES) installdirs $(INSTALL_TGT)
+ $(Q) for i in $(PROGS); do \
+ $(ES) " INSTALL $(root_sbindir)/$$i"; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(Q) for i in $(MANPAGES); do \
+ for j in $(COMPRESS_EXT); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
+ done; \
+ $(ES) " INSTALL_DATA $(man8dir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+ done
+ $(Q) for i in $(CONFFILES); do \
+ $(ES) " INSTALL_DATA $(root_sysconfdir)/$$i"; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(root_sysconfdir)/$$i; \
+ done
+
+uninstall-udev:
+ for i in $(UDEV_RULES); do \
+ $(RM) -f $(DESTDIR)$(UDEV_RULES_DIR)/96-$$i; \
+ done
+
+uninstall-crond:
+ if test -n "$(CRONTABS)" ; then \
+ $(RM) -f $(DESTDIR)$(CROND_DIR)/e2scrub_all ; \
+ fi
+
+uninstall-libprogs:
+ for i in $(LIBPROGS); do \
+ $(RM) -f $(DESTDIR)$(pkglibdir)/$$i; \
+ done
+
+uninstall-systemd:
+ for i in $(SERVICE_FILES); do \
+ $(RM) -f $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/$$i; \
+ done
+
+uninstall: $(UNINSTALL_TGT)
+ for i in $(PROGS); do \
+ $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
+ done
+ for i in $(CONFFILES); do \
+ $(RM) -f $(DESTDIR)$(root_sysconfdir)/$$i; \
+ done
+
+clean::
+ $(RM) -f $(PROGS) $(MANPAGES) $(CONFFILES) $(UDEV_RULES) $(SERVICE_FILES) $(CRONTABS) $(LIBPROGS)
+
+mostlyclean: clean
+distclean: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
diff --git a/scrub/e2scrub.8.in b/scrub/e2scrub.8.in
new file mode 100644
index 0000000..3d27751
--- /dev/null
+++ b/scrub/e2scrub.8.in
@@ -0,0 +1,69 @@
+.TH E2SCRUB 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2scrub - check the contents of a mounted ext[234] file system
+.SH SYNOPSIS
+.B
+e2scrub [OPTION] MOUNTPOINT | DEVICE
+.SH DESCRIPTION
+.B e2scrub
+attempts to check (but not repair) all metadata in a mounted ext[234]
+file system if the file system resides on an LVM logical volume.
+The block device of the LVM logical volume can also be passed in.
+
+This program snapshots the volume and runs a file system check on the snapshot
+to look for corruption errors.
+The LVM volume group must have at least 256MiB of unallocated space to
+dedicate to the snapshot or the logical volume will be skipped.
+The snapshot will be named
+.IR lvname ".e2scrub"
+and
+.B udev
+will not create symbolic links to it under
+.IR /dev/disk .
+Every attempt will be made to remove the snapshots prior to running
+.BR e2scrub ,
+but in a dire situation it may be necessary to remove the snapshot manually.
+
+If no errors are found,
+.B fstrim
+can be called on the file system if it is mounted.
+If errors are found, the file system will be marked as having errors.
+The file system should be taken offline and
+.B e2fsck
+run as soon as possible, because
+.B e2scrub
+does not fix corruptions.
+If the file system is not repaired,
+.B e2fsck
+will be run before the next mount.
+.SH OPTIONS
+.TP
+\fB-n\fR
+Print what commands
+.B e2scrub
+would execute to check the file system. (Note: the commands will not
+actually be executed; however, since
+.B e2scrub
+needs to run some commands to query the system to determine what
+commands would be executed, it still needs to be run as root.)
+.TP
+\fB-r\fR
+Remove the e2scrub snapshot and exit without checking anything.
+.TP
+\fB-t\fR
+Run
+.B
+fstrim(1)
+on the mounted file system if no errors are found.
+.TP
+\fB-V\fR
+Print version information and exit.
+.SH EXIT CODE
+The exit codes are the same as in
+.BR e2fsck (8)
+.SH SEE ALSO
+.BR e2fsck (8)
+.SH AUTHOR
+Darrick J. Wong <darrick.wong@oracle.com>
+.SH COPYRIGHT
+Copyright \[co]2018 Oracle. License is GPLv2+. <http://www.gnu.org/licenses/gpl-2.0.html>
diff --git a/scrub/e2scrub.conf.in b/scrub/e2scrub.conf.in
new file mode 100644
index 0000000..661fc13
--- /dev/null
+++ b/scrub/e2scrub.conf.in
@@ -0,0 +1,25 @@
+# e2scrub configuration file
+
+# Uncomment to enable automatic periodic runs of e2scrub_all
+# (either via cron or via a systemd timer)
+# periodic_e2scrub=1
+
+# e-mail destination used by e2scrub_fail when problems are found with
+# the file system.
+# recipient=root
+
+# e-mail sender used by e2scrub_fail when problems are found with
+# the file system.
+# sender=e2scrub@host.domain.name
+
+# Snapshots will be created to run fsck; the snapshot will be of this size.
+# snap_size_mb=256
+
+# Set this to 1 to enable fstrim for everyone.
+# fstrim=0
+
+# Arguments passed into e2fsck.
+# e2fsck_opts="-vtt"
+
+# Set this to 1 to have e2scrub_all scrub all LVs, not just the mounted ones.
+# scrub_all=0
diff --git a/scrub/e2scrub.in b/scrub/e2scrub.in
new file mode 100644
index 0000000..7ed57f2
--- /dev/null
+++ b/scrub/e2scrub.in
@@ -0,0 +1,283 @@
+#!/bin/bash
+
+# Copyright (C) 2018 Oracle. All Rights Reserved.
+#
+# Author: Darrick J. Wong <darrick.wong@oracle.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Automatically check an LVM-managed filesystem online.
+# We use lvm snapshots to do this, which means that we can only
+# check filesystems in VGs that have at least 256MB (or so) of
+# free space.
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+if (( $EUID != 0 )); then
+ echo "e2scrub must be run as root"
+ exit 1
+fi
+
+snap_size_mb=256
+fstrim=0
+reap=0
+e2fsck_opts=""
+conffile="@root_sysconfdir@/e2scrub.conf"
+
+test -f "${conffile}" && . "${conffile}"
+
+print_help() {
+ echo "Usage: $0 [OPTIONS] mountpoint | device"
+ echo
+ echo "mountpoint must be on an LVM-managed block device"
+ echo "-n: Show what commands e2scrub would execute."
+ echo "-r: Remove e2scrub snapshot and exit, do not check anything."
+ echo "-t: Run fstrim if successful."
+ echo "-V: Print version information and exit."
+}
+
+print_version() {
+ echo "e2scrub @E2FSPROGS_VERSION@ (@E2FSPROGS_DATE@)"
+}
+
+exitcode() {
+ ret="$1"
+
+ # If we're being run as a service, the return code must fit the LSB
+ # init script action error guidelines, which is to say that we
+ # compress all errors to 1 ("generic or unspecified error", LSB 5.0
+ # section 22.2) and hope the admin will scan the log for what
+ # actually happened.
+
+ # We have to sleep 2 seconds here because journald uses the pid to
+ # connect our log messages to the systemd service. This is critical
+ # for capturing all the log messages if the scrub fails, because the
+ # fail service uses the service name to gather log messages for the
+ # error report.
+ if [ -n "${SERVICE_MODE}" -a "${ret}" -ne 0 ]; then
+ test "${ret}" -ne 0 && ret=1
+ sleep 2
+ fi
+
+ exit "${ret}"
+}
+
+while getopts "nrtV" opt; do
+ case "${opt}" in
+ "n") DBG="echo Would execute: " ;;
+ "r") reap=1;;
+ "t") fstrim=1;;
+ "V") print_version; exitcode 0;;
+ *) print_help; exitcode 2;;
+ esac
+done
+shift "$((OPTIND - 1))"
+
+arg="$1"
+if [ -z "${arg}" ]; then
+ print_help
+ exitcode 1
+fi
+
+if ! type lsblk >& /dev/null ; then
+ echo "e2scrub: can't find lsblk --- is util-linux installed?"
+ exitcode 1
+fi
+
+if ! type lvcreate >& /dev/null ; then
+ echo "e2scrub: can't find lvcreate --- is lvm2 installed?"
+ exitcode 1
+fi
+
+# close file descriptor 3 (from cron) since it causes lvm to kvetch
+exec 3<&-
+
+# Find the device for a given mountpoint
+dev_from_mount() {
+ local mountpt="$(realpath "$1")"
+
+ lsblk -o NAME,FSTYPE,MOUNTPOINT -p -P -n 2> /dev/null | while read vars; do
+ eval "${vars}"
+ if [ "${mountpt}" != "${MOUNTPOINT}" ]; then
+ continue
+ fi
+ case "${FSTYPE}" in
+ ext[234])
+ echo "${NAME}"
+ return 0
+ ;;
+ esac
+ done
+ return 1
+}
+
+# Check a device argument
+dev_from_arg() {
+ local dev="$1"
+ local fstype="$(lsblk -o FSTYPE -n "${dev}" 2> /dev/null)"
+
+ case "${fstype}" in
+ ext[234])
+ echo "${dev}"
+ return 0
+ ;;
+ esac
+ return 1
+}
+
+mnt_from_dev() {
+ local dev="$1"
+
+ if [ -n "${dev}" ]; then
+ lsblk -o MOUNTPOINT -n "${dev}"
+ fi
+}
+
+# Construct block device path and mountpoint from argument
+if [ -b "${arg}" ]; then
+ dev="$(dev_from_arg "${arg}")"
+ mnt="$(mnt_from_dev "${dev}")"
+else
+ dev="$(dev_from_mount "${arg}")"
+ mnt="${arg}"
+fi
+if [ ! -e "${dev}" ]; then
+ echo "${arg}: Not an ext[234] filesystem."
+ print_help
+ exitcode 16
+fi
+
+# Make sure this is an LVM device we can snapshot
+lvm_vars="$(lvs --nameprefixes -o name,vgname,lv_role --noheadings "${dev}" 2> /dev/null)"
+eval "${lvm_vars}"
+if [ -z "${LVM2_VG_NAME}" ] || [ -z "${LVM2_LV_NAME}" ] ||
+ echo "${LVM2_LV_ROLE}" | grep -q "snapshot"; then
+ echo "${arg}: Not connected to an LVM logical volume."
+ print_help
+ exitcode 16
+fi
+start_time="$(date +'%Y%m%d%H%M%S')"
+snap="${LVM2_LV_NAME}.e2scrub"
+snap_dev="/dev/${LVM2_VG_NAME}/${snap}"
+
+teardown() {
+ # Remove and wait for removal to succeed.
+ ${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}"
+ while [ -e "${snap_dev}" ] && [ "$?" -eq "5" ]; do
+ sleep 0.5
+ ${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}"
+ done
+}
+
+check() {
+ # First we recover the journal, then we see if e2fsck tries any
+ # non-optimization repairs. If either of these two returns a
+ # non-zero status (errors fixed or remaining) then this fs is bad.
+ E2FSCK_FIXES_ONLY=1
+ export E2FSCK_FIXES_ONLY
+ ${DBG} "@root_sbindir@/e2fsck" -E journal_only -p ${e2fsck_opts} "${snap_dev}" || return $?
+ ${DBG} "@root_sbindir@/e2fsck" -f -y ${e2fsck_opts} "${snap_dev}"
+}
+
+mark_clean() {
+ ${DBG} "@root_sbindir@/tune2fs" -C 0 -T "${start_time}" "${dev}"
+}
+
+mark_corrupt() {
+ ${DBG} "@root_sbindir@/tune2fs" -E force_fsck "${dev}"
+}
+
+setup() {
+ # Try to remove snapshot for 30s, bail out if we can't remove it.
+ lvremove_deadline="$(( $(date "+%s") + 30))"
+ ${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}" 2>/dev/null
+ while [ -e "${snap_dev}" ] && [ "$?" -eq "5" ] &&
+ [ "$(date "+%s")" -lt "${lvremove_deadline}" ]; do
+ sleep 0.5
+ ${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}"
+ done
+ if [ -e "${snap_dev}" ]; then
+ echo "${arg}: e2scrub snapshot is in use, cannot check!"
+ return 1
+ fi
+ # Create the snapshot, wait for device to appear.
+ ${DBG} lvcreate -s -L "${snap_size_mb}m" -n "${snap}" "${LVM2_VG_NAME}/${LVM2_LV_NAME}"
+ if [ $? -ne 0 ]; then
+ echo "${arg}: e2scrub snapshot FAILED, will not check!"
+ return 1
+ fi
+ ${DBG} udevadm settle 2> /dev/null
+ return 0
+}
+
+if [ "${reap}" -gt 0 ]; then
+ if [ -e "${snap_dev}" ]; then
+ teardown 2> /dev/null
+ fi
+ exit 0
+fi
+if ! setup; then
+ exitcode 8
+fi
+trap "teardown; exit 1" EXIT INT QUIT TERM
+
+# Check and react
+check
+case "$?" in
+"0")
+ # Clean check!
+ echo "${arg}: Scrub succeeded."
+ mark_clean
+ teardown
+ trap '' EXIT
+
+ # Trim the free space, which requires the snapshot be deleted.
+ if [ "${fstrim}" -eq 1 ] && [ -d "${mnt}" ] && type fstrim > /dev/null 2>&1; then
+ echo "${arg}: Trimming free space."
+ fstrim -v "${mnt}"
+ fi
+
+ ret=0
+ ;;
+"8")
+ # Operational error, what now?
+ echo "${arg}: e2fsck operational error."
+ teardown
+ trap '' EXIT
+ ret=8
+ ;;
+*)
+ # fsck failed. Check if the snapshot is invalid; if so, make a
+ # note of that at the end of the log. This isn't necessarily a
+ # failure because the mounted fs could have overflowed the
+ # snapshot with regular disk writes /or/ our repair process
+ # could have done it by repairing too much.
+ #
+ # If it's really corrupt we ought to fsck at next boot.
+ is_invalid="$(lvs -o lv_snapshot_invalid --noheadings "${snap_dev}" | awk '{print $1}')"
+ if [ -n "${is_invalid}" ]; then
+ echo "${arg}: Scrub FAILED due to invalid snapshot."
+ ret=8
+ else
+ echo "${arg}: Scrub FAILED due to corruption! Unmount and run e2fsck -y."
+ mark_corrupt
+ ret=6
+ fi
+ teardown
+ trap '' EXIT
+ ;;
+esac
+
+exitcode "${ret}"
diff --git a/scrub/e2scrub.rules.in b/scrub/e2scrub.rules.in
new file mode 100644
index 0000000..b6dc30b
--- /dev/null
+++ b/scrub/e2scrub.rules.in
@@ -0,0 +1,2 @@
+# Try to hide our fsck snapshots from udev's /dev/disk linking...
+ACTION=="add|change", ENV{DM_LV_NAME}=="*.e2scrub", ENV{UDISKS_IGNORE}="1", OPTIONS="link_priority=-100"
diff --git a/scrub/e2scrub@.service.in b/scrub/e2scrub@.service.in
new file mode 100644
index 0000000..496f894
--- /dev/null
+++ b/scrub/e2scrub@.service.in
@@ -0,0 +1,20 @@
+[Unit]
+Description=Online ext4 Metadata Check for %I
+OnFailure=e2scrub_fail@%i.service
+Documentation=man:e2scrub(8)
+
+[Service]
+Type=oneshot
+WorkingDirectory=/
+PrivateNetwork=true
+ProtectSystem=true
+ProtectHome=read-only
+PrivateTmp=yes
+AmbientCapabilities=CAP_SYS_ADMIN CAP_SYS_RAWIO
+NoNewPrivileges=yes
+User=root
+IOSchedulingClass=idle
+CPUSchedulingPolicy=idle
+Environment=SERVICE_MODE=1
+ExecStart=@root_sbindir@/e2scrub -t %I
+SyslogIdentifier=%N
diff --git a/scrub/e2scrub_all.8.in b/scrub/e2scrub_all.8.in
new file mode 100644
index 0000000..99bdc0d
--- /dev/null
+++ b/scrub/e2scrub_all.8.in
@@ -0,0 +1,47 @@
+.TH E2SCRUB 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2scrub_all - check all mounted ext[234] file systems for errors.
+.SH SYNOPSIS
+.B
+e2scrub_all [OPTION]
+.SH DESCRIPTION
+Searches the system for all LVM logical volumes containing an ext2, ext3, or
+ext4 file system, and checks them for problems.
+The checking is performed by invoking the
+.B e2scrub
+tool, which will look for corruptions.
+Corrupt file systems will be tagged as having errors so that fsck will be
+invoked before the next mount.
+If no errors are encountered,
+.B fstrim
+will be called on the file system if it is mounted.
+See the
+.B e2scrub
+manual page for more information about how the checking is performed.
+.SH OPTIONS
+.TP
+\fB-n\fR
+Print what commands
+.B e2scrub_all
+would execute to initiate the e2scrub operations.
+(Note: these commands will not actually be executed; however, since
+.B e2scrub_all
+needs to run some additional, privileged commands to query the
+system to determine which
+.B e2scrub
+commands would be executed, it still needs to be run as root.)
+.TP
+\fB-r\fR
+Remove e2scrub snapshots but do not check anything.
+.TP
+\fB-A\fR
+Scrub all ext[234] file systems even if they are not mounted.
+.TP
+\fB-V\fR
+Print version information and exit.
+.SH SEE ALSO
+.BR e2scrub "(8)"
+.SH AUTHOR
+Darrick J. Wong <darrick.wong@oracle.com>
+.SH COPYRIGHT
+Copyright \[co]2018 Oracle. License is GPLv2+. <http://www.gnu.org/licenses/gpl-2.0.html>
diff --git a/scrub/e2scrub_all.cron.in b/scrub/e2scrub_all.cron.in
new file mode 100644
index 0000000..395fb2a
--- /dev/null
+++ b/scrub/e2scrub_all.cron.in
@@ -0,0 +1,2 @@
+30 3 * * 0 root test -e /run/systemd/system || SERVICE_MODE=1 @pkglibdir@/e2scrub_all_cron
+10 3 * * * root test -e /run/systemd/system || SERVICE_MODE=1 @root_sbindir@/e2scrub_all -A -r
diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in
new file mode 100644
index 0000000..4288b96
--- /dev/null
+++ b/scrub/e2scrub_all.in
@@ -0,0 +1,185 @@
+#!/bin/bash
+
+# Copyright (C) 2018 Oracle. All Rights Reserved.
+#
+# Author: Darrick J. Wong <darrick.wong@oracle.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+if (( $EUID != 0 )); then
+ echo "e2scrub_all must be run as root"
+ exit 1
+fi
+
+periodic_e2scrub=0
+scrub_all=0
+snap_size_mb=256
+reap=0
+conffile="@root_sysconfdir@/e2scrub.conf"
+
+test -f "${conffile}" && . "${conffile}"
+
+scrub_args=""
+
+print_help() {
+ echo "Usage: $0 [OPTIONS]"
+ echo " -n: Show what commands e2scrub_all would execute."
+ echo " -r: Remove e2scrub snapshots."
+ echo " -A: Scrub all ext[234] filesystems even if not mounted."
+ echo " -V: Print version information and exit."
+}
+
+print_version() {
+ echo "e2scrub_all @E2FSPROGS_VERSION@ (@E2FSPROGS_DATE@)"
+}
+
+exitcode() {
+ ret="$1"
+
+ # If we're being run as a service, the return code must fit the LSB
+ # init script action error guidelines, which is to say that we
+ # compress all errors to 1 ("generic or unspecified error", LSB 5.0
+ # section 22.2) and hope the admin will scan the log for what
+ # actually happened.
+
+ if [ -n "${SERVICE_MODE}" -a "${ret}" -ne 0 ]; then
+ test "${ret}" -ne 0 && ret=1
+ fi
+
+ exit "${ret}"
+}
+
+while getopts "nrAV" opt; do
+ case "${opt}" in
+ "n") DBG="echo Would execute: " ;;
+ "r") scrub_args="${scrub_args} -r"; reap=1;;
+ "A") scrub_all=1;;
+ "V") print_version; exitcode 0;;
+ *) print_help; exitcode 2;;
+ esac
+done
+shift "$((OPTIND - 1))"
+
+# If we're in service mode and the service is not enabled via config file...
+if [ -n "${SERVICE_MODE}" -a "${periodic_e2scrub}" -ne 1 ]; then
+ # ...don't start e2scrub processes.
+ if [ "${reap}" -eq 0 ]; then
+ exitcode 0
+ fi
+
+ # ...and if we don't see any leftover e2scrub snapshots, don't
+ # run the reaping process either, because lvs can be slow.
+ if ! readlink -q -s -e /dev/mapper/*.e2scrub* > /dev/null; then
+ exitcode 0
+ fi
+fi
+
+# close file descriptor 3 (from cron) since it causes lvm to kvetch
+exec 3<&-
+
+# If some prerequisite packages are not installed, exit with a code
+# indicating success to avoid spamming the sysadmin with fail messages
+# when e2scrub_all is run out of cron or a systemd timer.
+
+if ! type mapfile >& /dev/null ; then
+ test -n "${SERVICE_MODE}" && exitcode 0
+ echo "e2scrub_all: can't find mapfile --- is bash 4.xx installed?"
+ exitcode 1
+fi
+
+if ! type lsblk >& /dev/null ; then
+ test -n "${SERVICE_MODE}" && exitcode 0
+ echo "e2scrub_all: can't find lsblk --- is util-linux installed?"
+ exitcode 1
+fi
+
+if ! type lvcreate >& /dev/null ; then
+ test -n "${SERVICE_MODE}" && exitcode 0
+ echo "e2scrub_all: can't find lvcreate --- is lvm2 installed?"
+ exitcode 1
+fi
+
+# Find scrub targets, make sure we only do this once.
+ls_scan_targets() {
+ local devices=$(lvs -o lv_path --noheadings -S "lv_active=active,lv_role=public,lv_role!=snapshot,vg_free>=${snap_size_mb}")
+
+ if [ -z "$devices" ]; then
+ return 0;
+ fi
+ lsblk -o NAME,MOUNTPOINT,FSTYPE,TYPE -P -n -p $devices | \
+ grep FSTYPE=\"ext\[234\]\" | grep TYPE=\"lvm\" | \
+ while read vars ; do
+ eval "${vars}"
+
+ if [ "${scrub_all}" -eq 1 ] || [ -n "${MOUNTPOINT}" ]; then
+ echo ${MOUNTPOINT:-${NAME}}
+ fi
+ done
+}
+
+# Find leftover scrub snapshots
+ls_reap_targets() {
+ lvs -o lv_path -S lv_role=snapshot -S lv_name=~\(e2scrub$\) \
+ --noheadings | sed -e 's/.e2scrub$//'
+}
+
+# Figure out what we're targeting
+ls_targets() {
+ if [ "${reap}" -eq 1 ]; then
+ ls_reap_targets
+ else
+ ls_scan_targets
+ fi
+}
+
+# systemd doesn't know to do path escaping on the instance variable we pass
+# to the e2scrub service, which breaks things if there is a dash in the path
+# name. Therefore, do the path escaping ourselves if needed.
+#
+# systemd path escaping also drops the initial slash so we add that back in so
+# that log messages from the service units preserve the full path and users can
+# look up log messages using full paths. However, for "/" the escaping rules
+# do /not/ drop the initial slash, so we have to special-case that here.
+escape_path_for_systemd() {
+ local path="$1"
+
+ if [ "${path}" != "/" ]; then
+ echo "-$(systemd-escape --path "${path}")"
+ else
+ echo "-"
+ fi
+}
+
+# Scrub any mounted fs on lvm by creating a snapshot and fscking that.
+mapfile -t targets < <(ls_targets)
+for tgt in "${targets[@]}"; do
+ # If we're not reaping and systemd is present, try invoking the
+ # systemd service.
+ if [ "${reap}" -ne 1 ] && type systemctl > /dev/null 2>&1; then
+ tgt_esc="$(escape_path_for_systemd "${tgt}")"
+ ${DBG} systemctl start "e2scrub@${tgt_esc}" 2> /dev/null
+ res=$?
+ if [ "${res}" -eq 0 ] || [ "${res}" -eq 1 ]; then
+ continue;
+ fi
+ fi
+
+ # Otherwise use direct invocation
+ ${DBG} "@root_sbindir@/e2scrub" ${scrub_args} "${tgt}"
+done
+
+exitcode 0
diff --git a/scrub/e2scrub_all.service.in b/scrub/e2scrub_all.service.in
new file mode 100644
index 0000000..20f42bf
--- /dev/null
+++ b/scrub/e2scrub_all.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=Online ext4 Metadata Check for All Filesystems
+ConditionACPower=true
+ConditionCapability=CAP_SYS_ADMIN
+ConditionCapability=CAP_SYS_RAWIO
+Documentation=man:e2scrub_all(8)
+
+[Service]
+Type=oneshot
+Environment=SERVICE_MODE=1
+ExecStart=@root_sbindir@/e2scrub_all
+SyslogIdentifier=e2scrub_all
diff --git a/scrub/e2scrub_all.timer.in b/scrub/e2scrub_all.timer.in
new file mode 100644
index 0000000..3d558bb
--- /dev/null
+++ b/scrub/e2scrub_all.timer.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Periodic ext4 Online Metadata Check for All Filesystems
+
+[Timer]
+# Run on Sunday at 3:10am, to avoid running afoul of DST changes
+OnCalendar=Sun *-*-* 03:10:00
+RandomizedDelaySec=60
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/scrub/e2scrub_all_cron.in b/scrub/e2scrub_all_cron.in
new file mode 100644
index 0000000..fcfe415
--- /dev/null
+++ b/scrub/e2scrub_all_cron.in
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# Copyright (C) 2018 Oracle. All Rights Reserved.
+#
+# Author: Darrick J. Wong <darrick.wong@oracle.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Run e2scrub_all from a cronjob if we don't have systemd and we're not
+# running on AC power.
+
+on_ac_power() {
+ local any_known=no
+
+ # try sysfs power class first
+ if [ -d /sys/class/power_supply ]; then
+ for psu in /sys/class/power_supply/*; do
+ if [ -r "$psu/type" ]; then
+ type=$(cat "$psu/type")
+
+ # ignore batteries
+ [ "$type" = "Battery" ] && continue
+
+ online=$(cat "$psu/online")
+
+ [ "$online" = 1 ] && return 0
+ [ "$online" = 0 ] && any_known=yes
+ fi
+ done
+
+ [ "$any_known" = "yes" ] && return 1
+ fi
+
+ # else fall back to AC adapters in /proc
+ if [ -d /proc/acpi/ac_adapter ]; then
+ for ac in /proc/acpi/ac_adapter/*; do
+ if [ -r "$ac/state" ]; then
+ grep -q on-line "$ac/state" && return 0
+ grep -q off-line "$ac/state" && any_known=yes
+ elif [ -r "$ac/status" ]; then
+ grep -q on-line "$ac/status" && return 0
+ grep -q off-line "$ac/status" && any_known=yes
+ fi
+ done
+
+ [ "$any_known" = "yes" ] && return 1
+ fi
+
+ # Can't tell, just assume we're on AC.
+ return 0
+}
+
+test -e @root_sbindir@/e2scrub_all || exit 0
+test -e /run/systemd/system && exit 0
+on_ac_power || exit 0
+
+exec @root_sbindir@/e2scrub_all
diff --git a/scrub/e2scrub_fail.in b/scrub/e2scrub_fail.in
new file mode 100644
index 0000000..2c0754a
--- /dev/null
+++ b/scrub/e2scrub_fail.in
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Email logs of failed e2scrub unit runs when the systemd service fails.
+
+device="$1"
+test -z "${device}" && exit 0
+
+if ! type sendmail > /dev/null 2>&1; then
+ echo "$0: sendmail program not found."
+ exit 1
+fi
+
+if test -f /etc/e2scrub.conf ; then
+ . /etc/e2scrub.conf
+fi
+
+hostname="$(hostname -f 2>/dev/null)"
+test -z "${hostname}" && hostname="${HOSTNAME}"
+service_name="e2scrub@$(systemd-escape ${device})"
+
+if test -z "${recipient}" ; then
+ recipient="root"
+fi
+
+if test -z "${sender}" ; then
+ sender="<e2scrub@${hostname}>"
+fi
+
+(cat << ENDL
+To: ${recipient}
+From: ${sender}
+Subject: e2scrub failure on ${device}
+
+So sorry, the automatic e2scrub of ${device} on ${hostname} failed.
+
+A log of what happened follows:
+ENDL
+systemctl status --full --lines 4294967295 "${service_name}") | sendmail -t -i
diff --git a/scrub/e2scrub_fail@.service.in b/scrub/e2scrub_fail@.service.in
new file mode 100644
index 0000000..4bad311
--- /dev/null
+++ b/scrub/e2scrub_fail@.service.in
@@ -0,0 +1,10 @@
+[Unit]
+Description=Online ext4 Metadata Check Failure Reporting for %I
+Documentation=man:e2scrub(8)
+
+[Service]
+Type=oneshot
+ExecStart=@pkglibdir@/e2scrub_fail "%I"
+User=mail
+Group=mail
+SupplementaryGroups=systemd-journal
diff --git a/scrub/e2scrub_reap.service.in b/scrub/e2scrub_reap.service.in
new file mode 100644
index 0000000..58a4565
--- /dev/null
+++ b/scrub/e2scrub_reap.service.in
@@ -0,0 +1,25 @@
+[Unit]
+Description=Remove Stale Online ext4 Metadata Check Snapshots
+ConditionCapability=CAP_SYS_ADMIN
+ConditionCapability=CAP_SYS_RAWIO
+Documentation=man:e2scrub_all(8)
+
+[Service]
+Type=oneshot
+WorkingDirectory=/
+PrivateNetwork=true
+ProtectSystem=true
+ProtectHome=read-only
+PrivateTmp=yes
+AmbientCapabilities=CAP_SYS_ADMIN CAP_SYS_RAWIO
+NoNewPrivileges=yes
+User=root
+IOSchedulingClass=idle
+CPUSchedulingPolicy=idle
+Environment=SERVICE_MODE=1
+ExecStart=@root_sbindir@/e2scrub_all -A -r
+SyslogIdentifier=%N
+RemainAfterExit=no
+
+[Install]
+WantedBy=multi-user.target
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..ba06b3b
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,107 @@
+#
+# Makefile for the tests directory
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = tests
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+all:: @DO_TEST_SUITE@ test_one test_script
+
+test_one: $(srcdir)/test_one.in Makefile mke2fs.conf test_data.tmp
+ @echo "Creating test_one script..."
+ @[ -f test_one ] && chmod u+w test_one || true
+ @echo "#!/bin/sh" > test_one
+ @echo "HTREE=y" >> test_one
+ @echo "QUOTA=y" >> test_one
+ @echo "SRCDIR=@srcdir@" >> test_one
+ @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
+ @echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one
+ @echo "DD=@DD@" >>test_one
+ @cat $(srcdir)/test_one.in >> test_one
+ @chmod +x-w test_one
+
+test_script: test_one test_script.in Makefile mke2fs.conf test_data.tmp
+ @echo "Creating test_script..."
+ @[ -f test_script ] && chmod u+w test_script || true
+ @echo "#!/bin/sh" > test_script
+ @echo "SRCDIR=@srcdir@" >> test_script
+ @cat $(srcdir)/test_script.in >> test_script
+ @chmod +x-w test_script
+
+mke2fs.conf: $(srcdir)/mke2fs.conf.in
+ $(CP) $(srcdir)/mke2fs.conf.in mke2fs.conf
+
+test_data.tmp: $(srcdir)/scripts/gen-test-data
+ $(srcdir)/scripts/gen-test-data > test_data.tmp
+
+.PHONY : test_pre test_post check always_run
+
+always_run:
+
+@ifGNUmake@TESTS=$(wildcard $(srcdir)/[a-z]_*)
+@ifNotGNUmake@TESTS != echo $(srcdir)/[a-z]_*
+
+SKIP_SLOW_TESTS=--skip-slow-tests
+
+$(TESTS):: test_one always_run
+ @./test_one $(SKIP_SLOW_TESTS) $@
+
+foo:
+ echo $(TESTS)
+
+test_pre:
+ @$(RM) -f *.failed
+ @echo "Running e2fsprogs test suite..."
+ @echo " "
+
+test_post: test_pre $(TESTS)
+ @$(srcdir)/test_post
+
+check:: test_pre test_post test_script
+
+fullcheck::
+ $(MAKE) SKIP_SLOW_TESTS= check
+
+check-failed: $(basename $(wildcard *.failed))
+ @$(srcdir)/test_post
+
+
+TDIR=f_testnew
+# Target which creates a new testcase to simplify adding new regression tests.
+testnew:
+ @echo "Creating a new e2fsck testcase in ${TDIR}"
+ @mkdir -p ${TDIR}
+ dd if=/dev/zero of=${TDIR}/image bs=1k count=8k
+ $(top_srcdir)/misc/mke2fs -j -F -N 256 ${TDIR}/image
+ @echo "new test description" > ${TDIR}/name
+ @echo; echo; echo "New test filesystem at ${TDIR}/image."
+ @echo "Now, break the filesystem as appropriate, and run 'make testend'"
+
+EXPECT1=${TDIR}/expect.1
+EXPECT2=${TDIR}/expect.2
+# Target which generates the expect files for the new testcase.
+testend: test_one ${TDIR}/image
+ gzip -9 ${TDIR}/image
+ @OUT1=${EXPECT1} OUT2=${EXPECT2} ./test_one ${TDIR}
+ @echo; echo; echo "*** output from first e2fsck run (${EXPECT1}) ***"
+ @cat ${EXPECT1}
+ @echo "*** output from second e2fsck run (${EXPECT2}) ***"
+ @cat ${EXPECT2}
+ @echo "*** end of e2fsck output ***"
+ @echo; echo "Hopefully e2fsck now fixes this problem properly."
+ @echo "If all is well, edit ${TDIR}/name and rename ${TDIR}."
+
+clean::
+ $(RM) -f *~ *.log *.new *.failed *.ok *.tmp *.slow
+ $(RM) -f test_one test_script mke2fs.conf test_data.tmp
+
+distclean:: clean
+ $(RM) -f Makefile
+ $(RM) -rf ${TDIR}
diff --git a/tests/README b/tests/README
new file mode 100644
index 0000000..d9d2437
--- /dev/null
+++ b/tests/README
@@ -0,0 +1,68 @@
+These images contain various forms of corrupted filesystem which
+e2fsck will correct. They are used as a regression test for e2fsck.
+
+The test_script program will automatically run e2fsck against the
+filesystem images. It will run them two times, and display the exit
+status for each run. The meaning of the exit status codes are as
+follows:
+
+ 0 No filesystem errors were detected
+ 1 Filesystem errors detected, but corrected
+ 2 System should be rebooted
+ 4 Filesystem errors left uncorrected
+ 8 Operational error (generally means internal error,
+ or filesystem error that the e2fsck was not
+ prepared to deal with)
+ 16 Usage or syntax error
+
+During the regression test, the first exit code should be 1, and the
+second exit code should be 0. In other words, all (with one
+exception) of the test filesystems in this directory have some sort of
+filesystem corruption, which e2fsck should fix on the first pass.
+After the first pass, e2fsck should leave a fully consistent
+filesystem with no detectable errors found in the second pass. The
+exception is the okgroup.img filesystem, which contains no errors, and
+so both exit codes should be 0.
+
+NOTE: It appears that at least some versions of the original e2fsck do
+not exit with an exit status code of 1 after correcting filesystem
+errors. So if you modify the test_script to try running these
+filesystems against the original e2fsck, you will have to inspect the
+test_script.log file manually.
+
+--------------------------------------------------------------
+Here's a one-line descriptions of the various test images in this
+directory:
+
+baddir.img Filesystem with a corrupted directory
+badbblocks.img Filesystem with illegal blocks in the bad block inode.
+badinode.img Filesystem with various different corrupted inode
+ entries.
+badlkcnt.img Filesystem with deleted files with non-zero link count
+badroot.img Filesystem with a file for a root directory
+badtable.img Filesystem with blocks shared between the bitmaps and
+ inode table blocks and the bad block inode
+bbfile.img Filesystem with files containing bad blocks
+bitmaps.img Filesystem with corrupted inode and block bitmaps
+dirlink.img Filesystem with a hard link to a directory
+dup.img Filesystem with blocks claimed by two different files
+dup2.img Filesystem with blocks claimed by three different files
+dupfsblks.img Filesystem with blocks claimed by a file and
+ inode/block bitmaps and inode tables
+dupsuper.img Filesystem with blocks claimed by a file and
+ the superblock / group descriptors
+end-bitmap.img Filesystem with corruption at the end of the block
+ bitmap
+expand.img Tests e2fsck's ability to expand lost+found if
+ necessary
+lpf.img Filesystem with disconnected files and no /lost+found
+ directory
+mke2fs2b.img Filesystem with corruption similar to that
+ created by mke2fs version 0.2b
+noroot.img Filesystem with a deleted root directory
+okgroup.img Filesystem that's exactly 8193 blocks long
+ (otherwise OK)
+overfsblks.img Filesystem with overlapping inode and block bitmaps
+symlinks.img Filesystem with bad symlink sizes
+
+
diff --git a/tests/d_bad_ostype/expect b/tests/d_bad_ostype/expect
new file mode 100644
index 0000000..b00318c
--- /dev/null
+++ b/tests/d_bad_ostype/expect
@@ -0,0 +1 @@
+Filesystem OS type: (unknown os)
diff --git a/tests/d_bad_ostype/name b/tests/d_bad_ostype/name
new file mode 100644
index 0000000..3da887a
--- /dev/null
+++ b/tests/d_bad_ostype/name
@@ -0,0 +1 @@
+handle bad (negative) os_type
diff --git a/tests/d_bad_ostype/script b/tests/d_bad_ostype/script
new file mode 100644
index 0000000..fb4f68b
--- /dev/null
+++ b/tests/d_bad_ostype/script
@@ -0,0 +1,21 @@
+dd if=/dev/zero of=$TMPFILE bs=1k count=64 > /dev/null 2>&1
+$MKE2FS -q -b 1024 -o hurd $TMPFILE
+$DEBUGFS -w -R 'set_super_value creator_os 0xf0000000' $TMPFILE
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed | grep 'Filesystem OS type:' > $OUT
+
+rm -f $TMPFILE
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+unset OUT EXP
diff --git a/tests/d_corrupt_journal_nr_users/expect b/tests/d_corrupt_journal_nr_users/expect
new file mode 100644
index 0000000..656d35c
--- /dev/null
+++ b/tests/d_corrupt_journal_nr_users/expect
@@ -0,0 +1,101 @@
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
+Default mount options: user_xattr acl
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 512
+Block count: 2048
+Reserved block count: 102
+Free blocks: 982
+Free inodes: 501
+First block: 0
+Block size: 4096
+Fragment size: 4096
+Group descriptor size: 64
+Blocks per group: 32768
+Fragments per group: 32768
+Inodes per group: 512
+Inode blocks per group: 32
+Flex block group size: 16
+Mount count: 0
+Check interval: 0 (<none>)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Checksum type: crc32c
+Journal features: (none)
+Total journal size: 4096k
+Total journal blocks: 1024
+Max transaction length: 1024
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+Journal number of users: 9999
+Journal users: <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+ <none>
+
+
+Group 0: (Blocks 0-2047)
+ Primary superblock at 0, Group descriptors at 1-1
+ Block bitmap at 2 (+2)
+ Inode bitmap at 18 (+18)
+ Inode table at 34-65 (+34)
+ 982 free blocks, 501 free inodes, 2 directories, 501 unused inodes
+ Free blocks: 1066-2047
+ Free inodes: 12-512
diff --git a/tests/d_corrupt_journal_nr_users/image.gz b/tests/d_corrupt_journal_nr_users/image.gz
new file mode 100644
index 0000000..1fc32ed
--- /dev/null
+++ b/tests/d_corrupt_journal_nr_users/image.gz
Binary files differ
diff --git a/tests/d_corrupt_journal_nr_users/name b/tests/d_corrupt_journal_nr_users/name
new file mode 100644
index 0000000..24be3be
--- /dev/null
+++ b/tests/d_corrupt_journal_nr_users/name
@@ -0,0 +1 @@
+journal superblock corrupted, nr_users too high
diff --git a/tests/d_corrupt_journal_nr_users/script b/tests/d_corrupt_journal_nr_users/script
new file mode 100644
index 0000000..683cd48
--- /dev/null
+++ b/tests/d_corrupt_journal_nr_users/script
@@ -0,0 +1,25 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+EXP=$test_dir/expect
+OUT=$test_name.log
+gunzip < $IMAGE > $TMPFILE
+
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
diff --git a/tests/d_dumpe2fs_group_only/expect b/tests/d_dumpe2fs_group_only/expect
new file mode 100644
index 0000000..52610e6
--- /dev/null
+++ b/tests/d_dumpe2fs_group_only/expect
@@ -0,0 +1,51 @@
+Creating filesystem with 1048576 4k blocks and 262144 inodes
+Superblock backups stored on blocks:
+ 32768, 98304, 163840, 229376, 294912, 819200, 884736
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/262144 files (0.0% non-contiguous), 34894/1048576 blocks
+Exit status is 0
+dumpe2fs output
+
+group:block:super:gdt:bbitmap:ibitmap:itable
+0:0:0:1-1:257:273:289
+1:32768:32768:32769-32769:258:274:801
+2:65536:-1:-1:259:275:1313
+3:98304:98304:98305-98305:260:276:1825
+4:131072:-1:-1:261:277:2337
+5:163840:163840:163841-163841:262:278:2849
+6:196608:-1:-1:263:279:3361
+7:229376:229376:229377-229377:264:280:3873
+8:262144:-1:-1:265:281:4385
+9:294912:294912:294913-294913:266:282:4897
+10:327680:-1:-1:267:283:5409
+11:360448:-1:-1:268:284:5921
+12:393216:-1:-1:269:285:6433
+13:425984:-1:-1:270:286:6945
+14:458752:-1:-1:271:287:7457
+15:491520:-1:-1:272:288:7969
+16:524288:-1:-1:524288:524304:524320
+17:557056:-1:-1:524289:524305:524832
+18:589824:-1:-1:524290:524306:525344
+19:622592:-1:-1:524291:524307:525856
+20:655360:-1:-1:524292:524308:526368
+21:688128:-1:-1:524293:524309:526880
+22:720896:-1:-1:524294:524310:527392
+23:753664:-1:-1:524295:524311:527904
+24:786432:-1:-1:524296:524312:528416
+25:819200:819200:819201-819201:524297:524313:528928
+26:851968:-1:-1:524298:524314:529440
+27:884736:884736:884737-884737:524299:524315:529952
+28:917504:-1:-1:524300:524316:530464
+29:950272:-1:-1:524301:524317:530976
+30:983040:-1:-1:524302:524318:531488
+31:1015808:-1:-1:524303:524319:532000
diff --git a/tests/d_dumpe2fs_group_only/name b/tests/d_dumpe2fs_group_only/name
new file mode 100644
index 0000000..096c020
--- /dev/null
+++ b/tests/d_dumpe2fs_group_only/name
@@ -0,0 +1 @@
+dumpe2fs group only mode
diff --git a/tests/d_dumpe2fs_group_only/script b/tests/d_dumpe2fs_group_only/script
new file mode 100644
index 0000000..01373b9
--- /dev/null
+++ b/tests/d_dumpe2fs_group_only/script
@@ -0,0 +1,44 @@
+if [ $(uname -s) = "Darwin" ]; then
+ # creates a 4GB filesystem
+ echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
+ return 0
+fi
+
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 1048576 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "dumpe2fs output" >> $OUT.new
+$DUMPE2FS -g $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/d_fallocate/expect.gz b/tests/d_fallocate/expect.gz
new file mode 100644
index 0000000..3e6ffc3
--- /dev/null
+++ b/tests/d_fallocate/expect.gz
Binary files differ
diff --git a/tests/d_fallocate/name b/tests/d_fallocate/name
new file mode 100644
index 0000000..72d0ed3
--- /dev/null
+++ b/tests/d_fallocate/name
@@ -0,0 +1 @@
+fallocate sparse files and big files
diff --git a/tests/d_fallocate/script b/tests/d_fallocate/script
new file mode 100644
index 0000000..36fa019
--- /dev/null
+++ b/tests/d_fallocate/script
@@ -0,0 +1,166 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP
+else
+ EXP=$test_dir/expect
+fi
+
+cat > $TMPFILE.conf << ENDL
+[fs_types]
+ext4 = {
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr,^has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit
+ blocksize = 1024
+ inode_size = 256
+ inode_ratio = 16384
+}
+ENDL
+MKE2FS_CONFIG=$TMPFILE.conf $MKE2FS -F -o Linux -b 1024 -O ^bigalloc -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+rm -f $TMPFILE.conf
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write files" >> $OUT.new
+make_file() {
+ name="$1"
+ start="$2"
+ flag="$3"
+
+ cat << ENDL
+write /dev/null $name
+sif /$name size 40960
+eo /$name
+set_bmap $flag 10 $((start + 10))
+set_bmap $flag 13 $((start + 13))
+set_bmap $flag 26 $((start + 26))
+set_bmap $flag 29 $((start + 29))
+ec
+sif /$name blocks 8
+setb $((start + 10))
+setb $((start + 13))
+setb $((start + 26))
+setb $((start + 29))
+ENDL
+}
+
+#Files we create:
+# a: fallocate a 40k file
+# b*: falloc sparse file starting at b*
+# c*: falloc spare file ending at c*
+# d: midcluster to midcluster, surrounding sparse
+# e: partial middle cluster alloc
+# f: one big file
+# g*: falloc sparse init file starting at g*
+# h*: falloc sparse init file ending at h*
+# i: midcluster to midcluster, surrounding sparse init
+# j: partial middle cluster alloc
+# k: one big init file
+base=5000
+cat > $TMPFILE.cmd << ENDL
+write /dev/null a
+sif /a size 40960
+fallocate /a 0 39
+ENDL
+echo "ex /a" >> $TMPFILE.cmd2
+
+make_file sample $base --uninit >> $TMPFILE.cmd
+echo "ex /sample" >> $TMPFILE.cmd2
+base=10000
+
+for i in 8 9 10 11 12 13 14 15; do
+ make_file b$i $(($base + (40 * ($i - 8)))) --uninit >> $TMPFILE.cmd
+ echo "fallocate /b$i $i 39" >> $TMPFILE.cmd
+ echo "ex /b$i" >> $TMPFILE.cmd2
+done
+
+for i in 24 25 26 27 28 29 30 31; do
+ make_file c$i $(($base + 320 + (40 * ($i - 24)))) --uninit >> $TMPFILE.cmd
+ echo "fallocate /c$i 0 $i" >> $TMPFILE.cmd
+ echo "ex /c$i" >> $TMPFILE.cmd2
+done
+
+make_file d $(($base + 640)) --uninit >> $TMPFILE.cmd
+echo "fallocate /d 4 35" >> $TMPFILE.cmd
+echo "ex /d" >> $TMPFILE.cmd2
+
+make_file e $(($base + 680)) --uninit >> $TMPFILE.cmd
+echo "fallocate /e 19 20" >> $TMPFILE.cmd
+echo "ex /e" >> $TMPFILE.cmd2
+
+cat >> $TMPFILE.cmd << ENDL
+write /dev/null f
+sif /f size 1024
+eo /f
+set_bmap --uninit 0 9000
+ec
+sif /f blocks 2
+setb 9000
+fallocate /f 0 8999
+ENDL
+echo "ex /f" >> $TMPFILE.cmd2
+
+# Now do it again, but with initialized blocks
+base=20000
+for i in 8 9 10 11 12 13 14 15; do
+ make_file g$i $(($base + (40 * ($i - 8)))) >> $TMPFILE.cmd
+ echo "fallocate /g$i $i 39" >> $TMPFILE.cmd
+ echo "ex /g$i" >> $TMPFILE.cmd2
+done
+
+for i in 24 25 26 27 28 29 30 31; do
+ make_file h$i $(($base + 320 + (40 * ($i - 24)))) >> $TMPFILE.cmd
+ echo "fallocate /h$i 0 $i" >> $TMPFILE.cmd
+ echo "ex /h$i" >> $TMPFILE.cmd2
+done
+
+make_file i $(($base + 640)) >> $TMPFILE.cmd
+echo "fallocate /i 4 35" >> $TMPFILE.cmd
+echo "ex /i" >> $TMPFILE.cmd2
+
+make_file j $(($base + 680)) >> $TMPFILE.cmd
+echo "fallocate /j 19 20" >> $TMPFILE.cmd
+echo "ex /j" >> $TMPFILE.cmd2
+
+cat >> $TMPFILE.cmd << ENDL
+write /dev/null k
+sif /k size 1024
+eo /k
+set_bmap 0 19000
+ec
+sif /k blocks 2
+setb 19000
+fallocate /k 0 8999
+sif /k size 9216000
+ENDL
+echo "ex /k" >> $TMPFILE.cmd2
+
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $TMPFILE.cmd2 $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+rm -f $EXP
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/d_fallocate_bigalloc/expect.gz b/tests/d_fallocate_bigalloc/expect.gz
new file mode 100644
index 0000000..167c069
--- /dev/null
+++ b/tests/d_fallocate_bigalloc/expect.gz
Binary files differ
diff --git a/tests/d_fallocate_bigalloc/name b/tests/d_fallocate_bigalloc/name
new file mode 100644
index 0000000..915645c
--- /dev/null
+++ b/tests/d_fallocate_bigalloc/name
@@ -0,0 +1 @@
+fallocate sparse files and big files with bigalloc
diff --git a/tests/d_fallocate_bigalloc/script b/tests/d_fallocate_bigalloc/script
new file mode 100644
index 0000000..d4bf749
--- /dev/null
+++ b/tests/d_fallocate_bigalloc/script
@@ -0,0 +1,168 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP
+else
+ EXP=$test_dir/expect
+fi
+
+cat > $TMPFILE.conf << ENDL
+[fs_types]
+ext4 = {
+ cluster_size = 8192
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr,^has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit
+ blocksize = 1024
+ inode_size = 256
+ inode_ratio = 16384
+}
+ENDL
+MKE2FS_CONFIG=$TMPFILE.conf $MKE2FS -F -o Linux -b 1024 -O bigalloc -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+rm -f $TMPFILE.conf
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write files" >> $OUT.new
+make_file() {
+ name="$1"
+ start="$2"
+ flag="$3"
+
+ cat << ENDL
+write /dev/null $name
+sif /$name size 40960
+eo /$name
+set_bmap $flag 10 $((start + 10))
+set_bmap $flag 13 $((start + 13))
+set_bmap $flag 26 $((start + 26))
+set_bmap $flag 29 $((start + 29))
+ec
+sif /$name blocks 32
+setb $((start + 10))
+setb $((start + 13))
+setb $((start + 26))
+setb $((start + 29))
+ENDL
+}
+
+#Files we create:
+# a: fallocate a 40k file
+# b*: falloc sparse file starting at b*
+# c*: falloc spare file ending at c*
+# d: midcluster to midcluster, surrounding sparse
+# e: partial middle cluster alloc
+# f: one big file
+# g*: falloc sparse init file starting at g*
+# h*: falloc sparse init file ending at h*
+# i: midcluster to midcluster, surrounding sparse init
+# j: partial middle cluster alloc
+# k: one big init file
+base=5000
+cat > $TMPFILE.cmd << ENDL
+write /dev/null a
+sif /a size 40960
+fallocate /a 0 39
+ENDL
+echo "ex /a" >> $TMPFILE.cmd2
+
+make_file sample $base --uninit >> $TMPFILE.cmd
+echo "ex /sample" >> $TMPFILE.cmd2
+base=10000
+
+for i in 8 9 10 11 12 13 14 15; do
+ make_file b$i $(($base + (40 * ($i - 8)))) --uninit >> $TMPFILE.cmd
+ echo "fallocate /b$i $i 39" >> $TMPFILE.cmd
+ echo "ex /b$i" >> $TMPFILE.cmd2
+done
+
+for i in 24 25 26 27 28 29 30 31; do
+ make_file c$i $(($base + 320 + (40 * ($i - 24)))) --uninit >> $TMPFILE.cmd
+ echo "fallocate /c$i 0 $i" >> $TMPFILE.cmd
+ echo "ex /c$i" >> $TMPFILE.cmd2
+done
+
+make_file d $(($base + 640)) --uninit >> $TMPFILE.cmd
+echo "fallocate /d 4 35" >> $TMPFILE.cmd
+echo "ex /d" >> $TMPFILE.cmd2
+
+make_file e $(($base + 680)) --uninit >> $TMPFILE.cmd
+echo "fallocate /e 19 20" >> $TMPFILE.cmd
+echo "ex /e" >> $TMPFILE.cmd2
+
+cat >> $TMPFILE.cmd << ENDL
+write /dev/null f
+sif /f size 1024
+eo /f
+set_bmap --uninit 0 9000
+ec
+sif /f blocks 16
+setb 9000
+fallocate /f 0 8999
+ENDL
+echo "ex /f" >> $TMPFILE.cmd2
+
+# Now do it again, but with initialized blocks
+base=20000
+for i in 8 9 10 11 12 13 14 15; do
+ make_file g$i $(($base + (40 * ($i - 8)))) >> $TMPFILE.cmd
+ echo "fallocate /g$i $i 39" >> $TMPFILE.cmd
+ echo "ex /g$i" >> $TMPFILE.cmd2
+done
+
+for i in 24 25 26 27 28 29 30 31; do
+ make_file h$i $(($base + 320 + (40 * ($i - 24)))) >> $TMPFILE.cmd
+ echo "fallocate /h$i 0 $i" >> $TMPFILE.cmd
+ echo "ex /h$i" >> $TMPFILE.cmd2
+done
+
+make_file i $(($base + 640)) >> $TMPFILE.cmd
+echo "fallocate /i 4 35" >> $TMPFILE.cmd
+echo "ex /i" >> $TMPFILE.cmd2
+
+make_file j $(($base + 680)) >> $TMPFILE.cmd
+echo "fallocate /j 19 20" >> $TMPFILE.cmd
+echo "ex /j" >> $TMPFILE.cmd2
+
+cat >> $TMPFILE.cmd << ENDL
+write /dev/null k
+sif /k size 1024
+eo /k
+set_bmap 0 19000
+ec
+sif /k blocks 16
+setb 19000
+fallocate /k 0 8999
+sif /k size 9216000
+ENDL
+echo "ex /k" >> $TMPFILE.cmd2
+
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $TMPFILE.cmd2 $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+rm -f $EXP
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/d_fallocate_blkmap/expect b/tests/d_fallocate_blkmap/expect
new file mode 100644
index 0000000..f588511
--- /dev/null
+++ b/tests/d_fallocate_blkmap/expect
@@ -0,0 +1,58 @@
+Creating filesystem with 65536 1k blocks and 4096 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 2340/65536 blocks
+Exit status is 0
+debugfs write files
+debugfs: stat /a
+Inode: 12 Type: regular Mode: 0666 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 40960
+File ACL: 0
+Links: 1 Blockcount: 82
+Fragment: Address: 0 Number: 0 Size: 0
+Size of extra inode fields: 32
+BLOCKS:
+(0-1):1312-1313, (2-11):8000-8009, (IND):8010, (12-39):8011-8038
+TOTAL: 41
+
+debugfs: stat /b
+Inode: 13 Type: regular Mode: 0666 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 10240000
+File ACL: 0
+Links: 1 Blockcount: 20082
+Fragment: Address: 0 Number: 0 Size: 0
+Size of extra inode fields: 32
+BLOCKS:
+(0-11):10000-10011, (IND):10012, (12-267):10013-10268, (DIND):10269, (IND):10270, (268-523):10271-10526, (IND):10527, (524-779):10528-10783, (IND):10784, (780-1035):10785-11040, (IND):11041, (1036-1291):11042-11297, (IND):11298, (1292-1547):11299-11554, (IND):11555, (1548-1803):11556-11811, (IND):11812, (1804-2059):11813-12068, (IND):12069, (2060-2315):12070-12325, (IND):12326, (2316-2571):12327-12582, (IND):12583, (2572-2827):12584-12839, (IND):12840, (2828-3083):12841-13096, (IND):13097, (3084-3339):13098-13353, (IND):13354, (3340-3595):13355-13610, (IND):13611, (3596-3851):13612-13867, (IND):13868, (3852-4107):13869-14124, (IND):14125, (4108-4363):14126-14381, (IND):14382, (4364-4619):14383-14638, (IND):14639, (4620-4875):14640-14895, (IND):14896, (4876-5131):14897-15152, (IND):15153, (5132-5387):15154-15409, (IND):15410, (5388-5643):15411-15666, (IND):15667, (5644-5899):15668-15923, (IND):15924, (5900-6155):15925-16180, (IND):16181, (6156-6411):16182-16437, (IND):16438, (6412-6667):16439-16694, (IND):16695, (6668-6923):16696-16951, (IND):16952, (6924-7179):16953-17208, (IND):17209, (7180-7435):17210-17465, (IND):17466, (7436-7691):17467-17722, (IND):17723, (7692-7947):17724-17979, (IND):17980, (7948-8203):17981-18236, (IND):18237, (8204-8459):18238-18493, (IND):18494, (8460-8715):18495-18750, (IND):18751, (8716-8971):18752-19007, (IND):19008, (8972-9227):19009-19264, (IND):19265, (9228-9483):19266-19521, (IND):19522, (9484-9739):19523-19778, (IND):19779, (9740-9995):19780-20035, (IND):20036, (9996-9999):20037-20040
+TOTAL: 10041
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (6841, counted=6840).
+Fix? yes
+
+Free blocks count wrong for group #1 (1551, counted=1550).
+Fix? yes
+
+Free blocks count wrong (53116, counted=53114).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/4096 files (7.7% non-contiguous), 12422/65536 blocks
+Exit status is 1
diff --git a/tests/d_fallocate_blkmap/name b/tests/d_fallocate_blkmap/name
new file mode 100644
index 0000000..ba2b61d
--- /dev/null
+++ b/tests/d_fallocate_blkmap/name
@@ -0,0 +1 @@
+fallocate sparse files and big files on a blockmap fs
diff --git a/tests/d_fallocate_blkmap/script b/tests/d_fallocate_blkmap/script
new file mode 100644
index 0000000..2ec319f
--- /dev/null
+++ b/tests/d_fallocate_blkmap/script
@@ -0,0 +1,75 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+cat > $TMPFILE.conf << ENDL
+[fs_types]
+ext4 = {
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr,^has_journal,^extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,^64bit
+ blocksize = 1024
+ inode_size = 256
+ inode_ratio = 16384
+}
+ENDL
+MKE2FS_CONFIG=$TMPFILE.conf $MKE2FS -F -o Linux -b 1024 -O ^bigalloc -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+rm -f $TMPFILE.conf
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write files" >> $OUT.new
+#Files we create:
+# a: fallocate a 40k file
+# k: one big file
+base=5000
+cat > $TMPFILE.cmd << ENDL
+write /dev/null a
+sif /a bmap[2] 8000
+sif /a size 40960
+sif /a i_blocks 2
+setb 8000
+fallocate /a 0 39
+
+write /dev/null b
+sif /b size 10240000
+sif /b bmap[0] 10000
+sif /b i_blocks 2
+setb 10000
+fallocate /b 0 9999
+ENDL
+echo "stat /a" >> $TMPFILE.cmd2
+echo "stat /b" >> $TMPFILE.cmd2
+
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e '/^.*time:.*$/d' $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $TMPFILE.cmd2 $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/d_inline_dump/expect b/tests/d_inline_dump/expect
new file mode 100644
index 0000000..db9d522
--- /dev/null
+++ b/tests/d_inline_dump/expect
@@ -0,0 +1,95 @@
+*** long file
+Inode: 13 Type: regular Mode: 0644 Flags: 0x10000000
+Generation: 3289262644 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 80
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6b4:c72e3c00 -- Tue Jul 22 20:16:52 2014
+ atime: 0x53cec3c8:4a3fd000 -- Tue Jul 22 20:04:24 2014
+ mtime: 0x53cec3c8:4c281800 -- Tue Jul 22 20:04:24 2014
+crtime: 0x53cec3c8:4a3fd000 -- Tue Jul 22 20:04:24 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (20)
+ user.a (1) = "b"
+Size of inline data: 80
+*** short file
+Inode: 18 Type: regular Mode: 0644 Flags: 0x10000000
+Generation: 3842229473 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 20
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6b4:cafecc00 -- Tue Jul 22 20:16:52 2014
+ atime: 0x53cec443:bda4d400 -- Tue Jul 22 20:06:27 2014
+ mtime: 0x53cec443:bf8d1c00 -- Tue Jul 22 20:06:27 2014
+crtime: 0x53cec443:bda4d400 -- Tue Jul 22 20:06:27 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (0)
+ user.a (1) = "b"
+Size of inline data: 60
+
+*** long dir
+Inode: 16 Type: directory Mode: 0755 Flags: 0x10000000
+Generation: 3842229469 Version: 0x00000000:00000004
+User: 0 Group: 0 Size: 132
+File ACL: 7
+Links: 2 Blockcount: 8
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6e3:27eac000 -- Tue Jul 22 20:17:39 2014
+ atime: 0x53cec410:ed53dc00 -- Tue Jul 22 20:05:36 2014
+ mtime: 0x53cec42b:241a3000 -- Tue Jul 22 20:06:03 2014
+crtime: 0x53cec3fe:c8226000 -- Tue Jul 22 20:05:18 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (72)
+ user.a (1) = "b"
+Size of inline data: 132
+*** short dir
+Inode: 20 Type: directory Mode: 0755 Flags: 0x10000000
+Generation: 3710818931 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 60
+File ACL: 0
+Links: 2 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6b4:ca0aa800 -- Tue Jul 22 20:16:52 2014
+ atime: 0x53cec477:9a5ba000 -- Tue Jul 22 20:07:19 2014
+ mtime: 0x53cec477:9a5ba000 -- Tue Jul 22 20:07:19 2014
+crtime: 0x53cec477:9a5ba000 -- Tue Jul 22 20:07:19 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (0)
+ user.a (1) = "b"
+Size of inline data: 60
+
+*** long link
+Inode: 12 Type: symlink Mode: 0777 Flags: 0x10000000
+Generation: 3289262643 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 80
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec47f:724db800 -- Tue Jul 22 20:07:27 2014
+ atime: 0x53cec665:27eac000 -- Tue Jul 22 20:15:33 2014
+ mtime: 0x53cec3b6:82841c00 -- Tue Jul 22 20:04:06 2014
+crtime: 0x53cec3b6:82841c00 -- Tue Jul 22 20:04:06 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (20)
+Fast link dest: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+*** short link
+Inode: 19 Type: symlink Mode: 0777 Flags: 0x0
+Generation: 3842229474 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 20
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec44c:a1fcc000 -- Tue Jul 22 20:06:36 2014
+ atime: 0x53cec44d:11fb8400 -- Tue Jul 22 20:06:37 2014
+ mtime: 0x53cec44c:a1fcc000 -- Tue Jul 22 20:06:36 2014
+crtime: 0x53cec44c:a1fcc000 -- Tue Jul 22 20:06:36 2014
+Size of extra inode fields: 28
+Fast link dest: "xxxxxxxxxxxxxxxxxxxx"
+*** end test
diff --git a/tests/d_inline_dump/image.gz b/tests/d_inline_dump/image.gz
new file mode 100644
index 0000000..598a495
--- /dev/null
+++ b/tests/d_inline_dump/image.gz
Binary files differ
diff --git a/tests/d_inline_dump/name b/tests/d_inline_dump/name
new file mode 100644
index 0000000..dfc1a9c
--- /dev/null
+++ b/tests/d_inline_dump/name
@@ -0,0 +1 @@
+debugfs dump inline data test
diff --git a/tests/d_inline_dump/script b/tests/d_inline_dump/script
new file mode 100644
index 0000000..3193f78
--- /dev/null
+++ b/tests/d_inline_dump/script
@@ -0,0 +1,43 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+ZIMAGE=$test_dir/image.gz
+gzip -d < $ZIMAGE > $TMPFILE
+
+echo "*** long file" > $OUT
+$DEBUGFS -R 'stat /file' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short file" >> $OUT
+$DEBUGFS -R 'stat /shortfile' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo >> $OUT
+
+echo "*** long dir" >> $OUT
+$DEBUGFS -R 'stat /dir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short dir" >> $OUT
+$DEBUGFS -R 'stat /shortdir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo >> $OUT
+
+echo "*** long link" >> $OUT
+$DEBUGFS -R 'stat /link' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short link" >> $OUT
+$DEBUGFS -R 'stat /shortlink' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+
+echo "*** end test" >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA ZIMAGE
diff --git a/tests/d_loaddump/expect b/tests/d_loaddump/expect
new file mode 100644
index 0000000..de90526
--- /dev/null
+++ b/tests/d_loaddump/expect
@@ -0,0 +1,18 @@
+debugfs load/dump test
+mke2fs -Fq -b 1024 test.img 512
+Exit status is 0
+debugfs -R ''write d_loaddump.tmp test_data'' -w test.img
+Allocated inode: 12
+Exit status is 0
+e2fsck -yf -N test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/64 files (0.0% non-contiguous), 166/512 blocks
+Exit status is 0
+debugfs -R ''dump test_data d_loaddump.ver.tmp'' test.img
+Exit status is 0
+cmp d_loaddump.tmp d_loaddump.ver.tmp
+Exit status is 0
diff --git a/tests/d_loaddump/name b/tests/d_loaddump/name
new file mode 100644
index 0000000..025ec3b
--- /dev/null
+++ b/tests/d_loaddump/name
@@ -0,0 +1 @@
+debugfs load/dump test
diff --git a/tests/d_loaddump/script b/tests/d_loaddump/script
new file mode 100644
index 0000000..ace3372
--- /dev/null
+++ b/tests/d_loaddump/script
@@ -0,0 +1,67 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+TEST_DATA=$test_name.tmp
+VERIFY_DATA=$test_name.ver.tmp
+
+echo "debugfs load/dump test" > $OUT.new
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT.new
+
+$MKE2FS -Fq -b 1024 $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+dd if=$TEST_BITS of=$TEST_DATA bs=128k count=1 conv=sync > /dev/null 2>&1
+echo "file fragment odd size" >> $TEST_DATA
+
+echo "debugfs -R ''write $TEST_DATA test_data'' -w test.img" >> $OUT.new
+$DEBUGFS -R "write $TEST_DATA test_data" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo e2fsck $VERIFY_FSCK_OPT -N test_filesys >> $OUT.new
+$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs -R ''dump test_data $VERIFY_DATA'' test.img" >> $OUT.new
+$DEBUGFS -R "dump test_data $VERIFY_DATA" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cmp $TEST_DATA $VERIFY_DATA" >> $OUT.new
+cmp $TEST_DATA $VERIFY_DATA >>$OUT.new
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+
+#
+# Do the verification
+#
+
+if [ "$SKIP_UNLINK" != "true" ]; then
+ rm -f $VERIFY_DATA $TEST_DATA $TMPFILE $OUT.new
+else
+ echo "TMPFILE=$TMPFILE"
+fi
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
diff --git a/tests/d_punch/expect b/tests/d_punch/expect
new file mode 100644
index 0000000..b13462b
--- /dev/null
+++ b/tests/d_punch/expect
@@ -0,0 +1,176 @@
+Creating filesystem with 65536 1k blocks and 4096 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 2345/65536 blocks
+Exit status is 0
+debugfs write files
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+debugfs: ex /sample
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1323 0
+ 1/ 1 1/ 5 0 - 9 1313 - 1322 10 Uninit
+ 1/ 1 2/ 5 11 - 12 1324 - 1325 2 Uninit
+ 1/ 1 3/ 5 14 - 25 1327 - 1338 12 Uninit
+ 1/ 1 4/ 5 27 - 28 1340 - 1341 2 Uninit
+ 1/ 1 5/ 5 30 - 39 1343 - 1352 10 Uninit
+debugfs: ex /b8
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1390 0
+ 1/ 1 1/ 4 0 - 0 1326 - 1326 1 Uninit
+ 1/ 1 2/ 4 1 - 1 1339 - 1339 1 Uninit
+ 1/ 1 3/ 4 2 - 2 1342 - 1342 1 Uninit
+ 1/ 1 4/ 4 3 - 7 1353 - 1357 5 Uninit
+debugfs: ex /b9
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1368 0
+ 1/ 1 1/ 1 0 - 8 1358 - 1366 9 Uninit
+debugfs: ex /b10
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1378 0
+ 1/ 1 1/ 2 0 - 0 1367 - 1367 1 Uninit
+ 1/ 1 2/ 2 1 - 9 1369 - 1377 9 Uninit
+debugfs: ex /b11
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1389 0
+ 1/ 1 1/ 1 0 - 9 1379 - 1388 10 Uninit
+debugfs: ex /b12
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1401 0
+ 1/ 1 1/ 2 0 - 9 1391 - 1400 10 Uninit
+ 1/ 1 2/ 2 11 - 11 1402 - 1402 1 Uninit
+debugfs: ex /b13
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1413 0
+ 1/ 1 1/ 2 0 - 9 1403 - 1412 10 Uninit
+ 1/ 1 2/ 2 11 - 12 1414 - 1415 2 Uninit
+debugfs: ex /b14
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1426 0
+ 1/ 1 1/ 2 0 - 9 1416 - 1425 10 Uninit
+ 1/ 1 2/ 2 11 - 12 1427 - 1428 2 Uninit
+debugfs: ex /b15
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1439 0
+ 1/ 1 1/ 3 0 - 9 1429 - 1438 10 Uninit
+ 1/ 1 2/ 3 11 - 12 1440 - 1441 2 Uninit
+ 1/ 1 3/ 3 14 - 14 1443 - 1443 1 Uninit
+debugfs: ex /c24
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 25 - 4294967295 1453 4294967271
+ 1/ 1 1/ 3 25 - 25 1468 - 1468 1 Uninit
+ 1/ 1 2/ 3 27 - 28 1470 - 1471 2 Uninit
+ 1/ 1 3/ 3 30 - 39 1473 - 1482 10 Uninit
+debugfs: ex /c25
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 27 - 4294967295 1483 4294967269
+ 1/ 1 1/ 2 27 - 28 1485 - 1486 2 Uninit
+ 1/ 1 2/ 2 30 - 39 1488 - 1497 10 Uninit
+debugfs: ex /c26
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 27 - 4294967295 1484 4294967269
+ 1/ 1 1/ 2 27 - 28 1498 - 1499 2 Uninit
+ 1/ 1 2/ 2 30 - 39 1501 - 1510 10 Uninit
+debugfs: ex /c27
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 28 - 4294967295 1487 4294967268
+ 1/ 1 1/ 2 28 - 28 1512 - 1512 1 Uninit
+ 1/ 1 2/ 2 30 - 39 1514 - 1523 10 Uninit
+debugfs: ex /c28
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 30 - 4294967295 1500 4294967266
+ 1/ 1 1/ 1 30 - 39 1526 - 1535 10 Uninit
+debugfs: ex /c29
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 30 - 4294967295 1511 4294967266
+ 1/ 1 1/ 1 30 - 39 1537 - 1546 10 Uninit
+debugfs: ex /c30
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 31 - 4294967295 1513 4294967265
+ 1/ 1 1/ 1 31 - 39 1549 - 1557 9 Uninit
+debugfs: ex /c31
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 32 - 4294967295 1524 4294967264
+ 1/ 1 1/ 1 32 - 39 1560 - 1567 8 Uninit
+debugfs: ex /d
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1525 0
+ 1/ 1 1/ 3 0 - 0 1442 - 1442 1 Uninit
+ 1/ 1 2/ 3 1 - 3 1444 - 1446 3 Uninit
+ 1/ 1 3/ 3 36 - 39 1573 - 1576 4 Uninit
+debugfs: ex /e
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1547 0
+ 1/ 1 1/ 11 0 - 5 1447 - 1452 6 Uninit
+ 1/ 1 2/ 11 6 - 9 1454 - 1457 4 Uninit
+ 1/ 1 3/ 11 11 - 12 1459 - 1460 2 Uninit
+ 1/ 1 4/ 11 14 - 18 1462 - 1466 5 Uninit
+ 1/ 1 5/ 11 21 - 21 1472 - 1472 1 Uninit
+ 1/ 1 6/ 11 22 - 22 1536 - 1536 1 Uninit
+ 1/ 1 7/ 11 23 - 23 1548 - 1548 1 Uninit
+ 1/ 1 8/ 11 24 - 25 1558 - 1559 2 Uninit
+ 1/ 1 9/ 11 27 - 28 1569 - 1570 2 Uninit
+ 1/ 1 10/ 11 30 - 30 1572 - 1572 1 Uninit
+ 1/ 1 11/ 11 31 - 39 1577 - 1585 9 Uninit
+debugfs: ex /f
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 2 0 - 0 9000 - 9000 1 Uninit
+ 0/ 0 2/ 2 8999 - 8999 17999 - 17999 1 Uninit
+Pass 1: Checking inodes, blocks, and sizes
+Inode 15 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 16 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 17 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 18 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 19 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 20 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 21 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 22 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 23 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 24 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 25 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 26 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 27 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 28 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 29 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 30 extent tree (at level 1) could be shorter. Optimize? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #1 (7934, counted=7933).
+Fix? yes
+
+Free blocks count wrong (62939, counted=62938).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 32/4096 files (43.8% non-contiguous), 2598/65536 blocks
+Exit status is 1
diff --git a/tests/d_punch/name b/tests/d_punch/name
new file mode 100644
index 0000000..724639f
--- /dev/null
+++ b/tests/d_punch/name
@@ -0,0 +1 @@
+punch sparse files and big files
diff --git a/tests/d_punch/script b/tests/d_punch/script
new file mode 100644
index 0000000..e0eee76
--- /dev/null
+++ b/tests/d_punch/script
@@ -0,0 +1,120 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+cat > $TMPFILE.conf << ENDL
+[fs_types]
+ext4 = {
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr,^has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit
+ blocksize = 1024
+ inode_size = 256
+ inode_ratio = 16384
+}
+ENDL
+MKE2FS_CONFIG=$TMPFILE.conf $MKE2FS -F -o Linux -b 1024 -O ^bigalloc -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+rm -f $TMPFILE.conf
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write files" >> $OUT.new
+make_file() {
+ name="$1"
+ start="$2"
+ flag="$3"
+
+ cat << ENDL
+write /dev/null $name
+fallocate /$name 0 39
+punch /$name 10 10
+punch /$name 13 13
+punch /$name 26 26
+punch /$name 29 29
+ENDL
+}
+
+#Files we create:
+# a: punch a 40k file
+# b*: punch sparse file starting at b*
+# c*: punch spare file ending at c*
+# d: midcluster to midcluster, surrounding sparse
+# e: partial middle cluster alloc
+# f: one big file
+base=5000
+cat > $TMPFILE.cmd << ENDL
+write /dev/null a
+fallocate /a 0 39
+punch /a 0 39
+ENDL
+echo "ex /a" >> $TMPFILE.cmd2
+
+make_file sample $base --uninit >> $TMPFILE.cmd
+echo "ex /sample" >> $TMPFILE.cmd2
+base=10000
+
+for i in 8 9 10 11 12 13 14 15; do
+ make_file b$i $(($base + (40 * ($i - 8)))) --uninit >> $TMPFILE.cmd
+ echo "punch /b$i $i 39" >> $TMPFILE.cmd
+ echo "ex /b$i" >> $TMPFILE.cmd2
+done
+
+for i in 24 25 26 27 28 29 30 31; do
+ make_file c$i $(($base + 320 + (40 * ($i - 24)))) --uninit >> $TMPFILE.cmd
+ echo "punch /c$i 0 $i" >> $TMPFILE.cmd
+ echo "ex /c$i" >> $TMPFILE.cmd2
+done
+
+make_file d $(($base + 640)) --uninit >> $TMPFILE.cmd
+echo "punch /d 4 35" >> $TMPFILE.cmd
+echo "ex /d" >> $TMPFILE.cmd2
+
+make_file e $(($base + 680)) --uninit >> $TMPFILE.cmd
+echo "punch /e 19 20" >> $TMPFILE.cmd
+echo "ex /e" >> $TMPFILE.cmd2
+
+cat >> $TMPFILE.cmd << ENDL
+write /dev/null f
+sif /f size 1024
+eo /f
+set_bmap --uninit 0 9000
+ec
+sif /f blocks 2
+setb 9000
+fallocate /f 0 8999
+punch /f 1 8998
+ENDL
+echo "ex /f" >> $TMPFILE.cmd2
+
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $TMPFILE.cmd2 $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/d_punch_bigalloc/expect b/tests/d_punch_bigalloc/expect
new file mode 100644
index 0000000..be841e6
--- /dev/null
+++ b/tests/d_punch_bigalloc/expect
@@ -0,0 +1,171 @@
+Creating filesystem with 65536 1k blocks and 4096 inodes
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (9.1% non-contiguous), 1144/65536 blocks
+Exit status is 0
+debugfs write files
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+debugfs: ex /sample
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1184 0
+ 1/ 1 1/ 5 0 - 9 1144 - 1153 10 Uninit
+ 1/ 1 2/ 5 11 - 12 1155 - 1156 2 Uninit
+ 1/ 1 3/ 5 14 - 25 1158 - 1169 12 Uninit
+ 1/ 1 4/ 5 27 - 28 1171 - 1172 2 Uninit
+ 1/ 1 5/ 5 30 - 39 1174 - 1183 10 Uninit
+debugfs: ex /b8
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1232 0
+ 1/ 1 1/ 1 0 - 7 1192 - 1199 8 Uninit
+debugfs: ex /b9
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1248 0
+ 1/ 1 1/ 1 0 - 8 1200 - 1208 9 Uninit
+debugfs: ex /b10
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1272 0
+ 1/ 1 1/ 1 0 - 9 1216 - 1225 10 Uninit
+debugfs: ex /b11
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1296 0
+ 1/ 1 1/ 2 0 - 7 1240 - 1247 8 Uninit
+ 1/ 1 2/ 2 8 - 9 1256 - 1257 2 Uninit
+debugfs: ex /b12
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1320 0
+ 1/ 1 1/ 3 0 - 7 1264 - 1271 8 Uninit
+ 1/ 1 2/ 3 8 - 9 1280 - 1281 2 Uninit
+ 1/ 1 3/ 3 11 - 11 1283 - 1283 1 Uninit
+debugfs: ex /b13
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1344 0
+ 1/ 1 1/ 3 0 - 7 1288 - 1295 8 Uninit
+ 1/ 1 2/ 3 8 - 9 1304 - 1305 2 Uninit
+ 1/ 1 3/ 3 11 - 12 1307 - 1308 2 Uninit
+debugfs: ex /b14
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1368 0
+ 1/ 1 1/ 3 0 - 7 1312 - 1319 8 Uninit
+ 1/ 1 2/ 3 8 - 9 1328 - 1329 2 Uninit
+ 1/ 1 3/ 3 11 - 12 1331 - 1332 2 Uninit
+debugfs: ex /b15
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1392 0
+ 1/ 1 1/ 4 0 - 7 1336 - 1343 8 Uninit
+ 1/ 1 2/ 4 8 - 9 1352 - 1353 2 Uninit
+ 1/ 1 3/ 4 11 - 12 1355 - 1356 2 Uninit
+ 1/ 1 4/ 4 14 - 14 1358 - 1358 1 Uninit
+debugfs: ex /c24
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 25 - 4294967295 1416 4294967271
+ 1/ 1 1/ 3 25 - 25 1401 - 1401 1 Uninit
+ 1/ 1 2/ 3 27 - 28 1403 - 1404 2 Uninit
+ 1/ 1 3/ 3 30 - 39 1406 - 1415 10 Uninit
+debugfs: ex /c25
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 27 - 4294967295 1440 4294967269
+ 1/ 1 1/ 2 27 - 28 1427 - 1428 2 Uninit
+ 1/ 1 2/ 2 30 - 39 1430 - 1439 10 Uninit
+debugfs: ex /c26
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 27 - 4294967295 1464 4294967269
+ 1/ 1 1/ 2 27 - 28 1451 - 1452 2 Uninit
+ 1/ 1 2/ 2 30 - 39 1454 - 1463 10 Uninit
+debugfs: ex /c27
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 28 - 4294967295 1488 4294967268
+ 1/ 1 1/ 2 28 - 28 1476 - 1476 1 Uninit
+ 1/ 1 2/ 2 30 - 39 1478 - 1487 10 Uninit
+debugfs: ex /c28
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 30 - 4294967295 1512 4294967266
+ 1/ 1 1/ 1 30 - 39 1502 - 1511 10 Uninit
+debugfs: ex /c29
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 30 - 4294967295 1536 4294967266
+ 1/ 1 1/ 1 30 - 39 1526 - 1535 10 Uninit
+debugfs: ex /c30
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 31 - 4294967295 1560 4294967265
+ 1/ 1 1/ 1 31 - 39 1551 - 1559 9 Uninit
+debugfs: ex /c31
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 32 - 4294967295 1584 4294967264
+ 1/ 1 1/ 1 32 - 39 1576 - 1583 8 Uninit
+debugfs: ex /d
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1600 0
+ 1/ 1 1/ 2 0 - 3 1360 - 1363 4 Uninit
+ 1/ 1 2/ 2 36 - 39 1596 - 1599 4 Uninit
+debugfs: ex /e
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 4294967295 1624 0
+ 1/ 1 1/ 8 0 - 9 1376 - 1385 10 Uninit
+ 1/ 1 2/ 8 11 - 12 1387 - 1388 2 Uninit
+ 1/ 1 3/ 8 14 - 15 1390 - 1391 2 Uninit
+ 1/ 1 4/ 8 16 - 18 1568 - 1570 3 Uninit
+ 1/ 1 5/ 8 21 - 23 1573 - 1575 3 Uninit
+ 1/ 1 6/ 8 24 - 25 1608 - 1609 2 Uninit
+ 1/ 1 7/ 8 27 - 28 1611 - 1612 2 Uninit
+ 1/ 1 8/ 8 30 - 39 1614 - 1623 10 Uninit
+debugfs: ex /f
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 2 0 - 0 9000 - 9000 1 Uninit
+ 0/ 0 2/ 2 8999 - 8999 17999 - 17999 1 Uninit
+Pass 1: Checking inodes, blocks, and sizes
+Inode 14 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 15 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 16 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 17 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 18 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 19 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 20 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 22 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 23 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 24 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 25 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 26 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 27 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 28 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 29 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 30 extent tree (at level 1) could be shorter. Optimize? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (8003, counted=8002).
+Fix? yes
+
+Free blocks count wrong (64024, counted=64016).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 32/4096 files (43.8% non-contiguous), 1520/65536 blocks
+Exit status is 1
diff --git a/tests/d_punch_bigalloc/name b/tests/d_punch_bigalloc/name
new file mode 100644
index 0000000..6d61ebe
--- /dev/null
+++ b/tests/d_punch_bigalloc/name
@@ -0,0 +1 @@
+punch sparse files and big files with bigalloc
diff --git a/tests/d_punch_bigalloc/script b/tests/d_punch_bigalloc/script
new file mode 100644
index 0000000..73eee46
--- /dev/null
+++ b/tests/d_punch_bigalloc/script
@@ -0,0 +1,121 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+cat > $TMPFILE.conf << ENDL
+[fs_types]
+ext4 = {
+ cluster_size = 8192
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr,^has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit
+ blocksize = 1024
+ inode_size = 256
+ inode_ratio = 16384
+}
+ENDL
+MKE2FS_CONFIG=$TMPFILE.conf $MKE2FS -F -o Linux -b 1024 -O bigalloc -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+rm -f $TMPFILE.conf
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write files" >> $OUT.new
+make_file() {
+ name="$1"
+ start="$2"
+ flag="$3"
+
+ cat << ENDL
+write /dev/null $name
+fallocate /$name 0 39
+punch /$name 10 10
+punch /$name 13 13
+punch /$name 26 26
+punch /$name 29 29
+ENDL
+}
+
+#Files we create:
+# a: punch a 40k file
+# b*: punch sparse file starting at b*
+# c*: punch spare file ending at c*
+# d: midcluster to midcluster, surrounding sparse
+# e: partial middle cluster alloc
+# f: one big file
+base=5000
+cat > $TMPFILE.cmd << ENDL
+write /dev/null a
+fallocate /a 0 39
+punch /a 0 39
+ENDL
+echo "ex /a" >> $TMPFILE.cmd2
+
+make_file sample $base --uninit >> $TMPFILE.cmd
+echo "ex /sample" >> $TMPFILE.cmd2
+base=10000
+
+for i in 8 9 10 11 12 13 14 15; do
+ make_file b$i $(($base + (40 * ($i - 8)))) --uninit >> $TMPFILE.cmd
+ echo "punch /b$i $i 39" >> $TMPFILE.cmd
+ echo "ex /b$i" >> $TMPFILE.cmd2
+done
+
+for i in 24 25 26 27 28 29 30 31; do
+ make_file c$i $(($base + 320 + (40 * ($i - 24)))) --uninit >> $TMPFILE.cmd
+ echo "punch /c$i 0 $i" >> $TMPFILE.cmd
+ echo "ex /c$i" >> $TMPFILE.cmd2
+done
+
+make_file d $(($base + 640)) --uninit >> $TMPFILE.cmd
+echo "punch /d 4 35" >> $TMPFILE.cmd
+echo "ex /d" >> $TMPFILE.cmd2
+
+make_file e $(($base + 680)) --uninit >> $TMPFILE.cmd
+echo "punch /e 19 20" >> $TMPFILE.cmd
+echo "ex /e" >> $TMPFILE.cmd2
+
+cat >> $TMPFILE.cmd << ENDL
+write /dev/null f
+sif /f size 1024
+eo /f
+set_bmap --uninit 0 9000
+ec
+sif /f blocks 16
+setb 9000
+fallocate /f 0 8999
+punch /f 1 8998
+ENDL
+echo "ex /f" >> $TMPFILE.cmd2
+
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $TMPFILE.cmd2 $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/d_special_files/expect b/tests/d_special_files/expect
new file mode 100644
index 0000000..a4761f1
--- /dev/null
+++ b/tests/d_special_files/expect
@@ -0,0 +1,91 @@
+debugfs create special files
+mke2fs -Fq -b 1024 test.img 512
+Exit status is 0
+debugfs -R ''stat foo'' -w test.img
+Inode: 12 Type: symlink Mode: 0777 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 3
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ atime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ mtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+crtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+Size of extra inode fields: 32
+Fast link dest: "bar"
+Exit status is 0
+debugfs -R ''stat foo2'' -w test.img
+Inode: 13 Type: symlink Mode: 0777 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 80
+File ACL: 0
+Links: 1 Blockcount: 2
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ atime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ mtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+crtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+Size of extra inode fields: 32
+BLOCKS:
+(0):36
+TOTAL: 1
+
+Exit status is 0
+debugfs -R ''block_dump 28'' -w test.img
+0000 0000 0000 0004 0000 0000 0000 0000 0000 ................
+0020 0000 0000 0000 0000 0000 0000 0000 0000 ................
+*
+
+Exit status is 0
+debugfs -R ''stat pipe'' -w test.img
+Inode: 14 Type: FIFO Mode: 0000 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 0
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ atime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ mtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+crtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+Size of extra inode fields: 32
+BLOCKS:
+
+Exit status is 0
+debugfs -R ''stat sda'' -w test.img
+Inode: 15 Type: block special Mode: 0000 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 0
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ atime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ mtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+crtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+Size of extra inode fields: 32
+Device major/minor number: 08:00 (hex 08:00)
+Exit status is 0
+debugfs -R ''stat null'' -w test.img
+Inode: 16 Type: character special Mode: 0000 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 0
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ atime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+ mtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+crtime: 0x50f560e0:00000000 -- Tue Jan 15 14:00:00 2013
+Size of extra inode fields: 32
+Device major/minor number: 01:03 (hex 01:03)
+Exit status is 0
+e2fsck -yf -N test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/64 files (0.0% non-contiguous), 37/512 blocks
+Exit status is 0
diff --git a/tests/d_special_files/name b/tests/d_special_files/name
new file mode 100644
index 0000000..98d10d2
--- /dev/null
+++ b/tests/d_special_files/name
@@ -0,0 +1 @@
+create special files in debugfs
diff --git a/tests/d_special_files/script b/tests/d_special_files/script
new file mode 100644
index 0000000..c2a7fa0
--- /dev/null
+++ b/tests/d_special_files/script
@@ -0,0 +1,87 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+TEST_DATA=$test_name.tmp
+VERIFY_DATA=$test_name.ver.tmp
+
+echo "debugfs create special files" > $OUT.new
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT.new
+
+$MKE2FS -Fq -b 1024 -o linux $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+set_current_time 20130115140000
+set_super_value lastcheck 0
+set_super_value hash_seed null
+set_super_value mkfs_time 0
+symlink foo bar
+symlink foo2 12345678901234567890123456789012345678901234567890123456789012345678901234567890
+mknod pipe p
+mknod sda b 8 0
+mknod null c 1 3
+EOF
+
+echo "debugfs -R ''stat foo'' -w test.img" >> $OUT.new
+$DEBUGFS -R "stat foo" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs -R ''stat foo2'' -w test.img" >> $OUT.new
+$DEBUGFS -R "stat foo2" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs -R ''block_dump 28'' -w test.img" >> $OUT.new
+$DEBUGFS -R "block_dump 28" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs -R ''stat pipe'' -w test.img" >> $OUT.new
+$DEBUGFS -R "stat pipe" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs -R ''stat sda'' -w test.img" >> $OUT.new
+$DEBUGFS -R "stat sda" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs -R ''stat null'' -w test.img" >> $OUT.new
+$DEBUGFS -R "stat null" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo e2fsck $VERIFY_FSCK_OPT -N test_filesys >> $OUT.new
+$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+
+#
+# Do the verification
+#
+
+rm -f $TMPFILE $OUT.new
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
diff --git a/tests/d_xattr_edits/expect b/tests/d_xattr_edits/expect
new file mode 100644
index 0000000..6a4d912
--- /dev/null
+++ b/tests/d_xattr_edits/expect
@@ -0,0 +1,55 @@
+debugfs edit extended attributes
+mke2fs -Fq -b 1024 test.img 512
+Exit status is 0
+ea_set / user.joe smith
+Exit status is 0
+ea_set / user.moo FEE_FIE_FOE_FUMMMMMM
+Exit status is 0
+ea_list /
+Extended attributes:
+ user.joe (5) = "smith"
+ user.moo (20) = "FEE_FIE_FOE_FUMMMMMM"
+Exit status is 0
+ea_get / user.moo
+user.moo (20) = "FEE_FIE_FOE_FUMMMMMM"
+
+Exit status is 0
+ea_get / nosuchea
+ea_get: Extended attribute key not found while getting extended attribute
+Exit status is 0
+ea_rm / user.moo
+Exit status is 0
+ea_rm / nosuchea
+Exit status is 0
+ea_list /
+Extended attributes:
+ user.joe (5) = "smith"
+Exit status is 0
+ea_get / user.moo
+ea_get: Extended attribute key not found while getting extended attribute
+Exit status is 0
+ea_rm / user.joe
+Exit status is 0
+ea_list /
+Exit status is 0
+ea_set -f d_xattr_edits.tmp / user.file_based_xattr
+Exit status is 0
+ea_list /
+Extended attributes:
+ user.file_based_xattr (108)
+Exit status is 0
+ea_get / user.file_based_xattr
+user.file_based_xattr (108) = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567\n"
+
+Exit status is 0
+ea_get -f d_xattr_edits.ver.tmp / user.file_based_xattr
+Exit status is 0
+Compare big attribute
+e2fsck -yf -N test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 37/512 blocks
+Exit status is 0
diff --git a/tests/d_xattr_edits/name b/tests/d_xattr_edits/name
new file mode 100644
index 0000000..c0c428c
--- /dev/null
+++ b/tests/d_xattr_edits/name
@@ -0,0 +1 @@
+edit extended attributes in debugfs
diff --git a/tests/d_xattr_edits/script b/tests/d_xattr_edits/script
new file mode 100644
index 0000000..07906c2
--- /dev/null
+++ b/tests/d_xattr_edits/script
@@ -0,0 +1,124 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+TEST_DATA=$test_name.tmp
+VERIFY_DATA=$test_name.ver.tmp
+
+echo "debugfs edit extended attributes" > $OUT.new
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT.new
+
+$MKE2FS -Fq -b 1024 $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_set / user.joe smith" >> $OUT.new
+$DEBUGFS -w -R "ea_set / user.joe smith" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_set / user.moo FEE_FIE_FOE_FUMMMMMM" >> $OUT.new
+$DEBUGFS -w -R "ea_set / user.moo FEE_FIE_FOE_FUMMMMMM" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_list /" >> $OUT.new
+$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get / user.moo" >> $OUT.new
+$DEBUGFS -w -R "ea_get / user.moo" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get / nosuchea" >> $OUT.new
+$DEBUGFS -w -R "ea_get / nosuchea" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_rm / user.moo" >> $OUT.new
+$DEBUGFS -w -R "ea_rm / user.moo" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_rm / nosuchea" >> $OUT.new
+$DEBUGFS -w -R "ea_rm / nosuchea" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_list /" >> $OUT.new
+$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get / user.moo" >> $OUT.new
+$DEBUGFS -w -R "ea_get / user.moo" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_rm / user.joe" >> $OUT.new
+$DEBUGFS -w -R "ea_rm / user.joe" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_list /" >> $OUT.new
+$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567" > $TEST_DATA
+echo "ea_set -f $TEST_DATA / user.file_based_xattr" >> $OUT.new
+$DEBUGFS -w -R "ea_set -f $TEST_DATA / user.file_based_xattr" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_list /" >> $OUT.new
+$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get / user.file_based_xattr" >> $OUT.new
+$DEBUGFS -w -R "ea_get / user.file_based_xattr" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get -f $VERIFY_DATA / user.file_based_xattr" >> $OUT.new
+$DEBUGFS -w -R "ea_get -f $VERIFY_DATA / user.file_based_xattr" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "Compare big attribute" >> $OUT.new
+diff -u $TEST_DATA $VERIFY_DATA >> $OUT.new
+
+echo e2fsck $VERIFY_FSCK_OPT -N test_filesys >> $OUT.new
+$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+
+#
+# Do the verification
+#
+
+rm -f $TMPFILE $TEST_DATA $VERIFY_DATA $OUT.new
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
diff --git a/tests/d_xattr_sorting/expect b/tests/d_xattr_sorting/expect
new file mode 100644
index 0000000..6711645
--- /dev/null
+++ b/tests/d_xattr_sorting/expect
@@ -0,0 +1,34 @@
+debugfs sort extended attributes
+mke2fs -Fq -b 1024 test.img 512
+Exit status is 0
+ea_set -f /tmp/b / security.SMEG64
+Exit status is 0
+ea_set -f /tmp/b / security.imb
+Exit status is 0
+ea_set / user.moo cow
+Exit status is 0
+ea_list /
+Extended attributes:
+ user.moo (3) = "cow"
+ security.imb (256)
+ security.SMEG64 (256)
+Exit status is 0
+ea_get / security.imb
+security.imb (256) = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+
+Exit status is 0
+ea_get / security.SMEG64
+security.SMEG64 (256) = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+
+Exit status is 0
+ea_get / nosuchea
+ea_get: Extended attribute key not found while getting extended attribute
+Exit status is 0
+e2fsck -yf -N test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 37/512 blocks
+Exit status is 0
diff --git a/tests/d_xattr_sorting/name b/tests/d_xattr_sorting/name
new file mode 100644
index 0000000..dde8926
--- /dev/null
+++ b/tests/d_xattr_sorting/name
@@ -0,0 +1 @@
+sort extended attributes in debugfs
diff --git a/tests/d_xattr_sorting/script b/tests/d_xattr_sorting/script
new file mode 100644
index 0000000..8666115
--- /dev/null
+++ b/tests/d_xattr_sorting/script
@@ -0,0 +1,87 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+TEST_DATA=$test_name.tmp
+VERIFY_DATA=$test_name.ver.tmp
+
+echo "debugfs sort extended attributes" > $OUT.new
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT.new
+
+$MKE2FS -Fq -b 1024 $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+B=$(mktemp ${TMPDIR:-/tmp}/b.XXXXXX)
+
+perl -e 'print "x" x 256;' > $B
+
+echo "ea_set -f /tmp/b / security.SMEG64" >> $OUT.new
+$DEBUGFS -w -R "ea_set -f $B / security.SMEG64" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_set -f /tmp/b / security.imb" >> $OUT.new
+$DEBUGFS -w -R "ea_set -f $B / security.imb" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_set / user.moo cow" >> $OUT.new
+$DEBUGFS -w -R "ea_set / user.moo cow" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+rm -f $B
+unset B
+
+echo "ea_list /" >> $OUT.new
+$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get / security.imb" >> $OUT.new
+$DEBUGFS -w -R "ea_get / security.imb" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get / security.SMEG64" >> $OUT.new
+$DEBUGFS -w -R "ea_get / security.SMEG64" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "ea_get / nosuchea" >> $OUT.new
+$DEBUGFS -w -R "ea_get / nosuchea" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo e2fsck $VERIFY_FSCK_OPT -N test_filesys >> $OUT.new
+$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+#
+# Do the verification
+#
+
+rm -f $TMPFILE $OUT.new
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
diff --git a/tests/defaults/e_script b/tests/defaults/e_script
new file mode 100644
index 0000000..8c9cfb6
--- /dev/null
+++ b/tests/defaults/e_script
@@ -0,0 +1,47 @@
+#
+# Default script for testing the relocation library routines
+# (irel -- inode relocation and brel -- block relocation)
+#
+
+if [ -f $test_dir/setup ]; then
+ . $test_dir/setup
+fi
+
+if [ "$class"x = x ]; then
+ class=`echo $test_name | sed -e 's/e_\([^_]*\)_\(.*\)/\1/'`
+ instance=`echo $test_name | sed -e 's/e_\([^_]*\)_\(.*\)/\2/'`
+fi
+if [ "$OUT"x = x ]; then
+ OUT=$test_name.log
+fi
+if [ "$EXPECT"x = x ]; then
+ EXPECT=$SRCDIR/progs/test_data/expect.$class
+fi
+
+if [ "$class" = irel ]; then
+ TEST_PROG=$TEST_REL
+elif [ "$class" = brel ]; then
+ TEST_PROG=$TEST_REL
+elif [ "$class" = icount ]; then
+ TEST_PROG=$TEST_ICOUNT
+else
+ TEST_PROG=/bin/cat
+fi
+
+cat $SRCDIR/progs/test_data/$instance.setup $SRCDIR/progs/test_data/test.$class \
+ | $TEST_PROG -f - 2>&1 | tr -d \\015 > $OUT
+
+cmp -s $EXPECT $OUT
+status=$?
+
+rm -f $test_name.failed $test_name.ok
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXPECT $OUT > $test_name.failed
+fi
+
+unset EXPECT OUT class instance
diff --git a/tests/defaults/f_script b/tests/defaults/f_script
new file mode 100644
index 0000000..7a3b34f
--- /dev/null
+++ b/tests/defaults/f_script
@@ -0,0 +1 @@
+. $cmd_dir/run_e2fsck
diff --git a/tests/defaults/j_script b/tests/defaults/j_script
new file mode 100644
index 0000000..7a3b34f
--- /dev/null
+++ b/tests/defaults/j_script
@@ -0,0 +1 @@
+. $cmd_dir/run_e2fsck
diff --git a/tests/e_brel_bma/name b/tests/e_brel_bma/name
new file mode 100644
index 0000000..9843871
--- /dev/null
+++ b/tests/e_brel_bma/name
@@ -0,0 +1 @@
+block relocation table using memory array implementation
diff --git a/tests/e_brel_bma/script b/tests/e_brel_bma/script
new file mode 100644
index 0000000..037e2fb
--- /dev/null
+++ b/tests/e_brel_bma/script
@@ -0,0 +1 @@
+echo "$test_name: $test_description: skipped"
diff --git a/tests/e_icount_normal/name b/tests/e_icount_normal/name
new file mode 100644
index 0000000..1317876
--- /dev/null
+++ b/tests/e_icount_normal/name
@@ -0,0 +1 @@
+inode counting structure optimized for low counts
diff --git a/tests/e_icount_opt/name b/tests/e_icount_opt/name
new file mode 100644
index 0000000..5b6b1a5
--- /dev/null
+++ b/tests/e_icount_opt/name
@@ -0,0 +1 @@
+inode counting abstraction optimized for counting
diff --git a/tests/e_irel_ima/name b/tests/e_irel_ima/name
new file mode 100644
index 0000000..d19d277
--- /dev/null
+++ b/tests/e_irel_ima/name
@@ -0,0 +1 @@
+inode relocation table using memory array implementation
diff --git a/tests/e_irel_ima/script b/tests/e_irel_ima/script
new file mode 100644
index 0000000..037e2fb
--- /dev/null
+++ b/tests/e_irel_ima/script
@@ -0,0 +1 @@
+echo "$test_name: $test_description: skipped"
diff --git a/tests/f_16384_block/expect.1 b/tests/f_16384_block/expect.1
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/tests/f_16384_block/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 39/1024 blocks
+Exit status is 0
diff --git a/tests/f_16384_block/expect.2 b/tests/f_16384_block/expect.2
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/tests/f_16384_block/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 39/1024 blocks
+Exit status is 0
diff --git a/tests/f_16384_block/image.gz b/tests/f_16384_block/image.gz
new file mode 100644
index 0000000..c5f311b
--- /dev/null
+++ b/tests/f_16384_block/image.gz
Binary files differ
diff --git a/tests/f_16384_block/name b/tests/f_16384_block/name
new file mode 100644
index 0000000..79b3112
--- /dev/null
+++ b/tests/f_16384_block/name
@@ -0,0 +1 @@
+16384 byte blocksize
diff --git a/tests/f_8192_block/expect.1 b/tests/f_8192_block/expect.1
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/tests/f_8192_block/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 39/1024 blocks
+Exit status is 0
diff --git a/tests/f_8192_block/expect.2 b/tests/f_8192_block/expect.2
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/tests/f_8192_block/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 39/1024 blocks
+Exit status is 0
diff --git a/tests/f_8192_block/image.gz b/tests/f_8192_block/image.gz
new file mode 100644
index 0000000..c5f311b
--- /dev/null
+++ b/tests/f_8192_block/image.gz
Binary files differ
diff --git a/tests/f_8192_block/name b/tests/f_8192_block/name
new file mode 100644
index 0000000..50d8dca
--- /dev/null
+++ b/tests/f_8192_block/name
@@ -0,0 +1 @@
+8192 byte blocksize
diff --git a/tests/f_bad_bbitmap/expect.1 b/tests/f_bad_bbitmap/expect.1
new file mode 100644
index 0000000..71ad1bb
--- /dev/null
+++ b/tests/f_bad_bbitmap/expect.1
@@ -0,0 +1,15 @@
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 0 checksum is 0x49ff, should be 0x4972. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(8--10) -(12--17) -(19--31)
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_bad_bbitmap/expect.2 b/tests/f_bad_bbitmap/expect.2
new file mode 100644
index 0000000..411e656
--- /dev/null
+++ b/tests/f_bad_bbitmap/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_bad_bbitmap/image.gz b/tests/f_bad_bbitmap/image.gz
new file mode 100644
index 0000000..c488ecd
--- /dev/null
+++ b/tests/f_bad_bbitmap/image.gz
Binary files differ
diff --git a/tests/f_bad_bbitmap/name b/tests/f_bad_bbitmap/name
new file mode 100644
index 0000000..923ddcb
--- /dev/null
+++ b/tests/f_bad_bbitmap/name
@@ -0,0 +1 @@
+corrupt block bitmap (metadata_csum)
diff --git a/tests/f_bad_bmap_csum/expect.1 b/tests/f_bad_bmap_csum/expect.1
new file mode 100644
index 0000000..ca8f77f
--- /dev/null
+++ b/tests/f_bad_bmap_csum/expect.1
@@ -0,0 +1,16 @@
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 0 checksum is 0x4972, should be 0x7074. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: Group 0 inode bitmap does not match checksum.
+FIXED.
+Block bitmap differences: Group 0 block bitmap does not match checksum.
+FIXED.
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_bad_bmap_csum/expect.2 b/tests/f_bad_bmap_csum/expect.2
new file mode 100644
index 0000000..411e656
--- /dev/null
+++ b/tests/f_bad_bmap_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_bad_bmap_csum/image.gz b/tests/f_bad_bmap_csum/image.gz
new file mode 100644
index 0000000..70a0d18
--- /dev/null
+++ b/tests/f_bad_bmap_csum/image.gz
Binary files differ
diff --git a/tests/f_bad_bmap_csum/name b/tests/f_bad_bmap_csum/name
new file mode 100644
index 0000000..df19fe3
--- /dev/null
+++ b/tests/f_bad_bmap_csum/name
@@ -0,0 +1 @@
+bad block/inode bitmap csum (metadata_csum)
diff --git a/tests/f_bad_disconnected_inode/expect.1 b/tests/f_bad_disconnected_inode/expect.1
new file mode 100644
index 0000000..d1479ce
--- /dev/null
+++ b/tests/f_bad_disconnected_inode/expect.1
@@ -0,0 +1,49 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 1 has EXTENTS_FL flag set on filesystem without extents support.
+Clear? yes
+
+Inode 9 has the casefold flag set but is not a directory. Clear flag? yes
+
+Inode 14 has the casefold flag set but is not a directory. Clear flag? yes
+
+Inode 14 has INLINE_DATA_FL flag on filesystem without inline data support.
+Clear? yes
+
+Inode 15 has INLINE_DATA_FL flag on filesystem without inline data support.
+Clear? yes
+
+Inode 16 has the casefold flag set but is not a directory. Clear flag? yes
+
+Inode 16 has INLINE_DATA_FL flag on filesystem without inline data support.
+Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+i_file_acl for inode 13 (...) is 4218798225, should be zero.
+Clear? yes
+
+Inode 13 (...) has invalid mode (0117003).
+Clear? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(9--19)
+Fix? yes
+
+Free blocks count wrong for group #0 (79, counted=91).
+Fix? yes
+
+Free blocks count wrong (79, counted=91).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (0.0% non-contiguous), 9/100 blocks
+Exit status is 1
diff --git a/tests/f_bad_disconnected_inode/expect.2 b/tests/f_bad_disconnected_inode/expect.2
new file mode 100644
index 0000000..8dfeb70
--- /dev/null
+++ b/tests/f_bad_disconnected_inode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16 files (0.0% non-contiguous), 9/100 blocks
+Exit status is 0
diff --git a/tests/f_bad_disconnected_inode/image.gz b/tests/f_bad_disconnected_inode/image.gz
new file mode 100644
index 0000000..8f2b3d9
--- /dev/null
+++ b/tests/f_bad_disconnected_inode/image.gz
Binary files differ
diff --git a/tests/f_bad_disconnected_inode/name b/tests/f_bad_disconnected_inode/name
new file mode 100644
index 0000000..f2fa67b
--- /dev/null
+++ b/tests/f_bad_disconnected_inode/name
@@ -0,0 +1 @@
+disconnected inode with bad fields
diff --git a/tests/f_bad_encryption/expect.1 b/tests/f_bad_encryption/expect.1
new file mode 100644
index 0000000..7027095
--- /dev/null
+++ b/tests/f_bad_encryption/expect.1
@@ -0,0 +1,125 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 17 has encrypt flag but no encryption extended attribute.
+Clear flag? yes
+
+Inode 18 has encrypt flag but no encryption extended attribute.
+Clear flag? yes
+
+Encrypted inode 19 has corrupt encryption extended attribute.
+Clear inode? yes
+
+Encrypted inode 20 has corrupt encryption extended attribute.
+Clear inode? yes
+
+Encrypted inode 21 has corrupt encryption extended attribute.
+Clear inode? yes
+
+Encrypted inode 22 has corrupt encryption extended attribute.
+Clear inode? yes
+
+Pass 2: Checking directory structure
+Encrypted entry 'd6M->'M-#I^VM-^KM-F~^WSJ+M-uM-zM-zXM-^' in /edir (12) references unencrypted inode 17.
+Clear? yes
+
+Encrypted entry '\M-!M-Y%DhM-OM-VM-zM-CM-gVM-R3M-^RM-IkE^JM-^S' in /edir (12) references unencrypted inode 18.
+Clear? yes
+
+Entry 'M-{^Qp-M-sM-U7eM-^C^L^PG^ZM-FM-,M-B' in /edir (12) has deleted/unused inode 19. Clear? yes
+
+Entry 'M-f0M-f3/M-NM-GM-:M-^YM-jM-XM-91DM-^_M-V' in /edir (12) has deleted/unused inode 20. Clear? yes
+
+Entry '^M-R"M-^K^P7M-'M-EM-C}^MM-yM-^LwM-^N^Z' in /edir (12) has deleted/unused inode 21. Clear? yes
+
+Entry 'M-s^J_;uIvM-^Z[M-nIM-5vM-^AcM-o' in /edir (12) has deleted/unused inode 22. Clear? yes
+
+Encrypted entry 'kK=,M-bM-^AM-{M-YM-^J6M-hM-y^XM-^W}M-M' in /edir (12) references unencrypted inode 23.
+Clear? yes
+
+Encrypted entry 'M-VM-cxM-jM-zM-b^WM-o*M-jM-uM-,R^PM-hM-2' in /edir (12) references unencrypted inode 24.
+Clear? yes
+
+Encrypted entry 'UqM-AM-#KM-^PM-_^kM-9P0M-^FM-_^@;A^J"R' in /edir (12) references unencrypted inode 25.
+Clear? yes
+
+Encrypted entry 'M-TM-N8^[M-3M-( M-[A^FR}^ZhkM-^?=M-c^Mo' in /edir (12) references inode 26, which has a different encryption policy.
+Clear? yes
+
+Encrypted entry 'M--aM-^?~M-^\M-u^FM-/!^YM-OZM-^LM-)M-p1' in /edir (12) references inode 27, which has a different encryption policy.
+Clear? yes
+
+Encrypted entry '(M-8RKM-LM-eM-^W^[M-'M-SM-@uM-^VM-|M-GiM-^JbM-nM-z' in /edir (12) references inode 28, which has a different encryption policy.
+Clear? yes
+
+Encrypted entry '\M-ggCeM-/?M-^BM-{(M-^OM-9M-^QQAM-^N=M-c^Mo' in /edir (12) references inode 29, which has a different encryption policy.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Unconnected directory inode 18 (was in /edir)
+Connect to /lost+found? yes
+
+Unconnected directory inode 24 (was in /edir)
+Connect to /lost+found? yes
+
+Unconnected directory inode 27 (was in /edir)
+Connect to /lost+found? yes
+
+Pass 4: Checking reference counts
+Unattached inode 17
+Connect to /lost+found? yes
+
+Inode 17 ref count is 2, should be 1. Fix? yes
+
+Inode 18 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 23
+Connect to /lost+found? yes
+
+Inode 23 ref count is 2, should be 1. Fix? yes
+
+Inode 24 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 25
+Connect to /lost+found? yes
+
+Inode 25 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 26
+Connect to /lost+found? yes
+
+Inode 26 ref count is 2, should be 1. Fix? yes
+
+Inode 27 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 28
+Connect to /lost+found? yes
+
+Inode 28 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 29
+Connect to /lost+found? yes
+
+Inode 29 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(25--32)
+Fix? yes
+
+Free blocks count wrong for group #0 (75, counted=83).
+Fix? yes
+
+Free blocks count wrong (75, counted=83).
+Fix? yes
+
+Inode bitmap differences: -(19--22)
+Fix? yes
+
+Free inodes count wrong for group #0 (95, counted=99).
+Fix? yes
+
+Free inodes count wrong (95, counted=99).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 29/128 files (0.0% non-contiguous), 45/128 blocks
+Exit status is 1
diff --git a/tests/f_bad_encryption/expect.2 b/tests/f_bad_encryption/expect.2
new file mode 100644
index 0000000..fcfabdb
--- /dev/null
+++ b/tests/f_bad_encryption/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 29/128 files (0.0% non-contiguous), 45/128 blocks
+Exit status is 0
diff --git a/tests/f_bad_encryption/image.gz b/tests/f_bad_encryption/image.gz
new file mode 100644
index 0000000..64b59b7
--- /dev/null
+++ b/tests/f_bad_encryption/image.gz
Binary files differ
diff --git a/tests/f_bad_encryption/mkimage.sh b/tests/f_bad_encryption/mkimage.sh
new file mode 100755
index 0000000..e58395d
--- /dev/null
+++ b/tests/f_bad_encryption/mkimage.sh
@@ -0,0 +1,169 @@
+#!/bin/bash
+#
+# This is the script that was used to create the image.gz in this directory.
+#
+# This requires a patched version of debugfs that understands the "fscrypt."
+# xattr name prefix, so that the encryption xattrs can be manipulated.
+
+set -e -u
+umask 0022
+
+do_debugfs() {
+ umount mnt
+ debugfs -w "$@" image
+ mount image mnt
+}
+
+create_encrypted_file() {
+ local file=$1
+ local ino
+
+ echo foo > "$file"
+
+ # not needed, but makes image more compressible
+ ino=$(stat -c %i "$file")
+ do_debugfs -R "zap_block -f <$ino> 0"
+}
+
+set_encryption_xattr() {
+ local file=$1
+ local value=$2
+ local ino
+
+ ino=$(stat -c %i "$file")
+ do_debugfs -R "ea_set <$ino> fscrypt.c $value"
+}
+
+rm_encryption_xattr() {
+ local file=$1
+ local ino
+
+ ino=$(stat -c %i "$file")
+ do_debugfs -R "ea_rm <$ino> fscrypt.c"
+}
+
+clear_encrypt_flag() {
+ local file=$1
+ local ino
+
+ ino=$(stat -c %i "$file")
+ do_debugfs -R "set_inode_field <$ino> flags 0"
+}
+
+clear_encryption() {
+ local file=$1
+ local ino
+ local is_symlink=false
+
+ if [ -L "$file" ]; then
+ is_symlink=true
+ fi
+ ino=$(stat -c %i "$file")
+
+ do_debugfs -R "ea_rm <$ino> fscrypt.c"
+ do_debugfs -R "set_inode_field <$ino> flags 0"
+ if $is_symlink; then
+ do_debugfs -R "set_inode_field <$ino> block[0] 0xAAAAAAAA"
+ do_debugfs -R "set_inode_field <$ino> block[1] 0"
+ do_debugfs -R "set_inode_field <$ino> size 4"
+ fi
+}
+
+mkdir -p mnt
+umount mnt &> /dev/null || true
+
+dd if=/dev/zero of=image bs=4096 count=128
+mke2fs -O encrypt -b 4096 -N 128 image
+mount image mnt
+
+# Create an encrypted directory (ino 12)
+dir=mnt/edir
+mkdir $dir
+echo password | e4crypt add_key $dir
+
+# Control cases: valid encrypted regular file, dir, and symlink (ino 13-15)
+create_encrypted_file $dir/encrypted_file
+mkdir $dir/encrypted_dir
+ln -s target $dir/encrypted_symlink
+
+# Control case: file type that is never encrypted (ino 16)
+mkfifo $dir/fifo
+
+# Inodes with missing encryption xattr (ino 17-18).
+# e2fsck should offer to clear the encrypt flag on these inodes.
+
+create_encrypted_file $dir/missing_xattr_file
+rm_encryption_xattr $dir/missing_xattr_file
+
+mkdir $dir/missing_xattr_dir
+rm_encryption_xattr $dir/missing_xattr_dir
+
+# Inodes with corrupt encryption xattr (ino 19-22).
+# e2fsck should offer to clear these inodes.
+
+create_encrypted_file $dir/corrupt_xattr_1
+set_encryption_xattr $dir/corrupt_xattr_1 '\0'
+
+create_encrypted_file $dir/corrupt_xattr_2
+set_encryption_xattr $dir/corrupt_xattr_2 \
+ '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
+
+create_encrypted_file $dir/corrupt_xattr_3
+set_encryption_xattr $dir/corrupt_xattr_3 '\1'
+
+create_encrypted_file $dir/corrupt_xattr_4
+set_encryption_xattr $dir/corrupt_xattr_4 '\2'
+
+# Unencrypted inodes in encrypted directory (ino 23-25).
+# e2fsck should offer to clear these directory entries.
+
+create_encrypted_file $dir/unencrypted_file
+clear_encryption $dir/unencrypted_file
+
+mkdir $dir/unencrypted_dir
+clear_encryption $dir/unencrypted_dir
+
+ln -s target $dir/unencrypted_symlink
+clear_encryption $dir/unencrypted_symlink
+
+# Inodes with different encryption policy in encrypted directory (ino 26-29).
+# e2fsck should offer to clear these directory entries.
+
+xattr='\1\1\4\0AAAAAAAABBBBBBBBBBBBBBBB'
+
+create_encrypted_file $dir/inconsistent_file_1
+set_encryption_xattr $dir/inconsistent_file_1 $xattr
+
+mkdir $dir/inconsistent_dir
+set_encryption_xattr $dir/inconsistent_dir $xattr
+
+ln -s target $dir/inconsistent_symlink
+set_encryption_xattr $dir/inconsistent_symlink $xattr
+
+xattr='\2\1\4\0\0\0\0\0AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB'
+create_encrypted_file $dir/inconsistent_file_2
+set_encryption_xattr $dir/inconsistent_file_2 $xattr
+
+# Encrypted file and directory with valid v2 encryption policy (ino 30-31).
+# e2fsck shouldn't change these.
+dir2=mnt/edir2
+mkdir $dir2
+echo password | e4crypt add_key $dir2
+xattr='\2\1\4\0\0\0\0\0AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB'
+create_encrypted_file $dir2/file
+set_encryption_xattr $dir2/file $xattr
+set_encryption_xattr $dir2 $xattr
+
+# Encrypted file and directory with unrecognized encryption policy version
+# (ino 32-33). e2fsck shouldn't change these.
+dir3=mnt/edir3
+mkdir $dir3
+echo password | e4crypt add_key $dir3
+xattr='\3'
+create_encrypted_file $dir3/file
+set_encryption_xattr $dir3/file $xattr
+set_encryption_xattr $dir3 $xattr
+
+umount mnt
+rmdir mnt
+gzip -9 -f image
diff --git a/tests/f_bad_encryption/name b/tests/f_bad_encryption/name
new file mode 100644
index 0000000..85b19ed
--- /dev/null
+++ b/tests/f_bad_encryption/name
@@ -0,0 +1 @@
+missing, corrupt, and inconsistent encryption policies
diff --git a/tests/f_bad_fname/expect.1 b/tests/f_bad_fname/expect.1
new file mode 100644
index 0000000..66f87df
--- /dev/null
+++ b/tests/f_bad_fname/expect.1
@@ -0,0 +1,22 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'AM-^?' in /ci_dir (12) has illegal UTF-8 characters in its name.
+Fix? yes
+
+Entry 'AM-~' in /ci_dir (12) has illegal UTF-8 characters in its name.
+Fix? yes
+
+Duplicate entry 'A.' found.
+ Marking /ci_dir (12) to be rebuilt.
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Entry 'A.' in /ci_dir (12) has a non-unique filename.
+Rename to A.~0? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_bad_fname/expect.2 b/tests/f_bad_fname/expect.2
new file mode 100644
index 0000000..13de1c0
--- /dev/null
+++ b/tests/f_bad_fname/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_bad_fname/image.gz b/tests/f_bad_fname/image.gz
new file mode 100644
index 0000000..a8b3fc6
--- /dev/null
+++ b/tests/f_bad_fname/image.gz
Binary files differ
diff --git a/tests/f_bad_fname/name b/tests/f_bad_fname/name
new file mode 100644
index 0000000..29681cb
--- /dev/null
+++ b/tests/f_bad_fname/name
@@ -0,0 +1 @@
+case-insensitive directory with broken file names
diff --git a/tests/f_bad_gdt_csum/expect.1 b/tests/f_bad_gdt_csum/expect.1
new file mode 100644
index 0000000..e14c897
--- /dev/null
+++ b/tests/f_bad_gdt_csum/expect.1
@@ -0,0 +1,10 @@
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 0 checksum is 0xffff, should be 0x4972. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_bad_gdt_csum/expect.2 b/tests/f_bad_gdt_csum/expect.2
new file mode 100644
index 0000000..411e656
--- /dev/null
+++ b/tests/f_bad_gdt_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_bad_gdt_csum/image.gz b/tests/f_bad_gdt_csum/image.gz
new file mode 100644
index 0000000..c3fdafe
--- /dev/null
+++ b/tests/f_bad_gdt_csum/image.gz
Binary files differ
diff --git a/tests/f_bad_gdt_csum/name b/tests/f_bad_gdt_csum/name
new file mode 100644
index 0000000..fe2c601
--- /dev/null
+++ b/tests/f_bad_gdt_csum/name
@@ -0,0 +1 @@
+bad group descriptor csum (metadata_csum)
diff --git a/tests/f_bad_ibitmap/expect.1 b/tests/f_bad_ibitmap/expect.1
new file mode 100644
index 0000000..ea17523
--- /dev/null
+++ b/tests/f_bad_ibitmap/expect.1
@@ -0,0 +1,15 @@
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 0 checksum is 0xffff, should be 0x4972. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -(12--32)
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_bad_ibitmap/expect.2 b/tests/f_bad_ibitmap/expect.2
new file mode 100644
index 0000000..411e656
--- /dev/null
+++ b/tests/f_bad_ibitmap/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_bad_ibitmap/image.gz b/tests/f_bad_ibitmap/image.gz
new file mode 100644
index 0000000..3a52398
--- /dev/null
+++ b/tests/f_bad_ibitmap/image.gz
Binary files differ
diff --git a/tests/f_bad_ibitmap/name b/tests/f_bad_ibitmap/name
new file mode 100644
index 0000000..76ec12d
--- /dev/null
+++ b/tests/f_bad_ibitmap/name
@@ -0,0 +1 @@
+corrupt inode bitmap (metadata_csum)
diff --git a/tests/f_bad_inode_csum/expect.1 b/tests/f_bad_inode_csum/expect.1
new file mode 100644
index 0000000..b3c628d
--- /dev/null
+++ b/tests/f_bad_inode_csum/expect.1
@@ -0,0 +1,126 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 33 has a extra size (65535) which is invalid
+Fix? yes
+
+Inode 49 passes checks, but checksum does not match inode. Fix? yes
+
+Inode 65 passes checks, but checksum does not match inode. Fix? yes
+
+Inode 81 passes checks, but checksum does not match inode. Fix? yes
+
+Inode 97 seems to contain garbage. Clear? yes
+
+Inode 98 seems to contain garbage. Clear? yes
+
+Inode 99 seems to contain garbage. Clear? yes
+
+Inode 100 seems to contain garbage. Clear? yes
+
+Inode 101 seems to contain garbage. Clear? yes
+
+Inode 102 seems to contain garbage. Clear? yes
+
+Inode 103 seems to contain garbage. Clear? yes
+
+Inode 104 seems to contain garbage. Clear? yes
+
+Inode 105 seems to contain garbage. Clear? yes
+
+Inode 106 seems to contain garbage. Clear? yes
+
+Inode 107 seems to contain garbage. Clear? yes
+
+Inode 108 seems to contain garbage. Clear? yes
+
+Inode 109 seems to contain garbage. Clear? yes
+
+Inode 110 seems to contain garbage. Clear? yes
+
+Inode 111 seems to contain garbage. Clear? yes
+
+Inode 112 seems to contain garbage. Clear? yes
+
+Pass 2: Checking directory structure
+Extended attribute block for inode 49 (/38) is invalid (4294967295).
+Clear? yes
+
+Entry '86' in / (2) has deleted/unused inode 97. Clear? yes
+
+Entry '87' in / (2) has deleted/unused inode 98. Clear? yes
+
+Entry '88' in / (2) has deleted/unused inode 99. Clear? yes
+
+Entry '89' in / (2) has deleted/unused inode 100. Clear? yes
+
+Entry '90' in / (2) has deleted/unused inode 101. Clear? yes
+
+Entry '91' in / (2) has deleted/unused inode 102. Clear? yes
+
+Entry '92' in / (2) has deleted/unused inode 103. Clear? yes
+
+Entry '93' in / (2) has deleted/unused inode 104. Clear? yes
+
+Entry '94' in / (2) has deleted/unused inode 105. Clear? yes
+
+Entry '95' in / (2) has deleted/unused inode 106. Clear? yes
+
+Entry '96' in / (2) has deleted/unused inode 107. Clear? yes
+
+Entry '97' in / (2) has deleted/unused inode 108. Clear? yes
+
+Entry '98' in / (2) has deleted/unused inode 109. Clear? yes
+
+Entry '99' in / (2) has deleted/unused inode 110. Clear? yes
+
+Entry '100' in / (2) has deleted/unused inode 111. Clear? yes
+
+Entry '101' in / (2) has deleted/unused inode 112. Clear? yes
+
+Entry '102' in / (2) has deleted/unused inode 113. Clear? yes
+
+Entry '103' in / (2) has deleted/unused inode 114. Clear? yes
+
+Entry '104' in / (2) has deleted/unused inode 115. Clear? yes
+
+Entry '105' in / (2) has deleted/unused inode 116. Clear? yes
+
+Entry '106' in / (2) has deleted/unused inode 117. Clear? yes
+
+Entry '107' in / (2) has deleted/unused inode 118. Clear? yes
+
+Entry '108' in / (2) has deleted/unused inode 119. Clear? yes
+
+Entry '109' in / (2) has deleted/unused inode 120. Clear? yes
+
+Entry '110' in / (2) has deleted/unused inode 121. Clear? yes
+
+Entry '111' in / (2) has deleted/unused inode 122. Clear? yes
+
+Entry '112' in / (2) has deleted/unused inode 123. Clear? yes
+
+Entry '113' in / (2) has deleted/unused inode 124. Clear? yes
+
+Entry '114' in / (2) has deleted/unused inode 125. Clear? yes
+
+Entry '115' in / (2) has deleted/unused inode 126. Clear? yes
+
+Entry '116' in / (2) has deleted/unused inode 127. Clear? yes
+
+Entry '117' in / (2) has deleted/unused inode 128. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -(97--128)
+Fix? yes
+
+Free inodes count wrong for group #0 (0, counted=32).
+Fix? yes
+
+Free inodes count wrong (0, counted=32).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 96/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_bad_inode_csum/expect.2 b/tests/f_bad_inode_csum/expect.2
new file mode 100644
index 0000000..b97a902
--- /dev/null
+++ b/tests/f_bad_inode_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 96/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_bad_inode_csum/image.gz b/tests/f_bad_inode_csum/image.gz
new file mode 100644
index 0000000..221920b
--- /dev/null
+++ b/tests/f_bad_inode_csum/image.gz
Binary files differ
diff --git a/tests/f_bad_inode_csum/name b/tests/f_bad_inode_csum/name
new file mode 100644
index 0000000..68bf7ce
--- /dev/null
+++ b/tests/f_bad_inode_csum/name
@@ -0,0 +1 @@
+inode table corruption (metadata_csum)
diff --git a/tests/f_bad_local_jnl/expect.1 b/tests/f_bad_local_jnl/expect.1
new file mode 100644
index 0000000..10140b5
--- /dev/null
+++ b/tests/f_bad_local_jnl/expect.1
@@ -0,0 +1,14 @@
+Found invalid V2 journal superblock fields (from V1 journal).
+Clearing fields beyond the V1 journal superblock...
+
+Backing up journal inode block information.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (0.0% non-contiguous), 1080/8192 blocks
+Exit status is 1
diff --git a/tests/f_bad_local_jnl/expect.2 b/tests/f_bad_local_jnl/expect.2
new file mode 100644
index 0000000..632dc71
--- /dev/null
+++ b/tests/f_bad_local_jnl/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (0.0% non-contiguous), 1080/8192 blocks
+Exit status is 0
diff --git a/tests/f_bad_local_jnl/image b/tests/f_bad_local_jnl/image
new file mode 100644
index 0000000..6f2b550
--- /dev/null
+++ b/tests/f_bad_local_jnl/image
Binary files differ
diff --git a/tests/f_bad_local_jnl/image.gz b/tests/f_bad_local_jnl/image.gz
new file mode 100644
index 0000000..addd58a
--- /dev/null
+++ b/tests/f_bad_local_jnl/image.gz
Binary files differ
diff --git a/tests/f_bad_local_jnl/name b/tests/f_bad_local_jnl/name
new file mode 100644
index 0000000..8b77264
--- /dev/null
+++ b/tests/f_bad_local_jnl/name
@@ -0,0 +1 @@
+test for corrupt local journal (bad V1->V2 journal upgrade)
diff --git a/tests/f_badbblocks/expect.1 b/tests/f_badbblocks/expect.1
new file mode 100644
index 0000000..3107a29
--- /dev/null
+++ b/tests/f_badbblocks/expect.1
@@ -0,0 +1,28 @@
+Filesystem did not have a UUID; generating one.
+
+../e2fsck/e2fsck: Illegal indirect block found while reading bad blocks inode
+This doesn't bode well, but we'll try to go on...
+Pass 1: Checking inodes, blocks, and sizes
+Bad block inode has illegal block(s). Clear? yes
+
+Illegal block #1 (101) in bad block inode. CLEARED.
+Illegal block #2 (103) in bad block inode. CLEARED.
+Illegal block #3 (234523) in bad block inode. CLEARED.
+Illegal indirect block (200) in bad block inode. CLEARED.
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +50
+Fix? yes
+
+Free blocks count wrong for group #0 (78, counted=77).
+Fix? yes
+
+Free blocks count wrong (78, counted=77).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 1
diff --git a/tests/f_badbblocks/expect.2 b/tests/f_badbblocks/expect.2
new file mode 100644
index 0000000..fda217d
--- /dev/null
+++ b/tests/f_badbblocks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 0
diff --git a/tests/f_badbblocks/image.gz b/tests/f_badbblocks/image.gz
new file mode 100644
index 0000000..fe39b7f
--- /dev/null
+++ b/tests/f_badbblocks/image.gz
Binary files differ
diff --git a/tests/f_badbblocks/name b/tests/f_badbblocks/name
new file mode 100644
index 0000000..ab20f38
--- /dev/null
+++ b/tests/f_badbblocks/name
@@ -0,0 +1 @@
+illegal blocks in bad block inode
diff --git a/tests/f_badcluster/expect b/tests/f_badcluster/expect
new file mode 100644
index 0000000..b44e65d
--- /dev/null
+++ b/tests/f_badcluster/expect
@@ -0,0 +1,194 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 logical block 2 (physical block 1154) violates cluster allocation rules.
+Will fix in pass 1B.
+Inode 12, i_blocks is 32, should be 64. Fix? yes
+
+Inode 16 logical block 5 (physical block 1173) violates cluster allocation rules.
+Will fix in pass 1B.
+Inode 16, i_size is 3072, should be 6144. Fix? yes
+
+Inode 16, i_blocks is 32, should be 64. Fix? yes
+
+Inode 17 logical block 0 (physical block 1186) violates cluster allocation rules.
+Will fix in pass 1B.
+Inode 17 logical block 2 (physical block 1184) violates cluster allocation rules.
+Will fix in pass 1B.
+Inode 18 logical block 3 (physical block 1201) violates cluster allocation rules.
+Will fix in pass 1B.
+Inode 18, i_blocks is 32, should be 64. Fix? yes
+
+Inode 15 on bigalloc filesystem cannot be block mapped. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 1154
+Multiply-claimed block(s) in inode 13: 1152--1154
+Multiply-claimed block(s) in inode 14: 1648--1650
+Multiply-claimed block(s) in inode 15: 1650
+Multiply-claimed block(s) in inode 16: 1173
+Multiply-claimed block(s) in inode 17: 1186 1185 1184
+Multiply-claimed block(s) in inode 18: 1201
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 7 inodes containing multiply-claimed blocks.)
+
+File /a (inode #12, mod time Tue Jun 17 08:00:50 2014)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /b (inode #13, mod time Tue Jun 17 08:00:50 2014)
+Clone multiply-claimed blocks? yes
+
+File /b (inode #13, mod time Tue Jun 17 08:00:50 2014)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /a (inode #12, mod time Tue Jun 17 08:00:50 2014)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /c (inode #14, mod time Tue Jun 17 08:00:50 2014)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /d (inode #15, mod time Tue Jun 17 08:00:50 2014)
+Clone multiply-claimed blocks? yes
+
+File /d (inode #15, mod time Tue Jun 17 08:00:50 2014)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /c (inode #14, mod time Tue Jun 17 08:00:50 2014)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /e (inode #16, mod time Tue Jun 17 08:00:50 2014)
+ has 1 multiply-claimed block(s), shared with 0 file(s):
+Clone multiply-claimed blocks? yes
+
+File /f (inode #17, mod time Tue Jun 17 08:00:50 2014)
+ has 1 multiply-claimed block(s), shared with 0 file(s):
+Clone multiply-claimed blocks? yes
+
+File /g (inode #18, mod time Tue Jun 17 08:00:50 2014)
+ has 1 multiply-claimed block(s), shared with 0 file(s):
+Clone multiply-claimed blocks? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (51, counted=48).
+Fix? yes
+
+Free blocks count wrong (816, counted=768).
+Fix? yes
+
+
+test_fs: ***** FILE SYSTEM WAS MODIFIED *****
+test_fs: 18/128 files (22.2% non-contiguous), 1280/2048 blocks
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_blocks is 64, should be 32. Fix? yes
+
+Inode 16, i_blocks is 64, should be 32. Fix? yes
+
+Inode 18, i_blocks is 64, should be 32. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(1168--1200)
+Fix? yes
+
+Free blocks count wrong for group #0 (48, counted=51).
+Fix? yes
+
+Free blocks count wrong (768, counted=816).
+Fix? yes
+
+
+test_fs: ***** FILE SYSTEM WAS MODIFIED *****
+test_fs: 18/128 files (5.6% non-contiguous), 1232/2048 blocks
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_fs: 18/128 files (5.6% non-contiguous), 1232/2048 blocks
+debugfs: stat /a
+Inode: 12 Type: regular Mode: 0644 Flags: 0x80000
+Generation: 1117152157 Version: 0x00000001
+User: 0 Group: 0 Size: 3072
+File ACL: 0
+Links: 1 Blockcount: 32
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+EXTENTS:
+(0-1):1136-1137, (2):1138
+debugfs: stat /b
+Inode: 13 Type: regular Mode: 0644 Flags: 0x80000
+Generation: 1117152158 Version: 0x00000001
+User: 0 Group: 0 Size: 3072
+File ACL: 0
+Links: 1 Blockcount: 32
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+EXTENTS:
+(0-2):1152-1154
+debugfs: stat /c
+Inode: 14 Type: regular Mode: 0644 Flags: 0x80000
+Generation: 1117152159 Version: 0x00000001
+User: 0 Group: 0 Size: 3072
+File ACL: 0
+Links: 1 Blockcount: 32
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+EXTENTS:
+(0-1):1216-1217, (2):1218
+debugfs: stat /d
+Inode: 15 Type: regular Mode: 0644 Flags: 0x80000
+Generation: 1117152160 Version: 0x00000001
+User: 0 Group: 0 Size: 3072
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+EXTENTS:
+debugfs: stat /e
+Inode: 16 Type: regular Mode: 0644 Flags: 0x80000
+Generation: 1117152161 Version: 0x00000001
+User: 0 Group: 0 Size: 6144
+File ACL: 0
+Links: 1 Blockcount: 32
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+EXTENTS:
+(0-2):1664-1666, (5):1669
+debugfs: stat /f
+Inode: 17 Type: regular Mode: 0644 Flags: 0x80000
+Generation: 1117152162 Version: 0x00000001
+User: 0 Group: 0 Size: 3072
+File ACL: 0
+Links: 1 Blockcount: 32
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+EXTENTS:
+(0):1232, (1):1233, (2):1234
+debugfs: stat /g
+Inode: 18 Type: regular Mode: 0644 Flags: 0x80000
+Generation: 1117152163 Version: 0x00000001
+User: 0 Group: 0 Size: 3072
+File ACL: 0
+Links: 1 Blockcount: 32
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014
+EXTENTS:
+(0-2):1680-1682, (3):1683
+debugfs: quit
diff --git a/tests/f_badcluster/image.gz b/tests/f_badcluster/image.gz
new file mode 100644
index 0000000..3f21e98
--- /dev/null
+++ b/tests/f_badcluster/image.gz
Binary files differ
diff --git a/tests/f_badcluster/name b/tests/f_badcluster/name
new file mode 100644
index 0000000..06bad7c
--- /dev/null
+++ b/tests/f_badcluster/name
@@ -0,0 +1 @@
+test alignment problems with bigalloc clusters
diff --git a/tests/f_badcluster/script b/tests/f_badcluster/script
new file mode 100644
index 0000000..6c9e1cf
--- /dev/null
+++ b/tests/f_badcluster/script
@@ -0,0 +1,29 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/../f_badcluster/image.gz
+OUT=$test_name.log
+EXP=$test_dir/expect
+gzip -d < $IMAGE > $TMPFILE
+$FSCK -fy $TMPFILE > $OUT.new 2>&1
+$FSCK -fy $TMPFILE >> $OUT.new 2>&1
+$FSCK -fy $TMPFILE >> $OUT.new 2>&1
+for i in a b c d e f g; do echo "stat /$i"; done > $TMPFILE.cmd
+echo "quit" >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
diff --git a/tests/f_baddir/expect.1 b/tests/f_baddir/expect.1
new file mode 100644
index 0000000..cf46a60
--- /dev/null
+++ b/tests/f_baddir/expect.1
@@ -0,0 +1,54 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 182, should be 1024. Fix? yes
+
+Inode 13 is a zero-length directory. Clear? yes
+
+Pass 2: Checking directory structure
+Entry 'zero' in / (2) has deleted/unused inode 13. Clear? yes
+
+Entry 'foo/bar' in / (2) has illegal characters in its name.
+Fix? yes
+
+Entry 'root' in /test (14) is a link to the root inode.
+Clear? yes
+
+Entry 'badino' in /test (14) has invalid inode #: 123456.
+Clear? yes
+
+Entry 'dot' in /test (14) is a link to '.' Clear? yes
+
+Directory inode 12, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 12.
+Fix? yes
+
+Missing '..' in directory inode 12.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in /block.h (12) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+Pass 4: Checking reference counts
+Inode 12 ref count is 1, should be 2. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -22
+Fix? yes
+
+Free blocks count wrong (74, counted=75).
+Fix? yes
+
+Inode bitmap differences: -13
+Fix? yes
+
+Directories count wrong for group #0 (5, counted=4).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 1
diff --git a/tests/f_baddir/expect.2 b/tests/f_baddir/expect.2
new file mode 100644
index 0000000..e848eff
--- /dev/null
+++ b/tests/f_baddir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 0
diff --git a/tests/f_baddir/image.gz b/tests/f_baddir/image.gz
new file mode 100644
index 0000000..9d593fe
--- /dev/null
+++ b/tests/f_baddir/image.gz
Binary files differ
diff --git a/tests/f_baddir/name b/tests/f_baddir/name
new file mode 100644
index 0000000..9822221
--- /dev/null
+++ b/tests/f_baddir/name
@@ -0,0 +1 @@
+corrupted directory entries
diff --git a/tests/f_baddir2/expect.1 b/tests/f_baddir2/expect.1
new file mode 100644
index 0000000..ec6ed32
--- /dev/null
+++ b/tests/f_baddir2/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Directory inode 12, block #0, offset 60: directory corrupted
+Salvage? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/16 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 1
diff --git a/tests/f_baddir2/expect.2 b/tests/f_baddir2/expect.2
new file mode 100644
index 0000000..b85bbab
--- /dev/null
+++ b/tests/f_baddir2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/16 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 0
diff --git a/tests/f_baddir2/image.gz b/tests/f_baddir2/image.gz
new file mode 100644
index 0000000..0d9fcdf
--- /dev/null
+++ b/tests/f_baddir2/image.gz
Binary files differ
diff --git a/tests/f_baddir2/name b/tests/f_baddir2/name
new file mode 100644
index 0000000..568a7c9
--- /dev/null
+++ b/tests/f_baddir2/name
@@ -0,0 +1 @@
+salvage last directory entry
diff --git a/tests/f_baddotdir/expect.1 b/tests/f_baddotdir/expect.1
new file mode 100644
index 0000000..a7ca4e4
--- /dev/null
+++ b/tests/f_baddotdir/expect.1
@@ -0,0 +1,62 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Missing '.' in directory inode 12.
+Fix? yes
+
+Missing '..' in directory inode 12.
+Fix? yes
+
+First entry 'X' (inode=11) in directory inode 13 (/b) should be '.'
+Fix? yes
+
+Missing '..' in directory inode 14.
+Fix? yes
+
+Second entry 'XX' (inode=11) in directory inode 15 should be '..'
+Fix? yes
+
+'.' directory entry in directory inode 17 is not NULL terminated
+Fix? yes
+
+'..' directory entry in directory inode 17 is not NULL terminated
+Fix? yes
+
+Missing '.' in directory inode 16.
+Fix? yes
+
+Missing '..' in directory inode 16.
+Fix? yes
+
+Directory entry for '.' in ... (19) is big.
+Split? yes
+
+Pass 3: Checking directory connectivity
+'..' in /a (12) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+'..' in /c (14) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+'..' in /d (15) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+'..' in /e (16) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+'..' in /f (17) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (69, counted=70).
+Fix? yes
+
+Free blocks count wrong (69, counted=70).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 19/32 files (0.0% non-contiguous), 30/100 blocks
+Exit status is 1
diff --git a/tests/f_baddotdir/expect.2 b/tests/f_baddotdir/expect.2
new file mode 100644
index 0000000..0838aa3
--- /dev/null
+++ b/tests/f_baddotdir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 19/32 files (0.0% non-contiguous), 30/100 blocks
+Exit status is 0
diff --git a/tests/f_baddotdir/image.gz b/tests/f_baddotdir/image.gz
new file mode 100644
index 0000000..71df18f
--- /dev/null
+++ b/tests/f_baddotdir/image.gz
Binary files differ
diff --git a/tests/f_baddotdir/name b/tests/f_baddotdir/name
new file mode 100644
index 0000000..c13ba75
--- /dev/null
+++ b/tests/f_baddotdir/name
@@ -0,0 +1 @@
+bad '.' and '..' entries
diff --git a/tests/f_badinode/expect.1 b/tests/f_badinode/expect.1
new file mode 100644
index 0000000..8caa2cc
--- /dev/null
+++ b/tests/f_badinode/expect.1
@@ -0,0 +1,40 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_blocks is 2, should be 0. Fix? yes
+
+Pass 2: Checking directory structure
+Inode 12 (/motd) has invalid mode (0110444).
+Clear? yes
+
+i_file_acl for inode 13 (/timings) is 39, should be zero.
+Clear? yes
+
+i_blocks_hi for inode 13 (/timings) is 1024, should be zero.
+Clear? yes
+
+Inode 14 (/block_dev) is an illegal block device.
+Clear? yes
+
+Inode 15 (/char_dev) is an illegal character device.
+Clear? yes
+
+Symlink /test-symlink (inode #16) is invalid.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -25
+Fix? yes
+
+Free blocks count wrong for group #0 (76, counted=77).
+Fix? yes
+
+Free blocks count wrong (76, counted=77).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 1
diff --git a/tests/f_badinode/expect.2 b/tests/f_badinode/expect.2
new file mode 100644
index 0000000..628a376
--- /dev/null
+++ b/tests/f_badinode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 0
diff --git a/tests/f_badinode/image.gz b/tests/f_badinode/image.gz
new file mode 100644
index 0000000..7b4a0d1
--- /dev/null
+++ b/tests/f_badinode/image.gz
Binary files differ
diff --git a/tests/f_badinode/name b/tests/f_badinode/name
new file mode 100644
index 0000000..38ee2d9
--- /dev/null
+++ b/tests/f_badinode/name
@@ -0,0 +1 @@
+corrupted inode entries
diff --git a/tests/f_badjour_encrypted/expect.1 b/tests/f_badjour_encrypted/expect.1
new file mode 100644
index 0000000..0b13b9e
--- /dev/null
+++ b/tests/f_badjour_encrypted/expect.1
@@ -0,0 +1,30 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(24--25) -(27--41) -(107--1113)
+Fix? yes
+
+Free blocks count wrong for group #0 (934, counted=1958).
+Fix? yes
+
+Free blocks count wrong (934, counted=1958).
+Fix? yes
+
+Recreate journal? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (0.0% non-contiguous), 1114/2048 blocks
+Exit status is 1
diff --git a/tests/f_badjour_encrypted/expect.2 b/tests/f_badjour_encrypted/expect.2
new file mode 100644
index 0000000..76934be
--- /dev/null
+++ b/tests/f_badjour_encrypted/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (9.1% non-contiguous), 1114/2048 blocks
+Exit status is 0
diff --git a/tests/f_badjour_encrypted/name b/tests/f_badjour_encrypted/name
new file mode 100644
index 0000000..e8f4c04
--- /dev/null
+++ b/tests/f_badjour_encrypted/name
@@ -0,0 +1 @@
+journal inode has encrypt flag
diff --git a/tests/f_badjour_encrypted/script b/tests/f_badjour_encrypted/script
new file mode 100644
index 0000000..e6778f1
--- /dev/null
+++ b/tests/f_badjour_encrypted/script
@@ -0,0 +1,11 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+touch $TMPFILE
+$MKE2FS -t ext4 -b 1024 $TMPFILE 2M
+$DEBUGFS -w -R 'set_inode_field <8> flags 0x80800' $TMPFILE
+
+SKIP_GUNZIP="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_badjour_indblks/expect.1 b/tests/f_badjour_indblks/expect.1
new file mode 100644
index 0000000..cb8054c
--- /dev/null
+++ b/tests/f_badjour_indblks/expect.1
@@ -0,0 +1,32 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Adding dirhash hint to filesystem.
+
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(82--1111)
+Fix? yes
+
+Free blocks count wrong for group #0 (7080, counted=8110).
+Fix? yes
+
+Free blocks count wrong (7080, counted=8110).
+Fix? yes
+
+Recreate journal? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (0.0% non-contiguous), 1111/8192 blocks
+Exit status is 1
diff --git a/tests/f_badjour_indblks/expect.2 b/tests/f_badjour_indblks/expect.2
new file mode 100644
index 0000000..3fbb8b3
--- /dev/null
+++ b/tests/f_badjour_indblks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (0.0% non-contiguous), 1111/8192 blocks
+Exit status is 0
diff --git a/tests/f_badjour_indblks/image.gz b/tests/f_badjour_indblks/image.gz
new file mode 100644
index 0000000..67190c8
--- /dev/null
+++ b/tests/f_badjour_indblks/image.gz
Binary files differ
diff --git a/tests/f_badjour_indblks/name b/tests/f_badjour_indblks/name
new file mode 100644
index 0000000..674b99a
--- /dev/null
+++ b/tests/f_badjour_indblks/name
@@ -0,0 +1 @@
+corruption in journal inode's indirect blocks
diff --git a/tests/f_badjourblks/expect.1 b/tests/f_badjourblks/expect.1
new file mode 100644
index 0000000..5483a0d
--- /dev/null
+++ b/tests/f_badjourblks/expect.1
@@ -0,0 +1,30 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(50--1079)
+Fix? yes
+
+Free blocks count wrong for group #0 (7112, counted=8142).
+Fix? yes
+
+Free blocks count wrong (7112, counted=8142).
+Fix? yes
+
+Recreate journal? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/8192 blocks
+Exit status is 1
diff --git a/tests/f_badjourblks/expect.2 b/tests/f_badjourblks/expect.2
new file mode 100644
index 0000000..7c50703
--- /dev/null
+++ b/tests/f_badjourblks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/8192 blocks
+Exit status is 0
diff --git a/tests/f_badjourblks/image.gz b/tests/f_badjourblks/image.gz
new file mode 100644
index 0000000..e336a4b
--- /dev/null
+++ b/tests/f_badjourblks/image.gz
Binary files differ
diff --git a/tests/f_badjourblks/name b/tests/f_badjourblks/name
new file mode 100644
index 0000000..fc9cef9
--- /dev/null
+++ b/tests/f_badjourblks/name
@@ -0,0 +1 @@
+illegal blocks in journal inode (and backup in superblock)
diff --git a/tests/f_badorphan/expect.1 b/tests/f_badorphan/expect.1
new file mode 100644
index 0000000..ecf0bf7
--- /dev/null
+++ b/tests/f_badorphan/expect.1
@@ -0,0 +1,77 @@
+Clearing orphaned inode 54 (uid=0, gid=0, mode=0100600, size=44610)
+Clearing orphaned inode 32 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 67 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 55 (uid=0, gid=0, mode=040700, size=1024)
+Backing up journal inode block information.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inodes that were part of a corrupted orphan linked list found. Fix? yes
+
+Inode 13 was part of the orphaned inode list. FIXED.
+Inode 17 was part of the orphaned inode list. FIXED.
+Deleted inode 18 has zero dtime. Fix? yes
+
+Inode 19 was part of the orphaned inode list. FIXED.
+Inode 22 was part of the orphaned inode list. FIXED.
+Inode 23 was part of the orphaned inode list. FIXED.
+Inode 24 was part of the orphaned inode list. FIXED.
+Inode 25 was part of the orphaned inode list. FIXED.
+Inode 26 was part of the orphaned inode list. FIXED.
+Inode 27 was part of the orphaned inode list. FIXED.
+Inode 28 was part of the orphaned inode list. FIXED.
+Inode 30 was part of the orphaned inode list. FIXED.
+Inode 33 was part of the orphaned inode list. FIXED.
+Inode 36 was part of the orphaned inode list. FIXED.
+Inode 38 was part of the orphaned inode list. FIXED.
+Inode 43 was part of the orphaned inode list. FIXED.
+Inode 44 was part of the orphaned inode list. FIXED.
+Inode 46 was part of the orphaned inode list. FIXED.
+Inode 47 was part of the orphaned inode list. FIXED.
+Inode 51 was part of the orphaned inode list. FIXED.
+Inode 53 was part of the orphaned inode list. FIXED.
+Inode 56 was part of the orphaned inode list. FIXED.
+Inode 61 was part of the orphaned inode list. FIXED.
+Inode 65 was part of the orphaned inode list. FIXED.
+Inode 70 was part of the orphaned inode list. FIXED.
+Inode 71 was part of the orphaned inode list. FIXED.
+Inode 75 was part of the orphaned inode list. FIXED.
+Inode 77 was part of the orphaned inode list. FIXED.
+Inode 83 was part of the orphaned inode list. FIXED.
+Inode 84 was part of the orphaned inode list. FIXED.
+Inode 85 was part of the orphaned inode list. FIXED.
+Inode 87 was part of the orphaned inode list. FIXED.
+Inode 91 was part of the orphaned inode list. FIXED.
+Inode 93 was part of the orphaned inode list. FIXED.
+Inode 96 was part of the orphaned inode list. FIXED.
+Inode 97 was part of the orphaned inode list. FIXED.
+Inode 99 was part of the orphaned inode list. FIXED.
+Inode 109 was part of the orphaned inode list. FIXED.
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(1363--1399) -(1401--1405) -1461 -(1505--1533) -(1538--1540) -(1566--1574) -(1593--1600) -(1604--1605) -1654 -(1656--1703) -(1706--1726) -1728 -(1803--1804) -1913 -(2286--2295) -2392 -(2960--2973) -(3118--3154) -3345 -(3451--3452) -3569 -(3748--3749) -4409 -(4411--4414) -(4435--4456) -(4720--4725) -4929 -(4967--4984) -(5258--5275) -(5352--5354) -(5412--5425) -5493 -(5620--5647) -(5676--5677) -(5720--5744) -(5760--5788) -6013
+Fix? yes
+
+Free blocks count wrong for group #0 (5801, counted=6210).
+Fix? yes
+
+Free blocks count wrong (5801, counted=6210).
+Fix? yes
+
+Inode bitmap differences: -13 -(17--19) -(22--28) -30 -33 -36 -38 -(43--44) -(46--47) -51 -53 -56 -61 -65 -(70--71) -75 -77 -(83--85) -87 -91 -93 -(96--97) -99 -109
+Fix? yes
+
+Free inodes count wrong for group #0 (1951, counted=1989).
+Fix? yes
+
+Directories count wrong for group #0 (41, counted=22).
+Fix? yes
+
+Free inodes count wrong (1951, counted=1989).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 59/2048 files (22.0% non-contiguous), 1982/8192 blocks
+Exit status is 1
diff --git a/tests/f_badorphan/expect.2 b/tests/f_badorphan/expect.2
new file mode 100644
index 0000000..3d928eb
--- /dev/null
+++ b/tests/f_badorphan/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 59/2048 files (22.0% non-contiguous), 1982/8192 blocks
+Exit status is 0
diff --git a/tests/f_badorphan/image.gz b/tests/f_badorphan/image.gz
new file mode 100644
index 0000000..94e3a38
--- /dev/null
+++ b/tests/f_badorphan/image.gz
Binary files differ
diff --git a/tests/f_badorphan/name b/tests/f_badorphan/name
new file mode 100644
index 0000000..7c1475b
--- /dev/null
+++ b/tests/f_badorphan/name
@@ -0,0 +1 @@
+corrupted orphan list
diff --git a/tests/f_badprimary/expect.1 b/tests/f_badprimary/expect.1
new file mode 100644
index 0000000..21b814b
--- /dev/null
+++ b/tests/f_badprimary/expect.1
@@ -0,0 +1,27 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+The primary superblock (1) is on the bad block list.
+
+If the block is really bad, the filesystem can not be fixed.
+You can remove this block from the bad block list and hope
+that the block is really OK. But there are no guarantees.
+
+Clear? yes
+
+Block 2 in the primary group descriptors is on the bad block list
+
+If the block is really bad, the filesystem can not be fixed.
+You can remove this block from the bad block list and hope
+that the block is really OK. But there are no guarantees.
+
+Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_badprimary/expect.2 b/tests/f_badprimary/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/tests/f_badprimary/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_badprimary/image.gz b/tests/f_badprimary/image.gz
new file mode 100644
index 0000000..7aeb611
--- /dev/null
+++ b/tests/f_badprimary/image.gz
Binary files differ
diff --git a/tests/f_badprimary/name b/tests/f_badprimary/name
new file mode 100644
index 0000000..dacce31
--- /dev/null
+++ b/tests/f_badprimary/name
@@ -0,0 +1 @@
+bad blocks in the primary superblock and group descriptors
diff --git a/tests/f_badroot/expect.1 b/tests/f_badroot/expect.1
new file mode 100644
index 0000000..ff92426
--- /dev/null
+++ b/tests/f_badroot/expect.1
@@ -0,0 +1,29 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Root inode is not a directory. Clear? yes
+
+Pass 2: Checking directory structure
+Entry '..' in <2>/<11> (11) has deleted/unused inode 2. Clear? yes
+
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+Unconnected directory inode 11 (was in /)
+Connect to /lost+found? yes
+
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Inode 11 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 12
+Connect to /lost+found? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
+Exit status is 1
diff --git a/tests/f_badroot/expect.2 b/tests/f_badroot/expect.2
new file mode 100644
index 0000000..cab021a
--- /dev/null
+++ b/tests/f_badroot/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
+Exit status is 0
diff --git a/tests/f_badroot/image.gz b/tests/f_badroot/image.gz
new file mode 100644
index 0000000..72980a3
--- /dev/null
+++ b/tests/f_badroot/image.gz
Binary files differ
diff --git a/tests/f_badroot/name b/tests/f_badroot/name
new file mode 100644
index 0000000..399e4f2
--- /dev/null
+++ b/tests/f_badroot/name
@@ -0,0 +1 @@
+file in root directory inode
diff --git a/tests/f_badsymlinks/expect.1 b/tests/f_badsymlinks/expect.1
new file mode 100644
index 0000000..b28b57d
--- /dev/null
+++ b/tests/f_badsymlinks/expect.1
@@ -0,0 +1,61 @@
+Pass 1: Checking inodes, blocks, and sizes
+Special (device/socket/fifo/symlink) file (inode 18) has immutable
+or append-only flag set. Clear? yes
+
+Inode 19 has illegal block(s). Clear? yes
+
+Illegal block #0 (1234567890) in inode 19. CLEARED.
+Inode 19, i_blocks is 2, should be 0. Fix? yes
+
+Special (device/socket/fifo/symlink) file (inode 20) has immutable
+or append-only flag set. Clear? yes
+
+Inode 21 is too big. Truncate? yes
+
+Block #1 (22) causes symlink to be too big. CLEARED.
+Inode 21, i_blocks is 4, should be 2. Fix? yes
+
+Pass 2: Checking directory structure
+Symlink /empty_link (inode #17) is invalid.
+Clear? yes
+
+Symlink /long_fastlink (inode #13) is invalid.
+Clear? yes
+
+Symlink /long_link (inode #14) is invalid.
+Clear? yes
+
+Symlink /high_fastlink (inode #15) is invalid.
+Clear? yes
+
+Symlink /high_link (inode #16) is invalid.
+Clear? yes
+
+Symlink /empty_fastlink (inode #12) is invalid.
+Clear? yes
+
+Symlink /bad_link_block (inode #19) is invalid.
+Clear? yes
+
+Symlink /extra_link_block (inode #21) is invalid.
+Clear? yes
+
+Symlink /bad_link_size (inode #22) is invalid.
+Clear? yes
+
+Symlink /bad_fastlink_size (inode #23) is invalid.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (1000, counted=1001).
+Fix? yes
+
+Free blocks count wrong (1000, counted=1001).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/32 files (7.7% non-contiguous), 23/1024 blocks
+Exit status is 1
diff --git a/tests/f_badsymlinks/expect.2 b/tests/f_badsymlinks/expect.2
new file mode 100644
index 0000000..1499551
--- /dev/null
+++ b/tests/f_badsymlinks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/32 files (0.0% non-contiguous), 23/1024 blocks
+Exit status is 0
diff --git a/tests/f_badsymlinks/image.gz b/tests/f_badsymlinks/image.gz
new file mode 100644
index 0000000..4ebacde
--- /dev/null
+++ b/tests/f_badsymlinks/image.gz
Binary files differ
diff --git a/tests/f_badsymlinks/name b/tests/f_badsymlinks/name
new file mode 100644
index 0000000..630858f
--- /dev/null
+++ b/tests/f_badsymlinks/name
@@ -0,0 +1 @@
+corrupted symlinks
diff --git a/tests/f_badsymlinks2/expect.1 b/tests/f_badsymlinks2/expect.1
new file mode 100644
index 0000000..939edce
--- /dev/null
+++ b/tests/f_badsymlinks2/expect.1
@@ -0,0 +1,114 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Symlink /default/empty (inode #13) is invalid.
+Clear? yes
+
+Symlink /default/fast_isize_too_small (inode #15) is invalid.
+Clear? yes
+
+Symlink /default/fast_isize_too_large (inode #16) is invalid.
+Clear? yes
+
+Symlink /default/slow_isize_too_small (inode #19) is invalid.
+Clear? yes
+
+Symlink /default/slow_isize_too_large (inode #20) is invalid.
+Clear? yes
+
+Symlink /default/one_too_long (inode #22) is invalid.
+Clear? yes
+
+Symlink /default/too_long (inode #23) is invalid.
+Clear? yes
+
+Symlink /encrypted/empty (inode #25) is invalid.
+Clear? yes
+
+Symlink /encrypted/fast_isize_too_large (inode #28) is invalid.
+Clear? yes
+
+Symlink /encrypted/fast_isize_too_small (inode #27) is invalid.
+Clear? yes
+
+Symlink /encrypted/one_too_long (inode #34) is invalid.
+Clear? yes
+
+Symlink /encrypted/slow_isize_too_large (inode #32) is invalid.
+Clear? yes
+
+Symlink /encrypted/slow_isize_too_small (inode #31) is invalid.
+Clear? yes
+
+Symlink /encrypted/too_long (inode #35) is invalid.
+Clear? yes
+
+Symlink /extents/empty (inode #38) is invalid.
+Clear? yes
+
+Symlink /extents/fast_isize_too_small (inode #40) is invalid.
+Clear? yes
+
+Symlink /extents/fast_isize_too_large (inode #41) is invalid.
+Clear? yes
+
+Symlink /extents/slow_isize_too_small (inode #44) is invalid.
+Clear? yes
+
+Symlink /extents/slow_isize_too_large (inode #45) is invalid.
+Clear? yes
+
+Symlink /extents/one_too_long (inode #47) is invalid.
+Clear? yes
+
+Symlink /extents/too_long (inode #48) is invalid.
+Clear? yes
+
+Symlink /extents_encrypted/empty (inode #50) is invalid.
+Clear? yes
+
+Symlink /extents_encrypted/fast_isize_too_large (inode #53) is invalid.
+Clear? yes
+
+Symlink /extents_encrypted/fast_isize_too_small (inode #52) is invalid.
+Clear? yes
+
+Symlink /extents_encrypted/one_too_long (inode #59) is invalid.
+Clear? yes
+
+Symlink /extents_encrypted/slow_isize_too_large (inode #57) is invalid.
+Clear? yes
+
+Symlink /extents_encrypted/slow_isize_too_small (inode #56) is invalid.
+Clear? yes
+
+Symlink /extents_encrypted/too_long (inode #60) is invalid.
+Clear? yes
+
+Symlink /inline_data/empty (inode #63) is invalid.
+Clear? yes
+
+Symlink /inline_data/fast_isize_too_small (inode #65) is invalid.
+Clear? yes
+
+Symlink /inline_data/fast_isize_too_large (inode #66) is invalid.
+Clear? yes
+
+Symlink /inline_data/slow_isize_too_small (inode #69) is invalid.
+Clear? yes
+
+Symlink /inline_data/slow_isize_too_large (inode #70) is invalid.
+Clear? yes
+
+Symlink /inline_data/one_too_long (inode #72) is invalid.
+Clear? yes
+
+Symlink /inline_data/too_long (inode #73) is invalid.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 36/80 files (0.0% non-contiguous), 31/150 blocks
+Exit status is 1
diff --git a/tests/f_badsymlinks2/expect.2 b/tests/f_badsymlinks2/expect.2
new file mode 100644
index 0000000..3da98a8
--- /dev/null
+++ b/tests/f_badsymlinks2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 36/80 files (0.0% non-contiguous), 31/150 blocks
+Exit status is 0
diff --git a/tests/f_badsymlinks2/image.gz b/tests/f_badsymlinks2/image.gz
new file mode 100644
index 0000000..d1f314c
--- /dev/null
+++ b/tests/f_badsymlinks2/image.gz
Binary files differ
diff --git a/tests/f_badsymlinks2/mkimage.sh b/tests/f_badsymlinks2/mkimage.sh
new file mode 100755
index 0000000..6bbf020
--- /dev/null
+++ b/tests/f_badsymlinks2/mkimage.sh
@@ -0,0 +1,127 @@
+#!/bin/bash
+
+# This is the script that was used to create the image.gz in this directory.
+
+set -e -u
+
+BLOCKSIZE=4096
+
+do_debugfs() {
+ umount mnt
+ debugfs -w "$@" image
+ mount image mnt
+}
+
+do_tune2fs() {
+ umount mnt
+ tune2fs $@ image
+ mount image mnt
+}
+
+symlink() {
+ local len=$1
+ local src=$2
+ local target=$(perl -e 'print "A" x '$len)
+ ln -s $target $src
+ stat -c %i $src
+}
+
+# Overwrite the length in the header of the encrypted symlink target
+set_encrypted_symlink_len() {
+ local ino=$1
+ local len=$2
+
+ echo "zap_block -f <$ino> -p $((len%256)) -o 0 -l 1 0"
+ echo "zap_block -f <$ino> -p $((len/256)) -o 1 -l 1 0"
+}
+
+create_symlinks() {
+ local dir=$1
+ local encrypted=${2:-false}
+ local overhead=0
+ local ino
+
+ if $encrypted; then
+ overhead=2
+ fi
+
+ mkdir -p $dir
+
+ {
+ ino=$(symlink 1 $dir/empty)
+ echo "set_inode_field <$ino> i_size 10"
+ echo "set_inode_field <$ino> block[0] 0"
+
+ symlink 1 $dir/fast_min > /dev/null
+
+ ino=$(symlink 10 $dir/fast_isize_too_small)
+ echo "set_inode_field <$ino> i_size 1"
+
+ ino=$(symlink 10 $dir/fast_isize_too_large)
+ echo "set_inode_field <$ino> i_size 20"
+
+ symlink $((59 - overhead)) $dir/fast_max > /dev/null
+
+ symlink $((60 - overhead)) $dir/slow_min > /dev/null
+
+ ino=$(symlink 100 $dir/slow_isize_too_small)
+ echo "set_inode_field <$ino> i_size 80"
+
+ ino=$(symlink 100 $dir/slow_isize_too_large)
+ echo "set_inode_field <$ino> i_size 120"
+
+ symlink $((BLOCKSIZE - 1 - overhead)) $dir/slow_max > /dev/null
+
+ ino=$(symlink $((BLOCKSIZE - 1 - overhead)) $dir/one_too_long)
+ echo "set_inode_field <$ino> i_size $BLOCKSIZE"
+ echo "zap_block -f <$ino> -p 65 0"
+ if $encrypted; then
+ set_encrypted_symlink_len $ino $((BLOCKSIZE - overhead))
+ fi
+
+ ino=$(symlink $((BLOCKSIZE - 1 - overhead)) $dir/too_long)
+ echo "set_inode_field <$ino> i_size $((BLOCKSIZE + 1000))"
+ echo "zap_block -f <$ino> -p 65 0"
+ if $encrypted; then
+ set_encrypted_symlink_len $ino $((BLOCKSIZE + 1000 - overhead))
+ fi
+
+ } >> debugfs_commands
+ do_debugfs < debugfs_commands
+}
+
+create_encrypted_symlinks() {
+ local dir=$1 link
+
+ mkdir $dir
+ echo | e4crypt add_key $dir
+ create_symlinks $dir true
+
+ # Move symlinks into an unencrypted directory (leaving their targets
+ # encrypted). This makes the fsck output consistent.
+ mv $dir ${dir}~encrypted
+ mkdir $dir
+ mv ${dir}~encrypted/* $dir
+}
+
+mkdir -p mnt
+umount mnt &> /dev/null || true
+dd if=/dev/zero of=image bs=1024 count=600
+
+mke2fs -O 'encrypt,^extents,^64bit' -b $BLOCKSIZE -I 256 image
+mount image mnt
+
+create_symlinks mnt/default
+create_encrypted_symlinks mnt/encrypted
+
+do_tune2fs -O extents
+create_symlinks mnt/extents
+create_encrypted_symlinks mnt/extents_encrypted
+
+do_debugfs -R 'feature inline_data'
+create_symlinks mnt/inline_data
+
+rm -rf debugfs_commands mnt/*~encrypted
+umount mnt
+rmdir mnt
+gzip -9 -f image
diff --git a/tests/f_badsymlinks2/name b/tests/f_badsymlinks2/name
new file mode 100644
index 0000000..81d3285
--- /dev/null
+++ b/tests/f_badsymlinks2/name
@@ -0,0 +1 @@
+more types of corrupted symlinks
diff --git a/tests/f_badtable/expect.1 b/tests/f_badtable/expect.1
new file mode 100644
index 0000000..56881f1
--- /dev/null
+++ b/tests/f_badtable/expect.1
@@ -0,0 +1,45 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Group 0's block bitmap (3) is bad. Relocate? yes
+
+Group 0's inode bitmap (4) is bad. Relocate? yes
+
+Relocating group 0's block bitmap from 3 to 9...
+Relocating group 0's inode bitmap from 4 to 10...
+Pass 2: Checking directory structure
+Entry 'lost+found' in / (2) points to inode (11) located in a bad block.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(12--20)
+Fix? yes
+
+Free blocks count wrong for group #0 (77, counted=87).
+Fix? yes
+
+Free blocks count wrong (77, counted=87).
+Fix? yes
+
+Inode bitmap differences: +(12--16) +(25--32)
+Fix? yes
+
+Free inodes count wrong for group #0 (20, counted=7).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (20, counted=7).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 25/32 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
diff --git a/tests/f_badtable/expect.2 b/tests/f_badtable/expect.2
new file mode 100644
index 0000000..c1c554c
--- /dev/null
+++ b/tests/f_badtable/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 25/32 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 0
diff --git a/tests/f_badtable/image.gz b/tests/f_badtable/image.gz
new file mode 100644
index 0000000..48dbac1
--- /dev/null
+++ b/tests/f_badtable/image.gz
Binary files differ
diff --git a/tests/f_badtable/name b/tests/f_badtable/name
new file mode 100644
index 0000000..e4a8bae
--- /dev/null
+++ b/tests/f_badtable/name
@@ -0,0 +1 @@
+bad blocks in bitmaps and inode table
diff --git a/tests/f_bb_in_bb/expect.1 b/tests/f_bb_in_bb/expect.1
new file mode 100644
index 0000000..1bd697e
--- /dev/null
+++ b/tests/f_bb_in_bb/expect.1
@@ -0,0 +1,19 @@
+Pass 1: Checking inodes, blocks, and sizes
+Bad block list says the bad block list inode is bad. Clear inode? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (493, counted=494).
+Fix? yes
+
+Free blocks count wrong (493, counted=494).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_bb_in_bb/expect.2 b/tests/f_bb_in_bb/expect.2
new file mode 100644
index 0000000..411e656
--- /dev/null
+++ b/tests/f_bb_in_bb/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_bb_in_bb/image.gz b/tests/f_bb_in_bb/image.gz
new file mode 100644
index 0000000..e2c46c0
--- /dev/null
+++ b/tests/f_bb_in_bb/image.gz
Binary files differ
diff --git a/tests/f_bb_in_bb/name b/tests/f_bb_in_bb/name
new file mode 100644
index 0000000..88727e1
--- /dev/null
+++ b/tests/f_bb_in_bb/name
@@ -0,0 +1 @@
+bad block inode table block in bad block list
diff --git a/tests/f_bbfile/expect.1 b/tests/f_bbfile/expect.1
new file mode 100644
index 0000000..ec1a36e
--- /dev/null
+++ b/tests/f_bbfile/expect.1
@@ -0,0 +1,48 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Group 0's inode bitmap (4) is bad. Relocate? yes
+
+Relocating group 0's inode bitmap from 4 to 43...
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 2: 21
+Multiply-claimed block(s) in inode 11: 9--20
+Multiply-claimed block(s) in inode 12: 25--26
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 3 inodes containing multiply-claimed blocks.)
+
+File / (inode #2, mod time Sun Jan 2 08:29:13 1994)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ <The bad blocks inode> (inode #1, mod time Sun Jul 17 00:47:58 1994)
+Clone multiply-claimed blocks? yes
+
+File /lost+found (inode #11, mod time Sun Jan 2 08:28:40 1994)
+ has 12 multiply-claimed block(s), shared with 1 file(s):
+ <The bad blocks inode> (inode #1, mod time Sun Jul 17 00:47:58 1994)
+Clone multiply-claimed blocks? yes
+
+File /termcap (inode #12, mod time Sun Jan 2 08:29:13 1994)
+ has 2 multiply-claimed block(s), shared with 1 file(s):
+ <The bad blocks inode> (inode #1, mod time Sun Jul 17 00:47:58 1994)
+Clone multiply-claimed blocks? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +43
+Fix? yes
+
+Free blocks count wrong for group #0 (57, counted=41).
+Fix? yes
+
+Free blocks count wrong (57, counted=41).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (0.0% non-contiguous), 59/100 blocks
+Exit status is 1
diff --git a/tests/f_bbfile/expect.2 b/tests/f_bbfile/expect.2
new file mode 100644
index 0000000..92491da
--- /dev/null
+++ b/tests/f_bbfile/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (8.3% non-contiguous), 59/100 blocks
+Exit status is 0
diff --git a/tests/f_bbfile/image.gz b/tests/f_bbfile/image.gz
new file mode 100644
index 0000000..3b01381
--- /dev/null
+++ b/tests/f_bbfile/image.gz
Binary files differ
diff --git a/tests/f_bbfile/name b/tests/f_bbfile/name
new file mode 100644
index 0000000..8843fbb
--- /dev/null
+++ b/tests/f_bbfile/name
@@ -0,0 +1 @@
+bad blocks in files
diff --git a/tests/f_bbinode/expect.1 b/tests/f_bbinode/expect.1
new file mode 100644
index 0000000..667d666
--- /dev/null
+++ b/tests/f_bbinode/expect.1
@@ -0,0 +1,51 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'a6' in / (2) points to inode (17) located in a bad block.
+Clear? yes
+
+Entry 'a7' in / (2) points to inode (18) located in a bad block.
+Clear? yes
+
+Entry 'a8' in / (2) points to inode (19) located in a bad block.
+Clear? yes
+
+Entry 'b1' in / (2) points to inode (20) located in a bad block.
+Clear? yes
+
+Entry 'b2' in / (2) points to inode (21) located in a bad block.
+Clear? yes
+
+Entry 'b3' in / (2) points to inode (22) located in a bad block.
+Clear? yes
+
+Entry 'b4' in / (2) points to inode (23) located in a bad block.
+Clear? yes
+
+Entry 'b5' in / (2) points to inode (24) located in a bad block.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -83
+Fix? yes
+
+Free blocks count wrong for group #0 (1962, counted=1965).
+Fix? yes
+
+Free blocks count wrong (1962, counted=1965).
+Fix? yes
+
+Inode bitmap differences: +(41--48)
+Fix? yes
+
+Free inodes count wrong for group #0 (485, counted=477).
+Fix? yes
+
+Free inodes count wrong (485, counted=477).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 35/512 files (0.0% non-contiguous), 83/2048 blocks
+Exit status is 1
diff --git a/tests/f_bbinode/expect.2 b/tests/f_bbinode/expect.2
new file mode 100644
index 0000000..c65289d
--- /dev/null
+++ b/tests/f_bbinode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 35/512 files (0.0% non-contiguous), 83/2048 blocks
+Exit status is 0
diff --git a/tests/f_bbinode/image.gz b/tests/f_bbinode/image.gz
new file mode 100644
index 0000000..34dcf48
--- /dev/null
+++ b/tests/f_bbinode/image.gz
Binary files differ
diff --git a/tests/f_bbinode/name b/tests/f_bbinode/name
new file mode 100644
index 0000000..c5db3e5
--- /dev/null
+++ b/tests/f_bbinode/name
@@ -0,0 +1 @@
+bad blocks in inode table
diff --git a/tests/f_big_sparse/expect.1 b/tests/f_big_sparse/expect.1
new file mode 100644
index 0000000..eac82ed
--- /dev/null
+++ b/tests/f_big_sparse/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 61440, should be 4398050758656. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/64 files (0.0% non-contiguous), 27/100 blocks
+Exit status is 1
diff --git a/tests/f_big_sparse/expect.2 b/tests/f_big_sparse/expect.2
new file mode 100644
index 0000000..ae45ec5
--- /dev/null
+++ b/tests/f_big_sparse/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/64 files (0.0% non-contiguous), 27/100 blocks
+Exit status is 0
diff --git a/tests/f_big_sparse/image.gz b/tests/f_big_sparse/image.gz
new file mode 100644
index 0000000..027feeb
--- /dev/null
+++ b/tests/f_big_sparse/image.gz
Binary files differ
diff --git a/tests/f_big_sparse/name b/tests/f_big_sparse/name
new file mode 100644
index 0000000..b9d9723
--- /dev/null
+++ b/tests/f_big_sparse/name
@@ -0,0 +1 @@
+big sparse file
diff --git a/tests/f_bigalloc_badinode/expect.1 b/tests/f_bigalloc_badinode/expect.1
new file mode 100644
index 0000000..615828a
--- /dev/null
+++ b/tests/f_bigalloc_badinode/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Symlink /testfile (inode #12) is invalid.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/64 files (0.0% non-contiguous), 112/1024 blocks
+Exit status is 1
diff --git a/tests/f_bigalloc_badinode/expect.2 b/tests/f_bigalloc_badinode/expect.2
new file mode 100644
index 0000000..16d88fa
--- /dev/null
+++ b/tests/f_bigalloc_badinode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 112/1024 blocks
+Exit status is 0
diff --git a/tests/f_bigalloc_badinode/name b/tests/f_bigalloc_badinode/name
new file mode 100644
index 0000000..e1ed216
--- /dev/null
+++ b/tests/f_bigalloc_badinode/name
@@ -0,0 +1 @@
+delete bad inode handling for bigalloc filesystems
diff --git a/tests/f_bigalloc_badinode/script b/tests/f_bigalloc_badinode/script
new file mode 100644
index 0000000..6ceb6ee
--- /dev/null
+++ b/tests/f_bigalloc_badinode/script
@@ -0,0 +1,23 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+dd if=$TEST_BITS of=$TEST_DATA bs=4k count=2 seek=1> /dev/null 2>&1
+
+touch $TMPFILE
+$MKE2FS -Fq -t ext4 -o Linux -O bigalloc -C 16384 $TMPFILE 1M > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write $TEST_DATA testfile
+set_inode_field testfile i_mode 0120000
+quit
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA
diff --git a/tests/f_bigalloc_orphan_list/expect.1 b/tests/f_bigalloc_orphan_list/expect.1
new file mode 100644
index 0000000..9b83a2f
--- /dev/null
+++ b/tests/f_bigalloc_orphan_list/expect.1
@@ -0,0 +1,10 @@
+Clearing orphaned inode 12 (uid=0, gid=0, mode=0100644, size=28672)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/64 files (0.0% non-contiguous), 112/1024 blocks
+Exit status is 0
diff --git a/tests/f_bigalloc_orphan_list/expect.2 b/tests/f_bigalloc_orphan_list/expect.2
new file mode 100644
index 0000000..16d88fa
--- /dev/null
+++ b/tests/f_bigalloc_orphan_list/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 112/1024 blocks
+Exit status is 0
diff --git a/tests/f_bigalloc_orphan_list/name b/tests/f_bigalloc_orphan_list/name
new file mode 100644
index 0000000..5d9566f
--- /dev/null
+++ b/tests/f_bigalloc_orphan_list/name
@@ -0,0 +1 @@
+orphaned list handling with bigalloc file systems
diff --git a/tests/f_bigalloc_orphan_list/script b/tests/f_bigalloc_orphan_list/script
new file mode 100644
index 0000000..8a062dc
--- /dev/null
+++ b/tests/f_bigalloc_orphan_list/script
@@ -0,0 +1,28 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+dd if=$TEST_BITS of=$TEST_DATA bs=28k count=1 > /dev/null 2>&1
+
+touch $TMPFILE
+$MKE2FS -Fq -t ext4 -o Linux -O bigalloc $TMPFILE 1M > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write $TEST_DATA testfile
+set_inode_field testfile links_count 0
+set_inode_field testfile mode 0100644
+set_inode_field testfile bmap[0] 0
+set_inode_field testfile bmap[2] 0
+set_super_value last_orphan 12
+unlink testfile
+quit
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA
diff --git a/tests/f_bigalloc_symlink_with_xattr/expect.1 b/tests/f_bigalloc_symlink_with_xattr/expect.1
new file mode 100644
index 0000000..0e6c199
--- /dev/null
+++ b/tests/f_bigalloc_symlink_with_xattr/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 112/128 blocks
+Exit status is 0
diff --git a/tests/f_bigalloc_symlink_with_xattr/image.gz b/tests/f_bigalloc_symlink_with_xattr/image.gz
new file mode 100644
index 0000000..cbd125d
--- /dev/null
+++ b/tests/f_bigalloc_symlink_with_xattr/image.gz
Binary files differ
diff --git a/tests/f_bigalloc_symlink_with_xattr/name b/tests/f_bigalloc_symlink_with_xattr/name
new file mode 100644
index 0000000..8adbd9a
--- /dev/null
+++ b/tests/f_bigalloc_symlink_with_xattr/name
@@ -0,0 +1 @@
+fast symlink + xattr block on bigalloc fs
diff --git a/tests/f_bigalloc_symlink_with_xattr/script b/tests/f_bigalloc_symlink_with_xattr/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_bigalloc_symlink_with_xattr/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_bitmaps/expect.1 b/tests/f_bitmaps/expect.1
new file mode 100644
index 0000000..2e91113
--- /dev/null
+++ b/tests/f_bitmaps/expect.1
@@ -0,0 +1,19 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +12 -20 +41 -50
+Fix? yes
+
+Inode bitmap differences: +11 -15
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_bitmaps/expect.2 b/tests/f_bitmaps/expect.2
new file mode 100644
index 0000000..73d1c27
--- /dev/null
+++ b/tests/f_bitmaps/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_bitmaps/image.gz b/tests/f_bitmaps/image.gz
new file mode 100644
index 0000000..1c533eb
--- /dev/null
+++ b/tests/f_bitmaps/image.gz
Binary files differ
diff --git a/tests/f_bitmaps/name b/tests/f_bitmaps/name
new file mode 100644
index 0000000..a309bfa
--- /dev/null
+++ b/tests/f_bitmaps/name
@@ -0,0 +1 @@
+corrupted inode and block bitmaps
diff --git a/tests/f_boundscheck/expect.1 b/tests/f_boundscheck/expect.1
new file mode 100644
index 0000000..c2170b8
--- /dev/null
+++ b/tests/f_boundscheck/expect.1
@@ -0,0 +1,25 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for inode table
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+../e2fsck/e2fsck: Bad magic number in super-block while using the backup blocks../e2fsck/e2fsck: going back to original superblock
+Note: if several inode or block bitmap blocks or part
+of the inode table require relocation, you may wish to try
+running e2fsck with the '-b 8193' option first. The problem
+may lie only with the primary block group descriptors, and
+the backup block group descriptors may be OK.
+
+Inode table for group 1 is not in group. (block 4294967295)
+WARNING: SEVERE DATA LOSS POSSIBLE.
+Relocate? yes
+
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 1 checksum is 0x6ea2, should be 0x7edd. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Error allocating 256 contiguous block(s) in block group 1 for inode table: Could not allocate block in ext2 filesystem
+e2fsck: aborted
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+Exit status is 0
diff --git a/tests/f_boundscheck/expect.2 b/tests/f_boundscheck/expect.2
new file mode 100644
index 0000000..c2170b8
--- /dev/null
+++ b/tests/f_boundscheck/expect.2
@@ -0,0 +1,25 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for inode table
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+../e2fsck/e2fsck: Bad magic number in super-block while using the backup blocks../e2fsck/e2fsck: going back to original superblock
+Note: if several inode or block bitmap blocks or part
+of the inode table require relocation, you may wish to try
+running e2fsck with the '-b 8193' option first. The problem
+may lie only with the primary block group descriptors, and
+the backup block group descriptors may be OK.
+
+Inode table for group 1 is not in group. (block 4294967295)
+WARNING: SEVERE DATA LOSS POSSIBLE.
+Relocate? yes
+
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 1 checksum is 0x6ea2, should be 0x7edd. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Error allocating 256 contiguous block(s) in block group 1 for inode table: Could not allocate block in ext2 filesystem
+e2fsck: aborted
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+Exit status is 0
diff --git a/tests/f_boundscheck/image.bz2 b/tests/f_boundscheck/image.bz2
new file mode 100644
index 0000000..098d02e
--- /dev/null
+++ b/tests/f_boundscheck/image.bz2
Binary files differ
diff --git a/tests/f_boundscheck/name b/tests/f_boundscheck/name
new file mode 100644
index 0000000..7d71be5
--- /dev/null
+++ b/tests/f_boundscheck/name
@@ -0,0 +1 @@
+infinite loop when finding table free space
diff --git a/tests/f_boundscheck/script b/tests/f_boundscheck/script
new file mode 100755
index 0000000..7a07265
--- /dev/null
+++ b/tests/f_boundscheck/script
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+#e2label $TMPFILE test_filesys
+
+# Run fsck to fix things?
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+
+$FSCK $FSCK_OPT $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi
diff --git a/tests/f_clear_xattr/expect.1 b/tests/f_clear_xattr/expect.1
new file mode 100644
index 0000000..5cfbeaf
--- /dev/null
+++ b/tests/f_clear_xattr/expect.1
@@ -0,0 +1,38 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 14, i_blocks is 2, should be 0. Fix? yes
+
+Inode 12, i_blocks is 4, should be 2. Fix? yes
+
+Inode 13, i_blocks is 2, should be 0. Fix? yes
+
+Inode 15, i_blocks is 4, should be 2. Fix? yes
+
+Pass 2: Checking directory structure
+i_file_acl for inode 12 (/dir) is 22, should be zero.
+Clear? yes
+
+i_file_acl for inode 13 (/file) is 22, should be zero.
+Clear? yes
+
+i_file_acl for inode 14 (/symlink) is 22, should be zero.
+Clear? yes
+
+i_file_acl for inode 15 (/long-symlink) is 23, should be zero.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(22--23)
+Fix? yes
+
+Free blocks count wrong for group #0 (76, counted=78).
+Fix? yes
+
+Free blocks count wrong (76, counted=78).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_clear_xattr/expect.2 b/tests/f_clear_xattr/expect.2
new file mode 100644
index 0000000..306d267
--- /dev/null
+++ b/tests/f_clear_xattr/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_clear_xattr/image.gz b/tests/f_clear_xattr/image.gz
new file mode 100644
index 0000000..99aca14
--- /dev/null
+++ b/tests/f_clear_xattr/image.gz
Binary files differ
diff --git a/tests/f_clear_xattr/name b/tests/f_clear_xattr/name
new file mode 100644
index 0000000..2ead690
--- /dev/null
+++ b/tests/f_clear_xattr/name
@@ -0,0 +1 @@
+clearing i_file_acl when !ext_attr feature
diff --git a/tests/f_cloneblock_alloc_error/expect.1 b/tests/f_cloneblock_alloc_error/expect.1
new file mode 100644
index 0000000..24fe1ff
--- /dev/null
+++ b/tests/f_cloneblock_alloc_error/expect.1
@@ -0,0 +1,36 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 0, should be 2015232. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 13: 8
+Multiply-claimed block(s) in inode 14: 8
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 2 inodes containing multiply-claimed blocks.)
+
+File /b (inode #13, mod time Wed Jan 21 03:41:55 2015)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /c (inode #14, mod time Wed Jan 21 03:42:37 2015)
+Clone multiply-claimed blocks? yes
+
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+Delete file? yes
+
+File /c (inode #14, mod time Wed Jan 21 03:42:37 2015)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /b (inode #13, mod time Wed Jan 21 03:41:55 2015)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Entry 'b' in / (2) has deleted/unused inode 13. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/128 files (7.7% non-contiguous), 512/512 blocks
+Exit status is 1
diff --git a/tests/f_cloneblock_alloc_error/expect.2 b/tests/f_cloneblock_alloc_error/expect.2
new file mode 100644
index 0000000..f7781ec
--- /dev/null
+++ b/tests/f_cloneblock_alloc_error/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/128 files (7.7% non-contiguous), 512/512 blocks
+Exit status is 0
diff --git a/tests/f_cloneblock_alloc_error/image.gz b/tests/f_cloneblock_alloc_error/image.gz
new file mode 100644
index 0000000..ed01df1
--- /dev/null
+++ b/tests/f_cloneblock_alloc_error/image.gz
Binary files differ
diff --git a/tests/f_cloneblock_alloc_error/name b/tests/f_cloneblock_alloc_error/name
new file mode 100644
index 0000000..9196e89
--- /dev/null
+++ b/tests/f_cloneblock_alloc_error/name
@@ -0,0 +1 @@
+decrement badcount after remapping duplicate block
diff --git a/tests/f_collapse_extent_tree/expect.1 b/tests/f_collapse_extent_tree/expect.1
new file mode 100644
index 0000000..a62e99d
--- /dev/null
+++ b/tests/f_collapse_extent_tree/expect.1
@@ -0,0 +1,16 @@
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 0 9 1
+ 1/ 1 1/ 1 0 - 0 10 - 10 1
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 extent tree (at level 1) could be shorter. Optimize? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
diff --git a/tests/f_collapse_extent_tree/expect.2 b/tests/f_collapse_extent_tree/expect.2
new file mode 100644
index 0000000..a1d28b1
--- /dev/null
+++ b/tests/f_collapse_extent_tree/expect.2
@@ -0,0 +1,10 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 1 0 - 0 10 - 10 1
diff --git a/tests/f_collapse_extent_tree/image.gz b/tests/f_collapse_extent_tree/image.gz
new file mode 100644
index 0000000..97036cc
--- /dev/null
+++ b/tests/f_collapse_extent_tree/image.gz
Binary files differ
diff --git a/tests/f_collapse_extent_tree/name b/tests/f_collapse_extent_tree/name
new file mode 100644
index 0000000..83e506f
--- /dev/null
+++ b/tests/f_collapse_extent_tree/name
@@ -0,0 +1 @@
+extent tree can be collapsed one level
diff --git a/tests/f_collapse_extent_tree/script b/tests/f_collapse_extent_tree/script
new file mode 100644
index 0000000..daea6a8
--- /dev/null
+++ b/tests/f_collapse_extent_tree/script
@@ -0,0 +1,115 @@
+if [ "$DESCRIPTION"x != x ]; then
+ test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+ IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+ FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+ SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+ OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+ OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+ if [ -f $test_dir/expect.1.gz ]; then
+ EXP1=$test_name.1.tmp
+ gunzip < $test_dir/expect.1.gz > $EXP1
+ else
+ EXP1=$test_dir/expect.1
+ fi
+fi
+
+if [ "$EXP2"x = x ]; then
+ if [ -f $test_dir/expect.2.gz ]; then
+ EXP2=$test_name.2.tmp
+ gunzip < $test_dir/expect.2.gz > $EXP2
+ else
+ EXP2=$test_dir/expect.2
+ fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+ gunzip < $IMAGE > $TMPFILE
+fi
+
+eval $PREP_CMD
+
+echo 'ex /a' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE > $OUT1.new 2>&1
+rm -f $TMPFILE.cmd
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed $OUT1.new > $OUT1
+rm -f $OUT1.new
+
+if [ "$ONE_PASS_ONLY" != "true" ]; then
+ $FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
+ status=$?
+ echo Exit status is $status >> $OUT2.new
+ echo 'ex /a' > $TMPFILE.cmd
+ $DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT2.new 2>&1
+ sed -f $cmd_dir/filter.sed $OUT2.new > $OUT2
+ rm -f $TMPFILE.cmd $OUT2.new
+fi
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+ rm -f $test_name.ok $test_name.failed
+ cmp -s $OUT1 $EXP1
+ status1=$?
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ cmp -s $OUT2 $EXP2
+ status2=$?
+ else
+ status2=0
+ fi
+ if [ "$PASS_ZERO" = "true" ]; then
+ cmp -s $test_name.0.log $test_dir/expect.0
+ status3=$?
+ else
+ status3=0
+ fi
+
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
+ if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+ echo "$description: ok"
+ touch $test_name.ok
+ else
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+ rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2
+ unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+ unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+
diff --git a/tests/f_compress_extent_tree_level/expect.1 b/tests/f_compress_extent_tree_level/expect.1
new file mode 100644
index 0000000..241faa3
--- /dev/null
+++ b/tests/f_compress_extent_tree_level/expect.1
@@ -0,0 +1,23 @@
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 2 0 - 16 9 17
+ 1/ 1 1/ 4 0 - 0 10 - 10 1
+ 1/ 1 2/ 4 11 - 11 100 - 100 1
+ 1/ 1 3/ 4 13 - 13 101 - 101 1
+ 1/ 1 4/ 4 15 - 15 102 - 102 1
+ 0/ 1 2/ 2 17 - 21 12 5
+ 1/ 1 1/ 3 17 - 17 103 - 103 1
+ 1/ 1 2/ 3 19 - 19 104 - 104 1
+ 1/ 1 3/ 3 21 - 21 105 - 105 1
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 extent tree (at level 1) could be narrower. Optimize? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (8.3% non-contiguous), 26/512 blocks
+Exit status is 0
diff --git a/tests/f_compress_extent_tree_level/expect.2 b/tests/f_compress_extent_tree_level/expect.2
new file mode 100644
index 0000000..07d1082
--- /dev/null
+++ b/tests/f_compress_extent_tree_level/expect.2
@@ -0,0 +1,17 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 26/512 blocks
+Exit status is 0
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 21 9 22
+ 1/ 1 1/ 7 0 - 0 10 - 10 1
+ 1/ 1 2/ 7 11 - 11 100 - 100 1
+ 1/ 1 3/ 7 13 - 13 101 - 101 1
+ 1/ 1 4/ 7 15 - 15 102 - 102 1
+ 1/ 1 5/ 7 17 - 17 103 - 103 1
+ 1/ 1 6/ 7 19 - 19 104 - 104 1
+ 1/ 1 7/ 7 21 - 21 105 - 105 1
diff --git a/tests/f_compress_extent_tree_level/image.gz b/tests/f_compress_extent_tree_level/image.gz
new file mode 100644
index 0000000..a552a58
--- /dev/null
+++ b/tests/f_compress_extent_tree_level/image.gz
Binary files differ
diff --git a/tests/f_compress_extent_tree_level/name b/tests/f_compress_extent_tree_level/name
new file mode 100644
index 0000000..fde4f4a
--- /dev/null
+++ b/tests/f_compress_extent_tree_level/name
@@ -0,0 +1 @@
+compress an extent tree level
diff --git a/tests/f_compress_extent_tree_level/script b/tests/f_compress_extent_tree_level/script
new file mode 100644
index 0000000..c5ffa22
--- /dev/null
+++ b/tests/f_compress_extent_tree_level/script
@@ -0,0 +1,117 @@
+if [ "$DESCRIPTION"x != x ]; then
+ test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+ IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+ FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+ SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+ OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+ OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+ if [ -f $test_dir/expect.1.gz ]; then
+ EXP1=$test_name.1.tmp
+ gunzip < $test_dir/expect.1.gz > $EXP1
+ else
+ EXP1=$test_dir/expect.1
+ fi
+fi
+
+if [ "$EXP2"x = x ]; then
+ if [ -f $test_dir/expect.2.gz ]; then
+ EXP2=$test_name.2.tmp
+ gunzip < $test_dir/expect.2.gz > $EXP2
+ else
+ EXP2=$test_dir/expect.2
+ fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+ gunzip < $IMAGE > $TMPFILE
+fi
+
+cp /dev/null $OUT1
+
+eval $PREP_CMD
+
+echo 'ex /a' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE > $OUT1.new 2>&1
+rm -f $TMPFILE.cmd
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed $OUT1.new > $OUT1
+rm -f $OUT1.new
+
+if [ "$ONE_PASS_ONLY" != "true" ]; then
+ $FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
+ status=$?
+ echo Exit status is $status >> $OUT2.new
+ echo 'ex /a' > $TMPFILE.cmd
+ $DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT2.new 2>&1
+ sed -f $cmd_dir/filter.sed $OUT2.new > $OUT2
+ rm -f $TMPFILE.cmd $OUT2.new
+fi
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+ rm -f $test_name.ok $test_name.failed
+ cmp -s $OUT1 $EXP1
+ status1=$?
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ cmp -s $OUT2 $EXP2
+ status2=$?
+ else
+ status2=0
+ fi
+ if [ "$PASS_ZERO" = "true" ]; then
+ cmp -s $test_name.0.log $test_dir/expect.0
+ status3=$?
+ else
+ status3=0
+ fi
+
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
+ if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+ echo "$description: ok"
+ touch $test_name.ok
+ else
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+ rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2
+ unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+ unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+
diff --git a/tests/f_convert_bmap/expect.1 b/tests/f_convert_bmap/expect.1
new file mode 100644
index 0000000..716dbcb
--- /dev/null
+++ b/tests/f_convert_bmap/expect.1
@@ -0,0 +1,26 @@
+debugfs: stat /a
+Inode: 12 Type: regular Mode: 0644 Flags: 0x0
+Generation: 1573716129 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 524288
+File ACL: 0
+Links: 1 Blockcount: 1030
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x5457f87a:62ae2980 -- Mon Nov 3 21:49:46 2014
+ atime: 0x5457f87a:61ba0598 -- Mon Nov 3 21:49:46 2014
+ mtime: 0x5457f87a:62ae2980 -- Mon Nov 3 21:49:46 2014
+crtime: 0x5457f87a:61ba0598 -- Mon Nov 3 21:49:46 2014
+Size of extra inode fields: 28
+BLOCKS:
+(0-11):1025-1036, (IND):24, (12-267):1037-1292, (DIND):25, (IND):41, (268-511):1293-1536
+TOTAL: 515
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (8.3% non-contiguous), 570/2048 blocks
+Exit status is 0
diff --git a/tests/f_convert_bmap/expect.2 b/tests/f_convert_bmap/expect.2
new file mode 100644
index 0000000..632d411
--- /dev/null
+++ b/tests/f_convert_bmap/expect.2
@@ -0,0 +1,10 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (0.0% non-contiguous), 570/2048 blocks
+Exit status is 0
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 1 0 - 511 1025 - 1536 512
diff --git a/tests/f_convert_bmap/image.gz b/tests/f_convert_bmap/image.gz
new file mode 100644
index 0000000..7c22532
--- /dev/null
+++ b/tests/f_convert_bmap/image.gz
Binary files differ
diff --git a/tests/f_convert_bmap/name b/tests/f_convert_bmap/name
new file mode 100644
index 0000000..67e0d47
--- /dev/null
+++ b/tests/f_convert_bmap/name
@@ -0,0 +1 @@
+convert blockmap file to extents file
diff --git a/tests/f_convert_bmap/script b/tests/f_convert_bmap/script
new file mode 100644
index 0000000..960a2f8
--- /dev/null
+++ b/tests/f_convert_bmap/script
@@ -0,0 +1,115 @@
+if [ "$DESCRIPTION"x != x ]; then
+ test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+ IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+ FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+ SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+ OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+ OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+ if [ -f $test_dir/expect.1.gz ]; then
+ EXP1=$test_name.1.tmp
+ gunzip < $test_dir/expect.1.gz > $EXP1
+ else
+ EXP1=$test_dir/expect.1
+ fi
+fi
+
+if [ "$EXP2"x = x ]; then
+ if [ -f $test_dir/expect.2.gz ]; then
+ EXP2=$test_name.2.tmp
+ gunzip < $test_dir/expect.2.gz > $EXP2
+ else
+ EXP2=$test_dir/expect.2
+ fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+ gunzip < $IMAGE > $TMPFILE
+fi
+
+cp /dev/null $OUT1
+
+eval $PREP_CMD
+
+echo 'stat /a' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE > $OUT1.new 2>&1
+rm -f $TMPFILE.cmd
+$TUNE2FS -O extent $TMPFILE >> $OUT1.new 2>&1
+$FSCK $FSCK_OPT -E bmap2extent -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed $OUT1.new > $OUT1
+
+$FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT2.new
+echo 'ex /a' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT2.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT2.new > $OUT2
+rm -f $TMPFILE.cmd $OUT1.new $OUT2.new
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+ rm -f $test_name.ok $test_name.failed
+ cmp -s $OUT1 $EXP1
+ status1=$?
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ cmp -s $OUT2 $EXP2
+ status2=$?
+ else
+ status2=0
+ fi
+ if [ "$PASS_ZERO" = "true" ]; then
+ cmp -s $test_name.0.log $test_dir/expect.0
+ status3=$?
+ else
+ status3=0
+ fi
+
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
+ if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+ echo "$description: ok"
+ touch $test_name.ok
+ else
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+ rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2
+ unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+ unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+
diff --git a/tests/f_convert_bmap_and_extent/expect.1 b/tests/f_convert_bmap_and_extent/expect.1
new file mode 100644
index 0000000..eafd64a
--- /dev/null
+++ b/tests/f_convert_bmap_and_extent/expect.1
@@ -0,0 +1,33 @@
+debugfs: stat /a
+Inode: 12 Type: regular Mode: 0644 Flags: 0x0
+Generation: 1573716129 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 524288
+File ACL: 0
+Links: 1 Blockcount: 1030
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x5457f87a:62ae2980 -- Mon Nov 3 21:49:46 2014
+ atime: 0x5457f87a:61ba0598 -- Mon Nov 3 21:49:46 2014
+ mtime: 0x5457f87a:62ae2980 -- Mon Nov 3 21:49:46 2014
+crtime: 0x5457f87a:61ba0598 -- Mon Nov 3 21:49:46 2014
+Size of extra inode fields: 28
+BLOCKS:
+(0-11):1025-1036, (IND):24, (12-267):1037-1292, (DIND):25, (IND):41, (268-511):1293-1536
+TOTAL: 515
+
+debugfs: ex /zero
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 8 28 9
+ 1/ 1 1/ 4 0 - 0 27 - 27 1
+ 1/ 1 2/ 4 2 - 2 29 - 29 1
+ 1/ 1 3/ 4 4 - 4 31 - 31 1
+ 1/ 1 4/ 4 6 - 6 33 - 33 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/128 files (15.4% non-contiguous), 574/2048 blocks
+Exit status is 0
diff --git a/tests/f_convert_bmap_and_extent/expect.2 b/tests/f_convert_bmap_and_extent/expect.2
new file mode 100644
index 0000000..73765ea
--- /dev/null
+++ b/tests/f_convert_bmap_and_extent/expect.2
@@ -0,0 +1,16 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/128 files (7.7% non-contiguous), 574/2048 blocks
+Exit status is 0
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 1 0 - 511 1025 - 1536 512
+debugfs: ex /zero
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 4 0 - 0 27 - 27 1
+ 0/ 0 2/ 4 2 - 2 29 - 29 1
+ 0/ 0 3/ 4 4 - 4 31 - 31 1
+ 0/ 0 4/ 4 6 - 6 33 - 33 1
diff --git a/tests/f_convert_bmap_and_extent/image.gz b/tests/f_convert_bmap_and_extent/image.gz
new file mode 100644
index 0000000..916b493
--- /dev/null
+++ b/tests/f_convert_bmap_and_extent/image.gz
Binary files differ
diff --git a/tests/f_convert_bmap_and_extent/name b/tests/f_convert_bmap_and_extent/name
new file mode 100644
index 0000000..1a58794
--- /dev/null
+++ b/tests/f_convert_bmap_and_extent/name
@@ -0,0 +1 @@
+convert blockmap to extents files
diff --git a/tests/f_convert_bmap_and_extent/script b/tests/f_convert_bmap_and_extent/script
new file mode 100644
index 0000000..f61c8e2
--- /dev/null
+++ b/tests/f_convert_bmap_and_extent/script
@@ -0,0 +1,117 @@
+if [ "$DESCRIPTION"x != x ]; then
+ test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+ IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+ FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+ SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+ OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+ OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+ if [ -f $test_dir/expect.1.gz ]; then
+ EXP1=$test_name.1.tmp
+ gunzip < $test_dir/expect.1.gz > $EXP1
+ else
+ EXP1=$test_dir/expect.1
+ fi
+fi
+
+if [ "$EXP2"x = x ]; then
+ if [ -f $test_dir/expect.2.gz ]; then
+ EXP2=$test_name.2.tmp
+ gunzip < $test_dir/expect.2.gz > $EXP2
+ else
+ EXP2=$test_dir/expect.2
+ fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+ gunzip < $IMAGE > $TMPFILE
+fi
+
+cp /dev/null $OUT1
+
+eval $PREP_CMD
+
+echo 'stat /a' > $TMPFILE.cmd
+echo 'ex /zero' >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE > $OUT1.new 2>&1
+rm -f $TMPFILE.cmd
+$TUNE2FS -O extent $TMPFILE >> $OUT1.new 2>&1
+$FSCK $FSCK_OPT -E bmap2extent -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed $OUT1.new > $OUT1
+
+$FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT2.new
+echo 'ex /a' > $TMPFILE.cmd
+echo 'ex /zero' >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT2.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT2.new > $OUT2
+rm -f $TMPFILE.cmd $OUT1.new $OUT2.new
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+ rm -f $test_name.ok $test_name.failed
+ cmp -s $OUT1 $EXP1
+ status1=$?
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ cmp -s $OUT2 $EXP2
+ status2=$?
+ else
+ status2=0
+ fi
+ if [ "$PASS_ZERO" = "true" ]; then
+ cmp -s $test_name.0.log $test_dir/expect.0
+ status3=$?
+ else
+ status3=0
+ fi
+
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
+ if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+ echo "$description: ok"
+ touch $test_name.ok
+ else
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+ rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2
+ unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+ unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+
diff --git a/tests/f_convert_bmap_sparse/expect.1 b/tests/f_convert_bmap_sparse/expect.1
new file mode 100644
index 0000000..095fb2b
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/expect.1
@@ -0,0 +1,24 @@
+debugfs: stat /realmode.bin
+Inode: 12 Type: regular Mode: 0775 Flags: 0x0
+Generation: 2022334337 Version: 0x00000001
+User: 1000 Group: 1000 Size: 21080
+File ACL: 0
+Links: 1 Blockcount: 16
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x5924849d -- Tue May 23 18:51:09 2017
+atime: 0x59247d36 -- Tue May 23 18:19:34 2017
+mtime: 0x591e1764 -- Thu May 18 21:51:32 2017
+BLOCKS:
+(0):513, (4-8):514-518, (IND):58, (20):2005
+TOTAL: 8
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/256 files (8.3% non-contiguous), 65/2048 blocks
+Exit status is 0
diff --git a/tests/f_convert_bmap_sparse/expect.2 b/tests/f_convert_bmap_sparse/expect.2
new file mode 100644
index 0000000..e5a3d44
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/expect.2
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/256 files (8.3% non-contiguous), 65/2048 blocks
+Exit status is 0
+debugfs: ex /realmode.bin
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 3 0 - 0 513 - 513 1
+ 0/ 0 2/ 3 4 - 8 514 - 518 5
+ 0/ 0 3/ 3 20 - 20 2005 - 2005 1
diff --git a/tests/f_convert_bmap_sparse/image.gz b/tests/f_convert_bmap_sparse/image.gz
new file mode 100644
index 0000000..1f594fd
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/image.gz
Binary files differ
diff --git a/tests/f_convert_bmap_sparse/name b/tests/f_convert_bmap_sparse/name
new file mode 100644
index 0000000..dc3b985
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/name
@@ -0,0 +1 @@
+convert sparse blockmap file to extents file
diff --git a/tests/f_convert_bmap_sparse/script b/tests/f_convert_bmap_sparse/script
new file mode 100644
index 0000000..e78a4bd
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/script
@@ -0,0 +1,115 @@
+if [ "$DESCRIPTION"x != x ]; then
+ test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+ IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+ FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+ SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+ OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+ OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+ if [ -f $test_dir/expect.1.gz ]; then
+ EXP1=$test_name.1.tmp
+ gunzip < $test_dir/expect.1.gz > $EXP1
+ else
+ EXP1=$test_dir/expect.1
+ fi
+fi
+
+if [ "$EXP2"x = x ]; then
+ if [ -f $test_dir/expect.2.gz ]; then
+ EXP2=$test_name.2.tmp
+ gunzip < $test_dir/expect.2.gz > $EXP2
+ else
+ EXP2=$test_dir/expect.2
+ fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+ gunzip < $IMAGE > $TMPFILE
+fi
+
+cp /dev/null $OUT1
+
+eval $PREP_CMD
+
+echo 'stat /realmode.bin' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE > $OUT1.new 2>&1
+rm -f $TMPFILE.cmd
+$TUNE2FS -O extent $TMPFILE >> $OUT1.new 2>&1
+$FSCK $FSCK_OPT -E bmap2extent -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed $OUT1.new > $OUT1
+
+$FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT2.new
+echo 'ex /realmode.bin' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT2.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT2.new > $OUT2
+rm -f $TMPFILE.cmd $OUT1.new $OUT2.new
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+ rm -f $test_name.ok $test_name.failed
+ cmp -s $OUT1 $EXP1
+ status1=$?
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ cmp -s $OUT2 $EXP2
+ status2=$?
+ else
+ status2=0
+ fi
+ if [ "$PASS_ZERO" = "true" ]; then
+ cmp -s $test_name.0.log $test_dir/expect.0
+ status3=$?
+ else
+ status3=0
+ fi
+
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
+ if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+ echo "$description: ok"
+ touch $test_name.ok
+ else
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+ rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2
+ unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+ unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+
diff --git a/tests/f_corrupt_dirent_tail/expect.1 b/tests/f_corrupt_dirent_tail/expect.1
new file mode 100644
index 0000000..0813755
--- /dev/null
+++ b/tests/f_corrupt_dirent_tail/expect.1
@@ -0,0 +1,16 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Directory inode 2, block #0, offset 0: directory has no checksum.
+Fix? yes
+
+Directory inode 2, block #0, offset 1012: directory corrupted
+Salvage? yes
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (9.1% non-contiguous), 1090/2048 blocks
+Exit status is 1
diff --git a/tests/f_corrupt_dirent_tail/expect.2 b/tests/f_corrupt_dirent_tail/expect.2
new file mode 100644
index 0000000..c42466d
--- /dev/null
+++ b/tests/f_corrupt_dirent_tail/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (9.1% non-contiguous), 1090/2048 blocks
+Exit status is 0
diff --git a/tests/f_corrupt_dirent_tail/image.gz b/tests/f_corrupt_dirent_tail/image.gz
new file mode 100644
index 0000000..f275308
--- /dev/null
+++ b/tests/f_corrupt_dirent_tail/image.gz
Binary files differ
diff --git a/tests/f_corrupt_dirent_tail/name b/tests/f_corrupt_dirent_tail/name
new file mode 100644
index 0000000..08259a3
--- /dev/null
+++ b/tests/f_corrupt_dirent_tail/name
@@ -0,0 +1 @@
+rebuild a directory with corrupt dirent tail
diff --git a/tests/f_crashdisk/expect.1 b/tests/f_crashdisk/expect.1
new file mode 100644
index 0000000..6898030
--- /dev/null
+++ b/tests/f_crashdisk/expect.1
@@ -0,0 +1,17 @@
+ext2fs_open2: The ext2 superblock is corrupt
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img
+../e2fsck/e2fsck: Trying to load superblock despite errors...
+ext2fs_open2: The ext2 superblock is corrupt
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img
+
+The superblock could not be read or does not describe a valid ext2/ext3/ext4
+filesystem. If the device is valid and it really contains an ext2/ext3/ext4
+filesystem (and not swap or ufs or something else), then the superblock
+is corrupt, and you might try running e2fsck with an alternate superblock:
+ e2fsck -b 8193 <device>
+ or
+ e2fsck -b 32768 <device>
+
+Exit status is 8
diff --git a/tests/f_crashdisk/image.gz b/tests/f_crashdisk/image.gz
new file mode 100644
index 0000000..060e7a0
--- /dev/null
+++ b/tests/f_crashdisk/image.gz
Binary files differ
diff --git a/tests/f_crashdisk/name b/tests/f_crashdisk/name
new file mode 100644
index 0000000..2b28207
--- /dev/null
+++ b/tests/f_crashdisk/name
@@ -0,0 +1 @@
+superblock with illegal values
diff --git a/tests/f_crashdisk/script b/tests/f_crashdisk/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_crashdisk/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_create_symlinks/expect b/tests/f_create_symlinks/expect
new file mode 100644
index 0000000..3033f8a
--- /dev/null
+++ b/tests/f_create_symlinks/expect
@@ -0,0 +1,81 @@
+mke2fs -q -F -o Linux -b 1024 -g 256 -O inline_data,extents -I 256 test.img 1024
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 441/1024 blocks
+Exit status is 0
+debugfs -R "symlink /l_30 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" test.img
+debugfs -R "symlink /l_60 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" test.img
+debugfs -R "symlink /l_70 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" test.img
+debugfs -R "symlink /l_500 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" test.img
+debugfs -R "symlink /l_1023 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" test.img
+debugfs -R "symlink /l_1024 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" test.img
+ext2fs_symlink: Invalid argument passed to ext2 library while creating symlink "l_1024"
+symlink: Invalid argument passed to ext2 library
+debugfs -R "symlink /l_1500 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" test.img
+ext2fs_symlink: Invalid argument passed to ext2 library while creating symlink "l_1500"
+symlink: Invalid argument passed to ext2 library
+debugfs -R "stat /l_30" test.img
+Inode: 12 Type: symlink Mode: 0777 Flags: 0x0
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 30
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+Size of extra inode fields: 32
+Fast link dest: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+debugfs -R "stat /l_60" test.img
+Inode: 13 Type: symlink Mode: 0777 Flags: 0x10000000
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 60
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+Size of extra inode fields: 32
+Extended attributes:
+ system.data (0)
+Fast link dest: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+debugfs -R "stat /l_70" test.img
+Inode: 14 Type: symlink Mode: 0777 Flags: 0x10000000
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 70
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+Size of extra inode fields: 32
+Extended attributes:
+ system.data (10)
+Fast link dest: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+debugfs -R "stat /l_500" test.img
+Inode: 15 Type: symlink Mode: 0777 Flags: 0x80000
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 500
+File ACL: 0
+Links: 1 Blockcount: 2
+Fragment: Address: 0 Number: 0 Size: 0
+Size of extra inode fields: 32
+EXTENTS:
+(0):153
+debugfs -R "stat /l_1023" test.img
+Inode: 16 Type: symlink Mode: 0777 Flags: 0x80000
+Generation: 0 Version: 0x00000000:00000000
+User: 0 Group: 0 Project: 0 Size: 1023
+File ACL: 0
+Links: 1 Blockcount: 2
+Fragment: Address: 0 Number: 0 Size: 0
+Size of extra inode fields: 32
+EXTENTS:
+(0):154
+debugfs -R "stat /l_1024" test.img
+/l_1024: File not found by ext2_lookup
+debugfs -R "stat /l_1500" test.img
+/l_1500: File not found by ext2_lookup
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/128 files (0.0% non-contiguous), 443/1024 blocks
+Exit status is 0
diff --git a/tests/f_create_symlinks/name b/tests/f_create_symlinks/name
new file mode 100644
index 0000000..0930e79
--- /dev/null
+++ b/tests/f_create_symlinks/name
@@ -0,0 +1 @@
+create fast, inlinedata, and regular symlinks
diff --git a/tests/f_create_symlinks/script b/tests/f_create_symlinks/script
new file mode 100644
index 0000000..169f58d
--- /dev/null
+++ b/tests/f_create_symlinks/script
@@ -0,0 +1,54 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-yf
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 -g 256 -O inline_data,extents -I 256 test.img 1024 > $OUT.new
+$MKE2FS -q -F -o Linux -b 1024 -g 256 -O inline_data,extents -I 256 $TMPFILE 1024 >> $OUT 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+for i in 30 60 70 500 1023 1024 1500; do
+ echo "debugfs -R \"symlink /l_$i $(perl -e "print 'x' x $i;")\" test.img" >> $OUT.new
+ $DEBUGFS -w -R "symlink /l_$i $(perl -e "print 'x' x $i;")" $TMPFILE \
+ 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT.new
+done
+
+for i in 30 60 70 500 1023 1024 1500; do
+ echo "debugfs -R \"stat /l_$i\" test.img" >> $OUT.new
+ $DEBUGFS -R "stat /l_$i" $TMPFILE 2>&1 | \
+ grep -v "time: " >> $OUT.new
+done
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+rm -f $OUT.new $TMPFILE
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_del_dup_quota/expect.1 b/tests/f_del_dup_quota/expect.1
new file mode 100644
index 0000000..71b7440
--- /dev/null
+++ b/tests/f_del_dup_quota/expect.1
@@ -0,0 +1,39 @@
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 8129
+Multiply-claimed block(s) in inode 13: 8129
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 2 inodes containing multiply-claimed blocks.)
+
+File /testfile1 (inode #12, mod time Wed May 24 23:10:38 2017)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /testfile2 (inode #13, mod time Wed May 24 23:10:45 2017)
+Clone multiply-claimed blocks<y>? no
+Delete file<y>? yes
+File /testfile2 (inode #13, mod time Wed May 24 23:10:45 2017)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /testfile1 (inode #12, mod time Wed May 24 23:10:38 2017)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Entry 'testfile1' in / (2) has deleted/unused inode 12. Clear<y>? yes
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -1374
+Fix<y>? yes
+Free blocks count wrong for group #0 (6815, counted=6816).
+Fix<y>? yes
+Free blocks count wrong (6815, counted=6816).
+Fix<y>? yes
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 3) != expected (17408, 4)
+Update quota info for quota type 0<y>? yes
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 3) != expected (17408, 4)
+Update quota info for quota type 1<y>? yes
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/2048 files (33.3% non-contiguous), 1376/8192 blocks
+Exit status is 0
diff --git a/tests/f_del_dup_quota/expect.2 b/tests/f_del_dup_quota/expect.2
new file mode 100644
index 0000000..14f99b8
--- /dev/null
+++ b/tests/f_del_dup_quota/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/2048 files (25.0% non-contiguous), 1376/8192 blocks
+Exit status is 0
diff --git a/tests/f_del_dup_quota/image.bz2 b/tests/f_del_dup_quota/image.bz2
new file mode 100644
index 0000000..fc91e2a
--- /dev/null
+++ b/tests/f_del_dup_quota/image.bz2
Binary files differ
diff --git a/tests/f_del_dup_quota/name b/tests/f_del_dup_quota/name
new file mode 100644
index 0000000..8b29fd4
--- /dev/null
+++ b/tests/f_del_dup_quota/name
@@ -0,0 +1 @@
+delete file containing multiply claimed blocks with quota
diff --git a/tests/f_del_dup_quota/script b/tests/f_del_dup_quota/script
new file mode 100644
index 0000000..5480c3f
--- /dev/null
+++ b/tests/f_del_dup_quota/script
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+
+# Run fsck to fix the multiply-claimed block breakage
+FSCK_OPT=-f
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+
+echo "nyyyyyyy" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time to verify that fsck completely repaired everything in
+# the first run, including quota corrections
+FSCK_OPT=-fn
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+rm -f $test_name.failed $test_name.ok
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi
+unset EXP1 OUT1 EXP2 OUT2 FSCK_OPT IMAGE
diff --git a/tests/f_deleted_inode_bad_csum/expect.1 b/tests/f_deleted_inode_bad_csum/expect.1
new file mode 100644
index 0000000..8420361
--- /dev/null
+++ b/tests/f_deleted_inode_bad_csum/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 passes checks, but checksum does not match inode. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_deleted_inode_bad_csum/expect.2 b/tests/f_deleted_inode_bad_csum/expect.2
new file mode 100644
index 0000000..eb48b40
--- /dev/null
+++ b/tests/f_deleted_inode_bad_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_deleted_inode_bad_csum/image.gz b/tests/f_deleted_inode_bad_csum/image.gz
new file mode 100644
index 0000000..a27e50e
--- /dev/null
+++ b/tests/f_deleted_inode_bad_csum/image.gz
Binary files differ
diff --git a/tests/f_deleted_inode_bad_csum/name b/tests/f_deleted_inode_bad_csum/name
new file mode 100644
index 0000000..c034ace
--- /dev/null
+++ b/tests/f_deleted_inode_bad_csum/name
@@ -0,0 +1 @@
+deleted inode with bad metadata_csum wasn't fixed
diff --git a/tests/f_desc_size_128/expect.1 b/tests/f_desc_size_128/expect.1
new file mode 100644
index 0000000..a62f112
--- /dev/null
+++ b/tests/f_desc_size_128/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (0.0% non-contiguous), 150/8192 blocks
+Exit status is 0
diff --git a/tests/f_desc_size_128/expect.2 b/tests/f_desc_size_128/expect.2
new file mode 100644
index 0000000..a62f112
--- /dev/null
+++ b/tests/f_desc_size_128/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (0.0% non-contiguous), 150/8192 blocks
+Exit status is 0
diff --git a/tests/f_desc_size_128/image.gz b/tests/f_desc_size_128/image.gz
new file mode 100644
index 0000000..eda0cab
--- /dev/null
+++ b/tests/f_desc_size_128/image.gz
Binary files differ
diff --git a/tests/f_desc_size_128/name b/tests/f_desc_size_128/name
new file mode 100644
index 0000000..f09e003
--- /dev/null
+++ b/tests/f_desc_size_128/name
@@ -0,0 +1 @@
+128-byte group descriptors
diff --git a/tests/f_desc_size_bad/expect.1 b/tests/f_desc_size_bad/expect.1
new file mode 100644
index 0000000..84b852a
--- /dev/null
+++ b/tests/f_desc_size_bad/expect.1
@@ -0,0 +1,13 @@
+../e2fsck/e2fsck: Block group descriptor size incorrect while trying to open test.img
+../e2fsck/e2fsck: Trying to load superblock despite errors...
+ext2fs_check_desc: Block group descriptor size incorrect
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 805/2048 blocks
+Exit status is 1
diff --git a/tests/f_desc_size_bad/expect.2 b/tests/f_desc_size_bad/expect.2
new file mode 100644
index 0000000..012f837
--- /dev/null
+++ b/tests/f_desc_size_bad/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 805/2048 blocks
+Exit status is 0
diff --git a/tests/f_desc_size_bad/script b/tests/f_desc_size_bad/script
new file mode 100644
index 0000000..ae29627
--- /dev/null
+++ b/tests/f_desc_size_bad/script
@@ -0,0 +1,17 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+DESCRIPTION="bad superblock s_desc_size"
+SKIP_GUNZIP=true
+touch $TMPFILE
+$MKE2FS -F -o Linux -O 64bit,extents -N 32 -b 1024 -g 512 -E desc_size=128 $TMPFILE 2048 > $test_name.log 2>&1
+$DEBUGFS -R "ssv desc_size 129" -w $TMPFILE >> $test_name.log 2>&1
+
+E2FSCK_TIME=200704102100
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+unset E2FSCK_TIME
diff --git a/tests/f_detect_junk/expect b/tests/f_detect_junk/expect
new file mode 100644
index 0000000..39f99af
--- /dev/null
+++ b/tests/f_detect_junk/expect
@@ -0,0 +1,22 @@
+*** e2fsck
+ext2fs_open2: Bad magic number in super-block
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+../e2fsck/e2fsck: Bad magic number in super-block while trying to open test.img
+
+The superblock could not be read or does not describe a valid ext2/ext3/ext4
+filesystem. If the device is valid and it really contains an ext2/ext3/ext4
+filesystem (and not swap or ufs or something else), then the superblock
+is corrupt, and you might try running e2fsck with an alternate superblock:
+ e2fsck -b 8193 <device>
+ or
+ e2fsck -b 32768 <device>
+
+*** debugfs
+debugfs: Bad magic number in super-block while trying to open test.img
+*** tune2fs
+../misc/tune2fs: Bad magic number in super-block while trying to open test.img
+*** mke2fs
+Creating filesystem with 16384 1k blocks and 4096 inodes
+Superblock backups stored on blocks:
+ 8193
+
diff --git a/tests/f_detect_junk/expect.nodebugfs b/tests/f_detect_junk/expect.nodebugfs
new file mode 100644
index 0000000..b528046
--- /dev/null
+++ b/tests/f_detect_junk/expect.nodebugfs
@@ -0,0 +1,21 @@
+*** e2fsck
+ext2fs_open2: Bad magic number in super-block
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+../e2fsck/e2fsck: Bad magic number in super-block while trying to open test.img
+
+The superblock could not be read or does not describe a valid ext2/ext3/ext4
+filesystem. If the device is valid and it really contains an ext2/ext3/ext4
+filesystem (and not swap or ufs or something else), then the superblock
+is corrupt, and you might try running e2fsck with an alternate superblock:
+ e2fsck -b 8193 <device>
+ or
+ e2fsck -b 32768 <device>
+
+*** debugfs
+*** tune2fs
+../misc/tune2fs: Bad magic number in super-block while trying to open test.img
+*** mke2fs
+Creating filesystem with 16384 1k blocks and 4096 inodes
+Superblock backups stored on blocks:
+ 8193
+
diff --git a/tests/f_detect_junk/image.bz2 b/tests/f_detect_junk/image.bz2
new file mode 100644
index 0000000..3d52600
--- /dev/null
+++ b/tests/f_detect_junk/image.bz2
Binary files differ
diff --git a/tests/f_detect_junk/name b/tests/f_detect_junk/name
new file mode 100644
index 0000000..81cf655
--- /dev/null
+++ b/tests/f_detect_junk/name
@@ -0,0 +1 @@
+detect non-fs file data
diff --git a/tests/f_detect_junk/script b/tests/f_detect_junk/script
new file mode 100644
index 0000000..2577842
--- /dev/null
+++ b/tests/f_detect_junk/script
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+if [ "$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h)" -eq 0 ]; then
+ echo "$test_name: skipped (no magic)"
+ exit 0
+fi
+
+FSCK_OPT=-fn
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+$DD if=/dev/zero of=$TMPFILE conv=notrunc oflag=append bs=1024k count=16 > /dev/null 2>&1
+
+# Run fsck to fix things?
+if [ -x $DEBUGFS_EXE ]; then
+ EXP=$test_dir/expect
+else
+ EXP=$test_dir/expect.nodebugfs
+fi
+OUT=$test_name.log
+rm -f $test_name.failed $test_name.ok
+
+echo "*** e2fsck" > $OUT
+$FSCK $FSCK_OPT $TMPFILE >> $OUT 2>&1
+echo "*** debugfs" >> $OUT
+test -x $DEBUGFS_EXE && $DEBUGFS -R 'quit' $TMPFILE >> $OUT 2>&1
+echo "*** tune2fs" >> $OUT
+$TUNE2FS -i 0 $TMPFILE >> $OUT 2>&1
+echo "*** mke2fs" >> $OUT
+$MKE2FS -n $TMPFILE >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+# Figure out what happened
+if cmp -s $EXP $OUT; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT >> $test_name.failed
+fi
+unset EXP OUT FSCK_OPT IMAGE
diff --git a/tests/f_detect_xfs/expect b/tests/f_detect_xfs/expect
new file mode 100644
index 0000000..a48e8af
--- /dev/null
+++ b/tests/f_detect_xfs/expect
@@ -0,0 +1,25 @@
+*** e2fsck
+ext2fs_open2: Bad magic number in super-block
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+../e2fsck/e2fsck: Bad magic number in super-block while trying to open test.img
+
+The superblock could not be read or does not describe a valid ext2/ext3/ext4
+filesystem. If the device is valid and it really contains an ext2/ext3/ext4
+filesystem (and not swap or ufs or something else), then the superblock
+is corrupt, and you might try running e2fsck with an alternate superblock:
+ e2fsck -b 8193 <device>
+ or
+ e2fsck -b 32768 <device>
+
+test.img contains a xfs file system labelled 'test_filsys'
+*** debugfs
+debugfs: Bad magic number in super-block while trying to open test.img
+test.img contains a xfs file system labelled 'test_filsys'
+*** tune2fs
+../misc/tune2fs: Bad magic number in super-block while trying to open test.img
+test.img contains a xfs file system labelled 'test_filsys'
+*** mke2fs
+Creating filesystem with 16384 1k blocks and 4096 inodes
+Superblock backups stored on blocks:
+ 8193
+
diff --git a/tests/f_detect_xfs/expect.nodebugfs b/tests/f_detect_xfs/expect.nodebugfs
new file mode 100644
index 0000000..26a8a4a
--- /dev/null
+++ b/tests/f_detect_xfs/expect.nodebugfs
@@ -0,0 +1,24 @@
+*** e2fsck
+ext2fs_open2: Bad magic number in super-block
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+../e2fsck/e2fsck: Bad magic number in super-block while trying to open test.img
+
+The superblock could not be read or does not describe a valid ext2/ext3/ext4
+filesystem. If the device is valid and it really contains an ext2/ext3/ext4
+filesystem (and not swap or ufs or something else), then the superblock
+is corrupt, and you might try running e2fsck with an alternate superblock:
+ e2fsck -b 8193 <device>
+ or
+ e2fsck -b 32768 <device>
+
+test.img contains a xfs file system labelled 'test_filsys'
+*** debugfs
+*** tune2fs
+../misc/tune2fs: Bad magic number in super-block while trying to open test.img
+test.img contains a xfs file system labelled 'test_filsys'
+*** mke2fs
+128-byte inodes cannot handle dates beyond 2038 and are deprecated
+Creating filesystem with 16384 1k blocks and 4096 inodes
+Superblock backups stored on blocks:
+ 8193
+
diff --git a/tests/f_detect_xfs/image.bz2 b/tests/f_detect_xfs/image.bz2
new file mode 100644
index 0000000..9dc5e44
--- /dev/null
+++ b/tests/f_detect_xfs/image.bz2
Binary files differ
diff --git a/tests/f_detect_xfs/name b/tests/f_detect_xfs/name
new file mode 100644
index 0000000..d5b9b82
--- /dev/null
+++ b/tests/f_detect_xfs/name
@@ -0,0 +1 @@
+detect xfs filesystem
diff --git a/tests/f_detect_xfs/script b/tests/f_detect_xfs/script
new file mode 100644
index 0000000..bd2c1e8
--- /dev/null
+++ b/tests/f_detect_xfs/script
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+FSCK_OPT=-fn
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+
+# Run fsck to fix things?
+if [ -x $DEBUGFS_EXE ]; then
+ EXP=$test_dir/expect
+else
+ EXP=$test_dir/expect.nodebugfs
+fi
+OUT=$test_name.log
+rm -f $test_name.failed $test_name.ok
+
+echo "*** e2fsck" > $OUT
+$FSCK $FSCK_OPT $TMPFILE >> $OUT 2>&1
+echo "*** debugfs" >> $OUT
+test -x $DEBUGFS_EXE && $DEBUGFS -R 'quit' $TMPFILE >> $OUT 2>&1
+echo "*** tune2fs" >> $OUT
+$TUNE2FS -i 0 $TMPFILE >> $OUT 2>&1
+echo "*** mke2fs" >> $OUT
+$MKE2FS -n -b 1024 $TMPFILE >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+# Figure out what happened
+if cmp -s $EXP $OUT; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT >> $test_name.failed
+fi
+unset EXP OUT FSCK_OPT IMAGE
diff --git a/tests/f_dir_bad_csum/expect.1 b/tests/f_dir_bad_csum/expect.1
new file mode 100644
index 0000000..ae4b410
--- /dev/null
+++ b/tests/f_dir_bad_csum/expect.1
@@ -0,0 +1,48 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Directory inode 12, block #0: directory passes checks but fails checksum.
+Fix? yes
+
+Directory inode 13, block #0, offset 0: directory has no checksum.
+Fix? yes
+
+Directory inode 14, block #0, offset 0: directory has no checksum.
+Fix? yes
+
+Directory inode 15, block #0, offset 1000: directory corrupted
+Salvage? yes
+
+Entry '' in ??? (15) has rec_len of 0, should be 12.
+Fix? yes
+
+Directory inode 16, block #0, offset 12: directory corrupted
+Salvage? yes
+
+Directory inode 17, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 17.
+Fix? yes
+
+Missing '..' in directory inode 17.
+Fix? yes
+
+Entry 'file' in ??? (18) has invalid inode #: 4294967295.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+'..' in /6 (17) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Unattached inode 19
+Connect to /lost+found? yes
+
+Inode 19 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 19/128 files (5.3% non-contiguous), 1098/2048 blocks
+Exit status is 1
diff --git a/tests/f_dir_bad_csum/expect.2 b/tests/f_dir_bad_csum/expect.2
new file mode 100644
index 0000000..f5a3e5f
--- /dev/null
+++ b/tests/f_dir_bad_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 19/128 files (5.3% non-contiguous), 1098/2048 blocks
+Exit status is 0
diff --git a/tests/f_dir_bad_csum/image.gz b/tests/f_dir_bad_csum/image.gz
new file mode 100644
index 0000000..4b58187
--- /dev/null
+++ b/tests/f_dir_bad_csum/image.gz
Binary files differ
diff --git a/tests/f_dir_bad_csum/name b/tests/f_dir_bad_csum/name
new file mode 100644
index 0000000..6397e9d
--- /dev/null
+++ b/tests/f_dir_bad_csum/name
@@ -0,0 +1 @@
+dir block w/ missing/bad csum/tail or block corruption
diff --git a/tests/f_dir_bad_mode/expect.1 b/tests/f_dir_bad_mode/expect.1
new file mode 100644
index 0000000..10b4a99
--- /dev/null
+++ b/tests/f_dir_bad_mode/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 is a socket but it looks like it is really a directory.
+Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/16 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 1
diff --git a/tests/f_dir_bad_mode/expect.2 b/tests/f_dir_bad_mode/expect.2
new file mode 100644
index 0000000..7d2352d
--- /dev/null
+++ b/tests/f_dir_bad_mode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/16 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 0
diff --git a/tests/f_dir_bad_mode/image.gz b/tests/f_dir_bad_mode/image.gz
new file mode 100644
index 0000000..2f647a1
--- /dev/null
+++ b/tests/f_dir_bad_mode/image.gz
Binary files differ
diff --git a/tests/f_dir_bad_mode/name b/tests/f_dir_bad_mode/name
new file mode 100644
index 0000000..7cbacc2
--- /dev/null
+++ b/tests/f_dir_bad_mode/name
@@ -0,0 +1 @@
+directory with corrupted i_mode
diff --git a/tests/f_dirlink/expect.1 b/tests/f_dirlink/expect.1
new file mode 100644
index 0000000..f53c0e1
--- /dev/null
+++ b/tests/f_dirlink/expect.1
@@ -0,0 +1,14 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'quux' in /foo (12) is a link to directory /bar (13).
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
+Exit status is 1
diff --git a/tests/f_dirlink/expect.2 b/tests/f_dirlink/expect.2
new file mode 100644
index 0000000..cab021a
--- /dev/null
+++ b/tests/f_dirlink/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
+Exit status is 0
diff --git a/tests/f_dirlink/image.gz b/tests/f_dirlink/image.gz
new file mode 100644
index 0000000..2e8def4
--- /dev/null
+++ b/tests/f_dirlink/image.gz
Binary files differ
diff --git a/tests/f_dirlink/name b/tests/f_dirlink/name
new file mode 100644
index 0000000..30dbdce
--- /dev/null
+++ b/tests/f_dirlink/name
@@ -0,0 +1 @@
+directory hard links
diff --git a/tests/f_dup/expect.1 b/tests/f_dup/expect.1
new file mode 100644
index 0000000..635a0df
--- /dev/null
+++ b/tests/f_dup/expect.1
@@ -0,0 +1,40 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 25--26
+Multiply-claimed block(s) in inode 13: 25--26
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 2 inodes containing multiply-claimed blocks.)
+
+File /termcap (inode #12, mod time Tue Sep 21 03:19:14 1993)
+ has 2 multiply-claimed block(s), shared with 1 file(s):
+ /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+Clone multiply-claimed blocks? yes
+
+File /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+ has 2 multiply-claimed block(s), shared with 1 file(s):
+ /termcap (inode #12, mod time Tue Sep 21 03:19:14 1993)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (44, counted=60).
+Fix? yes
+
+Free blocks count wrong (62, counted=60).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+Padding at end of block bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/16 files (7.7% non-contiguous), 40/100 blocks
+Exit status is 1
diff --git a/tests/f_dup/expect.2 b/tests/f_dup/expect.2
new file mode 100644
index 0000000..1aeb159
--- /dev/null
+++ b/tests/f_dup/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/16 files (15.4% non-contiguous), 40/100 blocks
+Exit status is 0
diff --git a/tests/f_dup/image.gz b/tests/f_dup/image.gz
new file mode 100644
index 0000000..3e04690
--- /dev/null
+++ b/tests/f_dup/image.gz
Binary files differ
diff --git a/tests/f_dup/name b/tests/f_dup/name
new file mode 100644
index 0000000..6296b83
--- /dev/null
+++ b/tests/f_dup/name
@@ -0,0 +1 @@
+blocks claimed by two different files
diff --git a/tests/f_dup2/expect.1 b/tests/f_dup2/expect.1
new file mode 100644
index 0000000..04d7304
--- /dev/null
+++ b/tests/f_dup2/expect.1
@@ -0,0 +1,47 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 25--26
+Multiply-claimed block(s) in inode 13: 25--26 57--58
+Multiply-claimed block(s) in inode 14: 57--58
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 3 inodes containing multiply-claimed blocks.)
+
+File /termcap (inode #12, mod time Tue Sep 21 03:19:14 1993)
+ has 2 multiply-claimed block(s), shared with 1 file(s):
+ /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+Clone multiply-claimed blocks? yes
+
+File /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+ has 4 multiply-claimed block(s), shared with 2 file(s):
+ /pass1.c (inode #14, mod time Tue Sep 21 04:28:37 1993)
+ /termcap (inode #12, mod time Tue Sep 21 03:19:14 1993)
+Clone multiply-claimed blocks? yes
+
+File /pass1.c (inode #14, mod time Tue Sep 21 04:28:37 1993)
+ has 2 multiply-claimed block(s), shared with 1 file(s):
+ /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (8, counted=22).
+Fix? yes
+
+Free blocks count wrong (26, counted=22).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+Padding at end of block bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/16 files (6.3% non-contiguous), 78/100 blocks
+Exit status is 1
diff --git a/tests/f_dup2/expect.2 b/tests/f_dup2/expect.2
new file mode 100644
index 0000000..0508b09
--- /dev/null
+++ b/tests/f_dup2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/16 files (12.5% non-contiguous), 78/100 blocks
+Exit status is 0
diff --git a/tests/f_dup2/image.gz b/tests/f_dup2/image.gz
new file mode 100644
index 0000000..e9b853d
--- /dev/null
+++ b/tests/f_dup2/image.gz
Binary files differ
diff --git a/tests/f_dup2/name b/tests/f_dup2/name
new file mode 100644
index 0000000..3d636e0
--- /dev/null
+++ b/tests/f_dup2/name
@@ -0,0 +1 @@
+blocks claimed by three different files
diff --git a/tests/f_dup3/expect.1 b/tests/f_dup3/expect.1
new file mode 100644
index 0000000..5f79cb8
--- /dev/null
+++ b/tests/f_dup3/expect.1
@@ -0,0 +1,47 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 16, i_blocks is 22, should be 24. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 11: 24 24
+Multiply-claimed block(s) in inode 14: 69 69
+Multiply-claimed block(s) in inode 16: 99 99
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 3 inodes containing multiply-claimed blocks.)
+
+File /lost+found (inode #11, mod time Mon Sep 20 03:26:36 1993)
+ has 2 multiply-claimed block(s), shared with 0 file(s):
+Clone multiply-claimed blocks? yes
+
+File /pass1.c (inode #14, mod time Tue Sep 21 04:28:37 1993)
+ has 2 multiply-claimed block(s), shared with 0 file(s):
+Clone multiply-claimed blocks? yes
+
+File /e2fsck (inode #16, mod time Tue Sep 21 04:32:22 1993)
+ has 2 multiply-claimed block(s), shared with 0 file(s):
+Clone multiply-claimed blocks? yes
+
+Pass 2: Checking directory structure
+Directory inode 11, block #12, offset 0: directory corrupted
+Salvage? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -68
+Fix? yes
+
+Free blocks count wrong for group #0 (20, counted=19).
+Fix? yes
+
+Free blocks count wrong (20, counted=19).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/16 files (25.0% non-contiguous), 81/100 blocks
+Exit status is 1
diff --git a/tests/f_dup3/expect.2 b/tests/f_dup3/expect.2
new file mode 100644
index 0000000..2a31ae6
--- /dev/null
+++ b/tests/f_dup3/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/16 files (25.0% non-contiguous), 81/100 blocks
+Exit status is 0
diff --git a/tests/f_dup3/image.gz b/tests/f_dup3/image.gz
new file mode 100644
index 0000000..3712cbc
--- /dev/null
+++ b/tests/f_dup3/image.gz
Binary files differ
diff --git a/tests/f_dup3/name b/tests/f_dup3/name
new file mode 100644
index 0000000..4f312ad
--- /dev/null
+++ b/tests/f_dup3/name
@@ -0,0 +1 @@
+blocks claimed by one file multiple times
diff --git a/tests/f_dup4/expect.1 b/tests/f_dup4/expect.1
new file mode 100644
index 0000000..8b6565c
--- /dev/null
+++ b/tests/f_dup4/expect.1
@@ -0,0 +1,130 @@
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 15: 30
+Multiply-claimed block(s) in inode 16: 30
+Multiply-claimed block(s) in inode 17: 30
+Multiply-claimed block(s) in inode 18: 30
+Multiply-claimed block(s) in inode 19: 34
+Multiply-claimed block(s) in inode 20: 34
+Multiply-claimed block(s) in inode 21: 34
+Multiply-claimed block(s) in inode 22: 34
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 8 inodes containing multiply-claimed blocks.)
+
+File /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+ /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir3/baz (inode #18, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir2/bar (inode #17, mod time Tue Apr 10 21:00:00 2007)
+ /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007)
+ /dir4 (inode #15, mod time Tue Apr 10 21:00:00 2007)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+ /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+Clone multiply-claimed blocks? yes
+
+File /dir3/foe (inode #22, mod time Tue Apr 10 21:00:00 2007)
+ has 1 multiply-claimed block(s), shared with 3 file(s):
+ /dir2/fie (inode #21, mod time Tue Apr 10 21:00:00 2007)
+ /dir/fee (inode #20, mod time Tue Apr 10 21:00:00 2007)
+ /dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Directory inode 22, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 22.
+Fix? yes
+
+Missing '..' in directory inode 22.
+Fix? yes
+
+Directory inode 20, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 20.
+Fix? yes
+
+Missing '..' in directory inode 20.
+Fix? yes
+
+Directory inode 21, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 21.
+Fix? yes
+
+Missing '..' in directory inode 21.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in /dir/fee (20) is <The NULL inode> (0), should be /dir (12).
+Fix? yes
+
+'..' in /dir2/fie (21) is <The NULL inode> (0), should be /dir2 (13).
+Fix? yes
+
+'..' in /dir3/foe (22) is <The NULL inode> (0), should be /dir3 (14).
+Fix? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 7. Fix? yes
+
+Inode 12 ref count is 4, should be 3. Fix? yes
+
+Inode 13 ref count is 4, should be 3. Fix? yes
+
+Inode 14 ref count is 4, should be 3. Fix? yes
+
+Inode 16 ref count is 1, should be 3. Fix? yes
+
+Inode 17 ref count is 1, should be 2. Fix? yes
+
+Inode 19 ref count is 1, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 23/32 files (0.0% non-contiguous), 39/100 blocks
+Exit status is 1
diff --git a/tests/f_dup4/expect.2 b/tests/f_dup4/expect.2
new file mode 100644
index 0000000..fe9c7e2
--- /dev/null
+++ b/tests/f_dup4/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 23/32 files (0.0% non-contiguous), 39/100 blocks
+Exit status is 0
diff --git a/tests/f_dup4/name b/tests/f_dup4/name
new file mode 100644
index 0000000..91cc5a3
--- /dev/null
+++ b/tests/f_dup4/name
@@ -0,0 +1 @@
+find all directory pathnames
diff --git a/tests/f_dup4/script b/tests/f_dup4/script
new file mode 100644
index 0000000..aec862d
--- /dev/null
+++ b/tests/f_dup4/script
@@ -0,0 +1,55 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+echo "/ Murphy Magic. The SeCrEt of the UnIvErSe is 43, NOT 42" > $TEST_DATA
+
+touch $TMPFILE
+$MKE2FS -N 32 -F -o Linux -b 1024 $TMPFILE 100 > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+set_current_time 20070410210000
+set_super_value lastcheck 0
+set_super_value hash_seed null
+set_super_value mkfs_time 0
+mkdir dir
+mkdir dir2
+mkdir dir3
+mkdir dir4
+cd /dir
+write $TEST_DATA foo
+cd /dir2
+write $TEST_DATA bar
+cd /dir3
+write $TEST_DATA baz
+cd /dir4
+write $TEST_DATA quux
+mkdir /dir/fee
+mkdir /dir2/fie
+mkdir /dir3/foe
+mkdir /dir4/fum
+link /dir/foo /dir2/foo1
+link /dir/foo /dir3/foo2
+link /dir2/bar /dir3/bar1
+link /dir4/quux /dir/quux1
+link /dir4/quux /dir2/quux2
+set_inode_field /dir/foo block[0] 30
+set_inode_field /dir2/bar block[0] 30
+set_inode_field /dir3/baz block[0] 30
+set_inode_field /dir/fee block[0] 34
+set_inode_field /dir2/fie block[0] 34
+set_inode_field /dir3/foe block[0] 34
+q
+EOF
+
+E2FSCK_TIME=200704102100
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA
diff --git a/tests/f_dup_ba/expect.1 b/tests/f_dup_ba/expect.1
new file mode 100644
index 0000000..f4581c4
--- /dev/null
+++ b/tests/f_dup_ba/expect.1
@@ -0,0 +1,69 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 16, i_size is 8192, should be 409600. Fix? yes
+
+Inode 16, i_blocks is 128, should be 896. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 16: 160--239
+Multiply-claimed block(s) in inode 17: 160--161
+Multiply-claimed block(s) in inode 18: 176--177
+Multiply-claimed block(s) in inode 19: 192--193
+Multiply-claimed block(s) in inode 20: 208--209
+Multiply-claimed block(s) in inode 21: 224--225
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 6 inodes containing multiply-claimed blocks.)
+
+File /5 (inode #16, mod time Sun Nov 27 04:39:31 2011)
+ has 5 multiply-claimed block(s), shared with 5 file(s):
+ /10 (inode #21, mod time Sun Nov 27 04:39:36 2011)
+ /9 (inode #20, mod time Sun Nov 27 04:39:35 2011)
+ /8 (inode #19, mod time Sun Nov 27 04:39:34 2011)
+ /7 (inode #18, mod time Sun Nov 27 04:39:33 2011)
+ /6 (inode #17, mod time Sun Nov 27 04:39:32 2011)
+Clone multiply-claimed blocks? yes
+
+File /6 (inode #17, mod time Sun Nov 27 04:39:32 2011)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /5 (inode #16, mod time Sun Nov 27 04:39:31 2011)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /7 (inode #18, mod time Sun Nov 27 04:39:33 2011)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /5 (inode #16, mod time Sun Nov 27 04:39:31 2011)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /8 (inode #19, mod time Sun Nov 27 04:39:34 2011)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /5 (inode #16, mod time Sun Nov 27 04:39:31 2011)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /9 (inode #20, mod time Sun Nov 27 04:39:35 2011)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /5 (inode #16, mod time Sun Nov 27 04:39:31 2011)
+Multiply-claimed blocks already reassigned or cloned.
+
+File /10 (inode #21, mod time Sun Nov 27 04:39:36 2011)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /5 (inode #16, mod time Sun Nov 27 04:39:31 2011)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +240
+Fix? yes
+
+Free blocks count wrong for group #0 (49, counted=43).
+Fix? yes
+
+Free blocks count wrong (784, counted=688).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 21/64 files (0.0% non-contiguous), 336/1024 blocks
+Exit status is 1
diff --git a/tests/f_dup_ba/expect.2 b/tests/f_dup_ba/expect.2
new file mode 100644
index 0000000..ec04450
--- /dev/null
+++ b/tests/f_dup_ba/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 21/64 files (4.8% non-contiguous), 336/1024 blocks
+Exit status is 0
diff --git a/tests/f_dup_ba/image.gz b/tests/f_dup_ba/image.gz
new file mode 100644
index 0000000..4b31863
--- /dev/null
+++ b/tests/f_dup_ba/image.gz
Binary files differ
diff --git a/tests/f_dup_ba/name b/tests/f_dup_ba/name
new file mode 100644
index 0000000..a1a8b80
--- /dev/null
+++ b/tests/f_dup_ba/name
@@ -0,0 +1 @@
+multiply claimed blocks with bigalloc
diff --git a/tests/f_dup_de/expect-nohtree.1 b/tests/f_dup_de/expect-nohtree.1
new file mode 100644
index 0000000..64415cc
--- /dev/null
+++ b/tests/f_dup_de/expect-nohtree.1
@@ -0,0 +1,31 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INDEX_FL flag set on filesystem without htree support.
+Clear HTree index? yes
+
+Pass 2: Checking directory structure
+Duplicate entry 'mailcap.dpkg-old' found.
+ Marking /etc (12) to be rebuilt.
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Duplicate entry 'fstab' in /etc (12) found. Clear? yes
+
+Duplicate entry 'localtime' in /etc (12) found. Clear? yes
+
+Duplicate entry 'mailcap.dpkg-old' in /etc (12) found. Clear? yes
+
+Duplicate entry 'modules.conf.old' in /etc (12) found. Clear? yes
+
+Entry 'modules.conf.old' in /etc (12) has a non-unique filename.
+Rename to modules.conf.o~0? yes
+
+Duplicate entry 'resolv.conf' in /etc (12) found. Clear? yes
+
+Duplicate entry 'usb.permissions' in /etc (12) found. Clear? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 1
diff --git a/tests/f_dup_de/expect-nohtree.2 b/tests/f_dup_de/expect-nohtree.2
new file mode 100644
index 0000000..4d680af
--- /dev/null
+++ b/tests/f_dup_de/expect-nohtree.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 0
diff --git a/tests/f_dup_de/expect.1 b/tests/f_dup_de/expect.1
new file mode 100644
index 0000000..e421547
--- /dev/null
+++ b/tests/f_dup_de/expect.1
@@ -0,0 +1,28 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Duplicate entry 'mailcap.dpkg-old' found.
+ Marking /etc (12) to be rebuilt.
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Duplicate entry 'fstab' in /etc (12) found. Clear? yes
+
+Duplicate entry 'localtime' in /etc (12) found. Clear? yes
+
+Duplicate entry 'mailcap.dpkg-old' in /etc (12) found. Clear? yes
+
+Duplicate entry 'modules.conf.old' in /etc (12) found. Clear? yes
+
+Entry 'modules.conf.old' in /etc (12) has a non-unique filename.
+Rename to modules.conf.o~0? yes
+
+Duplicate entry 'resolv.conf' in /etc (12) found. Clear? yes
+
+Duplicate entry 'usb.permissions' in /etc (12) found. Clear? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 1
diff --git a/tests/f_dup_de/expect.2 b/tests/f_dup_de/expect.2
new file mode 100644
index 0000000..4d680af
--- /dev/null
+++ b/tests/f_dup_de/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 0
diff --git a/tests/f_dup_de/image.gz b/tests/f_dup_de/image.gz
new file mode 100644
index 0000000..8bdb12f
--- /dev/null
+++ b/tests/f_dup_de/image.gz
Binary files differ
diff --git a/tests/f_dup_de/name b/tests/f_dup_de/name
new file mode 100644
index 0000000..bd90734
--- /dev/null
+++ b/tests/f_dup_de/name
@@ -0,0 +1 @@
+duplicate directory entries
diff --git a/tests/f_dup_de/script b/tests/f_dup_de/script
new file mode 100644
index 0000000..dcda9d8
--- /dev/null
+++ b/tests/f_dup_de/script
@@ -0,0 +1,15 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+if test "$HTREE"x = x ; then
+ gunzip < $test_dir/image.gz > $TMPFILE
+ $DEBUGFS -w -R "feature ^dir_index" $TMPFILE >/dev/null 2>&1
+ gzip $TMPFILE
+ IMAGE="$TMPFILE".gz
+ EXP1=$test_dir/expect-nohtree.1
+ EXP2=$test_dir/expect-nohtree.2
+fi
+. $cmd_dir/run_e2fsck
+rm -f "$TMPFILE".gz
diff --git a/tests/f_dup_de2/expect.1 b/tests/f_dup_de2/expect.1
new file mode 100644
index 0000000..8dd3d91
--- /dev/null
+++ b/tests/f_dup_de2/expect.1
@@ -0,0 +1,16 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Duplicate entry 'test-008' found.
+ Marking / (2) to be rebuilt.
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Entry 'test-008' in / (2) has a non-unique filename.
+Rename to test-0~0? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 21/256 files (0.0% non-contiguous), 1087/2048 blocks
+Exit status is 1
diff --git a/tests/f_dup_de2/expect.2 b/tests/f_dup_de2/expect.2
new file mode 100644
index 0000000..8781274
--- /dev/null
+++ b/tests/f_dup_de2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 21/256 files (0.0% non-contiguous), 1087/2048 blocks
+Exit status is 0
diff --git a/tests/f_dup_de2/image.gz b/tests/f_dup_de2/image.gz
new file mode 100644
index 0000000..a8e4db3
--- /dev/null
+++ b/tests/f_dup_de2/image.gz
Binary files differ
diff --git a/tests/f_dup_de2/name b/tests/f_dup_de2/name
new file mode 100644
index 0000000..e337f10
--- /dev/null
+++ b/tests/f_dup_de2/name
@@ -0,0 +1 @@
+duplicate directory entries for non-indexed dirs
diff --git a/tests/f_dup_de_crypt/expect.1 b/tests/f_dup_de_crypt/expect.1
new file mode 100644
index 0000000..03e0ad6
--- /dev/null
+++ b/tests/f_dup_de_crypt/expect.1
@@ -0,0 +1,18 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Duplicate entry '+M-^AT^EM-1M-^CM-/)*M-L^RM-^L^@M-WM-)M-+' found.
+ Marking /test (12) to be rebuilt.
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Duplicate filename entry '+M-^AT^EM-1M-^CM-/)*M-L^RM-^L^@M-WM-)M-+' in /test (12) found. Clear? yes
+
+Pass 4: Checking reference counts
+Unattached inode 13
+Connect to /lost+found? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 26/60 blocks
+Exit status is 1
diff --git a/tests/f_dup_de_crypt/expect.2 b/tests/f_dup_de_crypt/expect.2
new file mode 100644
index 0000000..cfca772
--- /dev/null
+++ b/tests/f_dup_de_crypt/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/16 files (0.0% non-contiguous), 26/60 blocks
+Exit status is 0
diff --git a/tests/f_dup_de_crypt/image.gz b/tests/f_dup_de_crypt/image.gz
new file mode 100644
index 0000000..07a44d7
--- /dev/null
+++ b/tests/f_dup_de_crypt/image.gz
Binary files differ
diff --git a/tests/f_dup_de_crypt/name b/tests/f_dup_de_crypt/name
new file mode 100644
index 0000000..aff30a8
--- /dev/null
+++ b/tests/f_dup_de_crypt/name
@@ -0,0 +1 @@
+duplicate directory entries for encrypted dirs
diff --git a/tests/f_dup_resize/expect.1 b/tests/f_dup_resize/expect.1
new file mode 100644
index 0000000..8a2764d
--- /dev/null
+++ b/tests/f_dup_resize/expect.1
@@ -0,0 +1,35 @@
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 7: 4--7
+Multiply-claimed block(s) in inode 12: 4--7
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 1 inodes containing multiply-claimed blocks.)
+
+File /debugfs (inode #12, mod time Mon Apr 11 00:00:00 2005)
+ has 4 multiply-claimed block(s), shared with 2 file(s):
+ <filesystem metadata>
+ <The group descriptor inode> (inode #7, mod time Mon Apr 11 06:13:20 2005)
+Clone multiply-claimed blocks? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(8195--8198)
+Fix? yes
+
+Free blocks count wrong for group #0 (7750, counted=7751).
+Fix? yes
+
+Free blocks count wrong (9434, counted=9435).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/2560 files (8.3% non-contiguous), 805/10240 blocks
+Exit status is 1
diff --git a/tests/f_dup_resize/expect.2 b/tests/f_dup_resize/expect.2
new file mode 100644
index 0000000..d91b0af
--- /dev/null
+++ b/tests/f_dup_resize/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/2560 files (8.3% non-contiguous), 805/10240 blocks
+Exit status is 0
diff --git a/tests/f_dup_resize/name b/tests/f_dup_resize/name
new file mode 100644
index 0000000..6c5befa
--- /dev/null
+++ b/tests/f_dup_resize/name
@@ -0,0 +1 @@
+blocks claimed by the resize inode and another inode
diff --git a/tests/f_dup_resize/script b/tests/f_dup_resize/script
new file mode 100644
index 0000000..0fd350b
--- /dev/null
+++ b/tests/f_dup_resize/script
@@ -0,0 +1,29 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+dd if=$TEST_BITS of=$TEST_DATA bs=63k count=1 conv=sync > /dev/null 2>&1
+
+touch $TMPFILE
+$MKE2FS -F -o Linux -O resize_inode $TMPFILE 10240 > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+freeb 4 4
+freeb 8195 4
+write $TEST_DATA debugfs
+set_current_time 20050411000000
+set_inode_field debugfs mtime 20050411000000
+q
+EOF
+
+E2FSCK_TIME=1113200000
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA
diff --git a/tests/f_dupdot/expect.1 b/tests/f_dupdot/expect.1
new file mode 100644
index 0000000..afce8d6
--- /dev/null
+++ b/tests/f_dupdot/expect.1
@@ -0,0 +1,22 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry '.' in <14>/<12> (12) is duplicate '.' entry.
+Fix? yes
+
+Entry '..' in <14>/<12> (12) is duplicate '..' entry.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached inode 13
+Connect to /lost+found? yes
+
+Inode 13 ref count is 2, should be 1. Fix? yes
+
+Unattached zero-length inode 14. Clear? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_dupdot/expect.2 b/tests/f_dupdot/expect.2
new file mode 100644
index 0000000..c547be3
--- /dev/null
+++ b/tests/f_dupdot/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_dupdot/image.gz b/tests/f_dupdot/image.gz
new file mode 100644
index 0000000..6a2207e
--- /dev/null
+++ b/tests/f_dupdot/image.gz
Binary files differ
diff --git a/tests/f_dupdot/name b/tests/f_dupdot/name
new file mode 100644
index 0000000..a7a0afc
--- /dev/null
+++ b/tests/f_dupdot/name
@@ -0,0 +1 @@
+duplicate '.' and '..' entries
diff --git a/tests/f_dupfsblks/expect.1 b/tests/f_dupfsblks/expect.1
new file mode 100644
index 0000000..6751986
--- /dev/null
+++ b/tests/f_dupfsblks/expect.1
@@ -0,0 +1,65 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 4096, should be 5120. Fix? yes
+
+Inode 13, i_size is 0, should be 2048. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 3--4 6 1
+Multiply-claimed block(s) in inode 13: 2--3
+Multiply-claimed block(s) in inode 14: 2
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 3 inodes containing multiply-claimed blocks.)
+
+File /foo (inode #12, mod time Thu Apr 28 17:57:53 1994)
+ has 4 multiply-claimed block(s), shared with 2 file(s):
+ <filesystem metadata>
+ /bar (inode #13, mod time Thu Aug 5 07:17:17 1999)
+Clone multiply-claimed blocks? yes
+
+File /bar (inode #13, mod time Thu Aug 5 07:17:17 1999)
+ has 2 multiply-claimed block(s), shared with 3 file(s):
+ <filesystem metadata>
+ /foo (inode #12, mod time Thu Apr 28 17:57:53 1994)
+ /quux (inode #14, mod time Thu Aug 5 07:18:09 1999)
+Clone multiply-claimed blocks? yes
+
+File /quux (inode #14, mod time Thu Aug 5 07:18:09 1999)
+ has 1 multiply-claimed block(s), shared with 2 file(s):
+ <filesystem metadata>
+ /bar (inode #13, mod time Thu Aug 5 07:17:17 1999)
+Clone multiply-claimed blocks? yes
+
+Pass 2: Checking directory structure
+Directory inode 12, block #1, offset 0: directory corrupted
+Salvage? yes
+
+Directory inode 12, block #2, offset 0: directory corrupted
+Salvage? yes
+
+Directory inode 12, block #3, offset 0: directory corrupted
+Salvage? yes
+
+Entry '' in ??? (12) has a zero-length name.
+Clear? yes
+
+Directory inode 12, block #4, offset 100: directory corrupted
+Salvage? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (77, counted=70).
+Fix? yes
+
+Free blocks count wrong (77, counted=70).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/32 files (7.1% non-contiguous), 30/100 blocks
+Exit status is 1
diff --git a/tests/f_dupfsblks/expect.2 b/tests/f_dupfsblks/expect.2
new file mode 100644
index 0000000..c1726b6
--- /dev/null
+++ b/tests/f_dupfsblks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/32 files (0.0% non-contiguous), 30/100 blocks
+Exit status is 0
diff --git a/tests/f_dupfsblks/image.gz b/tests/f_dupfsblks/image.gz
new file mode 100644
index 0000000..109dad0
--- /dev/null
+++ b/tests/f_dupfsblks/image.gz
Binary files differ
diff --git a/tests/f_dupfsblks/name b/tests/f_dupfsblks/name
new file mode 100644
index 0000000..84124c9
--- /dev/null
+++ b/tests/f_dupfsblks/name
@@ -0,0 +1 @@
+blocks claimed by a file and bitmaps or inode tables
diff --git a/tests/f_dupsuper/expect.1 b/tests/f_dupsuper/expect.1
new file mode 100644
index 0000000..2107e2d
--- /dev/null
+++ b/tests/f_dupsuper/expect.1
@@ -0,0 +1,27 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 2--3 1
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 1 inodes containing multiply-claimed blocks.)
+
+File /termcap (inode #12, mod time Sun Jan 2 08:29:13 1994)
+ has 3 multiply-claimed block(s), shared with 1 file(s):
+ <filesystem metadata>
+Clone multiply-claimed blocks? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(29--31)
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (8.3% non-contiguous), 39/100 blocks
+Exit status is 1
diff --git a/tests/f_dupsuper/expect.2 b/tests/f_dupsuper/expect.2
new file mode 100644
index 0000000..8735c4e
--- /dev/null
+++ b/tests/f_dupsuper/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (8.3% non-contiguous), 39/100 blocks
+Exit status is 0
diff --git a/tests/f_dupsuper/image.gz b/tests/f_dupsuper/image.gz
new file mode 100644
index 0000000..d919e07
--- /dev/null
+++ b/tests/f_dupsuper/image.gz
Binary files differ
diff --git a/tests/f_dupsuper/name b/tests/f_dupsuper/name
new file mode 100644
index 0000000..560a707
--- /dev/null
+++ b/tests/f_dupsuper/name
@@ -0,0 +1 @@
+blocks claimed by a file and superblock or group descriptors
diff --git a/tests/f_ea_bad_csum/expect.1 b/tests/f_ea_bad_csum/expect.1
new file mode 100644
index 0000000..4fc365f
--- /dev/null
+++ b/tests/f_ea_bad_csum/expect.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has a bad extended attribute block 1074. Clear? yes
+
+Inode 12, i_blocks is 2, should be 0. Fix? yes
+
+Extended attribute in inode 13 has a hash (1631637196) which is invalid
+Clear? yes
+
+Inode 13, i_blocks is 2, should be 0. Fix? yes
+
+Inode 14 extended attribute block 1076 passes checks, but checksum does not match block. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(1074--1075)
+Fix? yes
+
+Free blocks count wrong for group #0 (971, counted=973).
+Fix? yes
+
+Free blocks count wrong (971, counted=973).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (7.1% non-contiguous), 1075/2048 blocks
+Exit status is 1
diff --git a/tests/f_ea_bad_csum/expect.2 b/tests/f_ea_bad_csum/expect.2
new file mode 100644
index 0000000..d83fdfb
--- /dev/null
+++ b/tests/f_ea_bad_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/128 files (7.1% non-contiguous), 1075/2048 blocks
+Exit status is 0
diff --git a/tests/f_ea_bad_csum/image.gz b/tests/f_ea_bad_csum/image.gz
new file mode 100644
index 0000000..e7a25c5
--- /dev/null
+++ b/tests/f_ea_bad_csum/image.gz
Binary files differ
diff --git a/tests/f_ea_bad_csum/name b/tests/f_ea_bad_csum/name
new file mode 100644
index 0000000..958b244
--- /dev/null
+++ b/tests/f_ea_bad_csum/name
@@ -0,0 +1 @@
+EA block with bad checksum (metadata_csum)
diff --git a/tests/f_ea_checks/expect.1 b/tests/f_ea_checks/expect.1
new file mode 100644
index 0000000..eb215a2
--- /dev/null
+++ b/tests/f_ea_checks/expect.1
@@ -0,0 +1,57 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 13 has a bad extended attribute block 26. Clear? yes
+
+Inode 13, i_blocks is 4, should be 2. Fix? yes
+
+Extended attribute in inode 14 has a hash (1649340189) which is invalid
+Clear? yes
+
+Inode 14, i_blocks is 2, should be 0. Fix? yes
+
+Inode 17 has a bad extended attribute block 28. Clear? yes
+
+Inode 17, i_blocks is 4, should be 2. Fix? yes
+
+Inode 16 has a bad extended attribute block 29. Clear? yes
+
+Inode 16, i_blocks is 2, should be 0. Fix? yes
+
+Inode 19 has a bad extended attribute block 33. Clear? yes
+
+Inode 19, i_blocks is 2, should be 0. Fix? yes
+
+Inode 12 has a bad extended attribute block 55. Clear? yes
+
+Inode 12, i_blocks is 2, should be 0. Fix? yes
+
+Inode 15, i_blocks is 2, should be 0. Fix? yes
+
+Pass 2: Checking directory structure
+Extended attribute block for inode 15 (/far) is invalid (999).
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(26--29) -33 -55
+Fix? yes
+
+Free blocks count wrong for group #0 (481, counted=484).
+Fix? yes
+
+Free blocks count wrong (481, counted=484).
+Fix? yes
+
+Inode bitmap differences: -18
+Fix? yes
+
+Free inodes count wrong for group #0 (47, counted=46).
+Fix? yes
+
+Free inodes count wrong (47, counted=46).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/64 files (0.0% non-contiguous), 28/512 blocks
+Exit status is 1
diff --git a/tests/f_ea_checks/expect.2 b/tests/f_ea_checks/expect.2
new file mode 100644
index 0000000..2a11cd2
--- /dev/null
+++ b/tests/f_ea_checks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 18/64 files (0.0% non-contiguous), 28/512 blocks
+Exit status is 0
diff --git a/tests/f_ea_checks/image.gz b/tests/f_ea_checks/image.gz
new file mode 100644
index 0000000..253da06
--- /dev/null
+++ b/tests/f_ea_checks/image.gz
Binary files differ
diff --git a/tests/f_ea_checks/name b/tests/f_ea_checks/name
new file mode 100644
index 0000000..160fdea
--- /dev/null
+++ b/tests/f_ea_checks/name
@@ -0,0 +1 @@
+extended attribute block checks
diff --git a/tests/f_ea_inode/expect.1 b/tests/f_ea_inode/expect.1
new file mode 100644
index 0000000..aaa0bea
--- /dev/null
+++ b/tests/f_ea_inode/expect.1
@@ -0,0 +1,31 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 17 has illegal extended attribute value inode 4008636142.
+Clear? yes
+
+Inode 17, i_blocks is 8, should be 0. Fix? yes
+
+Inode 18 has illegal extended attribute value inode 19.
+Clear? yes
+
+Inode 18, i_blocks is 8, should be 0. Fix? yes
+
+Extended attribute in inode 20 has a hash (1145324612) which is invalid
+Clear? yes
+
+Inode 20, i_blocks is 8, should be 0. Fix? yes
+
+EA inode 19 for parent inode 21 missing EA_INODE flag.
+ Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Extended attribute inode 16 ref count is 51, should be 2. Fix? yes
+
+Extended attribute inode 19 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 21/32 files (0.0% non-contiguous), 18/64 blocks
+Exit status is 1
diff --git a/tests/f_ea_inode/expect.2 b/tests/f_ea_inode/expect.2
new file mode 100644
index 0000000..f9276fb
--- /dev/null
+++ b/tests/f_ea_inode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 21/32 files (0.0% non-contiguous), 18/64 blocks
+Exit status is 0
diff --git a/tests/f_ea_inode/image.gz b/tests/f_ea_inode/image.gz
new file mode 100644
index 0000000..68a3975
--- /dev/null
+++ b/tests/f_ea_inode/image.gz
Binary files differ
diff --git a/tests/f_ea_inode_self_ref/expect.1 b/tests/f_ea_inode_self_ref/expect.1
new file mode 100644
index 0000000..f94c04d
--- /dev/null
+++ b/tests/f_ea_inode_self_ref/expect.1
@@ -0,0 +1,17 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 16 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes
+
+Extended attribute in inode 16 has a hash (553648128) which is invalid
+Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -20
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_ea_inode_self_ref/expect.2 b/tests/f_ea_inode_self_ref/expect.2
new file mode 100644
index 0000000..9398061
--- /dev/null
+++ b/tests/f_ea_inode_self_ref/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_ea_inode_self_ref/image.gz b/tests/f_ea_inode_self_ref/image.gz
new file mode 100644
index 0000000..3cc733b
--- /dev/null
+++ b/tests/f_ea_inode_self_ref/image.gz
Binary files differ
diff --git a/tests/f_ea_inode_self_ref/name b/tests/f_ea_inode_self_ref/name
new file mode 100644
index 0000000..4e68da8
--- /dev/null
+++ b/tests/f_ea_inode_self_ref/name
@@ -0,0 +1 @@
+corrupted, self-referential ea_in_inode
diff --git a/tests/f_ea_signed_hash/expect.1 b/tests/f_ea_signed_hash/expect.1
new file mode 100644
index 0000000..5f2b47a
--- /dev/null
+++ b/tests/f_ea_signed_hash/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/24 files (0.0% non-contiguous), 29/200 blocks
+Exit status is 0
diff --git a/tests/f_ea_signed_hash/image.gz b/tests/f_ea_signed_hash/image.gz
new file mode 100644
index 0000000..dbbc97f
--- /dev/null
+++ b/tests/f_ea_signed_hash/image.gz
Binary files differ
diff --git a/tests/f_ea_signed_hash/script b/tests/f_ea_signed_hash/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_ea_signed_hash/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_ea_unsigned_hash/expect.1 b/tests/f_ea_unsigned_hash/expect.1
new file mode 100644
index 0000000..5f2b47a
--- /dev/null
+++ b/tests/f_ea_unsigned_hash/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/24 files (0.0% non-contiguous), 29/200 blocks
+Exit status is 0
diff --git a/tests/f_ea_unsigned_hash/image.gz b/tests/f_ea_unsigned_hash/image.gz
new file mode 100644
index 0000000..795cece
--- /dev/null
+++ b/tests/f_ea_unsigned_hash/image.gz
Binary files differ
diff --git a/tests/f_ea_unsigned_hash/script b/tests/f_ea_unsigned_hash/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_ea_unsigned_hash/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_ea_value_crash/expect.1 b/tests/f_ea_value_crash/expect.1
new file mode 100644
index 0000000..8315358
--- /dev/null
+++ b/tests/f_ea_value_crash/expect.1
@@ -0,0 +1,15 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes
+
+Inode 12 extended attribute is corrupt (allocation collision). Clear? yes
+
+Inode 13 extended attribute is corrupt (allocation collision). Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_ea_value_crash/expect.2 b/tests/f_ea_value_crash/expect.2
new file mode 100644
index 0000000..06886a4
--- /dev/null
+++ b/tests/f_ea_value_crash/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 0
diff --git a/tests/f_ea_value_crash/image.gz b/tests/f_ea_value_crash/image.gz
new file mode 100644
index 0000000..c45fb0e
--- /dev/null
+++ b/tests/f_ea_value_crash/image.gz
Binary files differ
diff --git a/tests/f_ea_value_crash/name b/tests/f_ea_value_crash/name
new file mode 100644
index 0000000..194bbed
--- /dev/null
+++ b/tests/f_ea_value_crash/name
@@ -0,0 +1 @@
+extended attribute value conflicts with key
diff --git a/tests/f_emptydir/expect.1 b/tests/f_emptydir/expect.1
new file mode 100644
index 0000000..c612621
--- /dev/null
+++ b/tests/f_emptydir/expect.1
@@ -0,0 +1,19 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 1024, should be 0. Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 12 has an unallocated block #0. Allocate? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (957, counted=956).
+Fix? yes
+
+Free blocks count wrong (957, counted=956).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/256 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 1
diff --git a/tests/f_emptydir/expect.2 b/tests/f_emptydir/expect.2
new file mode 100644
index 0000000..75c0515
--- /dev/null
+++ b/tests/f_emptydir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/256 files (16.7% non-contiguous), 1092/2048 blocks
+Exit status is 0
diff --git a/tests/f_emptydir/image.gz b/tests/f_emptydir/image.gz
new file mode 100644
index 0000000..1b6f8f8
--- /dev/null
+++ b/tests/f_emptydir/image.gz
Binary files differ
diff --git a/tests/f_emptydir/name b/tests/f_emptydir/name
new file mode 100644
index 0000000..3e0ab60
--- /dev/null
+++ b/tests/f_emptydir/name
@@ -0,0 +1 @@
+always iterate dir block 0 or e2fsck goes into infinite loop
diff --git a/tests/f_encrypted_lpf/expect.1 b/tests/f_encrypted_lpf/expect.1
new file mode 100644
index 0000000..63ac5f3
--- /dev/null
+++ b/tests/f_encrypted_lpf/expect.1
@@ -0,0 +1,27 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Unconnected directory inode 12 (was in /)
+Connect to /lost+found? yes
+
+/lost+found is encrypted
+Clear? yes
+
+/lost+found not found. Create? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Unconnected directory inode 11 (was in /)
+Connect to /lost+found? yes
+
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Inode 12 ref count is 3, should be 2. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/64 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
diff --git a/tests/f_encrypted_lpf/expect.2 b/tests/f_encrypted_lpf/expect.2
new file mode 100644
index 0000000..6a59947
--- /dev/null
+++ b/tests/f_encrypted_lpf/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/64 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 0
diff --git a/tests/f_encrypted_lpf/image.gz b/tests/f_encrypted_lpf/image.gz
new file mode 100644
index 0000000..7c89e07
--- /dev/null
+++ b/tests/f_encrypted_lpf/image.gz
Binary files differ
diff --git a/tests/f_encrypted_lpf/name b/tests/f_encrypted_lpf/name
new file mode 100644
index 0000000..b74259c
--- /dev/null
+++ b/tests/f_encrypted_lpf/name
@@ -0,0 +1 @@
+encrypted lost+found directory
diff --git a/tests/f_end-bitmap/expect.1 b/tests/f_end-bitmap/expect.1
new file mode 100644
index 0000000..85c7e67
--- /dev/null
+++ b/tests/f_end-bitmap/expect.1
@@ -0,0 +1,18 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (44, counted=63).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+Padding at end of block bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 37/100 blocks
+Exit status is 1
diff --git a/tests/f_end-bitmap/expect.2 b/tests/f_end-bitmap/expect.2
new file mode 100644
index 0000000..8109f99
--- /dev/null
+++ b/tests/f_end-bitmap/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 37/100 blocks
+Exit status is 0
diff --git a/tests/f_end-bitmap/image.gz b/tests/f_end-bitmap/image.gz
new file mode 100644
index 0000000..cb20d0a
--- /dev/null
+++ b/tests/f_end-bitmap/image.gz
Binary files differ
diff --git a/tests/f_end-bitmap/name b/tests/f_end-bitmap/name
new file mode 100644
index 0000000..b63b6d7
--- /dev/null
+++ b/tests/f_end-bitmap/name
@@ -0,0 +1 @@
+corruption at end of block bitmap
diff --git a/tests/f_eofblocks/expect.1 b/tests/f_eofblocks/expect.1
new file mode 100644
index 0000000..f224b7d
--- /dev/null
+++ b/tests/f_eofblocks/expect.1
@@ -0,0 +1,13 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 30, i_size is 2048, should be 4096. Fix? yes
+
+Inode 31, i_size is 2048, should be 6144. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 31/56 files (29.0% non-contiguous), 85/400 blocks
+Exit status is 1
diff --git a/tests/f_eofblocks/expect.2 b/tests/f_eofblocks/expect.2
new file mode 100644
index 0000000..0cce314
--- /dev/null
+++ b/tests/f_eofblocks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 31/56 files (29.0% non-contiguous), 85/400 blocks
+Exit status is 0
diff --git a/tests/f_eofblocks/image.gz b/tests/f_eofblocks/image.gz
new file mode 100644
index 0000000..e1177b3
--- /dev/null
+++ b/tests/f_eofblocks/image.gz
Binary files differ
diff --git a/tests/f_eofblocks/name b/tests/f_eofblocks/name
new file mode 100644
index 0000000..d93adc1
--- /dev/null
+++ b/tests/f_eofblocks/name
@@ -0,0 +1 @@
+blocks after i_size
diff --git a/tests/f_expand/expect.1.gz b/tests/f_expand/expect.1.gz
new file mode 100644
index 0000000..81fe7dd
--- /dev/null
+++ b/tests/f_expand/expect.1.gz
Binary files differ
diff --git a/tests/f_expand/expect.2 b/tests/f_expand/expect.2
new file mode 100644
index 0000000..40c00c6
--- /dev/null
+++ b/tests/f_expand/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 5109/5504 files (0.0% non-contiguous), 803/900 blocks
+Exit status is 0
diff --git a/tests/f_expand/image.gz b/tests/f_expand/image.gz
new file mode 100644
index 0000000..c4c18fb
--- /dev/null
+++ b/tests/f_expand/image.gz
Binary files differ
diff --git a/tests/f_expand/name b/tests/f_expand/name
new file mode 100644
index 0000000..feebe0f
--- /dev/null
+++ b/tests/f_expand/name
@@ -0,0 +1 @@
+expanding lost+found
diff --git a/tests/f_expandroot_create_lnf/expect.1 b/tests/f_expandroot_create_lnf/expect.1
new file mode 100644
index 0000000..9593dbf
--- /dev/null
+++ b/tests/f_expandroot_create_lnf/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/64 files (0.0% non-contiguous), 33/1024 blocks
+Exit status is 1
diff --git a/tests/f_expandroot_create_lnf/expect.2 b/tests/f_expandroot_create_lnf/expect.2
new file mode 100644
index 0000000..5eec1f0
--- /dev/null
+++ b/tests/f_expandroot_create_lnf/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/64 files (6.3% non-contiguous), 33/1024 blocks
+Exit status is 0
diff --git a/tests/f_expandroot_create_lnf/image.gz b/tests/f_expandroot_create_lnf/image.gz
new file mode 100644
index 0000000..ccdbfa7
--- /dev/null
+++ b/tests/f_expandroot_create_lnf/image.gz
Binary files differ
diff --git a/tests/f_expandroot_create_lnf/name b/tests/f_expandroot_create_lnf/name
new file mode 100644
index 0000000..f22542b
--- /dev/null
+++ b/tests/f_expandroot_create_lnf/name
@@ -0,0 +1 @@
+no space in root to create lost+found entry
diff --git a/tests/f_ext_journal/expect.1 b/tests/f_ext_journal/expect.1
new file mode 100644
index 0000000..e5c8201
--- /dev/null
+++ b/tests/f_ext_journal/expect.1
@@ -0,0 +1,8 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 89/2560 files (0.0% non-contiguous), 170/2560 blocks
+Exit status is 0
diff --git a/tests/f_ext_journal/expect.2 b/tests/f_ext_journal/expect.2
new file mode 100644
index 0000000..e2d0dc6
--- /dev/null
+++ b/tests/f_ext_journal/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 89/2560 files (0.0% non-contiguous), 170/2560 blocks
+Exit status is 0
diff --git a/tests/f_ext_journal/image.gz b/tests/f_ext_journal/image.gz
new file mode 100644
index 0000000..5538371
--- /dev/null
+++ b/tests/f_ext_journal/image.gz
Binary files differ
diff --git a/tests/f_ext_journal/journal.gz b/tests/f_ext_journal/journal.gz
new file mode 100644
index 0000000..ab2c72a
--- /dev/null
+++ b/tests/f_ext_journal/journal.gz
Binary files differ
diff --git a/tests/f_ext_journal/name b/tests/f_ext_journal/name
new file mode 100644
index 0000000..10e950c
--- /dev/null
+++ b/tests/f_ext_journal/name
@@ -0,0 +1 @@
+test external journal device
diff --git a/tests/f_ext_journal/script b/tests/f_ext_journal/script
new file mode 100644
index 0000000..dd81ef5
--- /dev/null
+++ b/tests/f_ext_journal/script
@@ -0,0 +1,8 @@
+FSCK_OPT="-fy -j journal.img"
+SECOND_FSCK_OPT="-fy -j journal.img"
+
+gunzip < $test_dir/journal.gz > journal.img
+
+. $cmd_dir/run_e2fsck
+
+rm -f journal.img
diff --git a/tests/f_ext_zero_len/expect.1 b/tests/f_ext_zero_len/expect.1
new file mode 100644
index 0000000..40109b3
--- /dev/null
+++ b/tests/f_ext_zero_len/expect.1
@@ -0,0 +1,13 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has zero length extent
+ (invalid logical block 0, physical block 37)
+Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_ext_zero_len/expect.2 b/tests/f_ext_zero_len/expect.2
new file mode 100644
index 0000000..4ee5d96
--- /dev/null
+++ b/tests/f_ext_zero_len/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_ext_zero_len/image.gz b/tests/f_ext_zero_len/image.gz
new file mode 100644
index 0000000..a03e5fd
--- /dev/null
+++ b/tests/f_ext_zero_len/image.gz
Binary files differ
diff --git a/tests/f_ext_zero_len/name b/tests/f_ext_zero_len/name
new file mode 100644
index 0000000..ada4a72
--- /dev/null
+++ b/tests/f_ext_zero_len/name
@@ -0,0 +1 @@
+extent with zero length
diff --git a/tests/f_extent_bad_node/expect.1 b/tests/f_extent_bad_node/expect.1
new file mode 100644
index 0000000..e6cdf97
--- /dev/null
+++ b/tests/f_extent_bad_node/expect.1
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent node (blk 22, lblk 0)
+Clear? yes
+
+Inode 12 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 12, i_blocks is 16, should be 8. Fix? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(21--23) -25
+Fix? yes
+
+Free blocks count wrong for group #0 (73, counted=77).
+Fix? yes
+
+Free blocks count wrong (73, counted=77).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 1
diff --git a/tests/f_extent_bad_node/expect.2 b/tests/f_extent_bad_node/expect.2
new file mode 100644
index 0000000..b78b193
--- /dev/null
+++ b/tests/f_extent_bad_node/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 0
diff --git a/tests/f_extent_bad_node/image.gz b/tests/f_extent_bad_node/image.gz
new file mode 100644
index 0000000..01d9b45
--- /dev/null
+++ b/tests/f_extent_bad_node/image.gz
Binary files differ
diff --git a/tests/f_extent_bad_node/name b/tests/f_extent_bad_node/name
new file mode 100644
index 0000000..0b4ab8c
--- /dev/null
+++ b/tests/f_extent_bad_node/name
@@ -0,0 +1 @@
+bad interior node in extent tree (metadata_csum)
diff --git a/tests/f_extent_htree/expect.1 b/tests/f_extent_htree/expect.1
new file mode 100644
index 0000000..63d1415
--- /dev/null
+++ b/tests/f_extent_htree/expect.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+
+ 352 inodes used (29.53%, out of 1192)
+ 0 non-contiguous files (0.0%)
+ 1 non-contiguous directory (0.3%)
+ # of inodes with ind/dind/tind blocks: 0/0/0
+ Extent depth histogram: 342/1
+ 778 blocks used (65.38%, out of 1190)
+ 0 bad blocks
+ 0 large files
+
+ 340 regular files
+ 3 directories
+ 0 character device files
+ 0 block device files
+ 0 fifos
+ 0 links
+ 0 symbolic links (0 fast symbolic links)
+ 0 sockets
+------------
+ 343 files
+Exit status is 0
diff --git a/tests/f_extent_htree/expect.2 b/tests/f_extent_htree/expect.2
new file mode 100644
index 0000000..7c0ef95
--- /dev/null
+++ b/tests/f_extent_htree/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 352/1192 files (0.3% non-contiguous), 778/1190 blocks
+Exit status is 0
diff --git a/tests/f_extent_htree/expect.pre.1 b/tests/f_extent_htree/expect.pre.1
new file mode 100644
index 0000000..fb0e84a
--- /dev/null
+++ b/tests/f_extent_htree/expect.pre.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+
+ 522 inodes used (43.79%, out of 1192)
+ 0 non-contiguous files (0.0%)
+ 1 non-contiguous directory (0.2%)
+ # of inodes with ind/dind/tind blocks: 0/0/0
+ Extent depth histogram: 512/1
+ 1007 blocks used (84.62%, out of 1190)
+ 0 bad blocks
+ 0 large files
+
+ 510 regular files
+ 3 directories
+ 0 character device files
+ 0 block device files
+ 0 fifos
+ 0 links
+ 0 symbolic links (0 fast symbolic links)
+ 0 sockets
+------------
+ 513 files
+Exit status is 0
diff --git a/tests/f_extent_htree/expect.pre.2 b/tests/f_extent_htree/expect.pre.2
new file mode 100644
index 0000000..54beb0e
--- /dev/null
+++ b/tests/f_extent_htree/expect.pre.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 522/1192 files (0.2% non-contiguous), 1007/1190 blocks
+Exit status is 0
diff --git a/tests/f_extent_htree/name b/tests/f_extent_htree/name
new file mode 100644
index 0000000..fc3812d
--- /dev/null
+++ b/tests/f_extent_htree/name
@@ -0,0 +1 @@
+htree extent compression
diff --git a/tests/f_extent_htree/script b/tests/f_extent_htree/script
new file mode 100644
index 0000000..fb24a63
--- /dev/null
+++ b/tests/f_extent_htree/script
@@ -0,0 +1,56 @@
+#!/bin/bash
+TMPDIR=${TMPDIR:-"/tmp"}
+OUT=$test_name.log
+
+FSCK_OPT="-fyvD"
+SKIP_GUNZIP="true"
+
+NAMELEN=250
+SRC=$TMPDIR/$test_name.tmp
+SUB=subdir
+BASE=$SRC/$SUB/$(yes | tr -d '\n' | dd bs=$NAMELEN count=1 2> /dev/null)
+TMPFILE=${TMPFILE:-"$TMPDIR/image"}
+BSIZE=1024
+
+> $OUT
+mkdir -p $SRC/$SUB
+# calculate the number of files needed to create the directory extent tree
+# deep enough to exceed the in-inode index and spill into an index block.
+#
+# dirents per block * extents per block * (index blocks > i_blocks)
+NUM=$(((BSIZE / (NAMELEN + 8)) * (BSIZE / 12) * 2))
+# Create source files. Unfortunately hard links will be copied as links,
+# and blocks with only NULs will be turned into holes.
+if [ ! -f $BASE.1 ]; then
+ for N in $(seq $NUM); do
+ echo "foo" > $BASE.$N
+ done >> $OUT
+fi
+
+# make filesystem with enough inodes and blocks to hold all the test files
+> $TMPFILE
+NUM=$((NUM * 7 / 3))
+echo "mke2fs -b $BSIZE -O dir_index,extent -E no_copy_xattrs -d$SRC -N$NUM $TMPFILE $NUM" >> $OUT
+$MKE2FS -b $BSIZE -O dir_index,extent -E no_copy_xattrs -d$SRC -N$NUM $TMPFILE $NUM >> $OUT 2>&1
+rm -r $SRC
+
+# Run e2fsck to convert dir to htree before deleting the files, as mke2fs
+# doesn't do this. Run second e2fsck to verify there is no corruption yet.
+(
+ EXP1=$test_dir/expect.pre.1
+ EXP2=$test_dir/expect.pre.2
+ OUT1=$test_name.pre.1.log
+ OUT2=$test_name.pre.2.log
+ DESCRIPTION="$(cat $test_dir/name) setup"
+ . $cmd_dir/run_e2fsck
+)
+
+# generate a list of filenames for debugfs to delete, one from each leaf block
+DELETE_LIST=$TMPDIR/delete.$$
+$DEBUGFS -c -R "htree subdir" $TMPFILE 2>> $OUT |
+ grep -A2 "Reading directory block" |
+ awk '/yyyyy/ { print "rm '$SUB'/"$4 }' > $DELETE_LIST
+$DEBUGFS -w -f $DELETE_LIST $TMPFILE >> $OUT 2>&1
+rm $DELETE_LIST
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_extent_int_bad_csum/expect.1 b/tests/f_extent_int_bad_csum/expect.1
new file mode 100644
index 0000000..7b412b8
--- /dev/null
+++ b/tests/f_extent_int_bad_csum/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 extent block passes checks, but checksum does not match extent
+ (logical block 698, physical block 1788, len 1)
+Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (16.7% non-contiguous), 1446/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_int_bad_csum/expect.2 b/tests/f_extent_int_bad_csum/expect.2
new file mode 100644
index 0000000..6f73d98
--- /dev/null
+++ b/tests/f_extent_int_bad_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (16.7% non-contiguous), 1446/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_int_bad_csum/image.gz b/tests/f_extent_int_bad_csum/image.gz
new file mode 100644
index 0000000..f387898
--- /dev/null
+++ b/tests/f_extent_int_bad_csum/image.gz
Binary files differ
diff --git a/tests/f_extent_int_bad_csum/name b/tests/f_extent_int_bad_csum/name
new file mode 100644
index 0000000..87317e3
--- /dev/null
+++ b/tests/f_extent_int_bad_csum/name
@@ -0,0 +1 @@
+bad csum in internal extent (metadata_csum)
diff --git a/tests/f_extent_int_bad_extent/expect.1 b/tests/f_extent_int_bad_extent/expect.1
new file mode 100644
index 0000000..3d2fb58
--- /dev/null
+++ b/tests/f_extent_int_bad_extent/expect.1
@@ -0,0 +1,24 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 4294967295, len 168)
+Clear? yes
+
+Inode 12, i_blocks is 712, should be 542. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(1090--1091) -1093 -1095 -1097 -1099 -1101 -1103 -1105 -1107 -1109 -1111 -1113 -1115 -1117 -1119 -1121 -1123 -1125 -1127 -1129 -1131 -1133 -1135 -1137 -1139 -1141 -1143 -1145 -1147 -1149 -1151 -1153 -1155 -1157 -1159 -1161 -1163 -1165 -1167 -1169 -1171 -1173 -1175 -1177 -1179 -1181 -1183 -1185 -1187 -1189 -1191 -1193 -1195 -1197 -1199 -1201 -1203 -1205 -1207 -1209 -1211 -1213 -1215 -1217 -1219 -1221 -1223 -1225 -1227 -1229 -1231 -1233 -1235 -1237 -1239 -1241 -1243 -1245 -1247 -1249 -1251 -1253 -1255 -1257
+Fix? yes
+
+Free blocks count wrong for group #0 (602, counted=687).
+Fix? yes
+
+Free blocks count wrong (602, counted=687).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (16.7% non-contiguous), 1361/2048 blocks
+Exit status is 1
diff --git a/tests/f_extent_int_bad_extent/expect.2 b/tests/f_extent_int_bad_extent/expect.2
new file mode 100644
index 0000000..4e72e41
--- /dev/null
+++ b/tests/f_extent_int_bad_extent/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (16.7% non-contiguous), 1361/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_int_bad_extent/image.gz b/tests/f_extent_int_bad_extent/image.gz
new file mode 100644
index 0000000..e8745bf
--- /dev/null
+++ b/tests/f_extent_int_bad_extent/image.gz
Binary files differ
diff --git a/tests/f_extent_int_bad_extent/name b/tests/f_extent_int_bad_extent/name
new file mode 100644
index 0000000..e22f6b4
--- /dev/null
+++ b/tests/f_extent_int_bad_extent/name
@@ -0,0 +1 @@
+bad extent in internal extent (metadata_csum)
diff --git a/tests/f_extent_int_bad_magic/expect.1 b/tests/f_extent_int_bad_magic/expect.1
new file mode 100644
index 0000000..096be4c
--- /dev/null
+++ b/tests/f_extent_int_bad_magic/expect.1
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent node (blk 1295, lblk 0)
+Clear? yes
+
+Inode 12 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 12, i_blocks is 712, should be 0. Fix? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(1090--1093) -1095 -1097 -1099 -1101 -1103 -1105 -1107 -1109 -1111 -1113 -1115 -1117 -1119 -1121 -1123 -1125 -1127 -1129 -1131 -1133 -1135 -1137 -1139 -1141 -1143 -1145 -1147 -1149 -1151 -1153 -1155 -1157 -1159 -1161 -1163 -1165 -1167 -1169 -1171 -1173 -1175 -1177 -1179 -1181 -1183 -1185 -1187 -1189 -1191 -1193 -1195 -1197 -1199 -1201 -1203 -1205 -1207 -1209 -1211 -1213 -1215 -1217 -1219 -1221 -1223 -1225 -1227 -1229 -1231 -1233 -1235 -1237 -1239 -1241 -1243 -1245 -1247 -1249 -1251 -1253 -1255 -1257 -1259 -1261 -1263 -1265 -1267 -1269 -1271 -1273 -1275 -1277 -1279 -1281 -1283 -1285 -1287 -(1289--1298) -1300 -1302 -1304 -1306 -1308 -1310 -1312 -1314 -1316 -1318 -1320 -1322 -1324 -1326 -1328 -1330 -1332 -1334 -1336 -1338 -1340 -1342 -1344 -1346 -1348 -1350 -1352 -1354 -1356 -1358 -1360 -1362 -1364 -1366 -1368 -1370 -1372 -1374 -1376 -1378 -1380 -1382 -1384 -1386 -1388 -1390 -1392 -1394 -1396 -1398 -1400 -1402 -1404 -1406 -1408 -1410 -1412 -1414 -1416 -1418 -1420 -1422 -1424 -1426 -1428 -1430 -1432 -1434 -1436 -1438 -1440 -1442 -1444 -1446 -1448 -1450 -1452 -1454 -1456 -1458 -1460 -1462 -1464 -1466 -1468 -1470 -1472 -1474 -1476 -1478 -1480 -1482 -1484 -1486 -1488 -1490 -1492 -1494 -1496 -1498 -1500 -1502 -1504 -1506 -1508 -1510 -1512 -1514 -1516 -1518 -1520 -1522 -1524 -1526 -1528 -1530 -1532 -1534 -1536 -1538 -1540 -1542 -1544 -1546 -1548 -1550 -1552 -1554 -1556 -1558 -1560 -1562 -1564 -1566 -1568 -1570 -1572 -1574 -1576 -1578 -1580 -1582 -1584 -1586 -1588 -1590 -1592 -1594 -1596 -1598 -1600 -1602 -1604 -1606 -1608 -1610 -1612 -1614 -1616 -1618 -1620 -1622 -1624 -1626 -1628 -1630 -1632 -1634 -1636 -1638 -1640 -1642 -1644 -1646 -1648 -1650 -1652 -1654 -1656 -1658 -1660 -1662 -1664 -1666 -1668 -1670 -1672 -1674 -1676 -1678 -1680 -1682 -1684 -1686 -1688 -1690 -1692 -1694 -1696 -1698 -1700 -1702 -1704 -1706 -1708 -1710 -1712 -1714 -1716 -1718 -1720 -1722 -1724 -1726 -1728 -1730 -1732 -1734 -1736 -1738 -1740 -1742 -1744 -1746 -1748 -1750 -1752 -1754 -1756 -1758 -1760 -1762 -1764 -1766 -1768 -1770 -1772 -1774 -1776 -1778 -1780 -1782 -1784 -1786 -1788
+Fix? yes
+
+Free blocks count wrong for group #0 (602, counted=958).
+Fix? yes
+
+Free blocks count wrong (602, counted=958).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (8.3% non-contiguous), 1090/2048 blocks
+Exit status is 1
diff --git a/tests/f_extent_int_bad_magic/expect.2 b/tests/f_extent_int_bad_magic/expect.2
new file mode 100644
index 0000000..283cc1f
--- /dev/null
+++ b/tests/f_extent_int_bad_magic/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1090/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_int_bad_magic/image.gz b/tests/f_extent_int_bad_magic/image.gz
new file mode 100644
index 0000000..e00f887
--- /dev/null
+++ b/tests/f_extent_int_bad_magic/image.gz
Binary files differ
diff --git a/tests/f_extent_int_bad_magic/name b/tests/f_extent_int_bad_magic/name
new file mode 100644
index 0000000..a451e9a
--- /dev/null
+++ b/tests/f_extent_int_bad_magic/name
@@ -0,0 +1 @@
+bad magic number in internal extent (metadata_csum)
diff --git a/tests/f_extent_interior_start_lblk/expect.1 b/tests/f_extent_interior_start_lblk/expect.1
new file mode 100644
index 0000000..f5b7d46
--- /dev/null
+++ b/tests/f_extent_interior_start_lblk/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Interior extent node level 0 of inode 12:
+Logical start 0 does not match logical start 2 at next level. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 29/100 blocks
+Exit status is 1
diff --git a/tests/f_extent_interior_start_lblk/expect.2 b/tests/f_extent_interior_start_lblk/expect.2
new file mode 100644
index 0000000..06c6082
--- /dev/null
+++ b/tests/f_extent_interior_start_lblk/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 29/100 blocks
+Exit status is 0
diff --git a/tests/f_extent_interior_start_lblk/image.gz b/tests/f_extent_interior_start_lblk/image.gz
new file mode 100644
index 0000000..0ed7128
--- /dev/null
+++ b/tests/f_extent_interior_start_lblk/image.gz
Binary files differ
diff --git a/tests/f_extent_interior_start_lblk/name b/tests/f_extent_interior_start_lblk/name
new file mode 100644
index 0000000..fbd5f58
--- /dev/null
+++ b/tests/f_extent_interior_start_lblk/name
@@ -0,0 +1 @@
+incorrect starting lblk in an interior node
diff --git a/tests/f_extent_leaf_bad_csum/expect.1 b/tests/f_extent_leaf_bad_csum/expect.1
new file mode 100644
index 0000000..86e501a
--- /dev/null
+++ b/tests/f_extent_leaf_bad_csum/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 extent block passes checks, but checksum does not match extent
+ (logical block 7, physical block 1090, len 1)
+Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (16.7% non-contiguous), 1099/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_leaf_bad_csum/expect.2 b/tests/f_extent_leaf_bad_csum/expect.2
new file mode 100644
index 0000000..a564763
--- /dev/null
+++ b/tests/f_extent_leaf_bad_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (16.7% non-contiguous), 1099/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_leaf_bad_csum/image.gz b/tests/f_extent_leaf_bad_csum/image.gz
new file mode 100644
index 0000000..6c778f6
--- /dev/null
+++ b/tests/f_extent_leaf_bad_csum/image.gz
Binary files differ
diff --git a/tests/f_extent_leaf_bad_csum/name b/tests/f_extent_leaf_bad_csum/name
new file mode 100644
index 0000000..62a2285
--- /dev/null
+++ b/tests/f_extent_leaf_bad_csum/name
@@ -0,0 +1 @@
+bad csum in leaf extent (metadata_csum)
diff --git a/tests/f_extent_leaf_bad_extent/expect.1 b/tests/f_extent_leaf_bad_extent/expect.1
new file mode 100644
index 0000000..f96a8a9
--- /dev/null
+++ b/tests/f_extent_leaf_bad_extent/expect.1
@@ -0,0 +1,24 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 2, invalid physical block 4294967295, len 1)
+Clear? yes
+
+Inode 12, i_blocks is 18, should be 16. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -1096
+Fix? yes
+
+Free blocks count wrong for group #0 (949, counted=950).
+Fix? yes
+
+Free blocks count wrong (949, counted=950).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (16.7% non-contiguous), 1098/2048 blocks
+Exit status is 1
diff --git a/tests/f_extent_leaf_bad_extent/expect.2 b/tests/f_extent_leaf_bad_extent/expect.2
new file mode 100644
index 0000000..de1727c
--- /dev/null
+++ b/tests/f_extent_leaf_bad_extent/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (16.7% non-contiguous), 1098/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_leaf_bad_extent/image.gz b/tests/f_extent_leaf_bad_extent/image.gz
new file mode 100644
index 0000000..d34d4d4
--- /dev/null
+++ b/tests/f_extent_leaf_bad_extent/image.gz
Binary files differ
diff --git a/tests/f_extent_leaf_bad_extent/name b/tests/f_extent_leaf_bad_extent/name
new file mode 100644
index 0000000..1bd8bd1
--- /dev/null
+++ b/tests/f_extent_leaf_bad_extent/name
@@ -0,0 +1 @@
+bad extent in leaf extent (metadata_csum)
diff --git a/tests/f_extent_leaf_bad_magic/expect.1 b/tests/f_extent_leaf_bad_magic/expect.1
new file mode 100644
index 0000000..83b8157
--- /dev/null
+++ b/tests/f_extent_leaf_bad_magic/expect.1
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent node (blk 1604, lblk 0)
+Clear? yes
+
+Inode 12 extent tree (at level 1) could be shorter. Optimize? yes
+
+Inode 12, i_blocks is 18, should be 0. Fix? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(1090--1097) -1604
+Fix? yes
+
+Free blocks count wrong for group #0 (949, counted=958).
+Fix? yes
+
+Free blocks count wrong (949, counted=958).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (8.3% non-contiguous), 1090/2048 blocks
+Exit status is 1
diff --git a/tests/f_extent_leaf_bad_magic/expect.2 b/tests/f_extent_leaf_bad_magic/expect.2
new file mode 100644
index 0000000..283cc1f
--- /dev/null
+++ b/tests/f_extent_leaf_bad_magic/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1090/2048 blocks
+Exit status is 0
diff --git a/tests/f_extent_leaf_bad_magic/image.gz b/tests/f_extent_leaf_bad_magic/image.gz
new file mode 100644
index 0000000..7dd044f
--- /dev/null
+++ b/tests/f_extent_leaf_bad_magic/image.gz
Binary files differ
diff --git a/tests/f_extent_leaf_bad_magic/name b/tests/f_extent_leaf_bad_magic/name
new file mode 100644
index 0000000..e9f756e
--- /dev/null
+++ b/tests/f_extent_leaf_bad_magic/name
@@ -0,0 +1 @@
+bad magic number in leaf extent (metadata_csum)
diff --git a/tests/f_extent_oobounds/expect.1 b/tests/f_extent_oobounds/expect.1
new file mode 100644
index 0000000..126c1fa
--- /dev/null
+++ b/tests/f_extent_oobounds/expect.1
@@ -0,0 +1,27 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, end of extent exceeds allowed value
+ (logical block 15, physical block 200, len 30)
+Clear? yes
+
+Inode 12 extent tree (at level 1) could be narrower. Optimize? yes
+
+Inode 12, i_blocks is 154, should be 94. Fix? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(200--229)
+Fix? yes
+
+Free blocks count wrong for group #0 (158, counted=184).
+Fix? yes
+
+Free blocks count wrong (158, counted=184).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (8.3% non-contiguous), 72/256 blocks
+Exit status is 1
diff --git a/tests/f_extent_oobounds/expect.2 b/tests/f_extent_oobounds/expect.2
new file mode 100644
index 0000000..a423f1c
--- /dev/null
+++ b/tests/f_extent_oobounds/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (8.3% non-contiguous), 72/256 blocks
+Exit status is 0
diff --git a/tests/f_extent_oobounds/script b/tests/f_extent_oobounds/script
new file mode 100644
index 0000000..9c2f667
--- /dev/null
+++ b/tests/f_extent_oobounds/script
@@ -0,0 +1,41 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=256 > /dev/null 2>&1
+$MKE2FS -Ft ext4 -o Linux $TMPFILE > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write /dev/null testfile
+setb 100 15
+setb 130 30
+setb 200 30
+extent_open testfile
+ insert_node 0 15 100
+ insert_node --after 15 15 115
+ insert_node --after 30 15 130
+ insert_node --after 45 15 145
+ split
+ down
+ split
+ root
+ down
+ next
+ replace_node 15 30 200
+ extent_close
+set_inode_field testfile i_size 61400
+set_inode_field testfile i_blocks 154
+set_bg 0 free_blocks_count 156
+set_bg 0 bg_checksum calc
+set_super_value free_blocks_count 156
+q
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA
diff --git a/tests/f_extent_too_deep/expect.1 b/tests/f_extent_too_deep/expect.1
new file mode 100644
index 0000000..a595482
--- /dev/null
+++ b/tests/f_extent_too_deep/expect.1
@@ -0,0 +1,23 @@
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 7 1/ 1 0 - 0 12 1
+ 1/ 7 1/ 1 0 - 0 13 1
+ 2/ 7 1/ 1 0 - 0 14 1
+ 3/ 7 1/ 1 0 - 0 15 1
+ 4/ 7 1/ 1 0 - 0 16 1
+ 5/ 7 1/ 1 0 - 0 17 1
+ 6/ 7 1/ 1 0 - 0 9 1
+ 7/ 7 1/ 1 0 - 0 10 - 10 1
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 extent tree could be more shallow (7; could be <= 4)
+Fix? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 1
diff --git a/tests/f_extent_too_deep/expect.2 b/tests/f_extent_too_deep/expect.2
new file mode 100644
index 0000000..a1d28b1
--- /dev/null
+++ b/tests/f_extent_too_deep/expect.2
@@ -0,0 +1,10 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
+debugfs: ex /a
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 1 0 - 0 10 - 10 1
diff --git a/tests/f_extent_too_deep/image.gz b/tests/f_extent_too_deep/image.gz
new file mode 100644
index 0000000..0f5adff
--- /dev/null
+++ b/tests/f_extent_too_deep/image.gz
Binary files differ
diff --git a/tests/f_extent_too_deep/name b/tests/f_extent_too_deep/name
new file mode 100644
index 0000000..7e8654a
--- /dev/null
+++ b/tests/f_extent_too_deep/name
@@ -0,0 +1 @@
+extent tree is deeper than it needs to be
diff --git a/tests/f_extent_too_deep/script b/tests/f_extent_too_deep/script
new file mode 100644
index 0000000..b32c36f
--- /dev/null
+++ b/tests/f_extent_too_deep/script
@@ -0,0 +1,113 @@
+if [ "$DESCRIPTION"x != x ]; then
+ test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+ IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+ FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+ SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+ OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+ OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+ if [ -f $test_dir/expect.1.gz ]; then
+ EXP1=$test_name.1.tmp
+ gunzip < $test_dir/expect.1.gz > $EXP1
+ else
+ EXP1=$test_dir/expect.1
+ fi
+fi
+
+if [ "$EXP2"x = x ]; then
+ if [ -f $test_dir/expect.2.gz ]; then
+ EXP2=$test_name.2.tmp
+ gunzip < $test_dir/expect.2.gz > $EXP2
+ else
+ EXP2=$test_dir/expect.2
+ fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+ gunzip < $IMAGE > $TMPFILE
+fi
+
+eval $PREP_CMD
+
+echo 'ex /a' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE > $OUT1.new 2>&1
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed $OUT1.new > $OUT1
+
+if [ "$ONE_PASS_ONLY" != "true" ]; then
+ $FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
+ status=$?
+ echo Exit status is $status >> $OUT2.new
+ echo 'ex /a' > $TMPFILE.cmd
+ $DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT2.new 2>&1
+ sed -f $cmd_dir/filter.sed $OUT2.new > $OUT2
+fi
+rm -f $TMPFILE.cmd $OUT1.new $OUT2.new
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+ rm -f $test_name.ok $test_name.failed
+ cmp -s $OUT1 $EXP1
+ status1=$?
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ cmp -s $OUT2 $EXP2
+ status2=$?
+ else
+ status2=0
+ fi
+ if [ "$PASS_ZERO" = "true" ]; then
+ cmp -s $test_name.0.log $test_dir/expect.0
+ status3=$?
+ else
+ status3=0
+ fi
+
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
+ if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+ echo "$description: ok"
+ touch $test_name.ok
+ else
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+ rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2
+ unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+ unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+
diff --git a/tests/f_extents/expect.1 b/tests/f_extents/expect.1
new file mode 100644
index 0000000..b4d36d2
--- /dev/null
+++ b/tests/f_extents/expect.1
@@ -0,0 +1,67 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 is in extent format, but superblock is missing EXTENTS feature
+Fix? yes
+
+Inode 13 missing EXTENT_FL, but is in extents format
+Fix? yes
+
+Inode 16 has a duplicate extent mapping
+ (logical block 3, invalid physical block 4613, len 2)
+Clear? yes
+
+Inode 16, i_blocks is 16, should be 12. Fix? yes
+
+Inode 18 has corrupt extent header. Clear inode? yes
+
+Inode 18, i_blocks is 2, should be 0. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 5133 5124--5125 5129 5132--5133 5142--5145
+Multiply-claimed block(s) in inode 17: 5124--5125 5129 5132 5142--5145
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 2 inodes containing multiply-claimed blocks.)
+
+File /fdup1 (inode #12, mod time Wed Jul 5 21:55:26 2006)
+ has 10 multiply-claimed block(s), shared with 1 file(s):
+ /fdup2 (inode #17, mod time Wed Jul 5 21:55:27 2006)
+Clone multiply-claimed blocks? yes
+
+File /fdup2 (inode #17, mod time Wed Jul 5 21:55:27 2006)
+ has 8 multiply-claimed block(s), shared with 1 file(s):
+ /fdup1 (inode #12, mod time Wed Jul 5 21:55:26 2006)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Entry 'fbad-flag' in / (2) has deleted/unused inode 18. Clear? yes
+
+Inode 19 (/fbad-sock) is an illegal FIFO.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +4611 -(4613--4614) -(5121--5122) +(5143--5146)
+Fix? yes
+
+Free blocks count wrong for group #0 (7081, counted=7067).
+Fix? yes
+
+Free blocks count wrong (7081, counted=7067).
+Fix? yes
+
+Inode bitmap differences: -18
+Fix? yes
+
+Free inodes count wrong for group #0 (238, counted=239).
+Fix? yes
+
+Free inodes count wrong (238, counted=239).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 17/256 files (17.6% non-contiguous), 1125/8192 blocks
+Exit status is 1
diff --git a/tests/f_extents/expect.2 b/tests/f_extents/expect.2
new file mode 100644
index 0000000..c6c9ec2
--- /dev/null
+++ b/tests/f_extents/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 17/256 files (17.6% non-contiguous), 1125/8192 blocks
+Exit status is 0
diff --git a/tests/f_extents/image.gz b/tests/f_extents/image.gz
new file mode 100644
index 0000000..caeadc4
--- /dev/null
+++ b/tests/f_extents/image.gz
Binary files differ
diff --git a/tests/f_extents/name b/tests/f_extents/name
new file mode 100644
index 0000000..edede57
--- /dev/null
+++ b/tests/f_extents/name
@@ -0,0 +1 @@
+basic extents support
diff --git a/tests/f_extents2/expect.1 b/tests/f_extents2/expect.1
new file mode 100644
index 0000000..180568b
--- /dev/null
+++ b/tests/f_extents2/expect.1
@@ -0,0 +1,70 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has out of order extents
+ (invalid logical block 0, physical block 23, len 12)
+Clear? yes
+
+Inode 12, i_blocks is 86, should be 62. Fix? yes
+
+Inode 13, i_size is 13295, should be 14336. Fix? yes
+
+Inode 13, i_blocks is 26, should be 28. Fix? yes
+
+Inode 15, i_size is 42197, should be 44032. Fix? yes
+
+Inode 15, i_blocks is 84, should be 86. Fix? yes
+
+Inode 16 has an invalid extent
+ (logical block 0, invalid physical block 500, len 10)
+Clear? yes
+
+Inode 17 has an invalid extent
+ (logical block 0, physical block 120, invalid len 6000)
+Clear? yes
+
+Inode 18 has out of order extents
+ (invalid logical block 10, physical block 155, len 45)
+Clear? yes
+
+Inode 18, i_blocks is 116, should be 24. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 13: 80 80
+Multiply-claimed block(s) in inode 14: 85
+Multiply-claimed block(s) in inode 15: 85
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 3 inodes containing multiply-claimed blocks.)
+
+File /block.c (inode #13, mod time Mon Jun 2 05:20:22 2008)
+ has 2 multiply-claimed block(s), shared with 0 file(s):
+Clone multiply-claimed blocks? yes
+
+File /inode.c (inode #14, mod time Mon Jun 2 05:28:16 2008)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /ext2fs.h (inode #15, mod time Mon Jun 2 07:22:57 2008)
+Clone multiply-claimed blocks? yes
+
+File /ext2fs.h (inode #15, mod time Mon Jun 2 07:22:57 2008)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /inode.c (inode #14, mod time Mon Jun 2 05:28:16 2008)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(25--33) -(154--199)
+Fix? yes
+
+Free blocks count wrong for group #0 (65535, counted=55).
+Fix? yes
+
+Free blocks count wrong (4294967295, counted=55).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/32 files (22.2% non-contiguous), 145/200 blocks
+Exit status is 1
diff --git a/tests/f_extents2/expect.2 b/tests/f_extents2/expect.2
new file mode 100644
index 0000000..0082a64
--- /dev/null
+++ b/tests/f_extents2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 18/32 files (22.2% non-contiguous), 145/200 blocks
+Exit status is 0
diff --git a/tests/f_extents2/image.gz b/tests/f_extents2/image.gz
new file mode 100644
index 0000000..52df257
--- /dev/null
+++ b/tests/f_extents2/image.gz
Binary files differ
diff --git a/tests/f_extents2/name b/tests/f_extents2/name
new file mode 100644
index 0000000..4a7e4eb
--- /dev/null
+++ b/tests/f_extents2/name
@@ -0,0 +1 @@
+multiply claimed blocks in extents and other illegal extents
diff --git a/tests/f_extra_journal/expect.1 b/tests/f_extra_journal/expect.1
new file mode 100644
index 0000000..4917396
--- /dev/null
+++ b/tests/f_extra_journal/expect.1
@@ -0,0 +1,23 @@
+Superblock has_journal flag is clear, but a journal is present.
+Clear? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(50--1079)
+Fix? yes
+
+Free blocks count wrong for group #0 (968, counted=1998).
+Fix? yes
+
+Free blocks count wrong (968, counted=1998).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (0.0% non-contiguous), 50/2048 blocks
+Exit status is 1
diff --git a/tests/f_extra_journal/expect.2 b/tests/f_extra_journal/expect.2
new file mode 100644
index 0000000..834a120
--- /dev/null
+++ b/tests/f_extra_journal/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (0.0% non-contiguous), 50/2048 blocks
+Exit status is 0
diff --git a/tests/f_extra_journal/image.gz b/tests/f_extra_journal/image.gz
new file mode 100644
index 0000000..1139619
--- /dev/null
+++ b/tests/f_extra_journal/image.gz
Binary files differ
diff --git a/tests/f_extra_journal/name b/tests/f_extra_journal/name
new file mode 100644
index 0000000..7382f20
--- /dev/null
+++ b/tests/f_extra_journal/name
@@ -0,0 +1 @@
+valid journal inode, but has_journal feature not present
diff --git a/tests/f_fast_symlink_extents/expect.1 b/tests/f_fast_symlink_extents/expect.1
new file mode 100644
index 0000000..dc16c97
--- /dev/null
+++ b/tests/f_fast_symlink_extents/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Fast symlink 13 has EXTENT_FL set. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_fast_symlink_extents/expect.2 b/tests/f_fast_symlink_extents/expect.2
new file mode 100644
index 0000000..416f49c
--- /dev/null
+++ b/tests/f_fast_symlink_extents/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_fast_symlink_extents/image.gz b/tests/f_fast_symlink_extents/image.gz
new file mode 100644
index 0000000..37eb0af
--- /dev/null
+++ b/tests/f_fast_symlink_extents/image.gz
Binary files differ
diff --git a/tests/f_fast_symlink_extents/name b/tests/f_fast_symlink_extents/name
new file mode 100644
index 0000000..333cb52
--- /dev/null
+++ b/tests/f_fast_symlink_extents/name
@@ -0,0 +1 @@
+fast symlink with extents flag set
diff --git a/tests/f_file_acl_high/expect.1 b/tests/f_file_acl_high/expect.1
new file mode 100644
index 0000000..24d6e06
--- /dev/null
+++ b/tests/f_file_acl_high/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+i_file_acl_hi for inode 12 (/motd) is 2, should be zero.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_file_acl_high/expect.2 b/tests/f_file_acl_high/expect.2
new file mode 100644
index 0000000..4c5476c
--- /dev/null
+++ b/tests/f_file_acl_high/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_file_acl_high/image.gz b/tests/f_file_acl_high/image.gz
new file mode 100644
index 0000000..6342d58
--- /dev/null
+++ b/tests/f_file_acl_high/image.gz
Binary files differ
diff --git a/tests/f_file_acl_high/name b/tests/f_file_acl_high/name
new file mode 100644
index 0000000..fd54b06
--- /dev/null
+++ b/tests/f_file_acl_high/name
@@ -0,0 +1 @@
+i_file_acl_high should be zero
diff --git a/tests/f_filetype/expect.1 b/tests/f_filetype/expect.1
new file mode 100644
index 0000000..1624bfc
--- /dev/null
+++ b/tests/f_filetype/expect.1
@@ -0,0 +1,49 @@
+Pass 1: Checking inodes, blocks, and sizes
+Special (device/socket/fifo/symlink) file (inode 14) has immutable
+or append-only flag set. Clear? yes
+
+Special (device/socket/fifo/symlink) file (inode 15) has immutable
+or append-only flag set. Clear? yes
+
+Special (device/socket/fifo/symlink) file (inode 16) has immutable
+or append-only flag set. Clear? yes
+
+Special (device/socket/fifo/symlink) file (inode 17) has immutable
+or append-only flag set. Clear? yes
+
+Pass 2: Checking directory structure
+Setting filetype for entry '.' in / (2) to 2.
+Setting filetype for entry '..' in / (2) to 2.
+Setting filetype for entry 'lost+found' in / (2) to 2.
+Setting filetype for entry 'file' in / (2) to 1.
+Setting filetype for entry 'dir' in / (2) to 2.
+Setting filetype for entry 'fifo' in / (2) to 5.
+Setting filetype for entry 'block' in / (2) to 4.
+Setting filetype for entry 'char' in / (2) to 3.
+Setting filetype for entry 'symlink' in / (2) to 7.
+Inode 18 (/badchar) is an illegal character device.
+Clear? yes
+
+Inode 19 (/badblock) is an illegal block device.
+Clear? yes
+
+Inode 20 (/badfifo) is an illegal FIFO.
+Clear? yes
+
+Setting filetype for entry '.' in /lost+found (11) to 2.
+Setting filetype for entry '..' in /lost+found (11) to 2.
+Setting filetype for entry '.' in /dir (13) to 2.
+Setting filetype for entry '..' in /dir (13) to 2.
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free inodes count wrong for group #0 (50, counted=47).
+Fix? yes
+
+Free inodes count wrong (50, counted=47).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 17/64 files (0.0% non-contiguous), 27/100 blocks
+Exit status is 1
diff --git a/tests/f_filetype/expect.2 b/tests/f_filetype/expect.2
new file mode 100644
index 0000000..a8681aa
--- /dev/null
+++ b/tests/f_filetype/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 17/64 files (0.0% non-contiguous), 27/100 blocks
+Exit status is 0
diff --git a/tests/f_filetype/image.gz b/tests/f_filetype/image.gz
new file mode 100644
index 0000000..ad0b2ec
--- /dev/null
+++ b/tests/f_filetype/image.gz
Binary files differ
diff --git a/tests/f_filetype/name b/tests/f_filetype/name
new file mode 100644
index 0000000..0c021f5
--- /dev/null
+++ b/tests/f_filetype/name
@@ -0,0 +1 @@
+set filetype information and illegal special files
diff --git a/tests/f_first_meta_bg_too_big/expect.1 b/tests/f_first_meta_bg_too_big/expect.1
new file mode 100644
index 0000000..3148513
--- /dev/null
+++ b/tests/f_first_meta_bg_too_big/expect.1
@@ -0,0 +1,24 @@
+ext2fs_open2: The ext2 superblock is corrupt
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img
+../e2fsck/e2fsck: Trying to load superblock despite errors...
+First_meta_bg is too big. (2, max value 1). Clear? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -3
+Fix? yes
+
+Free blocks count wrong for group #0 (79, counted=80).
+Fix? yes
+
+Free blocks count wrong (79, counted=80).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 1
diff --git a/tests/f_first_meta_bg_too_big/expect.2 b/tests/f_first_meta_bg_too_big/expect.2
new file mode 100644
index 0000000..44bff62
--- /dev/null
+++ b/tests/f_first_meta_bg_too_big/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 0
diff --git a/tests/f_first_meta_bg_too_big/image.gz b/tests/f_first_meta_bg_too_big/image.gz
new file mode 100644
index 0000000..5279370
--- /dev/null
+++ b/tests/f_first_meta_bg_too_big/image.gz
Binary files differ
diff --git a/tests/f_first_meta_bg_too_big/name b/tests/f_first_meta_bg_too_big/name
new file mode 100644
index 0000000..47ec96d
--- /dev/null
+++ b/tests/f_first_meta_bg_too_big/name
@@ -0,0 +1 @@
+s_first_meta_bg is too large
diff --git a/tests/f_full_bg/expect.1 b/tests/f_full_bg/expect.1
new file mode 100644
index 0000000..3d5453f
--- /dev/null
+++ b/tests/f_full_bg/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/3744 files (0.0% non-contiguous), 685/769 blocks
+Exit status is 0
diff --git a/tests/f_full_bg/expect.2 b/tests/f_full_bg/expect.2
new file mode 100644
index 0000000..3d5453f
--- /dev/null
+++ b/tests/f_full_bg/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/3744 files (0.0% non-contiguous), 685/769 blocks
+Exit status is 0
diff --git a/tests/f_full_bg/image.gz b/tests/f_full_bg/image.gz
new file mode 100644
index 0000000..9be419d
--- /dev/null
+++ b/tests/f_full_bg/image.gz
Binary files differ
diff --git a/tests/f_full_bg/name b/tests/f_full_bg/name
new file mode 100644
index 0000000..b0614de
--- /dev/null
+++ b/tests/f_full_bg/name
@@ -0,0 +1 @@
+inode table in last block of first bg
diff --git a/tests/f_h_badnode/expect.1 b/tests/f_h_badnode/expect.1
new file mode 100644
index 0000000..95b1cee
--- /dev/null
+++ b/tests/f_h_badnode/expect.1
@@ -0,0 +1,18 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Problem in HTREE directory inode 12929: block #531 has bad max hash
+Problem in HTREE directory inode 12929: block #993 referenced twice
+Problem in HTREE directory inode 12929: block #1061 has bad min hash
+Problem in HTREE directory inode 12929: block #1062 has invalid depth (2)
+Problem in HTREE directory inode 12929: block #1062 has bad max hash
+Problem in HTREE directory inode 12929: block #1062 not referenced
+Invalid HTREE directory inode 12929 (/test2). Clear HTree index? yes
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 47730/100192 files (0.0% non-contiguous), 13550/31745 blocks
+Exit status is 1
diff --git a/tests/f_h_badnode/expect.2 b/tests/f_h_badnode/expect.2
new file mode 100644
index 0000000..65985d1
--- /dev/null
+++ b/tests/f_h_badnode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 47730/100192 files (0.0% non-contiguous), 13550/31745 blocks
+Exit status is 0
diff --git a/tests/f_h_badnode/image.gz b/tests/f_h_badnode/image.gz
new file mode 100644
index 0000000..0ac41db
--- /dev/null
+++ b/tests/f_h_badnode/image.gz
Binary files differ
diff --git a/tests/f_h_badnode/name b/tests/f_h_badnode/name
new file mode 100644
index 0000000..ab077fd
--- /dev/null
+++ b/tests/f_h_badnode/name
@@ -0,0 +1 @@
+hash directory with bad HTREE nodes
diff --git a/tests/f_h_badnode/script b/tests/f_h_badnode/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/tests/f_h_badnode/script
@@ -0,0 +1,5 @@
+if test "$HTREE"x = yx ; then
+. $cmd_dir/run_e2fsck
+else
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/f_h_badroot/expect.1 b/tests/f_h_badroot/expect.1
new file mode 100644
index 0000000..88eba51
--- /dev/null
+++ b/tests/f_h_badroot/expect.1
@@ -0,0 +1,40 @@
+Backing up journal inode block information.
+
+Pass 1: Checking inodes, blocks, and sizes
+HTREE directory inode 13345 has an invalid root node.
+Clear HTree index? yes
+
+HTREE directory inode 26689 has an unsupported hash version (240)
+Clear HTree index? yes
+
+HTREE directory inode 40033 has an invalid root node.
+Clear HTree index? yes
+
+HTREE directory inode 53377 has a tree depth (8) which is too big
+Clear HTree index? yes
+
+HTREE directory inode 66721 uses an incompatible htree root node flag.
+Clear HTree index? yes
+
+Pass 2: Checking directory structure
+Problem in HTREE directory inode 80065: block #0 has an unordered hash table
+Clear HTree index? yes
+
+Problem in HTREE directory inode 86737: block #0 has invalid limit (511)
+Clear HTree index? yes
+
+Problem in HTREE directory inode 93409: block #0 has invalid count (234)
+Clear HTree index? yes
+
+Problem in HTREE directory inode 73393: block #1 has bad min hash
+Problem in HTREE directory inode 73393: block #2 has bad max hash
+Invalid HTREE directory inode 73393 (/test6). Clear HTree index? yes
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 1921/100080 files (0.0% non-contiguous), 13646/15361 blocks
+Exit status is 1
diff --git a/tests/f_h_badroot/expect.2 b/tests/f_h_badroot/expect.2
new file mode 100644
index 0000000..d5772c1
--- /dev/null
+++ b/tests/f_h_badroot/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 1921/100080 files (0.0% non-contiguous), 13646/15361 blocks
+Exit status is 0
diff --git a/tests/f_h_badroot/image.gz b/tests/f_h_badroot/image.gz
new file mode 100644
index 0000000..7160cd5
--- /dev/null
+++ b/tests/f_h_badroot/image.gz
Binary files differ
diff --git a/tests/f_h_badroot/name b/tests/f_h_badroot/name
new file mode 100644
index 0000000..b2ac7ff
--- /dev/null
+++ b/tests/f_h_badroot/name
@@ -0,0 +1 @@
+bad htree root nodes
diff --git a/tests/f_h_badroot/script b/tests/f_h_badroot/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/tests/f_h_badroot/script
@@ -0,0 +1,5 @@
+if test "$HTREE"x = yx ; then
+. $cmd_dir/run_e2fsck
+else
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/f_h_normal/expect.1 b/tests/f_h_normal/expect.1
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/tests/f_h_normal/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 47730/100192 files (0.0% non-contiguous), 13378/31745 blocks
+Exit status is 0
diff --git a/tests/f_h_normal/expect.2 b/tests/f_h_normal/expect.2
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/tests/f_h_normal/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 47730/100192 files (0.0% non-contiguous), 13378/31745 blocks
+Exit status is 0
diff --git a/tests/f_h_normal/image.gz b/tests/f_h_normal/image.gz
new file mode 100644
index 0000000..8b4daee
--- /dev/null
+++ b/tests/f_h_normal/image.gz
Binary files differ
diff --git a/tests/f_h_normal/name b/tests/f_h_normal/name
new file mode 100644
index 0000000..7f0cdb2
--- /dev/null
+++ b/tests/f_h_normal/name
@@ -0,0 +1 @@
+normal (signed) HTREE directory
diff --git a/tests/f_h_normal/script b/tests/f_h_normal/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/tests/f_h_normal/script
@@ -0,0 +1,5 @@
+if test "$HTREE"x = yx ; then
+. $cmd_dir/run_e2fsck
+else
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/f_h_reindex/expect.1 b/tests/f_h_reindex/expect.1
new file mode 100755
index 0000000..2887239
--- /dev/null
+++ b/tests/f_h_reindex/expect.1
@@ -0,0 +1,958 @@
+Backing up journal inode block information.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Problem in HTREE directory inode 16001: block #1 has bad max hash
+Problem in HTREE directory inode 16001: block #2 has bad min hash
+Problem in HTREE directory inode 16001: block #2 has bad max hash
+Problem in HTREE directory inode 16001: block #3 has bad min hash
+Problem in HTREE directory inode 16001: block #3 has bad max hash
+Problem in HTREE directory inode 16001: block #4 has bad min hash
+Problem in HTREE directory inode 16001: block #4 has bad max hash
+Problem in HTREE directory inode 16001: block #5 has bad min hash
+Problem in HTREE directory inode 16001: block #5 has bad max hash
+Problem in HTREE directory inode 16001: block #6 has bad min hash
+Problem in HTREE directory inode 16001: block #6 has bad max hash
+Problem in HTREE directory inode 16001: block #7 has bad min hash
+Problem in HTREE directory inode 16001: block #7 has bad max hash
+Problem in HTREE directory inode 16001: block #8 has bad min hash
+Invalid HTREE directory inode 16001 (/test). Clear HTree index? yes
+
+Problem in HTREE directory inode 24001: block #1 has bad max hash
+Problem in HTREE directory inode 24001: block #2 has bad max hash
+Problem in HTREE directory inode 24001: block #3 has bad min hash
+Problem in HTREE directory inode 24001: block #3 has bad max hash
+Problem in HTREE directory inode 24001: block #4 has bad max hash
+Problem in HTREE directory inode 24001: block #5 has bad min hash
+Problem in HTREE directory inode 24001: block #5 has bad max hash
+Problem in HTREE directory inode 24001: block #6 has bad min hash
+Problem in HTREE directory inode 24001: block #6 has bad max hash
+Problem in HTREE directory inode 24001: block #7 has bad min hash
+Problem in HTREE directory inode 24001: block #7 has bad max hash
+Problem in HTREE directory inode 24001: block #8 has bad max hash
+Problem in HTREE directory inode 24001: block #9 has bad min hash
+Problem in HTREE directory inode 24001: block #9 has bad max hash
+Problem in HTREE directory inode 24001: block #10 has bad min hash
+Problem in HTREE directory inode 24001: block #10 has bad max hash
+Problem in HTREE directory inode 24001: block #11 has bad max hash
+Problem in HTREE directory inode 24001: block #12 has bad min hash
+Problem in HTREE directory inode 24001: block #12 has bad max hash
+Problem in HTREE directory inode 24001: block #13 has bad min hash
+Problem in HTREE directory inode 24001: block #13 has bad max hash
+Problem in HTREE directory inode 24001: block #14 has bad min hash
+Problem in HTREE directory inode 24001: block #14 has bad max hash
+Problem in HTREE directory inode 24001: block #15 has bad min hash
+Problem in HTREE directory inode 24001: block #15 has bad max hash
+Problem in HTREE directory inode 24001: block #16 has bad min hash
+Problem in HTREE directory inode 24001: block #16 has bad max hash
+Problem in HTREE directory inode 24001: block #17 has bad min hash
+Problem in HTREE directory inode 24001: block #17 has bad max hash
+Problem in HTREE directory inode 24001: block #18 has bad min hash
+Problem in HTREE directory inode 24001: block #18 has bad max hash
+Problem in HTREE directory inode 24001: block #19 has bad min hash
+Problem in HTREE directory inode 24001: block #19 has bad max hash
+Problem in HTREE directory inode 24001: block #20 has bad min hash
+Problem in HTREE directory inode 24001: block #20 has bad max hash
+Problem in HTREE directory inode 24001: block #21 has bad min hash
+Problem in HTREE directory inode 24001: block #21 has bad max hash
+Problem in HTREE directory inode 24001: block #22 has bad min hash
+Problem in HTREE directory inode 24001: block #22 has bad max hash
+Problem in HTREE directory inode 24001: block #23 has bad min hash
+Problem in HTREE directory inode 24001: block #23 has bad max hash
+Problem in HTREE directory inode 24001: block #24 has bad min hash
+Problem in HTREE directory inode 24001: block #24 has bad max hash
+Problem in HTREE directory inode 24001: block #25 has bad min hash
+Problem in HTREE directory inode 24001: block #25 has bad max hash
+Problem in HTREE directory inode 24001: block #26 has bad min hash
+Problem in HTREE directory inode 24001: block #26 has bad max hash
+Problem in HTREE directory inode 24001: block #27 has bad min hash
+Problem in HTREE directory inode 24001: block #27 has bad max hash
+Problem in HTREE directory inode 24001: block #28 has bad min hash
+Problem in HTREE directory inode 24001: block #28 has bad max hash
+Problem in HTREE directory inode 24001: block #29 has bad min hash
+Problem in HTREE directory inode 24001: block #29 has bad max hash
+Problem in HTREE directory inode 24001: block #30 has bad min hash
+Problem in HTREE directory inode 24001: block #30 has bad max hash
+Problem in HTREE directory inode 24001: block #31 has bad min hash
+Problem in HTREE directory inode 24001: block #31 has bad max hash
+Problem in HTREE directory inode 24001: block #32 has bad min hash
+Problem in HTREE directory inode 24001: block #32 has bad max hash
+Problem in HTREE directory inode 24001: block #33 has bad min hash
+Problem in HTREE directory inode 24001: block #33 has bad max hash
+Problem in HTREE directory inode 24001: block #34 has bad min hash
+Problem in HTREE directory inode 24001: block #34 has bad max hash
+Problem in HTREE directory inode 24001: block #35 has bad min hash
+Problem in HTREE directory inode 24001: block #35 has bad max hash
+Problem in HTREE directory inode 24001: block #36 has bad min hash
+Problem in HTREE directory inode 24001: block #36 has bad max hash
+Problem in HTREE directory inode 24001: block #37 has bad min hash
+Problem in HTREE directory inode 24001: block #37 has bad max hash
+Problem in HTREE directory inode 24001: block #38 has bad min hash
+Problem in HTREE directory inode 24001: block #38 has bad max hash
+Problem in HTREE directory inode 24001: block #39 has bad min hash
+Problem in HTREE directory inode 24001: block #39 has bad max hash
+Problem in HTREE directory inode 24001: block #40 has bad min hash
+Problem in HTREE directory inode 24001: block #40 has bad max hash
+Problem in HTREE directory inode 24001: block #41 has bad min hash
+Problem in HTREE directory inode 24001: block #41 has bad max hash
+Problem in HTREE directory inode 24001: block #42 has bad min hash
+Problem in HTREE directory inode 24001: block #42 has bad max hash
+Problem in HTREE directory inode 24001: block #43 has bad min hash
+Problem in HTREE directory inode 24001: block #43 has bad max hash
+Problem in HTREE directory inode 24001: block #44 has bad min hash
+Problem in HTREE directory inode 24001: block #44 has bad max hash
+Problem in HTREE directory inode 24001: block #45 has bad min hash
+Problem in HTREE directory inode 24001: block #45 has bad max hash
+Problem in HTREE directory inode 24001: block #46 has bad min hash
+Problem in HTREE directory inode 24001: block #46 has bad max hash
+Problem in HTREE directory inode 24001: block #47 has bad min hash
+Problem in HTREE directory inode 24001: block #47 has bad max hash
+Problem in HTREE directory inode 24001: block #48 has bad min hash
+Problem in HTREE directory inode 24001: block #48 has bad max hash
+Problem in HTREE directory inode 24001: block #49 has bad min hash
+Problem in HTREE directory inode 24001: block #49 has bad max hash
+Problem in HTREE directory inode 24001: block #50 has bad min hash
+Problem in HTREE directory inode 24001: block #50 has bad max hash
+Problem in HTREE directory inode 24001: block #51 has bad min hash
+Problem in HTREE directory inode 24001: block #51 has bad max hash
+Problem in HTREE directory inode 24001: block #52 has bad min hash
+Problem in HTREE directory inode 24001: block #52 has bad max hash
+Problem in HTREE directory inode 24001: block #53 has bad min hash
+Problem in HTREE directory inode 24001: block #53 has bad max hash
+Problem in HTREE directory inode 24001: block #54 has bad min hash
+Problem in HTREE directory inode 24001: block #54 has bad max hash
+Problem in HTREE directory inode 24001: block #55 has bad min hash
+Problem in HTREE directory inode 24001: block #55 has bad max hash
+Problem in HTREE directory inode 24001: block #56 has bad min hash
+Problem in HTREE directory inode 24001: block #56 has bad max hash
+Problem in HTREE directory inode 24001: block #57 has bad min hash
+Problem in HTREE directory inode 24001: block #57 has bad max hash
+Problem in HTREE directory inode 24001: block #58 has bad min hash
+Problem in HTREE directory inode 24001: block #58 has bad max hash
+Problem in HTREE directory inode 24001: block #59 has bad min hash
+Problem in HTREE directory inode 24001: block #59 has bad max hash
+Problem in HTREE directory inode 24001: block #60 has bad min hash
+Problem in HTREE directory inode 24001: block #60 has bad max hash
+Problem in HTREE directory inode 24001: block #61 has bad min hash
+Problem in HTREE directory inode 24001: block #61 has bad max hash
+Problem in HTREE directory inode 24001: block #62 has bad min hash
+Problem in HTREE directory inode 24001: block #62 has bad max hash
+Problem in HTREE directory inode 24001: block #63 has bad min hash
+Problem in HTREE directory inode 24001: block #63 has bad max hash
+Problem in HTREE directory inode 24001: block #64 has bad min hash
+Problem in HTREE directory inode 24001: block #64 has bad max hash
+Problem in HTREE directory inode 24001: block #65 has bad min hash
+Problem in HTREE directory inode 24001: block #65 has bad max hash
+Problem in HTREE directory inode 24001: block #66 has bad min hash
+Problem in HTREE directory inode 24001: block #66 has bad max hash
+Problem in HTREE directory inode 24001: block #67 has bad min hash
+Problem in HTREE directory inode 24001: block #67 has bad max hash
+Problem in HTREE directory inode 24001: block #68 has bad min hash
+Problem in HTREE directory inode 24001: block #68 has bad max hash
+Problem in HTREE directory inode 24001: block #69 has bad min hash
+Problem in HTREE directory inode 24001: block #69 has bad max hash
+Problem in HTREE directory inode 24001: block #70 has bad min hash
+Problem in HTREE directory inode 24001: block #70 has bad max hash
+Problem in HTREE directory inode 24001: block #71 has bad min hash
+Problem in HTREE directory inode 24001: block #71 has bad max hash
+Problem in HTREE directory inode 24001: block #72 has bad min hash
+Problem in HTREE directory inode 24001: block #72 has bad max hash
+Problem in HTREE directory inode 24001: block #73 has bad min hash
+Problem in HTREE directory inode 24001: block #73 has bad max hash
+Problem in HTREE directory inode 24001: block #74 has bad min hash
+Problem in HTREE directory inode 24001: block #74 has bad max hash
+Problem in HTREE directory inode 24001: block #75 has bad min hash
+Problem in HTREE directory inode 24001: block #75 has bad max hash
+Problem in HTREE directory inode 24001: block #76 has bad min hash
+Problem in HTREE directory inode 24001: block #76 has bad max hash
+Problem in HTREE directory inode 24001: block #77 has bad min hash
+Problem in HTREE directory inode 24001: block #77 has bad max hash
+Problem in HTREE directory inode 24001: block #78 has bad min hash
+Problem in HTREE directory inode 24001: block #78 has bad max hash
+Problem in HTREE directory inode 24001: block #79 has bad min hash
+Problem in HTREE directory inode 24001: block #79 has bad max hash
+Problem in HTREE directory inode 24001: block #80 has bad min hash
+Problem in HTREE directory inode 24001: block #80 has bad max hash
+Problem in HTREE directory inode 24001: block #81 has bad min hash
+Problem in HTREE directory inode 24001: block #81 has bad max hash
+Problem in HTREE directory inode 24001: block #82 has bad min hash
+Problem in HTREE directory inode 24001: block #82 has bad max hash
+Problem in HTREE directory inode 24001: block #83 has bad min hash
+Problem in HTREE directory inode 24001: block #83 has bad max hash
+Problem in HTREE directory inode 24001: block #84 has bad min hash
+Problem in HTREE directory inode 24001: block #84 has bad max hash
+Problem in HTREE directory inode 24001: block #85 has bad min hash
+Problem in HTREE directory inode 24001: block #85 has bad max hash
+Problem in HTREE directory inode 24001: block #86 has bad min hash
+Problem in HTREE directory inode 24001: block #86 has bad max hash
+Problem in HTREE directory inode 24001: block #87 has bad min hash
+Problem in HTREE directory inode 24001: block #87 has bad max hash
+Problem in HTREE directory inode 24001: block #88 has bad min hash
+Problem in HTREE directory inode 24001: block #88 has bad max hash
+Problem in HTREE directory inode 24001: block #89 has bad min hash
+Problem in HTREE directory inode 24001: block #89 has bad max hash
+Problem in HTREE directory inode 24001: block #90 has bad min hash
+Problem in HTREE directory inode 24001: block #90 has bad max hash
+Problem in HTREE directory inode 24001: block #91 has bad min hash
+Problem in HTREE directory inode 24001: block #91 has bad max hash
+Problem in HTREE directory inode 24001: block #92 has bad min hash
+Problem in HTREE directory inode 24001: block #92 has bad max hash
+Problem in HTREE directory inode 24001: block #93 has bad min hash
+Problem in HTREE directory inode 24001: block #93 has bad max hash
+Problem in HTREE directory inode 24001: block #94 has bad min hash
+Problem in HTREE directory inode 24001: block #94 has bad max hash
+Problem in HTREE directory inode 24001: block #95 has bad min hash
+Problem in HTREE directory inode 24001: block #95 has bad max hash
+Problem in HTREE directory inode 24001: block #96 has bad min hash
+Problem in HTREE directory inode 24001: block #96 has bad max hash
+Problem in HTREE directory inode 24001: block #97 has bad min hash
+Problem in HTREE directory inode 24001: block #97 has bad max hash
+Problem in HTREE directory inode 24001: block #98 has bad min hash
+Problem in HTREE directory inode 24001: block #98 has bad max hash
+Problem in HTREE directory inode 24001: block #99 has bad min hash
+Problem in HTREE directory inode 24001: block #99 has bad max hash
+Problem in HTREE directory inode 24001: block #100 has bad min hash
+Problem in HTREE directory inode 24001: block #100 has bad max hash
+Problem in HTREE directory inode 24001: block #101 has bad min hash
+Problem in HTREE directory inode 24001: block #101 has bad max hash
+Problem in HTREE directory inode 24001: block #102 has bad min hash
+Problem in HTREE directory inode 24001: block #102 has bad max hash
+Problem in HTREE directory inode 24001: block #103 has bad min hash
+Problem in HTREE directory inode 24001: block #103 has bad max hash
+Problem in HTREE directory inode 24001: block #104 has bad min hash
+Problem in HTREE directory inode 24001: block #104 has bad max hash
+Problem in HTREE directory inode 24001: block #105 has bad min hash
+Problem in HTREE directory inode 24001: block #105 has bad max hash
+Problem in HTREE directory inode 24001: block #106 has bad min hash
+Problem in HTREE directory inode 24001: block #106 has bad max hash
+Problem in HTREE directory inode 24001: block #107 has bad min hash
+Problem in HTREE directory inode 24001: block #107 has bad max hash
+Problem in HTREE directory inode 24001: block #108 has bad min hash
+Problem in HTREE directory inode 24001: block #108 has bad max hash
+Problem in HTREE directory inode 24001: block #109 has bad min hash
+Problem in HTREE directory inode 24001: block #109 has bad max hash
+Problem in HTREE directory inode 24001: block #110 has bad min hash
+Problem in HTREE directory inode 24001: block #110 has bad max hash
+Problem in HTREE directory inode 24001: block #111 has bad min hash
+Problem in HTREE directory inode 24001: block #111 has bad max hash
+Problem in HTREE directory inode 24001: block #112 has bad min hash
+Problem in HTREE directory inode 24001: block #112 has bad max hash
+Problem in HTREE directory inode 24001: block #113 has bad min hash
+Problem in HTREE directory inode 24001: block #113 has bad max hash
+Problem in HTREE directory inode 24001: block #114 has bad min hash
+Problem in HTREE directory inode 24001: block #114 has bad max hash
+Problem in HTREE directory inode 24001: block #115 has bad min hash
+Problem in HTREE directory inode 24001: block #115 has bad max hash
+Problem in HTREE directory inode 24001: block #116 has bad min hash
+Problem in HTREE directory inode 24001: block #116 has bad max hash
+Problem in HTREE directory inode 24001: block #117 has bad min hash
+Problem in HTREE directory inode 24001: block #117 has bad max hash
+Problem in HTREE directory inode 24001: block #118 has bad min hash
+Problem in HTREE directory inode 24001: block #118 has bad max hash
+Problem in HTREE directory inode 24001: block #119 has bad min hash
+Problem in HTREE directory inode 24001: block #119 has bad max hash
+Problem in HTREE directory inode 24001: block #120 has bad min hash
+Problem in HTREE directory inode 24001: block #120 has bad max hash
+Problem in HTREE directory inode 24001: block #121 has bad min hash
+Problem in HTREE directory inode 24001: block #121 has bad max hash
+Problem in HTREE directory inode 24001: block #122 has bad min hash
+Problem in HTREE directory inode 24001: block #122 has bad max hash
+Problem in HTREE directory inode 24001: block #123 has bad min hash
+Problem in HTREE directory inode 24001: block #123 has bad max hash
+Problem in HTREE directory inode 24001: block #124 has bad min hash
+Problem in HTREE directory inode 24001: block #124 has bad max hash
+Problem in HTREE directory inode 24001: block #125 has bad min hash
+Problem in HTREE directory inode 24001: block #125 has bad max hash
+Problem in HTREE directory inode 24001: block #126 has bad min hash
+Problem in HTREE directory inode 24001: block #126 has bad max hash
+Problem in HTREE directory inode 24001: block #127 has bad min hash
+Problem in HTREE directory inode 24001: block #128 has bad max hash
+Problem in HTREE directory inode 24001: block #129 has bad min hash
+Problem in HTREE directory inode 24001: block #129 has bad max hash
+Problem in HTREE directory inode 24001: block #130 has bad min hash
+Problem in HTREE directory inode 24001: block #130 has bad max hash
+Problem in HTREE directory inode 24001: block #131 has bad min hash
+Problem in HTREE directory inode 24001: block #131 has bad max hash
+Problem in HTREE directory inode 24001: block #132 has bad min hash
+Problem in HTREE directory inode 24001: block #132 has bad max hash
+Problem in HTREE directory inode 24001: block #133 has bad min hash
+Problem in HTREE directory inode 24001: block #133 has bad max hash
+Problem in HTREE directory inode 24001: block #134 has bad min hash
+Problem in HTREE directory inode 24001: block #134 has bad max hash
+Problem in HTREE directory inode 24001: block #135 has bad min hash
+Problem in HTREE directory inode 24001: block #135 has bad max hash
+Problem in HTREE directory inode 24001: block #136 has bad min hash
+Problem in HTREE directory inode 24001: block #136 has bad max hash
+Problem in HTREE directory inode 24001: block #137 has bad min hash
+Problem in HTREE directory inode 24001: block #137 has bad max hash
+Problem in HTREE directory inode 24001: block #138 has bad min hash
+Problem in HTREE directory inode 24001: block #138 has bad max hash
+Problem in HTREE directory inode 24001: block #139 has bad min hash
+Problem in HTREE directory inode 24001: block #139 has bad max hash
+Problem in HTREE directory inode 24001: block #140 has bad min hash
+Problem in HTREE directory inode 24001: block #140 has bad max hash
+Problem in HTREE directory inode 24001: block #141 has bad min hash
+Problem in HTREE directory inode 24001: block #141 has bad max hash
+Problem in HTREE directory inode 24001: block #142 has bad min hash
+Problem in HTREE directory inode 24001: block #142 has bad max hash
+Problem in HTREE directory inode 24001: block #143 has bad min hash
+Problem in HTREE directory inode 24001: block #143 has bad max hash
+Problem in HTREE directory inode 24001: block #144 has bad min hash
+Problem in HTREE directory inode 24001: block #144 has bad max hash
+Problem in HTREE directory inode 24001: block #145 has bad min hash
+Problem in HTREE directory inode 24001: block #145 has bad max hash
+Problem in HTREE directory inode 24001: block #146 has bad min hash
+Problem in HTREE directory inode 24001: block #146 has bad max hash
+Problem in HTREE directory inode 24001: block #147 has bad min hash
+Problem in HTREE directory inode 24001: block #147 has bad max hash
+Problem in HTREE directory inode 24001: block #148 has bad min hash
+Problem in HTREE directory inode 24001: block #148 has bad max hash
+Problem in HTREE directory inode 24001: block #149 has bad min hash
+Problem in HTREE directory inode 24001: block #149 has bad max hash
+Problem in HTREE directory inode 24001: block #150 has bad min hash
+Problem in HTREE directory inode 24001: block #150 has bad max hash
+Problem in HTREE directory inode 24001: block #151 has bad min hash
+Problem in HTREE directory inode 24001: block #151 has bad max hash
+Problem in HTREE directory inode 24001: block #152 has bad min hash
+Problem in HTREE directory inode 24001: block #152 has bad max hash
+Problem in HTREE directory inode 24001: block #153 has bad min hash
+Problem in HTREE directory inode 24001: block #153 has bad max hash
+Problem in HTREE directory inode 24001: block #154 has bad min hash
+Problem in HTREE directory inode 24001: block #154 has bad max hash
+Problem in HTREE directory inode 24001: block #155 has bad min hash
+Problem in HTREE directory inode 24001: block #155 has bad max hash
+Problem in HTREE directory inode 24001: block #156 has bad min hash
+Problem in HTREE directory inode 24001: block #156 has bad max hash
+Problem in HTREE directory inode 24001: block #157 has bad min hash
+Problem in HTREE directory inode 24001: block #157 has bad max hash
+Problem in HTREE directory inode 24001: block #158 has bad min hash
+Problem in HTREE directory inode 24001: block #158 has bad max hash
+Problem in HTREE directory inode 24001: block #159 has bad min hash
+Problem in HTREE directory inode 24001: block #159 has bad max hash
+Problem in HTREE directory inode 24001: block #160 has bad min hash
+Problem in HTREE directory inode 24001: block #160 has bad max hash
+Problem in HTREE directory inode 24001: block #161 has bad min hash
+Problem in HTREE directory inode 24001: block #161 has bad max hash
+Problem in HTREE directory inode 24001: block #162 has bad min hash
+Problem in HTREE directory inode 24001: block #162 has bad max hash
+Problem in HTREE directory inode 24001: block #163 has bad min hash
+Problem in HTREE directory inode 24001: block #163 has bad max hash
+Problem in HTREE directory inode 24001: block #164 has bad min hash
+Problem in HTREE directory inode 24001: block #164 has bad max hash
+Problem in HTREE directory inode 24001: block #165 has bad min hash
+Problem in HTREE directory inode 24001: block #165 has bad max hash
+Problem in HTREE directory inode 24001: block #166 has bad min hash
+Problem in HTREE directory inode 24001: block #166 has bad max hash
+Problem in HTREE directory inode 24001: block #167 has bad min hash
+Problem in HTREE directory inode 24001: block #167 has bad max hash
+Problem in HTREE directory inode 24001: block #168 has bad min hash
+Problem in HTREE directory inode 24001: block #168 has bad max hash
+Problem in HTREE directory inode 24001: block #169 has bad min hash
+Problem in HTREE directory inode 24001: block #169 has bad max hash
+Problem in HTREE directory inode 24001: block #170 has bad min hash
+Problem in HTREE directory inode 24001: block #170 has bad max hash
+Problem in HTREE directory inode 24001: block #171 has bad min hash
+Problem in HTREE directory inode 24001: block #171 has bad max hash
+Problem in HTREE directory inode 24001: block #172 has bad min hash
+Problem in HTREE directory inode 24001: block #172 has bad max hash
+Problem in HTREE directory inode 24001: block #173 has bad min hash
+Problem in HTREE directory inode 24001: block #173 has bad max hash
+Problem in HTREE directory inode 24001: block #174 has bad min hash
+Problem in HTREE directory inode 24001: block #174 has bad max hash
+Problem in HTREE directory inode 24001: block #175 has bad min hash
+Problem in HTREE directory inode 24001: block #175 has bad max hash
+Problem in HTREE directory inode 24001: block #176 has bad min hash
+Problem in HTREE directory inode 24001: block #176 has bad max hash
+Problem in HTREE directory inode 24001: block #177 has bad min hash
+Problem in HTREE directory inode 24001: block #177 has bad max hash
+Problem in HTREE directory inode 24001: block #178 has bad min hash
+Problem in HTREE directory inode 24001: block #178 has bad max hash
+Problem in HTREE directory inode 24001: block #179 has bad min hash
+Problem in HTREE directory inode 24001: block #179 has bad max hash
+Problem in HTREE directory inode 24001: block #180 has bad min hash
+Problem in HTREE directory inode 24001: block #180 has bad max hash
+Problem in HTREE directory inode 24001: block #181 has bad min hash
+Problem in HTREE directory inode 24001: block #181 has bad max hash
+Problem in HTREE directory inode 24001: block #182 has bad min hash
+Problem in HTREE directory inode 24001: block #182 has bad max hash
+Problem in HTREE directory inode 24001: block #183 has bad min hash
+Problem in HTREE directory inode 24001: block #183 has bad max hash
+Problem in HTREE directory inode 24001: block #184 has bad min hash
+Problem in HTREE directory inode 24001: block #184 has bad max hash
+Problem in HTREE directory inode 24001: block #185 has bad min hash
+Problem in HTREE directory inode 24001: block #185 has bad max hash
+Problem in HTREE directory inode 24001: block #186 has bad min hash
+Problem in HTREE directory inode 24001: block #186 has bad max hash
+Problem in HTREE directory inode 24001: block #187 has bad min hash
+Problem in HTREE directory inode 24001: block #187 has bad max hash
+Problem in HTREE directory inode 24001: block #188 has bad min hash
+Problem in HTREE directory inode 24001: block #188 has bad max hash
+Problem in HTREE directory inode 24001: block #189 has bad min hash
+Problem in HTREE directory inode 24001: block #189 has bad max hash
+Problem in HTREE directory inode 24001: block #190 has bad min hash
+Problem in HTREE directory inode 24001: block #190 has bad max hash
+Problem in HTREE directory inode 24001: block #191 has bad min hash
+Problem in HTREE directory inode 24001: block #191 has bad max hash
+Problem in HTREE directory inode 24001: block #192 has bad min hash
+Problem in HTREE directory inode 24001: block #192 has bad max hash
+Problem in HTREE directory inode 24001: block #193 has bad min hash
+Problem in HTREE directory inode 24001: block #193 has bad max hash
+Problem in HTREE directory inode 24001: block #194 has bad min hash
+Problem in HTREE directory inode 24001: block #194 has bad max hash
+Problem in HTREE directory inode 24001: block #195 has bad min hash
+Problem in HTREE directory inode 24001: block #195 has bad max hash
+Problem in HTREE directory inode 24001: block #196 has bad min hash
+Problem in HTREE directory inode 24001: block #196 has bad max hash
+Problem in HTREE directory inode 24001: block #197 has bad min hash
+Problem in HTREE directory inode 24001: block #197 has bad max hash
+Problem in HTREE directory inode 24001: block #198 has bad min hash
+Problem in HTREE directory inode 24001: block #198 has bad max hash
+Problem in HTREE directory inode 24001: block #199 has bad min hash
+Problem in HTREE directory inode 24001: block #199 has bad max hash
+Problem in HTREE directory inode 24001: block #200 has bad min hash
+Problem in HTREE directory inode 24001: block #200 has bad max hash
+Problem in HTREE directory inode 24001: block #201 has bad min hash
+Problem in HTREE directory inode 24001: block #201 has bad max hash
+Problem in HTREE directory inode 24001: block #202 has bad min hash
+Problem in HTREE directory inode 24001: block #202 has bad max hash
+Problem in HTREE directory inode 24001: block #203 has bad min hash
+Problem in HTREE directory inode 24001: block #203 has bad max hash
+Problem in HTREE directory inode 24001: block #204 has bad min hash
+Problem in HTREE directory inode 24001: block #204 has bad max hash
+Problem in HTREE directory inode 24001: block #205 has bad min hash
+Problem in HTREE directory inode 24001: block #205 has bad max hash
+Problem in HTREE directory inode 24001: block #206 has bad min hash
+Problem in HTREE directory inode 24001: block #206 has bad max hash
+Problem in HTREE directory inode 24001: block #207 has bad min hash
+Problem in HTREE directory inode 24001: block #207 has bad max hash
+Problem in HTREE directory inode 24001: block #208 has bad min hash
+Problem in HTREE directory inode 24001: block #208 has bad max hash
+Problem in HTREE directory inode 24001: block #209 has bad min hash
+Problem in HTREE directory inode 24001: block #209 has bad max hash
+Problem in HTREE directory inode 24001: block #210 has bad min hash
+Problem in HTREE directory inode 24001: block #210 has bad max hash
+Problem in HTREE directory inode 24001: block #211 has bad min hash
+Problem in HTREE directory inode 24001: block #211 has bad max hash
+Problem in HTREE directory inode 24001: block #212 has bad min hash
+Problem in HTREE directory inode 24001: block #212 has bad max hash
+Problem in HTREE directory inode 24001: block #213 has bad min hash
+Problem in HTREE directory inode 24001: block #213 has bad max hash
+Problem in HTREE directory inode 24001: block #214 has bad min hash
+Problem in HTREE directory inode 24001: block #214 has bad max hash
+Problem in HTREE directory inode 24001: block #215 has bad min hash
+Problem in HTREE directory inode 24001: block #215 has bad max hash
+Problem in HTREE directory inode 24001: block #216 has bad min hash
+Problem in HTREE directory inode 24001: block #216 has bad max hash
+Problem in HTREE directory inode 24001: block #217 has bad min hash
+Problem in HTREE directory inode 24001: block #217 has bad max hash
+Problem in HTREE directory inode 24001: block #218 has bad min hash
+Problem in HTREE directory inode 24001: block #218 has bad max hash
+Problem in HTREE directory inode 24001: block #219 has bad min hash
+Problem in HTREE directory inode 24001: block #219 has bad max hash
+Problem in HTREE directory inode 24001: block #220 has bad min hash
+Problem in HTREE directory inode 24001: block #220 has bad max hash
+Problem in HTREE directory inode 24001: block #221 has bad min hash
+Problem in HTREE directory inode 24001: block #221 has bad max hash
+Problem in HTREE directory inode 24001: block #222 has bad min hash
+Problem in HTREE directory inode 24001: block #222 has bad max hash
+Problem in HTREE directory inode 24001: block #223 has bad min hash
+Problem in HTREE directory inode 24001: block #223 has bad max hash
+Problem in HTREE directory inode 24001: block #224 has bad min hash
+Problem in HTREE directory inode 24001: block #224 has bad max hash
+Problem in HTREE directory inode 24001: block #225 has bad min hash
+Problem in HTREE directory inode 24001: block #225 has bad max hash
+Problem in HTREE directory inode 24001: block #226 has bad min hash
+Problem in HTREE directory inode 24001: block #226 has bad max hash
+Problem in HTREE directory inode 24001: block #227 has bad min hash
+Problem in HTREE directory inode 24001: block #227 has bad max hash
+Problem in HTREE directory inode 24001: block #228 has bad min hash
+Problem in HTREE directory inode 24001: block #228 has bad max hash
+Problem in HTREE directory inode 24001: block #229 has bad min hash
+Problem in HTREE directory inode 24001: block #229 has bad max hash
+Problem in HTREE directory inode 24001: block #230 has bad min hash
+Problem in HTREE directory inode 24001: block #230 has bad max hash
+Problem in HTREE directory inode 24001: block #231 has bad min hash
+Problem in HTREE directory inode 24001: block #231 has bad max hash
+Problem in HTREE directory inode 24001: block #232 has bad min hash
+Problem in HTREE directory inode 24001: block #232 has bad max hash
+Problem in HTREE directory inode 24001: block #233 has bad min hash
+Problem in HTREE directory inode 24001: block #233 has bad max hash
+Problem in HTREE directory inode 24001: block #234 has bad min hash
+Problem in HTREE directory inode 24001: block #234 has bad max hash
+Problem in HTREE directory inode 24001: block #235 has bad min hash
+Problem in HTREE directory inode 24001: block #235 has bad max hash
+Problem in HTREE directory inode 24001: block #236 has bad min hash
+Problem in HTREE directory inode 24001: block #236 has bad max hash
+Problem in HTREE directory inode 24001: block #237 has bad min hash
+Problem in HTREE directory inode 24001: block #237 has bad max hash
+Problem in HTREE directory inode 24001: block #238 has bad min hash
+Problem in HTREE directory inode 24001: block #238 has bad max hash
+Problem in HTREE directory inode 24001: block #239 has bad min hash
+Problem in HTREE directory inode 24001: block #239 has bad max hash
+Problem in HTREE directory inode 24001: block #240 has bad min hash
+Problem in HTREE directory inode 24001: block #240 has bad max hash
+Problem in HTREE directory inode 24001: block #241 has bad min hash
+Problem in HTREE directory inode 24001: block #241 has bad max hash
+Problem in HTREE directory inode 24001: block #242 has bad min hash
+Problem in HTREE directory inode 24001: block #242 has bad max hash
+Problem in HTREE directory inode 24001: block #243 has bad min hash
+Problem in HTREE directory inode 24001: block #243 has bad max hash
+Problem in HTREE directory inode 24001: block #244 has bad min hash
+Problem in HTREE directory inode 24001: block #244 has bad max hash
+Problem in HTREE directory inode 24001: block #245 has bad min hash
+Problem in HTREE directory inode 24001: block #245 has bad max hash
+Problem in HTREE directory inode 24001: block #246 has bad min hash
+Problem in HTREE directory inode 24001: block #246 has bad max hash
+Problem in HTREE directory inode 24001: block #247 has bad min hash
+Problem in HTREE directory inode 24001: block #247 has bad max hash
+Problem in HTREE directory inode 24001: block #248 has bad min hash
+Problem in HTREE directory inode 24001: block #248 has bad max hash
+Problem in HTREE directory inode 24001: block #249 has bad min hash
+Problem in HTREE directory inode 24001: block #249 has bad max hash
+Problem in HTREE directory inode 24001: block #250 has bad min hash
+Problem in HTREE directory inode 24001: block #250 has bad max hash
+Problem in HTREE directory inode 24001: block #251 has bad min hash
+Problem in HTREE directory inode 24001: block #251 has bad max hash
+Problem in HTREE directory inode 24001: block #252 has bad min hash
+Problem in HTREE directory inode 24001: block #252 has bad max hash
+Problem in HTREE directory inode 24001: block #253 has bad min hash
+Problem in HTREE directory inode 24001: block #253 has bad max hash
+Problem in HTREE directory inode 24001: block #254 has bad min hash
+Problem in HTREE directory inode 24001: block #255 has bad max hash
+Problem in HTREE directory inode 24001: block #256 has bad min hash
+Problem in HTREE directory inode 24001: block #256 has bad max hash
+Problem in HTREE directory inode 24001: block #257 has bad min hash
+Problem in HTREE directory inode 24001: block #257 has bad max hash
+Problem in HTREE directory inode 24001: block #258 has bad min hash
+Problem in HTREE directory inode 24001: block #258 has bad max hash
+Problem in HTREE directory inode 24001: block #259 has bad min hash
+Problem in HTREE directory inode 24001: block #259 has bad max hash
+Problem in HTREE directory inode 24001: block #260 has bad min hash
+Problem in HTREE directory inode 24001: block #260 has bad max hash
+Problem in HTREE directory inode 24001: block #261 has bad min hash
+Problem in HTREE directory inode 24001: block #261 has bad max hash
+Problem in HTREE directory inode 24001: block #262 has bad min hash
+Problem in HTREE directory inode 24001: block #262 has bad max hash
+Problem in HTREE directory inode 24001: block #263 has bad min hash
+Problem in HTREE directory inode 24001: block #263 has bad max hash
+Problem in HTREE directory inode 24001: block #264 has bad min hash
+Problem in HTREE directory inode 24001: block #264 has bad max hash
+Problem in HTREE directory inode 24001: block #265 has bad min hash
+Problem in HTREE directory inode 24001: block #265 has bad max hash
+Problem in HTREE directory inode 24001: block #266 has bad min hash
+Problem in HTREE directory inode 24001: block #266 has bad max hash
+Problem in HTREE directory inode 24001: block #267 has bad min hash
+Problem in HTREE directory inode 24001: block #267 has bad max hash
+Problem in HTREE directory inode 24001: block #268 has bad min hash
+Problem in HTREE directory inode 24001: block #268 has bad max hash
+Problem in HTREE directory inode 24001: block #269 has bad min hash
+Problem in HTREE directory inode 24001: block #269 has bad max hash
+Problem in HTREE directory inode 24001: block #270 has bad min hash
+Problem in HTREE directory inode 24001: block #270 has bad max hash
+Problem in HTREE directory inode 24001: block #271 has bad min hash
+Problem in HTREE directory inode 24001: block #271 has bad max hash
+Problem in HTREE directory inode 24001: block #272 has bad min hash
+Problem in HTREE directory inode 24001: block #272 has bad max hash
+Problem in HTREE directory inode 24001: block #273 has bad min hash
+Problem in HTREE directory inode 24001: block #273 has bad max hash
+Problem in HTREE directory inode 24001: block #274 has bad min hash
+Problem in HTREE directory inode 24001: block #274 has bad max hash
+Problem in HTREE directory inode 24001: block #275 has bad min hash
+Problem in HTREE directory inode 24001: block #275 has bad max hash
+Problem in HTREE directory inode 24001: block #276 has bad min hash
+Problem in HTREE directory inode 24001: block #276 has bad max hash
+Problem in HTREE directory inode 24001: block #277 has bad min hash
+Problem in HTREE directory inode 24001: block #277 has bad max hash
+Problem in HTREE directory inode 24001: block #278 has bad min hash
+Problem in HTREE directory inode 24001: block #278 has bad max hash
+Problem in HTREE directory inode 24001: block #279 has bad min hash
+Problem in HTREE directory inode 24001: block #279 has bad max hash
+Problem in HTREE directory inode 24001: block #280 has bad min hash
+Problem in HTREE directory inode 24001: block #280 has bad max hash
+Problem in HTREE directory inode 24001: block #281 has bad min hash
+Problem in HTREE directory inode 24001: block #281 has bad max hash
+Problem in HTREE directory inode 24001: block #282 has bad min hash
+Problem in HTREE directory inode 24001: block #282 has bad max hash
+Problem in HTREE directory inode 24001: block #283 has bad min hash
+Problem in HTREE directory inode 24001: block #283 has bad max hash
+Problem in HTREE directory inode 24001: block #284 has bad min hash
+Problem in HTREE directory inode 24001: block #284 has bad max hash
+Problem in HTREE directory inode 24001: block #285 has bad min hash
+Problem in HTREE directory inode 24001: block #285 has bad max hash
+Problem in HTREE directory inode 24001: block #286 has bad min hash
+Problem in HTREE directory inode 24001: block #286 has bad max hash
+Problem in HTREE directory inode 24001: block #287 has bad min hash
+Problem in HTREE directory inode 24001: block #287 has bad max hash
+Problem in HTREE directory inode 24001: block #288 has bad min hash
+Problem in HTREE directory inode 24001: block #288 has bad max hash
+Problem in HTREE directory inode 24001: block #289 has bad min hash
+Problem in HTREE directory inode 24001: block #289 has bad max hash
+Problem in HTREE directory inode 24001: block #290 has bad min hash
+Problem in HTREE directory inode 24001: block #290 has bad max hash
+Problem in HTREE directory inode 24001: block #291 has bad min hash
+Problem in HTREE directory inode 24001: block #291 has bad max hash
+Problem in HTREE directory inode 24001: block #292 has bad min hash
+Problem in HTREE directory inode 24001: block #292 has bad max hash
+Problem in HTREE directory inode 24001: block #293 has bad min hash
+Problem in HTREE directory inode 24001: block #293 has bad max hash
+Problem in HTREE directory inode 24001: block #294 has bad min hash
+Problem in HTREE directory inode 24001: block #294 has bad max hash
+Problem in HTREE directory inode 24001: block #295 has bad min hash
+Problem in HTREE directory inode 24001: block #295 has bad max hash
+Problem in HTREE directory inode 24001: block #296 has bad min hash
+Problem in HTREE directory inode 24001: block #296 has bad max hash
+Problem in HTREE directory inode 24001: block #297 has bad min hash
+Problem in HTREE directory inode 24001: block #297 has bad max hash
+Problem in HTREE directory inode 24001: block #298 has bad min hash
+Problem in HTREE directory inode 24001: block #298 has bad max hash
+Problem in HTREE directory inode 24001: block #299 has bad min hash
+Problem in HTREE directory inode 24001: block #299 has bad max hash
+Problem in HTREE directory inode 24001: block #300 has bad min hash
+Problem in HTREE directory inode 24001: block #300 has bad max hash
+Problem in HTREE directory inode 24001: block #301 has bad min hash
+Problem in HTREE directory inode 24001: block #301 has bad max hash
+Problem in HTREE directory inode 24001: block #302 has bad min hash
+Problem in HTREE directory inode 24001: block #302 has bad max hash
+Problem in HTREE directory inode 24001: block #303 has bad min hash
+Problem in HTREE directory inode 24001: block #303 has bad max hash
+Problem in HTREE directory inode 24001: block #304 has bad min hash
+Problem in HTREE directory inode 24001: block #304 has bad max hash
+Problem in HTREE directory inode 24001: block #305 has bad min hash
+Problem in HTREE directory inode 24001: block #305 has bad max hash
+Problem in HTREE directory inode 24001: block #306 has bad min hash
+Problem in HTREE directory inode 24001: block #306 has bad max hash
+Problem in HTREE directory inode 24001: block #307 has bad min hash
+Problem in HTREE directory inode 24001: block #307 has bad max hash
+Problem in HTREE directory inode 24001: block #308 has bad min hash
+Problem in HTREE directory inode 24001: block #308 has bad max hash
+Problem in HTREE directory inode 24001: block #309 has bad min hash
+Problem in HTREE directory inode 24001: block #309 has bad max hash
+Problem in HTREE directory inode 24001: block #310 has bad min hash
+Problem in HTREE directory inode 24001: block #310 has bad max hash
+Problem in HTREE directory inode 24001: block #311 has bad min hash
+Problem in HTREE directory inode 24001: block #311 has bad max hash
+Problem in HTREE directory inode 24001: block #312 has bad min hash
+Problem in HTREE directory inode 24001: block #312 has bad max hash
+Problem in HTREE directory inode 24001: block #313 has bad min hash
+Problem in HTREE directory inode 24001: block #313 has bad max hash
+Problem in HTREE directory inode 24001: block #314 has bad min hash
+Problem in HTREE directory inode 24001: block #314 has bad max hash
+Problem in HTREE directory inode 24001: block #315 has bad min hash
+Problem in HTREE directory inode 24001: block #315 has bad max hash
+Problem in HTREE directory inode 24001: block #316 has bad min hash
+Problem in HTREE directory inode 24001: block #316 has bad max hash
+Problem in HTREE directory inode 24001: block #317 has bad min hash
+Problem in HTREE directory inode 24001: block #317 has bad max hash
+Problem in HTREE directory inode 24001: block #318 has bad min hash
+Problem in HTREE directory inode 24001: block #318 has bad max hash
+Problem in HTREE directory inode 24001: block #319 has bad min hash
+Problem in HTREE directory inode 24001: block #319 has bad max hash
+Problem in HTREE directory inode 24001: block #320 has bad min hash
+Problem in HTREE directory inode 24001: block #320 has bad max hash
+Problem in HTREE directory inode 24001: block #321 has bad min hash
+Problem in HTREE directory inode 24001: block #321 has bad max hash
+Problem in HTREE directory inode 24001: block #322 has bad min hash
+Problem in HTREE directory inode 24001: block #322 has bad max hash
+Problem in HTREE directory inode 24001: block #323 has bad min hash
+Problem in HTREE directory inode 24001: block #323 has bad max hash
+Problem in HTREE directory inode 24001: block #324 has bad min hash
+Problem in HTREE directory inode 24001: block #324 has bad max hash
+Problem in HTREE directory inode 24001: block #325 has bad min hash
+Problem in HTREE directory inode 24001: block #325 has bad max hash
+Problem in HTREE directory inode 24001: block #326 has bad min hash
+Problem in HTREE directory inode 24001: block #326 has bad max hash
+Problem in HTREE directory inode 24001: block #327 has bad min hash
+Problem in HTREE directory inode 24001: block #327 has bad max hash
+Problem in HTREE directory inode 24001: block #328 has bad min hash
+Problem in HTREE directory inode 24001: block #328 has bad max hash
+Problem in HTREE directory inode 24001: block #329 has bad min hash
+Problem in HTREE directory inode 24001: block #329 has bad max hash
+Problem in HTREE directory inode 24001: block #330 has bad min hash
+Problem in HTREE directory inode 24001: block #330 has bad max hash
+Problem in HTREE directory inode 24001: block #331 has bad min hash
+Problem in HTREE directory inode 24001: block #331 has bad max hash
+Problem in HTREE directory inode 24001: block #332 has bad min hash
+Problem in HTREE directory inode 24001: block #332 has bad max hash
+Problem in HTREE directory inode 24001: block #333 has bad min hash
+Problem in HTREE directory inode 24001: block #333 has bad max hash
+Problem in HTREE directory inode 24001: block #334 has bad min hash
+Problem in HTREE directory inode 24001: block #334 has bad max hash
+Problem in HTREE directory inode 24001: block #335 has bad min hash
+Problem in HTREE directory inode 24001: block #335 has bad max hash
+Problem in HTREE directory inode 24001: block #336 has bad min hash
+Problem in HTREE directory inode 24001: block #336 has bad max hash
+Problem in HTREE directory inode 24001: block #337 has bad min hash
+Problem in HTREE directory inode 24001: block #337 has bad max hash
+Problem in HTREE directory inode 24001: block #338 has bad min hash
+Problem in HTREE directory inode 24001: block #338 has bad max hash
+Problem in HTREE directory inode 24001: block #339 has bad min hash
+Problem in HTREE directory inode 24001: block #339 has bad max hash
+Problem in HTREE directory inode 24001: block #340 has bad min hash
+Problem in HTREE directory inode 24001: block #340 has bad max hash
+Problem in HTREE directory inode 24001: block #341 has bad min hash
+Problem in HTREE directory inode 24001: block #341 has bad max hash
+Problem in HTREE directory inode 24001: block #342 has bad min hash
+Problem in HTREE directory inode 24001: block #342 has bad max hash
+Problem in HTREE directory inode 24001: block #343 has bad min hash
+Problem in HTREE directory inode 24001: block #343 has bad max hash
+Problem in HTREE directory inode 24001: block #344 has bad min hash
+Problem in HTREE directory inode 24001: block #344 has bad max hash
+Problem in HTREE directory inode 24001: block #345 has bad min hash
+Problem in HTREE directory inode 24001: block #345 has bad max hash
+Problem in HTREE directory inode 24001: block #346 has bad min hash
+Problem in HTREE directory inode 24001: block #346 has bad max hash
+Problem in HTREE directory inode 24001: block #347 has bad min hash
+Problem in HTREE directory inode 24001: block #347 has bad max hash
+Problem in HTREE directory inode 24001: block #348 has bad min hash
+Problem in HTREE directory inode 24001: block #348 has bad max hash
+Problem in HTREE directory inode 24001: block #349 has bad min hash
+Problem in HTREE directory inode 24001: block #349 has bad max hash
+Problem in HTREE directory inode 24001: block #350 has bad min hash
+Problem in HTREE directory inode 24001: block #350 has bad max hash
+Problem in HTREE directory inode 24001: block #351 has bad min hash
+Problem in HTREE directory inode 24001: block #351 has bad max hash
+Problem in HTREE directory inode 24001: block #352 has bad min hash
+Problem in HTREE directory inode 24001: block #352 has bad max hash
+Problem in HTREE directory inode 24001: block #353 has bad min hash
+Problem in HTREE directory inode 24001: block #353 has bad max hash
+Problem in HTREE directory inode 24001: block #354 has bad min hash
+Problem in HTREE directory inode 24001: block #354 has bad max hash
+Problem in HTREE directory inode 24001: block #355 has bad min hash
+Problem in HTREE directory inode 24001: block #355 has bad max hash
+Problem in HTREE directory inode 24001: block #356 has bad min hash
+Problem in HTREE directory inode 24001: block #356 has bad max hash
+Problem in HTREE directory inode 24001: block #357 has bad min hash
+Problem in HTREE directory inode 24001: block #357 has bad max hash
+Problem in HTREE directory inode 24001: block #358 has bad min hash
+Problem in HTREE directory inode 24001: block #358 has bad max hash
+Problem in HTREE directory inode 24001: block #359 has bad min hash
+Problem in HTREE directory inode 24001: block #359 has bad max hash
+Problem in HTREE directory inode 24001: block #360 has bad min hash
+Problem in HTREE directory inode 24001: block #360 has bad max hash
+Problem in HTREE directory inode 24001: block #361 has bad min hash
+Problem in HTREE directory inode 24001: block #361 has bad max hash
+Problem in HTREE directory inode 24001: block #362 has bad min hash
+Problem in HTREE directory inode 24001: block #362 has bad max hash
+Problem in HTREE directory inode 24001: block #363 has bad min hash
+Problem in HTREE directory inode 24001: block #363 has bad max hash
+Problem in HTREE directory inode 24001: block #364 has bad min hash
+Problem in HTREE directory inode 24001: block #364 has bad max hash
+Problem in HTREE directory inode 24001: block #365 has bad min hash
+Problem in HTREE directory inode 24001: block #365 has bad max hash
+Problem in HTREE directory inode 24001: block #366 has bad min hash
+Problem in HTREE directory inode 24001: block #366 has bad max hash
+Problem in HTREE directory inode 24001: block #367 has bad min hash
+Problem in HTREE directory inode 24001: block #367 has bad max hash
+Problem in HTREE directory inode 24001: block #368 has bad min hash
+Problem in HTREE directory inode 24001: block #368 has bad max hash
+Problem in HTREE directory inode 24001: block #369 has bad min hash
+Problem in HTREE directory inode 24001: block #369 has bad max hash
+Problem in HTREE directory inode 24001: block #370 has bad min hash
+Problem in HTREE directory inode 24001: block #370 has bad max hash
+Problem in HTREE directory inode 24001: block #371 has bad min hash
+Problem in HTREE directory inode 24001: block #371 has bad max hash
+Problem in HTREE directory inode 24001: block #372 has bad min hash
+Problem in HTREE directory inode 24001: block #372 has bad max hash
+Problem in HTREE directory inode 24001: block #373 has bad min hash
+Problem in HTREE directory inode 24001: block #373 has bad max hash
+Problem in HTREE directory inode 24001: block #374 has bad min hash
+Problem in HTREE directory inode 24001: block #374 has bad max hash
+Problem in HTREE directory inode 24001: block #375 has bad min hash
+Problem in HTREE directory inode 24001: block #375 has bad max hash
+Problem in HTREE directory inode 24001: block #376 has bad min hash
+Problem in HTREE directory inode 24001: block #376 has bad max hash
+Problem in HTREE directory inode 24001: block #377 has bad min hash
+Problem in HTREE directory inode 24001: block #377 has bad max hash
+Problem in HTREE directory inode 24001: block #378 has bad min hash
+Problem in HTREE directory inode 24001: block #378 has bad max hash
+Problem in HTREE directory inode 24001: block #379 has bad min hash
+Problem in HTREE directory inode 24001: block #379 has bad max hash
+Problem in HTREE directory inode 24001: block #380 has bad min hash
+Problem in HTREE directory inode 24001: block #380 has bad max hash
+Problem in HTREE directory inode 24001: block #381 has bad min hash
+Problem in HTREE directory inode 24001: block #382 has bad max hash
+Problem in HTREE directory inode 24001: block #383 has bad min hash
+Problem in HTREE directory inode 24001: block #383 has bad max hash
+Problem in HTREE directory inode 24001: block #384 has bad min hash
+Problem in HTREE directory inode 24001: block #384 has bad max hash
+Problem in HTREE directory inode 24001: block #385 has bad min hash
+Problem in HTREE directory inode 24001: block #385 has bad max hash
+Problem in HTREE directory inode 24001: block #386 has bad min hash
+Problem in HTREE directory inode 24001: block #386 has bad max hash
+Problem in HTREE directory inode 24001: block #387 has bad min hash
+Problem in HTREE directory inode 24001: block #387 has bad max hash
+Problem in HTREE directory inode 24001: block #388 has bad min hash
+Problem in HTREE directory inode 24001: block #388 has bad max hash
+Problem in HTREE directory inode 24001: block #389 has bad min hash
+Problem in HTREE directory inode 24001: block #389 has bad max hash
+Problem in HTREE directory inode 24001: block #390 has bad min hash
+Problem in HTREE directory inode 24001: block #390 has bad max hash
+Problem in HTREE directory inode 24001: block #391 has bad min hash
+Problem in HTREE directory inode 24001: block #391 has bad max hash
+Problem in HTREE directory inode 24001: block #392 has bad min hash
+Problem in HTREE directory inode 24001: block #392 has bad max hash
+Problem in HTREE directory inode 24001: block #393 has bad min hash
+Problem in HTREE directory inode 24001: block #393 has bad max hash
+Problem in HTREE directory inode 24001: block #394 has bad min hash
+Problem in HTREE directory inode 24001: block #394 has bad max hash
+Problem in HTREE directory inode 24001: block #395 has bad min hash
+Problem in HTREE directory inode 24001: block #395 has bad max hash
+Problem in HTREE directory inode 24001: block #396 has bad min hash
+Problem in HTREE directory inode 24001: block #396 has bad max hash
+Problem in HTREE directory inode 24001: block #397 has bad min hash
+Problem in HTREE directory inode 24001: block #397 has bad max hash
+Problem in HTREE directory inode 24001: block #398 has bad min hash
+Problem in HTREE directory inode 24001: block #398 has bad max hash
+Problem in HTREE directory inode 24001: block #399 has bad min hash
+Problem in HTREE directory inode 24001: block #399 has bad max hash
+Problem in HTREE directory inode 24001: block #400 has bad min hash
+Problem in HTREE directory inode 24001: block #400 has bad max hash
+Problem in HTREE directory inode 24001: block #401 has bad min hash
+Problem in HTREE directory inode 24001: block #401 has bad max hash
+Problem in HTREE directory inode 24001: block #402 has bad min hash
+Problem in HTREE directory inode 24001: block #402 has bad max hash
+Problem in HTREE directory inode 24001: block #403 has bad min hash
+Problem in HTREE directory inode 24001: block #403 has bad max hash
+Problem in HTREE directory inode 24001: block #404 has bad min hash
+Problem in HTREE directory inode 24001: block #404 has bad max hash
+Problem in HTREE directory inode 24001: block #405 has bad min hash
+Problem in HTREE directory inode 24001: block #405 has bad max hash
+Problem in HTREE directory inode 24001: block #406 has bad min hash
+Problem in HTREE directory inode 24001: block #406 has bad max hash
+Problem in HTREE directory inode 24001: block #407 has bad min hash
+Problem in HTREE directory inode 24001: block #407 has bad max hash
+Problem in HTREE directory inode 24001: block #408 has bad min hash
+Problem in HTREE directory inode 24001: block #408 has bad max hash
+Problem in HTREE directory inode 24001: block #409 has bad min hash
+Problem in HTREE directory inode 24001: block #409 has bad max hash
+Problem in HTREE directory inode 24001: block #410 has bad min hash
+Problem in HTREE directory inode 24001: block #410 has bad max hash
+Problem in HTREE directory inode 24001: block #411 has bad min hash
+Problem in HTREE directory inode 24001: block #411 has bad max hash
+Problem in HTREE directory inode 24001: block #412 has bad min hash
+Problem in HTREE directory inode 24001: block #412 has bad max hash
+Problem in HTREE directory inode 24001: block #413 has bad min hash
+Problem in HTREE directory inode 24001: block #413 has bad max hash
+Problem in HTREE directory inode 24001: block #414 has bad min hash
+Problem in HTREE directory inode 24001: block #414 has bad max hash
+Problem in HTREE directory inode 24001: block #415 has bad min hash
+Problem in HTREE directory inode 24001: block #415 has bad max hash
+Problem in HTREE directory inode 24001: block #416 has bad min hash
+Problem in HTREE directory inode 24001: block #416 has bad max hash
+Problem in HTREE directory inode 24001: block #417 has bad min hash
+Problem in HTREE directory inode 24001: block #417 has bad max hash
+Problem in HTREE directory inode 24001: block #418 has bad min hash
+Problem in HTREE directory inode 24001: block #418 has bad max hash
+Problem in HTREE directory inode 24001: block #419 has bad min hash
+Problem in HTREE directory inode 24001: block #419 has bad max hash
+Problem in HTREE directory inode 24001: block #420 has bad min hash
+Problem in HTREE directory inode 24001: block #420 has bad max hash
+Problem in HTREE directory inode 24001: block #421 has bad min hash
+Problem in HTREE directory inode 24001: block #421 has bad max hash
+Problem in HTREE directory inode 24001: block #422 has bad min hash
+Problem in HTREE directory inode 24001: block #422 has bad max hash
+Problem in HTREE directory inode 24001: block #423 has bad min hash
+Problem in HTREE directory inode 24001: block #423 has bad max hash
+Problem in HTREE directory inode 24001: block #424 has bad min hash
+Problem in HTREE directory inode 24001: block #424 has bad max hash
+Problem in HTREE directory inode 24001: block #425 has bad min hash
+Problem in HTREE directory inode 24001: block #425 has bad max hash
+Problem in HTREE directory inode 24001: block #426 has bad min hash
+Problem in HTREE directory inode 24001: block #426 has bad max hash
+Problem in HTREE directory inode 24001: block #427 has bad min hash
+Problem in HTREE directory inode 24001: block #427 has bad max hash
+Problem in HTREE directory inode 24001: block #428 has bad min hash
+Problem in HTREE directory inode 24001: block #428 has bad max hash
+Problem in HTREE directory inode 24001: block #429 has bad min hash
+Problem in HTREE directory inode 24001: block #429 has bad max hash
+Problem in HTREE directory inode 24001: block #430 has bad min hash
+Problem in HTREE directory inode 24001: block #430 has bad max hash
+Problem in HTREE directory inode 24001: block #431 has bad min hash
+Problem in HTREE directory inode 24001: block #431 has bad max hash
+Problem in HTREE directory inode 24001: block #432 has bad min hash
+Problem in HTREE directory inode 24001: block #432 has bad max hash
+Problem in HTREE directory inode 24001: block #433 has bad min hash
+Problem in HTREE directory inode 24001: block #433 has bad max hash
+Problem in HTREE directory inode 24001: block #434 has bad min hash
+Problem in HTREE directory inode 24001: block #434 has bad max hash
+Problem in HTREE directory inode 24001: block #435 has bad min hash
+Problem in HTREE directory inode 24001: block #435 has bad max hash
+Problem in HTREE directory inode 24001: block #436 has bad min hash
+Problem in HTREE directory inode 24001: block #436 has bad max hash
+Problem in HTREE directory inode 24001: block #437 has bad min hash
+Problem in HTREE directory inode 24001: block #437 has bad max hash
+Problem in HTREE directory inode 24001: block #438 has bad min hash
+Problem in HTREE directory inode 24001: block #438 has bad max hash
+Problem in HTREE directory inode 24001: block #439 has bad min hash
+Problem in HTREE directory inode 24001: block #439 has bad max hash
+Problem in HTREE directory inode 24001: block #440 has bad min hash
+Problem in HTREE directory inode 24001: block #440 has bad max hash
+Problem in HTREE directory inode 24001: block #441 has bad min hash
+Problem in HTREE directory inode 24001: block #441 has bad max hash
+Problem in HTREE directory inode 24001: block #442 has bad min hash
+Problem in HTREE directory inode 24001: block #442 has bad max hash
+Problem in HTREE directory inode 24001: block #443 has bad min hash
+Problem in HTREE directory inode 24001: block #443 has bad max hash
+Problem in HTREE directory inode 24001: block #444 has bad min hash
+Problem in HTREE directory inode 24001: block #444 has bad max hash
+Problem in HTREE directory inode 24001: block #445 has bad min hash
+Problem in HTREE directory inode 24001: block #445 has bad max hash
+Problem in HTREE directory inode 24001: block #446 has bad min hash
+Problem in HTREE directory inode 24001: block #446 has bad max hash
+Problem in HTREE directory inode 24001: block #447 has bad min hash
+Problem in HTREE directory inode 24001: block #447 has bad max hash
+Problem in HTREE directory inode 24001: block #448 has bad min hash
+Problem in HTREE directory inode 24001: block #448 has bad max hash
+Problem in HTREE directory inode 24001: block #449 has bad min hash
+Problem in HTREE directory inode 24001: block #449 has bad max hash
+Problem in HTREE directory inode 24001: block #450 has bad min hash
+Problem in HTREE directory inode 24001: block #450 has bad max hash
+Problem in HTREE directory inode 24001: block #451 has bad min hash
+Problem in HTREE directory inode 24001: block #451 has bad max hash
+Problem in HTREE directory inode 24001: block #452 has bad min hash
+Problem in HTREE directory inode 24001: block #452 has bad max hash
+Problem in HTREE directory inode 24001: block #453 has bad min hash
+Problem in HTREE directory inode 24001: block #453 has bad max hash
+Problem in HTREE directory inode 24001: block #454 has bad min hash
+Problem in HTREE directory inode 24001: block #454 has bad max hash
+Problem in HTREE directory inode 24001: block #455 has bad min hash
+Problem in HTREE directory inode 24001: block #455 has bad max hash
+Problem in HTREE directory inode 24001: block #456 has bad min hash
+Problem in HTREE directory inode 24001: block #457 has bad min hash
+Problem in HTREE directory inode 24001: block #457 has bad max hash
+Problem in HTREE directory inode 24001: block #458 has bad min hash
+Problem in HTREE directory inode 24001: block #458 has bad max hash
+Problem in HTREE directory inode 24001: block #459 has bad min hash
+Problem in HTREE directory inode 24001: block #459 has bad max hash
+Problem in HTREE directory inode 24001: block #460 has bad min hash
+Problem in HTREE directory inode 24001: block #460 has bad max hash
+Problem in HTREE directory inode 24001: block #461 has bad min hash
+Problem in HTREE directory inode 24001: block #461 has bad max hash
+Problem in HTREE directory inode 24001: block #462 has bad min hash
+Problem in HTREE directory inode 24001: block #463 has bad min hash
+Problem in HTREE directory inode 24001: block #463 has bad max hash
+Problem in HTREE directory inode 24001: block #464 has bad min hash
+Problem in HTREE directory inode 24001: block #464 has bad max hash
+Problem in HTREE directory inode 24001: block #465 has bad min hash
+Problem in HTREE directory inode 24001: block #466 has bad min hash
+Problem in HTREE directory inode 24001: block #466 has bad max hash
+Problem in HTREE directory inode 24001: block #467 has bad min hash
+Problem in HTREE directory inode 24001: block #468 has bad min hash
+Problem in HTREE directory inode 24001: block #468 has bad max hash
+Problem in HTREE directory inode 24001: block #469 has bad min hash
+Problem in HTREE directory inode 24001: block #470 has bad max hash
+Problem in HTREE directory inode 24001: block #471 has bad min hash
+Problem in HTREE directory inode 24001: block #471 has bad max hash
+Problem in HTREE directory inode 24001: block #472 has bad min hash
+Problem in HTREE directory inode 24001: block #472 has bad max hash
+Problem in HTREE directory inode 24001: block #473 has bad min hash
+Invalid HTREE directory inode 24001 (/test2). Clear HTree index? yes
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 30514/32000 files (0.0% non-contiguous), 5669/8000 blocks
+Exit status is 1
diff --git a/tests/f_h_reindex/expect.2 b/tests/f_h_reindex/expect.2
new file mode 100644
index 0000000..7f785af
--- /dev/null
+++ b/tests/f_h_reindex/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 30514/32000 files (0.0% non-contiguous), 5669/8000 blocks
+Exit status is 0
diff --git a/tests/f_h_reindex/image.gz b/tests/f_h_reindex/image.gz
new file mode 100644
index 0000000..4aae72f
--- /dev/null
+++ b/tests/f_h_reindex/image.gz
Binary files differ
diff --git a/tests/f_h_reindex/name b/tests/f_h_reindex/name
new file mode 100644
index 0000000..ed4625f
--- /dev/null
+++ b/tests/f_h_reindex/name
@@ -0,0 +1 @@
+reindex HTREE Directory with different hash seed
diff --git a/tests/f_h_reindex/script b/tests/f_h_reindex/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/tests/f_h_reindex/script
@@ -0,0 +1,5 @@
+if test "$HTREE"x = yx ; then
+. $cmd_dir/run_e2fsck
+else
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/f_h_unsigned/expect.1 b/tests/f_h_unsigned/expect.1
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/tests/f_h_unsigned/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 47730/100192 files (0.0% non-contiguous), 13378/31745 blocks
+Exit status is 0
diff --git a/tests/f_h_unsigned/expect.2 b/tests/f_h_unsigned/expect.2
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/tests/f_h_unsigned/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 47730/100192 files (0.0% non-contiguous), 13378/31745 blocks
+Exit status is 0
diff --git a/tests/f_h_unsigned/image.gz b/tests/f_h_unsigned/image.gz
new file mode 100644
index 0000000..3af9c84
--- /dev/null
+++ b/tests/f_h_unsigned/image.gz
Binary files differ
diff --git a/tests/f_h_unsigned/name b/tests/f_h_unsigned/name
new file mode 100644
index 0000000..7fafc9c
--- /dev/null
+++ b/tests/f_h_unsigned/name
@@ -0,0 +1 @@
+unsigned HTREE directory
diff --git a/tests/f_h_unsigned/script b/tests/f_h_unsigned/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/tests/f_h_unsigned/script
@@ -0,0 +1,5 @@
+if test "$HTREE"x = yx ; then
+. $cmd_dir/run_e2fsck
+else
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/f_holedir/expect.1 b/tests/f_holedir/expect.1
new file mode 100644
index 0000000..ad74fa6
--- /dev/null
+++ b/tests/f_holedir/expect.1
@@ -0,0 +1,33 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 11 has illegal block(s). Clear? yes
+
+Illegal block #6 (200) in inode 11. CLEARED.
+Inode 11, i_size is 12288, should be 11264. Fix? yes
+
+Inode 11, i_blocks is 24, should be 16. Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 11 has an unallocated block #0. Allocate? yes
+
+Directory inode 11 has an unallocated block #3. Allocate? yes
+
+Directory inode 11 has an unallocated block #6. Allocate? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -21
+Fix? yes
+
+Free blocks count wrong for group #0 (78, counted=79).
+Fix? yes
+
+Free blocks count wrong (78, counted=79).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (9.1% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_holedir/expect.2 b/tests/f_holedir/expect.2
new file mode 100644
index 0000000..4c0b4f2
--- /dev/null
+++ b/tests/f_holedir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_holedir/image.gz b/tests/f_holedir/image.gz
new file mode 100644
index 0000000..ee26ab8
--- /dev/null
+++ b/tests/f_holedir/image.gz
Binary files differ
diff --git a/tests/f_holedir/name b/tests/f_holedir/name
new file mode 100644
index 0000000..411f656
--- /dev/null
+++ b/tests/f_holedir/name
@@ -0,0 +1 @@
+directory with holes and illegal blocks
diff --git a/tests/f_holedir2/expect.1 b/tests/f_holedir2/expect.1
new file mode 100644
index 0000000..455f4b0
--- /dev/null
+++ b/tests/f_holedir2/expect.1
@@ -0,0 +1,22 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 0, should be 5120. Fix? yes
+
+Directory inode 13 block 2 should be at block 1. Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 12 has an unallocated block #3. Allocate? yes
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (78, counted=77).
+Fix? yes
+
+Free blocks count wrong (78, counted=77).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/16 files (7.7% non-contiguous), 23/100 blocks
+Exit status is 1
diff --git a/tests/f_holedir2/expect.2 b/tests/f_holedir2/expect.2
new file mode 100644
index 0000000..636c6e9
--- /dev/null
+++ b/tests/f_holedir2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/16 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 0
diff --git a/tests/f_holedir2/image.gz b/tests/f_holedir2/image.gz
new file mode 100644
index 0000000..63dda07
--- /dev/null
+++ b/tests/f_holedir2/image.gz
Binary files differ
diff --git a/tests/f_holedir2/name b/tests/f_holedir2/name
new file mode 100644
index 0000000..144f5b3
--- /dev/null
+++ b/tests/f_holedir2/name
@@ -0,0 +1 @@
+directories with holes and zero i_size
diff --git a/tests/f_holedir3/expect.1 b/tests/f_holedir3/expect.1
new file mode 100644
index 0000000..074ca6c
--- /dev/null
+++ b/tests/f_holedir3/expect.1
@@ -0,0 +1,13 @@
+Pass 1: Checking inodes, blocks, and sizes
+Directory inode 12 block 5 should be at block 2. Fix? yes
+
+Inode 12, i_size is 6144, should be 3072. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 17/128 files (5.9% non-contiguous), 1093/2048 blocks
+Exit status is 1
diff --git a/tests/f_holedir3/expect.2 b/tests/f_holedir3/expect.2
new file mode 100644
index 0000000..b675e6d
--- /dev/null
+++ b/tests/f_holedir3/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 17/128 files (5.9% non-contiguous), 1093/2048 blocks
+Exit status is 0
diff --git a/tests/f_holedir3/image.gz b/tests/f_holedir3/image.gz
new file mode 100644
index 0000000..c5eeb37
--- /dev/null
+++ b/tests/f_holedir3/image.gz
Binary files differ
diff --git a/tests/f_holedir3/name b/tests/f_holedir3/name
new file mode 100644
index 0000000..73b3612
--- /dev/null
+++ b/tests/f_holedir3/name
@@ -0,0 +1 @@
+real directories with holes and zero i_size
diff --git a/tests/f_holedir4/expect.1 b/tests/f_holedir4/expect.1
new file mode 100644
index 0000000..1e66fb6
--- /dev/null
+++ b/tests/f_holedir4/expect.1
@@ -0,0 +1,68 @@
+Pass 1: Checking inodes, blocks, and sizes
+Directory inode 12 block 211 should be at block 25. Fix? yes
+
+Inode 12, i_size is 4096, should be 110592. Fix? yes
+
+Inode 12, i_blocks is 128, should be 256. Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 12 has an unallocated block #2. Allocate? yes
+
+Directory inode 12 has an unallocated block #3. Allocate? yes
+
+Directory inode 12 has an unallocated block #4. Allocate? yes
+
+Directory inode 12 has an unallocated block #5. Allocate? yes
+
+Directory inode 12 has an unallocated block #6. Allocate? yes
+
+Directory inode 12 has an unallocated block #7. Allocate? yes
+
+Directory inode 12 has an unallocated block #8. Allocate? yes
+
+Directory inode 12 has an unallocated block #9. Allocate? yes
+
+Directory inode 12 has an unallocated block #10. Allocate? yes
+
+Directory inode 12 has an unallocated block #11. Allocate? yes
+
+Directory inode 12 has an unallocated block #12. Allocate? yes
+
+Directory inode 12 has an unallocated block #13. Allocate? yes
+
+Directory inode 12 has an unallocated block #14. Allocate? yes
+
+Directory inode 12 has an unallocated block #15. Allocate? yes
+
+Directory inode 12 has an unallocated block #16. Allocate? yes
+
+Directory inode 12 has an unallocated block #17. Allocate? yes
+
+Directory inode 12 has an unallocated block #18. Allocate? yes
+
+Directory inode 12 has an unallocated block #19. Allocate? yes
+
+Directory inode 12 has an unallocated block #20. Allocate? yes
+
+Directory inode 12 has an unallocated block #21. Allocate? yes
+
+Directory inode 12 has an unallocated block #22. Allocate? yes
+
+Directory inode 12 has an unallocated block #23. Allocate? yes
+
+Directory inode 12 has an unallocated block #24. Allocate? yes
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (26, counted=25).
+Fix? yes
+
+Free blocks count wrong (416, counted=400).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/32 files (7.7% non-contiguous), 112/512 blocks
+Exit status is 1
diff --git a/tests/f_holedir4/expect.2 b/tests/f_holedir4/expect.2
new file mode 100644
index 0000000..1f0e351
--- /dev/null
+++ b/tests/f_holedir4/expect.2
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_blocks is 3072, should be 128. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/32 files (0.0% non-contiguous), 112/512 blocks
+Exit status is 1
diff --git a/tests/f_holedir4/image.gz b/tests/f_holedir4/image.gz
new file mode 100644
index 0000000..8ab1245
--- /dev/null
+++ b/tests/f_holedir4/image.gz
Binary files differ
diff --git a/tests/f_holedir4/name b/tests/f_holedir4/name
new file mode 100644
index 0000000..5eb55c1
--- /dev/null
+++ b/tests/f_holedir4/name
@@ -0,0 +1 @@
+bigalloc directory with hole and misaligned extent after hole
diff --git a/tests/f_htree_bad_csum/expect.1 b/tests/f_htree_bad_csum/expect.1
new file mode 100644
index 0000000..258362b
--- /dev/null
+++ b/tests/f_htree_bad_csum/expect.1
@@ -0,0 +1,28 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Problem in HTREE directory inode 12: root node fails checksum.
+Clear HTree index? yes
+
+Problem in HTREE directory inode 18: root node fails checksum.
+Clear HTree index? yes
+
+Directory inode 24, block #0, offset 1020: directory corrupted
+Salvage? yes
+
+Problem in HTREE directory inode 24: root node fails checksum.
+Clear HTree index? yes
+
+Problem in HTREE directory inode 30: root node fails checksum.
+Clear HTree index? yes
+
+Problem in HTREE directory inode 36: root node fails checksum.
+Clear HTree index? yes
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 47/128 files (2.1% non-contiguous), 1108/2048 blocks
+Exit status is 1
diff --git a/tests/f_htree_bad_csum/expect.2 b/tests/f_htree_bad_csum/expect.2
new file mode 100644
index 0000000..7e3523b
--- /dev/null
+++ b/tests/f_htree_bad_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 47/128 files (2.1% non-contiguous), 1108/2048 blocks
+Exit status is 0
diff --git a/tests/f_htree_bad_csum/image.gz b/tests/f_htree_bad_csum/image.gz
new file mode 100644
index 0000000..def571c
--- /dev/null
+++ b/tests/f_htree_bad_csum/image.gz
Binary files differ
diff --git a/tests/f_htree_bad_csum/name b/tests/f_htree_bad_csum/name
new file mode 100644
index 0000000..3388353
--- /dev/null
+++ b/tests/f_htree_bad_csum/name
@@ -0,0 +1 @@
+htree block bad csum/tail dirent/htree index corruption
diff --git a/tests/f_htree_leaf_csum/expect.1 b/tests/f_htree_leaf_csum/expect.1
new file mode 100644
index 0000000..d6b179e
--- /dev/null
+++ b/tests/f_htree_leaf_csum/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Directory inode 12, block #1: directory passes checks but fails checksum.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 430/512 files (0.2% non-contiguous), 45/512 blocks
+Exit status is 1
diff --git a/tests/f_htree_leaf_csum/expect.2 b/tests/f_htree_leaf_csum/expect.2
new file mode 100644
index 0000000..1609785
--- /dev/null
+++ b/tests/f_htree_leaf_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 430/512 files (0.2% non-contiguous), 45/512 blocks
+Exit status is 0
diff --git a/tests/f_htree_leaf_csum/image.gz b/tests/f_htree_leaf_csum/image.gz
new file mode 100644
index 0000000..f2e4619
--- /dev/null
+++ b/tests/f_htree_leaf_csum/image.gz
Binary files differ
diff --git a/tests/f_htree_leaf_csum/name b/tests/f_htree_leaf_csum/name
new file mode 100644
index 0000000..43c6ada
--- /dev/null
+++ b/tests/f_htree_leaf_csum/name
@@ -0,0 +1 @@
+bad csum in htree leaf block
diff --git a/tests/f_hugedir_blocks/expect.1 b/tests/f_hugedir_blocks/expect.1
new file mode 100644
index 0000000..798a7ac
--- /dev/null
+++ b/tests/f_hugedir_blocks/expect.1
@@ -0,0 +1,10 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 is too big. Truncate? yes
+
+Block #1074791435 (13) causes directory to be too big. CLEARED.
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 22/512 blocks
+Exit status is 0
diff --git a/tests/f_hugedir_blocks/expect.2 b/tests/f_hugedir_blocks/expect.2
new file mode 100644
index 0000000..ac5f4c1
--- /dev/null
+++ b/tests/f_hugedir_blocks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 22/512 blocks
+Exit status is 0
diff --git a/tests/f_hugedir_blocks/image.gz b/tests/f_hugedir_blocks/image.gz
new file mode 100644
index 0000000..1d54de8
--- /dev/null
+++ b/tests/f_hugedir_blocks/image.gz
Binary files differ
diff --git a/tests/f_hugedir_blocks/name b/tests/f_hugedir_blocks/name
new file mode 100644
index 0000000..58b7916
--- /dev/null
+++ b/tests/f_hugedir_blocks/name
@@ -0,0 +1 @@
+dir crashes e2fsck with impossible logical blk offset
diff --git a/tests/f_hurd/expect.1 b/tests/f_hurd/expect.1
new file mode 100644
index 0000000..f7bfc56
--- /dev/null
+++ b/tests/f_hurd/expect.1
@@ -0,0 +1,12 @@
+The Hurd does not support the filetype feature.
+Clear? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 1
diff --git a/tests/f_hurd/expect.2 b/tests/f_hurd/expect.2
new file mode 100644
index 0000000..44bff62
--- /dev/null
+++ b/tests/f_hurd/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 0
diff --git a/tests/f_hurd/image.gz b/tests/f_hurd/image.gz
new file mode 100644
index 0000000..58ffe0c
--- /dev/null
+++ b/tests/f_hurd/image.gz
Binary files differ
diff --git a/tests/f_hurd/name b/tests/f_hurd/name
new file mode 100644
index 0000000..a692986
--- /dev/null
+++ b/tests/f_hurd/name
@@ -0,0 +1 @@
+GNU/Hurd specific tests
diff --git a/tests/f_idata_and_extents/expect.1 b/tests/f_idata_and_extents/expect.1
new file mode 100644
index 0000000..7f7fbf3
--- /dev/null
+++ b/tests/f_idata_and_extents/expect.1
@@ -0,0 +1,35 @@
+Pass 1: Checking inodes, blocks, and sizes
+Special (device/socket/fifo) file (inode 19) has extents
+or inline-data flag set. Clear? yes
+
+Inode 20 has extent header but inline data flag is set.
+Fix? yes
+
+Inode 21 has inline data and extent flags set but i_block contains junk.
+Clear inode? yes
+
+Inode 22 seems to have block map but inline data and extent flags set.
+Fix? yes
+
+Inode 23 seems to have inline data but extent flag is set.
+Fix? yes
+
+Pass 2: Checking directory structure
+Entry 'garbage' in /bad (18) has deleted/unused inode 21. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -21
+Fix? yes
+
+Free inodes count wrong for group #0 (105, counted=106).
+Fix? yes
+
+Free inodes count wrong (105, counted=106).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 22/128 files (0.0% non-contiguous), 21/512 blocks
+Exit status is 1
diff --git a/tests/f_idata_and_extents/expect.2 b/tests/f_idata_and_extents/expect.2
new file mode 100644
index 0000000..307d3f6
--- /dev/null
+++ b/tests/f_idata_and_extents/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 22/128 files (0.0% non-contiguous), 21/512 blocks
+Exit status is 0
diff --git a/tests/f_idata_and_extents/image.gz b/tests/f_idata_and_extents/image.gz
new file mode 100644
index 0000000..5187ba1
--- /dev/null
+++ b/tests/f_idata_and_extents/image.gz
Binary files differ
diff --git a/tests/f_idata_and_extents/name b/tests/f_idata_and_extents/name
new file mode 100644
index 0000000..362ce0e
--- /dev/null
+++ b/tests/f_idata_and_extents/name
@@ -0,0 +1 @@
+conflicting extents and inline_data inode flags
diff --git a/tests/f_illbbitmap/expect.1 b/tests/f_illbbitmap/expect.1
new file mode 100644
index 0000000..40996cd
--- /dev/null
+++ b/tests/f_illbbitmap/expect.1
@@ -0,0 +1,30 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
+Note: if several inode or block bitmap blocks or part
+of the inode table require relocation, you may wish to try
+running e2fsck with the '-b 8193' option first. The problem
+may lie only with the primary block group descriptors, and
+the backup block group descriptors may be OK.
+
+Block bitmap for group 0 is not in group. (block 4096)
+Relocate? yes
+
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Relocating group 0's block bitmap to 4...
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--21)
+Fix? yes
+
+Inode bitmap differences: -(12--21)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_illbbitmap/expect.2 b/tests/f_illbbitmap/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/tests/f_illbbitmap/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_illbbitmap/image.gz b/tests/f_illbbitmap/image.gz
new file mode 100644
index 0000000..fb16ebc
--- /dev/null
+++ b/tests/f_illbbitmap/image.gz
Binary files differ
diff --git a/tests/f_illbbitmap/name b/tests/f_illbbitmap/name
new file mode 100644
index 0000000..5ed4f59
--- /dev/null
+++ b/tests/f_illbbitmap/name
@@ -0,0 +1 @@
+illegal block bitmap
diff --git a/tests/f_illibitmap/expect.1 b/tests/f_illibitmap/expect.1
new file mode 100644
index 0000000..bf21df7
--- /dev/null
+++ b/tests/f_illibitmap/expect.1
@@ -0,0 +1,27 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for inode bitmap
+Note: if several inode or block bitmap blocks or part
+of the inode table require relocation, you may wish to try
+running e2fsck with the '-b 8193' option first. The problem
+may lie only with the primary block group descriptors, and
+the backup block group descriptors may be OK.
+
+Inode bitmap for group 0 is not in group. (block 4000)
+Relocate? yes
+
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Relocating group 0's inode bitmap to 4...
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_illibitmap/expect.2 b/tests/f_illibitmap/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/tests/f_illibitmap/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_illibitmap/image.gz b/tests/f_illibitmap/image.gz
new file mode 100644
index 0000000..3e0892d
--- /dev/null
+++ b/tests/f_illibitmap/image.gz
Binary files differ
diff --git a/tests/f_illibitmap/name b/tests/f_illibitmap/name
new file mode 100644
index 0000000..bac4003
--- /dev/null
+++ b/tests/f_illibitmap/name
@@ -0,0 +1 @@
+illegal inode bitmap
diff --git a/tests/f_illitable/expect.1 b/tests/f_illitable/expect.1
new file mode 100644
index 0000000..0aa5687
--- /dev/null
+++ b/tests/f_illitable/expect.1
@@ -0,0 +1,49 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for inode table
+Note: if several inode or block bitmap blocks or part
+of the inode table require relocation, you may wish to try
+running e2fsck with the '-b 8193' option first. The problem
+may lie only with the primary block group descriptors, and
+the backup block group descriptors may be OK.
+
+Inode table for group 0 is not in group. (block 40000)
+WARNING: SEVERE DATA LOSS POSSIBLE.
+Relocate? yes
+
+../e2fsck/e2fsck: A block group is missing an inode table while reading bad blocks inode
+This doesn't bode well, but we'll try to go on...
+Pass 1: Checking inodes, blocks, and sizes
+Relocating group 0's inode table to 7...
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Root inode is not a directory. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(11--21)
+Fix? yes
+
+Free blocks count wrong for group #0 (77, counted=89).
+Fix? yes
+
+Free blocks count wrong (77, counted=89).
+Fix? yes
+
+Free inodes count wrong for group #0 (20, counted=21).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (20, counted=21).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 11/100 blocks
+Exit status is 1
diff --git a/tests/f_illitable/expect.2 b/tests/f_illitable/expect.2
new file mode 100644
index 0000000..3ead5cf
--- /dev/null
+++ b/tests/f_illitable/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 11/100 blocks
+Exit status is 0
diff --git a/tests/f_illitable/image.gz b/tests/f_illitable/image.gz
new file mode 100644
index 0000000..1b02194
--- /dev/null
+++ b/tests/f_illitable/image.gz
Binary files differ
diff --git a/tests/f_illitable/name b/tests/f_illitable/name
new file mode 100644
index 0000000..631e73b
--- /dev/null
+++ b/tests/f_illitable/name
@@ -0,0 +1 @@
+illegal inode table
diff --git a/tests/f_illitable_flexbg/expect.1 b/tests/f_illitable_flexbg/expect.1
new file mode 100644
index 0000000..4ac1246
--- /dev/null
+++ b/tests/f_illitable_flexbg/expect.1
@@ -0,0 +1,26 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for inode table
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+Inode table for group 1 is not in group. (block 0)
+WARNING: SEVERE DATA LOSS POSSIBLE.
+Relocate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Relocating group 1's inode table to 142...
+Restarting e2fsck from the beginning...
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 1 checksum is 0x1cee, should be 0xf809. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -(65--128)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/256 files (0.0% non-contiguous), 31163/32768 blocks
+Exit status is 1
diff --git a/tests/f_illitable_flexbg/expect.2 b/tests/f_illitable_flexbg/expect.2
new file mode 100644
index 0000000..8ef43c2
--- /dev/null
+++ b/tests/f_illitable_flexbg/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/256 files (0.0% non-contiguous), 31163/32768 blocks
+Exit status is 0
diff --git a/tests/f_illitable_flexbg/image.gz b/tests/f_illitable_flexbg/image.gz
new file mode 100755
index 0000000..7fa1446
--- /dev/null
+++ b/tests/f_illitable_flexbg/image.gz
Binary files differ
diff --git a/tests/f_illitable_flexbg/name b/tests/f_illitable_flexbg/name
new file mode 100644
index 0000000..58b0850
--- /dev/null
+++ b/tests/f_illitable_flexbg/name
@@ -0,0 +1 @@
+illegal inode table with FLEX_BG
diff --git a/tests/f_imagic/expect.1 b/tests/f_imagic/expect.1
new file mode 100644
index 0000000..ebee192
--- /dev/null
+++ b/tests/f_imagic/expect.1
@@ -0,0 +1,47 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has imagic flag set. Clear? yes
+
+Inode 13 has imagic flag set. Clear? yes
+
+Inode 14 has imagic flag set. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Unattached inode 12
+Connect to /lost+found? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 14
+Connect to /lost+found? yes
+
+Inode 14 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(9--19)
+Fix? yes
+
+Free blocks count wrong for group #0 (75, counted=87).
+Fix? yes
+
+Free blocks count wrong (75, counted=87).
+Fix? yes
+
+Free inodes count wrong for group #0 (1, counted=2).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (1, counted=2).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
diff --git a/tests/f_imagic/expect.2 b/tests/f_imagic/expect.2
new file mode 100644
index 0000000..1f411c0
--- /dev/null
+++ b/tests/f_imagic/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 0
diff --git a/tests/f_imagic/image.gz b/tests/f_imagic/image.gz
new file mode 100644
index 0000000..6c2b3fa
--- /dev/null
+++ b/tests/f_imagic/image.gz
Binary files differ
diff --git a/tests/f_imagic/name b/tests/f_imagic/name
new file mode 100644
index 0000000..db94008
--- /dev/null
+++ b/tests/f_imagic/name
@@ -0,0 +1 @@
+non-imagic filesystem with imagic inodes
diff --git a/tests/f_imagic_fs/expect.1 b/tests/f_imagic_fs/expect.1
new file mode 100644
index 0000000..b21fd35
--- /dev/null
+++ b/tests/f_imagic_fs/expect.1
@@ -0,0 +1,31 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(9--19)
+Fix? yes
+
+Free blocks count wrong for group #0 (75, counted=87).
+Fix? yes
+
+Free blocks count wrong (75, counted=87).
+Fix? yes
+
+Free inodes count wrong for group #0 (1, counted=2).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (1, counted=2).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
diff --git a/tests/f_imagic_fs/expect.2 b/tests/f_imagic_fs/expect.2
new file mode 100644
index 0000000..1f411c0
--- /dev/null
+++ b/tests/f_imagic_fs/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 0
diff --git a/tests/f_imagic_fs/name b/tests/f_imagic_fs/name
new file mode 100644
index 0000000..a036976
--- /dev/null
+++ b/tests/f_imagic_fs/name
@@ -0,0 +1 @@
+imagic filesystem with imagic inodes
diff --git a/tests/f_imagic_fs/script b/tests/f_imagic_fs/script
new file mode 100644
index 0000000..511dcc7
--- /dev/null
+++ b/tests/f_imagic_fs/script
@@ -0,0 +1,8 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/../f_imagic/image.gz
+PREP_CMD='$DEBUGFS -w -R "feature imagic_inodes" $TMPFILE > /dev/null 2>&1'
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_ind_inode_collision/expect.1 b/tests/f_ind_inode_collision/expect.1
new file mode 100644
index 0000000..63c128b
--- /dev/null
+++ b/tests/f_ind_inode_collision/expect.1
@@ -0,0 +1,146 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 block 41 conflicts with critical metadata, skipping block checks.
+Inode 12 block 40 conflicts with critical metadata, skipping block checks.
+Inode 12 block 34 conflicts with critical metadata, skipping block checks.
+Inode 12 block 1 conflicts with critical metadata, skipping block checks.
+Inode 12, i_size is 33, should be 25227264. Fix? yes
+
+Inode 12, i_blocks is 999, should be 184. Fix? yes
+
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 2: 3
+Multiply-claimed block(s) in inode 7: 11
+Multiply-claimed block(s) in inode 11: 4--7
+Multiply-claimed block(s) in inode 12: 41 40Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16877 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #4096 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #196608 for multiply claimed block map
+ 34 8 3Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #33152 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #4243456 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #65536 for multiply claimed block map
+ 28 8 11 1Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16832 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16384 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #131072 for multiply claimed block map
+ 28 4--7Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #33206 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #25227264 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #65536 for multiply claimed block map
+ 28 41Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16777215 for multiply claimed block map
+ 28
+Error while iterating over blocks in inode 12 (pass1b): Illegal indirect block found
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 3 inodes containing multiply-claimed blocks.)
+
+File / (inode #2, mod time Sat Jan 17 21:16:16 2015)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /a (inode #12, mod time Sat Jan 17 21:16:37 2015)
+Clone multiply-claimed blocks? yes
+
+File /lost+found (inode #11, mod time Sat Jan 17 21:16:16 2015)
+ has 4 multiply-claimed block(s), shared with 1 file(s):
+ /a (inode #12, mod time Sat Jan 17 21:16:37 2015)
+Clone multiply-claimed blocks? yes
+
+File /a (inode #12, mod time Sat Jan 17 21:16:37 2015)
+ has 17 multiply-claimed block(s), shared with 4 file(s):
+ <filesystem metadata>
+ /lost+found (inode #11, mod time Sat Jan 17 21:16:16 2015)
+ <The group descriptor inode> (inode #7, mod time Sat Jan 17 21:16:16 2015)
+ / (inode #2, mod time Sat Jan 17 21:16:16 2015)
+Clone multiply-claimed blocks? yes
+
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16877 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #4096 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #196608 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #33152 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #4243456 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #65536 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16832 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16384 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #131072 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529376 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #33206 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #25227264 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #65536 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #1421529397 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #16777215 for multiply claimed block map
+Pass 2: Checking directory structure
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has illegal block(s). Clear? yes
+
+Illegal block #1038 (1421529376) in inode 12. CLEARED.
+Illegal block #1039 (1421529376) in inode 12. CLEARED.
+Illegal block #1040 (1421529376) in inode 12. CLEARED.
+Illegal block #1100 (16877) in inode 12. CLEARED.
+Illegal block #1101 (4096) in inode 12. CLEARED.
+Illegal block #1102 (1421529376) in inode 12. CLEARED.
+Illegal block #1103 (1421529376) in inode 12. CLEARED.
+Illegal block #1104 (1421529376) in inode 12. CLEARED.
+Illegal block #1106 (196608) in inode 12. CLEARED.
+Illegal block #1136 (1421529376) in inode 12. CLEARED.
+Illegal block #1420 (33152) in inode 12. CLEARED.
+Too many illegal blocks in inode 12.
+Clear inode? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'a' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(3--7) -(15--17) -(19--24)
+Fix? yes
+
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (116, counted=117).
+Fix? yes
+
+Free inodes count wrong (116, counted=117).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (9.1% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_ind_inode_collision/expect.2 b/tests/f_ind_inode_collision/expect.2
new file mode 100644
index 0000000..d0a6dac
--- /dev/null
+++ b/tests/f_ind_inode_collision/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (9.1% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_ind_inode_collision/image.gz b/tests/f_ind_inode_collision/image.gz
new file mode 100644
index 0000000..924d220
--- /dev/null
+++ b/tests/f_ind_inode_collision/image.gz
Binary files differ
diff --git a/tests/f_ind_inode_collision/name b/tests/f_ind_inode_collision/name
new file mode 100644
index 0000000..11feee3
--- /dev/null
+++ b/tests/f_ind_inode_collision/name
@@ -0,0 +1 @@
+multiple *ind collisions with critical metadata
diff --git a/tests/f_inlinedata_dirblocks/expect.1 b/tests/f_inlinedata_dirblocks/expect.1
new file mode 100644
index 0000000..e3d0ee2
--- /dev/null
+++ b/tests/f_inlinedata_dirblocks/expect.1
@@ -0,0 +1,25 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry '..' in ??? (12) has invalid inode #: 1752440867.
+Clear? yes
+
+Directory inode 12, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Directory inode 12, block #1, offset 0: directory corrupted
+Salvage? yes
+
+Pass 3: Checking directory connectivity
+'..' in /aoo (12) is ??? (1752440867), should be / (2).
+Fix? yes
+
+Error while adjusting inode count on inode 0
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Directories count wrong for group #0 (2, counted=3).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_inlinedata_dirblocks/expect.2 b/tests/f_inlinedata_dirblocks/expect.2
new file mode 100644
index 0000000..3b6073e
--- /dev/null
+++ b/tests/f_inlinedata_dirblocks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 0
diff --git a/tests/f_inlinedata_dirblocks/image.gz b/tests/f_inlinedata_dirblocks/image.gz
new file mode 100644
index 0000000..4cd64e0
--- /dev/null
+++ b/tests/f_inlinedata_dirblocks/image.gz
Binary files differ
diff --git a/tests/f_inlinedata_dirblocks/name b/tests/f_inlinedata_dirblocks/name
new file mode 100644
index 0000000..a226758
--- /dev/null
+++ b/tests/f_inlinedata_dirblocks/name
@@ -0,0 +1 @@
+check inline dir as two dirent blocks
diff --git a/tests/f_inlinedata_flags/expect.1 b/tests/f_inlinedata_flags/expect.1
new file mode 100644
index 0000000..86eba88
--- /dev/null
+++ b/tests/f_inlinedata_flags/expect.1
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag on filesystem without inline data support.
+Clear? yes
+
+Inode 13 has inline data, but superblock is missing INLINE_DATA feature
+Fix? yes
+
+Pass 2: Checking directory structure
+Entry '1' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (243, counted=244).
+Fix? yes
+
+Free inodes count wrong (243, counted=244).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/256 files (0.0% non-contiguous), 1143/8192 blocks
+Exit status is 1
diff --git a/tests/f_inlinedata_flags/expect.2 b/tests/f_inlinedata_flags/expect.2
new file mode 100644
index 0000000..87b3f18
--- /dev/null
+++ b/tests/f_inlinedata_flags/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/256 files (0.0% non-contiguous), 1143/8192 blocks
+Exit status is 0
diff --git a/tests/f_inlinedata_flags/image.gz b/tests/f_inlinedata_flags/image.gz
new file mode 100644
index 0000000..4344a0a
--- /dev/null
+++ b/tests/f_inlinedata_flags/image.gz
Binary files differ
diff --git a/tests/f_inlinedata_flags/name b/tests/f_inlinedata_flags/name
new file mode 100644
index 0000000..66b7676
--- /dev/null
+++ b/tests/f_inlinedata_flags/name
@@ -0,0 +1 @@
+check incorrect inline_data flags
diff --git a/tests/f_inlinedata_repair/expect.1 b/tests/f_inlinedata_repair/expect.1
new file mode 100644
index 0000000..9c84b14
--- /dev/null
+++ b/tests/f_inlinedata_repair/expect.1
@@ -0,0 +1,58 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes
+
+Inode 16, i_size is 56, should be 60. Fix? yes
+
+Inode 24, i_size is 59, should be 60. Fix? yes
+
+Inode 28 is a unknown file type with mode 00 but it looks like it is really a directory.
+Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 20, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Directory inode 28, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Directory inode 32, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Directory inode 32, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Symlink /1 (inode #12) is invalid.
+Clear? yes
+
+Symlink /3 (inode #14) is invalid.
+Clear? yes
+
+Inode 38 (/B) has invalid mode (00).
+Clear? yes
+
+Inode 36 (/A) has invalid mode (00).
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached zero-length inode 22. Clear? yes
+
+Unattached zero-length inode 23. Clear? yes
+
+Unattached zero-length inode 29. Clear? yes
+
+Unattached zero-length inode 30. Clear? yes
+
+Unattached zero-length inode 31. Clear? yes
+
+Unattached zero-length inode 33. Clear? yes
+
+Unattached zero-length inode 34. Clear? yes
+
+Unattached zero-length inode 35. Clear? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 26/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_inlinedata_repair/expect.2 b/tests/f_inlinedata_repair/expect.2
new file mode 100644
index 0000000..69d874e
--- /dev/null
+++ b/tests/f_inlinedata_repair/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 26/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_inlinedata_repair/image.gz b/tests/f_inlinedata_repair/image.gz
new file mode 100644
index 0000000..c33d81d
--- /dev/null
+++ b/tests/f_inlinedata_repair/image.gz
Binary files differ
diff --git a/tests/f_inlinedata_repair/name b/tests/f_inlinedata_repair/name
new file mode 100644
index 0000000..7e7e898
--- /dev/null
+++ b/tests/f_inlinedata_repair/name
@@ -0,0 +1 @@
+repair corrupt inline data files
diff --git a/tests/f_inlinedir_detector/expect.1 b/tests/f_inlinedir_detector/expect.1
new file mode 100644
index 0000000..72b7519
--- /dev/null
+++ b/tests/f_inlinedir_detector/expect.1
@@ -0,0 +1,20 @@
+Pass 1: Checking inodes, blocks, and sizes
+Special (device/socket/fifo) file (inode 12) has extents
+or inline-data flag set. Clear? yes
+
+Special (device/socket/fifo) inode 12 has non-zero size. Fix? yes
+
+Inode 13 is a named pipe but it looks like it is really a directory.
+Fix? yes
+
+Pass 2: Checking directory structure
+Entry 'moo' in / (2) has an incorrect filetype (was 1, should be 5).
+Fix? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_inlinedir_detector/expect.2 b/tests/f_inlinedir_detector/expect.2
new file mode 100644
index 0000000..06886a4
--- /dev/null
+++ b/tests/f_inlinedir_detector/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 0
diff --git a/tests/f_inlinedir_detector/image.gz b/tests/f_inlinedir_detector/image.gz
new file mode 100644
index 0000000..34b4518
--- /dev/null
+++ b/tests/f_inlinedir_detector/image.gz
Binary files differ
diff --git a/tests/f_inlinedir_detector/name b/tests/f_inlinedir_detector/name
new file mode 100644
index 0000000..3368af5
--- /dev/null
+++ b/tests/f_inlinedir_detector/name
@@ -0,0 +1 @@
+detect inline dirs correctly
diff --git a/tests/f_inode_ea_collision/expect.1 b/tests/f_inode_ea_collision/expect.1
new file mode 100644
index 0000000..a67a5f1
--- /dev/null
+++ b/tests/f_inode_ea_collision/expect.1
@@ -0,0 +1,15 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 extended attribute is corrupt (allocation collision). Clear? yes
+
+Inode 13 extended attribute is corrupt (allocation collision). Clear? yes
+
+Inode 14 extended attribute is corrupt (allocation collision). Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_inode_ea_collision/expect.2 b/tests/f_inode_ea_collision/expect.2
new file mode 100644
index 0000000..5a7ca86
--- /dev/null
+++ b/tests/f_inode_ea_collision/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_inode_ea_collision/image.gz b/tests/f_inode_ea_collision/image.gz
new file mode 100644
index 0000000..5217f65
--- /dev/null
+++ b/tests/f_inode_ea_collision/image.gz
Binary files differ
diff --git a/tests/f_inode_ea_collision/name b/tests/f_inode_ea_collision/name
new file mode 100644
index 0000000..b64119e
--- /dev/null
+++ b/tests/f_inode_ea_collision/name
@@ -0,0 +1 @@
+collisions in the inode ea area
diff --git a/tests/f_invalid_bad_inode/expect.1 b/tests/f_invalid_bad_inode/expect.1
new file mode 100644
index 0000000..5a37cb0
--- /dev/null
+++ b/tests/f_invalid_bad_inode/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+The bad block inode looks invalid. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_invalid_bad_inode/expect.2 b/tests/f_invalid_bad_inode/expect.2
new file mode 100644
index 0000000..41ceefb
--- /dev/null
+++ b/tests/f_invalid_bad_inode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_invalid_bad_inode/image.gz b/tests/f_invalid_bad_inode/image.gz
new file mode 100644
index 0000000..5dac147
--- /dev/null
+++ b/tests/f_invalid_bad_inode/image.gz
Binary files differ
diff --git a/tests/f_invalid_bad_inode/name b/tests/f_invalid_bad_inode/name
new file mode 100644
index 0000000..f981e8d
--- /dev/null
+++ b/tests/f_invalid_bad_inode/name
@@ -0,0 +1 @@
+check for bogus bad inode
diff --git a/tests/f_invalid_extent_symlink/expect.1 b/tests/f_invalid_extent_symlink/expect.1
new file mode 100644
index 0000000..7bda0b7
--- /dev/null
+++ b/tests/f_invalid_extent_symlink/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Symlink /a (inode #12) is invalid.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (9.1% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_invalid_extent_symlink/expect.2 b/tests/f_invalid_extent_symlink/expect.2
new file mode 100644
index 0000000..41ceefb
--- /dev/null
+++ b/tests/f_invalid_extent_symlink/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_invalid_extent_symlink/image.gz b/tests/f_invalid_extent_symlink/image.gz
new file mode 100644
index 0000000..d4a6eef
--- /dev/null
+++ b/tests/f_invalid_extent_symlink/image.gz
Binary files differ
diff --git a/tests/f_invalid_extent_symlink/name b/tests/f_invalid_extent_symlink/name
new file mode 100644
index 0000000..3792aac
--- /dev/null
+++ b/tests/f_invalid_extent_symlink/name
@@ -0,0 +1 @@
+extent-mapped symlink with two blocks
diff --git a/tests/f_itable_collision/expect.1 b/tests/f_itable_collision/expect.1
new file mode 100644
index 0000000..01c85d4
--- /dev/null
+++ b/tests/f_itable_collision/expect.1
@@ -0,0 +1,93 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 block 37 conflicts with critical metadata, skipping block checks.
+Illegal block number passed to ext2fs_test_block_bitmap #268435455 for in-use block map
+Illegal block number passed to ext2fs_mark_block_bitmap #268435455 for in-use block map
+Inode 12, i_blocks is 48, should be 56. Fix? yes
+
+Inode 13 has a bad extended attribute block 34. Clear? yes
+
+Deleted inode 33 has zero dtime. Fix? yes
+
+Inodes that were part of a corrupted orphan linked list found. Fix? yes
+
+Inode 49 was part of the orphaned inode list. FIXED.
+Inode 14 block 36 conflicts with critical metadata, skipping block checks.
+Inode 14 has illegal block(s). Clear? yes
+
+Illegal indirect block (4294967295) in inode 14. CLEARED.
+Illegal indirect block (4294967295) in inode 14. CLEARED.
+Illegal indirect block (4294967295) in inode 14. CLEARED.
+Illegal indirect block (4294967295) in inode 14. CLEARED.
+Illegal indirect block (4294967295) in inode 14. CLEARED.
+Illegal indirect block (4294967295) in inode 14. CLEARED.
+Illegal indirect block (4294967295) in inode 14. CLEARED.
+Too many illegal blocks in inode 14.
+Clear inode? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 block 37 conflicts with critical metadata, skipping block checks.
+Illegal block number passed to ext2fs_test_block_bitmap #4294967294 for in-use block map
+Illegal block number passed to ext2fs_mark_block_bitmap #4294967294 for in-use block map
+Illegal block number passed to ext2fs_test_block_bitmap #268435455 for in-use block map
+Illegal block number passed to ext2fs_mark_block_bitmap #268435455 for in-use block map
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Illegal block number passed to ext2fs_test_block_bitmap #4294967294 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #268435455 for multiply claimed block map
+Multiply-claimed block(s) in inode 12: 37
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 1 inodes containing multiply-claimed blocks.)
+
+File /a (inode #12, mod time Fri Jun 27 18:34:44 2014)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ <filesystem metadata>
+Clone multiply-claimed blocks? yes
+
+Illegal block number passed to ext2fs_test_block_bitmap #4294967294 for multiply claimed block map
+Illegal block number passed to ext2fs_test_block_bitmap #268435455 for multiply claimed block map
+Pass 2: Checking directory structure
+Setting filetype for entry 'bad1' in / (2) to 1.
+Setting filetype for entry 'bad2' in / (2) to 1.
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 4294967294, len 1)
+Clear? yes
+
+Inode 12 has an invalid extent
+ (logical block 5, invalid physical block 268435455, len 1)
+Clear? yes
+
+Inode 12, i_blocks is 56, should be 40. Fix? yes
+
+Pass 2: Checking directory structure
+Entry 'b' in / (2) has deleted/unused inode 14. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -9 -13 -42
+Fix? yes
+
+Free blocks count wrong for group #0 (485, counted=488).
+Fix? yes
+
+Free blocks count wrong (485, counted=488).
+Fix? yes
+
+Inode bitmap differences: -14 +34 +50
+Fix? yes
+
+Free inodes count wrong for group #0 (114, counted=113).
+Fix? yes
+
+Free inodes count wrong (114, counted=113).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/128 files (6.7% non-contiguous), 24/512 blocks
+Exit status is 0
diff --git a/tests/f_itable_collision/expect.2 b/tests/f_itable_collision/expect.2
new file mode 100644
index 0000000..4abc600
--- /dev/null
+++ b/tests/f_itable_collision/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/128 files (6.7% non-contiguous), 24/512 blocks
+Exit status is 0
diff --git a/tests/f_itable_collision/image.gz b/tests/f_itable_collision/image.gz
new file mode 100644
index 0000000..6218b14
--- /dev/null
+++ b/tests/f_itable_collision/image.gz
Binary files differ
diff --git a/tests/f_itable_collision/name b/tests/f_itable_collision/name
new file mode 100644
index 0000000..dab3d45
--- /dev/null
+++ b/tests/f_itable_collision/name
@@ -0,0 +1 @@
+collision between IND/extent tree blocks and inode table
diff --git a/tests/f_itable_collision/script b/tests/f_itable_collision/script
new file mode 100755
index 0000000..66abd90
--- /dev/null
+++ b/tests/f_itable_collision/script
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Run this test with a specific time, because we're crosslinking an extent tree
+# block with the inode table. When fsck sets dtime to now, we want "now" to be
+# our preprogrammed value.
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.gz
+E2FSCK_TIME=4294967294
+export E2FSCK_TIME
+
+gzip -d < $IMAGE > $TMPFILE
+
+# Run fsck to fix things?
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi
diff --git a/tests/f_jnl_32bit/expect.0 b/tests/f_jnl_32bit/expect.0
new file mode 100644
index 0000000..b7de48e
--- /dev/null
+++ b/tests/f_jnl_32bit/expect.0
@@ -0,0 +1,567 @@
+Journal starts at block 1, transaction 2
+Found expected sequence 2, type 1 (descriptor block) at block 1
+Dumping descriptor block, sequence 2, at block 1:
+ FS block 2 logged at journal block 2 (flags 0x8)
+Found expected sequence 2, type 2 (commit block) at block 3
+Found expected sequence 3, type 1 (descriptor block) at block 4
+Dumping descriptor block, sequence 3, at block 4:
+ FS block 82 logged at journal block 5 (flags 0x0)
+ FS block 2 logged at journal block 6 (flags 0x2)
+ FS block 99 logged at journal block 7 (flags 0x2)
+ FS block 66 logged at journal block 8 (flags 0x2)
+ FS block 81 logged at journal block 9 (flags 0x2)
+ FS block 98 logged at journal block 10 (flags 0x2)
+ FS block 68 logged at journal block 11 (flags 0x2)
+ FS block 83 logged at journal block 12 (flags 0x2)
+ FS block 354 logged at journal block 13 (flags 0x2)
+ FS block 84 logged at journal block 14 (flags 0x2)
+ FS block 100 logged at journal block 15 (flags 0x2)
+ FS block 97 logged at journal block 16 (flags 0x2)
+ FS block 101 logged at journal block 17 (flags 0x2)
+ FS block 611 logged at journal block 18 (flags 0x2)
+ FS block 102 logged at journal block 19 (flags 0x2)
+ FS block 103 logged at journal block 20 (flags 0x2)
+ FS block 612 logged at journal block 21 (flags 0x2)
+ FS block 104 logged at journal block 22 (flags 0x2)
+ FS block 85 logged at journal block 23 (flags 0x2)
+ FS block 105 logged at journal block 24 (flags 0x2)
+ FS block 86 logged at journal block 25 (flags 0x2)
+ FS block 106 logged at journal block 26 (flags 0x2)
+ FS block 87 logged at journal block 27 (flags 0x2)
+ FS block 107 logged at journal block 28 (flags 0x2)
+ FS block 108 logged at journal block 29 (flags 0x2)
+ FS block 88 logged at journal block 30 (flags 0x2)
+ FS block 109 logged at journal block 31 (flags 0x2)
+ FS block 355 logged at journal block 32 (flags 0x2)
+ FS block 613 logged at journal block 33 (flags 0x2)
+ FS block 110 logged at journal block 34 (flags 0x2)
+ FS block 614 logged at journal block 35 (flags 0x2)
+ FS block 111 logged at journal block 36 (flags 0x2)
+ FS block 615 logged at journal block 37 (flags 0x2)
+ FS block 112 logged at journal block 38 (flags 0x2)
+ FS block 113 logged at journal block 39 (flags 0x2)
+ FS block 616 logged at journal block 40 (flags 0x2)
+ FS block 89 logged at journal block 41 (flags 0x2)
+ FS block 114 logged at journal block 42 (flags 0x2)
+ FS block 90 logged at journal block 43 (flags 0x2)
+ FS block 115 logged at journal block 44 (flags 0x2)
+ FS block 91 logged at journal block 45 (flags 0x2)
+ FS block 116 logged at journal block 46 (flags 0x2)
+ FS block 92 logged at journal block 47 (flags 0x2)
+ FS block 117 logged at journal block 48 (flags 0x2)
+ FS block 118 logged at journal block 49 (flags 0x2)
+ FS block 356 logged at journal block 50 (flags 0x2)
+ FS block 93 logged at journal block 51 (flags 0x2)
+ FS block 119 logged at journal block 52 (flags 0x2)
+ FS block 94 logged at journal block 53 (flags 0x2)
+ FS block 120 logged at journal block 54 (flags 0x2)
+ FS block 95 logged at journal block 55 (flags 0x2)
+ FS block 121 logged at journal block 56 (flags 0x2)
+ FS block 96 logged at journal block 57 (flags 0x2)
+ FS block 122 logged at journal block 58 (flags 0x2)
+ FS block 123 logged at journal block 59 (flags 0x2)
+ FS block 617 logged at journal block 60 (flags 0x2)
+ FS block 124 logged at journal block 61 (flags 0x2)
+ FS block 618 logged at journal block 62 (flags 0x2)
+ FS block 125 logged at journal block 63 (flags 0x2)
+ FS block 619 logged at journal block 64 (flags 0x2)
+ FS block 126 logged at journal block 65 (flags 0x2)
+ FS block 620 logged at journal block 66 (flags 0x2)
+ FS block 357 logged at journal block 67 (flags 0x2)
+ FS block 621 logged at journal block 68 (flags 0x2)
+ FS block 127 logged at journal block 69 (flags 0x2)
+ FS block 128 logged at journal block 70 (flags 0x2)
+ FS block 622 logged at journal block 71 (flags 0x2)
+ FS block 129 logged at journal block 72 (flags 0x2)
+ FS block 623 logged at journal block 73 (flags 0x2)
+ FS block 130 logged at journal block 74 (flags 0x2)
+ FS block 624 logged at journal block 75 (flags 0x2)
+ FS block 131 logged at journal block 76 (flags 0x2)
+ FS block 625 logged at journal block 77 (flags 0x2)
+ FS block 132 logged at journal block 78 (flags 0x2)
+ FS block 133 logged at journal block 79 (flags 0x2)
+ FS block 626 logged at journal block 80 (flags 0x2)
+ FS block 134 logged at journal block 81 (flags 0x2)
+ FS block 627 logged at journal block 82 (flags 0x2)
+ FS block 135 logged at journal block 83 (flags 0x2)
+ FS block 628 logged at journal block 84 (flags 0x2)
+ FS block 136 logged at journal block 85 (flags 0x2)
+ FS block 358 logged at journal block 86 (flags 0x2)
+ FS block 629 logged at journal block 87 (flags 0x2)
+ FS block 137 logged at journal block 88 (flags 0xa)
+Found expected sequence 3, type 1 (descriptor block) at block 89
+Dumping descriptor block, sequence 3, at block 89:
+ FS block 138 logged at journal block 90 (flags 0x0)
+ FS block 630 logged at journal block 91 (flags 0x2)
+ FS block 139 logged at journal block 92 (flags 0x2)
+ FS block 631 logged at journal block 93 (flags 0x2)
+ FS block 140 logged at journal block 94 (flags 0x2)
+ FS block 632 logged at journal block 95 (flags 0x2)
+ FS block 633 logged at journal block 96 (flags 0x2)
+ FS block 141 logged at journal block 97 (flags 0x2)
+ FS block 634 logged at journal block 98 (flags 0x2)
+ FS block 142 logged at journal block 99 (flags 0x2)
+ FS block 143 logged at journal block 100 (flags 0x2)
+ FS block 635 logged at journal block 101 (flags 0x2)
+ FS block 144 logged at journal block 102 (flags 0x2)
+ FS block 636 logged at journal block 103 (flags 0x2)
+ FS block 145 logged at journal block 104 (flags 0x2)
+ FS block 359 logged at journal block 105 (flags 0x2)
+ FS block 637 logged at journal block 106 (flags 0x2)
+ FS block 146 logged at journal block 107 (flags 0x2)
+ FS block 638 logged at journal block 108 (flags 0x2)
+ FS block 147 logged at journal block 109 (flags 0x2)
+ FS block 148 logged at journal block 110 (flags 0x2)
+ FS block 639 logged at journal block 111 (flags 0x2)
+ FS block 149 logged at journal block 112 (flags 0x2)
+ FS block 640 logged at journal block 113 (flags 0x2)
+ FS block 150 logged at journal block 114 (flags 0x2)
+ FS block 641 logged at journal block 115 (flags 0x2)
+ FS block 151 logged at journal block 116 (flags 0x2)
+ FS block 642 logged at journal block 117 (flags 0x2)
+ FS block 152 logged at journal block 118 (flags 0x2)
+ FS block 153 logged at journal block 119 (flags 0x2)
+ FS block 643 logged at journal block 120 (flags 0x2)
+ FS block 154 logged at journal block 121 (flags 0x2)
+ FS block 644 logged at journal block 122 (flags 0x2)
+ FS block 360 logged at journal block 123 (flags 0x2)
+ FS block 645 logged at journal block 124 (flags 0x2)
+ FS block 155 logged at journal block 125 (flags 0x2)
+ FS block 646 logged at journal block 126 (flags 0x2)
+ FS block 156 logged at journal block 127 (flags 0x2)
+ FS block 647 logged at journal block 128 (flags 0x2)
+ FS block 157 logged at journal block 129 (flags 0x2)
+ FS block 158 logged at journal block 130 (flags 0x2)
+ FS block 648 logged at journal block 131 (flags 0x2)
+ FS block 159 logged at journal block 132 (flags 0x2)
+ FS block 649 logged at journal block 133 (flags 0x2)
+ FS block 160 logged at journal block 134 (flags 0x2)
+ FS block 650 logged at journal block 135 (flags 0x2)
+ FS block 161 logged at journal block 136 (flags 0x2)
+ FS block 651 logged at journal block 137 (flags 0x2)
+ FS block 162 logged at journal block 138 (flags 0x2)
+ FS block 163 logged at journal block 139 (flags 0x2)
+ FS block 652 logged at journal block 140 (flags 0x2)
+ FS block 164 logged at journal block 141 (flags 0x2)
+ FS block 361 logged at journal block 142 (flags 0x2)
+ FS block 653 logged at journal block 143 (flags 0x2)
+ FS block 165 logged at journal block 144 (flags 0x2)
+ FS block 654 logged at journal block 145 (flags 0x2)
+ FS block 166 logged at journal block 146 (flags 0x2)
+ FS block 655 logged at journal block 147 (flags 0x2)
+ FS block 167 logged at journal block 148 (flags 0x2)
+ FS block 168 logged at journal block 149 (flags 0x2)
+ FS block 656 logged at journal block 150 (flags 0x2)
+ FS block 657 logged at journal block 151 (flags 0x2)
+ FS block 169 logged at journal block 152 (flags 0x2)
+ FS block 658 logged at journal block 153 (flags 0x2)
+ FS block 170 logged at journal block 154 (flags 0x2)
+ FS block 659 logged at journal block 155 (flags 0x2)
+ FS block 171 logged at journal block 156 (flags 0x2)
+ FS block 660 logged at journal block 157 (flags 0x2)
+ FS block 172 logged at journal block 158 (flags 0x2)
+ FS block 173 logged at journal block 159 (flags 0x2)
+ FS block 362 logged at journal block 160 (flags 0x2)
+ FS block 661 logged at journal block 161 (flags 0x2)
+ FS block 174 logged at journal block 162 (flags 0x2)
+ FS block 662 logged at journal block 163 (flags 0x2)
+ FS block 175 logged at journal block 164 (flags 0x2)
+ FS block 663 logged at journal block 165 (flags 0x2)
+ FS block 176 logged at journal block 166 (flags 0x2)
+ FS block 664 logged at journal block 167 (flags 0x2)
+ FS block 177 logged at journal block 168 (flags 0x2)
+ FS block 178 logged at journal block 169 (flags 0x2)
+ FS block 665 logged at journal block 170 (flags 0x2)
+ FS block 179 logged at journal block 171 (flags 0x2)
+ FS block 666 logged at journal block 172 (flags 0x2)
+ FS block 180 logged at journal block 173 (flags 0xa)
+Found expected sequence 3, type 1 (descriptor block) at block 174
+Dumping descriptor block, sequence 3, at block 174:
+ FS block 667 logged at journal block 175 (flags 0x0)
+ FS block 181 logged at journal block 176 (flags 0x2)
+ FS block 668 logged at journal block 177 (flags 0x2)
+ FS block 363 logged at journal block 178 (flags 0x2)
+ FS block 669 logged at journal block 179 (flags 0x2)
+ FS block 182 logged at journal block 180 (flags 0x2)
+ FS block 183 logged at journal block 181 (flags 0x2)
+ FS block 670 logged at journal block 182 (flags 0x2)
+ FS block 184 logged at journal block 183 (flags 0x2)
+ FS block 671 logged at journal block 184 (flags 0x2)
+ FS block 185 logged at journal block 185 (flags 0x2)
+ FS block 672 logged at journal block 186 (flags 0x2)
+ FS block 186 logged at journal block 187 (flags 0x2)
+ FS block 673 logged at journal block 188 (flags 0x2)
+ FS block 187 logged at journal block 189 (flags 0x2)
+ FS block 188 logged at journal block 190 (flags 0x2)
+ FS block 674 logged at journal block 191 (flags 0x2)
+ FS block 189 logged at journal block 192 (flags 0x2)
+ FS block 675 logged at journal block 193 (flags 0x2)
+ FS block 190 logged at journal block 194 (flags 0x2)
+ FS block 676 logged at journal block 195 (flags 0x2)
+ FS block 191 logged at journal block 196 (flags 0x2)
+ FS block 364 logged at journal block 197 (flags 0x2)
+ FS block 677 logged at journal block 198 (flags 0x2)
+ FS block 192 logged at journal block 199 (flags 0x2)
+ FS block 193 logged at journal block 200 (flags 0x2)
+ FS block 678 logged at journal block 201 (flags 0x2)
+ FS block 194 logged at journal block 202 (flags 0x2)
+ FS block 679 logged at journal block 203 (flags 0x2)
+ FS block 195 logged at journal block 204 (flags 0x2)
+ FS block 680 logged at journal block 205 (flags 0x2)
+ FS block 681 logged at journal block 206 (flags 0x2)
+ FS block 196 logged at journal block 207 (flags 0x2)
+ FS block 682 logged at journal block 208 (flags 0x2)
+ FS block 197 logged at journal block 209 (flags 0x2)
+ FS block 198 logged at journal block 210 (flags 0x2)
+ FS block 683 logged at journal block 211 (flags 0x2)
+ FS block 199 logged at journal block 212 (flags 0x2)
+ FS block 684 logged at journal block 213 (flags 0x2)
+ FS block 200 logged at journal block 214 (flags 0x2)
+ FS block 365 logged at journal block 215 (flags 0x2)
+ FS block 685 logged at journal block 216 (flags 0x2)
+ FS block 201 logged at journal block 217 (flags 0x2)
+ FS block 686 logged at journal block 218 (flags 0x2)
+ FS block 202 logged at journal block 219 (flags 0x2)
+ FS block 203 logged at journal block 220 (flags 0x2)
+ FS block 687 logged at journal block 221 (flags 0xa)
+Found expected sequence 3, type 2 (commit block) at block 222
+Found expected sequence 4, type 1 (descriptor block) at block 223
+Dumping descriptor block, sequence 4, at block 223:
+ FS block 204 logged at journal block 224 (flags 0x0)
+ FS block 687 logged at journal block 225 (flags 0x2)
+ FS block 203 logged at journal block 226 (flags 0x2)
+ FS block 365 logged at journal block 227 (flags 0x2)
+ FS block 2 logged at journal block 228 (flags 0x2)
+ FS block 82 logged at journal block 229 (flags 0x2)
+ FS block 83 logged at journal block 230 (flags 0x2)
+ FS block 66 logged at journal block 231 (flags 0x2)
+ FS block 688 logged at journal block 232 (flags 0x2)
+ FS block 364 logged at journal block 233 (flags 0x2)
+ FS block 680 logged at journal block 234 (flags 0x2)
+ FS block 205 logged at journal block 235 (flags 0x2)
+ FS block 689 logged at journal block 236 (flags 0x2)
+ FS block 206 logged at journal block 237 (flags 0x2)
+ FS block 690 logged at journal block 238 (flags 0x2)
+ FS block 207 logged at journal block 239 (flags 0x2)
+ FS block 208 logged at journal block 240 (flags 0x2)
+ FS block 691 logged at journal block 241 (flags 0x2)
+ FS block 209 logged at journal block 242 (flags 0x2)
+ FS block 692 logged at journal block 243 (flags 0x2)
+ FS block 98 logged at journal block 244 (flags 0x2)
+ FS block 68 logged at journal block 245 (flags 0x2)
+ FS block 366 logged at journal block 246 (flags 0x2)
+ FS block 693 logged at journal block 247 (flags 0x2)
+ FS block 210 logged at journal block 248 (flags 0x2)
+ FS block 694 logged at journal block 249 (flags 0x2)
+ FS block 211 logged at journal block 250 (flags 0x2)
+ FS block 695 logged at journal block 251 (flags 0x2)
+ FS block 212 logged at journal block 252 (flags 0x2)
+ FS block 213 logged at journal block 253 (flags 0x2)
+ FS block 696 logged at journal block 254 (flags 0x2)
+ FS block 214 logged at journal block 255 (flags 0x2)
+ FS block 697 logged at journal block 256 (flags 0x2)
+ FS block 215 logged at journal block 257 (flags 0x2)
+ FS block 698 logged at journal block 258 (flags 0x2)
+ FS block 216 logged at journal block 259 (flags 0x2)
+ FS block 699 logged at journal block 260 (flags 0x2)
+ FS block 217 logged at journal block 261 (flags 0x2)
+ FS block 218 logged at journal block 262 (flags 0x2)
+ FS block 700 logged at journal block 263 (flags 0x2)
+ FS block 219 logged at journal block 264 (flags 0x2)
+ FS block 367 logged at journal block 265 (flags 0x2)
+ FS block 701 logged at journal block 266 (flags 0x2)
+ FS block 220 logged at journal block 267 (flags 0x2)
+ FS block 702 logged at journal block 268 (flags 0x2)
+ FS block 221 logged at journal block 269 (flags 0x2)
+ FS block 703 logged at journal block 270 (flags 0x2)
+ FS block 222 logged at journal block 271 (flags 0x2)
+ FS block 223 logged at journal block 272 (flags 0x2)
+ FS block 704 logged at journal block 273 (flags 0x2)
+ FS block 705 logged at journal block 274 (flags 0x2)
+ FS block 224 logged at journal block 275 (flags 0x2)
+ FS block 706 logged at journal block 276 (flags 0x2)
+ FS block 225 logged at journal block 277 (flags 0x2)
+ FS block 707 logged at journal block 278 (flags 0x2)
+ FS block 226 logged at journal block 279 (flags 0x2)
+ FS block 708 logged at journal block 280 (flags 0x2)
+ FS block 227 logged at journal block 281 (flags 0x2)
+ FS block 228 logged at journal block 282 (flags 0x2)
+ FS block 368 logged at journal block 283 (flags 0x2)
+ FS block 709 logged at journal block 284 (flags 0x2)
+ FS block 229 logged at journal block 285 (flags 0x2)
+ FS block 710 logged at journal block 286 (flags 0x2)
+ FS block 230 logged at journal block 287 (flags 0x2)
+ FS block 711 logged at journal block 288 (flags 0x2)
+ FS block 231 logged at journal block 289 (flags 0x2)
+ FS block 712 logged at journal block 290 (flags 0x2)
+ FS block 232 logged at journal block 291 (flags 0x2)
+ FS block 233 logged at journal block 292 (flags 0x2)
+ FS block 713 logged at journal block 293 (flags 0x2)
+ FS block 234 logged at journal block 294 (flags 0x2)
+ FS block 714 logged at journal block 295 (flags 0x2)
+ FS block 235 logged at journal block 296 (flags 0x2)
+ FS block 715 logged at journal block 297 (flags 0x2)
+ FS block 236 logged at journal block 298 (flags 0x2)
+ FS block 716 logged at journal block 299 (flags 0x2)
+ FS block 369 logged at journal block 300 (flags 0x2)
+ FS block 717 logged at journal block 301 (flags 0x2)
+ FS block 237 logged at journal block 302 (flags 0x2)
+ FS block 238 logged at journal block 303 (flags 0x2)
+ FS block 718 logged at journal block 304 (flags 0x2)
+ FS block 239 logged at journal block 305 (flags 0x2)
+ FS block 719 logged at journal block 306 (flags 0x2)
+ FS block 240 logged at journal block 307 (flags 0xa)
+Found expected sequence 4, type 1 (descriptor block) at block 308
+Dumping descriptor block, sequence 4, at block 308:
+ FS block 720 logged at journal block 309 (flags 0x0)
+ FS block 241 logged at journal block 310 (flags 0x2)
+ FS block 721 logged at journal block 311 (flags 0x2)
+ FS block 242 logged at journal block 312 (flags 0x2)
+ FS block 243 logged at journal block 313 (flags 0x2)
+ FS block 722 logged at journal block 314 (flags 0x2)
+ FS block 244 logged at journal block 315 (flags 0x2)
+ FS block 723 logged at journal block 316 (flags 0x2)
+ FS block 245 logged at journal block 317 (flags 0x2)
+ FS block 724 logged at journal block 318 (flags 0x2)
+ FS block 246 logged at journal block 319 (flags 0x2)
+ FS block 370 logged at journal block 320 (flags 0x2)
+ FS block 725 logged at journal block 321 (flags 0x2)
+ FS block 247 logged at journal block 322 (flags 0x2)
+ FS block 248 logged at journal block 323 (flags 0x2)
+ FS block 726 logged at journal block 324 (flags 0x2)
+ FS block 249 logged at journal block 325 (flags 0x2)
+ FS block 727 logged at journal block 326 (flags 0x2)
+ FS block 250 logged at journal block 327 (flags 0xa)
+Found expected sequence 4, type 2 (commit block) at block 328
+Found expected sequence 5, type 5 (revoke table) at block 329
+Dumping revoke block, sequence 5, at block 329:
+ Revoke FS block 640
+ Revoke FS block 641
+ Revoke FS block 642
+ Revoke FS block 643
+ Revoke FS block 644
+ Revoke FS block 645
+ Revoke FS block 646
+ Revoke FS block 647
+ Revoke FS block 648
+ Revoke FS block 649
+ Revoke FS block 650
+ Revoke FS block 651
+ Revoke FS block 652
+ Revoke FS block 653
+ Revoke FS block 654
+ Revoke FS block 655
+ Revoke FS block 656
+ Revoke FS block 657
+ Revoke FS block 81
+ Revoke FS block 658
+ Revoke FS block 659
+ Revoke FS block 660
+ Revoke FS block 84
+ Revoke FS block 661
+ Revoke FS block 85
+ Revoke FS block 662
+ Revoke FS block 86
+ Revoke FS block 663
+ Revoke FS block 87
+ Revoke FS block 664
+ Revoke FS block 88
+ Revoke FS block 665
+ Revoke FS block 89
+ Revoke FS block 666
+ Revoke FS block 90
+ Revoke FS block 667
+ Revoke FS block 91
+ Revoke FS block 668
+ Revoke FS block 92
+ Revoke FS block 669
+ Revoke FS block 93
+ Revoke FS block 670
+ Revoke FS block 94
+ Revoke FS block 671
+ Revoke FS block 95
+ Revoke FS block 672
+ Revoke FS block 96
+ Revoke FS block 673
+ Revoke FS block 97
+ Revoke FS block 674
+ Revoke FS block 675
+ Revoke FS block 611
+ Revoke FS block 676
+ Revoke FS block 612
+ Revoke FS block 677
+ Revoke FS block 613
+ Revoke FS block 678
+ Revoke FS block 614
+ Revoke FS block 679
+ Revoke FS block 615
+ Revoke FS block 616
+ Revoke FS block 617
+ Revoke FS block 682
+ Revoke FS block 618
+ Revoke FS block 683
+ Revoke FS block 619
+ Revoke FS block 684
+ Revoke FS block 620
+ Revoke FS block 685
+ Revoke FS block 621
+ Revoke FS block 622
+ Revoke FS block 687
+ Revoke FS block 623
+ Revoke FS block 688
+ Revoke FS block 624
+ Revoke FS block 689
+ Revoke FS block 625
+ Revoke FS block 690
+ Revoke FS block 626
+ Revoke FS block 691
+ Revoke FS block 627
+ Revoke FS block 628
+ Revoke FS block 629
+ Revoke FS block 630
+ Revoke FS block 631
+ Revoke FS block 632
+ Revoke FS block 633
+ Revoke FS block 634
+ Revoke FS block 635
+ Revoke FS block 636
+ Revoke FS block 637
+ Revoke FS block 638
+ Revoke FS block 639
+Found expected sequence 5, type 1 (descriptor block) at block 330
+Dumping descriptor block, sequence 5, at block 330:
+ FS block 98 logged at journal block 331 (flags 0x0)
+ FS block 99 logged at journal block 332 (flags 0x2)
+ FS block 354 logged at journal block 333 (flags 0x2)
+ FS block 1 logged at journal block 334 (flags 0x2)
+ FS block 105 logged at journal block 335 (flags 0x2)
+ FS block 2 logged at journal block 336 (flags 0x2)
+ FS block 82 logged at journal block 337 (flags 0x2)
+ FS block 104 logged at journal block 338 (flags 0x2)
+ FS block 66 logged at journal block 339 (flags 0x2)
+ FS block 83 logged at journal block 340 (flags 0x2)
+ FS block 355 logged at journal block 341 (flags 0x2)
+ FS block 112 logged at journal block 342 (flags 0x2)
+ FS block 113 logged at journal block 343 (flags 0x2)
+ FS block 102 logged at journal block 344 (flags 0x2)
+ FS block 103 logged at journal block 345 (flags 0x2)
+ FS block 107 logged at journal block 346 (flags 0x2)
+ FS block 108 logged at journal block 347 (flags 0x2)
+ FS block 101 logged at journal block 348 (flags 0x2)
+ FS block 100 logged at journal block 349 (flags 0x2)
+ FS block 110 logged at journal block 350 (flags 0x2)
+ FS block 109 logged at journal block 351 (flags 0x2)
+ FS block 111 logged at journal block 352 (flags 0x2)
+ FS block 106 logged at journal block 353 (flags 0x2)
+ FS block 68 logged at journal block 354 (flags 0x2)
+ FS block 356 logged at journal block 355 (flags 0x2)
+ FS block 119 logged at journal block 356 (flags 0x2)
+ FS block 118 logged at journal block 357 (flags 0x2)
+ FS block 126 logged at journal block 358 (flags 0x2)
+ FS block 125 logged at journal block 359 (flags 0x2)
+ FS block 116 logged at journal block 360 (flags 0x2)
+ FS block 115 logged at journal block 361 (flags 0x2)
+ FS block 117 logged at journal block 362 (flags 0x2)
+ FS block 121 logged at journal block 363 (flags 0x2)
+ FS block 120 logged at journal block 364 (flags 0x2)
+ FS block 114 logged at journal block 365 (flags 0x2)
+ FS block 124 logged at journal block 366 (flags 0x2)
+ FS block 123 logged at journal block 367 (flags 0x2)
+ FS block 122 logged at journal block 368 (flags 0x2)
+ FS block 357 logged at journal block 369 (flags 0x2)
+ FS block 132 logged at journal block 370 (flags 0x2)
+ FS block 133 logged at journal block 371 (flags 0x2)
+ FS block 358 logged at journal block 372 (flags 0x2)
+ FS block 140 logged at journal block 373 (flags 0x2)
+ FS block 139 logged at journal block 374 (flags 0x2)
+ FS block 130 logged at journal block 375 (flags 0x2)
+ FS block 129 logged at journal block 376 (flags 0x2)
+ FS block 131 logged at journal block 377 (flags 0x2)
+ FS block 135 logged at journal block 378 (flags 0x2)
+ FS block 134 logged at journal block 379 (flags 0x2)
+ FS block 128 logged at journal block 380 (flags 0x2)
+ FS block 137 logged at journal block 381 (flags 0x2)
+ FS block 138 logged at journal block 382 (flags 0x2)
+ FS block 136 logged at journal block 383 (flags 0x2)
+ FS block 127 logged at journal block 384 (flags 0x2)
+ FS block 359 logged at journal block 385 (flags 0x2)
+ FS block 146 logged at journal block 386 (flags 0x2)
+ FS block 145 logged at journal block 387 (flags 0x2)
+ FS block 154 logged at journal block 388 (flags 0x2)
+ FS block 153 logged at journal block 389 (flags 0x2)
+ FS block 144 logged at journal block 390 (flags 0x2)
+ FS block 143 logged at journal block 391 (flags 0x2)
+ FS block 149 logged at journal block 392 (flags 0x2)
+ FS block 148 logged at journal block 393 (flags 0x2)
+ FS block 142 logged at journal block 394 (flags 0x2)
+ FS block 151 logged at journal block 395 (flags 0x2)
+ FS block 150 logged at journal block 396 (flags 0x2)
+ FS block 152 logged at journal block 397 (flags 0x2)
+ FS block 141 logged at journal block 398 (flags 0x2)
+ FS block 147 logged at journal block 399 (flags 0x2)
+ FS block 360 logged at journal block 400 (flags 0x2)
+ FS block 160 logged at journal block 401 (flags 0x2)
+ FS block 159 logged at journal block 402 (flags 0x2)
+ FS block 361 logged at journal block 403 (flags 0x2)
+ FS block 167 logged at journal block 404 (flags 0x2)
+ FS block 168 logged at journal block 405 (flags 0x2)
+ FS block 157 logged at journal block 406 (flags 0x2)
+ FS block 158 logged at journal block 407 (flags 0x2)
+ FS block 162 logged at journal block 408 (flags 0x2)
+ FS block 163 logged at journal block 409 (flags 0x2)
+ FS block 156 logged at journal block 410 (flags 0x2)
+ FS block 155 logged at journal block 411 (flags 0x2)
+ FS block 165 logged at journal block 412 (flags 0x2)
+ FS block 164 logged at journal block 413 (flags 0x2)
+ FS block 166 logged at journal block 414 (flags 0xa)
+Found expected sequence 5, type 1 (descriptor block) at block 415
+Dumping descriptor block, sequence 5, at block 415:
+ FS block 161 logged at journal block 416 (flags 0x0)
+ FS block 362 logged at journal block 417 (flags 0x2)
+ FS block 174 logged at journal block 418 (flags 0x2)
+ FS block 173 logged at journal block 419 (flags 0x2)
+ FS block 181 logged at journal block 420 (flags 0x2)
+ FS block 180 logged at journal block 421 (flags 0x2)
+ FS block 171 logged at journal block 422 (flags 0x2)
+ FS block 170 logged at journal block 423 (flags 0x2)
+ FS block 172 logged at journal block 424 (flags 0x2)
+ FS block 176 logged at journal block 425 (flags 0x2)
+ FS block 175 logged at journal block 426 (flags 0x2)
+ FS block 169 logged at journal block 427 (flags 0x2)
+ FS block 179 logged at journal block 428 (flags 0x2)
+ FS block 178 logged at journal block 429 (flags 0x2)
+ FS block 177 logged at journal block 430 (flags 0x2)
+ FS block 363 logged at journal block 431 (flags 0x2)
+ FS block 187 logged at journal block 432 (flags 0x2)
+ FS block 188 logged at journal block 433 (flags 0x2)
+ FS block 364 logged at journal block 434 (flags 0x2)
+ FS block 195 logged at journal block 435 (flags 0x2)
+ FS block 194 logged at journal block 436 (flags 0x2)
+ FS block 185 logged at journal block 437 (flags 0x2)
+ FS block 184 logged at journal block 438 (flags 0x2)
+ FS block 186 logged at journal block 439 (flags 0x2)
+ FS block 190 logged at journal block 440 (flags 0x2)
+ FS block 189 logged at journal block 441 (flags 0x2)
+ FS block 183 logged at journal block 442 (flags 0x2)
+ FS block 192 logged at journal block 443 (flags 0x2)
+ FS block 193 logged at journal block 444 (flags 0x2)
+ FS block 191 logged at journal block 445 (flags 0x2)
+ FS block 182 logged at journal block 446 (flags 0x2)
+ FS block 365 logged at journal block 447 (flags 0x2)
+ FS block 201 logged at journal block 448 (flags 0x2)
+ FS block 200 logged at journal block 449 (flags 0x2)
+ FS block 680 logged at journal block 450 (flags 0x2)
+ FS block 209 logged at journal block 451 (flags 0x2)
+ FS block 208 logged at journal block 452 (flags 0x2)
+ FS block 199 logged at journal block 453 (flags 0x2)
+ FS block 198 logged at journal block 454 (flags 0x2)
+ FS block 204 logged at journal block 455 (flags 0x2)
+ FS block 203 logged at journal block 456 (flags 0x2)
+ FS block 197 logged at journal block 457 (flags 0x2)
+ FS block 206 logged at journal block 458 (flags 0x2)
+ FS block 205 logged at journal block 459 (flags 0x2)
+ FS block 207 logged at journal block 460 (flags 0x2)
+ FS block 681 logged at journal block 461 (flags 0x2)
+ FS block 196 logged at journal block 462 (flags 0xa)
+Found expected sequence 5, type 2 (commit block) at block 463
+No magic number at block 464: end of journal.
diff --git a/tests/f_jnl_32bit/expect.1 b/tests/f_jnl_32bit/expect.1
new file mode 100644
index 0000000..56aab48
--- /dev/null
+++ b/tests/f_jnl_32bit/expect.1
@@ -0,0 +1,16 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong (14699, counted=14660).
+Fix? yes
+
+Free inodes count wrong (4085, counted=3697).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 399/4096 files (0.0% non-contiguous), 1724/16384 blocks
+Exit status is 1
diff --git a/tests/f_jnl_32bit/expect.2 b/tests/f_jnl_32bit/expect.2
new file mode 100644
index 0000000..be948d2
--- /dev/null
+++ b/tests/f_jnl_32bit/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 399/4096 files (0.0% non-contiguous), 1724/16384 blocks
+Exit status is 0
diff --git a/tests/f_jnl_32bit/image.gz b/tests/f_jnl_32bit/image.gz
new file mode 100644
index 0000000..b308102
--- /dev/null
+++ b/tests/f_jnl_32bit/image.gz
Binary files differ
diff --git a/tests/f_jnl_32bit/name b/tests/f_jnl_32bit/name
new file mode 100644
index 0000000..60e9913
--- /dev/null
+++ b/tests/f_jnl_32bit/name
@@ -0,0 +1 @@
+on-disk 32-bit journal format
diff --git a/tests/f_jnl_32bit/script b/tests/f_jnl_32bit/script
new file mode 100644
index 0000000..9fb4366
--- /dev/null
+++ b/tests/f_jnl_32bit/script
@@ -0,0 +1,4 @@
+PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
+PASS_ZERO=true
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_jnl_64bit/expect.0 b/tests/f_jnl_64bit/expect.0
new file mode 100644
index 0000000..5cef2d8
--- /dev/null
+++ b/tests/f_jnl_64bit/expect.0
@@ -0,0 +1,757 @@
+Journal starts at block 67, transaction 32
+Found expected sequence 32, type 5 (revoke table) at block 67
+Dumping revoke block, sequence 32, at block 67:
+ Revoke FS block 1536
+ Revoke FS block 1472
+ Revoke FS block 1473
+ Revoke FS block 1474
+ Revoke FS block 1475
+ Revoke FS block 1476
+ Revoke FS block 1541
+ Revoke FS block 1477
+ Revoke FS block 1478
+ Revoke FS block 1479
+ Revoke FS block 1480
+ Revoke FS block 1481
+ Revoke FS block 1482
+ Revoke FS block 1483
+ Revoke FS block 1484
+ Revoke FS block 1485
+ Revoke FS block 1486
+ Revoke FS block 1487
+ Revoke FS block 1488
+ Revoke FS block 1489
+ Revoke FS block 1490
+ Revoke FS block 1491
+ Revoke FS block 1556
+ Revoke FS block 1492
+ Revoke FS block 1493
+ Revoke FS block 1429
+ Revoke FS block 1494
+ Revoke FS block 1495
+ Revoke FS block 1496
+ Revoke FS block 1432
+ Revoke FS block 1497
+ Revoke FS block 1498
+ Revoke FS block 1434
+ Revoke FS block 1499
+ Revoke FS block 1435
+ Revoke FS block 1500
+ Revoke FS block 1501
+ Revoke FS block 1502
+ Revoke FS block 1503
+ Revoke FS block 1504
+ Revoke FS block 1505
+ Revoke FS block 1506
+ Revoke FS block 1442
+ Revoke FS block 1507
+ Revoke FS block 1508
+ Revoke FS block 1444
+ Revoke FS block 1509
+ Revoke FS block 1445
+ Revoke FS block 1510
+ Revoke FS block 1511
+ Revoke FS block 1512
+ Revoke FS block 1513
+ Revoke FS block 1449
+ Revoke FS block 1514
+ Revoke FS block 1515
+ Revoke FS block 1516
+ Revoke FS block 1517
+ Revoke FS block 1453
+ Revoke FS block 1518
+ Revoke FS block 1519
+ Revoke FS block 1520
+ Revoke FS block 1456
+ Revoke FS block 1521
+ Revoke FS block 1457
+ Revoke FS block 1522
+ Revoke FS block 1458
+ Revoke FS block 1523
+ Revoke FS block 1459
+ Revoke FS block 1524
+ Revoke FS block 1460
+ Revoke FS block 1525
+ Revoke FS block 1461
+ Revoke FS block 1526
+ Revoke FS block 1462
+ Revoke FS block 1527
+ Revoke FS block 1463
+ Revoke FS block 1528
+ Revoke FS block 1464
+ Revoke FS block 1529
+ Revoke FS block 1465
+ Revoke FS block 1530
+ Revoke FS block 1466
+ Revoke FS block 1531
+ Revoke FS block 1467
+ Revoke FS block 1532
+ Revoke FS block 1468
+ Revoke FS block 1533
+ Revoke FS block 1469
+ Revoke FS block 1534
+ Revoke FS block 1470
+ Revoke FS block 1535
+ Revoke FS block 1471
+Found expected sequence 32, type 1 (descriptor block) at block 68
+Dumping descriptor block, sequence 32, at block 68:
+ FS block 802 logged at journal block 69 (flags 0x0)
+ FS block 803 logged at journal block 70 (flags 0x2)
+ FS block 131 logged at journal block 71 (flags 0x2)
+ FS block 2 logged at journal block 72 (flags 0x2)
+ FS block 1 logged at journal block 73 (flags 0x2)
+ FS block 147 logged at journal block 74 (flags 0x2)
+ FS block 783 logged at journal block 75 (flags 0x2)
+ FS block 130 logged at journal block 76 (flags 0x2)
+ FS block 807 logged at journal block 77 (flags 0x2)
+ FS block 808 logged at journal block 78 (flags 0x2)
+ FS block 788 logged at journal block 79 (flags 0x2)
+ FS block 789 logged at journal block 80 (flags 0x2)
+ FS block 785 logged at journal block 81 (flags 0x2)
+ FS block 786 logged at journal block 82 (flags 0x2)
+ FS block 787 logged at journal block 83 (flags 0x2)
+ FS block 798 logged at journal block 84 (flags 0x2)
+ FS block 799 logged at journal block 85 (flags 0x2)
+ FS block 800 logged at journal block 86 (flags 0x2)
+ FS block 801 logged at journal block 87 (flags 0x2)
+ FS block 812 logged at journal block 88 (flags 0x2)
+ FS block 813 logged at journal block 89 (flags 0x2)
+ FS block 790 logged at journal block 90 (flags 0x2)
+ FS block 132 logged at journal block 91 (flags 0x2)
+ FS block 162 logged at journal block 92 (flags 0x2)
+ FS block 815 logged at journal block 93 (flags 0x2)
+ FS block 819 logged at journal block 94 (flags 0x2)
+ FS block 820 logged at journal block 95 (flags 0x2)
+ FS block 838 logged at journal block 96 (flags 0x2)
+ FS block 839 logged at journal block 97 (flags 0x2)
+ FS block 836 logged at journal block 98 (flags 0x2)
+ FS block 837 logged at journal block 99 (flags 0x2)
+ FS block 829 logged at journal block 100 (flags 0x2)
+ FS block 830 logged at journal block 101 (flags 0x2)
+ FS block 823 logged at journal block 102 (flags 0x2)
+ FS block 824 logged at journal block 103 (flags 0x2)
+ FS block 826 logged at journal block 104 (flags 0x2)
+ FS block 827 logged at journal block 105 (flags 0x2)
+ FS block 817 logged at journal block 106 (flags 0x2)
+ FS block 818 logged at journal block 107 (flags 0x2)
+ FS block 828 logged at journal block 108 (flags 0x2)
+ FS block 816 logged at journal block 109 (flags 0x2)
+ FS block 841 logged at journal block 110 (flags 0x2)
+ FS block 842 logged at journal block 111 (flags 0x2)
+ FS block 832 logged at journal block 112 (flags 0x2)
+ FS block 833 logged at journal block 113 (flags 0x2)
+ FS block 843 logged at journal block 114 (flags 0x2)
+ FS block 846 logged at journal block 115 (flags 0x2)
+ FS block 847 logged at journal block 116 (flags 0x2)
+ FS block 825 logged at journal block 117 (flags 0x2)
+ FS block 848 logged at journal block 118 (flags 0x2)
+ FS block 844 logged at journal block 119 (flags 0x2)
+ FS block 834 logged at journal block 120 (flags 0x2)
+ FS block 835 logged at journal block 121 (flags 0x2)
+ FS block 840 logged at journal block 122 (flags 0x2)
+ FS block 821 logged at journal block 123 (flags 0x2)
+ FS block 822 logged at journal block 124 (flags 0x2)
+ FS block 831 logged at journal block 125 (flags 0x2)
+ FS block 845 logged at journal block 126 (flags 0x2)
+ FS block 852 logged at journal block 127 (flags 0x2)
+ FS block 853 logged at journal block 128 (flags 0x2)
+ FS block 871 logged at journal block 129 (flags 0x2)
+ FS block 872 logged at journal block 130 (flags 0x2)
+ FS block 868 logged at journal block 131 (flags 0x2)
+ FS block 869 logged at journal block 132 (flags 0x2)
+ FS block 870 logged at journal block 133 (flags 0x2)
+ FS block 862 logged at journal block 134 (flags 0x2)
+ FS block 863 logged at journal block 135 (flags 0x2)
+ FS block 856 logged at journal block 136 (flags 0x2)
+ FS block 857 logged at journal block 137 (flags 0x2)
+ FS block 858 logged at journal block 138 (flags 0x2)
+ FS block 859 logged at journal block 139 (flags 0x2)
+ FS block 849 logged at journal block 140 (flags 0x2)
+ FS block 850 logged at journal block 141 (flags 0x2)
+ FS block 851 logged at journal block 142 (flags 0x2)
+ FS block 860 logged at journal block 143 (flags 0x2)
+ FS block 861 logged at journal block 144 (flags 0x2)
+ FS block 873 logged at journal block 145 (flags 0x2)
+ FS block 874 logged at journal block 146 (flags 0x2)
+ FS block 864 logged at journal block 147 (flags 0x2)
+ FS block 865 logged at journal block 148 (flags 0x2)
+ FS block 866 logged at journal block 149 (flags 0xa)
+Found expected sequence 32, type 1 (descriptor block) at block 150
+Dumping descriptor block, sequence 32, at block 150:
+ FS block 875 logged at journal block 151 (flags 0x0)
+ FS block 876 logged at journal block 152 (flags 0x2)
+ FS block 878 logged at journal block 153 (flags 0x2)
+ FS block 879 logged at journal block 154 (flags 0x2)
+ FS block 880 logged at journal block 155 (flags 0x2)
+ FS block 881 logged at journal block 156 (flags 0x2)
+ FS block 877 logged at journal block 157 (flags 0x2)
+ FS block 867 logged at journal block 158 (flags 0x2)
+ FS block 854 logged at journal block 159 (flags 0x2)
+ FS block 855 logged at journal block 160 (flags 0x2)
+ FS block 885 logged at journal block 161 (flags 0x2)
+ FS block 886 logged at journal block 162 (flags 0x2)
+ FS block 903 logged at journal block 163 (flags 0x2)
+ FS block 904 logged at journal block 164 (flags 0x2)
+ FS block 901 logged at journal block 165 (flags 0x2)
+ FS block 902 logged at journal block 166 (flags 0x2)
+ FS block 895 logged at journal block 167 (flags 0x2)
+ FS block 896 logged at journal block 168 (flags 0x2)
+ FS block 888 logged at journal block 169 (flags 0x2)
+ FS block 889 logged at journal block 170 (flags 0x2)
+ FS block 891 logged at journal block 171 (flags 0x2)
+ FS block 892 logged at journal block 172 (flags 0x2)
+ FS block 882 logged at journal block 173 (flags 0x2)
+ FS block 883 logged at journal block 174 (flags 0x2)
+ FS block 893 logged at journal block 175 (flags 0x2)
+ FS block 906 logged at journal block 176 (flags 0x2)
+ FS block 907 logged at journal block 177 (flags 0x2)
+ FS block 897 logged at journal block 178 (flags 0x2)
+ FS block 898 logged at journal block 179 (flags 0x2)
+ FS block 908 logged at journal block 180 (flags 0x2)
+ FS block 911 logged at journal block 181 (flags 0x2)
+ FS block 912 logged at journal block 182 (flags 0x2)
+ FS block 890 logged at journal block 183 (flags 0x2)
+ FS block 913 logged at journal block 184 (flags 0x2)
+ FS block 894 logged at journal block 185 (flags 0x2)
+ FS block 909 logged at journal block 186 (flags 0x2)
+ FS block 900 logged at journal block 187 (flags 0x2)
+ FS block 905 logged at journal block 188 (flags 0x2)
+ FS block 887 logged at journal block 189 (flags 0x2)
+ FS block 884 logged at journal block 190 (flags 0x2)
+ FS block 899 logged at journal block 191 (flags 0x2)
+ FS block 910 logged at journal block 192 (flags 0x2)
+ FS block 917 logged at journal block 193 (flags 0x2)
+ FS block 918 logged at journal block 194 (flags 0x2)
+ FS block 1537 logged at journal block 195 (flags 0x2)
+ FS block 936 logged at journal block 196 (flags 0x2)
+ FS block 937 logged at journal block 197 (flags 0x2)
+ FS block 933 logged at journal block 198 (flags 0x2)
+ FS block 1554 logged at journal block 199 (flags 0x2)
+ FS block 934 logged at journal block 200 (flags 0xa)
+Found expected sequence 32, type 2 (commit block) at block 201
+Found expected sequence 33, type 5 (revoke table) at block 202
+Dumping revoke block, sequence 33, at block 202:
+ Revoke FS block 1600
+ Revoke FS block 1601
+ Revoke FS block 1537
+ Revoke FS block 1602
+ Revoke FS block 1538
+ Revoke FS block 1603
+ Revoke FS block 1539
+ Revoke FS block 1604
+ Revoke FS block 1540
+ Revoke FS block 1605
+ Revoke FS block 1606
+ Revoke FS block 1542
+ Revoke FS block 1607
+ Revoke FS block 1543
+ Revoke FS block 1608
+ Revoke FS block 1544
+ Revoke FS block 1609
+ Revoke FS block 1545
+ Revoke FS block 1610
+ Revoke FS block 1546
+ Revoke FS block 1611
+ Revoke FS block 1547
+ Revoke FS block 1612
+ Revoke FS block 1548
+ Revoke FS block 1613
+ Revoke FS block 1549
+ Revoke FS block 1614
+ Revoke FS block 1550
+ Revoke FS block 1615
+ Revoke FS block 1551
+ Revoke FS block 1616
+ Revoke FS block 1552
+ Revoke FS block 1617
+ Revoke FS block 1553
+ Revoke FS block 1554
+ Revoke FS block 1555
+ Revoke FS block 1557
+ Revoke FS block 1558
+ Revoke FS block 1559
+ Revoke FS block 1560
+ Revoke FS block 1561
+ Revoke FS block 1562
+ Revoke FS block 1563
+ Revoke FS block 1564
+ Revoke FS block 1565
+ Revoke FS block 1566
+ Revoke FS block 1567
+ Revoke FS block 1568
+ Revoke FS block 1569
+ Revoke FS block 1570
+ Revoke FS block 1571
+ Revoke FS block 1572
+ Revoke FS block 1573
+ Revoke FS block 1574
+ Revoke FS block 1575
+ Revoke FS block 1576
+ Revoke FS block 1577
+ Revoke FS block 1578
+ Revoke FS block 1579
+ Revoke FS block 1580
+ Revoke FS block 1581
+ Revoke FS block 1582
+ Revoke FS block 1583
+ Revoke FS block 1584
+ Revoke FS block 1585
+ Revoke FS block 1586
+ Revoke FS block 1587
+ Revoke FS block 1588
+ Revoke FS block 1589
+ Revoke FS block 1590
+ Revoke FS block 1591
+ Revoke FS block 1592
+ Revoke FS block 1593
+ Revoke FS block 1594
+ Revoke FS block 1595
+ Revoke FS block 1596
+ Revoke FS block 1597
+ Revoke FS block 1598
+ Revoke FS block 1599
+Found expected sequence 33, type 1 (descriptor block) at block 203
+Dumping descriptor block, sequence 33, at block 203:
+ FS block 933 logged at journal block 204 (flags 0x0)
+ FS block 1 logged at journal block 205 (flags 0x2)
+ FS block 935 logged at journal block 206 (flags 0x2)
+ FS block 131 logged at journal block 207 (flags 0x2)
+ FS block 2 logged at journal block 208 (flags 0x2)
+ FS block 147 logged at journal block 209 (flags 0x2)
+ FS block 934 logged at journal block 210 (flags 0x2)
+ FS block 913 logged at journal block 211 (flags 0x2)
+ FS block 130 logged at journal block 212 (flags 0x2)
+ FS block 936 logged at journal block 213 (flags 0x2)
+ FS block 927 logged at journal block 214 (flags 0x2)
+ FS block 928 logged at journal block 215 (flags 0x2)
+ FS block 921 logged at journal block 216 (flags 0x2)
+ FS block 922 logged at journal block 217 (flags 0x2)
+ FS block 923 logged at journal block 218 (flags 0x2)
+ FS block 924 logged at journal block 219 (flags 0x2)
+ FS block 925 logged at journal block 220 (flags 0x2)
+ FS block 915 logged at journal block 221 (flags 0x2)
+ FS block 916 logged at journal block 222 (flags 0x2)
+ FS block 926 logged at journal block 223 (flags 0x2)
+ FS block 914 logged at journal block 224 (flags 0x2)
+ FS block 938 logged at journal block 225 (flags 0x2)
+ FS block 939 logged at journal block 226 (flags 0x2)
+ FS block 940 logged at journal block 227 (flags 0x2)
+ FS block 930 logged at journal block 228 (flags 0x2)
+ FS block 931 logged at journal block 229 (flags 0x2)
+ FS block 941 logged at journal block 230 (flags 0x2)
+ FS block 943 logged at journal block 231 (flags 0x2)
+ FS block 944 logged at journal block 232 (flags 0x2)
+ FS block 945 logged at journal block 233 (flags 0x2)
+ FS block 946 logged at journal block 234 (flags 0x2)
+ FS block 942 logged at journal block 235 (flags 0x2)
+ FS block 932 logged at journal block 236 (flags 0x2)
+ FS block 937 logged at journal block 237 (flags 0x2)
+ FS block 918 logged at journal block 238 (flags 0x2)
+ FS block 919 logged at journal block 239 (flags 0x2)
+ FS block 920 logged at journal block 240 (flags 0x2)
+ FS block 917 logged at journal block 241 (flags 0x2)
+ FS block 929 logged at journal block 242 (flags 0x2)
+ FS block 132 logged at journal block 243 (flags 0x2)
+ FS block 162 logged at journal block 244 (flags 0x2)
+ FS block 950 logged at journal block 245 (flags 0x2)
+ FS block 951 logged at journal block 246 (flags 0x2)
+ FS block 969 logged at journal block 247 (flags 0x2)
+ FS block 970 logged at journal block 248 (flags 0x2)
+ FS block 966 logged at journal block 249 (flags 0x2)
+ FS block 967 logged at journal block 250 (flags 0x2)
+ FS block 968 logged at journal block 251 (flags 0x2)
+ FS block 960 logged at journal block 252 (flags 0x2)
+ FS block 961 logged at journal block 253 (flags 0x2)
+ FS block 954 logged at journal block 254 (flags 0x2)
+ FS block 955 logged at journal block 255 (flags 0x2)
+ FS block 956 logged at journal block 256 (flags 0x2)
+ FS block 957 logged at journal block 257 (flags 0x2)
+ FS block 947 logged at journal block 258 (flags 0x2)
+ FS block 948 logged at journal block 259 (flags 0x2)
+ FS block 958 logged at journal block 260 (flags 0x2)
+ FS block 971 logged at journal block 261 (flags 0x2)
+ FS block 972 logged at journal block 262 (flags 0x2)
+ FS block 962 logged at journal block 263 (flags 0x2)
+ FS block 963 logged at journal block 264 (flags 0x2)
+ FS block 973 logged at journal block 265 (flags 0x2)
+ FS block 976 logged at journal block 266 (flags 0x2)
+ FS block 977 logged at journal block 267 (flags 0x2)
+ FS block 978 logged at journal block 268 (flags 0x2)
+ FS block 959 logged at journal block 269 (flags 0x2)
+ FS block 974 logged at journal block 270 (flags 0x2)
+ FS block 975 logged at journal block 271 (flags 0x2)
+ FS block 965 logged at journal block 272 (flags 0x2)
+ FS block 952 logged at journal block 273 (flags 0x2)
+ FS block 949 logged at journal block 274 (flags 0x2)
+ FS block 964 logged at journal block 275 (flags 0x2)
+ FS block 953 logged at journal block 276 (flags 0x2)
+ FS block 979 logged at journal block 277 (flags 0x2)
+ FS block 982 logged at journal block 278 (flags 0x2)
+ FS block 983 logged at journal block 279 (flags 0x2)
+ FS block 984 logged at journal block 280 (flags 0x2)
+ FS block 1001 logged at journal block 281 (flags 0x2)
+ FS block 1002 logged at journal block 282 (flags 0x2)
+ FS block 999 logged at journal block 283 (flags 0x2)
+ FS block 1000 logged at journal block 284 (flags 0xa)
+Found expected sequence 33, type 1 (descriptor block) at block 285
+Dumping descriptor block, sequence 33, at block 285:
+ FS block 992 logged at journal block 286 (flags 0x0)
+ FS block 993 logged at journal block 287 (flags 0x2)
+ FS block 994 logged at journal block 288 (flags 0x2)
+ FS block 986 logged at journal block 289 (flags 0x2)
+ FS block 987 logged at journal block 290 (flags 0x2)
+ FS block 989 logged at journal block 291 (flags 0x2)
+ FS block 990 logged at journal block 292 (flags 0x2)
+ FS block 980 logged at journal block 293 (flags 0x2)
+ FS block 981 logged at journal block 294 (flags 0x2)
+ FS block 991 logged at journal block 295 (flags 0x2)
+ FS block 1004 logged at journal block 296 (flags 0x2)
+ FS block 1005 logged at journal block 297 (flags 0x2)
+ FS block 995 logged at journal block 298 (flags 0x2)
+ FS block 996 logged at journal block 299 (flags 0x2)
+ FS block 1006 logged at journal block 300 (flags 0x2)
+ FS block 1009 logged at journal block 301 (flags 0x2)
+ FS block 1010 logged at journal block 302 (flags 0x2)
+ FS block 988 logged at journal block 303 (flags 0x2)
+ FS block 1011 logged at journal block 304 (flags 0x2)
+ FS block 1007 logged at journal block 305 (flags 0x2)
+ FS block 997 logged at journal block 306 (flags 0x2)
+ FS block 998 logged at journal block 307 (flags 0x2)
+ FS block 1003 logged at journal block 308 (flags 0x2)
+ FS block 985 logged at journal block 309 (flags 0x2)
+ FS block 1008 logged at journal block 310 (flags 0x2)
+ FS block 146 logged at journal block 311 (flags 0x2)
+ FS block 163 logged at journal block 312 (flags 0x2)
+ FS block 145 logged at journal block 313 (flags 0x2)
+ FS block 148 logged at journal block 314 (flags 0x2)
+ FS block 164 logged at journal block 315 (flags 0x2)
+ FS block 161 logged at journal block 316 (flags 0x2)
+ FS block 165 logged at journal block 317 (flags 0x2)
+ FS block 674 logged at journal block 318 (flags 0x2)
+ FS block 1541 logged at journal block 319 (flags 0x2)
+ FS block 166 logged at journal block 320 (flags 0x2)
+ FS block 167 logged at journal block 321 (flags 0x2)
+ FS block 1556 logged at journal block 322 (flags 0x2)
+ FS block 168 logged at journal block 323 (flags 0x2)
+ FS block 1618 logged at journal block 324 (flags 0x2)
+ FS block 169 logged at journal block 325 (flags 0x2)
+ FS block 1187 logged at journal block 326 (flags 0x2)
+ FS block 170 logged at journal block 327 (flags 0x2)
+ FS block 1188 logged at journal block 328 (flags 0x2)
+ FS block 171 logged at journal block 329 (flags 0x2)
+ FS block 1619 logged at journal block 330 (flags 0x2)
+ FS block 172 logged at journal block 331 (flags 0x2)
+ FS block 1620 logged at journal block 332 (flags 0x2)
+ FS block 173 logged at journal block 333 (flags 0x2)
+ FS block 149 logged at journal block 334 (flags 0x2)
+ FS block 174 logged at journal block 335 (flags 0x2)
+ FS block 675 logged at journal block 336 (flags 0x2)
+ FS block 150 logged at journal block 337 (flags 0x2)
+ FS block 175 logged at journal block 338 (flags 0x2)
+ FS block 176 logged at journal block 339 (flags 0x2)
+ FS block 151 logged at journal block 340 (flags 0x2)
+ FS block 177 logged at journal block 341 (flags 0x2)
+ FS block 152 logged at journal block 342 (flags 0x2)
+ FS block 178 logged at journal block 343 (flags 0x2)
+ FS block 1189 logged at journal block 344 (flags 0x2)
+ FS block 179 logged at journal block 345 (flags 0x2)
+ FS block 1190 logged at journal block 346 (flags 0x2)
+ FS block 180 logged at journal block 347 (flags 0x2)
+ FS block 1191 logged at journal block 348 (flags 0x2)
+ FS block 181 logged at journal block 349 (flags 0x2)
+ FS block 1192 logged at journal block 350 (flags 0x2)
+ FS block 182 logged at journal block 351 (flags 0x2)
+ FS block 1621 logged at journal block 352 (flags 0x2)
+ FS block 183 logged at journal block 353 (flags 0x2)
+ FS block 676 logged at journal block 354 (flags 0x2)
+ FS block 1622 logged at journal block 355 (flags 0x2)
+ FS block 184 logged at journal block 356 (flags 0x2)
+ FS block 185 logged at journal block 357 (flags 0x2)
+ FS block 1623 logged at journal block 358 (flags 0x2)
+ FS block 186 logged at journal block 359 (flags 0x2)
+ FS block 1624 logged at journal block 360 (flags 0x2)
+ FS block 187 logged at journal block 361 (flags 0x2)
+ FS block 153 logged at journal block 362 (flags 0x2)
+ FS block 188 logged at journal block 363 (flags 0x2)
+ FS block 154 logged at journal block 364 (flags 0x2)
+ FS block 189 logged at journal block 365 (flags 0x2)
+ FS block 155 logged at journal block 366 (flags 0xa)
+Found expected sequence 33, type 1 (descriptor block) at block 367
+Dumping descriptor block, sequence 33, at block 367:
+ FS block 190 logged at journal block 368 (flags 0x0)
+ FS block 156 logged at journal block 369 (flags 0x2)
+ FS block 191 logged at journal block 370 (flags 0x2)
+ FS block 157 logged at journal block 371 (flags 0x2)
+ FS block 192 logged at journal block 372 (flags 0x2)
+ FS block 677 logged at journal block 373 (flags 0x2)
+ FS block 158 logged at journal block 374 (flags 0x2)
+ FS block 159 logged at journal block 375 (flags 0x2)
+ FS block 193 logged at journal block 376 (flags 0x2)
+ FS block 194 logged at journal block 377 (flags 0x2)
+ FS block 160 logged at journal block 378 (flags 0x2)
+ FS block 195 logged at journal block 379 (flags 0x2)
+ FS block 1193 logged at journal block 380 (flags 0x2)
+ FS block 196 logged at journal block 381 (flags 0x2)
+ FS block 1194 logged at journal block 382 (flags 0x2)
+ FS block 197 logged at journal block 383 (flags 0x2)
+ FS block 1195 logged at journal block 384 (flags 0x2)
+ FS block 198 logged at journal block 385 (flags 0x2)
+ FS block 1196 logged at journal block 386 (flags 0x2)
+ FS block 199 logged at journal block 387 (flags 0x2)
+ FS block 1197 logged at journal block 388 (flags 0x2)
+ FS block 200 logged at journal block 389 (flags 0x2)
+ FS block 678 logged at journal block 390 (flags 0x2)
+ FS block 1198 logged at journal block 391 (flags 0x2)
+ FS block 201 logged at journal block 392 (flags 0x2)
+ FS block 1199 logged at journal block 393 (flags 0x2)
+ FS block 202 logged at journal block 394 (flags 0x2)
+ FS block 203 logged at journal block 395 (flags 0x2)
+ FS block 1200 logged at journal block 396 (flags 0x2)
+ FS block 204 logged at journal block 397 (flags 0x2)
+ FS block 1625 logged at journal block 398 (flags 0x2)
+ FS block 205 logged at journal block 399 (flags 0x2)
+ FS block 1626 logged at journal block 400 (flags 0x2)
+ FS block 206 logged at journal block 401 (flags 0x2)
+ FS block 1627 logged at journal block 402 (flags 0x2)
+ FS block 207 logged at journal block 403 (flags 0x2)
+ FS block 1628 logged at journal block 404 (flags 0x2)
+ FS block 208 logged at journal block 405 (flags 0x2)
+ FS block 1629 logged at journal block 406 (flags 0x2)
+ FS block 209 logged at journal block 407 (flags 0x2)
+ FS block 679 logged at journal block 408 (flags 0x2)
+ FS block 1630 logged at journal block 409 (flags 0x2)
+ FS block 210 logged at journal block 410 (flags 0x2)
+ FS block 1631 logged at journal block 411 (flags 0x2)
+ FS block 211 logged at journal block 412 (flags 0x2)
+ FS block 212 logged at journal block 413 (flags 0x2)
+ FS block 1632 logged at journal block 414 (flags 0x2)
+ FS block 213 logged at journal block 415 (flags 0x2)
+ FS block 1201 logged at journal block 416 (flags 0x2)
+ FS block 214 logged at journal block 417 (flags 0x2)
+ FS block 1202 logged at journal block 418 (flags 0x2)
+ FS block 215 logged at journal block 419 (flags 0x2)
+ FS block 1203 logged at journal block 420 (flags 0xa)
+Found expected sequence 33, type 2 (commit block) at block 421
+Found expected sequence 34, type 1 (descriptor block) at block 422
+Dumping descriptor block, sequence 34, at block 422:
+ FS block 146 logged at journal block 423 (flags 0x0)
+ FS block 2 logged at journal block 424 (flags 0x2)
+ FS block 215 logged at journal block 425 (flags 0x2)
+ FS block 679 logged at journal block 426 (flags 0x2)
+ FS block 1203 logged at journal block 427 (flags 0x2)
+ FS block 131 logged at journal block 428 (flags 0x2)
+ FS block 216 logged at journal block 429 (flags 0x2)
+ FS block 147 logged at journal block 430 (flags 0x2)
+ FS block 130 logged at journal block 431 (flags 0x2)
+ FS block 1204 logged at journal block 432 (flags 0x2)
+ FS block 677 logged at journal block 433 (flags 0x2)
+ FS block 158 logged at journal block 434 (flags 0x2)
+ FS block 217 logged at journal block 435 (flags 0x2)
+ FS block 1542 logged at journal block 436 (flags 0x2)
+ FS block 218 logged at journal block 437 (flags 0x2)
+ FS block 680 logged at journal block 438 (flags 0x2)
+ FS block 1555 logged at journal block 439 (flags 0x2)
+ FS block 219 logged at journal block 440 (flags 0x2)
+ FS block 1543 logged at journal block 441 (flags 0x2)
+ FS block 220 logged at journal block 442 (flags 0x2)
+ FS block 221 logged at journal block 443 (flags 0x2)
+ FS block 1544 logged at journal block 444 (flags 0x2)
+ FS block 222 logged at journal block 445 (flags 0x2)
+ FS block 1553 logged at journal block 446 (flags 0x2)
+ FS block 162 logged at journal block 447 (flags 0x2)
+ FS block 132 logged at journal block 448 (flags 0x2)
+ FS block 1554 logged at journal block 449 (flags 0x2)
+ FS block 223 logged at journal block 450 (flags 0x2)
+ FS block 1617 logged at journal block 451 (flags 0x2)
+ FS block 224 logged at journal block 452 (flags 0x2)
+ FS block 1205 logged at journal block 453 (flags 0x2)
+ FS block 225 logged at journal block 454 (flags 0x2)
+ FS block 1206 logged at journal block 455 (flags 0x2)
+ FS block 226 logged at journal block 456 (flags 0x2)
+ FS block 681 logged at journal block 457 (flags 0x2)
+ FS block 1207 logged at journal block 458 (flags 0x2)
+ FS block 227 logged at journal block 459 (flags 0x2)
+ FS block 1208 logged at journal block 460 (flags 0x2)
+ FS block 228 logged at journal block 461 (flags 0x2)
+ FS block 1537 logged at journal block 462 (flags 0x2)
+ FS block 229 logged at journal block 463 (flags 0x2)
+ FS block 230 logged at journal block 464 (flags 0x2)
+ FS block 1538 logged at journal block 465 (flags 0x2)
+ FS block 231 logged at journal block 466 (flags 0x2)
+ FS block 1539 logged at journal block 467 (flags 0x2)
+ FS block 232 logged at journal block 468 (flags 0x2)
+ FS block 1540 logged at journal block 469 (flags 0x2)
+ FS block 233 logged at journal block 470 (flags 0x2)
+ FS block 1557 logged at journal block 471 (flags 0x2)
+ FS block 234 logged at journal block 472 (flags 0x2)
+ FS block 1558 logged at journal block 473 (flags 0x2)
+ FS block 235 logged at journal block 474 (flags 0x2)
+ FS block 682 logged at journal block 475 (flags 0x2)
+ FS block 1559 logged at journal block 476 (flags 0x2)
+ FS block 236 logged at journal block 477 (flags 0x2)
+ FS block 1560 logged at journal block 478 (flags 0x2)
+ FS block 237 logged at journal block 479 (flags 0x2)
+ FS block 1209 logged at journal block 480 (flags 0x2)
+ FS block 238 logged at journal block 481 (flags 0x2)
+ FS block 239 logged at journal block 482 (flags 0x2)
+ FS block 1210 logged at journal block 483 (flags 0x2)
+ FS block 240 logged at journal block 484 (flags 0x2)
+ FS block 1211 logged at journal block 485 (flags 0x2)
+ FS block 241 logged at journal block 486 (flags 0x2)
+ FS block 1212 logged at journal block 487 (flags 0x2)
+ FS block 242 logged at journal block 488 (flags 0x2)
+ FS block 1213 logged at journal block 489 (flags 0x2)
+ FS block 243 logged at journal block 490 (flags 0x2)
+ FS block 1214 logged at journal block 491 (flags 0x2)
+ FS block 244 logged at journal block 492 (flags 0x2)
+ FS block 683 logged at journal block 493 (flags 0x2)
+ FS block 1215 logged at journal block 494 (flags 0x2)
+ FS block 245 logged at journal block 495 (flags 0x2)
+ FS block 1216 logged at journal block 496 (flags 0x2)
+ FS block 246 logged at journal block 497 (flags 0x2)
+ FS block 1545 logged at journal block 498 (flags 0x2)
+ FS block 247 logged at journal block 499 (flags 0x2)
+ FS block 248 logged at journal block 500 (flags 0x2)
+ FS block 1546 logged at journal block 501 (flags 0x2)
+ FS block 249 logged at journal block 502 (flags 0x2)
+ FS block 1547 logged at journal block 503 (flags 0xa)
+Found expected sequence 34, type 1 (descriptor block) at block 504
+Dumping descriptor block, sequence 34, at block 504:
+ FS block 250 logged at journal block 505 (flags 0x0)
+ FS block 1548 logged at journal block 506 (flags 0x2)
+ FS block 251 logged at journal block 507 (flags 0x2)
+ FS block 1549 logged at journal block 508 (flags 0x2)
+ FS block 1550 logged at journal block 509 (flags 0x2)
+ FS block 252 logged at journal block 510 (flags 0x2)
+ FS block 684 logged at journal block 511 (flags 0x2)
+ FS block 1551 logged at journal block 512 (flags 0x2)
+ FS block 253 logged at journal block 513 (flags 0x2)
+ FS block 1552 logged at journal block 514 (flags 0x2)
+ FS block 254 logged at journal block 515 (flags 0x2)
+ FS block 1561 logged at journal block 516 (flags 0x2)
+ FS block 255 logged at journal block 517 (flags 0x2)
+ FS block 1562 logged at journal block 518 (flags 0x2)
+ FS block 256 logged at journal block 519 (flags 0x2)
+ FS block 257 logged at journal block 520 (flags 0x2)
+ FS block 1563 logged at journal block 521 (flags 0x2)
+ FS block 258 logged at journal block 522 (flags 0x2)
+ FS block 1564 logged at journal block 523 (flags 0x2)
+ FS block 259 logged at journal block 524 (flags 0x2)
+ FS block 1565 logged at journal block 525 (flags 0x2)
+ FS block 260 logged at journal block 526 (flags 0x2)
+ FS block 1566 logged at journal block 527 (flags 0x2)
+ FS block 261 logged at journal block 528 (flags 0x2)
+ FS block 685 logged at journal block 529 (flags 0x2)
+ FS block 1567 logged at journal block 530 (flags 0x2)
+ FS block 262 logged at journal block 531 (flags 0x2)
+ FS block 1568 logged at journal block 532 (flags 0x2)
+ FS block 263 logged at journal block 533 (flags 0x2)
+ FS block 1601 logged at journal block 534 (flags 0x2)
+ FS block 264 logged at journal block 535 (flags 0x2)
+ FS block 1602 logged at journal block 536 (flags 0x2)
+ FS block 265 logged at journal block 537 (flags 0x2)
+ FS block 266 logged at journal block 538 (flags 0x2)
+ FS block 1603 logged at journal block 539 (flags 0x2)
+ FS block 267 logged at journal block 540 (flags 0x2)
+ FS block 1604 logged at journal block 541 (flags 0x2)
+ FS block 268 logged at journal block 542 (flags 0x2)
+ FS block 1605 logged at journal block 543 (flags 0x2)
+ FS block 269 logged at journal block 544 (flags 0x2)
+ FS block 1606 logged at journal block 545 (flags 0x2)
+ FS block 270 logged at journal block 546 (flags 0x2)
+ FS block 686 logged at journal block 547 (flags 0x2)
+ FS block 1607 logged at journal block 548 (flags 0x2)
+ FS block 271 logged at journal block 549 (flags 0x2)
+ FS block 1608 logged at journal block 550 (flags 0x2)
+ FS block 272 logged at journal block 551 (flags 0x2)
+ FS block 1609 logged at journal block 552 (flags 0x2)
+ FS block 273 logged at journal block 553 (flags 0x2)
+ FS block 1610 logged at journal block 554 (flags 0x2)
+ FS block 274 logged at journal block 555 (flags 0x2)
+ FS block 275 logged at journal block 556 (flags 0x2)
+ FS block 1611 logged at journal block 557 (flags 0x2)
+ FS block 276 logged at journal block 558 (flags 0x2)
+ FS block 1612 logged at journal block 559 (flags 0x2)
+ FS block 277 logged at journal block 560 (flags 0x2)
+ FS block 1613 logged at journal block 561 (flags 0x2)
+ FS block 278 logged at journal block 562 (flags 0x2)
+ FS block 1614 logged at journal block 563 (flags 0x2)
+ FS block 279 logged at journal block 564 (flags 0x2)
+ FS block 687 logged at journal block 565 (flags 0x2)
+ FS block 1615 logged at journal block 566 (flags 0x2)
+ FS block 280 logged at journal block 567 (flags 0x2)
+ FS block 1616 logged at journal block 568 (flags 0x2)
+ FS block 1569 logged at journal block 569 (flags 0x2)
+ FS block 281 logged at journal block 570 (flags 0x2)
+ FS block 1570 logged at journal block 571 (flags 0x2)
+ FS block 282 logged at journal block 572 (flags 0x2)
+ FS block 1571 logged at journal block 573 (flags 0x2)
+ FS block 283 logged at journal block 574 (flags 0x2)
+ FS block 284 logged at journal block 575 (flags 0x2)
+ FS block 1572 logged at journal block 576 (flags 0x2)
+ FS block 285 logged at journal block 577 (flags 0x2)
+ FS block 1573 logged at journal block 578 (flags 0x2)
+ FS block 286 logged at journal block 579 (flags 0x2)
+ FS block 1574 logged at journal block 580 (flags 0x2)
+ FS block 287 logged at journal block 581 (flags 0x2)
+ FS block 688 logged at journal block 582 (flags 0x2)
+ FS block 1575 logged at journal block 583 (flags 0x2)
+ FS block 288 logged at journal block 584 (flags 0x2)
+ FS block 1576 logged at journal block 585 (flags 0xa)
+Found expected sequence 34, type 1 (descriptor block) at block 586
+Dumping descriptor block, sequence 34, at block 586:
+ FS block 289 logged at journal block 587 (flags 0x0)
+ FS block 1577 logged at journal block 588 (flags 0x2)
+ FS block 290 logged at journal block 589 (flags 0x2)
+ FS block 1578 logged at journal block 590 (flags 0x2)
+ FS block 291 logged at journal block 591 (flags 0x2)
+ FS block 1579 logged at journal block 592 (flags 0x2)
+ FS block 292 logged at journal block 593 (flags 0x2)
+ FS block 293 logged at journal block 594 (flags 0x2)
+ FS block 1580 logged at journal block 595 (flags 0x2)
+ FS block 294 logged at journal block 596 (flags 0x2)
+ FS block 1581 logged at journal block 597 (flags 0x2)
+ FS block 295 logged at journal block 598 (flags 0x2)
+ FS block 1582 logged at journal block 599 (flags 0x2)
+ FS block 296 logged at journal block 600 (flags 0x2)
+ FS block 689 logged at journal block 601 (flags 0x2)
+ FS block 1583 logged at journal block 602 (flags 0x2)
+ FS block 297 logged at journal block 603 (flags 0x2)
+ FS block 1584 logged at journal block 604 (flags 0x2)
+ FS block 298 logged at journal block 605 (flags 0x2)
+ FS block 1585 logged at journal block 606 (flags 0x2)
+ FS block 299 logged at journal block 607 (flags 0x2)
+ FS block 1586 logged at journal block 608 (flags 0x2)
+ FS block 300 logged at journal block 609 (flags 0x2)
+ FS block 1587 logged at journal block 610 (flags 0x2)
+ FS block 301 logged at journal block 611 (flags 0x2)
+ FS block 302 logged at journal block 612 (flags 0x2)
+ FS block 1588 logged at journal block 613 (flags 0x2)
+ FS block 303 logged at journal block 614 (flags 0x2)
+ FS block 1589 logged at journal block 615 (flags 0x2)
+ FS block 304 logged at journal block 616 (flags 0x2)
+ FS block 1590 logged at journal block 617 (flags 0x2)
+ FS block 305 logged at journal block 618 (flags 0x2)
+ FS block 690 logged at journal block 619 (flags 0x2)
+ FS block 1591 logged at journal block 620 (flags 0x2)
+ FS block 306 logged at journal block 621 (flags 0x2)
+ FS block 1592 logged at journal block 622 (flags 0x2)
+ FS block 307 logged at journal block 623 (flags 0x2)
+ FS block 1593 logged at journal block 624 (flags 0x2)
+ FS block 308 logged at journal block 625 (flags 0x2)
+ FS block 1594 logged at journal block 626 (flags 0x2)
+ FS block 309 logged at journal block 627 (flags 0x2)
+ FS block 1595 logged at journal block 628 (flags 0x2)
+ FS block 1596 logged at journal block 629 (flags 0x2)
+ FS block 310 logged at journal block 630 (flags 0x2)
+ FS block 311 logged at journal block 631 (flags 0x2)
+ FS block 1597 logged at journal block 632 (flags 0x2)
+ FS block 312 logged at journal block 633 (flags 0x2)
+ FS block 1598 logged at journal block 634 (flags 0x2)
+ FS block 313 logged at journal block 635 (flags 0x2)
+ FS block 691 logged at journal block 636 (flags 0x2)
+ FS block 1599 logged at journal block 637 (flags 0x2)
+ FS block 314 logged at journal block 638 (flags 0x2)
+ FS block 1600 logged at journal block 639 (flags 0xa)
+Found expected sequence 34, type 2 (commit block) at block 640
+No magic number at block 641: end of journal.
diff --git a/tests/f_jnl_64bit/expect.1 b/tests/f_jnl_64bit/expect.1
new file mode 100644
index 0000000..e360e2f
--- /dev/null
+++ b/tests/f_jnl_64bit/expect.1
@@ -0,0 +1,16 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong (14059, counted=12712).
+Fix? yes
+
+Free inodes count wrong (8181, counted=6834).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 1358/8192 files (0.0% non-contiguous), 3672/16384 blocks
+Exit status is 1
diff --git a/tests/f_jnl_64bit/expect.2 b/tests/f_jnl_64bit/expect.2
new file mode 100644
index 0000000..93cb730
--- /dev/null
+++ b/tests/f_jnl_64bit/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 1358/8192 files (0.0% non-contiguous), 3672/16384 blocks
+Exit status is 0
diff --git a/tests/f_jnl_64bit/image.gz b/tests/f_jnl_64bit/image.gz
new file mode 100644
index 0000000..9758f90
--- /dev/null
+++ b/tests/f_jnl_64bit/image.gz
Binary files differ
diff --git a/tests/f_jnl_64bit/name b/tests/f_jnl_64bit/name
new file mode 100644
index 0000000..2c8dd15
--- /dev/null
+++ b/tests/f_jnl_64bit/name
@@ -0,0 +1 @@
+on-disk 64-bit journal format
diff --git a/tests/f_jnl_64bit/script b/tests/f_jnl_64bit/script
new file mode 100644
index 0000000..9fb4366
--- /dev/null
+++ b/tests/f_jnl_64bit/script
@@ -0,0 +1,4 @@
+PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
+PASS_ZERO=true
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_jnl_errno/expect.0 b/tests/f_jnl_errno/expect.0
new file mode 100644
index 0000000..96fb01a
--- /dev/null
+++ b/tests/f_jnl_errno/expect.0
@@ -0,0 +1,50 @@
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+Default mount options: user_xattr acl
+Filesystem state: clean
+Errors behavior: Remount read-only
+Filesystem OS type: Linux
+Inode count: 2048
+Block count: 8192
+Reserved block count: 409
+Free blocks: 6862
+Free inodes: 2037
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 31
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 256
+Flex block group size: 16
+Mount count: 0
+Check interval: 0 (<none>)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 128
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Journal features: (none)
+Total journal size: 1024k
+Total journal blocks: 1024
+Max transaction length: 1024
+Fast commit length: 0
+Journal sequence: 0x00000005
+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)
+ Inode table at 66-321 (+65)
+ 6862 free blocks, 2037 free inodes, 2 directories, 2037 unused inodes
+ Free blocks: 1330-8191
+ Free inodes: 12-2048
diff --git a/tests/f_jnl_errno/expect.1 b/tests/f_jnl_errno/expect.1
new file mode 100644
index 0000000..4134234
--- /dev/null
+++ b/tests/f_jnl_errno/expect.1
@@ -0,0 +1,9 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/2048 files (9.1% non-contiguous), 1330/8192 blocks
+Exit status is 0
diff --git a/tests/f_jnl_errno/expect.2 b/tests/f_jnl_errno/expect.2
new file mode 100644
index 0000000..db16a75
--- /dev/null
+++ b/tests/f_jnl_errno/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (9.1% non-contiguous), 1330/8192 blocks
+Exit status is 0
diff --git a/tests/f_jnl_errno/image.gz b/tests/f_jnl_errno/image.gz
new file mode 100644
index 0000000..c55c775
--- /dev/null
+++ b/tests/f_jnl_errno/image.gz
Binary files differ
diff --git a/tests/f_jnl_errno/name b/tests/f_jnl_errno/name
new file mode 100644
index 0000000..e5f64d6
--- /dev/null
+++ b/tests/f_jnl_errno/name
@@ -0,0 +1 @@
+journal s_errno handling
diff --git a/tests/f_jnl_errno/script b/tests/f_jnl_errno/script
new file mode 100644
index 0000000..ef5006a
--- /dev/null
+++ b/tests/f_jnl_errno/script
@@ -0,0 +1,4 @@
+AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
+PASS_ZERO=true
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_jnl_etb_alloc_fail/expect.1 b/tests/f_jnl_etb_alloc_fail/expect.1
new file mode 100644
index 0000000..243a151
--- /dev/null
+++ b/tests/f_jnl_etb_alloc_fail/expect.1
@@ -0,0 +1,31 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Superblock has_journal flag is clear, but a journal is present.
+Clear? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(32--33) -(35--49) -(83--511) -(513--1087) -1089
+Fix? yes
+
+Free blocks count wrong for group #0 (0, counted=1022).
+Fix? yes
+
+Free blocks count wrong (0, counted=1022).
+Fix? yes
+
+Recreate journal? yes
+
+Creating journal (1024 blocks): Could not allocate block in ext2 filesystem: while trying to create journal
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (8.3% non-contiguous), 2048/2048 blocks
+Exit status is 1
diff --git a/tests/f_jnl_etb_alloc_fail/expect.2 b/tests/f_jnl_etb_alloc_fail/expect.2
new file mode 100644
index 0000000..69859dd
--- /dev/null
+++ b/tests/f_jnl_etb_alloc_fail/expect.2
@@ -0,0 +1,20 @@
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(32--33) -(35--49) -(83--511) -(513--1087) -1089
+Fix? yes
+
+Free blocks count wrong for group #0 (0, counted=1022).
+Fix? yes
+
+Free blocks count wrong (0, counted=1022).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (8.3% non-contiguous), 1026/2048 blocks
+Exit status is 1
diff --git a/tests/f_jnl_etb_alloc_fail/image.gz b/tests/f_jnl_etb_alloc_fail/image.gz
new file mode 100644
index 0000000..4cf2dbf
--- /dev/null
+++ b/tests/f_jnl_etb_alloc_fail/image.gz
Binary files differ
diff --git a/tests/f_jnl_etb_alloc_fail/name b/tests/f_jnl_etb_alloc_fail/name
new file mode 100644
index 0000000..d9bce1c
--- /dev/null
+++ b/tests/f_jnl_etb_alloc_fail/name
@@ -0,0 +1 @@
+can't allocate extent tree block recreating journal
diff --git a/tests/f_journal/expect.1 b/tests/f_journal/expect.1
new file mode 100644
index 0000000..0a18654
--- /dev/null
+++ b/tests/f_journal/expect.1
@@ -0,0 +1,62 @@
+test_filesys: recovering journal
+Clearing orphaned inode 37 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 90 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 67 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 50 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 57 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 80 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 45 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 71 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 86 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 83 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 27 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 52 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 48 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 15 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 102 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 65 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 14 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 36 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 21 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 43 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 51 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 99 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 19 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 39 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 95 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 25 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 88 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 20 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 41 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 77 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 18 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 60 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 98 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 49 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 62 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 72 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 28 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 47 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 53 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 94 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 76 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 38 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 33 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 40 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 73 (uid=0, gid=0, mode=040700, size=1024)
+Clearing orphaned inode 55 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 24 (uid=0, gid=0, mode=0100600, size=4096)
+Clearing orphaned inode 59 (uid=0, gid=0, mode=0100600, size=4096)
+Backing up journal inode block information.
+
+Moving journal from /journal to hidden inode.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 53/2048 files (1.9% non-contiguous), 1409/8192 blocks
+Exit status is 0
diff --git a/tests/f_journal/expect.2 b/tests/f_journal/expect.2
new file mode 100644
index 0000000..47c52f7
--- /dev/null
+++ b/tests/f_journal/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 53/2048 files (1.9% non-contiguous), 1409/8192 blocks
+Exit status is 0
diff --git a/tests/f_journal/image.gz b/tests/f_journal/image.gz
new file mode 100644
index 0000000..512d9ec
--- /dev/null
+++ b/tests/f_journal/image.gz
Binary files differ
diff --git a/tests/f_journal/name b/tests/f_journal/name
new file mode 100644
index 0000000..ece2321
--- /dev/null
+++ b/tests/f_journal/name
@@ -0,0 +1 @@
+recover journal from corrupted inode table
diff --git a/tests/f_large_dir/expect b/tests/f_large_dir/expect
new file mode 100644
index 0000000..495ea85
--- /dev/null
+++ b/tests/f_large_dir/expect
@@ -0,0 +1,34 @@
+128-byte inodes cannot handle dates beyond 2038 and are deprecated
+Creating filesystem with 108341 1k blocks and 65072 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test.img: ***** FILE SYSTEM WAS MODIFIED *****
+test.img: 17/65072 files (5.9% non-contiguous), 9732/108341 blocks
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Directory exceeds max links, but no DIR_NLINK feature in superblock.
+Fix? yes
+
+Inode 12 ref count is 65012, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test.img: ***** FILE SYSTEM WAS MODIFIED *****
+test.img: 65023/65072 files (0.0% non-contiguous), 96666/108341 blocks
+Exit status is 1
diff --git a/tests/f_large_dir/is_slow_test b/tests/f_large_dir/is_slow_test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/f_large_dir/is_slow_test
diff --git a/tests/f_large_dir/name b/tests/f_large_dir/name
new file mode 100644
index 0000000..4b96890
--- /dev/null
+++ b/tests/f_large_dir/name
@@ -0,0 +1 @@
+optimize 3 level htree directories
diff --git a/tests/f_large_dir/script b/tests/f_large_dir/script
new file mode 100644
index 0000000..e323583
--- /dev/null
+++ b/tests/f_large_dir/script
@@ -0,0 +1,90 @@
+OUT=$test_name.log
+EXP=$test_dir/expect
+E2FSCK=../e2fsck/e2fsck
+
+NAMELEN=255
+DIRENT_SZ=8
+BLOCKSZ=1024
+INODESZ=128
+DIRENT_PER_LEAF=$((BLOCKSZ / (NAMELEN + DIRENT_SZ)))
+HEADER=32
+INDEX_SZ=8
+INDEX_L1=$(((BLOCKSZ - HEADER) / INDEX_SZ))
+INDEX_L2=$(((BLOCKSZ - DIRENT_SZ) / INDEX_SZ))
+DIRBLK=$((2 + INDEX_L1 * INDEX_L2))
+ENTRIES=$((DIRBLK * DIRENT_PER_LEAF))
+EXT4_LINK_MAX=65000
+if [ $ENTRIES -lt $((EXT4_LINK_MAX + 10)) ]; then
+ ENTRIES=$((EXT4_LINK_MAX + 10))
+ DIRBLK=$((ENTRIES / DIRENT_PER_LEAF + 3))
+fi
+# directory leaf blocks plus inode count and 25% for the rest of the fs
+FSIZE=$(((DIRBLK + EXT4_LINK_MAX * ((BLOCKSZ + INODESZ) / BLOCKSZ)) * 5 / 4))
+
+$MKE2FS -b 1024 -O large_dir,uninit_bg -N $((ENTRIES + 50)) \
+ -I $INODESZ -F $TMPFILE $FSIZE > $OUT.new 2>&1
+RC=$?
+if [ $RC -eq 0 ]; then
+{
+ # First some initial fs setup to create indexed dir
+ echo "mkdir /foo"
+ echo "cd /foo"
+ touch $TMPFILE.tmp
+ echo "write $TMPFILE.tmp foofile"
+ i=0
+ while test $i -lt $DIRENT_PER_LEAF ; do
+ printf "mkdir d%0254u\n" $i
+ i=$((i + 1));
+ done
+ echo "expand ./"
+ printf "mkdir d%0254u\n" $i
+} | $DEBUGFS -w $TMPFILE > /dev/null 2>> $OUT.new
+ RC=$?
+ # e2fsck should optimize the dir to become indexed
+ $E2FSCK -yfD $TMPFILE >> $OUT.new 2>&1
+ status=$?
+ echo Exit status is $status >> $OUT.new
+fi
+
+if [ $RC -eq 0 ]; then
+{
+ START=$SECONDS
+ i=$(($DIRENT_PER_LEAF+1))
+ last=$i
+ echo "cd /foo"
+ while test $i -lt $ENTRIES ; do
+ ELAPSED=$((SECONDS - START))
+ if test $((i % 5000)) -eq 0 -a $ELAPSED -gt 10; then
+ RATE=$(((i - last) / ELAPSED))
+ echo "$test_name: $i/$ENTRIES links, ${ELAPSED}s @ $RATE/s" >&2
+ START=$SECONDS
+ last=$i
+ fi
+ if test $i -lt $((EXT4_LINK_MAX + 10)); then
+ printf "mkdir d%0254u\n" $i
+ else
+ printf "ln foofile f%0254u\n" $i
+ fi
+ i=$((i + 1))
+ done
+} | $DEBUGFS -w $TMPFILE > /dev/null 2>> $OUT.new
+ RC=$?
+fi
+
+if [ $RC -eq 0 ]; then
+ $E2FSCK -yfD $TMPFILE >> $OUT.new 2>&1
+ status=$?
+ 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
+
+ cmp -s $OUT $EXP
+ RC=$?
+fi
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT > $test_name.failed
+fi
diff --git a/tests/f_large_dir_csum/expect b/tests/f_large_dir_csum/expect
new file mode 100644
index 0000000..44770f7
--- /dev/null
+++ b/tests/f_large_dir_csum/expect
@@ -0,0 +1,33 @@
+128-byte inodes cannot handle dates beyond 2038 and are deprecated
+Creating filesystem with 31002 1k blocks and 64 inodes
+Superblock backups stored on blocks:
+ 8193, 24577
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Inode 13 ref count is 1, should be 5. Fix? yes
+
+Pass 5: Checking group summary information
+
+test.img: ***** FILE SYSTEM WAS MODIFIED *****
+test.img: 13/64 files (0.0% non-contiguous), 766/31002 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Inode 13 ref count is 5, should be 46504. Fix? yes
+
+Pass 5: Checking group summary information
+
+test.img: ***** FILE SYSTEM WAS MODIFIED *****
+test.img: 13/64 files (0.0% non-contiguous), 16390/31002 blocks
+Exit status is 1
diff --git a/tests/f_large_dir_csum/is_slow_test b/tests/f_large_dir_csum/is_slow_test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/f_large_dir_csum/is_slow_test
diff --git a/tests/f_large_dir_csum/name b/tests/f_large_dir_csum/name
new file mode 100644
index 0000000..2b37c8c
--- /dev/null
+++ b/tests/f_large_dir_csum/name
@@ -0,0 +1 @@
+optimize 3 level htree directories with metadata checksums
diff --git a/tests/f_large_dir_csum/script b/tests/f_large_dir_csum/script
new file mode 100644
index 0000000..286a965
--- /dev/null
+++ b/tests/f_large_dir_csum/script
@@ -0,0 +1,84 @@
+OUT=$test_name.log
+EXP=$test_dir/expect
+E2FSCK=../e2fsck/e2fsck
+
+NAMELEN=255
+DIRENT_SZ=8
+BLOCKSZ=1024
+INODESZ=128
+CSUM_SZ=8
+CSUM_TAIL_SZ=12
+DIRENT_PER_LEAF=$(((BLOCKSZ - CSUM_TAIL_SZ) / (NAMELEN + DIRENT_SZ)))
+HEADER=32
+INDEX_SZ=8
+INDEX_L1=$(((BLOCKSZ - HEADER - CSUM_SZ) / INDEX_SZ))
+INDEX_L2=$(((BLOCKSZ - DIRENT_SZ - CSUM_SZ) / INDEX_SZ))
+DIRBLK=$((3 + INDEX_L1 * INDEX_L2))
+ENTRIES=$((DIRBLK * DIRENT_PER_LEAF))
+# directory leaf blocks - get twice as much because the leaves won't be full
+# and there are also other filesystem blocks.
+FSIZE=$((DIRBLK * 2))
+
+$MKE2FS -b 1024 -O extents,64bit,large_dir,uninit_bg,metadata_csum -N 50 \
+ -I $INODESZ -F $TMPFILE $FSIZE > $OUT.new 2>&1
+RC=$?
+if [ $RC -eq 0 ]; then
+{
+ # First some initial fs setup to create indexed dir
+ echo "mkdir /foo"
+ echo "cd /foo"
+ touch $TMPFILE.tmp
+ echo "write $TMPFILE.tmp foofile"
+ i=0
+ while test $i -lt $DIRENT_PER_LEAF ; do
+ printf "ln foofile f%0254u\n" $i
+ i=$((i + 1));
+ done
+ echo "expand ./"
+ printf "ln foofile f%0254u\n" $i
+} | $DEBUGFS -w $TMPFILE > /dev/null 2>> $OUT.new
+ RC=$?
+ # e2fsck should optimize the dir to become indexed
+ $E2FSCK -yfD $TMPFILE >> $OUT.new 2>&1
+ status=$?
+ echo Exit status is $status >> $OUT.new
+fi
+
+if [ $RC -eq 0 ]; then
+{
+ START=$SECONDS
+ i=$(($DIRENT_PER_LEAF+1))
+ last=$i
+ echo "cd /foo"
+ while test $i -lt $ENTRIES ; do
+ ELAPSED=$((SECONDS - START))
+ if test $((i % 5000)) -eq 0 -a $ELAPSED -gt 10; then
+ RATE=$(((i - last) / ELAPSED))
+ echo "$test_name: $i/$ENTRIES links, ${ELAPSED}s @ $RATE/s" >&2
+ START=$SECONDS
+ last=$i
+ fi
+ printf "ln foofile f%0254u\n" $i
+ i=$((i + 1))
+ done
+} | $DEBUGFS -w $TMPFILE > /dev/null 2>> $OUT.new
+ RC=$?
+fi
+
+if [ $RC -eq 0 ]; then
+ $E2FSCK -yfD $TMPFILE >> $OUT.new 2>&1
+ status=$?
+ 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
+
+ cmp -s $OUT $EXP
+ RC=$?
+fi
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT > $test_name.failed
+fi
diff --git a/tests/f_lotsbad/expect.1 b/tests/f_lotsbad/expect.1
new file mode 100644
index 0000000..d9e8a24
--- /dev/null
+++ b/tests/f_lotsbad/expect.1
@@ -0,0 +1,61 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 13 is too big. Truncate? yes
+
+Block #16580876 (74) causes directory to be too big. CLEARED.
+Inode 13, i_size is 15360, should be 12288. Fix? yes
+
+Inode 13, i_blocks is 32, should be 30. Fix? yes
+
+Inode 12 has illegal block(s). Clear? yes
+
+Illegal block #12 (778398818) in inode 12. CLEARED.
+Illegal block #13 (1768444960) in inode 12. CLEARED.
+Illegal block #14 (1752375411) in inode 12. CLEARED.
+Illegal block #15 (1684829551) in inode 12. CLEARED.
+Illegal block #16 (1886349344) in inode 12. CLEARED.
+Illegal block #17 (1819633253) in inode 12. CLEARED.
+Illegal block #18 (1663072620) in inode 12. CLEARED.
+Illegal block #19 (1735287144) in inode 12. CLEARED.
+Illegal block #20 (1310731877) in inode 12. CLEARED.
+Illegal block #21 (560297071) in inode 12. CLEARED.
+Illegal block #22 (543512352) in inode 12. CLEARED.
+Too many illegal blocks in inode 12.
+Clear inode? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'termcap' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 2 ref count is 5, should be 4. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(27--41) -(44--45) -(74--90)
+Fix? yes
+
+Free blocks count wrong for group #0 (9, counted=43).
+Fix? yes
+
+Free blocks count wrong (9, counted=43).
+Fix? yes
+
+Inode bitmap differences: -12 -14
+Fix? yes
+
+Free inodes count wrong for group #0 (18, counted=20).
+Fix? yes
+
+Directories count wrong for group #0 (4, counted=3).
+Fix? yes
+
+Free inodes count wrong (18, counted=20).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (0.0% non-contiguous), 57/100 blocks
+Exit status is 1
diff --git a/tests/f_lotsbad/expect.2 b/tests/f_lotsbad/expect.2
new file mode 100644
index 0000000..da1208f
--- /dev/null
+++ b/tests/f_lotsbad/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32 files (0.0% non-contiguous), 57/100 blocks
+Exit status is 0
diff --git a/tests/f_lotsbad/image.gz b/tests/f_lotsbad/image.gz
new file mode 100644
index 0000000..8fd5d1e
--- /dev/null
+++ b/tests/f_lotsbad/image.gz
Binary files differ
diff --git a/tests/f_lotsbad/name b/tests/f_lotsbad/name
new file mode 100644
index 0000000..16b77c1
--- /dev/null
+++ b/tests/f_lotsbad/name
@@ -0,0 +1 @@
+too many illegal blocks in inode
diff --git a/tests/f_lpf/expect.1 b/tests/f_lpf/expect.1
new file mode 100644
index 0000000..6ef996b
--- /dev/null
+++ b/tests/f_lpf/expect.1
@@ -0,0 +1,50 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 13 is in use, but has dtime set. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Unattached inode 13
+Connect to /lost+found? yes
+
+Inode 13 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 14
+Connect to /lost+found? yes
+
+Inode 14 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 15
+Connect to /lost+found? yes
+
+Inode 15 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: +(22--23) +49 +(57--58)
+Fix? yes
+
+Free blocks count wrong for group #0 (24, counted=33).
+Fix? yes
+
+Free blocks count wrong (38, counted=33).
+Fix? yes
+
+Inode bitmap differences: +13
+Fix? yes
+
+Free inodes count wrong for group #0 (1, counted=0).
+Fix? yes
+
+Free inodes count wrong (1, counted=0).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/16 files (12.5% non-contiguous), 67/100 blocks
+Exit status is 1
diff --git a/tests/f_lpf/expect.2 b/tests/f_lpf/expect.2
new file mode 100644
index 0000000..36110ee
--- /dev/null
+++ b/tests/f_lpf/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/16 files (12.5% non-contiguous), 67/100 blocks
+Exit status is 0
diff --git a/tests/f_lpf/image.gz b/tests/f_lpf/image.gz
new file mode 100644
index 0000000..2a71bcf
--- /dev/null
+++ b/tests/f_lpf/image.gz
Binary files differ
diff --git a/tests/f_lpf/name b/tests/f_lpf/name
new file mode 100644
index 0000000..ac2dbab
--- /dev/null
+++ b/tests/f_lpf/name
@@ -0,0 +1 @@
+missing lost+found
diff --git a/tests/f_lpf2/expect.1 b/tests/f_lpf2/expect.1
new file mode 100644
index 0000000..ab5d9ba
--- /dev/null
+++ b/tests/f_lpf2/expect.1
@@ -0,0 +1,41 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Unconnected directory inode 12 (was in /)
+Connect to /lost+found? yes
+
+/lost+found not found. Create? yes
+
+Unconnected directory inode 13 (was in /)
+Connect to /lost+found? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Inode 12 ref count is 3, should be 2. Fix? yes
+
+Inode 13 ref count is 3, should be 2. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(9--19)
+Fix? yes
+
+Free blocks count wrong for group #0 (77, counted=89).
+Fix? yes
+
+Free blocks count wrong (77, counted=89).
+Fix? yes
+
+Free inodes count wrong for group #0 (2, counted=3).
+Fix? yes
+
+Directories count wrong for group #0 (5, counted=4).
+Fix? yes
+
+Free inodes count wrong (2, counted=3).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/16 files (0.0% non-contiguous), 11/100 blocks
+Exit status is 1
diff --git a/tests/f_lpf2/expect.2 b/tests/f_lpf2/expect.2
new file mode 100644
index 0000000..e551932
--- /dev/null
+++ b/tests/f_lpf2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/16 files (0.0% non-contiguous), 11/100 blocks
+Exit status is 0
diff --git a/tests/f_lpf2/image.gz b/tests/f_lpf2/image.gz
new file mode 100644
index 0000000..f703fb3
--- /dev/null
+++ b/tests/f_lpf2/image.gz
Binary files differ
diff --git a/tests/f_lpf2/name b/tests/f_lpf2/name
new file mode 100644
index 0000000..63da315
--- /dev/null
+++ b/tests/f_lpf2/name
@@ -0,0 +1 @@
+create lost+found and reconnect lost directory
diff --git a/tests/f_lpffile/expect.1 b/tests/f_lpffile/expect.1
new file mode 100644
index 0000000..04cce4c
--- /dev/null
+++ b/tests/f_lpffile/expect.1
@@ -0,0 +1,32 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found is not a directory (ino=11)
+Unlink? yes
+
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Unattached inode 11
+Connect to /lost+found? yes
+
+Unattached inode 12
+Connect to /lost+found? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 13
+Connect to /lost+found? yes
+
+Inode 13 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 14
+Connect to /lost+found? yes
+
+Inode 14 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/32 files (0.0% non-contiguous), 15/100 blocks
+Exit status is 1
diff --git a/tests/f_lpffile/expect.2 b/tests/f_lpffile/expect.2
new file mode 100644
index 0000000..85e832d
--- /dev/null
+++ b/tests/f_lpffile/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/32 files (0.0% non-contiguous), 15/100 blocks
+Exit status is 0
diff --git a/tests/f_lpffile/image.gz b/tests/f_lpffile/image.gz
new file mode 100644
index 0000000..75278df
--- /dev/null
+++ b/tests/f_lpffile/image.gz
Binary files differ
diff --git a/tests/f_lpffile/name b/tests/f_lpffile/name
new file mode 100644
index 0000000..e4e40b9
--- /dev/null
+++ b/tests/f_lpffile/name
@@ -0,0 +1 @@
+lost+found is not a directory
diff --git a/tests/f_many_subdirs/expect.1 b/tests/f_many_subdirs/expect.1
new file mode 100644
index 0000000..a8da480
--- /dev/null
+++ b/tests/f_many_subdirs/expect.1
@@ -0,0 +1,47 @@
+Pass 1: Checking inodes, blocks, and sizes
+Deleted inode 26363 has zero dtime. Fix? yes
+
+Pass 2: Checking directory structure
+Entry 'nlink_eq_0' in / (2) has deleted/unused inode 26363. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 2 ref count is 9, should be 8. Fix? yes
+
+Inode 13201 ref count is 1, should be 2. Fix? yes
+
+Inode 19763 ref count is 65535, should be 2. Fix? yes
+
+Directory exceeds max links, but no DIR_NLINK feature in superblock.
+Fix? yes
+
+Inode 32963 ref count is 65000, should be 2. Fix? yes
+
+Directory inode 39601 ref count set to overflow but could be exact value 2. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -73383
+Fix? yes
+
+Free blocks count wrong for group #8 (0, counted=1).
+Fix? yes
+
+Free blocks count wrong (5388, counted=5389).
+Fix? yes
+
+Inode bitmap differences: -26363
+Fix? yes
+
+Free inodes count wrong for group #3 (37, counted=38).
+Fix? yes
+
+Directories count wrong for group #3 (6563, counted=6562).
+Fix? yes
+
+Free inodes count wrong (382, counted=383).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 65617/66000 files (0.0% non-contiguous), 76531/81920 blocks
+Exit status is 1
diff --git a/tests/f_many_subdirs/expect.2 b/tests/f_many_subdirs/expect.2
new file mode 100644
index 0000000..bb0d829
--- /dev/null
+++ b/tests/f_many_subdirs/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 65617/66000 files (0.0% non-contiguous), 76531/81920 blocks
+Exit status is 0
diff --git a/tests/f_many_subdirs/image.gz b/tests/f_many_subdirs/image.gz
new file mode 100644
index 0000000..7f60fff
--- /dev/null
+++ b/tests/f_many_subdirs/image.gz
Binary files differ
diff --git a/tests/f_many_subdirs/name b/tests/f_many_subdirs/name
new file mode 100644
index 0000000..6264a60
--- /dev/null
+++ b/tests/f_many_subdirs/name
@@ -0,0 +1 @@
+directory with more than 65000 sub-directories
diff --git a/tests/f_messy_inode/expect.1 b/tests/f_messy_inode/expect.1
new file mode 100644
index 0000000..708f1da
--- /dev/null
+++ b/tests/f_messy_inode/expect.1
@@ -0,0 +1,38 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 14 has illegal block(s). Clear? yes
+
+Illegal block #2 (4294901760) in inode 14. CLEARED.
+Illegal block #3 (4294901760) in inode 14. CLEARED.
+Illegal block #4 (4294901760) in inode 14. CLEARED.
+Illegal block #5 (4294901760) in inode 14. CLEARED.
+Illegal block #6 (4294901760) in inode 14. CLEARED.
+Illegal block #7 (4294901760) in inode 14. CLEARED.
+Illegal block #8 (4294901760) in inode 14. CLEARED.
+Illegal block #9 (4294901760) in inode 14. CLEARED.
+Illegal block #10 (4294901760) in inode 14. CLEARED.
+Inode 14, i_size is 18446462598732849291, should be 2048. Fix? yes
+
+Inode 14, i_blocks is 18, should be 4. Fix? yes
+
+Pass 2: Checking directory structure
+i_file_acl for inode 14 (/MAKEDEV) is 4294901760, should be zero.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(43--49)
+Fix? yes
+
+Free blocks count wrong for group #0 (68, counted=75).
+Fix? yes
+
+Free blocks count wrong (68, counted=75).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 29/32 files (3.4% non-contiguous), 25/100 blocks
+Exit status is 1
diff --git a/tests/f_messy_inode/expect.2 b/tests/f_messy_inode/expect.2
new file mode 100644
index 0000000..1fffb02
--- /dev/null
+++ b/tests/f_messy_inode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 29/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 0
diff --git a/tests/f_messy_inode/image.gz b/tests/f_messy_inode/image.gz
new file mode 100644
index 0000000..630a689
--- /dev/null
+++ b/tests/f_messy_inode/image.gz
Binary files differ
diff --git a/tests/f_messy_inode/name b/tests/f_messy_inode/name
new file mode 100644
index 0000000..f1485ea
--- /dev/null
+++ b/tests/f_messy_inode/name
@@ -0,0 +1 @@
+bad file and directory acl pointers
diff --git a/tests/f_miss_blk_bmap/expect.1 b/tests/f_miss_blk_bmap/expect.1
new file mode 100644
index 0000000..998b61a
--- /dev/null
+++ b/tests/f_miss_blk_bmap/expect.1
@@ -0,0 +1,20 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
+Pass 1: Checking inodes, blocks, and sizes
+Relocating group 0's block bitmap to 2...
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--10)
+Fix? yes
+
+Free blocks count wrong for group #0 (90, counted=89).
+Fix? yes
+
+Free blocks count wrong (90, counted=89).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/64 files (0.0% non-contiguous), 11/100 blocks
+Exit status is 1
diff --git a/tests/f_miss_blk_bmap/expect.2 b/tests/f_miss_blk_bmap/expect.2
new file mode 100644
index 0000000..83f92ea
--- /dev/null
+++ b/tests/f_miss_blk_bmap/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 11/100 blocks
+Exit status is 0
diff --git a/tests/f_miss_blk_bmap/image.gz b/tests/f_miss_blk_bmap/image.gz
new file mode 100644
index 0000000..680dbe0
--- /dev/null
+++ b/tests/f_miss_blk_bmap/image.gz
Binary files differ
diff --git a/tests/f_miss_blk_bmap/name b/tests/f_miss_blk_bmap/name
new file mode 100644
index 0000000..c059443
--- /dev/null
+++ b/tests/f_miss_blk_bmap/name
@@ -0,0 +1 @@
+missing block bitmap
diff --git a/tests/f_miss_journal/expect.1 b/tests/f_miss_journal/expect.1
new file mode 100644
index 0000000..d435952
--- /dev/null
+++ b/tests/f_miss_journal/expect.1
@@ -0,0 +1,28 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(50--1079)
+Fix? yes
+
+Free blocks count wrong for group #0 (968, counted=1998).
+Fix? yes
+
+Free blocks count wrong (968, counted=1998).
+Fix? yes
+
+Recreate journal? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/2048 blocks
+Exit status is 1
diff --git a/tests/f_miss_journal/expect.2 b/tests/f_miss_journal/expect.2
new file mode 100644
index 0000000..ad32763
--- /dev/null
+++ b/tests/f_miss_journal/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/2048 blocks
+Exit status is 0
diff --git a/tests/f_miss_journal/image.gz b/tests/f_miss_journal/image.gz
new file mode 100644
index 0000000..674d348
--- /dev/null
+++ b/tests/f_miss_journal/image.gz
Binary files differ
diff --git a/tests/f_miss_journal/name b/tests/f_miss_journal/name
new file mode 100644
index 0000000..b26d998
--- /dev/null
+++ b/tests/f_miss_journal/name
@@ -0,0 +1 @@
+non-existent journal inode
diff --git a/tests/f_misstable/expect.1 b/tests/f_misstable/expect.1
new file mode 100644
index 0000000..a8cf264
--- /dev/null
+++ b/tests/f_misstable/expect.1
@@ -0,0 +1,49 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for inode table
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+Inode table for group 1 is not in group. (block 0)
+WARNING: SEVERE DATA LOSS POSSIBLE.
+Relocate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Relocating group 1's inode table to 8197...
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'etc' in / (2) has deleted/unused inode 1505. Clear? yes
+
+Entry 'cache' in / (2) has deleted/unused inode 1514. Clear? yes
+
+Entry 'a' in / (2) has deleted/unused inode 1515. Clear? yes
+
+Entry 'b' in / (2) has deleted/unused inode 1516. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 2 ref count is 8, should be 4. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(8385--8405)
+Fix? yes
+
+Free blocks count wrong for group #0 (7987, counted=7984).
+Fix? yes
+
+Free blocks count wrong (11602, counted=11599).
+Fix? yes
+
+Inode bitmap differences: -(1505--1516)
+Fix? yes
+
+Free inodes count wrong for group #0 (1493, counted=1489).
+Fix? yes
+
+Directories count wrong for group #0 (2, counted=3).
+Fix? yes
+
+Free inodes count wrong (2997, counted=2993).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/3008 files (0.0% non-contiguous), 401/12000 blocks
+Exit status is 1
diff --git a/tests/f_misstable/expect.2 b/tests/f_misstable/expect.2
new file mode 100644
index 0000000..e8cd21a
--- /dev/null
+++ b/tests/f_misstable/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/3008 files (0.0% non-contiguous), 401/12000 blocks
+Exit status is 0
diff --git a/tests/f_misstable/image.gz b/tests/f_misstable/image.gz
new file mode 100644
index 0000000..b2aca9d
--- /dev/null
+++ b/tests/f_misstable/image.gz
Binary files differ
diff --git a/tests/f_misstable/name b/tests/f_misstable/name
new file mode 100644
index 0000000..10a1adc
--- /dev/null
+++ b/tests/f_misstable/name
@@ -0,0 +1 @@
+missing inode table
diff --git a/tests/f_mke2fs2b/expect.1 b/tests/f_mke2fs2b/expect.1
new file mode 100644
index 0000000..5ffedcb
--- /dev/null
+++ b/tests/f_mke2fs2b/expect.1
@@ -0,0 +1,25 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Root inode has dtime set (probably due to old mke2fs). Fix? yes
+
+Inode 11 is in use, but has dtime set. Fix? yes
+
+Inode 15 is in use, but has dtime set. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached zero-length inode 15. Clear? yes
+
+Pass 5: Checking group summary information
+Free inodes count wrong for group #0 (18, counted=17).
+Fix? yes
+
+Free inodes count wrong (18, counted=17).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 1
diff --git a/tests/f_mke2fs2b/expect.2 b/tests/f_mke2fs2b/expect.2
new file mode 100644
index 0000000..10455d7
--- /dev/null
+++ b/tests/f_mke2fs2b/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 0
diff --git a/tests/f_mke2fs2b/image.gz b/tests/f_mke2fs2b/image.gz
new file mode 100644
index 0000000..6b7412c
--- /dev/null
+++ b/tests/f_mke2fs2b/image.gz
Binary files differ
diff --git a/tests/f_mke2fs2b/name b/tests/f_mke2fs2b/name
new file mode 100644
index 0000000..bf2202a
--- /dev/null
+++ b/tests/f_mke2fs2b/name
@@ -0,0 +1 @@
+mke2fs version 0.2b created filesystem
diff --git a/tests/f_mke2fs_baddisk/script b/tests/f_mke2fs_baddisk/script
new file mode 100644
index 0000000..7ce8c5c
--- /dev/null
+++ b/tests/f_mke2fs_baddisk/script
@@ -0,0 +1,24 @@
+test_description="mke2fs /dev/mapper/bad_disk should fail"
+
+OUT=$test_name.log
+
+dmsetup create -v bad_disk --table '0 1148681097 error' > $OUT 2>&1
+status=$?
+if [ "$status" != 0 ]; then
+ echo "$test_name: $test_description: skip"
+ touch $test_name.ok
+else
+ echo mke2fs /dev/mapper/bad_disk >> $OUT
+ $MKE2FS /dev/mapper/bad_disk >> $OUT 2>&1
+ status=$?
+ sleep 1
+ dmsetup remove --retry bad_disk >> $OUT 2>&1
+
+ if [ "$status" = 0 ] ; then
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+ else
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+ fi
+fi
diff --git a/tests/f_mmp/is_slow_test b/tests/f_mmp/is_slow_test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/f_mmp/is_slow_test
diff --git a/tests/f_mmp/name b/tests/f_mmp/name
new file mode 100644
index 0000000..20d66d6
--- /dev/null
+++ b/tests/f_mmp/name
@@ -0,0 +1 @@
+disable MMP with tune2fs after e2fsck killed
diff --git a/tests/f_mmp/script b/tests/f_mmp/script
new file mode 100644
index 0000000..f433bd5
--- /dev/null
+++ b/tests/f_mmp/script
@@ -0,0 +1,71 @@
+FSCK_OPT=-yf
+
+echo "make the test image ..." > $test_name.log
+$MKE2FS -q -F -o Linux -b 4096 -O mmp -E mmp_update_interval=1 $TMPFILE 100 >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O mmp failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+kill_debugfs() {
+ trap 0
+ PID=$(ps -o pid,command | grep -v grep |
+ grep "debugfs -w $TMPFILE" | awk "{ print \$1 }")
+ [ "x$PID" != "x" ] && kill -9 $PID
+}
+
+# this will cause debugfs to create the $test_name.mark file once it has
+# passed the MMP startup, then continue reading input until it is killed
+MARKFILE=$test_name.new
+rm -f $MARKFILE
+trap kill_debugfs EXIT
+echo "set mmp sequence to EXT2_MMP_SEQ_FSCK..." >> $test_name.log
+( { echo dump_mmp; echo "dump_inode <2> $MARKFILE"; cat /dev/zero; } |
+ $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1 & ) > /dev/null 2>&1 &
+echo "wait until debugfs has started ..." >> $test_name.log
+while [ ! -e $MARKFILE ]; do
+ sleep 1
+done
+rm -f $MARKFILE
+echo "kill debugfs abruptly (simulates e2fsck failure) ..." >> $test_name.log
+kill_debugfs
+
+$E2MMPSTATUS $TMPFILE > $test_name.log 2>&1
+status=$?
+if [ "$status" != 1 ] ; then
+ echo "$E2MMPSTATUS with EXT2_MMP_SEQ_FSCK passed!" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return 1
+fi
+
+echo "e2fsck (should fail mmp_seq = EXT2_MMP_SEQ_FSCK) ..." >> $test_name.log
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "e2fsck with MMP as EXT2_MMP_SEQ_FSCK ran!" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return 1
+fi
+
+echo "clear mmp_seq with tune2fs ..." >> $test_name.log
+$TUNE2FS -f -E clear_mmp $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs clearing EXT2_MMP_SEQ_FSCK failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return 1
+fi
+
+echo "run e2fsck again (should pass with clean mmp_seq) ..." >> $test_name.log
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "e2fsck after clearing EXT2_MMP_SEQ_FSCK failed"> $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+echo "$test_name: $test_description: ok"
+rm -f $TMPFILE
diff --git a/tests/f_mmp_garbage/expect.1 b/tests/f_mmp_garbage/expect.1
new file mode 100644
index 0000000..4134eae
--- /dev/null
+++ b/tests/f_mmp_garbage/expect.1
@@ -0,0 +1,9 @@
+Superblock has invalid MMP magic. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 15/100 blocks
+Exit status is 0
diff --git a/tests/f_mmp_garbage/expect.2 b/tests/f_mmp_garbage/expect.2
new file mode 100644
index 0000000..3bca182
--- /dev/null
+++ b/tests/f_mmp_garbage/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 15/100 blocks
+Exit status is 0
diff --git a/tests/f_mmp_garbage/is_slow_test b/tests/f_mmp_garbage/is_slow_test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/f_mmp_garbage/is_slow_test
diff --git a/tests/f_mmp_garbage/name b/tests/f_mmp_garbage/name
new file mode 100644
index 0000000..17e0b14
--- /dev/null
+++ b/tests/f_mmp_garbage/name
@@ -0,0 +1 @@
+repair MMP when it is corrupted
diff --git a/tests/f_mmp_garbage/script b/tests/f_mmp_garbage/script
new file mode 100644
index 0000000..69be338
--- /dev/null
+++ b/tests/f_mmp_garbage/script
@@ -0,0 +1,17 @@
+FSCK_OPT=-yf
+
+echo "make the test image ..." > $test_name.log
+$MKE2FS -q -F -o Linux -b 4096 -O mmp -E mmp_update_interval=1 $TMPFILE 100 >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O mmp failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+# create a corrupted image
+echo "modify the mmp sequence ..." >> $test_name.log
+$DEBUGFS -w -R "set_mmp_value magic 0x12345678" $TMPFILE >> $test_name.log 2>&1
+
+SKIP_GUNZIP=true
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_no/expect b/tests/f_no/expect
new file mode 100644
index 0000000..140a01f
--- /dev/null
+++ b/tests/f_no/expect
@@ -0,0 +1,50 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 999999999, len 1)
+Clear<y>? no
+Inode 12 has an invalid extent
+ (logical block 1, invalid physical block 9999999999, len 1)
+Clear<y>? no
+Inode 13 is in use, but has dtime set. Fix<y>? no
+Inode 13 has an invalid extent
+ (logical block 1, invalid physical block 8888888888888, len 1)
+Clear<y>? no
+Inode 13 has an invalid extent
+ (logical block 0, invalid physical block 888888888888, len 1)
+Clear<y>? no
+Inodes that were part of a corrupted orphan linked list found. Fix<y>? no
+Inode 14 was part of the orphaned inode list. IGNORED.
+Inode 14 is in use, but has dtime set. Fix<y>? no
+Inode 14 has an invalid extent
+ (logical block 300, invalid physical block 777777777777, len 300)
+Clear<y>? no
+Inode 14 has an invalid extent
+ (logical block 0, invalid physical block 7777777777, len 1)
+Clear<y>? no
+Inode 14, i_blocks is 52574694748113, should be 0. Fix<y>? no
+Pass 2: Checking directory structure
+Extended attribute block for inode 12 (/a) is invalid (999999).
+Clear<y>? no
+Extended attribute block for inode 13 (/b) is invalid (298954296).
+Clear<y>? no
+Extended attribute block for inode 14 (/c) is invalid (388697201).
+Clear<y>? no
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 12 ref count is 34463, should be 1. Fix<y>? no
+Inode 13 ref count is 9999, should be 1. Fix<y>? no
+Inode 14 ref count is 12241, should be 1. Fix<y>? no
+Pass 5: Checking group summary information
+Block bitmap differences: -202 -381 -457
+Fix<y>? no
+Free blocks count wrong for group #0 (0, counted=491).
+Fix<y>? no
+Free blocks count wrong (494, counted=491).
+Fix<y>? no
+Free inodes count wrong for group #0 (4294967293, counted=114).
+Fix<y>? no
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 4
diff --git a/tests/f_no/script b/tests/f_no/script
new file mode 100644
index 0000000..c046d76
--- /dev/null
+++ b/tests/f_no/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with repeated no"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/../f_yesall/image.gz > $TMPFILE
+
+echo "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_no_cache_corrupt_inode/expect.1 b/tests/f_no_cache_corrupt_inode/expect.1
new file mode 100644
index 0000000..4f82f75
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/expect.1
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 passes checks, but checksum does not match inode. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 1
diff --git a/tests/f_no_cache_corrupt_inode/expect.2 b/tests/f_no_cache_corrupt_inode/expect.2
new file mode 100644
index 0000000..1b43315
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
diff --git a/tests/f_no_cache_corrupt_inode/image.gz b/tests/f_no_cache_corrupt_inode/image.gz
new file mode 100644
index 0000000..e17e921
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/image.gz
Binary files differ
diff --git a/tests/f_no_cache_corrupt_inode/name b/tests/f_no_cache_corrupt_inode/name
new file mode 100644
index 0000000..fb213e2
--- /dev/null
+++ b/tests/f_no_cache_corrupt_inode/name
@@ -0,0 +1 @@
+don't cache inodes that fail checksum verification
diff --git a/tests/f_noroot/expect.1 b/tests/f_noroot/expect.1
new file mode 100644
index 0000000..f8f652e
--- /dev/null
+++ b/tests/f_noroot/expect.1
@@ -0,0 +1,39 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Inode 15 is in use, but has dtime set. Fix? yes
+
+Pass 2: Checking directory structure
+Entry '..' in /lost+found (11) has deleted/unused inode 2. Clear? yes
+
+Entry '..' in /foo (12) has deleted/unused inode 2. Clear? yes
+
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+Unconnected directory inode 11 (was in /)
+Connect to /lost+found? yes
+
+/lost+found not found. Create? yes
+
+Unconnected directory inode 12 (was in /lost+found)
+Connect to /lost+found? yes
+
+Pass 4: Checking reference counts
+Inode 11 ref count is 3, should be 2. Fix? yes
+
+Inode 12 ref count is 4, should be 3. Fix? yes
+
+Unattached zero-length inode 15. Clear? yes
+
+Pass 5: Checking group summary information
+Free inodes count wrong for group #0 (17, counted=16).
+Fix? yes
+
+Free inodes count wrong (17, counted=16).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 1
diff --git a/tests/f_noroot/expect.2 b/tests/f_noroot/expect.2
new file mode 100644
index 0000000..5ea5bc7
--- /dev/null
+++ b/tests/f_noroot/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 0
diff --git a/tests/f_noroot/image.gz b/tests/f_noroot/image.gz
new file mode 100644
index 0000000..0a87e99
--- /dev/null
+++ b/tests/f_noroot/image.gz
Binary files differ
diff --git a/tests/f_noroot/name b/tests/f_noroot/name
new file mode 100644
index 0000000..a70ebc2
--- /dev/null
+++ b/tests/f_noroot/name
@@ -0,0 +1 @@
+missing root directory
diff --git a/tests/f_nospc_create_lnf/expect.1 b/tests/f_nospc_create_lnf/expect.1
new file mode 100644
index 0000000..986fe12
--- /dev/null
+++ b/tests/f_nospc_create_lnf/expect.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Cannot allocate space for /lost+found.
+Place lost files in root directory instead? yes
+
+Insufficient space to recover lost files!
+Move data off the filesystem and re-run e2fsck.
+
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Unattached inode 125
+Connect to /lost+found? yes
+
+Inode 125 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (496, counted=495).
+Fix? yes
+
+Free blocks count wrong (496, counted=495).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 128/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_nospc_create_lnf/expect.2 b/tests/f_nospc_create_lnf/expect.2
new file mode 100644
index 0000000..e9757f8
--- /dev/null
+++ b/tests/f_nospc_create_lnf/expect.2
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+/lost+found not found. Create? yes
+
+Cannot allocate space for /lost+found.
+Place lost files in root directory instead? yes
+
+Insufficient space to recover lost files!
+Move data off the filesystem and re-run e2fsck.
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -9
+Fix? yes
+
+Free blocks count wrong for group #0 (494, counted=495).
+Fix? yes
+
+Free blocks count wrong (494, counted=495).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 128/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_nospc_create_lnf/image.gz b/tests/f_nospc_create_lnf/image.gz
new file mode 100644
index 0000000..dc71b61
--- /dev/null
+++ b/tests/f_nospc_create_lnf/image.gz
Binary files differ
diff --git a/tests/f_nospc_create_lnf/name b/tests/f_nospc_create_lnf/name
new file mode 100644
index 0000000..df6c932
--- /dev/null
+++ b/tests/f_nospc_create_lnf/name
@@ -0,0 +1 @@
+no space to create lost+found
diff --git a/tests/f_okgroup/expect.1 b/tests/f_okgroup/expect.1
new file mode 100644
index 0000000..7d29741
--- /dev/null
+++ b/tests/f_okgroup/expect.1
@@ -0,0 +1,9 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 274/8193 blocks
+Exit status is 0
diff --git a/tests/f_okgroup/expect.2 b/tests/f_okgroup/expect.2
new file mode 100644
index 0000000..44856c0
--- /dev/null
+++ b/tests/f_okgroup/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 274/8193 blocks
+Exit status is 0
diff --git a/tests/f_okgroup/image.gz b/tests/f_okgroup/image.gz
new file mode 100644
index 0000000..06b67c7
--- /dev/null
+++ b/tests/f_okgroup/image.gz
Binary files differ
diff --git a/tests/f_okgroup/name b/tests/f_okgroup/name
new file mode 100644
index 0000000..3da66af
--- /dev/null
+++ b/tests/f_okgroup/name
@@ -0,0 +1 @@
+8193 block long filesystem
diff --git a/tests/f_opt_extent/expect b/tests/f_opt_extent/expect
new file mode 100644
index 0000000..9d2021e
--- /dev/null
+++ b/tests/f_opt_extent/expect
@@ -0,0 +1,55 @@
+tune2fs metadata_csum test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+
+
+Change in FS metadata:
+@@ -11,7 +11,7 @@
+ Block count: 524288
+ Reserved block count: 26214
+ Overhead clusters: 35246
+-Free blocks: 570
++Free blocks: 567
+ Free inodes: 65047
+ First block: 1
+ Block size: 1024
+@@ -50,8 +50,8 @@
+ Block bitmap at 262 (+261)
+ Inode bitmap at 278 (+277)
+ Inode table at 294-549 (+293)
+- 21 free blocks, 535 free inodes, 3 directories, 535 unused inodes
+- Free blocks: 4414-4434
++ 18 free blocks, 535 free inodes, 3 directories, 535 unused inodes
++ Free blocks: 4417-4434
+ Free inodes: 490-1024
+ Group 1: (Blocks 8193-16384) [INODE_UNINIT]
+ Backup superblock at 8193, Group descriptors at 8194-8197
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/f_opt_extent/name b/tests/f_opt_extent/name
new file mode 100644
index 0000000..7d4389c
--- /dev/null
+++ b/tests/f_opt_extent/name
@@ -0,0 +1 @@
+optimize extent tree
diff --git a/tests/f_opt_extent/script b/tests/f_opt_extent/script
new file mode 100644
index 0000000..001c727
--- /dev/null
+++ b/tests/f_opt_extent/script
@@ -0,0 +1,64 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit,metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /xyz
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check
+$FSCK -fyD -N test_filesys $TMPFILE >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/f_opt_extent_ext3/expect b/tests/f_opt_extent_ext3/expect
new file mode 100644
index 0000000..1761471
--- /dev/null
+++ b/tests/f_opt_extent_ext3/expect
@@ -0,0 +1,44 @@
+rebuild extent metadata_csum test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+mke2fs: Operation not supported for inodes containing extents while creating huge files
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+
+
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file huge_file dir_nlink
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent sparse_super large_file huge_file dir_nlink
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/f_opt_extent_ext3/name b/tests/f_opt_extent_ext3/name
new file mode 100644
index 0000000..b369685
--- /dev/null
+++ b/tests/f_opt_extent_ext3/name
@@ -0,0 +1 @@
+convert ext3 to extent tree
diff --git a/tests/f_opt_extent_ext3/script b/tests/f_opt_extent_ext3/script
new file mode 100644
index 0000000..ef8c906
--- /dev/null
+++ b/tests/f_opt_extent_ext3/script
@@ -0,0 +1,65 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,^extent,huge_file,^flex_bg,^uninit_bg,dir_nlink,^extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,^64bit,^metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ num_hugefiles = 100
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "rebuild extent metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check
+$FSCK -fyD -N test_filesys -E bmap2extent $TMPFILE >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/f_orphan/expect.1 b/tests/f_orphan/expect.1
new file mode 100644
index 0000000..087ebee
--- /dev/null
+++ b/tests/f_orphan/expect.1
@@ -0,0 +1,14 @@
+Clearing orphaned inode 15 (uid=0, gid=0, mode=040755, size=1024)
+Clearing orphaned inode 17 (uid=0, gid=0, mode=0100644, size=0)
+Clearing orphaned inode 16 (uid=0, gid=0, mode=040755, size=1024)
+Clearing orphaned inode 14 (uid=0, gid=0, mode=0100644, size=69)
+Clearing orphaned inode 13 (uid=0, gid=0, mode=040755, size=1024)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/2048 files (0.0% non-contiguous), 1303/8192 blocks
+Exit status is 0
diff --git a/tests/f_orphan/expect.2 b/tests/f_orphan/expect.2
new file mode 100644
index 0000000..359c937
--- /dev/null
+++ b/tests/f_orphan/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/2048 files (0.0% non-contiguous), 1303/8192 blocks
+Exit status is 0
diff --git a/tests/f_orphan/image.gz b/tests/f_orphan/image.gz
new file mode 100644
index 0000000..cada434
--- /dev/null
+++ b/tests/f_orphan/image.gz
Binary files differ
diff --git a/tests/f_orphan/name b/tests/f_orphan/name
new file mode 100644
index 0000000..4f9f3d5
--- /dev/null
+++ b/tests/f_orphan/name
@@ -0,0 +1 @@
+clearing orphan inodes
diff --git a/tests/f_orphan_dotdot_ft/expect.1 b/tests/f_orphan_dotdot_ft/expect.1
new file mode 100644
index 0000000..6092495
--- /dev/null
+++ b/tests/f_orphan_dotdot_ft/expect.1
@@ -0,0 +1,56 @@
+Pass 1: Checking inodes, blocks, and sizes
+Special (device/socket/fifo) inode 12 has non-zero size. Fix? yes
+
+Inode 12, i_blocks is 2, should be 0. Fix? yes
+
+Pass 2: Checking directory structure
+Entry 'dir' in / (2) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Entry '..' in <12>/<13> (13) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Entry '..' in <12>/<14> (14) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Entry '..' in <12>/<15> (15) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Pass 3: Checking directory connectivity
+Unconnected directory inode 13 (was in <12>)
+Connect to /lost+found? yes
+
+Unconnected directory inode 14 (was in <12>)
+Connect to /lost+found? yes
+
+Unconnected directory inode 15 (was in <12>)
+Connect to /lost+found? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Inode 13 ref count is 3, should be 2. Fix? yes
+
+Inode 14 ref count is 3, should be 2. Fix? yes
+
+Inode 15 ref count is 3, should be 2. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -23
+Fix? yes
+
+Free blocks count wrong for group #0 (73, counted=74).
+Fix? yes
+
+Free blocks count wrong (73, counted=74).
+Fix? yes
+
+Directories count wrong for group #0 (6, counted=5).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 1
diff --git a/tests/f_orphan_dotdot_ft/expect.2 b/tests/f_orphan_dotdot_ft/expect.2
new file mode 100644
index 0000000..fc68e79
--- /dev/null
+++ b/tests/f_orphan_dotdot_ft/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 0
diff --git a/tests/f_orphan_dotdot_ft/image.gz b/tests/f_orphan_dotdot_ft/image.gz
new file mode 100644
index 0000000..cb91a64
--- /dev/null
+++ b/tests/f_orphan_dotdot_ft/image.gz
Binary files differ
diff --git a/tests/f_orphan_dotdot_ft/name b/tests/f_orphan_dotdot_ft/name
new file mode 100644
index 0000000..8362e9e
--- /dev/null
+++ b/tests/f_orphan_dotdot_ft/name
@@ -0,0 +1 @@
+filetype of .. in orphaned directories
diff --git a/tests/f_orphan_extents_inode/expect.1 b/tests/f_orphan_extents_inode/expect.1
new file mode 100644
index 0000000..5d713b3
--- /dev/null
+++ b/tests/f_orphan_extents_inode/expect.1
@@ -0,0 +1,10 @@
+Truncating orphaned inode 12 (uid=0, gid=0, mode=0100644, size=0)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_orphan_extents_inode/expect.2 b/tests/f_orphan_extents_inode/expect.2
new file mode 100644
index 0000000..4ee5d96
--- /dev/null
+++ b/tests/f_orphan_extents_inode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_orphan_extents_inode/image.gz b/tests/f_orphan_extents_inode/image.gz
new file mode 100644
index 0000000..6c57fef
--- /dev/null
+++ b/tests/f_orphan_extents_inode/image.gz
Binary files differ
diff --git a/tests/f_orphan_extents_inode/name b/tests/f_orphan_extents_inode/name
new file mode 100644
index 0000000..fc48ec2
--- /dev/null
+++ b/tests/f_orphan_extents_inode/name
@@ -0,0 +1 @@
+truncating an orphaned extent-mapped inode
diff --git a/tests/f_orphan_indirect_inode/expect.1 b/tests/f_orphan_indirect_inode/expect.1
new file mode 100644
index 0000000..814a688
--- /dev/null
+++ b/tests/f_orphan_indirect_inode/expect.1
@@ -0,0 +1,3 @@
+test_filesys: Truncating orphaned inode 12 (uid=0, gid=0, mode=0100644, size=0)
+test_filesys: clean, 12/16 files, 21/100 blocks
+Exit status is 0
diff --git a/tests/f_orphan_indirect_inode/expect.2 b/tests/f_orphan_indirect_inode/expect.2
new file mode 100644
index 0000000..4ee5d96
--- /dev/null
+++ b/tests/f_orphan_indirect_inode/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_orphan_indirect_inode/image.gz b/tests/f_orphan_indirect_inode/image.gz
new file mode 100644
index 0000000..54b3909
--- /dev/null
+++ b/tests/f_orphan_indirect_inode/image.gz
Binary files differ
diff --git a/tests/f_orphan_indirect_inode/name b/tests/f_orphan_indirect_inode/name
new file mode 100644
index 0000000..04ccb31
--- /dev/null
+++ b/tests/f_orphan_indirect_inode/name
@@ -0,0 +1 @@
+truncating an orphaned inode in preen mode
diff --git a/tests/f_orphan_indirect_inode/script b/tests/f_orphan_indirect_inode/script
new file mode 100644
index 0000000..ea3b93a
--- /dev/null
+++ b/tests/f_orphan_indirect_inode/script
@@ -0,0 +1,2 @@
+FSCK_OPT=-p
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_orphquot/expect b/tests/f_orphquot/expect
new file mode 100644
index 0000000..0f75dec
--- /dev/null
+++ b/tests/f_orphquot/expect
@@ -0,0 +1,16 @@
+Clearing orphaned inode 12 (uid=1000, gid=100, mode=0100644, size=3145728)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesystem: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesystem: 11/512 files (9.1% non-contiguous), 1070/2048 blocks
+Exit status is 0
+ user id space quota limit inodes quota limit
+ 0 20480 0 0 2 0 0
+ 1000 0 5000 6000 0 50 60
+ group id space quota limit inodes quota limit
+ 0 20480 0 0 2 0 0
+ 100 0 6000 7000 0 60 70
diff --git a/tests/f_orphquot/image.bz2 b/tests/f_orphquot/image.bz2
new file mode 100644
index 0000000..7ac17a0
--- /dev/null
+++ b/tests/f_orphquot/image.bz2
Binary files differ
diff --git a/tests/f_orphquot/script b/tests/f_orphquot/script
new file mode 100644
index 0000000..e17bff0
--- /dev/null
+++ b/tests/f_orphquot/script
@@ -0,0 +1,28 @@
+test_description="e2fsck with quota and orphan inodes"
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+bzip2 -dc < $test_dir/image.bz2 > $TMPFILE
+
+rm -rf $OUT
+$FSCK -f -y -N test_filesystem $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+$DEBUGFS -R 'lq user' $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -R 'lq group' $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_overfsblks/expect.1 b/tests/f_overfsblks/expect.1
new file mode 100644
index 0000000..bc8f2a8
--- /dev/null
+++ b/tests/f_overfsblks/expect.1
@@ -0,0 +1,21 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for inode bitmap
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Group 0's inode bitmap at 3 conflicts with some other fs block.
+Relocate? yes
+
+Relocating group 0's inode bitmap from 3 to 4...
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -(12--21)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 1
diff --git a/tests/f_overfsblks/expect.2 b/tests/f_overfsblks/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/tests/f_overfsblks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
+Exit status is 0
diff --git a/tests/f_overfsblks/image.gz b/tests/f_overfsblks/image.gz
new file mode 100644
index 0000000..60b6b2e
--- /dev/null
+++ b/tests/f_overfsblks/image.gz
Binary files differ
diff --git a/tests/f_overfsblks/name b/tests/f_overfsblks/name
new file mode 100644
index 0000000..8ab6040
--- /dev/null
+++ b/tests/f_overfsblks/name
@@ -0,0 +1 @@
+overlapping inode and block bitmaps
diff --git a/tests/f_pre_1970_date_encoding/expect b/tests/f_pre_1970_date_encoding/expect
new file mode 100644
index 0000000..1a71571
--- /dev/null
+++ b/tests/f_pre_1970_date_encoding/expect
@@ -0,0 +1,45 @@
+times for year-1909 =
+ ctime: 0x8e475440:00000003
+ atime: 0x8e475440:00000003
+ mtime: 0x8e475440:00000003
+crtime: 0x8e475440:00000003
+times for year-1979 =
+ ctime: 0x11db6940:00000000
+ atime: 0x11db6940:00000000
+ mtime: 0x11db6940:00000000
+crtime: 0x11db6940:00000000
+times for year-2039 =
+ ctime: 0x82a37b40:00000001
+ atime: 0x82a37b40:00000001
+ mtime: 0x82a37b40:00000001
+crtime: 0x82a37b40:00000001
+times for year-2139 =
+ ctime: 0x3e9b9940:00000001
+ atime: 0x3e9b9940:00000001
+ mtime: 0x3e9b9940:00000001
+crtime: 0x3e9b9940:00000001
+times for year-1909 =
+ ctime: 0x8e475440:00000000
+ atime: 0x8e475440:00000000
+ mtime: 0x8e475440:00000000
+crtime: 0x8e475440:00000000
+times for year-1979 =
+ ctime: 0x11db6940:00000000
+ atime: 0x11db6940:00000000
+ mtime: 0x11db6940:00000000
+crtime: 0x11db6940:00000000
+times for year-2039 =
+ ctime: 0x82a37b40:00000001
+ atime: 0x82a37b40:00000001
+ mtime: 0x82a37b40:00000001
+crtime: 0x82a37b40:00000001
+times for year-2139 =
+ ctime: 0x3e9b9940:00000001
+ atime: 0x3e9b9940:00000001
+ mtime: 0x3e9b9940:00000001
+crtime: 0x3e9b9940:00000001
+times for year-1909 =
+ ctime: 0x8e475440:00000003
+ atime: 0x8e475440:00000003
+ mtime: 0x8e475440:00000003
+crtime: 0x8e475440:00000003
diff --git a/tests/f_pre_1970_date_encoding/name b/tests/f_pre_1970_date_encoding/name
new file mode 100644
index 0000000..9805324
--- /dev/null
+++ b/tests/f_pre_1970_date_encoding/name
@@ -0,0 +1 @@
+correct mis-encoded pre-1970 dates
diff --git a/tests/f_pre_1970_date_encoding/script b/tests/f_pre_1970_date_encoding/script
new file mode 100644
index 0000000..952e550
--- /dev/null
+++ b/tests/f_pre_1970_date_encoding/script
@@ -0,0 +1,106 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+OUT=$test_name.log
+TIMESTAMPS=$test_name.timestamps.log
+EXP=$test_dir/expect
+FSCK_OPT=-yf
+
+create_file_with_xtime_and_extra() {
+ name=$1
+ time=$2
+ extra=$3
+ {
+ echo "write /dev/null $name"
+ for xtime in atime ctime mtime crtime; do
+ echo "set_inode_field $name $xtime @$time"
+ echo "set_inode_field $name ${xtime}_extra $extra"
+ done
+ } | $DEBUGFS -w $TMPFILE >> $OUT 2>&1
+}
+
+get_file_xtime_and_extra() {
+ name=$1
+ echo "times for $name =" >> $TIMESTAMPS
+ $DEBUGFS -R "stat $name" $TMPFILE 2>&1 | egrep '^( a| c| m|cr)time:' |
+ sed 's/ --.*//' >> $TIMESTAMPS
+}
+
+rm -f $OUT $TIMESTAMPS
+
+# create an empty ext4 filesystem with 256-byte inodes for testing
+> $TMPFILE
+echo mkfs.ext4 -b 1024 -q -I 256 $TMPFILE 5000 >> $OUT
+$MKE2FS -t ext4 -b 1024 -q -I 256 -F $TMPFILE 5000 >> $OUT 2>&1
+
+# this is a pre-1970 file encoded with the old encoding.
+# fsck should repair this
+create_file_with_xtime_and_extra year-1909 -1907928000 3
+
+# these are all already encoded correctly
+create_file_with_xtime_and_extra year-1979 299592000 0
+create_file_with_xtime_and_extra year-2039 2191752000 1
+create_file_with_xtime_and_extra year-2139 5345352000 1
+
+# confirm that the xtime is wrong on the pre-1970 file
+get_file_xtime_and_extra year-1909
+
+# and confirm that it is right on the remaining files
+get_file_xtime_and_extra year-1979
+get_file_xtime_and_extra year-2039
+get_file_xtime_and_extra year-2139
+
+# before we repair the filesystem, save off a copy so that
+# we can use it later
+
+cp -a $TMPFILE $TMPFILE.sav
+
+# repair the filesystem
+E2FSCK_TIME=1386393539 $FSCK $FSCK_OPT $TMPFILE >> $OUT 2>&1
+
+# check that the dates and xtime_extra on the file is now correct
+get_file_xtime_and_extra year-1909
+
+# check that the remaining dates have not been altered
+get_file_xtime_and_extra year-1979
+get_file_xtime_and_extra year-2039
+get_file_xtime_and_extra year-2139
+
+if test $SIZEOF_TIME_T -gt 4
+then
+ # now we need to check that after the year 2242, e2fsck does not
+ # modify dates with extra_xtime=3
+
+ # restore the unrepaired filesystem
+ mv $TMPFILE.sav $TMPFILE
+
+ #retry the repair
+ E2FSCK_TIME=9270393539 $FSCK $FSCK_OPT $TMPFILE >> $OUT 2>&1
+
+ # check that the 1909 file is unaltered (i.e. it has a post-2378 date)
+ get_file_xtime_and_extra year-1909
+else
+ rm -f TMPFILE.sav
+cat << EOF >> $TIMESTAMPS
+times for year-1909 =
+ ctime: 0x8e475440:00000003
+ atime: 0x8e475440:00000003
+ mtime: 0x8e475440:00000003
+crtime: 0x8e475440:00000003
+EOF
+fi
+
+cmp -s $TIMESTAMPS $EXP
+status=$?
+
+if [ "$status" = 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $TIMESTAMPS > $test_name.failed
+fi
+
+unset OUT TIMESTAMPS EXP FSCK_OPT
diff --git a/tests/f_preen/expect.1 b/tests/f_preen/expect.1
new file mode 100644
index 0000000..dd20572
--- /dev/null
+++ b/tests/f_preen/expect.1
@@ -0,0 +1,12 @@
+test_filesys: Note: if several inode or block bitmap blocks or part
+of the inode table require relocation, you may wish to try
+running e2fsck with the '-b 8193' option first. The problem
+may lie only with the primary block group descriptors, and
+the backup block group descriptors may be OK.
+
+test_filesys: Block bitmap for group 0 is not in group. (block 0)
+
+
+test_filesys: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
+ (i.e., without -a or -p options)
+Exit status is 4
diff --git a/tests/f_preen/expect.2 b/tests/f_preen/expect.2
new file mode 100644
index 0000000..a7f6ce1
--- /dev/null
+++ b/tests/f_preen/expect.2
@@ -0,0 +1,30 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (8042, counted=7614).
+Fix? yes
+
+Free blocks count wrong for group #1 (170, counted=169).
+Fix? yes
+
+Free blocks count wrong (8212, counted=7783).
+Fix? yes
+
+Free inodes count wrong for group #0 (1053, counted=1052).
+Fix? yes
+
+Free inodes count wrong for group #1 (1064, counted=1063).
+Fix? yes
+
+Directories count wrong for group #1 (0, counted=1).
+Fix? yes
+
+Free inodes count wrong (2117, counted=2115).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/2128 files (0.0% non-contiguous), 717/8500 blocks
+Exit status is 1
diff --git a/tests/f_preen/image.gz b/tests/f_preen/image.gz
new file mode 100644
index 0000000..3aa7ca0
--- /dev/null
+++ b/tests/f_preen/image.gz
Binary files differ
diff --git a/tests/f_preen/name b/tests/f_preen/name
new file mode 100644
index 0000000..75a3a4f
--- /dev/null
+++ b/tests/f_preen/name
@@ -0,0 +1 @@
+preen shouldn't destroy backup superblocks
diff --git a/tests/f_preen/script b/tests/f_preen/script
new file mode 100644
index 0000000..40ed11c
--- /dev/null
+++ b/tests/f_preen/script
@@ -0,0 +1,4 @@
+FSCK_OPT=-pf
+SECOND_FSCK_OPT=-yfb8193
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_quota/debugfs-cmds b/tests/f_quota/debugfs-cmds
new file mode 100644
index 0000000..112a3ff
--- /dev/null
+++ b/tests/f_quota/debugfs-cmds
@@ -0,0 +1,7 @@
+list_quota user
+list_quota group
+get_quota user 0
+get_quota user 100
+get_quota user 34
+get_quota group 0
+
diff --git a/tests/f_quota/expect.0 b/tests/f_quota/expect.0
new file mode 100644
index 0000000..2645485
--- /dev/null
+++ b/tests/f_quota/expect.0
@@ -0,0 +1,21 @@
+debugfs: list_quota user
+ user id space quota limit inodes quota limit
+ 0 13312 0 0 2 0 0
+ 34 1024 0 0 1 0 0
+ 100 2048 32 50 2 20 30
+debugfs: list_quota group
+ group id space quota limit inodes quota limit
+ 0 16384 0 0 5 0 0
+debugfs: get_quota user 0
+ user id space quota limit inodes quota limit
+ 0 13312 0 0 2 0 0
+debugfs: get_quota user 100
+ user id space quota limit inodes quota limit
+ 100 2048 32 50 2 20 30
+debugfs: get_quota user 34
+ user id space quota limit inodes quota limit
+ 34 1024 0 0 1 0 0
+debugfs: get_quota group 0
+ group id space quota limit inodes quota limit
+ 0 16384 0 0 5 0 0
+debugfs:
diff --git a/tests/f_quota/expect.1 b/tests/f_quota/expect.1
new file mode 100644
index 0000000..0b3b4cf
--- /dev/null
+++ b/tests/f_quota/expect.1
@@ -0,0 +1,13 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (13312, 2) != expected (14336, 3)
+[QUOTA WARNING] Usage inconsistent for ID 100:actual (2048, 2) != expected (1024, 1)
+Update quota info for quota type 0? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (14.3% non-contiguous), 36/100 blocks
+Exit status is 1
diff --git a/tests/f_quota/expect.2 b/tests/f_quota/expect.2
new file mode 100644
index 0000000..bfc558d
--- /dev/null
+++ b/tests/f_quota/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/16 files (14.3% non-contiguous), 36/100 blocks
+Exit status is 0
diff --git a/tests/f_quota/image.gz b/tests/f_quota/image.gz
new file mode 100644
index 0000000..9cea655
--- /dev/null
+++ b/tests/f_quota/image.gz
Binary files differ
diff --git a/tests/f_quota/name b/tests/f_quota/name
new file mode 100644
index 0000000..27ea8ba
--- /dev/null
+++ b/tests/f_quota/name
@@ -0,0 +1 @@
+fix incorrect usage stats in quota
diff --git a/tests/f_quota/script b/tests/f_quota/script
new file mode 100644
index 0000000..bbe6a9f
--- /dev/null
+++ b/tests/f_quota/script
@@ -0,0 +1,11 @@
+AFTER_CMD='$DEBUGFS -f $test_dir/debugfs-cmds $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
+PASS_ZERO=true
+
+$TUNE2FS -h 2>&1 | grep -q quota_options
+if [ $? != 0 ] ; then
+ rm -f $TMPFILE
+ echo "$test_name: $test_description: skipped (quota not enabled)"
+ return 0
+fi
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_quota_extent_opt/expect.1 b/tests/f_quota_extent_opt/expect.1
new file mode 100644
index 0000000..002c9b6
--- /dev/null
+++ b/tests/f_quota_extent_opt/expect.1
@@ -0,0 +1,15 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 extent tree (at level 1) could be narrower. Optimize? yes
+
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (147456, 3) != expected (148480, 3)
+Update quota info for quota type 0? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/1024 files (25.0% non-contiguous), 1339/4096 blocks
+Exit status is 1
diff --git a/tests/f_quota_extent_opt/expect.2 b/tests/f_quota_extent_opt/expect.2
new file mode 100644
index 0000000..0bd4632
--- /dev/null
+++ b/tests/f_quota_extent_opt/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/1024 files (25.0% non-contiguous), 1339/4096 blocks
+Exit status is 0
diff --git a/tests/f_quota_extent_opt/image.gz b/tests/f_quota_extent_opt/image.gz
new file mode 100644
index 0000000..21dcfbd
--- /dev/null
+++ b/tests/f_quota_extent_opt/image.gz
Binary files differ
diff --git a/tests/f_quota_extent_opt/name b/tests/f_quota_extent_opt/name
new file mode 100644
index 0000000..8c5d7a9
--- /dev/null
+++ b/tests/f_quota_extent_opt/name
@@ -0,0 +1 @@
+extent optimization with quota
diff --git a/tests/f_quota_invalid_inum/expect.1 b/tests/f_quota_invalid_inum/expect.1
new file mode 100644
index 0000000..322ac09
--- /dev/null
+++ b/tests/f_quota_invalid_inum/expect.1
@@ -0,0 +1,15 @@
+Invalid user quota inode 808464432. Fix? yes
+
+Invalid group quota inode 808464432. Fix? yes
+
+Invalid project quota inode 808464432. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_quota_invalid_inum/expect.2 b/tests/f_quota_invalid_inum/expect.2
new file mode 100644
index 0000000..41ceefb
--- /dev/null
+++ b/tests/f_quota_invalid_inum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_quota_invalid_inum/image.gz b/tests/f_quota_invalid_inum/image.gz
new file mode 100644
index 0000000..28be80e
--- /dev/null
+++ b/tests/f_quota_invalid_inum/image.gz
Binary files differ
diff --git a/tests/f_quota_invalid_inum/name b/tests/f_quota_invalid_inum/name
new file mode 100644
index 0000000..a742406
--- /dev/null
+++ b/tests/f_quota_invalid_inum/name
@@ -0,0 +1 @@
+invalid quota inode numbers
diff --git a/tests/f_readonly_fsck/expect b/tests/f_readonly_fsck/expect
new file mode 100644
index 0000000..994dfa4
--- /dev/null
+++ b/tests/f_readonly_fsck/expect
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong (4294968254, counted=958).
+Fix? no
+
+test_filesys: 11/256 files (9.1% non-contiguous), 18446744069414585410/2048 blocks
+Exit status is 0
+crc did not change. 2466215161
diff --git a/tests/f_readonly_fsck/image.gz b/tests/f_readonly_fsck/image.gz
new file mode 100644
index 0000000..59f9cd9
--- /dev/null
+++ b/tests/f_readonly_fsck/image.gz
Binary files differ
diff --git a/tests/f_readonly_fsck/name b/tests/f_readonly_fsck/name
new file mode 100644
index 0000000..97ab428
--- /dev/null
+++ b/tests/f_readonly_fsck/name
@@ -0,0 +1 @@
+ensure that a readonly check doesn't modify the fs
diff --git a/tests/f_readonly_fsck/script b/tests/f_readonly_fsck/script
new file mode 100644
index 0000000..528199d
--- /dev/null
+++ b/tests/f_readonly_fsck/script
@@ -0,0 +1,43 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+gzip -d < $test_dir/image.gz > $TMPFILE
+
+old="$($CRCSUM < $TMPFILE)"
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+new="$($CRCSUM < $TMPFILE)"
+
+if [ "${old}" != "${new}" ]; then
+ echo "ERROR: crc mismatch! ${old} ${new}" >> $OUT.new
+else
+ echo "crc did not change. ${old}" >> $OUT.new
+fi
+
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP old new
diff --git a/tests/f_rebuild_csum_rootdir/expect.1 b/tests/f_rebuild_csum_rootdir/expect.1
new file mode 100644
index 0000000..063fb8c
--- /dev/null
+++ b/tests/f_rebuild_csum_rootdir/expect.1
@@ -0,0 +1,306 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Directory inode 2, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 2.
+Fix? yes
+
+Missing '..' in directory inode 2.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in / (2) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+Unconnected directory inode 11 (was in /)
+Connect to /lost+found? yes
+
+/lost+found not found. Create? yes
+
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Inode 11 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 12
+Connect to /lost+found? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 13
+Connect to /lost+found? yes
+
+Inode 13 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 14
+Connect to /lost+found? yes
+
+Inode 14 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 15
+Connect to /lost+found? yes
+
+Inode 15 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 16
+Connect to /lost+found? yes
+
+Inode 16 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 17
+Connect to /lost+found? yes
+
+Inode 17 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 18
+Connect to /lost+found? yes
+
+Inode 18 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 19
+Connect to /lost+found? yes
+
+Inode 19 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 20
+Connect to /lost+found? yes
+
+Inode 20 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 21
+Connect to /lost+found? yes
+
+Inode 21 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 22
+Connect to /lost+found? yes
+
+Inode 22 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 23
+Connect to /lost+found? yes
+
+Inode 23 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 24
+Connect to /lost+found? yes
+
+Inode 24 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 25
+Connect to /lost+found? yes
+
+Inode 25 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 26
+Connect to /lost+found? yes
+
+Inode 26 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 27
+Connect to /lost+found? yes
+
+Inode 27 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 28
+Connect to /lost+found? yes
+
+Inode 28 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 29
+Connect to /lost+found? yes
+
+Inode 29 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 30
+Connect to /lost+found? yes
+
+Inode 30 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 31
+Connect to /lost+found? yes
+
+Inode 31 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 32
+Connect to /lost+found? yes
+
+Inode 32 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 33
+Connect to /lost+found? yes
+
+Inode 33 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 34
+Connect to /lost+found? yes
+
+Inode 34 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 35
+Connect to /lost+found? yes
+
+Inode 35 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 36
+Connect to /lost+found? yes
+
+Inode 36 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 37
+Connect to /lost+found? yes
+
+Inode 37 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 38
+Connect to /lost+found? yes
+
+Inode 38 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 39
+Connect to /lost+found? yes
+
+Inode 39 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 40
+Connect to /lost+found? yes
+
+Inode 40 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 41
+Connect to /lost+found? yes
+
+Inode 41 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 42
+Connect to /lost+found? yes
+
+Inode 42 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 43
+Connect to /lost+found? yes
+
+Inode 43 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 44
+Connect to /lost+found? yes
+
+Inode 44 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 45
+Connect to /lost+found? yes
+
+Inode 45 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 46
+Connect to /lost+found? yes
+
+Inode 46 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 47
+Connect to /lost+found? yes
+
+Inode 47 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 48
+Connect to /lost+found? yes
+
+Inode 48 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 49
+Connect to /lost+found? yes
+
+Inode 49 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 50
+Connect to /lost+found? yes
+
+Inode 50 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 51
+Connect to /lost+found? yes
+
+Inode 51 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 52
+Connect to /lost+found? yes
+
+Inode 52 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 53
+Connect to /lost+found? yes
+
+Inode 53 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 54
+Connect to /lost+found? yes
+
+Inode 54 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 55
+Connect to /lost+found? yes
+
+Inode 55 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 56
+Connect to /lost+found? yes
+
+Inode 56 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 57
+Connect to /lost+found? yes
+
+Inode 57 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 58
+Connect to /lost+found? yes
+
+Inode 58 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 59
+Connect to /lost+found? yes
+
+Inode 59 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 60
+Connect to /lost+found? yes
+
+Inode 60 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 61
+Connect to /lost+found? yes
+
+Inode 61 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 62
+Connect to /lost+found? yes
+
+Inode 62 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 63
+Connect to /lost+found? yes
+
+Inode 63 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 64
+Connect to /lost+found? yes
+
+Inode 64 ref count is 2, should be 1. Fix? yes
+
+Unattached zero-length inode 65. Clear? yes
+
+Unattached inode 66
+Connect to /lost+found? yes
+
+Inode 66 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 67
+Connect to /lost+found? yes
+
+Inode 67 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 67/512 files (1.5% non-contiguous), 1127/2048 blocks
+Exit status is 1
diff --git a/tests/f_rebuild_csum_rootdir/expect.2 b/tests/f_rebuild_csum_rootdir/expect.2
new file mode 100644
index 0000000..033f1bf
--- /dev/null
+++ b/tests/f_rebuild_csum_rootdir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 67/512 files (1.5% non-contiguous), 1127/2048 blocks
+Exit status is 0
diff --git a/tests/f_rebuild_csum_rootdir/image.gz b/tests/f_rebuild_csum_rootdir/image.gz
new file mode 100644
index 0000000..a32fd44
--- /dev/null
+++ b/tests/f_rebuild_csum_rootdir/image.gz
Binary files differ
diff --git a/tests/f_rebuild_csum_rootdir/name b/tests/f_rebuild_csum_rootdir/name
new file mode 100644
index 0000000..5ea2097
--- /dev/null
+++ b/tests/f_rebuild_csum_rootdir/name
@@ -0,0 +1 @@
+force rebuild corrupted rootdir w/ metadata_csum
diff --git a/tests/f_recnect_bad/expect.1 b/tests/f_recnect_bad/expect.1
new file mode 100644
index 0000000..685eedf
--- /dev/null
+++ b/tests/f_recnect_bad/expect.1
@@ -0,0 +1,37 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 15, i_size is 51539608576, should be 1024. Fix? yes
+
+Pass 2: Checking directory structure
+i_faddr for inode 15 (/test/quux) is 23, should be zero.
+Clear? yes
+
+i_file_acl for inode 13 (/test/???) is 12, should be zero.
+Clear? yes
+
+i_faddr for inode 13 (/test/???) is 12, should be zero.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Unconnected directory inode 13 (was in /test)
+Connect to /lost+found? yes
+
+Pass 4: Checking reference counts
+Inode 13 ref count is 4, should be 3. Fix? yes
+
+i_file_acl for inode 28 (...) is 4294967295, should be zero.
+Clear? yes
+
+Inode 28 (...) has invalid mode (0177777).
+Clear? yes
+
+Pass 5: Checking group summary information
+Free inodes count wrong for group #0 (18, counted=17).
+Fix? yes
+
+Free inodes count wrong (18, counted=17).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 1
diff --git a/tests/f_recnect_bad/expect.2 b/tests/f_recnect_bad/expect.2
new file mode 100644
index 0000000..fc68e79
--- /dev/null
+++ b/tests/f_recnect_bad/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 0
diff --git a/tests/f_recnect_bad/image.gz b/tests/f_recnect_bad/image.gz
new file mode 100644
index 0000000..37dcdf9
--- /dev/null
+++ b/tests/f_recnect_bad/image.gz
Binary files differ
diff --git a/tests/f_recnect_bad/name b/tests/f_recnect_bad/name
new file mode 100644
index 0000000..c1a9c0c
--- /dev/null
+++ b/tests/f_recnect_bad/name
@@ -0,0 +1 @@
+reconnecting bad inode
diff --git a/tests/f_reconnect/expect.1 b/tests/f_reconnect/expect.1
new file mode 100644
index 0000000..331d8b3
--- /dev/null
+++ b/tests/f_reconnect/expect.1
@@ -0,0 +1,24 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached inode 12
+Connect to /lost+found? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 13
+Connect to /lost+found? yes
+
+Inode 13 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 14
+Connect to /lost+found? yes
+
+Inode 14 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 1
diff --git a/tests/f_reconnect/expect.2 b/tests/f_reconnect/expect.2
new file mode 100644
index 0000000..e848eff
--- /dev/null
+++ b/tests/f_reconnect/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 0
diff --git a/tests/f_reconnect/image.gz b/tests/f_reconnect/image.gz
new file mode 100644
index 0000000..56b92c3
--- /dev/null
+++ b/tests/f_reconnect/image.gz
Binary files differ
diff --git a/tests/f_reconnect/name b/tests/f_reconnect/name
new file mode 100644
index 0000000..c09c23f
--- /dev/null
+++ b/tests/f_reconnect/name
@@ -0,0 +1 @@
+simple disconnected file inode
diff --git a/tests/f_rehash_dir/expect.1 b/tests/f_rehash_dir/expect.1
new file mode 100644
index 0000000..c1449ba
--- /dev/null
+++ b/tests/f_rehash_dir/expect.1
@@ -0,0 +1,10 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 105/2048 files (2.9% non-contiguous), 336/512 blocks
+Exit status is 0
diff --git a/tests/f_rehash_dir/expect.2 b/tests/f_rehash_dir/expect.2
new file mode 100644
index 0000000..3c78fe5
--- /dev/null
+++ b/tests/f_rehash_dir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 105/2048 files (3.8% non-contiguous), 336/512 blocks
+Exit status is 0
diff --git a/tests/f_rehash_dir/image.gz b/tests/f_rehash_dir/image.gz
new file mode 100644
index 0000000..4e36dce
--- /dev/null
+++ b/tests/f_rehash_dir/image.gz
Binary files differ
diff --git a/tests/f_rehash_dir/name b/tests/f_rehash_dir/name
new file mode 100644
index 0000000..a7a869a
--- /dev/null
+++ b/tests/f_rehash_dir/name
@@ -0,0 +1 @@
+optimize htree directories
diff --git a/tests/f_rehash_dir/script b/tests/f_rehash_dir/script
new file mode 100644
index 0000000..f4dcb74
--- /dev/null
+++ b/tests/f_rehash_dir/script
@@ -0,0 +1,3 @@
+FSCK_OPT=-yfD
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_resize_inode/expect b/tests/f_resize_inode/expect
new file mode 100644
index 0000000..c12c92c
--- /dev/null
+++ b/tests/f_resize_inode/expect
@@ -0,0 +1,159 @@
+mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384
+Creating filesystem with 16384 1k blocks and 4096 inodes
+Superblock backups stored on blocks:
+ 1025, 3073, 5121, 7169, 9217
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 0
+-----------------------------------------------
+
+debugfs -R ''set_inode_field <7> block[2] 42'' -w test.img
+Exit status is 0
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (685, counted=686).
+Fix? yes
+
+Free blocks count wrong (13764, counted=13765).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 0
+-----------------------------------------------
+
+debugfs -R ''clri <7>'' -w test.img
+Exit status is 0
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (685, counted=686).
+Fix? yes
+
+Free blocks count wrong (13764, counted=13765).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 0
+-----------------------------------------------
+
+debugfs -R ''set_inode_field <7> bmap[524] 57'' -w test.img
+Exit status is 0
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (685, counted=686).
+Fix? yes
+
+Free blocks count wrong (13764, counted=13765).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 0
+-----------------------------------------------
+
+debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w test.img
+Exit status is 0
+ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 1
+-----------------------------------------------
+
+debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w test.img
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(35--258) -(1059--1282) -(3107--3330) -(5155--5378) -(7203--7426) -(9251--9474)
+Fix? yes
+
+Free blocks count wrong for group #0 (686, counted=910).
+Fix? yes
+
+Free blocks count wrong for group #1 (700, counted=924).
+Fix? yes
+
+Free blocks count wrong for group #3 (700, counted=924).
+Fix? yes
+
+Free blocks count wrong for group #5 (700, counted=924).
+Fix? yes
+
+Free blocks count wrong for group #7 (700, counted=924).
+Fix? yes
+
+Free blocks count wrong for group #9 (700, counted=924).
+Fix? yes
+
+Free blocks count wrong (13765, counted=15109).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 1275/16384 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 1275/16384 blocks
+Exit status is 0
diff --git a/tests/f_resize_inode/script b/tests/f_resize_inode/script
new file mode 100644
index 0000000..58915a7
--- /dev/null
+++ b/tests/f_resize_inode/script
@@ -0,0 +1,115 @@
+test_description="e2fsck with resize_inode"
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-yf
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT.new
+$MKE2FS -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo ----------------------------------------------- >> $OUT.new
+
+echo " " >> $OUT.new
+echo "debugfs -R ''set_inode_field <7> block[2] 42'' -w test.img" >> $OUT.new
+$DEBUGFS -R "set_inode_field <7> block[2] 42" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo ----------------------------------------------- >> $OUT.new
+
+echo " " >> $OUT.new
+echo "debugfs -R ''clri <7>'' -w test.img" >> $OUT.new
+$DEBUGFS -R "clri <7>" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo ----------------------------------------------- >> $OUT.new
+
+echo " " >> $OUT.new
+echo "debugfs -R ''set_inode_field <7> bmap[524] 57'' -w test.img" >> $OUT.new
+$DEBUGFS -R "set_inode_field <7> bmap[524] 57" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo ----------------------------------------------- >> $OUT.new
+
+echo " " >> $OUT.new
+echo "debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w test.img" >> $OUT.new
+$DEBUGFS -R "set_super_value reserved_gdt_blocks 15679" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo ----------------------------------------------- >> $OUT.new
+
+echo " " >> $OUT.new
+echo "debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w test.img" >> $OUT.new
+$DEBUGFS -R "set_super_value reserved_gdt_blocks 32" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_resize_inode_meta_bg/expect.1 b/tests/f_resize_inode_meta_bg/expect.1
new file mode 100644
index 0000000..e248083
--- /dev/null
+++ b/tests/f_resize_inode_meta_bg/expect.1
@@ -0,0 +1,70 @@
+Resize_inode and meta_bg features are enabled. Those features are
+not compatible. Resize inode should be disabled. Fix? yes
+
+Resize_inode not enabled, but the resize inode is non-zero. Clear? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+First entry '' (inode=348) in directory inode 2 (???) should be '.'
+Fix? yes
+
+Missing '..' in directory inode 2.
+Fix? yes
+
+Directory inode 2, block #0, offset 860: directory corrupted
+Salvage? yes
+
+Entry '' in ??? (2) has rec_len of 0, should be 12.
+Fix? yes
+
+Directory inode 11, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 11.
+Fix? yes
+
+Missing '..' in directory inode 11.
+Fix? yes
+
+Directory inode 11, block #1, offset 0: directory corrupted
+Salvage? yes
+
+Directory inode 11, block #2, offset 0: directory corrupted
+Salvage? yes
+
+Entry '' in ??? (11) has a zero-length name.
+Clear? yes
+
+Directory inode 11, block #3, offset 864: directory corrupted
+Salvage? yes
+
+Entry '' in ??? (11) has rec_len of 0, should be 12.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in / (2) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+Unconnected directory inode 11 (was in /)
+Connect to /lost+found? yes
+
+/lost+found not found. Create? yes
+
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Inode 11 ref count is 3, should be 2. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -246
+Fix? yes
+
+Free blocks count wrong for group #0 (160, counted=161).
+Fix? yes
+
+Free blocks count wrong (2714, counted=2715).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/960 files (0.0% non-contiguous), 1125/3840 blocks
+Exit status is 1
diff --git a/tests/f_resize_inode_meta_bg/expect.2 b/tests/f_resize_inode_meta_bg/expect.2
new file mode 100644
index 0000000..0df9a40
--- /dev/null
+++ b/tests/f_resize_inode_meta_bg/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/960 files (0.0% non-contiguous), 1125/3840 blocks
+Exit status is 0
diff --git a/tests/f_resize_inode_meta_bg/image.gz b/tests/f_resize_inode_meta_bg/image.gz
new file mode 100644
index 0000000..9966a7c
--- /dev/null
+++ b/tests/f_resize_inode_meta_bg/image.gz
Binary files differ
diff --git a/tests/f_resize_inode_meta_bg/name b/tests/f_resize_inode_meta_bg/name
new file mode 100644
index 0000000..9493654
--- /dev/null
+++ b/tests/f_resize_inode_meta_bg/name
@@ -0,0 +1 @@
+conflicting features resize_inode and meta_bg
diff --git a/tests/f_salvage_dir/expect.1 b/tests/f_salvage_dir/expect.1
new file mode 100644
index 0000000..3286384
--- /dev/null
+++ b/tests/f_salvage_dir/expect.1
@@ -0,0 +1,19 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Directory inode 13, block #0, offset 48: directory corrupted
+Salvage? yes
+
+Directory inode 12, block #1, offset 0: directory corrupted
+Salvage? yes
+
+Setting filetype for entry 'c' in /test (12) to 1.
+Directory inode 12, block #1, offset 1016: directory corrupted
+Salvage? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 19/64 files (10.5% non-contiguous), 30/100 blocks
+Exit status is 1
diff --git a/tests/f_salvage_dir/expect.2 b/tests/f_salvage_dir/expect.2
new file mode 100644
index 0000000..0b77cd1
--- /dev/null
+++ b/tests/f_salvage_dir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 19/64 files (10.5% non-contiguous), 30/100 blocks
+Exit status is 0
diff --git a/tests/f_salvage_dir/image.gz b/tests/f_salvage_dir/image.gz
new file mode 100644
index 0000000..b0adde7
--- /dev/null
+++ b/tests/f_salvage_dir/image.gz
Binary files differ
diff --git a/tests/f_salvage_dir/name b/tests/f_salvage_dir/name
new file mode 100644
index 0000000..746f43a
--- /dev/null
+++ b/tests/f_salvage_dir/name
@@ -0,0 +1 @@
+salvage corrupted directories
diff --git a/tests/f_sb_extra_isize/expect.1 b/tests/f_sb_extra_isize/expect.1
new file mode 100644
index 0000000..75e239b
--- /dev/null
+++ b/tests/f_sb_extra_isize/expect.1
@@ -0,0 +1,13 @@
+Bad required extra isize in superblock (1). Fix? yes
+
+Bad desired extra isize in superblock (1024). Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 28/200 blocks
+Exit status is 1
diff --git a/tests/f_sb_extra_isize/expect.2 b/tests/f_sb_extra_isize/expect.2
new file mode 100644
index 0000000..c7e0e5f
--- /dev/null
+++ b/tests/f_sb_extra_isize/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 28/200 blocks
+Exit status is 0
diff --git a/tests/f_sb_extra_isize/image.gz b/tests/f_sb_extra_isize/image.gz
new file mode 100644
index 0000000..a7cb827
--- /dev/null
+++ b/tests/f_sb_extra_isize/image.gz
Binary files differ
diff --git a/tests/f_sb_extra_isize/name b/tests/f_sb_extra_isize/name
new file mode 100644
index 0000000..45bab4f
--- /dev/null
+++ b/tests/f_sb_extra_isize/name
@@ -0,0 +1 @@
+check invalid extra_isize fields in superblock
diff --git a/tests/f_selinux/expect.1 b/tests/f_selinux/expect.1
new file mode 100644
index 0000000..d6fcd3b
--- /dev/null
+++ b/tests/f_selinux/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/16 files (0.0% non-contiguous), 21/96 blocks
+Exit status is 0
diff --git a/tests/f_selinux/expect.2 b/tests/f_selinux/expect.2
new file mode 100644
index 0000000..d6fcd3b
--- /dev/null
+++ b/tests/f_selinux/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/16 files (0.0% non-contiguous), 21/96 blocks
+Exit status is 0
diff --git a/tests/f_selinux/image.gz b/tests/f_selinux/image.gz
new file mode 100644
index 0000000..93a67a2
--- /dev/null
+++ b/tests/f_selinux/image.gz
Binary files differ
diff --git a/tests/f_selinux/name b/tests/f_selinux/name
new file mode 100644
index 0000000..4cdf4d2
--- /dev/null
+++ b/tests/f_selinux/name
@@ -0,0 +1 @@
+SELinux generated symlinks with EA data
diff --git a/tests/f_shared_blocks_ok/expect.1 b/tests/f_shared_blocks_ok/expect.1
new file mode 100644
index 0000000..de4363b
--- /dev/null
+++ b/tests/f_shared_blocks_ok/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/32 files (0.0% non-contiguous), 12/64 blocks
+Exit status is 0
diff --git a/tests/f_shared_blocks_ok/expect.2 b/tests/f_shared_blocks_ok/expect.2
new file mode 100644
index 0000000..de4363b
--- /dev/null
+++ b/tests/f_shared_blocks_ok/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/32 files (0.0% non-contiguous), 12/64 blocks
+Exit status is 0
diff --git a/tests/f_shared_blocks_ok/image.gz b/tests/f_shared_blocks_ok/image.gz
new file mode 100644
index 0000000..db747e2
--- /dev/null
+++ b/tests/f_shared_blocks_ok/image.gz
Binary files differ
diff --git a/tests/f_shared_blocks_ok/name b/tests/f_shared_blocks_ok/name
new file mode 100644
index 0000000..c77dbbd
--- /dev/null
+++ b/tests/f_shared_blocks_ok/name
@@ -0,0 +1 @@
+clean check for intentionally shared blocks
diff --git a/tests/f_short_encrypted_dirent/expect.1 b/tests/f_short_encrypted_dirent/expect.1
new file mode 100644
index 0000000..29e1625
--- /dev/null
+++ b/tests/f_short_encrypted_dirent/expect.1
@@ -0,0 +1,17 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Encrypted entry 'motd' in /get_shorty (12) is too short.
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached inode 13
+Connect to /lost+found? yes
+
+Inode 13 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/16 files (0.0% non-contiguous), 24/100 blocks
+Exit status is 1
diff --git a/tests/f_short_encrypted_dirent/expect.2 b/tests/f_short_encrypted_dirent/expect.2
new file mode 100644
index 0000000..1ebd598
--- /dev/null
+++ b/tests/f_short_encrypted_dirent/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/16 files (0.0% non-contiguous), 24/100 blocks
+Exit status is 0
diff --git a/tests/f_short_encrypted_dirent/image.gz b/tests/f_short_encrypted_dirent/image.gz
new file mode 100644
index 0000000..7eb1c95
--- /dev/null
+++ b/tests/f_short_encrypted_dirent/image.gz
Binary files differ
diff --git a/tests/f_short_encrypted_dirent/name b/tests/f_short_encrypted_dirent/name
new file mode 100644
index 0000000..a35028a
--- /dev/null
+++ b/tests/f_short_encrypted_dirent/name
@@ -0,0 +1 @@
+short encrypted directory entry
diff --git a/tests/f_special_ea/expect.1 b/tests/f_special_ea/expect.1
new file mode 100644
index 0000000..54076fe
--- /dev/null
+++ b/tests/f_special_ea/expect.1
@@ -0,0 +1,11 @@
+Backing up journal inode block information.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 17/1024 files (0.0% non-contiguous), 1180/4096 blocks
+Exit status is 1
diff --git a/tests/f_special_ea/image.gz b/tests/f_special_ea/image.gz
new file mode 100644
index 0000000..c447cb7
--- /dev/null
+++ b/tests/f_special_ea/image.gz
Binary files differ
diff --git a/tests/f_special_ea/name b/tests/f_special_ea/name
new file mode 100644
index 0000000..e9fd85b
--- /dev/null
+++ b/tests/f_special_ea/name
@@ -0,0 +1 @@
+special files with extended attributes
diff --git a/tests/f_special_ea/script b/tests/f_special_ea/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_special_ea/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_summary_counts/expect.1 b/tests/f_summary_counts/expect.1
new file mode 100644
index 0000000..ddb14bd
--- /dev/null
+++ b/tests/f_summary_counts/expect.1
@@ -0,0 +1,19 @@
+test_filesys contains a file system with errors, check forced.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (200, counted=80).
+Fix? yes
+
+Free inodes count wrong for group #0 (250, counted=5).
+Fix? yes
+
+Directories count wrong for group #0 (150, counted=2).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 1
diff --git a/tests/f_summary_counts/expect.2 b/tests/f_summary_counts/expect.2
new file mode 100644
index 0000000..44bff62
--- /dev/null
+++ b/tests/f_summary_counts/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 0
diff --git a/tests/f_summary_counts/image.gz b/tests/f_summary_counts/image.gz
new file mode 100644
index 0000000..d527e9a
--- /dev/null
+++ b/tests/f_summary_counts/image.gz
Binary files differ
diff --git a/tests/f_summary_counts/name b/tests/f_summary_counts/name
new file mode 100644
index 0000000..9fd1021
--- /dev/null
+++ b/tests/f_summary_counts/name
@@ -0,0 +1 @@
+incorrect inode/block free counts
diff --git a/tests/f_summary_counts/script b/tests/f_summary_counts/script
new file mode 100644
index 0000000..fc425ef
--- /dev/null
+++ b/tests/f_summary_counts/script
@@ -0,0 +1,4 @@
+FSCK_OPT=-y
+SECOND_FSCK_OPT=-yf
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_super_bad_csum/expect.1 b/tests/f_super_bad_csum/expect.1
new file mode 100644
index 0000000..12adee9
--- /dev/null
+++ b/tests/f_super_bad_csum/expect.1
@@ -0,0 +1,13 @@
+ext2fs_open2: Superblock checksum does not match superblock
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/1024 files (0.0% non-contiguous), 1557/16384 blocks
+Exit status is 0
diff --git a/tests/f_super_bad_csum/expect.2 b/tests/f_super_bad_csum/expect.2
new file mode 100644
index 0000000..dd20919
--- /dev/null
+++ b/tests/f_super_bad_csum/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/1024 files (0.0% non-contiguous), 1557/16384 blocks
+Exit status is 0
diff --git a/tests/f_super_bad_csum/image.bz2 b/tests/f_super_bad_csum/image.bz2
new file mode 100644
index 0000000..cd80d4b
--- /dev/null
+++ b/tests/f_super_bad_csum/image.bz2
Binary files differ
diff --git a/tests/f_super_bad_csum/name b/tests/f_super_bad_csum/name
new file mode 100644
index 0000000..745562f
--- /dev/null
+++ b/tests/f_super_bad_csum/name
@@ -0,0 +1 @@
+bad csum in superblock (metadata_csum)
diff --git a/tests/f_super_bad_csum/script b/tests/f_super_bad_csum/script
new file mode 100755
index 0000000..5c89962
--- /dev/null
+++ b/tests/f_super_bad_csum/script
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+#e2label $TMPFILE test_filesys
+
+# Run fsck to fix things?
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+rm -f $test_name.failed $test_name.ok
+
+$FSCK $FSCK_OPT $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi
+unset EXP1 OUT1 EXP2 OUT2 FSCK_OPT IMAGE
diff --git a/tests/f_toobig_extent_dir/expect.1 b/tests/f_toobig_extent_dir/expect.1
new file mode 100644
index 0000000..610ca3f
--- /dev/null
+++ b/tests/f_toobig_extent_dir/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 is too big. Truncate? yes
+
+Block #4294967281 (90) causes directory to be too big. CLEARED.
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/56 files (0.0% non-contiguous), 28/400 blocks
+Exit status is 1
diff --git a/tests/f_toobig_extent_dir/expect.2 b/tests/f_toobig_extent_dir/expect.2
new file mode 100644
index 0000000..c025645
--- /dev/null
+++ b/tests/f_toobig_extent_dir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/56 files (0.0% non-contiguous), 28/400 blocks
+Exit status is 0
diff --git a/tests/f_toobig_extent_dir/image.gz b/tests/f_toobig_extent_dir/image.gz
new file mode 100644
index 0000000..622f65a
--- /dev/null
+++ b/tests/f_toobig_extent_dir/image.gz
Binary files differ
diff --git a/tests/f_toobig_extent_dir/name b/tests/f_toobig_extent_dir/name
new file mode 100644
index 0000000..d7453ad
--- /dev/null
+++ b/tests/f_toobig_extent_dir/name
@@ -0,0 +1 @@
+directory with a very large lblk in extent
diff --git a/tests/f_trunc_dirent_header/expect.1 b/tests/f_trunc_dirent_header/expect.1
new file mode 100644
index 0000000..33ce473
--- /dev/null
+++ b/tests/f_trunc_dirent_header/expect.1
@@ -0,0 +1,15 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Directory inode 15, block #0, offset 4092: directory corrupted
+Salvage? yes
+
+Directory inode 13, block #1, offset 28: directory corrupted
+Salvage? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 32/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_trunc_dirent_header/expect.2 b/tests/f_trunc_dirent_header/expect.2
new file mode 100644
index 0000000..df81c9d
--- /dev/null
+++ b/tests/f_trunc_dirent_header/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 32/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 0
diff --git a/tests/f_trunc_dirent_header/image.gz b/tests/f_trunc_dirent_header/image.gz
new file mode 100644
index 0000000..9c59bf4
--- /dev/null
+++ b/tests/f_trunc_dirent_header/image.gz
Binary files differ
diff --git a/tests/f_trunc_dirent_header/name b/tests/f_trunc_dirent_header/name
new file mode 100644
index 0000000..e244dbf
--- /dev/null
+++ b/tests/f_trunc_dirent_header/name
@@ -0,0 +1 @@
+no space for dirent header at end of buf
diff --git a/tests/f_uninit_bad_free_inodes/expect.1 b/tests/f_uninit_bad_free_inodes/expect.1
new file mode 100644
index 0000000..23d7b1f
--- /dev/null
+++ b/tests/f_uninit_bad_free_inodes/expect.1
@@ -0,0 +1,25 @@
+Group descriptor 1 has invalid unused inodes count 2048. Fix? yes
+
+Group descriptor 2 has invalid unused inodes count 1344. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free inodes count wrong for group #1 (490, counted=2048).
+Fix? yes
+
+Free inodes count wrong for group #2 (250, counted=1344).
+Fix? yes
+
+Free inodes count wrong for group #3 (1967, counted=1969).
+Fix? yes
+
+Free inodes count wrong (4744, counted=7398).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 794/8192 files (0.4% non-contiguous), 8473/32768 blocks
+Exit status is 1
diff --git a/tests/f_uninit_bad_free_inodes/expect.2 b/tests/f_uninit_bad_free_inodes/expect.2
new file mode 100644
index 0000000..431227b
--- /dev/null
+++ b/tests/f_uninit_bad_free_inodes/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 794/8192 files (0.4% non-contiguous), 8473/32768 blocks
+Exit status is 0
diff --git a/tests/f_uninit_bad_free_inodes/image.gz b/tests/f_uninit_bad_free_inodes/image.gz
new file mode 100644
index 0000000..3e6218b
--- /dev/null
+++ b/tests/f_uninit_bad_free_inodes/image.gz
Binary files differ
diff --git a/tests/f_uninit_bad_free_inodes/name b/tests/f_uninit_bad_free_inodes/name
new file mode 100644
index 0000000..8bd3180
--- /dev/null
+++ b/tests/f_uninit_bad_free_inodes/name
@@ -0,0 +1 @@
+bad free inode count, but good checksum
diff --git a/tests/f_uninit_blk_used_not_set/expect.1 b/tests/f_uninit_blk_used_not_set/expect.1
new file mode 100644
index 0000000..9e473f8
--- /dev/null
+++ b/tests/f_uninit_blk_used_not_set/expect.1
@@ -0,0 +1,34 @@
+Group descriptor 1 has invalid unused inodes count 2048. Fix? yes
+
+Group descriptor 2 has invalid unused inodes count 2048. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Group 1 block(s) in use but group is marked BLOCK_UNINIT
+Fix? yes
+
+Block bitmap differences: +(8585--8777)
+Fix? yes
+
+Free blocks count wrong for group #2 (0, counted=7934).
+Fix? yes
+
+Free blocks count wrong (19530, counted=27464).
+Fix? yes
+
+Free inodes count wrong for group #1 (0, counted=2048).
+Fix? yes
+
+Free inodes count wrong for group #2 (0, counted=2048).
+Fix? yes
+
+Free inodes count wrong (4084, counted=8180).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/8192 files (8.3% non-contiguous), 5304/32768 blocks
+Exit status is 1
diff --git a/tests/f_uninit_blk_used_not_set/expect.2 b/tests/f_uninit_blk_used_not_set/expect.2
new file mode 100644
index 0000000..17d0cfa
--- /dev/null
+++ b/tests/f_uninit_blk_used_not_set/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/8192 files (8.3% non-contiguous), 5304/32768 blocks
+Exit status is 0
diff --git a/tests/f_uninit_blk_used_not_set/image.gz b/tests/f_uninit_blk_used_not_set/image.gz
new file mode 100644
index 0000000..6316285
--- /dev/null
+++ b/tests/f_uninit_blk_used_not_set/image.gz
Binary files differ
diff --git a/tests/f_uninit_blk_used_not_set/name b/tests/f_uninit_blk_used_not_set/name
new file mode 100644
index 0000000..e6ee718
--- /dev/null
+++ b/tests/f_uninit_blk_used_not_set/name
@@ -0,0 +1 @@
+blocks used but block uninit set
diff --git a/tests/f_uninit_cat/expect b/tests/f_uninit_cat/expect
new file mode 100644
index 0000000..0c0a5cf
--- /dev/null
+++ b/tests/f_uninit_cat/expect
Binary files differ
diff --git a/tests/f_uninit_cat/image.gz b/tests/f_uninit_cat/image.gz
new file mode 100644
index 0000000..d2ae66c
--- /dev/null
+++ b/tests/f_uninit_cat/image.gz
Binary files differ
diff --git a/tests/f_uninit_cat/name b/tests/f_uninit_cat/name
new file mode 100644
index 0000000..f6b5674
--- /dev/null
+++ b/tests/f_uninit_cat/name
@@ -0,0 +1 @@
+cat a file with uninit blocks
diff --git a/tests/f_uninit_cat/script b/tests/f_uninit_cat/script
new file mode 100755
index 0000000..31a1988
--- /dev/null
+++ b/tests/f_uninit_cat/script
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.gz
+
+gzip -d < $IMAGE > $TMPFILE
+#e2label $TMPFILE test_filesys
+
+# Run fsck to fix things?
+EXP=$test_dir/expect
+OUT=$test_name.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+echo "Exit status is $?" >> $OUT.new
+
+echo "debugfs cat uninit file" >> $OUT.new
+echo "ex /a" > $TMPFILE.cmd
+echo "cat /a" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+echo >> $OUT.new
+sed -f $cmd_dir/filter.sed < $OUT.new > $OUT
+rm -f $OUT.new $TMPFILE $TMPFILE.cmd
+
+# Figure out what happened
+if cmp -s $EXP $OUT; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT >> $test_name.failed
+fi
+unset EXP OUT FSCK_OPT IMAGE
diff --git a/tests/f_uninit_checksum_bad/expect.1 b/tests/f_uninit_checksum_bad/expect.1
new file mode 100644
index 0000000..4ff8a8b
--- /dev/null
+++ b/tests/f_uninit_checksum_bad/expect.1
@@ -0,0 +1,29 @@
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 1 checksum is 0xbbaa, should be 0xff0b. FIXED.
+Group descriptor 2 has invalid unused inodes count 2048. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #2 (0, counted=7934).
+Fix? yes
+
+Free blocks count wrong (19286, counted=27220).
+Fix? yes
+
+Free inodes count wrong for group #1 (0, counted=2048).
+Fix? yes
+
+Free inodes count wrong for group #2 (0, counted=2048).
+Fix? yes
+
+Free inodes count wrong (4085, counted=8181).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/8192 files (0.0% non-contiguous), 5548/32768 blocks
+Exit status is 1
diff --git a/tests/f_uninit_checksum_bad/expect.2 b/tests/f_uninit_checksum_bad/expect.2
new file mode 100644
index 0000000..38f2334
--- /dev/null
+++ b/tests/f_uninit_checksum_bad/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/8192 files (0.0% non-contiguous), 5548/32768 blocks
+Exit status is 0
diff --git a/tests/f_uninit_checksum_bad/image.gz b/tests/f_uninit_checksum_bad/image.gz
new file mode 100644
index 0000000..8e91e01
--- /dev/null
+++ b/tests/f_uninit_checksum_bad/image.gz
Binary files differ
diff --git a/tests/f_uninit_checksum_bad/name b/tests/f_uninit_checksum_bad/name
new file mode 100644
index 0000000..b9e4a31
--- /dev/null
+++ b/tests/f_uninit_checksum_bad/name
@@ -0,0 +1 @@
+invalid group descriptor checksum
diff --git a/tests/f_uninit_dir/expect.1 b/tests/f_uninit_dir/expect.1
new file mode 100644
index 0000000..31870bd
--- /dev/null
+++ b/tests/f_uninit_dir/expect.1
@@ -0,0 +1,25 @@
+Pass 1: Checking inodes, blocks, and sizes
+Directory inode 12 has extent marked uninitialized at block 0. Fix? yes
+
+Directory inode 14 has extent marked uninitialized at block 0. Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 14, block #0, offset 0: directory corrupted
+Salvage? yes
+
+Missing '.' in directory inode 14.
+Fix? yes
+
+Missing '..' in directory inode 14.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in /abc (14) is <The NULL inode> (0), should be / (2).
+Fix? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (0.0% non-contiguous), 20/512 blocks
+Exit status is 1
diff --git a/tests/f_uninit_dir/expect.2 b/tests/f_uninit_dir/expect.2
new file mode 100644
index 0000000..7b28f43
--- /dev/null
+++ b/tests/f_uninit_dir/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/128 files (0.0% non-contiguous), 20/512 blocks
+Exit status is 0
diff --git a/tests/f_uninit_dir/image.gz b/tests/f_uninit_dir/image.gz
new file mode 100644
index 0000000..ac9131d
--- /dev/null
+++ b/tests/f_uninit_dir/image.gz
Binary files differ
diff --git a/tests/f_uninit_dir/name b/tests/f_uninit_dir/name
new file mode 100644
index 0000000..d7f5bee
--- /dev/null
+++ b/tests/f_uninit_dir/name
@@ -0,0 +1 @@
+fix uninit flag on directory extents and check the dir blocks
diff --git a/tests/f_uninit_disable/expect.1 b/tests/f_uninit_disable/expect.1
new file mode 100644
index 0000000..f568bec
--- /dev/null
+++ b/tests/f_uninit_disable/expect.1
@@ -0,0 +1,10 @@
+Group descriptor 0 marked uninitialized without feature set.
+Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 306/8192 blocks
+Exit status is 1
diff --git a/tests/f_uninit_disable/expect.2 b/tests/f_uninit_disable/expect.2
new file mode 100644
index 0000000..4cd9aa9
--- /dev/null
+++ b/tests/f_uninit_disable/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 306/8192 blocks
+Exit status is 0
diff --git a/tests/f_uninit_disable/image.gz b/tests/f_uninit_disable/image.gz
new file mode 100644
index 0000000..38c7455
--- /dev/null
+++ b/tests/f_uninit_disable/image.gz
Binary files differ
diff --git a/tests/f_uninit_disable/name b/tests/f_uninit_disable/name
new file mode 100644
index 0000000..494b472
--- /dev/null
+++ b/tests/f_uninit_disable/name
@@ -0,0 +1 @@
+disable uninit_bg feature
diff --git a/tests/f_uninit_enable/expect.1 b/tests/f_uninit_enable/expect.1
new file mode 100644
index 0000000..02801bf
--- /dev/null
+++ b/tests/f_uninit_enable/expect.1
@@ -0,0 +1,10 @@
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 0 checksum is 0x0000, should be 0x13f6. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 306/8192 blocks
+Exit status is 1
diff --git a/tests/f_uninit_enable/expect.2 b/tests/f_uninit_enable/expect.2
new file mode 100644
index 0000000..4cd9aa9
--- /dev/null
+++ b/tests/f_uninit_enable/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2048 files (0.0% non-contiguous), 306/8192 blocks
+Exit status is 0
diff --git a/tests/f_uninit_enable/image.gz b/tests/f_uninit_enable/image.gz
new file mode 100644
index 0000000..4da79c9
--- /dev/null
+++ b/tests/f_uninit_enable/image.gz
Binary files differ
diff --git a/tests/f_uninit_enable/name b/tests/f_uninit_enable/name
new file mode 100644
index 0000000..a818f5c
--- /dev/null
+++ b/tests/f_uninit_enable/name
@@ -0,0 +1 @@
+enable uninit_bg feature
diff --git a/tests/f_uninit_ext_past_eof/expect.1 b/tests/f_uninit_ext_past_eof/expect.1
new file mode 100644
index 0000000..762159c
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/1024 files (16.7% non-contiguous), 1227/4096 blocks
+Exit status is 0
diff --git a/tests/f_uninit_ext_past_eof/expect.2 b/tests/f_uninit_ext_past_eof/expect.2
new file mode 100644
index 0000000..762159c
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/1024 files (16.7% non-contiguous), 1227/4096 blocks
+Exit status is 0
diff --git a/tests/f_uninit_ext_past_eof/image.gz b/tests/f_uninit_ext_past_eof/image.gz
new file mode 100644
index 0000000..0b69158
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/image.gz
Binary files differ
diff --git a/tests/f_uninit_ext_past_eof/name b/tests/f_uninit_ext_past_eof/name
new file mode 100644
index 0000000..9e0c6e0
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/name
@@ -0,0 +1 @@
+fallocated extents after i_size
diff --git a/tests/f_uninit_ext_past_eof2/expect.1 b/tests/f_uninit_ext_past_eof2/expect.1
new file mode 100644
index 0000000..eb8248e
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof2/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (8.3% non-contiguous), 70/100 blocks
+Exit status is 0
diff --git a/tests/f_uninit_ext_past_eof2/expect.2 b/tests/f_uninit_ext_past_eof2/expect.2
new file mode 100644
index 0000000..eb8248e
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof2/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/16 files (8.3% non-contiguous), 70/100 blocks
+Exit status is 0
diff --git a/tests/f_uninit_ext_past_eof2/image.gz b/tests/f_uninit_ext_past_eof2/image.gz
new file mode 100644
index 0000000..c739e49
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof2/image.gz
Binary files differ
diff --git a/tests/f_uninit_ext_past_eof2/name b/tests/f_uninit_ext_past_eof2/name
new file mode 100644
index 0000000..025cc44
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof2/name
@@ -0,0 +1 @@
+fallocate extents w/ nonzero i_size and extents > 4
diff --git a/tests/f_uninit_inode_past_unused/expect.1 b/tests/f_uninit_inode_past_unused/expect.1
new file mode 100644
index 0000000..de1ac23
--- /dev/null
+++ b/tests/f_uninit_inode_past_unused/expect.1
@@ -0,0 +1,24 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo' in / (2) references inode 14 found in group 0's unused inodes area.
+Fix? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (2037, counted=2035).
+Fix? yes
+
+Free inodes count wrong (4073, counted=2035).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/2048 files (0.0% non-contiguous), 1336/8192 blocks
+Exit status is 1
diff --git a/tests/f_uninit_inode_past_unused/expect.2 b/tests/f_uninit_inode_past_unused/expect.2
new file mode 100644
index 0000000..bdb029e
--- /dev/null
+++ b/tests/f_uninit_inode_past_unused/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/2048 files (0.0% non-contiguous), 1336/8192 blocks
+Exit status is 0
diff --git a/tests/f_uninit_inode_past_unused/image.gz b/tests/f_uninit_inode_past_unused/image.gz
new file mode 100644
index 0000000..9104a70
--- /dev/null
+++ b/tests/f_uninit_inode_past_unused/image.gz
Binary files differ
diff --git a/tests/f_uninit_inode_past_unused/name b/tests/f_uninit_inode_past_unused/name
new file mode 100644
index 0000000..95d07f1
--- /dev/null
+++ b/tests/f_uninit_inode_past_unused/name
@@ -0,0 +1 @@
+inode in use beyond bg_itable_unused
diff --git a/tests/f_uninit_last_uninit/expect.1 b/tests/f_uninit_last_uninit/expect.1
new file mode 100644
index 0000000..a9a9dc1
--- /dev/null
+++ b/tests/f_uninit_last_uninit/expect.1
@@ -0,0 +1,9 @@
+Last group block bitmap uninitialized. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 109/10000 blocks
+Exit status is 0
diff --git a/tests/f_uninit_last_uninit/expect.2 b/tests/f_uninit_last_uninit/expect.2
new file mode 100644
index 0000000..4593717
--- /dev/null
+++ b/tests/f_uninit_last_uninit/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32 files (0.0% non-contiguous), 109/10000 blocks
+Exit status is 0
diff --git a/tests/f_uninit_last_uninit/name b/tests/f_uninit_last_uninit/name
new file mode 100644
index 0000000..609e684
--- /dev/null
+++ b/tests/f_uninit_last_uninit/name
@@ -0,0 +1 @@
+last group has BLOCK_UNINIT set
diff --git a/tests/f_uninit_last_uninit/script b/tests/f_uninit_last_uninit/script
new file mode 100644
index 0000000..53105a4
--- /dev/null
+++ b/tests/f_uninit_last_uninit/script
@@ -0,0 +1,25 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+
+touch $TMPFILE
+$MKE2FS -N 32 -F -o Linux -O uninit_bg -b 1024 $TMPFILE 10000 > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+set_current_time 20070410210000
+set_super_value lastcheck 0
+set_super_value hash_seed null
+set_super_value mkfs_time 0
+set_bg 1 flags 0x7
+set_bg 1 checksum calc
+q
+EOF
+
+E2FSCK_TIME=200704102100
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+unset E2FSCK_TIME
diff --git a/tests/f_uninit_restart_fsck/expect.1 b/tests/f_uninit_restart_fsck/expect.1
new file mode 100644
index 0000000..64a2d06
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/expect.1
@@ -0,0 +1,32 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo2' in /d1 (1881) references inode 500 found in group 0's unused inodes area.
+Fix? yes
+
+Entry 'foo2' in /d1 (1881) has an incorrect filetype (was 1, should be 0).
+Fix? yes
+
+Entry 'bar2' in /d2 (3761) references inode 2100 found in group 1's unused inodes area.
+Fix? yes
+
+Entry 'bar2' in /d2 (3761) has an incorrect filetype (was 1, should be 0).
+Fix? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo2' in /d1 (1881) has deleted/unused inode 500. Clear? yes
+
+Entry 'bar2' in /d2 (3761) has deleted/unused inode 2100. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached zero-length inode 1883. Clear? yes
+
+Unattached zero-length inode 3763. Clear? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 21/7520 files (0.0% non-contiguous), 2352/30000 blocks
+Exit status is 1
diff --git a/tests/f_uninit_restart_fsck/expect.2 b/tests/f_uninit_restart_fsck/expect.2
new file mode 100644
index 0000000..156eb07
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 21/7520 files (0.0% non-contiguous), 2352/30000 blocks
+Exit status is 0
diff --git a/tests/f_uninit_restart_fsck/image.gz b/tests/f_uninit_restart_fsck/image.gz
new file mode 100644
index 0000000..f073186
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/image.gz
Binary files differ
diff --git a/tests/f_uninit_restart_fsck/name b/tests/f_uninit_restart_fsck/name
new file mode 100644
index 0000000..def2234
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/name
@@ -0,0 +1 @@
+re-start e2fsck only once for inodes in uninit space
diff --git a/tests/f_uninit_set_inode_not_set/expect.1 b/tests/f_uninit_set_inode_not_set/expect.1
new file mode 100644
index 0000000..4ea3f10
--- /dev/null
+++ b/tests/f_uninit_set_inode_not_set/expect.1
@@ -0,0 +1,25 @@
+Group descriptor 1 has invalid unused inodes count 1464. Fix? yes
+
+Group descriptor 2 has invalid unused inodes count 1849. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Group 1 block(s) in use but group is marked BLOCK_UNINIT
+Fix? yes
+
+Block bitmap differences: +(9729--14621)
+Fix? yes
+
+Free inodes count wrong for group #1 (0, counted=1464).
+Fix? yes
+
+Free inodes count wrong for group #2 (0, counted=1849).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 794/8192 files (0.3% non-contiguous), 8473/32768 blocks
+Exit status is 1
diff --git a/tests/f_uninit_set_inode_not_set/expect.2 b/tests/f_uninit_set_inode_not_set/expect.2
new file mode 100644
index 0000000..846c558
--- /dev/null
+++ b/tests/f_uninit_set_inode_not_set/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 794/8192 files (0.3% non-contiguous), 8473/32768 blocks
+Exit status is 0
diff --git a/tests/f_uninit_set_inode_not_set/image.gz b/tests/f_uninit_set_inode_not_set/image.gz
new file mode 100644
index 0000000..cd38e27
--- /dev/null
+++ b/tests/f_uninit_set_inode_not_set/image.gz
Binary files differ
diff --git a/tests/f_uninit_set_inode_not_set/name b/tests/f_uninit_set_inode_not_set/name
new file mode 100644
index 0000000..42b9c53
--- /dev/null
+++ b/tests/f_uninit_set_inode_not_set/name
@@ -0,0 +1 @@
+block uninit set but inode uninit not set
diff --git a/tests/f_unshare_blocks_no_space/expect.1 b/tests/f_unshare_blocks_no_space/expect.1
new file mode 100644
index 0000000..b2f6ab1
--- /dev/null
+++ b/tests/f_unshare_blocks_no_space/expect.1
@@ -0,0 +1,136 @@
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 24: 10
+Multiply-claimed block(s) in inode 25: 9 9 9--10
+Multiply-claimed block(s) in inode 26: 9 9 9--10
+Multiply-claimed block(s) in inode 27: 9 9 9--10
+Multiply-claimed block(s) in inode 28: 9 9 9--10
+Multiply-claimed block(s) in inode 29: 9 9 9--10
+Multiply-claimed block(s) in inode 30: 9 9 9--10
+Multiply-claimed block(s) in inode 31: 9 9 9--10
+Multiply-claimed block(s) in inode 32: 9 9 9--10
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 9 inodes containing multiply-claimed blocks.)
+
+File /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+ has 1 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+File /file18.txt (inode #32, mod time Mon Mar 5 20:30:04 2018)
+ has 4 multiply-claimed block(s), shared with 8 file(s):
+ /file6.txt (inode #31, mod time Mon Mar 5 20:30:04 2018)
+ /file12.txt (inode #30, mod time Mon Mar 5 20:30:04 2018)
+ /file3.txt (inode #29, mod time Mon Mar 5 20:30:04 2018)
+ /file9.txt (inode #28, mod time Mon Mar 5 20:30:04 2018)
+ /file8.txt (inode #27, mod time Mon Mar 5 20:30:04 2018)
+ /file15.txt (inode #26, mod time Mon Mar 5 20:30:04 2018)
+ /file20.txt (inode #25, mod time Mon Mar 5 20:30:04 2018)
+ /file4.txt (inode #24, mod time Mon Mar 5 20:30:04 2018)
+clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block
+Couldn't clone file: Could not allocate block in ext2 filesystem
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+test_filesys: 32/32 files (34.4% non-contiguous), 64/64 blocks
+Exit status is 4
diff --git a/tests/f_unshare_blocks_no_space/expect.2 b/tests/f_unshare_blocks_no_space/expect.2
new file mode 100644
index 0000000..8137dc7
--- /dev/null
+++ b/tests/f_unshare_blocks_no_space/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 32/32 files (34.4% non-contiguous), 64/64 blocks
+Exit status is 1
diff --git a/tests/f_unshare_blocks_no_space/image.gz b/tests/f_unshare_blocks_no_space/image.gz
new file mode 100644
index 0000000..8fff6d4
--- /dev/null
+++ b/tests/f_unshare_blocks_no_space/image.gz
Binary files differ
diff --git a/tests/f_unshare_blocks_no_space/name b/tests/f_unshare_blocks_no_space/name
new file mode 100644
index 0000000..ca323a6
--- /dev/null
+++ b/tests/f_unshare_blocks_no_space/name
@@ -0,0 +1 @@
+unshare blocks should fail with no free space
diff --git a/tests/f_unshare_blocks_no_space/script b/tests/f_unshare_blocks_no_space/script
new file mode 100644
index 0000000..89d2aef
--- /dev/null
+++ b/tests/f_unshare_blocks_no_space/script
@@ -0,0 +1,2 @@
+FSCK_OPT="-y -E unshare_blocks"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_unshare_blocks_ok/expect.1 b/tests/f_unshare_blocks_ok/expect.1
new file mode 100644
index 0000000..e0ea764
--- /dev/null
+++ b/tests/f_unshare_blocks_ok/expect.1
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+
+Running additional passes to resolve blocks claimed by more than one inode...
+Pass 1B: Rescanning for multiply-claimed blocks
+Multiply-claimed block(s) in inode 12: 9
+Multiply-claimed block(s) in inode 13: 9
+Pass 1C: Scanning directories for inodes with multiply-claimed blocks
+Pass 1D: Reconciling multiply-claimed blocks
+(There are 2 inodes containing multiply-claimed blocks.)
+
+File /file2.txt (inode #12, mod time Sat Mar 3 02:12:33 2018)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /file1.txt (inode #13, mod time Sat Mar 3 02:12:15 2018)
+File /file1.txt (inode #13, mod time Sat Mar 3 02:12:15 2018)
+ has 1 multiply-claimed block(s), shared with 1 file(s):
+ /file2.txt (inode #12, mod time Sat Mar 3 02:12:33 2018)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/32 files (0.0% non-contiguous), 13/64 blocks
+Exit status is 0
diff --git a/tests/f_unshare_blocks_ok/expect.2 b/tests/f_unshare_blocks_ok/expect.2
new file mode 100644
index 0000000..b215382
--- /dev/null
+++ b/tests/f_unshare_blocks_ok/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/32 files (0.0% non-contiguous), 13/64 blocks
+Exit status is 0
diff --git a/tests/f_unshare_blocks_ok/image.gz b/tests/f_unshare_blocks_ok/image.gz
new file mode 100644
index 0000000..db747e2
--- /dev/null
+++ b/tests/f_unshare_blocks_ok/image.gz
Binary files differ
diff --git a/tests/f_unshare_blocks_ok/name b/tests/f_unshare_blocks_ok/name
new file mode 100644
index 0000000..e051a62
--- /dev/null
+++ b/tests/f_unshare_blocks_ok/name
@@ -0,0 +1 @@
+unshare blocks successfully
diff --git a/tests/f_unshare_blocks_ok/script b/tests/f_unshare_blocks_ok/script
new file mode 100644
index 0000000..89d2aef
--- /dev/null
+++ b/tests/f_unshare_blocks_ok/script
@@ -0,0 +1,2 @@
+FSCK_OPT="-y -E unshare_blocks"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_unsorted_EAs/expect.1 b/tests/f_unsorted_EAs/expect.1
new file mode 100644
index 0000000..64b9045
--- /dev/null
+++ b/tests/f_unsorted_EAs/expect.1
@@ -0,0 +1,11 @@
+Adding dirhash hint to filesystem.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/2048 files (0.0% non-contiguous), 1294/2048 blocks
+Exit status is 0
diff --git a/tests/f_unsorted_EAs/expect.2 b/tests/f_unsorted_EAs/expect.2
new file mode 100644
index 0000000..414cc29
--- /dev/null
+++ b/tests/f_unsorted_EAs/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/2048 files (0.0% non-contiguous), 1294/2048 blocks
+Exit status is 0
diff --git a/tests/f_unsorted_EAs/image.gz b/tests/f_unsorted_EAs/image.gz
new file mode 100644
index 0000000..42ab502
--- /dev/null
+++ b/tests/f_unsorted_EAs/image.gz
Binary files differ
diff --git a/tests/f_unsorted_EAs/name b/tests/f_unsorted_EAs/name
new file mode 100644
index 0000000..da9c9c3
--- /dev/null
+++ b/tests/f_unsorted_EAs/name
@@ -0,0 +1 @@
+unsorted EAs in inode should not be deleted
diff --git a/tests/f_unused_itable/expect.1 b/tests/f_unused_itable/expect.1
new file mode 100644
index 0000000..ffda3c4
--- /dev/null
+++ b/tests/f_unused_itable/expect.1
@@ -0,0 +1,24 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo' in / (2) references inode 65 found in group 1's unused inodes area.
+Fix? yes
+
+Entry '1' in / (2) references inode 12 found in group 0's unused inodes area.
+Fix? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free inodes count wrong for group #0 (53, counted=51).
+Fix? yes
+
+Free inodes count wrong for group #1 (64, counted=58).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 19/128 files (0.0% non-contiguous), 165/1000 blocks
+Exit status is 1
diff --git a/tests/f_unused_itable/expect.2 b/tests/f_unused_itable/expect.2
new file mode 100644
index 0000000..b79d318
--- /dev/null
+++ b/tests/f_unused_itable/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 19/128 files (0.0% non-contiguous), 165/1000 blocks
+Exit status is 0
diff --git a/tests/f_unused_itable/image.gz b/tests/f_unused_itable/image.gz
new file mode 100644
index 0000000..ca93e98
--- /dev/null
+++ b/tests/f_unused_itable/image.gz
Binary files differ
diff --git a/tests/f_unused_itable/name b/tests/f_unused_itable/name
new file mode 100644
index 0000000..b899aec
--- /dev/null
+++ b/tests/f_unused_itable/name
@@ -0,0 +1 @@
+don't move files to lost+found for bg_unused_itable
diff --git a/tests/f_valid_ea_in_inode/expect.1 b/tests/f_valid_ea_in_inode/expect.1
new file mode 100644
index 0000000..5613bc0
--- /dev/null
+++ b/tests/f_valid_ea_in_inode/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 24/24 files (0.0% non-contiguous), 45/200 blocks
+Exit status is 0
diff --git a/tests/f_valid_ea_in_inode/image.gz b/tests/f_valid_ea_in_inode/image.gz
new file mode 100644
index 0000000..98e72dc
--- /dev/null
+++ b/tests/f_valid_ea_in_inode/image.gz
Binary files differ
diff --git a/tests/f_valid_ea_in_inode/name b/tests/f_valid_ea_in_inode/name
new file mode 100644
index 0000000..3f02877
--- /dev/null
+++ b/tests/f_valid_ea_in_inode/name
@@ -0,0 +1 @@
+valid ea-in-inode examplars
diff --git a/tests/f_valid_ea_in_inode/script b/tests/f_valid_ea_in_inode/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_valid_ea_in_inode/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_verity/expect.1 b/tests/f_verity/expect.1
new file mode 100644
index 0000000..0705967
--- /dev/null
+++ b/tests/f_verity/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 58/128 blocks
+Exit status is 0
diff --git a/tests/f_verity/image.gz b/tests/f_verity/image.gz
new file mode 100644
index 0000000..72dfd81
--- /dev/null
+++ b/tests/f_verity/image.gz
Binary files differ
diff --git a/tests/f_verity/mkimage.sh b/tests/f_verity/mkimage.sh
new file mode 100755
index 0000000..565083e
--- /dev/null
+++ b/tests/f_verity/mkimage.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# This is the script that was used to create the image.gz in this directory.
+
+set -e -u
+
+mkdir -p mnt
+umount mnt &> /dev/null || true
+
+dd if=/dev/zero of=image bs=4096 count=128
+mke2fs -O 'verity,extents' -b 4096 -N 128 image
+mount image mnt
+
+# Create a verity file, but make it fragmented so that it needs at least one
+# extent tree index node, in order to cover the scan_extent_node() case.
+for i in {1..80}; do
+ head -c 4096 /dev/zero > mnt/tmp_$i
+done
+for i in {1..80..2}; do
+ rm mnt/tmp_$i
+done
+head -c $((40 * 4096)) /dev/zero > mnt/file
+fsverity enable mnt/file
+rm mnt/tmp_*
+
+umount mnt
+rmdir mnt
+gzip -9 -f image
diff --git a/tests/f_verity/name b/tests/f_verity/name
new file mode 100644
index 0000000..f43910f
--- /dev/null
+++ b/tests/f_verity/name
@@ -0,0 +1 @@
+verity file
diff --git a/tests/f_verity/script b/tests/f_verity/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_verity/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_write_ea_no_extra_isize/expect.1 b/tests/f_write_ea_no_extra_isize/expect.1
new file mode 100644
index 0000000..43d7d36
--- /dev/null
+++ b/tests/f_write_ea_no_extra_isize/expect.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes
+
+Inode 12 is a zero-length directory. Clear? yes
+
+Pass 2: Checking directory structure
+Entry 'x' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (116, counted=117).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (116, counted=117).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_write_ea_no_extra_isize/expect.2 b/tests/f_write_ea_no_extra_isize/expect.2
new file mode 100644
index 0000000..8025ccb
--- /dev/null
+++ b/tests/f_write_ea_no_extra_isize/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 0
diff --git a/tests/f_write_ea_no_extra_isize/image.gz b/tests/f_write_ea_no_extra_isize/image.gz
new file mode 100644
index 0000000..928daff
--- /dev/null
+++ b/tests/f_write_ea_no_extra_isize/image.gz
Binary files differ
diff --git a/tests/f_write_ea_no_extra_isize/name b/tests/f_write_ea_no_extra_isize/name
new file mode 100644
index 0000000..200e365
--- /dev/null
+++ b/tests/f_write_ea_no_extra_isize/name
@@ -0,0 +1 @@
+write EA when i_extra_size is zero
diff --git a/tests/f_write_ea_toobig_extra_isize/expect.1 b/tests/f_write_ea_toobig_extra_isize/expect.1
new file mode 100644
index 0000000..fc9ba6c
--- /dev/null
+++ b/tests/f_write_ea_toobig_extra_isize/expect.1
@@ -0,0 +1,32 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes
+
+Inode 12 has a extra size (126) which is invalid
+Fix? yes
+
+Inode 12 is a zero-length directory. Clear? yes
+
+Pass 2: Checking directory structure
+Entry 'x' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (116, counted=117).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (116, counted=117).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_write_ea_toobig_extra_isize/expect.2 b/tests/f_write_ea_toobig_extra_isize/expect.2
new file mode 100644
index 0000000..8025ccb
--- /dev/null
+++ b/tests/f_write_ea_toobig_extra_isize/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 0
diff --git a/tests/f_write_ea_toobig_extra_isize/image.gz b/tests/f_write_ea_toobig_extra_isize/image.gz
new file mode 100644
index 0000000..291924b
--- /dev/null
+++ b/tests/f_write_ea_toobig_extra_isize/image.gz
Binary files differ
diff --git a/tests/f_write_ea_toobig_extra_isize/name b/tests/f_write_ea_toobig_extra_isize/name
new file mode 100644
index 0000000..a5ed718
--- /dev/null
+++ b/tests/f_write_ea_toobig_extra_isize/name
@@ -0,0 +1 @@
+write EA when i_extra_size is too big for EA
diff --git a/tests/f_write_ea_toosmall_extra_isize/expect.1 b/tests/f_write_ea_toosmall_extra_isize/expect.1
new file mode 100644
index 0000000..8d9381e
--- /dev/null
+++ b/tests/f_write_ea_toosmall_extra_isize/expect.1
@@ -0,0 +1,32 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes
+
+Inode 12 has a extra size (1) which is invalid
+Fix? yes
+
+Inode 12 is a zero-length directory. Clear? yes
+
+Pass 2: Checking directory structure
+Entry 'x' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Pass 5: Checking group summary information
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (116, counted=117).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (116, counted=117).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 1
diff --git a/tests/f_write_ea_toosmall_extra_isize/expect.2 b/tests/f_write_ea_toosmall_extra_isize/expect.2
new file mode 100644
index 0000000..8025ccb
--- /dev/null
+++ b/tests/f_write_ea_toosmall_extra_isize/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 17/512 blocks
+Exit status is 0
diff --git a/tests/f_write_ea_toosmall_extra_isize/image.gz b/tests/f_write_ea_toosmall_extra_isize/image.gz
new file mode 100644
index 0000000..78a0149
--- /dev/null
+++ b/tests/f_write_ea_toosmall_extra_isize/image.gz
Binary files differ
diff --git a/tests/f_write_ea_toosmall_extra_isize/name b/tests/f_write_ea_toosmall_extra_isize/name
new file mode 100644
index 0000000..a1ebc7f
--- /dev/null
+++ b/tests/f_write_ea_toosmall_extra_isize/name
@@ -0,0 +1 @@
+write EA when i_extra_size is too small
diff --git a/tests/f_yes/expect b/tests/f_yes/expect
new file mode 100644
index 0000000..93b04ef
--- /dev/null
+++ b/tests/f_yes/expect
@@ -0,0 +1,46 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 999999999, len 1)
+Clear<y>? yes
+Inode 12 has an invalid extent
+ (logical block 1, invalid physical block 9999999999, len 1)
+Clear<y>? yes
+Inode 13 is in use, but has dtime set. Fix<y>? yes
+Inode 13 has an invalid extent
+ (logical block 1, invalid physical block 8888888888888, len 1)
+Clear<y>? yes
+Inode 13 has an invalid extent
+ (logical block 0, invalid physical block 888888888888, len 1)
+Clear<y>? yes
+Inodes that were part of a corrupted orphan linked list found. Fix<y>? yes
+Inode 14 was part of the orphaned inode list. FIXED.
+Inode 14 has an invalid extent
+ (logical block 300, invalid physical block 777777777777, len 300)
+Clear<y>? yes
+Inode 14 has an invalid extent
+ (logical block 0, invalid physical block 7777777777, len 1)
+Clear<y>? yes
+Inode 14, i_blocks is 52574694748113, should be 0. Fix<y>? yes
+Pass 2: Checking directory structure
+Extended attribute block for inode 12 (/a) is invalid (999999).
+Clear ('a' enables 'yes' to all) <y>? yes
+Extended attribute block for inode 13 (/b) is invalid (298954296).
+Clear ('a' enables 'yes' to all) <y>? yes
+Extended attribute block for inode 14 (/c) is invalid (388697201).
+Clear ('a' enables 'yes' to all) <y>? yes
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 12 ref count is 34463, should be 1. Fix ('a' enables 'yes' to all) <y>? yes
+Inode 13 ref count is 9999, should be 1. Fix<y>? yes
+Inode 14 ref count is 12241, should be 1. Fix<y>? yes
+Pass 5: Checking group summary information
+Block bitmap differences: -202 -381 -457
+Fix<y>? yes
+Free blocks count wrong for group #0 (0, counted=494).
+Fix<y>? yes
+Free inodes count wrong for group #0 (4294967293, counted=114).
+Fix<y>? yes
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_yes/script b/tests/f_yes/script
new file mode 100644
index 0000000..3cbeb20
--- /dev/null
+++ b/tests/f_yes/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with repeated yes"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/../f_yesall/image.gz > $TMPFILE
+
+echo "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_yesall/expect b/tests/f_yesall/expect
new file mode 100644
index 0000000..757b048
--- /dev/null
+++ b/tests/f_yesall/expect
@@ -0,0 +1,63 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 999999999, len 1)
+Clear<y>? yes to all
+Inode 12 has an invalid extent
+ (logical block 1, invalid physical block 9999999999, len 1)
+Clear? yes
+
+Inode 13 is in use, but has dtime set. Fix? yes
+
+Inode 13 has an invalid extent
+ (logical block 1, invalid physical block 8888888888888, len 1)
+Clear? yes
+
+Inode 13 has an invalid extent
+ (logical block 0, invalid physical block 888888888888, len 1)
+Clear? yes
+
+Inodes that were part of a corrupted orphan linked list found. Fix? yes
+
+Inode 14 was part of the orphaned inode list. FIXED.
+Inode 14 has an invalid extent
+ (logical block 300, invalid physical block 777777777777, len 300)
+Clear? yes
+
+Inode 14 has an invalid extent
+ (logical block 0, invalid physical block 7777777777, len 1)
+Clear? yes
+
+Inode 14, i_blocks is 52574694748113, should be 0. Fix? yes
+
+Pass 2: Checking directory structure
+Extended attribute block for inode 12 (/a) is invalid (999999).
+Clear? yes
+
+Extended attribute block for inode 13 (/b) is invalid (298954296).
+Clear? yes
+
+Extended attribute block for inode 14 (/c) is invalid (388697201).
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 12 ref count is 34463, should be 1. Fix? yes
+
+Inode 13 ref count is 9999, should be 1. Fix? yes
+
+Inode 14 ref count is 12241, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -202 -381 -457
+Fix? yes
+
+Free blocks count wrong for group #0 (0, counted=494).
+Fix? yes
+
+Free inodes count wrong for group #0 (4294967293, counted=114).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_yesall/image.gz b/tests/f_yesall/image.gz
new file mode 100644
index 0000000..0f8b205
--- /dev/null
+++ b/tests/f_yesall/image.gz
Binary files differ
diff --git a/tests/f_yesall/script b/tests/f_yesall/script
new file mode 100644
index 0000000..cb67ee7
--- /dev/null
+++ b/tests/f_yesall/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with yes-to-all"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/image.gz > $TMPFILE
+
+echo "annnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_yesthenall/expect b/tests/f_yesthenall/expect
new file mode 100644
index 0000000..73f35a3
--- /dev/null
+++ b/tests/f_yesthenall/expect
@@ -0,0 +1,53 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 999999999, len 1)
+Clear<y>? yes
+Inode 12 has an invalid extent
+ (logical block 1, invalid physical block 9999999999, len 1)
+Clear<y>? yes
+Inode 13 is in use, but has dtime set. Fix<y>? yes
+Inode 13 has an invalid extent
+ (logical block 1, invalid physical block 8888888888888, len 1)
+Clear<y>? yes
+Inode 13 has an invalid extent
+ (logical block 0, invalid physical block 888888888888, len 1)
+Clear<y>? yes
+Inodes that were part of a corrupted orphan linked list found. Fix<y>? yes
+Inode 14 was part of the orphaned inode list. FIXED.
+Inode 14 has an invalid extent
+ (logical block 300, invalid physical block 777777777777, len 300)
+Clear<y>? yes
+Inode 14 has an invalid extent
+ (logical block 0, invalid physical block 7777777777, len 1)
+Clear<y>? yes
+Inode 14, i_blocks is 52574694748113, should be 0. Fix<y>? yes
+Pass 2: Checking directory structure
+Extended attribute block for inode 12 (/a) is invalid (999999).
+Clear ('a' enables 'yes' to all) <y>? yes
+Extended attribute block for inode 13 (/b) is invalid (298954296).
+Clear ('a' enables 'yes' to all) <y>? yes to all
+Extended attribute block for inode 14 (/c) is invalid (388697201).
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 12 ref count is 34463, should be 1. Fix? yes
+
+Inode 13 ref count is 9999, should be 1. Fix? yes
+
+Inode 14 ref count is 12241, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -202 -381 -457
+Fix? yes
+
+Free blocks count wrong for group #0 (0, counted=494).
+Fix? yes
+
+Free inodes count wrong for group #0 (4294967293, counted=114).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_yesthenall/script b/tests/f_yesthenall/script
new file mode 100644
index 0000000..5f4c8ee
--- /dev/null
+++ b/tests/f_yesthenall/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with yes then yes-to-all"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/../f_yesall/image.gz > $TMPFILE
+
+echo "yyyyyyyyyyannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_yesthenno/expect b/tests/f_yesthenno/expect
new file mode 100644
index 0000000..94bcc6a
--- /dev/null
+++ b/tests/f_yesthenno/expect
@@ -0,0 +1,51 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+ (logical block 0, invalid physical block 999999999, len 1)
+Clear<y>? yes
+Inode 12 has an invalid extent
+ (logical block 1, invalid physical block 9999999999, len 1)
+Clear<y>? yes
+Inode 13 is in use, but has dtime set. Fix<y>? yes
+Inode 13 has an invalid extent
+ (logical block 1, invalid physical block 8888888888888, len 1)
+Clear<y>? yes
+Inode 13 has an invalid extent
+ (logical block 0, invalid physical block 888888888888, len 1)
+Clear<y>? yes
+Inodes that were part of a corrupted orphan linked list found. Fix<y>? yes
+Inode 14 was part of the orphaned inode list. FIXED.
+Inode 14 has an invalid extent
+ (logical block 300, invalid physical block 777777777777, len 300)
+Clear<y>? yes
+Inode 14 has an invalid extent
+ (logical block 0, invalid physical block 7777777777, len 1)
+Clear<y>? yes
+Inode 14, i_blocks is 52574694748113, should be 0. Fix<y>? yes
+Pass 2: Checking directory structure
+Extended attribute block for inode 12 (/a) is invalid (999999).
+Clear ('a' enables 'yes' to all) <y>? yes
+Extended attribute block for inode 13 (/b) is invalid (298954296).
+Clear ('a' enables 'yes' to all) <y>? no
+Extended attribute block for inode 14 (/c) is invalid (388697201).
+Clear<y>? no
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Inode 12 ref count is 34463, should be 1. Fix<y>? no
+Inode 13 ref count is 9999, should be 1. Fix<y>? no
+Inode 14 ref count is 12241, should be 1. Fix<y>? no
+Pass 5: Checking group summary information
+Block bitmap differences: -202 -381 -457
+Fix<y>? no
+Free blocks count wrong for group #0 (0, counted=491).
+Fix<y>? no
+Free blocks count wrong (494, counted=491).
+Fix<y>? no
+Free inodes count wrong for group #0 (4294967293, counted=114).
+Fix<y>? no
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+test_filesys: 14/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 4
diff --git a/tests/f_yesthenno/script b/tests/f_yesthenno/script
new file mode 100644
index 0000000..5bbc0c6
--- /dev/null
+++ b/tests/f_yesthenno/script
@@ -0,0 +1,26 @@
+test_description="e2fsck with yes then no"
+FSCK_OPT=-f
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $test_dir/../f_yesall/image.gz > $TMPFILE
+
+echo "yyyyyyyyyynnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | E2FSCK_FORCE_INTERACTIVE=y $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f tmp_expect
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/f_zero_group/expect.1 b/tests/f_zero_group/expect.1
new file mode 100644
index 0000000..2a07767
--- /dev/null
+++ b/tests/f_zero_group/expect.1
@@ -0,0 +1,23 @@
+ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
+../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (7987, counted=7982).
+Fix? yes
+
+Free blocks count wrong (11602, counted=11597).
+Fix? yes
+
+Free inodes count wrong for group #0 (1493, counted=1488).
+Fix? yes
+
+Free inodes count wrong (2997, counted=2992).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/3008 files (0.0% non-contiguous), 403/12000 blocks
+Exit status is 1
diff --git a/tests/f_zero_group/expect.2 b/tests/f_zero_group/expect.2
new file mode 100644
index 0000000..a833aef
--- /dev/null
+++ b/tests/f_zero_group/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/3008 files (0.0% non-contiguous), 403/12000 blocks
+Exit status is 0
diff --git a/tests/f_zero_group/image.gz b/tests/f_zero_group/image.gz
new file mode 100644
index 0000000..755493c
--- /dev/null
+++ b/tests/f_zero_group/image.gz
Binary files differ
diff --git a/tests/f_zero_group/name b/tests/f_zero_group/name
new file mode 100644
index 0000000..ccb3b96
--- /dev/null
+++ b/tests/f_zero_group/name
@@ -0,0 +1 @@
+fallback for damaged group descriptors
diff --git a/tests/f_zero_inode_size/expect.1 b/tests/f_zero_inode_size/expect.1
new file mode 100644
index 0000000..b8bd7da
--- /dev/null
+++ b/tests/f_zero_inode_size/expect.1
@@ -0,0 +1,11 @@
+ext2fs_open2: The ext2 superblock is corrupt
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/2512 files (0.0% non-contiguous), 415/10000 blocks
+Exit status is 1
diff --git a/tests/f_zero_inode_size/expect.2 b/tests/f_zero_inode_size/expect.2
new file mode 100644
index 0000000..da94806
--- /dev/null
+++ b/tests/f_zero_inode_size/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2512 files (0.0% non-contiguous), 415/10000 blocks
+Exit status is 0
diff --git a/tests/f_zero_inode_size/image.gz b/tests/f_zero_inode_size/image.gz
new file mode 100644
index 0000000..f4503c8
--- /dev/null
+++ b/tests/f_zero_inode_size/image.gz
Binary files differ
diff --git a/tests/f_zero_inode_size/name b/tests/f_zero_inode_size/name
new file mode 100644
index 0000000..ce88d96
--- /dev/null
+++ b/tests/f_zero_inode_size/name
@@ -0,0 +1 @@
+superblock with a zero inode size
diff --git a/tests/f_zero_super/expect.1 b/tests/f_zero_super/expect.1
new file mode 100644
index 0000000..e2b954d
--- /dev/null
+++ b/tests/f_zero_super/expect.1
@@ -0,0 +1,23 @@
+ext2fs_open2: Bad magic number in super-block
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (7987, counted=7982).
+Fix? yes
+
+Free blocks count wrong (11602, counted=11597).
+Fix? yes
+
+Free inodes count wrong for group #0 (1493, counted=1488).
+Fix? yes
+
+Free inodes count wrong (2997, counted=2992).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 16/3008 files (0.0% non-contiguous), 403/12000 blocks
+Exit status is 1
diff --git a/tests/f_zero_super/expect.2 b/tests/f_zero_super/expect.2
new file mode 100644
index 0000000..a833aef
--- /dev/null
+++ b/tests/f_zero_super/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 16/3008 files (0.0% non-contiguous), 403/12000 blocks
+Exit status is 0
diff --git a/tests/f_zero_super/image.gz b/tests/f_zero_super/image.gz
new file mode 100644
index 0000000..eea9140
--- /dev/null
+++ b/tests/f_zero_super/image.gz
Binary files differ
diff --git a/tests/f_zero_super/name b/tests/f_zero_super/name
new file mode 100644
index 0000000..5d99984
--- /dev/null
+++ b/tests/f_zero_super/name
@@ -0,0 +1 @@
+fallback for damaged superblock
diff --git a/tests/f_zero_xattr/expect.1 b/tests/f_zero_xattr/expect.1
new file mode 100644
index 0000000..0733af6
--- /dev/null
+++ b/tests/f_zero_xattr/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/24 files (0.0% non-contiguous), 25/200 blocks
+Exit status is 0
diff --git a/tests/f_zero_xattr/image.gz b/tests/f_zero_xattr/image.gz
new file mode 100644
index 0000000..4005552
--- /dev/null
+++ b/tests/f_zero_xattr/image.gz
Binary files differ
diff --git a/tests/f_zero_xattr/name b/tests/f_zero_xattr/name
new file mode 100644
index 0000000..52aab15
--- /dev/null
+++ b/tests/f_zero_xattr/name
@@ -0,0 +1 @@
+zero length extended attribute in in-inode xattr
diff --git a/tests/f_zero_xattr/script b/tests/f_zero_xattr/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/tests/f_zero_xattr/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/tests/f_zeroed_ext_header/expect.1 b/tests/f_zeroed_ext_header/expect.1
new file mode 100644
index 0000000..2613e9f
--- /dev/null
+++ b/tests/f_zeroed_ext_header/expect.1
@@ -0,0 +1,22 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has corrupt extent header. Clear inode? yes
+
+Pass 2: Checking directory structure
+Entry 'testa' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (115, counted=116).
+Fix? yes
+
+Free inodes count wrong (115, counted=116).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (0.0% non-contiguous), 15/256 blocks
+Exit status is 1
diff --git a/tests/f_zeroed_ext_header/expect.2 b/tests/f_zeroed_ext_header/expect.2
new file mode 100644
index 0000000..177288f
--- /dev/null
+++ b/tests/f_zeroed_ext_header/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (0.0% non-contiguous), 15/256 blocks
+Exit status is 0
diff --git a/tests/f_zeroed_ext_header/image.gz b/tests/f_zeroed_ext_header/image.gz
new file mode 100644
index 0000000..67a4334
--- /dev/null
+++ b/tests/f_zeroed_ext_header/image.gz
Binary files differ
diff --git a/tests/f_zeroed_ext_header/name b/tests/f_zeroed_ext_header/name
new file mode 100644
index 0000000..31394cf
--- /dev/null
+++ b/tests/f_zeroed_ext_header/name
@@ -0,0 +1 @@
+zap inode with zeroed extent header
diff --git a/tests/filter.sed b/tests/filter.sed
new file mode 100644
index 0000000..265f458
--- /dev/null
+++ b/tests/filter.sed
@@ -0,0 +1,42 @@
+/^debugfs [1-9]\.[0-9]*[^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+/^dumpe2fs [1-9]\.[0-9]*[^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+/^e2fsck [1-9]\.[0-9]*[^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+/^mke2fs [1-9]\.[0-9]*[^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+/^resize2fs [1-9]\.[0-9]*[^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+/^tune2fs [1-9]\.[0-9]*[^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+/^e2image [1-9]\.[0-9]*[^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+s/\\015//g
+/automatically checked/d
+/^Directory Hash Seed:/d
+/Discarding device blocks/d
+/^Filesystem created:/d
+/^Filesystem flags:/d
+/^Filesystem UUID:/d
+/^JFS DEBUG:/d
+/^Last write time:/d
+/^Last mount time:/d
+/^Last checked:/d
+/^Lifetime writes:/d
+/^Maximum mount count:/d
+/^Next check after:/d
+/^Suggestion:/d
+/security.selinux/d
+/Reserved blocks uid:/s/ (user .*)//
+/Reserved blocks gid:/s/ (group .*)//
+/whichever comes first/d
+/^ Checksum /d
+s/, csum 0x\([0-9a-f]*\)//g
+s/ csum 0x\([0-9a-f]*\)//g
+/^Checksum:/d
+/^Checksum seed:/d
+s/while trying to open [^ ]*/while trying to open test.img/
+s/he filesystem on [^ ]* /he filesystem on test.img /
+s/^[^ ]* contains a \([a-z]*\) file system /test.img contains a \1 file system /
+s/MMP block [0-9]* from [^ ]*/MMP block from test.img/
+s/safe to mount '.*', MMP/safe to mount 'test.img', MMP/
+s/mmp_device_name: .*/mmp_device_name: test.img/
+s/mmp_node_name: .*/mmp_node_name: test_node/
+s/mmp_update_date: .*/mmp_update_date: test date/
+s/mmp_update_time: .*/mmp_update_time: test_time/
+s/MMP last updated by '.*' on .*/MMP last updated by 'test_node' on test date/
+s/MMP update by '.*' at .*/MMP last updated by 'test_node' on test date/
diff --git a/tests/fuzz/.gitignore b/tests/fuzz/.gitignore
new file mode 100644
index 0000000..381b20a
--- /dev/null
+++ b/tests/fuzz/.gitignore
@@ -0,0 +1,3 @@
+ext2fs_check_directory_fuzzer
+ext2fs_image_read_write_fuzzer
+ext2fs_read_bitmap_fuzzer
diff --git a/tests/fuzz/Makefile.in b/tests/fuzz/Makefile.in
new file mode 100644
index 0000000..949579e
--- /dev/null
+++ b/tests/fuzz/Makefile.in
@@ -0,0 +1,93 @@
+#
+# Makefile for the tests/fuzz directory
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = tests/fuzz
+
+@MCONFIG@
+
+PROGS= ext2fs_check_directory_fuzzer \
+ ext2fs_image_read_write_fuzzer \
+ ext2fs_read_bitmap_fuzzer
+
+SRCS= $(srcdir)/ext2fs_check_directory_fuzzer.cc \
+ $(srcdir)/ext2fs_image_read_write_fuzzer.cc \
+ $(srcdir)/ext2fs_read_bitmap_fuzzer.cc
+
+LOCAL_CFLAGS= @fuzzer_cflags@
+LOCAL_LDFLAGS= @fuzzer_ldflags@
+
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBSUPPORT)
+DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(DEPLIBSUPPORT)
+
+STATIC_LIBS= $(LIBSUPPORT) $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) \
+ $(STATIC_LIBCOM_ERR)
+STATIC_DEPLIBS= $(DEPLIBSUPPORT) $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) \
+ $(DEPSTATIC_LIBCOM_ERR)
+
+FUZZ_LDFLAGS= $(ALL_LDFLAGS)
+FUZZ_DEP= $(STATIC_DEPLIBS) $(srcdir)/Makefile.in
+
+.cc.o:
+ $(E) " CXX $<"
+ $(Q) $(CXX) -c $(ALL_CFLAGS) $< -o $@
+
+@FUZZING_CMT@all:: $(PROGS)
+
+clean::
+ $(RM) -f $(PROGS) *.o
+
+install:
+
+install-strip:
+
+uninstall:
+
+mostlyclean: clean
+distclean: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+ext2fs_check_directory_fuzzer: ext2fs_check_directory_fuzzer.o $(FUZZ_DEP)
+ $(E) " LD $@"
+ $(Q) $(CXX) $(FUZZ_LDFLAGS) -o $@ $< $(STATIC_LIBS) $(SYSLIBS)
+
+ext2fs_image_read_write_fuzzer: ext2fs_image_read_write_fuzzer.o $(FUZZ_DEP)
+ $(E) " LD $@"
+ $(Q) $(CXX) $(FUZZ_LDFLAGS) -o $@ $< $(STATIC_LIBS) $(SYSLIBS)
+
+ext2fs_read_bitmap_fuzzer: ext2fs_read_bitmap_fuzzer.o $(FUZZ_DEP)
+ $(E) " LD $@"
+ $(Q) $(CXX) $(FUZZ_LDFLAGS) -o $@ $< $(STATIC_LIBS) $(SYSLIBS)
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+ext2fs_check_directory_fuzzer.o: $(srcdir)/ext2fs_check_directory_fuzzer.cc \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+ext2fs_image_read_write_fuzzer.o: $(srcdir)/ext2fs_image_read_write_fuzzer.cc \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/print_fs_flags.h
+ext2fs_read_bitmap_fuzzer.o: $(srcdir)/ext2fs_read_bitmap_fuzzer.cc \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(top_srcdir)/lib/support/print_fs_flags.h
diff --git a/tests/fuzz/ext2fs_check_directory_fuzzer.cc b/tests/fuzz/ext2fs_check_directory_fuzzer.cc
new file mode 100644
index 0000000..61cf42f
--- /dev/null
+++ b/tests/fuzz/ext2fs_check_directory_fuzzer.cc
@@ -0,0 +1,43 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <stddef.h>
+#include <stdint.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "ext2fs/ext2fs.h"
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ static const char* fname = "/tmp/ext2_test_file";
+
+ // Write our data to a temp file.
+ int fd = open(fname, O_RDWR|O_CREAT|O_TRUNC);
+ write(fd, data, size);
+ close(fd);
+
+ ext2_filsys fs;
+ errcode_t retval = ext2fs_open(
+ fname,
+ EXT2_FLAG_IGNORE_CSUM_ERRORS, 0, 0,
+ unix_io_manager,
+ &fs);
+
+ if (!retval) {
+ retval = ext2fs_check_directory(fs, EXT2_ROOT_INO);
+ ext2fs_close(fs);
+ }
+
+ return 0;
+}
diff --git a/tests/fuzz/ext2fs_image_read_write_fuzzer.cc b/tests/fuzz/ext2fs_image_read_write_fuzzer.cc
new file mode 100644
index 0000000..8aa0cb8
--- /dev/null
+++ b/tests/fuzz/ext2fs_image_read_write_fuzzer.cc
@@ -0,0 +1,135 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// #define USE_FLAGS
+// #define DUMP_SUPER
+// #define SAVE_FS_IMAGE
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <sys/syscall.h>
+#include <linux/memfd.h>
+#include <fuzzer/FuzzedDataProvider.h>
+
+#include "ext2fs/ext2fs.h"
+extern "C" {
+#include "e2p/e2p.h"
+#include "support/print_fs_flags.h"
+}
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+
+ const char *progname = "ext2fs_image_read_write_fuzzer";
+ add_error_table(&et_ext2_error_table);
+
+ enum FuzzerType {
+ ext2fsImageBitmapRead,
+ ext2fsImageInodeRead,
+ ext2fsImageSuperRead,
+ ext2fsImageBitmapWrite,
+ ext2fsImageInodeWrite,
+ ext2fsImageSuperWrite,
+ kMaxValue = ext2fsImageSuperWrite
+ };
+
+ FuzzedDataProvider stream(data, size);
+ const FuzzerType f = stream.ConsumeEnum<FuzzerType>();
+ int flags = stream.ConsumeIntegral<int>();
+#ifndef USE_FLAGS
+ flags = 0;
+#endif
+
+ static const char* fname = "/tmp/ext2_test_file";
+
+ // Write our data to a temp file.
+#ifdef SAVE_FS_IMAGE
+ int fd = open(fname, O_CREAT|O_TRUNC|O_RDWR, 0644);
+#else
+ int fd = syscall(SYS_memfd_create, fname, 0);
+#endif
+ std::vector<char> buffer = stream.ConsumeRemainingBytes<char>();
+ write(fd, buffer.data(), buffer.size());
+
+ std::string fspath("/proc/self/fd/" + std::to_string(fd));
+
+ ext2_filsys fs;
+#ifdef USE_FLAGS
+ printf("Flags: 0x%08x ", flags);
+ print_fs_flags(stdout, flags);
+ flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;
+#endif
+ errcode_t retval = ext2fs_open(
+ fspath.c_str(),
+ flags | EXT2_FLAG_IGNORE_CSUM_ERRORS, 0, 0,
+ unix_io_manager,
+ &fs);
+
+ if (retval) {
+ com_err(progname, retval, "while trying to open file system");
+ } else {
+#ifdef DUMP_SUPER
+ list_super2(fs->super, stdout);
+#endif
+ printf("FuzzerType: %d\n", (int) f);
+ switch (f) {
+ case ext2fsImageBitmapRead: {
+ retval = ext2fs_image_bitmap_read(fs, fd, 0);
+ if (retval)
+ com_err(progname, retval, "while trying to read image bitmap");
+ break;
+ }
+ case ext2fsImageInodeRead: {
+ retval = ext2fs_image_inode_read(fs, fd, 0);
+ if (retval)
+ com_err(progname, retval, "while trying to read image inode");
+ break;
+ }
+ case ext2fsImageSuperRead: {
+ retval = ext2fs_image_super_read(fs, fd, 0);
+ if (retval)
+ com_err(progname, retval, "while trying to read image superblock");
+ break;
+ }
+ case ext2fsImageBitmapWrite: {
+ retval = ext2fs_image_bitmap_write(fs, fd, 0);
+ if (retval)
+ com_err(progname, retval, "while trying to write image bitmap");
+ break;
+ }
+ case ext2fsImageInodeWrite: {
+ retval = ext2fs_image_inode_write(fs, fd, 0);
+ if (retval)
+ com_err(progname, retval, "while trying to write image inode");
+ break;
+ }
+ case ext2fsImageSuperWrite: {
+ retval = ext2fs_image_super_write(fs, fd, 0);
+ if (retval)
+ com_err(progname, retval, "while trying to write image superblock");
+ break;
+ }
+ default: {
+ assert(false);
+ }
+ }
+ ext2fs_close(fs);
+ }
+ close(fd);
+
+ return 0;
+}
diff --git a/tests/fuzz/ext2fs_read_bitmap_fuzzer.cc b/tests/fuzz/ext2fs_read_bitmap_fuzzer.cc
new file mode 100644
index 0000000..fa3d7e7
--- /dev/null
+++ b/tests/fuzz/ext2fs_read_bitmap_fuzzer.cc
@@ -0,0 +1,108 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// #define USE_FLAGS
+// #define DUMP_SUPER
+// #define SAVE_FS_IMAGE
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <sys/syscall.h>
+#include <linux/memfd.h>
+#include <fuzzer/FuzzedDataProvider.h>
+
+#include "ext2fs/ext2fs.h"
+extern "C" {
+#include "e2p/e2p.h"
+#include "support/print_fs_flags.h"
+}
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+
+ const char *progname = "ext2fs_read_bitmap_fuzzer";
+ add_error_table(&et_ext2_error_table);
+
+ enum FuzzerType {
+ ext2fsReadBlockBitmap,
+ ext2fsReadInodeBitmap,
+ kMaxValue = ext2fsReadInodeBitmap
+ };
+
+ FuzzedDataProvider stream(data, size);
+ const FuzzerType f = stream.ConsumeEnum<FuzzerType>();
+ int flags = stream.ConsumeIntegral<int>();
+#ifndef USE_FLAGS
+ flags = 0;
+#endif
+
+ static const char* fname = "/tmp/ext2_test_file";
+
+ // Write our data to a temp file.
+#ifdef SAVE_FS_IMAGE
+ int fd = open(fname, O_CREAT|O_TRUNC|O_RDWR, 0644);
+#else
+ int fd = syscall(SYS_memfd_create, fname, 0);
+#endif
+ std::vector<char> buffer = stream.ConsumeRemainingBytes<char>();
+ write(fd, buffer.data(), buffer.size());
+
+ std::string fspath("/proc/self/fd/" + std::to_string(fd));
+
+ ext2_filsys fs;
+#ifdef USE_FLAGS
+ printf("Flags: 0x%08x ", flags);
+ print_fs_flags(stdout, flags);
+ flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;
+#endif
+ errcode_t retval = ext2fs_open(
+ fspath.c_str(),
+ flags | EXT2_FLAG_IGNORE_CSUM_ERRORS, 0, 0,
+ unix_io_manager,
+ &fs);
+
+ if (retval) {
+ com_err(progname, retval, "while trying to open file system");
+ } else {
+#ifdef DUMP_SUPER
+ list_super2(fs->super, stdout);
+#endif
+ switch (f) {
+ case ext2fsReadBlockBitmap: {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ com_err(progname, retval, "while trying to read block bitmap");
+ break;
+ }
+ case ext2fsReadInodeBitmap: {
+ retval = ext2fs_read_inode_bitmap(fs);
+ if (retval)
+ com_err(progname, retval, "while trying to read inode bitmap");
+ break;
+ }
+ default: {
+ assert(false);
+ }
+ }
+ retval = ext2fs_close(fs);
+ if (retval)
+ com_err(progname, retval, "while trying to close file system");
+ }
+ close(fd);
+
+ return 0;
+}
diff --git a/tests/i_bad_csum/expect b/tests/i_bad_csum/expect
new file mode 100644
index 0000000..eeb967f
--- /dev/null
+++ b/tests/i_bad_csum/expect
@@ -0,0 +1,11 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 passes checks, but checksum does not match inode. Fix? no
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys.bin: ********** WARNING: Filesystem still has errors **********
+
+test_filesys.bin: 12/128 files (0.0% non-contiguous), 19/512 blocks
diff --git a/tests/i_bad_csum/image.gz b/tests/i_bad_csum/image.gz
new file mode 100644
index 0000000..e17e921
--- /dev/null
+++ b/tests/i_bad_csum/image.gz
Binary files differ
diff --git a/tests/i_bad_csum/name b/tests/i_bad_csum/name
new file mode 100644
index 0000000..f7197f0
--- /dev/null
+++ b/tests/i_bad_csum/name
@@ -0,0 +1 @@
+run e2image on a file system with bad checksums
diff --git a/tests/i_bad_csum/script b/tests/i_bad_csum/script
new file mode 100644
index 0000000..8b5bef9
--- /dev/null
+++ b/tests/i_bad_csum/script
@@ -0,0 +1,26 @@
+test_description="e2image corrupt fs"
+
+IMAGE=$test_dir/image.gz
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gzip -d < $IMAGE > $TMPFILE
+$E2IMAGE -r $TMPFILE $TMPFILE.bin > $OUT 2>&1
+$FSCK -fn $TMPFILE.bin >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test_filesys;" $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+rm -f $OUT $TMPFILE $TMPFILE.bin $TMPFILE.test
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/i_bitmaps/expect b/tests/i_bitmaps/expect
new file mode 100644
index 0000000..6199bb7
--- /dev/null
+++ b/tests/i_bitmaps/expect
@@ -0,0 +1,8 @@
+46,52d45
+< Journal features: (none)
+< Total journal size: 1024k
+< Total journal blocks: 1024
+< Max transaction length: 1024
+< Fast commit length: 0
+< Journal sequence: 0x00000001
+< Journal start: 0
diff --git a/tests/i_bitmaps/image.bz2 b/tests/i_bitmaps/image.bz2
new file mode 100644
index 0000000..cc33565
--- /dev/null
+++ b/tests/i_bitmaps/image.bz2
Binary files differ
diff --git a/tests/i_bitmaps/script b/tests/i_bitmaps/script
new file mode 100644
index 0000000..1a16d55
--- /dev/null
+++ b/tests/i_bitmaps/script
@@ -0,0 +1,28 @@
+test_description="e2image bitmap read/write test"
+
+IMAGE=$test_dir/image.bz2
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+bzip2 -d < $IMAGE > $TMPFILE
+$E2IMAGE $TMPFILE $TMPFILE.e2i > $OUT 2>&1
+$DUMPE2FS $TMPFILE > $TMPFILE.1 2>&1
+$DUMPE2FS -i $TMPFILE.e2i > $TMPFILE.2 2>&1
+diff $TMPFILE.1 $TMPFILE.2 >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test_filesys;" $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+rm -rf $TMPFILE $TMPFILE.bin $TMPFILE.1 $TMPFILE.2 $TMPFILE.e2i
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/i_qcow/i_qcow.crc b/tests/i_qcow/i_qcow.crc
new file mode 100644
index 0000000..8591ae4
--- /dev/null
+++ b/tests/i_qcow/i_qcow.crc
@@ -0,0 +1,15 @@
+i_qcow/image1024.orig
+image 2161078647
+raw_image 467277198
+qcow_image 2164212449
+qcow_to_raw 467277198
+i_qcow/image2048.orig
+image 672740642
+raw_image 3688408350
+qcow_image 3821412753
+qcow_to_raw 3688408350
+i_qcow/image4096.orig
+image 4077552412
+raw_image 4159471388
+qcow_image 636354894
+qcow_to_raw 4159471388
diff --git a/tests/i_qcow/image1024.orig.bz2 b/tests/i_qcow/image1024.orig.bz2
new file mode 100644
index 0000000..ac90f86
--- /dev/null
+++ b/tests/i_qcow/image1024.orig.bz2
Binary files differ
diff --git a/tests/i_qcow/image2048.orig.bz2 b/tests/i_qcow/image2048.orig.bz2
new file mode 100644
index 0000000..18d07a8
--- /dev/null
+++ b/tests/i_qcow/image2048.orig.bz2
Binary files differ
diff --git a/tests/i_qcow/image4096.orig.bz2 b/tests/i_qcow/image4096.orig.bz2
new file mode 100644
index 0000000..e17b5a3
--- /dev/null
+++ b/tests/i_qcow/image4096.orig.bz2
Binary files differ
diff --git a/tests/i_qcow/script b/tests/i_qcow/script
new file mode 100644
index 0000000..6bf995e
--- /dev/null
+++ b/tests/i_qcow/script
@@ -0,0 +1,64 @@
+test_description="create/convert raw/qcow2 images"
+if test -x $E2IMAGE_EXE; then
+
+ORIG_IMAGES="image1024.orig image2048.orig image4096.orig"
+
+RAW_IMG=_image.raw
+QCOW2_IMG=_image.qcow2
+QCOW2_TO_RAW=_image.qcow2.raw
+OUT=$test_name.log
+CRC=$SRCDIR/$test_name/$test_name.crc
+CRC_TMP=$test_name.crc.tmp
+
+rm -f $CRC_TMP $OUT >/dev/null 2>&1
+
+(
+for i in $ORIG_IMAGES; do
+ ORIG_IMG=$test_name/$i
+ echo $ORIG_IMG >> $CRC_TMP
+
+ IMAGE=$(mktemp ${TMPDIR:-/tmp}/$i.XXXXXX)
+ RAW_IMG="${IMAGE}.raw"
+ QCOW2_IMG="${IMAGE}.qcow2"
+ QCOW2_TO_RAW="${IMAGE}.qcow2.raw"
+
+ bunzip2 < $SRCDIR/$ORIG_IMG.bz2 > $IMAGE
+ echo "image $($CRCSUM $IMAGE)" >> $CRC_TMP
+
+ rm -f $RAW_IMG
+ echo "e2image -r $ORIG_IMG $RAW_IMG"
+ $E2IMAGE -r $IMAGE $RAW_IMG
+ echo "raw_image $($CRCSUM $RAW_IMG)" >> $CRC_TMP
+
+ echo "e2image -Q $ORIG_IMG $QCOW2_IMG"
+ $E2IMAGE -Q $IMAGE $QCOW2_IMG
+ echo "qcow_image $($CRCSUM $QCOW2_IMG)" >> $CRC_TMP
+
+ rm -f $QCOW2_TO_RAW
+ echo "e2image -r $QCOW2_IMG $QCOW2_TO_RAW"
+ $E2IMAGE -r $QCOW2_IMG $QCOW2_TO_RAW
+ echo "qcow_to_raw $($CRCSUM $QCOW2_TO_RAW)" >> $CRC_TMP
+
+ rm -f $IMAGE $RAW_IMG $QCOW2_IMG $QCOW2_TO_RAW
+done
+) >> $OUT 2>&1
+
+echo "checksum:" >> $OUT
+cat $CRC_TMP >> $OUT
+echo "" >> $OUT
+
+diff $CRC $CRC_TMP >> $OUT 2>&1
+
+if [ $? -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+
+rm -f $CRC_TMP >/dev/null 2>&1
+
+else #if test -x $E2IMAGE_EXE; then
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/i_zero_super/expect.1 b/tests/i_zero_super/expect.1
new file mode 100644
index 0000000..fda32b9
--- /dev/null
+++ b/tests/i_zero_super/expect.1
@@ -0,0 +1,22 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (7987, counted=7982).
+Fix? no
+
+Free blocks count wrong (11602, counted=11597).
+Fix? no
+
+Free inodes count wrong for group #0 (1493, counted=1488).
+Fix? no
+
+Free inodes count wrong (2997, counted=2992).
+Fix? no
+
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+test_filesys: 11/3008 files (0.0% non-contiguous), 398/12000 blocks
+Exit status is 4
diff --git a/tests/i_zero_super/image.gz b/tests/i_zero_super/image.gz
new file mode 100644
index 0000000..eea9140
--- /dev/null
+++ b/tests/i_zero_super/image.gz
Binary files differ
diff --git a/tests/i_zero_super/script b/tests/i_zero_super/script
new file mode 100644
index 0000000..0cef6ac
--- /dev/null
+++ b/tests/i_zero_super/script
@@ -0,0 +1,11 @@
+if test -x $E2IMAGE_EXE; then
+
+ONE_PASS_ONLY=true
+FSCK_OPT="-n -b 8193 -f"
+PREP_CMD="$E2IMAGE_EXE -r -b 8193 -B 1024 $TMPFILE $TMPFILE.raw 2>/dev/null; \
+ mv $TMPFILE.raw $TMPFILE"
+. $cmd_dir/run_e2fsck
+
+else
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/j_corrupt_commit_csum/expect b/tests/j_corrupt_commit_csum/expect
new file mode 100644
index 0000000..d799772
--- /dev/null
+++ b/tests/j_corrupt_commit_csum/expect
@@ -0,0 +1,18 @@
+test_filesys: recovering journal
+Journal transaction 3 was corrupt, replay was aborted.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadebugfs:
diff --git a/tests/j_corrupt_commit_csum/image.gz b/tests/j_corrupt_commit_csum/image.gz
new file mode 100644
index 0000000..334fcd0
--- /dev/null
+++ b/tests/j_corrupt_commit_csum/image.gz
Binary files differ
diff --git a/tests/j_corrupt_commit_csum/name b/tests/j_corrupt_commit_csum/name
new file mode 100644
index 0000000..05a99ea
--- /dev/null
+++ b/tests/j_corrupt_commit_csum/name
@@ -0,0 +1 @@
+corrupt commit csum (csum v3)
diff --git a/tests/j_corrupt_commit_csum/script b/tests/j_corrupt_commit_csum/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_commit_csum/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_commit_tid/expect b/tests/j_corrupt_commit_tid/expect
new file mode 100644
index 0000000..0a7df89
--- /dev/null
+++ b/tests/j_corrupt_commit_tid/expect
@@ -0,0 +1,17 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadebugfs:
diff --git a/tests/j_corrupt_commit_tid/image.gz b/tests/j_corrupt_commit_tid/image.gz
new file mode 100644
index 0000000..988e5c6
--- /dev/null
+++ b/tests/j_corrupt_commit_tid/image.gz
Binary files differ
diff --git a/tests/j_corrupt_commit_tid/name b/tests/j_corrupt_commit_tid/name
new file mode 100644
index 0000000..9b4054c
--- /dev/null
+++ b/tests/j_corrupt_commit_tid/name
@@ -0,0 +1 @@
+corrupt commit tid (csum v3)
diff --git a/tests/j_corrupt_commit_tid/script b/tests/j_corrupt_commit_tid/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_commit_tid/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_descr_csum/expect b/tests/j_corrupt_descr_csum/expect
new file mode 100644
index 0000000..72b8f73
--- /dev/null
+++ b/tests/j_corrupt_descr_csum/expect
@@ -0,0 +1,18 @@
+test_filesys: recovering journal
+Journal checksum error found in test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1093/2048 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1093/2048 blocks
+Exit status is 0
+debugfs: cat /a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadebugfs:
diff --git a/tests/j_corrupt_descr_csum/image.gz b/tests/j_corrupt_descr_csum/image.gz
new file mode 100644
index 0000000..2a81e5d
--- /dev/null
+++ b/tests/j_corrupt_descr_csum/image.gz
Binary files differ
diff --git a/tests/j_corrupt_descr_csum/name b/tests/j_corrupt_descr_csum/name
new file mode 100644
index 0000000..e15ccfb
--- /dev/null
+++ b/tests/j_corrupt_descr_csum/name
@@ -0,0 +1 @@
+corrupt descr csum (csum v3)
diff --git a/tests/j_corrupt_descr_csum/script b/tests/j_corrupt_descr_csum/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_descr_csum/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_descr_tid/expect b/tests/j_corrupt_descr_tid/expect
new file mode 100644
index 0000000..00bd2d5
--- /dev/null
+++ b/tests/j_corrupt_descr_tid/expect
@@ -0,0 +1,17 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1093/2048 blocks
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1093/2048 blocks
+Exit status is 0
+debugfs: cat /a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadebugfs:
diff --git a/tests/j_corrupt_descr_tid/image.gz b/tests/j_corrupt_descr_tid/image.gz
new file mode 100644
index 0000000..3ad88f9
--- /dev/null
+++ b/tests/j_corrupt_descr_tid/image.gz
Binary files differ
diff --git a/tests/j_corrupt_descr_tid/name b/tests/j_corrupt_descr_tid/name
new file mode 100644
index 0000000..2325d6d
--- /dev/null
+++ b/tests/j_corrupt_descr_tid/name
@@ -0,0 +1 @@
+corrupt descr tid (csum v3)
diff --git a/tests/j_corrupt_descr_tid/script b/tests/j_corrupt_descr_tid/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_descr_tid/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_ext_jnl_sb_block/expect b/tests/j_corrupt_ext_jnl_sb_block/expect
new file mode 100644
index 0000000..e638e11
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_block/expect
@@ -0,0 +1,5 @@
+External journal does not support this filesystem
+
+test_filesys: ********** WARNING: Filesystem still has errors **********
+
+Exit status is 12
diff --git a/tests/j_corrupt_ext_jnl_sb_block/image.tar.bz2 b/tests/j_corrupt_ext_jnl_sb_block/image.tar.bz2
new file mode 100644
index 0000000..efb382f
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_block/image.tar.bz2
Binary files differ
diff --git a/tests/j_corrupt_ext_jnl_sb_block/name b/tests/j_corrupt_ext_jnl_sb_block/name
new file mode 100644
index 0000000..35f1689
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_block/name
@@ -0,0 +1 @@
+corrupt mcsum ext jnl fs superblock block
diff --git a/tests/j_corrupt_ext_jnl_sb_block/script b/tests/j_corrupt_ext_jnl_sb_block/script
new file mode 100644
index 0000000..b038943
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_block/script
@@ -0,0 +1,32 @@
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+bzip2 -dc < $test_dir/image.tar.bz2 | tar xf -
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp $test_name.img "$JOURNAL_DUMP_DIR/$test_name.img"
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp $test_name.img.jnl "$JOURNAL_DUMP_DIR/$test_name.img.jnl"
+
+$FSCK $FSCK_OPT -N test_filesys -j $test_name.img.jnl $test_name.img > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $test_name.img $test_name.img.jnl $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_ext_jnl_sb_csum/expect b/tests/j_corrupt_ext_jnl_sb_csum/expect
new file mode 100644
index 0000000..4212a00
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_csum/expect
@@ -0,0 +1,27 @@
+External journal superblock checksum does not match superblock. Fix? yes
+
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--31) +34 +(50--82)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/128 files (0.0% non-contiguous), 66/2048 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 66/2048 blocks
+Exit status is 0
diff --git a/tests/j_corrupt_ext_jnl_sb_csum/image.tar.bz2 b/tests/j_corrupt_ext_jnl_sb_csum/image.tar.bz2
new file mode 100644
index 0000000..d04d584
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_csum/image.tar.bz2
Binary files differ
diff --git a/tests/j_corrupt_ext_jnl_sb_csum/name b/tests/j_corrupt_ext_jnl_sb_csum/name
new file mode 100644
index 0000000..7e73971
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_csum/name
@@ -0,0 +1 @@
+corrupt external journal superblock metadata_csum
diff --git a/tests/j_corrupt_ext_jnl_sb_csum/script b/tests/j_corrupt_ext_jnl_sb_csum/script
new file mode 100644
index 0000000..6c0256b
--- /dev/null
+++ b/tests/j_corrupt_ext_jnl_sb_csum/script
@@ -0,0 +1,36 @@
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+bzip2 -dc < $test_dir/image.tar.bz2 | tar xf -
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp $test_name.img "$JOURNAL_DUMP_DIR/$test_name.img"
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp $test_name.img.jnl "$JOURNAL_DUMP_DIR/$test_name.img.jnl"
+
+$FSCK $FSCK_OPT -N test_filesys -j $test_name.img.jnl $test_name.img > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK $FSCK_OPT -N test_filesys -j $test_name.img.jnl $test_name.img >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $test_name.img $test_name.img.jnl $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_journal_block/expect b/tests/j_corrupt_journal_block/expect
new file mode 100644
index 0000000..8b6545a
--- /dev/null
+++ b/tests/j_corrupt_journal_block/expect
@@ -0,0 +1,20 @@
+test_filesys: recovering journal
+JBD2: Invalid checksum recovering data block 1090 in log
+Journal checksum error found in test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1093/2048 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1093/2048 blocks
+Exit status is 0
+debugfs: cat /a
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddebugfs:
+
diff --git a/tests/j_corrupt_journal_block/image.gz b/tests/j_corrupt_journal_block/image.gz
new file mode 100644
index 0000000..6ab196e
--- /dev/null
+++ b/tests/j_corrupt_journal_block/image.gz
Binary files differ
diff --git a/tests/j_corrupt_journal_block/name b/tests/j_corrupt_journal_block/name
new file mode 100644
index 0000000..5d862cd
--- /dev/null
+++ b/tests/j_corrupt_journal_block/name
@@ -0,0 +1 @@
+corrupt journal block (csum v3)
diff --git a/tests/j_corrupt_journal_block/script b/tests/j_corrupt_journal_block/script
new file mode 100644
index 0000000..a380805
--- /dev/null
+++ b/tests/j_corrupt_journal_block/script
@@ -0,0 +1,45 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+echo >> $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_revoke_block/expect b/tests/j_corrupt_revoke_block/expect
new file mode 100644
index 0000000..c357f53
--- /dev/null
+++ b/tests/j_corrupt_revoke_block/expect
@@ -0,0 +1,17 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbdebugfs:
diff --git a/tests/j_corrupt_revoke_block/image.gz b/tests/j_corrupt_revoke_block/image.gz
new file mode 100644
index 0000000..b165d00
--- /dev/null
+++ b/tests/j_corrupt_revoke_block/image.gz
Binary files differ
diff --git a/tests/j_corrupt_revoke_block/name b/tests/j_corrupt_revoke_block/name
new file mode 100644
index 0000000..c7a0088
--- /dev/null
+++ b/tests/j_corrupt_revoke_block/name
@@ -0,0 +1 @@
+corrupt revoke block (csum v3)
diff --git a/tests/j_corrupt_revoke_block/script b/tests/j_corrupt_revoke_block/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_revoke_block/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_revoke_csum/expect b/tests/j_corrupt_revoke_csum/expect
new file mode 100644
index 0000000..c357f53
--- /dev/null
+++ b/tests/j_corrupt_revoke_csum/expect
@@ -0,0 +1,17 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbdebugfs:
diff --git a/tests/j_corrupt_revoke_csum/image.gz b/tests/j_corrupt_revoke_csum/image.gz
new file mode 100644
index 0000000..f505592
--- /dev/null
+++ b/tests/j_corrupt_revoke_csum/image.gz
Binary files differ
diff --git a/tests/j_corrupt_revoke_csum/name b/tests/j_corrupt_revoke_csum/name
new file mode 100644
index 0000000..b63ea23
--- /dev/null
+++ b/tests/j_corrupt_revoke_csum/name
@@ -0,0 +1 @@
+corrupt revoke csum (csum v3)
diff --git a/tests/j_corrupt_revoke_csum/script b/tests/j_corrupt_revoke_csum/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_revoke_csum/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_revoke_rcount/expect.1 b/tests/j_corrupt_revoke_rcount/expect.1
new file mode 100644
index 0000000..2d1b5cd
--- /dev/null
+++ b/tests/j_corrupt_revoke_rcount/expect.1
@@ -0,0 +1,9 @@
+test_filesys: recovering journal
+../e2fsck/e2fsck: Invalid argument while recovering journal of test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/512 files (9.1% non-contiguous), 1066/2048 blocks
+Exit status is 1
diff --git a/tests/j_corrupt_revoke_rcount/expect.2 b/tests/j_corrupt_revoke_rcount/expect.2
new file mode 100644
index 0000000..c746fda
--- /dev/null
+++ b/tests/j_corrupt_revoke_rcount/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/512 files (9.1% non-contiguous), 1066/2048 blocks
+Exit status is 0
diff --git a/tests/j_corrupt_revoke_rcount/image.gz b/tests/j_corrupt_revoke_rcount/image.gz
new file mode 100644
index 0000000..c8b19e8
--- /dev/null
+++ b/tests/j_corrupt_revoke_rcount/image.gz
Binary files differ
diff --git a/tests/j_corrupt_revoke_rcount/name b/tests/j_corrupt_revoke_rcount/name
new file mode 100644
index 0000000..92b523e
--- /dev/null
+++ b/tests/j_corrupt_revoke_rcount/name
@@ -0,0 +1 @@
+corrupt revoke r_count buffer overflow
diff --git a/tests/j_corrupt_sb_csum/expect b/tests/j_corrupt_sb_csum/expect
new file mode 100644
index 0000000..5c88a09
--- /dev/null
+++ b/tests/j_corrupt_sb_csum/expect
@@ -0,0 +1,21 @@
+Journal superblock is corrupt.
+Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadebugfs:
diff --git a/tests/j_corrupt_sb_csum/image.gz b/tests/j_corrupt_sb_csum/image.gz
new file mode 100644
index 0000000..ee92f6b
--- /dev/null
+++ b/tests/j_corrupt_sb_csum/image.gz
Binary files differ
diff --git a/tests/j_corrupt_sb_csum/name b/tests/j_corrupt_sb_csum/name
new file mode 100644
index 0000000..921a0fd
--- /dev/null
+++ b/tests/j_corrupt_sb_csum/name
@@ -0,0 +1 @@
+corrupt sb csum (csum v3)
diff --git a/tests/j_corrupt_sb_csum/script b/tests/j_corrupt_sb_csum/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_sb_csum/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_corrupt_sb_magic/expect b/tests/j_corrupt_sb_magic/expect
new file mode 100644
index 0000000..d1dae88
--- /dev/null
+++ b/tests/j_corrupt_sb_magic/expect
@@ -0,0 +1,42 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Superblock has_journal flag is clear, but a journal is present.
+Clear? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(32--33) -(35--49) -(83--1089)
+Fix? yes
+
+Free blocks count wrong for group #0 (956, counted=1980).
+Fix? yes
+
+Free blocks count wrong (956, counted=1980).
+Fix? yes
+
+Recreate journal? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/128 files (0.0% non-contiguous), 1092/2048 blocks
+Exit status is 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadebugfs:
diff --git a/tests/j_corrupt_sb_magic/image.gz b/tests/j_corrupt_sb_magic/image.gz
new file mode 100644
index 0000000..5d895e7
--- /dev/null
+++ b/tests/j_corrupt_sb_magic/image.gz
Binary files differ
diff --git a/tests/j_corrupt_sb_magic/name b/tests/j_corrupt_sb_magic/name
new file mode 100644
index 0000000..dc781aa
--- /dev/null
+++ b/tests/j_corrupt_sb_magic/name
@@ -0,0 +1 @@
+corrupt sb magic (csum v3)
diff --git a/tests/j_corrupt_sb_magic/script b/tests/j_corrupt_sb_magic/script
new file mode 100644
index 0000000..ab314f6
--- /dev/null
+++ b/tests/j_corrupt_sb_magic/script
@@ -0,0 +1,44 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+echo >> $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_ext_dumpe2fs/expect b/tests/j_ext_dumpe2fs/expect
new file mode 100644
index 0000000..2838bbd
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/expect
@@ -0,0 +1,55 @@
+e2fsck external journal
+../e2fsck/e2fsck: Filesystem has unsupported feature(s) while trying to open test.img
+
+The superblock could not be read or does not describe a valid ext2/ext3/ext4
+filesystem. If the device is valid and it really contains an ext2/ext3/ext4
+filesystem (and not swap or ufs or something else), then the superblock
+is corrupt, and you might try running e2fsck with an alternate superblock:
+ e2fsck -b 8193 <device>
+ or
+ e2fsck -b 32768 <device>
+
+Exit status is 8
+dumpe2fs external journal
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: journal_dev metadata_csum
+Default mount options: user_xattr acl block_validity
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 0
+Block count: 2048
+Reserved block count: 0
+Free blocks: 0
+Free inodes: 0
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 0
+Inode blocks per group: 0
+Mount count: 0
+Check interval: 0 (<none>)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 28
+Desired extra isize: 28
+Default directory hash: half_md4
+Checksum type: crc32c
+Journal features: journal_64bit journal_checksum_v3
+Total journal size: 2048k
+Total journal blocks: 2048
+Max transaction length: 2048
+Fast commit length: 0
+Journal first block: 3
+Journal sequence: 0x00000003
+Journal start: 0
+Journal checksum type: crc32c
+Journal checksum: 0x661e816f
+Journal users: 117f752e-f27d-4f6f-a652-072586a29b82
diff --git a/tests/j_ext_dumpe2fs/image.gz b/tests/j_ext_dumpe2fs/image.gz
new file mode 100644
index 0000000..781b591
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/image.gz
Binary files differ
diff --git a/tests/j_ext_dumpe2fs/name b/tests/j_ext_dumpe2fs/name
new file mode 100644
index 0000000..60d276c
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/name
@@ -0,0 +1 @@
+dumpe2fs of external journal device
diff --git a/tests/j_ext_dumpe2fs/script b/tests/j_ext_dumpe2fs/script
new file mode 100644
index 0000000..b7bae59
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/script
@@ -0,0 +1,34 @@
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gunzip < $test_dir/image.gz > $TMPFILE
+
+echo "e2fsck external journal" > $OUT.new
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "dumpe2fs external journal" >> $OUT.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_ext_long_revoke_trans/expect b/tests/j_ext_long_revoke_trans/expect
new file mode 100644
index 0000000..ed19872
--- /dev/null
+++ b/tests/j_ext_long_revoke_trans/expect
@@ -0,0 +1,91 @@
+Creating filesystem with 262144 1k blocks and 0 inodes
+Superblock backups stored on blocks:
+
+Zeroing journal device: 
+Creating filesystem with 262144 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+debugfs add journal device/UUID
+debugfs: feature has_journal
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+debugfs: ssv journal_dev 0x9999
+debugfs: ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a34
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 6239/262144 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Ext2 superblock header found.
+Journal starts at block 3, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 3
+Found expected sequence 1, type 1 (descriptor block) at block 128
+Found expected sequence 1, type 1 (descriptor block) at block 253
+Found expected sequence 1, type 1 (descriptor block) at block 378
+Found expected sequence 1, type 1 (descriptor block) at block 503
+Found expected sequence 1, type 1 (descriptor block) at block 628
+Found expected sequence 1, type 1 (descriptor block) at block 753
+Found expected sequence 1, type 1 (descriptor block) at block 878
+Found expected sequence 1, type 1 (descriptor block) at block 1003
+Found expected sequence 1, type 1 (descriptor block) at block 1128
+Found expected sequence 1, type 1 (descriptor block) at block 1253
+Found expected sequence 1, type 1 (descriptor block) at block 1378
+Found expected sequence 1, type 1 (descriptor block) at block 1503
+Found expected sequence 1, type 1 (descriptor block) at block 1628
+Found expected sequence 1, type 1 (descriptor block) at block 1753
+Found expected sequence 1, type 1 (descriptor block) at block 1878
+Found expected sequence 1, type 1 (descriptor block) at block 2003
+Found expected sequence 1, type 1 (descriptor block) at block 2128
+Found expected sequence 1, type 1 (descriptor block) at block 2253
+Found expected sequence 1, type 1 (descriptor block) at block 2378
+Found expected sequence 1, type 1 (descriptor block) at block 2503
+Found expected sequence 1, type 1 (descriptor block) at block 2628
+Found expected sequence 1, type 1 (descriptor block) at block 2753
+Found expected sequence 1, type 1 (descriptor block) at block 2878
+Found expected sequence 1, type 1 (descriptor block) at block 3003
+Found expected sequence 1, type 1 (descriptor block) at block 3128
+Found expected sequence 1, type 1 (descriptor block) at block 3253
+Found expected sequence 1, type 1 (descriptor block) at block 3378
+Found expected sequence 1, type 1 (descriptor block) at block 3503
+Found expected sequence 1, type 1 (descriptor block) at block 3628
+Found expected sequence 1, type 1 (descriptor block) at block 3753
+Found expected sequence 1, type 1 (descriptor block) at block 3878
+Found expected sequence 1, type 1 (descriptor block) at block 4003
+Found expected sequence 1, type 1 (descriptor block) at block 4128
+Found expected sequence 1, type 2 (commit block) at block 4135
+Found expected sequence 2, type 5 (revoke table) at block 4136
+Found expected sequence 2, type 5 (revoke table) at block 4137
+Found expected sequence 2, type 5 (revoke table) at block 4138
+Found expected sequence 2, type 5 (revoke table) at block 4139
+Found expected sequence 2, type 5 (revoke table) at block 4140
+Found expected sequence 2, type 5 (revoke table) at block 4141
+Found expected sequence 2, type 5 (revoke table) at block 4142
+Found expected sequence 2, type 5 (revoke table) at block 4143
+Found expected sequence 2, type 5 (revoke table) at block 4144
+Found expected sequence 2, type 5 (revoke table) at block 4145
+Found expected sequence 2, type 5 (revoke table) at block 4146
+Found expected sequence 2, type 5 (revoke table) at block 4147
+Found expected sequence 2, type 5 (revoke table) at block 4148
+Found expected sequence 2, type 5 (revoke table) at block 4149
+Found expected sequence 2, type 5 (revoke table) at block 4150
+Found expected sequence 2, type 5 (revoke table) at block 4151
+Found expected sequence 2, type 5 (revoke table) at block 4152
+Found expected sequence 2, type 2 (commit block) at block 4153
+No magic number at block 4154: end of journal.
+debugfs fsck
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 6239/262144 blocks
+Exit status is 0
diff --git a/tests/j_ext_long_revoke_trans/name b/tests/j_ext_long_revoke_trans/name
new file mode 100644
index 0000000..932a5bd
--- /dev/null
+++ b/tests/j_ext_long_revoke_trans/name
@@ -0,0 +1 @@
+revoke trans nuking free space w/ ext. journal
diff --git a/tests/j_ext_long_revoke_trans/script b/tests/j_ext_long_revoke_trans/script
new file mode 100644
index 0000000..c99c8f1
--- /dev/null
+++ b/tests/j_ext_long_revoke_trans/script
@@ -0,0 +1,65 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+JNLFILE=$TMPFILE.jnl
+
+touch $JNLFILE
+$MKE2FS -F -o Linux -b 1024 -O journal_dev -T ext4 -U 1db3f677-6832-4adb-bafc-8e4059c30a34 $JNLFILE 262144 > $OUT.new 2>&1
+$MKE2FS -F -o Linux -b 1024 -O ^has_journal -T ext4 $TMPFILE 262144 >> $OUT.new 2>&1
+
+echo "debugfs add journal device/UUID" >> $OUT.new
+$DEBUGFS -w -f - $TMPFILE <<-EOF >> $OUT.new 2>&1
+ feature has_journal
+ ssv journal_dev 0x9999
+ ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a34
+EOF
+
+$FSCK -fy -N test_filesys -j $JNLFILE $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -f $JNLFILE" > $TMPFILE.cmd
+echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo -f $JNLFILE" >> $TMPFILE.cmd
+echo "jw -r 259-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$JNLFILE" "$JOURNAL_DUMP_DIR/$test_name.img.jnl"
+echo "logdump -c -f $JNLFILE" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+echo "debugfs fsck" >> $OUT.new
+$FSCK -fy -N test_filesys -j $JNLFILE $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e 's/logdump -c -f.*/logdump -c/g' $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $JNLFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP JNLFILE
diff --git a/tests/j_ext_long_trans/expect b/tests/j_ext_long_trans/expect
new file mode 100644
index 0000000..ea3c87f
--- /dev/null
+++ b/tests/j_ext_long_trans/expect
@@ -0,0 +1,106 @@
+Creating filesystem with 262144 1k blocks and 0 inodes
+Superblock backups stored on blocks:
+
+Zeroing journal device: 
+Creating filesystem with 262144 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+debugfs add journal device/UUID
+debugfs: feature has_journal
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+debugfs: ssv journal_dev 0x9999
+debugfs: ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a34
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 6239/262144 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Ext2 superblock header found.
+Journal starts at block 3, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 3
+Found expected sequence 1, type 1 (descriptor block) at block 128
+Found expected sequence 1, type 1 (descriptor block) at block 253
+Found expected sequence 1, type 1 (descriptor block) at block 378
+Found expected sequence 1, type 1 (descriptor block) at block 503
+Found expected sequence 1, type 1 (descriptor block) at block 628
+Found expected sequence 1, type 1 (descriptor block) at block 753
+Found expected sequence 1, type 1 (descriptor block) at block 878
+Found expected sequence 1, type 1 (descriptor block) at block 1003
+Found expected sequence 1, type 1 (descriptor block) at block 1128
+Found expected sequence 1, type 1 (descriptor block) at block 1253
+Found expected sequence 1, type 1 (descriptor block) at block 1378
+Found expected sequence 1, type 1 (descriptor block) at block 1503
+Found expected sequence 1, type 1 (descriptor block) at block 1628
+Found expected sequence 1, type 1 (descriptor block) at block 1753
+Found expected sequence 1, type 1 (descriptor block) at block 1878
+Found expected sequence 1, type 1 (descriptor block) at block 2003
+Found expected sequence 1, type 1 (descriptor block) at block 2128
+Found expected sequence 1, type 1 (descriptor block) at block 2253
+Found expected sequence 1, type 1 (descriptor block) at block 2378
+Found expected sequence 1, type 1 (descriptor block) at block 2503
+Found expected sequence 1, type 1 (descriptor block) at block 2628
+Found expected sequence 1, type 1 (descriptor block) at block 2753
+Found expected sequence 1, type 1 (descriptor block) at block 2878
+Found expected sequence 1, type 1 (descriptor block) at block 3003
+Found expected sequence 1, type 1 (descriptor block) at block 3128
+Found expected sequence 1, type 1 (descriptor block) at block 3253
+Found expected sequence 1, type 1 (descriptor block) at block 3378
+Found expected sequence 1, type 1 (descriptor block) at block 3503
+Found expected sequence 1, type 1 (descriptor block) at block 3628
+Found expected sequence 1, type 1 (descriptor block) at block 3753
+Found expected sequence 1, type 1 (descriptor block) at block 3878
+Found expected sequence 1, type 1 (descriptor block) at block 4003
+Found expected sequence 1, type 1 (descriptor block) at block 4128
+Found expected sequence 1, type 2 (commit block) at block 4135
+No magic number at block 4136: end of journal.
+debugfs fsck
+test_filesys: recovering journal
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Root inode is not a directory. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--259) +275 +(291--418) +2341
+Fix? yes
+
+Free blocks count wrong for group #0 (5838, counted=5851).
+Fix? yes
+
+Free blocks count wrong (255903, counted=255916).
+Fix? yes
+
+Inode bitmap differences: +1 +(3--10)
+Fix? yes
+
+Free inodes count wrong for group #0 (500, counted=501).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (16372, counted=16373).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 6228/262144 blocks
+Exit status is 1
diff --git a/tests/j_ext_long_trans/name b/tests/j_ext_long_trans/name
new file mode 100644
index 0000000..8ae5722
--- /dev/null
+++ b/tests/j_ext_long_trans/name
@@ -0,0 +1 @@
+transaction nuking free space w/ ext. journal
diff --git a/tests/j_ext_long_trans/script b/tests/j_ext_long_trans/script
new file mode 100644
index 0000000..f19fb89
--- /dev/null
+++ b/tests/j_ext_long_trans/script
@@ -0,0 +1,62 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+JNLFILE=$TMPFILE.jnl
+
+touch $JNLFILE
+$MKE2FS -F -o Linux -b 1024 -O journal_dev -T ext4 -U 1db3f677-6832-4adb-bafc-8e4059c30a34 $JNLFILE 262144 > $OUT.new 2>&1
+$MKE2FS -F -o Linux -b 1024 -O ^has_journal -T ext4 $TMPFILE 262144 >> $OUT.new 2>&1
+
+echo "debugfs add journal device/UUID" >> $OUT.new
+$DEBUGFS -w -f - $TMPFILE <<- EOF >> $OUT.new 2>&1
+ feature has_journal
+ ssv journal_dev 0x9999
+ ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a34
+EOF
+
+$FSCK -fy -N test_filesys -j $JNLFILE $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -f $JNLFILE" > $TMPFILE.cmd
+echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$JNLFILE" "$JOURNAL_DUMP_DIR/$test_name.img.jnl"
+echo "logdump -c -f $JNLFILE" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+echo "debugfs fsck" >> $OUT.new
+$FSCK -fy -N test_filesys -j $JNLFILE $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e 's/logdump -c -f.*/logdump -c/g' $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $JNLFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP JNLFILE
diff --git a/tests/j_long_revoke_trans/expect b/tests/j_long_revoke_trans/expect
new file mode 100644
index 0000000..c0730e6
--- /dev/null
+++ b/tests/j_long_revoke_trans/expect
@@ -0,0 +1,81 @@
+Creating filesystem with 262144 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (8192 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 14431/262144 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 1 (descriptor block) at block 126
+Found expected sequence 1, type 1 (descriptor block) at block 251
+Found expected sequence 1, type 1 (descriptor block) at block 376
+Found expected sequence 1, type 1 (descriptor block) at block 501
+Found expected sequence 1, type 1 (descriptor block) at block 626
+Found expected sequence 1, type 1 (descriptor block) at block 751
+Found expected sequence 1, type 1 (descriptor block) at block 876
+Found expected sequence 1, type 1 (descriptor block) at block 1001
+Found expected sequence 1, type 1 (descriptor block) at block 1126
+Found expected sequence 1, type 1 (descriptor block) at block 1251
+Found expected sequence 1, type 1 (descriptor block) at block 1376
+Found expected sequence 1, type 1 (descriptor block) at block 1501
+Found expected sequence 1, type 1 (descriptor block) at block 1626
+Found expected sequence 1, type 1 (descriptor block) at block 1751
+Found expected sequence 1, type 1 (descriptor block) at block 1876
+Found expected sequence 1, type 1 (descriptor block) at block 2001
+Found expected sequence 1, type 1 (descriptor block) at block 2126
+Found expected sequence 1, type 1 (descriptor block) at block 2251
+Found expected sequence 1, type 1 (descriptor block) at block 2376
+Found expected sequence 1, type 1 (descriptor block) at block 2501
+Found expected sequence 1, type 1 (descriptor block) at block 2626
+Found expected sequence 1, type 1 (descriptor block) at block 2751
+Found expected sequence 1, type 1 (descriptor block) at block 2876
+Found expected sequence 1, type 1 (descriptor block) at block 3001
+Found expected sequence 1, type 1 (descriptor block) at block 3126
+Found expected sequence 1, type 1 (descriptor block) at block 3251
+Found expected sequence 1, type 1 (descriptor block) at block 3376
+Found expected sequence 1, type 1 (descriptor block) at block 3501
+Found expected sequence 1, type 1 (descriptor block) at block 3626
+Found expected sequence 1, type 1 (descriptor block) at block 3751
+Found expected sequence 1, type 1 (descriptor block) at block 3876
+Found expected sequence 1, type 1 (descriptor block) at block 4001
+Found expected sequence 1, type 1 (descriptor block) at block 4126
+Found expected sequence 1, type 2 (commit block) at block 4133
+Found expected sequence 2, type 5 (revoke table) at block 4134
+Found expected sequence 2, type 5 (revoke table) at block 4135
+Found expected sequence 2, type 5 (revoke table) at block 4136
+Found expected sequence 2, type 5 (revoke table) at block 4137
+Found expected sequence 2, type 5 (revoke table) at block 4138
+Found expected sequence 2, type 5 (revoke table) at block 4139
+Found expected sequence 2, type 5 (revoke table) at block 4140
+Found expected sequence 2, type 5 (revoke table) at block 4141
+Found expected sequence 2, type 5 (revoke table) at block 4142
+Found expected sequence 2, type 5 (revoke table) at block 4143
+Found expected sequence 2, type 5 (revoke table) at block 4144
+Found expected sequence 2, type 5 (revoke table) at block 4145
+Found expected sequence 2, type 5 (revoke table) at block 4146
+Found expected sequence 2, type 5 (revoke table) at block 4147
+Found expected sequence 2, type 5 (revoke table) at block 4148
+Found expected sequence 2, type 5 (revoke table) at block 4149
+Found expected sequence 2, type 5 (revoke table) at block 4150
+Found expected sequence 2, type 2 (commit block) at block 4151
+No magic number at block 4152: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 14431/262144 blocks
+Exit status is 0
diff --git a/tests/j_long_revoke_trans/name b/tests/j_long_revoke_trans/name
new file mode 100644
index 0000000..3cbb2cd
--- /dev/null
+++ b/tests/j_long_revoke_trans/name
@@ -0,0 +1 @@
+revoked transaction nuking free space
diff --git a/tests/j_long_revoke_trans/script b/tests/j_long_revoke_trans/script
new file mode 100644
index 0000000..d59578d
--- /dev/null
+++ b/tests/j_long_revoke_trans/script
@@ -0,0 +1,52 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O has_journal -T ext4 $TMPFILE 262144 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r 259-4356" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_long_revoke_trans_mcsum_32bit/expect b/tests/j_long_revoke_trans_mcsum_32bit/expect
new file mode 100644
index 0000000..664a301
--- /dev/null
+++ b/tests/j_long_revoke_trans_mcsum_32bit/expect
@@ -0,0 +1,117 @@
+64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.
+Creating filesystem with 524288 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 27050/524288 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_incompat_revoke journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 1 (descriptor block) at block 64
+Found expected sequence 1, type 1 (descriptor block) at block 127
+Found expected sequence 1, type 1 (descriptor block) at block 190
+Found expected sequence 1, type 1 (descriptor block) at block 253
+Found expected sequence 1, type 1 (descriptor block) at block 316
+Found expected sequence 1, type 1 (descriptor block) at block 379
+Found expected sequence 1, type 1 (descriptor block) at block 442
+Found expected sequence 1, type 1 (descriptor block) at block 505
+Found expected sequence 1, type 1 (descriptor block) at block 568
+Found expected sequence 1, type 1 (descriptor block) at block 631
+Found expected sequence 1, type 1 (descriptor block) at block 694
+Found expected sequence 1, type 1 (descriptor block) at block 757
+Found expected sequence 1, type 1 (descriptor block) at block 820
+Found expected sequence 1, type 1 (descriptor block) at block 883
+Found expected sequence 1, type 1 (descriptor block) at block 946
+Found expected sequence 1, type 1 (descriptor block) at block 1009
+Found expected sequence 1, type 1 (descriptor block) at block 1072
+Found expected sequence 1, type 1 (descriptor block) at block 1135
+Found expected sequence 1, type 1 (descriptor block) at block 1198
+Found expected sequence 1, type 1 (descriptor block) at block 1261
+Found expected sequence 1, type 1 (descriptor block) at block 1324
+Found expected sequence 1, type 1 (descriptor block) at block 1387
+Found expected sequence 1, type 1 (descriptor block) at block 1450
+Found expected sequence 1, type 1 (descriptor block) at block 1513
+Found expected sequence 1, type 1 (descriptor block) at block 1576
+Found expected sequence 1, type 1 (descriptor block) at block 1639
+Found expected sequence 1, type 1 (descriptor block) at block 1702
+Found expected sequence 1, type 1 (descriptor block) at block 1765
+Found expected sequence 1, type 1 (descriptor block) at block 1828
+Found expected sequence 1, type 1 (descriptor block) at block 1891
+Found expected sequence 1, type 1 (descriptor block) at block 1954
+Found expected sequence 1, type 1 (descriptor block) at block 2017
+Found expected sequence 1, type 1 (descriptor block) at block 2080
+Found expected sequence 1, type 1 (descriptor block) at block 2143
+Found expected sequence 1, type 1 (descriptor block) at block 2206
+Found expected sequence 1, type 1 (descriptor block) at block 2269
+Found expected sequence 1, type 1 (descriptor block) at block 2332
+Found expected sequence 1, type 1 (descriptor block) at block 2395
+Found expected sequence 1, type 1 (descriptor block) at block 2458
+Found expected sequence 1, type 1 (descriptor block) at block 2521
+Found expected sequence 1, type 1 (descriptor block) at block 2584
+Found expected sequence 1, type 1 (descriptor block) at block 2647
+Found expected sequence 1, type 1 (descriptor block) at block 2710
+Found expected sequence 1, type 1 (descriptor block) at block 2773
+Found expected sequence 1, type 1 (descriptor block) at block 2836
+Found expected sequence 1, type 1 (descriptor block) at block 2899
+Found expected sequence 1, type 1 (descriptor block) at block 2962
+Found expected sequence 1, type 1 (descriptor block) at block 3025
+Found expected sequence 1, type 1 (descriptor block) at block 3088
+Found expected sequence 1, type 1 (descriptor block) at block 3151
+Found expected sequence 1, type 1 (descriptor block) at block 3214
+Found expected sequence 1, type 1 (descriptor block) at block 3277
+Found expected sequence 1, type 1 (descriptor block) at block 3340
+Found expected sequence 1, type 1 (descriptor block) at block 3403
+Found expected sequence 1, type 1 (descriptor block) at block 3466
+Found expected sequence 1, type 1 (descriptor block) at block 3529
+Found expected sequence 1, type 1 (descriptor block) at block 3592
+Found expected sequence 1, type 1 (descriptor block) at block 3655
+Found expected sequence 1, type 1 (descriptor block) at block 3718
+Found expected sequence 1, type 1 (descriptor block) at block 3781
+Found expected sequence 1, type 1 (descriptor block) at block 3844
+Found expected sequence 1, type 1 (descriptor block) at block 3907
+Found expected sequence 1, type 1 (descriptor block) at block 3970
+Found expected sequence 1, type 1 (descriptor block) at block 4033
+Found expected sequence 1, type 1 (descriptor block) at block 4096
+Found expected sequence 1, type 1 (descriptor block) at block 4159
+Found expected sequence 1, type 2 (commit block) at block 4165
+Found expected sequence 2, type 5 (revoke table) at block 4166
+Found expected sequence 2, type 5 (revoke table) at block 4167
+Found expected sequence 2, type 5 (revoke table) at block 4168
+Found expected sequence 2, type 5 (revoke table) at block 4169
+Found expected sequence 2, type 5 (revoke table) at block 4170
+Found expected sequence 2, type 5 (revoke table) at block 4171
+Found expected sequence 2, type 5 (revoke table) at block 4172
+Found expected sequence 2, type 5 (revoke table) at block 4173
+Found expected sequence 2, type 5 (revoke table) at block 4174
+Found expected sequence 2, type 5 (revoke table) at block 4175
+Found expected sequence 2, type 5 (revoke table) at block 4176
+Found expected sequence 2, type 5 (revoke table) at block 4177
+Found expected sequence 2, type 5 (revoke table) at block 4178
+Found expected sequence 2, type 5 (revoke table) at block 4179
+Found expected sequence 2, type 5 (revoke table) at block 4180
+Found expected sequence 2, type 5 (revoke table) at block 4181
+Found expected sequence 2, type 5 (revoke table) at block 4182
+Found expected sequence 2, type 2 (commit block) at block 4183
+No magic number at block 4184: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 27050/524288 blocks
+Exit status is 0
diff --git a/tests/j_long_revoke_trans_mcsum_32bit/name b/tests/j_long_revoke_trans_mcsum_32bit/name
new file mode 100644
index 0000000..1aca67d
--- /dev/null
+++ b/tests/j_long_revoke_trans_mcsum_32bit/name
@@ -0,0 +1 @@
+revoked trans nuking free space 32bit,mcsum
diff --git a/tests/j_long_revoke_trans_mcsum_32bit/script b/tests/j_long_revoke_trans_mcsum_32bit/script
new file mode 100644
index 0000000..8e5a029
--- /dev/null
+++ b/tests/j_long_revoke_trans_mcsum_32bit/script
@@ -0,0 +1,56 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O ^64bit,has_journal,metadata_csum -T ext4 $TMPFILE 524288 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b 260-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r 260-4356" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_long_revoke_trans_mcsum_64bit/expect b/tests/j_long_revoke_trans_mcsum_64bit/expect
new file mode 100644
index 0000000..29dc407
--- /dev/null
+++ b/tests/j_long_revoke_trans_mcsum_64bit/expect
@@ -0,0 +1,132 @@
+Creating filesystem with 524288 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 27068/524288 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 1 (descriptor block) at block 64
+Found expected sequence 1, type 1 (descriptor block) at block 127
+Found expected sequence 1, type 1 (descriptor block) at block 190
+Found expected sequence 1, type 1 (descriptor block) at block 253
+Found expected sequence 1, type 1 (descriptor block) at block 316
+Found expected sequence 1, type 1 (descriptor block) at block 379
+Found expected sequence 1, type 1 (descriptor block) at block 442
+Found expected sequence 1, type 1 (descriptor block) at block 505
+Found expected sequence 1, type 1 (descriptor block) at block 568
+Found expected sequence 1, type 1 (descriptor block) at block 631
+Found expected sequence 1, type 1 (descriptor block) at block 694
+Found expected sequence 1, type 1 (descriptor block) at block 757
+Found expected sequence 1, type 1 (descriptor block) at block 820
+Found expected sequence 1, type 1 (descriptor block) at block 883
+Found expected sequence 1, type 1 (descriptor block) at block 946
+Found expected sequence 1, type 1 (descriptor block) at block 1009
+Found expected sequence 1, type 1 (descriptor block) at block 1072
+Found expected sequence 1, type 1 (descriptor block) at block 1135
+Found expected sequence 1, type 1 (descriptor block) at block 1198
+Found expected sequence 1, type 1 (descriptor block) at block 1261
+Found expected sequence 1, type 1 (descriptor block) at block 1324
+Found expected sequence 1, type 1 (descriptor block) at block 1387
+Found expected sequence 1, type 1 (descriptor block) at block 1450
+Found expected sequence 1, type 1 (descriptor block) at block 1513
+Found expected sequence 1, type 1 (descriptor block) at block 1576
+Found expected sequence 1, type 1 (descriptor block) at block 1639
+Found expected sequence 1, type 1 (descriptor block) at block 1702
+Found expected sequence 1, type 1 (descriptor block) at block 1765
+Found expected sequence 1, type 1 (descriptor block) at block 1828
+Found expected sequence 1, type 1 (descriptor block) at block 1891
+Found expected sequence 1, type 1 (descriptor block) at block 1954
+Found expected sequence 1, type 1 (descriptor block) at block 2017
+Found expected sequence 1, type 1 (descriptor block) at block 2080
+Found expected sequence 1, type 1 (descriptor block) at block 2143
+Found expected sequence 1, type 1 (descriptor block) at block 2206
+Found expected sequence 1, type 1 (descriptor block) at block 2269
+Found expected sequence 1, type 1 (descriptor block) at block 2332
+Found expected sequence 1, type 1 (descriptor block) at block 2395
+Found expected sequence 1, type 1 (descriptor block) at block 2458
+Found expected sequence 1, type 1 (descriptor block) at block 2521
+Found expected sequence 1, type 1 (descriptor block) at block 2584
+Found expected sequence 1, type 1 (descriptor block) at block 2647
+Found expected sequence 1, type 1 (descriptor block) at block 2710
+Found expected sequence 1, type 1 (descriptor block) at block 2773
+Found expected sequence 1, type 1 (descriptor block) at block 2836
+Found expected sequence 1, type 1 (descriptor block) at block 2899
+Found expected sequence 1, type 1 (descriptor block) at block 2962
+Found expected sequence 1, type 1 (descriptor block) at block 3025
+Found expected sequence 1, type 1 (descriptor block) at block 3088
+Found expected sequence 1, type 1 (descriptor block) at block 3151
+Found expected sequence 1, type 1 (descriptor block) at block 3214
+Found expected sequence 1, type 1 (descriptor block) at block 3277
+Found expected sequence 1, type 1 (descriptor block) at block 3340
+Found expected sequence 1, type 1 (descriptor block) at block 3403
+Found expected sequence 1, type 1 (descriptor block) at block 3466
+Found expected sequence 1, type 1 (descriptor block) at block 3529
+Found expected sequence 1, type 1 (descriptor block) at block 3592
+Found expected sequence 1, type 1 (descriptor block) at block 3655
+Found expected sequence 1, type 1 (descriptor block) at block 3718
+Found expected sequence 1, type 1 (descriptor block) at block 3781
+Found expected sequence 1, type 1 (descriptor block) at block 3844
+Found expected sequence 1, type 1 (descriptor block) at block 3907
+Found expected sequence 1, type 1 (descriptor block) at block 3970
+Found expected sequence 1, type 1 (descriptor block) at block 4033
+Found expected sequence 1, type 1 (descriptor block) at block 4096
+Found expected sequence 1, type 1 (descriptor block) at block 4159
+Found expected sequence 1, type 2 (commit block) at block 4165
+Found expected sequence 2, type 5 (revoke table) at block 4166
+Found expected sequence 2, type 5 (revoke table) at block 4167
+Found expected sequence 2, type 5 (revoke table) at block 4168
+Found expected sequence 2, type 5 (revoke table) at block 4169
+Found expected sequence 2, type 5 (revoke table) at block 4170
+Found expected sequence 2, type 5 (revoke table) at block 4171
+Found expected sequence 2, type 5 (revoke table) at block 4172
+Found expected sequence 2, type 5 (revoke table) at block 4173
+Found expected sequence 2, type 5 (revoke table) at block 4174
+Found expected sequence 2, type 5 (revoke table) at block 4175
+Found expected sequence 2, type 5 (revoke table) at block 4176
+Found expected sequence 2, type 5 (revoke table) at block 4177
+Found expected sequence 2, type 5 (revoke table) at block 4178
+Found expected sequence 2, type 5 (revoke table) at block 4179
+Found expected sequence 2, type 5 (revoke table) at block 4180
+Found expected sequence 2, type 5 (revoke table) at block 4181
+Found expected sequence 2, type 5 (revoke table) at block 4182
+Found expected sequence 2, type 5 (revoke table) at block 4183
+Found expected sequence 2, type 5 (revoke table) at block 4184
+Found expected sequence 2, type 5 (revoke table) at block 4185
+Found expected sequence 2, type 5 (revoke table) at block 4186
+Found expected sequence 2, type 5 (revoke table) at block 4187
+Found expected sequence 2, type 5 (revoke table) at block 4188
+Found expected sequence 2, type 5 (revoke table) at block 4189
+Found expected sequence 2, type 5 (revoke table) at block 4190
+Found expected sequence 2, type 5 (revoke table) at block 4191
+Found expected sequence 2, type 5 (revoke table) at block 4192
+Found expected sequence 2, type 5 (revoke table) at block 4193
+Found expected sequence 2, type 5 (revoke table) at block 4194
+Found expected sequence 2, type 5 (revoke table) at block 4195
+Found expected sequence 2, type 5 (revoke table) at block 4196
+Found expected sequence 2, type 5 (revoke table) at block 4197
+Found expected sequence 2, type 5 (revoke table) at block 4198
+Found expected sequence 2, type 2 (commit block) at block 4199
+No magic number at block 4200: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 27068/524288 blocks
+Exit status is 0
diff --git a/tests/j_long_revoke_trans_mcsum_64bit/name b/tests/j_long_revoke_trans_mcsum_64bit/name
new file mode 100644
index 0000000..0fa20fe
--- /dev/null
+++ b/tests/j_long_revoke_trans_mcsum_64bit/name
@@ -0,0 +1 @@
+revoke trans nuking free space 64bit,mcsum
diff --git a/tests/j_long_revoke_trans_mcsum_64bit/script b/tests/j_long_revoke_trans_mcsum_64bit/script
new file mode 100644
index 0000000..4bc0962
--- /dev/null
+++ b/tests/j_long_revoke_trans_mcsum_64bit/script
@@ -0,0 +1,56 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O 64bit,has_journal,metadata_csum -T ext4 $TMPFILE 524288 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b 262-4358 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r 262-4358" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_long_trans/expect b/tests/j_long_trans/expect
new file mode 100644
index 0000000..82b3caf
--- /dev/null
+++ b/tests/j_long_trans/expect
@@ -0,0 +1,109 @@
+Creating filesystem with 262144 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (8192 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 14431/262144 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 1 (descriptor block) at block 126
+Found expected sequence 1, type 1 (descriptor block) at block 251
+Found expected sequence 1, type 1 (descriptor block) at block 376
+Found expected sequence 1, type 1 (descriptor block) at block 501
+Found expected sequence 1, type 1 (descriptor block) at block 626
+Found expected sequence 1, type 1 (descriptor block) at block 751
+Found expected sequence 1, type 1 (descriptor block) at block 876
+Found expected sequence 1, type 1 (descriptor block) at block 1001
+Found expected sequence 1, type 1 (descriptor block) at block 1126
+Found expected sequence 1, type 1 (descriptor block) at block 1251
+Found expected sequence 1, type 1 (descriptor block) at block 1376
+Found expected sequence 1, type 1 (descriptor block) at block 1501
+Found expected sequence 1, type 1 (descriptor block) at block 1626
+Found expected sequence 1, type 1 (descriptor block) at block 1751
+Found expected sequence 1, type 1 (descriptor block) at block 1876
+Found expected sequence 1, type 1 (descriptor block) at block 2001
+Found expected sequence 1, type 1 (descriptor block) at block 2126
+Found expected sequence 1, type 1 (descriptor block) at block 2251
+Found expected sequence 1, type 1 (descriptor block) at block 2376
+Found expected sequence 1, type 1 (descriptor block) at block 2501
+Found expected sequence 1, type 1 (descriptor block) at block 2626
+Found expected sequence 1, type 1 (descriptor block) at block 2751
+Found expected sequence 1, type 1 (descriptor block) at block 2876
+Found expected sequence 1, type 1 (descriptor block) at block 3001
+Found expected sequence 1, type 1 (descriptor block) at block 3126
+Found expected sequence 1, type 1 (descriptor block) at block 3251
+Found expected sequence 1, type 1 (descriptor block) at block 3376
+Found expected sequence 1, type 1 (descriptor block) at block 3501
+Found expected sequence 1, type 1 (descriptor block) at block 3626
+Found expected sequence 1, type 1 (descriptor block) at block 3751
+Found expected sequence 1, type 1 (descriptor block) at block 3876
+Found expected sequence 1, type 1 (descriptor block) at block 4001
+Found expected sequence 1, type 1 (descriptor block) at block 4126
+Found expected sequence 1, type 2 (commit block) at block 4133
+No magic number at block 4134: end of journal.
+test_filesys: recovering journal
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Root inode is not a directory. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--259) +273 +275 +289 +(291--418) +(2083--2210) +2341
+Fix? yes
+
+Free blocks count wrong for group #0 (5838, counted=5851).
+Fix? yes
+
+Free blocks count wrong for group #14 (0, counted=8192).
+Fix? yes
+
+Free blocks count wrong (247711, counted=255916).
+Fix? yes
+
+Inode bitmap differences: +1 +(3--10)
+Fix? yes
+
+Free inodes count wrong for group #0 (500, counted=501).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (16372, counted=16373).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+Recreate journal? yes
+
+Creating journal (8192 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 14420/262144 blocks
+Exit status is 1
diff --git a/tests/j_long_trans/name b/tests/j_long_trans/name
new file mode 100644
index 0000000..7a70f8f
--- /dev/null
+++ b/tests/j_long_trans/name
@@ -0,0 +1 @@
+transaction nuking free space
diff --git a/tests/j_long_trans/script b/tests/j_long_trans/script
new file mode 100644
index 0000000..ff4dab3
--- /dev/null
+++ b/tests/j_long_trans/script
@@ -0,0 +1,49 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O has_journal -T ext4 $TMPFILE 262144 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_long_trans_mcsum_32bit/expect b/tests/j_long_trans_mcsum_32bit/expect
new file mode 100644
index 0000000..ffae07a
--- /dev/null
+++ b/tests/j_long_trans_mcsum_32bit/expect
@@ -0,0 +1,148 @@
+64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.
+Creating filesystem with 524288 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 27050/524288 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 1 (descriptor block) at block 64
+Found expected sequence 1, type 1 (descriptor block) at block 127
+Found expected sequence 1, type 1 (descriptor block) at block 190
+Found expected sequence 1, type 1 (descriptor block) at block 253
+Found expected sequence 1, type 1 (descriptor block) at block 316
+Found expected sequence 1, type 1 (descriptor block) at block 379
+Found expected sequence 1, type 1 (descriptor block) at block 442
+Found expected sequence 1, type 1 (descriptor block) at block 505
+Found expected sequence 1, type 1 (descriptor block) at block 568
+Found expected sequence 1, type 1 (descriptor block) at block 631
+Found expected sequence 1, type 1 (descriptor block) at block 694
+Found expected sequence 1, type 1 (descriptor block) at block 757
+Found expected sequence 1, type 1 (descriptor block) at block 820
+Found expected sequence 1, type 1 (descriptor block) at block 883
+Found expected sequence 1, type 1 (descriptor block) at block 946
+Found expected sequence 1, type 1 (descriptor block) at block 1009
+Found expected sequence 1, type 1 (descriptor block) at block 1072
+Found expected sequence 1, type 1 (descriptor block) at block 1135
+Found expected sequence 1, type 1 (descriptor block) at block 1198
+Found expected sequence 1, type 1 (descriptor block) at block 1261
+Found expected sequence 1, type 1 (descriptor block) at block 1324
+Found expected sequence 1, type 1 (descriptor block) at block 1387
+Found expected sequence 1, type 1 (descriptor block) at block 1450
+Found expected sequence 1, type 1 (descriptor block) at block 1513
+Found expected sequence 1, type 1 (descriptor block) at block 1576
+Found expected sequence 1, type 1 (descriptor block) at block 1639
+Found expected sequence 1, type 1 (descriptor block) at block 1702
+Found expected sequence 1, type 1 (descriptor block) at block 1765
+Found expected sequence 1, type 1 (descriptor block) at block 1828
+Found expected sequence 1, type 1 (descriptor block) at block 1891
+Found expected sequence 1, type 1 (descriptor block) at block 1954
+Found expected sequence 1, type 1 (descriptor block) at block 2017
+Found expected sequence 1, type 1 (descriptor block) at block 2080
+Found expected sequence 1, type 1 (descriptor block) at block 2143
+Found expected sequence 1, type 1 (descriptor block) at block 2206
+Found expected sequence 1, type 1 (descriptor block) at block 2269
+Found expected sequence 1, type 1 (descriptor block) at block 2332
+Found expected sequence 1, type 1 (descriptor block) at block 2395
+Found expected sequence 1, type 1 (descriptor block) at block 2458
+Found expected sequence 1, type 1 (descriptor block) at block 2521
+Found expected sequence 1, type 1 (descriptor block) at block 2584
+Found expected sequence 1, type 1 (descriptor block) at block 2647
+Found expected sequence 1, type 1 (descriptor block) at block 2710
+Found expected sequence 1, type 1 (descriptor block) at block 2773
+Found expected sequence 1, type 1 (descriptor block) at block 2836
+Found expected sequence 1, type 1 (descriptor block) at block 2899
+Found expected sequence 1, type 1 (descriptor block) at block 2962
+Found expected sequence 1, type 1 (descriptor block) at block 3025
+Found expected sequence 1, type 1 (descriptor block) at block 3088
+Found expected sequence 1, type 1 (descriptor block) at block 3151
+Found expected sequence 1, type 1 (descriptor block) at block 3214
+Found expected sequence 1, type 1 (descriptor block) at block 3277
+Found expected sequence 1, type 1 (descriptor block) at block 3340
+Found expected sequence 1, type 1 (descriptor block) at block 3403
+Found expected sequence 1, type 1 (descriptor block) at block 3466
+Found expected sequence 1, type 1 (descriptor block) at block 3529
+Found expected sequence 1, type 1 (descriptor block) at block 3592
+Found expected sequence 1, type 1 (descriptor block) at block 3655
+Found expected sequence 1, type 1 (descriptor block) at block 3718
+Found expected sequence 1, type 1 (descriptor block) at block 3781
+Found expected sequence 1, type 1 (descriptor block) at block 3844
+Found expected sequence 1, type 1 (descriptor block) at block 3907
+Found expected sequence 1, type 1 (descriptor block) at block 3970
+Found expected sequence 1, type 1 (descriptor block) at block 4033
+Found expected sequence 1, type 1 (descriptor block) at block 4096
+Found expected sequence 1, type 1 (descriptor block) at block 4159
+Found expected sequence 1, type 2 (commit block) at block 4165
+No magic number at block 4166: end of journal.
+test_filesys: recovering journal
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Root inode is not a directory. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--260) +276 +(292--419) +2342 -(139265--155648)
+Fix? yes
+
+Free blocks count wrong for group #0 (5837, counted=5850).
+Fix? yes
+
+Free blocks count wrong for group #17 (0, counted=8192).
+Fix? yes
+
+Free blocks count wrong for group #18 (0, counted=8192).
+Fix? yes
+
+Free blocks count wrong (497236, counted=513633).
+Fix? yes
+
+Inode bitmap differences: +1 +(3--10)
+Fix? yes
+
+Free inodes count wrong for group #0 (500, counted=501).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (32756, counted=32757).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+Recreate journal? yes
+
+Creating journal (16384 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32768 files (0.0% non-contiguous), 27039/524288 blocks
+Exit status is 1
diff --git a/tests/j_long_trans_mcsum_32bit/name b/tests/j_long_trans_mcsum_32bit/name
new file mode 100644
index 0000000..d4473d9
--- /dev/null
+++ b/tests/j_long_trans_mcsum_32bit/name
@@ -0,0 +1 @@
+trans nuking free space 32bit,meta_csum
diff --git a/tests/j_long_trans_mcsum_32bit/script b/tests/j_long_trans_mcsum_32bit/script
new file mode 100644
index 0000000..76da8ca
--- /dev/null
+++ b/tests/j_long_trans_mcsum_32bit/script
@@ -0,0 +1,53 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O ^64bit,has_journal,metadata_csum -T ext4 $TMPFILE 524288 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b 260-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_long_trans_mcsum_64bit/expect b/tests/j_long_trans_mcsum_64bit/expect
new file mode 100644
index 0000000..e891def
--- /dev/null
+++ b/tests/j_long_trans_mcsum_64bit/expect
@@ -0,0 +1,147 @@
+Creating filesystem with 524288 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 27068/524288 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_64bit journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 1 (descriptor block) at block 64
+Found expected sequence 1, type 1 (descriptor block) at block 127
+Found expected sequence 1, type 1 (descriptor block) at block 190
+Found expected sequence 1, type 1 (descriptor block) at block 253
+Found expected sequence 1, type 1 (descriptor block) at block 316
+Found expected sequence 1, type 1 (descriptor block) at block 379
+Found expected sequence 1, type 1 (descriptor block) at block 442
+Found expected sequence 1, type 1 (descriptor block) at block 505
+Found expected sequence 1, type 1 (descriptor block) at block 568
+Found expected sequence 1, type 1 (descriptor block) at block 631
+Found expected sequence 1, type 1 (descriptor block) at block 694
+Found expected sequence 1, type 1 (descriptor block) at block 757
+Found expected sequence 1, type 1 (descriptor block) at block 820
+Found expected sequence 1, type 1 (descriptor block) at block 883
+Found expected sequence 1, type 1 (descriptor block) at block 946
+Found expected sequence 1, type 1 (descriptor block) at block 1009
+Found expected sequence 1, type 1 (descriptor block) at block 1072
+Found expected sequence 1, type 1 (descriptor block) at block 1135
+Found expected sequence 1, type 1 (descriptor block) at block 1198
+Found expected sequence 1, type 1 (descriptor block) at block 1261
+Found expected sequence 1, type 1 (descriptor block) at block 1324
+Found expected sequence 1, type 1 (descriptor block) at block 1387
+Found expected sequence 1, type 1 (descriptor block) at block 1450
+Found expected sequence 1, type 1 (descriptor block) at block 1513
+Found expected sequence 1, type 1 (descriptor block) at block 1576
+Found expected sequence 1, type 1 (descriptor block) at block 1639
+Found expected sequence 1, type 1 (descriptor block) at block 1702
+Found expected sequence 1, type 1 (descriptor block) at block 1765
+Found expected sequence 1, type 1 (descriptor block) at block 1828
+Found expected sequence 1, type 1 (descriptor block) at block 1891
+Found expected sequence 1, type 1 (descriptor block) at block 1954
+Found expected sequence 1, type 1 (descriptor block) at block 2017
+Found expected sequence 1, type 1 (descriptor block) at block 2080
+Found expected sequence 1, type 1 (descriptor block) at block 2143
+Found expected sequence 1, type 1 (descriptor block) at block 2206
+Found expected sequence 1, type 1 (descriptor block) at block 2269
+Found expected sequence 1, type 1 (descriptor block) at block 2332
+Found expected sequence 1, type 1 (descriptor block) at block 2395
+Found expected sequence 1, type 1 (descriptor block) at block 2458
+Found expected sequence 1, type 1 (descriptor block) at block 2521
+Found expected sequence 1, type 1 (descriptor block) at block 2584
+Found expected sequence 1, type 1 (descriptor block) at block 2647
+Found expected sequence 1, type 1 (descriptor block) at block 2710
+Found expected sequence 1, type 1 (descriptor block) at block 2773
+Found expected sequence 1, type 1 (descriptor block) at block 2836
+Found expected sequence 1, type 1 (descriptor block) at block 2899
+Found expected sequence 1, type 1 (descriptor block) at block 2962
+Found expected sequence 1, type 1 (descriptor block) at block 3025
+Found expected sequence 1, type 1 (descriptor block) at block 3088
+Found expected sequence 1, type 1 (descriptor block) at block 3151
+Found expected sequence 1, type 1 (descriptor block) at block 3214
+Found expected sequence 1, type 1 (descriptor block) at block 3277
+Found expected sequence 1, type 1 (descriptor block) at block 3340
+Found expected sequence 1, type 1 (descriptor block) at block 3403
+Found expected sequence 1, type 1 (descriptor block) at block 3466
+Found expected sequence 1, type 1 (descriptor block) at block 3529
+Found expected sequence 1, type 1 (descriptor block) at block 3592
+Found expected sequence 1, type 1 (descriptor block) at block 3655
+Found expected sequence 1, type 1 (descriptor block) at block 3718
+Found expected sequence 1, type 1 (descriptor block) at block 3781
+Found expected sequence 1, type 1 (descriptor block) at block 3844
+Found expected sequence 1, type 1 (descriptor block) at block 3907
+Found expected sequence 1, type 1 (descriptor block) at block 3970
+Found expected sequence 1, type 1 (descriptor block) at block 4033
+Found expected sequence 1, type 1 (descriptor block) at block 4096
+Found expected sequence 1, type 1 (descriptor block) at block 4159
+Found expected sequence 1, type 2 (commit block) at block 4165
+No magic number at block 4166: end of journal.
+test_filesys: recovering journal
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** journal has been deleted ***
+
+Resize inode not valid. Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Root inode is not a directory. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Root inode not allocated. Allocate? yes
+
+/lost+found not found. Create? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--262) +278 +(294--421) +2344 -(139265--155648)
+Fix? yes
+
+Free blocks count wrong for group #0 (5835, counted=5848).
+Fix? yes
+
+Free blocks count wrong for group #17 (0, counted=8192).
+Fix? yes
+
+Free blocks count wrong for group #18 (0, counted=8192).
+Fix? yes
+
+Free blocks count wrong (497218, counted=513615).
+Fix? yes
+
+Inode bitmap differences: +1 +(3--10)
+Fix? yes
+
+Free inodes count wrong for group #0 (500, counted=501).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (32756, counted=32757).
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+Recreate journal? yes
+
+Creating journal (16384 blocks): Done.
+
+*** journal has been regenerated ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32768 files (0.0% non-contiguous), 27057/524288 blocks
+Exit status is 1
diff --git a/tests/j_long_trans_mcsum_64bit/name b/tests/j_long_trans_mcsum_64bit/name
new file mode 100644
index 0000000..e204e79
--- /dev/null
+++ b/tests/j_long_trans_mcsum_64bit/name
@@ -0,0 +1 @@
+trans nuking free space 64bit,meta_csum
diff --git a/tests/j_long_trans_mcsum_64bit/script b/tests/j_long_trans_mcsum_64bit/script
new file mode 100644
index 0000000..b68d1d5
--- /dev/null
+++ b/tests/j_long_trans_mcsum_64bit/script
@@ -0,0 +1,53 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O 64bit,has_journal,metadata_csum -T ext4 $TMPFILE 524288 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b 262-4358 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_recover_csum2_32bit/expect.1 b/tests/j_recover_csum2_32bit/expect.1
new file mode 100644
index 0000000..fdbda36
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/expect.1
@@ -0,0 +1,18 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--259) +265 +(274--275) +281 +(290--418) +(1059--1186) +(2211--2352)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/8192 files (0.0% non-contiguous), 7739/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum2_32bit/expect.2 b/tests/j_recover_csum2_32bit/expect.2
new file mode 100644
index 0000000..d223026
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/8192 files (0.0% non-contiguous), 7739/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum2_32bit/image.bz2 b/tests/j_recover_csum2_32bit/image.bz2
new file mode 100644
index 0000000..2212edd
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/image.bz2
Binary files differ
diff --git a/tests/j_recover_csum2_32bit/name b/tests/j_recover_csum2_32bit/name
new file mode 100644
index 0000000..6fd378c
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/name
@@ -0,0 +1 @@
+recover 32-bit journal checksum v2
diff --git a/tests/j_recover_csum2_32bit/script b/tests/j_recover_csum2_32bit/script
new file mode 100755
index 0000000..cc736ca
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/script
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+
+# Run fsck to fix things?
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi
diff --git a/tests/j_recover_csum2_64bit/expect.1 b/tests/j_recover_csum2_64bit/expect.1
new file mode 100644
index 0000000..fdbda36
--- /dev/null
+++ b/tests/j_recover_csum2_64bit/expect.1
@@ -0,0 +1,18 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(1--259) +265 +(274--275) +281 +(290--418) +(1059--1186) +(2211--2352)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/8192 files (0.0% non-contiguous), 7739/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum2_64bit/expect.2 b/tests/j_recover_csum2_64bit/expect.2
new file mode 100644
index 0000000..d223026
--- /dev/null
+++ b/tests/j_recover_csum2_64bit/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/8192 files (0.0% non-contiguous), 7739/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum2_64bit/image.bz2 b/tests/j_recover_csum2_64bit/image.bz2
new file mode 100644
index 0000000..acf1dae
--- /dev/null
+++ b/tests/j_recover_csum2_64bit/image.bz2
Binary files differ
diff --git a/tests/j_recover_csum2_64bit/name b/tests/j_recover_csum2_64bit/name
new file mode 100644
index 0000000..1770502
--- /dev/null
+++ b/tests/j_recover_csum2_64bit/name
@@ -0,0 +1 @@
+recover 64-bit journal checksum v2
diff --git a/tests/j_recover_csum2_64bit/script b/tests/j_recover_csum2_64bit/script
new file mode 100755
index 0000000..cc736ca
--- /dev/null
+++ b/tests/j_recover_csum2_64bit/script
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+
+# Run fsck to fix things?
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi
diff --git a/tests/j_recover_csum3_64bit/expect.1 b/tests/j_recover_csum3_64bit/expect.1
new file mode 100644
index 0000000..6aed56a
--- /dev/null
+++ b/tests/j_recover_csum3_64bit/expect.1
@@ -0,0 +1,16 @@
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free blocks count wrong (121285, counted=121282).
+Fix? yes
+
+Free inodes count wrong (32757, counted=32754).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/32768 files (0.0% non-contiguous), 9790/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum3_64bit/expect.2 b/tests/j_recover_csum3_64bit/expect.2
new file mode 100644
index 0000000..b7a14da
--- /dev/null
+++ b/tests/j_recover_csum3_64bit/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/32768 files (0.0% non-contiguous), 9790/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum3_64bit/image.bz2 b/tests/j_recover_csum3_64bit/image.bz2
new file mode 100644
index 0000000..13b2956
--- /dev/null
+++ b/tests/j_recover_csum3_64bit/image.bz2
Binary files differ
diff --git a/tests/j_recover_csum3_64bit/name b/tests/j_recover_csum3_64bit/name
new file mode 100644
index 0000000..8f91d97
--- /dev/null
+++ b/tests/j_recover_csum3_64bit/name
@@ -0,0 +1 @@
+recover 64-bit journal checksum v3
diff --git a/tests/j_recover_csum3_64bit/script b/tests/j_recover_csum3_64bit/script
new file mode 100755
index 0000000..cc736ca
--- /dev/null
+++ b/tests/j_recover_csum3_64bit/script
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+
+# Run fsck to fix things?
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi
diff --git a/tests/j_recover_fast_commit/commands b/tests/j_recover_fast_commit/commands
new file mode 100644
index 0000000..74e20e4
--- /dev/null
+++ b/tests/j_recover_fast_commit/commands
@@ -0,0 +1,4 @@
+ls
+ls a/
+ex a/new
+ex a/data
diff --git a/tests/j_recover_fast_commit/expect b/tests/j_recover_fast_commit/expect
new file mode 100644
index 0000000..18e2fe0
--- /dev/null
+++ b/tests/j_recover_fast_commit/expect
@@ -0,0 +1,22 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/256 files (14.3% non-contiguous), 1365/2048 blocks
+Exit status is 0
+debugfs: ls
+ 2 (12) . 2 (12) .. 11 (20) lost+found 12 (968) a
+debugfs: ls a/
+ 12 (12) . 2 (12) .. 13 (12) data 14 (976) new
+debugfs: ex a/new
+Level Entries Logical Physical Length Flags
+ 0/ 0 1/ 1 0 - 0 1107 - 1107 1
+debugfs: ex a/data
+Level Entries Logical Physical Length Flags
+ 0/ 1 1/ 1 0 - 255 1618 256
+ 1/ 1 1/ 5 0 - 15 1619 - 1634 16
+ 1/ 1 2/ 5 16 - 31 1601 - 1616 16
+ 1/ 1 3/ 5 32 - 63 1985 - 2016 32
+ 1/ 1 4/ 5 64 - 127 1537 - 1600 64
+ 1/ 1 5/ 5 128 - 255 1793 - 1920 128
diff --git a/tests/j_recover_fast_commit/image.gz b/tests/j_recover_fast_commit/image.gz
new file mode 100644
index 0000000..b7357af
--- /dev/null
+++ b/tests/j_recover_fast_commit/image.gz
Binary files differ
diff --git a/tests/j_recover_fast_commit/script b/tests/j_recover_fast_commit/script
new file mode 100755
index 0000000..14cbb60
--- /dev/null
+++ b/tests/j_recover_fast_commit/script
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.gz
+CMDS=$test_dir/commands
+test_description="replay fast commit journal"
+
+gunzip < $IMAGE > $TMPFILE
+
+# Run fsck to fix things?
+EXP=$test_dir/expect
+OUT=$test_name.log
+
+$FSCK $FSCK_OPT -E journal_only -N test_filesys $TMPFILE 2>/dev/null | head -n 1000 | tail -n +2 > $OUT
+echo "Exit status is $?" >> $OUT
+
+$DEBUGFS -f $CMDS $TMPFILE >> $OUT 2>/dev/null
+
+# Figure out what happened
+if cmp -s $EXP $OUT; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT >> $test_name.failed
+fi
diff --git a/tests/j_short_revoke_trans/expect b/tests/j_short_revoke_trans/expect
new file mode 100644
index 0000000..e83c5ea
--- /dev/null
+++ b/tests/j_short_revoke_trans/expect
@@ -0,0 +1,32 @@
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 6
+Found expected sequence 2, type 5 (revoke table) at block 7
+Found expected sequence 2, type 2 (commit block) at block 8
+No magic number at block 9: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
diff --git a/tests/j_short_revoke_trans/name b/tests/j_short_revoke_trans/name
new file mode 100644
index 0000000..5470018
--- /dev/null
+++ b/tests/j_short_revoke_trans/name
@@ -0,0 +1 @@
+revoke blocks of transaction nuking bitmaps
diff --git a/tests/j_short_revoke_trans/script b/tests/j_short_revoke_trans/script
new file mode 100644
index 0000000..0e84e46
--- /dev/null
+++ b/tests/j_short_revoke_trans/script
@@ -0,0 +1,54 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r $bitmaps" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_revoke_trans_mcsum_64bit/expect b/tests/j_short_revoke_trans_mcsum_64bit/expect
new file mode 100644
index 0000000..2b0eeb3
--- /dev/null
+++ b/tests/j_short_revoke_trans_mcsum_64bit/expect
@@ -0,0 +1,34 @@
+Creating filesystem with 131072 4k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 32768, 98304
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 10
+Found expected sequence 2, type 5 (revoke table) at block 11
+Found expected sequence 2, type 2 (commit block) at block 12
+No magic number at block 13: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 0
diff --git a/tests/j_short_revoke_trans_mcsum_64bit/name b/tests/j_short_revoke_trans_mcsum_64bit/name
new file mode 100644
index 0000000..de05e51
--- /dev/null
+++ b/tests/j_short_revoke_trans_mcsum_64bit/name
@@ -0,0 +1 @@
+revoke trans nuking bmap 64bit,meta_csum
diff --git a/tests/j_short_revoke_trans_mcsum_64bit/script b/tests/j_short_revoke_trans_mcsum_64bit/script
new file mode 100644
index 0000000..9b97b11
--- /dev/null
+++ b/tests/j_short_revoke_trans_mcsum_64bit/script
@@ -0,0 +1,58 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O 64bit,has_journal,metadata_csum -T ext4 $TMPFILE 131072 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+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.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r $bitmaps" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_trans/expect b/tests/j_short_trans/expect
new file mode 100644
index 0000000..2bd0e50
--- /dev/null
+++ b/tests/j_short_trans/expect
@@ -0,0 +1,40 @@
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 6
+No magic number at block 7: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--1050) +(32768--36880)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 1
diff --git a/tests/j_short_trans/name b/tests/j_short_trans/name
new file mode 100644
index 0000000..730fbad
--- /dev/null
+++ b/tests/j_short_trans/name
@@ -0,0 +1 @@
+transaction nuking the bitmaps
diff --git a/tests/j_short_trans/script b/tests/j_short_trans/script
new file mode 100644
index 0000000..ec28a59
--- /dev/null
+++ b/tests/j_short_trans/script
@@ -0,0 +1,51 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_trans_64bit/expect b/tests/j_short_trans_64bit/expect
new file mode 100644
index 0000000..808dc61
--- /dev/null
+++ b/tests/j_short_trans_64bit/expect
@@ -0,0 +1,42 @@
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5196/65536 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_64bit
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 6
+No magic number at block 7: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--1066) +(32768--36896)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 5196/65536 blocks
+Exit status is 1
diff --git a/tests/j_short_trans_64bit/name b/tests/j_short_trans_64bit/name
new file mode 100644
index 0000000..17b70d0
--- /dev/null
+++ b/tests/j_short_trans_64bit/name
@@ -0,0 +1 @@
+transaction nuking the bitmaps on 64bit
diff --git a/tests/j_short_trans_64bit/script b/tests/j_short_trans_64bit/script
new file mode 100644
index 0000000..7680473
--- /dev/null
+++ b/tests/j_short_trans_64bit/script
@@ -0,0 +1,55 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O 64bit,has_journal -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+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.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_trans_mcsum_64bit/expect b/tests/j_short_trans_mcsum_64bit/expect
new file mode 100644
index 0000000..d73e282
--- /dev/null
+++ b/tests/j_short_trans_mcsum_64bit/expect
@@ -0,0 +1,42 @@
+Creating filesystem with 131072 4k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 32768, 98304
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_64bit journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 10
+No magic number at block 11: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--65) +(67--69) +(71--584) +(1097--2126) +(65536--69631) +(98304--98368)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 1
diff --git a/tests/j_short_trans_mcsum_64bit/name b/tests/j_short_trans_mcsum_64bit/name
new file mode 100644
index 0000000..da839e9
--- /dev/null
+++ b/tests/j_short_trans_mcsum_64bit/name
@@ -0,0 +1 @@
+trans nuking bitmaps 64bit,meta_csum
diff --git a/tests/j_short_trans_mcsum_64bit/script b/tests/j_short_trans_mcsum_64bit/script
new file mode 100644
index 0000000..511d4b7
--- /dev/null
+++ b/tests/j_short_trans_mcsum_64bit/script
@@ -0,0 +1,55 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O 64bit,has_journal,metadata_csum -T ext4 $TMPFILE 131072 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+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.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_trans_old_csum/expect b/tests/j_short_trans_old_csum/expect
new file mode 100644
index 0000000..6cf06d4
--- /dev/null
+++ b/tests/j_short_trans_old_csum/expect
@@ -0,0 +1,42 @@
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_checksum
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 6
+No magic number at block 7: end of journal.
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--1050) +(32768--36880)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 1
diff --git a/tests/j_short_trans_old_csum/name b/tests/j_short_trans_old_csum/name
new file mode 100644
index 0000000..435e9bc
--- /dev/null
+++ b/tests/j_short_trans_old_csum/name
@@ -0,0 +1 @@
+trans nuking bitmaps v1 journal csum
diff --git a/tests/j_short_trans_old_csum/script b/tests/j_short_trans_old_csum/script
new file mode 100644
index 0000000..f58f213
--- /dev/null
+++ b/tests/j_short_trans_old_csum/script
@@ -0,0 +1,55 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+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.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_trans_open_recover/expect b/tests/j_short_trans_open_recover/expect
new file mode 100644
index 0000000..3e86819
--- /dev/null
+++ b/tests/j_short_trans_open_recover/expect
@@ -0,0 +1,45 @@
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 6
+No magic number at block 7: end of journal.
+debugfs can't recover open journal
+debugfs: jo
+debugfs: jr
+Please close the journal before recovering it.
+debugfs: jc
+test_filesys: recovering journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--1050) +(32768--36880)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 1
diff --git a/tests/j_short_trans_open_recover/name b/tests/j_short_trans_open_recover/name
new file mode 100644
index 0000000..c6bb568
--- /dev/null
+++ b/tests/j_short_trans_open_recover/name
@@ -0,0 +1 @@
+don't recover open journal
diff --git a/tests/j_short_trans_open_recover/script b/tests/j_short_trans_open_recover/script
new file mode 100644
index 0000000..d68504b
--- /dev/null
+++ b/tests/j_short_trans_open_recover/script
@@ -0,0 +1,57 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+echo "debugfs can't recover open journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jr" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_trans_recover/expect b/tests/j_short_trans_recover/expect
new file mode 100644
index 0000000..508858c
--- /dev/null
+++ b/tests/j_short_trans_recover/expect
@@ -0,0 +1,42 @@
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 7
+Found expected sequence 2, type 5 (revoke table) at block 8
+Found expected sequence 2, type 2 (commit block) at block 9
+No magic number at block 10: end of journal.
+debugfs recover journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--1050) +(32768--36880)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 1
diff --git a/tests/j_short_trans_recover/name b/tests/j_short_trans_recover/name
new file mode 100644
index 0000000..54e3553
--- /dev/null
+++ b/tests/j_short_trans_recover/name
@@ -0,0 +1 @@
+transaction nuking the bitmaps (debugfs recovery)
diff --git a/tests/j_short_trans_recover/script b/tests/j_short_trans_recover/script
new file mode 100644
index 0000000..37e9441
--- /dev/null
+++ b/tests/j_short_trans_recover/script
@@ -0,0 +1,58 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b 333,$bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r 333" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+echo "debugfs recover journal" >> $OUT.new
+echo "jr" > $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_trans_recover_mcsum_64bit/expect b/tests/j_short_trans_recover_mcsum_64bit/expect
new file mode 100644
index 0000000..8c637f1
--- /dev/null
+++ b/tests/j_short_trans_recover_mcsum_64bit/expect
@@ -0,0 +1,44 @@
+Creating filesystem with 131072 4k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 32768, 98304
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 2 (commit block) at block 11
+Found expected sequence 2, type 5 (revoke table) at block 12
+Found expected sequence 2, type 2 (commit block) at block 13
+No magic number at block 14: end of journal.
+debugfs recover journal
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--65) +(67--69) +(71--584) +(1097--2126) +(65536--69631) +(98304--98368)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 1
diff --git a/tests/j_short_trans_recover_mcsum_64bit/name b/tests/j_short_trans_recover_mcsum_64bit/name
new file mode 100644
index 0000000..01b4acd
--- /dev/null
+++ b/tests/j_short_trans_recover_mcsum_64bit/name
@@ -0,0 +1 @@
+uncommitted trans nuking bmap 64bit,mcsum
diff --git a/tests/j_short_trans_recover_mcsum_64bit/script b/tests/j_short_trans_recover_mcsum_64bit/script
new file mode 100644
index 0000000..cb2635b
--- /dev/null
+++ b/tests/j_short_trans_recover_mcsum_64bit/script
@@ -0,0 +1,62 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O 64bit,has_journal,metadata_csum -T ext4 $TMPFILE 131072 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+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.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b 333,$bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r 333" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+echo "debugfs recover journal" >> $OUT.new
+echo "jr" > $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_uncommitted_trans/expect b/tests/j_short_uncommitted_trans/expect
new file mode 100644
index 0000000..dedddb5
--- /dev/null
+++ b/tests/j_short_uncommitted_trans/expect
@@ -0,0 +1,26 @@
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 0, transaction 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
diff --git a/tests/j_short_uncommitted_trans/name b/tests/j_short_uncommitted_trans/name
new file mode 100644
index 0000000..b617231
--- /dev/null
+++ b/tests/j_short_uncommitted_trans/name
@@ -0,0 +1 @@
+uncommitted transaction nuking bitmaps
diff --git a/tests/j_short_uncommitted_trans/script b/tests/j_short_uncommitted_trans/script
new file mode 100644
index 0000000..b7a64b3
--- /dev/null
+++ b/tests/j_short_uncommitted_trans/script
@@ -0,0 +1,51 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b $bitmaps -c /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/j_short_uncommitted_trans_mcsum_64bit/expect b/tests/j_short_uncommitted_trans_mcsum_64bit/expect
new file mode 100644
index 0000000..3effc94
--- /dev/null
+++ b/tests/j_short_uncommitted_trans_mcsum_64bit/expect
@@ -0,0 +1,28 @@
+Creating filesystem with 131072 4k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 32768, 98304
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 0
+Journal features: (none)
+debugfs write journal
+Journal features: journal_64bit journal_checksum_v3
+debugfs: logdump -c
+Journal starts at block 0, transaction 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
+Exit status is 0
diff --git a/tests/j_short_uncommitted_trans_mcsum_64bit/name b/tests/j_short_uncommitted_trans_mcsum_64bit/name
new file mode 100644
index 0000000..9113950
--- /dev/null
+++ b/tests/j_short_uncommitted_trans_mcsum_64bit/name
@@ -0,0 +1 @@
+uncommitted trans nuking bmap 64b,mcsum
diff --git a/tests/j_short_uncommitted_trans_mcsum_64bit/script b/tests/j_short_uncommitted_trans_mcsum_64bit/script
new file mode 100644
index 0000000..fe11af1
--- /dev/null
+++ b/tests/j_short_uncommitted_trans_mcsum_64bit/script
@@ -0,0 +1,55 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O 64bit,has_journal,metadata_csum -T ext4 $TMPFILE 131072 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+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.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo -c" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero -c" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT.new
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/m_64bit_flexbg/expect.1 b/tests/m_64bit_flexbg/expect.1
new file mode 100644
index 0000000..0baea1b
--- /dev/null
+++ b/tests/m_64bit_flexbg/expect.1
@@ -0,0 +1,59 @@
+Creating filesystem with 1024 1k blocks and 128 inodes
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 58/1024 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 128
+Block count: 1024
+Reserved block count: 51
+Overhead clusters: 44
+Free blocks: 966
+Free inodes: 117
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Group descriptor size: 64
+Reserved GDT blocks: 7
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 128
+Inode blocks per group: 32
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+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)
+ Inode table at 42-73 (+41)
+ 966 free blocks, 117 free inodes, 2 directories
+ Free blocks: 24-25, 27-41, 75-1023
+ Free inodes: 12-128
diff --git a/tests/m_64bit_flexbg/script b/tests/m_64bit_flexbg/script
new file mode 100644
index 0000000..98684e4
--- /dev/null
+++ b/tests/m_64bit_flexbg/script
@@ -0,0 +1,4 @@
+DESCRIPTION="mkfs with 64bit and flex_bg"
+FS_SIZE=1M
+MKE2FS_OPTS="-O 64bit,extents,flex_bg"
+. $cmd_dir/run_mke2fs
diff --git a/tests/m_assume_storage_prezeroed/expect b/tests/m_assume_storage_prezeroed/expect
new file mode 100644
index 0000000..b735e24
--- /dev/null
+++ b/tests/m_assume_storage_prezeroed/expect
@@ -0,0 +1,2 @@
+> 10000
+224
diff --git a/tests/m_assume_storage_prezeroed/script b/tests/m_assume_storage_prezeroed/script
new file mode 100644
index 0000000..1a8d846
--- /dev/null
+++ b/tests/m_assume_storage_prezeroed/script
@@ -0,0 +1,63 @@
+test_description="test prezeroed storage metadata allocation"
+FILE_SIZE=16M
+
+LOG=$test_name.log
+OUT=$test_name.out
+EXP=$test_dir/expect
+
+if test "$(id -u)" -ne 0 ; then
+ echo "$test_name: $test_description: skipped (not root)"
+elif ! command -v losetup >/dev/null ; then
+ echo "$test_name: $test_description: skipped (no losetup)"
+else
+ dd if=/dev/zero of=$TMPFILE.1 bs=1 count=0 seek=$FILE_SIZE >> $LOG 2>&1
+ dd if=/dev/zero of=$TMPFILE.2 bs=1 count=0 seek=$FILE_SIZE >> $LOG 2>&1
+
+ LOOP1=$(losetup --show --sector-size 4096 -f $TMPFILE.1)
+ if [ ! -b "$LOOP1" ]; then
+ echo "$test_name: $DESCRIPTION: skipped (no loop devices)"
+ rm -f $TMPFILE.1 $TMPFILE.2
+ exit 0
+ fi
+ LOOP2=$(losetup --show --sector-size 4096 -f $TMPFILE.2)
+ if [ ! -b "$LOOP2" ]; then
+ echo "$test_name: $DESCRIPTION: skipped (no loop devices)"
+ rm -f $TMPFILE.1 $TMPFILE.2
+ losetup -d $LOOP1
+ exit 0
+ fi
+
+ echo $MKE2FS -o Linux -t ext4 $LOOP1 >> $LOG 2>&1
+ $MKE2FS -o Linux -t ext4 $LOOP1 >> $LOG 2>&1
+ sync
+ stat $TMPFILE.1 >> $LOG 2>&1
+ SZ=$(stat -c "%b" $TMPFILE.1)
+ if test $SZ -gt 10000 ; then
+ echo "> 10000" > $OUT
+ else
+ echo "$SZ" > $OUT
+ fi
+
+ echo $MKE2FS -o Linux -t ext4 -E assume_storage_prezeroed=1 $LOOP2 >> $LOG 2>&1
+ $MKE2FS -o Linux -t ext4 -E assume_storage_prezeroed=1 $LOOP2 >> $LOG 2>&1
+ sync
+ stat $TMPFILE.2 >> $LOG 2>&1
+ stat -c "%b" $TMPFILE.2 >> $OUT
+
+ losetup -d $LOOP1
+ losetup -d $LOOP2
+ rm -f $TMPFILE.1 $TMPFILE.2
+
+ cmp -s $OUT $EXP
+ status=$?
+
+ if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+ else
+ echo "$test_name: $test_description: failed"
+ cat $LOG > $test_name.failed
+ diff $EXP $OUT >> $test_name.failed
+ fi
+fi
+unset LOG OUT EXP FILE_SIZE LOOP1 LOOP2
diff --git a/tests/m_bigjournal/expect.1 b/tests/m_bigjournal/expect.1
new file mode 100644
index 0000000..eb0e3bc
--- /dev/null
+++ b/tests/m_bigjournal/expect.1
@@ -0,0 +1,576 @@
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/1344 files (0.0% non-contiguous), 1286989/2750000 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 1344
+Block count: 2750000
+Reserved block count: 137500
+Overhead clusters: 1286982
+Free blocks: 1463011
+Free inodes: 1333
+First block: 0
+Block size: 4096
+Fragment size: 4096
+Reserved GDT blocks: 671
+Blocks per group: 32768
+Fragments per group: 32768
+Inodes per group: 16
+Inode blocks per group: 1
+Flex block group size: 512
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Journal features: (none)
+Total journal size: 5000M
+Total journal blocks: 1280000
+Max transaction length: 1280000
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+
+
+Group 0: (Blocks 0-32767)
+ Primary superblock at 0, Group descriptors at 1-1
+ Reserved GDT blocks at 2-672
+ Block bitmap at 673 (+673), Inode bitmap at 757 (+757)
+ Inode table at 841-841 (+841)
+ 31837 free blocks, 5 free inodes, 2 directories, 5 unused inodes
+ Free blocks: 931-32767
+ Free inodes: 12-16
+Group 1: (Blocks 32768-65535) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 32768, Group descriptors at 32769-32769
+ Reserved GDT blocks at 32770-33440
+ Block bitmap at 674 (bg #0 + 674), Inode bitmap at 758 (bg #0 + 758)
+ Inode table at 842-842 (bg #0 + 842)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 33441-65535
+ Free inodes: 17-32
+Group 2: (Blocks 65536-98303) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 675 (bg #0 + 675), Inode bitmap at 759 (bg #0 + 759)
+ Inode table at 843-843 (bg #0 + 843)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 65536-98303
+ Free inodes: 33-48
+Group 3: (Blocks 98304-131071) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 98304, Group descriptors at 98305-98305
+ Reserved GDT blocks at 98306-98976
+ Block bitmap at 676 (bg #0 + 676), Inode bitmap at 760 (bg #0 + 760)
+ Inode table at 844-844 (bg #0 + 844)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 98977-131071
+ Free inodes: 49-64
+Group 4: (Blocks 131072-163839) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 677 (bg #0 + 677), Inode bitmap at 761 (bg #0 + 761)
+ Inode table at 845-845 (bg #0 + 845)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 131072-163839
+ Free inodes: 65-80
+Group 5: (Blocks 163840-196607) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 163840, Group descriptors at 163841-163841
+ Reserved GDT blocks at 163842-164512
+ Block bitmap at 678 (bg #0 + 678), Inode bitmap at 762 (bg #0 + 762)
+ Inode table at 846-846 (bg #0 + 846)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 164513-196607
+ Free inodes: 81-96
+Group 6: (Blocks 196608-229375) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 679 (bg #0 + 679), Inode bitmap at 763 (bg #0 + 763)
+ Inode table at 847-847 (bg #0 + 847)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 196608-229375
+ Free inodes: 97-112
+Group 7: (Blocks 229376-262143) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 229376, Group descriptors at 229377-229377
+ Reserved GDT blocks at 229378-230048
+ Block bitmap at 680 (bg #0 + 680), Inode bitmap at 764 (bg #0 + 764)
+ Inode table at 848-848 (bg #0 + 848)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 230049-262143
+ Free inodes: 113-128
+Group 8: (Blocks 262144-294911) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 681 (bg #0 + 681), Inode bitmap at 765 (bg #0 + 765)
+ Inode table at 849-849 (bg #0 + 849)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 262144-294911
+ Free inodes: 129-144
+Group 9: (Blocks 294912-327679) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 294912, Group descriptors at 294913-294913
+ Reserved GDT blocks at 294914-295584
+ Block bitmap at 682 (bg #0 + 682), Inode bitmap at 766 (bg #0 + 766)
+ Inode table at 850-850 (bg #0 + 850)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 295585-327679
+ Free inodes: 145-160
+Group 10: (Blocks 327680-360447) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 683 (bg #0 + 683), Inode bitmap at 767 (bg #0 + 767)
+ Inode table at 851-851 (bg #0 + 851)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 327680-360447
+ Free inodes: 161-176
+Group 11: (Blocks 360448-393215) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 684 (bg #0 + 684), Inode bitmap at 768 (bg #0 + 768)
+ Inode table at 852-852 (bg #0 + 852)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 360448-393215
+ Free inodes: 177-192
+Group 12: (Blocks 393216-425983) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 685 (bg #0 + 685), Inode bitmap at 769 (bg #0 + 769)
+ Inode table at 853-853 (bg #0 + 853)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 393216-425983
+ Free inodes: 193-208
+Group 13: (Blocks 425984-458751) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 686 (bg #0 + 686), Inode bitmap at 770 (bg #0 + 770)
+ Inode table at 854-854 (bg #0 + 854)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 425984-458751
+ Free inodes: 209-224
+Group 14: (Blocks 458752-491519) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 687 (bg #0 + 687), Inode bitmap at 771 (bg #0 + 771)
+ Inode table at 855-855 (bg #0 + 855)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 458752-491519
+ Free inodes: 225-240
+Group 15: (Blocks 491520-524287) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 688 (bg #0 + 688), Inode bitmap at 772 (bg #0 + 772)
+ Inode table at 856-856 (bg #0 + 856)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 491520-524287
+ Free inodes: 241-256
+Group 16: (Blocks 524288-557055) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 689 (bg #0 + 689), Inode bitmap at 773 (bg #0 + 773)
+ Inode table at 857-857 (bg #0 + 857)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 524288-557055
+ Free inodes: 257-272
+Group 17: (Blocks 557056-589823) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 690 (bg #0 + 690), Inode bitmap at 774 (bg #0 + 774)
+ Inode table at 858-858 (bg #0 + 858)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 557056-589823
+ Free inodes: 273-288
+Group 18: (Blocks 589824-622591) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 691 (bg #0 + 691), Inode bitmap at 775 (bg #0 + 775)
+ Inode table at 859-859 (bg #0 + 859)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 589824-622591
+ Free inodes: 289-304
+Group 19: (Blocks 622592-655359) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 692 (bg #0 + 692), Inode bitmap at 776 (bg #0 + 776)
+ Inode table at 860-860 (bg #0 + 860)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 622592-655359
+ Free inodes: 305-320
+Group 20: (Blocks 655360-688127) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 693 (bg #0 + 693), Inode bitmap at 777 (bg #0 + 777)
+ Inode table at 861-861 (bg #0 + 861)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 655360-688127
+ Free inodes: 321-336
+Group 21: (Blocks 688128-720895) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 694 (bg #0 + 694), Inode bitmap at 778 (bg #0 + 778)
+ Inode table at 862-862 (bg #0 + 862)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 688128-720895
+ Free inodes: 337-352
+Group 22: (Blocks 720896-753663) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 695 (bg #0 + 695), Inode bitmap at 779 (bg #0 + 779)
+ Inode table at 863-863 (bg #0 + 863)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 720896-753663
+ Free inodes: 353-368
+Group 23: (Blocks 753664-786431) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 696 (bg #0 + 696), Inode bitmap at 780 (bg #0 + 780)
+ Inode table at 864-864 (bg #0 + 864)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 753664-786431
+ Free inodes: 369-384
+Group 24: (Blocks 786432-819199) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 697 (bg #0 + 697), Inode bitmap at 781 (bg #0 + 781)
+ Inode table at 865-865 (bg #0 + 865)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 786432-819199
+ Free inodes: 385-400
+Group 25: (Blocks 819200-851967) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 819200, Group descriptors at 819201-819201
+ Reserved GDT blocks at 819202-819872
+ Block bitmap at 698 (bg #0 + 698), Inode bitmap at 782 (bg #0 + 782)
+ Inode table at 866-866 (bg #0 + 866)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 819873-851967
+ Free inodes: 401-416
+Group 26: (Blocks 851968-884735) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 699 (bg #0 + 699), Inode bitmap at 783 (bg #0 + 783)
+ Inode table at 867-867 (bg #0 + 867)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 851968-884735
+ Free inodes: 417-432
+Group 27: (Blocks 884736-917503) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 884736, Group descriptors at 884737-884737
+ Reserved GDT blocks at 884738-885408
+ Block bitmap at 700 (bg #0 + 700), Inode bitmap at 784 (bg #0 + 784)
+ Inode table at 868-868 (bg #0 + 868)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 885409-917503
+ Free inodes: 433-448
+Group 28: (Blocks 917504-950271) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 701 (bg #0 + 701), Inode bitmap at 785 (bg #0 + 785)
+ Inode table at 869-869 (bg #0 + 869)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 917504-950271
+ Free inodes: 449-464
+Group 29: (Blocks 950272-983039) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 702 (bg #0 + 702), Inode bitmap at 786 (bg #0 + 786)
+ Inode table at 870-870 (bg #0 + 870)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 950272-983039
+ Free inodes: 465-480
+Group 30: (Blocks 983040-1015807) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 703 (bg #0 + 703), Inode bitmap at 787 (bg #0 + 787)
+ Inode table at 871-871 (bg #0 + 871)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 983040-1015807
+ Free inodes: 481-496
+Group 31: (Blocks 1015808-1048575) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 704 (bg #0 + 704), Inode bitmap at 788 (bg #0 + 788)
+ Inode table at 872-872 (bg #0 + 872)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1015808-1048575
+ Free inodes: 497-512
+Group 32: (Blocks 1048576-1081343) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 705 (bg #0 + 705), Inode bitmap at 789 (bg #0 + 789)
+ Inode table at 873-873 (bg #0 + 873)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1048576-1081343
+ Free inodes: 513-528
+Group 33: (Blocks 1081344-1114111) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 706 (bg #0 + 706), Inode bitmap at 790 (bg #0 + 790)
+ Inode table at 874-874 (bg #0 + 874)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1081344-1114111
+ Free inodes: 529-544
+Group 34: (Blocks 1114112-1146879) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 707 (bg #0 + 707), Inode bitmap at 791 (bg #0 + 791)
+ Inode table at 875-875 (bg #0 + 875)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1114112-1146879
+ Free inodes: 545-560
+Group 35: (Blocks 1146880-1179647) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 708 (bg #0 + 708), Inode bitmap at 792 (bg #0 + 792)
+ Inode table at 876-876 (bg #0 + 876)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1146880-1179647
+ Free inodes: 561-576
+Group 36: (Blocks 1179648-1212415) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 709 (bg #0 + 709), Inode bitmap at 793 (bg #0 + 793)
+ Inode table at 877-877 (bg #0 + 877)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1179648-1212415
+ Free inodes: 577-592
+Group 37: (Blocks 1212416-1245183) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 710 (bg #0 + 710), Inode bitmap at 794 (bg #0 + 794)
+ Inode table at 878-878 (bg #0 + 878)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1212416-1245183
+ Free inodes: 593-608
+Group 38: (Blocks 1245184-1277951) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 711 (bg #0 + 711), Inode bitmap at 795 (bg #0 + 795)
+ Inode table at 879-879 (bg #0 + 879)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1245184-1277951
+ Free inodes: 609-624
+Group 39: (Blocks 1277952-1310719) [INODE_UNINIT]
+ Block bitmap at 712 (bg #0 + 712), Inode bitmap at 796 (bg #0 + 796)
+ Inode table at 880-880 (bg #0 + 880)
+ 32767 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 1277952-1310718
+ Free inodes: 625-640
+Group 40: (Blocks 1310720-1343487) [INODE_UNINIT]
+ Block bitmap at 713 (bg #0 + 713), Inode bitmap at 797 (bg #0 + 797)
+ Inode table at 881-881 (bg #0 + 881)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 641-656
+Group 41: (Blocks 1343488-1376255) [INODE_UNINIT]
+ Block bitmap at 714 (bg #0 + 714), Inode bitmap at 798 (bg #0 + 798)
+ Inode table at 882-882 (bg #0 + 882)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 657-672
+Group 42: (Blocks 1376256-1409023) [INODE_UNINIT]
+ Block bitmap at 715 (bg #0 + 715), Inode bitmap at 799 (bg #0 + 799)
+ Inode table at 883-883 (bg #0 + 883)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 673-688
+Group 43: (Blocks 1409024-1441791) [INODE_UNINIT]
+ Block bitmap at 716 (bg #0 + 716), Inode bitmap at 800 (bg #0 + 800)
+ Inode table at 884-884 (bg #0 + 884)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 689-704
+Group 44: (Blocks 1441792-1474559) [INODE_UNINIT]
+ Block bitmap at 717 (bg #0 + 717), Inode bitmap at 801 (bg #0 + 801)
+ Inode table at 885-885 (bg #0 + 885)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 705-720
+Group 45: (Blocks 1474560-1507327) [INODE_UNINIT]
+ Block bitmap at 718 (bg #0 + 718), Inode bitmap at 802 (bg #0 + 802)
+ Inode table at 886-886 (bg #0 + 886)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 721-736
+Group 46: (Blocks 1507328-1540095) [INODE_UNINIT]
+ Block bitmap at 719 (bg #0 + 719), Inode bitmap at 803 (bg #0 + 803)
+ Inode table at 887-887 (bg #0 + 887)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 737-752
+Group 47: (Blocks 1540096-1572863) [INODE_UNINIT]
+ Block bitmap at 720 (bg #0 + 720), Inode bitmap at 804 (bg #0 + 804)
+ Inode table at 888-888 (bg #0 + 888)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 753-768
+Group 48: (Blocks 1572864-1605631) [INODE_UNINIT]
+ Block bitmap at 721 (bg #0 + 721), Inode bitmap at 805 (bg #0 + 805)
+ Inode table at 889-889 (bg #0 + 889)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 769-784
+Group 49: (Blocks 1605632-1638399) [INODE_UNINIT]
+ Backup superblock at 1605632, Group descriptors at 1605633-1605633
+ Reserved GDT blocks at 1605634-1606304
+ Block bitmap at 722 (bg #0 + 722), Inode bitmap at 806 (bg #0 + 806)
+ Inode table at 890-890 (bg #0 + 890)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 785-800
+Group 50: (Blocks 1638400-1671167) [INODE_UNINIT]
+ Block bitmap at 723 (bg #0 + 723), Inode bitmap at 807 (bg #0 + 807)
+ Inode table at 891-891 (bg #0 + 891)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 801-816
+Group 51: (Blocks 1671168-1703935) [INODE_UNINIT]
+ Block bitmap at 724 (bg #0 + 724), Inode bitmap at 808 (bg #0 + 808)
+ Inode table at 892-892 (bg #0 + 892)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 817-832
+Group 52: (Blocks 1703936-1736703) [INODE_UNINIT]
+ Block bitmap at 725 (bg #0 + 725), Inode bitmap at 809 (bg #0 + 809)
+ Inode table at 893-893 (bg #0 + 893)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 833-848
+Group 53: (Blocks 1736704-1769471) [INODE_UNINIT]
+ Block bitmap at 726 (bg #0 + 726), Inode bitmap at 810 (bg #0 + 810)
+ Inode table at 894-894 (bg #0 + 894)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 849-864
+Group 54: (Blocks 1769472-1802239) [INODE_UNINIT]
+ Block bitmap at 727 (bg #0 + 727), Inode bitmap at 811 (bg #0 + 811)
+ Inode table at 895-895 (bg #0 + 895)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 865-880
+Group 55: (Blocks 1802240-1835007) [INODE_UNINIT]
+ Block bitmap at 728 (bg #0 + 728), Inode bitmap at 812 (bg #0 + 812)
+ Inode table at 896-896 (bg #0 + 896)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 881-896
+Group 56: (Blocks 1835008-1867775) [INODE_UNINIT]
+ Block bitmap at 729 (bg #0 + 729), Inode bitmap at 813 (bg #0 + 813)
+ Inode table at 897-897 (bg #0 + 897)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 897-912
+Group 57: (Blocks 1867776-1900543) [INODE_UNINIT]
+ Block bitmap at 730 (bg #0 + 730), Inode bitmap at 814 (bg #0 + 814)
+ Inode table at 898-898 (bg #0 + 898)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 913-928
+Group 58: (Blocks 1900544-1933311) [INODE_UNINIT]
+ Block bitmap at 731 (bg #0 + 731), Inode bitmap at 815 (bg #0 + 815)
+ Inode table at 899-899 (bg #0 + 899)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 929-944
+Group 59: (Blocks 1933312-1966079) [INODE_UNINIT]
+ Block bitmap at 732 (bg #0 + 732), Inode bitmap at 816 (bg #0 + 816)
+ Inode table at 900-900 (bg #0 + 900)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 945-960
+Group 60: (Blocks 1966080-1998847) [INODE_UNINIT]
+ Block bitmap at 733 (bg #0 + 733), Inode bitmap at 817 (bg #0 + 817)
+ Inode table at 901-901 (bg #0 + 901)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 961-976
+Group 61: (Blocks 1998848-2031615) [INODE_UNINIT]
+ Block bitmap at 734 (bg #0 + 734), Inode bitmap at 818 (bg #0 + 818)
+ Inode table at 902-902 (bg #0 + 902)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 977-992
+Group 62: (Blocks 2031616-2064383) [INODE_UNINIT]
+ Block bitmap at 735 (bg #0 + 735), Inode bitmap at 819 (bg #0 + 819)
+ Inode table at 903-903 (bg #0 + 903)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 993-1008
+Group 63: (Blocks 2064384-2097151) [INODE_UNINIT]
+ Block bitmap at 736 (bg #0 + 736), Inode bitmap at 820 (bg #0 + 820)
+ Inode table at 904-904 (bg #0 + 904)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1009-1024
+Group 64: (Blocks 2097152-2129919) [INODE_UNINIT]
+ Block bitmap at 737 (bg #0 + 737), Inode bitmap at 821 (bg #0 + 821)
+ Inode table at 905-905 (bg #0 + 905)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1025-1040
+Group 65: (Blocks 2129920-2162687) [INODE_UNINIT]
+ Block bitmap at 738 (bg #0 + 738), Inode bitmap at 822 (bg #0 + 822)
+ Inode table at 906-906 (bg #0 + 906)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1041-1056
+Group 66: (Blocks 2162688-2195455) [INODE_UNINIT]
+ Block bitmap at 739 (bg #0 + 739), Inode bitmap at 823 (bg #0 + 823)
+ Inode table at 907-907 (bg #0 + 907)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1057-1072
+Group 67: (Blocks 2195456-2228223) [INODE_UNINIT]
+ Block bitmap at 740 (bg #0 + 740), Inode bitmap at 824 (bg #0 + 824)
+ Inode table at 908-908 (bg #0 + 908)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1073-1088
+Group 68: (Blocks 2228224-2260991) [INODE_UNINIT]
+ Block bitmap at 741 (bg #0 + 741), Inode bitmap at 825 (bg #0 + 825)
+ Inode table at 909-909 (bg #0 + 909)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1089-1104
+Group 69: (Blocks 2260992-2293759) [INODE_UNINIT]
+ Block bitmap at 742 (bg #0 + 742), Inode bitmap at 826 (bg #0 + 826)
+ Inode table at 910-910 (bg #0 + 910)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1105-1120
+Group 70: (Blocks 2293760-2326527) [INODE_UNINIT]
+ Block bitmap at 743 (bg #0 + 743), Inode bitmap at 827 (bg #0 + 827)
+ Inode table at 911-911 (bg #0 + 911)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1121-1136
+Group 71: (Blocks 2326528-2359295) [INODE_UNINIT]
+ Block bitmap at 744 (bg #0 + 744), Inode bitmap at 828 (bg #0 + 828)
+ Inode table at 912-912 (bg #0 + 912)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1137-1152
+Group 72: (Blocks 2359296-2392063) [INODE_UNINIT]
+ Block bitmap at 745 (bg #0 + 745), Inode bitmap at 829 (bg #0 + 829)
+ Inode table at 913-913 (bg #0 + 913)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1153-1168
+Group 73: (Blocks 2392064-2424831) [INODE_UNINIT]
+ Block bitmap at 746 (bg #0 + 746), Inode bitmap at 830 (bg #0 + 830)
+ Inode table at 914-914 (bg #0 + 914)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1169-1184
+Group 74: (Blocks 2424832-2457599) [INODE_UNINIT]
+ Block bitmap at 747 (bg #0 + 747), Inode bitmap at 831 (bg #0 + 831)
+ Inode table at 915-915 (bg #0 + 915)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1185-1200
+Group 75: (Blocks 2457600-2490367) [INODE_UNINIT]
+ Block bitmap at 748 (bg #0 + 748), Inode bitmap at 832 (bg #0 + 832)
+ Inode table at 916-916 (bg #0 + 916)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1201-1216
+Group 76: (Blocks 2490368-2523135) [INODE_UNINIT]
+ Block bitmap at 749 (bg #0 + 749), Inode bitmap at 833 (bg #0 + 833)
+ Inode table at 917-917 (bg #0 + 917)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1217-1232
+Group 77: (Blocks 2523136-2555903) [INODE_UNINIT]
+ Block bitmap at 750 (bg #0 + 750), Inode bitmap at 834 (bg #0 + 834)
+ Inode table at 918-918 (bg #0 + 918)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1233-1248
+Group 78: (Blocks 2555904-2588671) [INODE_UNINIT]
+ Block bitmap at 751 (bg #0 + 751), Inode bitmap at 835 (bg #0 + 835)
+ Inode table at 919-919 (bg #0 + 919)
+ 0 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks:
+ Free inodes: 1249-1264
+Group 79: (Blocks 2588672-2621439) [INODE_UNINIT]
+ Block bitmap at 752 (bg #0 + 752), Inode bitmap at 836 (bg #0 + 836)
+ Inode table at 920-920 (bg #0 + 920)
+ 30047 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 2591393-2621439
+ Free inodes: 1265-1280
+Group 80: (Blocks 2621440-2654207) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 753 (bg #0 + 753), Inode bitmap at 837 (bg #0 + 837)
+ Inode table at 921-921 (bg #0 + 921)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 2621440-2654207
+ Free inodes: 1281-1296
+Group 81: (Blocks 2654208-2686975) [INODE_UNINIT, BLOCK_UNINIT]
+ Backup superblock at 2654208, Group descriptors at 2654209-2654209
+ Reserved GDT blocks at 2654210-2654880
+ Block bitmap at 754 (bg #0 + 754), Inode bitmap at 838 (bg #0 + 838)
+ Inode table at 922-922 (bg #0 + 922)
+ 32095 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 2654881-2686975
+ Free inodes: 1297-1312
+Group 82: (Blocks 2686976-2719743) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 755 (bg #0 + 755), Inode bitmap at 839 (bg #0 + 839)
+ Inode table at 923-923 (bg #0 + 923)
+ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 2686976-2719743
+ Free inodes: 1313-1328
+Group 83: (Blocks 2719744-2749999) [INODE_UNINIT]
+ Block bitmap at 756 (bg #0 + 756), Inode bitmap at 840 (bg #0 + 840)
+ Inode table at 924-924 (bg #0 + 924)
+ 30256 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+ Free blocks: 2719744-2749999
+ Free inodes: 1329-1344
diff --git a/tests/m_bigjournal/script b/tests/m_bigjournal/script
new file mode 100644
index 0000000..8c09bc0
--- /dev/null
+++ b/tests/m_bigjournal/script
@@ -0,0 +1,13 @@
+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"
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" ]; then
+ # creates a 44GB filesystem
+ echo "$test_name: $DESCRIPTION: skipped for $os"
+ return 0
+fi
+. $cmd_dir/run_mke2fs
+unset DUMPE2FS_IGNORE_80COL
diff --git a/tests/m_dasd_bs/expect.1 b/tests/m_dasd_bs/expect.1
new file mode 100644
index 0000000..32883c4
--- /dev/null
+++ b/tests/m_dasd_bs/expect.1
@@ -0,0 +1,68 @@
+Creating filesystem with 32768 2k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 16384
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 2128/32768 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 16384
+Block count: 32768
+Reserved block count: 1638
+Overhead clusters: 2118
+Free blocks: 30640
+Free inodes: 16373
+First block: 0
+Block size: 2048
+Fragment size: 2048
+Reserved GDT blocks: 31
+Blocks per group: 16384
+Fragments per group: 16384
+Inodes per group: 8192
+Inode blocks per group: 1024
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+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)
+ Inode table at 35-1058 (+35)
+ 15315 free blocks, 8181 free inodes, 2 directories
+ Free blocks: 1069-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)
+ Inode table at 16419-17442 (+35)
+ 15325 free blocks, 8192 free inodes, 0 directories
+ Free blocks: 17443-32767
+ Free inodes: 8193-16384
diff --git a/tests/m_dasd_bs/script b/tests/m_dasd_bs/script
new file mode 100644
index 0000000..e7b9085
--- /dev/null
+++ b/tests/m_dasd_bs/script
@@ -0,0 +1,6 @@
+DESCRIPTION="2048 byte sector devices"
+FS_SIZE=65536
+MKE2FS_DEVICE_SECTSIZE=2048
+export MKE2FS_DEVICE_SECTSIZE
+. $cmd_dir/run_mke2fs
+unset MKE2FS_DEVICE_SECTSIZE
diff --git a/tests/m_desc_size_128/expect.1 b/tests/m_desc_size_128/expect.1
new file mode 100644
index 0000000..54b24e0
--- /dev/null
+++ b/tests/m_desc_size_128/expect.1
@@ -0,0 +1,841 @@
+Creating filesystem with 131072 1k blocks and 8192 inodes
+Superblock backups stored on blocks:
+ 1025, 3073, 5121, 7169, 9217, 25601, 27649, 50177, 82945, 128001
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype extent 64bit sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/8192 files (0.0% non-contiguous), 5322/131072 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype extent 64bit sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 8192
+Block count: 131072
+Reserved block count: 6553
+Overhead clusters: 5308
+Free blocks: 125750
+Free inodes: 8181
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Group descriptor size: 128
+Reserved GDT blocks: 256
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 64
+Inode blocks per group: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptors at 2-17
+ Reserved GDT blocks at 18-273
+ Block bitmap at 274 (+273), Inode bitmap at 275 (+274)
+ Inode table at 276-291 (+275)
+ 719 free blocks, 53 free inodes, 2 directories
+ Free blocks: 306-1024
+ Free inodes: 12-64
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptors at 1026-1041
+ Reserved GDT blocks at 1042-1297
+ Block bitmap at 1298 (+273), Inode bitmap at 1299 (+274)
+ Inode table at 1300-1315 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 1316-2048
+ Free inodes: 65-128
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2066 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 2067-3072
+ Free inodes: 129-192
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073, Group descriptors at 3074-3089
+ Reserved GDT blocks at 3090-3345
+ Block bitmap at 3346 (+273), Inode bitmap at 3347 (+274)
+ Inode table at 3348-3363 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 3364-4096
+ Free inodes: 193-256
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4114 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 4115-5120
+ Free inodes: 257-320
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121, Group descriptors at 5122-5137
+ Reserved GDT blocks at 5138-5393
+ Block bitmap at 5394 (+273), Inode bitmap at 5395 (+274)
+ Inode table at 5396-5411 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 5412-6144
+ Free inodes: 321-384
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6162 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 6163-7168
+ Free inodes: 385-448
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169, Group descriptors at 7170-7185
+ Reserved GDT blocks at 7186-7441
+ Block bitmap at 7442 (+273), Inode bitmap at 7443 (+274)
+ Inode table at 7444-7459 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 7460-8192
+ Free inodes: 449-512
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8210 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 8211-9216
+ Free inodes: 513-576
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217, Group descriptors at 9218-9233
+ Reserved GDT blocks at 9234-9489
+ Block bitmap at 9490 (+273), Inode bitmap at 9491 (+274)
+ Inode table at 9492-9507 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 9508-10240
+ Free inodes: 577-640
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10258 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 10259-11264
+ Free inodes: 641-704
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11282 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 11283-12288
+ Free inodes: 705-768
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12306 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 12307-13312
+ Free inodes: 769-832
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13330 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 13331-14336
+ Free inodes: 833-896
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14354 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 14355-15360
+ Free inodes: 897-960
+Group 15: (Blocks 15361-16384)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15378 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 15379-16384
+ Free inodes: 961-1024
+Group 16: (Blocks 16385-17408)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16402 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 16403-17408
+ Free inodes: 1025-1088
+Group 17: (Blocks 17409-18432)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17426 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 17427-18432
+ Free inodes: 1089-1152
+Group 18: (Blocks 18433-19456)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18450 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 18451-19456
+ Free inodes: 1153-1216
+Group 19: (Blocks 19457-20480)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19474 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 19475-20480
+ Free inodes: 1217-1280
+Group 20: (Blocks 20481-21504)
+ Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+ Inode table at 20483-20498 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 20499-21504
+ Free inodes: 1281-1344
+Group 21: (Blocks 21505-22528)
+ Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+ Inode table at 21507-21522 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 21523-22528
+ Free inodes: 1345-1408
+Group 22: (Blocks 22529-23552)
+ Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+ Inode table at 22531-22546 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 22547-23552
+ Free inodes: 1409-1472
+Group 23: (Blocks 23553-24576)
+ Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+ Inode table at 23555-23570 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 23571-24576
+ Free inodes: 1473-1536
+Group 24: (Blocks 24577-25600)
+ Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+ Inode table at 24579-24594 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 24595-25600
+ Free inodes: 1537-1600
+Group 25: (Blocks 25601-26624)
+ Backup superblock at 25601, Group descriptors at 25602-25617
+ Reserved GDT blocks at 25618-25873
+ Block bitmap at 25874 (+273), Inode bitmap at 25875 (+274)
+ Inode table at 25876-25891 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 25892-26624
+ Free inodes: 1601-1664
+Group 26: (Blocks 26625-27648)
+ Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+ Inode table at 26627-26642 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 26643-27648
+ Free inodes: 1665-1728
+Group 27: (Blocks 27649-28672)
+ Backup superblock at 27649, Group descriptors at 27650-27665
+ Reserved GDT blocks at 27666-27921
+ Block bitmap at 27922 (+273), Inode bitmap at 27923 (+274)
+ Inode table at 27924-27939 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 27940-28672
+ Free inodes: 1729-1792
+Group 28: (Blocks 28673-29696)
+ Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+ Inode table at 28675-28690 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 28691-29696
+ Free inodes: 1793-1856
+Group 29: (Blocks 29697-30720)
+ Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+ Inode table at 29699-29714 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 29715-30720
+ Free inodes: 1857-1920
+Group 30: (Blocks 30721-31744)
+ Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+ Inode table at 30723-30738 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 30739-31744
+ Free inodes: 1921-1984
+Group 31: (Blocks 31745-32768)
+ Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+ Inode table at 31747-31762 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 31763-32768
+ Free inodes: 1985-2048
+Group 32: (Blocks 32769-33792)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-32786 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 32787-33792
+ Free inodes: 2049-2112
+Group 33: (Blocks 33793-34816)
+ Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+ Inode table at 33795-33810 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 33811-34816
+ Free inodes: 2113-2176
+Group 34: (Blocks 34817-35840)
+ Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+ Inode table at 34819-34834 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 34835-35840
+ Free inodes: 2177-2240
+Group 35: (Blocks 35841-36864)
+ Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+ Inode table at 35843-35858 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 35859-36864
+ Free inodes: 2241-2304
+Group 36: (Blocks 36865-37888)
+ Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+ Inode table at 36867-36882 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 36883-37888
+ Free inodes: 2305-2368
+Group 37: (Blocks 37889-38912)
+ Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+ Inode table at 37891-37906 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 37907-38912
+ Free inodes: 2369-2432
+Group 38: (Blocks 38913-39936)
+ Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+ Inode table at 38915-38930 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 38931-39936
+ Free inodes: 2433-2496
+Group 39: (Blocks 39937-40960)
+ Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+ Inode table at 39939-39954 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 39955-40960
+ Free inodes: 2497-2560
+Group 40: (Blocks 40961-41984)
+ Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+ Inode table at 40963-40978 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 40979-41984
+ Free inodes: 2561-2624
+Group 41: (Blocks 41985-43008)
+ Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+ Inode table at 41987-42002 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 42003-43008
+ Free inodes: 2625-2688
+Group 42: (Blocks 43009-44032)
+ Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+ Inode table at 43011-43026 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 43027-44032
+ Free inodes: 2689-2752
+Group 43: (Blocks 44033-45056)
+ Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+ Inode table at 44035-44050 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 44051-45056
+ Free inodes: 2753-2816
+Group 44: (Blocks 45057-46080)
+ Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+ Inode table at 45059-45074 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 45075-46080
+ Free inodes: 2817-2880
+Group 45: (Blocks 46081-47104)
+ Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+ Inode table at 46083-46098 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 46099-47104
+ Free inodes: 2881-2944
+Group 46: (Blocks 47105-48128)
+ Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+ Inode table at 47107-47122 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 47123-48128
+ Free inodes: 2945-3008
+Group 47: (Blocks 48129-49152)
+ Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+ Inode table at 48131-48146 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 48147-49152
+ Free inodes: 3009-3072
+Group 48: (Blocks 49153-50176)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49170 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 49171-50176
+ Free inodes: 3073-3136
+Group 49: (Blocks 50177-51200)
+ Backup superblock at 50177, Group descriptors at 50178-50193
+ Reserved GDT blocks at 50194-50449
+ Block bitmap at 50450 (+273), Inode bitmap at 50451 (+274)
+ Inode table at 50452-50467 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 50468-51200
+ Free inodes: 3137-3200
+Group 50: (Blocks 51201-52224)
+ Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+ Inode table at 51203-51218 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 51219-52224
+ Free inodes: 3201-3264
+Group 51: (Blocks 52225-53248)
+ Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+ Inode table at 52227-52242 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 52243-53248
+ Free inodes: 3265-3328
+Group 52: (Blocks 53249-54272)
+ Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+ Inode table at 53251-53266 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 53267-54272
+ Free inodes: 3329-3392
+Group 53: (Blocks 54273-55296)
+ Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+ Inode table at 54275-54290 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 54291-55296
+ Free inodes: 3393-3456
+Group 54: (Blocks 55297-56320)
+ Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+ Inode table at 55299-55314 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 55315-56320
+ Free inodes: 3457-3520
+Group 55: (Blocks 56321-57344)
+ Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+ Inode table at 56323-56338 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 56339-57344
+ Free inodes: 3521-3584
+Group 56: (Blocks 57345-58368)
+ Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+ Inode table at 57347-57362 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 57363-58368
+ Free inodes: 3585-3648
+Group 57: (Blocks 58369-59392)
+ Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+ Inode table at 58371-58386 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 58387-59392
+ Free inodes: 3649-3712
+Group 58: (Blocks 59393-60416)
+ Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+ Inode table at 59395-59410 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 59411-60416
+ Free inodes: 3713-3776
+Group 59: (Blocks 60417-61440)
+ Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+ Inode table at 60419-60434 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 60435-61440
+ Free inodes: 3777-3840
+Group 60: (Blocks 61441-62464)
+ Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+ Inode table at 61443-61458 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 61459-62464
+ Free inodes: 3841-3904
+Group 61: (Blocks 62465-63488)
+ Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+ Inode table at 62467-62482 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 62483-63488
+ Free inodes: 3905-3968
+Group 62: (Blocks 63489-64512)
+ Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+ Inode table at 63491-63506 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 63507-64512
+ Free inodes: 3969-4032
+Group 63: (Blocks 64513-65536)
+ Block bitmap at 64513 (+0), Inode bitmap at 64514 (+1)
+ Inode table at 64515-64530 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 64531-65536
+ Free inodes: 4033-4096
+Group 64: (Blocks 65537-66560)
+ Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1)
+ Inode table at 65539-65554 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 65555-66560
+ Free inodes: 4097-4160
+Group 65: (Blocks 66561-67584)
+ Block bitmap at 66561 (+0), Inode bitmap at 66562 (+1)
+ Inode table at 66563-66578 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 66579-67584
+ Free inodes: 4161-4224
+Group 66: (Blocks 67585-68608)
+ Block bitmap at 67585 (+0), Inode bitmap at 67586 (+1)
+ Inode table at 67587-67602 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 67603-68608
+ Free inodes: 4225-4288
+Group 67: (Blocks 68609-69632)
+ Block bitmap at 68609 (+0), Inode bitmap at 68610 (+1)
+ Inode table at 68611-68626 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 68627-69632
+ Free inodes: 4289-4352
+Group 68: (Blocks 69633-70656)
+ Block bitmap at 69633 (+0), Inode bitmap at 69634 (+1)
+ Inode table at 69635-69650 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 69651-70656
+ Free inodes: 4353-4416
+Group 69: (Blocks 70657-71680)
+ Block bitmap at 70657 (+0), Inode bitmap at 70658 (+1)
+ Inode table at 70659-70674 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 70675-71680
+ Free inodes: 4417-4480
+Group 70: (Blocks 71681-72704)
+ Block bitmap at 71681 (+0), Inode bitmap at 71682 (+1)
+ Inode table at 71683-71698 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 71699-72704
+ Free inodes: 4481-4544
+Group 71: (Blocks 72705-73728)
+ Block bitmap at 72705 (+0), Inode bitmap at 72706 (+1)
+ Inode table at 72707-72722 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 72723-73728
+ Free inodes: 4545-4608
+Group 72: (Blocks 73729-74752)
+ Block bitmap at 73729 (+0), Inode bitmap at 73730 (+1)
+ Inode table at 73731-73746 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 73747-74752
+ Free inodes: 4609-4672
+Group 73: (Blocks 74753-75776)
+ Block bitmap at 74753 (+0), Inode bitmap at 74754 (+1)
+ Inode table at 74755-74770 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 74771-75776
+ Free inodes: 4673-4736
+Group 74: (Blocks 75777-76800)
+ Block bitmap at 75777 (+0), Inode bitmap at 75778 (+1)
+ Inode table at 75779-75794 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 75795-76800
+ Free inodes: 4737-4800
+Group 75: (Blocks 76801-77824)
+ Block bitmap at 76801 (+0), Inode bitmap at 76802 (+1)
+ Inode table at 76803-76818 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 76819-77824
+ Free inodes: 4801-4864
+Group 76: (Blocks 77825-78848)
+ Block bitmap at 77825 (+0), Inode bitmap at 77826 (+1)
+ Inode table at 77827-77842 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 77843-78848
+ Free inodes: 4865-4928
+Group 77: (Blocks 78849-79872)
+ Block bitmap at 78849 (+0), Inode bitmap at 78850 (+1)
+ Inode table at 78851-78866 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 78867-79872
+ Free inodes: 4929-4992
+Group 78: (Blocks 79873-80896)
+ Block bitmap at 79873 (+0), Inode bitmap at 79874 (+1)
+ Inode table at 79875-79890 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 79891-80896
+ Free inodes: 4993-5056
+Group 79: (Blocks 80897-81920)
+ Block bitmap at 80897 (+0), Inode bitmap at 80898 (+1)
+ Inode table at 80899-80914 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 80915-81920
+ Free inodes: 5057-5120
+Group 80: (Blocks 81921-82944)
+ Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+ Inode table at 81923-81938 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 81939-82944
+ Free inodes: 5121-5184
+Group 81: (Blocks 82945-83968)
+ Backup superblock at 82945, Group descriptors at 82946-82961
+ Reserved GDT blocks at 82962-83217
+ Block bitmap at 83218 (+273), Inode bitmap at 83219 (+274)
+ Inode table at 83220-83235 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 83236-83968
+ Free inodes: 5185-5248
+Group 82: (Blocks 83969-84992)
+ Block bitmap at 83969 (+0), Inode bitmap at 83970 (+1)
+ Inode table at 83971-83986 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 83987-84992
+ Free inodes: 5249-5312
+Group 83: (Blocks 84993-86016)
+ Block bitmap at 84993 (+0), Inode bitmap at 84994 (+1)
+ Inode table at 84995-85010 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 85011-86016
+ Free inodes: 5313-5376
+Group 84: (Blocks 86017-87040)
+ Block bitmap at 86017 (+0), Inode bitmap at 86018 (+1)
+ Inode table at 86019-86034 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 86035-87040
+ Free inodes: 5377-5440
+Group 85: (Blocks 87041-88064)
+ Block bitmap at 87041 (+0), Inode bitmap at 87042 (+1)
+ Inode table at 87043-87058 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 87059-88064
+ Free inodes: 5441-5504
+Group 86: (Blocks 88065-89088)
+ Block bitmap at 88065 (+0), Inode bitmap at 88066 (+1)
+ Inode table at 88067-88082 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 88083-89088
+ Free inodes: 5505-5568
+Group 87: (Blocks 89089-90112)
+ Block bitmap at 89089 (+0), Inode bitmap at 89090 (+1)
+ Inode table at 89091-89106 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 89107-90112
+ Free inodes: 5569-5632
+Group 88: (Blocks 90113-91136)
+ Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+ Inode table at 90115-90130 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 90131-91136
+ Free inodes: 5633-5696
+Group 89: (Blocks 91137-92160)
+ Block bitmap at 91137 (+0), Inode bitmap at 91138 (+1)
+ Inode table at 91139-91154 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 91155-92160
+ Free inodes: 5697-5760
+Group 90: (Blocks 92161-93184)
+ Block bitmap at 92161 (+0), Inode bitmap at 92162 (+1)
+ Inode table at 92163-92178 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 92179-93184
+ Free inodes: 5761-5824
+Group 91: (Blocks 93185-94208)
+ Block bitmap at 93185 (+0), Inode bitmap at 93186 (+1)
+ Inode table at 93187-93202 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 93203-94208
+ Free inodes: 5825-5888
+Group 92: (Blocks 94209-95232)
+ Block bitmap at 94209 (+0), Inode bitmap at 94210 (+1)
+ Inode table at 94211-94226 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 94227-95232
+ Free inodes: 5889-5952
+Group 93: (Blocks 95233-96256)
+ Block bitmap at 95233 (+0), Inode bitmap at 95234 (+1)
+ Inode table at 95235-95250 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 95251-96256
+ Free inodes: 5953-6016
+Group 94: (Blocks 96257-97280)
+ Block bitmap at 96257 (+0), Inode bitmap at 96258 (+1)
+ Inode table at 96259-96274 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 96275-97280
+ Free inodes: 6017-6080
+Group 95: (Blocks 97281-98304)
+ Block bitmap at 97281 (+0), Inode bitmap at 97282 (+1)
+ Inode table at 97283-97298 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 97299-98304
+ Free inodes: 6081-6144
+Group 96: (Blocks 98305-99328)
+ Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1)
+ Inode table at 98307-98322 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 98323-99328
+ Free inodes: 6145-6208
+Group 97: (Blocks 99329-100352)
+ Block bitmap at 99329 (+0), Inode bitmap at 99330 (+1)
+ Inode table at 99331-99346 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 99347-100352
+ Free inodes: 6209-6272
+Group 98: (Blocks 100353-101376)
+ Block bitmap at 100353 (+0), Inode bitmap at 100354 (+1)
+ Inode table at 100355-100370 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 100371-101376
+ Free inodes: 6273-6336
+Group 99: (Blocks 101377-102400)
+ Block bitmap at 101377 (+0), Inode bitmap at 101378 (+1)
+ Inode table at 101379-101394 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 101395-102400
+ Free inodes: 6337-6400
+Group 100: (Blocks 102401-103424)
+ Block bitmap at 102401 (+0), Inode bitmap at 102402 (+1)
+ Inode table at 102403-102418 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 102419-103424
+ Free inodes: 6401-6464
+Group 101: (Blocks 103425-104448)
+ Block bitmap at 103425 (+0), Inode bitmap at 103426 (+1)
+ Inode table at 103427-103442 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 103443-104448
+ Free inodes: 6465-6528
+Group 102: (Blocks 104449-105472)
+ Block bitmap at 104449 (+0), Inode bitmap at 104450 (+1)
+ Inode table at 104451-104466 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 104467-105472
+ Free inodes: 6529-6592
+Group 103: (Blocks 105473-106496)
+ Block bitmap at 105473 (+0), Inode bitmap at 105474 (+1)
+ Inode table at 105475-105490 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 105491-106496
+ Free inodes: 6593-6656
+Group 104: (Blocks 106497-107520)
+ Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+ Inode table at 106499-106514 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 106515-107520
+ Free inodes: 6657-6720
+Group 105: (Blocks 107521-108544)
+ Block bitmap at 107521 (+0), Inode bitmap at 107522 (+1)
+ Inode table at 107523-107538 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 107539-108544
+ Free inodes: 6721-6784
+Group 106: (Blocks 108545-109568)
+ Block bitmap at 108545 (+0), Inode bitmap at 108546 (+1)
+ Inode table at 108547-108562 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 108563-109568
+ Free inodes: 6785-6848
+Group 107: (Blocks 109569-110592)
+ Block bitmap at 109569 (+0), Inode bitmap at 109570 (+1)
+ Inode table at 109571-109586 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 109587-110592
+ Free inodes: 6849-6912
+Group 108: (Blocks 110593-111616)
+ Block bitmap at 110593 (+0), Inode bitmap at 110594 (+1)
+ Inode table at 110595-110610 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 110611-111616
+ Free inodes: 6913-6976
+Group 109: (Blocks 111617-112640)
+ Block bitmap at 111617 (+0), Inode bitmap at 111618 (+1)
+ Inode table at 111619-111634 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 111635-112640
+ Free inodes: 6977-7040
+Group 110: (Blocks 112641-113664)
+ Block bitmap at 112641 (+0), Inode bitmap at 112642 (+1)
+ Inode table at 112643-112658 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 112659-113664
+ Free inodes: 7041-7104
+Group 111: (Blocks 113665-114688)
+ Block bitmap at 113665 (+0), Inode bitmap at 113666 (+1)
+ Inode table at 113667-113682 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 113683-114688
+ Free inodes: 7105-7168
+Group 112: (Blocks 114689-115712)
+ Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+ Inode table at 114691-114706 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 114707-115712
+ Free inodes: 7169-7232
+Group 113: (Blocks 115713-116736)
+ Block bitmap at 115713 (+0), Inode bitmap at 115714 (+1)
+ Inode table at 115715-115730 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 115731-116736
+ Free inodes: 7233-7296
+Group 114: (Blocks 116737-117760)
+ Block bitmap at 116737 (+0), Inode bitmap at 116738 (+1)
+ Inode table at 116739-116754 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 116755-117760
+ Free inodes: 7297-7360
+Group 115: (Blocks 117761-118784)
+ Block bitmap at 117761 (+0), Inode bitmap at 117762 (+1)
+ Inode table at 117763-117778 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 117779-118784
+ Free inodes: 7361-7424
+Group 116: (Blocks 118785-119808)
+ Block bitmap at 118785 (+0), Inode bitmap at 118786 (+1)
+ Inode table at 118787-118802 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 118803-119808
+ Free inodes: 7425-7488
+Group 117: (Blocks 119809-120832)
+ Block bitmap at 119809 (+0), Inode bitmap at 119810 (+1)
+ Inode table at 119811-119826 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 119827-120832
+ Free inodes: 7489-7552
+Group 118: (Blocks 120833-121856)
+ Block bitmap at 120833 (+0), Inode bitmap at 120834 (+1)
+ Inode table at 120835-120850 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 120851-121856
+ Free inodes: 7553-7616
+Group 119: (Blocks 121857-122880)
+ Block bitmap at 121857 (+0), Inode bitmap at 121858 (+1)
+ Inode table at 121859-121874 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 121875-122880
+ Free inodes: 7617-7680
+Group 120: (Blocks 122881-123904)
+ Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+ Inode table at 122883-122898 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 122899-123904
+ Free inodes: 7681-7744
+Group 121: (Blocks 123905-124928)
+ Block bitmap at 123905 (+0), Inode bitmap at 123906 (+1)
+ Inode table at 123907-123922 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 123923-124928
+ Free inodes: 7745-7808
+Group 122: (Blocks 124929-125952)
+ Block bitmap at 124929 (+0), Inode bitmap at 124930 (+1)
+ Inode table at 124931-124946 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 124947-125952
+ Free inodes: 7809-7872
+Group 123: (Blocks 125953-126976)
+ Block bitmap at 125953 (+0), Inode bitmap at 125954 (+1)
+ Inode table at 125955-125970 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 125971-126976
+ Free inodes: 7873-7936
+Group 124: (Blocks 126977-128000)
+ Block bitmap at 126977 (+0), Inode bitmap at 126978 (+1)
+ Inode table at 126979-126994 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 126995-128000
+ Free inodes: 7937-8000
+Group 125: (Blocks 128001-129024)
+ Backup superblock at 128001, Group descriptors at 128002-128017
+ Reserved GDT blocks at 128018-128273
+ Block bitmap at 128274 (+273), Inode bitmap at 128275 (+274)
+ Inode table at 128276-128291 (+275)
+ 733 free blocks, 64 free inodes, 0 directories
+ Free blocks: 128292-129024
+ Free inodes: 8001-8064
+Group 126: (Blocks 129025-130048)
+ Block bitmap at 129025 (+0), Inode bitmap at 129026 (+1)
+ Inode table at 129027-129042 (+2)
+ 1006 free blocks, 64 free inodes, 0 directories
+ Free blocks: 129043-130048
+ Free inodes: 8065-8128
+Group 127: (Blocks 130049-131071)
+ Block bitmap at 130049 (+0), Inode bitmap at 130050 (+1)
+ Inode table at 130051-130066 (+2)
+ 1005 free blocks, 64 free inodes, 0 directories
+ Free blocks: 130067-131071
+ Free inodes: 8129-8192
diff --git a/tests/m_desc_size_128/script b/tests/m_desc_size_128/script
new file mode 100644
index 0000000..a4def21
--- /dev/null
+++ b/tests/m_desc_size_128/script
@@ -0,0 +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
diff --git a/tests/m_devdir/script b/tests/m_devdir/script
new file mode 100644
index 0000000..dfc55c7
--- /dev/null
+++ b/tests/m_devdir/script
@@ -0,0 +1,32 @@
+test_description="create fs image from /dev"
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+MKFS_DIR=/dev
+OUT=$test_name.log
+
+$MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d $MKFS_DIR $TMPFILE 16384 > $OUT 2>&1
+mkfs_status=$?
+
+$DUMPE2FS $TMPFILE >> $OUT 2>&1
+$DEBUGFS -R 'ls /' $TMPFILE >> $OUT 2>&1
+
+$FSCK -f -n $TMPFILE >> $OUT 2>&1
+fsck_status=$?
+
+sed -f $cmd_dir/filter.sed $OUT > $OUT.tmp
+mv $OUT.tmp $OUT
+
+if [ $mkfs_status -ne 0 ]; then
+ echo "$test_name: $test_description: skipped"
+elif [ $mkfs_status -eq 0 ] && [ $fsck_status -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+fi
+
+rm -f $TMPFILE.cmd
+unset MKFS_DIR OUT EXP
diff --git a/tests/m_error_behavior/expect b/tests/m_error_behavior/expect
new file mode 100644
index 0000000..78514bd
--- /dev/null
+++ b/tests/m_error_behavior/expect
@@ -0,0 +1,24 @@
+error default
+Errors behavior: Continue
+error continue
+Errors behavior: Continue
+error panic
+Errors behavior: Panic
+error remount-ro
+Errors behavior: Remount read-only
+error garbage
+error default profile continue
+Errors behavior: Continue
+error default profile panic
+Errors behavior: Panic
+error default profile remount-ro
+Errors behavior: Remount read-only
+error default profile broken
+error fs_types profile continue
+Errors behavior: Continue
+error fs_types profile panic
+Errors behavior: Panic
+error fs_types profile remount-ro
+Errors behavior: Remount read-only
+error fs_types profile remount-ro
+Errors behavior: Panic
diff --git a/tests/m_error_behavior/script b/tests/m_error_behavior/script
new file mode 100755
index 0000000..5f999f3
--- /dev/null
+++ b/tests/m_error_behavior/script
@@ -0,0 +1,110 @@
+test_description="mke2fs with error behavior"
+
+conf=$TMPFILE.conf
+write_defaults_conf()
+{
+ errors="$1"
+ cat > $conf << ENDL
+[defaults]
+ errors = $errors
+ENDL
+}
+
+write_section_conf()
+{
+ errors="$1"
+ cat > $conf << ENDL
+[defaults]
+ errors = broken
+
+[fs_types]
+ test_suite = {
+ errors = $errors
+ }
+ENDL
+}
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "error default" >> $OUT
+$MKE2FS -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error continue" >> $OUT
+$MKE2FS -e continue -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error panic" >> $OUT
+$MKE2FS -e panic -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error remount-ro" >> $OUT
+$MKE2FS -e remount-ro -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error garbage" >> $OUT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+$MKE2FS -e broken -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+# Test errors= in default
+echo "error default profile continue" >> $OUT
+write_defaults_conf continue
+MKE2FS_CONFIG=$conf $MKE2FS -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error default profile panic" >> $OUT
+write_defaults_conf panic
+MKE2FS_CONFIG=$conf $MKE2FS -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error default profile remount-ro" >> $OUT
+write_defaults_conf remount-ro
+MKE2FS_CONFIG=$conf $MKE2FS -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error default profile broken" >> $OUT
+write_defaults_conf broken
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+MKE2FS_CONFIG=$conf $MKE2FS -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+# Test errors= in a fs type
+echo "error fs_types profile continue" >> $OUT
+write_section_conf continue
+MKE2FS_CONFIG=$conf $MKE2FS -T test_suite -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error fs_types profile panic" >> $OUT
+write_section_conf panic
+MKE2FS_CONFIG=$conf $MKE2FS -T test_suite -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+echo "error fs_types profile remount-ro" >> $OUT
+write_section_conf remount-ro
+MKE2FS_CONFIG=$conf $MKE2FS -T test_suite -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+# Test command line override
+echo "error fs_types profile remount-ro" >> $OUT
+write_section_conf remount-ro
+MKE2FS_CONFIG=$conf $MKE2FS -T test_suite -e panic -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep 'Errors behavior' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/m_extent_journal/expect.1 b/tests/m_extent_journal/expect.1
new file mode 100644
index 0000000..11124e4
--- /dev/null
+++ b/tests/m_extent_journal/expect.1
@@ -0,0 +1,118 @@
+Creating filesystem with 65536 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 9508/65536 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 16384
+Block count: 65536
+Reserved block count: 3276
+Overhead clusters: 9494
+Free blocks: 56028
+Free inodes: 16373
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 255
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 512
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Journal features: (none)
+Total journal size: 4096k
+Total journal blocks: 4096
+Max transaction length: 4096
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-257
+ Block bitmap at 258 (+257), Inode bitmap at 259 (+258)
+ Inode table at 260-771 (+259)
+ 7407 free blocks, 2037 free inodes, 2 directories
+ Free blocks: 786-8192
+ Free inodes: 12-2048
+Group 1: (Blocks 8193-16384)
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Reserved GDT blocks at 8195-8449
+ Block bitmap at 8450 (+257), Inode bitmap at 8451 (+258)
+ Inode table at 8452-8963 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 8964-16384
+ Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16898 (+2)
+ 3582 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 20995-24576
+ Free inodes: 4097-6144
+Group 3: (Blocks 24577-32768)
+ Backup superblock at 24577, Group descriptors at 24578-24578
+ Reserved GDT blocks at 24579-24833
+ Block bitmap at 24834 (+257), Inode bitmap at 24835 (+258)
+ Inode table at 24836-25347 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 25348-32768
+ Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-33282 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 33283-40960
+ Free inodes: 8193-10240
+Group 5: (Blocks 40961-49152)
+ Backup superblock at 40961, Group descriptors at 40962-40962
+ Reserved GDT blocks at 40963-41217
+ Block bitmap at 41218 (+257), Inode bitmap at 41219 (+258)
+ Inode table at 41220-41731 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 41732-49152
+ Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49666 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 49667-57344
+ Free inodes: 12289-14336
+Group 7: (Blocks 57345-65535)
+ Backup superblock at 57345, Group descriptors at 57346-57346
+ Reserved GDT blocks at 57347-57601
+ Block bitmap at 57602 (+257), Inode bitmap at 57603 (+258)
+ Inode table at 57604-58115 (+259)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 58116-65535
+ Free inodes: 14337-16384
diff --git a/tests/m_extent_journal/script b/tests/m_extent_journal/script
new file mode 100644
index 0000000..efade21
--- /dev/null
+++ b/tests/m_extent_journal/script
@@ -0,0 +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
diff --git a/tests/m_hugefile/expect b/tests/m_hugefile/expect
new file mode 100644
index 0000000..ee33fe5
--- /dev/null
+++ b/tests/m_hugefile/expect
@@ -0,0 +1,19 @@
+mke2fs -F -T hugefile test.img 4T
+Creating filesystem with 1073741824 4k blocks and 1048576 inodes
+Superblock backups stored on blocks:
+
+Allocating group tables: done
+Writing inode tables: done
+Creating 1 huge file(s) : done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/1048576 files (0.0% non-contiguous), 1073709417/1073741824 blocks
+Exit status is 0
+debugfs -R "extents /store/big-data" test.img
+Last logical block: 1073610751
+Last physical block: 1073741823
diff --git a/tests/m_hugefile/name b/tests/m_hugefile/name
new file mode 100644
index 0000000..0a28399
--- /dev/null
+++ b/tests/m_hugefile/name
@@ -0,0 +1 @@
+create a hugefile fs with a single huge file
diff --git a/tests/m_hugefile/script b/tests/m_hugefile/script
new file mode 100644
index 0000000..fc1d115
--- /dev/null
+++ b/tests/m_hugefile/script
@@ -0,0 +1,114 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
+ # creates a 44GB filesystem
+ echo "$test_name: $test_description: skipped for $os"
+ return 0
+fi
+
+cat > $CONF << ENDL
+[fs_types]
+ hugefile = {
+ features = extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,^resize_inode,sparse_super2
+ hash_alg = half_md4
+ num_backup_sb = 0
+ packed_meta_blocks = 1
+ make_hugefiles = 1
+ inode_ratio = 4194304
+ hugefiles_dir = /store
+ hugefiles_name = big-data
+ hugefiles_digits = 0
+ hugefiles_size = 0
+ hugefiles_align = 256M
+ num_hugefiles = 1
+ zero_hugefiles = false
+ flex_bg_size = 262144
+ }
+ENDL
+
+echo "mke2fs -F -T hugefile test.img 4T" > $OUT
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T hugefile $TMPFILE 4T >> $OUT 2>&1
+rm -f $CONF
+
+# check the file system if we get this far, we succeeded...
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+echo 'debugfs -R "extents /store/big-data" test.img' >> $OUT
+
+$DEBUGFS -R "extents /store/big-data" $TMPFILE 2>&1 | tr / " " | tr -d - | awk '
+BEGIN {
+ expected_logical_start = 0;
+ expected_physical_start = 0;
+}
+{
+ if (NR != 1) {
+ level = $1;
+ total_levels = $2;
+
+ if (level == total_levels) {
+ logical_start=$5;
+ logical_end=$6;
+ physical_start=$7;
+ physical_end=$8;
+ len = $9;
+
+ if (logical_end + 1 - logical_start != len) {
+ print logical_end + 1 - logical_start, len;
+ print "UNEXPECTED LENGTH for extent", $0;
+ }
+ if (physical_end + 1 - physical_start != len) {
+ print physical_end + 1 - physical_start, len;
+ print "UNEXPECTED LENGTH for extent", $0;
+ }
+
+ if (logical_start != expected_logical_start) {
+ print "UNEXPECTED LOGICAL DISCONTINUITY between extents:";
+ print "\t", prev;
+ print "\t", $0;
+ }
+ if (physical_start != expected_physical_start &&
+ expected_logical_start != 0) {
+ print "PHYSICAL DISCONTINUITY between extents:";
+ print "\t", prev;
+ print "\t", $0;
+ }
+
+ expected_logical_start = logical_end + 1;
+ expected_physical_start = physical_end + 1;
+ }
+ }
+ prev=$0;
+}
+END {
+ print "Last logical block:", expected_logical_start-1;
+ print "Last physical block:", expected_physical_start-1;
+}
+' >> $OUT 2>&1
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/m_hugefile_slack/expect b/tests/m_hugefile_slack/expect
new file mode 100644
index 0000000..e2e2fd6
--- /dev/null
+++ b/tests/m_hugefile_slack/expect
@@ -0,0 +1,19 @@
+mke2fs -F -T ext4h -I 128 test.img 786432
+128-byte inodes cannot handle dates beyond 2038 and are deprecated
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 6368 huge file(s) with 117 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/m_hugefile_slack/name b/tests/m_hugefile_slack/name
new file mode 100644
index 0000000..fd4e4d0
--- /dev/null
+++ b/tests/m_hugefile_slack/name
@@ -0,0 +1 @@
+mke2fs create hugefile fs with slack
diff --git a/tests/m_hugefile_slack/script b/tests/m_hugefile_slack/script
new file mode 100644
index 0000000..da7098a
--- /dev/null
+++ b/tests/m_hugefile_slack/script
@@ -0,0 +1,53 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+#gzip -d < $EXP.gz > $EXP
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 12000K
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 117K
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "mke2fs -F -T ext4h -I 128 test.img 786432" > $OUT
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -I 128 $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check. if we get this far, we succeeded...
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/m_image_mmp/expect.1 b/tests/m_image_mmp/expect.1
new file mode 100644
index 0000000..3bca182
--- /dev/null
+++ b/tests/m_image_mmp/expect.1
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 15/100 blocks
+Exit status is 0
diff --git a/tests/m_image_mmp/name b/tests/m_image_mmp/name
new file mode 100644
index 0000000..1015c34
--- /dev/null
+++ b/tests/m_image_mmp/name
@@ -0,0 +1 @@
+create image for partition with enabled mmp and execute fsck on image
diff --git a/tests/m_image_mmp/script b/tests/m_image_mmp/script
new file mode 100644
index 0000000..5af6f55
--- /dev/null
+++ b/tests/m_image_mmp/script
@@ -0,0 +1,22 @@
+$MKE2FS -q -F -o Linux -b 4096 -O mmp -E mmp_update_interval=1 $TMPFILE 100 >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O mmp failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+if test -x $E2IMAGE_EXE; then
+
+ONE_PASS_ONLY=true
+FSCK_OPT="-n -f"
+IMAGE=$TMPFILE
+SKIP_GUNZIP=true
+PREP_CMD="$E2IMAGE_EXE -r $TMPFILE $TMPFILE.raw 2>/dev/null; \
+ mv $TMPFILE.raw $TMPFILE"
+
+. $cmd_dir/run_e2fsck
+
+else
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/m_large_file/expect.1 b/tests/m_large_file/expect.1
new file mode 100644
index 0000000..955ba77
--- /dev/null
+++ b/tests/m_large_file/expect.1
@@ -0,0 +1,57 @@
+Creating filesystem with 16384 4k blocks and 64 inodes
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 17/16384 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 64
+Block count: 16384
+Reserved block count: 819
+Overhead clusters: 11
+Free blocks: 16367
+Free inodes: 53
+First block: 0
+Block size: 4096
+Fragment size: 4096
+Reserved GDT blocks: 3
+Blocks per group: 32768
+Fragments per group: 32768
+Inodes per group: 64
+Inode blocks per group: 4
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+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)
+ Inode table at 7-10 (+7)
+ 16367 free blocks, 53 free inodes, 2 directories
+ Free blocks: 17-16383
+ Free inodes: 12-64
diff --git a/tests/m_large_file/script b/tests/m_large_file/script
new file mode 100644
index 0000000..bd5b2ba
--- /dev/null
+++ b/tests/m_large_file/script
@@ -0,0 +1,7 @@
+DESCRIPTION="largefile fs type"
+FS_SIZE=65536
+MKE2FS_DEVICE_SECTSIZE=2048
+export MKE2FS_DEVICE_SECTSIZE
+MKE2FS_OPTS="-T largefile"
+. $cmd_dir/run_mke2fs
+unset MKE2FS_DEVICE_SECTSIZE
diff --git a/tests/m_mcsum_extjournal/expect b/tests/m_mcsum_extjournal/expect
new file mode 100644
index 0000000..ef895f8
--- /dev/null
+++ b/tests/m_mcsum_extjournal/expect
@@ -0,0 +1,5 @@
+Creating filesystem with 4096 1k blocks and 0 inodes
+Superblock backups stored on blocks:
+
+Zeroing journal device: 
+Filesystem features: journal_dev metadata_csum
diff --git a/tests/m_mcsum_extjournal/name b/tests/m_mcsum_extjournal/name
new file mode 100644
index 0000000..7df8389
--- /dev/null
+++ b/tests/m_mcsum_extjournal/name
@@ -0,0 +1 @@
+create external journal with sb checksum (metadata_csum)
diff --git a/tests/m_mcsum_extjournal/script b/tests/m_mcsum_extjournal/script
new file mode 100644
index 0000000..bbf1f9b
--- /dev/null
+++ b/tests/m_mcsum_extjournal/script
@@ -0,0 +1,27 @@
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O journal_dev,metadata_csum -T ext4 $TMPFILE 4096 2>&1 | sed -f $cmd_dir/filter.sed > $OUT
+$DUMPE2FS -h $TMPFILE 2>&1 | grep 'Filesystem features:' >> $OUT
+
+rm -f $TMPFILE
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/m_meta_bg/expect.1 b/tests/m_meta_bg/expect.1
new file mode 100644
index 0000000..28fd5b1
--- /dev/null
+++ b/tests/m_meta_bg/expect.1
@@ -0,0 +1,838 @@
+Creating filesystem with 131072 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 1025, 3073, 5121, 7169, 9217, 25601, 27649, 50177, 82945, 128001
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr dir_index filetype meta_bg sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 8485/131072 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype meta_bg sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 32768
+Block count: 131072
+Reserved block count: 6553
+Overhead clusters: 8472
+Free blocks: 122587
+Free inodes: 32757
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 256
+Inode blocks per group: 64
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptor at 2
+ Block bitmap at 3 (+2), Inode bitmap at 4 (+3)
+ Inode table at 5-68 (+4)
+ 943 free blocks, 245 free inodes, 2 directories
+ Free blocks: 82-1024
+ Free inodes: 12-256
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptor at 1026
+ Block bitmap at 1027 (+2), Inode bitmap at 1028 (+3)
+ Inode table at 1029-1092 (+4)
+ 956 free blocks, 256 free inodes, 0 directories
+ Free blocks: 1093-2048
+ Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2114 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 2115-3072
+ Free inodes: 513-768
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073
+ Block bitmap at 3074 (+1), Inode bitmap at 3075 (+2)
+ Inode table at 3076-3139 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 3140-4096
+ Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4162 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 4163-5120
+ Free inodes: 1025-1280
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121
+ Block bitmap at 5122 (+1), Inode bitmap at 5123 (+2)
+ Inode table at 5124-5187 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 5188-6144
+ Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6210 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 6211-7168
+ Free inodes: 1537-1792
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169
+ Block bitmap at 7170 (+1), Inode bitmap at 7171 (+2)
+ Inode table at 7172-7235 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 7236-8192
+ Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8258 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 8259-9216
+ Free inodes: 2049-2304
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217
+ Block bitmap at 9218 (+1), Inode bitmap at 9219 (+2)
+ Inode table at 9220-9283 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 9284-10240
+ Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10306 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 10307-11264
+ Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11330 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 11331-12288
+ Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12354 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 12355-13312
+ Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13378 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 13379-14336
+ Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14402 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 14403-15360
+ Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15426 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 15427-16384
+ Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16450 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 16451-17408
+ Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17474 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 17475-18432
+ Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18498 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 18499-19456
+ Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19522 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 19523-20480
+ Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+ Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+ Inode table at 20483-20546 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 20547-21504
+ Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+ Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+ Inode table at 21507-21570 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 21571-22528
+ Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+ Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+ Inode table at 22531-22594 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 22595-23552
+ Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+ Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+ Inode table at 23555-23618 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 23619-24576
+ Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+ Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+ Inode table at 24579-24642 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 24643-25600
+ Free inodes: 6145-6400
+Group 25: (Blocks 25601-26624)
+ Backup superblock at 25601
+ Block bitmap at 25602 (+1), Inode bitmap at 25603 (+2)
+ Inode table at 25604-25667 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 25668-26624
+ Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+ Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+ Inode table at 26627-26690 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 26691-27648
+ Free inodes: 6657-6912
+Group 27: (Blocks 27649-28672)
+ Backup superblock at 27649
+ Block bitmap at 27650 (+1), Inode bitmap at 27651 (+2)
+ Inode table at 27652-27715 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 27716-28672
+ Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+ Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+ Inode table at 28675-28738 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 28739-29696
+ Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+ Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+ Inode table at 29699-29762 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 29763-30720
+ Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+ Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+ Inode table at 30723-30786 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 30787-31744
+ Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+ Group descriptor at 31745
+ Block bitmap at 31746 (+1), Inode bitmap at 31747 (+2)
+ Inode table at 31748-31811 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 31812-32768
+ Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+ Group descriptor at 32769
+ Block bitmap at 32770 (+1), Inode bitmap at 32771 (+2)
+ Inode table at 32772-32835 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 32836-33792
+ Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+ Group descriptor at 33793
+ Block bitmap at 33794 (+1), Inode bitmap at 33795 (+2)
+ Inode table at 33796-33859 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 33860-34816
+ Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+ Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+ Inode table at 34819-34882 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 34883-35840
+ Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+ Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+ Inode table at 35843-35906 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 35907-36864
+ Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+ Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+ Inode table at 36867-36930 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 36931-37888
+ Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+ Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+ Inode table at 37891-37954 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 37955-38912
+ Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+ Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+ Inode table at 38915-38978 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 38979-39936
+ Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+ Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+ Inode table at 39939-40002 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 40003-40960
+ Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+ Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+ Inode table at 40963-41026 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 41027-41984
+ Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+ Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+ Inode table at 41987-42050 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 42051-43008
+ Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+ Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+ Inode table at 43011-43074 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 43075-44032
+ Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+ Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+ Inode table at 44035-44098 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 44099-45056
+ Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+ Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+ Inode table at 45059-45122 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 45123-46080
+ Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+ Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+ Inode table at 46083-46146 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 46147-47104
+ Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+ Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+ Inode table at 47107-47170 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 47171-48128
+ Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+ Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+ Inode table at 48131-48194 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 48195-49152
+ Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49218 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 49219-50176
+ Free inodes: 12289-12544
+Group 49: (Blocks 50177-51200)
+ Backup superblock at 50177
+ Block bitmap at 50178 (+1), Inode bitmap at 50179 (+2)
+ Inode table at 50180-50243 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 50244-51200
+ Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+ Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+ Inode table at 51203-51266 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 51267-52224
+ Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+ Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+ Inode table at 52227-52290 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 52291-53248
+ Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+ Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+ Inode table at 53251-53314 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 53315-54272
+ Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+ Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+ Inode table at 54275-54338 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 54339-55296
+ Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+ Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+ Inode table at 55299-55362 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 55363-56320
+ Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+ Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+ Inode table at 56323-56386 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 56387-57344
+ Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+ Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+ Inode table at 57347-57410 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 57411-58368
+ Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+ Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+ Inode table at 58371-58434 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 58435-59392
+ Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+ Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+ Inode table at 59395-59458 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 59459-60416
+ Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+ Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+ Inode table at 60419-60482 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 60483-61440
+ Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+ Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+ Inode table at 61443-61506 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 61507-62464
+ Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+ Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+ Inode table at 62467-62530 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 62531-63488
+ Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+ Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+ Inode table at 63491-63554 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 63555-64512
+ Free inodes: 15873-16128
+Group 63: (Blocks 64513-65536)
+ Group descriptor at 64513
+ Block bitmap at 64514 (+1), Inode bitmap at 64515 (+2)
+ Inode table at 64516-64579 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 64580-65536
+ Free inodes: 16129-16384
+Group 64: (Blocks 65537-66560)
+ Group descriptor at 65537
+ Block bitmap at 65538 (+1), Inode bitmap at 65539 (+2)
+ Inode table at 65540-65603 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 65604-66560
+ Free inodes: 16385-16640
+Group 65: (Blocks 66561-67584)
+ Group descriptor at 66561
+ Block bitmap at 66562 (+1), Inode bitmap at 66563 (+2)
+ Inode table at 66564-66627 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 66628-67584
+ Free inodes: 16641-16896
+Group 66: (Blocks 67585-68608)
+ Block bitmap at 67585 (+0), Inode bitmap at 67586 (+1)
+ Inode table at 67587-67650 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 67651-68608
+ Free inodes: 16897-17152
+Group 67: (Blocks 68609-69632)
+ Block bitmap at 68609 (+0), Inode bitmap at 68610 (+1)
+ Inode table at 68611-68674 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 68675-69632
+ Free inodes: 17153-17408
+Group 68: (Blocks 69633-70656)
+ Block bitmap at 69633 (+0), Inode bitmap at 69634 (+1)
+ Inode table at 69635-69698 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 69699-70656
+ Free inodes: 17409-17664
+Group 69: (Blocks 70657-71680)
+ Block bitmap at 70657 (+0), Inode bitmap at 70658 (+1)
+ Inode table at 70659-70722 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 70723-71680
+ Free inodes: 17665-17920
+Group 70: (Blocks 71681-72704)
+ Block bitmap at 71681 (+0), Inode bitmap at 71682 (+1)
+ Inode table at 71683-71746 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 71747-72704
+ Free inodes: 17921-18176
+Group 71: (Blocks 72705-73728)
+ Block bitmap at 72705 (+0), Inode bitmap at 72706 (+1)
+ Inode table at 72707-72770 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 72771-73728
+ Free inodes: 18177-18432
+Group 72: (Blocks 73729-74752)
+ Block bitmap at 73729 (+0), Inode bitmap at 73730 (+1)
+ Inode table at 73731-73794 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 73795-74752
+ Free inodes: 18433-18688
+Group 73: (Blocks 74753-75776)
+ Block bitmap at 74753 (+0), Inode bitmap at 74754 (+1)
+ Inode table at 74755-74818 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 74819-75776
+ Free inodes: 18689-18944
+Group 74: (Blocks 75777-76800)
+ Block bitmap at 75777 (+0), Inode bitmap at 75778 (+1)
+ Inode table at 75779-75842 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 75843-76800
+ Free inodes: 18945-19200
+Group 75: (Blocks 76801-77824)
+ Block bitmap at 76801 (+0), Inode bitmap at 76802 (+1)
+ Inode table at 76803-76866 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 76867-77824
+ Free inodes: 19201-19456
+Group 76: (Blocks 77825-78848)
+ Block bitmap at 77825 (+0), Inode bitmap at 77826 (+1)
+ Inode table at 77827-77890 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 77891-78848
+ Free inodes: 19457-19712
+Group 77: (Blocks 78849-79872)
+ Block bitmap at 78849 (+0), Inode bitmap at 78850 (+1)
+ Inode table at 78851-78914 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 78915-79872
+ Free inodes: 19713-19968
+Group 78: (Blocks 79873-80896)
+ Block bitmap at 79873 (+0), Inode bitmap at 79874 (+1)
+ Inode table at 79875-79938 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 79939-80896
+ Free inodes: 19969-20224
+Group 79: (Blocks 80897-81920)
+ Block bitmap at 80897 (+0), Inode bitmap at 80898 (+1)
+ Inode table at 80899-80962 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 80963-81920
+ Free inodes: 20225-20480
+Group 80: (Blocks 81921-82944)
+ Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+ Inode table at 81923-81986 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 81987-82944
+ Free inodes: 20481-20736
+Group 81: (Blocks 82945-83968)
+ Backup superblock at 82945
+ Block bitmap at 82946 (+1), Inode bitmap at 82947 (+2)
+ Inode table at 82948-83011 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 83012-83968
+ Free inodes: 20737-20992
+Group 82: (Blocks 83969-84992)
+ Block bitmap at 83969 (+0), Inode bitmap at 83970 (+1)
+ Inode table at 83971-84034 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 84035-84992
+ Free inodes: 20993-21248
+Group 83: (Blocks 84993-86016)
+ Block bitmap at 84993 (+0), Inode bitmap at 84994 (+1)
+ Inode table at 84995-85058 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 85059-86016
+ Free inodes: 21249-21504
+Group 84: (Blocks 86017-87040)
+ Block bitmap at 86017 (+0), Inode bitmap at 86018 (+1)
+ Inode table at 86019-86082 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 86083-87040
+ Free inodes: 21505-21760
+Group 85: (Blocks 87041-88064)
+ Block bitmap at 87041 (+0), Inode bitmap at 87042 (+1)
+ Inode table at 87043-87106 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 87107-88064
+ Free inodes: 21761-22016
+Group 86: (Blocks 88065-89088)
+ Block bitmap at 88065 (+0), Inode bitmap at 88066 (+1)
+ Inode table at 88067-88130 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 88131-89088
+ Free inodes: 22017-22272
+Group 87: (Blocks 89089-90112)
+ Block bitmap at 89089 (+0), Inode bitmap at 89090 (+1)
+ Inode table at 89091-89154 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 89155-90112
+ Free inodes: 22273-22528
+Group 88: (Blocks 90113-91136)
+ Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+ Inode table at 90115-90178 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 90179-91136
+ Free inodes: 22529-22784
+Group 89: (Blocks 91137-92160)
+ Block bitmap at 91137 (+0), Inode bitmap at 91138 (+1)
+ Inode table at 91139-91202 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 91203-92160
+ Free inodes: 22785-23040
+Group 90: (Blocks 92161-93184)
+ Block bitmap at 92161 (+0), Inode bitmap at 92162 (+1)
+ Inode table at 92163-92226 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 92227-93184
+ Free inodes: 23041-23296
+Group 91: (Blocks 93185-94208)
+ Block bitmap at 93185 (+0), Inode bitmap at 93186 (+1)
+ Inode table at 93187-93250 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 93251-94208
+ Free inodes: 23297-23552
+Group 92: (Blocks 94209-95232)
+ Block bitmap at 94209 (+0), Inode bitmap at 94210 (+1)
+ Inode table at 94211-94274 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 94275-95232
+ Free inodes: 23553-23808
+Group 93: (Blocks 95233-96256)
+ Block bitmap at 95233 (+0), Inode bitmap at 95234 (+1)
+ Inode table at 95235-95298 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 95299-96256
+ Free inodes: 23809-24064
+Group 94: (Blocks 96257-97280)
+ Block bitmap at 96257 (+0), Inode bitmap at 96258 (+1)
+ Inode table at 96259-96322 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 96323-97280
+ Free inodes: 24065-24320
+Group 95: (Blocks 97281-98304)
+ Group descriptor at 97281
+ Block bitmap at 97282 (+1), Inode bitmap at 97283 (+2)
+ Inode table at 97284-97347 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 97348-98304
+ Free inodes: 24321-24576
+Group 96: (Blocks 98305-99328)
+ Group descriptor at 98305
+ Block bitmap at 98306 (+1), Inode bitmap at 98307 (+2)
+ Inode table at 98308-98371 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 98372-99328
+ Free inodes: 24577-24832
+Group 97: (Blocks 99329-100352)
+ Group descriptor at 99329
+ Block bitmap at 99330 (+1), Inode bitmap at 99331 (+2)
+ Inode table at 99332-99395 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 99396-100352
+ Free inodes: 24833-25088
+Group 98: (Blocks 100353-101376)
+ Block bitmap at 100353 (+0), Inode bitmap at 100354 (+1)
+ Inode table at 100355-100418 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 100419-101376
+ Free inodes: 25089-25344
+Group 99: (Blocks 101377-102400)
+ Block bitmap at 101377 (+0), Inode bitmap at 101378 (+1)
+ Inode table at 101379-101442 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 101443-102400
+ Free inodes: 25345-25600
+Group 100: (Blocks 102401-103424)
+ Block bitmap at 102401 (+0), Inode bitmap at 102402 (+1)
+ Inode table at 102403-102466 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 102467-103424
+ Free inodes: 25601-25856
+Group 101: (Blocks 103425-104448)
+ Block bitmap at 103425 (+0), Inode bitmap at 103426 (+1)
+ Inode table at 103427-103490 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 103491-104448
+ Free inodes: 25857-26112
+Group 102: (Blocks 104449-105472)
+ Block bitmap at 104449 (+0), Inode bitmap at 104450 (+1)
+ Inode table at 104451-104514 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 104515-105472
+ Free inodes: 26113-26368
+Group 103: (Blocks 105473-106496)
+ Block bitmap at 105473 (+0), Inode bitmap at 105474 (+1)
+ Inode table at 105475-105538 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 105539-106496
+ Free inodes: 26369-26624
+Group 104: (Blocks 106497-107520)
+ Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+ Inode table at 106499-106562 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 106563-107520
+ Free inodes: 26625-26880
+Group 105: (Blocks 107521-108544)
+ Block bitmap at 107521 (+0), Inode bitmap at 107522 (+1)
+ Inode table at 107523-107586 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 107587-108544
+ Free inodes: 26881-27136
+Group 106: (Blocks 108545-109568)
+ Block bitmap at 108545 (+0), Inode bitmap at 108546 (+1)
+ Inode table at 108547-108610 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 108611-109568
+ Free inodes: 27137-27392
+Group 107: (Blocks 109569-110592)
+ Block bitmap at 109569 (+0), Inode bitmap at 109570 (+1)
+ Inode table at 109571-109634 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 109635-110592
+ Free inodes: 27393-27648
+Group 108: (Blocks 110593-111616)
+ Block bitmap at 110593 (+0), Inode bitmap at 110594 (+1)
+ Inode table at 110595-110658 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 110659-111616
+ Free inodes: 27649-27904
+Group 109: (Blocks 111617-112640)
+ Block bitmap at 111617 (+0), Inode bitmap at 111618 (+1)
+ Inode table at 111619-111682 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 111683-112640
+ Free inodes: 27905-28160
+Group 110: (Blocks 112641-113664)
+ Block bitmap at 112641 (+0), Inode bitmap at 112642 (+1)
+ Inode table at 112643-112706 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 112707-113664
+ Free inodes: 28161-28416
+Group 111: (Blocks 113665-114688)
+ Block bitmap at 113665 (+0), Inode bitmap at 113666 (+1)
+ Inode table at 113667-113730 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 113731-114688
+ Free inodes: 28417-28672
+Group 112: (Blocks 114689-115712)
+ Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+ Inode table at 114691-114754 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 114755-115712
+ Free inodes: 28673-28928
+Group 113: (Blocks 115713-116736)
+ Block bitmap at 115713 (+0), Inode bitmap at 115714 (+1)
+ Inode table at 115715-115778 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 115779-116736
+ Free inodes: 28929-29184
+Group 114: (Blocks 116737-117760)
+ Block bitmap at 116737 (+0), Inode bitmap at 116738 (+1)
+ Inode table at 116739-116802 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 116803-117760
+ Free inodes: 29185-29440
+Group 115: (Blocks 117761-118784)
+ Block bitmap at 117761 (+0), Inode bitmap at 117762 (+1)
+ Inode table at 117763-117826 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 117827-118784
+ Free inodes: 29441-29696
+Group 116: (Blocks 118785-119808)
+ Block bitmap at 118785 (+0), Inode bitmap at 118786 (+1)
+ Inode table at 118787-118850 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 118851-119808
+ Free inodes: 29697-29952
+Group 117: (Blocks 119809-120832)
+ Block bitmap at 119809 (+0), Inode bitmap at 119810 (+1)
+ Inode table at 119811-119874 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 119875-120832
+ Free inodes: 29953-30208
+Group 118: (Blocks 120833-121856)
+ Block bitmap at 120833 (+0), Inode bitmap at 120834 (+1)
+ Inode table at 120835-120898 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 120899-121856
+ Free inodes: 30209-30464
+Group 119: (Blocks 121857-122880)
+ Block bitmap at 121857 (+0), Inode bitmap at 121858 (+1)
+ Inode table at 121859-121922 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 121923-122880
+ Free inodes: 30465-30720
+Group 120: (Blocks 122881-123904)
+ Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+ Inode table at 122883-122946 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 122947-123904
+ Free inodes: 30721-30976
+Group 121: (Blocks 123905-124928)
+ Block bitmap at 123905 (+0), Inode bitmap at 123906 (+1)
+ Inode table at 123907-123970 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 123971-124928
+ Free inodes: 30977-31232
+Group 122: (Blocks 124929-125952)
+ Block bitmap at 124929 (+0), Inode bitmap at 124930 (+1)
+ Inode table at 124931-124994 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 124995-125952
+ Free inodes: 31233-31488
+Group 123: (Blocks 125953-126976)
+ Block bitmap at 125953 (+0), Inode bitmap at 125954 (+1)
+ Inode table at 125955-126018 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 126019-126976
+ Free inodes: 31489-31744
+Group 124: (Blocks 126977-128000)
+ Block bitmap at 126977 (+0), Inode bitmap at 126978 (+1)
+ Inode table at 126979-127042 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 127043-128000
+ Free inodes: 31745-32000
+Group 125: (Blocks 128001-129024)
+ Backup superblock at 128001
+ Block bitmap at 128002 (+1), Inode bitmap at 128003 (+2)
+ Inode table at 128004-128067 (+3)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 128068-129024
+ Free inodes: 32001-32256
+Group 126: (Blocks 129025-130048)
+ Block bitmap at 129025 (+0), Inode bitmap at 129026 (+1)
+ Inode table at 129027-129090 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 129091-130048
+ Free inodes: 32257-32512
+Group 127: (Blocks 130049-131071)
+ Group descriptor at 130049
+ Block bitmap at 130050 (+1), Inode bitmap at 130051 (+2)
+ Inode table at 130052-130115 (+3)
+ 956 free blocks, 256 free inodes, 0 directories
+ Free blocks: 130116-131071
+ Free inodes: 32513-32768
diff --git a/tests/m_meta_bg/script b/tests/m_meta_bg/script
new file mode 100644
index 0000000..5e285b4
--- /dev/null
+++ b/tests/m_meta_bg/script
@@ -0,0 +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
diff --git a/tests/m_minrootdir/expect b/tests/m_minrootdir/expect
new file mode 100644
index 0000000..d2e9a9e
--- /dev/null
+++ b/tests/m_minrootdir/expect
@@ -0,0 +1,217 @@
+create fs
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype extent 64bit flex_bg sparse_super huge_file dir_nlink extra_isize metadata_csum
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 1024
+Block count: 16384
+Reserved block count: 819
+Overhead clusters: 265
+Free blocks: 16065
+Free inodes: 1006
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Group descriptor size: 64
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 512
+Inode blocks per group: 128
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+Checksum type: crc32c
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Block bitmap at 3 (+2)
+ Inode bitmap at 5 (+4)
+ Inode table at 7-134 (+6)
+ 7876 free blocks, 494 free inodes, 4 directories, 494 unused inodes
+ Free blocks: 317-8192
+ Free inodes: 19-512
+Group 1: (Blocks 8193-16383) [INODE_UNINIT]
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Block bitmap at 4 (bg #0 + 3)
+ Inode bitmap at 6 (bg #0 + 5)
+ Inode table at 135-262 (bg #0 + 134)
+ 8189 free blocks, 512 free inodes, 0 directories, 512 unused inodes
+ Free blocks: 8195-16383
+ Free inodes: 513-1024
+debugfs: stat /emptyfile
+Inode: III Type: regular
+Size: 0
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /bigfile
+Inode: III Type: regular
+Size: 32768
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /sparsefile
+Inode: III Type: regular
+Size: 1073741825
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /bigzerofile
+Inode: III Type: regular
+Size: 1073741825
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /fifo
+debugfs: stat /emptydir
+Inode: III Type: directory
+Size: 1024
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /dir
+Inode: III Type: directory
+Size: 1024
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /dir/file
+Inode: III Type: regular
+Size: 8
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: ex /emptyfile
+Level Entries Logical Physical Length Flags
+debugfs: ex /bigfile
+Level Entries Logical Physical Length Flags
+X 0/0 1/1 0-31 AAA-BBB 32
+debugfs: ex /sparsefile
+Level Entries Logical Physical Length Flags
+Y 0/1 1/1 1-1048576 AAA 1048576
+X 1/1 1/5 1-1 AAA-BBB 1
+X 1/1 2/5 512-512 AAA-BBB 1
+X 1/1 3/5 1024-1024 AAA-BBB 1
+X 1/1 4/5 524288-524288 AAA-BBB 1
+X 1/1 5/5 1048576-1048576 AAA-BBB 1
+debugfs: ex /bigzerofile
+Level Entries Logical Physical Length Flags
+debugfs: ex /dir
+Level Entries Logical Physical Length Flags
+X 0/0 1/1 0-0 AAA-BBB 1
+debugfs: ex /dir/file
+Level Entries Logical Physical Length Flags
+X 0/0 1/1 0-0 AAA-BBB 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test.img: 18/1024 files (0.0% non-contiguous), 319/16384 blocks
+minify fs
+Setting reserved blocks percentage to 0% (0 blocks)
+Resizing the filesystem on test.img to 338 (1k) blocks.
+The filesystem on test.img is now 338 (1k) blocks long.
+
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype extent 64bit flex_bg sparse_super huge_file dir_nlink extra_isize metadata_csum
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 512
+Block count: 338
+Reserved block count: 0
+Free blocks: 151
+Free inodes: 494
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Group descriptor size: 64
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 512
+Inode blocks per group: 128
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+Checksum type: crc32c
+
+
+Group 0: (Blocks 1-337)
+ Primary superblock at 1, Group descriptors at 2-2
+ Block bitmap at 3 (+2)
+ Inode bitmap at 5 (+4)
+ Inode table at 7-134 (+6)
+ 151 free blocks, 494 free inodes, 4 directories, 494 unused inodes
+ Free blocks: 4, 6, 135-262, 317-337
+ Free inodes: 19-512
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test.img: 18/512 files (0.0% non-contiguous), 187/338 blocks
+minify fs (2)
+Setting reserved blocks percentage to 0% (0 blocks)
+Resizing the filesystem on test.img to 188 (1k) blocks.
+The filesystem on test.img is now 188 (1k) blocks long.
+
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype extent 64bit flex_bg sparse_super huge_file dir_nlink extra_isize metadata_csum
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 512
+Block count: 188
+Reserved block count: 0
+Free blocks: 1
+Free inodes: 494
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Group descriptor size: 64
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 512
+Inode blocks per group: 128
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+Checksum type: crc32c
+
+
+Group 0: (Blocks 1-187)
+ Primary superblock at 1, Group descriptors at 2-2
+ Block bitmap at 3 (+2)
+ Inode bitmap at 5 (+4)
+ Inode table at 7-134 (+6)
+ 1 free blocks, 494 free inodes, 4 directories, 494 unused inodes
+ Free blocks: 187
+ Free inodes: 19-512
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test.img: 18/512 files (5.6% non-contiguous), 187/188 blocks
diff --git a/tests/m_minrootdir/output.sed b/tests/m_minrootdir/output.sed
new file mode 100644
index 0000000..2e76967
--- /dev/null
+++ b/tests/m_minrootdir/output.sed
@@ -0,0 +1,5 @@
+s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*-[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/X \1\/\2 \3\/\4 \5-\6 AAA-BBB \7/g
+s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/Y \1\/\2 \3\/\4 \5-\6 AAA \7/g
+s/Mode:.*$//g
+s/User:.*Size:/Size:/g
+s/^Inode: [0-9]*/Inode: III/g
diff --git a/tests/m_minrootdir/script b/tests/m_minrootdir/script
new file mode 100644
index 0000000..4e2314c
--- /dev/null
+++ b/tests/m_minrootdir/script
@@ -0,0 +1,80 @@
+test_description="create fs image from dir, then minimize it"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+MKFS_DIR=$TMPFILE.dir
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+rm -rf $MKFS_DIR
+mkdir -p $MKFS_DIR
+mkdir $MKFS_DIR/dir
+mkdir $MKFS_DIR/emptydir
+dd if=/dev/zero of=$MKFS_DIR/bigzerofile bs=1 count=1 seek=1073741824 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1024 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=524288 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1048576 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=536870912 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1073741824 conv=notrunc 2> /dev/null
+dd if=/dev/zero bs=1024 count=32 2> /dev/null | tr '\0' 'a' > $MKFS_DIR/bigfile
+touch $MKFS_DIR/emptyfile
+echo "Test me" > $MKFS_DIR/dir/file
+
+echo "create fs" > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^has_journal,metadata_csum,64bit,^resize_inode -E lazy_itable_init=1 -b 1024 -d $MKFS_DIR $TMPFILE 16384 >> $OUT 2>&1
+
+$DUMPE2FS $TMPFILE >> $OUT 2>&1
+cat > $TMPFILE.cmd << ENDL
+stat /emptyfile
+stat /bigfile
+stat /sparsefile
+stat /bigzerofile
+stat /fifo
+stat /emptydir
+stat /dir
+stat /dir/file
+ENDL
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | egrep "(stat|Size:|Type:)" >> $OUT
+
+cat > $TMPFILE.cmd << ENDL
+ex /emptyfile
+ex /bigfile
+ex /sparsefile
+ex /bigzerofile
+ex /dir
+ex /dir/file
+ENDL
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT 2>&1
+$FSCK -f -n $TMPFILE >> $OUT 2>&1
+
+echo "minify fs" >> $OUT
+$TUNE2FS -m 0 $TMPFILE >> $OUT 2>&1
+$RESIZE2FS -M $TMPFILE >> $OUT 2>&1
+$DUMPE2FS $TMPFILE >> $OUT 2>&1
+$FSCK -f -n $TMPFILE >> $OUT 2>&1
+
+echo "minify fs (2)" >> $OUT
+$TUNE2FS -m 0 $TMPFILE >> $OUT 2>&1
+$RESIZE2FS -M $TMPFILE >> $OUT 2>&1
+$DUMPE2FS $TMPFILE >> $OUT 2>&1
+$FSCK -f -n $TMPFILE >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed -f $test_dir/output.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp
+mv $OUT.tmp $OUT
+
+# Do the verification
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm -rf $TMPFILE.cmd $MKFS_DIR
+unset MKFS_DIR OUT EXP
diff --git a/tests/m_mkfs_overhead/expect b/tests/m_mkfs_overhead/expect
new file mode 100644
index 0000000..adb8fd2
--- /dev/null
+++ b/tests/m_mkfs_overhead/expect
@@ -0,0 +1 @@
+test.img: Cannot create filesystem with requested number of inodes while setting up superblock
diff --git a/tests/m_mkfs_overhead/script b/tests/m_mkfs_overhead/script
new file mode 100644
index 0000000..3606fa2
--- /dev/null
+++ b/tests/m_mkfs_overhead/script
@@ -0,0 +1,29 @@
+test_description="test bg overhead calculation"
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+FS_SIZE=1024
+MKE2FS_OPTS="-o hurd -b 1024 -m 0 -g 256 -N 3745"
+
+MKE2FS_SKIP_PROGRESS=true
+MKE2FS_SKIP_CHECK_MSG=true
+export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
+> $TMPFILE
+
+$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 |
+ sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" > $OUT
+
+rm -f $TMPFILE
+
+cmp -s $OUT $EXP
+status1=$?
+
+if [ "$status1" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset OUT EXP DESCRIPTION FS_SIZE MKE2FS_OPTS MKE2FS_SKIP_PROGRESS
diff --git a/tests/m_mmp/expect.1 b/tests/m_mmp/expect.1
new file mode 100644
index 0000000..0edb97d
--- /dev/null
+++ b/tests/m_mmp/expect.1
@@ -0,0 +1,79 @@
+Creating filesystem with 65536 4k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Multiple mount protection is enabled with update interval 5 seconds.
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype mmp sparse_super large_file
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/65536 files (0.0% non-contiguous), 4141/65536 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype mmp sparse_super large_file
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 65536
+Block count: 65536
+Reserved block count: 3276
+Overhead clusters: 4134
+Free blocks: 61395
+Free inodes: 65525
+First block: 0
+Block size: 4096
+Fragment size: 4096
+Reserved GDT blocks: 15
+Blocks per group: 32768
+Fragments per group: 32768
+Inodes per group: 32768
+Inode blocks per group: 2048
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+MMP block number: 2073
+MMP update interval: 5
+MMP_block:
+ mmp_magic: 0x4d4d50
+ mmp_check_interval: 5
+ mmp_sequence: 0xff4d4d50
+ mmp_update_date: test date
+ mmp_update_time: test_time
+ mmp_node_name: test_node
+ mmp_device_name: test.img
+
+
+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)
+ Inode table at 19-2066 (+19)
+ 30694 free blocks, 32757 free inodes, 2 directories
+ Free blocks: 2074-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)
+ Inode table at 32787-34834 (+19)
+ 30701 free blocks, 32768 free inodes, 0 directories
+ Free blocks: 34835-65535
+ Free inodes: 32769-65536
diff --git a/tests/m_mmp/script b/tests/m_mmp/script
new file mode 100644
index 0000000..e456183
--- /dev/null
+++ b/tests/m_mmp/script
@@ -0,0 +1,8 @@
+DESCRIPTION="enable MMP during mke2fs"
+FS_SIZE=65536
+MKE2FS_DEVICE_SECTSIZE=2048
+export MKE2FS_DEVICE_SECTSIZE
+
+MKE2FS_OPTS="-b 4096 -O mmp"
+. $cmd_dir/run_mke2fs
+unset MKE2FS_DEVICE_SECTSIZE
diff --git a/tests/m_mmp_bad_csum/expect b/tests/m_mmp_bad_csum/expect
new file mode 100644
index 0000000..a0678ac
--- /dev/null
+++ b/tests/m_mmp_bad_csum/expect
@@ -0,0 +1,23 @@
+dumpe2fs: MMP block checksum does not match while trying to open test.img
+dumpe2fs: MMP last updated by 'test_node' on test date
+Exit status is 1
+Superblock MMP block checksum does not match. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
+dumpe2fs: it is safe to mount 'test.img', MMP is clean
+Exit status is 0
+MMP_block:
+ mmp_magic: 0x4d4d50
+ mmp_check_interval: 5
+ mmp_sequence: 0xff4d4d50
+ mmp_update_date: test date
+ mmp_update_time: test_time
+ mmp_node_name: test_node
+ mmp_device_name: test.img
+ mmp_block_number: 8
diff --git a/tests/m_mmp_bad_csum/image.gz b/tests/m_mmp_bad_csum/image.gz
new file mode 100644
index 0000000..c896ff6
--- /dev/null
+++ b/tests/m_mmp_bad_csum/image.gz
Binary files differ
diff --git a/tests/m_mmp_bad_csum/name b/tests/m_mmp_bad_csum/name
new file mode 100644
index 0000000..61c31d4
--- /dev/null
+++ b/tests/m_mmp_bad_csum/name
@@ -0,0 +1 @@
+mmp with bad csum (metadata_csum)
diff --git a/tests/m_mmp_bad_csum/script b/tests/m_mmp_bad_csum/script
new file mode 100644
index 0000000..a5e222e
--- /dev/null
+++ b/tests/m_mmp_bad_csum/script
@@ -0,0 +1,27 @@
+gzip -dc < $test_dir/image.gz > $TMPFILE
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+$E2MMPSTATUS $TMPFILE > $OUT 2>&1
+echo Exit status is $? >> $OUT
+$FSCK -fy $TMPFILE >> $OUT 2>&1
+echo Exit status is $? >> $OUT
+$E2MMPSTATUS $TMPFILE >> $OUT 2>&1
+echo Exit status is $? >> $OUT
+$E2MMPSTATUS -i $TMPFILE >> $OUT 2>&1
+sed -f $cmd_dir/filter.sed $OUT > $OUT.new
+mv $OUT.new $OUT
+
+rm -f $TMPFILE
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+unset OUT EXP
diff --git a/tests/m_mmp_bad_magic/.log b/tests/m_mmp_bad_magic/.log
new file mode 100644
index 0000000..b5dfb89
--- /dev/null
+++ b/tests/m_mmp_bad_magic/.log
@@ -0,0 +1,9 @@
+Superblock has invalid MMP magic. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
diff --git a/tests/m_mmp_bad_magic/expect b/tests/m_mmp_bad_magic/expect
new file mode 100644
index 0000000..d5fa98c
--- /dev/null
+++ b/tests/m_mmp_bad_magic/expect
@@ -0,0 +1,22 @@
+dumpe2fs: MMP: invalid magic number while trying to open test.img
+Exit status is 2
+Superblock has invalid MMP magic. Fix? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 19/512 blocks
+Exit status is 0
+dumpe2fs: it is safe to mount 'test.img', MMP is clean
+Exit status is 0
+MMP_block:
+ mmp_magic: 0x4d4d50
+ mmp_check_interval: 5
+ mmp_sequence: 0xff4d4d50
+ mmp_update_date: test date
+ mmp_update_time: test_time
+ mmp_node_name: test_node
+ mmp_device_name: test.img
+ mmp_block_number: 8
diff --git a/tests/m_mmp_bad_magic/image.gz b/tests/m_mmp_bad_magic/image.gz
new file mode 100644
index 0000000..2d57fbf
--- /dev/null
+++ b/tests/m_mmp_bad_magic/image.gz
Binary files differ
diff --git a/tests/m_mmp_bad_magic/name b/tests/m_mmp_bad_magic/name
new file mode 100644
index 0000000..15a2d4d
--- /dev/null
+++ b/tests/m_mmp_bad_magic/name
@@ -0,0 +1 @@
+mmp with bad magic (metadata_csum)
diff --git a/tests/m_mmp_bad_magic/script b/tests/m_mmp_bad_magic/script
new file mode 100644
index 0000000..a5e222e
--- /dev/null
+++ b/tests/m_mmp_bad_magic/script
@@ -0,0 +1,27 @@
+gzip -dc < $test_dir/image.gz > $TMPFILE
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+$E2MMPSTATUS $TMPFILE > $OUT 2>&1
+echo Exit status is $? >> $OUT
+$FSCK -fy $TMPFILE >> $OUT 2>&1
+echo Exit status is $? >> $OUT
+$E2MMPSTATUS $TMPFILE >> $OUT 2>&1
+echo Exit status is $? >> $OUT
+$E2MMPSTATUS -i $TMPFILE >> $OUT 2>&1
+sed -f $cmd_dir/filter.sed $OUT > $OUT.new
+mv $OUT.new $OUT
+
+rm -f $TMPFILE
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+unset OUT EXP
diff --git a/tests/m_no_opt/expect.1 b/tests/m_no_opt/expect.1
new file mode 100644
index 0000000..806d293
--- /dev/null
+++ b/tests/m_no_opt/expect.1
@@ -0,0 +1,105 @@
+Creating filesystem with 65536 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 16385, 24577, 32769, 40961, 49153, 57345
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features:(none)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 4142/65536 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: (none)
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 16384
+Block count: 65536
+Reserved block count: 3276
+Overhead clusters: 4129
+Free blocks: 61394
+Free inodes: 16373
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 512
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Block bitmap at 3 (+2), Inode bitmap at 4 (+3)
+ Inode table at 5-516 (+4)
+ 7663 free blocks, 2037 free inodes, 2 directories
+ Free blocks: 530-8192
+ Free inodes: 12-2048
+Group 1: (Blocks 8193-16384)
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Block bitmap at 8195 (+2), Inode bitmap at 8196 (+3)
+ Inode table at 8197-8708 (+4)
+ 7676 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 8709-16384
+ Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+ Backup superblock at 16385, Group descriptors at 16386-16386
+ Block bitmap at 16387 (+2), Inode bitmap at 16388 (+3)
+ Inode table at 16389-16900 (+4)
+ 7676 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 16901-24576
+ Free inodes: 4097-6144
+Group 3: (Blocks 24577-32768)
+ Backup superblock at 24577, Group descriptors at 24578-24578
+ Block bitmap at 24579 (+2), Inode bitmap at 24580 (+3)
+ Inode table at 24581-25092 (+4)
+ 7676 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 25093-32768
+ Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+ Backup superblock at 32769, Group descriptors at 32770-32770
+ Block bitmap at 32771 (+2), Inode bitmap at 32772 (+3)
+ Inode table at 32773-33284 (+4)
+ 7676 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 33285-40960
+ Free inodes: 8193-10240
+Group 5: (Blocks 40961-49152)
+ Backup superblock at 40961, Group descriptors at 40962-40962
+ Block bitmap at 40963 (+2), Inode bitmap at 40964 (+3)
+ Inode table at 40965-41476 (+4)
+ 7676 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 41477-49152
+ Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+ Backup superblock at 49153, Group descriptors at 49154-49154
+ Block bitmap at 49155 (+2), Inode bitmap at 49156 (+3)
+ Inode table at 49157-49668 (+4)
+ 7676 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 49669-57344
+ Free inodes: 12289-14336
+Group 7: (Blocks 57345-65535)
+ Backup superblock at 57345, Group descriptors at 57346-57346
+ Block bitmap at 57347 (+2), Inode bitmap at 57348 (+3)
+ Inode table at 57349-57860 (+4)
+ 7675 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 57861-65535
+ Free inodes: 14337-16384
diff --git a/tests/m_no_opt/script b/tests/m_no_opt/script
new file mode 100644
index 0000000..223f117
--- /dev/null
+++ b/tests/m_no_opt/script
@@ -0,0 +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
diff --git a/tests/m_offset/script b/tests/m_offset/script
new file mode 100755
index 0000000..d49e555
--- /dev/null
+++ b/tests/m_offset/script
@@ -0,0 +1,34 @@
+test_description="mke2fs with offset option (-E offset=N)"
+OUT="$test_name.log"
+
+echo "testing mke2fs with -E offset=524288 option (no fssize)" > "$OUT"
+yes a | $DD of="$TMPFILE" bs=1k count=2048 iflag=fullblock 2>>"$OUT"
+$MKE2FS -F -b 1024 -E offset=524288 "$TMPFILE" >> "$OUT" 2>&1
+# compute crc of the first 512 1k blocks
+crc_first1=`$DD if="$TMPFILE" bs=1k count=512 2>/dev/null | $CRCSUM`
+
+echo "testing mke2fs with -E offset=524288 option (explicit fssize)" >> "$OUT"
+yes a | $DD of="$TMPFILE" bs=1k count=2048 iflag=fullblock 2>>"$OUT"
+$MKE2FS -F -b 1024 -E offset=524288 "$TMPFILE" 1024 >> "$OUT" 2>&1
+# compute crc of the first and last 512 1k blocks
+crc_first2=`$DD if="$TMPFILE" bs=1k count=512 2>/dev/null | $CRCSUM`
+crc_last2=`$DD if="$TMPFILE" bs=1k count=512 skip=1536 2>/dev/null | $CRCSUM`
+crc_exp=`yes a | $DD bs=1k count=512 2>/dev/null | $CRCSUM`
+# a warning should be only emitted by the first mke2fs call
+warning=`grep -c "offset specified without an explicit file system size." \
+ "$OUT"`
+
+if [ "$warning" -eq 1 -a \
+ "$crc_first1" = "$crc_first2" -a \
+ "$crc_first2" = "$crc_last2" -a \
+ "$crc_first2" = "$crc_exp" ]; then
+ echo "$test_name: $test_description: ok"
+ touch "$test_name.ok"
+else
+ echo "$test_name: $test_description: failed"
+ echo "warning: $warning" > "$test_name.failed"
+ echo "crc_first1: $crc_first1" >> "$test_name.failed"
+ echo "crc_first2: $crc_first2" >> "$test_name.failed"
+ echo "crc_last2: $crc_last2" >> "$test_name.failed"
+ echo "crc_exp: $crc_exp" >> "$test_name.failed"
+fi
diff --git a/tests/m_quota/expect.1 b/tests/m_quota/expect.1
new file mode 100644
index 0000000..74e38ca
--- /dev/null
+++ b/tests/m_quota/expect.1
@@ -0,0 +1,161 @@
+Creating filesystem with 131072 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super quota project
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/32768 files (25.0% non-contiguous), 9805/131072 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super quota project
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 32768
+Block count: 131072
+Reserved block count: 6553
+Overhead clusters: 9773
+Free blocks: 121267
+Free inodes: 32756
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 256
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 512
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+User quota inode: 3
+Group quota inode: 4
+Project quota inode: 12
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-258
+ Block bitmap at 259 (+258), Inode bitmap at 260 (+259)
+ Inode table at 261-772 (+260)
+ 7388 free blocks, 2036 free inodes, 2 directories
+ Free blocks: 805-8192
+ Free inodes: 13-2048
+Group 1: (Blocks 8193-16384)
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Reserved GDT blocks at 8195-8450
+ Block bitmap at 8451 (+258), Inode bitmap at 8452 (+259)
+ Inode table at 8453-8964 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 8965-16384
+ Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16898 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 16899-24576
+ Free inodes: 4097-6144
+Group 3: (Blocks 24577-32768)
+ Backup superblock at 24577, Group descriptors at 24578-24578
+ Reserved GDT blocks at 24579-24834
+ Block bitmap at 24835 (+258), Inode bitmap at 24836 (+259)
+ Inode table at 24837-25348 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 25349-32768
+ Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-33282 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 33283-40960
+ Free inodes: 8193-10240
+Group 5: (Blocks 40961-49152)
+ Backup superblock at 40961, Group descriptors at 40962-40962
+ Reserved GDT blocks at 40963-41218
+ Block bitmap at 41219 (+258), Inode bitmap at 41220 (+259)
+ Inode table at 41221-41732 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 41733-49152
+ Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49666 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 49667-57344
+ Free inodes: 12289-14336
+Group 7: (Blocks 57345-65536)
+ Backup superblock at 57345, Group descriptors at 57346-57346
+ Reserved GDT blocks at 57347-57602
+ Block bitmap at 57603 (+258), Inode bitmap at 57604 (+259)
+ Inode table at 57605-58116 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 58117-65536
+ Free inodes: 14337-16384
+Group 8: (Blocks 65537-73728)
+ Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1)
+ Inode table at 65539-66050 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 66051-73728
+ Free inodes: 16385-18432
+Group 9: (Blocks 73729-81920)
+ Backup superblock at 73729, Group descriptors at 73730-73730
+ Reserved GDT blocks at 73731-73986
+ Block bitmap at 73987 (+258), Inode bitmap at 73988 (+259)
+ Inode table at 73989-74500 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 74501-81920
+ Free inodes: 18433-20480
+Group 10: (Blocks 81921-90112)
+ Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+ Inode table at 81923-82434 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 82435-90112
+ Free inodes: 20481-22528
+Group 11: (Blocks 90113-98304)
+ Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+ Inode table at 90115-90626 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 90627-98304
+ Free inodes: 22529-24576
+Group 12: (Blocks 98305-106496)
+ Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1)
+ Inode table at 98307-98818 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 98819-106496
+ Free inodes: 24577-26624
+Group 13: (Blocks 106497-114688)
+ Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+ Inode table at 106499-107010 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 107011-114688
+ Free inodes: 26625-28672
+Group 14: (Blocks 114689-122880)
+ Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+ Inode table at 114691-115202 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 115203-122880
+ Free inodes: 28673-30720
+Group 15: (Blocks 122881-131071)
+ Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+ Inode table at 122883-123394 (+2)
+ 7677 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 123395-131071
+ Free inodes: 30721-32768
diff --git a/tests/m_quota/script b/tests/m_quota/script
new file mode 100644
index 0000000..32a12b9
--- /dev/null
+++ b/tests/m_quota/script
@@ -0,0 +1,11 @@
+DESCRIPTION="enable quota feature on mkfs"
+FS_SIZE=131072
+MKE2FS_OPTS="-O quota,project -I 256"
+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
diff --git a/tests/m_raid_opt/expect.1 b/tests/m_raid_opt/expect.1
new file mode 100644
index 0000000..c1dc61b
--- /dev/null
+++ b/tests/m_raid_opt/expect.1
@@ -0,0 +1,841 @@
+Creating filesystem with 131072 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 1025, 3073, 5121, 7169, 9217, 25601, 27649, 50177, 82945, 128001
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 11334/131072 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 32768
+Block count: 131072
+Reserved block count: 6553
+Overhead clusters: 11320
+Free blocks: 119738
+Free inodes: 32757
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 256
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 256
+Inode blocks per group: 64
+RAID stride: 13
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptors at 2-5
+ Reserved GDT blocks at 6-261
+ Block bitmap at 326 (+325), Inode bitmap at 327 (+326)
+ Inode table at 262-325 (+261)
+ 683 free blocks, 245 free inodes, 2 directories
+ Free blocks: 342-1024
+ Free inodes: 12-256
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptors at 1026-1029
+ Reserved GDT blocks at 1030-1285
+ Block bitmap at 1363 (+338), Inode bitmap at 1364 (+339)
+ Inode table at 1286-1349 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 1350-1362, 1365-2048
+ Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2139 (+90), Inode bitmap at 2140 (+91)
+ Inode table at 2049-2112
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 2113-2138, 2141-3072
+ Free inodes: 513-768
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073, Group descriptors at 3074-3077
+ Reserved GDT blocks at 3078-3333
+ Block bitmap at 3437 (+364), Inode bitmap at 3438 (+365)
+ Inode table at 3334-3397 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 3398-3436, 3439-4096
+ Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4213 (+116), Inode bitmap at 4214 (+117)
+ Inode table at 4097-4160
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 4161-4212, 4215-5120
+ Free inodes: 1025-1280
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121, Group descriptors at 5122-5125
+ Reserved GDT blocks at 5126-5381
+ Block bitmap at 5511 (+390), Inode bitmap at 5512 (+391)
+ Inode table at 5382-5445 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 5446-5510, 5513-6144
+ Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6287 (+142), Inode bitmap at 6288 (+143)
+ Inode table at 6145-6208
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 6209-6286, 6289-7168
+ Free inodes: 1537-1792
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169, Group descriptors at 7170-7173
+ Reserved GDT blocks at 7174-7429
+ Block bitmap at 7585 (+416), Inode bitmap at 7586 (+417)
+ Inode table at 7430-7493 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 7494-7584, 7587-8192
+ Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8361 (+168), Inode bitmap at 8362 (+169)
+ Inode table at 8193-8256
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 8257-8360, 8363-9216
+ Free inodes: 2049-2304
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217, Group descriptors at 9218-9221
+ Reserved GDT blocks at 9222-9477
+ Block bitmap at 9659 (+442), Inode bitmap at 9660 (+443)
+ Inode table at 9478-9541 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 9542-9658, 9661-10240
+ Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10435 (+194), Inode bitmap at 10436 (+195)
+ Inode table at 10241-10304
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 10305-10434, 10437-11264
+ Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11472 (+207), Inode bitmap at 11473 (+208)
+ Inode table at 11265-11328
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 11329-11471, 11474-12288
+ Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12509 (+220), Inode bitmap at 12510 (+221)
+ Inode table at 12289-12352
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 12353-12508, 12511-13312
+ Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13546 (+233), Inode bitmap at 13547 (+234)
+ Inode table at 13313-13376
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 13377-13545, 13548-14336
+ Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14583 (+246), Inode bitmap at 14584 (+247)
+ Inode table at 14337-14400
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 14401-14582, 14585-15360
+ Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+ Block bitmap at 15620 (+259), Inode bitmap at 15621 (+260)
+ Inode table at 15361-15424
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 15425-15619, 15622-16384
+ Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+ Block bitmap at 16657 (+272), Inode bitmap at 16658 (+273)
+ Inode table at 16385-16448
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 16449-16656, 16659-17408
+ Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+ Block bitmap at 17694 (+285), Inode bitmap at 17695 (+286)
+ Inode table at 17409-17472
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 17473-17693, 17696-18432
+ Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+ Block bitmap at 18731 (+298), Inode bitmap at 18732 (+299)
+ Inode table at 18433-18496
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 18497-18730, 18733-19456
+ Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+ Block bitmap at 19768 (+311), Inode bitmap at 19769 (+312)
+ Inode table at 19457-19520
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 19521-19767, 19770-20480
+ Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+ Block bitmap at 20805 (+324), Inode bitmap at 20806 (+325)
+ Inode table at 20481-20544
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 20545-20804, 20807-21504
+ Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+ Block bitmap at 21842 (+337), Inode bitmap at 21843 (+338)
+ Inode table at 21505-21568
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 21569-21841, 21844-22528
+ Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+ Block bitmap at 22879 (+350), Inode bitmap at 22880 (+351)
+ Inode table at 22529-22592
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 22593-22878, 22881-23552
+ Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+ Block bitmap at 23916 (+363), Inode bitmap at 23917 (+364)
+ Inode table at 23553-23616
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 23617-23915, 23918-24576
+ Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+ Block bitmap at 24953 (+376), Inode bitmap at 24954 (+377)
+ Inode table at 24577-24640
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 24641-24952, 24955-25600
+ Free inodes: 6145-6400
+Group 25: (Blocks 25601-26624)
+ Backup superblock at 25601, Group descriptors at 25602-25605
+ Reserved GDT blocks at 25606-25861
+ Block bitmap at 26251 (+650), Inode bitmap at 26252 (+651)
+ Inode table at 25862-25925 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 25926-26250, 26253-26624
+ Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+ Block bitmap at 27027 (+402), Inode bitmap at 27028 (+403)
+ Inode table at 26625-26688
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 26689-27026, 27029-27648
+ Free inodes: 6657-6912
+Group 27: (Blocks 27649-28672)
+ Backup superblock at 27649, Group descriptors at 27650-27653
+ Reserved GDT blocks at 27654-27909
+ Block bitmap at 28325 (+676), Inode bitmap at 28326 (+677)
+ Inode table at 27910-27973 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 27974-28324, 28327-28672
+ Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+ Block bitmap at 29101 (+428), Inode bitmap at 29102 (+429)
+ Inode table at 28673-28736
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 28737-29100, 29103-29696
+ Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+ Block bitmap at 30138 (+441), Inode bitmap at 30139 (+442)
+ Inode table at 29697-29760
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 29761-30137, 30140-30720
+ Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+ Block bitmap at 31175 (+454), Inode bitmap at 31176 (+455)
+ Inode table at 30721-30784
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 30785-31174, 31177-31744
+ Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+ Block bitmap at 32212 (+467), Inode bitmap at 32213 (+468)
+ Inode table at 31745-31808
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 31809-32211, 32214-32768
+ Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+ Block bitmap at 33249 (+480), Inode bitmap at 33250 (+481)
+ Inode table at 32769-32832
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 32833-33248, 33251-33792
+ Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+ Block bitmap at 34286 (+493), Inode bitmap at 34287 (+494)
+ Inode table at 33793-33856
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 33857-34285, 34288-34816
+ Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+ Block bitmap at 35323 (+506), Inode bitmap at 35324 (+507)
+ Inode table at 34817-34880
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 34881-35322, 35325-35840
+ Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+ Block bitmap at 36360 (+519), Inode bitmap at 36361 (+520)
+ Inode table at 35841-35904
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 35905-36359, 36362-36864
+ Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+ Block bitmap at 37397 (+532), Inode bitmap at 37398 (+533)
+ Inode table at 36865-36928
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 36929-37396, 37399-37888
+ Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+ Block bitmap at 38434 (+545), Inode bitmap at 38435 (+546)
+ Inode table at 37889-37952
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 37953-38433, 38436-38912
+ Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+ Block bitmap at 39471 (+558), Inode bitmap at 39472 (+559)
+ Inode table at 38913-38976
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 38977-39470, 39473-39936
+ Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+ Block bitmap at 40508 (+571), Inode bitmap at 40509 (+572)
+ Inode table at 39937-40000
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 40001-40507, 40510-40960
+ Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+ Block bitmap at 41545 (+584), Inode bitmap at 41546 (+585)
+ Inode table at 40961-41024
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 41025-41544, 41547-41984
+ Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+ Block bitmap at 42582 (+597), Inode bitmap at 42583 (+598)
+ Inode table at 41985-42048
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 42049-42581, 42584-43008
+ Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+ Block bitmap at 43619 (+610), Inode bitmap at 43620 (+611)
+ Inode table at 43009-43072
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 43073-43618, 43621-44032
+ Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+ Block bitmap at 44656 (+623), Inode bitmap at 44657 (+624)
+ Inode table at 44033-44096
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 44097-44655, 44658-45056
+ Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+ Block bitmap at 45693 (+636), Inode bitmap at 45694 (+637)
+ Inode table at 45057-45120
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 45121-45692, 45695-46080
+ Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+ Block bitmap at 46730 (+649), Inode bitmap at 46731 (+650)
+ Inode table at 46081-46144
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 46145-46729, 46732-47104
+ Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+ Block bitmap at 47767 (+662), Inode bitmap at 47768 (+663)
+ Inode table at 47105-47168
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 47169-47766, 47769-48128
+ Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+ Block bitmap at 48804 (+675), Inode bitmap at 48805 (+676)
+ Inode table at 48129-48192
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 48193-48803, 48806-49152
+ Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+ Block bitmap at 49841 (+688), Inode bitmap at 49842 (+689)
+ Inode table at 49153-49216
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 49217-49840, 49843-50176
+ Free inodes: 12289-12544
+Group 49: (Blocks 50177-51200)
+ Backup superblock at 50177, Group descriptors at 50178-50181
+ Reserved GDT blocks at 50182-50437
+ Block bitmap at 51139 (+962), Inode bitmap at 51140 (+963)
+ Inode table at 50438-50501 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 50502-51138, 51141-51200
+ Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+ Block bitmap at 51915 (+714), Inode bitmap at 51916 (+715)
+ Inode table at 51201-51264
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 51265-51914, 51917-52224
+ Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+ Block bitmap at 52952 (+727), Inode bitmap at 52953 (+728)
+ Inode table at 52225-52288
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 52289-52951, 52954-53248
+ Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+ Block bitmap at 53989 (+740), Inode bitmap at 53990 (+741)
+ Inode table at 53249-53312
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 53313-53988, 53991-54272
+ Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+ Block bitmap at 55026 (+753), Inode bitmap at 55027 (+754)
+ Inode table at 54273-54336
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 54337-55025, 55028-55296
+ Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+ Block bitmap at 56063 (+766), Inode bitmap at 56064 (+767)
+ Inode table at 55297-55360
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 55361-56062, 56065-56320
+ Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+ Block bitmap at 57100 (+779), Inode bitmap at 57101 (+780)
+ Inode table at 56321-56384
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 56385-57099, 57102-57344
+ Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+ Block bitmap at 58137 (+792), Inode bitmap at 58138 (+793)
+ Inode table at 57345-57408
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 57409-58136, 58139-58368
+ Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+ Block bitmap at 59174 (+805), Inode bitmap at 59175 (+806)
+ Inode table at 58369-58432
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 58433-59173, 59176-59392
+ Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+ Block bitmap at 60211 (+818), Inode bitmap at 60212 (+819)
+ Inode table at 59393-59456
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 59457-60210, 60213-60416
+ Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+ Block bitmap at 61248 (+831), Inode bitmap at 61249 (+832)
+ Inode table at 60417-60480
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 60481-61247, 61250-61440
+ Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+ Block bitmap at 62285 (+844), Inode bitmap at 62286 (+845)
+ Inode table at 61441-61504
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 61505-62284, 62287-62464
+ Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+ Block bitmap at 63322 (+857), Inode bitmap at 63323 (+858)
+ Inode table at 62465-62528
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 62529-63321, 63324-63488
+ Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+ Block bitmap at 64359 (+870), Inode bitmap at 64360 (+871)
+ Inode table at 63489-63552
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 63553-64358, 64361-64512
+ Free inodes: 15873-16128
+Group 63: (Blocks 64513-65536)
+ Block bitmap at 65396 (+883), Inode bitmap at 65397 (+884)
+ Inode table at 64513-64576
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 64577-65395, 65398-65536
+ Free inodes: 16129-16384
+Group 64: (Blocks 65537-66560)
+ Block bitmap at 66433 (+896), Inode bitmap at 66434 (+897)
+ Inode table at 65537-65600
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 65601-66432, 66435-66560
+ Free inodes: 16385-16640
+Group 65: (Blocks 66561-67584)
+ Block bitmap at 67470 (+909), Inode bitmap at 67471 (+910)
+ Inode table at 66561-66624
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 66625-67469, 67472-67584
+ Free inodes: 16641-16896
+Group 66: (Blocks 67585-68608)
+ Block bitmap at 68507 (+922), Inode bitmap at 68508 (+923)
+ Inode table at 67585-67648
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 67649-68506, 68509-68608
+ Free inodes: 16897-17152
+Group 67: (Blocks 68609-69632)
+ Block bitmap at 69544 (+935), Inode bitmap at 69545 (+936)
+ Inode table at 68609-68672
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 68673-69543, 69546-69632
+ Free inodes: 17153-17408
+Group 68: (Blocks 69633-70656)
+ Block bitmap at 70581 (+948), Inode bitmap at 70582 (+949)
+ Inode table at 69633-69696
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 69697-70580, 70583-70656
+ Free inodes: 17409-17664
+Group 69: (Blocks 70657-71680)
+ Block bitmap at 71618 (+961), Inode bitmap at 71619 (+962)
+ Inode table at 70657-70720
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 70721-71617, 71620-71680
+ Free inodes: 17665-17920
+Group 70: (Blocks 71681-72704)
+ Block bitmap at 72655 (+974), Inode bitmap at 72656 (+975)
+ Inode table at 71681-71744
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 71745-72654, 72657-72704
+ Free inodes: 17921-18176
+Group 71: (Blocks 72705-73728)
+ Block bitmap at 73692 (+987), Inode bitmap at 73693 (+988)
+ Inode table at 72705-72768
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 72769-73691, 73694-73728
+ Free inodes: 18177-18432
+Group 72: (Blocks 73729-74752)
+ Block bitmap at 74729 (+1000), Inode bitmap at 74730 (+1001)
+ Inode table at 73729-73792
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 73793-74728, 74731-74752
+ Free inodes: 18433-18688
+Group 73: (Blocks 74753-75776)
+ Block bitmap at 75766 (+1013), Inode bitmap at 75767 (+1014)
+ Inode table at 74753-74816
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 74817-75765, 75768-75776
+ Free inodes: 18689-18944
+Group 74: (Blocks 75777-76800)
+ Block bitmap at 75843 (+66), Inode bitmap at 75844 (+67)
+ Inode table at 75777-75840
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 75841-75842, 75845-76800
+ Free inodes: 18945-19200
+Group 75: (Blocks 76801-77824)
+ Block bitmap at 76880 (+79), Inode bitmap at 76881 (+80)
+ Inode table at 76801-76864
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 76865-76879, 76882-77824
+ Free inodes: 19201-19456
+Group 76: (Blocks 77825-78848)
+ Block bitmap at 77917 (+92), Inode bitmap at 77918 (+93)
+ Inode table at 77825-77888
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 77889-77916, 77919-78848
+ Free inodes: 19457-19712
+Group 77: (Blocks 78849-79872)
+ Block bitmap at 78954 (+105), Inode bitmap at 78955 (+106)
+ Inode table at 78849-78912
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 78913-78953, 78956-79872
+ Free inodes: 19713-19968
+Group 78: (Blocks 79873-80896)
+ Block bitmap at 79991 (+118), Inode bitmap at 79992 (+119)
+ Inode table at 79873-79936
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 79937-79990, 79993-80896
+ Free inodes: 19969-20224
+Group 79: (Blocks 80897-81920)
+ Block bitmap at 81028 (+131), Inode bitmap at 81029 (+132)
+ Inode table at 80897-80960
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 80961-81027, 81030-81920
+ Free inodes: 20225-20480
+Group 80: (Blocks 81921-82944)
+ Block bitmap at 82065 (+144), Inode bitmap at 82066 (+145)
+ Inode table at 81921-81984
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 81985-82064, 82067-82944
+ Free inodes: 20481-20736
+Group 81: (Blocks 82945-83968)
+ Backup superblock at 82945, Group descriptors at 82946-82949
+ Reserved GDT blocks at 82950-83205
+ Block bitmap at 83624 (+679), Inode bitmap at 83625 (+680)
+ Inode table at 83206-83269 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 83270-83623, 83626-83968
+ Free inodes: 20737-20992
+Group 82: (Blocks 83969-84992)
+ Block bitmap at 84139 (+170), Inode bitmap at 84140 (+171)
+ Inode table at 83969-84032
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 84033-84138, 84141-84992
+ Free inodes: 20993-21248
+Group 83: (Blocks 84993-86016)
+ Block bitmap at 85176 (+183), Inode bitmap at 85177 (+184)
+ Inode table at 84993-85056
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 85057-85175, 85178-86016
+ Free inodes: 21249-21504
+Group 84: (Blocks 86017-87040)
+ Block bitmap at 86213 (+196), Inode bitmap at 86214 (+197)
+ Inode table at 86017-86080
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 86081-86212, 86215-87040
+ Free inodes: 21505-21760
+Group 85: (Blocks 87041-88064)
+ Block bitmap at 87250 (+209), Inode bitmap at 87251 (+210)
+ Inode table at 87041-87104
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 87105-87249, 87252-88064
+ Free inodes: 21761-22016
+Group 86: (Blocks 88065-89088)
+ Block bitmap at 88287 (+222), Inode bitmap at 88288 (+223)
+ Inode table at 88065-88128
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 88129-88286, 88289-89088
+ Free inodes: 22017-22272
+Group 87: (Blocks 89089-90112)
+ Block bitmap at 89324 (+235), Inode bitmap at 89325 (+236)
+ Inode table at 89089-89152
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 89153-89323, 89326-90112
+ Free inodes: 22273-22528
+Group 88: (Blocks 90113-91136)
+ Block bitmap at 90361 (+248), Inode bitmap at 90362 (+249)
+ Inode table at 90113-90176
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 90177-90360, 90363-91136
+ Free inodes: 22529-22784
+Group 89: (Blocks 91137-92160)
+ Block bitmap at 91398 (+261), Inode bitmap at 91399 (+262)
+ Inode table at 91137-91200
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 91201-91397, 91400-92160
+ Free inodes: 22785-23040
+Group 90: (Blocks 92161-93184)
+ Block bitmap at 92435 (+274), Inode bitmap at 92436 (+275)
+ Inode table at 92161-92224
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 92225-92434, 92437-93184
+ Free inodes: 23041-23296
+Group 91: (Blocks 93185-94208)
+ Block bitmap at 93472 (+287), Inode bitmap at 93473 (+288)
+ Inode table at 93185-93248
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 93249-93471, 93474-94208
+ Free inodes: 23297-23552
+Group 92: (Blocks 94209-95232)
+ Block bitmap at 94509 (+300), Inode bitmap at 94510 (+301)
+ Inode table at 94209-94272
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 94273-94508, 94511-95232
+ Free inodes: 23553-23808
+Group 93: (Blocks 95233-96256)
+ Block bitmap at 95546 (+313), Inode bitmap at 95547 (+314)
+ Inode table at 95233-95296
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 95297-95545, 95548-96256
+ Free inodes: 23809-24064
+Group 94: (Blocks 96257-97280)
+ Block bitmap at 96583 (+326), Inode bitmap at 96584 (+327)
+ Inode table at 96257-96320
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 96321-96582, 96585-97280
+ Free inodes: 24065-24320
+Group 95: (Blocks 97281-98304)
+ Block bitmap at 97620 (+339), Inode bitmap at 97621 (+340)
+ Inode table at 97281-97344
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 97345-97619, 97622-98304
+ Free inodes: 24321-24576
+Group 96: (Blocks 98305-99328)
+ Block bitmap at 98657 (+352), Inode bitmap at 98658 (+353)
+ Inode table at 98305-98368
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 98369-98656, 98659-99328
+ Free inodes: 24577-24832
+Group 97: (Blocks 99329-100352)
+ Block bitmap at 99694 (+365), Inode bitmap at 99695 (+366)
+ Inode table at 99329-99392
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 99393-99693, 99696-100352
+ Free inodes: 24833-25088
+Group 98: (Blocks 100353-101376)
+ Block bitmap at 100731 (+378), Inode bitmap at 100732 (+379)
+ Inode table at 100353-100416
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 100417-100730, 100733-101376
+ Free inodes: 25089-25344
+Group 99: (Blocks 101377-102400)
+ Block bitmap at 101768 (+391), Inode bitmap at 101769 (+392)
+ Inode table at 101377-101440
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 101441-101767, 101770-102400
+ Free inodes: 25345-25600
+Group 100: (Blocks 102401-103424)
+ Block bitmap at 102805 (+404), Inode bitmap at 102806 (+405)
+ Inode table at 102401-102464
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 102465-102804, 102807-103424
+ Free inodes: 25601-25856
+Group 101: (Blocks 103425-104448)
+ Block bitmap at 103842 (+417), Inode bitmap at 103843 (+418)
+ Inode table at 103425-103488
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 103489-103841, 103844-104448
+ Free inodes: 25857-26112
+Group 102: (Blocks 104449-105472)
+ Block bitmap at 104879 (+430), Inode bitmap at 104880 (+431)
+ Inode table at 104449-104512
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 104513-104878, 104881-105472
+ Free inodes: 26113-26368
+Group 103: (Blocks 105473-106496)
+ Block bitmap at 105916 (+443), Inode bitmap at 105917 (+444)
+ Inode table at 105473-105536
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 105537-105915, 105918-106496
+ Free inodes: 26369-26624
+Group 104: (Blocks 106497-107520)
+ Block bitmap at 106953 (+456), Inode bitmap at 106954 (+457)
+ Inode table at 106497-106560
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 106561-106952, 106955-107520
+ Free inodes: 26625-26880
+Group 105: (Blocks 107521-108544)
+ Block bitmap at 107990 (+469), Inode bitmap at 107991 (+470)
+ Inode table at 107521-107584
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 107585-107989, 107992-108544
+ Free inodes: 26881-27136
+Group 106: (Blocks 108545-109568)
+ Block bitmap at 109027 (+482), Inode bitmap at 109028 (+483)
+ Inode table at 108545-108608
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 108609-109026, 109029-109568
+ Free inodes: 27137-27392
+Group 107: (Blocks 109569-110592)
+ Block bitmap at 110064 (+495), Inode bitmap at 110065 (+496)
+ Inode table at 109569-109632
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 109633-110063, 110066-110592
+ Free inodes: 27393-27648
+Group 108: (Blocks 110593-111616)
+ Block bitmap at 111101 (+508), Inode bitmap at 111102 (+509)
+ Inode table at 110593-110656
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 110657-111100, 111103-111616
+ Free inodes: 27649-27904
+Group 109: (Blocks 111617-112640)
+ Block bitmap at 112138 (+521), Inode bitmap at 112139 (+522)
+ Inode table at 111617-111680
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 111681-112137, 112140-112640
+ Free inodes: 27905-28160
+Group 110: (Blocks 112641-113664)
+ Block bitmap at 113175 (+534), Inode bitmap at 113176 (+535)
+ Inode table at 112641-112704
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 112705-113174, 113177-113664
+ Free inodes: 28161-28416
+Group 111: (Blocks 113665-114688)
+ Block bitmap at 114212 (+547), Inode bitmap at 114213 (+548)
+ Inode table at 113665-113728
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 113729-114211, 114214-114688
+ Free inodes: 28417-28672
+Group 112: (Blocks 114689-115712)
+ Block bitmap at 115249 (+560), Inode bitmap at 115250 (+561)
+ Inode table at 114689-114752
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 114753-115248, 115251-115712
+ Free inodes: 28673-28928
+Group 113: (Blocks 115713-116736)
+ Block bitmap at 116286 (+573), Inode bitmap at 116287 (+574)
+ Inode table at 115713-115776
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 115777-116285, 116288-116736
+ Free inodes: 28929-29184
+Group 114: (Blocks 116737-117760)
+ Block bitmap at 117323 (+586), Inode bitmap at 117324 (+587)
+ Inode table at 116737-116800
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 116801-117322, 117325-117760
+ Free inodes: 29185-29440
+Group 115: (Blocks 117761-118784)
+ Block bitmap at 118360 (+599), Inode bitmap at 118361 (+600)
+ Inode table at 117761-117824
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 117825-118359, 118362-118784
+ Free inodes: 29441-29696
+Group 116: (Blocks 118785-119808)
+ Block bitmap at 119397 (+612), Inode bitmap at 119398 (+613)
+ Inode table at 118785-118848
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 118849-119396, 119399-119808
+ Free inodes: 29697-29952
+Group 117: (Blocks 119809-120832)
+ Block bitmap at 120434 (+625), Inode bitmap at 120435 (+626)
+ Inode table at 119809-119872
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 119873-120433, 120436-120832
+ Free inodes: 29953-30208
+Group 118: (Blocks 120833-121856)
+ Block bitmap at 121471 (+638), Inode bitmap at 121472 (+639)
+ Inode table at 120833-120896
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 120897-121470, 121473-121856
+ Free inodes: 30209-30464
+Group 119: (Blocks 121857-122880)
+ Block bitmap at 122508 (+651), Inode bitmap at 122509 (+652)
+ Inode table at 121857-121920
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 121921-122507, 122510-122880
+ Free inodes: 30465-30720
+Group 120: (Blocks 122881-123904)
+ Block bitmap at 123545 (+664), Inode bitmap at 123546 (+665)
+ Inode table at 122881-122944
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 122945-123544, 123547-123904
+ Free inodes: 30721-30976
+Group 121: (Blocks 123905-124928)
+ Block bitmap at 124582 (+677), Inode bitmap at 124583 (+678)
+ Inode table at 123905-123968
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 123969-124581, 124584-124928
+ Free inodes: 30977-31232
+Group 122: (Blocks 124929-125952)
+ Block bitmap at 125619 (+690), Inode bitmap at 125620 (+691)
+ Inode table at 124929-124992
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 124993-125618, 125621-125952
+ Free inodes: 31233-31488
+Group 123: (Blocks 125953-126976)
+ Block bitmap at 126656 (+703), Inode bitmap at 126657 (+704)
+ Inode table at 125953-126016
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 126017-126655, 126658-126976
+ Free inodes: 31489-31744
+Group 124: (Blocks 126977-128000)
+ Block bitmap at 127693 (+716), Inode bitmap at 127694 (+717)
+ Inode table at 126977-127040
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 127041-127692, 127695-128000
+ Free inodes: 31745-32000
+Group 125: (Blocks 128001-129024)
+ Backup superblock at 128001, Group descriptors at 128002-128005
+ Reserved GDT blocks at 128006-128261
+ Block bitmap at 128553 (+552), Inode bitmap at 128554 (+553)
+ Inode table at 128262-128325 (+261)
+ 697 free blocks, 256 free inodes, 0 directories
+ Free blocks: 128326-128552, 128555-129024
+ Free inodes: 32001-32256
+Group 126: (Blocks 129025-130048)
+ Block bitmap at 129767 (+742), Inode bitmap at 129768 (+743)
+ Inode table at 129025-129088
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 129089-129766, 129769-130048
+ Free inodes: 32257-32512
+Group 127: (Blocks 130049-131071)
+ Block bitmap at 130805 (+756), Inode bitmap at 130806 (+757)
+ Inode table at 130049-130112
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 130113-130804, 130807-131071
+ Free inodes: 32513-32768
diff --git a/tests/m_raid_opt/script b/tests/m_raid_opt/script
new file mode 100644
index 0000000..8c859e0
--- /dev/null
+++ b/tests/m_raid_opt/script
@@ -0,0 +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
diff --git a/tests/m_resize_inode_meta_bg/expect.1 b/tests/m_resize_inode_meta_bg/expect.1
new file mode 100644
index 0000000..7feaed9
--- /dev/null
+++ b/tests/m_resize_inode_meta_bg/expect.1
@@ -0,0 +1,172 @@
+Creating filesystem with 3840 4k blocks and 960 inodes
+Superblock backups stored on blocks:
+ 256, 768, 1280, 1792, 2304
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (1024 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/960 files (0.0% non-contiguous), 1127/3840 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 960
+Block count: 3840
+Reserved block count: 192
+Overhead clusters: 1122
+Free blocks: 2713
+Free inodes: 949
+First block: 0
+Block size: 4096
+Fragment size: 4096
+Group descriptor size: 64
+Blocks per group: 256
+Fragments per group: 256
+Inodes per group: 64
+Inode blocks per group: 4
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Journal features: (none)
+Total journal size: 4096k
+Total journal blocks: 1024
+Max transaction length: 1024
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+
+
+Group 0: (Blocks 0-255) [ITABLE_ZEROED]
+ Primary superblock at 0, Group descriptor at 1
+ Block bitmap at 2 (+2)
+ Inode bitmap at 17 (+17)
+ Inode table at 32-35 (+32)
+ 159 free blocks, 53 free inodes, 2 directories, 53 unused inodes
+ Free blocks: 97-255
+ Free inodes: 12-64
+Group 1: (Blocks 256-511) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 256, Group descriptor at 257
+ Block bitmap at 3 (bg #0 + 3)
+ Inode bitmap at 18 (bg #0 + 18)
+ Inode table at 36-39 (bg #0 + 36)
+ 254 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 258-511
+ Free inodes: 65-128
+Group 2: (Blocks 512-767) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 4 (bg #0 + 4)
+ Inode bitmap at 19 (bg #0 + 19)
+ Inode table at 40-43 (bg #0 + 40)
+ 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 512-767
+ Free inodes: 129-192
+Group 3: (Blocks 768-1023) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 768
+ Block bitmap at 5 (bg #0 + 5)
+ Inode bitmap at 20 (bg #0 + 20)
+ Inode table at 44-47 (bg #0 + 44)
+ 255 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 769-1023
+ Free inodes: 193-256
+Group 4: (Blocks 1024-1279) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 6 (bg #0 + 6)
+ Inode bitmap at 21 (bg #0 + 21)
+ Inode table at 48-51 (bg #0 + 48)
+ 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 1024-1279
+ Free inodes: 257-320
+Group 5: (Blocks 1280-1535) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 1280
+ Block bitmap at 7 (bg #0 + 7)
+ Inode bitmap at 22 (bg #0 + 22)
+ Inode table at 52-55 (bg #0 + 52)
+ 255 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 1281-1535
+ Free inodes: 321-384
+Group 6: (Blocks 1536-1791) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 8 (bg #0 + 8)
+ Inode bitmap at 23 (bg #0 + 23)
+ Inode table at 56-59 (bg #0 + 56)
+ 0 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks:
+ Free inodes: 385-448
+Group 7: (Blocks 1792-2047) [INODE_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 1792
+ Block bitmap at 9 (bg #0 + 9)
+ Inode bitmap at 24 (bg #0 + 24)
+ Inode table at 60-63 (bg #0 + 60)
+ 0 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks:
+ Free inodes: 449-512
+Group 8: (Blocks 2048-2303) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 10 (bg #0 + 10)
+ Inode bitmap at 25 (bg #0 + 25)
+ Inode table at 64-67 (bg #0 + 64)
+ 0 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks:
+ Free inodes: 513-576
+Group 9: (Blocks 2304-2559) [INODE_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 2304
+ Block bitmap at 11 (bg #0 + 11)
+ Inode bitmap at 26 (bg #0 + 26)
+ Inode table at 68-71 (bg #0 + 68)
+ 0 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks:
+ Free inodes: 577-640
+Group 10: (Blocks 2560-2815) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 12 (bg #0 + 12)
+ Inode bitmap at 27 (bg #0 + 27)
+ Inode table at 72-75 (bg #0 + 72)
+ 254 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 2562-2815
+ Free inodes: 641-704
+Group 11: (Blocks 2816-3071) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 13 (bg #0 + 13)
+ Inode bitmap at 28 (bg #0 + 28)
+ Inode table at 76-79 (bg #0 + 76)
+ 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 2816-3071
+ Free inodes: 705-768
+Group 12: (Blocks 3072-3327) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 14 (bg #0 + 14)
+ Inode bitmap at 29 (bg #0 + 29)
+ Inode table at 80-83 (bg #0 + 80)
+ 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 3072-3327
+ Free inodes: 769-832
+Group 13: (Blocks 3328-3583) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 15 (bg #0 + 15)
+ Inode bitmap at 30 (bg #0 + 30)
+ Inode table at 84-87 (bg #0 + 84)
+ 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 3328-3583
+ Free inodes: 833-896
+Group 14: (Blocks 3584-3839) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 16 (bg #0 + 16)
+ Inode bitmap at 31 (bg #0 + 31)
+ Inode table at 88-91 (bg #0 + 88)
+ 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes
+ Free blocks: 3584-3839
+ Free inodes: 897-960
diff --git a/tests/m_resize_inode_meta_bg/script b/tests/m_resize_inode_meta_bg/script
new file mode 100644
index 0000000..41ffb32
--- /dev/null
+++ b/tests/m_resize_inode_meta_bg/script
@@ -0,0 +1,7 @@
+DESCRIPTION="resize_inode and meta_bg enabled"
+FS_SIZE=15360
+MKE2FS_DEVICE_SECTSIZE=4096
+export MKE2FS_DEVICE_SECTSIZE
+MKE2FS_OPTS="-T ext4 -g256 -O 64bit"
+. $cmd_dir/run_mke2fs
+unset MKE2FS_DEVICE_SECTSIZE
diff --git a/tests/m_root_owner/expect.1 b/tests/m_root_owner/expect.1
new file mode 100644
index 0000000..3b9e3ee
--- /dev/null
+++ b/tests/m_root_owner/expect.1
@@ -0,0 +1,57 @@
+Creating filesystem with 1024 1k blocks and 128 inodes
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/128 files (0.0% non-contiguous), 54/1024 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 128
+Block count: 1024
+Reserved block count: 51
+Overhead clusters: 40
+Free blocks: 970
+Free inodes: 117
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 3
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 128
+Inode blocks per group: 32
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+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)
+ Inode table at 8-39 (+7)
+ 970 free blocks, 117 free inodes, 2 directories
+ Free blocks: 54-1023
+ Free inodes: 12-128
diff --git a/tests/m_root_owner/script b/tests/m_root_owner/script
new file mode 100644
index 0000000..02c5ef6
--- /dev/null
+++ b/tests/m_root_owner/script
@@ -0,0 +1,4 @@
+DESCRIPTION="root directory owner"
+FS_SIZE=1024
+MKE2FS_OPTS="-E root_owner=1234:1234"
+. $cmd_dir/run_mke2fs
diff --git a/tests/m_rootdir/expect b/tests/m_rootdir/expect
new file mode 100644
index 0000000..dbc7977
--- /dev/null
+++ b/tests/m_rootdir/expect
@@ -0,0 +1,120 @@
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super huge_file dir_nlink extra_isize metadata_csum
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 1024
+Block count: 16384
+Reserved block count: 819
+Overhead clusters: 1543
+Free blocks: 14786
+Free inodes: 1005
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Group descriptor size: 64
+Reserved GDT blocks: 127
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 512
+Inode blocks per group: 128
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Checksum type: crc32c
+Journal features: (none)
+Total journal size: 1024k
+Total journal blocks: 1024
+Max transaction length: 1024
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-129
+ Block bitmap at 130 (+129)
+ Inode bitmap at 132 (+131)
+ Inode table at 134-261 (+133)
+ 7748 free blocks, 493 free inodes, 4 directories, 493 unused inodes
+ Free blocks: 445-8192
+ Free inodes: 20-512
+Group 1: (Blocks 8193-16383) [INODE_UNINIT]
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Reserved GDT blocks at 8195-8321
+ Block bitmap at 131 (bg #0 + 130)
+ Inode bitmap at 133 (bg #0 + 132)
+ Inode table at 262-389 (bg #0 + 261)
+ 7038 free blocks, 512 free inodes, 0 directories, 512 unused inodes
+ Free blocks: 9346-16383
+ Free inodes: 513-1024
+debugfs: stat /emptyfile
+Inode: III Type: regular
+Size: 0
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /bigfile
+Inode: III Type: regular
+Size: 32768
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /sparsefile
+Inode: III Type: regular
+Size: 1073741825
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /bigzerofile
+Inode: III Type: regular
+Size: 1073741825
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /fifo
+debugfs: stat /emptydir
+Inode: III Type: directory
+Size: 1024
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /dir
+Inode: III Type: directory
+Size: 1024
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /dir/file
+Inode: III Type: regular
+Size: 8
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: ex /emptyfile
+Level Entries Logical Physical Length Flags
+debugfs: ex /bigfile
+Level Entries Logical Physical Length Flags
+X 0/0 1/1 0-31 AAA-BBB 32
+debugfs: ex /sparsefile
+Level Entries Logical Physical Length Flags
+Y 0/1 1/1 1-1048576 AAA 1048576
+X 1/1 1/5 1-1 AAA-BBB 1
+X 1/1 2/5 512-512 AAA-BBB 1
+X 1/1 3/5 1024-1024 AAA-BBB 1
+X 1/1 4/5 524288-524288 AAA-BBB 1
+X 1/1 5/5 1048576-1048576 AAA-BBB 1
+debugfs: ex /bigzerofile
+Level Entries Logical Physical Length Flags
+debugfs: ex /dir
+Level Entries Logical Physical Length Flags
+X 0/0 1/1 0-0 AAA-BBB 1
+debugfs: ex /dir/file
+Level Entries Logical Physical Length Flags
+X 0/0 1/1 0-0 AAA-BBB 1
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test.img: 19/1024 files (0.0% non-contiguous), 1598/16384 blocks
diff --git a/tests/m_rootdir/output.sed b/tests/m_rootdir/output.sed
new file mode 100644
index 0000000..2e76967
--- /dev/null
+++ b/tests/m_rootdir/output.sed
@@ -0,0 +1,5 @@
+s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*-[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/X \1\/\2 \3\/\4 \5-\6 AAA-BBB \7/g
+s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/Y \1\/\2 \3\/\4 \5-\6 AAA \7/g
+s/Mode:.*$//g
+s/User:.*Size:/Size:/g
+s/^Inode: [0-9]*/Inode: III/g
diff --git a/tests/m_rootdir/script b/tests/m_rootdir/script
new file mode 100644
index 0000000..2e54ae1
--- /dev/null
+++ b/tests/m_rootdir/script
@@ -0,0 +1,70 @@
+test_description="create fs image from dir"
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+MKFS_DIR=$TMPFILE.dir
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+rm -rf $MKFS_DIR
+mkdir -p $MKFS_DIR
+touch $MKFS_DIR/emptyfile
+dd if=/dev/zero bs=1024 count=32 2> /dev/null | tr '\0' 'a' > $MKFS_DIR/bigfile
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1024 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=524288 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1048576 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=536870912 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1073741824 conv=notrunc 2> /dev/null
+dd if=/dev/zero of=$MKFS_DIR/bigzerofile bs=1 count=1 seek=1073741824 2> /dev/null
+ln $MKFS_DIR/bigzerofile $MKFS_DIR/bigzerofile_hardlink
+ln -s /silly_bs_link $MKFS_DIR/silly_bs_link
+mkdir $MKFS_DIR/emptydir
+mkdir $MKFS_DIR/dir
+echo "Test me" > $MKFS_DIR/dir/file
+
+$MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d $MKFS_DIR $TMPFILE 16384 > $OUT 2>&1
+
+$DUMPE2FS $TMPFILE >> $OUT 2>&1
+cat > $TMPFILE.cmd << ENDL
+stat /emptyfile
+stat /bigfile
+stat /sparsefile
+stat /bigzerofile
+stat /fifo
+stat /emptydir
+stat /dir
+stat /dir/file
+ENDL
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | egrep "(stat|Size:|Type:)" >> $OUT
+
+cat > $TMPFILE.cmd << ENDL
+ex /emptyfile
+ex /bigfile
+ex /sparsefile
+ex /bigzerofile
+ex /dir
+ex /dir/file
+ENDL
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT 2>&1
+
+$FSCK -f -n $TMPFILE >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed -f $test_dir/output.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp
+mv $OUT.tmp $OUT
+
+# Do the verification
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm -rf $TMPFILE.cmd $MKFS_DIR
+unset MKFS_DIR OUT EXP
diff --git a/tests/m_rootdir_acl/expect b/tests/m_rootdir_acl/expect
new file mode 100644
index 0000000..57f03e5
--- /dev/null
+++ b/tests/m_rootdir_acl/expect
@@ -0,0 +1,119 @@
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg inline_data sparse_super huge_file dir_nlink extra_isize metadata_csum
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 1024
+Block count: 16384
+Reserved block count: 819
+Overhead clusters: 1799
+Free blocks: 14533
+Free inodes: 1003
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Group descriptor size: 64
+Reserved GDT blocks: 127
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 512
+Inode blocks per group: 256
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 512
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Checksum type: crc32c
+Journal features: (none)
+Total journal size: 1024k
+Total journal blocks: 1024
+Max transaction length: 1024
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-129
+ Block bitmap at 130 (+129)
+ Inode bitmap at 132 (+131)
+ Inode table at 134-389 (+133)
+ 7495 free blocks, 491 free inodes, 5 directories, 491 unused inodes
+ Free blocks: 698-8192
+ Free inodes: 22-512
+Group 1: (Blocks 8193-16383) [INODE_UNINIT]
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Reserved GDT blocks at 8195-8321
+ Block bitmap at 131 (bg #0 + 130)
+ Inode bitmap at 133 (bg #0 + 132)
+ Inode table at 390-645 (bg #0 + 389)
+ 7038 free blocks, 512 free inodes, 0 directories, 512 unused inodes
+ Free blocks: 9346-16383
+ Free inodes: 513-1024
+debugfs: stat /emptyfile
+Inode: III Type: regular
+Size: 0
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /bigfile
+Inode: III Type: regular
+Size: 32768
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /sparsefile
+Inode: III Type: regular
+Size: 1073741825
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /bigzerofile
+Inode: III Type: regular
+Size: 1073741825
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /fifo
+debugfs: stat /emptydir
+Inode: III Type: directory
+Size: 60
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /dir
+Inode: III Type: directory
+Size: 60
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /dir/file
+Inode: III Type: regular
+Size: 8
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /acl_dir
+Inode: III Type: directory
+Size: 60
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: stat /acl_dir/file
+Inode: III Type: regular
+Size: 10
+Fragment: Address: 0 Number: 0 Size: 0
+debugfs: ea_list dir/file
+Extended attributes:
+ system.data (0)
+debugfs: ea_list acl_dir
+Extended attributes:
+ system.data (0)
+ system.posix_acl_access (28) = 01 00 00 00 01 00 07 00 04 00 05 00 08 00 05 00 2a 00 00 00 10 00 05 00 20 00 05 00
+ system.posix_acl_default (28) = 01 00 00 00 01 00 07 00 04 00 05 00 08 00 05 00 04 00 00 00 10 00 05 00 20 00 05 00
+debugfs: ea_list acl_dir/file
+Extended attributes:
+ system.data (0)
+ system.posix_acl_access (28) = 01 00 00 00 01 00 07 00 04 00 05 00 08 00 05 00 2a 00 00 00 10 00 05 00 20 00 05 00
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test.img: 21/1024 files (0.0% non-contiguous), 1851/16384 blocks
diff --git a/tests/m_rootdir_acl/output.sed b/tests/m_rootdir_acl/output.sed
new file mode 100644
index 0000000..2e76967
--- /dev/null
+++ b/tests/m_rootdir_acl/output.sed
@@ -0,0 +1,5 @@
+s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*-[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/X \1\/\2 \3\/\4 \5-\6 AAA-BBB \7/g
+s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/Y \1\/\2 \3\/\4 \5-\6 AAA \7/g
+s/Mode:.*$//g
+s/User:.*Size:/Size:/g
+s/^Inode: [0-9]*/Inode: III/g
diff --git a/tests/m_rootdir_acl/script b/tests/m_rootdir_acl/script
new file mode 100644
index 0000000..a00e4c4
--- /dev/null
+++ b/tests/m_rootdir_acl/script
@@ -0,0 +1,110 @@
+test_description="create fs image from dir using inline_data and acls"
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+if ! setfacl --help > /dev/null 2>&1 ; then
+ echo "$test_name: $test_description: skipped (no setfacl)"
+ return 0
+fi
+
+os=$(uname -s)
+if [ "$os" = "GNU" ]; then
+ # requires Posix ACL support
+ echo "$test_name: $test_description: skipped for $os"
+ return 0
+fi
+
+MKFS_DIR=$(mktemp -d ./$test_name-XXXXXX.tmp)
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+touch $MKFS_DIR/emptyfile
+dd if=/dev/zero bs=1024 count=32 2> /dev/null | tr '\0' 'a' > $MKFS_DIR/bigfile
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1024 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=524288 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1048576 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=536870912 conv=notrunc 2> /dev/null
+echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1073741824 conv=notrunc 2> /dev/null
+dd if=/dev/zero of=$MKFS_DIR/bigzerofile bs=1 count=1 seek=1073741824 2> /dev/null
+ln $MKFS_DIR/bigzerofile $MKFS_DIR/bigzerofile_hardlink
+ln -s /silly_bs_link $MKFS_DIR/silly_bs_link
+mkdir $MKFS_DIR/emptydir
+mkdir $MKFS_DIR/dir
+echo "Test me" > $MKFS_DIR/dir/file
+mkdir $MKFS_DIR/acl_dir
+echo "Test me 2" > $MKFS_DIR/acl_dir/file
+
+setfacl --restore=- <<EOF
+# file: $MKFS_DIR/acl_dir
+user::rwx
+group::r-x
+group:42:r-x
+mask::r-x
+other::r-x
+default:user::rwx
+default:group::r-x
+default:group:4:r-x
+default:mask::r-x
+default:other::r-x
+EOF
+setfacl --restore=- <<EOF
+# file: $MKFS_DIR/acl_dir/file
+user::rwx
+group::r-x
+group:42:r-x
+mask::r-x
+other::r-x
+EOF
+
+if ! getfattr -d -m - $MKFS_DIR/acl_dir | grep -q posix_acl; then
+ echo "$test_name: $test_description: skipped (no posix_acl xattrs)"
+ rm -rf $MKFS_DIR
+ return 0
+fi
+
+# use 512-byte inodes so with/out security.selinux xattr doesn't fail
+$MKE2FS -q -F -o Linux -T ext4 -I 512 -O metadata_csum,inline_data,64bit -E lazy_itable_init=1 -b 1024 -d $MKFS_DIR $TMPFILE 16384 > $OUT 2>&1
+
+$DUMPE2FS $TMPFILE >> $OUT 2>&1
+cat > $TMPFILE.cmd << ENDL
+stat /emptyfile
+stat /bigfile
+stat /sparsefile
+stat /bigzerofile
+stat /fifo
+stat /emptydir
+stat /dir
+stat /dir/file
+stat /acl_dir
+stat /acl_dir/file
+ENDL
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | egrep "(stat|Size:|Type:)" >> $OUT
+
+cat > $TMPFILE.cmd << ENDL
+ea_list dir/file
+ea_list acl_dir
+ea_list acl_dir/file
+ENDL
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT 2>&1
+
+$FSCK -f -n $TMPFILE >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed -f $test_dir/output.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp
+mv $OUT.tmp $OUT
+
+# Do the verification
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm -rf $TMPFILE.cmd $MKFS_DIR
+unset MKFS_DIR OUT EXP
diff --git a/tests/m_std/expect.1 b/tests/m_std/expect.1
new file mode 100644
index 0000000..e1d1845
--- /dev/null
+++ b/tests/m_std/expect.1
@@ -0,0 +1,108 @@
+Creating filesystem with 65536 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5412/65536 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 16384
+Block count: 65536
+Reserved block count: 3276
+Overhead clusters: 5398
+Free blocks: 60124
+Free inodes: 16373
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 255
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 512
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-257
+ Block bitmap at 258 (+257), Inode bitmap at 259 (+258)
+ Inode table at 260-771 (+259)
+ 7407 free blocks, 2037 free inodes, 2 directories
+ Free blocks: 786-8192
+ Free inodes: 12-2048
+Group 1: (Blocks 8193-16384)
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Reserved GDT blocks at 8195-8449
+ Block bitmap at 8450 (+257), Inode bitmap at 8451 (+258)
+ Inode table at 8452-8963 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 8964-16384
+ Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16898 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 16899-24576
+ Free inodes: 4097-6144
+Group 3: (Blocks 24577-32768)
+ Backup superblock at 24577, Group descriptors at 24578-24578
+ Reserved GDT blocks at 24579-24833
+ Block bitmap at 24834 (+257), Inode bitmap at 24835 (+258)
+ Inode table at 24836-25347 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 25348-32768
+ Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-33282 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 33283-40960
+ Free inodes: 8193-10240
+Group 5: (Blocks 40961-49152)
+ Backup superblock at 40961, Group descriptors at 40962-40962
+ Reserved GDT blocks at 40963-41217
+ Block bitmap at 41218 (+257), Inode bitmap at 41219 (+258)
+ Inode table at 41220-41731 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 41732-49152
+ Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49666 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 49667-57344
+ Free inodes: 12289-14336
+Group 7: (Blocks 57345-65535)
+ Backup superblock at 57345, Group descriptors at 57346-57346
+ Reserved GDT blocks at 57347-57601
+ Block bitmap at 57602 (+257), Inode bitmap at 57603 (+258)
+ Inode table at 57604-58115 (+259)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 58116-65535
+ Free inodes: 14337-16384
diff --git a/tests/m_std/script b/tests/m_std/script
new file mode 100644
index 0000000..61c50c7
--- /dev/null
+++ b/tests/m_std/script
@@ -0,0 +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
diff --git a/tests/m_uninit/expect.1 b/tests/m_uninit/expect.1
new file mode 100644
index 0000000..3c28755
--- /dev/null
+++ b/tests/m_uninit/expect.1
@@ -0,0 +1,158 @@
+Creating filesystem with 131072 1k blocks and 32768 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_bg
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (0.0% non-contiguous), 9787/131072 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_bg
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 32768
+Block count: 131072
+Reserved block count: 6553
+Overhead clusters: 9773
+Free blocks: 121285
+Free inodes: 32757
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 256
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 512
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-8192) [ITABLE_ZEROED]
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-258
+ Block bitmap at 259 (+258), Inode bitmap at 260 (+259)
+ Inode table at 261-772 (+260)
+ 7406 free blocks, 2037 free inodes, 2 directories, 2037 unused inodes
+ Free blocks: 787-8192
+ Free inodes: 12-2048
+Group 1: (Blocks 8193-16384) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Reserved GDT blocks at 8195-8450
+ Block bitmap at 8451 (+258), Inode bitmap at 8452 (+259)
+ Inode table at 8453-8964 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 8965-16384
+ Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16898 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 16899-24576
+ Free inodes: 4097-6144
+Group 3: (Blocks 24577-32768) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 24577, Group descriptors at 24578-24578
+ Reserved GDT blocks at 24579-24834
+ Block bitmap at 24835 (+258), Inode bitmap at 24836 (+259)
+ Inode table at 24837-25348 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 25349-32768
+ Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-33282 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 33283-40960
+ Free inodes: 8193-10240
+Group 5: (Blocks 40961-49152) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 40961, Group descriptors at 40962-40962
+ Reserved GDT blocks at 40963-41218
+ Block bitmap at 41219 (+258), Inode bitmap at 41220 (+259)
+ Inode table at 41221-41732 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 41733-49152
+ Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49666 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 49667-57344
+ Free inodes: 12289-14336
+Group 7: (Blocks 57345-65536) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 57345, Group descriptors at 57346-57346
+ Reserved GDT blocks at 57347-57602
+ Block bitmap at 57603 (+258), Inode bitmap at 57604 (+259)
+ Inode table at 57605-58116 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 58117-65536
+ Free inodes: 14337-16384
+Group 8: (Blocks 65537-73728) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1)
+ Inode table at 65539-66050 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 66051-73728
+ Free inodes: 16385-18432
+Group 9: (Blocks 73729-81920) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 73729, Group descriptors at 73730-73730
+ Reserved GDT blocks at 73731-73986
+ Block bitmap at 73987 (+258), Inode bitmap at 73988 (+259)
+ Inode table at 73989-74500 (+260)
+ 7420 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 74501-81920
+ Free inodes: 18433-20480
+Group 10: (Blocks 81921-90112) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+ Inode table at 81923-82434 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 82435-90112
+ Free inodes: 20481-22528
+Group 11: (Blocks 90113-98304) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+ Inode table at 90115-90626 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 90627-98304
+ Free inodes: 22529-24576
+Group 12: (Blocks 98305-106496) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1)
+ Inode table at 98307-98818 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 98819-106496
+ Free inodes: 24577-26624
+Group 13: (Blocks 106497-114688) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+ Inode table at 106499-107010 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 107011-114688
+ Free inodes: 26625-28672
+Group 14: (Blocks 114689-122880) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+ Inode table at 114691-115202 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 115203-122880
+ Free inodes: 28673-30720
+Group 15: (Blocks 122881-131071) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+ Inode table at 122883-123394 (+2)
+ 7677 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 123395-131071
+ Free inodes: 30721-32768
diff --git a/tests/m_uninit/script b/tests/m_uninit/script
new file mode 100644
index 0000000..d4d373a
--- /dev/null
+++ b/tests/m_uninit/script
@@ -0,0 +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
diff --git a/tests/mke2fs.conf.in b/tests/mke2fs.conf.in
new file mode 100644
index 0000000..9075c6c
--- /dev/null
+++ b/tests/mke2fs.conf.in
@@ -0,0 +1,43 @@
+[defaults]
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
+ blocksize = 4096
+ inode_size = 256
+ inode_ratio = 16384
+ reserved_ratio = 5.0
+ enable_periodic_fsck = true
+ lazy_itable_init = false
+ no_discard = true
+ default_mntopts = ^acl
+ creator_os = Linux
+
+[fs_types]
+ ext3 = {
+ features = has_journal
+ }
+ ext4 = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+ }
+ small = {
+ blocksize = 1024
+ inode_ratio = 4096
+ }
+ floppy = {
+ blocksize = 1024
+ inode_ratio = 8192
+ }
+ news = {
+ inode_ratio = 4096
+ }
+ largefile = {
+ inode_ratio = 1048576
+ blocksize = 4096
+ }
+ largefile4 = {
+ inode_ratio = 4194304
+ blocksize = 4096
+ }
+ hurd = {
+ blocksize = 4096
+ inode_size = 128
+ warn_y2038_dates = 0
+ }
diff --git a/tests/progs/Makefile.in b/tests/progs/Makefile.in
new file mode 100644
index 0000000..e1325c6
--- /dev/null
+++ b/tests/progs/Makefile.in
@@ -0,0 +1,83 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = tests/progs
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+@MCONFIG@
+
+MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir)/../../lib/ss ../../lib/ss/mk_cmds
+
+PROGS= test_icount crcsum
+
+TEST_REL_OBJS= test_rel.o test_rel_cmds.o
+
+TEST_ICOUNT_OBJS= test_icount.o test_icount_cmds.o
+
+SRCS= $(srcdir)/test_rel.c
+
+LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS)
+DEPLIBS= $(LIBEXT2FS) $(DEPLIBSS) $(DEPLIBCOM_ERR)
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+
+all:: $(PROGS)
+
+test_rel: $(TEST_REL_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) -o test_rel $(TEST_REL_OBJS) $(LIBS)
+
+crcsum: crcsum.o $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) -o crcsum crcsum.o $(LIBS)
+
+test_rel_cmds.c: test_rel_cmds.ct
+ $(E) " MK_CMDS $@"
+ $(Q) $(MK_CMDS) $(srcdir)/test_rel_cmds.ct
+
+test_icount: $(TEST_ICOUNT_OBJS) $(DEPLIBS)
+ $(E) " LD $@"
+ $(Q) $(LD) $(ALL_LDFLAGS) -o test_icount $(TEST_ICOUNT_OBJS) $(LIBS)
+
+test_icount_cmds.c: test_icount_cmds.ct
+ $(E) " MK_CMDS $@"
+ $(Q) $(MK_CMDS) $(srcdir)/test_icount_cmds.ct
+
+clean::
+ $(RM) -f $(PROGS) test_rel_cmds.c test_icount_cmds.c \
+ \#* *.s *.o *.a *~ core
+
+install:
+
+install-strip:
+
+uninstall:
+
+mostlyclean: clean
+distclean: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+test_rel.o: $(srcdir)/test_rel.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/irel.h \
+ $(top_srcdir)/lib/ext2fs/brel.h $(srcdir)/test_rel.h
diff --git a/tests/progs/crcsum.c b/tests/progs/crcsum.c
new file mode 100644
index 0000000..193bf0a
--- /dev/null
+++ b/tests/progs/crcsum.c
@@ -0,0 +1,67 @@
+/*
+ * crcsum.c
+ *
+ * Copyright (C) 2013 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <fcntl.h>
+
+#include "et/com_err.h"
+#include "ss/ss.h"
+#include "ext2fs/ext2fs.h"
+
+
+int main(int argc, char **argv)
+{
+ int c;
+ uint32_t crc = ~0;
+ uint32_t (*csum_func)(uint32_t crc, unsigned char const *p,
+ size_t len);
+ FILE *f;
+
+ csum_func = ext2fs_crc32c_le;
+
+ while ((c = getopt (argc, argv, "h")) != EOF) {
+ switch (c) {
+ case 'h':
+ default:
+ com_err(argv[0], 0, "Usage: crcsum [file]\n");
+ return 1;
+ }
+ }
+
+ if (optind == argc)
+ f = stdin;
+ else {
+ f = fopen(argv[optind], "r");
+ if (!f) {
+ com_err(argv[0], errno, "while trying to open %s\n",
+ argv[optind]);
+ exit(1);
+ }
+ }
+
+ while (!feof(f)) {
+ unsigned char buf[4096];
+ int cnt = fread(buf, 1, sizeof(buf), f);
+
+ if (cnt)
+ crc = csum_func(crc, buf, cnt);
+ }
+ printf("%u\n", crc);
+ return 0;
+}
diff --git a/tests/progs/hold_inode.c b/tests/progs/hold_inode.c
new file mode 100644
index 0000000..792aa71
--- /dev/null
+++ b/tests/progs/hold_inode.c
@@ -0,0 +1,48 @@
+/*
+ * hold_inode.c --- test program which holds an inode or directory
+ * open.
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <unistd.h>
+#include <stdio.h>
+#include <dirent.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+
+main(int argc, char **argv)
+{
+ struct stat statbuf;
+ char *filename;
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s dir\n", argv[0]);
+ exit(1);
+ }
+ filename = argv[1];
+ if (stat(filename, &statbuf) < 0) {
+ perror(filename);
+ exit(1);
+ }
+ if (S_ISDIR(statbuf.st_mode)) {
+ if (!opendir(filename)) {
+ perror(filename);
+ exit(1);
+ }
+ } else {
+ if (open(filename, O_RDONLY) < 0) {
+ perror(filename);
+ exit(1);
+ }
+ }
+ sleep(30);
+}
diff --git a/tests/progs/random_exercise.c b/tests/progs/random_exercise.c
new file mode 100644
index 0000000..38217ab
--- /dev/null
+++ b/tests/progs/random_exercise.c
@@ -0,0 +1,171 @@
+/*
+ * random_exercise.c --- Test program which exercises an ext2
+ * filesystem. It creates a lot of random files in the current
+ * directory, while holding some files open while they are being
+ * deleted. This exercises the orphan list code, as well as
+ * creating lots of fodder for the ext3 journal.
+ *
+ * Copyright (C) 2000 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#define MAXFDS 128
+
+struct state {
+ char name[16];
+ int state;
+ int isdir;
+};
+
+#define STATE_CLEAR 0
+#define STATE_CREATED 1
+#define STATE_DELETED 2
+
+struct state state_array[MAXFDS];
+
+#define DATA_SIZE 65536
+
+char data_buffer[DATA_SIZE];
+
+void clear_state_array()
+{
+ int i;
+
+ for (i = 0; i < MAXFDS; i++)
+ state_array[i].state = STATE_CLEAR;
+}
+
+int get_random_fd()
+{
+ int fd;
+
+ while (1) {
+ fd = ((int) random()) % MAXFDS;
+ if (fd > 2)
+ return fd;
+ }
+}
+
+unsigned int get_inode_num(int fd)
+{
+ struct stat st;
+
+ if (fstat(fd, &st) < 0) {
+ perror("fstat");
+ return 0;
+ }
+ return st.st_ino;
+}
+
+
+void create_random_file()
+{
+ char template[16] = "EX.XXXXXX";
+ int fd;
+ int isdir = 0;
+ int size;
+
+ mktemp(template);
+ isdir = random() & 1;
+ if (isdir) {
+ if (mkdir(template, 0700) < 0)
+ return;
+ fd = open(template, O_RDONLY, 0600);
+ printf("Created temp directory %s, fd = %d\n",
+ template, fd);
+ } else {
+ size = random() & (DATA_SIZE-1);
+ fd = open(template, O_CREAT|O_RDWR, 0600);
+ write(fd, data_buffer, size);
+ printf("Created temp file %s, fd = %d, size=%d\n",
+ template, fd, size);
+ }
+ state_array[fd].isdir = isdir;
+ if (fd < 0)
+ return;
+ state_array[fd].isdir = isdir;
+ state_array[fd].state = STATE_CREATED;
+ strcpy(state_array[fd].name, template);
+}
+
+void truncate_file(int fd)
+{
+ int size;
+
+ size = random() & (DATA_SIZE-1);
+
+ if (state_array[fd].isdir)
+ return;
+
+ ftruncate(fd, size);
+ printf("Truncating temp file %s, fd = %d, ino=%u, size=%d\n",
+ state_array[fd].name, fd, get_inode_num(fd), size);
+}
+
+
+void unlink_file(int fd)
+{
+ char *filename = state_array[fd].name;
+
+ printf("Deleting %s, fd = %d, ino = %u\n", filename, fd,
+ get_inode_num(fd));
+
+ if (state_array[fd].isdir)
+ rmdir(filename);
+ else
+ unlink(filename);
+ state_array[fd].state = STATE_DELETED;
+}
+
+void close_file(int fd)
+{
+ char *filename = state_array[fd].name;
+
+ printf("Closing %s, fd = %d, ino = %u\n", filename, fd,
+ get_inode_num(fd));
+
+ close(fd);
+ state_array[fd].state = STATE_CLEAR;
+}
+
+
+main(int argc, char **argv)
+{
+ int i, fd;
+
+ memset(data_buffer, 0, sizeof(data_buffer));
+ sprintf(data_buffer, "This is a test file created by the "
+ "random_exerciser program\n");
+
+ for (i=0; i < 100000; i++) {
+ fd = get_random_fd();
+ switch (state_array[fd].state) {
+ case STATE_CLEAR:
+ create_random_file();
+ break;
+ case STATE_CREATED:
+ if ((state_array[fd].isdir == 0) &&
+ (random() & 2))
+ truncate_file(fd);
+ else
+ unlink_file(fd);
+ break;
+ case STATE_DELETED:
+ close_file(fd);
+ break;
+ }
+ }
+}
+
+
diff --git a/tests/progs/test_data/bma.setup b/tests/progs/test_data/bma.setup
new file mode 100644
index 0000000..f47e511
--- /dev/null
+++ b/tests/progs/test_data/bma.setup
@@ -0,0 +1 @@
+-bma_create test 23
diff --git a/tests/progs/test_data/expect.brel b/tests/progs/test_data/expect.brel
new file mode 100644
index 0000000..0858659
--- /dev/null
+++ b/tests/progs/test_data/expect.brel
@@ -0,0 +1,41 @@
+test_rel: brel_dump
+test_rel: brel_put 2 11
+test_rel: brel_put 1 10
+test_rel: brel_put 3 9
+test_rel: brel_put 1 10 4 128
+test_rel: brel_put 23 12
+test_rel: brel_put 24 13
+brel_put: Invalid argument while calling ext2fs_brel_put
+test_rel: brel_get 24
+brel_get: Invalid argument while calling ext2fs_brel_get
+test_rel: brel_delete 24
+brel_delete: Invalid argument while calling ext2fs_brel_delete
+test_rel: brel_get 5
+brel_get: No such file or directory while calling ext2fs_brel_get
+test_rel: brel_get 3
+Old= 3, New= 9, Owner= 0:0
+test_rel: brel_get 1
+Old= 1, New= 10, Owner= 4:128
+test_rel: brel_start_iter
+test_rel: brel_next
+Old= 1, New= 10, Owner= 4:128
+test_rel: brel_next
+Old= 2, New= 11, Owner= 0:0
+test_rel: brel_next
+Old= 3, New= 9, Owner= 0:0
+test_rel: brel_next
+No more entries!
+test_rel: brel_delete 2
+test_rel: brel_delete 2
+brel_delete: No such file or directory while calling ext2fs_brel_delete
+test_rel: brel_delete 5
+brel_delete: No such file or directory while calling ext2fs_brel_delete
+test_rel: brel_move 1 2
+test_rel: brel_delete 1
+brel_delete: No such file or directory while calling ext2fs_brel_delete
+test_rel: brel_move 1 4
+brel_move: No such file or directory while calling ext2fs_brel_move
+test_rel: brel_move 2 5
+test_rel: brel_dump
+Old= 3, New= 9, Owner= 0:0
+Old= 5, New= 10, Owner= 4:128
diff --git a/tests/progs/test_data/expect.icount b/tests/progs/test_data/expect.icount
new file mode 100644
index 0000000..b58a373
--- /dev/null
+++ b/tests/progs/test_data/expect.icount
@@ -0,0 +1,193 @@
+test_icount: validate
+Icount structure successfully validated
+test_icount: store 0 0
+store: Invalid argument passed to ext2 library while calling ext2fs_icount_store
+test_icount: fetch 0
+fetch: Invalid argument passed to ext2 library while calling ext2fs_icount_fetch
+test_icount: increment 0
+increment: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
+test_icount: decrement 0
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: store 20001 0
+store: Invalid argument passed to ext2 library while calling ext2fs_icount_store
+test_icount: fetch 20001
+fetch: Invalid argument passed to ext2 library while calling ext2fs_icount_fetch
+test_icount: increment 20001
+increment: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
+test_icount: decrement 20001
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: validate
+Icount structure successfully validated
+test_icount: fetch 1
+Count is 0
+test_icount: store 1 1
+test_icount: fetch 1
+Count is 1
+test_icount: store 1 2
+test_icount: fetch 1
+Count is 2
+test_icount: store 1 3
+test_icount: fetch 1
+Count is 3
+test_icount: store 1 1
+test_icount: fetch 1
+Count is 1
+test_icount: store 1 0
+test_icount: fetch 1
+Count is 0
+test_icount: fetch 20000
+Count is 0
+test_icount: store 20000 0
+test_icount: fetch 20000
+Count is 0
+test_icount: store 20000 3
+test_icount: fetch 20000
+Count is 3
+test_icount: store 20000 0
+test_icount: fetch 20000
+Count is 0
+test_icount: store 20000 42
+test_icount: fetch 20000
+Count is 42
+test_icount: store 20000 1
+test_icount: fetch 20000
+Count is 1
+test_icount: store 20000 0
+test_icount: fetch 20000
+Count is 0
+test_icount: get_size
+Size of icount is: 5
+test_icount: decrement 2
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: increment 2
+Count is now 1
+test_icount: fetch 2
+Count is 1
+test_icount: increment 2
+Count is now 2
+test_icount: fetch 2
+Count is 2
+test_icount: increment 2
+Count is now 3
+test_icount: fetch 2
+Count is 3
+test_icount: increment 2
+Count is now 4
+test_icount: fetch 2
+Count is 4
+test_icount: decrement 2
+Count is now 3
+test_icount: fetch 2
+Count is 3
+test_icount: decrement 2
+Count is now 2
+test_icount: fetch 2
+Count is 2
+test_icount: decrement 2
+Count is now 1
+test_icount: fetch 2
+Count is 1
+test_icount: decrement 2
+Count is now 0
+test_icount: decrement 2
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: store 3 1
+test_icount: increment 3
+Count is now 2
+test_icount: fetch 3
+Count is 2
+test_icount: decrement 3
+Count is now 1
+test_icount: fetch 3
+Count is 1
+test_icount: decrement 3
+Count is now 0
+test_icount: store 4 0
+test_icount: fetch 4
+Count is 0
+test_icount: increment 4
+Count is now 1
+test_icount: increment 4
+Count is now 2
+test_icount: fetch 4
+Count is 2
+test_icount: decrement 4
+Count is now 1
+test_icount: decrement 4
+Count is now 0
+test_icount: store 4 42
+test_icount: store 4 0
+test_icount: increment 4
+Count is now 1
+test_icount: increment 4
+Count is now 2
+test_icount: increment 4
+Count is now 3
+test_icount: decrement 4
+Count is now 2
+test_icount: decrement 4
+Count is now 1
+test_icount: decrement 4
+Count is now 0
+test_icount: decrement 4
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: decrement 4
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: store 5 4
+test_icount: decrement 5
+Count is now 3
+test_icount: decrement 5
+Count is now 2
+test_icount: decrement 5
+Count is now 1
+test_icount: decrement 5
+Count is now 0
+test_icount: decrement 5
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: get_size
+Size of icount is: 105
+test_icount: validate
+Icount structure successfully validated
+test_icount: store 10 10
+test_icount: store 20 20
+test_icount: store 30 30
+test_icount: store 40 40
+test_icount: store 50 50
+test_icount: store 60 60
+test_icount: store 70 70
+test_icount: store 80 80
+test_icount: store 90 90
+test_icount: store 100 100
+test_icount: store 15 15
+test_icount: store 25 25
+test_icount: store 35 35
+test_icount: store 45 45
+test_icount: store 55 55
+test_icount: store 65 65
+test_icount: store 75 75
+test_icount: store 85 85
+test_icount: store 95 95
+test_icount: dump
+10: 10
+15: 15
+20: 20
+25: 25
+30: 30
+35: 35
+40: 40
+45: 45
+50: 50
+55: 55
+60: 60
+65: 65
+70: 70
+75: 75
+80: 80
+85: 85
+90: 90
+95: 95
+100: 100
+test_icount: get_size
+Size of icount is: 105
+test_icount: validate
+Icount structure successfully validated
diff --git a/tests/progs/test_data/expect.irel b/tests/progs/test_data/expect.irel
new file mode 100644
index 0000000..8e47938
--- /dev/null
+++ b/tests/progs/test_data/expect.irel
@@ -0,0 +1,62 @@
+test_rel: irel_dump
+test_rel: irel_put 2 11 3
+test_rel: irel_put 1 10 2
+test_rel: irel_put 3 9 1
+test_rel: irel_add_ref 1 4 128
+test_rel: irel_add_ref 1 5 64
+test_rel: irel_add_ref 1 6 512
+irel_add_ref: No space left on device while calling ext2fs_irel_add_ref
+test_rel: irel_put 1 8 3
+test_rel: irel_add_ref 1 6 512
+test_rel: irel_add_ref 2 4 64
+test_rel: irel_put 23 12 1
+test_rel: irel_put 24 13 1
+irel_put: Invalid argument while calling ext2fs_irel_put
+test_rel: irel_get 24
+irel_get: Invalid argument while calling ext2fs_irel_get
+test_rel: irel_delete 24
+irel_delete: Invalid argument while calling ext2fs_irel_delete
+test_rel: irel_get 3
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_get 1
+Old= 1, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_start_iter
+test_rel: irel_next
+Old= 1, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_next
+Old= 2, New= 11, Original=2, Max_refs=3
+ 4:64
+test_rel: irel_next
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_next
+No more entries!
+test_rel: irel_delete 2
+test_rel: irel_delete 2
+irel_delete: No such file or directory while calling ext2fs_irel_delete
+test_rel: irel_delete 4
+irel_delete: No such file or directory while calling ext2fs_irel_delete
+test_rel: irel_move 1 2
+test_rel: irel_dump
+Old= 2, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_delete 4
+irel_delete: No such file or directory while calling ext2fs_irel_delete
+test_rel: irel_move 1 4
+irel_move: No such file or directory while calling ext2fs_irel_move
+test_rel: irel_move 2 4
+test_rel: irel_dump
+Old= 3, New= 9, Original=3, Max_refs=1
+Old= 4, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_get_by_orig 3
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_get_by_orig 1
+Old= 4, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_get_by_orig 5
+irel_get_by_orig: No such file or directory while calling ext2fs_irel_get_by_orig
+test_rel: irel_get_by_orig 2
+irel_get_by_orig: No such file or directory while calling ext2fs_irel_get_by_orig
diff --git a/tests/progs/test_data/ima.setup b/tests/progs/test_data/ima.setup
new file mode 100644
index 0000000..f411606
--- /dev/null
+++ b/tests/progs/test_data/ima.setup
@@ -0,0 +1 @@
+-ima_create test 23
diff --git a/tests/progs/test_data/normal.setup b/tests/progs/test_data/normal.setup
new file mode 100644
index 0000000..dfc6c41
--- /dev/null
+++ b/tests/progs/test_data/normal.setup
@@ -0,0 +1 @@
+-create
diff --git a/tests/progs/test_data/opt.setup b/tests/progs/test_data/opt.setup
new file mode 100644
index 0000000..79458b0
--- /dev/null
+++ b/tests/progs/test_data/opt.setup
@@ -0,0 +1 @@
+-create -i
diff --git a/tests/progs/test_data/test.brel b/tests/progs/test_data/test.brel
new file mode 100644
index 0000000..6605452
--- /dev/null
+++ b/tests/progs/test_data/test.brel
@@ -0,0 +1,47 @@
+#
+# This is the test script for the block relocation table.
+#
+# Copyright 1997 by Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+#
+brel_dump
+brel_put 2 11
+brel_put 1 10
+brel_put 3 9
+brel_put 1 10 4 128
+#
+# Test boundary cases for brel_put
+#
+brel_put 23 12
+brel_put 24 13
+#
+# Test other boundary cases
+#
+brel_get 24
+brel_delete 24
+#
+# Test getting existing and non-existent entries
+#
+brel_get 5
+brel_get 3
+brel_get 1
+#
+# Test the iterator functions
+#
+brel_start_iter
+brel_next
+brel_next
+brel_next
+brel_next
+#
+# Test delete and move
+#
+brel_delete 2
+brel_delete 2
+brel_delete 5
+brel_move 1 2
+brel_delete 1
+brel_move 1 4
+brel_move 2 5
+brel_dump
diff --git a/tests/progs/test_data/test.icount b/tests/progs/test_data/test.icount
new file mode 100644
index 0000000..8cb1955
--- /dev/null
+++ b/tests/progs/test_data/test.icount
@@ -0,0 +1,136 @@
+#
+# This is the test script for the icount abstraction
+#
+# Copyright 1997 by Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+#
+# First let's test the boundary cases for illegal arguments
+#
+validate
+store 0 0
+fetch 0
+increment 0
+decrement 0
+store 20001 0
+fetch 20001
+increment 20001
+decrement 20001
+validate
+#
+# OK, now let's test fetch and store. We also test the boundary cases
+# for legal inodes here.
+#
+fetch 1
+store 1 1
+fetch 1
+store 1 2
+fetch 1
+store 1 3
+fetch 1
+store 1 1
+fetch 1
+store 1 0
+fetch 1
+fetch 20000
+store 20000 0
+fetch 20000
+store 20000 3
+fetch 20000
+store 20000 0
+fetch 20000
+store 20000 42
+fetch 20000
+store 20000 1
+fetch 20000
+store 20000 0
+fetch 20000
+get_size
+#
+# Time to test increment. First increment from 0 (previously unreferenced)
+#
+decrement 2
+increment 2
+fetch 2
+increment 2
+fetch 2
+increment 2
+fetch 2
+increment 2
+fetch 2
+decrement 2
+fetch 2
+decrement 2
+fetch 2
+decrement 2
+fetch 2
+decrement 2
+decrement 2
+#
+# Store 1 then test...
+#
+store 3 1
+increment 3
+fetch 3
+decrement 3
+fetch 3
+decrement 3
+#
+# Store 0 then test
+#
+store 4 0
+fetch 4
+increment 4
+increment 4
+fetch 4
+decrement 4
+decrement 4
+#
+# Store something, then store 0, then test...
+#
+store 4 42
+store 4 0
+increment 4
+increment 4
+increment 4
+decrement 4
+decrement 4
+decrement 4
+decrement 4
+decrement 4
+#
+# store something, then decrement to zero
+#
+store 5 4
+decrement 5
+decrement 5
+decrement 5
+decrement 5
+decrement 5
+#
+# Test insert
+#
+get_size
+validate
+store 10 10
+store 20 20
+store 30 30
+store 40 40
+store 50 50
+store 60 60
+store 70 70
+store 80 80
+store 90 90
+store 100 100
+store 15 15
+store 25 25
+store 35 35
+store 45 45
+store 55 55
+store 65 65
+store 75 75
+store 85 85
+store 95 95
+dump
+get_size
+validate
diff --git a/tests/progs/test_data/test.irel b/tests/progs/test_data/test.irel
new file mode 100644
index 0000000..6c338bc
--- /dev/null
+++ b/tests/progs/test_data/test.irel
@@ -0,0 +1,69 @@
+#
+# This is the test script for the inode relocation table.
+#
+# Copyright 1997 by Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+#
+irel_dump
+irel_put 2 11 3
+irel_put 1 10 2
+irel_put 3 9 1
+irel_add_ref 1 4 128
+irel_add_ref 1 5 64
+#
+# Check to see what happens if we add too many references
+#
+irel_add_ref 1 6 512
+#
+# Try resizing the number of references and retry the add
+#
+irel_put 1 8 3
+irel_add_ref 1 6 512
+#
+irel_add_ref 2 4 64
+#
+# Test boundary cases of irel_put
+#
+irel_put 23 12 1
+irel_put 24 13 1
+#
+# Test other boundary cases....
+#
+irel_get 24
+irel_delete 24
+#
+# Test retrivals
+#
+irel_get 3
+irel_get 1
+#
+# Test the iterator functions
+#
+irel_start_iter
+irel_next
+irel_next
+irel_next
+irel_next
+#
+# Now try the delete function, on existing and non-existent entries
+#
+irel_delete 2
+irel_delete 2
+irel_delete 4
+#
+# Move tests...
+#
+irel_move 1 2
+irel_dump
+irel_delete 4
+irel_move 1 4
+irel_move 2 4
+#
+# Get by orig tests
+#
+irel_dump
+irel_get_by_orig 3
+irel_get_by_orig 1
+irel_get_by_orig 5
+irel_get_by_orig 2
diff --git a/tests/progs/test_icount.c b/tests/progs/test_icount.c
new file mode 100644
index 0000000..6ebb100
--- /dev/null
+++ b/tests/progs/test_icount.c
@@ -0,0 +1,384 @@
+/*
+ * test_icount.c
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <fcntl.h>
+
+#include <ext2fs/ext2_fs.h>
+
+#include <et/com_err.h>
+#include <ss/ss.h>
+#include <ext2fs/ext2fs.h>
+#include <ext2fs/irel.h>
+#include <ext2fs/brel.h>
+
+extern ss_request_table test_cmds;
+
+#include "test_icount.h"
+
+ext2_filsys test_fs;
+ext2_icount_t test_icount;
+
+/*
+ * Helper function which assures that the icount structure is valid
+ */
+static int check_icount(char *request)
+{
+ if (test_icount)
+ return 0;
+ com_err(request, 0, "The icount structure must be allocated.");
+ return 1;
+}
+
+/*
+ * Helper function which parses an inode number.
+ */
+static int parse_inode(const char *request, const char *desc,
+ const char *str, ext2_ino_t *ino)
+{
+ char *tmp;
+
+ *ino = strtoul(str, &tmp, 0);
+ if (*tmp) {
+ com_err(request, 0, "Bad %s - %s", desc, str);
+ return 1;
+ }
+ return 0;
+}
+
+void do_create_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ char *progname;
+ int flags = 0;
+ ext2_ino_t size = 5;
+
+ progname = *argv;
+ argv++; argc --;
+
+ if (argc && !strcmp("-i", *argv)) {
+ flags |= EXT2_ICOUNT_OPT_INCREMENT;
+ argv++; argc--;
+ }
+ if (argc) {
+ if (parse_inode(progname, "icount size", argv[0], &size))
+ return;
+ argv++; argc--;
+ }
+#if 0
+ printf("Creating icount... flags=%d, size=%d\n", flags, (int) size);
+#endif
+ retval = ext2fs_create_icount(test_fs, flags, (int) size,
+ &test_icount);
+ if (retval) {
+ com_err(progname, retval, "while creating icount");
+ return;
+ }
+}
+
+void do_free_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ if (argc != 1) {
+ printf("Usage: free_icount\n");
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+
+ ext2fs_free_icount(test_icount);
+ test_icount = 0;
+}
+
+void do_fetch(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ ext2_ino_t ino;
+ __u16 count;
+
+ if (argc < 2) {
+ printf("usage: %s inode\n", argv[0]);
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+ if (parse_inode(argv[0], "inode", argv[1], &ino))
+ return;
+ retval = ext2fs_icount_fetch(test_icount, ino, &count);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_icount_fetch");
+ return;
+ }
+ printf("Count is %u\n", count);
+}
+
+void do_increment(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ ext2_ino_t ino;
+ __u16 count;
+
+ if (argc < 2) {
+ printf("usage: %s inode\n", argv[0]);
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+ if (parse_inode(argv[0], "inode", argv[1], &ino))
+ return;
+ retval = ext2fs_icount_increment(test_icount, ino, &count);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while calling ext2fs_icount_increment");
+ return;
+ }
+ printf("Count is now %u\n", count);
+}
+
+void do_decrement(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ ext2_ino_t ino;
+ __u16 count;
+
+ if (argc < 2) {
+ printf("usage: %s inode\n", argv[0]);
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+ if (parse_inode(argv[0], "inode", argv[1], &ino))
+ return;
+ retval = ext2fs_icount_decrement(test_icount, ino, &count);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while calling ext2fs_icount_decrement");
+ return;
+ }
+ printf("Count is now %u\n", count);
+}
+
+void do_store(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ ext2_ino_t ino;
+ ext2_ino_t count;
+
+ if (argc < 3) {
+ printf("usage: %s inode count\n", argv[0]);
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+ if (parse_inode(argv[0], "inode", argv[1], &ino))
+ return;
+ if (parse_inode(argv[0], "count", argv[2], &count))
+ return;
+ if (count > 65535) {
+ printf("Count too large.\n");
+ return;
+ }
+ retval = ext2fs_icount_store(test_icount, ino, (__u16) count);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while calling ext2fs_icount_store");
+ return;
+ }
+}
+
+void do_dump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+ ext2_ino_t i;
+ __u16 count;
+
+ if (argc != 1) {
+ printf("Usage: dump\n");
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+ for (i=1; i <= test_fs->super->s_inodes_count; i++) {
+ retval = ext2fs_icount_fetch(test_icount, i, &count);
+ if (retval) {
+ com_err(argv[0], retval,
+ "while fetching icount for %lu", (unsigned long)i);
+ return;
+ }
+ if (count)
+ printf("%lu: %u\n", (unsigned long)i, count);
+ }
+}
+
+void do_validate(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ errcode_t retval;
+
+ if (argc != 1) {
+ printf("Usage: validate\n");
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+ retval = ext2fs_icount_validate(test_icount, stdout);
+ if (retval) {
+ com_err(argv[0], retval, "while validating icount structure");
+ return;
+ }
+ printf("Icount structure successfully validated\n");
+}
+
+void do_get_size(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)),
+ void *infop EXT2FS_ATTR((unused)))
+{
+ ext2_ino_t size;
+
+ if (argc != 1) {
+ printf("Usage: get_size\n");
+ return;
+ }
+ if (check_icount(argv[0]))
+ return;
+ size = ext2fs_get_icount_size(test_icount);
+ printf("Size of icount is: %lu\n", (unsigned long)size);
+}
+
+static int source_file(const char *cmd_file, int sci_idx)
+{
+ FILE *f;
+ char buf[256];
+ char *cp;
+ int exit_status = 0;
+ int retval;
+ int noecho;
+
+ if (strcmp(cmd_file, "-") == 0)
+ f = stdin;
+ else {
+ f = fopen(cmd_file, "r");
+ if (!f) {
+ perror(cmd_file);
+ exit(1);
+ }
+ }
+ fflush(stdout);
+ fflush(stderr);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ while (!feof(f)) {
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ break;
+ if (buf[0] == '#')
+ continue;
+ noecho = 0;
+ if (buf[0] == '-') {
+ noecho = 1;
+ buf[0] = ' ';
+ }
+ cp = strchr(buf, '\n');
+ if (cp)
+ *cp = 0;
+ cp = strchr(buf, '\r');
+ if (cp)
+ *cp = 0;
+ if (!noecho)
+ printf("test_icount: %s\n", buf);
+ retval = ss_execute_line(sci_idx, buf);
+ if (retval) {
+ ss_perror(sci_idx, retval, buf);
+ exit_status++;
+ }
+ }
+ if (f != stdin)
+ fclose(f);
+ return exit_status;
+}
+
+int main(int argc, char **argv)
+{
+ int retval;
+ int sci_idx;
+ int c;
+ char *request = 0;
+ int exit_status = 0;
+ char *cmd_file = 0;
+ struct ext2_super_block param;
+
+ initialize_ext2_error_table();
+
+ /*
+ * Create a sample filesystem structure
+ */
+ memset(&param, 0, sizeof(struct ext2_super_block));
+ ext2fs_blocks_count_set(&param, 80000);
+ param.s_inodes_count = 20000;
+ retval = ext2fs_initialize("/dev/null", 0, &param,
+ unix_io_manager, &test_fs);
+ if (retval) {
+ com_err("/dev/null", retval, "while setting up test fs");
+ exit(1);
+ }
+
+ while ((c = getopt (argc, argv, "wR:f:")) != EOF) {
+ switch (c) {
+ case 'R':
+ request = optarg;
+ break;
+ case 'f':
+ cmd_file = optarg;
+ break;
+ default:
+ com_err(argv[0], 0, "Usage: test_icount "
+ "[-R request] [-f cmd_file]");
+ exit(1);
+ }
+ }
+ sci_idx = ss_create_invocation("test_icount", "0.0", (char *) NULL,
+ &test_cmds, &retval);
+ if (retval) {
+ ss_perror(sci_idx, retval, "creating invocation");
+ exit(1);
+ }
+
+ (void) ss_add_request_table (sci_idx, &ss_std_requests, 1, &retval);
+ if (retval) {
+ ss_perror(sci_idx, retval, "adding standard requests");
+ exit (1);
+ }
+ if (request) {
+ retval = 0;
+ retval = ss_execute_line(sci_idx, request);
+ if (retval) {
+ ss_perror(sci_idx, retval, request);
+ exit_status++;
+ }
+ } else if (cmd_file) {
+ exit_status = source_file(cmd_file, sci_idx);
+ } else {
+ ss_listen(sci_idx);
+ }
+
+ return(exit_status);
+}
diff --git a/tests/progs/test_icount.h b/tests/progs/test_icount.h
new file mode 100644
index 0000000..29d56ab
--- /dev/null
+++ b/tests/progs/test_icount.h
@@ -0,0 +1,10 @@
+void do_create_icount(int argc, char **argv, int sci_idx, void *infop);
+void do_free_icount(int argc, char **argv, int sci_idx, void *infop);
+void do_fetch(int argc, char **argv, int sci_idx, void *infop);
+void do_increment(int argc, char **argv, int sci_idx, void *infop);
+void do_decrement(int argc, char **argv, int sci_idx, void *infop);
+void do_store(int argc, char **argv, int sci_idx, void *infop);
+void do_get_size(int argc, char **argv, int sci_idx, void *infop);
+void do_dump(int argc, char **argv, int sci_idx, void *infop);
+void do_validate(int argc, char **argv, int sci_idx, void *infop);
+
diff --git a/tests/progs/test_icount_cmds.ct b/tests/progs/test_icount_cmds.ct
new file mode 100644
index 0000000..c3cc6f4
--- /dev/null
+++ b/tests/progs/test_icount_cmds.ct
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 1997 Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+command_table test_cmds;
+
+#
+# Icount table commands
+#
+request do_create_icount, "Create an icount structure",
+ create_icount, create;
+
+request do_free_icount, "Free an icount structure",
+ free_icount, free;
+
+request do_fetch, "Fetch an icount entry",
+ fetch;
+
+request do_increment, "Increment an icount entry",
+ increment, inc;
+
+request do_decrement, "Decrement an icount entry",
+ decrement, dec;
+
+request do_store, "Store an icount entry",
+ store;
+
+request do_get_size, "Get the size of the icount structure",
+ get_size;
+
+request do_dump, "Dump the icount structure",
+ dump;
+
+request do_validate, "Validate the icount structure",
+ validate, check;
+
+end;
diff --git a/tests/progs/test_rel.c b/tests/progs/test_rel.c
new file mode 100644
index 0000000..8f7280c
--- /dev/null
+++ b/tests/progs/test_rel.c
@@ -0,0 +1,764 @@
+/*
+ * test_rel.c
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <fcntl.h>
+
+#include <et/com_err.h>
+#include <ss/ss.h>
+#include <ext2fs/ext2_fs.h>
+#include <ext2fs/ext2fs.h>
+#include <ext2fs/irel.h>
+#include <ext2fs/brel.h>
+
+#include "test_rel.h"
+
+extern ss_request_table test_cmds;
+
+ext2_irel irel = NULL;
+ext2_brel brel = NULL;
+
+/*
+ * Helper function which parses an inode number.
+ */
+static int parse_inode(const char *request, const char *desc,
+ const char *str, ext2_ino_t *ino)
+{
+ char *tmp;
+
+ *ino = strtoul(str, &tmp, 0);
+ if (*tmp) {
+ com_err(request, 0, "Bad %s - %s", desc, str);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Helper function which parses a block number.
+ */
+static int parse_block(const char *request, const char *desc,
+ const char *str, blk_t *blk)
+{
+ char *tmp;
+
+ *blk = strtoul(str, &tmp, 0);
+ if (*tmp) {
+ com_err(request, 0, "Bad %s - %s", desc, str);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Helper function which assures that a brel table is open
+ */
+static int check_brel(char *request)
+{
+ if (brel)
+ return 0;
+ com_err(request, 0, "A block relocation table must be open.");
+ return 1;
+}
+
+/*
+ * Helper function which assures that an irel table is open
+ */
+static int check_irel(char *request)
+{
+ if (irel)
+ return 0;
+ com_err(request, 0, "An inode relocation table must be open.");
+ return 1;
+}
+
+/*
+ * Helper function which displays a brel entry
+ */
+static void display_brel_entry(blk_t old,
+ struct ext2_block_relocate_entry *ent)
+{
+ printf("Old= %u, New= %u, Owner= %u:%u\n", old, ent->new,
+ ent->owner.block_ref, ent->offset);
+}
+
+/*
+ * Helper function which displays an irel entry
+ */
+static void display_irel_entry(ext2_ino_t old,
+ struct ext2_inode_relocate_entry *ent,
+ int do_refs)
+{
+ struct ext2_inode_reference ref;
+ errcode_t retval;
+ int first = 1;
+
+ printf("Old= %lu, New= %lu, Original=%lu, Max_refs=%u\n", old,
+ ent->new, ent->orig, ent->max_refs);
+ if (!do_refs)
+ return;
+
+ retval = ext2fs_irel_start_iter_ref(irel, old);
+ if (retval) {
+ printf("\tCouldn't get references: %s\n",
+ error_message(retval));
+ return;
+ }
+ while (1) {
+ retval = ext2fs_irel_next_ref(irel, &ref);
+ if (retval) {
+ printf("(%s) ", error_message(retval));
+ break;
+ }
+ if (ref.block == 0)
+ break;
+ if (first) {
+ fputc('\t', stdout);
+ first = 0;
+ } else
+ printf(", ");
+ printf("%u:%u", ref.block, ref.offset);
+ }
+ if (!first)
+ fputc('\n', stdout);
+}
+
+/*
+ * These are the actual command table procedures
+ */
+void do_brel_ma_create(int argc, char **argv)
+{
+ const char *usage = "Usage: %s name max_blocks\n";
+ errcode_t retval;
+ blk_t max_blk;
+
+ if (argc < 3) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_block(argv[0], "max_blocks", argv[2], &max_blk))
+ return;
+ retval = ext2fs_brel_memarray_create(argv[1], max_blk, &brel);
+ if (retval) {
+ com_err(argv[0], retval, "while opening memarray brel");
+ return;
+ }
+ return;
+}
+
+void do_brel_free(int argc, char **argv)
+{
+ if (check_brel(argv[0]))
+ return;
+ ext2fs_brel_free(brel);
+ brel = NULL;
+ return;
+}
+
+void do_brel_put(int argc, char **argv)
+{
+ const char *usage = "usage: %s old_block new_block [owner] [offset]";
+ errcode_t retval;
+ struct ext2_block_relocate_entry ent;
+ blk_t old, new, offset=0, owner=0;
+
+ if (check_brel(argv[0]))
+ return;
+
+ if (argc < 3) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_block(argv[0], "old block", argv[1], &old))
+ return;
+ if (parse_block(argv[0], "new block", argv[2], &new))
+ return;
+ if (argc > 3 &&
+ parse_block(argv[0], "owner block", argv[3], &owner))
+ return;
+ if (argc > 4 &&
+ parse_block(argv[0], "offset", argv[4], &offset))
+ return;
+ if (offset > 65535) {
+ printf("Offset too large.\n");
+ return;
+ }
+ ent.new = new;
+ ent.offset = (__u16) offset;
+ ent.flags = 0;
+ ent.owner.block_ref = owner;
+
+ retval = ext2fs_brel_put(brel, old, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_put");
+ return;
+ }
+ return;
+}
+
+void do_brel_get(int argc, char **argv)
+{
+ const char *usage = "%s block";
+ errcode_t retval;
+ struct ext2_block_relocate_entry ent;
+ blk_t blk;
+
+ if (check_brel(argv[0]))
+ return;
+ if (argc < 2) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_block(argv[0], "block", argv[1], &blk))
+ return;
+ retval = ext2fs_brel_get(brel, blk, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_get");
+ return;
+ }
+ display_brel_entry(blk, &ent);
+ return;
+}
+
+void do_brel_start_iter(int argc, char **argv)
+{
+ errcode_t retval;
+
+ if (check_brel(argv[0]))
+ return;
+
+ retval = ext2fs_brel_start_iter(brel);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_start_iter");
+ return;
+ }
+ return;
+}
+
+void do_brel_next(int argc, char **argv)
+{
+ errcode_t retval;
+ struct ext2_block_relocate_entry ent;
+ blk_t blk;
+
+ if (check_brel(argv[0]))
+ return;
+
+ retval = ext2fs_brel_next(brel, &blk, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_next");
+ return;
+ }
+ if (blk == 0) {
+ printf("No more entries!\n");
+ return;
+ }
+ display_brel_entry(blk, &ent);
+ return;
+}
+
+void do_brel_dump(int argc, char **argv)
+{
+ errcode_t retval;
+ struct ext2_block_relocate_entry ent;
+ blk_t blk;
+
+ if (check_brel(argv[0]))
+ return;
+
+ retval = ext2fs_brel_start_iter(brel);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_start_iter");
+ return;
+ }
+
+ while (1) {
+ retval = ext2fs_brel_next(brel, &blk, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_next");
+ return;
+ }
+ if (blk == 0)
+ break;
+
+ display_brel_entry(blk, &ent);
+ }
+ return;
+}
+
+void do_brel_move(int argc, char **argv)
+{
+ const char *usage = "%s old_block new_block";
+ errcode_t retval;
+ blk_t old, new;
+
+ if (check_brel(argv[0]))
+ return;
+ if (argc < 2) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_block(argv[0], "old block", argv[1], &old))
+ return;
+ if (parse_block(argv[0], "new block", argv[2], &new))
+ return;
+
+ retval = ext2fs_brel_move(brel, old, new);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_move");
+ return;
+ }
+ return;
+}
+
+void do_brel_delete(int argc, char **argv)
+{
+ const char *usage = "%s block";
+ errcode_t retval;
+ blk_t blk;
+
+ if (check_brel(argv[0]))
+ return;
+ if (argc < 2) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_block(argv[0], "block", argv[1], &blk))
+ return;
+
+ retval = ext2fs_brel_delete(brel, blk);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_brel_delete");
+ return;
+ }
+}
+
+void do_irel_ma_create(int argc, char **argv)
+{
+ const char *usage = "Usage: %s name max_inode\n";
+ errcode_t retval;
+ ext2_ino_t max_ino;
+
+ if (argc < 3) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_inode(argv[0], "max_inodes", argv[2], &max_ino))
+ return;
+ retval = ext2fs_irel_memarray_create(argv[1], max_ino, &irel);
+ if (retval) {
+ com_err(argv[0], retval, "while opening memarray irel");
+ return;
+ }
+ return;
+}
+
+void do_irel_free(int argc, char **argv)
+{
+ if (check_irel(argv[0]))
+ return;
+
+ ext2fs_irel_free(irel);
+ irel = NULL;
+ return;
+}
+
+void do_irel_put(int argc, char **argv)
+{
+ const char *usage = "%s old new max_refs";
+ errcode_t retval;
+ ext2_ino_t old, new, max_refs;
+ struct ext2_inode_relocate_entry ent;
+
+ if (check_irel(argv[0]))
+ return;
+
+ if (argc < 4) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_inode(argv[0], "old inode", argv[1], &old))
+ return;
+ if (parse_inode(argv[0], "new inode", argv[2], &new))
+ return;
+ if (parse_inode(argv[0], "max_refs", argv[3], &max_refs))
+ return;
+ if (max_refs > 65535) {
+ printf("max_refs too big\n");
+ return;
+ }
+ ent.new = new;
+ ent.max_refs = (__u16) max_refs;
+ ent.flags = 0;
+
+ retval = ext2fs_irel_put(irel, old, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_put");
+ return;
+ }
+ return;
+}
+
+void do_irel_get(int argc, char **argv)
+{
+ const char *usage = "%s inode";
+ errcode_t retval;
+ ext2_ino_t old;
+ struct ext2_inode_relocate_entry ent;
+
+ if (check_irel(argv[0]))
+ return;
+
+ if (argc < 2) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_inode(argv[0], "inode", argv[1], &old))
+ return;
+
+ retval = ext2fs_irel_get(irel, old, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_get");
+ return;
+ }
+ display_irel_entry(old, &ent, 1);
+ return;
+}
+
+void do_irel_get_by_orig(int argc, char **argv)
+{
+ const char *usage = "%s orig_inode";
+ errcode_t retval;
+ ext2_ino_t orig, old;
+ struct ext2_inode_relocate_entry ent;
+
+ if (check_irel(argv[0]))
+ return;
+
+ if (argc < 2) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_inode(argv[0], "original inode", argv[1], &orig))
+ return;
+
+ retval = ext2fs_irel_get_by_orig(irel, orig, &old, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_get_by_orig");
+ return;
+ }
+ display_irel_entry(old, &ent, 1);
+ return;
+}
+
+void do_irel_start_iter(int argc, char **argv)
+{
+ errcode_t retval;
+
+ if (check_irel(argv[0]))
+ return;
+
+ retval = ext2fs_irel_start_iter(irel);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_start_iter");
+ return;
+ }
+ return;
+}
+
+void do_irel_next(int argc, char **argv)
+{
+ errcode_t retval;
+ ext2_ino_t old;
+ struct ext2_inode_relocate_entry ent;
+
+ if (check_irel(argv[0]))
+ return;
+
+ retval = ext2fs_irel_next(irel, &old, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_next");
+ return;
+ }
+ if (old == 0) {
+ printf("No more entries!\n");
+ return;
+ }
+ display_irel_entry(old, &ent, 1);
+ return;
+}
+
+void do_irel_dump(int argc, char **argv)
+{
+ errcode_t retval;
+ ext2_ino_t ino;
+ struct ext2_inode_relocate_entry ent;
+
+ if (check_irel(argv[0]))
+ return;
+
+ retval = ext2fs_irel_start_iter(irel);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_start_iter");
+ return;
+ }
+
+ while (1) {
+ retval = ext2fs_irel_next(irel, &ino, &ent);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_next");
+ return;
+ }
+ if (ino == 0)
+ break;
+
+ display_irel_entry(ino, &ent, 1);
+ }
+ return;
+}
+
+void do_irel_add_ref(int argc, char **argv)
+{
+ const char *usage = "%s inode block offset";
+ errcode_t retval;
+ blk_t block, offset;
+ ext2_ino_t ino;
+ struct ext2_inode_reference ref;
+
+
+ if (check_irel(argv[0]))
+ return;
+
+ if (argc < 4) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_inode(argv[0], "inode", argv[1], &ino))
+ return;
+ if (parse_block(argv[0], "block", argv[2], &block))
+ return;
+ if (parse_block(argv[0], "offset", argv[3], &offset))
+ return;
+ if (offset > 65535) {
+ printf("Offset too big.\n");
+ return;
+ }
+ ref.block = block;
+ ref.offset = offset;
+
+ retval = ext2fs_irel_add_ref(irel, ino, &ref);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_add_ref");
+ return;
+ }
+ return;
+}
+
+void do_irel_start_iter_ref(int argc, char **argv)
+{
+ const char *usage = "%s inode";
+ errcode_t retval;
+ ext2_ino_t ino;
+
+ if (check_irel(argv[0]))
+ return;
+
+ if (argc < 2) {
+ printf(usage, argv[0]);
+ return;
+ }
+
+ if (parse_inode(argv[0], "inode", argv[1], &ino))
+ return;
+ retval = ext2fs_irel_start_iter_ref(irel, ino);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_start_iter_ref");
+ return;
+ }
+ return;
+}
+
+void do_irel_next_ref(int argc, char **argv)
+{
+ struct ext2_inode_reference ref;
+ errcode_t retval;
+
+ if (check_irel(argv[0]))
+ return;
+
+ retval = ext2fs_irel_next_ref(irel, &ref);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_next_ref");
+ return;
+ }
+ printf("Inode reference: %u:%u\n", ref.block, ref.offset);
+ return;
+}
+
+void do_irel_move(int argc, char **argv)
+{
+ const char *usage = "%s old new";
+ errcode_t retval;
+ ext2_ino_t old, new;
+
+ if (check_irel(argv[0]))
+ return;
+
+ if (argc < 3) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_inode(argv[0], "old inode", argv[1], &old))
+ return;
+ if (parse_inode(argv[0], "new inode", argv[2], &new))
+ return;
+
+ retval = ext2fs_irel_move(irel, old, new);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_move");
+ return;
+ }
+ return;
+}
+
+void do_irel_delete(int argc, char **argv)
+{
+ const char *usage = "%s inode";
+ errcode_t retval;
+ ext2_ino_t ino;
+
+ if (check_irel(argv[0]))
+ return;
+
+ if (argc < 2) {
+ printf(usage, argv[0]);
+ return;
+ }
+ if (parse_inode(argv[0], "inode", argv[1], &ino))
+ return;
+
+ retval = ext2fs_irel_delete(irel, ino);
+ if (retval) {
+ com_err(argv[0], retval, "while calling ext2fs_irel_delete");
+ return;
+ }
+ return;
+}
+
+static int source_file(const char *cmd_file, int sci_idx)
+{
+ FILE *f;
+ char buf[256];
+ char *cp;
+ int exit_status = 0;
+ int retval;
+ int noecho;
+
+ if (strcmp(cmd_file, "-") == 0)
+ f = stdin;
+ else {
+ f = fopen(cmd_file, "r");
+ if (!f) {
+ perror(cmd_file);
+ exit(1);
+ }
+ }
+ fflush(stdout);
+ fflush(stderr);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ while (!feof(f)) {
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ break;
+ if (buf[0] == '#')
+ continue;
+ noecho = 0;
+ if (buf[0] == '-') {
+ noecho = 1;
+ buf[0] = ' ';
+ }
+ cp = strchr(buf, '\n');
+ if (cp)
+ *cp = 0;
+ cp = strchr(buf, '\r');
+ if (cp)
+ *cp = 0;
+ if (!noecho)
+ printf("test_rel: %s\n", buf);
+ retval = ss_execute_line(sci_idx, buf);
+ if (retval) {
+ ss_perror(sci_idx, retval, buf);
+ exit_status++;
+ }
+ }
+ return exit_status;
+}
+
+void main(int argc, char **argv)
+{
+ int retval;
+ int sci_idx;
+ const char *usage = "Usage: test_rel [-R request] [-f cmd_file]";
+ int c;
+ char *request = 0;
+ int exit_status = 0;
+ char *cmd_file = 0;
+
+ initialize_ext2_error_table();
+
+ while ((c = getopt (argc, argv, "wR:f:")) != EOF) {
+ switch (c) {
+ case 'R':
+ request = optarg;
+ break;
+ case 'f':
+ cmd_file = optarg;
+ break;
+ default:
+ com_err(argv[0], 0, usage);
+ return;
+ }
+ }
+ sci_idx = ss_create_invocation("test_rel", "0.0", (char *) NULL,
+ &test_cmds, &retval);
+ if (retval) {
+ ss_perror(sci_idx, retval, "creating invocation");
+ exit(1);
+ }
+
+ (void) ss_add_request_table (sci_idx, &ss_std_requests, 1, &retval);
+ if (retval) {
+ ss_perror(sci_idx, retval, "adding standard requests");
+ exit (1);
+ }
+ if (request) {
+ retval = 0;
+ retval = ss_execute_line(sci_idx, request);
+ if (retval) {
+ ss_perror(sci_idx, retval, request);
+ exit_status++;
+ }
+ } else if (cmd_file) {
+ exit_status = source_file(cmd_file, sci_idx);
+ } else {
+ ss_listen(sci_idx);
+ }
+
+ exit(exit_status);
+}
+
diff --git a/tests/progs/test_rel.h b/tests/progs/test_rel.h
new file mode 100644
index 0000000..47c4d09
--- /dev/null
+++ b/tests/progs/test_rel.h
@@ -0,0 +1,35 @@
+/*
+ * test_rel.h
+ *
+ * Copyright (C) 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+
+
+void do_brel_ma_create(int argc, char **argv);
+void do_brel_free(int argc, char **argv);
+void do_brel_put(int argc, char **argv);
+void do_brel_get(int argc, char **argv);
+void do_brel_start_iter(int argc, char **argv);
+void do_brel_next(int argc, char **argv);
+void do_brel_dump(int argc, char **argv);
+void do_brel_move(int argc, char **argv);
+void do_brel_delete(int argc, char **argv);
+void do_irel_ma_create(int argc, char **argv);
+void do_irel_free(int argc, char **argv);
+void do_irel_put(int argc, char **argv);
+void do_irel_get(int argc, char **argv);
+void do_irel_get_by_orig(int argc, char **argv);
+void do_irel_start_iter(int argc, char **argv);
+void do_irel_next(int argc, char **argv);
+void do_irel_dump(int argc, char **argv);
+void do_irel_add_ref(int argc, char **argv);
+void do_irel_start_iter_ref(int argc, char **argv);
+void do_irel_next_ref(int argc, char **argv);
+void do_irel_move(int argc, char **argv);
+void do_irel_delete(int argc, char **argv);
diff --git a/tests/progs/test_rel_cmds.ct b/tests/progs/test_rel_cmds.ct
new file mode 100644
index 0000000..5ed6ae2
--- /dev/null
+++ b/tests/progs/test_rel_cmds.ct
@@ -0,0 +1,82 @@
+#
+# Copyright (C) 1997 Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+command_table test_cmds;
+
+#
+# Block relocation table commands
+#
+
+request do_brel_ma_create, "Open a memory array block relocation table",
+ brel_ma_create, bma_create;
+
+request do_brel_free, "Free a block relocation table",
+ brel_free, bfree;
+
+request do_brel_put, "Add or modify a block relocation entry",
+ brel_put, bput;
+
+request do_brel_get, "Get a block relocation entry",
+ brel_get, bget;
+
+request do_brel_start_iter, "Start iterating over the block table",
+ brel_start_iter, bstart;
+
+request do_brel_next, "Get the next block relocation entry",
+ brel_next, bnext;
+
+request do_brel_dump, "Dump the block relocation table",
+ brel_dump, bdump;
+
+request do_brel_move, "Move an entry in the block relocation table",
+ brel_move, bmove;
+
+request do_brel_delete, "Delete an entry in the block relocation table",
+ brel_delete, bdelete, bdel;
+
+#
+# Inode relocation table commands
+#
+
+request do_irel_ma_create, "Open a memory array inode relocation table",
+ irel_ma_create, ima_create;
+
+request do_irel_free, "Free an inode relocation table",
+ irel_free, ifree;
+
+request do_irel_put, "Add or modify an inode relocation entry",
+ irel_put, iput;
+
+request do_irel_get, "Get an inode relocation entry",
+ irel_get, iget;
+
+request do_irel_get_by_orig,
+ "Get an inode relocation entry by its original number",
+ irel_get_by_orig, igetorig, igeto;
+
+request do_irel_start_iter, "Start iterating over the inode table",
+ irel_start_iter, istart;
+
+request do_irel_next, "Get the next block relocation entry",
+ irel_next, inext;
+
+request do_irel_dump, "Dump the inode relocation table",
+ irel_dump, idump;
+
+request do_irel_add_ref, "Add a reference to an inode entry",
+ irel_add_ref, iaddref, iaddr;
+
+request do_irel_start_iter_ref, "Start iterating over references to an inode",
+ irel_start_iter_ref, istartref, istartr;
+
+request do_irel_next_ref, "Get the next reference for an inode entry",
+ irel_next_ref, inextref, inextr;
+
+request do_irel_move, "Move an entry in the inode relocation table",
+ irel_move, imove;
+
+request do_irel_delete, "Delete an entry in the inode relocation table",
+ irel_delete, idelete, idel;
+
+end;
diff --git a/tests/r_1024_small_bg/script b/tests/r_1024_small_bg/script
new file mode 100644
index 0000000..cdeb8e3
--- /dev/null
+++ b/tests/r_1024_small_bg/script
@@ -0,0 +1,30 @@
+test_description="ext2 1024 blocksize with small block groups"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FEATURES="-t ext2 -O ^resize_inode -b 1024 -g 1024"
+SIZE_1=64M
+SIZE_2=2G
+LOG=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+
+
+. $cmd_dir/scripts/resize_test
+
+resize_test
+RC=$?
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+elif [ $RC -eq 111 ]; then
+ echo "$test_name: $test_description: skipped (no large sparse files)"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ ln $LOG $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
+
diff --git a/tests/r_32to64bit/expect b/tests/r_32to64bit/expect
new file mode 100644
index 0000000..de573b3
--- /dev/null
+++ b/tests/r_32to64bit/expect
@@ -0,0 +1,100 @@
+resize2fs test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -b
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 524288 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,13 +10,13 @@
+ Inode count: 65536
+ Block count: 524288
+ Reserved block count: 26214
+-Overhead clusters: 35228
+ Free blocks: 589
+ Free inodes: 65048
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
+-Reserved GDT blocks: 256
++Group descriptor size: 64
++Reserved GDT blocks: 254
+ Blocks per group: 8192
+ Fragments per group: 8192
+ Inodes per group: 1024
+@@ -43,16 +43,16 @@
+
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-3:260:276:292
+-1:8193:8193:8194-8195:261:277:548
++0:1:1:2-5:260:276:292
++1:8193:8193:8194-8197:261:277:548
+ 2:16385:-1:-1:262:278:804
+-3:24577:24577:24578-24579:263:279:1060
++3:24577:24577:24578-24581:263:279:1060
+ 4:32769:-1:-1:264:280:1316
+-5:40961:40961:40962-40963:265:281:1572
++5:40961:40961:40962-40965:265:281:1572
+ 6:49153:-1:-1:266:282:1828
+-7:57345:57345:57346-57347:267:283:2084
++7:57345:57345:57346-57349:267:283:2084
+ 8:65537:-1:-1:268:284:2340
+-9:73729:73729:73730-73731:269:285:2596
++9:73729:73729:73730-73733:269:285:2596
+ 10:81921:-1:-1:270:286:2852
+ 11:90113:-1:-1:271:287:3108
+ 12:98305:-1:-1:272:288:3364
+@@ -68,9 +68,9 @@
+ 22:180225:-1:-1:131079:131095:132641
+ 23:188417:-1:-1:131080:131096:132897
+ 24:196609:-1:-1:131081:131097:133153
+-25:204801:204801:204802-204803:131082:131098:133409
++25:204801:204801:204802-204805:131082:131098:133409
+ 26:212993:-1:-1:131083:131099:133665
+-27:221185:221185:221186-221187:131084:131100:133921
++27:221185:221185:221186-221189:131084:131100:133921
+ 28:229377:-1:-1:131085:131101:134177
+ 29:237569:-1:-1:131086:131102:134433
+ 30:245761:-1:-1:131087:131103:134689
+@@ -92,7 +92,7 @@
+ 46:376833:-1:-1:262159:262175:265761
+ 47:385025:-1:-1:262160:262176:266017
+ 48:393217:-1:-1:393217:393233:393249
+-49:401409:401409:401410-401411:393218:393234:393505
++49:401409:401409:401410-401413:393218:393234:393505
+ 50:409601:-1:-1:393219:393235:393761
+ 51:417793:-1:-1:393220:393236:394017
+ 52:425985:-1:-1:393221:393237:394273
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit/name b/tests/r_32to64bit/name
new file mode 100644
index 0000000..fb45fab
--- /dev/null
+++ b/tests/r_32to64bit/name
@@ -0,0 +1 @@
+convert flex_bg 32bit fs to 64bit fs
diff --git a/tests/r_32to64bit/script b/tests/r_32to64bit/script
new file mode 100644
index 0000000..40b8088
--- /dev/null
+++ b/tests/r_32to64bit/script
@@ -0,0 +1,72 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# resize it
+echo "resize2fs test.img -b" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_32to64bit_expand_full/expect b/tests/r_32to64bit_expand_full/expect
new file mode 100644
index 0000000..f9e30f3
--- /dev/null
+++ b/tests/r_32to64bit_expand_full/expect
@@ -0,0 +1,139 @@
+resize2fs test
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 727 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs -b test.img
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 786432 (1k) blocks long.
+
+resize2fs test.img
+Resizing the filesystem on test.img to 1179648 (1k) blocks.
+The filesystem on test.img is now 1179648 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -1,15 +1,15 @@
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-7:8:9:10
+-1:8193:8193:8194-8199:8200:8201:8202
++0:1:1:2-10:266:267:268
++1:8193:8193:8194-8202:8458:8459:8460
+ 2:16385:-1:-1:16385:16386:16387
+-3:24577:24577:24578-24583:24584:24585:24586
++3:24577:24577:24578-24586:24842:24843:24844
+ 4:32769:-1:-1:32769:32770:32771
+-5:40961:40961:40962-40967:40968:40969:40970
++5:40961:40961:40962-40970:41226:41227:41228
+ 6:49153:-1:-1:49153:49154:49155
+-7:57345:57345:57346-57351:57352:57353:57354
++7:57345:57345:57346-57354:57610:57611:57612
+ 8:65537:-1:-1:65537:65538:65539
+-9:73729:73729:73730-73735:73736:73737:73738
++9:73729:73729:73730-73738:73994:73995:73996
+ 10:81921:-1:-1:81921:81922:81923
+ 11:90113:-1:-1:90113:90114:90115
+ 12:98305:-1:-1:98305:98306:98307
+@@ -25,9 +25,9 @@
+ 22:180225:-1:-1:180225:180226:180227
+ 23:188417:-1:-1:188417:188418:188419
+ 24:196609:-1:-1:196609:196610:196611
+-25:204801:204801:204802-204807:204808:204809:204810
++25:204801:204801:204802-204810:205066:205067:205068
+ 26:212993:-1:-1:212993:212994:212995
+-27:221185:221185:221186-221191:221192:221193:221194
++27:221185:221185:221186-221194:221450:221451:221452
+ 28:229377:-1:-1:229377:229378:229379
+ 29:237569:-1:-1:237569:237570:237571
+ 30:245761:-1:-1:245761:245762:245763
+@@ -49,7 +49,7 @@
+ 46:376833:-1:-1:376833:376834:376835
+ 47:385025:-1:-1:385025:385026:385027
+ 48:393217:-1:-1:393217:393218:393219
+-49:401409:401409:401410-401415:401416:401417:401418
++49:401409:401409:401410-401418:401674:401675:401676
+ 50:409601:-1:-1:409601:409602:409603
+ 51:417793:-1:-1:417793:417794:417795
+ 52:425985:-1:-1:425985:425986:425987
+@@ -81,7 +81,7 @@
+ 78:638977:-1:-1:638977:638978:638979
+ 79:647169:-1:-1:647169:647170:647171
+ 80:655361:-1:-1:655361:655362:655363
+-81:663553:663553:663554-663559:663560:663561:663562
++81:663553:663553:663554-663562:663818:663819:663820
+ 82:671745:-1:-1:671745:671746:671747
+ 83:679937:-1:-1:679937:679938:679939
+ 84:688129:-1:-1:688129:688130:688131
+@@ -96,3 +96,51 @@
+ 93:761857:-1:-1:761857:761858:761859
+ 94:770049:-1:-1:770049:770050:770051
+ 95:778241:-1:-1:778241:778242:778243
++96:786433:-1:-1:786433:786434:786435
++97:794625:-1:-1:794625:794626:794627
++98:802817:-1:-1:802817:802818:802819
++99:811009:-1:-1:811009:811010:811011
++100:819201:-1:-1:819201:819202:819203
++101:827393:-1:-1:827393:827394:827395
++102:835585:-1:-1:835585:835586:835587
++103:843777:-1:-1:843777:843778:843779
++104:851969:-1:-1:851969:851970:851971
++105:860161:-1:-1:860161:860162:860163
++106:868353:-1:-1:868353:868354:868355
++107:876545:-1:-1:876545:876546:876547
++108:884737:-1:-1:884737:884738:884739
++109:892929:-1:-1:892929:892930:892931
++110:901121:-1:-1:901121:901122:901123
++111:909313:-1:-1:909313:909314:909315
++112:917505:-1:-1:917505:917506:917507
++113:925697:-1:-1:925697:925698:925699
++114:933889:-1:-1:933889:933890:933891
++115:942081:-1:-1:942081:942082:942083
++116:950273:-1:-1:950273:950274:950275
++117:958465:-1:-1:958465:958466:958467
++118:966657:-1:-1:966657:966658:966659
++119:974849:-1:-1:974849:974850:974851
++120:983041:-1:-1:983041:983042:983043
++121:991233:-1:-1:991233:991234:991235
++122:999425:-1:-1:999425:999426:999427
++123:1007617:-1:-1:1007617:1007618:1007619
++124:1015809:-1:-1:1015809:1015810:1015811
++125:1024001:1024001:1024002-1024010:1024011:1024012:1024013
++126:1032193:-1:-1:1032193:1032194:1032195
++127:1040385:-1:-1:1040385:1040386:1040387
++128:1048577:-1:-1:1048577:1048578:1048579
++129:1056769:-1:-1:1056769:1056770:1056771
++130:1064961:-1:-1:1064961:1064962:1064963
++131:1073153:-1:-1:1073153:1073154:1073155
++132:1081345:-1:-1:1081345:1081346:1081347
++133:1089537:-1:-1:1089537:1089538:1089539
++134:1097729:-1:-1:1097729:1097730:1097731
++135:1105921:-1:-1:1105921:1105922:1105923
++136:1114113:-1:-1:1114113:1114114:1114115
++137:1122305:-1:-1:1122305:1122306:1122307
++138:1130497:-1:-1:1130497:1130498:1130499
++139:1138689:-1:-1:1138689:1138690:1138691
++140:1146881:-1:-1:1146881:1146882:1146883
++141:1155073:-1:-1:1155073:1155074:1155075
++142:1163265:-1:-1:1163265:1163266:1163267
++143:1171457:-1:-1:1171457:1171458:1171459
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit_expand_full/name b/tests/r_32to64bit_expand_full/name
new file mode 100644
index 0000000..34b08c7
--- /dev/null
+++ b/tests/r_32to64bit_expand_full/name
@@ -0,0 +1 @@
+convert+expand full fs to 64bit
diff --git a/tests/r_32to64bit_expand_full/script b/tests/r_32to64bit_expand_full/script
new file mode 100644
index 0000000..018f42c
--- /dev/null
+++ b/tests/r_32to64bit_expand_full/script
@@ -0,0 +1,81 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+#gzip -d < $EXP.gz > $EXP
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# check
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# convert it
+echo "resize2fs -b test.img" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+$DUMPE2FS -g $TMPFILE >> $OUT.before 2> /dev/null
+
+# grow it
+echo "resize2fs test.img" >> $OUT
+dd if=/dev/zero of=$TMPFILE conv=notrunc bs=1 count=1 seek=1207959552 2> /dev/null
+$RESIZE2FS -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+$DUMPE2FS -g $TMPFILE >> $OUT.after 2> /dev/null
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm $OUT.before $OUT.after
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_32to64bit_meta/expect b/tests/r_32to64bit_meta/expect
new file mode 100644
index 0000000..70babbd
--- /dev/null
+++ b/tests/r_32to64bit_meta/expect
@@ -0,0 +1,81 @@
+resize2fs test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 479 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -b
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 524288 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,12 +10,12 @@
+ Inode count: 65536
+ Block count: 524288
+ Reserved block count: 26214
+-Overhead clusters: 32912
+-Free blocks: 858
++Free blocks: 852
+ Free inodes: 65046
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
++Group descriptor size: 64
+ Blocks per group: 8192
+ Fragments per group: 8192
+ Inodes per group: 1024
+@@ -57,9 +57,9 @@
+ 12:98305:-1:-1:15:31:3107
+ 13:106497:-1:-1:16:32:3363
+ 14:114689:-1:-1:17:33:3619
+-15:122881:-1:-1:18:34:3875
+-16:131073:-1:-1:131073:131089:131105
+-17:139265:-1:-1:131074:131090:131361
++15:122881:-1:122881:18:34:3875
++16:131073:-1:131073:135201:131089:131105
++17:139265:-1:139265:131074:131090:131361
+ 18:147457:-1:-1:131075:131091:131617
+ 19:155649:-1:-1:131076:131092:131873
+ 20:163841:-1:-1:131077:131093:132129
+@@ -89,9 +89,9 @@
+ 44:360449:-1:-1:262158:262174:265250
+ 45:368641:-1:-1:262159:262175:265506
+ 46:376833:-1:-1:262160:262176:265762
+-47:385025:-1:-1:262161:262177:266018
+-48:393217:-1:-1:393217:393233:393249
+-49:401409:401409:-1:393218:393234:393505
++47:385025:-1:385025:262161:262177:266018
++48:393217:-1:393217:397345:393233:393249
++49:401409:401409:401410:393218:393234:393505
+ 50:409601:-1:-1:393219:393235:393761
+ 51:417793:-1:-1:393220:393236:394017
+ 52:425985:-1:-1:393221:393237:394273
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit_meta/name b/tests/r_32to64bit_meta/name
new file mode 100644
index 0000000..d83492e
--- /dev/null
+++ b/tests/r_32to64bit_meta/name
@@ -0,0 +1 @@
+convert meta_bg 32bit fs to 64bit fs
diff --git a/tests/r_32to64bit_meta/script b/tests/r_32to64bit_meta/script
new file mode 100644
index 0000000..20106fd
--- /dev/null
+++ b/tests/r_32to64bit_meta/script
@@ -0,0 +1,72 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,meta_bg,^resize_inode
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# resize it
+echo "resize2fs test.img -b" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_32to64bit_move_itable/expect b/tests/r_32to64bit_move_itable/expect
new file mode 100644
index 0000000..a1d2aeb
--- /dev/null
+++ b/tests/r_32to64bit_move_itable/expect
@@ -0,0 +1,108 @@
+resize2fs test
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 727 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -b
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 786432 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr dir_index filetype extent sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr dir_index filetype extent 64bit sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,12 +10,12 @@
+ Inode count: 98304
+ Block count: 786432
+ Reserved block count: 39321
+-Overhead clusters: 41193
+-Free blocks: 764
++Free blocks: 734
+ Free inodes: 97566
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
++Group descriptor size: 64
+ Blocks per group: 8192
+ Fragments per group: 8192
+ Inodes per group: 1024
+@@ -41,16 +41,16 @@
+
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-4:5:6:7
+-1:8193:8193:8194-8196:8197:8198:8199
++0:1:1:2-7:8:9:10
++1:8193:8193:8194-8199:8200:8201:8202
+ 2:16385:-1:-1:16385:16386:16387
+-3:24577:24577:24578-24580:24581:24582:24583
++3:24577:24577:24578-24583:24584:24585:24586
+ 4:32769:-1:-1:32769:32770:32771
+-5:40961:40961:40962-40964:40965:40966:40967
++5:40961:40961:40962-40967:40968:40969:40970
+ 6:49153:-1:-1:49153:49154:49155
+-7:57345:57345:57346-57348:57349:57350:57351
++7:57345:57345:57346-57351:57352:57353:57354
+ 8:65537:-1:-1:65537:65538:65539
+-9:73729:73729:73730-73732:73733:73734:73735
++9:73729:73729:73730-73735:73736:73737:73738
+ 10:81921:-1:-1:81921:81922:81923
+ 11:90113:-1:-1:90113:90114:90115
+ 12:98305:-1:-1:98305:98306:98307
+@@ -66,9 +66,9 @@
+ 22:180225:-1:-1:180225:180226:180227
+ 23:188417:-1:-1:188417:188418:188419
+ 24:196609:-1:-1:196609:196610:196611
+-25:204801:204801:204802-204804:204805:204806:204807
++25:204801:204801:204802-204807:204808:204809:204810
+ 26:212993:-1:-1:212993:212994:212995
+-27:221185:221185:221186-221188:221189:221190:221191
++27:221185:221185:221186-221191:221192:221193:221194
+ 28:229377:-1:-1:229377:229378:229379
+ 29:237569:-1:-1:237569:237570:237571
+ 30:245761:-1:-1:245761:245762:245763
+@@ -90,7 +90,7 @@
+ 46:376833:-1:-1:376833:376834:376835
+ 47:385025:-1:-1:385025:385026:385027
+ 48:393217:-1:-1:393217:393218:393219
+-49:401409:401409:401410-401412:401413:401414:401415
++49:401409:401409:401410-401415:401416:401417:401418
+ 50:409601:-1:-1:409601:409602:409603
+ 51:417793:-1:-1:417793:417794:417795
+ 52:425985:-1:-1:425985:425986:425987
+@@ -122,7 +122,7 @@
+ 78:638977:-1:-1:638977:638978:638979
+ 79:647169:-1:-1:647169:647170:647171
+ 80:655361:-1:-1:655361:655362:655363
+-81:663553:663553:663554-663556:663557:663558:663559
++81:663553:663553:663554-663559:663560:663561:663562
+ 82:671745:-1:-1:671745:671746:671747
+ 83:679937:-1:-1:679937:679938:679939
+ 84:688129:-1:-1:688129:688130:688131
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit_move_itable/name b/tests/r_32to64bit_move_itable/name
new file mode 100644
index 0000000..7dc2155
--- /dev/null
+++ b/tests/r_32to64bit_move_itable/name
@@ -0,0 +1 @@
+convert 32 to 64bit w/ itable move
diff --git a/tests/r_32to64bit_move_itable/script b/tests/r_32to64bit_move_itable/script
new file mode 100644
index 0000000..0748986
--- /dev/null
+++ b/tests/r_32to64bit_move_itable/script
@@ -0,0 +1,72 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# convert it
+echo "resize2fs test.img -b" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_64bit_big_expand/is_slow_test b/tests/r_64bit_big_expand/is_slow_test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/r_64bit_big_expand/is_slow_test
diff --git a/tests/r_64bit_big_expand/script b/tests/r_64bit_big_expand/script
new file mode 100644
index 0000000..d1bf8cd
--- /dev/null
+++ b/tests/r_64bit_big_expand/script
@@ -0,0 +1,35 @@
+test_description="very large fs growth using ext4 w/64bit"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FEATURES="-t ext4 -O 64bit"
+SIZE_1=512M
+SIZE_2=2T
+LOG=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
+ # creates a 2TB filesystem
+ echo "$test_name: $test_description: skipped for $os"
+ return 0
+fi
+
+. $cmd_dir/scripts/resize_test
+
+resize_test
+RC=$?
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+elif [ $RC -eq 111 ]; then
+ echo "$test_name: $test_description: skipped (no large sparse files)"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ ln $LOG $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
diff --git a/tests/r_64to32bit/expect b/tests/r_64to32bit/expect
new file mode 100644
index 0000000..eb609fb
--- /dev/null
+++ b/tests/r_64to32bit/expect
@@ -0,0 +1,99 @@
+resize2fs test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -s
+Converting the filesystem to 32-bit.
+The filesystem on test.img is now 524288 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,13 +10,11 @@
+ Inode count: 65536
+ Block count: 524288
+ Reserved block count: 26214
+-Overhead clusters: 35246
+-Free blocks: 571
++Free blocks: 589
+ Free inodes: 65048
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
+-Group descriptor size: 64
+ Reserved GDT blocks: 256
+ Blocks per group: 8192
+ Fragments per group: 8192
+@@ -44,16 +42,16 @@
+
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-5:262:278:294
+-1:8193:8193:8194-8197:263:279:550
++0:1:1:2-3:262:278:294
++1:8193:8193:8194-8195:263:279:550
+ 2:16385:-1:-1:264:280:806
+-3:24577:24577:24578-24581:265:281:1062
++3:24577:24577:24578-24579:265:281:1062
+ 4:32769:-1:-1:266:282:1318
+-5:40961:40961:40962-40965:267:283:1574
++5:40961:40961:40962-40963:267:283:1574
+ 6:49153:-1:-1:268:284:1830
+-7:57345:57345:57346-57349:269:285:2086
++7:57345:57345:57346-57347:269:285:2086
+ 8:65537:-1:-1:270:286:2342
+-9:73729:73729:73730-73733:271:287:2598
++9:73729:73729:73730-73731:271:287:2598
+ 10:81921:-1:-1:272:288:2854
+ 11:90113:-1:-1:273:289:3110
+ 12:98305:-1:-1:274:290:3366
+@@ -69,9 +67,9 @@
+ 22:180225:-1:-1:131079:131095:132641
+ 23:188417:-1:-1:131080:131096:132897
+ 24:196609:-1:-1:131081:131097:133153
+-25:204801:204801:204802-204805:131082:131098:133409
++25:204801:204801:204802-204803:131082:131098:133409
+ 26:212993:-1:-1:131083:131099:133665
+-27:221185:221185:221186-221189:131084:131100:133921
++27:221185:221185:221186-221187:131084:131100:133921
+ 28:229377:-1:-1:131085:131101:134177
+ 29:237569:-1:-1:131086:131102:134433
+ 30:245761:-1:-1:131087:131103:134689
+@@ -93,7 +91,7 @@
+ 46:376833:-1:-1:262159:262175:265761
+ 47:385025:-1:-1:262160:262176:266017
+ 48:393217:-1:-1:393217:393233:393249
+-49:401409:401409:401410-401413:393218:393234:393505
++49:401409:401409:401410-401411:393218:393234:393505
+ 50:409601:-1:-1:393219:393235:393761
+ 51:417793:-1:-1:393220:393236:394017
+ 52:425985:-1:-1:393221:393237:394273
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_64to32bit/name b/tests/r_64to32bit/name
new file mode 100644
index 0000000..4c82371
--- /dev/null
+++ b/tests/r_64to32bit/name
@@ -0,0 +1 @@
+convert flex_bg 64bit fs to 32bit fs
diff --git a/tests/r_64to32bit/script b/tests/r_64to32bit/script
new file mode 100644
index 0000000..df2b545
--- /dev/null
+++ b/tests/r_64to32bit/script
@@ -0,0 +1,74 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# resize it
+echo "resize2fs test.img -s" >> $OUT
+$RESIZE2FS -s -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm $OUT.before $OUT.after
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_64to32bit_meta/expect b/tests/r_64to32bit_meta/expect
new file mode 100644
index 0000000..7065590
--- /dev/null
+++ b/tests/r_64to32bit_meta/expect
@@ -0,0 +1,81 @@
+resize2fs test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 479 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -s
+Converting the filesystem to 32-bit.
+The filesystem on test.img is now 524288 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,13 +10,11 @@
+ Inode count: 65536
+ Block count: 524288
+ Reserved block count: 26214
+-Overhead clusters: 32918
+-Free blocks: 852
++Free blocks: 858
+ Free inodes: 65046
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
+-Group descriptor size: 64
+ Blocks per group: 8192
+ Fragments per group: 8192
+ Inodes per group: 1024
+@@ -58,9 +56,9 @@
+ 12:98305:-1:-1:15:31:3107
+ 13:106497:-1:-1:16:32:3363
+ 14:114689:-1:-1:17:33:3619
+-15:122881:-1:122881:18:34:3875
+-16:131073:-1:131073:131074:131090:131106
+-17:139265:-1:139265:131075:131091:131362
++15:122881:-1:-1:18:34:3875
++16:131073:-1:-1:131074:131090:131106
++17:139265:-1:-1:131075:131091:131362
+ 18:147457:-1:-1:131076:131092:131618
+ 19:155649:-1:-1:131077:131093:131874
+ 20:163841:-1:-1:131078:131094:132130
+@@ -90,9 +88,9 @@
+ 44:360449:-1:-1:262158:262174:265250
+ 45:368641:-1:-1:262159:262175:265506
+ 46:376833:-1:-1:262160:262176:265762
+-47:385025:-1:385025:262161:262177:266018
+-48:393217:-1:393217:393218:393234:393250
+-49:401409:401409:401410:393219:393235:393506
++47:385025:-1:-1:262161:262177:266018
++48:393217:-1:-1:393218:393234:393250
++49:401409:401409:-1:393219:393235:393506
+ 50:409601:-1:-1:393220:393236:393762
+ 51:417793:-1:-1:393221:393237:394018
+ 52:425985:-1:-1:393222:393238:394274
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_64to32bit_meta/name b/tests/r_64to32bit_meta/name
new file mode 100644
index 0000000..e99ed8b
--- /dev/null
+++ b/tests/r_64to32bit_meta/name
@@ -0,0 +1 @@
+convert meta_bg 64bit fs to 32bit fs
diff --git a/tests/r_64to32bit_meta/script b/tests/r_64to32bit_meta/script
new file mode 100644
index 0000000..5ee9f02
--- /dev/null
+++ b/tests/r_64to32bit_meta/script
@@ -0,0 +1,74 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,meta_bg,^resize_inode,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# resize it
+echo "resize2fs test.img -s" >> $OUT
+$RESIZE2FS -s -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm $OUT.before $OUT.after
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_bigalloc_big_expand/script b/tests/r_bigalloc_big_expand/script
new file mode 100644
index 0000000..101aafb
--- /dev/null
+++ b/tests/r_bigalloc_big_expand/script
@@ -0,0 +1,36 @@
+test_description="ext4 with bigalloc"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FEATURES="-t ext4 -O bigalloc"
+SIZE_1=512M
+SIZE_2=2T
+LOG=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+RESIZE2FS_OPTS=-f
+
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
+ # creates a 2TB filesystem
+ echo "$test_name: $test_description: skipped for $os"
+ return 0
+fi
+
+. $cmd_dir/scripts/resize_test
+
+resize_test
+RC=$?
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+elif [ $RC -eq 111 ]; then
+ echo "$test_name: $test_description: skipped (no large sparse files)"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ ln $LOG $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
diff --git a/tests/r_corrupt_fs/expect b/tests/r_corrupt_fs/expect
new file mode 100644
index 0000000..fe0f2bc
--- /dev/null
+++ b/tests/r_corrupt_fs/expect
@@ -0,0 +1,4 @@
+mke2fs -q -F -t ext4 -o Linux -b 1024 test.img 32M
+debugfs -w -R "set_bg 1 free_blocks_count 65536" /tmp/foo.img
+resize2fs -P /tmp/foo.img
+Estimated minimum size of the filesystem: 6604
diff --git a/tests/r_corrupt_fs/name b/tests/r_corrupt_fs/name
new file mode 100644
index 0000000..ed62741
--- /dev/null
+++ b/tests/r_corrupt_fs/name
@@ -0,0 +1 @@
+resize2fs -P of a corrupted file system
diff --git a/tests/r_corrupt_fs/script b/tests/r_corrupt_fs/script
new file mode 100644
index 0000000..f6d3a89
--- /dev/null
+++ b/tests/r_corrupt_fs/script
@@ -0,0 +1,45 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+echo mke2fs -q -F -t ext4 -o Linux -b 1024 test.img 32M > $OUT.new
+$MKE2FS -q -F -t ext4 -o Linux -b 1024 $TMPFILE 32M >> $OUT.new 2>&1
+
+echo debugfs -w -R \"set_bg 1 free_blocks_count 65536\" /tmp/foo.img >> $OUT.new
+$DEBUGFS -w -R "set_bg 1 free_blocks_count 65536" $TMPFILE > /dev/null 2>&1
+
+if timeout -v 1s true > /dev/null 2>&1 ; then
+ TIMEOUT="timeout -v 30s"
+else
+ TIMEOUT=
+fi
+
+echo resize2fs -P /tmp/foo.img >> $OUT.new
+$TIMEOUT $RESIZE2FS -P $TMPFILE >> $OUT.new 2>&1
+
+sed -f $cmd_dir/filter.sed < $OUT.new > $OUT
+
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE OUT EXP TIMEOUT
diff --git a/tests/r_expand_full/expect b/tests/r_expand_full/expect
new file mode 100644
index 0000000..c80baa2
--- /dev/null
+++ b/tests/r_expand_full/expect
@@ -0,0 +1,375 @@
+resize2fs test
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 727 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img
+Resizing the filesystem on test.img to 3145728 (1k) blocks.
+The filesystem on test.img is now 3145728 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -1,15 +1,15 @@
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-4:5:6:7
+-1:8193:8193:8194-8196:8197:8198:8199
++0:1:1:2-13:263:264:265
++1:8193:8193:8194-8205:8455:8456:8457
+ 2:16385:-1:-1:16385:16386:16387
+-3:24577:24577:24578-24580:24581:24582:24583
++3:24577:24577:24578-24589:24839:24840:24841
+ 4:32769:-1:-1:32769:32770:32771
+-5:40961:40961:40962-40964:40965:40966:40967
++5:40961:40961:40962-40973:41223:41224:41225
+ 6:49153:-1:-1:49153:49154:49155
+-7:57345:57345:57346-57348:57349:57350:57351
++7:57345:57345:57346-57357:57607:57608:57609
+ 8:65537:-1:-1:65537:65538:65539
+-9:73729:73729:73730-73732:73733:73734:73735
++9:73729:73729:73730-73741:73991:73992:73993
+ 10:81921:-1:-1:81921:81922:81923
+ 11:90113:-1:-1:90113:90114:90115
+ 12:98305:-1:-1:98305:98306:98307
+@@ -25,9 +25,9 @@
+ 22:180225:-1:-1:180225:180226:180227
+ 23:188417:-1:-1:188417:188418:188419
+ 24:196609:-1:-1:196609:196610:196611
+-25:204801:204801:204802-204804:204805:204806:204807
++25:204801:204801:204802-204813:205063:205064:205065
+ 26:212993:-1:-1:212993:212994:212995
+-27:221185:221185:221186-221188:221189:221190:221191
++27:221185:221185:221186-221197:221447:221448:221449
+ 28:229377:-1:-1:229377:229378:229379
+ 29:237569:-1:-1:237569:237570:237571
+ 30:245761:-1:-1:245761:245762:245763
+@@ -49,7 +49,7 @@
+ 46:376833:-1:-1:376833:376834:376835
+ 47:385025:-1:-1:385025:385026:385027
+ 48:393217:-1:-1:393217:393218:393219
+-49:401409:401409:401410-401412:401413:401414:401415
++49:401409:401409:401410-401421:401671:401672:401673
+ 50:409601:-1:-1:409601:409602:409603
+ 51:417793:-1:-1:417793:417794:417795
+ 52:425985:-1:-1:425985:425986:425987
+@@ -81,7 +81,7 @@
+ 78:638977:-1:-1:638977:638978:638979
+ 79:647169:-1:-1:647169:647170:647171
+ 80:655361:-1:-1:655361:655362:655363
+-81:663553:663553:663554-663556:663557:663558:663559
++81:663553:663553:663554-663565:663815:663816:663817
+ 82:671745:-1:-1:671745:671746:671747
+ 83:679937:-1:-1:679937:679938:679939
+ 84:688129:-1:-1:688129:688130:688131
+@@ -96,3 +96,291 @@
+ 93:761857:-1:-1:761857:761858:761859
+ 94:770049:-1:-1:770049:770050:770051
+ 95:778241:-1:-1:778241:778242:778243
++96:786433:-1:-1:786433:786434:786435
++97:794625:-1:-1:794625:794626:794627
++98:802817:-1:-1:802817:802818:802819
++99:811009:-1:-1:811009:811010:811011
++100:819201:-1:-1:819201:819202:819203
++101:827393:-1:-1:827393:827394:827395
++102:835585:-1:-1:835585:835586:835587
++103:843777:-1:-1:843777:843778:843779
++104:851969:-1:-1:851969:851970:851971
++105:860161:-1:-1:860161:860162:860163
++106:868353:-1:-1:868353:868354:868355
++107:876545:-1:-1:876545:876546:876547
++108:884737:-1:-1:884737:884738:884739
++109:892929:-1:-1:892929:892930:892931
++110:901121:-1:-1:901121:901122:901123
++111:909313:-1:-1:909313:909314:909315
++112:917505:-1:-1:917505:917506:917507
++113:925697:-1:-1:925697:925698:925699
++114:933889:-1:-1:933889:933890:933891
++115:942081:-1:-1:942081:942082:942083
++116:950273:-1:-1:950273:950274:950275
++117:958465:-1:-1:958465:958466:958467
++118:966657:-1:-1:966657:966658:966659
++119:974849:-1:-1:974849:974850:974851
++120:983041:-1:-1:983041:983042:983043
++121:991233:-1:-1:991233:991234:991235
++122:999425:-1:-1:999425:999426:999427
++123:1007617:-1:-1:1007617:1007618:1007619
++124:1015809:-1:-1:1015809:1015810:1015811
++125:1024001:1024001:1024002-1024013:1024014:1024015:1024016
++126:1032193:-1:-1:1032193:1032194:1032195
++127:1040385:-1:-1:1040385:1040386:1040387
++128:1048577:-1:-1:1048577:1048578:1048579
++129:1056769:-1:-1:1056769:1056770:1056771
++130:1064961:-1:-1:1064961:1064962:1064963
++131:1073153:-1:-1:1073153:1073154:1073155
++132:1081345:-1:-1:1081345:1081346:1081347
++133:1089537:-1:-1:1089537:1089538:1089539
++134:1097729:-1:-1:1097729:1097730:1097731
++135:1105921:-1:-1:1105921:1105922:1105923
++136:1114113:-1:-1:1114113:1114114:1114115
++137:1122305:-1:-1:1122305:1122306:1122307
++138:1130497:-1:-1:1130497:1130498:1130499
++139:1138689:-1:-1:1138689:1138690:1138691
++140:1146881:-1:-1:1146881:1146882:1146883
++141:1155073:-1:-1:1155073:1155074:1155075
++142:1163265:-1:-1:1163265:1163266:1163267
++143:1171457:-1:-1:1171457:1171458:1171459
++144:1179649:-1:-1:1179649:1179650:1179651
++145:1187841:-1:-1:1187841:1187842:1187843
++146:1196033:-1:-1:1196033:1196034:1196035
++147:1204225:-1:-1:1204225:1204226:1204227
++148:1212417:-1:-1:1212417:1212418:1212419
++149:1220609:-1:-1:1220609:1220610:1220611
++150:1228801:-1:-1:1228801:1228802:1228803
++151:1236993:-1:-1:1236993:1236994:1236995
++152:1245185:-1:-1:1245185:1245186:1245187
++153:1253377:-1:-1:1253377:1253378:1253379
++154:1261569:-1:-1:1261569:1261570:1261571
++155:1269761:-1:-1:1269761:1269762:1269763
++156:1277953:-1:-1:1277953:1277954:1277955
++157:1286145:-1:-1:1286145:1286146:1286147
++158:1294337:-1:-1:1294337:1294338:1294339
++159:1302529:-1:-1:1302529:1302530:1302531
++160:1310721:-1:-1:1310721:1310722:1310723
++161:1318913:-1:-1:1318913:1318914:1318915
++162:1327105:-1:-1:1327105:1327106:1327107
++163:1335297:-1:-1:1335297:1335298:1335299
++164:1343489:-1:-1:1343489:1343490:1343491
++165:1351681:-1:-1:1351681:1351682:1351683
++166:1359873:-1:-1:1359873:1359874:1359875
++167:1368065:-1:-1:1368065:1368066:1368067
++168:1376257:-1:-1:1376257:1376258:1376259
++169:1384449:-1:-1:1384449:1384450:1384451
++170:1392641:-1:-1:1392641:1392642:1392643
++171:1400833:-1:-1:1400833:1400834:1400835
++172:1409025:-1:-1:1409025:1409026:1409027
++173:1417217:-1:-1:1417217:1417218:1417219
++174:1425409:-1:-1:1425409:1425410:1425411
++175:1433601:-1:-1:1433601:1433602:1433603
++176:1441793:-1:-1:1441793:1441794:1441795
++177:1449985:-1:-1:1449985:1449986:1449987
++178:1458177:-1:-1:1458177:1458178:1458179
++179:1466369:-1:-1:1466369:1466370:1466371
++180:1474561:-1:-1:1474561:1474562:1474563
++181:1482753:-1:-1:1482753:1482754:1482755
++182:1490945:-1:-1:1490945:1490946:1490947
++183:1499137:-1:-1:1499137:1499138:1499139
++184:1507329:-1:-1:1507329:1507330:1507331
++185:1515521:-1:-1:1515521:1515522:1515523
++186:1523713:-1:-1:1523713:1523714:1523715
++187:1531905:-1:-1:1531905:1531906:1531907
++188:1540097:-1:-1:1540097:1540098:1540099
++189:1548289:-1:-1:1548289:1548290:1548291
++190:1556481:-1:-1:1556481:1556482:1556483
++191:1564673:-1:-1:1564673:1564674:1564675
++192:1572865:-1:-1:1572865:1572866:1572867
++193:1581057:-1:-1:1581057:1581058:1581059
++194:1589249:-1:-1:1589249:1589250:1589251
++195:1597441:-1:-1:1597441:1597442:1597443
++196:1605633:-1:-1:1605633:1605634:1605635
++197:1613825:-1:-1:1613825:1613826:1613827
++198:1622017:-1:-1:1622017:1622018:1622019
++199:1630209:-1:-1:1630209:1630210:1630211
++200:1638401:-1:-1:1638401:1638402:1638403
++201:1646593:-1:-1:1646593:1646594:1646595
++202:1654785:-1:-1:1654785:1654786:1654787
++203:1662977:-1:-1:1662977:1662978:1662979
++204:1671169:-1:-1:1671169:1671170:1671171
++205:1679361:-1:-1:1679361:1679362:1679363
++206:1687553:-1:-1:1687553:1687554:1687555
++207:1695745:-1:-1:1695745:1695746:1695747
++208:1703937:-1:-1:1703937:1703938:1703939
++209:1712129:-1:-1:1712129:1712130:1712131
++210:1720321:-1:-1:1720321:1720322:1720323
++211:1728513:-1:-1:1728513:1728514:1728515
++212:1736705:-1:-1:1736705:1736706:1736707
++213:1744897:-1:-1:1744897:1744898:1744899
++214:1753089:-1:-1:1753089:1753090:1753091
++215:1761281:-1:-1:1761281:1761282:1761283
++216:1769473:-1:-1:1769473:1769474:1769475
++217:1777665:-1:-1:1777665:1777666:1777667
++218:1785857:-1:-1:1785857:1785858:1785859
++219:1794049:-1:-1:1794049:1794050:1794051
++220:1802241:-1:-1:1802241:1802242:1802243
++221:1810433:-1:-1:1810433:1810434:1810435
++222:1818625:-1:-1:1818625:1818626:1818627
++223:1826817:-1:-1:1826817:1826818:1826819
++224:1835009:-1:-1:1835009:1835010:1835011
++225:1843201:-1:-1:1843201:1843202:1843203
++226:1851393:-1:-1:1851393:1851394:1851395
++227:1859585:-1:-1:1859585:1859586:1859587
++228:1867777:-1:-1:1867777:1867778:1867779
++229:1875969:-1:-1:1875969:1875970:1875971
++230:1884161:-1:-1:1884161:1884162:1884163
++231:1892353:-1:-1:1892353:1892354:1892355
++232:1900545:-1:-1:1900545:1900546:1900547
++233:1908737:-1:-1:1908737:1908738:1908739
++234:1916929:-1:-1:1916929:1916930:1916931
++235:1925121:-1:-1:1925121:1925122:1925123
++236:1933313:-1:-1:1933313:1933314:1933315
++237:1941505:-1:-1:1941505:1941506:1941507
++238:1949697:-1:-1:1949697:1949698:1949699
++239:1957889:-1:-1:1957889:1957890:1957891
++240:1966081:-1:-1:1966081:1966082:1966083
++241:1974273:-1:-1:1974273:1974274:1974275
++242:1982465:-1:-1:1982465:1982466:1982467
++243:1990657:1990657:1990658-1990669:1990670:1990671:1990672
++244:1998849:-1:-1:1998849:1998850:1998851
++245:2007041:-1:-1:2007041:2007042:2007043
++246:2015233:-1:-1:2015233:2015234:2015235
++247:2023425:-1:-1:2023425:2023426:2023427
++248:2031617:-1:-1:2031617:2031618:2031619
++249:2039809:-1:-1:2039809:2039810:2039811
++250:2048001:-1:-1:2048001:2048002:2048003
++251:2056193:-1:-1:2056193:2056194:2056195
++252:2064385:-1:-1:2064385:2064386:2064387
++253:2072577:-1:-1:2072577:2072578:2072579
++254:2080769:-1:-1:2080769:2080770:2080771
++255:2088961:-1:-1:2088961:2088962:2088963
++256:2097153:-1:-1:2097153:2097154:2097155
++257:2105345:-1:-1:2105345:2105346:2105347
++258:2113537:-1:-1:2113537:2113538:2113539
++259:2121729:-1:-1:2121729:2121730:2121731
++260:2129921:-1:-1:2129921:2129922:2129923
++261:2138113:-1:-1:2138113:2138114:2138115
++262:2146305:-1:-1:2146305:2146306:2146307
++263:2154497:-1:-1:2154497:2154498:2154499
++264:2162689:-1:-1:2162689:2162690:2162691
++265:2170881:-1:-1:2170881:2170882:2170883
++266:2179073:-1:-1:2179073:2179074:2179075
++267:2187265:-1:-1:2187265:2187266:2187267
++268:2195457:-1:-1:2195457:2195458:2195459
++269:2203649:-1:-1:2203649:2203650:2203651
++270:2211841:-1:-1:2211841:2211842:2211843
++271:2220033:-1:-1:2220033:2220034:2220035
++272:2228225:-1:-1:2228225:2228226:2228227
++273:2236417:-1:-1:2236417:2236418:2236419
++274:2244609:-1:-1:2244609:2244610:2244611
++275:2252801:-1:-1:2252801:2252802:2252803
++276:2260993:-1:-1:2260993:2260994:2260995
++277:2269185:-1:-1:2269185:2269186:2269187
++278:2277377:-1:-1:2277377:2277378:2277379
++279:2285569:-1:-1:2285569:2285570:2285571
++280:2293761:-1:-1:2293761:2293762:2293763
++281:2301953:-1:-1:2301953:2301954:2301955
++282:2310145:-1:-1:2310145:2310146:2310147
++283:2318337:-1:-1:2318337:2318338:2318339
++284:2326529:-1:-1:2326529:2326530:2326531
++285:2334721:-1:-1:2334721:2334722:2334723
++286:2342913:-1:-1:2342913:2342914:2342915
++287:2351105:-1:-1:2351105:2351106:2351107
++288:2359297:-1:-1:2359297:2359298:2359299
++289:2367489:-1:-1:2367489:2367490:2367491
++290:2375681:-1:-1:2375681:2375682:2375683
++291:2383873:-1:-1:2383873:2383874:2383875
++292:2392065:-1:-1:2392065:2392066:2392067
++293:2400257:-1:-1:2400257:2400258:2400259
++294:2408449:-1:-1:2408449:2408450:2408451
++295:2416641:-1:-1:2416641:2416642:2416643
++296:2424833:-1:-1:2424833:2424834:2424835
++297:2433025:-1:-1:2433025:2433026:2433027
++298:2441217:-1:-1:2441217:2441218:2441219
++299:2449409:-1:-1:2449409:2449410:2449411
++300:2457601:-1:-1:2457601:2457602:2457603
++301:2465793:-1:-1:2465793:2465794:2465795
++302:2473985:-1:-1:2473985:2473986:2473987
++303:2482177:-1:-1:2482177:2482178:2482179
++304:2490369:-1:-1:2490369:2490370:2490371
++305:2498561:-1:-1:2498561:2498562:2498563
++306:2506753:-1:-1:2506753:2506754:2506755
++307:2514945:-1:-1:2514945:2514946:2514947
++308:2523137:-1:-1:2523137:2523138:2523139
++309:2531329:-1:-1:2531329:2531330:2531331
++310:2539521:-1:-1:2539521:2539522:2539523
++311:2547713:-1:-1:2547713:2547714:2547715
++312:2555905:-1:-1:2555905:2555906:2555907
++313:2564097:-1:-1:2564097:2564098:2564099
++314:2572289:-1:-1:2572289:2572290:2572291
++315:2580481:-1:-1:2580481:2580482:2580483
++316:2588673:-1:-1:2588673:2588674:2588675
++317:2596865:-1:-1:2596865:2596866:2596867
++318:2605057:-1:-1:2605057:2605058:2605059
++319:2613249:-1:-1:2613249:2613250:2613251
++320:2621441:-1:-1:2621441:2621442:2621443
++321:2629633:-1:-1:2629633:2629634:2629635
++322:2637825:-1:-1:2637825:2637826:2637827
++323:2646017:-1:-1:2646017:2646018:2646019
++324:2654209:-1:-1:2654209:2654210:2654211
++325:2662401:-1:-1:2662401:2662402:2662403
++326:2670593:-1:-1:2670593:2670594:2670595
++327:2678785:-1:-1:2678785:2678786:2678787
++328:2686977:-1:-1:2686977:2686978:2686979
++329:2695169:-1:-1:2695169:2695170:2695171
++330:2703361:-1:-1:2703361:2703362:2703363
++331:2711553:-1:-1:2711553:2711554:2711555
++332:2719745:-1:-1:2719745:2719746:2719747
++333:2727937:-1:-1:2727937:2727938:2727939
++334:2736129:-1:-1:2736129:2736130:2736131
++335:2744321:-1:-1:2744321:2744322:2744323
++336:2752513:-1:-1:2752513:2752514:2752515
++337:2760705:-1:-1:2760705:2760706:2760707
++338:2768897:-1:-1:2768897:2768898:2768899
++339:2777089:-1:-1:2777089:2777090:2777091
++340:2785281:-1:-1:2785281:2785282:2785283
++341:2793473:-1:-1:2793473:2793474:2793475
++342:2801665:-1:-1:2801665:2801666:2801667
++343:2809857:2809857:2809858-2809869:2809870:2809871:2809872
++344:2818049:-1:-1:2818049:2818050:2818051
++345:2826241:-1:-1:2826241:2826242:2826243
++346:2834433:-1:-1:2834433:2834434:2834435
++347:2842625:-1:-1:2842625:2842626:2842627
++348:2850817:-1:-1:2850817:2850818:2850819
++349:2859009:-1:-1:2859009:2859010:2859011
++350:2867201:-1:-1:2867201:2867202:2867203
++351:2875393:-1:-1:2875393:2875394:2875395
++352:2883585:-1:-1:2883585:2883586:2883587
++353:2891777:-1:-1:2891777:2891778:2891779
++354:2899969:-1:-1:2899969:2899970:2899971
++355:2908161:-1:-1:2908161:2908162:2908163
++356:2916353:-1:-1:2916353:2916354:2916355
++357:2924545:-1:-1:2924545:2924546:2924547
++358:2932737:-1:-1:2932737:2932738:2932739
++359:2940929:-1:-1:2940929:2940930:2940931
++360:2949121:-1:-1:2949121:2949122:2949123
++361:2957313:-1:-1:2957313:2957314:2957315
++362:2965505:-1:-1:2965505:2965506:2965507
++363:2973697:-1:-1:2973697:2973698:2973699
++364:2981889:-1:-1:2981889:2981890:2981891
++365:2990081:-1:-1:2990081:2990082:2990083
++366:2998273:-1:-1:2998273:2998274:2998275
++367:3006465:-1:-1:3006465:3006466:3006467
++368:3014657:-1:-1:3014657:3014658:3014659
++369:3022849:-1:-1:3022849:3022850:3022851
++370:3031041:-1:-1:3031041:3031042:3031043
++371:3039233:-1:-1:3039233:3039234:3039235
++372:3047425:-1:-1:3047425:3047426:3047427
++373:3055617:-1:-1:3055617:3055618:3055619
++374:3063809:-1:-1:3063809:3063810:3063811
++375:3072001:-1:-1:3072001:3072002:3072003
++376:3080193:-1:-1:3080193:3080194:3080195
++377:3088385:-1:-1:3088385:3088386:3088387
++378:3096577:-1:-1:3096577:3096578:3096579
++379:3104769:-1:-1:3104769:3104770:3104771
++380:3112961:-1:-1:3112961:3112962:3112963
++381:3121153:-1:-1:3121153:3121154:3121155
++382:3129345:-1:-1:3129345:3129346:3129347
++383:3137537:-1:-1:3137537:3137538:3137539
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_expand_full/name b/tests/r_expand_full/name
new file mode 100644
index 0000000..af40cba
--- /dev/null
+++ b/tests/r_expand_full/name
@@ -0,0 +1 @@
+expand a totally full filesystem
diff --git a/tests/r_expand_full/script b/tests/r_expand_full/script
new file mode 100644
index 0000000..8b25652
--- /dev/null
+++ b/tests/r_expand_full/script
@@ -0,0 +1,83 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+#gzip -d < $EXP.gz > $EXP
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+if [ $(uname -s) = "Darwin" ]; then
+ # creates a 786MB filesystem
+ echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
+ return 0
+fi
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+$DUMPE2FS -g $TMPFILE >> $OUT.before 2> /dev/null
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# convert it
+echo "resize2fs test.img" >> $OUT
+$DD if=/dev/zero of=$TMPFILE conv=notrunc bs=1 count=1 seek=3221225471 2> /dev/null
+$RESIZE2FS -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+$DUMPE2FS -g $TMPFILE >> $OUT.after 2> /dev/null
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm $OUT.before $OUT.after
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_ext4_big_expand/is_slow_test b/tests/r_ext4_big_expand/is_slow_test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/r_ext4_big_expand/is_slow_test
diff --git a/tests/r_ext4_big_expand/script b/tests/r_ext4_big_expand/script
new file mode 100644
index 0000000..a49e4c3
--- /dev/null
+++ b/tests/r_ext4_big_expand/script
@@ -0,0 +1,35 @@
+test_description="very large fs growth using ext4"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FEATURES="-t ext4"
+SIZE_1=512M
+SIZE_2=2T
+LOG=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
+ # creates a 2TB filesystem
+ echo "$test_name: $test_description: skipped for FreeBSD"
+ return 0
+fi
+
+. $cmd_dir/scripts/resize_test
+
+resize_test
+RC=$?
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+elif [ $RC -eq 111 ]; then
+ echo "$test_name: $test_description: skipped (no large sparse files)"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ ln $LOG $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
diff --git a/tests/r_ext4_small_bg/script b/tests/r_ext4_small_bg/script
new file mode 100644
index 0000000..ac7556c
--- /dev/null
+++ b/tests/r_ext4_small_bg/script
@@ -0,0 +1,29 @@
+test_description="ext4 1024 blocksize with small block groups"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FEATURES="-t ext4 -O ^resize_inode -b 1024 -g 512"
+SIZE_1=64M
+SIZE_2=2G
+LOG=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+
+
+. $cmd_dir/scripts/resize_test
+
+resize_test
+RC=$?
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+elif [ $RC -eq 111 ]; then
+ echo "$test_name: $test_description: skipped (no large sparse files)"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ ln $LOG $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
diff --git a/tests/r_fixup_lastbg/expect b/tests/r_fixup_lastbg/expect
new file mode 100644
index 0000000..96b154a
--- /dev/null
+++ b/tests/r_fixup_lastbg/expect
@@ -0,0 +1,39 @@
+Creating filesystem with 20000 1k blocks and 1248 inodes
+Superblock backups stored on blocks:
+ 8193
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (1024 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Group 2: (Blocks 16385-19999) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 83 (bg #0 + 82)
+ Inode bitmap at 86 (bg #0 + 85)
+ Inode table at 295-398 (bg #0 + 294)
+ 3615 free blocks, 416 free inodes, 0 directories, 416 unused inodes
+ Free blocks: 16385-19999
+ Free inodes: 833-1248
+Group 2: (Blocks 16385-19999)
+ Block bitmap at 83 (bg #0 + 82)
+ Inode bitmap at 86 (bg #0 + 85)
+ Inode table at 295-398 (bg #0 + 294)
+ 3615 free blocks, 416 free inodes, 0 directories
+ Free blocks: 16385-19999
+ Free inodes: 833-1248
+Resizing the filesystem on test.img to 20004 (1k) blocks.
+The filesystem on test.img is now 20004 (1k) blocks long.
+
+Group 2: (Blocks 16385-20003) [INODE_UNINIT]
+ Block bitmap at 83 (bg #0 + 82)
+ Inode bitmap at 86 (bg #0 + 85)
+ Inode table at 295-398 (bg #0 + 294)
+ 3619 free blocks, 416 free inodes, 0 directories, 416 unused inodes
+ Free blocks: 16385-20003
+ Free inodes: 833-1248
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test.img: 11/1248 files (0.0% non-contiguous), 1517/20004 blocks
diff --git a/tests/r_fixup_lastbg/script b/tests/r_fixup_lastbg/script
new file mode 100755
index 0000000..2a54aa7
--- /dev/null
+++ b/tests/r_fixup_lastbg/script
@@ -0,0 +1,35 @@
+test_description="fix up last bg when expanding within the last bg"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+EXP=$test_dir/expect
+OUT=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+
+$MKE2FS -T ext4 -o Linux -b 1024 -F -U 56d3ee50-8532-4f29-8181-d7c6ea4a94a6 $TMPFILE 20000 > $OUT 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
+$DEBUGFS -R "set_bg 2 itable_unused 0" -w $TMPFILE > /dev/null 2>&1
+$DEBUGFS -R "set_bg 2 flags 0" -w $TMPFILE > /dev/null 2>&1
+$DEBUGFS -R "set_bg 2 checksum 0xd318" -w $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
+#dd if=/dev/zero of=$TMPFILE bs=1 count=1 seek=$((1024 * 20004)) conv=notrunc >> $OUT 2> /dev/null
+$RESIZE2FS_EXE -f -p $TMPFILE 20004 >> $OUT 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
+$E2FSCK -fy $TMPFILE >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+if [ $status -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT > $test_name.failed
+fi
+
+unset EXP OUT E2FSCK
diff --git a/tests/r_fixup_lastbg_big/expect b/tests/r_fixup_lastbg_big/expect
new file mode 100644
index 0000000..edaabaf
--- /dev/null
+++ b/tests/r_fixup_lastbg_big/expect
@@ -0,0 +1,45 @@
+Creating filesystem with 20000 1k blocks and 1248 inodes
+Superblock backups stored on blocks:
+ 8193
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (1024 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Group 2: (Blocks 16385-19999) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 83 (bg #0 + 82)
+ Inode bitmap at 86 (bg #0 + 85)
+ Inode table at 295-398 (bg #0 + 294)
+ 3615 free blocks, 416 free inodes, 0 directories, 416 unused inodes
+ Free blocks: 16385-19999
+ Free inodes: 833-1248
+Group 2: (Blocks 16385-19999)
+ Block bitmap at 83 (bg #0 + 82)
+ Inode bitmap at 86 (bg #0 + 85)
+ Inode table at 295-398 (bg #0 + 294)
+ 3615 free blocks, 416 free inodes, 0 directories
+ Free blocks: 16385-19999
+ Free inodes: 833-1248
+Resizing the filesystem on test.img to 40000 (1k) blocks.
+Begin pass 1 (max = 2)
+Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 40000 (1k) blocks long.
+
+Group 2: (Blocks 16385-24576) [INODE_UNINIT, BLOCK_UNINIT]
+ Block bitmap at 83 (bg #0 + 82)
+ Inode bitmap at 86 (bg #0 + 85)
+ Inode table at 295-398 (bg #0 + 294)
+ 8192 free blocks, 416 free inodes, 0 directories, 416 unused inodes
+ Free blocks: 16385-24576
+ Free inodes: 833-1248
+Group 3: (Blocks 24577-32768) [INODE_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 24577, Group descriptors at 24578-24578
+ Reserved GDT blocks at 24579-24656
+ Block bitmap at 413 (bg #0 + 412)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test.img: 11/2080 files (0.0% non-contiguous), 1809/40000 blocks
diff --git a/tests/r_fixup_lastbg_big/script b/tests/r_fixup_lastbg_big/script
new file mode 100755
index 0000000..c13f731
--- /dev/null
+++ b/tests/r_fixup_lastbg_big/script
@@ -0,0 +1,40 @@
+test_description="fix up last bg when expanding beyond the last bg"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+EXP=$test_dir/expect
+OUT=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+
+$MKE2FS -T ext4 -o Linux -b 1024 -F -U 56d3ee50-8532-4f29-8181-d7c6ea4a94a6 $TMPFILE 20000 > $OUT 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
+$DEBUGFS -R "set_bg 2 itable_unused 0" -w $TMPFILE > /dev/null 2>&1
+$DEBUGFS -R "set_bg 2 flags 0" -w $TMPFILE > /dev/null 2>&1
+$DEBUGFS -R "set_bg 2 checksum 0xd318" -w $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
+dd if=/dev/zero of=$TMPFILE bs=1 count=1 seek=$((1024 * 40000)) conv=notrunc >> $OUT 2> /dev/null
+(
+RESIZE2FS_FORCE_ITABLE_INIT=1
+export RESIZE2FS_FORCE_ITABLE_INIT
+unset RESIZE2FS_FORCE_LAZY_ITABLE_INIT
+$RESIZE2FS_EXE -f -p $TMPFILE >> $OUT 2>&1
+)
+$DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
+$E2FSCK -fy $TMPFILE >> $OUT 2>&1
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+if [ $status -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP $OUT > $test_name.failed
+fi
+
+unset EXP OUT E2FSCK
diff --git a/tests/r_inline_xattr/expect b/tests/r_inline_xattr/expect
new file mode 100644
index 0000000..773db10
--- /dev/null
+++ b/tests/r_inline_xattr/expect
@@ -0,0 +1,14 @@
+resize2fs test
+debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \(''
+Inode: 1550 Type: regular Mode: 0644 Flags: 0x0
+ user.name (11) = "propervalue"
+Exit status is 0
+resize2fs test.img 5M
+Resizing the filesystem on test.img to 5120 (1k) blocks.
+The filesystem on test.img is now 5120 (1k) blocks long.
+
+Exit status is 0
+debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \(''
+Inode: 12 Type: regular Mode: 0644 Flags: 0x0
+ user.name (11) = "propervalue"
+Exit status is 0
diff --git a/tests/r_inline_xattr/image.gz b/tests/r_inline_xattr/image.gz
new file mode 100644
index 0000000..ead2869
--- /dev/null
+++ b/tests/r_inline_xattr/image.gz
Binary files differ
diff --git a/tests/r_inline_xattr/name b/tests/r_inline_xattr/name
new file mode 100644
index 0000000..97654fb
--- /dev/null
+++ b/tests/r_inline_xattr/name
@@ -0,0 +1 @@
+shrinking filesystem with in-inode extended attributes
diff --git a/tests/r_inline_xattr/script b/tests/r_inline_xattr/script
new file mode 100644
index 0000000..2f754e6
--- /dev/null
+++ b/tests/r_inline_xattr/script
@@ -0,0 +1,51 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-yf
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $IMAGE > $TMPFILE
+
+echo "resize2fs test" > $OUT.new
+
+# Look at existing inline extended attribute
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new
+status=$?
+echo Exit status is $status >> $OUT.new
+
+# resize it
+echo "resize2fs test.img 5M" >> $OUT.new
+$RESIZE2FS $TMPFILE 5M >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+# Look at inline extended attribute in resized fs
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new
+status=$?
+echo Exit status is $status >> $OUT.new
+
+sed -f $cmd_dir/filter.sed < $OUT.new > $OUT
+rm $TMPFILE $OUT.new
+
+#
+# Do the verification
+#
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/r_meta_bg_shrink/script b/tests/r_meta_bg_shrink/script
new file mode 100644
index 0000000..c39b860
--- /dev/null
+++ b/tests/r_meta_bg_shrink/script
@@ -0,0 +1,32 @@
+test_description="meta_bg shrink"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FEATURES="-t ext4 -O 64bit,meta_bg,^resize_inode -b 1024"
+SIZE_1=1G
+SIZE_2=48M
+LOG=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+RESIZE2FS_OPTS=-f
+
+. $cmd_dir/scripts/resize_test
+
+export MKE2FS_FIRST_META_BG=2
+resize_test
+unset MKE2FS_FIRST_META_BG
+
+RC=$?
+if [ $RC -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+elif [ $RC -eq 111 ]; then
+ echo "$test_name: $test_description: skipped (no large sparse files)"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ ln $LOG $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
diff --git a/tests/r_min_itable/expect b/tests/r_min_itable/expect
new file mode 100644
index 0000000..e01041c
--- /dev/null
+++ b/tests/r_min_itable/expect
@@ -0,0 +1,15 @@
+resize2fs test
+resize2fs -M test.img
+Resizing the filesystem on test.img to 1124 (1k) blocks.
+The filesystem on test.img is now 1124 (1k) blocks long.
+
+Exit status is 0
+
+fsck -yf -N test_filesys test.img
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 13/512 files (0.0% non-contiguous), 1120/1124 blocks
+Exit status is 0
diff --git a/tests/r_min_itable/image.gz b/tests/r_min_itable/image.gz
new file mode 100644
index 0000000..7c40c56
--- /dev/null
+++ b/tests/r_min_itable/image.gz
Binary files differ
diff --git a/tests/r_min_itable/name b/tests/r_min_itable/name
new file mode 100644
index 0000000..841b043
--- /dev/null
+++ b/tests/r_min_itable/name
@@ -0,0 +1 @@
+resize2fs -M with inode table in middle of last block group
diff --git a/tests/r_min_itable/script b/tests/r_min_itable/script
new file mode 100644
index 0000000..16d3f64
--- /dev/null
+++ b/tests/r_min_itable/script
@@ -0,0 +1,42 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-yf
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $IMAGE > $TMPFILE
+
+echo "resize2fs test" > $OUT.new
+
+echo "resize2fs -M test.img" >> $OUT.new
+$RESIZE2FS -M $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo " " >> $OUT.new
+echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm $TMPFILE $OUT.new
+
+#
+# Do the verification
+#
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/r_move_inode_int_extent/expect b/tests/r_move_inode_int_extent/expect
new file mode 100644
index 0000000..1de31d0
--- /dev/null
+++ b/tests/r_move_inode_int_extent/expect
@@ -0,0 +1,15 @@
+resize2fs test
+resize2fs test.img 8M
+Resizing the filesystem on test.img to 8192 (1k) blocks.
+The filesystem on test.img is now 8192 (1k) blocks long.
+
+Exit status is 0
+
+fsck -yf -E fixes_only -N test_filesys test.img
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 14/2048 files (0.0% non-contiguous), 1445/8192 blocks
+Exit status is 0
diff --git a/tests/r_move_inode_int_extent/image.gz b/tests/r_move_inode_int_extent/image.gz
new file mode 100644
index 0000000..d5de18f
--- /dev/null
+++ b/tests/r_move_inode_int_extent/image.gz
Binary files differ
diff --git a/tests/r_move_inode_int_extent/name b/tests/r_move_inode_int_extent/name
new file mode 100644
index 0000000..64a55b5
--- /dev/null
+++ b/tests/r_move_inode_int_extent/name
@@ -0,0 +1 @@
+move inode and its interior extent tree block
diff --git a/tests/r_move_inode_int_extent/script b/tests/r_move_inode_int_extent/script
new file mode 100644
index 0000000..9c1a392
--- /dev/null
+++ b/tests/r_move_inode_int_extent/script
@@ -0,0 +1,42 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT="-yf -E fixes_only"
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $IMAGE > $TMPFILE
+
+echo "resize2fs test" > $OUT.new
+
+echo "resize2fs test.img 8M" >> $OUT.new
+$RESIZE2FS $TMPFILE 8M >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo " " >> $OUT.new
+echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm $TMPFILE $OUT.new
+
+#
+# Do the verification
+#
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/r_move_itable/expect b/tests/r_move_itable/expect
new file mode 100644
index 0000000..74a00fe
--- /dev/null
+++ b/tests/r_move_itable/expect
@@ -0,0 +1,2655 @@
+mke2fs -q -F -o Linux -b 1024 -g 256 -O ^resize_inode test.img 1024
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 128
+Block count: 1024
+Reserved block count: 51
+Overhead clusters: 47
+Free blocks: 964
+Free inodes: 117
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 256
+Fragments per group: 256
+Inodes per group: 32
+Inode blocks per group: 8
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-256)
+ Primary superblock at 1, Group descriptors at 2-2
+ Block bitmap at 3 (+2), Inode bitmap at 4 (+3)
+ Inode table at 5-12 (+4)
+ 231 free blocks, 21 free inodes, 2 directories
+ Free blocks: 26-256
+ Free inodes: 12-32
+Group 1: (Blocks 257-512)
+ Backup superblock at 257, Group descriptors at 258-258
+ Block bitmap at 259 (+2), Inode bitmap at 260 (+3)
+ Inode table at 261-268 (+4)
+ 244 free blocks, 32 free inodes, 0 directories
+ Free blocks: 269-512
+ Free inodes: 33-64
+Group 2: (Blocks 513-768)
+ Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+ Inode table at 515-522 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 523-768
+ Free inodes: 65-96
+Group 3: (Blocks 769-1023)
+ Backup superblock at 769, Group descriptors at 770-770
+ Block bitmap at 771 (+2), Inode bitmap at 772 (+3)
+ Inode table at 773-780 (+4)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 781-1023
+ Free inodes: 97-128
+resize2fs -p test.img 10000
+Resizing the filesystem on test.img to 9985 (1k) blocks.
+Begin pass 1 (max = 35)
+Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 2 (max = 1)
+Relocating blocks ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 3 (max = 4)
+Scanning inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 9985 (1k) blocks long.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/1248 files (0.0% non-contiguous), 428/9985 blocks
+Exit status is 0
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 1248
+Block count: 9985
+Reserved block count: 497
+Free blocks: 9557
+Free inodes: 1237
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 256
+Fragments per group: 256
+Inodes per group: 32
+Inode blocks per group: 8
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-256)
+ Primary superblock at 1, Group descriptors at 2-3
+ Block bitmap at 13 (+12), Inode bitmap at 4 (+3)
+ Inode table at 5-12 (+4)
+ 230 free blocks, 21 free inodes, 2 directories
+ Free blocks: 27-256
+ Free inodes: 12-32
+Group 1: (Blocks 257-512)
+ Backup superblock at 257, Group descriptors at 258-259
+ Block bitmap at 269 (+12), Inode bitmap at 260 (+3)
+ Inode table at 261-268 (+4)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 270-512
+ Free inodes: 33-64
+Group 2: (Blocks 513-768)
+ Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+ Inode table at 515-522 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 523-768
+ Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+ Backup superblock at 769, Group descriptors at 770-771
+ Block bitmap at 781 (+12), Inode bitmap at 772 (+3)
+ Inode table at 773-780 (+4)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 782-1024
+ Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+ Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+ Inode table at 1027-1034 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1035-1280
+ Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+ Backup superblock at 1281, Group descriptors at 1282-1283
+ Block bitmap at 1284 (+3), Inode bitmap at 1285 (+4)
+ Inode table at 1286-1293 (+5)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1294-1536
+ Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+ Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+ Inode table at 1539-1546 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1547-1792
+ Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+ Backup superblock at 1793, Group descriptors at 1794-1795
+ Block bitmap at 1796 (+3), Inode bitmap at 1797 (+4)
+ Inode table at 1798-1805 (+5)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1806-2048
+ Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2058 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2059-2304
+ Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+ Backup superblock at 2305, Group descriptors at 2306-2307
+ Block bitmap at 2308 (+3), Inode bitmap at 2309 (+4)
+ Inode table at 2310-2317 (+5)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2318-2560
+ Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+ Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+ Inode table at 2563-2570 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2571-2816
+ Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+ Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+ Inode table at 2819-2826 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2827-3072
+ Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+ Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+ Inode table at 3075-3082 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3083-3328
+ Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+ Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+ Inode table at 3331-3338 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3339-3584
+ Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+ Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+ Inode table at 3587-3594 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3595-3840
+ Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+ Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+ Inode table at 3843-3850 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3851-4096
+ Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4106 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4107-4352
+ Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+ Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+ Inode table at 4355-4362 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4363-4608
+ Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+ Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+ Inode table at 4611-4618 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4619-4864
+ Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+ Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+ Inode table at 4867-4874 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4875-5120
+ Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+ Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+ Inode table at 5123-5130 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5131-5376
+ Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+ Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+ Inode table at 5379-5386 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5387-5632
+ Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+ Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+ Inode table at 5635-5642 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5643-5888
+ Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+ Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+ Inode table at 5891-5898 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5899-6144
+ Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6154 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6155-6400
+ Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+ Backup superblock at 6401, Group descriptors at 6402-6403
+ Block bitmap at 6404 (+3), Inode bitmap at 6405 (+4)
+ Inode table at 6406-6413 (+5)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6414-6656
+ Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+ Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+ Inode table at 6659-6666 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6667-6912
+ Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+ Backup superblock at 6913, Group descriptors at 6914-6915
+ Block bitmap at 6916 (+3), Inode bitmap at 6917 (+4)
+ Inode table at 6918-6925 (+5)
+ 243 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6926-7168
+ Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+ Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+ Inode table at 7171-7178 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7179-7424
+ Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+ Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+ Inode table at 7427-7434 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7435-7680
+ Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+ Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+ Inode table at 7683-7690 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7691-7936
+ Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+ Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+ Inode table at 7939-7946 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7947-8192
+ Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8202 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8203-8448
+ Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+ Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+ Inode table at 8451-8458 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8459-8704
+ Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+ Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+ Inode table at 8707-8714 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8715-8960
+ Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+ Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+ Inode table at 8963-8970 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8971-9216
+ Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+ Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+ Inode table at 9219-9226 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9227-9472
+ Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+ Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+ Inode table at 9475-9482 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9483-9728
+ Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+ Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+ Inode table at 9731-9738 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9739-9984
+ Free inodes: 1217-1248
+--------------------------------
+resize2fs -p test.img 20000
+Resizing the filesystem on test.img to 19969 (1k) blocks.
+Begin pass 1 (max = 39)
+Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 2 (max = 1)
+Relocating blocks ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 3 (max = 39)
+Scanning inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 19969 (1k) blocks long.
+
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/2496 files (9.1% non-contiguous), 830/19969 blocks
+Exit status is 0
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 2496
+Block count: 19969
+Reserved block count: 993
+Free blocks: 19139
+Free inodes: 2485
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 256
+Fragments per group: 256
+Inodes per group: 32
+Inode blocks per group: 8
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-256)
+ Primary superblock at 1, Group descriptors at 2-4
+ Block bitmap at 13 (+12), Inode bitmap at 14 (+13)
+ Inode table at 5-12 (+4)
+ 229 free blocks, 21 free inodes, 2 directories
+ Free blocks: 28-256
+ Free inodes: 12-32
+Group 1: (Blocks 257-512)
+ Backup superblock at 257, Group descriptors at 258-260
+ Block bitmap at 269 (+12), Inode bitmap at 270 (+13)
+ Inode table at 261-268 (+4)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 271-512
+ Free inodes: 33-64
+Group 2: (Blocks 513-768)
+ Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+ Inode table at 515-522 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 523-768
+ Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+ Backup superblock at 769, Group descriptors at 770-772
+ Block bitmap at 781 (+12), Inode bitmap at 782 (+13)
+ Inode table at 773-780 (+4)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 783-1024
+ Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+ Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+ Inode table at 1027-1034 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1035-1280
+ Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+ Backup superblock at 1281, Group descriptors at 1282-1284
+ Block bitmap at 1294 (+13), Inode bitmap at 1285 (+4)
+ Inode table at 1286-1293 (+5)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1295-1536
+ Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+ Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+ Inode table at 1539-1546 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1547-1792
+ Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+ Backup superblock at 1793, Group descriptors at 1794-1796
+ Block bitmap at 1806 (+13), Inode bitmap at 1797 (+4)
+ Inode table at 1798-1805 (+5)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1807-2048
+ Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2058 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2059-2304
+ Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+ Backup superblock at 2305, Group descriptors at 2306-2308
+ Block bitmap at 2318 (+13), Inode bitmap at 2309 (+4)
+ Inode table at 2310-2317 (+5)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2319-2560
+ Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+ Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+ Inode table at 2563-2570 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2571-2816
+ Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+ Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+ Inode table at 2819-2826 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2827-3072
+ Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+ Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+ Inode table at 3075-3082 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3083-3328
+ Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+ Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+ Inode table at 3331-3338 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3339-3584
+ Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+ Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+ Inode table at 3587-3594 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3595-3840
+ Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+ Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+ Inode table at 3843-3850 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3851-4096
+ Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4106 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4107-4352
+ Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+ Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+ Inode table at 4355-4362 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4363-4608
+ Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+ Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+ Inode table at 4611-4618 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4619-4864
+ Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+ Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+ Inode table at 4867-4874 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4875-5120
+ Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+ Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+ Inode table at 5123-5130 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5131-5376
+ Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+ Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+ Inode table at 5379-5386 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5387-5632
+ Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+ Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+ Inode table at 5635-5642 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5643-5888
+ Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+ Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+ Inode table at 5891-5898 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5899-6144
+ Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6154 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6155-6400
+ Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+ Backup superblock at 6401, Group descriptors at 6402-6404
+ Block bitmap at 6414 (+13), Inode bitmap at 6405 (+4)
+ Inode table at 6406-6413 (+5)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6415-6656
+ Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+ Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+ Inode table at 6659-6666 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6667-6912
+ Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+ Backup superblock at 6913, Group descriptors at 6914-6916
+ Block bitmap at 6926 (+13), Inode bitmap at 6917 (+4)
+ Inode table at 6918-6925 (+5)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6927-7168
+ Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+ Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+ Inode table at 7171-7178 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7179-7424
+ Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+ Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+ Inode table at 7427-7434 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7435-7680
+ Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+ Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+ Inode table at 7683-7690 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7691-7936
+ Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+ Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+ Inode table at 7939-7946 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7947-8192
+ Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8202 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8203-8448
+ Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+ Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+ Inode table at 8451-8458 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8459-8704
+ Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+ Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+ Inode table at 8707-8714 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8715-8960
+ Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+ Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+ Inode table at 8963-8970 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8971-9216
+ Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+ Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+ Inode table at 9219-9226 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9227-9472
+ Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+ Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+ Inode table at 9475-9482 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9483-9728
+ Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+ Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+ Inode table at 9731-9738 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9739-9984
+ Free inodes: 1217-1248
+Group 39: (Blocks 9985-10240)
+ Block bitmap at 9985 (+0), Inode bitmap at 9986 (+1)
+ Inode table at 9987-9994 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9995-10240
+ Free inodes: 1249-1280
+Group 40: (Blocks 10241-10496)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10250 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10251-10496
+ Free inodes: 1281-1312
+Group 41: (Blocks 10497-10752)
+ Block bitmap at 10497 (+0), Inode bitmap at 10498 (+1)
+ Inode table at 10499-10506 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10507-10752
+ Free inodes: 1313-1344
+Group 42: (Blocks 10753-11008)
+ Block bitmap at 10753 (+0), Inode bitmap at 10754 (+1)
+ Inode table at 10755-10762 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10763-11008
+ Free inodes: 1345-1376
+Group 43: (Blocks 11009-11264)
+ Block bitmap at 11009 (+0), Inode bitmap at 11010 (+1)
+ Inode table at 11011-11018 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11019-11264
+ Free inodes: 1377-1408
+Group 44: (Blocks 11265-11520)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11274 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11275-11520
+ Free inodes: 1409-1440
+Group 45: (Blocks 11521-11776)
+ Block bitmap at 11521 (+0), Inode bitmap at 11522 (+1)
+ Inode table at 11523-11530 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11531-11776
+ Free inodes: 1441-1472
+Group 46: (Blocks 11777-12032)
+ Block bitmap at 11777 (+0), Inode bitmap at 11778 (+1)
+ Inode table at 11779-11786 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11787-12032
+ Free inodes: 1473-1504
+Group 47: (Blocks 12033-12288)
+ Block bitmap at 12033 (+0), Inode bitmap at 12034 (+1)
+ Inode table at 12035-12042 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12043-12288
+ Free inodes: 1505-1536
+Group 48: (Blocks 12289-12544)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12298 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12299-12544
+ Free inodes: 1537-1568
+Group 49: (Blocks 12545-12800)
+ Backup superblock at 12545, Group descriptors at 12546-12548
+ Block bitmap at 12549 (+4), Inode bitmap at 12550 (+5)
+ Inode table at 12551-12558 (+6)
+ 242 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12559-12800
+ Free inodes: 1569-1600
+Group 50: (Blocks 12801-13056)
+ Block bitmap at 12801 (+0), Inode bitmap at 12802 (+1)
+ Inode table at 12803-12810 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12811-13056
+ Free inodes: 1601-1632
+Group 51: (Blocks 13057-13312)
+ Block bitmap at 13057 (+0), Inode bitmap at 13058 (+1)
+ Inode table at 13059-13066 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13067-13312
+ Free inodes: 1633-1664
+Group 52: (Blocks 13313-13568)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13322 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13323-13568
+ Free inodes: 1665-1696
+Group 53: (Blocks 13569-13824)
+ Block bitmap at 13569 (+0), Inode bitmap at 13570 (+1)
+ Inode table at 13571-13578 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13579-13824
+ Free inodes: 1697-1728
+Group 54: (Blocks 13825-14080)
+ Block bitmap at 13825 (+0), Inode bitmap at 13826 (+1)
+ Inode table at 13827-13834 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13835-14080
+ Free inodes: 1729-1760
+Group 55: (Blocks 14081-14336)
+ Block bitmap at 14081 (+0), Inode bitmap at 14082 (+1)
+ Inode table at 14083-14090 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14091-14336
+ Free inodes: 1761-1792
+Group 56: (Blocks 14337-14592)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14346 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14347-14592
+ Free inodes: 1793-1824
+Group 57: (Blocks 14593-14848)
+ Block bitmap at 14593 (+0), Inode bitmap at 14594 (+1)
+ Inode table at 14595-14602 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14603-14848
+ Free inodes: 1825-1856
+Group 58: (Blocks 14849-15104)
+ Block bitmap at 14849 (+0), Inode bitmap at 14850 (+1)
+ Inode table at 14851-14858 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14859-15104
+ Free inodes: 1857-1888
+Group 59: (Blocks 15105-15360)
+ Block bitmap at 15105 (+0), Inode bitmap at 15106 (+1)
+ Inode table at 15107-15114 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15115-15360
+ Free inodes: 1889-1920
+Group 60: (Blocks 15361-15616)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15370 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15371-15616
+ Free inodes: 1921-1952
+Group 61: (Blocks 15617-15872)
+ Block bitmap at 15617 (+0), Inode bitmap at 15618 (+1)
+ Inode table at 15619-15626 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15627-15872
+ Free inodes: 1953-1984
+Group 62: (Blocks 15873-16128)
+ Block bitmap at 15873 (+0), Inode bitmap at 15874 (+1)
+ Inode table at 15875-15882 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15883-16128
+ Free inodes: 1985-2016
+Group 63: (Blocks 16129-16384)
+ Block bitmap at 16129 (+0), Inode bitmap at 16130 (+1)
+ Inode table at 16131-16138 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16139-16384
+ Free inodes: 2017-2048
+Group 64: (Blocks 16385-16640)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16394 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16395-16640
+ Free inodes: 2049-2080
+Group 65: (Blocks 16641-16896)
+ Block bitmap at 16641 (+0), Inode bitmap at 16642 (+1)
+ Inode table at 16643-16650 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16651-16896
+ Free inodes: 2081-2112
+Group 66: (Blocks 16897-17152)
+ Block bitmap at 16897 (+0), Inode bitmap at 16898 (+1)
+ Inode table at 16899-16906 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16907-17152
+ Free inodes: 2113-2144
+Group 67: (Blocks 17153-17408)
+ Block bitmap at 17153 (+0), Inode bitmap at 17154 (+1)
+ Inode table at 17155-17162 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17163-17408
+ Free inodes: 2145-2176
+Group 68: (Blocks 17409-17664)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17418 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17419-17664
+ Free inodes: 2177-2208
+Group 69: (Blocks 17665-17920)
+ Block bitmap at 17665 (+0), Inode bitmap at 17666 (+1)
+ Inode table at 17667-17674 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17675-17920
+ Free inodes: 2209-2240
+Group 70: (Blocks 17921-18176)
+ Block bitmap at 17921 (+0), Inode bitmap at 17922 (+1)
+ Inode table at 17923-17930 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17931-18176
+ Free inodes: 2241-2272
+Group 71: (Blocks 18177-18432)
+ Block bitmap at 18177 (+0), Inode bitmap at 18178 (+1)
+ Inode table at 18179-18186 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18187-18432
+ Free inodes: 2273-2304
+Group 72: (Blocks 18433-18688)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18442 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18443-18688
+ Free inodes: 2305-2336
+Group 73: (Blocks 18689-18944)
+ Block bitmap at 18689 (+0), Inode bitmap at 18690 (+1)
+ Inode table at 18691-18698 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18699-18944
+ Free inodes: 2337-2368
+Group 74: (Blocks 18945-19200)
+ Block bitmap at 18945 (+0), Inode bitmap at 18946 (+1)
+ Inode table at 18947-18954 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18955-19200
+ Free inodes: 2369-2400
+Group 75: (Blocks 19201-19456)
+ Block bitmap at 19201 (+0), Inode bitmap at 19202 (+1)
+ Inode table at 19203-19210 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19211-19456
+ Free inodes: 2401-2432
+Group 76: (Blocks 19457-19712)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19466 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19467-19712
+ Free inodes: 2433-2464
+Group 77: (Blocks 19713-19968)
+ Block bitmap at 19713 (+0), Inode bitmap at 19714 (+1)
+ Inode table at 19715-19722 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19723-19968
+ Free inodes: 2465-2496
+--------------------------------
+resize2fs -p test.img 30000
+Resizing the filesystem on test.img to 29953 (1k) blocks.
+Begin pass 1 (max = 39)
+Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 2 (max = 8)
+Relocating blocks ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 3 (max = 78)
+Scanning inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 5 (max = 3)
+Moving inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 29953 (1k) blocks long.
+
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/3744 files (9.1% non-contiguous), 1234/29953 blocks
+Exit status is 0
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 3744
+Block count: 29953
+Reserved block count: 1489
+Free blocks: 28719
+Free inodes: 3733
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 256
+Fragments per group: 256
+Inodes per group: 32
+Inode blocks per group: 8
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-256)
+ Primary superblock at 1, Group descriptors at 2-5
+ Block bitmap at 13 (+12), Inode bitmap at 14 (+13)
+ Inode table at 15-22 (+14)
+ 228 free blocks, 21 free inodes, 2 directories
+ Free blocks: 6-12, 36-256
+ Free inodes: 12-32
+Group 1: (Blocks 257-512)
+ Backup superblock at 257, Group descriptors at 258-261
+ Block bitmap at 269 (+12), Inode bitmap at 270 (+13)
+ Inode table at 271-278 (+14)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 262-268, 279-512
+ Free inodes: 33-64
+Group 2: (Blocks 513-768)
+ Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+ Inode table at 515-522 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 523-768
+ Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+ Backup superblock at 769, Group descriptors at 770-773
+ Block bitmap at 781 (+12), Inode bitmap at 782 (+13)
+ Inode table at 783-790 (+14)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 774-780, 791-1024
+ Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+ Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+ Inode table at 1027-1034 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1035-1280
+ Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+ Backup superblock at 1281, Group descriptors at 1282-1285
+ Block bitmap at 1294 (+13), Inode bitmap at 1295 (+14)
+ Inode table at 1286-1293 (+5)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1296-1536
+ Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+ Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+ Inode table at 1539-1546 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1547-1792
+ Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+ Backup superblock at 1793, Group descriptors at 1794-1797
+ Block bitmap at 1806 (+13), Inode bitmap at 1807 (+14)
+ Inode table at 1798-1805 (+5)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1808-2048
+ Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2058 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2059-2304
+ Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+ Backup superblock at 2305, Group descriptors at 2306-2309
+ Block bitmap at 2318 (+13), Inode bitmap at 2319 (+14)
+ Inode table at 2310-2317 (+5)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2320-2560
+ Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+ Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+ Inode table at 2563-2570 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2571-2816
+ Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+ Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+ Inode table at 2819-2826 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2827-3072
+ Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+ Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+ Inode table at 3075-3082 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3083-3328
+ Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+ Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+ Inode table at 3331-3338 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3339-3584
+ Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+ Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+ Inode table at 3587-3594 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3595-3840
+ Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+ Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+ Inode table at 3843-3850 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3851-4096
+ Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4106 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4107-4352
+ Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+ Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+ Inode table at 4355-4362 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4363-4608
+ Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+ Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+ Inode table at 4611-4618 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4619-4864
+ Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+ Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+ Inode table at 4867-4874 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4875-5120
+ Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+ Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+ Inode table at 5123-5130 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5131-5376
+ Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+ Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+ Inode table at 5379-5386 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5387-5632
+ Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+ Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+ Inode table at 5635-5642 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5643-5888
+ Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+ Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+ Inode table at 5891-5898 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5899-6144
+ Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6154 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6155-6400
+ Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+ Backup superblock at 6401, Group descriptors at 6402-6405
+ Block bitmap at 6414 (+13), Inode bitmap at 6415 (+14)
+ Inode table at 6406-6413 (+5)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6416-6656
+ Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+ Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+ Inode table at 6659-6666 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6667-6912
+ Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+ Backup superblock at 6913, Group descriptors at 6914-6917
+ Block bitmap at 6926 (+13), Inode bitmap at 6927 (+14)
+ Inode table at 6918-6925 (+5)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6928-7168
+ Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+ Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+ Inode table at 7171-7178 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7179-7424
+ Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+ Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+ Inode table at 7427-7434 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7435-7680
+ Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+ Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+ Inode table at 7683-7690 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7691-7936
+ Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+ Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+ Inode table at 7939-7946 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7947-8192
+ Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8202 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8203-8448
+ Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+ Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+ Inode table at 8451-8458 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8459-8704
+ Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+ Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+ Inode table at 8707-8714 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8715-8960
+ Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+ Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+ Inode table at 8963-8970 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8971-9216
+ Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+ Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+ Inode table at 9219-9226 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9227-9472
+ Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+ Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+ Inode table at 9475-9482 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9483-9728
+ Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+ Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+ Inode table at 9731-9738 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9739-9984
+ Free inodes: 1217-1248
+Group 39: (Blocks 9985-10240)
+ Block bitmap at 9985 (+0), Inode bitmap at 9986 (+1)
+ Inode table at 9987-9994 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9995-10240
+ Free inodes: 1249-1280
+Group 40: (Blocks 10241-10496)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10250 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10251-10496
+ Free inodes: 1281-1312
+Group 41: (Blocks 10497-10752)
+ Block bitmap at 10497 (+0), Inode bitmap at 10498 (+1)
+ Inode table at 10499-10506 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10507-10752
+ Free inodes: 1313-1344
+Group 42: (Blocks 10753-11008)
+ Block bitmap at 10753 (+0), Inode bitmap at 10754 (+1)
+ Inode table at 10755-10762 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10763-11008
+ Free inodes: 1345-1376
+Group 43: (Blocks 11009-11264)
+ Block bitmap at 11009 (+0), Inode bitmap at 11010 (+1)
+ Inode table at 11011-11018 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11019-11264
+ Free inodes: 1377-1408
+Group 44: (Blocks 11265-11520)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11274 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11275-11520
+ Free inodes: 1409-1440
+Group 45: (Blocks 11521-11776)
+ Block bitmap at 11521 (+0), Inode bitmap at 11522 (+1)
+ Inode table at 11523-11530 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11531-11776
+ Free inodes: 1441-1472
+Group 46: (Blocks 11777-12032)
+ Block bitmap at 11777 (+0), Inode bitmap at 11778 (+1)
+ Inode table at 11779-11786 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11787-12032
+ Free inodes: 1473-1504
+Group 47: (Blocks 12033-12288)
+ Block bitmap at 12033 (+0), Inode bitmap at 12034 (+1)
+ Inode table at 12035-12042 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12043-12288
+ Free inodes: 1505-1536
+Group 48: (Blocks 12289-12544)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12298 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12299-12544
+ Free inodes: 1537-1568
+Group 49: (Blocks 12545-12800)
+ Backup superblock at 12545, Group descriptors at 12546-12549
+ Block bitmap at 12559 (+14), Inode bitmap at 12550 (+5)
+ Inode table at 12551-12558 (+6)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12560-12800
+ Free inodes: 1569-1600
+Group 50: (Blocks 12801-13056)
+ Block bitmap at 12801 (+0), Inode bitmap at 12802 (+1)
+ Inode table at 12803-12810 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12811-13056
+ Free inodes: 1601-1632
+Group 51: (Blocks 13057-13312)
+ Block bitmap at 13057 (+0), Inode bitmap at 13058 (+1)
+ Inode table at 13059-13066 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13067-13312
+ Free inodes: 1633-1664
+Group 52: (Blocks 13313-13568)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13322 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13323-13568
+ Free inodes: 1665-1696
+Group 53: (Blocks 13569-13824)
+ Block bitmap at 13569 (+0), Inode bitmap at 13570 (+1)
+ Inode table at 13571-13578 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13579-13824
+ Free inodes: 1697-1728
+Group 54: (Blocks 13825-14080)
+ Block bitmap at 13825 (+0), Inode bitmap at 13826 (+1)
+ Inode table at 13827-13834 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13835-14080
+ Free inodes: 1729-1760
+Group 55: (Blocks 14081-14336)
+ Block bitmap at 14081 (+0), Inode bitmap at 14082 (+1)
+ Inode table at 14083-14090 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14091-14336
+ Free inodes: 1761-1792
+Group 56: (Blocks 14337-14592)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14346 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14347-14592
+ Free inodes: 1793-1824
+Group 57: (Blocks 14593-14848)
+ Block bitmap at 14593 (+0), Inode bitmap at 14594 (+1)
+ Inode table at 14595-14602 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14603-14848
+ Free inodes: 1825-1856
+Group 58: (Blocks 14849-15104)
+ Block bitmap at 14849 (+0), Inode bitmap at 14850 (+1)
+ Inode table at 14851-14858 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14859-15104
+ Free inodes: 1857-1888
+Group 59: (Blocks 15105-15360)
+ Block bitmap at 15105 (+0), Inode bitmap at 15106 (+1)
+ Inode table at 15107-15114 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15115-15360
+ Free inodes: 1889-1920
+Group 60: (Blocks 15361-15616)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15370 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15371-15616
+ Free inodes: 1921-1952
+Group 61: (Blocks 15617-15872)
+ Block bitmap at 15617 (+0), Inode bitmap at 15618 (+1)
+ Inode table at 15619-15626 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15627-15872
+ Free inodes: 1953-1984
+Group 62: (Blocks 15873-16128)
+ Block bitmap at 15873 (+0), Inode bitmap at 15874 (+1)
+ Inode table at 15875-15882 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15883-16128
+ Free inodes: 1985-2016
+Group 63: (Blocks 16129-16384)
+ Block bitmap at 16129 (+0), Inode bitmap at 16130 (+1)
+ Inode table at 16131-16138 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16139-16384
+ Free inodes: 2017-2048
+Group 64: (Blocks 16385-16640)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16394 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16395-16640
+ Free inodes: 2049-2080
+Group 65: (Blocks 16641-16896)
+ Block bitmap at 16641 (+0), Inode bitmap at 16642 (+1)
+ Inode table at 16643-16650 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16651-16896
+ Free inodes: 2081-2112
+Group 66: (Blocks 16897-17152)
+ Block bitmap at 16897 (+0), Inode bitmap at 16898 (+1)
+ Inode table at 16899-16906 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16907-17152
+ Free inodes: 2113-2144
+Group 67: (Blocks 17153-17408)
+ Block bitmap at 17153 (+0), Inode bitmap at 17154 (+1)
+ Inode table at 17155-17162 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17163-17408
+ Free inodes: 2145-2176
+Group 68: (Blocks 17409-17664)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17418 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17419-17664
+ Free inodes: 2177-2208
+Group 69: (Blocks 17665-17920)
+ Block bitmap at 17665 (+0), Inode bitmap at 17666 (+1)
+ Inode table at 17667-17674 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17675-17920
+ Free inodes: 2209-2240
+Group 70: (Blocks 17921-18176)
+ Block bitmap at 17921 (+0), Inode bitmap at 17922 (+1)
+ Inode table at 17923-17930 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17931-18176
+ Free inodes: 2241-2272
+Group 71: (Blocks 18177-18432)
+ Block bitmap at 18177 (+0), Inode bitmap at 18178 (+1)
+ Inode table at 18179-18186 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18187-18432
+ Free inodes: 2273-2304
+Group 72: (Blocks 18433-18688)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18442 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18443-18688
+ Free inodes: 2305-2336
+Group 73: (Blocks 18689-18944)
+ Block bitmap at 18689 (+0), Inode bitmap at 18690 (+1)
+ Inode table at 18691-18698 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18699-18944
+ Free inodes: 2337-2368
+Group 74: (Blocks 18945-19200)
+ Block bitmap at 18945 (+0), Inode bitmap at 18946 (+1)
+ Inode table at 18947-18954 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18955-19200
+ Free inodes: 2369-2400
+Group 75: (Blocks 19201-19456)
+ Block bitmap at 19201 (+0), Inode bitmap at 19202 (+1)
+ Inode table at 19203-19210 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19211-19456
+ Free inodes: 2401-2432
+Group 76: (Blocks 19457-19712)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19466 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19467-19712
+ Free inodes: 2433-2464
+Group 77: (Blocks 19713-19968)
+ Block bitmap at 19713 (+0), Inode bitmap at 19714 (+1)
+ Inode table at 19715-19722 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19723-19968
+ Free inodes: 2465-2496
+Group 78: (Blocks 19969-20224)
+ Block bitmap at 19969 (+0), Inode bitmap at 19970 (+1)
+ Inode table at 19971-19978 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19979-20224
+ Free inodes: 2497-2528
+Group 79: (Blocks 20225-20480)
+ Block bitmap at 20225 (+0), Inode bitmap at 20226 (+1)
+ Inode table at 20227-20234 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 20235-20480
+ Free inodes: 2529-2560
+Group 80: (Blocks 20481-20736)
+ Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+ Inode table at 20483-20490 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 20491-20736
+ Free inodes: 2561-2592
+Group 81: (Blocks 20737-20992)
+ Backup superblock at 20737, Group descriptors at 20738-20741
+ Block bitmap at 20742 (+5), Inode bitmap at 20743 (+6)
+ Inode table at 20744-20751 (+7)
+ 241 free blocks, 32 free inodes, 0 directories
+ Free blocks: 20752-20992
+ Free inodes: 2593-2624
+Group 82: (Blocks 20993-21248)
+ Block bitmap at 20993 (+0), Inode bitmap at 20994 (+1)
+ Inode table at 20995-21002 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21003-21248
+ Free inodes: 2625-2656
+Group 83: (Blocks 21249-21504)
+ Block bitmap at 21249 (+0), Inode bitmap at 21250 (+1)
+ Inode table at 21251-21258 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21259-21504
+ Free inodes: 2657-2688
+Group 84: (Blocks 21505-21760)
+ Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+ Inode table at 21507-21514 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21515-21760
+ Free inodes: 2689-2720
+Group 85: (Blocks 21761-22016)
+ Block bitmap at 21761 (+0), Inode bitmap at 21762 (+1)
+ Inode table at 21763-21770 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21771-22016
+ Free inodes: 2721-2752
+Group 86: (Blocks 22017-22272)
+ Block bitmap at 22017 (+0), Inode bitmap at 22018 (+1)
+ Inode table at 22019-22026 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22027-22272
+ Free inodes: 2753-2784
+Group 87: (Blocks 22273-22528)
+ Block bitmap at 22273 (+0), Inode bitmap at 22274 (+1)
+ Inode table at 22275-22282 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22283-22528
+ Free inodes: 2785-2816
+Group 88: (Blocks 22529-22784)
+ Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+ Inode table at 22531-22538 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22539-22784
+ Free inodes: 2817-2848
+Group 89: (Blocks 22785-23040)
+ Block bitmap at 22785 (+0), Inode bitmap at 22786 (+1)
+ Inode table at 22787-22794 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22795-23040
+ Free inodes: 2849-2880
+Group 90: (Blocks 23041-23296)
+ Block bitmap at 23041 (+0), Inode bitmap at 23042 (+1)
+ Inode table at 23043-23050 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23051-23296
+ Free inodes: 2881-2912
+Group 91: (Blocks 23297-23552)
+ Block bitmap at 23297 (+0), Inode bitmap at 23298 (+1)
+ Inode table at 23299-23306 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23307-23552
+ Free inodes: 2913-2944
+Group 92: (Blocks 23553-23808)
+ Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+ Inode table at 23555-23562 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23563-23808
+ Free inodes: 2945-2976
+Group 93: (Blocks 23809-24064)
+ Block bitmap at 23809 (+0), Inode bitmap at 23810 (+1)
+ Inode table at 23811-23818 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23819-24064
+ Free inodes: 2977-3008
+Group 94: (Blocks 24065-24320)
+ Block bitmap at 24065 (+0), Inode bitmap at 24066 (+1)
+ Inode table at 24067-24074 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24075-24320
+ Free inodes: 3009-3040
+Group 95: (Blocks 24321-24576)
+ Block bitmap at 24321 (+0), Inode bitmap at 24322 (+1)
+ Inode table at 24323-24330 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24331-24576
+ Free inodes: 3041-3072
+Group 96: (Blocks 24577-24832)
+ Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+ Inode table at 24579-24586 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24587-24832
+ Free inodes: 3073-3104
+Group 97: (Blocks 24833-25088)
+ Block bitmap at 24833 (+0), Inode bitmap at 24834 (+1)
+ Inode table at 24835-24842 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24843-25088
+ Free inodes: 3105-3136
+Group 98: (Blocks 25089-25344)
+ Block bitmap at 25089 (+0), Inode bitmap at 25090 (+1)
+ Inode table at 25091-25098 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25099-25344
+ Free inodes: 3137-3168
+Group 99: (Blocks 25345-25600)
+ Block bitmap at 25345 (+0), Inode bitmap at 25346 (+1)
+ Inode table at 25347-25354 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25355-25600
+ Free inodes: 3169-3200
+Group 100: (Blocks 25601-25856)
+ Block bitmap at 25601 (+0), Inode bitmap at 25602 (+1)
+ Inode table at 25603-25610 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25611-25856
+ Free inodes: 3201-3232
+Group 101: (Blocks 25857-26112)
+ Block bitmap at 25857 (+0), Inode bitmap at 25858 (+1)
+ Inode table at 25859-25866 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25867-26112
+ Free inodes: 3233-3264
+Group 102: (Blocks 26113-26368)
+ Block bitmap at 26113 (+0), Inode bitmap at 26114 (+1)
+ Inode table at 26115-26122 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26123-26368
+ Free inodes: 3265-3296
+Group 103: (Blocks 26369-26624)
+ Block bitmap at 26369 (+0), Inode bitmap at 26370 (+1)
+ Inode table at 26371-26378 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26379-26624
+ Free inodes: 3297-3328
+Group 104: (Blocks 26625-26880)
+ Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+ Inode table at 26627-26634 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26635-26880
+ Free inodes: 3329-3360
+Group 105: (Blocks 26881-27136)
+ Block bitmap at 26881 (+0), Inode bitmap at 26882 (+1)
+ Inode table at 26883-26890 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26891-27136
+ Free inodes: 3361-3392
+Group 106: (Blocks 27137-27392)
+ Block bitmap at 27137 (+0), Inode bitmap at 27138 (+1)
+ Inode table at 27139-27146 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27147-27392
+ Free inodes: 3393-3424
+Group 107: (Blocks 27393-27648)
+ Block bitmap at 27393 (+0), Inode bitmap at 27394 (+1)
+ Inode table at 27395-27402 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27403-27648
+ Free inodes: 3425-3456
+Group 108: (Blocks 27649-27904)
+ Block bitmap at 27649 (+0), Inode bitmap at 27650 (+1)
+ Inode table at 27651-27658 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27659-27904
+ Free inodes: 3457-3488
+Group 109: (Blocks 27905-28160)
+ Block bitmap at 27905 (+0), Inode bitmap at 27906 (+1)
+ Inode table at 27907-27914 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27915-28160
+ Free inodes: 3489-3520
+Group 110: (Blocks 28161-28416)
+ Block bitmap at 28161 (+0), Inode bitmap at 28162 (+1)
+ Inode table at 28163-28170 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28171-28416
+ Free inodes: 3521-3552
+Group 111: (Blocks 28417-28672)
+ Block bitmap at 28417 (+0), Inode bitmap at 28418 (+1)
+ Inode table at 28419-28426 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28427-28672
+ Free inodes: 3553-3584
+Group 112: (Blocks 28673-28928)
+ Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+ Inode table at 28675-28682 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28683-28928
+ Free inodes: 3585-3616
+Group 113: (Blocks 28929-29184)
+ Block bitmap at 28929 (+0), Inode bitmap at 28930 (+1)
+ Inode table at 28931-28938 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28939-29184
+ Free inodes: 3617-3648
+Group 114: (Blocks 29185-29440)
+ Block bitmap at 29185 (+0), Inode bitmap at 29186 (+1)
+ Inode table at 29187-29194 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 29195-29440
+ Free inodes: 3649-3680
+Group 115: (Blocks 29441-29696)
+ Block bitmap at 29441 (+0), Inode bitmap at 29442 (+1)
+ Inode table at 29443-29450 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 29451-29696
+ Free inodes: 3681-3712
+Group 116: (Blocks 29697-29952)
+ Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+ Inode table at 29699-29706 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 29707-29952
+ Free inodes: 3713-3744
+--------------------------------
+resize2fs -p test.img 40000
+Resizing the filesystem on test.img to 40000 (1k) blocks.
+Begin pass 1 (max = 40)
+Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 5 (max = 5)
+Moving inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 40000 (1k) blocks long.
+
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/5024 files (9.1% non-contiguous), 1650/40000 blocks
+Exit status is 0
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 5024
+Block count: 40000
+Reserved block count: 1988
+Free blocks: 38350
+Free inodes: 5013
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 256
+Fragments per group: 256
+Inodes per group: 32
+Inode blocks per group: 8
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-256)
+ Primary superblock at 1, Group descriptors at 2-6
+ Block bitmap at 13 (+12), Inode bitmap at 14 (+13)
+ Inode table at 15-22 (+14)
+ 227 free blocks, 21 free inodes, 2 directories
+ Free blocks: 7-12, 36-256
+ Free inodes: 12-32
+Group 1: (Blocks 257-512)
+ Backup superblock at 257, Group descriptors at 258-262
+ Block bitmap at 269 (+12), Inode bitmap at 270 (+13)
+ Inode table at 271-278 (+14)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 263-268, 279-512
+ Free inodes: 33-64
+Group 2: (Blocks 513-768)
+ Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+ Inode table at 515-522 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 523-768
+ Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+ Backup superblock at 769, Group descriptors at 770-774
+ Block bitmap at 781 (+12), Inode bitmap at 782 (+13)
+ Inode table at 783-790 (+14)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 775-780, 791-1024
+ Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+ Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+ Inode table at 1027-1034 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1035-1280
+ Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+ Backup superblock at 1281, Group descriptors at 1282-1286
+ Block bitmap at 1294 (+13), Inode bitmap at 1295 (+14)
+ Inode table at 1296-1303 (+15)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1287-1293, 1304-1536
+ Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+ Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+ Inode table at 1539-1546 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1547-1792
+ Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+ Backup superblock at 1793, Group descriptors at 1794-1798
+ Block bitmap at 1806 (+13), Inode bitmap at 1807 (+14)
+ Inode table at 1808-1815 (+15)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 1799-1805, 1816-2048
+ Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2058 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2059-2304
+ Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+ Backup superblock at 2305, Group descriptors at 2306-2310
+ Block bitmap at 2318 (+13), Inode bitmap at 2319 (+14)
+ Inode table at 2320-2327 (+15)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2311-2317, 2328-2560
+ Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+ Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+ Inode table at 2563-2570 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2571-2816
+ Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+ Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+ Inode table at 2819-2826 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 2827-3072
+ Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+ Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+ Inode table at 3075-3082 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3083-3328
+ Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+ Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+ Inode table at 3331-3338 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3339-3584
+ Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+ Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+ Inode table at 3587-3594 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3595-3840
+ Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+ Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+ Inode table at 3843-3850 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 3851-4096
+ Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4106 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4107-4352
+ Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+ Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+ Inode table at 4355-4362 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4363-4608
+ Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+ Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+ Inode table at 4611-4618 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4619-4864
+ Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+ Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+ Inode table at 4867-4874 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 4875-5120
+ Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+ Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+ Inode table at 5123-5130 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5131-5376
+ Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+ Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+ Inode table at 5379-5386 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5387-5632
+ Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+ Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+ Inode table at 5635-5642 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5643-5888
+ Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+ Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+ Inode table at 5891-5898 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 5899-6144
+ Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6154 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6155-6400
+ Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+ Backup superblock at 6401, Group descriptors at 6402-6406
+ Block bitmap at 6414 (+13), Inode bitmap at 6415 (+14)
+ Inode table at 6416-6423 (+15)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6407-6413, 6424-6656
+ Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+ Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+ Inode table at 6659-6666 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6667-6912
+ Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+ Backup superblock at 6913, Group descriptors at 6914-6918
+ Block bitmap at 6926 (+13), Inode bitmap at 6927 (+14)
+ Inode table at 6928-6935 (+15)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 6919-6925, 6936-7168
+ Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+ Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+ Inode table at 7171-7178 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7179-7424
+ Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+ Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+ Inode table at 7427-7434 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7435-7680
+ Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+ Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+ Inode table at 7683-7690 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7691-7936
+ Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+ Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+ Inode table at 7939-7946 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 7947-8192
+ Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8202 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8203-8448
+ Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+ Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+ Inode table at 8451-8458 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8459-8704
+ Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+ Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+ Inode table at 8707-8714 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8715-8960
+ Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+ Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+ Inode table at 8963-8970 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 8971-9216
+ Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+ Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+ Inode table at 9219-9226 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9227-9472
+ Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+ Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+ Inode table at 9475-9482 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9483-9728
+ Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+ Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+ Inode table at 9731-9738 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9739-9984
+ Free inodes: 1217-1248
+Group 39: (Blocks 9985-10240)
+ Block bitmap at 9985 (+0), Inode bitmap at 9986 (+1)
+ Inode table at 9987-9994 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 9995-10240
+ Free inodes: 1249-1280
+Group 40: (Blocks 10241-10496)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10250 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10251-10496
+ Free inodes: 1281-1312
+Group 41: (Blocks 10497-10752)
+ Block bitmap at 10497 (+0), Inode bitmap at 10498 (+1)
+ Inode table at 10499-10506 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10507-10752
+ Free inodes: 1313-1344
+Group 42: (Blocks 10753-11008)
+ Block bitmap at 10753 (+0), Inode bitmap at 10754 (+1)
+ Inode table at 10755-10762 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 10763-11008
+ Free inodes: 1345-1376
+Group 43: (Blocks 11009-11264)
+ Block bitmap at 11009 (+0), Inode bitmap at 11010 (+1)
+ Inode table at 11011-11018 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11019-11264
+ Free inodes: 1377-1408
+Group 44: (Blocks 11265-11520)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11274 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11275-11520
+ Free inodes: 1409-1440
+Group 45: (Blocks 11521-11776)
+ Block bitmap at 11521 (+0), Inode bitmap at 11522 (+1)
+ Inode table at 11523-11530 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11531-11776
+ Free inodes: 1441-1472
+Group 46: (Blocks 11777-12032)
+ Block bitmap at 11777 (+0), Inode bitmap at 11778 (+1)
+ Inode table at 11779-11786 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 11787-12032
+ Free inodes: 1473-1504
+Group 47: (Blocks 12033-12288)
+ Block bitmap at 12033 (+0), Inode bitmap at 12034 (+1)
+ Inode table at 12035-12042 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12043-12288
+ Free inodes: 1505-1536
+Group 48: (Blocks 12289-12544)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12298 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12299-12544
+ Free inodes: 1537-1568
+Group 49: (Blocks 12545-12800)
+ Backup superblock at 12545, Group descriptors at 12546-12550
+ Block bitmap at 12559 (+14), Inode bitmap at 12560 (+15)
+ Inode table at 12551-12558 (+6)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12561-12800
+ Free inodes: 1569-1600
+Group 50: (Blocks 12801-13056)
+ Block bitmap at 12801 (+0), Inode bitmap at 12802 (+1)
+ Inode table at 12803-12810 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 12811-13056
+ Free inodes: 1601-1632
+Group 51: (Blocks 13057-13312)
+ Block bitmap at 13057 (+0), Inode bitmap at 13058 (+1)
+ Inode table at 13059-13066 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13067-13312
+ Free inodes: 1633-1664
+Group 52: (Blocks 13313-13568)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13322 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13323-13568
+ Free inodes: 1665-1696
+Group 53: (Blocks 13569-13824)
+ Block bitmap at 13569 (+0), Inode bitmap at 13570 (+1)
+ Inode table at 13571-13578 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13579-13824
+ Free inodes: 1697-1728
+Group 54: (Blocks 13825-14080)
+ Block bitmap at 13825 (+0), Inode bitmap at 13826 (+1)
+ Inode table at 13827-13834 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 13835-14080
+ Free inodes: 1729-1760
+Group 55: (Blocks 14081-14336)
+ Block bitmap at 14081 (+0), Inode bitmap at 14082 (+1)
+ Inode table at 14083-14090 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14091-14336
+ Free inodes: 1761-1792
+Group 56: (Blocks 14337-14592)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14346 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14347-14592
+ Free inodes: 1793-1824
+Group 57: (Blocks 14593-14848)
+ Block bitmap at 14593 (+0), Inode bitmap at 14594 (+1)
+ Inode table at 14595-14602 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14603-14848
+ Free inodes: 1825-1856
+Group 58: (Blocks 14849-15104)
+ Block bitmap at 14849 (+0), Inode bitmap at 14850 (+1)
+ Inode table at 14851-14858 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 14859-15104
+ Free inodes: 1857-1888
+Group 59: (Blocks 15105-15360)
+ Block bitmap at 15105 (+0), Inode bitmap at 15106 (+1)
+ Inode table at 15107-15114 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15115-15360
+ Free inodes: 1889-1920
+Group 60: (Blocks 15361-15616)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15370 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15371-15616
+ Free inodes: 1921-1952
+Group 61: (Blocks 15617-15872)
+ Block bitmap at 15617 (+0), Inode bitmap at 15618 (+1)
+ Inode table at 15619-15626 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15627-15872
+ Free inodes: 1953-1984
+Group 62: (Blocks 15873-16128)
+ Block bitmap at 15873 (+0), Inode bitmap at 15874 (+1)
+ Inode table at 15875-15882 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 15883-16128
+ Free inodes: 1985-2016
+Group 63: (Blocks 16129-16384)
+ Block bitmap at 16129 (+0), Inode bitmap at 16130 (+1)
+ Inode table at 16131-16138 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16139-16384
+ Free inodes: 2017-2048
+Group 64: (Blocks 16385-16640)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16394 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16395-16640
+ Free inodes: 2049-2080
+Group 65: (Blocks 16641-16896)
+ Block bitmap at 16641 (+0), Inode bitmap at 16642 (+1)
+ Inode table at 16643-16650 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16651-16896
+ Free inodes: 2081-2112
+Group 66: (Blocks 16897-17152)
+ Block bitmap at 16897 (+0), Inode bitmap at 16898 (+1)
+ Inode table at 16899-16906 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 16907-17152
+ Free inodes: 2113-2144
+Group 67: (Blocks 17153-17408)
+ Block bitmap at 17153 (+0), Inode bitmap at 17154 (+1)
+ Inode table at 17155-17162 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17163-17408
+ Free inodes: 2145-2176
+Group 68: (Blocks 17409-17664)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17418 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17419-17664
+ Free inodes: 2177-2208
+Group 69: (Blocks 17665-17920)
+ Block bitmap at 17665 (+0), Inode bitmap at 17666 (+1)
+ Inode table at 17667-17674 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17675-17920
+ Free inodes: 2209-2240
+Group 70: (Blocks 17921-18176)
+ Block bitmap at 17921 (+0), Inode bitmap at 17922 (+1)
+ Inode table at 17923-17930 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 17931-18176
+ Free inodes: 2241-2272
+Group 71: (Blocks 18177-18432)
+ Block bitmap at 18177 (+0), Inode bitmap at 18178 (+1)
+ Inode table at 18179-18186 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18187-18432
+ Free inodes: 2273-2304
+Group 72: (Blocks 18433-18688)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18442 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18443-18688
+ Free inodes: 2305-2336
+Group 73: (Blocks 18689-18944)
+ Block bitmap at 18689 (+0), Inode bitmap at 18690 (+1)
+ Inode table at 18691-18698 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18699-18944
+ Free inodes: 2337-2368
+Group 74: (Blocks 18945-19200)
+ Block bitmap at 18945 (+0), Inode bitmap at 18946 (+1)
+ Inode table at 18947-18954 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 18955-19200
+ Free inodes: 2369-2400
+Group 75: (Blocks 19201-19456)
+ Block bitmap at 19201 (+0), Inode bitmap at 19202 (+1)
+ Inode table at 19203-19210 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19211-19456
+ Free inodes: 2401-2432
+Group 76: (Blocks 19457-19712)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19466 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19467-19712
+ Free inodes: 2433-2464
+Group 77: (Blocks 19713-19968)
+ Block bitmap at 19713 (+0), Inode bitmap at 19714 (+1)
+ Inode table at 19715-19722 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19723-19968
+ Free inodes: 2465-2496
+Group 78: (Blocks 19969-20224)
+ Block bitmap at 19969 (+0), Inode bitmap at 19970 (+1)
+ Inode table at 19971-19978 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 19979-20224
+ Free inodes: 2497-2528
+Group 79: (Blocks 20225-20480)
+ Block bitmap at 20225 (+0), Inode bitmap at 20226 (+1)
+ Inode table at 20227-20234 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 20235-20480
+ Free inodes: 2529-2560
+Group 80: (Blocks 20481-20736)
+ Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+ Inode table at 20483-20490 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 20491-20736
+ Free inodes: 2561-2592
+Group 81: (Blocks 20737-20992)
+ Backup superblock at 20737, Group descriptors at 20738-20742
+ Block bitmap at 20752 (+15), Inode bitmap at 20743 (+6)
+ Inode table at 20744-20751 (+7)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 20753-20992
+ Free inodes: 2593-2624
+Group 82: (Blocks 20993-21248)
+ Block bitmap at 20993 (+0), Inode bitmap at 20994 (+1)
+ Inode table at 20995-21002 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21003-21248
+ Free inodes: 2625-2656
+Group 83: (Blocks 21249-21504)
+ Block bitmap at 21249 (+0), Inode bitmap at 21250 (+1)
+ Inode table at 21251-21258 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21259-21504
+ Free inodes: 2657-2688
+Group 84: (Blocks 21505-21760)
+ Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+ Inode table at 21507-21514 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21515-21760
+ Free inodes: 2689-2720
+Group 85: (Blocks 21761-22016)
+ Block bitmap at 21761 (+0), Inode bitmap at 21762 (+1)
+ Inode table at 21763-21770 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 21771-22016
+ Free inodes: 2721-2752
+Group 86: (Blocks 22017-22272)
+ Block bitmap at 22017 (+0), Inode bitmap at 22018 (+1)
+ Inode table at 22019-22026 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22027-22272
+ Free inodes: 2753-2784
+Group 87: (Blocks 22273-22528)
+ Block bitmap at 22273 (+0), Inode bitmap at 22274 (+1)
+ Inode table at 22275-22282 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22283-22528
+ Free inodes: 2785-2816
+Group 88: (Blocks 22529-22784)
+ Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+ Inode table at 22531-22538 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22539-22784
+ Free inodes: 2817-2848
+Group 89: (Blocks 22785-23040)
+ Block bitmap at 22785 (+0), Inode bitmap at 22786 (+1)
+ Inode table at 22787-22794 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 22795-23040
+ Free inodes: 2849-2880
+Group 90: (Blocks 23041-23296)
+ Block bitmap at 23041 (+0), Inode bitmap at 23042 (+1)
+ Inode table at 23043-23050 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23051-23296
+ Free inodes: 2881-2912
+Group 91: (Blocks 23297-23552)
+ Block bitmap at 23297 (+0), Inode bitmap at 23298 (+1)
+ Inode table at 23299-23306 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23307-23552
+ Free inodes: 2913-2944
+Group 92: (Blocks 23553-23808)
+ Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+ Inode table at 23555-23562 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23563-23808
+ Free inodes: 2945-2976
+Group 93: (Blocks 23809-24064)
+ Block bitmap at 23809 (+0), Inode bitmap at 23810 (+1)
+ Inode table at 23811-23818 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 23819-24064
+ Free inodes: 2977-3008
+Group 94: (Blocks 24065-24320)
+ Block bitmap at 24065 (+0), Inode bitmap at 24066 (+1)
+ Inode table at 24067-24074 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24075-24320
+ Free inodes: 3009-3040
+Group 95: (Blocks 24321-24576)
+ Block bitmap at 24321 (+0), Inode bitmap at 24322 (+1)
+ Inode table at 24323-24330 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24331-24576
+ Free inodes: 3041-3072
+Group 96: (Blocks 24577-24832)
+ Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+ Inode table at 24579-24586 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24587-24832
+ Free inodes: 3073-3104
+Group 97: (Blocks 24833-25088)
+ Block bitmap at 24833 (+0), Inode bitmap at 24834 (+1)
+ Inode table at 24835-24842 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 24843-25088
+ Free inodes: 3105-3136
+Group 98: (Blocks 25089-25344)
+ Block bitmap at 25089 (+0), Inode bitmap at 25090 (+1)
+ Inode table at 25091-25098 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25099-25344
+ Free inodes: 3137-3168
+Group 99: (Blocks 25345-25600)
+ Block bitmap at 25345 (+0), Inode bitmap at 25346 (+1)
+ Inode table at 25347-25354 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25355-25600
+ Free inodes: 3169-3200
+Group 100: (Blocks 25601-25856)
+ Block bitmap at 25601 (+0), Inode bitmap at 25602 (+1)
+ Inode table at 25603-25610 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25611-25856
+ Free inodes: 3201-3232
+Group 101: (Blocks 25857-26112)
+ Block bitmap at 25857 (+0), Inode bitmap at 25858 (+1)
+ Inode table at 25859-25866 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 25867-26112
+ Free inodes: 3233-3264
+Group 102: (Blocks 26113-26368)
+ Block bitmap at 26113 (+0), Inode bitmap at 26114 (+1)
+ Inode table at 26115-26122 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26123-26368
+ Free inodes: 3265-3296
+Group 103: (Blocks 26369-26624)
+ Block bitmap at 26369 (+0), Inode bitmap at 26370 (+1)
+ Inode table at 26371-26378 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26379-26624
+ Free inodes: 3297-3328
+Group 104: (Blocks 26625-26880)
+ Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+ Inode table at 26627-26634 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26635-26880
+ Free inodes: 3329-3360
+Group 105: (Blocks 26881-27136)
+ Block bitmap at 26881 (+0), Inode bitmap at 26882 (+1)
+ Inode table at 26883-26890 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 26891-27136
+ Free inodes: 3361-3392
+Group 106: (Blocks 27137-27392)
+ Block bitmap at 27137 (+0), Inode bitmap at 27138 (+1)
+ Inode table at 27139-27146 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27147-27392
+ Free inodes: 3393-3424
+Group 107: (Blocks 27393-27648)
+ Block bitmap at 27393 (+0), Inode bitmap at 27394 (+1)
+ Inode table at 27395-27402 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27403-27648
+ Free inodes: 3425-3456
+Group 108: (Blocks 27649-27904)
+ Block bitmap at 27649 (+0), Inode bitmap at 27650 (+1)
+ Inode table at 27651-27658 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27659-27904
+ Free inodes: 3457-3488
+Group 109: (Blocks 27905-28160)
+ Block bitmap at 27905 (+0), Inode bitmap at 27906 (+1)
+ Inode table at 27907-27914 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 27915-28160
+ Free inodes: 3489-3520
+Group 110: (Blocks 28161-28416)
+ Block bitmap at 28161 (+0), Inode bitmap at 28162 (+1)
+ Inode table at 28163-28170 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28171-28416
+ Free inodes: 3521-3552
+Group 111: (Blocks 28417-28672)
+ Block bitmap at 28417 (+0), Inode bitmap at 28418 (+1)
+ Inode table at 28419-28426 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28427-28672
+ Free inodes: 3553-3584
+Group 112: (Blocks 28673-28928)
+ Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+ Inode table at 28675-28682 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28683-28928
+ Free inodes: 3585-3616
+Group 113: (Blocks 28929-29184)
+ Block bitmap at 28929 (+0), Inode bitmap at 28930 (+1)
+ Inode table at 28931-28938 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 28939-29184
+ Free inodes: 3617-3648
+Group 114: (Blocks 29185-29440)
+ Block bitmap at 29185 (+0), Inode bitmap at 29186 (+1)
+ Inode table at 29187-29194 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 29195-29440
+ Free inodes: 3649-3680
+Group 115: (Blocks 29441-29696)
+ Block bitmap at 29441 (+0), Inode bitmap at 29442 (+1)
+ Inode table at 29443-29450 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 29451-29696
+ Free inodes: 3681-3712
+Group 116: (Blocks 29697-29952)
+ Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+ Inode table at 29699-29706 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 29707-29952
+ Free inodes: 3713-3744
+Group 117: (Blocks 29953-30208)
+ Block bitmap at 29953 (+0), Inode bitmap at 29954 (+1)
+ Inode table at 29955-29962 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 29963-30208
+ Free inodes: 3745-3776
+Group 118: (Blocks 30209-30464)
+ Block bitmap at 30209 (+0), Inode bitmap at 30210 (+1)
+ Inode table at 30211-30218 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 30219-30464
+ Free inodes: 3777-3808
+Group 119: (Blocks 30465-30720)
+ Block bitmap at 30465 (+0), Inode bitmap at 30466 (+1)
+ Inode table at 30467-30474 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 30475-30720
+ Free inodes: 3809-3840
+Group 120: (Blocks 30721-30976)
+ Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+ Inode table at 30723-30730 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 30731-30976
+ Free inodes: 3841-3872
+Group 121: (Blocks 30977-31232)
+ Block bitmap at 30977 (+0), Inode bitmap at 30978 (+1)
+ Inode table at 30979-30986 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 30987-31232
+ Free inodes: 3873-3904
+Group 122: (Blocks 31233-31488)
+ Block bitmap at 31233 (+0), Inode bitmap at 31234 (+1)
+ Inode table at 31235-31242 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 31243-31488
+ Free inodes: 3905-3936
+Group 123: (Blocks 31489-31744)
+ Block bitmap at 31489 (+0), Inode bitmap at 31490 (+1)
+ Inode table at 31491-31498 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 31499-31744
+ Free inodes: 3937-3968
+Group 124: (Blocks 31745-32000)
+ Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+ Inode table at 31747-31754 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 31755-32000
+ Free inodes: 3969-4000
+Group 125: (Blocks 32001-32256)
+ Backup superblock at 32001, Group descriptors at 32002-32006
+ Block bitmap at 32007 (+6), Inode bitmap at 32008 (+7)
+ Inode table at 32009-32016 (+8)
+ 240 free blocks, 32 free inodes, 0 directories
+ Free blocks: 32017-32256
+ Free inodes: 4001-4032
+Group 126: (Blocks 32257-32512)
+ Block bitmap at 32257 (+0), Inode bitmap at 32258 (+1)
+ Inode table at 32259-32266 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 32267-32512
+ Free inodes: 4033-4064
+Group 127: (Blocks 32513-32768)
+ Block bitmap at 32513 (+0), Inode bitmap at 32514 (+1)
+ Inode table at 32515-32522 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 32523-32768
+ Free inodes: 4065-4096
+Group 128: (Blocks 32769-33024)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-32778 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 32779-33024
+ Free inodes: 4097-4128
+Group 129: (Blocks 33025-33280)
+ Block bitmap at 33025 (+0), Inode bitmap at 33026 (+1)
+ Inode table at 33027-33034 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 33035-33280
+ Free inodes: 4129-4160
+Group 130: (Blocks 33281-33536)
+ Block bitmap at 33281 (+0), Inode bitmap at 33282 (+1)
+ Inode table at 33283-33290 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 33291-33536
+ Free inodes: 4161-4192
+Group 131: (Blocks 33537-33792)
+ Block bitmap at 33537 (+0), Inode bitmap at 33538 (+1)
+ Inode table at 33539-33546 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 33547-33792
+ Free inodes: 4193-4224
+Group 132: (Blocks 33793-34048)
+ Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+ Inode table at 33795-33802 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 33803-34048
+ Free inodes: 4225-4256
+Group 133: (Blocks 34049-34304)
+ Block bitmap at 34049 (+0), Inode bitmap at 34050 (+1)
+ Inode table at 34051-34058 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 34059-34304
+ Free inodes: 4257-4288
+Group 134: (Blocks 34305-34560)
+ Block bitmap at 34305 (+0), Inode bitmap at 34306 (+1)
+ Inode table at 34307-34314 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 34315-34560
+ Free inodes: 4289-4320
+Group 135: (Blocks 34561-34816)
+ Block bitmap at 34561 (+0), Inode bitmap at 34562 (+1)
+ Inode table at 34563-34570 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 34571-34816
+ Free inodes: 4321-4352
+Group 136: (Blocks 34817-35072)
+ Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+ Inode table at 34819-34826 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 34827-35072
+ Free inodes: 4353-4384
+Group 137: (Blocks 35073-35328)
+ Block bitmap at 35073 (+0), Inode bitmap at 35074 (+1)
+ Inode table at 35075-35082 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 35083-35328
+ Free inodes: 4385-4416
+Group 138: (Blocks 35329-35584)
+ Block bitmap at 35329 (+0), Inode bitmap at 35330 (+1)
+ Inode table at 35331-35338 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 35339-35584
+ Free inodes: 4417-4448
+Group 139: (Blocks 35585-35840)
+ Block bitmap at 35585 (+0), Inode bitmap at 35586 (+1)
+ Inode table at 35587-35594 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 35595-35840
+ Free inodes: 4449-4480
+Group 140: (Blocks 35841-36096)
+ Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+ Inode table at 35843-35850 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 35851-36096
+ Free inodes: 4481-4512
+Group 141: (Blocks 36097-36352)
+ Block bitmap at 36097 (+0), Inode bitmap at 36098 (+1)
+ Inode table at 36099-36106 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 36107-36352
+ Free inodes: 4513-4544
+Group 142: (Blocks 36353-36608)
+ Block bitmap at 36353 (+0), Inode bitmap at 36354 (+1)
+ Inode table at 36355-36362 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 36363-36608
+ Free inodes: 4545-4576
+Group 143: (Blocks 36609-36864)
+ Block bitmap at 36609 (+0), Inode bitmap at 36610 (+1)
+ Inode table at 36611-36618 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 36619-36864
+ Free inodes: 4577-4608
+Group 144: (Blocks 36865-37120)
+ Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+ Inode table at 36867-36874 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 36875-37120
+ Free inodes: 4609-4640
+Group 145: (Blocks 37121-37376)
+ Block bitmap at 37121 (+0), Inode bitmap at 37122 (+1)
+ Inode table at 37123-37130 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 37131-37376
+ Free inodes: 4641-4672
+Group 146: (Blocks 37377-37632)
+ Block bitmap at 37377 (+0), Inode bitmap at 37378 (+1)
+ Inode table at 37379-37386 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 37387-37632
+ Free inodes: 4673-4704
+Group 147: (Blocks 37633-37888)
+ Block bitmap at 37633 (+0), Inode bitmap at 37634 (+1)
+ Inode table at 37635-37642 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 37643-37888
+ Free inodes: 4705-4736
+Group 148: (Blocks 37889-38144)
+ Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+ Inode table at 37891-37898 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 37899-38144
+ Free inodes: 4737-4768
+Group 149: (Blocks 38145-38400)
+ Block bitmap at 38145 (+0), Inode bitmap at 38146 (+1)
+ Inode table at 38147-38154 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 38155-38400
+ Free inodes: 4769-4800
+Group 150: (Blocks 38401-38656)
+ Block bitmap at 38401 (+0), Inode bitmap at 38402 (+1)
+ Inode table at 38403-38410 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 38411-38656
+ Free inodes: 4801-4832
+Group 151: (Blocks 38657-38912)
+ Block bitmap at 38657 (+0), Inode bitmap at 38658 (+1)
+ Inode table at 38659-38666 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 38667-38912
+ Free inodes: 4833-4864
+Group 152: (Blocks 38913-39168)
+ Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+ Inode table at 38915-38922 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 38923-39168
+ Free inodes: 4865-4896
+Group 153: (Blocks 39169-39424)
+ Block bitmap at 39169 (+0), Inode bitmap at 39170 (+1)
+ Inode table at 39171-39178 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 39179-39424
+ Free inodes: 4897-4928
+Group 154: (Blocks 39425-39680)
+ Block bitmap at 39425 (+0), Inode bitmap at 39426 (+1)
+ Inode table at 39427-39434 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 39435-39680
+ Free inodes: 4929-4960
+Group 155: (Blocks 39681-39936)
+ Block bitmap at 39681 (+0), Inode bitmap at 39682 (+1)
+ Inode table at 39683-39690 (+2)
+ 246 free blocks, 32 free inodes, 0 directories
+ Free blocks: 39691-39936
+ Free inodes: 4961-4992
+Group 156: (Blocks 39937-39999)
+ Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+ Inode table at 39939-39946 (+2)
+ 53 free blocks, 32 free inodes, 0 directories
+ Free blocks: 39947-39999
+ Free inodes: 4993-5024
diff --git a/tests/r_move_itable/name b/tests/r_move_itable/name
new file mode 100644
index 0000000..58c2d6d
--- /dev/null
+++ b/tests/r_move_itable/name
@@ -0,0 +1 @@
+filesystem resize which requires moving the inode table
diff --git a/tests/r_move_itable/script b/tests/r_move_itable/script
new file mode 100644
index 0000000..6625e82
--- /dev/null
+++ b/tests/r_move_itable/script
@@ -0,0 +1,103 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-yf
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 -g 256 -O ^resize_inode test.img 1024 > $OUT.new
+$MKE2FS -q -F -o Linux -b 1024 -g 256 -O ^resize_inode $TMPFILE 1024 >> $OUT.new 2>&1
+
+echo dumpe2fs test.img >> $OUT.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo resize2fs -p test.img 10000 >> $OUT.new
+$RESIZE2FS -p $TMPFILE 10000 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo "--------------------------------" >> $OUT.new
+
+echo resize2fs -p test.img 20000 >> $OUT.new
+$RESIZE2FS -p $TMPFILE 20000 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo "--------------------------------" >> $OUT.new
+
+echo resize2fs -p test.img 30000 >> $OUT.new
+$RESIZE2FS -p $TMPFILE 30000 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo "--------------------------------" >> $OUT.new
+
+echo resize2fs -p test.img 40000 >> $OUT.new
+$RESIZE2FS -p $TMPFILE 40000 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' < $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/r_move_itable_nostride/expect b/tests/r_move_itable_nostride/expect
new file mode 100644
index 0000000..74c2cc0
--- /dev/null
+++ b/tests/r_move_itable_nostride/expect
@@ -0,0 +1,61 @@
+mke2fs -q -F -o Linux -b 1024 -i 1024 -E stride=8192 -t ext4 test.img 1024000
+resize2fs -p test.img 10240000
+Resizing the filesystem on test.img to 100000000 (1k) blocks.
+Begin pass 2 (max = 2062)
+Relocating blocks ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 3 (max = 125)
+Scanning inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 5 (max = 5)
+Moving inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 99999745 (1k) blocks long.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/99999744 files (0.0% non-contiguous), 25048026/99999745 blocks
+Exit status is 0
+dumpe2fs -h test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 99999744
+Block count: 99999745
+Reserved block count: 4999987
+Free blocks: 74951719
+Free inodes: 99999733
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 8192
+Inode blocks per group: 2048
+RAID stride: 8192
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Journal features: (none)
+Total journal size: 16M
+Total journal blocks: 16384
+Max transaction length: 16384
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+
diff --git a/tests/r_move_itable_nostride/name b/tests/r_move_itable_nostride/name
new file mode 100644
index 0000000..798af7f
--- /dev/null
+++ b/tests/r_move_itable_nostride/name
@@ -0,0 +1 @@
+resize with flex_bg and stride value set
diff --git a/tests/r_move_itable_nostride/script b/tests/r_move_itable_nostride/script
new file mode 100644
index 0000000..d24df22
--- /dev/null
+++ b/tests/r_move_itable_nostride/script
@@ -0,0 +1,58 @@
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
+ # creates a 96GB filesystem
+ echo "$test_name: $test_description: skipped for $os"
+ return 0
+fi
+
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-yf
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 -i 1024 -E stride=8192 -t ext4 test.img 1024000 > $OUT
+$MKE2FS -q -F -o Linux -b 1024 -i 1024 -E stride=8192 -t ext4 \
+ $TMPFILE 1024000 >> $OUT 2>&1
+
+echo resize2fs -p test.img 10240000 >> $OUT
+$RESIZE2FS -p $TMPFILE 100000000 >> $OUT 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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 -h test.img >> $OUT
+$DUMPE2FS -h $TMPFILE >> $OUT 2>&1
+sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+rm -f $TMPFILE
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/r_move_itable_realloc/expect b/tests/r_move_itable_realloc/expect
new file mode 100644
index 0000000..67f2fe4
--- /dev/null
+++ b/tests/r_move_itable_realloc/expect
@@ -0,0 +1,60 @@
+mke2fs -q -F -o Linux -b 1024 -i 1024 -O ^resize_inode -t ext4 test.img 1024000
+resize2fs -p test.img 100000000
+Resizing the filesystem on test.img to 100000000 (1k) blocks.
+Begin pass 2 (max = 2061)
+Relocating blocks ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 3 (max = 125)
+Scanning inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+Begin pass 5 (max = 5)
+Moving inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 99999745 (1k) blocks long.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/99999744 files (0.0% non-contiguous), 25048025/99999745 blocks
+Exit status is 0
+dumpe2fs -h test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr dir_index filetype extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 99999744
+Block count: 99999745
+Reserved block count: 4999987
+Free blocks: 74951720
+Free inodes: 99999733
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 8192
+Inode blocks per group: 2048
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Journal features: (none)
+Total journal size: 16M
+Total journal blocks: 16384
+Max transaction length: 16384
+Fast commit length: 0
+Journal sequence: 0x00000001
+Journal start: 0
+
diff --git a/tests/r_move_itable_realloc/name b/tests/r_move_itable_realloc/name
new file mode 100644
index 0000000..c265317
--- /dev/null
+++ b/tests/r_move_itable_realloc/name
@@ -0,0 +1 @@
+don't allocate inode table from in-use blocks
diff --git a/tests/r_move_itable_realloc/script b/tests/r_move_itable_realloc/script
new file mode 100644
index 0000000..20c26db
--- /dev/null
+++ b/tests/r_move_itable_realloc/script
@@ -0,0 +1,58 @@
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
+ # creates a 96GB filesystem
+ echo "$test_name: $test_description: skipped: skipped for $os"
+ return 0
+fi
+
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-yf
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 -i 1024 -O ^resize_inode -t ext4 test.img 1024000 > $OUT
+$MKE2FS -q -F -o Linux -b 1024 -i 1024 -O ^resize_inode -t ext4 \
+ $TMPFILE 1024000 >> $OUT 2>&1
+
+echo resize2fs -p test.img 100000000 >> $OUT
+$RESIZE2FS -p $TMPFILE 100000000 >> $OUT 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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 -h test.img >> $OUT
+$DUMPE2FS -h $TMPFILE >> $OUT 2>&1
+sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+rm -f $TMPFILE
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/r_resize_inode/expect b/tests/r_resize_inode/expect
new file mode 100644
index 0000000..6756580
--- /dev/null
+++ b/tests/r_resize_inode/expect
@@ -0,0 +1,2231 @@
+mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 4096
+Block count: 16384
+Reserved block count: 819
+Overhead clusters: 2605
+Free blocks: 13765
+Free inodes: 4085
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 256
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 256
+Inode blocks per group: 64
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-258
+ Block bitmap at 259 (+258), Inode bitmap at 260 (+259)
+ Inode table at 261-324 (+260)
+ 686 free blocks, 245 free inodes, 2 directories
+ Free blocks: 339-1024
+ Free inodes: 12-256
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptors at 1026-1026
+ Reserved GDT blocks at 1027-1282
+ Block bitmap at 1283 (+258), Inode bitmap at 1284 (+259)
+ Inode table at 1285-1348 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 1349-2048
+ Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2114 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 2115-3072
+ Free inodes: 513-768
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073, Group descriptors at 3074-3074
+ Reserved GDT blocks at 3075-3330
+ Block bitmap at 3331 (+258), Inode bitmap at 3332 (+259)
+ Inode table at 3333-3396 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 3397-4096
+ Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4162 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 4163-5120
+ Free inodes: 1025-1280
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121, Group descriptors at 5122-5122
+ Reserved GDT blocks at 5123-5378
+ Block bitmap at 5379 (+258), Inode bitmap at 5380 (+259)
+ Inode table at 5381-5444 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 5445-6144
+ Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6210 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 6211-7168
+ Free inodes: 1537-1792
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169, Group descriptors at 7170-7170
+ Reserved GDT blocks at 7171-7426
+ Block bitmap at 7427 (+258), Inode bitmap at 7428 (+259)
+ Inode table at 7429-7492 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 7493-8192
+ Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8258 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 8259-9216
+ Free inodes: 2049-2304
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217, Group descriptors at 9218-9218
+ Reserved GDT blocks at 9219-9474
+ Block bitmap at 9475 (+258), Inode bitmap at 9476 (+259)
+ Inode table at 9477-9540 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 9541-10240
+ Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10306 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 10307-11264
+ Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11330 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 11331-12288
+ Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12354 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 12355-13312
+ Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13378 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 13379-14336
+ Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14402 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 14403-15360
+ Free inodes: 3585-3840
+Group 15: (Blocks 15361-16383)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15426 (+2)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 15427-16383
+ Free inodes: 3841-4096
+resize2fs -p test.img 65536
+Resizing the filesystem on test.img to 65536 (1k) blocks.
+Begin pass 1 (max = 48)
+Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 65536 (1k) blocks long.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 6561/65536 blocks
+Exit status is 0
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 16384
+Block count: 65536
+Reserved block count: 3276
+Free blocks: 58975
+Free inodes: 16373
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 255
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 256
+Inode blocks per group: 64
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptors at 2-3
+ Reserved GDT blocks at 4-258
+ Block bitmap at 259 (+258), Inode bitmap at 260 (+259)
+ Inode table at 261-324 (+260)
+ 686 free blocks, 245 free inodes, 2 directories
+ Free blocks: 339-1024
+ Free inodes: 12-256
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptors at 1026-1027
+ Reserved GDT blocks at 1028-1282
+ Block bitmap at 1283 (+258), Inode bitmap at 1284 (+259)
+ Inode table at 1285-1348 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 1349-2048
+ Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2114 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 2115-3072
+ Free inodes: 513-768
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073, Group descriptors at 3074-3075
+ Reserved GDT blocks at 3076-3330
+ Block bitmap at 3331 (+258), Inode bitmap at 3332 (+259)
+ Inode table at 3333-3396 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 3397-4096
+ Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4162 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 4163-5120
+ Free inodes: 1025-1280
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121, Group descriptors at 5122-5123
+ Reserved GDT blocks at 5124-5378
+ Block bitmap at 5379 (+258), Inode bitmap at 5380 (+259)
+ Inode table at 5381-5444 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 5445-6144
+ Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6210 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 6211-7168
+ Free inodes: 1537-1792
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169, Group descriptors at 7170-7171
+ Reserved GDT blocks at 7172-7426
+ Block bitmap at 7427 (+258), Inode bitmap at 7428 (+259)
+ Inode table at 7429-7492 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 7493-8192
+ Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8258 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 8259-9216
+ Free inodes: 2049-2304
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217, Group descriptors at 9218-9219
+ Reserved GDT blocks at 9220-9474
+ Block bitmap at 9475 (+258), Inode bitmap at 9476 (+259)
+ Inode table at 9477-9540 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 9541-10240
+ Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10306 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 10307-11264
+ Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11330 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 11331-12288
+ Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12354 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 12355-13312
+ Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13378 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 13379-14336
+ Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14402 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 14403-15360
+ Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15426 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 15427-16384
+ Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16450 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 16451-17408
+ Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17474 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 17475-18432
+ Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18498 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 18499-19456
+ Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19522 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 19523-20480
+ Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+ Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+ Inode table at 20483-20546 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 20547-21504
+ Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+ Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+ Inode table at 21507-21570 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 21571-22528
+ Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+ Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+ Inode table at 22531-22594 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 22595-23552
+ Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+ Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+ Inode table at 23555-23618 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 23619-24576
+ Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+ Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+ Inode table at 24579-24642 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 24643-25600
+ Free inodes: 6145-6400
+Group 25: (Blocks 25601-26624)
+ Backup superblock at 25601, Group descriptors at 25602-25603
+ Reserved GDT blocks at 25604-25858
+ Block bitmap at 25859 (+258), Inode bitmap at 25860 (+259)
+ Inode table at 25861-25924 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 25925-26624
+ Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+ Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+ Inode table at 26627-26690 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 26691-27648
+ Free inodes: 6657-6912
+Group 27: (Blocks 27649-28672)
+ Backup superblock at 27649, Group descriptors at 27650-27651
+ Reserved GDT blocks at 27652-27906
+ Block bitmap at 27907 (+258), Inode bitmap at 27908 (+259)
+ Inode table at 27909-27972 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 27973-28672
+ Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+ Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+ Inode table at 28675-28738 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 28739-29696
+ Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+ Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+ Inode table at 29699-29762 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 29763-30720
+ Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+ Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+ Inode table at 30723-30786 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 30787-31744
+ Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+ Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+ Inode table at 31747-31810 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 31811-32768
+ Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-32834 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 32835-33792
+ Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+ Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+ Inode table at 33795-33858 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 33859-34816
+ Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+ Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+ Inode table at 34819-34882 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 34883-35840
+ Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+ Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+ Inode table at 35843-35906 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 35907-36864
+ Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+ Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+ Inode table at 36867-36930 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 36931-37888
+ Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+ Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+ Inode table at 37891-37954 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 37955-38912
+ Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+ Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+ Inode table at 38915-38978 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 38979-39936
+ Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+ Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+ Inode table at 39939-40002 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 40003-40960
+ Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+ Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+ Inode table at 40963-41026 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 41027-41984
+ Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+ Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+ Inode table at 41987-42050 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 42051-43008
+ Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+ Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+ Inode table at 43011-43074 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 43075-44032
+ Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+ Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+ Inode table at 44035-44098 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 44099-45056
+ Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+ Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+ Inode table at 45059-45122 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 45123-46080
+ Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+ Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+ Inode table at 46083-46146 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 46147-47104
+ Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+ Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+ Inode table at 47107-47170 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 47171-48128
+ Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+ Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+ Inode table at 48131-48194 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 48195-49152
+ Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49218 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 49219-50176
+ Free inodes: 12289-12544
+Group 49: (Blocks 50177-51200)
+ Backup superblock at 50177, Group descriptors at 50178-50179
+ Reserved GDT blocks at 50180-50434
+ Block bitmap at 50435 (+258), Inode bitmap at 50436 (+259)
+ Inode table at 50437-50500 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 50501-51200
+ Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+ Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+ Inode table at 51203-51266 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 51267-52224
+ Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+ Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+ Inode table at 52227-52290 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 52291-53248
+ Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+ Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+ Inode table at 53251-53314 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 53315-54272
+ Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+ Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+ Inode table at 54275-54338 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 54339-55296
+ Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+ Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+ Inode table at 55299-55362 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 55363-56320
+ Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+ Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+ Inode table at 56323-56386 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 56387-57344
+ Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+ Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+ Inode table at 57347-57410 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 57411-58368
+ Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+ Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+ Inode table at 58371-58434 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 58435-59392
+ Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+ Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+ Inode table at 59395-59458 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 59459-60416
+ Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+ Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+ Inode table at 60419-60482 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 60483-61440
+ Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+ Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+ Inode table at 61443-61506 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 61507-62464
+ Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+ Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+ Inode table at 62467-62530 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 62531-63488
+ Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+ Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+ Inode table at 63491-63554 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 63555-64512
+ Free inodes: 15873-16128
+Group 63: (Blocks 64513-65535)
+ Block bitmap at 64513 (+0), Inode bitmap at 64514 (+1)
+ Inode table at 64515-64578 (+2)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 64579-65535
+ Free inodes: 16129-16384
+--------------------------------
+mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 16384
+Block count: 65536
+Reserved block count: 3276
+Overhead clusters: 6556
+Free blocks: 58966
+Free inodes: 16373
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 256
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 256
+Inode blocks per group: 64
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptors at 2-3
+ Reserved GDT blocks at 4-259
+ Block bitmap at 260 (+259), Inode bitmap at 261 (+260)
+ Inode table at 262-325 (+261)
+ 685 free blocks, 245 free inodes, 2 directories
+ Free blocks: 340-1024
+ Free inodes: 12-256
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptors at 1026-1027
+ Reserved GDT blocks at 1028-1283
+ Block bitmap at 1284 (+259), Inode bitmap at 1285 (+260)
+ Inode table at 1286-1349 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 1350-2048
+ Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2114 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 2115-3072
+ Free inodes: 513-768
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073, Group descriptors at 3074-3075
+ Reserved GDT blocks at 3076-3331
+ Block bitmap at 3332 (+259), Inode bitmap at 3333 (+260)
+ Inode table at 3334-3397 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 3398-4096
+ Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4162 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 4163-5120
+ Free inodes: 1025-1280
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121, Group descriptors at 5122-5123
+ Reserved GDT blocks at 5124-5379
+ Block bitmap at 5380 (+259), Inode bitmap at 5381 (+260)
+ Inode table at 5382-5445 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 5446-6144
+ Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6210 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 6211-7168
+ Free inodes: 1537-1792
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169, Group descriptors at 7170-7171
+ Reserved GDT blocks at 7172-7427
+ Block bitmap at 7428 (+259), Inode bitmap at 7429 (+260)
+ Inode table at 7430-7493 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 7494-8192
+ Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8258 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 8259-9216
+ Free inodes: 2049-2304
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217, Group descriptors at 9218-9219
+ Reserved GDT blocks at 9220-9475
+ Block bitmap at 9476 (+259), Inode bitmap at 9477 (+260)
+ Inode table at 9478-9541 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 9542-10240
+ Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10306 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 10307-11264
+ Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11330 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 11331-12288
+ Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12354 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 12355-13312
+ Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13378 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 13379-14336
+ Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14402 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 14403-15360
+ Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15426 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 15427-16384
+ Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16450 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 16451-17408
+ Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17474 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 17475-18432
+ Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18498 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 18499-19456
+ Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19522 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 19523-20480
+ Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+ Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+ Inode table at 20483-20546 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 20547-21504
+ Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+ Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+ Inode table at 21507-21570 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 21571-22528
+ Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+ Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+ Inode table at 22531-22594 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 22595-23552
+ Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+ Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+ Inode table at 23555-23618 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 23619-24576
+ Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+ Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+ Inode table at 24579-24642 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 24643-25600
+ Free inodes: 6145-6400
+Group 25: (Blocks 25601-26624)
+ Backup superblock at 25601, Group descriptors at 25602-25603
+ Reserved GDT blocks at 25604-25859
+ Block bitmap at 25860 (+259), Inode bitmap at 25861 (+260)
+ Inode table at 25862-25925 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 25926-26624
+ Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+ Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+ Inode table at 26627-26690 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 26691-27648
+ Free inodes: 6657-6912
+Group 27: (Blocks 27649-28672)
+ Backup superblock at 27649, Group descriptors at 27650-27651
+ Reserved GDT blocks at 27652-27907
+ Block bitmap at 27908 (+259), Inode bitmap at 27909 (+260)
+ Inode table at 27910-27973 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 27974-28672
+ Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+ Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+ Inode table at 28675-28738 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 28739-29696
+ Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+ Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+ Inode table at 29699-29762 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 29763-30720
+ Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+ Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+ Inode table at 30723-30786 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 30787-31744
+ Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+ Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+ Inode table at 31747-31810 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 31811-32768
+ Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-32834 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 32835-33792
+ Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+ Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+ Inode table at 33795-33858 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 33859-34816
+ Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+ Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+ Inode table at 34819-34882 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 34883-35840
+ Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+ Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+ Inode table at 35843-35906 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 35907-36864
+ Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+ Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+ Inode table at 36867-36930 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 36931-37888
+ Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+ Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+ Inode table at 37891-37954 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 37955-38912
+ Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+ Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+ Inode table at 38915-38978 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 38979-39936
+ Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+ Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+ Inode table at 39939-40002 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 40003-40960
+ Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+ Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+ Inode table at 40963-41026 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 41027-41984
+ Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+ Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+ Inode table at 41987-42050 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 42051-43008
+ Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+ Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+ Inode table at 43011-43074 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 43075-44032
+ Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+ Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+ Inode table at 44035-44098 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 44099-45056
+ Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+ Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+ Inode table at 45059-45122 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 45123-46080
+ Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+ Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+ Inode table at 46083-46146 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 46147-47104
+ Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+ Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+ Inode table at 47107-47170 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 47171-48128
+ Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+ Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+ Inode table at 48131-48194 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 48195-49152
+ Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49218 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 49219-50176
+ Free inodes: 12289-12544
+Group 49: (Blocks 50177-51200)
+ Backup superblock at 50177, Group descriptors at 50178-50179
+ Reserved GDT blocks at 50180-50435
+ Block bitmap at 50436 (+259), Inode bitmap at 50437 (+260)
+ Inode table at 50438-50501 (+261)
+ 699 free blocks, 256 free inodes, 0 directories
+ Free blocks: 50502-51200
+ Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+ Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+ Inode table at 51203-51266 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 51267-52224
+ Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+ Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+ Inode table at 52227-52290 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 52291-53248
+ Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+ Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+ Inode table at 53251-53314 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 53315-54272
+ Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+ Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+ Inode table at 54275-54338 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 54339-55296
+ Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+ Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+ Inode table at 55299-55362 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 55363-56320
+ Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+ Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+ Inode table at 56323-56386 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 56387-57344
+ Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+ Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+ Inode table at 57347-57410 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 57411-58368
+ Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+ Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+ Inode table at 58371-58434 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 58435-59392
+ Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+ Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+ Inode table at 59395-59458 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 59459-60416
+ Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+ Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+ Inode table at 60419-60482 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 60483-61440
+ Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+ Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+ Inode table at 61443-61506 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 61507-62464
+ Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+ Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+ Inode table at 62467-62530 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 62531-63488
+ Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+ Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+ Inode table at 63491-63554 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 63555-64512
+ Free inodes: 15873-16128
+Group 63: (Blocks 64513-65535)
+ Block bitmap at 64513 (+0), Inode bitmap at 64514 (+1)
+ Inode table at 64515-64578 (+2)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 64579-65535
+ Free inodes: 16129-16384
+resize2fs -p test.img 16384
+Resizing the filesystem on test.img to 16384 (1k) blocks.
+Begin pass 3 (max = 64)
+Scanning inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 16384 (1k) blocks long.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/4096 files (0.0% non-contiguous), 2619/16384 blocks
+Exit status is 0
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 4096
+Block count: 16384
+Reserved block count: 819
+Free blocks: 13765
+Free inodes: 4085
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 256
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 256
+Inode blocks per group: 64
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-258
+ Block bitmap at 260 (+259), Inode bitmap at 261 (+260)
+ Inode table at 262-325 (+261)
+ 686 free blocks, 245 free inodes, 2 directories
+ Free blocks: 259, 340-1024
+ Free inodes: 12-256
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptors at 1026-1026
+ Reserved GDT blocks at 1027-1282
+ Block bitmap at 1284 (+259), Inode bitmap at 1285 (+260)
+ Inode table at 1286-1349 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 1283, 1350-2048
+ Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2114 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 2115-3072
+ Free inodes: 513-768
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073, Group descriptors at 3074-3074
+ Reserved GDT blocks at 3075-3330
+ Block bitmap at 3332 (+259), Inode bitmap at 3333 (+260)
+ Inode table at 3334-3397 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 3331, 3398-4096
+ Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4162 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 4163-5120
+ Free inodes: 1025-1280
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121, Group descriptors at 5122-5122
+ Reserved GDT blocks at 5123-5378
+ Block bitmap at 5380 (+259), Inode bitmap at 5381 (+260)
+ Inode table at 5382-5445 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 5379, 5446-6144
+ Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6210 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 6211-7168
+ Free inodes: 1537-1792
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169, Group descriptors at 7170-7170
+ Reserved GDT blocks at 7171-7426
+ Block bitmap at 7428 (+259), Inode bitmap at 7429 (+260)
+ Inode table at 7430-7493 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 7427, 7494-8192
+ Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8258 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 8259-9216
+ Free inodes: 2049-2304
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217, Group descriptors at 9218-9218
+ Reserved GDT blocks at 9219-9474
+ Block bitmap at 9476 (+259), Inode bitmap at 9477 (+260)
+ Inode table at 9478-9541 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 9475, 9542-10240
+ Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10306 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 10307-11264
+ Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11330 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 11331-12288
+ Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12354 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 12355-13312
+ Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13378 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 13379-14336
+ Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14402 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 14403-15360
+ Free inodes: 3585-3840
+Group 15: (Blocks 15361-16383)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15426 (+2)
+ 957 free blocks, 256 free inodes, 0 directories
+ Free blocks: 15427-16383
+ Free inodes: 3841-4096
+--------------------------------
+resize2fs -p test.img 165536
+Resizing the filesystem on test.img to 165536 (1k) blocks.
+Begin pass 1 (max = 146)
+Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 165536 (1k) blocks long.
+
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/41472 files (0.0% non-contiguous), 13545/165536 blocks
+Exit status is 0
+dumpe2fs test.img
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 41472
+Block count: 165536
+Reserved block count: 8274
+Free blocks: 151991
+Free inodes: 41461
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 251
+Blocks per group: 1024
+Fragments per group: 1024
+Inodes per group: 256
+Inode blocks per group: 64
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-1024)
+ Primary superblock at 1, Group descriptors at 2-7
+ Reserved GDT blocks at 8-258
+ Block bitmap at 260 (+259), Inode bitmap at 261 (+260)
+ Inode table at 262-325 (+261)
+ 686 free blocks, 245 free inodes, 2 directories
+ Free blocks: 259, 340-1024
+ Free inodes: 12-256
+Group 1: (Blocks 1025-2048)
+ Backup superblock at 1025, Group descriptors at 1026-1031
+ Reserved GDT blocks at 1032-1282
+ Block bitmap at 1284 (+259), Inode bitmap at 1285 (+260)
+ Inode table at 1286-1349 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 1283, 1350-2048
+ Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+ Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+ Inode table at 2051-2114 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 2115-3072
+ Free inodes: 513-768
+Group 3: (Blocks 3073-4096)
+ Backup superblock at 3073, Group descriptors at 3074-3079
+ Reserved GDT blocks at 3080-3330
+ Block bitmap at 3332 (+259), Inode bitmap at 3333 (+260)
+ Inode table at 3334-3397 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 3331, 3398-4096
+ Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+ Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+ Inode table at 4099-4162 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 4163-5120
+ Free inodes: 1025-1280
+Group 5: (Blocks 5121-6144)
+ Backup superblock at 5121, Group descriptors at 5122-5127
+ Reserved GDT blocks at 5128-5378
+ Block bitmap at 5380 (+259), Inode bitmap at 5381 (+260)
+ Inode table at 5382-5445 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 5379, 5446-6144
+ Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+ Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+ Inode table at 6147-6210 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 6211-7168
+ Free inodes: 1537-1792
+Group 7: (Blocks 7169-8192)
+ Backup superblock at 7169, Group descriptors at 7170-7175
+ Reserved GDT blocks at 7176-7426
+ Block bitmap at 7428 (+259), Inode bitmap at 7429 (+260)
+ Inode table at 7430-7493 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 7427, 7494-8192
+ Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+ Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+ Inode table at 8195-8258 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 8259-9216
+ Free inodes: 2049-2304
+Group 9: (Blocks 9217-10240)
+ Backup superblock at 9217, Group descriptors at 9218-9223
+ Reserved GDT blocks at 9224-9474
+ Block bitmap at 9476 (+259), Inode bitmap at 9477 (+260)
+ Inode table at 9478-9541 (+261)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 9475, 9542-10240
+ Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+ Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+ Inode table at 10243-10306 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 10307-11264
+ Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+ Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+ Inode table at 11267-11330 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 11331-12288
+ Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+ Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+ Inode table at 12291-12354 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 12355-13312
+ Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+ Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+ Inode table at 13315-13378 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 13379-14336
+ Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+ Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+ Inode table at 14339-14402 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 14403-15360
+ Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+ Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+ Inode table at 15363-15426 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 15427-16384
+ Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16450 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 16451-17408
+ Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+ Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+ Inode table at 17411-17474 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 17475-18432
+ Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+ Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+ Inode table at 18435-18498 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 18499-19456
+ Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+ Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+ Inode table at 19459-19522 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 19523-20480
+ Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+ Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+ Inode table at 20483-20546 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 20547-21504
+ Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+ Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+ Inode table at 21507-21570 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 21571-22528
+ Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+ Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+ Inode table at 22531-22594 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 22595-23552
+ Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+ Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+ Inode table at 23555-23618 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 23619-24576
+ Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+ Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+ Inode table at 24579-24642 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 24643-25600
+ Free inodes: 6145-6400
+Group 25: (Blocks 25601-26624)
+ Backup superblock at 25601, Group descriptors at 25602-25607
+ Reserved GDT blocks at 25608-25858
+ Block bitmap at 25859 (+258), Inode bitmap at 25860 (+259)
+ Inode table at 25861-25924 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 25925-26624
+ Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+ Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+ Inode table at 26627-26690 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 26691-27648
+ Free inodes: 6657-6912
+Group 27: (Blocks 27649-28672)
+ Backup superblock at 27649, Group descriptors at 27650-27655
+ Reserved GDT blocks at 27656-27906
+ Block bitmap at 27907 (+258), Inode bitmap at 27908 (+259)
+ Inode table at 27909-27972 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 27973-28672
+ Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+ Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+ Inode table at 28675-28738 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 28739-29696
+ Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+ Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+ Inode table at 29699-29762 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 29763-30720
+ Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+ Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+ Inode table at 30723-30786 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 30787-31744
+ Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+ Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+ Inode table at 31747-31810 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 31811-32768
+ Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-32834 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 32835-33792
+ Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+ Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+ Inode table at 33795-33858 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 33859-34816
+ Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+ Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+ Inode table at 34819-34882 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 34883-35840
+ Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+ Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+ Inode table at 35843-35906 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 35907-36864
+ Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+ Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+ Inode table at 36867-36930 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 36931-37888
+ Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+ Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+ Inode table at 37891-37954 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 37955-38912
+ Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+ Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+ Inode table at 38915-38978 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 38979-39936
+ Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+ Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+ Inode table at 39939-40002 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 40003-40960
+ Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+ Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+ Inode table at 40963-41026 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 41027-41984
+ Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+ Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+ Inode table at 41987-42050 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 42051-43008
+ Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+ Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+ Inode table at 43011-43074 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 43075-44032
+ Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+ Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+ Inode table at 44035-44098 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 44099-45056
+ Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+ Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+ Inode table at 45059-45122 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 45123-46080
+ Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+ Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+ Inode table at 46083-46146 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 46147-47104
+ Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+ Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+ Inode table at 47107-47170 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 47171-48128
+ Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+ Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+ Inode table at 48131-48194 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 48195-49152
+ Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49218 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 49219-50176
+ Free inodes: 12289-12544
+Group 49: (Blocks 50177-51200)
+ Backup superblock at 50177, Group descriptors at 50178-50183
+ Reserved GDT blocks at 50184-50434
+ Block bitmap at 50435 (+258), Inode bitmap at 50436 (+259)
+ Inode table at 50437-50500 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 50501-51200
+ Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+ Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+ Inode table at 51203-51266 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 51267-52224
+ Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+ Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+ Inode table at 52227-52290 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 52291-53248
+ Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+ Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+ Inode table at 53251-53314 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 53315-54272
+ Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+ Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+ Inode table at 54275-54338 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 54339-55296
+ Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+ Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+ Inode table at 55299-55362 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 55363-56320
+ Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+ Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+ Inode table at 56323-56386 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 56387-57344
+ Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+ Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+ Inode table at 57347-57410 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 57411-58368
+ Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+ Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+ Inode table at 58371-58434 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 58435-59392
+ Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+ Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+ Inode table at 59395-59458 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 59459-60416
+ Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+ Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+ Inode table at 60419-60482 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 60483-61440
+ Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+ Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+ Inode table at 61443-61506 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 61507-62464
+ Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+ Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+ Inode table at 62467-62530 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 62531-63488
+ Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+ Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+ Inode table at 63491-63554 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 63555-64512
+ Free inodes: 15873-16128
+Group 63: (Blocks 64513-65536)
+ Block bitmap at 64513 (+0), Inode bitmap at 64514 (+1)
+ Inode table at 64515-64578 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 64579-65536
+ Free inodes: 16129-16384
+Group 64: (Blocks 65537-66560)
+ Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1)
+ Inode table at 65539-65602 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 65603-66560
+ Free inodes: 16385-16640
+Group 65: (Blocks 66561-67584)
+ Block bitmap at 66561 (+0), Inode bitmap at 66562 (+1)
+ Inode table at 66563-66626 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 66627-67584
+ Free inodes: 16641-16896
+Group 66: (Blocks 67585-68608)
+ Block bitmap at 67585 (+0), Inode bitmap at 67586 (+1)
+ Inode table at 67587-67650 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 67651-68608
+ Free inodes: 16897-17152
+Group 67: (Blocks 68609-69632)
+ Block bitmap at 68609 (+0), Inode bitmap at 68610 (+1)
+ Inode table at 68611-68674 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 68675-69632
+ Free inodes: 17153-17408
+Group 68: (Blocks 69633-70656)
+ Block bitmap at 69633 (+0), Inode bitmap at 69634 (+1)
+ Inode table at 69635-69698 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 69699-70656
+ Free inodes: 17409-17664
+Group 69: (Blocks 70657-71680)
+ Block bitmap at 70657 (+0), Inode bitmap at 70658 (+1)
+ Inode table at 70659-70722 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 70723-71680
+ Free inodes: 17665-17920
+Group 70: (Blocks 71681-72704)
+ Block bitmap at 71681 (+0), Inode bitmap at 71682 (+1)
+ Inode table at 71683-71746 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 71747-72704
+ Free inodes: 17921-18176
+Group 71: (Blocks 72705-73728)
+ Block bitmap at 72705 (+0), Inode bitmap at 72706 (+1)
+ Inode table at 72707-72770 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 72771-73728
+ Free inodes: 18177-18432
+Group 72: (Blocks 73729-74752)
+ Block bitmap at 73729 (+0), Inode bitmap at 73730 (+1)
+ Inode table at 73731-73794 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 73795-74752
+ Free inodes: 18433-18688
+Group 73: (Blocks 74753-75776)
+ Block bitmap at 74753 (+0), Inode bitmap at 74754 (+1)
+ Inode table at 74755-74818 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 74819-75776
+ Free inodes: 18689-18944
+Group 74: (Blocks 75777-76800)
+ Block bitmap at 75777 (+0), Inode bitmap at 75778 (+1)
+ Inode table at 75779-75842 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 75843-76800
+ Free inodes: 18945-19200
+Group 75: (Blocks 76801-77824)
+ Block bitmap at 76801 (+0), Inode bitmap at 76802 (+1)
+ Inode table at 76803-76866 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 76867-77824
+ Free inodes: 19201-19456
+Group 76: (Blocks 77825-78848)
+ Block bitmap at 77825 (+0), Inode bitmap at 77826 (+1)
+ Inode table at 77827-77890 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 77891-78848
+ Free inodes: 19457-19712
+Group 77: (Blocks 78849-79872)
+ Block bitmap at 78849 (+0), Inode bitmap at 78850 (+1)
+ Inode table at 78851-78914 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 78915-79872
+ Free inodes: 19713-19968
+Group 78: (Blocks 79873-80896)
+ Block bitmap at 79873 (+0), Inode bitmap at 79874 (+1)
+ Inode table at 79875-79938 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 79939-80896
+ Free inodes: 19969-20224
+Group 79: (Blocks 80897-81920)
+ Block bitmap at 80897 (+0), Inode bitmap at 80898 (+1)
+ Inode table at 80899-80962 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 80963-81920
+ Free inodes: 20225-20480
+Group 80: (Blocks 81921-82944)
+ Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+ Inode table at 81923-81986 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 81987-82944
+ Free inodes: 20481-20736
+Group 81: (Blocks 82945-83968)
+ Backup superblock at 82945, Group descriptors at 82946-82951
+ Reserved GDT blocks at 82952-83202
+ Block bitmap at 83203 (+258), Inode bitmap at 83204 (+259)
+ Inode table at 83205-83268 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 83269-83968
+ Free inodes: 20737-20992
+Group 82: (Blocks 83969-84992)
+ Block bitmap at 83969 (+0), Inode bitmap at 83970 (+1)
+ Inode table at 83971-84034 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 84035-84992
+ Free inodes: 20993-21248
+Group 83: (Blocks 84993-86016)
+ Block bitmap at 84993 (+0), Inode bitmap at 84994 (+1)
+ Inode table at 84995-85058 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 85059-86016
+ Free inodes: 21249-21504
+Group 84: (Blocks 86017-87040)
+ Block bitmap at 86017 (+0), Inode bitmap at 86018 (+1)
+ Inode table at 86019-86082 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 86083-87040
+ Free inodes: 21505-21760
+Group 85: (Blocks 87041-88064)
+ Block bitmap at 87041 (+0), Inode bitmap at 87042 (+1)
+ Inode table at 87043-87106 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 87107-88064
+ Free inodes: 21761-22016
+Group 86: (Blocks 88065-89088)
+ Block bitmap at 88065 (+0), Inode bitmap at 88066 (+1)
+ Inode table at 88067-88130 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 88131-89088
+ Free inodes: 22017-22272
+Group 87: (Blocks 89089-90112)
+ Block bitmap at 89089 (+0), Inode bitmap at 89090 (+1)
+ Inode table at 89091-89154 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 89155-90112
+ Free inodes: 22273-22528
+Group 88: (Blocks 90113-91136)
+ Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+ Inode table at 90115-90178 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 90179-91136
+ Free inodes: 22529-22784
+Group 89: (Blocks 91137-92160)
+ Block bitmap at 91137 (+0), Inode bitmap at 91138 (+1)
+ Inode table at 91139-91202 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 91203-92160
+ Free inodes: 22785-23040
+Group 90: (Blocks 92161-93184)
+ Block bitmap at 92161 (+0), Inode bitmap at 92162 (+1)
+ Inode table at 92163-92226 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 92227-93184
+ Free inodes: 23041-23296
+Group 91: (Blocks 93185-94208)
+ Block bitmap at 93185 (+0), Inode bitmap at 93186 (+1)
+ Inode table at 93187-93250 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 93251-94208
+ Free inodes: 23297-23552
+Group 92: (Blocks 94209-95232)
+ Block bitmap at 94209 (+0), Inode bitmap at 94210 (+1)
+ Inode table at 94211-94274 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 94275-95232
+ Free inodes: 23553-23808
+Group 93: (Blocks 95233-96256)
+ Block bitmap at 95233 (+0), Inode bitmap at 95234 (+1)
+ Inode table at 95235-95298 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 95299-96256
+ Free inodes: 23809-24064
+Group 94: (Blocks 96257-97280)
+ Block bitmap at 96257 (+0), Inode bitmap at 96258 (+1)
+ Inode table at 96259-96322 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 96323-97280
+ Free inodes: 24065-24320
+Group 95: (Blocks 97281-98304)
+ Block bitmap at 97281 (+0), Inode bitmap at 97282 (+1)
+ Inode table at 97283-97346 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 97347-98304
+ Free inodes: 24321-24576
+Group 96: (Blocks 98305-99328)
+ Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1)
+ Inode table at 98307-98370 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 98371-99328
+ Free inodes: 24577-24832
+Group 97: (Blocks 99329-100352)
+ Block bitmap at 99329 (+0), Inode bitmap at 99330 (+1)
+ Inode table at 99331-99394 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 99395-100352
+ Free inodes: 24833-25088
+Group 98: (Blocks 100353-101376)
+ Block bitmap at 100353 (+0), Inode bitmap at 100354 (+1)
+ Inode table at 100355-100418 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 100419-101376
+ Free inodes: 25089-25344
+Group 99: (Blocks 101377-102400)
+ Block bitmap at 101377 (+0), Inode bitmap at 101378 (+1)
+ Inode table at 101379-101442 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 101443-102400
+ Free inodes: 25345-25600
+Group 100: (Blocks 102401-103424)
+ Block bitmap at 102401 (+0), Inode bitmap at 102402 (+1)
+ Inode table at 102403-102466 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 102467-103424
+ Free inodes: 25601-25856
+Group 101: (Blocks 103425-104448)
+ Block bitmap at 103425 (+0), Inode bitmap at 103426 (+1)
+ Inode table at 103427-103490 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 103491-104448
+ Free inodes: 25857-26112
+Group 102: (Blocks 104449-105472)
+ Block bitmap at 104449 (+0), Inode bitmap at 104450 (+1)
+ Inode table at 104451-104514 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 104515-105472
+ Free inodes: 26113-26368
+Group 103: (Blocks 105473-106496)
+ Block bitmap at 105473 (+0), Inode bitmap at 105474 (+1)
+ Inode table at 105475-105538 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 105539-106496
+ Free inodes: 26369-26624
+Group 104: (Blocks 106497-107520)
+ Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+ Inode table at 106499-106562 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 106563-107520
+ Free inodes: 26625-26880
+Group 105: (Blocks 107521-108544)
+ Block bitmap at 107521 (+0), Inode bitmap at 107522 (+1)
+ Inode table at 107523-107586 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 107587-108544
+ Free inodes: 26881-27136
+Group 106: (Blocks 108545-109568)
+ Block bitmap at 108545 (+0), Inode bitmap at 108546 (+1)
+ Inode table at 108547-108610 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 108611-109568
+ Free inodes: 27137-27392
+Group 107: (Blocks 109569-110592)
+ Block bitmap at 109569 (+0), Inode bitmap at 109570 (+1)
+ Inode table at 109571-109634 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 109635-110592
+ Free inodes: 27393-27648
+Group 108: (Blocks 110593-111616)
+ Block bitmap at 110593 (+0), Inode bitmap at 110594 (+1)
+ Inode table at 110595-110658 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 110659-111616
+ Free inodes: 27649-27904
+Group 109: (Blocks 111617-112640)
+ Block bitmap at 111617 (+0), Inode bitmap at 111618 (+1)
+ Inode table at 111619-111682 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 111683-112640
+ Free inodes: 27905-28160
+Group 110: (Blocks 112641-113664)
+ Block bitmap at 112641 (+0), Inode bitmap at 112642 (+1)
+ Inode table at 112643-112706 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 112707-113664
+ Free inodes: 28161-28416
+Group 111: (Blocks 113665-114688)
+ Block bitmap at 113665 (+0), Inode bitmap at 113666 (+1)
+ Inode table at 113667-113730 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 113731-114688
+ Free inodes: 28417-28672
+Group 112: (Blocks 114689-115712)
+ Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+ Inode table at 114691-114754 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 114755-115712
+ Free inodes: 28673-28928
+Group 113: (Blocks 115713-116736)
+ Block bitmap at 115713 (+0), Inode bitmap at 115714 (+1)
+ Inode table at 115715-115778 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 115779-116736
+ Free inodes: 28929-29184
+Group 114: (Blocks 116737-117760)
+ Block bitmap at 116737 (+0), Inode bitmap at 116738 (+1)
+ Inode table at 116739-116802 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 116803-117760
+ Free inodes: 29185-29440
+Group 115: (Blocks 117761-118784)
+ Block bitmap at 117761 (+0), Inode bitmap at 117762 (+1)
+ Inode table at 117763-117826 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 117827-118784
+ Free inodes: 29441-29696
+Group 116: (Blocks 118785-119808)
+ Block bitmap at 118785 (+0), Inode bitmap at 118786 (+1)
+ Inode table at 118787-118850 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 118851-119808
+ Free inodes: 29697-29952
+Group 117: (Blocks 119809-120832)
+ Block bitmap at 119809 (+0), Inode bitmap at 119810 (+1)
+ Inode table at 119811-119874 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 119875-120832
+ Free inodes: 29953-30208
+Group 118: (Blocks 120833-121856)
+ Block bitmap at 120833 (+0), Inode bitmap at 120834 (+1)
+ Inode table at 120835-120898 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 120899-121856
+ Free inodes: 30209-30464
+Group 119: (Blocks 121857-122880)
+ Block bitmap at 121857 (+0), Inode bitmap at 121858 (+1)
+ Inode table at 121859-121922 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 121923-122880
+ Free inodes: 30465-30720
+Group 120: (Blocks 122881-123904)
+ Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+ Inode table at 122883-122946 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 122947-123904
+ Free inodes: 30721-30976
+Group 121: (Blocks 123905-124928)
+ Block bitmap at 123905 (+0), Inode bitmap at 123906 (+1)
+ Inode table at 123907-123970 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 123971-124928
+ Free inodes: 30977-31232
+Group 122: (Blocks 124929-125952)
+ Block bitmap at 124929 (+0), Inode bitmap at 124930 (+1)
+ Inode table at 124931-124994 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 124995-125952
+ Free inodes: 31233-31488
+Group 123: (Blocks 125953-126976)
+ Block bitmap at 125953 (+0), Inode bitmap at 125954 (+1)
+ Inode table at 125955-126018 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 126019-126976
+ Free inodes: 31489-31744
+Group 124: (Blocks 126977-128000)
+ Block bitmap at 126977 (+0), Inode bitmap at 126978 (+1)
+ Inode table at 126979-127042 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 127043-128000
+ Free inodes: 31745-32000
+Group 125: (Blocks 128001-129024)
+ Backup superblock at 128001, Group descriptors at 128002-128007
+ Reserved GDT blocks at 128008-128258
+ Block bitmap at 128259 (+258), Inode bitmap at 128260 (+259)
+ Inode table at 128261-128324 (+260)
+ 700 free blocks, 256 free inodes, 0 directories
+ Free blocks: 128325-129024
+ Free inodes: 32001-32256
+Group 126: (Blocks 129025-130048)
+ Block bitmap at 129025 (+0), Inode bitmap at 129026 (+1)
+ Inode table at 129027-129090 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 129091-130048
+ Free inodes: 32257-32512
+Group 127: (Blocks 130049-131072)
+ Block bitmap at 130049 (+0), Inode bitmap at 130050 (+1)
+ Inode table at 130051-130114 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 130115-131072
+ Free inodes: 32513-32768
+Group 128: (Blocks 131073-132096)
+ Block bitmap at 131073 (+0), Inode bitmap at 131074 (+1)
+ Inode table at 131075-131138 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 131139-132096
+ Free inodes: 32769-33024
+Group 129: (Blocks 132097-133120)
+ Block bitmap at 132097 (+0), Inode bitmap at 132098 (+1)
+ Inode table at 132099-132162 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 132163-133120
+ Free inodes: 33025-33280
+Group 130: (Blocks 133121-134144)
+ Block bitmap at 133121 (+0), Inode bitmap at 133122 (+1)
+ Inode table at 133123-133186 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 133187-134144
+ Free inodes: 33281-33536
+Group 131: (Blocks 134145-135168)
+ Block bitmap at 134145 (+0), Inode bitmap at 134146 (+1)
+ Inode table at 134147-134210 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 134211-135168
+ Free inodes: 33537-33792
+Group 132: (Blocks 135169-136192)
+ Block bitmap at 135169 (+0), Inode bitmap at 135170 (+1)
+ Inode table at 135171-135234 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 135235-136192
+ Free inodes: 33793-34048
+Group 133: (Blocks 136193-137216)
+ Block bitmap at 136193 (+0), Inode bitmap at 136194 (+1)
+ Inode table at 136195-136258 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 136259-137216
+ Free inodes: 34049-34304
+Group 134: (Blocks 137217-138240)
+ Block bitmap at 137217 (+0), Inode bitmap at 137218 (+1)
+ Inode table at 137219-137282 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 137283-138240
+ Free inodes: 34305-34560
+Group 135: (Blocks 138241-139264)
+ Block bitmap at 138241 (+0), Inode bitmap at 138242 (+1)
+ Inode table at 138243-138306 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 138307-139264
+ Free inodes: 34561-34816
+Group 136: (Blocks 139265-140288)
+ Block bitmap at 139265 (+0), Inode bitmap at 139266 (+1)
+ Inode table at 139267-139330 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 139331-140288
+ Free inodes: 34817-35072
+Group 137: (Blocks 140289-141312)
+ Block bitmap at 140289 (+0), Inode bitmap at 140290 (+1)
+ Inode table at 140291-140354 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 140355-141312
+ Free inodes: 35073-35328
+Group 138: (Blocks 141313-142336)
+ Block bitmap at 141313 (+0), Inode bitmap at 141314 (+1)
+ Inode table at 141315-141378 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 141379-142336
+ Free inodes: 35329-35584
+Group 139: (Blocks 142337-143360)
+ Block bitmap at 142337 (+0), Inode bitmap at 142338 (+1)
+ Inode table at 142339-142402 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 142403-143360
+ Free inodes: 35585-35840
+Group 140: (Blocks 143361-144384)
+ Block bitmap at 143361 (+0), Inode bitmap at 143362 (+1)
+ Inode table at 143363-143426 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 143427-144384
+ Free inodes: 35841-36096
+Group 141: (Blocks 144385-145408)
+ Block bitmap at 144385 (+0), Inode bitmap at 144386 (+1)
+ Inode table at 144387-144450 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 144451-145408
+ Free inodes: 36097-36352
+Group 142: (Blocks 145409-146432)
+ Block bitmap at 145409 (+0), Inode bitmap at 145410 (+1)
+ Inode table at 145411-145474 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 145475-146432
+ Free inodes: 36353-36608
+Group 143: (Blocks 146433-147456)
+ Block bitmap at 146433 (+0), Inode bitmap at 146434 (+1)
+ Inode table at 146435-146498 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 146499-147456
+ Free inodes: 36609-36864
+Group 144: (Blocks 147457-148480)
+ Block bitmap at 147457 (+0), Inode bitmap at 147458 (+1)
+ Inode table at 147459-147522 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 147523-148480
+ Free inodes: 36865-37120
+Group 145: (Blocks 148481-149504)
+ Block bitmap at 148481 (+0), Inode bitmap at 148482 (+1)
+ Inode table at 148483-148546 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 148547-149504
+ Free inodes: 37121-37376
+Group 146: (Blocks 149505-150528)
+ Block bitmap at 149505 (+0), Inode bitmap at 149506 (+1)
+ Inode table at 149507-149570 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 149571-150528
+ Free inodes: 37377-37632
+Group 147: (Blocks 150529-151552)
+ Block bitmap at 150529 (+0), Inode bitmap at 150530 (+1)
+ Inode table at 150531-150594 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 150595-151552
+ Free inodes: 37633-37888
+Group 148: (Blocks 151553-152576)
+ Block bitmap at 151553 (+0), Inode bitmap at 151554 (+1)
+ Inode table at 151555-151618 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 151619-152576
+ Free inodes: 37889-38144
+Group 149: (Blocks 152577-153600)
+ Block bitmap at 152577 (+0), Inode bitmap at 152578 (+1)
+ Inode table at 152579-152642 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 152643-153600
+ Free inodes: 38145-38400
+Group 150: (Blocks 153601-154624)
+ Block bitmap at 153601 (+0), Inode bitmap at 153602 (+1)
+ Inode table at 153603-153666 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 153667-154624
+ Free inodes: 38401-38656
+Group 151: (Blocks 154625-155648)
+ Block bitmap at 154625 (+0), Inode bitmap at 154626 (+1)
+ Inode table at 154627-154690 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 154691-155648
+ Free inodes: 38657-38912
+Group 152: (Blocks 155649-156672)
+ Block bitmap at 155649 (+0), Inode bitmap at 155650 (+1)
+ Inode table at 155651-155714 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 155715-156672
+ Free inodes: 38913-39168
+Group 153: (Blocks 156673-157696)
+ Block bitmap at 156673 (+0), Inode bitmap at 156674 (+1)
+ Inode table at 156675-156738 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 156739-157696
+ Free inodes: 39169-39424
+Group 154: (Blocks 157697-158720)
+ Block bitmap at 157697 (+0), Inode bitmap at 157698 (+1)
+ Inode table at 157699-157762 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 157763-158720
+ Free inodes: 39425-39680
+Group 155: (Blocks 158721-159744)
+ Block bitmap at 158721 (+0), Inode bitmap at 158722 (+1)
+ Inode table at 158723-158786 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 158787-159744
+ Free inodes: 39681-39936
+Group 156: (Blocks 159745-160768)
+ Block bitmap at 159745 (+0), Inode bitmap at 159746 (+1)
+ Inode table at 159747-159810 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 159811-160768
+ Free inodes: 39937-40192
+Group 157: (Blocks 160769-161792)
+ Block bitmap at 160769 (+0), Inode bitmap at 160770 (+1)
+ Inode table at 160771-160834 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 160835-161792
+ Free inodes: 40193-40448
+Group 158: (Blocks 161793-162816)
+ Block bitmap at 161793 (+0), Inode bitmap at 161794 (+1)
+ Inode table at 161795-161858 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 161859-162816
+ Free inodes: 40449-40704
+Group 159: (Blocks 162817-163840)
+ Block bitmap at 162817 (+0), Inode bitmap at 162818 (+1)
+ Inode table at 162819-162882 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 162883-163840
+ Free inodes: 40705-40960
+Group 160: (Blocks 163841-164864)
+ Block bitmap at 163841 (+0), Inode bitmap at 163842 (+1)
+ Inode table at 163843-163906 (+2)
+ 958 free blocks, 256 free inodes, 0 directories
+ Free blocks: 163907-164864
+ Free inodes: 40961-41216
+Group 161: (Blocks 164865-165535)
+ Block bitmap at 164865 (+0), Inode bitmap at 164866 (+1)
+ Inode table at 164867-164930 (+2)
+ 605 free blocks, 256 free inodes, 0 directories
+ Free blocks: 164931-165535
+ Free inodes: 41217-41472
diff --git a/tests/r_resize_inode/name b/tests/r_resize_inode/name
new file mode 100644
index 0000000..53e4e6f
--- /dev/null
+++ b/tests/r_resize_inode/name
@@ -0,0 +1 @@
+filesystem resize with a resize_inode present
diff --git a/tests/r_resize_inode/script b/tests/r_resize_inode/script
new file mode 100644
index 0000000..d884232
--- /dev/null
+++ b/tests/r_resize_inode/script
@@ -0,0 +1,95 @@
+if test -x $RESIZE2FS_EXE; then
+
+FSCK_OPT=-yf
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT.new
+$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 >> $OUT.new 2>&1
+
+echo dumpe2fs test.img >> $OUT.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo resize2fs -p test.img 65536 >> $OUT.new
+$RESIZE2FS -p $TMPFILE 65536 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo "--------------------------------" >> $OUT.new
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536 >> $OUT.new
+$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 >> $OUT.new 2>&1
+
+echo dumpe2fs test.img >> $OUT.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo resize2fs -p test.img 16384 >> $OUT.new
+$RESIZE2FS -p $TMPFILE 16384 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+
+echo "--------------------------------" >> $OUT.new
+
+echo resize2fs -p test.img 165536 >> $OUT.new
+$RESIZE2FS -p $TMPFILE 165536 >> $OUT.new 2>&1
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
+$DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
+$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.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' < $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
+
+else #if test -x $RESIZE2FS; then
+ echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/run_e2fsck b/tests/run_e2fsck
new file mode 100644
index 0000000..e2c6596
--- /dev/null
+++ b/tests/run_e2fsck
@@ -0,0 +1,112 @@
+if [ "$DESCRIPTION"x != x ]; then
+ test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+ IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+ FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+ SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+ OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+ OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+ if [ -f $test_dir/expect.1.gz ]; then
+ EXP1=$test_name.1.tmp
+ gunzip < $test_dir/expect.1.gz > $EXP1
+ else
+ EXP1=$test_dir/expect.1
+ fi
+fi
+
+if [ "$EXP2"x = x ]; then
+ if [ -f $test_dir/expect.2.gz ]; then
+ EXP2=$test_name.2.tmp
+ gunzip < $test_dir/expect.2.gz > $EXP2
+ else
+ EXP2=$test_dir/expect.2
+ fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+ gunzip < $IMAGE > $TMPFILE
+fi
+
+cp /dev/null $OUT1
+
+eval $PREP_CMD
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed $OUT1.new >> $OUT1
+rm -f $OUT1.new
+
+if [ "$ONE_PASS_ONLY" != "true" ]; then
+ $FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
+ status=$?
+ echo Exit status is $status >> $OUT2.new
+ sed -f $cmd_dir/filter.sed $OUT2.new > $OUT2
+ rm -f $OUT2.new
+fi
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+ rm -f $test_name.ok $test_name.failed
+ cmp -s $OUT1 $EXP1
+ status1=$?
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ cmp -s $OUT2 $EXP2
+ status2=$?
+ else
+ status2=0
+ fi
+ if [ "$PASS_ZERO" = "true" ]; then
+ cmp -s $test_name.0.log $test_dir/expect.0
+ status3=$?
+ else
+ status3=0
+ fi
+
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
+ if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+ echo "$description: ok"
+ touch $test_name.ok
+ else
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+ rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2
+ unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+ unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+
diff --git a/tests/run_mke2fs b/tests/run_mke2fs
new file mode 100644
index 0000000..7a47f56
--- /dev/null
+++ b/tests/run_mke2fs
@@ -0,0 +1,27 @@
+if test -x $DEBUGFS_EXE; then
+
+if [ "$FS_SIZE"x = x ]; then
+ FS_SIZE=1024
+fi
+OUT1=$test_name.1.log
+OUT2=$test_name.2.log
+SKIP_GUNZIP=true
+ONE_PASS_ONLY=true
+MKE2FS_SKIP_PROGRESS=true
+MKE2FS_SKIP_CHECK_MSG=true
+export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
+> $TMPFILE
+PREP_CMD='$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 |
+ sed -f $cmd_dir/filter.sed >> $OUT1;
+ $DEBUGFS -R features $TMPFILE 2>&1 |
+ sed -f $cmd_dir/filter.sed >> $OUT1'
+AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT1'
+. $cmd_dir/run_e2fsck
+
+else #if test -x $DEBUGFS_EXE; then
+ rm -f $test_name.ok $test_name.failed
+ echo "skipped (no debugfs)"
+fi
+
+unset DESCRIPTION FS_SIZE MKE2FS_OPTS MKE2FS_SKIP_PROGRESS \
+ MKE2FS_DEVICE_SECTSIZE
diff --git a/tests/scripts/gen-test-data b/tests/scripts/gen-test-data
new file mode 100755
index 0000000..0cbd928
--- /dev/null
+++ b/tests/scripts/gen-test-data
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+t1="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. "
+t2="Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line. "
+t3="Licensed Product under the copyright owner that is not possible to put the Notice in a manner which does not specify a version number of this document is to say, a work based on the Program (including Contributions) may always be distributed subject to the Licensed Product. Intellectual Property Matters. Third Party Claims. If you develop a new version of the Derivative Works, in at least six (6) months after a subsequent version of this section has the right to acquire, license, develop, have others develop for it, market and/or distribute the Program (or a work based on infringement of intellectual property laws of the Package, in its Contribution, if any, specified by the terms of this Agreement more than your cost of all necessary servicing, repair, or correction. In no event and under no obligation to respond to any patent claims licensable by a copyright notice appear in all copies of it that are distributed by the terms applicable to software that is included in any Digital Font Program, which may be used to render or display fonts. Program shall mean a computer system. "
+
+export LANG=C
+export LC_ALL=C
+
+t="$t1$t2$t3"
+len=${#t}
+
+c=131072
+
+while test $c -gt 0 ; do
+ if test $c -gt $len ; then
+ echo -n "$t"
+ c=$(($c - $len))
+ else
+ echo -n "$t" | cut -c -$(($c - 1))
+ c=0
+ fi
+done
diff --git a/tests/scripts/mkdup b/tests/scripts/mkdup
new file mode 100755
index 0000000..c48a9f0
--- /dev/null
+++ b/tests/scripts/mkdup
@@ -0,0 +1,49 @@
+#!/bin/sh
+OPTS="-O bigalloc -C 8192"
+SIZE=4096
+IMG=/tmp/foo.img
+TMP=$(mktemp)
+SIZE_A=15000
+SIZE_B=5000
+SIZE_C=20000
+
+DEBUGFS=./debugfs/debugfs
+MKE2FS=./misc/mke2fs
+FSCK=./e2fsck/e2fsck
+
+dd if=/dev/zero of=$IMG bs=1k count=$SIZE
+echo $MKE2FS -F -t ext4 -L test $OPTS test.img $SIZE
+$MKE2FS -F -t ext4 -L test $OPTS $IMG $SIZE
+dd if=/dev/zero of=$TMP bs=$SIZE_A count=1 >& /dev/null
+echo Writing $SIZE_A bytes to a
+$DEBUGFS -w -R "write $TMP a" $IMG
+BLKS=$(./debugfs/debugfs -R "blocks a" $IMG)
+cp /dev/null $TMP
+echo "Releasing blocks $BLKS"
+for i in $BLKS ; do echo "freeb $i" >> $TMP; done
+$DEBUGFS -w $IMG < $TMP >& /dev/null
+
+echo Writing $SIZE_B bytes to b
+dd if=/dev/zero of=$TMP bs=$SIZE_B count=1 >& /dev/null
+$DEBUGFS -w -R "write $TMP b" $IMG
+if [ -n "$SIZE_C" ]; then
+ BLKS=$(./debugfs/debugfs -R "blocks b" $IMG)
+ cp /dev/null $TMP
+ echo "Releasing blocks $BLKS"
+ for i in $BLKS ; do echo "freeb $i" >> $TMP; done
+ $DEBUGFS -w $IMG < $TMP >& /dev/null
+
+ echo Writing $SIZE_C bytes to c
+ dd if=/dev/zero of=$TMP bs=$SIZE_C count=1 >& /dev/null
+ $DEBUGFS -w -R "write $TMP c" $IMG
+fi
+echo "set_inode_field a mtime 201107040000" > $TMP
+echo "set_inode_field b mtime 201107050000" >> $TMP
+if [ -n "$SIZE_C" ]; then
+ echo "set_inode_field c mtime 201107060000" >> $TMP
+fi
+$DEBUGFS -w $IMG < $TMP >& /dev/null
+
+$FSCK -fy $IMG
+rm $TMP
+
diff --git a/tests/scripts/repair-test b/tests/scripts/repair-test
new file mode 100755
index 0000000..c164e6e
--- /dev/null
+++ b/tests/scripts/repair-test
@@ -0,0 +1,9 @@
+#!/bin/sh
+for T in "$*"; do
+ [ -f "$T.failed" -a -d "$T" ] ||
+ { echo "usage: $0 <test_to_repair>"; exit 1; }
+
+ cp $T.1.log $T/expect.1
+ cp $T.2.log $T/expect.2
+ ./test_one $T
+done
diff --git a/tests/scripts/resize_test b/tests/scripts/resize_test
new file mode 100755
index 0000000..a000c85
--- /dev/null
+++ b/tests/scripts/resize_test
@@ -0,0 +1,183 @@
+#!/bin/sh
+
+# old distros are missing "truncate", emulate it with "dd" if necessary
+do_truncate()
+{
+ [ "$1" = "-s" ] && size=$2 && shift 2
+
+ if ! truncate -s $size $1 >> $LOG 2>&1 ; then
+ dd if=/dev/zero of=$1 bs=1 count=0 seek=$size >> $LOG 2>&1
+ fi
+}
+
+resize_test () {
+DBG_FLAGS=63
+
+echo $test_description starting > $LOG
+rm -f $TMPFILE
+touch $TMPFILE
+
+# Verify that the $TMP filesystem handles $SIZE_2 sparse files.
+# If that fails, try the local filesystem instead.
+if do_truncate -s $SIZE_2 $TMPFILE 2> /dev/null; then
+ echo "using $TMPFILE" >> $LOG
+else
+ rm $TMPFILE
+ export TMPFILE=$(mktemp ./$test_name.tmp.XXXXXX)
+ touch $TMPFILE
+ echo "using $TMPFILE" >> $LOG
+ if ! do_truncate -s $SIZE_2 $TMPFILE >> $LOG 2>&1; then
+ rm $TMPFILE
+ return 111
+ fi
+fi
+> $TMPFILE
+
+echo $MKE2FS $FEATURES -qF $TMPFILE $SIZE_1 >> $LOG
+$MKE2FS $FEATURES -qF $TMPFILE $SIZE_1 >> $LOG
+
+OUT_TMP=$(mktemp ${TMPDIR:-/tmp}/csum-tmp.XXXXXX)
+
+date > $OUT_TMP
+cat $E2FSCK >> $OUT_TMP
+echo $CRCSUM $OUT_TMP >> $LOG 2>&1
+CSUM_1=$($CRCSUM $OUT_TMP)
+echo Checksum is $CSUM_1 >> $LOG
+
+echo Setting up file system >> $LOG
+$DEBUGFS -w $TMPFILE >> $LOG 2>&1 << EOF
+mkdir test
+cd test
+write $OUT_TMP e2fsck
+ls /test
+stat /test/e2fsck
+quit
+EOF
+echo " " >> $LOG
+
+rm -f $OUT_TMP
+
+echo $FSCK -fy $TMPFILE >> $LOG 2>&1
+$FSCK -fy $TMPFILE >> $LOG 2>&1
+
+chmod u-w $TMPFILE
+echo $RESIZE2FS -P $TMPFILE >> $LOG 2>&1
+if ! $RESIZE2FS -P $TMPFILE >> $LOG 2>&1
+then
+ return 1
+fi
+chmod u+w $TMPFILE
+
+echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+ return 1
+fi
+
+echo $FSCK -fy $TMPFILE >> $LOG 2>&1
+if ! $FSCK -fy $TMPFILE >> $LOG 2>&1
+then
+ $DUMPE2FS $TMPFILE >> $LOG
+ return 1
+fi
+
+echo $DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+$DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+
+echo $CRCSUM $OUT_TMP >> $LOG 2>&1
+CSUM_2=$($CRCSUM $OUT_TMP)
+echo Checksum is $CSUM_2 >> $LOG
+
+if test "$CSUM_1" != "$CSUM_2"
+then
+ return 1
+fi
+
+# Uncomment to grab extra debugging image
+#
+#mv $TMPFILE /tmp/foo.img
+#return 0
+
+echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+ return 1
+fi
+
+echo $FSCK -fy $TMPFILE >> $LOG 2>&1
+if ! $FSCK -fy $TMPFILE >> $LOG 2>&1
+then
+ $DUMPE2FS $TMPFILE >> $LOG
+ return 1
+fi
+
+echo $DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+$DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+
+echo $CRCSUM $OUT_TMP >> $LOG 2>&1
+CSUM_2=$($CRCSUM $OUT_TMP)
+echo Checksum is $CSUM_2 >> $LOG
+
+if test "$CSUM_1" != "$CSUM_2"
+then
+ return 1
+fi
+
+echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+ return 1
+fi
+
+echo $FSCK -fy $TMPFILE >> $LOG 2>&1
+if ! $FSCK -fy $TMPFILE >> $LOG 2>&1
+then
+ $DUMPE2FS $TMPFILE >> $LOG
+ return 1
+fi
+
+echo $DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+$DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+
+echo $CRCSUM $OUT_TMP >> $LOG 2>&1
+CSUM_2=$($CRCSUM $OUT_TMP)
+echo Checksum is $CSUM_2 >> $LOG
+
+if test "$CSUM_1" != "$CSUM_2"
+then
+ return 1
+fi
+
+echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+ return 1
+fi
+
+echo $FSCK -fy $TMPFILE >> $LOG 2>&1
+if ! $FSCK -fy $TMPFILE >> $LOG 2>&1
+then
+ $DUMPE2FS $TMPFILE >> $LOG
+ return 1
+fi
+
+echo $DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+$DEBUGFS -R "dump /test/e2fsck $OUT_TMP" $TMPFILE >> $LOG 2>&1
+
+echo $CRCSUM $OUT_TMP >> $LOG 2>&1
+CSUM_2=$($CRCSUM $OUT_TMP)
+echo Checksum is $CSUM_2 >> $LOG
+
+rm $OUT_TMP
+unset OUT_TMP
+
+rm -f $TMPFILE
+
+if test "$CSUM_1" != "$CSUM_2"
+then
+ return 1
+fi
+
+return 0
+
+}
diff --git a/tests/t_change_uuid/expect b/tests/t_change_uuid/expect
new file mode 100644
index 0000000..0a9b20e
--- /dev/null
+++ b/tests/t_change_uuid/expect
@@ -0,0 +1,7 @@
+create fs without metadata_csum
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+change UUID
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
diff --git a/tests/t_change_uuid/script b/tests/t_change_uuid/script
new file mode 100755
index 0000000..d568f46
--- /dev/null
+++ b/tests/t_change_uuid/script
@@ -0,0 +1,34 @@
+test_description="change uuid on a pre-metadata-csum"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs without metadata_csum" >> $OUT
+$MKE2FS -O ^metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+$TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_change_uuid_mcsum/expect b/tests/t_change_uuid_mcsum/expect
new file mode 100644
index 0000000..fb26e72
--- /dev/null
+++ b/tests/t_change_uuid_mcsum/expect
@@ -0,0 +1,7 @@
+create fs with metadata_csum
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+change UUID
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
diff --git a/tests/t_change_uuid_mcsum/script b/tests/t_change_uuid_mcsum/script
new file mode 100755
index 0000000..4ec5776
--- /dev/null
+++ b/tests/t_change_uuid_mcsum/script
@@ -0,0 +1,34 @@
+test_description="change uuid on a metadata-csum"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs with metadata_csum" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+$TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_change_uuid_mcsum_mounted/expect b/tests/t_change_uuid_mcsum_mounted/expect
new file mode 100644
index 0000000..e10e9a9
--- /dev/null
+++ b/tests/t_change_uuid_mcsum_mounted/expect
@@ -0,0 +1,7 @@
+create fs with metadata_csum
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+change UUID
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+check filesystem
+fsck returns 0
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
diff --git a/tests/t_change_uuid_mcsum_mounted/script b/tests/t_change_uuid_mcsum_mounted/script
new file mode 100755
index 0000000..f94bfbb
--- /dev/null
+++ b/tests/t_change_uuid_mcsum_mounted/script
@@ -0,0 +1,34 @@
+test_description="change uuid on a metadata-csum"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs with metadata_csum" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+EXT2FS_PRETEND_RW_MOUNT=1 $TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_change_uuid_mcsum_seed_mounted/expect b/tests/t_change_uuid_mcsum_seed_mounted/expect
new file mode 100644
index 0000000..b2d2d91
--- /dev/null
+++ b/tests/t_change_uuid_mcsum_seed_mounted/expect
@@ -0,0 +1,21 @@
+create fs with metadata_csum
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+change UUID
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+check filesystem
+fsck returns 0
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+turn on csum seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+change UUID
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
diff --git a/tests/t_change_uuid_mcsum_seed_mounted/script b/tests/t_change_uuid_mcsum_seed_mounted/script
new file mode 100755
index 0000000..19fdbed
--- /dev/null
+++ b/tests/t_change_uuid_mcsum_seed_mounted/script
@@ -0,0 +1,52 @@
+test_description="change meta-csum uuid with mcsum-seed"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs with metadata_csum" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+EXT2FS_PRETEND_RW_MOUNT=1 $TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn on csum seed" >> $OUT
+EXT2FS_PRETEND_RW_MOUNT=1 $TUNE2FS -O metadata_csuM_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+EXT2FS_PRETEND_RW_MOUNT=1 $TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_change_uuid_mounted/expect b/tests/t_change_uuid_mounted/expect
new file mode 100644
index 0000000..0a9b20e
--- /dev/null
+++ b/tests/t_change_uuid_mounted/expect
@@ -0,0 +1,7 @@
+create fs without metadata_csum
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+change UUID
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
diff --git a/tests/t_change_uuid_mounted/script b/tests/t_change_uuid_mounted/script
new file mode 100755
index 0000000..150f451
--- /dev/null
+++ b/tests/t_change_uuid_mounted/script
@@ -0,0 +1,34 @@
+test_description="change uuid on a mounted pre-metadata-csum"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs without metadata_csum" >> $OUT
+$MKE2FS -O ^metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+EXT2FS_PRETEND_RW_MOUNT=1 $TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_dangerous/expect b/tests/t_dangerous/expect
new file mode 100644
index 0000000..31aaf4f
--- /dev/null
+++ b/tests/t_dangerous/expect
@@ -0,0 +1,120 @@
+tune2fs dangerous prompts test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 445 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+tune2fs -O metadata_csum test.img
+
+This operation requires a freshly checked filesystem.
+
+Please run e2fsck -f on the filesystem.
+
+Exit status is 1
+tune2fs -O metadata_csum test.img
+Exit status is 0
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 445 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O metadata_csum test.img
+Enabling checksums could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
+Exit status is 1
+tune2fs -I 512 test.img
+Resizing inodes could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
+Exit status is 1
+
+Change in FS metadata:
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O metadata_csum test.img
+Enabling checksums could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
+This operation requires a freshly checked filesystem.
+
+Please run e2fsck -fD on the filesystem.
+
+Exit status is 0
+test_filesys was not cleanly unmounted, check forced.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+
+
+tune2fs -I 512 test.img
+Resizing inodes could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N) Setting inode size 512
+Exit status is 0
+tune2fs -U f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0 test.img
+Setting the UUID on this filesystem could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N) Exit status is 0
+Backing up journal inode block information.
+
+
+Change in FS metadata:
+@@ -1,3 +1,3 @@
+-Filesystem UUID: 6fc3daa4-180d-4f2b-a6f2-f7a5efb79bcf
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+-Inode size: 256
++Filesystem UUID: f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
++Inode size: 512
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+
+Testing with metadata checksum enabled
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 445 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -U random test.img
+Setting the UUID on this filesystem could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
+Exit status is 1
diff --git a/tests/t_dangerous/name b/tests/t_dangerous/name
new file mode 100644
index 0000000..c9a1030
--- /dev/null
+++ b/tests/t_dangerous/name
@@ -0,0 +1 @@
+dangerous tune2fs operation prompts
diff --git a/tests/t_dangerous/script b/tests/t_dangerous/script
new file mode 100644
index 0000000..a6d3dc4
--- /dev/null
+++ b/tests/t_dangerous/script
@@ -0,0 +1,155 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,^flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 32M
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ ext4m = {
+ features = has_journal,extent,huge_file,^flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit,metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 32M
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs dangerous prompts test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux -U 6fc3daa4-180d-4f2b-a6f2-f7a5efb79bcf $TMPFILE 524288 >> $OUT 2>&1
+
+# trigger a filesystem check
+$DEBUGFS -w -R 'ssv mtime now' $TMPFILE > /dev/null 2>&1
+$DEBUGFS -w -R 'ssv lastcheck 20000' $TMPFILE > /dev/null 2>&1
+
+# add mcsum
+echo "tune2fs -O metadata_csum test.img" >> $OUT
+$TUNE2FS -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check fs
+$FSCK -f -y -N test_filesys $TMPFILE > /dev/null 2>&1
+
+# add mcsum
+echo "tune2fs -O metadata_csum test.img" >> $OUT
+$TUNE2FS -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux -U 6fc3daa4-180d-4f2b-a6f2-f7a5efb79bcf $TMPFILE 524288 >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -f -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# add mcsum
+echo "tune2fs -O metadata_csum test.img" >> $OUT
+echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# change inode size
+echo "tune2fs -I 512 test.img" >> $OUT
+echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -I 512 $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check
+$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+$DUMPE2FS $TMPFILE 2> /dev/null | egrep '^(Filesystem features:|Filesystem UUID:|Inode size:)' > $OUT.before
+
+# add mcsum
+echo "tune2fs -O metadata_csum test.img" >> $OUT
+echo 'y' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
+
+# change inode size
+echo "tune2fs -I 512 test.img" >> $OUT
+echo 'y' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -I 512 $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# change uuid
+echo "tune2fs -U f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0 test.img" >> $OUT
+echo 'y' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -U f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0 $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check
+$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | egrep '^(Filesystem features:|Filesystem UUID:|Inode size:)' > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+echo " " >> $OUT
+echo "Testing with metadata checksum enabled" >> $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4m -o Linux -U 6fc3daa4-180d-4f2b-a6f2-f7a5efb79bcf $TMPFILE 524288 >> $OUT 2>&1
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -f -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# change uuid
+echo "tune2fs -U random test.img" >> $OUT
+echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -U random $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after $CONF
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_disable_changed_csum_seed/expect b/tests/t_disable_changed_csum_seed/expect
new file mode 100644
index 0000000..e00f367
--- /dev/null
+++ b/tests/t_disable_changed_csum_seed/expect
@@ -0,0 +1,17 @@
+create fs without csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+turn on csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+change UUID
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
+turn off csum_seed
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
diff --git a/tests/t_disable_changed_csum_seed/script b/tests/t_disable_changed_csum_seed/script
new file mode 100755
index 0000000..449689a
--- /dev/null
+++ b/tests/t_disable_changed_csum_seed/script
@@ -0,0 +1,47 @@
+test_description="tune2fs disable csum seed after uuid change"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs without csum_seed" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn on csum_seed" >> $OUT
+$TUNE2FS -O metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+$TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn off csum_seed" >> $OUT
+$TUNE2FS -O ^metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_disable_changed_csum_seed_mounted/expect b/tests/t_disable_changed_csum_seed_mounted/expect
new file mode 100644
index 0000000..288494b
--- /dev/null
+++ b/tests/t_disable_changed_csum_seed_mounted/expect
@@ -0,0 +1,19 @@
+create fs without csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+turn on csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+change UUID
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
+turn off csum_seed
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: a61be2e0-b3b8-4fbc-b2cd-d84b306b9731
+Checksum seed: 0x3ba62721
diff --git a/tests/t_disable_changed_csum_seed_mounted/script b/tests/t_disable_changed_csum_seed_mounted/script
new file mode 100755
index 0000000..ea2184f
--- /dev/null
+++ b/tests/t_disable_changed_csum_seed_mounted/script
@@ -0,0 +1,47 @@
+test_description="mounted tune2fs disable csum+uuid"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs without csum_seed" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn on csum_seed" >> $OUT
+$TUNE2FS -O metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change UUID" >> $OUT
+$TUNE2FS -U a61be2e0-b3b8-4fbc-b2cd-d84b306b9731 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn off csum_seed" >> $OUT
+EXT2FS_PRETEND_RW_MOUNT=1 $TUNE2FS -O ^metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_disable_csum_seed/expect b/tests/t_disable_csum_seed/expect
new file mode 100644
index 0000000..e6c50fe
--- /dev/null
+++ b/tests/t_disable_csum_seed/expect
@@ -0,0 +1,14 @@
+create fs without csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+turn on csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+turn off csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+check filesystem
+fsck returns 0
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
diff --git a/tests/t_disable_csum_seed/script b/tests/t_disable_csum_seed/script
new file mode 100755
index 0000000..e762ad4
--- /dev/null
+++ b/tests/t_disable_csum_seed/script
@@ -0,0 +1,43 @@
+test_description="disable csum seed via tune2fs"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs without csum_seed" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn on csum_seed" >> $OUT
+$TUNE2FS -O metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn off csum_seed" >> $OUT
+$TUNE2FS -O ^metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_disable_mcsum/expect b/tests/t_disable_mcsum/expect
new file mode 100644
index 0000000..bfa21b8
--- /dev/null
+++ b/tests/t_disable_mcsum/expect
@@ -0,0 +1,45 @@
+tune2fs ^metadata_csum test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O ^metadata_csum test.img
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -34,7 +34,6 @@
+ Journal inode: 8
+ Default directory hash: half_md4
+ Journal backup: inode blocks
+-Checksum type: crc32c
+ Journal features: (none)
+ Total journal size: 16M
+ Total journal blocks: 16384
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_disable_mcsum/name b/tests/t_disable_mcsum/name
new file mode 100644
index 0000000..cf9dc8d
--- /dev/null
+++ b/tests/t_disable_mcsum/name
@@ -0,0 +1 @@
+disable metadata_csum
diff --git a/tests/t_disable_mcsum/script b/tests/t_disable_mcsum/script
new file mode 100644
index 0000000..117969d
--- /dev/null
+++ b/tests/t_disable_mcsum/script
@@ -0,0 +1,67 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit,metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs ^metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -rf $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# remove mcsum
+echo "tune2fs -O ^metadata_csum test.img" >> $OUT
+$TUNE2FS -O ^metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_disable_mcsum_noinitbg/expect b/tests/t_disable_mcsum_noinitbg/expect
new file mode 100644
index 0000000..fe61fcb
--- /dev/null
+++ b/tests/t_disable_mcsum_noinitbg/expect
@@ -0,0 +1,68 @@
+tune2fs ^metadata_csum test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O ^metadata_csum,^uninit_bg test.img
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -34,7 +34,6 @@
+ Journal inode: 8
+ Default directory hash: half_md4
+ Journal backup: inode blocks
+-Checksum type: crc32c
+ Journal features: (none)
+ Total journal size: 16M
+ Total journal blocks: 16384
+@@ -50,18 +49,18 @@
+ Block bitmap at 262 (+261)
+ Inode bitmap at 278 (+277)
+ Inode table at 294-549 (+293)
+- 21 free blocks, 536 free inodes, 2 directories, 536 unused inodes
++ 21 free blocks, 536 free inodes, 2 directories
+ Free blocks: 4413-4433
+ Free inodes: 489-1024
+-Group 1: (Blocks 8193-16384) [INODE_UNINIT]
++Group 1: (Blocks 8193-16384)
+ Backup superblock at 8193, Group descriptors at 8194-8197
+ Reserved GDT blocks at 8198-8453
+ Block bitmap at 263 (bg #0 + 262)
+ Inode bitmap at 279 (bg #0 + 278)
+ Inode table at 550-805 (bg #0 + 549)
+- 0 free blocks, 1024 free inodes, 0 directories, 1024 unused inodes
++ 0 free blocks, 1024 free inodes, 0 directories
+ Free blocks:
+ Free inodes: 1025-2048
+-Group 2: (Blocks 16385-24576) [INODE_UNINIT]
++Group 2: (Blocks 16385-24576)
+ Block bitmap at 264 (bg #0 + 263)
+ Inode bitmap at 280 (bg #0 + 279)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_disable_mcsum_noinitbg/name b/tests/t_disable_mcsum_noinitbg/name
new file mode 100644
index 0000000..4b906be
--- /dev/null
+++ b/tests/t_disable_mcsum_noinitbg/name
@@ -0,0 +1 @@
+disable metadata_csum and uninit_bg
diff --git a/tests/t_disable_mcsum_noinitbg/script b/tests/t_disable_mcsum_noinitbg/script
new file mode 100644
index 0000000..bc2bad7
--- /dev/null
+++ b/tests/t_disable_mcsum_noinitbg/script
@@ -0,0 +1,67 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit,metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs ^metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# remove mcsum
+echo "tune2fs -O ^metadata_csum,^uninit_bg test.img" >> $OUT
+$TUNE2FS -O ^metadata_csum,^uninit_bg $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_disable_mcsum_yesinitbg/expect b/tests/t_disable_mcsum_yesinitbg/expect
new file mode 100644
index 0000000..b906248
--- /dev/null
+++ b/tests/t_disable_mcsum_yesinitbg/expect
@@ -0,0 +1,45 @@
+tune2fs ^metadata_csum test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O ^metadata_csum,uninit_bg test.img
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -34,7 +34,6 @@
+ Journal inode: 8
+ Default directory hash: half_md4
+ Journal backup: inode blocks
+-Checksum type: crc32c
+ Journal features: (none)
+ Total journal size: 16M
+ Total journal blocks: 16384
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_disable_mcsum_yesinitbg/name b/tests/t_disable_mcsum_yesinitbg/name
new file mode 100644
index 0000000..880de1c
--- /dev/null
+++ b/tests/t_disable_mcsum_yesinitbg/name
@@ -0,0 +1 @@
+disable metadata_csum and enable uninit_bg
diff --git a/tests/t_disable_mcsum_yesinitbg/script b/tests/t_disable_mcsum_yesinitbg/script
new file mode 100644
index 0000000..8fadc57
--- /dev/null
+++ b/tests/t_disable_mcsum_yesinitbg/script
@@ -0,0 +1,67 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit,metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs ^metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# remove mcsum
+echo "tune2fs -O ^metadata_csum,uninit_bg test.img" >> $OUT
+$TUNE2FS -O ^metadata_csum,uninit_bg $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_disable_meta_csum_and_seed/expect b/tests/t_disable_meta_csum_and_seed/expect
new file mode 100644
index 0000000..a1c9cca
--- /dev/null
+++ b/tests/t_disable_meta_csum_and_seed/expect
@@ -0,0 +1,14 @@
+create fs without csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+turn on csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+turn off metadata_csum
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+check filesystem
+fsck returns 0
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
diff --git a/tests/t_disable_meta_csum_and_seed/script b/tests/t_disable_meta_csum_and_seed/script
new file mode 100755
index 0000000..52d7f62
--- /dev/null
+++ b/tests/t_disable_meta_csum_and_seed/script
@@ -0,0 +1,44 @@
+test_description="disable csum seed and csums via tune2fs"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs without csum_seed" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn on csum_seed" >> $OUT
+$TUNE2FS -O metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn off metadata_csum" >> $OUT
+$TUNE2FS -O ^metadata_csum $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | grep 'metadata_csum' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_enable_csum_seed/expect b/tests/t_enable_csum_seed/expect
new file mode 100644
index 0000000..07d9a4f
--- /dev/null
+++ b/tests/t_enable_csum_seed/expect
@@ -0,0 +1,12 @@
+create fs without csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+turn on csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+change uuid
+Filesystem UUID: 1dd136c6-e47a-4833-9bf5-519f8aacabe4
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: 1dd136c6-e47a-4833-9bf5-519f8aacabe4
+Checksum seed: 0x3ba62721
diff --git a/tests/t_enable_csum_seed/script b/tests/t_enable_csum_seed/script
new file mode 100755
index 0000000..78ccbeb
--- /dev/null
+++ b/tests/t_enable_csum_seed/script
@@ -0,0 +1,38 @@
+test_description="enable csum seed via tune2fs"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs without csum_seed" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "turn on csum_seed" >> $OUT
+$TUNE2FS -O metadata_csum_seed $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change uuid" >> $OUT
+$TUNE2FS -U 1dd136c6-e47a-4833-9bf5-519f8aacabe4 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_enable_mcsum/expect b/tests/t_enable_mcsum/expect
new file mode 100644
index 0000000..fcb0ed1
--- /dev/null
+++ b/tests/t_enable_mcsum/expect
@@ -0,0 +1,80 @@
+tune2fs metadata_csum test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O metadata_csum test.img
+
+This operation requires a freshly checked filesystem.
+
+Please run e2fsck -fD on the filesystem.
+
+Exit status is 0
+test_filesys was not cleanly unmounted, check forced.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+
+
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -11,7 +11,7 @@
+ Block count: 524288
+ Reserved block count: 26214
+ Overhead clusters: 35246
+-Free blocks: 571
++Free blocks: 568
+ Free inodes: 65048
+ First block: 1
+ Block size: 1024
+@@ -34,6 +34,7 @@
+ Journal inode: 8
+ Default directory hash: half_md4
+ Journal backup: inode blocks
++Checksum type: crc32c
+ Journal features: (none)
+ Total journal size: 16M
+ Total journal blocks: 16384
+@@ -49,8 +50,8 @@
+ Block bitmap at 262 (+261)
+ Inode bitmap at 278 (+277)
+ Inode table at 294-549 (+293)
+- 21 free blocks, 536 free inodes, 2 directories, 536 unused inodes
+- Free blocks: 4413-4433
++ 18 free blocks, 536 free inodes, 2 directories, 536 unused inodes
++ Free blocks: 4413, 4417-4433
+ Free inodes: 489-1024
+ Group 1: (Blocks 8193-16384) [INODE_UNINIT]
+ Backup superblock at 8193, Group descriptors at 8194-8197
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_enable_mcsum/name b/tests/t_enable_mcsum/name
new file mode 100644
index 0000000..22f295a
--- /dev/null
+++ b/tests/t_enable_mcsum/name
@@ -0,0 +1 @@
+enable metadata_csum
diff --git a/tests/t_enable_mcsum/script b/tests/t_enable_mcsum/script
new file mode 100644
index 0000000..3a5409b
--- /dev/null
+++ b/tests/t_enable_mcsum/script
@@ -0,0 +1,70 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -o Linux -F -T ext4h $TMPFILE 524288 >> $OUT 2>&1
+rm -rf $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# add mcsum
+echo "tune2fs -O metadata_csum test.img" >> $OUT
+$TUNE2FS -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check
+$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_enable_mcsum_ext3/expect b/tests/t_enable_mcsum_ext3/expect
new file mode 100644
index 0000000..3bd2ccf
--- /dev/null
+++ b/tests/t_enable_mcsum_ext3/expect
@@ -0,0 +1,75 @@
+tune2fs metadata_csum test
+128-byte inodes cannot handle dates beyond 2038 and are deprecated
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+mke2fs: Operation not supported for inodes containing extents while creating huge files
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O metadata_csum test.img
+Extents are not enabled. The file extent tree can be checksummed, whereas block maps cannot. Not enabling extents reduces the coverage of metadata checksumming. Re-run with -O extent to rectify.
+64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Run resize2fs -b to rectify.
+Exit status is 0
+
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file metadata_csum
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -30,6 +30,7 @@
+ Journal inode: 8
+ Default directory hash: half_md4
+ Journal backup: inode blocks
++Checksum type: crc32c
+ Journal features: (none)
+ Total journal size: 16M
+ Total journal blocks: 16384
+@@ -39,7 +40,7 @@
+ Journal start: 0
+
+
+-Group 0: (Blocks 1-8192)
++Group 0: (Blocks 1-8192) [ITABLE_ZEROED]
+ Primary superblock at 1, Group descriptors at 2-3
+ Reserved GDT blocks at 4-259
+ Block bitmap at 260 (+259)
+@@ -48,7 +49,7 @@
+ 0 free blocks, 1013 free inodes, 2 directories
+ Free blocks:
+ Free inodes: 12-1024
+-Group 1: (Blocks 8193-16384)
++Group 1: (Blocks 8193-16384) [ITABLE_ZEROED]
+ Backup superblock at 8193, Group descriptors at 8194-8195
+ Reserved GDT blocks at 8196-8451
+ Block bitmap at 8452 (+259)
+@@ -57,6 +58,6 @@
+ 0 free blocks, 1024 free inodes, 0 directories
+ Free blocks:
+ Free inodes: 1025-2048
+-Group 2: (Blocks 16385-24576)
++Group 2: (Blocks 16385-24576) [ITABLE_ZEROED]
+ Block bitmap at 16385 (+0)
+ Inode bitmap at 16386 (+1)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_enable_mcsum_ext3/name b/tests/t_enable_mcsum_ext3/name
new file mode 100644
index 0000000..d9a29c8
--- /dev/null
+++ b/tests/t_enable_mcsum_ext3/name
@@ -0,0 +1 @@
+enable metadata_csum on ext3 fs
diff --git a/tests/t_enable_mcsum_ext3/script b/tests/t_enable_mcsum_ext3/script
new file mode 100644
index 0000000..c008c0a
--- /dev/null
+++ b/tests/t_enable_mcsum_ext3/script
@@ -0,0 +1,70 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,^extent,^huge_file,^flex_bg,^uninit_bg,^dir_nlink,^extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,^64bit
+ blocksize = 1024
+ inode_size = 128
+ make_hugefiles = true
+ hugefiles_dir = /
+ num_hugefiles = 10
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -o Linux -F -T ext4h $TMPFILE 524288 >> $OUT 2>&1
+rm -rf $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# add mcsum
+echo "tune2fs -O metadata_csum test.img" >> $OUT
+$TUNE2FS -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check
+$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_enable_mcsum_initbg/expect b/tests/t_enable_mcsum_initbg/expect
new file mode 100644
index 0000000..987141f
--- /dev/null
+++ b/tests/t_enable_mcsum_initbg/expect
@@ -0,0 +1,100 @@
+tune2fs metadata_csum test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -O metadata_csum test.img
+
+This operation requires a freshly checked filesystem.
+
+Please run e2fsck -fD on the filesystem.
+
+Exit status is 0
+test_filesys was not cleanly unmounted, check forced.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+
+
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -11,7 +11,7 @@
+ Block count: 524288
+ Reserved block count: 26214
+ Overhead clusters: 35246
+-Free blocks: 571
++Free blocks: 568
+ Free inodes: 65048
+ First block: 1
+ Block size: 1024
+@@ -34,6 +34,7 @@
+ Journal inode: 8
+ Default directory hash: half_md4
+ Journal backup: inode blocks
++Checksum type: crc32c
+ Journal features: (none)
+ Total journal size: 16M
+ Total journal blocks: 16384
+@@ -43,24 +44,24 @@
+ Journal start: 0
+
+
+-Group 0: (Blocks 1-8192)
++Group 0: (Blocks 1-8192) [ITABLE_ZEROED]
+ Primary superblock at 1, Group descriptors at 2-5
+ Reserved GDT blocks at 6-261
+ Block bitmap at 262 (+261)
+ Inode bitmap at 278 (+277)
+ Inode table at 294-549 (+293)
+- 21 free blocks, 536 free inodes, 2 directories
+- Free blocks: 4413-4433
++ 18 free blocks, 536 free inodes, 2 directories, 536 unused inodes
++ Free blocks: 4413, 4417-4433
+ Free inodes: 489-1024
+-Group 1: (Blocks 8193-16384)
++Group 1: (Blocks 8193-16384) [INODE_UNINIT, ITABLE_ZEROED]
+ Backup superblock at 8193, Group descriptors at 8194-8197
+ Reserved GDT blocks at 8198-8453
+ Block bitmap at 263 (bg #0 + 262)
+ Inode bitmap at 279 (bg #0 + 278)
+ Inode table at 550-805 (bg #0 + 549)
+- 0 free blocks, 1024 free inodes, 0 directories
++ 0 free blocks, 1024 free inodes, 0 directories, 1024 unused inodes
+ Free blocks:
+ Free inodes: 1025-2048
+-Group 2: (Blocks 16385-24576)
++Group 2: (Blocks 16385-24576) [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 264 (bg #0 + 263)
+ Inode bitmap at 280 (bg #0 + 279)
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_enable_mcsum_initbg/name b/tests/t_enable_mcsum_initbg/name
new file mode 100644
index 0000000..291eb6b
--- /dev/null
+++ b/tests/t_enable_mcsum_initbg/name
@@ -0,0 +1 @@
+enable metadata_csum when ^uninit_bg
diff --git a/tests/t_enable_mcsum_initbg/script b/tests/t_enable_mcsum_initbg/script
new file mode 100644
index 0000000..975b0f3
--- /dev/null
+++ b/tests/t_enable_mcsum_initbg/script
@@ -0,0 +1,70 @@
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,^uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs metadata_csum test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -o Linux -F -T ext4h $TMPFILE 524288 >> $OUT 2>&1
+rm -rf $CONF
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# add mcsum
+echo "tune2fs -O metadata_csum test.img" >> $OUT
+$TUNE2FS -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# check
+$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
+
+# dump and check
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_ext_jnl_fail/expect b/tests/t_ext_jnl_fail/expect
new file mode 100644
index 0000000..db0aecb
--- /dev/null
+++ b/tests/t_ext_jnl_fail/expect
@@ -0,0 +1,6 @@
+Creating filesystem with 4096 1k blocks and 0 inodes
+Superblock backups stored on blocks:
+
+Zeroing journal device: 
+tune2fs external journal
+Cannot modify a journal device.
diff --git a/tests/t_ext_jnl_fail/name b/tests/t_ext_jnl_fail/name
new file mode 100644
index 0000000..2fe7d04
--- /dev/null
+++ b/tests/t_ext_jnl_fail/name
@@ -0,0 +1 @@
+tune2fs fail external journal
diff --git a/tests/t_ext_jnl_fail/script b/tests/t_ext_jnl_fail/script
new file mode 100644
index 0000000..2831416
--- /dev/null
+++ b/tests/t_ext_jnl_fail/script
@@ -0,0 +1,30 @@
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 1024 -O journal_dev,metadata_csum -T ext4 $TMPFILE 4096 > $OUT 2>&1
+echo "tune2fs external journal" >> $OUT
+$TUNE2FS -i 0 $TMPFILE >> $OUT 2>&1
+rm -f $TMPFILE
+
+sed -f $cmd_dir/filter.sed < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/t_ext_jnl_rm/script b/tests/t_ext_jnl_rm/script
new file mode 100644
index 0000000..b2af80c
--- /dev/null
+++ b/tests/t_ext_jnl_rm/script
@@ -0,0 +1,26 @@
+test_description="remove missing external journal device"
+OUT=$test_name.log
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE >> $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+
+echo "debugfs add journal device/UUID" >> $OUT
+$DEBUGFS -w -f - $TMPFILE <<- EOF >> $OUT 2>&1
+ feature has_journal
+ ssv journal_dev 0x9999
+ ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a33
+EOF
+
+echo "tune2fs -f -O ^has_journal $TMPFILE" >> $OUT
+$TUNE2FS -f -O ^has_journal $TMPFILE >> $OUT 2>&1
+$DUMPE2FS -h $TMPFILE >> $OUT 2>&1
+if [ "$(grep 'Journal UUID:' $OUT)" ]; then
+ mv $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+else
+ echo "$test_name: $test_description: ok"
+ mv $test_name.log $test_name.ok
+fi
+rm -f $TMPFILE
diff --git a/tests/t_format_csum_seed/expect b/tests/t_format_csum_seed/expect
new file mode 100644
index 0000000..39e6d6a
--- /dev/null
+++ b/tests/t_format_csum_seed/expect
@@ -0,0 +1,10 @@
+create fs with csum_seed
+Filesystem UUID: 6b33f586-a183-4383-921d-30da3fef2e5c
+Checksum seed: 0x3ba62721
+change uuid
+Filesystem UUID: 1dd136c6-e47a-4833-9bf5-519f8aacabe4
+Checksum seed: 0x3ba62721
+check filesystem
+fsck returns 0
+Filesystem UUID: 1dd136c6-e47a-4833-9bf5-519f8aacabe4
+Checksum seed: 0x3ba62721
diff --git a/tests/t_format_csum_seed/script b/tests/t_format_csum_seed/script
new file mode 100755
index 0000000..3038785
--- /dev/null
+++ b/tests/t_format_csum_seed/script
@@ -0,0 +1,34 @@
+test_description="format with csum_seed"
+
+trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+OUT=$test_name.log
+EXP=$test_dir/expect
+rm -f $OUT
+
+# Test command line option
+echo "create fs with csum_seed" >> $OUT
+$MKE2FS -o Linux -O metadata_csum,metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "change uuid" >> $OUT
+$TUNE2FS -U 1dd136c6-e47a-4833-9bf5-519f8aacabe4 $TMPFILE > /dev/null 2>&1
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+echo "check filesystem" >> $OUT
+$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
+echo "fsck returns $?" >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
diff --git a/tests/t_iexpand_full/expect b/tests/t_iexpand_full/expect
new file mode 100644
index 0000000..f99ab4b
--- /dev/null
+++ b/tests/t_iexpand_full/expect
@@ -0,0 +1,39 @@
+tune2fs test
+128-byte inodes cannot handle dates beyond 2038 and are deprecated
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 6368 huge file(s) with 117 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -I 256 test.img
+Setting inode size 256
+Exit status is 0
+Change in FS metadata:
+@@ -14 +14 @@
+-Free blocks: 12301
++Free blocks: 12
+@@ -23 +23 @@
+-Inode blocks per group: 128
++Inode blocks per group: 256
+@@ -29 +29 @@
+-Inode size: 128
++Inode size: 256
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_iexpand_full/name b/tests/t_iexpand_full/name
new file mode 100644
index 0000000..2241b34
--- /dev/null
+++ b/tests/t_iexpand_full/name
@@ -0,0 +1 @@
+expand inodes on a totally full filesystem
diff --git a/tests/t_iexpand_full/script b/tests/t_iexpand_full/script
new file mode 100644
index 0000000..2d347c2
--- /dev/null
+++ b/tests/t_iexpand_full/script
@@ -0,0 +1,83 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+if [ $(uname -s) = "Darwin" ]; then
+ # creates a 3GB filesystem
+ echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+#gzip -d < $EXP.gz > $EXP
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg,metadata_csum,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 12000K
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 117K
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux -I 128 $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2>&1 | sed -f $cmd_dir/filter.sed -e '/^Checksum:.*/d' >> $OUT.before 2> /dev/null
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# convert it
+echo "tune2fs -I 256 test.img" >> $OUT
+dd if=/dev/zero of=$TMPFILE conv=notrunc bs=1 count=1 seek=3221225471 2> /dev/null
+$TUNE2FS -I 256 $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2>&1 | sed -f $cmd_dir/filter.sed -e '/^Checksum:.*/d' >> $OUT.after 2> /dev/null
+echo "Change in FS metadata:" >> $OUT
+diff -U 0 $OUT.before $OUT.after | sed -e '/^---.*/d' -e '/^+++.*/d' >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm $OUT.before $OUT.after
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_iexpand_mcsum/expect b/tests/t_iexpand_mcsum/expect
new file mode 100644
index 0000000..354b117
--- /dev/null
+++ b/tests/t_iexpand_mcsum/expect
@@ -0,0 +1,57 @@
+tune2fs test
+128-byte inodes cannot handle dates beyond 2038 and are deprecated
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 6334 huge file(s) with 117 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -I 256 -O metadata_csum test.img
+Setting inode size 256
+
+This operation requires a freshly checked filesystem.
+
+Please run e2fsck -fD on the filesystem.
+
+Exit status is 0
+Backing up journal inode block information.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+
+
+Change in FS metadata:
+@@ -5 +5 @@
+-Filesystem features: has_journal ext_attr dir_index filetype extent 64bit sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr dir_index filetype extent 64bit sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
+@@ -22 +22 @@
+-Inode blocks per group: 128
++Inode blocks per group: 256
+@@ -28 +28 @@
+-Inode size: 128
++Inode size: 256
+@@ -31,0 +32 @@
++Checksum type: crc32c
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/t_iexpand_mcsum/name b/tests/t_iexpand_mcsum/name
new file mode 100644
index 0000000..e767715
--- /dev/null
+++ b/tests/t_iexpand_mcsum/name
@@ -0,0 +1 @@
+expand inodes and turn on metadata_csum
diff --git a/tests/t_iexpand_mcsum/script b/tests/t_iexpand_mcsum/script
new file mode 100644
index 0000000..9ee75cf
--- /dev/null
+++ b/tests/t_iexpand_mcsum/script
@@ -0,0 +1,84 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+if [ $(uname -s) = "Darwin" ]; then
+ # creates a 3GB filesystem
+ echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+#gzip -d < $EXP.gz > $EXP
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg,^metadata_csum,64bit
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 16000K
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 117K
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "tune2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux -I 128 $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE | grep -v '^Free blocks:'; $DUMPE2FS -g $TMPFILE) 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT.before 2> /dev/null
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# convert it
+echo "tune2fs -I 256 -O metadata_csum test.img" >> $OUT
+dd if=/dev/zero of=$TMPFILE conv=notrunc bs=1 count=1 seek=3221225471 2> /dev/null
+$TUNE2FS -I 256 -O metadata_csum $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+$FSCK -N test_filesys -y -f -D $TMPFILE >> $OUT 2>&1
+
+# dump and check
+($DUMPE2FS -h $TMPFILE | grep -v '^Free blocks:'; $DUMPE2FS -g $TMPFILE) 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT.after 2> /dev/null
+echo "Change in FS metadata:" >> $OUT
+diff -U 0 $OUT.before $OUT.after | sed -e '/^---.*/d' -e '/^+++.*/d' >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm $OUT.before $OUT.after
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/t_mmp_1on/name b/tests/t_mmp_1on/name
new file mode 100644
index 0000000..62e16b2
--- /dev/null
+++ b/tests/t_mmp_1on/name
@@ -0,0 +1 @@
+enable MMP using tune2fs
diff --git a/tests/t_mmp_1on/script b/tests/t_mmp_1on/script
new file mode 100644
index 0000000..733395e
--- /dev/null
+++ b/tests/t_mmp_1on/script
@@ -0,0 +1,29 @@
+FSCK_OPT=-yf
+
+$MKE2FS -q -F -o Linux -b 4096 $TMPFILE 100 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$TUNE2FS -O mmp -E mmp_update_interval=1 $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -O mmp failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with MMP enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/t_mmp_2off/name b/tests/t_mmp_2off/name
new file mode 100644
index 0000000..d7cac51
--- /dev/null
+++ b/tests/t_mmp_2off/name
@@ -0,0 +1 @@
+disable MMP using tune2fs
diff --git a/tests/t_mmp_2off/script b/tests/t_mmp_2off/script
new file mode 100644
index 0000000..1cd0719
--- /dev/null
+++ b/tests/t_mmp_2off/script
@@ -0,0 +1,29 @@
+FSCK_OPT=-yf
+
+$MKE2FS -q -F -o Linux -b 4096 -O mmp $TMPFILE 100 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O mmp failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$TUNE2FS -O ^mmp $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -O ^mmp failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck after MMP disable failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/t_mmp_fail/is_slow_test b/tests/t_mmp_fail/is_slow_test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/t_mmp_fail/is_slow_test
diff --git a/tests/t_mmp_fail/name b/tests/t_mmp_fail/name
new file mode 100644
index 0000000..e872dda
--- /dev/null
+++ b/tests/t_mmp_fail/name
@@ -0,0 +1 @@
+error running tune2fs with MMP
diff --git a/tests/t_mmp_fail/script b/tests/t_mmp_fail/script
new file mode 100644
index 0000000..5fa6a84
--- /dev/null
+++ b/tests/t_mmp_fail/script
@@ -0,0 +1,44 @@
+FSCK_OPT=-yf
+
+$MKE2FS -q -F -o Linux -I 128 -b 1024 -O mmp $TMPFILE 100 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O mmp failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$TUNE2FS -O project $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" == 0 ] ; then
+ echo "'tune2fs -O project' succeeded on small inode" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return 1
+fi
+$TUNE2FS -o bad_option $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" == 0 ] ; then
+ echo "'tune2fs -o bad_option' succeeded" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return 1
+fi
+$E2MMPSTATUS -i $TMPFILE >> $test_name.log 2>&1
+$E2MMPSTATUS $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "$TUNE2FS left MMP block in bad state" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck after MMP disable failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/t_project_1on/name b/tests/t_project_1on/name
new file mode 100644
index 0000000..6b2dd29
--- /dev/null
+++ b/tests/t_project_1on/name
@@ -0,0 +1 @@
+enable project using tune2fs -O option
diff --git a/tests/t_project_1on/script b/tests/t_project_1on/script
new file mode 100644
index 0000000..606963f
--- /dev/null
+++ b/tests/t_project_1on/script
@@ -0,0 +1,41 @@
+FSCK_OPT=-yf
+
+if [ "$QUOTA" != "y" ]; then
+ echo "$test_name: $test_description: skipped"
+ return 0
+fi
+
+$MKE2FS -q -F -o Linux -I 256 -b 4096 $TMPFILE 10000 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+dd if=/dev/zero of=$TMPFILE.2 bs=1048576 count=1 >> $test_name.log 2>&1
+cat <<- EOF | $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1
+ write $TMPFILE.2 file1
+ set_inode_field file1 projid 500
+EOF
+rm -f $TMPFILE.2
+
+$TUNE2FS -O project $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -O project failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with project enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/t_project_2off/name b/tests/t_project_2off/name
new file mode 100644
index 0000000..293717d
--- /dev/null
+++ b/tests/t_project_2off/name
@@ -0,0 +1 @@
+disable project using tune2fs
diff --git a/tests/t_project_2off/script b/tests/t_project_2off/script
new file mode 100644
index 0000000..98696b4
--- /dev/null
+++ b/tests/t_project_2off/script
@@ -0,0 +1,35 @@
+FSCK_OPT=-yf
+
+if [ "$QUOTA" != "y" ]; then
+ echo "$test_name: $test_description: skipped"
+ return 0
+fi
+
+$MKE2FS -q -F -o Linux -I 256 -b 4096 -O quota,project $TMPFILE 100 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O quota,project failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$TUNE2FS -O ^project $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -O ^project failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with project enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+rm -f $TMPFILE
diff --git a/tests/t_project_3on/name b/tests/t_project_3on/name
new file mode 100644
index 0000000..9a10680
--- /dev/null
+++ b/tests/t_project_3on/name
@@ -0,0 +1 @@
+enable project using tune2fs -Q option
diff --git a/tests/t_project_3on/script b/tests/t_project_3on/script
new file mode 100644
index 0000000..5eaaa15
--- /dev/null
+++ b/tests/t_project_3on/script
@@ -0,0 +1,41 @@
+FSCK_OPT=-yf
+
+if [ "$QUOTA" != "y" ]; then
+ echo "$test_name: $test_description: skipped"
+ return 0
+fi
+
+$MKE2FS -q -F -o Linux -I 256 -b 4096 $TMPFILE 10000 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+dd if=/dev/zero of=$TMPFILE.2 bs=1048576 count=1 >> $test_name.log 2>&1
+cat <<- EOF | $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1
+ write $TMPFILE.2 file1
+ set_inode_field file1 projid 500
+EOF
+rm -f $TMPFILE.2
+
+$TUNE2FS -Q prj $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -Q project failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with project enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/t_project_4off/name b/tests/t_project_4off/name
new file mode 100644
index 0000000..5ef6430
--- /dev/null
+++ b/tests/t_project_4off/name
@@ -0,0 +1 @@
+disable project using tune2fs -Q option
diff --git a/tests/t_project_4off/script b/tests/t_project_4off/script
new file mode 100644
index 0000000..29de6bc
--- /dev/null
+++ b/tests/t_project_4off/script
@@ -0,0 +1,35 @@
+FSCK_OPT=-yf
+
+if [ "$QUOTA" != "y" ]; then
+ echo "$test_name: $test_description: skipped"
+ return 0
+fi
+
+$MKE2FS -q -F -o Linux -I 256 -b 4096 -O quota,project $TMPFILE 100 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O quota,project failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$TUNE2FS -Q ^prj $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -O ^project failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with project enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+rm -f $TMPFILE
diff --git a/tests/t_quota_1on/name b/tests/t_quota_1on/name
new file mode 100644
index 0000000..f92e2d5
--- /dev/null
+++ b/tests/t_quota_1on/name
@@ -0,0 +1 @@
+enable quota using tune2fs
diff --git a/tests/t_quota_1on/script b/tests/t_quota_1on/script
new file mode 100644
index 0000000..3704d7a
--- /dev/null
+++ b/tests/t_quota_1on/script
@@ -0,0 +1,42 @@
+FSCK_OPT=-yf
+
+if [ "$QUOTA" != "y" ]; then
+ echo "$test_name: $test_description: skipped"
+ return 0
+fi
+
+$MKE2FS -q -F -o Linux -b 4096 $TMPFILE 10000 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+dd if=/dev/zero of=$TMPFILE.2 bs=1048576 count=1 >> $test_name.log 2>&1
+cat <<- EOF | $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1
+ write $TMPFILE.2 file1
+ set_inode_field file1 uid 500
+ set_inode_field file1 gid 500
+EOF
+rm -f $TMPFILE.2
+
+$TUNE2FS -O quota $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -O quota failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with quota enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/t_quota_2off/name b/tests/t_quota_2off/name
new file mode 100644
index 0000000..bb0ec98
--- /dev/null
+++ b/tests/t_quota_2off/name
@@ -0,0 +1 @@
+disable quota using tune2fs
diff --git a/tests/t_quota_2off/script b/tests/t_quota_2off/script
new file mode 100644
index 0000000..b170c59
--- /dev/null
+++ b/tests/t_quota_2off/script
@@ -0,0 +1,35 @@
+FSCK_OPT=-yf
+
+if [ "$QUOTA" != "y" ]; then
+ echo "$test_name: $test_description: skipped"
+ return 0
+fi
+
+$MKE2FS -q -F -o Linux -b 4096 -O quota $TMPFILE 100 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs -O quota failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$TUNE2FS -O ^quota $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "tune2fs -O ^quota failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with quota enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+rm -f $TMPFILE
diff --git a/tests/t_quota_add/name b/tests/t_quota_add/name
new file mode 100644
index 0000000..43a4bfd
--- /dev/null
+++ b/tests/t_quota_add/name
@@ -0,0 +1 @@
+add several quota types using tune2fs and check computed usage
diff --git a/tests/t_quota_add/script b/tests/t_quota_add/script
new file mode 100644
index 0000000..c26c37a
--- /dev/null
+++ b/tests/t_quota_add/script
@@ -0,0 +1,46 @@
+FSCK_OPT=-yf
+
+if [ "$QUOTA" != "y" ]; then
+ echo "$test_name: $test_description: skipped"
+ return 0
+fi
+
+$MKE2FS -q -F -o Linux -b 4096 -O quota -E quotatype=prjquota $TMPFILE 10000 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+for type in usrquota grpquota; do
+ $TUNE2FS -Q $type $TMPFILE >> $test_name.log 2>&1
+ status=$?
+ if [ "$status" != 0 ] ; then
+ echo "tune2fs -O quota failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+ fi
+done
+
+UUSAGE=$($DEBUGFS 2>/dev/null -R "lq user" $TMPFILE | grep "^ *0 ")
+for type in group project; do
+ TUSAGE=$($DEBUGFS 2>/dev/null -R "lq $type" $TMPFILE | grep "^ *0 ")
+ if [ "$TUSAGE" != "$UUSAGE" ]; then
+ echo "user and $type quota entries are different" >$test_name.failed
+ echo "$test_name: $test_description: failed"
+ return 1
+ fi
+done
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with quota enabled failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/t_replay_and_set/expect b/tests/t_replay_and_set/expect
new file mode 100644
index 0000000..3e19d92
--- /dev/null
+++ b/tests/t_replay_and_set/expect
@@ -0,0 +1,38 @@
+64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.
+Creating filesystem with 65536 4k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 32768
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 0
+debugfs write journal
+set the label on a dirty-journal fs
+Recovering journal.
+fsck the whole mess
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: +(0--1050) +(32768--36880)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
+Exit status is 1
diff --git a/tests/t_replay_and_set/name b/tests/t_replay_and_set/name
new file mode 100644
index 0000000..4e4759e
--- /dev/null
+++ b/tests/t_replay_and_set/name
@@ -0,0 +1 @@
+recover journal and clear features
diff --git a/tests/t_replay_and_set/script b/tests/t_replay_and_set/script
new file mode 100644
index 0000000..3b033a8
--- /dev/null
+++ b/tests/t_replay_and_set/script
@@ -0,0 +1,51 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+$MKE2FS -F -o Linux -b 4096 -O has_journal,metadata_csum -T ext4 $TMPFILE 65536 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+echo "set the label on a dirty-journal fs" >> $OUT.new
+$TUNE2FS -L testing $TMPFILE >> $OUT.new 2>&1
+
+echo "fsck the whole mess" >> $OUT.new
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed < $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/t_uninit_bg_rm/expect b/tests/t_uninit_bg_rm/expect
new file mode 100644
index 0000000..68f8b51
--- /dev/null
+++ b/tests/t_uninit_bg_rm/expect
@@ -0,0 +1,21 @@
+mke2fs -q -t ext4 -F -o Linux -b 1024 test.img 1G
+tune2fs -f -O ^uninit_bg test.img
+
+fsck -yf -N test_filesys test.img
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/65536 files (0.0% non-contiguous), 35910/1048576 blocks
+
+mke2fs -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 test.img 10G
+tune2fs -f -O ^uninit_bg test.img
+
+fsck -yf -N test_filesys test.img
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/655360 files (0.0% non-contiguous), 232632/10485760 blocks
diff --git a/tests/t_uninit_bg_rm/script b/tests/t_uninit_bg_rm/script
new file mode 100644
index 0000000..66eb21c
--- /dev/null
+++ b/tests/t_uninit_bg_rm/script
@@ -0,0 +1,55 @@
+test_description="remove uninit_bg"
+OUT=$test_name.log
+FSCK_OPT=-yf
+EXP=$test_dir/expect
+
+os=$(uname -s)
+if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
+ # creates a 10GB filesystem
+ echo "$test_name: $test_description: skipped for $os"
+ return 0
+fi
+
+cp /dev/null $TMPFILE
+
+echo mke2fs -q -t ext4 -F -o Linux -b 1024 test.img 1G > $OUT.new
+$MKE2FS -q -t ext4 -F -o Linux -b 1024 $TMPFILE 1G >> $OUT.new 2>&1
+
+echo "tune2fs -f -O ^uninit_bg test.img" >> $OUT.new
+$TUNE2FS -f -O ^uninit_bg $TMPFILE >> $OUT.new 2>&1
+
+echo " " >> $OUT.new
+echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+
+echo " " >> $OUT.new
+cp /dev/null $TMPFILE
+echo mke2fs -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 test.img 10G >> $OUT.new
+$MKE2FS -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 $TMPFILE 10G >> $OUT.new 2>&1
+
+echo "tune2fs -f -O ^uninit_bg test.img" >> $OUT.new
+$TUNE2FS -f -O ^uninit_bg $TMPFILE >> $OUT.new 2>&1
+
+echo " " >> $OUT.new
+echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed < $OUT.new > $OUT
+
+rm -f $TMPFILE $OUT.new
+
+#
+# Do the verification
+#
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
diff --git a/tests/t_write_subdirectory/name b/tests/t_write_subdirectory/name
new file mode 100644
index 0000000..740c409
--- /dev/null
+++ b/tests/t_write_subdirectory/name
@@ -0,0 +1 @@
+debugfs write creates file in subdirectory
diff --git a/tests/t_write_subdirectory/script b/tests/t_write_subdirectory/script
new file mode 100644
index 0000000..bb354f8
--- /dev/null
+++ b/tests/t_write_subdirectory/script
@@ -0,0 +1,29 @@
+FSCK_OPT=-nf
+
+$MKE2FS -q -F -o Linux -I 256 -b 4096 $TMPFILE 10000 > $test_name.log 2>&1
+status=$?
+if [ "$status" != 0 ] ; then
+ echo "mke2fs failed" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+
+touch $TMPFILE.1
+cat <<- EOF | $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1
+ mkdir aaa
+ mkdir aaa/bbb
+ write $TMPFILE.1 aaa/bbb/ccc
+EOF
+rm -f $TMPFILE.1
+
+$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
+status=$?
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "e2fsck with failed with $status" > $test_name.failed
+ echo "$test_name: $test_description: failed"
+ return $status
+fi
+rm -f $TMPFILE
diff --git a/tests/test_config b/tests/test_config
new file mode 100644
index 0000000..9dc762c
--- /dev/null
+++ b/tests/test_config
@@ -0,0 +1,48 @@
+#
+# Test configuration
+#
+
+unset LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME PAGER
+FSCK="$USE_VALGRIND ../e2fsck/e2fsck"
+MKE2FS="$USE_VALGRIND ../misc/mke2fs"
+DUMPE2FS="$USE_VALGRIND ../misc/dumpe2fs"
+TUNE2FS="$USE_VALGRIND ../misc/tune2fs"
+CHATTR="$USE_VALGRIND../misc/chattr"
+LSATTR="$USE_VALGRIND ../misc/lsattr"
+E2IMAGE="$USE_VALGRIND ../misc/e2image"
+E2IMAGE_EXE="../misc/e2image"
+DEBUGFS="$USE_VALGRIND ../debugfs/debugfs"
+DEBUGFS_EXE="../debugfs/debugfs"
+TEST_BITS="test_data.tmp"
+RESIZE2FS_EXE="../resize/resize2fs"
+RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
+E2UNDO_EXE="../misc/e2undo"
+E2UNDO="$USE_VALGRIND $E2UNDO_EXE"
+E2MMPSTATUS="$USE_VALGRIND ../misc/dumpe2fs -m"
+TEST_REL=../tests/progs/test_rel
+TEST_ICOUNT=../tests/progs/test_icount
+CRCSUM=../tests/progs/crcsum
+CLEAN_OUTPUT="sed -f $cmd_dir/filter.sed"
+LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${LD_LIBRARY_PATH}
+DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${DYLD_LIBRARY_PATH}
+export LD_LIBRARY_PATH
+export DYLD_LIBRARY_PATH
+TZ=GMT0
+export TZ
+LC_ALL=C
+export LC_ALL
+E2FSCK_CONFIG=/dev/null
+export E2FSCK_CONFIG
+MKE2FS_CONFIG=./mke2fs.conf
+export MKE2FS_CONFIG
+BLKID_FILE=/dev/null
+export BLKID_FILE
+unset MKE2FS_FIRST_META_BG
+E2FSPROGS_SKIP_PROGRESS=yes
+export E2FSPROGS_SKIP_PROGRESS
+EXT2FS_NO_MTAB_OK=yes
+export EXT2FS_NO_MTAB_OK
+RESIZE2FS_FORCE_LAZY_ITABLE_INIT=yes
+export RESIZE2FS_FORCE_LAZY_ITABLE_INIT
+E2FSPROGS_LIBMAGIC_SUPPRESS=yes
+export E2FSPROGS_LIBMAGIC_SUPPRESS
diff --git a/tests/test_one.in b/tests/test_one.in
new file mode 100644
index 0000000..78499ad
--- /dev/null
+++ b/tests/test_one.in
@@ -0,0 +1,92 @@
+#!/bin/sh
+# run a single regression test
+
+export DD
+
+LC_ALL=C
+export LC_ALL
+
+case "$1" in
+ --valgrind)
+ export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls"
+ shift;
+ ;;
+ --valgrind-leakcheck)
+ export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
+ shift;
+ ;;
+ --skip-slow-tests)
+ SKIP_SLOW_TESTS=yes
+ shift;
+ ;;
+esac
+
+case "$1" in
+ *.failed|*.new|*.ok|*.log|*.tmp|*.slow) exit 0 ;;
+esac
+
+test_dir=$1
+cmd_dir=$SRCDIR
+
+if test "$TEST_CONFIG"x = x; then
+ TEST_CONFIG=$SRCDIR/test_config
+fi
+
+. $TEST_CONFIG
+
+test_name=`echo $test_dir | sed -e 's;.*/;;'`
+
+if [ -f $test_dir ] ; then
+ exit 0;
+fi
+if [ ! -d $test_dir ] ; then
+ echo "The test '$test_name' does not exist."
+ exit 0;
+fi
+if [ -z "`ls $test_dir`" ]; then
+ exit 0
+fi
+if [ -f $test_dir/name ]; then
+ test_description=`cat $test_dir/name`
+else
+ test_description=
+fi
+
+if [ -n "$SKIP_SLOW_TESTS" -a -f $test_dir/is_slow_test ]; then
+ echo "$test_name: $test_description: skipped (slow test)"
+ exit 0
+fi
+
+rm -f $test_name.ok $test_name.failed $test_name.log $test_name.slow
+#echo -e -n "$test_name: $test_description:\r"
+
+TMPFILE=$(mktemp ${TMPDIR:-/tmp}/e2fsprogs-tmp-$test_name.XXXXXX)
+[ "$SKIP_UNLINK" != "true" ] && trap 'rm -f $TMPFILE ; exit' 0 1 2 15
+
+start=$SECONDS
+if [ -f $test_dir/script ]; then
+ . $test_dir/script
+else
+ test_base=`echo $test_name | sed -e 's/_.*//'`
+ default_script=$SRCDIR/defaults/${test_base}_script
+ if [ -f $default_script ]; then
+ . $SRCDIR/defaults/${test_base}_script
+ else
+ echo "$test_name: Missing test script $default_script!"
+ fi
+fi
+elapsed=$((SECONDS - start))
+if [ $elapsed -gt 60 -a ! -f $test_dir/is_slow_test ]; then
+ echo "$test_name: *** took $elapsed seconds to finish ***" |
+ tee $test_name.slow
+ echo "$test_name: consider adding $test_dir/is_slow_test"
+fi
+
+if [ -n "$PRINT_FAILED" -a -f $test_name.failed ] ; then
+ cat $test_name.failed
+fi
+
+if [ "$SKIP_UNLINK" != "true" ] ; then
+ rm -f $TMPFILE
+fi
+
diff --git a/tests/test_post b/tests/test_post
new file mode 100755
index 0000000..1251266
--- /dev/null
+++ b/tests/test_post
@@ -0,0 +1,17 @@
+#!/bin/sh
+# report stats about test scripts that were run
+
+num_ok=`ls *.ok 2>/dev/null | wc -l`
+num_failed=`ls *.failed 2>/dev/null | wc -l`
+
+echo "$num_ok tests succeeded $num_failed tests failed"
+
+test "$num_failed" -eq 0 && exit 0
+
+echo -n "Tests failed: "
+for fname in $(ls *.failed); do
+ echo -n "${fname%%.failed} "
+done
+echo ""
+
+exit 1
diff --git a/tests/test_script.in b/tests/test_script.in
new file mode 100644
index 0000000..442999d
--- /dev/null
+++ b/tests/test_script.in
@@ -0,0 +1,52 @@
+#!/bin/sh
+# Run all or specified test scripts
+#
+
+case "$1" in
+ --valgrind)
+ export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls"
+ shift
+ ;;
+ --valgrind-leakcheck)
+ export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
+ shift
+ ;;
+ --failed)
+ DO_FAILED=yes
+ shift
+ ;;
+esac
+
+TESTS=
+
+if test -n "$DO_FAILED"; then
+ FAILED=$(find . -maxdepth 1 -name \*.failed)
+ if test -z "$FAILED" ; then
+ echo " "
+ echo "No (more) failed tests!"
+ echo " "
+ fi
+ for fname in $FAILED ; do
+ TESTS="$TESTS $SRCDIR/${fname%%.failed}"
+ done
+fi
+
+for i; do
+ case $i in
+ [a-zA-Z]) TESTS="$TESTS $SRCDIR/${i}_*" ;;
+ *) TESTS="$TESTS $SRCDIR/$i" ;;
+ esac
+done
+
+if test "$TESTS"x = x ; then
+ if test -n "$DO_FAILED"; then
+ exit 0
+ fi
+ TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
+fi
+
+for test_dir in $TESTS; do
+ ./test_one $test_dir
+done
+
+$SRCDIR/test_post
diff --git a/tests/u_bounce_io/expect.1 b/tests/u_bounce_io/expect.1
new file mode 100644
index 0000000..e1d1845
--- /dev/null
+++ b/tests/u_bounce_io/expect.1
@@ -0,0 +1,108 @@
+Creating filesystem with 65536 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345
+
+Allocating group tables: done
+Writing inode tables: done
+Writing superblocks and filesystem accounting information: done
+
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/16384 files (0.0% non-contiguous), 5412/65536 blocks
+Exit status is 0
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 16384
+Block count: 65536
+Reserved block count: 3276
+Overhead clusters: 5398
+Free blocks: 60124
+Free inodes: 16373
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 255
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 512
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Default directory hash: half_md4
+
+
+Group 0: (Blocks 1-8192)
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-257
+ Block bitmap at 258 (+257), Inode bitmap at 259 (+258)
+ Inode table at 260-771 (+259)
+ 7407 free blocks, 2037 free inodes, 2 directories
+ Free blocks: 786-8192
+ Free inodes: 12-2048
+Group 1: (Blocks 8193-16384)
+ Backup superblock at 8193, Group descriptors at 8194-8194
+ Reserved GDT blocks at 8195-8449
+ Block bitmap at 8450 (+257), Inode bitmap at 8451 (+258)
+ Inode table at 8452-8963 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 8964-16384
+ Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+ Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+ Inode table at 16387-16898 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 16899-24576
+ Free inodes: 4097-6144
+Group 3: (Blocks 24577-32768)
+ Backup superblock at 24577, Group descriptors at 24578-24578
+ Reserved GDT blocks at 24579-24833
+ Block bitmap at 24834 (+257), Inode bitmap at 24835 (+258)
+ Inode table at 24836-25347 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 25348-32768
+ Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+ Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+ Inode table at 32771-33282 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 33283-40960
+ Free inodes: 8193-10240
+Group 5: (Blocks 40961-49152)
+ Backup superblock at 40961, Group descriptors at 40962-40962
+ Reserved GDT blocks at 40963-41217
+ Block bitmap at 41218 (+257), Inode bitmap at 41219 (+258)
+ Inode table at 41220-41731 (+259)
+ 7421 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 41732-49152
+ Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+ Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+ Inode table at 49155-49666 (+2)
+ 7678 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 49667-57344
+ Free inodes: 12289-14336
+Group 7: (Blocks 57345-65535)
+ Backup superblock at 57345, Group descriptors at 57346-57346
+ Reserved GDT blocks at 57347-57601
+ Block bitmap at 57602 (+257), Inode bitmap at 57603 (+258)
+ Inode table at 57604-58115 (+259)
+ 7420 free blocks, 2048 free inodes, 0 directories
+ Free blocks: 58116-65535
+ Free inodes: 14337-16384
diff --git a/tests/u_bounce_io/script b/tests/u_bounce_io/script
new file mode 100644
index 0000000..5dd6329
--- /dev/null
+++ b/tests/u_bounce_io/script
@@ -0,0 +1,9 @@
+DESCRIPTION="bounce I/O in unix_io"
+DUMPE2FS_IGNORE_80COL=1
+export DUMPE2FS_IGNORE_80COL
+UNIX_IO_FORCE_BOUNCE=yes
+export UNIX_IO_FORCE_BOUNCE
+FS_SIZE=65536
+. $cmd_dir/run_mke2fs
+unset DUMPE2FS_IGNORE_80COL
+unset UNIX_IO_FORCE_BOUNCE
diff --git a/tests/u_compound_bad_rollback/script b/tests/u_compound_bad_rollback/script
new file mode 100644
index 0000000..f54da7f
--- /dev/null
+++ b/tests/u_compound_bad_rollback/script
@@ -0,0 +1,62 @@
+test_description="e2undo with mke2fs/tune2fs/resize2fs/e2fsck -z"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+echo compound e2undo rollback test > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -z $TDB_FILE.0 $TMPFILE 256 >> $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -z $TDB_FILE.0 $TMPFILE 256 >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc2 >> $OUT
+
+echo using resize2fs to test e2undo >> $OUT
+$RESIZE2FS -z $TDB_FILE.2 $TMPFILE 512 >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after resize2fs $crc3 >> $OUT
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -D -z $TDB_FILE.3 $TMPFILE >> $OUT 2>&1
+crc4=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc4 >> $OUT
+
+echo roll back mke2fs >> $OUT
+$E2UNDO $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc0_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo mke2fs $crc0_2 >> $OUT
+
+echo roll back tune2fs >> $OUT
+$E2UNDO $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc1_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo tune2fs $crc1_2 >> $OUT
+
+echo roll back resize2fs >> $OUT
+$E2UNDO $TDB_FILE.2 $TMPFILE >> $OUT 2>&1
+crc2_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo resize2fs $crc2_2 >> $OUT
+
+echo roll back e2fsck >> $OUT
+$E2UNDO $TDB_FILE.3 $TMPFILE >> $OUT 2>&1
+crc3_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo e2fsck $crc3_2 >> $OUT
+
+if [ $crc4 = $crc0_2 ] && [ $crc4 = $crc1_2 ] && [ $crc4 = $crc2_2 ] && [ $crc3 = $crc3_2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE.0 $TDB_FILE.1 $TDB_FILE.2 $TDB_FILE.3 $TMPFILE
+fi
diff --git a/tests/u_compound_rollback/script b/tests/u_compound_rollback/script
new file mode 100644
index 0000000..0c1fbcc
--- /dev/null
+++ b/tests/u_compound_rollback/script
@@ -0,0 +1,62 @@
+test_description="e2undo with mke2fs/tune2fs/resize2fs/e2fsck -z"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+echo compound e2undo rollback test > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -z $TDB_FILE.0 $TMPFILE 256 >> $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -z $TDB_FILE.0 $TMPFILE 256 >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc2 >> $OUT
+
+echo using resize2fs to test e2undo >> $OUT
+$RESIZE2FS -z $TDB_FILE.2 $TMPFILE 512 >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after resize2fs $crc3 >> $OUT
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -D -z $TDB_FILE.3 $TMPFILE >> $OUT 2>&1
+crc4=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc4 >> $OUT
+
+echo roll back e2fsck >> $OUT
+$E2UNDO $TDB_FILE.3 $TMPFILE >> $OUT 2>&1
+crc3_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo e2fsck $crc3_2 >> $OUT
+
+echo roll back resize2fs >> $OUT
+$E2UNDO $TDB_FILE.2 $TMPFILE >> $OUT 2>&1
+crc2_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo resize2fs $crc2_2 >> $OUT
+
+echo roll back tune2fs >> $OUT
+$E2UNDO $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc1_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo tune2fs $crc1_2 >> $OUT
+
+echo roll back mke2fs >> $OUT
+$E2UNDO $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc0_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo mke2fs $crc0_2 >> $OUT
+
+if [ $crc0 = $crc0_2 ] && [ $crc1 = $crc1_2 ] && [ $crc2 = $crc2_2 ] && [ $crc3 = $crc3_2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE.0 $TDB_FILE.1 $TDB_FILE.2 $TDB_FILE.3 $TMPFILE
+fi
diff --git a/tests/u_corrupt_blk_csum/script b/tests/u_corrupt_blk_csum/script
new file mode 100644
index 0000000..ee16552
--- /dev/null
+++ b/tests/u_corrupt_blk_csum/script
@@ -0,0 +1,38 @@
+test_description="corrupt e2undo block data"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=${TMPDIR:-/tmp}
+export E2FSPROGS_UNDO_DIR
+TDB_FILE=$E2FSPROGS_UNDO_DIR/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -I 256 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+undo_blks=$(( $(stat -c '%s' $TDB_FILE 2>/dev/null || stat -f '%z' $TDB_FILE 2>/dev/null) / 1024 ))
+dd if=/dev/zero of=$TDB_FILE bs=1024 count=1 seek=$((undo_blks - 2)) conv=notrunc > /dev/null 2>&1
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+res=$?
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $res -ne 0 ] && [ $crc2 = $crc1 ] && [ $crc2 != $crc0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_corrupt_blk_csum_force/script b/tests/u_corrupt_blk_csum_force/script
new file mode 100644
index 0000000..ba82726
--- /dev/null
+++ b/tests/u_corrupt_blk_csum_force/script
@@ -0,0 +1,38 @@
+test_description="force replay of corrupt e2undo block data"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=${TMPDIR:-/tmp}
+export E2FSPROGS_UNDO_DIR
+TDB_FILE=$E2FSPROGS_UNDO_DIR/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -I 256 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+undo_blks=$(( $(stat -c '%s' $TDB_FILE 2>/dev/null || stat -f '%z' $TDB_FILE 2>/dev/null) / 1024 ))
+dd if=/dev/zero of=$TDB_FILE bs=1024 count=1 seek=$((undo_blks - 2)) conv=notrunc > /dev/null 2>&1
+
+$E2UNDO -f $TDB_FILE $TMPFILE >> $OUT 2>&1
+res=$?
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc2 != $crc1 ] && [ $crc2 != $crc0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_corrupt_hdr_csum/script b/tests/u_corrupt_hdr_csum/script
new file mode 100644
index 0000000..32c38c8
--- /dev/null
+++ b/tests/u_corrupt_hdr_csum/script
@@ -0,0 +1,37 @@
+test_description="corrupt e2undo header"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=${TMPDIR:-/tmp}
+export E2FSPROGS_UNDO_DIR
+TDB_FILE=$E2FSPROGS_UNDO_DIR/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -I 256 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+dd if=/dev/zero of=$TDB_FILE bs=256 count=1 seek=1 conv=notrunc > /dev/null 2>&1
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+res=$?
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $res -ne 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_corrupt_key_csum/script b/tests/u_corrupt_key_csum/script
new file mode 100644
index 0000000..d07556b
--- /dev/null
+++ b/tests/u_corrupt_key_csum/script
@@ -0,0 +1,37 @@
+test_description="corrupt e2undo key data"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=${TMPDIR:-/tmp}
+export E2FSPROGS_UNDO_DIR
+TDB_FILE=$E2FSPROGS_UNDO_DIR/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -I 256 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+undo_blks=$(( $(stat -c '%s' $TDB_FILE 2>/dev/null || stat -f '%z' $TDB_FILE 2>/dev/null) / 1024 ))
+dd if=/dev/zero of=$TDB_FILE bs=1024 count=1 seek=$((undo_blks - 1)) conv=notrunc > /dev/null 2>&1
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc0 != $crc1 ] && [ $crc1 = $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_debugfs_opt/script b/tests/u_debugfs_opt/script
new file mode 100644
index 0000000..b5a65ec
--- /dev/null
+++ b/tests/u_debugfs_opt/script
@@ -0,0 +1,34 @@
+test_description="e2undo with debugfs -z"
+if ! test -x $E2UNDO_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/e2undo)"
+ return 0
+fi
+
+TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before debugfs $crc0 >> $OUT
+
+echo using debugfs to test e2undo >> $OUT
+$DEBUGFS -w -z $TDB_FILE -R 'zap -p 0x55 0' $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after debugfs $crc1 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc0 = $crc2 ] && [ $crc1 != $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
diff --git a/tests/u_direct_io/expect b/tests/u_direct_io/expect
new file mode 100644
index 0000000..830cbd7
--- /dev/null
+++ b/tests/u_direct_io/expect
@@ -0,0 +1,63 @@
+mke2fs -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP
+Creating filesystem with 32768 4k blocks and 32768 inodes
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (4096 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+debugfs -D -R stats $LOOP
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file dir_nlink extra_isize
+Default mount options: (none)
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 32768
+Block count: 32768
+Reserved block count: 1638
+Overhead clusters: 6155
+Free blocks: 26607
+Free inodes: 32757
+First block: 0
+Block size: 4096
+Fragment size: 4096
+Reserved GDT blocks: 7
+Blocks per group: 32768
+Fragments per group: 32768
+Inodes per group: 32768
+Inode blocks per group: 2048
+Flex block group size: 16
+Mount count: 0
+Check interval: 15552000 (6 months)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 32
+Desired extra isize: 32
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Directories: 2
+ Group 0: block bitmap at 9, inode bitmap at 25, inode table at 41
+ 26607 free blocks, 32757 free inodes, 2 used directories
+e2fsck -fn -N test_filesys $LOOP
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
+Exit status is 0
+e2fsck -fn -N test_filesys $TMPFILE
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
+Exit status is 0
diff --git a/tests/u_direct_io/script b/tests/u_direct_io/script
new file mode 100644
index 0000000..b4f0775
--- /dev/null
+++ b/tests/u_direct_io/script
@@ -0,0 +1,49 @@
+DESCRIPTION="direct I/O in unix_io"
+OUT=$test_name.log
+if test "$(id -u)" -ne 0 ; then
+ echo "$test_name: $DESCRIPTION: skipped (not root)"
+elif ! command -v losetup >/dev/null ; then
+ echo "$test_name: $DESCRIPTION: skipped (no losetup)"
+elif test ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $DESCRIPTION: skipped (no debugfs)"
+else
+ dd if=/dev/zero of=$TMPFILE bs=1M count=128 > /dev/null 2>&1
+ LOOP=$(losetup --show --sector-size 4096 -f $TMPFILE)
+ if [ ! -b "$LOOP" ]; then
+ echo "$test_name: $DESCRIPTION: skipped (no loop devices)"
+ rm -f $TMPFILE
+ exit 0
+ fi
+ echo mke2fs -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D \$LOOP > $OUT
+ $MKE2FS -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP 2>&1 | \
+ sed -f $cmd_dir/filter.sed >> $OUT
+
+ echo debugfs -D -R stats \$LOOP >> $OUT
+ $DEBUGFS -D -R stats $LOOP 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+
+ echo e2fsck -fn -N test_filesys \$LOOP > $OUT.new
+ $FSCK -fn -N test_filesys $LOOP >> $OUT.new 2>&1
+ echo Exit status is $? >> $OUT.new
+ sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+ rm -f $OUT.new
+
+ losetup -d $LOOP
+
+ echo e2fsck -fn -N test_filesys \$TMPFILE > $OUT.new
+ $FSCK -fn -N test_filesys $TMPFILE >> $OUT.new 2>&1
+ echo Exit status is $? >> $OUT.new
+ sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+ rm -f $OUT.new
+
+ cmp -s $test_name.log $test_dir/expect
+
+ if [ "$?" -eq 0 ]; then
+ echo "$test_name: $DESCRIPTION: ok"
+ touch $test_name.ok
+ else
+ echo "$test_name: $DESCRIPTION: failed"
+ diff $DIFF_OPTS $test_dir/expect $test_name.log >> $test_name.failed
+ fi
+fi
+
+unset LOOP
diff --git a/tests/u_dryrun/script b/tests/u_dryrun/script
new file mode 100644
index 0000000..b90ef47
--- /dev/null
+++ b/tests/u_dryrun/script
@@ -0,0 +1,32 @@
+test_description="e2undo dry run"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+$E2UNDO -n $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc1 = $crc2 ] && [ $crc1 != $crc0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_e2fsck_opt/script b/tests/u_e2fsck_opt/script
new file mode 100644
index 0000000..d61cd2b
--- /dev/null
+++ b/tests/u_e2fsck_opt/script
@@ -0,0 +1,32 @@
+test_description="e2undo with e2fsck -z"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/e2fsck-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before e2fsck $crc0 >> $OUT
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc1 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc0 = $crc2 ] && [ $crc1 != $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_errorout/script b/tests/u_errorout/script
new file mode 100644
index 0000000..20c53de
--- /dev/null
+++ b/tests/u_errorout/script
@@ -0,0 +1,49 @@
+test_description="e2undo a failed command"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+echo check that we cant append a bad undo file > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+CONF=$TMPFILE.conf
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = ^has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode
+ blocksize = 4096
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1K
+ zero_hugefiles = false
+ }
+ENDL
+
+echo mke2fs -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 1024 -z $TDB_FILE.0 $TMPFILE 524288 >> $OUT
+MKE2FS_CONFIG=$CONF $MKE2FS -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 1024 -z $TDB_FILE.0 -d /etc/ $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+
+echo roll back mke2fs >> $OUT
+$E2UNDO $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo mke2fs $crc2 >> $OUT
+
+if [ $crc0 != $crc1 ] && [ $crc1 != $crc2 ] && [ $crc0 = $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE.0 $TMPFILE $CONF
+fi
diff --git a/tests/u_force/script b/tests/u_force/script
new file mode 100644
index 0000000..ef39e24
--- /dev/null
+++ b/tests/u_force/script
@@ -0,0 +1,40 @@
+test_description="e2undo force"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+dd if=/dev/zero of=$TDB_FILE bs=4 count=1 seek=127 conv=notrunc 2> /dev/null
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+$E2UNDO -f $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo -f $crc3 >> $OUT
+
+MUST_FSCK=$($DUMPE2FS $TMPFILE 2> /dev/null | grep 'Filesystem state:.*not clean' -c )
+
+if [ $MUST_FSCK -eq 1 ] && [ $crc0 != $crc3 ] && [ $crc1 = $crc2 ] && [ $crc2 != $crc0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_force_dryrun/script b/tests/u_force_dryrun/script
new file mode 100644
index 0000000..92d7624
--- /dev/null
+++ b/tests/u_force_dryrun/script
@@ -0,0 +1,38 @@
+test_description="force dry-run replay of corrupt e2undo block data"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=${TMPDIR:-/tmp}
+export E2FSPROGS_UNDO_DIR
+TDB_FILE=$E2FSPROGS_UNDO_DIR/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -I 256 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+undo_blks=$(( $(stat -c '%s' $TDB_FILE 2>/dev/null || stat -f '%z' $TDB_FILE 2>/dev/null) / 1024 ))
+dd if=/dev/zero of=$TDB_FILE bs=1024 count=1 seek=$((undo_blks - 2)) conv=notrunc > /dev/null 2>&1
+
+$E2UNDO -f -n $TDB_FILE $TMPFILE >> $OUT 2>&1
+res=$?
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc2 = $crc1 ] && [ $crc2 != $crc0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_incomplete/script b/tests/u_incomplete/script
new file mode 100644
index 0000000..7bc7858
--- /dev/null
+++ b/tests/u_incomplete/script
@@ -0,0 +1,38 @@
+test_description="e2undo with incomplete undo file"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+UNDO_IO_SIMULATE_UNFINISHED=1 $TUNE2FS -O metadata_csum -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+$FSCK -y $TMPFILE >> $OUT 2>&1
+fsck_res=$?
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after fsck $crc3 >> $OUT
+echo fsck result $fsck_res >> $OUT
+
+if [ $crc0 != $crc2 ] && [ $crc1 != $crc2 ] && [ $crc0 != $crc1 ] && [ $fsck_res -eq 1 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_mke2fs/script b/tests/u_mke2fs/script
new file mode 100644
index 0000000..f1041a9
--- /dev/null
+++ b/tests/u_mke2fs/script
@@ -0,0 +1,34 @@
+test_description="e2undo with mke2fs"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=${TMPDIR:-/tmp}
+export E2FSPROGS_UNDO_DIR
+TDB_FILE=$E2FSPROGS_UNDO_DIR/mke2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 test.img > $OUT
+$MKE2FS -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc >> $OUT
+
+echo using mke2fs to test e2undo >> $OUT
+$MKE2FS -q -F -o Linux -I 256 -O uninit_bg -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+new_crc=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $new_crc >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+new_crc=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $new_crc >> $OUT
+
+if [ $crc = $new_crc ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_mke2fs_opt/script b/tests/u_mke2fs_opt/script
new file mode 100644
index 0000000..db62ab2
--- /dev/null
+++ b/tests/u_mke2fs_opt/script
@@ -0,0 +1,32 @@
+test_description="e2undo with mke2fs -z"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/mke2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -F -o Linux -I 128 -b 1024 test.img > $OUT
+$MKE2FS -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+echo using mke2fs to test e2undo >> $OUT
+$MKE2FS -q -F -o Linux -T ext4 -E lazy_itable_init=1 -b 1024 -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc0 = $crc2 ] && [ $crc1 != $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_mke2fs_opt_oddsize/script b/tests/u_mke2fs_opt_oddsize/script
new file mode 100644
index 0000000..23e0b9e
--- /dev/null
+++ b/tests/u_mke2fs_opt_oddsize/script
@@ -0,0 +1,31 @@
+test_description="e2undo with mke2fs -z and non-32k-aligned bdev size"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/mke2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+yes "abc123abc123abc" | dd bs=1k count=8 >> $TMPFILE 2> /dev/null
+
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 > $OUT
+
+echo using mke2fs to test e2undo >> $OUT
+$MKE2FS -q -F -o Linux -T ext4 -E lazy_itable_init=1 -b 1024 -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc0 = $crc2 ] && [ $crc1 != $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_mke2fs_opt_offset/script b/tests/u_mke2fs_opt_offset/script
new file mode 100644
index 0000000..4b34b7a
--- /dev/null
+++ b/tests/u_mke2fs_opt_offset/script
@@ -0,0 +1,104 @@
+test_description="e2undo and mke2fs with offset option"
+OUT="$test_name.log"
+TDB_FILE="$TMPFILE.e2undo"
+
+E2UNDO_FEATURE_COMPAT_OFFSET=1
+
+trap "rm -f $TDB_FILE" EXIT INT QUIT
+
+test_e2undo_mke2fs_off() {
+ OFF=$1
+
+ rm -f "$TDB_FILE"
+ echo "testing e2undo and mke2fs with the -E offset=$OFF option" >> "$OUT"
+ # prepare $TMPFILE
+ yes a | $DD of="$TMPFILE" bs="$OFF" count=1 iflag=fullblock \
+ > /dev/null 2>>"$OUT"
+ yes b | $DD bs=1k count=1024 iflag=fullblock >> "$TMPFILE" 2>>"$OUT"
+ yes c | $DD bs=1k count=3 iflag=fullblock >> "$TMPFILE" 2>>"$OUT"
+
+ crc_exp=`$CRCSUM "$TMPFILE"`
+ $MKE2FS -F -z "$TDB_FILE" -b 1024 -E offset="$OFF" "$TMPFILE" 1024 \
+ >> "$OUT" 2>&1
+
+ # supplement test with offset specific data
+ supplement_test_$OFF
+
+ # dump undo header (just to ease debugging in case of a failure)
+ echo "undo header:" >> "$OUT"
+ $E2UNDO -h "$TDB_FILE" "$TMPFILE" >> "$OUT" 2>&1
+
+ # offset is stored in the undo header
+ $E2UNDO "$TDB_FILE" "$TMPFILE" >> "$OUT" 2>&1
+ crc_act=`$CRCSUM "$TMPFILE"`
+
+ # also test the key extension code path: the key for the fs block 960
+ # (tdb block 30) is extended by the fs block 992 (tdb block 31)
+ # => we have exactly 3 key blocks instead of 4
+ num_keys_exp=3
+ num_keys_act=`$E2UNDO -h "$TDB_FILE" "$TMPFILE" | grep "^nr keys:" \
+ | cut -f2`
+
+ offset_exp=$OFF
+ offset_act=`$E2UNDO -h "$TDB_FILE" "$TMPFILE" | grep "^fs offset:" \
+ | cut -f2`
+ compat_exp=$E2UNDO_FEATURE_COMPAT_OFFSET
+ compat_act=`$E2UNDO -h "$TDB_FILE" "$TMPFILE" | grep "^compat:" | cut -f3`
+
+ if [ "$crc_exp" != "$crc_act" -o \
+ "$num_keys_exp" != "$num_keys_act" -o \
+ "$offset_exp" != "$offset_act" -o \
+ $(($compat_act & $E2UNDO_FEATURE_COMPAT_OFFSET)) -ne $compat_exp ]
+ then
+ echo "mke2fs called with offset: $OFF" >> "$test_name.failed"
+ echo "crc_exp: $crc_exp" >> "$test_name.failed"
+ echo "crc_act: $crc_act" >> "$test_name.failed"
+ echo "num_keys_exp: $num_keys_exp" >> "$test_name.failed"
+ echo "num_keys_act: $num_keys_act" >> "$test_name.failed"
+ echo "offset_exp: $offset_exp" >> "$test_name.failed"
+ echo "offset_act: $offset_act" >> "$test_name.failed"
+ echo "compat_exp: $compat_exp" >> "$test_name.failed"
+ echo "compat_act: $compat_act" >> "$test_name.failed"
+ echo >> "$test_name.failed"
+ fi
+}
+
+supplement_test_2048() {
+ # modify the two subsequent 1k blocks (1026 and 1027) after the fs end:
+ # e2undo will overwrite these modified blocks with the old
+ # data again (this might be considered as a bug (for now,
+ # this testcase just documents this behavior))
+ SEEK_BLOCKS=$(((2048 + 1024 * 1024) / 1024))
+ yes d | $DD of="$TMPFILE" bs=1k count=2 seek="$SEEK_BLOCKS" \
+ iflag=fullblock > /dev/null 2>>"$OUT"
+}
+
+supplement_test_96255() {
+ # nothing to supplement
+ :
+}
+
+# test even offset < tdb_data_size
+# with an offset of 2048 the old code wrote an incorrect undo file,
+# for example, the computations for fs block 0 were wrong:
+# * backing_blk_num was set to ULLONG_MAX - 1 instead of 0
+# * data was read from the beginning of the file instead of offset 2048
+# * data_ptr was set to read_ptr - 2048
+# for details, see the old undo_write_tdb code in undo_io.c
+test_e2undo_mke2fs_off 2048
+
+# test odd offset > tdb_data_size: 32768 * 3 - 2 * 1024 - 1
+# a somewhat arbitrary value, for example, during the backup of
+# fs block 0 such an offset resulted in:
+# * the largest "in fs block offset" (96255 % 1024 == 1023)
+# * a wrong value for data_size (actual bytes read: 31745)
+# * an invalid address for data_ptr
+# for details, see the old undo_write_tdb code in undo_io.c
+test_e2undo_mke2fs_off 96255
+
+if [ -e "$test_name.failed" ]; then
+ echo "$test_name: $test_description: failed"
+else
+ echo "$test_name: $test_description: ok"
+ touch "$test_name.ok"
+fi
diff --git a/tests/u_not_undo/script b/tests/u_not_undo/script
new file mode 100644
index 0000000..2f07d1b
--- /dev/null
+++ b/tests/u_not_undo/script
@@ -0,0 +1,28 @@
+test_description="e2undo a non-undo file"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+dd if=/dev/zero of=$TDB_FILE bs=1k count=512 > /dev/null 2>&1
+
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before e2undo $crc0 > $OUT
+
+od -tx1 -Ad -c < $TDB_FILE >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc3 >> $OUT
+
+if [ $crc3 = $crc0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_offset/script b/tests/u_offset/script
new file mode 100644
index 0000000..c3e03b7
--- /dev/null
+++ b/tests/u_offset/script
@@ -0,0 +1,138 @@
+test_description="e2undo with the offset option (-o offset)"
+OUT="$test_name.log"
+TMPFILE2="${TMPFILE}_2"
+TDB_FILE="$TMPFILE.e2undo"
+
+E2UNDO_FEATURE_COMPAT_OFFSET=1
+
+trap "rm -f $TMPFILE2 $TDB_FILE" EXIT INT QUIT
+
+read_header_entry() {
+ # $2 is just used as a dummy - it is never used by e2undo
+ # when dumping the header
+ $E2UNDO -h "$1" "$2" | grep "^$3:"
+}
+
+read_header_offset() {
+ read_header_entry "$TDB_FILE" "$TMPFILE" "fs offset" | cut -f2
+}
+
+read_header_compat() {
+ read_header_entry "$TDB_FILE" "$TMPFILE" "compat" | cut -f3
+}
+
+e2undo_offset_assert() {
+ if [ "$crc_exp" != "$crc_act" -o \
+ "$offset_exp" != "$offset_act" -o \
+ $(($compat_act & $E2UNDO_FEATURE_COMPAT_OFFSET)) -ne $compat_exp ]
+ then
+ echo "$1" >> "$test_name.failed"
+ echo "crc_exp: $crc_exp" >> "$test_name.failed"
+ echo "crc_act: $crc_act" >> "$test_name.failed"
+ echo "offset_exp: $offset_exp" >> "$test_name.failed"
+ echo "offset_act: $offset_act" >> "$test_name.failed"
+ echo "compat_exp: $compat_exp" >> "$test_name.failed"
+ echo "compat_act: $compat_act" >> "$test_name.failed"
+ fi
+}
+
+init_fs() {
+ echo "#" >> "$OUT"
+ echo "# init fs for $1" >> "$OUT"
+ echo "#" >> "$OUT"
+ rm -f "$TDB_FILE"
+ dd if=/dev/zero of="$TMPFILE" bs=1k count=1024 > /dev/null 2>&1
+ $MKE2FS -F -z "$TDB_FILE" -b 1024 -E offset=524288 "$TMPFILE" 512 \
+ >> "$OUT" 2>&1
+}
+
+#
+# test absence of the "-o N" option
+#
+test_e2undo_offset_no_option() {
+ init_fs "test_e2undo_offset_no_option"
+
+ $E2UNDO "$TDB_FILE" "$TMPFILE" >> "$OUT" 2>&1
+
+ crc_exp=`dd if=/dev/zero bs=1k count=1024 2>/dev/null | $CRCSUM`
+ crc_act=`$CRCSUM "$TMPFILE"`
+ offset_exp=524288
+ offset_act=`read_header_offset`
+ compat_exp=$E2UNDO_FEATURE_COMPAT_OFFSET
+ compat_act=`read_header_compat`
+ e2undo_offset_assert "test_e2undo_offset_no_option"
+}
+
+#
+# test removal of the offset feature in the undo header
+#
+test_e2undo_offset_no_option_remove_offset_header() {
+ init_fs "test_e2undo_offset_no_option_remove_offset_header"
+ dd if="$TMPFILE" of="$TMPFILE2" bs=1k count=512 skip=512 \
+ > /dev/null 2>&1
+ # offset feature will be removed from the undo header
+ $TUNE2FS -z "$TDB_FILE" -C 42 "$TMPFILE2" >> "$OUT" 2>&1
+
+ $E2UNDO "$TDB_FILE" "$TMPFILE2" >> "$OUT" 2>&1
+
+ crc_exp=`dd if=/dev/zero bs=1k count=512 2>/dev/null | $CRCSUM`
+ crc_act=`$CRCSUM "$TMPFILE2"`
+ offset_exp=
+ offset_act=`read_header_offset`
+ compat_exp=0
+ compat_act=`read_header_compat`
+ e2undo_offset_assert "test_e2undo_offset_no_option_remove_offset_header"
+}
+
+#
+# test "-o 4096"
+#
+test_e2undo_offset_4096() {
+ init_fs "test_e2undo_offset_4096"
+ dd if=/dev/zero of="$TMPFILE2" bs=1k count=4 > /dev/null 2>&1
+ dd if="$TMPFILE" of="$TMPFILE2" bs=1k count=512 skip=512 seek=4 \
+ > /dev/null 2>&1
+
+ $E2UNDO -o 4096 "$TDB_FILE" "$TMPFILE2" >> "$OUT" 2>&1
+
+ crc_exp=`dd if=/dev/zero bs=1k count=516 2>/dev/null | $CRCSUM`
+ crc_act=`$CRCSUM "$TMPFILE2"`
+ # the same as in test_e2undo_offset_no_option
+ offset_exp=524288
+ offset_act=`read_header_offset`
+ compat_exp=$E2UNDO_FEATURE_COMPAT_OFFSET
+ compat_act=`read_header_compat`
+ e2undo_offset_assert "test_e2undo_offset_4096"
+}
+
+#
+# test "-o 0"
+#
+test_e2undo_offset_0() {
+ init_fs "test_e2undo_offset_0"
+ dd if="$TMPFILE" of="$TMPFILE2" bs=1k count=512 skip=512 \
+ > /dev/null 2>&1
+
+ $E2UNDO -o 0 "$TDB_FILE" "$TMPFILE2" >> "$OUT" 2>&1
+
+ crc_exp=`dd if=/dev/zero bs=1k count=512 2>/dev/null | $CRCSUM`
+ crc_act=`$CRCSUM "$TMPFILE2"`
+ # the same as in test_e2undo_offset_no_option
+ offset_exp=524288
+ offset_act=`read_header_offset`
+ compat_exp=$E2UNDO_FEATURE_COMPAT_OFFSET
+ compat_act=`read_header_compat`
+ e2undo_offset_assert "test_e2undo_offset_0"
+}
+
+test_e2undo_offset_no_option
+test_e2undo_offset_no_option_remove_offset_header
+test_e2undo_offset_4096
+test_e2undo_offset_0
+
+if [ -e "$test_name.failed" ]; then
+ echo "$test_name: $test_description: failed"
+else
+ echo "$test_name: $test_description: ok"
+ touch "$test_name.ok"
+fi
diff --git a/tests/u_onefile_bad/script b/tests/u_onefile_bad/script
new file mode 100644
index 0000000..60c9a2e
--- /dev/null
+++ b/tests/u_onefile_bad/script
@@ -0,0 +1,115 @@
+test_description="check that we cant append a bad undo file"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+fail=0
+
+echo check that we cant append a bad undo file > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+CONF=$TMPFILE.conf
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode
+ blocksize = 4096
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo mke2fs -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE 524288 >> $OUT
+MKE2FS_CONFIG=$CONF $MKE2FS -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -gt 0 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have 64bit or metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using resize2fs to test e2undo >> $OUT
+$RESIZE2FS -z $TDB_FILE.1 -b $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after resize2fs $crc2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo corrupt $TDB_FILE.1 >> $OUT
+dd if=/dev/zero of=$TDB_FILE.1 bs=4096 count=1 skip=1 2> /dev/null
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc3 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -D -z $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc4=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc4 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back e2fsck/tune2fs/resize2fs >> $OUT
+$E2UNDO $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc1_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo e2fsck/tune2fs/resize2fs $crc1_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back mke2fs >> $OUT
+$E2UNDO $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc0_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo mke2fs $crc0_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+if [ $fail -eq 0 ] && [ $crc0 != $crc1 ] && [ $crc1 != $crc2 ] && [ $crc2 = $crc3 ] && [ $crc3 = $crc4 ] && [ $crc1_2 = $crc2 ] && [ $crc0_2 = $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE.0 $TDB_FILE.1 $TMPFILE $CONF
+fi
diff --git a/tests/u_resize2fs_opt/script b/tests/u_resize2fs_opt/script
new file mode 100644
index 0000000..fe1e04d
--- /dev/null
+++ b/tests/u_resize2fs_opt/script
@@ -0,0 +1,32 @@
+test_description="e2undo with resize2fs -z"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE 256 > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE 256 >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before resize2fs $crc0 >> $OUT
+
+echo using resize2fs to test e2undo >> $OUT
+$RESIZE2FS -z $TDB_FILE $TMPFILE 512 >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after resize2fs $crc1 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc0 = $crc2 ] && [ $crc1 != $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_revert_64bitmcsum_onefile/script b/tests/u_revert_64bitmcsum_onefile/script
new file mode 100644
index 0000000..6249ff2
--- /dev/null
+++ b/tests/u_revert_64bitmcsum_onefile/script
@@ -0,0 +1,112 @@
+test_description="convert fs to 64bit,mcsum and revert undo file"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+fail=0
+
+echo convert fs to 64bit,metadata_csum and revert both changes as one undo file > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+CONF=$TMPFILE.conf
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode
+ blocksize = 4096
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo mke2fs -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE 524288 >> $OUT
+MKE2FS_CONFIG=$CONF $MKE2FS -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -gt 0 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have 64bit or metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using resize2fs to test e2undo >> $OUT
+$RESIZE2FS -z $TDB_FILE.1 -b $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after resize2fs $crc2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc3 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -lt 1 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit and metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -D -z $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc4=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc4 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -lt 1 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit and metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back e2fsck/tune2fs/resize2fs >> $OUT
+$E2UNDO $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc1_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo e2fsck/tune2fs/resize2fs $crc1_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -gt 0 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have 64bit or metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back mke2fs >> $OUT
+$E2UNDO $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc0_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo mke2fs $crc0_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ -n "${features}" ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have any features set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 && fail=1
+
+if [ $fail -eq 0 ] && [ $crc0 = $crc0_2 ] && [ $crc1 = $crc1_2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE.0 $TDB_FILE.1 $TMPFILE $CONF
+fi
diff --git a/tests/u_revert_all_onefile/script b/tests/u_revert_all_onefile/script
new file mode 100644
index 0000000..6911ec6
--- /dev/null
+++ b/tests/u_revert_all_onefile/script
@@ -0,0 +1,100 @@
+test_description="convert 64bit,mcsum and revert undo file"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+fail=0
+
+echo convert fs to 64bit,metadata_csum and revert both changes as one undo file > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+CONF=$TMPFILE.conf
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode
+ blocksize = 4096
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo mke2fs -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE 524288 >> $OUT
+MKE2FS_CONFIG=$CONF $MKE2FS -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -gt 0 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have 64bit or metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using resize2fs to test e2undo >> $OUT
+$RESIZE2FS -z $TDB_FILE.0 -b $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after resize2fs $crc2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc3 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -lt 1 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit and metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -D -z $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc4=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc4 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -lt 1 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit and metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back e2fsck/tune2fs/resize2fs/mke2fs >> $OUT
+$E2UNDO $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc0_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo e2fsck/tune2fs/resize2fs/mke2fs $crc1_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ -n "${features}" ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have any features set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 && fail=1
+
+if [ $fail -eq 0 ] && [ $crc0 = $crc0_2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE.0 $TDB_FILE.1 $TMPFILE $CONF
+fi
diff --git a/tests/u_revert_upgrade_to_64bitmcsum/script b/tests/u_revert_upgrade_to_64bitmcsum/script
new file mode 100644
index 0000000..6599b05
--- /dev/null
+++ b/tests/u_revert_upgrade_to_64bitmcsum/script
@@ -0,0 +1,136 @@
+test_description="convert 64bit,mcsum and revert both"
+if test -x $RESIZE2FS_EXE -a -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/resize2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+fail=0
+
+echo convert fs to 64bit,metadata_csum and revert both changes > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before mke2fs $crc0 >> $OUT
+
+CONF=$TMPFILE.conf
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode
+ blocksize = 4096
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo mke2fs -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE 524288 >> $OUT
+MKE2FS_CONFIG=$CONF $MKE2FS -q -F -o Linux -T ext4h -O ^metadata_csum,^64bit -E lazy_itable_init=1 -b 4096 -z $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after mke2fs $crc1 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -gt 0 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have 64bit or metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using resize2fs to test e2undo >> $OUT
+$RESIZE2FS -z $TDB_FILE.1 -b $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after resize2fs $crc2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE.2 $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc3 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -lt 1 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit and metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -D -z $TDB_FILE.3 $TMPFILE >> $OUT 2>&1
+crc4=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc4 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -lt 1 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit and metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back e2fsck >> $OUT
+$E2UNDO $TDB_FILE.3 $TMPFILE >> $OUT 2>&1
+crc3_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo e2fsck $crc3_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -lt 1 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit and metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back tune2fs >> $OUT
+$E2UNDO $TDB_FILE.2 $TMPFILE >> $OUT 2>&1
+crc2_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo tune2fs $crc2_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -lt 1 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should have 64bit but not metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back resize2fs >> $OUT
+$E2UNDO $TDB_FILE.1 $TMPFILE >> $OUT 2>&1
+crc1_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo resize2fs $crc1_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ "$(echo "${features}" | grep "metadata_csum" -c)" -gt 0 ] || [ "$(echo "${features}" | grep 64bit -c)" -gt 0 ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have 64bit or metadata_csum set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 || fail=1
+
+echo roll back mke2fs >> $OUT
+$E2UNDO $TDB_FILE.0 $TMPFILE >> $OUT 2>&1
+crc0_2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo mke2fs $crc0_2 >> $OUT
+features="$($DUMPE2FS -h $TMPFILE 2> /dev/null | grep 'Filesystem features:')"
+if [ -n "${features}" ]; then
+ echo "FS features: ${features}" >> $OUT
+ echo "Should not have any features set" >> $OUT
+ fail=1
+fi
+$FSCK -f -n $TMPFILE >> $OUT 2>&1 && fail=1
+
+if [ $fail -eq 0 ] && [ $crc0 = $crc0_2 ] && [ $crc1 = $crc1_2 ] && [ $crc2 = $crc2_2 ] && [ $crc3 = $crc3_2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE.0 $TDB_FILE.1 $TDB_FILE.2 $TDB_FILE.3 $TMPFILE $CONF
+fi
diff --git a/tests/u_tune2fs/script b/tests/u_tune2fs/script
new file mode 100644
index 0000000..aa5f379
--- /dev/null
+++ b/tests/u_tune2fs/script
@@ -0,0 +1,34 @@
+test_description="e2undo with tune2fs"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=${TMPDIR:-/tmp}
+export E2FSPROGS_UNDO_DIR
+TDB_FILE=$E2FSPROGS_UNDO_DIR/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+crc=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -I 256 $TMPFILE >> $OUT 2>&1
+new_crc=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $new_crc >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+new_crc=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $new_crc >> $OUT
+
+if [ $crc = $new_crc ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_tune2fs_opt/script b/tests/u_tune2fs_opt/script
new file mode 100644
index 0000000..c4810b9
--- /dev/null
+++ b/tests/u_tune2fs_opt/script
@@ -0,0 +1,32 @@
+test_description="e2undo with tune2fs -z"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+if [ $crc0 = $crc2 ] && [ $crc1 != $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/tests/u_undo_undo/script b/tests/u_undo_undo/script
new file mode 100644
index 0000000..726a453
--- /dev/null
+++ b/tests/u_undo_undo/script
@@ -0,0 +1,54 @@
+test_description="undo e2undo"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/e2fsck-$(basename $TMPFILE).e2undo
+TDB_FILE2=${TMPDIR:-/tmp}/e2undo-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE $TDB_FILE2 >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before e2fsck $crc0 >> $OUT
+
+echo using e2fsck to test e2undo >> $OUT
+$FSCK -f -y -D -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2fsck $crc1 >> $OUT
+
+echo e2undo the e2fsck >> $OUT
+$E2UNDO -z $TDB_FILE2 $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc2 >> $OUT
+
+echo e2undo the e2undo >> $OUT
+$E2UNDO $TDB_FILE2 $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc3 >> $OUT
+
+echo e2undo the e2undo the e2undo >> $OUT
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc4=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc4 >> $OUT
+
+$E2UNDO -h $TDB_FILE $TMPFILE >> $OUT 2>&1
+$E2UNDO -h $TDB_FILE2 $TMPFILE >> $OUT 2>&1
+
+$E2UNDO -z $TDB_FILE2 $TDB_FILE2 $TMPFILE >> $OUT 2>&1
+
+crc5=`$CRCSUM $TMPFILE`
+echo $CRCSUM after failed e2undo $crc5 >> $OUT
+
+echo $crc0 $crc1 $crc2 $crc3 $crc4 $crc5 >> $OUT
+
+if [ $crc0 = $crc2 ] && [ $crc2 = $crc4 ] && [ $crc5 = $crc4 ] && [ $crc1 = $crc3 ] && [ $crc1 != $crc2 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TDB_FILE2 $TMPFILE
+fi
diff --git a/tests/u_wrong_fs/script b/tests/u_wrong_fs/script
new file mode 100644
index 0000000..dbf0d6b
--- /dev/null
+++ b/tests/u_wrong_fs/script
@@ -0,0 +1,36 @@
+test_description="e2undo on the wrong fs"
+if test -x $E2UNDO_EXE; then
+
+TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE > $OUT
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc0=`$CRCSUM $TMPFILE`
+echo $CRCSUM before tune2fs $crc0 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -O metadata_csum -z $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc1=`$CRCSUM $TMPFILE`
+echo $CRCSUM after tune2fs $crc1 >> $OUT
+
+$MKE2FS -q -F -o Linux -T ext4 -O ^metadata_csum,64bit -E lazy_itable_init=1 -b 1024 $TMPFILE >> $OUT 2>&1
+crc2=`$CRCSUM $TMPFILE`
+echo $CRCSUM after re-mke2fs $crc2 >> $OUT
+
+$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1
+crc3=`$CRCSUM $TMPFILE`
+echo $CRCSUM after e2undo $crc3 >> $OUT
+
+if [ $crc3 = $crc2 ] && [ $crc2 != $crc1 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ ln -f $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+fi
+rm -f $TDB_FILE $TMPFILE
+fi
diff --git a/util/Makefile.in b/util/Makefile.in
new file mode 100644
index 0000000..7ad18c0
--- /dev/null
+++ b/util/Makefile.in
@@ -0,0 +1,74 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = util
+INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
+
+SRCS = $(srcdir)/subst.c $(srcdir)/mkutf8data.c
+
+@MCONFIG@
+
+.c.o:
+ $(E) " CC $<"
+ $(Q) $(BUILD_CC) -c $(BUILD_CFLAGS) $< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+
+PROGS= subst symlinks mkutf8data
+
+all:: $(PROGS) gen-tarball
+
+dirpaths.h:
+ $(E) " CREATE dirpaths.h"
+ $(Q) echo "/* fake dirpaths.h for config.h */" > dirpaths.h
+
+subst.o: dirpaths.h
+
+subst: subst.o
+ $(E) " LD $@"
+ $(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o subst subst.o
+
+mkutf8data: mkutf8data.o
+ $(E) " LD $@"
+ $(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o mkutf8data mkutf8data.o
+
+copy_sparse: copy_sparse.o
+ $(E) " LD $@"
+ $(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o copy_sparse copy_sparse.o
+
+symlinks: symlinks.o
+ $(E) " LD $@"
+ $(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o symlinks symlinks.o
+
+gen-tarball: $(srcdir)/gen-tarball.in $(top_builddir)/config.status
+ $(E) " CONFIG.STATUS $@"
+ $(Q) cd $(top_builddir); CONFIG_FILES=util/gen-tarball ./config.status
+ $(Q) chmod +x gen-tarball
+
+tarballs: gen-tarball
+ sh gen-tarball debian
+ sh gen-tarball all
+ sh gen-tarball subset
+
+clean::
+ $(RM) -f $(PROGS) \#* *.s *.o *.a *~ core *.tar.gz gen-tarball \
+ copy-sparse dirpaths.h install-symlink mkutf8data
+
+mostlyclean: clean
+
+distclean: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+subst.o: $(srcdir)/subst.c $(top_builddir)/lib/config.h dirpaths.h
+mkutf8data.o: $(srcdir)/mkutf8data.c
diff --git a/util/all.exclude b/util/all.exclude
new file mode 100644
index 0000000..d7d03b2
--- /dev/null
+++ b/util/all.exclude
@@ -0,0 +1,15 @@
+.git
+.hg
+.hgignore
+.pc
+patches
+README.subset
+build
+build[^/]*
+rpm.log
+TODO
+powerquest
+.exclude-file
+po/stamp-cat-id
+po/cat-id-tbl.c
+Meta
diff --git a/util/android-README.version.in b/util/android-README.version.in
new file mode 100644
index 0000000..c8a3217
--- /dev/null
+++ b/util/android-README.version.in
@@ -0,0 +1,3 @@
+URL: https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v@VER@/e2fsprogs-@FN@.tar.gz
+Version: @FN@
+BugComponent: 95221
diff --git a/util/android_config.h b/util/android_config.h
new file mode 100644
index 0000000..90b8f8a
--- /dev/null
+++ b/util/android_config.h
@@ -0,0 +1,69 @@
+#ifndef __APPLE__
+#define HAVE_MALLOC_H 1
+#endif
+
+#define ROOT_SYSCONFDIR "/etc"
+
+#define ENABLE_LIBSPARSE 1
+
+#define DISABLE_BACKTRACE 1
+#define HAVE_DIRENT_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_GETOPT_H 1
+#define HAVE_GETPWUID_R 1
+#define HAVE_INTPTR_T 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_MMAP 1
+#define HAVE_SETJMP_H 1
+#define HAVE_SNPRINTF 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRCASECMP 1
+#define HAVE_STRDUP 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRNLEN 1
+#define HAVE_STRPTIME 1
+#define HAVE_SYSCONF 1
+#define HAVE_TYPE_SSIZE_T 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UTIME_H 1
+
+#define HAVE_SYS_STAT_H 1
+#if !defined(__APPLE__)
+# define HAVE_SYS_SYSMACROS_H 1
+#endif
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+
+#if defined(_WIN32)
+# define HAVE_LINUX_TYPES_H 1
+#endif
+#if defined(__APPLE__) || defined(__linux__)
+# define HAVE_FCNTL 1
+# define HAVE_FSYNC 1
+# define HAVE_GETPAGESIZE 1
+# define HAVE_NET_IF_H 1
+# define HAVE_NETINET_IN_H 1
+# define HAVE_PREAD 1
+# define HAVE_PWRITE 1
+# define HAVE_POSIX_MEMALIGN 1
+# define HAVE_SYS_IOCTL_H 1
+# define HAVE_SYS_MMAN_H 1
+# define HAVE_SYS_MOUNT_H 1
+# define HAVE_SYS_PARAM_H 1
+# define HAVE_SYS_RESOURCE_H 1
+# define HAVE_SYS_SELECT_H 1
+# define HAVE_SYS_WAIT_H 1
+#endif
+#if defined(__linux__)
+# define HAVE_EXT2_IOCTLS 1
+# define HAVE_FALLOCATE 1
+# define HAVE_LINUX_FD_H 1
+# define HAVE_LINUX_TYPES_H 1
+# define HAVE_LSEEK64 1
+# define HAVE_LSEEK64_PROTOTYPE 1
+# define HAVE_MNTENT_H 1
+# define HAVE_PREAD64 1
+# define HAVE_PWRITE64 1
+# define HAVE_SETMNTENT 1
+# define HAVE_SYS_PRCTL_H 1
+#endif
diff --git a/util/android_types.h b/util/android_types.h
new file mode 100644
index 0000000..5f05903
--- /dev/null
+++ b/util/android_types.h
@@ -0,0 +1,45 @@
+/*
+ * If linux/types.h is already been included, assume it has defined
+ * everything we need. (cross fingers) Other header files may have
+ * also defined the types that we need.
+ */
+#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
+ !defined(_EXT2_TYPES_H) && !defined(_UUID_TYPES_H))
+#define _LINUX_TYPES_H
+
+typedef unsigned char __u8;
+typedef __signed__ char __s8;
+typedef unsigned short __u16;
+typedef __signed__ short __s16;
+typedef unsigned int __u32;
+typedef __signed__ int __s32;
+typedef unsigned long long __u64;
+typedef __signed__ long long __s64;
+#endif
+
+#include <stdint.h> //uintptr_t
+
+/* endian checking stuff */
+#ifndef EXT2_ENDIAN_H_
+#define EXT2_ENDIAN_H_
+
+#ifdef __CHECKER__
+#ifndef __bitwise
+#define __bitwise __attribute__((bitwise))
+#endif
+#define __force __attribute__((force))
+#else
+#ifndef __bitwise
+#define __bitwise
+#endif
+#define __force
+#endif
+
+typedef __u16 __bitwise __le16;
+typedef __u32 __bitwise __le32;
+typedef __u64 __bitwise __le64;
+typedef __u16 __bitwise __be16;
+typedef __u32 __bitwise __be32;
+typedef __u64 __bitwise __be64;
+
+#endif /* EXT2_ENDIAN_H_ */
diff --git a/util/copy_sparse.c b/util/copy_sparse.c
new file mode 100644
index 0000000..cbab273
--- /dev/null
+++ b/util/copy_sparse.c
@@ -0,0 +1,228 @@
+/*
+ * copy_sparse.c -- copy a very large sparse files efficiently
+ * (requires root privileges)
+ *
+ * Copyright 2003, 2004 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef __linux__
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(void) {
+ fputs("This program is only supported on Linux!\n", stderr);
+ exit(EXIT_FAILURE);
+}
+#else
+#define _LARGEFILE64_SOURCE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <time.h>
+#include <fcntl.h>
+#include <errno.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/vfs.h>
+#include <sys/ioctl.h>
+#include <linux/fd.h>
+
+int verbose = 0;
+
+#define FIBMAP _IO(0x00,1) /* bmap access */
+#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */
+
+static unsigned long get_bmap(int fd, unsigned long block)
+{
+ int ret;
+ unsigned long b;
+
+ b = block;
+ ret = ioctl(fd, FIBMAP, &b);
+ if (ret < 0) {
+ if (errno == EPERM) {
+ fprintf(stderr, "No permission to use FIBMAP ioctl; must have root privileges\n");
+ exit(1);
+ }
+ perror("FIBMAP");
+ }
+ return b;
+}
+
+static int full_read(int fd, char *buf, size_t count)
+{
+ int got, total = 0;
+ int pass = 0;
+
+ while (count > 0) {
+ got = read(fd, buf, count);
+ if (got == -1) {
+ if ((errno == EINTR) || (errno == EAGAIN))
+ continue;
+ return total ? total : -1;
+ }
+ if (got == 0) {
+ if (pass++ >= 3)
+ return total;
+ continue;
+ }
+ pass = 0;
+ buf += got;
+ total += got;
+ count -= got;
+ }
+ return total;
+}
+
+static void copy_sparse_file(const char *src, const char *dest)
+{
+ struct stat64 fileinfo;
+ long lb, i, fd, ofd, bs, block, numblocks;
+ ssize_t got, got2;
+ off64_t offset = 0, should_be;
+ char *buf;
+
+ if (verbose)
+ printf("Copying sparse file from %s to %s\n", src, dest);
+
+ if (strcmp(src, "-")) {
+ if (stat64(src, &fileinfo) < 0) {
+ perror("stat");
+ exit(1);
+ }
+ if (!S_ISREG(fileinfo.st_mode)) {
+ printf("%s: Not a regular file\n", src);
+ exit(1);
+ }
+ fd = open(src, O_RDONLY | O_LARGEFILE);
+ if (fd < 0) {
+ perror("open");
+ exit(1);
+ }
+ if (ioctl(fd, FIGETBSZ, &bs) < 0) {
+ perror("FIGETBSZ");
+ close(fd);
+ exit(1);
+ }
+ if (bs < 0) {
+ printf("%s: Invalid block size: %ld\n", src, bs);
+ exit(1);
+ }
+ if (verbose)
+ printf("Blocksize of file %s is %ld\n", src, bs);
+ numblocks = (fileinfo.st_size + (bs-1)) / bs;
+ if (verbose)
+ printf("File size of %s is %lld (%ld blocks)\n", src,
+ (long long) fileinfo.st_size, numblocks);
+ } else {
+ fd = 0;
+ bs = 1024;
+ }
+
+ ofd = open(dest, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0777);
+ if (ofd < 0) {
+ perror(dest);
+ exit(1);
+ }
+
+ buf = malloc(bs);
+ if (!buf) {
+ fprintf(stderr, "Couldn't allocate buffer");
+ exit(1);
+ }
+
+ for (lb = 0; !fd || lb < numblocks; lb++) {
+ if (fd) {
+ block = get_bmap(fd, lb);
+ if (!block)
+ continue;
+ should_be = ((off64_t) lb) * bs;
+ if (offset != should_be) {
+ if (verbose)
+ printf("Seeking to %lld\n", should_be);
+ if (lseek64(fd, should_be, SEEK_SET) == (off_t) -1) {
+ perror("lseek src");
+ exit(1);
+ }
+ if (lseek64(ofd, should_be, SEEK_SET) == (off_t) -1) {
+ perror("lseek dest");
+ exit(1);
+ }
+ offset = should_be;
+ }
+ }
+ got = full_read(fd, buf, bs);
+
+ if (fd == 0 && got == 0)
+ break;
+
+ if (got == bs) {
+ for (i=0; i < bs; i++)
+ if (buf[i])
+ break;
+ if (i == bs) {
+ lseek(ofd, bs, SEEK_CUR);
+ offset += bs;
+ continue;
+ }
+ }
+ got2 = write(ofd, buf, got);
+ if (got != got2) {
+ printf("short write\n");
+ exit(1);
+ }
+ offset += got;
+ }
+ offset = fileinfo.st_size;
+ if (fstat64(ofd, &fileinfo) < 0) {
+ perror("fstat");
+ exit(1);
+ }
+ if (fileinfo.st_size != offset) {
+ lseek64(ofd, offset-1, SEEK_CUR);
+ buf[0] = 0;
+ write(ofd, buf, 1);
+ }
+ close(fd);
+ close(ofd);
+}
+
+static void usage(const char *progname)
+{
+ fprintf(stderr, "Usage: %s [-v] source_file destination_file\n", progname);
+ exit(1);
+}
+
+int main(int argc, char**argv)
+{
+ int c;
+
+ while ((c = getopt(argc, argv, "v")) != EOF)
+ switch (c) {
+ case 'v':
+ verbose++;
+ break;
+ default:
+ usage(argv[0]);
+ break;
+ }
+ if (optind+2 != argc)
+ usage(argv[0]);
+ copy_sparse_file(argv[optind], argv[optind+1]);
+
+ return 0;
+}
+#endif
diff --git a/util/gen-android-files b/util/gen-android-files
new file mode 100755
index 0000000..cab4e8d
--- /dev/null
+++ b/util/gen-android-files
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+ANDROID_GENERATED_FILES="lib/ext2fs/ext2_err.c lib/ext2fs/ext2_err.h \
+ lib/ss/ss_err.c lib/ss/ss_err.h lib/support/prof_err.c \
+ lib/support/prof_err.h \
+ lib/blkid/blkid_types.h lib/uuid/uuid_types.h \
+ lib/ext2fs/ext2_types.h lib/config.h lib/blkid/blkid.h \
+ lib/uuid/uuid.h lib/ext2fs/crc32c_table.h misc/default_profile.c \
+ lib/ss/std_rqs.c debugfs/debug_cmds.c debugfs/ro_debug_cmds.c \
+ debugfs/extent_cmds.c debugfs/e2freefrag.c \
+ debugfs/recovery.c debugfs/revoke.c \
+ MODULE_LICENSE_GPL README.version"
+
+SS_DIR=$(pwd)/lib/ss
+MK_CMDS=/tmp/mk_cmds$$.sh
+
+sed -e "s/@AWK@/awk/" < $SS_DIR/mk_cmds.sh.in \
+ | sed -e "s/@SED@/sed/" > $MK_CMDS
+
+sed -e "s/@E2FSPROGS_VERSION@/$(git describe)/" < lib/ext2fs/ext2_err.et.in > lib/ext2fs/ext2_err.et
+
+for i in lib/ss/ss_err lib/support/prof_err lib/ext2fs/ext2_err
+do
+ rm -f $i.c $i.h
+ awk -f lib/et/et_c.awk outfile=$i.c outfn=$(basename $i.c) $i.et
+ awk -f lib/et/et_h.awk outfile=$i.h outfn=$(basename $i.h) $i.et
+done
+
+for i in lib/ss/std_rqs debugfs/debug_cmds debugfs/ro_debug_cmds \
+ debugfs/extent_cmds
+do
+ _SS_DIR_OVERRIDE=lib/ss /bin/sh $MK_CMDS $i.ct
+ mv -f $(basename $i).c $i.c
+done
+
+rm -f $MK_CMDS
+
+cp lib/blkid/blkid.h.in lib/blkid/blkid.h
+cp lib/uuid/uuid.h.in lib/uuid/uuid.h
+
+cp util/android_types.h lib/ext2fs/ext2_types.h
+cp util/android_types.h lib/blkid/blkid_types.h
+cp util/android_types.h lib/uuid/uuid_types.h
+# Copied header files having exactly same content results in debug output
+# differences on RBE. Hence modify the #define's appropriately.
+sed -i 's/#define _LINUX_TYPES_H/#define _BLKID_TYPES_H/g' lib/blkid/blkid_types.h
+sed -i 's/#define _LINUX_TYPES_H/#define _EXT2_TYPES_H/g' lib/ext2fs/ext2_types.h
+sed -i 's/#define _LINUX_TYPES_H/#define _UUID_TYPES_H/g' lib/uuid/uuid_types.h
+
+cp util/android_config.h lib/config.h
+cp misc/e2freefrag.c debugfs/
+cp e2fsck/recovery.c e2fsck/revoke.c debugfs/
+
+gcc -o gen_crc32ctable lib/ext2fs/gen_crc32ctable.c
+./gen_crc32ctable > lib/ext2fs/crc32c_table.h
+
+awk -f misc/profile-to-c.awk < misc/mke2fs.conf.in > misc/default_profile.c
+
+rm -f ./gen_crc32table ./gen_crc32ctable lib/ext2fs/ext2_err.et
+
+touch MODULE_LICENSE_GPL
+
+E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION version.h \
+ | awk '{print $3}' | tr \" " " | awk '{print $1}'`
+DATE=`grep E2FSPROGS_DATE version.h | awk '{print $3}' \
+ | tr \" " "`
+E2FSPROGS_DAY=$(echo $DATE | awk -F- '{print $1}' | sed -e '/^[1-9]$/s/^/0/')
+MONTH=`echo $DATE | awk -F- '{print $2}'`
+YEAR=`echo $DATE | awk -F- '{print $3}'`
+
+if expr $YEAR ">" 1900 > /dev/null ; then
+ E2FSPROGS_YEAR=$YEAR
+elif expr $YEAR ">" 90 >/dev/null ; then
+ E2FSPROGS_YEAR=19$YEAR
+else
+ E2FSPROGS_YEAR=20$YEAR
+fi
+
+case $MONTH in
+Jan) MONTH_NUM=01; E2FSPROGS_MONTH="January" ;;
+Feb) MONTH_NUM=02; E2FSPROGS_MONTH="February" ;;
+Mar) MONTH_NUM=03; E2FSPROGS_MONTH="March" ;;
+Apr) MONTH_NUM=04; E2FSPROGS_MONTH="April" ;;
+May) MONTH_NUM=05; E2FSPROGS_MONTH="May" ;;
+Jun) MONTH_NUM=06; E2FSPROGS_MONTH="June" ;;
+Jul) MONTH_NUM=07; E2FSPROGS_MONTH="July" ;;
+Aug) MONTH_NUM=08; E2FSPROGS_MONTH="August" ;;
+Sep) MONTH_NUM=09; E2FSPROGS_MONTH="September" ;;
+Oct) MONTH_NUM=10; E2FSPROGS_MONTH="October" ;;
+Nov) MONTH_NUM=11; E2FSPROGS_MONTH="November" ;;
+Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;;
+*) MONTH_NUM=13; E2FSPROGS_MONTH="UNKNOWN" ;;
+esac
+
+base_ver=`echo $E2FSPROGS_VERSION | \
+ sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+
+date_spec=${E2FSPROGS_YEAR}${MONTH_NUM}${E2FSPROGS_DAY}
+
+case $E2FSPROGS_VERSION in
+*-WIP|pre-*)
+ VER="$base_ver-WIP-$date_spec"
+ FN="$base_ver~WIP.$E2FSPROGS_YEAR.$MONTH_NUM.$E2FSPROGS_DAY"
+ ;;
+*)
+ VER="$base_ver"
+ FN="$base_ver"
+ ;;
+esac
+
+sed -e "s/@VER@/$VER/g" -e "s/@FN@/$FN/" < util/android-README.version.in > README.version
+
+git add -f $ANDROID_GENERATED_FILES
+if test -f COPYING
+then
+ git mv COPYING NOTICE
+fi
+git commit -m "Update generated files for Android"
diff --git a/util/gen-git-tarball b/util/gen-git-tarball
new file mode 100755
index 0000000..a959c4a
--- /dev/null
+++ b/util/gen-git-tarball
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Generate the e2fsprogs release tar ball
+#
+
+commit=HEAD
+
+if test -n "$1" ; then
+ commit="$1"
+fi
+
+ver=`git show ${commit}:version.h | grep E2FSPROGS_VERSION \
+ | awk '{print $3}' | tr \" " " | awk '{print $1}'`
+fn=e2fsprogs-${ver}.tar.gz
+
+git archive --prefix=e2fsprogs-${ver}/ ${commit} | gzip -9n > $fn
+echo "Generated $fn"
diff --git a/util/gen-sample-fs b/util/gen-sample-fs
new file mode 100755
index 0000000..8e13916
--- /dev/null
+++ b/util/gen-sample-fs
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+MNT=/mnt
+FS=/tmp/foo.img
+
+cp /dev/null $FS
+mke2fs -q -t ext4 -O inline_data,^has_journal -I 256 -b 4096 -N 64 $FS 256
+mount -t ext4 $FS $MNT
+ln -s symlink_data $MNT/symlink
+for i in 30 70 500 1023 1024; 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 -q -s foo -V bar $MNT/xattr
+echo -e "one\n\ttwo" | attr -q -s quux $MNT/xattr
+echo -e "abc\001\002\003" | attr -q -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
+mkdir $MNT/sdir
+touch $MNT/sdir/1
+touch $MNT/sdir/2
+touch $MNT/sdir/3
+touch $MNT/sdir/4
+mkdir $MNT/mdir
+touch $MNT/mdir/1
+touch $MNT/mdir/2
+touch $MNT/mdir/3
+touch $MNT/mdir/4
+touch $MNT/mdir/5
+umount $MNT
+e2fsck -fp $FS
diff --git a/util/gen-tarball.in b/util/gen-tarball.in
new file mode 100644
index 0000000..997bd93
--- /dev/null
+++ b/util/gen-tarball.in
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# This script is used to generate the distribution tarball
+#
+srcdir=@srcdir@
+top_srcdir=@top_srcdir@
+top_dir=`cd $top_srcdir; pwd`
+base_ver=`echo @E2FSPROGS_VERSION@ | sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+base_e2fsprogs=`basename $top_dir`
+exclude=/tmp/exclude$$
+GZIP=gzip
+
+#
+# This hack is needed because texi2dvi blows up horribly if there are
+# any '~' characters in the directory pathname. So we kludge around it by
+# using a non-standard directory name for WIP releases. dpkg-source
+# complains, but life goes on.
+#
+deb_pkgver=`echo @E2FSPROGS_PKGVER@ | sed -e 's/~/-/g'`
+
+case $1 in
+ debian|ubuntu)
+ SRCROOT="e2fsprogs-$deb_pkgver"
+ tarout="e2fsprogs_@E2FSPROGS_PKGVER@.orig.tar.gz"
+ ;;
+ all|*)
+ SRCROOT="e2fsprogs-$base_ver"
+ tarout="$SRCROOT.tar.gz"
+ ;;
+esac
+
+if test -z "$SOURCE_DATE_EPOCH" ; then
+ export SOURCE_DATE_EPOCH=$(cd $top_srcdir; git log -1 --pretty=%ct)
+fi
+
+(cd $top_srcdir/.. ; find $base_e2fsprogs \( -name \*~ -o -name \*.orig \
+ -o -name CVS -o -name \*.rej -o -name Makefile.pq \
+ -o -name TAGS -o -name \*.old -o -name SCCS \
+ -o -name changed-files -o -name .#\* -o -name \*.tar.gz \
+ -o -name autom4te.cache \) \
+ -print) > $exclude
+sed -e "s;^;$base_e2fsprogs/;" < $srcdir/all.exclude >> $exclude
+
+(cd $top_srcdir/.. ; \
+ tar -c -f - -X $exclude --sort=name --owner=0 --group=0 \
+ --transform "flags=r;s|^$base_e2fsprogs|$SRCROOT|" \
+ --numeric-owner --mtime="@${SOURCE_DATE_EPOCH}" $base_e2fsprogs) \
+ | $GZIP -9n -c > $tarout
+$GZIP -ln $tarout
+rm -f "$exclude"
diff --git a/util/get-ver b/util/get-ver
new file mode 100755
index 0000000..ade7d22
--- /dev/null
+++ b/util/get-ver
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+ver=$(git describe --always --dirty); echo "e2fsprogs $ver ($(git log -1 --pretty=%cD))"
+
diff --git a/util/install-symlink.in b/util/install-symlink.in
new file mode 100644
index 0000000..24341b8
--- /dev/null
+++ b/util/install-symlink.in
@@ -0,0 +1,89 @@
+#!/bin/sh
+#
+# install-symlink source destination destdir
+#
+
+SYMLINKS=symlinks
+LN_S="@LN_S@"
+RM="@RM@"
+FORCE_RELATIVE=NO
+FORCE_ABSOLUTE=NO
+
+while echo $1 | grep -q -- ^- ;
+do
+ case $1 in
+ --relative)
+ FORCE_RELATIVE=YES
+ ;;
+ --absolute)
+ FORCE_ABSOLUTE=YES
+ ;;
+ --debian)
+ FORCE_ABSOLUTE=NO
+ FORCE_RELATIVE=NO
+ ;;
+ --symlinks=*)
+ SYMLINKS=$(echo $1 | sed -e 's/--symlinks=//')
+ ;;
+ *)
+ echo "Unknown option $1"
+ exit 1
+ ;;
+ esac
+ shift;
+done
+
+
+FIX_SYMLINK="$SYMLINKS -c"
+
+SRC="$1"
+DEST="$2"
+DESTDIR="$3"
+
+if ! echo $SRC | grep -q ^/ ; then
+ echo $SRC: Source pathname must be absolute
+ exit 1
+fi
+
+if ! echo $DEST | grep -q ^/ ; then
+ echo $DEST: Destination pathname must be absolute
+ exit 1
+fi
+
+if ! test -e "$DESTDIR$SRC" ; then
+ echo $DESTDIR$SRC: file or directory does not exist
+ exit 1
+fi
+
+$RM -f "$DESTDIR$DEST"
+
+if test "$LN_S" != "ln -s" ; then
+ $LN_S "$DESTDIR$SRC" "$DESTDIR$DEST"
+ exit 0
+fi
+
+if test $(dirname "$SRC") = $(dirname "$DEST") ; then
+ $LN_S "$(basename "$SRC")" "$DESTDIR$DEST"
+ exit 0
+fi
+
+TOP_SRC=$(echo $SRC | awk -F/ '{print $2}')
+TOP_DEST=$(echo $DEST | awk -F/ '{print $2}')
+
+if test $FORCE_RELATIVE = YES ; then
+ TOP_SRC=FORCE
+ TOP_DEST=FORCE
+fi
+
+if test $FORCE_ABSOLUTE = YES ; then
+ TOP_SRC=FORCE
+ TOP_DEST=FORCE_ABSOLUTE
+fi
+
+if test $TOP_SRC != $TOP_DEST ; then
+ $LN_S "$SRC" "$DESTDIR$DEST"
+else
+ $LN_S "$DESTDIR$SRC" "$DESTDIR$DEST"
+ $FIX_SYMLINK "$DESTDIR$DEST"
+fi
+
diff --git a/util/libecho.c b/util/libecho.c
new file mode 100644
index 0000000..352ce1e
--- /dev/null
+++ b/util/libecho.c
@@ -0,0 +1,78 @@
+/*
+ * libecho.c
+ *
+ * For each argument on the command line, echo it. Should expand
+ * DOS wildcards correctly.
+ *
+ * Syntax: libecho [-p prefix] list...
+ */
+#include <stdio.h>
+#include <io.h>
+#include <string.h>
+
+void echo_files(char *, char *);
+
+int
+main(int argc, char *argv[])
+{
+ int i;
+ char *prefix;
+
+ prefix = "";
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: libecho [-p prefix] list...\n");
+ return 1;
+ }
+
+ for (i = 1 ; i < argc ; i++)
+ if (!stricmp(argv[i], "-p"))
+ prefix = argv[++i];
+ else
+ echo_files(prefix, argv[i]);
+
+ return 0;
+}
+
+void
+echo_files(char *prefix, char *f)
+{
+ long ff;
+ struct _finddata_t fdt;
+ char *slash;
+ char filepath[256];
+
+ /*
+ * We're unix based quite a bit here. Look for normal slashes and
+ * make them reverse slashes.
+ */
+ while((slash = strrchr(f, '/')) != NULL)
+ *slash = '\\';
+
+ strcpy(filepath, f);
+
+ slash = strrchr(filepath, '\\');
+
+ if (slash) {
+ slash++;
+ *slash = 0;
+ } else {
+ filepath[0] = '\0';
+ }
+
+ ff = _findfirst(f, &fdt);
+
+ if (ff < 0) {
+ printf("%s%s\n", prefix, f);
+ return;
+ }
+
+ printf("%s%s%s\n", prefix, filepath, fdt.name);
+
+ for (;;) {
+ if (_findnext(ff, &fdt) < 0)
+ break;
+ printf("%s%s%s\n", prefix, filepath, fdt.name);
+ }
+ _findclose(ff);
+}
diff --git a/util/mkutf8data.c b/util/mkutf8data.c
new file mode 100644
index 0000000..2af25ac
--- /dev/null
+++ b/util/mkutf8data.c
@@ -0,0 +1,3392 @@
+/*
+ * Copyright (c) 2014 SGI.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Generator for a compact trie for unicode normalization */
+
+#include <sys/types.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+/* Default names of the in- and output files. */
+
+#define AGE_NAME "DerivedAge.txt"
+#define CCC_NAME "DerivedCombiningClass.txt"
+#define PROP_NAME "DerivedCoreProperties.txt"
+#define DATA_NAME "UnicodeData.txt"
+#define FOLD_NAME "CaseFolding.txt"
+#define NORM_NAME "NormalizationCorrections.txt"
+#define TEST_NAME "NormalizationTest.txt"
+#define UTF8_NAME "utf8data.h"
+
+const char *age_name = AGE_NAME;
+const char *ccc_name = CCC_NAME;
+const char *prop_name = PROP_NAME;
+const char *data_name = DATA_NAME;
+const char *fold_name = FOLD_NAME;
+const char *norm_name = NORM_NAME;
+const char *test_name = TEST_NAME;
+const char *utf8_name = UTF8_NAME;
+
+int verbose = 0;
+
+/* An arbitrary line size limit on input lines. */
+
+#define LINESIZE 1024
+char line[LINESIZE];
+char buf0[LINESIZE];
+char buf1[LINESIZE];
+char buf2[LINESIZE];
+char buf3[LINESIZE];
+
+const char *argv0;
+
+/* ------------------------------------------------------------------ */
+
+/*
+ * Unicode version numbers consist of three parts: major, minor, and a
+ * revision. These numbers are packed into an unsigned int to obtain
+ * a single version number.
+ *
+ * To save space in the generated trie, the unicode version is not
+ * stored directly, instead we calculate a generation number from the
+ * unicode versions seen in the DerivedAge file, and use that as an
+ * index into a table of unicode versions.
+ */
+#define UNICODE_MAJ_SHIFT (16)
+#define UNICODE_MIN_SHIFT (8)
+
+#define UNICODE_MAJ_MAX ((unsigned short)-1)
+#define UNICODE_MIN_MAX ((unsigned char)-1)
+#define UNICODE_REV_MAX ((unsigned char)-1)
+
+#define UNICODE_AGE(MAJ,MIN,REV) \
+ (((unsigned int)(MAJ) << UNICODE_MAJ_SHIFT) | \
+ ((unsigned int)(MIN) << UNICODE_MIN_SHIFT) | \
+ ((unsigned int)(REV)))
+
+unsigned int *ages;
+int ages_count;
+
+unsigned int unicode_maxage;
+
+static int age_valid(unsigned int major, unsigned int minor,
+ unsigned int revision)
+{
+ if (major > UNICODE_MAJ_MAX)
+ return 0;
+ if (minor > UNICODE_MIN_MAX)
+ return 0;
+ if (revision > UNICODE_REV_MAX)
+ return 0;
+ return 1;
+}
+
+/* ------------------------------------------------------------------ */
+
+/*
+ * utf8trie_t
+ *
+ * A compact binary tree, used to decode UTF-8 characters.
+ *
+ * Internal nodes are one byte for the node itself, and up to three
+ * bytes for an offset into the tree. The first byte contains the
+ * following information:
+ * NEXTBYTE - flag - advance to next byte if set
+ * BITNUM - 3 bit field - the bit number to tested
+ * OFFLEN - 2 bit field - number of bytes in the offset
+ * if offlen == 0 (non-branching node)
+ * RIGHTPATH - 1 bit field - set if the following node is for the
+ * right-hand path (tested bit is set)
+ * TRIENODE - 1 bit field - set if the following node is an internal
+ * node, otherwise it is a leaf node
+ * if offlen != 0 (branching node)
+ * LEFTNODE - 1 bit field - set if the left-hand node is internal
+ * RIGHTNODE - 1 bit field - set if the right-hand node is internal
+ *
+ * Due to the way utf8 works, there cannot be branching nodes with
+ * NEXTBYTE set, and moreover those nodes always have a righthand
+ * descendant.
+ */
+typedef unsigned char utf8trie_t;
+#define BITNUM 0x07
+#define NEXTBYTE 0x08
+#define OFFLEN 0x30
+#define OFFLEN_SHIFT 4
+#define RIGHTPATH 0x40
+#define TRIENODE 0x80
+#define RIGHTNODE 0x40
+#define LEFTNODE 0x80
+
+/*
+ * utf8leaf_t
+ *
+ * The leaves of the trie are embedded in the trie, and so the same
+ * underlying datatype, unsigned char.
+ *
+ * leaf[0]: The unicode version, stored as a generation number that is
+ * an index into utf8agetab[]. With this we can filter code
+ * points based on the unicode version in which they were
+ * defined. The CCC of a non-defined code point is 0.
+ * leaf[1]: Canonical Combining Class. During normalization, we need
+ * to do a stable sort into ascending order of all characters
+ * with a non-zero CCC that occur between two characters with
+ * a CCC of 0, or at the begin or end of a string.
+ * The unicode standard guarantees that all CCC values are
+ * between 0 and 254 inclusive, which leaves 255 available as
+ * a special value.
+ * Code points with CCC 0 are known as stoppers.
+ * leaf[2]: Decomposition. If leaf[1] == 255, then leaf[2] is the
+ * start of a NUL-terminated string that is the decomposition
+ * of the character.
+ * The CCC of a decomposable character is the same as the CCC
+ * of the first character of its decomposition.
+ * Some characters decompose as the empty string: these are
+ * characters with the Default_Ignorable_Code_Point property.
+ * These do affect normalization, as they all have CCC 0.
+ *
+ * The decompositions in the trie have been fully expanded.
+ *
+ * Casefolding, if applicable, is also done using decompositions.
+ */
+typedef unsigned char utf8leaf_t;
+
+#define LEAF_GEN(LEAF) ((LEAF)[0])
+#define LEAF_CCC(LEAF) ((LEAF)[1])
+#define LEAF_STR(LEAF) ((const char*)((LEAF) + 2))
+
+#define MAXGEN (255)
+
+#define MINCCC (0)
+#define MAXCCC (254)
+#define STOPPER (0)
+#define DECOMPOSE (255)
+#define HANGUL ((char)(255))
+
+#define UTF8HANGULLEAF (12)
+
+struct tree;
+static utf8leaf_t *utf8nlookup(struct tree *, unsigned char *,
+ const char *, size_t);
+static utf8leaf_t *utf8lookup(struct tree *, unsigned char *, const char *);
+
+unsigned char *utf8data;
+size_t utf8data_size;
+
+utf8trie_t *nfkdi;
+utf8trie_t *nfkdicf;
+
+/* ------------------------------------------------------------------ */
+
+/*
+ * UTF8 valid ranges.
+ *
+ * The UTF-8 encoding spreads the bits of a 32bit word over several
+ * bytes. This table gives the ranges that can be held and how they'd
+ * be represented.
+ *
+ * 0x00000000 0x0000007F: 0xxxxxxx
+ * 0x00000000 0x000007FF: 110xxxxx 10xxxxxx
+ * 0x00000000 0x0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
+ * 0x00000000 0x001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x00000000 0x03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x00000000 0x7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ *
+ * There is an additional requirement on UTF-8, in that only the
+ * shortest representation of a 32bit value is to be used. A decoder
+ * must not decode sequences that do not satisfy this requirement.
+ * Thus the allowed ranges have a lower bound.
+ *
+ * 0x00000000 0x0000007F: 0xxxxxxx
+ * 0x00000080 0x000007FF: 110xxxxx 10xxxxxx
+ * 0x00000800 0x0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
+ * 0x00010000 0x001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x00200000 0x03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ * 0x04000000 0x7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+ *
+ * Actual unicode characters are limited to the range 0x0 - 0x10FFFF,
+ * 17 planes of 65536 values. This limits the sequences actually seen
+ * even more, to just the following.
+ *
+ * 0 - 0x7f: 0 0x7f
+ * 0x80 - 0x7ff: 0xc2 0x80 0xdf 0xbf
+ * 0x800 - 0xffff: 0xe0 0xa0 0x80 0xef 0xbf 0xbf
+ * 0x10000 - 0x10ffff: 0xf0 0x90 0x80 0x80 0xf4 0x8f 0xbf 0xbf
+ *
+ * Even within those ranges not all values are allowed: the surrogates
+ * 0xd800 - 0xdfff should never be seen.
+ *
+ * Note that the longest sequence seen with valid usage is 4 bytes,
+ * the same a single UTF-32 character. This makes the UTF-8
+ * representation of Unicode strictly smaller than UTF-32.
+ *
+ * The shortest sequence requirement was introduced by:
+ * Corrigendum #1: UTF-8 Shortest Form
+ * It can be found here:
+ * http://www.unicode.org/versions/corrigendum1.html
+ *
+ */
+
+#define UTF8_2_BITS 0xC0
+#define UTF8_3_BITS 0xE0
+#define UTF8_4_BITS 0xF0
+#define UTF8_N_BITS 0x80
+#define UTF8_2_MASK 0xE0
+#define UTF8_3_MASK 0xF0
+#define UTF8_4_MASK 0xF8
+#define UTF8_N_MASK 0xC0
+#define UTF8_V_MASK 0x3F
+#define UTF8_V_SHIFT 6
+
+static int utf8encode(char *str, unsigned int val)
+{
+ int len;
+
+ if (val < 0x80) {
+ str[0] = val;
+ len = 1;
+ } else if (val < 0x800) {
+ str[1] = val & UTF8_V_MASK;
+ str[1] |= UTF8_N_BITS;
+ val >>= UTF8_V_SHIFT;
+ str[0] = val;
+ str[0] |= UTF8_2_BITS;
+ len = 2;
+ } else if (val < 0x10000) {
+ str[2] = val & UTF8_V_MASK;
+ str[2] |= UTF8_N_BITS;
+ val >>= UTF8_V_SHIFT;
+ str[1] = val & UTF8_V_MASK;
+ str[1] |= UTF8_N_BITS;
+ val >>= UTF8_V_SHIFT;
+ str[0] = val;
+ str[0] |= UTF8_3_BITS;
+ len = 3;
+ } else if (val < 0x110000) {
+ str[3] = val & UTF8_V_MASK;
+ str[3] |= UTF8_N_BITS;
+ val >>= UTF8_V_SHIFT;
+ str[2] = val & UTF8_V_MASK;
+ str[2] |= UTF8_N_BITS;
+ val >>= UTF8_V_SHIFT;
+ str[1] = val & UTF8_V_MASK;
+ str[1] |= UTF8_N_BITS;
+ val >>= UTF8_V_SHIFT;
+ str[0] = val;
+ str[0] |= UTF8_4_BITS;
+ len = 4;
+ } else {
+ printf("%#x: illegal val\n", val);
+ len = 0;
+ }
+ return len;
+}
+
+static unsigned int utf8decode(const char *str)
+{
+ const unsigned char *s = (const unsigned char*)str;
+ unsigned int unichar = 0;
+
+ if (*s < 0x80) {
+ unichar = *s;
+ } else if (*s < UTF8_3_BITS) {
+ unichar = *s++ & 0x1F;
+ unichar <<= UTF8_V_SHIFT;
+ unichar |= *s & 0x3F;
+ } else if (*s < UTF8_4_BITS) {
+ unichar = *s++ & 0x0F;
+ unichar <<= UTF8_V_SHIFT;
+ unichar |= *s++ & 0x3F;
+ unichar <<= UTF8_V_SHIFT;
+ unichar |= *s & 0x3F;
+ } else {
+ unichar = *s++ & 0x0F;
+ unichar <<= UTF8_V_SHIFT;
+ unichar |= *s++ & 0x3F;
+ unichar <<= UTF8_V_SHIFT;
+ unichar |= *s++ & 0x3F;
+ unichar <<= UTF8_V_SHIFT;
+ unichar |= *s & 0x3F;
+ }
+ return unichar;
+}
+
+static int utf32valid(unsigned int unichar)
+{
+ return unichar < 0x110000;
+}
+
+#define HANGUL_SYLLABLE(U) ((U) >= 0xAC00 && (U) <= 0xD7A3)
+
+#define NODE 1
+#define LEAF 0
+
+struct tree {
+ void *root;
+ int childnode;
+ const char *type;
+ unsigned int maxage;
+ struct tree *next;
+ int (*leaf_equal)(void *, void *);
+ void (*leaf_print)(void *, int);
+ int (*leaf_mark)(void *);
+ int (*leaf_size)(void *);
+ int *(*leaf_index)(struct tree *, void *);
+ unsigned char *(*leaf_emit)(void *, unsigned char *);
+ int leafindex[0x110000];
+ int index;
+};
+
+struct node {
+ int index;
+ int offset;
+ int mark;
+ int size;
+ struct node *parent;
+ void *left;
+ void *right;
+ unsigned char bitnum;
+ unsigned char nextbyte;
+ unsigned char leftnode;
+ unsigned char rightnode;
+ unsigned int keybits;
+ unsigned int keymask;
+};
+
+/*
+ * Example lookup function for a tree.
+ */
+static void *lookup(struct tree *tree, const char *key)
+{
+ struct node *node;
+ void *leaf = NULL;
+
+ node = tree->root;
+ while (!leaf && node) {
+ if (node->nextbyte)
+ key++;
+ if (*key & (1 << (node->bitnum & 7))) {
+ /* Right leg */
+ if (node->rightnode == NODE) {
+ node = node->right;
+ } else if (node->rightnode == LEAF) {
+ leaf = node->right;
+ } else {
+ node = NULL;
+ }
+ } else {
+ /* Left leg */
+ if (node->leftnode == NODE) {
+ node = node->left;
+ } else if (node->leftnode == LEAF) {
+ leaf = node->left;
+ } else {
+ node = NULL;
+ }
+ }
+ }
+
+ return leaf;
+}
+
+/*
+ * A simple non-recursive tree walker: keep track of visits to the
+ * left and right branches in the leftmask and rightmask.
+ */
+static void tree_walk(struct tree *tree)
+{
+ struct node *node;
+ unsigned int leftmask;
+ unsigned int rightmask;
+ unsigned int bitmask;
+ int indent = 1;
+ int nodes, singletons, leaves;
+
+ nodes = singletons = leaves = 0;
+
+ printf("%s_%x root %p\n", tree->type, tree->maxage, tree->root);
+ if (tree->childnode == LEAF) {
+ assert(tree->root);
+ tree->leaf_print(tree->root, indent);
+ leaves = 1;
+ } else {
+ assert(tree->childnode == NODE);
+ node = tree->root;
+ leftmask = rightmask = 0;
+ while (node) {
+ printf("%*snode @ %p bitnum %d nextbyte %d"
+ " left %p right %p mask %x bits %x\n",
+ indent, "", node,
+ node->bitnum, node->nextbyte,
+ node->left, node->right,
+ node->keymask, node->keybits);
+ nodes += 1;
+ if (!(node->left && node->right))
+ singletons += 1;
+
+ while (node) {
+ bitmask = 1 << node->bitnum;
+ if ((leftmask & bitmask) == 0) {
+ leftmask |= bitmask;
+ if (node->leftnode == LEAF) {
+ assert(node->left);
+ tree->leaf_print(node->left,
+ indent+1);
+ leaves += 1;
+ } else if (node->left) {
+ assert(node->leftnode == NODE);
+ indent += 1;
+ node = node->left;
+ break;
+ }
+ }
+ if ((rightmask & bitmask) == 0) {
+ rightmask |= bitmask;
+ if (node->rightnode == LEAF) {
+ assert(node->right);
+ tree->leaf_print(node->right,
+ indent+1);
+ leaves += 1;
+ } else if (node->right) {
+ assert(node->rightnode == NODE);
+ indent += 1;
+ node = node->right;
+ break;
+ }
+ }
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ node = node->parent;
+ indent -= 1;
+ }
+ }
+ }
+ printf("nodes %d leaves %d singletons %d\n",
+ nodes, leaves, singletons);
+}
+
+/*
+ * Allocate an initialize a new internal node.
+ */
+static struct node *alloc_node(struct node *parent)
+{
+ struct node *node;
+ int bitnum;
+
+ node = malloc(sizeof(*node));
+ node->left = node->right = NULL;
+ node->parent = parent;
+ node->leftnode = NODE;
+ node->rightnode = NODE;
+ node->keybits = 0;
+ node->keymask = 0;
+ node->mark = 0;
+ node->index = 0;
+ node->offset = -1;
+ node->size = 4;
+
+ if (node->parent) {
+ bitnum = parent->bitnum;
+ if ((bitnum & 7) == 0) {
+ node->bitnum = bitnum + 7 + 8;
+ node->nextbyte = 1;
+ } else {
+ node->bitnum = bitnum - 1;
+ node->nextbyte = 0;
+ }
+ } else {
+ node->bitnum = 7;
+ node->nextbyte = 0;
+ }
+
+ return node;
+}
+
+/*
+ * Insert a new leaf into the tree, and collapse any subtrees that are
+ * fully populated and end in identical leaves. A nextbyte tagged
+ * internal node will not be removed to preserve the tree's integrity.
+ * Note that due to the structure of utf8, no nextbyte tagged node
+ * will be a candidate for removal.
+ */
+static int insert(struct tree *tree, char *key, int keylen, void *leaf)
+{
+ struct node *node;
+ struct node *parent;
+ void **cursor;
+ int keybits;
+
+ assert(keylen >= 1 && keylen <= 4);
+
+ node = NULL;
+ cursor = &tree->root;
+ keybits = 8 * keylen;
+
+ /* Insert, creating path along the way. */
+ while (keybits) {
+ if (!*cursor)
+ *cursor = alloc_node(node);
+ node = *cursor;
+ if (node->nextbyte)
+ key++;
+ if (*key & (1 << (node->bitnum & 7)))
+ cursor = &node->right;
+ else
+ cursor = &node->left;
+ keybits--;
+ }
+ *cursor = leaf;
+
+ /* Merge subtrees if possible. */
+ while (node) {
+ if (*key & (1 << (node->bitnum & 7)))
+ node->rightnode = LEAF;
+ else
+ node->leftnode = LEAF;
+ if (node->nextbyte)
+ break;
+ if (node->leftnode == NODE || node->rightnode == NODE)
+ break;
+ assert(node->left);
+ assert(node->right);
+ /* Compare */
+ if (! tree->leaf_equal(node->left, node->right))
+ break;
+ /* Keep left, drop right leaf. */
+ leaf = node->left;
+ /* Check in parent */
+ parent = node->parent;
+ if (!parent) {
+ /* root of tree! */
+ tree->root = leaf;
+ tree->childnode = LEAF;
+ } else if (parent->left == node) {
+ parent->left = leaf;
+ parent->leftnode = LEAF;
+ if (parent->right) {
+ parent->keymask = 0;
+ parent->keybits = 0;
+ } else {
+ parent->keymask |= (1 << node->bitnum);
+ }
+ } else if (parent->right == node) {
+ parent->right = leaf;
+ parent->rightnode = LEAF;
+ if (parent->left) {
+ parent->keymask = 0;
+ parent->keybits = 0;
+ } else {
+ parent->keymask |= (1 << node->bitnum);
+ parent->keybits |= (1 << node->bitnum);
+ }
+ } else {
+ /* internal tree error */
+ assert(0);
+ }
+ free(node);
+ node = parent;
+ }
+
+ /* Propagate keymasks up along singleton chains. */
+ while (node) {
+ parent = node->parent;
+ if (!parent)
+ break;
+ /* Nix the mask for parents with two children. */
+ if (node->keymask == 0) {
+ parent->keymask = 0;
+ parent->keybits = 0;
+ } else if (parent->left && parent->right) {
+ parent->keymask = 0;
+ parent->keybits = 0;
+ } else {
+ assert((parent->keymask & node->keymask) == 0);
+ parent->keymask |= node->keymask;
+ parent->keymask |= (1 << parent->bitnum);
+ parent->keybits |= node->keybits;
+ if (parent->right)
+ parent->keybits |= (1 << parent->bitnum);
+ }
+ node = parent;
+ }
+
+ return 0;
+}
+
+/*
+ * Prune internal nodes.
+ *
+ * Fully populated subtrees that end at the same leaf have already
+ * been collapsed. There are still internal nodes that have for both
+ * their left and right branches a sequence of singletons that make
+ * identical choices and end in identical leaves. The keymask and
+ * keybits collected in the nodes describe the choices made in these
+ * singleton chains. When they are identical for the left and right
+ * branch of a node, and the two leaves comare identical, the node in
+ * question can be removed.
+ *
+ * Note that nodes with the nextbyte tag set will not be removed by
+ * this to ensure tree integrity. Note as well that the structure of
+ * utf8 ensures that these nodes would not have been candidates for
+ * removal in any case.
+ */
+static void prune(struct tree *tree)
+{
+ struct node *node;
+ struct node *left;
+ struct node *right;
+ struct node *parent;
+ void *leftleaf;
+ void *rightleaf;
+ unsigned int leftmask;
+ unsigned int rightmask;
+ unsigned int bitmask;
+ int count;
+
+ if (verbose > 0)
+ printf("Pruning %s_%x\n", tree->type, tree->maxage);
+
+ count = 0;
+ if (tree->childnode == LEAF)
+ return;
+ if (!tree->root)
+ return;
+
+ leftmask = rightmask = 0;
+ node = tree->root;
+ while (node) {
+ if (node->nextbyte)
+ goto advance;
+ if (node->leftnode == LEAF)
+ goto advance;
+ if (node->rightnode == LEAF)
+ goto advance;
+ if (!node->left)
+ goto advance;
+ if (!node->right)
+ goto advance;
+ left = node->left;
+ right = node->right;
+ if (left->keymask == 0)
+ goto advance;
+ if (right->keymask == 0)
+ goto advance;
+ if (left->keymask != right->keymask)
+ goto advance;
+ if (left->keybits != right->keybits)
+ goto advance;
+ leftleaf = NULL;
+ while (!leftleaf) {
+ assert(left->left || left->right);
+ if (left->leftnode == LEAF)
+ leftleaf = left->left;
+ else if (left->rightnode == LEAF)
+ leftleaf = left->right;
+ else if (left->left)
+ left = left->left;
+ else if (left->right)
+ left = left->right;
+ else
+ assert(0);
+ }
+ rightleaf = NULL;
+ while (!rightleaf) {
+ assert(right->left || right->right);
+ if (right->leftnode == LEAF)
+ rightleaf = right->left;
+ else if (right->rightnode == LEAF)
+ rightleaf = right->right;
+ else if (right->left)
+ right = right->left;
+ else if (right->right)
+ right = right->right;
+ else
+ assert(0);
+ }
+ if (! tree->leaf_equal(leftleaf, rightleaf))
+ goto advance;
+ /*
+ * This node has identical singleton-only subtrees.
+ * Remove it.
+ */
+ parent = node->parent;
+ left = node->left;
+ right = node->right;
+ if (parent->left == node)
+ parent->left = left;
+ else if (parent->right == node)
+ parent->right = left;
+ else
+ assert(0);
+ left->parent = parent;
+ left->keymask |= (1 << node->bitnum);
+ node->left = NULL;
+ while (node) {
+ bitmask = 1 << node->bitnum;
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ if (node->leftnode == NODE && node->left) {
+ left = node->left;
+ free(node);
+ count++;
+ node = left;
+ } else if (node->rightnode == NODE && node->right) {
+ right = node->right;
+ free(node);
+ count++;
+ node = right;
+ } else {
+ node = NULL;
+ }
+ }
+ /* Propagate keymasks up along singleton chains. */
+ node = parent;
+ /* Force re-check */
+ bitmask = 1 << node->bitnum;
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ for (;;) {
+ if (node->left && node->right)
+ break;
+ if (node->left) {
+ left = node->left;
+ node->keymask |= left->keymask;
+ node->keybits |= left->keybits;
+ }
+ if (node->right) {
+ right = node->right;
+ node->keymask |= right->keymask;
+ node->keybits |= right->keybits;
+ }
+ node->keymask |= (1 << node->bitnum);
+ node = node->parent;
+ /* Force re-check */
+ bitmask = 1 << node->bitnum;
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ }
+ advance:
+ bitmask = 1 << node->bitnum;
+ if ((leftmask & bitmask) == 0 &&
+ node->leftnode == NODE &&
+ node->left) {
+ leftmask |= bitmask;
+ node = node->left;
+ } else if ((rightmask & bitmask) == 0 &&
+ node->rightnode == NODE &&
+ node->right) {
+ rightmask |= bitmask;
+ node = node->right;
+ } else {
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ node = node->parent;
+ }
+ }
+ if (verbose > 0)
+ printf("Pruned %d nodes\n", count);
+}
+
+/*
+ * Mark the nodes in the tree that lead to leaves that must be
+ * emitted.
+ */
+static void mark_nodes(struct tree *tree)
+{
+ struct node *node;
+ struct node *n;
+ unsigned int leftmask;
+ unsigned int rightmask;
+ unsigned int bitmask;
+ int marked;
+
+ marked = 0;
+ if (verbose > 0)
+ printf("Marking %s_%x\n", tree->type, tree->maxage);
+ if (tree->childnode == LEAF)
+ goto done;
+
+ assert(tree->childnode == NODE);
+ node = tree->root;
+ leftmask = rightmask = 0;
+ while (node) {
+ bitmask = 1 << node->bitnum;
+ if ((leftmask & bitmask) == 0) {
+ leftmask |= bitmask;
+ if (node->leftnode == LEAF) {
+ assert(node->left);
+ if (tree->leaf_mark(node->left)) {
+ n = node;
+ while (n && !n->mark) {
+ marked++;
+ n->mark = 1;
+ n = n->parent;
+ }
+ }
+ } else if (node->left) {
+ assert(node->leftnode == NODE);
+ node = node->left;
+ continue;
+ }
+ }
+ if ((rightmask & bitmask) == 0) {
+ rightmask |= bitmask;
+ if (node->rightnode == LEAF) {
+ assert(node->right);
+ if (tree->leaf_mark(node->right)) {
+ n = node;
+ while (n && !n->mark) {
+ marked++;
+ n->mark = 1;
+ n = n->parent;
+ }
+ }
+ } else if (node->right) {
+ assert(node->rightnode == NODE);
+ node = node->right;
+ continue;
+ }
+ }
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ node = node->parent;
+ }
+
+ /* second pass: left siblings and singletons */
+
+ assert(tree->childnode == NODE);
+ node = tree->root;
+ leftmask = rightmask = 0;
+ while (node) {
+ bitmask = 1 << node->bitnum;
+ if ((leftmask & bitmask) == 0) {
+ leftmask |= bitmask;
+ if (node->leftnode == LEAF) {
+ assert(node->left);
+ if (tree->leaf_mark(node->left)) {
+ n = node;
+ while (n && !n->mark) {
+ marked++;
+ n->mark = 1;
+ n = n->parent;
+ }
+ }
+ } else if (node->left) {
+ assert(node->leftnode == NODE);
+ node = node->left;
+ if (!node->mark && node->parent->mark) {
+ marked++;
+ node->mark = 1;
+ }
+ continue;
+ }
+ }
+ if ((rightmask & bitmask) == 0) {
+ rightmask |= bitmask;
+ if (node->rightnode == LEAF) {
+ assert(node->right);
+ if (tree->leaf_mark(node->right)) {
+ n = node;
+ while (n && !n->mark) {
+ marked++;
+ n->mark = 1;
+ n = n->parent;
+ }
+ }
+ } else if (node->right) {
+ assert(node->rightnode == NODE);
+ node = node->right;
+ if (!node->mark && node->parent->mark &&
+ !node->parent->left) {
+ marked++;
+ node->mark = 1;
+ }
+ continue;
+ }
+ }
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ node = node->parent;
+ }
+done:
+ if (verbose > 0)
+ printf("Marked %d nodes\n", marked);
+}
+
+/*
+ * Compute the index of each node and leaf, which is the offset in the
+ * emitted trie. These values must be pre-computed because relative
+ * offsets between nodes are used to navigate the tree.
+ */
+static int index_nodes(struct tree *tree, int index)
+{
+ struct node *node;
+ unsigned int leftmask;
+ unsigned int rightmask;
+ unsigned int bitmask;
+ int count;
+ int indent;
+
+ /* Align to a cache line (or half a cache line?). */
+ while (index % 64)
+ index++;
+ tree->index = index;
+ indent = 1;
+ count = 0;
+
+ if (verbose > 0)
+ printf("Indexing %s_%x: %d\n", tree->type, tree->maxage, index);
+ if (tree->childnode == LEAF) {
+ index += tree->leaf_size(tree->root);
+ goto done;
+ }
+
+ assert(tree->childnode == NODE);
+ node = tree->root;
+ leftmask = rightmask = 0;
+ while (node) {
+ if (!node->mark)
+ goto skip;
+ count++;
+ if (node->index != index)
+ node->index = index;
+ index += node->size;
+skip:
+ while (node) {
+ bitmask = 1 << node->bitnum;
+ if (node->mark && (leftmask & bitmask) == 0) {
+ leftmask |= bitmask;
+ if (node->leftnode == LEAF) {
+ assert(node->left);
+ *tree->leaf_index(tree, node->left) =
+ index;
+ index += tree->leaf_size(node->left);
+ count++;
+ } else if (node->left) {
+ assert(node->leftnode == NODE);
+ indent += 1;
+ node = node->left;
+ break;
+ }
+ }
+ if (node->mark && (rightmask & bitmask) == 0) {
+ rightmask |= bitmask;
+ if (node->rightnode == LEAF) {
+ assert(node->right);
+ *tree->leaf_index(tree, node->right) = index;
+ index += tree->leaf_size(node->right);
+ count++;
+ } else if (node->right) {
+ assert(node->rightnode == NODE);
+ indent += 1;
+ node = node->right;
+ break;
+ }
+ }
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ node = node->parent;
+ indent -= 1;
+ }
+ }
+done:
+ /* Round up to a multiple of 16 */
+ while (index % 16)
+ index++;
+ if (verbose > 0)
+ printf("Final index %d\n", index);
+ return index;
+}
+
+/*
+ * Mark the nodes in a subtree, helper for size_nodes().
+ */
+static int mark_subtree(struct node *node)
+{
+ int changed;
+
+ if (!node || node->mark)
+ return 0;
+ node->mark = 1;
+ node->index = node->parent->index;
+ changed = 1;
+ if (node->leftnode == NODE)
+ changed += mark_subtree(node->left);
+ if (node->rightnode == NODE)
+ changed += mark_subtree(node->right);
+ return changed;
+}
+
+/*
+ * Compute the size of nodes and leaves. We start by assuming that
+ * each node needs to store a three-byte offset. The indexes of the
+ * nodes are calculated based on that, and then this function is
+ * called to see if the sizes of some nodes can be reduced. This is
+ * repeated until no more changes are seen.
+ */
+static int size_nodes(struct tree *tree)
+{
+ struct tree *next;
+ struct node *node;
+ struct node *right;
+ struct node *n;
+ unsigned int leftmask;
+ unsigned int rightmask;
+ unsigned int bitmask;
+ unsigned int pathbits;
+ unsigned int pathmask;
+ unsigned int nbit;
+ int changed;
+ int offset;
+ int size;
+ int indent;
+
+ indent = 1;
+ changed = 0;
+ size = 0;
+
+ if (verbose > 0)
+ printf("Sizing %s_%x\n", tree->type, tree->maxage);
+ if (tree->childnode == LEAF)
+ goto done;
+
+ assert(tree->childnode == NODE);
+ pathbits = 0;
+ pathmask = 0;
+ node = tree->root;
+ leftmask = rightmask = 0;
+ while (node) {
+ if (!node->mark)
+ goto skip;
+ offset = 0;
+ if (!node->left || !node->right) {
+ size = 1;
+ } else {
+ if (node->rightnode == NODE) {
+ /*
+ * If the right node is not marked,
+ * look for a corresponding node in
+ * the next tree. Such a node need
+ * not exist.
+ */
+ right = node->right;
+ next = tree->next;
+ while (!right->mark) {
+ assert(next);
+ n = next->root;
+ while (n->bitnum != node->bitnum) {
+ nbit = 1 << n->bitnum;
+ if (!(pathmask & nbit))
+ break;
+ if (pathbits & nbit) {
+ if (n->rightnode == LEAF)
+ break;
+ n = n->right;
+ } else {
+ if (n->leftnode == LEAF)
+ break;
+ n = n->left;
+ }
+ }
+ if (n->bitnum != node->bitnum)
+ break;
+ n = n->right;
+ right = n;
+ next = next->next;
+ }
+ /* Make sure the right node is marked. */
+ if (!right->mark)
+ changed += mark_subtree(right);
+ offset = right->index - node->index;
+ } else {
+ offset = *tree->leaf_index(tree, node->right);
+ offset -= node->index;
+ }
+ assert(offset >= 0);
+ assert(offset <= 0xffffff);
+ if (offset <= 0xff) {
+ size = 2;
+ } else if (offset <= 0xffff) {
+ size = 3;
+ } else { /* offset <= 0xffffff */
+ size = 4;
+ }
+ }
+ if (node->size != size || node->offset != offset) {
+ node->size = size;
+ node->offset = offset;
+ changed++;
+ }
+skip:
+ while (node) {
+ bitmask = 1 << node->bitnum;
+ pathmask |= bitmask;
+ if (node->mark && (leftmask & bitmask) == 0) {
+ leftmask |= bitmask;
+ if (node->leftnode == LEAF) {
+ assert(node->left);
+ } else if (node->left) {
+ assert(node->leftnode == NODE);
+ indent += 1;
+ node = node->left;
+ break;
+ }
+ }
+ if (node->mark && (rightmask & bitmask) == 0) {
+ rightmask |= bitmask;
+ pathbits |= bitmask;
+ if (node->rightnode == LEAF) {
+ assert(node->right);
+ } else if (node->right) {
+ assert(node->rightnode == NODE);
+ indent += 1;
+ node = node->right;
+ break;
+ }
+ }
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ pathmask &= ~bitmask;
+ pathbits &= ~bitmask;
+ node = node->parent;
+ indent -= 1;
+ }
+ }
+done:
+ if (verbose > 0)
+ printf("Found %d changes\n", changed);
+ return changed;
+}
+
+/*
+ * Emit a trie for the given tree into the data array.
+ */
+static void emit(struct tree *tree, unsigned char *data)
+{
+ struct node *node;
+ unsigned int leftmask;
+ unsigned int rightmask;
+ unsigned int bitmask;
+ int offlen;
+ int offset;
+ int index;
+ int indent;
+ int size;
+ int bytes;
+ int leaves;
+ int nodes[4];
+ unsigned char byte;
+
+ nodes[0] = nodes[1] = nodes[2] = nodes[3] = 0;
+ leaves = 0;
+ bytes = 0;
+ index = tree->index;
+ data += index;
+ indent = 1;
+ if (verbose > 0)
+ printf("Emitting %s_%x\n", tree->type, tree->maxage);
+ if (tree->childnode == LEAF) {
+ assert(tree->root);
+ tree->leaf_emit(tree->root, data);
+ size = tree->leaf_size(tree->root);
+ index += size;
+ leaves++;
+ goto done;
+ }
+
+ assert(tree->childnode == NODE);
+ node = tree->root;
+ leftmask = rightmask = 0;
+ while (node) {
+ if (!node->mark)
+ goto skip;
+ assert(node->offset != -1);
+ assert(node->index == index);
+
+ byte = 0;
+ if (node->nextbyte)
+ byte |= NEXTBYTE;
+ byte |= (node->bitnum & BITNUM);
+ if (node->left && node->right) {
+ if (node->leftnode == NODE)
+ byte |= LEFTNODE;
+ if (node->rightnode == NODE)
+ byte |= RIGHTNODE;
+ if (node->offset <= 0xff)
+ offlen = 1;
+ else if (node->offset <= 0xffff)
+ offlen = 2;
+ else
+ offlen = 3;
+ nodes[offlen]++;
+ offset = node->offset;
+ byte |= offlen << OFFLEN_SHIFT;
+ *data++ = byte;
+ index++;
+ while (offlen--) {
+ *data++ = offset & 0xff;
+ index++;
+ offset >>= 8;
+ }
+ } else if (node->left) {
+ if (node->leftnode == NODE)
+ byte |= TRIENODE;
+ nodes[0]++;
+ *data++ = byte;
+ index++;
+ } else if (node->right) {
+ byte |= RIGHTNODE;
+ if (node->rightnode == NODE)
+ byte |= TRIENODE;
+ nodes[0]++;
+ *data++ = byte;
+ index++;
+ } else {
+ assert(0);
+ }
+skip:
+ while (node) {
+ bitmask = 1 << node->bitnum;
+ if (node->mark && (leftmask & bitmask) == 0) {
+ leftmask |= bitmask;
+ if (node->leftnode == LEAF) {
+ assert(node->left);
+ data = tree->leaf_emit(node->left,
+ data);
+ size = tree->leaf_size(node->left);
+ index += size;
+ bytes += size;
+ leaves++;
+ } else if (node->left) {
+ assert(node->leftnode == NODE);
+ indent += 1;
+ node = node->left;
+ break;
+ }
+ }
+ if (node->mark && (rightmask & bitmask) == 0) {
+ rightmask |= bitmask;
+ if (node->rightnode == LEAF) {
+ assert(node->right);
+ data = tree->leaf_emit(node->right,
+ data);
+ size = tree->leaf_size(node->right);
+ index += size;
+ bytes += size;
+ leaves++;
+ } else if (node->right) {
+ assert(node->rightnode == NODE);
+ indent += 1;
+ node = node->right;
+ break;
+ }
+ }
+ leftmask &= ~bitmask;
+ rightmask &= ~bitmask;
+ node = node->parent;
+ indent -= 1;
+ }
+ }
+done:
+ if (verbose > 0) {
+ printf("Emitted %d (%d) leaves",
+ leaves, bytes);
+ printf(" %d (%d+%d+%d+%d) nodes",
+ nodes[0] + nodes[1] + nodes[2] + nodes[3],
+ nodes[0], nodes[1], nodes[2], nodes[3]);
+ printf(" %d total\n", index - tree->index);
+ }
+}
+
+/* ------------------------------------------------------------------ */
+
+/*
+ * Unicode data.
+ *
+ * We need to keep track of the Canonical Combining Class, the Age,
+ * and decompositions for a code point.
+ *
+ * For the Age, we store the index into the ages table. Effectively
+ * this is a generation number that the table maps to a unicode
+ * version.
+ *
+ * The correction field is used to indicate that this entry is in the
+ * corrections array, which contains decompositions that were
+ * corrected in later revisions. The value of the correction field is
+ * the Unicode version in which the mapping was corrected.
+ */
+struct unicode_data {
+ unsigned int code;
+ int ccc;
+ int gen;
+ int correction;
+ unsigned int *utf32nfkdi;
+ unsigned int *utf32nfkdicf;
+ char *utf8nfkdi;
+ char *utf8nfkdicf;
+};
+
+struct unicode_data unicode_data[0x110000];
+struct unicode_data *corrections;
+int corrections_count;
+
+struct tree *nfkdi_tree;
+struct tree *nfkdicf_tree;
+
+struct tree *trees;
+int trees_count;
+
+/*
+ * Check the corrections array to see if this entry was corrected at
+ * some point.
+ */
+static struct unicode_data *corrections_lookup(struct unicode_data *u)
+{
+ int i;
+
+ for (i = 0; i != corrections_count; i++)
+ if (u->code == corrections[i].code)
+ return &corrections[i];
+ return u;
+}
+
+static int nfkdi_equal(void *l, void *r)
+{
+ struct unicode_data *left = l;
+ struct unicode_data *right = r;
+
+ if (left->gen != right->gen)
+ return 0;
+ if (left->ccc != right->ccc)
+ return 0;
+ if (left->utf8nfkdi && right->utf8nfkdi &&
+ strcmp(left->utf8nfkdi, right->utf8nfkdi) == 0)
+ return 1;
+ if (left->utf8nfkdi || right->utf8nfkdi)
+ return 0;
+ return 1;
+}
+
+static int nfkdicf_equal(void *l, void *r)
+{
+ struct unicode_data *left = l;
+ struct unicode_data *right = r;
+
+ if (left->gen != right->gen)
+ return 0;
+ if (left->ccc != right->ccc)
+ return 0;
+ if (left->utf8nfkdicf && right->utf8nfkdicf &&
+ strcmp(left->utf8nfkdicf, right->utf8nfkdicf) == 0)
+ return 1;
+ if (left->utf8nfkdicf && right->utf8nfkdicf)
+ return 0;
+ if (left->utf8nfkdicf || right->utf8nfkdicf)
+ return 0;
+ if (left->utf8nfkdi && right->utf8nfkdi &&
+ strcmp(left->utf8nfkdi, right->utf8nfkdi) == 0)
+ return 1;
+ if (left->utf8nfkdi || right->utf8nfkdi)
+ return 0;
+ return 1;
+}
+
+static void nfkdi_print(void *l, int indent)
+{
+ struct unicode_data *leaf = l;
+
+ printf("%*sleaf @ %p code %X ccc %d gen %d", indent, "", leaf,
+ leaf->code, leaf->ccc, leaf->gen);
+ if (leaf->utf8nfkdi && leaf->utf8nfkdi[0] == HANGUL)
+ printf(" nfkdi \"%s\"", "HANGUL SYLLABLE");
+ else if (leaf->utf8nfkdi)
+ printf(" nfkdi \"%s\"", (const char*)leaf->utf8nfkdi);
+ printf("\n");
+}
+
+static void nfkdicf_print(void *l, int indent)
+{
+ struct unicode_data *leaf = l;
+
+ printf("%*sleaf @ %p code %X ccc %d gen %d", indent, "", leaf,
+ leaf->code, leaf->ccc, leaf->gen);
+ if (leaf->utf8nfkdicf)
+ printf(" nfkdicf \"%s\"", (const char*)leaf->utf8nfkdicf);
+ else if (leaf->utf8nfkdi && leaf->utf8nfkdi[0] == HANGUL)
+ printf(" nfkdi \"%s\"", "HANGUL SYLLABLE");
+ else if (leaf->utf8nfkdi)
+ printf(" nfkdi \"%s\"", (const char*)leaf->utf8nfkdi);
+ printf("\n");
+}
+
+static int nfkdi_mark(void *l)
+{
+ return 1;
+}
+
+static int nfkdicf_mark(void *l)
+{
+ struct unicode_data *leaf = l;
+
+ if (leaf->utf8nfkdicf)
+ return 1;
+ return 0;
+}
+
+static int correction_mark(void *l)
+{
+ struct unicode_data *leaf = l;
+
+ return leaf->correction;
+}
+
+static int nfkdi_size(void *l)
+{
+ struct unicode_data *leaf = l;
+
+ int size = 2;
+ if (HANGUL_SYLLABLE(leaf->code))
+ size += 1;
+ else if (leaf->utf8nfkdi)
+ size += strlen(leaf->utf8nfkdi) + 1;
+ return size;
+}
+
+static int nfkdicf_size(void *l)
+{
+ struct unicode_data *leaf = l;
+
+ int size = 2;
+ if (HANGUL_SYLLABLE(leaf->code))
+ size += 1;
+ else if (leaf->utf8nfkdicf)
+ size += strlen(leaf->utf8nfkdicf) + 1;
+ else if (leaf->utf8nfkdi)
+ size += strlen(leaf->utf8nfkdi) + 1;
+ return size;
+}
+
+static int *nfkdi_index(struct tree *tree, void *l)
+{
+ struct unicode_data *leaf = l;
+
+ return &tree->leafindex[leaf->code];
+}
+
+static int *nfkdicf_index(struct tree *tree, void *l)
+{
+ struct unicode_data *leaf = l;
+
+ return &tree->leafindex[leaf->code];
+}
+
+static unsigned char *nfkdi_emit(void *l, unsigned char *data)
+{
+ struct unicode_data *leaf = l;
+ unsigned char *s;
+
+ *data++ = leaf->gen;
+ if (HANGUL_SYLLABLE(leaf->code)) {
+ *data++ = DECOMPOSE;
+ *data++ = HANGUL;
+ } else if (leaf->utf8nfkdi) {
+ *data++ = DECOMPOSE;
+ s = (unsigned char*)leaf->utf8nfkdi;
+ while ((*data++ = *s++) != 0)
+ ;
+ } else {
+ *data++ = leaf->ccc;
+ }
+ return data;
+}
+
+static unsigned char *nfkdicf_emit(void *l, unsigned char *data)
+{
+ struct unicode_data *leaf = l;
+ unsigned char *s;
+
+ *data++ = leaf->gen;
+ if (HANGUL_SYLLABLE(leaf->code)) {
+ *data++ = DECOMPOSE;
+ *data++ = HANGUL;
+ } else if (leaf->utf8nfkdicf) {
+ *data++ = DECOMPOSE;
+ s = (unsigned char*)leaf->utf8nfkdicf;
+ while ((*data++ = *s++) != 0)
+ ;
+ } else if (leaf->utf8nfkdi) {
+ *data++ = DECOMPOSE;
+ s = (unsigned char*)leaf->utf8nfkdi;
+ while ((*data++ = *s++) != 0)
+ ;
+ } else {
+ *data++ = leaf->ccc;
+ }
+ return data;
+}
+
+static void utf8_create(struct unicode_data *data)
+{
+ char utf[18*4+1];
+ char *u;
+ unsigned int *um;
+ int i;
+
+ if (data->utf8nfkdi) {
+ assert(data->utf8nfkdi[0] == HANGUL);
+ return;
+ }
+
+ u = utf;
+ um = data->utf32nfkdi;
+ if (um) {
+ for (i = 0; um[i]; i++)
+ u += utf8encode(u, um[i]);
+ *u = '\0';
+ data->utf8nfkdi = strdup(utf);
+ }
+ u = utf;
+ um = data->utf32nfkdicf;
+ if (um) {
+ for (i = 0; um[i]; i++)
+ u += utf8encode(u, um[i]);
+ *u = '\0';
+ if (!data->utf8nfkdi || strcmp(data->utf8nfkdi, utf))
+ data->utf8nfkdicf = strdup(utf);
+ }
+}
+
+static void utf8_init(void)
+{
+ unsigned int unichar;
+ int i;
+
+ for (unichar = 0; unichar != 0x110000; unichar++)
+ utf8_create(&unicode_data[unichar]);
+
+ for (i = 0; i != corrections_count; i++)
+ utf8_create(&corrections[i]);
+}
+
+static void trees_init(void)
+{
+ struct unicode_data *data;
+ unsigned int maxage;
+ unsigned int nextage;
+ int count;
+ int i;
+ int j;
+
+ /* Count the number of different ages. */
+ count = 0;
+ nextage = (unsigned int)-1;
+ do {
+ maxage = nextage;
+ nextage = 0;
+ for (i = 0; i <= corrections_count; i++) {
+ data = &corrections[i];
+ if (nextage < data->correction &&
+ data->correction < maxage)
+ nextage = data->correction;
+ }
+ count++;
+ } while (nextage);
+
+ /* Two trees per age: nfkdi and nfkdicf */
+ trees_count = count * 2;
+ trees = calloc(trees_count, sizeof(struct tree));
+
+ /* Assign ages to the trees. */
+ count = trees_count;
+ nextage = (unsigned int)-1;
+ do {
+ maxage = nextage;
+ trees[--count].maxage = maxage;
+ trees[--count].maxage = maxage;
+ nextage = 0;
+ for (i = 0; i <= corrections_count; i++) {
+ data = &corrections[i];
+ if (nextage < data->correction &&
+ data->correction < maxage)
+ nextage = data->correction;
+ }
+ } while (nextage);
+
+ /* The ages assigned above are off by one. */
+ for (i = 0; i != trees_count; i++) {
+ j = 0;
+ while (ages[j] < trees[i].maxage)
+ j++;
+ trees[i].maxage = ages[j-1];
+ }
+
+ /* Set up the forwarding between trees. */
+ trees[trees_count-2].next = &trees[trees_count-1];
+ trees[trees_count-1].leaf_mark = nfkdi_mark;
+ trees[trees_count-2].leaf_mark = nfkdicf_mark;
+ for (i = 0; i != trees_count-2; i += 2) {
+ trees[i].next = &trees[trees_count-2];
+ trees[i].leaf_mark = correction_mark;
+ trees[i+1].next = &trees[trees_count-1];
+ trees[i+1].leaf_mark = correction_mark;
+ }
+
+ /* Assign the callouts. */
+ for (i = 0; i != trees_count; i += 2) {
+ trees[i].type = "nfkdicf";
+ trees[i].leaf_equal = nfkdicf_equal;
+ trees[i].leaf_print = nfkdicf_print;
+ trees[i].leaf_size = nfkdicf_size;
+ trees[i].leaf_index = nfkdicf_index;
+ trees[i].leaf_emit = nfkdicf_emit;
+
+ trees[i+1].type = "nfkdi";
+ trees[i+1].leaf_equal = nfkdi_equal;
+ trees[i+1].leaf_print = nfkdi_print;
+ trees[i+1].leaf_size = nfkdi_size;
+ trees[i+1].leaf_index = nfkdi_index;
+ trees[i+1].leaf_emit = nfkdi_emit;
+ }
+
+ /* Finish init. */
+ for (i = 0; i != trees_count; i++)
+ trees[i].childnode = NODE;
+}
+
+static void trees_populate(void)
+{
+ struct unicode_data *data;
+ unsigned int unichar;
+ char keyval[4];
+ int keylen;
+ int i;
+
+ for (i = 0; i != trees_count; i++) {
+ if (verbose > 0) {
+ printf("Populating %s_%x\n",
+ trees[i].type, trees[i].maxage);
+ }
+ for (unichar = 0; unichar != 0x110000; unichar++) {
+ if (unicode_data[unichar].gen < 0)
+ continue;
+ keylen = utf8encode(keyval, unichar);
+ data = corrections_lookup(&unicode_data[unichar]);
+ if (data->correction <= trees[i].maxage)
+ data = &unicode_data[unichar];
+ insert(&trees[i], keyval, keylen, data);
+ }
+ }
+}
+
+static void trees_reduce(void)
+{
+ int i;
+ int size;
+ int changed;
+
+ for (i = 0; i != trees_count; i++)
+ prune(&trees[i]);
+ for (i = 0; i != trees_count; i++)
+ mark_nodes(&trees[i]);
+ do {
+ size = 0;
+ for (i = 0; i != trees_count; i++)
+ size = index_nodes(&trees[i], size);
+ changed = 0;
+ for (i = 0; i != trees_count; i++)
+ changed += size_nodes(&trees[i]);
+ } while (changed);
+
+ utf8data = calloc(size, 1);
+ utf8data_size = size;
+ for (i = 0; i != trees_count; i++)
+ emit(&trees[i], utf8data);
+
+ if (verbose > 0) {
+ for (i = 0; i != trees_count; i++) {
+ printf("%s_%x idx %d\n",
+ trees[i].type, trees[i].maxage, trees[i].index);
+ }
+ }
+
+ nfkdi = utf8data + trees[trees_count-1].index;
+ nfkdicf = utf8data + trees[trees_count-2].index;
+
+ nfkdi_tree = &trees[trees_count-1];
+ nfkdicf_tree = &trees[trees_count-2];
+}
+
+static void verify(struct tree *tree)
+{
+ struct unicode_data *data;
+ utf8leaf_t *leaf;
+ unsigned int unichar;
+ char key[4];
+ unsigned char hangul[UTF8HANGULLEAF];
+ int report;
+ int nocf;
+
+ if (verbose > 0)
+ printf("Verifying %s_%x\n", tree->type, tree->maxage);
+ nocf = strcmp(tree->type, "nfkdicf");
+
+ for (unichar = 0; unichar != 0x110000; unichar++) {
+ report = 0;
+ data = corrections_lookup(&unicode_data[unichar]);
+ if (data->correction <= tree->maxage)
+ data = &unicode_data[unichar];
+ utf8encode(key,unichar);
+ leaf = utf8lookup(tree, hangul, key);
+
+ if (!leaf) {
+ if (data->gen != -1)
+ report++;
+ if (unichar < 0xd800 || unichar > 0xdfff)
+ report++;
+ } else {
+ if (unichar >= 0xd800 && unichar <= 0xdfff)
+ report++;
+ if (data->gen == -1)
+ report++;
+ if (data->gen != LEAF_GEN(leaf))
+ report++;
+ if (LEAF_CCC(leaf) == DECOMPOSE) {
+ if (HANGUL_SYLLABLE(data->code)) {
+ if (data->utf8nfkdi[0] != HANGUL)
+ report++;
+ } else if (nocf) {
+ if (!data->utf8nfkdi) {
+ report++;
+ } else if (strcmp(data->utf8nfkdi,
+ LEAF_STR(leaf))) {
+ report++;
+ }
+ } else {
+ if (!data->utf8nfkdicf &&
+ !data->utf8nfkdi) {
+ report++;
+ } else if (data->utf8nfkdicf) {
+ if (strcmp(data->utf8nfkdicf,
+ LEAF_STR(leaf)))
+ report++;
+ } else if (strcmp(data->utf8nfkdi,
+ LEAF_STR(leaf))) {
+ report++;
+ }
+ }
+ } else if (data->ccc != LEAF_CCC(leaf)) {
+ report++;
+ }
+ }
+ if (report) {
+ printf("%X code %X gen %d ccc %d"
+ " nfkdi -> \"%s\"",
+ unichar, data->code, data->gen,
+ data->ccc,
+ data->utf8nfkdi);
+ if (leaf) {
+ printf(" gen %d ccc %d"
+ " nfkdi -> \"%s\"",
+ LEAF_GEN(leaf),
+ LEAF_CCC(leaf),
+ LEAF_CCC(leaf) == DECOMPOSE ?
+ LEAF_STR(leaf) : "");
+ }
+ printf("\n");
+ }
+ }
+}
+
+static void trees_verify(void)
+{
+ int i;
+
+ for (i = 0; i != trees_count; i++)
+ verify(&trees[i]);
+}
+
+/* ------------------------------------------------------------------ */
+
+static void help(void)
+{
+ printf("Usage: %s [options]\n", argv0);
+ printf("\n");
+ printf("This program creates an a data trie used for parsing and\n");
+ printf("normalization of UTF-8 strings. The trie is derived from\n");
+ printf("a set of input files from the Unicode character database\n");
+ printf("found at: http://www.unicode.org/Public/UCD/latest/ucd/\n");
+ printf("\n");
+ printf("The generated tree supports two normalization forms:\n");
+ printf("\n");
+ printf("\tnfkdi:\n");
+ printf("\t- Apply unicode normalization form NFKD.\n");
+ printf("\t- Remove any Default_Ignorable_Code_Point.\n");
+ printf("\n");
+ printf("\tnfkdicf:\n");
+ printf("\t- Apply unicode normalization form NFKD.\n");
+ printf("\t- Remove any Default_Ignorable_Code_Point.\n");
+ printf("\t- Apply a full casefold (C + F).\n");
+ printf("\n");
+ printf("These forms were chosen as being most useful when dealing\n");
+ printf("with file names: NFKD catches most cases where characters\n");
+ printf("should be considered equivalent. The ignorables are mostly\n");
+ printf("invisible, making names hard to type.\n");
+ printf("\n");
+ printf("The options to specify the files to be used are listed\n");
+ printf("below with their default values, which are the names used\n");
+ printf("by version 11.0.0 of the Unicode Character Database.\n");
+ printf("\n");
+ printf("The input files:\n");
+ printf("\t-a %s\n", AGE_NAME);
+ printf("\t-c %s\n", CCC_NAME);
+ printf("\t-p %s\n", PROP_NAME);
+ printf("\t-d %s\n", DATA_NAME);
+ printf("\t-f %s\n", FOLD_NAME);
+ printf("\t-n %s\n", NORM_NAME);
+ printf("\n");
+ printf("Additionally, the generated tables are tested using:\n");
+ printf("\t-t %s\n", TEST_NAME);
+ printf("\n");
+ printf("Finally, the output file:\n");
+ printf("\t-o %s\n", UTF8_NAME);
+ printf("\n");
+}
+
+static void usage(void)
+{
+ help();
+ exit(1);
+}
+
+static void open_fail(const char *name, int error)
+{
+ printf("Error %d opening %s: %s\n", error, name, strerror(error));
+ exit(1);
+}
+
+static void file_fail(const char *filename)
+{
+ printf("Error parsing %s\n", filename);
+ exit(1);
+}
+
+static void line_fail(const char *filename, const char *line)
+{
+ printf("Error parsing %s:%s\n", filename, line);
+ exit(1);
+}
+
+/* ------------------------------------------------------------------ */
+
+static void print_utf32(unsigned int *utf32str)
+{
+ int i;
+
+ for (i = 0; utf32str[i]; i++)
+ printf(" %X", utf32str[i]);
+}
+
+static void print_utf32nfkdi(unsigned int unichar)
+{
+ printf(" %X ->", unichar);
+ print_utf32(unicode_data[unichar].utf32nfkdi);
+ printf("\n");
+}
+
+static void print_utf32nfkdicf(unsigned int unichar)
+{
+ printf(" %X ->", unichar);
+ print_utf32(unicode_data[unichar].utf32nfkdicf);
+ printf("\n");
+}
+
+/* ------------------------------------------------------------------ */
+
+static void age_init(void)
+{
+ FILE *file;
+ unsigned int first;
+ unsigned int last;
+ unsigned int unichar;
+ unsigned int major;
+ unsigned int minor;
+ unsigned int revision;
+ int gen;
+ int count;
+ int ret;
+
+ if (verbose > 0)
+ printf("Parsing %s\n", age_name);
+
+ file = fopen(age_name, "r");
+ if (!file)
+ open_fail(age_name, errno);
+ count = 0;
+
+ gen = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "# Age=V%d_%d_%d",
+ &major, &minor, &revision);
+ if (ret == 3) {
+ ages_count++;
+ if (verbose > 1)
+ printf(" Age V%d_%d_%d\n",
+ major, minor, revision);
+ if (!age_valid(major, minor, revision))
+ line_fail(age_name, line);
+ continue;
+ }
+ ret = sscanf(line, "# Age=V%d_%d", &major, &minor);
+ if (ret == 2) {
+ ages_count++;
+ if (verbose > 1)
+ printf(" Age V%d_%d\n", major, minor);
+ if (!age_valid(major, minor, 0))
+ line_fail(age_name, line);
+ continue;
+ }
+ }
+
+ /* We must have found something above. */
+ if (verbose > 1)
+ printf("%d age entries\n", ages_count);
+ if (ages_count == 0 || ages_count > MAXGEN)
+ file_fail(age_name);
+
+ /* There is a 0 entry. */
+ ages_count++;
+ ages = calloc(ages_count + 1, sizeof(*ages));
+ /* And a guard entry. */
+ ages[ages_count] = (unsigned int)-1;
+
+ rewind(file);
+ count = 0;
+ gen = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "# Age=V%d_%d_%d",
+ &major, &minor, &revision);
+ if (ret == 3) {
+ ages[++gen] =
+ UNICODE_AGE(major, minor, revision);
+ if (verbose > 1)
+ printf(" Age V%d_%d_%d = gen %d\n",
+ major, minor, revision, gen);
+ if (!age_valid(major, minor, revision))
+ line_fail(age_name, line);
+ continue;
+ }
+ ret = sscanf(line, "# Age=V%d_%d", &major, &minor);
+ if (ret == 2) {
+ ages[++gen] = UNICODE_AGE(major, minor, 0);
+ if (verbose > 1)
+ printf(" Age V%d_%d = %d\n",
+ major, minor, gen);
+ if (!age_valid(major, minor, 0))
+ line_fail(age_name, line);
+ continue;
+ }
+ ret = sscanf(line, "%X..%X ; %d.%d #",
+ &first, &last, &major, &minor);
+ if (ret == 4) {
+ for (unichar = first; unichar <= last; unichar++)
+ unicode_data[unichar].gen = gen;
+ count += 1 + last - first;
+ if (verbose > 1)
+ printf(" %X..%X gen %d\n", first, last, gen);
+ if (!utf32valid(first) || !utf32valid(last))
+ line_fail(age_name, line);
+ continue;
+ }
+ ret = sscanf(line, "%X ; %d.%d #", &unichar, &major, &minor);
+ if (ret == 3) {
+ unicode_data[unichar].gen = gen;
+ count++;
+ if (verbose > 1)
+ printf(" %X gen %d\n", unichar, gen);
+ if (!utf32valid(unichar))
+ line_fail(age_name, line);
+ continue;
+ }
+ }
+ unicode_maxage = ages[gen];
+ fclose(file);
+
+ /* Nix surrogate block */
+ if (verbose > 1)
+ printf(" Removing surrogate block D800..DFFF\n");
+ for (unichar = 0xd800; unichar <= 0xdfff; unichar++)
+ unicode_data[unichar].gen = -1;
+
+ if (verbose > 0)
+ printf("Found %d entries\n", count);
+ if (count == 0)
+ file_fail(age_name);
+}
+
+static void ccc_init(void)
+{
+ FILE *file;
+ unsigned int first;
+ unsigned int last;
+ unsigned int unichar;
+ unsigned int value;
+ int count;
+ int ret;
+
+ if (verbose > 0)
+ printf("Parsing %s\n", ccc_name);
+
+ file = fopen(ccc_name, "r");
+ if (!file)
+ open_fail(ccc_name, errno);
+
+ count = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "%X..%X ; %d #", &first, &last, &value);
+ if (ret == 3) {
+ for (unichar = first; unichar <= last; unichar++) {
+ unicode_data[unichar].ccc = value;
+ count++;
+ }
+ if (verbose > 1)
+ printf(" %X..%X ccc %d\n", first, last, value);
+ if (!utf32valid(first) || !utf32valid(last))
+ line_fail(ccc_name, line);
+ continue;
+ }
+ ret = sscanf(line, "%X ; %d #", &unichar, &value);
+ if (ret == 2) {
+ unicode_data[unichar].ccc = value;
+ count++;
+ if (verbose > 1)
+ printf(" %X ccc %d\n", unichar, value);
+ if (!utf32valid(unichar))
+ line_fail(ccc_name, line);
+ continue;
+ }
+ }
+ fclose(file);
+
+ if (verbose > 0)
+ printf("Found %d entries\n", count);
+ if (count == 0)
+ file_fail(ccc_name);
+}
+
+static void nfkdi_init(void)
+{
+ FILE *file;
+ unsigned int unichar;
+ unsigned int mapping[19]; /* Magic - guaranteed not to be exceeded. */
+ char *s;
+ unsigned int *um;
+ int count;
+ int i;
+ int ret;
+
+ if (verbose > 0)
+ printf("Parsing %s\n", data_name);
+ file = fopen(data_name, "r");
+ if (!file)
+ open_fail(data_name, errno);
+
+ count = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "%X;%*[^;];%*[^;];%*[^;];%*[^;];%[^;];",
+ &unichar, buf0);
+ if (ret != 2)
+ continue;
+ if (!utf32valid(unichar))
+ line_fail(data_name, line);
+
+ s = buf0;
+ /* skip over <tag> */
+ if (*s == '<')
+ while (*s++ != ' ')
+ ;
+ /* decode the decomposition into UTF-32 */
+ i = 0;
+ while (*s) {
+ mapping[i] = strtoul(s, &s, 16);
+ if (!utf32valid(mapping[i]))
+ line_fail(data_name, line);
+ i++;
+ }
+ mapping[i++] = 0;
+
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ unicode_data[unichar].utf32nfkdi = um;
+
+ if (verbose > 1)
+ print_utf32nfkdi(unichar);
+ count++;
+ }
+ fclose(file);
+ if (verbose > 0)
+ printf("Found %d entries\n", count);
+ if (count == 0)
+ file_fail(data_name);
+}
+
+static void nfkdicf_init(void)
+{
+ FILE *file;
+ unsigned int unichar;
+ unsigned int mapping[19]; /* Magic - guaranteed not to be exceeded. */
+ char status;
+ char *s;
+ unsigned int *um;
+ int i;
+ int count;
+ int ret;
+
+ if (verbose > 0)
+ printf("Parsing %s\n", fold_name);
+ file = fopen(fold_name, "r");
+ if (!file)
+ open_fail(fold_name, errno);
+
+ count = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "%X; %c; %[^;];", &unichar, &status, buf0);
+ if (ret != 3)
+ continue;
+ if (!utf32valid(unichar))
+ line_fail(fold_name, line);
+ /* Use the C+F casefold. */
+ if (status != 'C' && status != 'F')
+ continue;
+ s = buf0;
+ if (*s == '<')
+ while (*s++ != ' ')
+ ;
+ i = 0;
+ while (*s) {
+ mapping[i] = strtoul(s, &s, 16);
+ if (!utf32valid(mapping[i]))
+ line_fail(fold_name, line);
+ i++;
+ }
+ mapping[i++] = 0;
+
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ unicode_data[unichar].utf32nfkdicf = um;
+
+ if (verbose > 1)
+ print_utf32nfkdicf(unichar);
+ count++;
+ }
+ fclose(file);
+ if (verbose > 0)
+ printf("Found %d entries\n", count);
+ if (count == 0)
+ file_fail(fold_name);
+}
+
+static void ignore_init(void)
+{
+ FILE *file;
+ unsigned int unichar;
+ unsigned int first;
+ unsigned int last;
+ unsigned int *um;
+ int count;
+ int ret;
+
+ if (verbose > 0)
+ printf("Parsing %s\n", prop_name);
+ file = fopen(prop_name, "r");
+ if (!file)
+ open_fail(prop_name, errno);
+ assert(file);
+ count = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "%X..%X ; %s # ", &first, &last, buf0);
+ if (ret == 3) {
+ if (strcmp(buf0, "Default_Ignorable_Code_Point"))
+ continue;
+ if (!utf32valid(first) || !utf32valid(last))
+ line_fail(prop_name, line);
+ for (unichar = first; unichar <= last; unichar++) {
+ free(unicode_data[unichar].utf32nfkdi);
+ um = malloc(sizeof(unsigned int));
+ *um = 0;
+ unicode_data[unichar].utf32nfkdi = um;
+ free(unicode_data[unichar].utf32nfkdicf);
+ um = malloc(sizeof(unsigned int));
+ *um = 0;
+ unicode_data[unichar].utf32nfkdicf = um;
+ count++;
+ }
+ if (verbose > 1)
+ printf(" %X..%X Default_Ignorable_Code_Point\n",
+ first, last);
+ continue;
+ }
+ ret = sscanf(line, "%X ; %s # ", &unichar, buf0);
+ if (ret == 2) {
+ if (strcmp(buf0, "Default_Ignorable_Code_Point"))
+ continue;
+ if (!utf32valid(unichar))
+ line_fail(prop_name, line);
+ free(unicode_data[unichar].utf32nfkdi);
+ um = malloc(sizeof(unsigned int));
+ *um = 0;
+ unicode_data[unichar].utf32nfkdi = um;
+ free(unicode_data[unichar].utf32nfkdicf);
+ um = malloc(sizeof(unsigned int));
+ *um = 0;
+ unicode_data[unichar].utf32nfkdicf = um;
+ if (verbose > 1)
+ printf(" %X Default_Ignorable_Code_Point\n",
+ unichar);
+ count++;
+ continue;
+ }
+ }
+ fclose(file);
+
+ if (verbose > 0)
+ printf("Found %d entries\n", count);
+ if (count == 0)
+ file_fail(prop_name);
+}
+
+static void corrections_init(void)
+{
+ FILE *file;
+ unsigned int unichar;
+ unsigned int major;
+ unsigned int minor;
+ unsigned int revision;
+ unsigned int age;
+ unsigned int *um;
+ unsigned int mapping[19]; /* Magic - guaranteed not to be exceeded. */
+ char *s;
+ int i;
+ int count;
+ int ret;
+
+ if (verbose > 0)
+ printf("Parsing %s\n", norm_name);
+ file = fopen(norm_name, "r");
+ if (!file)
+ open_fail(norm_name, errno);
+
+ count = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "%X;%[^;];%[^;];%d.%d.%d #",
+ &unichar, buf0, buf1,
+ &major, &minor, &revision);
+ if (ret != 6)
+ continue;
+ if (!utf32valid(unichar) || !age_valid(major, minor, revision))
+ line_fail(norm_name, line);
+ count++;
+ }
+ corrections = calloc(count, sizeof(struct unicode_data));
+ corrections_count = count;
+ rewind(file);
+
+ count = 0;
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "%X;%[^;];%[^;];%d.%d.%d #",
+ &unichar, buf0, buf1,
+ &major, &minor, &revision);
+ if (ret != 6)
+ continue;
+ if (!utf32valid(unichar) || !age_valid(major, minor, revision))
+ line_fail(norm_name, line);
+ corrections[count] = unicode_data[unichar];
+ assert(corrections[count].code == unichar);
+ age = UNICODE_AGE(major, minor, revision);
+ corrections[count].correction = age;
+
+ i = 0;
+ s = buf0;
+ while (*s) {
+ mapping[i] = strtoul(s, &s, 16);
+ if (!utf32valid(mapping[i]))
+ line_fail(norm_name, line);
+ i++;
+ }
+ mapping[i++] = 0;
+
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ corrections[count].utf32nfkdi = um;
+
+ if (verbose > 1)
+ printf(" %X -> %s -> %s V%d_%d_%d\n",
+ unichar, buf0, buf1, major, minor, revision);
+ count++;
+ }
+ fclose(file);
+
+ if (verbose > 0)
+ printf("Found %d entries\n", count);
+ if (count == 0)
+ file_fail(norm_name);
+}
+
+/* ------------------------------------------------------------------ */
+
+/*
+ * Hangul decomposition (algorithm from Section 3.12 of Unicode 6.3.0)
+ *
+ * AC00;<Hangul Syllable, First>;Lo;0;L;;;;;N;;;;;
+ * D7A3;<Hangul Syllable, Last>;Lo;0;L;;;;;N;;;;;
+ *
+ * SBase = 0xAC00
+ * LBase = 0x1100
+ * VBase = 0x1161
+ * TBase = 0x11A7
+ * LCount = 19
+ * VCount = 21
+ * TCount = 28
+ * NCount = 588 (VCount * TCount)
+ * SCount = 11172 (LCount * NCount)
+ *
+ * Decomposition:
+ * SIndex = s - SBase
+ *
+ * LV (Canonical/Full)
+ * LIndex = SIndex / NCount
+ * VIndex = (Sindex % NCount) / TCount
+ * LPart = LBase + LIndex
+ * VPart = VBase + VIndex
+ *
+ * LVT (Canonical)
+ * LVIndex = (SIndex / TCount) * TCount
+ * TIndex = (Sindex % TCount)
+ * LVPart = SBase + LVIndex
+ * TPart = TBase + TIndex
+ *
+ * LVT (Full)
+ * LIndex = SIndex / NCount
+ * VIndex = (Sindex % NCount) / TCount
+ * TIndex = (Sindex % TCount)
+ * LPart = LBase + LIndex
+ * VPart = VBase + VIndex
+ * if (TIndex == 0) {
+ * d = <LPart, VPart>
+ * } else {
+ * TPart = TBase + TIndex
+ * d = <LPart, VPart, TPart>
+ * }
+ *
+ */
+
+static void hangul_decompose(void)
+{
+ unsigned int sb = 0xAC00;
+ unsigned int lb = 0x1100;
+ unsigned int vb = 0x1161;
+ unsigned int tb = 0x11a7;
+ /* unsigned int lc = 19; */
+ unsigned int vc = 21;
+ unsigned int tc = 28;
+ unsigned int nc = (vc * tc);
+ /* unsigned int sc = (lc * nc); */
+ unsigned int unichar;
+ unsigned int mapping[4];
+ unsigned int *um;
+ int count;
+ int i;
+
+ if (verbose > 0)
+ printf("Decomposing hangul\n");
+ /* Hangul */
+ count = 0;
+ for (unichar = 0xAC00; unichar <= 0xD7A3; unichar++) {
+ unsigned int si = unichar - sb;
+ unsigned int li = si / nc;
+ unsigned int vi = (si % nc) / tc;
+ unsigned int ti = si % tc;
+
+ i = 0;
+ mapping[i++] = lb + li;
+ mapping[i++] = vb + vi;
+ if (ti)
+ mapping[i++] = tb + ti;
+ mapping[i++] = 0;
+
+ assert(!unicode_data[unichar].utf32nfkdi);
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ unicode_data[unichar].utf32nfkdi = um;
+
+ assert(!unicode_data[unichar].utf32nfkdicf);
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ unicode_data[unichar].utf32nfkdicf = um;
+
+ /*
+ * Add a cookie as a reminder that the hangul syllable
+ * decompositions must not be stored in the generated
+ * trie.
+ */
+ unicode_data[unichar].utf8nfkdi = malloc(2);
+ unicode_data[unichar].utf8nfkdi[0] = HANGUL;
+ unicode_data[unichar].utf8nfkdi[1] = '\0';
+
+ if (verbose > 1)
+ print_utf32nfkdi(unichar);
+
+ count++;
+ }
+ if (verbose > 0)
+ printf("Created %d entries\n", count);
+}
+
+static void nfkdi_decompose(void)
+{
+ unsigned int unichar;
+ unsigned int mapping[19]; /* Magic - guaranteed not to be exceeded. */
+ unsigned int *um;
+ unsigned int *dc;
+ int count;
+ int i;
+ int j;
+ int ret;
+
+ if (verbose > 0)
+ printf("Decomposing nfkdi\n");
+
+ count = 0;
+ for (unichar = 0; unichar != 0x110000; unichar++) {
+ if (!unicode_data[unichar].utf32nfkdi)
+ continue;
+ for (;;) {
+ ret = 1;
+ i = 0;
+ um = unicode_data[unichar].utf32nfkdi;
+ while (*um) {
+ dc = unicode_data[*um].utf32nfkdi;
+ if (dc) {
+ for (j = 0; dc[j]; j++)
+ mapping[i++] = dc[j];
+ ret = 0;
+ } else {
+ mapping[i++] = *um;
+ }
+ um++;
+ }
+ mapping[i++] = 0;
+ if (ret)
+ break;
+ free(unicode_data[unichar].utf32nfkdi);
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ unicode_data[unichar].utf32nfkdi = um;
+ }
+ /* Add this decomposition to nfkdicf if there is no entry. */
+ if (!unicode_data[unichar].utf32nfkdicf) {
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ unicode_data[unichar].utf32nfkdicf = um;
+ }
+ if (verbose > 1)
+ print_utf32nfkdi(unichar);
+ count++;
+ }
+ if (verbose > 0)
+ printf("Processed %d entries\n", count);
+}
+
+static void nfkdicf_decompose(void)
+{
+ unsigned int unichar;
+ unsigned int mapping[19]; /* Magic - guaranteed not to be exceeded. */
+ unsigned int *um;
+ unsigned int *dc;
+ int count;
+ int i;
+ int j;
+ int ret;
+
+ if (verbose > 0)
+ printf("Decomposing nfkdicf\n");
+ count = 0;
+ for (unichar = 0; unichar != 0x110000; unichar++) {
+ if (!unicode_data[unichar].utf32nfkdicf)
+ continue;
+ for (;;) {
+ ret = 1;
+ i = 0;
+ um = unicode_data[unichar].utf32nfkdicf;
+ while (*um) {
+ dc = unicode_data[*um].utf32nfkdicf;
+ if (dc) {
+ for (j = 0; dc[j]; j++)
+ mapping[i++] = dc[j];
+ ret = 0;
+ } else {
+ mapping[i++] = *um;
+ }
+ um++;
+ }
+ mapping[i++] = 0;
+ if (ret)
+ break;
+ free(unicode_data[unichar].utf32nfkdicf);
+ um = malloc(i * sizeof(unsigned int));
+ memcpy(um, mapping, i * sizeof(unsigned int));
+ unicode_data[unichar].utf32nfkdicf = um;
+ }
+ if (verbose > 1)
+ print_utf32nfkdicf(unichar);
+ count++;
+ }
+ if (verbose > 0)
+ printf("Processed %d entries\n", count);
+}
+
+/* ------------------------------------------------------------------ */
+
+int utf8agemax(struct tree *, const char *);
+int utf8nagemax(struct tree *, const char *, size_t);
+int utf8agemin(struct tree *, const char *);
+int utf8nagemin(struct tree *, const char *, size_t);
+ssize_t utf8len(struct tree *, const char *);
+ssize_t utf8nlen(struct tree *, const char *, size_t);
+struct utf8cursor;
+int utf8cursor(struct utf8cursor *, struct tree *, const char *);
+int utf8ncursor(struct utf8cursor *, struct tree *, const char *, size_t);
+int utf8byte(struct utf8cursor *);
+
+/*
+ * Hangul decomposition (algorithm from Section 3.12 of Unicode 6.3.0)
+ *
+ * AC00;<Hangul Syllable, First>;Lo;0;L;;;;;N;;;;;
+ * D7A3;<Hangul Syllable, Last>;Lo;0;L;;;;;N;;;;;
+ *
+ * SBase = 0xAC00
+ * LBase = 0x1100
+ * VBase = 0x1161
+ * TBase = 0x11A7
+ * LCount = 19
+ * VCount = 21
+ * TCount = 28
+ * NCount = 588 (VCount * TCount)
+ * SCount = 11172 (LCount * NCount)
+ *
+ * Decomposition:
+ * SIndex = s - SBase
+ *
+ * LV (Canonical/Full)
+ * LIndex = SIndex / NCount
+ * VIndex = (Sindex % NCount) / TCount
+ * LPart = LBase + LIndex
+ * VPart = VBase + VIndex
+ *
+ * LVT (Canonical)
+ * LVIndex = (SIndex / TCount) * TCount
+ * TIndex = (Sindex % TCount)
+ * LVPart = SBase + LVIndex
+ * TPart = TBase + TIndex
+ *
+ * LVT (Full)
+ * LIndex = SIndex / NCount
+ * VIndex = (Sindex % NCount) / TCount
+ * TIndex = (Sindex % TCount)
+ * LPart = LBase + LIndex
+ * VPart = VBase + VIndex
+ * if (TIndex == 0) {
+ * d = <LPart, VPart>
+ * } else {
+ * TPart = TBase + TIndex
+ * d = <LPart, VPart, TPart>
+ * }
+ */
+
+/* Constants */
+#define SB (0xAC00)
+#define LB (0x1100)
+#define VB (0x1161)
+#define TB (0x11A7)
+#define LC (19)
+#define VC (21)
+#define TC (28)
+#define NC (VC * TC)
+#define SC (LC * NC)
+
+/* Algorithmic decomposition of hangul syllable. */
+static utf8leaf_t *utf8hangul(const char *str, unsigned char *hangul)
+{
+ unsigned int si;
+ unsigned int li;
+ unsigned int vi;
+ unsigned int ti;
+ unsigned char *h;
+
+ /* Calculate the SI, LI, VI, and TI values. */
+ si = utf8decode(str) - SB;
+ li = si / NC;
+ vi = (si % NC) / TC;
+ ti = si % TC;
+
+ /* Fill in base of leaf. */
+ h = hangul;
+ LEAF_GEN(h) = 2;
+ LEAF_CCC(h) = DECOMPOSE;
+ h += 2;
+
+ /* Add LPart, a 3-byte UTF-8 sequence. */
+ h += utf8encode((char *)h, li + LB);
+
+ /* Add VPart, a 3-byte UTF-8 sequence. */
+ h += utf8encode((char *)h, vi + VB);
+
+ /* Add TPart if required, also a 3-byte UTF-8 sequence. */
+ if (ti)
+ h += utf8encode((char *)h, ti + TB);
+
+ /* Terminate string. */
+ h[0] = '\0';
+
+ return hangul;
+}
+
+/*
+ * Use trie to scan s, touching at most len bytes.
+ * Returns the leaf if one exists, NULL otherwise.
+ *
+ * A non-NULL return guarantees that the UTF-8 sequence starting at s
+ * is well-formed and corresponds to a known unicode code point. The
+ * shorthand for this will be "is valid UTF-8 unicode".
+ */
+static utf8leaf_t *utf8nlookup(struct tree *tree, unsigned char *hangul,
+ const char *s, size_t len)
+{
+ utf8trie_t *trie = utf8data + tree->index;
+ int offlen;
+ int offset;
+ int mask;
+ int node;
+
+ if (!tree)
+ return NULL;
+ if (len == 0)
+ return NULL;
+ node = 1;
+ while (node) {
+ offlen = (*trie & OFFLEN) >> OFFLEN_SHIFT;
+ if (*trie & NEXTBYTE) {
+ if (--len == 0)
+ return NULL;
+ s++;
+ }
+ mask = 1 << (*trie & BITNUM);
+ if (*s & mask) {
+ /* Right leg */
+ if (offlen) {
+ /* Right node at offset of trie */
+ node = (*trie & RIGHTNODE);
+ offset = trie[offlen];
+ while (--offlen) {
+ offset <<= 8;
+ offset |= trie[offlen];
+ }
+ trie += offset;
+ } else if (*trie & RIGHTPATH) {
+ /* Right node after this node */
+ node = (*trie & TRIENODE);
+ trie++;
+ } else {
+ /* No right node. */
+ return NULL;
+ }
+ } else {
+ /* Left leg */
+ if (offlen) {
+ /* Left node after this node. */
+ node = (*trie & LEFTNODE);
+ trie += offlen + 1;
+ } else if (*trie & RIGHTPATH) {
+ /* No left node. */
+ return NULL;
+ } else {
+ /* Left node after this node */
+ node = (*trie & TRIENODE);
+ trie++;
+ }
+ }
+ }
+ /*
+ * Hangul decomposition is done algorithmically. These are the
+ * codepoints >= 0xAC00 and <= 0xD7A3. Their UTF-8 encoding is
+ * always 3 bytes long, so s has been advanced twice, and the
+ * start of the sequence is at s-2.
+ */
+ if (LEAF_CCC(trie) == DECOMPOSE && LEAF_STR(trie)[0] == HANGUL)
+ trie = utf8hangul(s - 2, hangul);
+ return trie;
+}
+
+/*
+ * Use trie to scan s.
+ * Returns the leaf if one exists, NULL otherwise.
+ *
+ * Forwards to trie_nlookup().
+ */
+static utf8leaf_t *utf8lookup(struct tree *tree, unsigned char *hangul,
+ const char *s)
+{
+ return utf8nlookup(tree, hangul, s, (size_t)-1);
+}
+
+/*
+ * Return the number of bytes used by the current UTF-8 sequence.
+ * Assumes the input points to the first byte of a valid UTF-8
+ * sequence.
+ */
+static inline int utf8clen(const char *s)
+{
+ unsigned char c = *s;
+ return 1 + (c >= 0xC0) + (c >= 0xE0) + (c >= 0xF0);
+}
+
+/*
+ * Maximum age of any character in s.
+ * Return -1 if s is not valid UTF-8 unicode.
+ * Return 0 if only non-assigned code points are used.
+ */
+int utf8agemax(struct tree *tree, const char *s)
+{
+ utf8leaf_t *leaf;
+ int age = 0;
+ int leaf_age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!tree)
+ return -1;
+
+ while (*s) {
+ leaf = utf8lookup(tree, hangul, s);
+ if (!leaf)
+ return -1;
+ leaf_age = ages[LEAF_GEN(leaf)];
+ if (leaf_age <= tree->maxage && leaf_age > age)
+ age = leaf_age;
+ s += utf8clen(s);
+ }
+ return age;
+}
+
+/*
+ * Minimum age of any character in s.
+ * Return -1 if s is not valid UTF-8 unicode.
+ * Return 0 if non-assigned code points are used.
+ */
+int utf8agemin(struct tree *tree, const char *s)
+{
+ utf8leaf_t *leaf;
+ int age;
+ int leaf_age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!tree)
+ return -1;
+ age = tree->maxage;
+ while (*s) {
+ leaf = utf8lookup(tree, hangul, s);
+ if (!leaf)
+ return -1;
+ leaf_age = ages[LEAF_GEN(leaf)];
+ if (leaf_age <= tree->maxage && leaf_age < age)
+ age = leaf_age;
+ s += utf8clen(s);
+ }
+ return age;
+}
+
+/*
+ * Maximum age of any character in s, touch at most len bytes.
+ * Return -1 if s is not valid UTF-8 unicode.
+ */
+int utf8nagemax(struct tree *tree, const char *s, size_t len)
+{
+ utf8leaf_t *leaf;
+ int age = 0;
+ int leaf_age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!tree)
+ return -1;
+
+ while (len && *s) {
+ leaf = utf8nlookup(tree, hangul, s, len);
+ if (!leaf)
+ return -1;
+ leaf_age = ages[LEAF_GEN(leaf)];
+ if (leaf_age <= tree->maxage && leaf_age > age)
+ age = leaf_age;
+ len -= utf8clen(s);
+ s += utf8clen(s);
+ }
+ return age;
+}
+
+/*
+ * Maximum age of any character in s, touch at most len bytes.
+ * Return -1 if s is not valid UTF-8 unicode.
+ */
+int utf8nagemin(struct tree *tree, const char *s, size_t len)
+{
+ utf8leaf_t *leaf;
+ int leaf_age;
+ int age;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!tree)
+ return -1;
+ age = tree->maxage;
+ while (len && *s) {
+ leaf = utf8nlookup(tree, hangul, s, len);
+ if (!leaf)
+ return -1;
+ leaf_age = ages[LEAF_GEN(leaf)];
+ if (leaf_age <= tree->maxage && leaf_age < age)
+ age = leaf_age;
+ len -= utf8clen(s);
+ s += utf8clen(s);
+ }
+ return age;
+}
+
+/*
+ * Length of the normalization of s.
+ * Return -1 if s is not valid UTF-8 unicode.
+ *
+ * A string of Default_Ignorable_Code_Point has length 0.
+ */
+ssize_t utf8len(struct tree *tree, const char *s)
+{
+ utf8leaf_t *leaf;
+ size_t ret = 0;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!tree)
+ return -1;
+ while (*s) {
+ leaf = utf8lookup(tree, hangul, s);
+ if (!leaf)
+ return -1;
+ if (ages[LEAF_GEN(leaf)] > tree->maxage)
+ ret += utf8clen(s);
+ else if (LEAF_CCC(leaf) == DECOMPOSE)
+ ret += strlen(LEAF_STR(leaf));
+ else
+ ret += utf8clen(s);
+ s += utf8clen(s);
+ }
+ return ret;
+}
+
+/*
+ * Length of the normalization of s, touch at most len bytes.
+ * Return -1 if s is not valid UTF-8 unicode.
+ */
+ssize_t utf8nlen(struct tree *tree, const char *s, size_t len)
+{
+ utf8leaf_t *leaf;
+ size_t ret = 0;
+ unsigned char hangul[UTF8HANGULLEAF];
+
+ if (!tree)
+ return -1;
+ while (len && *s) {
+ leaf = utf8nlookup(tree, hangul, s, len);
+ if (!leaf)
+ return -1;
+ if (ages[LEAF_GEN(leaf)] > tree->maxage)
+ ret += utf8clen(s);
+ else if (LEAF_CCC(leaf) == DECOMPOSE)
+ ret += strlen(LEAF_STR(leaf));
+ else
+ ret += utf8clen(s);
+ len -= utf8clen(s);
+ s += utf8clen(s);
+ }
+ return ret;
+}
+
+/*
+ * Cursor structure used by the normalizer.
+ */
+struct utf8cursor {
+ struct tree *tree;
+ const char *s;
+ const char *p;
+ const char *ss;
+ const char *sp;
+ unsigned int len;
+ unsigned int slen;
+ short int ccc;
+ short int nccc;
+ unsigned int unichar;
+ unsigned char hangul[UTF8HANGULLEAF];
+};
+
+/*
+ * Set up an utf8cursor for use by utf8byte().
+ *
+ * s : string.
+ * len : length of s.
+ * u8c : pointer to cursor.
+ * trie : utf8trie_t to use for normalization.
+ *
+ * Returns -1 on error, 0 on success.
+ */
+int utf8ncursor(struct utf8cursor *u8c, struct tree *tree, const char *s,
+ size_t len)
+{
+ if (!tree)
+ return -1;
+ if (!s)
+ return -1;
+ u8c->tree = tree;
+ u8c->s = s;
+ u8c->p = NULL;
+ u8c->ss = NULL;
+ u8c->sp = NULL;
+ u8c->len = len;
+ u8c->slen = 0;
+ u8c->ccc = STOPPER;
+ u8c->nccc = STOPPER;
+ u8c->unichar = 0;
+ /* Check we didn't clobber the maximum length. */
+ if (u8c->len != len)
+ return -1;
+ /* The first byte of s may not be an utf8 continuation. */
+ if (len > 0 && (*s & 0xC0) == 0x80)
+ return -1;
+ return 0;
+}
+
+/*
+ * Set up an utf8cursor for use by utf8byte().
+ *
+ * s : NUL-terminated string.
+ * u8c : pointer to cursor.
+ * trie : utf8trie_t to use for normalization.
+ *
+ * Returns -1 on error, 0 on success.
+ */
+int utf8cursor(struct utf8cursor *u8c, struct tree *tree, const char *s)
+{
+ return utf8ncursor(u8c, tree, s, (unsigned int)-1);
+}
+
+/*
+ * Get one byte from the normalized form of the string described by u8c.
+ *
+ * Returns the byte cast to an unsigned char on success, and -1 on failure.
+ *
+ * The cursor keeps track of the location in the string in u8c->s.
+ * When a character is decomposed, the current location is stored in
+ * u8c->p, and u8c->s is set to the start of the decomposition. Note
+ * that bytes from a decomposition do not count against u8c->len.
+ *
+ * Characters are emitted if they match the current CCC in u8c->ccc.
+ * Hitting end-of-string while u8c->ccc == STOPPER means we're done,
+ * and the function returns 0 in that case.
+ *
+ * Sorting by CCC is done by repeatedly scanning the string. The
+ * values of u8c->s and u8c->p are stored in u8c->ss and u8c->sp at
+ * the start of the scan. The first pass finds the lowest CCC to be
+ * emitted and stores it in u8c->nccc, the second pass emits the
+ * characters with this CCC and finds the next lowest CCC. This limits
+ * the number of passes to 1 + the number of different CCCs in the
+ * sequence being scanned.
+ *
+ * Therefore:
+ * u8c->p != NULL -> a decomposition is being scanned.
+ * u8c->ss != NULL -> this is a repeating scan.
+ * u8c->ccc == -1 -> this is the first scan of a repeating scan.
+ */
+int utf8byte(struct utf8cursor *u8c)
+{
+ utf8leaf_t *leaf;
+ int ccc;
+
+ for (;;) {
+ /* Check for the end of a decomposed character. */
+ if (u8c->p && *u8c->s == '\0') {
+ u8c->s = u8c->p;
+ u8c->p = NULL;
+ }
+
+ /* Check for end-of-string. */
+ if (!u8c->p && (u8c->len == 0 || *u8c->s == '\0')) {
+ /* There is no next byte. */
+ if (u8c->ccc == STOPPER)
+ return 0;
+ /* End-of-string during a scan counts as a stopper. */
+ ccc = STOPPER;
+ goto ccc_mismatch;
+ } else if ((*u8c->s & 0xC0) == 0x80) {
+ /* This is a continuation of the current character. */
+ if (!u8c->p)
+ u8c->len--;
+ return (unsigned char)*u8c->s++;
+ }
+
+ /* Look up the data for the current character. */
+ if (u8c->p) {
+ leaf = utf8lookup(u8c->tree, u8c->hangul, u8c->s);
+ } else {
+ leaf = utf8nlookup(u8c->tree, u8c->hangul,
+ u8c->s, u8c->len);
+ }
+
+ /* No leaf found implies that the input is a binary blob. */
+ if (!leaf)
+ return -1;
+
+ /* Characters that are too new have CCC 0. */
+ if (ages[LEAF_GEN(leaf)] > u8c->tree->maxage) {
+ ccc = STOPPER;
+ } else if ((ccc = LEAF_CCC(leaf)) == DECOMPOSE) {
+ u8c->len -= utf8clen(u8c->s);
+ u8c->p = u8c->s + utf8clen(u8c->s);
+ u8c->s = LEAF_STR(leaf);
+ /* Empty decomposition implies CCC 0. */
+ if (*u8c->s == '\0') {
+ if (u8c->ccc == STOPPER)
+ continue;
+ ccc = STOPPER;
+ goto ccc_mismatch;
+ }
+ leaf = utf8lookup(u8c->tree, u8c->hangul, u8c->s);
+ ccc = LEAF_CCC(leaf);
+ }
+ u8c->unichar = utf8decode(u8c->s);
+
+ /*
+ * If this is not a stopper, then see if it updates
+ * the next canonical class to be emitted.
+ */
+ if (ccc != STOPPER && u8c->ccc < ccc && ccc < u8c->nccc)
+ u8c->nccc = ccc;
+
+ /*
+ * Return the current byte if this is the current
+ * combining class.
+ */
+ if (ccc == u8c->ccc) {
+ if (!u8c->p)
+ u8c->len--;
+ return (unsigned char)*u8c->s++;
+ }
+
+ /* Current combining class mismatch. */
+ ccc_mismatch:
+ if (u8c->nccc == STOPPER) {
+ /*
+ * Scan forward for the first canonical class
+ * to be emitted. Save the position from
+ * which to restart.
+ */
+ assert(u8c->ccc == STOPPER);
+ u8c->ccc = MINCCC - 1;
+ u8c->nccc = ccc;
+ u8c->sp = u8c->p;
+ u8c->ss = u8c->s;
+ u8c->slen = u8c->len;
+ if (!u8c->p)
+ u8c->len -= utf8clen(u8c->s);
+ u8c->s += utf8clen(u8c->s);
+ } else if (ccc != STOPPER) {
+ /* Not a stopper, and not the ccc we're emitting. */
+ if (!u8c->p)
+ u8c->len -= utf8clen(u8c->s);
+ u8c->s += utf8clen(u8c->s);
+ } else if (u8c->nccc != MAXCCC + 1) {
+ /* At a stopper, restart for next ccc. */
+ u8c->ccc = u8c->nccc;
+ u8c->nccc = MAXCCC + 1;
+ u8c->s = u8c->ss;
+ u8c->p = u8c->sp;
+ u8c->len = u8c->slen;
+ } else {
+ /* All done, proceed from here. */
+ u8c->ccc = STOPPER;
+ u8c->nccc = STOPPER;
+ u8c->sp = NULL;
+ u8c->ss = NULL;
+ u8c->slen = 0;
+ }
+ }
+}
+
+/* ------------------------------------------------------------------ */
+
+static int normalize_line(struct tree *tree)
+{
+ char *s;
+ char *t;
+ int c;
+ struct utf8cursor u8c;
+
+ /* First test: null-terminated string. */
+ s = buf2;
+ t = buf3;
+ if (utf8cursor(&u8c, tree, s))
+ return -1;
+ while ((c = utf8byte(&u8c)) > 0)
+ if (c != (unsigned char)*t++)
+ return -1;
+ if (c < 0)
+ return -1;
+ if (*t != 0)
+ return -1;
+
+ /* Second test: length-limited string. */
+ s = buf2;
+ /* Replace NUL with a value that will cause an error if seen. */
+ s[strlen(s) + 1] = -1;
+ t = buf3;
+ if (utf8cursor(&u8c, tree, s))
+ return -1;
+ while ((c = utf8byte(&u8c)) > 0)
+ if (c != (unsigned char)*t++)
+ return -1;
+ if (c < 0)
+ return -1;
+ if (*t != 0)
+ return -1;
+
+ return 0;
+}
+
+static void normalization_test(void)
+{
+ FILE *file;
+ unsigned int unichar;
+ struct unicode_data *data;
+ char *s;
+ char *t;
+ int ret;
+ int ignorables;
+ int tests = 0;
+ int failures = 0;
+
+ if (verbose > 0)
+ printf("Parsing %s\n", test_name);
+ /* Step one, read data from file. */
+ file = fopen(test_name, "r");
+ if (!file)
+ open_fail(test_name, errno);
+
+ while (fgets(line, LINESIZE, file)) {
+ ret = sscanf(line, "%[^;];%*[^;];%*[^;];%*[^;];%[^;];",
+ buf0, buf1);
+ if (ret != 2 || *line == '#')
+ continue;
+ s = buf0;
+ t = buf2;
+ while (*s) {
+ unichar = strtoul(s, &s, 16);
+ t += utf8encode(t, unichar);
+ }
+ *t = '\0';
+
+ ignorables = 0;
+ s = buf1;
+ t = buf3;
+ while (*s) {
+ unichar = strtoul(s, &s, 16);
+ data = &unicode_data[unichar];
+ if (data->utf8nfkdi && !*data->utf8nfkdi)
+ ignorables = 1;
+ else
+ t += utf8encode(t, unichar);
+ }
+ *t = '\0';
+
+ tests++;
+ if (normalize_line(nfkdi_tree) < 0) {
+ printf("Line %s -> %s", buf0, buf1);
+ if (ignorables)
+ printf(" (ignorables removed)");
+ printf(" failure\n");
+ failures++;
+ }
+ }
+ fclose(file);
+ if (verbose > 0)
+ printf("Ran %d tests with %d failures\n", tests, failures);
+ if (failures)
+ file_fail(test_name);
+}
+
+/* ------------------------------------------------------------------ */
+
+static void write_file(void)
+{
+ FILE *file;
+ int i;
+ int j;
+ int t;
+ int gen;
+
+ if (verbose > 0)
+ printf("Writing %s\n", utf8_name);
+ file = fopen(utf8_name, "w");
+ if (!file)
+ open_fail(utf8_name, errno);
+
+ fprintf(file, "/* This file is generated code, do not edit. */\n");
+ fprintf(file, "#ifndef __INCLUDED_FROM_UTF8NORM_C__\n");
+ fprintf(file, "#error Only nls_utf8-norm.c should include this file.\n");
+ fprintf(file, "#endif\n");
+ fprintf(file, "\n");
+ fprintf(file, "static const unsigned int utf8vers = %#x;\n",
+ unicode_maxage);
+ fprintf(file, "\n");
+ fprintf(file, "static const unsigned int utf8agetab[] = {\n");
+ for (i = 0; i != ages_count; i++)
+ fprintf(file, "\t%#x%s\n", ages[i],
+ ages[i] == unicode_maxage ? "" : ",");
+ fprintf(file, "};\n");
+ fprintf(file, "\n");
+ fprintf(file, "static const struct utf8data utf8nfkdicfdata[] = {\n");
+ t = 0;
+ for (gen = 0; gen < ages_count; gen++) {
+ fprintf(file, "\t{ %#x, %d }%s\n",
+ ages[gen], trees[t].index,
+ ages[gen] == unicode_maxage ? "" : ",");
+ if (trees[t].maxage == ages[gen])
+ t += 2;
+ }
+ fprintf(file, "};\n");
+ fprintf(file, "\n");
+ fprintf(file, "static const struct utf8data utf8nfkdidata[] = {\n");
+ t = 1;
+ for (gen = 0; gen < ages_count; gen++) {
+ fprintf(file, "\t{ %#x, %d }%s\n",
+ ages[gen], trees[t].index,
+ ages[gen] == unicode_maxage ? "" : ",");
+ if (trees[t].maxage == ages[gen])
+ t += 2;
+ }
+ fprintf(file, "};\n");
+ fprintf(file, "\n");
+ fprintf(file, "static const unsigned char utf8data[%zd] = {\n",
+ utf8data_size);
+ t = 0;
+ for (i = 0; i != utf8data_size; i += 16) {
+ if (i == trees[t].index) {
+ fprintf(file, "\t/* %s_%x */\n",
+ trees[t].type, trees[t].maxage);
+ if (t < trees_count-1)
+ t++;
+ }
+ fprintf(file, "\t");
+ for (j = i; j != i + 16; j++)
+ fprintf(file, "0x%.2x%s", utf8data[j],
+ (j < utf8data_size -1 ? "," : ""));
+ fprintf(file, "\n");
+ }
+ fprintf(file, "};\n");
+ fclose(file);
+}
+
+/* ------------------------------------------------------------------ */
+
+int main(int argc, char *argv[])
+{
+ unsigned int unichar;
+ int opt;
+
+ argv0 = argv[0];
+
+ while ((opt = getopt(argc, argv, "a:c:d:f:hn:o:p:t:v")) != -1) {
+ switch (opt) {
+ case 'a':
+ age_name = optarg;
+ break;
+ case 'c':
+ ccc_name = optarg;
+ break;
+ case 'd':
+ data_name = optarg;
+ break;
+ case 'f':
+ fold_name = optarg;
+ break;
+ case 'n':
+ norm_name = optarg;
+ break;
+ case 'o':
+ utf8_name = optarg;
+ break;
+ case 'p':
+ prop_name = optarg;
+ break;
+ case 't':
+ test_name = optarg;
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'h':
+ help();
+ exit(0);
+ default:
+ usage();
+ }
+ }
+
+ if (verbose > 1)
+ help();
+ for (unichar = 0; unichar != 0x110000; unichar++)
+ unicode_data[unichar].code = unichar;
+ age_init();
+ ccc_init();
+ nfkdi_init();
+ nfkdicf_init();
+ ignore_init();
+ corrections_init();
+ hangul_decompose();
+ nfkdi_decompose();
+ nfkdicf_decompose();
+ utf8_init();
+ trees_init();
+ trees_populate();
+ trees_reduce();
+ trees_verify();
+ /* Prevent "unused function" warning. */
+ (void)lookup(nfkdi_tree, " ");
+ if (verbose > 2)
+ tree_walk(nfkdi_tree);
+ if (verbose > 2)
+ tree_walk(nfkdicf_tree);
+ normalization_test();
+ write_file();
+
+ return 0;
+}
diff --git a/util/subst.c b/util/subst.c
new file mode 100644
index 0000000..be2a0dd
--- /dev/null
+++ b/util/subst.c
@@ -0,0 +1,468 @@
+/*
+ * subst.c --- substitution program
+ *
+ * Subst is used as a quickie program to do @ substitutions
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#else
+#define HAVE_SYS_STAT_H
+#define HAVE_SYS_TIME_H
+#endif
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#include <utime.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+
+
+struct subst_entry {
+ char *name;
+ char *value;
+ struct subst_entry *next;
+};
+
+static struct subst_entry *subst_table = 0;
+
+static int add_subst(char *name, char *value)
+{
+ struct subst_entry *ent = 0;
+
+ ent = (struct subst_entry *) malloc(sizeof(struct subst_entry));
+ if (!ent)
+ goto fail;
+ ent->name = (char *) malloc(strlen(name)+1);
+ if (!ent->name)
+ goto fail;
+ ent->value = (char *) malloc(strlen(value)+1);
+ if (!ent->value)
+ goto fail;
+ strcpy(ent->name, name);
+ strcpy(ent->value, value);
+ ent->next = subst_table;
+ subst_table = ent;
+ return 0;
+fail:
+ if (ent) {
+ free(ent->name);
+ free(ent);
+ }
+ return ENOMEM;
+}
+
+static struct subst_entry *fetch_subst_entry(char *name)
+{
+ struct subst_entry *ent;
+
+ for (ent = subst_table; ent; ent = ent->next) {
+ if (strcmp(name, ent->name) == 0)
+ break;
+ }
+ return ent;
+}
+
+/*
+ * Given the starting and ending position of the replacement name,
+ * check to see if it is valid, and pull it out if it is.
+ */
+static char *get_subst_symbol(const char *begin, size_t len, char prefix)
+{
+ static char replace_name[128];
+ char *cp, *start;
+
+ start = replace_name;
+ if (prefix)
+ *start++ = prefix;
+
+ if (len > sizeof(replace_name)-2)
+ return NULL;
+ memcpy(start, begin, len);
+ start[len] = 0;
+
+ /*
+ * The substitution variable must all be in the of [0-9A-Za-z_].
+ * If it isn't, this must be an invalid symbol name.
+ */
+ for (cp = start; *cp; cp++) {
+ if (!(*cp >= 'a' && *cp <= 'z') &&
+ !(*cp >= 'A' && *cp <= 'Z') &&
+ !(*cp >= '0' && *cp <= '9') &&
+ !(*cp == '_'))
+ return NULL;
+ }
+ return (replace_name);
+}
+
+static void replace_string(char *begin, char *end, char *newstr)
+{
+ int replace_len, len;
+
+ replace_len = strlen(newstr);
+ len = end - begin;
+ if (replace_len == 0)
+ memmove(begin, end+1, strlen(end)+1);
+ else if (replace_len != len+1)
+ memmove(end+(replace_len-len-1), end,
+ strlen(end)+1);
+ memcpy(begin, newstr, replace_len);
+}
+
+static void substitute_line(char *line)
+{
+ char *ptr, *name_ptr, *end_ptr;
+ struct subst_entry *ent;
+ char *replace_name;
+ size_t len;
+
+ /*
+ * Expand all @FOO@ substitutions
+ */
+ ptr = line;
+ while (ptr) {
+ name_ptr = strchr(ptr, '@');
+ if (!name_ptr)
+ break; /* No more */
+ if (*(++name_ptr) == '@') {
+ /*
+ * Handle tytso@@mit.edu --> tytso@mit.edu
+ */
+ memmove(name_ptr-1, name_ptr, strlen(name_ptr)+1);
+ ptr = name_ptr+1;
+ continue;
+ }
+ end_ptr = strchr(name_ptr, '@');
+ if (!end_ptr)
+ break;
+ len = end_ptr - name_ptr;
+ replace_name = get_subst_symbol(name_ptr, len, 0);
+ if (!replace_name) {
+ ptr = name_ptr;
+ continue;
+ }
+ ent = fetch_subst_entry(replace_name);
+ if (!ent) {
+ fprintf(stderr, "Unfound expansion: '%s'\n",
+ replace_name);
+ ptr = end_ptr + 1;
+ continue;
+ }
+#if 0
+ fprintf(stderr, "Replace name = '%s' with '%s'\n",
+ replace_name, ent->value);
+#endif
+ ptr = name_ptr-1;
+ replace_string(ptr, end_ptr, ent->value);
+ if ((ent->value[0] == '@') &&
+ (strlen(replace_name) == strlen(ent->value)-2) &&
+ !strncmp(replace_name, ent->value+1,
+ strlen(ent->value)-2))
+ /* avoid an infinite loop */
+ ptr += strlen(ent->value);
+ }
+ /*
+ * Now do a second pass to expand ${FOO}
+ */
+ ptr = line;
+ while (ptr) {
+ name_ptr = strchr(ptr, '$');
+ if (!name_ptr)
+ break; /* No more */
+ if (*(++name_ptr) != '{') {
+ ptr = name_ptr;
+ continue;
+ }
+ name_ptr++;
+ end_ptr = strchr(name_ptr, '}');
+ if (!end_ptr)
+ break;
+ len = end_ptr - name_ptr;
+ replace_name = get_subst_symbol(name_ptr, len, '$');
+ if (!replace_name) {
+ ptr = name_ptr;
+ continue;
+ }
+ ent = fetch_subst_entry(replace_name);
+ if (!ent) {
+ ptr = end_ptr + 1;
+ continue;
+ }
+#if 0
+ fprintf(stderr, "Replace name = '%s' with '%s'\n",
+ replace_name, ent->value);
+#endif
+ ptr = name_ptr-2;
+ replace_string(ptr, end_ptr, ent->value);
+ }
+}
+
+static void parse_config_file(FILE *f)
+{
+ char line[2048];
+ char *cp, *ptr;
+
+ while (!feof(f)) {
+ memset(line, 0, sizeof(line));
+ if (fgets(line, sizeof(line), f) == NULL)
+ break;
+ /*
+ * Strip newlines and comments.
+ */
+ cp = strchr(line, '\n');
+ if (cp)
+ *cp = 0;
+ cp = strchr(line, '#');
+ if (cp)
+ *cp = 0;
+ /*
+ * Skip trailing and leading whitespace
+ */
+ for (cp = line + strlen(line) - 1; cp >= line; cp--) {
+ if (*cp == ' ' || *cp == '\t')
+ *cp = 0;
+ else
+ break;
+ }
+ cp = line;
+ while (*cp && isspace(*cp))
+ cp++;
+ ptr = cp;
+ /*
+ * Skip empty lines
+ */
+ if (*ptr == 0)
+ continue;
+ /*
+ * Ignore future extensions
+ */
+ if (*ptr == '@')
+ continue;
+ /*
+ * Parse substitutions
+ */
+ for (cp = ptr; *cp; cp++)
+ if (isspace(*cp))
+ break;
+ *cp = 0;
+ for (cp++; *cp; cp++)
+ if (!isspace(*cp))
+ break;
+#if 0
+ printf("Substitute: '%s' for '%s'\n", ptr, cp ? cp : "<NULL>");
+#endif
+ add_subst(ptr, cp);
+ }
+}
+
+/*
+ * Return 0 if the files are different, 1 if the files are the same.
+ */
+static int compare_file(FILE *old_f, FILE *new_f)
+{
+ char oldbuf[2048], newbuf[2048], *oldcp, *newcp;
+ int retval;
+
+ while (1) {
+ oldcp = fgets(oldbuf, sizeof(oldbuf), old_f);
+ newcp = fgets(newbuf, sizeof(newbuf), new_f);
+ if (!oldcp && !newcp) {
+ retval = 1;
+ break;
+ }
+ if (!oldcp || !newcp || strcmp(oldbuf, newbuf)) {
+ retval = 0;
+ break;
+ }
+ }
+ return retval;
+}
+
+void set_utimes(const char *filename, int fd, const struct timeval times[2])
+{
+#ifdef HAVE_FUTIMES
+ if (futimes(fd, times) < 0)
+ perror("futimes");
+#elif HAVE_UTIMES
+ if (utimes(filename, times) < 0)
+ perror("utimes");
+#else
+ struct utimbuf ut;
+
+ ut.actime = times[0].tv_sec;
+ ut.modtime = times[1].tv_sec;
+ if (utime(filename, &ut) < 0)
+ perror("utime");
+#endif
+}
+
+
+int main(int argc, char **argv)
+{
+ char line[2048];
+ int c;
+ int fd, ofd = -1;
+ FILE *in, *out, *old = NULL;
+ char *outfn = NULL, *newfn = NULL;
+ int verbose = 0;
+ int adjust_timestamp = 0;
+ int got_atime = 0;
+ struct stat stbuf;
+ struct timeval tv[2];
+
+ while ((c = getopt (argc, argv, "f:tv")) != EOF) {
+ switch (c) {
+ case 'f':
+ in = fopen(optarg, "r");
+ if (!in) {
+ perror(optarg);
+ exit(1);
+ }
+ parse_config_file(in);
+ fclose(in);
+ break;
+ case 't':
+ adjust_timestamp++;
+ break;
+ case 'v':
+ verbose++;
+ break;
+ default:
+ fprintf(stderr, "%s: [-f config-file] [file]\n",
+ argv[0]);
+ break;
+ }
+ }
+ if (optind < argc) {
+ in = fopen(argv[optind], "r");
+ if (!in) {
+ perror(argv[optind]);
+ exit(1);
+ }
+ optind++;
+ } else
+ in = stdin;
+
+ if (optind < argc) {
+ outfn = argv[optind];
+ newfn = (char *) malloc(strlen(outfn)+20);
+ if (!newfn) {
+ fprintf(stderr, "Memory error! Exiting.\n");
+ exit(1);
+ }
+ strcpy(newfn, outfn);
+ strcat(newfn, ".new");
+ ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644);
+ if (ofd < 0) {
+ perror(newfn);
+ exit(1);
+ }
+ out = fdopen(ofd, "w+");
+ if (!out) {
+ perror("fdopen");
+ exit(1);
+ }
+
+ fd = open(outfn, O_RDONLY);
+ if (fd > 0) {
+ /* save the original atime, if possible */
+ if (fstat(fd, &stbuf) == 0) {
+#if HAVE_STRUCT_STAT_ST_ATIM
+ tv[0].tv_sec = stbuf.st_atim.tv_sec;
+ tv[0].tv_usec = stbuf.st_atim.tv_nsec / 1000;
+#else
+ tv[0].tv_sec = stbuf.st_atime;
+ tv[0].tv_usec = 0;
+#endif
+ got_atime = 1;
+ }
+ old = fdopen(fd, "r");
+ if (!old)
+ close(fd);
+ }
+ } else {
+ out = stdout;
+ outfn = 0;
+ }
+
+ while (!feof(in)) {
+ if (fgets(line, sizeof(line), in) == NULL)
+ break;
+ substitute_line(line);
+ fputs(line, out);
+ }
+ fclose(in);
+ if (outfn) {
+ fflush(out);
+ rewind(out);
+ if (old && compare_file(old, out)) {
+ if (verbose)
+ printf("No change, keeping %s.\n", outfn);
+ if (adjust_timestamp) {
+ if (verbose)
+ printf("Updating modtime for %s\n", outfn);
+ if (gettimeofday(&tv[1], NULL) < 0) {
+ perror("gettimeofday");
+ exit(1);
+ }
+ if (got_atime == 0)
+ tv[0] = tv[1];
+ else if (verbose)
+ printf("Using original atime\n");
+ set_utimes(outfn, fileno(old), tv);
+ }
+#ifndef _WIN32
+ if (ofd >= 0)
+ (void) fchmod(ofd, 0444);
+#endif
+ fclose(out);
+ if (unlink(newfn) < 0)
+ perror("unlink");
+ } else {
+ if (verbose)
+ printf("Creating or replacing %s.\n", outfn);
+#ifndef _WIN32
+ if (ofd >= 0)
+ (void) fchmod(ofd, 0444);
+#endif
+ fclose(out);
+ if (old)
+ fclose(old);
+ old = NULL;
+ if (rename(newfn, outfn) < 0) {
+ perror("rename");
+ exit(1);
+ }
+ }
+ }
+ if (old)
+ fclose(old);
+ if (newfn)
+ free(newfn);
+ return (0);
+}
+
+
diff --git a/util/subst.conf.in b/util/subst.conf.in
new file mode 100644
index 0000000..0da4554
--- /dev/null
+++ b/util/subst.conf.in
@@ -0,0 +1,26 @@
+AWK @AWK@
+SED @SED@
+E2FSPROGS_MONTH @E2FSPROGS_MONTH@
+E2FSPROGS_YEAR @E2FSPROGS_YEAR@
+E2FSPROGS_DATE @E2FSPROGS_DATE@
+E2FSPROGS_VERSION @E2FSPROGS_VERSION@
+SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
+SIZEOF_LONG @SIZEOF_LONG@
+SIZEOF_INT @SIZEOF_INT@
+SIZEOF_SHORT @SIZEOF_SHORT@
+datarootdir @datarootdir@
+datadir @datadir@
+root_sysconfdir @root_sysconfdir@
+$datarootdir @datarootdir@
+$root_prefix @root_prefix@
+$prefix @prefix@
+# Enable the documentation for the journal device mke2fs, tune2fs, and
+# e2fsck's man page
+JDEV
+# Enable the documentation for the tdb profile in e2fsck.conf's man page
+TDB_MAN_COMMENT @TDB_MAN_COMMENT@
+root_sbindir @root_sbindir@
+root_bindir @root_bindir@
+libdir @libdir@
+$exec_prefix @exec_prefix@
+pkglibdir @libdir@/e2fsprogs
diff --git a/util/symlinks.c b/util/symlinks.c
new file mode 100644
index 0000000..e9d2b01
--- /dev/null
+++ b/util/symlinks.c
@@ -0,0 +1,391 @@
+#define _FILE_OFFSET_BITS 64
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
+#include <unistd.h>
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#include <string.h>
+#include <fcntl.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <time.h>
+#include <stddef.h>
+#include <errno.h>
+
+#ifndef S_ISLNK
+#define S_ISLNK(mode) (((mode) & (_S_IFMT)) == (_S_IFLNK))
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
+#define progver "%s: scan/change symbolic links - v1.3 - by Mark Lord\n\n"
+static char *progname;
+static int verbose = 0, fix_links = 0, recurse = 0, delete = 0, shorten = 0,
+ testing = 0, single_fs = 1;
+
+/*
+ * tidypath removes excess slashes and "." references from a path string
+ */
+
+static int substr (char *s, char *old, char *new)
+{
+ char *tmp = NULL;
+ int oldlen = strlen(old), newlen = 0;
+
+ if (NULL == strstr(s, old))
+ return 0;
+
+ if (new)
+ newlen = strlen(new);
+
+ if (newlen > oldlen) {
+ if ((tmp = malloc(strlen(s))) == NULL) {
+ fprintf(stderr, "no memory\n");
+ exit (1);
+ }
+ }
+
+ while (NULL != (s = strstr(s, old))) {
+ char *p, *old_s = s;
+
+ if (new) {
+ if (newlen > oldlen)
+ old_s = strcpy(tmp, s);
+ p = new;
+ while (*p)
+ *s++ = *p++;
+ }
+ p = old_s + oldlen;
+ while ((*s++ = *p++));
+ }
+ if (tmp)
+ free(tmp);
+ return 1;
+}
+
+
+static int tidy_path (char *path)
+{
+ int tidied = 0;
+ char *s, *p;
+
+ s = path + strlen(path) - 1;
+ if (s[0] != '/') { /* tmp trailing slash simplifies things */
+ s[1] = '/';
+ s[2] = '\0';
+ }
+ while (substr(path, "/./", "/"))
+ tidied = 1;
+ while (substr(path, "//", "/"))
+ tidied = 1;
+
+ while ((p = strstr(path,"/../")) != NULL) {
+ s = p+3;
+ for (p--; p != path; p--) if (*p == '/') break;
+ if (*p != '/')
+ break;
+ while ((*p++ = *s++));
+ tidied = 1;
+ }
+ if (*path == '\0')
+ strcpy(path,"/");
+ p = path + strlen(path) - 1;
+ if (p != path && *p == '/')
+ *p-- = '\0'; /* remove tmp trailing slash */
+ while (p != path && *p == '/') { /* remove any others */
+ *p-- = '\0';
+ tidied = 1;
+ }
+ while (!strncmp(path,"./",2)) {
+ for (p = path, s = path+2; (*p++ = *s++););
+ tidied = 1;
+ }
+ return tidied;
+}
+
+static int shorten_path (char *path, char *abspath)
+{
+ static char dir[PATH_MAX];
+ int shortened = 0;
+ char *p;
+
+ /* get rid of unnecessary "../dir" sequences */
+ while (abspath && strlen(abspath) > 1 && (p = strstr(path,"../"))) {
+ /* find innermost occurrence of "../dir", and save "dir" */
+ int slashes = 2;
+ char *a, *s, *d = dir;
+ while ((s = strstr(p+3, "../"))) {
+ ++slashes;
+ p = s;
+ }
+ s = p+3;
+ *d++ = '/';
+ while (*s && *s != '/')
+ *d++ = *s++;
+ *d++ = '/';
+ *d = '\0';
+ if (!strcmp(dir,"//"))
+ break;
+ /* note: p still points at ../dir */
+ if (*s != '/' || !*++s)
+ break;
+ a = abspath + strlen(abspath) - 1;
+ while (slashes-- > 0) {
+ if (a <= abspath)
+ goto ughh;
+ while (*--a != '/') {
+ if (a <= abspath)
+ goto ughh;
+ }
+ }
+ if (strncmp(dir, a, strlen(dir)))
+ break;
+ while ((*p++ = *s++)); /* delete the ../dir */
+ shortened = 1;
+ }
+ughh:
+ return shortened;
+}
+
+
+static void fix_symlink (char *path, dev_t my_dev)
+{
+ static char lpath[PATH_MAX], new[PATH_MAX], abspath[PATH_MAX];
+ char *p, *np, *lp, *tail, *msg;
+ struct stat stbuf, lstbuf;
+ int c, fix_abs = 0, fix_messy = 0, fix_long = 0;
+
+ if ((c = readlink(path, lpath, sizeof(lpath) - 1)) == -1) {
+ perror(path);
+ return;
+ }
+ lpath[c] = '\0'; /* readlink does not null terminate it */
+
+ /* construct the absolute address of the link */
+ abspath[0] = '\0';
+ if (lpath[0] != '/') {
+ strcat(abspath,path);
+ c = strlen(abspath);
+ if ((c > 0) && (abspath[c-1] == '/'))
+ abspath[c-1] = '\0'; /* cut trailing / */
+ if ((p = strrchr(abspath,'/')) != NULL)
+ *p = '\0'; /* cut last component */
+ strcat(abspath,"/");
+ }
+ strcat(abspath,lpath);
+ (void) tidy_path(abspath);
+
+ /* check for various things */
+ if (stat(abspath, &stbuf) == -1) {
+ printf("dangling: %s -> %s\n", path, lpath);
+ if (delete) {
+ if (unlink (path)) {
+ perror(path);
+ } else
+ printf("deleted: %s -> %s\n", path, lpath);
+ }
+ return;
+ }
+
+ if (single_fs)
+ lstat(abspath, &lstbuf); /* if the above didn't fail, then this shouldn't */
+
+ if (single_fs && lstbuf.st_dev != my_dev) {
+ msg = "other_fs:";
+ } else if (lpath[0] == '/') {
+ msg = "absolute:";
+ fix_abs = 1;
+ } else if (verbose) {
+ msg = "relative:";
+ } else
+ msg = NULL;
+ fix_messy = tidy_path(strcpy(new,lpath));
+ if (shorten)
+ fix_long = shorten_path(new, path);
+ if (!fix_abs) {
+ if (fix_messy)
+ msg = "messy: ";
+ else if (fix_long)
+ msg = "lengthy: ";
+ }
+ if (msg != NULL)
+ printf("%s %s -> %s\n", msg, path, lpath);
+ if (!(fix_links || testing) || !(fix_messy || fix_abs || fix_long))
+ return;
+
+ if (fix_abs) {
+ /* convert an absolute link to relative: */
+ /* point tail at first part of lpath that differs from path */
+ /* point p at first part of path that differs from lpath */
+ (void) tidy_path(lpath);
+ tail = lp = lpath;
+ p = path;
+ while (*p && (*p == *lp)) {
+ if (*lp++ == '/') {
+ tail = lp;
+ while (*++p == '/');
+ }
+ }
+
+ /* now create new, with "../"s followed by tail */
+ np = new;
+ while (*p) {
+ if (*p++ == '/') {
+ *np++ = '.';
+ *np++ = '.';
+ *np++ = '/';
+ while (*p == '/') ++p;
+ }
+ }
+ strcpy (np, tail);
+ (void) tidy_path(new);
+ if (shorten) (void) shorten_path(new, path);
+ }
+ shorten_path(new,path);
+ if (!testing) {
+ if (unlink (path)) {
+ perror(path);
+ return;
+ }
+ if (symlink(new, path)) {
+ perror(path);
+ return;
+ }
+ }
+ printf("changed: %s -> %s\n", path, new);
+}
+
+static void dirwalk (char *path, int pathlen, dev_t dev)
+{
+ char *name;
+ DIR *dfd;
+ static struct stat st;
+ static struct dirent *dp;
+
+ if ((dfd = opendir(path)) == NULL) {
+ perror(path);
+ return;
+ }
+
+ name = path + pathlen;
+ if (*(name-1) != '/')
+ *name++ = '/';
+
+ while ((dp = readdir(dfd)) != NULL ) {
+ strcpy(name, dp->d_name);
+ if (strcmp(name, ".") && strcmp(name,"..")) {
+ if (lstat(path, &st) == -1) {
+ perror(path);
+ } else if (st.st_dev == dev) {
+ if (S_ISLNK(st.st_mode)) {
+ fix_symlink (path, dev);
+ } else if (recurse && S_ISDIR(st.st_mode)) {
+ dirwalk(path, strlen(path), dev);
+ }
+ }
+ }
+ }
+ closedir(dfd);
+ path[pathlen] = '\0';
+}
+
+static void usage_error (void)
+{
+ fprintf(stderr, progver, progname);
+ fprintf(stderr, "Usage:\t%s [-cdorstv] LINK|DIR ...\n\n", progname);
+ fprintf(stderr, "Flags:"
+ "\t-c == change absolute/messy links to relative\n"
+ "\t-d == delete dangling links\n"
+ "\t-o == warn about links across file systems\n"
+ "\t-r == recurse into subdirs\n"
+ "\t-s == shorten lengthy links (displayed in output only when -c not specified)\n"
+ "\t-t == show what would be done by -c\n"
+ "\t-v == verbose (show all symlinks)\n\n");
+ exit(1);
+}
+
+int main(int argc, char **argv)
+{
+#if defined (_GNU_SOURCE) && defined (__GLIBC__)
+ static char path[PATH_MAX+2];
+ char* cwd = get_current_dir_name();
+#else
+ static char path[PATH_MAX+2], cwd[PATH_MAX+2];
+#endif
+ int dircount = 0;
+ char c, *p;
+
+ if ((progname = (char *) strrchr(*argv, '/')) == NULL)
+ progname = *argv;
+ else
+ progname++;
+
+#if defined (_GNU_SOURCE) && defined (__GLIBC__)
+ if (NULL == cwd) {
+ fprintf(stderr,"get_current_dir_name() failed\n");
+#else
+ if (NULL == getcwd(cwd,PATH_MAX)) {
+ fprintf(stderr,"getcwd() failed\n");
+#endif
+ exit (1);
+ }
+#if defined (_GNU_SOURCE) && defined (__GLIBC__)
+ cwd = realloc(cwd, strlen(cwd)+2);
+ if (cwd == NULL) {
+ fprintf(stderr, "realloc() failed\n");
+ exit (1);
+ }
+#endif
+ if (!*cwd || cwd[strlen(cwd)-1] != '/')
+ strcat(cwd,"/");
+
+ while (--argc) {
+ p = *++argv;
+ if (*p == '-') {
+ if (*++p == '\0')
+ usage_error();
+ while ((c = *p++)) {
+ if (c == 'c') fix_links = 1;
+ else if (c == 'd') delete = 1;
+ else if (c == 'o') single_fs = 0;
+ else if (c == 'r') recurse = 1;
+ else if (c == 's') shorten = 1;
+ else if (c == 't') testing = 1;
+ else if (c == 'v') verbose = 1;
+ else usage_error();
+ }
+ } else {
+ struct stat st;
+ if (*p == '/')
+ *path = '\0';
+ else
+ strcpy(path,cwd);
+ tidy_path(strcat(path, p));
+ if (lstat(path, &st) == -1)
+ perror(path);
+ else if (S_ISLNK(st.st_mode))
+ fix_symlink(path, st.st_dev);
+ else
+ dirwalk(path, strlen(path), st.st_dev);
+ ++dircount;
+ }
+ }
+ if (dircount == 0)
+ usage_error();
+ exit (0);
+}
diff --git a/util/ucd/README b/util/ucd/README
new file mode 100644
index 0000000..9fed514
--- /dev/null
+++ b/util/ucd/README
@@ -0,0 +1,37 @@
+The files in this directory are part of the Unicode Character Database
+for version 11.0.0 of the Unicode standard.
+
+The full set of UCD files are not distributed with e2fsprogs, since they
+are very large and only needed to regenerate the lib/ext2fs/utf8data.h
+during an Unicode version update. They can be found in the link below
+and also in the Linux kernel source tree:
+
+ http://www.unicode.org/Public/11.0.0/ucd/
+
+The latest released version of the UCD can be found here:
+
+ http://www.unicode.org/Public/UCD/latest/
+
+The files in this directory are identical, except that they have been
+renamed with a suffix indicating the unicode version.
+
+Individual source links:
+
+ http://www.unicode.org/Public/11.0.0/ucd/CaseFolding.txt
+ http://www.unicode.org/Public/11.0.0/ucd/DerivedAge.txt
+ http://www.unicode.org/Public/11.0.0/ucd/extracted/DerivedCombiningClass.txt
+ http://www.unicode.org/Public/11.0.0/ucd/DerivedCoreProperties.txt
+ http://www.unicode.org/Public/11.0.0/ucd/NormalizationCorrections.txt
+ http://www.unicode.org/Public/11.0.0/ucd/NormalizationTest.txt
+ http://www.unicode.org/Public/11.0.0/ucd/UnicodeData.txt
+
+md5sums
+
+ 414436796cf097df55f798e1585448ee CaseFolding-11.0.0.txt
+ 6032a595fbb782694456491d86eecfac DerivedAge-11.0.0.txt
+ 3240997d671297ac754ab0d27577acf7 DerivedCombiningClass-11.0.0.txt
+ d41d8cd98f00b204e9800998ecf8427e DerivedCombiningClass.txt
+ 2a4fe257d9d8184518e036194d2248ec DerivedCoreProperties-11.0.0.txt
+ 4e7d383fa0dd3cd9d49d64e5b7b7c9e0 NormalizationCorrections-11.0.0.txt
+ c9500c5b8b88e584469f056023ecc3f2 NormalizationTest-11.0.0.txt
+ acc291106c3758d2025f8d7bd5518bee UnicodeData-11.0.0.txt
diff --git a/version.h b/version.h
new file mode 100644
index 0000000..db245ce
--- /dev/null
+++ b/version.h
@@ -0,0 +1,13 @@
+/*
+ * version.h --- controls the version number printed by the e2fs
+ * programs.
+ *
+ * Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ * 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+ * 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 by Theodore
+ * Ts'o. This file may be redistributed under the GNU General Public
+ * License v2.
+ */
+
+#define E2FSPROGS_VERSION "1.47.0"
+#define E2FSPROGS_DATE "5-Feb-2023"
diff --git a/wordwrap.pl b/wordwrap.pl
new file mode 100644
index 0000000..807c628
--- /dev/null
+++ b/wordwrap.pl
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+#
+# wordwrap.pl --- does word wrap
+#
+while (<>) {
+ if (/^#/) { # don't word wrap comments
+ print;
+ next;
+ }
+ next if (/^$/); # skip blank lines
+ $linelen = 0;
+ @words = split;
+ while (defined($word = shift @words)) {
+ $word =~ s#\$\(srcdir\)/\.\./version.h#\$\(top_srcdir\)/version.h#;
+ $word =~ s#\$\(srcdir\)/.\.\/\.\./version.h#\$\(top_srcdir\)/version.h#;
+ $word =~ s#\$\(srcdir\)/.\.\/et/com_err.h#\$\(top_srcdir\)/lib/et/com_err.h#;
+ if ($linelen > 0) {
+ printf(" ");
+ }
+ $len = length($word) + 1;
+ $linelen += $len;
+ if ($linelen > 78) {
+ printf("\\\n ");
+ $linelen = 1+$len;
+ }
+ printf("%s", $word);
+ }
+ printf("\n");
+}